bits-ui 0.18.2 → 0.18.3
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/README.md +31 -0
- package/dist/bits/combobox/_types.d.ts +1 -1
- package/dist/bits/context-menu/types.d.ts +1 -1
- package/dist/bits/date-field/_types.d.ts +1 -1
- package/dist/bits/date-field/types.d.ts +1 -1
- package/dist/bits/date-picker/_types.d.ts +1 -1
- package/dist/bits/date-range-field/ctx.d.ts +20 -20
- package/dist/bits/date-range-field/ctx.js +1 -1
- package/dist/bits/date-range-picker/_types.d.ts +1 -1
- package/dist/bits/floating/helpers.d.ts +1 -1
- package/dist/bits/floating/types.d.ts +1 -1
- package/dist/bits/label/ctx.js +1 -1
- package/dist/bits/menu/types.d.ts +1 -1
- package/dist/bits/menubar/ctx.js +1 -1
- package/dist/bits/pagination/_types.d.ts +1 -1
- package/dist/bits/pagination/ctx.js +1 -1
- package/dist/bits/pagination/types.d.ts +1 -1
- package/dist/bits/pin-input/types.d.ts +1 -1
- package/dist/bits/range-calendar/types.d.ts +2 -2
- package/dist/bits/select/_types.d.ts +1 -1
- package/dist/bits/toggle-group/components/toggle-group-item.svelte +1 -1
- package/dist/bits/tooltip/types.d.ts +1 -1
- package/dist/helpers/index.d.ts +2 -2
- package/dist/helpers/index.js +2 -2
- package/dist/internal/focus.js +1 -1
- package/dist/internal/types.d.ts +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Bits UI
|
|
2
2
|
|
|
3
|
+
<!-- automd:badges license name="bits-ui" color="pink" github="huntabyte/bits-ui" -->
|
|
4
|
+
|
|
5
|
+
[](https://npmjs.com/package/bits-ui)
|
|
6
|
+
[](https://npmjs.com/package/bits-ui)
|
|
7
|
+
[](https://github.com/huntabyte/bits-ui/blob/main/LICENSE)
|
|
8
|
+
|
|
9
|
+
<!-- /automd -->
|
|
10
|
+
|
|
3
11
|
The headless components for Svelte.
|
|
4
12
|
|
|
5
13
|
[Read the docs](https://bits-ui.com)
|
|
@@ -10,3 +18,26 @@ The headless components for Svelte.
|
|
|
10
18
|
- [Melt UI](https://melt-ui.com) - The underlying builder API that powers Bits.
|
|
11
19
|
- [Radix UI](https://radix-ui.com) - The incredible headless component APIs that we've taken heavy inspiration from.
|
|
12
20
|
- [React Spectrum](https://react-spectrum.adobe.com) - An incredible collection of headless components we've taken inspiration from.
|
|
21
|
+
|
|
22
|
+
## Sponsors
|
|
23
|
+
|
|
24
|
+
This project is supported by the following beautiful people/organizations:
|
|
25
|
+
|
|
26
|
+
<p align="center">
|
|
27
|
+
<a href="https://github.com/sponsors/huntabyte">
|
|
28
|
+
<img src='https://cdn.jsdelivr.net/gh/huntabyte/static/sponsors.svg' alt="Logos from Sponsors" />
|
|
29
|
+
</a>
|
|
30
|
+
</p>
|
|
31
|
+
|
|
32
|
+
## License
|
|
33
|
+
|
|
34
|
+
<!-- automd:contributors license=MIT author="huntabyte" github="huntabyte/bits-ui" -->
|
|
35
|
+
|
|
36
|
+
Published under the [MIT](https://github.com/huntabyte/bits-ui/blob/main/LICENSE) license.
|
|
37
|
+
Built by [@huntabyte](https://github.com/huntabyte) and [community](https://github.com/huntabyte/bits-ui/graphs/contributors). Designed by [Pavel Stianko](https://x.com/pavel_stianko) 💛
|
|
38
|
+
<br><br>
|
|
39
|
+
<a href="https://github.com/huntabyte/bits-ui/graphs/contributors">
|
|
40
|
+
<img src="https://contrib.rocks/image?repo=huntabyte/bits-ui" />
|
|
41
|
+
</a>
|
|
42
|
+
|
|
43
|
+
<!-- /automd -->
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import type { CreateComboboxProps, ComboboxOptionProps } from "@melt-ui/svelte";
|
|
7
7
|
import type { DOMElement, Expand, OmitFloating, OnChangeFn } from "../../internal/index.js";
|
|
8
8
|
import type { ContentProps, ArrowProps } from "../floating/_types.js";
|
|
9
|
-
import type { Selected } from "
|
|
9
|
+
import type { Selected } from "../../index.js";
|
|
10
10
|
export type WhenTrue<TrueOrFalse, IfTrue, IfFalse, IfNeither = IfTrue | IfFalse> = [
|
|
11
11
|
TrueOrFalse
|
|
12
12
|
] extends [true] ? IfTrue : [TrueOrFalse] extends [false] ? IfFalse : IfNeither;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ArrowProps, CheckboxItemProps, RadioGroupProps, RadioItemProps, GroupProps, SubContentProps, SubTriggerProps, ContextTriggerProps as TriggerProps, ItemProps, CheckboxIndicatorProps, SeparatorProps, SubProps, LabelProps, Props, RadioIndicatorProps, ContentEvents, CheckboxItemEvents, ItemEvents, RadioItemEvents, SubTriggerEvents, ContextTriggerEvents as TriggerEvents, SubContentEvents } from "../menu/index.js";
|
|
2
|
-
import type { HTMLDivAttributes, Transition } from "../../internal";
|
|
2
|
+
import type { HTMLDivAttributes, Transition } from "../../internal/index.js";
|
|
3
3
|
import type * as I from "./_types.js";
|
|
4
4
|
type ContentProps<T extends Transition = Transition, In extends Transition = Transition, Out extends Transition = Transition> = I.ContentProps<T, In, Out> & HTMLDivAttributes;
|
|
5
5
|
export type { Props, SubProps, ItemProps, ArrowProps, GroupProps, LabelProps, ContentProps, TriggerProps, RadioItemProps, SeparatorProps, RadioGroupProps, SubContentProps, SubTriggerProps, CheckboxItemProps, CheckboxIndicatorProps, RadioIndicatorProps, ItemEvents, TriggerEvents, ContentEvents, RadioItemEvents, SubContentEvents, SubTriggerEvents, CheckboxItemEvents, };
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* but we don't want to document the HTML attributes.
|
|
5
5
|
*/
|
|
6
6
|
import type { Expand, OnChangeFn, OmitDates, DOMElement } from "../../internal/index.js";
|
|
7
|
-
import type { SegmentPart } from "../../shared";
|
|
7
|
+
import type { SegmentPart } from "../../shared/index.js";
|
|
8
8
|
import type { DateValue } from "@internationalized/date";
|
|
9
9
|
import type { CreateDateFieldProps } from "@melt-ui/svelte";
|
|
10
10
|
type Props = Expand<Omit<OmitDates<CreateDateFieldProps>, "required" | "name"> & {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* but we don't want to document the HTML attributes.
|
|
5
5
|
*/
|
|
6
6
|
import type { Expand, OnChangeFn, OmitDates, OmitFloating, DOMElement } from "../../internal/index.js";
|
|
7
|
-
import type { SegmentPart } from "../../shared";
|
|
7
|
+
import type { SegmentPart } from "../../shared/index.js";
|
|
8
8
|
import type { DateValue } from "@internationalized/date";
|
|
9
9
|
import type { CreateDatePickerProps } from "@melt-ui/svelte";
|
|
10
10
|
type Props = Expand<Omit<OmitFloating<OmitDates<CreateDatePickerProps>>, "required" | "name" | "calendarIds" | "dateFieldIds" | "popoverIds"> & {
|
|
@@ -31,7 +31,7 @@ export declare function setCtx(props: CreateDateRangeFieldProps): {
|
|
|
31
31
|
'data-invalid': string | undefined;
|
|
32
32
|
'data-disabled': string | undefined;
|
|
33
33
|
}, string>;
|
|
34
|
-
startSegment: import("@melt-ui/svelte/internal/helpers").MeltElement<[import("@melt-ui/svelte/internal/helpers").WithGet<import("svelte/store").Writable<import("@melt-ui/svelte/dist/builders/date-field/_internal/types").SegmentValueObj>>, import("@melt-ui/svelte/internal/helpers").WithGet<import("svelte/store").Writable<12 | 24 | undefined>>, {
|
|
34
|
+
startSegment: import("@melt-ui/svelte/internal/helpers").MeltElement<[import("@melt-ui/svelte/internal/helpers").WithGet<import("svelte/store").Writable<import("@melt-ui/svelte/dist/builders/date-field/_internal/types.js").SegmentValueObj>>, import("@melt-ui/svelte/internal/helpers").WithGet<import("svelte/store").Writable<12 | 24 | undefined>>, {
|
|
35
35
|
get: () => import("@internationalized/date").DateValue;
|
|
36
36
|
set: (this: void, value: import("@internationalized/date").DateValue) => void;
|
|
37
37
|
update: (this: void, updater: import("svelte/store").Updater<import("@internationalized/date").DateValue>) => void;
|
|
@@ -54,7 +54,7 @@ export declare function setCtx(props: CreateDateRangeFieldProps): {
|
|
|
54
54
|
subscribe(this: void, run: import("svelte/store").Subscriber<import("@internationalized/date").DateValue | undefined>, invalidate?: import("svelte/store").Invalidator<import("@internationalized/date").DateValue | undefined> | undefined): import("svelte/store").Unsubscriber;
|
|
55
55
|
get: () => import("@internationalized/date").DateValue | undefined;
|
|
56
56
|
destroy?: (() => void) | undefined;
|
|
57
|
-
}, import("svelte/store").Readable<boolean>, import("@melt-ui/svelte/internal/helpers").WithGet<import("svelte/store").Writable<boolean>>, import("@melt-ui/svelte/internal/helpers").WithGet<import("svelte/store").Writable<boolean>>, import("@melt-ui/svelte/internal/helpers").WithGet<import("svelte/store").Readable<Set<import("@melt-ui/svelte").SegmentPart>>>, import("svelte/store").Readable<{
|
|
57
|
+
}, import("svelte/store").Readable<boolean>, import("@melt-ui/svelte/internal/helpers").WithGet<import("svelte/store").Writable<boolean>>, import("@melt-ui/svelte/internal/helpers").WithGet<import("svelte/store").Writable<boolean>>, import("@melt-ui/svelte/internal/helpers").WithGet<import("svelte/store").Readable<Set<import("@melt-ui/svelte/index.js").SegmentPart>>>, import("svelte/store").Readable<{
|
|
58
58
|
field: string;
|
|
59
59
|
label: string;
|
|
60
60
|
description: string;
|
|
@@ -67,7 +67,7 @@ export declare function setCtx(props: CreateDateRangeFieldProps): {
|
|
|
67
67
|
second: string;
|
|
68
68
|
dayPeriod: string;
|
|
69
69
|
timeZoneName: string;
|
|
70
|
-
}>, import("@melt-ui/svelte/internal/helpers").WithGet<import("svelte/store").Writable<string>>], (node: HTMLElement) => import("@melt-ui/svelte/internal/types").MeltActionReturn<"keydown" | "click" | "focusout">, ([$segmentValues, $hourCycle, $placeholder, $value, $isInvalid, $disabled, $readonly, $readonlySegmentsSet, $idValues, _,]: [import("@melt-ui/svelte/dist/builders/date-field/_internal/types").SegmentValueObj, 12 | 24 | undefined, import("@internationalized/date").DateValue, import("@internationalized/date").DateValue | undefined, boolean, boolean, boolean, Set<import("@melt-ui/svelte").SegmentPart>, {
|
|
70
|
+
}>, import("@melt-ui/svelte/internal/helpers").WithGet<import("svelte/store").Writable<string>>], (node: HTMLElement) => import("@melt-ui/svelte/internal/types").MeltActionReturn<"keydown" | "click" | "focusout">, ([$segmentValues, $hourCycle, $placeholder, $value, $isInvalid, $disabled, $readonly, $readonlySegmentsSet, $idValues, _,]: [import("@melt-ui/svelte/dist/builders/date-field/_internal/types.js").SegmentValueObj, 12 | 24 | undefined, import("@internationalized/date").DateValue, import("@internationalized/date").DateValue | undefined, boolean, boolean, boolean, Set<import("@melt-ui/svelte/index.js").SegmentPart>, {
|
|
71
71
|
field: string;
|
|
72
72
|
label: string;
|
|
73
73
|
description: string;
|
|
@@ -80,7 +80,7 @@ export declare function setCtx(props: CreateDateRangeFieldProps): {
|
|
|
80
80
|
second: string;
|
|
81
81
|
dayPeriod: string;
|
|
82
82
|
timeZoneName: string;
|
|
83
|
-
}, string]) => (part: import("@melt-ui/svelte").SegmentPart) => {
|
|
83
|
+
}, string]) => (part: import("@melt-ui/svelte/index.js").SegmentPart) => {
|
|
84
84
|
'aria-invalid': "true" | undefined;
|
|
85
85
|
'aria-disabled': "true" | undefined;
|
|
86
86
|
'aria-readonly': "true" | undefined;
|
|
@@ -100,7 +100,7 @@ export declare function setCtx(props: CreateDateRangeFieldProps): {
|
|
|
100
100
|
'data-disabled': string | undefined;
|
|
101
101
|
'data-segment': string;
|
|
102
102
|
}, string>;
|
|
103
|
-
endSegment: import("@melt-ui/svelte/internal/helpers").MeltElement<[import("@melt-ui/svelte/internal/helpers").WithGet<import("svelte/store").Writable<import("@melt-ui/svelte/dist/builders/date-field/_internal/types").SegmentValueObj>>, import("@melt-ui/svelte/internal/helpers").WithGet<import("svelte/store").Writable<12 | 24 | undefined>>, {
|
|
103
|
+
endSegment: import("@melt-ui/svelte/internal/helpers").MeltElement<[import("@melt-ui/svelte/internal/helpers").WithGet<import("svelte/store").Writable<import("@melt-ui/svelte/dist/builders/date-field/_internal/types.js").SegmentValueObj>>, import("@melt-ui/svelte/internal/helpers").WithGet<import("svelte/store").Writable<12 | 24 | undefined>>, {
|
|
104
104
|
get: () => import("@internationalized/date").DateValue;
|
|
105
105
|
set: (this: void, value: import("@internationalized/date").DateValue) => void;
|
|
106
106
|
update: (this: void, updater: import("svelte/store").Updater<import("@internationalized/date").DateValue>) => void;
|
|
@@ -123,7 +123,7 @@ export declare function setCtx(props: CreateDateRangeFieldProps): {
|
|
|
123
123
|
subscribe(this: void, run: import("svelte/store").Subscriber<import("@internationalized/date").DateValue | undefined>, invalidate?: import("svelte/store").Invalidator<import("@internationalized/date").DateValue | undefined> | undefined): import("svelte/store").Unsubscriber;
|
|
124
124
|
get: () => import("@internationalized/date").DateValue | undefined;
|
|
125
125
|
destroy?: (() => void) | undefined;
|
|
126
|
-
}, import("svelte/store").Readable<boolean>, import("@melt-ui/svelte/internal/helpers").WithGet<import("svelte/store").Writable<boolean>>, import("@melt-ui/svelte/internal/helpers").WithGet<import("svelte/store").Writable<boolean>>, import("@melt-ui/svelte/internal/helpers").WithGet<import("svelte/store").Readable<Set<import("@melt-ui/svelte").SegmentPart>>>, import("svelte/store").Readable<{
|
|
126
|
+
}, import("svelte/store").Readable<boolean>, import("@melt-ui/svelte/internal/helpers").WithGet<import("svelte/store").Writable<boolean>>, import("@melt-ui/svelte/internal/helpers").WithGet<import("svelte/store").Writable<boolean>>, import("@melt-ui/svelte/internal/helpers").WithGet<import("svelte/store").Readable<Set<import("@melt-ui/svelte/index.js").SegmentPart>>>, import("svelte/store").Readable<{
|
|
127
127
|
field: string;
|
|
128
128
|
label: string;
|
|
129
129
|
description: string;
|
|
@@ -136,7 +136,7 @@ export declare function setCtx(props: CreateDateRangeFieldProps): {
|
|
|
136
136
|
second: string;
|
|
137
137
|
dayPeriod: string;
|
|
138
138
|
timeZoneName: string;
|
|
139
|
-
}>, import("@melt-ui/svelte/internal/helpers").WithGet<import("svelte/store").Writable<string>>], (node: HTMLElement) => import("@melt-ui/svelte/internal/types").MeltActionReturn<"keydown" | "click" | "focusout">, ([$segmentValues, $hourCycle, $placeholder, $value, $isInvalid, $disabled, $readonly, $readonlySegmentsSet, $idValues, _,]: [import("@melt-ui/svelte/dist/builders/date-field/_internal/types").SegmentValueObj, 12 | 24 | undefined, import("@internationalized/date").DateValue, import("@internationalized/date").DateValue | undefined, boolean, boolean, boolean, Set<import("@melt-ui/svelte").SegmentPart>, {
|
|
139
|
+
}>, import("@melt-ui/svelte/internal/helpers").WithGet<import("svelte/store").Writable<string>>], (node: HTMLElement) => import("@melt-ui/svelte/internal/types").MeltActionReturn<"keydown" | "click" | "focusout">, ([$segmentValues, $hourCycle, $placeholder, $value, $isInvalid, $disabled, $readonly, $readonlySegmentsSet, $idValues, _,]: [import("@melt-ui/svelte/dist/builders/date-field/_internal/types.js").SegmentValueObj, 12 | 24 | undefined, import("@internationalized/date").DateValue, import("@internationalized/date").DateValue | undefined, boolean, boolean, boolean, Set<import("@melt-ui/svelte/index.js").SegmentPart>, {
|
|
140
140
|
field: string;
|
|
141
141
|
label: string;
|
|
142
142
|
description: string;
|
|
@@ -149,7 +149,7 @@ export declare function setCtx(props: CreateDateRangeFieldProps): {
|
|
|
149
149
|
second: string;
|
|
150
150
|
dayPeriod: string;
|
|
151
151
|
timeZoneName: string;
|
|
152
|
-
}, string]) => (part: import("@melt-ui/svelte").SegmentPart) => {
|
|
152
|
+
}, string]) => (part: import("@melt-ui/svelte/index.js").SegmentPart) => {
|
|
153
153
|
'aria-invalid': "true" | undefined;
|
|
154
154
|
'aria-disabled': "true" | undefined;
|
|
155
155
|
'aria-readonly': "true" | undefined;
|
|
@@ -201,10 +201,10 @@ export declare function setCtx(props: CreateDateRangeFieldProps): {
|
|
|
201
201
|
};
|
|
202
202
|
states: {
|
|
203
203
|
value: {
|
|
204
|
-
update: (updater: import("svelte/store").Updater<import("@melt-ui/svelte").DateRange>, sideEffect?: ((newValue: import("@melt-ui/svelte").DateRange) => void) | undefined) => void;
|
|
205
|
-
set: (this: void, value: import("@melt-ui/svelte").DateRange) => void;
|
|
206
|
-
subscribe(this: void, run: import("svelte/store").Subscriber<import("@melt-ui/svelte").DateRange>, invalidate?: import("svelte/store").Invalidator<import("@melt-ui/svelte").DateRange> | undefined): import("svelte/store").Unsubscriber;
|
|
207
|
-
get: () => import("@melt-ui/svelte").DateRange;
|
|
204
|
+
update: (updater: import("svelte/store").Updater<import("@melt-ui/svelte/index.js").DateRange>, sideEffect?: ((newValue: import("@melt-ui/svelte/index.js").DateRange) => void) | undefined) => void;
|
|
205
|
+
set: (this: void, value: import("@melt-ui/svelte/index.js").DateRange) => void;
|
|
206
|
+
subscribe(this: void, run: import("svelte/store").Subscriber<import("@melt-ui/svelte/index.js").DateRange>, invalidate?: import("svelte/store").Invalidator<import("@melt-ui/svelte/index.js").DateRange> | undefined): import("svelte/store").Unsubscriber;
|
|
207
|
+
get: () => import("@melt-ui/svelte/index.js").DateRange;
|
|
208
208
|
destroy?: (() => void) | undefined;
|
|
209
209
|
};
|
|
210
210
|
placeholder: {
|
|
@@ -215,24 +215,24 @@ export declare function setCtx(props: CreateDateRangeFieldProps): {
|
|
|
215
215
|
};
|
|
216
216
|
segmentContents: import("svelte/store").Readable<{
|
|
217
217
|
start: {
|
|
218
|
-
part: import("@melt-ui/svelte").SegmentPart;
|
|
218
|
+
part: import("@melt-ui/svelte/index.js").SegmentPart;
|
|
219
219
|
value: string;
|
|
220
220
|
}[];
|
|
221
221
|
end: {
|
|
222
|
-
part: import("@melt-ui/svelte").SegmentPart;
|
|
222
|
+
part: import("@melt-ui/svelte/index.js").SegmentPart;
|
|
223
223
|
value: string;
|
|
224
224
|
}[];
|
|
225
225
|
}>;
|
|
226
|
-
endSegmentValues: import("@melt-ui/svelte/internal/helpers").WithGet<import("svelte/store").Writable<import("@melt-ui/svelte/dist/builders/date-field/_internal/types").SegmentValueObj>>;
|
|
227
|
-
startSegmentValues: import("@melt-ui/svelte/internal/helpers").WithGet<import("svelte/store").Writable<import("@melt-ui/svelte/dist/builders/date-field/_internal/types").SegmentValueObj>>;
|
|
226
|
+
endSegmentValues: import("@melt-ui/svelte/internal/helpers").WithGet<import("svelte/store").Writable<import("@melt-ui/svelte/dist/builders/date-field/_internal/types.js").SegmentValueObj>>;
|
|
227
|
+
startSegmentValues: import("@melt-ui/svelte/internal/helpers").WithGet<import("svelte/store").Writable<import("@melt-ui/svelte/dist/builders/date-field/_internal/types.js").SegmentValueObj>>;
|
|
228
228
|
isInvalid: import("svelte/store").Readable<boolean>;
|
|
229
229
|
};
|
|
230
230
|
options: {
|
|
231
231
|
endName: import("@melt-ui/svelte/internal/helpers").WithGet<import("svelte/store").Writable<string | undefined>>;
|
|
232
232
|
startName: import("@melt-ui/svelte/internal/helpers").WithGet<import("svelte/store").Writable<string | undefined>>;
|
|
233
233
|
disabled: import("@melt-ui/svelte/internal/helpers").WithGet<import("svelte/store").Writable<boolean>>;
|
|
234
|
-
onValueChange?: import("@melt-ui/svelte/internal/helpers").WithGet<import("svelte/store").Writable<import("@melt-ui/svelte/internal/helpers").ChangeFn<import("@melt-ui/svelte").DateRange> | undefined>> | undefined;
|
|
235
|
-
defaultValue: import("@melt-ui/svelte/internal/helpers").WithGet<import("svelte/store").Writable<import("@melt-ui/svelte").DateRange>>;
|
|
234
|
+
onValueChange?: import("@melt-ui/svelte/internal/helpers").WithGet<import("svelte/store").Writable<import("@melt-ui/svelte/internal/helpers").ChangeFn<import("@melt-ui/svelte/index.js").DateRange> | undefined>> | undefined;
|
|
235
|
+
defaultValue: import("@melt-ui/svelte/internal/helpers").WithGet<import("svelte/store").Writable<import("@melt-ui/svelte/index.js").DateRange>>;
|
|
236
236
|
ids?: import("@melt-ui/svelte/internal/helpers").WithGet<import("svelte/store").Writable<Partial<{
|
|
237
237
|
label: string;
|
|
238
238
|
description: string;
|
|
@@ -241,9 +241,9 @@ export declare function setCtx(props: CreateDateRangeFieldProps): {
|
|
|
241
241
|
}> | undefined>> | undefined;
|
|
242
242
|
required?: import("@melt-ui/svelte/internal/helpers").WithGet<import("svelte/store").Writable<boolean | undefined>> | undefined;
|
|
243
243
|
defaultPlaceholder?: import("@melt-ui/svelte/internal/helpers").WithGet<import("svelte/store").Writable<import("@internationalized/date").DateValue | undefined>> | undefined;
|
|
244
|
-
granularity: import("@melt-ui/svelte/internal/helpers").WithGet<import("svelte/store").Writable<import("@melt-ui/svelte").Granularity | undefined>>;
|
|
244
|
+
granularity: import("@melt-ui/svelte/internal/helpers").WithGet<import("svelte/store").Writable<import("@melt-ui/svelte/index.js").Granularity | undefined>>;
|
|
245
245
|
onPlaceholderChange?: import("@melt-ui/svelte/internal/helpers").WithGet<import("svelte/store").Writable<import("@melt-ui/svelte/internal/helpers").ChangeFn<import("@internationalized/date").DateValue> | undefined>> | undefined;
|
|
246
|
-
isDateUnavailable: import("@melt-ui/svelte/internal/helpers").WithGet<import("svelte/store").Writable<import("@melt-ui/svelte").Matcher | undefined>>;
|
|
246
|
+
isDateUnavailable: import("@melt-ui/svelte/internal/helpers").WithGet<import("svelte/store").Writable<import("@melt-ui/svelte/index.js").Matcher | undefined>>;
|
|
247
247
|
minValue: import("@melt-ui/svelte/internal/helpers").WithGet<import("svelte/store").Writable<import("@internationalized/date").DateValue | undefined>>;
|
|
248
248
|
maxValue: import("@melt-ui/svelte/internal/helpers").WithGet<import("svelte/store").Writable<import("@internationalized/date").DateValue | undefined>>;
|
|
249
249
|
readonly: import("@melt-ui/svelte/internal/helpers").WithGet<import("svelte/store").Writable<boolean>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createDateRangeField } from "@melt-ui/svelte";
|
|
2
2
|
import { getContext, setContext } from "svelte";
|
|
3
3
|
import { removeUndefined, getOptionUpdater, createBitAttrs } from "../../internal/index.js";
|
|
4
|
-
import { getDateFieldData } from "../date-field/ctx";
|
|
4
|
+
import { getDateFieldData } from "../date-field/ctx.js";
|
|
5
5
|
export function setCtx(props) {
|
|
6
6
|
const { NAME, PARTS } = getDateFieldData();
|
|
7
7
|
const getAttrs = createBitAttrs(NAME, PARTS);
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* but we don't want to document the HTML attributes.
|
|
5
5
|
*/
|
|
6
6
|
import type { Expand, OnChangeFn, OmitDates, OmitFloating, DOMElement } from "../../internal/index.js";
|
|
7
|
-
import type { DateRange, SegmentPart } from "../../shared";
|
|
7
|
+
import type { DateRange, SegmentPart } from "../../shared/index.js";
|
|
8
8
|
import type { DateValue } from "@internationalized/date";
|
|
9
9
|
import type { CreateDateRangePickerProps } from "@melt-ui/svelte";
|
|
10
10
|
type OmitStartEnd<T> = Omit<T, "startName" | "endName" | "startIds" | "endIds" | "dateFieldIds" | "popoverIds" | "calendarIds">;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="svelte" />
|
|
2
2
|
import type { Writable } from "svelte/store";
|
|
3
|
-
import type { FloatingConfig } from "./floating-config";
|
|
3
|
+
import type { FloatingConfig } from "./floating-config.js";
|
|
4
4
|
import type { FloatingProps } from "./_types.js";
|
|
5
5
|
export declare function getPositioningUpdater(store: Writable<FloatingConfig>): (props?: FloatingProps) => void;
|
|
6
6
|
export declare function updatePositioning(store: Writable<FloatingConfig>, props: FloatingProps): void;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { HTMLDivAttributes, Transition } from "../../internal";
|
|
1
|
+
import type { HTMLDivAttributes, Transition } from "../../internal/index.js";
|
|
2
2
|
import type * as I from "./_types.js";
|
|
3
3
|
export type ContentProps<T extends Transition = Transition, In extends Transition = Transition, Out extends Transition = Transition> = I.ContentProps<T, In, Out> & HTMLDivAttributes;
|
package/dist/bits/label/ctx.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* such as `DropdownMenu`, `Menubar` & `ContextMenu`.
|
|
4
4
|
*/
|
|
5
5
|
import type { DOMEl, HTMLDivAttributes } from "../../internal/index.js";
|
|
6
|
-
import type { CustomEventHandler } from "
|
|
6
|
+
import type { CustomEventHandler } from "../../index.js";
|
|
7
7
|
import type { HTMLAnchorAttributes, HTMLButtonAttributes } from "svelte/elements";
|
|
8
8
|
import type * as I from "./_types.js";
|
|
9
9
|
import type { ContentProps } from "../floating/types.js";
|
package/dist/bits/menubar/ctx.js
CHANGED
|
@@ -2,7 +2,7 @@ import { createMenubar, } from "@melt-ui/svelte";
|
|
|
2
2
|
import { getContext, setContext } from "svelte";
|
|
3
3
|
import { createBitAttrs, getOptionUpdater, removeUndefined } from "../../internal/index.js";
|
|
4
4
|
import { getPositioningUpdater } from "../floating/helpers.js";
|
|
5
|
-
import { getSubmenuCtx } from "../menu/ctx";
|
|
5
|
+
import { getSubmenuCtx } from "../menu/ctx.js";
|
|
6
6
|
function getMenubarData() {
|
|
7
7
|
const NAME = "menubar";
|
|
8
8
|
const MENU_NAME = "menu";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* to type-check our API documentation, which requires we document each prop,
|
|
4
4
|
* but we don't want to document the HTML attributes.
|
|
5
5
|
*/
|
|
6
|
-
import type { DOMElement, Expand, OnChangeFn } from "../../internal";
|
|
6
|
+
import type { DOMElement, Expand, OnChangeFn } from "../../internal/index.js";
|
|
7
7
|
import type { CreatePaginationProps, Page } from "@melt-ui/svelte";
|
|
8
8
|
type OmitPaginationProps<T> = Omit<T, "page" | "defaultPage" | "onPageChange">;
|
|
9
9
|
type Props = Expand<OmitPaginationProps<CreatePaginationProps> & {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createPagination } from "@melt-ui/svelte";
|
|
2
2
|
import { getContext, setContext } from "svelte";
|
|
3
|
-
import { createBitAttrs, getOptionUpdater, removeUndefined } from "../../internal";
|
|
3
|
+
import { createBitAttrs, getOptionUpdater, removeUndefined } from "../../internal/index.js";
|
|
4
4
|
export function getPaginationData() {
|
|
5
5
|
const NAME = "pagination";
|
|
6
6
|
const PARTS = ["root", "prev-button", "next-button", "page"];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HTMLButtonAttributes } from "svelte/elements";
|
|
2
|
-
import type { CustomEventHandler } from "
|
|
2
|
+
import type { CustomEventHandler } from "../../index.js";
|
|
3
3
|
import type * as I from "./_types.js";
|
|
4
4
|
import type { HTMLDivAttributes } from "../../internal/types.js";
|
|
5
5
|
type Props = I.Props & HTMLDivAttributes;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HTMLDivAttributes } from "../../internal/index.js";
|
|
2
|
-
import type { CustomEventHandler } from "
|
|
2
|
+
import type { CustomEventHandler } from "../../index.js";
|
|
3
3
|
import type { HTMLInputAttributes } from "svelte/elements";
|
|
4
4
|
import type * as I from "./_types.js";
|
|
5
5
|
type Props = I.Props & HTMLDivAttributes;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { HTMLDivAttributes } from "../../internal";
|
|
1
|
+
import type { HTMLDivAttributes } from "../../internal/index.js";
|
|
2
2
|
import type { HTMLAttributes, HTMLButtonAttributes, HTMLTableAttributes, HTMLTdAttributes, HTMLThAttributes } from "svelte/elements";
|
|
3
3
|
import type * as I from "./_types.js";
|
|
4
|
-
import type { CustomEventHandler } from "
|
|
4
|
+
import type { CustomEventHandler } from "../../index.js";
|
|
5
5
|
type Props = I.Props & Omit<HTMLDivAttributes, "placeholder">;
|
|
6
6
|
type PrevButtonProps = I.PrevButtonProps & HTMLButtonAttributes;
|
|
7
7
|
type NextButtonProps = I.NextButtonProps & HTMLButtonAttributes;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import type { CreateSelectProps, SelectOptionProps } from "@melt-ui/svelte";
|
|
7
7
|
import type { DOMElement, Expand, OmitFloating, OnChangeFn } from "../../internal/index.js";
|
|
8
8
|
import type { ContentProps, ArrowProps } from "../floating/_types.js";
|
|
9
|
-
import type { Selected } from "
|
|
9
|
+
import type { Selected } from "../../index.js";
|
|
10
10
|
export type WhenTrue<TrueOrFalse, IfTrue, IfFalse, IfNeither = IfTrue | IfFalse> = [
|
|
11
11
|
TrueOrFalse
|
|
12
12
|
] extends [true] ? IfTrue : [TrueOrFalse] extends [false] ? IfFalse : IfNeither;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script>import { melt } from "@melt-ui/svelte";
|
|
2
2
|
import { getCtx } from "../ctx.js";
|
|
3
|
-
import { createDispatcher } from "../../../internal";
|
|
3
|
+
import { createDispatcher } from "../../../internal/index.js";
|
|
4
4
|
export let value;
|
|
5
5
|
export let disabled = false;
|
|
6
6
|
export let asChild = false;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { HTMLDivAttributes, Transition } from "../../internal/index.js";
|
|
2
2
|
import type { HTMLButtonAttributes } from "svelte/elements";
|
|
3
|
-
import type { CustomEventHandler } from "
|
|
3
|
+
import type { CustomEventHandler } from "../../index.js";
|
|
4
4
|
import type * as I from "./_types.js";
|
|
5
5
|
type Props = I.Props;
|
|
6
6
|
type ContentProps<T extends Transition = Transition, In extends Transition = Transition, Out extends Transition = Transition> = I.ContentProps<T, In, Out> & HTMLDivAttributes;
|
package/dist/helpers/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./builders";
|
|
2
|
-
export * from "./event-handlers";
|
|
1
|
+
export * from "./builders.js";
|
|
2
|
+
export * from "./event-handlers.js";
|
package/dist/helpers/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./builders";
|
|
2
|
-
export * from "./event-handlers";
|
|
1
|
+
export * from "./builders.js";
|
|
2
|
+
export * from "./event-handlers.js";
|
package/dist/internal/focus.js
CHANGED
package/dist/internal/types.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import type { Action } from "svelte/action";
|
|
3
3
|
import type { HTMLAttributes } from "svelte/elements";
|
|
4
4
|
import type { TransitionConfig } from "svelte/transition";
|
|
5
|
-
import type { CreateDispatcher } from ".";
|
|
5
|
+
import type { CreateDispatcher } from "./index.js";
|
|
6
6
|
export type ObjectVariation<T> = T extends object ? T : never;
|
|
7
7
|
export type Transition = (node: Element, params?: any) => TransitionConfig;
|
|
8
8
|
export type TransitionParams<T extends Transition> = Parameters<T>[1];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bits-ui",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": "github:huntabyte/bits-ui",
|
|
6
6
|
"exports": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"@playwright/test": "^1.28.1",
|
|
22
22
|
"@sveltejs/adapter-vercel": "^5.1.0",
|
|
23
23
|
"@sveltejs/kit": "^2.5.0",
|
|
24
|
-
"@sveltejs/package": "^2.2.
|
|
24
|
+
"@sveltejs/package": "^2.2.7",
|
|
25
25
|
"@sveltejs/vite-plugin-svelte": "^3.0.2",
|
|
26
26
|
"@svitejs/changesets-changelog-github-compact": "^1.1.0",
|
|
27
27
|
"@tailwindcss/typography": "^0.5.10",
|