tyrell-components 1.0.0-RC14 → 1.0.0-RC15

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 (113) hide show
  1. package/README.md +9 -1
  2. package/css/tyrell-theme.css +25 -2
  3. package/css/tyrell.css +4 -0
  4. package/dist/tyrell-colors-static.css +1 -316
  5. package/dist/tyrell-theme.css +1 -1443
  6. package/dist/tyrell.css +1 -1390
  7. package/dist/tyrell.js +1 -1
  8. package/lib/base/ty-component.js +196 -196
  9. package/lib/components/button.d.ts +1 -1
  10. package/lib/components/button.js +261 -259
  11. package/lib/components/calendar-month.d.ts +2 -2
  12. package/lib/components/calendar-month.js +439 -416
  13. package/lib/components/calendar-navigation.js +238 -238
  14. package/lib/components/calendar.d.ts +5 -3
  15. package/lib/components/calendar.js +611 -602
  16. package/lib/components/checkbox.d.ts +1 -1
  17. package/lib/components/checkbox.js +273 -272
  18. package/lib/components/copy.d.ts +1 -1
  19. package/lib/components/copy.js +280 -278
  20. package/lib/components/date-picker.d.ts +8 -1
  21. package/lib/components/date-picker.js +1128 -1108
  22. package/lib/components/file-upload.js +404 -404
  23. package/lib/components/icon.js +141 -141
  24. package/lib/components/input.d.ts +1 -1
  25. package/lib/components/input.js +593 -596
  26. package/lib/components/modal.js +319 -319
  27. package/lib/components/option.js +167 -167
  28. package/lib/components/popup.js +233 -233
  29. package/lib/components/radio.d.ts +2 -2
  30. package/lib/components/radio.js +407 -406
  31. package/lib/components/resize-observer.js +67 -67
  32. package/lib/components/scroll-container.js +292 -294
  33. package/lib/components/select.d.ts +71 -12
  34. package/lib/components/select.js +1605 -1529
  35. package/lib/components/selected-tags.d.ts +1 -1
  36. package/lib/components/selected-tags.js +188 -182
  37. package/lib/components/step.js +62 -62
  38. package/lib/components/switch.d.ts +1 -1
  39. package/lib/components/switch.js +214 -213
  40. package/lib/components/tab.js +62 -62
  41. package/lib/components/tabs.d.ts +1 -0
  42. package/lib/components/tabs.js +523 -492
  43. package/lib/components/tag.d.ts +1 -1
  44. package/lib/components/tag.js +236 -235
  45. package/lib/components/textarea.d.ts +1 -1
  46. package/lib/components/textarea.js +457 -456
  47. package/lib/components/tooltip.js +283 -283
  48. package/lib/components/wizard.js +384 -384
  49. package/lib/icons/heroicons/micro.js +392 -392
  50. package/lib/icons/heroicons/mini.js +382 -382
  51. package/lib/icons/heroicons/outline.js +337 -337
  52. package/lib/icons/heroicons/solid.js +407 -407
  53. package/lib/icons/lucide.js +22843 -22843
  54. package/lib/icons/material/filled.js +9653 -9653
  55. package/lib/icons/material/outlined.js +10271 -10271
  56. package/lib/icons/material/round.js +10495 -10495
  57. package/lib/icons/material/sharp.js +9905 -9905
  58. package/lib/icons/material/two-tone.js +12792 -12792
  59. package/lib/index.js +21 -21
  60. package/lib/styles/button.js +200 -302
  61. package/lib/styles/calendar-month.js +123 -183
  62. package/lib/styles/calendar-navigation.d.ts +1 -1
  63. package/lib/styles/calendar-navigation.js +64 -79
  64. package/lib/styles/calendar.d.ts +1 -1
  65. package/lib/styles/calendar.js +9 -9
  66. package/lib/styles/checkbox.js +45 -72
  67. package/lib/styles/copy.js +67 -91
  68. package/lib/styles/custom-scrollbar.js +80 -100
  69. package/lib/styles/date-picker.js +261 -331
  70. package/lib/styles/field-size.d.ts +6 -0
  71. package/lib/styles/field-size.js +91 -0
  72. package/lib/styles/file-upload.js +139 -169
  73. package/lib/styles/icon.js +92 -156
  74. package/lib/styles/input.js +125 -241
  75. package/lib/styles/modal.js +67 -102
  76. package/lib/styles/option.d.ts +1 -1
  77. package/lib/styles/option.js +47 -67
  78. package/lib/styles/popup.js +34 -65
  79. package/lib/styles/radio.js +69 -96
  80. package/lib/styles/resize-observer.js +2 -5
  81. package/lib/styles/scroll-container.js +100 -130
  82. package/lib/styles/select-base.js +596 -773
  83. package/lib/styles/select.js +140 -228
  84. package/lib/styles/step.js +22 -29
  85. package/lib/styles/switch.js +34 -55
  86. package/lib/styles/tab.d.ts +1 -1
  87. package/lib/styles/tab.js +22 -29
  88. package/lib/styles/tabs.d.ts +1 -1
  89. package/lib/styles/tabs.js +186 -180
  90. package/lib/styles/tag.js +135 -188
  91. package/lib/styles/textarea.d.ts +1 -1
  92. package/lib/styles/textarea.js +205 -271
  93. package/lib/styles/tooltip.js +3 -3
  94. package/lib/styles/wizard.js +170 -226
  95. package/lib/types/common.d.ts +2 -0
  96. package/lib/types/common.js +6 -5
  97. package/lib/utils/calendar-utils.js +100 -100
  98. package/lib/utils/custom-scrollbar.js +272 -272
  99. package/lib/utils/flavor-sheet.js +14 -14
  100. package/lib/utils/icon-registry.js +127 -127
  101. package/lib/utils/loader-registry.js +3 -3
  102. package/lib/utils/locale.js +34 -34
  103. package/lib/utils/mobile.js +1 -1
  104. package/lib/utils/number-format.js +54 -54
  105. package/lib/utils/positioning.js +212 -212
  106. package/lib/utils/property-capture.js +36 -36
  107. package/lib/utils/property-manager.js +125 -125
  108. package/lib/utils/resize-observer.js +23 -23
  109. package/lib/utils/scroll-lock.js +57 -57
  110. package/lib/utils/styles.js +17 -17
  111. package/lib/version.d.ts +1 -1
  112. package/lib/version.js +1 -1
  113. package/package.json +4 -4
@@ -1,300 +1,212 @@
1
1
  export const selectStyles = `
2
- /* Compact skin hugs its content (field skin = base styles) */
3
2
  .select-stub.compact {
4
- display: inline-flex;
5
- flex-wrap: nowrap;
6
- width: auto;
7
- gap: 0.5rem;
8
- /* extra right padding = room for the absolutely-positioned chevron */
9
- padding: 0.5rem 2.25rem 0.5rem 0.875rem;
10
- }
11
-
12
- /* Consumer-provided trigger (slot="trigger"): no chrome at all */
3
+ display: inline-flex;
4
+ flex-wrap: nowrap;
5
+ width: auto;
6
+ gap: 0.5rem;
7
+ padding: 0.5rem 2.25rem 0.5rem 0.875rem;
8
+ }
13
9
  .select-stub.custom-trigger {
14
- display: inline-block;
15
- width: auto;
16
- border: none;
17
- background: none;
18
- padding: 0;
19
- min-height: 0;
20
- border-radius: 0;
10
+ display: inline-block;
11
+ width: auto;
12
+ border: none;
13
+ background: none;
14
+ padding: 0;
15
+ min-height: 0;
16
+ border-radius: 0;
21
17
  }
22
18
  .select-stub.custom-trigger:hover {
23
- border: none;
19
+ border: none;
24
20
  }
25
-
26
21
  .select-count {
27
- flex-shrink: 0;
28
- display: inline-flex;
29
- align-items: center;
30
- justify-content: center;
31
- min-width: 1.25rem;
32
- height: 1.25rem;
33
- padding: 0 0.375rem;
34
- border-radius: 9999px;
35
- /* --ty-text-primary never existed as a token — this silently fell back
36
- to inherited/unset color. Now follows the select's own flavor. */
37
- background: color-mix(in oklab, var(--select-accent, var(--ty-color-primary)) 15%, transparent);
38
- color: var(--select-accent-bold, var(--ty-color-primary-strong));
39
- font-size: var(--ty-font-xs);
40
- font-weight: var(--ty-font-semibold);
41
- font-style: normal;
22
+ flex-shrink: 0;
23
+ display: inline-flex;
24
+ align-items: center;
25
+ justify-content: center;
26
+ min-width: 1.25rem;
27
+ height: 1.25rem;
28
+ padding: 0 0.375rem;
29
+ border-radius: 9999px;
30
+ background: color-mix(in oklab, var(--select-accent, var(--ty-color-primary)) 15%, transparent);
31
+ color: var(--select-accent-bold, var(--ty-color-primary-strong));
32
+ font-size: var(--ty-font-xs);
33
+ font-weight: var(--ty-font-semibold);
34
+ font-style: normal;
42
35
  }
43
36
  .select-count[hidden] {
44
- display: none;
37
+ display: none;
45
38
  }
46
-
47
- /* Clear (x) button — normal flex child of .select-stub, not absolutely
48
- positioned like .dropdown-chevron: it just takes its own space in the
49
- row, no padding-right gutter math needed. Lives in the trigger slot's
50
- fallback content, so it's automatically absent under slot="trigger". */
51
39
  .select-clear {
52
- flex-shrink: 0;
53
- display: inline-flex;
54
- align-items: center;
55
- justify-content: center;
56
- width: 1rem;
57
- height: 1rem;
58
- padding: 0;
59
- border: none;
60
- background: none;
61
- color: var(--input-placeholder, var(--ty-input-placeholder));
62
- cursor: pointer;
63
- border-radius: var(--ty-radius-sm);
64
- transition: var(--ty-local-transition, all 0.15s ease);
40
+ flex-shrink: 0;
41
+ display: inline-flex;
42
+ align-items: center;
43
+ justify-content: center;
44
+ width: 1rem;
45
+ height: 1rem;
46
+ padding: 0;
47
+ border: none;
48
+ background: none;
49
+ color: var(--input-placeholder, var(--ty-input-placeholder));
50
+ cursor: pointer;
51
+ border-radius: var(--ty-radius-sm);
52
+ transition: var(--ty-local-transition, all 0.15s ease);
65
53
  }
66
54
  .select-clear[hidden] {
67
- display: none;
55
+ display: none;
68
56
  }
69
57
  .select-clear:hover {
70
- /* Destructive utility action — neutral at rest, warns danger-red on
71
- hover regardless of the field's own flavor. */
72
- color: var(--ty-color-danger);
73
- background-color: var(--ty-bg-danger-soft);
58
+ color: var(--ty-color-danger);
59
+ background-color: var(--ty-bg-danger-soft);
74
60
  }
75
61
  .select-clear svg {
76
- width: 100%;
77
- height: 100%;
78
- }
79
-
80
- /* Selection text (field skin): single line, ellipsis, input colors.
81
- flex-basis 0, not auto — .select-stub is flex-wrap:wrap, and auto's
82
- hypothetical size is the FULL untruncated text width (wrap-line
83
- assignment happens before shrinking), which pushed fixed-size siblings
84
- (.select-clear) onto a second line even though the text visibly had
85
- room after truncating. 0 makes this item contribute ~nothing to the
86
- line-fit check up front; grow/shrink + overflow:hidden still truncate
87
- it identically. */
62
+ width: 100%;
63
+ height: 100%;
64
+ }
88
65
  .select-stub .dropdown-placeholder {
89
- font-style: normal;
90
- flex: 1 1 0%;
91
- min-width: 0;
92
- overflow: hidden;
93
- text-overflow: ellipsis;
94
- white-space: nowrap;
95
- color: var(--input-color, var(--ty-input-color));
96
- }
97
-
66
+ font-style: normal;
67
+ flex: 1 1 0%;
68
+ min-width: 0;
69
+ overflow: hidden;
70
+ text-overflow: ellipsis;
71
+ white-space: nowrap;
72
+ color: var(--input-color, var(--ty-input-color));
73
+ }
98
74
  .select-stub .dropdown-placeholder.placeholder-shown {
99
- color: var(--input-placeholder, var(--ty-input-placeholder));
75
+ color: var(--input-placeholder, var(--ty-input-placeholder));
100
76
  }
101
77
  .select-stub .dropdown-placeholder[hidden] {
102
- display: none;
78
+ display: none;
103
79
  }
104
-
105
- /* Single-select display clone (slot="selected"): the selected ty-option
106
- projected into the stub — its own :host([cloned]) styling strips the
107
- list-row chrome; here it just takes the text's flex slot. */
108
80
  .select-stub slot[name="selected"] {
109
- display: none;
81
+ display: none;
110
82
  }
111
83
  .select-stub.has-clone slot[name="selected"] {
112
- display: block;
113
- /* flex-basis 0, not auto — same reasoning as .dropdown-placeholder above:
114
- .select-stub is flex-wrap:wrap, and auto's hypothetical size is the
115
- clone's full untruncated text width, which pushes .select-clear onto
116
- a second line. */
117
- flex: 1 1 0%;
118
- min-width: 0;
119
- overflow: hidden;
84
+ display: block;
85
+ flex: 1 1 0%;
86
+ min-width: 0;
87
+ overflow: hidden;
120
88
  }
121
89
  .select-stub.compact.has-clone slot[name="selected"] {
122
- flex: 0 1 auto;
90
+ flex: 0 1 auto;
123
91
  }
124
-
125
- /* start/end slot content (icons etc.) — spacing comes from the stub's flex
126
- gap; muted like ty-input adornments. end sits before the chevron. */
127
92
  .select-stub ::slotted([slot="start"]),
128
93
  .select-stub ::slotted([slot="end"]) {
129
- flex-shrink: 0;
130
- color: var(--ty-text-soft);
131
- }
132
-
133
- /* Compact skin: the text IS the trigger label — no grow, regular text color.
134
- flex-basis: auto (not the field skin's 0%) — content-hugging needs its
135
- natural content width as the starting point; 0% would collapse it since
136
- grow is also 0 here (nothing left to expand it back out). */
94
+ flex-shrink: 0;
95
+ color: var(--ty-text-soft);
96
+ }
137
97
  .select-stub.compact .dropdown-placeholder {
138
- flex: 0 1 auto;
139
- color: var(--ty-text);
98
+ flex: 0 1 auto;
99
+ color: var(--ty-text);
140
100
  }
141
-
142
- /* Trigger stays visible while the popup is open (the popup hides it) */
143
101
  .dropdown-wrapper:has(.dropdown-chevron.open) .select-stub {
144
- opacity: 1;
145
- pointer-events: auto;
102
+ opacity: 1;
103
+ pointer-events: auto;
146
104
  }
147
-
148
- /* One-panel popup: search header fused with the options list */
149
-
150
- /* Single unified shadow around the whole panel (header + list as one silhouette) */
151
105
  .dropdown-dialog.open {
152
- filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.14)) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.08));
153
- }
154
-
155
- /* Card-style header: the search input keeps its own bordered-field look
156
- (base styles) and sits inset in the panel, TagPicker-style — no divider,
157
- whitespace separates it from the list. The header's OWN surface/border is
158
- part of the floating panel's chrome, not a form field — --ty-surface-
159
- floating/--ty-floating-border, matching .dropdown-options below it (same
160
- reasoning as the base-panel fix: --ty-input-* is deliberately faint for
161
- resting form fields and read as a missing/mismatched edge here). */
106
+ filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.14)) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.08));
107
+ }
162
108
  .dropdown-header {
163
- background: var(--ty-surface-floating);
164
- border: 1px solid var(--ty-floating-border);
165
- border-bottom: none;
166
- border-radius: var(--ty-radius-lg) var(--ty-radius-lg) 0 0;
167
- padding: var(--ty-spacing-2) var(--ty-spacing-2) var(--ty-spacing-1);
109
+ background: var(--ty-surface-floating);
110
+ border: 1px solid var(--ty-floating-border);
111
+ border-bottom: none;
112
+ border-radius: var(--ty-radius-lg) var(--ty-radius-lg) 0 0;
113
+ padding: var(--ty-spacing-2) var(--ty-spacing-2) var(--ty-spacing-1);
168
114
  }
169
115
  .dropdown-dialog.position-below .dropdown-header {
170
- margin-bottom: 0;
116
+ margin-bottom: 0;
171
117
  }
172
118
  .dropdown-dialog.position-above .dropdown-header {
173
- margin-top: 0;
174
- border-top: none;
175
- border-bottom: 1px solid var(--ty-floating-border);
176
- border-radius: 0 0 var(--ty-radius-lg) var(--ty-radius-lg);
177
- padding: var(--ty-spacing-1) var(--ty-spacing-2) var(--ty-spacing-2);
178
- }
179
-
180
- /* Magnifier adornment inside the search field (header padding + field inset) */
119
+ margin-top: 0;
120
+ border-top: none;
121
+ border-bottom: 1px solid var(--ty-floating-border);
122
+ border-radius: 0 0 var(--ty-radius-lg) var(--ty-radius-lg);
123
+ padding: var(--ty-spacing-1) var(--ty-spacing-2) var(--ty-spacing-2);
124
+ }
181
125
  .dropdown-search-icon {
182
- position: absolute;
183
- top: 50%;
184
- left: calc(var(--ty-spacing-2) + var(--ty-spacing-3));
185
- transform: translateY(-50%);
186
- width: 1rem;
187
- height: 1rem;
188
- color: var(--input-placeholder, var(--ty-input-placeholder));
189
- pointer-events: none;
126
+ position: absolute;
127
+ top: 50%;
128
+ left: calc(var(--ty-spacing-2) + var(--ty-spacing-3));
129
+ transform: translateY(-50%);
130
+ width: 1rem;
131
+ height: 1rem;
132
+ color: var(--input-placeholder, var(--ty-input-placeholder));
133
+ pointer-events: none;
190
134
  }
191
135
  .dropdown-search-icon svg {
192
- width: 100%;
193
- height: 100%;
194
- }
195
-
196
- /* Mobile header: flex row, icon flows inline before the input. Same 32x32
197
- footprint as .mobile-close-button (18px glyph centered in the box, not a
198
- bare 18px glyph flush at the edge) so the row has two matching bookends —
199
- a bare icon on one side and a 32px circle on the other read as lopsided
200
- even with equal flex gap on both sides. Matching them also centers the
201
- search input's flex:1 fill symmetrically between the two. Fixed white +
202
- 18px glyph, same reasoning as .mobile-header-label — this sits on the
203
- dark ::backdrop blur in both themes, not a theme surface. */
136
+ width: 100%;
137
+ height: 100%;
138
+ }
204
139
  .dropdown-mode-mobile .mobile-header-content .dropdown-search-icon {
205
- position: static;
206
- transform: none;
207
- flex-shrink: 0;
208
- display: flex;
209
- align-items: center;
210
- justify-content: center;
211
- width: 32px;
212
- height: 32px;
213
- color: #ffffff;
140
+ position: static;
141
+ transform: none;
142
+ flex-shrink: 0;
143
+ display: flex;
144
+ align-items: center;
145
+ justify-content: center;
146
+ width: 32px;
147
+ height: 32px;
148
+ color: #ffffff;
214
149
  }
215
150
  .dropdown-mode-mobile .mobile-header-content .dropdown-search-icon svg {
216
- width: 18px;
217
- height: 18px;
151
+ width: 18px;
152
+ height: 18px;
218
153
  }
219
-
220
- /* Search input: bordered field from base styles; just size + icon room */
221
154
  .dropdown-search-input {
222
- min-height: 2.25rem;
223
- padding-right: var(--ty-spacing-2);
224
- /* room for the magnifier adornment */
225
- padding-left: calc(var(--ty-spacing-3) + 1rem + var(--ty-spacing-2));
155
+ min-height: 2.25rem;
156
+ padding-right: var(--ty-spacing-2);
157
+ padding-left: calc(var(--ty-spacing-3) + 1rem + var(--ty-spacing-2));
226
158
  }
227
- /* Trigger already has a chevron - no second one inside the search row */
228
159
  .dropdown-search-chevron {
229
- display: none;
160
+ display: none;
230
161
  }
231
-
232
- /* With the search row hidden nothing inside is focusable, so the <dialog>
233
- itself receives focus on open — suppress its UA focus ring */
234
162
  .dropdown-dialog:focus,
235
163
  .dropdown-dialog:focus-visible {
236
- outline: none;
164
+ outline: none;
237
165
  }
238
-
239
- /* Search row hidden ('auto' below threshold / searchable="false"):
240
- the options panel owns the whole silhouette */
241
166
  .dropdown-header[hidden] {
242
- display: none;
167
+ display: none;
243
168
  }
244
169
  .dropdown-header[hidden] ~ .dropdown-options-wrapper .dropdown-options {
245
- border-top: 1px solid var(--ty-floating-border);
246
- border-radius: var(--ty-radius-lg);
170
+ border-top: 1px solid var(--ty-floating-border);
171
+ border-radius: var(--ty-radius-lg);
247
172
  }
248
173
  .mobile-search-input[hidden],
249
174
  .mobile-header-content .dropdown-search-icon[hidden] {
250
- display: none;
175
+ display: none;
251
176
  }
252
-
253
- /* Options: vertical list rows fused under the search header.
254
- No own shadow/animation - the panel appears as one via dialog opacity. */
255
177
  .dropdown-options {
256
- flex-direction: column;
257
- flex-wrap: nowrap;
258
- align-items: stretch;
259
- gap: 0;
260
- /* Card-style list: rounded rows sit inset from the panel edges */
261
- padding: var(--ty-spacing-1);
262
- border-top: none;
263
- border-radius: 0 0 var(--ty-radius-lg) var(--ty-radius-lg);
264
- box-shadow: none;
265
- transform: none;
266
- transition: none;
267
- /* ~9-10 visible rows before scrolling (custom scrollbar, native hidden) */
268
- max-height: 24rem;
178
+ flex-direction: column;
179
+ flex-wrap: nowrap;
180
+ align-items: stretch;
181
+ gap: 0;
182
+ padding: var(--ty-spacing-1);
183
+ border-top: none;
184
+ border-radius: 0 0 var(--ty-radius-lg) var(--ty-radius-lg);
185
+ box-shadow: none;
186
+ transform: none;
187
+ transition: none;
188
+ max-height: 24rem;
269
189
  }
270
190
  .dropdown-dialog.position-below .dropdown-options {
271
- box-shadow: none;
191
+ box-shadow: none;
272
192
  }
273
193
  .dropdown-dialog.position-above .dropdown-options {
274
- border-top: 1px solid var(--ty-floating-border);
275
- border-bottom: none;
276
- border-radius: var(--ty-radius-lg) var(--ty-radius-lg) 0 0;
277
- }
278
-
279
- /* Loading panel continues the fused silhouette exactly like .dropdown-options —
280
- the base layer styles it as a floating card (radius + shadow), which left a
281
- see-through gap under the search header while loading. */
194
+ border-top: 1px solid var(--ty-floating-border);
195
+ border-bottom: none;
196
+ border-radius: var(--ty-radius-lg) var(--ty-radius-lg) 0 0;
197
+ }
282
198
  .dropdown-loading {
283
- border-top: none;
284
- border-radius: 0 0 var(--ty-radius-lg) var(--ty-radius-lg);
285
- box-shadow: none;
199
+ border-top: none;
200
+ border-radius: 0 0 var(--ty-radius-lg) var(--ty-radius-lg);
201
+ box-shadow: none;
286
202
  }
287
203
  .dropdown-dialog.position-above .dropdown-loading {
288
- border-top: 1px solid var(--ty-floating-border);
289
- border-bottom: none;
290
- border-radius: var(--ty-radius-lg) var(--ty-radius-lg) 0 0;
291
- }
292
-
293
- /* Selection tick lives inside ty-option (lucide check on [selected]) */
294
-
295
- /* Mobile modal: same vertical list */
204
+ border-top: 1px solid var(--ty-floating-border);
205
+ border-bottom: none;
206
+ border-radius: var(--ty-radius-lg) var(--ty-radius-lg) 0 0;
207
+ }
296
208
  .dropdown-mode-mobile .section-content ::slotted(ty-option) {
297
- display: block;
298
- width: 100%;
209
+ display: block;
210
+ width: 100%;
299
211
  }
300
212
  `;
@@ -1,46 +1,39 @@
1
1
  import { customScrollbarStyles } from './custom-scrollbar.js';
2
2
  export const stepStyles = `
3
3
  :host {
4
- width: var(--ty-wizard-width, 100%);
5
- height: calc(var(--ty-wizard-height, 700px) - var(--ty-wizard-indicators-height, 120px));
6
- display: block;
7
- box-sizing: border-box;
8
- flex-shrink: 0;
9
- transition: opacity var(--ty-wizard-transition-duration, 400ms) var(--ty-wizard-transition-easing, ease-in-out);
10
- }
11
-
4
+ width: var(--ty-wizard-width, 100%);
5
+ height: calc(var(--ty-wizard-height, 700px) - var(--ty-wizard-indicators-height, 120px));
6
+ display: block;
7
+ box-sizing: border-box;
8
+ flex-shrink: 0;
9
+ transition: opacity var(--ty-wizard-transition-duration, 400ms) var(--ty-wizard-transition-easing, ease-in-out);
10
+ }
12
11
  @media (prefers-reduced-motion: reduce) {
13
- :host {
14
- transition-duration: 0ms !important;
15
- }
12
+ :host {
13
+ transition-duration: 0ms !important;
14
+ }
16
15
  }
17
-
18
16
  .step-wrapper {
19
- width: 100%;
20
- height: 100%;
21
- position: relative;
22
- overflow: hidden;
17
+ width: 100%;
18
+ height: 100%;
19
+ position: relative;
20
+ overflow: hidden;
23
21
  }
24
-
25
22
  .step-panel {
26
- width: 100%;
27
- height: 100%;
28
- overflow: auto;
29
- box-sizing: border-box;
23
+ width: 100%;
24
+ height: 100%;
25
+ overflow: auto;
26
+ box-sizing: border-box;
30
27
  }
31
-
32
28
  .step-panel.ty-custom-scroll {
33
- scrollbar-width: none;
34
- -ms-overflow-style: none;
29
+ scrollbar-width: none;
30
+ -ms-overflow-style: none;
35
31
  }
36
-
37
32
  .step-panel.ty-custom-scroll::-webkit-scrollbar {
38
- display: none;
33
+ display: none;
39
34
  }
40
-
41
35
  .step-wrapper:hover .ty-scrollbar-track-y.has-overflow {
42
- opacity: 1;
36
+ opacity: 1;
43
37
  }
44
-
45
38
  ${customScrollbarStyles}
46
39
  `;
@@ -1,10 +1,10 @@
1
1
  import { FLAVORS } from "../types/common.js";
2
2
  import { inputStyles } from "./input.js";
3
3
  const switchFlavor = (f, fb) => {
4
- const tok = (s) => fb
5
- ? `var(--ty-color-${f}${s}, var(--ty-color-${fb}${s}))`
6
- : `var(--ty-color-${f}${s})`;
7
- return `
4
+ const tok = (s) => fb
5
+ ? `var(--ty-color-${f}${s}, var(--ty-color-${fb}${s}))`
6
+ : `var(--ty-color-${f}${s})`;
7
+ return `
8
8
  :host([flavor="${f}"]) { --switch-track: ${tok("")}; }
9
9
  :host([flavor="${f}+"]) { --switch-track: ${tok("-strong")}; }
10
10
  :host([flavor="${f}-"]) { --switch-track: ${tok("-soft")}; }
@@ -13,85 +13,64 @@ const switchFlavor = (f, fb) => {
13
13
  export const switchCustomFlavorCss = (base) => switchFlavor(base, "neutral");
14
14
  export const switchStyles = `
15
15
  ${inputStyles}
16
-
17
- /* Override input's :host so the switch sizes to its visual */
18
16
  :host {
19
- display: inline-flex;
20
- width: auto;
21
- vertical-align: middle;
17
+ display: inline-flex;
18
+ width: auto;
19
+ vertical-align: middle;
22
20
  }
23
-
24
- /* The switch container is just the visual */
25
21
  .switch-container {
26
- display: inline-block;
27
- cursor: pointer;
28
- user-select: none;
29
- outline: none;
30
- vertical-align: middle;
22
+ display: inline-block;
23
+ cursor: pointer;
24
+ user-select: none;
25
+ outline: none;
26
+ vertical-align: middle;
31
27
  }
32
-
33
28
  .switch-container.disabled {
34
- cursor: not-allowed;
35
- opacity: 0.55;
29
+ cursor: not-allowed;
30
+ opacity: 0.55;
36
31
  }
37
-
38
32
  .switch-container:focus-visible .switch-track,
39
33
  .switch-container.focused .switch-track {
40
- box-shadow: 0 0 0 3px var(--ty-input-shadow-focus);
34
+ box-shadow: 0 0 0 3px var(--ty-input-shadow-focus);
41
35
  }
42
-
43
36
  .switch-track {
44
- position: relative;
45
- flex-shrink: 0;
46
- width: 36px;
47
- height: 20px;
48
- border-radius: 999px;
49
- background: var(--ty-color-neutral-soft, var(--ty-input-border));
50
- transition: var(--ty-local-transition, background-color 0.18s ease-in-out);
51
- box-sizing: border-box;
37
+ position: relative;
38
+ flex-shrink: 0;
39
+ width: 36px;
40
+ height: 20px;
41
+ border-radius: 999px;
42
+ background: var(--ty-color-neutral-soft, var(--ty-input-border));
43
+ transition: var(--ty-local-transition, background-color 0.18s ease-in-out);
44
+ box-sizing: border-box;
52
45
  }
53
-
54
46
  .switch-thumb {
55
- position: absolute;
56
- top: 2px;
57
- left: 2px;
58
- width: 16px;
59
- height: 16px;
60
- border-radius: 50%;
61
- background: white;
62
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
63
- transition: var(--ty-local-transition, transform 0.18s ease-in-out, background-color 0.18s ease-in-out);
47
+ position: absolute;
48
+ top: 2px;
49
+ left: 2px;
50
+ width: 16px;
51
+ height: 16px;
52
+ border-radius: 50%;
53
+ background: white;
54
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
55
+ transition: var(--ty-local-transition, transform 0.18s ease-in-out, background-color 0.18s ease-in-out);
64
56
  }
65
-
66
- /* Default (no flavor attribute) is primary — defaults don't reflect to the
67
- host attribute, so the base rule's fallback carries the default look. */
68
57
  .switch-container[aria-checked="true"] .switch-track {
69
- background: var(--switch-track, var(--ty-color-primary));
58
+ background: var(--switch-track, var(--ty-color-primary));
70
59
  }
71
-
72
60
  .switch-container[aria-checked="true"] .switch-thumb {
73
- transform: translateX(16px);
61
+ transform: translateX(16px);
74
62
  }
75
-
76
63
  .switch-container.xs .switch-track { width: 26px; height: 14px; }
77
64
  .switch-container.xs .switch-thumb { width: 10px; height: 10px; }
78
65
  .switch-container.xs[aria-checked="true"] .switch-thumb { transform: translateX(12px); }
79
-
80
66
  .switch-container.sm .switch-track { width: 30px; height: 16px; }
81
67
  .switch-container.sm .switch-thumb { width: 12px; height: 12px; }
82
68
  .switch-container.sm[aria-checked="true"] .switch-thumb { transform: translateX(14px); }
83
-
84
- /* md is default — already set above */
85
-
86
69
  .switch-container.lg .switch-track { width: 44px; height: 24px; }
87
70
  .switch-container.lg .switch-thumb { width: 20px; height: 20px; }
88
71
  .switch-container.lg[aria-checked="true"] .switch-thumb { transform: translateX(20px); }
89
-
90
72
  .switch-container.xl .switch-track { width: 52px; height: 28px; }
91
73
  .switch-container.xl .switch-thumb { width: 24px; height: 24px; }
92
74
  .switch-container.xl[aria-checked="true"] .switch-thumb { transform: translateX(24px); }
93
-
94
- /* Flavor variants set --switch-track, consumed above */
95
75
  ${FLAVORS.map((f) => switchFlavor(f)).join("")}
96
-
97
76
  `;
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Tab Component Styles
3
3
  */
4
- export declare const tabStyles = "\n:host {\n width: var(--tabs-width, 100%);\n height: calc(var(--tabs-height, 400px) - var(--buttons-height, 48px));\n display: block;\n box-sizing: border-box;\n flex-shrink: 0;\n transition: opacity var(--transition-duration, 400ms) var(--transition-easing, ease-in-out);\n}\n\n@media (prefers-reduced-motion: reduce) {\n :host {\n transition-duration: 0ms !important;\n }\n}\n\n.tab-wrapper {\n width: 100%;\n height: 100%;\n position: relative;\n overflow: hidden;\n}\n\n.tab-panel {\n width: 100%;\n height: 100%;\n overflow: auto;\n box-sizing: border-box;\n}\n\n.tab-panel.ty-custom-scroll {\n scrollbar-width: none;\n -ms-overflow-style: none;\n}\n\n.tab-panel.ty-custom-scroll::-webkit-scrollbar {\n display: none;\n}\n\n.tab-wrapper:hover .ty-scrollbar-track-y.has-overflow {\n opacity: 1;\n}\n\n\n/* Vertical track */\n.ty-scrollbar-track-y {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n width: var(--ty-scrollbar-width, 8px);\n z-index: 3;\n opacity: 0;\n pointer-events: none;\n transition: opacity 0.25s ease-out;\n cursor: pointer;\n}\n\n.ty-scrollbar-track-y.has-overflow {\n pointer-events: auto;\n}\n\n.ty-scrollbar-track-y.has-overflow:hover,\n.ty-scrollbar-track-y.has-overflow.scrolling,\n.ty-scrollbar-track-y.dragging {\n opacity: 1;\n}\n\n.ty-scrollbar-track-y::before {\n content: '';\n position: absolute;\n inset: 0;\n background: var(--ty-scrollbar-track, transparent);\n border-radius: var(--ty-scrollbar-radius, 4px);\n opacity: 0;\n transition: opacity 0.15s ease-out;\n}\n\n.ty-scrollbar-track-y:hover::before,\n.ty-scrollbar-track-y.dragging::before {\n opacity: 1;\n background: var(--ty-scrollbar-track-hover, color-mix(in oklab, var(--ty-color-neutral-bold) 8%, transparent));\n}\n\n.ty-scrollbar-thumb-y {\n position: absolute;\n right: 0;\n width: 100%;\n min-height: var(--ty-scrollbar-thumb-min-height, 30px);\n background: var(--ty-scrollbar-thumb, color-mix(in oklab, var(--ty-color-neutral-bold) 40%, transparent));\n border-radius: var(--ty-scrollbar-radius, 4px);\n transition: var(--ty-local-transition, background 0.15s ease-out);\n box-sizing: border-box;\n border: 1px solid transparent;\n}\n\n.ty-scrollbar-thumb-y:hover,\n.ty-scrollbar-track-y.dragging .ty-scrollbar-thumb-y {\n background: var(--ty-scrollbar-thumb-hover, color-mix(in oklab, var(--ty-color-neutral-bold) 55%, transparent));\n}\n\n.ty-scrollbar-thumb-y:active,\n.ty-scrollbar-track-y.dragging .ty-scrollbar-thumb-y {\n background: var(--ty-scrollbar-thumb-active, color-mix(in oklab, var(--ty-color-neutral-bold) 70%, transparent));\n}\n\n/* Horizontal track */\n.ty-scrollbar-track-x {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n height: var(--ty-scrollbar-width, 8px);\n z-index: 3;\n opacity: 0;\n pointer-events: none;\n transition: opacity 0.25s ease-out;\n cursor: pointer;\n}\n\n.ty-scrollbar-track-x.has-overflow {\n pointer-events: auto;\n}\n\n.ty-scrollbar-track-x.has-overflow:hover,\n.ty-scrollbar-track-x.has-overflow.scrolling,\n.ty-scrollbar-track-x.dragging {\n opacity: 1;\n}\n\n.ty-scrollbar-track-x::before {\n content: '';\n position: absolute;\n inset: 0;\n background: var(--ty-scrollbar-track, transparent);\n border-radius: var(--ty-scrollbar-radius, 4px);\n opacity: 0;\n transition: opacity 0.15s ease-out;\n}\n\n.ty-scrollbar-track-x:hover::before,\n.ty-scrollbar-track-x.dragging::before {\n opacity: 1;\n background: var(--ty-scrollbar-track-hover, color-mix(in oklab, var(--ty-color-neutral-bold) 8%, transparent));\n}\n\n.ty-scrollbar-thumb-x {\n position: absolute;\n bottom: 0;\n height: 100%;\n min-width: var(--ty-scrollbar-thumb-min-height, 30px);\n background: var(--ty-scrollbar-thumb, color-mix(in oklab, var(--ty-color-neutral-bold) 40%, transparent));\n border-radius: var(--ty-scrollbar-radius, 4px);\n transition: var(--ty-local-transition, background 0.15s ease-out);\n box-sizing: border-box;\n border: 1px solid transparent;\n}\n\n.ty-scrollbar-thumb-x:hover,\n.ty-scrollbar-track-x.dragging .ty-scrollbar-thumb-x {\n background: var(--ty-scrollbar-thumb-hover, color-mix(in oklab, var(--ty-color-neutral-bold) 55%, transparent));\n}\n\n.ty-scrollbar-thumb-x:active,\n.ty-scrollbar-track-x.dragging .ty-scrollbar-thumb-x {\n background: var(--ty-scrollbar-thumb-active, color-mix(in oklab, var(--ty-color-neutral-bold) 70%, transparent));\n}\n\n/* Touch devices: hide the custom scrollbar */\n@media (pointer: coarse) and (hover: none) {\n .ty-scrollbar-track-y,\n .ty-scrollbar-track-x {\n display: none !important;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .ty-scrollbar-track-y,\n .ty-scrollbar-track-x,\n .ty-scrollbar-thumb-y,\n .ty-scrollbar-thumb-x {\n transition-duration: 0ms !important;\n }\n}\n\n";
4
+ export declare const tabStyles = "\n:host {\n width: var(--tabs-width, 100%);\n height: calc(var(--tabs-height, 400px) - var(--buttons-height, 48px));\n display: block;\n box-sizing: border-box;\n flex-shrink: 0;\n transition: opacity var(--ty-tabs-transition-duration, 400ms) var(--ty-tabs-transition-easing, ease-in-out);\n}\n\n@media (prefers-reduced-motion: reduce) {\n :host {\n transition-duration: 0ms !important;\n }\n}\n\n.tab-wrapper {\n width: 100%;\n height: 100%;\n position: relative;\n overflow: hidden;\n}\n\n.tab-panel {\n width: 100%;\n height: 100%;\n overflow: auto;\n box-sizing: border-box;\n}\n\n.tab-panel.ty-custom-scroll {\n scrollbar-width: none;\n -ms-overflow-style: none;\n}\n\n.tab-panel.ty-custom-scroll::-webkit-scrollbar {\n display: none;\n}\n\n.tab-wrapper:hover .ty-scrollbar-track-y.has-overflow {\n opacity: 1;\n}\n\n\n/* Vertical track */\n.ty-scrollbar-track-y {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n width: var(--ty-scrollbar-width, 8px);\n z-index: 3;\n opacity: 0;\n pointer-events: none;\n transition: opacity 0.25s ease-out;\n cursor: pointer;\n}\n\n.ty-scrollbar-track-y.has-overflow {\n pointer-events: auto;\n}\n\n.ty-scrollbar-track-y.has-overflow:hover,\n.ty-scrollbar-track-y.has-overflow.scrolling,\n.ty-scrollbar-track-y.dragging {\n opacity: 1;\n}\n\n.ty-scrollbar-track-y::before {\n content: '';\n position: absolute;\n inset: 0;\n background: var(--ty-scrollbar-track, transparent);\n border-radius: var(--ty-scrollbar-radius, 4px);\n opacity: 0;\n transition: opacity 0.15s ease-out;\n}\n\n.ty-scrollbar-track-y:hover::before,\n.ty-scrollbar-track-y.dragging::before {\n opacity: 1;\n background: var(--ty-scrollbar-track-hover, color-mix(in oklab, var(--ty-color-neutral-bold) 8%, transparent));\n}\n\n.ty-scrollbar-thumb-y {\n position: absolute;\n right: 0;\n width: 100%;\n min-height: var(--ty-scrollbar-thumb-min-height, 30px);\n background: var(--ty-scrollbar-thumb, color-mix(in oklab, var(--ty-color-neutral-bold) 40%, transparent));\n border-radius: var(--ty-scrollbar-radius, 4px);\n transition: var(--ty-local-transition, background 0.15s ease-out);\n box-sizing: border-box;\n border: 1px solid transparent;\n}\n\n.ty-scrollbar-thumb-y:hover,\n.ty-scrollbar-track-y.dragging .ty-scrollbar-thumb-y {\n background: var(--ty-scrollbar-thumb-hover, color-mix(in oklab, var(--ty-color-neutral-bold) 55%, transparent));\n}\n\n.ty-scrollbar-thumb-y:active,\n.ty-scrollbar-track-y.dragging .ty-scrollbar-thumb-y {\n background: var(--ty-scrollbar-thumb-active, color-mix(in oklab, var(--ty-color-neutral-bold) 70%, transparent));\n}\n\n/* Horizontal track */\n.ty-scrollbar-track-x {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n height: var(--ty-scrollbar-width, 8px);\n z-index: 3;\n opacity: 0;\n pointer-events: none;\n transition: opacity 0.25s ease-out;\n cursor: pointer;\n}\n\n.ty-scrollbar-track-x.has-overflow {\n pointer-events: auto;\n}\n\n.ty-scrollbar-track-x.has-overflow:hover,\n.ty-scrollbar-track-x.has-overflow.scrolling,\n.ty-scrollbar-track-x.dragging {\n opacity: 1;\n}\n\n.ty-scrollbar-track-x::before {\n content: '';\n position: absolute;\n inset: 0;\n background: var(--ty-scrollbar-track, transparent);\n border-radius: var(--ty-scrollbar-radius, 4px);\n opacity: 0;\n transition: opacity 0.15s ease-out;\n}\n\n.ty-scrollbar-track-x:hover::before,\n.ty-scrollbar-track-x.dragging::before {\n opacity: 1;\n background: var(--ty-scrollbar-track-hover, color-mix(in oklab, var(--ty-color-neutral-bold) 8%, transparent));\n}\n\n.ty-scrollbar-thumb-x {\n position: absolute;\n bottom: 0;\n height: 100%;\n min-width: var(--ty-scrollbar-thumb-min-height, 30px);\n background: var(--ty-scrollbar-thumb, color-mix(in oklab, var(--ty-color-neutral-bold) 40%, transparent));\n border-radius: var(--ty-scrollbar-radius, 4px);\n transition: var(--ty-local-transition, background 0.15s ease-out);\n box-sizing: border-box;\n border: 1px solid transparent;\n}\n\n.ty-scrollbar-thumb-x:hover,\n.ty-scrollbar-track-x.dragging .ty-scrollbar-thumb-x {\n background: var(--ty-scrollbar-thumb-hover, color-mix(in oklab, var(--ty-color-neutral-bold) 55%, transparent));\n}\n\n.ty-scrollbar-thumb-x:active,\n.ty-scrollbar-track-x.dragging .ty-scrollbar-thumb-x {\n background: var(--ty-scrollbar-thumb-active, color-mix(in oklab, var(--ty-color-neutral-bold) 70%, transparent));\n}\n\n/* Touch devices: hide the custom scrollbar */\n@media (pointer: coarse) and (hover: none) {\n .ty-scrollbar-track-y,\n .ty-scrollbar-track-x {\n display: none !important;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .ty-scrollbar-track-y,\n .ty-scrollbar-track-x,\n .ty-scrollbar-thumb-y,\n .ty-scrollbar-thumb-x {\n transition-duration: 0ms !important;\n }\n}\n\n";