@donotdev/components 0.0.12 → 0.0.13
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/advanced/Bento/Bento.d.ts +0 -9
- package/dist/advanced/Bento/Bento.d.ts.map +1 -1
- package/dist/advanced/Bento/Bento.js +10 -0
- package/dist/advanced/Code/Code.d.ts +1 -9
- package/dist/advanced/Code/Code.d.ts.map +1 -1
- package/dist/atomic/Accordion/index.d.ts.map +1 -1
- package/dist/atomic/Accordion/index.js +1 -1
- package/dist/atomic/ActionButton/index.d.ts.map +1 -1
- package/dist/atomic/AlertDialog/AlertDialogPrimitive.d.ts.map +1 -1
- package/dist/atomic/AlertDialog/index.js +2 -2
- package/dist/atomic/Avatar/AvatarPrimitive.d.ts +1 -1
- package/dist/atomic/Avatar/AvatarPrimitive.d.ts.map +1 -1
- package/dist/atomic/Avatar/AvatarPrimitive.js +0 -1
- package/dist/atomic/Blockquote/index.d.ts +1 -9
- package/dist/atomic/Blockquote/index.d.ts.map +1 -1
- package/dist/atomic/Button/index.d.ts +18 -1
- package/dist/atomic/Button/index.d.ts.map +1 -1
- package/dist/atomic/Button/index.js +15 -5
- package/dist/atomic/Calendar/index.d.ts.map +1 -1
- package/dist/atomic/Calendar/index.js +3 -2
- package/dist/atomic/Checkbox/CheckboxPrimitive.d.ts +1 -1
- package/dist/atomic/Checkbox/CheckboxPrimitive.d.ts.map +1 -1
- package/dist/atomic/Checkbox/CheckboxPrimitive.js +0 -1
- package/dist/atomic/Checkbox/index.d.ts +1 -1
- package/dist/atomic/Checkbox/index.d.ts.map +1 -1
- package/dist/atomic/Checkbox/index.js +2 -2
- package/dist/atomic/Collapsible/CollapsiblePrimitive.d.ts +1 -1
- package/dist/atomic/Collapsible/CollapsiblePrimitive.d.ts.map +1 -1
- package/dist/atomic/Collapsible/CollapsiblePrimitive.js +0 -1
- package/dist/atomic/Collapsible/index.d.ts.map +1 -1
- package/dist/atomic/Collapsible/index.js +2 -2
- package/dist/atomic/Combobox/index.d.ts.map +1 -1
- package/dist/atomic/Combobox/index.js +4 -4
- package/dist/atomic/CommandDialog/index.d.ts.map +1 -1
- package/dist/atomic/CommandDialog/index.js +1 -1
- package/dist/atomic/ContextMenu/ContextMenuPrimitive.d.ts +1 -1
- package/dist/atomic/ContextMenu/ContextMenuPrimitive.d.ts.map +1 -1
- package/dist/atomic/ContextMenu/ContextMenuPrimitive.js +0 -1
- package/dist/atomic/ContextMenu/index.d.ts.map +1 -1
- package/dist/atomic/Dialog/DialogPrimitive.d.ts.map +1 -1
- package/dist/atomic/Dialog/index.d.ts.map +1 -1
- package/dist/atomic/Dialog/index.js +1 -1
- package/dist/atomic/DropdownMenu/index.d.ts.map +1 -1
- package/dist/atomic/DropdownMenu/index.js +17 -3
- package/dist/atomic/DualCard/index.d.ts +10 -2
- package/dist/atomic/DualCard/index.d.ts.map +1 -1
- package/dist/atomic/DualCard/index.js +3 -3
- package/dist/atomic/FeatureFallback/index.js +1 -1
- package/dist/atomic/HoverCard/HoverCardPrimitive.d.ts +1 -1
- package/dist/atomic/HoverCard/HoverCardPrimitive.d.ts.map +1 -1
- package/dist/atomic/HoverCard/HoverCardPrimitive.js +0 -1
- package/dist/atomic/HoverCard/index.js +1 -1
- package/dist/atomic/Input/index.d.ts.map +1 -1
- package/dist/atomic/Input/index.js +8 -1
- package/dist/atomic/Label/FloatingLabel.d.ts +24 -10
- package/dist/atomic/Label/FloatingLabel.d.ts.map +1 -1
- package/dist/atomic/Label/FloatingLabel.js +14 -14
- package/dist/atomic/Label/index.d.ts +1 -1
- package/dist/atomic/Label/index.d.ts.map +1 -1
- package/dist/atomic/Label/index.js +1 -1
- package/dist/atomic/List/index.d.ts +8 -0
- package/dist/atomic/List/index.d.ts.map +1 -1
- package/dist/atomic/List/index.js +1 -1
- package/dist/atomic/NavigationMenu/NavigationMenuPrimitive.d.ts +1 -1
- package/dist/atomic/NavigationMenu/NavigationMenuPrimitive.d.ts.map +1 -1
- package/dist/atomic/NavigationMenu/NavigationMenuPrimitive.js +0 -1
- package/dist/atomic/NavigationMenu/index.d.ts +1 -1
- package/dist/atomic/NavigationMenu/index.d.ts.map +1 -1
- package/dist/atomic/NavigationMenu/index.js +10 -1
- package/dist/atomic/Pagination/index.d.ts +1 -1
- package/dist/atomic/Pagination/index.d.ts.map +1 -1
- package/dist/atomic/PasswordInput/index.d.ts +1 -1
- package/dist/atomic/PasswordInput/index.d.ts.map +1 -1
- package/dist/atomic/PasswordInput/index.js +5 -1
- package/dist/atomic/Popover/index.d.ts +0 -8
- package/dist/atomic/Popover/index.d.ts.map +1 -1
- package/dist/atomic/Popover/index.js +1 -1
- package/dist/atomic/PortalButton/index.d.ts +8 -0
- package/dist/atomic/PortalButton/index.d.ts.map +1 -1
- package/dist/atomic/PortalButton/index.js +1 -1
- package/dist/atomic/Progress/ProgressPrimitive.d.ts +1 -1
- package/dist/atomic/Progress/ProgressPrimitive.d.ts.map +1 -1
- package/dist/atomic/Progress/ProgressPrimitive.js +0 -1
- package/dist/atomic/Progress/index.d.ts +8 -0
- package/dist/atomic/Progress/index.d.ts.map +1 -1
- package/dist/atomic/Progress/index.js +1 -1
- package/dist/atomic/RadioGroup/index.d.ts +0 -9
- package/dist/atomic/RadioGroup/index.d.ts.map +1 -1
- package/dist/atomic/RadioGroup/index.js +2 -2
- package/dist/atomic/ScrollArea/ScrollAreaPrimitive.d.ts +1 -1
- package/dist/atomic/ScrollArea/ScrollAreaPrimitive.d.ts.map +1 -1
- package/dist/atomic/ScrollArea/ScrollAreaPrimitive.js +0 -1
- package/dist/atomic/Section/index.d.ts +0 -32
- package/dist/atomic/Section/index.d.ts.map +1 -1
- package/dist/atomic/Section/index.js +4 -4
- package/dist/atomic/Select/SelectPrimitive.d.ts +1 -1
- package/dist/atomic/Select/SelectPrimitive.d.ts.map +1 -1
- package/dist/atomic/Select/SelectPrimitive.js +0 -1
- package/dist/atomic/Select/index.d.ts.map +1 -1
- package/dist/atomic/Select/index.js +2 -1
- package/dist/atomic/Separator/SeparatorPrimitive.d.ts +1 -1
- package/dist/atomic/Separator/SeparatorPrimitive.d.ts.map +1 -1
- package/dist/atomic/Separator/SeparatorPrimitive.js +0 -1
- package/dist/atomic/Separator/index.d.ts +1 -1
- package/dist/atomic/Separator/index.d.ts.map +1 -1
- package/dist/atomic/Separator/index.js +0 -1
- package/dist/atomic/Sheet/index.d.ts +3 -1
- package/dist/atomic/Sheet/index.d.ts.map +1 -1
- package/dist/atomic/Sheet/index.js +3 -3
- package/dist/atomic/Slider/SliderPrimitive.d.ts +1 -1
- package/dist/atomic/Slider/SliderPrimitive.d.ts.map +1 -1
- package/dist/atomic/Slider/SliderPrimitive.js +0 -1
- package/dist/atomic/Slider/index.d.ts +3 -2
- package/dist/atomic/Slider/index.d.ts.map +1 -1
- package/dist/atomic/Slider/index.js +2 -3
- package/dist/atomic/Slot/index.d.ts.map +1 -1
- package/dist/atomic/Stepper/index.js +1 -1
- package/dist/atomic/Switch/SwitchPrimitive.d.ts +1 -1
- package/dist/atomic/Switch/SwitchPrimitive.d.ts.map +1 -1
- package/dist/atomic/Switch/SwitchPrimitive.js +0 -1
- package/dist/atomic/Switch/index.d.ts +3 -2
- package/dist/atomic/Switch/index.d.ts.map +1 -1
- package/dist/atomic/Switch/index.js +2 -3
- package/dist/atomic/Table/index.d.ts +3 -1
- package/dist/atomic/Table/index.d.ts.map +1 -1
- package/dist/atomic/Table/index.js +13 -3
- package/dist/atomic/Tabs/TabsPrimitive.d.ts +1 -1
- package/dist/atomic/Tabs/TabsPrimitive.d.ts.map +1 -1
- package/dist/atomic/Tabs/TabsPrimitive.js +0 -1
- package/dist/atomic/Tabs/index.js +1 -1
- package/dist/atomic/Tag/index.d.ts +8 -0
- package/dist/atomic/Tag/index.d.ts.map +1 -1
- package/dist/atomic/Tag/index.js +1 -1
- package/dist/atomic/Text/index.js +1 -1
- package/dist/atomic/Textarea/index.d.ts.map +1 -1
- package/dist/atomic/ToggleGroup/ToggleGroupPrimitive.d.ts +1 -1
- package/dist/atomic/ToggleGroup/ToggleGroupPrimitive.d.ts.map +1 -1
- package/dist/atomic/Tooltip/TooltipPrimitive.d.ts +1 -1
- package/dist/atomic/Tooltip/TooltipPrimitive.d.ts.map +1 -1
- package/dist/atomic/Tooltip/TooltipPrimitive.js +0 -1
- package/dist/atomic/Tooltip/index.d.ts +6 -12
- package/dist/atomic/Tooltip/index.d.ts.map +1 -1
- package/dist/atomic/Tooltip/index.js +13 -23
- package/dist/atomic/VideoPlayer/index.js +1 -1
- package/dist/atomic/VisuallyHidden/VisuallyHiddenPrimitive.d.ts.map +1 -1
- package/dist/hooks/useToast.d.ts +1 -25
- package/dist/hooks/useToast.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/styles/index.css +328 -48
- package/dist/utils/variants.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview Bento Grid Component
|
|
3
|
-
* @description Asymmetric grid layout for modern "bento box" style displays.
|
|
4
|
-
* Supports variable cell spanning for visual hierarchy.
|
|
5
|
-
*
|
|
6
|
-
* @version 0.0.1
|
|
7
|
-
* @since 0.0.1
|
|
8
|
-
* @author AMBROISE PARK Consulting
|
|
9
|
-
*/
|
|
10
1
|
import type { ReactNode, Ref } from 'react';
|
|
11
2
|
/**
|
|
12
3
|
* Individual cell data for the Bento grid
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Bento.d.ts","sourceRoot":"","sources":["../../../src/advanced/Bento/Bento.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Bento.d.ts","sourceRoot":"","sources":["../../../src/advanced/Bento/Bento.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,SAAS,EAAiB,GAAG,EAAE,MAAM,OAAO,CAAC;AAE3D;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,qCAAqC;IACrC,EAAE,EAAE,MAAM,CAAC;IAC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+
/**
|
|
4
|
+
* @fileoverview Bento Grid Component
|
|
5
|
+
* @description Asymmetric grid layout for modern "bento box" style displays.
|
|
6
|
+
* Supports variable cell spanning for visual hierarchy.
|
|
7
|
+
*
|
|
8
|
+
* @version 0.0.1
|
|
9
|
+
* @since 0.0.1
|
|
10
|
+
* @author AMBROISE PARK Consulting
|
|
11
|
+
*/
|
|
2
12
|
import { cn } from '../../utils/helpers';
|
|
3
13
|
/**
|
|
4
14
|
* Bento Grid Component
|
|
@@ -1,13 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview Code Component
|
|
3
|
-
* @description Code component with lazy loading built-in. Features Shiki syntax highlighting, lazy-loaded language support, line numbers, copy to clipboard, theme-aware styling, and SSR/CSR compatibility.
|
|
4
|
-
*
|
|
5
|
-
* @version 0.0.1
|
|
6
|
-
* @since 0.0.1
|
|
7
|
-
* @author AMBROISE PARK Consulting
|
|
8
|
-
*/
|
|
9
|
-
import { type ComponentType } from 'react';
|
|
10
1
|
import type { CodeProps } from './CodeContent';
|
|
2
|
+
import type { ComponentType } from 'react';
|
|
11
3
|
export type { CodeProps };
|
|
12
4
|
/**
|
|
13
5
|
* Code Component with lazy loading built-in
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Code.d.ts","sourceRoot":"","sources":["../../../src/advanced/Code/Code.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Code.d.ts","sourceRoot":"","sources":["../../../src/advanced/Code/Code.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,YAAY,EAAE,SAAS,EAAE,CAAC;AAI1B;;;;;;;;;;;;;GAaG;AACH,QAAA,MAAM,IAAI,EAAE,aAAa,CAAC,SAAS,CA0BlC,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atomic/Accordion/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atomic/Accordion/index.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,iBAAiB;IAChC,8CAA8C;IAC9C,KAAK,EAAE,MAAM,CAAC;IACd,wDAAwD;IACxD,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,gDAAgD;IAChD,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7B;AAED,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAC;IAC7B;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,kCAAkC;IAClC,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACjC,qCAAqC;IACrC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC1B,kCAAkC;IAClC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,IAAI,CAAC;IACnD,kCAAkC;IAClC,KAAK,EAAE,iBAAiB,EAAE,CAAC;IAC3B,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,QAAA,MAAM,SAAS,GAAI,8EAQhB,cAAc,4CA0DhB,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -8,9 +8,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
8
8
|
* @since 0.0.1
|
|
9
9
|
* @author AMBROISE PARK Consulting
|
|
10
10
|
*/
|
|
11
|
+
import { ChevronDown } from 'lucide-react';
|
|
11
12
|
import AccordionPrimitive, { AccordionItemPrimitive, AccordionTriggerPrimitive, AccordionContentPrimitive, } from './AccordionPrimitive';
|
|
12
13
|
import { cn } from '../../utils/helpers';
|
|
13
|
-
import { ChevronDown } from 'lucide-react';
|
|
14
14
|
/**
|
|
15
15
|
* A vertically stacked set of interactive headings that each reveal a section of content.
|
|
16
16
|
* Built on Radix UI Accordion.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atomic/ActionButton/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atomic/ActionButton/index.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,iBAAiB,CAAC,CAAC,GAAG,OAAO,CAAE,SAAQ,IAAI,CAC1D,WAAW,EACX,SAAS,GAAG,SAAS,CACtB;IACC,+CAA+C;IAC/C,MAAM,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,CAAC;IACzB,wCAAwC;IACxC,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,IAAI,CAAC;IAChC,8EAA8E;IAC9E,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACvC,qDAAqD;IACrD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gEAAgE;IAChE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wCAAwC;IACxC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oCAAoC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,qBAAqB;IACrB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,iBAAS,YAAY,CAAC,CAAC,GAAG,OAAO,EAAE,EACjC,MAAM,EACN,SAAS,EACT,aAAa,EACb,WAAW,EACX,WAAW,EACX,YAAwB,EACxB,QAAgB,EAChB,QAAQ,EACR,GAAG,WAAW,EACf,EAAE,iBAAiB,CAAC,CAAC,CAAC,2CAgEtB;AAED,eAAe,YAAY,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlertDialogPrimitive.d.ts","sourceRoot":"","sources":["../../../src/atomic/AlertDialog/AlertDialogPrimitive.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,gBAAgB,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"AlertDialogPrimitive.d.ts","sourceRoot":"","sources":["../../../src/atomic/AlertDialog/AlertDialogPrimitive.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,gBAAgB,MAAM,8BAA8B,CAAC;AAIjE,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5D,QAAA,MAAM,oBAAoB,uDAAwB,CAAC;AACnD,QAAA,MAAM,2BAA2B,wIAA2B,CAAC;AAC7D,QAAA,MAAM,0BAA0B,6DAA0B,CAAC;AAE3D,QAAA,MAAM,2BAA2B,GAAI,yBAGlC,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,4CAEjD,CAAC;AAEF,QAAA,MAAM,2BAA2B,GAAI,2CAIlC,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,GAAG;IACnD,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CAC3C,4CAMA,CAAC;AAEF,QAAA,MAAM,0BAA0B,GAAI,yBAGjC,cAAc,CAAC,cAAc,CAAC,4CAEhC,CAAC;AAEF,QAAA,MAAM,0BAA0B,GAAI,yBAGjC,cAAc,CAAC,cAAc,CAAC,4CAEhC,CAAC;AAEF,QAAA,MAAM,yBAAyB,GAAI,yBAGhC,cAAc,CAAC,OAAO,gBAAgB,CAAC,KAAK,CAAC,4CAE/C,CAAC;AAEF,QAAA,MAAM,+BAA+B,GAAI,yBAGtC,cAAc,CAAC,OAAO,gBAAgB,CAAC,WAAW,CAAC,4CAErD,CAAC;AAEF,QAAA,MAAM,0BAA0B,GAAI,yBAGjC,cAAc,CAAC,OAAO,gBAAgB,CAAC,MAAM,CAAC,4CAEhD,CAAC;AAEF,QAAA,MAAM,0BAA0B,GAAI,yBAGjC,cAAc,CAAC,OAAO,gBAAgB,CAAC,MAAM,CAAC,4CAEhD,CAAC;AAEF,eAAe,oBAAoB,CAAC;AACpC,OAAO,EACL,0BAA0B,EAC1B,2BAA2B,EAC3B,2BAA2B,EAC3B,2BAA2B,EAC3B,0BAA0B,EAC1B,0BAA0B,EAC1B,yBAAyB,EACzB,+BAA+B,EAC/B,0BAA0B,EAC1B,0BAA0B,GAC3B,CAAC"}
|
|
@@ -8,9 +8,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
8
8
|
* @since 0.0.1
|
|
9
9
|
* @author AMBROISE PARK Consulting
|
|
10
10
|
*/
|
|
11
|
-
import VisuallyHidden from '../VisuallyHidden';
|
|
12
|
-
import Button from '../Button';
|
|
13
11
|
import { cn } from '../../utils/helpers';
|
|
12
|
+
import Button from '../Button';
|
|
13
|
+
import VisuallyHidden from '../VisuallyHidden';
|
|
14
14
|
import AlertDialogPrimitive, { AlertDialogTriggerPrimitive, AlertDialogContentPrimitive as ContentPrimitive, AlertDialogHeaderPrimitive as HeaderPrimitive, AlertDialogFooterPrimitive as FooterPrimitive, AlertDialogTitlePrimitive as TitlePrimitive, AlertDialogDescriptionPrimitive as DescriptionPrimitive, AlertDialogActionPrimitive as ActionPrimitive, AlertDialogCancelPrimitive as CancelPrimitive, AlertDialogOverlayPrimitive as OverlayPrimitive, AlertDialogPortalPrimitive, } from './AlertDialogPrimitive';
|
|
15
15
|
// Wrapper components that apply dndev-* classes
|
|
16
16
|
const AlertDialogOverlay = ({ className, ...props }) => (_jsx(OverlayPrimitive, { className: cn('dndev-alert-dialog-overlay dndev-overlay', className), ...props }));
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @author AMBROISE PARK Consulting
|
|
8
8
|
*/
|
|
9
9
|
import * as RadixAvatar from '@radix-ui/react-avatar';
|
|
10
|
-
import {
|
|
10
|
+
import type { ComponentProps } from 'react';
|
|
11
11
|
declare const AvatarPrimitive: ({ className, ...props }: ComponentProps<typeof RadixAvatar.Root>) => import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
declare const AvatarImagePrimitive: ({ className, ...props }: ComponentProps<typeof RadixAvatar.Image>) => import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
declare const AvatarFallbackPrimitive: ({ className, ...props }: ComponentProps<typeof RadixAvatar.Fallback>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AvatarPrimitive.d.ts","sourceRoot":"","sources":["../../../src/atomic/Avatar/AvatarPrimitive.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,WAAW,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"AvatarPrimitive.d.ts","sourceRoot":"","sources":["../../../src/atomic/Avatar/AvatarPrimitive.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,WAAW,MAAM,wBAAwB,CAAC;AAItD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,QAAA,MAAM,eAAe,GAAI,yBAGtB,cAAc,CAAC,OAAO,WAAW,CAAC,IAAI,CAAC,4CAEzC,CAAC;AAEF,QAAA,MAAM,oBAAoB,GAAI,yBAG3B,cAAc,CAAC,OAAO,WAAW,CAAC,KAAK,CAAC,4CAK1C,CAAC;AAEF,QAAA,MAAM,uBAAuB,GAAI,yBAG9B,cAAc,CAAC,OAAO,WAAW,CAAC,QAAQ,CAAC,4CAK7C,CAAC;AAEF,eAAe,eAAe,CAAC;AAC/B,OAAO,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,CAAC"}
|
|
@@ -9,7 +9,6 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
9
9
|
* @author AMBROISE PARK Consulting
|
|
10
10
|
*/
|
|
11
11
|
import * as RadixAvatar from '@radix-ui/react-avatar';
|
|
12
|
-
import {} from 'react';
|
|
13
12
|
import { cn } from '../../utils/helpers';
|
|
14
13
|
const AvatarPrimitive = ({ className, ...props }) => (_jsx(RadixAvatar.Root, { className: cn('dndev-avatar', className), ...props }));
|
|
15
14
|
const AvatarImagePrimitive = ({ className, ...props }) => (_jsx(RadixAvatar.Image, { className: cn('dndev-avatar-image', className), ...props }));
|
|
@@ -1,12 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* @fileoverview Blockquote component
|
|
3
|
-
* @description Semantic blockquote component for quotes and testimonials
|
|
4
|
-
*
|
|
5
|
-
* @version 0.0.1
|
|
6
|
-
* @since 0.0.1
|
|
7
|
-
* @author AMBROISE PARK Consulting
|
|
8
|
-
*/
|
|
9
|
-
import { type HTMLAttributes, type ReactNode } from 'react';
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from 'react';
|
|
10
2
|
/**
|
|
11
3
|
* Blockquote variant constants - Industry-standard patterns
|
|
12
4
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atomic/Blockquote/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atomic/Blockquote/index.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB;IAC7B,oFAAoF;;IAEpF,wEAAwE;;IAExE,uFAAuF;;CAE/E,CAAC;AAEX,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAC3C,cAAc,CAAC,WAAW,CAAC,EAC3B,MAAM,CACP;IACC,6BAA6B;IAC7B,QAAQ,EAAE,SAAS,CAAC;IACpB,uCAAuC;IACvC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oDAAoD;IACpD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,2CAA2C;IAC3C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qBAAqB;IACrB,OAAO,CAAC,EAAE,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,OAAO,kBAAkB,CAAC,CAAC;CACxE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,QAAA,MAAM,UAAU,yGAyCd,CAAC;AAIH,eAAe,UAAU,CAAC;AAC1B,MAAM,MAAM,iBAAiB,GAC3B,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,OAAO,kBAAkB,CAAC,CAAC"}
|
|
@@ -97,6 +97,21 @@ export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, Va
|
|
|
97
97
|
* @default false
|
|
98
98
|
*/
|
|
99
99
|
fullWidth?: boolean;
|
|
100
|
+
/**
|
|
101
|
+
* Whether the button is in a loading state.
|
|
102
|
+
* Shows spinner and disables interaction.
|
|
103
|
+
* @default false
|
|
104
|
+
*/
|
|
105
|
+
loading?: boolean;
|
|
106
|
+
/**
|
|
107
|
+
* Text to show when loading. Falls back to children.
|
|
108
|
+
*/
|
|
109
|
+
loadingText?: string;
|
|
110
|
+
/**
|
|
111
|
+
* Upload/progress percentage (0-100).
|
|
112
|
+
* When provided during loading, shows progress indicator instead of spinner.
|
|
113
|
+
*/
|
|
114
|
+
progress?: number;
|
|
100
115
|
'aria-label'?: string;
|
|
101
116
|
'aria-describedby'?: string;
|
|
102
117
|
}
|
|
@@ -104,6 +119,8 @@ export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, Va
|
|
|
104
119
|
* Accessible, type-safe button component with behavioral variants.
|
|
105
120
|
* Supports icons, tooltips, responsive layouts, and render prop composition.
|
|
106
121
|
*
|
|
122
|
+
* React 19: Forwards refs to the native button element for compatibility with form libraries.
|
|
123
|
+
*
|
|
107
124
|
* @component
|
|
108
125
|
* @example
|
|
109
126
|
* ```tsx
|
|
@@ -124,7 +141,7 @@ export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, Va
|
|
|
124
141
|
* @param {ButtonProps} props - The props for the button
|
|
125
142
|
* @returns {JSX.Element} The rendered button
|
|
126
143
|
*/
|
|
127
|
-
declare const Button:
|
|
144
|
+
declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
128
145
|
export default Button;
|
|
129
146
|
export { buttonVariants };
|
|
130
147
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atomic/Button/index.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,OAAO,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atomic/Button/index.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,OAAO,EAAE,MAAM,iCAAiC,CAAC;AAM1D,OAAO,cAAc,CAAC;AAItB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,oBAAoB,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE5E;;;GAGG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;CAKjB,CAAC;AAEX,QAAA,MAAM,cAAc;;8EAmBlB,CAAC;AAEH;;;;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AM,CAAC;IACrB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,QAAA,MAAM,MAAM,2GAyJV,CAAC;AAIH,eAAe,MAAM,CAAC;AACtB,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx,
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
// packages/components/src/atomic/Button/index.tsx
|
|
3
3
|
/**
|
|
4
4
|
* @fileoverview Button component
|
|
@@ -13,8 +13,10 @@ import { DISPLAY } from '../../styles/componentConstants';
|
|
|
13
13
|
import { THEME_VARIANT } from '../../utils/constants';
|
|
14
14
|
import { cn, getVariantDataAttrs } from '../../utils/helpers';
|
|
15
15
|
import Icon from '../Icons/Icon';
|
|
16
|
+
import Spinner from '../Spinner';
|
|
16
17
|
import Tooltip from '../Tooltip';
|
|
17
18
|
import './Button.css';
|
|
19
|
+
import { forwardRef } from 'react';
|
|
18
20
|
/**
|
|
19
21
|
* Button variant constants - THEME_VARIANT + Button-specific variants
|
|
20
22
|
* Used for button styling via data-variant attribute
|
|
@@ -49,6 +51,8 @@ const buttonVariants = cva('dndev-interactive', {
|
|
|
49
51
|
* Accessible, type-safe button component with behavioral variants.
|
|
50
52
|
* Supports icons, tooltips, responsive layouts, and render prop composition.
|
|
51
53
|
*
|
|
54
|
+
* React 19: Forwards refs to the native button element for compatibility with form libraries.
|
|
55
|
+
*
|
|
52
56
|
* @component
|
|
53
57
|
* @example
|
|
54
58
|
* ```tsx
|
|
@@ -69,14 +73,18 @@ const buttonVariants = cva('dndev-interactive', {
|
|
|
69
73
|
* @param {ButtonProps} props - The props for the button
|
|
70
74
|
* @returns {JSX.Element} The rendered button
|
|
71
75
|
*/
|
|
72
|
-
const Button = ({ className, variant, render, display = DISPLAY.AUTO, icon, iconEnd = false, children, tooltip, floating = false, fullWidth = false, 'aria-label': ariaLabel, 'aria-describedby': ariaDescribedBy, ...props }) => {
|
|
76
|
+
const Button = forwardRef(({ className, variant, render, display = DISPLAY.AUTO, icon, iconEnd = false, children, tooltip, floating = false, fullWidth = false, loading = false, loadingText, progress, disabled, 'aria-label': ariaLabel, 'aria-describedby': ariaDescribedBy, ...props }, ref) => {
|
|
73
77
|
const buttonText = children;
|
|
74
78
|
const hasIcon = !!icon;
|
|
75
79
|
const hasText = !!buttonText;
|
|
76
80
|
// Display mode - AUTO stays AUTO (CSS-driven), no auto-detection
|
|
77
81
|
const effectiveDisplay = display;
|
|
82
|
+
// Loading state handling
|
|
83
|
+
const isDisabled = disabled || loading;
|
|
84
|
+
const showProgress = loading && progress !== undefined && progress < 100;
|
|
85
|
+
const displayText = loading ? (loadingText ?? buttonText) : buttonText;
|
|
78
86
|
// Build button content - Icon handles all types automatically
|
|
79
|
-
const buttonContent = (_jsxs(_Fragment, { children: [icon && !iconEnd && _jsx(Icon, { icon: icon }), hasText && (_jsx("span", { className: "dndev-interactive-label", "data-display": effectiveDisplay, children: buttonText })), icon && iconEnd && _jsx(Icon, { icon: icon })] }));
|
|
87
|
+
const buttonContent = loading ? (_jsxs(_Fragment, { children: [showProgress ? (_jsx("span", { className: "dndev-button-progress", "aria-hidden": "true", children: _jsxs("svg", { viewBox: "0 0 20 20", className: "dndev-progress-ring", children: [_jsx("circle", { cx: "10", cy: "10", r: "8", fill: "none", stroke: "currentColor", strokeWidth: "2", opacity: "0.2" }), _jsx("circle", { cx: "10", cy: "10", r: "8", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeDasharray: `${(progress / 100) * 50.27} 50.27`, strokeLinecap: "round", transform: "rotate(-90 10 10)" })] }) })) : (_jsx(Spinner, { className: "dndev-button-spinner", "aria-hidden": "true" })), hasText && (_jsx("span", { className: "dndev-interactive-label", "data-display": effectiveDisplay, children: displayText }))] })) : (_jsxs(_Fragment, { children: [icon && !iconEnd && _jsx(Icon, { icon: icon }), hasText && (_jsx("span", { className: "dndev-interactive-label", "data-display": effectiveDisplay, children: buttonText })), icon && iconEnd && _jsx(Icon, { icon: icon })] }));
|
|
80
88
|
// Extract text for aria-label (simple string extraction)
|
|
81
89
|
const getAriaLabel = () => {
|
|
82
90
|
if (ariaLabel)
|
|
@@ -104,10 +112,11 @@ const Button = ({ className, variant, render, display = DISPLAY.AUTO, icon, icon
|
|
|
104
112
|
...(floating && { 'data-floating': 'true' }),
|
|
105
113
|
...(fullWidth && { 'data-full-width': 'true' }),
|
|
106
114
|
...(effectiveDisplay && { 'data-display': effectiveDisplay }),
|
|
115
|
+
...(loading && { 'data-loading': 'true', 'aria-busy': 'true' }),
|
|
107
116
|
...restProps,
|
|
108
117
|
};
|
|
109
118
|
// Render prop pattern - no cloneElement needed (React 19 compatible)
|
|
110
|
-
const buttonElement = render ? (render(elementProps)) : (_jsx("button", { type: buttonType, role: "button", tabIndex: 0, ...elementProps, children: buttonContent }));
|
|
119
|
+
const buttonElement = render ? (render(elementProps)) : (_jsx("button", { ref: ref, type: buttonType, role: "button", tabIndex: isDisabled ? -1 : 0, disabled: isDisabled, "aria-disabled": isDisabled || undefined, ...elementProps, children: buttonContent }));
|
|
111
120
|
// Tooltip: COMPACT/AUTO (may be icon-only when collapsed), others only if explicit
|
|
112
121
|
// Don't specify side - let CSS --tooltip-side take priority (RTL-aware in sidebars)
|
|
113
122
|
if (effectiveDisplay === DISPLAY.COMPACT ||
|
|
@@ -118,6 +127,7 @@ const Button = ({ className, variant, render, display = DISPLAY.AUTO, icon, icon
|
|
|
118
127
|
return _jsx(Tooltip, { content: tooltip, children: buttonElement });
|
|
119
128
|
}
|
|
120
129
|
return buttonElement;
|
|
121
|
-
};
|
|
130
|
+
});
|
|
131
|
+
Button.displayName = 'Button';
|
|
122
132
|
export default Button;
|
|
123
133
|
export { buttonVariants };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atomic/Calendar/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atomic/Calendar/index.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAGlE,MAAM,MAAM,aAAa,GAAG,sBAAsB,CAAC;AA2EnD,iBAAS,QAAQ,CAAC,EAChB,SAAS,EACT,UAAU,EACV,eAAsB,EACtB,YAAgB,EAChB,aAA0B,EAC1B,UAAU,EACV,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,aAAa,2CA0Ef;AAKD,eAAe,QAAQ,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// packages/components/src/atomic/Calendar/index.tsx
|
|
2
3
|
import { ChevronLeft, ChevronRight } from 'lucide-react';
|
|
3
|
-
import { cn } from '../../utils/helpers';
|
|
4
4
|
import { CalendarPrimitive } from './CalendarPrimitive';
|
|
5
|
+
import { cn } from '../../utils/helpers';
|
|
6
|
+
import Button from '../Button';
|
|
5
7
|
import DropdownMenu from '../DropdownMenu';
|
|
6
8
|
import { DropdownMenuItemPrimitive } from '../DropdownMenu/DropdownMenuPrimitive';
|
|
7
|
-
import Button from '../Button';
|
|
8
9
|
import Icon from '../Icons/Icon';
|
|
9
10
|
function CalendarDropdown({ options = [], value, onChange, 'aria-label': ariaLabel, }) {
|
|
10
11
|
const selectedOption = options.find((opt) => String(opt.value) === String(value));
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @author AMBROISE PARK Consulting
|
|
8
8
|
*/
|
|
9
9
|
import * as CheckboxPrimitives from '@radix-ui/react-checkbox';
|
|
10
|
-
import {
|
|
10
|
+
import type { ComponentProps } from 'react';
|
|
11
11
|
/**
|
|
12
12
|
* Props for the Checkbox component.
|
|
13
13
|
* Extends Radix UI Checkbox Root props.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxPrimitive.d.ts","sourceRoot":"","sources":["../../../src/atomic/Checkbox/CheckboxPrimitive.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,kBAAkB,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"CheckboxPrimitive.d.ts","sourceRoot":"","sources":["../../../src/atomic/Checkbox/CheckboxPrimitive.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,kBAAkB,MAAM,0BAA0B,CAAC;AAK/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C;;;GAGG;AACH,MAAM,WAAW,aAAc,SAAQ,cAAc,CACnD,OAAO,kBAAkB,CAAC,IAAI,CAC/B;CAAG;AAEJ;;;;;;;;;;GAUG;AACH,QAAA,MAAM,iBAAiB,GAAI,yBAAyB,aAAa,4CAUhE,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -10,7 +10,6 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
10
10
|
*/
|
|
11
11
|
import * as CheckboxPrimitives from '@radix-ui/react-checkbox';
|
|
12
12
|
import { Check } from 'lucide-react';
|
|
13
|
-
import {} from 'react';
|
|
14
13
|
import { cn } from '../../utils/helpers';
|
|
15
14
|
/**
|
|
16
15
|
* Low-level Radix UI checkbox wrapper.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CONTROL_VARIANT, type ControlVariant } from '../../utils/constants';
|
|
2
1
|
import CheckboxPrimitive, { type CheckboxProps as CheckboxPrimitiveProps } from './CheckboxPrimitive';
|
|
2
|
+
import { CONTROL_VARIANT, type ControlVariant } from '../../utils/constants';
|
|
3
3
|
import './Checkbox.css';
|
|
4
4
|
export interface CheckboxProps extends CheckboxPrimitiveProps {
|
|
5
5
|
/** Semantic color variant */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atomic/Checkbox/index.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atomic/Checkbox/index.tsx"],"names":[],"mappings":"AAaA,OAAO,iBAAiB,EAAE,EACxB,KAAK,aAAa,IAAI,sBAAsB,EAC7C,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,eAAe,EAAE,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAG7E,OAAO,gBAAgB,CAAC;AAExB,MAAM,WAAW,aAAc,SAAQ,sBAAsB;IAC3D,6BAA6B;IAC7B,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B;AAoBD;;;;;;;;;;;;GAYG;AACH,QAAA,MAAM,QAAQ,GAAI,kCAAkC,aAAa,4CAUhE,CAAC;AAEF,eAAe,QAAQ,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,eAAe,IAAI,gBAAgB,EAAE,CAAC"}
|
|
@@ -9,9 +9,9 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
9
9
|
* @author AMBROISE PARK Consulting
|
|
10
10
|
*/
|
|
11
11
|
import { cva } from 'class-variance-authority';
|
|
12
|
-
import { cn, getVariantDataAttrs } from '../../utils/helpers';
|
|
13
|
-
import { CONTROL_VARIANT } from '../../utils/constants';
|
|
14
12
|
import CheckboxPrimitive, {} from './CheckboxPrimitive';
|
|
13
|
+
import { CONTROL_VARIANT } from '../../utils/constants';
|
|
14
|
+
import { cn, getVariantDataAttrs } from '../../utils/helpers';
|
|
15
15
|
import './Checkbox.css';
|
|
16
16
|
const checkboxVariants = cva('dndev-control', {
|
|
17
17
|
variants: {
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @author AMBROISE PARK Consulting
|
|
8
8
|
*/
|
|
9
9
|
import * as RadixCollapsible from '@radix-ui/react-collapsible';
|
|
10
|
-
import {
|
|
10
|
+
import type { ComponentProps } from 'react';
|
|
11
11
|
declare const CollapsiblePrimitive: import("react").ForwardRefExoticComponent<RadixCollapsible.CollapsibleProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
12
12
|
declare const CollapsibleTrigger: import("react").ForwardRefExoticComponent<RadixCollapsible.CollapsibleTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
13
13
|
declare const CollapsibleContent: ({ className, ...props }: ComponentProps<typeof RadixCollapsible.CollapsibleContent>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CollapsiblePrimitive.d.ts","sourceRoot":"","sources":["../../../src/atomic/Collapsible/CollapsiblePrimitive.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,gBAAgB,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"CollapsiblePrimitive.d.ts","sourceRoot":"","sources":["../../../src/atomic/Collapsible/CollapsiblePrimitive.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,gBAAgB,MAAM,6BAA6B,CAAC;AAEhE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,QAAA,MAAM,oBAAoB,8HAAwB,CAAC;AACnD,QAAA,MAAM,kBAAkB,wIAAsC,CAAC;AAW/D,QAAA,MAAM,kBAAkB,GAAI,yBAGzB,cAAc,CAAC,OAAO,gBAAgB,CAAC,kBAAkB,CAAC,4CAI5D,CAAC;AAEF,eAAe,oBAAoB,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -9,7 +9,6 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
9
9
|
* @author AMBROISE PARK Consulting
|
|
10
10
|
*/
|
|
11
11
|
import * as RadixCollapsible from '@radix-ui/react-collapsible';
|
|
12
|
-
import {} from 'react';
|
|
13
12
|
const CollapsiblePrimitive = RadixCollapsible.Root;
|
|
14
13
|
const CollapsibleTrigger = RadixCollapsible.CollapsibleTrigger;
|
|
15
14
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atomic/Collapsible/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atomic/Collapsible/index.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,mBAAmB,CAAC;AAE3B,MAAM,WAAW,gBAAgB;IAC/B,2CAA2C;IAC3C,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,0BAA0B;IAC1B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,4BAA4B;IAC5B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,uCAAuC;IACvC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,wCAAwC;IACxC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,SAAS,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC;IACrC,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;GAaG;AACH,iBAAS,WAAW,CAAC,EACnB,OAAO,EACP,QAAQ,EACR,IAAI,EACJ,YAAY,EACZ,WAAW,EACX,QAAQ,EACR,QAAgB,EAChB,SAAwB,EACxB,SAAS,GACV,EAAE,gBAAgB,2CA+DlB;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -8,8 +8,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
8
8
|
* @since 0.0.1
|
|
9
9
|
* @author AMBROISE PARK Consulting
|
|
10
10
|
*/
|
|
11
|
+
import { CirclePlus, CircleMinus, ChevronDown } from 'lucide-react';
|
|
11
12
|
import { useState } from 'react';
|
|
12
|
-
import { Plus, Minus, ChevronDown } from 'lucide-react';
|
|
13
13
|
import CollapsiblePrimitive, { CollapsibleTrigger, CollapsibleContent, } from './CollapsiblePrimitive';
|
|
14
14
|
import { cn } from '../../utils/helpers';
|
|
15
15
|
import Stack from '../Stack';
|
|
@@ -42,7 +42,7 @@ function Collapsible({ trigger, children, open, onOpenChange, defaultOpen, disab
|
|
|
42
42
|
if (!trigger)
|
|
43
43
|
return null;
|
|
44
44
|
if (showIcon) {
|
|
45
|
-
const IconComponent = iconStyle === 'chevron' ? ChevronDown : isOpen ?
|
|
45
|
+
const IconComponent = iconStyle === 'chevron' ? ChevronDown : isOpen ? CircleMinus : CirclePlus;
|
|
46
46
|
return (_jsx(CollapsibleTrigger, { asChild: true, children: _jsxs(Stack, { as: "div", direction: "row", align: "center", justify: "between", className: "dndev-collapsible-trigger", children: [trigger, iconStyle === 'chevron' ? (_jsx(ChevronDown, { className: "dndev-collapsible-icon dndev-collapsible-chevron", "aria-hidden": "true" })) : (_jsx(IconComponent, { className: "dndev-collapsible-icon", "aria-hidden": "true" }))] }) }));
|
|
47
47
|
}
|
|
48
48
|
return _jsx(CollapsibleTrigger, { asChild: true, children: trigger });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atomic/Combobox/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atomic/Combobox/index.tsx"],"names":[],"mappings":"AAYA,OAAO,EAAE,eAAe,EAAE,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAM7E,OAAO,gBAAgB,CAAC;AAExB,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,KA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|
|
3
|
-
import { useState, useMemo, useRef, useEffect, useId, } from 'react';
|
|
4
3
|
import { Check, ChevronDown, Plus, X } from 'lucide-react';
|
|
5
|
-
import
|
|
6
|
-
import ScrollArea from '../ScrollArea';
|
|
7
|
-
import { cn } from '../../utils/helpers';
|
|
4
|
+
import { useState, useMemo, useRef, useEffect, useId, } from 'react';
|
|
8
5
|
import { CONTROL_VARIANT } from '../../utils/constants';
|
|
6
|
+
import { cn } from '../../utils/helpers';
|
|
9
7
|
import Input from '../Input';
|
|
8
|
+
import ScrollArea from '../ScrollArea';
|
|
9
|
+
import Spinner from '../Spinner';
|
|
10
10
|
import './Combobox.css';
|
|
11
11
|
const Combobox = ({ value, onValueChange, placeholder = 'Select...', emptyMessage = 'No results found', options = [], disabled, isLoading, variant, multiple = false, label, creatable = false, createLabel = 'Create', clearable = false, onOpenChange, onSearchChange, required, }) => {
|
|
12
12
|
const id = useId();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atomic/CommandDialog/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atomic/CommandDialog/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvC,kDAAkD;AAClD,eAAO,MAAM,qBAAqB,eAH2B,IAAI,aAIvB,CAAC;AAS3C,MAAM,WAAW,kBAAkB;IACjC,mDAAmD;IACnD,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,4BAA4B;IAC5B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,uCAAuC;IACvC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,8BAA8B;IAC9B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,oCAAoC;IACpC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,mBAAmB;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,qBAAqB;IACrB,MAAM,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IAC1B,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sDAAsD;IACtD,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,QAAA,MAAM,aAAa,GAAI,4FAUpB,kBAAkB,4CAwEpB,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -15,8 +15,8 @@ const CommandDialogContext = createContext({});
|
|
|
15
15
|
export const useCommandDialogClose = () => useContext(CommandDialogContext).onClose;
|
|
16
16
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
17
17
|
import { X } from 'lucide-react';
|
|
18
|
-
import { cn } from '../../utils/helpers';
|
|
19
18
|
import { useSwipeToClose } from '../../hooks';
|
|
19
|
+
import { cn } from '../../utils/helpers';
|
|
20
20
|
import Button, { BUTTON_VARIANT } from '../Button';
|
|
21
21
|
const CommandDialog = ({ trigger, open, onOpenChange, title, description, children, footer, className, noSwipe = false, }) => {
|
|
22
22
|
const handleClose = () => {
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @author AMBROISE PARK Consulting
|
|
8
8
|
*/
|
|
9
9
|
import * as RadixContextMenu from '@radix-ui/react-context-menu';
|
|
10
|
-
import {
|
|
10
|
+
import type { ComponentProps } from 'react';
|
|
11
11
|
declare const ContextMenuPrimitive: import("react").FC<RadixContextMenu.ContextMenuProps>;
|
|
12
12
|
declare const ContextMenuTriggerPrimitive: import("react").ForwardRefExoticComponent<RadixContextMenu.ContextMenuTriggerProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
13
13
|
declare const ContextMenuGroupPrimitive: import("react").ForwardRefExoticComponent<RadixContextMenu.ContextMenuGroupProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContextMenuPrimitive.d.ts","sourceRoot":"","sources":["../../../src/atomic/ContextMenu/ContextMenuPrimitive.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,gBAAgB,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"ContextMenuPrimitive.d.ts","sourceRoot":"","sources":["../../../src/atomic/ContextMenu/ContextMenuPrimitive.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,gBAAgB,MAAM,8BAA8B,CAAC;AAKjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,QAAA,MAAM,oBAAoB,uDAAwB,CAAC;AAEnD,QAAA,MAAM,2BAA2B,sIAA2B,CAAC;AAE7D,QAAA,MAAM,yBAAyB,mIAAyB,CAAC;AAEzD,QAAA,MAAM,0BAA0B,6DAA0B,CAAC;AAE3D,QAAA,MAAM,uBAAuB,0DAAuB,CAAC;AAErD,QAAA,MAAM,8BAA8B,wIAA8B,CAAC;AAEnE,QAAA,MAAM,8BAA8B,GAAI,0CAKrC,cAAc,CAAC,OAAO,gBAAgB,CAAC,UAAU,CAAC,GAAG;IACtD,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,4CASA,CAAC;AAEF,QAAA,MAAM,8BAA8B,GAAI,yBAGrC,cAAc,CAAC,OAAO,gBAAgB,CAAC,UAAU,CAAC,4CAEpD,CAAC;AAEF,QAAA,MAAM,2BAA2B,GAAI,2CAIlC,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,GAAG;IACnD,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CAC3C,4CAQA,CAAC;AAEF,QAAA,MAAM,wBAAwB,GAAI,gCAI/B,cAAc,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,GAAG;IAChD,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,4CAOA,CAAC;AAEF,QAAA,MAAM,gCAAgC,GAAI,4CAKvC,cAAc,CAAC,OAAO,gBAAgB,CAAC,YAAY,CAAC,4CAatD,CAAC;AAEF,QAAA,MAAM,6BAA6B,GAAI,mCAIpC,cAAc,CAAC,OAAO,gBAAgB,CAAC,SAAS,CAAC,4CAYnD,CAAC;AAEF,QAAA,MAAM,yBAAyB,GAAI,gCAIhC,cAAc,CAAC,OAAO,gBAAgB,CAAC,KAAK,CAAC,GAAG;IACjD,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,4CAMA,CAAC;AAEF,QAAA,MAAM,6BAA6B,GAAI,yBAGpC,cAAc,CAAC,OAAO,gBAAgB,CAAC,SAAS,CAAC,4CAEnD,CAAC;AAEF,QAAA,MAAM,4BAA4B,GAAI,yBAGnC,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC,4CAEvC,CAAC;AAEF,eAAe,oBAAoB,CAAC;AACpC,OAAO,EACL,2BAA2B,EAC3B,2BAA2B,EAC3B,wBAAwB,EACxB,gCAAgC,EAChC,6BAA6B,EAC7B,yBAAyB,EACzB,6BAA6B,EAC7B,4BAA4B,EAC5B,yBAAyB,EACzB,0BAA0B,EAC1B,uBAAuB,EACvB,8BAA8B,EAC9B,8BAA8B,EAC9B,8BAA8B,GAC/B,CAAC"}
|
|
@@ -10,7 +10,6 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
10
10
|
*/
|
|
11
11
|
import * as RadixContextMenu from '@radix-ui/react-context-menu';
|
|
12
12
|
import { Check, ChevronRight, Circle } from 'lucide-react';
|
|
13
|
-
import {} from 'react';
|
|
14
13
|
import { cn } from '../../utils/helpers';
|
|
15
14
|
const ContextMenuPrimitive = RadixContextMenu.Root;
|
|
16
15
|
const ContextMenuTriggerPrimitive = RadixContextMenu.Trigger;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atomic/ContextMenu/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceR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CACf,CAAC;AAEF,oDAAoD;AACpD,MAAM,MAAM,mBAAmB,GAC3B,qBAAqB,GACrB,uBAAuB,GACvB,yBAAyB,GACzB,sBAAsB,GACtB,wBAAwB,GACxB,oBAAoB,CAAC;AAEzB,MAAM,WAAW,gBAAgB;IAC/B,+DAA+D;IAC/D,OAAO,EAAE,SAAS,CAAC;IACnB,2CAA2C;IAC3C,KAAK,EAAE,mBAAmB,EAAE,CAAC;CAC9B;AA4FD;;;;;;;;;;;;;;;;;;GAkBG;AACH,QAAA,MAAM,WAAW,GAAI,oBAAoB,gBAAgB,4CAWxD,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DialogPrimitive.d.ts","sourceRoot":"","sources":["../../../src/atomic/Dialog/DialogPrimitive.tsx"],"names":[],"mappings":"AAEA;;;GAGG;AAEH,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"DialogPrimitive.d.ts","sourceRoot":"","sources":["../../../src/atomic/Dialog/DialogPrimitive.tsx"],"names":[],"mappings":"AAEA;;;GAGG;AAEH,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAI1D,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEjE,QAAA,MAAM,MAAM,iDAAuB,CAAC;AACpC,QAAA,MAAM,aAAa,kIAA0B,CAAC;AAC9C,QAAA,MAAM,YAAY,uDAAyB,CAAC;AAC5C,QAAA,MAAM,WAAW,gIAAwB,CAAC;AAE1C,QAAA,MAAM,aAAa,GAAI,yBAGpB,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,4CAEhD,CAAC;AAEF,QAAA,MAAM,aAAa,GAAI,wCAKpB,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,GAAG;IAClD,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC3B,4CAIA,CAAC;AAEF,QAAA,MAAM,YAAY,GAAI,yBAGnB,cAAc,CAAC,cAAc,CAAC,4CAEhC,CAAC;AAEF,QAAA,MAAM,YAAY,GAAI,yBAGnB,cAAc,CAAC,cAAc,CAAC,4CAEhC,CAAC;AAEF,QAAA,MAAM,WAAW,GAAI,yBAGlB,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,4CAE9C,CAAC;AAEF,QAAA,MAAM,iBAAiB,GAAI,yBAGxB,cAAc,CAAC,OAAO,eAAe,CAAC,WAAW,CAAC,4CAEpD,CAAC;AAEF,eAAe,MAAM,CAAC;AACtB,OAAO,EACL,MAAM,EACN,YAAY,EACZ,aAAa,EACb,WAAW,EACX,aAAa,EACb,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,iBAAiB,GAClB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atomic/Dialog/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atomic/Dialog/index.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAmB,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE7E,OAAe,EAAkB,KAAK,aAAa,EAAE,MAAM,WAAW,CAAC;AACvE,OAAO,EAGL,aAAa,IAAI,gBAAgB,EAQlC,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElE,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;AAU/E,QAAA,MAAM,aAAa,GAAI,0EAOpB,cAAc,CAAC,OAAO,gBAAgB,CAAC,GAAG;IAC3C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,cAAc,CAAC,EAAE,SAAS,CAA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F,eAAe,MAAM,CAAC;AACtB,OAAO,EAAE,eAAe,IAAI,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC1E,YAAY,EAAE,cAAc,IAAI,aAAa,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -10,9 +10,9 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
10
10
|
*/
|
|
11
11
|
import { X } from 'lucide-react';
|
|
12
12
|
import { useRef } from 'react';
|
|
13
|
+
import { useSwipeToClose } from '../../hooks';
|
|
13
14
|
import { SURFACE_VARIANT } from '../../utils/constants';
|
|
14
15
|
import { cn, getVariantDataAttrs } from '../../utils/helpers';
|
|
15
|
-
import { useSwipeToClose } from '../../hooks';
|
|
16
16
|
import Button, { BUTTON_VARIANT } from '../Button';
|
|
17
17
|
import { Dialog as Root, DialogTrigger as Trigger, DialogContent as ContentPrimitive, DialogHeader as HeaderPrimitive, DialogFooter as FooterPrimitive, DialogTitle as TitlePrimitive, DialogDescription as DescriptionPrimitive, DialogClose as Close, DialogOverlay as OverlayPrimitive, DialogPortal, } from './DialogPrimitive';
|
|
18
18
|
// Wrapper components that apply dndev-* classes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atomic/DropdownMenu/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atomic/DropdownMenu/index.tsx"],"names":[],"mappings":"AA8BA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAErE,OAAO,oBAAoB,CAAC;AAc5B,KAAK,oBAAoB,GAAG;IAC1B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,IAAI,CAAC,EAAE,aAAa,CAAC;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC7C,OAAO,CAAC,EAAE,a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E,CAAC;IAC/B,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,mCAAmC;IACnC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oCAAoC;IACpC,YAAY,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;IAC1C,4BAA4B;IAC5B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,uCAAuC;IACvC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACxC;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,QAAA,MAAM,YAAY,GAAI,+EAQnB,iBAAiB,mDAyQnB,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -11,10 +11,10 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
11
11
|
* @author AMBROISE PARK Consulting
|
|
12
12
|
*/
|
|
13
13
|
import { ChevronRight, Check } from 'lucide-react';
|
|
14
|
-
import { Children } from 'react';
|
|
14
|
+
import { Children, isValidElement } from 'react';
|
|
15
15
|
import DropdownMenuPrimitive, { DropdownMenuTriggerPrimitive, DropdownMenuContentPrimitive, DropdownMenuItemPrimitive, DropdownMenuSubPrimitive, DropdownMenuSubTriggerPrimitive, DropdownMenuSubContentPrimitive, DropdownMenuPortalPrimitive, DropdownMenuLabelPrimitive, DropdownMenuSeparatorPrimitive, } from './DropdownMenuPrimitive';
|
|
16
|
-
import ScrollArea from '../ScrollArea';
|
|
17
16
|
import { cn } from '../../utils/helpers';
|
|
17
|
+
import ScrollArea from '../ScrollArea';
|
|
18
18
|
import './DropdownMenu.css';
|
|
19
19
|
/** WCAG: aria-label for icon-only menu items */
|
|
20
20
|
const getIconOnlyAriaLabel = (hasIcon, hasLabel, label, fallback) => {
|
|
@@ -50,7 +50,21 @@ const DropdownMenu = ({ trigger, items = [], children, contentWidth, contentAlig
|
|
|
50
50
|
return null;
|
|
51
51
|
// Normalize children to ensure keys (React.Children.toArray handles this automatically)
|
|
52
52
|
const normalizedChildren = children ? Children.toArray(children) : [];
|
|
53
|
-
|
|
53
|
+
// Wrap children in DropdownMenuItemPrimitive so they trigger auto-close behavior
|
|
54
|
+
// This ensures clicking any child (like GoTo button) closes the dropdown
|
|
55
|
+
const wrappedChildren = normalizedChildren.map((child, index) => {
|
|
56
|
+
// Check if child is already a menu item by checking for data-role attribute
|
|
57
|
+
// (our DropdownMenuItemPrimitive sets data-role="menu-item")
|
|
58
|
+
if (isValidElement(child) &&
|
|
59
|
+
child.props?.['data-role'] === 'menu-item') {
|
|
60
|
+
// Already a menu item, don't wrap
|
|
61
|
+
return child;
|
|
62
|
+
}
|
|
63
|
+
// Wrap child in DropdownMenuItemPrimitive for auto-close behavior
|
|
64
|
+
// Using asChild merges props correctly with the child component
|
|
65
|
+
return (_jsx(DropdownMenuItemPrimitive, { className: "dndev-interactive", asChild: true, children: child }, index));
|
|
66
|
+
});
|
|
67
|
+
const content = (_jsxs(_Fragment, { children: [wrappedChildren, items.length > 0 &&
|
|
54
68
|
items.map((item, index) => {
|
|
55
69
|
// Label item
|
|
56
70
|
if (item.type === 'label') {
|