tyrell-components 1.0.0-RC7 → 1.0.0-RC9
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/dist/tyrell.js +1 -1
- package/lib/components/button.d.ts +9 -0
- package/lib/components/button.d.ts.map +1 -1
- package/lib/components/button.js +34 -1
- package/lib/components/button.js.map +1 -1
- package/lib/components/copy.js +1 -1
- package/lib/components/date-picker.js +1 -1
- package/lib/components/dropdown.d.ts +35 -13
- package/lib/components/dropdown.d.ts.map +1 -1
- package/lib/components/dropdown.js +130 -42
- package/lib/components/dropdown.js.map +1 -1
- package/lib/components/file-upload.d.ts +121 -0
- package/lib/components/file-upload.d.ts.map +1 -0
- package/lib/components/file-upload.js +441 -0
- package/lib/components/file-upload.js.map +1 -0
- package/lib/components/input.js +3 -3
- package/lib/components/input.js.map +1 -1
- package/lib/components/multiselect.d.ts +22 -22
- package/lib/components/multiselect.d.ts.map +1 -1
- package/lib/components/multiselect.js +123 -108
- package/lib/components/multiselect.js.map +1 -1
- package/lib/components/textarea.js +1 -1
- package/lib/components/wizard.js +9 -9
- package/lib/components/wizard.js.map +1 -1
- package/lib/index.d.ts +8 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +3 -0
- package/lib/index.js.map +1 -1
- package/lib/styles/button.d.ts +1 -1
- package/lib/styles/button.d.ts.map +1 -1
- package/lib/styles/button.js +41 -0
- package/lib/styles/button.js.map +1 -1
- package/lib/styles/checkbox.d.ts +1 -1
- package/lib/styles/checkbox.d.ts.map +1 -1
- package/lib/styles/date-picker.d.ts +1 -1
- package/lib/styles/date-picker.d.ts.map +1 -1
- package/lib/styles/date-picker.js +7 -4
- package/lib/styles/date-picker.js.map +1 -1
- package/lib/styles/dropdown.d.ts +1 -1
- package/lib/styles/dropdown.d.ts.map +1 -1
- package/lib/styles/dropdown.js +104 -6
- package/lib/styles/dropdown.js.map +1 -1
- package/lib/styles/file-upload.d.ts +2 -0
- package/lib/styles/file-upload.d.ts.map +1 -0
- package/lib/styles/file-upload.js +241 -0
- package/lib/styles/file-upload.js.map +1 -0
- package/lib/styles/input.d.ts +1 -1
- package/lib/styles/input.d.ts.map +1 -1
- package/lib/styles/input.js +2 -2
- package/lib/styles/multiselect.d.ts +1 -1
- package/lib/styles/multiselect.d.ts.map +1 -1
- package/lib/styles/multiselect.js +147 -96
- package/lib/styles/multiselect.js.map +1 -1
- package/lib/styles/radio.d.ts +1 -1
- package/lib/styles/radio.d.ts.map +1 -1
- package/lib/styles/step.d.ts +1 -1
- package/lib/styles/step.d.ts.map +1 -1
- package/lib/styles/step.js +3 -3
- package/lib/styles/switch.d.ts +1 -1
- package/lib/styles/switch.d.ts.map +1 -1
- package/lib/styles/tag.d.ts +1 -1
- package/lib/styles/tag.d.ts.map +1 -1
- package/lib/styles/tag.js +1 -12
- package/lib/styles/tag.js.map +1 -1
- package/lib/styles/textarea.d.ts +1 -1
- package/lib/styles/textarea.js +1 -1
- package/lib/styles/wizard.d.ts +10 -15
- package/lib/styles/wizard.d.ts.map +1 -1
- package/lib/styles/wizard.js +149 -98
- package/lib/styles/wizard.js.map +1 -1
- package/lib/utils/loader-registry.d.ts +35 -0
- package/lib/utils/loader-registry.d.ts.map +1 -0
- package/lib/utils/loader-registry.js +43 -0
- package/lib/utils/loader-registry.js.map +1 -0
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +5 -1
package/lib/styles/wizard.js
CHANGED
|
@@ -1,34 +1,104 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Wizard Component Styles
|
|
3
3
|
*
|
|
4
|
-
* Styles for the ty-wizard container component including:
|
|
5
|
-
* - Flexbox layout with step indicators and content carousel
|
|
6
|
-
* - Progress line with animated completion overlay
|
|
7
|
-
* - Step circles with completed/active/pending states
|
|
8
|
-
* - Carousel viewport with transform animations
|
|
9
|
-
* - Responsive design with prefers-reduced-motion support
|
|
10
|
-
* - Fully customizable via CSS Parts (::part)
|
|
11
|
-
*
|
|
12
|
-
* Uses global design system tokens (no component-specific variables):
|
|
13
|
-
* - Surfaces: --ty-surface-floating, --ty-surface-content, --ty-surface-elevated
|
|
14
|
-
* - Colors: --ty-color-success, --ty-color-primary, --ty-color-danger
|
|
15
|
-
* - Borders: --ty-border, --ty-border-soft
|
|
16
|
-
* - Text: --ty-text, --ty-text-soft
|
|
17
|
-
*
|
|
18
4
|
* CSS Parts (for styling via ::part):
|
|
19
5
|
* - indicators-wrapper: The header containing step indicators
|
|
20
6
|
* - progress-line: The background progress track
|
|
21
7
|
* - step-circle: Individual step circle indicators
|
|
22
8
|
* - panels-container: The content viewport
|
|
9
|
+
*
|
|
10
|
+
* Theming — two override granularities:
|
|
11
|
+
*
|
|
12
|
+
* 1. Accent aliases (broad retheming — one variable shifts a whole state):
|
|
13
|
+
* --ty-wizard-active-accent, --ty-wizard-completed-accent,
|
|
14
|
+
* --ty-wizard-error-accent, --ty-wizard-pending-accent
|
|
15
|
+
*
|
|
16
|
+
* 2. Fine-grained tokens (surgical control — see :host block below):
|
|
17
|
+
* --ty-wizard-{region}-{property}
|
|
23
18
|
*/
|
|
24
19
|
export const wizardStyles = `
|
|
20
|
+
/* ============================================================================
|
|
21
|
+
Theming Tokens
|
|
22
|
+
All defaults chain back to global --ty-color-* / --ty-surface-* tokens.
|
|
23
|
+
Override on the host element or a wrapping container.
|
|
24
|
+
============================================================================ */
|
|
25
|
+
|
|
25
26
|
:host {
|
|
26
27
|
display: block;
|
|
27
|
-
width: var(--wizard-width, 100%);
|
|
28
|
-
height: var(--wizard-height, 700px);
|
|
28
|
+
width: var(--ty-wizard-width, 100%); /* set by width attribute — not a public token */
|
|
29
|
+
height: var(--ty-wizard-height, 700px); /* set by height attribute — not a public token */
|
|
29
30
|
box-sizing: border-box;
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
|
|
32
|
+
/* Accent aliases — override one to shift the matching circle, glow, and progress fill */
|
|
33
|
+
--ty-wizard-active-accent: var(--ty-color-primary);
|
|
34
|
+
--ty-wizard-completed-accent: var(--ty-color-success);
|
|
35
|
+
--ty-wizard-error-accent: var(--ty-color-danger);
|
|
36
|
+
--ty-wizard-pending-accent: var(--ty-color-neutral);
|
|
37
|
+
|
|
38
|
+
/* Container */
|
|
39
|
+
--ty-wizard-bg: var(--ty-surface-floating);
|
|
40
|
+
--ty-wizard-border: var(--ty-border);
|
|
41
|
+
--ty-wizard-radius: 12px;
|
|
42
|
+
--ty-wizard-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
|
|
43
|
+
|
|
44
|
+
/* Header strip */
|
|
45
|
+
--ty-wizard-header-bg: var(--ty-surface-content);
|
|
46
|
+
--ty-wizard-header-border: var(--ty-border-soft, var(--ty-border));
|
|
47
|
+
--ty-wizard-header-padding: 24px 24px 16px;
|
|
48
|
+
|
|
49
|
+
/* Progress line */
|
|
50
|
+
--ty-wizard-progress-track: var(--ty-border);
|
|
51
|
+
--ty-wizard-progress-fill: var(--ty-wizard-completed-accent);
|
|
52
|
+
--ty-wizard-progress-height: 2px;
|
|
53
|
+
|
|
54
|
+
/* Transitions */
|
|
55
|
+
--ty-wizard-transition-duration: 300ms;
|
|
56
|
+
--ty-wizard-transition-easing: ease-in-out;
|
|
57
|
+
|
|
58
|
+
/* Circle geometry */
|
|
59
|
+
--ty-wizard-circle-size: 32px;
|
|
60
|
+
--ty-wizard-circle-border-width: 2px;
|
|
61
|
+
|
|
62
|
+
/* Step circle — completed */
|
|
63
|
+
--ty-wizard-completed-bg: var(--ty-wizard-completed-accent);
|
|
64
|
+
--ty-wizard-completed-border: var(--ty-color-success-strong);
|
|
65
|
+
--ty-wizard-completed-color: white;
|
|
66
|
+
--ty-wizard-completed-glow: color-mix(in srgb, var(--ty-wizard-completed-accent) 10%, transparent);
|
|
67
|
+
|
|
68
|
+
/* Step circle — active */
|
|
69
|
+
--ty-wizard-active-bg: var(--ty-wizard-active-accent);
|
|
70
|
+
--ty-wizard-active-border: var(--ty-color-primary-strong);
|
|
71
|
+
--ty-wizard-active-color: white;
|
|
72
|
+
--ty-wizard-active-glow: color-mix(in srgb, var(--ty-wizard-active-accent) 10%, transparent);
|
|
73
|
+
|
|
74
|
+
/* Step circle — pending */
|
|
75
|
+
--ty-wizard-pending-bg: var(--ty-surface-elevated);
|
|
76
|
+
--ty-wizard-pending-border: var(--ty-border);
|
|
77
|
+
--ty-wizard-pending-color: var(--ty-text-soft);
|
|
78
|
+
|
|
79
|
+
/* Step circle — error */
|
|
80
|
+
--ty-wizard-error-bg: var(--ty-wizard-error-accent);
|
|
81
|
+
--ty-wizard-error-border: var(--ty-color-danger-strong);
|
|
82
|
+
--ty-wizard-error-color: white;
|
|
83
|
+
--ty-wizard-error-glow: color-mix(in srgb, var(--ty-wizard-error-accent) 10%, transparent);
|
|
84
|
+
|
|
85
|
+
/* Labels */
|
|
86
|
+
--ty-wizard-label-color: var(--ty-text);
|
|
87
|
+
--ty-wizard-label-active-color: var(--ty-text-strong);
|
|
88
|
+
--ty-wizard-label-inactive-color: var(--ty-text-soft);
|
|
89
|
+
--ty-wizard-label-size: var(--ty-font-sm, 14px);
|
|
90
|
+
--ty-wizard-label-weight: var(--ty-font-semibold, 600);
|
|
91
|
+
|
|
92
|
+
/* Descriptions */
|
|
93
|
+
--ty-wizard-description-color: var(--ty-text-soft);
|
|
94
|
+
--ty-wizard-description-active-color: var(--ty-text);
|
|
95
|
+
--ty-wizard-description-size: var(--ty-font-xs, 12px);
|
|
96
|
+
|
|
97
|
+
/* Panels viewport */
|
|
98
|
+
--ty-wizard-panels-bg: var(--ty-surface-elevated);
|
|
99
|
+
|
|
100
|
+
/* Focus */
|
|
101
|
+
--ty-wizard-focus-outline: var(--ty-wizard-active-accent);
|
|
32
102
|
}
|
|
33
103
|
|
|
34
104
|
.wizard-container {
|
|
@@ -38,16 +108,15 @@ export const wizardStyles = `
|
|
|
38
108
|
flex-direction: column;
|
|
39
109
|
position: relative;
|
|
40
110
|
box-sizing: border-box;
|
|
41
|
-
border-radius:
|
|
42
|
-
border: 1px solid var(--ty-border);
|
|
43
|
-
background: var(--ty-
|
|
44
|
-
box-shadow:
|
|
111
|
+
border-radius: var(--ty-wizard-radius);
|
|
112
|
+
border: 1px solid var(--ty-wizard-border);
|
|
113
|
+
background: var(--ty-wizard-bg);
|
|
114
|
+
box-shadow: var(--ty-wizard-shadow);
|
|
45
115
|
overflow: hidden;
|
|
46
116
|
}
|
|
47
117
|
|
|
48
118
|
/* ===================================== */
|
|
49
|
-
/* Step Indicators Wrapper
|
|
50
|
-
/* Expose as CSS Part for full styling control */
|
|
119
|
+
/* Step Indicators Wrapper */
|
|
51
120
|
/* ===================================== */
|
|
52
121
|
|
|
53
122
|
.step-indicators-wrapper {
|
|
@@ -55,33 +124,30 @@ export const wizardStyles = `
|
|
|
55
124
|
flex-direction: column;
|
|
56
125
|
flex-shrink: 0;
|
|
57
126
|
position: relative;
|
|
58
|
-
padding:
|
|
59
|
-
border-bottom: 1px solid var(--ty-
|
|
60
|
-
background: var(--ty-
|
|
127
|
+
padding: var(--ty-wizard-header-padding);
|
|
128
|
+
border-bottom: 1px solid var(--ty-wizard-header-border);
|
|
129
|
+
background: var(--ty-wizard-header-bg);
|
|
61
130
|
}
|
|
62
131
|
|
|
63
132
|
/* ===================================== */
|
|
64
|
-
/* Progress Line (behind step circles)
|
|
65
|
-
/* Expose as CSS Part for custom styling */
|
|
133
|
+
/* Progress Line (behind step circles) */
|
|
66
134
|
/* ===================================== */
|
|
67
135
|
|
|
68
136
|
.progress-line {
|
|
69
137
|
position: absolute;
|
|
70
138
|
/*
|
|
71
139
|
* With equal-width indicators (flex: 1), each takes 100%/N of the width.
|
|
72
|
-
* Circle centers
|
|
73
|
-
*
|
|
74
|
-
* Inset = 50% / step-count from each side.
|
|
140
|
+
* Circle centers sit at 50%/N from the left edge of each indicator.
|
|
141
|
+
* Inset = 50% / step-count from each side keeps the line between circle centres.
|
|
75
142
|
*/
|
|
76
|
-
left: calc(50% / var(--step-count, 4));
|
|
77
|
-
right: calc(50% / var(--step-count, 4));
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
background: var(--ty-border);
|
|
143
|
+
left: calc(50% / var(--ty-wizard-step-count, 4));
|
|
144
|
+
right: calc(50% / var(--ty-wizard-step-count, 4));
|
|
145
|
+
top: calc(var(--ty-wizard-circle-size, 32px) / 2 - 1px);
|
|
146
|
+
height: var(--ty-wizard-progress-height);
|
|
147
|
+
background: var(--ty-wizard-progress-track);
|
|
82
148
|
z-index: 0;
|
|
83
149
|
pointer-events: none;
|
|
84
|
-
transition: opacity var(--transition-duration
|
|
150
|
+
transition: opacity var(--ty-wizard-transition-duration) var(--ty-wizard-transition-easing);
|
|
85
151
|
}
|
|
86
152
|
|
|
87
153
|
.progress-overlay {
|
|
@@ -89,25 +155,23 @@ export const wizardStyles = `
|
|
|
89
155
|
left: 0;
|
|
90
156
|
top: 0;
|
|
91
157
|
height: 100%;
|
|
92
|
-
background: var(--ty-
|
|
93
|
-
transition: width var(--transition-duration
|
|
158
|
+
background: var(--ty-wizard-progress-fill);
|
|
159
|
+
transition: width var(--ty-wizard-transition-duration) var(--ty-wizard-transition-easing);
|
|
94
160
|
will-change: width;
|
|
95
161
|
}
|
|
96
162
|
|
|
97
163
|
/* ===================================== */
|
|
98
|
-
/* Step Indicators Container
|
|
164
|
+
/* Step Indicators Container */
|
|
99
165
|
/* ===================================== */
|
|
100
166
|
|
|
101
167
|
.step-indicators {
|
|
102
168
|
display: flex;
|
|
103
169
|
align-items: flex-start;
|
|
104
170
|
position: relative;
|
|
105
|
-
/* No padding - let equal-width indicators fill the space */
|
|
106
171
|
}
|
|
107
172
|
|
|
108
173
|
/* ===================================== */
|
|
109
|
-
/* Individual Step Indicator
|
|
110
|
-
/* Expose as CSS Part for step styling */
|
|
174
|
+
/* Individual Step Indicator */
|
|
111
175
|
/* ===================================== */
|
|
112
176
|
|
|
113
177
|
.step-indicator {
|
|
@@ -121,7 +185,6 @@ export const wizardStyles = `
|
|
|
121
185
|
padding: 0;
|
|
122
186
|
font: inherit;
|
|
123
187
|
transition: opacity 200ms;
|
|
124
|
-
/* Equal width for all indicators - makes progress line alignment predictable */
|
|
125
188
|
flex: 1;
|
|
126
189
|
min-width: 0;
|
|
127
190
|
}
|
|
@@ -133,66 +196,59 @@ export const wizardStyles = `
|
|
|
133
196
|
}
|
|
134
197
|
|
|
135
198
|
.step-indicator:focus-visible {
|
|
136
|
-
outline: 2px solid var(--ty-
|
|
199
|
+
outline: 2px solid var(--ty-wizard-focus-outline);
|
|
137
200
|
outline-offset: 4px;
|
|
138
201
|
border-radius: 50%;
|
|
139
202
|
}
|
|
140
203
|
|
|
141
204
|
/* ===================================== */
|
|
142
|
-
/* Step Circle
|
|
143
|
-
/* Expose as CSS Part for circle styling */
|
|
205
|
+
/* Step Circle */
|
|
144
206
|
/* ===================================== */
|
|
145
207
|
|
|
146
208
|
.step-circle {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
height: var(--step-circle-size, 32px);
|
|
209
|
+
width: var(--ty-wizard-circle-size);
|
|
210
|
+
height: var(--ty-wizard-circle-size);
|
|
150
211
|
border-radius: 50%;
|
|
151
|
-
border:
|
|
212
|
+
border: var(--ty-wizard-circle-border-width) solid;
|
|
152
213
|
display: flex;
|
|
153
214
|
align-items: center;
|
|
154
215
|
justify-content: center;
|
|
155
216
|
position: relative;
|
|
156
217
|
z-index: 10;
|
|
157
|
-
transition: all var(--transition-duration
|
|
218
|
+
transition: all var(--ty-wizard-transition-duration) var(--ty-wizard-transition-easing);
|
|
158
219
|
box-sizing: border-box;
|
|
159
220
|
flex-shrink: 0;
|
|
160
221
|
}
|
|
161
222
|
|
|
162
|
-
/* Completed state - green with success glow */
|
|
163
223
|
.step-circle[data-state="completed"] {
|
|
164
|
-
background: var(--ty-
|
|
165
|
-
border-color: var(--ty-
|
|
166
|
-
color:
|
|
167
|
-
box-shadow: 0 0 0 4px
|
|
224
|
+
background: var(--ty-wizard-completed-bg);
|
|
225
|
+
border-color: var(--ty-wizard-completed-border);
|
|
226
|
+
color: var(--ty-wizard-completed-color);
|
|
227
|
+
box-shadow: 0 0 0 4px var(--ty-wizard-completed-glow);
|
|
168
228
|
}
|
|
169
229
|
|
|
170
|
-
/* Active state - primary with primary glow */
|
|
171
230
|
.step-circle[data-state="active"] {
|
|
172
|
-
background: var(--ty-
|
|
173
|
-
border-color: var(--ty-
|
|
174
|
-
color:
|
|
175
|
-
box-shadow: 0 0 0 4px
|
|
231
|
+
background: var(--ty-wizard-active-bg);
|
|
232
|
+
border-color: var(--ty-wizard-active-border);
|
|
233
|
+
color: var(--ty-wizard-active-color);
|
|
234
|
+
box-shadow: 0 0 0 4px var(--ty-wizard-active-glow);
|
|
176
235
|
}
|
|
177
236
|
|
|
178
|
-
/* Pending state - neutral gray */
|
|
179
237
|
.step-circle[data-state="pending"] {
|
|
180
|
-
background: var(--ty-
|
|
181
|
-
border-color: var(--ty-border
|
|
182
|
-
color: var(--ty-
|
|
238
|
+
background: var(--ty-wizard-pending-bg);
|
|
239
|
+
border-color: var(--ty-wizard-pending-border);
|
|
240
|
+
color: var(--ty-wizard-pending-color);
|
|
183
241
|
}
|
|
184
242
|
|
|
185
|
-
/* Error state - red with danger glow */
|
|
186
243
|
.step-circle[data-state="error"] {
|
|
187
|
-
background: var(--ty-
|
|
188
|
-
border-color: var(--ty-
|
|
189
|
-
color:
|
|
190
|
-
box-shadow: 0 0 0 4px
|
|
244
|
+
background: var(--ty-wizard-error-bg);
|
|
245
|
+
border-color: var(--ty-wizard-error-border);
|
|
246
|
+
color: var(--ty-wizard-error-color);
|
|
247
|
+
box-shadow: 0 0 0 4px var(--ty-wizard-error-glow);
|
|
191
248
|
}
|
|
192
249
|
|
|
193
250
|
/* ===================================== */
|
|
194
|
-
/* Step Text Container
|
|
195
|
-
/* Wraps label and description */
|
|
251
|
+
/* Step Text Container */
|
|
196
252
|
/* ===================================== */
|
|
197
253
|
|
|
198
254
|
.step-text {
|
|
@@ -203,43 +259,43 @@ export const wizardStyles = `
|
|
|
203
259
|
}
|
|
204
260
|
|
|
205
261
|
/* ===================================== */
|
|
206
|
-
/* Step Label
|
|
262
|
+
/* Step Label */
|
|
207
263
|
/* ===================================== */
|
|
208
264
|
|
|
209
265
|
.step-label {
|
|
210
|
-
font-size: var(--ty-
|
|
211
|
-
font-weight: var(--ty-
|
|
212
|
-
color: var(--ty-
|
|
266
|
+
font-size: var(--ty-wizard-label-size);
|
|
267
|
+
font-weight: var(--ty-wizard-label-weight);
|
|
268
|
+
color: var(--ty-wizard-label-color);
|
|
213
269
|
transition: color 200ms;
|
|
214
270
|
}
|
|
215
271
|
|
|
216
272
|
.step-indicator[aria-selected="true"] .step-label {
|
|
217
|
-
color: var(--ty-
|
|
273
|
+
color: var(--ty-wizard-label-active-color);
|
|
218
274
|
}
|
|
219
275
|
|
|
220
276
|
.step-indicator[aria-selected="false"] .step-label {
|
|
221
|
-
color: var(--ty-
|
|
277
|
+
color: var(--ty-wizard-label-inactive-color);
|
|
222
278
|
}
|
|
223
279
|
|
|
224
280
|
/* ===================================== */
|
|
225
|
-
/* Step Description
|
|
281
|
+
/* Step Description */
|
|
226
282
|
/* ===================================== */
|
|
227
283
|
|
|
228
284
|
.step-description {
|
|
229
|
-
font-size: var(--ty-
|
|
285
|
+
font-size: var(--ty-wizard-description-size);
|
|
230
286
|
font-weight: var(--ty-font-normal, 400);
|
|
231
|
-
color: var(--ty-
|
|
287
|
+
color: var(--ty-wizard-description-color);
|
|
232
288
|
transition: color 200ms;
|
|
233
289
|
text-align: center;
|
|
234
290
|
max-width: 120px;
|
|
235
291
|
}
|
|
236
292
|
|
|
237
293
|
.step-indicator[aria-selected="true"] .step-description {
|
|
238
|
-
color: var(--ty-
|
|
294
|
+
color: var(--ty-wizard-description-active-color);
|
|
239
295
|
}
|
|
240
296
|
|
|
241
297
|
/* ===================================== */
|
|
242
|
-
/* Custom Indicator Content via Slots
|
|
298
|
+
/* Custom Indicator Content via Slots */
|
|
243
299
|
/* ===================================== */
|
|
244
300
|
|
|
245
301
|
::slotted([slot^="indicator-"]) {
|
|
@@ -251,46 +307,42 @@ export const wizardStyles = `
|
|
|
251
307
|
}
|
|
252
308
|
|
|
253
309
|
/* ===================================== */
|
|
254
|
-
/* Panels Viewport
|
|
255
|
-
/* Expose as CSS Part for panels container styling */
|
|
310
|
+
/* Panels Viewport */
|
|
256
311
|
/* ===================================== */
|
|
257
312
|
|
|
258
313
|
.panels-viewport {
|
|
259
314
|
position: relative;
|
|
260
315
|
flex: 1;
|
|
261
316
|
overflow: hidden;
|
|
262
|
-
/* Critical: hides off-screen panels */
|
|
263
317
|
min-height: 0;
|
|
264
|
-
|
|
265
|
-
background: var(--ty-surface-elevated);
|
|
318
|
+
background: var(--ty-wizard-panels-bg);
|
|
266
319
|
}
|
|
267
320
|
|
|
268
321
|
/* ===================================== */
|
|
269
|
-
/* Panels Wrapper (slides horizontally)
|
|
322
|
+
/* Panels Wrapper (slides horizontally) */
|
|
270
323
|
/* ===================================== */
|
|
271
324
|
|
|
272
325
|
.panels-wrapper {
|
|
273
326
|
display: flex;
|
|
274
327
|
height: 100%;
|
|
275
|
-
transition: transform var(--transition-duration
|
|
328
|
+
transition: transform var(--ty-wizard-transition-duration) var(--ty-wizard-transition-easing);
|
|
276
329
|
will-change: transform;
|
|
277
330
|
}
|
|
278
331
|
|
|
279
332
|
/* ===================================== */
|
|
280
|
-
/* Slotted Step Panels
|
|
333
|
+
/* Slotted Step Panels */
|
|
281
334
|
/* ===================================== */
|
|
282
335
|
|
|
283
336
|
::slotted(ty-step) {
|
|
284
|
-
width: var(--wizard-width, 100%);
|
|
337
|
+
width: var(--ty-wizard-width, 100%);
|
|
285
338
|
height: 100%;
|
|
286
339
|
flex-shrink: 0;
|
|
287
340
|
}
|
|
288
341
|
|
|
289
342
|
/* ===================================== */
|
|
290
|
-
/* Accessibility & Motion Preferences
|
|
343
|
+
/* Accessibility & Motion Preferences */
|
|
291
344
|
/* ===================================== */
|
|
292
345
|
|
|
293
|
-
/* Respect user's motion preferences */
|
|
294
346
|
@media (prefers-reduced-motion: reduce) {
|
|
295
347
|
.panels-wrapper {
|
|
296
348
|
transition-duration: 0ms !important;
|
|
@@ -309,7 +361,6 @@ export const wizardStyles = `
|
|
|
309
361
|
}
|
|
310
362
|
}
|
|
311
363
|
|
|
312
|
-
/* Screen reader only content */
|
|
313
364
|
.sr-only {
|
|
314
365
|
position: absolute;
|
|
315
366
|
width: 1px;
|
package/lib/styles/wizard.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wizard.js","sourceRoot":"","sources":["../../src/styles/wizard.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"wizard.js","sourceRoot":"","sources":["../../src/styles/wizard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,MAAM,CAAC,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoW3B,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Global loader-icon registry.
|
|
3
|
+
*
|
|
4
|
+
* Set once at app bootstrap to override the default spinner SVG used by
|
|
5
|
+
* every loading-aware component (`ty-button`, `ty-dropdown`, `ty-multiselect`,
|
|
6
|
+
* etc.). Components call `getLoaderSvg()` on every render, so changing the
|
|
7
|
+
* registered SVG affects future renders.
|
|
8
|
+
*
|
|
9
|
+
* The wrapper element rotates the SVG with `transform: rotate()`, so prefer
|
|
10
|
+
* a *static* SVG. If you must use a self-animating SVG, disable the wrapper
|
|
11
|
+
* spin with the `--ty-loader-animation: none` CSS custom property.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* import { setLoaderSvg } from 'tyrell-components'
|
|
15
|
+
* setLoaderSvg('<svg viewBox="0 0 24 24">...</svg>')
|
|
16
|
+
*
|
|
17
|
+
* // CDN / vanilla
|
|
18
|
+
* window.tyLoader.set('<svg ...>...</svg>')
|
|
19
|
+
*
|
|
20
|
+
* // Reset to default
|
|
21
|
+
* setLoaderSvg(null)
|
|
22
|
+
*/
|
|
23
|
+
/**
|
|
24
|
+
* Register a custom spinner SVG (markup string). Pass `null` to reset to
|
|
25
|
+
* the built-in default.
|
|
26
|
+
*/
|
|
27
|
+
export declare function setLoaderSvg(svg: string | null): void;
|
|
28
|
+
/**
|
|
29
|
+
* Get the currently registered spinner SVG, or the built-in default if
|
|
30
|
+
* none has been set. Components call this on every render.
|
|
31
|
+
*/
|
|
32
|
+
export declare function getLoaderSvg(): string;
|
|
33
|
+
/** Reset the registered loader back to the built-in default. */
|
|
34
|
+
export declare function resetLoaderSvg(): void;
|
|
35
|
+
//# sourceMappingURL=loader-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loader-registry.d.ts","sourceRoot":"","sources":["../../src/utils/loader-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAMH;;;GAGG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAErD;AAED;;;GAGG;AACH,wBAAgB,YAAY,IAAI,MAAM,CAErC;AAED,gEAAgE;AAChE,wBAAgB,cAAc,IAAI,IAAI,CAErC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Global loader-icon registry.
|
|
3
|
+
*
|
|
4
|
+
* Set once at app bootstrap to override the default spinner SVG used by
|
|
5
|
+
* every loading-aware component (`ty-button`, `ty-dropdown`, `ty-multiselect`,
|
|
6
|
+
* etc.). Components call `getLoaderSvg()` on every render, so changing the
|
|
7
|
+
* registered SVG affects future renders.
|
|
8
|
+
*
|
|
9
|
+
* The wrapper element rotates the SVG with `transform: rotate()`, so prefer
|
|
10
|
+
* a *static* SVG. If you must use a self-animating SVG, disable the wrapper
|
|
11
|
+
* spin with the `--ty-loader-animation: none` CSS custom property.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* import { setLoaderSvg } from 'tyrell-components'
|
|
15
|
+
* setLoaderSvg('<svg viewBox="0 0 24 24">...</svg>')
|
|
16
|
+
*
|
|
17
|
+
* // CDN / vanilla
|
|
18
|
+
* window.tyLoader.set('<svg ...>...</svg>')
|
|
19
|
+
*
|
|
20
|
+
* // Reset to default
|
|
21
|
+
* setLoaderSvg(null)
|
|
22
|
+
*/
|
|
23
|
+
const DEFAULT_LOADER_SVG = `<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"><circle cx="12" cy="12" r="10" stroke="currentColor" stroke-width="3" stroke-opacity="0.25"/><path d="M22 12a10 10 0 0 1-10 10" stroke="currentColor" stroke-width="3" stroke-linecap="round"/></svg>`;
|
|
24
|
+
let customLoaderSvg = null;
|
|
25
|
+
/**
|
|
26
|
+
* Register a custom spinner SVG (markup string). Pass `null` to reset to
|
|
27
|
+
* the built-in default.
|
|
28
|
+
*/
|
|
29
|
+
export function setLoaderSvg(svg) {
|
|
30
|
+
customLoaderSvg = svg && svg.trim() ? svg : null;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Get the currently registered spinner SVG, or the built-in default if
|
|
34
|
+
* none has been set. Components call this on every render.
|
|
35
|
+
*/
|
|
36
|
+
export function getLoaderSvg() {
|
|
37
|
+
return customLoaderSvg ?? DEFAULT_LOADER_SVG;
|
|
38
|
+
}
|
|
39
|
+
/** Reset the registered loader back to the built-in default. */
|
|
40
|
+
export function resetLoaderSvg() {
|
|
41
|
+
customLoaderSvg = null;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=loader-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loader-registry.js","sourceRoot":"","sources":["../../src/utils/loader-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,MAAM,kBAAkB,GAAG,kSAAkS,CAAA;AAE7T,IAAI,eAAe,GAAkB,IAAI,CAAA;AAEzC;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,GAAkB;IAC7C,eAAe,GAAG,GAAG,IAAI,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAA;AAClD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,YAAY;IAC1B,OAAO,eAAe,IAAI,kBAAkB,CAAA;AAC9C,CAAC;AAED,gEAAgE;AAChE,MAAM,UAAU,cAAc;IAC5B,eAAe,GAAG,IAAI,CAAA;AACxB,CAAC"}
|
package/lib/version.d.ts
CHANGED
package/lib/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tyrell-components",
|
|
3
|
-
"version": "1.0.0-
|
|
3
|
+
"version": "1.0.0-RC9",
|
|
4
4
|
"description": "Tyrell Components - Framework-agnostic web components with semantic design system",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -44,6 +44,10 @@
|
|
|
44
44
|
"types": "./lib/components/copy.d.ts",
|
|
45
45
|
"import": "./lib/components/copy.js"
|
|
46
46
|
},
|
|
47
|
+
"./file-upload": {
|
|
48
|
+
"types": "./lib/components/file-upload.d.ts",
|
|
49
|
+
"import": "./lib/components/file-upload.js"
|
|
50
|
+
},
|
|
47
51
|
"./popup": {
|
|
48
52
|
"types": "./lib/components/popup.d.ts",
|
|
49
53
|
"import": "./lib/components/popup.js"
|