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