svelte-multistyle-ui 0.0.1-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/LICENSE +201 -0
- package/README.md +183 -0
- package/dist/actions/portal.d.ts +20 -0
- package/dist/actions/portal.js +32 -0
- package/dist/components/Accordion.svelte +64 -0
- package/dist/components/Accordion.svelte.d.ts +19 -0
- package/dist/components/Alert.svelte +61 -0
- package/dist/components/Alert.svelte.d.ts +23 -0
- package/dist/components/Avatar.svelte +31 -0
- package/dist/components/Avatar.svelte.d.ts +21 -0
- package/dist/components/Breadcrumb.svelte +35 -0
- package/dist/components/Breadcrumb.svelte.d.ts +15 -0
- package/dist/components/Button.svelte +34 -0
- package/dist/components/Button.svelte.d.ts +25 -0
- package/dist/components/ButtonGroup.svelte +45 -0
- package/dist/components/ButtonGroup.svelte.d.ts +23 -0
- package/dist/components/Card.svelte +29 -0
- package/dist/components/Card.svelte.d.ts +21 -0
- package/dist/components/Carousel.svelte +111 -0
- package/dist/components/Carousel.svelte.d.ts +23 -0
- package/dist/components/Checkbox.svelte +64 -0
- package/dist/components/Checkbox.svelte.d.ts +21 -0
- package/dist/components/Chip.svelte +43 -0
- package/dist/components/Chip.svelte.d.ts +27 -0
- package/dist/components/Column.svelte +38 -0
- package/dist/components/Column.svelte.d.ts +21 -0
- package/dist/components/CommandPalette.svelte +207 -0
- package/dist/components/CommandPalette.svelte.d.ts +19 -0
- package/dist/components/DatePicker.svelte +365 -0
- package/dist/components/DatePicker.svelte.d.ts +31 -0
- package/dist/components/Divider.svelte +32 -0
- package/dist/components/Divider.svelte.d.ts +17 -0
- package/dist/components/Drawer.svelte +69 -0
- package/dist/components/Drawer.svelte.d.ts +21 -0
- package/dist/components/DropdownMenu.svelte +113 -0
- package/dist/components/DropdownMenu.svelte.d.ts +25 -0
- package/dist/components/FAB.svelte +27 -0
- package/dist/components/FAB.svelte.d.ts +19 -0
- package/dist/components/FileUpload.svelte +76 -0
- package/dist/components/FileUpload.svelte.d.ts +21 -0
- package/dist/components/Grid.svelte +51 -0
- package/dist/components/Grid.svelte.d.ts +27 -0
- package/dist/components/IconButton.svelte +39 -0
- package/dist/components/IconButton.svelte.d.ts +27 -0
- package/dist/components/Input.svelte +121 -0
- package/dist/components/Input.svelte.d.ts +69 -0
- package/dist/components/Modal.svelte +57 -0
- package/dist/components/Modal.svelte.d.ts +23 -0
- package/dist/components/MultiSelect.svelte +125 -0
- package/dist/components/MultiSelect.svelte.d.ts +23 -0
- package/dist/components/Pagination.svelte +52 -0
- package/dist/components/Pagination.svelte.d.ts +19 -0
- package/dist/components/Popover.svelte +114 -0
- package/dist/components/Popover.svelte.d.ts +23 -0
- package/dist/components/ProgressBar.svelte +72 -0
- package/dist/components/ProgressBar.svelte.d.ts +21 -0
- package/dist/components/Radio.svelte +39 -0
- package/dist/components/Radio.svelte.d.ts +21 -0
- package/dist/components/Rating.svelte +102 -0
- package/dist/components/Rating.svelte.d.ts +25 -0
- package/dist/components/Row.svelte +39 -0
- package/dist/components/Row.svelte.d.ts +23 -0
- package/dist/components/Select.svelte +80 -0
- package/dist/components/Select.svelte.d.ts +23 -0
- package/dist/components/Skeleton.svelte +26 -0
- package/dist/components/Skeleton.svelte.d.ts +19 -0
- package/dist/components/Slider.svelte +46 -0
- package/dist/components/Slider.svelte.d.ts +25 -0
- package/dist/components/Spinner.svelte +27 -0
- package/dist/components/Spinner.svelte.d.ts +15 -0
- package/dist/components/Stepper.svelte +34 -0
- package/dist/components/Stepper.svelte.d.ts +17 -0
- package/dist/components/Table.svelte +59 -0
- package/dist/components/Table.svelte.d.ts +19 -0
- package/dist/components/Tabs.svelte +32 -0
- package/dist/components/Tabs.svelte.d.ts +17 -0
- package/dist/components/Textarea.svelte +86 -0
- package/dist/components/Textarea.svelte.d.ts +31 -0
- package/dist/components/Toast.svelte +90 -0
- package/dist/components/Toast.svelte.d.ts +19 -0
- package/dist/components/Toggle.svelte +46 -0
- package/dist/components/Toggle.svelte.d.ts +21 -0
- package/dist/components/Tooltip.svelte +35 -0
- package/dist/components/Tooltip.svelte.d.ts +19 -0
- package/dist/components/accordion-styles.css +89 -0
- package/dist/components/alert-styles.css +66 -0
- package/dist/components/avatar-styles.css +50 -0
- package/dist/components/breadcrumb-styles.css +73 -0
- package/dist/components/button-styles.css +272 -0
- package/dist/components/buttongroup-styles.css +118 -0
- package/dist/components/card-styles.css +101 -0
- package/dist/components/carousel-styles.css +145 -0
- package/dist/components/charts/BarChart.svelte +5 -0
- package/dist/components/charts/BarChart.svelte.d.ts +29 -0
- package/dist/components/charts/BubbleChart.svelte +5 -0
- package/dist/components/charts/BubbleChart.svelte.d.ts +29 -0
- package/dist/components/charts/Chart.svelte +186 -0
- package/dist/components/charts/Chart.svelte.d.ts +37 -0
- package/dist/components/charts/ComboChart.svelte +5 -0
- package/dist/components/charts/ComboChart.svelte.d.ts +29 -0
- package/dist/components/charts/DoughnutChart.svelte +5 -0
- package/dist/components/charts/DoughnutChart.svelte.d.ts +29 -0
- package/dist/components/charts/LineChart.svelte +5 -0
- package/dist/components/charts/LineChart.svelte.d.ts +29 -0
- package/dist/components/charts/PieChart.svelte +5 -0
- package/dist/components/charts/PieChart.svelte.d.ts +29 -0
- package/dist/components/charts/PolarAreaChart.svelte +5 -0
- package/dist/components/charts/PolarAreaChart.svelte.d.ts +29 -0
- package/dist/components/charts/RadarChart.svelte +5 -0
- package/dist/components/charts/RadarChart.svelte.d.ts +29 -0
- package/dist/components/charts/ScatterChart.svelte +5 -0
- package/dist/components/charts/ScatterChart.svelte.d.ts +29 -0
- package/dist/components/charts/StackedBarChart.svelte +18 -0
- package/dist/components/charts/StackedBarChart.svelte.d.ts +29 -0
- package/dist/components/charts/StackedLineChart.svelte +21 -0
- package/dist/components/charts/StackedLineChart.svelte.d.ts +29 -0
- package/dist/components/charts/chart-config.d.ts +102 -0
- package/dist/components/charts/chart-config.js +616 -0
- package/dist/components/charts/chart-styles.css +159 -0
- package/dist/components/checkbox-styles.css +125 -0
- package/dist/components/chip-styles.css +107 -0
- package/dist/components/column-styles.css +6 -0
- package/dist/components/commandpalette-styles.css +162 -0
- package/dist/components/datepicker-styles.css +1011 -0
- package/dist/components/divider-styles.css +56 -0
- package/dist/components/drawer-styles.css +83 -0
- package/dist/components/dropdown-styles.css +128 -0
- package/dist/components/fab-styles.css +61 -0
- package/dist/components/fileupload-styles.css +125 -0
- package/dist/components/grid-styles.css +6 -0
- package/dist/components/iconbutton-styles.css +146 -0
- package/dist/components/input-styles.css +436 -0
- package/dist/components/modal-styles.css +103 -0
- package/dist/components/multiselect-styles.css +202 -0
- package/dist/components/pagination-styles.css +63 -0
- package/dist/components/popover-styles.css +122 -0
- package/dist/components/progressbar-styles.css +106 -0
- package/dist/components/radio-styles.css +120 -0
- package/dist/components/rating-styles.css +68 -0
- package/dist/components/row-styles.css +6 -0
- package/dist/components/select-styles.css +218 -0
- package/dist/components/skeleton-styles.css +48 -0
- package/dist/components/slider-styles.css +85 -0
- package/dist/components/spinner-styles.css +52 -0
- package/dist/components/stepper-styles.css +93 -0
- package/dist/components/table-styles.css +114 -0
- package/dist/components/tabs-styles.css +74 -0
- package/dist/components/textarea-styles.css +224 -0
- package/dist/components/theme-base.css +64 -0
- package/dist/components/theme.css +440 -0
- package/dist/components/toast-styles.css +106 -0
- package/dist/components/toggle-styles.css +131 -0
- package/dist/components/tooltip-styles.css +56 -0
- package/dist/config.d.ts +1 -0
- package/dist/config.js +9 -0
- package/dist/config.svelte.d.ts +25 -0
- package/dist/config.svelte.js +41 -0
- package/dist/index.d.ts +52 -0
- package/dist/index.js +69 -0
- package/package.json +65 -0
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/* ===== BASE ===== */
|
|
2
|
+
.s-toast-container {
|
|
3
|
+
position: fixed;
|
|
4
|
+
z-index: 2000;
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
gap: 8px;
|
|
8
|
+
pointer-events: none;
|
|
9
|
+
}
|
|
10
|
+
.s-toast-container.toast-top-right { top: 20px; right: 20px; align-items: flex-end; }
|
|
11
|
+
.s-toast-container.toast-top-left { top: 20px; left: 20px; align-items: flex-start; }
|
|
12
|
+
.s-toast-container.toast-top-center { top: 20px; left: 50%; transform: translateX(-50%); align-items: center; }
|
|
13
|
+
.s-toast-container.toast-bottom-right { bottom: 20px; right: 20px; align-items: flex-end; flex-direction: column-reverse; }
|
|
14
|
+
.s-toast-container.toast-bottom-left { bottom: 20px; left: 20px; align-items: flex-start; flex-direction: column-reverse; }
|
|
15
|
+
.s-toast-container.toast-bottom-center { bottom: 20px; left: 50%; transform: translateX(-50%); align-items: center; flex-direction: column-reverse; }
|
|
16
|
+
|
|
17
|
+
.s-toast {
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: flex-start;
|
|
20
|
+
gap: 12px;
|
|
21
|
+
padding: 12px 16px;
|
|
22
|
+
border: var(--t-border-width) solid var(--t-border);
|
|
23
|
+
border-radius: var(--t-card-radius);
|
|
24
|
+
background: var(--t-surface);
|
|
25
|
+
color: var(--t-text);
|
|
26
|
+
font-size: 14px;
|
|
27
|
+
box-shadow: var(--t-shadow-lg);
|
|
28
|
+
pointer-events: auto;
|
|
29
|
+
max-width: 400px;
|
|
30
|
+
min-width: 280px;
|
|
31
|
+
position: relative;
|
|
32
|
+
overflow: hidden;
|
|
33
|
+
}
|
|
34
|
+
.s-toast-icon { flex-shrink: 0; font-size: 18px; line-height: 1.4; }
|
|
35
|
+
.s-toast-content { flex: 1; min-width: 0; }
|
|
36
|
+
.s-toast-title { font-weight: 600; margin-bottom: 2px; }
|
|
37
|
+
.s-toast-message { line-height: 1.4; color: var(--t-text-hint); font-size: 13px; }
|
|
38
|
+
.s-toast-close {
|
|
39
|
+
flex-shrink: 0;
|
|
40
|
+
background: none;
|
|
41
|
+
border: none;
|
|
42
|
+
cursor: pointer;
|
|
43
|
+
color: var(--t-text-muted);
|
|
44
|
+
font-size: 16px;
|
|
45
|
+
line-height: 1;
|
|
46
|
+
padding: 0;
|
|
47
|
+
transition: color 0.2s;
|
|
48
|
+
}
|
|
49
|
+
.s-toast-close:hover { color: var(--t-text); }
|
|
50
|
+
|
|
51
|
+
/* Toast progress bar (for auto-dismiss) */
|
|
52
|
+
.s-toast-progress {
|
|
53
|
+
position: absolute;
|
|
54
|
+
bottom: 0;
|
|
55
|
+
left: 0;
|
|
56
|
+
height: 3px;
|
|
57
|
+
background: var(--t-primary);
|
|
58
|
+
opacity: 0.3;
|
|
59
|
+
animation: toast-shrink linear forwards;
|
|
60
|
+
}
|
|
61
|
+
@keyframes toast-shrink {
|
|
62
|
+
from { width: 100%; }
|
|
63
|
+
to { width: 0%; }
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/* Variants */
|
|
67
|
+
.s-toast-info { border-color: #3b82f6; background: color-mix(in srgb, #3b82f6 8%, var(--t-surface)); }
|
|
68
|
+
.s-toast-success { border-color: #22c55e; background: color-mix(in srgb, #22c55e 8%, var(--t-surface)); }
|
|
69
|
+
.s-toast-warning { border-color: #eab308; background: color-mix(in srgb, #eab308 8%, var(--t-surface)); }
|
|
70
|
+
.s-toast-error { border-color: #ef4444; background: color-mix(in srgb, #ef4444 8%, var(--t-surface)); }
|
|
71
|
+
.s-toast-info .s-toast-progress { background: #3b82f6; }
|
|
72
|
+
.s-toast-success .s-toast-progress { background: #22c55e; }
|
|
73
|
+
.s-toast-warning .s-toast-progress { background: #eab308; }
|
|
74
|
+
.s-toast-error .s-toast-progress { background: #ef4444; }
|
|
75
|
+
|
|
76
|
+
/* ===== STYLE OVERRIDES ===== */
|
|
77
|
+
|
|
78
|
+
/* Brutalist */
|
|
79
|
+
.s-toast-brutalist { border: 3px solid var(--t-text); border-radius: 0; box-shadow: 4px 4px 0 var(--t-text); font-family: 'Courier New', monospace; }
|
|
80
|
+
|
|
81
|
+
/* Pixel */
|
|
82
|
+
.s-toast-pixel { border: 3px solid var(--t-primary); border-radius: 0; font-family: 'Courier New', monospace; }
|
|
83
|
+
|
|
84
|
+
/* Neon */
|
|
85
|
+
.s-toast-neon { border-color: var(--t-primary); box-shadow: 0 0 10px var(--t-primary), 0 0 30px var(--t-shadow); }
|
|
86
|
+
|
|
87
|
+
/* Metro */
|
|
88
|
+
.s-toast-metro { border-radius: 0; border: 2px solid var(--t-primary); border-left-width: 4px; font-weight: 600; box-shadow: none; }
|
|
89
|
+
|
|
90
|
+
/* Bootstrap */
|
|
91
|
+
.s-toast-bootstrap { border-radius: 6px; border: 1px solid var(--t-border); box-shadow: var(--t-shadow-md); }
|
|
92
|
+
|
|
93
|
+
/* Cartoon */
|
|
94
|
+
.s-toast-cartoon { border-radius: 16px; border: 3px solid var(--t-text); box-shadow: 5px 5px 0 var(--t-primary); font-weight: 700; }
|
|
95
|
+
|
|
96
|
+
/* Illustration */
|
|
97
|
+
.s-toast-illustration { border-radius: 8px; border: 2px solid var(--t-text); box-shadow: 3px 3px 0 var(--t-border); font-style: italic; }
|
|
98
|
+
|
|
99
|
+
/* Carbon */
|
|
100
|
+
.s-toast-carbon { border-radius: 0; border: 1px solid var(--t-border); border-left: 3px solid var(--t-primary); font-family: 'IBM Plex Sans', sans-serif; }
|
|
101
|
+
|
|
102
|
+
/* Liquid Glass */
|
|
103
|
+
.s-toast-liquid-glass { border-radius: 16px; backdrop-filter: blur(24px) saturate(1.6); background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); box-shadow: var(--t-shadow-lg), inset 0 1px 0 rgba(255,255,255,0.3); }
|
|
104
|
+
|
|
105
|
+
/* Legacy iOS */
|
|
106
|
+
.s-toast-legacy-ios { border-radius: 10px; border: 1px solid var(--t-border); background: linear-gradient(180deg, rgba(255,255,255,0.9) 0%, var(--t-surface) 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), var(--t-shadow-md); }
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/* ===== BASE ===== */
|
|
2
|
+
/* Style-controlled: track shape, thumb shape. Theme-controlled: colors, shadow. */
|
|
3
|
+
.s-toggle {
|
|
4
|
+
display: inline-flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
gap: 10px;
|
|
7
|
+
cursor: pointer;
|
|
8
|
+
user-select: none;
|
|
9
|
+
position: relative;
|
|
10
|
+
}
|
|
11
|
+
.s-toggle.disabled { opacity: 0.45; pointer-events: none; }
|
|
12
|
+
.s-toggle input {
|
|
13
|
+
position: absolute;
|
|
14
|
+
opacity: 0;
|
|
15
|
+
width: 1px;
|
|
16
|
+
height: 1px;
|
|
17
|
+
pointer-events: none;
|
|
18
|
+
}
|
|
19
|
+
.s-toggle-track {
|
|
20
|
+
width: 44px;
|
|
21
|
+
height: 24px;
|
|
22
|
+
border-radius: 12px;
|
|
23
|
+
background: var(--t-border);
|
|
24
|
+
position: relative;
|
|
25
|
+
transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
|
|
26
|
+
flex-shrink: 0;
|
|
27
|
+
}
|
|
28
|
+
.s-toggle.checked .s-toggle-track {
|
|
29
|
+
background: var(--t-primary);
|
|
30
|
+
}
|
|
31
|
+
.s-toggle-thumb {
|
|
32
|
+
width: 20px;
|
|
33
|
+
height: 20px;
|
|
34
|
+
border-radius: 50%;
|
|
35
|
+
background: #fff;
|
|
36
|
+
position: absolute;
|
|
37
|
+
top: 2px;
|
|
38
|
+
left: 2px;
|
|
39
|
+
transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
|
|
40
|
+
box-shadow: var(--t-shadow-sm);
|
|
41
|
+
}
|
|
42
|
+
.s-toggle.checked .s-toggle-thumb {
|
|
43
|
+
transform: translateX(20px);
|
|
44
|
+
}
|
|
45
|
+
.s-toggle-label { font-size: 14px; color: var(--t-text); }
|
|
46
|
+
|
|
47
|
+
/* ===== STYLE OVERRIDES ===== */
|
|
48
|
+
|
|
49
|
+
/* Brutalist */
|
|
50
|
+
.s-toggle-brutalist .s-toggle-track {
|
|
51
|
+
border-radius: 0;
|
|
52
|
+
border: var(--t-border-width) solid var(--t-text);
|
|
53
|
+
background: var(--t-surface);
|
|
54
|
+
box-shadow: 2px 2px 0 var(--t-text);
|
|
55
|
+
}
|
|
56
|
+
.s-toggle-brutalist .s-toggle-thumb { border-radius: 0; background: var(--t-text); }
|
|
57
|
+
.s-toggle-brutalist.checked .s-toggle-track { background: var(--t-primary); border-color: var(--t-text); }
|
|
58
|
+
|
|
59
|
+
/* Pixel */
|
|
60
|
+
.s-toggle-pixel .s-toggle-track {
|
|
61
|
+
border-radius: 0;
|
|
62
|
+
border: var(--t-border-width) solid var(--t-primary);
|
|
63
|
+
background: var(--t-surface);
|
|
64
|
+
}
|
|
65
|
+
.s-toggle-pixel .s-toggle-thumb { border-radius: 0; }
|
|
66
|
+
|
|
67
|
+
/* Neon */
|
|
68
|
+
.s-toggle-neon .s-toggle-track {
|
|
69
|
+
box-shadow: 0 0 4px var(--t-primary);
|
|
70
|
+
}
|
|
71
|
+
.s-toggle-neon.checked .s-toggle-track { box-shadow: 0 0 8px var(--t-primary), 0 0 16px var(--t-shadow); }
|
|
72
|
+
|
|
73
|
+
/* Metro */
|
|
74
|
+
.s-toggle-metro .s-toggle-track {
|
|
75
|
+
border-radius: 0;
|
|
76
|
+
border: var(--t-border-width) solid var(--t-primary);
|
|
77
|
+
background: var(--t-surface);
|
|
78
|
+
}
|
|
79
|
+
.s-toggle-metro .s-toggle-thumb { border-radius: 0; }
|
|
80
|
+
.s-toggle-metro.checked .s-toggle-track { background: var(--t-primary); }
|
|
81
|
+
|
|
82
|
+
/* Bootstrap */
|
|
83
|
+
.s-toggle-bootstrap .s-toggle-track {
|
|
84
|
+
border: var(--t-border-width) solid var(--t-border);
|
|
85
|
+
box-shadow: var(--t-shadow-xs);
|
|
86
|
+
}
|
|
87
|
+
.s-toggle-bootstrap.checked .s-toggle-track { box-shadow: 0 0 0 3px var(--t-shadow); }
|
|
88
|
+
|
|
89
|
+
/* Cartoon */
|
|
90
|
+
.s-toggle-cartoon .s-toggle-track {
|
|
91
|
+
border: var(--t-border-width) solid var(--t-text);
|
|
92
|
+
border-radius: 12px;
|
|
93
|
+
box-shadow: 3px 3px 0 var(--t-primary);
|
|
94
|
+
background: var(--t-surface);
|
|
95
|
+
}
|
|
96
|
+
.s-toggle-cartoon .s-toggle-thumb { border: 2px solid var(--t-text); }
|
|
97
|
+
|
|
98
|
+
/* Illustration */
|
|
99
|
+
.s-toggle-illustration .s-toggle-track {
|
|
100
|
+
border: var(--t-border-width) solid var(--t-text);
|
|
101
|
+
box-shadow: 2px 2px 0 var(--t-border);
|
|
102
|
+
background: var(--t-surface);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/* Carbon */
|
|
106
|
+
.s-toggle-carbon .s-toggle-track {
|
|
107
|
+
border-radius: 12px;
|
|
108
|
+
border: var(--t-border-width) solid var(--t-border);
|
|
109
|
+
border-bottom-width: 2px;
|
|
110
|
+
background: var(--t-surface);
|
|
111
|
+
}
|
|
112
|
+
.s-toggle-carbon.checked .s-toggle-track { border-color: var(--t-primary); background: var(--t-primary); }
|
|
113
|
+
|
|
114
|
+
/* Liquid Glass */
|
|
115
|
+
.s-toggle-liquid-glass .s-toggle-track {
|
|
116
|
+
backdrop-filter: blur(24px) saturate(1.6);
|
|
117
|
+
background: rgba(255,255,255,0.1);
|
|
118
|
+
border: 1px solid rgba(255,255,255,0.2);
|
|
119
|
+
box-shadow: var(--t-shadow-sm), inset 0 1px 0 rgba(255,255,255,0.3);
|
|
120
|
+
}
|
|
121
|
+
.s-toggle-liquid-glass.checked .s-toggle-track { background: color-mix(in srgb, var(--t-primary) 60%, transparent); }
|
|
122
|
+
|
|
123
|
+
/* Legacy iOS */
|
|
124
|
+
.s-toggle-legacy-ios .s-toggle-track {
|
|
125
|
+
border: var(--t-border-width) solid var(--t-border);
|
|
126
|
+
background: linear-gradient(180deg, rgba(255,255,255,0.8) 0%, var(--t-surface) 100%);
|
|
127
|
+
box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
|
|
128
|
+
}
|
|
129
|
+
.s-toggle-legacy-ios.checked .s-toggle-track {
|
|
130
|
+
background: linear-gradient(180deg, color-mix(in srgb, var(--t-primary) 80%, #fff) 0%, var(--t-primary) 100%);
|
|
131
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/* ===== BASE ===== */
|
|
2
|
+
/* Theme-controlled: colors, border-width, shadow. Style-controlled: shape. */
|
|
3
|
+
.s-tooltip-wrapper {
|
|
4
|
+
position: relative;
|
|
5
|
+
display: inline-flex;
|
|
6
|
+
}
|
|
7
|
+
.s-tooltip {
|
|
8
|
+
position: absolute;
|
|
9
|
+
bottom: calc(100% + 8px);
|
|
10
|
+
left: 50%;
|
|
11
|
+
transform: translateX(-50%);
|
|
12
|
+
padding: 6px 12px;
|
|
13
|
+
font-size: 12px;
|
|
14
|
+
white-space: nowrap;
|
|
15
|
+
background: var(--t-text);
|
|
16
|
+
color: var(--t-surface);
|
|
17
|
+
border-radius: var(--t-card-radius);
|
|
18
|
+
box-shadow: var(--t-shadow-md);
|
|
19
|
+
pointer-events: none;
|
|
20
|
+
opacity: 0;
|
|
21
|
+
transition: opacity 0.2s ease;
|
|
22
|
+
z-index: 100;
|
|
23
|
+
}
|
|
24
|
+
.s-tooltip-wrapper:hover .s-tooltip { opacity: 1; }
|
|
25
|
+
|
|
26
|
+
/* ===== STYLE OVERRIDES ===== */
|
|
27
|
+
|
|
28
|
+
/* Brutalist */
|
|
29
|
+
.s-tooltip-brutalist .s-tooltip { border-radius: 0; border: var(--t-border-width) solid var(--t-text); box-shadow: 3px 3px 0 var(--t-text); font-family: 'Courier New', monospace; }
|
|
30
|
+
|
|
31
|
+
/* Pixel */
|
|
32
|
+
.s-tooltip-pixel .s-tooltip { border-radius: 0; border: var(--t-border-width) solid var(--t-primary); font-family: 'Courier New', monospace; }
|
|
33
|
+
|
|
34
|
+
/* Neon */
|
|
35
|
+
.s-tooltip-neon .s-tooltip { box-shadow: 0 0 8px var(--t-primary); border: 1px solid var(--t-primary); }
|
|
36
|
+
|
|
37
|
+
/* Metro */
|
|
38
|
+
.s-tooltip-metro .s-tooltip { border-radius: 0; font-weight: 600; }
|
|
39
|
+
|
|
40
|
+
/* Bootstrap */
|
|
41
|
+
.s-tooltip-bootstrap .s-tooltip { border-radius: 4px; box-shadow: var(--t-shadow-md); }
|
|
42
|
+
|
|
43
|
+
/* Cartoon */
|
|
44
|
+
.s-tooltip-cartoon .s-tooltip { border-radius: 12px; border: var(--t-border-width) solid var(--t-text); box-shadow: 3px 3px 0 var(--t-primary); font-weight: 700; }
|
|
45
|
+
|
|
46
|
+
/* Illustration */
|
|
47
|
+
.s-tooltip-illustration .s-tooltip { border-radius: 6px; border: var(--t-border-width) solid var(--t-text); box-shadow: 2px 2px 0 var(--t-border); font-style: italic; }
|
|
48
|
+
|
|
49
|
+
/* Carbon */
|
|
50
|
+
.s-tooltip-carbon .s-tooltip { border-radius: 0; font-family: 'IBM Plex Sans', sans-serif; font-size: 11px; }
|
|
51
|
+
|
|
52
|
+
/* Liquid Glass */
|
|
53
|
+
.s-tooltip-liquid-glass .s-tooltip { border-radius: 12px; backdrop-filter: blur(16px); background: rgba(0,0,0,0.6); border: 1px solid rgba(255,255,255,0.2); }
|
|
54
|
+
|
|
55
|
+
/* Legacy iOS */
|
|
56
|
+
.s-tooltip-legacy-ios .s-tooltip { border-radius: 8px; background: rgba(0,0,0,0.75); box-shadow: var(--t-shadow-md); }
|
package/dist/config.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { defaults, initMultistyleUI, iconClass } from "./config.svelte.js";
|
package/dist/config.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Global default configuration for svelte-multistyle-ui.
|
|
3
|
+
*
|
|
4
|
+
* Import `initMultistyleUI` once in your app (e.g., in `+layout.svelte` or
|
|
5
|
+
* `App.svelte`) to set the default `style` and `theme` for every component.
|
|
6
|
+
* Per-component `style`/`theme` props still override these defaults.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export { defaults, initMultistyleUI, iconClass } from "./config.svelte.js";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Set the global default style, theme and/or mode for all components.
|
|
3
|
+
*
|
|
4
|
+
* @param {Object} [options]
|
|
5
|
+
* @param {string} [options.style="material"] - visual design system
|
|
6
|
+
* @param {string} [options.theme="default"] - color theme preset
|
|
7
|
+
* @param {string} [options.mode="system"] - color mode: "system", "light", or "dark"
|
|
8
|
+
*/
|
|
9
|
+
export function initMultistyleUI({ style, theme, mode }?: {
|
|
10
|
+
style?: string;
|
|
11
|
+
theme?: string;
|
|
12
|
+
mode?: string;
|
|
13
|
+
}): void;
|
|
14
|
+
export namespace defaults {
|
|
15
|
+
let style: string;
|
|
16
|
+
let theme: string;
|
|
17
|
+
let mode: string;
|
|
18
|
+
let systemDark: boolean;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Icon library class used to render icon names.
|
|
22
|
+
* Change this to match your icon library's CSS class
|
|
23
|
+
* (e.g., "material-icons", "fas", "fa-regular").
|
|
24
|
+
*/
|
|
25
|
+
export const iconClass: "material-symbols-outlined";
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reactive global defaults for svelte-multistyle-ui.
|
|
3
|
+
*
|
|
4
|
+
* These must live in a `.svelte.js` file so Svelte 5 runes work at module scope.
|
|
5
|
+
* Import through `config.js` for a clean public API.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Shared reactive default style/theme/mode. Mutate properties (do not reassign the
|
|
10
|
+
* object) so every component that reads `defaults.style` / `defaults.theme` /
|
|
11
|
+
* `defaults.mode` reacts to changes.
|
|
12
|
+
*/
|
|
13
|
+
export const defaults = $state({ style: "material", theme: "default", mode: "system", systemDark: false });
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Icon library class used to render icon names.
|
|
17
|
+
* Change this to match your icon library's CSS class
|
|
18
|
+
* (e.g., "material-icons", "fas", "fa-regular").
|
|
19
|
+
*/
|
|
20
|
+
export const iconClass = "material-symbols-outlined";
|
|
21
|
+
|
|
22
|
+
if (typeof window !== "undefined") {
|
|
23
|
+
defaults.systemDark = window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
24
|
+
const mq = window.matchMedia("(prefers-color-scheme: dark)");
|
|
25
|
+
mq.addEventListener("change", (e) => { defaults.systemDark = e.matches; });
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Set the global default style, theme and/or mode for all components.
|
|
30
|
+
*
|
|
31
|
+
* @param {Object} [options]
|
|
32
|
+
* @param {string} [options.style="material"] - visual design system
|
|
33
|
+
* @param {string} [options.theme="default"] - color theme preset
|
|
34
|
+
* @param {string} [options.mode="system"] - color mode: "system", "light", or "dark"
|
|
35
|
+
*/
|
|
36
|
+
export function initMultistyleUI({ style = "material", theme = "default", mode = "system" } = {}) {
|
|
37
|
+
defaults.style = style;
|
|
38
|
+
defaults.theme = theme;
|
|
39
|
+
defaults.mode = mode;
|
|
40
|
+
}
|
|
41
|
+
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export { initMultistyleUI } from "./config.js";
|
|
2
|
+
export { portal } from "./actions/portal.js";
|
|
3
|
+
export { default as Input } from "./components/Input.svelte";
|
|
4
|
+
export { default as Button } from "./components/Button.svelte";
|
|
5
|
+
export { default as IconButton } from "./components/IconButton.svelte";
|
|
6
|
+
export { default as Textarea } from "./components/Textarea.svelte";
|
|
7
|
+
export { default as Select } from "./components/Select.svelte";
|
|
8
|
+
export { default as MultiSelect } from "./components/MultiSelect.svelte";
|
|
9
|
+
export { default as Checkbox } from "./components/Checkbox.svelte";
|
|
10
|
+
export { default as Radio } from "./components/Radio.svelte";
|
|
11
|
+
export { default as Toggle } from "./components/Toggle.svelte";
|
|
12
|
+
export { default as Slider } from "./components/Slider.svelte";
|
|
13
|
+
export { default as FileUpload } from "./components/FileUpload.svelte";
|
|
14
|
+
export { default as DatePicker } from "./components/DatePicker.svelte";
|
|
15
|
+
export { default as DropdownMenu } from "./components/DropdownMenu.svelte";
|
|
16
|
+
export { default as Card } from "./components/Card.svelte";
|
|
17
|
+
export { default as Divider } from "./components/Divider.svelte";
|
|
18
|
+
export { default as Tabs } from "./components/Tabs.svelte";
|
|
19
|
+
export { default as Accordion } from "./components/Accordion.svelte";
|
|
20
|
+
export { default as Modal } from "./components/Modal.svelte";
|
|
21
|
+
export { default as Drawer } from "./components/Drawer.svelte";
|
|
22
|
+
export { default as CommandPalette } from "./components/CommandPalette.svelte";
|
|
23
|
+
export { default as Row } from "./components/Row.svelte";
|
|
24
|
+
export { default as Column } from "./components/Column.svelte";
|
|
25
|
+
export { default as Grid } from "./components/Grid.svelte";
|
|
26
|
+
export { default as Breadcrumb } from "./components/Breadcrumb.svelte";
|
|
27
|
+
export { default as Pagination } from "./components/Pagination.svelte";
|
|
28
|
+
export { default as Stepper } from "./components/Stepper.svelte";
|
|
29
|
+
export { default as Avatar } from "./components/Avatar.svelte";
|
|
30
|
+
export { default as Chip } from "./components/Chip.svelte";
|
|
31
|
+
export { default as Tooltip } from "./components/Tooltip.svelte";
|
|
32
|
+
export { default as ProgressBar } from "./components/ProgressBar.svelte";
|
|
33
|
+
export { default as Table } from "./components/Table.svelte";
|
|
34
|
+
export { default as Spinner } from "./components/Spinner.svelte";
|
|
35
|
+
export { default as Skeleton } from "./components/Skeleton.svelte";
|
|
36
|
+
export { default as ButtonGroup } from "./components/ButtonGroup.svelte";
|
|
37
|
+
export { default as Alert } from "./components/Alert.svelte";
|
|
38
|
+
export { default as Rating } from "./components/Rating.svelte";
|
|
39
|
+
export { default as Popover } from "./components/Popover.svelte";
|
|
40
|
+
export { default as Toast } from "./components/Toast.svelte";
|
|
41
|
+
export { default as BarChart } from "./components/charts/BarChart.svelte";
|
|
42
|
+
export { default as LineChart } from "./components/charts/LineChart.svelte";
|
|
43
|
+
export { default as PieChart } from "./components/charts/PieChart.svelte";
|
|
44
|
+
export { default as DoughnutChart } from "./components/charts/DoughnutChart.svelte";
|
|
45
|
+
export { default as RadarChart } from "./components/charts/RadarChart.svelte";
|
|
46
|
+
export { default as PolarAreaChart } from "./components/charts/PolarAreaChart.svelte";
|
|
47
|
+
export { default as ScatterChart } from "./components/charts/ScatterChart.svelte";
|
|
48
|
+
export { default as BubbleChart } from "./components/charts/BubbleChart.svelte";
|
|
49
|
+
export { default as StackedBarChart } from "./components/charts/StackedBarChart.svelte";
|
|
50
|
+
export { default as StackedLineChart } from "./components/charts/StackedLineChart.svelte";
|
|
51
|
+
export { default as ComboChart } from "./components/charts/ComboChart.svelte";
|
|
52
|
+
export { default as FAB } from "./components/FAB.svelte";
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
// Global configuration
|
|
2
|
+
export { initMultistyleUI } from "./config.js";
|
|
3
|
+
|
|
4
|
+
// Actions
|
|
5
|
+
export { portal } from "./actions/portal.js";
|
|
6
|
+
|
|
7
|
+
// Form Components
|
|
8
|
+
export { default as Input } from "./components/Input.svelte";
|
|
9
|
+
export { default as Button } from "./components/Button.svelte";
|
|
10
|
+
export { default as IconButton } from "./components/IconButton.svelte";
|
|
11
|
+
export { default as Textarea } from "./components/Textarea.svelte";
|
|
12
|
+
export { default as Select } from "./components/Select.svelte";
|
|
13
|
+
export { default as MultiSelect } from "./components/MultiSelect.svelte";
|
|
14
|
+
export { default as Checkbox } from "./components/Checkbox.svelte";
|
|
15
|
+
export { default as Radio } from "./components/Radio.svelte";
|
|
16
|
+
export { default as Toggle } from "./components/Toggle.svelte";
|
|
17
|
+
export { default as Slider } from "./components/Slider.svelte";
|
|
18
|
+
export { default as FileUpload } from "./components/FileUpload.svelte";
|
|
19
|
+
export { default as DatePicker } from "./components/DatePicker.svelte";
|
|
20
|
+
export { default as DropdownMenu } from "./components/DropdownMenu.svelte";
|
|
21
|
+
|
|
22
|
+
// Layout Components
|
|
23
|
+
export { default as Card } from "./components/Card.svelte";
|
|
24
|
+
export { default as Divider } from "./components/Divider.svelte";
|
|
25
|
+
export { default as Tabs } from "./components/Tabs.svelte";
|
|
26
|
+
export { default as Accordion } from "./components/Accordion.svelte";
|
|
27
|
+
export { default as Modal } from "./components/Modal.svelte";
|
|
28
|
+
export { default as Drawer } from "./components/Drawer.svelte";
|
|
29
|
+
export { default as CommandPalette } from "./components/CommandPalette.svelte";
|
|
30
|
+
export { default as Row } from "./components/Row.svelte";
|
|
31
|
+
export { default as Column } from "./components/Column.svelte";
|
|
32
|
+
export { default as Grid } from "./components/Grid.svelte";
|
|
33
|
+
|
|
34
|
+
// Navigation Components
|
|
35
|
+
export { default as Breadcrumb } from "./components/Breadcrumb.svelte";
|
|
36
|
+
export { default as Pagination } from "./components/Pagination.svelte";
|
|
37
|
+
export { default as Stepper } from "./components/Stepper.svelte";
|
|
38
|
+
|
|
39
|
+
// Data Display Components
|
|
40
|
+
export { default as Avatar } from "./components/Avatar.svelte";
|
|
41
|
+
export { default as Chip } from "./components/Chip.svelte";
|
|
42
|
+
export { default as Tooltip } from "./components/Tooltip.svelte";
|
|
43
|
+
export { default as ProgressBar } from "./components/ProgressBar.svelte";
|
|
44
|
+
export { default as Table } from "./components/Table.svelte";
|
|
45
|
+
export { default as Spinner } from "./components/Spinner.svelte";
|
|
46
|
+
export { default as Skeleton } from "./components/Skeleton.svelte";
|
|
47
|
+
export { default as ButtonGroup } from "./components/ButtonGroup.svelte";
|
|
48
|
+
|
|
49
|
+
// Feedback Components
|
|
50
|
+
export { default as Alert } from "./components/Alert.svelte";
|
|
51
|
+
export { default as Rating } from "./components/Rating.svelte";
|
|
52
|
+
export { default as Popover } from "./components/Popover.svelte";
|
|
53
|
+
export { default as Toast } from "./components/Toast.svelte";
|
|
54
|
+
|
|
55
|
+
// Chart Components
|
|
56
|
+
export { default as BarChart } from "./components/charts/BarChart.svelte";
|
|
57
|
+
export { default as LineChart } from "./components/charts/LineChart.svelte";
|
|
58
|
+
export { default as PieChart } from "./components/charts/PieChart.svelte";
|
|
59
|
+
export { default as DoughnutChart } from "./components/charts/DoughnutChart.svelte";
|
|
60
|
+
export { default as RadarChart } from "./components/charts/RadarChart.svelte";
|
|
61
|
+
export { default as PolarAreaChart } from "./components/charts/PolarAreaChart.svelte";
|
|
62
|
+
export { default as ScatterChart } from "./components/charts/ScatterChart.svelte";
|
|
63
|
+
export { default as BubbleChart } from "./components/charts/BubbleChart.svelte";
|
|
64
|
+
export { default as StackedBarChart } from "./components/charts/StackedBarChart.svelte";
|
|
65
|
+
export { default as StackedLineChart } from "./components/charts/StackedLineChart.svelte";
|
|
66
|
+
export { default as ComboChart } from "./components/charts/ComboChart.svelte";
|
|
67
|
+
|
|
68
|
+
// Advanced Components
|
|
69
|
+
export { default as FAB } from "./components/FAB.svelte";
|
package/package.json
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "svelte-multistyle-ui",
|
|
3
|
+
"version": "0.0.1-alpha",
|
|
4
|
+
"description": "A multi-style, multi-theme Svelte 5 component library with multiple design styles and multiple color schemes",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"svelte": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"svelte": "./dist/index.js",
|
|
13
|
+
"default": "./dist/index.js"
|
|
14
|
+
},
|
|
15
|
+
"./theme.css": "./dist/components/theme.css",
|
|
16
|
+
"./theme-base.css": "./dist/components/theme-base.css",
|
|
17
|
+
"./components/*": "./dist/components/*",
|
|
18
|
+
"./charts/*": "./dist/components/charts/*"
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"dist",
|
|
22
|
+
"!dist/**/*.test.*"
|
|
23
|
+
],
|
|
24
|
+
"scripts": {
|
|
25
|
+
"dev": "vite",
|
|
26
|
+
"build": "vite build",
|
|
27
|
+
"build:lib": "svelte-package -i src/lib",
|
|
28
|
+
"preview": "vite preview",
|
|
29
|
+
"prepublishOnly": "pnpm run build:lib",
|
|
30
|
+
"test": "playwright test",
|
|
31
|
+
"test:ui": "playwright test --ui",
|
|
32
|
+
"test:install": "playwright install --with-deps chromium webkit"
|
|
33
|
+
},
|
|
34
|
+
"peerDependencies": {
|
|
35
|
+
"chart.js": "^4.5.1",
|
|
36
|
+
"svelte": "^5.0.0"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@playwright/test": "^1.50.1",
|
|
40
|
+
"@sveltejs/package": "^2.5.7",
|
|
41
|
+
"@sveltejs/vite-plugin-svelte": "^7.0.0",
|
|
42
|
+
"@tailwindcss/vite": "^4.2.2",
|
|
43
|
+
"chart.js": "^4.5.1",
|
|
44
|
+
"svelte": "^5.55.4",
|
|
45
|
+
"tailwindcss": "^4.2.2",
|
|
46
|
+
"vite": "^8.0.9"
|
|
47
|
+
},
|
|
48
|
+
"keywords": [
|
|
49
|
+
"svelte",
|
|
50
|
+
"svelte5",
|
|
51
|
+
"components",
|
|
52
|
+
"ui-library",
|
|
53
|
+
"material-design",
|
|
54
|
+
"glassmorphism",
|
|
55
|
+
"neumorphism",
|
|
56
|
+
"brutalist",
|
|
57
|
+
"cyberpunk",
|
|
58
|
+
"multi-theme",
|
|
59
|
+
"multi-style"
|
|
60
|
+
],
|
|
61
|
+
"dependencies": {
|
|
62
|
+
"dayjs": "^1.11.21",
|
|
63
|
+
"prismjs": "^1.30.0"
|
|
64
|
+
}
|
|
65
|
+
}
|