@donotdev/components 0.0.11 → 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 +19 -6
- package/dist/atomic/Calendar/index.d.ts.map +1 -1
- package/dist/atomic/Calendar/index.js +4 -3
- 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 -6
- package/dist/atomic/Combobox/index.d.ts +9 -47
- package/dist/atomic/Combobox/index.d.ts.map +1 -1
- package/dist/atomic/Combobox/index.js +136 -88
- 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 +2 -2
- package/dist/atomic/DropdownMenu/index.d.ts.map +1 -1
- package/dist/atomic/DropdownMenu/index.js +18 -4
- 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 +1 -1
- package/dist/atomic/Input/index.d.ts.map +1 -1
- package/dist/atomic/Input/index.js +13 -22
- package/dist/atomic/Label/FloatingLabel.d.ts +45 -0
- package/dist/atomic/Label/FloatingLabel.d.ts.map +1 -0
- package/dist/atomic/Label/FloatingLabel.js +34 -0
- package/dist/atomic/Label/index.d.ts +5 -1
- package/dist/atomic/Label/index.d.ts.map +1 -1
- package/dist/atomic/Label/index.js +8 -2
- 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 +9 -10
- package/dist/atomic/PasswordInput/index.d.ts.map +1 -1
- package/dist/atomic/PasswordInput/index.js +14 -30
- 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 +6 -7
- 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 +3 -1
- package/dist/atomic/Select/index.d.ts.map +1 -1
- package/dist/atomic/Select/index.js +14 -24
- 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/Skeleton/index.d.ts.map +1 -1
- package/dist/atomic/Skeleton/index.js +6 -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 +21 -6
- package/dist/atomic/Switch/index.d.ts.map +1 -1
- package/dist/atomic/Switch/index.js +27 -9
- package/dist/atomic/Table/index.d.ts +19 -7
- package/dist/atomic/Table/index.d.ts.map +1 -1
- package/dist/atomic/Table/index.js +25 -5
- 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/atomic/index.d.ts +2 -3
- package/dist/atomic/index.d.ts.map +1 -1
- package/dist/atomic/index.js +1 -2
- 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 +627 -68
- package/dist/utils/variants.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/atomic/Combobox/ComboboxPrimitive.d.ts +0 -18
- package/dist/atomic/Combobox/ComboboxPrimitive.d.ts.map +0 -1
- package/dist/atomic/Combobox/ComboboxPrimitive.js +0 -14
|
@@ -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;IACX,wCAAwC;IACxC,OAAO,EAAE,SAAS,CAAC;IACnB,8BAA8B;IAC9B,IAAI,CAAC,EAAE;QACL,6CAA6C;QAC7C,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,0CAA0C;QAC1C,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IACF,yCAAyC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEpD;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,+BAA+B;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,kCAAkC;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,oCAAoC;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,oCAAoC;IACpC,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,mCAAmC;IACnC,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,sEAAsE;IACtE,OAAO,EAAE,YAAY,CAAC;IACtB,wBAAwB;IACxB,GAAG,CAAC,EAAE,QAAQ,CAAC;IACf,mDAAmD;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mCAAmC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC3B,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,KAAK,CAAC,EACpB,KAAK,EACL,OAAO,EACP,GAAc,EACd,SAAS,EACT,SAAS,EACT,GAAG,GACJ,EAAE,UAAU,2CAsCZ;AAED,eAAe,KAAK,CAAC"}
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// packages/components/src/advanced/Bento/Bento.tsx
|
|
3
|
+
/**
|
|
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;;;;;;GAMG;AACH,MAAM,MAAM,aAAa,GAAG,YAAY,CAAC,OAAO,cAAc,CAAC,CAAC,SAAS,CAAC,CAAC;AAE3E;;;;;;GAMG;AACH,qEAAqE;AACrE,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,MAAM,WAAW,WACf,SACE,oBAAoB,CAAC,iBAAiB,CAAC,EACvC,YAAY,CAAC,OAAO,cAAc,CAAC;IACrC;;;;;;;;;;;;;;;OAeG;IACH,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,SAAS,CAAC;IACjD;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,OAAO,OAAO,CAAC,CAAC;IACjD,yDAAyD;IACzD,IAAI,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC,GAAG,MAAM,GAAG,SAAS,CAAC;IACvD;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,oCAAoC;IACpC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,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)
|
|
@@ -91,6 +99,9 @@ const Button = ({ className, variant, render, display = DISPLAY.AUTO, icon, icon
|
|
|
91
99
|
// Map 'default' variant to 'primary' for data-variant (same styling)
|
|
92
100
|
const variantForDataAttr = variant === THEME_VARIANT.DEFAULT ? THEME_VARIANT.PRIMARY : variant;
|
|
93
101
|
const variantAttrs = getVariantDataAttrs({ variant: variantForDataAttr });
|
|
102
|
+
// Extract type from props before spreading (to ensure it's not overridden)
|
|
103
|
+
const buttonType = props.type || 'button';
|
|
104
|
+
const { type: _type, ...restProps } = props;
|
|
94
105
|
// Build all props that should be passed to element (button or render prop)
|
|
95
106
|
const elementProps = {
|
|
96
107
|
children: buttonContent,
|
|
@@ -101,10 +112,11 @@ const Button = ({ className, variant, render, display = DISPLAY.AUTO, icon, icon
|
|
|
101
112
|
...(floating && { 'data-floating': 'true' }),
|
|
102
113
|
...(fullWidth && { 'data-full-width': 'true' }),
|
|
103
114
|
...(effectiveDisplay && { 'data-display': effectiveDisplay }),
|
|
104
|
-
...
|
|
115
|
+
...(loading && { 'data-loading': 'true', 'aria-busy': 'true' }),
|
|
116
|
+
...restProps,
|
|
105
117
|
};
|
|
106
118
|
// Render prop pattern - no cloneElement needed (React 19 compatible)
|
|
107
|
-
const buttonElement = render ? (render(elementProps)) : (_jsx("button", {
|
|
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 }));
|
|
108
120
|
// Tooltip: COMPACT/AUTO (may be icon-only when collapsed), others only if explicit
|
|
109
121
|
// Don't specify side - let CSS --tooltip-side take priority (RTL-aware in sidebars)
|
|
110
122
|
if (effectiveDisplay === DISPLAY.COMPACT ||
|
|
@@ -115,6 +127,7 @@ const Button = ({ className, variant, render, display = DISPLAY.AUTO, icon, icon
|
|
|
115
127
|
return _jsx(Tooltip, { content: tooltip, children: buttonElement });
|
|
116
128
|
}
|
|
117
129
|
return buttonElement;
|
|
118
|
-
};
|
|
130
|
+
});
|
|
131
|
+
Button.displayName = 'Button';
|
|
119
132
|
export default Button;
|
|
120
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));
|
|
@@ -13,7 +14,7 @@ function CalendarDropdown({ options = [], value, onChange, 'aria-label': ariaLab
|
|
|
13
14
|
const gridStyle = {
|
|
14
15
|
display: 'grid',
|
|
15
16
|
gridTemplateColumns: isMonth ? 'repeat(3, 1fr)' : 'repeat(5, 1fr)',
|
|
16
|
-
gap: 'var(--gap-
|
|
17
|
+
gap: 'var(--gap-sm)',
|
|
17
18
|
padding: '0',
|
|
18
19
|
};
|
|
19
20
|
const handleSelect = (newValue) => {
|
|
@@ -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,11 +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'
|
|
46
|
-
? ChevronDown
|
|
47
|
-
: isOpen
|
|
48
|
-
? Minus
|
|
49
|
-
: Plus;
|
|
45
|
+
const IconComponent = iconStyle === 'chevron' ? ChevronDown : isOpen ? CircleMinus : CirclePlus;
|
|
50
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" }))] }) }));
|
|
51
47
|
}
|
|
52
48
|
return _jsx(CollapsibleTrigger, { asChild: true, children: trigger });
|
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview Combobox component
|
|
3
|
-
* @description Accessible combobox with search/filter functionality. Provides a prop-based implementation.
|
|
4
|
-
*
|
|
5
|
-
* @version 0.0.1
|
|
6
|
-
* @since 0.0.1
|
|
7
|
-
* @author AMBROISE PARK Consulting
|
|
8
|
-
*/
|
|
9
|
-
import { type ReactNode } from 'react';
|
|
10
1
|
import { CONTROL_VARIANT, type ControlVariant } from '../../utils/constants';
|
|
11
2
|
import './Combobox.css';
|
|
12
3
|
export interface ComboboxOption {
|
|
@@ -14,57 +5,28 @@ export interface ComboboxOption {
|
|
|
14
5
|
label: string;
|
|
15
6
|
disabled?: boolean;
|
|
16
7
|
description?: string;
|
|
17
|
-
content?: ReactNode;
|
|
8
|
+
content?: React.ReactNode;
|
|
18
9
|
}
|
|
19
10
|
export interface ComboboxProps {
|
|
20
|
-
/** Selected value (string for single, array for multiple) */
|
|
21
11
|
value?: string | string[];
|
|
22
|
-
/** Change handler */
|
|
23
12
|
onValueChange?: (value: string | string[]) => void;
|
|
24
|
-
/** Placeholder text for trigger */
|
|
25
13
|
placeholder?: string;
|
|
26
|
-
/** Array of options */
|
|
27
14
|
options?: ComboboxOption[];
|
|
28
|
-
/** Custom trigger element */
|
|
29
|
-
trigger?: ReactNode;
|
|
30
|
-
/** Whether the combobox is disabled */
|
|
31
15
|
disabled?: boolean;
|
|
32
|
-
/** Whether the combobox is in a loading state */
|
|
33
16
|
isLoading?: boolean;
|
|
34
|
-
/** Variant for styling */
|
|
35
17
|
variant?: ControlVariant;
|
|
36
|
-
/** Placeholder for search input */
|
|
37
|
-
searchPlaceholder?: string;
|
|
38
|
-
/** Message when no results found */
|
|
39
18
|
emptyMessage?: string;
|
|
40
|
-
/** Custom filter function */
|
|
41
|
-
filterFn?: (option: ComboboxOption, searchTerm: string) => boolean;
|
|
42
|
-
/** Enable multiple selection */
|
|
43
19
|
multiple?: boolean;
|
|
44
|
-
/** Label for floating label - automatically floats when both label and placeholder are provided */
|
|
45
20
|
label?: string;
|
|
21
|
+
creatable?: boolean;
|
|
22
|
+
createLabel?: string;
|
|
23
|
+
clearable?: boolean;
|
|
24
|
+
onOpenChange?: (open: boolean) => void;
|
|
25
|
+
onSearchChange?: (search: string) => void;
|
|
26
|
+
/** Whether the field is required - shows asterisk indicator */
|
|
27
|
+
required?: boolean;
|
|
46
28
|
}
|
|
47
|
-
|
|
48
|
-
* Accessible combobox component with search/filter functionality.
|
|
49
|
-
* Provides a prop-based implementation to abstract complexity.
|
|
50
|
-
*
|
|
51
|
-
* @component
|
|
52
|
-
* @example
|
|
53
|
-
* ```tsx
|
|
54
|
-
* <Combobox
|
|
55
|
-
* value={value}
|
|
56
|
-
* onValueChange={setValue}
|
|
57
|
-
* placeholder="Select option..."
|
|
58
|
-
* options={[
|
|
59
|
-
* { value: 'option1', label: 'Option 1' },
|
|
60
|
-
* { value: 'option2', label: 'Option 2' }
|
|
61
|
-
* ]}
|
|
62
|
-
* />
|
|
63
|
-
* ```
|
|
64
|
-
* @param {ComboboxProps} props - The props for the combobox
|
|
65
|
-
* @returns {JSX.Element} The rendered combobox
|
|
66
|
-
*/
|
|
67
|
-
declare const Combobox: ({ value, onValueChange, placeholder, searchPlaceholder, emptyMessage, options, trigger, disabled, isLoading, variant, filterFn, multiple, label, }: ComboboxProps) => import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
declare const Combobox: ({ value, onValueChange, placeholder, emptyMessage, options, disabled, isLoading, variant, multiple, label, creatable, createLabel, clearable, onOpenChange, onSearchChange, required, }: ComboboxProps) => import("react/jsx-runtime").JSX.Element;
|
|
68
30
|
export default Combobox;
|
|
69
31
|
export { CONTROL_VARIANT as COMBOBOX_VARIANT };
|
|
70
32
|
export type { ControlVariant as ComboboxVariant };
|
|
@@ -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,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC1B,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,IAAI,CAAC;IACnD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,cAAc,EAAE,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,QAAA,MAAM,QAAQ,GAAI,yLAiBf,aAAa,4CA4Uf,CAAC;AAEF,eAAe,QAAQ,CAAC;AACxB,OAAO,EAAE,eAAe,IAAI,gBAAgB,EAAE,CAAC;AAC/C,YAAY,EAAE,cAAc,IAAI,eAAe,EAAE,CAAC"}
|