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
package/lib/styles/input.js
CHANGED
|
@@ -1,359 +1,194 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Input Component Styles
|
|
3
|
-
* PORTED FROM: clj/ty/components/input.css
|
|
4
|
-
* Phase A: Regular input styles only (no checkbox, no numeric formatting)
|
|
5
|
-
*/
|
|
6
1
|
import { FLAVORS } from "../types/common.js";
|
|
7
|
-
|
|
8
|
-
(hover/focus border), and --input-ring (focus shadow); the wrapper base
|
|
9
|
-
rules consume them. They double as the per-instance override API:
|
|
10
|
-
`ty-input { --input-accent: … }`. Neutral is skipped — it IS the default
|
|
11
|
-
chrome (--ty-input-* tokens), and input's auto-danger-on-error logic
|
|
12
|
-
relies on neutral being the unstyled state.
|
|
13
|
-
|
|
14
|
-
Fallback flavor `fb` is used for custom flavors: suffixed tokens fall
|
|
15
|
-
back to the custom base color first (a flavor defining only
|
|
16
|
-
--ty-color-X still gets sensible hover/focus), then to neutral.
|
|
17
|
-
|
|
18
|
-
Emphasis ladder mirrors the neutral chrome (faint rest → soft hover →
|
|
19
|
-
focus + ring): a flavored field rests on its -soft shade and only
|
|
20
|
-
escalates to the full color on hover/focus — a resting field shouldn't
|
|
21
|
-
shout its full-saturation border (tones shift the whole ladder). */
|
|
2
|
+
import { fieldSizeVars } from "./field-size.js";
|
|
22
3
|
const inputFlavor = (f, fb) => {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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 `
|
|
31
12
|
:host([flavor="${f}"]) {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
13
|
+
--input-accent: var(--ty-input-${f}-border, ${c("-soft")});
|
|
14
|
+
--input-accent-bold: ${c("")};
|
|
15
|
+
--input-ring: color-mix(in oklab, ${c("")} 15%, transparent);
|
|
35
16
|
}
|
|
36
17
|
:host([flavor="${f}+"]) {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
18
|
+
--input-accent: ${c("")};
|
|
19
|
+
--input-accent-bold: ${c("-strong")};
|
|
20
|
+
--input-ring: color-mix(in oklab, ${c("-strong")} 15%, transparent);
|
|
40
21
|
}
|
|
41
22
|
:host([flavor="${f}-"]) {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
23
|
+
--input-accent: ${c("-faint")};
|
|
24
|
+
--input-accent-bold: ${c("-soft")};
|
|
25
|
+
--input-ring: color-mix(in oklab, ${c("-soft")} 15%, transparent);
|
|
45
26
|
}
|
|
46
27
|
`;
|
|
47
28
|
};
|
|
48
|
-
/** Rules for one custom (non-built-in) flavor — see utils/flavor-sheet.ts. */
|
|
49
29
|
export const inputCustomFlavorCss = (base) => inputFlavor(base, "neutral");
|
|
50
30
|
export const inputStyles = `
|
|
31
|
+
${fieldSizeVars}
|
|
51
32
|
:host {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
33
|
+
display: block;
|
|
34
|
+
font-family: inherit;
|
|
35
|
+
width: 100%;
|
|
55
36
|
}
|
|
56
|
-
|
|
57
|
-
:host([size="sm"]) {
|
|
58
|
-
font-size: 14px;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
:host([size="lg"]) {
|
|
62
|
-
font-size: 18px;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
37
|
.input-container {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
38
|
+
display: flex;
|
|
39
|
+
flex-direction: column;
|
|
40
|
+
width: 100%;
|
|
41
|
+
box-sizing: border-box;
|
|
70
42
|
}
|
|
71
|
-
|
|
72
|
-
/* ===== LABEL STYLING ===== */
|
|
73
|
-
|
|
74
43
|
.ty-field-label {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
44
|
+
font-size: var(--ty-field-label-font);
|
|
45
|
+
line-height: var(--ty-field-label-leading);
|
|
46
|
+
letter-spacing: var(--ty-tracking-sm);
|
|
47
|
+
font-weight: var(--ty-font-medium);
|
|
48
|
+
color: var(--ty-label-color);
|
|
49
|
+
margin-bottom: var(--ty-field-label-gap);
|
|
50
|
+
padding-left: var(--ty-field-outer-pad-x);
|
|
51
|
+
display: flex;
|
|
52
|
+
align-items: center;
|
|
84
53
|
}
|
|
85
|
-
|
|
86
|
-
/* Required indicator - using SVG icon */
|
|
87
54
|
.required-icon {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
55
|
+
display: inline-flex;
|
|
56
|
+
align-items: center;
|
|
57
|
+
color: var(--ty-color-danger);
|
|
58
|
+
width: 12px;
|
|
59
|
+
height: 12px;
|
|
60
|
+
margin-left: 4px;
|
|
61
|
+
vertical-align: middle;
|
|
95
62
|
}
|
|
96
|
-
|
|
97
63
|
.required-icon svg {
|
|
98
|
-
|
|
99
|
-
|
|
64
|
+
width: 100%;
|
|
65
|
+
height: 100%;
|
|
100
66
|
}
|
|
101
|
-
|
|
102
|
-
/* ===== INPUT WRAPPER WITH SLOTS ===== */
|
|
103
|
-
|
|
104
67
|
.input-wrapper {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
min-height: var(--ty-size-md);
|
|
117
|
-
padding: 0 12px;
|
|
68
|
+
display: flex;
|
|
69
|
+
align-items: center;
|
|
70
|
+
gap: 0.5rem;
|
|
71
|
+
width: 100%;
|
|
72
|
+
box-sizing: border-box;
|
|
73
|
+
border: 1px solid var(--input-accent, var(--input-border, var(--ty-input-border)));
|
|
74
|
+
border-radius: var(--ty-radius-base);
|
|
75
|
+
background: var(--input-bg, var(--input-bg, var(--ty-input-bg)));
|
|
76
|
+
transition: var(--ty-local-transition, all 0.15s ease-in-out);
|
|
77
|
+
min-height: var(--ty-field-height);
|
|
78
|
+
padding: 0 var(--ty-field-pad-x);
|
|
118
79
|
}
|
|
119
|
-
|
|
120
|
-
/* Wrapper states — --input-accent* are set by the flavor rules below;
|
|
121
|
-
without a flavor attribute they're unset and the default chrome chain
|
|
122
|
-
(per-instance --input-* var, then --ty-input-* token) applies. */
|
|
123
|
-
/* :not(.focused) — hover must never override focus. Without the guard this
|
|
124
|
-
rule out-ranks .focused by specificity, so hovering a FOCUSED unflavored
|
|
125
|
-
input swapped its primary focus border for the dimmer neutral hover
|
|
126
|
-
border (focus ring stayed, border dimmed — read as a glitch). Same
|
|
127
|
-
pattern as date-picker's :hover:not(.open). */
|
|
128
80
|
.input-wrapper:hover:not(.disabled):not(.focused) {
|
|
129
|
-
|
|
81
|
+
border-color: var(--input-accent-bold, var(--input-border-hover, var(--ty-input-border-hover)));
|
|
130
82
|
}
|
|
131
|
-
|
|
132
83
|
.input-wrapper.focused {
|
|
133
|
-
|
|
134
|
-
|
|
84
|
+
border-color: var(--input-accent-bold, var(--input-border-focus, var(--ty-input-border-focus)));
|
|
85
|
+
box-shadow: 0 0 0 3px var(--input-ring, var(--input-shadow-focus, var(--ty-input-shadow-focus)));
|
|
135
86
|
}
|
|
136
|
-
|
|
137
87
|
.input-wrapper.disabled {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
88
|
+
cursor: not-allowed;
|
|
89
|
+
opacity: 0.5;
|
|
90
|
+
background: var(--input-disabled-bg, var(--ty-input-disabled-bg));
|
|
91
|
+
border-color: var(--input-disabled-border, var(--ty-input-disabled-border));
|
|
142
92
|
}
|
|
143
|
-
|
|
144
|
-
/* ===== SLOT STYLING ===== */
|
|
145
|
-
|
|
146
|
-
/* Style slotted content directly (no wrappers needed) */
|
|
147
93
|
::slotted([slot="start"]),
|
|
148
94
|
::slotted([slot="end"]) {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
95
|
+
display: flex;
|
|
96
|
+
align-items: center;
|
|
97
|
+
justify-content: center;
|
|
98
|
+
flex-shrink: 0;
|
|
99
|
+
color: var(--ty-color-text-soft);
|
|
154
100
|
}
|
|
155
|
-
|
|
156
|
-
/* Password reveal toggle (rendered for type="password") */
|
|
157
101
|
.password-toggle {
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
102
|
+
display: flex;
|
|
103
|
+
align-items: center;
|
|
104
|
+
justify-content: center;
|
|
105
|
+
flex-shrink: 0;
|
|
106
|
+
width: 1.25rem;
|
|
107
|
+
height: 1.25rem;
|
|
108
|
+
padding: 0;
|
|
109
|
+
border: none;
|
|
110
|
+
background: none;
|
|
111
|
+
cursor: pointer;
|
|
112
|
+
color: var(--input-placeholder, var(--ty-input-placeholder));
|
|
113
|
+
transition: var(--ty-local-transition, color 0.15s ease-in-out);
|
|
170
114
|
}
|
|
171
115
|
.password-toggle:hover {
|
|
172
|
-
|
|
116
|
+
color: var(--input-color, var(--ty-input-color));
|
|
173
117
|
}
|
|
174
118
|
.password-toggle:focus-visible {
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
119
|
+
outline: 2px solid var(--input-accent, var(--ty-color-primary));
|
|
120
|
+
outline-offset: 2px;
|
|
121
|
+
border-radius: 2px;
|
|
178
122
|
}
|
|
179
123
|
.password-toggle svg {
|
|
180
|
-
|
|
181
|
-
|
|
124
|
+
width: 1rem;
|
|
125
|
+
height: 1rem;
|
|
182
126
|
}
|
|
183
|
-
|
|
184
|
-
/* Icon sizing for slotted icons */
|
|
185
127
|
::slotted(ty-icon) {
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
128
|
+
width: 1em;
|
|
129
|
+
height: 1em;
|
|
130
|
+
flex-shrink: 0;
|
|
189
131
|
}
|
|
190
|
-
|
|
191
|
-
/* ===== ERROR MESSAGE STYLING ===== */
|
|
192
|
-
|
|
193
132
|
.error-message {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
133
|
+
font-size: var(--ty-font-xs);
|
|
134
|
+
line-height: var(--ty-leading-xs);
|
|
135
|
+
letter-spacing: var(--ty-tracking-xs);
|
|
136
|
+
color: var(--ty-color-danger);
|
|
137
|
+
margin-top: 4px;
|
|
138
|
+
padding-left: var(--ty-field-outer-pad-x);
|
|
200
139
|
}
|
|
201
|
-
|
|
202
|
-
/* Error state for wrapper */
|
|
203
140
|
.input-wrapper.error {
|
|
204
|
-
|
|
205
|
-
|
|
141
|
+
border-color: var(--ty-color-danger);
|
|
142
|
+
background: var(--ty-bg-danger-soft);
|
|
206
143
|
}
|
|
207
|
-
|
|
208
144
|
.input-wrapper.error.focused {
|
|
209
|
-
|
|
210
|
-
|
|
145
|
+
border-color: var(--ty-color-danger-bold);
|
|
146
|
+
box-shadow: 0 0 0 3px var(--input-shadow-focus, var(--ty-input-shadow-focus));
|
|
211
147
|
}
|
|
212
|
-
|
|
213
|
-
/* ===== INPUT BASE STYLING ===== */
|
|
214
|
-
|
|
215
148
|
input {
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
margin: 0;
|
|
149
|
+
flex: 1;
|
|
150
|
+
min-width: 0;
|
|
151
|
+
box-sizing: border-box;
|
|
152
|
+
border: none;
|
|
153
|
+
outline: none;
|
|
154
|
+
background: transparent;
|
|
155
|
+
color: var(--input-color, var(--ty-input-color));
|
|
156
|
+
font-family: inherit;
|
|
157
|
+
font-size: var(--ty-field-font);
|
|
158
|
+
line-height: var(--ty-field-leading);
|
|
159
|
+
letter-spacing: var(--ty-field-tracking);
|
|
160
|
+
font-weight: var(--ty-font-normal);
|
|
161
|
+
padding: 0;
|
|
162
|
+
margin: 0;
|
|
231
163
|
}
|
|
232
|
-
|
|
233
|
-
/* Remove number input spinner arrows */
|
|
234
164
|
input[type="number"]::-webkit-outer-spin-button,
|
|
235
165
|
input[type="number"]::-webkit-inner-spin-button {
|
|
236
|
-
|
|
237
|
-
|
|
166
|
+
-webkit-appearance: none;
|
|
167
|
+
margin: 0;
|
|
238
168
|
}
|
|
239
|
-
|
|
240
169
|
input[type="number"] {
|
|
241
|
-
|
|
170
|
+
-moz-appearance: textfield;
|
|
242
171
|
}
|
|
243
|
-
|
|
244
|
-
/* Disabled state */
|
|
245
172
|
input:disabled {
|
|
246
|
-
|
|
247
|
-
|
|
173
|
+
cursor: not-allowed;
|
|
174
|
+
color: var(--input-disabled-color, var(--ty-input-disabled-color));
|
|
248
175
|
}
|
|
249
|
-
|
|
250
|
-
/* Placeholder styling */
|
|
251
176
|
input::placeholder {
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
/* ===== SIZE MODIFIERS ===== */
|
|
257
|
-
|
|
258
|
-
/* Small */
|
|
259
|
-
.input-wrapper.sm {
|
|
260
|
-
min-height: var(--ty-size-sm);
|
|
261
|
-
padding: 0 10px;
|
|
262
|
-
border-radius: var(--ty-input-radius-sm, var(--ty-radius-base));
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
.input-wrapper.sm input {
|
|
266
|
-
font-size: var(--ty-font-sm);
|
|
267
|
-
line-height: var(--ty-leading-sm);
|
|
268
|
-
letter-spacing: var(--ty-tracking-sm);
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
/* Medium (default) */
|
|
272
|
-
.input-wrapper.md {
|
|
273
|
-
min-height: var(--ty-size-md);
|
|
274
|
-
padding: 0 12px;
|
|
275
|
-
border-radius: var(--ty-input-radius-md, var(--ty-radius-base));
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
.input-wrapper.md input {
|
|
279
|
-
font-size: var(--ty-font-sm);
|
|
280
|
-
line-height: var(--ty-leading-sm);
|
|
281
|
-
letter-spacing: var(--ty-tracking-sm);
|
|
177
|
+
color: var(--input-placeholder, var(--ty-input-placeholder));
|
|
178
|
+
font-weight: 400;
|
|
282
179
|
}
|
|
283
|
-
|
|
284
|
-
/* Large */
|
|
285
|
-
.input-wrapper.lg {
|
|
286
|
-
min-height: var(--ty-size-lg);
|
|
287
|
-
padding: 0 14px;
|
|
288
|
-
border-radius: var(--ty-input-radius-lg, var(--ty-radius-base));
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
.input-wrapper.lg input {
|
|
292
|
-
font-size: var(--ty-font-base);
|
|
293
|
-
line-height: var(--ty-leading-base);
|
|
294
|
-
letter-spacing: var(--ty-tracking-base);
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
/* ===== SEMANTIC FLAVOR MODIFIERS (set --input-accent*, consumed above) ===== */
|
|
298
180
|
${FLAVORS.filter((f) => f !== "neutral").map((f) => inputFlavor(f)).join("")}
|
|
299
|
-
|
|
300
|
-
/* ===== ACCESSIBILITY ENHANCEMENTS ===== */
|
|
301
|
-
|
|
302
181
|
input:focus-visible {
|
|
303
|
-
|
|
182
|
+
outline: none;
|
|
304
183
|
}
|
|
305
|
-
|
|
306
|
-
/* High contrast mode support */
|
|
307
184
|
@media (prefers-contrast: high) {
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
}
|
|
185
|
+
.input-wrapper {
|
|
186
|
+
border-width: 2px;
|
|
311
187
|
}
|
|
312
|
-
|
|
313
|
-
/* Reduced motion support */
|
|
314
|
-
@media (prefers-reduced-motion: reduce) {
|
|
315
|
-
.input-wrapper {
|
|
316
|
-
transition: none;
|
|
317
|
-
}
|
|
318
188
|
}
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
@media (max-width: 640px) {
|
|
323
|
-
.input-wrapper.lg {
|
|
324
|
-
min-height: 40px;
|
|
325
|
-
padding: 0 12px;
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
.input-wrapper.lg input {
|
|
329
|
-
font-size: var(--ty-font-sm);
|
|
330
|
-
line-height: var(--ty-leading-sm);
|
|
331
|
-
letter-spacing: var(--ty-tracking-sm);
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
.input-wrapper.xl {
|
|
335
|
-
min-height: 44px;
|
|
336
|
-
padding: 0 14px;
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
.input-wrapper.xl input {
|
|
340
|
-
font-size: var(--ty-font-base);
|
|
341
|
-
line-height: var(--ty-leading-base);
|
|
342
|
-
letter-spacing: var(--ty-tracking-base);
|
|
343
|
-
}
|
|
189
|
+
@media (prefers-reduced-motion: reduce) {
|
|
190
|
+
.input-wrapper {
|
|
191
|
+
transition: none;
|
|
344
192
|
}
|
|
345
|
-
|
|
346
|
-
@media (max-width: 480px) {
|
|
347
|
-
.input-wrapper.xl {
|
|
348
|
-
min-height: 40px;
|
|
349
|
-
padding: 0 12px;
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
.input-wrapper.xl input {
|
|
353
|
-
font-size: var(--ty-font-sm);
|
|
354
|
-
line-height: var(--ty-leading-sm);
|
|
355
|
-
letter-spacing: var(--ty-tracking-sm);
|
|
356
|
-
}
|
|
357
193
|
}
|
|
358
194
|
`;
|
|
359
|
-
//# sourceMappingURL=input.js.map
|
package/lib/styles/modal.d.ts
CHANGED
|
@@ -4,5 +4,4 @@
|
|
|
4
4
|
* CSS for the modal component wrapper.
|
|
5
5
|
* The modal is a pure wrapper - all content styling is user-defined.
|
|
6
6
|
*/
|
|
7
|
-
export declare const modalStyles = "\n
|
|
8
|
-
//# sourceMappingURL=modal.d.ts.map
|
|
7
|
+
export declare const modalStyles = "\n:host {\n display: contents;\n /* Don't interfere with layout */\n}\n\n/* Part of the modal wrapper functionality, not user content styling */\n.close-button {\n position: absolute;\n top: -8px;\n right: -8px;\n background: transparent;\n border: none;\n cursor: pointer;\n padding: 4px;\n border-radius: 4px;\n transition: var(--ty-transition-colors);\n z-index: 1;\n color: #d8d8d8;\n\n /* Remove all default browser styling that could cause outlines/borders */\n outline: none;\n box-shadow: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n\n /* Remove mobile tap highlights and focus rings */\n -webkit-tap-highlight-color: transparent;\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.close-button:hover {\n color: white;\n}\n\n/* Explicitly remove focus and active states for all interaction modes */\n.close-button:focus,\n.close-button:focus-visible,\n.close-button:focus-within,\n.close-button:active {\n outline: none !important;\n box-shadow: none !important;\n border: none !important;\n background: transparent !important;\n}\n\n/* Override hover color even in focus/active states */\n.close-button:hover,\n.close-button:focus:hover,\n.close-button:active:hover {\n color: white;\n}\n\n.close-button.hide {\n visibility: hidden;\n}\n\n/* Pure wrapper: only essential modal functionality, no styling of user content */\n.ty-modal-dialog {\n /* Reset default dialog styles */\n padding: 18px;\n border: none;\n margin: 0;\n background: transparent;\n\n /* Centered */\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n\n z-index: 1000;\n overflow: hidden;\n\n /* No sizing - let user content determine size */\n max-width: 85vw;\n max-height: 90vh;\n\n outline: none;\n}\n\n/* Panel zoom-in synced with the backdrop fade (shadcn-style zoom-in-95).\n Enter-only: animating exit on a native <dialog> means delaying close(). */\n.ty-modal-dialog[open] {\n animation: ty-modal-enter var(--ty-modal-duration, 200ms) ease-out;\n}\n\n@keyframes ty-modal-enter {\n from {\n opacity: 0;\n transform: translate(-50%, -50%) scale(0.93);\n }\n\n to {\n opacity: 1;\n transform: translate(-50%, -50%) scale(1);\n }\n}\n\n/* Backdrop is part of modal functionality, not user content */\n.ty-modal-dialog::backdrop {\n background: var(--ty-modal-backdrop, rgba(0, 0, 0, 0.5));\n backdrop-filter: var(--ty-modal-backdrop-blur, blur(2px));\n animation: ty-modal-backdrop-enter var(--ty-modal-duration, 200ms) ease-out;\n}\n\n/* When backdrop is disabled */\n.ty-modal-dialog:not([data-backdrop])::backdrop {\n background: transparent;\n backdrop-filter: none;\n}\n\n/* Minimal container - no styling imposed on user content */\n.modal-content {\n color: var(--ty-text);\n}\n\n@keyframes ty-modal-backdrop-enter {\n from {\n opacity: 0;\n }\n\n to {\n opacity: 1;\n }\n}\n";
|