svelte-multistyle-ui 0.0.4-alpha → 0.0.6-alpha
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 +1 -1
- package/cli/bin.js +90 -0
- package/cli/emit.js +228 -0
- package/cli/fixtures/sample.expected.svelte +69 -0
- package/cli/fixtures/sample.yaml +128 -0
- package/cli/generate.js +68 -0
- package/cli/registry.js +95 -0
- package/cli/schema.js +145 -0
- package/dist/components/Button.svelte +3 -1
- package/dist/components/Button.svelte.d.ts +2 -0
- package/dist/components/DatePicker.svelte +47 -12
- package/dist/components/FAB.svelte +3 -1
- package/dist/components/FAB.svelte.d.ts +2 -0
- package/dist/components/IconButton.svelte +3 -1
- package/dist/components/IconButton.svelte.d.ts +2 -0
- package/dist/components/Input.svelte +0 -1
- package/dist/components/MultiSelect.svelte +0 -1
- package/dist/components/Select.svelte +0 -1
- package/dist/components/Stepper.svelte +91 -33
- package/dist/components/Textarea.svelte +0 -1
- package/dist/components/accordion-styles.css +1 -9
- package/dist/components/alert-styles.css +1 -4
- package/dist/components/avatar-styles.css +1 -4
- package/dist/components/breadcrumb-styles.css +1 -7
- package/dist/components/button-styles.css +44 -52
- package/dist/components/buttongroup-styles.css +1 -5
- package/dist/components/card-styles.css +1 -9
- package/dist/components/carousel-styles.css +1 -5
- package/dist/components/charts/Chart.svelte +63 -3
- package/dist/components/charts/chart-config.d.ts +27 -2
- package/dist/components/charts/chart-config.js +180 -67
- package/dist/components/charts/chart-styles.css +32 -17
- package/dist/components/checkbox-styles.css +2 -10
- package/dist/components/chip-styles.css +1 -4
- package/dist/components/commandpalette-styles.css +0 -4
- package/dist/components/datepicker-styles.css +967 -1027
- package/dist/components/divider-styles.css +1 -4
- package/dist/components/drawer-styles.css +0 -4
- package/dist/components/dropdown-styles.css +0 -5
- package/dist/components/fab-styles.css +18 -12
- package/dist/components/fileupload-styles.css +2 -10
- package/dist/components/iconbutton-styles.css +33 -34
- package/dist/components/input-styles.css +5 -37
- package/dist/components/modal-styles.css +0 -8
- package/dist/components/multiselect-styles.css +5 -32
- package/dist/components/pagination-styles.css +2 -5
- package/dist/components/popover-styles.css +0 -4
- package/dist/components/progressbar-styles.css +1 -5
- package/dist/components/radio-styles.css +1 -8
- package/dist/components/rating-styles.css +1 -4
- package/dist/components/select-styles.css +5 -18
- package/dist/components/skeleton-styles.css +1 -4
- package/dist/components/slider-styles.css +1 -5
- package/dist/components/sortablelist-styles.css +0 -13
- package/dist/components/spinner-styles.css +1 -4
- package/dist/components/stepper-styles.css +59 -8
- package/dist/components/table-styles.css +1 -5
- package/dist/components/tabs-styles.css +3 -7
- package/dist/components/textarea-styles.css +5 -18
- package/dist/components/theme-base.css +19 -2
- package/dist/components/theme.css +329 -333
- package/dist/components/toast-styles.css +1 -4
- package/dist/components/toggle-styles.css +1 -11
- package/dist/components/tooltip-styles.css +1 -4
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -0
- package/dist/themes/color.d.ts +52 -0
- package/dist/themes/color.js +91 -0
- package/dist/themes/generator.d.ts +41 -0
- package/dist/themes/generator.js +174 -0
- package/dist/themes/index.d.ts +3 -0
- package/dist/themes/index.js +4 -0
- package/dist/themes/presets.d.ts +445 -0
- package/dist/themes/presets.js +144 -0
- package/dist/themes/schema.d.ts +47 -0
- package/dist/themes/schema.js +34 -0
- package/package.json +18 -4
|
@@ -1,16 +1,67 @@
|
|
|
1
1
|
/* ===== BASE ===== */
|
|
2
2
|
/* Theme-controlled: colors, border-width. Style-controlled: shape. */
|
|
3
|
+
.s-stepper-wrap {
|
|
4
|
+
position: relative;
|
|
5
|
+
width: 100%;
|
|
6
|
+
}
|
|
3
7
|
.s-stepper {
|
|
4
8
|
display: flex;
|
|
5
9
|
align-items: center;
|
|
6
10
|
width: 100%;
|
|
7
11
|
gap: 0;
|
|
12
|
+
flex-wrap: nowrap;
|
|
13
|
+
/* On narrow widths the steps keep their natural size and the row scrolls
|
|
14
|
+
horizontally instead of squashing the labels. */
|
|
15
|
+
overflow-x: auto;
|
|
16
|
+
/* Hide the native scrollbar — navigation is via the translucent arrows. */
|
|
17
|
+
scrollbar-width: none;
|
|
18
|
+
-ms-overflow-style: none;
|
|
19
|
+
}
|
|
20
|
+
.s-stepper::-webkit-scrollbar {
|
|
21
|
+
display: none;
|
|
22
|
+
width: 0;
|
|
23
|
+
height: 0;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/* Translucent scroll arrows. Only rendered when that direction is scrollable. */
|
|
27
|
+
.s-stepper-arrow {
|
|
28
|
+
position: absolute;
|
|
29
|
+
top: 50%;
|
|
30
|
+
transform: translateY(-50%);
|
|
31
|
+
display: inline-flex;
|
|
32
|
+
align-items: center;
|
|
33
|
+
justify-content: center;
|
|
34
|
+
width: 28px;
|
|
35
|
+
height: 28px;
|
|
36
|
+
border-radius: 50%;
|
|
37
|
+
border: 0px solid var(--t-card-border-color);
|
|
38
|
+
background: color-mix(in srgb, var(--t-surface) 0%, transparent);
|
|
39
|
+
color: var(--t-text);
|
|
40
|
+
font-size: 18px;
|
|
41
|
+
line-height: 1;
|
|
42
|
+
cursor: pointer;
|
|
43
|
+
z-index: 2;
|
|
44
|
+
backdrop-filter: blur(6px);
|
|
45
|
+
-webkit-backdrop-filter: blur(6px);
|
|
46
|
+
transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
|
|
47
|
+
}
|
|
48
|
+
.s-stepper-arrow.left { left: -18px; }
|
|
49
|
+
.s-stepper-arrow.right { right: -18px; }
|
|
50
|
+
.s-stepper-arrow:hover {
|
|
51
|
+
background: var(--t-primary);
|
|
52
|
+
border-color: var(--t-primary);
|
|
53
|
+
color: var(--t-text-on-primary);
|
|
54
|
+
}
|
|
55
|
+
.s-stepper-arrow:active {
|
|
56
|
+
transform: translateY(-50%) scale(0.92);
|
|
8
57
|
}
|
|
9
58
|
.s-stepper-step {
|
|
10
59
|
display: flex;
|
|
11
60
|
align-items: center;
|
|
12
61
|
gap: 8px;
|
|
13
|
-
|
|
62
|
+
/* Text/circle keep their natural width — they must NOT expand or contract.
|
|
63
|
+
Only the connector line flexes to fill the space between steps. */
|
|
64
|
+
flex: 0 0 auto;
|
|
14
65
|
}
|
|
15
66
|
.s-stepper-circle {
|
|
16
67
|
width: 32px;
|
|
@@ -30,18 +81,21 @@
|
|
|
30
81
|
.s-stepper-step.active .s-stepper-circle {
|
|
31
82
|
background: var(--t-primary);
|
|
32
83
|
border-color: var(--t-primary);
|
|
33
|
-
color:
|
|
84
|
+
color: var(--t-text-on-primary);
|
|
34
85
|
}
|
|
35
86
|
.s-stepper-step.completed .s-stepper-circle {
|
|
36
87
|
background: var(--t-primary);
|
|
37
88
|
border-color: var(--t-primary);
|
|
38
|
-
color:
|
|
89
|
+
color: var(--t-text-on-primary);
|
|
39
90
|
}
|
|
40
|
-
.s-stepper-label { font-size: 13px; color: var(--t-text-muted); }
|
|
91
|
+
.s-stepper-label { font-size: 13px; color: var(--t-text-muted); white-space: nowrap; }
|
|
41
92
|
.s-stepper-step.active .s-stepper-label { color: var(--t-primary); font-weight: 500; }
|
|
42
93
|
.s-stepper-step.completed .s-stepper-label { color: var(--t-text); }
|
|
43
94
|
.s-stepper-connector {
|
|
44
95
|
flex: 1;
|
|
96
|
+
/* Keep a floor so the line stays visible and the row scrolls (instead of
|
|
97
|
+
the line collapsing to zero) on narrow viewports. */
|
|
98
|
+
min-width: 32px;
|
|
45
99
|
height: 2px;
|
|
46
100
|
background: var(--t-border);
|
|
47
101
|
margin: 0 8px;
|
|
@@ -87,7 +141,4 @@
|
|
|
87
141
|
|
|
88
142
|
/* Liquid Glass */
|
|
89
143
|
.s-stepper-liquid-glass .s-stepper-circle { backdrop-filter: blur(16px); background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); }
|
|
90
|
-
.s-stepper-liquid-glass .s-stepper-step.active .s-stepper-circle { background: color-mix(in srgb, var(--t-primary) 60%, transparent); }
|
|
91
|
-
|
|
92
|
-
/* Legacy iOS */
|
|
93
|
-
.s-stepper-legacy-ios .s-stepper-circle { background: linear-gradient(180deg, rgba(255,255,255,0.8) 0%, var(--t-surface) 100%); border: var(--t-border-width) solid var(--t-border); box-shadow: inset 0 1px 0 rgba(255,255,255,0.8); }
|
|
144
|
+
.s-stepper-liquid-glass .s-stepper-step.active .s-stepper-circle { background: color-mix(in srgb, var(--t-primary) 60%, transparent); }
|
|
@@ -107,8 +107,4 @@
|
|
|
107
107
|
|
|
108
108
|
/* Liquid Glass */
|
|
109
109
|
.s-table-liquid-glass { border: 1px solid rgba(255,255,255,0.2); border-radius: 12px; overflow: hidden; backdrop-filter: blur(16px); }
|
|
110
|
-
.s-table-liquid-glass th { background: rgba(255,255,255,0.05); border-bottom: 1px solid rgba(255,255,255,0.15); }
|
|
111
|
-
|
|
112
|
-
/* Legacy iOS */
|
|
113
|
-
.s-table-legacy-ios { border: var(--t-border-width) solid var(--t-border); border-radius: 10px; overflow: hidden; box-shadow: var(--t-shadow-xs); }
|
|
114
|
-
.s-table-legacy-ios th { background: linear-gradient(180deg, rgba(255,255,255,0.8) 0%, var(--t-surface) 100%); }
|
|
110
|
+
.s-table-liquid-glass th { background: rgba(255,255,255,0.05); border-bottom: 1px solid rgba(255,255,255,0.15); }
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
/* Metro */
|
|
44
44
|
.s-tabs-metro { border-bottom: var(--t-border-width) solid var(--t-primary); }
|
|
45
45
|
.s-tabs-metro .s-tab { font-weight: 600; }
|
|
46
|
-
.s-tabs-metro .s-tab.active { background: var(--t-primary); color:
|
|
46
|
+
.s-tabs-metro .s-tab.active { background: var(--t-primary); color: var(--t-text-on-primary); border-bottom-color: var(--t-primary); }
|
|
47
47
|
|
|
48
48
|
/* Bootstrap */
|
|
49
49
|
.s-tabs-bootstrap { border-bottom: var(--t-border-width) solid var(--t-border); }
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
/* Cartoon */
|
|
54
54
|
.s-tabs-cartoon { border-bottom: var(--t-border-width) solid var(--t-text); }
|
|
55
55
|
.s-tabs-cartoon .s-tab { font-weight: 700; border-radius: 12px 12px 0 0; }
|
|
56
|
-
.s-tabs-cartoon .s-tab.active { background: var(--t-primary); color:
|
|
56
|
+
.s-tabs-cartoon .s-tab.active { background: var(--t-primary); color: var(--t-text-on-primary); border-bottom: var(--t-border-width) solid var(--t-primary); box-shadow: 3px -3px 0 var(--t-text); }
|
|
57
57
|
|
|
58
58
|
/* Illustration */
|
|
59
59
|
.s-tabs-illustration { border-bottom: var(--t-border-width) solid var(--t-text); }
|
|
@@ -67,8 +67,4 @@
|
|
|
67
67
|
|
|
68
68
|
/* Liquid Glass */
|
|
69
69
|
.s-tabs-liquid-glass { border-bottom: 1px solid rgba(255,255,255,0.2); }
|
|
70
|
-
.s-tabs-liquid-glass .s-tab.active { background: rgba(255,255,255,0.1); backdrop-filter: blur(12px); border-radius: 8px 8px 0 0; }
|
|
71
|
-
|
|
72
|
-
/* Legacy iOS */
|
|
73
|
-
.s-tabs-legacy-ios { border-bottom: var(--t-border-width) solid var(--t-border); }
|
|
74
|
-
.s-tabs-legacy-ios .s-tab.active { background: linear-gradient(180deg, rgba(255,255,255,0.8) 0%, var(--t-surface) 100%); border: var(--t-border-width) solid var(--t-border); border-bottom-color: transparent; border-radius: 8px 8px 0 0; }
|
|
70
|
+
.s-tabs-liquid-glass .s-tab.active { background: rgba(255,255,255,0.1); backdrop-filter: blur(12px); border-radius: 8px 8px 0 0; }
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
background: var(--t-surface);
|
|
18
18
|
color: var(--t-text);
|
|
19
19
|
border: var(--t-border-width) solid var(--t-border);
|
|
20
|
-
border-radius: var(--t-
|
|
20
|
+
border-radius: var(--t-input-radius);
|
|
21
21
|
transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
|
|
22
22
|
}
|
|
23
23
|
.s-textarea-wrapper textarea:hover {
|
|
@@ -60,8 +60,7 @@
|
|
|
60
60
|
.s-textarea-material3 textarea,
|
|
61
61
|
.s-textarea-fluent textarea,
|
|
62
62
|
.s-textarea-carbon textarea,
|
|
63
|
-
.s-textarea-bootstrap textarea
|
|
64
|
-
.s-textarea-legacy-ios textarea {
|
|
63
|
+
.s-textarea-bootstrap textarea {
|
|
65
64
|
padding-top: 24px;
|
|
66
65
|
}
|
|
67
66
|
|
|
@@ -70,7 +69,7 @@
|
|
|
70
69
|
background: color-mix(in srgb, var(--t-primary) 4%, var(--t-surface));
|
|
71
70
|
border: none;
|
|
72
71
|
border-bottom: var(--t-border-width) solid var(--t-border);
|
|
73
|
-
border-radius: var(--t-
|
|
72
|
+
border-radius: var(--t-input-radius) var(--t-input-radius) 0 0;
|
|
74
73
|
}
|
|
75
74
|
.s-textarea-material.focused textarea {
|
|
76
75
|
border-bottom-color: var(--t-primary);
|
|
@@ -82,7 +81,7 @@
|
|
|
82
81
|
.s-textarea-material3 textarea {
|
|
83
82
|
background: var(--t-surface);
|
|
84
83
|
border: var(--t-border-width) solid var(--t-border);
|
|
85
|
-
border-radius: var(--t-
|
|
84
|
+
border-radius: var(--t-input-radius);
|
|
86
85
|
}
|
|
87
86
|
.s-textarea-material3.focused textarea {
|
|
88
87
|
border-color: var(--t-primary);
|
|
@@ -209,16 +208,4 @@
|
|
|
209
208
|
}
|
|
210
209
|
.s-textarea-liquid-glass.focused textarea {
|
|
211
210
|
box-shadow: none;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
/* Legacy iOS */
|
|
215
|
-
.s-textarea-legacy-ios textarea {
|
|
216
|
-
border-radius: 10px;
|
|
217
|
-
border: var(--t-border-width) solid var(--t-border);
|
|
218
|
-
background: linear-gradient(180deg, rgba(255,255,255,0.8) 0%, var(--t-surface) 100%);
|
|
219
|
-
box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), var(--t-shadow-xs);
|
|
220
|
-
}
|
|
221
|
-
.s-textarea-legacy-ios.focused textarea {
|
|
222
|
-
border-color: var(--t-primary);
|
|
223
|
-
box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), 0 0 0 3px var(--t-shadow);
|
|
224
|
-
}
|
|
211
|
+
}
|
|
@@ -17,7 +17,9 @@
|
|
|
17
17
|
|
|
18
18
|
/* Text */
|
|
19
19
|
--t-text: #0f172a;
|
|
20
|
-
--t-text-
|
|
20
|
+
--t-text-on-primary: #ffffff; /* text color when background is primary */
|
|
21
|
+
--t-text-hint: color-mix(in srgb, var(--t-text) 50%, transparent); /* derived, not configurable */
|
|
22
|
+
--t-text-disabled: color-mix(in srgb, var(--t-text) 50%, transparent); /* derived */
|
|
21
23
|
--t-text-primary: #2563eb;
|
|
22
24
|
--t-text-secondary: #3b82f6;
|
|
23
25
|
|
|
@@ -36,8 +38,9 @@
|
|
|
36
38
|
--t-btn-border-color: transparent;
|
|
37
39
|
--t-btn-radius: 8px;
|
|
38
40
|
|
|
39
|
-
/* Cards */
|
|
41
|
+
/* Cards / inputs */
|
|
40
42
|
--t-card-radius: 12px;
|
|
43
|
+
--t-input-radius: 8px;
|
|
41
44
|
|
|
42
45
|
/* Shared dimensional tokens */
|
|
43
46
|
--t-border-width: 1.5px;
|
|
@@ -62,3 +65,17 @@
|
|
|
62
65
|
--t-text-muted: var(--t-text-hint);
|
|
63
66
|
--t-surface-dim: var(--t-surface-bg);
|
|
64
67
|
}
|
|
68
|
+
|
|
69
|
+
/* liquid-glass style — keep text light in LIGHT mode.
|
|
70
|
+
* Glass surfaces are dark-ish translucent, so the theme's dark light-mode text
|
|
71
|
+
* is unreadable on them. Override --t-text to white AND re-bake the
|
|
72
|
+
* --t-text-hint / --t-text-muted / --t-text-disabled derivations with white:
|
|
73
|
+
* a color-mix() custom property bakes at its declaring element, so the :root
|
|
74
|
+
* derivation (baked with dark text) would otherwise be inherited as a fixed
|
|
75
|
+
* dark color and stay invisible on glass. Dark mode is unaffected. */
|
|
76
|
+
html:not(.dark) [class*="-liquid-glass"] {
|
|
77
|
+
--t-text: #ffffff;
|
|
78
|
+
--t-text-hint: color-mix(in srgb, #ffffff 50%, transparent);
|
|
79
|
+
--t-text-muted: color-mix(in srgb, #ffffff 50%, transparent);
|
|
80
|
+
--t-text-disabled: color-mix(in srgb, #ffffff 50%, transparent);
|
|
81
|
+
}
|