luan-ui 0.1.0 → 0.1.2

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.
Files changed (73) hide show
  1. package/dist/components/accordion/accordion.js +2 -2
  2. package/dist/components/accordion/accordion.js.map +1 -1
  3. package/dist/components/avatar/avatar-group.d.ts +6 -0
  4. package/dist/components/avatar/avatar-group.js +9 -0
  5. package/dist/components/avatar/avatar-group.js.map +1 -0
  6. package/dist/components/avatar/avatar.d.ts +5 -0
  7. package/dist/components/avatar/avatar.js +12 -0
  8. package/dist/components/avatar/avatar.js.map +1 -0
  9. package/dist/components/button/button.d.ts +1 -1
  10. package/dist/components/button/button.js +3 -3
  11. package/dist/components/button/button.js.map +1 -1
  12. package/dist/components/card/card.d.ts +1 -1
  13. package/dist/components/card/card.js +2 -2
  14. package/dist/components/card/card.js.map +1 -1
  15. package/dist/components/checkbox/checkbox.d.ts +1 -1
  16. package/dist/components/checkbox/checkbox.js +4 -4
  17. package/dist/components/checkbox/checkbox.js.map +1 -1
  18. package/dist/components/dialog/dialog.js +1 -1
  19. package/dist/components/dialog/dialog.js.map +1 -1
  20. package/dist/components/dropdown-menu/dropdown-menu.d.ts +26 -0
  21. package/dist/components/dropdown-menu/dropdown-menu.js +36 -0
  22. package/dist/components/dropdown-menu/dropdown-menu.js.map +1 -0
  23. package/dist/components/form-field/form-field-context.js.map +1 -1
  24. package/dist/components/form-field/form-field.js +3 -3
  25. package/dist/components/form-field/form-field.js.map +1 -1
  26. package/dist/components/form-helper/form-helper.js +2 -2
  27. package/dist/components/form-helper/form-helper.js.map +1 -1
  28. package/dist/components/icon/icon.d.ts +1 -1
  29. package/dist/components/icon/icon.js +2 -2
  30. package/dist/components/icon/icon.js.map +1 -1
  31. package/dist/components/input/input.js +3 -3
  32. package/dist/components/input/input.js.map +1 -1
  33. package/dist/components/label/label.js +2 -2
  34. package/dist/components/label/label.js.map +1 -1
  35. package/dist/components/pagination/pagination.js +5 -5
  36. package/dist/components/pagination/pagination.js.map +1 -1
  37. package/dist/components/popover/popover.js +2 -2
  38. package/dist/components/popover/popover.js.map +1 -1
  39. package/dist/components/progress/progress.js +1 -1
  40. package/dist/components/progress/progress.js.map +1 -1
  41. package/dist/components/radio-group/radio-group.js +1 -1
  42. package/dist/components/radio-group/radio-group.js.map +1 -1
  43. package/dist/components/select/select.js +2 -2
  44. package/dist/components/select/select.js.map +1 -1
  45. package/dist/components/skeleton/skeleton.js +1 -1
  46. package/dist/components/skeleton/skeleton.js.map +1 -1
  47. package/dist/components/slider/slider.js +2 -2
  48. package/dist/components/slider/slider.js.map +1 -1
  49. package/dist/components/slot/slot.js.map +1 -1
  50. package/dist/components/switch/switch.d.ts +1 -1
  51. package/dist/components/switch/switch.js +2 -2
  52. package/dist/components/switch/switch.js.map +1 -1
  53. package/dist/components/table/table.js +1 -1
  54. package/dist/components/table/table.js.map +1 -1
  55. package/dist/components/tabs/tabs.js +1 -1
  56. package/dist/components/tabs/tabs.js.map +1 -1
  57. package/dist/components/toast/toast.js.map +1 -1
  58. package/dist/components/tooltip/tooltip.js +1 -1
  59. package/dist/components/tooltip/tooltip.js.map +1 -1
  60. package/dist/index.d.ts +38 -34
  61. package/dist/index.js +23 -20
  62. package/dist/index.js.map +1 -1
  63. package/dist/styles/index.css +47 -0
  64. package/dist/utilities/cn/cn.js.map +1 -1
  65. package/dist/utilities/get-variants/get-variants.d.ts +1 -1
  66. package/dist/utilities/get-variants/get-variants.js +1 -1
  67. package/dist/utilities/get-variants/get-variants.js.map +1 -1
  68. package/dist/utilities/merge-refs/merge-refs.js.map +1 -1
  69. package/dist/utilities/pagination/get-truncated-elements.js +1 -1
  70. package/dist/utilities/pagination/get-truncated-elements.js.map +1 -1
  71. package/dist/utilities/pagination/keyboard-navigation.js.map +1 -1
  72. package/dist/utilities/responsive/responsive.js.map +1 -1
  73. package/package.json +11 -8
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Icon } from "@components/icon/icon";
2
+ import { Icon } from "../icon/icon";
3
3
  import { Cross1Icon } from "@radix-ui/react-icons";
4
- import { getVariants } from "@utilities/get-variants/get-variants";
4
+ import { getVariants } from "../../utilities/get-variants/get-variants";
5
5
  import { Popover as RadixPopover } from "radix-ui";
6
6
  import { createContext, forwardRef, useContext, useMemo, } from "react";
7
7
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"popover.js","sourceRoot":"","sources":["../../../src/components/popover/popover.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,UAAU,CAAC;AACnD,OAAO,EAEN,aAAa,EACb,UAAU,EACV,UAAU,EACV,OAAO,GACP,MAAM,OAAO,CAAC;AAEf;;GAEG;AAEH,MAAM,cAAc,GAAG,aAAa,CAA2B,SAAS,CAAC,CAAC;AAE1E,MAAM,iBAAiB,GAAG,GAAG,EAAE;IAC9B,MAAM,OAAO,GAAG,UAAU,CAAC,cAAc,CAAC,CAAC;IAC3C,IAAI,CAAC,OAAO,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;IACrE,CAAC;IACD,OAAO,OAAO,CAAC;AAChB,CAAC,CAAC;AAaF;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,OAAO,GAAG,CAAC,EAChB,QAAQ,EACR,SAAS,GAAG,IAAI,EAChB,oBAAoB,GAAG,OAAO,EAC9B,eAAe,GAAG,IAAI,EACtB,IAAI,EACJ,GAAG,KAAK,EACM,EAAE,EAAE;IAClB,MAAM,YAAY,GAAG,OAAO,CAC3B,GAAG,EAAE,CAAC,CAAC;QACN,SAAS;QACT,oBAAoB;QACpB,IAAI;QACJ,eAAe;KACf,C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EH,MAAM,aAAa,GAAG,YAAY,CAAC,MAAM,CAAC;AAE1C,OAAO,EACN,OAAO,EACP,cAAc,EACd,cAAc,EACd,YAAY,EACZ,aAAa,EACb,aAAa,GACb,CAAC","sourcesContent":["import { Icon } from \"@components/icon/icon\";\nimport { Cross1Icon } from \"@radix-ui/react-icons\";\nimport { getVariants } from \"@utilities/get-variants/get-variants\";\nimport { Popover as RadixPopover } from \"radix-ui\";\nimport {\n\ttype ComponentRef,\n\tcreateContext,\n\tforwardRef,\n\tuseContext,\n\tuseMemo,\n} from \"react\";\n\n/**\n * Popover Context\n */\n\nconst PopoverContext = createContext<PopoverProps | undefined>(undefined);\n\nconst usePopoverContext = () => {\n\tconst context = useContext(PopoverContext);\n\tif (!context) {\n\t\tthrow new Error(\"Popover components must be used within a Popover\");\n\t}\n\treturn context;\n};\n\n/**\n * Popover\n */\n\nexport type PopoverProps = {\n\tshowArrow?: boolean;\n\tcloseButtonAriaLabel?: string;\n\tshowCloseButton?: boolean;\n} & RadixPopover.PopoverProps &\n\tPick<RadixPopover.PopoverContentProps, \"side\">;\n\n/**\n * Popover component that provides a popover container with a trigger and content.\n *\n * @param {boolean} [props.showArrow=true] - Whether to show the arrow pointing to the trigger\n * @param {string} [props.closeButtonAriaLabel=\"Close\"] - Aria label for the close button\n * @param {boolean} [props.showCloseButton=true] - Whether to show the close button\n * @param {RadixPopover.PopoverContentProps[\"side\"]} [props.side] - The preferred side to show the popover\n *\n * @example\n * ```tsx\n * <Popover>\n * <PopoverTrigger>Open Popover</PopoverTrigger>\n * <PopoverContent>\n * <p>Popover content goes here</p>\n * </PopoverContent>\n * </Popover>\n * ```\n */\nconst Popover = ({\n\tchildren,\n\tshowArrow = true,\n\tcloseButtonAriaLabel = \"Close\",\n\tshowCloseButton = true,\n\tside,\n\t...props\n}: PopoverProps) => {\n\tconst contextValue = useMemo(\n\t\t() => ({\n\t\t\tshowArrow,\n\t\t\tcloseButtonAriaLabel,\n\t\t\tside,\n\t\t\tshowCloseButton,\n\t\t}),\n\t\t[showArrow, closeButtonAriaLabel, side, showCloseButton],\n\t);\n\treturn (\n\t\t<PopoverContext.Provider value={contextValue}>\n\t\t\t<RadixPopover.Root {...props}>{children}</RadixPopover.Root>\n\t\t</PopoverContext.Provider>\n\t);\n};\n\nconst PopoverTrigger = RadixPopover.Trigger;\n\nexport type PopoverContentProps = RadixPopover.PopoverContentProps & {\n\tshowArrow?: boolean;\n\tcloseButtonAriaLabel?: string;\n};\n\nconst popoverContentStyles = getVariants({\n\tbase: \"relative z-50 w-fit max-w-72 rounded-md bg-gray-700 p-4 text-sm text-white shadow-md\",\n\tvariants: {},\n});\n\n/**\n * Popover Content\n */\n\n/**\n * Popover Content component that provides the content area for the Popover.\n * Inherits size from parent Popover component.\n *\n * @example\n * ```tsx\n * <PopoverContent>\n * <p>Popover content goes here</p>\n * </PopoverContent>\n * ```\n */\nconst PopoverContent = forwardRef<\n\tComponentRef<typeof RadixPopover.Content>,\n\tPopoverContentProps\n>(({ children, className, sideOffset = 4, ...props }, ref) => {\n\tconst { showArrow, closeButtonAriaLabel, side, showCloseButton } =\n\t\tusePopoverContext();\n\treturn (\n\t\t<RadixPopover.Content\n\t\t\tclassName={popoverContentStyles({ className })}\n\t\t\tsideOffset={sideOffset}\n\t\t\tside={side}\n\t\t\t{...props}\n\t\t\tref={ref}\n\t\t>\n\t\t\t{showCloseButton && (\n\t\t\t\t<PopoverClose\n\t\t\t\t\tclassName=\"absolute top-4 right-4\"\n\t\t\t\t\taria-label={closeButtonAriaLabel}\n\t\t\t\t>\n\t\t\t\t\t<Icon asChild size=\"small\">\n\t\t\t\t\t\t<Cross1Icon />\n\t\t\t\t\t</Icon>\n\t\t\t\t</PopoverClose>\n\t\t\t)}\n\t\t\t{children}\n\t\t\t{showArrow && <RadixPopover.Arrow className=\"fill-gray-700\" />}\n\t\t</RadixPopover.Content>\n\t);\n});\n\n/**\n * Popover Close\n */\n\nconst PopoverClose = RadixPopover.Close;\n\n/**\n * Popover Portal\n */\n\nconst PopoverPortal = RadixPopover.Portal;\n\n/**\n * Popover Anchor\n */\n\nconst PopoverAnchor = RadixPopover.Anchor;\n\nexport {\n\tPopover,\n\tPopoverTrigger,\n\tPopoverContent,\n\tPopoverClose,\n\tPopoverPortal,\n\tPopoverAnchor,\n};\n"]}
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { cn } from "@utilities/cn/cn";
2
+ import { cn } from "../../utilities/cn/cn";
3
3
  import { Progress as ProgressPrimitive } from "radix-ui";
4
4
  import { forwardRef, } from "react";
5
5
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"progress.js","sourceRoot":"","sources":["../../../src/components/progress/progress.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AACtC,OAAO,EAAE,QAAQ,IAAI,iBAAiB,EAAE,MAAM,UAAU,CAAC;AACzD,OAAO,EAGN,UAAU,GACV,MAAM,OAAO,CAAC;AAQf;;;;;;;GAOG;AAEH,MAAM,QAAQ,GAAG,UAAU,CAGzB,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,GAAG,IAAI,EAAE,GAAG,GAAG,GAAG,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACvE,eAAK,SAAS,EAAC,yBAAyB,aACvC,KAAC,iBAAiB,CAAC,IAAI,IACtB,SAAS,EAAE,EAAE,CACZ,iEAAiE,EACjE,SAAS,CACT,EACD,GAAG,EAAE,GAAG,KACJ,KAAK,EACT,GAAG,EAAE,GAAG,YAER,KAAC,iBAAiB,CAAC,SAAS,IAC3B,SAAS,EAAC,oDAAoD,EAC9D,KAAK,EAAE;oBACN,SAAS,EAAE,eAAe,GAAG,GAAG,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,IAAI;iBAC9D,GACA,GACsB,EACxB,SAAS,IAAI,eAAK,SAAS,EAAC,uBAAuB,aAAE,KAAK,SAAQ,IAC9D,CACN,CAAC,CAAC;AACH,QAAQ,CAAC,WAAW,GAAG,iBAAiB,CAAC,IAAI,CAAC,WAAW,CAAC;AAE1D,OAAO,EAAE,QAAQ,EAAE,CAAC"}
1
+ {"version":3,"file":"progress.js","sourceRoot":"/","sources":["components/progress/progress.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AACtC,OAAO,EAAE,QAAQ,IAAI,iBAAiB,EAAE,MAAM,UAAU,CAAC;AACzD,OAAO,EAGN,UAAU,GACV,MAAM,OAAO,CAAC;AAQf;;;;;;;GAOG;AAEH,MAAM,QAAQ,GAAG,UAAU,CAGzB,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,GAAG,IAAI,EAAE,GAAG,GAAG,GAAG,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACvE,eAAK,SAAS,EAAC,yBAAyB,aACvC,KAAC,iBAAiB,CAAC,IAAI,IACtB,SAAS,EAAE,EAAE,CACZ,iEAAiE,EACjE,SAAS,CACT,EACD,GAAG,EAAE,GAAG,KACJ,KAAK,EACT,GAAG,EAAE,GAAG,YAER,KAAC,iBAAiB,CAAC,SAAS,IAC3B,SAAS,EAAC,oDAAoD,EAC9D,KAAK,EAAE;oBACN,SAAS,EAAE,eAAe,GAAG,GAAG,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,IAAI;iBAC9D,GACA,GACsB,EACxB,SAAS,IAAI,eAAK,SAAS,EAAC,uBAAuB,aAAE,KAAK,SAAQ,IAC9D,CACN,CAAC,CAAC;AACH,QAAQ,CAAC,WAAW,GAAG,iBAAiB,CAAC,IAAI,CAAC,WAAW,CAAC;AAE1D,OAAO,EAAE,QAAQ,EAAE,CAAC","sourcesContent":["import { cn } from \"@utilities/cn/cn\";\nimport { Progress as ProgressPrimitive } from \"radix-ui\";\nimport {\n\ttype ComponentPropsWithoutRef,\n\ttype ComponentRef,\n\tforwardRef,\n} from \"react\";\n\nexport type ProgressProps = ComponentPropsWithoutRef<\n\ttypeof ProgressPrimitive.Root\n> & {\n\tshowLabel?: boolean;\n};\n\n/**\n * A progress bar component that displays a progress indicator and a label.\n *\n * @param {Object} props - The component props.\n * @param {string} props.className - The class name for the component.\n * @param {number} props.value - The value of the progress bar.\n * @param {boolean} props.showLabel - Whether to show the label.\n */\n\nconst Progress = forwardRef<\n\tComponentRef<typeof ProgressPrimitive.Root>,\n\tProgressProps\n>(({ className, value, showLabel = true, max = 100, ...props }, ref) => (\n\t<div className=\"flex items-center gap-4\">\n\t\t<ProgressPrimitive.Root\n\t\t\tclassName={cn(\n\t\t\t\t\"relative h-2 w-full overflow-hidden rounded-full bg-gray-200/80\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tmax={max}\n\t\t\t{...props}\n\t\t\tref={ref}\n\t\t>\n\t\t\t<ProgressPrimitive.Indicator\n\t\t\t\tclassName=\"h-full w-full flex-1 bg-gray-700/80 transition-all\"\n\t\t\t\tstyle={{\n\t\t\t\t\ttransform: `translateX(-${100 - ((value || 0) / max) * 100}%)`,\n\t\t\t\t}}\n\t\t\t/>\n\t\t</ProgressPrimitive.Root>\n\t\t{showLabel && <div className=\"text-gray-500 text-sm\">{value}%</div>}\n\t</div>\n));\nProgress.displayName = ProgressPrimitive.Root.displayName;\n\nexport { Progress };\n"]}
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { cn } from "@utilities/cn/cn";
2
+ import { cn } from "../../utilities/cn/cn";
3
3
  import { RadioGroup as RadixRadioGroup } from "radix-ui";
4
4
  import { forwardRef, } from "react";
5
5
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"radio-group.js","sourceRoot":"","sources":["../../../src/components/radio-group/radio-group.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB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AAE,EAAE,CAAC,qBAAqB,EAAE,SAAS,CAAC,KAC3C,KAAK,GACR,CACF,CAAC,CAAC;AAEH,MAAM,cAAc,GAAG,UAAU,CAG/B,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACnC,KAAC,eAAe,CAAC,IAAI,IACpB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACZ,iOAAiO,EACjO,SAAS,CACT,KACG,KAAK,YAET,KAAC,eAAe,CAAC,SAAS,IAAC,SAAS,EAAC,2CAA2C,GAAG,GAC7D,CACvB,CAAC,CAAC;AAEH,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,CAAC","sourcesContent":["import { cn } from \"@utilities/cn/cn\";\nimport { RadioGroup as RadixRadioGroup } from \"radix-ui\";\nimport {\n\ttype ComponentPropsWithoutRef,\n\ttype ComponentRef,\n\tforwardRef,\n} from \"react\";\n\n/**\n * A RadioGroup component that provides a set of radio buttons where only one can be selected at a time.\n *\n * @example\n * ```tsx\n * <RadioGroup defaultValue=\"option1\">\n * <div>\n * <RadioGroupItem value=\"option1\" id=\"option1\" />\n * <label htmlFor=\"option1\">Option 1</label>\n * </div>\n * <div>\n * <RadioGroupItem value=\"option2\" id=\"option2\" />\n * <label htmlFor=\"option2\">Option 2</label>\n * </div>\n * </RadioGroup>\n * ```\n *\n * @param {string} [className] - Additional CSS classes to apply to the root element\n * @param {string} [defaultValue] - The value of the radio item that should be checked when initially rendered\n * @param {string} [value] - The controlled value of the radio item to check\n * @param {function} [onValueChange] - Event handler called when the value changes\n * @param {boolean} [disabled] - When true, prevents the user from interacting with the radio group\n * @param {boolean} [required] - When true, indicates that the user must select a value before the owning form can be submitted\n * @param {string} [name] - The name of the group. Submitted with its owning form as part of a name/value pair\n * @param {string} [dir] - The reading direction of the radio group\n * @param {string} [orientation] - The orientation of the radio group\n * @param {boolean} [loop] - When true, keyboard navigation will loop from last item to first, and vice versa\n * @returns {React.ForwardRefExoticComponent} A React component that renders a radio group\n */\nconst RadioGroup = forwardRef<\n\tComponentRef<typeof RadixRadioGroup.Root>,\n\tComponentPropsWithoutRef<typeof RadixRadioGroup.Root>\n>(({ className, ...props }, ref) => (\n\t<RadixRadioGroup.Root\n\t\tref={ref}\n\t\tclassName={cn(\"flex flex-col gap-2\", className)}\n\t\t{...props}\n\t/>\n));\n\nconst RadioGroupItem = forwardRef<\n\tComponentRef<typeof RadixRadioGroup.Item>,\n\tComponentPropsWithoutRef<typeof RadixRadioGroup.Item>\n>(({ className, ...props }, ref) => (\n\t<RadixRadioGroup.Item\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"flex h-4 w-4 items-center justify-center rounded-full border border-gray-700 bg-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gray-700 data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t<RadixRadioGroup.Indicator className=\"relative h-2 w-2 rounded-full bg-gray-500\" />\n\t</RadixRadioGroup.Item>\n));\n\nexport { RadioGroup, RadioGroupItem };\n"]}
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Select as SelectPrimitive } from "radix-ui";
3
- import { Icon } from "@components/icon/icon";
3
+ import { Icon } from "../icon/icon";
4
4
  import { CheckIcon, ChevronDownIcon, ChevronUpIcon, } from "@radix-ui/react-icons";
5
- import { cn } from "@utilities/cn/cn";
5
+ import { cn } from "../../utilities/cn/cn";
6
6
  import { forwardRef, } from "react";
7
7
  /**
8
8
  * Select
@@ -1 +1 @@
1
- {"version":3,"file":"select.js","sourceRoot":"","sources":["../../../src/components/select/select.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,UAAU,CAAC;AAErD,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EACN,SAAS,EACT,e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CAAC,SAAS,IACzB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,uBAAuB,EAAE,SAAS,CAAC,KAC7C,KAAK,GACR,CACF,CAAC,CAAC;AACH,eAAe,CAAC,WAAW,GAAG,eAAe,CAAC,SAAS,CAAC,WAAW,CAAC;AAEpE,OAAO,EACN,MAAM,EACN,WAAW,EACX,WAAW,EACX,aAAa,EACb,aAAa,EACb,WAAW,EACX,UAAU,EACV,eAAe,EACf,oBAAoB,EACpB,sBAAsB,GACtB,CAAC","sourcesContent":["import { Select as SelectPrimitive } from \"radix-ui\";\n\nimport { Icon } from \"@components/icon/icon\";\nimport {\n\tCheckIcon,\n\tChevronDownIcon,\n\tChevronUpIcon,\n} from \"@radix-ui/react-icons\";\nimport { cn } from \"@utilities/cn/cn\";\nimport {\n\ttype ComponentPropsWithoutRef,\n\ttype ComponentRef,\n\tforwardRef,\n} from \"react\";\n\n/**\n * Select\n */\n\nconst Select = SelectPrimitive.Root;\n\n/**\n * SelectGroup\n */\n\nconst SelectGroup = SelectPrimitive.Group;\n\n/**\n * SelectValue\n */\n\nconst SelectValue = SelectPrimitive.Value;\n\n/**\n * SelectTrigger\n */\n\nconst SelectTrigger = forwardRef<\n\tComponentRef<typeof SelectPrimitive.Trigger>,\n\tComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n\t<SelectPrimitive.Trigger\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-gray-400 bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[placeholder]:text-gray-500 [&>span]:line-clamp-1\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t{children}\n\t\t<SelectPrimitive.Icon asChild>\n\t\t\t<Icon asChild size=\"small\" className=\"opacity-50\">\n\t\t\t\t<ChevronDownIcon />\n\t\t\t</Icon>\n\t\t</SelectPrimitive.Icon>\n\t</SelectPrimitive.Trigger>\n));\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName;\n\n/**\n * SelectScrollUpButton\n */\n\nconst SelectScrollUpButton = forwardRef<\n\tComponentRef<typeof SelectPrimitive.ScrollUpButton>,\n\tComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>\n>(({ className, ...props }, ref) => (\n\t<SelectPrimitive.ScrollUpButton\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"flex cursor-default items-center justify-center py-1\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t<Icon asChild size=\"small\" className=\"opacity-50\">\n\t\t\t<ChevronUpIcon />\n\t\t</Icon>\n\t</SelectPrimitive.ScrollUpButton>\n));\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;\n\n/**\n * SelectScrollDownButton\n */\n\nconst SelectScrollDownButton = forwardRef<\n\tComponentRef<typeof SelectPrimitive.ScrollDownButton>,\n\tComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>\n>(({ className, ...props }, ref) => (\n\t<SelectPrimitive.ScrollDownButton\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"flex cursor-default items-center justify-center py-1\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t<Icon asChild size=\"small\" className=\"opacity-50\">\n\t\t\t<ChevronDownIcon />\n\t\t</Icon>\n\t</SelectPrimitive.ScrollDownButton>\n));\nSelectScrollDownButton.displayName =\n\tSelectPrimitive.ScrollDownButton.displayName;\n\n/**\n * SelectContent\n */\n\nconst SelectContent = forwardRef<\n\tComponentRef<typeof SelectPrimitive.Content>,\n\tComponentPropsWithoutRef<typeof SelectPrimitive.Content>\n>(({ className, children, position = \"popper\", ...props }, ref) => (\n\t<SelectPrimitive.Portal>\n\t\t<SelectPrimitive.Content\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t\"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] origin-[--radix-select-content-transform-origin] overflow-y-auto overflow-x-hidden rounded-md border border-gray-400 bg-white text-gray-700 shadow-md data-[state=closed]:animate-out data-[state=open]:animate-in\",\n\t\t\t\tposition === \"popper\" &&\n\t\t\t\t\t\"data-[side=left]:-translate-x-1 data-[side=top]:-translate-y-1 data-[side=right]:translate-x-1 data-[side=bottom]:translate-y-1\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tposition={position}\n\t\t\t{...props}\n\t\t>\n\t\t\t<SelectScrollUpButton />\n\t\t\t<SelectPrimitive.Viewport\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"p-1\",\n\t\t\t\t\tposition === \"popper\" &&\n\t\t\t\t\t\t\"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]\",\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</SelectPrimitive.Viewport>\n\t\t\t<SelectScrollDownButton />\n\t\t</SelectPrimitive.Content>\n\t</SelectPrimitive.Portal>\n));\nSelectContent.displayName = SelectPrimitive.Content.displayName;\n\n/**\n * SelectLabel\n */\n\nconst SelectLabel = forwardRef<\n\tComponentRef<typeof SelectPrimitive.Label>,\n\tComponentPropsWithoutRef<typeof SelectPrimitive.Label>\n>(({ className, ...props }, ref) => (\n\t<SelectPrimitive.Label\n\t\tref={ref}\n\t\tclassName={cn(\"px-2 py-1.5 font-semibold text-sm\", className)}\n\t\t{...props}\n\t/>\n));\nSelectLabel.displayName = SelectPrimitive.Label.displayName;\n\n/**\n * SelectItem\n */\n\nconst SelectItem = forwardRef<\n\tComponentRef<typeof SelectPrimitive.Item>,\n\tComponentPropsWithoutRef<typeof SelectPrimitive.Item>\n>(({ className, children, ...props }, ref) => (\n\t<SelectPrimitive.Item\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pr-8 pl-2 text-sm outline-none focus-visible:bg-gray-700 focus-visible:text-white data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t<span className=\"absolute right-2 flex h-3.5 w-3.5 items-center justify-center\">\n\t\t\t<SelectPrimitive.ItemIndicator>\n\t\t\t\t<Icon asChild size=\"small\">\n\t\t\t\t\t<CheckIcon />\n\t\t\t\t</Icon>\n\t\t\t</SelectPrimitive.ItemIndicator>\n\t\t</span>\n\t\t<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n\t</SelectPrimitive.Item>\n));\nSelectItem.displayName = SelectPrimitive.Item.displayName;\n\n/**\n * SelectSeparator\n */\n\nconst SelectSeparator = forwardRef<\n\tComponentRef<typeof SelectPrimitive.Separator>,\n\tComponentPropsWithoutRef<typeof SelectPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n\t<SelectPrimitive.Separator\n\t\tref={ref}\n\t\tclassName={cn(\"my-2 h-px bg-gray-200\", className)}\n\t\t{...props}\n\t/>\n));\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName;\n\nexport {\n\tSelect,\n\tSelectGroup,\n\tSelectValue,\n\tSelectTrigger,\n\tSelectContent,\n\tSelectLabel,\n\tSelectItem,\n\tSelectSeparator,\n\tSelectScrollUpButton,\n\tSelectScrollDownButton,\n};\n"]}
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { cn } from "@utilities/cn/cn";
2
+ import { cn } from "../../utilities/cn/cn";
3
3
  import { forwardRef, } from "react";
4
4
  /**
5
5
  * Skeleton
@@ -1 +1 @@
1
- {"version":3,"file":"skeleton.js","sourceRoot":"","sources":["../../../src/components/skeleton/skeleton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AACtC,OAAO,EAGN,UAAU,GACV,MAAM,OAAO,CAAC;AAEf;;GAEG;AAEH,MAAM,QAAQ,GAAG,UAAU,CAGzB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACnC,cACC,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,sCAAsC,EAAE,SAAS,CAAC,KAC5D,KAAK,GACR,CACF,CAAC,CAAC;AACH,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAC;AAElC,OAAO,EAAE,QAAQ,EAAE,CAAC"}
1
+ {"version":3,"file":"skeleton.js","sourceRoot":"/","sources":["components/skeleton/skeleton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AACtC,OAAO,EAGN,UAAU,GACV,MAAM,OAAO,CAAC;AAEf;;GAEG;AAEH,MAAM,QAAQ,GAAG,UAAU,CAGzB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACnC,cACC,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,sCAAsC,EAAE,SAAS,CAAC,KAC5D,KAAK,GACR,CACF,CAAC,CAAC;AACH,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAC;AAElC,OAAO,EAAE,QAAQ,EAAE,CAAC","sourcesContent":["import { cn } from \"@utilities/cn/cn\";\nimport {\n\ttype ComponentPropsWithoutRef,\n\ttype ComponentRef,\n\tforwardRef,\n} from \"react\";\n\n/**\n * Skeleton\n */\n\nconst Skeleton = forwardRef<\n\tComponentRef<\"div\">,\n\tComponentPropsWithoutRef<\"div\">\n>(({ className, ...props }, ref) => (\n\t<div\n\t\tref={ref}\n\t\tclassName={cn(\"animate-pulse rounded-md bg-gray-200\", className)}\n\t\t{...props}\n\t/>\n));\nSkeleton.displayName = \"Skeleton\";\n\nexport { Skeleton };\n"]}
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { Slider as RadixSlider } from "radix-ui";
3
3
  import { forwardRef, useState, } from "react";
4
- import { Tooltip, TooltipContent, TooltipTrigger, } from "@components/tooltip/tooltip";
5
- import { cn } from "@utilities/cn/cn";
4
+ import { Tooltip, TooltipContent, TooltipTrigger, } from "../tooltip/tooltip";
5
+ import { cn } from "../../utilities/cn/cn";
6
6
  /**
7
7
  * A customizable slider component built on top of Radix UI's slider primitive.
8
8
  *
@@ -1 +1 @@
1
- {"version":3,"file":"slider.js","sourceRoot":"","sources":["../../../src/components/slider/slider.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,IAAI,WAAW,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAGN,UAAU,EACV,QAAQ,GACR,MAAM,OAAO,CAAC;AAEf,OAAO,EACN,OAAO,EACP,cAAc,EACd,cAAc,GACd,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAUtC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,MAAM,GAAG,UAAU,CACxB,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,GAAG,EAAE,GAAG,EAAE,UAAU,GAAG,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IAC3E,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAW,YAAY,IAAI,EAAE,CAAC,CAAC;IAEjE,OAAO,CACN,8BACC,MAAC,WAAW,CAAC,IAAI,IAChB,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,aAAa,EAAE,QAAQ,EACvB,SAAS,EAAE,EAAE,CACZ,0DAA0D,EAC1D,SAAS,CACT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AK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAW,YAAY,IAAI,EAAE,CAAC,CAAC;IAEjE,OAAO,CACN,8BACC,MAAC,WAAW,CAAC,IAAI,IAChB,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,aAAa,EAAE,QAAQ,EACvB,SAAS,EAAE,EAAE,CACZ,0DAA0D,EAC1D,SAAS,CACT,KACG,KAAK,aAET,KAAC,WAAW,CAAC,KAAK,IAAC,SAAS,EAAC,mGAAmG,YAC/H,KAAC,WAAW,CAAC,KAAK,IAAC,SAAS,EAAC,6BAA6B,GAAG,GAC1C,EACnB,KAAK,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,KAAK,EAAE,EAAE,CAAC;oBACjC,0EAA0E;oBAC1E,MAAC,OAAO,IAAa,aAAa,EAAE,CAAC,aACpC,KAAC,cAAc,IAAC,OAAO,kBACtB,KAAC,WAAW,CAAC,KAAK,IAAC,SAAS,EAAC,qMAAqM,GAAG,GACrN,EACjB,KAAC,cAAc,cACd,sBAAI,UAAU,GAAK,GACH,KANJ,KAAK,CAOT,CACV,CAAC,IACgB,EAClB,UAAU,IAAI,CACd,eAAK,SAAS,EAAC,2CAA2C,aACzD,sBAAI,GAAG,GAAK,EACZ,sBAAI,GAAG,GAAK,IACP,CACN,IACC,CACH,CAAC;AACH,CAAC,CACD,CAAC;AACF,MAAM,CAAC,WAAW,GAAG,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC;AAElD,OAAO,EAAE,MAAM,EAAE,CAAC","sourcesContent":["import { Slider as RadixSlider } from \"radix-ui\";\nimport {\n\ttype ComponentPropsWithoutRef,\n\ttype ComponentRef,\n\tforwardRef,\n\tuseState,\n} from \"react\";\n\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipTrigger,\n} from \"@components/tooltip/tooltip\";\nimport { cn } from \"@utilities/cn/cn\";\n\nexport type SliderProps = ComponentPropsWithoutRef<typeof RadixSlider.Root> & {\n\t/**\n\t * Whether to show the minimum and maximum values below the slider\n\t * @default true\n\t */\n\tshowMinMax?: boolean;\n};\n\n/**\n * A customizable slider component built on top of Radix UI's slider primitive.\n *\n * @example\n * ```tsx\n * <Slider\n * min={0}\n * max={100}\n * defaultValue={[50]}\n * showMinMax={true}\n * />\n * ```\n *\n * @param {Object} props - The props for the Slider component\n * @param {number[]} [props.defaultValue] - The initial value of the slider\n * @param {number} [props.min=0] - The minimum value of the slider\n * @param {number} [props.max=100] - The maximum value of the slider\n * @param {boolean} [props.showMinMax=true] - Whether to show min/max values below the slider\n * @param {string} [props.className] - Additional CSS classes to apply to the slider\n * @param {React.Ref<ComponentRef<typeof RadixSlider.Root>>} ref - Forwarded ref for the slider root element\n * @returns {JSX.Element} A slider component with optional tooltips and min/max display\n */\nconst Slider = forwardRef<ComponentRef<typeof RadixSlider.Root>, SliderProps>(\n\t({ className, defaultValue, min, max, showMinMax = true, ...props }, ref) => {\n\t\tconst [value, setValue] = useState<number[]>(defaultValue ?? []);\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<RadixSlider.Root\n\t\t\t\t\tref={ref}\n\t\t\t\t\tvalue={value}\n\t\t\t\t\tonValueChange={setValue}\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\"relative flex w-full touch-none select-none items-center\",\n\t\t\t\t\t\tclassName,\n\t\t\t\t\t)}\n\t\t\t\t\t{...props}\n\t\t\t\t>\n\t\t\t\t\t<RadixSlider.Track className=\"relative h-1.5 w-full grow overflow-hidden rounded-full bg-gray-700/20 data-[disabled]:opacity-50\">\n\t\t\t\t\t\t<RadixSlider.Range className=\"absolute h-full bg-gray-700\" />\n\t\t\t\t\t</RadixSlider.Track>\n\t\t\t\t\t{value.map((thumbValue, index) => (\n\t\t\t\t\t\t// biome-ignore lint/suspicious/noArrayIndexKey: <only index is available>\n\t\t\t\t\t\t<Tooltip key={index} delayDuration={0}>\n\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t<RadixSlider.Thumb className=\"block h-4 w-4 rounded-full border border-gray-700 bg-white shadow transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-gray-700 data-[disabled]:pointer-events-none\" />\n\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t<TooltipContent>\n\t\t\t\t\t\t\t\t<p>{thumbValue}</p>\n\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t))}\n\t\t\t\t</RadixSlider.Root>\n\t\t\t\t{showMinMax && (\n\t\t\t\t\t<div className=\"mt-2 flex w-full flex-row justify-between\">\n\t\t\t\t\t\t<p>{min}</p>\n\t\t\t\t\t\t<p>{max}</p>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</>\n\t\t);\n\t},\n);\nSlider.displayName = RadixSlider.Root.displayName;\n\nexport { Slider };\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"slot.js","sourceRoot":"","sources":["../../../src/components/slot/slot.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAE3D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAe/B,MAAM,IAAI,GAAG,KAAK,CAAC,UAAU,CAAoB,CAAC,KAAK,EAAE,YAAY,EAAE,EAAE;IACxE,MAAM,EAAE,QAAQ,EAAE,GAAG,SAAS,EAAE,GAAG,KAAK,CAAC;IAEzC,IAAI,WAAW,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC3B,MAAM,SAAS,GAAG,QAAQ,CAAC;QAE3B,OAAO,CACN,KAAC,SAAS,OAAK,SAAS,EAAE,GAAG,EAAE,YAAY,YACzC,KAAK,CAAC,cAAc,CACpB,SAAS,CAAC,KAAK,CAAC,KAAK,CACrB;gBACA,CAAC,CAAC,KAAK,CAAC,YAAY,CAClB,SAAS,CAAC,KAAK,CAAC,KAAK,EACrB,SAAS,EACT,SAAS,CAAC,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC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AAG,CAAC,GAAG,IAAe,EAAE,EAAE;oBAChD,cAAc,CAAC,GAAG,IAAI,CAAC,CAAC;oBACxB,aAAa,CAAC,GAAG,IAAI,CAAC,CAAC;gBACxB,CAAC,CAAC;YACH,CAAC;YACD,0DAA0D;iBACrD,IAAI,aAAa,EAAE,CAAC;gBACxB,aAAa,CAAC,QAAQ,CAAC,GAAG,aAAa,CAAC;YACzC,CAAC;QACF,CAAC;QACD,iCAAiC;aAC5B,IAAI,QAAQ,KAAK,OAAO,EAAE,CAAC;YAC/B,aAAa,CAAC,QAAQ,CAAC,GAAG,EAAE,GAAG,aAAa,EAAE,GAAG,cAAc,EAAE,CAAC;QACnE,CAAC;aAAM,IAAI,QAAQ,KAAK,WAAW,EAAE,CAAC;YACrC,aAAa,CAAC,QAAQ,CAAC,GAAG,CAAC,aAAa,EAAE,cAAc,CAAC;iBACvD,MAAM,CAAC,OAAO,CAAC;iBACf,IAAI,CAAC,GAAG,CAAC,CAAC;QACb,CAAC;IACF,CAAC;IAED,OAAO,EAAE,GAAG,SAAS,EAAE,GAAG,aAAa,EAAE,CAAC;AAC3C,CAAC;AAED,MAAM,IAAI,GAAG,IAAI,CAAC;AAElB,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC","sourcesContent":["import { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport type { ComponentRef } from \"react\";\nimport * as React from \"react\";\n\n/* -------------------------------------------------------------------------------------------------\n * Slot\n * -----------------------------------------------------------------------------------------------*/\n\ninterface SlotProps {\n\tchildren?: React.ReactNode;\n}\n\n// biome-ignore lint/suspicious/noExplicitAny: <explanation>\ntype AnyRef = ComponentRef<any>;\n// biome-ignore lint/suspicious/noExplicitAny: <explanation>\ntype AnyRefAttributes = React.RefAttributes<any>;\n\nconst Slot = React.forwardRef<AnyRef, SlotProps>((props, forwardedRef) => {\n\tconst { children, ...slotProps } = props;\n\n\tif (isSlottable(children)) {\n\t\tconst slottable = children;\n\n\t\treturn (\n\t\t\t<SlotClone {...slotProps} ref={forwardedRef}>\n\t\t\t\t{React.isValidElement<React.PropsWithChildren<unknown>>(\n\t\t\t\t\tslottable.props.child,\n\t\t\t\t)\n\t\t\t\t\t? React.cloneElement(\n\t\t\t\t\t\t\tslottable.props.child,\n\t\t\t\t\t\t\tundefined,\n\t\t\t\t\t\t\tslottable.props.children(slottable.props.child.props.children),\n\t\t\t\t\t\t)\n\t\t\t\t\t: null}\n\t\t\t</SlotClone>\n\t\t);\n\t}\n\n\treturn (\n\t\t<SlotClone {...slotProps} ref={forwardedRef}>\n\t\t\t{children}\n\t\t</SlotClone>\n\t);\n});\n\nSlot.displayName = \"Slot\";\n\n/* -------------------------------------------------------------------------------------------------\n * SlotClone\n * -----------------------------------------------------------------------------------------------*/\n\ninterface SlotCloneProps {\n\tchildren: React.ReactNode;\n}\n\nconst SlotClone = React.forwardRef<AnyRef, SlotCloneProps>(\n\t(props, forwardedRef) => {\n\t\tconst { children, ...slotProps } = props;\n\n\t\tif (React.isValidElement<AnyRefAttributes>(children)) {\n\t\t\treturn React.cloneElement(children, {\n\t\t\t\t...mergeProps(slotProps, children.props),\n\t\t\t\tref: forwardedRef\n\t\t\t\t\t? composeRefs(forwardedRef, (children as AnyRefAttributes).ref)\n\t\t\t\t\t: (children as AnyRefAttributes).ref,\n\t\t\t});\n\t\t}\n\n\t\treturn React.Children.count(children) > 1\n\t\t\t? React.Children.only(null)\n\t\t\t: null;\n\t},\n);\n\nSlotClone.displayName = \"SlotClone\";\n\n/* -------------------------------------------------------------------------------------------------\n * Slottable\n * -----------------------------------------------------------------------------------------------*/\n\ntype SlottableProps = {\n\tchild: React.ReactNode;\n\tchildren: (child: React.ReactNode) => React.JSX.Element;\n};\n\nconst Slottable = ({ child, children }: SlottableProps) => {\n\treturn children(child);\n};\n\n/* ---------------------------------------------------------------------------------------------- */\n\n// biome-ignore lint/suspicious/noExplicitAny: <explanation>\ntype AnyProps = Record<string, any>;\n\nfunction isSlottable(\n\tchild: React.ReactNode,\n): child is React.ReactElement<SlottableProps> {\n\treturn React.isValidElement(child) && child.type === Slottable;\n}\n\nfunction mergeProps(slotProps: AnyProps, childProps: AnyProps) {\n\t// all child props should override\n\tconst overrideProps = { ...childProps };\n\n\tfor (const propName in childProps) {\n\t\tconst slotPropValue = slotProps[propName];\n\t\tconst childPropValue = childProps[propName];\n\n\t\tconst isHandler = /^on[A-Z]/.test(propName);\n\t\tif (isHandler) {\n\t\t\t// if the handler exists on both, we compose them\n\t\t\tif (slotPropValue && childPropValue) {\n\t\t\t\toverrideProps[propName] = (...args: unknown[]) => {\n\t\t\t\t\tchildPropValue(...args);\n\t\t\t\t\tslotPropValue(...args);\n\t\t\t\t};\n\t\t\t}\n\t\t\t// but if it exists only on the slot, we use only this one\n\t\t\telse if (slotPropValue) {\n\t\t\t\toverrideProps[propName] = slotPropValue;\n\t\t\t}\n\t\t}\n\t\t// if it's `style`, we merge them\n\t\telse if (propName === \"style\") {\n\t\t\toverrideProps[propName] = { ...slotPropValue, ...childPropValue };\n\t\t} else if (propName === \"className\") {\n\t\t\toverrideProps[propName] = [slotPropValue, childPropValue]\n\t\t\t\t.filter(Boolean)\n\t\t\t\t.join(\" \");\n\t\t}\n\t}\n\n\treturn { ...slotProps, ...overrideProps };\n}\n\nconst Root = Slot;\n\nexport { Root, Slot, Slottable };\nexport type { SlotProps };\n"]}
@@ -1,4 +1,4 @@
1
- import type { ResponsiveValue } from "@utilities/responsive/responsive";
1
+ import type { ResponsiveValue } from "../../utilities/responsive/responsive";
2
2
  import { Switch as RadixSwitch } from "radix-ui";
3
3
  export type SwitchProps = RadixSwitch.SwitchProps & {
4
4
  size?: ResponsiveValue<"small" | "medium" | "large">;
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { useFormContext } from "@components/form-field/form-field-context";
3
- import { getVariants } from "@utilities/get-variants/get-variants";
2
+ import { useFormContext } from "../form-field/form-field-context";
3
+ import { getVariants } from "../../utilities/get-variants/get-variants";
4
4
  import { Switch as RadixSwitch } from "radix-ui";
5
5
  import { forwardRef } from "react";
6
6
  const rootStyles = getVariants({
@@ -1 +1 @@
1
- {"version":3,"file":"switch.js","sourceRoot":"","sources":["../../../src/components/switch/switch.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,2CAA2C,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAEnE,OAAO,EAAE,MAAM,IAAI,WAAW,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAqB,UAAU,EAAE,MAAM,OAAO,CAAC;AAOtD,MAAM,UAAU,GAAG,WAAW,CAAC;IAC9B,IAAI,EAAE,wOAAwO;IAC9O,QAAQ,EAAE;QACT,QAAQ,EAAE;YACT,IAAI,EAAE,+BAA+B;SACrC;QACD,KAAK,EAAE;YACN,IAAI,EAAE,4CAA4C;SAClD;QACD,IAAI,EAAE;YACL,KAAK,EAAE,UAAU;YACjB,MAAM,EAAE,UAAU;YAClB,KAAK,EAAE,UAAU;SACjB;KACD;CACD,CAAC,CAAC;AAEH,MAAM,WAAW,GAAG,WAAW,CAAC;IAC/B,IAAI,EAAE,6HAA6H;IACnI,QAAQ,EAAE;QACT,QAAQ,EAAE;YACT,IAAI,EAAE,aAAa;YACnB,KAAK,EAAE,UAAU;SACjB;QACD,IAAI,EAAE;YACL,KAAK,EAAE,SAAS;YAChB,MAAM,EAAE,SAAS;YACjB,KAAK,EAAE,SAAS;SAChB;KACD;CACD,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,UAAU,CAI/B,CACC,EACC,SAAS,EACT,QAAQ,EAAE,eAAe,EACzB,IAAI,GAAG,QAAQ,EACf,KAAK,EAAE,YAAY,EACnB,GAAG,KAAK,EACR,EACD,GAAG,EACF,EAAE;IACH,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,cAA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AAS;SAChB;KACD;CACD,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,UAAU,CAI/B,CACC,EACC,SAAS,EACT,QAAQ,EAAE,eAAe,EACzB,IAAI,GAAG,QAAQ,EACf,KAAK,EAAE,YAAY,EACnB,GAAG,KAAK,EACR,EACD,GAAG,EACF,EAAE;IACH,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,cAAc,CAAC;QAC1C,QAAQ,EAAE,eAAe;QACzB,KAAK,EAAE,YAAY;KACnB,CAAC,CAAC;IACH,OAAO,CACN,KAAC,WAAW,CAAC,IAAI,IAChB,SAAS,EAAE,UAAU,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,EAC3D,QAAQ,EAAE,QAAQ,KACd,KAAK,EACT,GAAG,EAAE,GAAG,YAER,KAAC,WAAW,CAAC,KAAK,IAAC,SAAS,EAAE,WAAW,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,GAAI,GAC/C,CACnB,CAAC;AACH,CAAC,CACD,CAAC","sourcesContent":["import { useFormContext } from \"@components/form-field/form-field-context\";\nimport { getVariants } from \"@utilities/get-variants/get-variants\";\nimport type { ResponsiveValue } from \"@utilities/responsive/responsive\";\nimport { Switch as RadixSwitch } from \"radix-ui\";\nimport { type ComponentRef, forwardRef } from \"react\";\n\nexport type SwitchProps = RadixSwitch.SwitchProps & {\n\tsize?: ResponsiveValue<\"small\" | \"medium\" | \"large\">;\n\terror?: boolean;\n};\n\nconst rootStyles = getVariants({\n\tbase: \"relative flex cursor-pointer appearance-none items-center rounded-full bg-gray-500 transition-colors duration-500 ease-out focus:outline-none focus-visible:ring-2 focus-visible:ring-light-blue-300 data-[state=checked]:bg-green-500\",\n\tvariants: {\n\t\tdisabled: {\n\t\t\ttrue: \"cursor-not-allowed opacity-50\",\n\t\t},\n\t\terror: {\n\t\t\ttrue: \"bg-red-600 data-[state=checked]:bg-red-600\",\n\t\t},\n\t\tsize: {\n\t\t\tsmall: \"h-5 w-10\",\n\t\t\tmedium: \"h-7 w-12\",\n\t\t\tlarge: \"h-9 w-14\",\n\t\t},\n\t},\n});\n\nconst thumbStyles = getVariants({\n\tbase: \"absolute left-1 h-5 w-5 rounded-full transition-transform duration-500 ease-out data-[state=checked]:translate-x-[1.125rem]\",\n\tvariants: {\n\t\tdisabled: {\n\t\t\ttrue: \"bg-gray-300\",\n\t\t\tfalse: \"bg-white\",\n\t\t},\n\t\tsize: {\n\t\t\tsmall: \"h-3 w-3\",\n\t\t\tmedium: \"h-5 w-5\",\n\t\t\tlarge: \"h-7 w-7\",\n\t\t},\n\t},\n});\n\n/**\n * A switch component that toggles between on and off states.\n * Built on top of Radix UI's Switch primitive.\n *\n * @param {SwitchProps} props - The props for the Switch component\n * @param {ResponsiveValue<\"small\" | \"medium\" | \"large\">} [props.size=\"medium\"] - The size of the switch\n * @param {boolean} [props.disabled] - Whether the switch is disabled\n * @param {string} [props.className] - Additional CSS classes to apply\n *\n * @example\n * // Basic usage\n * <Switch />\n *\n * @example\n * // With different sizes\n * <Switch size=\"small\" />\n * <Switch size=\"medium\" />\n * <Switch size=\"large\" />\n *\n * @example\n * // Disabled state\n * <Switch disabled />\n *\n * @example\n * // With onChange handler\n * <Switch onCheckedChange={(checked) => console.log(checked)} />\n *\n * @param {ResponsiveValue<\"small\" | \"medium\" | \"large\">} [props.size=\"medium\"] - The size of the switch\n * @param {boolean} [props.disabled] - Whether the switch is disabled\n * @param {string} [props.className] - Additional CSS classes to apply\n */\nexport const Switch = forwardRef<\n\tComponentRef<typeof RadixSwitch.Root>,\n\tSwitchProps\n>(\n\t(\n\t\t{\n\t\t\tclassName,\n\t\t\tdisabled: initialDisabled,\n\t\t\tsize = \"medium\",\n\t\t\terror: initialError,\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) => {\n\t\tconst { disabled, error } = useFormContext({\n\t\t\tdisabled: initialDisabled,\n\t\t\terror: initialError,\n\t\t});\n\t\treturn (\n\t\t\t<RadixSwitch.Root\n\t\t\t\tclassName={rootStyles({ disabled, size, error, className })}\n\t\t\t\tdisabled={disabled}\n\t\t\t\t{...props}\n\t\t\t\tref={ref}\n\t\t\t>\n\t\t\t\t<RadixSwitch.Thumb className={thumbStyles({ disabled, size })} />\n\t\t\t</RadixSwitch.Root>\n\t\t);\n\t},\n);\n"]}
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { cn } from "@utilities/cn/cn";
2
+ import { cn } from "../../utilities/cn/cn";
3
3
  import { forwardRef } from "react";
4
4
  /**
5
5
  * Table
@@ -1 +1 @@
1
- {"version":3,"file":"table.js","sourceRoot":"","sources":["../../../src/components/table/table.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAEtC,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC;;GAEG;AAEH,MAAM,KAAK,GAAG,UAAU,CAGtB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACnC,cAAK,SAAS,EAAC,+BAA+B,YAC7C,gBACC,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,+BAA+B,EAAE,SAAS,CAAC,KACrD,KAAK,GACR,GACG,CACN,CAAC,CAAC;AACH,KAAK,CAAC,WAAW,GAAG,OAAO,CAAC;AAE5B;;GAEG;AAEH,MAAM,WAAW,GAAG,UAAU,CAG5B,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACnC,gBACC,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACZ,0GAA0G,EAC1G,SAAS,CACT,KACG,KAAK,GACR,CACF,CAAC,CAAC;AACH,WAAW,CAAC,WAAW,GAAG,aAAa,CAAC;AAExC;;GAEG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AEG;AAEH,MAAM,SAAS,GAAG,UAAU,CAG1B,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACnC,aACC,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACZ,sFAAsF,EACtF,SAAS,CACT,KACG,KAAK,GACR,CACF,CAAC,CAAC;AACH,SAAS,CAAC,WAAW,GAAG,WAAW,CAAC;AAEpC;;GAEG;AAEH,MAAM,YAAY,GAAG,UAAU,CAG7B,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACnC,kBACC,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,uCAAuC,EAAE,SAAS,CAAC,KAC7D,KAAK,GACR,CACF,CAAC,CAAC;AACH,YAAY,CAAC,WAAW,GAAG,cAAc,CAAC;AAE1C,OAAO,EACN,KAAK,EACL,WAAW,EACX,SAAS,EACT,WAAW,EACX,SAAS,EACT,QAAQ,EACR,SAAS,EACT,YAAY,GACZ,CAAC","sourcesContent":["import { cn } from \"@utilities/cn/cn\";\nimport type { ComponentPropsWithoutRef, ComponentRef } from \"react\";\nimport { forwardRef } from \"react\";\n\n/**\n * Table\n */\n\nconst Table = forwardRef<\n\tComponentRef<\"table\">,\n\tComponentPropsWithoutRef<\"table\">\n>(({ className, ...props }, ref) => (\n\t<div className=\"relative w-full overflow-auto\">\n\t\t<table\n\t\t\tref={ref}\n\t\t\tclassName={cn(\"w-full caption-bottom text-sm\", className)}\n\t\t\t{...props}\n\t\t/>\n\t</div>\n));\nTable.displayName = \"Table\";\n\n/**\n * TableHeader\n */\n\nconst TableHeader = forwardRef<\n\tComponentRef<\"thead\">,\n\tComponentPropsWithoutRef<\"thead\">\n>(({ className, ...props }, ref) => (\n\t<thead\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"[&_tr]:border-b [&_tr]:bg-gray-700! [&_tr]:text-white [&_tr]:hover:bg-gray-700! [&_tr]:hover:text-white!\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nTableHeader.displayName = \"TableHeader\";\n\n/**\n * TableBody\n */\n\nconst TableBody = forwardRef<\n\tComponentRef<\"tbody\">,\n\tComponentPropsWithoutRef<\"tbody\">\n>(({ className, ...props }, ref) => (\n\t<tbody\n\t\tref={ref}\n\t\tclassName={cn(\"[&_tr:last-child]:border-0\", className)}\n\t\t{...props}\n\t/>\n));\nTableBody.displayName = \"TableBody\";\n\n/**\n * TableFooter\n */\n\nconst TableFooter = forwardRef<\n\tComponentRef<\"tfoot\">,\n\tComponentPropsWithoutRef<\"tfoot\">\n>(({ className, ...props }, ref) => (\n\t<tfoot\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"border-t bg-gray-100 font-medium [&>tr]:bg-gray-100! [&>tr]:text-gray-700! [&>tr]:last:border-b-0\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nTableFooter.displayName = \"TableFooter\";\n\n/**\n * TableRow\n */\n\nconst TableRow = forwardRef<ComponentRef<\"tr\">, ComponentPropsWithoutRef<\"tr\">>(\n\t({ className, ...props }, ref) => (\n\t\t<tr\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t\"border-b transition-colors hover:bg-gray-400 hover:text-white data-[state=selected]:bg-gray-500 data-[state=selected]:text-white\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t),\n);\nTableRow.displayName = \"TableRow\";\n\n/**\n * TableHead\n */\n\nconst TableHead = forwardRef<\n\tComponentRef<\"th\">,\n\tComponentPropsWithoutRef<\"th\">\n>(({ className, ...props }, ref) => (\n\t<th\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"h-10 px-2 text-left align-middle font-medium [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nTableHead.displayName = \"TableHead\";\n\n/**\n * TableCell\n */\n\nconst TableCell = forwardRef<\n\tComponentRef<\"td\">,\n\tComponentPropsWithoutRef<\"td\">\n>(({ className, ...props }, ref) => (\n\t<td\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nTableCell.displayName = \"TableCell\";\n\n/**\n * TableCaption\n */\n\nconst TableCaption = forwardRef<\n\tComponentRef<\"caption\">,\n\tComponentPropsWithoutRef<\"caption\">\n>(({ className, ...props }, ref) => (\n\t<caption\n\t\tref={ref}\n\t\tclassName={cn(\"mt-4 text-start text-gray-500 text-sm\", className)}\n\t\t{...props}\n\t/>\n));\nTableCaption.displayName = \"TableCaption\";\n\nexport {\n\tTable,\n\tTableHeader,\n\tTableBody,\n\tTableFooter,\n\tTableHead,\n\tTableRow,\n\tTableCell,\n\tTableCaption,\n};\n"]}
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { cn } from "@utilities/cn/cn";
2
+ import { cn } from "../../utilities/cn/cn";
3
3
  import { Tabs as TabsPrimitive } from "radix-ui";
4
4
  import { forwardRef, } from "react";
5
5
  const Tabs = TabsPrimitive.Root;
@@ -1 +1 @@
1
- {"version":3,"file":"tabs.js","sourceRoot":"","sources":["../../../src/components/tabs/tabs.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AACtC,OAAO,EAAE,IAAI,IAAI,aAAa,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAGN,UAAU,GACV,MAAM,OAAO,CAAC;AAEf,MAAM,IAAI,GAAG,aAAa,CAAC,IAAI,CAAC;AAEhC,MAAM,QAAQ,GAAG,UAAU,CAGzB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,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G,UAAU,CAGzB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACnC,KAAC,aAAa,CAAC,IAAI,IAClB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACZ,mFAAmF,EACnF,SAAS,CACT,KACG,KAAK,GACR,CACF,CAAC,CAAC;AACH,QAAQ,CAAC,WAAW,GAAG,aAAa,CAAC,IAAI,CAAC,WAAW,CAAC;AAEtD,MAAM,WAAW,GAAG,UAAU,CAG5B,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACnC,KAAC,aAAa,CAAC,OAAO,IACrB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACZ,yUAAyU,EACzU,SAAS,CACT,KACG,KAAK,GACR,CACF,CAAC,CAAC;AACH,WAAW,CAAC,WAAW,GAAG,aAAa,CAAC,OAAO,CAAC,WAAW,CAAC;AAE5D,MAAM,WAAW,GAAG,UAAU,CAG5B,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACnC,KAAC,aAAa,CAAC,OAAO,IACrB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACZ,8GAA8G,EAC9G,SAAS,CACT,KACG,KAAK,GACR,CACF,CAAC,CAAC;AACH,WAAW,CAAC,WAAW,GAAG,aAAa,CAAC,OAAO,CAAC,WAAW,CAAC;AAE5D,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC","sourcesContent":["import { cn } from \"@utilities/cn/cn\";\nimport { Tabs as TabsPrimitive } from \"radix-ui\";\nimport {\n\ttype ComponentPropsWithoutRef,\n\ttype ComponentRef,\n\tforwardRef,\n} from \"react\";\n\nconst Tabs = TabsPrimitive.Root;\n\nconst TabsList = forwardRef<\n\tComponentRef<typeof TabsPrimitive.List>,\n\tComponentPropsWithoutRef<typeof TabsPrimitive.List>\n>(({ className, ...props }, ref) => (\n\t<TabsPrimitive.List\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"inline-flex h-10 items-center justify-center gap-2 bg-gray-100 px-1 text-gray-700\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nTabsList.displayName = TabsPrimitive.List.displayName;\n\nconst TabsTrigger = forwardRef<\n\tComponentRef<typeof TabsPrimitive.Trigger>,\n\tComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>\n>(({ className, ...props }, ref) => (\n\t<TabsPrimitive.Trigger\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 font-medium text-sm transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gray-700 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-white data-[state=active]:shadow-sm\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nTabsTrigger.displayName = TabsPrimitive.Trigger.displayName;\n\nconst TabsContent = forwardRef<\n\tComponentRef<typeof TabsPrimitive.Content>,\n\tComponentPropsWithoutRef<typeof TabsPrimitive.Content>\n>(({ className, ...props }, ref) => (\n\t<TabsPrimitive.Content\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"mt-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gray-700 focus-visible:ring-offset-2\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nTabsContent.displayName = TabsPrimitive.Content.displayName;\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent };\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"toast.js","sourceRoot":"","sources":["../../../src/components/toast/toast.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,EACN,OAAO,IAAI,aAAa,EAExB,KAAK,IAAI,WA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EAAE,GAAG,aAER,cAAK,SAAS,EAAC,0BAA0B,YACxC,eAAK,SAAS,EAAC,cAAc,aAC5B,YAAG,SAAS,EAAC,mCAAmC,YAAE,KAAK,GAAK,EAC5D,YAAG,SAAS,EAAC,uBAAuB,YAAE,WAAW,GAAK,IACjD,GACD,EACN,cAAK,SAAS,EAAC,yCAAyC,YACvD,KAAC,MAAM,IACN,IAAI,EAAC,OAAO,EACZ,IAAI,EAAC,QAAQ,EACb,OAAO,EAAC,WAAW,EACnB,OAAO,EAAE,GAAG,EAAE;wBACb,MAAM,CAAC,OAAO,EAAE,CAAC;wBACjB,WAAW,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;oBACzB,CAAC,YAEA,MAAM,CAAC,KAAK,GACL,GACJ,IACD,CACN,CAAC;AACH,CAAC,CACD,CAAC;AAEF,KAAK,CAAC,WAAW,GAAG,OAAO,CAAC;AAE5B,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC","sourcesContent":["import { forwardRef } from \"react\";\nimport {\n\tToaster as SonnerToaster,\n\ttype ToasterProps,\n\ttoast as sonnerToast,\n} from \"sonner\";\nimport { Button } from \"../button/button\";\n\nexport type ToastProps = {\n\tid: string | number;\n\ttitle: string;\n\tdescription: string;\n\tbutton: {\n\t\tlabel: string;\n\t\tonClick: () => void;\n\t};\n} & ToasterProps;\n\n/**\n * Creates a custom toast notification using the sonner toast library\n * @param toast - The toast configuration object without an ID\n * @param toast.title - The title text to display in the toast\n * @param toast.description - The description text to display in the toast\n * @param toast.button - Configuration for the toast's action button\n * @param toast.button.label - The text label for the action button\n * @param toast.button.onClick - Click handler function for the action button\n * @returns A unique identifier for the created toast\n */\nconst toast = (toast: Omit<ToastProps, \"id\">) => {\n\tconst { title, description, button, ...toastOptions } = toast;\n\treturn sonnerToast.custom((id) => (\n\t\t<Toast\n\t\t\tid={id}\n\t\t\ttitle={title}\n\t\t\tdescription={description}\n\t\t\tbutton={{\n\t\t\t\tlabel: toast.button.label,\n\t\t\t\tonClick: toast.button.onClick,\n\t\t\t}}\n\t\t\t{...toastOptions}\n\t\t/>\n\t));\n};\n\nconst Toaster = SonnerToaster;\n\nToaster.displayName = \"Toaster\";\n\n/** A fully custom toast built on top of sonner. */\nconst Toast = forwardRef<HTMLDivElement, ToastProps>(\n\t({ title, description, button, id }, ref) => {\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName=\"flex w-full items-center gap-4 rounded-lg bg-white p-4 shadow-lg ring-1 ring-black/5 md:max-w-96\"\n\t\t\t\tref={ref}\n\t\t\t>\n\t\t\t\t<div className=\"flex flex-1 items-center\">\n\t\t\t\t\t<div className=\"w-full gap-1\">\n\t\t\t\t\t\t<p className=\"font-medium text-gray-900 text-sm\">{title}</p>\n\t\t\t\t\t\t<p className=\"text-gray-500 text-sm\">{description}</p>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"shrink-0 rounded-md font-medium text-sm\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\tbutton.onClick();\n\t\t\t\t\t\t\tsonnerToast.dismiss(id);\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t{button.label}\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t},\n);\n\nToast.displayName = \"Toast\";\n\nexport { toast, Toast, Toaster };\n"]}
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { cn } from "@utilities/cn/cn";
2
+ import { cn } from "../../utilities/cn/cn";
3
3
  import { Tooltip as RadixTooltip } from "radix-ui";
4
4
  import { createContext, forwardRef, useContext, useMemo } from "react";
5
5
  const TooltipContext = createContext(undefined);
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip.js","sourceRoot":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AO,CAC3B,GAAG,EAAE,CAAC,CAAC;QACN,SAAS;QACT,IAAI;KACJ,CAAC,EACF,CAAC,SAAS,EAAE,IAAI,CAAC,CACjB,CAAC;IACF,OAAO,CACN,KAAC,cAAc,CAAC,QAAQ,IAAC,KAAK,EAAE,YAAY,YAC3C,KAAC,YAAY,CAAC,QAAQ,cACrB,KAAC,YAAY,CAAC,IAAI,OAAK,KAAK,YAAG,QAAQ,GAAqB,GACrC,GACC,CAC1B,CAAC;AACH,CAAC,CAAC;AAEF;;GAEG;AAEH,MAAM,cAAc,GAAG,YAAY,CAAC,OAAO,CAAC;AAE5C;;GAEG;AAEH,MAAM,cAAc,GAAG,UAAU,CAK/B,CAAC,EAAE,SAAS,EAAE,UAAU,GAAG,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IAC5D,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,iBAAiB,EAAE,CAAC;IAChD,OAAO,CACN,MAAC,YAAY,CAAC,OAAO,IACpB,SAAS,EAAE,EAAE,CACZ,sFAAsF,EACtF,SAAS,CACT,EACD,UAAU,EAAE,UAAU,EACtB,IAAI,EAAE,IAAI,KACN,KAAK,EACT,GAAG,EAAE,GAAG,aAEP,QAAQ,EACR,SAAS,IAAI,KAAC,YAAY,CAAC,KAAK,IAAC,SAAS,EAAC,eAAe,GAAG,IACxC,CACvB,CAAC;AACH,CAAC,CAAC,CAAC;AAEH,cAAc,CAAC,WAAW,GAAG,YAAY,CAAC,OAAO,CAAC,WAAW,CAAC;AAE9D,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,CAAC","sourcesContent":["import { cn } from \"@utilities/cn/cn\";\nimport { Tooltip as RadixTooltip } from \"radix-ui\";\nimport { createContext, forwardRef, useContext, useMemo } from \"react\";\n\n/**\n * Tooltip Context\n */\n\ntype TooltipContextType = {\n\tshowArrow?: boolean;\n\tside?: RadixTooltip.TooltipContentProps[\"side\"];\n};\n\nconst TooltipContext = createContext<TooltipContextType | undefined>(undefined);\n\nconst useTooltipContext = () => {\n\tconst context = useContext(TooltipContext);\n\tif (!context) {\n\t\tthrow new Error(\"Tooltip components must be used within a TooltipProvider\");\n\t}\n\treturn context;\n};\n\n/**\n * Tooltip\n */\n\nexport type TooltipProps = React.ComponentProps<typeof RadixTooltip.Root> & {\n\tshowArrow?: boolean;\n\tside?: RadixTooltip.TooltipContentProps[\"side\"];\n};\n\n/**\n * A tooltip component built on top of Radix UI's tooltip primitive.\n *\n * @param {TooltipProps} props - The props for the Tooltip component\n * @param {boolean} [props.showArrow=true] - Whether to show the arrow pointing to the trigger\n * @param {RadixTooltip.TooltipContentProps[\"side\"]} [props.side] - The preferred side to show the tooltip\n *\n * @example\n * ```tsx\n * <Tooltip>\n * <TooltipTrigger>Hover me</TooltipTrigger>\n * <TooltipContent>Tooltip content</TooltipContent>\n * </Tooltip>\n * ```\n */\nconst Tooltip = ({\n\tchildren,\n\tshowArrow = true,\n\tside,\n\t...props\n}: TooltipProps) => {\n\tconst contextValue = useMemo(\n\t\t() => ({\n\t\t\tshowArrow,\n\t\t\tside,\n\t\t}),\n\t\t[showArrow, side],\n\t);\n\treturn (\n\t\t<TooltipContext.Provider value={contextValue}>\n\t\t\t<RadixTooltip.Provider>\n\t\t\t\t<RadixTooltip.Root {...props}>{children}</RadixTooltip.Root>\n\t\t\t</RadixTooltip.Provider>\n\t\t</TooltipContext.Provider>\n\t);\n};\n\n/**\n * Tooltip Trigger\n */\n\nconst TooltipTrigger = RadixTooltip.Trigger;\n\n/**\n * Tooltip Content\n */\n\nconst TooltipContent = forwardRef<\n\tHTMLDivElement,\n\tReact.ComponentPropsWithoutRef<typeof RadixTooltip.Content> & {\n\t\tshowArrow?: boolean;\n\t}\n>(({ className, sideOffset = 4, children, ...props }, ref) => {\n\tconst { showArrow, side } = useTooltipContext();\n\treturn (\n\t\t<RadixTooltip.Content\n\t\t\tclassName={cn(\n\t\t\t\t\"relative z-50 w-fit max-w-72 rounded-md bg-gray-700 p-2 text-sm text-white shadow-md\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tsideOffset={sideOffset}\n\t\t\tside={side}\n\t\t\t{...props}\n\t\t\tref={ref}\n\t\t>\n\t\t\t{children}\n\t\t\t{showArrow && <RadixTooltip.Arrow className=\"fill-gray-700\" />}\n\t\t</RadixTooltip.Content>\n\t);\n});\n\nTooltipContent.displayName = RadixTooltip.Content.displayName;\n\nexport { Tooltip, TooltipTrigger, TooltipContent };\n"]}
package/dist/index.d.ts CHANGED
@@ -1,34 +1,38 @@
1
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, } from "@components/accordion/accordion";
2
- export type { AccordionContentProps, AccordionItemProps, AccordionProps, AccordionTriggerProps, } from "@components/accordion/accordion";
3
- export { Button } from "@components/button/button";
4
- export type { ButtonProps } from "@components/button/button";
5
- export { Card, CardContent, CardFooter, CardHeader, } from "@components/card/card";
6
- export type { CardContentProps, CardFooterProps, CardHeaderProps, CardProps, } from "@components/card/card";
7
- export { Checkbox } from "@components/checkbox/checkbox";
8
- export type { CheckboxProps } from "@components/checkbox/checkbox";
9
- export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, } from "@components/dialog/dialog";
10
- export { getVariants } from "@utilities/get-variants/get-variants";
11
- export type { ResponsiveValue } from "@utilities/responsive/responsive";
12
- export { Label } from "@components/label/label";
13
- export type { LabelProps } from "@components/label/label";
14
- export { Input } from "@components/input/input";
15
- export type { InputProps } from "@components/input/input";
16
- export { Pagination, PaginationItem, PaginationNext, PaginationPrev, } from "@components/pagination/pagination";
17
- export type { PaginationItemProps, PaginationProps, } from "@components/pagination/pagination";
18
- export { Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverPortal, PopoverTrigger, } from "@components/popover/popover";
19
- export type { PopoverContentProps, PopoverProps, } from "@components/popover/popover";
20
- export { Progress } from "@components/progress/progress";
21
- export type { ProgressProps } from "@components/progress/progress";
22
- export { RadioGroup, RadioGroupItem, } from "@components/radio-group/radio-group";
23
- export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, } from "@components/select/select";
24
- export { Skeleton } from "@components/skeleton/skeleton";
25
- export { Slider } from "@components/slider/slider";
26
- export type { SliderProps } from "@components/slider/slider";
27
- export { Switch } from "@components/switch/switch";
28
- export type { SwitchProps } from "@components/switch/switch";
29
- export { Tabs, TabsContent, TabsList, TabsTrigger, } from "@components/tabs/tabs";
30
- export { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, TableFooter, TableCaption, } from "@components/table/table";
31
- export { Toast, Toaster, toast, } from "@components/toast/toast";
32
- export type { ToastProps } from "@components/toast/toast";
33
- export { Tooltip, TooltipContent, TooltipTrigger, } from "@components/tooltip/tooltip";
34
- export type { TooltipProps } from "@components/tooltip/tooltip";
1
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, } from "./components/accordion/accordion";
2
+ export type { AccordionContentProps, AccordionItemProps, AccordionProps, AccordionTriggerProps, } from "./components/accordion/accordion";
3
+ export { Avatar, AvatarFallback, AvatarImage } from "./components/avatar/avatar";
4
+ export { AvatarGroup } from "./components/avatar/avatar-group";
5
+ export type { AvatarGroupProps } from "./components/avatar/avatar-group";
6
+ export { Button } from "./components/button/button";
7
+ export type { ButtonProps } from "./components/button/button";
8
+ export { Card, CardContent, CardFooter, CardHeader, } from "./components/card/card";
9
+ export type { CardContentProps, CardFooterProps, CardHeaderProps, CardProps, } from "./components/card/card";
10
+ export { Checkbox } from "./components/checkbox/checkbox";
11
+ export type { CheckboxProps } from "./components/checkbox/checkbox";
12
+ export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, } from "./components/dialog/dialog";
13
+ export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup, } from "./components/dropdown-menu/dropdown-menu";
14
+ export { getVariants } from "./utilities/get-variants/get-variants";
15
+ export type { ResponsiveValue } from "./utilities/responsive/responsive";
16
+ export { Label } from "./components/label/label";
17
+ export type { LabelProps } from "./components/label/label";
18
+ export { Input } from "./components/input/input";
19
+ export type { InputProps } from "./components/input/input";
20
+ export { Pagination, PaginationItem, PaginationNext, PaginationPrev, } from "./components/pagination/pagination";
21
+ export type { PaginationItemProps, PaginationProps, } from "./components/pagination/pagination";
22
+ export { Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverPortal, PopoverTrigger, } from "./components/popover/popover";
23
+ export type { PopoverContentProps, PopoverProps, } from "./components/popover/popover";
24
+ export { Progress } from "./components/progress/progress";
25
+ export type { ProgressProps } from "./components/progress/progress";
26
+ export { RadioGroup, RadioGroupItem, } from "./components/radio-group/radio-group";
27
+ export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, } from "./components/select/select";
28
+ export { Skeleton } from "./components/skeleton/skeleton";
29
+ export { Slider } from "./components/slider/slider";
30
+ export type { SliderProps } from "./components/slider/slider";
31
+ export { Switch } from "./components/switch/switch";
32
+ export type { SwitchProps } from "./components/switch/switch";
33
+ export { Tabs, TabsContent, TabsList, TabsTrigger, } from "./components/tabs/tabs";
34
+ export { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, TableFooter, TableCaption, } from "./components/table/table";
35
+ export { Toast, Toaster, toast, } from "./components/toast/toast";
36
+ export type { ToastProps } from "./components/toast/toast";
37
+ export { Tooltip, TooltipContent, TooltipTrigger, } from "./components/tooltip/tooltip";
38
+ export type { TooltipProps } from "./components/tooltip/tooltip";
package/dist/index.js CHANGED
@@ -1,21 +1,24 @@
1
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, } from "@components/accordion/accordion";
2
- export { Button } from "@components/button/button";
3
- export { Card, CardContent, CardFooter, CardHeader, } from "@components/card/card";
4
- export { Checkbox } from "@components/checkbox/checkbox";
5
- export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, } from "@components/dialog/dialog";
6
- export { getVariants } from "@utilities/get-variants/get-variants";
7
- export { Label } from "@components/label/label";
8
- export { Input } from "@components/input/input";
9
- export { Pagination, PaginationItem, PaginationNext, PaginationPrev, } from "@components/pagination/pagination";
10
- export { Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverPortal, PopoverTrigger, } from "@components/popover/popover";
11
- export { Progress } from "@components/progress/progress";
12
- export { RadioGroup, RadioGroupItem, } from "@components/radio-group/radio-group";
13
- export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, } from "@components/select/select";
14
- export { Skeleton } from "@components/skeleton/skeleton";
15
- export { Slider } from "@components/slider/slider";
16
- export { Switch } from "@components/switch/switch";
17
- export { Tabs, TabsContent, TabsList, TabsTrigger, } from "@components/tabs/tabs";
18
- export { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, TableFooter, TableCaption, } from "@components/table/table";
19
- export { Toast, Toaster, toast, } from "@components/toast/toast";
20
- export { Tooltip, TooltipContent, TooltipTrigger, } from "@components/tooltip/tooltip";
1
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, } from "./components/accordion/accordion";
2
+ export { Avatar, AvatarFallback, AvatarImage } from "./components/avatar/avatar";
3
+ export { AvatarGroup } from "./components/avatar/avatar-group";
4
+ export { Button } from "./components/button/button";
5
+ export { Card, CardContent, CardFooter, CardHeader, } from "./components/card/card";
6
+ export { Checkbox } from "./components/checkbox/checkbox";
7
+ export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, } from "./components/dialog/dialog";
8
+ export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup, } from "./components/dropdown-menu/dropdown-menu";
9
+ export { getVariants } from "./utilities/get-variants/get-variants";
10
+ export { Label } from "./components/label/label";
11
+ export { Input } from "./components/input/input";
12
+ export { Pagination, PaginationItem, PaginationNext, PaginationPrev, } from "./components/pagination/pagination";
13
+ export { Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverPortal, PopoverTrigger, } from "./components/popover/popover";
14
+ export { Progress } from "./components/progress/progress";
15
+ export { RadioGroup, RadioGroupItem, } from "./components/radio-group/radio-group";
16
+ export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, } from "./components/select/select";
17
+ export { Skeleton } from "./components/skeleton/skeleton";
18
+ export { Slider } from "./components/slider/slider";
19
+ export { Switch } from "./components/switch/switch";
20
+ export { Tabs, TabsContent, TabsList, TabsTrigger, } from "./components/tabs/tabs";
21
+ export { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, TableFooter, TableCaption, } from "./components/table/table";
22
+ export { Toast, Toaster, toast, } from "./components/toast/toast";
23
+ export { Tooltip, TooltipContent, TooltipTrigger, } from "./components/tooltip/tooltip";
21
24
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,SAAS,EACT,gBAAgB,EAChB,aAAa,EACb,gBAAgB,GAChB,MAAM,iCAAiC,CAAC;AAOzC,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAEnD,O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EACN,OAAO,EACP,aAAa,EACb,YAAY,EACZ,cAAc,EACd,aAAa,EACb,cAAc,GACd,MAAM,6BAA6B,CAAC;AAKrC,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAEzD,OAAO,EACN,UAAU,EACV,cAAc,GACd,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACN,MAAM,EACN,aAAa,EACb,WAAW,EACX,UAAU,EACV,WAAW,EACX,sBAAsB,EACtB,oBAAoB,EACpB,eAAe,EACf,aAAa,EACb,WAAW,GACX,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAEnD,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAEnD,OAAO,EACN,IAAI,EACJ,WAAW,EACX,QAAQ,EACR,WAAW,GACX,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACN,KAAK,EACL,SAAS,EACT,SAAS,EACT,SAAS,EACT,WAAW,EACX,QAAQ,EACR,WAAW,EACX,YAAY,GACZ,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACN,KAAK,EACL,OAAO,EACP,KAAK,GACL,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EACN,OAAO,EACP,cAAc,EACd,cAAc,GACd,MAAM,6BAA6B,CAAC","sourcesContent":["export {\n\tAccordion,\n\tAccordionContent,\n\tAccordionItem,\n\tAccordionTrigger,\n} from \"@components/accordion/accordion\";\nexport type {\n\tAccordionContentProps,\n\tAccordionItemProps,\n\tAccordionProps,\n\tAccordionTriggerProps,\n} from \"@components/accordion/accordion\";\nexport { Avatar, AvatarFallback, AvatarImage } from \"@components/avatar/avatar\";\nexport { AvatarGroup } from \"@components/avatar/avatar-group\";\nexport type { AvatarGroupProps } from \"@components/avatar/avatar-group\";\nexport { Button } from \"@components/button/button\";\nexport type { ButtonProps } from \"@components/button/button\";\nexport {\n\tCard,\n\tCardContent,\n\tCardFooter,\n\tCardHeader,\n} from \"@components/card/card\";\nexport type {\n\tCardContentProps,\n\tCardFooterProps,\n\tCardHeaderProps,\n\tCardProps,\n} from \"@components/card/card\";\nexport { Checkbox } from \"@components/checkbox/checkbox\";\nexport type { CheckboxProps } from \"@components/checkbox/checkbox\";\nexport {\n\tDialog,\n\tDialogClose,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@components/dialog/dialog\";\nexport {\n\tDropdownMenu,\n\tDropdownMenuTrigger,\n\tDropdownMenuContent,\n\tDropdownMenuItem,\n\tDropdownMenuCheckboxItem,\n\tDropdownMenuRadioItem,\n\tDropdownMenuLabel,\n\tDropdownMenuSeparator,\n\tDropdownMenuShortcut,\n\tDropdownMenuGroup,\n\tDropdownMenuPortal,\n\tDropdownMenuSub,\n\tDropdownMenuSubContent,\n\tDropdownMenuSubTrigger,\n\tDropdownMenuRadioGroup,\n} from \"@components/dropdown-menu/dropdown-menu\";\nexport { getVariants } from \"@utilities/get-variants/get-variants\";\nexport type { ResponsiveValue } from \"@utilities/responsive/responsive\";\nexport { Label } from \"@components/label/label\";\nexport type { LabelProps } from \"@components/label/label\";\nexport { Input } from \"@components/input/input\";\nexport type { InputProps } from \"@components/input/input\";\nexport {\n\tPagination,\n\tPaginationItem,\n\tPaginationNext,\n\tPaginationPrev,\n} from \"@components/pagination/pagination\";\nexport type {\n\tPaginationItemProps,\n\tPaginationProps,\n} from \"@components/pagination/pagination\";\nexport {\n\tPopover,\n\tPopoverAnchor,\n\tPopoverClose,\n\tPopoverContent,\n\tPopoverPortal,\n\tPopoverTrigger,\n} from \"@components/popover/popover\";\nexport type {\n\tPopoverContentProps,\n\tPopoverProps,\n} from \"@components/popover/popover\";\nexport { Progress } from \"@components/progress/progress\";\nexport type { ProgressProps } from \"@components/progress/progress\";\nexport {\n\tRadioGroup,\n\tRadioGroupItem,\n} from \"@components/radio-group/radio-group\";\nexport {\n\tSelect,\n\tSelectContent,\n\tSelectGroup,\n\tSelectItem,\n\tSelectLabel,\n\tSelectScrollDownButton,\n\tSelectScrollUpButton,\n\tSelectSeparator,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@components/select/select\";\nexport { Skeleton } from \"@components/skeleton/skeleton\";\nexport { Slider } from \"@components/slider/slider\";\nexport type { SliderProps } from \"@components/slider/slider\";\nexport { Switch } from \"@components/switch/switch\";\nexport type { SwitchProps } from \"@components/switch/switch\";\nexport {\n\tTabs,\n\tTabsContent,\n\tTabsList,\n\tTabsTrigger,\n} from \"@components/tabs/tabs\";\nexport {\n\tTable,\n\tTableBody,\n\tTableCell,\n\tTableHead,\n\tTableHeader,\n\tTableRow,\n\tTableFooter,\n\tTableCaption,\n} from \"@components/table/table\";\nexport {\n\tToast,\n\tToaster,\n\ttoast,\n} from \"@components/toast/toast\";\nexport type { ToastProps } from \"@components/toast/toast\";\nexport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipTrigger,\n} from \"@components/tooltip/tooltip\";\nexport type { TooltipProps } from \"@components/tooltip/tooltip\";\n"]}
@@ -0,0 +1,47 @@
1
+ @import "tailwindcss";
2
+
3
+ @source "../components";
4
+ @source "../utilities";
5
+
6
+ @theme {
7
+ --animate-accordion-up: accordion-up 350ms ease;
8
+ --animate-accordion-down: accordion-down 350ms ease;
9
+ --animate-fade-in: fade-in 350ms ease;
10
+ --animate-fade-out: fade-out 350ms ease;
11
+ }
12
+
13
+ @keyframes accordion-up {
14
+ from {
15
+ height: var(--radix-accordion-content-height);
16
+ }
17
+ to {
18
+ height: 0;
19
+ }
20
+ }
21
+
22
+ @keyframes accordion-down {
23
+ from {
24
+ height: 0;
25
+ }
26
+ to {
27
+ height: var(--radix-accordion-content-height);
28
+ }
29
+ }
30
+
31
+ @keyframes fade-in {
32
+ from {
33
+ opacity: 0;
34
+ }
35
+ to {
36
+ opacity: 1;
37
+ }
38
+ }
39
+
40
+ @keyframes fade-out {
41
+ from {
42
+ opacity: 1;
43
+ }
44
+ to {
45
+ opacity: 0;
46
+ }
47
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"cn.js","sourceRoot":"","sources":["../../../src/utilities/cn/cn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,IAAI,EAAE,MAAM,MAAM,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAqB,EAAE,EAAE;IAC9C,OAAO,OAAO,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;AAClC,CAAC,CAAC"}
1
+ {"version":3,"file":"cn.js","sourceRoot":"/","sources":["utilities/cn/cn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,IAAI,EAAE,MAAM,MAAM,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAqB,EAAE,EAAE;IAC9C,OAAO,OAAO,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;AAClC,CAAC,CAAC","sourcesContent":["import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport const cn = (...classes: ClassValue[]) => {\n\treturn twMerge(clsx(...classes));\n};\n"]}
@@ -1,4 +1,4 @@
1
- import type { ResponsiveValue } from "@utilities/responsive/responsive";
1
+ import type { ResponsiveValue } from "../responsive/responsive";
2
2
  type VariantValue = Record<string, string>;
3
3
  type VariantConfig = Record<string, VariantValue>;
4
4
  type StringBoolean = "true" | "false";
@@ -1,4 +1,4 @@
1
- import { cn } from "@utilities/cn/cn";
1
+ import { cn } from "../cn/cn";
2
2
  /**
3
3
  * Creates a function that generates classes based on variant configurations and responsive props
4
4
  *
@@ -1 +1 @@
1
- {"version":3,"file":"get-variants.js","sourceRoot":"","sources":["../../../src/utilities/get-variants/get-variants.ts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AK,CAAC,EAAE,EAAE,CAChB,KAAK,CAAC,GAAG,CAAC,KAAK,MAAM,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC,KAAK,KAAK,CACrD,EACA,CAAC;YACF,OAAO,SAAS,CAAC;QAClB,CAAC;QACD,OAAO,SAAS,CAAC;IAClB,CAAC,CAAC;SACD,MAAM,CAAC,OAAO,CAAC,CAAC;IAElB,OAAO,EAAE,CAAC,IAAI,EAAE,iBAAiB,EAAE,eAAe,EAAE,SAAS,CAAC,CAAC;AAChE,CAAC,CAAC","sourcesContent":["import { cn } from \"@utilities/cn/cn\";\nimport type {\n\tBreakpointsMap,\n\tResponsiveValue,\n} from \"@utilities/responsive/responsive\";\n\ntype VariantValue = Record<string, string>;\ntype VariantConfig = Record<string, VariantValue>;\n\ntype StringBoolean = \"true\" | \"false\";\ntype BooleanVariant = Partial<Record<StringBoolean, string>>;\n\ntype VariantPropValue<T> = T extends BooleanVariant\n\t? ResponsiveValue<boolean> | undefined\n\t: T extends Record<string, unknown>\n\t\t? ResponsiveValue<keyof T>\n\t\t: never;\n\ntype VariantProps<T extends VariantConfig> = {\n\t[K in keyof T]: VariantPropValue<T[K]>;\n} & {\n\tclassName?: string;\n};\n\ntype ResponsiveClassesConfig<T extends VariantConfig> = {\n\tbase: string;\n\tvariants?: T;\n\tcompoundVariants?: Partial<VariantProps<T>>[];\n};\n\n/**\n * Creates a function that generates classes based on variant configurations and responsive props\n *\n * @template T - Type extending VariantConfig (Record of variant names to their possible values and corresponding classes)\n *\n * @param config - Configuration object for variants\n * @param config.base - Base classes that are always applied\n * @param config.variants - Object containing variant definitions where each key is a variant name\n * and value is either a string of class names, an object mapping variant values to class names,\n * or an object with true/false keys for boolean variants\n * @param config.compoundVariants - Optional array of compound variants that apply additional classes\n * when multiple variants have specific values\n *\n * @returns A function that accepts variant props and returns classes with twMerge\n *\n * @example\n * const getButtonVariants = getVariants({\n * base: \"px-4 py-2 rounded\",\n * variants: {\n * intent: {\n * primary: \"bg-blue-500 text-white\",\n * secondary: \"bg-gray-200 text-gray-800\"\n * },\n * size: {\n * sm: \"text-sm\",\n * lg: \"text-lg\"\n * },\n * disabled: {\n * true: \"opacity-50 cursor-not-allowed\"\n * }\n * }\n * });\n *\n * // Usage:\n * getButtonVariants({ intent: \"primary\", size: \"lg\", disabled: true })\n * // Or with responsive values:\n * getButtonVariants({ intent: { initial: \"primary\", md: \"secondary\" } })\n */\nexport const getVariants =\n\t<T extends VariantConfig>({\n\t\tbase,\n\t\tvariants,\n\t\tcompoundVariants,\n\t}: ResponsiveClassesConfig<T>) =>\n\t({ className, ...props }: VariantProps<T>) => {\n\t\tconst responsiveClasses = Object.entries(props)\n\t\t\t.flatMap(([key, propValue]) => {\n\t\t\t\tconst variant = variants?.[key];\n\t\t\t\tconst value =\n\t\t\t\t\ttypeof propValue === \"boolean\" ? String(propValue) : propValue;\n\n\t\t\t\t// Handle undefined values\n\t\t\t\tif (!value) return;\n\n\t\t\t\tconst variantValue = variant?.[value as keyof typeof variant];\n\n\t\t\t\t// Handle string values\n\t\t\t\tif (typeof variantValue === \"string\") {\n\t\t\t\t\treturn variantValue;\n\t\t\t\t}\n\n\t\t\t\t// Handle responsive values\n\t\t\t\treturn Object.entries(value as Partial<BreakpointsMap<T>>)\n\t\t\t\t\t.map(([breakpoint, value]) => {\n\t\t\t\t\t\t// If the breakpoint is initial, return the variant value without breakpoint prefix\n\t\t\t\t\t\tif (breakpoint === \"initial\") {\n\t\t\t\t\t\t\treturn variants?.[key]?.[value as keyof typeof variant];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Otherwise, return the variant value with the breakpoint prefix\n\t\t\t\t\t\treturn variants?.[key]?.[value as keyof typeof variant]\n\t\t\t\t\t\t\t?.split(\" \")\n\t\t\t\t\t\t\t.map((className) => `${breakpoint}:${className}`)\n\t\t\t\t\t\t\t.join(\" \");\n\t\t\t\t\t})\n\t\t\t\t\t.join(\" \");\n\t\t\t})\n\t\t\t.join(\" \");\n\n\t\tconst compoundClasses = compoundVariants\n\t\t\t?.map(({ className, ...compound }) => {\n\t\t\t\tif (\n\t\t\t\t\tObject.entries(compound).every(\n\t\t\t\t\t\t([key, value]) =>\n\t\t\t\t\t\t\tprops[key] === String(value) || props[key] === value,\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\treturn className;\n\t\t\t\t}\n\t\t\t\treturn undefined;\n\t\t\t})\n\t\t\t.filter(Boolean);\n\n\t\treturn cn(base, responsiveClasses, compoundClasses, className);\n\t};\n"]}