bits-ui 2.10.0 → 2.11.0
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/bits/accordion/accordion.svelte.d.ts +9 -7
- package/dist/bits/accordion/accordion.svelte.js +36 -13
- package/dist/bits/accordion/components/accordion-content.svelte +15 -7
- package/dist/bits/accordion/components/accordion-header.svelte +4 -4
- package/dist/bits/accordion/components/accordion-item.svelte +5 -5
- package/dist/bits/accordion/components/accordion-trigger.svelte +4 -4
- package/dist/bits/accordion/components/accordion.svelte +7 -7
- package/dist/bits/accordion/components/accordion.svelte.d.ts +1 -1
- package/dist/bits/accordion/types.d.ts +17 -8
- package/dist/bits/alert-dialog/components/alert-dialog-action.svelte +3 -3
- package/dist/bits/alert-dialog/components/alert-dialog-cancel.svelte +4 -4
- package/dist/bits/alert-dialog/components/alert-dialog-content.svelte +3 -3
- package/dist/bits/alert-dialog/components/alert-dialog.svelte +4 -4
- package/dist/bits/aspect-ratio/components/aspect-ratio.svelte +4 -4
- package/dist/bits/avatar/components/avatar-fallback.svelte +3 -3
- package/dist/bits/avatar/components/avatar-image.svelte +6 -6
- package/dist/bits/avatar/components/avatar.svelte +5 -5
- package/dist/bits/calendar/calendar.svelte.js +30 -30
- package/dist/bits/calendar/components/calendar-cell.svelte +5 -5
- package/dist/bits/calendar/components/calendar-day.svelte +3 -3
- package/dist/bits/calendar/components/calendar-grid-body.svelte +3 -3
- package/dist/bits/calendar/components/calendar-grid-head.svelte +3 -3
- package/dist/bits/calendar/components/calendar-grid-row.svelte +3 -3
- package/dist/bits/calendar/components/calendar-grid.svelte +3 -3
- package/dist/bits/calendar/components/calendar-head-cell.svelte +3 -3
- package/dist/bits/calendar/components/calendar-header.svelte +3 -3
- package/dist/bits/calendar/components/calendar-heading.svelte +3 -3
- package/dist/bits/calendar/components/calendar-month-select.svelte +6 -6
- package/dist/bits/calendar/components/calendar-next-button.svelte +3 -3
- package/dist/bits/calendar/components/calendar-prev-button.svelte +3 -3
- package/dist/bits/calendar/components/calendar-year-select.svelte +6 -6
- package/dist/bits/calendar/components/calendar.svelte +24 -24
- package/dist/bits/calendar/components/calendar.svelte.d.ts +1 -1
- package/dist/bits/checkbox/checkbox.svelte.d.ts +1 -1
- package/dist/bits/checkbox/checkbox.svelte.js +7 -7
- package/dist/bits/checkbox/components/checkbox-group-label.svelte +3 -3
- package/dist/bits/checkbox/components/checkbox-group.svelte +9 -9
- package/dist/bits/checkbox/components/checkbox-group.svelte.d.ts +1 -1
- package/dist/bits/checkbox/components/checkbox.svelte +11 -11
- package/dist/bits/checkbox/components/checkbox.svelte.d.ts +1 -1
- package/dist/bits/collapsible/collapsible.svelte.d.ts +2 -0
- package/dist/bits/collapsible/collapsible.svelte.js +31 -8
- package/dist/bits/collapsible/components/collapsible-content.svelte +15 -7
- package/dist/bits/collapsible/components/collapsible-trigger.svelte +4 -4
- package/dist/bits/collapsible/components/collapsible.svelte +6 -6
- package/dist/bits/collapsible/types.d.ts +12 -3
- package/dist/bits/combobox/components/combobox-input.svelte +4 -4
- package/dist/bits/combobox/components/combobox-trigger.svelte +3 -3
- package/dist/bits/combobox/components/combobox.svelte +12 -12
- package/dist/bits/command/command.svelte.js +6 -6
- package/dist/bits/command/components/_command-label.svelte +3 -3
- package/dist/bits/command/components/command-empty.svelte +4 -4
- package/dist/bits/command/components/command-group-heading.svelte +3 -3
- package/dist/bits/command/components/command-group-items.svelte +3 -3
- package/dist/bits/command/components/command-group.svelte +5 -5
- package/dist/bits/command/components/command-input.svelte +5 -5
- package/dist/bits/command/components/command-input.svelte.d.ts +1 -1
- package/dist/bits/command/components/command-item.svelte +8 -8
- package/dist/bits/command/components/command-link-item.svelte +8 -8
- package/dist/bits/command/components/command-list.svelte +4 -4
- package/dist/bits/command/components/command-loading.svelte +4 -4
- package/dist/bits/command/components/command-separator.svelte +4 -4
- package/dist/bits/command/components/command-viewport.svelte +3 -3
- package/dist/bits/command/components/command.svelte +12 -12
- package/dist/bits/command/components/command.svelte.d.ts +1 -1
- package/dist/bits/context-menu/components/context-menu-content-static.svelte +5 -5
- package/dist/bits/context-menu/components/context-menu-content.svelte +5 -5
- package/dist/bits/context-menu/components/context-menu-trigger.svelte +4 -4
- package/dist/bits/context-menu/components/context-menu.svelte +5 -5
- package/dist/bits/date-field/components/date-field-input.svelte +4 -4
- package/dist/bits/date-field/components/date-field-label.svelte +3 -3
- package/dist/bits/date-field/components/date-field-segment.svelte +3 -3
- package/dist/bits/date-field/components/date-field.svelte +16 -16
- package/dist/bits/date-field/date-field.svelte.js +17 -17
- package/dist/bits/date-picker/components/date-picker-calendar.svelte +5 -5
- package/dist/bits/date-picker/components/date-picker.svelte +32 -32
- package/dist/bits/date-range-field/components/date-range-field-input.svelte +4 -4
- package/dist/bits/date-range-field/components/date-range-field-label.svelte +3 -3
- package/dist/bits/date-range-field/components/date-range-field.svelte +19 -19
- package/dist/bits/date-range-field/components/date-range-field.svelte.d.ts +1 -1
- package/dist/bits/date-range-field/date-range-field.svelte.js +9 -9
- package/dist/bits/date-range-picker/components/date-range-picker-calendar.svelte +3 -3
- package/dist/bits/date-range-picker/components/date-range-picker.svelte +37 -37
- package/dist/bits/date-range-picker/components/date-range-picker.svelte.d.ts +1 -1
- package/dist/bits/dialog/components/dialog-close.svelte +5 -5
- package/dist/bits/dialog/components/dialog-content.svelte +3 -3
- package/dist/bits/dialog/components/dialog-description.svelte +3 -3
- package/dist/bits/dialog/components/dialog-overlay.svelte +3 -3
- package/dist/bits/dialog/components/dialog-title.svelte +4 -4
- package/dist/bits/dialog/components/dialog-trigger.svelte +4 -4
- package/dist/bits/dialog/components/dialog.svelte +4 -4
- package/dist/bits/dialog/dialog.svelte.d.ts +1 -1
- package/dist/bits/dialog/dialog.svelte.js +4 -4
- package/dist/bits/dropdown-menu/components/dropdown-menu-content-static.svelte +5 -5
- package/dist/bits/dropdown-menu/components/dropdown-menu-content.svelte +5 -5
- package/dist/bits/label/components/label.svelte +3 -3
- package/dist/bits/link-preview/components/link-preview-content-static.svelte +5 -5
- package/dist/bits/link-preview/components/link-preview-content.svelte +5 -5
- package/dist/bits/link-preview/components/link-preview-trigger.svelte +3 -3
- package/dist/bits/link-preview/components/link-preview.svelte +6 -6
- package/dist/bits/link-preview/link-preview.svelte.js +4 -4
- package/dist/bits/menu/components/menu-checkbox-group.svelte +5 -5
- package/dist/bits/menu/components/menu-checkbox-group.svelte.d.ts +1 -1
- package/dist/bits/menu/components/menu-checkbox-item.svelte +9 -9
- package/dist/bits/menu/components/menu-checkbox-item.svelte.d.ts +1 -1
- package/dist/bits/menu/components/menu-content-static.svelte +5 -5
- package/dist/bits/menu/components/menu-content.svelte +5 -5
- package/dist/bits/menu/components/menu-group-heading.svelte +3 -3
- package/dist/bits/menu/components/menu-group.svelte +3 -3
- package/dist/bits/menu/components/menu-item.svelte +6 -6
- package/dist/bits/menu/components/menu-radio-group.svelte +4 -4
- package/dist/bits/menu/components/menu-radio-group.svelte.d.ts +1 -1
- package/dist/bits/menu/components/menu-radio-item.svelte +7 -7
- package/dist/bits/menu/components/menu-separator.svelte +3 -3
- package/dist/bits/menu/components/menu-sub-content-static.svelte +5 -5
- package/dist/bits/menu/components/menu-sub-content.svelte +5 -5
- package/dist/bits/menu/components/menu-sub-trigger.svelte +5 -5
- package/dist/bits/menu/components/menu-sub.svelte +3 -3
- package/dist/bits/menu/components/menu-trigger.svelte +4 -4
- package/dist/bits/menu/components/menu.svelte +5 -5
- package/dist/bits/menu/menu.svelte.d.ts +1 -1
- package/dist/bits/menu/menu.svelte.js +14 -14
- package/dist/bits/menubar/components/menubar-content-static.svelte +8 -8
- package/dist/bits/menubar/components/menubar-content.svelte +8 -8
- package/dist/bits/menubar/components/menubar-menu.svelte +3 -3
- package/dist/bits/menubar/components/menubar-trigger.svelte +4 -4
- package/dist/bits/menubar/components/menubar.svelte +6 -6
- package/dist/bits/menubar/menubar.svelte.js +5 -5
- package/dist/bits/meter/components/meter.svelte +6 -6
- package/dist/bits/navigation-menu/components/navigation-menu-content-impl.svelte +3 -3
- package/dist/bits/navigation-menu/components/navigation-menu-content.svelte +3 -3
- package/dist/bits/navigation-menu/components/navigation-menu-indicator-impl.svelte +3 -3
- package/dist/bits/navigation-menu/components/navigation-menu-indicator.svelte +2 -2
- package/dist/bits/navigation-menu/components/navigation-menu-item.svelte +5 -5
- package/dist/bits/navigation-menu/components/navigation-menu-link.svelte +5 -5
- package/dist/bits/navigation-menu/components/navigation-menu-list.svelte +3 -3
- package/dist/bits/navigation-menu/components/navigation-menu-sub.svelte +5 -5
- package/dist/bits/navigation-menu/components/navigation-menu-sub.svelte.d.ts +1 -1
- package/dist/bits/navigation-menu/components/navigation-menu-trigger.svelte +4 -4
- package/dist/bits/navigation-menu/components/navigation-menu-viewport.svelte +3 -3
- package/dist/bits/navigation-menu/components/navigation-menu.svelte +8 -8
- package/dist/bits/navigation-menu/components/navigation-menu.svelte.d.ts +1 -1
- package/dist/bits/navigation-menu/navigation-menu.svelte.d.ts +6 -6
- package/dist/bits/navigation-menu/navigation-menu.svelte.js +23 -23
- package/dist/bits/pagination/components/pagination-next-button.svelte +4 -4
- package/dist/bits/pagination/components/pagination-page.svelte +5 -5
- package/dist/bits/pagination/components/pagination-prev-button.svelte +4 -4
- package/dist/bits/pagination/components/pagination.svelte +9 -9
- package/dist/bits/pagination/pagination.svelte.d.ts +1 -1
- package/dist/bits/pagination/pagination.svelte.js +2 -2
- package/dist/bits/pin-input/components/pin-input-cell.svelte +4 -4
- package/dist/bits/pin-input/components/pin-input.svelte +14 -14
- package/dist/bits/pin-input/components/pin-input.svelte.d.ts +1 -1
- package/dist/bits/pin-input/pin-input.svelte.d.ts +2 -2
- package/dist/bits/pin-input/pin-input.svelte.js +5 -5
- package/dist/bits/popover/components/popover-close.svelte +3 -3
- package/dist/bits/popover/components/popover-content-static.svelte +6 -6
- package/dist/bits/popover/components/popover-content.svelte +6 -6
- package/dist/bits/popover/components/popover-trigger.svelte +4 -4
- package/dist/bits/popover/components/popover.svelte +3 -3
- package/dist/bits/popover/popover.svelte.js +4 -4
- package/dist/bits/progress/components/progress.svelte +6 -6
- package/dist/bits/radio-group/components/radio-group-item.svelte +5 -5
- package/dist/bits/radio-group/components/radio-group.svelte +10 -10
- package/dist/bits/radio-group/components/radio-group.svelte.d.ts +1 -1
- package/dist/bits/radio-group/radio-group.svelte.js +7 -7
- package/dist/bits/range-calendar/components/range-calendar-cell.svelte +5 -5
- package/dist/bits/range-calendar/components/range-calendar-day.svelte +3 -3
- package/dist/bits/range-calendar/components/range-calendar.svelte +26 -26
- package/dist/bits/range-calendar/components/range-calendar.svelte.d.ts +1 -1
- package/dist/bits/range-calendar/range-calendar.svelte.js +7 -7
- package/dist/bits/rating-group/components/rating-group-item.svelte +5 -5
- package/dist/bits/rating-group/components/rating-group.svelte +14 -14
- package/dist/bits/rating-group/components/rating-group.svelte.d.ts +1 -1
- package/dist/bits/rating-group/rating-group.svelte.js +4 -4
- package/dist/bits/scroll-area/components/scroll-area-corner-impl.svelte +3 -3
- package/dist/bits/scroll-area/components/scroll-area-scrollbar-x.svelte +2 -2
- package/dist/bits/scroll-area/components/scroll-area-scrollbar-y.svelte +2 -2
- package/dist/bits/scroll-area/components/scroll-area-scrollbar.svelte +4 -4
- package/dist/bits/scroll-area/components/scroll-area-thumb-impl.svelte +4 -4
- package/dist/bits/scroll-area/components/scroll-area-viewport.svelte +3 -3
- package/dist/bits/scroll-area/components/scroll-area.svelte +6 -6
- package/dist/bits/scroll-area/scroll-area.svelte.d.ts +2 -2
- package/dist/bits/scroll-area/scroll-area.svelte.js +6 -7
- package/dist/bits/select/components/select-content-static.svelte +5 -5
- package/dist/bits/select/components/select-content.svelte +5 -5
- package/dist/bits/select/components/select-group-heading.svelte +3 -3
- package/dist/bits/select/components/select-group.svelte +3 -3
- package/dist/bits/select/components/select-hidden-input.svelte +2 -2
- package/dist/bits/select/components/select-item.svelte +8 -8
- package/dist/bits/select/components/select-scroll-down-button.svelte +4 -4
- package/dist/bits/select/components/select-scroll-up-button.svelte +4 -4
- package/dist/bits/select/components/select-trigger.svelte +3 -3
- package/dist/bits/select/components/select-viewport.svelte +3 -3
- package/dist/bits/select/components/select.svelte +12 -12
- package/dist/bits/select/select.svelte.js +12 -12
- package/dist/bits/separator/components/separator.svelte +5 -5
- package/dist/bits/separator/separator.svelte.d.ts +2 -2
- package/dist/bits/separator/separator.svelte.js +4 -4
- package/dist/bits/slider/components/slider-range.svelte +3 -3
- package/dist/bits/slider/components/slider-thumb-label.svelte +5 -5
- package/dist/bits/slider/components/slider-thumb.svelte +5 -5
- package/dist/bits/slider/components/slider-tick-label.svelte +5 -5
- package/dist/bits/slider/components/slider-tick.svelte +4 -4
- package/dist/bits/slider/components/slider.svelte +14 -14
- package/dist/bits/slider/components/slider.svelte.d.ts +1 -1
- package/dist/bits/slider/slider.svelte.d.ts +16 -16
- package/dist/bits/slider/slider.svelte.js +20 -20
- package/dist/bits/switch/components/switch-thumb.svelte +3 -3
- package/dist/bits/switch/components/switch.svelte +8 -8
- package/dist/bits/switch/components/switch.svelte.d.ts +1 -1
- package/dist/bits/switch/switch.svelte.js +5 -5
- package/dist/bits/tabs/components/tabs-content.svelte +4 -4
- package/dist/bits/tabs/components/tabs-list.svelte +3 -3
- package/dist/bits/tabs/components/tabs-trigger.svelte +5 -5
- package/dist/bits/tabs/components/tabs.svelte +8 -8
- package/dist/bits/tabs/components/tabs.svelte.d.ts +1 -1
- package/dist/bits/tabs/tabs.svelte.d.ts +5 -5
- package/dist/bits/tabs/tabs.svelte.js +11 -11
- package/dist/bits/time-field/components/time-field-input.svelte +4 -4
- package/dist/bits/time-field/components/time-field-label.svelte +3 -3
- package/dist/bits/time-field/components/time-field-segment.svelte +3 -3
- package/dist/bits/time-field/components/time-field.svelte +16 -16
- package/dist/bits/time-field/time-field.svelte.js +15 -15
- package/dist/bits/time-range-field/components/time-range-field-input.svelte +4 -4
- package/dist/bits/time-range-field/components/time-range-field-label.svelte +3 -3
- package/dist/bits/time-range-field/components/time-range-field.svelte +19 -19
- package/dist/bits/time-range-field/components/time-range-field.svelte.d.ts +1 -1
- package/dist/bits/time-range-field/time-range-field.svelte.js +7 -7
- package/dist/bits/toggle/components/toggle.svelte +5 -5
- package/dist/bits/toggle/toggle.svelte.d.ts +0 -1
- package/dist/bits/toggle/toggle.svelte.js +5 -10
- package/dist/bits/toggle-group/components/toggle-group-item.svelte +5 -5
- package/dist/bits/toggle-group/components/toggle-group.svelte +8 -8
- package/dist/bits/toggle-group/components/toggle-group.svelte.d.ts +1 -1
- package/dist/bits/toggle-group/toggle-group.svelte.d.ts +2 -2
- package/dist/bits/toggle-group/toggle-group.svelte.js +7 -7
- package/dist/bits/toolbar/components/toolbar-button.svelte +4 -4
- package/dist/bits/toolbar/components/toolbar-group-item.svelte +5 -5
- package/dist/bits/toolbar/components/toolbar-group.svelte +5 -5
- package/dist/bits/toolbar/components/toolbar-group.svelte.d.ts +1 -1
- package/dist/bits/toolbar/components/toolbar-link.svelte +3 -3
- package/dist/bits/toolbar/components/toolbar.svelte +5 -5
- package/dist/bits/toolbar/toolbar.svelte.d.ts +4 -4
- package/dist/bits/toolbar/toolbar.svelte.js +11 -11
- package/dist/bits/tooltip/components/tooltip-content-static.svelte +5 -5
- package/dist/bits/tooltip/components/tooltip-content.svelte +7 -5
- package/dist/bits/tooltip/components/tooltip-provider.svelte +7 -7
- package/dist/bits/tooltip/components/tooltip-trigger.svelte +4 -4
- package/dist/bits/tooltip/components/tooltip.svelte +8 -8
- package/dist/bits/tooltip/tooltip.svelte.js +7 -7
- package/dist/bits/tooltip/types.d.ts +1 -1
- package/dist/bits/utilities/config/bits-config.js +2 -2
- package/dist/bits/utilities/config/components/bits-config.svelte +3 -3
- package/dist/bits/utilities/config/prop-resolvers.js +2 -2
- package/dist/bits/utilities/dismissible-layer/dismissible-layer.svelte +7 -7
- package/dist/bits/utilities/dismissible-layer/use-dismissable-layer.svelte.js +4 -3
- package/dist/bits/utilities/escape-layer/escape-layer.svelte +4 -4
- package/dist/bits/utilities/floating-layer/components/floating-layer-anchor.svelte +3 -3
- package/dist/bits/utilities/floating-layer/components/floating-layer-arrow.svelte +3 -3
- package/dist/bits/utilities/floating-layer/components/floating-layer-content.svelte +20 -20
- package/dist/bits/utilities/floating-layer/use-floating-layer.svelte.d.ts +3 -3
- package/dist/bits/utilities/floating-layer/use-floating-layer.svelte.js +9 -9
- package/dist/bits/utilities/focus-scope/focus-scope-manager.js +2 -2
- package/dist/bits/utilities/focus-scope/focus-scope.svelte +5 -5
- package/dist/bits/utilities/presence-layer/presence-layer.svelte +2 -2
- package/dist/bits/utilities/text-selection-layer/text-selection-layer.svelte +5 -5
- package/dist/internal/attrs.d.ts +4 -19
- package/dist/internal/attrs.js +11 -56
- package/dist/internal/body-scroll-lock.svelte.js +5 -5
- package/dist/internal/box-auto-reset.svelte.js +2 -2
- package/dist/internal/date-time/calendar-helpers.svelte.js +4 -4
- package/dist/internal/events.d.ts +0 -6
- package/dist/internal/events.js +0 -17
- package/dist/internal/floating-svelte/use-floating.svelte.js +2 -2
- package/dist/internal/state-machine.js +2 -2
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import {
|
|
2
|
+
import { boxWith, mergeProps } from "svelte-toolbelt";
|
|
3
3
|
import type { PaginationPageProps } from "../types.js";
|
|
4
4
|
import { PaginationPageState } from "../pagination.svelte.js";
|
|
5
5
|
import { createId } from "../../../internal/create-id.js";
|
|
@@ -18,13 +18,13 @@
|
|
|
18
18
|
}: PaginationPageProps = $props();
|
|
19
19
|
|
|
20
20
|
const pageState = PaginationPageState.create({
|
|
21
|
-
id:
|
|
22
|
-
page:
|
|
23
|
-
ref:
|
|
21
|
+
id: boxWith(() => id),
|
|
22
|
+
page: boxWith(() => page),
|
|
23
|
+
ref: boxWith(
|
|
24
24
|
() => ref,
|
|
25
25
|
(v) => (ref = v)
|
|
26
26
|
),
|
|
27
|
-
disabled:
|
|
27
|
+
disabled: boxWith(() => Boolean(disabled)),
|
|
28
28
|
});
|
|
29
29
|
|
|
30
30
|
const mergedProps = $derived(mergeProps(restProps, pageState.props, { type }));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import {
|
|
2
|
+
import { boxWith, mergeProps } from "svelte-toolbelt";
|
|
3
3
|
import type { PaginationPrevButtonProps } from "../types.js";
|
|
4
4
|
import { PaginationButtonState } from "../pagination.svelte.js";
|
|
5
5
|
import { createId } from "../../../internal/create-id.js";
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
|
|
19
19
|
const prevButtonState = PaginationButtonState.create({
|
|
20
20
|
type: "prev",
|
|
21
|
-
id:
|
|
22
|
-
ref:
|
|
21
|
+
id: boxWith(() => id),
|
|
22
|
+
ref: boxWith(
|
|
23
23
|
() => ref,
|
|
24
24
|
(v) => (ref = v)
|
|
25
25
|
),
|
|
26
|
-
disabled:
|
|
26
|
+
disabled: boxWith(() => Boolean(disabled)),
|
|
27
27
|
});
|
|
28
28
|
|
|
29
29
|
const mergedProps = $derived(mergeProps(restProps, prevButtonState.props, { type }));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import {
|
|
2
|
+
import { boxWith, mergeProps } from "svelte-toolbelt";
|
|
3
3
|
import type { PaginationRootProps } from "../types.js";
|
|
4
4
|
import { PaginationRootState } from "../pagination.svelte.js";
|
|
5
5
|
import { noop } from "../../../internal/noop.js";
|
|
@@ -23,20 +23,20 @@
|
|
|
23
23
|
}: PaginationRootProps = $props();
|
|
24
24
|
|
|
25
25
|
const rootState = PaginationRootState.create({
|
|
26
|
-
id:
|
|
27
|
-
count:
|
|
28
|
-
perPage:
|
|
29
|
-
page:
|
|
26
|
+
id: boxWith(() => id),
|
|
27
|
+
count: boxWith(() => count),
|
|
28
|
+
perPage: boxWith(() => perPage),
|
|
29
|
+
page: boxWith(
|
|
30
30
|
() => page,
|
|
31
31
|
(v) => {
|
|
32
32
|
page = v;
|
|
33
33
|
onPageChange?.(v);
|
|
34
34
|
}
|
|
35
35
|
),
|
|
36
|
-
loop:
|
|
37
|
-
siblingCount:
|
|
38
|
-
orientation:
|
|
39
|
-
ref:
|
|
36
|
+
loop: boxWith(() => loop),
|
|
37
|
+
siblingCount: boxWith(() => siblingCount),
|
|
38
|
+
orientation: boxWith(() => orientation),
|
|
39
|
+
ref: boxWith(
|
|
40
40
|
() => ref,
|
|
41
41
|
(v) => (ref = v)
|
|
42
42
|
),
|
|
@@ -40,7 +40,7 @@ export declare class PaginationRootState {
|
|
|
40
40
|
};
|
|
41
41
|
readonly props: {
|
|
42
42
|
readonly id: string;
|
|
43
|
-
readonly "data-orientation":
|
|
43
|
+
readonly "data-orientation": Orientation;
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
46
|
interface PaginationPageStateOpts extends WithRefOpts, ReadableBoxedValues<{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { attachRef } from "svelte-toolbelt";
|
|
2
2
|
import { Context } from "runed";
|
|
3
|
-
import { createBitsAttrs
|
|
3
|
+
import { createBitsAttrs } from "../../internal/attrs.js";
|
|
4
4
|
import { getElemDirection } from "../../internal/locale.js";
|
|
5
5
|
import { kbd } from "../../internal/kbd.js";
|
|
6
6
|
import { getDirectionalKeys } from "../../internal/get-directional-keys.js";
|
|
@@ -65,7 +65,7 @@ export class PaginationRootState {
|
|
|
65
65
|
}));
|
|
66
66
|
props = $derived.by(() => ({
|
|
67
67
|
id: this.opts.id.current,
|
|
68
|
-
"data-orientation":
|
|
68
|
+
"data-orientation": this.opts.orientation.current,
|
|
69
69
|
[paginationAttrs.root]: "",
|
|
70
70
|
...this.attachment,
|
|
71
71
|
}));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import {
|
|
2
|
+
import { boxWith, mergeProps } from "svelte-toolbelt";
|
|
3
3
|
import type { PinInputCellProps } from "../types.js";
|
|
4
4
|
import { PinInputCellState } from "../pin-input.svelte.js";
|
|
5
5
|
import { createId } from "../../../internal/create-id.js";
|
|
@@ -16,12 +16,12 @@
|
|
|
16
16
|
}: PinInputCellProps = $props();
|
|
17
17
|
|
|
18
18
|
const cellState = PinInputCellState.create({
|
|
19
|
-
id:
|
|
20
|
-
ref:
|
|
19
|
+
id: boxWith(() => id),
|
|
20
|
+
ref: boxWith(
|
|
21
21
|
() => ref,
|
|
22
22
|
(v) => (ref = v)
|
|
23
23
|
),
|
|
24
|
-
cell:
|
|
24
|
+
cell: boxWith(() => cell),
|
|
25
25
|
});
|
|
26
26
|
|
|
27
27
|
const mergedProps = $derived(mergeProps(restProps, cellState.props));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import {
|
|
2
|
+
import { boxWith, mergeProps } from "svelte-toolbelt";
|
|
3
3
|
import type { PinInputRootProps } from "../types.js";
|
|
4
4
|
import { PinInputRootState } from "../pin-input.svelte.js";
|
|
5
5
|
import { createId } from "../../../internal/create-id.js";
|
|
@@ -28,28 +28,28 @@
|
|
|
28
28
|
}: PinInputRootProps = $props();
|
|
29
29
|
|
|
30
30
|
const rootState = PinInputRootState.create({
|
|
31
|
-
id:
|
|
32
|
-
ref:
|
|
31
|
+
id: boxWith(() => id),
|
|
32
|
+
ref: boxWith(
|
|
33
33
|
() => ref,
|
|
34
34
|
(v) => (ref = v)
|
|
35
35
|
),
|
|
36
|
-
inputId:
|
|
37
|
-
autocomplete:
|
|
38
|
-
maxLength:
|
|
39
|
-
textAlign:
|
|
40
|
-
disabled:
|
|
41
|
-
inputmode:
|
|
42
|
-
pattern:
|
|
43
|
-
onComplete:
|
|
44
|
-
value:
|
|
36
|
+
inputId: boxWith(() => inputId),
|
|
37
|
+
autocomplete: boxWith(() => autocomplete),
|
|
38
|
+
maxLength: boxWith(() => maxlength),
|
|
39
|
+
textAlign: boxWith(() => textalign),
|
|
40
|
+
disabled: boxWith(() => disabled),
|
|
41
|
+
inputmode: boxWith(() => inputmode),
|
|
42
|
+
pattern: boxWith(() => pattern),
|
|
43
|
+
onComplete: boxWith(() => onComplete),
|
|
44
|
+
value: boxWith(
|
|
45
45
|
() => value,
|
|
46
46
|
(v) => {
|
|
47
47
|
value = v;
|
|
48
48
|
onValueChange(v);
|
|
49
49
|
}
|
|
50
50
|
),
|
|
51
|
-
pushPasswordManagerStrategy:
|
|
52
|
-
pasteTransformer:
|
|
51
|
+
pushPasswordManagerStrategy: boxWith(() => pushPasswordManagerStrategy),
|
|
52
|
+
pasteTransformer: boxWith(() => pasteTransformer),
|
|
53
53
|
});
|
|
54
54
|
|
|
55
55
|
const mergedInputProps = $derived(mergeProps(restProps, rootState.inputProps));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { PinInputRootProps } from "../types.js";
|
|
2
|
-
declare const PinInput: import("svelte").Component<PinInputRootProps, {}, "
|
|
2
|
+
declare const PinInput: import("svelte").Component<PinInputRootProps, {}, "ref" | "value">;
|
|
3
3
|
type PinInput = ReturnType<typeof PinInput>;
|
|
4
4
|
export default PinInput;
|
|
@@ -60,7 +60,7 @@ export declare class PinInputRootState {
|
|
|
60
60
|
clipPath: string | undefined;
|
|
61
61
|
height: string;
|
|
62
62
|
display: string;
|
|
63
|
-
textAlign: "
|
|
63
|
+
textAlign: "center" | "left" | "right" | undefined;
|
|
64
64
|
opacity: string;
|
|
65
65
|
color: string;
|
|
66
66
|
pointerEvents: string;
|
|
@@ -79,7 +79,7 @@ export declare class PinInputRootState {
|
|
|
79
79
|
"data-pin-input-input": string;
|
|
80
80
|
"data-pin-input-input-mss": number | null;
|
|
81
81
|
"data-pin-input-input-mse": number | null;
|
|
82
|
-
inputmode: "
|
|
82
|
+
inputmode: "search" | "text" | "none" | "email" | "tel" | "url" | "numeric" | "decimal" | null | undefined;
|
|
83
83
|
pattern: any;
|
|
84
84
|
maxlength: number;
|
|
85
85
|
value: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Previous, watch } from "runed";
|
|
2
2
|
import { onMount } from "svelte";
|
|
3
|
-
import {
|
|
3
|
+
import { attachRef, DOMContext, simpleBox, } from "svelte-toolbelt";
|
|
4
4
|
import { usePasswordManagerBadge } from "./usePasswordManager.svelte.js";
|
|
5
|
-
import { createBitsAttrs,
|
|
5
|
+
import { createBitsAttrs, boolToTrueOrUndef } from "../../internal/attrs.js";
|
|
6
6
|
import { on } from "svelte/events";
|
|
7
7
|
export const REGEXP_ONLY_DIGITS = "^\\d+$";
|
|
8
8
|
export const REGEXP_ONLY_CHARS = "^[a-zA-Z]+$";
|
|
@@ -33,10 +33,10 @@ export class PinInputRootState {
|
|
|
33
33
|
}
|
|
34
34
|
opts;
|
|
35
35
|
attachment;
|
|
36
|
-
#inputRef =
|
|
36
|
+
#inputRef = simpleBox(null);
|
|
37
37
|
#isHoveringInput = $state(false);
|
|
38
38
|
inputAttachment = attachRef(this.#inputRef);
|
|
39
|
-
#isFocused =
|
|
39
|
+
#isFocused = simpleBox(false);
|
|
40
40
|
#mirrorSelectionStart = $state(null);
|
|
41
41
|
#mirrorSelectionEnd = $state(null);
|
|
42
42
|
#previousValue = new Previous(() => this.opts.value.current ?? "");
|
|
@@ -364,7 +364,7 @@ export class PinInputRootState {
|
|
|
364
364
|
pattern: this.#regexPattern?.source,
|
|
365
365
|
maxlength: this.opts.maxLength.current,
|
|
366
366
|
value: this.opts.value.current,
|
|
367
|
-
disabled:
|
|
367
|
+
disabled: boolToTrueOrUndef(this.opts.disabled.current),
|
|
368
368
|
//
|
|
369
369
|
onpaste: this.onpaste,
|
|
370
370
|
oninput: this.oninput,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import {
|
|
2
|
+
import { boxWith, mergeProps } from "svelte-toolbelt";
|
|
3
3
|
import type { PopoverCloseProps } from "../types.js";
|
|
4
4
|
import { PopoverCloseState } from "../popover.svelte.js";
|
|
5
5
|
import { createId } from "../../../internal/create-id.js";
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
}: PopoverCloseProps = $props();
|
|
16
16
|
|
|
17
17
|
const closeState = PopoverCloseState.create({
|
|
18
|
-
id:
|
|
19
|
-
ref:
|
|
18
|
+
id: boxWith(() => id),
|
|
19
|
+
ref: boxWith(
|
|
20
20
|
() => ref,
|
|
21
21
|
(v) => (ref = v)
|
|
22
22
|
),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import {
|
|
2
|
+
import { boxWith, mergeProps } from "svelte-toolbelt";
|
|
3
3
|
import type { PopoverContentStaticProps } from "../types.js";
|
|
4
4
|
import { PopoverContentState } from "../popover.svelte.js";
|
|
5
5
|
import PopperLayer from "../../utilities/popper-layer/popper-layer.svelte";
|
|
@@ -25,14 +25,14 @@
|
|
|
25
25
|
}: PopoverContentStaticProps = $props();
|
|
26
26
|
|
|
27
27
|
const contentState = PopoverContentState.create({
|
|
28
|
-
id:
|
|
29
|
-
ref:
|
|
28
|
+
id: boxWith(() => id),
|
|
29
|
+
ref: boxWith(
|
|
30
30
|
() => ref,
|
|
31
31
|
(v) => (ref = v)
|
|
32
32
|
),
|
|
33
|
-
onInteractOutside:
|
|
34
|
-
onEscapeKeydown:
|
|
35
|
-
customAnchor:
|
|
33
|
+
onInteractOutside: boxWith(() => onInteractOutside),
|
|
34
|
+
onEscapeKeydown: boxWith(() => onEscapeKeydown),
|
|
35
|
+
customAnchor: boxWith(() => null),
|
|
36
36
|
});
|
|
37
37
|
|
|
38
38
|
const mergedProps = $derived(mergeProps(restProps, contentState.props));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import {
|
|
2
|
+
import { boxWith, mergeProps } from "svelte-toolbelt";
|
|
3
3
|
import type { PopoverContentProps } from "../types.js";
|
|
4
4
|
import { PopoverContentState } from "../popover.svelte.js";
|
|
5
5
|
import PopperLayer from "../../utilities/popper-layer/popper-layer.svelte";
|
|
@@ -26,14 +26,14 @@
|
|
|
26
26
|
}: PopoverContentProps = $props();
|
|
27
27
|
|
|
28
28
|
const contentState = PopoverContentState.create({
|
|
29
|
-
id:
|
|
30
|
-
ref:
|
|
29
|
+
id: boxWith(() => id),
|
|
30
|
+
ref: boxWith(
|
|
31
31
|
() => ref,
|
|
32
32
|
(v) => (ref = v)
|
|
33
33
|
),
|
|
34
|
-
onInteractOutside:
|
|
35
|
-
onEscapeKeydown:
|
|
36
|
-
customAnchor:
|
|
34
|
+
onInteractOutside: boxWith(() => onInteractOutside),
|
|
35
|
+
onEscapeKeydown: boxWith(() => onEscapeKeydown),
|
|
36
|
+
customAnchor: boxWith(() => customAnchor),
|
|
37
37
|
});
|
|
38
38
|
|
|
39
39
|
const mergedProps = $derived(mergeProps(restProps, contentState.props));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import {
|
|
2
|
+
import { boxWith, mergeProps } from "svelte-toolbelt";
|
|
3
3
|
import type { PopoverTriggerProps } from "../types.js";
|
|
4
4
|
import { PopoverTriggerState } from "../popover.svelte.js";
|
|
5
5
|
import { createId } from "../../../internal/create-id.js";
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
}: PopoverTriggerProps = $props();
|
|
19
19
|
|
|
20
20
|
const triggerState = PopoverTriggerState.create({
|
|
21
|
-
id:
|
|
22
|
-
ref:
|
|
21
|
+
id: boxWith(() => id),
|
|
22
|
+
ref: boxWith(
|
|
23
23
|
() => ref,
|
|
24
24
|
(v) => (ref = v)
|
|
25
25
|
),
|
|
26
|
-
disabled:
|
|
26
|
+
disabled: boxWith(() => Boolean(disabled)),
|
|
27
27
|
});
|
|
28
28
|
|
|
29
29
|
const mergedProps = $derived(mergeProps(restProps, triggerState.props, { type }));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import {
|
|
2
|
+
import { boxWith } from "svelte-toolbelt";
|
|
3
3
|
import type { PopoverRootProps } from "../types.js";
|
|
4
4
|
import { PopoverRootState } from "../popover.svelte.js";
|
|
5
5
|
import FloatingLayer from "../../utilities/floating-layer/components/floating-layer.svelte";
|
|
@@ -13,14 +13,14 @@
|
|
|
13
13
|
}: PopoverRootProps = $props();
|
|
14
14
|
|
|
15
15
|
PopoverRootState.create({
|
|
16
|
-
open:
|
|
16
|
+
open: boxWith(
|
|
17
17
|
() => open,
|
|
18
18
|
(v) => {
|
|
19
19
|
open = v;
|
|
20
20
|
onOpenChange(v);
|
|
21
21
|
}
|
|
22
22
|
),
|
|
23
|
-
onOpenChangeComplete:
|
|
23
|
+
onOpenChangeComplete: boxWith(() => onOpenChangeComplete),
|
|
24
24
|
});
|
|
25
25
|
</script>
|
|
26
26
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { attachRef,
|
|
1
|
+
import { attachRef, boxWith, } from "svelte-toolbelt";
|
|
2
2
|
import { Context } from "runed";
|
|
3
3
|
import { kbd } from "../../internal/kbd.js";
|
|
4
|
-
import { createBitsAttrs,
|
|
4
|
+
import { createBitsAttrs, boolToStr, getDataOpenClosed } from "../../internal/attrs.js";
|
|
5
5
|
import { isElement } from "../../internal/is.js";
|
|
6
6
|
import { OpenChangeComplete } from "../../internal/open-change-complete.js";
|
|
7
7
|
const popoverAttrs = createBitsAttrs({
|
|
@@ -19,7 +19,7 @@ export class PopoverRootState {
|
|
|
19
19
|
constructor(opts) {
|
|
20
20
|
this.opts = opts;
|
|
21
21
|
new OpenChangeComplete({
|
|
22
|
-
ref:
|
|
22
|
+
ref: boxWith(() => this.contentNode),
|
|
23
23
|
open: this.opts.open,
|
|
24
24
|
onComplete: () => {
|
|
25
25
|
this.opts.onOpenChangeComplete.current(this.opts.open.current);
|
|
@@ -73,7 +73,7 @@ export class PopoverTriggerState {
|
|
|
73
73
|
props = $derived.by(() => ({
|
|
74
74
|
id: this.opts.id.current,
|
|
75
75
|
"aria-haspopup": "dialog",
|
|
76
|
-
"aria-expanded":
|
|
76
|
+
"aria-expanded": boolToStr(this.root.opts.open.current),
|
|
77
77
|
"data-state": getDataOpenClosed(this.root.opts.open.current),
|
|
78
78
|
"aria-controls": this.#getAriaControls(),
|
|
79
79
|
[popoverAttrs.trigger]: "",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import {
|
|
2
|
+
import { boxWith, mergeProps } from "svelte-toolbelt";
|
|
3
3
|
import type { ProgressRootProps } from "../types.js";
|
|
4
4
|
import { ProgressRootState } from "../progress.svelte.js";
|
|
5
5
|
import { createId } from "../../../internal/create-id.js";
|
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
}: ProgressRootProps = $props();
|
|
19
19
|
|
|
20
20
|
const rootState = ProgressRootState.create({
|
|
21
|
-
value:
|
|
22
|
-
max:
|
|
23
|
-
min:
|
|
24
|
-
id:
|
|
25
|
-
ref:
|
|
21
|
+
value: boxWith(() => value),
|
|
22
|
+
max: boxWith(() => max),
|
|
23
|
+
min: boxWith(() => min),
|
|
24
|
+
id: boxWith(() => id),
|
|
25
|
+
ref: boxWith(
|
|
26
26
|
() => ref,
|
|
27
27
|
(v) => (ref = v)
|
|
28
28
|
),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import {
|
|
2
|
+
import { boxWith, mergeProps } from "svelte-toolbelt";
|
|
3
3
|
import type { RadioGroupItemProps } from "../types.js";
|
|
4
4
|
import { RadioGroupItemState } from "../radio-group.svelte.js";
|
|
5
5
|
import { createId } from "../../../internal/create-id.js";
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
}: RadioGroupItemProps = $props();
|
|
18
18
|
|
|
19
19
|
const itemState = RadioGroupItemState.create({
|
|
20
|
-
value:
|
|
21
|
-
disabled:
|
|
22
|
-
id:
|
|
23
|
-
ref:
|
|
20
|
+
value: boxWith(() => value),
|
|
21
|
+
disabled: boxWith(() => disabled ?? false),
|
|
22
|
+
id: boxWith(() => id),
|
|
23
|
+
ref: boxWith(
|
|
24
24
|
() => ref,
|
|
25
25
|
(v) => (ref = v)
|
|
26
26
|
),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import {
|
|
2
|
+
import { boxWith, mergeProps } from "svelte-toolbelt";
|
|
3
3
|
import type { RadioGroupRootProps } from "../types.js";
|
|
4
4
|
import { RadioGroupRootState } from "../radio-group.svelte.js";
|
|
5
5
|
import RadioGroupInput from "./radio-group-input.svelte";
|
|
@@ -25,14 +25,14 @@
|
|
|
25
25
|
}: RadioGroupRootProps = $props();
|
|
26
26
|
|
|
27
27
|
const rootState = RadioGroupRootState.create({
|
|
28
|
-
orientation:
|
|
29
|
-
disabled:
|
|
30
|
-
loop:
|
|
31
|
-
name:
|
|
32
|
-
required:
|
|
33
|
-
readonly:
|
|
34
|
-
id:
|
|
35
|
-
value:
|
|
28
|
+
orientation: boxWith(() => orientation),
|
|
29
|
+
disabled: boxWith(() => disabled),
|
|
30
|
+
loop: boxWith(() => loop),
|
|
31
|
+
name: boxWith(() => name),
|
|
32
|
+
required: boxWith(() => required),
|
|
33
|
+
readonly: boxWith(() => readonly),
|
|
34
|
+
id: boxWith(() => id),
|
|
35
|
+
value: boxWith(
|
|
36
36
|
() => value,
|
|
37
37
|
(v) => {
|
|
38
38
|
if (v === value) return;
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
onValueChange?.(v);
|
|
41
41
|
}
|
|
42
42
|
),
|
|
43
|
-
ref:
|
|
43
|
+
ref: boxWith(
|
|
44
44
|
() => ref,
|
|
45
45
|
(v) => (ref = v)
|
|
46
46
|
),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { RadioGroupRootProps } from "../types.js";
|
|
2
|
-
declare const RadioGroup: import("svelte").Component<RadioGroupRootProps, {}, "
|
|
2
|
+
declare const RadioGroup: import("svelte").Component<RadioGroupRootProps, {}, "ref" | "value">;
|
|
3
3
|
type RadioGroup = ReturnType<typeof RadioGroup>;
|
|
4
4
|
export default RadioGroup;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { attachRef } from "svelte-toolbelt";
|
|
2
2
|
import { Context, watch } from "runed";
|
|
3
|
-
import { createBitsAttrs, getAriaChecked,
|
|
3
|
+
import { createBitsAttrs, getAriaChecked, boolToEmptyStrOrUndef, boolToStr, } from "../../internal/attrs.js";
|
|
4
4
|
import { kbd } from "../../internal/kbd.js";
|
|
5
5
|
import { RovingFocusGroup } from "../../internal/roving-focus-group.js";
|
|
6
6
|
const radioGroupAttrs = createBitsAttrs({
|
|
@@ -35,11 +35,11 @@ export class RadioGroupRootState {
|
|
|
35
35
|
props = $derived.by(() => ({
|
|
36
36
|
id: this.opts.id.current,
|
|
37
37
|
role: "radiogroup",
|
|
38
|
-
"aria-required":
|
|
39
|
-
"aria-disabled":
|
|
38
|
+
"aria-required": boolToStr(this.opts.required.current),
|
|
39
|
+
"aria-disabled": boolToStr(this.opts.disabled.current),
|
|
40
40
|
"aria-readonly": this.opts.readonly.current ? "true" : undefined,
|
|
41
|
-
"data-disabled":
|
|
42
|
-
"data-readonly":
|
|
41
|
+
"data-disabled": boolToEmptyStrOrUndef(this.opts.disabled.current),
|
|
42
|
+
"data-readonly": boolToEmptyStrOrUndef(this.opts.readonly.current),
|
|
43
43
|
"data-orientation": this.opts.orientation.current,
|
|
44
44
|
[radioGroupAttrs.root]: "",
|
|
45
45
|
...this.attachment,
|
|
@@ -109,8 +109,8 @@ export class RadioGroupItemState {
|
|
|
109
109
|
disabled: this.#isDisabled ? true : undefined,
|
|
110
110
|
"data-value": this.opts.value.current,
|
|
111
111
|
"data-orientation": this.root.opts.orientation.current,
|
|
112
|
-
"data-disabled":
|
|
113
|
-
"data-readonly":
|
|
112
|
+
"data-disabled": boolToEmptyStrOrUndef(this.#isDisabled),
|
|
113
|
+
"data-readonly": boolToEmptyStrOrUndef(this.#isReadonly),
|
|
114
114
|
"data-state": this.#isChecked ? "checked" : "unchecked",
|
|
115
115
|
"aria-checked": getAriaChecked(this.#isChecked, false),
|
|
116
116
|
[radioGroupAttrs.item]: "",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import {
|
|
2
|
+
import { boxWith, mergeProps } from "svelte-toolbelt";
|
|
3
3
|
import type { RangeCalendarCellProps } from "../types.js";
|
|
4
4
|
import { RangeCalendarCellState } from "../range-calendar.svelte.js";
|
|
5
5
|
import { createId } from "../../../internal/create-id.js";
|
|
@@ -17,13 +17,13 @@
|
|
|
17
17
|
}: RangeCalendarCellProps = $props();
|
|
18
18
|
|
|
19
19
|
const cellState = RangeCalendarCellState.create({
|
|
20
|
-
id:
|
|
21
|
-
ref:
|
|
20
|
+
id: boxWith(() => id),
|
|
21
|
+
ref: boxWith(
|
|
22
22
|
() => ref,
|
|
23
23
|
(v) => (ref = v)
|
|
24
24
|
),
|
|
25
|
-
date:
|
|
26
|
-
month:
|
|
25
|
+
date: boxWith(() => date),
|
|
26
|
+
month: boxWith(() => month),
|
|
27
27
|
});
|
|
28
28
|
|
|
29
29
|
const mergedProps = $derived(mergeProps(restProps, cellState.props));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import {
|
|
2
|
+
import { boxWith, mergeProps } from "svelte-toolbelt";
|
|
3
3
|
import type { RangeCalendarDayProps } from "../types.js";
|
|
4
4
|
import { RangeCalendarDayState } from "../range-calendar.svelte.js";
|
|
5
5
|
import { createId } from "../../../internal/create-id.js";
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
}: RangeCalendarDayProps = $props();
|
|
16
16
|
|
|
17
17
|
const dayState = RangeCalendarDayState.create({
|
|
18
|
-
id:
|
|
19
|
-
ref:
|
|
18
|
+
id: boxWith(() => id),
|
|
19
|
+
ref: boxWith(
|
|
20
20
|
() => ref,
|
|
21
21
|
(v) => (ref = v)
|
|
22
22
|
),
|