Skip to content

Commit

Permalink
More CSS classes
Browse files Browse the repository at this point in the history
  • Loading branch information
mtabacman committed Aug 25, 2023
1 parent 3f77f49 commit 7c29765
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 22 deletions.
60 changes: 60 additions & 0 deletions source/Willow-SemanticUI/SemanticStyle.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ SemanticStyle >> aligned [
cssClasses add: 'aligned'
]

{ #category : #icons }
SemanticStyle >> alternate [

cssClasses add: 'alternate'
]

Check warning on line 53 in source/Willow-SemanticUI/SemanticStyle.class.st

View check run for this annotation

Codecov / codecov/patch

source/Willow-SemanticUI/SemanticStyle.class.st#L50-L53

Added lines #L50 - L53 were not covered by tests

{ #category : #color }
SemanticStyle >> approve [

Expand Down Expand Up @@ -142,6 +148,12 @@ SemanticStyle >> close [
cssClasses add: 'close'
]

{ #category : #icons }
SemanticStyle >> cloud [

cssClasses add: 'cloud'
]

Check warning on line 155 in source/Willow-SemanticUI/SemanticStyle.class.st

View check run for this annotation

Codecov / codecov/patch

source/Willow-SemanticUI/SemanticStyle.class.st#L152-L155

Added lines #L152 - L155 were not covered by tests

{ #category : #table }
SemanticStyle >> column [

Expand Down Expand Up @@ -226,6 +238,12 @@ SemanticStyle >> doubling [
cssClasses add: 'doubling'
]

{ #category : #icons }
SemanticStyle >> download [

cssClasses add: 'download'
]

Check warning on line 245 in source/Willow-SemanticUI/SemanticStyle.class.st

View check run for this annotation

Codecov / codecov/patch

source/Willow-SemanticUI/SemanticStyle.class.st#L242-L245

Added lines #L242 - L245 were not covered by tests

{ #category : #general }
SemanticStyle >> dropdown [

Expand Down Expand Up @@ -352,6 +370,12 @@ SemanticStyle >> image [
cssClasses add: 'image'
]

{ #category : #general }
SemanticStyle >> info [

cssClasses add: 'info'
]

Check warning on line 377 in source/Willow-SemanticUI/SemanticStyle.class.st

View check run for this annotation

Codecov / codecov/patch

source/Willow-SemanticUI/SemanticStyle.class.st#L374-L377

Added lines #L374 - L377 were not covered by tests

{ #category : #initialization }
SemanticStyle >> initialize [

Expand Down Expand Up @@ -466,6 +490,12 @@ SemanticStyle >> modal [
cssClasses add: 'modal'
]

{ #category : #general }
SemanticStyle >> negative [

cssClasses add: 'negative'
]

Check warning on line 497 in source/Willow-SemanticUI/SemanticStyle.class.st

View check run for this annotation

Codecov / codecov/patch

source/Willow-SemanticUI/SemanticStyle.class.st#L494-L497

Added lines #L494 - L497 were not covered by tests

{ #category : #color }
SemanticStyle >> ok [

Expand All @@ -490,12 +520,24 @@ SemanticStyle >> orange [
cssClasses add: 'orange'
]

{ #category : #icons }
SemanticStyle >> outline [

cssClasses add: 'outline'
]

Check warning on line 527 in source/Willow-SemanticUI/SemanticStyle.class.st

View check run for this annotation

Codecov / codecov/patch

source/Willow-SemanticUI/SemanticStyle.class.st#L524-L527

Added lines #L524 - L527 were not covered by tests

{ #category : #general }
SemanticStyle >> pointing [

cssClasses add: 'pointing'
]

{ #category : #general }
SemanticStyle >> positive [

cssClasses add: 'positive'
]

Check warning on line 539 in source/Willow-SemanticUI/SemanticStyle.class.st

View check run for this annotation

Codecov / codecov/patch

source/Willow-SemanticUI/SemanticStyle.class.st#L536-L539

Added lines #L536 - L539 were not covered by tests

{ #category : #general }
SemanticStyle >> primary [

Expand Down Expand Up @@ -616,6 +658,12 @@ SemanticStyle >> striped [
cssClasses add: 'striped'
]

{ #category : #general }
SemanticStyle >> sub [

cssClasses add: 'sub'
]

Check warning on line 665 in source/Willow-SemanticUI/SemanticStyle.class.st

View check run for this annotation

Codecov / codecov/patch

source/Willow-SemanticUI/SemanticStyle.class.st#L662-L665

Added lines #L662 - L665 were not covered by tests

{ #category : #general }
SemanticStyle >> submit [

Expand Down Expand Up @@ -670,6 +718,12 @@ SemanticStyle >> top [
cssClasses add: 'top'
]

{ #category : #icons }
SemanticStyle >> trash [

cssClasses add: 'trash'
]

Check warning on line 725 in source/Willow-SemanticUI/SemanticStyle.class.st

View check run for this annotation

Codecov / codecov/patch

source/Willow-SemanticUI/SemanticStyle.class.st#L722-L725

Added lines #L722 - L725 were not covered by tests

{ #category : #numbers }
SemanticStyle >> two [

Expand All @@ -682,6 +736,12 @@ SemanticStyle >> ui [
cssClasses add: 'ui'
]

{ #category : #icons }
SemanticStyle >> upload [

cssClasses add: 'upload'
]

Check warning on line 743 in source/Willow-SemanticUI/SemanticStyle.class.st

View check run for this annotation

Codecov / codecov/patch

source/Willow-SemanticUI/SemanticStyle.class.st#L740-L743

Added lines #L740 - L743 were not covered by tests

{ #category : #positioning }
SemanticStyle >> vertical [

Expand Down
43 changes: 21 additions & 22 deletions source/Willow-SemanticUI/SemanticUIComponentSupplier.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ SemanticUIComponentSupplier >> activeElementStyle [
SemanticUIComponentSupplier >> asynchronicButtonLabeled: aRenderable applying: aComponentCommand [

^ AsynchronicButtonWebView
labeled: aRenderable
applying:
[ :theButton | (theButton addClass semantic: [ :style | style ui button ]) + aComponentCommand ]
labeled: aRenderable
applying: [ :theButton |
( theButton addClass semantic: [ :style | style ui button ] ) + aComponentCommand ]
]

{ #category : #Supplying }
Expand Down Expand Up @@ -77,10 +77,9 @@ SemanticUIComponentSupplier >> dialogBuilder [
SemanticUIComponentSupplier >> dropdownListApplying: aComponentCommand applyingToOptions: anOptionCommand [

^ SingleSelectionWebView
dropDownListApplying: [ :view |
(view addScript js: [ :canvas | canvas jQuery this call: 'dropdown' ])
+ aComponentCommand ]
applyingToOptions: anOptionCommand
dropDownListApplying: [ :view |
( view addScript js: [ :canvas | canvas jQuery this call: 'dropdown' ] ) + aComponentCommand ]
applyingToOptions: anOptionCommand
]

{ #category : #'Supplying - Non Portable' }
Expand Down Expand Up @@ -167,27 +166,27 @@ SemanticUIComponentSupplier >> naturalNumberFieldApplying: aComponentCommand [
| field |

field := NumberFieldWebView
applying: [ :theField | theField boundNotNegative + aComponentCommand ]
transformingWith: NaturalNumberCodec new.
applying: [ :theField | theField boundNotNegative + aComponentCommand ]
transformingWith: NaturalNumberCodec new.

^ SemanticComponent
wrapping: field
applying: [ :container | container addClass semantic: [ :style | style ui input ] ]
wrapping: field
applying: [ :container | container addClass semantic: [ :style | style ui input ] ]
]

{ #category : #Supplying }
SemanticUIComponentSupplier >> radioRenderingWith: aRenderingBlock applyingToLabel: aLabelCommand applyingToInput: anInputCommand [

| radio |

radio := SemanticRadioWebView
renderingWith: aRenderingBlock
applyingToLabel: aLabelCommand
applyingToInput: anInputCommand.
radio := SemanticRadioWebView
renderingWith: aRenderingBlock
applyingToLabel: aLabelCommand
applyingToInput: anInputCommand.

^ SemanticComponent
wrapping: radio
applying: [ :container | container addClass semantic: [ :style | style inline fields ] ]
wrapping: radio
applying: [ :container | container addClass semantic: [ :style | style inline fields ] ]
]

{ #category : #'Supplying - Non Portable' }
Expand Down Expand Up @@ -227,9 +226,9 @@ SemanticUIComponentSupplier >> singleLineTextFieldApplying: aComponentCommand [
SemanticUIComponentSupplier >> singleSelectionListBoxDisplayingAtOnce: aNumberOfElements applying: aComponentCommand applyingToOptions: anOptionCommand [

^ SingleSelectionWebView
listBoxDisplayingAtOnce: aNumberOfElements
applying: aComponentCommand
applyingToOptions: anOptionCommand
listBoxDisplayingAtOnce: aNumberOfElements
applying: aComponentCommand
applyingToOptions: anOptionCommand
]

{ #category : #Supplying }
Expand All @@ -252,8 +251,8 @@ SemanticUIComponentSupplier >> synchronicLinkLabeled: aRenderable applying: aCom
SemanticUIComponentSupplier >> tableBuilder [

^ TableWebViewBuilder new
apply: [ :table | table addClass semantic: [ :s | s ui table ] ];
yourself
apply: [ :table | table addClass semantic: [ :s | s ui table ] ];
yourself

Check warning on line 255 in source/Willow-SemanticUI/SemanticUIComponentSupplier.class.st

View check run for this annotation

Codecov / codecov/patch

source/Willow-SemanticUI/SemanticUIComponentSupplier.class.st#L254-L255

Added lines #L254 - L255 were not covered by tests
]

{ #category : #'Supplying - Non Portable' }
Expand Down

0 comments on commit 7c29765

Please sign in to comment.