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