kosui 0.0.27 → 0.0.29
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/alert/alert.svelte +174 -19
- package/dist/alert/alert.svelte.d.ts +26 -3
- package/dist/alert/index.d.ts +1 -1
- package/dist/alert/index.js +1 -1
- package/dist/autocomplete/autocomplete-content.svelte +2 -2
- package/dist/autocomplete/autocomplete-content.svelte.d.ts +2 -2
- package/dist/autocomplete/autocomplete-item.svelte +3 -3
- package/dist/autocomplete/autocomplete-item.svelte.d.ts +3 -3
- package/dist/autocomplete/autocomplete.svelte +2 -2
- package/dist/autocomplete/autocomplete.svelte.d.ts +2 -2
- package/dist/base.d.ts +3 -3
- package/dist/base.js +3 -2
- package/dist/box/box.svelte +2 -2
- package/dist/box/box.svelte.d.ts +2 -2
- package/dist/breadcrumbs/breadcrumbs.svelte +1 -1
- package/dist/breadcrumbs/breadcrumbs.svelte.d.ts +1 -1
- package/dist/button/button.svelte +3 -3
- package/dist/button/button.svelte.d.ts +3 -3
- package/dist/chip/chip.svelte +1 -1
- package/dist/chip/chip.svelte.d.ts +1 -1
- package/dist/command/action.svelte.d.ts +1 -1
- package/dist/command/action.svelte.js +0 -1
- package/dist/command/command-content.svelte +2 -2
- package/dist/command/command-content.svelte.d.ts +2 -2
- package/dist/command/command-input.svelte +2 -2
- package/dist/command/command-input.svelte.d.ts +2 -2
- package/dist/command/command-item.svelte +3 -3
- package/dist/command/command-item.svelte.d.ts +3 -3
- package/dist/command/command.svelte +2 -2
- package/dist/command/command.svelte.d.ts +2 -2
- package/dist/common/divider.svelte +2 -2
- package/dist/common/divider.svelte.d.ts +2 -2
- package/dist/common/header.svelte +3 -3
- package/dist/common/header.svelte.d.ts +3 -3
- package/dist/dialog/dialog-button.svelte +1 -1
- package/dist/dialog/dialog-button.svelte.d.ts +1 -1
- package/dist/dialog/dialog.svelte +2 -2
- package/dist/dialog/dialog.svelte.d.ts +2 -2
- package/dist/dialog/dialoguer-context.svelte.d.ts +3 -3
- package/dist/dialog/dialoguer-context.svelte.js +0 -3
- package/dist/dialog/dialoguer.svelte +1 -1
- package/dist/dialog/dialoguer.svelte.d.ts +1 -1
- package/dist/fab/fab.svelte +1 -1
- package/dist/fab/fab.svelte.d.ts +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/input/input.svelte +1 -1
- package/dist/input/input.svelte.d.ts +4 -4
- package/dist/link/link.svelte +1 -1
- package/dist/link/link.svelte.d.ts +1 -1
- package/dist/markdown/markdown-blockquote.svelte +3 -3
- package/dist/markdown/markdown-blockquote.svelte.d.ts +3 -3
- package/dist/markdown/markdown-br.svelte +3 -3
- package/dist/markdown/markdown-br.svelte.d.ts +3 -3
- package/dist/markdown/markdown-code.svelte +3 -3
- package/dist/markdown/markdown-code.svelte.d.ts +3 -3
- package/dist/markdown/markdown-codespan.svelte +3 -3
- package/dist/markdown/markdown-codespan.svelte.d.ts +3 -3
- package/dist/markdown/markdown-context.svelte.d.ts +1 -1
- package/dist/markdown/markdown-context.svelte.js +0 -1
- package/dist/markdown/markdown-def.svelte +3 -3
- package/dist/markdown/markdown-def.svelte.d.ts +3 -3
- package/dist/markdown/markdown-del.svelte +3 -3
- package/dist/markdown/markdown-del.svelte.d.ts +3 -3
- package/dist/markdown/markdown-em.svelte +3 -3
- package/dist/markdown/markdown-em.svelte.d.ts +3 -3
- package/dist/markdown/markdown-escape.svelte +2 -2
- package/dist/markdown/markdown-escape.svelte.d.ts +2 -2
- package/dist/markdown/markdown-heading.svelte +3 -3
- package/dist/markdown/markdown-heading.svelte.d.ts +3 -3
- package/dist/markdown/markdown-hr.svelte +3 -3
- package/dist/markdown/markdown-hr.svelte.d.ts +3 -3
- package/dist/markdown/markdown-html.svelte +2 -2
- package/dist/markdown/markdown-html.svelte.d.ts +2 -2
- package/dist/markdown/markdown-image.svelte +3 -3
- package/dist/markdown/markdown-image.svelte.d.ts +3 -3
- package/dist/markdown/markdown-link.svelte +3 -3
- package/dist/markdown/markdown-link.svelte.d.ts +3 -3
- package/dist/markdown/markdown-list-item.svelte +3 -3
- package/dist/markdown/markdown-list-item.svelte.d.ts +3 -3
- package/dist/markdown/markdown-list.svelte +3 -3
- package/dist/markdown/markdown-list.svelte.d.ts +3 -3
- package/dist/markdown/markdown-paragraph.svelte +3 -3
- package/dist/markdown/markdown-paragraph.svelte.d.ts +3 -3
- package/dist/markdown/markdown-space.svelte +2 -2
- package/dist/markdown/markdown-space.svelte.d.ts +2 -2
- package/dist/markdown/markdown-strong.svelte +3 -3
- package/dist/markdown/markdown-strong.svelte.d.ts +3 -3
- package/dist/markdown/markdown-table-cell.svelte +3 -6
- package/dist/markdown/markdown-table-cell.svelte.d.ts +3 -3
- package/dist/markdown/markdown-table.svelte +2 -2
- package/dist/markdown/markdown-table.svelte.d.ts +2 -2
- package/dist/markdown/markdown-text.svelte +2 -2
- package/dist/markdown/markdown-text.svelte.d.ts +2 -2
- package/dist/markdown/markdown-token.svelte +1 -1
- package/dist/markdown/markdown-token.svelte.d.ts +1 -1
- package/dist/markdown/markdown-tokens.svelte +1 -1
- package/dist/markdown/markdown-tokens.svelte.d.ts +1 -1
- package/dist/markdown/markdown.svelte +1 -1
- package/dist/markdown/markdown.svelte.d.ts +1 -1
- package/dist/menu/menu-actions.svelte +1 -1
- package/dist/menu/menu-actions.svelte.d.ts +1 -1
- package/dist/menu/menu-content.svelte +2 -2
- package/dist/menu/menu-content.svelte.d.ts +2 -2
- package/dist/menu/menu-item.svelte +3 -3
- package/dist/menu/menu-item.svelte.d.ts +3 -3
- package/dist/menu/menu-trigger.svelte +4 -4
- package/dist/menu/menu-trigger.svelte.d.ts +4 -4
- package/dist/menu/menu.svelte +2 -2
- package/dist/menu/menu.svelte.d.ts +2 -2
- package/dist/modal/modal.svelte +3 -3
- package/dist/modal/modal.svelte.d.ts +3 -3
- package/dist/popover/popover.svelte +2 -2
- package/dist/popover/popover.svelte.d.ts +2 -2
- package/dist/portal/proxy.svelte +1 -1
- package/dist/portal/proxy.svelte.d.ts +1 -1
- package/dist/progress/circular-progress.svelte +1 -1
- package/dist/progress/circular-progress.svelte.d.ts +1 -1
- package/dist/shortcut/shortcut-badge.svelte +2 -2
- package/dist/shortcut/shortcut-badge.svelte.d.ts +2 -2
- package/dist/shortcut/shortcut.d.ts +2 -0
- package/dist/shortcut/shortcut.js +2 -0
- package/dist/skeleton/skeleton.svelte +1 -1
- package/dist/skeleton/skeleton.svelte.d.ts +1 -1
- package/dist/slider/index.d.ts +8 -0
- package/dist/slider/index.js +8 -0
- package/dist/slider/slider-context.svelte.d.ts +50 -0
- package/dist/slider/slider-context.svelte.js +198 -0
- package/dist/slider/slider-handle-label-arrow.svelte +18 -0
- package/dist/slider/slider-handle-label-arrow.svelte.d.ts +6 -0
- package/dist/slider/slider-handle-label.svelte +35 -0
- package/dist/slider/slider-handle-label.svelte.d.ts +6 -0
- package/dist/slider/slider-handle.svelte +54 -0
- package/dist/slider/slider-handle.svelte.d.ts +6 -0
- package/dist/slider/slider-mark-dot.svelte +25 -0
- package/dist/slider/slider-mark-dot.svelte.d.ts +6 -0
- package/dist/slider/slider-mark-label.svelte +37 -0
- package/dist/slider/slider-mark-label.svelte.d.ts +9 -0
- package/dist/slider/slider-mark.svelte +33 -0
- package/dist/slider/slider-mark.svelte.d.ts +9 -0
- package/dist/slider/slider.svelte +249 -0
- package/dist/slider/slider.svelte.d.ts +41 -0
- package/dist/switch/switch-thumb.svelte +2 -2
- package/dist/switch/switch-thumb.svelte.d.ts +2 -2
- package/dist/switch/switch.svelte +3 -3
- package/dist/switch/switch.svelte.d.ts +6 -6
- package/dist/textarea/textarea.svelte +2 -2
- package/dist/textarea/textarea.svelte.d.ts +5 -5
- package/dist/toggle/toggle-button.svelte +3 -3
- package/dist/toggle/toggle-button.svelte.d.ts +3 -3
- package/dist/toggle/toggle-group.svelte +2 -2
- package/dist/toggle/toggle-group.svelte.d.ts +2 -2
- package/dist/tooltip/tooltip.svelte +6 -5
- package/dist/tooltip/tooltip.svelte.d.ts +2 -2
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +0 -1
- package/package.json +5 -5
package/dist/alert/alert.svelte
CHANGED
|
@@ -1,28 +1,183 @@
|
|
|
1
1
|
<script lang="ts" module>
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import {
|
|
3
|
+
COLORS,
|
|
4
|
+
RADII,
|
|
5
|
+
type Color,
|
|
6
|
+
type ColorProp,
|
|
7
|
+
type Radius,
|
|
8
|
+
type RadiusProp,
|
|
9
|
+
} from "../base.js";
|
|
10
|
+
import { mergeProps } from "../merge-props.js";
|
|
11
|
+
import type { Snippet } from "svelte";
|
|
12
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
4
13
|
|
|
5
|
-
export
|
|
14
|
+
export const ALERT_VARIANT = ["filled", "tonal", "plain"] as const;
|
|
15
|
+
export type AlertVariant = (typeof ALERT_VARIANT)[number];
|
|
16
|
+
export type AlertVariantProp = { variant?: AlertVariant };
|
|
17
|
+
|
|
18
|
+
export const ALERT_COLORS = COLORS;
|
|
19
|
+
export type AlertColor = Color;
|
|
20
|
+
export type AlertColorProp = ColorProp;
|
|
21
|
+
|
|
22
|
+
export type AlertOutlined = boolean;
|
|
23
|
+
export type AlertOutlinedProp = { outlined?: AlertOutlined };
|
|
24
|
+
|
|
25
|
+
export type AlertElevated = boolean;
|
|
26
|
+
export type AlertElevatedProp = { elevated?: AlertElevated };
|
|
27
|
+
|
|
28
|
+
export const ALERT_RADII = RADII;
|
|
29
|
+
export type AlertRadius = Radius;
|
|
30
|
+
export type AlertRadiusProp = RadiusProp;
|
|
31
|
+
|
|
32
|
+
export type AlertProps = {
|
|
33
|
+
children: Snippet<[]>;
|
|
34
|
+
} & AlertVariantProp &
|
|
35
|
+
AlertColorProp &
|
|
36
|
+
AlertRadiusProp &
|
|
37
|
+
AlertOutlinedProp &
|
|
38
|
+
AlertElevatedProp &
|
|
39
|
+
HTMLAttributes<HTMLDivElement>;
|
|
6
40
|
</script>
|
|
7
41
|
|
|
8
42
|
<script lang="ts">
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
class: className,
|
|
12
|
-
variant = "elevated",
|
|
43
|
+
const {
|
|
44
|
+
variant = "tonal",
|
|
13
45
|
color = "primary",
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
46
|
+
radius = "sm",
|
|
47
|
+
outlined = false,
|
|
48
|
+
elevated = false,
|
|
49
|
+
children,
|
|
50
|
+
...props
|
|
17
51
|
}: AlertProps = $props();
|
|
18
52
|
</script>
|
|
19
53
|
|
|
20
|
-
<
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
54
|
+
<div
|
|
55
|
+
{...mergeProps(props, {
|
|
56
|
+
class: [
|
|
57
|
+
"base",
|
|
58
|
+
`radius-${radius}`,
|
|
59
|
+
`variant-${variant}`,
|
|
60
|
+
`color-${color}`,
|
|
61
|
+
outlined && "outlined",
|
|
62
|
+
elevated && "elevated",
|
|
63
|
+
],
|
|
64
|
+
})}
|
|
65
|
+
>
|
|
66
|
+
{@render children()}
|
|
67
|
+
</div>
|
|
68
|
+
|
|
69
|
+
<style>
|
|
70
|
+
.base {
|
|
71
|
+
padding: calc(var(--spacing) * 4);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.elevated {
|
|
75
|
+
box-shadow:
|
|
76
|
+
0 1px 3px 0 rgb(from var(--md-sys-color-shadow, rgb(0 0 0)) r g b / 0.2),
|
|
77
|
+
0 1px 2px -1px
|
|
78
|
+
rgb(from var(--md-sys-color-shadow, rgb(0 0 0)) r g b / 0.2);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.variant-filled.color-primary {
|
|
82
|
+
background-color: var(--md-sys-color-primary);
|
|
83
|
+
color: var(--md-sys-color-on-primary);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.variant-filled.color-secondary {
|
|
87
|
+
background-color: var(--md-sys-color-secondary);
|
|
88
|
+
color: var(--md-sys-color-on-secondary);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.variant-filled.color-tertiary {
|
|
92
|
+
background-color: var(--md-sys-color-tertiary);
|
|
93
|
+
color: var(--md-sys-color-on-tertiary);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.variant-filled.color-error {
|
|
97
|
+
background-color: var(--md-sys-color-error);
|
|
98
|
+
color: var(--md-sys-color-on-error);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.variant-filled.color-plain {
|
|
102
|
+
background-color: var(--md-sys-color-inverse-surface);
|
|
103
|
+
color: var(--md-sys-color-inverse-on-surface);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.variant-tonal.color-primary {
|
|
107
|
+
background-color: var(--md-sys-color-primary-container);
|
|
108
|
+
color: var(--md-sys-color-on-primary-container);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.variant-tonal.color-secondary {
|
|
112
|
+
background-color: var(--md-sys-color-secondary-container);
|
|
113
|
+
color: var(--md-sys-color-on-secondary-container);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.variant-tonal.color-tertiary {
|
|
117
|
+
background-color: var(--md-sys-color-tertiary-container);
|
|
118
|
+
color: var(--md-sys-color-on-tertiary-container);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.variant-tonal.color-error {
|
|
122
|
+
background-color: var(--md-sys-color-error-container);
|
|
123
|
+
color: var(--md-sys-color-on-error-container);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.variant-tonal.color-plain {
|
|
127
|
+
background-color: var(--md-sys-color-surface-variant);
|
|
128
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.outlined {
|
|
132
|
+
border-width: 1px;
|
|
133
|
+
border-style: solid;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.outlined.color-primary {
|
|
137
|
+
border-color: var(--md-sys-color-primary);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.outlined.color-secondary {
|
|
141
|
+
border-color: var(--md-sys-color-secondary);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.outlined.color-tertiary {
|
|
145
|
+
border-color: var(--md-sys-color-tertiary);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.outlined.color-error {
|
|
149
|
+
border-color: var(--md-sys-color-error);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.outlined.color-plain {
|
|
153
|
+
border-color: var(--md-sys-color-outline);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.radius-none {
|
|
157
|
+
border-radius: 0;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.radius-xs {
|
|
161
|
+
border-radius: var(--radius-xs);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.radius-sm {
|
|
165
|
+
border-radius: var(--radius-sm);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.radius-md {
|
|
169
|
+
border-radius: var(--radius-lg);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.radius-lg {
|
|
173
|
+
border-radius: var(--radius-2xl);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.radius-xl {
|
|
177
|
+
border-radius: var(--radius-4xl);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.radius-full {
|
|
181
|
+
border-radius: calc(infinity * 1px);
|
|
182
|
+
}
|
|
183
|
+
</style>
|
|
@@ -1,5 +1,28 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { type Color, type ColorProp, type Radius, type RadiusProp } from "../base.js";
|
|
2
|
+
import type { Snippet } from "svelte";
|
|
3
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
4
|
+
export declare const ALERT_VARIANT: readonly ["filled", "tonal", "plain"];
|
|
5
|
+
export type AlertVariant = (typeof ALERT_VARIANT)[number];
|
|
6
|
+
export type AlertVariantProp = {
|
|
7
|
+
variant?: AlertVariant;
|
|
8
|
+
};
|
|
9
|
+
export declare const ALERT_COLORS: readonly ["primary", "secondary", "tertiary", "error", "plain", "inherit"];
|
|
10
|
+
export type AlertColor = Color;
|
|
11
|
+
export type AlertColorProp = ColorProp;
|
|
12
|
+
export type AlertOutlined = boolean;
|
|
13
|
+
export type AlertOutlinedProp = {
|
|
14
|
+
outlined?: AlertOutlined;
|
|
15
|
+
};
|
|
16
|
+
export type AlertElevated = boolean;
|
|
17
|
+
export type AlertElevatedProp = {
|
|
18
|
+
elevated?: AlertElevated;
|
|
19
|
+
};
|
|
20
|
+
export declare const ALERT_RADII: readonly ["none", "xs", "sm", "md", "lg", "xl", "full"];
|
|
21
|
+
export type AlertRadius = Radius;
|
|
22
|
+
export type AlertRadiusProp = RadiusProp;
|
|
23
|
+
export type AlertProps = {
|
|
24
|
+
children: Snippet<[]>;
|
|
25
|
+
} & AlertVariantProp & AlertColorProp & AlertRadiusProp & AlertOutlinedProp & AlertElevatedProp & HTMLAttributes<HTMLDivElement>;
|
|
26
|
+
declare const Alert: import("svelte").Component<AlertProps, {}, "">;
|
|
4
27
|
type Alert = ReturnType<typeof Alert>;
|
|
5
28
|
export default Alert;
|
package/dist/alert/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as Alert, type AlertProps } from "./alert.svelte";
|
|
1
|
+
export { default as Alert, ALERT_COLORS, ALERT_RADII, ALERT_VARIANT, type AlertColor, type AlertColorProp, type AlertElevated, type AlertElevatedProp, type AlertOutlined, type AlertOutlinedProp, type AlertProps, type AlertRadius, type AlertRadiusProp, type AlertVariant, type AlertVariantProp, } from "./alert.svelte";
|
package/dist/alert/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as Alert } from "./alert.svelte";
|
|
1
|
+
export { default as Alert, ALERT_COLORS, ALERT_RADII, ALERT_VARIANT, } from "./alert.svelte";
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { getAutocompleteContext } from "./index.js";
|
|
3
3
|
import { baseClasses, type Variants } from "../base.js";
|
|
4
4
|
import { Popover, type PopoverProps } from "../popover/index.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import type { ClassName } from "../utils.js";
|
|
6
|
+
import type { Snippet } from "svelte";
|
|
7
7
|
import { twMerge } from "tailwind-merge";
|
|
8
8
|
|
|
9
9
|
export type AutocompleteProps = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type Variants } from "../base.js";
|
|
2
2
|
import { type PopoverProps } from "../popover/index.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import type { ClassName } from "../utils.js";
|
|
4
|
+
import type { Snippet } from "svelte";
|
|
5
5
|
export type AutocompleteProps = {
|
|
6
6
|
children: Snippet;
|
|
7
7
|
} & ClassName & Variants & Omit<PopoverProps, "children">;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { getAutocompleteContext } from "./index.js";
|
|
3
3
|
import { baseClasses, type Variants } from "../base.js";
|
|
4
4
|
import { mergeProps } from "../merge-props.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import type { ClassName, ElementRef } from "../utils.js";
|
|
6
|
+
import type { Snippet } from "svelte";
|
|
7
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
8
8
|
import { twMerge } from "tailwind-merge";
|
|
9
9
|
|
|
10
10
|
export type AutocompleteItemProps = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type Variants } from "../base.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import type { ClassName, ElementRef } from "../utils.js";
|
|
3
|
+
import type { Snippet } from "svelte";
|
|
4
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
5
5
|
export type AutocompleteItemProps = {
|
|
6
6
|
onSelect?: (el: HTMLElement) => void;
|
|
7
7
|
children: Snippet;
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
AutocompleteContext,
|
|
4
4
|
setAutocompleteContext,
|
|
5
5
|
} from "./index.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import type { ClassName } from "../utils.js";
|
|
7
|
+
import type { Snippet } from "svelte";
|
|
8
8
|
|
|
9
9
|
export type AutocompleteProps = {
|
|
10
10
|
children: Snippet;
|
package/dist/base.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export type Variant = (typeof VARIANTS)[number];
|
|
|
3
3
|
export type VariantProp = {
|
|
4
4
|
variant?: Variant;
|
|
5
5
|
};
|
|
6
|
-
export declare const COLORS: readonly ["primary", "secondary", "tertiary", "error", "inherit"];
|
|
6
|
+
export declare const COLORS: readonly ["primary", "secondary", "tertiary", "error", "plain", "inherit"];
|
|
7
7
|
export type Color = (typeof COLORS)[number];
|
|
8
8
|
export type ColorProp = {
|
|
9
9
|
color?: Color;
|
|
@@ -13,12 +13,12 @@ export type Shape = (typeof SHAPES)[number];
|
|
|
13
13
|
export type ShapeProp = {
|
|
14
14
|
shape?: Shape;
|
|
15
15
|
};
|
|
16
|
-
export declare const SIZES: readonly ["xs", "sm", "md", "lg", "xl"
|
|
16
|
+
export declare const SIZES: readonly ["xs", "sm", "md", "lg", "xl"];
|
|
17
17
|
export type Size = (typeof SIZES)[number];
|
|
18
18
|
export type SizeProp = {
|
|
19
19
|
size?: Size;
|
|
20
20
|
};
|
|
21
|
-
export declare const RADII: readonly ["xs", "sm", "md", "lg", "xl", "
|
|
21
|
+
export declare const RADII: readonly ["none", "xs", "sm", "md", "lg", "xl", "full"];
|
|
22
22
|
export type Radius = (typeof RADII)[number];
|
|
23
23
|
export type RadiusProp = {
|
|
24
24
|
radius?: Radius;
|
package/dist/base.js
CHANGED
|
@@ -12,11 +12,12 @@ export const COLORS = [
|
|
|
12
12
|
"secondary",
|
|
13
13
|
"tertiary",
|
|
14
14
|
"error",
|
|
15
|
+
"plain",
|
|
15
16
|
"inherit",
|
|
16
17
|
];
|
|
17
18
|
export const SHAPES = ["square", "rounded", "circle"];
|
|
18
|
-
export const SIZES = ["xs", "sm", "md", "lg", "xl"
|
|
19
|
-
export const RADII = ["xs", "sm", "md", "lg", "xl", "
|
|
19
|
+
export const SIZES = ["xs", "sm", "md", "lg", "xl"];
|
|
20
|
+
export const RADII = ["none", "xs", "sm", "md", "lg", "xl", "full"];
|
|
20
21
|
export const UNDERLINES = ["always", "hover", "none"];
|
|
21
22
|
const hoverBaseClasses = ({ variant, color }) => twMerge("disabled:text-m3-on-surface/38 disabled:bg-m3-on-surface/12 disabled:cursor-not-allowed", variant === "filled" && "hover:opacity-90", variant === "tonal" && "hover:opacity-80", variant === "text" && "hover:opacity-80", variant === "elevated" &&
|
|
22
23
|
color === "primary" &&
|
package/dist/box/box.svelte
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { baseClasses, type Variants } from "../base.js";
|
|
3
3
|
import { noop, type ClassName, type ElementRef } from "../utils.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import type { Snippet } from "svelte";
|
|
5
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
6
6
|
import { twMerge } from "tailwind-merge";
|
|
7
7
|
|
|
8
8
|
export type BoxProps = {
|
package/dist/box/box.svelte.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type Variants } from "../base.js";
|
|
2
2
|
import { type ClassName, type ElementRef } from "../utils.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import type { Snippet } from "svelte";
|
|
4
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
5
5
|
export type BoxProps = {
|
|
6
6
|
centered?: boolean;
|
|
7
7
|
backdrop?: boolean;
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
import { mergeProps } from "../merge-props.js";
|
|
4
4
|
import { Tooltip, type TooltipTriggerProps } from "../tooltip/index.js";
|
|
5
5
|
import { noop, type ClassName, type ElementRef } from "../utils.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
6
|
+
import type { Icon } from "@lucide/svelte";
|
|
7
|
+
import type { Snippet } from "svelte";
|
|
8
|
+
import type { HTMLButtonAttributes } from "svelte/elements";
|
|
9
9
|
import { twMerge } from "tailwind-merge";
|
|
10
10
|
|
|
11
11
|
export type ButtonProps = {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type Variants } from "../base.js";
|
|
2
2
|
import { type ClassName, type ElementRef } from "../utils.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import type { Icon } from "@lucide/svelte";
|
|
4
|
+
import type { Snippet } from "svelte";
|
|
5
|
+
import type { HTMLButtonAttributes } from "svelte/elements";
|
|
6
6
|
export type ButtonProps = {
|
|
7
7
|
icon?: typeof Icon;
|
|
8
8
|
size?: number;
|
package/dist/chip/chip.svelte
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts" module>
|
|
2
2
|
import { Box, type BoxProps } from "../box/index.js";
|
|
3
3
|
import { X } from "@lucide/svelte";
|
|
4
|
-
import {
|
|
4
|
+
import type { Snippet } from "svelte";
|
|
5
5
|
import { twMerge } from "tailwind-merge";
|
|
6
6
|
|
|
7
7
|
export type ChipProps = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script module lang="ts">
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { ClassName } from "../utils.js";
|
|
3
|
+
import type { Snippet } from "svelte";
|
|
4
4
|
import { twMerge } from "tailwind-merge";
|
|
5
5
|
|
|
6
6
|
export type CommandContentProps = { children: Snippet } & ClassName;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { baseClasses, type Variants } from "../base.js";
|
|
3
3
|
import { getCommandContext } from "./index.js";
|
|
4
4
|
import { mergeProps } from "../merge-props.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import type { ClassName, ElementRef } from "../utils.js";
|
|
6
|
+
import type { HTMLInputAttributes } from "svelte/elements";
|
|
7
7
|
import { twMerge } from "tailwind-merge";
|
|
8
8
|
|
|
9
9
|
export type CommandInputProps = {} & ElementRef &
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Variants } from "../base.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { ClassName, ElementRef } from "../utils.js";
|
|
3
|
+
import type { HTMLInputAttributes } from "svelte/elements";
|
|
4
4
|
export type CommandInputProps = {} & ElementRef & ClassName & Variants & HTMLInputAttributes;
|
|
5
5
|
declare const CommandInput: import("svelte").Component<CommandInputProps, {}, "value">;
|
|
6
6
|
type CommandInput = ReturnType<typeof CommandInput>;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { baseClasses, type Variants } from "../base.js";
|
|
3
3
|
import { getCommandContext } from "./index.js";
|
|
4
4
|
import { mergeProps } from "../merge-props.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import type { ClassName, ElementRef } from "../utils.js";
|
|
6
|
+
import type { Snippet } from "svelte";
|
|
7
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
8
8
|
import { twMerge } from "tailwind-merge";
|
|
9
9
|
|
|
10
10
|
export type CommandItemProps = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type Variants } from "../base.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import type { ClassName, ElementRef } from "../utils.js";
|
|
3
|
+
import type { Snippet } from "svelte";
|
|
4
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
5
5
|
export type CommandItemProps = {
|
|
6
6
|
onSelect?: (el: HTMLElement) => void;
|
|
7
7
|
children: Snippet<[]>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script module lang="ts">
|
|
2
2
|
import { CommandContext, setCommandContext } from "./index.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import type { ClassName } from "../utils.js";
|
|
4
|
+
import type { Snippet } from "svelte";
|
|
5
5
|
import { twMerge } from "tailwind-merge";
|
|
6
6
|
|
|
7
7
|
export type CommandProps = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script module lang="ts">
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { ClassName } from "../utils.js";
|
|
3
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
4
4
|
import { twMerge } from "tailwind-merge";
|
|
5
5
|
|
|
6
6
|
export type DividerProps = {} & ClassName & HTMLAttributes<HTMLHRElement>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { ClassName } from "../utils.js";
|
|
2
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
3
3
|
export type DividerProps = {} & ClassName & HTMLAttributes<HTMLHRElement>;
|
|
4
4
|
declare const Divider: import("svelte").Component<DividerProps, {}, "">;
|
|
5
5
|
type Divider = ReturnType<typeof Divider>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script module lang="ts">
|
|
2
2
|
import { baseClasses, type Variants } from "../base.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import type { ClassName } from "../utils.js";
|
|
4
|
+
import type { Snippet } from "svelte";
|
|
5
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
6
6
|
import { twMerge } from "tailwind-merge";
|
|
7
7
|
|
|
8
8
|
export type HeaderProps = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type Variants } from "../base.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import type { ClassName } from "../utils.js";
|
|
3
|
+
import type { Snippet } from "svelte";
|
|
4
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
5
5
|
export type HeaderProps = {
|
|
6
6
|
children: Snippet;
|
|
7
7
|
} & ClassName & Variants & HTMLAttributes<HTMLDivElement>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script module lang="ts">
|
|
2
2
|
import { mergeComponentProps } from "../merge-props.js";
|
|
3
3
|
import { Modal, type ModalProps } from "../modal/index.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import type { Icon } from "@lucide/svelte";
|
|
5
|
+
import type { Snippet } from "svelte";
|
|
6
6
|
import { twMerge } from "tailwind-merge";
|
|
7
7
|
|
|
8
8
|
export type DialogProps<T> = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ModalProps } from "../modal/index.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { Icon } from "@lucide/svelte";
|
|
3
|
+
import type { Snippet } from "svelte";
|
|
4
4
|
export type DialogProps<T> = {
|
|
5
5
|
ref?: HTMLDialogElement;
|
|
6
6
|
onSelect?: (value: T | undefined) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import type { Variants } from "../base.js";
|
|
2
|
+
import type { InputProps } from "../input/index.js";
|
|
3
|
+
import type { Icon } from "@lucide/svelte";
|
|
4
4
|
import { type Snippet } from "svelte";
|
|
5
5
|
export type DialoguerButtonProps<T> = {
|
|
6
6
|
text: string;
|