ui-ingredients 0.0.26 → 0.0.27
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +80 -80
- package/dist/accordion/item-content.svelte +2 -3
- package/dist/accordion/item-indicator.svelte +5 -6
- package/dist/accordion/item-trigger.svelte +2 -3
- package/dist/accordion/item.svelte +2 -2
- package/dist/accordion/root.svelte +2 -4
- package/dist/avatar/fallback.svelte +5 -6
- package/dist/avatar/image.svelte +2 -3
- package/dist/avatar/root.svelte +2 -2
- package/dist/carousel/indicator-group.svelte +2 -3
- package/dist/carousel/indicator.svelte +2 -3
- package/dist/carousel/item-group.svelte +2 -3
- package/dist/carousel/item.svelte +2 -2
- package/dist/carousel/next-trigger.svelte +2 -3
- package/dist/carousel/prev-trigger.svelte +2 -3
- package/dist/carousel/root.svelte +2 -2
- package/dist/carousel/viewport.svelte +2 -3
- package/dist/checkbox/control.svelte +2 -3
- package/dist/checkbox/indicator.svelte +2 -3
- package/dist/checkbox/label.svelte +5 -6
- package/dist/checkbox/root.svelte +2 -4
- package/dist/clipboard/control.svelte +2 -3
- package/dist/clipboard/indicator.svelte +5 -6
- package/dist/clipboard/input.svelte +2 -3
- package/dist/clipboard/label.svelte +2 -4
- package/dist/clipboard/root.svelte +2 -4
- package/dist/clipboard/trigger.svelte +2 -3
- package/dist/collapsible/content.svelte +2 -3
- package/dist/collapsible/root.svelte +2 -4
- package/dist/collapsible/trigger.svelte +2 -3
- package/dist/combobox/clear-trigger.svelte +2 -3
- package/dist/combobox/content.svelte +2 -3
- package/dist/combobox/control.svelte +2 -3
- package/dist/combobox/input.svelte +2 -3
- package/dist/combobox/item-group-label.svelte +5 -6
- package/dist/combobox/item-group.svelte +2 -3
- package/dist/combobox/item-indicator.svelte +5 -6
- package/dist/combobox/item-text.svelte +5 -6
- package/dist/combobox/item.svelte +2 -2
- package/dist/combobox/label.svelte +2 -3
- package/dist/combobox/list.svelte +2 -3
- package/dist/combobox/positioner.svelte +2 -3
- package/dist/combobox/root.svelte +2 -2
- package/dist/combobox/trigger.svelte +2 -3
- package/dist/date-picker/clear-trigger.svelte +2 -3
- package/dist/date-picker/content.svelte +2 -3
- package/dist/date-picker/control.svelte +2 -3
- package/dist/date-picker/day-table-cell-trigger.svelte +2 -3
- package/dist/date-picker/day-table-cell.svelte +5 -5
- package/dist/date-picker/input.svelte +2 -3
- package/dist/date-picker/label.svelte +2 -3
- package/dist/date-picker/month-select.svelte +2 -3
- package/dist/date-picker/month-table-cell-trigger.svelte +2 -3
- package/dist/date-picker/month-table-cell.svelte +5 -5
- package/dist/date-picker/next-trigger.svelte +2 -3
- package/dist/date-picker/positioner.svelte +2 -3
- package/dist/date-picker/preset-trigger.svelte +2 -4
- package/dist/date-picker/prev-trigger.svelte +2 -3
- package/dist/date-picker/range-text.svelte +5 -6
- package/dist/date-picker/root.svelte +2 -4
- package/dist/date-picker/table-body.svelte +5 -6
- package/dist/date-picker/table-head.svelte +5 -6
- package/dist/date-picker/table-header.svelte +5 -6
- package/dist/date-picker/table-row.svelte +5 -6
- package/dist/date-picker/table.svelte +6 -6
- package/dist/date-picker/trigger.svelte +2 -3
- package/dist/date-picker/view-control.svelte +2 -3
- package/dist/date-picker/view-trigger.svelte +2 -3
- package/dist/date-picker/view.svelte +2 -3
- package/dist/date-picker/year-select.svelte +2 -3
- package/dist/date-picker/year-table-cell-trigger.svelte +2 -3
- package/dist/date-picker/year-table-cell.svelte +5 -5
- package/dist/dialog/backdrop.svelte +2 -3
- package/dist/dialog/close-trigger.svelte +2 -3
- package/dist/dialog/content.svelte +2 -3
- package/dist/dialog/description.svelte +5 -6
- package/dist/dialog/title.svelte +5 -6
- package/dist/dialog/trigger.svelte +2 -3
- package/dist/editable/area.svelte +2 -3
- package/dist/editable/cancel-trigger.svelte +2 -3
- package/dist/editable/control.svelte +2 -3
- package/dist/editable/edit-trigger.svelte +2 -3
- package/dist/editable/input.svelte +2 -3
- package/dist/editable/label.svelte +2 -3
- package/dist/editable/preview.svelte +2 -3
- package/dist/editable/root.svelte +73 -4
- package/dist/editable/submit-trigger.svelte +3 -4
- package/dist/file-upload/dropzone.svelte +2 -3
- package/dist/file-upload/item-delete-trigger.svelte +2 -3
- package/dist/file-upload/item-group.svelte +2 -3
- package/dist/file-upload/item-name.svelte +5 -6
- package/dist/file-upload/item-preview-image.svelte +2 -3
- package/dist/file-upload/item-preview.svelte +2 -3
- package/dist/file-upload/item-size-text.svelte +5 -6
- package/dist/file-upload/item.svelte +2 -3
- package/dist/file-upload/label.svelte +2 -3
- package/dist/file-upload/root.svelte +10 -4
- package/dist/file-upload/trigger.svelte +2 -3
- package/dist/hover-card/arrow-tip.svelte +5 -6
- package/dist/hover-card/arrow.svelte +5 -6
- package/dist/hover-card/content.svelte +2 -3
- package/dist/hover-card/positioner.svelte +2 -3
- package/dist/hover-card/trigger.svelte +5 -6
- package/dist/menu/arrow-tip.svelte +5 -6
- package/dist/menu/arrow.svelte +5 -6
- package/dist/menu/content.svelte +2 -3
- package/dist/menu/context-trigger.svelte +2 -3
- package/dist/menu/indicator.svelte +5 -6
- package/dist/menu/item-group-label.svelte +5 -6
- package/dist/menu/item-group.svelte +2 -4
- package/dist/menu/item.svelte +11 -5
- package/dist/menu/option-item-indicator.svelte +5 -6
- package/dist/menu/option-item-text.svelte +5 -6
- package/dist/menu/option-item.svelte +2 -2
- package/dist/menu/positioner.svelte +2 -3
- package/dist/menu/separator.svelte +2 -3
- package/dist/menu/trigger-item.svelte +2 -3
- package/dist/menu/trigger.svelte +2 -3
- package/dist/number-input/control.svelte +2 -3
- package/dist/number-input/decrement-trigger.svelte +2 -3
- package/dist/number-input/increment-trigger.svelte +2 -3
- package/dist/number-input/input.svelte +2 -3
- package/dist/number-input/label.svelte +2 -3
- package/dist/number-input/root.svelte +2 -4
- package/dist/number-input/scrubber.svelte +2 -3
- package/dist/pagination/ellipsis.svelte +5 -6
- package/dist/pagination/item.svelte +2 -3
- package/dist/pagination/next-trigger.svelte +2 -3
- package/dist/pagination/prev-trigger.svelte +2 -3
- package/dist/pagination/root.svelte +2 -4
- package/dist/pin-input/clear-trigger.svelte +2 -3
- package/dist/pin-input/input.svelte +2 -3
- package/dist/pin-input/label.svelte +2 -3
- package/dist/pin-input/root.svelte +2 -2
- package/dist/popover/arrow-tip.svelte +5 -6
- package/dist/popover/arrow.svelte +5 -6
- package/dist/popover/close-trigger.svelte +2 -3
- package/dist/popover/content.svelte +2 -3
- package/dist/popover/description.svelte +5 -6
- package/dist/popover/positioner.svelte +2 -3
- package/dist/popover/title.svelte +5 -6
- package/dist/popover/trigger.svelte +2 -3
- package/dist/progress/circle-range.svelte +2 -3
- package/dist/progress/circle-track.svelte +2 -3
- package/dist/progress/circle.svelte +2 -3
- package/dist/progress/label.svelte +5 -6
- package/dist/progress/range.svelte +2 -3
- package/dist/progress/root.svelte +2 -2
- package/dist/progress/track.svelte +2 -3
- package/dist/progress/value-text.svelte +5 -6
- package/dist/progress/view.svelte +2 -3
- package/dist/qr-code/frame.svelte +2 -3
- package/dist/qr-code/overlay.svelte +2 -3
- package/dist/qr-code/pattern.svelte +2 -3
- package/dist/qr-code/root.svelte +2 -2
- package/dist/radio-group/indicator.svelte +5 -6
- package/dist/radio-group/item-control.svelte +2 -3
- package/dist/radio-group/item-text.svelte +5 -6
- package/dist/radio-group/item.svelte +2 -2
- package/dist/radio-group/label.svelte +5 -6
- package/dist/radio-group/root.svelte +2 -4
- package/dist/rating-group/control.svelte +2 -3
- package/dist/rating-group/item.svelte +2 -2
- package/dist/rating-group/label.svelte +2 -3
- package/dist/rating-group/root.svelte +2 -4
- package/dist/segment-group/indicator.svelte +5 -6
- package/dist/segment-group/item-control.svelte +2 -4
- package/dist/segment-group/item-text.svelte +5 -6
- package/dist/segment-group/item.svelte +2 -2
- package/dist/segment-group/label.svelte +5 -6
- package/dist/segment-group/root.svelte +2 -4
- package/dist/select/clear-trigger.svelte +2 -3
- package/dist/select/content.svelte +2 -3
- package/dist/select/control.svelte +2 -3
- package/dist/select/indicator.svelte +5 -6
- package/dist/select/item-group-label.svelte +5 -6
- package/dist/select/item-group.svelte +2 -3
- package/dist/select/item-indicator.svelte +5 -6
- package/dist/select/item-text.svelte +5 -6
- package/dist/select/item.svelte +2 -2
- package/dist/select/label.svelte +2 -3
- package/dist/select/list.svelte +2 -3
- package/dist/select/positioner.svelte +2 -3
- package/dist/select/root.svelte +2 -2
- package/dist/select/trigger.svelte +2 -3
- package/dist/select/value-text.svelte +5 -6
- package/dist/signature-pad/clear-trigger.svelte +2 -3
- package/dist/signature-pad/control.svelte +2 -3
- package/dist/signature-pad/current-segment-path.svelte +2 -3
- package/dist/signature-pad/guide.svelte +2 -3
- package/dist/signature-pad/label.svelte +2 -3
- package/dist/signature-pad/root.svelte +2 -4
- package/dist/signature-pad/segment-path.svelte +2 -3
- package/dist/signature-pad/segment.svelte +2 -3
- package/dist/slider/control.svelte +2 -3
- package/dist/slider/label.svelte +2 -3
- package/dist/slider/marker-group.svelte +2 -3
- package/dist/slider/marker.svelte +2 -3
- package/dist/slider/range.svelte +2 -3
- package/dist/slider/root.svelte +2 -2
- package/dist/slider/thumb.svelte +2 -3
- package/dist/slider/track.svelte +2 -3
- package/dist/slider/value-text.svelte +5 -6
- package/dist/splitter/panel.svelte +2 -3
- package/dist/splitter/resize-trigger.svelte +2 -2
- package/dist/splitter/root.svelte +2 -2
- package/dist/steps/completed-content.svelte +2 -3
- package/dist/steps/content.svelte +2 -3
- package/dist/steps/indicator.svelte +5 -6
- package/dist/steps/item.svelte +2 -2
- package/dist/steps/list.svelte +2 -4
- package/dist/steps/next-trigger.svelte +2 -3
- package/dist/steps/prev-trigger.svelte +2 -3
- package/dist/steps/progress.svelte +2 -3
- package/dist/steps/root.svelte +2 -2
- package/dist/steps/separator.svelte +5 -6
- package/dist/steps/trigger.svelte +2 -3
- package/dist/switch/control.svelte +2 -3
- package/dist/switch/label.svelte +5 -6
- package/dist/switch/root.svelte +3 -3
- package/dist/switch/thumb.svelte +2 -3
- package/dist/tabs/content.svelte +2 -3
- package/dist/tabs/list.svelte +2 -3
- package/dist/tabs/root.svelte +2 -2
- package/dist/tabs/trigger.svelte +2 -3
- package/dist/tags-input/clear-trigger.svelte +2 -3
- package/dist/tags-input/control.svelte +2 -3
- package/dist/tags-input/input.svelte +2 -3
- package/dist/tags-input/item-delete-trigger.svelte +2 -3
- package/dist/tags-input/item-input.svelte +2 -4
- package/dist/tags-input/item-preview.svelte +2 -3
- package/dist/tags-input/item-text.svelte +5 -6
- package/dist/tags-input/item.svelte +2 -2
- package/dist/tags-input/label.svelte +2 -3
- package/dist/tags-input/root.svelte +2 -4
- package/dist/time-picker/clear-trigger.svelte +2 -3
- package/dist/time-picker/column.svelte +2 -3
- package/dist/time-picker/content.svelte +2 -3
- package/dist/time-picker/control.svelte +2 -3
- package/dist/time-picker/hour-cell.svelte +2 -3
- package/dist/time-picker/input.svelte +2 -3
- package/dist/time-picker/label.svelte +2 -3
- package/dist/time-picker/minute-cell.svelte +2 -3
- package/dist/time-picker/period-cell.svelte +2 -4
- package/dist/time-picker/positioner.svelte +2 -3
- package/dist/time-picker/root.svelte +2 -4
- package/dist/time-picker/second-cell.svelte +2 -3
- package/dist/time-picker/spacer.svelte +5 -6
- package/dist/time-picker/trigger.svelte +2 -3
- package/dist/timer/action-trigger.svelte +2 -3
- package/dist/timer/item-label.svelte +5 -6
- package/dist/timer/item-value.svelte +2 -3
- package/dist/timer/item.svelte +2 -3
- package/dist/timer/root.svelte +2 -2
- package/dist/timer/separator.svelte +5 -6
- package/dist/toast/action-trigger.svelte +2 -3
- package/dist/toast/close-trigger.svelte +2 -3
- package/dist/toast/description.svelte +5 -6
- package/dist/toast/ghost-after.svelte +18 -0
- package/dist/toast/ghost-after.svelte.d.ts +18 -0
- package/dist/toast/ghost-before.svelte +18 -0
- package/dist/toast/ghost-before.svelte.d.ts +18 -0
- package/dist/toast/index.d.ts +2 -0
- package/dist/toast/root.svelte +2 -2
- package/dist/toast/title.svelte +5 -6
- package/dist/toast/toast.d.ts +2 -0
- package/dist/toast/toast.js +2 -0
- package/dist/toast/toaster.svelte +3 -3
- package/dist/toggle-group/item.svelte +2 -2
- package/dist/toggle-group/root.svelte +2 -4
- package/dist/tooltip/arrow-tip.svelte +5 -6
- package/dist/tooltip/arrow.svelte +5 -6
- package/dist/tooltip/content.svelte +2 -3
- package/dist/tooltip/positioner.svelte +2 -3
- package/dist/tooltip/trigger.svelte +2 -3
- package/dist/tree-view/branch-content.svelte +2 -3
- package/dist/tree-view/branch-control.svelte +2 -3
- package/dist/tree-view/branch-indicator.svelte +5 -6
- package/dist/tree-view/branch-text.svelte +5 -6
- package/dist/tree-view/branch-trigger.svelte +2 -3
- package/dist/tree-view/branch.svelte +2 -2
- package/dist/tree-view/item-indicator.svelte +5 -6
- package/dist/tree-view/item-text.svelte +5 -6
- package/dist/tree-view/item.svelte +2 -2
- package/dist/tree-view/label.svelte +5 -6
- package/dist/tree-view/root.svelte +2 -2
- package/dist/tree-view/tree.svelte +2 -3
- package/dist/types.d.ts +6 -0
- package/package.json +1 -1
package/README.md
CHANGED
@@ -1,80 +1,80 @@
|
|
1
|
-
# UI Ingredients
|
2
|
-
|
3
|
-
Headless component library for [Svelte](https://svelte.dev/) powered by [zag](https://zagjs.com/)
|
4
|
-
|
5
|
-
## Installation
|
6
|
-
|
7
|
-
```bash
|
8
|
-
npm install ui-ingredients
|
9
|
-
```
|
10
|
-
|
11
|
-
## Usage
|
12
|
-
|
13
|
-
```svelte
|
14
|
-
<script>
|
15
|
-
import {Clipboard} from 'ui-ingredients';
|
16
|
-
|
17
|
-
let {data} = $props();
|
18
|
-
</script>
|
19
|
-
|
20
|
-
<Clipboard.Root value={data.token}>
|
21
|
-
<Clipboard.Label>Token</Clipboard.Label>
|
22
|
-
<Clipboard.Control>
|
23
|
-
<Clipboard.Input />
|
24
|
-
<Clipboard.Trigger>
|
25
|
-
<Clipboard.Indicator copied>
|
26
|
-
<CheckIcon />
|
27
|
-
</Clipboard.Indicator>
|
28
|
-
<Clipboard.Indicator>
|
29
|
-
<CopyIcon />
|
30
|
-
</Clipboard.Indicator>
|
31
|
-
</Clipboard.Trigger>
|
32
|
-
</Clipboard.Control>
|
33
|
-
</Clipboard.Root>
|
34
|
-
```
|
35
|
-
|
36
|
-
## Components
|
37
|
-
|
38
|
-
- 🟢 Accordion
|
39
|
-
- 🟢 Avatar
|
40
|
-
- 🟢 Carousel
|
41
|
-
- 🟢 Checkbox
|
42
|
-
- 🟢 Clipboard
|
43
|
-
- 🟢 Collapsible
|
44
|
-
-
|
45
|
-
- 🟢 Combobox
|
46
|
-
- 🟢 DatePicker
|
47
|
-
- 🟢 Dialog
|
48
|
-
- 🟢 Editable
|
49
|
-
- 🟢 FileUpload
|
50
|
-
- ⚪ FloatingPanel
|
51
|
-
- 🟢 HoverCard
|
52
|
-
- 🟢 Menu
|
53
|
-
- 🟢 NumberInput
|
54
|
-
- 🟢 Pagination
|
55
|
-
- 🟢 PinInput
|
56
|
-
- 🟢 Popover
|
57
|
-
- 🟢 Portal
|
58
|
-
- 🟡 Presence
|
59
|
-
- 🟢 Progress
|
60
|
-
- 🟢 QRCode
|
61
|
-
- 🟢 RadioGroup
|
62
|
-
- 🟢 RatingGroup
|
63
|
-
- 🟢 Select
|
64
|
-
- 🟢 SegmentGroup
|
65
|
-
- 🟢 SignaturePad
|
66
|
-
- 🟢 Slider
|
67
|
-
- 🟢 Splitter
|
68
|
-
- 🟢 Steps
|
69
|
-
- 🟢 Switch
|
70
|
-
- 🟢 Tabs
|
71
|
-
- 🟢 TagsInput
|
72
|
-
- 🟢 TimePicker
|
73
|
-
- 🟢 Timer
|
74
|
-
- 🟢 Toast
|
75
|
-
- 🟢 ToggleGroup
|
76
|
-
- 🟢 Tooltip
|
77
|
-
- ⚪ Tour
|
78
|
-
- 🟢 TreeView
|
79
|
-
|
80
|
-
View components demo [here](https://ui-ingredients.vercel.app/)
|
1
|
+
# UI Ingredients
|
2
|
+
|
3
|
+
Headless component library for [Svelte](https://svelte.dev/) powered by [zag](https://zagjs.com/)
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
```bash
|
8
|
+
npm install ui-ingredients
|
9
|
+
```
|
10
|
+
|
11
|
+
## Usage
|
12
|
+
|
13
|
+
```svelte
|
14
|
+
<script>
|
15
|
+
import {Clipboard} from 'ui-ingredients';
|
16
|
+
|
17
|
+
let {data} = $props();
|
18
|
+
</script>
|
19
|
+
|
20
|
+
<Clipboard.Root value={data.token}>
|
21
|
+
<Clipboard.Label>Token</Clipboard.Label>
|
22
|
+
<Clipboard.Control>
|
23
|
+
<Clipboard.Input />
|
24
|
+
<Clipboard.Trigger>
|
25
|
+
<Clipboard.Indicator copied>
|
26
|
+
<CheckIcon />
|
27
|
+
</Clipboard.Indicator>
|
28
|
+
<Clipboard.Indicator>
|
29
|
+
<CopyIcon />
|
30
|
+
</Clipboard.Indicator>
|
31
|
+
</Clipboard.Trigger>
|
32
|
+
</Clipboard.Control>
|
33
|
+
</Clipboard.Root>
|
34
|
+
```
|
35
|
+
|
36
|
+
## Components
|
37
|
+
|
38
|
+
- 🟢 Accordion
|
39
|
+
- 🟢 Avatar
|
40
|
+
- 🟢 Carousel
|
41
|
+
- 🟢 Checkbox
|
42
|
+
- 🟢 Clipboard
|
43
|
+
- 🟢 Collapsible
|
44
|
+
- ⚪ ColorPicker
|
45
|
+
- 🟢 Combobox
|
46
|
+
- 🟢 DatePicker
|
47
|
+
- 🟢 Dialog
|
48
|
+
- 🟢 Editable
|
49
|
+
- 🟢 FileUpload
|
50
|
+
- ⚪ FloatingPanel
|
51
|
+
- 🟢 HoverCard
|
52
|
+
- 🟢 Menu
|
53
|
+
- 🟢 NumberInput
|
54
|
+
- 🟢 Pagination
|
55
|
+
- 🟢 PinInput
|
56
|
+
- 🟢 Popover
|
57
|
+
- 🟢 Portal
|
58
|
+
- 🟡 Presence
|
59
|
+
- 🟢 Progress
|
60
|
+
- 🟢 QRCode
|
61
|
+
- 🟢 RadioGroup
|
62
|
+
- 🟢 RatingGroup
|
63
|
+
- 🟢 Select
|
64
|
+
- 🟢 SegmentGroup
|
65
|
+
- 🟢 SignaturePad
|
66
|
+
- 🟢 Slider
|
67
|
+
- 🟢 Splitter
|
68
|
+
- 🟢 Steps
|
69
|
+
- 🟢 Switch
|
70
|
+
- 🟢 Tabs
|
71
|
+
- 🟢 TagsInput
|
72
|
+
- 🟢 TimePicker
|
73
|
+
- 🟢 Timer
|
74
|
+
- 🟢 Toast
|
75
|
+
- 🟢 ToggleGroup
|
76
|
+
- 🟢 Tooltip
|
77
|
+
- ⚪ Tour
|
78
|
+
- 🟢 TreeView
|
79
|
+
|
80
|
+
View components demo [here](https://ui-ingredients.vercel.app/)
|
@@ -1,9 +1,8 @@
|
|
1
1
|
<script lang="ts" module>
|
2
|
-
import type {
|
3
|
-
import type {Snippet} from 'svelte';
|
2
|
+
import type {AsChild, HtmlProps} from '../types.js';
|
4
3
|
|
5
4
|
export interface AccordionItemContentProps extends HtmlProps<'div'> {
|
6
|
-
asChild?:
|
5
|
+
asChild?: AsChild;
|
7
6
|
}
|
8
7
|
</script>
|
9
8
|
|
@@ -1,9 +1,8 @@
|
|
1
1
|
<script lang="ts" module>
|
2
|
-
import type {
|
3
|
-
import type {Snippet} from 'svelte';
|
2
|
+
import type {AsChild, HtmlProps} from '../types.js';
|
4
3
|
|
5
|
-
export interface AccordionIndicatorProps extends HtmlProps<'
|
6
|
-
asChild?:
|
4
|
+
export interface AccordionIndicatorProps extends HtmlProps<'span'> {
|
5
|
+
asChild?: AsChild;
|
7
6
|
}
|
8
7
|
</script>
|
9
8
|
|
@@ -22,7 +21,7 @@
|
|
22
21
|
{#if asChild}
|
23
22
|
{@render asChild(attrs)}
|
24
23
|
{:else}
|
25
|
-
<
|
24
|
+
<span {...attrs}>
|
26
25
|
{@render children?.()}
|
27
|
-
</
|
26
|
+
</span>
|
28
27
|
{/if}
|
@@ -1,9 +1,8 @@
|
|
1
1
|
<script lang="ts" module>
|
2
|
-
import type {HtmlProps} from '../types.js';
|
3
|
-
import type {Snippet} from 'svelte';
|
2
|
+
import type {AsChild, HtmlProps} from '../types.js';
|
4
3
|
|
5
4
|
export interface AccordionItemTriggerProps extends HtmlProps<'button'> {
|
6
|
-
asChild?:
|
5
|
+
asChild?: AsChild<HtmlProps<'button'>>;
|
7
6
|
}
|
8
7
|
</script>
|
9
8
|
|
@@ -1,11 +1,11 @@
|
|
1
1
|
<script lang="ts" module>
|
2
|
-
import type {
|
2
|
+
import type {AsChild, Assign, HtmlProps} from '../types.js';
|
3
3
|
import type {ItemProps, ItemState} from '@zag-js/accordion';
|
4
4
|
import type {Snippet} from 'svelte';
|
5
5
|
|
6
6
|
export interface AccordionItemProps
|
7
7
|
extends Assign<Omit<HtmlProps<'div'>, 'children'>, ItemProps> {
|
8
|
-
asChild?:
|
8
|
+
asChild?: AsChild;
|
9
9
|
children?: Snippet<[state: ItemState]>;
|
10
10
|
}
|
11
11
|
</script>
|
@@ -1,13 +1,11 @@
|
|
1
1
|
<script lang="ts" module>
|
2
|
-
import type {Assign, HtmlProps} from '../types.js';
|
2
|
+
import type {AsChild, Assign, GenericHtmlProps, HtmlProps} from '../types.js';
|
3
3
|
import type {Snippet} from 'svelte';
|
4
4
|
import type {CreateAccordionProps, CreateAccordionReturn} from './create-accordion.svelte.js';
|
5
5
|
|
6
6
|
export interface AccordionProps
|
7
7
|
extends Assign<Omit<HtmlProps<'div'>, 'children'>, CreateAccordionProps> {
|
8
|
-
asChild?:
|
9
|
-
[attrs: Omit<HtmlProps<'div'>, 'children'>, accordion: CreateAccordionReturn]
|
10
|
-
>;
|
8
|
+
asChild?: AsChild<GenericHtmlProps, CreateAccordionReturn>;
|
11
9
|
children?: Snippet<[accordion: CreateAccordionReturn]>;
|
12
10
|
}
|
13
11
|
</script>
|
@@ -1,9 +1,8 @@
|
|
1
1
|
<script lang="ts" module>
|
2
|
-
import type {
|
3
|
-
import type {Snippet} from 'svelte';
|
2
|
+
import type {AsChild, HtmlProps} from '../types.js';
|
4
3
|
|
5
|
-
export interface AvatarFallbackProps extends HtmlProps<'
|
6
|
-
asChild?:
|
4
|
+
export interface AvatarFallbackProps extends HtmlProps<'span'> {
|
5
|
+
asChild?: AsChild;
|
7
6
|
}
|
8
7
|
</script>
|
9
8
|
|
@@ -21,7 +20,7 @@
|
|
21
20
|
{#if asChild}
|
22
21
|
{@render asChild(attrs)}
|
23
22
|
{:else}
|
24
|
-
<
|
23
|
+
<span {...attrs}>
|
25
24
|
{@render children?.()}
|
26
|
-
</
|
25
|
+
</span>
|
27
26
|
{/if}
|
package/dist/avatar/image.svelte
CHANGED
@@ -1,9 +1,8 @@
|
|
1
1
|
<script lang="ts" module>
|
2
|
-
import type {HtmlProps} from '../types.js';
|
3
|
-
import type {Snippet} from 'svelte';
|
2
|
+
import type {AsChild, HtmlProps} from '../types.js';
|
4
3
|
|
5
4
|
export interface AvatarImageProps extends HtmlProps<'img'> {
|
6
|
-
asChild?:
|
5
|
+
asChild?: AsChild<HtmlProps<'img'>>;
|
7
6
|
}
|
8
7
|
</script>
|
9
8
|
|
package/dist/avatar/root.svelte
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
<script lang="ts" module>
|
2
|
-
import type {Assign, GenericHtmlProps, HtmlProps} from '../types.js';
|
2
|
+
import type {AsChild, Assign, GenericHtmlProps, HtmlProps} from '../types.js';
|
3
3
|
import type {Snippet} from 'svelte';
|
4
4
|
import {type CreateAvatarProps, type CreateAvatarReturn} from './create-avatar.svelte.js';
|
5
5
|
|
6
6
|
export interface AvatarProps
|
7
7
|
extends Assign<Omit<HtmlProps<'div'>, 'children'>, CreateAvatarProps> {
|
8
|
-
asChild?:
|
8
|
+
asChild?: AsChild<GenericHtmlProps, CreateAvatarReturn>;
|
9
9
|
children?: Snippet<[avatar: CreateAvatarReturn]>;
|
10
10
|
}
|
11
11
|
</script>
|
@@ -1,9 +1,8 @@
|
|
1
1
|
<script lang="ts" module>
|
2
|
-
import type {
|
3
|
-
import type {Snippet} from 'svelte';
|
2
|
+
import type {AsChild, HtmlProps} from '../types.js';
|
4
3
|
|
5
4
|
export interface CarouselIndicatorGroupProps extends HtmlProps<'div'> {
|
6
|
-
asChild?:
|
5
|
+
asChild?: AsChild;
|
7
6
|
}
|
8
7
|
</script>
|
9
8
|
|
@@ -1,10 +1,9 @@
|
|
1
1
|
<script lang="ts" module>
|
2
|
-
import type {Assign, HtmlProps} from '../types.js';
|
2
|
+
import type {AsChild, Assign, HtmlProps} from '../types.js';
|
3
3
|
import type {IndicatorProps} from '@zag-js/carousel';
|
4
|
-
import type {Snippet} from 'svelte';
|
5
4
|
|
6
5
|
export interface CarouselIndicatorProps extends Assign<HtmlProps<'button'>, IndicatorProps> {
|
7
|
-
asChild?:
|
6
|
+
asChild?: AsChild<HtmlProps<'button'>>;
|
8
7
|
}
|
9
8
|
</script>
|
10
9
|
|
@@ -1,9 +1,8 @@
|
|
1
1
|
<script lang="ts" module>
|
2
|
-
import type {
|
3
|
-
import type {Snippet} from 'svelte';
|
2
|
+
import type {AsChild, HtmlProps} from '../types.js';
|
4
3
|
|
5
4
|
export interface CarouselItemGroupProps extends HtmlProps<'div'> {
|
6
|
-
asChild?:
|
5
|
+
asChild?: AsChild;
|
7
6
|
}
|
8
7
|
</script>
|
9
8
|
|
@@ -1,10 +1,10 @@
|
|
1
1
|
<script lang="ts" module>
|
2
|
-
import type {Assign, GenericHtmlProps, HtmlProps} from '../types.js';
|
2
|
+
import type {AsChild, Assign, GenericHtmlProps, HtmlProps} from '../types.js';
|
3
3
|
import type {ItemProps, ItemState} from '@zag-js/carousel';
|
4
4
|
import type {Snippet} from 'svelte';
|
5
5
|
|
6
6
|
export interface CarouselItemProps extends Assign<Omit<HtmlProps<'div'>, 'children'>, ItemProps> {
|
7
|
-
asChild?:
|
7
|
+
asChild?: AsChild<GenericHtmlProps, ItemState>;
|
8
8
|
children?: Snippet<[state: ItemState]>;
|
9
9
|
}
|
10
10
|
</script>
|
@@ -1,9 +1,8 @@
|
|
1
1
|
<script lang="ts" module>
|
2
|
-
import type {HtmlProps} from '../types.js';
|
3
|
-
import type {Snippet} from 'svelte';
|
2
|
+
import type {AsChild, HtmlProps} from '../types.js';
|
4
3
|
|
5
4
|
export interface CarouselNextTriggerProps extends HtmlProps<'button'> {
|
6
|
-
asChild?:
|
5
|
+
asChild?: AsChild<HtmlProps<'button'>>;
|
7
6
|
}
|
8
7
|
</script>
|
9
8
|
|
@@ -1,9 +1,8 @@
|
|
1
1
|
<script lang="ts" module>
|
2
|
-
import type {HtmlProps} from '../types.js';
|
3
|
-
import type {Snippet} from 'svelte';
|
2
|
+
import type {AsChild, HtmlProps} from '../types.js';
|
4
3
|
|
5
4
|
export interface CarouselPrevTriggerProps extends HtmlProps<'button'> {
|
6
|
-
asChild?:
|
5
|
+
asChild?: AsChild<HtmlProps<'button'>>;
|
7
6
|
}
|
8
7
|
</script>
|
9
8
|
|
@@ -1,11 +1,11 @@
|
|
1
1
|
<script lang="ts" module>
|
2
|
-
import type {Assign, GenericHtmlProps, HtmlProps} from '../types.js';
|
2
|
+
import type {AsChild, Assign, GenericHtmlProps, HtmlProps} from '../types.js';
|
3
3
|
import type {Snippet} from 'svelte';
|
4
4
|
import type {CreateCarouselProps, CreateCarouselReturn} from './create-carousel.svelte.js';
|
5
5
|
|
6
6
|
export interface CarouselProps
|
7
7
|
extends Assign<Omit<HtmlProps<'div'>, 'children'>, CreateCarouselProps> {
|
8
|
-
asChild?:
|
8
|
+
asChild?: AsChild<GenericHtmlProps, CreateCarouselReturn>;
|
9
9
|
children?: Snippet<[carousel: CreateCarouselReturn]>;
|
10
10
|
}
|
11
11
|
</script>
|
@@ -1,9 +1,8 @@
|
|
1
1
|
<script lang="ts" module>
|
2
|
-
import type {
|
3
|
-
import type {Snippet} from 'svelte';
|
2
|
+
import type {AsChild, HtmlProps} from '../types.js';
|
4
3
|
|
5
4
|
export interface CarouselViewportProps extends HtmlProps<'div'> {
|
6
|
-
asChild?:
|
5
|
+
asChild?: AsChild;
|
7
6
|
}
|
8
7
|
</script>
|
9
8
|
|
@@ -1,9 +1,8 @@
|
|
1
1
|
<script lang="ts" module>
|
2
|
-
import type {
|
3
|
-
import type {Snippet} from 'svelte';
|
2
|
+
import type {AsChild, HtmlProps} from '../types.js';
|
4
3
|
|
5
4
|
export interface CheckboxControlProps extends HtmlProps<'div'> {
|
6
|
-
asChild?:
|
5
|
+
asChild?: AsChild;
|
7
6
|
}
|
8
7
|
</script>
|
9
8
|
|
@@ -1,9 +1,8 @@
|
|
1
1
|
<script lang="ts" module>
|
2
|
-
import type {
|
3
|
-
import type {Snippet} from 'svelte';
|
2
|
+
import type {AsChild, HtmlProps} from '../types.js';
|
4
3
|
|
5
4
|
export interface CheckboxIndicatorProps extends HtmlProps<'div'> {
|
6
|
-
asChild?:
|
5
|
+
asChild?: AsChild;
|
7
6
|
}
|
8
7
|
</script>
|
9
8
|
|
@@ -1,9 +1,8 @@
|
|
1
1
|
<script lang="ts" module>
|
2
|
-
import type {
|
3
|
-
import type {Snippet} from 'svelte';
|
2
|
+
import type {AsChild, HtmlProps} from '../types.js';
|
4
3
|
|
5
|
-
export interface CheckboxLabelProps extends HtmlProps<'
|
6
|
-
asChild?:
|
4
|
+
export interface CheckboxLabelProps extends HtmlProps<'span'> {
|
5
|
+
asChild?: AsChild;
|
7
6
|
}
|
8
7
|
</script>
|
9
8
|
|
@@ -21,7 +20,7 @@
|
|
21
20
|
{#if asChild}
|
22
21
|
{@render asChild(attrs)}
|
23
22
|
{:else}
|
24
|
-
<
|
23
|
+
<span {...attrs}>
|
25
24
|
{@render children?.()}
|
26
|
-
</
|
25
|
+
</span>
|
27
26
|
{/if}
|
@@ -1,13 +1,11 @@
|
|
1
1
|
<script lang="ts" module>
|
2
|
-
import type {Assign, HtmlProps} from '../types.js';
|
2
|
+
import type {AsChild, Assign, HtmlProps} from '../types.js';
|
3
3
|
import type {Snippet} from 'svelte';
|
4
4
|
import type {CreateCheckboxProps, CreateCheckboxReturn} from './create-checkbox.svelte.js';
|
5
5
|
|
6
6
|
export interface CheckboxProps
|
7
7
|
extends Assign<Omit<HtmlProps<'label'>, 'children'>, CreateCheckboxProps> {
|
8
|
-
asChild?:
|
9
|
-
[attrs: Omit<HtmlProps<'label'>, 'children'>, checkbox: CreateCheckboxReturn]
|
10
|
-
>;
|
8
|
+
asChild?: AsChild<HtmlProps<'label'>, CreateCheckboxReturn>;
|
11
9
|
children?: Snippet<[checkbox: CreateCheckboxReturn]>;
|
12
10
|
}
|
13
11
|
</script>
|
@@ -1,9 +1,8 @@
|
|
1
1
|
<script lang="ts" module>
|
2
|
-
import type {
|
3
|
-
import type {Snippet} from 'svelte';
|
2
|
+
import type {AsChild, HtmlProps} from '../types.js';
|
4
3
|
|
5
4
|
export interface ClipboardControlProps extends HtmlProps<'div'> {
|
6
|
-
asChild?:
|
5
|
+
asChild?: AsChild;
|
7
6
|
}
|
8
7
|
</script>
|
9
8
|
|
@@ -1,11 +1,10 @@
|
|
1
1
|
<script lang="ts" module>
|
2
|
-
import type {
|
2
|
+
import type {AsChild, Assign, HtmlProps} from '../types.js';
|
3
3
|
import type {IndicatorProps} from '@zag-js/clipboard';
|
4
|
-
import type {Snippet} from 'svelte';
|
5
4
|
|
6
5
|
export interface ClipboardIndicatorProps
|
7
|
-
extends Assign<HtmlProps<'
|
8
|
-
asChild?:
|
6
|
+
extends Assign<HtmlProps<'span'>, Partial<IndicatorProps>> {
|
7
|
+
asChild?: AsChild;
|
9
8
|
}
|
10
9
|
</script>
|
11
10
|
|
@@ -23,7 +22,7 @@
|
|
23
22
|
{#if asChild}
|
24
23
|
{@render asChild(attrs)}
|
25
24
|
{:else}
|
26
|
-
<
|
25
|
+
<span {...attrs}>
|
27
26
|
{@render children?.()}
|
28
|
-
</
|
27
|
+
</span>
|
29
28
|
{/if}
|
@@ -1,9 +1,8 @@
|
|
1
1
|
<script lang="ts" module>
|
2
|
-
import type {HtmlProps} from '../types.js';
|
3
|
-
import type {Snippet} from 'svelte';
|
2
|
+
import type {AsChild, HtmlProps} from '../types.js';
|
4
3
|
|
5
4
|
export interface ClipboardInputProps extends HtmlProps<'input'> {
|
6
|
-
asChild?:
|
5
|
+
asChild?: AsChild<HtmlProps<'input'>>;
|
7
6
|
}
|
8
7
|
</script>
|
9
8
|
|
@@ -1,10 +1,8 @@
|
|
1
1
|
<script lang="ts" module>
|
2
|
-
import type {
|
3
|
-
|
4
|
-
import type {HtmlProps} from '../types.js';
|
2
|
+
import type {AsChild, HtmlProps} from '../types.js';
|
5
3
|
|
6
4
|
export interface ClipboardLabelProps extends HtmlProps<'label'> {
|
7
|
-
asChild?:
|
5
|
+
asChild?: AsChild<HtmlProps<'label'>>;
|
8
6
|
}
|
9
7
|
</script>
|
10
8
|
|
@@ -1,13 +1,11 @@
|
|
1
1
|
<script lang="ts" module>
|
2
|
-
import type {Assign, GenericHtmlProps, HtmlProps} from '../types.js';
|
2
|
+
import type {AsChild, Assign, GenericHtmlProps, HtmlProps} from '../types.js';
|
3
3
|
import type {Snippet} from 'svelte';
|
4
4
|
import type {CreateClipboardProps, CreateClipboardReturn} from './create-clipboard.svelte.js';
|
5
5
|
|
6
6
|
export interface ClipboardProps
|
7
7
|
extends Assign<Omit<HtmlProps<'div'>, 'children'>, CreateClipboardProps> {
|
8
|
-
asChild?:
|
9
|
-
[attrs: Omit<GenericHtmlProps, 'children'>, clipboard: CreateClipboardReturn]
|
10
|
-
>;
|
8
|
+
asChild?: AsChild<GenericHtmlProps, CreateClipboardReturn>;
|
11
9
|
children?: Snippet<[clipboard: CreateClipboardReturn]>;
|
12
10
|
}
|
13
11
|
</script>
|
@@ -1,9 +1,8 @@
|
|
1
1
|
<script lang="ts" module>
|
2
|
-
import type {HtmlProps} from '../types.js';
|
3
|
-
import type {Snippet} from 'svelte';
|
2
|
+
import type {AsChild, HtmlProps} from '../types.js';
|
4
3
|
|
5
4
|
export interface ClipboardTriggerProps extends HtmlProps<'button'> {
|
6
|
-
asChild?:
|
5
|
+
asChild?: AsChild<HtmlProps<'button'>>;
|
7
6
|
}
|
8
7
|
</script>
|
9
8
|
|
@@ -1,9 +1,8 @@
|
|
1
1
|
<script lang="ts" module>
|
2
|
-
import type {
|
3
|
-
import type {Snippet} from 'svelte';
|
2
|
+
import type {AsChild, HtmlProps} from '../types.js';
|
4
3
|
|
5
4
|
export interface CollapsibleContentProps extends HtmlProps<'div'> {
|
6
|
-
asChild?:
|
5
|
+
asChild?: AsChild;
|
7
6
|
}
|
8
7
|
</script>
|
9
8
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<script lang="ts" module>
|
2
|
-
import type {Assign, GenericHtmlProps, HtmlProps} from '../types.js';
|
2
|
+
import type {AsChild, Assign, GenericHtmlProps, HtmlProps} from '../types.js';
|
3
3
|
import type {Snippet} from 'svelte';
|
4
4
|
import type {
|
5
5
|
CreateCollapsibleProps,
|
@@ -8,9 +8,7 @@
|
|
8
8
|
|
9
9
|
export interface CollapsibleProps
|
10
10
|
extends Assign<Omit<HtmlProps<'div'>, 'children'>, CreateCollapsibleProps> {
|
11
|
-
asChild?:
|
12
|
-
[attrs: Omit<GenericHtmlProps, 'children'>, collapsible: CreateCollapsibleReturn]
|
13
|
-
>;
|
11
|
+
asChild?: AsChild<GenericHtmlProps, CreateCollapsibleReturn>;
|
14
12
|
children?: Snippet<[collapsible: CreateCollapsibleReturn]>;
|
15
13
|
}
|
16
14
|
</script>
|
@@ -1,9 +1,8 @@
|
|
1
1
|
<script lang="ts" module>
|
2
|
-
import type {HtmlProps} from '../types.js';
|
3
|
-
import type {Snippet} from 'svelte';
|
2
|
+
import type {AsChild, HtmlProps} from '../types.js';
|
4
3
|
|
5
4
|
export interface CollapsibleTriggerProps extends HtmlProps<'button'> {
|
6
|
-
asChild?:
|
5
|
+
asChild?: AsChild<HtmlProps<'button'>>;
|
7
6
|
}
|
8
7
|
</script>
|
9
8
|
|
@@ -1,9 +1,8 @@
|
|
1
1
|
<script lang="ts" module>
|
2
|
-
import type {HtmlProps} from '../types.js';
|
3
|
-
import type {Snippet} from 'svelte';
|
2
|
+
import type {AsChild, HtmlProps} from '../types.js';
|
4
3
|
|
5
4
|
export interface ComboboxClearTriggerProps extends HtmlProps<'button'> {
|
6
|
-
asChild?:
|
5
|
+
asChild?: AsChild<HtmlProps<'button'>>;
|
7
6
|
}
|
8
7
|
</script>
|
9
8
|
|
@@ -1,9 +1,8 @@
|
|
1
1
|
<script lang="ts" module>
|
2
|
-
import type {
|
3
|
-
import type {Snippet} from 'svelte';
|
2
|
+
import type {AsChild, HtmlProps} from '../types.js';
|
4
3
|
|
5
4
|
export interface ComboboxContentProps extends HtmlProps<'div'> {
|
6
|
-
asChild?:
|
5
|
+
asChild?: AsChild;
|
7
6
|
}
|
8
7
|
</script>
|
9
8
|
|
@@ -1,9 +1,8 @@
|
|
1
1
|
<script lang="ts" module>
|
2
|
-
import type {
|
3
|
-
import type {Snippet} from 'svelte';
|
2
|
+
import type {AsChild, HtmlProps} from '../types.js';
|
4
3
|
|
5
4
|
export interface ComboboxControlProps extends HtmlProps<'div'> {
|
6
|
-
asChild?:
|
5
|
+
asChild?: AsChild;
|
7
6
|
}
|
8
7
|
</script>
|
9
8
|
|