@ark-ui/react 0.0.0-rc-20221106094212
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/index.cjs.js +1735 -0
- package/dist/index.d.ts +612 -0
- package/dist/index.esm.js +1620 -0
- package/package.json +86 -0
|
@@ -0,0 +1,1735 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
24
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
25
|
+
|
|
26
|
+
// src/index.ts
|
|
27
|
+
var src_exports = {};
|
|
28
|
+
__export(src_exports, {
|
|
29
|
+
Accordion: () => Accordion,
|
|
30
|
+
AccordionButton: () => AccordionButton,
|
|
31
|
+
AccordionIcon: () => AccordionIcon,
|
|
32
|
+
AccordionItem: () => AccordionItem,
|
|
33
|
+
AccordionPanel: () => AccordionPanel,
|
|
34
|
+
Checkbox: () => Checkbox,
|
|
35
|
+
CheckboxControl: () => CheckboxControl,
|
|
36
|
+
CheckboxInput: () => CheckboxInput,
|
|
37
|
+
CheckboxLabel: () => CheckboxLabel,
|
|
38
|
+
Dialog: () => Dialog,
|
|
39
|
+
DialogBackdrop: () => DialogBackdrop,
|
|
40
|
+
DialogCloseButton: () => DialogCloseButton,
|
|
41
|
+
DialogContent: () => DialogContent,
|
|
42
|
+
DialogDescription: () => DialogDescription,
|
|
43
|
+
DialogPortal: () => DialogPortal,
|
|
44
|
+
DialogTitle: () => DialogTitle,
|
|
45
|
+
DialogTrigger: () => DialogTrigger,
|
|
46
|
+
DialogUnderlay: () => DialogUnderlay,
|
|
47
|
+
Editable: () => Editable,
|
|
48
|
+
EditableArea: () => EditableArea,
|
|
49
|
+
EditableCancelButton: () => EditableCancelButton,
|
|
50
|
+
EditableControls: () => EditableControls,
|
|
51
|
+
EditableEditButton: () => EditableEditButton,
|
|
52
|
+
EditableInput: () => EditableInput,
|
|
53
|
+
EditablePreview: () => EditablePreview,
|
|
54
|
+
EditableSubmitButton: () => EditableSubmitButton,
|
|
55
|
+
NumberInput: () => NumberInput,
|
|
56
|
+
NumberInputDecrementButton: () => NumberInputDecrementButton,
|
|
57
|
+
NumberInputField: () => NumberInputField,
|
|
58
|
+
NumberInputIncrementButton: () => NumberInputIncrementButton,
|
|
59
|
+
Pagination: () => Pagination,
|
|
60
|
+
PaginationEllipsis: () => PaginationEllipsis,
|
|
61
|
+
PaginationItem: () => PaginationItem,
|
|
62
|
+
PaginationNextItem: () => PaginationNextItem,
|
|
63
|
+
PaginationPrevItem: () => PaginationPrevItem,
|
|
64
|
+
PaginationProvider: () => PaginationProvider,
|
|
65
|
+
PinInput: () => PinInput,
|
|
66
|
+
PinInputField: () => PinInputField,
|
|
67
|
+
Popover: () => Popover,
|
|
68
|
+
PopoverArrow: () => PopoverArrow,
|
|
69
|
+
PopoverCloseButton: () => PopoverCloseButton,
|
|
70
|
+
PopoverContent: () => PopoverContent,
|
|
71
|
+
PopoverDescription: () => PopoverDescription,
|
|
72
|
+
PopoverInnerArrow: () => PopoverInnerArrow,
|
|
73
|
+
PopoverPositioner: () => PopoverPositioner,
|
|
74
|
+
PopoverTitle: () => PopoverTitle,
|
|
75
|
+
PopoverTrigger: () => PopoverTrigger,
|
|
76
|
+
Pressable: () => Pressable,
|
|
77
|
+
Radio: () => Radio,
|
|
78
|
+
RadioControl: () => RadioControl,
|
|
79
|
+
RadioGroup: () => RadioGroup,
|
|
80
|
+
RadioGroupLabel: () => RadioGroupLabel,
|
|
81
|
+
RadioInput: () => RadioInput,
|
|
82
|
+
RadioLabel: () => RadioLabel,
|
|
83
|
+
Rating: () => Rating,
|
|
84
|
+
RatingGroup: () => RatingGroup,
|
|
85
|
+
RatingItem: () => RatingItem,
|
|
86
|
+
RatingLabel: () => RatingLabel,
|
|
87
|
+
Tab: () => Tab,
|
|
88
|
+
TabIndicator: () => TabIndicator,
|
|
89
|
+
TabList: () => TabList,
|
|
90
|
+
TabPanel: () => TabPanel,
|
|
91
|
+
TabPanels: () => TabPanels,
|
|
92
|
+
Tabs: () => Tabs,
|
|
93
|
+
Tooltip: () => Tooltip,
|
|
94
|
+
TooltipArrow: () => TooltipArrow,
|
|
95
|
+
TooltipContent: () => TooltipContent,
|
|
96
|
+
TooltipInnerArrow: () => TooltipInnerArrow,
|
|
97
|
+
TooltipPositioner: () => TooltipPositioner,
|
|
98
|
+
TooltipTrigger: () => TooltipTrigger,
|
|
99
|
+
useAccordion: () => useAccordion,
|
|
100
|
+
useAccordionItemContext: () => useAccordionItemContext,
|
|
101
|
+
useCheckbox: () => useCheckbox,
|
|
102
|
+
useEditable: () => useEditable,
|
|
103
|
+
usePagination: () => usePagination,
|
|
104
|
+
usePaginationContext: () => usePaginationContext,
|
|
105
|
+
usePinInput: () => usePinInput,
|
|
106
|
+
usePopover: () => usePopover,
|
|
107
|
+
usePressable: () => usePressable,
|
|
108
|
+
useRadioGroup: () => useRadioGroup,
|
|
109
|
+
useRating: () => useRating,
|
|
110
|
+
useTabs: () => useTabs,
|
|
111
|
+
useTooltip: () => useTooltip
|
|
112
|
+
});
|
|
113
|
+
module.exports = __toCommonJS(src_exports);
|
|
114
|
+
|
|
115
|
+
// src/accordion/accordion.tsx
|
|
116
|
+
var import_react5 = require("@polymorphic-factory/react");
|
|
117
|
+
var import_react6 = require("@zag-js/react");
|
|
118
|
+
|
|
119
|
+
// src/factory.tsx
|
|
120
|
+
var import_react = require("@polymorphic-factory/react");
|
|
121
|
+
var atlas = (0, import_react.polymorphicFactory)();
|
|
122
|
+
|
|
123
|
+
// src/split-props.ts
|
|
124
|
+
function splitProps(props, ...keySelections) {
|
|
125
|
+
const rest = { ...props };
|
|
126
|
+
const groups = keySelections.map((keys) => {
|
|
127
|
+
return keys.reduce((previousValue, key) => {
|
|
128
|
+
if (!(key in rest)) {
|
|
129
|
+
return previousValue;
|
|
130
|
+
}
|
|
131
|
+
previousValue[key] = rest[key];
|
|
132
|
+
delete rest[key];
|
|
133
|
+
return previousValue;
|
|
134
|
+
}, {});
|
|
135
|
+
});
|
|
136
|
+
return [...groups, rest];
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// src/createContext.ts
|
|
140
|
+
var import_react2 = require("react");
|
|
141
|
+
function getErrorMessage(hook, provider) {
|
|
142
|
+
return `${hook} returned \`undefined\`. Seems you forgot to wrap component within ${provider}`;
|
|
143
|
+
}
|
|
144
|
+
function createContext(options = {}) {
|
|
145
|
+
const {
|
|
146
|
+
name,
|
|
147
|
+
strict = true,
|
|
148
|
+
hookName = "useContext",
|
|
149
|
+
providerName = "Provider",
|
|
150
|
+
errorMessage
|
|
151
|
+
} = options;
|
|
152
|
+
const Context = (0, import_react2.createContext)(void 0);
|
|
153
|
+
Context.displayName = name;
|
|
154
|
+
function useContext() {
|
|
155
|
+
const context = (0, import_react2.useContext)(Context);
|
|
156
|
+
if (!context && strict) {
|
|
157
|
+
const error = new Error(errorMessage ?? getErrorMessage(hookName, providerName));
|
|
158
|
+
error.name = "ContextError";
|
|
159
|
+
Error.captureStackTrace?.(error, useContext);
|
|
160
|
+
throw error;
|
|
161
|
+
}
|
|
162
|
+
return context;
|
|
163
|
+
}
|
|
164
|
+
return [Context.Provider, useContext, Context];
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
// src/accordion/accordion-context.ts
|
|
168
|
+
var [AccordionProvider, useAccordionContext] = createContext({
|
|
169
|
+
name: "AccordionContext",
|
|
170
|
+
hookName: "useAccordionContext",
|
|
171
|
+
providerName: "<AccordionProvider />"
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
// src/accordion/use-accordion.ts
|
|
175
|
+
var accordion = __toESM(require("@zag-js/accordion"));
|
|
176
|
+
var import_react3 = require("@zag-js/react");
|
|
177
|
+
var import_react4 = require("react");
|
|
178
|
+
|
|
179
|
+
// src/filter-undefined-entries.tsx
|
|
180
|
+
function filterUndefinedEntries(target) {
|
|
181
|
+
if (!target || typeof target !== "object") {
|
|
182
|
+
return target;
|
|
183
|
+
}
|
|
184
|
+
return Object.fromEntries(
|
|
185
|
+
Object.entries(target).filter(([, value]) => typeof value !== "undefined")
|
|
186
|
+
);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
// src/accordion/use-accordion.ts
|
|
190
|
+
var useAccordion = (props) => {
|
|
191
|
+
const initialContext = filterUndefinedEntries({
|
|
192
|
+
id: (0, import_react4.useId)(),
|
|
193
|
+
...props,
|
|
194
|
+
value: props.value ?? props.defaultValue
|
|
195
|
+
});
|
|
196
|
+
const context = filterUndefinedEntries({
|
|
197
|
+
...initialContext,
|
|
198
|
+
value: props.value
|
|
199
|
+
});
|
|
200
|
+
const [state, send] = (0, import_react3.useMachine)(accordion.machine(initialContext), { context });
|
|
201
|
+
return accordion.connect(state, send, import_react3.normalizeProps);
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
// src/accordion/accordion.tsx
|
|
205
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
206
|
+
var Accordion = (0, import_react5.forwardRef)((props, ref) => {
|
|
207
|
+
const [useAccordionProps, divProps] = splitProps(props, [
|
|
208
|
+
"collapsible",
|
|
209
|
+
"defaultValue",
|
|
210
|
+
"dir",
|
|
211
|
+
"disabled",
|
|
212
|
+
"getRootNode",
|
|
213
|
+
"ids",
|
|
214
|
+
"multiple",
|
|
215
|
+
"onChange",
|
|
216
|
+
"value"
|
|
217
|
+
]);
|
|
218
|
+
const accordion2 = useAccordion(useAccordionProps);
|
|
219
|
+
const mergedProps = (0, import_react6.mergeProps)(accordion2.rootProps, divProps);
|
|
220
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionProvider, {
|
|
221
|
+
value: accordion2,
|
|
222
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(atlas.div, {
|
|
223
|
+
...mergedProps,
|
|
224
|
+
ref
|
|
225
|
+
})
|
|
226
|
+
});
|
|
227
|
+
});
|
|
228
|
+
|
|
229
|
+
// src/accordion/accordion-button.tsx
|
|
230
|
+
var import_react7 = require("@polymorphic-factory/react");
|
|
231
|
+
var import_react8 = require("@zag-js/react");
|
|
232
|
+
|
|
233
|
+
// src/accordion/accordion-item-context.ts
|
|
234
|
+
var [AccordionItemProvider, useAccordionItemContext] = createContext(
|
|
235
|
+
{
|
|
236
|
+
name: "AccordionItemContext",
|
|
237
|
+
hookName: "useAccordionItemContext",
|
|
238
|
+
providerName: "<AccordionItemProvider />"
|
|
239
|
+
}
|
|
240
|
+
);
|
|
241
|
+
|
|
242
|
+
// src/accordion/accordion-button.tsx
|
|
243
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
244
|
+
var AccordionButton = (0, import_react7.forwardRef)((props, ref) => {
|
|
245
|
+
const { getTriggerProps } = useAccordionContext();
|
|
246
|
+
const context = useAccordionItemContext();
|
|
247
|
+
const mergedProps = (0, import_react8.mergeProps)(getTriggerProps(context), props);
|
|
248
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(atlas.button, {
|
|
249
|
+
...mergedProps,
|
|
250
|
+
ref
|
|
251
|
+
});
|
|
252
|
+
});
|
|
253
|
+
|
|
254
|
+
// src/accordion/accordion-icon.tsx
|
|
255
|
+
var import_react9 = require("@polymorphic-factory/react");
|
|
256
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
257
|
+
var AccordionIcon = (0, import_react9.forwardRef)((props, ref) => {
|
|
258
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(atlas.div, {
|
|
259
|
+
...props,
|
|
260
|
+
ref
|
|
261
|
+
});
|
|
262
|
+
});
|
|
263
|
+
|
|
264
|
+
// src/accordion/accordion-item.tsx
|
|
265
|
+
var import_react10 = require("@polymorphic-factory/react");
|
|
266
|
+
var import_react11 = require("@zag-js/react");
|
|
267
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
268
|
+
var AccordionItem = (0, import_react10.forwardRef)((props, ref) => {
|
|
269
|
+
const { value, disabled, children, ...rest } = props;
|
|
270
|
+
const { getItemProps, getItemState } = useAccordionContext();
|
|
271
|
+
const itemState = getItemState({ value });
|
|
272
|
+
const mergedProps = (0, import_react11.mergeProps)(getItemProps({ value, disabled }), rest);
|
|
273
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(AccordionItemProvider, {
|
|
274
|
+
value: { value, disabled, ...itemState },
|
|
275
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(atlas.div, {
|
|
276
|
+
...mergedProps,
|
|
277
|
+
ref,
|
|
278
|
+
children: typeof children === "function" ? children(itemState) : children
|
|
279
|
+
})
|
|
280
|
+
});
|
|
281
|
+
});
|
|
282
|
+
|
|
283
|
+
// src/accordion/accordion-panel.tsx
|
|
284
|
+
var import_react12 = require("@polymorphic-factory/react");
|
|
285
|
+
var import_react13 = require("@zag-js/react");
|
|
286
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
287
|
+
var AccordionPanel = (0, import_react12.forwardRef)((props, ref) => {
|
|
288
|
+
const { getContentProps } = useAccordionContext();
|
|
289
|
+
const context = useAccordionItemContext();
|
|
290
|
+
const mergedProps = (0, import_react13.mergeProps)(getContentProps(context), props);
|
|
291
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(atlas.div, {
|
|
292
|
+
...mergedProps,
|
|
293
|
+
ref
|
|
294
|
+
});
|
|
295
|
+
});
|
|
296
|
+
|
|
297
|
+
// src/checkbox/checkbox.tsx
|
|
298
|
+
var import_react16 = require("@polymorphic-factory/react");
|
|
299
|
+
var import_react17 = require("@zag-js/react");
|
|
300
|
+
|
|
301
|
+
// src/checkbox/checkbox-context.tsx
|
|
302
|
+
var [CheckboxProvider, useCheckboxContext] = createContext({
|
|
303
|
+
name: "CheckboxContext",
|
|
304
|
+
hookName: "useCheckboxContext",
|
|
305
|
+
providerName: "<CheckboxProvider />"
|
|
306
|
+
});
|
|
307
|
+
|
|
308
|
+
// src/checkbox/use-checkbox.ts
|
|
309
|
+
var checkbox = __toESM(require("@zag-js/checkbox"));
|
|
310
|
+
var import_react14 = require("@zag-js/react");
|
|
311
|
+
var import_react15 = require("react");
|
|
312
|
+
var useCheckbox = (props) => {
|
|
313
|
+
const initialContext = filterUndefinedEntries({
|
|
314
|
+
id: (0, import_react15.useId)(),
|
|
315
|
+
...props,
|
|
316
|
+
value: props.value ?? props.defaultValue
|
|
317
|
+
});
|
|
318
|
+
const context = filterUndefinedEntries({
|
|
319
|
+
...initialContext,
|
|
320
|
+
value: props.value
|
|
321
|
+
});
|
|
322
|
+
const [state, send] = (0, import_react14.useMachine)(checkbox.machine(initialContext), { context });
|
|
323
|
+
return checkbox.connect(state, send, import_react14.normalizeProps);
|
|
324
|
+
};
|
|
325
|
+
|
|
326
|
+
// src/checkbox/checkbox.tsx
|
|
327
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
328
|
+
var Checkbox = (0, import_react16.forwardRef)((props, ref) => {
|
|
329
|
+
const [useCheckboxProps, labelprops] = splitProps(props, [
|
|
330
|
+
"aria-describedby",
|
|
331
|
+
"aria-invalid",
|
|
332
|
+
"aria-label",
|
|
333
|
+
"aria-labelledby",
|
|
334
|
+
"defaultChecked",
|
|
335
|
+
"dir",
|
|
336
|
+
"defaultValue",
|
|
337
|
+
"disabled",
|
|
338
|
+
"focusable",
|
|
339
|
+
"getRootNode",
|
|
340
|
+
"ids",
|
|
341
|
+
"indeterminate",
|
|
342
|
+
"invalid",
|
|
343
|
+
"name",
|
|
344
|
+
"onChange",
|
|
345
|
+
"readonly",
|
|
346
|
+
"required",
|
|
347
|
+
"value"
|
|
348
|
+
]);
|
|
349
|
+
const checkbox2 = useCheckbox(useCheckboxProps);
|
|
350
|
+
const mergedProps = (0, import_react17.mergeProps)(checkbox2.rootProps, labelprops);
|
|
351
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CheckboxProvider, {
|
|
352
|
+
value: checkbox2,
|
|
353
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(atlas.label, {
|
|
354
|
+
...mergedProps,
|
|
355
|
+
ref
|
|
356
|
+
})
|
|
357
|
+
});
|
|
358
|
+
});
|
|
359
|
+
|
|
360
|
+
// src/checkbox/checkbox-control.tsx
|
|
361
|
+
var import_react18 = require("@polymorphic-factory/react");
|
|
362
|
+
var import_react19 = require("@zag-js/react");
|
|
363
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
364
|
+
var CheckboxControl = (0, import_react18.forwardRef)((props, ref) => {
|
|
365
|
+
const { controlProps } = useCheckboxContext();
|
|
366
|
+
const mergedProps = (0, import_react19.mergeProps)(controlProps, props);
|
|
367
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(atlas.div, {
|
|
368
|
+
...mergedProps,
|
|
369
|
+
ref
|
|
370
|
+
});
|
|
371
|
+
});
|
|
372
|
+
|
|
373
|
+
// src/checkbox/checkbox-input.tsx
|
|
374
|
+
var import_react20 = require("@polymorphic-factory/react");
|
|
375
|
+
var import_react21 = require("@zag-js/react");
|
|
376
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
377
|
+
var CheckboxInput = (0, import_react20.forwardRef)((props, ref) => {
|
|
378
|
+
const { inputProps } = useCheckboxContext();
|
|
379
|
+
const mergedProps = (0, import_react21.mergeProps)(inputProps, props);
|
|
380
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(atlas.input, {
|
|
381
|
+
...mergedProps,
|
|
382
|
+
ref
|
|
383
|
+
});
|
|
384
|
+
});
|
|
385
|
+
|
|
386
|
+
// src/checkbox/checkbox-label.tsx
|
|
387
|
+
var import_react22 = require("@polymorphic-factory/react");
|
|
388
|
+
var import_react23 = require("@zag-js/react");
|
|
389
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
390
|
+
var CheckboxLabel = (0, import_react22.forwardRef)((props, ref) => {
|
|
391
|
+
const { labelProps } = useCheckboxContext();
|
|
392
|
+
const mergedProps = (0, import_react23.mergeProps)(labelProps, props);
|
|
393
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(atlas.label, {
|
|
394
|
+
...mergedProps,
|
|
395
|
+
ref
|
|
396
|
+
});
|
|
397
|
+
});
|
|
398
|
+
|
|
399
|
+
// src/dialog/dialog-context.ts
|
|
400
|
+
var [DialogProvider, useDialogContext] = createContext({
|
|
401
|
+
name: "DialogContext",
|
|
402
|
+
hookName: "useDialogContext",
|
|
403
|
+
providerName: "<DialogProvider />"
|
|
404
|
+
});
|
|
405
|
+
|
|
406
|
+
// src/dialog/use-dialog.ts
|
|
407
|
+
var dialog = __toESM(require("@zag-js/dialog"));
|
|
408
|
+
var import_react24 = require("@zag-js/react");
|
|
409
|
+
var import_react25 = require("react");
|
|
410
|
+
var useDialog = (props) => {
|
|
411
|
+
const initialContext = filterUndefinedEntries({
|
|
412
|
+
id: (0, import_react25.useId)(),
|
|
413
|
+
...props
|
|
414
|
+
});
|
|
415
|
+
const [state, send] = (0, import_react24.useMachine)(dialog.machine(initialContext), { context: initialContext });
|
|
416
|
+
return dialog.connect(state, send, import_react24.normalizeProps);
|
|
417
|
+
};
|
|
418
|
+
|
|
419
|
+
// src/dialog/dialog.tsx
|
|
420
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
421
|
+
var Dialog = (props) => {
|
|
422
|
+
const { children, ...useDialogProps } = props;
|
|
423
|
+
const dialog2 = useDialog(useDialogProps);
|
|
424
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(DialogProvider, {
|
|
425
|
+
value: dialog2,
|
|
426
|
+
children
|
|
427
|
+
});
|
|
428
|
+
};
|
|
429
|
+
|
|
430
|
+
// src/dialog/dialog-backdrop.tsx
|
|
431
|
+
var import_react26 = require("@polymorphic-factory/react");
|
|
432
|
+
var import_react27 = require("@zag-js/react");
|
|
433
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
434
|
+
var DialogBackdrop = (0, import_react26.forwardRef)((props, ref) => {
|
|
435
|
+
const { backdropProps } = useDialogContext();
|
|
436
|
+
const mergedProps = (0, import_react27.mergeProps)(backdropProps, props);
|
|
437
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(atlas.div, {
|
|
438
|
+
...mergedProps,
|
|
439
|
+
ref
|
|
440
|
+
});
|
|
441
|
+
});
|
|
442
|
+
|
|
443
|
+
// src/dialog/dialog-close-button.tsx
|
|
444
|
+
var import_react28 = require("@polymorphic-factory/react");
|
|
445
|
+
var import_react29 = require("@zag-js/react");
|
|
446
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
447
|
+
var DialogCloseButton = (0, import_react28.forwardRef)((props, ref) => {
|
|
448
|
+
const { closeButtonProps } = useDialogContext();
|
|
449
|
+
const mergedProps = (0, import_react29.mergeProps)(closeButtonProps, props);
|
|
450
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(atlas.button, {
|
|
451
|
+
...mergedProps,
|
|
452
|
+
ref
|
|
453
|
+
});
|
|
454
|
+
});
|
|
455
|
+
|
|
456
|
+
// src/dialog/dialog-content.tsx
|
|
457
|
+
var import_react30 = require("@polymorphic-factory/react");
|
|
458
|
+
var import_react31 = require("@zag-js/react");
|
|
459
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
460
|
+
var DialogContent = (0, import_react30.forwardRef)((props, ref) => {
|
|
461
|
+
const { contentProps } = useDialogContext();
|
|
462
|
+
const mergedProps = (0, import_react31.mergeProps)(contentProps, props);
|
|
463
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(atlas.div, {
|
|
464
|
+
...mergedProps,
|
|
465
|
+
ref
|
|
466
|
+
});
|
|
467
|
+
});
|
|
468
|
+
|
|
469
|
+
// src/dialog/dialog-description.tsx
|
|
470
|
+
var import_react32 = require("@polymorphic-factory/react");
|
|
471
|
+
var import_react33 = require("@zag-js/react");
|
|
472
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
473
|
+
var DialogDescription = (0, import_react32.forwardRef)((props, ref) => {
|
|
474
|
+
const { descriptionProps } = useDialogContext();
|
|
475
|
+
const mergedProps = (0, import_react33.mergeProps)(descriptionProps, props);
|
|
476
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(atlas.p, {
|
|
477
|
+
...mergedProps,
|
|
478
|
+
ref
|
|
479
|
+
});
|
|
480
|
+
});
|
|
481
|
+
|
|
482
|
+
// src/dialog/dialog-portal.tsx
|
|
483
|
+
var import_portal = require("@reach/portal");
|
|
484
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
485
|
+
var DialogPortal = (props) => {
|
|
486
|
+
const { isOpen } = useDialogContext();
|
|
487
|
+
return isOpen ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_portal.Portal, {
|
|
488
|
+
type: "atlas-portal",
|
|
489
|
+
...props
|
|
490
|
+
}) : null;
|
|
491
|
+
};
|
|
492
|
+
|
|
493
|
+
// src/dialog/dialog-title.tsx
|
|
494
|
+
var import_react34 = require("@polymorphic-factory/react");
|
|
495
|
+
var import_react35 = require("@zag-js/react");
|
|
496
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
497
|
+
var DialogTitle = (0, import_react34.forwardRef)((props, ref) => {
|
|
498
|
+
const { titleProps } = useDialogContext();
|
|
499
|
+
const mergedProps = (0, import_react35.mergeProps)(titleProps, props);
|
|
500
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(atlas.h2, {
|
|
501
|
+
...mergedProps,
|
|
502
|
+
ref
|
|
503
|
+
});
|
|
504
|
+
});
|
|
505
|
+
|
|
506
|
+
// src/dialog/dialog-trigger.tsx
|
|
507
|
+
var import_react36 = require("react");
|
|
508
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
509
|
+
var DialogTrigger = (props) => {
|
|
510
|
+
const { children } = props;
|
|
511
|
+
const { triggerProps } = useDialogContext();
|
|
512
|
+
return typeof children === "string" || typeof children === "number" ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(atlas.span, {
|
|
513
|
+
...triggerProps,
|
|
514
|
+
children
|
|
515
|
+
}) : (0, import_react36.cloneElement)(children, triggerProps);
|
|
516
|
+
};
|
|
517
|
+
|
|
518
|
+
// src/dialog/dialog-underlay.tsx
|
|
519
|
+
var import_react37 = require("@polymorphic-factory/react");
|
|
520
|
+
var import_react38 = require("@zag-js/react");
|
|
521
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
522
|
+
var DialogUnderlay = (0, import_react37.forwardRef)((props, ref) => {
|
|
523
|
+
const { underlayProps } = useDialogContext();
|
|
524
|
+
const mergedProps = (0, import_react38.mergeProps)(underlayProps, props);
|
|
525
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(atlas.div, {
|
|
526
|
+
...mergedProps,
|
|
527
|
+
ref
|
|
528
|
+
});
|
|
529
|
+
});
|
|
530
|
+
|
|
531
|
+
// src/editable/editable.tsx
|
|
532
|
+
var import_react41 = require("@polymorphic-factory/react");
|
|
533
|
+
var import_react42 = require("@zag-js/react");
|
|
534
|
+
|
|
535
|
+
// src/editable/editable-context.ts
|
|
536
|
+
var [EditableProvider, useEditableContext] = createContext({
|
|
537
|
+
name: "EditableContext",
|
|
538
|
+
hookName: "useEditableContext",
|
|
539
|
+
providerName: "<EditableProvider />"
|
|
540
|
+
});
|
|
541
|
+
|
|
542
|
+
// src/editable/use-editable.ts
|
|
543
|
+
var editable = __toESM(require("@zag-js/editable"));
|
|
544
|
+
var import_react39 = require("@zag-js/react");
|
|
545
|
+
var import_react40 = require("react");
|
|
546
|
+
var useEditable = (props) => {
|
|
547
|
+
const initialContext = filterUndefinedEntries({
|
|
548
|
+
id: (0, import_react40.useId)(),
|
|
549
|
+
...props,
|
|
550
|
+
value: props.value ?? props.defaultValue
|
|
551
|
+
});
|
|
552
|
+
const context = filterUndefinedEntries({
|
|
553
|
+
...initialContext,
|
|
554
|
+
value: props.value
|
|
555
|
+
});
|
|
556
|
+
const [state, send] = (0, import_react39.useMachine)(editable.machine(initialContext), { context });
|
|
557
|
+
return editable.connect(state, send, import_react39.normalizeProps);
|
|
558
|
+
};
|
|
559
|
+
|
|
560
|
+
// src/editable/editable.tsx
|
|
561
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
562
|
+
var Editable = (0, import_react41.forwardRef)((props, ref) => {
|
|
563
|
+
const [useEditableProps, divProps] = splitProps(props, [
|
|
564
|
+
"activationMode",
|
|
565
|
+
"autoResize",
|
|
566
|
+
"defaultValue",
|
|
567
|
+
"dir",
|
|
568
|
+
"disabled",
|
|
569
|
+
"getRootNode",
|
|
570
|
+
"ids",
|
|
571
|
+
"invalid",
|
|
572
|
+
"maxLength",
|
|
573
|
+
"name",
|
|
574
|
+
"onCancel",
|
|
575
|
+
"onChange",
|
|
576
|
+
"onEdit",
|
|
577
|
+
"onSubmit",
|
|
578
|
+
"placeholder",
|
|
579
|
+
"readonly",
|
|
580
|
+
"selectOnFocus",
|
|
581
|
+
"startWithEditView",
|
|
582
|
+
"submitMode",
|
|
583
|
+
"translations",
|
|
584
|
+
"value"
|
|
585
|
+
]);
|
|
586
|
+
const editable2 = useEditable(useEditableProps);
|
|
587
|
+
const mergedProps = (0, import_react42.mergeProps)(editable2.rootProps, divProps);
|
|
588
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(EditableProvider, {
|
|
589
|
+
value: editable2,
|
|
590
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(atlas.div, {
|
|
591
|
+
...mergedProps,
|
|
592
|
+
ref
|
|
593
|
+
})
|
|
594
|
+
});
|
|
595
|
+
});
|
|
596
|
+
|
|
597
|
+
// src/editable/editable-area.tsx
|
|
598
|
+
var import_react43 = require("@polymorphic-factory/react");
|
|
599
|
+
var import_react44 = require("@zag-js/react");
|
|
600
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
601
|
+
var EditableArea = (0, import_react43.forwardRef)((props, ref) => {
|
|
602
|
+
const { areaProps } = useEditableContext();
|
|
603
|
+
const mergedProps = (0, import_react44.mergeProps)(areaProps, props);
|
|
604
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(atlas.div, {
|
|
605
|
+
...mergedProps,
|
|
606
|
+
ref
|
|
607
|
+
});
|
|
608
|
+
});
|
|
609
|
+
|
|
610
|
+
// src/editable/editable-cancel-button.tsx
|
|
611
|
+
var import_react45 = require("@polymorphic-factory/react");
|
|
612
|
+
var import_react46 = require("@zag-js/react");
|
|
613
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
614
|
+
var EditableCancelButton = (0, import_react45.forwardRef)(
|
|
615
|
+
(props, ref) => {
|
|
616
|
+
const { cancelButtonProps } = useEditableContext();
|
|
617
|
+
const mergedProps = (0, import_react46.mergeProps)(cancelButtonProps, props);
|
|
618
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(atlas.button, {
|
|
619
|
+
...mergedProps,
|
|
620
|
+
ref
|
|
621
|
+
});
|
|
622
|
+
}
|
|
623
|
+
);
|
|
624
|
+
|
|
625
|
+
// src/editable/editable-controls.tsx
|
|
626
|
+
var import_react47 = require("@polymorphic-factory/react");
|
|
627
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
628
|
+
var EditableControls = (0, import_react47.forwardRef)((props, ref) => {
|
|
629
|
+
const { children, ...divProps } = props;
|
|
630
|
+
const api = useEditableContext();
|
|
631
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(atlas.div, {
|
|
632
|
+
...divProps,
|
|
633
|
+
ref,
|
|
634
|
+
children: children(api)
|
|
635
|
+
});
|
|
636
|
+
});
|
|
637
|
+
|
|
638
|
+
// src/editable/editable-edit-button.tsx
|
|
639
|
+
var import_react48 = require("@polymorphic-factory/react");
|
|
640
|
+
var import_react49 = require("@zag-js/react");
|
|
641
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
642
|
+
var EditableEditButton = (0, import_react48.forwardRef)((props, ref) => {
|
|
643
|
+
const { editButtonProps } = useEditableContext();
|
|
644
|
+
const mergedProps = (0, import_react49.mergeProps)(editButtonProps, props);
|
|
645
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(atlas.button, {
|
|
646
|
+
...mergedProps,
|
|
647
|
+
ref
|
|
648
|
+
});
|
|
649
|
+
});
|
|
650
|
+
|
|
651
|
+
// src/editable/editable-input.tsx
|
|
652
|
+
var import_react50 = require("@polymorphic-factory/react");
|
|
653
|
+
var import_react51 = require("@zag-js/react");
|
|
654
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
655
|
+
var EditableInput = (0, import_react50.forwardRef)((props, ref) => {
|
|
656
|
+
const { inputProps } = useEditableContext();
|
|
657
|
+
const mergedProps = (0, import_react51.mergeProps)(inputProps, props);
|
|
658
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(atlas.input, {
|
|
659
|
+
...mergedProps,
|
|
660
|
+
ref
|
|
661
|
+
});
|
|
662
|
+
});
|
|
663
|
+
|
|
664
|
+
// src/editable/editable-preview.tsx
|
|
665
|
+
var import_react52 = require("@polymorphic-factory/react");
|
|
666
|
+
var import_react53 = require("@zag-js/react");
|
|
667
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
668
|
+
var EditablePreview = (0, import_react52.forwardRef)((props, ref) => {
|
|
669
|
+
const { previewProps } = useEditableContext();
|
|
670
|
+
const mergedProps = (0, import_react53.mergeProps)(previewProps, props);
|
|
671
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(atlas.span, {
|
|
672
|
+
...mergedProps,
|
|
673
|
+
ref
|
|
674
|
+
});
|
|
675
|
+
});
|
|
676
|
+
|
|
677
|
+
// src/editable/editable-submit-button.tsx
|
|
678
|
+
var import_react54 = require("@polymorphic-factory/react");
|
|
679
|
+
var import_react55 = require("@zag-js/react");
|
|
680
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
681
|
+
var EditableSubmitButton = (0, import_react54.forwardRef)(
|
|
682
|
+
(props, ref) => {
|
|
683
|
+
const { submitButtonProps } = useEditableContext();
|
|
684
|
+
const mergedProps = (0, import_react55.mergeProps)(submitButtonProps, props);
|
|
685
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(atlas.button, {
|
|
686
|
+
...mergedProps,
|
|
687
|
+
ref
|
|
688
|
+
});
|
|
689
|
+
}
|
|
690
|
+
);
|
|
691
|
+
|
|
692
|
+
// src/number-input/number-input.tsx
|
|
693
|
+
var import_react58 = require("@polymorphic-factory/react");
|
|
694
|
+
var import_react59 = require("@zag-js/react");
|
|
695
|
+
|
|
696
|
+
// src/number-input/number-input-context.ts
|
|
697
|
+
var [NumberInputProvider, useNumberInputContext] = createContext({
|
|
698
|
+
name: "NumberInputContext",
|
|
699
|
+
hookName: "useNumberInputContext",
|
|
700
|
+
providerName: "<NumberInputProvider />"
|
|
701
|
+
});
|
|
702
|
+
|
|
703
|
+
// src/number-input/use-number-input.ts
|
|
704
|
+
var numberInput = __toESM(require("@zag-js/number-input"));
|
|
705
|
+
var import_react56 = require("@zag-js/react");
|
|
706
|
+
var import_react57 = require("react");
|
|
707
|
+
var useNumberInput = (props) => {
|
|
708
|
+
const initialContext = filterUndefinedEntries({
|
|
709
|
+
id: (0, import_react57.useId)(),
|
|
710
|
+
...props,
|
|
711
|
+
value: props.value ?? props.defaultValue
|
|
712
|
+
});
|
|
713
|
+
const context = filterUndefinedEntries({
|
|
714
|
+
...initialContext,
|
|
715
|
+
value: props.value
|
|
716
|
+
});
|
|
717
|
+
const [state, send] = (0, import_react56.useMachine)(numberInput.machine(initialContext), { context });
|
|
718
|
+
return numberInput.connect(state, send, import_react56.normalizeProps);
|
|
719
|
+
};
|
|
720
|
+
|
|
721
|
+
// src/number-input/number-input.tsx
|
|
722
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
723
|
+
var NumberInput = (0, import_react58.forwardRef)((props, ref) => {
|
|
724
|
+
const [useNumberInputProps, divProps] = splitProps(props, [
|
|
725
|
+
"allowMouseWheel",
|
|
726
|
+
"allowOverflow",
|
|
727
|
+
"clampValueOnBlur",
|
|
728
|
+
"defaultValue",
|
|
729
|
+
"dir",
|
|
730
|
+
"disabled",
|
|
731
|
+
"focusInputOnChange",
|
|
732
|
+
"format",
|
|
733
|
+
"getRootNode",
|
|
734
|
+
"ids",
|
|
735
|
+
"inputMode",
|
|
736
|
+
"invalid",
|
|
737
|
+
"max",
|
|
738
|
+
"maxFractionDigits",
|
|
739
|
+
"min",
|
|
740
|
+
"minFractionDigits",
|
|
741
|
+
"name",
|
|
742
|
+
"onBlur",
|
|
743
|
+
"onChange",
|
|
744
|
+
"onFocus",
|
|
745
|
+
"onInvalid",
|
|
746
|
+
"parse",
|
|
747
|
+
"pattern",
|
|
748
|
+
"readonly",
|
|
749
|
+
"spinOnPress",
|
|
750
|
+
"step",
|
|
751
|
+
"translations",
|
|
752
|
+
"validateCharacter",
|
|
753
|
+
"value"
|
|
754
|
+
]);
|
|
755
|
+
const pinInput2 = useNumberInput(useNumberInputProps);
|
|
756
|
+
const mergedProps = (0, import_react59.mergeProps)(pinInput2.rootProps, divProps);
|
|
757
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(NumberInputProvider, {
|
|
758
|
+
value: pinInput2,
|
|
759
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(atlas.div, {
|
|
760
|
+
...mergedProps,
|
|
761
|
+
ref
|
|
762
|
+
})
|
|
763
|
+
});
|
|
764
|
+
});
|
|
765
|
+
|
|
766
|
+
// src/number-input/number-input-decrement-button.tsx
|
|
767
|
+
var import_react60 = require("@polymorphic-factory/react");
|
|
768
|
+
var import_react61 = require("@zag-js/react");
|
|
769
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
770
|
+
var NumberInputDecrementButton = (0, import_react60.forwardRef)(
|
|
771
|
+
(props, ref) => {
|
|
772
|
+
const { decrementButtonProps } = useNumberInputContext();
|
|
773
|
+
const mergedProps = (0, import_react61.mergeProps)(decrementButtonProps, props);
|
|
774
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(atlas.button, {
|
|
775
|
+
...mergedProps,
|
|
776
|
+
ref
|
|
777
|
+
});
|
|
778
|
+
}
|
|
779
|
+
);
|
|
780
|
+
|
|
781
|
+
// src/number-input/number-input-field.tsx
|
|
782
|
+
var import_react62 = require("@polymorphic-factory/react");
|
|
783
|
+
var import_react63 = require("@zag-js/react");
|
|
784
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
785
|
+
var NumberInputField = (0, import_react62.forwardRef)((props, ref) => {
|
|
786
|
+
const { inputProps } = useNumberInputContext();
|
|
787
|
+
const mergedProps = (0, import_react63.mergeProps)(inputProps, props);
|
|
788
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(atlas.input, {
|
|
789
|
+
...mergedProps,
|
|
790
|
+
ref
|
|
791
|
+
});
|
|
792
|
+
});
|
|
793
|
+
|
|
794
|
+
// src/number-input/number-input-increment-button.tsx
|
|
795
|
+
var import_react64 = require("@polymorphic-factory/react");
|
|
796
|
+
var import_react65 = require("@zag-js/react");
|
|
797
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
798
|
+
var NumberInputIncrementButton = (0, import_react64.forwardRef)(
|
|
799
|
+
(props, ref) => {
|
|
800
|
+
const { incrementButtonProps } = useNumberInputContext();
|
|
801
|
+
const mergedProps = (0, import_react65.mergeProps)(incrementButtonProps, props);
|
|
802
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(atlas.button, {
|
|
803
|
+
...mergedProps,
|
|
804
|
+
ref
|
|
805
|
+
});
|
|
806
|
+
}
|
|
807
|
+
);
|
|
808
|
+
|
|
809
|
+
// src/pagination/pagination.tsx
|
|
810
|
+
var import_react68 = require("@polymorphic-factory/react");
|
|
811
|
+
var import_react69 = require("@zag-js/react");
|
|
812
|
+
|
|
813
|
+
// src/run-if-fn.ts
|
|
814
|
+
function runIfFn(valueOrFn, ...args) {
|
|
815
|
+
return typeof valueOrFn === "function" ? valueOrFn(...args) : valueOrFn;
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
// src/pagination/pagination-context.ts
|
|
819
|
+
var [PaginationProvider, usePaginationContext] = createContext({
|
|
820
|
+
name: "PaginationContext",
|
|
821
|
+
hookName: "usePaginationContext",
|
|
822
|
+
providerName: "<PaginationProvider />"
|
|
823
|
+
});
|
|
824
|
+
|
|
825
|
+
// src/pagination/use-pagination.ts
|
|
826
|
+
var pagination = __toESM(require("@zag-js/pagination"));
|
|
827
|
+
var import_react66 = require("@zag-js/react");
|
|
828
|
+
var import_react67 = require("react");
|
|
829
|
+
var usePagination = (props) => {
|
|
830
|
+
const initialContext = filterUndefinedEntries({
|
|
831
|
+
id: (0, import_react67.useId)(),
|
|
832
|
+
...props
|
|
833
|
+
});
|
|
834
|
+
const [state, send] = (0, import_react66.useMachine)(pagination.machine(initialContext), { context: initialContext });
|
|
835
|
+
return pagination.connect(state, send, import_react66.normalizeProps);
|
|
836
|
+
};
|
|
837
|
+
|
|
838
|
+
// src/pagination/pagination.tsx
|
|
839
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
840
|
+
var Pagination = (0, import_react68.forwardRef)((props, ref) => {
|
|
841
|
+
const [paginationProps, { children, ...navProps }] = splitProps(props, [
|
|
842
|
+
"count",
|
|
843
|
+
"dir",
|
|
844
|
+
"getRootNode",
|
|
845
|
+
"ids",
|
|
846
|
+
"onChange",
|
|
847
|
+
"page",
|
|
848
|
+
"pageSize",
|
|
849
|
+
"siblingCount",
|
|
850
|
+
"translations"
|
|
851
|
+
]);
|
|
852
|
+
const pagination2 = usePagination(paginationProps);
|
|
853
|
+
const view = runIfFn(children, pagination2);
|
|
854
|
+
const mergedProps = (0, import_react69.mergeProps)(pagination2.rootProps, navProps);
|
|
855
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(PaginationProvider, {
|
|
856
|
+
value: pagination2,
|
|
857
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(atlas.nav, {
|
|
858
|
+
...mergedProps,
|
|
859
|
+
ref,
|
|
860
|
+
children: view
|
|
861
|
+
})
|
|
862
|
+
});
|
|
863
|
+
});
|
|
864
|
+
|
|
865
|
+
// src/pagination/pagination-ellipsis.tsx
|
|
866
|
+
var import_react70 = require("@polymorphic-factory/react");
|
|
867
|
+
var import_react71 = require("@zag-js/react");
|
|
868
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
869
|
+
var PaginationEllipsis = (0, import_react70.forwardRef)((props, ref) => {
|
|
870
|
+
const { getEllipsisProps } = usePaginationContext();
|
|
871
|
+
const [{ index }, spanProps] = splitProps(props, ["index"]);
|
|
872
|
+
const mergedProps = (0, import_react71.mergeProps)(getEllipsisProps({ index }), spanProps);
|
|
873
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(atlas.span, {
|
|
874
|
+
...mergedProps,
|
|
875
|
+
ref
|
|
876
|
+
});
|
|
877
|
+
});
|
|
878
|
+
|
|
879
|
+
// src/pagination/pagination-item.tsx
|
|
880
|
+
var import_react72 = require("@polymorphic-factory/react");
|
|
881
|
+
var import_react73 = require("@zag-js/react");
|
|
882
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
883
|
+
var PaginationItem = (0, import_react72.forwardRef)((props, ref) => {
|
|
884
|
+
const { getItemProps } = usePaginationContext();
|
|
885
|
+
const [{ value }, anchorProps] = splitProps(props, ["value"]);
|
|
886
|
+
const mergedProps = (0, import_react73.mergeProps)(getItemProps({ type: "page", value }), anchorProps);
|
|
887
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(atlas.a, {
|
|
888
|
+
href: `#${value}`,
|
|
889
|
+
...mergedProps,
|
|
890
|
+
ref
|
|
891
|
+
});
|
|
892
|
+
});
|
|
893
|
+
|
|
894
|
+
// src/pagination/pagination-next-item.tsx
|
|
895
|
+
var import_react74 = require("@polymorphic-factory/react");
|
|
896
|
+
var import_react75 = require("@zag-js/react");
|
|
897
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
898
|
+
var PaginationNextItem = (0, import_react74.forwardRef)((props, ref) => {
|
|
899
|
+
const { nextItemProps } = usePaginationContext();
|
|
900
|
+
const mergedProps = (0, import_react75.mergeProps)(nextItemProps, props);
|
|
901
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(atlas.a, {
|
|
902
|
+
href: "#next",
|
|
903
|
+
...mergedProps,
|
|
904
|
+
ref
|
|
905
|
+
});
|
|
906
|
+
});
|
|
907
|
+
|
|
908
|
+
// src/pagination/pagination-prev-item.tsx
|
|
909
|
+
var import_react76 = require("@polymorphic-factory/react");
|
|
910
|
+
var import_react77 = require("@zag-js/react");
|
|
911
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
912
|
+
var PaginationPrevItem = (0, import_react76.forwardRef)((props, ref) => {
|
|
913
|
+
const { prevItemProps } = usePaginationContext();
|
|
914
|
+
const mergedProps = (0, import_react77.mergeProps)(prevItemProps, props);
|
|
915
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(atlas.a, {
|
|
916
|
+
href: "#previous",
|
|
917
|
+
...mergedProps,
|
|
918
|
+
ref
|
|
919
|
+
});
|
|
920
|
+
});
|
|
921
|
+
|
|
922
|
+
// src/pin-input/pin-input.tsx
|
|
923
|
+
var import_react80 = require("@polymorphic-factory/react");
|
|
924
|
+
var import_react81 = require("@zag-js/react");
|
|
925
|
+
|
|
926
|
+
// src/pin-input/pin-input-context.ts
|
|
927
|
+
var [PinInputProvider, usePinInputContext] = createContext({
|
|
928
|
+
name: "PinInputContext",
|
|
929
|
+
hookName: "usePinInputContext",
|
|
930
|
+
providerName: "<PinInputProvider />"
|
|
931
|
+
});
|
|
932
|
+
|
|
933
|
+
// src/pin-input/use-pin-input.ts
|
|
934
|
+
var pinInput = __toESM(require("@zag-js/pin-input"));
|
|
935
|
+
var import_react78 = require("@zag-js/react");
|
|
936
|
+
var import_react79 = require("react");
|
|
937
|
+
var usePinInput = (props) => {
|
|
938
|
+
const initialContext = filterUndefinedEntries({
|
|
939
|
+
id: (0, import_react79.useId)(),
|
|
940
|
+
...props,
|
|
941
|
+
value: props.value ?? props.defaultValue ?? []
|
|
942
|
+
});
|
|
943
|
+
const context = filterUndefinedEntries({
|
|
944
|
+
...initialContext,
|
|
945
|
+
value: props.value
|
|
946
|
+
});
|
|
947
|
+
const [state, send] = (0, import_react78.useMachine)(pinInput.machine(initialContext), { context });
|
|
948
|
+
return pinInput.connect(state, send, import_react78.normalizeProps);
|
|
949
|
+
};
|
|
950
|
+
|
|
951
|
+
// src/pin-input/pin-input.tsx
|
|
952
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
953
|
+
var PinInput = (0, import_react80.forwardRef)((props, ref) => {
|
|
954
|
+
const [usePinInputProps, divProps] = splitProps(props, [
|
|
955
|
+
"autoFocus",
|
|
956
|
+
"blurOnComplete",
|
|
957
|
+
"defaultValue",
|
|
958
|
+
"dir",
|
|
959
|
+
"disabled",
|
|
960
|
+
"getRootNode",
|
|
961
|
+
"ids",
|
|
962
|
+
"invalid",
|
|
963
|
+
"mask",
|
|
964
|
+
"name",
|
|
965
|
+
"onChange",
|
|
966
|
+
"onComplete",
|
|
967
|
+
"onInvalid",
|
|
968
|
+
"otp",
|
|
969
|
+
"pattern",
|
|
970
|
+
"placeholder",
|
|
971
|
+
"translations",
|
|
972
|
+
"type",
|
|
973
|
+
"value"
|
|
974
|
+
]);
|
|
975
|
+
const pinInput2 = usePinInput(usePinInputProps);
|
|
976
|
+
const mergedProps = (0, import_react81.mergeProps)(pinInput2.rootProps, divProps);
|
|
977
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(PinInputProvider, {
|
|
978
|
+
value: pinInput2,
|
|
979
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(atlas.div, {
|
|
980
|
+
...mergedProps,
|
|
981
|
+
ref
|
|
982
|
+
})
|
|
983
|
+
});
|
|
984
|
+
});
|
|
985
|
+
|
|
986
|
+
// src/pin-input/pin-input-field.tsx
|
|
987
|
+
var import_react82 = require("@polymorphic-factory/react");
|
|
988
|
+
var import_react83 = require("@zag-js/react");
|
|
989
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
990
|
+
var PinInputField = (0, import_react82.forwardRef)((props, ref) => {
|
|
991
|
+
const { index, ...inputProps } = props;
|
|
992
|
+
const { getInputProps } = usePinInputContext();
|
|
993
|
+
const mergedProps = (0, import_react83.mergeProps)(getInputProps({ index }), inputProps);
|
|
994
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(atlas.input, {
|
|
995
|
+
...mergedProps,
|
|
996
|
+
ref
|
|
997
|
+
});
|
|
998
|
+
});
|
|
999
|
+
|
|
1000
|
+
// src/popover/popover-context.ts
|
|
1001
|
+
var [PopoverProvider, usePopoverContext] = createContext({
|
|
1002
|
+
name: "PopoverContext",
|
|
1003
|
+
hookName: "usePopoverContext",
|
|
1004
|
+
providerName: "<PopoverProvider />"
|
|
1005
|
+
});
|
|
1006
|
+
|
|
1007
|
+
// src/popover/use-popover.ts
|
|
1008
|
+
var popover = __toESM(require("@zag-js/popover"));
|
|
1009
|
+
var import_react84 = require("@zag-js/react");
|
|
1010
|
+
var import_react85 = require("react");
|
|
1011
|
+
var usePopover = (props) => {
|
|
1012
|
+
const initialContext = filterUndefinedEntries({
|
|
1013
|
+
id: (0, import_react85.useId)(),
|
|
1014
|
+
...props
|
|
1015
|
+
});
|
|
1016
|
+
const [state, send] = (0, import_react84.useMachine)(popover.machine(initialContext), { context: initialContext });
|
|
1017
|
+
return popover.connect(state, send, import_react84.normalizeProps);
|
|
1018
|
+
};
|
|
1019
|
+
|
|
1020
|
+
// src/popover/popover.tsx
|
|
1021
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
1022
|
+
var Popover = (props) => {
|
|
1023
|
+
const { children, ...usePopoverProps } = props;
|
|
1024
|
+
const popover2 = usePopover(usePopoverProps);
|
|
1025
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(PopoverProvider, {
|
|
1026
|
+
value: popover2,
|
|
1027
|
+
children
|
|
1028
|
+
});
|
|
1029
|
+
};
|
|
1030
|
+
|
|
1031
|
+
// src/popover/popover-arrow.tsx
|
|
1032
|
+
var import_react86 = require("@polymorphic-factory/react");
|
|
1033
|
+
var import_react87 = require("@zag-js/react");
|
|
1034
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
1035
|
+
var PopoverArrow = (0, import_react86.forwardRef)((props, ref) => {
|
|
1036
|
+
const { arrowProps } = usePopoverContext();
|
|
1037
|
+
const mergedProps = (0, import_react87.mergeProps)(arrowProps, props);
|
|
1038
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(atlas.div, {
|
|
1039
|
+
...mergedProps,
|
|
1040
|
+
ref
|
|
1041
|
+
});
|
|
1042
|
+
});
|
|
1043
|
+
|
|
1044
|
+
// src/popover/popover-close-button.tsx
|
|
1045
|
+
var import_react88 = require("@polymorphic-factory/react");
|
|
1046
|
+
var import_react89 = require("@zag-js/react");
|
|
1047
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
1048
|
+
var PopoverCloseButton = (0, import_react88.forwardRef)((props, ref) => {
|
|
1049
|
+
const { closeButtonProps } = usePopoverContext();
|
|
1050
|
+
const mergedProps = (0, import_react89.mergeProps)(closeButtonProps, props);
|
|
1051
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(atlas.button, {
|
|
1052
|
+
...mergedProps,
|
|
1053
|
+
ref
|
|
1054
|
+
});
|
|
1055
|
+
});
|
|
1056
|
+
|
|
1057
|
+
// src/popover/popover-content.tsx
|
|
1058
|
+
var import_react90 = require("@polymorphic-factory/react");
|
|
1059
|
+
var import_react91 = require("@zag-js/react");
|
|
1060
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
1061
|
+
var PopoverContent = (0, import_react90.forwardRef)((props, ref) => {
|
|
1062
|
+
const { contentProps } = usePopoverContext();
|
|
1063
|
+
const mergedProps = (0, import_react91.mergeProps)(contentProps, props);
|
|
1064
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(atlas.div, {
|
|
1065
|
+
...mergedProps,
|
|
1066
|
+
ref
|
|
1067
|
+
});
|
|
1068
|
+
});
|
|
1069
|
+
|
|
1070
|
+
// src/popover/popover-description.tsx
|
|
1071
|
+
var import_react92 = require("@polymorphic-factory/react");
|
|
1072
|
+
var import_react93 = require("@zag-js/react");
|
|
1073
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
1074
|
+
var PopoverDescription = (0, import_react92.forwardRef)((props, ref) => {
|
|
1075
|
+
const { descriptionProps } = usePopoverContext();
|
|
1076
|
+
const mergedProps = (0, import_react93.mergeProps)(descriptionProps, props);
|
|
1077
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(atlas.div, {
|
|
1078
|
+
...mergedProps,
|
|
1079
|
+
ref
|
|
1080
|
+
});
|
|
1081
|
+
});
|
|
1082
|
+
|
|
1083
|
+
// src/popover/popover-inner-arrow.tsx
|
|
1084
|
+
var import_react94 = require("@polymorphic-factory/react");
|
|
1085
|
+
var import_react95 = require("@zag-js/react");
|
|
1086
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
1087
|
+
var PopoverInnerArrow = (0, import_react94.forwardRef)((props, ref) => {
|
|
1088
|
+
const { innerArrowProps } = usePopoverContext();
|
|
1089
|
+
const mergedProps = (0, import_react95.mergeProps)(innerArrowProps, props);
|
|
1090
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(atlas.div, {
|
|
1091
|
+
...mergedProps,
|
|
1092
|
+
ref
|
|
1093
|
+
});
|
|
1094
|
+
});
|
|
1095
|
+
|
|
1096
|
+
// src/popover/popover-positioner.tsx
|
|
1097
|
+
var import_react96 = require("@polymorphic-factory/react");
|
|
1098
|
+
var import_react97 = require("@zag-js/react");
|
|
1099
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
1100
|
+
var PopoverPositioner = (0, import_react96.forwardRef)((props, ref) => {
|
|
1101
|
+
const { positionerProps } = usePopoverContext();
|
|
1102
|
+
const mergedProps = (0, import_react97.mergeProps)(positionerProps, props);
|
|
1103
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(atlas.div, {
|
|
1104
|
+
...mergedProps,
|
|
1105
|
+
ref
|
|
1106
|
+
});
|
|
1107
|
+
});
|
|
1108
|
+
|
|
1109
|
+
// src/popover/popover-title.tsx
|
|
1110
|
+
var import_react98 = require("@polymorphic-factory/react");
|
|
1111
|
+
var import_react99 = require("@zag-js/react");
|
|
1112
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
1113
|
+
var PopoverTitle = (0, import_react98.forwardRef)((props, ref) => {
|
|
1114
|
+
const { titleProps } = usePopoverContext();
|
|
1115
|
+
const mergedProps = (0, import_react99.mergeProps)(titleProps, props);
|
|
1116
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(atlas.div, {
|
|
1117
|
+
...mergedProps,
|
|
1118
|
+
ref
|
|
1119
|
+
});
|
|
1120
|
+
});
|
|
1121
|
+
|
|
1122
|
+
// src/popover/popover-trigger.tsx
|
|
1123
|
+
var import_react100 = require("react");
|
|
1124
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
1125
|
+
var PopoverTrigger = (props) => {
|
|
1126
|
+
const { children } = props;
|
|
1127
|
+
const { triggerProps } = usePopoverContext();
|
|
1128
|
+
return typeof children === "string" || typeof children === "number" ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(atlas.span, {
|
|
1129
|
+
...triggerProps,
|
|
1130
|
+
children
|
|
1131
|
+
}) : (0, import_react100.cloneElement)(children, triggerProps);
|
|
1132
|
+
};
|
|
1133
|
+
|
|
1134
|
+
// src/pressable/pressable.tsx
|
|
1135
|
+
var import_react103 = require("@polymorphic-factory/react");
|
|
1136
|
+
var import_react104 = require("@zag-js/react");
|
|
1137
|
+
|
|
1138
|
+
// src/pressable/use-pressable.tsx
|
|
1139
|
+
var pressable = __toESM(require("@zag-js/pressable"));
|
|
1140
|
+
var import_react101 = require("@zag-js/react");
|
|
1141
|
+
var import_react102 = require("react");
|
|
1142
|
+
var usePressable = (props) => {
|
|
1143
|
+
const initialContext = filterUndefinedEntries({
|
|
1144
|
+
id: (0, import_react102.useId)(),
|
|
1145
|
+
...props
|
|
1146
|
+
});
|
|
1147
|
+
const [state, send] = (0, import_react101.useMachine)(pressable.machine(initialContext), { context: initialContext });
|
|
1148
|
+
return pressable.connect(state, send, import_react101.normalizeProps);
|
|
1149
|
+
};
|
|
1150
|
+
|
|
1151
|
+
// src/pressable/pressable.tsx
|
|
1152
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
1153
|
+
var Pressable = (0, import_react103.forwardRef)((props, ref) => {
|
|
1154
|
+
const [usePressableProps, divProps] = splitProps(props, [
|
|
1155
|
+
"allowTextSelectionOnPress",
|
|
1156
|
+
"cancelOnPointerExit",
|
|
1157
|
+
"dir",
|
|
1158
|
+
"disabled",
|
|
1159
|
+
"getRootNode",
|
|
1160
|
+
"onLongPress",
|
|
1161
|
+
"onPress",
|
|
1162
|
+
"onPressEnd",
|
|
1163
|
+
"onPressStart",
|
|
1164
|
+
"onPressUp",
|
|
1165
|
+
"preventFocusOnPress"
|
|
1166
|
+
]);
|
|
1167
|
+
const { pressableProps } = usePressable(usePressableProps);
|
|
1168
|
+
const mergedProps = (0, import_react104.mergeProps)(pressableProps, divProps);
|
|
1169
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(atlas.button, {
|
|
1170
|
+
...mergedProps,
|
|
1171
|
+
ref
|
|
1172
|
+
});
|
|
1173
|
+
});
|
|
1174
|
+
|
|
1175
|
+
// src/radio-group/radio.tsx
|
|
1176
|
+
var import_react105 = require("@polymorphic-factory/react");
|
|
1177
|
+
var import_react106 = require("@zag-js/react");
|
|
1178
|
+
|
|
1179
|
+
// src/radio-group/radio-context.ts
|
|
1180
|
+
var [RadioProvider, useRadioContext] = createContext({
|
|
1181
|
+
name: "RadioContext",
|
|
1182
|
+
hookName: "useRadioContext",
|
|
1183
|
+
providerName: "<RadioProvider />"
|
|
1184
|
+
});
|
|
1185
|
+
|
|
1186
|
+
// src/radio-group/radio-group-context.ts
|
|
1187
|
+
var [RadioGroupProvider, useRadioGroupContext] = createContext({
|
|
1188
|
+
name: "RadioGroupContext",
|
|
1189
|
+
hookName: "useRadioGroupContext",
|
|
1190
|
+
providerName: "<RadioGroupProvider />"
|
|
1191
|
+
});
|
|
1192
|
+
|
|
1193
|
+
// src/radio-group/radio.tsx
|
|
1194
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
1195
|
+
var Radio = (0, import_react105.forwardRef)((props, ref) => {
|
|
1196
|
+
const { value, disabled, invalid, readonly, ...divProps } = props;
|
|
1197
|
+
const { getItemProps } = useRadioGroupContext();
|
|
1198
|
+
const mergedProps = (0, import_react106.mergeProps)(getItemProps({ value, disabled }), divProps);
|
|
1199
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(RadioProvider, {
|
|
1200
|
+
value: { value, disabled, invalid, readonly },
|
|
1201
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(atlas.label, {
|
|
1202
|
+
...mergedProps,
|
|
1203
|
+
ref
|
|
1204
|
+
})
|
|
1205
|
+
});
|
|
1206
|
+
});
|
|
1207
|
+
|
|
1208
|
+
// src/radio-group/radio-control.tsx
|
|
1209
|
+
var import_react107 = require("@polymorphic-factory/react");
|
|
1210
|
+
var import_react108 = require("@zag-js/react");
|
|
1211
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
1212
|
+
var RadioControl = (0, import_react107.forwardRef)((props, ref) => {
|
|
1213
|
+
const { getItemControlProps } = useRadioGroupContext();
|
|
1214
|
+
const context = useRadioContext();
|
|
1215
|
+
const mergedProps = (0, import_react108.mergeProps)(getItemControlProps(context), props);
|
|
1216
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(atlas.div, {
|
|
1217
|
+
...mergedProps,
|
|
1218
|
+
ref
|
|
1219
|
+
});
|
|
1220
|
+
});
|
|
1221
|
+
|
|
1222
|
+
// src/radio-group/radio-group.tsx
|
|
1223
|
+
var import_react111 = require("@polymorphic-factory/react");
|
|
1224
|
+
var import_react112 = require("@zag-js/react");
|
|
1225
|
+
|
|
1226
|
+
// src/radio-group/use-radio-group.tsx
|
|
1227
|
+
var radio = __toESM(require("@zag-js/radio"));
|
|
1228
|
+
var import_react109 = require("@zag-js/react");
|
|
1229
|
+
var import_react110 = require("react");
|
|
1230
|
+
var useRadioGroup = (props) => {
|
|
1231
|
+
const initialContext = filterUndefinedEntries({
|
|
1232
|
+
id: (0, import_react110.useId)(),
|
|
1233
|
+
...props,
|
|
1234
|
+
value: props.value ?? props.defaultValue
|
|
1235
|
+
});
|
|
1236
|
+
const context = filterUndefinedEntries({
|
|
1237
|
+
...initialContext,
|
|
1238
|
+
value: props.value
|
|
1239
|
+
});
|
|
1240
|
+
const [state, send] = (0, import_react109.useMachine)(radio.machine(initialContext), {
|
|
1241
|
+
context
|
|
1242
|
+
});
|
|
1243
|
+
return radio.connect(state, send, import_react109.normalizeProps);
|
|
1244
|
+
};
|
|
1245
|
+
|
|
1246
|
+
// src/radio-group/radio-group.tsx
|
|
1247
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
1248
|
+
var RadioGroup = (0, import_react111.forwardRef)((props, ref) => {
|
|
1249
|
+
const [useRadioGroupProps, divProps] = splitProps(props, [
|
|
1250
|
+
"defaultValue",
|
|
1251
|
+
"dir",
|
|
1252
|
+
"disabled",
|
|
1253
|
+
"getRootNode",
|
|
1254
|
+
"ids",
|
|
1255
|
+
"name",
|
|
1256
|
+
"onChange",
|
|
1257
|
+
"orientation",
|
|
1258
|
+
"readonly",
|
|
1259
|
+
"value"
|
|
1260
|
+
]);
|
|
1261
|
+
const radioGroup = useRadioGroup(useRadioGroupProps);
|
|
1262
|
+
const mergedProps = (0, import_react112.mergeProps)(radioGroup.rootProps, divProps);
|
|
1263
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(RadioGroupProvider, {
|
|
1264
|
+
value: radioGroup,
|
|
1265
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(atlas.div, {
|
|
1266
|
+
...mergedProps,
|
|
1267
|
+
ref
|
|
1268
|
+
})
|
|
1269
|
+
});
|
|
1270
|
+
});
|
|
1271
|
+
|
|
1272
|
+
// src/radio-group/radio-group-label.tsx
|
|
1273
|
+
var import_react113 = require("@polymorphic-factory/react");
|
|
1274
|
+
var import_react114 = require("@zag-js/react");
|
|
1275
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
1276
|
+
var RadioGroupLabel = (0, import_react113.forwardRef)((props, ref) => {
|
|
1277
|
+
const { labelProps } = useRadioGroupContext();
|
|
1278
|
+
const mergedProps = (0, import_react114.mergeProps)(labelProps, props);
|
|
1279
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(atlas.label, {
|
|
1280
|
+
...mergedProps,
|
|
1281
|
+
ref
|
|
1282
|
+
});
|
|
1283
|
+
});
|
|
1284
|
+
|
|
1285
|
+
// src/radio-group/radio-input.tsx
|
|
1286
|
+
var import_react115 = require("@polymorphic-factory/react");
|
|
1287
|
+
var import_react116 = require("@zag-js/react");
|
|
1288
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
1289
|
+
var RadioInput = (0, import_react115.forwardRef)((props, ref) => {
|
|
1290
|
+
const { getItemInputProps } = useRadioGroupContext();
|
|
1291
|
+
const context = useRadioContext();
|
|
1292
|
+
const mergedProps = (0, import_react116.mergeProps)(getItemInputProps(context), props);
|
|
1293
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(atlas.input, {
|
|
1294
|
+
...mergedProps,
|
|
1295
|
+
ref
|
|
1296
|
+
});
|
|
1297
|
+
});
|
|
1298
|
+
|
|
1299
|
+
// src/radio-group/radio-label.tsx
|
|
1300
|
+
var import_react117 = require("@polymorphic-factory/react");
|
|
1301
|
+
var import_react118 = require("@zag-js/react");
|
|
1302
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
1303
|
+
var RadioLabel = (0, import_react117.forwardRef)((props, ref) => {
|
|
1304
|
+
const { getItemLabelProps } = useRadioGroupContext();
|
|
1305
|
+
const context = useRadioContext();
|
|
1306
|
+
const mergedProps = (0, import_react118.mergeProps)(getItemLabelProps(context), props);
|
|
1307
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(atlas.span, {
|
|
1308
|
+
...mergedProps,
|
|
1309
|
+
ref
|
|
1310
|
+
});
|
|
1311
|
+
});
|
|
1312
|
+
|
|
1313
|
+
// src/rating/rating.tsx
|
|
1314
|
+
var import_react121 = require("@polymorphic-factory/react");
|
|
1315
|
+
var import_react122 = require("@zag-js/react");
|
|
1316
|
+
|
|
1317
|
+
// src/rating/rating-context.ts
|
|
1318
|
+
var [RatingProvider, useRatingContext] = createContext({
|
|
1319
|
+
name: "RatingContext",
|
|
1320
|
+
hookName: "useRatingContext",
|
|
1321
|
+
providerName: "<RatingProvider />"
|
|
1322
|
+
});
|
|
1323
|
+
|
|
1324
|
+
// src/rating/use-rating.tsx
|
|
1325
|
+
var rating = __toESM(require("@zag-js/rating"));
|
|
1326
|
+
var import_react119 = require("@zag-js/react");
|
|
1327
|
+
var import_react120 = require("react");
|
|
1328
|
+
var useRating = (props) => {
|
|
1329
|
+
const initialContext = filterUndefinedEntries({
|
|
1330
|
+
id: (0, import_react120.useId)(),
|
|
1331
|
+
...props,
|
|
1332
|
+
value: props.value ?? props.defaultValue
|
|
1333
|
+
});
|
|
1334
|
+
const context = filterUndefinedEntries({
|
|
1335
|
+
...initialContext,
|
|
1336
|
+
value: props.value
|
|
1337
|
+
});
|
|
1338
|
+
const [state, send] = (0, import_react119.useMachine)(rating.machine(initialContext), {
|
|
1339
|
+
context
|
|
1340
|
+
});
|
|
1341
|
+
return rating.connect(state, send, import_react119.normalizeProps);
|
|
1342
|
+
};
|
|
1343
|
+
|
|
1344
|
+
// src/rating/rating.tsx
|
|
1345
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
1346
|
+
var Rating = (0, import_react121.forwardRef)((props, ref) => {
|
|
1347
|
+
const [useRatingProps, divProps] = splitProps(props, [
|
|
1348
|
+
"allowHalf",
|
|
1349
|
+
"autoFocus",
|
|
1350
|
+
"defaultValue",
|
|
1351
|
+
"dir",
|
|
1352
|
+
"disabled",
|
|
1353
|
+
"getRootNode",
|
|
1354
|
+
"ids",
|
|
1355
|
+
"max",
|
|
1356
|
+
"name",
|
|
1357
|
+
"onChange",
|
|
1358
|
+
"onHover",
|
|
1359
|
+
"readonly",
|
|
1360
|
+
"translations",
|
|
1361
|
+
"value"
|
|
1362
|
+
]);
|
|
1363
|
+
const rating2 = useRating(useRatingProps);
|
|
1364
|
+
const mergedProps = (0, import_react122.mergeProps)(rating2.rootProps, divProps);
|
|
1365
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(RatingProvider, {
|
|
1366
|
+
value: rating2,
|
|
1367
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(atlas.div, {
|
|
1368
|
+
...mergedProps,
|
|
1369
|
+
children: [
|
|
1370
|
+
props.children,
|
|
1371
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(atlas.input, {
|
|
1372
|
+
...rating2.inputProps,
|
|
1373
|
+
ref
|
|
1374
|
+
})
|
|
1375
|
+
]
|
|
1376
|
+
})
|
|
1377
|
+
});
|
|
1378
|
+
});
|
|
1379
|
+
|
|
1380
|
+
// src/rating/rating-group.tsx
|
|
1381
|
+
var import_react123 = require("@polymorphic-factory/react");
|
|
1382
|
+
var import_react124 = require("@zag-js/react");
|
|
1383
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
1384
|
+
var RatingGroup = (0, import_react123.forwardRef)((props, ref) => {
|
|
1385
|
+
const { children, ...divProps } = props;
|
|
1386
|
+
const api = useRatingContext();
|
|
1387
|
+
const renderPropResult = typeof children === "function" ? children(api) : children;
|
|
1388
|
+
const mergedProps = (0, import_react124.mergeProps)(api.itemGroupProps, divProps);
|
|
1389
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(atlas.div, {
|
|
1390
|
+
...mergedProps,
|
|
1391
|
+
ref,
|
|
1392
|
+
children: renderPropResult
|
|
1393
|
+
});
|
|
1394
|
+
});
|
|
1395
|
+
|
|
1396
|
+
// src/rating/rating-item.tsx
|
|
1397
|
+
var import_react125 = require("@polymorphic-factory/react");
|
|
1398
|
+
var import_react126 = require("@zag-js/react");
|
|
1399
|
+
|
|
1400
|
+
// src/rating/rating-item-context.ts
|
|
1401
|
+
var [RatingItemProvider, useRatingItemContext] = createContext({
|
|
1402
|
+
name: "RatingItemContext",
|
|
1403
|
+
hookName: "useRatingItemContext",
|
|
1404
|
+
providerName: "<RatingItemProvider />"
|
|
1405
|
+
});
|
|
1406
|
+
|
|
1407
|
+
// src/rating/rating-item.tsx
|
|
1408
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
1409
|
+
var RatingItem = (0, import_react125.forwardRef)((props, ref) => {
|
|
1410
|
+
const { children, index, ...divProps } = props;
|
|
1411
|
+
const { getRatingState, getItemProps } = useRatingContext();
|
|
1412
|
+
const state = getRatingState(index);
|
|
1413
|
+
const icon = typeof children === "function" ? children(state) : children;
|
|
1414
|
+
const mergedProps = (0, import_react126.mergeProps)(getItemProps({ index }), divProps);
|
|
1415
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(atlas.span, {
|
|
1416
|
+
...mergedProps,
|
|
1417
|
+
ref,
|
|
1418
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(RatingItemProvider, {
|
|
1419
|
+
value: state,
|
|
1420
|
+
children: icon
|
|
1421
|
+
})
|
|
1422
|
+
});
|
|
1423
|
+
});
|
|
1424
|
+
|
|
1425
|
+
// src/rating/rating-label.tsx
|
|
1426
|
+
var import_react127 = require("@polymorphic-factory/react");
|
|
1427
|
+
var import_react128 = require("@zag-js/react");
|
|
1428
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
1429
|
+
var RatingLabel = (0, import_react127.forwardRef)((props, ref) => {
|
|
1430
|
+
const { labelProps } = useRatingContext();
|
|
1431
|
+
const mergedProps = (0, import_react128.mergeProps)(labelProps, props);
|
|
1432
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(atlas.label, {
|
|
1433
|
+
...mergedProps,
|
|
1434
|
+
ref
|
|
1435
|
+
});
|
|
1436
|
+
});
|
|
1437
|
+
|
|
1438
|
+
// src/tabs/tab.tsx
|
|
1439
|
+
var import_react129 = require("@polymorphic-factory/react");
|
|
1440
|
+
var import_react130 = require("@zag-js/react");
|
|
1441
|
+
|
|
1442
|
+
// src/tabs/tabs-context.ts
|
|
1443
|
+
var [TabsProvider, useTabsContext] = createContext({
|
|
1444
|
+
name: "TabsContext",
|
|
1445
|
+
hookName: "useTabsContext",
|
|
1446
|
+
providerName: "<TabsProvider />"
|
|
1447
|
+
});
|
|
1448
|
+
|
|
1449
|
+
// src/tabs/tab.tsx
|
|
1450
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
1451
|
+
var Tab = (0, import_react129.forwardRef)((props, ref) => {
|
|
1452
|
+
const [tabProps, buttonProps] = splitProps(props, ["disabled", "value"]);
|
|
1453
|
+
const { getTriggerProps } = useTabsContext();
|
|
1454
|
+
const mergedProps = (0, import_react130.mergeProps)(getTriggerProps(tabProps), buttonProps);
|
|
1455
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(atlas.button, {
|
|
1456
|
+
...mergedProps,
|
|
1457
|
+
ref
|
|
1458
|
+
});
|
|
1459
|
+
});
|
|
1460
|
+
|
|
1461
|
+
// src/tabs/tab-indicator.tsx
|
|
1462
|
+
var import_react131 = require("@polymorphic-factory/react");
|
|
1463
|
+
var import_react132 = require("@zag-js/react");
|
|
1464
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
1465
|
+
var TabIndicator = (0, import_react131.forwardRef)((props, ref) => {
|
|
1466
|
+
const { indicatorProps } = useTabsContext();
|
|
1467
|
+
const mergedProps = (0, import_react132.mergeProps)(indicatorProps, props);
|
|
1468
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(atlas.div, {
|
|
1469
|
+
...mergedProps,
|
|
1470
|
+
ref
|
|
1471
|
+
});
|
|
1472
|
+
});
|
|
1473
|
+
|
|
1474
|
+
// src/tabs/tab-list.tsx
|
|
1475
|
+
var import_react133 = require("@polymorphic-factory/react");
|
|
1476
|
+
var import_react134 = require("@zag-js/react");
|
|
1477
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
1478
|
+
var TabList = (0, import_react133.forwardRef)((props, ref) => {
|
|
1479
|
+
const { triggerGroupProps } = useTabsContext();
|
|
1480
|
+
const mergedProps = (0, import_react134.mergeProps)(triggerGroupProps, props);
|
|
1481
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(atlas.div, {
|
|
1482
|
+
...mergedProps,
|
|
1483
|
+
ref
|
|
1484
|
+
});
|
|
1485
|
+
});
|
|
1486
|
+
|
|
1487
|
+
// src/tabs/tab-panel.tsx
|
|
1488
|
+
var import_react135 = require("@polymorphic-factory/react");
|
|
1489
|
+
var import_react136 = require("@zag-js/react");
|
|
1490
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
1491
|
+
var TabPanel = (0, import_react135.forwardRef)((props, ref) => {
|
|
1492
|
+
const [tabContentProps, divProps] = splitProps(props, ["value"]);
|
|
1493
|
+
const { getContentProps } = useTabsContext();
|
|
1494
|
+
const mergedProps = (0, import_react136.mergeProps)(getContentProps(tabContentProps), divProps);
|
|
1495
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(atlas.div, {
|
|
1496
|
+
...mergedProps,
|
|
1497
|
+
ref
|
|
1498
|
+
});
|
|
1499
|
+
});
|
|
1500
|
+
|
|
1501
|
+
// src/tabs/tab-panels.tsx
|
|
1502
|
+
var import_react137 = require("@polymorphic-factory/react");
|
|
1503
|
+
var import_react138 = require("@zag-js/react");
|
|
1504
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
1505
|
+
var TabPanels = (0, import_react137.forwardRef)((props, ref) => {
|
|
1506
|
+
const { contentGroupProps } = useTabsContext();
|
|
1507
|
+
const mergedProps = (0, import_react138.mergeProps)(contentGroupProps, props);
|
|
1508
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(atlas.div, {
|
|
1509
|
+
...mergedProps,
|
|
1510
|
+
ref
|
|
1511
|
+
});
|
|
1512
|
+
});
|
|
1513
|
+
|
|
1514
|
+
// src/tabs/tabs.tsx
|
|
1515
|
+
var import_react141 = require("@polymorphic-factory/react");
|
|
1516
|
+
var import_react142 = require("@zag-js/react");
|
|
1517
|
+
|
|
1518
|
+
// src/tabs/use-tabs.ts
|
|
1519
|
+
var import_react139 = require("@zag-js/react");
|
|
1520
|
+
var tabs = __toESM(require("@zag-js/tabs"));
|
|
1521
|
+
var import_react140 = require("react");
|
|
1522
|
+
var useTabs = (props) => {
|
|
1523
|
+
const context = { id: (0, import_react140.useId)(), ...filterUndefinedEntries(props) };
|
|
1524
|
+
const [state, send] = (0, import_react139.useMachine)(tabs.machine(context), { context });
|
|
1525
|
+
return tabs.connect(state, send, import_react139.normalizeProps);
|
|
1526
|
+
};
|
|
1527
|
+
|
|
1528
|
+
// src/tabs/tabs.tsx
|
|
1529
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
1530
|
+
var Tabs = (0, import_react141.forwardRef)((props, ref) => {
|
|
1531
|
+
const [useTabsProps, divProps] = splitProps(props, [
|
|
1532
|
+
"activationMode",
|
|
1533
|
+
"dir",
|
|
1534
|
+
"getRootNode",
|
|
1535
|
+
"ids",
|
|
1536
|
+
"isIndicatorRendered",
|
|
1537
|
+
"loop",
|
|
1538
|
+
"onChange",
|
|
1539
|
+
"onDelete",
|
|
1540
|
+
"onFocus",
|
|
1541
|
+
"orientation",
|
|
1542
|
+
"translations",
|
|
1543
|
+
"value"
|
|
1544
|
+
]);
|
|
1545
|
+
const tabs2 = useTabs(useTabsProps);
|
|
1546
|
+
const mergedProps = (0, import_react142.mergeProps)(tabs2.rootProps, divProps);
|
|
1547
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(TabsProvider, {
|
|
1548
|
+
value: tabs2,
|
|
1549
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(atlas.div, {
|
|
1550
|
+
...mergedProps,
|
|
1551
|
+
ref
|
|
1552
|
+
})
|
|
1553
|
+
});
|
|
1554
|
+
});
|
|
1555
|
+
|
|
1556
|
+
// src/tooltip/tooltip-context.tsx
|
|
1557
|
+
var [TooltipProvider, useTooltipContext] = createContext({
|
|
1558
|
+
name: "TooltipContext",
|
|
1559
|
+
hookName: "useTooltipContext",
|
|
1560
|
+
providerName: "<TooltipProvider />"
|
|
1561
|
+
});
|
|
1562
|
+
|
|
1563
|
+
// src/tooltip/use-tooltip.ts
|
|
1564
|
+
var import_react143 = require("@zag-js/react");
|
|
1565
|
+
var tooltip = __toESM(require("@zag-js/tooltip"));
|
|
1566
|
+
var import_react144 = require("react");
|
|
1567
|
+
var useTooltip = (props) => {
|
|
1568
|
+
const initialContext = filterUndefinedEntries({
|
|
1569
|
+
id: (0, import_react144.useId)(),
|
|
1570
|
+
...props
|
|
1571
|
+
});
|
|
1572
|
+
const [state, send] = (0, import_react143.useMachine)(tooltip.machine(initialContext), { context: initialContext });
|
|
1573
|
+
return tooltip.connect(state, send, import_react143.normalizeProps);
|
|
1574
|
+
};
|
|
1575
|
+
|
|
1576
|
+
// src/tooltip/tooltip.tsx
|
|
1577
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
1578
|
+
var Tooltip = (props) => {
|
|
1579
|
+
const { children, ...useTooltipProps } = props;
|
|
1580
|
+
const tooltip2 = useTooltip(useTooltipProps);
|
|
1581
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(TooltipProvider, {
|
|
1582
|
+
value: tooltip2,
|
|
1583
|
+
children
|
|
1584
|
+
});
|
|
1585
|
+
};
|
|
1586
|
+
|
|
1587
|
+
// src/tooltip/tooltip-arrow.tsx
|
|
1588
|
+
var import_react145 = require("@polymorphic-factory/react");
|
|
1589
|
+
var import_react146 = require("@zag-js/react");
|
|
1590
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
1591
|
+
var TooltipArrow = (0, import_react145.forwardRef)((props, ref) => {
|
|
1592
|
+
const { arrowProps } = useTooltipContext();
|
|
1593
|
+
const mergedProps = (0, import_react146.mergeProps)(arrowProps, props);
|
|
1594
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(atlas.div, {
|
|
1595
|
+
...mergedProps,
|
|
1596
|
+
ref
|
|
1597
|
+
});
|
|
1598
|
+
});
|
|
1599
|
+
|
|
1600
|
+
// src/tooltip/tooltip-content.tsx
|
|
1601
|
+
var import_react147 = require("@polymorphic-factory/react");
|
|
1602
|
+
var import_react148 = require("@zag-js/react");
|
|
1603
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
1604
|
+
var TooltipContent = (0, import_react147.forwardRef)((props, ref) => {
|
|
1605
|
+
const { contentProps } = useTooltipContext();
|
|
1606
|
+
const mergedProps = (0, import_react148.mergeProps)(contentProps, props);
|
|
1607
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(atlas.div, {
|
|
1608
|
+
...mergedProps,
|
|
1609
|
+
ref
|
|
1610
|
+
});
|
|
1611
|
+
});
|
|
1612
|
+
|
|
1613
|
+
// src/tooltip/tooltip-inner-arrow.tsx
|
|
1614
|
+
var import_react149 = require("@polymorphic-factory/react");
|
|
1615
|
+
var import_react150 = require("@zag-js/react");
|
|
1616
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
1617
|
+
var TooltipInnerArrow = (0, import_react149.forwardRef)((props, ref) => {
|
|
1618
|
+
const { innerArrowProps } = useTooltipContext();
|
|
1619
|
+
const mergedProps = (0, import_react150.mergeProps)(innerArrowProps, props);
|
|
1620
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(atlas.div, {
|
|
1621
|
+
...mergedProps,
|
|
1622
|
+
ref
|
|
1623
|
+
});
|
|
1624
|
+
});
|
|
1625
|
+
|
|
1626
|
+
// src/tooltip/tooltip-positioner.tsx
|
|
1627
|
+
var import_react151 = require("@polymorphic-factory/react");
|
|
1628
|
+
var import_react152 = require("@zag-js/react");
|
|
1629
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
1630
|
+
var TooltipPositioner = (0, import_react151.forwardRef)((props, ref) => {
|
|
1631
|
+
const { positionerProps, isOpen } = useTooltipContext();
|
|
1632
|
+
const mergedProps = (0, import_react152.mergeProps)(positionerProps, props);
|
|
1633
|
+
return isOpen ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(atlas.div, {
|
|
1634
|
+
...mergedProps,
|
|
1635
|
+
ref
|
|
1636
|
+
}) : null;
|
|
1637
|
+
});
|
|
1638
|
+
|
|
1639
|
+
// src/tooltip/tooltip-trigger.tsx
|
|
1640
|
+
var import_react153 = require("react");
|
|
1641
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
1642
|
+
var TooltipTrigger = (props) => {
|
|
1643
|
+
const { children } = props;
|
|
1644
|
+
const { triggerProps } = useTooltipContext();
|
|
1645
|
+
return typeof children === "string" || typeof children === "number" ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(atlas.span, {
|
|
1646
|
+
...triggerProps,
|
|
1647
|
+
children
|
|
1648
|
+
}) : (0, import_react153.cloneElement)(children, triggerProps);
|
|
1649
|
+
};
|
|
1650
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
1651
|
+
0 && (module.exports = {
|
|
1652
|
+
Accordion,
|
|
1653
|
+
AccordionButton,
|
|
1654
|
+
AccordionIcon,
|
|
1655
|
+
AccordionItem,
|
|
1656
|
+
AccordionPanel,
|
|
1657
|
+
Checkbox,
|
|
1658
|
+
CheckboxControl,
|
|
1659
|
+
CheckboxInput,
|
|
1660
|
+
CheckboxLabel,
|
|
1661
|
+
Dialog,
|
|
1662
|
+
DialogBackdrop,
|
|
1663
|
+
DialogCloseButton,
|
|
1664
|
+
DialogContent,
|
|
1665
|
+
DialogDescription,
|
|
1666
|
+
DialogPortal,
|
|
1667
|
+
DialogTitle,
|
|
1668
|
+
DialogTrigger,
|
|
1669
|
+
DialogUnderlay,
|
|
1670
|
+
Editable,
|
|
1671
|
+
EditableArea,
|
|
1672
|
+
EditableCancelButton,
|
|
1673
|
+
EditableControls,
|
|
1674
|
+
EditableEditButton,
|
|
1675
|
+
EditableInput,
|
|
1676
|
+
EditablePreview,
|
|
1677
|
+
EditableSubmitButton,
|
|
1678
|
+
NumberInput,
|
|
1679
|
+
NumberInputDecrementButton,
|
|
1680
|
+
NumberInputField,
|
|
1681
|
+
NumberInputIncrementButton,
|
|
1682
|
+
Pagination,
|
|
1683
|
+
PaginationEllipsis,
|
|
1684
|
+
PaginationItem,
|
|
1685
|
+
PaginationNextItem,
|
|
1686
|
+
PaginationPrevItem,
|
|
1687
|
+
PaginationProvider,
|
|
1688
|
+
PinInput,
|
|
1689
|
+
PinInputField,
|
|
1690
|
+
Popover,
|
|
1691
|
+
PopoverArrow,
|
|
1692
|
+
PopoverCloseButton,
|
|
1693
|
+
PopoverContent,
|
|
1694
|
+
PopoverDescription,
|
|
1695
|
+
PopoverInnerArrow,
|
|
1696
|
+
PopoverPositioner,
|
|
1697
|
+
PopoverTitle,
|
|
1698
|
+
PopoverTrigger,
|
|
1699
|
+
Pressable,
|
|
1700
|
+
Radio,
|
|
1701
|
+
RadioControl,
|
|
1702
|
+
RadioGroup,
|
|
1703
|
+
RadioGroupLabel,
|
|
1704
|
+
RadioInput,
|
|
1705
|
+
RadioLabel,
|
|
1706
|
+
Rating,
|
|
1707
|
+
RatingGroup,
|
|
1708
|
+
RatingItem,
|
|
1709
|
+
RatingLabel,
|
|
1710
|
+
Tab,
|
|
1711
|
+
TabIndicator,
|
|
1712
|
+
TabList,
|
|
1713
|
+
TabPanel,
|
|
1714
|
+
TabPanels,
|
|
1715
|
+
Tabs,
|
|
1716
|
+
Tooltip,
|
|
1717
|
+
TooltipArrow,
|
|
1718
|
+
TooltipContent,
|
|
1719
|
+
TooltipInnerArrow,
|
|
1720
|
+
TooltipPositioner,
|
|
1721
|
+
TooltipTrigger,
|
|
1722
|
+
useAccordion,
|
|
1723
|
+
useAccordionItemContext,
|
|
1724
|
+
useCheckbox,
|
|
1725
|
+
useEditable,
|
|
1726
|
+
usePagination,
|
|
1727
|
+
usePaginationContext,
|
|
1728
|
+
usePinInput,
|
|
1729
|
+
usePopover,
|
|
1730
|
+
usePressable,
|
|
1731
|
+
useRadioGroup,
|
|
1732
|
+
useRating,
|
|
1733
|
+
useTabs,
|
|
1734
|
+
useTooltip
|
|
1735
|
+
});
|