@allxsmith/bestax-bulma 5.65.1 → 5.66.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/dist/bestax.css +1 -1
- package/dist/bestax.css.map +1 -1
- package/dist/esm/components/Card.js +6 -6
- package/dist/esm/components/Card.js.map +1 -1
- package/dist/esm/components/Carousel.js +19 -7
- package/dist/esm/components/Carousel.js.map +1 -1
- package/dist/esm/components/Message.js +1 -1
- package/dist/esm/components/Message.js.map +1 -1
- package/dist/esm/components/Modal.js +1 -1
- package/dist/esm/components/Modal.js.map +1 -1
- package/dist/esm/components/Navbar.js +1 -1
- package/dist/esm/components/Navbar.js.map +1 -1
- package/dist/esm/components/Popover.js +4 -1
- package/dist/esm/components/Popover.js.map +1 -1
- package/dist/esm/components/SegmentedControl.js +4 -4
- package/dist/esm/components/SegmentedControl.js.map +1 -1
- package/dist/esm/components/Sidebar.js +1 -1
- package/dist/esm/components/Sidebar.js.map +1 -1
- package/dist/esm/elements/Figure.js +1 -1
- package/dist/esm/elements/Figure.js.map +1 -1
- package/dist/esm/form/ColorInputBase.js +1 -1
- package/dist/esm/form/ColorInputBase.js.map +1 -1
- package/dist/esm/form/DateInput.js +4 -1
- package/dist/esm/form/DateInput.js.map +1 -1
- package/dist/esm/form/DateInputBase.js +1 -1
- package/dist/esm/form/DateInputBase.js.map +1 -1
- package/dist/esm/form/DateRangeInput.js +4 -1
- package/dist/esm/form/DateRangeInput.js.map +1 -1
- package/dist/esm/form/DateRangeInputBase.js +1 -1
- package/dist/esm/form/DateRangeInputBase.js.map +1 -1
- package/dist/esm/form/DateTimeInput.js +4 -1
- package/dist/esm/form/DateTimeInput.js.map +1 -1
- package/dist/esm/form/DateTimeInputBase.js +1 -1
- package/dist/esm/form/DateTimeInputBase.js.map +1 -1
- package/dist/esm/form/Slider.js +19 -9
- package/dist/esm/form/Slider.js.map +1 -1
- package/dist/esm/form/TimeInput.js +4 -1
- package/dist/esm/form/TimeInput.js.map +1 -1
- package/dist/esm/form/TimeInputBase.js +1 -1
- package/dist/esm/form/TimeInputBase.js.map +1 -1
- package/dist/esm/form/TreeSelect.js.map +1 -1
- package/dist/esm/form/_pickerInternals/PickerPopover.js +4 -1
- package/dist/esm/form/_pickerInternals/PickerPopover.js.map +1 -1
- package/dist/esm/form/_pickerInternals/TimeWheels.js +1 -1
- package/dist/esm/form/_pickerInternals/TimeWheels.js.map +1 -1
- package/dist/esm/form/_pickerInternals/useLocaleDefaults.js +15 -1
- package/dist/esm/form/_pickerInternals/useLocaleDefaults.js.map +1 -1
- package/dist/esm/form/_selectInternals/DialogSelect.js +1 -1
- package/dist/esm/form/_selectInternals/DialogSelect.js.map +1 -1
- package/dist/esm/helpers/useAnchoredPosition.js +11 -3
- package/dist/esm/helpers/useAnchoredPosition.js.map +1 -1
- package/dist/extras.css +1 -1
- package/dist/extras.css.map +1 -1
- package/dist/index.cjs +123 -41
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +6 -6
- package/dist/types/components/Card.d.ts +52 -0
- package/dist/types/components/Carousel.d.ts +12 -3
- package/dist/types/components/Message.d.ts +16 -0
- package/dist/types/components/Modal.d.ts +71 -0
- package/dist/types/components/Navbar.d.ts +11 -1
- package/dist/types/components/Popover.d.ts +5 -1
- package/dist/types/components/SegmentedControl.d.ts +9 -0
- package/dist/types/components/Sidebar.d.ts +45 -5
- package/dist/types/elements/Figure.d.ts +11 -0
- package/dist/types/form/ColorInputBase.d.ts +7 -1
- package/dist/types/form/DateInputBase.d.ts +7 -1
- package/dist/types/form/DateRangeInputBase.d.ts +7 -1
- package/dist/types/form/DateTimeInputBase.d.ts +7 -1
- package/dist/types/form/TimeInputBase.d.ts +7 -1
- package/dist/types/form/TreeSelect.d.ts +4 -1
- package/dist/types/form/_pickerInternals/PickerPopover.d.ts +5 -0
- package/dist/types/form/_pickerInternals/useLocaleDefaults.d.ts +12 -0
- package/dist/types/form/_selectInternals/DialogSelect.d.ts +1 -0
- package/dist/types/helpers/useAnchoredPosition.d.ts +9 -2
- package/dist/types-cjs/components/Card.d.ts +52 -0
- package/dist/types-cjs/components/Carousel.d.ts +12 -3
- package/dist/types-cjs/components/Message.d.ts +16 -0
- package/dist/types-cjs/components/Modal.d.ts +71 -0
- package/dist/types-cjs/components/Navbar.d.ts +11 -1
- package/dist/types-cjs/components/Popover.d.ts +5 -1
- package/dist/types-cjs/components/SegmentedControl.d.ts +9 -0
- package/dist/types-cjs/components/Sidebar.d.ts +45 -5
- package/dist/types-cjs/elements/Figure.d.ts +11 -0
- package/dist/types-cjs/form/ColorInputBase.d.ts +7 -1
- package/dist/types-cjs/form/DateInputBase.d.ts +7 -1
- package/dist/types-cjs/form/DateRangeInputBase.d.ts +7 -1
- package/dist/types-cjs/form/DateTimeInputBase.d.ts +7 -1
- package/dist/types-cjs/form/TimeInputBase.d.ts +7 -1
- package/dist/types-cjs/form/TreeSelect.d.ts +4 -1
- package/dist/types-cjs/form/_pickerInternals/PickerPopover.d.ts +5 -0
- package/dist/types-cjs/form/_pickerInternals/useLocaleDefaults.d.ts +12 -0
- package/dist/types-cjs/form/_selectInternals/DialogSelect.d.ts +1 -0
- package/dist/types-cjs/helpers/useAnchoredPosition.d.ts +9 -2
- 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/_input-trigger.scss +24 -5
- package/src/scss/components/_carousel.scss +22 -4
- package/src/scss/components/_pagination.scss +31 -2
- package/src/scss/components/_popover.scss +11 -0
- package/src/scss/components/_tooltip.scss +19 -0
- package/src/scss/elements/_button.scss +27 -3
- package/src/scss/form/_dateinput.scss +6 -0
- package/src/scss/form/_passwordinput.scss +6 -5
- package/src/scss/form/_picker-popover.scss +45 -5
- package/src/scss/form/_slider.scss +39 -0
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
@use 'bulma/sass/utilities/css-variables' as cv;
|
|
9
9
|
@use 'mixins' as *;
|
|
10
10
|
|
|
11
|
-
// A button over the input
|
|
11
|
+
// A button over one edge of the input, in Bulma's 2.5em icon slot. Bulma's
|
|
12
12
|
// Control icons are decorative (`pointer-events: none`), so a button there
|
|
13
13
|
// needs rules of its own. Include it on the element that holds the input and
|
|
14
14
|
// the button, which it positions. A content block, when given, lands in that
|
|
@@ -22,25 +22,44 @@
|
|
|
22
22
|
// every value a theme can change is a registered variable. The color change
|
|
23
23
|
// on hover takes Bulma's duration and easing through `extras-transition`. The
|
|
24
24
|
// button takes the input's `is-small`, `is-medium` or `is-large` font size,
|
|
25
|
-
// so its em-based width tracks the input's.
|
|
25
|
+
// so its em-based width tracks the input's. `$logical` puts the slot on the
|
|
26
|
+
// inline end (the pickers). Left out, it stays on the physical right
|
|
27
|
+
// (PasswordInput).
|
|
26
28
|
@mixin extras-input-trigger(
|
|
27
29
|
$trigger,
|
|
28
30
|
$width,
|
|
29
31
|
$color,
|
|
30
32
|
$hover-color,
|
|
31
|
-
$disabled-opacity
|
|
33
|
+
$disabled-opacity,
|
|
34
|
+
$logical: false
|
|
32
35
|
) {
|
|
33
36
|
position: relative;
|
|
34
37
|
@content;
|
|
35
38
|
|
|
36
39
|
> .#{iv.$class-prefix}input {
|
|
37
|
-
|
|
40
|
+
@if $logical {
|
|
41
|
+
padding-inline-end: $width;
|
|
42
|
+
} @else {
|
|
43
|
+
padding-right: $width;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// Bulma's `.input.is-rounded` sets its own side padding at two classes,
|
|
48
|
+
// which ties the rule above. At three this wins whichever sheet loads first.
|
|
49
|
+
@if $logical {
|
|
50
|
+
> .#{iv.$class-prefix}input.#{iv.$class-prefix}is-rounded {
|
|
51
|
+
padding-inline-end: $width;
|
|
52
|
+
}
|
|
38
53
|
}
|
|
39
54
|
|
|
40
55
|
> .#{iv.$class-prefix}#{$trigger} {
|
|
41
56
|
position: absolute;
|
|
42
57
|
top: 0;
|
|
43
|
-
|
|
58
|
+
@if $logical {
|
|
59
|
+
inset-inline-end: 0;
|
|
60
|
+
} @else {
|
|
61
|
+
right: 0;
|
|
62
|
+
}
|
|
44
63
|
z-index: 4;
|
|
45
64
|
height: 100%;
|
|
46
65
|
width: $width;
|
|
@@ -220,6 +220,16 @@ $carousel-indicator-line-radius: cv.getVar("radius-small") !default;
|
|
|
220
220
|
gap: cv.getVar("carousel-item-gap");
|
|
221
221
|
width: 100%;
|
|
222
222
|
will-change: transform;
|
|
223
|
+
// The flex row reverses right to left, so the inline transform's
|
|
224
|
+
// negative shift would park every slide off the inline start. The
|
|
225
|
+
// transform multiplies by this: -1 left to right, +1 right to left. Set
|
|
226
|
+
// on every track, since a custom property inherits and a left-to-right
|
|
227
|
+
// carousel inside a right-to-left one would otherwise take its `1`.
|
|
228
|
+
--carousel-shift-sign: -1;
|
|
229
|
+
|
|
230
|
+
&:dir(rtl) {
|
|
231
|
+
--carousel-shift-sign: 1;
|
|
232
|
+
}
|
|
223
233
|
}
|
|
224
234
|
|
|
225
235
|
// Individual slide: an equal share of the track, less the gaps between
|
|
@@ -327,11 +337,19 @@ $carousel-indicator-line-radius: cv.getVar("radius-small") !default;
|
|
|
327
337
|
}
|
|
328
338
|
|
|
329
339
|
&.#{iv.$class-prefix}is-prev {
|
|
330
|
-
|
|
340
|
+
inset-inline-start: cv.getVar("carousel-arrow-offset");
|
|
331
341
|
}
|
|
332
342
|
|
|
333
343
|
&.#{iv.$class-prefix}is-next {
|
|
334
|
-
|
|
344
|
+
inset-inline-end: cv.getVar("carousel-arrow-offset");
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
// Previous sits on the inline start, so its chevron points that way.
|
|
348
|
+
// Only the built-in chevron, the button's own svg: an `iconPrev` or
|
|
349
|
+
// `iconNext` is the caller's to point, and an svg inside its `.icon`, as
|
|
350
|
+
// Font Awesome's SVG mode renders, would flip twice under a broader rule.
|
|
351
|
+
> svg:dir(rtl) {
|
|
352
|
+
transform: scaleX(-1);
|
|
335
353
|
}
|
|
336
354
|
|
|
337
355
|
// Transparent variant (no background)
|
|
@@ -626,11 +644,11 @@ $carousel-indicator-line-radius: cv.getVar("radius-small") !default;
|
|
|
626
644
|
}
|
|
627
645
|
|
|
628
646
|
&.#{iv.$class-prefix}is-prev {
|
|
629
|
-
|
|
647
|
+
inset-inline-start: cv.getVar("carousel-arrow-offset-mobile");
|
|
630
648
|
}
|
|
631
649
|
|
|
632
650
|
&.#{iv.$class-prefix}is-next {
|
|
633
|
-
|
|
651
|
+
inset-inline-end: cv.getVar("carousel-arrow-offset-mobile");
|
|
634
652
|
}
|
|
635
653
|
}
|
|
636
654
|
|
|
@@ -4,15 +4,23 @@
|
|
|
4
4
|
// replaces all three with the system's, so the current page looks like every
|
|
5
5
|
// other page there. This draws it in Highlight and HighlightText, the pair the
|
|
6
6
|
// system keeps for a selection, the way the themed Checkbox marks a checked
|
|
7
|
-
// box. `forced-color-adjust: none` keeps them. Outside forced colors
|
|
8
|
-
//
|
|
7
|
+
// box. `forced-color-adjust: none` keeps them. Outside forced colors those
|
|
8
|
+
// colors change nothing.
|
|
9
9
|
//
|
|
10
10
|
// It reads the classes Bulma highlights, `is-current` and its other name
|
|
11
11
|
// `is-selected`, so a hand-written current link gets it too, and so does
|
|
12
12
|
// `DataTable`'s pager, which is a `Pagination`. Two classes outrank Bulma's
|
|
13
13
|
// colors for a link, wherever the two stylesheets load.
|
|
14
|
+
//
|
|
15
|
+
// Bulma's control mixin also sets `outline: none` on `:focus-visible`, which
|
|
16
|
+
// outranks Bulma's own link ring, so a keyboard user sees only the hover
|
|
17
|
+
// shade. The rules below bring that outline back. The `.pagination` ancestor
|
|
18
|
+
// outranks the mixin's `outline: none` whichever stylesheet loads first.
|
|
19
|
+
// `:focus-visible` keeps the ring off a mouse click, and an item without
|
|
20
|
+
// keyboard focus looks as it does now.
|
|
14
21
|
|
|
15
22
|
@use 'bulma/sass/utilities/initial-variables' as iv;
|
|
23
|
+
@use 'bulma/sass/utilities/css-variables' as cv;
|
|
16
24
|
|
|
17
25
|
@media (forced-colors: active) {
|
|
18
26
|
.#{iv.$class-prefix}pagination-link.#{iv.$class-prefix}is-current,
|
|
@@ -23,3 +31,24 @@
|
|
|
23
31
|
color: HighlightText;
|
|
24
32
|
}
|
|
25
33
|
}
|
|
34
|
+
|
|
35
|
+
.#{iv.$class-prefix}pagination .#{iv.$class-prefix}pagination-previous:focus-visible,
|
|
36
|
+
.#{iv.$class-prefix}pagination .#{iv.$class-prefix}pagination-next:focus-visible,
|
|
37
|
+
.#{iv.$class-prefix}pagination .#{iv.$class-prefix}pagination-link:focus-visible {
|
|
38
|
+
outline-color: hsl(
|
|
39
|
+
cv.getVar('focus-h'),
|
|
40
|
+
cv.getVar('focus-s'),
|
|
41
|
+
cv.getVar('focus-l')
|
|
42
|
+
);
|
|
43
|
+
outline-style: cv.getVar('focus-style');
|
|
44
|
+
outline-width: cv.getVar('focus-width');
|
|
45
|
+
outline-offset: cv.getVar('focus-offset');
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// The current page is filled with the link color, which the focus color
|
|
49
|
+
// matches by default, so its ring takes the page's text color, inside the fill.
|
|
50
|
+
.#{iv.$class-prefix}pagination .#{iv.$class-prefix}pagination-link.#{iv.$class-prefix}is-current:focus-visible,
|
|
51
|
+
.#{iv.$class-prefix}pagination .#{iv.$class-prefix}pagination-link.#{iv.$class-prefix}is-selected:focus-visible {
|
|
52
|
+
outline-color: currentColor;
|
|
53
|
+
outline-offset: calc(-2 * #{cv.getVar('focus-width')});
|
|
54
|
+
}
|
|
@@ -91,6 +91,17 @@ $popover-animation-duration: 0.15s !default;
|
|
|
91
91
|
&.#{iv.$class-prefix}is-top-right {
|
|
92
92
|
right: 0;
|
|
93
93
|
}
|
|
94
|
+
// With no `position`, the panel lines up with the trigger's inline start,
|
|
95
|
+
// so a trigger at the start of a right-to-left line doesn't push it off the
|
|
96
|
+
// screen. A corner the caller names stays physical. Portaled, the
|
|
97
|
+
// component sets the edge inline instead. `:where()` keeps this at the
|
|
98
|
+
// corner rules' weight, so a theme's own placement still wins.
|
|
99
|
+
&.#{iv.$class-prefix}is-start-aligned:where(
|
|
100
|
+
:not(.#{iv.$class-prefix}is-portal):dir(rtl)
|
|
101
|
+
) {
|
|
102
|
+
left: auto;
|
|
103
|
+
right: 0;
|
|
104
|
+
}
|
|
94
105
|
|
|
95
106
|
// Portaled: fixed to the viewport at the trigger's edge, which the
|
|
96
107
|
// component sets inline, so only the gap comes from here.
|
|
@@ -323,3 +323,22 @@ $tooltip-large-arrow-size: 7px !default;
|
|
|
323
323
|
)
|
|
324
324
|
);
|
|
325
325
|
}
|
|
326
|
+
|
|
327
|
+
// Forced colors turns the box's background into the page's and paints every
|
|
328
|
+
// side of the arrow. An outline, not a border, so the tooltip doesn't grow.
|
|
329
|
+
// Only the arrow opts out, so its transparent sides stay transparent and the
|
|
330
|
+
// side that points takes the system's text color.
|
|
331
|
+
@media (forced-colors: active) {
|
|
332
|
+
.#{iv.$class-prefix}tooltip-content {
|
|
333
|
+
outline: 1px solid CanvasText;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
.#{iv.$class-prefix}tooltip-content::before {
|
|
337
|
+
forced-color-adjust: none;
|
|
338
|
+
@include cv.register-vars(
|
|
339
|
+
(
|
|
340
|
+
"tooltip-background": CanvasText,
|
|
341
|
+
)
|
|
342
|
+
);
|
|
343
|
+
}
|
|
344
|
+
}
|
|
@@ -17,13 +17,29 @@
|
|
|
17
17
|
// The ghost rule doesn't ask for LinkButton's class, since a ghost Button has
|
|
18
18
|
// none.
|
|
19
19
|
//
|
|
20
|
+
// Forced colors also replaces a colored button's fill, and Bulma sets its
|
|
21
|
+
// border width to 0, so in Chromium the button has no edge and an icon-only
|
|
22
|
+
// one shows only its glyph. The last rule gives those buttons back a 1px
|
|
23
|
+
// border there. An outlined button keeps the width it sets, and Bulma
|
|
24
|
+
// subtracts the width from the padding, so the size stays the same. Bulma
|
|
25
|
+
// gives a colored button that same border only while it's focused, so with
|
|
26
|
+
// one at rest the outline above is what shows focus.
|
|
27
|
+
//
|
|
28
|
+
// Bulma's colors include `text`, but `.button.is-text` is a text button, as
|
|
29
|
+
// `Button color="text"` and LinkButton's text and underline variants render
|
|
30
|
+
// it. It has no fill to lose, and a border at rest would draw a box around a
|
|
31
|
+
// link, so the loop leaves it out.
|
|
32
|
+
//
|
|
20
33
|
// Bulma's CSS can land on either side of this partial, as `_loader.scss`
|
|
21
|
-
// says, so each selector outranks
|
|
22
|
-
//
|
|
23
|
-
//
|
|
34
|
+
// says, so each selector outranks Bulma's rule by its classes: the ghost rule
|
|
35
|
+
// has three to the mixin's two, the forced colors outline names `.button`
|
|
36
|
+
// twice, as `_delete.scss` does, and the border names the color class twice
|
|
37
|
+
// to outrank Bulma's `.button.is-<color>`.
|
|
24
38
|
|
|
39
|
+
@use 'sass:map';
|
|
25
40
|
@use 'bulma/sass/utilities/initial-variables' as iv;
|
|
26
41
|
@use 'bulma/sass/utilities/css-variables' as cv;
|
|
42
|
+
@use 'bulma/sass/utilities/derived-variables' as dv;
|
|
27
43
|
|
|
28
44
|
@mixin -focus-outline {
|
|
29
45
|
outline-color: hsl(
|
|
@@ -46,4 +62,12 @@
|
|
|
46
62
|
.#{iv.$class-prefix}button.#{iv.$class-prefix}button:not(.#{iv.$class-prefix}is-loading).#{iv.$class-prefix}is-focused {
|
|
47
63
|
@include -focus-outline;
|
|
48
64
|
}
|
|
65
|
+
|
|
66
|
+
@each $name in map.keys(map.remove(dv.$colors, 'text')) {
|
|
67
|
+
.#{iv.$class-prefix}button.#{iv.$class-prefix}is-#{$name}.#{iv.$class-prefix}is-#{$name}:not(
|
|
68
|
+
.#{iv.$class-prefix}is-outlined
|
|
69
|
+
) {
|
|
70
|
+
@include cv.register-var('button-border-width', 1px);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
49
73
|
}
|
|
@@ -154,6 +154,12 @@ $dateinput-cell-range-preview-bg: color-mix(
|
|
|
154
154
|
opacity: 0.4;
|
|
155
155
|
cursor: not-allowed;
|
|
156
156
|
}
|
|
157
|
+
|
|
158
|
+
// The row reverses right to left, so the glyph has to as well: previous
|
|
159
|
+
// month points at the inline start.
|
|
160
|
+
svg:dir(rtl) {
|
|
161
|
+
transform: scaleX(-1);
|
|
162
|
+
}
|
|
157
163
|
}
|
|
158
164
|
|
|
159
165
|
// The day names and each week of the grid lay out in seven columns. The
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
// input's right edge, with the date pickers' launcher rule, which the two
|
|
5
5
|
// share through the `extras-input-trigger` mixin.
|
|
6
6
|
//
|
|
7
|
-
// The toggle sits on the physical right, as
|
|
8
|
-
// right
|
|
9
|
-
//
|
|
10
|
-
//
|
|
7
|
+
// The toggle sits on the physical right, as Bulma's right icon does, so in a
|
|
8
|
+
// right-to-left page it's at the start of the field rather than its end. The
|
|
9
|
+
// date pickers' launcher used to share that side and now sits on the inline
|
|
10
|
+
// end; this one stays physical.
|
|
11
11
|
|
|
12
12
|
@use 'bulma/sass/utilities/initial-variables' as iv;
|
|
13
13
|
@use 'bulma/sass/utilities/css-variables' as cv;
|
|
@@ -30,7 +30,8 @@ $password-input-toggle-disabled-opacity: 0.5 !default;
|
|
|
30
30
|
'password-input-toggle-text-width': #{$password-input-toggle-text-width},
|
|
31
31
|
'password-input-toggle-color': #{$password-input-toggle-color},
|
|
32
32
|
'password-input-toggle-hover-color': #{$password-input-toggle-hover-color},
|
|
33
|
-
'password-input-toggle-disabled-opacity':
|
|
33
|
+
'password-input-toggle-disabled-opacity':
|
|
34
|
+
#{$password-input-toggle-disabled-opacity},
|
|
34
35
|
)
|
|
35
36
|
);
|
|
36
37
|
}
|
|
@@ -64,6 +64,18 @@ $picker-trigger-disabled-opacity: 0.5 !default;
|
|
|
64
64
|
right: 0;
|
|
65
65
|
margin-bottom: cv.getVar('picker-popover-offset');
|
|
66
66
|
}
|
|
67
|
+
// With no `position`, the panel lines up with the field's inline start, so
|
|
68
|
+
// a field at the start of a right-to-left line doesn't push it off the
|
|
69
|
+
// screen. A corner the caller names stays physical. Portaled, the picker
|
|
70
|
+
// sets the edge inline instead. `:where()` keeps this at the corner rules'
|
|
71
|
+
// weight, so a rule that moves the panel elsewhere, as TimeInput's
|
|
72
|
+
// narrow-screen sheet does, still wins.
|
|
73
|
+
&.#{iv.$class-prefix}is-start-aligned:where(
|
|
74
|
+
:not(.#{iv.$class-prefix}is-portal):dir(rtl)
|
|
75
|
+
) {
|
|
76
|
+
left: auto;
|
|
77
|
+
right: 0;
|
|
78
|
+
}
|
|
67
79
|
// At least as wide as the anchor it's placed against, as a list under a
|
|
68
80
|
// field is. Portaled, the anchor's width comes inline instead, since 100%
|
|
69
81
|
// there would be the viewport's.
|
|
@@ -134,12 +146,14 @@ $picker-containers: (
|
|
|
134
146
|
}
|
|
135
147
|
}
|
|
136
148
|
|
|
137
|
-
//
|
|
138
|
-
// inside their *-container (Bulma's Control icons are decorative —
|
|
149
|
+
// Launcher button on the inline end. The picker bases render this real
|
|
150
|
+
// <button> inside their *-container (Bulma's Control icons are decorative —
|
|
139
151
|
// `pointer-events: none` — so they can't open the popover). It toggles the
|
|
140
152
|
// popover and is keyboard-focusable. Its rules are the `extras-input-trigger`
|
|
141
|
-
// mixin's, which PasswordInput's toggle shares
|
|
142
|
-
//
|
|
153
|
+
// mixin's, which PasswordInput's toggle shares except the side: the toggle
|
|
154
|
+
// stays on the physical right, and this slot follows the writing direction.
|
|
155
|
+
// Bulma's 2.5em width tracks the input's size modifier through the sibling
|
|
156
|
+
// selector. Left to right the end is the right, as before.
|
|
143
157
|
$picker-trigger-pairs: (
|
|
144
158
|
('dateinput-container' 'dateinput-trigger'),
|
|
145
159
|
('timeinput-container' 'timeinput-trigger'),
|
|
@@ -153,7 +167,8 @@ $picker-trigger-pairs: (
|
|
|
153
167
|
$width: cv.getVar('picker-trigger-width'),
|
|
154
168
|
$color: cv.getVar('picker-trigger-color'),
|
|
155
169
|
$hover-color: cv.getVar('picker-trigger-hover-color'),
|
|
156
|
-
$disabled-opacity: cv.getVar('picker-trigger-disabled-opacity')
|
|
170
|
+
$disabled-opacity: cv.getVar('picker-trigger-disabled-opacity'),
|
|
171
|
+
$logical: true
|
|
157
172
|
) {
|
|
158
173
|
@include cv.register-vars(
|
|
159
174
|
(
|
|
@@ -166,3 +181,28 @@ $picker-trigger-pairs: (
|
|
|
166
181
|
}
|
|
167
182
|
}
|
|
168
183
|
}
|
|
184
|
+
|
|
185
|
+
// The calendar or clock icon is Bulma's `has-icons-left`, pinned to the
|
|
186
|
+
// physical left with `padding-left`. Moving only the launcher onto the inline
|
|
187
|
+
// end would stack it on that icon right to left, so the icon goes to the
|
|
188
|
+
// inline start with it. Only these containers: a plain Control's icons stay
|
|
189
|
+
// physical. The zeros lose to the logical properties after them, which are
|
|
190
|
+
// the sides Bulma's physical padding was setting left to right.
|
|
191
|
+
@each $container in $picker-containers {
|
|
192
|
+
.#{iv.$class-prefix}control.#{iv.$class-prefix}has-icons-left
|
|
193
|
+
> .#{$container}
|
|
194
|
+
> .#{iv.$class-prefix}input {
|
|
195
|
+
padding-left: 0;
|
|
196
|
+
padding-right: 0;
|
|
197
|
+
padding-inline-start: cv.getVar('input-height');
|
|
198
|
+
padding-inline-end: cv.getVar('picker-trigger-width');
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.#{iv.$class-prefix}control.#{iv.$class-prefix}has-icons-left
|
|
202
|
+
> .#{$container}
|
|
203
|
+
~ .#{iv.$class-prefix}icon.#{iv.$class-prefix}is-left {
|
|
204
|
+
left: auto;
|
|
205
|
+
right: auto;
|
|
206
|
+
inset-inline-start: 0;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
@@ -92,6 +92,17 @@ $slider-vertical-height: 200px !default;
|
|
|
92
92
|
cv.getVar("slider-track-color") var(--slider-progress, 0%),
|
|
93
93
|
cv.getVar("slider-track-color") 100%
|
|
94
94
|
);
|
|
95
|
+
// The native range mirrors, so 0% of this gradient is the inline start
|
|
96
|
+
// (the right), where the minimum sits. `to right` would paint the left.
|
|
97
|
+
&:dir(rtl) {
|
|
98
|
+
background: linear-gradient(
|
|
99
|
+
to left,
|
|
100
|
+
cv.getVar("slider-fill-color") 0%,
|
|
101
|
+
cv.getVar("slider-fill-color") var(--slider-progress, 0%),
|
|
102
|
+
cv.getVar("slider-track-color") var(--slider-progress, 0%),
|
|
103
|
+
cv.getVar("slider-track-color") 100%
|
|
104
|
+
);
|
|
105
|
+
}
|
|
95
106
|
border-radius: cv.getVar("slider-radius");
|
|
96
107
|
outline: none;
|
|
97
108
|
cursor: pointer;
|
|
@@ -198,6 +209,11 @@ $slider-vertical-height: 200px !default;
|
|
|
198
209
|
top: -2rem;
|
|
199
210
|
// Default transform; overridden by inline style when nudge is applied
|
|
200
211
|
transform: translateX(-50%);
|
|
212
|
+
// The inline transform centres a horizontal bubble on the thumb by this.
|
|
213
|
+
// It's placed from the inline start, which is its right edge right to
|
|
214
|
+
// left, so there it shifts the other way. Set on every bubble, so none
|
|
215
|
+
// takes another slider's.
|
|
216
|
+
--slider-output-shift: -50%;
|
|
201
217
|
padding: 0.25rem 0.5rem;
|
|
202
218
|
font-size: cv.getVar("slider-output-font-size");
|
|
203
219
|
font-weight: cv.getVar("slider-output-font-weight");
|
|
@@ -212,6 +228,10 @@ $slider-vertical-height: 200px !default;
|
|
|
212
228
|
transition-duration: cv.getVar("slider-transition-duration");
|
|
213
229
|
transition-timing-function: ease;
|
|
214
230
|
|
|
231
|
+
&:dir(rtl) {
|
|
232
|
+
--slider-output-shift: 50%;
|
|
233
|
+
}
|
|
234
|
+
|
|
215
235
|
&::after {
|
|
216
236
|
content: "";
|
|
217
237
|
position: absolute;
|
|
@@ -268,6 +288,12 @@ $slider-vertical-height: 200px !default;
|
|
|
268
288
|
.#{iv.$class-prefix}slider-tick {
|
|
269
289
|
position: absolute;
|
|
270
290
|
transform: translateX(-50%);
|
|
291
|
+
|
|
292
|
+
// The inline start edge is the right one right to left, so centering
|
|
293
|
+
// shifts the other way. A vertical tick replaces this transform.
|
|
294
|
+
&:dir(rtl) {
|
|
295
|
+
transform: translateX(50%);
|
|
296
|
+
}
|
|
271
297
|
width: cv.getVar("slider-tick-width");
|
|
272
298
|
height: cv.getVar("slider-tick-height");
|
|
273
299
|
background: cv.getVar("slider-tick-color");
|
|
@@ -318,6 +344,19 @@ $slider-vertical-height: 200px !default;
|
|
|
318
344
|
cv.getVar("slider-track-color") var(--slider-progress-high, 100%),
|
|
319
345
|
cv.getVar("slider-track-color") 100%
|
|
320
346
|
);
|
|
347
|
+
// Same mirror as the single thumb: the stops are measured from the
|
|
348
|
+
// inline start, which is the right when the page is.
|
|
349
|
+
&:dir(rtl) {
|
|
350
|
+
background: linear-gradient(
|
|
351
|
+
to left,
|
|
352
|
+
cv.getVar("slider-track-color") 0%,
|
|
353
|
+
cv.getVar("slider-track-color") var(--slider-progress-low, 0%),
|
|
354
|
+
cv.getVar("slider-fill-color") var(--slider-progress-low, 0%),
|
|
355
|
+
cv.getVar("slider-fill-color") var(--slider-progress-high, 100%),
|
|
356
|
+
cv.getVar("slider-track-color") var(--slider-progress-high, 100%),
|
|
357
|
+
cv.getVar("slider-track-color") 100%
|
|
358
|
+
);
|
|
359
|
+
}
|
|
321
360
|
pointer-events: none;
|
|
322
361
|
}
|
|
323
362
|
|