tyrell-components 1.0.0-TC52 → 1.0.0-TC53

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 (105) hide show
  1. package/css/tyrell-theme.css +25 -2
  2. package/css/tyrell.css +4 -0
  3. package/dist/tyrell-colors-static.css +1 -316
  4. package/dist/tyrell-theme.css +1 -1443
  5. package/dist/tyrell.css +1 -1390
  6. package/dist/tyrell.js +1 -1
  7. package/lib/base/ty-component.js +196 -196
  8. package/lib/components/button.d.ts +1 -1
  9. package/lib/components/button.js +260 -259
  10. package/lib/components/calendar-month.d.ts +2 -2
  11. package/lib/components/calendar-month.js +426 -416
  12. package/lib/components/calendar-navigation.js +238 -238
  13. package/lib/components/calendar.js +605 -602
  14. package/lib/components/checkbox.d.ts +1 -1
  15. package/lib/components/checkbox.js +273 -272
  16. package/lib/components/copy.d.ts +1 -1
  17. package/lib/components/copy.js +279 -278
  18. package/lib/components/date-picker.d.ts +1 -1
  19. package/lib/components/date-picker.js +1103 -1108
  20. package/lib/components/file-upload.js +404 -404
  21. package/lib/components/icon.js +141 -141
  22. package/lib/components/input.d.ts +1 -1
  23. package/lib/components/input.js +593 -596
  24. package/lib/components/modal.js +319 -319
  25. package/lib/components/option.js +167 -167
  26. package/lib/components/popup.js +233 -233
  27. package/lib/components/radio.d.ts +2 -2
  28. package/lib/components/radio.js +407 -406
  29. package/lib/components/resize-observer.js +67 -67
  30. package/lib/components/scroll-container.js +294 -294
  31. package/lib/components/select.d.ts +1 -1
  32. package/lib/components/select.js +1524 -1532
  33. package/lib/components/selected-tags.js +184 -184
  34. package/lib/components/step.js +62 -62
  35. package/lib/components/switch.d.ts +1 -1
  36. package/lib/components/switch.js +214 -213
  37. package/lib/components/tab.js +62 -62
  38. package/lib/components/tabs.js +507 -507
  39. package/lib/components/tag.d.ts +1 -1
  40. package/lib/components/tag.js +236 -235
  41. package/lib/components/textarea.d.ts +1 -1
  42. package/lib/components/textarea.js +457 -456
  43. package/lib/components/tooltip.js +283 -283
  44. package/lib/components/wizard.js +384 -384
  45. package/lib/icons/heroicons/micro.js +392 -392
  46. package/lib/icons/heroicons/mini.js +382 -382
  47. package/lib/icons/heroicons/outline.js +337 -337
  48. package/lib/icons/heroicons/solid.js +407 -407
  49. package/lib/icons/lucide.js +22843 -22843
  50. package/lib/icons/material/filled.js +9653 -9653
  51. package/lib/icons/material/outlined.js +10271 -10271
  52. package/lib/icons/material/round.js +10495 -10495
  53. package/lib/icons/material/sharp.js +9905 -9905
  54. package/lib/icons/material/two-tone.js +12792 -12792
  55. package/lib/index.js +21 -21
  56. package/lib/styles/button.js +176 -288
  57. package/lib/styles/calendar-month.js +123 -183
  58. package/lib/styles/calendar-navigation.js +60 -79
  59. package/lib/styles/calendar.js +8 -9
  60. package/lib/styles/checkbox.js +45 -72
  61. package/lib/styles/copy.js +67 -91
  62. package/lib/styles/custom-scrollbar.js +80 -100
  63. package/lib/styles/date-picker.js +261 -331
  64. package/lib/styles/field-size.d.ts +6 -0
  65. package/lib/styles/field-size.js +91 -0
  66. package/lib/styles/file-upload.js +139 -169
  67. package/lib/styles/icon.js +92 -156
  68. package/lib/styles/input.js +125 -241
  69. package/lib/styles/modal.js +67 -102
  70. package/lib/styles/option.d.ts +1 -1
  71. package/lib/styles/option.js +47 -67
  72. package/lib/styles/popup.js +34 -65
  73. package/lib/styles/radio.js +69 -96
  74. package/lib/styles/resize-observer.js +2 -5
  75. package/lib/styles/scroll-container.js +100 -130
  76. package/lib/styles/select-base.js +525 -778
  77. package/lib/styles/select.js +140 -228
  78. package/lib/styles/step.js +22 -29
  79. package/lib/styles/switch.js +34 -55
  80. package/lib/styles/tab.js +22 -29
  81. package/lib/styles/tabs.js +171 -252
  82. package/lib/styles/tag.js +135 -188
  83. package/lib/styles/textarea.d.ts +1 -1
  84. package/lib/styles/textarea.js +205 -271
  85. package/lib/styles/tooltip.js +3 -3
  86. package/lib/styles/wizard.js +170 -226
  87. package/lib/types/common.d.ts +2 -0
  88. package/lib/types/common.js +6 -5
  89. package/lib/utils/calendar-utils.js +100 -100
  90. package/lib/utils/custom-scrollbar.js +272 -272
  91. package/lib/utils/flavor-sheet.js +14 -14
  92. package/lib/utils/icon-registry.js +127 -127
  93. package/lib/utils/loader-registry.js +3 -3
  94. package/lib/utils/locale.js +34 -34
  95. package/lib/utils/mobile.js +1 -1
  96. package/lib/utils/number-format.js +54 -54
  97. package/lib/utils/positioning.js +212 -212
  98. package/lib/utils/property-capture.js +36 -36
  99. package/lib/utils/property-manager.js +125 -125
  100. package/lib/utils/resize-observer.js +23 -23
  101. package/lib/utils/scroll-lock.js +57 -57
  102. package/lib/utils/styles.js +17 -17
  103. package/lib/version.d.ts +1 -1
  104. package/lib/version.js +1 -1
  105. package/package.json +4 -4
@@ -1,310 +1,194 @@
1
1
  import { FLAVORS } from "../types/common.js";
2
+ import { fieldSizeVars } from "./field-size.js";
2
3
  const inputFlavor = (f, fb) => {
3
- const c = (s) => fb
4
- ? s
5
- ? `var(--ty-color-${f}${s}, var(--ty-color-${f}, var(--ty-color-${fb}${s})))`
6
- : `var(--ty-color-${f}, var(--ty-color-${fb}))`
7
- : s
8
- ? `var(--ty-color-${f}${s}, var(--ty-color-${f}))`
9
- : `var(--ty-color-${f})`;
10
- return `
4
+ const c = (s) => fb
5
+ ? s
6
+ ? `var(--ty-color-${f}${s}, var(--ty-color-${f}, var(--ty-color-${fb}${s})))`
7
+ : `var(--ty-color-${f}, var(--ty-color-${fb}))`
8
+ : s
9
+ ? `var(--ty-color-${f}${s}, var(--ty-color-${f}))`
10
+ : `var(--ty-color-${f})`;
11
+ return `
11
12
  :host([flavor="${f}"]) {
12
- --input-accent: var(--ty-input-${f}-border, ${c("-soft")});
13
- --input-accent-bold: ${c("")};
14
- --input-ring: color-mix(in oklab, ${c("")} 15%, transparent);
13
+ --input-accent: var(--ty-input-${f}-border, ${c("-soft")});
14
+ --input-accent-bold: ${c("")};
15
+ --input-ring: color-mix(in oklab, ${c("")} 15%, transparent);
15
16
  }
16
17
  :host([flavor="${f}+"]) {
17
- --input-accent: ${c("")};
18
- --input-accent-bold: ${c("-strong")};
19
- --input-ring: color-mix(in oklab, ${c("-strong")} 15%, transparent);
18
+ --input-accent: ${c("")};
19
+ --input-accent-bold: ${c("-strong")};
20
+ --input-ring: color-mix(in oklab, ${c("-strong")} 15%, transparent);
20
21
  }
21
22
  :host([flavor="${f}-"]) {
22
- --input-accent: ${c("-faint")};
23
- --input-accent-bold: ${c("-soft")};
24
- --input-ring: color-mix(in oklab, ${c("-soft")} 15%, transparent);
23
+ --input-accent: ${c("-faint")};
24
+ --input-accent-bold: ${c("-soft")};
25
+ --input-ring: color-mix(in oklab, ${c("-soft")} 15%, transparent);
25
26
  }
26
27
  `;
27
28
  };
28
29
  export const inputCustomFlavorCss = (base) => inputFlavor(base, "neutral");
29
30
  export const inputStyles = `
31
+ ${fieldSizeVars}
30
32
  :host {
31
- display: block;
32
- font-family: inherit;
33
- width: 100%;
33
+ display: block;
34
+ font-family: inherit;
35
+ width: 100%;
34
36
  }
35
-
36
- :host([size="sm"]) {
37
- font-size: 14px;
38
- }
39
-
40
- :host([size="lg"]) {
41
- font-size: 18px;
42
- }
43
-
44
37
  .input-container {
45
- display: flex;
46
- flex-direction: column;
47
- width: 100%;
48
- box-sizing: border-box;
38
+ display: flex;
39
+ flex-direction: column;
40
+ width: 100%;
41
+ box-sizing: border-box;
49
42
  }
50
-
51
43
  .ty-field-label {
52
- font-size: var(--ty-font-sm);
53
- line-height: var(--ty-leading-sm);
54
- letter-spacing: var(--ty-tracking-sm);
55
- font-weight: var(--ty-font-medium);
56
- color: var(--ty-label-color);
57
- margin-bottom: 6px;
58
- padding-left: 12px;
59
- display: flex;
60
- align-items: center;
44
+ font-size: var(--ty-field-label-font);
45
+ line-height: var(--ty-field-label-leading);
46
+ letter-spacing: var(--ty-tracking-sm);
47
+ font-weight: var(--ty-font-medium);
48
+ color: var(--ty-label-color);
49
+ margin-bottom: var(--ty-field-label-gap);
50
+ padding-left: var(--ty-field-outer-pad-x);
51
+ display: flex;
52
+ align-items: center;
61
53
  }
62
-
63
54
  .required-icon {
64
- display: inline-flex;
65
- align-items: center;
66
- color: var(--ty-color-danger);
67
- width: 12px;
68
- height: 12px;
69
- margin-left: 4px;
70
- vertical-align: middle;
55
+ display: inline-flex;
56
+ align-items: center;
57
+ color: var(--ty-color-danger);
58
+ width: 12px;
59
+ height: 12px;
60
+ margin-left: 4px;
61
+ vertical-align: middle;
71
62
  }
72
-
73
63
  .required-icon svg {
74
- width: 100%;
75
- height: 100%;
64
+ width: 100%;
65
+ height: 100%;
76
66
  }
77
-
78
67
  .input-wrapper {
79
- display: flex;
80
- align-items: center;
81
- gap: 0.5rem;
82
- width: 100%;
83
- box-sizing: border-box;
84
- border: 1px solid var(--input-accent, var(--input-border, var(--ty-input-border)));
85
- border-radius: var(--ty-radius-base);
86
- background: var(--input-bg, var(--input-bg, var(--ty-input-bg)));
87
- transition: var(--ty-local-transition, all 0.15s ease-in-out);
88
-
89
- min-height: var(--ty-size-md);
90
- padding: 0 12px;
68
+ display: flex;
69
+ align-items: center;
70
+ gap: 0.5rem;
71
+ width: 100%;
72
+ box-sizing: border-box;
73
+ border: 1px solid var(--input-accent, var(--input-border, var(--ty-input-border)));
74
+ border-radius: var(--ty-radius-base);
75
+ background: var(--input-bg, var(--input-bg, var(--ty-input-bg)));
76
+ transition: var(--ty-local-transition, all 0.15s ease-in-out);
77
+ min-height: var(--ty-field-height);
78
+ padding: 0 var(--ty-field-pad-x);
91
79
  }
92
-
93
- /* Wrapper states — --input-accent* are set by the flavor rules below;
94
- without a flavor attribute they're unset and the default chrome chain
95
- (per-instance --input-* var, then --ty-input-* token) applies. */
96
- /* :not(.focused) — hover must never override focus. Without the guard this
97
- rule out-ranks .focused by specificity, so hovering a FOCUSED unflavored
98
- input swapped its primary focus border for the dimmer neutral hover
99
- border (focus ring stayed, border dimmed — read as a glitch). Same
100
- pattern as date-picker's :hover:not(.open). */
101
80
  .input-wrapper:hover:not(.disabled):not(.focused) {
102
- border-color: var(--input-accent-bold, var(--input-border-hover, var(--ty-input-border-hover)));
81
+ border-color: var(--input-accent-bold, var(--input-border-hover, var(--ty-input-border-hover)));
103
82
  }
104
-
105
83
  .input-wrapper.focused {
106
- border-color: var(--input-accent-bold, var(--input-border-focus, var(--ty-input-border-focus)));
107
- box-shadow: 0 0 0 3px var(--input-ring, var(--input-shadow-focus, var(--ty-input-shadow-focus)));
84
+ border-color: var(--input-accent-bold, var(--input-border-focus, var(--ty-input-border-focus)));
85
+ box-shadow: 0 0 0 3px var(--input-ring, var(--input-shadow-focus, var(--ty-input-shadow-focus)));
108
86
  }
109
-
110
87
  .input-wrapper.disabled {
111
- cursor: not-allowed;
112
- opacity: 0.5;
113
- background: var(--input-disabled-bg, var(--ty-input-disabled-bg));
114
- border-color: var(--input-disabled-border, var(--ty-input-disabled-border));
88
+ cursor: not-allowed;
89
+ opacity: 0.5;
90
+ background: var(--input-disabled-bg, var(--ty-input-disabled-bg));
91
+ border-color: var(--input-disabled-border, var(--ty-input-disabled-border));
115
92
  }
116
-
117
93
  ::slotted([slot="start"]),
118
94
  ::slotted([slot="end"]) {
119
- display: flex;
120
- align-items: center;
121
- justify-content: center;
122
- flex-shrink: 0;
123
- color: var(--ty-color-text-soft);
95
+ display: flex;
96
+ align-items: center;
97
+ justify-content: center;
98
+ flex-shrink: 0;
99
+ color: var(--ty-color-text-soft);
124
100
  }
125
-
126
- /* Password reveal toggle (rendered for type="password") */
127
101
  .password-toggle {
128
- display: flex;
129
- align-items: center;
130
- justify-content: center;
131
- flex-shrink: 0;
132
- width: 1.25rem;
133
- height: 1.25rem;
134
- padding: 0;
135
- border: none;
136
- background: none;
137
- cursor: pointer;
138
- color: var(--input-placeholder, var(--ty-input-placeholder));
139
- transition: var(--ty-local-transition, color 0.15s ease-in-out);
102
+ display: flex;
103
+ align-items: center;
104
+ justify-content: center;
105
+ flex-shrink: 0;
106
+ width: 1.25rem;
107
+ height: 1.25rem;
108
+ padding: 0;
109
+ border: none;
110
+ background: none;
111
+ cursor: pointer;
112
+ color: var(--input-placeholder, var(--ty-input-placeholder));
113
+ transition: var(--ty-local-transition, color 0.15s ease-in-out);
140
114
  }
141
115
  .password-toggle:hover {
142
- color: var(--input-color, var(--ty-input-color));
116
+ color: var(--input-color, var(--ty-input-color));
143
117
  }
144
118
  .password-toggle:focus-visible {
145
- outline: 2px solid var(--input-accent, var(--ty-color-primary));
146
- outline-offset: 2px;
147
- border-radius: 2px;
119
+ outline: 2px solid var(--input-accent, var(--ty-color-primary));
120
+ outline-offset: 2px;
121
+ border-radius: 2px;
148
122
  }
149
123
  .password-toggle svg {
150
- width: 1rem;
151
- height: 1rem;
124
+ width: 1rem;
125
+ height: 1rem;
152
126
  }
153
-
154
127
  ::slotted(ty-icon) {
155
- width: 1em;
156
- height: 1em;
157
- flex-shrink: 0;
128
+ width: 1em;
129
+ height: 1em;
130
+ flex-shrink: 0;
158
131
  }
159
-
160
132
  .error-message {
161
- font-size: var(--ty-font-xs);
162
- line-height: var(--ty-leading-xs);
163
- letter-spacing: var(--ty-tracking-xs);
164
- color: var(--ty-color-danger);
165
- margin-top: 4px;
166
- padding-left: 12px;
133
+ font-size: var(--ty-font-xs);
134
+ line-height: var(--ty-leading-xs);
135
+ letter-spacing: var(--ty-tracking-xs);
136
+ color: var(--ty-color-danger);
137
+ margin-top: 4px;
138
+ padding-left: var(--ty-field-outer-pad-x);
167
139
  }
168
-
169
140
  .input-wrapper.error {
170
- border-color: var(--ty-color-danger);
171
- background: var(--ty-bg-danger-soft);
141
+ border-color: var(--ty-color-danger);
142
+ background: var(--ty-bg-danger-soft);
172
143
  }
173
-
174
144
  .input-wrapper.error.focused {
175
- border-color: var(--ty-color-danger-bold);
176
- box-shadow: 0 0 0 3px var(--input-shadow-focus, var(--ty-input-shadow-focus));
145
+ border-color: var(--ty-color-danger-bold);
146
+ box-shadow: 0 0 0 3px var(--input-shadow-focus, var(--ty-input-shadow-focus));
177
147
  }
178
-
179
148
  input {
180
- /* Linear-paired typography */
181
- font-family: inherit;
182
- flex: 1;
183
- min-width: 0;
184
- box-sizing: border-box;
185
- border: none;
186
- outline: none;
187
- background: transparent;
188
- color: var(--input-color, var(--ty-input-color));
189
- font-family: inherit;
190
- font-size: var(--ty-font-sm);
191
- line-height: var(--ty-leading-sm);
192
- letter-spacing: var(--ty-tracking-sm);
193
- font-weight: var(--ty-font-normal);
194
- padding: 0;
195
- margin: 0;
149
+ flex: 1;
150
+ min-width: 0;
151
+ box-sizing: border-box;
152
+ border: none;
153
+ outline: none;
154
+ background: transparent;
155
+ color: var(--input-color, var(--ty-input-color));
156
+ font-family: inherit;
157
+ font-size: var(--ty-field-font);
158
+ line-height: var(--ty-field-leading);
159
+ letter-spacing: var(--ty-field-tracking);
160
+ font-weight: var(--ty-font-normal);
161
+ padding: 0;
162
+ margin: 0;
196
163
  }
197
-
198
- /* Remove number input spinner arrows */
199
164
  input[type="number"]::-webkit-outer-spin-button,
200
165
  input[type="number"]::-webkit-inner-spin-button {
201
- -webkit-appearance: none;
202
- margin: 0;
166
+ -webkit-appearance: none;
167
+ margin: 0;
203
168
  }
204
-
205
169
  input[type="number"] {
206
- -moz-appearance: textfield;
170
+ -moz-appearance: textfield;
207
171
  }
208
-
209
172
  input:disabled {
210
- cursor: not-allowed;
211
- color: var(--input-disabled-color, var(--ty-input-disabled-color));
173
+ cursor: not-allowed;
174
+ color: var(--input-disabled-color, var(--ty-input-disabled-color));
212
175
  }
213
-
214
176
  input::placeholder {
215
- color: var(--input-placeholder, var(--ty-input-placeholder));
216
- font-weight: 400;
217
- }
218
-
219
- .input-wrapper.sm {
220
- min-height: var(--ty-size-sm);
221
- padding: 0 10px;
222
- border-radius: var(--ty-input-radius-sm, var(--ty-radius-base));
223
- }
224
-
225
- .input-wrapper.sm input {
226
- font-size: var(--ty-font-sm);
227
- line-height: var(--ty-leading-sm);
228
- letter-spacing: var(--ty-tracking-sm);
229
- }
230
-
231
- .input-wrapper.md {
232
- min-height: var(--ty-size-md);
233
- padding: 0 12px;
234
- border-radius: var(--ty-input-radius-md, var(--ty-radius-base));
235
- }
236
-
237
- .input-wrapper.md input {
238
- font-size: var(--ty-font-sm);
239
- line-height: var(--ty-leading-sm);
240
- letter-spacing: var(--ty-tracking-sm);
177
+ color: var(--input-placeholder, var(--ty-input-placeholder));
178
+ font-weight: 400;
241
179
  }
242
-
243
- .input-wrapper.lg {
244
- min-height: var(--ty-size-lg);
245
- padding: 0 14px;
246
- border-radius: var(--ty-input-radius-lg, var(--ty-radius-base));
247
- }
248
-
249
- .input-wrapper.lg input {
250
- font-size: var(--ty-font-base);
251
- line-height: var(--ty-leading-base);
252
- letter-spacing: var(--ty-tracking-base);
253
- }
254
-
255
- /* Semantic flavor modifiers set --input-accent*, consumed above */
256
180
  ${FLAVORS.filter((f) => f !== "neutral").map((f) => inputFlavor(f)).join("")}
257
-
258
181
  input:focus-visible {
259
- outline: none;
182
+ outline: none;
260
183
  }
261
-
262
184
  @media (prefers-contrast: high) {
263
- .input-wrapper {
264
- border-width: 2px;
265
- }
185
+ .input-wrapper {
186
+ border-width: 2px;
266
187
  }
267
-
268
- @media (prefers-reduced-motion: reduce) {
269
- .input-wrapper {
270
- transition: none;
271
- }
272
188
  }
273
-
274
- @media (max-width: 640px) {
275
- .input-wrapper.lg {
276
- min-height: 40px;
277
- padding: 0 12px;
278
- }
279
-
280
- .input-wrapper.lg input {
281
- font-size: var(--ty-font-sm);
282
- line-height: var(--ty-leading-sm);
283
- letter-spacing: var(--ty-tracking-sm);
284
- }
285
-
286
- .input-wrapper.xl {
287
- min-height: 44px;
288
- padding: 0 14px;
289
- }
290
-
291
- .input-wrapper.xl input {
292
- font-size: var(--ty-font-base);
293
- line-height: var(--ty-leading-base);
294
- letter-spacing: var(--ty-tracking-base);
295
- }
189
+ @media (prefers-reduced-motion: reduce) {
190
+ .input-wrapper {
191
+ transition: none;
296
192
  }
297
-
298
- @media (max-width: 480px) {
299
- .input-wrapper.xl {
300
- min-height: 40px;
301
- padding: 0 12px;
302
- }
303
-
304
- .input-wrapper.xl input {
305
- font-size: var(--ty-font-sm);
306
- line-height: var(--ty-leading-sm);
307
- letter-spacing: var(--ty-tracking-sm);
308
- }
309
193
  }
310
194
  `;
@@ -1,132 +1,97 @@
1
1
  export const modalStyles = `
2
2
  :host {
3
- display: contents;
4
- /* Don't interfere with layout */
3
+ display: contents;
5
4
  }
6
-
7
- /* Part of the modal wrapper functionality, not user content styling */
8
5
  .close-button {
9
- position: absolute;
10
- top: -8px;
11
- right: -8px;
12
- background: transparent;
13
- border: none;
14
- cursor: pointer;
15
- padding: 4px;
16
- border-radius: 4px;
17
- transition: var(--ty-transition-colors);
18
- z-index: 1;
19
- color: #d8d8d8;
20
-
21
- /* Remove all default browser styling that could cause outlines/borders */
22
- outline: none;
23
- box-shadow: none;
24
- -webkit-appearance: none;
25
- -moz-appearance: none;
26
- appearance: none;
27
-
28
- /* Remove mobile tap highlights and focus rings */
29
- -webkit-tap-highlight-color: transparent;
30
- -webkit-touch-callout: none;
31
- -webkit-user-select: none;
32
- -moz-user-select: none;
33
- -ms-user-select: none;
34
- user-select: none;
35
- }
36
-
6
+ position: absolute;
7
+ top: -8px;
8
+ right: -8px;
9
+ background: transparent;
10
+ border: none;
11
+ cursor: pointer;
12
+ padding: 4px;
13
+ border-radius: 4px;
14
+ transition: var(--ty-transition-colors);
15
+ z-index: 1;
16
+ color: #d8d8d8;
17
+ outline: none;
18
+ box-shadow: none;
19
+ -webkit-appearance: none;
20
+ -moz-appearance: none;
21
+ appearance: none;
22
+ -webkit-tap-highlight-color: transparent;
23
+ -webkit-touch-callout: none;
24
+ -webkit-user-select: none;
25
+ -moz-user-select: none;
26
+ -ms-user-select: none;
27
+ user-select: none;
28
+ }
37
29
  .close-button:hover {
38
- color: white;
30
+ color: white;
39
31
  }
40
-
41
- /* Explicitly remove focus and active states for all interaction modes */
42
32
  .close-button:focus,
43
33
  .close-button:focus-visible,
44
34
  .close-button:focus-within,
45
35
  .close-button:active {
46
- outline: none !important;
47
- box-shadow: none !important;
48
- border: none !important;
49
- background: transparent !important;
36
+ outline: none !important;
37
+ box-shadow: none !important;
38
+ border: none !important;
39
+ background: transparent !important;
50
40
  }
51
-
52
- /* Override hover color even in focus/active states */
53
41
  .close-button:hover,
54
42
  .close-button:focus:hover,
55
43
  .close-button:active:hover {
56
- color: white;
44
+ color: white;
57
45
  }
58
-
59
46
  .close-button.hide {
60
- visibility: hidden;
47
+ visibility: hidden;
61
48
  }
62
-
63
- /* Pure wrapper: only essential modal functionality, no styling of user content */
64
49
  .ty-modal-dialog {
65
- /* Reset default dialog styles */
66
- padding: 18px;
67
- border: none;
68
- margin: 0;
69
- background: transparent;
70
-
71
- /* Centered */
72
- position: fixed;
73
- top: 50%;
74
- left: 50%;
75
- transform: translate(-50%, -50%);
76
-
77
- z-index: 1000;
78
- overflow: hidden;
79
-
80
- /* No sizing - let user content determine size */
81
- max-width: 85vw;
82
- max-height: 90vh;
83
-
84
- outline: none;
85
- }
86
-
87
- /* Panel zoom-in synced with the backdrop fade (shadcn-style zoom-in-95).
88
- Enter-only: animating exit on a native <dialog> means delaying close(). */
50
+ padding: 18px;
51
+ border: none;
52
+ margin: 0;
53
+ background: transparent;
54
+ position: fixed;
55
+ top: 50%;
56
+ left: 50%;
57
+ transform: translate(-50%, -50%);
58
+ z-index: 1000;
59
+ overflow: hidden;
60
+ max-width: 85vw;
61
+ max-height: 90vh;
62
+ outline: none;
63
+ }
89
64
  .ty-modal-dialog[open] {
90
- animation: ty-modal-enter var(--ty-modal-duration, 200ms) ease-out;
65
+ animation: ty-modal-enter var(--ty-modal-duration, 200ms) ease-out;
91
66
  }
92
-
93
67
  @keyframes ty-modal-enter {
94
- from {
95
- opacity: 0;
96
- transform: translate(-50%, -50%) scale(0.93);
97
- }
98
-
99
- to {
100
- opacity: 1;
101
- transform: translate(-50%, -50%) scale(1);
102
- }
103
- }
104
-
105
- /* Backdrop is part of modal functionality, not user content */
68
+ from {
69
+ opacity: 0;
70
+ transform: translate(-50%, -50%) scale(0.93);
71
+ }
72
+ to {
73
+ opacity: 1;
74
+ transform: translate(-50%, -50%) scale(1);
75
+ }
76
+ }
106
77
  .ty-modal-dialog::backdrop {
107
- background: var(--ty-modal-backdrop, rgba(0, 0, 0, 0.5));
108
- backdrop-filter: var(--ty-modal-backdrop-blur, blur(2px));
109
- animation: ty-modal-backdrop-enter var(--ty-modal-duration, 200ms) ease-out;
78
+ background: var(--ty-modal-backdrop, rgba(0, 0, 0, 0.5));
79
+ backdrop-filter: var(--ty-modal-backdrop-blur, blur(2px));
80
+ animation: ty-modal-backdrop-enter var(--ty-modal-duration, 200ms) ease-out;
110
81
  }
111
-
112
- /* When backdrop is disabled */
113
82
  .ty-modal-dialog:not([data-backdrop])::backdrop {
114
- background: transparent;
115
- backdrop-filter: none;
83
+ background: transparent;
84
+ backdrop-filter: none;
116
85
  }
117
-
118
- /* Minimal container - no styling imposed on user content */
119
86
  .modal-content {
120
- color: var(--ty-text);
87
+ color: var(--ty-text);
121
88
  }
122
-
123
89
  @keyframes ty-modal-backdrop-enter {
124
- from {
125
- opacity: 0;
126
- }
127
-
128
- to {
129
- opacity: 1;
130
- }
90
+ from {
91
+ opacity: 0;
92
+ }
93
+ to {
94
+ opacity: 1;
95
+ }
131
96
  }
132
97
  `;
@@ -1,2 +1,2 @@
1
1
  /** Option Component Styles */
2
- export declare const optionStyles = "\n.option-content {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--ty-spacing-2);\n box-sizing: border-box;\n width: 100%;\n\n cursor: pointer;\n user-select: none;\n\n transition: var(--ty-transition-all);\n\n /* Linear-paired typography */\n color: var(--ty-text);\n font-family: inherit;\n font-size: var(--ty-font-sm);\n line-height: var(--ty-leading-sm);\n letter-spacing: var(--ty-tracking-sm);\n padding: var(--ty-spacing-2) var(--ty-spacing-3);\n border-radius: var(--ty-radius-md);\n}\n\n/* Cloned copy (projected into the select's trigger field): host defaults to\n inline like any unstyled custom element, which ignores width/overflow \u2014\n force a block box so the parent's flex-basis:0 truncation (select.ts\n .select-stub.has-clone slot[name=\"selected\"]) actually clips it, and\n collapse the content to a single ellipsized line instead of wrapping. */\n:host([cloned]) {\n display: block;\n min-width: 0;\n overflow: hidden;\n}\n:host([cloned]) .option-content {\n display: block;\n padding: 0px;\n background: transparent;\n min-width: 0;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.option-content:hover {\n background: var(--ty-bg-neutral-soft);\n}\n\n.option-content[highlighted] {\n background: var(--ty-bg-neutral-soft);\n color: var(--ty-text-strong);\n font-weight: var(--ty-font-semibold);\n}\n\n/* Selected: quiet \u2014 bolder text color only, no background slab, no weight change */\n.option-content[selected] {\n background: transparent;\n color: var(--ty-text-bold);\n}\n\n/* Lucide check \u2014 right-aligned, visible only on selected options */\n.option-check {\n display: none;\n flex-shrink: 0;\n width: 14px;\n height: 14px;\n margin-left: auto;\n color: var(--ty-color-primary);\n}\n\n.option-content[selected] .option-check {\n display: block;\n}\n\n/* Never show the check on the copy cloned into the select's trigger field */\n:host([cloned]) .option-check {\n display: none;\n}\n\n.option-content[selected]:hover {\n background: var(--ty-bg-neutral-soft);\n}\n\n.option-content[disabled] {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.option-content[hidden] {}\n\n.option-content * {\n pointer-events: none;\n}\n";
2
+ export declare const optionStyles = "\n.option-content {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--ty-spacing-2);\n box-sizing: border-box;\n width: 100%;\n\n cursor: pointer;\n user-select: none;\n\n transition: var(--ty-transition-all);\n\n /* Linear-paired typography */\n color: var(--ty-text);\n font-family: inherit;\n font-size: var(--ty-font-sm);\n line-height: var(--ty-leading-sm);\n letter-spacing: var(--ty-tracking-sm);\n padding: var(--ty-spacing-2) var(--ty-spacing-3);\n border-radius: var(--ty-radius-md);\n}\n\n/* Cloned copy (projected into the select's trigger field): host defaults to\n inline like any unstyled custom element, which ignores width/overflow \u2014\n force a block box so the parent's flex-basis:0 truncation (select.ts\n .select-stub.has-clone slot[name=\"selected\"]) actually clips it, and\n collapse the content to a single ellipsized line instead of wrapping. */\n:host([cloned]) {\n display: block;\n min-width: 0;\n overflow: hidden;\n}\n\n/* The clone sits in the select's TRIGGER, so its type follows the field size\n ladder (styles/field-size.ts) rather than the dropdown list's own scale \u2014\n the --ty-field-* vars inherit from ty-select through the light DOM. The\n fallbacks cover a ty-option rendered outside a select. */\n:host([cloned]) .option-content {\n display: block;\n padding: 0px;\n background: transparent;\n min-width: 0;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n font-size: var(--ty-field-font, var(--ty-font-sm));\n line-height: var(--ty-field-leading, var(--ty-leading-sm));\n letter-spacing: var(--ty-field-tracking, var(--ty-tracking-sm));\n}\n\n.option-content:hover {\n background: var(--ty-bg-neutral-soft);\n}\n\n.option-content[highlighted] {\n background: var(--ty-bg-neutral-soft);\n color: var(--ty-text-strong);\n font-weight: var(--ty-font-semibold);\n}\n\n/* Selected: quiet \u2014 bolder text color only, no background slab, no weight change */\n.option-content[selected] {\n background: transparent;\n color: var(--ty-text-bold);\n}\n\n/* Lucide check \u2014 right-aligned, visible only on selected options */\n.option-check {\n display: none;\n flex-shrink: 0;\n width: 14px;\n height: 14px;\n margin-left: auto;\n color: var(--ty-color-primary);\n}\n\n.option-content[selected] .option-check {\n display: block;\n}\n\n/* Never show the check on the copy cloned into the select's trigger field */\n:host([cloned]) .option-check {\n display: none;\n}\n\n.option-content[selected]:hover {\n background: var(--ty-bg-neutral-soft);\n}\n\n.option-content[disabled] {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.option-content[hidden] {}\n\n.option-content * {\n pointer-events: none;\n}\n";