svelte-multistyle-ui 0.0.6-alpha → 0.0.8-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/cli/bin.js +3 -0
- package/cli/emit.js +3 -5
- package/cli/fixtures/sample.expected.svelte +229 -56
- package/cli/fixtures/sample.yaml +254 -128
- package/cli/generate.js +438 -7
- package/dist/components/Accordion.svelte +3 -1
- package/dist/components/Accordion.svelte.d.ts +2 -0
- package/dist/components/Alert.svelte +5 -3
- package/dist/components/Alert.svelte.d.ts +4 -2
- package/dist/components/Avatar.svelte +3 -1
- package/dist/components/Avatar.svelte.d.ts +2 -0
- package/dist/components/Breadcrumb.svelte +3 -2
- package/dist/components/Breadcrumb.svelte.d.ts +2 -0
- package/dist/components/Button.svelte +3 -1
- package/dist/components/Button.svelte.d.ts +2 -0
- package/dist/components/ButtonGroup.svelte +3 -1
- package/dist/components/ButtonGroup.svelte.d.ts +2 -0
- package/dist/components/Card.svelte +2 -1
- package/dist/components/Carousel.svelte +3 -1
- package/dist/components/Carousel.svelte.d.ts +2 -0
- package/dist/components/Checkbox.svelte +3 -1
- package/dist/components/Checkbox.svelte.d.ts +2 -0
- package/dist/components/Chip.svelte +3 -1
- package/dist/components/Chip.svelte.d.ts +2 -0
- package/dist/components/Column.svelte +2 -1
- package/dist/components/CommandPalette.svelte +3 -1
- package/dist/components/CommandPalette.svelte.d.ts +2 -0
- package/dist/components/DatePicker.svelte +3 -1
- package/dist/components/DatePicker.svelte.d.ts +2 -0
- package/dist/components/Divider.svelte +3 -1
- package/dist/components/Divider.svelte.d.ts +2 -0
- package/dist/components/Drawer.svelte +3 -1
- package/dist/components/Drawer.svelte.d.ts +2 -0
- package/dist/components/DropdownMenu.svelte +3 -1
- package/dist/components/DropdownMenu.svelte.d.ts +2 -0
- package/dist/components/FAB.svelte +3 -1
- package/dist/components/FAB.svelte.d.ts +2 -0
- package/dist/components/FileUpload.svelte +3 -1
- package/dist/components/FileUpload.svelte.d.ts +2 -0
- package/dist/components/Grid.svelte +2 -1
- package/dist/components/IconButton.svelte +3 -1
- package/dist/components/IconButton.svelte.d.ts +2 -0
- package/dist/components/Input.svelte +3 -1
- package/dist/components/Input.svelte.d.ts +2 -0
- package/dist/components/Modal.svelte +3 -1
- package/dist/components/Modal.svelte.d.ts +2 -0
- package/dist/components/MultiSelect.svelte +3 -1
- package/dist/components/MultiSelect.svelte.d.ts +2 -0
- package/dist/components/Pagination.svelte +3 -1
- package/dist/components/Pagination.svelte.d.ts +2 -0
- package/dist/components/Popover.svelte +3 -1
- package/dist/components/Popover.svelte.d.ts +2 -0
- package/dist/components/ProgressBar.svelte +3 -1
- package/dist/components/ProgressBar.svelte.d.ts +2 -0
- package/dist/components/Radio.svelte +3 -1
- package/dist/components/Radio.svelte.d.ts +2 -0
- package/dist/components/Rating.svelte +3 -1
- package/dist/components/Rating.svelte.d.ts +2 -0
- package/dist/components/Row.svelte +2 -1
- package/dist/components/Select.svelte +3 -1
- package/dist/components/Select.svelte.d.ts +2 -0
- package/dist/components/Skeleton.svelte +3 -1
- package/dist/components/Skeleton.svelte.d.ts +2 -0
- package/dist/components/Slider.svelte +3 -1
- package/dist/components/Slider.svelte.d.ts +2 -0
- package/dist/components/SortableList.svelte +3 -1
- package/dist/components/SortableList.svelte.d.ts +2 -0
- package/dist/components/Spinner.svelte +3 -1
- package/dist/components/Spinner.svelte.d.ts +2 -0
- package/dist/components/Stepper.svelte +3 -1
- package/dist/components/Stepper.svelte.d.ts +2 -0
- package/dist/components/Table.svelte +3 -1
- package/dist/components/Table.svelte.d.ts +2 -0
- package/dist/components/Tabs.svelte +3 -1
- package/dist/components/Tabs.svelte.d.ts +2 -0
- package/dist/components/Textarea.svelte +3 -1
- package/dist/components/Textarea.svelte.d.ts +2 -0
- package/dist/components/Toast.svelte +7 -5
- package/dist/components/Toast.svelte.d.ts +2 -0
- package/dist/components/Toggle.svelte +3 -1
- package/dist/components/Toggle.svelte.d.ts +2 -0
- package/dist/components/Tooltip.svelte +3 -1
- package/dist/components/Tooltip.svelte.d.ts +2 -0
- package/dist/components/charts/BarChart.svelte +2 -2
- package/dist/components/charts/BarChart.svelte.d.ts +2 -0
- package/dist/components/charts/BubbleChart.svelte +2 -2
- package/dist/components/charts/BubbleChart.svelte.d.ts +2 -0
- package/dist/components/charts/Chart.svelte +3 -1
- package/dist/components/charts/Chart.svelte.d.ts +2 -0
- package/dist/components/charts/ComboChart.svelte +2 -2
- package/dist/components/charts/ComboChart.svelte.d.ts +2 -0
- package/dist/components/charts/DoughnutChart.svelte +2 -2
- package/dist/components/charts/DoughnutChart.svelte.d.ts +2 -0
- package/dist/components/charts/LineChart.svelte +2 -2
- package/dist/components/charts/LineChart.svelte.d.ts +2 -0
- package/dist/components/charts/PieChart.svelte +2 -2
- package/dist/components/charts/PieChart.svelte.d.ts +2 -0
- package/dist/components/charts/PolarAreaChart.svelte +2 -2
- package/dist/components/charts/PolarAreaChart.svelte.d.ts +2 -0
- package/dist/components/charts/RadarChart.svelte +2 -2
- package/dist/components/charts/RadarChart.svelte.d.ts +2 -0
- package/dist/components/charts/ScatterChart.svelte +2 -2
- package/dist/components/charts/ScatterChart.svelte.d.ts +2 -0
- package/dist/components/charts/StackedBarChart.svelte +2 -2
- package/dist/components/charts/StackedBarChart.svelte.d.ts +2 -0
- package/dist/components/charts/StackedLineChart.svelte +2 -2
- package/dist/components/charts/StackedLineChart.svelte.d.ts +2 -0
- package/dist/components/select-styles.css +6 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -0
- package/dist/utils/cn.d.ts +1 -0
- package/dist/utils/cn.js +9 -0
- package/package.json +4 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import Chart from "./Chart.svelte";
|
|
3
|
-
let { data, series, labels, title, height, legend, animated, options, style, theme, ...rest } = $props();
|
|
3
|
+
let { data, series, labels, title, height, legend, animated, options, style, theme, class: className = "", ...rest } = $props();
|
|
4
4
|
</script>
|
|
5
|
-
<Chart type="bar" {data} {series} {labels} {title} {height} {legend} {animated} {options} {style} {theme} {...rest} />
|
|
5
|
+
<Chart type="bar" {data} {series} {labels} {title} {height} {legend} {animated} {options} {style} {theme} class={className} {...rest} />
|
|
@@ -14,6 +14,7 @@ declare const BarChart: import("svelte").Component<{
|
|
|
14
14
|
options: any;
|
|
15
15
|
style: any;
|
|
16
16
|
theme: any;
|
|
17
|
+
class?: string;
|
|
17
18
|
} & Record<string, any>, {}, "">;
|
|
18
19
|
type $$ComponentProps = {
|
|
19
20
|
data: any;
|
|
@@ -26,4 +27,5 @@ type $$ComponentProps = {
|
|
|
26
27
|
options: any;
|
|
27
28
|
style: any;
|
|
28
29
|
theme: any;
|
|
30
|
+
class?: string;
|
|
29
31
|
} & Record<string, any>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import Chart from "./Chart.svelte";
|
|
3
|
-
let { data, series, labels, title, height, legend, animated, options, style, theme, ...rest } = $props();
|
|
3
|
+
let { data, series, labels, title, height, legend, animated, options, style, theme, class: className = "", ...rest } = $props();
|
|
4
4
|
</script>
|
|
5
|
-
<Chart type="bubble" {data} {series} {labels} {title} {height} {legend} {animated} {options} {style} {theme} {...rest} />
|
|
5
|
+
<Chart type="bubble" {data} {series} {labels} {title} {height} {legend} {animated} {options} {style} {theme} class={className} {...rest} />
|
|
@@ -14,6 +14,7 @@ declare const BubbleChart: import("svelte").Component<{
|
|
|
14
14
|
options: any;
|
|
15
15
|
style: any;
|
|
16
16
|
theme: any;
|
|
17
|
+
class?: string;
|
|
17
18
|
} & Record<string, any>, {}, "">;
|
|
18
19
|
type $$ComponentProps = {
|
|
19
20
|
data: any;
|
|
@@ -26,4 +27,5 @@ type $$ComponentProps = {
|
|
|
26
27
|
options: any;
|
|
27
28
|
style: any;
|
|
28
29
|
theme: any;
|
|
30
|
+
class?: string;
|
|
29
31
|
} & Record<string, any>;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { Chart as ChartJS } from "chart.js";
|
|
4
4
|
import "./chart-styles.css";
|
|
5
5
|
import { defaults } from "../../config.js";
|
|
6
|
+
import { cn } from "../../utils/cn.js";
|
|
6
7
|
import { buildData, buildOptions, readTokens } from "./chart-config.js";
|
|
7
8
|
|
|
8
9
|
let {
|
|
@@ -20,6 +21,7 @@
|
|
|
20
21
|
yAxisLabel = "",
|
|
21
22
|
style: styleProp,
|
|
22
23
|
theme: themeProp,
|
|
24
|
+
class: className = "",
|
|
23
25
|
...rest
|
|
24
26
|
} = $props();
|
|
25
27
|
|
|
@@ -219,7 +221,7 @@
|
|
|
219
221
|
</script>
|
|
220
222
|
|
|
221
223
|
<div
|
|
222
|
-
class="s-chart
|
|
224
|
+
class={cn("s-chart", styleClass, themeClass, typeClass, downloadable ? "s-chart-downloadable" : "", className)}
|
|
223
225
|
style="height:{heightStyle}"
|
|
224
226
|
{...rest}
|
|
225
227
|
>
|
|
@@ -18,6 +18,7 @@ declare const Chart: import("svelte").Component<{
|
|
|
18
18
|
yAxisLabel?: string;
|
|
19
19
|
style: any;
|
|
20
20
|
theme: any;
|
|
21
|
+
class?: string;
|
|
21
22
|
} & Record<string, any>, {}, "">;
|
|
22
23
|
type $$ComponentProps = {
|
|
23
24
|
type: any;
|
|
@@ -34,4 +35,5 @@ type $$ComponentProps = {
|
|
|
34
35
|
yAxisLabel?: string;
|
|
35
36
|
style: any;
|
|
36
37
|
theme: any;
|
|
38
|
+
class?: string;
|
|
37
39
|
} & Record<string, any>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import Chart from "./Chart.svelte";
|
|
3
|
-
let { data, series, labels, title, height, legend, animated, options, style, theme, ...rest } = $props();
|
|
3
|
+
let { data, series, labels, title, height, legend, animated, options, style, theme, class: className = "", ...rest } = $props();
|
|
4
4
|
</script>
|
|
5
|
-
<Chart type="combo" {data} {series} {labels} {title} {height} {legend} {animated} {options} {style} {theme} {...rest} />
|
|
5
|
+
<Chart type="combo" {data} {series} {labels} {title} {height} {legend} {animated} {options} {style} {theme} class={className} {...rest} />
|
|
@@ -14,6 +14,7 @@ declare const ComboChart: import("svelte").Component<{
|
|
|
14
14
|
options: any;
|
|
15
15
|
style: any;
|
|
16
16
|
theme: any;
|
|
17
|
+
class?: string;
|
|
17
18
|
} & Record<string, any>, {}, "">;
|
|
18
19
|
type $$ComponentProps = {
|
|
19
20
|
data: any;
|
|
@@ -26,4 +27,5 @@ type $$ComponentProps = {
|
|
|
26
27
|
options: any;
|
|
27
28
|
style: any;
|
|
28
29
|
theme: any;
|
|
30
|
+
class?: string;
|
|
29
31
|
} & Record<string, any>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import Chart from "./Chart.svelte";
|
|
3
|
-
let { data, series, labels, title, height, legend, animated, options, style, theme, ...rest } = $props();
|
|
3
|
+
let { data, series, labels, title, height, legend, animated, options, style, theme, class: className = "", ...rest } = $props();
|
|
4
4
|
</script>
|
|
5
|
-
<Chart type="doughnut" {data} {series} {labels} {title} {height} {legend} {animated} {options} {style} {theme} {...rest} />
|
|
5
|
+
<Chart type="doughnut" {data} {series} {labels} {title} {height} {legend} {animated} {options} {style} {theme} class={className} {...rest} />
|
|
@@ -14,6 +14,7 @@ declare const DoughnutChart: import("svelte").Component<{
|
|
|
14
14
|
options: any;
|
|
15
15
|
style: any;
|
|
16
16
|
theme: any;
|
|
17
|
+
class?: string;
|
|
17
18
|
} & Record<string, any>, {}, "">;
|
|
18
19
|
type $$ComponentProps = {
|
|
19
20
|
data: any;
|
|
@@ -26,4 +27,5 @@ type $$ComponentProps = {
|
|
|
26
27
|
options: any;
|
|
27
28
|
style: any;
|
|
28
29
|
theme: any;
|
|
30
|
+
class?: string;
|
|
29
31
|
} & Record<string, any>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import Chart from "./Chart.svelte";
|
|
3
|
-
let { data, series, labels, title, height, legend, animated, options, style, theme, ...rest } = $props();
|
|
3
|
+
let { data, series, labels, title, height, legend, animated, options, style, theme, class: className = "", ...rest } = $props();
|
|
4
4
|
</script>
|
|
5
|
-
<Chart type="line" {data} {series} {labels} {title} {height} {legend} {animated} {options} {style} {theme} {...rest} />
|
|
5
|
+
<Chart type="line" {data} {series} {labels} {title} {height} {legend} {animated} {options} {style} {theme} class={className} {...rest} />
|
|
@@ -14,6 +14,7 @@ declare const LineChart: import("svelte").Component<{
|
|
|
14
14
|
options: any;
|
|
15
15
|
style: any;
|
|
16
16
|
theme: any;
|
|
17
|
+
class?: string;
|
|
17
18
|
} & Record<string, any>, {}, "">;
|
|
18
19
|
type $$ComponentProps = {
|
|
19
20
|
data: any;
|
|
@@ -26,4 +27,5 @@ type $$ComponentProps = {
|
|
|
26
27
|
options: any;
|
|
27
28
|
style: any;
|
|
28
29
|
theme: any;
|
|
30
|
+
class?: string;
|
|
29
31
|
} & Record<string, any>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import Chart from "./Chart.svelte";
|
|
3
|
-
let { data, series, labels, title, height, legend, animated, options, style, theme, ...rest } = $props();
|
|
3
|
+
let { data, series, labels, title, height, legend, animated, options, style, theme, class: className = "", ...rest } = $props();
|
|
4
4
|
</script>
|
|
5
|
-
<Chart type="pie" {data} {series} {labels} {title} {height} {legend} {animated} {options} {style} {theme} {...rest} />
|
|
5
|
+
<Chart type="pie" {data} {series} {labels} {title} {height} {legend} {animated} {options} {style} {theme} class={className} {...rest} />
|
|
@@ -14,6 +14,7 @@ declare const PieChart: import("svelte").Component<{
|
|
|
14
14
|
options: any;
|
|
15
15
|
style: any;
|
|
16
16
|
theme: any;
|
|
17
|
+
class?: string;
|
|
17
18
|
} & Record<string, any>, {}, "">;
|
|
18
19
|
type $$ComponentProps = {
|
|
19
20
|
data: any;
|
|
@@ -26,4 +27,5 @@ type $$ComponentProps = {
|
|
|
26
27
|
options: any;
|
|
27
28
|
style: any;
|
|
28
29
|
theme: any;
|
|
30
|
+
class?: string;
|
|
29
31
|
} & Record<string, any>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import Chart from "./Chart.svelte";
|
|
3
|
-
let { data, series, labels, title, height, legend, animated, options, style, theme, ...rest } = $props();
|
|
3
|
+
let { data, series, labels, title, height, legend, animated, options, style, theme, class: className = "", ...rest } = $props();
|
|
4
4
|
</script>
|
|
5
|
-
<Chart type="polarArea" {data} {series} {labels} {title} {height} {legend} {animated} {options} {style} {theme} {...rest} />
|
|
5
|
+
<Chart type="polarArea" {data} {series} {labels} {title} {height} {legend} {animated} {options} {style} {theme} class={className} {...rest} />
|
|
@@ -14,6 +14,7 @@ declare const PolarAreaChart: import("svelte").Component<{
|
|
|
14
14
|
options: any;
|
|
15
15
|
style: any;
|
|
16
16
|
theme: any;
|
|
17
|
+
class?: string;
|
|
17
18
|
} & Record<string, any>, {}, "">;
|
|
18
19
|
type $$ComponentProps = {
|
|
19
20
|
data: any;
|
|
@@ -26,4 +27,5 @@ type $$ComponentProps = {
|
|
|
26
27
|
options: any;
|
|
27
28
|
style: any;
|
|
28
29
|
theme: any;
|
|
30
|
+
class?: string;
|
|
29
31
|
} & Record<string, any>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import Chart from "./Chart.svelte";
|
|
3
|
-
let { data, series, labels, title, height, legend, animated, options, style, theme, ...rest } = $props();
|
|
3
|
+
let { data, series, labels, title, height, legend, animated, options, style, theme, class: className = "", ...rest } = $props();
|
|
4
4
|
</script>
|
|
5
|
-
<Chart type="radar" {data} {series} {labels} {title} {height} {legend} {animated} {options} {style} {theme} {...rest} />
|
|
5
|
+
<Chart type="radar" {data} {series} {labels} {title} {height} {legend} {animated} {options} {style} {theme} class={className} {...rest} />
|
|
@@ -14,6 +14,7 @@ declare const RadarChart: import("svelte").Component<{
|
|
|
14
14
|
options: any;
|
|
15
15
|
style: any;
|
|
16
16
|
theme: any;
|
|
17
|
+
class?: string;
|
|
17
18
|
} & Record<string, any>, {}, "">;
|
|
18
19
|
type $$ComponentProps = {
|
|
19
20
|
data: any;
|
|
@@ -26,4 +27,5 @@ type $$ComponentProps = {
|
|
|
26
27
|
options: any;
|
|
27
28
|
style: any;
|
|
28
29
|
theme: any;
|
|
30
|
+
class?: string;
|
|
29
31
|
} & Record<string, any>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import Chart from "./Chart.svelte";
|
|
3
|
-
let { data, series, labels, title, height, legend, animated, options, style, theme, ...rest } = $props();
|
|
3
|
+
let { data, series, labels, title, height, legend, animated, options, style, theme, class: className = "", ...rest } = $props();
|
|
4
4
|
</script>
|
|
5
|
-
<Chart type="scatter" {data} {series} {labels} {title} {height} {legend} {animated} {options} {style} {theme} {...rest} />
|
|
5
|
+
<Chart type="scatter" {data} {series} {labels} {title} {height} {legend} {animated} {options} {style} {theme} class={className} {...rest} />
|
|
@@ -14,6 +14,7 @@ declare const ScatterChart: import("svelte").Component<{
|
|
|
14
14
|
options: any;
|
|
15
15
|
style: any;
|
|
16
16
|
theme: any;
|
|
17
|
+
class?: string;
|
|
17
18
|
} & Record<string, any>, {}, "">;
|
|
18
19
|
type $$ComponentProps = {
|
|
19
20
|
data: any;
|
|
@@ -26,4 +27,5 @@ type $$ComponentProps = {
|
|
|
26
27
|
options: any;
|
|
27
28
|
style: any;
|
|
28
29
|
theme: any;
|
|
30
|
+
class?: string;
|
|
29
31
|
} & Record<string, any>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import Chart from "./Chart.svelte";
|
|
3
|
-
let { data, series, labels, title, height, legend, animated, options: userOpts = {}, style, theme, ...rest } = $props();
|
|
3
|
+
let { data, series, labels, title, height, legend, animated, options: userOpts = {}, style, theme, class: className = "", ...rest } = $props();
|
|
4
4
|
// Merge user options over the stacked defaults so users can override
|
|
5
5
|
let mergedOptions = $derived.by(() => {
|
|
6
6
|
const base = {
|
|
@@ -15,4 +15,4 @@
|
|
|
15
15
|
return base;
|
|
16
16
|
});
|
|
17
17
|
</script>
|
|
18
|
-
<Chart type="bar" {data} {series} {labels} {title} {height} {legend} {animated} options={mergedOptions} {style} {theme} {...rest} />
|
|
18
|
+
<Chart type="bar" {data} {series} {labels} {title} {height} {legend} {animated} options={mergedOptions} {style} {theme} class={className} {...rest} />
|
|
@@ -14,6 +14,7 @@ declare const StackedBarChart: import("svelte").Component<{
|
|
|
14
14
|
options?: Record<string, any>;
|
|
15
15
|
style: any;
|
|
16
16
|
theme: any;
|
|
17
|
+
class?: string;
|
|
17
18
|
} & Record<string, any>, {}, "">;
|
|
18
19
|
type $$ComponentProps = {
|
|
19
20
|
data: any;
|
|
@@ -26,4 +27,5 @@ type $$ComponentProps = {
|
|
|
26
27
|
options?: Record<string, any>;
|
|
27
28
|
style: any;
|
|
28
29
|
theme: any;
|
|
30
|
+
class?: string;
|
|
29
31
|
} & Record<string, any>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import Chart from "./Chart.svelte";
|
|
3
|
-
let { data, series, labels, title, height, legend, animated, options: userOpts = {}, style, theme, ...rest } = $props();
|
|
3
|
+
let { data, series, labels, title, height, legend, animated, options: userOpts = {}, style, theme, class: className = "", ...rest } = $props();
|
|
4
4
|
// Merge user options over the stacked defaults so users can override
|
|
5
5
|
let mergedOptions = $derived.by(() => {
|
|
6
6
|
const base = {
|
|
@@ -18,4 +18,4 @@
|
|
|
18
18
|
return base;
|
|
19
19
|
});
|
|
20
20
|
</script>
|
|
21
|
-
<Chart type="line" {data} {series} {labels} {title} {height} {legend} {animated} options={mergedOptions} {style} {theme} {...rest} />
|
|
21
|
+
<Chart type="line" {data} {series} {labels} {title} {height} {legend} {animated} options={mergedOptions} {style} {theme} class={className} {...rest} />
|
|
@@ -14,6 +14,7 @@ declare const StackedLineChart: import("svelte").Component<{
|
|
|
14
14
|
options?: Record<string, any>;
|
|
15
15
|
style: any;
|
|
16
16
|
theme: any;
|
|
17
|
+
class?: string;
|
|
17
18
|
} & Record<string, any>, {}, "">;
|
|
18
19
|
type $$ComponentProps = {
|
|
19
20
|
data: any;
|
|
@@ -26,4 +27,5 @@ type $$ComponentProps = {
|
|
|
26
27
|
options?: Record<string, any>;
|
|
27
28
|
style: any;
|
|
28
29
|
theme: any;
|
|
30
|
+
class?: string;
|
|
29
31
|
} & Record<string, any>;
|
|
@@ -237,9 +237,14 @@
|
|
|
237
237
|
box-shadow: var(--t-shadow-md), inset 0 1px 0 rgba(255,255,255,0.3);
|
|
238
238
|
}
|
|
239
239
|
.s-select-liquid-glass select {
|
|
240
|
-
background:
|
|
240
|
+
background: rgba(255,255,255,0.15);
|
|
241
241
|
border: none;
|
|
242
242
|
border-radius: 16px;
|
|
243
|
+
color: #ffffff;
|
|
244
|
+
}
|
|
245
|
+
.s-select-liquid-glass option {
|
|
246
|
+
background: rgba(255,255,255,0.2);
|
|
247
|
+
color: #ffffff;
|
|
243
248
|
}
|
|
244
249
|
.s-select-liquid-glass.focused {
|
|
245
250
|
border-color: var(--t-primary);
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { initMultistyleUI } from "./config.js";
|
|
2
2
|
export { portal } from "./actions/portal.js";
|
|
3
|
+
export { cn } from "./utils/cn.js";
|
|
3
4
|
export { default as SortableList } from "./components/SortableList.svelte";
|
|
4
5
|
export { default as Input } from "./components/Input.svelte";
|
|
5
6
|
export { default as Button } from "./components/Button.svelte";
|
package/dist/index.js
CHANGED
|
@@ -7,6 +7,9 @@ export { themes, generateThemeCss, resolveLight, resolveDark, applyThemeToElemen
|
|
|
7
7
|
// Actions
|
|
8
8
|
export { portal } from "./actions/portal.js";
|
|
9
9
|
|
|
10
|
+
// Class merge helper (tailwind-merge backed) for overriding component classes
|
|
11
|
+
export { cn } from "./utils/cn.js";
|
|
12
|
+
|
|
10
13
|
// Form Components
|
|
11
14
|
export { default as SortableList } from "./components/SortableList.svelte";
|
|
12
15
|
export { default as Input } from "./components/Input.svelte";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function cn(...inputs: any[]): string;
|
package/dist/utils/cn.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { twMerge } from "tailwind-merge";
|
|
2
|
+
|
|
3
|
+
// Merge component-internal classes with a caller-supplied `class` prop.
|
|
4
|
+
// tailwind-merge dedupes conflicting Tailwind utilities (last wins) and
|
|
5
|
+
// leaves non-Tailwind classes (s-button, theme-default, btn-filled, ...) as-is,
|
|
6
|
+
// so caller overrides only what they actually target.
|
|
7
|
+
export function cn(...inputs) {
|
|
8
|
+
return twMerge(inputs.filter(Boolean).join(" "));
|
|
9
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svelte-multistyle-ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8-alpha",
|
|
4
4
|
"description": "A multi-style, multi-theme Svelte 5 component library with multiple design styles and multiple color schemes",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"build": "vite build && node scripts/rename-bundle.js",
|
|
34
34
|
"gen:theme": "node scripts/gen-theme.js",
|
|
35
35
|
"gen": "node cli/bin.js generate",
|
|
36
|
-
"gen:sample": "node cli/bin.js generate --input cli/fixtures/sample.yaml --output ./src/routes/demo.svelte
|
|
36
|
+
"gen:sample": "node cli/bin.js generate --input cli/fixtures/sample.yaml --output ./src/routes/demo/+page.svelte",
|
|
37
37
|
"test:gen": "node cli/test.js",
|
|
38
38
|
"build:lib": "node -e \"const p=require('./package.json');const m=p.version.match(/^(\\d+\\.\\d+\\.)(\\d+)(.*)$/);p.version=m[1]+(parseInt(m[2])+1)+(m[3]||'');require('fs').writeFileSync('package.json',JSON.stringify(p,null,2)+'\\n')\" && pnpm run gen:theme && svelte-package -i src/lib",
|
|
39
39
|
"preview": "vite preview",
|
|
@@ -75,6 +75,7 @@
|
|
|
75
75
|
"@thisux/sveltednd": "^0.4.1",
|
|
76
76
|
"dayjs": "^1.11.21",
|
|
77
77
|
"js-yaml": "^4.1.0",
|
|
78
|
-
"prismjs": "^1.30.0"
|
|
78
|
+
"prismjs": "^1.30.0",
|
|
79
|
+
"tailwind-merge": "^3.6.0"
|
|
79
80
|
}
|
|
80
81
|
}
|