tyrell-components 1.0.0-TC45 → 1.0.0-TC46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/tyrell.js +1 -1
- package/lib/base/ty-component.d.ts +12 -7
- package/lib/base/ty-component.js +8 -139
- package/lib/components/button.d.ts +2 -16
- package/lib/components/button.js +0 -36
- package/lib/components/calendar-month.d.ts +2 -48
- package/lib/components/calendar-month.js +4 -166
- package/lib/components/calendar-navigation.d.ts +3 -48
- package/lib/components/calendar-navigation.js +3 -126
- package/lib/components/calendar.d.ts +3 -80
- package/lib/components/calendar.js +8 -230
- package/lib/components/checkbox.d.ts +4 -71
- package/lib/components/checkbox.js +7 -151
- package/lib/components/copy.d.ts +3 -56
- package/lib/components/copy.js +1 -120
- package/lib/components/date-picker.d.ts +5 -162
- package/lib/components/date-picker.js +28 -583
- package/lib/components/file-upload.d.ts +3 -15
- package/lib/components/file-upload.js +0 -37
- package/lib/components/icon.d.ts +3 -24
- package/lib/components/icon.js +1 -90
- package/lib/components/input.d.ts +7 -107
- package/lib/components/input.js +4 -193
- package/lib/components/modal.d.ts +3 -26
- package/lib/components/modal.js +1 -188
- package/lib/components/option.d.ts +2 -9
- package/lib/components/option.js +0 -48
- package/lib/components/popup.d.ts +2 -17
- package/lib/components/popup.js +3 -130
- package/lib/components/radio.d.ts +3 -23
- package/lib/components/radio.js +0 -63
- package/lib/components/resize-observer.d.ts +2 -30
- package/lib/components/resize-observer.js +0 -45
- package/lib/components/scroll-container.d.ts +2 -12
- package/lib/components/scroll-container.js +3 -46
- package/lib/components/select.d.ts +11 -150
- package/lib/components/select.js +7 -581
- package/lib/components/selected-tags.d.ts +4 -47
- package/lib/components/selected-tags.js +0 -94
- package/lib/components/step.d.ts +1 -6
- package/lib/components/step.js +0 -6
- package/lib/components/switch.d.ts +0 -11
- package/lib/components/switch.js +2 -36
- package/lib/components/tab.d.ts +1 -6
- package/lib/components/tab.js +0 -7
- package/lib/components/tabs.d.ts +3 -63
- package/lib/components/tabs.js +2 -282
- package/lib/components/tag.d.ts +2 -36
- package/lib/components/tag.js +5 -105
- package/lib/components/textarea.d.ts +6 -86
- package/lib/components/textarea.js +2 -173
- package/lib/components/tooltip.d.ts +3 -11
- package/lib/components/tooltip.js +0 -154
- package/lib/components/wizard.d.ts +4 -54
- package/lib/components/wizard.js +0 -228
- package/lib/icons/fontawesome/brands.d.ts +0 -1
- package/lib/icons/fontawesome/brands.js +0 -8
- package/lib/icons/fontawesome/regular.d.ts +0 -1
- package/lib/icons/fontawesome/regular.js +0 -8
- package/lib/icons/fontawesome/solid.d.ts +0 -1
- package/lib/icons/fontawesome/solid.js +0 -8
- package/lib/icons/heroicons/micro.d.ts +0 -1
- package/lib/icons/heroicons/micro.js +0 -8
- package/lib/icons/heroicons/mini.d.ts +0 -1
- package/lib/icons/heroicons/mini.js +0 -8
- package/lib/icons/heroicons/outline.d.ts +0 -1
- package/lib/icons/heroicons/outline.js +0 -8
- package/lib/icons/heroicons/solid.d.ts +0 -1
- package/lib/icons/heroicons/solid.js +0 -8
- package/lib/icons/lucide.d.ts +0 -1
- package/lib/icons/lucide.js +0 -1872
- package/lib/icons/material/filled.d.ts +0 -1
- package/lib/icons/material/filled.js +0 -10
- package/lib/icons/material/outlined.d.ts +0 -1
- package/lib/icons/material/outlined.js +0 -10
- package/lib/icons/material/round.d.ts +0 -1
- package/lib/icons/material/round.js +0 -10
- package/lib/icons/material/sharp.d.ts +0 -1
- package/lib/icons/material/sharp.js +0 -10
- package/lib/icons/material/two-tone.d.ts +0 -1
- package/lib/icons/material/two-tone.js +0 -10
- package/lib/index.d.ts +0 -1
- package/lib/index.js +0 -20
- package/lib/styles/button.d.ts +2 -20
- package/lib/styles/button.js +13 -120
- package/lib/styles/calendar-month.d.ts +1 -5
- package/lib/styles/calendar-month.js +3 -60
- package/lib/styles/calendar-navigation.d.ts +2 -6
- package/lib/styles/calendar-navigation.js +1 -26
- package/lib/styles/calendar.d.ts +1 -2
- package/lib/styles/calendar.js +0 -13
- package/lib/styles/checkbox.d.ts +0 -1
- package/lib/styles/checkbox.js +1 -23
- package/lib/styles/copy.d.ts +0 -1
- package/lib/styles/copy.js +2 -17
- package/lib/styles/custom-scrollbar.d.ts +1 -2
- package/lib/styles/custom-scrollbar.js +3 -18
- package/lib/styles/date-picker.d.ts +1 -5
- package/lib/styles/date-picker.js +5 -35
- package/lib/styles/file-upload.d.ts +1 -2
- package/lib/styles/file-upload.js +0 -15
- package/lib/styles/icon.d.ts +2 -6
- package/lib/styles/icon.js +1 -26
- package/lib/styles/input.d.ts +1 -6
- package/lib/styles/input.js +3 -53
- package/lib/styles/modal.d.ts +1 -2
- package/lib/styles/modal.js +3 -23
- package/lib/styles/option.d.ts +2 -6
- package/lib/styles/option.js +1 -11
- package/lib/styles/popup.d.ts +1 -2
- package/lib/styles/popup.js +4 -25
- package/lib/styles/radio.d.ts +0 -1
- package/lib/styles/radio.js +1 -15
- package/lib/styles/resize-observer.d.ts +1 -2
- package/lib/styles/resize-observer.js +0 -7
- package/lib/styles/scroll-container.d.ts +1 -2
- package/lib/styles/scroll-container.js +0 -19
- package/lib/styles/select-base.d.ts +0 -1
- package/lib/styles/select-base.js +9 -70
- package/lib/styles/select.d.ts +1 -2
- package/lib/styles/select.js +2 -14
- package/lib/styles/step.d.ts +1 -2
- package/lib/styles/step.js +0 -4
- package/lib/styles/switch.d.ts +0 -1
- package/lib/styles/switch.js +2 -20
- package/lib/styles/tab.d.ts +1 -2
- package/lib/styles/tab.js +0 -5
- package/lib/styles/tabs.d.ts +3 -11
- package/lib/styles/tabs.js +4 -47
- package/lib/styles/tag.d.ts +1 -5
- package/lib/styles/tag.js +2 -31
- package/lib/styles/textarea.d.ts +1 -2
- package/lib/styles/textarea.js +0 -44
- package/lib/styles/tooltip.d.ts +0 -1
- package/lib/styles/tooltip.js +0 -10
- package/lib/styles/wizard.d.ts +5 -21
- package/lib/styles/wizard.js +5 -85
- package/lib/types/common.d.ts +0 -2
- package/lib/types/common.js +0 -12
- package/lib/utils/calendar-utils.d.ts +4 -21
- package/lib/utils/calendar-utils.js +4 -177
- package/lib/utils/custom-scrollbar.d.ts +6 -20
- package/lib/utils/custom-scrollbar.js +1 -45
- package/lib/utils/flavor-sheet.d.ts +0 -1
- package/lib/utils/flavor-sheet.js +0 -23
- package/lib/utils/icon-registry.d.ts +0 -2
- package/lib/utils/icon-registry.js +1 -107
- package/lib/utils/icons.d.ts +0 -1
- package/lib/utils/icons.js +0 -9
- package/lib/utils/loader-registry.d.ts +0 -1
- package/lib/utils/loader-registry.js +0 -32
- package/lib/utils/locale.d.ts +2 -23
- package/lib/utils/locale.js +0 -86
- package/lib/utils/mobile.d.ts +0 -1
- package/lib/utils/mobile.js +0 -17
- package/lib/utils/number-format.d.ts +0 -2
- package/lib/utils/number-format.js +2 -65
- package/lib/utils/positioning.d.ts +0 -2
- package/lib/utils/positioning.js +0 -54
- package/lib/utils/property-capture.d.ts +5 -27
- package/lib/utils/property-capture.js +0 -108
- package/lib/utils/property-manager.d.ts +0 -1
- package/lib/utils/property-manager.js +0 -70
- package/lib/utils/resize-observer.d.ts +0 -1
- package/lib/utils/resize-observer.js +0 -36
- package/lib/utils/scroll-lock.d.ts +4 -11
- package/lib/utils/scroll-lock.js +0 -107
- package/lib/utils/styles.d.ts +0 -1
- package/lib/utils/styles.js +0 -24
- package/lib/version.d.ts +1 -2
- package/lib/version.js +1 -11
- package/package.json +2 -2
- package/lib/base/ty-component.d.ts.map +0 -1
- package/lib/base/ty-component.js.map +0 -1
- package/lib/components/button.d.ts.map +0 -1
- package/lib/components/button.js.map +0 -1
- package/lib/components/calendar-month.d.ts.map +0 -1
- package/lib/components/calendar-month.js.map +0 -1
- package/lib/components/calendar-navigation.d.ts.map +0 -1
- package/lib/components/calendar-navigation.js.map +0 -1
- package/lib/components/calendar.d.ts.map +0 -1
- package/lib/components/calendar.js.map +0 -1
- package/lib/components/checkbox.d.ts.map +0 -1
- package/lib/components/checkbox.js.map +0 -1
- package/lib/components/copy.d.ts.map +0 -1
- package/lib/components/copy.js.map +0 -1
- package/lib/components/date-picker.d.ts.map +0 -1
- package/lib/components/date-picker.js.map +0 -1
- package/lib/components/file-upload.d.ts.map +0 -1
- package/lib/components/file-upload.js.map +0 -1
- package/lib/components/icon.d.ts.map +0 -1
- package/lib/components/icon.js.map +0 -1
- package/lib/components/input.d.ts.map +0 -1
- package/lib/components/input.js.map +0 -1
- package/lib/components/modal.d.ts.map +0 -1
- package/lib/components/modal.js.map +0 -1
- package/lib/components/option.d.ts.map +0 -1
- package/lib/components/option.js.map +0 -1
- package/lib/components/popup.d.ts.map +0 -1
- package/lib/components/popup.js.map +0 -1
- package/lib/components/radio.d.ts.map +0 -1
- package/lib/components/radio.js.map +0 -1
- package/lib/components/resize-observer.d.ts.map +0 -1
- package/lib/components/resize-observer.js.map +0 -1
- package/lib/components/scroll-container.d.ts.map +0 -1
- package/lib/components/scroll-container.js.map +0 -1
- package/lib/components/select.d.ts.map +0 -1
- package/lib/components/select.js.map +0 -1
- package/lib/components/selected-tags.d.ts.map +0 -1
- package/lib/components/selected-tags.js.map +0 -1
- package/lib/components/step.d.ts.map +0 -1
- package/lib/components/step.js.map +0 -1
- package/lib/components/switch.d.ts.map +0 -1
- package/lib/components/switch.js.map +0 -1
- package/lib/components/tab.d.ts.map +0 -1
- package/lib/components/tab.js.map +0 -1
- package/lib/components/tabs.d.ts.map +0 -1
- package/lib/components/tabs.js.map +0 -1
- package/lib/components/tag.d.ts.map +0 -1
- package/lib/components/tag.js.map +0 -1
- package/lib/components/textarea.d.ts.map +0 -1
- package/lib/components/textarea.js.map +0 -1
- package/lib/components/tooltip.d.ts.map +0 -1
- package/lib/components/tooltip.js.map +0 -1
- package/lib/components/wizard.d.ts.map +0 -1
- package/lib/components/wizard.js.map +0 -1
- package/lib/icons/fontawesome/brands.d.ts.map +0 -1
- package/lib/icons/fontawesome/brands.js.map +0 -1
- package/lib/icons/fontawesome/regular.d.ts.map +0 -1
- package/lib/icons/fontawesome/regular.js.map +0 -1
- package/lib/icons/fontawesome/solid.d.ts.map +0 -1
- package/lib/icons/fontawesome/solid.js.map +0 -1
- package/lib/icons/heroicons/micro.d.ts.map +0 -1
- package/lib/icons/heroicons/micro.js.map +0 -1
- package/lib/icons/heroicons/mini.d.ts.map +0 -1
- package/lib/icons/heroicons/mini.js.map +0 -1
- package/lib/icons/heroicons/outline.d.ts.map +0 -1
- package/lib/icons/heroicons/outline.js.map +0 -1
- package/lib/icons/heroicons/solid.d.ts.map +0 -1
- package/lib/icons/heroicons/solid.js.map +0 -1
- package/lib/icons/lucide.d.ts.map +0 -1
- package/lib/icons/lucide.js.map +0 -1
- package/lib/icons/material/filled.d.ts.map +0 -1
- package/lib/icons/material/filled.js.map +0 -1
- package/lib/icons/material/outlined.d.ts.map +0 -1
- package/lib/icons/material/outlined.js.map +0 -1
- package/lib/icons/material/round.d.ts.map +0 -1
- package/lib/icons/material/round.js.map +0 -1
- package/lib/icons/material/sharp.d.ts.map +0 -1
- package/lib/icons/material/sharp.js.map +0 -1
- package/lib/icons/material/two-tone.d.ts.map +0 -1
- package/lib/icons/material/two-tone.js.map +0 -1
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/styles/button.d.ts.map +0 -1
- package/lib/styles/button.js.map +0 -1
- package/lib/styles/calendar-month.d.ts.map +0 -1
- package/lib/styles/calendar-month.js.map +0 -1
- package/lib/styles/calendar-navigation.d.ts.map +0 -1
- package/lib/styles/calendar-navigation.js.map +0 -1
- package/lib/styles/calendar.d.ts.map +0 -1
- package/lib/styles/calendar.js.map +0 -1
- package/lib/styles/checkbox.d.ts.map +0 -1
- package/lib/styles/checkbox.js.map +0 -1
- package/lib/styles/copy.d.ts.map +0 -1
- package/lib/styles/copy.js.map +0 -1
- package/lib/styles/custom-scrollbar.d.ts.map +0 -1
- package/lib/styles/custom-scrollbar.js.map +0 -1
- package/lib/styles/date-picker.d.ts.map +0 -1
- package/lib/styles/date-picker.js.map +0 -1
- package/lib/styles/file-upload.d.ts.map +0 -1
- package/lib/styles/file-upload.js.map +0 -1
- package/lib/styles/icon.d.ts.map +0 -1
- package/lib/styles/icon.js.map +0 -1
- package/lib/styles/input.d.ts.map +0 -1
- package/lib/styles/input.js.map +0 -1
- package/lib/styles/modal.d.ts.map +0 -1
- package/lib/styles/modal.js.map +0 -1
- package/lib/styles/multiselect.d.ts +0 -8
- package/lib/styles/multiselect.d.ts.map +0 -1
- package/lib/styles/multiselect.js +0 -849
- package/lib/styles/multiselect.js.map +0 -1
- package/lib/styles/option.d.ts.map +0 -1
- package/lib/styles/option.js.map +0 -1
- package/lib/styles/popup.d.ts.map +0 -1
- package/lib/styles/popup.js.map +0 -1
- package/lib/styles/radio.d.ts.map +0 -1
- package/lib/styles/radio.js.map +0 -1
- package/lib/styles/resize-observer.d.ts.map +0 -1
- package/lib/styles/resize-observer.js.map +0 -1
- package/lib/styles/scroll-container.d.ts.map +0 -1
- package/lib/styles/scroll-container.js.map +0 -1
- package/lib/styles/select-base.d.ts.map +0 -1
- package/lib/styles/select-base.js.map +0 -1
- package/lib/styles/select.d.ts.map +0 -1
- package/lib/styles/select.js.map +0 -1
- package/lib/styles/step.d.ts.map +0 -1
- package/lib/styles/step.js.map +0 -1
- package/lib/styles/switch.d.ts.map +0 -1
- package/lib/styles/switch.js.map +0 -1
- package/lib/styles/tab.d.ts.map +0 -1
- package/lib/styles/tab.js.map +0 -1
- package/lib/styles/tabs.d.ts.map +0 -1
- package/lib/styles/tabs.js.map +0 -1
- package/lib/styles/tag.d.ts.map +0 -1
- package/lib/styles/tag.js.map +0 -1
- package/lib/styles/textarea.d.ts.map +0 -1
- package/lib/styles/textarea.js.map +0 -1
- package/lib/styles/tooltip.d.ts.map +0 -1
- package/lib/styles/tooltip.js.map +0 -1
- package/lib/styles/wizard.d.ts.map +0 -1
- package/lib/styles/wizard.js.map +0 -1
- package/lib/types/common.d.ts.map +0 -1
- package/lib/types/common.js.map +0 -1
- package/lib/utils/calendar-utils.d.ts.map +0 -1
- package/lib/utils/calendar-utils.js.map +0 -1
- package/lib/utils/custom-scrollbar.d.ts.map +0 -1
- package/lib/utils/custom-scrollbar.js.map +0 -1
- package/lib/utils/flavor-sheet.d.ts.map +0 -1
- package/lib/utils/flavor-sheet.js.map +0 -1
- package/lib/utils/icon-registry.d.ts.map +0 -1
- package/lib/utils/icon-registry.js.map +0 -1
- package/lib/utils/icons.d.ts.map +0 -1
- package/lib/utils/icons.js.map +0 -1
- package/lib/utils/loader-registry.d.ts.map +0 -1
- package/lib/utils/loader-registry.js.map +0 -1
- package/lib/utils/locale.d.ts.map +0 -1
- package/lib/utils/locale.js.map +0 -1
- package/lib/utils/mobile.d.ts.map +0 -1
- package/lib/utils/mobile.js.map +0 -1
- package/lib/utils/number-format.d.ts.map +0 -1
- package/lib/utils/number-format.js.map +0 -1
- package/lib/utils/parse-boolean.d.ts +0 -39
- package/lib/utils/parse-boolean.d.ts.map +0 -1
- package/lib/utils/parse-boolean.js +0 -58
- package/lib/utils/parse-boolean.js.map +0 -1
- package/lib/utils/positioning.d.ts.map +0 -1
- package/lib/utils/positioning.js.map +0 -1
- package/lib/utils/property-capture.d.ts.map +0 -1
- package/lib/utils/property-capture.js.map +0 -1
- package/lib/utils/property-manager.d.ts.map +0 -1
- package/lib/utils/property-manager.js.map +0 -1
- package/lib/utils/resize-observer.d.ts.map +0 -1
- package/lib/utils/resize-observer.js.map +0 -1
- package/lib/utils/scroll-lock.d.ts.map +0 -1
- package/lib/utils/scroll-lock.js.map +0 -1
- package/lib/utils/styles.d.ts.map +0 -1
- package/lib/utils/styles.js.map +0 -1
- package/lib/version.d.ts.map +0 -1
- package/lib/version.js.map +0 -1
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TyScrollContainer styles
|
|
3
|
-
* Component-specific styles + shared custom scrollbar styles
|
|
4
|
-
*/
|
|
5
1
|
import { customScrollbarStyles } from './custom-scrollbar.js';
|
|
6
2
|
export const scrollContainerStyles = `
|
|
7
3
|
:host {
|
|
@@ -17,7 +13,6 @@ export const scrollContainerStyles = `
|
|
|
17
13
|
overflow-x: hidden;
|
|
18
14
|
}
|
|
19
15
|
|
|
20
|
-
/* Allow horizontal scrolling when enabled */
|
|
21
16
|
:host([overflow-x]) .scroll-wrapper {
|
|
22
17
|
overflow-x: auto;
|
|
23
18
|
}
|
|
@@ -26,10 +21,7 @@ export const scrollContainerStyles = `
|
|
|
26
21
|
max-height: var(--scroll-max-height);
|
|
27
22
|
}
|
|
28
23
|
|
|
29
|
-
/* ===================================== */
|
|
30
24
|
/* hide-scrollbar: hides native, no custom */
|
|
31
|
-
/* ===================================== */
|
|
32
|
-
|
|
33
25
|
:host([hide-scrollbar]) .scroll-wrapper {
|
|
34
26
|
scrollbar-width: none;
|
|
35
27
|
-ms-overflow-style: none;
|
|
@@ -45,10 +37,7 @@ export const scrollContainerStyles = `
|
|
|
45
37
|
overflow-anchor: none;
|
|
46
38
|
}
|
|
47
39
|
|
|
48
|
-
/* ===================================== */
|
|
49
40
|
/* custom-scrollbar: hides native */
|
|
50
|
-
/* ===================================== */
|
|
51
|
-
|
|
52
41
|
:host([custom-scrollbar]) .scroll-wrapper {
|
|
53
42
|
scrollbar-width: none;
|
|
54
43
|
-ms-overflow-style: none;
|
|
@@ -58,7 +47,6 @@ export const scrollContainerStyles = `
|
|
|
58
47
|
display: none;
|
|
59
48
|
}
|
|
60
49
|
|
|
61
|
-
/* Show scrollbar tracks on host hover */
|
|
62
50
|
:host([custom-scrollbar]:hover) .ty-scrollbar-track-y.has-overflow,
|
|
63
51
|
:host([custom-scrollbar]:hover) .ty-scrollbar-track-x.has-overflow {
|
|
64
52
|
opacity: 1;
|
|
@@ -73,10 +61,6 @@ export const scrollContainerStyles = `
|
|
|
73
61
|
right: var(--ty-scrollbar-width, 8px);
|
|
74
62
|
}
|
|
75
63
|
|
|
76
|
-
/* ===================================== */
|
|
77
|
-
/* Shadow Indicators */
|
|
78
|
-
/* ===================================== */
|
|
79
|
-
|
|
80
64
|
.shadow-overlay {
|
|
81
65
|
position: absolute;
|
|
82
66
|
inset: 0;
|
|
@@ -188,7 +172,6 @@ export const scrollContainerStyles = `
|
|
|
188
172
|
}
|
|
189
173
|
}
|
|
190
174
|
|
|
191
|
-
/* Respect reduced motion */
|
|
192
175
|
@media (prefers-reduced-motion: reduce) {
|
|
193
176
|
.shadow-top,
|
|
194
177
|
.shadow-bottom,
|
|
@@ -198,7 +181,5 @@ export const scrollContainerStyles = `
|
|
|
198
181
|
}
|
|
199
182
|
}
|
|
200
183
|
|
|
201
|
-
/* Shared scrollbar styles */
|
|
202
184
|
${customScrollbarStyles}
|
|
203
185
|
`;
|
|
204
|
-
//# sourceMappingURL=scroll-container.js.map
|
|
@@ -1,17 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Select Field Styles — shared chrome for ty-select (both single and
|
|
3
|
-
* multiple modes). Formerly split across ty-dropdown / ty-multiselect;
|
|
4
|
-
* those were consolidated into ty-select and this file kept the name.
|
|
5
|
-
*/
|
|
6
1
|
import { FLAVORS } from "../types/common.js";
|
|
7
2
|
import { customScrollbarStyles } from "./custom-scrollbar.js";
|
|
8
|
-
/* Flavor rules only set --select-accent (border), --select-accent-bold
|
|
9
|
-
(hover/open border), and --select-ring (open focus ring); the .select-stub
|
|
10
|
-
rules below consume them. Doubles as the per-instance override API:
|
|
11
|
-
`ty-select { --select-accent: … }`. Neutral is skipped — it IS the default
|
|
12
|
-
unstyled chrome (--ty-input-* tokens), same convention as
|
|
13
|
-
ty-input/ty-date-picker. Fallback flavor `fb` is used for custom flavors
|
|
14
|
-
so missing tokens degrade to neutral. */
|
|
15
3
|
const selectFlavor = (f, fb) => {
|
|
16
4
|
const c = (s) => fb
|
|
17
5
|
? s
|
|
@@ -38,11 +26,8 @@ const selectFlavor = (f, fb) => {
|
|
|
38
26
|
}
|
|
39
27
|
`;
|
|
40
28
|
};
|
|
41
|
-
/** Rules for one custom (non-built-in) flavor — see utils/flavor-sheet.ts. */
|
|
42
29
|
export const selectCustomFlavorCss = (base) => selectFlavor(base, "neutral");
|
|
43
30
|
export const selectBaseStyles = `
|
|
44
|
-
/* Select-field-specific styles extending dropdown base styles */
|
|
45
|
-
|
|
46
31
|
:host {
|
|
47
32
|
display: block;
|
|
48
33
|
width: 100%;
|
|
@@ -59,8 +44,6 @@ export const selectBaseStyles = `
|
|
|
59
44
|
width: auto;
|
|
60
45
|
}
|
|
61
46
|
|
|
62
|
-
/* ===== DIALOG POSITIONING SUPPORT ===== */
|
|
63
|
-
|
|
64
47
|
.dropdown-dialog {
|
|
65
48
|
position: fixed;
|
|
66
49
|
width: var(--dropdown-width, 200px);
|
|
@@ -73,7 +56,6 @@ export const selectBaseStyles = `
|
|
|
73
56
|
padding: var(--dropdown-padding, 20px);
|
|
74
57
|
/* Modal handles z-index automatically */
|
|
75
58
|
|
|
76
|
-
/* Hidden by default */
|
|
77
59
|
opacity: 0;
|
|
78
60
|
transition: opacity 400ms ease;
|
|
79
61
|
|
|
@@ -88,7 +70,6 @@ export const selectBaseStyles = `
|
|
|
88
70
|
flex-direction: column;
|
|
89
71
|
}
|
|
90
72
|
|
|
91
|
-
/* Direction-based positioning with CSS classes */
|
|
92
73
|
.dropdown-dialog.position-below {
|
|
93
74
|
left: var(--dropdown-x);
|
|
94
75
|
top: var(--dropdown-y);
|
|
@@ -110,11 +91,9 @@ export const selectBaseStyles = `
|
|
|
110
91
|
}
|
|
111
92
|
|
|
112
93
|
.dropdown-dialog.position-below .dropdown-options {
|
|
113
|
-
/* Optional: Add upward-pointing shadow for below positioning */
|
|
114
94
|
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1), var(--ty-shadow-md);
|
|
115
95
|
}
|
|
116
96
|
|
|
117
|
-
/* Animate when .open class is added */
|
|
118
97
|
.dropdown-dialog.open {
|
|
119
98
|
opacity: 1;
|
|
120
99
|
}
|
|
@@ -128,8 +107,6 @@ export const selectBaseStyles = `
|
|
|
128
107
|
background: transparent;
|
|
129
108
|
}
|
|
130
109
|
|
|
131
|
-
/* ===== DIALOG HEADER ===== */
|
|
132
|
-
|
|
133
110
|
.dropdown-header {
|
|
134
111
|
display: flex;
|
|
135
112
|
align-items: center;
|
|
@@ -194,9 +171,6 @@ export const selectBaseStyles = `
|
|
|
194
171
|
height: 100%;
|
|
195
172
|
}
|
|
196
173
|
|
|
197
|
-
/* ===== SELECT FIELD-SPECIFIC STYLES ===== */
|
|
198
|
-
|
|
199
|
-
/* Select stub modifications */
|
|
200
174
|
.select-stub {
|
|
201
175
|
min-height: var(--ty-size-md);
|
|
202
176
|
display: flex;
|
|
@@ -204,7 +178,6 @@ export const selectBaseStyles = `
|
|
|
204
178
|
gap: 0.25rem;
|
|
205
179
|
align-items: center;
|
|
206
180
|
padding: 0 2.5rem 0 0.75rem;
|
|
207
|
-
/* Transitions - includes opacity for open state */
|
|
208
181
|
transition: var(--ty-transition-all), opacity 0.2s ease;
|
|
209
182
|
outline: none;
|
|
210
183
|
background: var(--input-bg, var(--ty-input-bg));
|
|
@@ -221,8 +194,7 @@ export const selectBaseStyles = `
|
|
|
221
194
|
box-sizing: border-box;
|
|
222
195
|
}
|
|
223
196
|
|
|
224
|
-
/*
|
|
225
|
-
buildStubClasses() always stamps exactly one size class on .select-stub.
|
|
197
|
+
/* buildStubClasses() always stamps exactly one size class on .select-stub.
|
|
226
198
|
min-height comes from the shared --ty-size-* tokens (same ones ty-input
|
|
227
199
|
and ty-date-picker consume) so a given size is the same height on every
|
|
228
200
|
field. Right padding stays 2.5rem for chevron room. Zero vertical
|
|
@@ -264,7 +236,6 @@ export const selectBaseStyles = `
|
|
|
264
236
|
opacity: 0.6;
|
|
265
237
|
}
|
|
266
238
|
|
|
267
|
-
/* Hide stub when dropdown is open */
|
|
268
239
|
.dropdown-wrapper:has(.dropdown-chevron.open) .select-stub {
|
|
269
240
|
opacity: 0;
|
|
270
241
|
pointer-events: none;
|
|
@@ -325,8 +296,6 @@ export const selectBaseStyles = `
|
|
|
325
296
|
gap: 0.25rem;
|
|
326
297
|
}
|
|
327
298
|
|
|
328
|
-
/* ===== CHEVRON INDICATOR ===== */
|
|
329
|
-
|
|
330
299
|
.dropdown-chevron {
|
|
331
300
|
position: absolute;
|
|
332
301
|
top: 50%;
|
|
@@ -349,7 +318,6 @@ export const selectBaseStyles = `
|
|
|
349
318
|
}
|
|
350
319
|
|
|
351
320
|
|
|
352
|
-
/* Tags container */
|
|
353
321
|
.select-chips {
|
|
354
322
|
display: flex;
|
|
355
323
|
flex-wrap: wrap;
|
|
@@ -368,12 +336,10 @@ export const selectBaseStyles = `
|
|
|
368
336
|
font-style: italic;
|
|
369
337
|
}
|
|
370
338
|
|
|
371
|
-
/* Placeholder styling when tags are present */
|
|
372
339
|
.dropdown-placeholder.hidden {
|
|
373
340
|
display: none;
|
|
374
341
|
}
|
|
375
342
|
|
|
376
|
-
/* Options area styling - Override for select */
|
|
377
343
|
.dropdown-options {
|
|
378
344
|
opacity: 0;
|
|
379
345
|
/* Floating surface/border, not --input-* — this is a popup panel over
|
|
@@ -397,13 +363,11 @@ export const selectBaseStyles = `
|
|
|
397
363
|
0 20px 25px -5px rgba(0, 0, 0, 0.1),
|
|
398
364
|
0 10px 10px -5px rgba(0, 0, 0, 0.04);
|
|
399
365
|
|
|
400
|
-
/* Animation properties */
|
|
401
366
|
transform: translateY(-8px) scale(0.95);
|
|
402
367
|
transition:
|
|
403
368
|
opacity 200ms cubic-bezier(0.16, 1, 0.3, 1),
|
|
404
369
|
transform 200ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
405
370
|
|
|
406
|
-
/* Select-specific: flex wrap for tags */
|
|
407
371
|
display: flex;
|
|
408
372
|
flex-wrap: wrap;
|
|
409
373
|
padding: 0.5rem;
|
|
@@ -426,12 +390,10 @@ export const selectBaseStyles = `
|
|
|
426
390
|
position: relative;
|
|
427
391
|
}
|
|
428
392
|
|
|
429
|
-
/* Show custom scrollbar on hover */
|
|
430
393
|
.dropdown-options-wrapper:hover .ty-scrollbar-track-y.has-overflow {
|
|
431
394
|
opacity: 1;
|
|
432
395
|
}
|
|
433
396
|
|
|
434
|
-
/* Make ty-tags in dropdown clickable with pointer cursor */
|
|
435
397
|
.dropdown-options ty-tag {
|
|
436
398
|
user-select: none;
|
|
437
399
|
transition: transform 0.1s ease;
|
|
@@ -445,17 +407,14 @@ export const selectBaseStyles = `
|
|
|
445
407
|
transform: scale(0.98);
|
|
446
408
|
}
|
|
447
409
|
|
|
448
|
-
/* Visual feedback for selected tags in options */
|
|
449
410
|
.dropdown-options ty-tag[selected] {
|
|
450
411
|
opacity: 0.5;
|
|
451
412
|
}
|
|
452
413
|
|
|
453
|
-
/* Ensure ty-tag components in the select field have proper sizing */
|
|
454
414
|
.select-chips ty-tag {
|
|
455
415
|
max-width: 150px;
|
|
456
416
|
}
|
|
457
417
|
|
|
458
|
-
/* Responsive adjustments */
|
|
459
418
|
@media (max-width: 640px) {
|
|
460
419
|
.select-chips ty-tag {
|
|
461
420
|
max-width: 100px;
|
|
@@ -463,7 +422,6 @@ export const selectBaseStyles = `
|
|
|
463
422
|
}
|
|
464
423
|
|
|
465
424
|
|
|
466
|
-
/* Ensure proper spacing in container layouts */
|
|
467
425
|
.select-container {
|
|
468
426
|
display: flex;
|
|
469
427
|
flex-direction: column;
|
|
@@ -473,8 +431,6 @@ export const selectBaseStyles = `
|
|
|
473
431
|
which is exactly the 4px misalignment this used to cause. */
|
|
474
432
|
}
|
|
475
433
|
|
|
476
|
-
/* ===== DROPDOWN WRAPPER & LABEL ===== */
|
|
477
|
-
|
|
478
434
|
.dropdown-wrapper {
|
|
479
435
|
position: relative;
|
|
480
436
|
display: block;
|
|
@@ -493,7 +449,6 @@ export const selectBaseStyles = `
|
|
|
493
449
|
align-items: center;
|
|
494
450
|
}
|
|
495
451
|
|
|
496
|
-
/* Required indicator - using SVG icon */
|
|
497
452
|
.required-icon {
|
|
498
453
|
display: inline-flex;
|
|
499
454
|
align-items: center;
|
|
@@ -513,10 +468,6 @@ export const selectBaseStyles = `
|
|
|
513
468
|
pointer-events: none;
|
|
514
469
|
}
|
|
515
470
|
|
|
516
|
-
/* ============================================================================
|
|
517
|
-
MOBILE MODAL STYLES
|
|
518
|
-
============================================================================ */
|
|
519
|
-
|
|
520
471
|
.dropdown-mode-mobile .mobile-dialog {
|
|
521
472
|
position: fixed;
|
|
522
473
|
top: 0;
|
|
@@ -567,7 +518,7 @@ export const selectBaseStyles = `
|
|
|
567
518
|
display: flex;
|
|
568
519
|
flex-direction: column;
|
|
569
520
|
width: calc(100% - 32px); /* Side margins */
|
|
570
|
-
max-width: 400px;
|
|
521
|
+
max-width: 400px;
|
|
571
522
|
min-height: 200px;
|
|
572
523
|
max-height: 90dvh; /* leaves room below the 6dvh padding-top, shrinks with keyboard */
|
|
573
524
|
opacity: 0;
|
|
@@ -671,7 +622,6 @@ export const selectBaseStyles = `
|
|
|
671
622
|
height: 18px;
|
|
672
623
|
}
|
|
673
624
|
|
|
674
|
-
/* Mobile search input (matches dropdown.ts) */
|
|
675
625
|
.dropdown-mode-mobile .mobile-search-input {
|
|
676
626
|
flex: 1;
|
|
677
627
|
min-width: 0;
|
|
@@ -700,10 +650,6 @@ export const selectBaseStyles = `
|
|
|
700
650
|
border-color: var(--ty-border);
|
|
701
651
|
}
|
|
702
652
|
|
|
703
|
-
/* ============================================================================
|
|
704
|
-
MOBILE BODY & SECTIONS - UPDATED STRUCTURE
|
|
705
|
-
============================================================================ */
|
|
706
|
-
|
|
707
653
|
/* Mobile body - contains both sections */
|
|
708
654
|
.dropdown-mode-mobile .mobile-body {
|
|
709
655
|
position: relative;
|
|
@@ -721,7 +667,7 @@ export const selectBaseStyles = `
|
|
|
721
667
|
border-color: var(--mobile-border-color);
|
|
722
668
|
}
|
|
723
669
|
|
|
724
|
-
/*
|
|
670
|
+
/* Section headers are labels, not buttons */
|
|
725
671
|
|
|
726
672
|
.dropdown-mode-mobile .section-header {
|
|
727
673
|
display: flex;
|
|
@@ -750,7 +696,7 @@ export const selectBaseStyles = `
|
|
|
750
696
|
margin-left: 0.25rem;
|
|
751
697
|
}
|
|
752
698
|
|
|
753
|
-
/*
|
|
699
|
+
/* Selected strip: pinned, capped height, collapses when empty */
|
|
754
700
|
|
|
755
701
|
.dropdown-mode-mobile .mobile-selected-section {
|
|
756
702
|
display: flex;
|
|
@@ -783,7 +729,7 @@ export const selectBaseStyles = `
|
|
|
783
729
|
mask-image: linear-gradient(to bottom, black calc(100% - 12px), transparent);
|
|
784
730
|
}
|
|
785
731
|
|
|
786
|
-
/*
|
|
732
|
+
/* Available list takes the remaining space */
|
|
787
733
|
|
|
788
734
|
.dropdown-mode-mobile .mobile-available-section {
|
|
789
735
|
display: flex;
|
|
@@ -806,8 +752,7 @@ export const selectBaseStyles = `
|
|
|
806
752
|
align-content: flex-start;
|
|
807
753
|
}
|
|
808
754
|
|
|
809
|
-
/*
|
|
810
|
-
Selected strip collapses (no text needed).
|
|
755
|
+
/* Selected strip collapses (no text needed).
|
|
811
756
|
Available shows the empty message only when there are zero tags total. */
|
|
812
757
|
|
|
813
758
|
.dropdown-mode-mobile .empty-state {
|
|
@@ -831,13 +776,11 @@ export const selectBaseStyles = `
|
|
|
831
776
|
display: none;
|
|
832
777
|
}
|
|
833
778
|
|
|
834
|
-
/* ===== TAG STYLING IN MOBILE ===== */
|
|
835
|
-
|
|
836
779
|
.dropdown-mode-mobile .section-content ::slotted(ty-tag) {
|
|
837
780
|
cursor: pointer;
|
|
838
781
|
user-select: none;
|
|
839
782
|
transition: transform 0.1s ease;
|
|
840
|
-
margin: 2px 0;
|
|
783
|
+
margin: 2px 0;
|
|
841
784
|
/* Fade + scale entry — replays on each (re)insertion when a tag moves
|
|
842
785
|
between selected and available slots */
|
|
843
786
|
animation: ty-select-tag-enter 180ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
@@ -853,7 +796,6 @@ export const selectBaseStyles = `
|
|
|
853
796
|
transform: scale(0.96);
|
|
854
797
|
}
|
|
855
798
|
|
|
856
|
-
/* Dimmed appearance for hidden filtered tags */
|
|
857
799
|
.dropdown-mode-mobile .section-content ::slotted(ty-tag[hidden]) {
|
|
858
800
|
display: none !important;
|
|
859
801
|
}
|
|
@@ -869,8 +811,7 @@ export const selectBaseStyles = `
|
|
|
869
811
|
}
|
|
870
812
|
}
|
|
871
813
|
|
|
872
|
-
/*
|
|
873
|
-
Spinner overlay shown inside the options area while the parent
|
|
814
|
+
/* Spinner overlay shown inside the options area while the parent
|
|
874
815
|
(external-search mode) is fetching. Search input stays usable.
|
|
875
816
|
|
|
876
817
|
Carries its own surface so it stays visible even when the host
|
|
@@ -964,10 +905,8 @@ export const selectBaseStyles = `
|
|
|
964
905
|
}
|
|
965
906
|
}
|
|
966
907
|
|
|
967
|
-
/* Custom scrollbar styles */
|
|
968
908
|
${customScrollbarStyles}
|
|
969
909
|
|
|
970
|
-
/*
|
|
910
|
+
/* Flavor variants set --select-accent*, consumed above */
|
|
971
911
|
${FLAVORS.filter((f) => f !== "neutral").map((f) => selectFlavor(f)).join("")}
|
|
972
912
|
`;
|
|
973
|
-
//# sourceMappingURL=select-base.js.map
|
package/lib/styles/select.d.ts
CHANGED
|
@@ -8,5 +8,4 @@
|
|
|
8
8
|
* - .compact: content-hugging trigger for toolbars, count badge
|
|
9
9
|
* - .custom-trigger (slot="trigger"): all chrome stripped
|
|
10
10
|
*/
|
|
11
|
-
export declare const selectStyles = "\n/* ===== COMPACT skin: hugs content (field skin = base styles) ===== */\n.select-stub.compact {\n display: inline-flex;\n flex-wrap: nowrap;\n width: auto;\n gap: 0.5rem;\n /* extra right padding = room for the absolutely-positioned chevron */\n padding: 0.5rem 2.25rem 0.5rem 0.875rem;\n}\n\n/* Consumer-provided trigger (slot=\"trigger\"): no chrome at all */\n.select-stub.custom-trigger {\n display: inline-block;\n width: auto;\n border: none;\n background: none;\n padding: 0;\n min-height: 0;\n border-radius: 0;\n}\n.select-stub.custom-trigger:hover {\n border: none;\n}\n\n.select-count {\n flex-shrink: 0;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 1.25rem;\n height: 1.25rem;\n padding: 0 0.375rem;\n border-radius: 9999px;\n /* --ty-text-primary never existed as a token \u2014 this silently fell back\n to inherited/unset color. Now follows the select's own flavor. */\n background: color-mix(in oklab, var(--select-accent, var(--ty-color-primary)) 15%, transparent);\n color: var(--select-accent-bold, var(--ty-color-primary-strong));\n font-size: var(--ty-font-xs);\n font-weight: var(--ty-font-semibold);\n font-style: normal;\n}\n.select-count[hidden] {\n display: none;\n}\n\n/* Clear (x) button \u2014 normal flex child of .select-stub, not absolutely\n positioned like .dropdown-chevron: it just takes its own space in the\n row, no padding-right gutter math needed. Lives in the trigger slot's\n fallback content, so it's automatically absent under slot=\"trigger\". */\n.select-clear {\n flex-shrink: 0;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 1rem;\n height: 1rem;\n padding: 0;\n border: none;\n background: none;\n color: var(--input-placeholder, var(--ty-input-placeholder));\n cursor: pointer;\n border-radius: var(--ty-radius-sm);\n transition: var(--ty-local-transition, all 0.15s ease);\n}\n.select-clear[hidden] {\n display: none;\n}\n.select-clear:hover {\n /* Destructive utility action \u2014 neutral at rest, warns danger-red on\n hover regardless of the field's own flavor. */\n color: var(--ty-color-danger);\n background-color: var(--ty-bg-danger-soft);\n}\n.select-clear svg {\n width: 100%;\n height: 100%;\n}\n\n/* Selection text (field skin): single line, ellipsis, input colors.\n flex-basis 0, not auto \u2014 .select-stub is flex-wrap:wrap, and auto's\n hypothetical size is the FULL untruncated text width (wrap-line\n assignment happens before shrinking), which pushed fixed-size siblings\n (.select-clear) onto a second line even though the text visibly had\n room after truncating. 0 makes this item contribute ~nothing to the\n line-fit check up front; grow/shrink + overflow:hidden still truncate\n it identically. */\n.select-stub .dropdown-placeholder {\n font-style: normal;\n flex: 1 1 0%;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: var(--input-color, var(--ty-input-color));\n}\n\n/* Empty state: muted placeholder color */\n.select-stub .dropdown-placeholder.placeholder-shown {\n color: var(--input-placeholder, var(--ty-input-placeholder));\n}\n.select-stub .dropdown-placeholder[hidden] {\n display: none;\n}\n\n/* Single-select display clone (slot=\"selected\"): the selected ty-option\n projected into the stub \u2014 its own :host([cloned]) styling strips the\n list-row chrome; here it just takes the text's flex slot. */\n.select-stub slot[name=\"selected\"] {\n display: none;\n}\n.select-stub.has-clone slot[name=\"selected\"] {\n display: block;\n flex: 1 1 auto;\n min-width: 0;\n overflow: hidden;\n}\n.select-stub.compact.has-clone slot[name=\"selected\"] {\n flex: 0 1 auto;\n}\n\n/* start/end slot content (icons etc.) \u2014 spacing comes from the stub's flex\n gap; muted like ty-input adornments. end sits before the chevron. */\n.select-stub ::slotted([slot=\"start\"]),\n.select-stub ::slotted([slot=\"end\"]) {\n flex-shrink: 0;\n color: var(--ty-text-soft);\n}\n\n/* Compact skin: the text IS the trigger label \u2014 no grow, regular text color.\n flex-basis: auto (not the field skin's 0%) \u2014 content-hugging needs its\n natural content width as the starting point; 0% would collapse it since\n grow is also 0 here (nothing left to expand it back out). */\n.select-stub.compact .dropdown-placeholder {\n flex: 0 1 auto;\n color: var(--ty-text);\n}\n\n/* Trigger stays visible while the popup is open (the popup hides it) */\n.dropdown-wrapper:has(.dropdown-chevron.open) .select-stub {\n opacity: 1;\n pointer-events: auto;\n}\n\n/* ===== One-panel popup: search header fused with the options list ===== */\n\n/* Single unified shadow around the whole panel (header + list as one silhouette) */\n.dropdown-dialog.open {\n filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.14)) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.08));\n}\n\n/* Card-style header: the search input keeps its own bordered-field look\n (base styles) and sits inset in the panel, TagPicker-style \u2014 no divider,\n whitespace separates it from the list. The header's OWN surface/border is\n part of the floating panel's chrome, not a form field \u2014 --ty-surface-\n floating/--ty-floating-border, matching .dropdown-options below it (same\n reasoning as the base-panel fix: --ty-input-* is deliberately faint for\n resting form fields and read as a missing/mismatched edge here). */\n.dropdown-header {\n background: var(--ty-surface-floating);\n border: 1px solid var(--ty-floating-border);\n border-bottom: none;\n border-radius: var(--ty-radius-lg) var(--ty-radius-lg) 0 0;\n padding: var(--ty-spacing-2) var(--ty-spacing-2) var(--ty-spacing-1);\n}\n.dropdown-dialog.position-below .dropdown-header {\n margin-bottom: 0;\n}\n.dropdown-dialog.position-above .dropdown-header {\n margin-top: 0;\n border-top: none;\n border-bottom: 1px solid var(--ty-floating-border);\n border-radius: 0 0 var(--ty-radius-lg) var(--ty-radius-lg);\n padding: var(--ty-spacing-1) var(--ty-spacing-2) var(--ty-spacing-2);\n}\n\n/* Magnifier adornment inside the search field (header padding + field inset) */\n.dropdown-search-icon {\n position: absolute;\n top: 50%;\n left: calc(var(--ty-spacing-2) + var(--ty-spacing-3));\n transform: translateY(-50%);\n width: 1rem;\n height: 1rem;\n color: var(--input-placeholder, var(--ty-input-placeholder));\n pointer-events: none;\n}\n.dropdown-search-icon svg {\n width: 100%;\n height: 100%;\n}\n\n/* Mobile header: flex row, icon flows inline before the input. Same 32x32\n footprint as .mobile-close-button (18px glyph centered in the box, not a\n bare 18px glyph flush at the edge) so the row has two matching bookends \u2014\n a bare icon on one side and a 32px circle on the other read as lopsided\n even with equal flex gap on both sides. Matching them also centers the\n search input's flex:1 fill symmetrically between the two. Fixed white +\n 18px glyph, same reasoning as .mobile-header-label \u2014 this sits on the\n dark ::backdrop blur in both themes, not a theme surface. */\n.dropdown-mode-mobile .mobile-header-content .dropdown-search-icon {\n position: static;\n transform: none;\n flex-shrink: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 32px;\n height: 32px;\n color: #ffffff;\n}\n.dropdown-mode-mobile .mobile-header-content .dropdown-search-icon svg {\n width: 18px;\n height: 18px;\n}\n\n/* Search input: bordered field from base styles; just size + icon room */\n.dropdown-search-input {\n min-height: 2.25rem;\n padding-right: var(--ty-spacing-2);\n /* room for the magnifier adornment */\n padding-left: calc(var(--ty-spacing-3) + 1rem + var(--ty-spacing-2));\n}\n/* Trigger already has a chevron - no second one inside the search row */\n.dropdown-search-chevron {\n display: none;\n}\n\n/* With the search row hidden nothing inside is focusable, so the <dialog>\n itself receives focus on open \u2014 suppress its UA focus ring */\n.dropdown-dialog:focus,\n.dropdown-dialog:focus-visible {\n outline: none;\n}\n\n/* Search row hidden ('auto' below threshold / searchable=\"false\"):\n the options panel owns the whole silhouette */\n.dropdown-header[hidden] {\n display: none;\n}\n.dropdown-header[hidden] ~ .dropdown-options-wrapper .dropdown-options {\n border-top: 1px solid var(--ty-floating-border);\n border-radius: var(--ty-radius-lg);\n}\n.mobile-search-input[hidden],\n.mobile-header-content .dropdown-search-icon[hidden] {\n display: none;\n}\n\n/* Options: vertical list rows fused under the search header.\n No own shadow/animation - the panel appears as one via dialog opacity. */\n.dropdown-options {\n flex-direction: column;\n flex-wrap: nowrap;\n align-items: stretch;\n gap: 0;\n /* Card-style list: rounded rows sit inset from the panel edges */\n padding: var(--ty-spacing-1);\n border-top: none;\n border-radius: 0 0 var(--ty-radius-lg) var(--ty-radius-lg);\n box-shadow: none;\n transform: none;\n transition: none;\n /* ~9-10 visible rows before scrolling (custom scrollbar, native hidden) */\n max-height: 24rem;\n}\n.dropdown-dialog.position-below .dropdown-options {\n box-shadow: none;\n}\n.dropdown-dialog.position-above .dropdown-options {\n border-top: 1px solid var(--ty-floating-border);\n border-bottom: none;\n border-radius: var(--ty-radius-lg) var(--ty-radius-lg) 0 0;\n}\n\n/* Loading panel continues the fused silhouette exactly like .dropdown-options \u2014\n the base layer styles it as a floating card (radius + shadow), which left a\n see-through gap under the search header while loading. */\n.dropdown-loading {\n border-top: none;\n border-radius: 0 0 var(--ty-radius-lg) var(--ty-radius-lg);\n box-shadow: none;\n}\n.dropdown-dialog.position-above .dropdown-loading {\n border-top: 1px solid var(--ty-floating-border);\n border-bottom: none;\n border-radius: var(--ty-radius-lg) var(--ty-radius-lg) 0 0;\n}\n\n/* Selection tick lives inside ty-option (lucide check on [selected]) */\n\n/* Mobile modal: same vertical list */\n.dropdown-mode-mobile .section-content ::slotted(ty-option) {\n display: block;\n width: 100%;\n}\n";
|
|
12
|
-
//# sourceMappingURL=select.d.ts.map
|
|
11
|
+
export declare const selectStyles = "\n/* Compact skin hugs its content (field skin = base styles) */\n.select-stub.compact {\n display: inline-flex;\n flex-wrap: nowrap;\n width: auto;\n gap: 0.5rem;\n /* extra right padding = room for the absolutely-positioned chevron */\n padding: 0.5rem 2.25rem 0.5rem 0.875rem;\n}\n\n/* Consumer-provided trigger (slot=\"trigger\"): no chrome at all */\n.select-stub.custom-trigger {\n display: inline-block;\n width: auto;\n border: none;\n background: none;\n padding: 0;\n min-height: 0;\n border-radius: 0;\n}\n.select-stub.custom-trigger:hover {\n border: none;\n}\n\n.select-count {\n flex-shrink: 0;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 1.25rem;\n height: 1.25rem;\n padding: 0 0.375rem;\n border-radius: 9999px;\n /* --ty-text-primary never existed as a token \u2014 this silently fell back\n to inherited/unset color. Now follows the select's own flavor. */\n background: color-mix(in oklab, var(--select-accent, var(--ty-color-primary)) 15%, transparent);\n color: var(--select-accent-bold, var(--ty-color-primary-strong));\n font-size: var(--ty-font-xs);\n font-weight: var(--ty-font-semibold);\n font-style: normal;\n}\n.select-count[hidden] {\n display: none;\n}\n\n/* Clear (x) button \u2014 normal flex child of .select-stub, not absolutely\n positioned like .dropdown-chevron: it just takes its own space in the\n row, no padding-right gutter math needed. Lives in the trigger slot's\n fallback content, so it's automatically absent under slot=\"trigger\". */\n.select-clear {\n flex-shrink: 0;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 1rem;\n height: 1rem;\n padding: 0;\n border: none;\n background: none;\n color: var(--input-placeholder, var(--ty-input-placeholder));\n cursor: pointer;\n border-radius: var(--ty-radius-sm);\n transition: var(--ty-local-transition, all 0.15s ease);\n}\n.select-clear[hidden] {\n display: none;\n}\n.select-clear:hover {\n /* Destructive utility action \u2014 neutral at rest, warns danger-red on\n hover regardless of the field's own flavor. */\n color: var(--ty-color-danger);\n background-color: var(--ty-bg-danger-soft);\n}\n.select-clear svg {\n width: 100%;\n height: 100%;\n}\n\n/* Selection text (field skin): single line, ellipsis, input colors.\n flex-basis 0, not auto \u2014 .select-stub is flex-wrap:wrap, and auto's\n hypothetical size is the FULL untruncated text width (wrap-line\n assignment happens before shrinking), which pushed fixed-size siblings\n (.select-clear) onto a second line even though the text visibly had\n room after truncating. 0 makes this item contribute ~nothing to the\n line-fit check up front; grow/shrink + overflow:hidden still truncate\n it identically. */\n.select-stub .dropdown-placeholder {\n font-style: normal;\n flex: 1 1 0%;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: var(--input-color, var(--ty-input-color));\n}\n\n.select-stub .dropdown-placeholder.placeholder-shown {\n color: var(--input-placeholder, var(--ty-input-placeholder));\n}\n.select-stub .dropdown-placeholder[hidden] {\n display: none;\n}\n\n/* Single-select display clone (slot=\"selected\"): the selected ty-option\n projected into the stub \u2014 its own :host([cloned]) styling strips the\n list-row chrome; here it just takes the text's flex slot. */\n.select-stub slot[name=\"selected\"] {\n display: none;\n}\n.select-stub.has-clone slot[name=\"selected\"] {\n display: block;\n flex: 1 1 auto;\n min-width: 0;\n overflow: hidden;\n}\n.select-stub.compact.has-clone slot[name=\"selected\"] {\n flex: 0 1 auto;\n}\n\n/* start/end slot content (icons etc.) \u2014 spacing comes from the stub's flex\n gap; muted like ty-input adornments. end sits before the chevron. */\n.select-stub ::slotted([slot=\"start\"]),\n.select-stub ::slotted([slot=\"end\"]) {\n flex-shrink: 0;\n color: var(--ty-text-soft);\n}\n\n/* Compact skin: the text IS the trigger label \u2014 no grow, regular text color.\n flex-basis: auto (not the field skin's 0%) \u2014 content-hugging needs its\n natural content width as the starting point; 0% would collapse it since\n grow is also 0 here (nothing left to expand it back out). */\n.select-stub.compact .dropdown-placeholder {\n flex: 0 1 auto;\n color: var(--ty-text);\n}\n\n/* Trigger stays visible while the popup is open (the popup hides it) */\n.dropdown-wrapper:has(.dropdown-chevron.open) .select-stub {\n opacity: 1;\n pointer-events: auto;\n}\n\n/* One-panel popup: search header fused with the options list */\n\n/* Single unified shadow around the whole panel (header + list as one silhouette) */\n.dropdown-dialog.open {\n filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.14)) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.08));\n}\n\n/* Card-style header: the search input keeps its own bordered-field look\n (base styles) and sits inset in the panel, TagPicker-style \u2014 no divider,\n whitespace separates it from the list. The header's OWN surface/border is\n part of the floating panel's chrome, not a form field \u2014 --ty-surface-\n floating/--ty-floating-border, matching .dropdown-options below it (same\n reasoning as the base-panel fix: --ty-input-* is deliberately faint for\n resting form fields and read as a missing/mismatched edge here). */\n.dropdown-header {\n background: var(--ty-surface-floating);\n border: 1px solid var(--ty-floating-border);\n border-bottom: none;\n border-radius: var(--ty-radius-lg) var(--ty-radius-lg) 0 0;\n padding: var(--ty-spacing-2) var(--ty-spacing-2) var(--ty-spacing-1);\n}\n.dropdown-dialog.position-below .dropdown-header {\n margin-bottom: 0;\n}\n.dropdown-dialog.position-above .dropdown-header {\n margin-top: 0;\n border-top: none;\n border-bottom: 1px solid var(--ty-floating-border);\n border-radius: 0 0 var(--ty-radius-lg) var(--ty-radius-lg);\n padding: var(--ty-spacing-1) var(--ty-spacing-2) var(--ty-spacing-2);\n}\n\n/* Magnifier adornment inside the search field (header padding + field inset) */\n.dropdown-search-icon {\n position: absolute;\n top: 50%;\n left: calc(var(--ty-spacing-2) + var(--ty-spacing-3));\n transform: translateY(-50%);\n width: 1rem;\n height: 1rem;\n color: var(--input-placeholder, var(--ty-input-placeholder));\n pointer-events: none;\n}\n.dropdown-search-icon svg {\n width: 100%;\n height: 100%;\n}\n\n/* Mobile header: flex row, icon flows inline before the input. Same 32x32\n footprint as .mobile-close-button (18px glyph centered in the box, not a\n bare 18px glyph flush at the edge) so the row has two matching bookends \u2014\n a bare icon on one side and a 32px circle on the other read as lopsided\n even with equal flex gap on both sides. Matching them also centers the\n search input's flex:1 fill symmetrically between the two. Fixed white +\n 18px glyph, same reasoning as .mobile-header-label \u2014 this sits on the\n dark ::backdrop blur in both themes, not a theme surface. */\n.dropdown-mode-mobile .mobile-header-content .dropdown-search-icon {\n position: static;\n transform: none;\n flex-shrink: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 32px;\n height: 32px;\n color: #ffffff;\n}\n.dropdown-mode-mobile .mobile-header-content .dropdown-search-icon svg {\n width: 18px;\n height: 18px;\n}\n\n/* Search input: bordered field from base styles; just size + icon room */\n.dropdown-search-input {\n min-height: 2.25rem;\n padding-right: var(--ty-spacing-2);\n /* room for the magnifier adornment */\n padding-left: calc(var(--ty-spacing-3) + 1rem + var(--ty-spacing-2));\n}\n/* Trigger already has a chevron - no second one inside the search row */\n.dropdown-search-chevron {\n display: none;\n}\n\n/* With the search row hidden nothing inside is focusable, so the <dialog>\n itself receives focus on open \u2014 suppress its UA focus ring */\n.dropdown-dialog:focus,\n.dropdown-dialog:focus-visible {\n outline: none;\n}\n\n/* Search row hidden ('auto' below threshold / searchable=\"false\"):\n the options panel owns the whole silhouette */\n.dropdown-header[hidden] {\n display: none;\n}\n.dropdown-header[hidden] ~ .dropdown-options-wrapper .dropdown-options {\n border-top: 1px solid var(--ty-floating-border);\n border-radius: var(--ty-radius-lg);\n}\n.mobile-search-input[hidden],\n.mobile-header-content .dropdown-search-icon[hidden] {\n display: none;\n}\n\n/* Options: vertical list rows fused under the search header.\n No own shadow/animation - the panel appears as one via dialog opacity. */\n.dropdown-options {\n flex-direction: column;\n flex-wrap: nowrap;\n align-items: stretch;\n gap: 0;\n /* Card-style list: rounded rows sit inset from the panel edges */\n padding: var(--ty-spacing-1);\n border-top: none;\n border-radius: 0 0 var(--ty-radius-lg) var(--ty-radius-lg);\n box-shadow: none;\n transform: none;\n transition: none;\n /* ~9-10 visible rows before scrolling (custom scrollbar, native hidden) */\n max-height: 24rem;\n}\n.dropdown-dialog.position-below .dropdown-options {\n box-shadow: none;\n}\n.dropdown-dialog.position-above .dropdown-options {\n border-top: 1px solid var(--ty-floating-border);\n border-bottom: none;\n border-radius: var(--ty-radius-lg) var(--ty-radius-lg) 0 0;\n}\n\n/* Loading panel continues the fused silhouette exactly like .dropdown-options \u2014\n the base layer styles it as a floating card (radius + shadow), which left a\n see-through gap under the search header while loading. */\n.dropdown-loading {\n border-top: none;\n border-radius: 0 0 var(--ty-radius-lg) var(--ty-radius-lg);\n box-shadow: none;\n}\n.dropdown-dialog.position-above .dropdown-loading {\n border-top: 1px solid var(--ty-floating-border);\n border-bottom: none;\n border-radius: var(--ty-radius-lg) var(--ty-radius-lg) 0 0;\n}\n\n/* Selection tick lives inside ty-option (lucide check on [selected]) */\n\n/* Mobile modal: same vertical list */\n.dropdown-mode-mobile .section-content ::slotted(ty-option) {\n display: block;\n width: 100%;\n}\n";
|
package/lib/styles/select.js
CHANGED
|
@@ -1,15 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Select Component Styles
|
|
3
|
-
* Layered over the shared select-field styles (popup, mobile modal, search).
|
|
4
|
-
*
|
|
5
|
-
* Skins:
|
|
6
|
-
* - default FIELD: the base .select-stub already carries the form-field
|
|
7
|
-
* look (width 100%, --ty-input-* tokens) — only text treatment added here
|
|
8
|
-
* - .compact: content-hugging trigger for toolbars, count badge
|
|
9
|
-
* - .custom-trigger (slot="trigger"): all chrome stripped
|
|
10
|
-
*/
|
|
11
1
|
export const selectStyles = `
|
|
12
|
-
/*
|
|
2
|
+
/* Compact skin hugs its content (field skin = base styles) */
|
|
13
3
|
.select-stub.compact {
|
|
14
4
|
display: inline-flex;
|
|
15
5
|
flex-wrap: nowrap;
|
|
@@ -105,7 +95,6 @@ export const selectStyles = `
|
|
|
105
95
|
color: var(--input-color, var(--ty-input-color));
|
|
106
96
|
}
|
|
107
97
|
|
|
108
|
-
/* Empty state: muted placeholder color */
|
|
109
98
|
.select-stub .dropdown-placeholder.placeholder-shown {
|
|
110
99
|
color: var(--input-placeholder, var(--ty-input-placeholder));
|
|
111
100
|
}
|
|
@@ -152,7 +141,7 @@ export const selectStyles = `
|
|
|
152
141
|
pointer-events: auto;
|
|
153
142
|
}
|
|
154
143
|
|
|
155
|
-
/*
|
|
144
|
+
/* One-panel popup: search header fused with the options list */
|
|
156
145
|
|
|
157
146
|
/* Single unified shadow around the whole panel (header + list as one silhouette) */
|
|
158
147
|
.dropdown-dialog.open {
|
|
@@ -305,4 +294,3 @@ export const selectStyles = `
|
|
|
305
294
|
width: 100%;
|
|
306
295
|
}
|
|
307
296
|
`;
|
|
308
|
-
//# sourceMappingURL=select.js.map
|
package/lib/styles/step.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Step Component Styles
|
|
3
3
|
*/
|
|
4
|
-
export declare const stepStyles = "\n:host {\n width: var(--ty-wizard-width, 100%);\n height: calc(var(--ty-wizard-height, 700px) - var(--ty-wizard-indicators-height, 120px));\n display: block;\n box-sizing: border-box;\n flex-shrink: 0;\n transition: opacity var(--ty-wizard-transition-duration, 400ms) var(--ty-wizard-transition-easing, ease-in-out);\n}\n\n@media (prefers-reduced-motion: reduce) {\n :host {\n transition-duration: 0ms !important;\n }\n}\n\n.step-wrapper {\n width: 100%;\n height: 100%;\n position: relative;\n overflow: hidden;\n}\n\n.step-panel {\n width: 100%;\n height: 100%;\n overflow: auto;\n box-sizing: border-box;\n}\n\n.step-panel.ty-custom-scroll {\n scrollbar-width: none;\n -ms-overflow-style: none;\n}\n\n.step-panel.ty-custom-scroll::-webkit-scrollbar {\n display: none;\n}\n\n.step-wrapper:hover .ty-scrollbar-track-y.has-overflow {\n opacity: 1;\n}\n\n\n/*
|
|
5
|
-
//# sourceMappingURL=step.d.ts.map
|
|
4
|
+
export declare const stepStyles = "\n:host {\n width: var(--ty-wizard-width, 100%);\n height: calc(var(--ty-wizard-height, 700px) - var(--ty-wizard-indicators-height, 120px));\n display: block;\n box-sizing: border-box;\n flex-shrink: 0;\n transition: opacity var(--ty-wizard-transition-duration, 400ms) var(--ty-wizard-transition-easing, ease-in-out);\n}\n\n@media (prefers-reduced-motion: reduce) {\n :host {\n transition-duration: 0ms !important;\n }\n}\n\n.step-wrapper {\n width: 100%;\n height: 100%;\n position: relative;\n overflow: hidden;\n}\n\n.step-panel {\n width: 100%;\n height: 100%;\n overflow: auto;\n box-sizing: border-box;\n}\n\n.step-panel.ty-custom-scroll {\n scrollbar-width: none;\n -ms-overflow-style: none;\n}\n\n.step-panel.ty-custom-scroll::-webkit-scrollbar {\n display: none;\n}\n\n.step-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";
|
package/lib/styles/step.js
CHANGED
package/lib/styles/switch.d.ts
CHANGED
package/lib/styles/switch.js
CHANGED
|
@@ -1,17 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Switch Component Styles
|
|
3
|
-
* Track + thumb visual, ARIA role="switch".
|
|
4
|
-
*
|
|
5
|
-
* Reuses input-container/error-message rules from input styles for label
|
|
6
|
-
* and error layout consistency.
|
|
7
|
-
*/
|
|
8
1
|
import { FLAVORS } from "../types/common.js";
|
|
9
2
|
import { inputStyles } from "./input.js";
|
|
10
|
-
/* Flavor rules only set --switch-track; the single checked-state rule below
|
|
11
|
-
consumes it. The var doubles as the per-instance override API:
|
|
12
|
-
`ty-switch { --switch-track: … }` (outer-document host rules beat :host).
|
|
13
|
-
Optional fallback flavor `fb` is used for custom flavors so missing
|
|
14
|
-
tokens degrade to neutral instead of an unstyled track. */
|
|
15
3
|
const switchFlavor = (f, fb) => {
|
|
16
4
|
const tok = (s) => fb
|
|
17
5
|
? `var(--ty-color-${f}${s}, var(--ty-color-${fb}${s}))`
|
|
@@ -22,7 +10,6 @@ const switchFlavor = (f, fb) => {
|
|
|
22
10
|
:host([flavor="${f}-"]) { --switch-track: ${tok("-soft")}; }
|
|
23
11
|
`;
|
|
24
12
|
};
|
|
25
|
-
/** Rules for one custom (non-built-in) flavor — see utils/flavor-sheet.ts. */
|
|
26
13
|
export const switchCustomFlavorCss = (base) => switchFlavor(base, "neutral");
|
|
27
14
|
export const switchStyles = `
|
|
28
15
|
${inputStyles}
|
|
@@ -34,7 +21,7 @@ ${inputStyles}
|
|
|
34
21
|
vertical-align: middle;
|
|
35
22
|
}
|
|
36
23
|
|
|
37
|
-
/*
|
|
24
|
+
/* The switch container is just the visual */
|
|
38
25
|
.switch-container {
|
|
39
26
|
display: inline-block;
|
|
40
27
|
cursor: pointer;
|
|
@@ -53,7 +40,6 @@ ${inputStyles}
|
|
|
53
40
|
box-shadow: 0 0 0 3px var(--ty-input-shadow-focus);
|
|
54
41
|
}
|
|
55
42
|
|
|
56
|
-
/* ===== TRACK ===== */
|
|
57
43
|
.switch-track {
|
|
58
44
|
position: relative;
|
|
59
45
|
flex-shrink: 0;
|
|
@@ -65,7 +51,6 @@ ${inputStyles}
|
|
|
65
51
|
box-sizing: border-box;
|
|
66
52
|
}
|
|
67
53
|
|
|
68
|
-
/* ===== THUMB ===== */
|
|
69
54
|
.switch-thumb {
|
|
70
55
|
position: absolute;
|
|
71
56
|
top: 2px;
|
|
@@ -78,7 +63,6 @@ ${inputStyles}
|
|
|
78
63
|
transition: var(--ty-local-transition, transform 0.18s ease-in-out, background-color 0.18s ease-in-out);
|
|
79
64
|
}
|
|
80
65
|
|
|
81
|
-
/* ===== CHECKED STATE ===== */
|
|
82
66
|
/* Default (no flavor attribute) is primary — defaults don't reflect to the
|
|
83
67
|
host attribute, so the base rule's fallback carries the default look. */
|
|
84
68
|
.switch-container[aria-checked="true"] .switch-track {
|
|
@@ -89,7 +73,6 @@ ${inputStyles}
|
|
|
89
73
|
transform: translateX(16px);
|
|
90
74
|
}
|
|
91
75
|
|
|
92
|
-
/* ===== SIZE VARIANTS ===== */
|
|
93
76
|
.switch-container.xs .switch-track { width: 26px; height: 14px; }
|
|
94
77
|
.switch-container.xs .switch-thumb { width: 10px; height: 10px; }
|
|
95
78
|
.switch-container.xs[aria-checked="true"] .switch-thumb { transform: translateX(12px); }
|
|
@@ -108,8 +91,7 @@ ${inputStyles}
|
|
|
108
91
|
.switch-container.xl .switch-thumb { width: 24px; height: 24px; }
|
|
109
92
|
.switch-container.xl[aria-checked="true"] .switch-thumb { transform: translateX(24px); }
|
|
110
93
|
|
|
111
|
-
/*
|
|
94
|
+
/* Flavor variants set --switch-track, consumed above */
|
|
112
95
|
${FLAVORS.map((f) => switchFlavor(f)).join("")}
|
|
113
96
|
|
|
114
97
|
`;
|
|
115
|
-
//# sourceMappingURL=switch.js.map
|
package/lib/styles/tab.d.ts
CHANGED
|
@@ -1,5 +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
|
|
5
|
-
//# sourceMappingURL=tab.d.ts.map
|
|
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";
|
package/lib/styles/tab.js
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tab Component Styles
|
|
3
|
-
*/
|
|
4
1
|
import { customScrollbarStyles } from './custom-scrollbar.js';
|
|
5
2
|
export const tabStyles = `
|
|
6
3
|
:host {
|
|
@@ -41,11 +38,9 @@ export const tabStyles = `
|
|
|
41
38
|
display: none;
|
|
42
39
|
}
|
|
43
40
|
|
|
44
|
-
/* Show scrollbar on hover */
|
|
45
41
|
.tab-wrapper:hover .ty-scrollbar-track-y.has-overflow {
|
|
46
42
|
opacity: 1;
|
|
47
43
|
}
|
|
48
44
|
|
|
49
45
|
${customScrollbarStyles}
|
|
50
46
|
`;
|
|
51
|
-
//# sourceMappingURL=tab.js.map
|