@ropav/styles 0.5.0 → 0.6.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/README.md +79 -0
- package/dist/components/accordion.css +1 -9
- package/dist/components/alert-dialog.css +0 -12
- package/dist/components/autocomplete.css +25 -35
- package/dist/components/breadcrumbs.css +9 -2
- package/dist/components/button-group.css +0 -4
- package/dist/components/button.css +3 -7
- package/dist/components/calendar-year-picker.css +19 -7
- package/dist/components/calendar.css +46 -21
- package/dist/components/checkbox.css +54 -56
- package/dist/components/chip.css +3 -1
- package/dist/components/close-button.css +7 -6
- package/dist/components/color-area.css +6 -6
- package/dist/components/color-input-group.css +10 -27
- package/dist/components/color-picker.css +1 -5
- package/dist/components/color-slider.css +14 -12
- package/dist/components/color-swatch-picker.css +2 -85
- package/dist/components/color-swatch.css +1 -1
- package/dist/components/combo-box.css +13 -3
- package/dist/components/date-input-group.css +34 -32
- package/dist/components/date-picker.css +1 -5
- package/dist/components/date-range-picker.css +1 -5
- package/dist/components/disclosure.css +0 -4
- package/dist/components/drawer.css +4 -8
- package/dist/components/drop-zone/drop-zone.styles.d.ts +34 -0
- package/dist/components/drop-zone/drop-zone.styles.d.ts.map +1 -0
- package/dist/components/drop-zone/drop-zone.styles.js +8 -0
- package/dist/components/drop-zone/index.d.ts +2 -0
- package/dist/components/drop-zone/index.d.ts.map +1 -0
- package/dist/components/drop-zone/index.js +2 -0
- package/dist/components/drop-zone.css +78 -0
- package/dist/components/dropdown.css +0 -4
- package/dist/components/error-message.css +0 -4
- package/dist/components/field-error.css +0 -4
- package/dist/components/index.css +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/input-group.css +12 -37
- package/dist/components/input-otp.css +14 -26
- package/dist/components/input.css +11 -32
- package/dist/components/kbd.css +3 -1
- package/dist/components/label.css +7 -2
- package/dist/components/link.css +13 -11
- package/dist/components/list-box-item.css +4 -10
- package/dist/components/menu-item.css +4 -10
- package/dist/components/meter.css +8 -16
- package/dist/components/modal.css +0 -12
- package/dist/components/number-field.css +23 -35
- package/dist/components/pagination.css +0 -4
- package/dist/components/popover.css +0 -4
- package/dist/components/progress-bar/progress-bar.styles.d.ts +36 -0
- package/dist/components/progress-bar/progress-bar.styles.d.ts.map +1 -1
- package/dist/components/progress-bar/progress-bar.styles.js +10 -0
- package/dist/components/progress-bar.css +82 -16
- package/dist/components/progress-circle.css +0 -4
- package/dist/components/radio.css +7 -9
- package/dist/components/range-calendar.css +73 -31
- package/dist/components/search-field.css +11 -28
- package/dist/components/segmented-control.css +9 -14
- package/dist/components/select.css +18 -32
- package/dist/components/sidebar/sidebar.styles.d.ts +36 -0
- package/dist/components/sidebar/sidebar.styles.d.ts.map +1 -1
- package/dist/components/sidebar/sidebar.styles.js +14 -1
- package/dist/components/sidebar.css +132 -38
- package/dist/components/slider.css +10 -11
- package/dist/components/splitter.css +44 -36
- package/dist/components/switch.css +16 -15
- package/dist/components/table.css +69 -27
- package/dist/components/tabs.css +8 -19
- package/dist/components/tag.css +32 -24
- package/dist/components/textarea.css +11 -32
- package/dist/components/toast.css +3 -1
- package/dist/components/toggle-button-group.css +0 -4
- package/dist/components/toggle-button.css +2 -6
- package/dist/components/tooltip.css +0 -4
- package/dist/components/typography.css +12 -4
- package/dist/components/virtualizer.css +11 -3
- package/dist/index.js +2 -1
- package/dist/ropav.min.css +1 -1
- package/dist/themes/airbnb.css +6 -4
- package/dist/themes/coinbase.css +6 -4
- package/dist/themes/default.css +24 -4
- package/dist/themes/discord.css +6 -4
- package/dist/themes/hero.css +24 -4
- package/dist/themes/lavender.css +6 -4
- package/dist/themes/mint.css +6 -4
- package/dist/themes/netflix.css +6 -4
- package/dist/themes/rabbit.css +6 -4
- package/dist/themes/shared/theme.css +1 -0
- package/dist/themes/sky.css +6 -4
- package/dist/themes/spotify.css +6 -4
- package/dist/themes/uber.css +6 -4
- package/package.json +1 -1
- package/src/components/drop-zone/drop-zone.styles.ts +12 -0
- package/src/components/drop-zone/index.ts +1 -0
- package/src/components/index.ts +1 -0
- package/src/components/progress-bar/progress-bar.styles.ts +14 -0
- package/src/components/sidebar/sidebar.styles.ts +23 -0
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
/* Date input group styles */
|
|
2
2
|
.date-input-group {
|
|
3
|
-
@apply inline-flex h-9 items-center overflow-hidden rounded-field border
|
|
3
|
+
@apply inline-flex h-9 items-center overflow-hidden rounded-field border text-sm text-field-foreground shadow-field outline-none;
|
|
4
|
+
|
|
5
|
+
/* The fill, per state. The `--secondary` variant re-points these and declares nothing else. */
|
|
6
|
+
--date-input-group-bg: var(--field-background, var(--default));
|
|
7
|
+
--date-input-group-bg-hover: var(--field-hover);
|
|
8
|
+
--date-input-group-bg-focus: var(--field-focus);
|
|
9
|
+
|
|
10
|
+
background-color: var(--date-input-group-bg);
|
|
4
11
|
border-width: var(--border-width-field);
|
|
5
12
|
border-color: var(--field-border);
|
|
6
13
|
|
|
@@ -13,10 +20,6 @@
|
|
|
13
20
|
outline-offset: -1px;
|
|
14
21
|
}
|
|
15
22
|
|
|
16
|
-
/**
|
|
17
|
-
* Transitions
|
|
18
|
-
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
|
|
19
|
-
*/
|
|
20
23
|
transition:
|
|
21
24
|
background-color 150ms var(--ease-smooth),
|
|
22
25
|
border-color 150ms var(--ease-smooth),
|
|
@@ -27,7 +30,7 @@
|
|
|
27
30
|
@media (hover: hover) {
|
|
28
31
|
&:hover:not(:focus-within),
|
|
29
32
|
&[data-hovered="true"]:not([data-focus-within="true"]) {
|
|
30
|
-
|
|
33
|
+
background-color: var(--date-input-group-bg-hover);
|
|
31
34
|
border-color: var(--field-border-hover);
|
|
32
35
|
}
|
|
33
36
|
}
|
|
@@ -55,7 +58,7 @@
|
|
|
55
58
|
/* Invalid state */
|
|
56
59
|
&[data-invalid="true"] {
|
|
57
60
|
@apply status-invalid-field;
|
|
58
|
-
background-color: var(--
|
|
61
|
+
background-color: var(--date-input-group-bg-focus);
|
|
59
62
|
border-color: var(--color-field-border-invalid);
|
|
60
63
|
}
|
|
61
64
|
|
|
@@ -105,20 +108,38 @@
|
|
|
105
108
|
.date-input-group__segment {
|
|
106
109
|
@apply inline-block rounded-md px-0.5 text-end text-nowrap outline-none;
|
|
107
110
|
|
|
111
|
+
/* The fill and the digits, per state. Five states repaint the text here, so a caller retuning
|
|
112
|
+
* any one of them from a single declaration would take the other four with it. */
|
|
113
|
+
--date-input-group-segment-bg: transparent;
|
|
114
|
+
--date-input-group-segment-bg-focused: var(--accent-soft);
|
|
115
|
+
--date-input-group-segment-bg-invalid-focused: var(--danger-soft);
|
|
116
|
+
--date-input-group-segment-fg: currentcolor;
|
|
117
|
+
--date-input-group-segment-fg-literal: var(--muted);
|
|
118
|
+
--date-input-group-segment-fg-placeholder: var(--field-placeholder, var(--muted));
|
|
119
|
+
--date-input-group-segment-fg-focused: var(--accent-soft-foreground);
|
|
120
|
+
--date-input-group-segment-fg-invalid: var(--danger);
|
|
121
|
+
--date-input-group-segment-fg-invalid-focused: var(--danger-soft-foreground);
|
|
122
|
+
|
|
123
|
+
background-color: var(--date-input-group-segment-bg);
|
|
124
|
+
color: var(--date-input-group-segment-fg);
|
|
125
|
+
|
|
108
126
|
/* Segment separators styling "/" */
|
|
109
127
|
&[data-type="literal"] {
|
|
110
|
-
@apply p-0
|
|
128
|
+
@apply p-0;
|
|
129
|
+
|
|
130
|
+
color: var(--date-input-group-segment-fg-literal);
|
|
111
131
|
}
|
|
112
132
|
|
|
113
133
|
/* Placeholder styling */
|
|
114
134
|
&[data-placeholder="true"] {
|
|
115
|
-
|
|
135
|
+
color: var(--date-input-group-segment-fg-placeholder);
|
|
116
136
|
}
|
|
117
137
|
|
|
118
138
|
/* Focused segment */
|
|
119
139
|
&:focus,
|
|
120
140
|
&[data-focused="true"] {
|
|
121
|
-
|
|
141
|
+
background-color: var(--date-input-group-segment-bg-focused);
|
|
142
|
+
color: var(--date-input-group-segment-fg-focused);
|
|
122
143
|
}
|
|
123
144
|
|
|
124
145
|
/* Disabled segment */
|
|
@@ -128,12 +149,13 @@
|
|
|
128
149
|
|
|
129
150
|
/* Invalid segment */
|
|
130
151
|
&[data-invalid="true"] {
|
|
131
|
-
|
|
152
|
+
color: var(--date-input-group-segment-fg-invalid);
|
|
132
153
|
|
|
133
154
|
/* Focused segment */
|
|
134
155
|
&:focus,
|
|
135
156
|
&[data-focused="true"] {
|
|
136
|
-
|
|
157
|
+
background-color: var(--date-input-group-segment-bg-invalid-focused);
|
|
158
|
+
color: var(--date-input-group-segment-fg-invalid-focused);
|
|
137
159
|
}
|
|
138
160
|
}
|
|
139
161
|
}
|
|
@@ -155,31 +177,11 @@
|
|
|
155
177
|
|
|
156
178
|
.date-input-group--secondary {
|
|
157
179
|
@apply shadow-none;
|
|
158
|
-
background-color: var(--date-input-group-bg);
|
|
159
180
|
|
|
160
181
|
--date-input-group-bg: var(--default);
|
|
161
182
|
--date-input-group-bg-hover: var(--default-hover);
|
|
162
183
|
--date-input-group-bg-focus: var(--default);
|
|
163
184
|
|
|
164
|
-
@media (hover: hover) {
|
|
165
|
-
&:hover:not(:focus-within),
|
|
166
|
-
&[data-hovered="true"]:not([data-focus-within="true"]) {
|
|
167
|
-
background-color: var(--date-input-group-bg-hover);
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
&:focus-within,
|
|
172
|
-
&[data-focus-within="true"] {
|
|
173
|
-
background-color: var(--date-input-group-bg-focus);
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
/* Invalid state */
|
|
177
|
-
&[data-invalid="true"] {
|
|
178
|
-
@apply status-invalid-field;
|
|
179
|
-
border-color: var(--color-field-border-invalid);
|
|
180
|
-
background-color: var(--date-input-group-bg-focus);
|
|
181
|
-
}
|
|
182
|
-
|
|
183
185
|
[data-slot="date-input-group-input"] {
|
|
184
186
|
@apply bg-transparent;
|
|
185
187
|
}
|
|
@@ -16,10 +16,6 @@
|
|
|
16
16
|
|
|
17
17
|
cursor: var(--cursor-interactive);
|
|
18
18
|
|
|
19
|
-
/**
|
|
20
|
-
* Transitions
|
|
21
|
-
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
|
|
22
|
-
*/
|
|
23
19
|
transition: box-shadow 150ms var(--ease-out);
|
|
24
20
|
@apply motion-reduce:transition-none;
|
|
25
21
|
|
|
@@ -44,7 +40,7 @@
|
|
|
44
40
|
@apply motion-reduce:transition-none;
|
|
45
41
|
|
|
46
42
|
box-shadow: var(--shadow-overlay);
|
|
47
|
-
border-radius: min(32px,
|
|
43
|
+
border-radius: min(32px, var(--component-radius));
|
|
48
44
|
|
|
49
45
|
&:focus-visible:not(:focus),
|
|
50
46
|
&[data-focus-visible="true"] {
|
|
@@ -16,10 +16,6 @@
|
|
|
16
16
|
|
|
17
17
|
cursor: var(--cursor-interactive);
|
|
18
18
|
|
|
19
|
-
/**
|
|
20
|
-
* Transitions
|
|
21
|
-
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
|
|
22
|
-
*/
|
|
23
19
|
transition: box-shadow 150ms var(--ease-out);
|
|
24
20
|
@apply motion-reduce:transition-none;
|
|
25
21
|
|
|
@@ -48,7 +44,7 @@
|
|
|
48
44
|
@apply motion-reduce:transition-none;
|
|
49
45
|
|
|
50
46
|
box-shadow: var(--shadow-overlay);
|
|
51
|
-
border-radius: min(32px,
|
|
47
|
+
border-radius: min(32px, var(--component-radius));
|
|
52
48
|
|
|
53
49
|
&:focus-visible:not(:focus),
|
|
54
50
|
&[data-focus-visible="true"] {
|
|
@@ -43,10 +43,6 @@
|
|
|
43
43
|
height: var(--disclosure-panel-height);
|
|
44
44
|
overflow: clip;
|
|
45
45
|
|
|
46
|
-
/**
|
|
47
|
-
* Transitions
|
|
48
|
-
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
|
|
49
|
-
*/
|
|
50
46
|
transition:
|
|
51
47
|
height 200ms var(--ease-out-quad),
|
|
52
48
|
opacity 200ms var(--ease-out);
|
|
@@ -9,10 +9,6 @@
|
|
|
9
9
|
.drawer__trigger {
|
|
10
10
|
@apply inline-block cursor-(--cursor-interactive);
|
|
11
11
|
|
|
12
|
-
/**
|
|
13
|
-
* Transitions
|
|
14
|
-
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
|
|
15
|
-
*/
|
|
16
12
|
transition:
|
|
17
13
|
transform 250ms var(--ease-out-quart),
|
|
18
14
|
background-color 150ms var(--ease-smooth),
|
|
@@ -155,15 +151,15 @@
|
|
|
155
151
|
&[data-placement="bottom"] {
|
|
156
152
|
@apply w-full;
|
|
157
153
|
@apply max-h-[85vh];
|
|
158
|
-
border-start-start-radius: min(32px, var(--radius
|
|
159
|
-
border-start-end-radius: min(32px, var(--radius
|
|
154
|
+
border-start-start-radius: min(32px, var(--component-radius));
|
|
155
|
+
border-start-end-radius: min(32px, var(--component-radius));
|
|
160
156
|
}
|
|
161
157
|
|
|
162
158
|
&[data-placement="top"] {
|
|
163
159
|
@apply w-full;
|
|
164
160
|
@apply max-h-[85vh];
|
|
165
|
-
border-end-start-radius: min(32px, var(--radius
|
|
166
|
-
border-end-end-radius: min(32px, var(--radius
|
|
161
|
+
border-end-start-radius: min(32px, var(--component-radius));
|
|
162
|
+
border-end-end-radius: min(32px, var(--component-radius));
|
|
167
163
|
}
|
|
168
164
|
|
|
169
165
|
/* Left/right placement: auto width, full height */
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { VariantProps } from "tailwind-variants";
|
|
2
|
+
export declare const dropZoneVariants: import("tailwind-variants").TVReturnType<{
|
|
3
|
+
[key: string]: {
|
|
4
|
+
[key: string]: {
|
|
5
|
+
base?: import("tailwind-variants").ClassValue;
|
|
6
|
+
trigger?: import("tailwind-variants").ClassValue;
|
|
7
|
+
} | import("tailwind-variants").ClassValue;
|
|
8
|
+
};
|
|
9
|
+
} | {
|
|
10
|
+
[x: string]: {
|
|
11
|
+
[x: string]: {
|
|
12
|
+
base?: import("tailwind-variants").ClassValue;
|
|
13
|
+
trigger?: import("tailwind-variants").ClassValue;
|
|
14
|
+
} | import("tailwind-variants").ClassValue;
|
|
15
|
+
};
|
|
16
|
+
} | {}, {
|
|
17
|
+
base: string;
|
|
18
|
+
trigger: string;
|
|
19
|
+
}, undefined, {
|
|
20
|
+
[key: string]: {
|
|
21
|
+
[key: string]: {
|
|
22
|
+
base?: import("tailwind-variants").ClassValue;
|
|
23
|
+
trigger?: import("tailwind-variants").ClassValue;
|
|
24
|
+
} | import("tailwind-variants").ClassValue;
|
|
25
|
+
};
|
|
26
|
+
} | {}, {
|
|
27
|
+
base: string;
|
|
28
|
+
trigger: string;
|
|
29
|
+
}, import("tailwind-variants").TVReturnTypeLike<unknown, {
|
|
30
|
+
base: string;
|
|
31
|
+
trigger: string;
|
|
32
|
+
}>>;
|
|
33
|
+
export type DropZoneVariants = VariantProps<typeof dropZoneVariants>;
|
|
34
|
+
//# sourceMappingURL=drop-zone.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drop-zone.styles.d.ts","sourceRoot":"","sources":["../../../src/components/drop-zone/drop-zone.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAItD,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAK3B,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,YAAY,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/drop-zone/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/* Drop zone component styles */
|
|
2
|
+
|
|
3
|
+
.drop-zone {
|
|
4
|
+
@apply relative flex w-full flex-col items-center justify-center gap-2 rounded-component p-6 text-center text-sm outline-none;
|
|
5
|
+
|
|
6
|
+
/* The dashed edge is this component's whole affordance, so it is painted from `--border`
|
|
7
|
+
* rather than `--field-border`: the default theme sets that to `transparent` with a width of
|
|
8
|
+
* `0`, which is right for an input sitting on a filled background and wrong for a region
|
|
9
|
+
* whose only boundary is the line itself. */
|
|
10
|
+
--drop-zone-border: var(--border);
|
|
11
|
+
--drop-zone-bg: transparent;
|
|
12
|
+
--drop-zone-fg: var(--muted);
|
|
13
|
+
|
|
14
|
+
border: var(--border-width) dashed var(--drop-zone-border);
|
|
15
|
+
background-color: var(--drop-zone-bg);
|
|
16
|
+
color: var(--drop-zone-fg);
|
|
17
|
+
|
|
18
|
+
transition:
|
|
19
|
+
background-color 150ms var(--ease-smooth),
|
|
20
|
+
border-color 150ms var(--ease-smooth);
|
|
21
|
+
@apply motion-reduce:transition-none;
|
|
22
|
+
|
|
23
|
+
@media (hover: hover) {
|
|
24
|
+
&:hover,
|
|
25
|
+
&[data-hovered="true"] {
|
|
26
|
+
--drop-zone-border: var(--field-border-hover);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* The ring is painted for the hidden file input inside, which is what a keyboard focuses. */
|
|
31
|
+
&[data-focus-visible="true"] {
|
|
32
|
+
@apply status-focused;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* A drag the zone would take. Both the line and the fill move, because the fill alone is a
|
|
36
|
+
* ~15% tint that a light theme barely separates from the page. */
|
|
37
|
+
&[data-drop-target="true"] {
|
|
38
|
+
--drop-zone-border: var(--accent);
|
|
39
|
+
--drop-zone-bg: var(--accent-soft);
|
|
40
|
+
--drop-zone-fg: var(--foreground);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/* A drag carrying a type `accept` rules out.
|
|
44
|
+
*
|
|
45
|
+
* Accept takes `--accent` to match the one drop state the library already had
|
|
46
|
+
* (`--table-cell-bg-drop-target`), which leaves the two verdicts a hue apart in most themes
|
|
47
|
+
* but nearly together in one whose accent is itself red — measured at hue 28 for both under
|
|
48
|
+
* `netflix`, separated only by lightness. That is a collision only the theme can settle, and
|
|
49
|
+
* the properties above are how: repoint `--drop-zone-border` and `--drop-zone-bg`. */
|
|
50
|
+
&[data-status="reject"] {
|
|
51
|
+
--drop-zone-border: var(--danger);
|
|
52
|
+
--drop-zone-bg: var(--danger-soft);
|
|
53
|
+
--drop-zone-fg: var(--foreground);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/* Forced Colors Mode forces every colour to a system keyword, so the accent and danger fills
|
|
57
|
+
* above flatten onto the page and the three states become one dashed box. The border is the
|
|
58
|
+
* only channel left that the platform still lets a rule choose, hence the keywords. */
|
|
59
|
+
@media (forced-colors: active) {
|
|
60
|
+
&[data-drop-target="true"] {
|
|
61
|
+
border-color: Highlight;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&[data-status="reject"] {
|
|
65
|
+
border-color: LinkText;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
&[data-disabled="true"] {
|
|
70
|
+
@apply status-disabled;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.drop-zone__trigger {
|
|
75
|
+
@apply rounded-field underline underline-offset-2 outline-none;
|
|
76
|
+
|
|
77
|
+
cursor: var(--cursor-interactive);
|
|
78
|
+
}
|
|
@@ -2,10 +2,6 @@
|
|
|
2
2
|
.error-message {
|
|
3
3
|
@apply h-auto text-xs wrap-break-word text-danger;
|
|
4
4
|
|
|
5
|
-
/**
|
|
6
|
-
* Transitions
|
|
7
|
-
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
|
|
8
|
-
*/
|
|
9
5
|
transition:
|
|
10
6
|
opacity 150ms var(--ease-out),
|
|
11
7
|
height 350ms var(--ease-smooth);
|
|
@@ -2,10 +2,6 @@
|
|
|
2
2
|
.field-error {
|
|
3
3
|
@apply h-0 px-1 text-xs wrap-break-word text-danger opacity-0 data-visible:h-auto data-visible:opacity-100;
|
|
4
4
|
|
|
5
|
-
/**
|
|
6
|
-
* Transitions
|
|
7
|
-
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
|
|
8
|
-
*/
|
|
9
5
|
transition:
|
|
10
6
|
opacity 150ms var(--ease-out),
|
|
11
7
|
height 350ms var(--ease-smooth);
|
|
@@ -98,6 +98,7 @@
|
|
|
98
98
|
* ------------------------------------------------------------------------------------------------ */
|
|
99
99
|
@import "./checkbox-group.css";
|
|
100
100
|
@import "./checkbox.css";
|
|
101
|
+
@import "./drop-zone.css";
|
|
101
102
|
@import "./fieldset.css";
|
|
102
103
|
@import "./input-otp.css";
|
|
103
104
|
@import "./input.css";
|
|
@@ -31,6 +31,7 @@ export * from "./description";
|
|
|
31
31
|
export * from "./drawer";
|
|
32
32
|
export * from "./disclosure";
|
|
33
33
|
export * from "./disclosure-group";
|
|
34
|
+
export * from "./drop-zone";
|
|
34
35
|
export * from "./dropdown";
|
|
35
36
|
export * from "./empty-state";
|
|
36
37
|
export * from "./error-message";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AACA,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cA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C;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,OAAO,CAAC;AACtB,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC"}
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
/* Input group styles */
|
|
2
2
|
.input-group {
|
|
3
|
-
@apply inline-flex min-h-9 items-center rounded-field border
|
|
3
|
+
@apply inline-flex min-h-9 items-center rounded-field border text-sm text-field-foreground shadow-field outline-none;
|
|
4
|
+
|
|
5
|
+
/* The fill, per state. The `--secondary` variant re-points these and declares nothing else. */
|
|
6
|
+
--input-group-bg: var(--field-background, var(--default));
|
|
7
|
+
--input-group-bg-hover: var(--field-hover);
|
|
8
|
+
--input-group-bg-focus: var(--field-focus);
|
|
9
|
+
|
|
10
|
+
background-color: var(--input-group-bg);
|
|
4
11
|
border-width: var(--border-width-field);
|
|
5
12
|
border-color: var(--field-border);
|
|
6
13
|
|
|
@@ -19,10 +26,6 @@
|
|
|
19
26
|
height: auto;
|
|
20
27
|
}
|
|
21
28
|
|
|
22
|
-
/**
|
|
23
|
-
* Transitions
|
|
24
|
-
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
|
|
25
|
-
*/
|
|
26
29
|
transition:
|
|
27
30
|
background-color 150ms var(--ease-smooth),
|
|
28
31
|
border-color 150ms var(--ease-smooth),
|
|
@@ -33,7 +36,7 @@
|
|
|
33
36
|
@media (hover: hover) {
|
|
34
37
|
&:hover:not(:focus-within),
|
|
35
38
|
&[data-hovered="true"]:not([data-focus-within="true"]) {
|
|
36
|
-
|
|
39
|
+
background-color: var(--input-group-bg-hover);
|
|
37
40
|
border-color: var(--field-border-hover);
|
|
38
41
|
}
|
|
39
42
|
}
|
|
@@ -43,13 +46,13 @@
|
|
|
43
46
|
&:has([data-slot="input-group-textarea"]:focus) {
|
|
44
47
|
@apply status-focused-field;
|
|
45
48
|
border-color: var(--field-border-focus);
|
|
46
|
-
background-color: var(--
|
|
49
|
+
background-color: var(--input-group-bg-focus);
|
|
47
50
|
}
|
|
48
51
|
|
|
49
52
|
/* Invalid state */
|
|
50
53
|
&[data-invalid="true"] {
|
|
51
54
|
@apply status-invalid-field;
|
|
52
|
-
background-color: var(--
|
|
55
|
+
background-color: var(--input-group-bg-focus);
|
|
53
56
|
border-color: var(--color-field-border-invalid);
|
|
54
57
|
}
|
|
55
58
|
|
|
@@ -70,7 +73,7 @@
|
|
|
70
73
|
*/
|
|
71
74
|
&:has([data-slot="input-group-input"]:-webkit-autofill),
|
|
72
75
|
&:has([data-slot="input-group-input"]:autofill) {
|
|
73
|
-
background-color: var(--
|
|
76
|
+
background-color: var(--input-group-bg-focus);
|
|
74
77
|
border-color: var(--field-border-focus);
|
|
75
78
|
}
|
|
76
79
|
}
|
|
@@ -136,10 +139,6 @@
|
|
|
136
139
|
padding-top: 0.5rem;
|
|
137
140
|
}
|
|
138
141
|
|
|
139
|
-
/**
|
|
140
|
-
* Transitions
|
|
141
|
-
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
|
|
142
|
-
*/
|
|
143
142
|
transition:
|
|
144
143
|
background-color 150ms var(--ease-smooth),
|
|
145
144
|
border-color 150ms var(--ease-smooth);
|
|
@@ -162,10 +161,6 @@
|
|
|
162
161
|
padding-top: 0.5rem;
|
|
163
162
|
}
|
|
164
163
|
|
|
165
|
-
/**
|
|
166
|
-
* Transitions
|
|
167
|
-
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
|
|
168
|
-
*/
|
|
169
164
|
transition:
|
|
170
165
|
background-color 150ms var(--ease-smooth),
|
|
171
166
|
border-color 150ms var(--ease-smooth);
|
|
@@ -179,31 +174,11 @@
|
|
|
179
174
|
|
|
180
175
|
.input-group--secondary {
|
|
181
176
|
@apply shadow-none;
|
|
182
|
-
background-color: var(--input-group-bg);
|
|
183
177
|
|
|
184
178
|
--input-group-bg: var(--default);
|
|
185
179
|
--input-group-bg-hover: var(--default-hover);
|
|
186
180
|
--input-group-bg-focus: var(--default);
|
|
187
181
|
|
|
188
|
-
@media (hover: hover) {
|
|
189
|
-
&:hover:not(:focus-within),
|
|
190
|
-
&[data-hovered="true"]:not([data-focus-within="true"]) {
|
|
191
|
-
background-color: var(--input-group-bg-hover);
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
&:has([data-slot="input-group-input"]:focus),
|
|
196
|
-
&:has([data-slot="input-group-textarea"]:focus) {
|
|
197
|
-
background-color: var(--input-group-bg-focus);
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
/* Invalid state */
|
|
201
|
-
&[data-invalid="true"] {
|
|
202
|
-
@apply status-invalid-field;
|
|
203
|
-
border-color: var(--color-field-border-invalid);
|
|
204
|
-
background-color: var(--input-group-bg-focus);
|
|
205
|
-
}
|
|
206
|
-
|
|
207
182
|
[data-slot="input-group-input"],
|
|
208
183
|
[data-slot="input-group-textarea"] {
|
|
209
184
|
@apply bg-transparent;
|
|
@@ -15,16 +15,19 @@
|
|
|
15
15
|
/* Individual slot box - fully rounded, standalone */
|
|
16
16
|
.input-otp__slot {
|
|
17
17
|
@apply relative flex h-10 w-9.5 min-w-0 flex-1 items-center justify-center;
|
|
18
|
-
@apply border
|
|
18
|
+
@apply border text-field-foreground shadow-field;
|
|
19
|
+
|
|
20
|
+
/* The fill, per state. The `--secondary` variant re-points these and declares nothing else. */
|
|
21
|
+
--input-otp-slot-bg: var(--field-background, var(--default));
|
|
22
|
+
--input-otp-slot-bg-hover: var(--field-hover);
|
|
23
|
+
--input-otp-slot-bg-focus: var(--field-focus);
|
|
24
|
+
|
|
25
|
+
background-color: var(--input-otp-slot-bg);
|
|
19
26
|
@apply rounded-field text-sm font-semibold outline-none;
|
|
20
27
|
|
|
21
28
|
border-width: var(--border-width-field);
|
|
22
29
|
border-color: var(--field-border);
|
|
23
30
|
|
|
24
|
-
/**
|
|
25
|
-
* Transitions
|
|
26
|
-
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
|
|
27
|
-
*/
|
|
28
31
|
transition:
|
|
29
32
|
background-color 150ms var(--ease-smooth),
|
|
30
33
|
border-color 150ms var(--ease-smooth),
|
|
@@ -35,19 +38,21 @@
|
|
|
35
38
|
@media (hover: hover) {
|
|
36
39
|
&:hover,
|
|
37
40
|
&[data-hovered="true"] {
|
|
38
|
-
|
|
41
|
+
background-color: var(--input-otp-slot-bg-hover);
|
|
39
42
|
border-color: var(--field-border-hover);
|
|
40
43
|
}
|
|
41
44
|
}
|
|
42
45
|
|
|
43
46
|
/* Active/Focus */
|
|
44
47
|
&[data-active="true"] {
|
|
45
|
-
@apply z-10
|
|
48
|
+
@apply z-10 status-focused-field;
|
|
49
|
+
|
|
50
|
+
background-color: var(--input-otp-slot-bg-focus);
|
|
46
51
|
}
|
|
47
52
|
|
|
48
53
|
/* Filled */
|
|
49
54
|
&[data-filled="true"] {
|
|
50
|
-
|
|
55
|
+
background-color: var(--input-otp-slot-bg-focus);
|
|
51
56
|
}
|
|
52
57
|
|
|
53
58
|
/* Disabled */
|
|
@@ -58,7 +63,7 @@
|
|
|
58
63
|
/* Invalid */
|
|
59
64
|
&[data-invalid="true"] {
|
|
60
65
|
@apply status-invalid-field;
|
|
61
|
-
background-color: var(--
|
|
66
|
+
background-color: var(--input-otp-slot-bg-focus);
|
|
62
67
|
}
|
|
63
68
|
}
|
|
64
69
|
|
|
@@ -66,10 +71,6 @@
|
|
|
66
71
|
.input-otp__slot-value {
|
|
67
72
|
@apply text-lg leading-6 tracking-[-0.27px];
|
|
68
73
|
|
|
69
|
-
/**
|
|
70
|
-
* Animations
|
|
71
|
-
* CRITICAL: motion-reduce must be AFTER animation for correct override specificity
|
|
72
|
-
*/
|
|
73
74
|
animation: slot-value-in 250ms var(--ease-smooth) both;
|
|
74
75
|
transform-origin: bottom center;
|
|
75
76
|
@apply motion-reduce:animate-none;
|
|
@@ -92,23 +93,10 @@
|
|
|
92
93
|
|
|
93
94
|
.input-otp--secondary .input-otp__slot {
|
|
94
95
|
@apply shadow-none;
|
|
95
|
-
background-color: var(--input-otp-slot-bg);
|
|
96
96
|
|
|
97
97
|
--input-otp-slot-bg: var(--default);
|
|
98
98
|
--input-otp-slot-bg-hover: var(--default-hover);
|
|
99
99
|
--input-otp-slot-bg-focus: var(--default);
|
|
100
|
-
|
|
101
|
-
@media (hover: hover) {
|
|
102
|
-
&:hover,
|
|
103
|
-
&[data-hovered="true"] {
|
|
104
|
-
background-color: var(--input-otp-slot-bg-hover);
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
&[data-active="true"],
|
|
109
|
-
&[data-filled="true"] {
|
|
110
|
-
background-color: var(--input-otp-slot-bg-focus);
|
|
111
|
-
}
|
|
112
100
|
}
|
|
113
101
|
|
|
114
102
|
/* Animations */
|