tyrell-components 1.0.0-RC13 → 1.0.0-RC15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -2
- package/css/tyrell-theme.css +192 -180
- package/css/tyrell.css +23 -0
- package/dist/tyrell-colors-static.css +1 -316
- package/dist/tyrell-theme.css +1 -1454
- package/dist/tyrell.css +1 -1371
- package/dist/tyrell.js +1 -1
- package/lib/base/ty-component.d.ts +20 -10
- package/lib/base/ty-component.js +196 -319
- package/lib/components/button.d.ts +3 -17
- package/lib/components/button.js +261 -295
- package/lib/components/calendar-month.d.ts +4 -50
- package/lib/components/calendar-month.js +443 -582
- package/lib/components/calendar-navigation.d.ts +3 -48
- package/lib/components/calendar-navigation.js +239 -362
- package/lib/components/calendar.d.ts +8 -83
- package/lib/components/calendar.js +616 -829
- package/lib/components/checkbox.d.ts +5 -72
- package/lib/components/checkbox.js +273 -416
- package/lib/components/copy.d.ts +4 -57
- package/lib/components/copy.js +280 -397
- package/lib/components/date-picker.d.ts +21 -163
- package/lib/components/date-picker.js +1143 -1674
- package/lib/components/file-upload.d.ts +9 -15
- package/lib/components/file-upload.js +404 -426
- package/lib/components/icon.d.ts +3 -24
- package/lib/components/icon.js +141 -230
- package/lib/components/input.d.ts +8 -108
- package/lib/components/input.js +593 -784
- package/lib/components/modal.d.ts +17 -26
- package/lib/components/modal.js +340 -484
- package/lib/components/option.d.ts +2 -9
- package/lib/components/option.js +168 -216
- package/lib/components/popup.d.ts +2 -17
- package/lib/components/popup.js +249 -380
- package/lib/components/radio.d.ts +5 -25
- package/lib/components/radio.js +407 -461
- package/lib/components/resize-observer.d.ts +3 -30
- package/lib/components/resize-observer.js +69 -103
- package/lib/components/scroll-container.d.ts +2 -12
- package/lib/components/scroll-container.js +293 -338
- package/lib/components/select.d.ts +87 -159
- package/lib/components/select.js +1609 -2090
- package/lib/components/selected-tags.d.ts +5 -48
- package/lib/components/selected-tags.js +188 -276
- package/lib/components/step.d.ts +1 -6
- package/lib/components/step.js +62 -68
- package/lib/components/switch.d.ts +1 -12
- package/lib/components/switch.js +214 -247
- package/lib/components/tab.d.ts +1 -6
- package/lib/components/tab.js +62 -69
- package/lib/components/tabs.d.ts +6 -63
- package/lib/components/tabs.js +545 -777
- package/lib/components/tag.d.ts +3 -37
- package/lib/components/tag.js +236 -335
- package/lib/components/textarea.d.ts +7 -87
- package/lib/components/textarea.js +457 -627
- package/lib/components/tooltip.d.ts +3 -11
- package/lib/components/tooltip.js +307 -443
- package/lib/components/wizard.d.ts +6 -54
- package/lib/components/wizard.js +405 -618
- 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 +392 -400
- package/lib/icons/heroicons/mini.d.ts +0 -1
- package/lib/icons/heroicons/mini.js +382 -390
- package/lib/icons/heroicons/outline.d.ts +0 -1
- package/lib/icons/heroicons/outline.js +337 -345
- package/lib/icons/heroicons/solid.d.ts +0 -1
- package/lib/icons/heroicons/solid.js +407 -415
- package/lib/icons/lucide.d.ts +0 -1
- package/lib/icons/lucide.js +24479 -26351
- package/lib/icons/material/filled.d.ts +0 -1
- package/lib/icons/material/filled.js +9653 -9663
- package/lib/icons/material/outlined.d.ts +0 -1
- package/lib/icons/material/outlined.js +10271 -10281
- package/lib/icons/material/round.d.ts +0 -1
- package/lib/icons/material/round.js +10495 -10505
- package/lib/icons/material/sharp.d.ts +0 -1
- package/lib/icons/material/sharp.js +9905 -9915
- package/lib/icons/material/two-tone.d.ts +0 -1
- package/lib/icons/material/two-tone.js +12792 -12802
- package/lib/index.d.ts +0 -1
- package/lib/index.js +21 -41
- package/lib/styles/button.d.ts +2 -20
- package/lib/styles/button.js +202 -404
- package/lib/styles/calendar-month.d.ts +1 -5
- package/lib/styles/calendar-month.js +127 -244
- package/lib/styles/calendar-navigation.d.ts +2 -6
- package/lib/styles/calendar-navigation.js +64 -104
- package/lib/styles/calendar.d.ts +1 -2
- package/lib/styles/calendar.js +9 -22
- package/lib/styles/checkbox.d.ts +0 -1
- package/lib/styles/checkbox.js +45 -94
- package/lib/styles/copy.d.ts +0 -1
- package/lib/styles/copy.js +67 -106
- package/lib/styles/custom-scrollbar.d.ts +1 -2
- package/lib/styles/custom-scrollbar.js +80 -115
- package/lib/styles/date-picker.d.ts +1 -5
- package/lib/styles/date-picker.js +261 -335
- package/lib/styles/field-size.d.ts +6 -0
- package/lib/styles/field-size.js +91 -0
- package/lib/styles/file-upload.d.ts +1 -2
- package/lib/styles/file-upload.js +143 -188
- package/lib/styles/icon.d.ts +2 -6
- package/lib/styles/icon.js +92 -170
- package/lib/styles/input.d.ts +1 -6
- package/lib/styles/input.js +125 -290
- package/lib/styles/modal.d.ts +1 -2
- package/lib/styles/modal.js +71 -108
- package/lib/styles/option.d.ts +2 -6
- package/lib/styles/option.js +49 -64
- package/lib/styles/popup.d.ts +1 -2
- package/lib/styles/popup.js +42 -77
- package/lib/styles/radio.d.ts +0 -1
- package/lib/styles/radio.js +69 -110
- package/lib/styles/resize-observer.d.ts +1 -2
- package/lib/styles/resize-observer.js +2 -12
- package/lib/styles/scroll-container.d.ts +1 -2
- package/lib/styles/scroll-container.js +100 -149
- package/lib/styles/select-base.d.ts +0 -1
- package/lib/styles/select-base.js +597 -785
- package/lib/styles/select.d.ts +1 -2
- package/lib/styles/select.js +140 -236
- package/lib/styles/step.d.ts +1 -2
- package/lib/styles/step.js +22 -33
- package/lib/styles/switch.d.ts +0 -1
- package/lib/styles/switch.js +34 -73
- package/lib/styles/tab.d.ts +1 -2
- package/lib/styles/tab.js +22 -34
- package/lib/styles/tabs.d.ts +3 -11
- package/lib/styles/tabs.js +190 -222
- package/lib/styles/tag.d.ts +1 -5
- package/lib/styles/tag.js +136 -218
- package/lib/styles/textarea.d.ts +1 -2
- package/lib/styles/textarea.js +210 -319
- package/lib/styles/tooltip.d.ts +0 -1
- package/lib/styles/tooltip.js +3 -13
- package/lib/styles/wizard.d.ts +5 -21
- package/lib/styles/wizard.js +170 -306
- package/lib/types/common.d.ts +2 -2
- package/lib/types/common.js +6 -17
- package/lib/utils/calendar-utils.d.ts +4 -21
- package/lib/utils/calendar-utils.js +100 -273
- package/lib/utils/custom-scrollbar.d.ts +6 -20
- package/lib/utils/custom-scrollbar.js +273 -317
- package/lib/utils/flavor-sheet.d.ts +0 -1
- package/lib/utils/flavor-sheet.js +14 -37
- package/lib/utils/icon-registry.d.ts +0 -2
- package/lib/utils/icon-registry.js +137 -243
- 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 +3 -35
- package/lib/utils/locale.d.ts +2 -23
- package/lib/utils/locale.js +34 -120
- package/lib/utils/mobile.d.ts +0 -1
- package/lib/utils/mobile.js +1 -18
- package/lib/utils/number-format.d.ts +6 -3
- package/lib/utils/number-format.js +54 -110
- package/lib/utils/positioning.d.ts +50 -7
- package/lib/utils/positioning.js +224 -234
- package/lib/utils/property-capture.d.ts +5 -27
- package/lib/utils/property-capture.js +36 -144
- package/lib/utils/property-manager.d.ts +0 -1
- package/lib/utils/property-manager.js +126 -196
- package/lib/utils/resize-observer.d.ts +0 -1
- package/lib/utils/resize-observer.js +23 -59
- package/lib/utils/scroll-lock.d.ts +4 -11
- package/lib/utils/scroll-lock.js +65 -172
- package/lib/utils/styles.d.ts +0 -1
- package/lib/utils/styles.js +17 -41
- package/lib/version.d.ts +1 -2
- package/lib/version.js +1 -11
- package/package.json +4 -4
- 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,400 +1,326 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Date Picker Component Styles
|
|
3
|
-
* PORTED FROM: cljs/ty/components/date_picker.css
|
|
4
|
-
*/
|
|
5
1
|
import { FLAVORS } from "../types/common.js";
|
|
6
|
-
|
|
7
|
-
(hover/focus border), and -ring (focus shadow); the stub base rules
|
|
8
|
-
consume them. Doubles as the per-instance override API. Neutral is
|
|
9
|
-
skipped — the 'default' flavor is the unstyled --ty-date-picker-* chrome.
|
|
10
|
-
Fallback flavor `fb` is used for custom flavors (suffixed tokens fall
|
|
11
|
-
back to the custom base color, then neutral). */
|
|
2
|
+
import { fieldSizeVars } from "./field-size.js";
|
|
12
3
|
const datePickerFlavor = (f, fb) => {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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 `
|
|
21
12
|
:host([flavor="${f}"]) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
13
|
+
--date-picker-accent: var(--ty-input-${f}-border, ${c("-soft")});
|
|
14
|
+
--date-picker-accent-bold: ${c("")};
|
|
15
|
+
--date-picker-ring: color-mix(in oklab, ${c("")} 15%, transparent);
|
|
25
16
|
}
|
|
26
17
|
:host([flavor="${f}+"]) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
18
|
+
--date-picker-accent: ${c("")};
|
|
19
|
+
--date-picker-accent-bold: ${c("-strong")};
|
|
20
|
+
--date-picker-ring: color-mix(in oklab, ${c("-strong")} 15%, transparent);
|
|
30
21
|
}
|
|
31
22
|
:host([flavor="${f}-"]) {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
23
|
+
--date-picker-accent: ${c("-faint")};
|
|
24
|
+
--date-picker-accent-bold: ${c("-soft")};
|
|
25
|
+
--date-picker-ring: color-mix(in oklab, ${c("-soft")} 15%, transparent);
|
|
35
26
|
}
|
|
36
27
|
`;
|
|
37
28
|
};
|
|
38
|
-
/** Rules for one custom (non-built-in) flavor — see utils/flavor-sheet.ts. */
|
|
39
29
|
export const datePickerCustomFlavorCss = (base) => datePickerFlavor(base, "neutral");
|
|
40
30
|
export const datePickerStyles = `
|
|
41
|
-
|
|
31
|
+
${fieldSizeVars}
|
|
42
32
|
:host {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
--ty-calendar-surface-bg: var(--ty-surface-floating);
|
|
69
|
-
--ty-calendar-surface-border: var(--ty-input-border);
|
|
70
|
-
--ty-calendar-surface-shadow: var(--ty-shadow-lg, 0 4px 20px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.1));
|
|
71
|
-
--ty-calendar-surface-radius: var(--ty-radius-lg);
|
|
72
|
-
|
|
73
|
-
/* ==========================================================================
|
|
74
|
-
Theming Tokens — Time Section
|
|
75
|
-
========================================================================== */
|
|
76
|
-
--ty-calendar-time-bg: transparent;
|
|
77
|
-
--ty-calendar-time-border: var(--ty-border-faint);
|
|
78
|
-
--ty-calendar-time-label-color: var(--ty-color-neutral);
|
|
79
|
-
--ty-calendar-time-input-color: var(--ty-input-color);
|
|
80
|
-
--ty-calendar-time-placeholder-color: var(--ty-input-placeholder);
|
|
81
|
-
--ty-calendar-time-icon-color: var(--ty-color-neutral-soft);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
/* Container structure (reuses dropdown patterns) */
|
|
33
|
+
display: block;
|
|
34
|
+
width: auto;
|
|
35
|
+
min-width: 200px;
|
|
36
|
+
font-family: inherit;
|
|
37
|
+
--ty-date-picker-bg: var(--ty-input-bg);
|
|
38
|
+
--ty-date-picker-color: var(--ty-input-color);
|
|
39
|
+
--ty-date-picker-placeholder: var(--ty-input-placeholder);
|
|
40
|
+
--ty-date-picker-border: var(--ty-input-border);
|
|
41
|
+
--ty-date-picker-border-hover: var(--ty-input-border-hover);
|
|
42
|
+
--ty-date-picker-border-focus: var(--ty-input-border-focus);
|
|
43
|
+
--ty-date-picker-shadow-focus: var(--ty-input-shadow-focus);
|
|
44
|
+
--ty-date-picker-disabled-bg: var(--ty-input-disabled-bg);
|
|
45
|
+
--ty-date-picker-disabled-color: var(--ty-input-disabled-color);
|
|
46
|
+
--ty-date-picker-radius: var(--ty-radius-md);
|
|
47
|
+
--ty-calendar-surface-bg: var(--ty-surface-floating);
|
|
48
|
+
--ty-calendar-surface-border: var(--ty-input-border);
|
|
49
|
+
--ty-calendar-surface-shadow: var(--ty-shadow-lg, 0 4px 20px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.1));
|
|
50
|
+
--ty-calendar-surface-radius: var(--ty-radius-lg);
|
|
51
|
+
--ty-calendar-time-bg: transparent;
|
|
52
|
+
--ty-calendar-time-border: var(--ty-border-faint);
|
|
53
|
+
--ty-calendar-time-label-color: var(--ty-color-neutral);
|
|
54
|
+
--ty-calendar-time-input-color: var(--ty-input-color);
|
|
55
|
+
--ty-calendar-time-placeholder-color: var(--ty-input-placeholder);
|
|
56
|
+
--ty-calendar-time-icon-color: var(--ty-color-neutral-soft);
|
|
57
|
+
}
|
|
85
58
|
.dropdown-container {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
59
|
+
display: flex;
|
|
60
|
+
flex-direction: column;
|
|
61
|
+
width: 100%;
|
|
62
|
+
box-sizing: border-box;
|
|
90
63
|
}
|
|
91
|
-
|
|
92
64
|
.ty-field-label {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
}
|
|
103
|
-
|
|
65
|
+
font-size: var(--ty-field-label-font);
|
|
66
|
+
line-height: var(--ty-field-label-leading);
|
|
67
|
+
letter-spacing: var(--ty-tracking-sm);
|
|
68
|
+
font-weight: var(--ty-font-medium);
|
|
69
|
+
color: var(--ty-label-color);
|
|
70
|
+
margin-bottom: var(--ty-field-label-gap);
|
|
71
|
+
padding-left: var(--ty-field-outer-pad-x);
|
|
72
|
+
display: flex;
|
|
73
|
+
align-items: center;
|
|
74
|
+
}
|
|
104
75
|
.required-icon {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
}
|
|
113
|
-
|
|
76
|
+
display: inline-flex;
|
|
77
|
+
align-items: center;
|
|
78
|
+
color: #ef4444;
|
|
79
|
+
width: 12px;
|
|
80
|
+
height: 12px;
|
|
81
|
+
vertical-align: middle;
|
|
82
|
+
margin-left: 4px;
|
|
83
|
+
}
|
|
114
84
|
.dropdown-wrapper {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
85
|
+
position: relative;
|
|
86
|
+
display: block;
|
|
87
|
+
width: 100%;
|
|
118
88
|
}
|
|
119
|
-
|
|
120
|
-
/* Start-slot icon (leading content inside the date-picker stub) */
|
|
121
89
|
.date-picker-stub ::slotted([slot="start"]) {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
}
|
|
129
|
-
|
|
90
|
+
display: flex;
|
|
91
|
+
align-items: center;
|
|
92
|
+
justify-content: center;
|
|
93
|
+
flex-shrink: 0;
|
|
94
|
+
margin-right: 0.5rem;
|
|
95
|
+
color: var(--ty-color-text-soft);
|
|
96
|
+
}
|
|
130
97
|
.date-picker-stub ::slotted(ty-icon[slot="start"]) {
|
|
131
|
-
|
|
132
|
-
|
|
98
|
+
width: 1em;
|
|
99
|
+
height: 1em;
|
|
133
100
|
}
|
|
134
|
-
|
|
135
|
-
/* Date picker stub (styled like dropdown) */
|
|
136
101
|
.date-picker-stub {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
}
|
|
157
|
-
|
|
102
|
+
width: 100%;
|
|
103
|
+
cursor: pointer;
|
|
104
|
+
box-sizing: border-box;
|
|
105
|
+
position: relative;
|
|
106
|
+
display: flex;
|
|
107
|
+
align-items: center;
|
|
108
|
+
background: var(--ty-date-picker-bg);
|
|
109
|
+
color: var(--ty-date-picker-color);
|
|
110
|
+
border: 1px solid var(--date-picker-accent, var(--ty-date-picker-border));
|
|
111
|
+
border-radius: var(--ty-date-picker-radius);
|
|
112
|
+
font-family: inherit;
|
|
113
|
+
font-size: var(--ty-field-font);
|
|
114
|
+
font-weight: var(--ty-font-normal);
|
|
115
|
+
line-height: var(--ty-field-leading);
|
|
116
|
+
min-height: var(--ty-field-height);
|
|
117
|
+
padding: 0 var(--ty-field-pad-x);
|
|
118
|
+
padding-right: calc(var(--ty-field-pad-x) + 1rem + var(--ty-field-pad-x));
|
|
119
|
+
transition: var(--ty-transition-all), opacity 0.2s ease;
|
|
120
|
+
outline: none;
|
|
121
|
+
}
|
|
158
122
|
.date-picker-stub:hover:not([disabled]):not(.open) {
|
|
159
|
-
|
|
123
|
+
border-color: var(--date-picker-accent-bold, var(--ty-date-picker-border-hover));
|
|
160
124
|
}
|
|
161
|
-
|
|
162
125
|
.date-picker-stub[disabled] {
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
126
|
+
background-color: var(--ty-date-picker-disabled-bg);
|
|
127
|
+
color: var(--ty-date-picker-disabled-color);
|
|
128
|
+
cursor: not-allowed;
|
|
129
|
+
opacity: 0.6;
|
|
167
130
|
}
|
|
168
|
-
|
|
169
131
|
.date-picker-stub:focus,
|
|
170
132
|
.date-picker-stub.open {
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
/* Size variants */
|
|
176
|
-
.date-picker-stub.sm {
|
|
177
|
-
min-height: var(--ty-size-sm);
|
|
178
|
-
font-size: var(--ty-font-xs);
|
|
179
|
-
padding: var(--ty-spacing-1) var(--ty-spacing-2);
|
|
180
|
-
padding-right: calc(var(--ty-spacing-2) + 0.875rem + var(--ty-spacing-1));
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
.date-picker-stub.lg {
|
|
184
|
-
min-height: var(--ty-size-lg);
|
|
185
|
-
font-size: var(--ty-font-base);
|
|
186
|
-
padding: var(--ty-spacing-2) var(--ty-spacing-4);
|
|
187
|
-
padding-right: calc(var(--ty-spacing-4) + 1.125rem + var(--ty-spacing-2));
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
/* Flavor variants — set --date-picker-accent*, consumed by the stub rules above */
|
|
133
|
+
border-color: var(--date-picker-accent-bold, var(--ty-date-picker-border-focus));
|
|
134
|
+
box-shadow: 0 0 0 3px var(--date-picker-ring, var(--ty-date-picker-shadow-focus));
|
|
135
|
+
}
|
|
191
136
|
${FLAVORS.filter((f) => f !== "neutral").map((f) => datePickerFlavor(f)).join("")}
|
|
192
|
-
|
|
193
|
-
/* Text content */
|
|
194
137
|
.stub-text {
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
}
|
|
203
|
-
|
|
138
|
+
flex: 1;
|
|
139
|
+
white-space: nowrap;
|
|
140
|
+
overflow: hidden;
|
|
141
|
+
text-overflow: ellipsis;
|
|
142
|
+
user-select: none;
|
|
143
|
+
color: inherit;
|
|
144
|
+
pointer-events: none;
|
|
145
|
+
}
|
|
204
146
|
.stub-text.placeholder {
|
|
205
|
-
|
|
147
|
+
color: var(--ty-date-picker-placeholder);
|
|
206
148
|
}
|
|
207
|
-
|
|
208
|
-
/* Icons */
|
|
209
149
|
.stub-icons {
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
}
|
|
221
|
-
|
|
150
|
+
display: flex;
|
|
151
|
+
align-items: center;
|
|
152
|
+
gap: var(--ty-spacing-1);
|
|
153
|
+
position: absolute;
|
|
154
|
+
right: var(--ty-spacing-3);
|
|
155
|
+
top: 50%;
|
|
156
|
+
transform: translateY(-50%);
|
|
157
|
+
height: 1rem;
|
|
158
|
+
pointer-events: none;
|
|
159
|
+
z-index: 2;
|
|
160
|
+
}
|
|
222
161
|
.stub-clear {
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
}
|
|
237
|
-
|
|
162
|
+
display: flex;
|
|
163
|
+
align-items: center;
|
|
164
|
+
justify-content: center;
|
|
165
|
+
width: 1rem;
|
|
166
|
+
height: 1rem;
|
|
167
|
+
padding: 0;
|
|
168
|
+
border: none;
|
|
169
|
+
background: none;
|
|
170
|
+
color: var(--ty-color-neutral-soft);
|
|
171
|
+
cursor: pointer;
|
|
172
|
+
border-radius: var(--ty-radius-sm);
|
|
173
|
+
transition: var(--ty-local-transition, all 0.15s ease);
|
|
174
|
+
pointer-events: auto;
|
|
175
|
+
}
|
|
238
176
|
.stub-clear:hover {
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
--ty-bg-negative-faint used here previously don't exist as tokens —
|
|
243
|
-
this silently fell back to unstyled inherited color.) */
|
|
244
|
-
color: var(--ty-color-danger);
|
|
245
|
-
background-color: var(--ty-bg-danger-soft);
|
|
246
|
-
}
|
|
247
|
-
|
|
177
|
+
color: var(--ty-color-danger);
|
|
178
|
+
background-color: var(--ty-bg-danger-soft);
|
|
179
|
+
}
|
|
248
180
|
.stub-arrow {
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
}
|
|
256
|
-
|
|
181
|
+
display: flex;
|
|
182
|
+
align-items: center;
|
|
183
|
+
justify-content: center;
|
|
184
|
+
width: 1rem;
|
|
185
|
+
height: 1rem;
|
|
186
|
+
color: var(--date-picker-accent, var(--ty-color-neutral-soft));
|
|
187
|
+
}
|
|
257
188
|
.date-picker-stub:hover .stub-arrow {
|
|
258
|
-
|
|
189
|
+
color: var(--date-picker-accent-bold, var(--ty-color-neutral));
|
|
259
190
|
}
|
|
260
|
-
|
|
261
191
|
.date-picker-stub:focus .stub-arrow,
|
|
262
192
|
.date-picker-stub.open .stub-arrow {
|
|
263
|
-
|
|
193
|
+
color: var(--date-picker-accent-bold, var(--ty-date-picker-border-focus));
|
|
264
194
|
}
|
|
265
|
-
|
|
266
|
-
/* Calendar dialog (showModal positioning system) */
|
|
267
195
|
.calendar-dialog {
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
196
|
+
position: fixed;
|
|
197
|
+
flex-direction: column;
|
|
198
|
+
max-width: 90vw;
|
|
199
|
+
margin: 0;
|
|
200
|
+
padding: 0;
|
|
201
|
+
border: none;
|
|
202
|
+
background: transparent;
|
|
203
|
+
box-sizing: border-box;
|
|
204
|
+
padding: var(--calendar-padding, 8px);
|
|
205
|
+
opacity: 0;
|
|
206
|
+
scale: 0.96;
|
|
207
|
+
translate: 0 -6px;
|
|
208
|
+
transform-origin: top center;
|
|
209
|
+
transition:
|
|
210
|
+
opacity var(--ty-popup-duration, 180ms) var(--ty-popup-ease, cubic-bezier(0.34, 1.56, 0.64, 1)),
|
|
211
|
+
scale var(--ty-popup-duration, 180ms) var(--ty-popup-ease, cubic-bezier(0.34, 1.56, 0.64, 1)),
|
|
212
|
+
translate var(--ty-popup-duration, 180ms) var(--ty-popup-ease, cubic-bezier(0.34, 1.56, 0.64, 1));
|
|
213
|
+
transform: translate(var(--calendar-offset-x, 0px), var(--calendar-offset-y, 0px));
|
|
214
|
+
top: -1000px;
|
|
215
|
+
left: -1000px;
|
|
216
|
+
}
|
|
288
217
|
.calendar-dialog.position-below {
|
|
289
|
-
|
|
290
|
-
|
|
218
|
+
left: var(--calendar-x);
|
|
219
|
+
top: var(--calendar-y);
|
|
291
220
|
}
|
|
292
|
-
|
|
293
221
|
.calendar-dialog.position-above {
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
222
|
+
left: var(--calendar-x);
|
|
223
|
+
bottom: var(--calendar-y);
|
|
224
|
+
top: auto;
|
|
225
|
+
flex-direction: column-reverse;
|
|
226
|
+
translate: 0 6px;
|
|
227
|
+
transform-origin: bottom center;
|
|
228
|
+
}
|
|
229
|
+
.calendar-dialog.open {
|
|
230
|
+
opacity: 1;
|
|
231
|
+
scale: 1;
|
|
232
|
+
translate: 0 0;
|
|
298
233
|
}
|
|
299
|
-
|
|
234
|
+
@starting-style {
|
|
300
235
|
.calendar-dialog.open {
|
|
301
|
-
|
|
236
|
+
opacity: 0;
|
|
237
|
+
scale: 0.96;
|
|
238
|
+
translate: 0 -6px;
|
|
239
|
+
}
|
|
240
|
+
.calendar-dialog.open.position-above {
|
|
241
|
+
translate: 0 6px;
|
|
242
|
+
}
|
|
302
243
|
}
|
|
303
|
-
|
|
304
244
|
.calendar-dialog::backdrop {
|
|
305
|
-
|
|
245
|
+
background: transparent
|
|
306
246
|
}
|
|
307
|
-
|
|
308
|
-
/* Calendar content container */
|
|
309
247
|
.calendar-content {
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
/* Native date input for mobile */
|
|
321
|
-
/* Native input is invisible — used only to trigger the OS picker */
|
|
248
|
+
background-color: var(--ty-calendar-surface-bg);
|
|
249
|
+
border: 1px solid var(--ty-calendar-surface-border);
|
|
250
|
+
border-radius: var(--ty-calendar-surface-radius);
|
|
251
|
+
box-shadow: var(--ty-calendar-surface-shadow);
|
|
252
|
+
overflow: hidden;
|
|
253
|
+
display: flex;
|
|
254
|
+
flex-direction: column;
|
|
255
|
+
align-items: center;
|
|
256
|
+
}
|
|
322
257
|
.native-date-input {
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
}
|
|
334
|
-
|
|
258
|
+
position: absolute;
|
|
259
|
+
inset: 0;
|
|
260
|
+
opacity: 0;
|
|
261
|
+
width: 100%;
|
|
262
|
+
height: 100%;
|
|
263
|
+
margin: 0;
|
|
264
|
+
padding: 0;
|
|
265
|
+
border: none;
|
|
266
|
+
cursor: pointer;
|
|
267
|
+
z-index: 1;
|
|
268
|
+
}
|
|
335
269
|
.native-date-input::-webkit-calendar-picker-indicator {
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
/* Time input section */
|
|
270
|
+
position: absolute;
|
|
271
|
+
inset: 0;
|
|
272
|
+
width: 100%;
|
|
273
|
+
height: 100%;
|
|
274
|
+
margin: 0;
|
|
275
|
+
padding: 0;
|
|
276
|
+
cursor: pointer;
|
|
277
|
+
}
|
|
346
278
|
.time-section {
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
}
|
|
359
|
-
|
|
279
|
+
display: flex;
|
|
280
|
+
min-height: 2.5rem;
|
|
281
|
+
align-items: center;
|
|
282
|
+
justify-content: center;
|
|
283
|
+
gap: 0.5rem;
|
|
284
|
+
padding: 0.5rem 1rem;
|
|
285
|
+
border-top: 1px solid var(--ty-calendar-time-border);
|
|
286
|
+
background-color: var(--ty-calendar-time-bg);
|
|
287
|
+
width: 100%;
|
|
288
|
+
box-sizing: border-box;
|
|
289
|
+
position: relative;
|
|
290
|
+
}
|
|
360
291
|
.time-label {
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
292
|
+
font-size: var(--ty-font-sm);
|
|
293
|
+
font-weight: 500;
|
|
294
|
+
color: var(--ty-calendar-time-label-color);
|
|
295
|
+
flex-shrink: 0;
|
|
365
296
|
}
|
|
366
|
-
|
|
367
297
|
.time-input {
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
}
|
|
381
|
-
|
|
298
|
+
width: 3.5rem;
|
|
299
|
+
border: 1px solid var(--ty-input-border);
|
|
300
|
+
border-radius: var(--ty-radius-sm);
|
|
301
|
+
background: var(--ty-input-bg);
|
|
302
|
+
color: var(--ty-calendar-time-input-color);
|
|
303
|
+
font-family: inherit;
|
|
304
|
+
font-size: var(--ty-font-sm);
|
|
305
|
+
font-variant-numeric: tabular-nums;
|
|
306
|
+
text-align: center;
|
|
307
|
+
padding: 0.25rem 0.375rem;
|
|
308
|
+
outline: none;
|
|
309
|
+
transition: var(--ty-transition-all);
|
|
310
|
+
}
|
|
382
311
|
.time-input:focus {
|
|
383
|
-
|
|
384
|
-
|
|
312
|
+
border-color: var(--ty-input-border-focus);
|
|
313
|
+
box-shadow: 0 0 0 3px var(--ty-input-shadow-focus);
|
|
385
314
|
}
|
|
386
|
-
|
|
387
315
|
.time-input::placeholder {
|
|
388
|
-
|
|
316
|
+
color: var(--ty-calendar-time-placeholder-color);
|
|
389
317
|
}
|
|
390
|
-
|
|
391
318
|
.time-icon {
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
319
|
+
display: flex;
|
|
320
|
+
align-items: center;
|
|
321
|
+
color: var(--ty-calendar-time-icon-color);
|
|
322
|
+
width: 1rem;
|
|
323
|
+
height: 1rem;
|
|
324
|
+
flex-shrink: 0;
|
|
398
325
|
}
|
|
399
326
|
`;
|
|
400
|
-
//# sourceMappingURL=date-picker.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Field Size Ladder
|
|
3
|
+
* One source of truth for how `size` scales every field component.
|
|
4
|
+
* Components consume the --ty-field-* vars; nothing hardcodes a size.
|
|
5
|
+
*/
|
|
6
|
+
export declare const fieldSizeVars = "\n:host {\n --ty-field-height: var(--ty-size-sm, 2rem);\n --ty-field-pad-x: 10px;\n --ty-field-font: var(--ty-font-sm);\n --ty-field-leading: 20px;\n --ty-field-tracking: var(--ty-tracking-sm);\n --ty-field-label-font: var(--ty-font-xs);\n --ty-field-label-leading: var(--ty-leading-xs);\n --ty-field-label-gap: 5px;\n /* Text that sits OUTSIDE the field box (label, error message) has to line up\n with the value INSIDE it. The value is inset by the wrapper's 1px border\n plus --ty-field-pad-x; outside text only ever cleared the padding, so it\n started exactly 1px to the left of the value it labelled \u2014 at every rung,\n on every field. Resolved per rung: the calc reads whichever --ty-field-pad-x\n is winning on the host. */\n --ty-field-outer-pad-x: calc(var(--ty-field-pad-x) + 1px);\n --ty-field-control: 24px;\n --ty-field-icon: 16px;\n}\n\n:host([size=\"xs\"]) {\n --ty-field-height: var(--ty-size-xs, 1.75rem);\n --ty-field-pad-x: 8px;\n --ty-field-font: var(--ty-font-xs);\n --ty-field-leading: 16px;\n --ty-field-tracking: var(--ty-tracking-xs);\n --ty-field-label-font: var(--ty-font-xs);\n --ty-field-label-leading: var(--ty-leading-xs);\n --ty-field-label-gap: 4px;\n --ty-field-control: 20px;\n --ty-field-icon: 14px;\n}\n\n:host([size=\"md\"]) {\n --ty-field-height: var(--ty-size-md, 2.25rem);\n --ty-field-pad-x: 12px;\n --ty-field-font: var(--ty-font-sm);\n --ty-field-leading: 20px;\n --ty-field-tracking: var(--ty-tracking-sm);\n --ty-field-label-font: var(--ty-font-sm);\n --ty-field-label-leading: var(--ty-leading-sm);\n --ty-field-label-gap: 6px;\n --ty-field-control: 28px;\n --ty-field-icon: 18px;\n}\n\n:host([size=\"lg\"]) {\n --ty-field-height: var(--ty-size-lg, 2.5rem);\n --ty-field-pad-x: 14px;\n --ty-field-font: var(--ty-font-base);\n --ty-field-leading: 24px;\n --ty-field-tracking: var(--ty-tracking-base);\n --ty-field-label-font: var(--ty-font-sm);\n --ty-field-label-leading: var(--ty-leading-sm);\n --ty-field-label-gap: 6px;\n --ty-field-control: 32px;\n --ty-field-icon: 20px;\n}\n\n:host([size=\"xl\"]) {\n --ty-field-height: var(--ty-size-xl, 2.75rem);\n --ty-field-pad-x: 16px;\n --ty-field-font: var(--ty-font-lg);\n --ty-field-leading: 28px;\n --ty-field-tracking: var(--ty-tracking-base);\n --ty-field-label-font: var(--ty-font-base);\n --ty-field-label-leading: var(--ty-leading-base);\n --ty-field-label-gap: 8px;\n --ty-field-control: 36px;\n --ty-field-icon: 22px;\n}\n\n/* Narrow viewports drop the two biggest rungs one step \u2014 same ladder, no\n component-specific overrides.\n\n A stepped-down rung must carry the WHOLE rung: --ty-field-control is the\n in-field button box (ty-copy's copy button, the date-picker's icon), and it\n sets the wrapper's content height. Leave it at the original rung and the\n field ends up taller than --ty-field-height \u2014 the ladder silently breaks on\n exactly one component. */\n@media (max-width: 640px) {\n :host([size=\"lg\"]) {\n --ty-field-height: var(--ty-size-md, 2.25rem);\n --ty-field-pad-x: 12px;\n --ty-field-font: var(--ty-font-sm);\n --ty-field-leading: 20px;\n --ty-field-control: 28px;\n --ty-field-icon: 18px;\n }\n\n :host([size=\"xl\"]) {\n --ty-field-height: var(--ty-size-lg, 2.5rem);\n --ty-field-pad-x: 14px;\n --ty-field-font: var(--ty-font-base);\n --ty-field-leading: 24px;\n --ty-field-control: 32px;\n --ty-field-icon: 20px;\n }\n}\n\n@media (max-width: 480px) {\n :host([size=\"xl\"]) {\n --ty-field-height: var(--ty-size-md, 2.25rem);\n --ty-field-pad-x: 12px;\n --ty-field-font: var(--ty-font-sm);\n --ty-field-leading: 20px;\n --ty-field-control: 28px;\n --ty-field-icon: 18px;\n }\n}\n";
|