@fluixi-ui/tokens 0.3.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/LICENSE +21 -0
- package/README.md +106 -0
- package/dist/css/accordion.css +7 -0
- package/dist/css/alert.css +42 -0
- package/dist/css/avatar.css +36 -0
- package/dist/css/badge.css +12 -0
- package/dist/css/base.css +10 -0
- package/dist/css/bulk-editor.css +478 -0
- package/dist/css/button.css +92 -0
- package/dist/css/calendar.css +140 -0
- package/dist/css/checkbox-radio.css +66 -0
- package/dist/css/command.css +90 -0
- package/dist/css/date-field.css +58 -0
- package/dist/css/date-picker.css +81 -0
- package/dist/css/field.css +19 -0
- package/dist/css/hover-card.css +16 -0
- package/dist/css/input.css +85 -0
- package/dist/css/kbd.css +20 -0
- package/dist/css/menubar.css +27 -0
- package/dist/css/navigation-menu.css +144 -0
- package/dist/css/number-field.css +83 -0
- package/dist/css/parts/listbox.css +111 -0
- package/dist/css/parts/menu.css +69 -0
- package/dist/css/parts/motion.css +34 -0
- package/dist/css/parts/overlays.css +36 -0
- package/dist/css/progress.css +40 -0
- package/dist/css/select-combobox.css +76 -0
- package/dist/css/separator.css +15 -0
- package/dist/css/skeleton.css +22 -0
- package/dist/css/slider.css +71 -0
- package/dist/css/spinner.css +17 -0
- package/dist/css/switch.css +33 -0
- package/dist/css/table.css +173 -0
- package/dist/css/tabs.css +32 -0
- package/dist/css/toast.css +154 -0
- package/dist/css/toggle.css +74 -0
- package/dist/css/toolbar.css +48 -0
- package/dist/css/tooltip.css +13 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -0
- package/dist/lib/css/index.d.ts +20 -0
- package/dist/lib/css/index.d.ts.map +1 -0
- package/dist/lib/css/index.js +135 -0
- package/dist/lib/reference/colors.d.ts +24 -0
- package/dist/lib/reference/colors.d.ts.map +1 -0
- package/dist/lib/reference/colors.js +150 -0
- package/dist/lib/reference/index.d.ts +302 -0
- package/dist/lib/reference/index.d.ts.map +1 -0
- package/dist/lib/reference/index.js +147 -0
- package/dist/lib/theme/index.d.ts +32 -0
- package/dist/lib/theme/index.d.ts.map +1 -0
- package/dist/lib/theme/index.js +87 -0
- package/dist/lib/vars/index.d.ts +131 -0
- package/dist/lib/vars/index.d.ts.map +1 -0
- package/dist/lib/vars/index.js +40 -0
- package/dist/preset.css +47 -0
- package/dist/tsconfig.lib.tsbuildinfo +1 -0
- package/package.json +79 -0
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
@layer flx.components {
|
|
2
|
+
/* Standalone (inline) listbox */
|
|
3
|
+
:where([role='listbox']:not([data-state])) {
|
|
4
|
+
display: block;
|
|
5
|
+
max-width: 260px;
|
|
6
|
+
max-height: 260px;
|
|
7
|
+
overflow-y: auto;
|
|
8
|
+
padding: var(--flx-ui-space-1);
|
|
9
|
+
background: var(--flx-ui-color-bg);
|
|
10
|
+
border: var(--flx-ui-border-width-thin) solid var(--flx-ui-color-border);
|
|
11
|
+
border-radius: var(--flx-ui-radius-lg);
|
|
12
|
+
}
|
|
13
|
+
:where([role='listbox']:focus-visible) {
|
|
14
|
+
outline: none;
|
|
15
|
+
border-color: var(--flx-ui-color-focus-ring);
|
|
16
|
+
box-shadow: var(--flx-ui-ctl-ring);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* Listbox search box */
|
|
20
|
+
:where([data-listbox-search], [data-select-search]) {
|
|
21
|
+
box-sizing: border-box;
|
|
22
|
+
width: 100%;
|
|
23
|
+
margin-bottom: var(--flx-ui-space-1);
|
|
24
|
+
padding: var(--flx-ui-space-2) var(--flx-ui-space-3);
|
|
25
|
+
font: inherit;
|
|
26
|
+
color: var(--flx-ui-color-fg);
|
|
27
|
+
background: var(--flx-ui-color-bg);
|
|
28
|
+
border: var(--flx-ui-border-width-thin) solid var(--flx-ui-color-border);
|
|
29
|
+
border-radius: var(--flx-ui-radius-sm);
|
|
30
|
+
outline: none;
|
|
31
|
+
}
|
|
32
|
+
:where([data-listbox-search]:focus-visible, [data-select-search]:focus-visible) {
|
|
33
|
+
border-color: var(--flx-ui-color-focus-ring);
|
|
34
|
+
box-shadow: var(--flx-ui-ctl-ring);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* Options (select, combobox, listbox) */
|
|
38
|
+
:where([role='option']) {
|
|
39
|
+
display: flex;
|
|
40
|
+
align-items: center;
|
|
41
|
+
justify-content: space-between;
|
|
42
|
+
gap: var(--flx-ui-space-2);
|
|
43
|
+
padding: var(--flx-ui-space-2) var(--flx-ui-space-3);
|
|
44
|
+
border-radius: var(--flx-ui-radius-sm);
|
|
45
|
+
color: var(--flx-ui-color-fg);
|
|
46
|
+
cursor: pointer;
|
|
47
|
+
user-select: none;
|
|
48
|
+
outline: none;
|
|
49
|
+
}
|
|
50
|
+
:where([role='option'][data-active]) {
|
|
51
|
+
background: var(--flx-ui-color-primary-subtle);
|
|
52
|
+
color: var(--flx-ui-color-primary-active);
|
|
53
|
+
}
|
|
54
|
+
:where([role='option'][data-selected]) {
|
|
55
|
+
font-weight: var(--flx-ui-font-weight-medium);
|
|
56
|
+
}
|
|
57
|
+
:where([role='option'][data-selected])::after {
|
|
58
|
+
content: '✓';
|
|
59
|
+
color: var(--flx-ui-color-primary);
|
|
60
|
+
font-size: 0.85em;
|
|
61
|
+
}
|
|
62
|
+
:where([role='option'][data-disabled]) {
|
|
63
|
+
opacity: var(--flx-ui-opacity-disabled);
|
|
64
|
+
pointer-events: none;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/* Select checkbox multi-select: the leading indicator becomes a checkbox and the
|
|
68
|
+
* default trailing checkmark is suppressed. Single-select hides the indicator
|
|
69
|
+
* (the trailing ✓ above covers it). */
|
|
70
|
+
:where([data-select-item-indicator]) {
|
|
71
|
+
display: none;
|
|
72
|
+
}
|
|
73
|
+
:where([data-mode='multiple'] [role='option']) {
|
|
74
|
+
justify-content: flex-start;
|
|
75
|
+
}
|
|
76
|
+
:where([data-mode='multiple'] [role='option'] > [data-select-item-indicator]) {
|
|
77
|
+
display: inline-flex;
|
|
78
|
+
align-items: center;
|
|
79
|
+
justify-content: center;
|
|
80
|
+
flex: none;
|
|
81
|
+
width: 1rem;
|
|
82
|
+
height: 1rem;
|
|
83
|
+
border: var(--flx-ui-border-width-thin) solid var(--flx-ui-color-border-strong);
|
|
84
|
+
border-radius: var(--flx-ui-radius-sm);
|
|
85
|
+
background: var(--flx-ui-color-bg);
|
|
86
|
+
}
|
|
87
|
+
:where([data-mode='multiple'] [role='option'][data-selected] > [data-select-item-indicator]) {
|
|
88
|
+
background: var(--flx-ui-color-primary);
|
|
89
|
+
border-color: var(--flx-ui-color-primary);
|
|
90
|
+
}
|
|
91
|
+
:where([data-mode='multiple'] [role='option'][data-selected] > [data-select-item-indicator])::after {
|
|
92
|
+
content: '✓';
|
|
93
|
+
color: var(--flx-ui-color-primary-fg);
|
|
94
|
+
font-size: 0.7rem;
|
|
95
|
+
line-height: 1;
|
|
96
|
+
}
|
|
97
|
+
:where([data-mode='multiple'] [role='option'][data-selected])::after {
|
|
98
|
+
content: none;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/* Standalone virtualized listbox (its own scroll box, not a popup). */
|
|
102
|
+
:where([data-virtual-listbox]) {
|
|
103
|
+
border: var(--flx-ui-border-width-thin) solid var(--flx-ui-color-border);
|
|
104
|
+
border-radius: var(--flx-ui-radius-md);
|
|
105
|
+
background: var(--flx-ui-color-bg);
|
|
106
|
+
outline: none;
|
|
107
|
+
}
|
|
108
|
+
:where([data-virtual-listbox]:focus-visible) {
|
|
109
|
+
box-shadow: var(--flx-ui-ctl-ring);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
@layer flx.components {
|
|
2
|
+
/* Menu (dropdown / context / menubar) and floating listbox share the surface. */
|
|
3
|
+
:where([role='menu'], [role='listbox'][data-state='open']) {
|
|
4
|
+
min-width: 200px;
|
|
5
|
+
max-height: 320px;
|
|
6
|
+
overflow-y: auto;
|
|
7
|
+
padding: var(--flx-ui-space-1);
|
|
8
|
+
background: var(--flx-ui-color-bg);
|
|
9
|
+
color: var(--flx-ui-color-fg);
|
|
10
|
+
border: var(--flx-ui-border-width-thin) solid var(--flx-ui-color-border);
|
|
11
|
+
border-radius: var(--flx-ui-radius-lg);
|
|
12
|
+
box-shadow: var(--flx-ui-shadow-lg);
|
|
13
|
+
animation: flx-ui-pop-in var(--flx-ui-duration-fast) var(--flx-ui-ease-emphasized);
|
|
14
|
+
}
|
|
15
|
+
:where([role='menuitem']) {
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
gap: var(--flx-ui-space-2);
|
|
19
|
+
padding: var(--flx-ui-space-2) var(--flx-ui-space-3);
|
|
20
|
+
border-radius: var(--flx-ui-radius-sm);
|
|
21
|
+
cursor: pointer;
|
|
22
|
+
outline: none;
|
|
23
|
+
user-select: none;
|
|
24
|
+
/* Menubar triggers are <button> elements — strip native chrome so they match
|
|
25
|
+
the div-based items in the dropdown/context surfaces. */
|
|
26
|
+
appearance: none;
|
|
27
|
+
background: none;
|
|
28
|
+
border: none;
|
|
29
|
+
font: inherit;
|
|
30
|
+
color: inherit;
|
|
31
|
+
}
|
|
32
|
+
:where([role='menuitem']:hover, [role='menuitem']:focus, [role='menuitem'][data-active]) {
|
|
33
|
+
background: var(--flx-ui-color-primary-subtle);
|
|
34
|
+
color: var(--flx-ui-color-primary-active);
|
|
35
|
+
box-shadow: none;
|
|
36
|
+
}
|
|
37
|
+
:where([role='menuitem'][data-disabled]) {
|
|
38
|
+
opacity: var(--flx-ui-opacity-disabled);
|
|
39
|
+
pointer-events: none;
|
|
40
|
+
}
|
|
41
|
+
:where([role='menu'] [role='separator']) {
|
|
42
|
+
height: 1px;
|
|
43
|
+
margin: var(--flx-ui-space-1) 0;
|
|
44
|
+
background: var(--flx-ui-color-border);
|
|
45
|
+
}
|
|
46
|
+
:where([data-menu-label], [data-listbox-group-label]) {
|
|
47
|
+
padding: var(--flx-ui-space-2) var(--flx-ui-space-3) var(--flx-ui-space-1);
|
|
48
|
+
font-size: var(--flx-ui-font-size-xs);
|
|
49
|
+
font-weight: var(--flx-ui-font-weight-semibold);
|
|
50
|
+
letter-spacing: var(--flx-ui-letter-spacing-wide);
|
|
51
|
+
text-transform: uppercase;
|
|
52
|
+
color: var(--flx-ui-color-fg-muted);
|
|
53
|
+
}
|
|
54
|
+
/* Submenu trigger: trailing chevron + open highlight */
|
|
55
|
+
:where([role='menuitem'][aria-haspopup='menu']) {
|
|
56
|
+
justify-content: space-between;
|
|
57
|
+
}
|
|
58
|
+
:where([role='menuitem'][aria-haspopup='menu'])::after {
|
|
59
|
+
content: '›';
|
|
60
|
+
font-size: 1.1em;
|
|
61
|
+
line-height: 1;
|
|
62
|
+
color: var(--flx-ui-color-fg-muted);
|
|
63
|
+
flex-shrink: 0;
|
|
64
|
+
}
|
|
65
|
+
:where([role='menuitem'][aria-haspopup='menu'][data-state='open']) {
|
|
66
|
+
background: var(--flx-ui-color-primary-subtle);
|
|
67
|
+
color: var(--flx-ui-color-primary-active);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
@layer flx.components {
|
|
2
|
+
/* ----------------------------------------------------------------------------
|
|
3
|
+
* Motion
|
|
4
|
+
* ------------------------------------------------------------------------- */
|
|
5
|
+
@keyframes flx-ui-fade {
|
|
6
|
+
from {
|
|
7
|
+
opacity: 0;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
@keyframes flx-ui-pop-in {
|
|
11
|
+
from {
|
|
12
|
+
opacity: 0;
|
|
13
|
+
transform: translateY(-4px) scale(0.98);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
@keyframes flx-ui-dialog-in {
|
|
17
|
+
from {
|
|
18
|
+
opacity: 0;
|
|
19
|
+
transform: translate(-50%, calc(-50% + 8px)) scale(0.97);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
@media (prefers-reduced-motion: reduce) {
|
|
23
|
+
:where(
|
|
24
|
+
[data-dialog-overlay],
|
|
25
|
+
[role='dialog'],
|
|
26
|
+
[role='alertdialog'],
|
|
27
|
+
[role='menu'],
|
|
28
|
+
[role='listbox'][data-state='open'],
|
|
29
|
+
[role='tooltip']
|
|
30
|
+
) {
|
|
31
|
+
animation: none;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
@layer flx.components {
|
|
2
|
+
/* ----------------------------------------------------------------------------
|
|
3
|
+
* Floating surfaces: overlays, popovers, menus, listbox popups, tooltips
|
|
4
|
+
* ------------------------------------------------------------------------- */
|
|
5
|
+
:where([data-dialog-overlay]) {
|
|
6
|
+
position: fixed;
|
|
7
|
+
inset: 0;
|
|
8
|
+
background: var(--flx-ui-color-overlay);
|
|
9
|
+
animation: flx-ui-fade var(--flx-ui-duration-normal) var(--flx-ui-ease-standard);
|
|
10
|
+
}
|
|
11
|
+
:where([role='dialog']:not([data-placement]), [role='alertdialog']) {
|
|
12
|
+
position: fixed;
|
|
13
|
+
top: 50%;
|
|
14
|
+
left: 50%;
|
|
15
|
+
transform: translate(-50%, -50%);
|
|
16
|
+
width: min(460px, calc(100vw - var(--flx-ui-space-8)));
|
|
17
|
+
padding: var(--flx-ui-space-6);
|
|
18
|
+
background: var(--flx-ui-color-bg);
|
|
19
|
+
color: var(--flx-ui-color-fg);
|
|
20
|
+
border: var(--flx-ui-border-width-thin) solid var(--flx-ui-color-border);
|
|
21
|
+
border-radius: var(--flx-ui-radius-xl);
|
|
22
|
+
box-shadow: var(--flx-ui-shadow-xl);
|
|
23
|
+
animation: flx-ui-dialog-in var(--flx-ui-duration-normal) var(--flx-ui-ease-emphasized);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
:where([role='dialog'][data-placement]) {
|
|
27
|
+
min-width: 220px;
|
|
28
|
+
padding: var(--flx-ui-space-4);
|
|
29
|
+
background: var(--flx-ui-color-bg);
|
|
30
|
+
color: var(--flx-ui-color-fg);
|
|
31
|
+
border: var(--flx-ui-border-width-thin) solid var(--flx-ui-color-border);
|
|
32
|
+
border-radius: var(--flx-ui-radius-lg);
|
|
33
|
+
box-shadow: var(--flx-ui-shadow-lg);
|
|
34
|
+
animation: flx-ui-pop-in var(--flx-ui-duration-fast) var(--flx-ui-ease-emphasized);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
@layer flx.components {
|
|
2
|
+
/* ----------------------------------------------------------------------------
|
|
3
|
+
* Progress
|
|
4
|
+
* ------------------------------------------------------------------------- */
|
|
5
|
+
:where([role='progressbar']) {
|
|
6
|
+
height: 6px;
|
|
7
|
+
width: 240px;
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
background: var(--flx-ui-color-bg-muted);
|
|
10
|
+
border-radius: var(--flx-ui-radius-full);
|
|
11
|
+
}
|
|
12
|
+
:where([role='progressbar'])::after {
|
|
13
|
+
content: '';
|
|
14
|
+
display: block;
|
|
15
|
+
height: 100%;
|
|
16
|
+
/* The component publishes the fill as --flx-ui-progress; unset (indeterminate)
|
|
17
|
+
falls back to an animated sliver below. */
|
|
18
|
+
width: var(--flx-ui-progress, 0%);
|
|
19
|
+
background: var(--flx-ui-color-primary);
|
|
20
|
+
border-radius: var(--flx-ui-radius-full);
|
|
21
|
+
transition: width var(--flx-ui-duration-normal) var(--flx-ui-ease-standard);
|
|
22
|
+
}
|
|
23
|
+
/* Indeterminate: no known value → run a looping sweep instead of a 0%-width bar. */
|
|
24
|
+
:where([role='progressbar'][data-state='indeterminate'])::after {
|
|
25
|
+
width: 40%;
|
|
26
|
+
transition: none;
|
|
27
|
+
animation: flx-ui-progress-indeterminate 1.2s var(--flx-ui-ease-standard) infinite;
|
|
28
|
+
}
|
|
29
|
+
@media (prefers-reduced-motion: reduce) {
|
|
30
|
+
:where([role='progressbar'][data-state='indeterminate'])::after {
|
|
31
|
+
animation: none;
|
|
32
|
+
width: 100%;
|
|
33
|
+
opacity: 0.5;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
@keyframes flx-ui-progress-indeterminate {
|
|
37
|
+
0% { transform: translateX(-100%); }
|
|
38
|
+
100% { transform: translateX(250%); }
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
@layer flx.components {
|
|
2
|
+
/* ----------------------------------------------------------------------------
|
|
3
|
+
* Fields: select trigger & combobox input
|
|
4
|
+
* ------------------------------------------------------------------------- */
|
|
5
|
+
:where(button[role='combobox'], [data-combobox-control]) {
|
|
6
|
+
box-sizing: border-box;
|
|
7
|
+
display: inline-flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
gap: var(--flx-ui-space-2);
|
|
10
|
+
height: var(--flx-ui-size-md);
|
|
11
|
+
min-width: 200px;
|
|
12
|
+
padding: 0 var(--flx-ui-space-3);
|
|
13
|
+
font: inherit;
|
|
14
|
+
color: var(--flx-ui-color-fg);
|
|
15
|
+
background: var(--flx-ui-color-bg);
|
|
16
|
+
border: var(--flx-ui-border-width-thin) solid var(--flx-ui-color-border-strong);
|
|
17
|
+
border-radius: var(--flx-ui-radius-md);
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
transition:
|
|
20
|
+
border-color var(--flx-ui-duration-fast) var(--flx-ui-ease-standard),
|
|
21
|
+
box-shadow var(--flx-ui-duration-fast) var(--flx-ui-ease-standard);
|
|
22
|
+
}
|
|
23
|
+
:where(button[role='combobox']) {
|
|
24
|
+
justify-content: space-between;
|
|
25
|
+
text-align: left;
|
|
26
|
+
}
|
|
27
|
+
:where(button[role='combobox']:hover) {
|
|
28
|
+
border-color: var(--flx-ui-color-fg-muted);
|
|
29
|
+
}
|
|
30
|
+
:where(button[role='combobox']:focus-visible) {
|
|
31
|
+
outline: none;
|
|
32
|
+
border-color: var(--flx-ui-color-focus-ring);
|
|
33
|
+
box-shadow: var(--flx-ui-ctl-ring);
|
|
34
|
+
}
|
|
35
|
+
:where(button[role='combobox'])::after {
|
|
36
|
+
content: '▾';
|
|
37
|
+
color: var(--flx-ui-color-fg-muted);
|
|
38
|
+
font-size: 0.8em;
|
|
39
|
+
}
|
|
40
|
+
:where([data-select-value][data-placeholder]) {
|
|
41
|
+
color: var(--flx-ui-color-fg-muted);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/* Combobox control wraps a borderless input + a small toggle. */
|
|
45
|
+
:where([data-combobox-control]) {
|
|
46
|
+
cursor: text;
|
|
47
|
+
padding-right: var(--flx-ui-space-1);
|
|
48
|
+
}
|
|
49
|
+
:where([data-combobox-control]:focus-within) {
|
|
50
|
+
border-color: var(--flx-ui-color-focus-ring);
|
|
51
|
+
box-shadow: var(--flx-ui-ctl-ring);
|
|
52
|
+
}
|
|
53
|
+
:where([data-combobox-control] input[role='combobox']) {
|
|
54
|
+
flex: 1;
|
|
55
|
+
min-width: 0;
|
|
56
|
+
border: none;
|
|
57
|
+
outline: none;
|
|
58
|
+
box-shadow: none;
|
|
59
|
+
background: none;
|
|
60
|
+
font: inherit;
|
|
61
|
+
color: inherit;
|
|
62
|
+
padding: 0;
|
|
63
|
+
}
|
|
64
|
+
:where(input[role='combobox']::placeholder) {
|
|
65
|
+
color: var(--flx-ui-color-fg-muted);
|
|
66
|
+
}
|
|
67
|
+
:where([data-combobox-control] > button) {
|
|
68
|
+
border: none;
|
|
69
|
+
background: none;
|
|
70
|
+
cursor: pointer;
|
|
71
|
+
color: var(--flx-ui-color-fg-muted);
|
|
72
|
+
padding: 0 var(--flx-ui-space-1);
|
|
73
|
+
font-size: 0.8em;
|
|
74
|
+
border-radius: var(--flx-ui-radius-sm);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
@layer flx.components {
|
|
2
|
+
/* Separator */
|
|
3
|
+
:where([role='separator']) {
|
|
4
|
+
border: none;
|
|
5
|
+
background: var(--flx-ui-color-border);
|
|
6
|
+
height: 1px;
|
|
7
|
+
margin: var(--flx-ui-space-4) 0;
|
|
8
|
+
}
|
|
9
|
+
:where([role='separator'][data-orientation='vertical']) {
|
|
10
|
+
height: auto;
|
|
11
|
+
width: 1px;
|
|
12
|
+
margin: 0 var(--flx-ui-space-4);
|
|
13
|
+
align-self: stretch;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
@layer flx.components {
|
|
2
|
+
/* ----------------------------------------------------------------------------
|
|
3
|
+
* Skeleton
|
|
4
|
+
* ------------------------------------------------------------------------- */
|
|
5
|
+
:where([data-skeleton]) {
|
|
6
|
+
display: block;
|
|
7
|
+
min-height: 1em;
|
|
8
|
+
border-radius: var(--flx-ui-radius-sm);
|
|
9
|
+
background: var(--flx-ui-color-bg-muted);
|
|
10
|
+
animation: flx-ui-skeleton 1.5s ease-in-out infinite;
|
|
11
|
+
}
|
|
12
|
+
@keyframes flx-ui-skeleton {
|
|
13
|
+
50% {
|
|
14
|
+
opacity: 0.45;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
@media (prefers-reduced-motion: reduce) {
|
|
18
|
+
:where([data-skeleton]) {
|
|
19
|
+
animation: none;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
@layer flx.components {
|
|
2
|
+
/* ----------------------------------------------------------------------------
|
|
3
|
+
* Slider
|
|
4
|
+
* ------------------------------------------------------------------------- */
|
|
5
|
+
:where([data-slider]) {
|
|
6
|
+
position: relative;
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
width: 100%;
|
|
10
|
+
height: 20px;
|
|
11
|
+
touch-action: none;
|
|
12
|
+
user-select: none;
|
|
13
|
+
}
|
|
14
|
+
:where([data-slider][data-orientation='vertical']) {
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
width: 20px;
|
|
17
|
+
height: 160px;
|
|
18
|
+
}
|
|
19
|
+
:where([data-slider-track]) {
|
|
20
|
+
position: relative;
|
|
21
|
+
flex: 1;
|
|
22
|
+
height: 4px;
|
|
23
|
+
border-radius: var(--flx-ui-radius-full);
|
|
24
|
+
background: var(--flx-ui-color-bg-muted);
|
|
25
|
+
}
|
|
26
|
+
:where([data-slider-track][data-orientation='vertical']) {
|
|
27
|
+
width: 4px;
|
|
28
|
+
height: auto;
|
|
29
|
+
}
|
|
30
|
+
:where([data-slider-range]) {
|
|
31
|
+
position: absolute;
|
|
32
|
+
background: var(--flx-ui-color-primary);
|
|
33
|
+
border-radius: inherit;
|
|
34
|
+
}
|
|
35
|
+
:where([data-slider-range][data-orientation='horizontal']) {
|
|
36
|
+
top: 0;
|
|
37
|
+
left: 0;
|
|
38
|
+
height: 100%;
|
|
39
|
+
}
|
|
40
|
+
:where([data-slider-range][data-orientation='vertical']) {
|
|
41
|
+
bottom: 0;
|
|
42
|
+
left: 0;
|
|
43
|
+
width: 100%;
|
|
44
|
+
}
|
|
45
|
+
:where([role='slider']) {
|
|
46
|
+
position: absolute;
|
|
47
|
+
width: 16px;
|
|
48
|
+
height: 16px;
|
|
49
|
+
border-radius: var(--flx-ui-radius-full);
|
|
50
|
+
background: var(--flx-ui-color-bg);
|
|
51
|
+
border: 2px solid var(--flx-ui-color-primary);
|
|
52
|
+
box-shadow: var(--flx-ui-shadow-sm);
|
|
53
|
+
cursor: grab;
|
|
54
|
+
}
|
|
55
|
+
:where([role='slider'][data-orientation='horizontal']) {
|
|
56
|
+
top: 50%;
|
|
57
|
+
transform: translate(-50%, -50%);
|
|
58
|
+
}
|
|
59
|
+
:where([role='slider'][data-orientation='vertical']) {
|
|
60
|
+
left: 50%;
|
|
61
|
+
transform: translate(-50%, 50%);
|
|
62
|
+
}
|
|
63
|
+
:where([role='slider']:focus-visible) {
|
|
64
|
+
outline: none;
|
|
65
|
+
box-shadow: var(--flx-ui-ctl-ring);
|
|
66
|
+
}
|
|
67
|
+
:where([data-slider][data-disabled]) {
|
|
68
|
+
opacity: var(--flx-ui-opacity-disabled);
|
|
69
|
+
pointer-events: none;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
@layer flx.components {
|
|
2
|
+
/* Spinner */
|
|
3
|
+
:where([data-spinner]) {
|
|
4
|
+
display: inline-block;
|
|
5
|
+
width: 18px;
|
|
6
|
+
height: 18px;
|
|
7
|
+
border: 2px solid var(--flx-ui-color-border);
|
|
8
|
+
border-top-color: var(--flx-ui-color-primary);
|
|
9
|
+
border-radius: var(--flx-ui-radius-full);
|
|
10
|
+
animation: flx-ui-spin 0.6s linear infinite;
|
|
11
|
+
}
|
|
12
|
+
@keyframes flx-ui-spin {
|
|
13
|
+
to {
|
|
14
|
+
transform: rotate(360deg);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
@layer flx.components {
|
|
2
|
+
/* ----------------------------------------------------------------------------
|
|
3
|
+
* Switch
|
|
4
|
+
* ------------------------------------------------------------------------- */
|
|
5
|
+
:where([role='switch']) {
|
|
6
|
+
box-sizing: border-box;
|
|
7
|
+
width: 40px;
|
|
8
|
+
height: 24px;
|
|
9
|
+
flex: none;
|
|
10
|
+
border: none;
|
|
11
|
+
border-radius: var(--flx-ui-radius-full);
|
|
12
|
+
background: var(--flx-ui-color-border-strong);
|
|
13
|
+
padding: 2px;
|
|
14
|
+
cursor: pointer;
|
|
15
|
+
transition: background var(--flx-ui-duration-normal) var(--flx-ui-ease-standard);
|
|
16
|
+
}
|
|
17
|
+
:where([role='switch'][data-state='checked']) {
|
|
18
|
+
background: var(--flx-ui-color-primary);
|
|
19
|
+
}
|
|
20
|
+
:where([role='switch'])::after {
|
|
21
|
+
content: '';
|
|
22
|
+
display: block;
|
|
23
|
+
width: 20px;
|
|
24
|
+
height: 20px;
|
|
25
|
+
border-radius: var(--flx-ui-radius-full);
|
|
26
|
+
background: #fff;
|
|
27
|
+
box-shadow: var(--flx-ui-shadow-sm);
|
|
28
|
+
transition: transform var(--flx-ui-duration-normal) var(--flx-ui-ease-emphasized);
|
|
29
|
+
}
|
|
30
|
+
:where([role='switch'][data-state='checked'])::after {
|
|
31
|
+
transform: translateX(16px);
|
|
32
|
+
}
|
|
33
|
+
}
|