@cloudvoyant/helix-react 0.12.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +489 -2
- package/dist/index.d.cts +226 -93
- package/dist/index.d.ts +226 -93
- package/dist/index.js +557 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -40,9 +40,37 @@ __export(index_exports, {
|
|
|
40
40
|
CardHeader: () => CardHeader,
|
|
41
41
|
CardTitle: () => CardTitle,
|
|
42
42
|
Center: () => Center,
|
|
43
|
+
Checkbox: () => Checkbox,
|
|
44
|
+
CheckboxControl: () => CheckboxControl,
|
|
45
|
+
CheckboxGroup: () => CheckboxGroup,
|
|
46
|
+
CheckboxIndicator: () => CheckboxIndicator,
|
|
47
|
+
CheckboxLabel: () => CheckboxLabel,
|
|
43
48
|
Col: () => Col,
|
|
49
|
+
Combobox: () => Combobox,
|
|
50
|
+
ComboboxClear: () => ComboboxClear,
|
|
51
|
+
ComboboxContent: () => ComboboxContent,
|
|
52
|
+
ComboboxControl: () => ComboboxControl,
|
|
53
|
+
ComboboxEmpty: () => ComboboxEmpty,
|
|
54
|
+
ComboboxInput: () => ComboboxInput,
|
|
55
|
+
ComboboxItem: () => ComboboxItem,
|
|
56
|
+
ComboboxItemGroup: () => ComboboxItemGroup,
|
|
57
|
+
ComboboxItemGroupLabel: () => ComboboxItemGroupLabel,
|
|
58
|
+
ComboboxItemIndicator: () => ComboboxItemIndicator,
|
|
59
|
+
ComboboxItemText: () => ComboboxItemText,
|
|
60
|
+
ComboboxList: () => ComboboxList,
|
|
61
|
+
ComboboxTrigger: () => ComboboxTrigger,
|
|
44
62
|
Container: () => Container,
|
|
63
|
+
Field: () => Field,
|
|
64
|
+
FieldError: () => FieldError,
|
|
65
|
+
FieldHelper: () => FieldHelper,
|
|
66
|
+
FieldLabel: () => FieldLabel,
|
|
67
|
+
FieldRequiredIndicator: () => FieldRequiredIndicator,
|
|
68
|
+
FieldSet: () => FieldSet,
|
|
69
|
+
FieldSetError: () => FieldSetError,
|
|
70
|
+
FieldSetHelper: () => FieldSetHelper,
|
|
71
|
+
FieldSetLegend: () => FieldSetLegend,
|
|
45
72
|
HStack: () => HStack,
|
|
73
|
+
Input: () => Input2,
|
|
46
74
|
Item: () => Item,
|
|
47
75
|
Navbar: () => Navbar,
|
|
48
76
|
NavbarActions: () => NavbarActions,
|
|
@@ -63,6 +91,11 @@ __export(index_exports, {
|
|
|
63
91
|
NavbarMobileOverlay: () => NavbarMobileOverlay,
|
|
64
92
|
NavbarProvider: () => NavbarProvider,
|
|
65
93
|
NavbarTrigger: () => NavbarTrigger,
|
|
94
|
+
NumberInput: () => NumberInput,
|
|
95
|
+
NumberInputControl: () => NumberInputControl,
|
|
96
|
+
NumberInputDecrement: () => NumberInputDecrement,
|
|
97
|
+
NumberInputIncrement: () => NumberInputIncrement,
|
|
98
|
+
NumberInputInput: () => NumberInputInput,
|
|
66
99
|
Pagination: () => Pagination,
|
|
67
100
|
PaginationEllipsis: () => PaginationEllipsis,
|
|
68
101
|
PaginationItem: () => PaginationItem,
|
|
@@ -71,6 +104,18 @@ __export(index_exports, {
|
|
|
71
104
|
PaginationPrevious: () => PaginationPrevious,
|
|
72
105
|
Row: () => Row,
|
|
73
106
|
Scroll: () => Scroll,
|
|
107
|
+
Select: () => Select,
|
|
108
|
+
SelectClearTrigger: () => SelectClearTrigger,
|
|
109
|
+
SelectContent: () => SelectContent,
|
|
110
|
+
SelectIndicator: () => SelectIndicator,
|
|
111
|
+
SelectItem: () => SelectItem,
|
|
112
|
+
SelectItemGroup: () => SelectItemGroup,
|
|
113
|
+
SelectItemGroupLabel: () => SelectItemGroupLabel,
|
|
114
|
+
SelectItemIndicator: () => SelectItemIndicator,
|
|
115
|
+
SelectItemText: () => SelectItemText,
|
|
116
|
+
SelectNative: () => SelectNative,
|
|
117
|
+
SelectTrigger: () => SelectTrigger,
|
|
118
|
+
SelectValue: () => SelectValue,
|
|
74
119
|
Sidebar: () => Root,
|
|
75
120
|
SidebarContent: () => Content,
|
|
76
121
|
SidebarFooter: () => Footer,
|
|
@@ -98,17 +143,40 @@ __export(index_exports, {
|
|
|
98
143
|
SplitterResizeTrigger: () => SplitterResizeTrigger,
|
|
99
144
|
SplitterResizeTriggerIndicator: () => SplitterResizeTriggerIndicator,
|
|
100
145
|
Stack: () => Stack,
|
|
146
|
+
Switch: () => Switch,
|
|
147
|
+
SwitchControl: () => SwitchControl,
|
|
148
|
+
SwitchLabel: () => SwitchLabel,
|
|
149
|
+
SwitchThumb: () => SwitchThumb,
|
|
101
150
|
Tabs: () => Tabs,
|
|
102
151
|
TabsContent: () => TabsContent,
|
|
103
152
|
TabsList: () => TabsList,
|
|
104
153
|
TabsTrigger: () => TabsTrigger,
|
|
154
|
+
TagInput: () => TagInput,
|
|
155
|
+
TagInputClearTrigger: () => TagInputClearTrigger,
|
|
156
|
+
TagInputContext: () => TagInputContext,
|
|
157
|
+
TagInputControl: () => TagInputControl,
|
|
158
|
+
TagInputInput: () => TagInputInput,
|
|
159
|
+
TagInputItem: () => TagInputItem,
|
|
160
|
+
TagInputItemDeleteTrigger: () => TagInputItemDeleteTrigger,
|
|
161
|
+
TagInputItemInput: () => TagInputItemInput,
|
|
162
|
+
TagInputItemPreview: () => TagInputItemPreview,
|
|
163
|
+
TagInputItemText: () => TagInputItemText,
|
|
164
|
+
Textarea: () => Textarea,
|
|
105
165
|
ToggleButton: () => ToggleButton,
|
|
106
166
|
ToggleButtonIndicator: () => ToggleButtonIndicator,
|
|
107
167
|
VStack: () => VStack,
|
|
108
168
|
navbarMenuTriggerStyle: () => import_helix44.navbarMenuTriggerStyle,
|
|
169
|
+
useCheckbox: () => useCheckbox,
|
|
170
|
+
useCombobox: () => useCombobox,
|
|
171
|
+
useField: () => useField,
|
|
172
|
+
useMediaQuery: () => useMediaQuery,
|
|
109
173
|
useNavbar: () => useNavbar,
|
|
174
|
+
useNumberInput: () => useNumberInput,
|
|
175
|
+
useSelect: () => useSelect,
|
|
110
176
|
useSidebar: () => useSidebar,
|
|
111
|
-
|
|
177
|
+
useSwitch: () => useSwitch,
|
|
178
|
+
useTabs: () => useTabs,
|
|
179
|
+
useTagInput: () => useTagInput
|
|
112
180
|
});
|
|
113
181
|
module.exports = __toCommonJS(index_exports);
|
|
114
182
|
|
|
@@ -1341,6 +1409,357 @@ function NavbarMobileOverlay({ className, children, ...props }) {
|
|
|
1341
1409
|
] }) })
|
|
1342
1410
|
] }) });
|
|
1343
1411
|
}
|
|
1412
|
+
|
|
1413
|
+
// src/field.tsx
|
|
1414
|
+
var import_field = require("@ark-ui/react/field");
|
|
1415
|
+
var import_fieldset = require("@ark-ui/react/fieldset");
|
|
1416
|
+
var import_helix45 = require("@cloudvoyant/helix");
|
|
1417
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
1418
|
+
function Field({ className, ...props }) {
|
|
1419
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_field.FieldRoot, { className: (0, import_helix45.cn)(import_helix45.fieldRootBase, className), ...props });
|
|
1420
|
+
}
|
|
1421
|
+
function FieldLabel({ className, ...props }) {
|
|
1422
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_field.FieldLabel, { className: (0, import_helix45.cn)(import_helix45.fieldLabelBase, className), ...props });
|
|
1423
|
+
}
|
|
1424
|
+
function FieldHelper({ className, ...props }) {
|
|
1425
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_field.FieldHelperText, { className: (0, import_helix45.cn)(import_helix45.fieldHelperBase, className), ...props });
|
|
1426
|
+
}
|
|
1427
|
+
function FieldError({ className, ...props }) {
|
|
1428
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_field.FieldErrorText, { className: (0, import_helix45.cn)(import_helix45.fieldErrorBase, className), ...props });
|
|
1429
|
+
}
|
|
1430
|
+
function FieldRequiredIndicator({ className, ...props }) {
|
|
1431
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_field.FieldRequiredIndicator, { className: (0, import_helix45.cn)(import_helix45.fieldRequiredIndicatorBase, className), ...props });
|
|
1432
|
+
}
|
|
1433
|
+
function FieldSet({ className, ...props }) {
|
|
1434
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_fieldset.FieldsetRoot, { className: (0, import_helix45.cn)(import_helix45.fieldsetRootBase, className), ...props });
|
|
1435
|
+
}
|
|
1436
|
+
function FieldSetLegend({ className, ...props }) {
|
|
1437
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_fieldset.FieldsetLegend, { className: (0, import_helix45.cn)(import_helix45.fieldsetLegendBase, className), ...props });
|
|
1438
|
+
}
|
|
1439
|
+
function FieldSetHelper({ className, ...props }) {
|
|
1440
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_fieldset.FieldsetHelperText, { className: (0, import_helix45.cn)(import_helix45.fieldsetHelperBase, className), ...props });
|
|
1441
|
+
}
|
|
1442
|
+
function FieldSetError({ className, ...props }) {
|
|
1443
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_fieldset.FieldsetErrorText, { className: (0, import_helix45.cn)(import_helix45.fieldsetErrorBase, className), ...props });
|
|
1444
|
+
}
|
|
1445
|
+
var useField = import_field.useFieldContext;
|
|
1446
|
+
|
|
1447
|
+
// src/input.tsx
|
|
1448
|
+
var import_field2 = require("@ark-ui/react/field");
|
|
1449
|
+
var import_helix46 = require("@cloudvoyant/helix");
|
|
1450
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
1451
|
+
function Input2({ className, size, ...props }) {
|
|
1452
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_field2.FieldInput, { className: (0, import_helix46.cn)((0, import_helix46.inputVariants)({ size }), className), ...props });
|
|
1453
|
+
}
|
|
1454
|
+
|
|
1455
|
+
// src/textarea.tsx
|
|
1456
|
+
var import_field3 = require("@ark-ui/react/field");
|
|
1457
|
+
var import_helix47 = require("@cloudvoyant/helix");
|
|
1458
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
1459
|
+
function Textarea({ className, ...props }) {
|
|
1460
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_field3.FieldTextarea, { className: (0, import_helix47.cn)(import_helix47.textareaBase, className), ...props });
|
|
1461
|
+
}
|
|
1462
|
+
|
|
1463
|
+
// src/number-input.tsx
|
|
1464
|
+
var import_number_input = require("@ark-ui/react/number-input");
|
|
1465
|
+
var import_helix48 = require("@cloudvoyant/helix");
|
|
1466
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
1467
|
+
function NumberInput({ className, ...props }) {
|
|
1468
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_number_input.NumberInputRoot, { className: (0, import_helix48.cn)(import_helix48.numberInputRootBase, className), ...props });
|
|
1469
|
+
}
|
|
1470
|
+
function NumberInputControl({ className, ...props }) {
|
|
1471
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_number_input.NumberInputControl, { className: (0, import_helix48.cn)(import_helix48.numberInputControlBase, className), ...props });
|
|
1472
|
+
}
|
|
1473
|
+
function NumberInputInput({ className, ...props }) {
|
|
1474
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_number_input.NumberInputInput, { className: (0, import_helix48.cn)(import_helix48.numberInputInputBase, className), ...props });
|
|
1475
|
+
}
|
|
1476
|
+
function NumberInputDecrement({ className, ...props }) {
|
|
1477
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_number_input.NumberInputDecrementTrigger, { "aria-label": "Decrement", className: (0, import_helix48.cn)(import_helix48.numberInputTriggerBase, className), ...props });
|
|
1478
|
+
}
|
|
1479
|
+
function NumberInputIncrement({ className, ...props }) {
|
|
1480
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_number_input.NumberInputIncrementTrigger, { "aria-label": "Increment", className: (0, import_helix48.cn)(import_helix48.numberInputTriggerBase, className), ...props });
|
|
1481
|
+
}
|
|
1482
|
+
var useNumberInput = import_number_input.useNumberInputContext;
|
|
1483
|
+
|
|
1484
|
+
// src/checkbox.tsx
|
|
1485
|
+
var import_react2 = require("react");
|
|
1486
|
+
var import_checkbox = require("@ark-ui/react/checkbox");
|
|
1487
|
+
var import_helix49 = require("@cloudvoyant/helix");
|
|
1488
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
1489
|
+
var CheckboxSizeContext = (0, import_react2.createContext)("md");
|
|
1490
|
+
function Checkbox({ className, size = "md", children, ...props }) {
|
|
1491
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(CheckboxSizeContext.Provider, { value: size, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_checkbox.CheckboxRoot, { className: (0, import_helix49.cn)("flex items-center gap-2", className), ...props, children: [
|
|
1492
|
+
children,
|
|
1493
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_checkbox.CheckboxHiddenInput, {})
|
|
1494
|
+
] }) });
|
|
1495
|
+
}
|
|
1496
|
+
function CheckboxControl({ className, ...props }) {
|
|
1497
|
+
const size = (0, import_react2.useContext)(CheckboxSizeContext);
|
|
1498
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_checkbox.CheckboxControl, { className: (0, import_helix49.cn)((0, import_helix49.checkboxVariants)({ size }), className), ...props });
|
|
1499
|
+
}
|
|
1500
|
+
function CheckboxIndicator({ className, ...props }) {
|
|
1501
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_checkbox.CheckboxIndicator, { className: (0, import_helix49.cn)(import_helix49.checkboxIndicatorBase, className), ...props });
|
|
1502
|
+
}
|
|
1503
|
+
function CheckboxLabel({ className, ...props }) {
|
|
1504
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_checkbox.CheckboxLabel, { className: (0, import_helix49.cn)(import_helix49.checkboxLabelBase, className), ...props });
|
|
1505
|
+
}
|
|
1506
|
+
function CheckboxGroup({ className, ...props }) {
|
|
1507
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_checkbox.CheckboxGroup, { className: (0, import_helix49.cn)(import_helix49.checkboxGroupBase, className), ...props });
|
|
1508
|
+
}
|
|
1509
|
+
var useCheckbox = import_checkbox.useCheckboxContext;
|
|
1510
|
+
|
|
1511
|
+
// src/switch.tsx
|
|
1512
|
+
var import_react3 = require("react");
|
|
1513
|
+
var import_switch = require("@ark-ui/react/switch");
|
|
1514
|
+
var import_helix50 = require("@cloudvoyant/helix");
|
|
1515
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
1516
|
+
var SwitchSizeContext = (0, import_react3.createContext)("md");
|
|
1517
|
+
function Switch({ className, size = "md", children, ...props }) {
|
|
1518
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SwitchSizeContext.Provider, { value: size, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_switch.SwitchRoot, { className: (0, import_helix50.cn)("flex items-center gap-2", className), ...props, children: [
|
|
1519
|
+
children,
|
|
1520
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_switch.SwitchHiddenInput, {})
|
|
1521
|
+
] }) });
|
|
1522
|
+
}
|
|
1523
|
+
function SwitchControl({ className, ...props }) {
|
|
1524
|
+
const size = (0, import_react3.useContext)(SwitchSizeContext);
|
|
1525
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_switch.SwitchControl, { className: (0, import_helix50.cn)((0, import_helix50.switchVariants)({ size }), import_helix50.switchControlBase, className), ...props });
|
|
1526
|
+
}
|
|
1527
|
+
function SwitchThumb({ className, ...props }) {
|
|
1528
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_switch.SwitchThumb, { className: (0, import_helix50.cn)(import_helix50.switchThumbBase, className), ...props });
|
|
1529
|
+
}
|
|
1530
|
+
function SwitchLabel({ className, ...props }) {
|
|
1531
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_switch.SwitchLabel, { className: (0, import_helix50.cn)(import_helix50.switchLabelBase, className), ...props });
|
|
1532
|
+
}
|
|
1533
|
+
var useSwitch = import_switch.useSwitchContext;
|
|
1534
|
+
|
|
1535
|
+
// src/select.tsx
|
|
1536
|
+
var import_factory33 = require("@ark-ui/react/factory");
|
|
1537
|
+
var import_portal2 = require("@ark-ui/react/portal");
|
|
1538
|
+
var import_react5 = require("react");
|
|
1539
|
+
var import_select = require("@ark-ui/react/select");
|
|
1540
|
+
var import_helix51 = require("@cloudvoyant/helix");
|
|
1541
|
+
|
|
1542
|
+
// src/use-media-query.ts
|
|
1543
|
+
var import_react4 = require("react");
|
|
1544
|
+
function useMediaQuery(query) {
|
|
1545
|
+
return (0, import_react4.useSyncExternalStore)(
|
|
1546
|
+
(onStoreChange) => {
|
|
1547
|
+
const mql = window.matchMedia(query);
|
|
1548
|
+
mql.addEventListener("change", onStoreChange);
|
|
1549
|
+
return () => mql.removeEventListener("change", onStoreChange);
|
|
1550
|
+
},
|
|
1551
|
+
() => window.matchMedia(query).matches,
|
|
1552
|
+
() => false
|
|
1553
|
+
);
|
|
1554
|
+
}
|
|
1555
|
+
|
|
1556
|
+
// src/select.tsx
|
|
1557
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
1558
|
+
function Select({ items, collection, size, children, ...props }) {
|
|
1559
|
+
const isCoarse = useMediaQuery("(pointer: coarse)");
|
|
1560
|
+
const resolvedCollection = (0, import_react5.useMemo)(
|
|
1561
|
+
() => collection ?? (0, import_select.createListCollection)({ items: items ?? [] }),
|
|
1562
|
+
[collection, items]
|
|
1563
|
+
);
|
|
1564
|
+
if (isCoarse && items) {
|
|
1565
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
1566
|
+
SelectNative,
|
|
1567
|
+
{
|
|
1568
|
+
items,
|
|
1569
|
+
size,
|
|
1570
|
+
value: props.value?.[0],
|
|
1571
|
+
defaultValue: props.defaultValue?.[0],
|
|
1572
|
+
onValueChange: (value) => props.onValueChange?.({ value: [value], items: items.filter((i) => i.value === value) }),
|
|
1573
|
+
invalid: props.invalid,
|
|
1574
|
+
disabled: props.disabled,
|
|
1575
|
+
name: props.name,
|
|
1576
|
+
form: props.form,
|
|
1577
|
+
required: props.required
|
|
1578
|
+
}
|
|
1579
|
+
);
|
|
1580
|
+
}
|
|
1581
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_select.SelectRoot, { collection: resolvedCollection, ...props, children: [
|
|
1582
|
+
children,
|
|
1583
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_select.SelectHiddenSelect, {})
|
|
1584
|
+
] });
|
|
1585
|
+
}
|
|
1586
|
+
function SelectTrigger({ size = "md", className, ...props }) {
|
|
1587
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_select.SelectTrigger, { className: (0, import_helix51.cn)((0, import_helix51.inputVariants)({ size }), import_helix51.selectTriggerBase, className), ...props });
|
|
1588
|
+
}
|
|
1589
|
+
function SelectValue({ className, ...props }) {
|
|
1590
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_select.SelectValueText, { className: (0, import_helix51.cn)(import_helix51.selectValueBase, className), ...props });
|
|
1591
|
+
}
|
|
1592
|
+
function SelectIndicator({ className, ...props }) {
|
|
1593
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_select.SelectIndicator, { className: (0, import_helix51.cn)(import_helix51.selectIndicatorBase, className), ...props });
|
|
1594
|
+
}
|
|
1595
|
+
function SelectClearTrigger({ className, ...props }) {
|
|
1596
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_select.SelectClearTrigger, { "aria-label": "Clear selection", className: (0, import_helix51.cn)(import_helix51.selectClearTriggerBase, className), ...props });
|
|
1597
|
+
}
|
|
1598
|
+
function SelectContent({ className, ...props }) {
|
|
1599
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_portal2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_select.SelectPositioner, { className: import_helix51.selectPositionerBase, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_select.SelectContent, { className: (0, import_helix51.cn)(import_helix51.selectContentBase, className), ...props }) }) });
|
|
1600
|
+
}
|
|
1601
|
+
function SelectItemGroup({ className, ...props }) {
|
|
1602
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_select.SelectItemGroup, { className, ...props });
|
|
1603
|
+
}
|
|
1604
|
+
function SelectItemGroupLabel({ className, ...props }) {
|
|
1605
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_select.SelectItemGroupLabel, { className: (0, import_helix51.cn)(import_helix51.selectItemGroupLabelBase, className), ...props });
|
|
1606
|
+
}
|
|
1607
|
+
function SelectItem({ item, className, ...props }) {
|
|
1608
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_select.SelectItem, { item, className: (0, import_helix51.cn)(import_helix51.selectItemBase, className), ...props });
|
|
1609
|
+
}
|
|
1610
|
+
function SelectItemText({ className, ...props }) {
|
|
1611
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_select.SelectItemText, { className: (0, import_helix51.cn)(import_helix51.selectItemTextBase, className), ...props });
|
|
1612
|
+
}
|
|
1613
|
+
function SelectItemIndicator({ className, ...props }) {
|
|
1614
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_select.SelectItemIndicator, { className: (0, import_helix51.cn)(import_helix51.selectItemIndicatorBase, className), ...props });
|
|
1615
|
+
}
|
|
1616
|
+
var useSelect = import_select.useSelectContext;
|
|
1617
|
+
function ChevronDownIcon() {
|
|
1618
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
1619
|
+
"svg",
|
|
1620
|
+
{
|
|
1621
|
+
viewBox: "0 0 24 24",
|
|
1622
|
+
fill: "none",
|
|
1623
|
+
stroke: "currentColor",
|
|
1624
|
+
strokeWidth: "2",
|
|
1625
|
+
strokeLinecap: "round",
|
|
1626
|
+
strokeLinejoin: "round",
|
|
1627
|
+
"aria-hidden": true,
|
|
1628
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("path", { d: "m6 9 6 6 6-6" })
|
|
1629
|
+
}
|
|
1630
|
+
);
|
|
1631
|
+
}
|
|
1632
|
+
function SelectNative({
|
|
1633
|
+
items = [],
|
|
1634
|
+
value,
|
|
1635
|
+
defaultValue,
|
|
1636
|
+
onValueChange,
|
|
1637
|
+
size = "md",
|
|
1638
|
+
invalid,
|
|
1639
|
+
icon,
|
|
1640
|
+
className,
|
|
1641
|
+
...props
|
|
1642
|
+
}) {
|
|
1643
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_factory33.ark.div, { className: (0, import_helix51.cn)(import_helix51.nativeSelectWrapperBase, className), children: [
|
|
1644
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
1645
|
+
import_factory33.ark.select,
|
|
1646
|
+
{
|
|
1647
|
+
className: (0, import_helix51.nativeSelectVariants)({ size }),
|
|
1648
|
+
value,
|
|
1649
|
+
defaultValue,
|
|
1650
|
+
onChange: (event) => onValueChange?.(event.currentTarget.value),
|
|
1651
|
+
"aria-invalid": invalid,
|
|
1652
|
+
...props,
|
|
1653
|
+
children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_factory33.ark.option, { value: item.value, disabled: item.disabled, children: item.label }, item.value))
|
|
1654
|
+
}
|
|
1655
|
+
),
|
|
1656
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_factory33.ark.span, { className: import_helix51.nativeSelectIconBase, "aria-hidden": true, children: icon ?? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ChevronDownIcon, {}) })
|
|
1657
|
+
] });
|
|
1658
|
+
}
|
|
1659
|
+
|
|
1660
|
+
// src/combobox.tsx
|
|
1661
|
+
var import_portal3 = require("@ark-ui/react/portal");
|
|
1662
|
+
var import_react6 = require("react");
|
|
1663
|
+
var import_combobox = require("@ark-ui/react/combobox");
|
|
1664
|
+
var import_helix52 = require("@cloudvoyant/helix");
|
|
1665
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
1666
|
+
function Combobox({
|
|
1667
|
+
items,
|
|
1668
|
+
collection,
|
|
1669
|
+
openOnClick = true,
|
|
1670
|
+
lazyMount = true,
|
|
1671
|
+
unmountOnExit = true,
|
|
1672
|
+
...props
|
|
1673
|
+
}) {
|
|
1674
|
+
const resolvedCollection = (0, import_react6.useMemo)(
|
|
1675
|
+
() => collection ?? (0, import_combobox.createListCollection)({ items: items ?? [] }),
|
|
1676
|
+
[collection, items]
|
|
1677
|
+
);
|
|
1678
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
1679
|
+
import_combobox.ComboboxRoot,
|
|
1680
|
+
{
|
|
1681
|
+
collection: resolvedCollection,
|
|
1682
|
+
openOnClick,
|
|
1683
|
+
lazyMount,
|
|
1684
|
+
unmountOnExit,
|
|
1685
|
+
...props
|
|
1686
|
+
}
|
|
1687
|
+
);
|
|
1688
|
+
}
|
|
1689
|
+
function ComboboxControl({ className, ...props }) {
|
|
1690
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_combobox.ComboboxControl, { className: (0, import_helix52.cn)(import_helix52.comboboxControlBase, className), ...props });
|
|
1691
|
+
}
|
|
1692
|
+
function ComboboxInput({ size = "md", className, ...props }) {
|
|
1693
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_combobox.ComboboxInput, { className: (0, import_helix52.cn)((0, import_helix52.inputVariants)({ size }), import_helix52.comboboxInputBase, className), ...props });
|
|
1694
|
+
}
|
|
1695
|
+
function ComboboxTrigger({ className, ...props }) {
|
|
1696
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_combobox.ComboboxTrigger, { className: (0, import_helix52.cn)(import_helix52.comboboxTriggerBase, className), ...props });
|
|
1697
|
+
}
|
|
1698
|
+
function ComboboxClear({ className, ...props }) {
|
|
1699
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_combobox.ComboboxClearTrigger, { "aria-label": "Clear", className: (0, import_helix52.cn)(import_helix52.comboboxClearTriggerBase, className), ...props });
|
|
1700
|
+
}
|
|
1701
|
+
function ComboboxContent({ className, ...props }) {
|
|
1702
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_portal3.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_combobox.ComboboxPositioner, { className: import_helix52.comboboxPositionerBase, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_combobox.ComboboxContent, { className: (0, import_helix52.cn)(import_helix52.comboboxContentBase, className), ...props }) }) });
|
|
1703
|
+
}
|
|
1704
|
+
function ComboboxItemGroup({ className, ...props }) {
|
|
1705
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_combobox.ComboboxItemGroup, { className, ...props });
|
|
1706
|
+
}
|
|
1707
|
+
function ComboboxItemGroupLabel({ className, ...props }) {
|
|
1708
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_combobox.ComboboxItemGroupLabel, { className: (0, import_helix52.cn)(import_helix52.comboboxItemGroupLabelBase, className), ...props });
|
|
1709
|
+
}
|
|
1710
|
+
function ComboboxItem({ item, showIndicator = true, className, ...props }) {
|
|
1711
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_combobox.ComboboxItem, { item, persistFocus: true, className: (0, import_helix52.cn)((0, import_helix52.comboboxItemVariants)({ showIndicator }), className), ...props });
|
|
1712
|
+
}
|
|
1713
|
+
function ComboboxItemText({ className, ...props }) {
|
|
1714
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_combobox.ComboboxItemText, { className, ...props });
|
|
1715
|
+
}
|
|
1716
|
+
function ComboboxItemIndicator({ className, ...props }) {
|
|
1717
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_combobox.ComboboxItemIndicator, { className: (0, import_helix52.cn)(import_helix52.comboboxItemIndicatorBase, className), ...props });
|
|
1718
|
+
}
|
|
1719
|
+
function ComboboxList({ className, ...props }) {
|
|
1720
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_combobox.ComboboxList, { className: (0, import_helix52.cn)(import_helix52.comboboxListBase, className), ...props });
|
|
1721
|
+
}
|
|
1722
|
+
function ComboboxEmpty({ className, children, ...props }) {
|
|
1723
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_combobox.ComboboxEmpty, { className: (0, import_helix52.cn)(import_helix52.comboboxEmptyBase, className), ...props, children: children ?? "No results found." });
|
|
1724
|
+
}
|
|
1725
|
+
var useCombobox = import_combobox.useComboboxContext;
|
|
1726
|
+
|
|
1727
|
+
// src/tags-input.tsx
|
|
1728
|
+
var import_tags_input = require("@ark-ui/react/tags-input");
|
|
1729
|
+
var import_helix53 = require("@cloudvoyant/helix");
|
|
1730
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
1731
|
+
function TagInput({ className, editable = false, children, ...props }) {
|
|
1732
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_tags_input.TagsInputRoot, { className: (0, import_helix53.cn)(import_helix53.tagsInputRootBase, className), editable, ...props, children: [
|
|
1733
|
+
children,
|
|
1734
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_tags_input.TagsInputHiddenInput, {})
|
|
1735
|
+
] });
|
|
1736
|
+
}
|
|
1737
|
+
function TagInputControl({ className, ...props }) {
|
|
1738
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_tags_input.TagsInputControl, { className: (0, import_helix53.cn)(import_helix53.tagsInputControlBase, className), ...props });
|
|
1739
|
+
}
|
|
1740
|
+
function TagInputInput({ className, ...props }) {
|
|
1741
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_tags_input.TagsInputInput, { className: (0, import_helix53.cn)(import_helix53.tagsInputInputBase, className), ...props });
|
|
1742
|
+
}
|
|
1743
|
+
function TagInputItem({ className, ...props }) {
|
|
1744
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_tags_input.TagsInputItem, { className: (0, import_helix53.cn)(import_helix53.tagsInputItemBase, className), ...props });
|
|
1745
|
+
}
|
|
1746
|
+
function TagInputItemPreview({ className, ...props }) {
|
|
1747
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_tags_input.TagsInputItemPreview, { className, ...props });
|
|
1748
|
+
}
|
|
1749
|
+
function TagInputItemText({ className, ...props }) {
|
|
1750
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_tags_input.TagsInputItemText, { className: (0, import_helix53.cn)(import_helix53.tagsInputItemTextBase, className), ...props });
|
|
1751
|
+
}
|
|
1752
|
+
function TagInputItemInput({ className, ...props }) {
|
|
1753
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_tags_input.TagsInputItemInput, { className: (0, import_helix53.cn)(import_helix53.tagsInputItemInputBase, className), ...props });
|
|
1754
|
+
}
|
|
1755
|
+
function TagInputItemDeleteTrigger({ className, ...props }) {
|
|
1756
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_tags_input.TagsInputItemDeleteTrigger, { "aria-label": "Remove tag", className: (0, import_helix53.cn)(import_helix53.tagsInputItemDeleteTriggerBase, className), ...props });
|
|
1757
|
+
}
|
|
1758
|
+
function TagInputClearTrigger({ className, ...props }) {
|
|
1759
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_tags_input.TagsInputClearTrigger, { "aria-label": "Clear all tags", className: (0, import_helix53.cn)(import_helix53.tagsInputClearTriggerBase, className), ...props });
|
|
1760
|
+
}
|
|
1761
|
+
var TagInputContext = import_tags_input.TagsInputContext;
|
|
1762
|
+
var useTagInput = import_tags_input.useTagsInputContext;
|
|
1344
1763
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1345
1764
|
0 && (module.exports = {
|
|
1346
1765
|
Badge,
|
|
@@ -1353,9 +1772,37 @@ function NavbarMobileOverlay({ className, children, ...props }) {
|
|
|
1353
1772
|
CardHeader,
|
|
1354
1773
|
CardTitle,
|
|
1355
1774
|
Center,
|
|
1775
|
+
Checkbox,
|
|
1776
|
+
CheckboxControl,
|
|
1777
|
+
CheckboxGroup,
|
|
1778
|
+
CheckboxIndicator,
|
|
1779
|
+
CheckboxLabel,
|
|
1356
1780
|
Col,
|
|
1781
|
+
Combobox,
|
|
1782
|
+
ComboboxClear,
|
|
1783
|
+
ComboboxContent,
|
|
1784
|
+
ComboboxControl,
|
|
1785
|
+
ComboboxEmpty,
|
|
1786
|
+
ComboboxInput,
|
|
1787
|
+
ComboboxItem,
|
|
1788
|
+
ComboboxItemGroup,
|
|
1789
|
+
ComboboxItemGroupLabel,
|
|
1790
|
+
ComboboxItemIndicator,
|
|
1791
|
+
ComboboxItemText,
|
|
1792
|
+
ComboboxList,
|
|
1793
|
+
ComboboxTrigger,
|
|
1357
1794
|
Container,
|
|
1795
|
+
Field,
|
|
1796
|
+
FieldError,
|
|
1797
|
+
FieldHelper,
|
|
1798
|
+
FieldLabel,
|
|
1799
|
+
FieldRequiredIndicator,
|
|
1800
|
+
FieldSet,
|
|
1801
|
+
FieldSetError,
|
|
1802
|
+
FieldSetHelper,
|
|
1803
|
+
FieldSetLegend,
|
|
1358
1804
|
HStack,
|
|
1805
|
+
Input,
|
|
1359
1806
|
Item,
|
|
1360
1807
|
Navbar,
|
|
1361
1808
|
NavbarActions,
|
|
@@ -1376,6 +1823,11 @@ function NavbarMobileOverlay({ className, children, ...props }) {
|
|
|
1376
1823
|
NavbarMobileOverlay,
|
|
1377
1824
|
NavbarProvider,
|
|
1378
1825
|
NavbarTrigger,
|
|
1826
|
+
NumberInput,
|
|
1827
|
+
NumberInputControl,
|
|
1828
|
+
NumberInputDecrement,
|
|
1829
|
+
NumberInputIncrement,
|
|
1830
|
+
NumberInputInput,
|
|
1379
1831
|
Pagination,
|
|
1380
1832
|
PaginationEllipsis,
|
|
1381
1833
|
PaginationItem,
|
|
@@ -1384,6 +1836,18 @@ function NavbarMobileOverlay({ className, children, ...props }) {
|
|
|
1384
1836
|
PaginationPrevious,
|
|
1385
1837
|
Row,
|
|
1386
1838
|
Scroll,
|
|
1839
|
+
Select,
|
|
1840
|
+
SelectClearTrigger,
|
|
1841
|
+
SelectContent,
|
|
1842
|
+
SelectIndicator,
|
|
1843
|
+
SelectItem,
|
|
1844
|
+
SelectItemGroup,
|
|
1845
|
+
SelectItemGroupLabel,
|
|
1846
|
+
SelectItemIndicator,
|
|
1847
|
+
SelectItemText,
|
|
1848
|
+
SelectNative,
|
|
1849
|
+
SelectTrigger,
|
|
1850
|
+
SelectValue,
|
|
1387
1851
|
Sidebar,
|
|
1388
1852
|
SidebarContent,
|
|
1389
1853
|
SidebarFooter,
|
|
@@ -1411,15 +1875,38 @@ function NavbarMobileOverlay({ className, children, ...props }) {
|
|
|
1411
1875
|
SplitterResizeTrigger,
|
|
1412
1876
|
SplitterResizeTriggerIndicator,
|
|
1413
1877
|
Stack,
|
|
1878
|
+
Switch,
|
|
1879
|
+
SwitchControl,
|
|
1880
|
+
SwitchLabel,
|
|
1881
|
+
SwitchThumb,
|
|
1414
1882
|
Tabs,
|
|
1415
1883
|
TabsContent,
|
|
1416
1884
|
TabsList,
|
|
1417
1885
|
TabsTrigger,
|
|
1886
|
+
TagInput,
|
|
1887
|
+
TagInputClearTrigger,
|
|
1888
|
+
TagInputContext,
|
|
1889
|
+
TagInputControl,
|
|
1890
|
+
TagInputInput,
|
|
1891
|
+
TagInputItem,
|
|
1892
|
+
TagInputItemDeleteTrigger,
|
|
1893
|
+
TagInputItemInput,
|
|
1894
|
+
TagInputItemPreview,
|
|
1895
|
+
TagInputItemText,
|
|
1896
|
+
Textarea,
|
|
1418
1897
|
ToggleButton,
|
|
1419
1898
|
ToggleButtonIndicator,
|
|
1420
1899
|
VStack,
|
|
1421
1900
|
navbarMenuTriggerStyle,
|
|
1901
|
+
useCheckbox,
|
|
1902
|
+
useCombobox,
|
|
1903
|
+
useField,
|
|
1904
|
+
useMediaQuery,
|
|
1422
1905
|
useNavbar,
|
|
1906
|
+
useNumberInput,
|
|
1907
|
+
useSelect,
|
|
1423
1908
|
useSidebar,
|
|
1424
|
-
|
|
1909
|
+
useSwitch,
|
|
1910
|
+
useTabs,
|
|
1911
|
+
useTagInput
|
|
1425
1912
|
});
|