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
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
export const fieldSizeVars = `
|
|
2
|
+
:host {
|
|
3
|
+
--ty-field-height: var(--ty-size-sm, 2rem);
|
|
4
|
+
--ty-field-pad-x: 10px;
|
|
5
|
+
--ty-field-font: var(--ty-font-sm);
|
|
6
|
+
--ty-field-leading: 20px;
|
|
7
|
+
--ty-field-tracking: var(--ty-tracking-sm);
|
|
8
|
+
--ty-field-label-font: var(--ty-font-xs);
|
|
9
|
+
--ty-field-label-leading: var(--ty-leading-xs);
|
|
10
|
+
--ty-field-label-gap: 5px;
|
|
11
|
+
--ty-field-outer-pad-x: calc(var(--ty-field-pad-x) + 1px);
|
|
12
|
+
--ty-field-control: 24px;
|
|
13
|
+
--ty-field-icon: 16px;
|
|
14
|
+
}
|
|
15
|
+
:host([size="xs"]) {
|
|
16
|
+
--ty-field-height: var(--ty-size-xs, 1.75rem);
|
|
17
|
+
--ty-field-pad-x: 8px;
|
|
18
|
+
--ty-field-font: var(--ty-font-xs);
|
|
19
|
+
--ty-field-leading: 16px;
|
|
20
|
+
--ty-field-tracking: var(--ty-tracking-xs);
|
|
21
|
+
--ty-field-label-font: var(--ty-font-xs);
|
|
22
|
+
--ty-field-label-leading: var(--ty-leading-xs);
|
|
23
|
+
--ty-field-label-gap: 4px;
|
|
24
|
+
--ty-field-control: 20px;
|
|
25
|
+
--ty-field-icon: 14px;
|
|
26
|
+
}
|
|
27
|
+
:host([size="md"]) {
|
|
28
|
+
--ty-field-height: var(--ty-size-md, 2.25rem);
|
|
29
|
+
--ty-field-pad-x: 12px;
|
|
30
|
+
--ty-field-font: var(--ty-font-sm);
|
|
31
|
+
--ty-field-leading: 20px;
|
|
32
|
+
--ty-field-tracking: var(--ty-tracking-sm);
|
|
33
|
+
--ty-field-label-font: var(--ty-font-sm);
|
|
34
|
+
--ty-field-label-leading: var(--ty-leading-sm);
|
|
35
|
+
--ty-field-label-gap: 6px;
|
|
36
|
+
--ty-field-control: 28px;
|
|
37
|
+
--ty-field-icon: 18px;
|
|
38
|
+
}
|
|
39
|
+
:host([size="lg"]) {
|
|
40
|
+
--ty-field-height: var(--ty-size-lg, 2.5rem);
|
|
41
|
+
--ty-field-pad-x: 14px;
|
|
42
|
+
--ty-field-font: var(--ty-font-base);
|
|
43
|
+
--ty-field-leading: 24px;
|
|
44
|
+
--ty-field-tracking: var(--ty-tracking-base);
|
|
45
|
+
--ty-field-label-font: var(--ty-font-sm);
|
|
46
|
+
--ty-field-label-leading: var(--ty-leading-sm);
|
|
47
|
+
--ty-field-label-gap: 6px;
|
|
48
|
+
--ty-field-control: 32px;
|
|
49
|
+
--ty-field-icon: 20px;
|
|
50
|
+
}
|
|
51
|
+
:host([size="xl"]) {
|
|
52
|
+
--ty-field-height: var(--ty-size-xl, 2.75rem);
|
|
53
|
+
--ty-field-pad-x: 16px;
|
|
54
|
+
--ty-field-font: var(--ty-font-lg);
|
|
55
|
+
--ty-field-leading: 28px;
|
|
56
|
+
--ty-field-tracking: var(--ty-tracking-base);
|
|
57
|
+
--ty-field-label-font: var(--ty-font-base);
|
|
58
|
+
--ty-field-label-leading: var(--ty-leading-base);
|
|
59
|
+
--ty-field-label-gap: 8px;
|
|
60
|
+
--ty-field-control: 36px;
|
|
61
|
+
--ty-field-icon: 22px;
|
|
62
|
+
}
|
|
63
|
+
@media (max-width: 640px) {
|
|
64
|
+
:host([size="lg"]) {
|
|
65
|
+
--ty-field-height: var(--ty-size-md, 2.25rem);
|
|
66
|
+
--ty-field-pad-x: 12px;
|
|
67
|
+
--ty-field-font: var(--ty-font-sm);
|
|
68
|
+
--ty-field-leading: 20px;
|
|
69
|
+
--ty-field-control: 28px;
|
|
70
|
+
--ty-field-icon: 18px;
|
|
71
|
+
}
|
|
72
|
+
:host([size="xl"]) {
|
|
73
|
+
--ty-field-height: var(--ty-size-lg, 2.5rem);
|
|
74
|
+
--ty-field-pad-x: 14px;
|
|
75
|
+
--ty-field-font: var(--ty-font-base);
|
|
76
|
+
--ty-field-leading: 24px;
|
|
77
|
+
--ty-field-control: 32px;
|
|
78
|
+
--ty-field-icon: 20px;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
@media (max-width: 480px) {
|
|
82
|
+
:host([size="xl"]) {
|
|
83
|
+
--ty-field-height: var(--ty-size-md, 2.25rem);
|
|
84
|
+
--ty-field-pad-x: 12px;
|
|
85
|
+
--ty-field-font: var(--ty-font-sm);
|
|
86
|
+
--ty-field-leading: 20px;
|
|
87
|
+
--ty-field-control: 28px;
|
|
88
|
+
--ty-field-icon: 18px;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
`;
|
|
@@ -1,226 +1,196 @@
|
|
|
1
1
|
export const fileUploadStyles = `
|
|
2
2
|
:host {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
display: block;
|
|
4
|
+
font-family: inherit;
|
|
5
|
+
width: 100%;
|
|
6
6
|
}
|
|
7
|
-
|
|
8
7
|
.file-upload-container {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
width: 100%;
|
|
11
|
+
box-sizing: border-box;
|
|
13
12
|
}
|
|
14
|
-
|
|
15
13
|
.upload-label {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
|
|
14
|
+
font-size: var(--ty-font-sm);
|
|
15
|
+
line-height: var(--ty-leading-sm);
|
|
16
|
+
letter-spacing: var(--ty-tracking-sm);
|
|
17
|
+
font-weight: var(--ty-font-medium);
|
|
18
|
+
color: var(--ty-label-color);
|
|
19
|
+
margin-bottom: 6px;
|
|
20
|
+
padding-left: 4px;
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
}
|
|
27
24
|
.required-icon {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
color: var(--ty-color-danger);
|
|
26
|
+
margin-left: 4px;
|
|
27
|
+
font-size: 0.75rem;
|
|
28
|
+
line-height: 1;
|
|
32
29
|
}
|
|
33
|
-
|
|
34
30
|
.drop-zone {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
|
|
31
|
+
border: 2px dashed var(--ty-border);
|
|
32
|
+
border-radius: var(--ty-radius-base);
|
|
33
|
+
padding: 2rem 1.5rem;
|
|
34
|
+
text-align: center;
|
|
35
|
+
cursor: pointer;
|
|
36
|
+
transition: var(--ty-local-transition, border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease);
|
|
37
|
+
outline: none;
|
|
38
|
+
display: flex;
|
|
39
|
+
flex-direction: column;
|
|
40
|
+
align-items: center;
|
|
41
|
+
justify-content: center;
|
|
42
|
+
gap: 0.5rem;
|
|
43
|
+
min-height: 140px;
|
|
44
|
+
user-select: none;
|
|
45
|
+
}
|
|
51
46
|
.drop-zone:hover:not(.disabled) {
|
|
52
|
-
|
|
53
|
-
|
|
47
|
+
border-color: var(--ty-input-border-hover);
|
|
48
|
+
background: var(--ty-surface-content);
|
|
54
49
|
}
|
|
55
|
-
|
|
56
50
|
.drop-zone.focused {
|
|
57
|
-
|
|
58
|
-
|
|
51
|
+
border-color: var(--ty-input-border-focus);
|
|
52
|
+
box-shadow: 0 0 0 3px var(--ty-input-shadow-focus);
|
|
59
53
|
}
|
|
60
|
-
|
|
61
54
|
.drop-zone.drag-active {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
55
|
+
border-color: var(--ty-color-primary);
|
|
56
|
+
border-style: solid;
|
|
57
|
+
background: var(--ty-bg-primary-);
|
|
65
58
|
}
|
|
66
|
-
|
|
67
59
|
.drop-zone.drag-active .upload-icon {
|
|
68
|
-
|
|
69
|
-
|
|
60
|
+
color: var(--ty-color-primary);
|
|
61
|
+
transform: translateY(-2px);
|
|
70
62
|
}
|
|
71
|
-
|
|
72
63
|
.drop-zone.has-files {
|
|
73
|
-
|
|
74
|
-
|
|
64
|
+
min-height: 80px;
|
|
65
|
+
padding: 1.25rem 1.5rem;
|
|
75
66
|
}
|
|
76
|
-
|
|
77
67
|
.drop-zone.disabled {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
68
|
+
opacity: 0.5;
|
|
69
|
+
cursor: not-allowed;
|
|
70
|
+
pointer-events: none;
|
|
81
71
|
}
|
|
82
|
-
|
|
83
72
|
.drop-zone.error {
|
|
84
|
-
|
|
73
|
+
border-color: var(--ty-color-danger);
|
|
85
74
|
}
|
|
86
|
-
|
|
87
75
|
.drop-zone.error:not(.disabled) {
|
|
88
|
-
|
|
76
|
+
background: var(--ty-bg-danger-);
|
|
89
77
|
}
|
|
90
|
-
|
|
91
78
|
.upload-icon {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
}
|
|
101
|
-
|
|
79
|
+
color: var(--ty-text-faint);
|
|
80
|
+
width: 2.5rem;
|
|
81
|
+
height: 2.5rem;
|
|
82
|
+
display: flex;
|
|
83
|
+
align-items: center;
|
|
84
|
+
justify-content: center;
|
|
85
|
+
transition: var(--ty-local-transition, color 0.15s ease, transform 0.15s ease);
|
|
86
|
+
pointer-events: none;
|
|
87
|
+
}
|
|
102
88
|
.upload-icon svg {
|
|
103
|
-
|
|
104
|
-
|
|
89
|
+
width: 100%;
|
|
90
|
+
height: 100%;
|
|
105
91
|
}
|
|
106
|
-
|
|
107
92
|
.upload-hint {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
93
|
+
color: var(--ty-text-soft);
|
|
94
|
+
font-size: var(--ty-font-sm);
|
|
95
|
+
line-height: var(--ty-leading-sm);
|
|
96
|
+
pointer-events: none;
|
|
112
97
|
}
|
|
113
|
-
|
|
114
98
|
.browse-link {
|
|
115
|
-
|
|
116
|
-
|
|
99
|
+
color: var(--ty-color-primary);
|
|
100
|
+
font-weight: var(--ty-font-medium);
|
|
117
101
|
}
|
|
118
|
-
|
|
119
102
|
.upload-sub-hint {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
103
|
+
color: var(--ty-text-faint);
|
|
104
|
+
font-size: var(--ty-font-xs);
|
|
105
|
+
line-height: var(--ty-leading-xs);
|
|
106
|
+
pointer-events: none;
|
|
124
107
|
}
|
|
125
|
-
|
|
126
108
|
.file-list {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
109
|
+
display: flex;
|
|
110
|
+
flex-direction: column;
|
|
111
|
+
gap: 0.375rem;
|
|
112
|
+
margin-top: 0.5rem;
|
|
131
113
|
}
|
|
132
|
-
|
|
133
114
|
.file-item {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
}
|
|
142
|
-
|
|
115
|
+
display: flex;
|
|
116
|
+
align-items: center;
|
|
117
|
+
gap: 0.5rem;
|
|
118
|
+
padding: 0.5rem 0.75rem;
|
|
119
|
+
border-radius: var(--ty-radius-base);
|
|
120
|
+
background: var(--ty-surface-content);
|
|
121
|
+
border: 1px solid var(--ty-border-soft);
|
|
122
|
+
}
|
|
143
123
|
.file-icon {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
}
|
|
151
|
-
|
|
124
|
+
color: var(--ty-text-faint);
|
|
125
|
+
flex-shrink: 0;
|
|
126
|
+
width: 1rem;
|
|
127
|
+
height: 1rem;
|
|
128
|
+
display: flex;
|
|
129
|
+
align-items: center;
|
|
130
|
+
}
|
|
152
131
|
.file-icon svg {
|
|
153
|
-
|
|
154
|
-
|
|
132
|
+
width: 100%;
|
|
133
|
+
height: 100%;
|
|
155
134
|
}
|
|
156
|
-
|
|
157
135
|
.file-name {
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
}
|
|
166
|
-
|
|
136
|
+
flex: 1;
|
|
137
|
+
font-size: var(--ty-font-sm);
|
|
138
|
+
color: var(--ty-text);
|
|
139
|
+
white-space: nowrap;
|
|
140
|
+
overflow: hidden;
|
|
141
|
+
text-overflow: ellipsis;
|
|
142
|
+
min-width: 0;
|
|
143
|
+
}
|
|
167
144
|
.file-size {
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
145
|
+
font-size: var(--ty-font-xs);
|
|
146
|
+
color: var(--ty-text-faint);
|
|
147
|
+
flex-shrink: 0;
|
|
148
|
+
font-variant-numeric: tabular-nums;
|
|
172
149
|
}
|
|
173
|
-
|
|
174
150
|
.file-remove {
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
}
|
|
190
|
-
|
|
151
|
+
flex-shrink: 0;
|
|
152
|
+
cursor: pointer;
|
|
153
|
+
color: var(--ty-text-faint);
|
|
154
|
+
width: 1.25rem;
|
|
155
|
+
height: 1.25rem;
|
|
156
|
+
display: flex;
|
|
157
|
+
align-items: center;
|
|
158
|
+
justify-content: center;
|
|
159
|
+
border-radius: 50%;
|
|
160
|
+
transition: var(--ty-local-transition, color 0.15s ease, background-color 0.15s ease);
|
|
161
|
+
border: none;
|
|
162
|
+
background: none;
|
|
163
|
+
padding: 0;
|
|
164
|
+
outline: none;
|
|
165
|
+
}
|
|
191
166
|
.file-remove:hover {
|
|
192
|
-
|
|
193
|
-
|
|
167
|
+
color: var(--ty-color-danger);
|
|
168
|
+
background: var(--ty-bg-danger-);
|
|
194
169
|
}
|
|
195
|
-
|
|
196
170
|
.file-remove:focus-visible {
|
|
197
|
-
|
|
171
|
+
box-shadow: 0 0 0 2px var(--ty-color-danger);
|
|
198
172
|
}
|
|
199
|
-
|
|
200
173
|
.file-remove svg {
|
|
201
|
-
|
|
202
|
-
|
|
174
|
+
width: 12px;
|
|
175
|
+
height: 12px;
|
|
203
176
|
}
|
|
204
|
-
|
|
205
177
|
.error-message {
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
178
|
+
font-size: var(--ty-font-xs);
|
|
179
|
+
line-height: var(--ty-leading-xs);
|
|
180
|
+
color: var(--ty-color-danger);
|
|
181
|
+
margin-top: 4px;
|
|
182
|
+
padding-left: 4px;
|
|
211
183
|
}
|
|
212
|
-
|
|
213
184
|
@media (prefers-reduced-motion: reduce) {
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
185
|
+
.drop-zone,
|
|
186
|
+
.upload-icon,
|
|
187
|
+
.file-remove {
|
|
188
|
+
transition: none;
|
|
189
|
+
}
|
|
219
190
|
}
|
|
220
|
-
|
|
221
191
|
@media (prefers-contrast: high) {
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
192
|
+
.drop-zone {
|
|
193
|
+
border-width: 3px;
|
|
194
|
+
}
|
|
225
195
|
}
|
|
226
196
|
`;
|