@fluixi-ui/tokens 0.4.0-alpha.0 → 0.4.0-alpha.10
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/css/accordion.css +81 -3
- package/dist/css/alert.css +52 -23
- package/dist/css/avatar.css +19 -0
- package/dist/css/badge.css +129 -5
- package/dist/css/base.css +3 -1
- package/dist/css/bottom-sheet.css +19 -9
- package/dist/css/breadcrumb.css +1 -1
- package/dist/css/bulk-editor.css +2 -17
- package/dist/css/button.css +76 -16
- package/dist/css/calendar.css +9 -7
- package/dist/css/card.css +5 -1
- package/dist/css/carousel.css +80 -0
- package/dist/css/checkbox-radio.css +55 -1
- package/dist/css/date-field.css +1 -1
- package/dist/css/date-picker.css +2 -2
- package/dist/css/descriptions.css +29 -0
- package/dist/css/drawer.css +6 -4
- package/dist/css/empty.css +40 -0
- package/dist/css/fab.css +48 -0
- package/dist/css/field-variants.css +139 -0
- package/dist/css/file-upload.css +40 -0
- package/dist/css/glow.css +127 -0
- package/dist/css/icon-button.css +42 -0
- package/dist/css/image.css +67 -0
- package/dist/css/input.css +15 -0
- package/dist/css/layout.css +10 -0
- package/dist/css/navigation-menu.css +8 -7
- package/dist/css/number-field.css +3 -3
- package/dist/css/pagination.css +3 -3
- package/dist/css/parts/listbox.css +9 -4
- package/dist/css/pin-input.css +40 -0
- package/dist/css/progress.css +56 -0
- package/dist/css/rating.css +59 -0
- package/dist/css/scroll-area.css +44 -0
- package/dist/css/select-combobox.css +19 -4
- package/dist/css/sidenav.css +180 -10
- package/dist/css/slider.css +4 -4
- package/dist/css/speed-dial.css +85 -0
- package/dist/css/statistic.css +34 -0
- package/dist/css/stepper.css +3 -3
- package/dist/css/surface.css +71 -0
- package/dist/css/switch.css +12 -0
- package/dist/css/table.css +11 -0
- package/dist/css/tabs.css +10 -1
- package/dist/css/tags-input.css +91 -0
- package/dist/css/timeline.css +59 -0
- package/dist/css/toggle.css +6 -0
- package/dist/css/tree-view.css +70 -0
- package/dist/lib/css/index.d.ts +8 -12
- package/dist/lib/css/index.d.ts.map +1 -1
- package/dist/lib/css/index.js +19 -7
- package/dist/lib/reference/colors.d.ts.map +1 -1
- package/dist/lib/reference/colors.js +15 -1
- package/dist/preset.css +20 -1
- package/dist/tokens.css +627 -0
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/package.json +6 -3
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
@layer flx.components {
|
|
2
|
+
/* ----------------------------------------------------------------------------
|
|
3
|
+
* Icon button — a square [data-variant] button. Colours / states / ripple come
|
|
4
|
+
* from the button slice + the active skin; this only makes it square and shapes
|
|
5
|
+
* the corners.
|
|
6
|
+
* ------------------------------------------------------------------------- */
|
|
7
|
+
:where([data-icon-button]) {
|
|
8
|
+
width: var(--flx-ui-size-md);
|
|
9
|
+
padding: 0;
|
|
10
|
+
min-width: 0;
|
|
11
|
+
flex: none;
|
|
12
|
+
}
|
|
13
|
+
:where([data-icon-button][data-size='sm']) {
|
|
14
|
+
width: var(--flx-ui-size-sm);
|
|
15
|
+
}
|
|
16
|
+
:where([data-icon-button][data-size='lg']) {
|
|
17
|
+
width: var(--flx-ui-size-lg);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/* Shape */
|
|
21
|
+
:where([data-icon-button][data-shape='circle']) {
|
|
22
|
+
border-radius: var(--flx-ui-radius-full);
|
|
23
|
+
}
|
|
24
|
+
:where([data-icon-button][data-shape='square']) {
|
|
25
|
+
border-radius: var(--flx-ui-radius-sm);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/* A sensible default icon size that tracks the button size (consumers can still
|
|
29
|
+
size their own glyphs). */
|
|
30
|
+
:where([data-icon-button] svg) {
|
|
31
|
+
width: 20px;
|
|
32
|
+
height: 20px;
|
|
33
|
+
}
|
|
34
|
+
:where([data-icon-button][data-size='sm'] svg) {
|
|
35
|
+
width: 16px;
|
|
36
|
+
height: 16px;
|
|
37
|
+
}
|
|
38
|
+
:where([data-icon-button][data-size='lg'] svg) {
|
|
39
|
+
width: 24px;
|
|
40
|
+
height: 24px;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
@layer flx.components {
|
|
2
|
+
/* Image (from @fluixi-ui/image). A box that reserves the image's space and layers
|
|
3
|
+
a loading placeholder / blur-up and an error fallback over the <img>. Size it via
|
|
4
|
+
a width/height, an aspect-ratio, or a sized parent — the <img> fills it. */
|
|
5
|
+
:where([data-image]) {
|
|
6
|
+
position: relative;
|
|
7
|
+
display: inline-block;
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
line-height: 0;
|
|
10
|
+
vertical-align: middle;
|
|
11
|
+
background: var(--flx-ui-color-bg-subtle);
|
|
12
|
+
color: var(--flx-ui-color-fg-subtle);
|
|
13
|
+
--flx-ui-image-fallback-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M21 3H3a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h18a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2Zm0 16H3V5h18v14ZM8.5 13.5l2 2.41L13.5 12l4 5.5H6.5l2-4Z'/%3E%3C/svg%3E");
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/* The image stays in normal flow so the box reserves its footprint (and keeps its
|
|
17
|
+
height when the source errors); object-fit crops it to a sized box. */
|
|
18
|
+
:where([data-image-img]) {
|
|
19
|
+
display: block;
|
|
20
|
+
width: 100%;
|
|
21
|
+
height: 100%;
|
|
22
|
+
object-fit: cover;
|
|
23
|
+
opacity: 0;
|
|
24
|
+
transition: opacity var(--flx-ui-duration-normal) var(--flx-ui-ease-standard);
|
|
25
|
+
}
|
|
26
|
+
:where([data-image][data-status='loaded'] [data-image-img]) {
|
|
27
|
+
opacity: 1;
|
|
28
|
+
}
|
|
29
|
+
:where([data-image][data-status='error'] [data-image-img]) {
|
|
30
|
+
opacity: 0;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/* Overlays — blur-up, custom placeholder, and the error fallback — fill the box. */
|
|
34
|
+
:where([data-image-blur], [data-image-placeholder], [data-image-fallback]) {
|
|
35
|
+
position: absolute;
|
|
36
|
+
inset: 0;
|
|
37
|
+
width: 100%;
|
|
38
|
+
height: 100%;
|
|
39
|
+
}
|
|
40
|
+
:where([data-image-blur]) {
|
|
41
|
+
background-size: cover;
|
|
42
|
+
background-position: center;
|
|
43
|
+
filter: blur(12px);
|
|
44
|
+
transform: scale(1.1);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* Default error fallback: a centered picture glyph on the subtle surface. Passing a
|
|
48
|
+
custom `fallback` element replaces it entirely. */
|
|
49
|
+
:where([data-image-fallback]) {
|
|
50
|
+
display: flex;
|
|
51
|
+
align-items: center;
|
|
52
|
+
justify-content: center;
|
|
53
|
+
background: var(--flx-ui-color-bg-subtle);
|
|
54
|
+
color: var(--flx-ui-color-fg-subtle);
|
|
55
|
+
}
|
|
56
|
+
:where([data-image-fallback])::before {
|
|
57
|
+
content: "";
|
|
58
|
+
width: 45%;
|
|
59
|
+
height: 45%;
|
|
60
|
+
max-width: 28px;
|
|
61
|
+
max-height: 28px;
|
|
62
|
+
background: currentColor;
|
|
63
|
+
opacity: 0.55;
|
|
64
|
+
-webkit-mask: center / contain no-repeat var(--flx-ui-image-fallback-glyph);
|
|
65
|
+
mask: center / contain no-repeat var(--flx-ui-image-fallback-glyph);
|
|
66
|
+
}
|
|
67
|
+
}
|
package/dist/css/input.css
CHANGED
|
@@ -29,6 +29,21 @@
|
|
|
29
29
|
:where([data-input][data-invalid]) {
|
|
30
30
|
border-color: var(--flx-ui-color-danger);
|
|
31
31
|
}
|
|
32
|
+
/* Drop the browser's native number spinners — they can't be styled consistently
|
|
33
|
+
across engines and clash with the field look. Covers both the bare input and
|
|
34
|
+
the one nested inside an adornment group (which carries no [data-input]). Reach
|
|
35
|
+
for @fluixi-ui/number-field when you want proper increment / decrement steppers. */
|
|
36
|
+
:where([data-input][type='number'], [data-input-group] input[type='number']) {
|
|
37
|
+
-moz-appearance: textfield;
|
|
38
|
+
appearance: textfield;
|
|
39
|
+
}
|
|
40
|
+
:where([data-input][type='number']::-webkit-outer-spin-button),
|
|
41
|
+
:where([data-input][type='number']::-webkit-inner-spin-button),
|
|
42
|
+
:where([data-input-group] input[type='number']::-webkit-outer-spin-button),
|
|
43
|
+
:where([data-input-group] input[type='number']::-webkit-inner-spin-button) {
|
|
44
|
+
-webkit-appearance: none;
|
|
45
|
+
margin: 0;
|
|
46
|
+
}
|
|
32
47
|
|
|
33
48
|
/* Input with leading/trailing adornments: the group owns the frame. */
|
|
34
49
|
:where([data-input-group]) {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
@layer flx.components {
|
|
2
|
+
/* ----------------------------------------------------------------------------
|
|
3
|
+
* Layout primitives (Stack / Grid / Container) — the geometry is set inline per
|
|
4
|
+
* instance; this only guarantees a predictable box model.
|
|
5
|
+
* ------------------------------------------------------------------------- */
|
|
6
|
+
:where([data-stack], [data-grid], [data-container]) {
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
min-width: 0;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -42,20 +42,21 @@
|
|
|
42
42
|
:where([data-navigation-menu-trigger]:focus-visible, [data-navigation-menu-link]:focus-visible) {
|
|
43
43
|
box-shadow: var(--flx-ui-ctl-ring);
|
|
44
44
|
}
|
|
45
|
-
/* The chevron affordance:
|
|
45
|
+
/* The chevron affordance: the shared theme chevron, flipping 180° when open. */
|
|
46
46
|
:where([data-navigation-menu-trigger])::after {
|
|
47
47
|
content: '';
|
|
48
|
-
width:
|
|
49
|
-
height:
|
|
48
|
+
width: 1em;
|
|
49
|
+
height: 1em;
|
|
50
|
+
flex: none;
|
|
50
51
|
margin-inline-start: var(--flx-ui-space-1);
|
|
51
|
-
|
|
52
|
-
border-bottom: 1.5px solid currentColor;
|
|
53
|
-
transform: rotate(45deg) translateY(-0.1em);
|
|
52
|
+
background: currentColor;
|
|
54
53
|
opacity: 0.6;
|
|
54
|
+
-webkit-mask: var(--flx-ui-chevron-down) center / contain no-repeat;
|
|
55
|
+
mask: var(--flx-ui-chevron-down) center / contain no-repeat;
|
|
55
56
|
transition: transform var(--flx-ui-duration-fast) var(--flx-ui-ease-standard);
|
|
56
57
|
}
|
|
57
58
|
:where([data-navigation-menu-trigger][data-state='open'])::after {
|
|
58
|
-
transform: rotate(
|
|
59
|
+
transform: rotate(180deg);
|
|
59
60
|
}
|
|
60
61
|
|
|
61
62
|
:where([data-navigation-menu-content]) {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
font-size: var(--flx-ui-font-size-sm);
|
|
12
12
|
font-weight: var(--flx-ui-font-weight-medium);
|
|
13
13
|
color: var(--flx-ui-color-fg);
|
|
14
|
-
line-height: var(--flx-ui-
|
|
14
|
+
line-height: var(--flx-ui-line-height-none);
|
|
15
15
|
}
|
|
16
16
|
:where([data-number-field-label][data-disabled]) {
|
|
17
17
|
color: var(--flx-ui-color-fg-subtle);
|
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
color: var(--flx-ui-color-fg-muted);
|
|
62
62
|
cursor: pointer;
|
|
63
63
|
font-size: var(--flx-ui-font-size-sm);
|
|
64
|
-
transition: background var(--flx-ui-duration-fast) var(--flx-ui-
|
|
65
|
-
color var(--flx-ui-duration-fast) var(--flx-ui-
|
|
64
|
+
transition: background var(--flx-ui-duration-fast) var(--flx-ui-ease-standard),
|
|
65
|
+
color var(--flx-ui-duration-fast) var(--flx-ui-ease-standard);
|
|
66
66
|
}
|
|
67
67
|
:where([data-number-field-decrement]) {
|
|
68
68
|
border-right: 1px solid var(--flx-ui-color-border);
|
package/dist/css/pagination.css
CHANGED
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
border-radius: var(--flx-ui-radius-md);
|
|
32
32
|
cursor: pointer;
|
|
33
33
|
user-select: none;
|
|
34
|
-
transition: background var(--flx-ui-duration-fast) var(--flx-ui-
|
|
35
|
-
color var(--flx-ui-duration-fast) var(--flx-ui-
|
|
36
|
-
border-color var(--flx-ui-duration-fast) var(--flx-ui-
|
|
34
|
+
transition: background var(--flx-ui-duration-fast) var(--flx-ui-ease-standard),
|
|
35
|
+
color var(--flx-ui-duration-fast) var(--flx-ui-ease-standard),
|
|
36
|
+
border-color var(--flx-ui-duration-fast) var(--flx-ui-ease-standard);
|
|
37
37
|
}
|
|
38
38
|
:where([data-pagination-page]:hover:not([disabled])),
|
|
39
39
|
:where([data-pagination-prev]:hover:not([disabled])),
|
|
@@ -89,10 +89,15 @@
|
|
|
89
89
|
border-color: var(--flx-ui-color-primary);
|
|
90
90
|
}
|
|
91
91
|
:where([data-mode='multiple'] [role='option'][data-selected] > [data-select-item-indicator])::after {
|
|
92
|
-
content: '
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
92
|
+
content: '';
|
|
93
|
+
box-sizing: content-box;
|
|
94
|
+
flex: none;
|
|
95
|
+
width: 4px;
|
|
96
|
+
height: 8px;
|
|
97
|
+
margin-top: -2px;
|
|
98
|
+
border: solid var(--flx-ui-color-primary-fg);
|
|
99
|
+
border-width: 0 2px 2px 0;
|
|
100
|
+
transform: rotate(45deg);
|
|
96
101
|
}
|
|
97
102
|
:where([data-mode='multiple'] [role='option'][data-selected])::after {
|
|
98
103
|
content: none;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
@layer flx.components {
|
|
2
|
+
/* ----------------------------------------------------------------------------
|
|
3
|
+
* PIN / OTP input — a row of single-character cells
|
|
4
|
+
* ------------------------------------------------------------------------- */
|
|
5
|
+
:where([data-pin-input]) {
|
|
6
|
+
display: inline-flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
gap: var(--flx-ui-pin-gap, var(--flx-ui-space-2));
|
|
9
|
+
}
|
|
10
|
+
:where([data-pin-input-field]) {
|
|
11
|
+
box-sizing: border-box;
|
|
12
|
+
width: var(--flx-ui-pin-size, 2.75rem);
|
|
13
|
+
height: var(--flx-ui-pin-size, 2.75rem);
|
|
14
|
+
padding: 0;
|
|
15
|
+
text-align: center;
|
|
16
|
+
font: inherit;
|
|
17
|
+
font-size: var(--flx-ui-font-size-lg);
|
|
18
|
+
font-weight: var(--flx-ui-font-weight-medium);
|
|
19
|
+
font-variant-numeric: tabular-nums;
|
|
20
|
+
color: var(--flx-ui-color-fg);
|
|
21
|
+
background: var(--flx-ui-color-bg);
|
|
22
|
+
border: var(--flx-ui-border-width-thin) solid var(--flx-ui-color-border-strong);
|
|
23
|
+
border-radius: var(--flx-ui-radius-md);
|
|
24
|
+
transition:
|
|
25
|
+
border-color var(--flx-ui-duration-fast) var(--flx-ui-ease-standard),
|
|
26
|
+
box-shadow var(--flx-ui-duration-fast) var(--flx-ui-ease-standard);
|
|
27
|
+
}
|
|
28
|
+
:where([data-pin-input-field]::placeholder) {
|
|
29
|
+
color: var(--flx-ui-color-fg-muted);
|
|
30
|
+
}
|
|
31
|
+
:where([data-pin-input-field]:focus-visible) {
|
|
32
|
+
outline: none;
|
|
33
|
+
border-color: var(--flx-ui-color-focus-ring);
|
|
34
|
+
box-shadow: var(--flx-ui-ctl-ring);
|
|
35
|
+
}
|
|
36
|
+
:where([data-pin-input-field]:disabled) {
|
|
37
|
+
opacity: var(--flx-ui-opacity-disabled, 0.5);
|
|
38
|
+
cursor: not-allowed;
|
|
39
|
+
}
|
|
40
|
+
}
|
package/dist/css/progress.css
CHANGED
|
@@ -37,4 +37,60 @@
|
|
|
37
37
|
0% { transform: translateX(-100%); }
|
|
38
38
|
100% { transform: translateX(250%); }
|
|
39
39
|
}
|
|
40
|
+
|
|
41
|
+
/* ----------------------------------------------------------------------------
|
|
42
|
+
* Circular progress
|
|
43
|
+
* ------------------------------------------------------------------------- */
|
|
44
|
+
:where([data-circular]) {
|
|
45
|
+
position: relative;
|
|
46
|
+
/* Stack the ring and any centred label in a single grid cell. */
|
|
47
|
+
display: inline-grid;
|
|
48
|
+
place-items: center;
|
|
49
|
+
vertical-align: middle;
|
|
50
|
+
/* Undo the linear bar's box styling that keys off [role='progressbar']
|
|
51
|
+
(fixed 6px height / 240px width / clipped overflow / filled track). */
|
|
52
|
+
width: auto;
|
|
53
|
+
height: auto;
|
|
54
|
+
overflow: visible;
|
|
55
|
+
background: none;
|
|
56
|
+
border-radius: 0;
|
|
57
|
+
}
|
|
58
|
+
:where([data-circular]) > * {
|
|
59
|
+
grid-area: 1 / 1;
|
|
60
|
+
}
|
|
61
|
+
:where([data-circular] [data-progress-svg]) {
|
|
62
|
+
display: block;
|
|
63
|
+
/* Start the arc at 12 o'clock rather than 3 o'clock. */
|
|
64
|
+
transform: rotate(-90deg);
|
|
65
|
+
}
|
|
66
|
+
:where([data-progress-track]) {
|
|
67
|
+
fill: none;
|
|
68
|
+
stroke: var(--flx-ui-color-bg-muted);
|
|
69
|
+
}
|
|
70
|
+
:where([data-progress-indicator]) {
|
|
71
|
+
fill: none;
|
|
72
|
+
stroke: var(--flx-ui-color-primary);
|
|
73
|
+
stroke-linecap: round;
|
|
74
|
+
transition: stroke-dashoffset var(--flx-ui-duration-normal) var(--flx-ui-ease-standard);
|
|
75
|
+
}
|
|
76
|
+
/* Indeterminate: a short arc that sweeps around the ring. */
|
|
77
|
+
:where([data-circular][data-state='indeterminate'] [data-progress-svg]) {
|
|
78
|
+
animation: flx-ui-circular-spin 0.9s linear infinite;
|
|
79
|
+
}
|
|
80
|
+
:where([data-circular][data-state='indeterminate'] [data-progress-indicator]) {
|
|
81
|
+
stroke-dasharray: 25 200;
|
|
82
|
+
transition: none;
|
|
83
|
+
}
|
|
84
|
+
@media (prefers-reduced-motion: reduce) {
|
|
85
|
+
:where([data-circular][data-state='indeterminate'] [data-progress-svg]) {
|
|
86
|
+
animation: none;
|
|
87
|
+
}
|
|
88
|
+
:where([data-circular][data-state='indeterminate'] [data-progress-indicator]) {
|
|
89
|
+
stroke-dasharray: none;
|
|
90
|
+
opacity: 0.5;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
@keyframes flx-ui-circular-spin {
|
|
94
|
+
to { transform: rotate(270deg); }
|
|
95
|
+
}
|
|
40
96
|
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
@layer flx.components {
|
|
2
|
+
/* ----------------------------------------------------------------------------
|
|
3
|
+
* Rating
|
|
4
|
+
*
|
|
5
|
+
* Each item is a star silhouette (mask) painted in the "empty" colour; a
|
|
6
|
+
* ::before overlay paints the "filled" colour, revealed left-to-right via
|
|
7
|
+
* clip-path by the item's data-state (empty / half / full).
|
|
8
|
+
* ------------------------------------------------------------------------- */
|
|
9
|
+
:where([data-rating]) {
|
|
10
|
+
--flx-ui-star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.2l2.9 6.5 7 .6-5.3 4.6 1.6 6.9L12 17.7 5.8 21.4l1.6-6.9L2 9.9l7-.6z'/%3E%3C/svg%3E");
|
|
11
|
+
display: inline-flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
gap: var(--flx-ui-rating-gap, 2px);
|
|
14
|
+
outline: none;
|
|
15
|
+
}
|
|
16
|
+
:where([data-rating]:not([data-disabled]):not([data-readonly])) {
|
|
17
|
+
cursor: pointer;
|
|
18
|
+
}
|
|
19
|
+
:where([data-rating]:focus-visible) {
|
|
20
|
+
border-radius: var(--flx-ui-radius-sm);
|
|
21
|
+
box-shadow: var(--flx-ui-ctl-ring);
|
|
22
|
+
}
|
|
23
|
+
:where([data-rating][data-disabled]) {
|
|
24
|
+
opacity: var(--flx-ui-opacity-disabled, 0.5);
|
|
25
|
+
cursor: not-allowed;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
:where([data-rating-item]) {
|
|
29
|
+
position: relative;
|
|
30
|
+
display: inline-block;
|
|
31
|
+
width: var(--flx-ui-rating-size, 20px);
|
|
32
|
+
height: var(--flx-ui-rating-size, 20px);
|
|
33
|
+
flex: none;
|
|
34
|
+
background: var(--flx-ui-color-border-strong);
|
|
35
|
+
-webkit-mask: var(--flx-ui-star) center / contain no-repeat;
|
|
36
|
+
mask: var(--flx-ui-star) center / contain no-repeat;
|
|
37
|
+
}
|
|
38
|
+
:where([data-rating-item])::before {
|
|
39
|
+
content: '';
|
|
40
|
+
position: absolute;
|
|
41
|
+
inset: 0;
|
|
42
|
+
background: var(--flx-ui-rating-color, var(--flx-ui-color-primary));
|
|
43
|
+
-webkit-mask: var(--flx-ui-star) center / contain no-repeat;
|
|
44
|
+
mask: var(--flx-ui-star) center / contain no-repeat;
|
|
45
|
+
clip-path: inset(0 100% 0 0);
|
|
46
|
+
transition: clip-path var(--flx-ui-duration-fast) var(--flx-ui-ease-standard);
|
|
47
|
+
}
|
|
48
|
+
:where([data-rating-item][data-state='full'])::before {
|
|
49
|
+
clip-path: inset(0 0 0 0);
|
|
50
|
+
}
|
|
51
|
+
:where([data-rating-item][data-state='half'])::before {
|
|
52
|
+
clip-path: inset(0 50% 0 0);
|
|
53
|
+
}
|
|
54
|
+
@media (prefers-reduced-motion: reduce) {
|
|
55
|
+
:where([data-rating-item])::before {
|
|
56
|
+
transition: none;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
@layer flx.components {
|
|
2
|
+
/* ----------------------------------------------------------------------------
|
|
3
|
+
* Scroll area — a scroll container with slim, theme-aware scrollbars styled over
|
|
4
|
+
* the native scrollbar (Firefox `scrollbar-*` + WebKit `::-webkit-scrollbar`).
|
|
5
|
+
* ------------------------------------------------------------------------- */
|
|
6
|
+
:where([data-scroll-area]) {
|
|
7
|
+
position: relative;
|
|
8
|
+
scrollbar-width: thin;
|
|
9
|
+
scrollbar-color: var(--flx-ui-color-border-strong) transparent;
|
|
10
|
+
overscroll-behavior: contain;
|
|
11
|
+
}
|
|
12
|
+
:where([data-scroll-area][data-orientation='vertical']) {
|
|
13
|
+
overflow-y: auto;
|
|
14
|
+
overflow-x: hidden;
|
|
15
|
+
}
|
|
16
|
+
:where([data-scroll-area][data-orientation='horizontal']) {
|
|
17
|
+
overflow-x: auto;
|
|
18
|
+
overflow-y: hidden;
|
|
19
|
+
}
|
|
20
|
+
:where([data-scroll-area][data-orientation='both']) {
|
|
21
|
+
overflow: auto;
|
|
22
|
+
}
|
|
23
|
+
:where([data-scroll-area])::-webkit-scrollbar {
|
|
24
|
+
width: 10px;
|
|
25
|
+
height: 10px;
|
|
26
|
+
}
|
|
27
|
+
:where([data-scroll-area])::-webkit-scrollbar-track {
|
|
28
|
+
background: transparent;
|
|
29
|
+
}
|
|
30
|
+
:where([data-scroll-area])::-webkit-scrollbar-thumb {
|
|
31
|
+
background: var(--flx-ui-color-border-strong);
|
|
32
|
+
border-radius: var(--flx-ui-radius-full);
|
|
33
|
+
/* Inset the thumb with a transparent border so it reads as a slim pill. */
|
|
34
|
+
border: 2px solid transparent;
|
|
35
|
+
background-clip: content-box;
|
|
36
|
+
}
|
|
37
|
+
:where([data-scroll-area])::-webkit-scrollbar-thumb:hover {
|
|
38
|
+
background: var(--flx-ui-color-fg-muted);
|
|
39
|
+
background-clip: content-box;
|
|
40
|
+
}
|
|
41
|
+
:where([data-scroll-area])::-webkit-scrollbar-corner {
|
|
42
|
+
background: transparent;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -33,9 +33,13 @@
|
|
|
33
33
|
box-shadow: var(--flx-ui-ctl-ring);
|
|
34
34
|
}
|
|
35
35
|
:where(button[role='combobox'])::after {
|
|
36
|
-
content: '
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
content: '';
|
|
37
|
+
width: 1.15em;
|
|
38
|
+
height: 1.15em;
|
|
39
|
+
flex: none;
|
|
40
|
+
background: var(--flx-ui-color-fg-muted);
|
|
41
|
+
-webkit-mask: var(--flx-ui-chevron-down) center / contain no-repeat;
|
|
42
|
+
mask: var(--flx-ui-chevron-down) center / contain no-repeat;
|
|
39
43
|
}
|
|
40
44
|
:where([data-select-value][data-placeholder]) {
|
|
41
45
|
color: var(--flx-ui-color-fg-muted);
|
|
@@ -65,12 +69,23 @@
|
|
|
65
69
|
color: var(--flx-ui-color-fg-muted);
|
|
66
70
|
}
|
|
67
71
|
:where([data-combobox-control] > button) {
|
|
72
|
+
display: inline-flex;
|
|
73
|
+
align-items: center;
|
|
74
|
+
justify-content: center;
|
|
68
75
|
border: none;
|
|
69
76
|
background: none;
|
|
70
77
|
cursor: pointer;
|
|
71
78
|
color: var(--flx-ui-color-fg-muted);
|
|
72
79
|
padding: 0 var(--flx-ui-space-1);
|
|
73
|
-
font-size: 0.8em;
|
|
74
80
|
border-radius: var(--flx-ui-radius-sm);
|
|
75
81
|
}
|
|
82
|
+
/* When the trigger has no custom content, show the shared theme chevron. */
|
|
83
|
+
:where([data-combobox-control] > button:empty)::after {
|
|
84
|
+
content: '';
|
|
85
|
+
width: 1.15em;
|
|
86
|
+
height: 1.15em;
|
|
87
|
+
background: currentColor;
|
|
88
|
+
-webkit-mask: var(--flx-ui-chevron-down) center / contain no-repeat;
|
|
89
|
+
mask: var(--flx-ui-chevron-down) center / contain no-repeat;
|
|
90
|
+
}
|
|
76
91
|
}
|