Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
smalltalk: [ Pharo64-8.0, Pharo64-9.0, Pharo64-10, Pharo64-11, Pharo64-12 ]
smalltalk: [ Pharo64-12, Pharo64-13, Pharo64-Stable ]
name: ${{ matrix.smalltalk }}
steps:
- uses: actions/checkout@v2
- name: Set up Smalltalk CI
uses: hpi-swa/setup-smalltalkCI@v1
id: smalltalkci
with:
smalltalk-image: ${{ matrix.smalltalk }}
- name: Load Image and Run Tests
Expand Down
2 changes: 1 addition & 1 deletion .smalltalk.ston
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
SmalltalkCISpec {
#loading : [
SCIMetacelloLoadSpec {
#baseline : 'Bootstrap4',
#baseline : 'Bootstrap5',
#directory : 'src',
#platforms : [ #pharo ],
#load : [ 'all' ]
Expand Down
5 changes: 0 additions & 5 deletions src/BaselineOfBootstrap5/BaselineOfBootstrap5.class.st
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
"
Baseline for Seaside wrapper for Bootstrap 5

[https://github.com/astares/Seaside-Bootstrap5](https://github.com/astares/Seaside-Bootstrap5)
"
Class {
#name : 'BaselineOfBootstrap5',
#superclass : 'BaselineOf',
Expand Down
8 changes: 8 additions & 0 deletions src/Bootstrap5-Core-Tests/SBSCanvasBrushTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -2920,6 +2920,14 @@ SBSCanvasBrushTest >> testNavigationWithContent [
gives: '<nav class="nav">Bootstrap</nav>'
]

{ #category : 'tests - offcanvas' }
SBSCanvasBrushTest >> testOffCanvas [

self
assert: [ :html | html offCanvas ]
gives: '<div class="offcanvas"></div>'
]

{ #category : 'tests - buttons' }
SBSCanvasBrushTest >> testOutlineButton [

Expand Down
6 changes: 6 additions & 0 deletions src/Bootstrap5-Core/GRDelayedSend.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Extension { #name : 'GRDelayedSend' }

{ #category : '*Bootstrap5-Core' }
GRDelayedSend >> selectorName [
^message selector
]
6 changes: 6 additions & 0 deletions src/Bootstrap5-Core/GRDelayedSendMessage.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Extension { #name : 'GRDelayedSendMessage' }

{ #category : '*Bootstrap5-Core' }
GRDelayedSendMessage >> selector [
^selector
]
21 changes: 21 additions & 0 deletions src/Bootstrap5-Core/SBSAccordionButtonTag.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,24 @@ SBSAccordionButtonTag >> defaultStyleClass [

^'accordion-button'
]

{ #category : 'initialization' }
SBSAccordionButtonTag >> initialize [
super initialize .
self dataToggle: 'collapse'.
self startCollapsed
]

{ #category : 'initialization' }
SBSAccordionButtonTag >> startCollapsed [

self attributeAt: 'aria-expanded' put: false.
self class: 'collapsed'
]

{ #category : 'initialization' }
SBSAccordionButtonTag >> startOpen: aBoolean [

self attributeAt: 'aria-expanded' put: aBoolean.
aBoolean ifTrue: [ self attributes removeClass: 'collapsed' ]
]
13 changes: 12 additions & 1 deletion src/Bootstrap5-Core/SBSAccordionCollapseTag.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,16 @@ Class {
{ #category : 'defaults' }
SBSAccordionCollapseTag >> defaultStyleClass [

^ 'accordion-collapse'
^ 'accordion-collapse collapse'
]

{ #category : 'defaults' }
SBSAccordionCollapseTag >> parent: anId [

self dataAttributeAt: 'bs-parent' put: anId
]

{ #category : 'defaults' }
SBSAccordionCollapseTag >> startOpen: aBoolean [
self class:'show' if: aBoolean
]
2 changes: 1 addition & 1 deletion src/Bootstrap5-Core/SBSAccordionHeadingTag.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ Class {
{ #category : 'defaults' }
SBSAccordionHeadingTag >> defaultStyleClass [

^ 'accordion-heading'
^ 'accordion-header'
]
6 changes: 6 additions & 0 deletions src/Bootstrap5-Core/SBSAccordionTag.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ Class {
#tag : 'Base'
}

{ #category : 'defaults' }
SBSAccordionTag >> beFlush [

self class:'accordion-flush'
]

{ #category : 'defaults' }
SBSAccordionTag >> defaultStyleClass [

Expand Down
6 changes: 0 additions & 6 deletions src/Bootstrap5-Core/SBSButtonGroupTag.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ Class {
#tag : 'Base'
}

{ #category : 'screen reader support' }
SBSButtonGroupTag >> ariaLabel: aString [

self attributeAt: 'aria-label' put: aString
]

{ #category : 'defaults' }
SBSButtonGroupTag >> defaultStyleClass [

Expand Down
37 changes: 34 additions & 3 deletions src/Bootstrap5-Core/SBSButtonTag.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ SBSButtonTag >> beBlockIf: aBlock [
self class: 'btn-block' if: aBlock
]

{ #category : 'options' }
SBSButtonTag >> beButtonType [

self bePush
]

{ #category : 'options' }
SBSButtonTag >> beDisabled [

Expand All @@ -61,6 +67,12 @@ SBSButtonTag >> cancelCallback: aBlock [
self name: (self storeCallback: (WACancelActionCallback on: aBlock))
]

{ #category : 'options' }
SBSButtonTag >> collapse [

self dataToggle: 'collapse'
]

{ #category : 'options' }
SBSButtonTag >> dataDismiss: aString [

Expand All @@ -70,7 +82,8 @@ SBSButtonTag >> dataDismiss: aString [
{ #category : 'options' }
SBSButtonTag >> dataTarget: aString [

self attributeAt: 'data-bs-target' put: aString
self attributeAt: 'data-bs-target' put: aString.
self ariaControls: aString
]

{ #category : 'options' }
Expand All @@ -95,7 +108,9 @@ SBSButtonTag >> defaultStyleClass [
{ #category : 'options' }
SBSButtonTag >> dropdown [

self class: 'dropdown-toggle'
self
class: 'dropdown-toggle';
attributeAt: 'data-bs-toggle' put: 'dropdown'
]

{ #category : 'options' }
Expand All @@ -108,8 +123,9 @@ SBSButtonTag >> dropdownSplitted [

{ #category : 'initialization' }
SBSButtonTag >> initialize [

super initialize.
self resetType.
self bePush.
self class: self defaultStyleClass.

self contextStyle: self defaultStyleClass.
Expand All @@ -118,6 +134,21 @@ SBSButtonTag >> initialize [
self sizeStyle: self defaultStyleClass
]

{ #category : 'options' }
SBSButtonTag >> offCanvasTarget: aString [

self
toggleOffCanvas;
dataAttributeAt: 'bs-target' put: aString;
ariaControls: aString
]

{ #category : 'options' }
SBSButtonTag >> offCanvasToggle [

self dataToggle: 'offcanvas'
]

{ #category : 'private' }
SBSButtonTag >> resetType [
type := nil
Expand Down
4 changes: 2 additions & 2 deletions src/Bootstrap5-Core/SBSCDNDeploymentLibrary.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ SBSCDNDeploymentLibrary class >> addLoadScriptTo: html [
{ #category : 'accessing - defaults' }
SBSCDNDeploymentLibrary class >> cdnCSSLocation [

^'https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css'
^'https://cdn.jsdelivr.net/npm/bootstrap@',self versionString ,'/dist/css/bootstrap.min.css'
]

{ #category : 'accessing - defaults' }
Expand All @@ -34,7 +34,7 @@ SBSCDNDeploymentLibrary class >> cdnCSSLocationIntegrity [
{ #category : 'accessing - defaults' }
SBSCDNDeploymentLibrary class >> cdnJSLocation [

^ 'https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js'
^ 'https://cdn.jsdelivr.net/npm/bootstrap@',self versionString ,'/dist/js/bootstrap.bundle.min.js'
]

{ #category : 'accessing - defaults' }
Expand Down
2 changes: 1 addition & 1 deletion src/Bootstrap5-Core/SBSCDNDeploymentLibraryRTL.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Class {
{ #category : 'accessing - defaults' }
SBSCDNDeploymentLibraryRTL class >> cdnCSSLocation [

^ 'https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.rtl.min.css'
^ 'https://cdn.jsdelivr.net/npm/bootstrap@',self versionString ,'/dist/css/bootstrap.rtl.min.css'
]

{ #category : 'accessing - defaults' }
Expand Down
2 changes: 2 additions & 0 deletions src/Bootstrap5-Core/SBSCardTag.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,7 @@ SBSCardTag >> cardBody: aBlockOrString [
{ #category : 'defaults' }
SBSCardTag >> defaultStyleClass [



^'card'
]
49 changes: 49 additions & 0 deletions src/Bootstrap5-Core/SBSCloseButtonTag.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,55 @@ Class {
#tag : 'Base'
}

{ #category : 'defaults' }
SBSCloseButtonTag >> beModalClose [

self
dataDismiss: 'modal';
ariaLabel: 'close'
]

{ #category : 'defaults' }
SBSCloseButtonTag >> beModalClose: targetId [

self
beModalClose;
dataAttributeAt: 'bs-target' put: targetId
]

{ #category : 'defaults' }
SBSCloseButtonTag >> beOffCanvasClose [

self
dataDismiss: 'offcanvas';
ariaLabel: 'close'
]

{ #category : 'defaults' }
SBSCloseButtonTag >> beOffCanvasClose: targetId [

self
beOffCanvasClose;
dataTarget: targetId;
type:'button'
]

{ #category : 'defaults' }
SBSCloseButtonTag >> beToastClose [

self
dataDismiss: 'toast';
ariaLabel: 'close'
]

{ #category : 'defaults' }
SBSCloseButtonTag >> beToastClose: targetId [

self
beToastClose;
dataAttributeAt: 'bs-target' put: targetId
]

{ #category : 'defaults' }
SBSCloseButtonTag >> defaultStyleClass [

Expand Down
14 changes: 14 additions & 0 deletions src/Bootstrap5-Core/SBSCollapseTag.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,20 @@ SBSCollapseTag >> defaultStyleClass [
^'collapse'
]

{ #category : 'options' }
SBSCollapseTag >> horizontal [

self class: 'collapse-horizontal'
]

{ #category : 'defaults' }
SBSCollapseTag >> multiCollapse: aString [

"OK so all you need to do it make the #dataTarget: target be a CSS selector that the targets you want to target share. "

self class: aString
]

{ #category : 'options' }
SBSCollapseTag >> show [

Expand Down
70 changes: 35 additions & 35 deletions src/Bootstrap5-Core/SBSDeploymentLibrary.class.st

Large diffs are not rendered by default.

40 changes: 20 additions & 20 deletions src/Bootstrap5-Core/SBSDeploymentLibraryRTL.class.st

Large diffs are not rendered by default.

Loading
Loading