@kubed/components 0.2.35 → 0.3.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (241) hide show
  1. package/cjs/Alert/Alert.js +4 -4
  2. package/cjs/Alert/Alert.js.map +1 -1
  3. package/cjs/Badge/Badge.js +4 -4
  4. package/cjs/Badge/Badge.js.map +1 -1
  5. package/cjs/Badge/BadgeAnchor.js.map +1 -1
  6. package/cjs/Banner/Banner.js.map +1 -1
  7. package/cjs/Button/Button.styles.js +9 -9
  8. package/cjs/Button/Button.styles.js.map +1 -1
  9. package/cjs/Checkbox/Checkbox.js +1 -1
  10. package/cjs/Checkbox/Checkbox.js.map +1 -1
  11. package/cjs/Collapse/Collapse.js.map +1 -1
  12. package/cjs/Collapse/CollapsePanel.js +1 -1
  13. package/cjs/DatePicker/generatePicker/generateRangePicker.js +1 -1
  14. package/cjs/DatePicker/generatePicker/generateRangePicker.js.map +1 -1
  15. package/cjs/DatePicker/generatePicker/generateSinglePicker.js +1 -1
  16. package/cjs/DatePicker/generatePicker/generateSinglePicker.js.map +1 -1
  17. package/cjs/Descriptions/Description.js.map +1 -1
  18. package/cjs/Divider/Divider.js +1 -1
  19. package/cjs/Drawer/Drawer.js +1 -1
  20. package/cjs/Drawer/Drawer.js.map +1 -1
  21. package/cjs/Drawer/Drawer.styles.js.map +1 -1
  22. package/cjs/Dropdown/Dropdown.js +1 -1
  23. package/cjs/Dropzone/DropzoneStatus.js.map +1 -1
  24. package/cjs/Entity/Entity.js.map +1 -1
  25. package/cjs/FilterInput/FilterInput.js +1 -1
  26. package/cjs/FilterInput/FilterInput.js.map +1 -1
  27. package/cjs/FilterInput/FilterInput.styles.js.map +1 -1
  28. package/cjs/Form/Form.js +3 -3
  29. package/cjs/Form/FormItem/FormItem.js +3 -3
  30. package/cjs/Form/FormItem/FormItem.js.map +1 -1
  31. package/cjs/Grid/Row.js +3 -3
  32. package/cjs/Grid/Row.js.map +1 -1
  33. package/cjs/Group/Group.js +12 -12
  34. package/cjs/Group/Group.js.map +1 -1
  35. package/cjs/Input/Input.js +1 -1
  36. package/cjs/InputNumber/InputNumber.js +2 -2
  37. package/cjs/Menu/Menu.js.map +1 -1
  38. package/cjs/Menu/MenuButton/MenuButton.js +1 -1
  39. package/cjs/Menu/MenuButton/MenuButton.styles.js.map +1 -1
  40. package/cjs/Modal/Modal.js +1 -1
  41. package/cjs/Modal/Modal.styles.js.map +1 -1
  42. package/cjs/Navs/Navs.js +1 -1
  43. package/cjs/Navs/Navs.styles.js.map +1 -1
  44. package/cjs/Progress/Progress.styles.js.map +1 -1
  45. package/cjs/Radio/Radio.js +9 -9
  46. package/cjs/Radio/Radio.js.map +1 -1
  47. package/cjs/Sheet/Sheet.styles.js +4 -4
  48. package/cjs/Skeleton/Skeleton.js +1 -1
  49. package/cjs/Skeleton/Skeleton.styles.js.map +1 -1
  50. package/cjs/Slider/Slider/Slider.js +1 -1
  51. package/cjs/Slider/Slider/Slider.js.map +1 -1
  52. package/cjs/Slider/SliderRoot/SliderRoot.js +1 -1
  53. package/cjs/Slider/SliderRoot/SliderRoot.js.map +1 -1
  54. package/cjs/Slider/SliderRoot/SliderRoot.styles.js +1 -1
  55. package/cjs/Slider/Thumb/Thumb.js +1 -1
  56. package/cjs/Slider/Track/Track.styles.js +7 -7
  57. package/cjs/StatusDot/StatusDot.js.map +1 -1
  58. package/cjs/Steps/Step/Step.js +1 -1
  59. package/cjs/Steps/Step/Step.styles.js.map +1 -1
  60. package/cjs/Steps/Steps.js +1 -1
  61. package/cjs/Steps/Steps.js.map +1 -1
  62. package/cjs/Steps/Steps.styles.js.map +1 -1
  63. package/cjs/Steps/TabStep/TabStep.js +1 -1
  64. package/cjs/Steps/TabStep/TabStep.styles.js.map +1 -1
  65. package/cjs/Switch/Switch.js +1 -1
  66. package/cjs/Table/BaseTable/BasePagination.js +1 -1
  67. package/cjs/Table/BaseTable/Table.js +2 -2
  68. package/cjs/Table/BaseTable/Table.js.map +1 -1
  69. package/cjs/Table/BaseTable/TableBody.js +1 -1
  70. package/cjs/Table/BaseTable/TableCell.js +1 -1
  71. package/cjs/Table/BaseTable/TableFilteredEmpty/Description.styles.js +2 -2
  72. package/cjs/Table/BaseTable/TableHead.js +1 -1
  73. package/cjs/Table/DataTable/Table.js.map +1 -1
  74. package/cjs/Table/DataTable/Toolbar.js +1 -1
  75. package/cjs/Tabs/Tabs.js +1 -1
  76. package/cjs/Tabs/Tabs.js.map +1 -1
  77. package/cjs/Tabs/Tabs.styles.js.map +1 -1
  78. package/cjs/Tag/Tag.js.map +1 -1
  79. package/cjs/Textarea/Textarea.js +2 -2
  80. package/cjs/Textarea/Textarea.js.map +1 -1
  81. package/cjs/Tooltip/Tooltip.styles.js.map +1 -1
  82. package/cjs/TypeSelect/TypeSelect.js +1 -1
  83. package/cjs/TypeSelect/TypeSelect.styles.js.map +1 -1
  84. package/cjs/theme/ThemeProvider.js.map +1 -1
  85. package/cjs/theme/presets/dark.js.map +1 -1
  86. package/cjs/utils/forwardRef.js.map +1 -1
  87. package/cjs/utils/types.js.map +1 -1
  88. package/esm/ActionConfirm/ActionConfirm.js.map +1 -1
  89. package/esm/Alert/Alert.js +4 -4
  90. package/esm/Alert/Alert.js.map +1 -1
  91. package/esm/Badge/Badge.js +3 -3
  92. package/esm/Badge/Badge.js.map +1 -1
  93. package/esm/Badge/BadgeAnchor.js +8 -8
  94. package/esm/Badge/BadgeAnchor.js.map +1 -1
  95. package/esm/Banner/Banner.js +5 -5
  96. package/esm/Banner/Banner.js.map +1 -1
  97. package/esm/Card/Card.js +3 -3
  98. package/esm/Card/Card.js.map +1 -1
  99. package/esm/Center/Center.js +2 -2
  100. package/esm/Center/Center.js.map +1 -1
  101. package/esm/Checkbox/Checkbox.js.map +1 -1
  102. package/esm/Collapse/Collapse.js +1 -1
  103. package/esm/Collapse/Collapse.js.map +1 -1
  104. package/esm/Collapse/CollapsePanel.js.map +1 -1
  105. package/esm/Container/Container.js +4 -4
  106. package/esm/Container/Container.js.map +1 -1
  107. package/esm/DatePicker/generatePicker/generateRangePicker.js +1 -1
  108. package/esm/DatePicker/generatePicker/generateRangePicker.js.map +1 -1
  109. package/esm/DatePicker/generatePicker/generateSinglePicker.js +1 -1
  110. package/esm/DatePicker/generatePicker/generateSinglePicker.js.map +1 -1
  111. package/esm/Descriptions/Description.js.map +1 -1
  112. package/esm/Divider/Divider.js.map +1 -1
  113. package/esm/Drawer/Drawer.js +1 -1
  114. package/esm/Drawer/Drawer.js.map +1 -1
  115. package/esm/Drawer/Drawer.styles.js.map +1 -1
  116. package/esm/Dropdown/Dropdown.js +2 -2
  117. package/esm/Dropdown/Dropdown.js.map +1 -1
  118. package/esm/Dropzone/Dropzone.styles.js.map +1 -1
  119. package/esm/Dropzone/DropzoneStatus.js.map +1 -1
  120. package/esm/Empty/Empty.js +1 -1
  121. package/esm/Empty/Empty.js.map +1 -1
  122. package/esm/Entity/Entity.js.map +1 -1
  123. package/esm/Entity/Field.js.map +1 -1
  124. package/esm/FilterInput/FilterInput.js +1 -1
  125. package/esm/FilterInput/FilterInput.js.map +1 -1
  126. package/esm/FilterInput/FilterInput.styles.js +3 -3
  127. package/esm/FilterInput/FilterInput.styles.js.map +1 -1
  128. package/esm/Form/Form.js +3 -3
  129. package/esm/Form/Form.js.map +1 -1
  130. package/esm/Form/FormItem/FormItem.js +4 -4
  131. package/esm/Form/FormItem/FormItem.js.map +1 -1
  132. package/esm/Grid/Col.js +5 -5
  133. package/esm/Grid/Col.js.map +1 -1
  134. package/esm/Grid/Row.js +4 -4
  135. package/esm/Grid/Row.js.map +1 -1
  136. package/esm/Group/Group.js +2 -2
  137. package/esm/Group/Group.js.map +1 -1
  138. package/esm/Input/Input.js +1 -1
  139. package/esm/Input/Input.js.map +1 -1
  140. package/esm/InputNumber/InputNumber.js.map +1 -1
  141. package/esm/Loading/loaders/Circle.js +2 -2
  142. package/esm/Loading/loaders/Circle.js.map +1 -1
  143. package/esm/Menu/Menu.js.map +1 -1
  144. package/esm/Menu/MenuButton/MenuButton.js +1 -1
  145. package/esm/Modal/ConfirmDialog/ConfirmDialog.js.map +1 -1
  146. package/esm/Modal/Modal.js +1 -1
  147. package/esm/Modal/Modal.js.map +1 -1
  148. package/esm/Modal/Modal.styles.js.map +1 -1
  149. package/esm/Navs/Navs.js +1 -1
  150. package/esm/Navs/Navs.js.map +1 -1
  151. package/esm/Navs/Navs.styles.js.map +1 -1
  152. package/esm/Progress/Progress.styles.js +8 -8
  153. package/esm/Progress/Progress.styles.js.map +1 -1
  154. package/esm/Radio/Radio.js +6 -6
  155. package/esm/Radio/Radio.js.map +1 -1
  156. package/esm/Select/Select.styles.js.map +1 -1
  157. package/esm/Sheet/Sheet.styles.js.map +1 -1
  158. package/esm/ShowMore/ShowMore.js +2 -2
  159. package/esm/ShowMore/ShowMore.js.map +1 -1
  160. package/esm/Skeleton/Skeleton.js +1 -1
  161. package/esm/Skeleton/Skeleton.js.map +1 -1
  162. package/esm/Slider/Marks/Marks.style.js +3 -3
  163. package/esm/Slider/Marks/Marks.style.js.map +1 -1
  164. package/esm/Slider/Slider/Slider.js +1 -1
  165. package/esm/Slider/Slider/Slider.js.map +1 -1
  166. package/esm/Slider/SliderRoot/SliderRoot.js +1 -1
  167. package/esm/Slider/SliderRoot/SliderRoot.js.map +1 -1
  168. package/esm/Slider/SliderRoot/SliderRoot.styles.js.map +1 -1
  169. package/esm/Slider/Thumb/Thumb.js +1 -1
  170. package/esm/Slider/Thumb/Thumb.js.map +1 -1
  171. package/esm/Slider/Thumb/Thumb.styles.js.map +1 -1
  172. package/esm/SliderConfirm/SliderConfirm.styles.js.map +1 -1
  173. package/esm/Snippet/Snippet.js.map +1 -1
  174. package/esm/StatusDot/StatusDot.js +6 -6
  175. package/esm/StatusDot/StatusDot.js.map +1 -1
  176. package/esm/Steps/Step/Step.js +1 -1
  177. package/esm/Steps/Step/Step.js.map +1 -1
  178. package/esm/Steps/Step/Step.styles.js.map +1 -1
  179. package/esm/Steps/Steps.js +1 -1
  180. package/esm/Steps/Steps.js.map +1 -1
  181. package/esm/Steps/Steps.styles.js.map +1 -1
  182. package/esm/Steps/TabStep/TabStep.js +1 -1
  183. package/esm/Steps/TabStep/TabStep.js.map +1 -1
  184. package/esm/Steps/TabStep/TabStep.styles.js.map +1 -1
  185. package/esm/Switch/Switch.js +1 -1
  186. package/esm/Switch/Switch.js.map +1 -1
  187. package/esm/Switch/Switch.styles.js.map +1 -1
  188. package/esm/Table/BaseTable/BasePagination.js +2 -2
  189. package/esm/Table/BaseTable/BasePagination.js.map +1 -1
  190. package/esm/Table/BaseTable/Table.js +2 -2
  191. package/esm/Table/BaseTable/Table.js.map +1 -1
  192. package/esm/Table/BaseTable/TableBody.js +1 -1
  193. package/esm/Table/BaseTable/TableBody.js.map +1 -1
  194. package/esm/Table/BaseTable/TableCell.js +1 -1
  195. package/esm/Table/BaseTable/TableEmpty/CreateButton.styles.js.map +1 -1
  196. package/esm/Table/BaseTable/TableEmpty/index.styles.js +2 -2
  197. package/esm/Table/BaseTable/TableEmpty/index.styles.js.map +1 -1
  198. package/esm/Table/BaseTable/TableFilteredEmpty/Description.styles.js.map +1 -1
  199. package/esm/Table/BaseTable/TableHead.js +1 -1
  200. package/esm/Table/BaseTable/TableHead.js.map +1 -1
  201. package/esm/Table/BaseTable/Toolbar/index.styles.js.map +1 -1
  202. package/esm/Table/DataTable/Table.js +1 -1
  203. package/esm/Table/DataTable/Table.js.map +1 -1
  204. package/esm/Table/DataTable/Toolbar.js.map +1 -1
  205. package/esm/Tabs/Tabs.js +1 -1
  206. package/esm/Tabs/Tabs.js.map +1 -1
  207. package/esm/Tabs/Tabs.styles.js.map +1 -1
  208. package/esm/Tag/Tag.js +1 -1
  209. package/esm/Tag/Tag.js.map +1 -1
  210. package/esm/Text/Text.js +2 -2
  211. package/esm/Text/Text.js.map +1 -1
  212. package/esm/Textarea/Textarea.js +1 -1
  213. package/esm/Textarea/Textarea.js.map +1 -1
  214. package/esm/Tooltip/Tooltip.styles.js.map +1 -1
  215. package/esm/TypeSelect/TypeSelect.js +1 -1
  216. package/esm/TypeSelect/TypeSelect.js.map +1 -1
  217. package/esm/TypeSelect/TypeSelect.styles.js.map +1 -1
  218. package/esm/utils/forwardRef.js.map +1 -1
  219. package/esm/utils/types.js.map +1 -1
  220. package/lib/src/Drawer/Drawer.d.ts +1 -1
  221. package/lib/src/Drawer/Drawer.d.ts.map +1 -1
  222. package/lib/src/Dropzone/Dropzone.d.ts +3 -3
  223. package/lib/src/Dropzone/DropzoneStatus.d.ts +3 -3
  224. package/lib/src/Dropzone/DropzoneStatus.d.ts.map +1 -1
  225. package/lib/src/Form/FormItem/FormItem.d.ts.map +1 -1
  226. package/lib/src/Menu/Menu.d.ts.map +1 -1
  227. package/lib/src/Select/Select.styles.d.ts +1 -1
  228. package/lib/src/Select/iconUtil.d.ts +1 -1
  229. package/lib/src/Sheet/Sheet.d.ts +2 -2
  230. package/lib/src/Sheet/Sheet.d.ts.map +1 -1
  231. package/lib/src/Slider/SliderRoot/SliderRoot.d.ts.map +1 -1
  232. package/lib/src/Steps/Step/Step.styles.d.ts.map +1 -1
  233. package/lib/src/Steps/Steps.d.ts.map +1 -1
  234. package/lib/src/Table/DataTable/Table.d.ts +1 -57
  235. package/lib/src/Table/DataTable/Table.d.ts.map +1 -1
  236. package/lib/src/Table/DataTable/interfaces.d.ts +56 -1
  237. package/lib/src/Table/DataTable/interfaces.d.ts.map +1 -1
  238. package/lib/src/utils/types.d.ts +4 -3
  239. package/lib/src/utils/types.d.ts.map +1 -1
  240. package/lib/tsconfig.tsbuildinfo +1 -1
  241. package/package.json +6 -6
@@ -1,2 +1,2 @@
1
- import c,{Children as H,cloneElement as K}from"react";import v from"classnames";import T from"../utils/forwardRef.js";import{StepCompleted as I}from"./StepCompleted/StepCompleted.js";import{StepCompleted as pe}from"./StepCompleted/StepCompleted.js";import{StepsSeparator as Z,StepsRoot as J,StepsWrapper as L,StepsContent as M}from"./Steps.styles.js";var Q=Object.defineProperty,m=Object.getOwnPropertySymbols,N=Object.prototype.hasOwnProperty,P=Object.prototype.propertyIsEnumerable,k=(e,o,t)=>o in e?Q(e,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[o]=t,U=(e,o)=>{for(var t in o||(o={}))N.call(o,t)&&k(e,t,o[t]);if(m)for(var t of m(o))P.call(o,t)&&k(e,t,o[t]);return e},V=(e,o)=>{var t={};for(var r in e)N.call(e,r)&&o.indexOf(r)<0&&(t[r]=e[r]);if(e!=null&&m)for(var r of m(e))o.indexOf(r)<0&&P.call(e,r)&&(t[r]=e[r]);return t};const w=T((e,o)=>{var t=e,{className:r,children:j,onStepClick:l,active:p,completedIcon:O,progressIcon:z,color:E,iconSize:x,contentPadding:X,size:_,radius:$,orientation:d,breakpoint:Y,iconPosition:R,classNames:A,variant:f="default",styles:W}=t,q=V(t,["className","children","onStepClick","active","completedIcon","progressIcon","color","iconSize","contentPadding","size","radius","orientation","breakpoint","iconPosition","classNames","variant","styles"]),S,u,y;const b=H.toArray(j),i=b.filter(n=>n.type!==I),C=b.find(n=>n.type===I),B=i.reduce((n,a,s)=>{const h=typeof a.props.allowStepSelect=="boolean"?a.props.allowStepSelect:typeof l=="function",G=a.props.state||(p===s?"stepProgress":p>s?"stepCompleted":"stepInactive");return n.push(K(a,{__staticSelector:"Stepper",icon:a.props.icon||s+1,key:s,state:G,onClick:()=>h&&typeof l=="function"&&l(s),allowStepClick:h&&typeof l=="function",completedIcon:a.props.completedIcon||O,progressIcon:a.props.progressIcon||z,color:a.props.color||E,iconSize:x,size:_,radius:$,classNames:A,styles:W,iconPosition:a.props.iconPosition||R,orientation:d,variant:f})),s!==i.length-1&&f==="default"&&n.push(c.createElement(Z,{className:v("step-separator",{"is-active":s<p}),$active:s<p,$vertical:d==="vertical",key:`separator-${s}`})),n},[]),D=(u=(S=i[p])==null?void 0:S.props)==null?void 0:u.children,F=(y=C==null?void 0:C.props)==null?void 0:y.children,g=p>i.length-1?F:D;return c.createElement(J,U({ref:o,className:v("steps-root",r,{"steps-vertical":d==="vertical"})},q),c.createElement(L,{className:v("steps-wrapper",{"steps-tab":f==="tab"})},B),g&&c.createElement(M,{className:"steps-content"},g))});w.displayName="@kubed/components/Steps";export{pe as StepCompleted,w as Steps};
1
+ import l,{cloneElement as K,Children as T}from"react";import u from"classnames";import V from"../utils/forwardRef.js";import{StepCompleted as P}from"./StepCompleted/StepCompleted.js";import{StepCompleted as le}from"./StepCompleted/StepCompleted.js";import{StepsSeparator as J,StepsRoot as L,StepsWrapper as M,StepsContent as Q}from"./Steps.styles.js";var U=Object.defineProperty,m=Object.getOwnPropertySymbols,I=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable,k=(o,t,e)=>t in o?U(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e,X=(o,t)=>{for(var e in t||(t={}))I.call(t,e)&&k(o,e,t[e]);if(m)for(var e of m(t))N.call(t,e)&&k(o,e,t[e]);return o},Y=(o,t)=>{var e={};for(var r in o)I.call(o,r)&&t.indexOf(r)<0&&(e[r]=o[r]);if(o!=null&&m)for(var r of m(o))t.indexOf(r)<0&&N.call(o,r)&&(e[r]=o[r]);return e};function j(o){const t=[];return T.forEach(o,e=>{if(l.isValidElement(e)){if(e.type===l.Fragment){t.push(...j(e.props.children));return}t.push(e)}}),t}const w=V((o,t)=>{var e=o,{className:r,children:E,onStepClick:i,active:p,completedIcon:O,progressIcon:z,color:x,iconSize:_,contentPadding:Z,size:$,radius:R,orientation:d,breakpoint:ee,iconPosition:F,classNames:W,variant:f="default",styles:q}=e,A=Y(e,["className","children","onStepClick","active","completedIcon","progressIcon","color","iconSize","contentPadding","size","radius","orientation","breakpoint","iconPosition","classNames","variant","styles"]),v,S,y;const b=j(E),c=b.filter(n=>n.type!==P),h=b.find(n=>n.type===P),B=c.reduce((n,s,a)=>{const g=typeof s.props.allowStepSelect=="boolean"?s.props.allowStepSelect:typeof i=="function",H=s.props.state||(p===a?"stepProgress":p>a?"stepCompleted":"stepInactive");return n.push(K(s,{__staticSelector:"Stepper",icon:s.props.icon||a+1,key:a,state:H,onClick:()=>g&&typeof i=="function"&&i(a),allowStepClick:g&&typeof i=="function",completedIcon:s.props.completedIcon||O,progressIcon:s.props.progressIcon||z,color:s.props.color||x,iconSize:_,size:$,radius:R,classNames:W,styles:q,iconPosition:s.props.iconPosition||F,orientation:d,variant:f})),a!==c.length-1&&f==="default"&&n.push(l.createElement(J,{className:u("step-separator",{"is-active":a<p}),$active:a<p,$vertical:d==="vertical",key:`separator-${a}`})),n},[]),D=(S=(v=c[p])==null?void 0:v.props)==null?void 0:S.children,G=(y=h==null?void 0:h.props)==null?void 0:y.children,C=p>c.length-1?G:D;return l.createElement(L,X({ref:t,className:u("steps-root",r,{"steps-vertical":d==="vertical"})},A),l.createElement(M,{className:u("steps-wrapper",{"steps-tab":f==="tab"})},B),C&&l.createElement(Q,{className:"steps-content"},C))});w.displayName="@kubed/components/Steps";export{le as StepCompleted,w as Steps};
2
2
  //# sourceMappingURL=Steps.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Steps.js","sources":["../../src/Steps/Steps.tsx"],"sourcesContent":["import React, { Children, cloneElement } from 'react';\nimport cx from 'classnames';\nimport forwardRef from '../utils/forwardRef';\nimport { DefaultProps, KubedNumberSize, KubedSizes } from '../theme';\nimport { Step } from './Step/Step';\nimport { TabStep } from './TabStep/TabStep';\nimport { StepCompleted } from './StepCompleted/StepCompleted';\nimport { StepsRoot, StepsContent, StepsSeparator, StepsWrapper } from './Steps.styles';\n\nexport interface StepsProps extends DefaultProps {\n /** <Stepper.Step /> components only */\n children: React.ReactNode;\n\n /** Called when step is clicked */\n onStepClick?(stepIndex: number): void;\n\n /** Active step index */\n active: number;\n\n /** Step icon displayed when step is completed */\n completedIcon?: React.ReactNode;\n\n /** Step icon displayed when step is in progress */\n progressIcon?: React.ReactNode;\n\n /** Active and progress Step colors from theme.colors */\n color?: string | 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'error';\n\n /** Step icon size in px */\n iconSize?: number;\n\n /** Content padding-top from theme.spacing or number to set value in px */\n contentPadding?: KubedNumberSize;\n\n /** Component orientation */\n orientation?: 'vertical' | 'horizontal';\n\n /** Icon position relative to step body */\n iconPosition?: 'right' | 'left';\n\n /** Component size */\n size?: KubedSizes;\n\n /** Radius from theme.radius, or number to set border-radius in px */\n radius?: KubedNumberSize;\n\n /** Breakpoint at which orientation will change from horizontal to vertical */\n breakpoint?: KubedNumberSize;\n\n variant?: 'default' | 'tab';\n}\n\nexport const Steps = forwardRef<StepsProps, 'div'>(\n (\n {\n className,\n children,\n onStepClick,\n active,\n completedIcon,\n progressIcon,\n color,\n iconSize,\n contentPadding,\n size,\n radius,\n orientation,\n breakpoint,\n iconPosition,\n classNames,\n variant = 'default',\n styles,\n ...rest\n },\n ref\n ) => {\n const convertedChildren = Children.toArray(children) as React.ReactElement[];\n const _children = convertedChildren.filter((child) => child.type !== StepCompleted);\n const completedStep = convertedChildren.find((item) => item.type === StepCompleted);\n\n const items = _children.reduce<React.ReactElement[]>((acc, item, index) => {\n const shouldAllowSelect =\n typeof item.props.allowStepSelect === 'boolean'\n ? item.props.allowStepSelect\n : typeof onStepClick === 'function';\n\n const itemState =\n item.props.state ||\n (active === index ? 'stepProgress' : active > index ? 'stepCompleted' : 'stepInactive');\n\n acc.push(\n cloneElement(item, {\n __staticSelector: 'Stepper',\n icon: item.props.icon || index + 1,\n key: index,\n state: itemState,\n onClick: () =>\n shouldAllowSelect && typeof onStepClick === 'function' && onStepClick(index),\n allowStepClick: shouldAllowSelect && typeof onStepClick === 'function',\n completedIcon: item.props.completedIcon || completedIcon,\n progressIcon: item.props.progressIcon || progressIcon,\n color: item.props.color || color,\n iconSize,\n size,\n radius,\n classNames,\n styles,\n iconPosition: item.props.iconPosition || iconPosition,\n orientation,\n variant,\n })\n );\n\n if (index !== _children.length - 1 && variant === 'default') {\n acc.push(\n <StepsSeparator\n className={cx('step-separator', { 'is-active': index < active })}\n $active={index < active}\n $vertical={orientation === 'vertical'}\n key={`separator-${index}`}\n />\n );\n }\n\n return acc;\n }, []);\n\n const stepContent = _children[active]?.props?.children;\n const completedContent = completedStep?.props?.children;\n const content = active > _children.length - 1 ? completedContent : stepContent;\n\n return (\n <StepsRoot\n ref={ref}\n className={cx('steps-root', className, { 'steps-vertical': orientation === 'vertical' })}\n {...rest}\n >\n <StepsWrapper className={cx('steps-wrapper', { 'steps-tab': variant === 'tab' })}>\n {items}\n </StepsWrapper>\n {content && <StepsContent className=\"steps-content\">{content}</StepsContent>}\n </StepsRoot>\n );\n }\n);\n\nexport { Step, StepCompleted, TabStep };\n\n// Steps.Step = Step;\n// Steps.Completed = StepCompleted;\nSteps.displayName = '@kubed/components/Steps';\n"],"names":["M","J","u","L","l","X","U","Y","V"],"mappings":";;;;;;;AAAA,IAAI,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,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AAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAOD,UAAC,CAAC,aAAa,CAACE,SAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAACF,UAAC,CAAC,aAAa,CAACG,YAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,WAAW,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAEH,UAAC,CAAC,aAAa,CAACI,YAAC,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAoD,KAAK,CAAC,WAAW,CAAC,yBAAyB;;;;"}
1
+ {"version":3,"file":"Steps.js","sources":["../../src/Steps/Steps.tsx"],"sourcesContent":["import React, { Children, cloneElement } from 'react';\nimport cx from 'classnames';\nimport forwardRef from '../utils/forwardRef';\nimport { DefaultProps, KubedNumberSize, KubedSizes } from '../theme';\nimport { Step } from './Step/Step';\nimport { TabStep } from './TabStep/TabStep';\nimport { StepCompleted } from './StepCompleted/StepCompleted';\nimport { StepsRoot, StepsContent, StepsSeparator, StepsWrapper } from './Steps.styles';\n\nexport interface StepsProps extends DefaultProps {\n /** <Stepper.Step /> components only */\n children: React.ReactNode;\n\n /** Called when step is clicked */\n onStepClick?(stepIndex: number): void;\n\n /** Active step index */\n active: number;\n\n /** Step icon displayed when step is completed */\n completedIcon?: React.ReactNode;\n\n /** Step icon displayed when step is in progress */\n progressIcon?: React.ReactNode;\n\n /** Active and progress Step colors from theme.colors */\n color?: string | 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'error';\n\n /** Step icon size in px */\n iconSize?: number;\n\n /** Content padding-top from theme.spacing or number to set value in px */\n contentPadding?: KubedNumberSize;\n\n /** Component orientation */\n orientation?: 'vertical' | 'horizontal';\n\n /** Icon position relative to step body */\n iconPosition?: 'right' | 'left';\n\n /** Component size */\n size?: KubedSizes;\n\n /** Radius from theme.radius, or number to set border-radius in px */\n radius?: KubedNumberSize;\n\n /** Breakpoint at which orientation will change from horizontal to vertical */\n breakpoint?: KubedNumberSize;\n\n variant?: 'default' | 'tab';\n}\n\nfunction getElementChildren(children: React.ReactNode): React.ReactElement<any>[] {\n const elements: React.ReactElement<any>[] = [];\n\n Children.forEach(children, (child) => {\n if (!React.isValidElement(child)) {\n return;\n }\n\n if (child.type === React.Fragment) {\n elements.push(\n ...getElementChildren((child.props as { children?: React.ReactNode }).children)\n );\n return;\n }\n\n elements.push(child);\n });\n\n return elements;\n}\n\nexport const Steps = forwardRef<StepsProps, 'div'>(\n (\n {\n className,\n children,\n onStepClick,\n active,\n completedIcon,\n progressIcon,\n color,\n iconSize,\n contentPadding,\n size,\n radius,\n orientation,\n breakpoint,\n iconPosition,\n classNames,\n variant = 'default',\n styles,\n ...rest\n },\n ref\n ) => {\n const convertedChildren = getElementChildren(children);\n const _children = convertedChildren.filter((child) => child.type !== StepCompleted);\n const completedStep = convertedChildren.find((item) => item.type === StepCompleted);\n\n const items = _children.reduce<React.ReactElement[]>(\n (acc, item: React.ReactElement<any>, index) => {\n const shouldAllowSelect =\n typeof item.props.allowStepSelect === 'boolean'\n ? item.props.allowStepSelect\n : typeof onStepClick === 'function';\n\n const itemState =\n item.props.state ||\n (active === index ? 'stepProgress' : active > index ? 'stepCompleted' : 'stepInactive');\n\n acc.push(\n cloneElement(item, {\n __staticSelector: 'Stepper',\n icon: item.props.icon || index + 1,\n key: index,\n state: itemState,\n onClick: () =>\n shouldAllowSelect && typeof onStepClick === 'function' && onStepClick(index),\n allowStepClick: shouldAllowSelect && typeof onStepClick === 'function',\n completedIcon: item.props.completedIcon || completedIcon,\n progressIcon: item.props.progressIcon || progressIcon,\n color: item.props.color || color,\n iconSize,\n size,\n radius,\n classNames,\n styles,\n iconPosition: item.props.iconPosition || iconPosition,\n orientation,\n variant,\n })\n );\n\n if (index !== _children.length - 1 && variant === 'default') {\n acc.push(\n <StepsSeparator\n className={cx('step-separator', { 'is-active': index < active })}\n $active={index < active}\n $vertical={orientation === 'vertical'}\n key={`separator-${index}`}\n />\n );\n }\n\n return acc;\n },\n []\n );\n\n const stepContent = _children[active]?.props?.children;\n const completedContent = completedStep?.props?.children;\n const content = active > _children.length - 1 ? completedContent : stepContent;\n\n return (\n <StepsRoot\n ref={ref}\n className={cx('steps-root', className, { 'steps-vertical': orientation === 'vertical' })}\n {...rest}\n >\n <StepsWrapper className={cx('steps-wrapper', { 'steps-tab': variant === 'tab' })}>\n {items}\n </StepsWrapper>\n {content && <StepsContent className=\"steps-content\">{content}</StepsContent>}\n </StepsRoot>\n );\n }\n);\n\nexport { Step, StepCompleted, TabStep };\n\n// Steps.Step = Step;\n// Steps.Completed = StepCompleted;\nSteps.displayName = '@kubed/components/Steps';\n"],"names":["J","c","M","f","L","Y","u","U","Z","X"],"mappings":";;;;;;;AAAA,IAAI,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,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AC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAEL,UAAC,CAAC,aAAa,CAACQ,YAAC,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAoD,KAAK,CAAC,WAAW,CAAC,yBAAyB;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Steps.styles.js","sources":["../../src/Steps/Steps.styles.ts"],"sourcesContent":["import styled, { css } from 'styled-components';\n\nexport const StepsRoot = styled.div`\n &.steps-vertical {\n display: flex;\n\n .steps-wrapper {\n flex-direction: column;\n align-items: unset;\n }\n\n .steps-tab {\n flex-direction: column;\n height: auto;\n align-items: flex-start;\n padding: 12px 0 12px 12px;\n }\n\n .steps-content {\n padding-top: 0;\n padding-left: 16px;\n }\n }\n`;\n\nexport const StepsWrapper = styled.div`\n display: flex;\n align-items: center;\n\n &.steps-tab {\n background-color: ${({ theme }) => theme.palette.accents_1};\n height: 64px;\n padding: 0 20px;\n }\n`;\n\nexport const StepsContent = styled.div`\n padding-top: 16px;\n`;\n\ninterface SeparatorProps {\n $active: boolean;\n $vertical: boolean;\n}\n\nconst getSeparatorStyles = (vertical) => {\n if (vertical) {\n return css`\n flex: 1;\n margin-left: 15px;\n width: 2px;\n min-height: 24px;\n margin-top: 5px;\n margin-bottom: 8px;\n `;\n }\n return css`\n flex: 1 1 0%;\n height: 2px;\n margin: 0 10px;\n `;\n};\n\nexport const StepsSeparator = styled('div')<SeparatorProps>`\n background-color: ${({ $active, theme }) => ($active ? '#00aa72' : theme.palette.accents_2)};\n ${({ $vertical }) => getSeparatorStyles($vertical)};\n`;\n"],"names":["p"],"mappings":";;AAAuD,MAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,GAAG,CAAC;AACrB;AACA;AACA;AACA;AACA,sBAAsB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AACzD;AACA;AACA;AACA,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,GAAG,CAAC;AACrB;AACA,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAACA,GAAC,CAAC;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,CAAC,CAACA,GAAC,CAAC;AACR;AACA;AACA;AACA,EAAE,CAAC,CAAa,MAAC,cAAc,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AACzC,oBAAoB,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AAC7E,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AAC1B;;;;"}
1
+ {"version":3,"file":"Steps.styles.js","sources":["../../src/Steps/Steps.styles.ts"],"sourcesContent":["import styled, { css } from 'styled-components';\n\nexport const StepsRoot = styled.div`\n &.steps-vertical {\n display: flex;\n\n .steps-wrapper {\n flex-direction: column;\n align-items: unset;\n }\n\n .steps-tab {\n flex-direction: column;\n height: auto;\n align-items: flex-start;\n padding: 12px 0 12px 12px;\n }\n\n .steps-content {\n padding-top: 0;\n padding-left: 16px;\n }\n }\n`;\n\nexport const StepsWrapper = styled.div`\n display: flex;\n align-items: center;\n\n &.steps-tab {\n background-color: ${({ theme }) => theme.palette.accents_1};\n height: 64px;\n padding: 0 20px;\n }\n`;\n\nexport const StepsContent = styled.div`\n padding-top: 16px;\n`;\n\ninterface SeparatorProps {\n $active: boolean;\n $vertical: boolean;\n}\n\nconst getSeparatorStyles = (vertical) => {\n if (vertical) {\n return css`\n flex: 1;\n margin-left: 15px;\n width: 2px;\n min-height: 24px;\n margin-top: 5px;\n margin-bottom: 8px;\n `;\n }\n return css`\n flex: 1 1 0%;\n height: 2px;\n margin: 0 10px;\n `;\n};\n\nexport const StepsSeparator = styled('div')<SeparatorProps>`\n background-color: ${({ $active, theme }) => ($active ? '#00aa72' : theme.palette.accents_2)};\n ${({ $vertical }) => getSeparatorStyles($vertical)};\n`;\n"],"names":["e","p"],"mappings":";;AAAuD,MAAC,SAAS,CAACA,CAAC,CAAC,GAAG,CAAC;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,YAAY,CAACA,CAAC,CAAC,GAAG,CAAC;AACrB;AACA;AACA;AACA;AACA,sBAAsB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AACzD;AACA;AACA;AACA,CAAC,CAAC,YAAY,CAACA,CAAC,CAAC,GAAG,CAAC;AACrB;AACA,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAACC,GAAC,CAAC;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,CAAC,CAACA,GAAC,CAAC;AACR;AACA;AACA;AACA,EAAE,CAAC,CAAa,MAAC,cAAc,CAACD,CAAC,CAAC,KAAK,CAAC,CAAC;AACzC,oBAAoB,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AAC7E,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AAC1B;;;;"}
@@ -1,2 +1,2 @@
1
- import l from"react";import h from"classnames";import{Check as k}from"@kubed/icons";import T from"../../utils/forwardRef.js";import{Loading as S}from"../../Loading/Loading.js";import{StepWrapper as W,StepIconWrapper as _,StepIcon as R,StepCompletedIcon as B,StepBody as K,StepLabel as M,StepDescription as Q}from"./TabStep.styles.js";var $=Object.defineProperty,q=Object.defineProperties,A=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable,v=(e,t,r)=>t in e?$(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,i=(e,t)=>{for(var r in t||(t={}))u.call(t,r)&&v(e,r,t[r]);if(a)for(var r of a(t))g.call(t,r)&&v(e,r,t[r]);return e},F=(e,t)=>q(e,A(t)),G=(e,t)=>{var r={};for(var o in e)u.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&a)for(var o of a(e))t.indexOf(o)<0&&g.call(e,o)&&(r[o]=e[o]);return r};const H={xs:16,sm:18,md:20,lg:22,xl:24},y=T((e,t)=>{var r=e,{className:o,state:s,color:w,icon:c,completedIcon:O,progressIcon:E,label:p,description:n,completedDescription:I,progressDescription:C,withIcon:j=!0,iconSize:P,size:z="md",loading:m,allowStepClick:N=!0,allowStepSelect:J,classNames:x,styles:U}=r,D=G(r,["className","state","color","icon","completedIcon","progressIcon","label","description","completedDescription","progressDescription","withIcon","iconSize","size","loading","allowStepClick","allowStepSelect","classNames","styles"]);const L=s==="stepCompleted"?null:s==="stepProgress"?E:c,d=P||H[z],f={"data-progress":s==="stepProgress"||void 0,"data-completed":s==="stepCompleted"||void 0},b=s==="stepCompleted"?I||n:s==="stepProgress"&&C||n;return l.createElement(W,i(F(i({tabIndex:N?0:-1,ref:t},f),{className:h("step-item",x)}),D),j&&l.createElement(_,null,l.createElement(R,i({},f),s==="stepCompleted"?l.createElement(B,null,m?l.createElement(S,{color:"#fff",size:d,className:"stepLoader"}):c||O||l.createElement(k,{size:24,color:"#fff"})):null,s!=="stepCompleted"?m?l.createElement(S,{size:d,color:w}):L||c:null)),(p||n)&&l.createElement(K,null,p&&l.createElement(M,null,p),b&&l.createElement(Q,{color:"dimmed"},b)))});y.displayName="@kubed/components/TabStep";export{y as TabStep};
1
+ import l from"react";import h from"classnames";import{Check as k}from"@kubed/icons";import T from"../../utils/forwardRef.js";import{Loading as u}from"../../Loading/Loading.js";import{StepWrapper as W,StepIconWrapper as _,StepIcon as R,StepCompletedIcon as B,StepBody as K,StepLabel as M,StepDescription as Q}from"./TabStep.styles.js";var $=Object.defineProperty,q=Object.defineProperties,A=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertySymbols,S=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable,v=(e,t,r)=>t in e?$(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,i=(e,t)=>{for(var r in t||(t={}))S.call(t,r)&&v(e,r,t[r]);if(a)for(var r of a(t))g.call(t,r)&&v(e,r,t[r]);return e},F=(e,t)=>q(e,A(t)),G=(e,t)=>{var r={};for(var o in e)S.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&a)for(var o of a(e))t.indexOf(o)<0&&g.call(e,o)&&(r[o]=e[o]);return r};const H={xs:16,sm:18,md:20,lg:22,xl:24},y=T((e,t)=>{var r=e,{className:o,state:s,color:w,icon:c,completedIcon:O,progressIcon:E,label:p,description:n,completedDescription:I,progressDescription:C,withIcon:P=!0,iconSize:j,size:z="md",loading:m,allowStepClick:N=!0,allowStepSelect:J,classNames:x,styles:U}=r,D=G(r,["className","state","color","icon","completedIcon","progressIcon","label","description","completedDescription","progressDescription","withIcon","iconSize","size","loading","allowStepClick","allowStepSelect","classNames","styles"]);const L=s==="stepCompleted"?null:s==="stepProgress"?E:c,d=j||H[z],f={"data-progress":s==="stepProgress"||void 0,"data-completed":s==="stepCompleted"||void 0},b=s==="stepCompleted"?I||n:s==="stepProgress"&&C||n;return l.createElement(W,i(F(i({tabIndex:N?0:-1,ref:t},f),{className:h("step-item",x)}),D),P&&l.createElement(_,null,l.createElement(R,i({},f),s==="stepCompleted"?l.createElement(B,null,m?l.createElement(u,{color:"#fff",size:d,className:"stepLoader"}):c||O||l.createElement(k,{size:24,color:"#fff"})):null,s!=="stepCompleted"?m?l.createElement(u,{size:d,color:w}):L||c:null)),(p||n)&&l.createElement(K,null,p&&l.createElement(M,null,p),b&&l.createElement(Q,{color:"dimmed"},b)))});y.displayName="@kubed/components/TabStep";export{y as TabStep};
2
2
  //# sourceMappingURL=TabStep.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TabStep.js","sources":["../../../src/Steps/TabStep/TabStep.tsx"],"sourcesContent":["import React from 'react';\nimport cx from 'classnames';\nimport { Check } from '@kubed/icons';\nimport { DefaultProps, KubedNumberSize, KubedSizes } from '../../theme';\nimport forwardRef from '../../utils/forwardRef';\nimport { Loading } from '../../Loading/Loading';\nimport {\n StepWrapper,\n StepIcon,\n StepIconWrapper,\n StepCompletedIcon,\n StepBody,\n StepLabel,\n StepDescription,\n} from './TabStep.styles';\n\nexport interface StepProps extends DefaultProps {\n /** Step state, controlled by Steps component */\n state?: 'stepInactive' | 'stepProgress' | 'stepCompleted';\n\n /** Step color from theme.colors */\n color?: string | 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'error';\n\n /** Should icon be displayed */\n withIcon?: boolean;\n\n /** Step icon, defaults to step index + 1 when rendered within Stepper */\n icon?: React.ReactNode;\n\n /** Step icon displayed when step is completed */\n completedIcon?: React.ReactNode;\n\n /** Step icon displayed when step is in progress */\n progressIcon?: React.ReactNode;\n\n /** Step label, render after icon */\n label?: React.ReactNode;\n\n /** Step description */\n description?: React.ReactNode;\n\n /** Step progress description */\n progressDescription?: React.ReactNode;\n\n /** Step completed description */\n completedDescription?: React.ReactNode;\n\n /** Icon wrapper size in px */\n iconSize?: number;\n\n /** Icon position relative to step body */\n iconPosition?: 'right' | 'left';\n\n /** Component size */\n size?: KubedSizes;\n\n /** Radius from theme.radius, or number to set border-radius in px */\n radius?: KubedNumberSize;\n\n /** Indicates loading state on step */\n loading?: boolean;\n\n /** Set to false to disable clicks on step */\n allowStepClick?: boolean;\n\n /** Should step selection be allowed */\n allowStepSelect?: boolean;\n\n /** Static selector base */\n __staticSelector?: string;\n}\n\nconst defaultIconSizes = {\n xs: 16,\n sm: 18,\n md: 20,\n lg: 22,\n xl: 24,\n};\n\nexport const TabStep = forwardRef<StepProps, 'div'>(\n (\n {\n className,\n state,\n color,\n icon,\n completedIcon,\n progressIcon,\n label,\n description,\n completedDescription,\n progressDescription,\n withIcon = true,\n iconSize,\n size = 'md',\n // radius = 'xl',\n loading,\n allowStepClick = true,\n allowStepSelect,\n // iconPosition = 'left',\n // __staticSelector = 'Step',\n classNames,\n styles,\n ...rest\n },\n ref\n ) => {\n const _icon = state === 'stepCompleted' ? null : state === 'stepProgress' ? progressIcon : icon;\n const _iconSize = iconSize || defaultIconSizes[size];\n\n const dataAttributes = {\n 'data-progress': state === 'stepProgress' || undefined,\n 'data-completed': state === 'stepCompleted' || undefined,\n };\n\n const crtDescription =\n state === 'stepCompleted'\n ? completedDescription || description\n : state === 'stepProgress'\n ? progressDescription || description\n : description;\n\n return (\n <StepWrapper\n tabIndex={allowStepClick ? 0 : -1}\n ref={ref}\n {...dataAttributes}\n className={cx('step-item', classNames)}\n {...rest}\n >\n {withIcon && (\n <StepIconWrapper>\n <StepIcon {...dataAttributes}>\n {state === 'stepCompleted' ? (\n <StepCompletedIcon>\n {loading ? (\n <Loading color=\"#fff\" size={_iconSize} className=\"stepLoader\" />\n ) : (\n icon || completedIcon || <Check size={24} color=\"#fff\" />\n )}\n </StepCompletedIcon>\n ) : null}\n\n {state !== 'stepCompleted' ? (\n loading ? (\n <Loading size={_iconSize} color={color} />\n ) : (\n _icon || icon\n )\n ) : null}\n </StepIcon>\n </StepIconWrapper>\n )}\n\n {(label || description) && (\n <StepBody>\n {label && <StepLabel>{label}</StepLabel>}\n {crtDescription && <StepDescription color=\"dimmed\">{crtDescription}</StepDescription>}\n </StepBody>\n )}\n </StepWrapper>\n );\n }\n);\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CAACJ,UAAC,CAAC,aAAa,CAACK,iBAAC,CAAC,IAAI,CAAC,CAAC,CAACL,UAAC,CAAC,aAAa,CAACM,OAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAEN,UAAC,CAAC,aAAa,CAACO,KAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,eAAe,CAAC,CAAC,CAACP,UAAC,CAAC,aAAa,CAACM,OAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,GAAGN,UAAC,CAAC,aAAa,CAACQ,QAAC,CAAC,IAAI,CAAC,CAAC,EAAER,UAAC,CAAC,aAAa,CAACS,SAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAACV,GAAC,EAAEC,UAAC,CAAC,aAAa,CAACU,eAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAACX,GAAC,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,2BAA2B;;;;"}
1
+ {"version":3,"file":"TabStep.js","sources":["../../../src/Steps/TabStep/TabStep.tsx"],"sourcesContent":["import React from 'react';\nimport cx from 'classnames';\nimport { Check } from '@kubed/icons';\nimport { DefaultProps, KubedNumberSize, KubedSizes } from '../../theme';\nimport forwardRef from '../../utils/forwardRef';\nimport { Loading } from '../../Loading/Loading';\nimport {\n StepWrapper,\n StepIcon,\n StepIconWrapper,\n StepCompletedIcon,\n StepBody,\n StepLabel,\n StepDescription,\n} from './TabStep.styles';\n\nexport interface StepProps extends DefaultProps {\n /** Step state, controlled by Steps component */\n state?: 'stepInactive' | 'stepProgress' | 'stepCompleted';\n\n /** Step color from theme.colors */\n color?: string | 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'error';\n\n /** Should icon be displayed */\n withIcon?: boolean;\n\n /** Step icon, defaults to step index + 1 when rendered within Stepper */\n icon?: React.ReactNode;\n\n /** Step icon displayed when step is completed */\n completedIcon?: React.ReactNode;\n\n /** Step icon displayed when step is in progress */\n progressIcon?: React.ReactNode;\n\n /** Step label, render after icon */\n label?: React.ReactNode;\n\n /** Step description */\n description?: React.ReactNode;\n\n /** Step progress description */\n progressDescription?: React.ReactNode;\n\n /** Step completed description */\n completedDescription?: React.ReactNode;\n\n /** Icon wrapper size in px */\n iconSize?: number;\n\n /** Icon position relative to step body */\n iconPosition?: 'right' | 'left';\n\n /** Component size */\n size?: KubedSizes;\n\n /** Radius from theme.radius, or number to set border-radius in px */\n radius?: KubedNumberSize;\n\n /** Indicates loading state on step */\n loading?: boolean;\n\n /** Set to false to disable clicks on step */\n allowStepClick?: boolean;\n\n /** Should step selection be allowed */\n allowStepSelect?: boolean;\n\n /** Static selector base */\n __staticSelector?: string;\n}\n\nconst defaultIconSizes = {\n xs: 16,\n sm: 18,\n md: 20,\n lg: 22,\n xl: 24,\n};\n\nexport const TabStep = forwardRef<StepProps, 'div'>(\n (\n {\n className,\n state,\n color,\n icon,\n completedIcon,\n progressIcon,\n label,\n description,\n completedDescription,\n progressDescription,\n withIcon = true,\n iconSize,\n size = 'md',\n // radius = 'xl',\n loading,\n allowStepClick = true,\n allowStepSelect,\n // iconPosition = 'left',\n // __staticSelector = 'Step',\n classNames,\n styles,\n ...rest\n },\n ref\n ) => {\n const _icon = state === 'stepCompleted' ? null : state === 'stepProgress' ? progressIcon : icon;\n const _iconSize = iconSize || defaultIconSizes[size];\n\n const dataAttributes = {\n 'data-progress': state === 'stepProgress' || undefined,\n 'data-completed': state === 'stepCompleted' || undefined,\n };\n\n const crtDescription =\n state === 'stepCompleted'\n ? completedDescription || description\n : state === 'stepProgress'\n ? progressDescription || description\n : description;\n\n return (\n <StepWrapper\n tabIndex={allowStepClick ? 0 : -1}\n ref={ref}\n {...dataAttributes}\n className={cx('step-item', classNames)}\n {...rest}\n >\n {withIcon && (\n <StepIconWrapper>\n <StepIcon {...dataAttributes}>\n {state === 'stepCompleted' ? (\n <StepCompletedIcon>\n {loading ? (\n <Loading color=\"#fff\" size={_iconSize} className=\"stepLoader\" />\n ) : (\n icon || completedIcon || <Check size={24} color=\"#fff\" />\n )}\n </StepCompletedIcon>\n ) : null}\n\n {state !== 'stepCompleted' ? (\n loading ? (\n <Loading size={_iconSize} color={color} />\n ) : (\n _icon || icon\n )\n ) : null}\n </StepIcon>\n </StepIconWrapper>\n )}\n\n {(label || description) && (\n <StepBody>\n {label && <StepLabel>{label}</StepLabel>}\n {crtDescription && <StepDescription color=\"dimmed\">{crtDescription}</StepDescription>}\n </StepBody>\n )}\n </StepWrapper>\n );\n }\n);\n\nTabStep.displayName = '@kubed/components/TabStep';\n"],"names":["A","P","p","j","v","E","q","F","I","B","G","H","J"],"mappings":";;;;;;;AAAA,IAAI,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,yBAAyB,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,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AAC,CAAC,CAAC,EAAET,UAAC,CAAC,aAAa,CAACU,eAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,2BAA2B;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"TabStep.styles.js","sources":["../../../src/Steps/TabStep/TabStep.styles.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { KubedTheme, themeUtils } from '../../theme';\n\nexport const StepWrapper = styled.div`\n display: flex;\n flex-direction: row;\n cursor: pointer;\n align-items: center;\n text-align: left;\n min-width: 180px;\n height: 100%;\n padding: 12px 15px;\n &[data-progress='true'] {\n background-color: ${({ theme }) => theme.palette.background};\n }\n`;\n\nexport const StepBody = styled.div`\n margin-left: 12px;\n display: flex;\n flex-direction: column;\n`;\n\nexport const StepLabel = styled.div`\n font-size: 12px;\n font-weight: 700;\n line-height: 1.67;\n text-align: left;\n color: ${({ theme }) => theme.palette.accents_8};\n`;\n\nexport const StepDescription = styled.div`\n text-align: left;\n line-height: 1.67;\n color: ${({ theme }) => theme.palette.accents_5};\n`;\n\nexport const StepIcon = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n font-weight: 700;\n width: 40px;\n height: 40px;\n min-height: 40px;\n //border-radius: 32px;\n font-size: 16px;\n //border: 2px solid ${({ theme }) => theme.palette.accents_2};\n transition: background-color 150ms ease, border-color 150ms ease;\n //background-color: ${({ theme }) => theme.palette.accents_2};\n color: ${({ theme }) => theme.palette.accents_7};\n &[data-progress='true'] {\n &:after {\n border-color: ${({ theme }) => themeUtils.getPrimaryColor(theme)};\n }\n }\n &[data-completed='true'] {\n color: #fff;\n &:after {\n border-color: ${({ theme }) => themeUtils.getPrimaryColor(theme)};\n background-color: ${({ theme }) => themeUtils.getPrimaryColor(theme)};\n }\n }\n\n .kubed-icon {\n width: 40px;\n height: 40px;\n }\n\n &:after {\n position: absolute;\n right: 0;\n bottom: 0;\n content: ' ';\n border: 2px solid ${({ theme }) => theme.palette.accents_3};\n background-color: ${({ theme }) => theme.palette.background};\n display: block;\n width: 12px;\n height: 12px;\n border-radius: 50%;\n }\n`;\n\nexport const StepIconWrapper = styled.div`\n position: relative;\n overflow: hidden;\n flex-shrink: 0;\n`;\n\nexport const StepCompletedIcon = styled.div`\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n color: #fff;\n inset: 0;\n`;\n"],"names":["t","o"],"mappings":";;;AAAsF,MAAC,WAAW,CAACA,CAAC,CAAC,GAAG,CAAC;AACzG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;AAC1D;AACA,CAAC,CAAC,QAAQ,CAACA,CAAC,CAAC,GAAG,CAAC;AACjB;AACA;AACA;AACA,CAAC,CAAC,SAAS,CAACA,CAAC,CAAC,GAAG,CAAC;AAClB;AACA;AACA;AACA;AACA,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AAC5C,CAAC,CAAC,eAAe,CAACA,CAAC,CAAC,GAAG,CAAC;AACxB;AACA;AACA,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AAC5C,CAAC,CAAC,QAAQ,CAACA,CAAC,CAAC,GAAG,CAAC;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AACzD;AACA,sBAAsB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AACzD,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AAC5C;AACA;AACA,oBAAoB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAGC,GAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;AACxD;AACA;AACA;AACA;AACA;AACA,oBAAoB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAGA,GAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;AACxD,wBAAwB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAGA,GAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AACzD,sBAAsB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;AAC1D;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,eAAe,CAACD,CAAC,CAAC,GAAG,CAAC;AACxB;AACA;AACA;AACA,CAAC,CAAC,iBAAiB,CAACA,CAAC,CAAC,GAAG,CAAC;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;;;;"}
1
+ {"version":3,"file":"TabStep.styles.js","sources":["../../../src/Steps/TabStep/TabStep.styles.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { themeUtils } from '../../theme';\n\nexport const StepWrapper = styled.div`\n display: flex;\n flex-direction: row;\n cursor: pointer;\n align-items: center;\n text-align: left;\n min-width: 180px;\n height: 100%;\n padding: 12px 15px;\n &[data-progress='true'] {\n background-color: ${({ theme }) => theme.palette.background};\n }\n`;\n\nexport const StepBody = styled.div`\n margin-left: 12px;\n display: flex;\n flex-direction: column;\n`;\n\nexport const StepLabel = styled.div`\n font-size: 12px;\n font-weight: 700;\n line-height: 1.67;\n text-align: left;\n color: ${({ theme }) => theme.palette.accents_8};\n`;\n\nexport const StepDescription = styled.div`\n text-align: left;\n line-height: 1.67;\n color: ${({ theme }) => theme.palette.accents_5};\n`;\n\nexport const StepIcon = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n font-weight: 700;\n width: 40px;\n height: 40px;\n min-height: 40px;\n //border-radius: 32px;\n font-size: 16px;\n //border: 2px solid ${({ theme }) => theme.palette.accents_2};\n transition: background-color 150ms ease, border-color 150ms ease;\n //background-color: ${({ theme }) => theme.palette.accents_2};\n color: ${({ theme }) => theme.palette.accents_7};\n &[data-progress='true'] {\n &:after {\n border-color: ${({ theme }) => themeUtils.getPrimaryColor(theme)};\n }\n }\n &[data-completed='true'] {\n color: #fff;\n &:after {\n border-color: ${({ theme }) => themeUtils.getPrimaryColor(theme)};\n background-color: ${({ theme }) => themeUtils.getPrimaryColor(theme)};\n }\n }\n\n .kubed-icon {\n width: 40px;\n height: 40px;\n }\n\n &:after {\n position: absolute;\n right: 0;\n bottom: 0;\n content: ' ';\n border: 2px solid ${({ theme }) => theme.palette.accents_3};\n background-color: ${({ theme }) => theme.palette.background};\n display: block;\n width: 12px;\n height: 12px;\n border-radius: 50%;\n }\n`;\n\nexport const StepIconWrapper = styled.div`\n position: relative;\n overflow: hidden;\n flex-shrink: 0;\n`;\n\nexport const StepCompletedIcon = styled.div`\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n color: #fff;\n inset: 0;\n`;\n"],"names":["e","o"],"mappings":";;;AAAsF,MAAC,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC;AACzG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;AAC1D;AACA,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC;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,CAAC,OAAO,CAAC,SAAS,CAAC;AACzD,sBAAsB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;AAC1D;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,GAAG,CAAC;AACxB;AACA;AACA;AACA,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,GAAG,CAAC;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;;;;"}
@@ -1,2 +1,2 @@
1
- import c from"react";import O from"classnames";import{useId as j,useUncontrolled as T}from"@kubed/hooks";import{isUndefined as I}from"lodash";import W from"../utils/forwardRef.js";import{StyledButton as P,ButtonControl as B,StyledInput as m,SwitchWrap as F,SwitchControl as N,TextWrap as U,LabelWrap as V}from"./Switch.styles.js";var _=Object.defineProperty,d=Object.getOwnPropertySymbols,b=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable,k=(e,r,t)=>r in e?_(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,A=(e,r)=>{for(var t in r||(r={}))b.call(r,t)&&k(e,t,r[t]);if(d)for(var t of d(r))p.call(r,t)&&k(e,t,r[t]);return e},L=(e,r)=>{var t={};for(var a in e)b.call(e,a)&&r.indexOf(a)<0&&(t[a]=e[a]);if(e!=null&&d)for(var a of d(e))r.indexOf(a)<0&&p.call(e,a)&&(t[a]=e[a]);return t};const v=W((e,r)=>{var t=e,{id:a,defaultChecked:y,checked:w,disabled:i,onChange:s,okText:x,offText:g,label:f,variant:E="default"}=t,S=L(t,["id","defaultChecked","checked","disabled","onChange","okText","offText","label","variant"]);const o=j(a),[l,C]=T({value:w,defaultValue:y,finalValue:!1,rule:n=>!I(n),onChange:()=>{}}),h=n=>{if(i)return;const u=n.target.checked;C(u),s&&s(u,n)};return E==="button"?c.createElement(P,{radius:"xl",variant:"filled",forwardedAs:"label",color:l?"secondary":"default",htmlFor:o,rightIcon:c.createElement(B,{checked:l,disabled:i},c.createElement(m,{id:o,type:"checkbox",onChange:h,checked:l})),className:O({"switch-button-checked":l,"switch-button":!l})},f):c.createElement(F,A({ref:r},S),c.createElement(N,{checked:l,disabled:i},c.createElement(m,{id:o,type:"checkbox",onChange:h,checked:l}),c.createElement(U,{checked:l},l?x:g)),f&&c.createElement(V,{htmlFor:o},f))});v.displayName="@kubed/components/Switch";export{v as Switch};
1
+ import c from"react";import O from"classnames";import{useId as j,useUncontrolled as T}from"@kubed/hooks";import{isUndefined as I}from"lodash";import P from"../utils/forwardRef.js";import{StyledButton as W,ButtonControl as B,StyledInput as m,SwitchWrap as F,SwitchControl as N,TextWrap as U,LabelWrap as V}from"./Switch.styles.js";var _=Object.defineProperty,d=Object.getOwnPropertySymbols,b=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable,k=(e,r,t)=>r in e?_(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,A=(e,r)=>{for(var t in r||(r={}))b.call(r,t)&&k(e,t,r[t]);if(d)for(var t of d(r))p.call(r,t)&&k(e,t,r[t]);return e},L=(e,r)=>{var t={};for(var a in e)b.call(e,a)&&r.indexOf(a)<0&&(t[a]=e[a]);if(e!=null&&d)for(var a of d(e))r.indexOf(a)<0&&p.call(e,a)&&(t[a]=e[a]);return t};const v=P((e,r)=>{var t=e,{id:a,defaultChecked:y,checked:w,disabled:i,onChange:s,okText:x,offText:g,label:f,variant:E="default"}=t,C=L(t,["id","defaultChecked","checked","disabled","onChange","okText","offText","label","variant"]);const o=j(a),[l,S]=T({value:w,defaultValue:y,finalValue:!1,rule:n=>!I(n),onChange:()=>{}}),h=n=>{if(i)return;const u=n.target.checked;S(u),s&&s(u,n)};return E==="button"?c.createElement(W,{radius:"xl",variant:"filled",forwardedAs:"label",color:l?"secondary":"default",htmlFor:o,rightIcon:c.createElement(B,{checked:l,disabled:i},c.createElement(m,{id:o,type:"checkbox",onChange:h,checked:l})),className:O({"switch-button-checked":l,"switch-button":!l})},f):c.createElement(F,A({ref:r},C),c.createElement(N,{checked:l,disabled:i},c.createElement(m,{id:o,type:"checkbox",onChange:h,checked:l}),c.createElement(U,{checked:l},l?x:g)),f&&c.createElement(V,{htmlFor:o},f))});v.displayName="@kubed/components/Switch";export{v as Switch};
2
2
  //# sourceMappingURL=Switch.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Switch.js","sources":["../../src/Switch/Switch.tsx"],"sourcesContent":["import React from 'react';\nimport cx from 'classnames';\nimport { useId, useUncontrolled } from '@kubed/hooks';\nimport { isUndefined } from 'lodash';\nimport { DefaultProps } from '../theme';\nimport forwardRef from '../utils/forwardRef';\nimport {\n SwitchWrap,\n SwitchControl,\n TextWrap,\n LabelWrap,\n StyledInput,\n ButtonControl,\n StyledButton,\n} from './Switch.styles';\n\nexport type SwitchChangeEventHandler = (checked: boolean, event: MouseEvent) => void;\nexport type SwitchClickEventHandler = SwitchChangeEventHandler;\n\nexport interface SwitchProps extends DefaultProps {\n /** Id is used to bind input and label, if not passed unique id will be generated for each input */\n id?: string;\n\n /** Switch label */\n label?: React.ReactNode;\n\n variant?: 'button' | 'default';\n\n /** Whether the Switch is checked */\n checked?: boolean;\n\n /** Whether the Switch is default checked */\n defaultChecked?: boolean;\n\n okText?: React.ReactNode;\n\n offText?: React.ReactNode;\n\n disabled?: boolean;\n\n onChange?: SwitchChangeEventHandler;\n\n onClick?: SwitchClickEventHandler;\n}\n\nexport const Switch = forwardRef<SwitchProps, 'input'>(\n (\n {\n id,\n defaultChecked,\n checked,\n disabled,\n onChange,\n okText,\n offText,\n label,\n variant = 'default',\n ...restProps\n },\n ref\n ) => {\n const uuid = useId(id);\n const [_checked, setChecked] = useUncontrolled({\n value: checked,\n defaultValue: defaultChecked,\n finalValue: false,\n rule: (val) => !isUndefined(val),\n onChange: () => {},\n });\n\n const onSwitchChange = (e) => {\n if (disabled) return;\n\n const checkedState = e.target.checked;\n setChecked(checkedState);\n onChange && onChange(checkedState, e);\n };\n\n if (variant === 'button') {\n const color = _checked ? 'secondary' : 'default';\n const rightSection = (\n <ButtonControl checked={_checked} disabled={disabled}>\n <StyledInput id={uuid} type=\"checkbox\" onChange={onSwitchChange} checked={_checked} />\n </ButtonControl>\n );\n return (\n <StyledButton\n radius=\"xl\"\n variant=\"filled\"\n forwardedAs=\"label\"\n color={color}\n htmlFor={uuid}\n rightIcon={rightSection}\n className={cx({ 'switch-button-checked': _checked, 'switch-button': !_checked })}\n >\n {label}\n </StyledButton>\n );\n }\n\n return (\n <SwitchWrap ref={ref} {...restProps}>\n <SwitchControl checked={_checked} disabled={disabled}>\n <StyledInput id={uuid} type=\"checkbox\" onChange={onSwitchChange} checked={_checked} />\n <TextWrap checked={_checked}>{_checked ? okText : offText}</TextWrap>\n </SwitchControl>\n {label && <LabelWrap htmlFor={uuid}>{label}</LabelWrap>}\n </SwitchWrap>\n );\n }\n);\n\nSwitch.displayName = '@kubed/components/Switch';\n"],"names":["T","N","B","P","r","V","U","C","H","I","D","F","L"],"mappings":";;;;;;;AAAA,IAAI,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAA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CAAC,uBAAuB,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAACJ,UAAC,CAAC,aAAa,CAACK,UAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAACL,UAAC,CAAC,aAAa,CAACM,aAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAACN,UAAC,CAAC,aAAa,CAACG,WAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAACH,UAAC,CAAC,aAAa,CAACO,QAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAEP,UAAC,CAAC,aAAa,CAACQ,SAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,WAAW,CAAC,0BAA0B;;;;"}
1
+ {"version":3,"file":"Switch.js","sources":["../../src/Switch/Switch.tsx"],"sourcesContent":["import React from 'react';\nimport cx from 'classnames';\nimport { useId, useUncontrolled } from '@kubed/hooks';\nimport { isUndefined } from 'lodash';\nimport { DefaultProps } from '../theme';\nimport forwardRef from '../utils/forwardRef';\nimport {\n SwitchWrap,\n SwitchControl,\n TextWrap,\n LabelWrap,\n StyledInput,\n ButtonControl,\n StyledButton,\n} from './Switch.styles';\n\nexport type SwitchChangeEventHandler = (checked: boolean, event: MouseEvent) => void;\nexport type SwitchClickEventHandler = SwitchChangeEventHandler;\n\nexport interface SwitchProps extends DefaultProps {\n /** Id is used to bind input and label, if not passed unique id will be generated for each input */\n id?: string;\n\n /** Switch label */\n label?: React.ReactNode;\n\n variant?: 'button' | 'default';\n\n /** Whether the Switch is checked */\n checked?: boolean;\n\n /** Whether the Switch is default checked */\n defaultChecked?: boolean;\n\n okText?: React.ReactNode;\n\n offText?: React.ReactNode;\n\n disabled?: boolean;\n\n onChange?: SwitchChangeEventHandler;\n\n onClick?: SwitchClickEventHandler;\n}\n\nexport const Switch = forwardRef<SwitchProps, 'input'>(\n (\n {\n id,\n defaultChecked,\n checked,\n disabled,\n onChange,\n okText,\n offText,\n label,\n variant = 'default',\n ...restProps\n },\n ref\n ) => {\n const uuid = useId(id);\n const [_checked, setChecked] = useUncontrolled({\n value: checked,\n defaultValue: defaultChecked,\n finalValue: false,\n rule: (val) => !isUndefined(val),\n onChange: () => {},\n });\n\n const onSwitchChange = (e) => {\n if (disabled) return;\n\n const checkedState = e.target.checked;\n setChecked(checkedState);\n onChange && onChange(checkedState, e);\n };\n\n if (variant === 'button') {\n const color = _checked ? 'secondary' : 'default';\n const rightSection = (\n <ButtonControl checked={_checked} disabled={disabled}>\n <StyledInput id={uuid} type=\"checkbox\" onChange={onSwitchChange} checked={_checked} />\n </ButtonControl>\n );\n return (\n <StyledButton\n radius=\"xl\"\n variant=\"filled\"\n forwardedAs=\"label\"\n color={color}\n htmlFor={uuid}\n rightIcon={rightSection}\n className={cx({ 'switch-button-checked': _checked, 'switch-button': !_checked })}\n >\n {label}\n </StyledButton>\n );\n }\n\n return (\n <SwitchWrap ref={ref} {...restProps}>\n <SwitchControl checked={_checked} disabled={disabled}>\n <StyledInput id={uuid} type=\"checkbox\" onChange={onSwitchChange} checked={_checked} />\n <TextWrap checked={_checked}>{_checked ? okText : offText}</TextWrap>\n </SwitchControl>\n {label && <LabelWrap htmlFor={uuid}>{label}</LabelWrap>}\n </SwitchWrap>\n );\n }\n);\n\nSwitch.displayName = '@kubed/components/Switch';\n"],"names":["T","N","B","P","r","V","U","C","H","I","D","F","L"],"mappings":";;;;;;;AAAA,IAAI,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,qBAAqB,CAA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@ -1 +1 @@
1
- {"version":3,"file":"Switch.styles.js","sources":["../../src/Switch/Switch.styles.ts"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport { Button, ButtonProps } from '../Button/Button';\nimport { KubedTheme } from '../theme';\n\ninterface ControlProps {\n theme?: KubedTheme;\n disabled?: boolean;\n checked?: boolean;\n}\n\nexport const SwitchWrap = styled('div')`\n display: inline-flex;\n align-items: center;\n`;\n\nconst getStateStyles = (checked, theme) => {\n if (checked) {\n return css`\n border-color: transparent;\n background-color: ${theme.palette.colors.green[2]} !important;\n box-shadow: 0 1px 2px 0 rgb(0 41 27 / 4%);\n\n &:before {\n left: calc(100% - 12px - 5px);\n //right: 5px;\n }\n\n &:hover {\n background-color: ${theme.palette.colors.green[3]} !important;\n }\n `;\n }\n\n return null;\n};\n\nexport const StyledInput = styled('input')`\n outline: 0;\n appearance: none;\n display: inline-block;\n min-width: 40px;\n min-height: 20px;\n width: 100%;\n margin: 0;\n opacity: 0;\n cursor: ${({ disabled }) => (disabled ? 'not-allowed' : 'pointer')};\n position: absolute;\n top: 0;\n left: 0;\n`;\n\nexport const SwitchControl = styled('div')<ControlProps>`\n position: relative;\n display: inline-block;\n height: 20px;\n min-width: 40px;\n border-radius: 100px;\n line-height: 20px;\n cursor: pointer;\n user-select: none;\n background-color: ${({ theme }) => theme.palette.accents_2};\n transition: background-color 0.2s cubic-bezier(0, 0, 0.2, 1) 0.05s;\n opacity: ${({ disabled }) => (disabled ? 0.7 : 1)};\n\n &:before {\n position: absolute;\n content: '';\n background-color: ${({ theme }) => theme.palette.background};\n top: 50%;\n width: 12px;\n height: 12px;\n left: 5px;\n border-radius: 18px;\n transform: translateY(-50%);\n box-shadow: 0 1px 2px 0 rgb(0 41 27 / 8%);\n transition: left 200ms cubic-bezier(0, 0, 0.2, 1) 0s;\n }\n\n ${({ checked, theme }) => getStateStyles(checked, theme)};\n`;\n\nexport const TextWrap = styled('div')<ControlProps>`\n color: #fff;\n ${({ checked }) => (checked ? 'margin: 0 22px 0 7px;' : 'margin: 0 7px 0 22px; color:#5f708a;')};\n transition: margin 0.2s;\n`;\n\nexport const LabelWrap = styled.label`\n margin-left: 8px;\n cursor: pointer;\n`;\n\nexport const StyledButton = styled(Button)<ButtonProps>`\n &.switch-button {\n background-color: #c1c9d1;\n border-color: transparent;\n\n &:hover {\n background-color: ${({ theme }) => theme.palette.accents_1};\n border-color: ${({ theme }) => theme.palette.border};\n }\n }\n\n &.switch-button-checked {\n &:hover {\n border-color: #c1c9d1;\n }\n }\n`;\n\nexport const ButtonControl = styled('div')<ControlProps>`\n position: relative;\n display: inline-block;\n width: 24px;\n height: 5.8px;\n background: ${({ theme }) => theme.palette.background};\n border-radius: 100px;\n\n &:before {\n position: absolute;\n content: '';\n width: 12px;\n height: 12px;\n border-radius: 50%;\n background-color: ${({ theme }) => theme.palette.background};\n box-shadow: 0 1px 2px 0 rgb(33 42 51 / 4%), 0 1px 1px 0 rgb(33 42 51 / 4%);\n transition: all 0.2s cubic-bezier(0.78, 0.14, 0.15, 0.86);\n top: 50%;\n transform: translateY(-50%);\n\n ${({ checked }) => (checked ? 'left: 12px;' : 'left: 0px;')};\n }\n\n input {\n width: 24px !important;\n height: 0;\n min-height: 0;\n min-width: 24px;\n }\n`;\n"],"names":["t","e","n"],"mappings":";;;AAAiG,MAAC,UAAU,CAACA,CAAC,CAAC,KAAK,CAAC,CAAC;AACtH;AACA;AACA,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAACC,GAAC,CAAC;AACrB;AACA,wBAAwB,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACtD;AACA,IAAI,CAAC,CAAC,IAAI,CAAa,MAAC,WAAW,CAACD,CAAC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C,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,aAAa,CAACF,CAAC,CAAC,KAAK,CAAC,CAAC;AACzB;AACA;AACA;AACA;AACA,cAAc,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;AAC1D;AACA;AACA;AACA;AACA;AACA,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,aAAa,CAAC,YAAY,CAAC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;"}
1
+ {"version":3,"file":"Switch.styles.js","sources":["../../src/Switch/Switch.styles.ts"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport { Button, ButtonProps } from '../Button/Button';\nimport { KubedTheme } from '../theme';\n\ninterface ControlProps {\n theme?: KubedTheme;\n disabled?: boolean;\n checked?: boolean;\n}\n\nexport const SwitchWrap = styled('div')`\n display: inline-flex;\n align-items: center;\n`;\n\nconst getStateStyles = (checked, theme) => {\n if (checked) {\n return css`\n border-color: transparent;\n background-color: ${theme.palette.colors.green[2]} !important;\n box-shadow: 0 1px 2px 0 rgb(0 41 27 / 4%);\n\n &:before {\n left: calc(100% - 12px - 5px);\n //right: 5px;\n }\n\n &:hover {\n background-color: ${theme.palette.colors.green[3]} !important;\n }\n `;\n }\n\n return null;\n};\n\nexport const StyledInput = styled('input')`\n outline: 0;\n appearance: none;\n display: inline-block;\n min-width: 40px;\n min-height: 20px;\n width: 100%;\n margin: 0;\n opacity: 0;\n cursor: ${({ disabled }) => (disabled ? 'not-allowed' : 'pointer')};\n position: absolute;\n top: 0;\n left: 0;\n`;\n\nexport const SwitchControl = styled('div')<ControlProps>`\n position: relative;\n display: inline-block;\n height: 20px;\n min-width: 40px;\n border-radius: 100px;\n line-height: 20px;\n cursor: pointer;\n user-select: none;\n background-color: ${({ theme }) => theme.palette.accents_2};\n transition: background-color 0.2s cubic-bezier(0, 0, 0.2, 1) 0.05s;\n opacity: ${({ disabled }) => (disabled ? 0.7 : 1)};\n\n &:before {\n position: absolute;\n content: '';\n background-color: ${({ theme }) => theme.palette.background};\n top: 50%;\n width: 12px;\n height: 12px;\n left: 5px;\n border-radius: 18px;\n transform: translateY(-50%);\n box-shadow: 0 1px 2px 0 rgb(0 41 27 / 8%);\n transition: left 200ms cubic-bezier(0, 0, 0.2, 1) 0s;\n }\n\n ${({ checked, theme }) => getStateStyles(checked, theme)};\n`;\n\nexport const TextWrap = styled('div')<ControlProps>`\n color: #fff;\n ${({ checked }) => (checked ? 'margin: 0 22px 0 7px;' : 'margin: 0 7px 0 22px; color:#5f708a;')};\n transition: margin 0.2s;\n`;\n\nexport const LabelWrap = styled.label`\n margin-left: 8px;\n cursor: pointer;\n`;\n\nexport const StyledButton = styled(Button)<ButtonProps>`\n &.switch-button {\n background-color: #c1c9d1;\n border-color: transparent;\n\n &:hover {\n background-color: ${({ theme }) => theme.palette.accents_1};\n border-color: ${({ theme }) => theme.palette.border};\n }\n }\n\n &.switch-button-checked {\n &:hover {\n border-color: #c1c9d1;\n }\n }\n`;\n\nexport const ButtonControl = styled('div')<ControlProps>`\n position: relative;\n display: inline-block;\n width: 24px;\n height: 5.8px;\n background: ${({ theme }) => theme.palette.background};\n border-radius: 100px;\n\n &:before {\n position: absolute;\n content: '';\n width: 12px;\n height: 12px;\n border-radius: 50%;\n background-color: ${({ theme }) => theme.palette.background};\n box-shadow: 0 1px 2px 0 rgb(33 42 51 / 4%), 0 1px 1px 0 rgb(33 42 51 / 4%);\n transition: all 0.2s cubic-bezier(0.78, 0.14, 0.15, 0.86);\n top: 50%;\n transform: translateY(-50%);\n\n ${({ checked }) => (checked ? 'left: 12px;' : 'left: 0px;')};\n }\n\n input {\n width: 24px !important;\n height: 0;\n min-height: 0;\n min-width: 24px;\n }\n`;\n"],"names":["e","n"],"mappings":";;;AAAiG,MAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AACtH;AACA;AACA,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAACA,GAAC,CAAC;AACrB;AACA,wBAAwB,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACtD;AACA,IAAI,CAAC,CAAC,IAAI,CAAa,MAAC,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,aAAa,CAAC,SAAS,CAAC;AACtD;AACA;AACA;AACA,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AACvD;AACA,WAAW,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACpC;AACA;AACA;AACA;AACA,sBAAsB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAClC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AACpB;AACA,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,uBAAuB,CAAC,sCAAsC,CAAC;AACpF;AACA,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC;AACpB;AACA;AACA,CAAC,CAAC,YAAY,CAAC,CAAC,CAACC,MAAC,CAAC,CAAC;AACpB;AACA;AACA;AACA;AACA;AACA,wBAAwB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AAC3D,oBAAoB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AACzB;AACA;AACA;AACA;AACA,cAAc,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;AAC1D;AACA;AACA;AACA;AACA;AACA,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,aAAa,CAAC,YAAY,CAAC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;"}
@@ -1,4 +1,4 @@
1
- import{CaretDown as M,Previous as L,Next as N}from"@kubed/icons";import _ from"classnames";import*as e from"react";import a,{css as A}from"styled-components";import{ButtonContainer as T}from"../../Button/Button.styles.js";import{useLocales as F}from"../../ConfigProvider/LocaleProvider/LocaleContext.js";import{Menu as G}from"../../Menu/Menu.js";import{Dropdown as s}from"../../Dropdown/Dropdown.js";import{Button as c}from"../../Button/Button.js";import{MenuItem as m}from"../../Menu/MenuItem/MenuItem.js";const Z=A`
1
+ import{CaretDown as $,Previous as L,Next as N}from"@kubed/icons";import _ from"classnames";import*as e from"react";import a,{css as A}from"styled-components";import{ButtonContainer as T}from"../../Button/Button.styles.js";import{useLocales as F}from"../../ConfigProvider/LocaleProvider/LocaleContext.js";import{Menu as G}from"../../Menu/Menu.js";import{Dropdown as s}from"../../Dropdown/Dropdown.js";import{Button as c}from"../../Button/Button.js";import{MenuItem as m}from"../../Menu/MenuItem/MenuItem.js";const Z=A`
2
2
  display: flex;
3
3
  justify-content: space-between;
4
4
  align-items: center;
@@ -50,5 +50,5 @@ import{CaretDown as M,Previous as L,Next as N}from"@kubed/icons";import _ from"c
50
50
  width: 1px;
51
51
  height: 12px;
52
52
  background-color: ${({theme:t})=>t.palette.accents_2};
53
- `,Q=10,V=({className:t,style:u,config:{isShowSetPageSize:g=!0,isShowDivider:d=!0,isShowTotalCount:x=!0,isShowPagination:f=!0}={},instance:E})=>{const{getCanNextPage:h,getCanPreviousPage:w,getState:y,getRowCount:v,getPageCount:P,nextPage:C,previousPage:S,setPageSize:k,setPageIndex:b}=E,{pageIndex:I,pageSize:B}=y(),l=v(),r=P(),{locales:$}=F(),{Pagination:i}=$,j=()=>{if(r&&r>0){const o=Array.from({length:r},(n,D)=>D).map(n=>e.createElement(m,{key:n,onClick:()=>b(n)},n+1));return e.createElement(p,null,o)}return null},z=()=>{const o=[10,20,50,100].map(n=>e.createElement(m,{style:{alignItems:"center"},key:n.toString(),onClick:()=>{k(n)}},n));return e.createElement(p,null,o)};return e.createElement(q,{className:_(t,"table-pagination-wrapper"),style:u},e.createElement(J,null,g&&e.createElement(s,{trigger:"mouseenter click",interactive:!0,content:z()},e.createElement(K,null,e.createElement("span",null,i.limit),e.createElement("span",null,B),e.createElement(M,null))),d&&e.createElement(U,null),x&&e.createElement(O,{className:"total-count"},e.createElement("span",null,i.totalItems),e.createElement("span",null,l??0))),f&&e.createElement(H,null,e.createElement(c,{variant:"text",radius:"sm",onClick:()=>S(),disabled:!w()},e.createElement(L,{size:20})),e.createElement(s,{trigger:"mouseenter click",content:j(),interactive:!0},e.createElement(R,null,I+1," / ",r)),e.createElement(c,{variant:"text",radius:"sm",onClick:()=>{C()},disabled:!h()},e.createElement(N,{size:20}))))};export{V as BasePagination,Q as DEFAULT_PAGE_SIZE};
53
+ `,Q=10,V=({className:t,style:u,config:{isShowSetPageSize:g=!0,isShowDivider:d=!0,isShowTotalCount:x=!0,isShowPagination:f=!0}={},instance:E})=>{const{getCanNextPage:h,getCanPreviousPage:w,getState:y,getRowCount:P,getPageCount:v,nextPage:C,previousPage:k,setPageSize:S,setPageIndex:b}=E,{pageIndex:I,pageSize:B}=y(),l=P(),r=v(),{locales:j}=F(),{Pagination:i}=j,z=()=>{if(r&&r>0){const o=Array.from({length:r},(n,M)=>M).map(n=>e.createElement(m,{key:n,onClick:()=>b(n)},n+1));return e.createElement(p,null,o)}return null},D=()=>{const o=[10,20,50,100].map(n=>e.createElement(m,{style:{alignItems:"center"},key:n.toString(),onClick:()=>{S(n)}},n));return e.createElement(p,null,o)};return e.createElement(q,{className:_(t,"table-pagination-wrapper"),style:u},e.createElement(J,null,g&&e.createElement(s,{trigger:"mouseenter click",interactive:!0,content:D()},e.createElement(K,null,e.createElement("span",null,i.limit),e.createElement("span",null,B),e.createElement($,null))),d&&e.createElement(U,null),x&&e.createElement(O,{className:"total-count"},e.createElement("span",null,i.totalItems),e.createElement("span",null,l??0))),f&&e.createElement(H,null,e.createElement(c,{variant:"text",radius:"sm",onClick:()=>k(),disabled:!w()},e.createElement(L,{size:20})),e.createElement(s,{trigger:"mouseenter click",content:z(),interactive:!0},e.createElement(R,null,I+1," / ",r)),e.createElement(c,{variant:"text",radius:"sm",onClick:()=>{C()},disabled:!h()},e.createElement(N,{size:20}))))};export{V as BasePagination,Q as DEFAULT_PAGE_SIZE};
54
54
  //# sourceMappingURL=BasePagination.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BasePagination.js","sources":["../../../src/Table/BaseTable/BasePagination.tsx"],"sourcesContent":["import { CaretDown, Next, Previous } from '@kubed/icons';\nimport cx from 'classnames';\nimport * as React from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { Updater } from '@tanstack/react-table';\nimport { ButtonContainer } from '../../Button/Button.styles';\nimport { useLocales } from '../../ConfigProvider/LocaleProvider/LocaleContext';\nimport { Button, Dropdown, Menu, MenuItem } from '../../index';\n\nconst flex = css`\n display: flex;\n justify-content: space-between;\n align-items: center;\n`;\n\nconst PaginationWrapper = styled.div`\n ${flex};\n position: relative;\n`;\n\nconst PaginationRight = styled.div`\n display: inline-flex;\n align-items: center;\n ${ButtonContainer} {\n padding: 5px 12px;\n &:disabled {\n opacity: 0.6;\n border-color: transparent;\n background-color: transparent;\n }\n }\n`;\n\nconst MenuWrapper = styled(Menu)`\n width: 96px;\n max-height: 176px;\n overflow: auto;\n`;\n\nconst PaginationLeft = styled.div`\n display: inline-flex;\n align-items: center;\n`;\n\nconst PageSize = styled.span`\n display: inline-flex;\n cursor: pointer;\n align-items: center;\n line-height: 20px;\n\n gap: 4px;\n & > span {\n font-weight: 600;\n color: ${({ theme }) => theme.palette.accents_7};\n }\n`;\n\nconst Total = styled.span`\n display: inline-flex;\n gap: 4px;\n`;\n\nconst PageIndex = styled.span`\n margin: 0px 12px;\n font-weight: 600;\n line-height: 20px;\n color: ${({ theme }) => theme.palette.accents_7};\n font-family: ${({ theme }) => theme.font.sans};\n font-size: 12px;\n cursor: pointer;\n`;\n\nconst Divider = styled.span`\n margin: 0 12px;\n width: 1px;\n height: 12px;\n background-color: ${({ theme }) => theme.palette.accents_2};\n`;\n\nexport const DEFAULT_PAGE_SIZE = 10;\n\ninterface PaginationState {\n pageIndex: number;\n pageSize: number;\n}\n\ninterface PaginationInstance {\n getCanNextPage: () => boolean;\n getCanPreviousPage: () => boolean;\n getState: () => PaginationState;\n getRowCount: () => number;\n getPageCount: () => number;\n nextPage: () => void;\n previousPage: () => void;\n setPageIndex: (updater: Updater<number>) => void;\n setPageSize: (updater: Updater<number>) => void;\n}\n\ntype TablePaginationProps = {\n className?: string;\n style?: React.CSSProperties;\n config?: {\n isShowSetPageSize?: boolean;\n isShowDivider?: boolean;\n isShowTotalCount?: boolean;\n isShowPagination?: boolean;\n autoResetPageIndex?: boolean;\n };\n instance: PaginationInstance;\n};\n\nexport type {\n TablePaginationProps as BaseTablePaginationProps,\n PaginationInstance,\n PaginationState,\n};\n\nexport const BasePagination = ({\n className,\n style,\n config: {\n isShowSetPageSize = true,\n isShowDivider = true,\n isShowTotalCount = true,\n isShowPagination = true,\n } = {},\n instance,\n}: TablePaginationProps) => {\n const {\n getCanNextPage,\n getCanPreviousPage,\n getState,\n getRowCount,\n getPageCount,\n nextPage,\n previousPage,\n setPageSize,\n setPageIndex,\n } = instance;\n const { pageIndex, pageSize } = getState();\n const total = getRowCount();\n const pageCount = getPageCount();\n const { locales } = useLocales();\n const { Pagination: pageLocales } = locales;\n\n const renderPageDropDown = () => {\n if (pageCount && pageCount > 0) {\n const items = Array.from({ length: pageCount }, (_, i) => i).map((item) => (\n <MenuItem key={item} onClick={() => setPageIndex(item)}>\n {item + 1}\n </MenuItem>\n ));\n return <MenuWrapper>{items}</MenuWrapper>;\n }\n return null;\n };\n\n const renderPageSizeDropDown = () => {\n const items = [10, 20, 50, 100].map((size) => (\n <MenuItem\n style={{ alignItems: 'center' }}\n key={size.toString()}\n onClick={() => {\n setPageSize(size);\n }}\n >\n {size}\n </MenuItem>\n ));\n\n return <MenuWrapper>{items}</MenuWrapper>;\n };\n\n return (\n <PaginationWrapper className={cx(className, 'table-pagination-wrapper')} style={style}>\n <PaginationLeft>\n {isShowSetPageSize && (\n <Dropdown trigger=\"mouseenter click\" interactive content={renderPageSizeDropDown()}>\n <PageSize>\n <span>{pageLocales.limit}</span>\n <span>{pageSize}</span>\n <CaretDown />\n </PageSize>\n </Dropdown>\n )}\n {isShowDivider && <Divider />}\n {isShowTotalCount && (\n <Total className=\"total-count\">\n <span>{pageLocales.totalItems}</span>\n <span>{total ?? 0}</span>\n </Total>\n )}\n </PaginationLeft>\n {isShowPagination && (\n <PaginationRight>\n <Button\n variant=\"text\"\n radius=\"sm\"\n onClick={() => previousPage()}\n disabled={!getCanPreviousPage()}\n >\n <Previous size={20} />\n </Button>\n <Dropdown trigger=\"mouseenter click\" content={renderPageDropDown()} interactive>\n <PageIndex>\n {pageIndex + 1} / {pageCount}\n </PageIndex>\n </Dropdown>\n <Button\n variant=\"text\"\n radius=\"sm\"\n onClick={() => {\n nextPage();\n }}\n disabled={!getCanNextPage()}\n >\n <Next size={20} />\n </Button>\n </PaginationRight>\n )}\n </PaginationWrapper>\n );\n};\n\nexport type { TablePaginationProps as PaginationProps };\n"],"names":["U","a","A","j","S","o","E","e","l","W","g","N","p","$","_"],"mappings":";;;;;;;;;;;AAAqX,MAAM,CAAC,CAACA,GAAC,CAAC;AAC/X;AACA;AACA;AACA,CAAC,CAAC,CAAC,CAACC,CAAC,CAAC,GAAG,CAAC;AACV,EAAE,EAAE,CAAC,CAAC;AACN;AACA,CAAC,CAAC,CAAC,CAACA,CAAC,CAAC,GAAG,CAAC;AACV;AACA;AACA,EAAE,EAAEC,eAAC,CAAC;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,CAAC,CAACD,CAAC,CAACE,IAAC,CAAC,CAAC;AACT;AACA;AACA;AACA,CAAC,CAAC,CAAC,CAACF,CAAC,CAAC,GAAG,CAAC;AACV;AACA;AACA,CAAC,CAAC,CAAC,CAACA,CAAC,CAAC,IAAI,CAAC;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE,CAAC,CAAC,KAA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,WAAW,CAAC,CAAC,CAAC,CAAC,CAACH,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAACF,GAAC,CAAC,CAAC,CAACE,CAAC,CAAC,aAAa,CAACK,MAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,GAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAACL,CAAC,CAAC,aAAa,CAACO,IAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;;;;"}
1
+ {"version":3,"file":"BasePagination.js","sources":["../../../src/Table/BaseTable/BasePagination.tsx"],"sourcesContent":["import { CaretDown, Next, Previous } from '@kubed/icons';\nimport cx from 'classnames';\nimport * as React from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { Updater } from '@tanstack/react-table';\nimport { ButtonContainer } from '../../Button/Button.styles';\nimport { useLocales } from '../../ConfigProvider/LocaleProvider/LocaleContext';\nimport { Button, Dropdown, Menu, MenuItem } from '../../index';\n\nconst flex = css`\n display: flex;\n justify-content: space-between;\n align-items: center;\n`;\n\nconst PaginationWrapper = styled.div`\n ${flex};\n position: relative;\n`;\n\nconst PaginationRight = styled.div`\n display: inline-flex;\n align-items: center;\n ${ButtonContainer} {\n padding: 5px 12px;\n &:disabled {\n opacity: 0.6;\n border-color: transparent;\n background-color: transparent;\n }\n }\n`;\n\nconst MenuWrapper = styled(Menu)`\n width: 96px;\n max-height: 176px;\n overflow: auto;\n`;\n\nconst PaginationLeft = styled.div`\n display: inline-flex;\n align-items: center;\n`;\n\nconst PageSize = styled.span`\n display: inline-flex;\n cursor: pointer;\n align-items: center;\n line-height: 20px;\n\n gap: 4px;\n & > span {\n font-weight: 600;\n color: ${({ theme }) => theme.palette.accents_7};\n }\n`;\n\nconst Total = styled.span`\n display: inline-flex;\n gap: 4px;\n`;\n\nconst PageIndex = styled.span`\n margin: 0px 12px;\n font-weight: 600;\n line-height: 20px;\n color: ${({ theme }) => theme.palette.accents_7};\n font-family: ${({ theme }) => theme.font.sans};\n font-size: 12px;\n cursor: pointer;\n`;\n\nconst Divider = styled.span`\n margin: 0 12px;\n width: 1px;\n height: 12px;\n background-color: ${({ theme }) => theme.palette.accents_2};\n`;\n\nexport const DEFAULT_PAGE_SIZE = 10;\n\ninterface PaginationState {\n pageIndex: number;\n pageSize: number;\n}\n\ninterface PaginationInstance {\n getCanNextPage: () => boolean;\n getCanPreviousPage: () => boolean;\n getState: () => PaginationState;\n getRowCount: () => number;\n getPageCount: () => number;\n nextPage: () => void;\n previousPage: () => void;\n setPageIndex: (updater: Updater<number>) => void;\n setPageSize: (updater: Updater<number>) => void;\n}\n\ntype TablePaginationProps = {\n className?: string;\n style?: React.CSSProperties;\n config?: {\n isShowSetPageSize?: boolean;\n isShowDivider?: boolean;\n isShowTotalCount?: boolean;\n isShowPagination?: boolean;\n autoResetPageIndex?: boolean;\n };\n instance: PaginationInstance;\n};\n\nexport type {\n TablePaginationProps as BaseTablePaginationProps,\n PaginationInstance,\n PaginationState,\n};\n\nexport const BasePagination = ({\n className,\n style,\n config: {\n isShowSetPageSize = true,\n isShowDivider = true,\n isShowTotalCount = true,\n isShowPagination = true,\n } = {},\n instance,\n}: TablePaginationProps) => {\n const {\n getCanNextPage,\n getCanPreviousPage,\n getState,\n getRowCount,\n getPageCount,\n nextPage,\n previousPage,\n setPageSize,\n setPageIndex,\n } = instance;\n const { pageIndex, pageSize } = getState();\n const total = getRowCount();\n const pageCount = getPageCount();\n const { locales } = useLocales();\n const { Pagination: pageLocales } = locales;\n\n const renderPageDropDown = () => {\n if (pageCount && pageCount > 0) {\n const items = Array.from({ length: pageCount }, (_, i) => i).map((item) => (\n <MenuItem key={item} onClick={() => setPageIndex(item)}>\n {item + 1}\n </MenuItem>\n ));\n return <MenuWrapper>{items}</MenuWrapper>;\n }\n return null;\n };\n\n const renderPageSizeDropDown = () => {\n const items = [10, 20, 50, 100].map((size) => (\n <MenuItem\n style={{ alignItems: 'center' }}\n key={size.toString()}\n onClick={() => {\n setPageSize(size);\n }}\n >\n {size}\n </MenuItem>\n ));\n\n return <MenuWrapper>{items}</MenuWrapper>;\n };\n\n return (\n <PaginationWrapper className={cx(className, 'table-pagination-wrapper')} style={style}>\n <PaginationLeft>\n {isShowSetPageSize && (\n <Dropdown trigger=\"mouseenter click\" interactive content={renderPageSizeDropDown()}>\n <PageSize>\n <span>{pageLocales.limit}</span>\n <span>{pageSize}</span>\n <CaretDown />\n </PageSize>\n </Dropdown>\n )}\n {isShowDivider && <Divider />}\n {isShowTotalCount && (\n <Total className=\"total-count\">\n <span>{pageLocales.totalItems}</span>\n <span>{total ?? 0}</span>\n </Total>\n )}\n </PaginationLeft>\n {isShowPagination && (\n <PaginationRight>\n <Button\n variant=\"text\"\n radius=\"sm\"\n onClick={() => previousPage()}\n disabled={!getCanPreviousPage()}\n >\n <Previous size={20} />\n </Button>\n <Dropdown trigger=\"mouseenter click\" content={renderPageDropDown()} interactive>\n <PageIndex>\n {pageIndex + 1} / {pageCount}\n </PageIndex>\n </Dropdown>\n <Button\n variant=\"text\"\n radius=\"sm\"\n onClick={() => {\n nextPage();\n }}\n disabled={!getCanNextPage()}\n >\n <Next size={20} />\n </Button>\n </PaginationRight>\n )}\n </PaginationWrapper>\n );\n};\n\nexport type { TablePaginationProps as PaginationProps };\n"],"names":["U","a","A","j","P","o","E","e","l","W","g","N","p","$","_"],"mappings":";;;;;;;;;;;AAAqX,MAAM,CAAC,CAACA,GAAC,CAAC;AAC/X;AACA;AACA;AACA,CAAC,CAAC,CAAC,CAACC,CAAC,CAAC,GAAG,CAAC;AACV,EAAE,EAAE,CAAC,CAAC;AACN;AACA,CAAC,CAAC,CAAC,CAACA,CAAC,CAAC,GAAG,CAAC;AACV;AACA;AACA,EAAE,EAAEC,eAAC,CAAC;AACN;AACA;AACA;AACA;AACA;AACA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AAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAACL,CAAC,CAAC,aAAa,CAACM,QAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAACN,CAAC,CAAC,aAAa,CAACG,QAAC,CAAC,CAAC,OAAO,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAACH,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAACF,GAAC,CAAC,CAAC,CAACE,CAAC,CAAC,aAAa,CAACK,MAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,GAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAACL,CAAC,CAAC,aAAa,CAACO,IAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;;;;"}
@@ -1,4 +1,4 @@
1
- import x from"classnames";import{throttle as N}from"lodash";import*as l from"react";import v,{css as y}from"styled-components";import{TableContext as P}from"./context.js";var H=Object.defineProperty,W=Object.defineProperties,z=Object.getOwnPropertyDescriptors,i=Object.getOwnPropertySymbols,w=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable,O=(e,t,r)=>t in e?H(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,p=(e,t)=>{for(var r in t||(t={}))w.call(t,r)&&O(e,r,t[r]);if(i)for(var r of i(t))h.call(t,r)&&O(e,r,t[r]);return e},L=(e,t)=>W(e,z(t)),R=(e,t)=>{var r={};for(var a in e)w.call(e,a)&&t.indexOf(a)<0&&(r[a]=e[a]);if(e!=null&&i)for(var a of i(e))t.indexOf(a)<0&&h.call(e,a)&&(r[a]=e[a]);return r};const T=v("table")(({theme:e,$stickyHeader:t,$maxContext:r})=>p(p({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":{textAlign:"left",padding:e.layout.spacing.md,color:e.palette.accents_5}},t&&{borderCollapse:"separate",width:"100%",minWidth:"100%"}),r&&{width:"max-content"})),M=v.div`
1
+ import x from"classnames";import{throttle as j}from"lodash";import*as l from"react";import v,{css as y}from"styled-components";import{TableContext as N}from"./context.js";var H=Object.defineProperty,W=Object.defineProperties,z=Object.getOwnPropertyDescriptors,i=Object.getOwnPropertySymbols,w=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable,O=(e,t,r)=>t in e?H(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,p=(e,t)=>{for(var r in t||(t={}))w.call(t,r)&&O(e,r,t[r]);if(i)for(var r of i(t))h.call(t,r)&&O(e,r,t[r]);return e},L=(e,t)=>W(e,z(t)),R=(e,t)=>{var r={};for(var a in e)w.call(e,a)&&t.indexOf(a)<0&&(r[a]=e[a]);if(e!=null&&i)for(var a of i(e))t.indexOf(a)<0&&h.call(e,a)&&(r[a]=e[a]);return r};const T=v("table")(({theme:e,$stickyHeader:t,$maxContext:r})=>p(p({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":{textAlign:"left",padding:e.layout.spacing.md,color:e.palette.accents_5}},t&&{borderCollapse:"separate",width:"100%",minWidth:"100%"}),r&&{width:"max-content"})),M=v.div`
2
2
  ${({atStart:e})=>e&&y`
3
3
  .table-cell--fixed-last-left:after {
4
4
  box-shadow: unset;
@@ -9,5 +9,5 @@ import x from"classnames";import{throttle as N}from"lodash";import*as l from"rea
9
9
  box-shadow: unset;
10
10
  }
11
11
  `}
12
- `,A=l.forwardRef((e,t)=>{const r=e,{padding:a="normal",size:m="medium",stickyHeader:d=!1,className:g,tableWrapperClassName:E,maxContext:f,wrapperStyle:b}=r,S=R(r,["padding","size","stickyHeader","className","tableWrapperClassName","maxContext","wrapperStyle"]),C=l.useMemo(()=>({padding:a,size:m,stickyHeader:d}),[a,m,d]),n=l.useRef(null),[u,k]=l.useState({atStart:!0,atEnd:!1});return l.useEffect(()=>{const s=N(()=>{if(n.current){const{scrollLeft:o,scrollWidth:$,clientWidth:j}=n.current;k({atStart:o===0,atEnd:o+j>=$})}},200),c=n.current;if(c){s(),c.addEventListener("scroll",s);const o=new ResizeObserver(s);return o.observe(c),()=>{c.removeEventListener("scroll",s),o.disconnect()}}return()=>{}},[]),l.createElement(P.Provider,{value:C},l.createElement(M,{ref:n,className:x(E,"kube-table-wrapper"),atStart:u.atStart,atEnd:u.atEnd,style:b??{}},l.createElement(T,L(p({},S),{$stickyHeader:d,$maxContext:f,ref:t,className:x(g,"kube-table",{"kube-table--max-context":f})}))))});export{A as Table};
12
+ `,A=l.forwardRef((e,t)=>{const r=e,{padding:a="normal",size:m="medium",stickyHeader:d=!1,className:g,tableWrapperClassName:E,maxContext:f,wrapperStyle:b}=r,S=R(r,["padding","size","stickyHeader","className","tableWrapperClassName","maxContext","wrapperStyle"]),C=l.useMemo(()=>({padding:a,size:m,stickyHeader:d}),[a,m,d]),n=l.useRef(null),[u,k]=l.useState({atStart:!0,atEnd:!1});return l.useEffect(()=>{const s=j(()=>{if(n.current){const{scrollLeft:o,scrollWidth:P,clientWidth:$}=n.current;k({atStart:o===0,atEnd:o+$>=P})}},200),c=n.current;if(c){s(),c.addEventListener("scroll",s);const o=new ResizeObserver(s);return o.observe(c),()=>{c.removeEventListener("scroll",s),o.disconnect()}}return()=>{}},[]),l.createElement(N.Provider,{value:C},l.createElement(M,{ref:n,className:x(E,"kube-table-wrapper"),atStart:u.atStart,atEnd:u.atEnd,style:b??{}},l.createElement(T,L(p({},S),{$stickyHeader:d,$maxContext:f,ref:t,className:x(g,"kube-table",{"kube-table--max-context":f})}))))});export{A as Table};
13
13
  //# sourceMappingURL=Table.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Table.js","sources":["../../../src/Table/BaseTable/Table.tsx"],"sourcesContent":["import cx from 'classnames';\nimport { throttle } from 'lodash';\nimport * as React from 'react';\nimport styled, { css } from 'styled-components';\nimport { TableContext } from './context';\n\nconst TableRoot = styled('table')<{\n $stickyHeader?: boolean;\n $maxContext?: boolean;\n}>(({ theme, $stickyHeader, $maxContext }) => ({\n display: 'table',\n width: '100%',\n borderCollapse: 'collapse',\n borderSpacing: 0,\n '& caption': {\n textAlign: 'left',\n padding: theme.layout.spacing.md,\n color: theme.palette.accents_5,\n },\n ...($stickyHeader && {\n borderCollapse: 'separate',\n width: '100%',\n minWidth: '100%',\n }),\n ...($maxContext && {\n width: 'max-content',\n }),\n}));\n\ninterface TableInnerProps {\n padding?: 'normal' | 'none';\n size?: 'small' | 'medium';\n stickyHeader?: boolean;\n className?: string;\n style?: React.CSSProperties;\n tableWrapperClassName?: string;\n maxContext?: boolean;\n wrapperStyle?: React.CSSProperties;\n}\n\nexport type { TableInnerProps as TableProps };\n\nconst TableWrapper = styled.div<{ atStart?: boolean; atEnd?: boolean }>`\n ${({ atStart }) =>\n atStart &&\n css`\n .table-cell--fixed-last-left:after {\n box-shadow: unset;\n }\n `}\n ${({ atEnd }) =>\n atEnd &&\n css`\n .table-cell--fixed-last-right:before {\n box-shadow: unset;\n }\n `}\n`;\n\nexport const Table = React.forwardRef<HTMLTableElement, React.PropsWithChildren<TableInnerProps>>(\n (props, ref) => {\n const {\n padding = 'normal',\n size = 'medium',\n stickyHeader = false,\n className,\n tableWrapperClassName,\n maxContext,\n wrapperStyle,\n ...other\n } = props;\n\n const table = React.useMemo(\n () => ({\n padding,\n size,\n stickyHeader,\n }),\n [padding, size, stickyHeader]\n );\n\n const wrapperRef = React.useRef<HTMLDivElement>(null);\n const [scrollStatus, setScrollStatus] = React.useState<{ atStart: boolean; atEnd: boolean }>({\n atStart: true,\n atEnd: false,\n });\n\n React.useEffect(() => {\n // const throttle = (func: () => void, limit: number) => {\n // let lastFunc: ReturnType<typeof setTimeout>;\n // let lastRan: number;\n // return () => {\n // const now = Date.now();\n // if (!lastRan) {\n // func();\n // lastRan = now;\n // } else {\n // clearTimeout(lastFunc);\n // lastFunc = setTimeout(() => {\n // if (Date.now() - lastRan >= limit) {\n // func();\n // lastRan = Date.now();\n // }\n // }, limit - (now - lastRan));\n // }\n // };\n // };\n\n const handleScroll = () => {\n if (wrapperRef.current) {\n const { scrollLeft, scrollWidth, clientWidth } = wrapperRef.current;\n setScrollStatus({\n atStart: scrollLeft === 0,\n atEnd: scrollLeft + clientWidth >= scrollWidth,\n });\n }\n };\n\n const throttledHandleScroll = throttle(handleScroll, 200);\n\n const wrapper = wrapperRef.current;\n if (wrapper) {\n throttledHandleScroll();\n wrapper.addEventListener('scroll', throttledHandleScroll);\n\n const resizeObserver = new ResizeObserver(throttledHandleScroll);\n resizeObserver.observe(wrapper);\n\n return () => {\n wrapper.removeEventListener('scroll', throttledHandleScroll);\n resizeObserver.disconnect();\n };\n }\n\n return () => {};\n }, []);\n\n return (\n <TableContext.Provider value={table}>\n <TableWrapper\n ref={wrapperRef}\n className={cx(tableWrapperClassName, 'kube-table-wrapper')}\n atStart={scrollStatus.atStart}\n atEnd={scrollStatus.atEnd}\n style={wrapperStyle ?? {}}\n >\n <TableRoot\n {...other}\n $stickyHeader={stickyHeader}\n $maxContext={maxContext}\n ref={ref}\n className={cx(className, 'kube-table', {\n 'kube-table--max-context': maxContext,\n })}\n />\n </TableWrapper>\n </TableContext.Provider>\n );\n }\n);\n"],"names":["y","E","z","I","v"],"mappings":";;;;;;AAAA,IAAI,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,yBAAyB,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,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,CAAC,CAAC,IAAI,cAAc,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,GAAE,CAAC,CAAC,OAAM,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,aAAa,CAACC,YAAC,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAACC,GAAC,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAACA,GAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;;;;"}
1
+ {"version":3,"file":"Table.js","sources":["../../../src/Table/BaseTable/Table.tsx"],"sourcesContent":["import cx from 'classnames';\nimport { throttle } from 'lodash';\nimport * as React from 'react';\nimport styled, { css } from 'styled-components';\nimport { TableContext } from './context';\n\nconst TableRoot = styled('table')<{\n $stickyHeader?: boolean;\n $maxContext?: boolean;\n}>(({ theme, $stickyHeader, $maxContext }) => ({\n display: 'table',\n width: '100%',\n borderCollapse: 'collapse',\n borderSpacing: 0,\n '& caption': {\n textAlign: 'left',\n padding: theme.layout.spacing.md,\n color: theme.palette.accents_5,\n },\n ...($stickyHeader && {\n borderCollapse: 'separate',\n width: '100%',\n minWidth: '100%',\n }),\n ...($maxContext && {\n width: 'max-content',\n }),\n}));\n\ninterface TableInnerProps {\n padding?: 'normal' | 'none';\n size?: 'small' | 'medium';\n stickyHeader?: boolean;\n className?: string;\n style?: React.CSSProperties;\n tableWrapperClassName?: string;\n maxContext?: boolean;\n wrapperStyle?: React.CSSProperties;\n}\n\nexport type { TableInnerProps as TableProps };\n\nconst TableWrapper = styled.div<{ atStart?: boolean; atEnd?: boolean }>`\n ${({ atStart }) =>\n atStart &&\n css`\n .table-cell--fixed-last-left:after {\n box-shadow: unset;\n }\n `}\n ${({ atEnd }) =>\n atEnd &&\n css`\n .table-cell--fixed-last-right:before {\n box-shadow: unset;\n }\n `}\n`;\n\nexport const Table = React.forwardRef<HTMLTableElement, React.PropsWithChildren<TableInnerProps>>(\n (props, ref) => {\n const {\n padding = 'normal',\n size = 'medium',\n stickyHeader = false,\n className,\n tableWrapperClassName,\n maxContext,\n wrapperStyle,\n ...other\n } = props;\n\n const table = React.useMemo(\n () => ({\n padding,\n size,\n stickyHeader,\n }),\n [padding, size, stickyHeader]\n );\n\n const wrapperRef = React.useRef<HTMLDivElement>(null);\n const [scrollStatus, setScrollStatus] = React.useState<{ atStart: boolean; atEnd: boolean }>({\n atStart: true,\n atEnd: false,\n });\n\n React.useEffect(() => {\n // const throttle = (func: () => void, limit: number) => {\n // let lastFunc: ReturnType<typeof setTimeout>;\n // let lastRan: number;\n // return () => {\n // const now = Date.now();\n // if (!lastRan) {\n // func();\n // lastRan = now;\n // } else {\n // clearTimeout(lastFunc);\n // lastFunc = setTimeout(() => {\n // if (Date.now() - lastRan >= limit) {\n // func();\n // lastRan = Date.now();\n // }\n // }, limit - (now - lastRan));\n // }\n // };\n // };\n\n const handleScroll = () => {\n if (wrapperRef.current) {\n const { scrollLeft, scrollWidth, clientWidth } = wrapperRef.current;\n setScrollStatus({\n atStart: scrollLeft === 0,\n atEnd: scrollLeft + clientWidth >= scrollWidth,\n });\n }\n };\n\n const throttledHandleScroll = throttle(handleScroll, 200);\n\n const wrapper = wrapperRef.current;\n if (wrapper) {\n throttledHandleScroll();\n wrapper.addEventListener('scroll', throttledHandleScroll);\n\n const resizeObserver = new ResizeObserver(throttledHandleScroll);\n resizeObserver.observe(wrapper);\n\n return () => {\n wrapper.removeEventListener('scroll', throttledHandleScroll);\n resizeObserver.disconnect();\n };\n }\n\n return () => {};\n }, []);\n\n return (\n <TableContext.Provider value={table}>\n <TableWrapper\n ref={wrapperRef}\n className={cx(tableWrapperClassName, 'kube-table-wrapper')}\n atStart={scrollStatus.atStart}\n atEnd={scrollStatus.atEnd}\n style={wrapperStyle ?? {}}\n >\n <TableRoot\n {...other}\n $stickyHeader={stickyHeader}\n $maxContext={maxContext}\n ref={ref}\n className={cx(className, 'kube-table', {\n 'kube-table--max-context': maxContext,\n })}\n />\n </TableWrapper>\n </TableContext.Provider>\n );\n }\n);\n"],"names":["y","E","P","z","I","v"],"mappings":";;;;;;AAAA,IAAI,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,yBAAyB,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CA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,CAACC,YAAC,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAACC,CAAC,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAACH,GAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAACG,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;;;;"}
@@ -1,2 +1,2 @@
1
- import d from"styled-components";import*as o from"react";import v from"classnames";import{TableLvContext as y}from"./context.js";var u=Object.defineProperty,O=Object.defineProperties,j=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable,f=(r,e,a)=>e in r?u(r,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[e]=a,i=(r,e)=>{for(var a in e||(e={}))n.call(e,a)&&f(r,a,e[a]);if(l)for(var a of l(e))c.call(e,a)&&f(r,a,e[a]);return r},h=(r,e)=>O(r,j(e)),w=(r,e)=>{var a={};for(var t in r)n.call(r,t)&&e.indexOf(t)<0&&(a[t]=r[t]);if(r!=null&&l)for(var t of l(r))e.indexOf(t)<0&&c.call(r,t)&&(a[t]=r[t]);return a};const x=d("tbody").attrs(({className:r})=>v(r,"kube-table-body"))(()=>({display:"table-row-group"})),p={variant:"body",hasBorder:!1},B=o.forwardRef((r,e)=>{var a=r,{className:t,hasBorder:s=p.hasBorder}=a,b=w(a,["className","hasBorder"]);const m=o.useMemo(()=>h(i({},p),{hasBorder:s}),[s]);return o.createElement(y.Provider,{value:m},o.createElement(x,i({ref:e},b)))});export{B as TableBody};
1
+ import d from"styled-components";import*as o from"react";import v from"classnames";import{TableLvContext as y}from"./context.js";var u=Object.defineProperty,O=Object.defineProperties,j=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable,f=(r,e,a)=>e in r?u(r,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[e]=a,i=(r,e)=>{for(var a in e||(e={}))n.call(e,a)&&f(r,a,e[a]);if(l)for(var a of l(e))c.call(e,a)&&f(r,a,e[a]);return r},P=(r,e)=>O(r,j(e)),h=(r,e)=>{var a={};for(var t in r)n.call(r,t)&&e.indexOf(t)<0&&(a[t]=r[t]);if(r!=null&&l)for(var t of l(r))e.indexOf(t)<0&&c.call(r,t)&&(a[t]=r[t]);return a};const w=d("tbody").attrs(({className:r})=>v(r,"kube-table-body"))(()=>({display:"table-row-group"})),p={variant:"body",hasBorder:!1},x=o.forwardRef((r,e)=>{var a=r,{className:t,hasBorder:s=p.hasBorder}=a,b=h(a,["className","hasBorder"]);const m=o.useMemo(()=>P(i({},p),{hasBorder:s}),[s]);return o.createElement(y.Provider,{value:m},o.createElement(w,i({ref:e},b)))});export{x as TableBody};
2
2
  //# sourceMappingURL=TableBody.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TableBody.js","sources":["../../../src/Table/BaseTable/TableBody.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport * as React from 'react';\nimport cx from 'classnames';\nimport { TableLvContext } from './context';\n\nconst TableBodyRoot = styled('tbody').attrs(({ className }) => cx(className, 'kube-table-body'))(\n () => ({\n display: 'table-row-group',\n })\n);\n\ninterface TableBodyProps {\n className?: string;\n style?: React.CSSProperties;\n hasBorder?: boolean;\n}\n\nconst tableLv = {\n variant: 'body',\n hasBorder: false,\n} as const;\n\nexport const TableBody = React.forwardRef<\n HTMLTableSectionElement,\n React.PropsWithChildren<TableBodyProps>\n>(({ className, hasBorder = tableLv.hasBorder, ...other }, ref) => {\n const lv = React.useMemo(() => ({ ...tableLv, hasBorder }), [hasBorder]);\n return (\n <TableLvContext.Provider value={lv}>\n <TableBodyRoot ref={ref} {...other} />\n </TableLvContext.Provider>\n );\n});\n"],"names":["B","P","s","o","u"],"mappings":";;;;;AAAA,IAAI,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,yBAAyB,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC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AC,SAAS,CAACC,GAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAACD,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAACC,GAAC,CAAC,CAAC,CAAC,CAACA,GAAC,CAAC,CAAC,CAAC,OAAOD,CAAC,CAAC,aAAa,CAACE,cAAC,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAACF,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;;;;"}
1
+ {"version":3,"file":"TableBody.js","sources":["../../../src/Table/BaseTable/TableBody.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport * as React from 'react';\nimport cx from 'classnames';\nimport { TableLvContext } from './context';\n\nconst TableBodyRoot = styled('tbody').attrs(({ className }) => cx(className, 'kube-table-body'))(\n () => ({\n display: 'table-row-group',\n })\n);\n\ninterface TableBodyProps {\n className?: string;\n style?: React.CSSProperties;\n hasBorder?: boolean;\n}\n\nconst tableLv = {\n variant: 'body',\n hasBorder: false,\n} as const;\n\nexport const TableBody = React.forwardRef<\n HTMLTableSectionElement,\n React.PropsWithChildren<TableBodyProps>\n>(({ className, hasBorder = tableLv.hasBorder, ...other }, ref) => {\n const lv = React.useMemo(() => ({ ...tableLv, hasBorder }), [hasBorder]);\n return (\n <TableLvContext.Provider value={lv}>\n <TableBodyRoot ref={ref} {...other} />\n </TableLvContext.Provider>\n );\n});\n"],"names":["B","s","o","u"],"mappings":";;;;;AAAA,IAAI,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAA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ACF,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;;;;"}
@@ -1,2 +1,2 @@
1
- import j from"styled-components";import*as w from"react";import R from"classnames";import{useTableContext as B,useTableLvContext as C}from"./context.js";var H=Object.defineProperty,P=Object.defineProperties,W=Object.getOwnPropertyDescriptors,x=Object.getOwnPropertySymbols,L=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable,k=(e,i,t)=>i in e?H(e,i,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[i]=t,r=(e,i)=>{for(var t in i||(i={}))L.call(i,t)&&k(e,t,i[t]);if(x)for(var t of x(i))S.call(i,t)&&k(e,t,i[t]);return e},z=(e,i)=>P(e,W(i)),I=(e,i)=>{var t={};for(var a in e)L.call(e,a)&&i.indexOf(a)<0&&(t[a]=e[a]);if(e!=null&&x)for(var a of x(e))i.indexOf(a)<0&&S.call(e,a)&&(t[a]=e[a]);return t};const E=j.td(({theme:e,$ownerState:{ariaSort:i,variant:t="body",padding:a="normal",size:l="medium",align:p="left",stickyHeader:h=!1,fixed:d,fixedWidth:m,fixedLastLeft:b,fixedLastRight:g,hasBorder:y=!1,width:o}})=>{const f=a==="none"?"0px":{"head-small":"8px 12px","head-medium":"16px 12px","body-small":"4px 8px","body-medium":"8px 12px"}[`${t}-${l}`],c={textAlign:p,flexDirection:{right:"row-reverse"}[p]};return r(r(r(z(r(r(z(r(r(r(r(r(r({display:"table-cell",verticalAlign:"inherit"},o&&{width:typeof o=="number"?`${o}px`:o,minWidth:typeof o=="number"?`${o}px`:o}),l&&{height:{"body-medium":"56px"}[`${t}-${l}`]}),y&&{borderLeft:`1px solid ${e.palette.accents_1}`,"&:last-child":{borderRight:`1px solid ${e.palette.accents_1}`}}),i&&{ariaSort:i==="asc"?"ascending":"descending"}),t==="head"&&{color:e.palette.accents_5,fontWeight:600,fontSize:e.font.fontSizeBase,fontFamily:e.font.mono,lineHeight:1.67}),t==="body"&&{color:e.palette.accents_8}),{padding:f}),c),d&&{position:"sticky",[d]:m,zIndex:1,backgroundColor:e.palette.background}),{"&.with-sticky":{position:"sticky",top:0,zIndex:d?3:2,backgroundColor:"white"}}),h&&{position:"sticky",top:0,zIndex:d?3:2}),b&&{"&:after":{content:'""',position:"absolute",top:0,right:0,bottom:0,width:30,transform:"translateX(100%)",pointerEvents:"none",boxShadow:"inset 10px 0 8px -8px #0505050f"}}),g&&{"&:before":{content:'""',position:"absolute",top:0,left:0,bottom:0,width:30,transform:"translateX(-100%)",pointerEvents:"none",boxShadow:"inset -10px 0 8px -8px #0505050f"}})}),T=w.forwardRef((e,i)=>{var t=e,{className:a,children:l,ariaSort:p,variant:h,padding:d="normal",size:m="medium",align:b="left",fixed:g,fixedWidth:y,fixedLastLeft:o,fixedLastRight:f,hasBorder:c}=t,v=I(t,["className","children","ariaSort","variant","padding","size","align","fixed","fixedWidth","fixedLastLeft","fixedLastRight","hasBorder"]);const n=B(),s=C(),u=h||s&&s.variant,$={ariaSort:p,variant:u,padding:d||(n&&n.padding?n.padding:"normal"),size:m||(n&&n.size?n.size:"medium"),align:b,stickyHeader:u==="head"&&n&&n.stickyHeader,fixed:g,fixedWidth:y,fixedLastLeft:o,fixedLastRight:f,hasBorder:c??(s&&s.hasBorder),width:v.width},O=s&&s.variant==="head"?"th":"td";return w.createElement(E,r({as:O,className:R("table-cell",{"with-sticky":!!(u==="head"&&n&&n.stickyHeader),"table-cell--fixed-last-left":o,"table-cell--fixed-last-right":f},a),$ownerState:$,ref:i},v),l)});export{T as TableCell};
1
+ import j from"styled-components";import*as w from"react";import P from"classnames";import{useTableContext as R,useTableLvContext as B}from"./context.js";var C=Object.defineProperty,H=Object.defineProperties,W=Object.getOwnPropertyDescriptors,x=Object.getOwnPropertySymbols,L=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable,S=(e,i,t)=>i in e?C(e,i,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[i]=t,r=(e,i)=>{for(var t in i||(i={}))L.call(i,t)&&S(e,t,i[t]);if(x)for(var t of x(i))k.call(i,t)&&S(e,t,i[t]);return e},z=(e,i)=>H(e,W(i)),I=(e,i)=>{var t={};for(var a in e)L.call(e,a)&&i.indexOf(a)<0&&(t[a]=e[a]);if(e!=null&&x)for(var a of x(e))i.indexOf(a)<0&&k.call(e,a)&&(t[a]=e[a]);return t};const E=j.td(({theme:e,$ownerState:{ariaSort:i,variant:t="body",padding:a="normal",size:l="medium",align:p="left",stickyHeader:h=!1,fixed:d,fixedWidth:m,fixedLastLeft:b,fixedLastRight:g,hasBorder:y=!1,width:o}})=>{const f=a==="none"?"0px":{"head-small":"8px 12px","head-medium":"16px 12px","body-small":"4px 8px","body-medium":"8px 12px"}[`${t}-${l}`],c={textAlign:p,flexDirection:{right:"row-reverse"}[p]};return r(r(r(z(r(r(z(r(r(r(r(r(r({display:"table-cell",verticalAlign:"inherit"},o&&{width:typeof o=="number"?`${o}px`:o,minWidth:typeof o=="number"?`${o}px`:o}),l&&{height:{"body-medium":"56px"}[`${t}-${l}`]}),y&&{borderLeft:`1px solid ${e.palette.accents_1}`,"&:last-child":{borderRight:`1px solid ${e.palette.accents_1}`}}),i&&{ariaSort:i==="asc"?"ascending":"descending"}),t==="head"&&{color:e.palette.accents_5,fontWeight:600,fontSize:e.font.fontSizeBase,fontFamily:e.font.mono,lineHeight:1.67}),t==="body"&&{color:e.palette.accents_8}),{padding:f}),c),d&&{position:"sticky",[d]:m,zIndex:1,backgroundColor:e.palette.background}),{"&.with-sticky":{position:"sticky",top:0,zIndex:d?3:2,backgroundColor:"white"}}),h&&{position:"sticky",top:0,zIndex:d?3:2}),b&&{"&:after":{content:'""',position:"absolute",top:0,right:0,bottom:0,width:30,transform:"translateX(100%)",pointerEvents:"none",boxShadow:"inset 10px 0 8px -8px #0505050f"}}),g&&{"&:before":{content:'""',position:"absolute",top:0,left:0,bottom:0,width:30,transform:"translateX(-100%)",pointerEvents:"none",boxShadow:"inset -10px 0 8px -8px #0505050f"}})}),T=w.forwardRef((e,i)=>{var t=e,{className:a,children:l,ariaSort:p,variant:h,padding:d="normal",size:m="medium",align:b="left",fixed:g,fixedWidth:y,fixedLastLeft:o,fixedLastRight:f,hasBorder:c}=t,v=I(t,["className","children","ariaSort","variant","padding","size","align","fixed","fixedWidth","fixedLastLeft","fixedLastRight","hasBorder"]);const n=R(),s=B(),u=h||s&&s.variant,$={ariaSort:p,variant:u,padding:d||(n&&n.padding?n.padding:"normal"),size:m||(n&&n.size?n.size:"medium"),align:b,stickyHeader:u==="head"&&n&&n.stickyHeader,fixed:g,fixedWidth:y,fixedLastLeft:o,fixedLastRight:f,hasBorder:c??(s&&s.hasBorder),width:v.width},O=s&&s.variant==="head"?"th":"td";return w.createElement(E,r({as:O,className:P("table-cell",{"with-sticky":!!(u==="head"&&n&&n.stickyHeader),"table-cell--fixed-last-left":o,"table-cell--fixed-last-right":f},a),$ownerState:$,ref:i},v),l)});export{T as TableCell};
2
2
  //# sourceMappingURL=TableCell.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CreateButton.styles.js","sources":["../../../../src/Table/BaseTable/TableEmpty/CreateButton.styles.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { Button } from '../../../index';\n\nexport const StyledButton = styled(Button).attrs({\n color: 'secondary',\n shadow: true,\n})`\n min-width: 96px;\n`;\n"],"names":["t","o"],"mappings":";;;AAAqF,MAAC,YAAY,CAACA,CAAC,CAACC,MAAC,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC7I;AACA;;;;"}
1
+ {"version":3,"file":"CreateButton.styles.js","sources":["../../../../src/Table/BaseTable/TableEmpty/CreateButton.styles.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { Button } from '../../../index';\n\nexport const StyledButton = styled(Button).attrs({\n color: 'secondary',\n shadow: true,\n})`\n min-width: 96px;\n`;\n"],"names":["o"],"mappings":";;;AAAqF,MAAC,YAAY,CAAC,CAAC,CAACA,MAAC,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC7I;AACA;;;;"}
@@ -1,8 +1,8 @@
1
- import p from"styled-components";import{Empty as t}from"../../../Empty/Empty.js";const o=p(t)`
1
+ import t from"styled-components";import{Empty as p}from"../../../Empty/Empty.js";const o=t(p)`
2
2
  width: 100%;
3
3
  padding: 20px 0;
4
4
  background: #fff;
5
- `,d=p.div`
5
+ `,d=t.div`
6
6
  padding-top: 20px;
7
7
  `;export{d as ButtonWrapper,o as StyledEmpty};
8
8
  //# sourceMappingURL=index.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.styles.js","sources":["../../../../src/Table/BaseTable/TableEmpty/index.styles.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { Empty } from '../../../index';\n\nexport const StyledEmpty = styled(Empty)`\n width: 100%;\n padding: 20px 0;\n background: #fff;\n`;\n\nexport const ButtonWrapper = styled.div`\n padding-top: 20px;\n`;\n"],"names":["t","p"],"mappings":";;;AAAoF,MAAC,WAAW,CAACA,CAAC,CAACC,KAAC,CAAC,CAAC;AACtG;AACA;AACA;AACA,CAAC,CAAC,aAAa,CAACD,CAAC,CAAC,GAAG,CAAC;AACtB;AACA;;;;"}
1
+ {"version":3,"file":"index.styles.js","sources":["../../../../src/Table/BaseTable/TableEmpty/index.styles.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { Empty } from '../../../index';\n\nexport const StyledEmpty = styled(Empty)`\n width: 100%;\n padding: 20px 0;\n background: #fff;\n`;\n\nexport const ButtonWrapper = styled.div`\n padding-top: 20px;\n`;\n"],"names":["p"],"mappings":";;;AAAoF,MAAC,WAAW,CAAC,CAAC,CAACA,KAAC,CAAC,CAAC;AACtG;AACA;AACA;AACA,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG,CAAC;AACtB;AACA;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Description.styles.js","sources":["../../../../src/Table/BaseTable/TableFilteredEmpty/Description.styles.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { themeUtils } from '../../../index';\n\nexport const LinkButton = styled.span`\n color: ${({ theme }) => themeUtils.getColor('blue', theme)};\n padding: 0 4px;\n cursor: pointer;\n font-weight: 600;\n`;\n"],"names":["t","e"],"mappings":";;;AAAyF,MAAC,UAAU,CAACA,CAAC,CAAC,IAAI,CAAC;AAC5G,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAGC,GAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AAC7C;AACA;AACA;AACA;;;;"}
1
+ {"version":3,"file":"Description.styles.js","sources":["../../../../src/Table/BaseTable/TableFilteredEmpty/Description.styles.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { themeUtils } from '../../../index';\n\nexport const LinkButton = styled.span`\n color: ${({ theme }) => themeUtils.getColor('blue', theme)};\n padding: 0 4px;\n cursor: pointer;\n font-weight: 600;\n`;\n"],"names":[],"mappings":";;;AAAyF,MAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC;AAC5G,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AAC7C;AACA;AACA;AACA;;;;"}
@@ -1,2 +1,2 @@
1
- import h from"classnames";import*as s from"react";import u from"styled-components";import{useTableContext as k,TableLvContext as O}from"./context.js";var x=Object.defineProperty,w=Object.defineProperties,B=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable,b=(e,r,o)=>r in e?x(e,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[r]=o,l=(e,r)=>{for(var o in r||(r={}))d.call(r,o)&&b(e,o,r[o]);if(n)for(var o of n(r))p.call(r,o)&&b(e,o,r[o]);return e},c=(e,r)=>w(e,B(r)),T=(e,r)=>{var o={};for(var a in e)d.call(e,a)&&r.indexOf(a)<0&&(o[a]=e[a]);if(e!=null&&n)for(var a of n(e))r.indexOf(a)<0&&p.call(e,a)&&(o[a]=e[a]);return o};const f={variant:"head",hasBorder:!1},j=u.thead(({$ownerState:{stickyHeader:e,hasBorderTop:r},theme:o})=>c(l(l({display:"table-header-group",backgroundColor:o.palette.background},e&&{position:"sticky",top:0,zIndex:2}),r&&{borderTop:`1px solid ${o.palette.accents_1}`}),{"&.with-sticky":{position:"sticky",top:0,zIndex:2}})),g=s.forwardRef((e,r)=>{var o=e,{className:a,hasBorderTop:m,hasBorder:i=f.hasBorder}=o,v=T(o,["className","hasBorderTop","hasBorder"]);const y=s.useMemo(()=>c(l({},f),{hasBorder:i}),[i]),t=k();return s.createElement(O.Provider,{value:y},s.createElement(j,c(l({},v),{$ownerState:{stickyHeader:t==null?void 0:t.stickyHeader,hasBorderTop:m},ref:r,className:h("kube-table-head",{"with-sticky":t==null?void 0:t.stickyHeader},a)})))});export{g as TableHead};
1
+ import h from"classnames";import*as s from"react";import u from"styled-components";import{useTableContext as k,TableLvContext as O}from"./context.js";var x=Object.defineProperty,w=Object.defineProperties,B=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable,b=(e,r,o)=>r in e?x(e,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[r]=o,l=(e,r)=>{for(var o in r||(r={}))d.call(r,o)&&b(e,o,r[o]);if(n)for(var o of n(r))p.call(r,o)&&b(e,o,r[o]);return e},c=(e,r)=>w(e,B(r)),T=(e,r)=>{var o={};for(var a in e)d.call(e,a)&&r.indexOf(a)<0&&(o[a]=e[a]);if(e!=null&&n)for(var a of n(e))r.indexOf(a)<0&&p.call(e,a)&&(o[a]=e[a]);return o};const f={variant:"head",hasBorder:!1},j=u.thead(({$ownerState:{stickyHeader:e,hasBorderTop:r},theme:o})=>c(l(l({display:"table-header-group",backgroundColor:o.palette.background},e&&{position:"sticky",top:0,zIndex:2}),r&&{borderTop:`1px solid ${o.palette.accents_1}`}),{"&.with-sticky":{position:"sticky",top:0,zIndex:2}})),P=s.forwardRef((e,r)=>{var o=e,{className:a,hasBorderTop:m,hasBorder:i=f.hasBorder}=o,v=T(o,["className","hasBorderTop","hasBorder"]);const y=s.useMemo(()=>c(l({},f),{hasBorder:i}),[i]),t=k();return s.createElement(O.Provider,{value:y},s.createElement(j,c(l({},v),{$ownerState:{stickyHeader:t==null?void 0:t.stickyHeader,hasBorderTop:m},ref:r,className:h("kube-table-head",{"with-sticky":t==null?void 0:t.stickyHeader},a)})))});export{P as TableHead};
2
2
  //# sourceMappingURL=TableHead.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TableHead.js","sources":["../../../src/Table/BaseTable/TableHead.tsx"],"sourcesContent":["import cx from 'classnames';\nimport * as React from 'react';\nimport styled from 'styled-components';\n\nimport { TableLvContext, useTableContext } from './context';\n\nconst tableLv = {\n variant: 'head',\n hasBorder: false,\n} as const;\n\ninterface TableHeadProps {\n className?: string;\n style?: React.CSSProperties;\n hasBorder?: boolean;\n hasBorderTop?: boolean;\n}\n\nconst TableHeadRoot = styled.thead<{\n $ownerState: {\n stickyHeader?: boolean;\n hasBorderTop?: boolean;\n };\n}>(({ $ownerState: { stickyHeader, hasBorderTop }, theme }) => ({\n display: 'table-header-group',\n backgroundColor: theme.palette.background,\n\n ...(stickyHeader && {\n position: 'sticky',\n top: 0,\n zIndex: 2,\n }),\n ...(hasBorderTop && {\n borderTop: `1px solid ${theme.palette.accents_1}`,\n }),\n '&.with-sticky': {\n position: 'sticky',\n top: 0,\n zIndex: 2,\n },\n}));\n\nexport const TableHead = React.forwardRef<\n HTMLTableSectionElement,\n React.PropsWithChildren<TableHeadProps>\n>(({ className, hasBorderTop, hasBorder = tableLv.hasBorder, ...rest }, ref) => {\n const lv = React.useMemo(() => ({ ...tableLv, hasBorder }), [hasBorder]);\n const table = useTableContext();\n\n return (\n <TableLvContext.Provider value={lv}>\n <TableHeadRoot\n {...rest}\n $ownerState={{\n stickyHeader: table?.stickyHeader,\n hasBorderTop,\n }}\n ref={ref}\n className={cx(\n 'kube-table-head',\n {\n 'with-sticky': table?.stickyHeader,\n },\n className\n )}\n />\n </TableLvContext.Provider>\n );\n});\n"],"names":["u","i","o","w","v","H"],"mappings":";;;;;AAAA,IAAI,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,yBAAyB,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,C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AC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;;;;"}
1
+ {"version":3,"file":"TableHead.js","sources":["../../../src/Table/BaseTable/TableHead.tsx"],"sourcesContent":["import cx from 'classnames';\nimport * as React from 'react';\nimport styled from 'styled-components';\n\nimport { TableLvContext, useTableContext } from './context';\n\nconst tableLv = {\n variant: 'head',\n hasBorder: false,\n} as const;\n\ninterface TableHeadProps {\n className?: string;\n style?: React.CSSProperties;\n hasBorder?: boolean;\n hasBorderTop?: boolean;\n}\n\nconst TableHeadRoot = styled.thead<{\n $ownerState: {\n stickyHeader?: boolean;\n hasBorderTop?: boolean;\n };\n}>(({ $ownerState: { stickyHeader, hasBorderTop }, theme }) => ({\n display: 'table-header-group',\n backgroundColor: theme.palette.background,\n\n ...(stickyHeader && {\n position: 'sticky',\n top: 0,\n zIndex: 2,\n }),\n ...(hasBorderTop && {\n borderTop: `1px solid ${theme.palette.accents_1}`,\n }),\n '&.with-sticky': {\n position: 'sticky',\n top: 0,\n zIndex: 2,\n },\n}));\n\nexport const TableHead = React.forwardRef<\n HTMLTableSectionElement,\n React.PropsWithChildren<TableHeadProps>\n>(({ className, hasBorderTop, hasBorder = tableLv.hasBorder, ...rest }, ref) => {\n const lv = React.useMemo(() => ({ ...tableLv, hasBorder }), [hasBorder]);\n const table = useTableContext();\n\n return (\n <TableLvContext.Provider value={lv}>\n <TableHeadRoot\n {...rest}\n $ownerState={{\n stickyHeader: table?.stickyHeader,\n hasBorderTop,\n }}\n ref={ref}\n className={cx(\n 'kube-table-head',\n {\n 'with-sticky': table?.stickyHeader,\n },\n className\n )}\n />\n </TableLvContext.Provider>\n );\n});\n"],"names":["u","i","P","o","w","v","H"],"mappings":";;;;;AAAA,IAAI,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,yBAAyB,CAAC,IAAI,CAA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C,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAACF,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAACE,GAAC,CAAC,CAAC,CAAC,CAACA,GAAC,CAAC,CAAC,CAAC,CAAC,CAACC,eAAC,EAAE,CAAC,OAAOH,CAAC,CAAC,aAAa,CAACI,cAAC,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAACJ,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,YAAY,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAACK,CAAC,CAAC,iBAAiB,CAAC,CAAC,aAAa,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.styles.js","sources":["../../../../src/Table/BaseTable/Toolbar/index.styles.ts"],"sourcesContent":["import styled from 'styled-components';\n\nexport const ToolbarWrapper = styled.div`\n position: relative;\n padding: 10px 20px;\n background-color: ${({ theme }) => theme.palette.accents_0};\n -webkit-box-shadow: 0 1px 0 0 ${({ theme }) => theme.palette.accents_1};\n box-shadow: 0 1px 0 0 ${({ theme }) => theme.palette.accents_1};\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n\n .toolbar-item,\n .toolbar-left,\n .toolbar-right {\n display: flex;\n align-items: center;\n gap: 12px;\n flex-basis: auto;\n flex-grow: 0;\n flex-shrink: 0;\n }\n\n .toolbar-item {\n flex-grow: 1;\n justify-content: center;\n }\n\n .toolbar-left {\n justify-content: flex-start;\n }\n\n .toolbar-right {\n justify-content: flex-end;\n }\n`;\n\nexport const ToolbarInner = styled.div`\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n /* .btn-refresh,\n .btn-setting {\n margin-left: 12px;\n } */\n\n .menu-setting {\n padding: 4px 0;\n color: ${({ theme }) => theme.palette.background};\n background-color: ${({ theme }) => theme.palette.accents_8};\n\n .menu-label {\n color: ${({ theme }) => theme.palette.background};\n padding: 8px 12px;\n }\n\n button {\n padding: 6px 12px;\n line-height: 20px;\n color: ${({ theme }) => theme.palette.background};\n font-weight: 400;\n &:hover {\n background-color: ${({ theme }) => theme.palette.accents_7};\n }\n }\n }\n`;\n\nexport const BatchActions = styled.div`\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 9;\n padding: 10px 20px;\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n background-color: ${({ theme }) => theme.palette.accents_8};\n display: flex;\n justify-content: space-between;\n align-items: center;\n\n .cancel-select {\n color: ${({ theme }) => theme.palette.background};\n &:hover {\n background-color: ${({ theme }) => theme.palette.accents_7};\n }\n }\n`;\n"],"names":[],"mappings":";;AAA6C,MAAC,cAAc,CAAC,CAAC,CAAC,GAAG,CAAC;AACnE;AACA;AACA,oBAAoB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AACvD,gCAAgC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AACnE,wBAAwB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AAC3D;AACA;AACA;AACA;AACA;AAC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../../../src/Table/BaseTable/Toolbar/index.styles.ts"],"sourcesContent":["import styled from 'styled-components';\n\nexport const ToolbarWrapper = styled.div`\n position: relative;\n padding: 10px 20px;\n background-color: ${({ theme }) => theme.palette.accents_0};\n -webkit-box-shadow: 0 1px 0 0 ${({ theme }) => theme.palette.accents_1};\n box-shadow: 0 1px 0 0 ${({ theme }) => theme.palette.accents_1};\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n\n .toolbar-item,\n .toolbar-left,\n .toolbar-right {\n display: flex;\n align-items: center;\n gap: 12px;\n flex-basis: auto;\n flex-grow: 0;\n flex-shrink: 0;\n }\n\n .toolbar-item {\n flex-grow: 1;\n justify-content: center;\n }\n\n .toolbar-left {\n justify-content: flex-start;\n }\n\n .toolbar-right {\n justify-content: flex-end;\n }\n`;\n\nexport const ToolbarInner = styled.div`\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n /* .btn-refresh,\n .btn-setting {\n margin-left: 12px;\n } */\n\n .menu-setting {\n padding: 4px 0;\n color: ${({ theme }) => theme.palette.background};\n background-color: ${({ theme }) => theme.palette.accents_8};\n\n .menu-label {\n color: ${({ theme }) => theme.palette.background};\n padding: 8px 12px;\n }\n\n button {\n padding: 6px 12px;\n line-height: 20px;\n color: ${({ theme }) => theme.palette.background};\n font-weight: 400;\n &:hover {\n background-color: ${({ theme }) => theme.palette.accents_7};\n }\n }\n }\n`;\n\nexport const BatchActions = styled.div`\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 9;\n padding: 10px 20px;\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n background-color: ${({ theme }) => theme.palette.accents_8};\n display: flex;\n justify-content: space-between;\n align-items: center;\n\n .cancel-select {\n color: ${({ theme }) => theme.palette.background};\n &:hover {\n background-color: ${({ theme }) => theme.palette.accents_7};\n }\n }\n`;\n"],"names":["e"],"mappings":";;AAA6C,MAAC,cAAc,CAACA,CAAC,CAAC,GAAG,CAAC;AACnE;AAC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AC,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AACvD;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;AAC/C;AACA,wBAAwB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AAC3D;AACA;AACA;;;;"}
@@ -1,2 +1,2 @@
1
- import r from"classnames";import*as a from"react";import{BaseDataTable as n}from"./BaseTable.js";import{TableFooter as m,Pagination as i}from"./Pagination.js";import{Toolbar as s}from"./Toolbar.js";function b({className:t,table:e}){const{options:{meta:{enable:{pagination:o,toolbar:l}={}}={}}={}}=e;return a.createElement("div",{className:r("table-container",t)},!!l&&a.createElement(s,{table:e}),a.createElement(n,{table:e}),!!o&&a.createElement(m,null,a.createElement(i,{table:e})))}export{b as DataTable};
1
+ import l from"classnames";import*as e from"react";import{BaseDataTable as n}from"./BaseTable.js";import{TableFooter as m,Pagination as i}from"./Pagination.js";import{Toolbar as s}from"./Toolbar.js";function b({className:t,table:a}){const{options:{meta:{enable:{pagination:o,toolbar:r}={}}={}}={}}=a;return e.createElement("div",{className:l("table-container",t)},!!r&&e.createElement(s,{table:a}),e.createElement(n,{table:a}),!!o&&e.createElement(m,null,e.createElement(i,{table:a})))}export{b as DataTable};
2
2
  //# sourceMappingURL=Table.js.map