@allxsmith/bestax-bulma 5.54.1 → 5.55.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/dist/bestax.css +1 -1
- package/dist/bestax.css.map +1 -1
- package/dist/esm/components/Command.js +22 -22
- package/dist/esm/components/Command.js.map +1 -1
- package/dist/esm/components/DataTable.js +215 -0
- package/dist/esm/components/DataTable.js.map +1 -0
- package/dist/esm/components/useDataTable.js +482 -0
- package/dist/esm/components/useDataTable.js.map +1 -0
- package/dist/esm/elements/ColorSwatch.js +49 -0
- package/dist/esm/elements/ColorSwatch.js.map +1 -0
- package/dist/esm/elements/RingProgress.js +3 -3
- package/dist/esm/elements/Td.js +4 -2
- package/dist/esm/elements/Td.js.map +1 -1
- package/dist/esm/elements/Th.js +13 -5
- package/dist/esm/elements/Th.js.map +1 -1
- package/dist/esm/elements/Tr.js.map +1 -1
- package/dist/esm/form/ColorPicker.js +540 -0
- package/dist/esm/form/ColorPicker.js.map +1 -0
- package/dist/esm/form/Combobox.js +18 -18
- package/dist/esm/form/Combobox.js.map +1 -1
- package/dist/esm/form/Dropzone.js +524 -0
- package/dist/esm/form/Dropzone.js.map +1 -0
- package/dist/esm/form/_colorInternals/colorMath.js +292 -0
- package/dist/esm/form/_colorInternals/colorMath.js.map +1 -0
- package/dist/esm/form/_colorInternals/pickerState.js +160 -0
- package/dist/esm/form/_colorInternals/pickerState.js.map +1 -0
- package/dist/esm/helpers/statusRegion.js +3 -3
- package/dist/esm/helpers/statusRegion.js.map +1 -1
- package/dist/esm/helpers/useFocusTrap.js +2 -2
- package/dist/extras.css +1 -1
- package/dist/extras.css.map +1 -1
- package/dist/index.cjs +2986 -796
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +5 -0
- package/dist/index.esm.js.map +1 -1
- package/dist/types/components/DataTable.d.ts +120 -0
- package/dist/types/components/useDataTable.d.ts +445 -0
- package/dist/types/elements/ColorSwatch.d.ts +54 -0
- package/dist/types/elements/Td.d.ts +9 -1
- package/dist/types/elements/Th.d.ts +14 -2
- package/dist/types/elements/Tr.d.ts +10 -1
- package/dist/types/form/ColorPicker.d.ts +266 -0
- package/dist/types/form/Dropzone.d.ts +138 -0
- package/dist/types/form/_colorInternals/colorMath.d.ts +63 -0
- package/dist/types/form/_colorInternals/pickerState.d.ts +62 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types-cjs/components/DataTable.d.ts +120 -0
- package/dist/types-cjs/components/useDataTable.d.ts +445 -0
- package/dist/types-cjs/elements/ColorSwatch.d.ts +54 -0
- package/dist/types-cjs/elements/Td.d.ts +9 -1
- package/dist/types-cjs/elements/Th.d.ts +14 -2
- package/dist/types-cjs/elements/Tr.d.ts +10 -1
- package/dist/types-cjs/form/ColorPicker.d.ts +266 -0
- package/dist/types-cjs/form/Dropzone.d.ts +138 -0
- package/dist/types-cjs/form/_colorInternals/colorMath.d.ts +63 -0
- package/dist/types-cjs/form/_colorInternals/pickerState.d.ts +62 -0
- package/dist/types-cjs/index.d.ts +4 -0
- package/dist/versions/bestax-no-dark-mode.css +1 -1
- package/dist/versions/bestax-no-dark-mode.css.map +1 -1
- package/dist/versions/bestax-no-helpers-prefixed.css +1 -1
- package/dist/versions/bestax-no-helpers-prefixed.css.map +1 -1
- package/dist/versions/bestax-no-helpers.css +1 -1
- package/dist/versions/bestax-no-helpers.css.map +1 -1
- package/dist/versions/bestax-prefixed.css +1 -1
- package/dist/versions/bestax-prefixed.css.map +1 -1
- package/package.json +1 -1
- package/src/scss/components/_datatable.scss +152 -0
- package/src/scss/components/_index.scss +1 -0
- package/src/scss/elements/_colorswatch.scss +100 -0
- package/src/scss/elements/_index.scss +1 -0
- package/src/scss/form/_checkbox.scss +53 -0
- package/src/scss/form/_colorpicker.scss +354 -0
- package/src/scss/form/_dropzone.scss +233 -0
- package/src/scss/form/_index.scss +2 -0
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
// Dropzone Component Styles
|
|
2
|
+
// Bulma's boxed, full-width File widget as a drop zone, its drag states, and
|
|
3
|
+
// the list of chosen files under it
|
|
4
|
+
// Follows Bulma v1 CSS variable convention (see _dialog.scss)
|
|
5
|
+
|
|
6
|
+
@use 'bulma/sass/utilities/initial-variables' as iv;
|
|
7
|
+
@use 'bulma/sass/utilities/css-variables' as cv;
|
|
8
|
+
|
|
9
|
+
// Dropzone-specific SCSS variables. The zone keeps Bulma's File tokens for
|
|
10
|
+
// its colours and sizes, and the list takes Bulma's scheme tokens, so dark
|
|
11
|
+
// mode follows them.
|
|
12
|
+
$dropzone-border-style: dashed !default;
|
|
13
|
+
$dropzone-border-width: 2px !default;
|
|
14
|
+
$dropzone-min-height: 8rem !default;
|
|
15
|
+
// The zone's border while files are dragged over it, and while every file
|
|
16
|
+
// dragged would be refused.
|
|
17
|
+
$dropzone-dragover-border-color: cv.getVar('primary') !default;
|
|
18
|
+
$dropzone-reject-border-color: cv.getVar('danger') !default;
|
|
19
|
+
$dropzone-disabled-opacity: 0.5 !default;
|
|
20
|
+
// Between the zone and the list or the refusals under it.
|
|
21
|
+
$dropzone-spacing: 0.5rem !default;
|
|
22
|
+
$dropzone-item-background: cv.getVar('scheme-main') !default;
|
|
23
|
+
$dropzone-item-border-color: cv.getVar('border') !default;
|
|
24
|
+
$dropzone-item-border-width: cv.getVar('control-border-width') !default;
|
|
25
|
+
$dropzone-item-radius: cv.getVar('radius') !default;
|
|
26
|
+
$dropzone-item-padding: 0.5em 0.75em !default;
|
|
27
|
+
$dropzone-item-gap: 0.75em !default;
|
|
28
|
+
// Between one row and the next.
|
|
29
|
+
$dropzone-item-spacing: 0.25rem !default;
|
|
30
|
+
$dropzone-name-color: cv.getVar('text-strong') !default;
|
|
31
|
+
$dropzone-size-color: cv.getVar('text-weak') !default;
|
|
32
|
+
$dropzone-size-font-size: cv.getVar('size-small') !default;
|
|
33
|
+
|
|
34
|
+
// Register CSS custom properties
|
|
35
|
+
.#{iv.$class-prefix}dropzone {
|
|
36
|
+
@include cv.register-vars(
|
|
37
|
+
(
|
|
38
|
+
'dropzone-border-style': #{$dropzone-border-style},
|
|
39
|
+
'dropzone-border-width': #{$dropzone-border-width},
|
|
40
|
+
'dropzone-min-height': #{$dropzone-min-height},
|
|
41
|
+
'dropzone-dragover-border-color': #{$dropzone-dragover-border-color},
|
|
42
|
+
'dropzone-reject-border-color': #{$dropzone-reject-border-color},
|
|
43
|
+
'dropzone-disabled-opacity': #{$dropzone-disabled-opacity},
|
|
44
|
+
'dropzone-spacing': #{$dropzone-spacing},
|
|
45
|
+
'dropzone-item-background': #{$dropzone-item-background},
|
|
46
|
+
'dropzone-item-border-color': #{$dropzone-item-border-color},
|
|
47
|
+
'dropzone-item-border-width': #{$dropzone-item-border-width},
|
|
48
|
+
'dropzone-item-radius': #{$dropzone-item-radius},
|
|
49
|
+
'dropzone-item-padding': #{$dropzone-item-padding},
|
|
50
|
+
'dropzone-item-gap': #{$dropzone-item-gap},
|
|
51
|
+
'dropzone-item-spacing': #{$dropzone-item-spacing},
|
|
52
|
+
'dropzone-name-color': #{$dropzone-name-color},
|
|
53
|
+
'dropzone-size-color': #{$dropzone-size-color},
|
|
54
|
+
'dropzone-size-font-size': #{$dropzone-size-font-size},
|
|
55
|
+
)
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.#{iv.$class-prefix}dropzone {
|
|
60
|
+
// The zone is the widget's first part, so Bulma's block spacing under a
|
|
61
|
+
// File gives way to the spacing of the parts below it.
|
|
62
|
+
.#{iv.$class-prefix}file.#{iv.$class-prefix}is-boxed {
|
|
63
|
+
margin-block-end: 0;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// Bulma lays the transparent input over the widget but paints the CTA over
|
|
67
|
+
// it, and a browser hands a dropped file only to a file input under the
|
|
68
|
+
// pointer. Lifting the input puts it on top, where it takes the drop, the
|
|
69
|
+
// click and the pointer cursor Bulma gives the label. The label isolates
|
|
70
|
+
// the lift, so the input never rises above anything else on the page.
|
|
71
|
+
.#{iv.$class-prefix}file-label {
|
|
72
|
+
isolation: isolate;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.#{iv.$class-prefix}file-input {
|
|
76
|
+
cursor: pointer;
|
|
77
|
+
z-index: 1;
|
|
78
|
+
|
|
79
|
+
&::file-selector-button {
|
|
80
|
+
cursor: pointer;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
&:disabled,
|
|
84
|
+
&:disabled::file-selector-button {
|
|
85
|
+
cursor: not-allowed;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// A dashed box, tall enough to aim a drop at, with its text centred and
|
|
90
|
+
// free to wrap.
|
|
91
|
+
.#{iv.$class-prefix}file-cta {
|
|
92
|
+
border-style: cv.getVar('dropzone-border-style');
|
|
93
|
+
border-width: cv.getVar('dropzone-border-width');
|
|
94
|
+
justify-content: center;
|
|
95
|
+
min-height: cv.getVar('dropzone-min-height');
|
|
96
|
+
text-align: center;
|
|
97
|
+
white-space: normal;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// While files are dragged over it the zone takes File's hover look, which
|
|
101
|
+
// a drag doesn't trigger, and a solid border, which shows the state in
|
|
102
|
+
// forced colours too.
|
|
103
|
+
&.#{iv.$class-prefix}is-dragover,
|
|
104
|
+
&.#{iv.$class-prefix}is-drag-reject {
|
|
105
|
+
.#{iv.$class-prefix}file-label {
|
|
106
|
+
@include cv.register-vars(
|
|
107
|
+
(
|
|
108
|
+
'file-background-l-delta': #{cv.getVar(
|
|
109
|
+
'file-hover-background-l-delta'
|
|
110
|
+
)},
|
|
111
|
+
'file-border-l-delta': #{cv.getVar('file-hover-border-l-delta')},
|
|
112
|
+
'file-color-l-delta': #{cv.getVar('file-hover-color-l-delta')},
|
|
113
|
+
)
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.#{iv.$class-prefix}file-cta {
|
|
118
|
+
border-style: solid;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
&.#{iv.$class-prefix}is-dragover .#{iv.$class-prefix}file-cta {
|
|
123
|
+
border-color: cv.getVar('dropzone-dragover-border-color');
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
&.#{iv.$class-prefix}is-drag-reject .#{iv.$class-prefix}file-cta {
|
|
127
|
+
border-color: cv.getVar('dropzone-reject-border-color');
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// Disabled: dimmed, as Bulma dims a disabled button, with no hover look.
|
|
131
|
+
&.#{iv.$class-prefix}is-disabled {
|
|
132
|
+
.#{iv.$class-prefix}file {
|
|
133
|
+
opacity: cv.getVar('dropzone-disabled-opacity');
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.#{iv.$class-prefix}file-label {
|
|
137
|
+
@include cv.register-vars(
|
|
138
|
+
(
|
|
139
|
+
'file-background-l-delta': 0%,
|
|
140
|
+
'file-border-l-delta': 0%,
|
|
141
|
+
'file-color-l-delta': 0%,
|
|
142
|
+
)
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// Forced colours replaces the border colours, so the drop target takes the
|
|
149
|
+
// system's highlight colour, and a zone that would refuse the files the
|
|
150
|
+
// text colour.
|
|
151
|
+
@media (forced-colors: active) {
|
|
152
|
+
.#{iv.$class-prefix}dropzone.#{iv.$class-prefix}is-dragover
|
|
153
|
+
.#{iv.$class-prefix}file-cta {
|
|
154
|
+
border-color: Highlight;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.#{iv.$class-prefix}dropzone.#{iv.$class-prefix}is-drag-reject
|
|
158
|
+
.#{iv.$class-prefix}file-cta {
|
|
159
|
+
border-color: CanvasText;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// The chosen files, a bordered row each, and the refusals.
|
|
164
|
+
.#{iv.$class-prefix}dropzone-list,
|
|
165
|
+
.#{iv.$class-prefix}dropzone-rejections {
|
|
166
|
+
margin-block-start: cv.getVar('dropzone-spacing');
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.#{iv.$class-prefix}dropzone-item {
|
|
170
|
+
align-items: center;
|
|
171
|
+
background-color: cv.getVar('dropzone-item-background');
|
|
172
|
+
border: cv.getVar('dropzone-item-border-width') solid
|
|
173
|
+
cv.getVar('dropzone-item-border-color');
|
|
174
|
+
border-radius: cv.getVar('dropzone-item-radius');
|
|
175
|
+
display: flex;
|
|
176
|
+
gap: cv.getVar('dropzone-item-gap');
|
|
177
|
+
padding: cv.getVar('dropzone-item-padding');
|
|
178
|
+
|
|
179
|
+
& + & {
|
|
180
|
+
margin-block-start: cv.getVar('dropzone-item-spacing');
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
// A long name is cut short with an ellipsis, so the size and the remove
|
|
185
|
+
// button stay on the row.
|
|
186
|
+
.#{iv.$class-prefix}dropzone-name {
|
|
187
|
+
color: cv.getVar('dropzone-name-color');
|
|
188
|
+
flex: 1 1 auto;
|
|
189
|
+
min-width: 0;
|
|
190
|
+
overflow: hidden;
|
|
191
|
+
text-overflow: ellipsis;
|
|
192
|
+
white-space: nowrap;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.#{iv.$class-prefix}dropzone-size {
|
|
196
|
+
color: cv.getVar('dropzone-size-color');
|
|
197
|
+
flex: none;
|
|
198
|
+
font-size: cv.getVar('dropzone-size-font-size');
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
// Bulma shows a delete button's focus only as a slightly darker circle, so a
|
|
202
|
+
// row's remove button takes a ring from the keyboard, in Bulma's focus
|
|
203
|
+
// colour, style and width.
|
|
204
|
+
.#{iv.$class-prefix}dropzone-item .#{iv.$class-prefix}delete:focus-visible {
|
|
205
|
+
outline-color: hsl(
|
|
206
|
+
cv.getVar('focus-h'),
|
|
207
|
+
cv.getVar('focus-s'),
|
|
208
|
+
cv.getVar('focus-l')
|
|
209
|
+
);
|
|
210
|
+
outline-offset: cv.getVar('focus-offset');
|
|
211
|
+
outline-style: cv.getVar('focus-style');
|
|
212
|
+
outline-width: cv.getVar('focus-width');
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
// Bulma draws a delete button's circle and cross as backgrounds, which forced
|
|
216
|
+
// colours paints over, so the remove buttons would vanish. They keep their
|
|
217
|
+
// own colours there, in the system's button colours.
|
|
218
|
+
@media (forced-colors: active) {
|
|
219
|
+
.#{iv.$class-prefix}dropzone-item .#{iv.$class-prefix}delete {
|
|
220
|
+
background-color: ButtonFace;
|
|
221
|
+
border: 1px solid ButtonText;
|
|
222
|
+
forced-color-adjust: none;
|
|
223
|
+
|
|
224
|
+
&::before,
|
|
225
|
+
&::after {
|
|
226
|
+
background-color: ButtonText;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
&:focus-visible {
|
|
230
|
+
outline-color: Highlight;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|