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