@marianmeres/stuic 2.66.0 → 3.0.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/README.md +292 -4
- package/dist/README.md +41 -18
- package/dist/actions/index.d.ts +1 -0
- package/dist/actions/index.js +1 -0
- package/dist/actions/popover/README.md +19 -0
- package/dist/actions/popover/index.css +6 -9
- package/dist/actions/popover/popover.svelte.js +2 -2
- package/dist/actions/tooltip/README.md +18 -0
- package/dist/actions/tooltip/index.css +5 -8
- package/dist/actions/tooltip/tooltip.svelte.js +1 -1
- package/dist/actions/typeahead.svelte.d.ts +53 -0
- package/dist/actions/typeahead.svelte.js +328 -0
- package/dist/base.css +17 -0
- package/dist/components/AlertConfirmPrompt/AlertConfirmPrompt.svelte +10 -10
- package/dist/components/AlertConfirmPrompt/AlertConfirmPrompt.svelte.d.ts +4 -3
- package/dist/components/AlertConfirmPrompt/Current.svelte +15 -18
- package/dist/components/AlertConfirmPrompt/Current.svelte.d.ts +4 -3
- package/dist/components/AlertConfirmPrompt/acp-icons.js +5 -4
- package/dist/components/AlertConfirmPrompt/index.css +66 -0
- package/dist/components/AssetsPreview/AssetsPreview.svelte +91 -73
- package/dist/components/AssetsPreview/index.css +61 -0
- package/dist/components/Avatar/Avatar.svelte +31 -18
- package/dist/components/Avatar/README.md +166 -0
- package/dist/components/Avatar/index.css +130 -0
- package/dist/components/Backdrop/Backdrop.svelte +7 -2
- package/dist/components/Backdrop/README.md +71 -6
- package/dist/components/Backdrop/index.css +31 -0
- package/dist/components/Button/Button.svelte +116 -124
- package/dist/components/Button/Button.svelte.d.ts +35 -24
- package/dist/components/Button/README.md +87 -21
- package/dist/components/Button/index.css +475 -9
- package/dist/components/Button/index.d.ts +1 -1
- package/dist/components/Button/index.js +1 -1
- package/dist/components/ButtonGroupRadio/ButtonGroupRadio.svelte +7 -39
- package/dist/components/ButtonGroupRadio/ButtonGroupRadio.svelte.d.ts +0 -1
- package/dist/components/ButtonGroupRadio/README.md +82 -4
- package/dist/components/ButtonGroupRadio/index.css +158 -14
- package/dist/components/Collapsible/Collapsible.svelte +7 -7
- package/dist/components/Collapsible/Collapsible.svelte.d.ts +2 -2
- package/dist/components/Collapsible/README.md +34 -2
- package/dist/components/Collapsible/index.css +40 -0
- package/dist/components/CommandMenu/CommandMenu.svelte +18 -26
- package/dist/components/CommandMenu/CommandMenu.svelte.d.ts +0 -1
- package/dist/components/CommandMenu/README.md +39 -0
- package/dist/components/CommandMenu/index.css +47 -2
- package/dist/components/DismissibleMessage/DismissibleMessage.svelte +53 -51
- package/dist/components/DismissibleMessage/DismissibleMessage.svelte.d.ts +6 -6
- package/dist/components/DismissibleMessage/README.md +93 -11
- package/dist/components/DismissibleMessage/index.css +128 -8
- package/dist/components/DismissibleMessage/index.d.ts +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.svelte +14 -51
- package/dist/components/DropdownMenu/DropdownMenu.svelte.d.ts +6 -7
- package/dist/components/DropdownMenu/README.md +132 -0
- package/dist/components/DropdownMenu/index.css +258 -52
- package/dist/components/Input/FieldAssets.svelte +8 -5
- package/dist/components/Input/FieldCheckbox.svelte +7 -44
- package/dist/components/Input/FieldFile.svelte +1 -6
- package/dist/components/Input/FieldInput.svelte +9 -1
- package/dist/components/Input/FieldInput.svelte.d.ts +2 -0
- package/dist/components/Input/FieldOptions.svelte +42 -39
- package/dist/components/Input/FieldRadios.svelte +7 -16
- package/dist/components/Input/FieldSelect.svelte +1 -1
- package/dist/components/Input/FieldSwitch.svelte +1 -5
- package/dist/components/Input/FieldTextarea.svelte +1 -1
- package/dist/components/Input/README.md +194 -0
- package/dist/components/Input/_internal/FieldRadioInternal.svelte +2 -40
- package/dist/components/Input/_internal/InputWrap.svelte +8 -48
- package/dist/components/Input/index.css +524 -116
- package/dist/components/KbdShortcut/KbdShortcut.svelte +4 -12
- package/dist/components/KbdShortcut/README.md +34 -0
- package/dist/components/KbdShortcut/index.css +55 -0
- package/dist/components/ListItemButton/ListItemButton.svelte +37 -74
- package/dist/components/ListItemButton/ListItemButton.svelte.d.ts +1 -10
- package/dist/components/ListItemButton/README.md +100 -45
- package/dist/components/ListItemButton/index.css +173 -52
- package/dist/components/ListItemButton/index.d.ts +1 -1
- package/dist/components/ListItemButton/index.js +1 -1
- package/dist/components/Modal/Modal.svelte +1 -8
- package/dist/components/Modal/README.md +29 -0
- package/dist/components/Modal/index.css +38 -0
- package/dist/components/ModalDialog/ModalDialog.svelte +2 -21
- package/dist/components/ModalDialog/README.md +35 -0
- package/dist/components/ModalDialog/index.css +59 -0
- package/dist/components/Nav/Nav.svelte +732 -0
- package/dist/components/Nav/Nav.svelte.d.ts +110 -0
- package/dist/components/Nav/README.md +334 -0
- package/dist/components/Nav/index.css +318 -0
- package/dist/components/Nav/index.d.ts +1 -0
- package/dist/components/Nav/index.js +1 -0
- package/dist/components/Notifications/Notifications.svelte +44 -129
- package/dist/components/Notifications/Notifications.svelte.d.ts +9 -18
- package/dist/components/Notifications/README.md +186 -70
- package/dist/components/Notifications/index.css +212 -15
- package/dist/components/Notifications/notifications-stack.svelte.d.ts +4 -0
- package/dist/components/Notifications/notifications-stack.svelte.js +8 -0
- package/dist/components/Progress/Progress.svelte +4 -2
- package/dist/components/Progress/Progress.svelte.d.ts +1 -0
- package/dist/components/Progress/README.md +97 -11
- package/dist/components/Progress/_internal/Bar.svelte +4 -15
- package/dist/components/Progress/_internal/Bar.svelte.d.ts +1 -1
- package/dist/components/Progress/_internal/Circle.svelte +30 -2
- package/dist/components/Progress/_internal/Circle.svelte.d.ts +1 -0
- package/dist/components/Progress/index.css +50 -4
- package/dist/components/Skeleton/README.md +152 -0
- package/dist/components/Skeleton/Skeleton.svelte +9 -9
- package/dist/components/Skeleton/Skeleton.svelte.d.ts +0 -1
- package/dist/components/Skeleton/index.css +72 -45
- package/dist/components/Spinner/README.md +149 -37
- package/dist/components/Spinner/Spinner.svelte +14 -38
- package/dist/components/Spinner/Spinner.svelte.d.ts +2 -1
- package/dist/components/Spinner/SpinnerCircle.svelte +6 -34
- package/dist/components/Spinner/SpinnerCircle.svelte.d.ts +1 -0
- package/dist/components/Spinner/SpinnerCircleOscillate.svelte +10 -5
- package/dist/components/Spinner/SpinnerUnicode.svelte +3 -1
- package/dist/components/Spinner/SpinnerUnicode.svelte.d.ts +1 -0
- package/dist/components/Spinner/index.css +104 -0
- package/dist/components/Switch/README.md +45 -14
- package/dist/components/Switch/Switch.svelte +23 -48
- package/dist/components/Switch/Switch.svelte.d.ts +4 -2
- package/dist/components/Switch/index.css +121 -4
- package/dist/components/Switch/index.d.ts +1 -2
- package/dist/components/Switch/index.js +1 -2
- package/dist/components/TabbedMenu/README.md +37 -21
- package/dist/components/TabbedMenu/TabbedMenu.svelte +5 -46
- package/dist/components/TabbedMenu/TabbedMenu.svelte.d.ts +0 -1
- package/dist/components/TabbedMenu/index.css +84 -17
- package/dist/components/ThemePreview/README.md +289 -0
- package/dist/components/ThemePreview/ThemePreview.svelte +394 -0
- package/dist/components/ThemePreview/ThemePreview.svelte.d.ts +35 -0
- package/dist/components/ThemePreview/index.css +509 -0
- package/dist/components/ThemePreview/index.d.ts +1 -0
- package/dist/components/ThemePreview/index.js +1 -0
- package/dist/components/TwCheck/README.md +32 -13
- package/dist/components/TwCheck/TwCheck.svelte +11 -9
- package/dist/components/TwCheck/TwCheck.svelte.d.ts +0 -1
- package/dist/components/TwCheck/index.css +17 -2
- package/dist/components/TypeaheadInput/TypeaheadInput.svelte +20 -188
- package/dist/components/TypeaheadInput/TypeaheadInput.svelte.d.ts +4 -2
- package/dist/components/X/X.svelte +12 -5
- package/dist/components/X/X.svelte.d.ts +1 -0
- package/dist/icons/index.d.ts +1 -0
- package/dist/icons/index.js +1 -0
- package/dist/index.css +46 -26
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/themes/blue-orange.css +217 -0
- package/dist/themes/blue-orange.d.ts +6 -0
- package/dist/themes/blue-orange.js +175 -0
- package/dist/themes/cyan-red.css +217 -0
- package/dist/themes/cyan-red.d.ts +6 -0
- package/dist/themes/cyan-red.js +175 -0
- package/dist/themes/cyan-slate.css +217 -0
- package/dist/themes/cyan-slate.d.ts +6 -0
- package/dist/themes/cyan-slate.js +175 -0
- package/dist/themes/emerald-pink.css +217 -0
- package/dist/themes/emerald-pink.d.ts +6 -0
- package/dist/themes/emerald-pink.js +175 -0
- package/dist/themes/fuchsia-emerald.css +217 -0
- package/dist/themes/fuchsia-emerald.d.ts +6 -0
- package/dist/themes/fuchsia-emerald.js +175 -0
- package/dist/themes/gray.css +217 -0
- package/dist/themes/gray.d.ts +6 -0
- package/dist/themes/gray.js +175 -0
- package/dist/themes/indigo-amber.css +217 -0
- package/dist/themes/indigo-amber.d.ts +6 -0
- package/dist/themes/indigo-amber.js +175 -0
- package/dist/themes/neutral.css +217 -0
- package/dist/themes/neutral.d.ts +6 -0
- package/dist/themes/neutral.js +175 -0
- package/dist/themes/pink-emerald.css +217 -0
- package/dist/themes/pink-emerald.d.ts +6 -0
- package/dist/themes/pink-emerald.js +175 -0
- package/dist/themes/purple-yellow.css +217 -0
- package/dist/themes/purple-yellow.d.ts +6 -0
- package/dist/themes/purple-yellow.js +175 -0
- package/dist/themes/rainbow.css +217 -0
- package/dist/themes/rainbow.d.ts +6 -0
- package/dist/themes/rainbow.js +180 -0
- package/dist/themes/red-blue.css +217 -0
- package/dist/themes/red-blue.d.ts +6 -0
- package/dist/themes/red-blue.js +175 -0
- package/dist/themes/red-cyan.css +217 -0
- package/dist/themes/red-cyan.d.ts +6 -0
- package/dist/themes/red-cyan.js +175 -0
- package/dist/themes/rose-teal.css +217 -0
- package/dist/themes/rose-teal.d.ts +6 -0
- package/dist/themes/rose-teal.js +175 -0
- package/dist/themes/sky-amber.css +217 -0
- package/dist/themes/sky-amber.d.ts +6 -0
- package/dist/themes/sky-amber.js +175 -0
- package/dist/themes/slate-cyan.css +217 -0
- package/dist/themes/slate-cyan.d.ts +6 -0
- package/dist/themes/slate-cyan.js +175 -0
- package/dist/themes/tailwind-color-pairs.md +31 -0
- package/dist/themes/teal-rose.css +217 -0
- package/dist/themes/teal-rose.d.ts +6 -0
- package/dist/themes/teal-rose.js +175 -0
- package/dist/themes/violet-lime.css +217 -0
- package/dist/themes/violet-lime.d.ts +6 -0
- package/dist/themes/violet-lime.js +175 -0
- package/dist/utils/design-tokens.d.ts +43 -0
- package/dist/utils/design-tokens.js +127 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +1 -0
- package/dist/utils/storage-abstraction.js +1 -1
- package/package.json +14 -11
- package/dist/components/Switch/SwitchButton.svelte +0 -135
- package/dist/components/Switch/SwitchButton.svelte.d.ts +0 -21
|
@@ -1,136 +1,544 @@
|
|
|
1
|
+
/* ============================================================================
|
|
2
|
+
INPUT COMPONENT TOKENS
|
|
3
|
+
Override globally: :root { --stuic-input-radius: 0; }
|
|
4
|
+
Override locally: <FieldInput style="--stuic-input-radius: 9999px;">
|
|
5
|
+
============================================================================ */
|
|
6
|
+
|
|
1
7
|
/* prettier-ignore */
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
--
|
|
8
|
+
:root {
|
|
9
|
+
/* Core customization */
|
|
10
|
+
--stuic-input-radius: var(--radius-md);
|
|
11
|
+
--stuic-input-font-family: var(--font-sans);
|
|
12
|
+
--stuic-input-transition: 150ms;
|
|
13
|
+
|
|
14
|
+
/* Focus ring */
|
|
15
|
+
--stuic-input-ring-width: 4px;
|
|
16
|
+
--stuic-input-ring-color: var(--stuic-color-ring);
|
|
17
|
+
|
|
18
|
+
/* Accent colors (existing, preserved for BC) */
|
|
19
|
+
--stuic-input-accent: var(--stuic-color-primary);
|
|
20
|
+
--stuic-input-accent-error: var(--stuic-color-destructive);
|
|
21
|
+
|
|
22
|
+
/* Color tokens - reference theme vars */
|
|
23
|
+
--stuic-input-bg: var(--stuic-color-input);
|
|
24
|
+
--stuic-input-border: var(--stuic-color-border);
|
|
25
|
+
--stuic-input-border-focus: var(--stuic-input-accent);
|
|
26
|
+
--stuic-input-text: var(--stuic-color-foreground);
|
|
27
|
+
--stuic-input-placeholder: var(--stuic-color-muted-foreground);
|
|
28
|
+
|
|
29
|
+
/* Size: sm */
|
|
30
|
+
--stuic-input-padding-x-sm: calc(var(--spacing) * 2.5);
|
|
31
|
+
--stuic-input-padding-y-sm: calc(var(--spacing) * 2);
|
|
32
|
+
--stuic-input-font-size-sm: var(--text-sm);
|
|
33
|
+
--stuic-input-min-height-sm: 2.5rem;
|
|
5
34
|
|
|
6
|
-
|
|
7
|
-
--
|
|
35
|
+
/* Size: md (default) */
|
|
36
|
+
--stuic-input-padding-x-md: calc(var(--spacing) * 3);
|
|
37
|
+
--stuic-input-padding-y-md: calc(var(--spacing) * 2.5);
|
|
38
|
+
--stuic-input-font-size-md: var(--text-base);
|
|
39
|
+
--stuic-input-min-height-md: 2.75rem;
|
|
40
|
+
|
|
41
|
+
/* Size: lg */
|
|
42
|
+
--stuic-input-padding-x-lg: calc(var(--spacing) * 4);
|
|
43
|
+
--stuic-input-padding-y-lg: calc(var(--spacing) * 3);
|
|
44
|
+
--stuic-input-font-size-lg: var(--text-lg);
|
|
45
|
+
--stuic-input-min-height-lg: 3rem;
|
|
46
|
+
|
|
47
|
+
/* Range input */
|
|
48
|
+
--stuic-input-range-thumb-size: 18px;
|
|
49
|
+
--stuic-input-range-track-height: 4px;
|
|
50
|
+
--stuic-input-range-track-radius: 18px;
|
|
51
|
+
--stuic-input-range-track-bg: var(--stuic-color-muted);
|
|
52
|
+
|
|
53
|
+
/* Checkbox/Radio specific */
|
|
54
|
+
--stuic-checkbox-size: 1.25rem;
|
|
55
|
+
--stuic-checkbox-radius: var(--radius-sm);
|
|
56
|
+
--stuic-radio-size: 1rem;
|
|
57
|
+
--stuic-checkbox-bg: var(--stuic-color-muted);
|
|
58
|
+
--stuic-checkbox-border: var(--stuic-color-border);
|
|
59
|
+
--stuic-checkbox-checked-bg: var(--stuic-input-accent);
|
|
60
|
+
--stuic-checkbox-checked-border: var(--stuic-input-accent);
|
|
61
|
+
|
|
62
|
+
/* FieldOptions specific */
|
|
63
|
+
--stuic-field-options-divider: var(--stuic-color-border);
|
|
64
|
+
--stuic-field-options-control-text: var(--stuic-color-muted-foreground);
|
|
65
|
+
--stuic-field-options-control-text-hover: var(--stuic-color-foreground);
|
|
66
|
+
--stuic-field-options-control-ring: var(--stuic-color-ring);
|
|
67
|
+
--stuic-field-options-muted-text: var(--stuic-color-muted-foreground);
|
|
68
|
+
--stuic-field-options-optgroup-text: var(--stuic-color-muted-foreground);
|
|
8
69
|
}
|
|
9
70
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
71
|
+
@layer components {
|
|
72
|
+
/* ============================================================================
|
|
73
|
+
BASE INPUT ELEMENT STYLES
|
|
74
|
+
Replaces @tailwindcss/forms plugin for input elements
|
|
75
|
+
============================================================================ */
|
|
76
|
+
|
|
77
|
+
.stuic-input
|
|
78
|
+
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not(
|
|
79
|
+
[type="file"]
|
|
80
|
+
),
|
|
81
|
+
.stuic-input textarea,
|
|
82
|
+
.stuic-input select {
|
|
83
|
+
/* Reset browser defaults */
|
|
84
|
+
appearance: none;
|
|
85
|
+
-webkit-appearance: none;
|
|
86
|
+
|
|
87
|
+
/* Layout */
|
|
88
|
+
display: block;
|
|
89
|
+
width: 100%;
|
|
90
|
+
flex: 1;
|
|
91
|
+
|
|
92
|
+
/* Box model - remove internal styling, let wrapper handle border/bg */
|
|
93
|
+
border: 0;
|
|
94
|
+
background: transparent;
|
|
95
|
+
border-radius: 0;
|
|
96
|
+
|
|
97
|
+
/* Typography */
|
|
98
|
+
font-family: var(--stuic-input-font-family);
|
|
99
|
+
color: var(--stuic-input-text);
|
|
100
|
+
letter-spacing: -0.025em;
|
|
101
|
+
|
|
102
|
+
/* Focus - remove browser defaults, wrapper handles focus ring */
|
|
103
|
+
&:focus {
|
|
104
|
+
outline: none;
|
|
105
|
+
box-shadow: none;
|
|
24
106
|
}
|
|
25
|
-
|
|
26
|
-
|
|
107
|
+
|
|
108
|
+
&:focus-visible {
|
|
109
|
+
outline: none;
|
|
27
110
|
}
|
|
111
|
+
|
|
112
|
+
/* Disabled state */
|
|
113
|
+
&:disabled {
|
|
114
|
+
cursor: not-allowed;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/* Placeholder */
|
|
118
|
+
&::placeholder {
|
|
119
|
+
color: var(--stuic-input-placeholder);
|
|
120
|
+
opacity: 0.5;
|
|
121
|
+
letter-spacing: -0.025em;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/* ============================================================================
|
|
126
|
+
SIZE VARIANTS
|
|
127
|
+
Applied via data-size attribute on .stuic-input
|
|
128
|
+
============================================================================ */
|
|
129
|
+
|
|
130
|
+
.stuic-input[data-size="sm"]
|
|
131
|
+
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not(
|
|
132
|
+
[type="file"]
|
|
133
|
+
),
|
|
134
|
+
.stuic-input[data-size="sm"] textarea,
|
|
135
|
+
.stuic-input[data-size="sm"] select {
|
|
136
|
+
padding: var(--stuic-input-padding-y-sm) var(--stuic-input-padding-x-sm);
|
|
137
|
+
font-size: var(--stuic-input-font-size-sm);
|
|
138
|
+
min-height: var(--stuic-input-min-height-sm);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.stuic-input[data-size="sm"] select {
|
|
142
|
+
padding-right: 2.5rem;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.stuic-input[data-size="md"]
|
|
146
|
+
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not(
|
|
147
|
+
[type="file"]
|
|
148
|
+
),
|
|
149
|
+
.stuic-input[data-size="md"] textarea,
|
|
150
|
+
.stuic-input[data-size="md"] select,
|
|
151
|
+
.stuic-input:not([data-size])
|
|
152
|
+
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not(
|
|
153
|
+
[type="file"]
|
|
154
|
+
),
|
|
155
|
+
.stuic-input:not([data-size]) textarea,
|
|
156
|
+
.stuic-input:not([data-size]) select {
|
|
157
|
+
padding: var(--stuic-input-padding-y-md) var(--stuic-input-padding-x-md);
|
|
158
|
+
font-size: var(--stuic-input-font-size-md);
|
|
159
|
+
min-height: var(--stuic-input-min-height-md);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.stuic-input[data-size="md"] select,
|
|
163
|
+
.stuic-input:not([data-size]) select {
|
|
164
|
+
padding-right: 2.5rem;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.stuic-input[data-size="lg"]
|
|
168
|
+
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not(
|
|
169
|
+
[type="file"]
|
|
170
|
+
),
|
|
171
|
+
.stuic-input[data-size="lg"] textarea,
|
|
172
|
+
.stuic-input[data-size="lg"] select {
|
|
173
|
+
padding: var(--stuic-input-padding-y-lg) var(--stuic-input-padding-x-lg);
|
|
174
|
+
font-size: var(--stuic-input-font-size-lg);
|
|
175
|
+
min-height: var(--stuic-input-min-height-lg);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.stuic-input[data-size="lg"] select {
|
|
179
|
+
padding-right: 2.5rem;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/* Label sizing */
|
|
183
|
+
.stuic-input[data-size="sm"] .label-box label {
|
|
184
|
+
font-size: var(--stuic-input-font-size-sm);
|
|
28
185
|
}
|
|
29
186
|
|
|
30
|
-
|
|
31
|
-
|
|
187
|
+
.stuic-input[data-size="lg"] .label-box label {
|
|
188
|
+
font-weight: 600;
|
|
32
189
|
}
|
|
33
190
|
|
|
34
|
-
|
|
191
|
+
/* ============================================================================
|
|
192
|
+
INPUT WRAPPER STYLES
|
|
193
|
+
The visual container that provides border, background, and focus ring
|
|
194
|
+
============================================================================ */
|
|
195
|
+
|
|
196
|
+
.stuic-input .input-wrap {
|
|
197
|
+
background: var(--stuic-input-bg);
|
|
198
|
+
border: 1px solid var(--stuic-input-border);
|
|
199
|
+
border-radius: var(--stuic-input-radius);
|
|
200
|
+
transition:
|
|
201
|
+
border-color var(--stuic-input-transition),
|
|
202
|
+
box-shadow var(--stuic-input-transition);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.stuic-input .input-wrap:focus-within {
|
|
206
|
+
border-color: var(--stuic-input-border-focus);
|
|
207
|
+
box-shadow: 0 0 0 var(--stuic-input-ring-width) var(--stuic-input-ring-color);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/* Invalid state */
|
|
211
|
+
.stuic-input.invalid .input-wrap,
|
|
212
|
+
.stuic-input .input-wrap.invalid {
|
|
213
|
+
border-color: var(--stuic-input-accent-error);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.stuic-input.invalid .input-wrap:focus-within,
|
|
217
|
+
.stuic-input .input-wrap.invalid:focus-within {
|
|
218
|
+
border-color: var(--stuic-input-accent-error);
|
|
219
|
+
box-shadow: 0 0 0 var(--stuic-input-ring-width)
|
|
220
|
+
color-mix(in srgb, var(--stuic-input-accent-error) 20%, transparent);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/* Disabled state */
|
|
224
|
+
.stuic-input.disabled .input-wrap,
|
|
225
|
+
.stuic-input .input-wrap.disabled {
|
|
226
|
+
opacity: 0.5;
|
|
227
|
+
cursor: not-allowed;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
/* Transparent wrapper utility - for components like Switch that don't need wrapper styling */
|
|
231
|
+
.stuic-input .input-wrap.input-wrap-transparent,
|
|
232
|
+
.stuic-input.invalid .input-wrap.input-wrap-transparent,
|
|
233
|
+
.stuic-input .input-wrap.input-wrap-transparent:focus-within,
|
|
234
|
+
.stuic-input.invalid .input-wrap.input-wrap-transparent:focus-within {
|
|
235
|
+
background: transparent;
|
|
236
|
+
border: none;
|
|
237
|
+
box-shadow: none;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/* Size-specific input-wrap padding */
|
|
241
|
+
.stuic-input[data-size="lg"] .input-wrap {
|
|
242
|
+
padding: calc(var(--spacing) * 1);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
/* ============================================================================
|
|
246
|
+
VALIDATION MESSAGE
|
|
247
|
+
============================================================================ */
|
|
248
|
+
|
|
249
|
+
.stuic-input .validation-box {
|
|
250
|
+
color: var(--stuic-input-accent-error);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/* ============================================================================
|
|
254
|
+
SELECT SPECIFIC
|
|
255
|
+
Custom dropdown arrow since we removed @tailwindcss/forms
|
|
256
|
+
============================================================================ */
|
|
257
|
+
|
|
258
|
+
.stuic-input select {
|
|
259
|
+
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
|
|
260
|
+
background-position: right 0.5rem center;
|
|
261
|
+
background-repeat: no-repeat;
|
|
262
|
+
background-size: 1.5em 1.5em;
|
|
263
|
+
cursor: pointer;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/* ============================================================================
|
|
267
|
+
TEXTAREA SPECIFIC
|
|
268
|
+
============================================================================ */
|
|
269
|
+
|
|
270
|
+
.stuic-input textarea {
|
|
35
271
|
scrollbar-width: thin;
|
|
272
|
+
resize: vertical;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
/* ============================================================================
|
|
276
|
+
FILE INPUT
|
|
277
|
+
============================================================================ */
|
|
278
|
+
|
|
279
|
+
.stuic-input input[type="file"] {
|
|
280
|
+
padding: 0;
|
|
281
|
+
cursor: pointer;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
/* Remove padding from file input wrapper */
|
|
285
|
+
.stuic-input:has(input[type="file"]) .input-wrap {
|
|
286
|
+
padding: 0;
|
|
36
287
|
}
|
|
37
288
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
--
|
|
42
|
-
--
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
289
|
+
.stuic-input input[type="file"]::file-selector-button {
|
|
290
|
+
padding: var(--stuic-input-padding-y-md) var(--stuic-input-padding-x-md);
|
|
291
|
+
margin-right: 1rem;
|
|
292
|
+
background: var(--stuic-color-muted);
|
|
293
|
+
color: var(--stuic-color-foreground);
|
|
294
|
+
border: 0;
|
|
295
|
+
border-radius: var(--stuic-input-radius);
|
|
296
|
+
cursor: pointer;
|
|
297
|
+
font-family: var(--stuic-input-font-family);
|
|
298
|
+
transition: background var(--stuic-input-transition);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.stuic-input input[type="file"]::file-selector-button:hover {
|
|
302
|
+
background: var(--stuic-color-muted-hover);
|
|
303
|
+
}
|
|
46
304
|
|
|
305
|
+
/* ============================================================================
|
|
306
|
+
RANGE INPUT
|
|
307
|
+
Custom styling since we removed @tailwindcss/forms
|
|
308
|
+
============================================================================ */
|
|
309
|
+
|
|
310
|
+
.stuic-input input[type="range"] {
|
|
47
311
|
width: 100%;
|
|
48
|
-
|
|
49
|
-
margin: calc(
|
|
312
|
+
padding: var(--stuic-input-padding-y-md) var(--stuic-input-padding-x-md);
|
|
313
|
+
margin: calc(
|
|
314
|
+
(var(--stuic-input-range-thumb-size) - var(--stuic-input-range-track-height)) / 2
|
|
315
|
+
)
|
|
316
|
+
0;
|
|
50
317
|
background-color: transparent;
|
|
51
318
|
appearance: none;
|
|
319
|
+
cursor: pointer;
|
|
320
|
+
}
|
|
52
321
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
322
|
+
.stuic-input input[type="range"]:focus {
|
|
323
|
+
outline: none;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
/* Webkit Track */
|
|
327
|
+
.stuic-input input[type="range"]::-webkit-slider-runnable-track {
|
|
328
|
+
width: 100%;
|
|
329
|
+
height: var(--stuic-input-range-track-height);
|
|
330
|
+
background: var(--stuic-input-range-track-bg);
|
|
331
|
+
border: 0;
|
|
332
|
+
border-radius: var(--stuic-input-range-track-radius);
|
|
333
|
+
cursor: pointer;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
/* Webkit Thumb */
|
|
337
|
+
.stuic-input input[type="range"]::-webkit-slider-thumb {
|
|
338
|
+
width: var(--stuic-input-range-thumb-size);
|
|
339
|
+
height: var(--stuic-input-range-thumb-size);
|
|
340
|
+
margin-top: calc(
|
|
341
|
+
-1 * (var(--stuic-input-range-thumb-size) - var(--stuic-input-range-track-height)) /
|
|
342
|
+
2
|
|
343
|
+
);
|
|
344
|
+
background-color: var(--stuic-input-accent);
|
|
345
|
+
border: 0;
|
|
346
|
+
border-radius: 50%;
|
|
347
|
+
cursor: pointer;
|
|
348
|
+
-webkit-appearance: none;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
/* Firefox Track */
|
|
352
|
+
.stuic-input input[type="range"]::-moz-range-track {
|
|
353
|
+
width: 100%;
|
|
354
|
+
height: var(--stuic-input-range-track-height);
|
|
355
|
+
background: var(--stuic-input-range-track-bg);
|
|
356
|
+
border: 0;
|
|
357
|
+
border-radius: var(--stuic-input-range-track-radius);
|
|
358
|
+
cursor: pointer;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
/* Firefox Thumb */
|
|
362
|
+
.stuic-input input[type="range"]::-moz-range-thumb {
|
|
363
|
+
width: var(--stuic-input-range-thumb-size);
|
|
364
|
+
height: var(--stuic-input-range-thumb-size);
|
|
365
|
+
background-color: var(--stuic-input-accent);
|
|
366
|
+
border: 0;
|
|
367
|
+
border-radius: 50%;
|
|
368
|
+
cursor: pointer;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
/* MS Edge Track (legacy) */
|
|
372
|
+
.stuic-input input[type="range"]::-ms-track {
|
|
373
|
+
width: 100%;
|
|
374
|
+
height: var(--stuic-input-range-track-height);
|
|
375
|
+
background: transparent;
|
|
376
|
+
border-color: transparent;
|
|
377
|
+
color: transparent;
|
|
378
|
+
cursor: pointer;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
.stuic-input input[type="range"]::-ms-fill-lower,
|
|
382
|
+
.stuic-input input[type="range"]::-ms-fill-upper {
|
|
383
|
+
background: var(--stuic-input-range-track-bg);
|
|
384
|
+
border: 0;
|
|
385
|
+
border-radius: var(--stuic-input-range-track-radius);
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
.stuic-input input[type="range"]::-ms-thumb {
|
|
389
|
+
width: var(--stuic-input-range-thumb-size);
|
|
390
|
+
height: var(--stuic-input-range-thumb-size);
|
|
391
|
+
background-color: var(--stuic-input-accent);
|
|
392
|
+
border: 0;
|
|
393
|
+
border-radius: 50%;
|
|
394
|
+
cursor: pointer;
|
|
395
|
+
margin-top: 0;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
/* ============================================================================
|
|
399
|
+
CHECKBOX STYLES
|
|
400
|
+
============================================================================ */
|
|
401
|
+
|
|
402
|
+
.stuic-checkbox input[type="checkbox"] {
|
|
403
|
+
appearance: none;
|
|
404
|
+
-webkit-appearance: none;
|
|
405
|
+
width: var(--stuic-checkbox-size);
|
|
406
|
+
height: var(--stuic-checkbox-size);
|
|
407
|
+
border-radius: var(--stuic-checkbox-radius);
|
|
408
|
+
background: var(--stuic-checkbox-bg);
|
|
409
|
+
border: 1px solid var(--stuic-checkbox-border);
|
|
410
|
+
cursor: pointer;
|
|
411
|
+
transition:
|
|
412
|
+
background var(--stuic-input-transition),
|
|
413
|
+
border-color var(--stuic-input-transition),
|
|
414
|
+
box-shadow var(--stuic-input-transition);
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
.stuic-checkbox input[type="checkbox"]:checked {
|
|
418
|
+
background: var(--stuic-checkbox-checked-bg);
|
|
419
|
+
border-color: var(--stuic-checkbox-checked-border);
|
|
420
|
+
background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
|
|
421
|
+
background-size: 100% 100%;
|
|
422
|
+
background-position: center;
|
|
423
|
+
background-repeat: no-repeat;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
.stuic-checkbox input[type="checkbox"]:focus {
|
|
427
|
+
outline: none;
|
|
428
|
+
border-color: var(--stuic-input-border-focus);
|
|
429
|
+
box-shadow: 0 0 0 var(--stuic-input-ring-width) var(--stuic-input-ring-color);
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
.stuic-checkbox input[type="checkbox"]:disabled {
|
|
433
|
+
cursor: not-allowed;
|
|
434
|
+
opacity: 0.5;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
.stuic-checkbox .validation-box {
|
|
438
|
+
color: var(--stuic-input-accent-error);
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
/* ============================================================================
|
|
442
|
+
RADIO STYLES
|
|
443
|
+
============================================================================ */
|
|
444
|
+
|
|
445
|
+
.stuic-radios .radios-box {
|
|
446
|
+
background: var(--stuic-input-bg);
|
|
447
|
+
border: 1px solid var(--stuic-input-border);
|
|
448
|
+
border-radius: var(--stuic-input-radius);
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
.stuic-radios.invalid .radios-box {
|
|
452
|
+
border-color: var(--stuic-input-accent-error);
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
.stuic-radios .validation-box {
|
|
456
|
+
color: var(--stuic-input-accent-error);
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
.stuic-radios input[type="radio"] {
|
|
460
|
+
appearance: none;
|
|
461
|
+
-webkit-appearance: none;
|
|
462
|
+
width: var(--stuic-radio-size);
|
|
463
|
+
height: var(--stuic-radio-size);
|
|
464
|
+
border-radius: 50%;
|
|
465
|
+
background: var(--stuic-checkbox-bg);
|
|
466
|
+
border: 1px solid var(--stuic-checkbox-border);
|
|
467
|
+
cursor: pointer;
|
|
468
|
+
transition:
|
|
469
|
+
background var(--stuic-input-transition),
|
|
470
|
+
border-color var(--stuic-input-transition),
|
|
471
|
+
box-shadow var(--stuic-input-transition);
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
.stuic-radios input[type="radio"]:checked {
|
|
475
|
+
background: var(--stuic-checkbox-checked-bg);
|
|
476
|
+
border-color: var(--stuic-checkbox-checked-border);
|
|
477
|
+
background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e");
|
|
478
|
+
background-size: 100% 100%;
|
|
479
|
+
background-position: center;
|
|
480
|
+
background-repeat: no-repeat;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
.stuic-radios input[type="radio"]:focus {
|
|
484
|
+
outline: none;
|
|
485
|
+
border-color: var(--stuic-input-border-focus);
|
|
486
|
+
box-shadow: 0 0 0 var(--stuic-input-ring-width) var(--stuic-input-ring-color);
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
.stuic-radios input[type="radio"]:disabled {
|
|
490
|
+
cursor: not-allowed;
|
|
491
|
+
opacity: 0.5;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
/* ============================================================================
|
|
495
|
+
FIELD OPTIONS COMPONENT STYLES
|
|
496
|
+
============================================================================ */
|
|
497
|
+
|
|
498
|
+
/* Control buttons (Select All, Clear) */
|
|
499
|
+
.stuic-field-options-control {
|
|
500
|
+
color: var(--stuic-field-options-control-text);
|
|
501
|
+
transition: color 150ms;
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
.stuic-field-options-control:hover:not(:disabled),
|
|
505
|
+
.stuic-field-options-control:focus-visible {
|
|
506
|
+
color: var(--stuic-field-options-control-text-hover);
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
.stuic-field-options-control:focus-visible {
|
|
510
|
+
outline: 2px solid var(--stuic-field-options-control-ring);
|
|
511
|
+
outline-offset: 1px;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
.stuic-field-options-control:disabled,
|
|
515
|
+
.stuic-field-options-control[data-disabled] {
|
|
516
|
+
opacity: 0.5;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
/* Muted/secondary text */
|
|
520
|
+
.stuic-field-options-muted {
|
|
521
|
+
color: var(--stuic-field-options-muted-text);
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
/* Placeholder/loading states */
|
|
525
|
+
.stuic-field-options-placeholder {
|
|
526
|
+
color: var(--stuic-field-options-muted-text);
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
/* Optgroup labels */
|
|
530
|
+
.stuic-field-options-optgroup {
|
|
531
|
+
color: var(--stuic-field-options-optgroup-text);
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
/* Icon states - inherit color from parent ListItemButton */
|
|
535
|
+
.stuic-field-options-icon {
|
|
536
|
+
color: inherit;
|
|
537
|
+
opacity: 0.5;
|
|
538
|
+
transition: opacity 150ms;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
.stuic-field-options-icon--selected {
|
|
542
|
+
opacity: 1;
|
|
135
543
|
}
|
|
136
544
|
}
|