@ark-ui/solid 0.7.0 → 0.7.1
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/CHANGELOG.md +9 -2
- package/accordion/accordion-context.d.ts +1 -1
- package/carousel/carousel.anatomy.d.ts +1 -1
- package/combobox/combobox-context.d.ts +1 -1
- package/combobox/use-combobox.d.ts +2 -3
- package/date-picker/date-picker-context.d.ts +257 -0
- package/date-picker/date-picker.anatomy.d.ts +1 -1
- package/date-picker/use-date-picker.d.ts +132 -0
- package/hover-card/hover-card-context.d.ts +26 -0
- package/hover-card/use-hover-card.d.ts +16 -0
- package/package.json +40 -40
- package/pagination/pagination.anatomy.d.ts +1 -1
- package/popover/popover-context.d.ts +36 -0
- package/popover/use-popover.d.ts +21 -0
- package/rating-group/rating-context.d.ts +1 -2
- package/rating-group/rating-group-context.d.ts +1 -1
- package/segment-group/segment-group.anatomy.d.ts +1 -1
- package/select/select-context.d.ts +2 -1
- package/splitter/splitter-context.d.ts +2 -1
- package/splitter/use-splitter.d.ts +2 -2
- package/tabs/tabs-context.d.ts +1 -1
- package/toast/toast-item-context.d.ts +1 -1
- package/tooltip/tooltip-context.d.ts +36 -0
- package/tooltip/use-tooltip.d.ts +21 -0
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,12 @@ description: All notable changes to this project will be documented in this file
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.7.1] - 2023-06-30
|
|
10
|
+
|
|
11
|
+
## Fixed
|
|
12
|
+
|
|
13
|
+
- Resolved an issue that types accross various components were not being exported correctly.
|
|
14
|
+
|
|
9
15
|
## [0.7.0] - 2023-06-27
|
|
10
16
|
|
|
11
17
|
### Added
|
|
@@ -87,12 +93,13 @@ description: All notable changes to this project will be documented in this file
|
|
|
87
93
|
- Add `Toast`
|
|
88
94
|
- Add `Tooltip`
|
|
89
95
|
|
|
90
|
-
[unreleased]: https://github.com/chakra-ui/ark/compare/@ark-ui/solid@0.7.
|
|
96
|
+
[unreleased]: https://github.com/chakra-ui/ark/compare/@ark-ui/solid@0.7.1...HEAD
|
|
91
97
|
[0.1.0]: https://github.com/chakra-ui/ark/releases/tag/@ark-ui/solid@0.1.0
|
|
92
98
|
[0.2.0]: https://github.com/chakra-ui/ark/releases/tag/@ark-ui/solid@0.2.0
|
|
93
99
|
[0.3.0]: https://github.com/chakra-ui/ark/releases/tag/@ark-ui/solid@0.3.0
|
|
94
100
|
[0.4.0]: https://github.com/chakra-ui/ark/releases/tag/@ark-ui/solid@0.4.0
|
|
95
101
|
[0.5.0]: https://github.com/chakra-ui/ark/releases/tag/@ark-ui/solid@0.5.0
|
|
96
102
|
[0.6.0]: https://github.com/chakra-ui/ark/releases/tag/@ark-ui/solid@0.6.0
|
|
97
|
-
|
|
98
103
|
[0.7.0]: https://github.com/chakra-ui/ark/releases/tag/@ark-ui/solid@0.7.0
|
|
104
|
+
|
|
105
|
+
[0.7.1]: https://github.com/chakra-ui/ark/releases/tag/@ark-ui/solid@0.7.1
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ItemProps, ItemState } from '@zag-js/accordion
|
|
1
|
+
import type { ItemProps, ItemState } from '@zag-js/accordion';
|
|
2
2
|
import type { Accessor, JSX } from 'solid-js';
|
|
3
3
|
import type { ContextProviderComponent } from 'solid-js/types/reactive/signal';
|
|
4
4
|
import { type UseAccordionReturn } from './use-accordion';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { AnatomyInstance, AnatomyPart } from '@zag-js/anatomy
|
|
1
|
+
import type { AnatomyInstance, AnatomyPart } from '@zag-js/anatomy';
|
|
2
2
|
export declare const carouselAnatomy: AnatomyInstance<"root" | "viewport" | "slideGroup" | "slide" | "previousTrigger" | "nextTrigger" | "indicatorGroup" | "indicator" | "control">;
|
|
3
3
|
export declare const parts: Record<"root" | "viewport" | "slideGroup" | "slide" | "previousTrigger" | "nextTrigger" | "indicatorGroup" | "indicator" | "control", AnatomyPart>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { OptionData, OptionProps, OptionGroupProps } from '@zag-js/combobox
|
|
1
|
+
import type { OptionData, OptionProps, OptionGroupProps } from '@zag-js/combobox';
|
|
2
2
|
import type { Accessor, JSX } from 'solid-js';
|
|
3
3
|
import type { ContextProviderComponent } from 'solid-js/types/reactive/signal';
|
|
4
4
|
import { type UseComboboxReturn } from './use-combobox';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { OptionData } from '@zag-js/combobox/dist/combobox.types';
|
|
2
1
|
import type { Accessor, JSX } from 'solid-js';
|
|
3
2
|
import * as combobox from '@zag-js/combobox';
|
|
4
3
|
import { type Optional } from '../types';
|
|
@@ -9,9 +8,9 @@ export declare const useCombobox: (props: UseComboboxProps) => Accessor<{
|
|
|
9
8
|
isOpen: boolean;
|
|
10
9
|
isInputValueEmpty: boolean;
|
|
11
10
|
inputValue: string;
|
|
12
|
-
focusedOption: OptionData | null;
|
|
11
|
+
focusedOption: combobox.OptionData | null;
|
|
13
12
|
selectedValue: string | undefined;
|
|
14
|
-
setValue(value: string | OptionData): void;
|
|
13
|
+
setValue(value: string | combobox.OptionData): void;
|
|
15
14
|
setInputValue(value: string): void;
|
|
16
15
|
clearValue(): void;
|
|
17
16
|
focus(): void;
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
import type { matchView } from '@zag-js/date-picker/dist/date-picker.utils';
|
|
2
|
+
import type { DateView, DateValue, CalendarDate, CalendarDateTime, ZonedDateTime, GridProps, DayCellProps, CellProps, ViewProps } from '@zag-js/date-picker';
|
|
3
|
+
import type { Accessor, JSX } from 'solid-js';
|
|
4
|
+
import type { ContextProviderComponent } from 'solid-js/types/reactive/signal';
|
|
5
|
+
import { type UseDatePickerReturn } from './use-date-picker';
|
|
6
|
+
export type DatePickerContext = UseDatePickerReturn;
|
|
7
|
+
export declare const DatePickerProvider: ContextProviderComponent<Accessor<{
|
|
8
|
+
isFocused: boolean;
|
|
9
|
+
isOpen: boolean | undefined;
|
|
10
|
+
view: DateView;
|
|
11
|
+
matchView: typeof matchView;
|
|
12
|
+
getDaysInWeek(weekIndex: number, from?: DateValue | undefined): DateValue[];
|
|
13
|
+
getOffset(months: number): {
|
|
14
|
+
amount: number;
|
|
15
|
+
visibleRange: {
|
|
16
|
+
start: CalendarDate | CalendarDateTime | ZonedDateTime;
|
|
17
|
+
end: CalendarDate | CalendarDateTime | ZonedDateTime;
|
|
18
|
+
};
|
|
19
|
+
weeks: DateValue[][];
|
|
20
|
+
};
|
|
21
|
+
getMonthDays(from?: DateValue | undefined): DateValue[][];
|
|
22
|
+
isUnavailable(date: DateValue): boolean;
|
|
23
|
+
readonly weeks: DateValue[][];
|
|
24
|
+
weekDays: {
|
|
25
|
+
value: CalendarDate | CalendarDateTime | ZonedDateTime;
|
|
26
|
+
short: string;
|
|
27
|
+
long: string;
|
|
28
|
+
narrow: string;
|
|
29
|
+
}[];
|
|
30
|
+
visibleRangeText: {
|
|
31
|
+
start: string;
|
|
32
|
+
end: string;
|
|
33
|
+
formatted: string;
|
|
34
|
+
};
|
|
35
|
+
value: DateValue[];
|
|
36
|
+
valueAsDate: Date[];
|
|
37
|
+
valueAsString: string[];
|
|
38
|
+
focusedValue: DateValue;
|
|
39
|
+
focusedValueAsDate: Date;
|
|
40
|
+
focusedValueAsString: string;
|
|
41
|
+
selectToday(): void;
|
|
42
|
+
setValue(values: CalendarDate[]): void;
|
|
43
|
+
setFocusedValue(value: CalendarDate): void;
|
|
44
|
+
clearValue(): void;
|
|
45
|
+
open(): void;
|
|
46
|
+
close(): void;
|
|
47
|
+
focusMonth(month: number): void;
|
|
48
|
+
focusYear(year: number): void;
|
|
49
|
+
visibleRange: {
|
|
50
|
+
start: DateValue;
|
|
51
|
+
end: DateValue;
|
|
52
|
+
};
|
|
53
|
+
getYears(): {
|
|
54
|
+
label: string;
|
|
55
|
+
value: number;
|
|
56
|
+
}[];
|
|
57
|
+
getYearsGrid(props?: {
|
|
58
|
+
columns?: number | undefined;
|
|
59
|
+
} | undefined): {
|
|
60
|
+
label: string;
|
|
61
|
+
value: number;
|
|
62
|
+
}[][];
|
|
63
|
+
getDecade(): {
|
|
64
|
+
start: number | undefined;
|
|
65
|
+
end: number | undefined;
|
|
66
|
+
};
|
|
67
|
+
getMonths(props?: {
|
|
68
|
+
format?: "short" | "long" | undefined;
|
|
69
|
+
} | undefined): {
|
|
70
|
+
label: string;
|
|
71
|
+
value: number;
|
|
72
|
+
}[];
|
|
73
|
+
getMonthsGrid(props?: {
|
|
74
|
+
columns?: number | undefined;
|
|
75
|
+
format?: "short" | "long" | undefined;
|
|
76
|
+
} | undefined): {
|
|
77
|
+
label: string;
|
|
78
|
+
value: number;
|
|
79
|
+
}[][];
|
|
80
|
+
format(value: CalendarDate, opts?: Intl.DateTimeFormatOptions | undefined): string;
|
|
81
|
+
setView(view: DateView): void;
|
|
82
|
+
goToNext(): void;
|
|
83
|
+
goToPrev(): void;
|
|
84
|
+
controlProps: JSX.HTMLAttributes<any>;
|
|
85
|
+
contentProps: JSX.HTMLAttributes<any>;
|
|
86
|
+
getGridProps(props?: GridProps | undefined): JSX.HTMLAttributes<any>;
|
|
87
|
+
getDayCellState(props: DayCellProps): {
|
|
88
|
+
isInvalid: boolean;
|
|
89
|
+
isDisabled: boolean;
|
|
90
|
+
isSelected: boolean;
|
|
91
|
+
isUnavailable: boolean;
|
|
92
|
+
isOutsideRange: boolean;
|
|
93
|
+
isInRange: boolean;
|
|
94
|
+
isFirstInRange: boolean;
|
|
95
|
+
isLastInRange: boolean;
|
|
96
|
+
isToday: boolean;
|
|
97
|
+
isWeekend: boolean;
|
|
98
|
+
formattedDate: string;
|
|
99
|
+
readonly isFocused: boolean;
|
|
100
|
+
readonly ariaLabel: string;
|
|
101
|
+
readonly isSelectable: boolean;
|
|
102
|
+
};
|
|
103
|
+
getDayCellProps(props: DayCellProps): JSX.HTMLAttributes<any>;
|
|
104
|
+
getDayCellTriggerProps(props: DayCellProps): JSX.HTMLAttributes<any>;
|
|
105
|
+
getMonthCellState(props: CellProps): {
|
|
106
|
+
isFocused: boolean;
|
|
107
|
+
isSelectable: boolean;
|
|
108
|
+
isSelected: boolean;
|
|
109
|
+
valueText: string;
|
|
110
|
+
readonly isDisabled: boolean;
|
|
111
|
+
};
|
|
112
|
+
getMonthCellProps(props: CellProps): JSX.HTMLAttributes<any>;
|
|
113
|
+
getMonthCellTriggerProps(props: CellProps): JSX.HTMLAttributes<any>;
|
|
114
|
+
getYearCellState(props: CellProps): {
|
|
115
|
+
isFocused: boolean;
|
|
116
|
+
isSelectable: boolean;
|
|
117
|
+
isSelected: boolean;
|
|
118
|
+
valueText: string;
|
|
119
|
+
readonly isDisabled: boolean;
|
|
120
|
+
};
|
|
121
|
+
getYearCellProps(props: CellProps): JSX.HTMLAttributes<any>;
|
|
122
|
+
getYearCellTriggerProps(props: CellProps): JSX.HTMLAttributes<any>;
|
|
123
|
+
getNextTriggerProps(props?: ViewProps | undefined): JSX.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
124
|
+
getPrevTriggerProps(props?: ViewProps | undefined): JSX.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
125
|
+
getHeaderProps(props?: ViewProps | undefined): JSX.HTMLAttributes<any>;
|
|
126
|
+
clearTriggerProps: JSX.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
127
|
+
triggerProps: JSX.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
128
|
+
getViewTriggerProps(props?: ViewProps | undefined): JSX.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
129
|
+
inputProps: JSX.InputHTMLAttributes<HTMLInputElement>;
|
|
130
|
+
monthSelectProps: JSX.SelectHTMLAttributes<HTMLSelectElement>;
|
|
131
|
+
yearSelectProps: JSX.SelectHTMLAttributes<HTMLSelectElement>;
|
|
132
|
+
}>>, useDatePickerContext: () => Accessor<{
|
|
133
|
+
isFocused: boolean;
|
|
134
|
+
isOpen: boolean | undefined;
|
|
135
|
+
view: DateView;
|
|
136
|
+
matchView: typeof matchView;
|
|
137
|
+
getDaysInWeek(weekIndex: number, from?: DateValue | undefined): DateValue[];
|
|
138
|
+
getOffset(months: number): {
|
|
139
|
+
amount: number;
|
|
140
|
+
visibleRange: {
|
|
141
|
+
start: CalendarDate | CalendarDateTime | ZonedDateTime;
|
|
142
|
+
end: CalendarDate | CalendarDateTime | ZonedDateTime;
|
|
143
|
+
};
|
|
144
|
+
weeks: DateValue[][];
|
|
145
|
+
};
|
|
146
|
+
getMonthDays(from?: DateValue | undefined): DateValue[][];
|
|
147
|
+
isUnavailable(date: DateValue): boolean;
|
|
148
|
+
readonly weeks: DateValue[][];
|
|
149
|
+
weekDays: {
|
|
150
|
+
value: CalendarDate | CalendarDateTime | ZonedDateTime;
|
|
151
|
+
short: string;
|
|
152
|
+
long: string;
|
|
153
|
+
narrow: string;
|
|
154
|
+
}[];
|
|
155
|
+
visibleRangeText: {
|
|
156
|
+
start: string;
|
|
157
|
+
end: string;
|
|
158
|
+
formatted: string;
|
|
159
|
+
};
|
|
160
|
+
value: DateValue[];
|
|
161
|
+
valueAsDate: Date[];
|
|
162
|
+
valueAsString: string[];
|
|
163
|
+
focusedValue: DateValue;
|
|
164
|
+
focusedValueAsDate: Date;
|
|
165
|
+
focusedValueAsString: string;
|
|
166
|
+
selectToday(): void;
|
|
167
|
+
setValue(values: CalendarDate[]): void;
|
|
168
|
+
setFocusedValue(value: CalendarDate): void;
|
|
169
|
+
clearValue(): void;
|
|
170
|
+
open(): void;
|
|
171
|
+
close(): void;
|
|
172
|
+
focusMonth(month: number): void;
|
|
173
|
+
focusYear(year: number): void;
|
|
174
|
+
visibleRange: {
|
|
175
|
+
start: DateValue;
|
|
176
|
+
end: DateValue;
|
|
177
|
+
};
|
|
178
|
+
getYears(): {
|
|
179
|
+
label: string;
|
|
180
|
+
value: number;
|
|
181
|
+
}[];
|
|
182
|
+
getYearsGrid(props?: {
|
|
183
|
+
columns?: number | undefined;
|
|
184
|
+
} | undefined): {
|
|
185
|
+
label: string;
|
|
186
|
+
value: number;
|
|
187
|
+
}[][];
|
|
188
|
+
getDecade(): {
|
|
189
|
+
start: number | undefined;
|
|
190
|
+
end: number | undefined;
|
|
191
|
+
};
|
|
192
|
+
getMonths(props?: {
|
|
193
|
+
format?: "short" | "long" | undefined;
|
|
194
|
+
} | undefined): {
|
|
195
|
+
label: string;
|
|
196
|
+
value: number;
|
|
197
|
+
}[];
|
|
198
|
+
getMonthsGrid(props?: {
|
|
199
|
+
columns?: number | undefined;
|
|
200
|
+
format?: "short" | "long" | undefined;
|
|
201
|
+
} | undefined): {
|
|
202
|
+
label: string;
|
|
203
|
+
value: number;
|
|
204
|
+
}[][];
|
|
205
|
+
format(value: CalendarDate, opts?: Intl.DateTimeFormatOptions | undefined): string;
|
|
206
|
+
setView(view: DateView): void;
|
|
207
|
+
goToNext(): void;
|
|
208
|
+
goToPrev(): void;
|
|
209
|
+
controlProps: JSX.HTMLAttributes<any>;
|
|
210
|
+
contentProps: JSX.HTMLAttributes<any>;
|
|
211
|
+
getGridProps(props?: GridProps | undefined): JSX.HTMLAttributes<any>;
|
|
212
|
+
getDayCellState(props: DayCellProps): {
|
|
213
|
+
isInvalid: boolean;
|
|
214
|
+
isDisabled: boolean;
|
|
215
|
+
isSelected: boolean;
|
|
216
|
+
isUnavailable: boolean;
|
|
217
|
+
isOutsideRange: boolean;
|
|
218
|
+
isInRange: boolean;
|
|
219
|
+
isFirstInRange: boolean;
|
|
220
|
+
isLastInRange: boolean;
|
|
221
|
+
isToday: boolean;
|
|
222
|
+
isWeekend: boolean;
|
|
223
|
+
formattedDate: string;
|
|
224
|
+
readonly isFocused: boolean;
|
|
225
|
+
readonly ariaLabel: string;
|
|
226
|
+
readonly isSelectable: boolean;
|
|
227
|
+
};
|
|
228
|
+
getDayCellProps(props: DayCellProps): JSX.HTMLAttributes<any>;
|
|
229
|
+
getDayCellTriggerProps(props: DayCellProps): JSX.HTMLAttributes<any>;
|
|
230
|
+
getMonthCellState(props: CellProps): {
|
|
231
|
+
isFocused: boolean;
|
|
232
|
+
isSelectable: boolean;
|
|
233
|
+
isSelected: boolean;
|
|
234
|
+
valueText: string;
|
|
235
|
+
readonly isDisabled: boolean;
|
|
236
|
+
};
|
|
237
|
+
getMonthCellProps(props: CellProps): JSX.HTMLAttributes<any>;
|
|
238
|
+
getMonthCellTriggerProps(props: CellProps): JSX.HTMLAttributes<any>;
|
|
239
|
+
getYearCellState(props: CellProps): {
|
|
240
|
+
isFocused: boolean;
|
|
241
|
+
isSelectable: boolean;
|
|
242
|
+
isSelected: boolean;
|
|
243
|
+
valueText: string;
|
|
244
|
+
readonly isDisabled: boolean;
|
|
245
|
+
};
|
|
246
|
+
getYearCellProps(props: CellProps): JSX.HTMLAttributes<any>;
|
|
247
|
+
getYearCellTriggerProps(props: CellProps): JSX.HTMLAttributes<any>;
|
|
248
|
+
getNextTriggerProps(props?: ViewProps | undefined): JSX.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
249
|
+
getPrevTriggerProps(props?: ViewProps | undefined): JSX.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
250
|
+
getHeaderProps(props?: ViewProps | undefined): JSX.HTMLAttributes<any>;
|
|
251
|
+
clearTriggerProps: JSX.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
252
|
+
triggerProps: JSX.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
253
|
+
getViewTriggerProps(props?: ViewProps | undefined): JSX.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
254
|
+
inputProps: JSX.InputHTMLAttributes<HTMLInputElement>;
|
|
255
|
+
monthSelectProps: JSX.SelectHTMLAttributes<HTMLSelectElement>;
|
|
256
|
+
yearSelectProps: JSX.SelectHTMLAttributes<HTMLSelectElement>;
|
|
257
|
+
}>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { AnatomyInstance, AnatomyPart } from '@zag-js/anatomy
|
|
1
|
+
import type { AnatomyInstance, AnatomyPart } from '@zag-js/anatomy';
|
|
2
2
|
export declare const datePickerAnatomy: AnatomyInstance<"header" | "input" | "label" | "content" | "grid" | "row" | "nextTrigger" | "control" | "trigger" | "viewTrigger" | "cellTrigger" | "prevTrigger" | "clearTrigger" | "monthSelect" | "yearSelect" | "rowGroup" | "columnHeader">;
|
|
3
3
|
export declare const parts: Record<"header" | "input" | "label" | "content" | "grid" | "row" | "nextTrigger" | "control" | "trigger" | "viewTrigger" | "cellTrigger" | "prevTrigger" | "clearTrigger" | "monthSelect" | "yearSelect" | "rowGroup" | "columnHeader", AnatomyPart>;
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import type { matchView } from '@zag-js/date-picker/dist/date-picker.utils';
|
|
2
|
+
import type { Accessor, JSX } from 'solid-js';
|
|
3
|
+
import * as datePicker from '@zag-js/date-picker';
|
|
4
|
+
import { type Optional } from '../types';
|
|
5
|
+
export type UseDatePickerProps = Optional<datePicker.Context, 'id'>;
|
|
6
|
+
export type UseDatePickerReturn = ReturnType<typeof useDatePicker>;
|
|
7
|
+
export declare const useDatePicker: (props: UseDatePickerProps) => Accessor<{
|
|
8
|
+
isFocused: boolean;
|
|
9
|
+
isOpen: boolean | undefined;
|
|
10
|
+
view: datePicker.DateView;
|
|
11
|
+
matchView: typeof matchView;
|
|
12
|
+
getDaysInWeek(weekIndex: number, from?: datePicker.DateValue | undefined): datePicker.DateValue[];
|
|
13
|
+
getOffset(months: number): {
|
|
14
|
+
amount: number;
|
|
15
|
+
visibleRange: {
|
|
16
|
+
start: datePicker.CalendarDate | datePicker.CalendarDateTime | datePicker.ZonedDateTime;
|
|
17
|
+
end: datePicker.CalendarDate | datePicker.CalendarDateTime | datePicker.ZonedDateTime;
|
|
18
|
+
};
|
|
19
|
+
weeks: datePicker.DateValue[][];
|
|
20
|
+
};
|
|
21
|
+
getMonthDays(from?: datePicker.DateValue | undefined): datePicker.DateValue[][];
|
|
22
|
+
isUnavailable(date: datePicker.DateValue): boolean;
|
|
23
|
+
readonly weeks: datePicker.DateValue[][];
|
|
24
|
+
weekDays: {
|
|
25
|
+
value: datePicker.CalendarDate | datePicker.CalendarDateTime | datePicker.ZonedDateTime;
|
|
26
|
+
short: string;
|
|
27
|
+
long: string;
|
|
28
|
+
narrow: string;
|
|
29
|
+
}[];
|
|
30
|
+
visibleRangeText: {
|
|
31
|
+
start: string;
|
|
32
|
+
end: string;
|
|
33
|
+
formatted: string;
|
|
34
|
+
};
|
|
35
|
+
value: datePicker.DateValue[];
|
|
36
|
+
valueAsDate: Date[];
|
|
37
|
+
valueAsString: string[];
|
|
38
|
+
focusedValue: datePicker.DateValue;
|
|
39
|
+
focusedValueAsDate: Date;
|
|
40
|
+
focusedValueAsString: string;
|
|
41
|
+
selectToday(): void;
|
|
42
|
+
setValue(values: datePicker.CalendarDate[]): void;
|
|
43
|
+
setFocusedValue(value: datePicker.CalendarDate): void;
|
|
44
|
+
clearValue(): void;
|
|
45
|
+
open(): void;
|
|
46
|
+
close(): void;
|
|
47
|
+
focusMonth(month: number): void;
|
|
48
|
+
focusYear(year: number): void;
|
|
49
|
+
visibleRange: {
|
|
50
|
+
start: datePicker.DateValue;
|
|
51
|
+
end: datePicker.DateValue;
|
|
52
|
+
};
|
|
53
|
+
getYears(): {
|
|
54
|
+
label: string;
|
|
55
|
+
value: number;
|
|
56
|
+
}[];
|
|
57
|
+
getYearsGrid(props?: {
|
|
58
|
+
columns?: number | undefined;
|
|
59
|
+
} | undefined): {
|
|
60
|
+
label: string;
|
|
61
|
+
value: number;
|
|
62
|
+
}[][];
|
|
63
|
+
getDecade(): {
|
|
64
|
+
start: number | undefined;
|
|
65
|
+
end: number | undefined;
|
|
66
|
+
};
|
|
67
|
+
getMonths(props?: {
|
|
68
|
+
format?: "short" | "long" | undefined;
|
|
69
|
+
} | undefined): {
|
|
70
|
+
label: string;
|
|
71
|
+
value: number;
|
|
72
|
+
}[];
|
|
73
|
+
getMonthsGrid(props?: {
|
|
74
|
+
columns?: number | undefined;
|
|
75
|
+
format?: "short" | "long" | undefined;
|
|
76
|
+
} | undefined): {
|
|
77
|
+
label: string;
|
|
78
|
+
value: number;
|
|
79
|
+
}[][];
|
|
80
|
+
format(value: datePicker.CalendarDate, opts?: Intl.DateTimeFormatOptions | undefined): string;
|
|
81
|
+
setView(view: datePicker.DateView): void;
|
|
82
|
+
goToNext(): void;
|
|
83
|
+
goToPrev(): void;
|
|
84
|
+
controlProps: JSX.HTMLAttributes<any>;
|
|
85
|
+
contentProps: JSX.HTMLAttributes<any>;
|
|
86
|
+
getGridProps(props?: datePicker.GridProps | undefined): JSX.HTMLAttributes<any>;
|
|
87
|
+
getDayCellState(props: datePicker.DayCellProps): {
|
|
88
|
+
isInvalid: boolean;
|
|
89
|
+
isDisabled: boolean;
|
|
90
|
+
isSelected: boolean;
|
|
91
|
+
isUnavailable: boolean;
|
|
92
|
+
isOutsideRange: boolean;
|
|
93
|
+
isInRange: boolean;
|
|
94
|
+
isFirstInRange: boolean;
|
|
95
|
+
isLastInRange: boolean;
|
|
96
|
+
isToday: boolean;
|
|
97
|
+
isWeekend: boolean;
|
|
98
|
+
formattedDate: string;
|
|
99
|
+
readonly isFocused: boolean;
|
|
100
|
+
readonly ariaLabel: string;
|
|
101
|
+
readonly isSelectable: boolean;
|
|
102
|
+
};
|
|
103
|
+
getDayCellProps(props: datePicker.DayCellProps): JSX.HTMLAttributes<any>;
|
|
104
|
+
getDayCellTriggerProps(props: datePicker.DayCellProps): JSX.HTMLAttributes<any>;
|
|
105
|
+
getMonthCellState(props: datePicker.CellProps): {
|
|
106
|
+
isFocused: boolean;
|
|
107
|
+
isSelectable: boolean;
|
|
108
|
+
isSelected: boolean;
|
|
109
|
+
valueText: string;
|
|
110
|
+
readonly isDisabled: boolean;
|
|
111
|
+
};
|
|
112
|
+
getMonthCellProps(props: datePicker.CellProps): JSX.HTMLAttributes<any>;
|
|
113
|
+
getMonthCellTriggerProps(props: datePicker.CellProps): JSX.HTMLAttributes<any>;
|
|
114
|
+
getYearCellState(props: datePicker.CellProps): {
|
|
115
|
+
isFocused: boolean;
|
|
116
|
+
isSelectable: boolean;
|
|
117
|
+
isSelected: boolean;
|
|
118
|
+
valueText: string;
|
|
119
|
+
readonly isDisabled: boolean;
|
|
120
|
+
};
|
|
121
|
+
getYearCellProps(props: datePicker.CellProps): JSX.HTMLAttributes<any>;
|
|
122
|
+
getYearCellTriggerProps(props: datePicker.CellProps): JSX.HTMLAttributes<any>;
|
|
123
|
+
getNextTriggerProps(props?: datePicker.ViewProps | undefined): JSX.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
124
|
+
getPrevTriggerProps(props?: datePicker.ViewProps | undefined): JSX.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
125
|
+
getHeaderProps(props?: datePicker.ViewProps | undefined): JSX.HTMLAttributes<any>;
|
|
126
|
+
clearTriggerProps: JSX.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
127
|
+
triggerProps: JSX.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
128
|
+
getViewTriggerProps(props?: datePicker.ViewProps | undefined): JSX.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
129
|
+
inputProps: JSX.InputHTMLAttributes<HTMLInputElement>;
|
|
130
|
+
monthSelectProps: JSX.SelectHTMLAttributes<HTMLSelectElement>;
|
|
131
|
+
yearSelectProps: JSX.SelectHTMLAttributes<HTMLSelectElement>;
|
|
132
|
+
}>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { PositioningOptions } from '@zag-js/combobox';
|
|
2
|
+
import type { Accessor, JSX } from 'solid-js';
|
|
3
|
+
import type { ContextProviderComponent } from 'solid-js/types/reactive/signal';
|
|
4
|
+
import { type UseHoverCardReturn } from './use-hover-card';
|
|
5
|
+
export type HoverCardContext = UseHoverCardReturn;
|
|
6
|
+
export declare const HoverCardProvider: ContextProviderComponent<Accessor<{
|
|
7
|
+
isOpen: boolean;
|
|
8
|
+
open(): void;
|
|
9
|
+
close(): void;
|
|
10
|
+
setPositioning(options?: Partial<PositioningOptions> | undefined): void;
|
|
11
|
+
arrowProps: JSX.HTMLAttributes<any>;
|
|
12
|
+
arrowTipProps: JSX.HTMLAttributes<any>;
|
|
13
|
+
triggerProps: JSX.HTMLAttributes<any>;
|
|
14
|
+
positionerProps: JSX.HTMLAttributes<any>;
|
|
15
|
+
contentProps: JSX.HTMLAttributes<any>;
|
|
16
|
+
}>>, useHoverCardContext: () => Accessor<{
|
|
17
|
+
isOpen: boolean;
|
|
18
|
+
open(): void;
|
|
19
|
+
close(): void;
|
|
20
|
+
setPositioning(options?: Partial<PositioningOptions> | undefined): void;
|
|
21
|
+
arrowProps: JSX.HTMLAttributes<any>;
|
|
22
|
+
arrowTipProps: JSX.HTMLAttributes<any>;
|
|
23
|
+
triggerProps: JSX.HTMLAttributes<any>;
|
|
24
|
+
positionerProps: JSX.HTMLAttributes<any>;
|
|
25
|
+
contentProps: JSX.HTMLAttributes<any>;
|
|
26
|
+
}>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Accessor, JSX } from 'solid-js';
|
|
2
|
+
import * as hoverCard from '@zag-js/hover-card';
|
|
3
|
+
import { type Optional } from '../types';
|
|
4
|
+
export type UseHoverCardProps = Optional<hoverCard.Context, 'id'>;
|
|
5
|
+
export declare const useHoverCard: (props: UseHoverCardProps) => Accessor<{
|
|
6
|
+
isOpen: boolean;
|
|
7
|
+
open(): void;
|
|
8
|
+
close(): void;
|
|
9
|
+
setPositioning(options?: Partial<hoverCard.PositioningOptions> | undefined): void;
|
|
10
|
+
arrowProps: JSX.HTMLAttributes<any>;
|
|
11
|
+
arrowTipProps: JSX.HTMLAttributes<any>;
|
|
12
|
+
triggerProps: JSX.HTMLAttributes<any>;
|
|
13
|
+
positionerProps: JSX.HTMLAttributes<any>;
|
|
14
|
+
contentProps: JSX.HTMLAttributes<any>;
|
|
15
|
+
}>;
|
|
16
|
+
export type UseHoverCardReturn = ReturnType<typeof useHoverCard>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ark-ui/solid",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"description": "A collection of unstyled, accessible UI components for Solid, utilizing state machines for seamless interaction.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"accordion",
|
|
@@ -60,44 +60,44 @@
|
|
|
60
60
|
"foo": "pnpm --filter=@ark-ui/scripts release:prepare @ark-ui/solid"
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"@zag-js/accordion": "0.10.
|
|
64
|
-
"@zag-js/anatomy": "0.10.
|
|
65
|
-
"@zag-js/avatar": "0.10.
|
|
66
|
-
"@zag-js/carousel": "0.10.
|
|
67
|
-
"@zag-js/checkbox": "0.10.
|
|
68
|
-
"@zag-js/color-picker": "0.10.
|
|
69
|
-
"@zag-js/combobox": "0.10.
|
|
70
|
-
"@zag-js/date-picker": "0.10.
|
|
71
|
-
"@zag-js/dialog": "0.10.
|
|
72
|
-
"@zag-js/editable": "0.10.
|
|
73
|
-
"@zag-js/hover-card": "0.10.
|
|
74
|
-
"@zag-js/menu": "0.10.
|
|
75
|
-
"@zag-js/number-input": "0.10.
|
|
76
|
-
"@zag-js/pagination": "0.10.
|
|
77
|
-
"@zag-js/pin-input": "0.10.
|
|
78
|
-
"@zag-js/popover": "0.10.
|
|
79
|
-
"@zag-js/pressable": "0.10.
|
|
80
|
-
"@zag-js/radio-group": "0.10.
|
|
81
|
-
"@zag-js/range-slider": "0.10.
|
|
82
|
-
"@zag-js/rating-group": "0.10.
|
|
83
|
-
"@zag-js/select": "0.10.
|
|
84
|
-
"@zag-js/slider": "0.10.
|
|
85
|
-
"@zag-js/solid": "0.10.
|
|
86
|
-
"@zag-js/splitter": "0.10.
|
|
87
|
-
"@zag-js/switch": "0.10.
|
|
88
|
-
"@zag-js/tabs": "0.10.
|
|
89
|
-
"@zag-js/tags-input": "0.10.
|
|
90
|
-
"@zag-js/toast": "0.10.
|
|
91
|
-
"@zag-js/tooltip": "0.10.
|
|
92
|
-
"@zag-js/types": "0.10.
|
|
63
|
+
"@zag-js/accordion": "0.10.3",
|
|
64
|
+
"@zag-js/anatomy": "0.10.3",
|
|
65
|
+
"@zag-js/avatar": "0.10.3",
|
|
66
|
+
"@zag-js/carousel": "0.10.3",
|
|
67
|
+
"@zag-js/checkbox": "0.10.3",
|
|
68
|
+
"@zag-js/color-picker": "0.10.3",
|
|
69
|
+
"@zag-js/combobox": "0.10.3",
|
|
70
|
+
"@zag-js/date-picker": "0.10.3",
|
|
71
|
+
"@zag-js/dialog": "0.10.3",
|
|
72
|
+
"@zag-js/editable": "0.10.3",
|
|
73
|
+
"@zag-js/hover-card": "0.10.3",
|
|
74
|
+
"@zag-js/menu": "0.10.3",
|
|
75
|
+
"@zag-js/number-input": "0.10.3",
|
|
76
|
+
"@zag-js/pagination": "0.10.3",
|
|
77
|
+
"@zag-js/pin-input": "0.10.3",
|
|
78
|
+
"@zag-js/popover": "0.10.3",
|
|
79
|
+
"@zag-js/pressable": "0.10.3",
|
|
80
|
+
"@zag-js/radio-group": "0.10.3",
|
|
81
|
+
"@zag-js/range-slider": "0.10.3",
|
|
82
|
+
"@zag-js/rating-group": "0.10.3",
|
|
83
|
+
"@zag-js/select": "0.10.3",
|
|
84
|
+
"@zag-js/slider": "0.10.3",
|
|
85
|
+
"@zag-js/solid": "0.10.3",
|
|
86
|
+
"@zag-js/splitter": "0.10.3",
|
|
87
|
+
"@zag-js/switch": "0.10.3",
|
|
88
|
+
"@zag-js/tabs": "0.10.3",
|
|
89
|
+
"@zag-js/tags-input": "0.10.3",
|
|
90
|
+
"@zag-js/toast": "0.10.3",
|
|
91
|
+
"@zag-js/tooltip": "0.10.3",
|
|
92
|
+
"@zag-js/types": "0.10.3"
|
|
93
93
|
},
|
|
94
94
|
"devDependencies": {
|
|
95
95
|
"@release-it/keep-a-changelog": "3.1.0",
|
|
96
|
-
"@solidjs/testing-library": "0.8.
|
|
97
|
-
"@storybook/addon-essentials": "7.0.
|
|
98
|
-
"@storybook/addon-interactions": "7.0.
|
|
99
|
-
"@storybook/addon-links": "7.0.
|
|
100
|
-
"@storybook/blocks": "7.0.
|
|
96
|
+
"@solidjs/testing-library": "0.8.3",
|
|
97
|
+
"@storybook/addon-essentials": "7.0.24",
|
|
98
|
+
"@storybook/addon-interactions": "7.0.24",
|
|
99
|
+
"@storybook/addon-links": "7.0.24",
|
|
100
|
+
"@storybook/blocks": "7.0.24",
|
|
101
101
|
"@storybook/testing-library": "0.2.0",
|
|
102
102
|
"@testing-library/dom": "9.3.1",
|
|
103
103
|
"@testing-library/jest-dom": "5.16.5",
|
|
@@ -106,21 +106,21 @@
|
|
|
106
106
|
"@types/testing-library__jest-dom": "5.14.6",
|
|
107
107
|
"@typescript-eslint/eslint-plugin": "5.60.1",
|
|
108
108
|
"@typescript-eslint/parser": "5.60.1",
|
|
109
|
-
"@vitest/coverage-
|
|
109
|
+
"@vitest/coverage-v8": "0.32.2",
|
|
110
110
|
"eslint": "8.43.0",
|
|
111
111
|
"happy-dom": "9.20.3",
|
|
112
112
|
"react": "18.2.0",
|
|
113
113
|
"react-dom": "18.2.0",
|
|
114
114
|
"release-it": "15.11.0",
|
|
115
115
|
"solid-js": "1.7.7",
|
|
116
|
-
"storybook": "7.0.
|
|
116
|
+
"storybook": "7.0.24",
|
|
117
117
|
"storybook-solidjs": "1.0.0-beta.2",
|
|
118
118
|
"storybook-solidjs-vite": "1.0.0-beta.2",
|
|
119
|
-
"typescript": "5.1.
|
|
119
|
+
"typescript": "5.1.6",
|
|
120
120
|
"vite": "4.3.9",
|
|
121
121
|
"vite-plugin-dts": "2.3.0",
|
|
122
122
|
"vite-plugin-solid": "2.7.0",
|
|
123
|
-
"vitest": "0.
|
|
123
|
+
"vitest": "0.32.2"
|
|
124
124
|
},
|
|
125
125
|
"peerDependencies": {
|
|
126
126
|
"solid-js": ">=1.6.0"
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { AnatomyInstance, AnatomyPart } from '@zag-js/anatomy
|
|
1
|
+
import type { AnatomyInstance, AnatomyPart } from '@zag-js/anatomy';
|
|
2
2
|
export declare const paginationAnatomy: AnatomyInstance<"ellipsis" | "list" | "root" | "pageTrigger" | "prevPageTrigger" | "nextPageTrigger" | "listItem">;
|
|
3
3
|
export declare const parts: Record<"ellipsis" | "list" | "root" | "pageTrigger" | "prevPageTrigger" | "nextPageTrigger" | "listItem", AnatomyPart>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { PositioningOptions } from '@zag-js/combobox';
|
|
2
|
+
import type { Accessor, JSX } from 'solid-js';
|
|
3
|
+
import type { ContextProviderComponent } from 'solid-js/types/reactive/signal';
|
|
4
|
+
import { type UsePopoverReturn } from './use-popover';
|
|
5
|
+
export type PopoverContext = UsePopoverReturn;
|
|
6
|
+
export declare const PopoverProvider: ContextProviderComponent<Accessor<{
|
|
7
|
+
portalled: boolean;
|
|
8
|
+
isOpen: boolean;
|
|
9
|
+
open(): void;
|
|
10
|
+
close(): void;
|
|
11
|
+
setPositioning(options?: Partial<PositioningOptions> | undefined): void;
|
|
12
|
+
arrowProps: JSX.HTMLAttributes<any>;
|
|
13
|
+
arrowTipProps: JSX.HTMLAttributes<any>;
|
|
14
|
+
anchorProps: JSX.HTMLAttributes<any>;
|
|
15
|
+
triggerProps: JSX.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
16
|
+
positionerProps: JSX.HTMLAttributes<any>;
|
|
17
|
+
contentProps: JSX.HTMLAttributes<any>;
|
|
18
|
+
titleProps: JSX.HTMLAttributes<any>;
|
|
19
|
+
descriptionProps: JSX.HTMLAttributes<any>;
|
|
20
|
+
closeTriggerProps: JSX.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
21
|
+
}>>, usePopoverContext: () => Accessor<{
|
|
22
|
+
portalled: boolean;
|
|
23
|
+
isOpen: boolean;
|
|
24
|
+
open(): void;
|
|
25
|
+
close(): void;
|
|
26
|
+
setPositioning(options?: Partial<PositioningOptions> | undefined): void;
|
|
27
|
+
arrowProps: JSX.HTMLAttributes<any>;
|
|
28
|
+
arrowTipProps: JSX.HTMLAttributes<any>;
|
|
29
|
+
anchorProps: JSX.HTMLAttributes<any>;
|
|
30
|
+
triggerProps: JSX.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
31
|
+
positionerProps: JSX.HTMLAttributes<any>;
|
|
32
|
+
contentProps: JSX.HTMLAttributes<any>;
|
|
33
|
+
titleProps: JSX.HTMLAttributes<any>;
|
|
34
|
+
descriptionProps: JSX.HTMLAttributes<any>;
|
|
35
|
+
closeTriggerProps: JSX.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
36
|
+
}>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Accessor, JSX } from 'solid-js';
|
|
2
|
+
import * as popover from '@zag-js/popover';
|
|
3
|
+
import { type Optional } from '../types';
|
|
4
|
+
export type UsePopoverProps = Optional<popover.Context, 'id'>;
|
|
5
|
+
export declare const usePopover: (props: UsePopoverProps) => Accessor<{
|
|
6
|
+
portalled: boolean;
|
|
7
|
+
isOpen: boolean;
|
|
8
|
+
open(): void;
|
|
9
|
+
close(): void;
|
|
10
|
+
setPositioning(options?: Partial<popover.PositioningOptions> | undefined): void;
|
|
11
|
+
arrowProps: JSX.HTMLAttributes<any>;
|
|
12
|
+
arrowTipProps: JSX.HTMLAttributes<any>;
|
|
13
|
+
anchorProps: JSX.HTMLAttributes<any>;
|
|
14
|
+
triggerProps: JSX.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
15
|
+
positionerProps: JSX.HTMLAttributes<any>;
|
|
16
|
+
contentProps: JSX.HTMLAttributes<any>;
|
|
17
|
+
titleProps: JSX.HTMLAttributes<any>;
|
|
18
|
+
descriptionProps: JSX.HTMLAttributes<any>;
|
|
19
|
+
closeTriggerProps: JSX.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
20
|
+
}>;
|
|
21
|
+
export type UsePopoverReturn = ReturnType<typeof usePopover>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import type { ItemState } from '@zag-js/rating-group/dist/rating-group.types';
|
|
2
1
|
import type { ContextProviderComponent } from 'solid-js/types/reactive/signal';
|
|
3
|
-
import { type connect } from '@zag-js/rating-group';
|
|
2
|
+
import type { ItemState, type connect } from '@zag-js/rating-group';
|
|
4
3
|
import type { Accessor } from 'solid-js';
|
|
5
4
|
export type RatingContext = ReturnType<ReturnType<typeof connect>['getRatingState']>;
|
|
6
5
|
export declare const RatingProvider: ContextProviderComponent<Accessor<ItemState>>, useRatingContext: () => Accessor<ItemState>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ItemProps, ItemState } from '@zag-js/rating-group
|
|
1
|
+
import type { ItemProps, ItemState } from '@zag-js/rating-group';
|
|
2
2
|
import type { Accessor, JSX } from 'solid-js';
|
|
3
3
|
import type { ContextProviderComponent } from 'solid-js/types/reactive/signal';
|
|
4
4
|
import { type UseRatingGroupReturn } from './use-rating-group';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { Anatomy, AnatomyPart } from '@zag-js/anatomy
|
|
1
|
+
import type { Anatomy, AnatomyPart } from '@zag-js/anatomy';
|
|
2
2
|
export declare const segmentGroupAnatomy: Anatomy<"label" | "radio" | "root" | "indicator" | "radioLabel" | "radioControl" | "radioInput">;
|
|
3
3
|
export declare const parts: Record<"label" | "radio" | "root" | "indicator" | "radioLabel" | "radioControl" | "radioInput", AnatomyPart>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { OptionProps, OptionGroupLabelProps, OptionGroupProps } from '@zag-js/select';
|
|
2
|
+
import type { Option } from '@zag-js/select/dist/select.types';
|
|
2
3
|
import type { Accessor, JSX } from 'solid-js';
|
|
3
4
|
import type { ContextProviderComponent } from 'solid-js/types/reactive/signal';
|
|
4
5
|
import { type UseSelectReturn } from './use-select';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ResizeTriggerProps, PanelProps } from '@zag-js/splitter';
|
|
2
|
+
import type { PanelId } from '@zag-js/splitter/dist/splitter.types';
|
|
2
3
|
import type { Accessor, JSX } from 'solid-js';
|
|
3
4
|
import type { ContextProviderComponent } from 'solid-js/types/reactive/signal';
|
|
4
5
|
import { type UseSplitterReturn } from './use-splitter';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { PanelId
|
|
1
|
+
import type { PanelId } from '@zag-js/splitter/dist/splitter.types';
|
|
2
2
|
import type { Accessor, JSX } from 'solid-js';
|
|
3
|
-
import { type Context } from '@zag-js/splitter';
|
|
3
|
+
import type { ResizeTriggerProps, PanelProps, type Context } from '@zag-js/splitter';
|
|
4
4
|
import { type Optional } from '../types';
|
|
5
5
|
export type UseSplitterProps = Optional<Context, 'id'>;
|
|
6
6
|
export type UseSplitterReturn = ReturnType<typeof useSplitter>;
|
package/tabs/tabs-context.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TriggerProps, ContentProps } from '@zag-js/tabs
|
|
1
|
+
import type { TriggerProps, ContentProps } from '@zag-js/tabs';
|
|
2
2
|
import type { Accessor, JSX } from 'solid-js';
|
|
3
3
|
import type { ContextProviderComponent } from 'solid-js/types/reactive/signal';
|
|
4
4
|
import { type UseTabsReturn } from './use-tabs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Type, Placement } from '@zag-js/toast
|
|
1
|
+
import type { Type, Placement } from '@zag-js/toast';
|
|
2
2
|
import type { Accessor, JSX } from 'solid-js';
|
|
3
3
|
import type { ContextProviderComponent } from 'solid-js/types/reactive/signal';
|
|
4
4
|
import { type UseToastItemReturn } from './use-toast-item';
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { PositioningOptions } from '@zag-js/combobox';
|
|
2
|
+
import type { Accessor, JSX } from 'solid-js';
|
|
3
|
+
import type { ContextProviderComponent } from 'solid-js/types/reactive/signal';
|
|
4
|
+
import { type UseTooltipReturn } from './use-tooltip';
|
|
5
|
+
export type TooltipContext = UseTooltipReturn;
|
|
6
|
+
export declare const TooltipProvider: ContextProviderComponent<Accessor<{
|
|
7
|
+
isOpen: boolean;
|
|
8
|
+
open(): void;
|
|
9
|
+
close(): void;
|
|
10
|
+
getAnimationState(): {
|
|
11
|
+
enter: boolean;
|
|
12
|
+
exit: boolean;
|
|
13
|
+
};
|
|
14
|
+
setPositioning(options?: Partial<PositioningOptions> | undefined): void;
|
|
15
|
+
triggerProps: JSX.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
16
|
+
arrowProps: JSX.HTMLAttributes<any>;
|
|
17
|
+
arrowTipProps: JSX.HTMLAttributes<any>;
|
|
18
|
+
positionerProps: JSX.HTMLAttributes<any>;
|
|
19
|
+
contentProps: JSX.HTMLAttributes<any>;
|
|
20
|
+
labelProps: JSX.HTMLAttributes<any>;
|
|
21
|
+
}>>, useTooltipContext: () => Accessor<{
|
|
22
|
+
isOpen: boolean;
|
|
23
|
+
open(): void;
|
|
24
|
+
close(): void;
|
|
25
|
+
getAnimationState(): {
|
|
26
|
+
enter: boolean;
|
|
27
|
+
exit: boolean;
|
|
28
|
+
};
|
|
29
|
+
setPositioning(options?: Partial<PositioningOptions> | undefined): void;
|
|
30
|
+
triggerProps: JSX.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
31
|
+
arrowProps: JSX.HTMLAttributes<any>;
|
|
32
|
+
arrowTipProps: JSX.HTMLAttributes<any>;
|
|
33
|
+
positionerProps: JSX.HTMLAttributes<any>;
|
|
34
|
+
contentProps: JSX.HTMLAttributes<any>;
|
|
35
|
+
labelProps: JSX.HTMLAttributes<any>;
|
|
36
|
+
}>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Accessor, JSX } from 'solid-js';
|
|
2
|
+
import * as tooltip from '@zag-js/tooltip';
|
|
3
|
+
import { type Optional } from '../types';
|
|
4
|
+
export type UseTooltipProps = Optional<tooltip.Context, 'id'>;
|
|
5
|
+
export type UseTooltipReturn = ReturnType<typeof useTooltip>;
|
|
6
|
+
export declare const useTooltip: (props: UseTooltipProps) => Accessor<{
|
|
7
|
+
isOpen: boolean;
|
|
8
|
+
open(): void;
|
|
9
|
+
close(): void;
|
|
10
|
+
getAnimationState(): {
|
|
11
|
+
enter: boolean;
|
|
12
|
+
exit: boolean;
|
|
13
|
+
};
|
|
14
|
+
setPositioning(options?: Partial<tooltip.PositioningOptions> | undefined): void;
|
|
15
|
+
triggerProps: JSX.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
16
|
+
arrowProps: JSX.HTMLAttributes<any>;
|
|
17
|
+
arrowTipProps: JSX.HTMLAttributes<any>;
|
|
18
|
+
positionerProps: JSX.HTMLAttributes<any>;
|
|
19
|
+
contentProps: JSX.HTMLAttributes<any>;
|
|
20
|
+
labelProps: JSX.HTMLAttributes<any>;
|
|
21
|
+
}>;
|