@markout-lang/bootstrap-kit 0.2.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -17
- package/package.json +4 -1
- package/parts/accordion.htm +8 -8
- package/parts/alert.htm +6 -6
- package/parts/badge.htm +4 -4
- package/parts/base.htm +15 -15
- package/parts/breadcrumb.htm +3 -3
- package/parts/button.htm +33 -33
- package/parts/card.htm +17 -17
- package/parts/carousel.htm +9 -9
- package/parts/check.htm +26 -26
- package/parts/collapse.htm +6 -6
- package/parts/dropdown.htm +10 -10
- package/parts/image.htm +11 -11
- package/parts/input.htm +49 -32
- package/parts/list-group.htm +6 -6
- package/parts/modal.htm +13 -13
- package/parts/nav.htm +11 -11
- package/parts/navbar.htm +21 -10
- package/parts/offcanvas.htm +11 -11
- package/parts/pagination.htm +10 -10
- package/parts/placeholder.htm +5 -5
- package/parts/popover.htm +6 -6
- package/parts/progress.htm +10 -10
- package/parts/scrollspy.htm +7 -7
- package/parts/select.htm +13 -13
- package/parts/spinner.htm +5 -5
- package/parts/table.htm +13 -13
- package/parts/theme.htm +4 -4
- package/parts/toast.htm +14 -14
- package/parts/tooltip.htm +5 -5
package/parts/input.htm
CHANGED
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
typed, so a page can name the instance and read it from anywhere else on
|
|
10
10
|
the page —
|
|
11
11
|
|
|
12
|
-
<bs-input :aka="email"
|
|
13
|
-
<bs-button
|
|
12
|
+
<bs-input :aka="email" ::label="Email" ::type="email" />
|
|
13
|
+
<bs-button ::disabled=${!email.value}>Send</bs-button>
|
|
14
14
|
|
|
15
15
|
— which is `:aka` doing what it does everywhere else, not a mechanism
|
|
16
16
|
special to forms.
|
|
@@ -19,6 +19,17 @@
|
|
|
19
19
|
invalid once it is non-empty and fails `:check`. Empty is neutral, so a
|
|
20
20
|
form doesn't open covered in errors. `:required` extends that to empty.
|
|
21
21
|
|
|
22
|
+
`:valid` is the other side of that, and what a form's own controls read —
|
|
23
|
+
|
|
24
|
+
<bs-input :aka="email" ::label="Email" ::check=${v => v.includes('@')} />
|
|
25
|
+
<bs-button ::disabled=${!email.valid}>Send</bs-button>
|
|
26
|
+
|
|
27
|
+
It is deliberately NOT the negation of the error state, which is the one
|
|
28
|
+
thing about it worth knowing. An untouched field is not wrong — that is
|
|
29
|
+
what keeps the form out of red — and it is also not something to submit.
|
|
30
|
+
So empty answers `false` here while showing nothing, and `:required` is
|
|
31
|
+
what makes empty an error as well as a gap.
|
|
32
|
+
|
|
22
33
|
Floating labels are the same control with the label after the input
|
|
23
34
|
instead of before it — Bootstrap's CSS keys off that order — so the two
|
|
24
35
|
layouts are two regions rather than one with a class toggled on it.
|
|
@@ -27,20 +38,20 @@
|
|
|
27
38
|
class="mb-3 ${extra ?? ''}"
|
|
28
39
|
|
|
29
40
|
// parameters
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
::extra=${null} // extra classes for this instance
|
|
42
|
+
::label=${null}
|
|
43
|
+
::type=${'text'}
|
|
44
|
+
::name=${null}
|
|
45
|
+
::value=${''}
|
|
46
|
+
::placeholder=${''}
|
|
47
|
+
::help=${null}
|
|
48
|
+
::size=${null} // 'sm' | 'lg'
|
|
49
|
+
::disabled=${false}
|
|
50
|
+
::readonly=${false}
|
|
51
|
+
::required=${false}
|
|
52
|
+
::floating=${false}
|
|
53
|
+
::check=${(v) => true}
|
|
54
|
+
::message=${'Please check this value.'}
|
|
44
55
|
|
|
45
56
|
// private
|
|
46
57
|
:_id=${`bs-input-${$id}`}
|
|
@@ -49,6 +60,9 @@
|
|
|
49
60
|
:_invalid=${_empty ? required : !check(value)}
|
|
50
61
|
:_class=${['form-control', size ? `form-control-${size}` : '']
|
|
51
62
|
.filter(s => s).join(' ')}
|
|
63
|
+
|
|
64
|
+
// read from outside: is there a value, and does it pass?
|
|
65
|
+
:valid=${!_empty && check(value)}
|
|
52
66
|
>
|
|
53
67
|
<!--- plain layout: label, control, feedback -->
|
|
54
68
|
<div :if=${!floating}>
|
|
@@ -105,24 +119,27 @@
|
|
|
105
119
|
class="mb-3 ${extra ?? ''}"
|
|
106
120
|
|
|
107
121
|
// parameters
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
122
|
+
::extra=${null} // extra classes for this instance
|
|
123
|
+
::label=${null}
|
|
124
|
+
::name=${null}
|
|
125
|
+
::value=${''}
|
|
126
|
+
::placeholder=${''}
|
|
127
|
+
::rows=${3}
|
|
128
|
+
::help=${null}
|
|
129
|
+
::disabled=${false}
|
|
130
|
+
::readonly=${false}
|
|
131
|
+
::required=${false}
|
|
132
|
+
::check=${(v) => true}
|
|
133
|
+
::message=${'Please check this value.'}
|
|
120
134
|
|
|
121
135
|
// private
|
|
122
136
|
:_id=${`bs-textarea-${$id}`}
|
|
123
137
|
:_helpId=${`bs-textarea-help-${$id}`}
|
|
124
138
|
:_empty=${value === '' || value == null}
|
|
125
139
|
:_invalid=${_empty ? required : !check(value)}
|
|
140
|
+
|
|
141
|
+
// read from outside, as bs-input's is
|
|
142
|
+
:valid=${!_empty && check(value)}
|
|
126
143
|
>
|
|
127
144
|
<label class="form-label"
|
|
128
145
|
for=${_id}
|
|
@@ -155,10 +172,10 @@
|
|
|
155
172
|
<:define tag="bs-input-group:div"
|
|
156
173
|
|
|
157
174
|
// parameters
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
175
|
+
::extra=${null} // extra classes for this instance
|
|
176
|
+
::prefix=${null}
|
|
177
|
+
::suffix=${null}
|
|
178
|
+
::size=${null}
|
|
162
179
|
|
|
163
180
|
// private
|
|
164
181
|
:_class=${['input-group', size ? `input-group-${size}` : '', extra]
|
package/parts/list-group.htm
CHANGED
|
@@ -14,14 +14,14 @@
|
|
|
14
14
|
<:define tag="bs-list-group:div"
|
|
15
15
|
|
|
16
16
|
// parameters
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
::extra=${null} // extra classes for this instance
|
|
18
|
+
::items=${[
|
|
19
19
|
{ name: 'An item', active: true },
|
|
20
20
|
{ name: 'A second item' },
|
|
21
21
|
{ name: 'A disabled item', disabled: true },
|
|
22
22
|
]}
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
::flush=${false}
|
|
24
|
+
::horizontal=${false}
|
|
25
25
|
|
|
26
26
|
// private
|
|
27
27
|
:_class=${[
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
:if=${item.text}>${item.text}</span>
|
|
50
50
|
</span>
|
|
51
51
|
|
|
52
|
-
<bs-badge
|
|
53
|
-
|
|
52
|
+
<bs-badge ::variant=${item.badge?.variant ?? 'secondary'}
|
|
53
|
+
::pill
|
|
54
54
|
:if=${item.badge}>${item.badge?.name ?? item.badge}</bs-badge>
|
|
55
55
|
</a>
|
|
56
56
|
</:define>
|
package/parts/modal.htm
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
<!---
|
|
6
6
|
A modal. Opened the Bootstrap way, by a trigger naming it:
|
|
7
7
|
|
|
8
|
-
<bs-button
|
|
9
|
-
<bs-modal
|
|
8
|
+
<bs-button ::toggle="modal" ::target="#signup">Sign up</bs-button>
|
|
9
|
+
<bs-modal ::name="signup" ::title="Sign up">…</bs-modal>
|
|
10
10
|
|
|
11
11
|
The footer is a named slot with a working default, so a modal that only
|
|
12
12
|
needs a Close button doesn't have to say so. That is also why it isn't an
|
|
@@ -23,15 +23,15 @@
|
|
|
23
23
|
tabindex="-1"
|
|
24
24
|
|
|
25
25
|
// parameters
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
26
|
+
::extra=${null} // extra classes for this instance
|
|
27
|
+
::name=${null}
|
|
28
|
+
::title=${''}
|
|
29
|
+
::size=${null} // 'sm' | 'lg' | 'xl'
|
|
30
|
+
::centered=${false}
|
|
31
|
+
::scrollable=${false}
|
|
32
|
+
::fullscreen=${null} // true | 'sm-down' | 'md-down' | ...
|
|
33
|
+
::staticBackdrop=${false}
|
|
34
|
+
::open=${false}
|
|
35
35
|
|
|
36
36
|
// private
|
|
37
37
|
:_labelId=${`bs-modal-title-${$id}`}
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
<div class="modal-content">
|
|
101
101
|
<div class="modal-header">
|
|
102
102
|
<h1 class="modal-title fs-5" id=${_labelId}>${title}</h1>
|
|
103
|
-
<bs-close
|
|
103
|
+
<bs-close ::dismiss="modal" />
|
|
104
104
|
</div>
|
|
105
105
|
|
|
106
106
|
<div class="modal-body">
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
|
|
110
110
|
<div class="modal-footer">
|
|
111
111
|
<:slot name="footer">
|
|
112
|
-
<bs-button
|
|
112
|
+
<bs-button ::variant="secondary" ::dismiss="modal">Close</bs-button>
|
|
113
113
|
</:slot>
|
|
114
114
|
</div>
|
|
115
115
|
</div>
|
package/parts/nav.htm
CHANGED
|
@@ -12,18 +12,18 @@
|
|
|
12
12
|
<:define tag="bs-nav:ul"
|
|
13
13
|
|
|
14
14
|
// parameters
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
::extra=${null} // extra classes for this instance
|
|
16
|
+
::items=${[
|
|
17
17
|
{ name: 'Active', link: '#', active: true },
|
|
18
18
|
{ name: 'Link', link: '#' },
|
|
19
19
|
{ name: 'Disabled', link: '#', disabled: true },
|
|
20
20
|
]}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
::variant=${null} // 'tabs' | 'pills' | 'underline'
|
|
22
|
+
::fill=${false}
|
|
23
|
+
::justified=${false}
|
|
24
|
+
::vertical=${false}
|
|
25
|
+
::align=${'start'} // 'start' | 'center' | 'end'
|
|
26
|
+
::toggle=${null} // 'tab' | 'pill' — for tabbed panes
|
|
27
27
|
|
|
28
28
|
// private
|
|
29
29
|
:_class=${[
|
|
@@ -74,9 +74,9 @@
|
|
|
74
74
|
role="tabpanel"
|
|
75
75
|
|
|
76
76
|
// parameters
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
77
|
+
::extra=${null} // extra classes for this instance
|
|
78
|
+
::name=${null}
|
|
79
|
+
::active=${false}
|
|
80
80
|
|
|
81
81
|
id=${name}
|
|
82
82
|
:class-show=${active}
|
package/parts/navbar.htm
CHANGED
|
@@ -17,19 +17,19 @@
|
|
|
17
17
|
<:define tag="bs-navbar:nav"
|
|
18
18
|
|
|
19
19
|
// parameters
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
::extra=${null} // extra classes for this instance
|
|
21
|
+
::items=${[
|
|
22
22
|
{ name: 'Home', link: '#', active: true },
|
|
23
23
|
{ name: 'Features', link: '#' },
|
|
24
24
|
{ name: 'Pricing', link: '#' },
|
|
25
25
|
]}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
26
|
+
::brand=${'#'}
|
|
27
|
+
::expand=${'lg'}
|
|
28
|
+
::container=${'container'} // 'container' | 'container-fluid' | ...
|
|
29
|
+
::sticky=${false}
|
|
30
|
+
::fixed=${false}
|
|
31
|
+
::theme=${null} // 'light' | 'dark' — independent of the page
|
|
32
|
+
::bg=${'body-tertiary'}
|
|
33
33
|
|
|
34
34
|
// private
|
|
35
35
|
:_id=${`bs-navbar-${$id}`}
|
|
@@ -40,6 +40,17 @@
|
|
|
40
40
|
extra,
|
|
41
41
|
].filter(s => s).join(' ')}
|
|
42
42
|
|
|
43
|
+
// The gap under the links is only wanted while they are stacked, which
|
|
44
|
+
// is up to `expand` and not to any one breakpoint: left at `mb-lg-0` it
|
|
45
|
+
// would survive into a bar that has already gone horizontal and push the
|
|
46
|
+
// links up off the brand's line. A navbar that never collapses has no
|
|
47
|
+
// stacked state to space out, hence the plain `mb-0`.
|
|
48
|
+
:_navClass=${[
|
|
49
|
+
'navbar-nav',
|
|
50
|
+
'me-auto',
|
|
51
|
+
expand ? `mb-2 mb-${expand}-0` : 'mb-0',
|
|
52
|
+
].join(' ')}
|
|
53
|
+
|
|
43
54
|
class=${_class}
|
|
44
55
|
:class-sticky-top=${sticky}
|
|
45
56
|
:class-fixed-top=${fixed}
|
|
@@ -59,7 +70,7 @@
|
|
|
59
70
|
</button>
|
|
60
71
|
|
|
61
72
|
<div class="collapse navbar-collapse" id=${_id}>
|
|
62
|
-
<ul class
|
|
73
|
+
<ul class=${_navClass}>
|
|
63
74
|
<li class="nav-item" :for-each=${items} :for-as="item">
|
|
64
75
|
<a class="nav-link"
|
|
65
76
|
:class-active=${item.active}
|
package/parts/offcanvas.htm
CHANGED
|
@@ -6,22 +6,22 @@
|
|
|
6
6
|
An offcanvas panel: the same shape as `bs-modal`, opened by a trigger
|
|
7
7
|
naming it or by the `:open` value.
|
|
8
8
|
|
|
9
|
-
<bs-button
|
|
10
|
-
<bs-offcanvas
|
|
9
|
+
<bs-button ::toggle="offcanvas" ::target="#menu">Menu</bs-button>
|
|
10
|
+
<bs-offcanvas ::name="menu" ::title="Menu">…</bs-offcanvas>
|
|
11
11
|
-->
|
|
12
12
|
<:define tag="bs-offcanvas:div"
|
|
13
13
|
class="offcanvas"
|
|
14
14
|
tabindex="-1"
|
|
15
15
|
|
|
16
16
|
// parameters
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
::extra=${null} // extra classes for this instance
|
|
18
|
+
::name=${null}
|
|
19
|
+
::title=${''}
|
|
20
|
+
::placement=${'start'} // 'start' | 'end' | 'top' | 'bottom'
|
|
21
|
+
::backdrop=${true}
|
|
22
|
+
::scroll=${false}
|
|
23
|
+
::responsive=${null} // 'lg' — an offcanvas below this breakpoint only
|
|
24
|
+
::open=${false}
|
|
25
25
|
|
|
26
26
|
// private
|
|
27
27
|
:_labelId=${`bs-offcanvas-title-${$id}`}
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
>
|
|
80
80
|
<div class="offcanvas-header">
|
|
81
81
|
<h5 class="offcanvas-title" id=${_labelId}>${title}</h5>
|
|
82
|
-
<bs-close
|
|
82
|
+
<bs-close ::dismiss="offcanvas" />
|
|
83
83
|
</div>
|
|
84
84
|
|
|
85
85
|
<div class="offcanvas-body">
|
package/parts/pagination.htm
CHANGED
|
@@ -19,16 +19,16 @@
|
|
|
19
19
|
<:define tag="bs-pagination:nav"
|
|
20
20
|
|
|
21
21
|
// parameters
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
22
|
+
::extra=${null} // extra classes for this instance
|
|
23
|
+
::current=${1}
|
|
24
|
+
::pages=${5}
|
|
25
|
+
::size=${null} // 'sm' | 'lg'
|
|
26
|
+
::align=${'start'} // 'start' | 'center' | 'end'
|
|
27
|
+
::prev=${'«'}
|
|
28
|
+
::next=${'»'}
|
|
29
|
+
::link=${(n) => null}
|
|
30
|
+
::select=${(n) => {}}
|
|
31
|
+
::label=${'Page navigation'}
|
|
32
32
|
|
|
33
33
|
// private
|
|
34
34
|
:_class=${[
|
package/parts/placeholder.htm
CHANGED
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
<:define tag="bs-placeholder:span"
|
|
10
10
|
|
|
11
11
|
// parameters
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
::extra=${null} // extra classes for this instance
|
|
13
|
+
::cols=${6}
|
|
14
|
+
::size=${null} // 'xs' | 'sm' | 'lg'
|
|
15
|
+
::variant=${null}
|
|
16
|
+
::animation=${'glow'} // 'glow' | 'wave' | null
|
|
17
17
|
|
|
18
18
|
// private
|
|
19
19
|
:_class=${[animation ? `placeholder-${animation}` : '', extra]
|
package/parts/popover.htm
CHANGED
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
class="d-inline-block ${extra ?? ''}"
|
|
14
14
|
|
|
15
15
|
// parameters
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
::extra=${null} // extra classes for this instance
|
|
17
|
+
::title=${''}
|
|
18
|
+
::content=${''}
|
|
19
|
+
::placement=${'right'}
|
|
20
|
+
::trigger=${'click'}
|
|
21
|
+
::html=${false}
|
|
22
22
|
|
|
23
23
|
// private
|
|
24
24
|
:_build=${() => {
|
package/parts/progress.htm
CHANGED
|
@@ -12,16 +12,16 @@
|
|
|
12
12
|
class="progress ${extra ?? ''}"
|
|
13
13
|
|
|
14
14
|
// parameters
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
15
|
+
::extra=${null} // extra classes for this instance
|
|
16
|
+
::value=${0}
|
|
17
|
+
::min=${0}
|
|
18
|
+
::max=${100}
|
|
19
|
+
::label=${null}
|
|
20
|
+
::variant=${null}
|
|
21
|
+
::striped=${false}
|
|
22
|
+
::animated=${false}
|
|
23
|
+
::height=${null}
|
|
24
|
+
::name=${'Progress'}
|
|
25
25
|
|
|
26
26
|
// private
|
|
27
27
|
:_percent=${Math.max(0, Math.min(100, ((value - min) / (max - min || 1)) * 100))}
|
package/parts/scrollspy.htm
CHANGED
|
@@ -6,17 +6,17 @@
|
|
|
6
6
|
nav that matches what is currently on screen. `:target` is the selector
|
|
7
7
|
of that nav, and the element this sits on is the thing being scrolled.
|
|
8
8
|
|
|
9
|
-
<bs-nav
|
|
10
|
-
<bs-scrollspy
|
|
9
|
+
<bs-nav ::vertical id="toc" ::items=${sections} />
|
|
10
|
+
<bs-scrollspy ::target="#toc" ::height="300">…</bs-scrollspy>
|
|
11
11
|
-->
|
|
12
12
|
<:define tag="bs-scrollspy:div"
|
|
13
13
|
|
|
14
14
|
// parameters
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
::extra=${null} // extra classes for this instance
|
|
16
|
+
::target=${null}
|
|
17
|
+
::offset=${0}
|
|
18
|
+
::smooth=${false}
|
|
19
|
+
::height=${null}
|
|
20
20
|
|
|
21
21
|
class=${extra}
|
|
22
22
|
data-bs-spy="scroll"
|
package/parts/select.htm
CHANGED
|
@@ -5,24 +5,24 @@
|
|
|
5
5
|
A select whose options come from an array. An entry is either a string or
|
|
6
6
|
`{ name, value, disabled }`, so the quick case stays quick:
|
|
7
7
|
|
|
8
|
-
<bs-select
|
|
8
|
+
<bs-select ::label="Size" ::options=${['S', 'M', 'L']} />
|
|
9
9
|
-->
|
|
10
10
|
<:define tag="bs-select:div"
|
|
11
11
|
class="mb-3 ${extra ?? ''}"
|
|
12
12
|
|
|
13
13
|
// parameters
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
14
|
+
::extra=${null} // extra classes for this instance
|
|
15
|
+
::label=${null}
|
|
16
|
+
::name=${null}
|
|
17
|
+
::options=${[]}
|
|
18
|
+
::value=${null}
|
|
19
|
+
::placeholder=${null}
|
|
20
|
+
::help=${null}
|
|
21
|
+
::size=${null} // 'sm' | 'lg'
|
|
22
|
+
::multiple=${false}
|
|
23
|
+
::disabled=${false}
|
|
24
|
+
::required=${false}
|
|
25
|
+
::floating=${false}
|
|
26
26
|
|
|
27
27
|
// private
|
|
28
28
|
:_id=${`bs-select-${$id}`}
|
package/parts/spinner.htm
CHANGED
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
role="status"
|
|
11
11
|
|
|
12
12
|
// parameters
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
::extra=${null} // extra classes for this instance
|
|
14
|
+
::variant=${null}
|
|
15
|
+
::type=${'border'} // 'border' | 'grow'
|
|
16
|
+
::small=${false}
|
|
17
|
+
::label=${'Loading…'}
|
|
18
18
|
|
|
19
19
|
// private
|
|
20
20
|
:_class=${[
|
package/parts/table.htm
CHANGED
|
@@ -16,19 +16,19 @@
|
|
|
16
16
|
<:define tag="bs-table:div"
|
|
17
17
|
|
|
18
18
|
// parameters
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
19
|
+
::extra=${null} // extra classes for this instance
|
|
20
|
+
::columns=${[]}
|
|
21
|
+
::rows=${[]}
|
|
22
|
+
::caption=${null}
|
|
23
|
+
::striped=${false}
|
|
24
|
+
::hover=${false}
|
|
25
|
+
::bordered=${false}
|
|
26
|
+
::borderless=${false}
|
|
27
|
+
::small=${false}
|
|
28
|
+
::variant=${null}
|
|
29
|
+
::headVariant=${null}
|
|
30
|
+
::align=${null} // 'middle' | 'bottom'
|
|
31
|
+
::responsive=${false}
|
|
32
32
|
|
|
33
33
|
// private
|
|
34
34
|
:_class=${[
|
package/parts/theme.htm
CHANGED
|
@@ -41,10 +41,10 @@
|
|
|
41
41
|
type="button"
|
|
42
42
|
|
|
43
43
|
// parameters
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
::extra=${null} // extra classes for this instance
|
|
45
|
+
::variant=${'secondary'}
|
|
46
|
+
::outline=${true}
|
|
47
|
+
::size=${null}
|
|
48
48
|
|
|
49
49
|
// private
|
|
50
50
|
:_theme=${globalThis.document?.documentElement.getAttribute('data-bs-theme') ?? 'light'}
|
package/parts/toast.htm
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<!---
|
|
6
6
|
A toast, shown by setting a value rather than by calling anything:
|
|
7
7
|
|
|
8
|
-
<bs-toast :aka="saved"
|
|
8
|
+
<bs-toast :aka="saved" ::title="Saved">Your changes are safe.</bs-toast>
|
|
9
9
|
<bs-button :on-click=${() => saved.open = true}>Save</bs-button>
|
|
10
10
|
|
|
11
11
|
`:handle-open` turns that value into the `show()` / `hide()` the plugin
|
|
@@ -20,13 +20,13 @@
|
|
|
20
20
|
aria-atomic="true"
|
|
21
21
|
|
|
22
22
|
// parameters
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
::extra=${null} // extra classes for this instance
|
|
24
|
+
::title=${null}
|
|
25
|
+
::time=${null}
|
|
26
|
+
::variant=${null}
|
|
27
|
+
::open=${false}
|
|
28
|
+
::autohide=${true}
|
|
29
|
+
::delay=${5000}
|
|
30
30
|
|
|
31
31
|
// private
|
|
32
32
|
:_class=${['toast', variant ? `text-bg-${variant} border-0` : '', extra]
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
<strong class="me-auto">${title}</strong>
|
|
61
61
|
<small class="text-body-secondary"
|
|
62
62
|
:if=${time}>${time}</small>
|
|
63
|
-
<bs-close
|
|
63
|
+
<bs-close ::dismiss="toast" ::label="Close notification" />
|
|
64
64
|
</div>
|
|
65
65
|
|
|
66
66
|
<!---
|
|
@@ -79,9 +79,9 @@
|
|
|
79
79
|
<:slot />
|
|
80
80
|
</div>
|
|
81
81
|
|
|
82
|
-
<bs-close
|
|
83
|
-
|
|
84
|
-
|
|
82
|
+
<bs-close ::dismiss="toast"
|
|
83
|
+
::label="Close notification"
|
|
84
|
+
::extra="me-2 m-auto"
|
|
85
85
|
:if=${!title} />
|
|
86
86
|
</div>
|
|
87
87
|
</:define>
|
|
@@ -93,8 +93,8 @@
|
|
|
93
93
|
<:define tag="bs-toast-container:div"
|
|
94
94
|
|
|
95
95
|
// parameters
|
|
96
|
-
|
|
97
|
-
|
|
96
|
+
::extra=${null} // extra classes for this instance
|
|
97
|
+
::placement=${'bottom-end'} // 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'top-center'
|
|
98
98
|
|
|
99
99
|
// private
|
|
100
100
|
:_class=${[
|
package/parts/tooltip.htm
CHANGED
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
class="d-inline-block ${extra ?? ''}"
|
|
30
30
|
|
|
31
31
|
// parameters
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
::extra=${null} // extra classes for this instance
|
|
33
|
+
::title=${''}
|
|
34
|
+
::placement=${'top'}
|
|
35
|
+
::html=${false}
|
|
36
|
+
::trigger=${'hover focus'}
|
|
37
37
|
|
|
38
38
|
// private
|
|
39
39
|
:_build=${() => {
|