@bigbinary/neeto-atoms 1.0.104 → 1.0.105
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/{Combobox-DriZMj4f.js → Combobox-NgubHftk.js} +2 -2
- package/dist/{Combobox-DriZMj4f.js.map → Combobox-NgubHftk.js.map} +1 -1
- package/dist/{Select-N5Ten-tn.js → Select-ZWR0HFCa.js} +253 -85
- package/dist/Select-ZWR0HFCa.js.map +1 -0
- package/dist/{SelectFieldWrapper-D98IWsW5.js → SelectFieldWrapper-D370CD4o.js} +8 -1
- package/dist/SelectFieldWrapper-D370CD4o.js.map +1 -0
- package/dist/{TreeSelect-DMbr7J2H.js → TreeSelect-rrTHwY42.js} +2 -2
- package/dist/{TreeSelect-DMbr7J2H.js.map → TreeSelect-rrTHwY42.js.map} +1 -1
- package/dist/cjs/{Combobox-BE8LT4yq.js → Combobox-PAGcNUr6.js} +2 -2
- package/dist/cjs/{Combobox-BE8LT4yq.js.map → Combobox-PAGcNUr6.js.map} +1 -1
- package/dist/cjs/{Select-CGG3J9NS.js → Select-VQCROyX1.js} +252 -84
- package/dist/cjs/Select-VQCROyX1.js.map +1 -0
- package/dist/cjs/{SelectFieldWrapper-BLVvwUcK.js → SelectFieldWrapper-CIh_atln.js} +8 -1
- package/dist/cjs/SelectFieldWrapper-CIh_atln.js.map +1 -0
- package/dist/cjs/{TreeSelect-3APPRsqr.js → TreeSelect-DDQx8FPS.js} +2 -2
- package/dist/cjs/{TreeSelect-3APPRsqr.js.map → TreeSelect-DDQx8FPS.js.map} +1 -1
- package/dist/cjs/components/Select.js +4 -4
- package/dist/cjs/components/TreeSelect.js +2 -2
- package/dist/cjs/components/index.js +4 -4
- package/dist/cjs/formik/Select.js +4 -4
- package/dist/cjs/formik/TreeSelect.js +2 -2
- package/dist/cjs/formik/index.js +5 -5
- package/dist/cjs/index.js +4 -4
- package/dist/cjs/primitives/AlertDialog.js +6 -38
- package/dist/cjs/primitives/AlertDialog.js.map +1 -1
- package/dist/cjs/primitives/Combobox.js +2 -2
- package/dist/cjs/primitives/index.js +1 -1
- package/dist/components/Select/MultiSelectCombobox.types.d.ts +6 -0
- package/dist/components/Select/SelectAnchor.d.ts +19 -1
- package/dist/components/Select/SelectCombobox.types.d.ts +12 -2
- package/dist/components/Select/SelectFieldWrapper.d.ts +7 -1
- package/dist/components/Select/constants.d.ts +1 -0
- package/dist/components/Select/hooks/useCreatableItems.d.ts +3 -1
- package/dist/components/Select/hooks/useMultiSelectState.d.ts +7 -1
- package/dist/components/Select/hooks/useSelectState.d.ts +7 -1
- package/dist/components/Select/types.d.ts +23 -0
- package/dist/components/Select/utils.d.ts +13 -0
- package/dist/components/Select.js +4 -4
- package/dist/components/TreeSelect.js +2 -2
- package/dist/components/index.js +4 -4
- package/dist/formik/Select.js +4 -4
- package/dist/formik/TreeSelect.js +2 -2
- package/dist/formik/index.js +5 -5
- package/dist/index.js +4 -4
- package/dist/primitives/AlertDialog.js +6 -38
- package/dist/primitives/AlertDialog.js.map +1 -1
- package/dist/primitives/Combobox.js +2 -2
- package/dist/primitives/index.js +1 -1
- package/package.json +1 -1
- package/dist/Select-N5Ten-tn.js.map +0 -1
- package/dist/SelectFieldWrapper-D98IWsW5.js.map +0 -1
- package/dist/cjs/Select-CGG3J9NS.js.map +0 -1
- package/dist/cjs/SelectFieldWrapper-BLVvwUcK.js.map +0 -1
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
4
|
var utils = require('../utils-BhM0B89p.js');
|
|
5
|
+
var button = require('../button-CSBhDSDJ.js');
|
|
5
6
|
var React = require('react');
|
|
6
7
|
var DialogTrigger = require('../DialogTrigger-B0Q6yIrx.js');
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
require('
|
|
8
|
+
require('../index-vioSzJOw.js');
|
|
9
|
+
require('../index-DuNgWCXZ.js');
|
|
10
|
+
require('../index-D-iDn9RI.js');
|
|
11
|
+
require('../useOpenInteractionType-D4z6FTrA.js');
|
|
10
12
|
require('../floating-ui.utils.dom-BGEmL7pd.js');
|
|
13
|
+
require('react-dom');
|
|
11
14
|
require('../index-DnKJmaCq.js');
|
|
12
15
|
require('../index-BrpkRQoS.js');
|
|
13
16
|
require('../with-selector-DeKHbQY7.js');
|
|
14
|
-
require('../index-vioSzJOw.js');
|
|
15
|
-
require('../index-DuNgWCXZ.js');
|
|
16
|
-
require('../index-D-iDn9RI.js');
|
|
17
17
|
|
|
18
18
|
function _interopNamespace(e) {
|
|
19
19
|
if (e && e.__esModule) return e;
|
|
@@ -35,38 +35,6 @@ function _interopNamespace(e) {
|
|
|
35
35
|
|
|
36
36
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
37
37
|
|
|
38
|
-
(function (DialogViewportDataAttributes) {
|
|
39
|
-
/**
|
|
40
|
-
* Present when the dialog is open.
|
|
41
|
-
*/
|
|
42
|
-
DialogViewportDataAttributes[DialogViewportDataAttributes["open"] = useOpenInteractionType.CommonPopupDataAttributes.open] = "open";
|
|
43
|
-
/**
|
|
44
|
-
* Present when the dialog is closed.
|
|
45
|
-
*/
|
|
46
|
-
DialogViewportDataAttributes[DialogViewportDataAttributes["closed"] = useOpenInteractionType.CommonPopupDataAttributes.closed] = "closed";
|
|
47
|
-
/**
|
|
48
|
-
* Present when the dialog is animating in.
|
|
49
|
-
*/
|
|
50
|
-
DialogViewportDataAttributes[DialogViewportDataAttributes["startingStyle"] = useOpenInteractionType.CommonPopupDataAttributes.startingStyle] = "startingStyle";
|
|
51
|
-
/**
|
|
52
|
-
* Present when the dialog is animating out.
|
|
53
|
-
*/
|
|
54
|
-
DialogViewportDataAttributes[DialogViewportDataAttributes["endingStyle"] = useOpenInteractionType.CommonPopupDataAttributes.endingStyle] = "endingStyle";
|
|
55
|
-
/**
|
|
56
|
-
* Present when the dialog is nested within another dialog.
|
|
57
|
-
*/
|
|
58
|
-
DialogViewportDataAttributes["nested"] = "data-nested";
|
|
59
|
-
/**
|
|
60
|
-
* Present when the dialog has other open dialogs nested within it.
|
|
61
|
-
*/
|
|
62
|
-
DialogViewportDataAttributes["nestedDialogOpen"] = "data-nested-dialog-open";
|
|
63
|
-
return DialogViewportDataAttributes;
|
|
64
|
-
})({});
|
|
65
|
-
|
|
66
|
-
({
|
|
67
|
-
...useOpenInteractionType.popupStateMapping,
|
|
68
|
-
...useOpenInteractionType.transitionStatusMapping});
|
|
69
|
-
|
|
70
38
|
/**
|
|
71
39
|
* Groups all parts of the alert dialog.
|
|
72
40
|
* Doesn't render its own HTML element.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlertDialog.js","sources":["../../../node_modules/@base-ui/react/esm/dialog/viewport/DialogViewportDataAttributes.js","../../../node_modules/@base-ui/react/esm/dialog/viewport/DialogViewport.js","../../../node_modules/@base-ui/react/esm/alert-dialog/root/AlertDialogRoot.js","../../../src/shadcn/components/alert-dialog.tsx","../../../src/primitives/AlertDialog.tsx"],"sourcesContent":["import { CommonPopupDataAttributes } from \"../../utils/popupStateMapping.js\";\nexport let DialogViewportDataAttributes = function (DialogViewportDataAttributes) {\n /**\n * Present when the dialog is open.\n */\n DialogViewportDataAttributes[DialogViewportDataAttributes[\"open\"] = CommonPopupDataAttributes.open] = \"open\";\n /**\n * Present when the dialog is closed.\n */\n DialogViewportDataAttributes[DialogViewportDataAttributes[\"closed\"] = CommonPopupDataAttributes.closed] = \"closed\";\n /**\n * Present when the dialog is animating in.\n */\n DialogViewportDataAttributes[DialogViewportDataAttributes[\"startingStyle\"] = CommonPopupDataAttributes.startingStyle] = \"startingStyle\";\n /**\n * Present when the dialog is animating out.\n */\n DialogViewportDataAttributes[DialogViewportDataAttributes[\"endingStyle\"] = CommonPopupDataAttributes.endingStyle] = \"endingStyle\";\n /**\n * Present when the dialog is nested within another dialog.\n */\n DialogViewportDataAttributes[\"nested\"] = \"data-nested\";\n /**\n * Present when the dialog has other open dialogs nested within it.\n */\n DialogViewportDataAttributes[\"nestedDialogOpen\"] = \"data-nested-dialog-open\";\n return DialogViewportDataAttributes;\n}({});","'use client';\n\nimport * as React from 'react';\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\nimport { popupStateMapping as baseMapping } from \"../../utils/popupStateMapping.js\";\nimport { transitionStatusMapping } from \"../../utils/stateAttributesMapping.js\";\nimport { useDialogRootContext } from \"../root/DialogRootContext.js\";\nimport { useDialogPortalContext } from \"../portal/DialogPortalContext.js\";\nimport { DialogViewportDataAttributes } from \"./DialogViewportDataAttributes.js\";\nconst stateAttributesMapping = {\n ...baseMapping,\n ...transitionStatusMapping,\n nested(value) {\n return value ? {\n [DialogViewportDataAttributes.nested]: ''\n } : null;\n },\n nestedDialogOpen(value) {\n return value ? {\n [DialogViewportDataAttributes.nestedDialogOpen]: ''\n } : null;\n }\n};\n\n/**\n * A positioning container for the dialog popup that can be made scrollable.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Dialog](https://base-ui.com/react/components/dialog)\n */\nexport const DialogViewport = /*#__PURE__*/React.forwardRef(function DialogViewport(componentProps, forwardedRef) {\n const {\n className,\n render,\n children,\n style,\n ...elementProps\n } = componentProps;\n const keepMounted = useDialogPortalContext();\n const {\n store\n } = useDialogRootContext();\n const open = store.useState('open');\n const nested = store.useState('nested');\n const transitionStatus = store.useState('transitionStatus');\n const nestedOpenDialogCount = store.useState('nestedOpenDialogCount');\n const mounted = store.useState('mounted');\n const nestedDialogOpen = nestedOpenDialogCount > 0;\n const state = {\n open,\n nested,\n transitionStatus,\n nestedDialogOpen\n };\n const shouldRender = keepMounted || mounted;\n return useRenderElement('div', componentProps, {\n enabled: shouldRender,\n state,\n ref: [forwardedRef, store.useStateSetter('viewportElement')],\n stateAttributesMapping,\n props: [{\n role: 'presentation',\n hidden: !mounted,\n style: {\n pointerEvents: !open ? 'none' : undefined\n },\n children\n }, elementProps]\n });\n});\nif (process.env.NODE_ENV !== \"production\") DialogViewport.displayName = \"DialogViewport\";","'use client';\n\nimport * as React from 'react';\nimport { IsDrawerContext } from \"../../dialog/root/DialogRoot.js\";\nimport { useDialogRoot } from \"../../dialog/root/useDialogRoot.js\";\nimport { DialogRootContext, useDialogRootContext } from \"../../dialog/root/DialogRootContext.js\";\nimport { DialogStore } from \"../../dialog/store/DialogStore.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Groups all parts of the alert dialog.\n * Doesn't render its own HTML element.\n *\n * Documentation: [Base UI Alert Dialog](https://base-ui.com/react/components/alert-dialog)\n */\nexport function AlertDialogRoot(props) {\n const {\n children,\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n onOpenChangeComplete,\n actionsRef,\n handle,\n triggerId: triggerIdProp,\n defaultTriggerId: defaultTriggerIdProp = null\n } = props;\n const parentDialogRootContext = useDialogRootContext(true);\n const nested = Boolean(parentDialogRootContext);\n const store = DialogStore.useStore(handle?.store, {\n open: defaultOpen,\n openProp,\n activeTriggerId: defaultTriggerIdProp,\n triggerIdProp,\n modal: true,\n disablePointerDismissal: true,\n nested,\n role: 'alertdialog'\n });\n store.useControlledProp('openProp', openProp);\n store.useControlledProp('triggerIdProp', triggerIdProp);\n store.useSyncedValue('nested', nested);\n store.useContextCallback('onOpenChange', onOpenChange);\n store.useContextCallback('onOpenChangeComplete', onOpenChangeComplete);\n const payload = store.useState('payload');\n useDialogRoot({\n store,\n actionsRef,\n parentContext: parentDialogRootContext?.store.context,\n isDrawer: false,\n onOpenChange,\n triggerIdProp\n });\n const contextValue = React.useMemo(() => ({\n store\n }), [store]);\n return /*#__PURE__*/_jsx(IsDrawerContext.Provider, {\n value: false,\n children: /*#__PURE__*/_jsx(DialogRootContext.Provider, {\n value: contextValue,\n children: typeof children === 'function' ? children({\n payload\n }) : children\n })\n });\n}","\"use client\"\n\nimport * as React from \"react\"\nimport { AlertDialog as AlertDialogPrimitive } from \"@base-ui/react/alert-dialog\"\n\nimport { cn } from \"src/shadcn/lib/utils\"\nimport { Button } from \"src/shadcn/components/button\"\n\nfunction AlertDialog({ ...props }: AlertDialogPrimitive.Root.Props) {\n return <AlertDialogPrimitive.Root data-slot=\"alert-dialog\" {...props} />\n}\n\nfunction AlertDialogTrigger({ ...props }: AlertDialogPrimitive.Trigger.Props) {\n return (\n <AlertDialogPrimitive.Trigger data-slot=\"alert-dialog-trigger\" {...props} />\n )\n}\n\nfunction AlertDialogPortal({ ...props }: AlertDialogPrimitive.Portal.Props) {\n return (\n <AlertDialogPrimitive.Portal data-slot=\"alert-dialog-portal\" {...props} />\n )\n}\n\nfunction AlertDialogOverlay({\n className,\n ...props\n}: AlertDialogPrimitive.Backdrop.Props) {\n return (\n <AlertDialogPrimitive.Backdrop\n data-slot=\"alert-dialog-overlay\"\n className={cn(\n \"fixed inset-0 isolate z-50 bg-black/50 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogContent({\n className,\n size = \"default\",\n ...props\n}: AlertDialogPrimitive.Popup.Props & {\n size?: \"default\" | \"sm\"\n}) {\n return (\n <AlertDialogPortal>\n <AlertDialogOverlay forceRender />\n <AlertDialogPrimitive.Popup\n data-slot=\"alert-dialog-content\"\n data-size={size}\n className={cn(\n \"group/alert-dialog-content fixed top-1/2 start-1/2 z-50 grid w-full -translate-x-1/2 rtl:translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95\",\n className\n )}\n {...props}\n />\n </AlertDialogPortal>\n )\n}\n\nfunction AlertDialogHeader({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-dialog-header\"\n className={cn(\n \"grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-start sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogFooter({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-dialog-footer\"\n className={cn(\n \"-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogMedia({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-dialog-media\"\n className={cn(\n \"mb-2 inline-flex size-10 items-center justify-center rounded-md bg-muted sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-6\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogTitle({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {\n return (\n <AlertDialogPrimitive.Title\n data-slot=\"alert-dialog-title\"\n className={cn(\n \"text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogDescription({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {\n return (\n <AlertDialogPrimitive.Description\n data-slot=\"alert-dialog-description\"\n className={cn(\n \"text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogAction({\n className,\n ...props\n}: React.ComponentProps<typeof Button>) {\n return (\n <Button\n data-slot=\"alert-dialog-action\"\n className={cn(className)}\n {...props}\n />\n )\n}\n\nfunction AlertDialogCancel({\n className,\n variant = \"outline\",\n size = \"default\",\n ...props\n}: AlertDialogPrimitive.Close.Props &\n Pick<React.ComponentProps<typeof Button>, \"variant\" | \"size\">) {\n return (\n <AlertDialogPrimitive.Close\n data-slot=\"alert-dialog-cancel\"\n className={cn(className)}\n render={<Button variant={variant} size={size} />}\n {...props}\n />\n )\n}\n\nexport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogMedia,\n AlertDialogOverlay,\n AlertDialogPortal,\n AlertDialogTitle,\n AlertDialogTrigger,\n}\n","import type React from \"react\";\nimport { cn } from \"src/shadcn/lib/utils\";\nimport {\n AlertDialog as ShadcnAlertDialog,\n AlertDialogAction as ShadcnAlertDialogAction,\n AlertDialogCancel as ShadcnAlertDialogCancel,\n AlertDialogContent as ShadcnAlertDialogContent,\n AlertDialogDescription as ShadcnAlertDialogDescription,\n AlertDialogFooter as ShadcnAlertDialogFooter,\n AlertDialogHeader as ShadcnAlertDialogHeader,\n AlertDialogMedia as ShadcnAlertDialogMedia,\n AlertDialogOverlay as ShadcnAlertDialogOverlay,\n AlertDialogPortal as ShadcnAlertDialogPortal,\n AlertDialogTitle as ShadcnAlertDialogTitle,\n AlertDialogTrigger as ShadcnAlertDialogTrigger,\n} from \"src/shadcn/components/alert-dialog\";\n\nconst AlertDialog = (props: React.ComponentProps<typeof ShadcnAlertDialog>) => (\n <ShadcnAlertDialog {...props} />\n);\n\nconst AlertDialogAction = (\n props: React.ComponentProps<typeof ShadcnAlertDialogAction>\n) => <ShadcnAlertDialogAction {...props} />;\n\nconst AlertDialogCancel = (\n props: React.ComponentProps<typeof ShadcnAlertDialogCancel>\n) => <ShadcnAlertDialogCancel {...props} />;\n\nconst AlertDialogContent = (\n props: React.ComponentProps<typeof ShadcnAlertDialogContent>\n) => <ShadcnAlertDialogContent {...props} />;\n\nconst AlertDialogDescription = (\n props: React.ComponentProps<typeof ShadcnAlertDialogDescription>\n) => <ShadcnAlertDialogDescription {...props} />;\n\nconst AlertDialogFooter = ({\n className,\n ...props\n}: React.ComponentProps<typeof ShadcnAlertDialogFooter>) => (\n <ShadcnAlertDialogFooter\n className={cn(\"border-border\", className)}\n {...props}\n />\n);\n\nconst AlertDialogHeader = (\n props: React.ComponentProps<typeof ShadcnAlertDialogHeader>\n) => <ShadcnAlertDialogHeader {...props} />;\n\nconst AlertDialogMedia = (\n props: React.ComponentProps<typeof ShadcnAlertDialogMedia>\n) => <ShadcnAlertDialogMedia {...props} />;\n\nconst AlertDialogOverlay = (\n props: React.ComponentProps<typeof ShadcnAlertDialogOverlay>\n) => <ShadcnAlertDialogOverlay {...props} />;\n\nconst AlertDialogPortal = (\n props: React.ComponentProps<typeof ShadcnAlertDialogPortal>\n) => <ShadcnAlertDialogPortal {...props} />;\n\nconst AlertDialogTitle = (\n props: React.ComponentProps<typeof ShadcnAlertDialogTitle>\n) => <ShadcnAlertDialogTitle {...props} />;\n\nconst AlertDialogTrigger = (\n props: React.ComponentProps<typeof ShadcnAlertDialogTrigger>\n) => <ShadcnAlertDialogTrigger {...props} />;\n\nexport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogMedia,\n AlertDialogOverlay,\n AlertDialogPortal,\n AlertDialogTitle,\n AlertDialogTrigger,\n};\n"],"names":["CommonPopupDataAttributes","baseMapping","transitionStatusMapping","useDialogRootContext","DialogStore","useDialogRoot","React","_jsx","IsDrawerContext","DialogRootContext","AlertDialog","AlertDialogPrimitive.Root","AlertDialogTrigger","AlertDialogPrimitive.Trigger","AlertDialogPortal","AlertDialogPrimitive.Portal","AlertDialogOverlay","jsx","AlertDialogPrimitive.Backdrop","cn","AlertDialogContent","AlertDialogPrimitive.Popup","AlertDialogHeader","AlertDialogFooter","AlertDialogMedia","AlertDialogTitle","AlertDialogPrimitive.Title","AlertDialogDescription","AlertDialogPrimitive.Description","AlertDialogAction","Button","AlertDialogCancel","AlertDialogPrimitive.Close","ShadcnAlertDialog","ShadcnAlertDialogAction","ShadcnAlertDialogCancel","ShadcnAlertDialogContent","ShadcnAlertDialogDescription","ShadcnAlertDialogFooter","ShadcnAlertDialogHeader","ShadcnAlertDialogMedia","ShadcnAlertDialogOverlay","ShadcnAlertDialogPortal","ShadcnAlertDialogTitle","ShadcnAlertDialogTrigger"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAC0C,UAAU,4BAA4B,EAAE;AAClF;AACA;AACA;AACA,EAAE,4BAA4B,CAAC,4BAA4B,CAAC,MAAM,CAAC,GAAGA,gDAAyB,CAAC,IAAI,CAAC,GAAG,MAAM;AAC9G;AACA;AACA;AACA,EAAE,4BAA4B,CAAC,4BAA4B,CAAC,QAAQ,CAAC,GAAGA,gDAAyB,CAAC,MAAM,CAAC,GAAG,QAAQ;AACpH;AACA;AACA;AACA,EAAE,4BAA4B,CAAC,4BAA4B,CAAC,eAAe,CAAC,GAAGA,gDAAyB,CAAC,aAAa,CAAC,GAAG,eAAe;AACzI;AACA;AACA;AACA,EAAE,4BAA4B,CAAC,4BAA4B,CAAC,aAAa,CAAC,GAAGA,gDAAyB,CAAC,WAAW,CAAC,GAAG,aAAa;AACnI;AACA;AACA;AACA,EAAE,4BAA4B,CAAC,QAAQ,CAAC,GAAG,aAAa;AACxD;AACA;AACA;AACA,EAAE,4BAA4B,CAAC,kBAAkB,CAAC,GAAG,yBAAyB;AAC9E,EAAE,OAAO,4BAA4B;AACrC,EAAC,CAAC,EAAE;;CClB2B;AAC/B,EAAE,GAAGC,wCAAW;AAChB,EAAE,GAAGC,8CAWL;;ACdA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,eAAe,CAA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AAA,EAA0B,GAAG,KAAA,EAAO;;;;;;;;;;;;;;;","x_google_ignoreList":[0,1,2]}
|
|
1
|
+
{"version":3,"file":"AlertDialog.js","sources":["../../../node_modules/@base-ui/react/esm/alert-dialog/root/AlertDialogRoot.js","../../../src/shadcn/components/alert-dialog.tsx","../../../src/primitives/AlertDialog.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { IsDrawerContext } from \"../../dialog/root/DialogRoot.js\";\nimport { useDialogRoot } from \"../../dialog/root/useDialogRoot.js\";\nimport { DialogRootContext, useDialogRootContext } from \"../../dialog/root/DialogRootContext.js\";\nimport { DialogStore } from \"../../dialog/store/DialogStore.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Groups all parts of the alert dialog.\n * Doesn't render its own HTML element.\n *\n * Documentation: [Base UI Alert Dialog](https://base-ui.com/react/components/alert-dialog)\n */\nexport function AlertDialogRoot(props) {\n const {\n children,\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n onOpenChangeComplete,\n actionsRef,\n handle,\n triggerId: triggerIdProp,\n defaultTriggerId: defaultTriggerIdProp = null\n } = props;\n const parentDialogRootContext = useDialogRootContext(true);\n const nested = Boolean(parentDialogRootContext);\n const store = DialogStore.useStore(handle?.store, {\n open: defaultOpen,\n openProp,\n activeTriggerId: defaultTriggerIdProp,\n triggerIdProp,\n modal: true,\n disablePointerDismissal: true,\n nested,\n role: 'alertdialog'\n });\n store.useControlledProp('openProp', openProp);\n store.useControlledProp('triggerIdProp', triggerIdProp);\n store.useSyncedValue('nested', nested);\n store.useContextCallback('onOpenChange', onOpenChange);\n store.useContextCallback('onOpenChangeComplete', onOpenChangeComplete);\n const payload = store.useState('payload');\n useDialogRoot({\n store,\n actionsRef,\n parentContext: parentDialogRootContext?.store.context,\n isDrawer: false,\n onOpenChange,\n triggerIdProp\n });\n const contextValue = React.useMemo(() => ({\n store\n }), [store]);\n return /*#__PURE__*/_jsx(IsDrawerContext.Provider, {\n value: false,\n children: /*#__PURE__*/_jsx(DialogRootContext.Provider, {\n value: contextValue,\n children: typeof children === 'function' ? children({\n payload\n }) : children\n })\n });\n}","\"use client\"\n\nimport * as React from \"react\"\nimport { AlertDialog as AlertDialogPrimitive } from \"@base-ui/react/alert-dialog\"\n\nimport { cn } from \"src/shadcn/lib/utils\"\nimport { Button } from \"src/shadcn/components/button\"\n\nfunction AlertDialog({ ...props }: AlertDialogPrimitive.Root.Props) {\n return <AlertDialogPrimitive.Root data-slot=\"alert-dialog\" {...props} />\n}\n\nfunction AlertDialogTrigger({ ...props }: AlertDialogPrimitive.Trigger.Props) {\n return (\n <AlertDialogPrimitive.Trigger data-slot=\"alert-dialog-trigger\" {...props} />\n )\n}\n\nfunction AlertDialogPortal({ ...props }: AlertDialogPrimitive.Portal.Props) {\n return (\n <AlertDialogPrimitive.Portal data-slot=\"alert-dialog-portal\" {...props} />\n )\n}\n\nfunction AlertDialogOverlay({\n className,\n ...props\n}: AlertDialogPrimitive.Backdrop.Props) {\n return (\n <AlertDialogPrimitive.Backdrop\n data-slot=\"alert-dialog-overlay\"\n className={cn(\n \"fixed inset-0 isolate z-50 bg-black/50 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogContent({\n className,\n size = \"default\",\n ...props\n}: AlertDialogPrimitive.Popup.Props & {\n size?: \"default\" | \"sm\"\n}) {\n return (\n <AlertDialogPortal>\n <AlertDialogOverlay forceRender />\n <AlertDialogPrimitive.Popup\n data-slot=\"alert-dialog-content\"\n data-size={size}\n className={cn(\n \"group/alert-dialog-content fixed top-1/2 start-1/2 z-50 grid w-full -translate-x-1/2 rtl:translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95\",\n className\n )}\n {...props}\n />\n </AlertDialogPortal>\n )\n}\n\nfunction AlertDialogHeader({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-dialog-header\"\n className={cn(\n \"grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-start sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogFooter({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-dialog-footer\"\n className={cn(\n \"-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogMedia({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-dialog-media\"\n className={cn(\n \"mb-2 inline-flex size-10 items-center justify-center rounded-md bg-muted sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-6\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogTitle({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {\n return (\n <AlertDialogPrimitive.Title\n data-slot=\"alert-dialog-title\"\n className={cn(\n \"text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogDescription({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {\n return (\n <AlertDialogPrimitive.Description\n data-slot=\"alert-dialog-description\"\n className={cn(\n \"text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogAction({\n className,\n ...props\n}: React.ComponentProps<typeof Button>) {\n return (\n <Button\n data-slot=\"alert-dialog-action\"\n className={cn(className)}\n {...props}\n />\n )\n}\n\nfunction AlertDialogCancel({\n className,\n variant = \"outline\",\n size = \"default\",\n ...props\n}: AlertDialogPrimitive.Close.Props &\n Pick<React.ComponentProps<typeof Button>, \"variant\" | \"size\">) {\n return (\n <AlertDialogPrimitive.Close\n data-slot=\"alert-dialog-cancel\"\n className={cn(className)}\n render={<Button variant={variant} size={size} />}\n {...props}\n />\n )\n}\n\nexport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogMedia,\n AlertDialogOverlay,\n AlertDialogPortal,\n AlertDialogTitle,\n AlertDialogTrigger,\n}\n","import type React from \"react\";\nimport { cn } from \"src/shadcn/lib/utils\";\nimport {\n AlertDialog as ShadcnAlertDialog,\n AlertDialogAction as ShadcnAlertDialogAction,\n AlertDialogCancel as ShadcnAlertDialogCancel,\n AlertDialogContent as ShadcnAlertDialogContent,\n AlertDialogDescription as ShadcnAlertDialogDescription,\n AlertDialogFooter as ShadcnAlertDialogFooter,\n AlertDialogHeader as ShadcnAlertDialogHeader,\n AlertDialogMedia as ShadcnAlertDialogMedia,\n AlertDialogOverlay as ShadcnAlertDialogOverlay,\n AlertDialogPortal as ShadcnAlertDialogPortal,\n AlertDialogTitle as ShadcnAlertDialogTitle,\n AlertDialogTrigger as ShadcnAlertDialogTrigger,\n} from \"src/shadcn/components/alert-dialog\";\n\nconst AlertDialog = (props: React.ComponentProps<typeof ShadcnAlertDialog>) => (\n <ShadcnAlertDialog {...props} />\n);\n\nconst AlertDialogAction = (\n props: React.ComponentProps<typeof ShadcnAlertDialogAction>\n) => <ShadcnAlertDialogAction {...props} />;\n\nconst AlertDialogCancel = (\n props: React.ComponentProps<typeof ShadcnAlertDialogCancel>\n) => <ShadcnAlertDialogCancel {...props} />;\n\nconst AlertDialogContent = (\n props: React.ComponentProps<typeof ShadcnAlertDialogContent>\n) => <ShadcnAlertDialogContent {...props} />;\n\nconst AlertDialogDescription = (\n props: React.ComponentProps<typeof ShadcnAlertDialogDescription>\n) => <ShadcnAlertDialogDescription {...props} />;\n\nconst AlertDialogFooter = ({\n className,\n ...props\n}: React.ComponentProps<typeof ShadcnAlertDialogFooter>) => (\n <ShadcnAlertDialogFooter\n className={cn(\"border-border\", className)}\n {...props}\n />\n);\n\nconst AlertDialogHeader = (\n props: React.ComponentProps<typeof ShadcnAlertDialogHeader>\n) => <ShadcnAlertDialogHeader {...props} />;\n\nconst AlertDialogMedia = (\n props: React.ComponentProps<typeof ShadcnAlertDialogMedia>\n) => <ShadcnAlertDialogMedia {...props} />;\n\nconst AlertDialogOverlay = (\n props: React.ComponentProps<typeof ShadcnAlertDialogOverlay>\n) => <ShadcnAlertDialogOverlay {...props} />;\n\nconst AlertDialogPortal = (\n props: React.ComponentProps<typeof ShadcnAlertDialogPortal>\n) => <ShadcnAlertDialogPortal {...props} />;\n\nconst AlertDialogTitle = (\n props: React.ComponentProps<typeof ShadcnAlertDialogTitle>\n) => <ShadcnAlertDialogTitle {...props} />;\n\nconst AlertDialogTrigger = (\n props: React.ComponentProps<typeof ShadcnAlertDialogTrigger>\n) => <ShadcnAlertDialogTrigger {...props} />;\n\nexport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogMedia,\n AlertDialogOverlay,\n AlertDialogPortal,\n AlertDialogTitle,\n AlertDialogTrigger,\n};\n"],"names":["useDialogRootContext","DialogStore","useDialogRoot","React","_jsx","IsDrawerContext","DialogRootContext","AlertDialog","AlertDialogPrimitive.Root","AlertDialogTrigger","AlertDialogPrimitive.Trigger","AlertDialogPortal","AlertDialogPrimitive.Portal","AlertDialogOverlay","jsx","AlertDialogPrimitive.Backdrop","cn","AlertDialogContent","AlertDialogPrimitive.Popup","AlertDialogHeader","AlertDialogFooter","AlertDialogMedia","AlertDialogTitle","AlertDialogPrimitive.Title","AlertDialogDescription","AlertDialogPrimitive.Description","AlertDialogAction","Button","AlertDialogCancel","AlertDialogPrimitive.Close","ShadcnAlertDialog","ShadcnAlertDialogAction","ShadcnAlertDialogCancel","ShadcnAlertDialogContent","ShadcnAlertDialogDescription","ShadcnAlertDialogFooter","ShadcnAlertDialogHeader","ShadcnAlertDialogMedia","ShadcnAlertDialogOverlay","ShadcnAlertDialogPortal","ShadcnAlertDialogTitle","ShadcnAlertDialogTrigger"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,eAAe,CAAC,KAAK,EAAE;AACvC,EAAE,MAAM;AACR,IAAI,QAAQ;AACZ,IAAI,IAAI,EAAE,QAAQ;AAClB,IAAI,WAAW,GAAG,KAAK;AACvB,IAAI,YAAY;AAChB,IAAI,oBAAoB;AACxB,IAAI,UAAU;AACd,IAAI,MAAM;AACV,IAAI,SAAS,EAAE,aAAa;AAC5B,IAAI,gBAAgB,EAAE,oBAAoB,GAAG;AAC7C,GAAG,GAAG,KAAK;AACX,EAAE,MAAM,uBAAuB,GAAGA,kCAAoB,CAAC,IAAI,CAAC;AAC5D,EAAE,MAAM,MAAM,GAAG,OAAO,CAAC,uBAAuB,CAAC;AACjD,EAAE,MAAM,KAAK,GAAGC,yBAAW,CAAC,QAAQ,CAAC,MAAM,EAAE,KAAK,EAAE;AACpD,IAAI,IAAI,EAAE,WAAW;AACrB,IAAI,QAAQ;AACZ,IAAI,e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ACA,GAAG;AACL,CAAA,qBACEpB,cAAA;AAAA,EAACqB,mBAAA;AAAA,EAAA;AAAA,IACC,SAAA,EAAWnB,QAAA,CAAG,eAAA,EAAiB,SAAS,CAAA;AAAA,IACvC,GAAG;AAAA;AACN;AAGF,MAAM,oBAAoB,CACxB,KAAA,qBACGF,cAAA,CAACsB,mBAAA,EAAA,EAAyB,GAAG,KAAA,EAAO;AAEzC,MAAM,mBAAmB,CACvB,KAAA,qBACGtB,cAAA,CAACuB,kBAAA,EAAA,EAAwB,GAAG,KAAA,EAAO;AAExC,MAAM,qBAAqB,CACzB,KAAA,qBACGvB,cAAA,CAACwB,oBAAA,EAAA,EAA0B,GAAG,KAAA,EAAO;AAE1C,MAAM,oBAAoB,CACxB,KAAA,qBACGxB,cAAA,CAACyB,mBAAA,EAAA,EAAyB,GAAG,KAAA,EAAO;AAEzC,MAAM,mBAAmB,CACvB,KAAA,qBACGzB,cAAA,CAAC0B,kBAAA,EAAA,EAAwB,GAAG,KAAA,EAAO;AAExC,MAAM,qBAAqB,CACzB,KAAA,qBACG1B,cAAA,CAAC2B,oBAAA,EAAA,EAA0B,GAAG,KAAA,EAAO;;;;;;;;;;;;;;;","x_google_ignoreList":[0]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
require('react/jsx-runtime');
|
|
4
4
|
require('react');
|
|
5
5
|
require('../utils-BhM0B89p.js');
|
|
6
|
-
var primitives_Combobox = require('../Combobox-
|
|
6
|
+
var primitives_Combobox = require('../Combobox-PAGcNUr6.js');
|
|
7
7
|
require('../button-CSBhDSDJ.js');
|
|
8
8
|
require('../index-vioSzJOw.js');
|
|
9
9
|
require('../index-DuNgWCXZ.js');
|
|
@@ -13,8 +13,8 @@ require('../input-BVxqXG2C.js');
|
|
|
13
13
|
require('../textarea-Cq6pBK7q.js');
|
|
14
14
|
require('../chevron-down-CPsWSS51.js');
|
|
15
15
|
require('../createLucideIcon-D0tRgV6l.js');
|
|
16
|
-
require('../check-BQgcDXys.js');
|
|
17
16
|
require('../x-Brw3FJst.js');
|
|
17
|
+
require('../check-BQgcDXys.js');
|
|
18
18
|
require('../useOpenInteractionType-D4z6FTrA.js');
|
|
19
19
|
require('../floating-ui.utils.dom-BGEmL7pd.js');
|
|
20
20
|
require('react-dom');
|
|
@@ -15,7 +15,7 @@ var primitives_Carousel = require('./Carousel.js');
|
|
|
15
15
|
var primitives_Chart = require('./Chart.js');
|
|
16
16
|
var primitives_Checkbox = require('./Checkbox.js');
|
|
17
17
|
var primitives_Collapsible = require('./Collapsible.js');
|
|
18
|
-
var primitives_Combobox = require('../Combobox-
|
|
18
|
+
var primitives_Combobox = require('../Combobox-PAGcNUr6.js');
|
|
19
19
|
var primitives_Command = require('./Command.js');
|
|
20
20
|
var primitives_ContextMenu = require('./ContextMenu.js');
|
|
21
21
|
var primitives_Dialog = require('./Dialog.js');
|
|
@@ -5,6 +5,8 @@ export type { DropdownPassthroughProps };
|
|
|
5
5
|
export interface MultiSelectComboboxProps {
|
|
6
6
|
name?: string;
|
|
7
7
|
id: string;
|
|
8
|
+
/** ID of the field label, used to label the trigger in content-search mode. */
|
|
9
|
+
labelId?: string;
|
|
8
10
|
effectiveItems?: string[] | {
|
|
9
11
|
label: string;
|
|
10
12
|
items: string[];
|
|
@@ -12,6 +14,10 @@ export interface MultiSelectComboboxProps {
|
|
|
12
14
|
labelForValue: (val: string) => string;
|
|
13
15
|
renderOption: (val: string) => React.ReactNode;
|
|
14
16
|
isSearchable: boolean;
|
|
17
|
+
/** Whether search happens in the control or inside the dropdown. */
|
|
18
|
+
searchPosition: "trigger" | "content";
|
|
19
|
+
/** Placeholder for the in-dropdown search field. */
|
|
20
|
+
searchPlaceholder: string;
|
|
15
21
|
isAsync: boolean;
|
|
16
22
|
isCreatable: boolean;
|
|
17
23
|
creatableFilter: (v: string, q: string, fn?: (v: string) => string) => boolean;
|
|
@@ -1,7 +1,25 @@
|
|
|
1
1
|
interface SelectAnchorProps {
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Render the anchor as a `Combobox.Trigger` instead of a plain wrapper. Used
|
|
4
|
+
* when the control itself is not a search input — either because search is
|
|
5
|
+
* off, or because the search field lives inside the dropdown. Base UI then
|
|
6
|
+
* treats this element as the combobox: it gets `role="combobox"`,
|
|
7
|
+
* `tabIndex=0` and the expanded/haspopup state.
|
|
8
|
+
*/
|
|
9
|
+
renderAsTrigger: boolean;
|
|
3
10
|
className?: string;
|
|
4
11
|
dataTestId?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Accessibility props applied only when the trigger, rather than a hidden
|
|
14
|
+
* input, is the form control (`searchPosition="content"`).
|
|
15
|
+
*/
|
|
16
|
+
triggerFieldProps?: {
|
|
17
|
+
id?: string;
|
|
18
|
+
"aria-labelledby"?: string;
|
|
19
|
+
"aria-describedby"?: string;
|
|
20
|
+
"aria-required"?: boolean;
|
|
21
|
+
"aria-invalid"?: boolean;
|
|
22
|
+
};
|
|
5
23
|
children: React.ReactNode;
|
|
6
24
|
}
|
|
7
25
|
export declare const SelectAnchor: import("react").ForwardRefExoticComponent<SelectAnchorProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -7,6 +7,8 @@ export interface SelectComboboxProps {
|
|
|
7
7
|
name?: string;
|
|
8
8
|
/** ID for the combobox input, forwarded from the field wrapper. */
|
|
9
9
|
id: string;
|
|
10
|
+
/** ID of the field label, used to label the trigger in content-search mode. */
|
|
11
|
+
labelId?: string;
|
|
10
12
|
/** Base-UI items array for filtering (derived from options). */
|
|
11
13
|
effectiveItems?: string[] | {
|
|
12
14
|
label: string;
|
|
@@ -20,6 +22,12 @@ export interface SelectComboboxProps {
|
|
|
20
22
|
renderTrigger: (val: string) => React.ReactNode;
|
|
21
23
|
/** Whether the search input is visible. */
|
|
22
24
|
isSearchable: boolean;
|
|
25
|
+
/** Whether search happens in the control or inside the dropdown. */
|
|
26
|
+
searchPosition: "trigger" | "content";
|
|
27
|
+
/** Placeholder for the in-dropdown search field. */
|
|
28
|
+
searchPlaceholder: string;
|
|
29
|
+
/** The current search query. Empty unless the user is typing. */
|
|
30
|
+
inputValue: string;
|
|
23
31
|
/** Whether options are loaded asynchronously. */
|
|
24
32
|
isAsync: boolean;
|
|
25
33
|
/** Whether new options can be created by typing. */
|
|
@@ -36,8 +44,10 @@ export interface SelectComboboxProps {
|
|
|
36
44
|
currentValue: string;
|
|
37
45
|
/** Called by the combobox when the selected value changes. */
|
|
38
46
|
handleValueChange: (next: string | null) => void;
|
|
39
|
-
/** Called when the search input value changes
|
|
40
|
-
handleInputValueChange: (value: string
|
|
47
|
+
/** Called by the combobox when the search input value changes. */
|
|
48
|
+
handleInputValueChange: (value: string, details?: {
|
|
49
|
+
reason?: string;
|
|
50
|
+
}) => void;
|
|
41
51
|
/** Called when the clear button is clicked. */
|
|
42
52
|
handleClear: () => void;
|
|
43
53
|
/** Callback when the dropdown opens or closes. */
|
|
@@ -7,12 +7,18 @@ interface SelectFieldWrapperProps {
|
|
|
7
7
|
helpText: React.ReactNode;
|
|
8
8
|
errorId: string;
|
|
9
9
|
helpTextId: string;
|
|
10
|
+
labelId?: string;
|
|
10
11
|
isDisabled: boolean;
|
|
11
12
|
required: boolean;
|
|
12
13
|
testIdPrefix?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Focus the element with `id` when the label is clicked. Needed when the
|
|
16
|
+
* control is the combobox trigger (a `div`), which `htmlFor` cannot target.
|
|
17
|
+
*/
|
|
18
|
+
focusTargetOnLabelClick?: boolean;
|
|
13
19
|
labelProps?: Omit<React.ComponentProps<typeof FieldLabel>, "htmlFor" | "children">;
|
|
14
20
|
className?: string;
|
|
15
21
|
children: React.ReactNode;
|
|
16
22
|
}
|
|
17
|
-
export declare function SelectFieldWrapper({ id, label, error, helpText, errorId, helpTextId, isDisabled, required, testIdPrefix, labelProps, className, children, }: SelectFieldWrapperProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare function SelectFieldWrapper({ id, label, error, helpText, errorId, helpTextId, labelId, isDisabled, required, testIdPrefix, focusTargetOnLabelClick, labelProps, className, children, }: SelectFieldWrapperProps): import("react/jsx-runtime").JSX.Element;
|
|
18
24
|
export {};
|
|
@@ -24,7 +24,9 @@ interface UseCreatableItemsReturn {
|
|
|
24
24
|
items: string[];
|
|
25
25
|
}[] | undefined;
|
|
26
26
|
creatableFilter: (itemValue: string, query: string, itemToString?: (v: string) => string) => boolean;
|
|
27
|
-
handleInputValueChange: (value: string
|
|
27
|
+
handleInputValueChange: (value: string, details?: {
|
|
28
|
+
reason?: string;
|
|
29
|
+
}) => void;
|
|
28
30
|
handleValueChange: (next: string[] | null) => void;
|
|
29
31
|
}
|
|
30
32
|
export declare function useCreatableItems({ isCreatable, isGrouped, flatOptions, selectedValues, baseUiItems, onCreateOption, onChange, onAsyncInputChange, children, }: UseCreatableItemsConfig): UseCreatableItemsReturn;
|
|
@@ -4,6 +4,7 @@ export declare function useMultiSelectState(props: MultiSelectProps): {
|
|
|
4
4
|
id: string;
|
|
5
5
|
errorId: string;
|
|
6
6
|
helpTextId: string;
|
|
7
|
+
labelId: string;
|
|
7
8
|
sizeConfig: {
|
|
8
9
|
chips: string;
|
|
9
10
|
input: string;
|
|
@@ -12,12 +13,17 @@ export declare function useMultiSelectState(props: MultiSelectProps): {
|
|
|
12
13
|
};
|
|
13
14
|
isControlled: boolean;
|
|
14
15
|
selectedValues: string[];
|
|
16
|
+
isSearchable: boolean;
|
|
17
|
+
searchPosition: "content" | "trigger";
|
|
18
|
+
searchPlaceholder: string;
|
|
15
19
|
effectiveItems: string[] | {
|
|
16
20
|
label: string;
|
|
17
21
|
items: string[];
|
|
18
22
|
}[] | undefined;
|
|
19
23
|
creatableFilter: (itemValue: string, query: string, itemToString?: (v: string) => string) => boolean;
|
|
20
|
-
handleInputValueChange: (value: string
|
|
24
|
+
handleInputValueChange: (value: string, details?: {
|
|
25
|
+
reason?: string;
|
|
26
|
+
}) => void;
|
|
21
27
|
handleValueChange: (next: string[] | null) => void;
|
|
22
28
|
showCreateOption: boolean;
|
|
23
29
|
ariaDescribedBy: string | undefined;
|
|
@@ -7,6 +7,7 @@ export declare function useSelectState(props: SingleSelectProps): {
|
|
|
7
7
|
id: string;
|
|
8
8
|
errorId: string;
|
|
9
9
|
helpTextId: string;
|
|
10
|
+
labelId: string;
|
|
10
11
|
sizeConfig: {
|
|
11
12
|
chips: string;
|
|
12
13
|
input: string;
|
|
@@ -21,7 +22,9 @@ export declare function useSelectState(props: SingleSelectProps): {
|
|
|
21
22
|
}[] | undefined;
|
|
22
23
|
creatableFilter: (itemValue: string, query: string, itemToString?: (v: string) => string) => boolean;
|
|
23
24
|
handleValueChange: (next: string | null) => void;
|
|
24
|
-
handleInputValueChange: (value: string
|
|
25
|
+
handleInputValueChange: (value: string, details?: {
|
|
26
|
+
reason?: string;
|
|
27
|
+
}) => void;
|
|
25
28
|
handleClear: () => void;
|
|
26
29
|
showCreateOption: boolean;
|
|
27
30
|
showClearButton: boolean;
|
|
@@ -37,6 +40,9 @@ export declare function useSelectState(props: SingleSelectProps): {
|
|
|
37
40
|
isDisabled: boolean;
|
|
38
41
|
required: boolean;
|
|
39
42
|
isSearchable: boolean;
|
|
43
|
+
searchPosition: "content" | "trigger";
|
|
44
|
+
searchPlaceholder: string;
|
|
45
|
+
inputValue: string;
|
|
40
46
|
autoHighlight: boolean;
|
|
41
47
|
onOpenChange: ((open: boolean) => void) | undefined;
|
|
42
48
|
isClearable: boolean;
|
|
@@ -48,6 +48,29 @@ interface SelectSharedProps {
|
|
|
48
48
|
* @default true
|
|
49
49
|
*/
|
|
50
50
|
isSearchable?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Where the search field lives.
|
|
53
|
+
* - `"trigger"`: type directly in the control, like react-select.
|
|
54
|
+
* - `"content"`: the control becomes a read-only trigger showing the
|
|
55
|
+
* selection, and the search field renders at the top of the dropdown.
|
|
56
|
+
* The trigger itself is then the form control, so a forwarded `ref`
|
|
57
|
+
* resolves to that element (a focusable `div`, not an `<input>`).
|
|
58
|
+
* @default "trigger"
|
|
59
|
+
*/
|
|
60
|
+
searchPosition?: "trigger" | "content";
|
|
61
|
+
/**
|
|
62
|
+
* Placeholder for the in-dropdown search field.
|
|
63
|
+
* Only used when `searchPosition` is `"content"`.
|
|
64
|
+
* @default "Search..."
|
|
65
|
+
*/
|
|
66
|
+
searchPlaceholder?: string;
|
|
67
|
+
/**
|
|
68
|
+
* Hide the search field when there are fewer than this many options, so
|
|
69
|
+
* short dropdowns stay clean. Ignored when options are async, creatable or
|
|
70
|
+
* lazy-loaded, since the total count isn't known upfront.
|
|
71
|
+
* @default undefined (search is always shown)
|
|
72
|
+
*/
|
|
73
|
+
searchThreshold?: number;
|
|
51
74
|
/** Whether the first matching item is highlighted automatically. @default true */
|
|
52
75
|
autoHighlight?: boolean;
|
|
53
76
|
/** Callback fired when the dropdown opens or closes. */
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import type React from "react";
|
|
1
2
|
import type { SelectOption as MultiSelectOption, SelectOptionBase as MultiSelectOptionBase } from "./types";
|
|
3
|
+
/** Write an element into a callback or object ref, ignoring `null` refs. */
|
|
4
|
+
export declare function assignRef<T>(ref: React.Ref<T> | undefined, element: T | null): void;
|
|
2
5
|
type AccessorFn = (option: any) => string;
|
|
3
6
|
export declare function normalizeOption(option: any, getValue?: AccessorFn, getLabel?: AccessorFn): MultiSelectOptionBase;
|
|
4
7
|
export declare function normalizeOptions(options: MultiSelectOption[] | undefined, getValue?: AccessorFn, getLabel?: AccessorFn): MultiSelectOption[] | undefined;
|
|
@@ -11,6 +14,16 @@ export declare function toBaseUiItems(options: MultiSelectOption[]): string[] |
|
|
|
11
14
|
label: string;
|
|
12
15
|
items: string[];
|
|
13
16
|
}[];
|
|
17
|
+
interface ResolveIsSearchableConfig {
|
|
18
|
+
isSearchable: boolean;
|
|
19
|
+
searchThreshold?: number;
|
|
20
|
+
optionCount: number;
|
|
21
|
+
/** Async, creatable and lazy-loaded lists grow after mount, so `optionCount`
|
|
22
|
+
* isn't the real list size and the threshold must not apply. */
|
|
23
|
+
isCountKnown: boolean;
|
|
24
|
+
}
|
|
25
|
+
/** Apply `searchThreshold` on top of `isSearchable`. */
|
|
26
|
+
export declare function resolveIsSearchable({ isSearchable, searchThreshold, optionCount, isCountKnown, }: ResolveIsSearchableConfig): boolean;
|
|
14
27
|
/** Build the effective items array, appending a "Create" entry when needed. */
|
|
15
28
|
export declare function computeEffectiveItems(children: unknown, baseUiItems: string[] | {
|
|
16
29
|
label: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { S as Select } from '../Select-
|
|
1
|
+
export { S as Select } from '../Select-ZWR0HFCa.js';
|
|
2
2
|
import 'react/jsx-runtime';
|
|
3
3
|
import 'react';
|
|
4
4
|
import '../fieldIds-VpluAAMl.js';
|
|
5
5
|
import '../hyphenize-TRhMI0tl.js';
|
|
6
|
-
import '../SelectFieldWrapper-
|
|
6
|
+
import '../SelectFieldWrapper-D370CD4o.js';
|
|
7
7
|
import '../primitives/Field.js';
|
|
8
8
|
import '../utils-BJnb9o5c.js';
|
|
9
9
|
import '../HelpIcon-xh488VXs.js';
|
|
@@ -42,13 +42,13 @@ import 'react-i18next';
|
|
|
42
42
|
import '../loader-circle-DycHUAWN.js';
|
|
43
43
|
import '../label-YEsizr2c.js';
|
|
44
44
|
import '../separator-ByRsc-y-.js';
|
|
45
|
-
import '../Combobox-
|
|
45
|
+
import '../Combobox-NgubHftk.js';
|
|
46
46
|
import '../input-group-DuITGkyB.js';
|
|
47
47
|
import '../input-CNbQc_tG.js';
|
|
48
48
|
import '../textarea-BZIsQ5UD.js';
|
|
49
49
|
import '../chevron-down-BNi0ntys.js';
|
|
50
|
-
import '../check-Cpkv29p1.js';
|
|
51
50
|
import '../x-_o2T3n6D.js';
|
|
51
|
+
import '../check-Cpkv29p1.js';
|
|
52
52
|
import '../useOpenInteractionType-CVfxIsuz.js';
|
|
53
53
|
import '../index-DZXbzIgC.js';
|
|
54
54
|
import '../index-CSMSzzKM.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { T as TreeSelect } from '../TreeSelect-
|
|
1
|
+
export { T as TreeSelect } from '../TreeSelect-rrTHwY42.js';
|
|
2
2
|
import 'react/jsx-runtime';
|
|
3
3
|
import 'react';
|
|
4
4
|
import '../utils-BJnb9o5c.js';
|
|
@@ -20,7 +20,7 @@ import '../index-BYZaLNq1.js';
|
|
|
20
20
|
import '../index-fV_U4ZJM.js';
|
|
21
21
|
import '../index-yFgkK_AM.js';
|
|
22
22
|
import '../index-Cor698lu.js';
|
|
23
|
-
import '../SelectFieldWrapper-
|
|
23
|
+
import '../SelectFieldWrapper-D370CD4o.js';
|
|
24
24
|
import '../primitives/Field.js';
|
|
25
25
|
import '../HelpIcon-xh488VXs.js';
|
|
26
26
|
import '../primitives/Tooltip.js';
|
package/dist/components/index.js
CHANGED
|
@@ -19,7 +19,7 @@ export { P as Pagination } from '../Pagination-yjG8uCpV.js';
|
|
|
19
19
|
export { P as Popover } from '../Popover-BHGvcdV2.js';
|
|
20
20
|
export { P as Progress } from '../Progress-DbtLbWf8.js';
|
|
21
21
|
export { R as RadioGroup } from '../RadioGroup-CBXByAMW.js';
|
|
22
|
-
export { S as Select } from '../Select-
|
|
22
|
+
export { S as Select } from '../Select-ZWR0HFCa.js';
|
|
23
23
|
export { S as Sheet } from '../Sheet-D1MWtg1q.js';
|
|
24
24
|
export { S as Slider } from '../Slider-CxQdlyHZ.js';
|
|
25
25
|
export { S as Spinner } from '../Spinner-vfggfvEp.js';
|
|
@@ -33,7 +33,7 @@ export { T as Toastr } from '../Toastr-CXqmoXjn.js';
|
|
|
33
33
|
export { T as Tooltip } from '../Tooltip-DWDsgyx7.js';
|
|
34
34
|
export { T as TranslationProvider } from '../TranslationProvider-CtJI6HJ4.js';
|
|
35
35
|
export { T as Tree } from '../Tree-Cb1Zkayi.js';
|
|
36
|
-
export { T as TreeSelect } from '../TreeSelect-
|
|
36
|
+
export { T as TreeSelect } from '../TreeSelect-rrTHwY42.js';
|
|
37
37
|
export { T as Typography, t as typographyVariants } from '../Typography-CmILccNh.js';
|
|
38
38
|
export { f as flattenTreeData, g as getExpandedKeysFromSearch, a as getParentKey } from '../search-B5K8FsJs.js';
|
|
39
39
|
import 'react/jsx-runtime';
|
|
@@ -123,8 +123,8 @@ import '../primitives/Label.js';
|
|
|
123
123
|
import '../primitives/HoverCard.js';
|
|
124
124
|
import '../primitives/Progress.js';
|
|
125
125
|
import '../primitives/RadioGroup.js';
|
|
126
|
-
import '../SelectFieldWrapper-
|
|
127
|
-
import '../Combobox-
|
|
126
|
+
import '../SelectFieldWrapper-D370CD4o.js';
|
|
127
|
+
import '../Combobox-NgubHftk.js';
|
|
128
128
|
import '../primitives/Sheet.js';
|
|
129
129
|
import '../sheet-B9oDGvvX.js';
|
|
130
130
|
import '../primitives/Slider.js';
|
package/dist/formik/Select.js
CHANGED
|
@@ -2,10 +2,10 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
3
|
import { useField, useFormikContext, getIn } from 'formik';
|
|
4
4
|
import { dissoc } from 'ramda';
|
|
5
|
-
import { S as Select } from '../Select-
|
|
5
|
+
import { S as Select } from '../Select-ZWR0HFCa.js';
|
|
6
6
|
import '../fieldIds-VpluAAMl.js';
|
|
7
7
|
import '../hyphenize-TRhMI0tl.js';
|
|
8
|
-
import '../SelectFieldWrapper-
|
|
8
|
+
import '../SelectFieldWrapper-D370CD4o.js';
|
|
9
9
|
import '../primitives/Field.js';
|
|
10
10
|
import '../utils-BJnb9o5c.js';
|
|
11
11
|
import '../HelpIcon-xh488VXs.js';
|
|
@@ -44,13 +44,13 @@ import 'react-i18next';
|
|
|
44
44
|
import '../loader-circle-DycHUAWN.js';
|
|
45
45
|
import '../label-YEsizr2c.js';
|
|
46
46
|
import '../separator-ByRsc-y-.js';
|
|
47
|
-
import '../Combobox-
|
|
47
|
+
import '../Combobox-NgubHftk.js';
|
|
48
48
|
import '../input-group-DuITGkyB.js';
|
|
49
49
|
import '../input-CNbQc_tG.js';
|
|
50
50
|
import '../textarea-BZIsQ5UD.js';
|
|
51
51
|
import '../chevron-down-BNi0ntys.js';
|
|
52
|
-
import '../check-Cpkv29p1.js';
|
|
53
52
|
import '../x-_o2T3n6D.js';
|
|
53
|
+
import '../check-Cpkv29p1.js';
|
|
54
54
|
import '../useOpenInteractionType-CVfxIsuz.js';
|
|
55
55
|
import '../index-DZXbzIgC.js';
|
|
56
56
|
import '../index-CSMSzzKM.js';
|
|
@@ -2,7 +2,7 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
3
|
import { useField, useFormikContext, getIn } from 'formik';
|
|
4
4
|
import { dissoc } from 'ramda';
|
|
5
|
-
import { T as TreeSelect } from '../TreeSelect-
|
|
5
|
+
import { T as TreeSelect } from '../TreeSelect-rrTHwY42.js';
|
|
6
6
|
import '../utils-BJnb9o5c.js';
|
|
7
7
|
import '../primitives/Popover.js';
|
|
8
8
|
import '../index-DNzunGHb.js';
|
|
@@ -22,7 +22,7 @@ import '../index-BYZaLNq1.js';
|
|
|
22
22
|
import '../index-fV_U4ZJM.js';
|
|
23
23
|
import '../index-yFgkK_AM.js';
|
|
24
24
|
import '../index-Cor698lu.js';
|
|
25
|
-
import '../SelectFieldWrapper-
|
|
25
|
+
import '../SelectFieldWrapper-D370CD4o.js';
|
|
26
26
|
import '../primitives/Field.js';
|
|
27
27
|
import '../HelpIcon-xh488VXs.js';
|
|
28
28
|
import '../primitives/Tooltip.js';
|
package/dist/formik/index.js
CHANGED
|
@@ -63,12 +63,12 @@ import '../hyphenize-TRhMI0tl.js';
|
|
|
63
63
|
import '../withIconSize-BonoFXeH.js';
|
|
64
64
|
import '../Textarea-CUe09-sr.js';
|
|
65
65
|
import '../primitives/Textarea.js';
|
|
66
|
-
import '../Select-
|
|
67
|
-
import '../SelectFieldWrapper-
|
|
68
|
-
import '../Combobox-
|
|
66
|
+
import '../Select-ZWR0HFCa.js';
|
|
67
|
+
import '../SelectFieldWrapper-D370CD4o.js';
|
|
68
|
+
import '../Combobox-NgubHftk.js';
|
|
69
69
|
import '../chevron-down-BNi0ntys.js';
|
|
70
|
-
import '../check-Cpkv29p1.js';
|
|
71
70
|
import '../x-_o2T3n6D.js';
|
|
71
|
+
import '../check-Cpkv29p1.js';
|
|
72
72
|
import '../useOpenInteractionType-CVfxIsuz.js';
|
|
73
73
|
import '../index-DZXbzIgC.js';
|
|
74
74
|
import '../index-CSMSzzKM.js';
|
|
@@ -87,7 +87,7 @@ import '../primitives/Switch.js';
|
|
|
87
87
|
import '../Slider-CxQdlyHZ.js';
|
|
88
88
|
import '../primitives/Slider.js';
|
|
89
89
|
import '../index-BfAAoDv6.js';
|
|
90
|
-
import '../TreeSelect-
|
|
90
|
+
import '../TreeSelect-rrTHwY42.js';
|
|
91
91
|
import '../primitives/Popover.js';
|
|
92
92
|
import '../index-Jr4soqx3.js';
|
|
93
93
|
import '../Tree-Cb1Zkayi.js';
|
package/dist/index.js
CHANGED
|
@@ -25,7 +25,7 @@ export { P as Pagination } from './Pagination-yjG8uCpV.js';
|
|
|
25
25
|
export { P as Popover } from './Popover-BHGvcdV2.js';
|
|
26
26
|
export { P as Progress } from './Progress-DbtLbWf8.js';
|
|
27
27
|
export { R as RadioGroup } from './RadioGroup-CBXByAMW.js';
|
|
28
|
-
export { S as Select } from './Select-
|
|
28
|
+
export { S as Select } from './Select-ZWR0HFCa.js';
|
|
29
29
|
export { S as Sheet } from './Sheet-D1MWtg1q.js';
|
|
30
30
|
export { S as Slider } from './Slider-CxQdlyHZ.js';
|
|
31
31
|
export { S as Spinner } from './Spinner-vfggfvEp.js';
|
|
@@ -37,7 +37,7 @@ export { T as TimePicker } from './TimePicker-BixF9wdU.js';
|
|
|
37
37
|
export { T as Toastr } from './Toastr-CXqmoXjn.js';
|
|
38
38
|
export { T as Tooltip } from './Tooltip-DWDsgyx7.js';
|
|
39
39
|
export { T as Tree } from './Tree-Cb1Zkayi.js';
|
|
40
|
-
export { T as TreeSelect } from './TreeSelect-
|
|
40
|
+
export { T as TreeSelect } from './TreeSelect-rrTHwY42.js';
|
|
41
41
|
export { T as Typography, t as typographyVariants } from './Typography-CmILccNh.js';
|
|
42
42
|
import 'react/jsx-runtime';
|
|
43
43
|
import 'react';
|
|
@@ -128,8 +128,8 @@ import './primitives/Label.js';
|
|
|
128
128
|
import './primitives/HoverCard.js';
|
|
129
129
|
import './primitives/Progress.js';
|
|
130
130
|
import './primitives/RadioGroup.js';
|
|
131
|
-
import './SelectFieldWrapper-
|
|
132
|
-
import './Combobox-
|
|
131
|
+
import './SelectFieldWrapper-D370CD4o.js';
|
|
132
|
+
import './Combobox-NgubHftk.js';
|
|
133
133
|
import './primitives/Sheet.js';
|
|
134
134
|
import './sheet-B9oDGvvX.js';
|
|
135
135
|
import './primitives/Slider.js';
|