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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (97) 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/Avatar/index.js +1 -0
  7. package/dist/lib/components/Avatar/index.mjs +1 -1
  8. package/dist/lib/components/Badge/index.js +3 -3
  9. package/dist/lib/components/Badge/index.mjs +1 -1
  10. package/dist/lib/components/Box/index.js +2 -2
  11. package/dist/lib/components/Box/index.mjs +1 -1
  12. package/dist/lib/components/Box/index.mjs.map +1 -1
  13. package/dist/lib/components/Breadcrumb/BreadcrumbLink.js +2 -2
  14. package/dist/lib/components/Breadcrumb/BreadcrumbLink.mjs +1 -1
  15. package/dist/lib/components/Breadcrumb/BreadcrumbLink.mjs.map +1 -1
  16. package/dist/lib/components/Breadcrumb/BreadcrumbPage.js +3 -3
  17. package/dist/lib/components/Breadcrumb/BreadcrumbPage.mjs +1 -1
  18. package/dist/lib/components/Breadcrumb/BreadcrumbPage.mjs.map +1 -1
  19. package/dist/lib/components/Breadcrumb/BreadcrumbRoot.js +2 -2
  20. package/dist/lib/components/Breadcrumb/BreadcrumbRoot.mjs +1 -1
  21. package/dist/lib/components/CheckboxGroup/CheckboxGroupRoot.d.ts +1 -1
  22. package/dist/lib/components/CheckboxGroup/index.d.ts +1 -1
  23. package/dist/lib/components/Container/index.js +2 -2
  24. package/dist/lib/components/Container/index.mjs +1 -1
  25. package/dist/lib/components/Container/index.mjs.map +1 -1
  26. package/dist/lib/components/Datepicker/index.d.ts +2 -1
  27. package/dist/lib/components/Datepicker/index.js +2 -2
  28. package/dist/lib/components/Datepicker/index.mjs +1 -1
  29. package/dist/lib/components/Dialog/DialogRoot.d.ts +4 -3
  30. package/dist/lib/components/Dialog/index.d.ts +1 -1
  31. package/dist/lib/components/DropdownMenu/DropdownMenuTrigger.js +3 -3
  32. package/dist/lib/components/DropdownMenu/DropdownMenuTrigger.mjs +1 -1
  33. package/dist/lib/components/Editor/index.d.ts +0 -1
  34. package/dist/lib/components/Editor/index.js +11 -2
  35. package/dist/lib/components/Editor/index.mjs +1 -1
  36. package/dist/lib/components/Flex/index.js +2 -2
  37. package/dist/lib/components/Flex/index.mjs +1 -1
  38. package/dist/lib/components/Flex/index.mjs.map +1 -1
  39. package/dist/lib/components/Gnb/GnbInfo.js +2 -2
  40. package/dist/lib/components/Gnb/GnbInfo.mjs +1 -1
  41. package/dist/lib/components/Gnb/GnbLogo.js +1 -1
  42. package/dist/lib/components/Gnb/GnbLogo.mjs +1 -1
  43. package/dist/lib/components/Gnb/GnbLogo.mjs.map +1 -1
  44. package/dist/lib/components/Gnb/GnbMenuItem.js +1 -1
  45. package/dist/lib/components/Gnb/GnbMenuItem.mjs +1 -1
  46. package/dist/lib/components/Grid/NumberingPagination.js +64 -22
  47. package/dist/lib/components/Grid/NumberingPagination.mjs +1 -1
  48. package/dist/lib/components/Grid/NumberingPagination.mjs.map +1 -1
  49. package/dist/lib/components/Grid/index.d.ts +1 -0
  50. package/dist/lib/components/Grid/index.js +56 -38
  51. package/dist/lib/components/Grid/index.mjs +1 -1
  52. package/dist/lib/components/Grid/useGrid.js +30 -14
  53. package/dist/lib/components/Grid/useGrid.mjs +1 -1
  54. package/dist/lib/components/IconButton/index.js +10 -10
  55. package/dist/lib/components/IconButton/index.mjs +1 -1
  56. package/dist/lib/components/Modal/ModalRoot.d.ts +2 -2
  57. package/dist/lib/components/Radio/index.js +2 -2
  58. package/dist/lib/components/Radio/index.mjs +1 -1
  59. package/dist/lib/components/RadioCards/RadioCardsRoot.d.ts +3 -1
  60. package/dist/lib/components/RadioCards/index.d.ts +1 -1
  61. package/dist/lib/components/SearchBar/index.js +2 -2
  62. package/dist/lib/components/SearchBar/index.mjs +1 -1
  63. package/dist/lib/components/Select/index.d.ts +4 -4
  64. package/dist/lib/components/Select/index.js +2 -2
  65. package/dist/lib/components/Select/index.mjs +1 -1
  66. package/dist/lib/components/Separator/index.d.ts +1 -1
  67. package/dist/lib/components/SideBar/index.d.ts +27 -0
  68. package/dist/lib/components/SideBar/index.js +20 -5
  69. package/dist/lib/components/SideBar/index.mjs +1 -1
  70. package/dist/lib/components/Slider/index.d.ts +1 -1
  71. package/dist/lib/components/Table/index.d.ts +1 -1
  72. package/dist/lib/components/Table/index.js +17 -10
  73. package/dist/lib/components/Table/index.mjs +1 -1
  74. package/dist/lib/components/Tabs/DynamicTabs.d.ts +4 -2
  75. package/dist/lib/components/Tabs/DynamicTabs.js +21 -16
  76. package/dist/lib/components/Tabs/DynamicTabs.mjs +1 -1
  77. package/dist/lib/components/TextField/index.js +2 -0
  78. package/dist/lib/components/TextField/index.mjs +1 -1
  79. package/dist/lib/components/Tree/index.d.ts +1 -2
  80. package/dist/lib/components/Tree/index.js +3 -2
  81. package/dist/lib/components/Tree/index.mjs +1 -1
  82. package/dist/lib/components/Tree/index.mjs.map +1 -1
  83. package/dist/lib/tsconfig.tsbuildinfo +1 -1
  84. package/dist/lib/utils/useLoadTinyMCE.d.ts +1 -37
  85. package/dist/lib/utils/useLoadTinyMCE.js +151 -36
  86. package/dist/lib/utils/useLoadTinyMCE.mjs +2 -0
  87. package/dist/lib/utils/useLoadTinyMCE.mjs.map +1 -0
  88. package/dist/lib/utils/useWindowSize.d.ts +1 -0
  89. package/dist/lib/utils/useWindowSize.js +17 -18
  90. package/dist/lib/utils/useWindowSize.mjs +2 -0
  91. package/dist/lib/utils/useWindowSize.mjs.map +1 -0
  92. package/dist/tsconfig.tsbuildinfo +1 -1
  93. package/package.json +150 -150
  94. package/dist/lib/node_modules/react-complex-tree/lib/style-modern.mjs +0 -2
  95. package/dist/lib/node_modules/react-complex-tree/lib/style-modern.mjs.map +0 -1
  96. package/dist/lib/node_modules/style-inject/dist/style-inject.es.mjs +0 -2
  97. package/dist/lib/node_modules/style-inject/dist/style-inject.es.mjs.map +0 -1
@@ -22,10 +22,10 @@ var __rest = (this && this.__rest) || function (s, e) {
22
22
  return t;
23
23
  };
24
24
  import { jsx as _jsx } from "react/jsx-runtime";
25
- import { forwardRef, useEffect, useRef } from 'react';
25
+ import { useState, forwardRef, useEffect, useRef, } from 'react';
26
26
  import { Editor as EditorUI } from '@tinymce/tinymce-react';
27
27
  import { cva } from 'class-variance-authority';
28
- import '../../../lib/utils/useLoadTinyMCE';
28
+ import { loadTinymce } from '../../../lib/utils/useLoadTinyMCE';
29
29
  import { scalingVariants, radiusVariants } from '../../../lib/constants';
30
30
  import { cn } from '../../../lib/utils/utils';
31
31
  import { useTheme } from '../../../lib/theme';
@@ -51,6 +51,7 @@ var editorVariants = cva('', {
51
51
  });
52
52
  export var Editor = forwardRef(function (_a, ref) {
53
53
  var className = _a.className, size = _a.size, scaling = _a.scaling, radius = _a.radius, init = _a.init, _b = _a.language, language = _b === void 0 ? 'en' : _b, props = __rest(_a, ["className", "size", "scaling", "radius", "init", "language"]);
54
+ var _c = useState(false), isClient = _c[0], setIsClient = _c[1];
54
55
  var editorRef = useRef(null);
55
56
  var theme = useTheme().theme;
56
57
  var editorStyle = {
@@ -67,6 +68,11 @@ export var Editor = forwardRef(function (_a, ref) {
67
68
  radiusTheme = '12px';
68
69
  if (editorStyle.radius === 'full')
69
70
  radiusTheme = '16px';
71
+ useEffect(function () {
72
+ loadTinymce().then(function () {
73
+ setIsClient(true);
74
+ });
75
+ }, []);
70
76
  useEffect(function () {
71
77
  if (editorRef.current) {
72
78
  var editorContainer = editorRef.current.getContainer();
@@ -75,6 +81,9 @@ export var Editor = forwardRef(function (_a, ref) {
75
81
  }
76
82
  }
77
83
  }, [radiusTheme]);
84
+ if (!isClient) {
85
+ return null;
86
+ }
78
87
  return (_jsx("div", { className: cn(editorVariants(editorStyle), className), ref: ref, children: _jsx(EditorUI, __assign({ onInit: function (evt, editor) { return (editorRef.current = editor); }, init: __assign({ language: language, width: '100%', height: '100%', promotion: false, plugins: 'preview importcss searchreplace autolink autosave save directionality code visualblocks visualchars fullscreen image link media codesample table charmap pagebreak nonbreaking anchor insertdatetime advlist lists wordcount charmap accordion', menubar: 'file edit view insert format tools table', toolbar: 'undo redo | accordion accordionremove | blocks fontfamily fontsize | bold italic underline strikethrough | align numlist bullist | link image | table media | lineheight outdent indent| forecolor backcolor removeformat | charmap | code fullscreen preview | save print | pagebreak anchor codesample | ltr rtl', autosave_ask_before_unload: true, autosave_interval: '30s', autosave_restore_when_empty: false, autosave_retention: '2m', image_advtab: true, image_caption: true, quickbars_selection_toolbar: '', toolbar_mode: 'sliding', skin: false, content_css: false, content_style: "".concat(contentUiSkinCss, "\n").concat(contentCss, "\n body { font-family:Noto Sans KR, sans-serif, Nunito Sans, Helvetica Neue, Helvetica }"), setup: function (editor) {
79
88
  editor.ui.registry.addButton('inlinecode', {
80
89
  icon: 'sourcecode',
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{jsx as i}from"react/jsx-runtime";import{forwardRef as t,useRef as n,useEffect as e}from"react";import{Editor as o}from"@tinymce/tinymce-react";import{cva as r}from"class-variance-authority";import"tinymce/tinymce.js";import"tinymce/themes/silver/theme.js";import"tinymce/models/dom/model.js";import"tinymce/icons/default/icons.js";import"tinymce/plugins/advlist/plugin.js";import"tinymce/plugins/code/plugin.js";import"tinymce/plugins/codesample/plugin.js";import"tinymce/plugins/link/plugin.js";import"tinymce/plugins/lists/plugin.js";import"tinymce/plugins/table/plugin.js";import"tinymce/plugins/image/plugin.js";import"tinymce/plugins/preview/plugin.js";import"tinymce/plugins/importcss/plugin.js";import"tinymce/plugins/searchreplace/plugin.js";import"tinymce/plugins/autolink/plugin.js";import"tinymce/plugins/autosave/plugin.js";import"tinymce/plugins/save/plugin.js";import"tinymce/plugins/directionality/plugin.js";import"tinymce/plugins/visualblocks/plugin.js";import"tinymce/plugins/visualchars/plugin.js";import"tinymce/plugins/fullscreen/plugin.js";import"tinymce/plugins/media/plugin.js";import"tinymce/plugins/charmap/plugin.js";import"tinymce/plugins/pagebreak/plugin.js";import"tinymce/plugins/nonbreaking/plugin.js";import"tinymce/plugins/anchor/plugin.js";import"tinymce/plugins/insertdatetime/plugin.js";import"tinymce/plugins/wordcount/plugin.js";import"tinymce/plugins/quickbars/plugin.js";import"tinymce/plugins/emoticons/plugin.js";import"tinymce/plugins/accordion/plugin.js";import"../../utils/langs/ko_KR.mjs";import"../../utils/langs/it.mjs";import"../../utils/langs/ja.mjs";import"../../utils/langs/vi.mjs";import"../../utils/langs/zh_CN.mjs";import{radiusVariants as s,scalingVariants as a}from"../../constants.mjs";import{cn as l}from"../../utils/utils.mjs";import{useTheme as m}from"../../theme/ThemeProvider.mjs";import{marked as c}from"marked";import"tinymce/skins/ui/oxide/skin.css";import p from"!!raw-loader!tinymce/skins/ui/oxide/content.css";import u from"!!raw-loader!tinymce/skins/content/default/content.css";var g=function(){return g=Object.assign||function(i){for(var t,n=1,e=arguments.length;n<e;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(i[o]=t[o]);return i},g.apply(this,arguments)},d=function(i,t){var n={};for(var e in i)Object.prototype.hasOwnProperty.call(i,e)&&t.indexOf(e)<0&&(n[e]=i[e]);if(null!=i&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(e=Object.getOwnPropertySymbols(i);o<e.length;o++)t.indexOf(e[o])<0&&Object.prototype.propertyIsEnumerable.call(i,e[o])&&(n[e[o]]=i[e[o]])}return n},y=r("",{variants:{radius:g({},s.base),scaling:g({},a),size:{small:"w-[650px] h-[350px]",medium:"w-[700px] h-[400px]",large:"w-[750px] h-[450px]"}},defaultVariants:{radius:"medium",scaling:"100%",size:"medium"}}),f=t((function(t,r){var s=t.className,a=t.size,f=t.scaling,j=t.radius,v=t.init,h=t.language,b=void 0===h?"en":h,k=d(t,["className","size","scaling","radius","init","language"]),w=n(null),x=m().theme,_={radius:null!=j?j:x.themeRadius,scaling:null!=f?f:x.themeScaling,size:a},O="8px";return"none"===_.radius&&(O="0px"),"small"===_.radius&&(O="4px"),"large"===_.radius&&(O="12px"),"full"===_.radius&&(O="16px"),e((function(){if(w.current){var i=w.current.getContainer();i&&(i.style.borderRadius="".concat(O))}}),[O]),i("div",{className:l(y(_),s),ref:r,children:i(o,g({onInit:function(i,t){return w.current=t},init:g({language:b,width:"100%",height:"100%",promotion:!1,plugins:"preview importcss searchreplace autolink autosave save directionality code visualblocks visualchars fullscreen image link media codesample table charmap pagebreak nonbreaking anchor insertdatetime advlist lists wordcount charmap accordion",menubar:"file edit view insert format tools table",toolbar:"undo redo | accordion accordionremove | blocks fontfamily fontsize | bold italic underline strikethrough | align numlist bullist | link image | table media | lineheight outdent indent| forecolor backcolor removeformat | charmap | code fullscreen preview | save print | pagebreak anchor codesample | ltr rtl",autosave_ask_before_unload:!0,autosave_interval:"30s",autosave_restore_when_empty:!1,autosave_retention:"2m",image_advtab:!0,image_caption:!0,quickbars_selection_toolbar:"",toolbar_mode:"sliding",skin:!1,content_css:!1,content_style:"".concat(p,"\n").concat(u,"\n body { font-family:Noto Sans KR, sans-serif, Nunito Sans, Helvetica Neue, Helvetica }"),setup:function(i){i.ui.registry.addButton("inlinecode",{icon:"sourcecode",tooltip:"Inline code",onAction:function(){i.formatter.toggle("code")}}),i.on("init",(function(){i.formatter.register("code",{inline:"code",remove:"all"})})),i.ui.registry.addButton("markdown",{text:"Markdown",onAction:function(){var t=i.getContent({format:"text"}),n=c(t);i.setContent(n)}}),i.on("init",(function(){i.getContainer().style.borderRadius=O}))}},v)},k))})}));f.displayName="Editor";export{f as Editor,f as default};
2
+ import{jsx as e}from"react/jsx-runtime";import{forwardRef as t,useState as n,useRef as i,useEffect as o}from"react";import{Editor as r}from"@tinymce/tinymce-react";import{cva as a}from"class-variance-authority";import{loadTinymce as s}from"../../utils/useLoadTinyMCE.mjs";import{radiusVariants as l,scalingVariants as c}from"../../constants.mjs";import{cn as u}from"../../utils/utils.mjs";import{useTheme as m}from"../../theme/ThemeProvider.mjs";import{marked as d}from"marked";import"tinymce/skins/ui/oxide/skin.css";import p from"!!raw-loader!tinymce/skins/ui/oxide/content.css";import f from"!!raw-loader!tinymce/skins/content/default/content.css";var g=function(){return g=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},g.apply(this,arguments)},v=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]])}return n},b=a("",{variants:{radius:g({},l.base),scaling:g({},c),size:{small:"w-[650px] h-[350px]",medium:"w-[700px] h-[400px]",large:"w-[750px] h-[450px]"}},defaultVariants:{radius:"medium",scaling:"100%",size:"medium"}}),h=t((function(t,a){var l=t.className,c=t.size,h=t.scaling,y=t.radius,k=t.init,x=t.language,w=void 0===x?"en":x,_=v(t,["className","size","scaling","radius","init","language"]),O=n(!1),j=O[0],N=O[1],z=i(null),C=m().theme,P={radius:null!=y?y:C.themeRadius,scaling:null!=h?h:C.themeScaling,size:c},S="8px";return"none"===P.radius&&(S="0px"),"small"===P.radius&&(S="4px"),"large"===P.radius&&(S="12px"),"full"===P.radius&&(S="16px"),o((function(){s().then((function(){N(!0)}))}),[]),o((function(){if(z.current){var e=z.current.getContainer();e&&(e.style.borderRadius="".concat(S))}}),[S]),j?e("div",{className:u(b(P),l),ref:a,children:e(r,g({onInit:function(e,t){return z.current=t},init:g({language:w,width:"100%",height:"100%",promotion:!1,plugins:"preview importcss searchreplace autolink autosave save directionality code visualblocks visualchars fullscreen image link media codesample table charmap pagebreak nonbreaking anchor insertdatetime advlist lists wordcount charmap accordion",menubar:"file edit view insert format tools table",toolbar:"undo redo | accordion accordionremove | blocks fontfamily fontsize | bold italic underline strikethrough | align numlist bullist | link image | table media | lineheight outdent indent| forecolor backcolor removeformat | charmap | code fullscreen preview | save print | pagebreak anchor codesample | ltr rtl",autosave_ask_before_unload:!0,autosave_interval:"30s",autosave_restore_when_empty:!1,autosave_retention:"2m",image_advtab:!0,image_caption:!0,quickbars_selection_toolbar:"",toolbar_mode:"sliding",skin:!1,content_css:!1,content_style:"".concat(p,"\n").concat(f,"\n body { font-family:Noto Sans KR, sans-serif, Nunito Sans, Helvetica Neue, Helvetica }"),setup:function(e){e.ui.registry.addButton("inlinecode",{icon:"sourcecode",tooltip:"Inline code",onAction:function(){e.formatter.toggle("code")}}),e.on("init",(function(){e.formatter.register("code",{inline:"code",remove:"all"})})),e.ui.registry.addButton("markdown",{text:"Markdown",onAction:function(){var t=e.getContent({format:"text"}),n=d(t);e.setContent(n)}}),e.on("init",(function(){e.getContainer().style.borderRadius=S}))}},k)},_))}):null}));h.displayName="Editor";export{h as Editor,h as default};
3
3
  //# sourceMappingURL=index.mjs.map
@@ -23,7 +23,7 @@ var __rest = (this && this.__rest) || function (s, e) {
23
23
  import { jsx as _jsx } from "react/jsx-runtime";
24
24
  import { forwardRef } from 'react';
25
25
  import { cva } from 'class-variance-authority';
26
- import { Flex as FlexTheme, Theme } from '@radix-ui/themes';
26
+ import { Flex as FlexTheme } from '@radix-ui/themes';
27
27
  import { scalingVariants } from '../../../lib/constants';
28
28
  import { useTheme } from '../../../lib/theme';
29
29
  import { cn } from '../../../lib/utils/utils';
@@ -41,7 +41,7 @@ export var Flex = forwardRef(function (_a, ref) {
41
41
  var flexStyle = {
42
42
  scaling: scaling !== null && scaling !== void 0 ? scaling : theme.themeScaling,
43
43
  };
44
- return (_jsx(Theme, { children: _jsx(FlexTheme, __assign({ ref: ref, className: cn(flexVariants(flexStyle), className) }, props, { children: children })) }));
44
+ return (_jsx(FlexTheme, __assign({ ref: ref, className: cn(flexVariants(flexStyle), className) }, props, { children: children })));
45
45
  });
46
46
  Flex.displayName = 'Flex';
47
47
  export default Flex;
@@ -1,2 +1,2 @@
1
- import{jsx as r}from"react/jsx-runtime";import{forwardRef as t}from"react";import{cva as e}from"class-variance-authority";import{Theme as a,Flex as n}from"@radix-ui/themes";import{scalingVariants as o}from"../../constants.mjs";import{useTheme as i}from"../../theme/ThemeProvider.mjs";import{cn as l}from"../../utils/utils.mjs";var s=function(){return s=Object.assign||function(r){for(var t,e=1,a=arguments.length;e<a;e++)for(var n in t=arguments[e])Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r},s.apply(this,arguments)},c=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 n=0;for(a=Object.getOwnPropertySymbols(r);n<a.length;n++)t.indexOf(a[n])<0&&Object.prototype.propertyIsEnumerable.call(r,a[n])&&(e[a[n]]=r[a[n]])}return e},m=e("",{variants:{scaling:s({},o)},defaultVariants:{scaling:"100%"}}),p=t((function(t,e){var o=t.children,p=t.className,f=t.scaling,u=c(t,["children","className","scaling"]),h=i().theme,y={scaling:null!=f?f:h.themeScaling};return r(a,{children:r(n,s({ref:e,className:l(m(y),p)},u,{children:o}))})}));p.displayName="Flex";export{p as Flex,p as default};
1
+ import{jsx as r}from"react/jsx-runtime";import{forwardRef as t}from"react";import{cva as e}from"class-variance-authority";import{Flex as a}from"@radix-ui/themes";import{scalingVariants as n}from"../../constants.mjs";import{useTheme as o}from"../../theme/ThemeProvider.mjs";import{cn as i}from"../../utils/utils.mjs";var l=function(){return l=Object.assign||function(r){for(var t,e=1,a=arguments.length;e<a;e++)for(var n in t=arguments[e])Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r},l.apply(this,arguments)},s=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 n=0;for(a=Object.getOwnPropertySymbols(r);n<a.length;n++)t.indexOf(a[n])<0&&Object.prototype.propertyIsEnumerable.call(r,a[n])&&(e[a[n]]=r[a[n]])}return e},c=e("",{variants:{scaling:l({},n)},defaultVariants:{scaling:"100%"}}),m=t((function(t,e){var n=t.children,m=t.className,p=t.scaling,f=s(t,["children","className","scaling"]),u=o().theme,h={scaling:null!=p?p:u.themeScaling};return r(a,l({ref:e,className:i(c(h),m)},f,{children:n}))}));m.displayName="Flex";export{m as Flex,m as default};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../lib/components/Flex/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 { forwardRef } from 'react';\nimport { cva } from 'class-variance-authority';\nimport { Flex as FlexTheme, Theme } from '@radix-ui/themes';\nimport { scalingVariants } from '../../../lib/constants';\nimport { useTheme } from '../../../lib/theme';\nimport { cn } from '../../../lib/utils/utils';\nvar flexVariants = cva(\"\", {\n variants: {\n scaling: __assign({}, scalingVariants),\n },\n defaultVariants: {\n scaling: '100%',\n },\n});\nexport var Flex = forwardRef(function (_a, ref) {\n var children = _a.children, className = _a.className, scaling = _a.scaling, props = __rest(_a, [\"children\", \"className\", \"scaling\"]);\n var theme = useTheme().theme;\n var flexStyle = {\n scaling: scaling !== null && scaling !== void 0 ? scaling : theme.themeScaling,\n };\n return (_jsx(Theme, { children: _jsx(FlexTheme, __assign({ ref: ref, className: cn(flexVariants(flexStyle), className) }, props, { children: children })) }));\n});\nFlex.displayName = 'Flex';\nexport default Flex;\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__rest","e","indexOf","getOwnPropertySymbols","propertyIsEnumerable","flexVariants","cva","variants","scaling","scalingVariants","defaultVariants","Flex","forwardRef","_a","ref","children","className","props","theme","useTheme","flexStyle","themeScaling","_jsx","Theme","FlexTheme","cn","displayName"],"mappings":"uUAAA,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,EAAeC,EAAI,GAAI,CACvBC,SAAU,CACNC,QAASvB,EAAS,CAAE,EAAEwB,IAE1BC,gBAAiB,CACbF,QAAS,UAGNG,EAAOC,GAAW,SAAUC,EAAIC,GACvC,IAAIC,EAAWF,EAAGE,SAAUC,EAAYH,EAAGG,UAAWR,EAAUK,EAAGL,QAASS,EAAQjB,EAAOa,EAAI,CAAC,WAAY,YAAa,YACrHK,EAAQC,IAAWD,MACnBE,EAAY,CACZZ,QAASA,QAAyCA,EAAUU,EAAMG,cAEtE,OAAQC,EAAKC,EAAO,CAAER,SAAUO,EAAKE,EAAWvC,EAAS,CAAE6B,IAAKA,EAAKE,UAAWS,EAAGpB,EAAae,GAAYJ,IAAcC,EAAO,CAAEF,SAAUA,MACjJ,IACAJ,EAAKe,YAAc"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../lib/components/Flex/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 { forwardRef } from 'react';\nimport { cva } from 'class-variance-authority';\nimport { Flex as FlexTheme } from '@radix-ui/themes';\nimport { scalingVariants } from '../../../lib/constants';\nimport { useTheme } from '../../../lib/theme';\nimport { cn } from '../../../lib/utils/utils';\nvar flexVariants = cva(\"\", {\n variants: {\n scaling: __assign({}, scalingVariants),\n },\n defaultVariants: {\n scaling: '100%',\n },\n});\nexport var Flex = forwardRef(function (_a, ref) {\n var children = _a.children, className = _a.className, scaling = _a.scaling, props = __rest(_a, [\"children\", \"className\", \"scaling\"]);\n var theme = useTheme().theme;\n var flexStyle = {\n scaling: scaling !== null && scaling !== void 0 ? scaling : theme.themeScaling,\n };\n return (_jsx(FlexTheme, __assign({ ref: ref, className: cn(flexVariants(flexStyle), className) }, props, { children: children })));\n});\nFlex.displayName = 'Flex';\nexport default Flex;\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__rest","e","indexOf","getOwnPropertySymbols","propertyIsEnumerable","flexVariants","cva","variants","scaling","scalingVariants","defaultVariants","Flex","forwardRef","_a","ref","children","className","props","theme","useTheme","flexStyle","themeScaling","_jsx","FlexTheme","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,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,EAAeC,EAAI,GAAI,CACvBC,SAAU,CACNC,QAASvB,EAAS,CAAE,EAAEwB,IAE1BC,gBAAiB,CACbF,QAAS,UAGNG,EAAOC,GAAW,SAAUC,EAAIC,GACvC,IAAIC,EAAWF,EAAGE,SAAUC,EAAYH,EAAGG,UAAWR,EAAUK,EAAGL,QAASS,EAAQjB,EAAOa,EAAI,CAAC,WAAY,YAAa,YACrHK,EAAQC,IAAWD,MACnBE,EAAY,CACZZ,QAASA,QAAyCA,EAAUU,EAAMG,cAEtE,OAAQC,EAAKC,EAAWtC,EAAS,CAAE6B,IAAKA,EAAKE,UAAWQ,EAAGnB,EAAae,GAAYJ,IAAcC,EAAO,CAAEF,SAAUA,IACzH,IACAJ,EAAKc,YAAc"}
@@ -26,7 +26,7 @@ import { forwardRef, useContext } from 'react';
26
26
  import { cva } from 'class-variance-authority';
27
27
  import { GnbContext } from './GnbRoot';
28
28
  import { cn } from '../../../lib/utils/utils';
29
- var gnbInfoVariants = cva('flex flex-1 items-center justify-end space-x-2', {
29
+ var gnbInfoVariants = cva('flex flex-1 items-center justify-end', {
30
30
  variants: {
31
31
  size: {
32
32
  small: 'text-xs',
@@ -41,6 +41,6 @@ var gnbInfoVariants = cva('flex flex-1 items-center justify-end space-x-2', {
41
41
  export var GnbInfo = forwardRef(function (_a, ref) {
42
42
  var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
43
43
  var size = useContext(GnbContext).size;
44
- return (_jsx("div", __assign({ className: cn(gnbInfoVariants({ size: size }), className), ref: ref }, props, { children: _jsx("nav", { className: "flex items-center", children: children }) })));
44
+ return (_jsx("nav", __assign({ className: cn(gnbInfoVariants({ size: size }), className), ref: ref }, props, { children: children })));
45
45
  });
46
46
  GnbInfo.displayName = 'Gnb.Info';
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{jsx as e}from"react/jsx-runtime";import{forwardRef as t,useContext as r}from"react";import{cva as n}from"class-variance-authority";import{GnbContext as a}from"./GnbRoot.mjs";import{cn as i}from"../../utils/utils.mjs";var o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},o.apply(this,arguments)},s=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]])}return r},l=n("flex flex-1 items-center justify-end space-x-2",{variants:{size:{small:"text-xs",medium:"text-sm",large:"text-base"}},defaultVariants:{size:"medium"}}),c=t((function(t,n){var c=t.children,m=t.className,f=s(t,["children","className"]),p=r(a).size;return e("div",o({className:i(l({size:p}),m),ref:n},f,{children:e("nav",{className:"flex items-center",children:c})}))}));c.displayName="Gnb.Info";export{c as GnbInfo};
2
+ import{jsx as e}from"react/jsx-runtime";import{forwardRef as t,useContext as r}from"react";import{cva as n}from"class-variance-authority";import{GnbContext as a}from"./GnbRoot.mjs";import{cn as o}from"../../utils/utils.mjs";var i=function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},i.apply(this,arguments)},s=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]])}return r},l=n("flex flex-1 items-center justify-end",{variants:{size:{small:"text-xs",medium:"text-sm",large:"text-base"}},defaultVariants:{size:"medium"}}),m=t((function(t,n){var m=t.children,c=t.className,f=s(t,["children","className"]),p=r(a).size;return e("nav",i({className:o(l({size:p}),c),ref:n},f,{children:m}))}));m.displayName="Gnb.Info";export{m as GnbInfo};
3
3
  //# sourceMappingURL=GnbInfo.mjs.map
@@ -26,7 +26,7 @@ import { cva } from 'class-variance-authority';
26
26
  import { GnbContext } from './GnbRoot';
27
27
  import { cn } from '../../../lib/utils/utils';
28
28
  import { Text } from '../../../lib/Typography';
29
- var gnbLogoVariants = cva('mr-4 flex items-center space-x-2 lg:mr-6 text-slate-12 dark:text-slateDark-12', {
29
+ var gnbLogoVariants = cva('mr-4 flex items-center text-slate-12 dark:text-slateDark-12', {
30
30
  variants: {
31
31
  size: {
32
32
  small: 'text-xs w-[140px] h-[15px]',
@@ -1,2 +1,2 @@
1
- import{jsx as r}from"react/jsx-runtime";import{forwardRef as e,useContext as t}from"react";import{cva as a}from"class-variance-authority";import{GnbContext as o}from"./GnbRoot.mjs";import{cn as n}from"../../utils/utils.mjs";import"../../Typography/Header/index.mjs";import i from"../../Typography/Text/index.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},p=a("mr-4 flex items-center space-x-2 lg:mr-6 text-slate-12 dark:text-slateDark-12",{variants:{size:{small:"text-xs w-[140px] h-[15px]",medium:"text-sm w-[150px] h-[20px]",large:"text-base w-[160px] h-[25px]"}},defaultVariants:{size:"medium"}}),m=e((function(e,a){var m=e.children,c=e.className,f=e.href,x=l(e,["children","className","href"]),u=t(o).size;return r("a",s({href:f,className:n(p({size:u}),c)},x,{children:null!=m?m:r(i,{children:"LOGO 영역"})}))}));m.displayName="Gnb.Logo";export{m as GnbLogo};
1
+ import{jsx as r}from"react/jsx-runtime";import{forwardRef as e,useContext as t}from"react";import{cva as a}from"class-variance-authority";import{GnbContext as o}from"./GnbRoot.mjs";import{cn as n}from"../../utils/utils.mjs";import"../../Typography/Header/index.mjs";import i from"../../Typography/Text/index.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},p=a("mr-4 flex items-center text-slate-12 dark:text-slateDark-12",{variants:{size:{small:"text-xs w-[140px] h-[15px]",medium:"text-sm w-[150px] h-[20px]",large:"text-base w-[160px] h-[25px]"}},defaultVariants:{size:"medium"}}),m=e((function(e,a){var m=e.children,c=e.className,f=e.href,x=l(e,["children","className","href"]),u=t(o).size;return r("a",s({href:f,className:n(p({size:u}),c)},x,{children:null!=m?m:r(i,{children:"LOGO 영역"})}))}));m.displayName="Gnb.Logo";export{m as GnbLogo};
2
2
  //# sourceMappingURL=GnbLogo.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"GnbLogo.mjs","sources":["../../../lib/components/Gnb/GnbLogo.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 { forwardRef, useContext } from 'react';\nimport { cva } from 'class-variance-authority';\nimport { GnbContext } from './GnbRoot';\nimport { cn } from '../../../lib/utils/utils';\nimport { Text } from '../../../lib/Typography';\nvar gnbLogoVariants = cva('mr-4 flex items-center space-x-2 lg:mr-6 text-slate-12 dark:text-slateDark-12', {\n variants: {\n size: {\n small: 'text-xs w-[140px] h-[15px]',\n medium: 'text-sm w-[150px] h-[20px]',\n large: 'text-base w-[160px] h-[25px]',\n },\n },\n defaultVariants: {\n size: 'medium',\n },\n});\nexport var GnbLogo = forwardRef(function (_a, ref) {\n var children = _a.children, className = _a.className, href = _a.href, props = __rest(_a, [\"children\", \"className\", \"href\"]);\n var size = useContext(GnbContext).size;\n return (_jsx(\"a\", __assign({ href: href, className: cn(gnbLogoVariants({ size: size }), className) }, props, { children: children !== null && children !== void 0 ? children : _jsx(Text, { children: \"LOGO \\uC601\\uC5ED\" }) })));\n});\nGnbLogo.displayName = 'Gnb.Logo';\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__rest","e","indexOf","getOwnPropertySymbols","propertyIsEnumerable","gnbLogoVariants","cva","variants","size","small","medium","large","defaultVariants","GnbLogo","forwardRef","_a","ref","children","className","href","props","useContext","GnbContext","_jsx","cn","Text","displayName"],"mappings":"yTAAA,IAAIA,EAAsC,WAStC,OARAA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,EAAQa,YAAc"}
1
+ {"version":3,"file":"GnbLogo.mjs","sources":["../../../lib/components/Gnb/GnbLogo.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 { forwardRef, useContext } from 'react';\nimport { cva } from 'class-variance-authority';\nimport { GnbContext } from './GnbRoot';\nimport { cn } from '../../../lib/utils/utils';\nimport { Text } from '../../../lib/Typography';\nvar gnbLogoVariants = cva('mr-4 flex items-center text-slate-12 dark:text-slateDark-12', {\n variants: {\n size: {\n small: 'text-xs w-[140px] h-[15px]',\n medium: 'text-sm w-[150px] h-[20px]',\n large: 'text-base w-[160px] h-[25px]',\n },\n },\n defaultVariants: {\n size: 'medium',\n },\n});\nexport var GnbLogo = forwardRef(function (_a, ref) {\n var children = _a.children, className = _a.className, href = _a.href, props = __rest(_a, [\"children\", \"className\", \"href\"]);\n var size = useContext(GnbContext).size;\n return (_jsx(\"a\", __assign({ href: href, className: cn(gnbLogoVariants({ size: size }), className) }, props, { children: children !== null && children !== void 0 ? children : _jsx(Text, { children: \"LOGO \\uC601\\uC5ED\" }) })));\n});\nGnbLogo.displayName = 'Gnb.Logo';\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__rest","e","indexOf","getOwnPropertySymbols","propertyIsEnumerable","gnbLogoVariants","cva","variants","size","small","medium","large","defaultVariants","GnbLogo","forwardRef","_a","ref","children","className","href","props","useContext","GnbContext","_jsx","cn","Text","displayName"],"mappings":"yTAAA,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,EAAkBC,EAAI,8DAA+D,CACrFC,SAAU,CACNC,KAAM,CACFC,MAAO,6BACPC,OAAQ,6BACRC,MAAO,iCAGfC,gBAAiB,CACbJ,KAAM,YAGHK,EAAUC,GAAW,SAAUC,EAAIC,GAC1C,IAAIC,EAAWF,EAAGE,SAAUC,EAAYH,EAAGG,UAAWC,EAAOJ,EAAGI,KAAMC,EAAQpB,EAAOe,EAAI,CAAC,WAAY,YAAa,SAC/GP,EAAOa,EAAWC,GAAYd,KAClC,OAAQe,EAAK,IAAKtC,EAAS,CAAEkC,KAAMA,EAAMD,UAAWM,EAAGnB,EAAgB,CAAEG,KAAMA,IAASU,IAAcE,EAAO,CAAEH,SAAUA,QAA2CA,EAAWM,EAAKE,EAAM,CAAER,SAAU,cAC1M,IACAJ,EAAQa,YAAc"}
@@ -43,4 +43,4 @@ export var GnbMenuItem = forwardRef(function (_a, ref) {
43
43
  var size = useContext(GnbContext).size;
44
44
  return (_jsx("a", __assign({ href: href, className: cn(gnbMenuItemVariants({ size: size }), active ? 'text-slate-12 dark:text-slateDark-12' : 'text-slate-10 dark:text-slateDark-10', className) }, props, { children: children })));
45
45
  });
46
- GnbMenuItem.displayName = 'Gnb.GnbMenuItem';
46
+ GnbMenuItem.displayName = 'Gnb.MenuItem';
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{jsx as t}from"react/jsx-runtime";import{forwardRef as e,useContext as r}from"react";import{cva as a}from"class-variance-authority";import{GnbContext as o}from"./GnbRoot.mjs";import{cn as n}from"../../utils/utils.mjs";var s=function(){return s=Object.assign||function(t){for(var e,r=1,a=arguments.length;r<a;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},s.apply(this,arguments)},i=function(t,e){var r={};for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&e.indexOf(a)<0&&(r[a]=t[a]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(a=Object.getOwnPropertySymbols(t);o<a.length;o++)e.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(t,a[o])&&(r[a[o]]=t[a[o]])}return r},l=a("hover:text-slate-11 dark:hover:text-slateDark-11 cursor-pointer",{variants:{size:{small:"text-xs",medium:"text-sm",large:"text-base"}},defaultVariants:{size:"medium"}}),c=e((function(e,a){var c=e.children,m=e.className,p=e.href,f=e.active,u=i(e,["children","className","href","active"]),h=r(o).size;return t("a",s({href:p,className:n(l({size:h}),f?"text-slate-12 dark:text-slateDark-12":"text-slate-10 dark:text-slateDark-10",m)},u,{children:c}))}));c.displayName="Gnb.GnbMenuItem";export{c as GnbMenuItem};
2
+ import{jsx as t}from"react/jsx-runtime";import{forwardRef as e,useContext as r}from"react";import{cva as a}from"class-variance-authority";import{GnbContext as o}from"./GnbRoot.mjs";import{cn as s}from"../../utils/utils.mjs";var n=function(){return n=Object.assign||function(t){for(var e,r=1,a=arguments.length;r<a;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)},i=function(t,e){var r={};for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&e.indexOf(a)<0&&(r[a]=t[a]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(a=Object.getOwnPropertySymbols(t);o<a.length;o++)e.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(t,a[o])&&(r[a[o]]=t[a[o]])}return r},l=a("hover:text-slate-11 dark:hover:text-slateDark-11 cursor-pointer",{variants:{size:{small:"text-xs",medium:"text-sm",large:"text-base"}},defaultVariants:{size:"medium"}}),c=e((function(e,a){var c=e.children,m=e.className,p=e.href,f=e.active,u=i(e,["children","className","href","active"]),h=r(o).size;return t("a",n({href:p,className:s(l({size:h}),f?"text-slate-12 dark:text-slateDark-12":"text-slate-10 dark:text-slateDark-10",m)},u,{children:c}))}));c.displayName="Gnb.MenuItem";export{c as GnbMenuItem};
3
3
  //# sourceMappingURL=GnbMenuItem.mjs.map
@@ -1,3 +1,14 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
1
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
13
  import { useState } from 'react';
3
14
  import IconButton from '../IconButton';
@@ -8,18 +19,28 @@ import Button from '../Button';
8
19
  import TextField from '../TextField';
9
20
  import Text from '../../Typography/Text';
10
21
  function NumberingPagination(_a) {
11
- var _b;
22
+ var _b, _c;
12
23
  var table = _a.table;
13
- var _c = useState('1'), nowPage = _c[0], setNowPage = _c[1];
24
+ var _d = useState('1'), nowPage = _d[0], setNowPage = _d[1];
14
25
  var color = (_b = table.options.color) !== null && _b !== void 0 ? _b : MAIN_COLOR;
26
+ var size = table.options.size == 'x-small' ? 'small' : table.options.size;
27
+ var currentPage = table.options.pagination
28
+ ? table.options.pagination.pageIndex
29
+ : table.getState().pagination.pageIndex;
15
30
  var renderPageNumbers = function () {
16
31
  var pageNumbers = [];
17
- var currentInx = table.getState().pagination.pageIndex;
32
+ var currentInx = table.options.pagination
33
+ ? table.options.pagination.pageIndex
34
+ : table.getState().pagination.pageIndex;
18
35
  var _loop_1 = function (i) {
19
- pageNumbers.push(_jsx(Button, { appearance: "ghost", onClick: function () {
20
- table.setPageIndex(i);
21
- setNowPage(String(i + 1));
22
- }, color: table.getState().pagination.pageIndex === i ? color : 'slate', children: i + 1 }, i));
36
+ pageNumbers.push(_jsx(Button, { size: size, appearance: "ghost", onClick: function () {
37
+ if (currentInx !== i) {
38
+ table.setPageIndex(i);
39
+ table.options.setPagination &&
40
+ table.options.setPagination(__assign(__assign({}, table.options.pagination), { pageIndex: i }));
41
+ setNowPage(String(i + 1));
42
+ }
43
+ }, color: currentInx === i ? color : 'slate', children: i + 1 }, i));
23
44
  };
24
45
  for (var i = 0; i < table.getPageCount(); i++) {
25
46
  _loop_1(i);
@@ -27,50 +48,71 @@ function NumberingPagination(_a) {
27
48
  if (pageNumbers.length > 10) {
28
49
  if (currentInx - 3 > 0 && currentInx + 3 < table.getPageCount()) {
29
50
  pageNumbers = pageNumbers.slice(currentInx - 2, currentInx + 3);
30
- pageNumbers.unshift(_jsx(Button, { appearance: "ghost", onClick: function () {
51
+ pageNumbers.unshift(_jsx(Button, { size: size, appearance: "ghost", onClick: function () {
31
52
  table.setPageIndex(0);
53
+ table.options.setPagination &&
54
+ table.options.setPagination(__assign(__assign({}, table.options.pagination), { pageIndex: 0 }));
32
55
  setNowPage('1');
33
- }, color: table.getState().pagination.pageIndex === 0 ? color : 'slate', children: 1 }, 0), _jsx(Button, { appearance: "ghost", disabled: true, children: "..." }));
34
- pageNumbers.push(_jsx(Button, { appearance: "ghost", disabled: true, children: "..." }), _jsx(Button, { appearance: "ghost", onClick: function () {
56
+ }, color: currentInx === 0 ? color : 'slate', children: 1 }, 0), _jsx(Button, { appearance: "ghost", disabled: true, size: size, children: "..." }));
57
+ pageNumbers.push(_jsx(Button, { appearance: "ghost", disabled: true, size: size, children: "..." }), _jsx(Button, { size: size, appearance: "ghost", onClick: function () {
35
58
  table.setPageIndex(table.getPageCount() - 1);
59
+ table.options.setPagination &&
60
+ table.options.setPagination(__assign(__assign({}, table.options.pagination), { pageIndex: table.getPageCount() - 1 }));
36
61
  setNowPage(String(table.getPageCount()));
37
- }, color: table.getState().pagination.pageIndex === table.getPageCount() - 1 ? color : 'slate', children: table.getPageCount() }, table.getPageCount() - 1));
62
+ }, color: currentInx === table.getPageCount() - 1 ? color : 'slate', children: table.getPageCount() }, table.getPageCount() - 1));
38
63
  }
39
64
  else if (currentInx - 3 <= 0) {
40
65
  pageNumbers = pageNumbers.slice(0, 7);
41
- pageNumbers.push(_jsx(Button, { appearance: "ghost", disabled: true, children: "..." }), _jsx(Button, { appearance: "ghost", onClick: function () {
66
+ pageNumbers.push(_jsx(Button, { appearance: "ghost", disabled: true, size: size, children: "..." }), _jsx(Button, { size: size, appearance: "ghost", onClick: function () {
42
67
  table.setPageIndex(table.getPageCount() - 1);
68
+ table.options.setPagination &&
69
+ table.options.setPagination(__assign(__assign({}, table.options.pagination), { pageIndex: table.getPageCount() - 1 }));
43
70
  setNowPage(String(table.getPageCount()));
44
- }, color: table.getState().pagination.pageIndex === table.getPageCount() - 1 ? color : 'slate', children: table.getPageCount() }, table.getPageCount() - 1));
71
+ }, color: currentInx === table.getPageCount() - 1 ? color : 'slate', children: table.getPageCount() }, table.getPageCount() - 1));
45
72
  }
46
73
  else {
47
74
  pageNumbers = pageNumbers.slice(table.getPageCount() - 7, table.getPageCount());
48
- pageNumbers.unshift(_jsx(Button, { appearance: "ghost", onClick: function () {
75
+ pageNumbers.unshift(_jsx(Button, { size: size, appearance: "ghost", onClick: function () {
49
76
  table.setPageIndex(0);
77
+ table.options.setPagination &&
78
+ table.options.setPagination(__assign(__assign({}, table.options.pagination), { pageIndex: 0 }));
50
79
  setNowPage('1');
51
- }, color: table.getState().pagination.pageIndex === 0 ? color : 'slate', children: 1 }, 0), _jsx(Button, { appearance: "ghost", disabled: true, children: "..." }));
80
+ }, color: currentInx === 0 ? color : 'slate', children: 1 }, 0), _jsx(Button, { appearance: "ghost", disabled: true, size: size, children: "..." }));
52
81
  }
53
82
  }
54
83
  return pageNumbers;
55
84
  };
56
- return (_jsxs("div", { children: [_jsxs("div", { className: "flex items-center justify-center gap-2", children: [_jsxs(Select.Root, { color: color, value: String(table.getState().pagination.pageSize), defaultValue: String(table.getState().pagination.pageSize), onValueChange: function (e) {
85
+ return (_jsxs("div", { children: [_jsxs("div", { className: "flex items-center justify-center gap-2", children: [_jsxs(Select.Root, { size: size, color: color, value: String(table.getState().pagination.pageSize), defaultValue: String(table.getState().pagination.pageSize), onValueChange: function (e) {
86
+ table.options.setPagination &&
87
+ table.options.setPagination({
88
+ pageIndex: 0,
89
+ pageSize: Number(e),
90
+ });
57
91
  table.setPageSize(Number(e));
58
92
  setNowPage('1');
59
93
  table.setPageIndex(0);
60
- }, children: [_jsx(Select.Trigger, {}), _jsx(Select.Content, { children: [10, 20, 30, 50, 100].map(function (pageSize) { return (_jsx(Select.Item, { value: String(pageSize), children: pageSize }, pageSize)); }) })] }), _jsxs("div", { className: "flex gap-2", children: [_jsx(IconButton, { className: "rounded border p-1", color: color, onClick: function () {
94
+ }, children: [_jsx(Select.Trigger, {}), _jsx(Select.Content, { children: [10, 20, 30, 50, 100].map(function (pageSize) { return (_jsx(Select.Item, { value: String(pageSize), children: pageSize }, pageSize)); }) })] }), _jsxs("div", { className: "flex gap-2", children: [_jsx(IconButton, { size: size, appearance: "ghost", className: "rounded border p-1", color: color, onClick: function () {
61
95
  table.firstPage();
96
+ table.options.setPagination &&
97
+ table.options.setPagination(__assign(__assign({}, table.options.pagination), { pageIndex: 0 }));
62
98
  setNowPage('1');
63
- }, disabled: !table.getCanPreviousPage(), children: _jsx(DoubleArrowLeftIcon, {}) }), _jsx(IconButton, { className: "rounded border p-1", color: color, onClick: function () {
99
+ }, disabled: currentPage === 0, children: _jsx(DoubleArrowLeftIcon, {}) }), _jsx(IconButton, { size: size, appearance: "ghost", className: "rounded border p-1", color: color, onClick: function () {
64
100
  table.previousPage();
65
101
  setNowPage(String(table.getState().pagination.pageIndex));
66
- }, disabled: !table.getCanPreviousPage(), children: _jsx(ChevronLeftIcon, {}) })] }), _jsx("div", { children: renderPageNumbers() }), _jsxs("div", { className: "flex gap-2", children: [_jsx(IconButton, { className: "rounded border p-1", color: color, onClick: function () {
102
+ table.options.setPagination &&
103
+ table.options.setPagination(__assign(__assign({}, table.options.pagination), { pageIndex: table.options.pagination.pageIndex - 1 }));
104
+ }, disabled: currentPage === 0, children: _jsx(ChevronLeftIcon, {}) })] }), _jsx("div", { children: renderPageNumbers() }), _jsxs("div", { className: "flex gap-2", children: [_jsx(IconButton, { size: size, appearance: "ghost", className: "rounded border p-1", color: color, onClick: function () {
67
105
  table.nextPage();
68
106
  setNowPage(String(table.getState().pagination.pageIndex + 2));
69
- }, disabled: !table.getCanNextPage(), children: _jsx(ChevronRightIcon, {}) }), _jsx(IconButton, { className: "rounded border p-1", color: color, onClick: function () {
107
+ table.options.setPagination &&
108
+ table.options.setPagination(__assign(__assign({}, table.options.pagination), { pageIndex: table.options.pagination.pageIndex + 1 }));
109
+ }, disabled: currentPage === table.getPageCount() - 1, children: _jsx(ChevronRightIcon, {}) }), _jsx(IconButton, { size: size, appearance: "ghost", className: "rounded border p-1", color: color, onClick: function () {
70
110
  table.lastPage();
71
111
  setNowPage(String(table.getPageCount()));
72
- }, disabled: !table.getCanNextPage(), children: _jsx(DoubleArrowRightIcon, {}) })] })] }), _jsxs("div", { className: "mt-4 flex items-center justify-center gap-2", children: [_jsx(TextField.Root, { type: "number", color: color, min: "1", max: table.getPageCount(), value: nowPage, onChange: function (e) {
112
+ table.options.setPagination &&
113
+ table.options.setPagination(__assign(__assign({}, table.options.pagination), { pageIndex: table.getPageCount() - 1 }));
114
+ }, disabled: currentPage === table.getPageCount() - 1, children: _jsx(DoubleArrowRightIcon, {}) })] })] }), !((_c = table.options) === null || _c === void 0 ? void 0 : _c.disableInputPagination) && (_jsxs("div", { className: "mt-4 flex items-center justify-center gap-2", children: [_jsx(TextField.Root, { size: size, type: "number", color: color, min: "1", max: table.getPageCount(), value: nowPage, onChange: function (e) {
73
115
  setNowPage(e.target.value);
74
- }, className: "w-[50px] rounded border" }), _jsxs(Text, { children: ["/ ", table.getPageCount()] }), _jsx(Button, { onClick: function () { return table.setPageIndex(nowPage ? Number(nowPage) - 1 : 0); }, children: "\uC774\uB3D9" })] })] }));
116
+ }, className: "w-[50px] rounded border" }), _jsxs(Text, { children: ["/ ", table.getPageCount()] }), _jsx(Button, { size: size, onClick: function () { return table.setPageIndex(nowPage ? Number(nowPage) - 1 : 0); }, children: "\uC774\uB3D9" })] }))] }));
75
117
  }
76
118
  export default NumberingPagination;
@@ -1,2 +1,2 @@
1
- import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as n}from"react";import{IconButton as a}from"../IconButton/index.mjs";import{DoubleArrowLeftIcon as o,ChevronLeftIcon as i,ChevronRightIcon as r,DoubleArrowRightIcon as g}from"@radix-ui/react-icons";import c from"../Select/index.mjs";import{MAIN_COLOR as l}from"../../color/constants.mjs";import{Button as d}from"../Button/index.mjs";import s from"../TextField/index.mjs";import u from"../../Typography/Text/index.mjs";function p(p){var m,h=p.table,f=n("1"),P=f[0],x=f[1],C=null!==(m=h.options.color)&&void 0!==m?m:l;return e("div",{children:[e("div",{className:"flex items-center justify-center gap-2",children:[e(c.Root,{color:C,value:String(h.getState().pagination.pageSize),defaultValue:String(h.getState().pagination.pageSize),onValueChange:function(e){h.setPageSize(Number(e)),x("1"),h.setPageIndex(0)},children:[t(c.Trigger,{}),t(c.Content,{children:[10,20,30,50,100].map((function(e){return t(c.Item,{value:String(e),children:e},e)}))})]}),e("div",{className:"flex gap-2",children:[t(a,{className:"rounded border p-1",color:C,onClick:function(){h.firstPage(),x("1")},disabled:!h.getCanPreviousPage(),children:t(o,{})}),t(a,{className:"rounded border p-1",color:C,onClick:function(){h.previousPage(),x(String(h.getState().pagination.pageIndex))},disabled:!h.getCanPreviousPage(),children:t(i,{})})]}),t("div",{children:function(){for(var e=[],n=h.getState().pagination.pageIndex,a=function(n){e.push(t(d,{appearance:"ghost",onClick:function(){h.setPageIndex(n),x(String(n+1))},color:h.getState().pagination.pageIndex===n?C:"slate",children:n+1},n))},o=0;o<h.getPageCount();o++)a(o);return e.length>10&&(n-3>0&&n+3<h.getPageCount()?((e=e.slice(n-2,n+3)).unshift(t(d,{appearance:"ghost",onClick:function(){h.setPageIndex(0),x("1")},color:0===h.getState().pagination.pageIndex?C:"slate",children:1},0),t(d,{appearance:"ghost",disabled:!0,children:"..."})),e.push(t(d,{appearance:"ghost",disabled:!0,children:"..."}),t(d,{appearance:"ghost",onClick:function(){h.setPageIndex(h.getPageCount()-1),x(String(h.getPageCount()))},color:h.getState().pagination.pageIndex===h.getPageCount()-1?C:"slate",children:h.getPageCount()},h.getPageCount()-1))):n-3<=0?(e=e.slice(0,7)).push(t(d,{appearance:"ghost",disabled:!0,children:"..."}),t(d,{appearance:"ghost",onClick:function(){h.setPageIndex(h.getPageCount()-1),x(String(h.getPageCount()))},color:h.getState().pagination.pageIndex===h.getPageCount()-1?C:"slate",children:h.getPageCount()},h.getPageCount()-1)):(e=e.slice(h.getPageCount()-7,h.getPageCount())).unshift(t(d,{appearance:"ghost",onClick:function(){h.setPageIndex(0),x("1")},color:0===h.getState().pagination.pageIndex?C:"slate",children:1},0),t(d,{appearance:"ghost",disabled:!0,children:"..."}))),e}()}),e("div",{className:"flex gap-2",children:[t(a,{className:"rounded border p-1",color:C,onClick:function(){h.nextPage(),x(String(h.getState().pagination.pageIndex+2))},disabled:!h.getCanNextPage(),children:t(r,{})}),t(a,{className:"rounded border p-1",color:C,onClick:function(){h.lastPage(),x(String(h.getPageCount()))},disabled:!h.getCanNextPage(),children:t(g,{})})]})]}),e("div",{className:"mt-4 flex items-center justify-center gap-2",children:[t(s.Root,{type:"number",color:C,min:"1",max:h.getPageCount(),value:P,onChange:function(e){x(e.target.value)},className:"w-[50px] rounded border"}),e(u,{children:["/ ",h.getPageCount()]}),t(d,{onClick:function(){return h.setPageIndex(P?Number(P)-1:0)},children:"이동"})]})]})}export{p as default};
1
+ import{jsxs as e,jsx as n}from"react/jsx-runtime";import{useState as t}from"react";import{IconButton as o}from"../IconButton/index.mjs";import{DoubleArrowLeftIcon as i,ChevronLeftIcon as a,ChevronRightIcon as s,DoubleArrowRightIcon as g}from"@radix-ui/react-icons";import p from"../Select/index.mjs";import{MAIN_COLOR as r}from"../../color/constants.mjs";import{Button as c}from"../Button/index.mjs";import l from"../TextField/index.mjs";import d from"../../Typography/Text/index.mjs";var u=function(){return u=Object.assign||function(e){for(var n,t=1,o=arguments.length;t<o;t++)for(var i in n=arguments[t])Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i]);return e},u.apply(this,arguments)};function P(P){var h,m,x=P.table,f=t("1"),C=f[0],I=f[1],z=null!==(h=x.options.color)&&void 0!==h?h:r,b="x-small"==x.options.size?"small":x.options.size,S=x.options.pagination?x.options.pagination.pageIndex:x.getState().pagination.pageIndex;return e("div",{children:[e("div",{className:"flex items-center justify-center gap-2",children:[e(p.Root,{size:b,color:z,value:String(x.getState().pagination.pageSize),defaultValue:String(x.getState().pagination.pageSize),onValueChange:function(e){x.options.setPagination&&x.options.setPagination({pageIndex:0,pageSize:Number(e)}),x.setPageSize(Number(e)),I("1"),x.setPageIndex(0)},children:[n(p.Trigger,{}),n(p.Content,{children:[10,20,30,50,100].map((function(e){return n(p.Item,{value:String(e),children:e},e)}))})]}),e("div",{className:"flex gap-2",children:[n(o,{size:b,appearance:"ghost",className:"rounded border p-1",color:z,onClick:function(){x.firstPage(),x.options.setPagination&&x.options.setPagination(u(u({},x.options.pagination),{pageIndex:0})),I("1")},disabled:0===S,children:n(i,{})}),n(o,{size:b,appearance:"ghost",className:"rounded border p-1",color:z,onClick:function(){x.previousPage(),I(String(x.getState().pagination.pageIndex)),x.options.setPagination&&x.options.setPagination(u(u({},x.options.pagination),{pageIndex:x.options.pagination.pageIndex-1}))},disabled:0===S,children:n(a,{})})]}),n("div",{children:function(){for(var e=[],t=x.options.pagination?x.options.pagination.pageIndex:x.getState().pagination.pageIndex,o=function(o){e.push(n(c,{size:b,appearance:"ghost",onClick:function(){t!==o&&(x.setPageIndex(o),x.options.setPagination&&x.options.setPagination(u(u({},x.options.pagination),{pageIndex:o})),I(String(o+1)))},color:t===o?z:"slate",children:o+1},o))},i=0;i<x.getPageCount();i++)o(i);return e.length>10&&(t-3>0&&t+3<x.getPageCount()?((e=e.slice(t-2,t+3)).unshift(n(c,{size:b,appearance:"ghost",onClick:function(){x.setPageIndex(0),x.options.setPagination&&x.options.setPagination(u(u({},x.options.pagination),{pageIndex:0})),I("1")},color:0===t?z:"slate",children:1},0),n(c,{appearance:"ghost",disabled:!0,size:b,children:"..."})),e.push(n(c,{appearance:"ghost",disabled:!0,size:b,children:"..."}),n(c,{size:b,appearance:"ghost",onClick:function(){x.setPageIndex(x.getPageCount()-1),x.options.setPagination&&x.options.setPagination(u(u({},x.options.pagination),{pageIndex:x.getPageCount()-1})),I(String(x.getPageCount()))},color:t===x.getPageCount()-1?z:"slate",children:x.getPageCount()},x.getPageCount()-1))):t-3<=0?(e=e.slice(0,7)).push(n(c,{appearance:"ghost",disabled:!0,size:b,children:"..."}),n(c,{size:b,appearance:"ghost",onClick:function(){x.setPageIndex(x.getPageCount()-1),x.options.setPagination&&x.options.setPagination(u(u({},x.options.pagination),{pageIndex:x.getPageCount()-1})),I(String(x.getPageCount()))},color:t===x.getPageCount()-1?z:"slate",children:x.getPageCount()},x.getPageCount()-1)):(e=e.slice(x.getPageCount()-7,x.getPageCount())).unshift(n(c,{size:b,appearance:"ghost",onClick:function(){x.setPageIndex(0),x.options.setPagination&&x.options.setPagination(u(u({},x.options.pagination),{pageIndex:0})),I("1")},color:0===t?z:"slate",children:1},0),n(c,{appearance:"ghost",disabled:!0,size:b,children:"..."}))),e}()}),e("div",{className:"flex gap-2",children:[n(o,{size:b,appearance:"ghost",className:"rounded border p-1",color:z,onClick:function(){x.nextPage(),I(String(x.getState().pagination.pageIndex+2)),x.options.setPagination&&x.options.setPagination(u(u({},x.options.pagination),{pageIndex:x.options.pagination.pageIndex+1}))},disabled:S===x.getPageCount()-1,children:n(s,{})}),n(o,{size:b,appearance:"ghost",className:"rounded border p-1",color:z,onClick:function(){x.lastPage(),I(String(x.getPageCount())),x.options.setPagination&&x.options.setPagination(u(u({},x.options.pagination),{pageIndex:x.getPageCount()-1}))},disabled:S===x.getPageCount()-1,children:n(g,{})})]})]}),!(null===(m=x.options)||void 0===m?void 0:m.disableInputPagination)&&e("div",{className:"mt-4 flex items-center justify-center gap-2",children:[n(l.Root,{size:b,type:"number",color:z,min:"1",max:x.getPageCount(),value:C,onChange:function(e){I(e.target.value)},className:"w-[50px] rounded border"}),e(d,{children:["/ ",x.getPageCount()]}),n(c,{size:b,onClick:function(){return x.setPageIndex(C?Number(C)-1:0)},children:"이동"})]})]})}export{P as default};
2
2
  //# sourceMappingURL=NumberingPagination.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"NumberingPagination.mjs","sources":["../../../lib/components/Grid/NumberingPagination.js"],"sourcesContent":["import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { useState } from 'react';\nimport IconButton from '../IconButton';\nimport { ChevronLeftIcon, ChevronRightIcon, DoubleArrowLeftIcon, DoubleArrowRightIcon, } from '@radix-ui/react-icons';\nimport Select from '../Select';\nimport { MAIN_COLOR } from '../../../lib/color/constants';\nimport Button from '../Button';\nimport TextField from '../TextField';\nimport Text from '../../Typography/Text';\nfunction NumberingPagination(_a) {\n var _b;\n var table = _a.table;\n var _c = useState('1'), nowPage = _c[0], setNowPage = _c[1];\n var color = (_b = table.options.color) !== null && _b !== void 0 ? _b : MAIN_COLOR;\n var renderPageNumbers = function () {\n var pageNumbers = [];\n var currentInx = table.getState().pagination.pageIndex;\n var _loop_1 = function (i) {\n pageNumbers.push(_jsx(Button, { appearance: \"ghost\", onClick: function () {\n table.setPageIndex(i);\n setNowPage(String(i + 1));\n }, color: table.getState().pagination.pageIndex === i ? color : 'slate', children: i + 1 }, i));\n };\n for (var i = 0; i < table.getPageCount(); i++) {\n _loop_1(i);\n }\n if (pageNumbers.length > 10) {\n if (currentInx - 3 > 0 && currentInx + 3 < table.getPageCount()) {\n pageNumbers = pageNumbers.slice(currentInx - 2, currentInx + 3);\n pageNumbers.unshift(_jsx(Button, { appearance: \"ghost\", onClick: function () {\n table.setPageIndex(0);\n setNowPage('1');\n }, color: table.getState().pagination.pageIndex === 0 ? color : 'slate', children: 1 }, 0), _jsx(Button, { appearance: \"ghost\", disabled: true, children: \"...\" }));\n pageNumbers.push(_jsx(Button, { appearance: \"ghost\", disabled: true, children: \"...\" }), _jsx(Button, { appearance: \"ghost\", onClick: function () {\n table.setPageIndex(table.getPageCount() - 1);\n setNowPage(String(table.getPageCount()));\n }, color: table.getState().pagination.pageIndex === table.getPageCount() - 1 ? color : 'slate', children: table.getPageCount() }, table.getPageCount() - 1));\n }\n else if (currentInx - 3 <= 0) {\n pageNumbers = pageNumbers.slice(0, 7);\n pageNumbers.push(_jsx(Button, { appearance: \"ghost\", disabled: true, children: \"...\" }), _jsx(Button, { appearance: \"ghost\", onClick: function () {\n table.setPageIndex(table.getPageCount() - 1);\n setNowPage(String(table.getPageCount()));\n }, color: table.getState().pagination.pageIndex === table.getPageCount() - 1 ? color : 'slate', children: table.getPageCount() }, table.getPageCount() - 1));\n }\n else {\n pageNumbers = pageNumbers.slice(table.getPageCount() - 7, table.getPageCount());\n pageNumbers.unshift(_jsx(Button, { appearance: \"ghost\", onClick: function () {\n table.setPageIndex(0);\n setNowPage('1');\n }, color: table.getState().pagination.pageIndex === 0 ? color : 'slate', children: 1 }, 0), _jsx(Button, { appearance: \"ghost\", disabled: true, children: \"...\" }));\n }\n }\n return pageNumbers;\n };\n return (_jsxs(\"div\", { children: [_jsxs(\"div\", { className: \"flex items-center justify-center gap-2\", children: [_jsxs(Select.Root, { color: color, value: String(table.getState().pagination.pageSize), defaultValue: String(table.getState().pagination.pageSize), onValueChange: function (e) {\n table.setPageSize(Number(e));\n setNowPage('1');\n table.setPageIndex(0);\n }, children: [_jsx(Select.Trigger, {}), _jsx(Select.Content, { children: [10, 20, 30, 50, 100].map(function (pageSize) { return (_jsx(Select.Item, { value: String(pageSize), children: pageSize }, pageSize)); }) })] }), _jsxs(\"div\", { className: \"flex gap-2\", children: [_jsx(IconButton, { className: \"rounded border p-1\", color: color, onClick: function () {\n table.firstPage();\n setNowPage('1');\n }, disabled: !table.getCanPreviousPage(), children: _jsx(DoubleArrowLeftIcon, {}) }), _jsx(IconButton, { className: \"rounded border p-1\", color: color, onClick: function () {\n table.previousPage();\n setNowPage(String(table.getState().pagination.pageIndex));\n }, disabled: !table.getCanPreviousPage(), children: _jsx(ChevronLeftIcon, {}) })] }), _jsx(\"div\", { children: renderPageNumbers() }), _jsxs(\"div\", { className: \"flex gap-2\", children: [_jsx(IconButton, { className: \"rounded border p-1\", color: color, onClick: function () {\n table.nextPage();\n setNowPage(String(table.getState().pagination.pageIndex + 2));\n }, disabled: !table.getCanNextPage(), children: _jsx(ChevronRightIcon, {}) }), _jsx(IconButton, { className: \"rounded border p-1\", color: color, onClick: function () {\n table.lastPage();\n setNowPage(String(table.getPageCount()));\n }, disabled: !table.getCanNextPage(), children: _jsx(DoubleArrowRightIcon, {}) })] })] }), _jsxs(\"div\", { className: \"mt-4 flex items-center justify-center gap-2\", children: [_jsx(TextField.Root, { type: \"number\", color: color, min: \"1\", max: table.getPageCount(), value: nowPage, onChange: function (e) {\n setNowPage(e.target.value);\n }, className: \"w-[50px] rounded border\" }), _jsxs(Text, { children: [\"/ \", table.getPageCount()] }), _jsx(Button, { onClick: function () { return table.setPageIndex(nowPage ? Number(nowPage) - 1 : 0); }, children: \"\\uC774\\uB3D9\" })] })] }));\n}\nexport default NumberingPagination;\n"],"names":["NumberingPagination","_a","_b","table","_c","useState","nowPage","setNowPage","color","options","MAIN_COLOR","_jsxs","children","className","Select","Root","value","String","getState","pagination","pageSize","defaultValue","onValueChange","e","setPageSize","Number","setPageIndex","_jsx","Trigger","Content","map","Item","IconButton","onClick","firstPage","disabled","getCanPreviousPage","DoubleArrowLeftIcon","previousPage","pageIndex","ChevronLeftIcon","pageNumbers","currentInx","_loop_1","i","push","Button","appearance","getPageCount","length","slice","unshift","renderPageNumbers","nextPage","getCanNextPage","ChevronRightIcon","lastPage","DoubleArrowRightIcon","TextField","type","min","max","onChange","target","Text"],"mappings":"qeASA,SAASA,EAAoBC,GACzB,IAAIC,EACAC,EAAQF,EAAGE,MACXC,EAAKC,EAAS,KAAMC,EAAUF,EAAG,GAAIG,EAAaH,EAAG,GACrDI,EAAuC,QAA9BN,EAAKC,EAAMM,QAAQD,aAA0B,IAAPN,EAAgBA,EAAKQ,EA0CxE,OAAQC,EAAM,MAAO,CAAEC,SAAU,CAACD,EAAM,MAAO,CAAEE,UAAW,yCAA0CD,SAAU,CAACD,EAAMG,EAAOC,KAAM,CAAEP,MAAOA,EAAOQ,MAAOC,OAAOd,EAAMe,WAAWC,WAAWC,UAAWC,aAAcJ,OAAOd,EAAMe,WAAWC,WAAWC,UAAWE,cAA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AKmB,EAAQ,CAAEC,WAAY,QAASZ,UAAU,EAAMvB,SAAU,UAG/J6B,CACf,CAW8IW,KAAwBzC,EAAM,MAAO,CAAEE,UAAW,aAAcD,SAAU,CAACe,EAAKK,EAAY,CAAEnB,UAAW,qBAAsBL,MAAOA,EAAOyB,QAAS,WAChQ9B,EAAMkD,WACN9C,EAAWU,OAAOd,EAAMe,WAAWC,WAAWoB,UAAY,GAC9F,EAAmCJ,UAAWhC,EAAMmD,iBAAkB1C,SAAUe,EAAK4B,EAAkB,CAAE,KAAM5B,EAAKK,EAAY,CAAEnB,UAAW,qBAAsBL,MAAOA,EAAOyB,QAAS,WACtJ9B,EAAMqD,WACNjD,EAAWU,OAAOd,EAAM6C,gBAC5D,EAAmCb,UAAWhC,EAAMmD,iBAAkB1C,SAAUe,EAAK8B,EAAsB,CAAE,WAAc9C,EAAM,MAAO,CAAEE,UAAW,8CAA+CD,SAAU,CAACe,EAAK+B,EAAU3C,KAAM,CAAE4C,KAAM,SAAUnD,MAAOA,EAAOoD,IAAK,IAAKC,IAAK1D,EAAM6C,eAAgBhC,MAAOV,EAASwD,SAAU,SAAUvC,GACjThB,EAAWgB,EAAEwC,OAAO/C,MAChD,EAA2BH,UAAW,4BAA8BF,EAAMqD,EAAM,CAAEpD,SAAU,CAAC,KAAMT,EAAM6C,kBAAoBrB,EAAKmB,EAAQ,CAAEb,QAAS,WAAc,OAAO9B,EAAMuB,aAAapB,EAAUmB,OAAOnB,GAAW,EAAI,EAAK,EAAEM,SAAU,YAC9O"}
1
+ {"version":3,"file":"NumberingPagination.mjs","sources":["../../../lib/components/Grid/NumberingPagination.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};\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { useState } from 'react';\nimport IconButton from '../IconButton';\nimport { ChevronLeftIcon, ChevronRightIcon, DoubleArrowLeftIcon, DoubleArrowRightIcon, } from '@radix-ui/react-icons';\nimport Select from '../Select';\nimport { MAIN_COLOR } from '../../../lib/color/constants';\nimport Button from '../Button';\nimport TextField from '../TextField';\nimport Text from '../../Typography/Text';\nfunction NumberingPagination(_a) {\n var _b, _c;\n var table = _a.table;\n var _d = useState('1'), nowPage = _d[0], setNowPage = _d[1];\n var color = (_b = table.options.color) !== null && _b !== void 0 ? _b : MAIN_COLOR;\n var size = table.options.size == 'x-small' ? 'small' : table.options.size;\n var currentPage = table.options.pagination\n ? table.options.pagination.pageIndex\n : table.getState().pagination.pageIndex;\n var renderPageNumbers = function () {\n var pageNumbers = [];\n var currentInx = table.options.pagination\n ? table.options.pagination.pageIndex\n : table.getState().pagination.pageIndex;\n var _loop_1 = function (i) {\n pageNumbers.push(_jsx(Button, { size: size, appearance: \"ghost\", onClick: function () {\n if (currentInx !== i) {\n table.setPageIndex(i);\n table.options.setPagination &&\n table.options.setPagination(__assign(__assign({}, table.options.pagination), { pageIndex: i }));\n setNowPage(String(i + 1));\n }\n }, color: currentInx === i ? color : 'slate', children: i + 1 }, i));\n };\n for (var i = 0; i < table.getPageCount(); i++) {\n _loop_1(i);\n }\n if (pageNumbers.length > 10) {\n if (currentInx - 3 > 0 && currentInx + 3 < table.getPageCount()) {\n pageNumbers = pageNumbers.slice(currentInx - 2, currentInx + 3);\n pageNumbers.unshift(_jsx(Button, { size: size, appearance: \"ghost\", onClick: function () {\n table.setPageIndex(0);\n table.options.setPagination &&\n table.options.setPagination(__assign(__assign({}, table.options.pagination), { pageIndex: 0 }));\n setNowPage('1');\n }, color: currentInx === 0 ? color : 'slate', children: 1 }, 0), _jsx(Button, { appearance: \"ghost\", disabled: true, size: size, children: \"...\" }));\n pageNumbers.push(_jsx(Button, { appearance: \"ghost\", disabled: true, size: size, children: \"...\" }), _jsx(Button, { size: size, appearance: \"ghost\", onClick: function () {\n table.setPageIndex(table.getPageCount() - 1);\n table.options.setPagination &&\n table.options.setPagination(__assign(__assign({}, table.options.pagination), { pageIndex: table.getPageCount() - 1 }));\n setNowPage(String(table.getPageCount()));\n }, color: currentInx === table.getPageCount() - 1 ? color : 'slate', children: table.getPageCount() }, table.getPageCount() - 1));\n }\n else if (currentInx - 3 <= 0) {\n pageNumbers = pageNumbers.slice(0, 7);\n pageNumbers.push(_jsx(Button, { appearance: \"ghost\", disabled: true, size: size, children: \"...\" }), _jsx(Button, { size: size, appearance: \"ghost\", onClick: function () {\n table.setPageIndex(table.getPageCount() - 1);\n table.options.setPagination &&\n table.options.setPagination(__assign(__assign({}, table.options.pagination), { pageIndex: table.getPageCount() - 1 }));\n setNowPage(String(table.getPageCount()));\n }, color: currentInx === table.getPageCount() - 1 ? color : 'slate', children: table.getPageCount() }, table.getPageCount() - 1));\n }\n else {\n pageNumbers = pageNumbers.slice(table.getPageCount() - 7, table.getPageCount());\n pageNumbers.unshift(_jsx(Button, { size: size, appearance: \"ghost\", onClick: function () {\n table.setPageIndex(0);\n table.options.setPagination &&\n table.options.setPagination(__assign(__assign({}, table.options.pagination), { pageIndex: 0 }));\n setNowPage('1');\n }, color: currentInx === 0 ? color : 'slate', children: 1 }, 0), _jsx(Button, { appearance: \"ghost\", disabled: true, size: size, children: \"...\" }));\n }\n }\n return pageNumbers;\n };\n return (_jsxs(\"div\", { children: [_jsxs(\"div\", { className: \"flex items-center justify-center gap-2\", children: [_jsxs(Select.Root, { size: size, color: color, value: String(table.getState().pagination.pageSize), defaultValue: String(table.getState().pagination.pageSize), onValueChange: function (e) {\n table.options.setPagination &&\n table.options.setPagination({\n pageIndex: 0,\n pageSize: Number(e),\n });\n table.setPageSize(Number(e));\n setNowPage('1');\n table.setPageIndex(0);\n }, children: [_jsx(Select.Trigger, {}), _jsx(Select.Content, { children: [10, 20, 30, 50, 100].map(function (pageSize) { return (_jsx(Select.Item, { value: String(pageSize), children: pageSize }, pageSize)); }) })] }), _jsxs(\"div\", { className: \"flex gap-2\", children: [_jsx(IconButton, { size: size, appearance: \"ghost\", className: \"rounded border p-1\", color: color, onClick: function () {\n table.firstPage();\n table.options.setPagination &&\n table.options.setPagination(__assign(__assign({}, table.options.pagination), { pageIndex: 0 }));\n setNowPage('1');\n }, disabled: currentPage === 0, children: _jsx(DoubleArrowLeftIcon, {}) }), _jsx(IconButton, { size: size, appearance: \"ghost\", className: \"rounded border p-1\", color: color, onClick: function () {\n table.previousPage();\n setNowPage(String(table.getState().pagination.pageIndex));\n table.options.setPagination &&\n table.options.setPagination(__assign(__assign({}, table.options.pagination), { pageIndex: table.options.pagination.pageIndex - 1 }));\n }, disabled: currentPage === 0, children: _jsx(ChevronLeftIcon, {}) })] }), _jsx(\"div\", { children: renderPageNumbers() }), _jsxs(\"div\", { className: \"flex gap-2\", children: [_jsx(IconButton, { size: size, appearance: \"ghost\", className: \"rounded border p-1\", color: color, onClick: function () {\n table.nextPage();\n setNowPage(String(table.getState().pagination.pageIndex + 2));\n table.options.setPagination &&\n table.options.setPagination(__assign(__assign({}, table.options.pagination), { pageIndex: table.options.pagination.pageIndex + 1 }));\n }, disabled: currentPage === table.getPageCount() - 1, children: _jsx(ChevronRightIcon, {}) }), _jsx(IconButton, { size: size, appearance: \"ghost\", className: \"rounded border p-1\", color: color, onClick: function () {\n table.lastPage();\n setNowPage(String(table.getPageCount()));\n table.options.setPagination &&\n table.options.setPagination(__assign(__assign({}, table.options.pagination), { pageIndex: table.getPageCount() - 1 }));\n }, disabled: currentPage === table.getPageCount() - 1, children: _jsx(DoubleArrowRightIcon, {}) })] })] }), !((_c = table.options) === null || _c === void 0 ? void 0 : _c.disableInputPagination) && (_jsxs(\"div\", { className: \"mt-4 flex items-center justify-center gap-2\", children: [_jsx(TextField.Root, { size: size, type: \"number\", color: color, min: \"1\", max: table.getPageCount(), value: nowPage, onChange: function (e) {\n setNowPage(e.target.value);\n }, className: \"w-[50px] rounded border\" }), _jsxs(Text, { children: [\"/ \", table.getPageCount()] }), _jsx(Button, { size: size, onClick: function () { return table.setPageIndex(nowPage ? Number(nowPage) - 1 : 0); }, children: \"\\uC774\\uB3D9\" })] }))] }));\n}\nexport default NumberingPagination;\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","NumberingPagination","_a","_b","_c","table","_d","useState","nowPage","setNowPage","color","options","MAIN_COLOR","size","currentPage","pagination","pageIndex","getState","_jsxs","children","className","Select","Root","value","String","pageSize","defaultValue","onValueChange","e","setPagination","Number","setPageSize","setPageIndex","_jsx","Trigger","Content","map","Item","IconButton","appearance","onClick","firstPage","disabled","DoubleArrowLeftIcon","previousPage","ChevronLeftIcon","pageNumbers","currentInx","_loop_1","push","Button","getPageCount","slice","unshift","renderPageNumbers","nextPage","ChevronRightIcon","lastPage","DoubleArrowRightIcon","disableInputPagination","TextField","type","min","max","onChange","target","Text"],"mappings":"qeAAA,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,EAUA,SAASQ,EAAoBC,GACzB,IAAIC,EAAIC,EACJC,EAAQH,EAAGG,MACXC,EAAKC,EAAS,KAAMC,EAAUF,EAAG,GAAIG,EAAaH,EAAG,GACrDI,EAAuC,QAA9BP,EAAKE,EAAMM,QAAQD,aAA0B,IAAPP,EAAgBA,EAAKS,EACpEC,EAA6B,WAAtBR,EAAMM,QAAQE,KAAoB,QAAUR,EAAMM,QAAQE,KACjEC,EAAcT,EAAMM,QAAQI,WAC1BV,EAAMM,QAAQI,WAAWC,UACzBX,EAAMY,WAAWF,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M8C,eAAgB5B,MAAOf,EAASwD,SAAU,SAAUpC,GACzanB,EAAWmB,EAAEqC,OAAO1C,MAChD,EAA2BH,UAAW,4BAA8BF,EAAMgD,EAAM,CAAE/C,SAAU,CAAC,KAAMd,EAAM8C,kBAAoBlB,EAAKiB,EAAQ,CAAErC,KAAMA,EAAM2B,QAAS,WAAc,OAAOnC,EAAM2B,aAAaxB,EAAUsB,OAAOtB,GAAW,EAAI,EAAG,EAAIW,SAAU,YAC1P"}
@@ -1,5 +1,6 @@
1
1
  export declare const GridVariants: (props?: ({
2
2
  color?: string | null | undefined;
3
+ radius?: "none" | "small" | "medium" | "large" | "full" | null | undefined;
3
4
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
4
5
  declare function Grid({ table }: {
5
6
  table: any;