@lotte-innovate/ui-component-test 0.1.65 → 0.1.67
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +133 -133
- package/dist/globals.css +4 -4
- package/dist/lib/.storybook/main.d.ts +3 -0
- package/dist/lib/.storybook/manager.d.ts +1 -0
- package/dist/lib/.storybook/preview.d.ts +9 -0
- package/dist/lib/Typography/Header/index.d.ts +1 -1
- package/dist/lib/Typography/Text/index.d.ts +1 -1
- package/dist/lib/color/constants.d.ts +0 -15
- package/dist/lib/color/constants.js +0 -32
- package/dist/lib/color/constants.mjs.map +1 -1
- package/dist/lib/components/Accordion/index.d.ts +1 -0
- package/dist/lib/components/Accordion/index.js +18 -4
- package/dist/lib/components/Accordion/index.mjs +1 -1
- package/dist/lib/components/Accordion/index.mjs.map +1 -1
- package/dist/lib/components/AlertDialog/AlertDialogAction.d.ts +2 -2
- package/dist/lib/components/AlertDialog/AlertDialogCancel.d.ts +2 -2
- package/dist/lib/components/AlertDialog/AlertDialogContent.d.ts +1 -1
- package/dist/lib/components/AlertDialog/AlertDialogRoot.js +9 -6
- package/dist/lib/components/AlertDialog/AlertDialogRoot.mjs +2 -1
- package/dist/lib/components/AlertDialog/AlertDialogRoot.mjs.map +1 -1
- package/dist/lib/components/AlertDialog/AlertDialogTrigger.d.ts +2 -2
- package/dist/lib/components/AspectRatio/index.js +3 -1
- package/dist/lib/components/AspectRatio/index.mjs +1 -1
- package/dist/lib/components/AspectRatio/index.mjs.map +1 -1
- package/dist/lib/components/Avatar/index.d.ts +1 -1
- package/dist/lib/components/Avatar/index.js +9 -1
- package/dist/lib/components/Avatar/index.mjs +2 -1
- package/dist/lib/components/Avatar/index.mjs.map +1 -1
- package/dist/lib/components/Badge/index.d.ts +2 -2
- package/dist/lib/components/Badge/index.js +10 -1
- package/dist/lib/components/Badge/index.mjs +1 -1
- package/dist/lib/components/Badge/index.mjs.map +1 -1
- package/dist/lib/components/BubbleChart/index.js +1 -1
- package/dist/lib/components/BubbleChart/index.mjs.map +1 -1
- package/dist/lib/components/Button/index.d.ts +2 -2
- package/dist/lib/components/Button/index.js +10 -1
- package/dist/lib/components/Button/index.mjs +1 -1
- package/dist/lib/components/Button/index.mjs.map +1 -1
- package/dist/lib/components/Callout/CalloutRoot.d.ts +1 -1
- package/dist/lib/components/Callout/CalloutRoot.js +11 -3
- package/dist/lib/components/Callout/CalloutRoot.mjs +2 -1
- package/dist/lib/components/Callout/CalloutRoot.mjs.map +1 -1
- package/dist/lib/components/Card/index.d.ts +2 -2
- package/dist/lib/components/Card/index.js +8 -1
- package/dist/lib/components/Card/index.mjs +1 -1
- package/dist/lib/components/Card/index.mjs.map +1 -1
- package/dist/lib/components/Checkbox/index.d.ts +1 -1
- package/dist/lib/components/Checkbox/index.js +10 -2
- package/dist/lib/components/Checkbox/index.mjs +1 -1
- package/dist/lib/components/Checkbox/index.mjs.map +1 -1
- package/dist/lib/components/CheckboxCard/index.d.ts +1 -1
- package/dist/lib/components/CheckboxCard/index.js +8 -1
- package/dist/lib/components/CheckboxCard/index.mjs +1 -1
- package/dist/lib/components/CheckboxCard/index.mjs.map +1 -1
- package/dist/lib/components/CheckboxGroup/CheckboxGroupRoot.js +11 -2
- package/dist/lib/components/CheckboxGroup/CheckboxGroupRoot.mjs +2 -1
- package/dist/lib/components/CheckboxGroup/CheckboxGroupRoot.mjs.map +1 -1
- package/dist/lib/components/ContextMenu/ContextMenuContent.d.ts +1 -1
- package/dist/lib/components/ContextMenu/ContextMenuItem.d.ts +1 -1
- package/dist/lib/components/ContextMenu/ContextMenuItemIndicator.d.ts +1 -1
- package/dist/lib/components/ContextMenu/ContextMenuRadioGroup.js +1 -0
- package/dist/lib/components/ContextMenu/ContextMenuRadioGroup.mjs +1 -0
- package/dist/lib/components/ContextMenu/ContextMenuRadioGroup.mjs.map +1 -1
- package/dist/lib/components/ContextMenu/ContextMenuRoot.js +11 -2
- package/dist/lib/components/ContextMenu/ContextMenuRoot.mjs +2 -1
- package/dist/lib/components/ContextMenu/ContextMenuRoot.mjs.map +1 -1
- package/dist/lib/components/ContextMenu/ContextMenuSubContent.d.ts +1 -1
- package/dist/lib/components/DataList/DataListLabel.d.ts +1 -1
- package/dist/lib/components/DataList/DataListRoot.js +9 -2
- package/dist/lib/components/DataList/DataListRoot.mjs +2 -1
- package/dist/lib/components/DataList/DataListRoot.mjs.map +1 -1
- package/dist/lib/components/DataList/DataListValue.d.ts +1 -1
- package/dist/lib/components/Dialog/DialogAction.d.ts +1 -1
- package/dist/lib/components/Dialog/DialogCancel.d.ts +1 -1
- package/dist/lib/components/Dialog/DialogContent.d.ts +1 -1
- package/dist/lib/components/Dialog/DialogRoot.js +9 -1
- package/dist/lib/components/Dialog/DialogRoot.mjs +2 -1
- package/dist/lib/components/Dialog/DialogRoot.mjs.map +1 -1
- package/dist/lib/components/DropdownMenu/DropdonMenuSubContent.d.ts +1 -1
- package/dist/lib/components/DropdownMenu/DropdownMenuContent.d.ts +1 -1
- package/dist/lib/components/DropdownMenu/DropdownMenuItem.d.ts +1 -1
- package/dist/lib/components/DropdownMenu/DropdownMenuItemIndicator.d.ts +1 -1
- package/dist/lib/components/DropdownMenu/DropdownMenuRoot.js +10 -1
- package/dist/lib/components/DropdownMenu/DropdownMenuRoot.mjs +2 -1
- package/dist/lib/components/DropdownMenu/DropdownMenuRoot.mjs.map +1 -1
- package/dist/lib/components/DropdownMenu/DropdownMenuTrigger.d.ts +1 -1
- package/dist/lib/components/HoverCard/HoverCardContent.d.ts +2 -2
- package/dist/lib/components/HoverCard/HoverCardRoot.js +10 -1
- package/dist/lib/components/HoverCard/HoverCardRoot.mjs +2 -1
- package/dist/lib/components/HoverCard/HoverCardRoot.mjs.map +1 -1
- package/dist/lib/components/IconButton/index.d.ts +1 -1
- package/dist/lib/components/IconButton/index.js +9 -1
- package/dist/lib/components/IconButton/index.mjs +1 -1
- package/dist/lib/components/IconButton/index.mjs.map +1 -1
- package/dist/lib/components/Inset/index.d.ts +1 -1
- package/dist/lib/components/Inset/index.js +7 -1
- package/dist/lib/components/Inset/index.mjs +1 -1
- package/dist/lib/components/Inset/index.mjs.map +1 -1
- package/dist/lib/components/Label/index.d.ts +1 -1
- package/dist/lib/components/Label/index.js +11 -3
- package/dist/lib/components/Label/index.mjs +1 -1
- package/dist/lib/components/Label/index.mjs.map +1 -1
- package/dist/lib/components/Menubar/MenubarContent.d.ts +1 -1
- package/dist/lib/components/Menubar/MenubarItem.d.ts +1 -1
- package/dist/lib/components/Menubar/MenubarItemIndicator.d.ts +1 -1
- package/dist/lib/components/Menubar/MenubarRadioGroup.js +1 -0
- package/dist/lib/components/Menubar/MenubarRadioGroup.mjs +1 -0
- package/dist/lib/components/Menubar/MenubarRadioGroup.mjs.map +1 -1
- package/dist/lib/components/Menubar/MenubarRoot.d.ts +1 -1
- package/dist/lib/components/Menubar/MenubarRoot.js +13 -3
- package/dist/lib/components/Menubar/MenubarRoot.mjs +2 -1
- package/dist/lib/components/Menubar/MenubarRoot.mjs.map +1 -1
- package/dist/lib/components/Menubar/MenubarSubContent.d.ts +1 -1
- package/dist/lib/components/Menubar/MenubarTrigger.d.ts +1 -1
- package/dist/lib/components/NavigationMenu/NavigationMenuContent.d.ts +1 -1
- package/dist/lib/components/NavigationMenu/NavigationMenuLink.d.ts +1 -1
- package/dist/lib/components/NavigationMenu/NavigationMenuList.d.ts +1 -1
- package/dist/lib/components/NavigationMenu/NavigationMenuRoot.js +11 -2
- package/dist/lib/components/NavigationMenu/NavigationMenuRoot.mjs +2 -1
- package/dist/lib/components/NavigationMenu/NavigationMenuRoot.mjs.map +1 -1
- package/dist/lib/components/NavigationMenu/NavigationMenuTrigger.d.ts +1 -1
- package/dist/lib/components/NavigationMenu/NavigationMenuViewport.d.ts +2 -2
- package/dist/lib/components/Popover/PopoverClose.d.ts +1 -1
- package/dist/lib/components/Popover/PopoverContent.d.ts +1 -1
- package/dist/lib/components/Popover/PopoverRoot.js +8 -1
- package/dist/lib/components/Popover/PopoverRoot.mjs +2 -1
- package/dist/lib/components/Popover/PopoverRoot.mjs.map +1 -1
- package/dist/lib/components/Progress/index.d.ts +1 -1
- package/dist/lib/components/Progress/index.js +11 -1
- package/dist/lib/components/Progress/index.mjs +1 -1
- package/dist/lib/components/Progress/index.mjs.map +1 -1
- package/dist/lib/components/RadarChart/index.js +1 -1
- package/dist/lib/components/RadarChart/index.mjs.map +1 -1
- package/dist/lib/components/Radio/index.js +10 -4
- package/dist/lib/components/Radio/index.mjs +1 -1
- package/dist/lib/components/Radio/index.mjs.map +1 -1
- package/dist/lib/components/RadioCards/RadioCardsItem.d.ts +1 -1
- package/dist/lib/components/RadioCards/RadioCardsRoot.js +12 -2
- package/dist/lib/components/RadioCards/RadioCardsRoot.mjs +2 -1
- package/dist/lib/components/RadioCards/RadioCardsRoot.mjs.map +1 -1
- package/dist/lib/components/RadioGroup/RadioGroupRoot.js +11 -2
- package/dist/lib/components/RadioGroup/RadioGroupRoot.mjs +2 -1
- package/dist/lib/components/RadioGroup/RadioGroupRoot.mjs.map +1 -1
- package/dist/lib/components/ScrollArea/index.js +3 -1
- package/dist/lib/components/ScrollArea/index.mjs +1 -1
- package/dist/lib/components/ScrollArea/index.mjs.map +1 -1
- package/dist/lib/components/SegmentedControl/SegmentedControlRoot.js +7 -1
- package/dist/lib/components/SegmentedControl/SegmentedControlRoot.mjs +1 -1
- package/dist/lib/components/SegmentedControl/SegmentedControlRoot.mjs.map +1 -1
- package/dist/lib/components/Select/index.d.ts +4 -2
- package/dist/lib/components/Select/index.js +30 -13
- package/dist/lib/components/Select/index.mjs +1 -1
- package/dist/lib/components/Select/index.mjs.map +1 -1
- package/dist/lib/components/Separator/index.js +7 -1
- package/dist/lib/components/Separator/index.mjs +1 -1
- package/dist/lib/components/Separator/index.mjs.map +1 -1
- package/dist/lib/components/Skeleton/index.d.ts +1 -1
- package/dist/lib/components/Skeleton/index.js +4 -1
- package/dist/lib/components/Skeleton/index.mjs +1 -1
- package/dist/lib/components/Skeleton/index.mjs.map +1 -1
- package/dist/lib/components/Slider/index.d.ts +1 -1
- package/dist/lib/components/Slider/index.js +13 -5
- package/dist/lib/components/Slider/index.mjs +1 -1
- package/dist/lib/components/Slider/index.mjs.map +1 -1
- package/dist/lib/components/Spinner/index.js +3 -1
- package/dist/lib/components/Spinner/index.mjs +1 -1
- package/dist/lib/components/Spinner/index.mjs.map +1 -1
- package/dist/lib/components/TabNav/index.js +6 -4
- package/dist/lib/components/TabNav/index.mjs +1 -1
- package/dist/lib/components/TabNav/index.mjs.map +1 -1
- package/dist/lib/components/Table/index.d.ts +1 -1
- package/dist/lib/components/Table/index.js +7 -1
- package/dist/lib/components/Table/index.mjs +1 -1
- package/dist/lib/components/Table/index.mjs.map +1 -1
- package/dist/lib/components/Tabs/index.d.ts +1 -1
- package/dist/lib/components/Tabs/index.js +4 -4
- package/dist/lib/components/Tabs/index.mjs +1 -1
- package/dist/lib/components/Tabs/index.mjs.map +1 -1
- package/dist/lib/components/TextArea/index.d.ts +1 -1
- package/dist/lib/components/TextArea/index.js +11 -4
- package/dist/lib/components/TextArea/index.mjs +1 -1
- package/dist/lib/components/TextArea/index.mjs.map +1 -1
- package/dist/lib/components/TextField/index.d.ts +1 -1
- package/dist/lib/components/TextField/index.js +11 -4
- package/dist/lib/components/TextField/index.mjs +1 -1
- package/dist/lib/components/TextField/index.mjs.map +1 -1
- package/dist/lib/components/Toast/ToastActionButton.d.ts +1 -1
- package/dist/lib/components/Toast/ToastActionButton.js +2 -2
- package/dist/lib/components/Toast/ToastActionButton.mjs +1 -1
- package/dist/lib/components/Toast/ToastActionButton.mjs.map +1 -1
- package/dist/lib/components/Toast/ToastRoot.d.ts +1 -1
- package/dist/lib/components/Toast/ToastRoot.js +11 -3
- package/dist/lib/components/Toast/ToastRoot.mjs +2 -1
- package/dist/lib/components/Toast/ToastRoot.mjs.map +1 -1
- package/dist/lib/components/Toggle/ToggleWithText.d.ts +1 -1
- package/dist/lib/components/Toggle/ToggleWithText.js +9 -1
- package/dist/lib/components/Toggle/ToggleWithText.mjs +1 -1
- package/dist/lib/components/Toggle/ToggleWithText.mjs.map +1 -1
- package/dist/lib/components/Toggle/index.d.ts +1 -1
- package/dist/lib/components/Toggle/index.js +9 -1
- package/dist/lib/components/Toggle/index.mjs +1 -1
- package/dist/lib/components/Toggle/index.mjs.map +1 -1
- package/dist/lib/components/ToggleGroup/ToggleGroupRoot.js +10 -2
- package/dist/lib/components/ToggleGroup/ToggleGroupRoot.mjs +2 -1
- package/dist/lib/components/ToggleGroup/ToggleGroupRoot.mjs.map +1 -1
- package/dist/lib/components/ToggleSwitch/index.d.ts +1 -1
- package/dist/lib/components/ToggleSwitch/index.js +13 -1
- package/dist/lib/components/ToggleSwitch/index.mjs +1 -1
- package/dist/lib/components/ToggleSwitch/index.mjs.map +1 -1
- package/dist/lib/components/Tooltip/index.d.ts +2 -2
- package/dist/lib/components/Tooltip/index.js +13 -8
- package/dist/lib/components/Tooltip/index.mjs +1 -1
- package/dist/lib/components/Tooltip/index.mjs.map +1 -1
- package/dist/lib/constants.d.ts +0 -2
- package/dist/lib/constants.js +7 -31
- package/dist/lib/constants.mjs +1 -1
- package/dist/lib/constants.mjs.map +1 -1
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/index.js +1 -0
- package/dist/lib/index.mjs +1 -1
- package/dist/lib/theme/ThemeProvider.d.ts +16 -0
- package/dist/lib/theme/ThemeProvider.js +29 -0
- package/dist/lib/theme/ThemeProvider.mjs +3 -0
- package/dist/lib/theme/ThemeProvider.mjs.map +1 -0
- package/dist/lib/theme/index.d.ts +2 -0
- package/dist/lib/theme/index.js +2 -0
- package/dist/lib/tsconfig.tsbuildinfo +1 -1
- package/dist/lib/utils/classPrefixes.js +1 -0
- package/dist/lib/utils/useDarkMode.js +1 -0
- package/dist/lib/utils/useDarkMode.mjs +1 -0
- package/dist/lib/utils/useDarkMode.mjs.map +1 -1
- package/dist/tailwind.config.js +4 -7
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +141 -140
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../lib/components/Select/index.js"],"sourcesContent":["var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { Theme, Select as SelectTheme } from '@radix-ui/themes';\nimport React from 'react';\nimport { cva } from 'class-variance-authority';\nimport { cn } from '../../../lib/utils/utils';\nimport { radiusVariants, selectAppearanceStyle } from '../../../lib/constants';\nvar selectVariants = cva('', {\n variants: {\n radius: __assign({}, radiusVariants['base']),\n },\n defaultVariants: {\n radius: 'medium',\n },\n});\nexport var Root = React.forwardRef(function (_a, ref) {\n var scaling = _a.scaling, size = _a.size, color = _a.color, children = _a.children, props = __rest(_a, [\"scaling\", \"size\", \"color\", \"children\"]);\n var sizeTheme = '2';\n if (size === 'small')\n sizeTheme = '1';\n if (size === 'large')\n sizeTheme = '3';\n return (_jsx(Theme, { scaling: scaling, accentColor: color, hasBackground: false, children: _jsx(\"div\", { ref: ref, children: _jsx(SelectTheme.Root, __assign({ size: sizeTheme }, props, { children: children })) }) }));\n});\nRoot.displayName = 'Select.Root';\nexport var Trigger = React.forwardRef(function (_a, forwardedRef) {\n var _b = _a.appearance, appearance = _b === void 0 ? 'classic' : _b, color = _a.color, size = _a.size, radius = _a.radius, children = _a.children, className = _a.className, props = __rest(_a, [\"appearance\", \"color\", \"size\", \"radius\", \"children\", \"className\"]);\n if (!color)\n color = 'red';\n return (_jsx(SelectTheme.Trigger, __assign({ ref: forwardedRef, variant: appearance, radius: radius, className: cn(selectVariants({ radius: radius }), selectAppearanceStyle(appearance, color), className) }, props, { children: children })));\n});\nTrigger.displayName = 'Select.Trigger';\nexport var Content = React.forwardRef(function (_a, forwardedRef) {\n var appearance = _a.appearance, color = _a.color, size = _a.size, radius = _a.radius, children = _a.children, className = _a.className, props = __rest(_a, [\"appearance\", \"color\", \"size\", \"radius\", \"children\", \"className\"]);\n if (!color)\n color = 'red';\n if (radius === 'full')\n radius = 'large';\n return (_jsx(SelectTheme.Content, __assign({ ref: forwardedRef, color: color }, props, { className: cn(selectVariants({ radius: radius }), className), children: children })));\n});\nContent.displayName = 'Select.Content';\nexport var Item = React.forwardRef(function (_a, forwardedRef) {\n var value = _a.value, children = _a.children, className = _a.className, radius = _a.radius, props = __rest(_a, [\"value\", \"children\", \"className\", \"radius\"]);\n return (_jsx(SelectTheme.Item, __assign({ ref: forwardedRef, value: value }, props, { className: cn(selectVariants({ radius: radius }), className), children: children })));\n});\nItem.displayName = 'Select.Item';\nexport var Group = React.forwardRef(function (_a, forwardedRef) {\n var children = _a.children, className = _a.className, props = __rest(_a, [\"children\", \"className\"]);\n return (_jsx(SelectTheme.Group, __assign({ ref: forwardedRef }, props, { className: className, children: children })));\n});\nGroup.displayName = 'Select.Group';\nexport var Label = React.forwardRef(function (_a, forwardedRef) {\n var children = _a.children, className = _a.className, props = __rest(_a, [\"children\", \"className\"]);\n return (_jsx(SelectTheme.Label, __assign({ ref: forwardedRef }, props, { className: className, children: children })));\n});\nLabel.displayName = 'Select.Label';\nexport var Separator = React.forwardRef(function (_a, forwardedRef) {\n var children = _a.children, className = _a.className, props = __rest(_a, [\"children\", \"className\"]);\n return (_jsx(SelectTheme.Separator, __assign({ ref: forwardedRef }, props, { className: className, children: children })));\n});\nSeparator.displayName = 'Select.Separator';\nvar Select = {\n Root: Root,\n Trigger: Trigger,\n Content: Content,\n Item: Item,\n Group: Group,\n Label: Label,\n Separator: Separator,\n};\nexport default Select;\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__rest","e","indexOf","getOwnPropertySymbols","propertyIsEnumerable","selectVariants","cva","variants","radius","radiusVariants","defaultVariants","Root","React","forwardRef","_a","ref","scaling","size","color","children","props","sizeTheme","_jsx","Theme","accentColor","hasBackground","SelectTheme","displayName","Trigger","forwardedRef","_b","appearance","className","variant","cn","selectAppearanceStyle","Content","Item","value","Group","Label","Separator","Select"],"mappings":"4RAAA,IAAIA,EAAsC,WAStC,OARAA,EAAWC,OAAOC,QAAU,SAASC,GACjC,IAAK,IAAIC,EAAGC,EAAI,EAAGC,EAAIC,UAAUC,OAAQH,EAAIC,EAAGD,IAE5C,IAAK,IAAII,KADTL,EAAIG,UAAUF,GACOJ,OAAOS,UAAUC,eAAeC,KAAKR,EAAGK,KACzDN,EAAEM,GAAKL,EAAEK,IAEjB,OAAON,CACf,EACWH,EAASa,MAAMC,KAAMP,UAChC,EACIQ,EAAkC,SAAUX,EAAGY,GAC/C,IAAIb,EAAI,CAAA,EACR,IAAK,IAAIM,KAAKL,EAAOH,OAAOS,UAAUC,eAAeC,KAAKR,EAAGK,IAAMO,EAAEC,QAAQR,GAAK,IAC9EN,EAAEM,GAAKL,EAAEK,IACb,GAAS,MAALL,GAAqD,mBAAjCH,OAAOiB,sBACtB,KAAIb,EAAI,EAAb,IAAgBI,EAAIR,OAAOiB,sBAAsBd,GAAIC,EAAII,EAAED,OAAQH,IAC3DW,EAAEC,QAAQR,EAAEJ,IAAM,GAAKJ,OAAOS,UAAUS,qBAAqBP,KAAKR,EAAGK,EAAEJ,MACvEF,EAAEM,EAAEJ,IAAMD,EAAEK,EAAEJ,IAF4B,CAItD,OAAOF,CACX,EAOIiB,EAAiBC,EAAI,GAAI,CACzBC,SAAU,CACNC,OAAQvB,EAAS,CAAA,EAAIwB,EA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YAAW,SAAUC,EAAIe,GAClD,IAAIV,EAAWL,EAAGK,SAAUa,EAAYlB,EAAGkB,UAAWZ,EAAQpB,EAAOc,EAAI,CAAC,WAAY,cACtF,OAAQQ,EAAKI,EAAYe,UAAWxD,EAAS,CAAE8B,IAAKc,GAAgBT,EAAO,CAAEY,UAAWA,EAAWb,SAAUA,IACjH,IACAsB,EAAUd,YAAc,mBACrB,IAACe,EAAS,CACT/B,KAAMA,EACNiB,QAASA,EACTQ,QAASA,EACTC,KAAMA,EACNE,MAAOA,EACPC,MAAOA,EACPC,UAAWA"}
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../lib/components/Select/index.js"],"sourcesContent":["var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { Theme, Select as SelectTheme } from '@radix-ui/themes';\nimport React, { createContext, useContext } from 'react';\nimport { cva } from 'class-variance-authority';\nimport { cn } from '../../../lib/utils/utils';\nimport { radiusVariants, selectAppearanceStyle } from '../../../lib/constants';\nimport { useTheme } from '../../../lib/theme';\nvar selectVariants = cva('', {\n variants: {\n radius: __assign({}, radiusVariants['base']),\n },\n defaultVariants: {\n radius: 'medium',\n },\n});\nvar SelectContext = createContext({\n size: 'medium',\n scaling: '100%',\n color: 'red',\n radius: 'medium',\n appearance: 'classic',\n});\nexport var useSelectContext = function () {\n return useContext(SelectContext);\n};\nexport var Root = React.forwardRef(function (_a, ref) {\n var scaling = _a.scaling, size = _a.size, _b = _a.color, color = _b === void 0 ? 'red' : _b, radius = _a.radius, appearance = _a.appearance, children = _a.children, props = __rest(_a, [\"scaling\", \"size\", \"color\", \"radius\", \"appearance\", \"children\"]);\n var theme = useTheme().theme;\n var sizeTheme = '2';\n if (size === 'small')\n sizeTheme = '1';\n if (size === 'large')\n sizeTheme = '3';\n var contextValue = {\n scaling: theme.themeScaling || scaling,\n color: theme.themeColor || color,\n radius: theme.themeRadius || radius,\n size: size,\n sizeTheme: sizeTheme,\n appearance: appearance,\n };\n return (_jsx(SelectContext.Provider, { value: contextValue, children: _jsx(Theme, { scaling: contextValue.scaling, accentColor: contextValue.color, hasBackground: false, children: _jsx(\"div\", { ref: ref, children: _jsx(SelectTheme.Root, __assign({ size: sizeTheme }, props, { children: children })) }) }) }));\n});\nRoot.displayName = 'Select.Root';\nexport var Trigger = React.forwardRef(function (_a, forwardedRef) {\n var children = _a.children, className = _a.className, props = __rest(_a, [\"children\", \"className\"]);\n var _b = useSelectContext(), _c = _b.radius, radius = _c === void 0 ? 'medium' : _c, color = _b.color, _d = _b.appearance, appearance = _d === void 0 ? 'classic' : _d;\n return (_jsx(SelectTheme.Trigger, __assign({ ref: forwardedRef, variant: appearance, radius: radius, className: cn(selectVariants({ radius: radius }), selectAppearanceStyle(appearance, color), className) }, props, { children: children })));\n});\nTrigger.displayName = 'Select.Trigger';\nexport var Content = React.forwardRef(function (_a, forwardedRef) {\n var children = _a.children, className = _a.className, props = __rest(_a, [\"children\", \"className\"]);\n var _b = useSelectContext(), radius = _b.radius, color = _b.color;\n return (_jsx(SelectTheme.Content, __assign({ ref: forwardedRef, color: color }, props, { className: cn(selectVariants({ radius: radius == 'full' ? 'large' : radius }), className), children: children })));\n});\nContent.displayName = 'Select.Content';\nexport var Item = React.forwardRef(function (_a, forwardedRef) {\n var value = _a.value, children = _a.children, className = _a.className, props = __rest(_a, [\"value\", \"children\", \"className\"]);\n var radius = useSelectContext().radius;\n return (_jsx(SelectTheme.Item, __assign({ ref: forwardedRef, value: value }, props, { className: cn(selectVariants({ radius: radius }), className), children: children })));\n});\nItem.displayName = 'Select.Item';\nexport var Group = React.forwardRef(function (_a, forwardedRef) {\n var children = _a.children, className = _a.className, props = __rest(_a, [\"children\", \"className\"]);\n return (_jsx(SelectTheme.Group, __assign({ ref: forwardedRef }, props, { className: className, children: children })));\n});\nGroup.displayName = 'Select.Group';\nexport var Label = React.forwardRef(function (_a, forwardedRef) {\n var children = _a.children, className = _a.className, props = __rest(_a, [\"children\", \"className\"]);\n return (_jsx(SelectTheme.Label, __assign({ ref: forwardedRef }, props, { className: className, children: children })));\n});\nLabel.displayName = 'Select.Label';\nexport var Separator = React.forwardRef(function (_a, forwardedRef) {\n var children = _a.children, className = _a.className, props = __rest(_a, [\"children\", \"className\"]);\n return (_jsx(SelectTheme.Separator, __assign({ ref: forwardedRef }, props, { className: className, children: children })));\n});\nSeparator.displayName = 'Select.Separator';\nvar Select = {\n Root: Root,\n Trigger: Trigger,\n Content: Content,\n Item: Item,\n Group: Group,\n Label: Label,\n Separator: Separator,\n};\nexport default Select;\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__rest","e","indexOf","getOwnPropertySymbols","propertyIsEnumerable","selectVariants","cva","variants","radius","radiusVariants","defaultVariants","SelectContext","createContext","size","scaling","color","appearance","useSelectContext","useContext","Root","React","forwardRef","_a","ref","_b","children","props","theme","useTheme","sizeTheme","contextValue","themeScaling","themeColor","themeRadius","_jsx","Provider","value","Theme","accentColor","hasBackground","SelectTheme","displayName","Trigger","forwardedRef","className","_c","_d","variant","cn","selectAppearanceStyle","Content","Item","Group","Label","Separator","Select"],"mappings":"yXAAA,IAAIA,EAAsC,WAStC,OARAA,EAAWC,OAAOC,QAAU,SAASC,GACjC,IAAK,IAAI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GAClD,IAAIlB,EAAWH,EAAGG,SAAUmB,EAAYtB,EAAGsB,UAAWlB,EAAQ1B,EAAOsB,EAAI,CAAC,WAAY,cACtF,OAAQY,EAAKM,EAAYc,UAAWrE,EAAS,CAAEsC,IAAKoB,GAAgBjB,EAAO,CAAEkB,UAAWA,EAAWnB,SAAUA,IACjH,IACA6B,EAAUb,YAAc,mBACrB,IAACc,EAAS,CACTpC,KAAMA,EACNuB,QAASA,EACTQ,QAASA,EACTC,KAAMA,EACNC,MAAOA,EACPC,MAAOA,EACPC,UAAWA"}
|
@@ -26,6 +26,7 @@ import { cva } from 'class-variance-authority';
|
|
26
26
|
import { cn } from '../../../lib/utils/utils';
|
27
27
|
import { bgColorStyle, scalingVariants } from '../../../lib/constants';
|
28
28
|
import { Separator as SeparatorTheme, Theme } from '@radix-ui/themes';
|
29
|
+
import { useTheme } from '../../../lib/theme';
|
29
30
|
var separatorVariants = cva('', {
|
30
31
|
variants: {
|
31
32
|
scaling: __assign({}, scalingVariants),
|
@@ -34,6 +35,11 @@ var separatorVariants = cva('', {
|
|
34
35
|
});
|
35
36
|
export var Separator = React.forwardRef(function (_a, forwardedRef) {
|
36
37
|
var orientation = _a.orientation, scaling = _a.scaling, size = _a.size, _b = _a.color, color = _b === void 0 ? 'slate' : _b, className = _a.className, children = _a.children, props = __rest(_a, ["orientation", "scaling", "size", "color", "className", "children"]);
|
38
|
+
var theme = useTheme().theme;
|
39
|
+
var separatorStyle = {
|
40
|
+
scaling: theme.themeScaling || scaling,
|
41
|
+
color: theme.themeColor || color,
|
42
|
+
};
|
37
43
|
var sizeTheme = '1';
|
38
44
|
if (size === 'medium')
|
39
45
|
sizeTheme = '2';
|
@@ -41,7 +47,7 @@ export var Separator = React.forwardRef(function (_a, forwardedRef) {
|
|
41
47
|
sizeTheme = '3';
|
42
48
|
if (size === 'fill-large')
|
43
49
|
sizeTheme = '4';
|
44
|
-
return (_jsx(Theme, { hasBackground: false, className: "flex items-center justify-center", children: _jsx(SeparatorTheme, __assign({ orientation: orientation, size: sizeTheme, className: cn("bg-".concat(color, "A-6 dark:bg-").concat(color, "DarkA-6"), separatorVariants({ scaling: scaling }), className) }, props, { children: children })) }));
|
50
|
+
return (_jsx(Theme, { hasBackground: false, className: "flex items-center justify-center", children: _jsx(SeparatorTheme, __assign({ orientation: orientation, size: sizeTheme, className: cn("bg-".concat(separatorStyle.color, "A-6 dark:bg-").concat(separatorStyle.color, "DarkA-6"), separatorVariants({ scaling: separatorStyle.scaling }), className) }, props, { children: children })) }));
|
45
51
|
});
|
46
52
|
Separator.displayName = 'Separator';
|
47
53
|
export default Separator;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{jsx as r}from"react/jsx-runtime";import
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import e from"react";import{cva as t}from"class-variance-authority";import{cn as o}from"../../utils/utils.mjs";import{scalingVariants as a,bgColorStyle as i}from"../../constants.mjs";import{Theme as n,Separator as c}from"@radix-ui/themes";import{useTheme as l}from"../../theme/ThemeProvider.mjs";var s=function(){return s=Object.assign||function(r){for(var e,t=1,o=arguments.length;t<o;t++)for(var a in e=arguments[t])Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=e[a]);return r},s.apply(this,arguments)},m=function(r,e){var t={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&e.indexOf(o)<0&&(t[o]=r[o]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(o=Object.getOwnPropertySymbols(r);a<o.length;a++)e.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(r,o[a])&&(t[o[a]]=r[o[a]])}return t},f=t("",{variants:{scaling:s({},a),color:i()}}),p=e.forwardRef((function(e,t){var a=e.orientation,i=e.scaling,p=e.size,u=e.color,g=void 0===u?"slate":u,h=e.className,d=e.children,y=m(e,["orientation","scaling","size","color","className","children"]),O=l().theme,b={scaling:O.themeScaling||i,color:O.themeColor||g},j="1";return"medium"===p&&(j="2"),"large"===p&&(j="3"),"fill-large"===p&&(j="4"),r(n,{hasBackground:!1,className:"flex items-center justify-center",children:r(c,s({orientation:a,size:j,className:o("bg-".concat(b.color,"A-6 dark:bg-").concat(b.color,"DarkA-6"),f({scaling:b.scaling}),h)},y,{children:d}))})}));p.displayName="Separator";export{p as Separator,p as default};
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../lib/components/Separator/index.js"],"sourcesContent":["var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport React from 'react';\nimport { cva } from 'class-variance-authority';\nimport { cn } from '../../../lib/utils/utils';\nimport { bgColorStyle, scalingVariants } from '../../../lib/constants';\nimport { Separator as SeparatorTheme, Theme } from '@radix-ui/themes';\nvar separatorVariants = cva('', {\n variants: {\n scaling: __assign({}, scalingVariants),\n color: bgColorStyle(),\n },\n});\nexport var Separator = React.forwardRef(function (_a, forwardedRef) {\n var orientation = _a.orientation, scaling = _a.scaling, size = _a.size, _b = _a.color, color = _b === void 0 ? 'slate' : _b, className = _a.className, children = _a.children, props = __rest(_a, [\"orientation\", \"scaling\", \"size\", \"color\", \"className\", \"children\"]);\n var sizeTheme = '1';\n if (size === 'medium')\n sizeTheme = '2';\n if (size === 'large')\n sizeTheme = '3';\n if (size === 'fill-large')\n sizeTheme = '4';\n return (_jsx(Theme, { hasBackground: false, className: \"flex items-center justify-center\", children: _jsx(SeparatorTheme, __assign({ orientation: orientation, size: sizeTheme, className: cn(\"bg-\".concat(color, \"A-6 dark:bg-\").concat(color, \"DarkA-6\"), separatorVariants({ scaling: scaling }), className) }, props, { children: children })) }));\n});\nSeparator.displayName = 'Separator';\nexport default Separator;\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__rest","e","indexOf","getOwnPropertySymbols","propertyIsEnumerable","separatorVariants","cva","variants","scaling","scalingVariants","color","bgColorStyle","Separator","React","forwardRef","_a","forwardedRef","orientation","size","_b","className","children","props","sizeTheme","_jsx","Theme","hasBackground","SeparatorTheme","cn","concat","displayName"],"mappings":"
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../lib/components/Separator/index.js"],"sourcesContent":["var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport React from 'react';\nimport { cva } from 'class-variance-authority';\nimport { cn } from '../../../lib/utils/utils';\nimport { bgColorStyle, scalingVariants } from '../../../lib/constants';\nimport { Separator as SeparatorTheme, Theme } from '@radix-ui/themes';\nimport { useTheme } from '../../../lib/theme';\nvar separatorVariants = cva('', {\n variants: {\n scaling: __assign({}, scalingVariants),\n color: bgColorStyle(),\n },\n});\nexport var Separator = React.forwardRef(function (_a, forwardedRef) {\n var orientation = _a.orientation, scaling = _a.scaling, size = _a.size, _b = _a.color, color = _b === void 0 ? 'slate' : _b, className = _a.className, children = _a.children, props = __rest(_a, [\"orientation\", \"scaling\", \"size\", \"color\", \"className\", \"children\"]);\n var theme = useTheme().theme;\n var separatorStyle = {\n scaling: theme.themeScaling || scaling,\n color: theme.themeColor || color,\n };\n var sizeTheme = '1';\n if (size === 'medium')\n sizeTheme = '2';\n if (size === 'large')\n sizeTheme = '3';\n if (size === 'fill-large')\n sizeTheme = '4';\n return (_jsx(Theme, { hasBackground: false, className: \"flex items-center justify-center\", children: _jsx(SeparatorTheme, __assign({ orientation: orientation, size: sizeTheme, className: cn(\"bg-\".concat(separatorStyle.color, \"A-6 dark:bg-\").concat(separatorStyle.color, \"DarkA-6\"), separatorVariants({ scaling: separatorStyle.scaling }), className) }, props, { children: children })) }));\n});\nSeparator.displayName = 'Separator';\nexport default Separator;\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__rest","e","indexOf","getOwnPropertySymbols","propertyIsEnumerable","separatorVariants","cva","variants","scaling","scalingVariants","color","bgColorStyle","Separator","React","forwardRef","_a","forwardedRef","orientation","size","_b","className","children","props","theme","useTheme","separatorStyle","themeScaling","themeColor","sizeTheme","_jsx","Theme","hasBackground","SeparatorTheme","cn","concat","displayName"],"mappings":"gVAAA,IAAIA,EAAsC,WAStC,OARAA,EAAWC,OAAOC,QAAU,SAASC,GACjC,IAAK,IAAIC,EAAGC,EAAI,EAAGC,EAAIC,UAAUC,OAAQH,EAAIC,EAAGD,IAE5C,IAAK,IAAII,KADTL,EAAIG,UAAUF,GACOJ,OAAOS,UAAUC,eAAeC,KAAKR,EAAGK,KACzDN,EAAEM,GAAKL,EAAEK,IAEjB,OAAON,CACf,EACWH,E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wB,OAAOT,EAAef,MAAO,WAAYL,EAAkB,CAAEG,QAASiB,EAAejB,UAAYY,IAAcE,EAAO,CAAED,SAAUA,MACvX,IACAT,EAAUuB,YAAc"}
|
@@ -8,7 +8,7 @@ export interface SkeletonProps extends VariantProps<typeof separatorVariants> {
|
|
8
8
|
height?: string;
|
9
9
|
}
|
10
10
|
declare const separatorVariants: (props?: ({
|
11
|
-
radius?: "
|
11
|
+
radius?: "none" | "small" | "medium" | "large" | "full" | null | undefined;
|
12
12
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
13
13
|
export declare const Skeleton: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & SkeletonProps & React.RefAttributes<HTMLSpanElement>>;
|
14
14
|
export default Skeleton;
|
@@ -26,6 +26,7 @@ import { cva } from 'class-variance-authority';
|
|
26
26
|
import { Theme, Skeleton as SkeletonTheme } from '@radix-ui/themes';
|
27
27
|
import { cn } from '../../../lib/utils/utils';
|
28
28
|
import { radiusVariants } from '../../../lib/constants';
|
29
|
+
import { useTheme } from '../../../lib/theme';
|
29
30
|
var separatorVariants = cva('', {
|
30
31
|
variants: {
|
31
32
|
radius: __assign({}, radiusVariants['base']),
|
@@ -36,7 +37,9 @@ var separatorVariants = cva('', {
|
|
36
37
|
});
|
37
38
|
export var Skeleton = React.forwardRef(function (_a, forwardedRef) {
|
38
39
|
var children = _a.children, className = _a.className, radius = _a.radius, loading = _a.loading, width = _a.width, height = _a.height, skeletonProps = __rest(_a, ["children", "className", "radius", "loading", "width", "height"]);
|
39
|
-
|
40
|
+
var theme = useTheme().theme;
|
41
|
+
var radiusStyle = theme.themeRadius || radius;
|
42
|
+
return (_jsx(Theme, { children: _jsx(SkeletonTheme, __assign({ ref: forwardedRef, loading: loading, width: width, height: height, className: cn('', cn(separatorVariants({ radius: radiusStyle }), className)) }, skeletonProps, { children: children })) }));
|
40
43
|
});
|
41
44
|
Skeleton.displayName = 'Skeleton';
|
42
45
|
export default Skeleton;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{jsx as r}from"react/jsx-runtime";import t from"react";import{cva as e}from"class-variance-authority";import{Theme as a,Skeleton as i}from"@radix-ui/themes";import{cn as o}from"../../utils/utils.mjs";import{radiusVariants as n}from"../../constants.mjs";var
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import t from"react";import{cva as e}from"class-variance-authority";import{Theme as a,Skeleton as i}from"@radix-ui/themes";import{cn as o}from"../../utils/utils.mjs";import{radiusVariants as n}from"../../constants.mjs";import{useTheme as s}from"../../theme/ThemeProvider.mjs";var l=function(){return l=Object.assign||function(r){for(var t,e=1,a=arguments.length;e<a;e++)for(var i in t=arguments[e])Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=t[i]);return r},l.apply(this,arguments)},m=function(r,t){var e={};for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&t.indexOf(a)<0&&(e[a]=r[a]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(a=Object.getOwnPropertySymbols(r);i<a.length;i++)t.indexOf(a[i])<0&&Object.prototype.propertyIsEnumerable.call(r,a[i])&&(e[a[i]]=r[a[i]])}return e},c=e("",{variants:{radius:l({},n.base)},defaultVariants:{radius:"medium"}}),d=t.forwardRef((function(t,e){var n=t.children,d=t.className,f=t.radius,u=t.loading,h=t.width,p=t.height,y=m(t,["children","className","radius","loading","width","height"]),O=s().theme.themeRadius||f;return r(a,{children:r(i,l({ref:e,loading:u,width:h,height:p,className:o("",o(c({radius:O}),d))},y,{children:n}))})}));d.displayName="Skeleton";export{d as Skeleton,d as default};
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../lib/components/Skeleton/index.js"],"sourcesContent":["var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport React from 'react';\nimport { cva } from 'class-variance-authority';\nimport { Theme, Skeleton as SkeletonTheme } from '@radix-ui/themes';\nimport { cn } from '../../../lib/utils/utils';\nimport { radiusVariants } from '../../../lib/constants';\nvar separatorVariants = cva('', {\n variants: {\n radius: __assign({}, radiusVariants['base']),\n },\n defaultVariants: {\n radius: 'medium',\n },\n});\nexport var Skeleton = React.forwardRef(function (_a, forwardedRef) {\n var children = _a.children, className = _a.className, radius = _a.radius, loading = _a.loading, width = _a.width, height = _a.height, skeletonProps = __rest(_a, [\"children\", \"className\", \"radius\", \"loading\", \"width\", \"height\"]);\n return (_jsx(Theme, { children: _jsx(SkeletonTheme, __assign({ ref: forwardedRef, loading: loading, width: width, height: height, className: cn('',
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../lib/components/Skeleton/index.js"],"sourcesContent":["var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport React from 'react';\nimport { cva } from 'class-variance-authority';\nimport { Theme, Skeleton as SkeletonTheme } from '@radix-ui/themes';\nimport { cn } from '../../../lib/utils/utils';\nimport { radiusVariants } from '../../../lib/constants';\nimport { useTheme } from '../../../lib/theme';\nvar separatorVariants = cva('', {\n variants: {\n radius: __assign({}, radiusVariants['base']),\n },\n defaultVariants: {\n radius: 'medium',\n },\n});\nexport var Skeleton = React.forwardRef(function (_a, forwardedRef) {\n var children = _a.children, className = _a.className, radius = _a.radius, loading = _a.loading, width = _a.width, height = _a.height, skeletonProps = __rest(_a, [\"children\", \"className\", \"radius\", \"loading\", \"width\", \"height\"]);\n var theme = useTheme().theme;\n var radiusStyle = theme.themeRadius || radius;\n return (_jsx(Theme, { children: _jsx(SkeletonTheme, __assign({ ref: forwardedRef, loading: loading, width: width, height: height, className: cn('', cn(separatorVariants({ radius: radiusStyle }), className)) }, skeletonProps, { children: children })) }));\n});\nSkeleton.displayName = 'Skeleton';\nexport default Skeleton;\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__rest","e","indexOf","getOwnPropertySymbols","propertyIsEnumerable","separatorVariants","cva","variants","radius","radiusVariants","defaultVariants","Skeleton","React","forwardRef","_a","forwardedRef","children","className","loading","width","height","skeletonProps","radiusStyle","useTheme","theme","themeRadius","_jsx","Theme","SkeletonTheme","ref","cn","displayName"],"mappings":"4TAAA,IAAIA,EAAsC,WAStC,OARAA,EAAWC,OAAOC,QAAU,SAASC,GACjC,IAAK,IAAIC,EAAGC,EAAI,EAAGC,EAAIC,UAAUC,OAAQH,EAAIC,EAAGD,IAE5C,IAAK,IAAII,KADTL,EAAIG,UAA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}
|
@@ -8,7 +8,7 @@ export interface SliderProps extends VariantProps<typeof sliderVariants> {
|
|
8
8
|
scaling?: IScaling;
|
9
9
|
}
|
10
10
|
declare const sliderVariants: (props?: ({
|
11
|
-
radius?: "
|
11
|
+
radius?: "none" | "small" | "medium" | "large" | "full" | null | undefined;
|
12
12
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
13
13
|
export declare const Slider: React.ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/themes").SliderProps & React.RefAttributes<HTMLSpanElement>, "ref">, "size"> & SliderProps & React.RefAttributes<HTMLSpanElement>>;
|
14
14
|
export default Slider;
|
@@ -26,16 +26,20 @@ import { cva } from 'class-variance-authority';
|
|
26
26
|
import { cn } from '../../../lib/utils/utils';
|
27
27
|
import { radiusVariants } from '../../../lib/constants';
|
28
28
|
import { Theme, Slider as SliderTheme } from '@radix-ui/themes';
|
29
|
+
import { useTheme } from '../../../lib/theme';
|
29
30
|
var sliderVariants = cva('relative flex items-center select-none touch-none w-[200px] h-5', {
|
30
31
|
variants: {
|
31
32
|
radius: __assign({}, radiusVariants['base']),
|
32
|
-
// color: bgColorStyle(),
|
33
33
|
},
|
34
34
|
});
|
35
35
|
export var Slider = React.forwardRef(function (_a, forwardedRef) {
|
36
|
-
var className = _a.className,
|
37
|
-
|
38
|
-
|
36
|
+
var className = _a.className, _b = _a.color, color = _b === void 0 ? 'red' : _b, size = _a.size, appearance = _a.appearance, _c = _a.scaling, scaling = _c === void 0 ? '100%' : _c, radius = _a.radius, tabIndex = _a.tabIndex, sliderProps = __rest(_a, ["className", "color", "size", "appearance", "scaling", "radius", "tabIndex"]);
|
37
|
+
var theme = useTheme().theme;
|
38
|
+
var contextValue = {
|
39
|
+
radius: theme.themeRadius || radius,
|
40
|
+
scaling: theme.themeScaling || scaling,
|
41
|
+
color: theme.themeColor || color,
|
42
|
+
};
|
39
43
|
if (radius === 'medium' || radius === 'large')
|
40
44
|
radius = 'full';
|
41
45
|
var sizeTheme = '2';
|
@@ -43,7 +47,11 @@ export var Slider = React.forwardRef(function (_a, forwardedRef) {
|
|
43
47
|
sizeTheme = '1';
|
44
48
|
if (size === 'large')
|
45
49
|
sizeTheme = '3';
|
46
|
-
return (
|
50
|
+
return (
|
51
|
+
// @ts-ignore
|
52
|
+
_jsx(Theme, { accentColor: contextValue.color, scaling: contextValue.scaling, hasBackground: false, children: _jsx(SliderTheme, __assign({ ref: forwardedRef, variant: appearance, size: sizeTheme, radius: contextValue.radius,
|
53
|
+
// @ts-ignore
|
54
|
+
color: contextValue.color, className: cn(sliderVariants({ radius: contextValue.radius }), className) }, sliderProps)) }));
|
47
55
|
});
|
48
56
|
Slider.displayName = 'Slider';
|
49
57
|
export default Slider;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{jsx as r}from"react/jsx-runtime";import e from"react";import{cva as a}from"class-variance-authority";import{cn as t}from"../../utils/utils.mjs";import{radiusVariants as o}from"../../constants.mjs";import{Theme as
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import e from"react";import{cva as a}from"class-variance-authority";import{cn as t}from"../../utils/utils.mjs";import{radiusVariants as o}from"../../constants.mjs";import{Theme as i,Slider as n}from"@radix-ui/themes";import{useTheme as s}from"../../theme/ThemeProvider.mjs";var l=function(){return l=Object.assign||function(r){for(var e,a=1,t=arguments.length;a<t;a++)for(var o in e=arguments[a])Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o]);return r},l.apply(this,arguments)},c=function(r,e){var a={};for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&e.indexOf(t)<0&&(a[t]=r[t]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(t=Object.getOwnPropertySymbols(r);o<t.length;o++)e.indexOf(t[o])<0&&Object.prototype.propertyIsEnumerable.call(r,t[o])&&(a[t[o]]=r[t[o]])}return a},m=a("relative flex items-center select-none touch-none w-[200px] h-5",{variants:{radius:l({},o.base)}}),u=e.forwardRef((function(e,a){var o=e.className,u=e.color,p=void 0===u?"red":u,d=e.size,f=e.appearance,h=e.scaling,v=void 0===h?"100%":h,g=e.radius;e.tabIndex;var y=c(e,["className","color","size","appearance","scaling","radius","tabIndex"]),b=s().theme,O={radius:b.themeRadius||g,scaling:b.themeScaling||v,color:b.themeColor||p};"medium"!==g&&"large"!==g||(g="full");var j="2";return"small"===d&&(j="1"),"large"===d&&(j="3"),r(i,{accentColor:O.color,scaling:O.scaling,hasBackground:!1,children:r(n,l({ref:a,variant:f,size:j,radius:O.radius,color:O.color,className:t(m({radius:O.radius}),o)},y))})}));u.displayName="Slider";export{u as Slider,u as default};
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../lib/components/Slider/index.js"],"sourcesContent":["var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport React from 'react';\nimport { cva } from 'class-variance-authority';\nimport { cn } from '../../../lib/utils/utils';\nimport { radiusVariants } from '../../../lib/constants';\nimport { Theme, Slider as SliderTheme } from '@radix-ui/themes';\nvar sliderVariants = cva('relative flex items-center select-none touch-none w-[200px] h-5', {\n variants: {\n radius: __assign({}, radiusVariants['base']),\n
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../lib/components/Slider/index.js"],"sourcesContent":["var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport React from 'react';\nimport { cva } from 'class-variance-authority';\nimport { cn } from '../../../lib/utils/utils';\nimport { radiusVariants } from '../../../lib/constants';\nimport { Theme, Slider as SliderTheme } from '@radix-ui/themes';\nimport { useTheme } from '../../../lib/theme';\nvar sliderVariants = cva('relative flex items-center select-none touch-none w-[200px] h-5', {\n variants: {\n radius: __assign({}, radiusVariants['base']),\n },\n});\nexport var Slider = React.forwardRef(function (_a, forwardedRef) {\n var className = _a.className, _b = _a.color, color = _b === void 0 ? 'red' : _b, size = _a.size, appearance = _a.appearance, _c = _a.scaling, scaling = _c === void 0 ? '100%' : _c, radius = _a.radius, tabIndex = _a.tabIndex, sliderProps = __rest(_a, [\"className\", \"color\", \"size\", \"appearance\", \"scaling\", \"radius\", \"tabIndex\"]);\n var theme = useTheme().theme;\n var contextValue = {\n radius: theme.themeRadius || radius,\n scaling: theme.themeScaling || scaling,\n color: theme.themeColor || color,\n };\n if (radius === 'medium' || radius === 'large')\n radius = 'full';\n var sizeTheme = '2';\n if (size === 'small')\n sizeTheme = '1';\n if (size === 'large')\n sizeTheme = '3';\n return (\n // @ts-ignore\n _jsx(Theme, { accentColor: contextValue.color, scaling: contextValue.scaling, hasBackground: false, children: _jsx(SliderTheme, __assign({ ref: forwardedRef, variant: appearance, size: sizeTheme, radius: contextValue.radius, \n // @ts-ignore\n color: contextValue.color, className: cn(sliderVariants({ radius: contextValue.radius }), className) }, sliderProps)) }));\n});\nSlider.displayName = 'Slider';\nexport default Slider;\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__rest","e","indexOf","getOwnPropertySymbols","propertyIsEnumerable","sliderVariants","cva","variants","radius","radiusVariants","Slider","React","forwardRef","_a","forwardedRef","className","_b","color","size","appearance","_c","scaling","tabIndex","sliderProps","theme","useTheme","contextValue","themeRadius","themeScaling","themeColor","sizeTheme","_jsx","Theme","accentColor","hasBackground","children","SliderTheme","ref","variant","cn","displayName"],"mappings":"0TAAA,IAAIA,EAAsC,WAStC,OARAA,EAAWC,OAAOC,QAAU,SAASC,GACjC,IAAK,IAAIC,EAAGC,EAAI,EAAGC,EAAIC,UAAUC,OAAQH,EAAIC,EAAGD,IAE5C,IAAK,IAAII,KADTL,EAAIG,UAAUF,GACOJ,OAAOS,UAAUC,eAAeC,KAAKR,EAAGK,KACzDN,EAAEM,GAAKL,EAAEK,IAEjB,OAAON,CACf,EACWH,EAASa,MAAMC,KAAMP,UAChC,EACIQ,EAAkC,SAAUX,EAAGY,GAC/C,IAAIb,EAAI,CAAA,EACR,IAAK,IAAIM,KAAKL,EAAOH,OAAOS,UAAUC,eAAeC,KAAKR,EAAGK,IAAMO,EAAEC,QAAQR,GAAK,IAC9EN,EAAEM,GAAKL,EAAEK,IACb,GAAS,MAALL,GAAqD,mBAAjCH,OAAOiB,sBACtB,KAAIb,EAAI,EAAb,IAAgBI,EAAIR,OAAOiB,sBAAsBd,GAAIC,EAAII,EAAED,OAAQH,IAC3DW,EAAEC,QAAQR,EAAEJ,IAAM,GAAKJ,OAAOS,UAAUS,qBAAqBP,KAAKR,EAAGK,EAAEJ,MACvEF,EAAEM,EAAEJ,IAAMD,EAAEK,EAAEJ,IAF4B,CAItD,OAAOF,CACX,EAQIiB,EAAiBC,EAAI,kEAAmE,CACxFC,SAAU,CACNC,OAAQvB,EAAS,CAAA,EAAIwB,EAAqB,SAGvCC,EAASC,EAAMC,YAAW,SAAUC,EAAIC,GAC5C,IAACC,EAAYF,EAAGE,UAAWC,EAAKH,EAAGI,MAAOA,OAAe,IAAPD,EAAgB,MAAQA,EAAIE,EAAOL,EAAGK,KAAMC,EAAaN,EAAGM,WAAYC,EAAKP,EAAGQ,QAASA,OAAiB,IAAPD,EAAgB,OAASA,EAAIZ,EAASK,EAAGL,OAAmBK,EAAGS,SAAU,IAAAC,EAAcvB,EAAOa,EAAI,CAAC,YAAa,QAAS,OAAQ,aAAc,UAAW,SAAU,aACxTW,EAAQC,IAAWD,MACnBE,EAAe,CACflB,OAAQgB,EAAMG,aAAenB,EAC7Ba,QAASG,EAAMI,cAAgBP,EAC/BJ,MAAOO,EAAMK,YAAcZ,GAEhB,WAAXT,GAAkC,UAAXA,IACvBA,EAAS,QACb,IAAIsB,EAAY,IAKhB,MAJa,UAATZ,IACAY,EAAY,KACH,UAATZ,IACAY,EAAY,KAGhBC,EAAKC,EAAO,CAAEC,YAAaP,EAAaT,MAAOI,QAASK,EAAaL,QAASa,eAAe,EAAOC,SAAUJ,EAAKK,EAAanD,EAAS,CAAEoD,IAAKvB,EAAcwB,QAASnB,EAAYD,KAAMY,EAAWtB,OAAQkB,EAAalB,OAEjNS,MAAOS,EAAaT,MAAOF,UAAWwB,EAAGlC,EAAe,CAAEG,OAAQkB,EAAalB,SAAWO,IAAcQ,KACpH,IACAb,EAAO8B,YAAc"}
|
@@ -26,6 +26,7 @@ import { cva } from 'class-variance-authority';
|
|
26
26
|
import { Spinner as SpinnerTheme, Theme } from '@radix-ui/themes';
|
27
27
|
import { cn } from '../../../lib/utils/utils';
|
28
28
|
import { scalingVariants } from '../../../lib/constants';
|
29
|
+
import { useTheme } from '../../../lib/theme';
|
29
30
|
var spinnerVariants = cva('', {
|
30
31
|
variants: {
|
31
32
|
scaling: __assign({}, scalingVariants),
|
@@ -36,12 +37,13 @@ var spinnerVariants = cva('', {
|
|
36
37
|
});
|
37
38
|
export var Spinner = React.forwardRef(function (_a, forwardedRef) {
|
38
39
|
var className = _a.className, children = _a.children, size = _a.size, scaling = _a.scaling, loading = _a.loading, spinnerProps = __rest(_a, ["className", "children", "size", "scaling", "loading"]);
|
40
|
+
var theme = useTheme().theme;
|
39
41
|
var sizeTheme = '2';
|
40
42
|
if (size === 'small')
|
41
43
|
sizeTheme = '1';
|
42
44
|
if (size === 'large')
|
43
45
|
sizeTheme = '3';
|
44
|
-
return (_jsx(Theme, { hasBackground: false, children: _jsx(SpinnerTheme, __assign({ ref: forwardedRef, loading: loading, size: sizeTheme, className: cn('', spinnerVariants({ scaling: scaling }), className) }, spinnerProps, { children: children })) }));
|
46
|
+
return (_jsx(Theme, { hasBackground: false, children: _jsx(SpinnerTheme, __assign({ ref: forwardedRef, loading: loading, size: sizeTheme, className: cn('', spinnerVariants({ scaling: theme.themeScaling || scaling }), className) }, spinnerProps, { children: children })) }));
|
45
47
|
});
|
46
48
|
Spinner.displayName = 'Spinner';
|
47
49
|
export default Spinner;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{jsx as r}from"react/jsx-runtime";import
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import e from"react";import{cva as t}from"class-variance-authority";import{Theme as a,Spinner as n}from"@radix-ui/themes";import{cn as i}from"../../utils/utils.mjs";import{scalingVariants as o}from"../../constants.mjs";import{useTheme as s}from"../../theme/ThemeProvider.mjs";var l=function(){return l=Object.assign||function(r){for(var e,t=1,a=arguments.length;t<a;t++)for(var n in e=arguments[t])Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},l.apply(this,arguments)},c=function(r,e){var t={};for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&e.indexOf(a)<0&&(t[a]=r[a]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(a=Object.getOwnPropertySymbols(r);n<a.length;n++)e.indexOf(a[n])<0&&Object.prototype.propertyIsEnumerable.call(r,a[n])&&(t[a[n]]=r[a[n]])}return t},m=t("",{variants:{scaling:l({},o)},defaultVariants:{scaling:"100%"}}),p=e.forwardRef((function(e,t){var o=e.className,p=e.children,f=e.size,u=e.scaling,d=e.loading,g=c(e,["className","children","size","scaling","loading"]),h=s().theme,y="2";return"small"===f&&(y="1"),"large"===f&&(y="3"),r(a,{hasBackground:!1,children:r(n,l({ref:t,loading:d,size:y,className:i("",m({scaling:h.themeScaling||u}),o)},g,{children:p}))})}));p.displayName="Spinner";export{p as Spinner,p as default};
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../lib/components/Spinner/index.js"],"sourcesContent":["var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport React from 'react';\nimport { cva } from 'class-variance-authority';\nimport { Spinner as SpinnerTheme, Theme } from '@radix-ui/themes';\nimport { cn } from '../../../lib/utils/utils';\nimport { scalingVariants } from '../../../lib/constants';\nvar spinnerVariants = cva('', {\n variants: {\n scaling: __assign({}, scalingVariants),\n },\n defaultVariants: {\n scaling: '100%',\n },\n});\nexport var Spinner = React.forwardRef(function (_a, forwardedRef) {\n var className = _a.className, children = _a.children, size = _a.size, scaling = _a.scaling, loading = _a.loading, spinnerProps = __rest(_a, [\"className\", \"children\", \"size\", \"scaling\", \"loading\"]);\n var sizeTheme = '2';\n if (size === 'small')\n sizeTheme = '1';\n if (size === 'large')\n sizeTheme = '3';\n return (_jsx(Theme, { hasBackground: false, children: _jsx(SpinnerTheme, __assign({ ref: forwardedRef, loading: loading, size: sizeTheme, className: cn('', spinnerVariants({ scaling: scaling }), className) }, spinnerProps, { children: children })) }));\n});\nSpinner.displayName = 'Spinner';\nexport default Spinner;\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__rest","e","indexOf","getOwnPropertySymbols","propertyIsEnumerable","spinnerVariants","cva","variants","scaling","scalingVariants","defaultVariants","Spinner","React","forwardRef","_a","forwardedRef","className","children","size","loading","spinnerProps","sizeTheme","_jsx","Theme","hasBackground","SpinnerTheme","ref","cn","displayName"],"mappings":"
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../lib/components/Spinner/index.js"],"sourcesContent":["var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport React from 'react';\nimport { cva } from 'class-variance-authority';\nimport { Spinner as SpinnerTheme, Theme } from '@radix-ui/themes';\nimport { cn } from '../../../lib/utils/utils';\nimport { scalingVariants } from '../../../lib/constants';\nimport { useTheme } from '../../../lib/theme';\nvar spinnerVariants = cva('', {\n variants: {\n scaling: __assign({}, scalingVariants),\n },\n defaultVariants: {\n scaling: '100%',\n },\n});\nexport var Spinner = React.forwardRef(function (_a, forwardedRef) {\n var className = _a.className, children = _a.children, size = _a.size, scaling = _a.scaling, loading = _a.loading, spinnerProps = __rest(_a, [\"className\", \"children\", \"size\", \"scaling\", \"loading\"]);\n var theme = useTheme().theme;\n var sizeTheme = '2';\n if (size === 'small')\n sizeTheme = '1';\n if (size === 'large')\n sizeTheme = '3';\n return (_jsx(Theme, { hasBackground: false, children: _jsx(SpinnerTheme, __assign({ ref: forwardedRef, loading: loading, size: sizeTheme, className: cn('', spinnerVariants({ scaling: theme.themeScaling || scaling }), className) }, spinnerProps, { children: children })) }));\n});\nSpinner.displayName = 'Spinner';\nexport default Spinner;\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__rest","e","indexOf","getOwnPropertySymbols","propertyIsEnumerable","spinnerVariants","cva","variants","scaling","scalingVariants","defaultVariants","Spinner","React","forwardRef","_a","forwardedRef","className","children","size","loading","spinnerProps","theme","useTheme","sizeTheme","_jsx","Theme","hasBackground","SpinnerTheme","ref","cn","themeScaling","displayName"],"mappings":"4TAAA,IAAIA,EAAsC,WAStC,OARAA,EAAWC,OAAOC,QAAU,SAASC,GACjC,IAAK,IAAIC,EAAGC,EAAI,EAAGC,EAAIC,UAAUC,OAAQH,EAAIC,EAAGD,IAE5C,IAAK,IAAII,KADTL,EAAIG,UAAUF,GACOJ,OAAOS,UAAUC,eAAeC,KAAKR,EAAGK,KACzDN,EAAEM,GAAKL,EAAEK,IAEjB,OAAON,CACf,EACWH,EAASa,MAAMC,KAAMP,UAChC,EACIQ,EAAkC,SAAUX,EAAGY,GAC/C,IAAIb,EAAI,CAAA,EACR,IAAK,IAAIM,KAAKL,EAAOH,OAAOS,UAAUC,eAAeC,KAAKR,EAAGK,IAAMO,EAAEC,QAAQR,GAAK,IAC9EN,EAAEM,GAAKL,EAAEK,IACb,GAAS,MAALL,GAAqD,mBAAjCH,OAAOiB,sBACtB,KAAIb,EAAI,EAAb,IAAgBI,EAAIR,OAAOiB,sBAAsBd,GAAIC,EAAII,EAAED,OAAQH,IAC3DW,EAAEC,QAAQR,EAAEJ,IAAM,GAAKJ,OAAOS,UAAUS,qBAAqBP,KAAKR,EAAGK,EAAEJ,MACvEF,EAAEM,EAAEJ,IAAMD,EAAEK,EAAEJ,IAF4B,CAItD,OAAOF,CACX,EAQIiB,EAAkBC,EAAI,GAAI,CAC1BC,SAAU,CACNC,QAASvB,EAAS,CAAE,EAAEwB,IAE1BC,gBAAiB,CACbF,QAAS,UAGNG,EAAUC,EAAMC,YAAW,SAAUC,EAAIC,GAChD,IAAIC,EAAYF,EAAGE,UAAWC,EAAWH,EAAGG,SAAUC,EAAOJ,EAAGI,KAAMV,EAAUM,EAAGN,QAASW,EAAUL,EAAGK,QAASC,EAAepB,EAAOc,EAAI,CAAC,YAAa,WAAY,OAAQ,UAAW,YACrLO,EAAQC,IAAWD,MACnBE,EAAY,IAKhB,MAJa,UAATL,IACAK,EAAY,KACH,UAATL,IACAK,EAAY,KACRC,EAAKC,EAAO,CAAEC,eAAe,EAAOT,SAAUO,EAAKG,EAAc1C,EAAS,CAAE2C,IAAKb,EAAcI,QAASA,EAASD,KAAMK,EAAWP,UAAWa,EAAG,GAAIxB,EAAgB,CAAEG,QAASa,EAAMS,cAAgBtB,IAAYQ,IAAcI,EAAc,CAAEH,SAAUA,MACrQ,IACAN,EAAQoB,YAAc"}
|
@@ -25,17 +25,19 @@ import React from 'react';
|
|
25
25
|
import { cva } from 'class-variance-authority';
|
26
26
|
import { TabNav as TabNavTheme, Theme } from '@radix-ui/themes';
|
27
27
|
import { cn } from '../../../lib/utils/utils';
|
28
|
+
import { useTheme } from '../../../lib/theme';
|
28
29
|
var tabNavVariants = cva('', {
|
29
30
|
variants: {},
|
30
31
|
});
|
31
32
|
export var Root = React.forwardRef(function (_a, ref) {
|
32
|
-
var className = _a.className, children = _a.children, size = _a.size,
|
33
|
-
|
34
|
-
color = 'red';
|
33
|
+
var className = _a.className, children = _a.children, size = _a.size, _b = _a.color, color = _b === void 0 ? 'red' : _b, rootProps = __rest(_a, ["className", "children", "size", "color"]);
|
34
|
+
var theme = useTheme().theme;
|
35
35
|
var sizeTheme = '2';
|
36
36
|
if (size === 'small')
|
37
37
|
sizeTheme = '1';
|
38
|
-
return (
|
38
|
+
return (
|
39
|
+
// @ts-ignore
|
40
|
+
_jsx(Theme, { accentColor: theme.themeColor || color, hasBackground: false, children: _jsx(TabNavTheme.Root, __assign({ ref: ref, size: sizeTheme, className: cn('', tabNavVariants({}), className) }, rootProps, { children: children })) }));
|
39
41
|
});
|
40
42
|
Root.displayName = 'TabNav.Root';
|
41
43
|
export var Link = React.forwardRef(function (_a, ref) {
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{jsx as r}from"react/jsx-runtime";import
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import e from"react";import{cva as t}from"class-variance-authority";import{Theme as a,TabNav as o}from"@radix-ui/themes";import{cn as i}from"../../utils/utils.mjs";import{useTheme as n}from"../../theme/ThemeProvider.mjs";var s=function(){return s=Object.assign||function(r){for(var e,t=1,a=arguments.length;t<a;t++)for(var o in e=arguments[t])Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o]);return r},s.apply(this,arguments)},l=function(r,e){var t={};for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&e.indexOf(a)<0&&(t[a]=r[a]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(a=Object.getOwnPropertySymbols(r);o<a.length;o++)e.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(r,a[o])&&(t[a[o]]=r[a[o]])}return t},c=t("",{variants:{}}),m=e.forwardRef((function(e,t){var m=e.className,f=e.children,p=e.size,d=e.color,h=void 0===d?"red":d,u=l(e,["className","children","size","color"]),v=n().theme,y="2";return"small"===p&&(y="1"),r(a,{accentColor:v.themeColor||h,hasBackground:!1,children:r(o.Root,s({ref:t,size:y,className:i("",c({}),m)},u,{children:f}))})}));m.displayName="TabNav.Root";var f=e.forwardRef((function(e,t){var a=e.className,n=e.children,m=e.href,f=l(e,["className","children","href"]);return r(o.Link,s({ref:t,className:i("text-slateA-11 data-[state=active]:text-slateA-12 dark:text-slateDarkA-11 dark:data-[state=active]:text-slateDarkA-12",c({}),a),href:m},f,{children:n}))}));f.displayName="TabNav.Link";var p={Root:m,Link:f};export{f as Link,m as Root,p as default};
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../lib/components/TabNav/index.js"],"sourcesContent":["var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport React from 'react';\nimport { cva } from 'class-variance-authority';\nimport { TabNav as TabNavTheme, Theme } from '@radix-ui/themes';\nimport { cn } from '../../../lib/utils/utils';\nvar tabNavVariants = cva('', {\n variants: {},\n});\nexport var Root = React.forwardRef(function (_a, ref) {\n var className = _a.className, children = _a.children, size = _a.size,
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../lib/components/TabNav/index.js"],"sourcesContent":["var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport React from 'react';\nimport { cva } from 'class-variance-authority';\nimport { TabNav as TabNavTheme, Theme } from '@radix-ui/themes';\nimport { cn } from '../../../lib/utils/utils';\nimport { useTheme } from '../../../lib/theme';\nvar tabNavVariants = cva('', {\n variants: {},\n});\nexport var Root = React.forwardRef(function (_a, ref) {\n var className = _a.className, children = _a.children, size = _a.size, _b = _a.color, color = _b === void 0 ? 'red' : _b, rootProps = __rest(_a, [\"className\", \"children\", \"size\", \"color\"]);\n var theme = useTheme().theme;\n var sizeTheme = '2';\n if (size === 'small')\n sizeTheme = '1';\n return (\n // @ts-ignore\n _jsx(Theme, { accentColor: theme.themeColor || color, hasBackground: false, children: _jsx(TabNavTheme.Root, __assign({ ref: ref, size: sizeTheme, className: cn('', tabNavVariants({}), className) }, rootProps, { children: children })) }));\n});\nRoot.displayName = 'TabNav.Root';\nexport var Link = React.forwardRef(function (_a, ref) {\n var className = _a.className, children = _a.children, href = _a.href, linkProps = __rest(_a, [\"className\", \"children\", \"href\"]);\n return (_jsx(TabNavTheme.Link, __assign({ ref: ref, className: cn('text-slateA-11 data-[state=active]:text-slateA-12 dark:text-slateDarkA-11 dark:data-[state=active]:text-slateDarkA-12', tabNavVariants({}), className), href: href }, linkProps, { children: children })));\n});\nLink.displayName = 'TabNav.Link';\nvar TabNav = {\n Root: Root,\n Link: Link,\n};\nexport default TabNav;\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__rest","e","indexOf","getOwnPropertySymbols","propertyIsEnumerable","tabNavVariants","cva","variants","Root","React","forwardRef","_a","ref","className","children","size","_b","color","rootProps","theme","useTheme","sizeTheme","_jsx","Theme","accentColor","themeColor","hasBackground","TabNavTheme","cn","displayName","Link","href","linkProps","TabNav"],"mappings":"qQAAA,IAAIA,EAAsC,WAStC,OARAA,EAAWC,OAAOC,QAAU,SAASC,GACjC,IAAK,IAAIC,EAAGC,EAAI,EAAGC,EAAIC,UAAUC,OAAQH,EAAIC,EAAGD,IAE5C,IAAK,IAAII,KADTL,EAAIG,UAAUF,GACOJ,OAAOS,UAAUC,eAAeC,KAAKR,EAAGK,KACzDN,EAAEM,GAAKL,EAAEK,IAEjB,OAAON,CACf,EACWH,EAASa,MAAMC,KAAMP,UAChC,EACIQ,EAAkC,SAAUX,EAAGY,GAC/C,IAAIb,EAAI,CAAA,EACR,IAAK,IAAIM,KAAKL,EAAOH,OAAOS,UAAUC,eAAeC,KAAKR,EAAGK,IAAMO,EAAEC,QAAQR,GAAK,IAC9EN,EAAEM,GAAKL,EAAEK,IACb,GAAS,MAALL,GAAqD,mBAAjCH,OAAOiB,sBACtB,KAAIb,EAAI,EAAb,IAAgBI,EAAIR,OAAOiB,sBAAsBd,GAAIC,EAAII,EAAED,OAAQH,IAC3DW,EAAEC,QAAQR,EAAEJ,IAAM,GAAKJ,OAAOS,UAAUS,qBAAqBP,KAAKR,EAAGK,EAAEJ,MACvEF,EAAEM,EAAEJ,IAAMD,EAAEK,EAAEJ,IAF4B,CAItD,OAAOF,CACX,EAOIiB,EAAiBC,EAAI,GAAI,CACzBC,SAAU,CAAE,IAELC,EAAOC,EAAMC,YAAW,SAAUC,EAAIC,GAC7C,IAAIC,EAAYF,EAAGE,UAAWC,EAAWH,EAAGG,SAAUC,EAAOJ,EAAGI,KAAMC,EAAKL,EAAGM,MAAOA,OAAe,IAAPD,EAAgB,MAAQA,EAAIE,EAAYlB,EAAOW,EAAI,CAAC,YAAa,WAAY,OAAQ,UAC9KQ,EAAQC,IAAWD,MACnBE,EAAY,IAGhB,MAFa,UAATN,IACAM,EAAY,KAGhBC,EAAKC,EAAO,CAAEC,YAAaL,EAAMM,YAAcR,EAAOS,eAAe,EAAOZ,SAAUQ,EAAKK,EAAYnB,KAAMvB,EAAS,CAAE2B,IAAKA,EAAKG,KAAMM,EAAWR,UAAWe,EAAG,GAAIvB,EAAe,CAAA,GAAKQ,IAAcK,EAAW,CAAEJ,SAAUA,MAClO,IACAN,EAAKqB,YAAc,cACT,IAACC,EAAOrB,EAAMC,YAAW,SAAUC,EAAIC,GAC7C,IAAIC,EAAYF,EAAGE,UAAWC,EAAWH,EAAGG,SAAUiB,EAAOpB,EAAGoB,KAAMC,EAAYhC,EAAOW,EAAI,CAAC,YAAa,WAAY,SACvH,OAAQW,EAAKK,EAAYG,KAAM7C,EAAS,CAAE2B,IAAKA,EAAKC,UAAWe,EAAG,wHAAyHvB,EAAe,CAAA,GAAKQ,GAAYkB,KAAMA,GAAQC,EAAW,CAAElB,SAAUA,IACpQ,IACAgB,EAAKD,YAAc,cAChB,IAACI,EAAS,CACTzB,KAAMA,EACNsB,KAAMA"}
|
@@ -9,7 +9,7 @@ export interface TableProps extends VariantProps<typeof tableVariants> {
|
|
9
9
|
}
|
10
10
|
declare const tableVariants: (props?: ({
|
11
11
|
scaling?: "90%" | "95%" | "100%" | "105%" | "110%" | null | undefined;
|
12
|
-
radius?: "
|
12
|
+
radius?: "none" | "small" | "medium" | "large" | "full" | null | undefined;
|
13
13
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
14
14
|
export declare const Root: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & TableProps & React.RefAttributes<HTMLDivElement>>;
|
15
15
|
export declare const Header: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, "ref"> & TableProps & React.RefAttributes<HTMLTableSectionElement>>;
|
@@ -26,6 +26,7 @@ import { cva } from 'class-variance-authority';
|
|
26
26
|
import { Table as TableTheme, Theme } from '@radix-ui/themes';
|
27
27
|
import { cn } from '../../../lib/utils/utils';
|
28
28
|
import { radiusVariants, scalingVariants } from '../../../lib/constants';
|
29
|
+
import { useTheme } from '../../../lib/theme';
|
29
30
|
var tableVariants = cva('', {
|
30
31
|
variants: {
|
31
32
|
scaling: __assign({}, scalingVariants),
|
@@ -46,6 +47,7 @@ var tableRowVariants = cva('', {
|
|
46
47
|
});
|
47
48
|
export var Root = React.forwardRef(function (_a, ref) {
|
48
49
|
var className = _a.className, children = _a.children, appearance = _a.appearance, scaling = _a.scaling, size = _a.size, radius = _a.radius, tableProps = __rest(_a, ["className", "children", "appearance", "scaling", "size", "radius"]);
|
50
|
+
var theme = useTheme().theme;
|
49
51
|
var sizeTheme = '2';
|
50
52
|
if (size === 'small')
|
51
53
|
sizeTheme = '1';
|
@@ -53,7 +55,11 @@ export var Root = React.forwardRef(function (_a, ref) {
|
|
53
55
|
sizeTheme = '3';
|
54
56
|
if (radius === 'full')
|
55
57
|
radius = 'large';
|
56
|
-
|
58
|
+
var contextValue = {
|
59
|
+
scaling: theme.themeScaling || scaling,
|
60
|
+
radius: theme.themeRadius || radius,
|
61
|
+
};
|
62
|
+
return (_jsx(Theme, { hasBackground: false, children: _jsx(TableTheme.Root, __assign({ ref: ref, className: cn(tableVariants(contextValue), className), variant: appearance, size: sizeTheme }, tableProps, { children: children })) }));
|
57
63
|
});
|
58
64
|
Root.displayName = 'Table.Root';
|
59
65
|
export var Header = React.forwardRef(function (_a, forwardedRef) {
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{jsx as a}from"react/jsx-runtime";import e from"react";import{cva as r}from"class-variance-authority";import{Theme as l,Table as s}from"@radix-ui/themes";import{cn as n}from"../../utils/utils.mjs";import{scalingVariants as i,radiusVariants as c}from"../../constants.mjs";var o=function(){return o=Object.assign||function(a){for(var e,r=1,l=arguments.length;r<l;r++)for(var s in e=arguments[r])Object.prototype.hasOwnProperty.call(e,s)&&(a[s]=e[s]);return a},o.apply(this,arguments)},
|
1
|
+
import{jsx as a}from"react/jsx-runtime";import e from"react";import{cva as r}from"class-variance-authority";import{Theme as l,Table as s}from"@radix-ui/themes";import{cn as n}from"../../utils/utils.mjs";import{scalingVariants as i,radiusVariants as c}from"../../constants.mjs";import{useTheme as t}from"../../theme/ThemeProvider.mjs";var o=function(){return o=Object.assign||function(a){for(var e,r=1,l=arguments.length;r<l;r++)for(var s in e=arguments[r])Object.prototype.hasOwnProperty.call(e,s)&&(a[s]=e[s]);return a},o.apply(this,arguments)},m=function(a,e){var r={};for(var l in a)Object.prototype.hasOwnProperty.call(a,l)&&e.indexOf(l)<0&&(r[l]=a[l]);if(null!=a&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(l=Object.getOwnPropertySymbols(a);s<l.length;s++)e.indexOf(l[s])<0&&Object.prototype.propertyIsEnumerable.call(a,l[s])&&(r[l[s]]=a[l[s]])}return r},d=r("",{variants:{scaling:o({},i),radius:o({},c.base)},defaultVariants:{scaling:"100%"}}),f=r("",{variants:{size:{small:"h-[36px]",medium:"h-[44px]",large:"h-[48px] p-3"}}}),u=e.forwardRef((function(e,r){var i=e.className,c=e.children,f=e.appearance,u=e.scaling,h=e.size,p=e.radius,g=m(e,["className","children","appearance","scaling","size","radius"]),N=t().theme,v="2";"small"===h&&(v="1"),"large"===h&&(v="3"),"full"===p&&(p="large");var y={scaling:N.themeScaling||u,radius:N.themeRadius||p};return a(l,{hasBackground:!1,children:a(s.Root,o({ref:r,className:n(d(y),i),variant:f,size:v},g,{children:c}))})}));u.displayName="Table.Root";var h=e.forwardRef((function(e,r){var l=e.className,i=e.children,c=e.scaling,t=m(e,["className","children","scaling"]);return a(s.Header,o({ref:r,className:n("",d({scaling:c}),l)},t,{children:i}))}));h.displayName="Table.Header";var p=e.forwardRef((function(e,r){var l=e.className,i=e.children,c=e.scaling,t=m(e,["className","children","scaling"]);return a(s.Body,o({ref:r,className:n("",d({scaling:c}),l)},t,{children:i}))}));p.displayName="Table.Body";var g=e.forwardRef((function(e,r){var l=e.className,i=e.children,c=e.scaling,t=m(e,["className","children","scaling"]);return a(s.Row,o({ref:r,className:n("",d({scaling:c}),l)},t,{children:i}))}));g.displayName="Table.Row";var N=e.forwardRef((function(e,r){var l=e.className,i=e.children,c=e.scaling,t=m(e,["className","children","scaling"]);return a(s.Cell,o({className:n("",d({scaling:c}),l)},t,{ref:r,children:i}))}));N.displayName="Table.Cell";var v=e.forwardRef((function(e,r){var l=e.className,i=e.children,c=e.scaling,t=e.size,u=m(e,["className","children","scaling","size"]);return a(s.ColumnHeaderCell,o({ref:r,className:n("",d({scaling:c}),f({size:t}),l)},u,{children:i}))}));v.displayName="Table.ColumnHeaderCell";var y=e.forwardRef((function(e,r){var l=e.className,i=e.children,c=e.scaling,t=m(e,["className","children","scaling"]);return a(s.RowHeaderCell,o({ref:r,className:n("",d({scaling:c}),l)},t,{children:i}))}));y.displayName="Table.RowHeaderCell";var b={Root:u,Header:h,Body:p,Row:g,Cell:N,ColumnHeaderCell:v,RowHeaderCell:y};export{p as Body,N as Cell,v as ColumnHeaderCell,h as Header,u as Root,g as Row,y as RowHeaderCell,b as default};
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../lib/components/Table/index.js"],"sourcesContent":["var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport React from 'react';\nimport { cva } from 'class-variance-authority';\nimport { Table as TableTheme, Theme } from '@radix-ui/themes';\nimport { cn } from '../../../lib/utils/utils';\nimport { radiusVariants, scalingVariants } from '../../../lib/constants';\nvar tableVariants = cva('', {\n variants: {\n scaling: __assign({}, scalingVariants),\n radius: __assign({}, radiusVariants['base']),\n },\n defaultVariants: {\n scaling: '100%',\n },\n});\nvar tableRowVariants = cva('', {\n variants: {\n size: {\n small: 'h-[36px]',\n medium: 'h-[44px]',\n large: 'h-[48px] p-3',\n },\n },\n});\nexport var Root = React.forwardRef(function (_a, ref) {\n var className = _a.className, children = _a.children, appearance = _a.appearance, scaling = _a.scaling, size = _a.size, radius = _a.radius, tableProps = __rest(_a, [\"className\", \"children\", \"appearance\", \"scaling\", \"size\", \"radius\"]);\n var sizeTheme = '2';\n if (size === 'small')\n sizeTheme = '1';\n if (size === 'large')\n sizeTheme = '3';\n if (radius === 'full')\n radius = 'large';\n return (_jsx(Theme, { hasBackground: false, children: _jsx(TableTheme.Root, __assign({ ref: ref, className: cn(
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../lib/components/Table/index.js"],"sourcesContent":["var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport React from 'react';\nimport { cva } from 'class-variance-authority';\nimport { Table as TableTheme, Theme } from '@radix-ui/themes';\nimport { cn } from '../../../lib/utils/utils';\nimport { radiusVariants, scalingVariants } from '../../../lib/constants';\nimport { useTheme } from '../../../lib/theme';\nvar tableVariants = cva('', {\n variants: {\n scaling: __assign({}, scalingVariants),\n radius: __assign({}, radiusVariants['base']),\n },\n defaultVariants: {\n scaling: '100%',\n },\n});\nvar tableRowVariants = cva('', {\n variants: {\n size: {\n small: 'h-[36px]',\n medium: 'h-[44px]',\n large: 'h-[48px] p-3',\n },\n },\n});\nexport var Root = React.forwardRef(function (_a, ref) {\n var className = _a.className, children = _a.children, appearance = _a.appearance, scaling = _a.scaling, size = _a.size, radius = _a.radius, tableProps = __rest(_a, [\"className\", \"children\", \"appearance\", \"scaling\", \"size\", \"radius\"]);\n var theme = useTheme().theme;\n var sizeTheme = '2';\n if (size === 'small')\n sizeTheme = '1';\n if (size === 'large')\n sizeTheme = '3';\n if (radius === 'full')\n radius = 'large';\n var contextValue = {\n scaling: theme.themeScaling || scaling,\n radius: theme.themeRadius || radius,\n };\n return (_jsx(Theme, { hasBackground: false, children: _jsx(TableTheme.Root, __assign({ ref: ref, className: cn(tableVariants(contextValue), className), variant: appearance, size: sizeTheme }, tableProps, { children: children })) }));\n});\nRoot.displayName = 'Table.Root';\nexport var Header = React.forwardRef(function (_a, forwardedRef) {\n var className = _a.className, children = _a.children, scaling = _a.scaling, props = __rest(_a, [\"className\", \"children\", \"scaling\"]);\n return (_jsx(TableTheme.Header, __assign({ ref: forwardedRef, className: cn('', tableVariants({ scaling: scaling }), className) }, props, { children: children })));\n});\nHeader.displayName = 'Table.Header';\nexport var Body = React.forwardRef(function (_a, forwardedRef) {\n var className = _a.className, children = _a.children, scaling = _a.scaling, props = __rest(_a, [\"className\", \"children\", \"scaling\"]);\n return (_jsx(TableTheme.Body, __assign({ ref: forwardedRef, className: cn('', tableVariants({ scaling: scaling }), className) }, props, { children: children })));\n});\nBody.displayName = 'Table.Body';\nexport var Row = React.forwardRef(function (_a, forwardedRef) {\n var className = _a.className, children = _a.children, scaling = _a.scaling, props = __rest(_a, [\"className\", \"children\", \"scaling\"]);\n return (_jsx(TableTheme.Row, __assign({ ref: forwardedRef, className: cn('', tableVariants({ scaling: scaling }), className) }, props, { children: children })));\n});\nRow.displayName = 'Table.Row';\nexport var Cell = React.forwardRef(function (_a, forwardedRef) {\n var className = _a.className, children = _a.children, scaling = _a.scaling, cellProps = __rest(_a, [\"className\", \"children\", \"scaling\"]);\n return (_jsx(TableTheme.Cell, __assign({ className: cn('', tableVariants({ scaling: scaling }), className) }, cellProps, { ref: forwardedRef, children: children })));\n});\nCell.displayName = 'Table.Cell';\nexport var ColumnHeaderCell = React.forwardRef(function (_a, forwardedRef) {\n var className = _a.className, children = _a.children, scaling = _a.scaling, size = _a.size, props = __rest(_a, [\"className\", \"children\", \"scaling\", \"size\"]);\n return (_jsx(TableTheme.ColumnHeaderCell, __assign({ ref: forwardedRef, className: cn('', tableVariants({ scaling: scaling }), tableRowVariants({ size: size }), className) }, props, { children: children })));\n});\nColumnHeaderCell.displayName = 'Table.ColumnHeaderCell';\nexport var RowHeaderCell = React.forwardRef(function (_a, forwardedRef) {\n var className = _a.className, children = _a.children, scaling = _a.scaling, props = __rest(_a, [\"className\", \"children\", \"scaling\"]);\n return (_jsx(TableTheme.RowHeaderCell, __assign({ ref: forwardedRef, className: cn('', tableVariants({ scaling: scaling }), className) }, props, { children: children })));\n});\nRowHeaderCell.displayName = 'Table.RowHeaderCell';\nvar Table = {\n Root: Root,\n Header: Header,\n Body: Body,\n Row: Row,\n Cell: Cell,\n ColumnHeaderCell: ColumnHeaderCell,\n RowHeaderCell: RowHeaderCell,\n};\nexport default Table;\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__rest","e","indexOf","getOwnPropertySymbols","propertyIsEnumerable","tableVariants","cva","variants","scaling","scalingVariants","radius","radiusVariants","defaultVariants","tableRowVariants","size","small","medium","large","Root","React","forwardRef","_a","ref","className","children","appearance","tableProps","theme","useTheme","sizeTheme","contextValue","themeScaling","themeRadius","_jsx","Theme","hasBackground","TableTheme","cn","variant","displayName","Header","forwardedRef","props","Body","Row","Cell","cellProps","ColumnHeaderCell","RowHeaderCell","Table"],"mappings":"8UAAA,IAAIA,EAAsC,WAStC,OARAA,EAAWC,OAAOC,QAAU,SAASC,GACjC,IAAK,IAAIC,EAAGC,EAAI,EAAGC,EAAIC,UAAUC,OAAQH,EAAIC,EAAGD,IAE5C,IAAK,IAAII,KADTL,EAAIG,UAAUF,GACOJ,OAAOS,UAAUC,eAAeC,KAAKR,EAAGK,KACzDN,EAAEM,GAAKL,EAAEK,IAEjB,OAAON,CACf,EACWH,EAASa,MAAMC,KAAMP,UAChC,EACIQ,EAAkC,SAAUX,EAAGY,GAC/C,IAAIb,EAAI,CAAA,EACR,IAAK,IAAIM,KAAKL,EAAOH,OAAOS,UAAUC,eAAeC,KAAKR,EAAGK,IAAMO,EAAEC,QAAQR,GAAK,IAC9EN,EAAEM,GAAKL,EAAEK,IACb,GAAS,MAALL,GAAqD,mBAAjCH,OAAOiB,sBACtB,KAAIb,EAAI,EAAb,IAAgBI,EAAIR,OAAOiB,sBAAsBd,GAAIC,EAAII,EAAED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mB5B,EAAMC,YAAW,SAAUC,EAAIoB,GACzD,IAAIlB,EAAYF,EAAGE,UAAWC,EAAWH,EAAGG,SAAUhB,EAAUa,EAAGb,QAASM,EAAOO,EAAGP,KAAM4B,EAAQ1C,EAAOqB,EAAI,CAAC,YAAa,WAAY,UAAW,SACpJ,OAAQY,EAAKG,EAAWW,iBAAkB9D,EAAS,CAAEqC,IAAKmB,EAAclB,UAAWc,EAAG,GAAIhC,EAAc,CAAEG,QAASA,IAAYK,EAAiB,CAAEC,KAAMA,IAASS,IAAcmB,EAAO,CAAElB,SAAUA,IACtM,IACAuB,EAAiBR,YAAc,yBACrB,IAACS,EAAgB7B,EAAMC,YAAW,SAAUC,EAAIoB,GACtD,IAAIlB,EAAYF,EAAGE,UAAWC,EAAWH,EAAGG,SAAUhB,EAAUa,EAAGb,QAASkC,EAAQ1C,EAAOqB,EAAI,CAAC,YAAa,WAAY,YACzH,OAAQY,EAAKG,EAAWY,cAAe/D,EAAS,CAAEqC,IAAKmB,EAAclB,UAAWc,EAAG,GAAIhC,EAAc,CAAEG,QAASA,IAAYe,IAAcmB,EAAO,CAAElB,SAAUA,IACjK,IACAwB,EAAcT,YAAc,sBACzB,IAACU,EAAQ,CACR/B,KAAMA,EACNsB,OAAQA,EACRG,KAAMA,EACNC,IAAKA,EACLC,KAAMA,EACNE,iBAAkBA,EAClBC,cAAeA"}
|
@@ -7,7 +7,7 @@ export interface TabsProps extends VariantProps<typeof tabsVariants> {
|
|
7
7
|
color?: any;
|
8
8
|
}
|
9
9
|
declare const tabsVariants: (props?: ({
|
10
|
-
weight?: "
|
10
|
+
weight?: "medium" | "regular" | "semibold" | "bold" | null | undefined;
|
11
11
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
12
12
|
export declare const Root: React.ForwardRefExoticComponent<Omit<Omit<TabsTheme.RootProps & React.RefAttributes<HTMLDivElement>, "ref">, "size"> & TabsProps & React.RefAttributes<HTMLDivElement>>;
|
13
13
|
export declare const List: React.ForwardRefExoticComponent<Omit<TabsTheme.ListProps & React.RefAttributes<HTMLDivElement>, "ref"> & TabsProps & React.RefAttributes<HTMLDivElement>>;
|