@allxsmith/bestax-bulma 5.54.1 → 5.56.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.
Files changed (87) hide show
  1. package/dist/bestax.css +1 -1
  2. package/dist/bestax.css.map +1 -1
  3. package/dist/esm/components/Command.js +22 -22
  4. package/dist/esm/components/Command.js.map +1 -1
  5. package/dist/esm/components/DataTable.js +215 -0
  6. package/dist/esm/components/DataTable.js.map +1 -0
  7. package/dist/esm/components/useDataTable.js +509 -0
  8. package/dist/esm/components/useDataTable.js.map +1 -0
  9. package/dist/esm/elements/ColorSwatch.js +49 -0
  10. package/dist/esm/elements/ColorSwatch.js.map +1 -0
  11. package/dist/esm/elements/RingProgress.js +3 -3
  12. package/dist/esm/elements/Td.js +4 -2
  13. package/dist/esm/elements/Td.js.map +1 -1
  14. package/dist/esm/elements/Th.js +13 -5
  15. package/dist/esm/elements/Th.js.map +1 -1
  16. package/dist/esm/elements/Tr.js.map +1 -1
  17. package/dist/esm/form/ColorInput.js +68 -0
  18. package/dist/esm/form/ColorInput.js.map +1 -0
  19. package/dist/esm/form/ColorInputBase.js +198 -0
  20. package/dist/esm/form/ColorInputBase.js.map +1 -0
  21. package/dist/esm/form/ColorPicker.js +524 -0
  22. package/dist/esm/form/ColorPicker.js.map +1 -0
  23. package/dist/esm/form/Combobox.js +18 -18
  24. package/dist/esm/form/Combobox.js.map +1 -1
  25. package/dist/esm/form/Dropzone.js +524 -0
  26. package/dist/esm/form/Dropzone.js.map +1 -0
  27. package/dist/esm/form/_colorInternals/EyeDropperButton.js +40 -0
  28. package/dist/esm/form/_colorInternals/EyeDropperButton.js.map +1 -0
  29. package/dist/esm/form/_colorInternals/colorMath.js +292 -0
  30. package/dist/esm/form/_colorInternals/colorMath.js.map +1 -0
  31. package/dist/esm/form/_colorInternals/pickerState.js +160 -0
  32. package/dist/esm/form/_colorInternals/pickerState.js.map +1 -0
  33. package/dist/esm/helpers/statusRegion.js +3 -3
  34. package/dist/esm/helpers/statusRegion.js.map +1 -1
  35. package/dist/esm/helpers/useFocusTrap.js +2 -2
  36. package/dist/extras.css +1 -1
  37. package/dist/extras.css.map +1 -1
  38. package/dist/index.cjs +3054 -586
  39. package/dist/index.cjs.map +1 -1
  40. package/dist/index.esm.js +7 -0
  41. package/dist/index.esm.js.map +1 -1
  42. package/dist/types/components/DataTable.d.ts +120 -0
  43. package/dist/types/components/useDataTable.d.ts +481 -0
  44. package/dist/types/elements/ColorSwatch.d.ts +54 -0
  45. package/dist/types/elements/Td.d.ts +9 -1
  46. package/dist/types/elements/Th.d.ts +14 -2
  47. package/dist/types/elements/Tr.d.ts +10 -1
  48. package/dist/types/form/ColorInput.d.ts +76 -0
  49. package/dist/types/form/ColorInputBase.d.ts +108 -0
  50. package/dist/types/form/ColorPicker.d.ts +271 -0
  51. package/dist/types/form/Dropzone.d.ts +138 -0
  52. package/dist/types/form/_colorInternals/EyeDropperButton.d.ts +8 -0
  53. package/dist/types/form/_colorInternals/colorMath.d.ts +63 -0
  54. package/dist/types/form/_colorInternals/pickerState.d.ts +68 -0
  55. package/dist/types/index.d.ts +8 -0
  56. package/dist/types-cjs/components/DataTable.d.ts +120 -0
  57. package/dist/types-cjs/components/useDataTable.d.ts +481 -0
  58. package/dist/types-cjs/elements/ColorSwatch.d.ts +54 -0
  59. package/dist/types-cjs/elements/Td.d.ts +9 -1
  60. package/dist/types-cjs/elements/Th.d.ts +14 -2
  61. package/dist/types-cjs/elements/Tr.d.ts +10 -1
  62. package/dist/types-cjs/form/ColorInput.d.ts +76 -0
  63. package/dist/types-cjs/form/ColorInputBase.d.ts +108 -0
  64. package/dist/types-cjs/form/ColorPicker.d.ts +271 -0
  65. package/dist/types-cjs/form/Dropzone.d.ts +138 -0
  66. package/dist/types-cjs/form/_colorInternals/EyeDropperButton.d.ts +8 -0
  67. package/dist/types-cjs/form/_colorInternals/colorMath.d.ts +63 -0
  68. package/dist/types-cjs/form/_colorInternals/pickerState.d.ts +68 -0
  69. package/dist/types-cjs/index.d.ts +8 -0
  70. package/dist/versions/bestax-no-dark-mode.css +1 -1
  71. package/dist/versions/bestax-no-dark-mode.css.map +1 -1
  72. package/dist/versions/bestax-no-helpers-prefixed.css +1 -1
  73. package/dist/versions/bestax-no-helpers-prefixed.css.map +1 -1
  74. package/dist/versions/bestax-no-helpers.css +1 -1
  75. package/dist/versions/bestax-no-helpers.css.map +1 -1
  76. package/dist/versions/bestax-prefixed.css +1 -1
  77. package/dist/versions/bestax-prefixed.css.map +1 -1
  78. package/package.json +1 -1
  79. package/src/scss/components/_datatable.scss +152 -0
  80. package/src/scss/components/_index.scss +1 -0
  81. package/src/scss/elements/_colorswatch.scss +100 -0
  82. package/src/scss/elements/_index.scss +1 -0
  83. package/src/scss/form/_checkbox.scss +53 -0
  84. package/src/scss/form/_colorinput.scss +109 -0
  85. package/src/scss/form/_colorpicker.scss +354 -0
  86. package/src/scss/form/_dropzone.scss +233 -0
  87. package/src/scss/form/_index.scss +3 -0
@@ -0,0 +1,152 @@
1
+ // Bestax Extras - DataTable Styles
2
+ // DataTable renders Bulma's own table, checkboxes and pager, which Bulma and
3
+ // the Checkbox partial style. This adds what Bulma has no class for: the
4
+ // toolbar above the table, the button a sortable header holds, and the
5
+ // indicator that shows which way it sorts.
6
+ //
7
+ // The sort button is styled on its own class rather than inside
8
+ // `.data-table`, so a table built from `useDataTable`'s props, with no
9
+ // DataTable around it, gets the same button. Its variables are declared on
10
+ // the button for the same reason.
11
+
12
+ @use 'bulma/sass/utilities/initial-variables' as iv;
13
+ @use 'bulma/sass/utilities/css-variables' as cv;
14
+ @use '../mixins' as *;
15
+
16
+ // Between the toolbar's items, and under the toolbar.
17
+ $data-table-gap: 0.75rem !default;
18
+ // Between a header's text and its indicator.
19
+ $data-table-sort-gap: 0.375em !default;
20
+ $data-table-sort-indicator-size: 0.75em !default;
21
+ // How strongly an unsorted column shows that it sorts.
22
+ $data-table-sort-unsorted-opacity: 0.35 !default;
23
+
24
+ // The indicator's shapes, used as masks so they're painted in the text's
25
+ // color, or a system color in forced colors. Private, since they're shapes
26
+ // rather than themable values; the fill only marks what each mask keeps.
27
+ // An unsorted column shows both triangles, a sorted one the one pointing
28
+ // the way it sorts, up for ascending as the APG example draws it.
29
+ $-unsorted: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1.5 12.5 7h-9zM8 14.5 3.5 9h9z'/%3E%3C/svg%3E");
30
+ $-ascending: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 3.5 13.5 11h-11z'/%3E%3C/svg%3E");
31
+ $-descending: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 12.5 2.5 5h11z'/%3E%3C/svg%3E");
32
+
33
+ .#{iv.$class-prefix}data-table {
34
+ @include cv.register-vars(
35
+ (
36
+ 'data-table-gap': #{$data-table-gap},
37
+ )
38
+ );
39
+ }
40
+
41
+ .#{iv.$class-prefix}data-table-sort {
42
+ @include cv.register-vars(
43
+ (
44
+ 'data-table-sort-gap': #{$data-table-sort-gap},
45
+ 'data-table-sort-indicator-size': #{$data-table-sort-indicator-size},
46
+ 'data-table-sort-unsorted-opacity': #{$data-table-sort-unsorted-opacity},
47
+ )
48
+ );
49
+ }
50
+
51
+ // A block, spaced as Bulma spaces its table and its other blocks.
52
+ .#{iv.$class-prefix}data-table:not(:last-child) {
53
+ margin-block-end: cv.getVar('block-spacing');
54
+ }
55
+
56
+ // The caption names the table from the start of the line, over the header
57
+ // cells it names, rather than centered over them as browsers place it.
58
+ .#{iv.$class-prefix}data-table .#{iv.$class-prefix}table > caption {
59
+ padding-block-end: cv.getVar('data-table-gap');
60
+ text-align: start;
61
+ }
62
+
63
+ // The toolbar: the search field at the start, anything else at the end, and
64
+ // the two stacked when the line runs out of room.
65
+ .#{iv.$class-prefix}data-table-toolbar {
66
+ display: flex;
67
+ flex-wrap: wrap;
68
+ align-items: flex-end;
69
+ gap: cv.getVar('data-table-gap');
70
+ margin-block-end: cv.getVar('data-table-gap');
71
+
72
+ > .#{iv.$class-prefix}field {
73
+ margin-block-end: 0;
74
+ }
75
+ }
76
+
77
+ .#{iv.$class-prefix}data-table-actions {
78
+ display: flex;
79
+ flex-wrap: wrap;
80
+ align-items: center;
81
+ gap: cv.getVar('data-table-gap');
82
+ margin-inline-start: auto;
83
+ }
84
+
85
+ // A sortable header's button reads as the header's own text, with the
86
+ // indicator after it.
87
+ .#{iv.$class-prefix}data-table-sort {
88
+ @include extras-button-reset;
89
+ display: inline-flex;
90
+ align-items: center;
91
+ gap: cv.getVar('data-table-sort-gap');
92
+ font-weight: inherit;
93
+ line-height: inherit;
94
+ text-align: inherit;
95
+
96
+ &::after {
97
+ content: '';
98
+ flex-shrink: 0;
99
+ width: cv.getVar('data-table-sort-indicator-size');
100
+ height: cv.getVar('data-table-sort-indicator-size');
101
+ background-color: currentColor;
102
+ opacity: cv.getVar('data-table-sort-unsorted-opacity');
103
+ -webkit-mask-image: $-unsorted;
104
+ -webkit-mask-size: contain;
105
+ -webkit-mask-repeat: no-repeat;
106
+ -webkit-mask-position: center;
107
+ mask-image: $-unsorted;
108
+ mask-size: contain;
109
+ mask-repeat: no-repeat;
110
+ mask-position: center;
111
+ }
112
+
113
+ &:hover::after {
114
+ opacity: 1;
115
+ }
116
+
117
+ &:focus-visible {
118
+ @include extras-focus-outline;
119
+ }
120
+ }
121
+
122
+ // The sorted header says which way in `aria-sort`, so the indicator reads it
123
+ // from there, and markup built from `useDataTable`'s props shows it too.
124
+ th[aria-sort='ascending'] > .#{iv.$class-prefix}data-table-sort::after {
125
+ opacity: 1;
126
+ -webkit-mask-image: $-ascending;
127
+ mask-image: $-ascending;
128
+ }
129
+
130
+ th[aria-sort='descending'] > .#{iv.$class-prefix}data-table-sort::after {
131
+ opacity: 1;
132
+ -webkit-mask-image: $-descending;
133
+ mask-image: $-descending;
134
+ }
135
+
136
+ // Forced colors replaces a background color that isn't a system one, which
137
+ // would take the indicator's paint away. The mask is left alone, so the
138
+ // shape stays.
139
+ @media (forced-colors: active) {
140
+ .#{iv.$class-prefix}data-table-sort {
141
+ // A faint indicator would fall short of the contrast forced colors is
142
+ // for. The two shapes, one triangle or both, still tell the states apart.
143
+ &::after {
144
+ background-color: ButtonText;
145
+ opacity: 1;
146
+ }
147
+
148
+ &:focus-visible {
149
+ outline-color: Highlight;
150
+ }
151
+ }
152
+ }
@@ -24,3 +24,4 @@
24
24
  @use 'treeview';
25
25
  @use 'scrollarea';
26
26
  @use 'command';
27
+ @use 'datatable';
@@ -0,0 +1,100 @@
1
+ // Bestax Extras - ColorSwatch Styles
2
+ // A color shown as a small chip. Bulma has no swatch.
3
+ //
4
+ // The component sets the color as `--color-swatch-color`, which is painted
5
+ // as a gradient over a checkerboard, so a see-through color shows the
6
+ // checks through it. Forced colors would turn both into the page's
7
+ // background, so the swatch opts out of it and takes an edge in the
8
+ // system's text color instead.
9
+
10
+ @use 'bulma/sass/utilities/initial-variables' as iv;
11
+ @use 'bulma/sass/utilities/css-variables' as cv;
12
+
13
+ $color-swatch-size: 1.5rem !default;
14
+ $color-swatch-size-small: 1rem !default;
15
+ $color-swatch-size-medium: 2rem !default;
16
+ $color-swatch-size-large: 3rem !default;
17
+ $color-swatch-radius: cv.getVar('radius') !default;
18
+ // A faint edge in the text color, so a white swatch shows on a white page
19
+ // and a black one on a dark page.
20
+ $color-swatch-edge-color: hsla(
21
+ cv.getVar('text-h'),
22
+ cv.getVar('text-s'),
23
+ cv.getVar('text-l'),
24
+ 0.2
25
+ ) !default;
26
+ // The checkerboard behind a see-through color, from scheme colors so it
27
+ // follows dark mode.
28
+ $color-swatch-checker-color: cv.getVar('border') !default;
29
+ $color-swatch-checker-background: cv.getVar('scheme-main') !default;
30
+ $color-swatch-checker-size: 0.5rem !default;
31
+
32
+ .#{iv.$class-prefix}color-swatch {
33
+ @include cv.register-vars(
34
+ (
35
+ 'color-swatch-size': #{$color-swatch-size},
36
+ 'color-swatch-radius': #{$color-swatch-radius},
37
+ 'color-swatch-edge-color': #{$color-swatch-edge-color},
38
+ 'color-swatch-checker-color': #{$color-swatch-checker-color},
39
+ 'color-swatch-checker-background': #{$color-swatch-checker-background},
40
+ 'color-swatch-checker-size': #{$color-swatch-checker-size},
41
+ )
42
+ );
43
+ }
44
+
45
+ @each $size,
46
+ $value
47
+ in (
48
+ 'small': $color-swatch-size-small,
49
+ 'medium': $color-swatch-size-medium,
50
+ 'large': $color-swatch-size-large
51
+ )
52
+ {
53
+ .#{iv.$class-prefix}color-swatch.#{iv.$class-prefix}is-#{$size} {
54
+ @include cv.register-vars(
55
+ (
56
+ 'color-swatch-size': #{$value},
57
+ )
58
+ );
59
+ }
60
+ }
61
+
62
+ .#{iv.$class-prefix}color-swatch {
63
+ display: inline-flex;
64
+ flex-shrink: 0;
65
+ align-items: center;
66
+ justify-content: center;
67
+ inline-size: cv.getVar('color-swatch-size');
68
+ block-size: cv.getVar('color-swatch-size');
69
+ border-radius: cv.getVar('color-swatch-radius');
70
+ vertical-align: middle;
71
+ // The color over the checkerboard: a tile of four squares, two of each.
72
+ background:
73
+ linear-gradient(var(--color-swatch-color), var(--color-swatch-color)),
74
+ repeating-conic-gradient(
75
+ cv.getVar('color-swatch-checker-color') 0% 25%,
76
+ cv.getVar('color-swatch-checker-background') 0% 50%
77
+ )
78
+ 0 0 / calc(#{cv.getVar('color-swatch-checker-size')} * 2)
79
+ calc(#{cv.getVar('color-swatch-checker-size')} * 2);
80
+ box-shadow: inset 0 0 0 1px cv.getVar('color-swatch-edge-color');
81
+ // A swatch is its color, so forced colors leaves it alone.
82
+ forced-color-adjust: none;
83
+ }
84
+
85
+ .#{iv.$class-prefix}color-swatch.#{iv.$class-prefix}is-rounded {
86
+ border-radius: cv.getVar('radius-rounded');
87
+ }
88
+
89
+ // What's drawn on the swatch, such as an icon, sits in its middle.
90
+ .#{iv.$class-prefix}color-swatch > span {
91
+ display: inline-flex;
92
+ line-height: 1;
93
+ }
94
+
95
+ @media (forced-colors: active) {
96
+ // Kept apart from the page by the system's text color.
97
+ .#{iv.$class-prefix}color-swatch {
98
+ box-shadow: inset 0 0 0 1px CanvasText;
99
+ }
100
+ }
@@ -2,6 +2,7 @@
2
2
  // Import all element partials here
3
3
 
4
4
  // Element Components
5
+ @use 'colorswatch';
5
6
  @use 'descriptionlist';
6
7
  @use 'kbd';
7
8
  @use 'linkbutton';
@@ -2,8 +2,10 @@
2
2
  // Custom-styled checkbox with colors, sizes, and visual states
3
3
  // Follows Bulma v1 CSS variable convention (see _dialog.scss)
4
4
 
5
+ @use "sass:list";
5
6
  @use "bulma/sass/utilities/initial-variables" as iv;
6
7
  @use "bulma/sass/utilities/css-variables" as cv;
8
+ @use "bulma/sass/utilities/derived-variables" as dv;
7
9
  @use "bulma/sass/utilities/mixins" as mx;
8
10
 
9
11
  // Bulma's horizontal field: `.field-label` takes one part of the row and
@@ -182,6 +184,57 @@ $-check-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'
182
184
  }
183
185
  }
184
186
 
187
+ // On Bulma's selected table row (`Tr isSelected`, or a cell with
188
+ // `is-selected`), the row's fill is the same color a checked box fills and
189
+ // borders with, so the box would vanish into it and leave its tick floating.
190
+ // There the box takes the row's text color, and its tick and dash the row's
191
+ // fill, so it reads as the row's text does. An unchecked box's border takes
192
+ // the text color too. This outranks the color variants on purpose: any color
193
+ // on that fill is a guess, and the row's own pair is the one Bulma made to
194
+ // read.
195
+ //
196
+ // Only a Checkbox placed straight in one of those cells sits on the row's
197
+ // fill, so the rule names each step down to it rather than any checkbox
198
+ // below the row. One inside a menu, a card or a table nested in the cell sits
199
+ // on that surface's own background, and keeps its own colors there.
200
+ //
201
+ // A cell with a color of its own (`Td color="white"`) paints its own
202
+ // background over the row's, and so does every cell of a row with a color
203
+ // (`Tr color="white" isSelected`), which hands its color to its cells. Both
204
+ // are left out, and a box there keeps its usual look. Bulma colors those cells with custom properties alone, which a
205
+ // selector can't read, so the cells are named by class, one for each color
206
+ // Bulma makes them from: its `$colors` map, which its table's
207
+ // `$table-colors` is built from, custom colors included. A selected cell is
208
+ // the row's fill whatever its color, as Bulma paints it.
209
+ $-colored-cells: ();
210
+ @each $name, $color in dv.$colors {
211
+ $-colored-cells: list.append(
212
+ $-colored-cells,
213
+ ".#{iv.$class-prefix}is-#{$name}",
214
+ $separator: comma
215
+ );
216
+ }
217
+
218
+ .#{iv.$class-prefix}table {
219
+ tr.#{iv.$class-prefix}is-selected:not(#{$-colored-cells})
220
+ > td:not(#{$-colored-cells}),
221
+ tr.#{iv.$class-prefix}is-selected:not(#{$-colored-cells})
222
+ > th:not(#{$-colored-cells}),
223
+ td.#{iv.$class-prefix}is-selected,
224
+ th.#{iv.$class-prefix}is-selected {
225
+ > .#{iv.$class-prefix}styled-checkbox {
226
+ @include cv.register-vars(
227
+ (
228
+ "checkbox-border-color": #{cv.getVar("table-row-active-color")},
229
+ "checkbox-active-color": #{cv.getVar("table-row-active-color")},
230
+ "checkbox-indeterminate-color": #{cv.getVar("table-row-active-color")},
231
+ "checkbox-check-color": #{cv.getVar("table-row-active-background-color")},
232
+ )
233
+ );
234
+ }
235
+ }
236
+ }
237
+
185
238
  // Size variants
186
239
  .#{iv.$class-prefix}styled-checkbox.#{iv.$class-prefix}is-small {
187
240
  font-size: cv.getVar("size-small");
@@ -0,0 +1,109 @@
1
+ // Bestax Extras - ColorInput Styles
2
+ // A text field for a color, with its swatch at the start and a launcher at
3
+ // the end, which opens a color picker in the pickers' popover. Bulma has no
4
+ // color field.
5
+ //
6
+ // The swatch and the launcher are real buttons laid over the input, the way
7
+ // the date pickers' launcher is, since Bulma's Control icons take no clicks.
8
+ // Both sit on the logical sides, so they swap places right to left. The panel
9
+ // is a `.color-picker`, styled by `_colorpicker.scss`, in a
10
+ // `.picker-popover`.
11
+
12
+ @use 'bulma/sass/utilities/initial-variables' as iv;
13
+ @use 'bulma/sass/utilities/css-variables' as cv;
14
+ @use '../mixins' as *;
15
+
16
+ // Each side's room, in em so it tracks the input's size, as Bulma's icon
17
+ // slots do.
18
+ $colorinput-side-width: 2.5em !default;
19
+ $colorinput-swatch-size: 1.25em !default;
20
+ $colorinput-trigger-color: cv.getVar('text') !default;
21
+ $colorinput-trigger-hover-color: cv.getVar('text-strong') !default;
22
+ $colorinput-disabled-opacity: 0.5 !default;
23
+
24
+ .#{iv.$class-prefix}colorinput {
25
+ @include cv.register-vars(
26
+ (
27
+ 'colorinput-side-width': #{$colorinput-side-width},
28
+ 'colorinput-swatch-size': #{$colorinput-swatch-size},
29
+ 'colorinput-trigger-color': #{$colorinput-trigger-color},
30
+ 'colorinput-trigger-hover-color': #{$colorinput-trigger-hover-color},
31
+ 'colorinput-disabled-opacity': #{$colorinput-disabled-opacity},
32
+ )
33
+ );
34
+ }
35
+
36
+ .#{iv.$class-prefix}colorinput {
37
+ position: relative;
38
+
39
+ // Room for the swatch, and for the launcher when it shows, so typed text
40
+ // doesn't slide under either. Bulma gives a rounded input its own side
41
+ // padding at two classes, so each rule here reaches it at three, which
42
+ // wins in whichever order the stylesheets load.
43
+ > .#{iv.$class-prefix}input,
44
+ > .#{iv.$class-prefix}input.#{iv.$class-prefix}is-rounded {
45
+ padding-inline-start: cv.getVar('colorinput-side-width');
46
+ }
47
+
48
+ &.#{iv.$class-prefix}has-trigger > .#{iv.$class-prefix}input {
49
+ padding-inline-end: cv.getVar('colorinput-side-width');
50
+ }
51
+
52
+ > .#{iv.$class-prefix}colorinput-swatch,
53
+ > .#{iv.$class-prefix}colorinput-trigger {
54
+ @include extras-button-reset;
55
+ position: absolute;
56
+ inset-block: 0;
57
+ z-index: 4;
58
+ display: inline-flex;
59
+ align-items: center;
60
+ justify-content: center;
61
+ inline-size: cv.getVar('colorinput-side-width');
62
+
63
+ &:disabled {
64
+ cursor: not-allowed;
65
+ opacity: cv.getVar('colorinput-disabled-opacity');
66
+ }
67
+ }
68
+
69
+ > .#{iv.$class-prefix}colorinput-swatch {
70
+ inset-inline-start: 0;
71
+
72
+ .#{iv.$class-prefix}color-swatch {
73
+ inline-size: cv.getVar('colorinput-swatch-size');
74
+ block-size: cv.getVar('colorinput-swatch-size');
75
+ }
76
+ }
77
+
78
+ > .#{iv.$class-prefix}colorinput-trigger {
79
+ inset-inline-end: 0;
80
+ color: cv.getVar('colorinput-trigger-color');
81
+
82
+ &:hover:not(:disabled) {
83
+ color: cv.getVar('colorinput-trigger-hover-color');
84
+ }
85
+
86
+ &:focus-visible {
87
+ @include extras-focus-outline;
88
+ }
89
+
90
+ .#{iv.$class-prefix}icon {
91
+ pointer-events: none;
92
+ }
93
+ }
94
+
95
+ // The sides track the input's size, as Bulma's icons do.
96
+ @each $size in 'small', 'medium', 'large' {
97
+ > .#{iv.$class-prefix}input.#{iv.$class-prefix}is-#{$size}
98
+ ~ .#{iv.$class-prefix}colorinput-swatch,
99
+ > .#{iv.$class-prefix}input.#{iv.$class-prefix}is-#{$size}
100
+ ~ .#{iv.$class-prefix}colorinput-trigger {
101
+ font-size: cv.getVar('size-#{$size}');
102
+ }
103
+ }
104
+ }
105
+
106
+ // The eye dropper sits at the end of the panel.
107
+ .#{iv.$class-prefix}colorinput-eyedropper {
108
+ align-self: flex-end;
109
+ }