@lotte-innovate/ui-component-test 0.2.71 → 0.2.72

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. package/README.md +225 -226
  2. package/dist/globals.css +4 -4
  3. package/dist/lib/color/constants.js +1 -1
  4. package/dist/lib/color/constants.mjs +1 -1
  5. package/dist/lib/color/constants.mjs.map +1 -1
  6. package/dist/lib/components/Badge/index.js +3 -3
  7. package/dist/lib/components/Badge/index.mjs +1 -1
  8. package/dist/lib/components/Box/index.js +2 -2
  9. package/dist/lib/components/Box/index.mjs +1 -1
  10. package/dist/lib/components/Box/index.mjs.map +1 -1
  11. package/dist/lib/components/Breadcrumb/BreadcrumbLink.js +2 -2
  12. package/dist/lib/components/Breadcrumb/BreadcrumbLink.mjs +1 -1
  13. package/dist/lib/components/Breadcrumb/BreadcrumbLink.mjs.map +1 -1
  14. package/dist/lib/components/Breadcrumb/BreadcrumbPage.js +3 -3
  15. package/dist/lib/components/Breadcrumb/BreadcrumbPage.mjs +1 -1
  16. package/dist/lib/components/Breadcrumb/BreadcrumbPage.mjs.map +1 -1
  17. package/dist/lib/components/Breadcrumb/BreadcrumbRoot.js +2 -2
  18. package/dist/lib/components/Breadcrumb/BreadcrumbRoot.mjs +1 -1
  19. package/dist/lib/components/CheckboxGroup/CheckboxGroupRoot.d.ts +1 -1
  20. package/dist/lib/components/CheckboxGroup/index.d.ts +1 -1
  21. package/dist/lib/components/Container/index.js +2 -2
  22. package/dist/lib/components/Container/index.mjs +1 -1
  23. package/dist/lib/components/Container/index.mjs.map +1 -1
  24. package/dist/lib/components/Datepicker/index.d.ts +2 -1
  25. package/dist/lib/components/Datepicker/index.js +2 -2
  26. package/dist/lib/components/Datepicker/index.mjs +1 -1
  27. package/dist/lib/components/Dialog/DialogRoot.d.ts +4 -3
  28. package/dist/lib/components/Dialog/index.d.ts +1 -1
  29. package/dist/lib/components/DropdownMenu/DropdownMenuTrigger.js +3 -3
  30. package/dist/lib/components/DropdownMenu/DropdownMenuTrigger.mjs +1 -1
  31. package/dist/lib/components/Editor/index.js +0 -1
  32. package/dist/lib/components/Flex/index.js +2 -2
  33. package/dist/lib/components/Flex/index.mjs +1 -1
  34. package/dist/lib/components/Flex/index.mjs.map +1 -1
  35. package/dist/lib/components/Gnb/GnbInfo.js +2 -2
  36. package/dist/lib/components/Gnb/GnbInfo.mjs +1 -1
  37. package/dist/lib/components/Gnb/GnbLogo.js +1 -1
  38. package/dist/lib/components/Gnb/GnbLogo.mjs +1 -1
  39. package/dist/lib/components/Gnb/GnbLogo.mjs.map +1 -1
  40. package/dist/lib/components/Grid/NumberingPagination.d.ts +1 -1
  41. package/dist/lib/components/Grid/NumberingPagination.js +59 -17
  42. package/dist/lib/components/Grid/NumberingPagination.mjs +1 -1
  43. package/dist/lib/components/Grid/NumberingPagination.mjs.map +1 -1
  44. package/dist/lib/components/Grid/index.d.ts +2 -2
  45. package/dist/lib/components/Grid/index.js +57 -39
  46. package/dist/lib/components/Grid/index.mjs +1 -1
  47. package/dist/lib/components/Grid/useGrid.js +19 -14
  48. package/dist/lib/components/Grid/useGrid.mjs +1 -1
  49. package/dist/lib/components/IconButton/index.js +10 -10
  50. package/dist/lib/components/IconButton/index.mjs +1 -1
  51. package/dist/lib/components/Modal/ModalRoot.d.ts +2 -2
  52. package/dist/lib/components/Radio/index.js +2 -2
  53. package/dist/lib/components/Radio/index.mjs +1 -1
  54. package/dist/lib/components/RadioCards/RadioCardsRoot.d.ts +3 -1
  55. package/dist/lib/components/RadioCards/index.d.ts +1 -1
  56. package/dist/lib/components/SearchBar/index.js +2 -2
  57. package/dist/lib/components/SearchBar/index.mjs +1 -1
  58. package/dist/lib/components/Select/index.d.ts +4 -4
  59. package/dist/lib/components/Select/index.js +2 -2
  60. package/dist/lib/components/Select/index.mjs +1 -1
  61. package/dist/lib/components/Separator/index.d.ts +1 -1
  62. package/dist/lib/components/SideBar/index.d.ts +27 -0
  63. package/dist/lib/components/SideBar/index.js +17 -4
  64. package/dist/lib/components/SideBar/index.mjs +1 -1
  65. package/dist/lib/components/Slider/index.d.ts +1 -1
  66. package/dist/lib/components/Table/index.d.ts +1 -1
  67. package/dist/lib/components/Table/index.js +17 -10
  68. package/dist/lib/components/Table/index.mjs +1 -1
  69. package/dist/lib/components/Tabs/DynamicTabs.d.ts +4 -2
  70. package/dist/lib/components/Tabs/DynamicTabs.js +21 -18
  71. package/dist/lib/components/Tabs/DynamicTabs.mjs +1 -1
  72. package/dist/lib/components/TextField/index.js +2 -0
  73. package/dist/lib/components/TextField/index.mjs +1 -1
  74. package/dist/lib/tsconfig.tsbuildinfo +1 -1
  75. package/dist/tsconfig.tsbuildinfo +1 -1
  76. package/package.json +150 -150
@@ -21,7 +21,7 @@ var __rest = (this && this.__rest) || function (s, e) {
21
21
  }
22
22
  return t;
23
23
  };
24
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
24
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
25
25
  import { createColumnHelper, getCoreRowModel, getExpandedRowModel, getPaginationRowModel, getSortedRowModel, useReactTable, } from '@tanstack/react-table';
26
26
  import React, { useRef } from 'react';
27
27
  import IconButton from '../IconButton';
@@ -29,22 +29,22 @@ import { ChevronDownIcon, ChevronRightIcon } from '@radix-ui/react-icons';
29
29
  import Checkbox from '../Checkbox';
30
30
  import { useTheme } from '../../../lib/theme';
31
31
  function IndeterminateCheckbox(_a) {
32
- var indeterminate = _a.indeterminate, checked = _a.checked, disabled = _a.disabled, onChange = _a.onChange;
32
+ var indeterminate = _a.indeterminate, checked = _a.checked, disabled = _a.disabled, onChange = _a.onChange, size = _a.size;
33
33
  var ref = useRef();
34
34
  React.useEffect(function () {
35
35
  if (typeof indeterminate === 'boolean') {
36
36
  ref.current.indeterminate = checked && indeterminate;
37
37
  }
38
38
  }, [ref, indeterminate]);
39
- return (_jsx(Checkbox, { ref: ref, id: "checkbox", checked: checked, disabled: disabled, onCheckedChange: function (v) { return onChange && onChange({ target: { value: v } }); }, indeterminate: indeterminate }));
39
+ return (_jsx(Checkbox, { ref: ref, id: "checkbox", checked: checked, disabled: disabled, size: size, onCheckedChange: function (v) { return onChange && onChange({ target: { value: v } }); }, indeterminate: indeterminate, className: "mr-0" }));
40
40
  }
41
41
  export var useGrid = function (_a) {
42
- var _b, _c;
42
+ var _b, _c, _d;
43
43
  var props = __rest(_a, []);
44
44
  var theme = useTheme().theme;
45
- var _d = React.useState([]), sorting = _d[0], setSorting = _d[1];
46
- var _e = React.useState({}), expanded = _e[0], setExpanded = _e[1];
47
- var _f = React.useState({}), rowSelection = _f[0], setRowSelection = _f[1];
45
+ var _e = React.useState([]), sorting = _e[0], setSorting = _e[1];
46
+ var _f = React.useState({}), expanded = _f[0], setExpanded = _f[1];
47
+ var _g = React.useState({}), defaultRowSelection = _g[0], setDefaultRowSelection = _g[1];
48
48
  var columnHelper = createColumnHelper();
49
49
  var columnsData = (_b = props === null || props === void 0 ? void 0 : props.columns) === null || _b === void 0 ? void 0 : _b.map(function (el) {
50
50
  return columnHelper.accessor(el.id, __assign({}, el));
@@ -53,7 +53,7 @@ export var useGrid = function (_a) {
53
53
  var firstcell_1 = columnsData[0].cell;
54
54
  columnsData[0] = __assign(__assign({}, columnsData[0]), { cell: function (props) {
55
55
  var _a;
56
- return (_jsxs("div", { className: "flex", style: { paddingLeft: "".concat(props.row.depth * 10, "px") }, children: [props.row.getCanExpand() ? (_jsx(IconButton, { onClick: props.row.getToggleExpandedHandler(), appearance: "ghost", className: "h-3 w-3", color: (_a = props.color) !== null && _a !== void 0 ? _a : theme.themeColor, children: props.row.getIsExpanded() ? _jsx(ChevronDownIcon, {}) : _jsx(ChevronRightIcon, {}) })) : (_jsx(_Fragment, {})), _jsx("div", { children: firstcell_1 ? firstcell_1(props) : props.getValue() })] }));
56
+ return (_jsxs("div", { className: "flex cursor-pointer items-center", style: { paddingLeft: "".concat(props.row.depth * 10, "px") }, onClick: props.row.getToggleExpandedHandler(), children: [props.row.getCanExpand() ? (_jsx(IconButton, { appearance: "ghost", size: "small", className: "mr-1 h-3 w-3", color: (_a = props.color) !== null && _a !== void 0 ? _a : theme.themeColor, children: props.row.getIsExpanded() ? _jsx(ChevronDownIcon, {}) : _jsx(ChevronRightIcon, {}) })) : (_jsx("div", { className: "mr-2" })), _jsx("div", { children: firstcell_1 ? firstcell_1(props) : props.getValue() })] }));
57
57
  } });
58
58
  }
59
59
  if (props.enableIndexing && !props.enableExpanding) {
@@ -70,22 +70,27 @@ export var useGrid = function (_a) {
70
70
  if (props.enableRowSelection) {
71
71
  columnsData === null || columnsData === void 0 ? void 0 : columnsData.unshift({
72
72
  id: 'select',
73
- size: 50,
73
+ size: 20,
74
74
  header: function (_a) {
75
75
  var table = _a.table;
76
- return (_jsx("div", { className: "header-checkbox", children: _jsx(IndeterminateCheckbox, { checked: table.getIsAllRowsSelected() || table.getIsSomeRowsSelected(),
76
+ return (_jsx("div", { className: "flex h-full w-full items-center justify-center px-1", children: _jsx(IndeterminateCheckbox, { checked: table.getIsAllRowsSelected() || table.getIsSomeRowsSelected(),
77
77
  indeterminate: table.getIsSomeRowsSelected(),
78
- onChange: table.getToggleAllRowsSelectedHandler() }) }));
78
+ onChange: table.getToggleAllRowsSelectedHandler(),
79
+ size: (props === null || props === void 0 ? void 0 : props.size) == 'x-small' ? 'small' : props === null || props === void 0 ? void 0 : props.size }) }));
79
80
  },
80
81
  cell: function (_a) {
81
82
  var row = _a.row;
82
- return (_jsx("div", { className: "px-1", style: { paddingLeft: "".concat(row.depth * 10, "px") }, children: _jsx(IndeterminateCheckbox, { checked: row.getIsSelected() || row.getIsSomeSelected() || row.getIsAllSubRowsSelected(),
83
+ return (_jsx("div", { className: "flex h-full w-full items-center justify-center px-1", children: _jsx(IndeterminateCheckbox, { checked: row.getIsSelected() || row.getIsSomeSelected() || row.getIsAllSubRowsSelected(),
83
84
  indeterminate: row.getIsSomeSelected() && !row.getIsAllSubRowsSelected(),
84
- onChange: row.getToggleSelectedHandler() }) }));
85
+ onChange: row.getToggleSelectedHandler(),
86
+ size: (props === null || props === void 0 ? void 0 : props.size) == 'x-small' ? 'small' : props === null || props === void 0 ? void 0 : props.size }) }));
85
87
  },
86
88
  });
87
89
  }
88
- var reactTableProps = __assign(__assign({ state: { sorting: sorting, rowSelection: rowSelection, expanded: expanded } }, props), { data: props.data, columns: columnsData, color: (_c = props.color) !== null && _c !== void 0 ? _c : theme.themeColor, paginateExpandedRows: true, enableExpanding: !!props.enableExpanding, getSubRows: function (row) { return row.subRows; }, onExpandedChange: setExpanded, onSortingChange: setSorting, onRowSelectionChange: setRowSelection, getSortedRowModel: getSortedRowModel(), getCoreRowModel: getCoreRowModel(), getExpandedRowModel: getExpandedRowModel() });
90
+ var reactTableProps = __assign(__assign({ state: { sorting: sorting, rowSelection: (_c = props.rowSelection) !== null && _c !== void 0 ? _c : defaultRowSelection, expanded: expanded } }, props), { data: props.data, columns: columnsData, color: (_d = props.color) !== null && _d !== void 0 ? _d : theme.themeColor, paginateExpandedRows: true, enableExpanding: !!props.enableExpanding, getSubRows: function (row) { return row.subRows; }, onExpandedChange: setExpanded, onSortingChange: setSorting, onRowSelectionChange: function (e) {
91
+ setDefaultRowSelection(e);
92
+ props.onChangeRowSelection && props.onChangeRowSelection(e);
93
+ }, getSortedRowModel: getSortedRowModel(), getCoreRowModel: getCoreRowModel(), getExpandedRowModel: getExpandedRowModel(), manualPagination: false });
89
94
  if (props.enableRowPagination) {
90
95
  reactTableProps['getPaginationRowModel'] = getPaginationRowModel();
91
96
  }
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{jsxs as e,jsx as n,Fragment as t}from"react/jsx-runtime";import{createColumnHelper as o,getSortedRowModel as r,getCoreRowModel as a,getExpandedRowModel as l,getPaginationRowModel as i,useReactTable as d}from"@tanstack/react-table";import c,{useRef as s}from"react";import{IconButton as u}from"../IconButton/index.mjs";import{ChevronDownIcon as g,ChevronRightIcon as p}from"@radix-ui/react-icons";import{Checkbox as m}from"../Checkbox/index.mjs";import{useTheme as h}from"../../theme/ThemeProvider.mjs";var f=function(){return f=Object.assign||function(e){for(var n,t=1,o=arguments.length;t<o;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},f.apply(this,arguments)},b=function(e,n){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(t[o[r]]=e[o[r]])}return t};function w(e){var t=e.indeterminate,o=e.checked,r=e.disabled,a=e.onChange,l=s();return c.useEffect((function(){"boolean"==typeof t&&(l.current.indeterminate=o&&t)}),[l,t]),n(m,{ref:l,id:"checkbox",checked:o,disabled:r,onCheckedChange:function(e){return a&&a({target:{value:e}})},indeterminate:t})}var x=function(s){var m,x,v=b(s,[]),S=h().theme,R=c.useState([]),y=R[0],C=R[1],O=c.useState({}),E=O[0],I=O[1],j=c.useState({}),k=j[0],P=j[1],N=o(),A=null===(m=null==v?void 0:v.columns)||void 0===m?void 0:m.map((function(e){return N.accessor(e.id,f({},e))}));if(v.enableExpanding){var M=A[0].cell;A[0]=f(f({},A[0]),{cell:function(o){var r;return e("div",{className:"flex",style:{paddingLeft:"".concat(10*o.row.depth,"px")},children:[o.row.getCanExpand()?n(u,{onClick:o.row.getToggleExpandedHandler(),appearance:"ghost",className:"h-3 w-3",color:null!==(r=o.color)&&void 0!==r?r:S.themeColor,children:o.row.getIsExpanded()?n(g,{}):n(p,{})}):n(t,{}),n("div",{children:M?M(o):o.getValue()})]})}})}v.enableIndexing&&!v.enableExpanding&&(null==A||A.unshift({id:"index",size:50,header:"NO",cell:function(e){var t=e.row;return n("div",{children:t.index+1})}})),v.enableRowSelection&&(null==A||A.unshift({id:"select",size:50,header:function(e){var t=e.table;return n("div",{className:"header-checkbox",children:n(w,{checked:t.getIsAllRowsSelected()||t.getIsSomeRowsSelected(),indeterminate:t.getIsSomeRowsSelected(),onChange:t.getToggleAllRowsSelectedHandler()})})},cell:function(e){var t=e.row;return n("div",{className:"px-1",style:{paddingLeft:"".concat(10*t.depth,"px")},children:n(w,{checked:t.getIsSelected()||t.getIsSomeSelected()||t.getIsAllSubRowsSelected(),indeterminate:t.getIsSomeSelected()&&!t.getIsAllSubRowsSelected(),onChange:t.getToggleSelectedHandler()})})}}));var T=f(f({state:{sorting:y,rowSelection:k,expanded:E}},v),{data:v.data,columns:A,color:null!==(x=v.color)&&void 0!==x?x:S.themeColor,paginateExpandedRows:!0,enableExpanding:!!v.enableExpanding,getSubRows:function(e){return e.subRows},onExpandedChange:I,onSortingChange:C,onRowSelectionChange:P,getSortedRowModel:r(),getCoreRowModel:a(),getExpandedRowModel:l()});return v.enableRowPagination&&(T.getPaginationRowModel=i()),d(T)};export{x as useGrid};
2
+ import{jsxs as e,jsx as n}from"react/jsx-runtime";import{createColumnHelper as t,getSortedRowModel as o,getCoreRowModel as l,getExpandedRowModel as r,getPaginationRowModel as a,useReactTable as i}from"@tanstack/react-table";import c,{useRef as d}from"react";import{IconButton as s}from"../IconButton/index.mjs";import{ChevronDownIcon as u,ChevronRightIcon as m}from"@radix-ui/react-icons";import{Checkbox as g}from"../Checkbox/index.mjs";import{useTheme as f}from"../../theme/ThemeProvider.mjs";var p=function(){return p=Object.assign||function(e){for(var n,t=1,o=arguments.length;t<o;t++)for(var l in n=arguments[t])Object.prototype.hasOwnProperty.call(n,l)&&(e[l]=n[l]);return e},p.apply(this,arguments)},h=function(e,n){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var l=0;for(o=Object.getOwnPropertySymbols(e);l<o.length;l++)n.indexOf(o[l])<0&&Object.prototype.propertyIsEnumerable.call(e,o[l])&&(t[o[l]]=e[o[l]])}return t};function v(e){var t=e.indeterminate,o=e.checked,l=e.disabled,r=e.onChange,a=e.size,i=d();return c.useEffect((function(){"boolean"==typeof t&&(i.current.indeterminate=o&&t)}),[i,t]),n(g,{ref:i,id:"checkbox",checked:o,disabled:l,size:a,onCheckedChange:function(e){return r&&r({target:{value:e}})},indeterminate:t,className:"mr-0"})}var w=function(d){var g,w,x,S=h(d,[]),b=f().theme,R=c.useState([]),y=R[0],C=R[1],O=c.useState({}),j=O[0],E=O[1],I=c.useState({}),z=I[0],k=I[1],P=t(),N=null===(g=null==S?void 0:S.columns)||void 0===g?void 0:g.map((function(e){return P.accessor(e.id,p({},e))}));if(S.enableExpanding){var A=N[0].cell;N[0]=p(p({},N[0]),{cell:function(t){var o;return e("div",{className:"flex cursor-pointer items-center",style:{paddingLeft:"".concat(10*t.row.depth,"px")},onClick:t.row.getToggleExpandedHandler(),children:[t.row.getCanExpand()?n(s,{appearance:"ghost",size:"small",className:"mr-1 h-3 w-3",color:null!==(o=t.color)&&void 0!==o?o:b.themeColor,children:t.row.getIsExpanded()?n(u,{}):n(m,{})}):n("div",{className:"mr-2"}),n("div",{children:A?A(t):t.getValue()})]})}})}S.enableIndexing&&!S.enableExpanding&&(null==N||N.unshift({id:"index",size:50,header:"NO",cell:function(e){var t=e.row;return n("div",{children:t.index+1})}})),S.enableRowSelection&&(null==N||N.unshift({id:"select",size:20,header:function(e){var t=e.table;return n("div",{className:"flex h-full w-full items-center justify-center px-1",children:n(v,{checked:t.getIsAllRowsSelected()||t.getIsSomeRowsSelected(),indeterminate:t.getIsSomeRowsSelected(),onChange:t.getToggleAllRowsSelectedHandler(),size:"x-small"==(null==S?void 0:S.size)?"small":null==S?void 0:S.size})})},cell:function(e){var t=e.row;return n("div",{className:"flex h-full w-full items-center justify-center px-1",children:n(v,{checked:t.getIsSelected()||t.getIsSomeSelected()||t.getIsAllSubRowsSelected(),indeterminate:t.getIsSomeSelected()&&!t.getIsAllSubRowsSelected(),onChange:t.getToggleSelectedHandler(),size:"x-small"==(null==S?void 0:S.size)?"small":null==S?void 0:S.size})})}}));var M=p(p({state:{sorting:y,rowSelection:null!==(w=S.rowSelection)&&void 0!==w?w:z,expanded:j}},S),{data:S.data,columns:N,color:null!==(x=S.color)&&void 0!==x?x:b.themeColor,paginateExpandedRows:!0,enableExpanding:!!S.enableExpanding,getSubRows:function(e){return e.subRows},onExpandedChange:E,onSortingChange:C,onRowSelectionChange:function(e){k(e),S.onChangeRowSelection&&S.onChangeRowSelection(e)},getSortedRowModel:o(),getCoreRowModel:l(),getExpandedRowModel:r(),manualPagination:!1});return S.enableRowPagination&&(M.getPaginationRowModel=a()),i(M)};export{w as useGrid};
3
3
  //# sourceMappingURL=useGrid.mjs.map
@@ -33,11 +33,11 @@ var iconButtonVariants = cva("grid place-content-center transition-colors focus:
33
33
  radius: __assign({}, radiusVariants['base']),
34
34
  scaling: __assign({}, scalingVariants),
35
35
  size: {
36
- 'x-small': 'p-1 w-5 h-5',
37
- small: 'p-[6px] w-6 h-6',
38
- medium: 'p-2 w-8 h-8',
39
- large: 'p-[11px] w-10 h-10',
40
- 'x-large': 'p-[14px] w-12 h-12',
36
+ 'x-small': 'p-[3px] w-5 h-5',
37
+ small: 'p-1 w-6 h-6',
38
+ medium: 'p-[7px] w-8 h-8',
39
+ large: 'p-[9px] w-10 h-10',
40
+ 'x-large': 'p-[11px] w-12 h-12',
41
41
  },
42
42
  color: primaryColorStyle(),
43
43
  },
@@ -49,11 +49,11 @@ var iconButtonVariants = cva("grid place-content-center transition-colors focus:
49
49
  },
50
50
  });
51
51
  var iconSize = {
52
- 'x-small': 12,
53
- small: 14,
54
- medium: 16,
55
- large: 18,
56
- 'x-large': 20,
52
+ 'x-small': 14,
53
+ small: 16,
54
+ medium: 18,
55
+ large: 22,
56
+ 'x-large': 26,
57
57
  };
58
58
  export var IconButton = forwardRef(function (_a, ref) {
59
59
  var children = _a.children, className = _a.className, radius = _a.radius, _b = _a.size, size = _b === void 0 ? 'medium' : _b, scaling = _a.scaling, color = _a.color, _c = _a.appearance, appearance = _c === void 0 ? 'solid' : _c, props = __rest(_a, ["children", "className", "radius", "size", "scaling", "color", "appearance"]);
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{jsx as e}from"react/jsx-runtime";import r,{forwardRef as t,Children as o}from"react";import{cva as a}from"class-variance-authority";import{radiusVariants as l,scalingVariants as n,primaryColorStyle as i,appearanceStyle as s}from"../../constants.mjs";import{cn as c}from"../../utils/utils.mjs";import{useTheme as m}from"../../theme/ThemeProvider.mjs";import{MAIN_COLOR as p}from"../../color/constants.mjs";var u=function(){return u=Object.assign||function(e){for(var r,t=1,o=arguments.length;t<o;t++)for(var a in r=arguments[t])Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a]);return e},u.apply(this,arguments)},d=function(e,r){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&r.indexOf(o)<0&&(t[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(o=Object.getOwnPropertySymbols(e);a<o.length;a++)r.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(t[o[a]]=e[o[a]])}return t},f=a("grid place-content-center transition-colors focus:outline-none hover:cursor-pointer\n disabled:cursor-not-allowed disabled:bg-slate-3 disabled:text-slate-8",{variants:{radius:u({},l.base),scaling:u({},n),size:{"x-small":"p-1 w-5 h-5",small:"p-[6px] w-6 h-6",medium:"p-2 w-8 h-8",large:"p-[11px] w-10 h-10","x-large":"p-[14px] w-12 h-12"},color:i()},defaultVariants:{radius:"medium",scaling:"100%",size:"medium",color:p}}),h={"x-small":12,small:14,medium:16,large:18,"x-large":20},g=t((function(t,a){var l=t.children,n=t.className,i=t.radius,p=t.size,g=void 0===p?"medium":p,b=t.scaling,y=t.color,v=t.appearance,x=void 0===v?"solid":v,O=d(t,["children","className","radius","size","scaling","color","appearance"]),j=m().theme,w=h[g],z=h[g],P={radius:null!=i?i:j.themeRadius,scaling:null!=b?b:j.themeScaling,color:null!=y?y:j.themeColor,size:g},N=c(f(P),s(x,P.color,!0),n);return e("button",u({ref:a,className:N},O,{children:o.map(l,(function(e){return r.cloneElement(e,{width:w,height:z})}))}))}));g.displayName="IconButton";export{g as IconButton,g as default};
2
+ import{jsx as e}from"react/jsx-runtime";import r,{forwardRef as t,Children as o}from"react";import{cva as a}from"class-variance-authority";import{radiusVariants as l,scalingVariants as n,primaryColorStyle as i,appearanceStyle as s}from"../../constants.mjs";import{cn as c}from"../../utils/utils.mjs";import{useTheme as m}from"../../theme/ThemeProvider.mjs";import{MAIN_COLOR as p}from"../../color/constants.mjs";var u=function(){return u=Object.assign||function(e){for(var r,t=1,o=arguments.length;t<o;t++)for(var a in r=arguments[t])Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a]);return e},u.apply(this,arguments)},d=function(e,r){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&r.indexOf(o)<0&&(t[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(o=Object.getOwnPropertySymbols(e);a<o.length;a++)r.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(t[o[a]]=e[o[a]])}return t},f=a("grid place-content-center transition-colors focus:outline-none hover:cursor-pointer\n disabled:cursor-not-allowed disabled:bg-slate-3 disabled:text-slate-8",{variants:{radius:u({},l.base),scaling:u({},n),size:{"x-small":"p-[3px] w-5 h-5",small:"p-1 w-6 h-6",medium:"p-[7px] w-8 h-8",large:"p-[9px] w-10 h-10","x-large":"p-[11px] w-12 h-12"},color:i()},defaultVariants:{radius:"medium",scaling:"100%",size:"medium",color:p}}),h={"x-small":14,small:16,medium:18,large:22,"x-large":26},g=t((function(t,a){var l=t.children,n=t.className,i=t.radius,p=t.size,g=void 0===p?"medium":p,b=t.scaling,y=t.color,v=t.appearance,x=void 0===v?"solid":v,O=d(t,["children","className","radius","size","scaling","color","appearance"]),j=m().theme,w=h[g],z=h[g],P={radius:null!=i?i:j.themeRadius,scaling:null!=b?b:j.themeScaling,color:null!=y?y:j.themeColor,size:g},N=c(f(P),s(x,P.color,!0),n);return e("button",u({ref:a,className:N},O,{children:o.map(l,(function(e){return r.cloneElement(e,{width:w,height:z})}))}))}));g.displayName="IconButton";export{g as IconButton,g as default};
3
3
  //# sourceMappingURL=index.mjs.map
@@ -2,9 +2,9 @@ import React, { ComponentPropsWithoutRef } from 'react';
2
2
  import { Dialog as DialogTheme } from '@radix-ui/themes';
3
3
  import { VariantProps } from 'class-variance-authority';
4
4
  import { modalContentVariants } from './ModalContent';
5
- import { IRadius, IScaling, ISize } from '../../../lib/types';
5
+ import { IColor, IRadius, IScaling, ISize } from '../../../lib/types';
6
6
  export interface ModalRootProps extends VariantProps<typeof modalContentVariants> {
7
- color?: any;
7
+ color?: IColor;
8
8
  size?: Exclude<ISize, 'x-small'>;
9
9
  scaling?: IScaling;
10
10
  radius?: IRadius;
@@ -24,8 +24,8 @@ var __rest = (this && this.__rest) || function (s, e) {
24
24
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
25
25
  import { forwardRef } from 'react';
26
26
  import { cva } from 'class-variance-authority';
27
- import { Theme, Radio as RadioTheme, Flex } from '@radix-ui/themes';
28
- import { Text } from '../../../lib/Typography/Text';
27
+ import { Theme, Radio as RadioTheme } from '@radix-ui/themes';
28
+ import { Text, Flex } from '../../../lib';
29
29
  import { cn } from '../../../lib/utils/utils';
30
30
  import { useTheme } from '../../../lib/theme';
31
31
  import { MAIN_COLOR } from '../../../lib/color/constants';
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{jsx as e,jsxs as r}from"react/jsx-runtime";import{forwardRef as a}from"react";import{cva as t}from"class-variance-authority";import{Theme as o,Flex as l,Radio as i}from"@radix-ui/themes";import{Text as n}from"../../Typography/Text/index.mjs";import{cn as s}from"../../utils/utils.mjs";import{useTheme as c}from"../../theme/ThemeProvider.mjs";import{MAIN_COLOR as m}from"../../color/constants.mjs";var p=function(){return p=Object.assign||function(e){for(var r,a=1,t=arguments.length;a<t;a++)for(var o in r=arguments[a])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e},p.apply(this,arguments)},u=function(e,r){var a={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&r.indexOf(t)<0&&(a[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(t=Object.getOwnPropertySymbols(e);o<t.length;o++)r.indexOf(t[o])<0&&Object.prototype.propertyIsEnumerable.call(e,t[o])&&(a[t[o]]=e[t[o]])}return a},f=t("font-normal",{variants:{size:{small:"text-[12px] gap-2",medium:"text-[14px] gap-2",large:"text-[16px] gap-3"}},defaultVariants:{size:"medium"}}),d=a((function(a,t){var d,h=a.value,v=a.scaling,g=a.color,y=a.size,x=void 0===y?"medium":y,O=a.appearance,b=void 0===O?"surface":O,j=a.children,z=a.className,P=u(a,["value","scaling","color","size","appearance","children","className"]),w=c().theme,N="2";"small"===x&&(N="1"),"large"===x&&(N="3");var C={scaling:null!=v?v:w.themeScaling,color:null!==(d=null!=g?g:w.themeColor)&&void 0!==d?d:m};return e(o,{accentColor:C.color,scaling:C.scaling,children:e(l,{asChild:!0,className:s(f({size:x}),z),children:r(n,{as:"label",size:N,color:"black",children:[e(i,p({ref:t,value:h,variant:b,size:N},P)),j]})})})}));d.displayName="Radio";export{d as Radio,d as default};
2
+ import{jsx as o,jsxs as t}from"react/jsx-runtime";import{forwardRef as e}from"react";import{cva as r}from"class-variance-authority";import{Theme as i,Radio as m}from"@radix-ui/themes";import"../Accordion/index.mjs";import"../AlertDialog/AlertDialogRoot.mjs";import"../AlertDialog/AlertDialogTrigger.mjs";import"../AlertDialog/AlertDialogContent.mjs";import"../AlertDialog/AlertDialogTitle.mjs";import"../AlertDialog/AlertDialogDescription.mjs";import"../AlertDialog/AlertDialogCancel.mjs";import"../AlertDialog/AlertDialogAction.mjs";import"../AspectRatio/index.mjs";import"../Avatar/index.mjs";import"../Badge/index.mjs";import"../Box/index.mjs";import"../Breadcrumb/BreadcrumbRoot.mjs";import"../Breadcrumb/BreadcrumbItem.mjs";import"../Breadcrumb/BreadcrumbLink.mjs";import"../Breadcrumb/BreadcrumbList.mjs";import"../Breadcrumb/BreadcrumbPage.mjs";import"../Breadcrumb/BreadcrumbSeparator.mjs";import"../Breadcrumb/BreadcrumbEllipsis.mjs";import"../Button/index.mjs";import"../Calendar/index.mjs";import"../Callout/CalloutRoot.mjs";import"../Callout/CalloutText.mjs";import"../Callout/CalloutIcon.mjs";import"../Card/index.mjs";import"../Checkbox/index.mjs";import"../CheckboxCard/index.mjs";import"../CheckboxGroup/CheckboxGroupRoot.mjs";import"../CheckboxGroup/CheckboxGroupItem.mjs";import"../ContextMenu/ContextMenuRoot.mjs";import"../ContextMenu/ContextMenuContent.mjs";import"../ContextMenu/ContextMenuCheckboxItem.mjs";import"../ContextMenu/ContextMenuGroup.mjs";import"../ContextMenu/ContextMenuItem.mjs";import"../ContextMenu/ContextMenuItemIndicator.mjs";import"../ContextMenu/ContextMenuLabel.mjs";import"../ContextMenu/ContextMenuTrigger.mjs";import"../ContextMenu/ContextMenuRadioGroup.mjs";import"../ContextMenu/ContextMenuRadioItem.mjs";import"../ContextMenu/ContextMenuSeparator.mjs";import"../ContextMenu/ContextMenuSubTrigger.mjs";import"../ContextMenu/ContextMenuSubContent.mjs";import"../Collapsible/index.mjs";import"../Container/index.mjs";import"../DataList/DataListRoot.mjs";import"../DataList/DataListItem.mjs";import"../DataList/DataListLabel.mjs";import"../DataList/DataListValue.mjs";import"../Datepicker/index.mjs";import"../Dialog/DialogRoot.mjs";import"../Dialog/DialogTrigger.mjs";import"../Dialog/DialogContent.mjs";import"../Dialog/DialogTitle.mjs";import"../Dialog/DialogDescription.mjs";import"../Dialog/DialogSlot.mjs";import"../Dialog/DialogCancel.mjs";import"../Dialog/DialogAction.mjs";import"../DropdownMenu/DropdownMenuRoot.mjs";import"../DropdownMenu/DropdownMenuTrigger.mjs";import"../DropdownMenu/DropdownMenuContent.mjs";import"../DropdownMenu/DropdownMenuLable.mjs";import"../DropdownMenu/DropdownMenuItem.mjs";import"../DropdownMenu/DropdownMenuSeparator.mjs";import"../DropdownMenu/DropdownMenuCheckboxItem.mjs";import"../DropdownMenu/DropdonMenuRadioGroup.mjs";import"../DropdownMenu/DropdownMenuRadioItem.mjs";import"../DropdownMenu/DropdownMenuSub.mjs";import"../DropdownMenu/DropdownMenuSubTrigger.mjs";import"../DropdownMenu/DropdonMenuSubContent.mjs";import"../DropdownMenu/DropdownMenuItemIndicator.mjs";import"../Editor/index.mjs";import{Flex as n}from"../Flex/index.mjs";import"../Tabs/DynamicTabs.mjs";import"../Footer/index.mjs";import"../Gnb/GnbRoot.mjs";import"../Gnb/GnbLogo.mjs";import"../Gnb/GnbMenu.mjs";import"../Gnb/GnbMenuItem.mjs";import"../Gnb/GnbInfo.mjs";import"../GridLayout/index.mjs";import"../HoverCard/HoverCardRoot.mjs";import"../HoverCard/HoverCardTrigger.mjs";import"../HoverCard/HoverCardContent.mjs";import"../IconButton/index.mjs";import"../Inset/index.mjs";import"../Label/index.mjs";import"../Menubar/MenubarRoot.mjs";import"../Menubar/MenubarMenu.mjs";import"../Menubar/MenubarTrigger.mjs";import"../Menubar/MenubarContent.mjs";import"../Menubar/MenubarItem.mjs";import"../Menubar/MenubarSeparator.mjs";import"../Menubar/MenubarSub.mjs";import"../Menubar/MenubarSubTrigger.mjs";import"../Menubar/MenubarSubContent.mjs";import"../Menubar/MenubarCheckboxItem.mjs";import"../Menubar/MenubarItemIndicator.mjs";import"../Menubar/MenubarRadioGroup.mjs";import"../Menubar/MenubarRadioItem.mjs";import"../Modal/ModalRoot.mjs";import"../Modal/ModalTrigger.mjs";import"../Modal/ModalContent.mjs";import"../Modal/ModalTitle.mjs";import"../Modal/ModalDescription.mjs";import"../Modal/ModalFooter.mjs";import"../Modal/ModalCancel.mjs";import"../Modal/ModalAction.mjs";import"../NavigationMenu/NavigationMenuRoot.mjs";import"../NavigationMenu/NavigationMenuList.mjs";import"../NavigationMenu/NavigationMenuItem.mjs";import"../NavigationMenu/NavigationMenuTrigger.mjs";import"../NavigationMenu/NavigationMenuContent.mjs";import"../NavigationMenu/NavigationMenuViewport.mjs";import"../NavigationMenu/NavigationMenuIndicator.mjs";import"../NavigationMenu/NavigationMenuLink.mjs";import"../Popover/PopoverRoot.mjs";import"../Popover/PopoverTrigger.mjs";import"../Popover/PopoverContent.mjs";import"../Popover/PopoverClose.mjs";import"../Progress/index.mjs";import"../RadioCards/RadioCardsRoot.mjs";import"../RadioCards/RadioCardsItem.mjs";import"../RadioGroup/RadioGroupRoot.mjs";import"../RadioGroup/RadioGroupItem.mjs";import"../ScrollArea/index.mjs";import"../SearchBar/index.mjs";import"../SegmentedControl/SegmentedControlRoot.mjs";import"../SegmentedControl/SegmentedControlItem.mjs";import"../Select/index.mjs";import"../Separator/index.mjs";import"../SideBar/index.mjs";import"../Skeleton/index.mjs";import"../Slider/index.mjs";import"../Spinner/index.mjs";import"../Table/index.mjs";import"../TabNav/index.mjs";import"../Tabs/index.mjs";import"../TextArea/index.mjs";import"../TextField/index.mjs";import"../Timeline/TimelineRoot.mjs";import"../Timeline/TimelineItem.mjs";import"../Timeline/TimelineConnector.mjs";import"../Timeline/TimelineHeader.mjs";import"../Timeline/TimelineTime.mjs";import"../Timeline/TimelineIcon.mjs";import"../Timeline/TimelineTitle.mjs";import"../Timeline/TimelineContent.mjs";import"../Timeline/TimelineDescription.mjs";import"../Toast/ToastRoot.mjs";import"../Toast/ToastTitle.mjs";import"../Toast/ToastDescription.mjs";import"../Toast/ToastActionButton.mjs";import"../Toggle/index.mjs";import"../Toggle/ToggleWithText.mjs";import"../ToggleGroup/ToggleGroupRoot.mjs";import"../ToggleGroup/ToggleGroupItem.mjs";import"../ToggleSwitch/index.mjs";import"../Tooltip/index.mjs";import"../BarChart/index.mjs";import"../BubbleChart/index.mjs";import"../RadarChart/index.mjs";import"../LineChart/index.mjs";import"../PieChart/index.mjs";import"../DoughnutChart/index.mjs";import"../Grid/index.mjs";import"../Grid/useGrid.mjs";import"../Tree/index.mjs";import"../../Typography/Header/index.mjs";import a from"../../Typography/Text/index.mjs";import{useTheme as p}from"../../theme/ThemeProvider.mjs";import{cn as s}from"../../utils/utils.mjs";import{MAIN_COLOR as l}from"../../color/constants.mjs";var j=function(){return j=Object.assign||function(o){for(var t,e=1,r=arguments.length;e<r;e++)for(var i in t=arguments[e])Object.prototype.hasOwnProperty.call(t,i)&&(o[i]=t[i]);return o},j.apply(this,arguments)},u=function(o,t){var e={};for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&t.indexOf(r)<0&&(e[r]=o[r]);if(null!=o&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(o);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(o,r[i])&&(e[r[i]]=o[r[i]])}return e},d=r("font-normal",{variants:{size:{small:"text-[12px] gap-2",medium:"text-[14px] gap-2",large:"text-[16px] gap-3"}},defaultVariants:{size:"medium"}}),g=e((function(e,r){var g,M=e.value,x=e.scaling,c=e.color,b=e.size,C=void 0===b?"medium":b,D=e.appearance,T=void 0===D?"surface":D,v=e.children,h=e.className,R=u(e,["value","scaling","color","size","appearance","children","className"]),I=p().theme,w="2";"small"===C&&(w="1"),"large"===C&&(w="3");var G={scaling:null!=x?x:I.themeScaling,color:null!==(g=null!=c?c:I.themeColor)&&void 0!==g?g:l};return o(i,{accentColor:G.color,scaling:G.scaling,children:o(n,{asChild:!0,className:s(d({size:C}),h),children:t(a,{as:"label",size:w,color:"black",children:[o(m,j({ref:r,value:M,variant:T,size:w},R)),v]})})})}));g.displayName="Radio";export{g as Radio,g as default};
3
3
  //# sourceMappingURL=index.mjs.map
@@ -2,12 +2,14 @@ import React from 'react';
2
2
  import { VariantProps } from 'class-variance-authority';
3
3
  import { RadioCards as RadioCardsTheme } from '@radix-ui/themes';
4
4
  import { radioCardsItemVariants } from './RadioCardsItem';
5
+ import { IColor } from '../../../lib/types';
5
6
  export interface RadioCardsProps extends VariantProps<typeof radioCardsVariants>, VariantProps<typeof radioCardsItemVariants> {
6
7
  appearance?: 'classic' | 'surface';
8
+ color?: IColor;
7
9
  }
8
10
  declare const radioCardsVariants: (props?: ({
9
11
  scaling?: "90%" | "95%" | "100%" | "105%" | "110%" | null | undefined;
10
12
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
11
13
  export declare const RadioCardsContext: React.Context<RadioCardsProps>;
12
- export declare const RadioCardsRoot: React.ForwardRefExoticComponent<Omit<Omit<RadioCardsTheme.RootProps & React.RefAttributes<HTMLDivElement>, "ref">, "size"> & RadioCardsProps & React.RefAttributes<HTMLDivElement>>;
14
+ export declare const RadioCardsRoot: React.ForwardRefExoticComponent<Omit<Omit<RadioCardsTheme.RootProps & React.RefAttributes<HTMLDivElement>, "ref">, "color" | "size"> & RadioCardsProps & React.RefAttributes<HTMLDivElement>>;
13
15
  export {};
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  declare const RadioCards: {
3
- Root: import("react").ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/themes/dist/cjs/components/radio-cards").RootProps & import("react").RefAttributes<HTMLDivElement>, "ref">, "size"> & import("./RadioCardsRoot").RadioCardsProps & import("react").RefAttributes<HTMLDivElement>>;
3
+ Root: import("react").ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/themes/dist/cjs/components/radio-cards").RootProps & import("react").RefAttributes<HTMLDivElement>, "ref">, "color" | "size"> & import("./RadioCardsRoot").RadioCardsProps & import("react").RefAttributes<HTMLDivElement>>;
4
4
  Item: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/themes/dist/cjs/components/radio-cards").ItemProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("./RadioCardsItem").RadioCardsItemProps & import("react").RefAttributes<HTMLButtonElement>>;
5
5
  };
6
6
  export default RadioCards;
@@ -73,10 +73,10 @@ export var SearchBar = forwardRef(function (_a, ref) {
73
73
  setInitSetting(true);
74
74
  }
75
75
  }, [children]);
76
- return (_jsxs("div", { ref: ref, children: [children && (_jsxs("div", { className: "flex h-0 w-full gap-3 pr-2 opacity-0", children: [_jsx("div", { className: "flex flex-wrap gap-3 overflow-hidden bg-redA-3 px-2", ref: containerRef, children: children }), _jsxs("div", { className: "flex gap-2", children: [SubmitButton ? (SubmitButton) : (_jsx(IconButton, { size: size, children: _jsx(MagnifyingGlassIcon, {}) })), ReloadButton ? (ReloadButton) : (_jsx(IconButton, { size: size, children: _jsx(ReloadIcon, {}) })), _jsx(IconButton, { size: size, children: _jsx(ReloadIcon, {}) })] })] })), _jsxs(Collapsible.Root, __assign({ className: cn('grid w-full gap-3', SearchBarVariants({ scaling: contextValue.scaling }), className), onOpenChange: setOpen }, props, { children: [_jsxs("div", { className: "flex w-full justify-between", children: [_jsx("div", { className: "flex", children: children &&
76
+ return (_jsxs("div", { ref: ref, children: [children && (_jsxs("div", { className: "flex h-0 w-full gap-3 pr-2 opacity-0", children: [_jsx("div", { className: "flex flex-wrap gap-3 overflow-hidden bg-redA-3 px-2", ref: containerRef, children: children }), _jsxs("div", { className: "flex gap-2", children: [ReloadButton ? (ReloadButton) : (_jsx(IconButton, { size: size, children: _jsx(ReloadIcon, {}) })), SubmitButton ? (SubmitButton) : (_jsx(IconButton, { size: size, children: _jsx(MagnifyingGlassIcon, {}) })), _jsx(IconButton, { size: size, children: _jsx(ReloadIcon, {}) })] })] })), _jsxs(Collapsible.Root, __assign({ className: cn('grid w-full', SearchBarVariants({ scaling: contextValue.scaling }), className), onOpenChange: setOpen }, props, { children: [_jsxs("div", { className: "flex w-full justify-between", children: [_jsx("div", { className: "flex gap-3", children: children &&
77
77
  React.Children.map(children, function (child, index) {
78
78
  return firstLineIndices.includes(index) ? child : null;
79
- }) }), _jsxs("div", { className: "flex gap-2", children: [SubmitButton ? (SubmitButton) : (_jsx(IconButton, { onClick: onClickSubmit, size: size, color: contextValue.color, children: _jsx(MagnifyingGlassIcon, {}) })), ReloadButton ? (ReloadButton) : (_jsx(IconButton, { onClick: onClickReload, size: size, color: contextValue.color, children: _jsx(ReloadIcon, {}) })), secondLineIndices.length > 0 && (_jsx(Collapsible.Trigger, { open: open, size: size, color: contextValue.color }))] })] }), _jsx(Collapsible.Content, { className: "flex gap-3", children: children &&
79
+ }) }), _jsxs("div", { className: "flex gap-2", children: [ReloadButton ? (ReloadButton) : (_jsx(IconButton, { onClick: onClickReload, size: size, color: contextValue.color, children: _jsx(ReloadIcon, {}) })), SubmitButton ? (SubmitButton) : (_jsx(IconButton, { onClick: onClickSubmit, size: size, color: contextValue.color, children: _jsx(MagnifyingGlassIcon, {}) })), secondLineIndices.length > 0 && (_jsx(Collapsible.Trigger, { open: open, size: size, color: contextValue.color }))] })] }), _jsx(Collapsible.Content, { className: "flex gap-3 pt-2", children: children &&
80
80
  React.Children.map(children, function (child, index) {
81
81
  return secondLineIndices.includes(index) ? child : null;
82
82
  }) })] }))] }));
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{jsxs as e,jsx as r}from"react/jsx-runtime";import l,{forwardRef as n,useRef as i,useState as o,useEffect as t}from"react";import{cva as c}from"class-variance-authority";import{scalingVariants as a}from"../../constants.mjs";import{cn as s}from"../../utils/utils.mjs";import{useTheme as m}from"../../theme/ThemeProvider.mjs";import u from"../Collapsible/index.mjs";import{IconButton as d}from"../IconButton/index.mjs";import{MagnifyingGlassIcon as f,ReloadIcon as p}from"@radix-ui/react-icons";var h=function(){return h=Object.assign||function(e){for(var r,l=1,n=arguments.length;l<n;l++)for(var i in r=arguments[l])Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i]);return e},h.apply(this,arguments)},g=function(e,r){var l={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(l[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)r.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(l[n[i]]=e[n[i]])}return l},v=c("",{variants:{scaling:h({},a)},defaultVariants:{scaling:"100%"}}),y=n((function(n,c){var a=n.className,y=n.children,b=n.scaling,x=n.size,C=n.color,j=n.onClickSubmit,O=n.onClickReload,N=n.SubmitButton,w=n.ReloadButton,z=g(n,["className","children","scaling","size","color","onClickSubmit","onClickReload","SubmitButton","ReloadButton"]),B=i(null),S=m().theme,R={scaling:null!=b?b:S.themeScaling,color:null!=C?C:S.themeColor,size:x},k=o([]),P=k[0],A=k[1],E=o([]),I=E[0],T=E[1],V=o(!1),q=V[0],D=V[1],F=o(!1);F[0];var G=F[1];return t((function(){if(y){G(!1);var e=B.current,r=Array.from(e.children),l=r[0].getBoundingClientRect().top,n=[],i=[];r.forEach((function(e,r){e.getBoundingClientRect().top===l?n.push(r):i.push(r)})),A(n),T(i),G(!0)}}),[y]),e("div",{ref:c,children:[y&&e("div",{className:"flex h-0 w-full gap-3 pr-2 opacity-0",children:[r("div",{className:"flex flex-wrap gap-3 overflow-hidden bg-redA-3 px-2",ref:B,children:y}),e("div",{className:"flex gap-2",children:[N||r(d,{size:x,children:r(f,{})}),w||r(d,{size:x,children:r(p,{})}),r(d,{size:x,children:r(p,{})})]})]}),e(u.Root,h({className:s("grid w-full gap-3",v({scaling:R.scaling}),a),onOpenChange:D},z,{children:[e("div",{className:"flex w-full justify-between",children:[r("div",{className:"flex",children:y&&l.Children.map(y,(function(e,r){return P.includes(r)?e:null}))}),e("div",{className:"flex gap-2",children:[N||r(d,{onClick:j,size:x,color:R.color,children:r(f,{})}),w||r(d,{onClick:O,size:x,color:R.color,children:r(p,{})}),I.length>0&&r(u.Trigger,{open:q,size:x,color:R.color})]})]}),r(u.Content,{className:"flex gap-3",children:y&&l.Children.map(y,(function(e,r){return I.includes(r)?e:null}))})]}))]})}));y.displayName="SearchBar";export{y as SearchBar,v as SearchBarVariants,y as default};
2
+ import{jsxs as e,jsx as r}from"react/jsx-runtime";import l,{forwardRef as n,useRef as i,useState as o,useEffect as t}from"react";import{cva as c}from"class-variance-authority";import{scalingVariants as a}from"../../constants.mjs";import{cn as s}from"../../utils/utils.mjs";import{useTheme as m}from"../../theme/ThemeProvider.mjs";import u from"../Collapsible/index.mjs";import{IconButton as d}from"../IconButton/index.mjs";import{ReloadIcon as f,MagnifyingGlassIcon as p}from"@radix-ui/react-icons";var h=function(){return h=Object.assign||function(e){for(var r,l=1,n=arguments.length;l<n;l++)for(var i in r=arguments[l])Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i]);return e},h.apply(this,arguments)},g=function(e,r){var l={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(l[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)r.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(l[n[i]]=e[n[i]])}return l},v=c("",{variants:{scaling:h({},a)},defaultVariants:{scaling:"100%"}}),y=n((function(n,c){var a=n.className,y=n.children,b=n.scaling,x=n.size,C=n.color,j=n.onClickSubmit,O=n.onClickReload,N=n.SubmitButton,w=n.ReloadButton,z=g(n,["className","children","scaling","size","color","onClickSubmit","onClickReload","SubmitButton","ReloadButton"]),B=i(null),S=m().theme,R={scaling:null!=b?b:S.themeScaling,color:null!=C?C:S.themeColor,size:x},k=o([]),P=k[0],A=k[1],E=o([]),I=E[0],T=E[1],V=o(!1),q=V[0],D=V[1],F=o(!1);F[0];var G=F[1];return t((function(){if(y){G(!1);var e=B.current,r=Array.from(e.children),l=r[0].getBoundingClientRect().top,n=[],i=[];r.forEach((function(e,r){e.getBoundingClientRect().top===l?n.push(r):i.push(r)})),A(n),T(i),G(!0)}}),[y]),e("div",{ref:c,children:[y&&e("div",{className:"flex h-0 w-full gap-3 pr-2 opacity-0",children:[r("div",{className:"flex flex-wrap gap-3 overflow-hidden bg-redA-3 px-2",ref:B,children:y}),e("div",{className:"flex gap-2",children:[w||r(d,{size:x,children:r(f,{})}),N||r(d,{size:x,children:r(p,{})}),r(d,{size:x,children:r(f,{})})]})]}),e(u.Root,h({className:s("grid w-full",v({scaling:R.scaling}),a),onOpenChange:D},z,{children:[e("div",{className:"flex w-full justify-between",children:[r("div",{className:"flex gap-3",children:y&&l.Children.map(y,(function(e,r){return P.includes(r)?e:null}))}),e("div",{className:"flex gap-2",children:[w||r(d,{onClick:O,size:x,color:R.color,children:r(f,{})}),N||r(d,{onClick:j,size:x,color:R.color,children:r(p,{})}),I.length>0&&r(u.Trigger,{open:q,size:x,color:R.color})]})]}),r(u.Content,{className:"flex gap-3 pt-2",children:y&&l.Children.map(y,(function(e,r){return I.includes(r)?e:null}))})]}))]})}));y.displayName="SearchBar";export{y as SearchBar,v as SearchBarVariants,y as default};
3
3
  //# sourceMappingURL=index.mjs.map
@@ -1,13 +1,13 @@
1
1
  import React from 'react';
2
2
  import { Select as SelectTheme } from '@radix-ui/themes';
3
3
  import { VariantProps } from 'class-variance-authority';
4
- import { IRadius, IScaling } from '../../../lib/types';
4
+ import { IColor, IRadius, IScaling } from '../../../lib/types';
5
5
  export interface SelectProps extends VariantProps<typeof selectVariants> {
6
6
  label?: string;
7
7
  defaultValue?: string;
8
8
  selected?: string;
9
9
  disabled?: boolean;
10
- color?: any;
10
+ color?: IColor;
11
11
  scaling?: IScaling;
12
12
  appearance?: 'classic' | 'surface' | 'soft' | 'ghost';
13
13
  size?: 'small' | 'medium' | 'large';
@@ -17,7 +17,7 @@ declare const selectVariants: (props?: ({
17
17
  radius?: "none" | "small" | "medium" | "large" | "full" | null | undefined;
18
18
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
19
19
  export declare const useSelectContext: () => SelectProps;
20
- export declare const Root: React.ForwardRefExoticComponent<SelectTheme.RootProps & SelectProps & React.RefAttributes<never>>;
20
+ export declare const Root: React.ForwardRefExoticComponent<Omit<SelectTheme.RootProps, "color" | "size"> & SelectProps & React.RefAttributes<never>>;
21
21
  export declare const Trigger: React.ForwardRefExoticComponent<Omit<SelectTheme.TriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & SelectProps & React.RefAttributes<HTMLButtonElement>>;
22
22
  export declare const Content: React.ForwardRefExoticComponent<Omit<SelectTheme.ContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & SelectProps & React.RefAttributes<HTMLDivElement>>;
23
23
  export declare const Item: React.ForwardRefExoticComponent<Omit<SelectTheme.ItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & SelectProps & React.RefAttributes<HTMLDivElement>>;
@@ -25,7 +25,7 @@ export declare const Group: React.ForwardRefExoticComponent<Omit<SelectTheme.Gro
25
25
  export declare const Label: React.ForwardRefExoticComponent<Omit<SelectTheme.LabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & SelectProps & React.RefAttributes<HTMLDivElement>>;
26
26
  export declare const Separator: React.ForwardRefExoticComponent<Omit<SelectTheme.SeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & SelectProps & React.RefAttributes<HTMLDivElement>>;
27
27
  declare const Select: {
28
- Root: React.ForwardRefExoticComponent<SelectTheme.RootProps & SelectProps & React.RefAttributes<never>>;
28
+ Root: React.ForwardRefExoticComponent<Omit<SelectTheme.RootProps, "color" | "size"> & SelectProps & React.RefAttributes<never>>;
29
29
  Trigger: React.ForwardRefExoticComponent<Omit<SelectTheme.TriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & SelectProps & React.RefAttributes<HTMLButtonElement>>;
30
30
  Content: React.ForwardRefExoticComponent<Omit<SelectTheme.ContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & SelectProps & React.RefAttributes<HTMLDivElement>>;
31
31
  Item: React.ForwardRefExoticComponent<Omit<SelectTheme.ItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & SelectProps & React.RefAttributes<HTMLDivElement>>;
@@ -75,8 +75,8 @@ export var Trigger = React.forwardRef(function (_a, forwardedRef) {
75
75
  Trigger.displayName = 'Select.Trigger';
76
76
  export var Content = React.forwardRef(function (_a, forwardedRef) {
77
77
  var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
78
- var _b = useSelectContext(), radius = _b.radius, color = _b.color;
79
- return (_jsx(SelectTheme.Content, __assign({ ref: forwardedRef, color: color, position: "popper", className: cn(selectVariants({ radius: radius == 'full' ? 'large' : radius }), className) }, props, { children: children })));
78
+ var radius = useSelectContext().radius;
79
+ return (_jsx(SelectTheme.Content, __assign({ ref: forwardedRef, position: "popper", className: cn(selectVariants({ radius: radius == 'full' ? 'large' : radius }), 'z-10', className) }, props, { children: children })));
80
80
  });
81
81
  Content.displayName = 'Select.Content';
82
82
  export var Item = React.forwardRef(function (_a, forwardedRef) {
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{jsx as r}from"react/jsx-runtime";import e,{createContext as a,useContext as l}from"react";import{Theme as i,Select as n}from"@radix-ui/themes";import{cva as c}from"class-variance-authority";import{cn as o}from"../../utils/utils.mjs";import{radiusVariants as s,selectAppearanceStyle as t}from"../../constants.mjs";import{useTheme as m}from"../../theme/ThemeProvider.mjs";import{MAIN_COLOR as d}from"../../color/constants.mjs";var u=function(){return u=Object.assign||function(r){for(var e,a=1,l=arguments.length;a<l;a++)for(var i in e=arguments[a])Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i]);return r},u.apply(this,arguments)},f=function(r,e){var a={};for(var l in r)Object.prototype.hasOwnProperty.call(r,l)&&e.indexOf(l)<0&&(a[l]=r[l]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(l=Object.getOwnPropertySymbols(r);i<l.length;i++)e.indexOf(l[i])<0&&Object.prototype.propertyIsEnumerable.call(r,l[i])&&(a[l[i]]=r[l[i]])}return a},p=c("",{variants:{radius:u({},s.base)},defaultVariants:{radius:"medium"}}),h=a({size:"medium",scaling:"100%",color:d,radius:"medium",appearance:"classic"}),v=function(){return l(h)},N=e.forwardRef((function(e,a){var l,c=e.scaling,o=e.size,s=e.color,t=e.radius,p=e.appearance,v=e.children,N=f(e,["scaling","size","color","radius","appearance","children"]),g=m().theme,y="2";"small"===o&&(y="1"),"large"===o&&(y="3");var S={scaling:null!=c?c:g.themeScaling,color:null!==(l=null!=s?s:g.themeColor)&&void 0!==l?l:d,radius:null!=t?t:g.themeRadius,size:o,sizeTheme:y,appearance:p};return r(h.Provider,{value:S,children:r(i,{scaling:S.scaling,accentColor:S.color,hasBackground:!1,children:r("div",{ref:a,children:r(n.Root,u({size:y},N,{children:v}))})})})}));N.displayName="Select.Root";var g=e.forwardRef((function(e,a){var l=e.children,i=e.className,c=f(e,["children","className"]),s=v(),m=s.radius,d=void 0===m?"medium":m,h=s.color,N=s.appearance,g=void 0===N?"classic":N;return r(n.Trigger,u({ref:a,variant:g,radius:d,className:o(p({radius:d}),t(g,h),i)},c,{children:l}))}));g.displayName="Select.Trigger";var y=e.forwardRef((function(e,a){var l=e.children,i=e.className,c=f(e,["children","className"]),s=v(),t=s.radius,m=s.color;return r(n.Content,u({ref:a,color:m,position:"popper",className:o(p({radius:"full"==t?"large":t}),i)},c,{children:l}))}));y.displayName="Select.Content";var S=e.forwardRef((function(e,a){var l=e.value,i=e.children,c=e.className,s=f(e,["value","children","className"]),t=v().radius;return r(n.Item,u({ref:a,value:l},s,{className:o(p({radius:t}),c),children:i}))}));S.displayName="Select.Item";var b=e.forwardRef((function(e,a){var l=e.children,i=e.className,c=f(e,["children","className"]);return r(n.Group,u({ref:a},c,{className:i,children:l}))}));b.displayName="Select.Group";var O=e.forwardRef((function(e,a){var l=e.children,i=e.className,c=f(e,["children","className"]);return r(n.Label,u({ref:a},c,{className:i,children:l}))}));O.displayName="Select.Label";var j=e.forwardRef((function(e,a){var l=e.children,i=e.className,c=f(e,["children","className"]);return r(n.Separator,u({ref:a},c,{className:i,children:l}))}));j.displayName="Select.Separator";var w={Root:N,Trigger:g,Content:y,Item:S,Group:b,Label:O,Separator:j};export{y as Content,b as Group,S as Item,O as Label,N as Root,j as Separator,g as Trigger,w as default,v as useSelectContext};
2
+ import{jsx as e}from"react/jsx-runtime";import r,{createContext as a,useContext as l}from"react";import{Theme as i,Select as n}from"@radix-ui/themes";import{cva as c}from"class-variance-authority";import{cn as s}from"../../utils/utils.mjs";import{radiusVariants as t,selectAppearanceStyle as o}from"../../constants.mjs";import{useTheme as m}from"../../theme/ThemeProvider.mjs";import{MAIN_COLOR as d}from"../../color/constants.mjs";var u=function(){return u=Object.assign||function(e){for(var r,a=1,l=arguments.length;a<l;a++)for(var i in r=arguments[a])Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i]);return e},u.apply(this,arguments)},f=function(e,r){var a={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&r.indexOf(l)<0&&(a[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(l=Object.getOwnPropertySymbols(e);i<l.length;i++)r.indexOf(l[i])<0&&Object.prototype.propertyIsEnumerable.call(e,l[i])&&(a[l[i]]=e[l[i]])}return a},p=c("",{variants:{radius:u({},t.base)},defaultVariants:{radius:"medium"}}),h=a({size:"medium",scaling:"100%",color:d,radius:"medium",appearance:"classic"}),v=function(){return l(h)},N=r.forwardRef((function(r,a){var l,c=r.scaling,s=r.size,t=r.color,o=r.radius,p=r.appearance,v=r.children,N=f(r,["scaling","size","color","radius","appearance","children"]),g=m().theme,y="2";"small"===s&&(y="1"),"large"===s&&(y="3");var S={scaling:null!=c?c:g.themeScaling,color:null!==(l=null!=t?t:g.themeColor)&&void 0!==l?l:d,radius:null!=o?o:g.themeRadius,size:s,sizeTheme:y,appearance:p};return e(h.Provider,{value:S,children:e(i,{scaling:S.scaling,accentColor:S.color,hasBackground:!1,children:e("div",{ref:a,children:e(n.Root,u({size:y},N,{children:v}))})})})}));N.displayName="Select.Root";var g=r.forwardRef((function(r,a){var l=r.children,i=r.className,c=f(r,["children","className"]),t=v(),m=t.radius,d=void 0===m?"medium":m,h=t.color,N=t.appearance,g=void 0===N?"classic":N;return e(n.Trigger,u({ref:a,variant:g,radius:d,className:s(p({radius:d}),o(g,h),i)},c,{children:l}))}));g.displayName="Select.Trigger";var y=r.forwardRef((function(r,a){var l=r.children,i=r.className,c=f(r,["children","className"]),t=v().radius;return e(n.Content,u({ref:a,position:"popper",className:s(p({radius:"full"==t?"large":t}),"z-10",i)},c,{children:l}))}));y.displayName="Select.Content";var S=r.forwardRef((function(r,a){var l=r.value,i=r.children,c=r.className,t=f(r,["value","children","className"]),o=v().radius;return e(n.Item,u({ref:a,value:l},t,{className:s(p({radius:o}),c),children:i}))}));S.displayName="Select.Item";var b=r.forwardRef((function(r,a){var l=r.children,i=r.className,c=f(r,["children","className"]);return e(n.Group,u({ref:a},c,{className:i,children:l}))}));b.displayName="Select.Group";var O=r.forwardRef((function(r,a){var l=r.children,i=r.className,c=f(r,["children","className"]);return e(n.Label,u({ref:a},c,{className:i,children:l}))}));O.displayName="Select.Label";var j=r.forwardRef((function(r,a){var l=r.children,i=r.className,c=f(r,["children","className"]);return e(n.Separator,u({ref:a},c,{className:i,children:l}))}));j.displayName="Select.Separator";var w={Root:N,Trigger:g,Content:y,Item:S,Group:b,Label:O,Separator:j};export{y as Content,b as Group,S as Item,O as Label,N as Root,j as Separator,g as Trigger,w as default,v as useSelectContext};
3
3
  //# sourceMappingURL=index.mjs.map
@@ -7,5 +7,5 @@ declare const separatorVariants: (props?: ({
7
7
  scaling?: "90%" | "95%" | "100%" | "105%" | "110%" | null | undefined;
8
8
  color?: string | null | undefined;
9
9
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
10
- export declare const Separator: React.ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/themes").SeparatorProps & React.RefAttributes<HTMLSpanElement>, "ref">, "size"> & SeparatorProps & React.RefAttributes<HTMLSpanElement>>;
10
+ export declare const Separator: React.ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/themes").SeparatorProps & React.RefAttributes<HTMLSpanElement>, "ref">, "color" | "size"> & SeparatorProps & React.RefAttributes<HTMLSpanElement>>;
11
11
  export default Separator;
@@ -1,8 +1,10 @@
1
1
  import React from 'react';
2
2
  import { VariantProps } from 'class-variance-authority';
3
3
  import * as ReactProSidebar from 'react-pro-sidebar';
4
+ import { IRadius } from '../../../lib/types';
4
5
  export interface SidebarProps extends VariantProps<typeof sidebarVariants> {
5
6
  size?: 'small' | 'medium' | 'large' | 'fill-large';
7
+ radius?: IRadius;
6
8
  }
7
9
  declare const sidebarVariants: (props?: ({
8
10
  scaling?: "90%" | "95%" | "100%" | "105%" | "110%" | null | undefined;
@@ -17,5 +19,30 @@ declare const Sidebar: {
17
19
  Menu: React.ForwardRefExoticComponent<Omit<Omit<ReactProSidebar.MenuProps & React.RefAttributes<HTMLMenuElement>, "ref">, "size"> & SidebarProps & React.RefAttributes<HTMLMenuElement>>;
18
20
  Item: React.ForwardRefExoticComponent<Omit<Omit<ReactProSidebar.MenuItemProps & React.RefAttributes<HTMLLIElement>, "ref">, "size"> & SidebarProps & React.RefAttributes<HTMLLIElement>>;
19
21
  SubMenu: React.ForwardRefExoticComponent<Omit<Omit<ReactProSidebar.SubMenuProps & React.RefAttributes<HTMLLIElement>, "ref">, "size"> & SidebarProps & React.RefAttributes<HTMLLIElement>>;
22
+ menuClasses: {
23
+ root: string;
24
+ menuItemRoot: string;
25
+ subMenuRoot: string;
26
+ button: string;
27
+ prefix: string;
28
+ suffix: string;
29
+ label: string;
30
+ icon: string;
31
+ subMenuContent: string;
32
+ SubMenuExpandIcon: string;
33
+ disabled: string;
34
+ active: string;
35
+ open: string;
36
+ };
37
+ sidebarClasses: {
38
+ root: string;
39
+ container: string;
40
+ image: string;
41
+ backdrop: string;
42
+ collapsed: string;
43
+ toggled: string;
44
+ rtl: string;
45
+ broken: string;
46
+ };
20
47
  };
21
48
  export default Sidebar;
@@ -28,6 +28,7 @@ import { cn } from '../../../lib/utils/utils';
28
28
  import { bgColorStyle, scalingVariants } from '../../../lib/constants';
29
29
  import { useTheme } from '../../../lib/theme';
30
30
  import * as ReactProSidebar from 'react-pro-sidebar';
31
+ import { menuClasses, sidebarClasses } from 'react-pro-sidebar';
31
32
  import { useWindowSize } from '../../../lib/utils/useWindowSize';
32
33
  import * as alphaColors from '../../../lib/color/alpha';
33
34
  var sidebarVariants = cva('', {
@@ -50,8 +51,9 @@ export var Root = React.forwardRef(function (_a, forwardedRef) {
50
51
  Root.displayName = 'Sidebar.Root';
51
52
  export var Menu = React.forwardRef(function (_a, forwardedRef) {
52
53
  var _b;
53
- var scaling = _a.scaling, size = _a.size, color = _a.color, className = _a.className, menuItemStyles = _a.menuItemStyles, children = _a.children, props = __rest(_a, ["scaling", "size", "color", "className", "menuItemStyles", "children"]);
54
+ var scaling = _a.scaling, size = _a.size, color = _a.color, radius = _a.radius, className = _a.className, menuItemStyles = _a.menuItemStyles, children = _a.children, props = __rest(_a, ["scaling", "size", "color", "radius", "className", "menuItemStyles", "children"]);
54
55
  var heigthSize = '50px';
56
+ var radiusSize = '0px';
55
57
  var fontSize = '16px';
56
58
  if (size == 'small') {
57
59
  heigthSize = '40px';
@@ -61,6 +63,14 @@ export var Menu = React.forwardRef(function (_a, forwardedRef) {
61
63
  heigthSize = '60px';
62
64
  fontSize = '18px';
63
65
  }
66
+ if (radius == 'small')
67
+ radiusSize = '3px';
68
+ if (radius == 'medium')
69
+ radiusSize = '4px';
70
+ if (radius == 'large')
71
+ radiusSize = '6px';
72
+ if (radius == 'full')
73
+ radiusSize = '9999px';
64
74
  var theme = useTheme().theme;
65
75
  var sidebarStyle = {
66
76
  scaling: scaling !== null && scaling !== void 0 ? scaling : theme.themeScaling,
@@ -68,11 +78,12 @@ export var Menu = React.forwardRef(function (_a, forwardedRef) {
68
78
  };
69
79
  var colorKey = "".concat(sidebarStyle.color, "A");
70
80
  var colorValue = alphaColors[colorKey];
71
- return (_jsx(ReactProSidebar.Menu, __assign({ menuItemStyles: __assign({ button: function (_a) {
81
+ return (_jsx(ReactProSidebar.Menu, __assign({ className: className, menuItemStyles: __assign({ button: function (_a) {
72
82
  var level = _a.level, active = _a.active, disabled = _a.disabled, open = _a.open;
73
83
  return {
74
84
  height: heigthSize,
75
85
  fontSize: fontSize,
86
+ borderRadius: radiusSize,
76
87
  backgroundColor: active ? colorValue[5] : '',
77
88
  '&:hover': {
78
89
  backgroundColor: colorValue[3],
@@ -83,12 +94,12 @@ export var Menu = React.forwardRef(function (_a, forwardedRef) {
83
94
  Menu.displayName = 'Sidebar.Menu';
84
95
  export var Item = React.forwardRef(function (_a, forwardedRef) {
85
96
  var scaling = _a.scaling, size = _a.size, color = _a.color, className = _a.className, children = _a.children, props = __rest(_a, ["scaling", "size", "color", "className", "children"]);
86
- return _jsx(ReactProSidebar.MenuItem, __assign({}, props, { children: children }));
97
+ return (_jsx(ReactProSidebar.MenuItem, __assign({ className: className }, props, { children: children })));
87
98
  });
88
99
  Item.displayName = 'Sidebar.Item';
89
100
  export var SubMenu = React.forwardRef(function (_a, forwardedRef) {
90
101
  var scaling = _a.scaling, size = _a.size, color = _a.color, className = _a.className, children = _a.children, props = __rest(_a, ["scaling", "size", "color", "className", "children"]);
91
- return _jsx(ReactProSidebar.SubMenu, __assign({}, props, { children: children }));
102
+ return (_jsx(ReactProSidebar.SubMenu, __assign({ className: className }, props, { children: children })));
92
103
  });
93
104
  SubMenu.displayName = 'Sidebar.SubMenu';
94
105
  var Sidebar = {
@@ -96,5 +107,7 @@ var Sidebar = {
96
107
  Menu: Menu,
97
108
  Item: Item,
98
109
  SubMenu: SubMenu,
110
+ menuClasses: menuClasses,
111
+ sidebarClasses: sidebarClasses,
99
112
  };
100
113
  export default Sidebar;
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{jsx as e}from"react/jsx-runtime";import r from"react";import{cva as o}from"class-variance-authority";import{cn as a}from"../../utils/utils.mjs";import{scalingVariants as l,bgColorStyle as n}from"../../constants.mjs";import{useTheme as t}from"../../theme/ThemeProvider.mjs";import*as c from"react-pro-sidebar";import{useWindowSize as i}from"../../utils/useWindowSize.mjs";import*as s from"../../color/alpha.mjs";var m=function(){return m=Object.assign||function(e){for(var r,o=1,a=arguments.length;o<a;o++)for(var l in r=arguments[o])Object.prototype.hasOwnProperty.call(r,l)&&(e[l]=r[l]);return e},m.apply(this,arguments)},u=function(e,r){var o={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&r.indexOf(a)<0&&(o[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var l=0;for(a=Object.getOwnPropertySymbols(e);l<a.length;l++)r.indexOf(a[l])<0&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(o[a[l]]=e[a[l]])}return o},d=o("",{variants:{scaling:m({},l),color:n()}}),p=r.forwardRef((function(r,o){var l,n=r.scaling;r.size;var s=r.color,p=r.className,f=r.children,h=u(r,["scaling","size","color","className","children"]),v=t().theme,g=i(),b={scaling:null!=n?n:v.themeScaling,color:null!==(l=null!=s?s:v.themeColor)&&void 0!==l?l:"slate"};return e(c.Sidebar,m({className:a("bg-".concat(b.color,"A-6 dark:bg-").concat(b.color,"DarkA-6"),d({scaling:b.scaling}),p)},h,{collapsed:void 0===h.collapsed?g<=250:h.collapsed,children:f}))}));p.displayName="Sidebar.Root";var f=r.forwardRef((function(r,o){var a,l=r.scaling,n=r.size,i=r.color;r.className;var d=r.menuItemStyles,p=r.children,f=u(r,["scaling","size","color","className","menuItemStyles","children"]),h="50px",v="16px";"small"==n&&(h="40px",v="14px"),"large"==n&&(h="60px",v="18px");var g=t().theme,b={scaling:null!=l?l:g.themeScaling,color:null!==(a=null!=i?i:g.themeColor)&&void 0!==a?a:"slate"},y="".concat(b.color,"A"),S=s[y];return e(c.Menu,m({menuItemStyles:m({button:function(e){e.level;var r=e.active;return e.disabled,e.open,{height:h,fontSize:v,backgroundColor:r?S[5]:"","&:hover":{backgroundColor:S[3]}}}},d)},f,{children:p}))}));f.displayName="Sidebar.Menu";var h=r.forwardRef((function(r,o){r.scaling,r.size,r.color,r.className;var a=r.children,l=u(r,["scaling","size","color","className","children"]);return e(c.MenuItem,m({},l,{children:a}))}));h.displayName="Sidebar.Item";var v=r.forwardRef((function(r,o){r.scaling,r.size,r.color,r.className;var a=r.children,l=u(r,["scaling","size","color","className","children"]);return e(c.SubMenu,m({},l,{children:a}))}));v.displayName="Sidebar.SubMenu";var g={Root:p,Menu:f,Item:h,SubMenu:v};export{h as Item,f as Menu,p as Root,v as SubMenu,g as default};
2
+ import{jsx as e}from"react/jsx-runtime";import r from"react";import{cva as a}from"class-variance-authority";import{cn as l}from"../../utils/utils.mjs";import{scalingVariants as o,bgColorStyle as s}from"../../constants.mjs";import{useTheme as n}from"../../theme/ThemeProvider.mjs";import*as i from"react-pro-sidebar";import{menuClasses as t,sidebarClasses as c}from"react-pro-sidebar";import{useWindowSize as m}from"../../utils/useWindowSize.mjs";import*as u from"../../color/alpha.mjs";var d=function(){return d=Object.assign||function(e){for(var r,a=1,l=arguments.length;a<l;a++)for(var o in r=arguments[a])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e},d.apply(this,arguments)},p=function(e,r){var a={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&r.indexOf(l)<0&&(a[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(l=Object.getOwnPropertySymbols(e);o<l.length;o++)r.indexOf(l[o])<0&&Object.prototype.propertyIsEnumerable.call(e,l[o])&&(a[l[o]]=e[l[o]])}return a},f=a("",{variants:{scaling:d({},o),color:s()}}),h=r.forwardRef((function(r,a){var o,s=r.scaling;r.size;var t=r.color,c=r.className,u=r.children,h=p(r,["scaling","size","color","className","children"]),b=n().theme,g=m(),v={scaling:null!=s?s:b.themeScaling,color:null!==(o=null!=t?t:b.themeColor)&&void 0!==o?o:"slate"};return e(i.Sidebar,d({className:l("bg-".concat(v.color,"A-6 dark:bg-").concat(v.color,"DarkA-6"),f({scaling:v.scaling}),c)},h,{collapsed:void 0===h.collapsed?g<=250:h.collapsed,children:u}))}));h.displayName="Sidebar.Root";var b=r.forwardRef((function(r,a){var l,o=r.scaling,s=r.size,t=r.color,c=r.radius,m=r.className,f=r.menuItemStyles,h=r.children,b=p(r,["scaling","size","color","radius","className","menuItemStyles","children"]),g="50px",v="0px",y="16px";"small"==s&&(g="40px",y="14px"),"large"==s&&(g="60px",y="18px"),"small"==c&&(v="3px"),"medium"==c&&(v="4px"),"large"==c&&(v="6px"),"full"==c&&(v="9999px");var S=n().theme,N={scaling:null!=o?o:S.themeScaling,color:null!==(l=null!=t?t:S.themeColor)&&void 0!==l?l:"slate"},x="".concat(N.color,"A"),j=u[x];return e(i.Menu,d({className:m,menuItemStyles:d({button:function(e){e.level;var r=e.active;return e.disabled,e.open,{height:g,fontSize:y,borderRadius:v,backgroundColor:r?j[5]:"","&:hover":{backgroundColor:j[3]}}}},f)},b,{children:h}))}));b.displayName="Sidebar.Menu";var g=r.forwardRef((function(r,a){r.scaling,r.size,r.color;var l=r.className,o=r.children,s=p(r,["scaling","size","color","className","children"]);return e(i.MenuItem,d({className:l},s,{children:o}))}));g.displayName="Sidebar.Item";var v=r.forwardRef((function(r,a){r.scaling,r.size,r.color;var l=r.className,o=r.children,s=p(r,["scaling","size","color","className","children"]);return e(i.SubMenu,d({className:l},s,{children:o}))}));v.displayName="Sidebar.SubMenu";var y={Root:h,Menu:b,Item:g,SubMenu:v,menuClasses:t,sidebarClasses:c};export{g as Item,b as Menu,h as Root,v as SubMenu,y as default};
3
3
  //# sourceMappingURL=index.mjs.map
@@ -11,5 +11,5 @@ export interface SliderProps extends VariantProps<typeof sliderVariants> {
11
11
  declare const sliderVariants: (props?: ({
12
12
  radius?: "none" | "small" | "medium" | "large" | "full" | null | undefined;
13
13
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
14
- export declare const Slider: React.ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/themes").SliderProps & React.RefAttributes<HTMLSpanElement>, "ref">, "size"> & SliderProps & React.RefAttributes<HTMLSpanElement>>;
14
+ export declare const Slider: React.ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/themes").SliderProps & React.RefAttributes<HTMLSpanElement>, "ref">, "color" | "size"> & SliderProps & React.RefAttributes<HTMLSpanElement>>;
15
15
  export default Slider;
@@ -5,7 +5,7 @@ import { Table as TableTheme } from '@radix-ui/themes';
5
5
  export interface TableProps extends VariantProps<typeof tableVariants> {
6
6
  color?: IColor;
7
7
  appearance?: 'ghost' | 'surface';
8
- size?: 'small' | 'medium' | 'large';
8
+ size?: 'x-small' | 'small' | 'medium' | 'large';
9
9
  }
10
10
  declare const tableVariants: (props?: ({
11
11
  scaling?: "90%" | "95%" | "100%" | "105%" | "110%" | null | undefined;