@allxsmith/bestax-bulma 2.6.2 → 3.0.1
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 +2 -2
- package/dist/bestax.css +3 -0
- package/dist/bestax.css.map +1 -0
- package/dist/bestax.js +1 -0
- package/dist/extras.css +3 -0
- package/dist/extras.css.map +1 -0
- package/dist/extras.js +1 -0
- package/dist/index.cjs.js +6214 -647
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +6154 -649
- package/dist/index.esm.js.map +1 -1
- package/dist/types/components/Carousel.d.ts +34 -0
- package/dist/types/components/Collapse.d.ts +17 -0
- package/dist/types/components/Dialog.d.ts +47 -0
- package/dist/types/components/Loading.d.ts +18 -0
- package/dist/types/components/Navbar.d.ts +10 -0
- package/dist/types/components/Panel.d.ts +2 -4
- package/dist/types/components/Sidebar.d.ts +37 -0
- package/dist/types/components/Steps.d.ts +45 -0
- package/dist/types/components/Tabs.d.ts +42 -6
- package/dist/types/components/Toast.d.ts +46 -0
- package/dist/types/components/Tooltip.d.ts +22 -0
- package/dist/types/elements/Button.d.ts +1 -1
- package/dist/types/elements/Code.d.ts +9 -0
- package/dist/types/elements/Divider.d.ts +7 -0
- package/dist/types/elements/Emphasis.d.ts +9 -0
- package/dist/types/elements/Figure.d.ts +17 -0
- package/dist/types/elements/Icon.d.ts +1 -0
- package/dist/types/elements/Link.d.ts +10 -0
- package/dist/types/elements/LinkButton.d.ts +8 -0
- package/dist/types/elements/ListItem.d.ts +9 -0
- package/dist/types/elements/Notification.d.ts +31 -0
- package/dist/types/elements/OrderedList.d.ts +9 -0
- package/dist/types/elements/Paragraph.d.ts +9 -0
- package/dist/types/elements/Pre.d.ts +9 -0
- package/dist/types/elements/Span.d.ts +9 -0
- package/dist/types/elements/Strong.d.ts +9 -0
- package/dist/types/elements/UnorderedList.d.ts +9 -0
- package/dist/types/form/Autocomplete.d.ts +42 -0
- package/dist/types/form/Checkbox.d.ts +7 -2
- package/dist/types/form/Checkboxes.d.ts +6 -1
- package/dist/types/form/DateInput.d.ts +26 -0
- package/dist/types/form/DateInputBase.d.ts +42 -0
- package/dist/types/form/DateTimeInput.d.ts +26 -0
- package/dist/types/form/DateTimeInputBase.d.ts +50 -0
- package/dist/types/form/Field.d.ts +2 -1
- package/dist/types/form/File.d.ts +3 -2
- package/dist/types/form/FormContext.d.ts +22 -0
- package/dist/types/form/Input.d.ts +22 -11
- package/dist/types/form/InputBase.d.ts +16 -0
- package/dist/types/form/Numberinput.d.ts +30 -0
- package/dist/types/form/Radio.d.ts +7 -2
- package/dist/types/form/Radios.d.ts +6 -1
- package/dist/types/form/Rate.d.ts +38 -0
- package/dist/types/form/Select.d.ts +18 -11
- package/dist/types/form/SelectBase.d.ts +19 -0
- package/dist/types/form/Slider.d.ts +49 -0
- package/dist/types/form/Switch.d.ts +17 -0
- package/dist/types/form/Taginput.d.ts +54 -0
- package/dist/types/form/TextArea.d.ts +13 -14
- package/dist/types/form/TextAreaBase.d.ts +19 -0
- package/dist/types/form/TimeInput.d.ts +26 -0
- package/dist/types/form/TimeInputBase.d.ts +44 -0
- package/dist/types/form/_pickerInternals/Calendar.d.ts +26 -0
- package/dist/types/form/_pickerInternals/PickerPopover.d.ts +20 -0
- package/dist/types/form/_pickerInternals/TimeWheels.d.ts +29 -0
- package/dist/types/form/_pickerInternals/audioTick.d.ts +3 -0
- package/dist/types/form/_pickerInternals/dateUtils.d.ts +39 -0
- package/dist/types/form/_pickerInternals/formatters.d.ts +13 -0
- package/dist/types/form/_pickerInternals/haptics.d.ts +1 -0
- package/dist/types/form/_pickerInternals/pickerTypes.d.ts +31 -0
- package/dist/types/form/_pickerInternals/segmentMap.d.ts +20 -0
- package/dist/types/form/_pickerInternals/useFocusTrap.d.ts +7 -0
- package/dist/types/form/_pickerInternals/useNativeMobilePicker.d.ts +10 -0
- package/dist/types/form/_pickerInternals/useSegmentedEntry.d.ts +45 -0
- package/dist/types/form/fieldProps.d.ts +12 -0
- package/dist/types/helpers/bulmaClassHelpers.d.ts +35 -0
- package/dist/types/helpers/useBulmaClasses.d.ts +16 -83
- package/dist/types/helpers/useColorClasses.d.ts +8 -0
- package/dist/types/helpers/useFlexboxClasses.d.ts +12 -0
- package/dist/types/helpers/useOtherClasses.d.ts +15 -0
- package/dist/types/helpers/useSpacingClasses.d.ts +18 -0
- package/dist/types/helpers/useTypographyClasses.d.ts +19 -0
- package/dist/types/helpers/useVisibilityClasses.d.ts +10 -0
- package/dist/types/index.d.ts +53 -3
- package/dist/versions/bestax-bulma-prefixed.css +3 -0
- package/dist/versions/bestax-bulma-prefixed.css.map +1 -0
- package/dist/versions/bestax-bulma-prefixed.js +1 -0
- package/dist/versions/bestax-no-dark-mode.css +3 -0
- package/dist/versions/bestax-no-dark-mode.css.map +1 -0
- package/dist/versions/bestax-no-dark-mode.js +1 -0
- package/dist/versions/bestax-no-helpers-prefixed.css +3 -0
- package/dist/versions/bestax-no-helpers-prefixed.css.map +1 -0
- package/dist/versions/bestax-no-helpers-prefixed.js +1 -0
- package/dist/versions/bestax-no-helpers.css +3 -0
- package/dist/versions/bestax-no-helpers.css.map +1 -0
- package/dist/versions/bestax-no-helpers.js +1 -0
- package/dist/versions/bestax-prefixed.css +3 -0
- package/dist/versions/bestax-prefixed.css.map +1 -0
- package/dist/versions/bestax-prefixed.js +1 -0
- package/package.json +100 -21
- package/src/scss/_mixins.scss +215 -0
- package/src/scss/_variables.scss +94 -0
- package/src/scss/bestax.scss +18 -0
- package/src/scss/components/_carousel.scss +580 -0
- package/src/scss/components/_collapse.scss +126 -0
- package/src/scss/components/_dialog.scss +134 -0
- package/src/scss/components/_index.scss +13 -0
- package/src/scss/components/_loading.scss +231 -0
- package/src/scss/components/_sidebar.scss +347 -0
- package/src/scss/components/_steps.scss +459 -0
- package/src/scss/components/_tabs.scss +147 -0
- package/src/scss/components/_toast.scss +244 -0
- package/src/scss/components/_tooltip.scss +250 -0
- package/src/scss/elements/_index.scss +5 -0
- package/src/scss/elements/_linkbutton.scss +77 -0
- package/src/scss/extras.scss +24 -0
- package/src/scss/form/_autocomplete.scss +261 -0
- package/src/scss/form/_checkbox.scss +217 -0
- package/src/scss/form/_dateinput.scss +292 -0
- package/src/scss/form/_datetimeinput.scss +191 -0
- package/src/scss/form/_index.scss +16 -0
- package/src/scss/form/_numberinput.scss +176 -0
- package/src/scss/form/_picker-popover.scss +185 -0
- package/src/scss/form/_radio.scss +196 -0
- package/src/scss/form/_rate.scss +307 -0
- package/src/scss/form/_slider.scss +630 -0
- package/src/scss/form/_switch.scss +314 -0
- package/src/scss/form/_taginput.scss +356 -0
- package/src/scss/form/_timeinput.scss +374 -0
- package/src/scss/helpers/_cursor.scss +5 -0
- package/src/scss/helpers/_index.scss +2 -0
- package/src/scss/helpers/_sizing.scss +5 -0
- package/src/scss/versions/bestax-bulma-prefixed.scss +15 -0
- package/src/scss/versions/bestax-no-dark-mode.scss +32 -0
- package/src/scss/versions/bestax-no-helpers-prefixed.scss +22 -0
- package/src/scss/versions/bestax-no-helpers.scss +23 -0
- package/src/scss/versions/bestax-prefixed.scss +15 -0
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
@use 'bulma/sass/utilities/initial-variables' as iv;
|
|
2
|
+
@use 'bulma/sass/utilities/css-variables' as cv;
|
|
3
|
+
|
|
4
|
+
$dateinput-min-width: 16rem !default;
|
|
5
|
+
$dateinput-cell-size: 2.25rem !default;
|
|
6
|
+
$dateinput-cell-radius: cv.getVar('radius-small') !default;
|
|
7
|
+
$dateinput-cell-color: cv.getVar('text') !default;
|
|
8
|
+
$dateinput-cell-hover-bg: hsla(0, 0%, 50%, 0.13) !default;
|
|
9
|
+
$dateinput-cell-selected-bg: cv.getVar('primary') !default;
|
|
10
|
+
$dateinput-cell-selected-color: cv.getVar('primary-invert') !default;
|
|
11
|
+
$dateinput-cell-today-color: cv.getVar('primary') !default;
|
|
12
|
+
$dateinput-cell-disabled-color: cv.getVar('text-weak') !default;
|
|
13
|
+
$dateinput-cell-other-month-color: cv.getVar('text-weak') !default;
|
|
14
|
+
$dateinput-header-padding: 0.5rem 0 !default;
|
|
15
|
+
$dateinput-day-name-color: cv.getVar('text-weak') !default;
|
|
16
|
+
$dateinput-day-name-size: cv.getVar('size-7') !default;
|
|
17
|
+
$dateinput-nav-button-size: 1.75rem !default;
|
|
18
|
+
|
|
19
|
+
.#{iv.$class-prefix}dateinput {
|
|
20
|
+
@include cv.register-vars(
|
|
21
|
+
(
|
|
22
|
+
'dateinput-min-width': #{$dateinput-min-width},
|
|
23
|
+
'dateinput-cell-size': #{$dateinput-cell-size},
|
|
24
|
+
'dateinput-cell-radius': #{$dateinput-cell-radius},
|
|
25
|
+
'dateinput-cell-color': #{$dateinput-cell-color},
|
|
26
|
+
'dateinput-cell-hover-bg': #{$dateinput-cell-hover-bg},
|
|
27
|
+
'dateinput-cell-selected-bg': #{$dateinput-cell-selected-bg},
|
|
28
|
+
'dateinput-cell-selected-color': #{$dateinput-cell-selected-color},
|
|
29
|
+
'dateinput-cell-today-color': #{$dateinput-cell-today-color},
|
|
30
|
+
'dateinput-cell-disabled-color': #{$dateinput-cell-disabled-color},
|
|
31
|
+
'dateinput-cell-other-month-color': #{$dateinput-cell-other-month-color},
|
|
32
|
+
'dateinput-header-padding': #{$dateinput-header-padding},
|
|
33
|
+
'dateinput-day-name-color': #{$dateinput-day-name-color},
|
|
34
|
+
'dateinput-day-name-size': #{$dateinput-day-name-size},
|
|
35
|
+
'dateinput-nav-button-size': #{$dateinput-nav-button-size},
|
|
36
|
+
)
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.#{iv.$class-prefix}dateinput {
|
|
41
|
+
display: inline-block;
|
|
42
|
+
min-width: cv.getVar('dateinput-min-width');
|
|
43
|
+
font-family: cv.getVar('family-primary');
|
|
44
|
+
color: cv.getVar('text');
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// Inline rendering: when the calendar is a direct child of the container
|
|
48
|
+
// (no popover wrapper), give it a subtle frame so the grid doesn't look
|
|
49
|
+
// orphaned on the page. Mirrors the popover's visual weight without the
|
|
50
|
+
// drop-shadow / animation.
|
|
51
|
+
.#{iv.$class-prefix}dateinput-container
|
|
52
|
+
> .#{iv.$class-prefix}dateinput {
|
|
53
|
+
background-color: cv.getVar('scheme-main');
|
|
54
|
+
border: 1px solid cv.getVar('border');
|
|
55
|
+
border-radius: cv.getVar('radius');
|
|
56
|
+
padding: 0.75rem;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.#{iv.$class-prefix}dateinput-header {
|
|
60
|
+
display: flex;
|
|
61
|
+
align-items: center;
|
|
62
|
+
justify-content: space-between;
|
|
63
|
+
padding: cv.getVar('dateinput-header-padding');
|
|
64
|
+
gap: 0.5rem;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.#{iv.$class-prefix}dateinput-month-trigger {
|
|
68
|
+
display: inline-flex;
|
|
69
|
+
align-items: center;
|
|
70
|
+
gap: 0.4rem;
|
|
71
|
+
padding: 0.25rem 0.5rem 0.25rem 0;
|
|
72
|
+
background: transparent;
|
|
73
|
+
border: 0;
|
|
74
|
+
color: inherit;
|
|
75
|
+
font: inherit;
|
|
76
|
+
cursor: pointer;
|
|
77
|
+
border-radius: cv.getVar('dateinput-cell-radius');
|
|
78
|
+
|
|
79
|
+
&:hover:not(:disabled) {
|
|
80
|
+
background-color: cv.getVar('dateinput-cell-hover-bg');
|
|
81
|
+
}
|
|
82
|
+
&:focus-visible {
|
|
83
|
+
outline: 2px solid cv.getVar('primary');
|
|
84
|
+
outline-offset: 2px;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.#{iv.$class-prefix}dateinput-month-caret {
|
|
89
|
+
transition: transform 0.15s ease;
|
|
90
|
+
}
|
|
91
|
+
.#{iv.$class-prefix}dateinput-month-trigger.#{iv.$class-prefix}is-active
|
|
92
|
+
.#{iv.$class-prefix}dateinput-month-caret {
|
|
93
|
+
transform: rotate(180deg);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.#{iv.$class-prefix}dateinput-month-label {
|
|
97
|
+
font-weight: cv.getVar('weight-semibold');
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.#{iv.$class-prefix}dateinput-nav-group {
|
|
101
|
+
display: inline-flex;
|
|
102
|
+
align-items: center;
|
|
103
|
+
gap: 0.25rem;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.#{iv.$class-prefix}dateinput-nav-prev,
|
|
107
|
+
.#{iv.$class-prefix}dateinput-nav-next {
|
|
108
|
+
display: inline-flex;
|
|
109
|
+
align-items: center;
|
|
110
|
+
justify-content: center;
|
|
111
|
+
width: cv.getVar('dateinput-nav-button-size');
|
|
112
|
+
height: cv.getVar('dateinput-nav-button-size');
|
|
113
|
+
padding: 0;
|
|
114
|
+
background: transparent;
|
|
115
|
+
border: 0;
|
|
116
|
+
color: inherit;
|
|
117
|
+
cursor: pointer;
|
|
118
|
+
border-radius: cv.getVar('dateinput-cell-radius');
|
|
119
|
+
|
|
120
|
+
&:hover:not(:disabled) {
|
|
121
|
+
background-color: cv.getVar('dateinput-cell-hover-bg');
|
|
122
|
+
}
|
|
123
|
+
&:focus-visible {
|
|
124
|
+
outline: 2px solid cv.getVar('primary');
|
|
125
|
+
outline-offset: 1px;
|
|
126
|
+
}
|
|
127
|
+
&:disabled {
|
|
128
|
+
opacity: 0.4;
|
|
129
|
+
cursor: not-allowed;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.#{iv.$class-prefix}dateinput-day-names,
|
|
134
|
+
.#{iv.$class-prefix}dateinput-grid {
|
|
135
|
+
display: grid;
|
|
136
|
+
grid-template-columns: repeat(7, 1fr);
|
|
137
|
+
gap: 2px;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.#{iv.$class-prefix}dateinput-day-name {
|
|
141
|
+
text-align: center;
|
|
142
|
+
font-size: cv.getVar('dateinput-day-name-size');
|
|
143
|
+
color: cv.getVar('dateinput-day-name-color');
|
|
144
|
+
padding: 0.25rem 0;
|
|
145
|
+
text-transform: uppercase;
|
|
146
|
+
letter-spacing: 0.04em;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.#{iv.$class-prefix}dateinput-cell {
|
|
150
|
+
display: inline-flex;
|
|
151
|
+
align-items: center;
|
|
152
|
+
justify-content: center;
|
|
153
|
+
width: cv.getVar('dateinput-cell-size');
|
|
154
|
+
height: cv.getVar('dateinput-cell-size');
|
|
155
|
+
margin: 0 auto;
|
|
156
|
+
border-radius: cv.getVar('dateinput-cell-radius');
|
|
157
|
+
border: 1px solid transparent;
|
|
158
|
+
background: transparent;
|
|
159
|
+
color: cv.getVar('dateinput-cell-color');
|
|
160
|
+
cursor: pointer;
|
|
161
|
+
font: inherit;
|
|
162
|
+
padding: 0;
|
|
163
|
+
// No transitions on cells: Chrome's button engine intermittently strands
|
|
164
|
+
// bg-color/color transitions mid-flight when selection moves between
|
|
165
|
+
// cells, leaving the deselected cell stuck on the old fill/text color and
|
|
166
|
+
// the newly-selected cell stuck on the previous values. Override the
|
|
167
|
+
// inherited button reset's transition explicitly — `transition: none`
|
|
168
|
+
// alone isn't enough because the reset declares longhand props.
|
|
169
|
+
transition-property: none;
|
|
170
|
+
|
|
171
|
+
// Hover for non-selected cells: a subtle grey overlay.
|
|
172
|
+
&:hover:not(:disabled):not(.#{iv.$class-prefix}is-selected) {
|
|
173
|
+
background-color: cv.getVar('dateinput-cell-hover-bg');
|
|
174
|
+
}
|
|
175
|
+
// Hover for the selected cell: darken the primary fill rather than
|
|
176
|
+
// replacing it, so the selection stays visible under the cursor while
|
|
177
|
+
// still giving interactive feedback.
|
|
178
|
+
&.#{iv.$class-prefix}is-selected:hover:not(:disabled) {
|
|
179
|
+
background-color: color-mix(
|
|
180
|
+
in srgb,
|
|
181
|
+
cv.getVar('dateinput-cell-selected-bg'),
|
|
182
|
+
black 15%
|
|
183
|
+
);
|
|
184
|
+
}
|
|
185
|
+
// Inset focus ring so it can't bleed into an adjacent selected cell's
|
|
186
|
+
// primary fill (the grid gap is only 2px). Outline respects the cell's
|
|
187
|
+
// border-radius in modern browsers.
|
|
188
|
+
&:focus-visible {
|
|
189
|
+
outline: 2px solid cv.getVar('primary');
|
|
190
|
+
outline-offset: -2px;
|
|
191
|
+
}
|
|
192
|
+
// Today: tinted bold text (no ring), so it doesn't collide visually with
|
|
193
|
+
// the keyboard focus outline. Selected wins via later cascade.
|
|
194
|
+
&.#{iv.$class-prefix}is-today {
|
|
195
|
+
color: cv.getVar('dateinput-cell-today-color');
|
|
196
|
+
font-weight: cv.getVar('weight-semibold');
|
|
197
|
+
}
|
|
198
|
+
&.#{iv.$class-prefix}is-selected {
|
|
199
|
+
background-color: cv.getVar('dateinput-cell-selected-bg');
|
|
200
|
+
color: cv.getVar('dateinput-cell-selected-color');
|
|
201
|
+
}
|
|
202
|
+
// When focus lands on the selected cell, swap the ring to scheme-main so
|
|
203
|
+
// it stays visible against the primary-colored fill.
|
|
204
|
+
&.#{iv.$class-prefix}is-selected:focus-visible {
|
|
205
|
+
outline-color: cv.getVar('scheme-main');
|
|
206
|
+
}
|
|
207
|
+
&.#{iv.$class-prefix}is-other-month {
|
|
208
|
+
color: cv.getVar('dateinput-cell-other-month-color');
|
|
209
|
+
}
|
|
210
|
+
&.#{iv.$class-prefix}is-disabled,
|
|
211
|
+
&:disabled {
|
|
212
|
+
color: cv.getVar('dateinput-cell-disabled-color');
|
|
213
|
+
cursor: not-allowed;
|
|
214
|
+
opacity: 0.55;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.#{iv.$class-prefix}dateinput-years-grid {
|
|
219
|
+
display: grid;
|
|
220
|
+
grid-template-columns: repeat(4, 1fr);
|
|
221
|
+
gap: 0.4rem;
|
|
222
|
+
max-height: calc(cv.getVar('dateinput-cell-size') * 6);
|
|
223
|
+
overflow-y: auto;
|
|
224
|
+
padding: 0.25rem 0;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.#{iv.$class-prefix}dateinput-year-cell {
|
|
228
|
+
display: inline-flex;
|
|
229
|
+
align-items: center;
|
|
230
|
+
justify-content: center;
|
|
231
|
+
height: cv.getVar('dateinput-cell-size');
|
|
232
|
+
border: 1px solid transparent;
|
|
233
|
+
border-radius: cv.getVar('dateinput-cell-radius');
|
|
234
|
+
background: transparent;
|
|
235
|
+
color: cv.getVar('dateinput-cell-color');
|
|
236
|
+
cursor: pointer;
|
|
237
|
+
font: inherit;
|
|
238
|
+
font-variant-numeric: tabular-nums;
|
|
239
|
+
padding: 0;
|
|
240
|
+
transition-property: none;
|
|
241
|
+
|
|
242
|
+
&:hover:not(:disabled):not(.#{iv.$class-prefix}is-selected) {
|
|
243
|
+
background-color: cv.getVar('dateinput-cell-hover-bg');
|
|
244
|
+
}
|
|
245
|
+
&.#{iv.$class-prefix}is-selected:hover:not(:disabled) {
|
|
246
|
+
background-color: color-mix(
|
|
247
|
+
in srgb,
|
|
248
|
+
cv.getVar('dateinput-cell-selected-bg'),
|
|
249
|
+
black 15%
|
|
250
|
+
);
|
|
251
|
+
}
|
|
252
|
+
&:focus-visible {
|
|
253
|
+
outline: 2px solid cv.getVar('primary');
|
|
254
|
+
outline-offset: -2px;
|
|
255
|
+
}
|
|
256
|
+
&.#{iv.$class-prefix}is-today {
|
|
257
|
+
color: cv.getVar('dateinput-cell-today-color');
|
|
258
|
+
font-weight: cv.getVar('weight-semibold');
|
|
259
|
+
}
|
|
260
|
+
&.#{iv.$class-prefix}is-selected {
|
|
261
|
+
background-color: cv.getVar('dateinput-cell-selected-bg');
|
|
262
|
+
color: cv.getVar('dateinput-cell-selected-color');
|
|
263
|
+
}
|
|
264
|
+
&.#{iv.$class-prefix}is-selected:focus-visible {
|
|
265
|
+
outline-color: cv.getVar('scheme-main');
|
|
266
|
+
}
|
|
267
|
+
&:disabled {
|
|
268
|
+
color: cv.getVar('dateinput-cell-disabled-color');
|
|
269
|
+
cursor: not-allowed;
|
|
270
|
+
opacity: 0.55;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.#{iv.$class-prefix}dateinput.#{iv.$class-prefix}is-small
|
|
275
|
+
.#{iv.$class-prefix}dateinput-cell {
|
|
276
|
+
width: 1.75rem;
|
|
277
|
+
height: 1.75rem;
|
|
278
|
+
font-size: cv.getVar('size-7');
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.#{iv.$class-prefix}dateinput.#{iv.$class-prefix}is-medium
|
|
282
|
+
.#{iv.$class-prefix}dateinput-cell {
|
|
283
|
+
width: 2.5rem;
|
|
284
|
+
height: 2.5rem;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.#{iv.$class-prefix}dateinput.#{iv.$class-prefix}is-large
|
|
288
|
+
.#{iv.$class-prefix}dateinput-cell {
|
|
289
|
+
width: 2.875rem;
|
|
290
|
+
height: 2.875rem;
|
|
291
|
+
font-size: cv.getVar('size-5');
|
|
292
|
+
}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
@use 'bulma/sass/utilities/initial-variables' as iv;
|
|
2
|
+
@use 'bulma/sass/utilities/css-variables' as cv;
|
|
3
|
+
|
|
4
|
+
$datetimeinput-gap: 0.75rem !default;
|
|
5
|
+
$datetimeinput-time-card-background: cv.getVar('scheme-main') !default;
|
|
6
|
+
$datetimeinput-time-card-border-color: cv.getVar('border') !default;
|
|
7
|
+
$datetimeinput-time-card-radius: cv.getVar('radius-large') !default;
|
|
8
|
+
$datetimeinput-time-card-shadow: 0 8px 24px hsla(0, 0%, 0%, 0.18) !default;
|
|
9
|
+
$datetimeinput-time-card-padding: 0.5rem 0.75rem !default;
|
|
10
|
+
// Frosted scrim over the calendar while the time wheels are open. Built from
|
|
11
|
+
// the scheme HSL components so it dims toward the panel background in both
|
|
12
|
+
// light and dark themes (same technique as Bulma's modal background).
|
|
13
|
+
$datetimeinput-time-overlay-background: hsla(
|
|
14
|
+
#{cv.getVar('scheme-h')},
|
|
15
|
+
#{cv.getVar('scheme-s')},
|
|
16
|
+
#{cv.getVar('scheme-main-l')},
|
|
17
|
+
0.55
|
|
18
|
+
) !default;
|
|
19
|
+
$datetimeinput-time-overlay-blur: 3px !default;
|
|
20
|
+
|
|
21
|
+
.#{iv.$class-prefix}datetimeinput {
|
|
22
|
+
@include cv.register-vars(
|
|
23
|
+
(
|
|
24
|
+
'datetimeinput-gap': #{$datetimeinput-gap},
|
|
25
|
+
'datetimeinput-time-card-background':
|
|
26
|
+
#{$datetimeinput-time-card-background},
|
|
27
|
+
'datetimeinput-time-card-border-color':
|
|
28
|
+
#{$datetimeinput-time-card-border-color},
|
|
29
|
+
'datetimeinput-time-card-radius': #{$datetimeinput-time-card-radius},
|
|
30
|
+
'datetimeinput-time-card-shadow': #{$datetimeinput-time-card-shadow},
|
|
31
|
+
'datetimeinput-time-card-padding': #{$datetimeinput-time-card-padding},
|
|
32
|
+
'datetimeinput-time-overlay-background':
|
|
33
|
+
#{$datetimeinput-time-overlay-background},
|
|
34
|
+
'datetimeinput-time-overlay-blur': #{$datetimeinput-time-overlay-blur},
|
|
35
|
+
)
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.#{iv.$class-prefix}datetimeinput {
|
|
40
|
+
display: flex;
|
|
41
|
+
flex-direction: column;
|
|
42
|
+
gap: cv.getVar('datetimeinput-gap');
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.#{iv.$class-prefix}datetimeinput-calendar-wrap {
|
|
46
|
+
position: relative;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// Frosted click-catcher covering the calendar while the wheels are open; it
|
|
50
|
+
// dims and blurs the calendar so the wheel card reads as the focused layer,
|
|
51
|
+
// and clicking it (not the card) collapses the wheels, like the native picker.
|
|
52
|
+
// The footer is a sibling of the calendar wrap, so it stays uncovered.
|
|
53
|
+
.#{iv.$class-prefix}datetimeinput-time-overlay {
|
|
54
|
+
position: absolute;
|
|
55
|
+
inset: 0;
|
|
56
|
+
z-index: 5;
|
|
57
|
+
display: flex;
|
|
58
|
+
align-items: center;
|
|
59
|
+
justify-content: center;
|
|
60
|
+
background-color: cv.getVar('datetimeinput-time-overlay-background');
|
|
61
|
+
backdrop-filter: blur(cv.getVar('datetimeinput-time-overlay-blur'));
|
|
62
|
+
animation: #{iv.$class-prefix}datetimeinput-overlay-in 0.12s ease-out;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@keyframes #{iv.$class-prefix}datetimeinput-overlay-in {
|
|
66
|
+
from {
|
|
67
|
+
opacity: 0;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// Floating wheel card — visually a small popover over the calendar, so
|
|
72
|
+
// revealing the wheels never grows the panel or forces scrolling.
|
|
73
|
+
.#{iv.$class-prefix}datetimeinput-time-card {
|
|
74
|
+
background-color: cv.getVar('datetimeinput-time-card-background');
|
|
75
|
+
border: 1px solid cv.getVar('datetimeinput-time-card-border-color');
|
|
76
|
+
border-radius: cv.getVar('datetimeinput-time-card-radius');
|
|
77
|
+
box-shadow: cv.getVar('datetimeinput-time-card-shadow');
|
|
78
|
+
padding: cv.getVar('datetimeinput-time-card-padding');
|
|
79
|
+
max-width: 100%;
|
|
80
|
+
}
|
|
81
|
+
.#{iv.$class-prefix}datetimeinput-time-card .#{iv.$class-prefix}timeinput {
|
|
82
|
+
display: block;
|
|
83
|
+
}
|
|
84
|
+
.#{iv.$class-prefix}datetimeinput-time-card
|
|
85
|
+
.#{iv.$class-prefix}timeinput-wheels {
|
|
86
|
+
justify-content: center;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// iOS-style footer: a "Time 5:07 PM" display row over a "Reset … (✓)" row.
|
|
90
|
+
.#{iv.$class-prefix}datetimeinput-footer {
|
|
91
|
+
display: flex;
|
|
92
|
+
flex-direction: column;
|
|
93
|
+
gap: 0.5rem;
|
|
94
|
+
padding-top: 0.25rem;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// The time row is a button: click it to reveal / hide the time wheels
|
|
98
|
+
// (iOS-style). The value renders as a pill that fills with the primary color
|
|
99
|
+
// while the wheels are open.
|
|
100
|
+
.#{iv.$class-prefix}datetimeinput-footer-time {
|
|
101
|
+
appearance: none;
|
|
102
|
+
border: 0;
|
|
103
|
+
background: transparent;
|
|
104
|
+
width: 100%;
|
|
105
|
+
display: flex;
|
|
106
|
+
align-items: center;
|
|
107
|
+
justify-content: space-between;
|
|
108
|
+
gap: 0.5rem;
|
|
109
|
+
padding: 0.35rem 0.25rem;
|
|
110
|
+
font: inherit;
|
|
111
|
+
cursor: pointer;
|
|
112
|
+
border-radius: cv.getVar('radius');
|
|
113
|
+
|
|
114
|
+
&:hover:not(:disabled),
|
|
115
|
+
&:focus-visible {
|
|
116
|
+
background-color: hsla(0, 0%, 50%, 0.08);
|
|
117
|
+
}
|
|
118
|
+
&:disabled {
|
|
119
|
+
cursor: not-allowed;
|
|
120
|
+
opacity: 0.5;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
& > span:first-child {
|
|
124
|
+
color: cv.getVar('text-weak');
|
|
125
|
+
font-size: cv.getVar('size-7');
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.#{iv.$class-prefix}datetimeinput-footer-time-pill {
|
|
130
|
+
color: cv.getVar('primary');
|
|
131
|
+
font-weight: 600;
|
|
132
|
+
font-variant-numeric: tabular-nums;
|
|
133
|
+
padding: 0.15em 0.6em;
|
|
134
|
+
border-radius: 9999px;
|
|
135
|
+
transition:
|
|
136
|
+
background-color 0.12s ease,
|
|
137
|
+
color 0.12s ease;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.#{iv.$class-prefix}datetimeinput-footer-time[aria-expanded='true']
|
|
141
|
+
.#{iv.$class-prefix}datetimeinput-footer-time-pill {
|
|
142
|
+
background-color: cv.getVar('primary');
|
|
143
|
+
color: cv.getVar('primary-invert');
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.#{iv.$class-prefix}datetimeinput-footer-actions {
|
|
147
|
+
display: flex;
|
|
148
|
+
align-items: center;
|
|
149
|
+
justify-content: space-between;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.#{iv.$class-prefix}datetimeinput-footer-reset {
|
|
153
|
+
appearance: none;
|
|
154
|
+
background: transparent;
|
|
155
|
+
border: 0;
|
|
156
|
+
padding: 0.5rem 0.25rem;
|
|
157
|
+
font: inherit;
|
|
158
|
+
color: cv.getVar('text');
|
|
159
|
+
cursor: pointer;
|
|
160
|
+
border-radius: cv.getVar('radius');
|
|
161
|
+
|
|
162
|
+
&:hover,
|
|
163
|
+
&:focus-visible {
|
|
164
|
+
background-color: hsla(0, 0%, 50%, 0.12);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.#{iv.$class-prefix}datetimeinput-footer-done {
|
|
169
|
+
appearance: none;
|
|
170
|
+
border: 0;
|
|
171
|
+
padding: 0;
|
|
172
|
+
width: 2.75rem;
|
|
173
|
+
height: 2.75rem;
|
|
174
|
+
border-radius: 50%;
|
|
175
|
+
display: inline-flex;
|
|
176
|
+
align-items: center;
|
|
177
|
+
justify-content: center;
|
|
178
|
+
background-color: cv.getVar('primary');
|
|
179
|
+
color: cv.getVar('primary-invert');
|
|
180
|
+
cursor: pointer;
|
|
181
|
+
box-shadow: 0 1px 3px hsla(0, 0%, 0%, 0.18);
|
|
182
|
+
transition: transform 0.1s ease;
|
|
183
|
+
|
|
184
|
+
&:active {
|
|
185
|
+
transform: scale(0.94);
|
|
186
|
+
}
|
|
187
|
+
&:focus-visible {
|
|
188
|
+
outline: 2px solid cv.getVar('primary');
|
|
189
|
+
outline-offset: 2px;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Bestax Extras - Form Styles Index
|
|
2
|
+
// Import all form component partials here
|
|
3
|
+
|
|
4
|
+
// Form Components
|
|
5
|
+
@use 'checkbox';
|
|
6
|
+
@use 'radio';
|
|
7
|
+
@use 'switch';
|
|
8
|
+
@use 'slider';
|
|
9
|
+
@use 'numberinput';
|
|
10
|
+
@use 'rate';
|
|
11
|
+
@use 'autocomplete';
|
|
12
|
+
@use 'taginput';
|
|
13
|
+
@use 'picker-popover';
|
|
14
|
+
@use 'dateinput';
|
|
15
|
+
@use 'timeinput';
|
|
16
|
+
@use 'datetimeinput';
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
// Numberinput Component Styles
|
|
2
|
+
// A number input with increment/decrement buttons
|
|
3
|
+
// Follows Bulma v1 CSS variable convention (see _dialog.scss)
|
|
4
|
+
|
|
5
|
+
@use "bulma/sass/utilities/initial-variables" as iv;
|
|
6
|
+
@use "bulma/sass/utilities/css-variables" as cv;
|
|
7
|
+
|
|
8
|
+
// Numberinput-specific SCSS variables
|
|
9
|
+
$numberinput-stepper-width: 2.5em !default;
|
|
10
|
+
$numberinput-stepper-border-color: cv.getVar("border") !default;
|
|
11
|
+
$numberinput-stepper-button-color: cv.getVar("text-weak") !default;
|
|
12
|
+
$numberinput-stepper-button-hover-color: cv.getVar("text-strong") !default;
|
|
13
|
+
$numberinput-stepper-button-hover-bg: cv.getVar("background") !default;
|
|
14
|
+
$numberinput-disabled-opacity: 0.5 !default;
|
|
15
|
+
$numberinput-rounded-button-size: 2.5em !default;
|
|
16
|
+
|
|
17
|
+
// Register CSS custom properties
|
|
18
|
+
.#{iv.$class-prefix}numberinput {
|
|
19
|
+
@include cv.register-vars(
|
|
20
|
+
(
|
|
21
|
+
"numberinput-stepper-width": #{$numberinput-stepper-width},
|
|
22
|
+
"numberinput-stepper-border-color": #{$numberinput-stepper-border-color},
|
|
23
|
+
"numberinput-stepper-button-color": #{$numberinput-stepper-button-color},
|
|
24
|
+
"numberinput-stepper-button-hover-color": #{$numberinput-stepper-button-hover-color},
|
|
25
|
+
"numberinput-stepper-button-hover-bg": #{$numberinput-stepper-button-hover-bg},
|
|
26
|
+
"numberinput-disabled-opacity": #{$numberinput-disabled-opacity},
|
|
27
|
+
"numberinput-rounded-button-size": #{$numberinput-rounded-button-size},
|
|
28
|
+
)
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Base numberinput styles
|
|
33
|
+
.#{iv.$class-prefix}numberinput {
|
|
34
|
+
// Input: center text, remove native number spinners
|
|
35
|
+
.#{iv.$class-prefix}input {
|
|
36
|
+
text-align: center;
|
|
37
|
+
-moz-appearance: textfield;
|
|
38
|
+
|
|
39
|
+
&::-webkit-outer-spin-button,
|
|
40
|
+
&::-webkit-inner-spin-button {
|
|
41
|
+
-webkit-appearance: none;
|
|
42
|
+
margin: 0;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// Focus z-index so focused input overlays adjacent borders
|
|
47
|
+
.#{iv.$class-prefix}input:focus {
|
|
48
|
+
z-index: 1;
|
|
49
|
+
position: relative;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// Button hover z-index
|
|
53
|
+
.#{iv.$class-prefix}button:hover:not(:disabled) {
|
|
54
|
+
z-index: 1;
|
|
55
|
+
position: relative;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// Button press effect
|
|
59
|
+
.#{iv.$class-prefix}button:active:not(:disabled) {
|
|
60
|
+
transform: scale(0.98);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Spaced rounded: force square buttons so is-rounded makes circles
|
|
64
|
+
&.#{iv.$class-prefix}is-grouped .#{iv.$class-prefix}button.#{iv.$class-prefix}is-rounded {
|
|
65
|
+
width: calc(cv.getVar("numberinput-rounded-button-size") - 1px);
|
|
66
|
+
height: calc(cv.getVar("numberinput-rounded-button-size") - 1px);
|
|
67
|
+
padding: 0;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// Compact rounded: reduce horizontal padding so buttons aren't too wide
|
|
71
|
+
&.#{iv.$class-prefix}has-addons .#{iv.$class-prefix}button.#{iv.$class-prefix}is-rounded {
|
|
72
|
+
padding-inline: 1em;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// Disabled state
|
|
76
|
+
&.#{iv.$class-prefix}is-disabled {
|
|
77
|
+
opacity: cv.getVar("numberinput-disabled-opacity");
|
|
78
|
+
pointer-events: none;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// Stepper variant
|
|
83
|
+
.#{iv.$class-prefix}numberinput.#{iv.$class-prefix}is-stepper {
|
|
84
|
+
// Left-align text in stepper (not centered)
|
|
85
|
+
.#{iv.$class-prefix}input {
|
|
86
|
+
text-align: left;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.#{iv.$class-prefix}numberinput-stepper {
|
|
90
|
+
display: flex;
|
|
91
|
+
flex-direction: column;
|
|
92
|
+
height: 2.5em;
|
|
93
|
+
width: cv.getVar("numberinput-stepper-width");
|
|
94
|
+
border: 1px solid cv.getVar("numberinput-stepper-border-color");
|
|
95
|
+
border-left: 1px solid cv.getVar("numberinput-stepper-border-color");
|
|
96
|
+
border-top-right-radius: cv.getVar("radius");
|
|
97
|
+
border-bottom-right-radius: cv.getVar("radius");
|
|
98
|
+
overflow: hidden;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.#{iv.$class-prefix}numberinput-stepper-button {
|
|
102
|
+
display: flex;
|
|
103
|
+
align-items: center;
|
|
104
|
+
justify-content: center;
|
|
105
|
+
flex: 1;
|
|
106
|
+
background: none;
|
|
107
|
+
border: none;
|
|
108
|
+
cursor: pointer;
|
|
109
|
+
color: cv.getVar("numberinput-stepper-button-color");
|
|
110
|
+
padding: 0;
|
|
111
|
+
|
|
112
|
+
&:hover:not(:disabled) {
|
|
113
|
+
background-color: cv.getVar("numberinput-stepper-button-hover-bg");
|
|
114
|
+
color: cv.getVar("numberinput-stepper-button-hover-color");
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
&:disabled {
|
|
118
|
+
opacity: cv.getVar("numberinput-disabled-opacity");
|
|
119
|
+
cursor: not-allowed;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
svg {
|
|
123
|
+
width: 0.75em;
|
|
124
|
+
height: 0.75em;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// Stepper: ensure control stretches to match input height
|
|
130
|
+
.#{iv.$class-prefix}numberinput.#{iv.$class-prefix}is-stepper {
|
|
131
|
+
> .#{iv.$class-prefix}control:last-child {
|
|
132
|
+
display: flex;
|
|
133
|
+
align-items: stretch;
|
|
134
|
+
font-size: inherit;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// Bare mode inside has-addons: fix border-radius for controls
|
|
139
|
+
// whose :first-child/:last-child is relative to .numberinput, not .has-addons
|
|
140
|
+
.#{iv.$class-prefix}has-addons > .#{iv.$class-prefix}numberinput {
|
|
141
|
+
// When numberinput is not the first child, strip left radius from its first control
|
|
142
|
+
&:not(:first-child) > .#{iv.$class-prefix}control:first-child {
|
|
143
|
+
.#{iv.$class-prefix}button,
|
|
144
|
+
.#{iv.$class-prefix}input {
|
|
145
|
+
border-start-start-radius: 0;
|
|
146
|
+
border-end-start-radius: 0;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// When numberinput is not the last child, strip right radius from its last control
|
|
151
|
+
&:not(:last-child) > .#{iv.$class-prefix}control:last-child {
|
|
152
|
+
margin-inline-end: -1px;
|
|
153
|
+
|
|
154
|
+
.#{iv.$class-prefix}button,
|
|
155
|
+
.#{iv.$class-prefix}input {
|
|
156
|
+
border-start-end-radius: 0;
|
|
157
|
+
border-end-end-radius: 0;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
// Size variants — font-size on container so em-based values scale
|
|
163
|
+
.#{iv.$class-prefix}numberinput.#{iv.$class-prefix}is-small {
|
|
164
|
+
@include cv.register-vars(("numberinput-rounded-button-size": 2em));
|
|
165
|
+
font-size: cv.getVar("size-small");
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.#{iv.$class-prefix}numberinput.#{iv.$class-prefix}is-medium {
|
|
169
|
+
@include cv.register-vars(("numberinput-rounded-button-size": 3em));
|
|
170
|
+
font-size: cv.getVar("size-medium");
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.#{iv.$class-prefix}numberinput.#{iv.$class-prefix}is-large {
|
|
174
|
+
@include cv.register-vars(("numberinput-rounded-button-size": 3.5em));
|
|
175
|
+
font-size: cv.getVar("size-large");
|
|
176
|
+
}
|