ui-ingredients 0.0.6 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +75 -75
- package/dist/accordion/item-content.svelte +22 -13
- package/dist/accordion/item-indicator.svelte +22 -13
- package/dist/accordion/item-trigger.svelte +22 -13
- package/dist/accordion/item.svelte +35 -24
- package/dist/accordion/root.svelte +61 -40
- package/dist/avatar/fallback.svelte +21 -12
- package/dist/avatar/image.svelte +19 -10
- package/dist/avatar/root.svelte +46 -29
- package/dist/carousel/indicator-group.svelte +21 -12
- package/dist/carousel/indicator.svelte +31 -20
- package/dist/carousel/item-group.svelte +21 -12
- package/dist/carousel/item.svelte +22 -12
- package/dist/carousel/next-trigger.svelte +21 -12
- package/dist/carousel/prev-trigger.svelte +21 -12
- package/dist/carousel/root.svelte +58 -40
- package/dist/carousel/viewport.svelte +21 -12
- package/dist/checkbox/control.svelte +21 -12
- package/dist/checkbox/hidden-input.svelte +19 -10
- package/dist/checkbox/indicator.svelte +21 -12
- package/dist/checkbox/label.svelte +21 -12
- package/dist/checkbox/root.svelte +62 -44
- package/dist/clipboard/control.svelte +21 -12
- package/dist/clipboard/indicator.svelte +23 -12
- package/dist/clipboard/input.svelte +19 -10
- package/dist/clipboard/label.svelte +21 -12
- package/dist/clipboard/root.svelte +51 -30
- package/dist/clipboard/trigger.svelte +21 -12
- package/dist/collapsible/content.svelte +21 -12
- package/dist/collapsible/root.svelte +57 -36
- package/dist/collapsible/trigger.svelte +19 -12
- package/dist/combobox/clear-trigger.svelte +21 -12
- package/dist/combobox/content.svelte +21 -12
- package/dist/combobox/control.svelte +21 -12
- package/dist/combobox/input.svelte +19 -10
- package/dist/combobox/item-group-label.svelte +29 -20
- package/dist/combobox/item-group.svelte +26 -14
- package/dist/combobox/item-indicator.svelte +22 -13
- package/dist/combobox/item-text.svelte +26 -17
- package/dist/combobox/item.svelte +35 -24
- package/dist/combobox/label.svelte +21 -12
- package/dist/combobox/list.svelte +21 -12
- package/dist/combobox/positioner.svelte +21 -12
- package/dist/combobox/root.svelte +122 -104
- package/dist/combobox/trigger.svelte +21 -12
- package/dist/dialog/backdrop.svelte +21 -12
- package/dist/dialog/close-trigger.svelte +21 -12
- package/dist/dialog/content.svelte +21 -12
- package/dist/dialog/description.svelte +21 -12
- package/dist/dialog/positioner.svelte +21 -12
- package/dist/dialog/root.svelte +22 -10
- package/dist/dialog/title.svelte +21 -12
- package/dist/dialog/trigger.svelte +21 -12
- package/dist/hover-card/arrow-tip.svelte +21 -12
- package/dist/hover-card/arrow.svelte +21 -12
- package/dist/hover-card/content.svelte +21 -12
- package/dist/hover-card/positioner.svelte +21 -12
- package/dist/hover-card/root.svelte +25 -10
- package/dist/hover-card/trigger.svelte +21 -12
- package/dist/index.d.ts +11 -0
- package/dist/index.js +8 -0
- package/dist/number-input/control.svelte +21 -12
- package/dist/number-input/decrement-trigger.svelte +22 -12
- package/dist/number-input/increment-trigger.svelte +22 -12
- package/dist/number-input/input.svelte +19 -10
- package/dist/number-input/label.svelte +21 -12
- package/dist/number-input/root.svelte +93 -72
- package/dist/number-input/scrubber.svelte +21 -12
- package/dist/pagination/ellipsis.svelte +23 -12
- package/dist/pagination/item.svelte +31 -20
- package/dist/pagination/next-trigger.svelte +21 -12
- package/dist/pagination/prev-trigger.svelte +21 -12
- package/dist/pagination/root.svelte +63 -42
- package/dist/pin-input/clear-trigger.svelte +25 -17
- package/dist/pin-input/hidden-input.svelte +19 -10
- package/dist/pin-input/input.svelte +20 -10
- package/dist/pin-input/label.svelte +21 -12
- package/dist/pin-input/root.svelte +82 -64
- package/dist/popover/arrow-tip.svelte +21 -12
- package/dist/popover/arrow.svelte +21 -12
- package/dist/popover/close-trigger.svelte +21 -12
- package/dist/popover/content.svelte +21 -12
- package/dist/popover/description.svelte +21 -12
- package/dist/popover/positioner.svelte +21 -12
- package/dist/popover/root.svelte +22 -10
- package/dist/popover/title.svelte +21 -12
- package/dist/popover/trigger.svelte +21 -12
- package/dist/portal/root.svelte +20 -10
- package/dist/presence/root.svelte +39 -27
- package/dist/progress/circle-range.svelte +21 -12
- package/dist/progress/circle-track.svelte +21 -12
- package/dist/progress/circle.svelte +21 -12
- package/dist/progress/label.svelte +21 -12
- package/dist/progress/range.svelte +21 -12
- package/dist/progress/root.svelte +54 -36
- package/dist/progress/track.svelte +21 -12
- package/dist/progress/value-text.svelte +25 -16
- package/dist/qr-code/context.svelte.d.ts +8 -0
- package/dist/qr-code/context.svelte.js +14 -0
- package/dist/qr-code/frame.svelte +21 -0
- package/dist/qr-code/frame.svelte.d.ts +22 -0
- package/dist/qr-code/index.d.ts +4 -0
- package/dist/qr-code/index.js +4 -0
- package/dist/qr-code/overlay.svelte +21 -0
- package/dist/qr-code/overlay.svelte.d.ts +22 -0
- package/dist/qr-code/pattern.svelte +21 -0
- package/dist/qr-code/pattern.svelte.d.ts +22 -0
- package/dist/qr-code/root.svelte +48 -0
- package/dist/qr-code/root.svelte.d.ts +25 -0
- package/dist/radio-group/indicator.svelte +21 -12
- package/dist/radio-group/item-control.svelte +22 -13
- package/dist/radio-group/item-hidden-input.svelte +20 -11
- package/dist/radio-group/item-text.svelte +22 -13
- package/dist/radio-group/item.svelte +37 -26
- package/dist/radio-group/label.svelte +21 -12
- package/dist/radio-group/root.svelte +61 -40
- package/dist/select/clear-trigger.svelte +21 -12
- package/dist/select/content.svelte +21 -12
- package/dist/select/control.svelte +21 -12
- package/dist/select/hidden-select.svelte +21 -12
- package/dist/select/indicator.svelte +21 -12
- package/dist/select/item-group-label.svelte +24 -15
- package/dist/select/item-group.svelte +26 -14
- package/dist/select/item-indicator.svelte +22 -13
- package/dist/select/item-text.svelte +26 -17
- package/dist/select/item.svelte +35 -24
- package/dist/select/label.svelte +21 -12
- package/dist/select/list.svelte +21 -12
- package/dist/select/positioner.svelte +21 -12
- package/dist/select/root.svelte +96 -78
- package/dist/select/trigger.svelte +21 -12
- package/dist/select/value-text.svelte +27 -18
- package/dist/slider/control.svelte +21 -12
- package/dist/slider/hidden-input.svelte +20 -11
- package/dist/slider/label.svelte +21 -12
- package/dist/slider/marker-group.svelte +21 -12
- package/dist/slider/marker.svelte +29 -19
- package/dist/slider/range.svelte +21 -12
- package/dist/slider/root.svelte +84 -66
- package/dist/slider/thumb.svelte +35 -24
- package/dist/slider/track.svelte +21 -12
- package/dist/slider/value-text.svelte +25 -16
- package/dist/steps/content.svelte +22 -12
- package/dist/steps/indicator.svelte +22 -13
- package/dist/steps/item.svelte +24 -13
- package/dist/steps/list.svelte +21 -12
- package/dist/steps/next-trigger.svelte +21 -12
- package/dist/steps/prev-trigger.svelte +21 -12
- package/dist/steps/progress.svelte +21 -12
- package/dist/steps/root.svelte +56 -38
- package/dist/steps/separator.svelte +22 -13
- package/dist/steps/trigger.svelte +22 -13
- package/dist/switch/control.svelte +21 -12
- package/dist/switch/hidden-input.svelte +19 -10
- package/dist/switch/label.svelte +21 -12
- package/dist/switch/root.svelte +64 -46
- package/dist/switch/thumb.svelte +21 -12
- package/dist/tabs/content.svelte +22 -12
- package/dist/tabs/list.svelte +21 -12
- package/dist/tabs/root.svelte +57 -42
- package/dist/tabs/trigger.svelte +22 -12
- package/dist/tags-input/clear-trigger.svelte +21 -0
- package/dist/tags-input/clear-trigger.svelte.d.ts +22 -0
- package/dist/tags-input/context.svelte.d.ts +10 -0
- package/dist/tags-input/context.svelte.js +20 -0
- package/dist/tags-input/control.svelte +21 -0
- package/dist/tags-input/control.svelte.d.ts +22 -0
- package/dist/tags-input/hidden-input.svelte +19 -0
- package/dist/tags-input/hidden-input.svelte.d.ts +22 -0
- package/dist/tags-input/index.d.ts +11 -0
- package/dist/tags-input/index.js +11 -0
- package/dist/tags-input/input.svelte +19 -0
- package/dist/tags-input/input.svelte.d.ts +22 -0
- package/dist/tags-input/item-delete-trigger.svelte +23 -0
- package/dist/tags-input/item-delete-trigger.svelte.d.ts +22 -0
- package/dist/tags-input/item-input.svelte +20 -0
- package/dist/tags-input/item-input.svelte.d.ts +22 -0
- package/dist/tags-input/item-preview.svelte +22 -0
- package/dist/tags-input/item-preview.svelte.d.ts +22 -0
- package/dist/tags-input/item-text.svelte +22 -0
- package/dist/tags-input/item-text.svelte.d.ts +22 -0
- package/dist/tags-input/item.svelte +37 -0
- package/dist/tags-input/item.svelte.d.ts +23 -0
- package/dist/tags-input/label.svelte +21 -0
- package/dist/tags-input/label.svelte.d.ts +22 -0
- package/dist/tags-input/root.svelte +97 -0
- package/dist/tags-input/root.svelte.d.ts +25 -0
- package/dist/timer/action-trigger.svelte +23 -0
- package/dist/timer/action-trigger.svelte.d.ts +23 -0
- package/dist/timer/context.svelte.d.ts +10 -0
- package/dist/timer/context.svelte.js +20 -0
- package/dist/timer/index.d.ts +6 -0
- package/dist/timer/index.js +6 -0
- package/dist/timer/item-label.svelte +22 -0
- package/dist/timer/item-label.svelte.d.ts +22 -0
- package/dist/timer/item-value.svelte +26 -0
- package/dist/timer/item-value.svelte.d.ts +22 -0
- package/dist/timer/item.svelte +24 -0
- package/dist/timer/item.svelte.d.ts +23 -0
- package/dist/timer/root.svelte +54 -0
- package/dist/timer/root.svelte.d.ts +25 -0
- package/dist/timer/separator.svelte +21 -0
- package/dist/timer/separator.svelte.d.ts +22 -0
- package/dist/toast/action-trigger.svelte +21 -12
- package/dist/toast/actor.svelte +22 -11
- package/dist/toast/close-trigger.svelte +21 -12
- package/dist/toast/description.svelte +25 -16
- package/dist/toast/root.svelte +25 -16
- package/dist/toast/title.svelte +25 -16
- package/dist/toast/toaster.svelte +40 -25
- package/dist/toggle-group/item.svelte +22 -12
- package/dist/toggle-group/root.svelte +61 -40
- package/dist/tooltip/arrow-tip.svelte +21 -12
- package/dist/tooltip/arrow.svelte +21 -12
- package/dist/tooltip/content.svelte +21 -12
- package/dist/tooltip/positioner.svelte +21 -12
- package/dist/tooltip/root.svelte +22 -10
- package/dist/tooltip/trigger.svelte +21 -12
- package/package.json +6 -14
- package/dist/qr-code/.gitkeep +0 -0
- package/dist/tags-input/.gitkeep +0 -0
- package/dist/timer/.gitkeep +0 -0
@@ -1,12 +1,21 @@
|
|
1
|
-
<script lang="ts" context="module"
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
1
|
+
<script lang="ts" context="module">
|
2
|
+
import type {Assign} from '../types.js';
|
3
|
+
import type {SvelteHTMLElements} from 'svelte/elements';
|
4
|
+
|
5
|
+
export interface HoverCardArrowTipProps extends Assign<SvelteHTMLElements['div'], {}> {}
|
6
|
+
</script>
|
7
|
+
|
8
|
+
<script lang="ts">
|
9
|
+
import {mergeProps} from '@zag-js/svelte';
|
10
|
+
import {useHoverCardContext} from './context.svelte.js';
|
11
|
+
|
12
|
+
let {children, ...props}: HoverCardArrowTipProps = $props();
|
13
|
+
|
14
|
+
let context = useHoverCardContext();
|
15
|
+
|
16
|
+
let attrs = $derived(mergeProps(props, context.getArrowTipProps()));
|
17
|
+
</script>
|
18
|
+
|
19
|
+
<div {...attrs}>
|
20
|
+
{@render children?.()}
|
21
|
+
</div>
|
@@ -1,12 +1,21 @@
|
|
1
|
-
<script lang="ts" context="module"
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
1
|
+
<script lang="ts" context="module">
|
2
|
+
import type {Assign} from '../types.js';
|
3
|
+
import type {SvelteHTMLElements} from 'svelte/elements';
|
4
|
+
|
5
|
+
export interface HoverCardArrowProps extends Assign<SvelteHTMLElements['div'], {}> {}
|
6
|
+
</script>
|
7
|
+
|
8
|
+
<script lang="ts">
|
9
|
+
import {mergeProps} from '@zag-js/svelte';
|
10
|
+
import {useHoverCardContext} from './context.svelte.js';
|
11
|
+
|
12
|
+
let {children, ...props}: HoverCardArrowProps = $props();
|
13
|
+
|
14
|
+
let context = useHoverCardContext();
|
15
|
+
|
16
|
+
let attrs = $derived(mergeProps(props, context.getArrowProps()));
|
17
|
+
</script>
|
18
|
+
|
19
|
+
<div {...attrs}>
|
20
|
+
{@render children?.()}
|
21
|
+
</div>
|
@@ -1,12 +1,21 @@
|
|
1
|
-
<script lang="ts" context="module"
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
1
|
+
<script lang="ts" context="module">
|
2
|
+
import type {Assign} from '../types.js';
|
3
|
+
import type {SvelteHTMLElements} from 'svelte/elements';
|
4
|
+
|
5
|
+
export interface HoverCardContentProps extends Assign<SvelteHTMLElements['div'], {}> {}
|
6
|
+
</script>
|
7
|
+
|
8
|
+
<script lang="ts">
|
9
|
+
import {mergeProps} from '@zag-js/svelte';
|
10
|
+
import {useHoverCardContext} from './context.svelte.js';
|
11
|
+
|
12
|
+
let {children, ...props}: HoverCardContentProps = $props();
|
13
|
+
|
14
|
+
let context = useHoverCardContext();
|
15
|
+
|
16
|
+
let attrs = $derived(mergeProps(props, context.getContentProps()));
|
17
|
+
</script>
|
18
|
+
|
19
|
+
<div {...attrs}>
|
20
|
+
{@render children?.()}
|
21
|
+
</div>
|
@@ -1,12 +1,21 @@
|
|
1
|
-
<script lang="ts" context="module"
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
1
|
+
<script lang="ts" context="module">
|
2
|
+
import type {Assign} from '../types.js';
|
3
|
+
import type {SvelteHTMLElements} from 'svelte/elements';
|
4
|
+
|
5
|
+
export interface HoverCardPositionerProps extends Assign<SvelteHTMLElements['div'], {}> {}
|
6
|
+
</script>
|
7
|
+
|
8
|
+
<script lang="ts">
|
9
|
+
import {mergeProps} from '@zag-js/svelte';
|
10
|
+
import {useHoverCardContext} from './context.svelte.js';
|
11
|
+
|
12
|
+
let {children, ...props}: HoverCardPositionerProps = $props();
|
13
|
+
|
14
|
+
let context = useHoverCardContext();
|
15
|
+
|
16
|
+
let attrs = $derived(mergeProps(props, context.getPositionerProps()));
|
17
|
+
</script>
|
18
|
+
|
19
|
+
<div {...attrs}>
|
20
|
+
{@render children?.()}
|
21
|
+
</div>
|
@@ -1,10 +1,25 @@
|
|
1
|
-
<script lang="ts" context="module"
|
2
|
-
|
3
|
-
|
4
|
-
import {
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
1
|
+
<script lang="ts" context="module">
|
2
|
+
import type {OptionalId} from '../types.js';
|
3
|
+
import type {Snippet} from 'svelte';
|
4
|
+
import type {
|
5
|
+
CreateHoverCardContextProps,
|
6
|
+
CreateHoverCardContextReturn,
|
7
|
+
} from './context.svelte.js';
|
8
|
+
|
9
|
+
export interface HoverCardProps extends OptionalId<CreateHoverCardContextProps> {
|
10
|
+
children?: Snippet<[CreateHoverCardContextReturn]>;
|
11
|
+
}
|
12
|
+
</script>
|
13
|
+
|
14
|
+
<script lang="ts">
|
15
|
+
import {uuid} from '../utils.svelte.js';
|
16
|
+
import {createHoverCardContext, setHoverCardContext} from './context.svelte.js';
|
17
|
+
|
18
|
+
let {id = uuid(), children, ...props}: HoverCardProps = $props();
|
19
|
+
|
20
|
+
let context = createHoverCardContext({id, ...props});
|
21
|
+
|
22
|
+
setHoverCardContext(context);
|
23
|
+
</script>
|
24
|
+
|
25
|
+
{@render children?.(context)}
|
@@ -1,12 +1,21 @@
|
|
1
|
-
<script lang="ts" context="module"
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
1
|
+
<script lang="ts" context="module">
|
2
|
+
import type {Assign} from '../types.js';
|
3
|
+
import type {SvelteHTMLElements} from 'svelte/elements';
|
4
|
+
|
5
|
+
export interface HoverCardTriggerProps extends Assign<SvelteHTMLElements['a'], {}> {}
|
6
|
+
</script>
|
7
|
+
|
8
|
+
<script lang="ts">
|
9
|
+
import {mergeProps} from '@zag-js/svelte';
|
10
|
+
import {useHoverCardContext} from './context.svelte.js';
|
11
|
+
|
12
|
+
let {children, ...props}: HoverCardTriggerProps = $props();
|
13
|
+
|
14
|
+
let context = useHoverCardContext();
|
15
|
+
|
16
|
+
let attrs = $derived(mergeProps(props, context.getTriggerProps()));
|
17
|
+
</script>
|
18
|
+
|
19
|
+
<a {...attrs}>
|
20
|
+
{@render children?.()}
|
21
|
+
</a>
|
package/dist/index.d.ts
CHANGED
@@ -26,6 +26,8 @@ export * as Popover from './popover/index.js';
|
|
26
26
|
export type { PopoverArrowProps, PopoverArrowTipProps, PopoverCloseTriggerProps, PopoverContentProps, PopoverDescriptionProps, PopoverPositionerProps, PopoverProps, PopoverTitleProps, PopoverTriggerProps, } from './popover/index.js';
|
27
27
|
export * as Progress from './progress/index.js';
|
28
28
|
export type { ProgressCircleProps, ProgressCircleRangeProps, ProgressCircleTrackProps, ProgressLabelProps, ProgressProps, ProgressRangeProps, ProgressTrackProps, ProgressValueTextProps, } from './progress/index.js';
|
29
|
+
export * as QRCode from './qr-code/index.js';
|
30
|
+
export type { QRCodeFrameProps, QRCodeOverlayProps, QRCodePatternProps, QRCodeProps, } from './qr-code/index.js';
|
29
31
|
export * as RadioGroup from './radio-group/index.js';
|
30
32
|
export type { RadioGroupIndicatorProps, RadioGroupItemControlProps, RadioGroupItemHiddenInputProps, RadioGroupItemProps, RadioGroupItemTextProps, RadioGroupLabelProps, RadioGroupProps, } from './radio-group/index.js';
|
31
33
|
export * as Select from './select/index.js';
|
@@ -38,6 +40,10 @@ export * as Switch from './switch/index.js';
|
|
38
40
|
export type { SwitchControlProps, SwitchHiddenInputProps, SwitchLabelProps, SwitchProps, SwitchThumbProps, } from './switch/index.js';
|
39
41
|
export * as Tabs from './tabs/index.js';
|
40
42
|
export type { TabsContentProps, TabsListProps, TabsProps, TabsTriggerProps, } from './tabs/index.js';
|
43
|
+
export * as TagsInput from './tags-input/index.js';
|
44
|
+
export type { TagsInputClearTriggerProps, TagsInputControlProps, TagsInputHiddenInputProps, TagsInputInputProps, TagsInputItemDeleteTriggerProps, TagsInputItemInputProps, TagsInputItemPreviewProps, TagsInputItemProps, TagsInputItemTextProps, TagsInputLabelProps, TagsInputProps, } from './tags-input/index.js';
|
45
|
+
export * as Timer from './timer/index.js';
|
46
|
+
export type { TimerActionTriggerProps, TimerItemLabelProps, TimerItemProps, TimerItemValueProps, TimerProps, TimerSeparatorProps, } from './timer/index.js';
|
41
47
|
export * as ToggleGroup from './toggle-group/index.js';
|
42
48
|
export type { ToggleGroupItemProps, ToggleGroupProps, } from './toggle-group/index.js';
|
43
49
|
export * as Tooltip from './tooltip/index.js';
|
@@ -51,10 +57,12 @@ export { anatomy as carouselAnatomy } from '@zag-js/carousel';
|
|
51
57
|
export { anatomy as checkboxAnatomy } from '@zag-js/checkbox';
|
52
58
|
export { anatomy as clipboardAnatomy } from '@zag-js/clipboard';
|
53
59
|
export { anatomy as collapsibleAnatomy } from '@zag-js/collapsible';
|
60
|
+
export { anatomy as colorPickerAnatomy } from '@zag-js/color-picker';
|
54
61
|
export { anatomy as comboboxAnatomy } from '@zag-js/combobox';
|
55
62
|
export { anatomy as datePickerAnatomy } from '@zag-js/date-picker';
|
56
63
|
export { anatomy as dialogAnatomy } from '@zag-js/dialog';
|
57
64
|
export { anatomy as editableAnatomy } from '@zag-js/editable';
|
65
|
+
export { anatomy as fileUploadAnatomy } from '@zag-js/file-upload';
|
58
66
|
export { anatomy as hoverCardAnatomy } from '@zag-js/hover-card';
|
59
67
|
export { anatomy as menuAnatomy } from '@zag-js/menu';
|
60
68
|
export { anatomy as numberInputAnatomy } from '@zag-js/number-input';
|
@@ -62,14 +70,17 @@ export { anatomy as paginationAnatomy } from '@zag-js/pagination';
|
|
62
70
|
export { anatomy as pinInputAnatomy } from '@zag-js/pin-input';
|
63
71
|
export { anatomy as popoverAnatomy } from '@zag-js/popover';
|
64
72
|
export { anatomy as progressAnatomy } from '@zag-js/progress';
|
73
|
+
export { anatomy as qrCodeAnatomy } from '@zag-js/qr-code';
|
65
74
|
export { anatomy as radioGroupAnatomy } from '@zag-js/radio-group';
|
66
75
|
export { anatomy as ratingGroupAnatomy } from '@zag-js/rating-group';
|
67
76
|
export { anatomy as selectAnatomy } from '@zag-js/select';
|
77
|
+
export { anatomy as signaturePadAnatomy } from '@zag-js/signature-pad';
|
68
78
|
export { anatomy as sliderAnatomy } from '@zag-js/slider';
|
69
79
|
export { anatomy as stepsAnatomy } from '@zag-js/steps';
|
70
80
|
export { anatomy as switchAnatomy } from '@zag-js/switch';
|
71
81
|
export { anatomy as tabsAnatomy } from '@zag-js/tabs';
|
72
82
|
export { anatomy as tagsInputAnatomy } from '@zag-js/tags-input';
|
83
|
+
export { anatomy as timerAnatomy } from '@zag-js/timer';
|
73
84
|
export { anatomy as toastAnatomy } from '@zag-js/toast';
|
74
85
|
export { anatomy as toggleGroupAnatomy } from '@zag-js/toggle-group';
|
75
86
|
export { anatomy as tooltipAnatomy } from '@zag-js/tooltip';
|
package/dist/index.js
CHANGED
@@ -12,12 +12,15 @@ export * as Pagination from './pagination/index.js';
|
|
12
12
|
export * as PinInput from './pin-input/index.js';
|
13
13
|
export * as Popover from './popover/index.js';
|
14
14
|
export * as Progress from './progress/index.js';
|
15
|
+
export * as QRCode from './qr-code/index.js';
|
15
16
|
export * as RadioGroup from './radio-group/index.js';
|
16
17
|
export * as Select from './select/index.js';
|
17
18
|
export * as Slider from './slider/index.js';
|
18
19
|
export * as Steps from './steps/index.js';
|
19
20
|
export * as Switch from './switch/index.js';
|
20
21
|
export * as Tabs from './tabs/index.js';
|
22
|
+
export * as TagsInput from './tags-input/index.js';
|
23
|
+
export * as Timer from './timer/index.js';
|
21
24
|
export * as ToggleGroup from './toggle-group/index.js';
|
22
25
|
export * as Tooltip from './tooltip/index.js';
|
23
26
|
export * from './portal/index.js';
|
@@ -29,10 +32,12 @@ export { anatomy as carouselAnatomy } from '@zag-js/carousel';
|
|
29
32
|
export { anatomy as checkboxAnatomy } from '@zag-js/checkbox';
|
30
33
|
export { anatomy as clipboardAnatomy } from '@zag-js/clipboard';
|
31
34
|
export { anatomy as collapsibleAnatomy } from '@zag-js/collapsible';
|
35
|
+
export { anatomy as colorPickerAnatomy } from '@zag-js/color-picker';
|
32
36
|
export { anatomy as comboboxAnatomy } from '@zag-js/combobox';
|
33
37
|
export { anatomy as datePickerAnatomy } from '@zag-js/date-picker';
|
34
38
|
export { anatomy as dialogAnatomy } from '@zag-js/dialog';
|
35
39
|
export { anatomy as editableAnatomy } from '@zag-js/editable';
|
40
|
+
export { anatomy as fileUploadAnatomy } from '@zag-js/file-upload';
|
36
41
|
export { anatomy as hoverCardAnatomy } from '@zag-js/hover-card';
|
37
42
|
export { anatomy as menuAnatomy } from '@zag-js/menu';
|
38
43
|
export { anatomy as numberInputAnatomy } from '@zag-js/number-input';
|
@@ -40,14 +45,17 @@ export { anatomy as paginationAnatomy } from '@zag-js/pagination';
|
|
40
45
|
export { anatomy as pinInputAnatomy } from '@zag-js/pin-input';
|
41
46
|
export { anatomy as popoverAnatomy } from '@zag-js/popover';
|
42
47
|
export { anatomy as progressAnatomy } from '@zag-js/progress';
|
48
|
+
export { anatomy as qrCodeAnatomy } from '@zag-js/qr-code';
|
43
49
|
export { anatomy as radioGroupAnatomy } from '@zag-js/radio-group';
|
44
50
|
export { anatomy as ratingGroupAnatomy } from '@zag-js/rating-group';
|
45
51
|
export { anatomy as selectAnatomy } from '@zag-js/select';
|
52
|
+
export { anatomy as signaturePadAnatomy } from '@zag-js/signature-pad';
|
46
53
|
export { anatomy as sliderAnatomy } from '@zag-js/slider';
|
47
54
|
export { anatomy as stepsAnatomy } from '@zag-js/steps';
|
48
55
|
export { anatomy as switchAnatomy } from '@zag-js/switch';
|
49
56
|
export { anatomy as tabsAnatomy } from '@zag-js/tabs';
|
50
57
|
export { anatomy as tagsInputAnatomy } from '@zag-js/tags-input';
|
58
|
+
export { anatomy as timerAnatomy } from '@zag-js/timer';
|
51
59
|
export { anatomy as toastAnatomy } from '@zag-js/toast';
|
52
60
|
export { anatomy as toggleGroupAnatomy } from '@zag-js/toggle-group';
|
53
61
|
export { anatomy as tooltipAnatomy } from '@zag-js/tooltip';
|
@@ -1,12 +1,21 @@
|
|
1
|
-
<script lang="ts" context="module"
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
1
|
+
<script lang="ts" context="module">
|
2
|
+
import type {Assign} from '../types.js';
|
3
|
+
import type {SvelteHTMLElements} from 'svelte/elements';
|
4
|
+
|
5
|
+
export interface NumberInputControlTriggerProps extends Assign<SvelteHTMLElements['div'], {}> {}
|
6
|
+
</script>
|
7
|
+
|
8
|
+
<script lang="ts">
|
9
|
+
import {mergeProps} from '@zag-js/svelte';
|
10
|
+
import {useNumberInputContext} from './context.svelte.js';
|
11
|
+
|
12
|
+
let {children, ...props}: NumberInputControlTriggerProps = $props();
|
13
|
+
|
14
|
+
let context = useNumberInputContext();
|
15
|
+
|
16
|
+
let attrs = $derived(mergeProps(props, context.getControlProps()));
|
17
|
+
</script>
|
18
|
+
|
19
|
+
<div {...attrs}>
|
20
|
+
{@render children?.()}
|
21
|
+
</div>
|
@@ -1,12 +1,22 @@
|
|
1
|
-
<script lang="ts" context="module"
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
{
|
12
|
-
|
1
|
+
<script lang="ts" context="module">
|
2
|
+
import type {Assign} from '../types.js';
|
3
|
+
import type {SvelteHTMLElements} from 'svelte/elements';
|
4
|
+
|
5
|
+
export interface NumberInputDecrementTriggerProps
|
6
|
+
extends Assign<SvelteHTMLElements['button'], {}> {}
|
7
|
+
</script>
|
8
|
+
|
9
|
+
<script lang="ts">
|
10
|
+
import {mergeProps} from '@zag-js/svelte';
|
11
|
+
import {useNumberInputContext} from './context.svelte.js';
|
12
|
+
|
13
|
+
let {children, ...props}: NumberInputDecrementTriggerProps = $props();
|
14
|
+
|
15
|
+
let context = useNumberInputContext();
|
16
|
+
|
17
|
+
let attrs = $derived(mergeProps(props, context.getDecrementTriggerProps()));
|
18
|
+
</script>
|
19
|
+
|
20
|
+
<button type="button" {...attrs}>
|
21
|
+
{@render children?.()}
|
22
|
+
</button>
|
@@ -1,12 +1,22 @@
|
|
1
|
-
<script lang="ts" context="module"
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
{
|
12
|
-
|
1
|
+
<script lang="ts" context="module">
|
2
|
+
import type {Assign} from '../types.js';
|
3
|
+
import type {SvelteHTMLElements} from 'svelte/elements';
|
4
|
+
|
5
|
+
export interface NumberInputIncrementTriggerProps
|
6
|
+
extends Assign<SvelteHTMLElements['button'], {}> {}
|
7
|
+
</script>
|
8
|
+
|
9
|
+
<script lang="ts">
|
10
|
+
import {mergeProps} from '@zag-js/svelte';
|
11
|
+
import {useNumberInputContext} from './context.svelte.js';
|
12
|
+
|
13
|
+
let {children, ...props}: NumberInputIncrementTriggerProps = $props();
|
14
|
+
|
15
|
+
let context = useNumberInputContext();
|
16
|
+
|
17
|
+
let attrs = $derived(mergeProps(props, context.getIncrementTriggerProps()));
|
18
|
+
</script>
|
19
|
+
|
20
|
+
<button type="button" {...attrs}>
|
21
|
+
{@render children?.()}
|
22
|
+
</button>
|
@@ -1,10 +1,19 @@
|
|
1
|
-
<script lang="ts" context="module"
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
1
|
+
<script lang="ts" context="module">
|
2
|
+
import type {Assign} from '../types.js';
|
3
|
+
import type {SvelteHTMLElements} from 'svelte/elements';
|
4
|
+
|
5
|
+
export interface NumberInputInputProps extends Assign<SvelteHTMLElements['input'], {}> {}
|
6
|
+
</script>
|
7
|
+
|
8
|
+
<script lang="ts">
|
9
|
+
import {mergeProps} from '@zag-js/svelte';
|
10
|
+
import {useNumberInputContext} from './context.svelte.js';
|
11
|
+
|
12
|
+
let {...props}: NumberInputInputProps = $props();
|
13
|
+
|
14
|
+
let context = useNumberInputContext();
|
15
|
+
|
16
|
+
let attrs = $derived(mergeProps(props, context.getInputProps()));
|
17
|
+
</script>
|
18
|
+
|
19
|
+
<input {...attrs} />
|
@@ -1,12 +1,21 @@
|
|
1
|
-
<script lang="ts" context="module"
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
1
|
+
<script lang="ts" context="module">
|
2
|
+
import type {Assign} from '../types.js';
|
3
|
+
import type {SvelteHTMLElements} from 'svelte/elements';
|
4
|
+
|
5
|
+
export interface NumberInputLabelProps extends Assign<SvelteHTMLElements['label'], {}> {}
|
6
|
+
</script>
|
7
|
+
|
8
|
+
<script lang="ts">
|
9
|
+
import {mergeProps} from '@zag-js/svelte';
|
10
|
+
import {useNumberInputContext} from './context.svelte.js';
|
11
|
+
|
12
|
+
let {children, ...props}: NumberInputLabelProps = $props();
|
13
|
+
|
14
|
+
let context = useNumberInputContext();
|
15
|
+
|
16
|
+
let attrs = $derived(mergeProps(props, context.getLabelProps()));
|
17
|
+
</script>
|
18
|
+
|
19
|
+
<label {...attrs}>
|
20
|
+
{@render children?.()}
|
21
|
+
</label>
|
@@ -1,72 +1,93 @@
|
|
1
|
-
<script lang="ts" context="module"
|
2
|
-
|
3
|
-
|
4
|
-
import {
|
5
|
-
import {
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
1
|
+
<script lang="ts" context="module">
|
2
|
+
import type {Assign, OptionalId, WithoutChildren} from '../types.js';
|
3
|
+
import type {Snippet} from 'svelte';
|
4
|
+
import type {SvelteHTMLElements} from 'svelte/elements';
|
5
|
+
import type {
|
6
|
+
CreateNumberInputContextProps,
|
7
|
+
CreateNumberInputContextReturn,
|
8
|
+
} from './context.svelte.js';
|
9
|
+
|
10
|
+
export interface NumberInputProps
|
11
|
+
extends Assign<
|
12
|
+
WithoutChildren<SvelteHTMLElements['div']>,
|
13
|
+
OptionalId<CreateNumberInputContextProps>
|
14
|
+
> {
|
15
|
+
children?: Snippet<[CreateNumberInputContextReturn]>;
|
16
|
+
}
|
17
|
+
</script>
|
18
|
+
|
19
|
+
<script lang="ts">
|
20
|
+
import {uuid} from '../utils.svelte.js';
|
21
|
+
import {mergeProps} from '@zag-js/svelte';
|
22
|
+
import {createNumberInputContext, setNumberInputContext} from './context.svelte.js';
|
23
|
+
|
24
|
+
let {
|
25
|
+
id = uuid(),
|
26
|
+
ids,
|
27
|
+
dir,
|
28
|
+
max,
|
29
|
+
min,
|
30
|
+
step,
|
31
|
+
name,
|
32
|
+
form,
|
33
|
+
value,
|
34
|
+
locale,
|
35
|
+
pattern,
|
36
|
+
invalid,
|
37
|
+
disabled,
|
38
|
+
readOnly,
|
39
|
+
required,
|
40
|
+
inputMode,
|
41
|
+
spinOnPress,
|
42
|
+
translations,
|
43
|
+
formatOptions,
|
44
|
+
allowOverflow,
|
45
|
+
allowMouseWheel,
|
46
|
+
clampValueOnBlur,
|
47
|
+
focusInputOnChange,
|
48
|
+
onFocusChange,
|
49
|
+
onValueChange,
|
50
|
+
onValueInvalid,
|
51
|
+
getRootNode,
|
52
|
+
children,
|
53
|
+
...props
|
54
|
+
}: NumberInputProps = $props();
|
55
|
+
|
56
|
+
let context = createNumberInputContext({
|
57
|
+
id,
|
58
|
+
ids,
|
59
|
+
dir,
|
60
|
+
max,
|
61
|
+
min,
|
62
|
+
step,
|
63
|
+
name,
|
64
|
+
form,
|
65
|
+
value: $state.snapshot(value),
|
66
|
+
locale,
|
67
|
+
pattern,
|
68
|
+
invalid,
|
69
|
+
disabled,
|
70
|
+
readOnly,
|
71
|
+
required,
|
72
|
+
inputMode,
|
73
|
+
spinOnPress,
|
74
|
+
translations,
|
75
|
+
formatOptions,
|
76
|
+
allowOverflow,
|
77
|
+
allowMouseWheel,
|
78
|
+
clampValueOnBlur,
|
79
|
+
focusInputOnChange,
|
80
|
+
onFocusChange,
|
81
|
+
onValueChange,
|
82
|
+
onValueInvalid,
|
83
|
+
getRootNode,
|
84
|
+
});
|
85
|
+
|
86
|
+
let attrs = $derived(mergeProps(props, context.getRootProps()));
|
87
|
+
|
88
|
+
setNumberInputContext(context);
|
89
|
+
</script>
|
90
|
+
|
91
|
+
<div {...attrs}>
|
92
|
+
{@render children?.(context)}
|
93
|
+
</div>
|