ui-ingredients 0.0.2 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/accordion/root.svelte +3 -3
- package/dist/avatar/root.svelte +3 -3
- package/dist/carousel/root.svelte +3 -3
- package/dist/checkbox/root.svelte +3 -3
- package/dist/clipboard/root.svelte +3 -3
- package/dist/collapsible/root.svelte +3 -3
- package/dist/combobox/item-group.svelte +3 -3
- package/dist/combobox/root.svelte +3 -3
- package/dist/dialog/root.svelte +2 -2
- package/dist/hover-card/root.svelte +2 -2
- package/dist/number-input/root.svelte +3 -3
- package/dist/pagination/root.svelte +3 -3
- package/dist/pin-input/root.svelte +3 -3
- package/dist/popover/root.svelte +2 -2
- package/dist/progress/root.svelte +3 -3
- package/dist/radio-group/root.svelte +3 -3
- package/dist/select/item-group.svelte +3 -3
- package/dist/select/root.svelte +3 -3
- package/dist/slider/root.svelte +3 -3
- package/dist/switch/root.svelte +3 -3
- package/dist/tabs/root.svelte +3 -3
- package/dist/toast/create-toaster.svelte.js +2 -2
- package/dist/toggle-group/root.svelte +4 -4
- package/dist/tooltip/root.svelte +2 -2
- package/dist/types.d.ts +0 -1
- package/dist/utils.svelte.d.ts +1 -2
- package/dist/utils.svelte.js +2 -24
- package/package.json +2 -2
@@ -1,10 +1,10 @@
|
|
1
1
|
<script lang="ts" context="module"></script>
|
2
2
|
|
3
|
-
<script lang="ts">import {
|
4
|
-
import {
|
3
|
+
<script lang="ts">import { uuid } from "../utils.svelte.js";
|
4
|
+
import { mergeProps } from "@zag-js/svelte";
|
5
5
|
import { createAccordionContext, setAccordionContext } from "./context.svelte.js";
|
6
6
|
let {
|
7
|
-
id =
|
7
|
+
id = uuid(),
|
8
8
|
ids,
|
9
9
|
dir,
|
10
10
|
value,
|
package/dist/avatar/root.svelte
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
<script lang="ts" context="module">import {} from "./context.svelte.js";
|
2
2
|
</script>
|
3
3
|
|
4
|
-
<script lang="ts">import {
|
5
|
-
import {
|
4
|
+
<script lang="ts">import { uuid } from "../utils.svelte.js";
|
5
|
+
import { mergeProps } from "@zag-js/svelte";
|
6
6
|
import { createAvatarContext, setAvatarContext } from "./context.svelte.js";
|
7
7
|
let {
|
8
|
-
id =
|
8
|
+
id = uuid(),
|
9
9
|
ids,
|
10
10
|
dir,
|
11
11
|
getRootNode,
|
@@ -1,10 +1,10 @@
|
|
1
1
|
<script lang="ts" context="module"></script>
|
2
2
|
|
3
|
-
<script lang="ts">import {
|
4
|
-
import {
|
3
|
+
<script lang="ts">import { uuid } from "../utils.svelte.js";
|
4
|
+
import { mergeProps } from "@zag-js/svelte";
|
5
5
|
import { createCarouselContext, setCarouselContext } from "./context.svelte.js";
|
6
6
|
let {
|
7
|
-
id =
|
7
|
+
id = uuid(),
|
8
8
|
ids,
|
9
9
|
dir,
|
10
10
|
loop,
|
@@ -1,10 +1,10 @@
|
|
1
1
|
<script lang="ts" context="module"></script>
|
2
2
|
|
3
|
-
<script lang="ts">import {
|
4
|
-
import {
|
3
|
+
<script lang="ts">import { uuid } from "../utils.svelte.js";
|
4
|
+
import { mergeProps } from "@zag-js/svelte";
|
5
5
|
import { createCheckboxContext, setCheckboxContext } from "./context.svelte.js";
|
6
6
|
let {
|
7
|
-
id =
|
7
|
+
id = uuid(),
|
8
8
|
ids,
|
9
9
|
dir,
|
10
10
|
form,
|
@@ -1,10 +1,10 @@
|
|
1
1
|
<script lang="ts" context="module"></script>
|
2
2
|
|
3
|
-
<script lang="ts">import {
|
4
|
-
import {
|
3
|
+
<script lang="ts">import { uuid } from "../utils.svelte.js";
|
4
|
+
import { mergeProps } from "@zag-js/svelte";
|
5
5
|
import { createClipboardContext, setClipboardContext } from "./context.svelte.js";
|
6
6
|
let {
|
7
|
-
id =
|
7
|
+
id = uuid(),
|
8
8
|
ids,
|
9
9
|
value,
|
10
10
|
timeout,
|
@@ -1,10 +1,10 @@
|
|
1
1
|
<script lang="ts" context="module"></script>
|
2
2
|
|
3
|
-
<script lang="ts">import {
|
4
|
-
import {
|
3
|
+
<script lang="ts">import { uuid } from "../utils.svelte.js";
|
4
|
+
import { mergeProps } from "@zag-js/svelte";
|
5
5
|
import { createCollapsibleContext, setCollapsibleContext } from "./context.svelte.js";
|
6
6
|
let {
|
7
|
-
id =
|
7
|
+
id = uuid(),
|
8
8
|
ids,
|
9
9
|
dir,
|
10
10
|
open,
|
@@ -1,9 +1,9 @@
|
|
1
1
|
<script lang="ts" context="module"></script>
|
2
2
|
|
3
|
-
<script lang="ts">import {
|
4
|
-
import {
|
3
|
+
<script lang="ts">import { uuid } from "../utils.svelte.js";
|
4
|
+
import { mergeProps } from "@zag-js/svelte";
|
5
5
|
import { setComboboxItemGroupContext, useComboboxContext } from "./context.svelte.js";
|
6
|
-
let { id =
|
6
|
+
let { id = uuid(), children, ...props } = $props();
|
7
7
|
let context = useComboboxContext();
|
8
8
|
let attrs = $derived(mergeProps(props, context.getItemGroupProps({ id })));
|
9
9
|
setComboboxItemGroupContext({ id });
|
@@ -1,10 +1,10 @@
|
|
1
1
|
<script lang="ts" context="module"></script>
|
2
2
|
|
3
|
-
<script lang="ts" generics="T">import {
|
4
|
-
import {
|
3
|
+
<script lang="ts" generics="T">import { uuid } from "../utils.svelte.js";
|
4
|
+
import { mergeProps } from "@zag-js/svelte";
|
5
5
|
import { createComboboxContext, setComboboxContext } from "./context.svelte.js";
|
6
6
|
let {
|
7
|
-
id =
|
7
|
+
id = uuid(),
|
8
8
|
ids,
|
9
9
|
dir,
|
10
10
|
name,
|
package/dist/dialog/root.svelte
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
<script lang="ts" context="module"></script>
|
2
2
|
|
3
|
-
<script lang="ts">import {
|
3
|
+
<script lang="ts">import { uuid } from "../utils.svelte.js";
|
4
4
|
import { createDialogContext, setDialogContext } from "./context.svelte.js";
|
5
|
-
let { id =
|
5
|
+
let { id = uuid(), children, ...props } = $props();
|
6
6
|
let context = createDialogContext({ id, ...props });
|
7
7
|
setDialogContext(context);
|
8
8
|
</script>
|
@@ -1,8 +1,8 @@
|
|
1
1
|
<script lang="ts" context="module"></script>
|
2
2
|
|
3
|
-
<script lang="ts">import {
|
3
|
+
<script lang="ts">import { uuid } from "../utils.svelte.js";
|
4
4
|
import { createHoverCardContext, setHoverCardContext } from "./context.svelte.js";
|
5
|
-
let { id =
|
5
|
+
let { id = uuid(), children, ...props } = $props();
|
6
6
|
let context = createHoverCardContext({ id, ...props });
|
7
7
|
setHoverCardContext(context);
|
8
8
|
</script>
|
@@ -1,10 +1,10 @@
|
|
1
1
|
<script lang="ts" context="module"></script>
|
2
2
|
|
3
|
-
<script lang="ts">import {
|
4
|
-
import {
|
3
|
+
<script lang="ts">import { uuid } from "../utils.svelte.js";
|
4
|
+
import { mergeProps } from "@zag-js/svelte";
|
5
5
|
import { createNumberInputContext, setNumberInputContext } from "./context.svelte.js";
|
6
6
|
let {
|
7
|
-
id =
|
7
|
+
id = uuid(),
|
8
8
|
ids,
|
9
9
|
dir,
|
10
10
|
max,
|
@@ -1,10 +1,10 @@
|
|
1
1
|
<script lang="ts" context="module"></script>
|
2
2
|
|
3
|
-
<script lang="ts">import {
|
4
|
-
import {
|
3
|
+
<script lang="ts">import { uuid } from "../utils.svelte.js";
|
4
|
+
import { mergeProps } from "@zag-js/svelte";
|
5
5
|
import { createPaginationContext, setPaginationContext } from "./context.svelte.js";
|
6
6
|
let {
|
7
|
-
id =
|
7
|
+
id = uuid(),
|
8
8
|
ids,
|
9
9
|
dir,
|
10
10
|
type,
|
@@ -1,10 +1,10 @@
|
|
1
1
|
<script lang="ts" context="module"></script>
|
2
2
|
|
3
|
-
<script lang="ts">import {
|
4
|
-
import {
|
3
|
+
<script lang="ts">import { uuid } from "../utils.svelte.js";
|
4
|
+
import { mergeProps } from "@zag-js/svelte";
|
5
5
|
import { createPinInputContext, setPinInputContext } from "./context.svelte.js";
|
6
6
|
let {
|
7
|
-
id =
|
7
|
+
id = uuid(),
|
8
8
|
ids,
|
9
9
|
dir,
|
10
10
|
otp,
|
package/dist/popover/root.svelte
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
<script lang="ts" context="module"></script>
|
2
2
|
|
3
|
-
<script lang="ts">import {
|
3
|
+
<script lang="ts">import { uuid } from "../utils.svelte.js";
|
4
4
|
import { createPopoverContext, setPopoverContext } from "./context.svelte.js";
|
5
|
-
let { id =
|
5
|
+
let { id = uuid(), children, ...props } = $props();
|
6
6
|
let context = createPopoverContext({ id, ...props });
|
7
7
|
setPopoverContext(context);
|
8
8
|
</script>
|
@@ -1,10 +1,10 @@
|
|
1
1
|
<script lang="ts" context="module"></script>
|
2
2
|
|
3
|
-
<script lang="ts">import {
|
4
|
-
import {
|
3
|
+
<script lang="ts">import { uuid } from "../utils.svelte.js";
|
4
|
+
import { mergeProps } from "@zag-js/svelte";
|
5
5
|
import { createProgressContext, setProgressContext } from "./context.svelte.js";
|
6
6
|
let {
|
7
|
-
id =
|
7
|
+
id = uuid(),
|
8
8
|
ids,
|
9
9
|
dir,
|
10
10
|
max,
|
@@ -1,10 +1,10 @@
|
|
1
1
|
<script lang="ts" context="module"></script>
|
2
2
|
|
3
|
-
<script lang="ts">import {
|
4
|
-
import {
|
3
|
+
<script lang="ts">import { uuid } from "../utils.svelte.js";
|
4
|
+
import { mergeProps } from "@zag-js/svelte";
|
5
5
|
import { createRadioGroupContext, setRadioGroupContext } from "./context.svelte.js";
|
6
6
|
let {
|
7
|
-
id =
|
7
|
+
id = uuid(),
|
8
8
|
ids,
|
9
9
|
dir,
|
10
10
|
form,
|
@@ -1,9 +1,9 @@
|
|
1
1
|
<script lang="ts" context="module"></script>
|
2
2
|
|
3
|
-
<script lang="ts">import {
|
4
|
-
import {
|
3
|
+
<script lang="ts">import { uuid } from "../utils.svelte.js";
|
4
|
+
import { mergeProps } from "@zag-js/svelte";
|
5
5
|
import { setSelectItemGroupContext, useSelectContext } from "./context.svelte.js";
|
6
|
-
let { id =
|
6
|
+
let { id = uuid(), children, ...props } = $props();
|
7
7
|
let context = useSelectContext();
|
8
8
|
let attrs = $derived(mergeProps(props, context.getItemGroupProps({ id })));
|
9
9
|
setSelectItemGroupContext({ id });
|
package/dist/select/root.svelte
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
<script lang="ts" context="module"></script>
|
2
2
|
|
3
|
-
<script lang="ts" generics="T">import {
|
4
|
-
import {
|
3
|
+
<script lang="ts" generics="T">import { uuid } from "../utils.svelte.js";
|
4
|
+
import { mergeProps } from "@zag-js/svelte";
|
5
5
|
import { createSelectContext, setSelectContext } from "./context.svelte.js";
|
6
6
|
let {
|
7
|
-
id =
|
7
|
+
id = uuid(),
|
8
8
|
ids,
|
9
9
|
dir,
|
10
10
|
form,
|
package/dist/slider/root.svelte
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
<script lang="ts" context="module"></script>
|
2
2
|
|
3
|
-
<script lang="ts">import {
|
4
|
-
import {
|
3
|
+
<script lang="ts">import { uuid } from "../utils.svelte.js";
|
4
|
+
import { mergeProps } from "@zag-js/svelte";
|
5
5
|
import { createSliderContext, setSliderContext } from "./context.svelte.js";
|
6
6
|
let {
|
7
|
-
id =
|
7
|
+
id = uuid(),
|
8
8
|
ids,
|
9
9
|
dir,
|
10
10
|
max,
|
package/dist/switch/root.svelte
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
<script lang="ts" context="module"></script>
|
2
2
|
|
3
|
-
<script lang="ts">import {
|
4
|
-
import {
|
3
|
+
<script lang="ts">import { uuid } from "../utils.svelte.js";
|
4
|
+
import { mergeProps } from "@zag-js/svelte";
|
5
5
|
import { createSwitchContext, setSwitchContext } from "./context.svelte.js";
|
6
6
|
let {
|
7
|
-
id =
|
7
|
+
id = uuid(),
|
8
8
|
ids,
|
9
9
|
dir,
|
10
10
|
form,
|
package/dist/tabs/root.svelte
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
<script lang="ts" context="module"></script>
|
2
2
|
|
3
|
-
<script lang="ts">import {
|
4
|
-
import {
|
3
|
+
<script lang="ts">import { uuid } from "../utils.svelte.js";
|
4
|
+
import { mergeProps } from "@zag-js/svelte";
|
5
5
|
import { createTabsContext, setTabsContext } from "./context.svelte.js";
|
6
6
|
let {
|
7
|
-
id =
|
7
|
+
id = uuid(),
|
8
8
|
ids,
|
9
9
|
dir,
|
10
10
|
value,
|
@@ -1,8 +1,8 @@
|
|
1
|
+
import { uuid } from '../utils.svelte.js';
|
1
2
|
import { normalizeProps, reflect } from '@zag-js/svelte';
|
2
3
|
import * as toast from '@zag-js/toast';
|
3
|
-
import { nanoid } from 'nanoid/non-secure';
|
4
4
|
export default function createToaster(props) {
|
5
|
-
const id = $derived(props?.id ??
|
5
|
+
const id = $derived(props?.id ?? uuid());
|
6
6
|
const machine = $derived(toast.group.machine({ ...props, id }));
|
7
7
|
const api = $derived(reflect(() => ({
|
8
8
|
machine,
|
@@ -1,10 +1,10 @@
|
|
1
1
|
<script lang="ts" context="module"></script>
|
2
2
|
|
3
|
-
<script lang="ts">import {
|
4
|
-
import {
|
3
|
+
<script lang="ts">import { uuid } from "../utils.svelte.js";
|
4
|
+
import { mergeProps } from "@zag-js/svelte";
|
5
5
|
import { createToggleGroupContext, setToggleGroupContext } from "./context.svelte.js";
|
6
6
|
let {
|
7
|
-
id =
|
7
|
+
id = uuid(),
|
8
8
|
ids,
|
9
9
|
dir,
|
10
10
|
value,
|
@@ -19,7 +19,7 @@ let {
|
|
19
19
|
...props
|
20
20
|
} = $props();
|
21
21
|
let context = createToggleGroupContext({
|
22
|
-
id
|
22
|
+
id,
|
23
23
|
ids,
|
24
24
|
dir,
|
25
25
|
value: $state.snapshot(value),
|
package/dist/tooltip/root.svelte
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
<script lang="ts" context="module"></script>
|
2
2
|
|
3
|
-
<script lang="ts">import {
|
3
|
+
<script lang="ts">import { uuid } from "../utils.svelte.js";
|
4
4
|
import { createTooltipContext, setTooltipContext } from "./context.svelte.js";
|
5
|
-
let { id =
|
5
|
+
let { id = uuid(), children, ...props } = $props();
|
6
6
|
let context = createTooltipContext({ id, ...props });
|
7
7
|
setTooltipContext(context);
|
8
8
|
</script>
|
package/dist/types.d.ts
CHANGED
package/dist/utils.svelte.d.ts
CHANGED
@@ -1,2 +1 @@
|
|
1
|
-
export declare
|
2
|
-
export declare function splitProps(): void;
|
1
|
+
export declare const uuid: () => string;
|
package/dist/utils.svelte.js
CHANGED
@@ -1,24 +1,2 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
for (const k in o) {
|
4
|
-
const v = o[k];
|
5
|
-
if (typeof v === 'function') {
|
6
|
-
r = Object.assign(r, {
|
7
|
-
[k](...args) {
|
8
|
-
return v(...args);
|
9
|
-
},
|
10
|
-
});
|
11
|
-
continue;
|
12
|
-
}
|
13
|
-
r = Object.assign(r, {
|
14
|
-
get [k]() {
|
15
|
-
return v;
|
16
|
-
},
|
17
|
-
set [k](v) {
|
18
|
-
o[k] = v;
|
19
|
-
},
|
20
|
-
});
|
21
|
-
}
|
22
|
-
return r;
|
23
|
-
}
|
24
|
-
export function splitProps() { }
|
1
|
+
import { nanoid } from 'nanoid/non-secure';
|
2
|
+
export const uuid = () => nanoid(8);
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "ui-ingredients",
|
3
3
|
"type": "module",
|
4
|
-
"version": "0.0.
|
4
|
+
"version": "0.0.4",
|
5
5
|
"packageManager": "pnpm@9.7.0",
|
6
6
|
"svelte": "./dist/index.js",
|
7
7
|
"types": "./dist/index.d.ts",
|
@@ -22,7 +22,7 @@
|
|
22
22
|
},
|
23
23
|
"repository": {
|
24
24
|
"type": "git",
|
25
|
-
"url": "git
|
25
|
+
"url": "git+https://github.com/calvo-jp/ui-ingredients.git"
|
26
26
|
},
|
27
27
|
"bugs": {
|
28
28
|
"url": "https://github.com/calvo-jp/ui-ingredients/issues",
|