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/textarea.js
CHANGED
|
@@ -1,341 +1,275 @@
|
|
|
1
|
+
import { fieldSizeVars } from './field-size.js';
|
|
1
2
|
export const textareaStyles = `
|
|
3
|
+
${fieldSizeVars}
|
|
2
4
|
:host {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
display: block;
|
|
6
|
+
font-family: inherit;
|
|
7
|
+
width: 100%;
|
|
6
8
|
}
|
|
7
|
-
|
|
8
9
|
.textarea-container {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/* Bordered container — owns the border + active state (composer layout):
|
|
18
|
-
header (top slot) · textarea (borderless) · footer (bottom slot). */
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
width: 100%;
|
|
13
|
+
box-sizing: border-box;
|
|
14
|
+
position: relative;
|
|
15
|
+
}
|
|
19
16
|
.textarea-wrapper {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/* Active ring tied to the TEXTAREA specifically (not :focus-within) so tabbing
|
|
32
|
-
to a footer button doesn't make the whole field look focused. */
|
|
17
|
+
position: relative;
|
|
18
|
+
width: 100%;
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
box-sizing: border-box;
|
|
22
|
+
border: 1px solid var(--input-border, var(--ty-input-border));
|
|
23
|
+
border-radius: var(--ty-radius-base);
|
|
24
|
+
background: var(--input-bg, var(--ty-input-bg));
|
|
25
|
+
transition: var(--ty-local-transition, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out);
|
|
26
|
+
}
|
|
33
27
|
.textarea-wrapper:has(textarea:focus) {
|
|
34
|
-
|
|
35
|
-
|
|
28
|
+
border-color: var(--input-border-focus, var(--ty-input-border-focus));
|
|
29
|
+
box-shadow: 0 0 0 3px var(--input-shadow-focus, var(--ty-input-shadow-focus));
|
|
36
30
|
}
|
|
37
|
-
|
|
38
|
-
/* Error + disabled reflected from the inner textarea (both in shadow DOM, so
|
|
39
|
-
:has is reliable here — unlike slotted content). */
|
|
40
31
|
.textarea-wrapper:has(textarea.error) {
|
|
41
|
-
|
|
42
|
-
|
|
32
|
+
border-color: var(--ty-color-danger);
|
|
33
|
+
background: var(--ty-bg-danger-soft);
|
|
43
34
|
}
|
|
44
35
|
.textarea-wrapper:has(textarea.error):has(textarea:focus) {
|
|
45
|
-
|
|
36
|
+
border-color: var(--ty-color-danger-bold);
|
|
46
37
|
}
|
|
47
38
|
.textarea-wrapper:has(textarea:disabled) {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
39
|
+
opacity: 0.5;
|
|
40
|
+
background: var(--input-disabled-bg, var(--ty-input-disabled-bg));
|
|
41
|
+
border-color: var(--input-disabled-border, var(--ty-input-disabled-border));
|
|
51
42
|
}
|
|
52
|
-
|
|
53
|
-
/* Scroll region wraps just the textarea so the custom scrollbar never overlaps
|
|
54
|
-
the header/footer. */
|
|
55
43
|
.textarea-scroll {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
44
|
+
position: relative;
|
|
45
|
+
flex: 1 1 auto;
|
|
46
|
+
min-height: 0;
|
|
47
|
+
display: flex;
|
|
60
48
|
}
|
|
61
|
-
|
|
62
|
-
/* Custom scrollbar track positioned to the scroll region (textarea edges) */
|
|
63
49
|
.textarea-scroll .ty-scrollbar-track-y {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
/* Header / footer slot regions — zero footprint until they have content
|
|
71
|
-
(the component toggles .has-content via slotchange). footer defaults to
|
|
72
|
-
space-between so "tools … submit" works; a single wide button fills it. */
|
|
50
|
+
top: 2px;
|
|
51
|
+
right: 2px;
|
|
52
|
+
bottom: 2px;
|
|
53
|
+
border-radius: 0 4px 4px 0;
|
|
54
|
+
}
|
|
73
55
|
.textarea-header,
|
|
74
56
|
.textarea-footer {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
57
|
+
display: flex;
|
|
58
|
+
align-items: center;
|
|
59
|
+
gap: 0.5rem;
|
|
78
60
|
}
|
|
79
61
|
.textarea-footer { justify-content: space-between; }
|
|
80
62
|
.textarea-header.has-content {
|
|
81
|
-
|
|
82
|
-
|
|
63
|
+
padding: 6px 10px;
|
|
64
|
+
border-bottom: 1px solid var(--ty-textarea-divider, var(--input-border, var(--ty-input-border)));
|
|
83
65
|
}
|
|
84
66
|
.textarea-footer.has-content {
|
|
85
|
-
|
|
86
|
-
|
|
67
|
+
padding: 6px 10px;
|
|
68
|
+
border-top: 1px solid var(--ty-textarea-divider, var(--input-border, var(--ty-input-border)));
|
|
87
69
|
}
|
|
88
|
-
|
|
89
70
|
.ty-field-label {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
}
|
|
98
|
-
|
|
71
|
+
font-size: var(--ty-field-label-font);
|
|
72
|
+
line-height: var(--ty-field-label-leading);
|
|
73
|
+
letter-spacing: var(--ty-tracking-sm);
|
|
74
|
+
font-weight: var(--ty-font-medium);
|
|
75
|
+
color: var(--ty-label-color);
|
|
76
|
+
margin-bottom: var(--ty-field-label-gap);
|
|
77
|
+
padding-left: var(--ty-field-outer-pad-x);
|
|
78
|
+
}
|
|
99
79
|
.required-icon {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
}
|
|
107
|
-
|
|
80
|
+
display: inline-flex;
|
|
81
|
+
align-items: center;
|
|
82
|
+
color: var(--ty-color-danger);
|
|
83
|
+
width: 12px;
|
|
84
|
+
height: 12px;
|
|
85
|
+
vertical-align: middle;
|
|
86
|
+
}
|
|
108
87
|
.error-message {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
/* Error state is reflected on .textarea-wrapper (see above). */
|
|
118
|
-
|
|
88
|
+
font-size: var(--ty-font-xs);
|
|
89
|
+
line-height: var(--ty-leading-xs);
|
|
90
|
+
letter-spacing: var(--ty-tracking-xs);
|
|
91
|
+
color: var(--ty-color-danger);
|
|
92
|
+
margin-top: 4px;
|
|
93
|
+
padding-left: var(--ty-field-outer-pad-x);
|
|
94
|
+
}
|
|
119
95
|
textarea {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
/* Hide scrollbars since we're auto-resizing */
|
|
141
|
-
resize: none;
|
|
142
|
-
|
|
143
|
-
white-space: pre-wrap;
|
|
144
|
-
word-wrap: break-word;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
/* Hide native scrollbar for webkit when custom scrollbar is active
|
|
148
|
-
(scrollbar-width: none handles Firefox; this handles Chrome/Safari) */
|
|
96
|
+
font-family: inherit;
|
|
97
|
+
box-sizing: border-box;
|
|
98
|
+
width: 100%;
|
|
99
|
+
flex: 1 1 auto;
|
|
100
|
+
border: none;
|
|
101
|
+
background: transparent;
|
|
102
|
+
color: var(--input-color, var(--ty-input-color));
|
|
103
|
+
font-family: inherit;
|
|
104
|
+
font-size: var(--ty-font-sm);
|
|
105
|
+
line-height: var(--ty-leading-sm);
|
|
106
|
+
letter-spacing: var(--ty-tracking-sm);
|
|
107
|
+
font-weight: var(--ty-font-normal);
|
|
108
|
+
outline: none;
|
|
109
|
+
min-height: 80px;
|
|
110
|
+
padding: 12px 12px;
|
|
111
|
+
overflow: hidden;
|
|
112
|
+
resize: none;
|
|
113
|
+
white-space: pre-wrap;
|
|
114
|
+
word-wrap: break-word;
|
|
115
|
+
}
|
|
149
116
|
:host([data-custom-scroll]) textarea::-webkit-scrollbar {
|
|
150
|
-
|
|
117
|
+
display: none;
|
|
151
118
|
}
|
|
152
|
-
|
|
153
|
-
/* Disabled — visual state lives on the wrapper; just the cursor/text here. */
|
|
154
119
|
textarea:disabled {
|
|
155
|
-
|
|
156
|
-
|
|
120
|
+
cursor: not-allowed;
|
|
121
|
+
color: var(--input-disabled-color, var(--ty-input-disabled-color));
|
|
157
122
|
}
|
|
158
|
-
|
|
159
123
|
textarea::placeholder {
|
|
160
|
-
|
|
161
|
-
|
|
124
|
+
color: var(--input-placeholder, var(--ty-input-placeholder));
|
|
125
|
+
font-weight: 400;
|
|
162
126
|
}
|
|
163
|
-
|
|
164
127
|
textarea.resize-both {
|
|
165
|
-
|
|
128
|
+
resize: both;
|
|
166
129
|
}
|
|
167
|
-
|
|
168
130
|
textarea.resize-horizontal {
|
|
169
|
-
|
|
131
|
+
resize: horizontal;
|
|
170
132
|
}
|
|
171
|
-
|
|
172
133
|
textarea.resize-vertical {
|
|
173
|
-
|
|
134
|
+
resize: vertical;
|
|
174
135
|
}
|
|
175
|
-
|
|
176
136
|
textarea.resize-none {
|
|
177
|
-
|
|
137
|
+
resize: none;
|
|
178
138
|
}
|
|
179
|
-
|
|
180
|
-
/* Auto-resize mode (default) disables manual resize */
|
|
181
139
|
textarea:not(.resize-both):not(.resize-horizontal):not(.resize-vertical) {
|
|
182
|
-
|
|
140
|
+
resize: none;
|
|
183
141
|
}
|
|
184
|
-
|
|
185
142
|
.textarea-dummy {
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
overflow-wrap: break-word !important;
|
|
200
|
-
}
|
|
201
|
-
|
|
143
|
+
position: absolute !important;
|
|
144
|
+
top: 0 !important;
|
|
145
|
+
left: 0 !important;
|
|
146
|
+
visibility: hidden !important;
|
|
147
|
+
white-space: pre-wrap !important;
|
|
148
|
+
word-break: break-word !important;
|
|
149
|
+
box-sizing: border-box !important;
|
|
150
|
+
overflow: hidden !important;
|
|
151
|
+
pointer-events: none !important;
|
|
152
|
+
z-index: -1 !important;
|
|
153
|
+
word-wrap: break-word !important;
|
|
154
|
+
overflow-wrap: break-word !important;
|
|
155
|
+
}
|
|
202
156
|
textarea.xs {
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
157
|
+
min-height: 64px;
|
|
158
|
+
padding: 8px var(--ty-field-pad-x);
|
|
159
|
+
font-size: var(--ty-font-xs);
|
|
160
|
+
line-height: var(--ty-leading-xs);
|
|
161
|
+
letter-spacing: var(--ty-tracking-xs);
|
|
208
162
|
}
|
|
209
|
-
|
|
210
163
|
textarea.sm {
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
164
|
+
min-height: 72px;
|
|
165
|
+
padding: 10px var(--ty-field-pad-x);
|
|
166
|
+
font-size: var(--ty-font-sm);
|
|
167
|
+
line-height: var(--ty-leading-sm);
|
|
168
|
+
letter-spacing: var(--ty-tracking-sm);
|
|
216
169
|
}
|
|
217
|
-
|
|
218
170
|
textarea.md {
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
171
|
+
min-height: 80px;
|
|
172
|
+
padding: 12px var(--ty-field-pad-x);
|
|
173
|
+
font-size: var(--ty-font-sm);
|
|
174
|
+
line-height: var(--ty-leading-sm);
|
|
175
|
+
letter-spacing: var(--ty-tracking-sm);
|
|
224
176
|
}
|
|
225
|
-
|
|
226
177
|
textarea.lg {
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
178
|
+
min-height: 96px;
|
|
179
|
+
padding: 14px var(--ty-field-pad-x);
|
|
180
|
+
font-size: var(--ty-font-base);
|
|
181
|
+
line-height: var(--ty-leading-base);
|
|
182
|
+
letter-spacing: var(--ty-tracking-base);
|
|
232
183
|
}
|
|
233
|
-
|
|
234
184
|
textarea.xl {
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
185
|
+
min-height: 112px;
|
|
186
|
+
padding: 16px var(--ty-field-pad-x);
|
|
187
|
+
font-size: var(--ty-font-lg);
|
|
188
|
+
line-height: var(--ty-leading-lg);
|
|
189
|
+
letter-spacing: var(--ty-tracking-lg);
|
|
240
190
|
}
|
|
241
|
-
|
|
242
191
|
textarea:focus-visible {
|
|
243
|
-
|
|
244
|
-
/* We use box-shadow instead */
|
|
192
|
+
outline: none;
|
|
245
193
|
}
|
|
246
|
-
|
|
247
194
|
@media (prefers-contrast: high) {
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
195
|
+
textarea {
|
|
196
|
+
border-width: 2px;
|
|
197
|
+
}
|
|
251
198
|
}
|
|
252
|
-
|
|
253
199
|
@media (prefers-reduced-motion: reduce) {
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
}
|
|
262
|
-
|
|
200
|
+
textarea {
|
|
201
|
+
transition: none;
|
|
202
|
+
}
|
|
203
|
+
.textarea-dummy {
|
|
204
|
+
transition: none;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
263
207
|
@container (max-width: 480px) {
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
}
|
|
280
|
-
|
|
208
|
+
textarea.lg {
|
|
209
|
+
font-size: var(--ty-font-sm);
|
|
210
|
+
line-height: var(--ty-leading-sm);
|
|
211
|
+
letter-spacing: var(--ty-tracking-sm);
|
|
212
|
+
padding: 12px var(--ty-field-pad-x);
|
|
213
|
+
min-height: 80px;
|
|
214
|
+
}
|
|
215
|
+
textarea.xl {
|
|
216
|
+
font-size: var(--ty-font-base);
|
|
217
|
+
line-height: var(--ty-leading-base);
|
|
218
|
+
letter-spacing: var(--ty-tracking-base);
|
|
219
|
+
padding: 14px var(--ty-field-pad-x);
|
|
220
|
+
min-height: 96px;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
281
223
|
@container (max-width: 320px) {
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
/* Fallback for browsers without container query support */
|
|
224
|
+
textarea.xl {
|
|
225
|
+
font-size: var(--ty-font-sm);
|
|
226
|
+
line-height: var(--ty-leading-sm);
|
|
227
|
+
letter-spacing: var(--ty-tracking-sm);
|
|
228
|
+
padding: 12px var(--ty-field-pad-x);
|
|
229
|
+
min-height: 80px;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
292
232
|
@media (max-width: 640px) {
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
}
|
|
309
|
-
|
|
233
|
+
textarea.lg {
|
|
234
|
+
font-size: var(--ty-font-sm);
|
|
235
|
+
line-height: var(--ty-leading-sm);
|
|
236
|
+
letter-spacing: var(--ty-tracking-sm);
|
|
237
|
+
padding: 12px var(--ty-field-pad-x);
|
|
238
|
+
min-height: 80px;
|
|
239
|
+
}
|
|
240
|
+
textarea.xl {
|
|
241
|
+
font-size: var(--ty-font-base);
|
|
242
|
+
line-height: var(--ty-leading-base);
|
|
243
|
+
letter-spacing: var(--ty-tracking-base);
|
|
244
|
+
padding: 14px var(--ty-field-pad-x);
|
|
245
|
+
min-height: 96px;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
310
248
|
@media (max-width: 480px) {
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
}
|
|
319
|
-
|
|
249
|
+
textarea.xl {
|
|
250
|
+
font-size: var(--ty-font-sm);
|
|
251
|
+
line-height: var(--ty-leading-sm);
|
|
252
|
+
letter-spacing: var(--ty-tracking-sm);
|
|
253
|
+
padding: 12px var(--ty-field-pad-x);
|
|
254
|
+
min-height: 80px;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
320
257
|
textarea {
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
/* Disable height transition on focus to avoid jarring effect */
|
|
258
|
+
transition: var(--ty-local-transition,
|
|
259
|
+
border-color 0.15s ease-in-out,
|
|
260
|
+
box-shadow 0.15s ease-in-out,
|
|
261
|
+
background-color 0.15s ease-in-out,
|
|
262
|
+
height 0.1s ease-out);
|
|
263
|
+
}
|
|
329
264
|
textarea:focus {
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
265
|
+
transition: var(--ty-local-transition,
|
|
266
|
+
border-color 0.15s ease-in-out,
|
|
267
|
+
box-shadow 0.15s ease-in-out,
|
|
268
|
+
background-color 0.15s ease-in-out);
|
|
334
269
|
}
|
|
335
|
-
|
|
336
270
|
@media (prefers-reduced-motion: reduce) {
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
271
|
+
textarea {
|
|
272
|
+
transition: none;
|
|
273
|
+
}
|
|
340
274
|
}
|
|
341
275
|
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textarea.js","sourceRoot":"","sources":["../../src/styles/textarea.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2S7B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../src/styles/tooltip.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,eAAO,MAAM,aAAa,EAAE,YAgI3B,CAAC"}
|
package/lib/styles/tooltip.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tooltip.js","sourceRoot":"","sources":["../../src/styles/tooltip.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,CAAC,MAAM,aAAa,GAAiB;IACzC,EAAE,EAAE,YAAY;IAChB,GAAG,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6HN;CACA,CAAC"}
|
package/lib/styles/wizard.d.ts
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Wizard Component Styles
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* the
|
|
4
|
+
* Inline rail: indicator + label side by side, connectors between steps that
|
|
5
|
+
* fill as steps complete. One accent (active = where you are); completed is
|
|
6
|
+
* solid ink with a check, pending a faint ring, error a danger ring with "!".
|
|
7
|
+
* When the labels don't fit, the rail collapses to "Step N of M" over a
|
|
8
|
+
* segment bar (measured in JS, see updateCompact).
|
|
9
|
+
*
|
|
10
|
+
* CSS Parts (::part): indicators-wrapper, step-circle, progress (segment bar),
|
|
11
|
+
* panels-container.
|
|
8
12
|
*/
|
|
9
|
-
export declare const wizardStyles = "\n/* Theming tokens \u2014 every default chains back to the brand layer / global\n scale tokens. */\n\n:host {\n display: block;\n width: var(--ty-wizard-width, 100%); /* set by width attribute \u2014 not a public token */\n height: var(--ty-wizard-height, 700px); /* set by height attribute \u2014 not a public token */\n box-sizing: border-box;\n\n /* State accents \u2014 the primary override surface. One variable retints the\n * matching circle background, border, and glow. */\n --ty-wizard-active-accent: var(--ty-color-primary);\n --ty-wizard-completed-accent: var(--ty-color-success);\n --ty-wizard-error-accent: var(--ty-color-danger);\n --ty-wizard-pending-accent: var(--ty-color-neutral);\n\n /* Container chrome \u2014 routes through global scales. Override --ty-radius-lg\n * or --ty-shadow-md app-wide and the wizard follows; override these locally\n * to give the wizard a distinct look. */\n --ty-wizard-bg: var(--ty-surface-floating);\n --ty-wizard-border: var(--ty-border);\n --ty-wizard-radius: var(--ty-radius-lg, 12px);\n --ty-wizard-shadow: var(--ty-shadow-md, 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1));\n\n --ty-wizard-header-bg: var(--ty-surface-content);\n --ty-wizard-header-border: var(--ty-border-soft, var(--ty-border));\n --ty-wizard-header-padding: 24px 24px 16px;\n\n --ty-wizard-progress-track: var(--ty-border);\n --ty-wizard-progress-fill: var(--ty-wizard-completed-accent);\n --ty-wizard-progress-height: 2px;\n\n /* Motion \u2014 routes through global motion tokens if defined. */\n --ty-wizard-transition-duration: var(--ty-transition-duration, 300ms);\n --ty-wizard-transition-easing: var(--ty-transition-easing, ease-in-out);\n\n --ty-wizard-circle-size: 32px;\n --ty-wizard-circle-border-width: 2px;\n\n --ty-wizard-panels-bg: var(--ty-surface-elevated);\n\n --ty-wizard-focus-outline: var(--ty-wizard-active-accent);\n}\n\n.wizard-container {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n position: relative;\n box-sizing: border-box;\n border-radius: var(--ty-wizard-radius);\n border: 1px solid var(--ty-wizard-border);\n background: var(--ty-wizard-bg);\n box-shadow: var(--ty-wizard-shadow);\n overflow: hidden;\n}\n\n.step-indicators-wrapper {\n display: flex;\n flex-direction: column;\n flex-shrink: 0;\n position: relative;\n padding: var(--ty-wizard-header-padding);\n border-bottom: 1px solid var(--ty-wizard-header-border);\n background: var(--ty-wizard-header-bg);\n}\n\n/* Progress line, behind the step circles */\n.progress-line {\n position: absolute;\n /*\n * With equal-width indicators (flex: 1), each takes 100%/N of the width.\n * Circle centers sit at 50%/N from the left edge of each indicator.\n * Inset = 50% / step-count from each side keeps the line between circle centres.\n */\n left: calc(50% / var(--ty-wizard-step-count, 4));\n right: calc(50% / var(--ty-wizard-step-count, 4));\n top: calc(var(--ty-wizard-circle-size, 32px) / 2 - 1px);\n height: var(--ty-wizard-progress-height);\n background: var(--ty-wizard-progress-track);\n z-index: 0;\n pointer-events: none;\n transition: opacity var(--ty-wizard-transition-duration) var(--ty-wizard-transition-easing);\n}\n\n.progress-overlay {\n position: absolute;\n left: 0;\n top: 0;\n height: 100%;\n background: var(--ty-wizard-progress-fill);\n transition: width var(--ty-wizard-transition-duration) var(--ty-wizard-transition-easing);\n will-change: width;\n}\n\n.step-indicators {\n display: flex;\n align-items: flex-start;\n position: relative;\n}\n\n.step-indicator {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 8px;\n cursor: pointer;\n background: transparent;\n border: none;\n padding: 0;\n font: inherit;\n transition: opacity 200ms;\n flex: 1;\n min-width: 0;\n}\n\n.step-indicator[aria-disabled=\"true\"] {\n opacity: 0.4;\n cursor: not-allowed;\n pointer-events: none;\n}\n\n.step-indicator:focus-visible {\n outline: 2px solid var(--ty-wizard-focus-outline);\n outline-offset: 4px;\n border-radius: 50%;\n}\n\n.step-circle {\n width: var(--ty-wizard-circle-size);\n height: var(--ty-wizard-circle-size);\n border-radius: 50%;\n border: var(--ty-wizard-circle-border-width) solid;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n z-index: 10;\n transition: var(--ty-local-transition, all var(--ty-wizard-transition-duration) var(--ty-wizard-transition-easing));\n box-sizing: border-box;\n flex-shrink: 0;\n}\n\n.step-circle[data-state=\"completed\"] {\n background: var(--ty-wizard-completed-accent);\n border-color: var(--ty-color-success-strong);\n /* Derived from the accent this circle actually paints, not from\n --ty-solid-success-fg: the two diverge in dark mode (--ty-solid-l\n dims solid fills by 0.25 L), which stranded white text at 3.5:1. */\n color: oklch(\n from var(--ty-wizard-completed-accent)\n clamp(0, (var(--ty-solid-fg-threshold, 0.57) - l) * 1000, 1) 0 0\n );\n box-shadow: 0 0 0 4px color-mix(in oklab, var(--ty-wizard-completed-accent) 12%, transparent);\n}\n\n.step-circle[data-state=\"active\"] {\n background: var(--ty-wizard-active-accent);\n border-color: var(--ty-color-primary-strong);\n color: oklch(\n from var(--ty-wizard-active-accent)\n clamp(0, (var(--ty-solid-fg-threshold, 0.57) - l) * 1000, 1) 0 0\n );\n box-shadow: 0 0 0 4px color-mix(in oklab, var(--ty-wizard-active-accent) 12%, transparent);\n}\n\n.step-circle[data-state=\"pending\"] {\n background: var(--ty-surface-elevated);\n border-color: var(--ty-border);\n color: var(--ty-color-neutral);\n}\n\n.step-circle[data-state=\"error\"] {\n background: var(--ty-wizard-error-accent);\n border-color: var(--ty-color-danger-strong);\n color: oklch(\n from var(--ty-wizard-error-accent)\n clamp(0, (var(--ty-solid-fg-threshold, 0.57) - l) * 1000, 1) 0 0\n );\n box-shadow: 0 0 0 4px color-mix(in oklab, var(--ty-wizard-error-accent) 12%, transparent);\n}\n\n.step-text {\n display: flex;\n flex-direction: column;\n gap: 2px;\n align-items: center;\n}\n\n.step-label {\n font-size: var(--ty-font-sm, 14px);\n font-weight: var(--ty-font-semibold, 600);\n color: var(--ty-color-neutral);\n transition: var(--ty-local-transition, color 200ms);\n}\n\n.step-indicator[aria-selected=\"true\"] .step-label {\n color: var(--ty-color-neutral-strong);\n}\n\n.step-indicator[aria-selected=\"false\"] .step-label {\n color: var(--ty-color-neutral);\n}\n\n.step-description {\n font-size: var(--ty-font-xs, 12px);\n font-weight: var(--ty-font-normal, 400);\n color: var(--ty-color-neutral);\n transition: var(--ty-local-transition, color 200ms);\n text-align: center;\n max-width: 120px;\n}\n\n.step-indicator[aria-selected=\"true\"] .step-description {\n color: var(--ty-color-neutral-bold);\n}\n\n/* Custom indicator content via slots */\n::slotted([slot^=\"indicator-\"]) {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n}\n\n.panels-viewport {\n position: relative;\n flex: 1;\n overflow: hidden;\n min-height: 0;\n background: var(--ty-wizard-panels-bg);\n}\n\n/* Panels wrapper slides horizontally */\n.panels-wrapper {\n display: flex;\n height: 100%;\n transition: transform var(--ty-wizard-transition-duration) var(--ty-wizard-transition-easing);\n will-change: transform;\n}\n\n::slotted(ty-step) {\n width: var(--ty-wizard-width, 100%);\n height: 100%;\n flex-shrink: 0;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .panels-wrapper {\n transition-duration: 0ms !important;\n }\n\n .progress-overlay {\n transition-duration: 0ms !important;\n }\n\n .step-circle {\n transition-duration: 0ms !important;\n }\n\n .progress-line {\n transition-duration: 0ms !important;\n }\n}\n\n.sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n";
|
|
13
|
+
export declare const wizardStyles = "\n:host {\n display: block;\n width: var(--ty-wizard-width, 100%); /* set by width attribute \u2014 not a public token */\n box-sizing: border-box;\n\n /* State accents. Completed is ink, not green: one accent marks where you\n * are, color is kept for \"here\" and for problems. */\n --ty-wizard-active-accent: var(--ty-color-primary);\n --ty-wizard-completed-accent: var(--ty-text-strong, var(--ty-color-neutral-strong));\n --ty-wizard-error-accent: var(--ty-color-danger);\n --ty-wizard-pending-accent: color-mix(in oklab, var(--ty-text, currentColor) 35%, transparent);\n\n /* Container chrome. One surface, hairline divider, no shadow by default:\n * the wizard is a layout primitive, the page decides elevation. */\n --ty-wizard-bg: var(--ty-surface-elevated);\n --ty-wizard-border: var(--ty-border);\n --ty-wizard-radius: var(--ty-radius-lg, 12px);\n --ty-wizard-shadow: none;\n\n --ty-wizard-header-bg: transparent;\n --ty-wizard-header-border: var(--ty-wizard-border);\n --ty-wizard-header-padding: 14px 20px;\n\n --ty-wizard-progress-track: var(--ty-border);\n --ty-wizard-progress-fill: var(--ty-wizard-completed-accent);\n --ty-wizard-progress-height: 1.5px;\n\n /* Panel slide \u2014 same motion as ty-tabs. */\n --ty-wizard-transition-duration: var(--ty-transition-duration, 300ms);\n --ty-wizard-transition-easing: var(--ty-transition-easing, ease-in-out);\n\n --ty-wizard-circle-size: 24px;\n --ty-wizard-circle-border-width: 1.5px;\n\n --ty-wizard-panels-bg: transparent;\n\n --ty-wizard-focus-outline: var(--ty-wizard-active-accent);\n}\n\n.wizard-container {\n display: flex;\n flex-direction: column;\n position: relative;\n box-sizing: border-box;\n border-radius: var(--ty-wizard-radius);\n border: 1px solid var(--ty-wizard-border);\n background: var(--ty-wizard-bg);\n box-shadow: var(--ty-wizard-shadow);\n overflow: hidden;\n}\n\n.step-indicators-wrapper {\n flex-shrink: 0;\n padding: var(--ty-wizard-header-padding);\n border-bottom: 1px solid var(--ty-wizard-header-border);\n background: var(--ty-wizard-header-bg);\n}\n\n/* ---------- Rail ---------- */\n\n.step-indicators {\n display: flex;\n align-items: center;\n gap: 12px;\n}\n\n.step-indicator {\n display: flex;\n align-items: center;\n gap: 8px;\n /* Content basis: labels keep their width, extra space goes to connectors\n (equally). If they don't fit at all, JS switches to the compact header. */\n flex: 1 1 auto;\n min-width: 0;\n cursor: pointer;\n background: transparent;\n border: none;\n padding: 0;\n font: inherit;\n color: inherit;\n text-align: left;\n outline: none;\n}\n\n.step-indicator:last-child {\n flex: 0 0 auto;\n}\n\n/* Connector to the next step \u2014 a pseudo-element, so the tablist owns only tabs. */\n.step-indicator:not(:last-child)::after {\n content: \"\";\n flex: 1 1 auto;\n min-width: 16px;\n height: var(--ty-wizard-progress-height);\n border-radius: 1px;\n margin-left: 4px;\n background: var(--ty-wizard-progress-track);\n transition: background var(--ty-wizard-transition-duration) var(--ty-wizard-transition-easing);\n}\n\n.step-indicator[data-done=\"true\"]:not(:last-child)::after {\n background: var(--ty-wizard-progress-fill);\n}\n\n.step-indicator[aria-disabled=\"true\"] {\n opacity: 0.45;\n cursor: not-allowed;\n pointer-events: none;\n}\n\n.step-indicator:focus-visible .step-circle {\n outline: 2px solid var(--ty-wizard-focus-outline);\n outline-offset: 2px;\n}\n\n.step-circle {\n width: var(--ty-wizard-circle-size);\n height: var(--ty-wizard-circle-size);\n border-radius: 50%;\n border: var(--ty-wizard-circle-border-width) solid;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n flex-shrink: 0;\n font-size: calc(var(--ty-wizard-circle-size) * 0.46);\n font-weight: 600;\n font-variant-numeric: tabular-nums;\n line-height: 1;\n transition: var(--ty-local-transition, background-color var(--ty-wizard-transition-duration) var(--ty-wizard-transition-easing), border-color var(--ty-wizard-transition-duration) var(--ty-wizard-transition-easing), color var(--ty-wizard-transition-duration) var(--ty-wizard-transition-easing));\n}\n\n.step-circle svg {\n width: 58%;\n height: 58%;\n}\n\n.step-circle[data-state=\"completed\"] {\n background: var(--ty-wizard-completed-accent);\n border-color: var(--ty-wizard-completed-accent);\n /* Derived from the accent this circle paints, so any override stays legible. */\n color: oklch(\n from var(--ty-wizard-completed-accent)\n clamp(0, (var(--ty-solid-fg-threshold, 0.57) - l) * 1000, 1) 0 0\n );\n}\n\n.step-circle[data-state=\"active\"] {\n background: color-mix(in oklab, var(--ty-wizard-active-accent) 12%, var(--ty-wizard-bg));\n border-color: var(--ty-wizard-active-accent);\n /* Nudged toward the text color so the number clears 4.5:1 on its tint. */\n color: color-mix(in oklab, var(--ty-wizard-active-accent) 75%, var(--ty-text-strong, currentColor));\n}\n\n.step-circle[data-state=\"pending\"] {\n background: transparent;\n border-color: var(--ty-wizard-pending-accent);\n color: var(--ty-text-soft, var(--ty-color-neutral));\n}\n\n.step-circle[data-state=\"error\"] {\n background: color-mix(in oklab, var(--ty-wizard-error-accent) 12%, var(--ty-wizard-bg));\n border-color: var(--ty-wizard-error-accent);\n color: color-mix(in oklab, var(--ty-wizard-error-accent) 75%, var(--ty-text-strong, currentColor));\n}\n\n.step-text {\n display: flex;\n flex-direction: column;\n gap: 0;\n min-width: 0;\n}\n\n.step-label {\n font-size: var(--ty-font-sm, 14px);\n font-weight: 500;\n line-height: 1.3;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n color: var(--ty-text-soft, var(--ty-color-neutral));\n transition: var(--ty-local-transition, color 200ms);\n}\n\n.step-indicator[data-state=\"completed\"] .step-label,\n.step-indicator[data-state=\"active\"] .step-label {\n color: var(--ty-text-strong, var(--ty-color-neutral-strong));\n}\n\n.step-indicator[aria-selected=\"true\"] .step-label {\n font-weight: 600;\n}\n\n.step-indicator[data-state=\"error\"] .step-label {\n color: var(--ty-wizard-error-accent);\n}\n\n/* Only where you are (or what's wrong) gets a second line. Hidden ones keep\n * their width (height 0), so connectors don't shift as you move. */\n.step-description {\n height: 0;\n visibility: hidden;\n font-size: var(--ty-font-xs, 12px);\n line-height: 1.3;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n color: var(--ty-text-soft, var(--ty-color-neutral));\n}\n\n.step-indicator[aria-selected=\"true\"] .step-description,\n.step-indicator[data-state=\"error\"] .step-description {\n height: auto;\n /* inherit, not visible: the rail is visibility:hidden in compact mode. */\n visibility: inherit;\n}\n\n.step-indicator:hover:not([aria-selected=\"true\"]) .step-label {\n color: var(--ty-text-strong, var(--ty-color-neutral-strong));\n}\n\n/* Custom indicator content via slots */\n::slotted([slot^=\"indicator-\"]) {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n/* ---------- Compact header (narrow containers) ---------- */\n\n.step-compact {\n display: none;\n flex-direction: column;\n gap: 10px;\n}\n\n.compact-top {\n display: flex;\n align-items: baseline;\n justify-content: space-between;\n gap: 12px;\n min-width: 0;\n}\n\n.compact-where {\n display: flex;\n align-items: baseline;\n gap: 6px;\n min-width: 0;\n white-space: nowrap;\n}\n\n.compact-count {\n font-size: var(--ty-font-xs, 12px);\n color: var(--ty-text-soft, var(--ty-color-neutral));\n}\n\n.compact-count::after {\n content: \"\u00B7\";\n margin-left: 6px;\n color: var(--ty-text-faint, var(--ty-color-neutral));\n}\n\n.compact-label {\n font-size: var(--ty-font-sm, 14px);\n font-weight: 600;\n color: var(--ty-text-strong, var(--ty-color-neutral-strong));\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.compact-description {\n font-size: var(--ty-font-xs, 12px);\n color: var(--ty-text-faint, var(--ty-color-neutral));\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.compact-segments {\n display: flex;\n gap: 4px;\n}\n\n.compact-segment {\n flex: 1;\n height: 3px;\n border-radius: 2px;\n background: var(--ty-wizard-progress-track);\n transition: background var(--ty-wizard-transition-duration) var(--ty-wizard-transition-easing);\n}\n\n.compact-segment[data-state=\"completed\"] { background: var(--ty-wizard-progress-fill); }\n.compact-segment[data-state=\"active\"] { background: var(--ty-wizard-active-accent); }\n.compact-segment[data-state=\"error\"] { background: var(--ty-wizard-error-accent); }\n\n/* .compact is set from JS when the rail's natural width doesn't fit (or a\n vertical wizard is under 360px). The rail stays laid out, hidden, so it\n can still be measured. */\n.wizard-container.compact { flex-direction: column; }\n.wizard-container.compact .step-indicators {\n position: absolute;\n visibility: hidden;\n pointer-events: none;\n width: max-content;\n}\n.wizard-container.compact .step-compact { display: flex; }\n.wizard-container.compact .step-indicators-wrapper {\n padding: var(--ty-wizard-header-padding);\n border-right: none;\n border-bottom: 1px solid var(--ty-wizard-header-border);\n min-width: 0;\n}\n\n/* ---------- Vertical ---------- */\n\n:host([orientation=\"vertical\"]) .wizard-container:not(.compact) {\n flex-direction: row;\n}\n\n:host([orientation=\"vertical\"]) .wizard-container:not(.compact) .step-indicators-wrapper {\n border-bottom: none;\n border-right: 1px solid var(--ty-wizard-header-border);\n padding: 20px 18px;\n min-width: 170px;\n box-sizing: border-box;\n}\n\n:host([orientation=\"vertical\"]) .step-indicators {\n flex-direction: column;\n align-items: stretch;\n gap: 0;\n}\n\n:host([orientation=\"vertical\"]) .step-indicator {\n flex: 0 0 auto;\n align-items: flex-start;\n gap: 10px;\n position: relative;\n padding-bottom: 26px;\n}\n\n:host([orientation=\"vertical\"]) .step-indicator:last-child {\n padding-bottom: 0;\n}\n\n:host([orientation=\"vertical\"]) .step-text {\n /* Center the label's line box on the circle (label line-height is 1.3). */\n padding-top: calc((var(--ty-wizard-circle-size) - var(--ty-font-sm, 14px) * 1.3) / 2);\n}\n\n:host([orientation=\"vertical\"]) .step-indicator:not(:last-child)::after {\n position: absolute;\n left: calc(var(--ty-wizard-circle-size) / 2 - var(--ty-wizard-progress-height) / 2);\n top: calc(var(--ty-wizard-circle-size) + 4px);\n bottom: 4px;\n width: var(--ty-wizard-progress-height);\n height: auto;\n min-width: 0;\n margin: 0;\n}\n\n/* ---------- Panels ---------- */\n\n.panels-viewport {\n position: relative;\n flex: 1;\n min-width: 0;\n height: var(--ty-wizard-panel-height, auto);\n overflow: hidden;\n background: var(--ty-wizard-panels-bg);\n}\n\n/* Carousel, like ty-tabs: steps sit side by side and the row slides. A flex\n * row is as tall as its tallest step, so the wizard doesn't jump between\n * steps (the height attribute overrides). */\n.panels-wrapper {\n display: flex;\n height: 100%;\n transform: translateX(calc(var(--ty-wizard-active-index, 0) * -100%));\n transition: transform var(--ty-wizard-transition-duration) var(--ty-wizard-transition-easing);\n will-change: transform;\n}\n\n::slotted(ty-step) {\n flex: 0 0 100%;\n min-width: 0;\n transition: visibility 0s linear 0s;\n}\n\n/* Off-screen steps leave the tab order once the slide has finished. */\n::slotted(ty-step:not([data-active=\"true\"])) {\n visibility: hidden;\n pointer-events: none;\n transition: visibility 0s linear var(--ty-wizard-transition-duration);\n}\n\n@media (prefers-reduced-motion: reduce) {\n .panels-wrapper,\n ::slotted(ty-step),\n ::slotted(ty-step:not([data-active=\"true\"])),\n .step-circle,\n .compact-segment,\n .step-indicator::after {\n transition-duration: 0ms !important;\n transition-delay: 0ms !important;\n }\n}\n\n.sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wizard.d.ts","sourceRoot":"","sources":["../../src/styles/wizard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,eAAO,MAAM,YAAY,s6PA4SxB,CAAC"}
|