@chotot/clad-ui 3.0.0-next.6 → 3.0.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 (258) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +9 -9
  3. package/dist/{chunk-Bmb41Sf3.cjs → _virtual/_rolldown/runtime.cjs} +1 -1
  4. package/dist/brand/ChototLogoText.cjs +1 -0
  5. package/dist/brand/ChototLogoText.es.js +15 -0
  6. package/dist/brand/CtC2C.cjs +1 -0
  7. package/dist/brand/CtC2C.es.js +18 -0
  8. package/dist/brand/CtProperty.cjs +1 -0
  9. package/dist/brand/CtProperty.es.js +204 -0
  10. package/dist/brand/CtVehicle.cjs +1 -0
  11. package/dist/brand/CtVehicle.es.js +70 -0
  12. package/dist/brand/Tot.cjs +1 -0
  13. package/dist/brand/Tot.es.js +17 -0
  14. package/dist/components/Announcer/Announcer.cjs +1 -0
  15. package/dist/components/Announcer/Announcer.es.js +100 -0
  16. package/dist/components/Announcer/announcer.styles.cjs +1 -0
  17. package/dist/components/Announcer/announcer.styles.es.js +24 -0
  18. package/dist/components/Badge/Badge.cjs +1 -0
  19. package/dist/components/Badge/Badge.es.js +83 -0
  20. package/dist/components/Badge/badge.styles.cjs +1 -0
  21. package/dist/components/Badge/badge.styles.es.js +83 -0
  22. package/dist/components/Box/Box.cjs +1 -0
  23. package/dist/components/Box/Box.es.js +72 -0
  24. package/dist/components/Breadcrumbs/BreadcrumbItem.cjs +1 -0
  25. package/dist/components/Breadcrumbs/BreadcrumbItem.es.js +17 -0
  26. package/dist/components/Breadcrumbs/Breadcrumbs.cjs +1 -0
  27. package/dist/components/Breadcrumbs/Breadcrumbs.es.js +44 -0
  28. package/dist/components/Breadcrumbs/breadcrumbs.styles.cjs +1 -0
  29. package/dist/components/Breadcrumbs/breadcrumbs.styles.es.js +5 -0
  30. package/dist/components/Button/Button.cjs +1 -0
  31. package/dist/components/Button/Button.es.js +41 -0
  32. package/dist/components/Button/ButtonLink.cjs +1 -0
  33. package/dist/components/Button/ButtonLink.es.js +5 -0
  34. package/dist/components/Button/GhostButton.cjs +1 -0
  35. package/dist/components/Button/GhostButton.es.js +25 -0
  36. package/dist/components/Button/IconButton.cjs +1 -0
  37. package/dist/components/Button/IconButton.es.js +13 -0
  38. package/dist/components/Button/button.styles.cjs +1 -0
  39. package/dist/components/Button/button.styles.es.js +100 -0
  40. package/dist/components/Checkbox/Checkbox.cjs +1 -0
  41. package/dist/components/Checkbox/Checkbox.es.js +43 -0
  42. package/dist/components/Checkbox/checkbox.styles.cjs +1 -0
  43. package/dist/components/Checkbox/checkbox.styles.es.js +15 -0
  44. package/dist/components/Chip/Chip.cjs +1 -0
  45. package/dist/components/Chip/Chip.es.js +35 -0
  46. package/dist/components/Chip/chip.styles.cjs +1 -0
  47. package/dist/components/Chip/chip.styles.es.js +33 -0
  48. package/dist/components/CurrencyInput/CurrencyInput.cjs +1 -0
  49. package/dist/components/CurrencyInput/CurrencyInput.es.js +142 -0
  50. package/dist/components/CurrencyInput/currency-input.styles.cjs +1 -0
  51. package/dist/components/CurrencyInput/currency-input.styles.es.js +13 -0
  52. package/dist/components/CurrencyInput/utils.cjs +1 -0
  53. package/dist/components/CurrencyInput/utils.es.js +30 -0
  54. package/dist/components/DatePicker/DatePicker.cjs +1 -0
  55. package/dist/components/DatePicker/DatePicker.es.js +354 -0
  56. package/dist/components/DatePicker/DateTimePicker.cjs +1 -0
  57. package/dist/components/DatePicker/DateTimePicker.es.js +416 -0
  58. package/dist/components/DatePicker/date-picker.styles.cjs +1 -0
  59. package/dist/components/DatePicker/date-picker.styles.es.js +8 -0
  60. package/dist/components/DatePicker/date-time-picker.styles.cjs +1 -0
  61. package/dist/components/DatePicker/date-time-picker.styles.es.js +8 -0
  62. package/dist/components/DatePicker/index.d.ts +2 -1
  63. package/dist/components/DatePicker/types.cjs +1 -0
  64. package/dist/components/DatePicker/types.es.js +6 -0
  65. package/dist/components/Drawer/Drawer.cjs +1 -0
  66. package/dist/components/Drawer/Drawer.es.js +407 -0
  67. package/dist/components/Dropdown/Dropdown.cjs +1 -0
  68. package/dist/components/Dropdown/Dropdown.es.js +145 -0
  69. package/dist/components/Dropdown/dropdown.styles.cjs +1 -0
  70. package/dist/components/Dropdown/dropdown.styles.es.js +12 -0
  71. package/dist/components/EmptyState/EmptyState.cjs +2 -0
  72. package/dist/components/EmptyState/EmptyState.es.js +114 -0
  73. package/dist/components/EmptyState/empty-state.styles.cjs +1 -0
  74. package/dist/components/EmptyState/empty-state.styles.es.js +5 -0
  75. package/dist/components/Grid/Col.cjs +1 -0
  76. package/dist/components/Grid/Col.es.js +37 -0
  77. package/dist/components/Grid/Grid.cjs +1 -0
  78. package/dist/components/Grid/Grid.es.js +66 -0
  79. package/dist/components/Input/Input.cjs +1 -0
  80. package/dist/components/Input/Input.es.js +122 -0
  81. package/dist/components/Input/input.styles.cjs +1 -0
  82. package/dist/components/Input/input.styles.es.js +14 -0
  83. package/dist/components/InputGroup/InputGroup.cjs +1 -0
  84. package/dist/components/InputGroup/InputGroup.es.js +16 -0
  85. package/dist/components/InputGroup/input-group.styles.cjs +1 -0
  86. package/dist/components/InputGroup/input-group.styles.es.js +12 -0
  87. package/dist/components/LegacyDialog/DialogMainIcon.cjs +1 -0
  88. package/dist/components/LegacyDialog/DialogMainIcon.es.js +52 -0
  89. package/dist/components/LegacyDialog/LegacyDialog.cjs +1 -0
  90. package/dist/components/LegacyDialog/LegacyDialog.es.js +54 -0
  91. package/dist/components/LegacyPopup/LegacyPopup.cjs +1 -0
  92. package/dist/components/LegacyPopup/LegacyPopup.es.js +72 -0
  93. package/dist/components/MultiSearchDropdown/MultiSearchDropdown.cjs +1 -0
  94. package/dist/components/MultiSearchDropdown/MultiSearchDropdown.es.js +206 -0
  95. package/dist/components/MultiSearchDropdown/multi-search-dropdown.styles.cjs +1 -0
  96. package/dist/components/MultiSearchDropdown/multi-search-dropdown.styles.es.js +12 -0
  97. package/dist/components/Pagination/PageItem.cjs +1 -0
  98. package/dist/components/Pagination/PageItem.es.js +20 -0
  99. package/dist/components/Pagination/Pagination.cjs +1 -0
  100. package/dist/components/Pagination/Pagination.es.js +84 -0
  101. package/dist/components/Pagination/pagination.styles.cjs +1 -0
  102. package/dist/components/Pagination/pagination.styles.es.js +15 -0
  103. package/dist/components/Pagination/types.d.ts +1 -1
  104. package/dist/components/Popover/Popover.cjs +1 -0
  105. package/dist/components/Popover/Popover.es.js +54 -0
  106. package/dist/components/Popover/popover.styles.cjs +1 -0
  107. package/dist/components/Popover/popover.styles.es.js +5 -0
  108. package/dist/components/Popup/Popup.cjs +1 -0
  109. package/dist/components/Popup/Popup.es.js +148 -0
  110. package/dist/components/RadioButton/RadioButton.cjs +1 -0
  111. package/dist/components/RadioButton/RadioButton.es.js +61 -0
  112. package/dist/components/RadioButton/radio-button.styles.cjs +1 -0
  113. package/dist/components/RadioButton/radio-button.styles.es.js +15 -0
  114. package/dist/components/RangeInput/RangeInput.cjs +1 -0
  115. package/dist/components/RangeInput/RangeInput.es.js +32 -0
  116. package/dist/components/RangeInput/range-input.styles.cjs +1 -0
  117. package/dist/components/RangeInput/range-input.styles.es.js +5 -0
  118. package/dist/components/RowItem/RowItem.cjs +1 -0
  119. package/dist/components/RowItem/RowItem.es.js +56 -0
  120. package/dist/components/RowItem/rowitem.styles.cjs +1 -0
  121. package/dist/components/RowItem/rowitem.styles.es.js +23 -0
  122. package/dist/components/SearchInput/SearchInput.cjs +1 -0
  123. package/dist/components/SearchInput/SearchInput.es.js +129 -0
  124. package/dist/components/SearchInput/search-input.styles.cjs +1 -0
  125. package/dist/components/SearchInput/search-input.styles.es.js +12 -0
  126. package/dist/components/Searchbar/Searchbar.cjs +1 -0
  127. package/dist/components/Searchbar/Searchbar.es.js +51 -0
  128. package/dist/components/Searchbar/searchbar.styles.cjs +1 -0
  129. package/dist/components/Searchbar/searchbar.styles.es.js +5 -0
  130. package/dist/components/ShapeIcon/ShapeIcon.cjs +1 -0
  131. package/dist/components/ShapeIcon/ShapeIcon.es.js +22 -0
  132. package/dist/components/ShapeIcon/shape-icon.styles.cjs +1 -0
  133. package/dist/components/ShapeIcon/shape-icon.styles.es.js +65 -0
  134. package/dist/components/Slider/Slider.cjs +1 -0
  135. package/dist/components/Slider/Slider.es.js +169 -0
  136. package/dist/components/Slider/slider.styles.cjs +1 -0
  137. package/dist/components/Slider/slider.styles.es.js +5 -0
  138. package/dist/components/Snack/Snack.cjs +1 -0
  139. package/dist/components/Snack/Snack.es.js +69 -0
  140. package/dist/components/Snack/snack.styles.cjs +1 -0
  141. package/dist/components/Snack/snack.styles.es.js +13 -0
  142. package/dist/components/Tabs/Tab.cjs +1 -0
  143. package/dist/components/Tabs/Tab.es.js +42 -0
  144. package/dist/components/Tabs/Tabs.cjs +1 -0
  145. package/dist/components/Tabs/Tabs.es.js +80 -0
  146. package/dist/components/Tabs/tabs.styles.cjs +1 -0
  147. package/dist/components/Tabs/tabs.styles.es.js +33 -0
  148. package/dist/components/TagCloud/TagCloud.cjs +1 -0
  149. package/dist/components/TagCloud/TagCloud.es.js +47 -0
  150. package/dist/components/TagCloud/tagcloud.styles.cjs +1 -0
  151. package/dist/components/TagCloud/tagcloud.styles.es.js +12 -0
  152. package/dist/components/TextArea/TextArea.cjs +1 -0
  153. package/dist/components/TextArea/TextArea.es.js +104 -0
  154. package/dist/components/TextArea/text-area.styles.cjs +1 -0
  155. package/dist/components/TextArea/text-area.styles.es.js +13 -0
  156. package/dist/components/TextLabel/TextLabel.cjs +1 -0
  157. package/dist/components/TextLabel/TextLabel.es.js +28 -0
  158. package/dist/components/TextLabel/textlabel.styles.cjs +1 -0
  159. package/dist/components/TextLabel/textlabel.styles.es.js +29 -0
  160. package/dist/components/ToggleSwitch/ToggleSwitch.cjs +1 -0
  161. package/dist/components/ToggleSwitch/ToggleSwitch.es.js +37 -0
  162. package/dist/components/ToggleSwitch/toggle-switch.styles.cjs +1 -0
  163. package/dist/components/ToggleSwitch/toggle-switch.styles.es.js +24 -0
  164. package/dist/components/Tooltip/Tooltip.cjs +1 -0
  165. package/dist/components/Tooltip/Tooltip.es.js +103 -0
  166. package/dist/components/Tooltip/tooltip.styles.cjs +1 -0
  167. package/dist/components/Tooltip/tooltip.styles.es.js +12 -0
  168. package/dist/forge/index.cjs +1 -0
  169. package/dist/forge/index.d.ts +6 -3
  170. package/dist/icons.cjs +1 -1
  171. package/dist/index.cjs +1 -0
  172. package/dist/index.es.js +82 -0
  173. package/dist/styles.css +1 -1
  174. package/dist/types/index.cjs +1 -0
  175. package/dist/types/index.es.js +7 -0
  176. package/dist/typography/BodyAnnotation.cjs +1 -0
  177. package/dist/typography/BodyAnnotation.es.js +10 -0
  178. package/dist/typography/BodyCaption.cjs +1 -0
  179. package/dist/typography/BodyCaption.es.js +10 -0
  180. package/dist/typography/BodyPage.cjs +1 -0
  181. package/dist/typography/BodyPage.es.js +10 -0
  182. package/dist/typography/BodySection.cjs +1 -0
  183. package/dist/typography/BodySection.es.js +10 -0
  184. package/dist/typography/DisplayAnnotation.cjs +1 -0
  185. package/dist/typography/DisplayAnnotation.es.js +10 -0
  186. package/dist/typography/DisplayCaption.cjs +1 -0
  187. package/dist/typography/DisplayCaption.es.js +10 -0
  188. package/dist/typography/DisplayPage.cjs +1 -0
  189. package/dist/typography/DisplayPage.es.js +10 -0
  190. package/dist/typography/DisplayPrice.cjs +1 -0
  191. package/dist/typography/DisplayPrice.es.js +10 -0
  192. package/dist/typography/DisplaySection.cjs +1 -0
  193. package/dist/typography/DisplaySection.es.js +10 -0
  194. package/dist/typography/HeaderAnnotation.cjs +1 -0
  195. package/dist/typography/HeaderAnnotation.es.js +10 -0
  196. package/dist/typography/HeaderCaption.cjs +1 -0
  197. package/dist/typography/HeaderCaption.es.js +10 -0
  198. package/dist/typography/HeaderPage.cjs +1 -0
  199. package/dist/typography/HeaderPage.es.js +10 -0
  200. package/dist/typography/HeaderSection.cjs +1 -0
  201. package/dist/typography/HeaderSection.es.js +10 -0
  202. package/dist/typography/LabelAnnotation.cjs +1 -0
  203. package/dist/typography/LabelAnnotation.es.js +10 -0
  204. package/dist/typography/LabelCaption.cjs +1 -0
  205. package/dist/typography/LabelCaption.es.js +10 -0
  206. package/dist/typography/LabelPage.cjs +1 -0
  207. package/dist/typography/LabelPage.es.js +10 -0
  208. package/dist/typography/LabelSection.cjs +1 -0
  209. package/dist/typography/LabelSection.es.js +10 -0
  210. package/dist/typography/NoteCaption.cjs +1 -0
  211. package/dist/typography/NoteCaption.es.js +10 -0
  212. package/dist/typography/NotePage.cjs +1 -0
  213. package/dist/typography/NotePage.es.js +10 -0
  214. package/dist/typography/NoteSection.cjs +1 -0
  215. package/dist/typography/NoteSection.es.js +10 -0
  216. package/dist/typography/TaglineAnnotation.cjs +1 -0
  217. package/dist/typography/TaglineAnnotation.es.js +10 -0
  218. package/dist/typography/TaglineCaption.cjs +1 -0
  219. package/dist/typography/TaglineCaption.es.js +10 -0
  220. package/dist/typography/TaglineFootext.cjs +1 -0
  221. package/dist/typography/TaglineFootext.es.js +10 -0
  222. package/dist/typography/TaglineSection.cjs +1 -0
  223. package/dist/typography/TaglineSection.es.js +10 -0
  224. package/dist/utils/bundleCss.cjs +1 -1
  225. package/dist/utils/cleanHtml.cjs +1 -0
  226. package/dist/utils/cleanHtml.es.js +6 -0
  227. package/dist/utils/cn.cjs +1 -0
  228. package/dist/utils/cn.es.js +59 -0
  229. package/dist/utils/createUniversalPortal.cjs +1 -0
  230. package/dist/utils/createUniversalPortal.es.js +17 -0
  231. package/dist/utils/floating.cjs +1 -0
  232. package/dist/utils/floating.es.js +374 -0
  233. package/dist/utils/getBreakpointsValues.cjs +1 -0
  234. package/dist/utils/getBreakpointsValues.es.js +27 -0
  235. package/dist/utils/sizes.cjs +1 -0
  236. package/dist/utils/sizes.es.js +30 -0
  237. package/dist/utils/themeTokens.cjs +1 -0
  238. package/dist/utils/themeTokens.es.js +319 -0
  239. package/dist/utils/useBodyScrollLock.cjs +1 -0
  240. package/dist/utils/useBodyScrollLock.es.js +24 -0
  241. package/dist/utils/useScrollTop.cjs +1 -0
  242. package/dist/utils/useScrollTop.es.js +9 -0
  243. package/package.json +7 -16
  244. package/scripts/postinstall.cjs +34 -6
  245. package/skills/clad-ui/SKILL.md +3 -1
  246. package/skills/clad-ui-feedback/SKILL.md +1 -1
  247. package/skills/migrate-clad-ui-v3/SKILL.md +4 -2
  248. package/skills/migrate-clad-ui-v3/references/component-api-changes.md +42 -0
  249. package/skills/migrate-clad-ui-v3/references/token-and-linaria-mapping.md +4 -1
  250. package/src/styles/preset.css +1 -1
  251. package/dist/clad-ui.cjs +0 -2
  252. package/dist/clad-ui.d.ts +0 -2
  253. package/dist/clad-ui.es.js +0 -9791
  254. package/dist/components/Drawer/Drawer.pw.fixtures.d.ts +0 -9
  255. package/dist/components/Grid/Grid.pw.fixtures.d.ts +0 -3
  256. package/dist/components/Popover/Popover.pw.fixtures.d.ts +0 -6
  257. package/dist/components/Popup/Popup.pw.fixtures.d.ts +0 -5
  258. package/dist/components/Tooltip/Tooltip.pw.fixtures.d.ts +0 -1
@@ -0,0 +1,5 @@
1
+ import { tv as e } from "tailwind-variants";
2
+ //#region src/components/Slider/slider.styles.ts
3
+ var t = e({ base: "slider-wrapper" });
4
+ //#endregion
5
+ export { t as sliderStyles };
@@ -0,0 +1 @@
1
+ "use client";require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../utils/cn.cjs`),t=require(`../../utils/createUniversalPortal.cjs`),n=require(`./snack.styles.cjs`);let r=require(`react`),i=require(`@chotot/icons`),a=require(`react/jsx-runtime`);var o={none:0,xxxs:100,xxs:150,xs:300,sm:500,md:1e3,lg:2e3,xl:4e3,xxl:6e3,xxxl:8e3,xxxxl:1e4},s=()=>{},c=({children:c,onClose:l=s,desktopSize:u=`lg`,autoHideDuration:d=`xl`,haveClose:f=!1,onActionClick:p=s,actionLabel:m=``,icon:h,layout:g=`horizontal`,className:_,...v})=>{let[y,b]=(0,r.useState)(!1);(0,r.useEffect)(()=>{let e=setTimeout(()=>{b(!0),l()},o[d]);return()=>{clearTimeout(e)}});let x=()=>{y&&l()};return(0,a.jsx)(a.Fragment,{children:t.default((0,a.jsx)(`div`,{className:`snack-wrapper`,children:(0,a.jsxs)(`div`,{...v,className:e.default(n.snackVariants({desktopSize:u}),y&&`exit`,m&&`hasAction`,g===`vertical`&&m&&`verticalLayout`,!h&&!m&&!f&&`centerText`,_),onAnimationEnd:x,"data-clad":`Snack`,children:[(0,a.jsxs)(`div`,{className:`snack-content`,children:[!!h&&(0,a.jsx)(`div`,{className:`snack-icon`,children:h}),c]}),!!f&&m.length===0&&(0,a.jsx)(`button`,{type:`button`,className:`snack-close-btn`,onClick:()=>{l()},children:(0,a.jsx)(i.Close,{})}),m.length>0&&(0,a.jsx)(`button`,{type:`button`,className:`snack-action-btn`,onClick:p,children:m})]})}))})};c.displayName=`Snack`,exports.default=c;
@@ -0,0 +1,69 @@
1
+ "use client";
2
+ import e from "../../utils/cn.es.js";
3
+ import t from "../../utils/createUniversalPortal.es.js";
4
+ import { snackVariants as n } from "./snack.styles.es.js";
5
+ import { useEffect as r, useState as i } from "react";
6
+ import { Close as a } from "@chotot/icons";
7
+ import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
8
+ //#region src/components/Snack/Snack.tsx
9
+ var l = {
10
+ none: 0,
11
+ xxxs: 100,
12
+ xxs: 150,
13
+ xs: 300,
14
+ sm: 500,
15
+ md: 1e3,
16
+ lg: 2e3,
17
+ xl: 4e3,
18
+ xxl: 6e3,
19
+ xxxl: 8e3,
20
+ xxxxl: 1e4
21
+ }, u = () => {}, d = ({ children: d, onClose: f = u, desktopSize: p = "lg", autoHideDuration: m = "xl", haveClose: h = !1, onActionClick: g = u, actionLabel: _ = "", icon: v, layout: y = "horizontal", className: b, ...x }) => {
22
+ let [S, C] = i(!1);
23
+ r(() => {
24
+ let e = setTimeout(() => {
25
+ C(!0), f();
26
+ }, l[m]);
27
+ return () => {
28
+ clearTimeout(e);
29
+ };
30
+ });
31
+ let w = () => {
32
+ S && f();
33
+ };
34
+ return /* @__PURE__ */ s(o, { children: t(/* @__PURE__ */ s("div", {
35
+ className: "snack-wrapper",
36
+ children: /* @__PURE__ */ c("div", {
37
+ ...x,
38
+ className: e(n({ desktopSize: p }), S && "exit", _ && "hasAction", y === "vertical" && _ && "verticalLayout", !v && !_ && !h && "centerText", b),
39
+ onAnimationEnd: w,
40
+ "data-clad": "Snack",
41
+ children: [
42
+ /* @__PURE__ */ c("div", {
43
+ className: "snack-content",
44
+ children: [!!v && /* @__PURE__ */ s("div", {
45
+ className: "snack-icon",
46
+ children: v
47
+ }), d]
48
+ }),
49
+ !!h && _.length === 0 && /* @__PURE__ */ s("button", {
50
+ type: "button",
51
+ className: "snack-close-btn",
52
+ onClick: () => {
53
+ f();
54
+ },
55
+ children: /* @__PURE__ */ s(a, {})
56
+ }),
57
+ _.length > 0 && /* @__PURE__ */ s("button", {
58
+ type: "button",
59
+ className: "snack-action-btn",
60
+ onClick: g,
61
+ children: _
62
+ })
63
+ ]
64
+ })
65
+ })) });
66
+ };
67
+ d.displayName = "Snack";
68
+ //#endregion
69
+ export { d as default };
@@ -0,0 +1 @@
1
+ require(`../../_virtual/_rolldown/runtime.cjs`);var e=(0,require(`tailwind-variants/lite`).tv)({base:`snack`,variants:{desktopSize:{md:`md`,lg:`lg`,xl:`xl`}},defaultVariants:{desktopSize:`lg`}});exports.snackVariants=e;
@@ -0,0 +1,13 @@
1
+ import { tv as e } from "tailwind-variants/lite";
2
+ //#region src/components/Snack/snack.styles.ts
3
+ var t = e({
4
+ base: "snack",
5
+ variants: { desktopSize: {
6
+ md: "md",
7
+ lg: "lg",
8
+ xl: "xl"
9
+ } },
10
+ defaultVariants: { desktopSize: "lg" }
11
+ });
12
+ //#endregion
13
+ export { t as snackVariants };
@@ -0,0 +1 @@
1
+ require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../utils/cn.cjs`),t=require(`../../types/index.cjs`),n=require(`./tabs.styles.cjs`);let r=require(`react`);var i=t.forwardRef((t,i)=>{let{value:a,label:o=``,indicator:s=null,icon:c=null,onClick:l,className:u=``,disabled:d=!1,active:f=!1,as:p,tabIndex:m=-1,fontWeight:h=`bold`,width:g,height:_,lineClamp:v=1,variant:y,...b}=t,x=l&&!d?e=>{l(e,a)}:void 0,S=!!(v&&_&&parseInt(_,10)>20),C=e.default(`tab__label`,f&&!d&&`tab__label--active`,d&&`tab__label--disabled`,h===`normal`&&!f&&`tab__label--font-normal`),w=S?{WebkitBoxOrient:`vertical`,display:`-webkit-box`,WebkitLineClamp:v,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`normal`}:void 0;return(0,r.createElement)(p||`button`,{ref:i,onClick:x,className:e.default(n.tabVariants({variant:y,disabled:d,active:f}),u),style:{width:g?`${g}`:void 0,height:_?`${_}`:void 0},role:`tab`,"aria-selected":m===0,"aria-disabled":!!d,tabIndex:m,"data-clad":`Tab`,...b},c?(0,r.createElement)(`span`,{className:`tab__icon`},c):null,o?(0,r.createElement)(`div`,{className:`flex h-full items-center`},(0,r.createElement)(`span`,{className:C,style:w},o)):null,s)});i.displayName=`Tab`,exports.default=i;
@@ -0,0 +1,42 @@
1
+ import e from "../../utils/cn.es.js";
2
+ import { forwardRef as t } from "../../types/index.es.js";
3
+ import { tabVariants as n } from "./tabs.styles.es.js";
4
+ import { createElement as r } from "react";
5
+ //#region src/components/Tabs/Tab.tsx
6
+ var i = t((t, i) => {
7
+ let { value: a, label: o = "", indicator: s = null, icon: c = null, onClick: l, className: u = "", disabled: d = !1, active: f = !1, as: p, tabIndex: m = -1, fontWeight: h = "bold", width: g, height: _, lineClamp: v = 1, variant: y, ...b } = t, x = l && !d ? (e) => {
8
+ l(e, a);
9
+ } : void 0, S = !!(v && _ && parseInt(_, 10) > 20), C = e("tab__label", f && !d && "tab__label--active", d && "tab__label--disabled", h === "normal" && !f && "tab__label--font-normal"), w = S ? {
10
+ WebkitBoxOrient: "vertical",
11
+ display: "-webkit-box",
12
+ WebkitLineClamp: v,
13
+ overflow: "hidden",
14
+ textOverflow: "ellipsis",
15
+ whiteSpace: "normal"
16
+ } : void 0;
17
+ return r(p || "button", {
18
+ ref: i,
19
+ onClick: x,
20
+ className: e(n({
21
+ variant: y,
22
+ disabled: d,
23
+ active: f
24
+ }), u),
25
+ style: {
26
+ width: g ? `${g}` : void 0,
27
+ height: _ ? `${_}` : void 0
28
+ },
29
+ role: "tab",
30
+ "aria-selected": m === 0,
31
+ "aria-disabled": !!d,
32
+ tabIndex: m,
33
+ "data-clad": "Tab",
34
+ ...b
35
+ }, c ? r("span", { className: "tab__icon" }, c) : null, o ? r("div", { className: "flex h-full items-center" }, r("span", {
36
+ className: C,
37
+ style: w
38
+ }, o)) : null, s);
39
+ });
40
+ i.displayName = "Tab";
41
+ //#endregion
42
+ export { i as default };
@@ -0,0 +1 @@
1
+ "use client";require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../utils/cn.cjs`),t=require(`./tabs.styles.cjs`);let n=require(`react`),r=require(`@chotot/icons`);var i=()=>{},a=({children:a,onChange:o=i,className:s,value:c,variant:l=`standard`,showDivider:u=!1,fontWeight:d=`bold`,height:f,lineClamp:p=1,showScrollBtn:m=!1,widthScroll:h,style:g,..._})=>{let[v,y]=(0,n.useState)(!1),[b,x]=(0,n.useState)(!1),[S,C]=(0,n.useState)(0),w=(0,n.useRef)(null),T=(0,n.useRef)(null);(0,n.useEffect)(()=>{w.current&&T.current&&T.current.scrollWidth<w.current.scrollWidth&&x(!0)},[]);let E=(0,n.createElement)(`span`,{className:`tabs__indicator`}),D=n.Children.toArray(a),O=D.length,k=e=>{let t=w.current?.childNodes,r=S;if(e.keyCode===32){let t=D[r];(0,n.isValidElement)(t)&&o(e,t.props.value);return}e.keyCode===39&&r+1<O&&(r+=1),e.keyCode===37&&r-1>=0&&--r,C(r),(t?.[r])?.focus()},A=e=>{let t=e.currentTarget.dataset.value;if(w.current){let{childNodes:e}=w.current,n=w.current.scrollWidth??0,r=w.current.offsetWidth??0,i=w.current.scrollLeft??0,a=h??Math.round(n/(e?.length??1));t===`left`?i-=a:i+=a,w.current.scrollTo({left:i,behavior:`smooth`}),i<=0?(y(!1),x(!0)):i+r>=n?(y(!0),x(!1)):(y(!0),x(!0))}},j=e.default(`tabs__scroller`,l===`standard`&&`tabs__scroller--scrollable`),M=n.Children.map(a,(e,t)=>{if(!(0,n.isValidElement)(e))return null;let r=e.props,i=r.value===c;return(0,n.createElement)(e.type,{...r,indicator:i?E:null,active:i,variant:l,onClick:o,tabIndex:S===t?0:-1,fontWeight:d,height:f,lineClamp:p})});return(0,n.createElement)(`div`,{..._,ref:T,className:e.default(t.tabsVariants({showDivider:u}),s),style:{...f?{height:f}:void 0,...g},"data-clad":`Tabs`},m&&l===`standard`?(0,n.createElement)(`button`,{className:e.default(`tabs__scroll-btn`,!v&&`hidden`),onClick:A,type:`button`,"data-value":`left`},(0,n.createElement)(r.ChevronLeft,{width:`24px`,height:`24px`,"aria-hidden":!0})):null,(0,n.createElement)(`div`,{ref:w,role:`tablist`,className:j,onKeyDown:k},M),m&&l===`standard`?(0,n.createElement)(`button`,{className:e.default(`tabs__scroll-btn`,!b&&`hidden`),onClick:A,type:`button`,"data-value":`right`},(0,n.createElement)(r.ChevronRight,{width:`24px`,height:`24px`,"aria-hidden":!0})):null)};a.displayName=`Tabs`,exports.default=a;
@@ -0,0 +1,80 @@
1
+ "use client";
2
+ import e from "../../utils/cn.es.js";
3
+ import { tabsVariants as t } from "./tabs.styles.es.js";
4
+ import { Children as n, createElement as r, isValidElement as i, useEffect as a, useRef as o, useState as s } from "react";
5
+ import { ChevronLeft as c, ChevronRight as l } from "@chotot/icons";
6
+ //#region src/components/Tabs/Tabs.tsx
7
+ var u = () => {}, d = ({ children: d, onChange: f = u, className: p, value: m, variant: h = "standard", showDivider: g = !1, fontWeight: _ = "bold", height: v, lineClamp: y = 1, showScrollBtn: b = !1, widthScroll: x, style: S, ...C }) => {
8
+ let [w, T] = s(!1), [E, D] = s(!1), [O, k] = s(0), A = o(null), j = o(null);
9
+ a(() => {
10
+ A.current && j.current && j.current.scrollWidth < A.current.scrollWidth && D(!0);
11
+ }, []);
12
+ let M = r("span", { className: "tabs__indicator" }), N = n.toArray(d), P = N.length, F = (e) => {
13
+ let t = A.current?.childNodes, n = O;
14
+ if (e.keyCode === 32) {
15
+ let t = N[n];
16
+ i(t) && f(e, t.props.value);
17
+ return;
18
+ }
19
+ e.keyCode === 39 && n + 1 < P && (n += 1), e.keyCode === 37 && n - 1 >= 0 && --n, k(n), (t?.[n])?.focus();
20
+ }, I = (e) => {
21
+ let t = e.currentTarget.dataset.value;
22
+ if (A.current) {
23
+ let { childNodes: e } = A.current, n = A.current.scrollWidth ?? 0, r = A.current.offsetWidth ?? 0, i = A.current.scrollLeft ?? 0, a = x ?? Math.round(n / (e?.length ?? 1));
24
+ t === "left" ? i -= a : i += a, A.current.scrollTo({
25
+ left: i,
26
+ behavior: "smooth"
27
+ }), i <= 0 ? (T(!1), D(!0)) : i + r >= n ? (T(!0), D(!1)) : (T(!0), D(!0));
28
+ }
29
+ }, L = e("tabs__scroller", h === "standard" && "tabs__scroller--scrollable"), R = n.map(d, (e, t) => {
30
+ if (!i(e)) return null;
31
+ let n = e.props, a = n.value === m;
32
+ return r(e.type, {
33
+ ...n,
34
+ indicator: a ? M : null,
35
+ active: a,
36
+ variant: h,
37
+ onClick: f,
38
+ tabIndex: O === t ? 0 : -1,
39
+ fontWeight: _,
40
+ height: v,
41
+ lineClamp: y
42
+ });
43
+ });
44
+ return r("div", {
45
+ ...C,
46
+ ref: j,
47
+ className: e(t({ showDivider: g }), p),
48
+ style: {
49
+ ...v ? { height: v } : void 0,
50
+ ...S
51
+ },
52
+ "data-clad": "Tabs"
53
+ }, b && h === "standard" ? r("button", {
54
+ className: e("tabs__scroll-btn", !w && "hidden"),
55
+ onClick: I,
56
+ type: "button",
57
+ "data-value": "left"
58
+ }, r(c, {
59
+ width: "24px",
60
+ height: "24px",
61
+ "aria-hidden": !0
62
+ })) : null, r("div", {
63
+ ref: A,
64
+ role: "tablist",
65
+ className: L,
66
+ onKeyDown: F
67
+ }, R), b && h === "standard" ? r("button", {
68
+ className: e("tabs__scroll-btn", !E && "hidden"),
69
+ onClick: I,
70
+ type: "button",
71
+ "data-value": "right"
72
+ }, r(l, {
73
+ width: "24px",
74
+ height: "24px",
75
+ "aria-hidden": !0
76
+ })) : null);
77
+ };
78
+ d.displayName = "Tabs";
79
+ //#endregion
80
+ export { d as default };
@@ -0,0 +1 @@
1
+ require(`../../_virtual/_rolldown/runtime.cjs`);let e=require(`tailwind-variants/lite`);var t=(0,e.tv)({base:`tabs`,defaultVariants:{showDivider:!1},variants:{showDivider:{true:`tabs--divider`,false:``}}}),n=(0,e.tv)({base:`tab`,defaultVariants:{variant:`standard`,disabled:!1,active:!1},variants:{variant:{fullWidth:`tab--full-width`,standard:`tab--standard`},disabled:{true:`tab--disabled`,false:``},active:{true:``,false:``}}});exports.tabVariants=n,exports.tabsVariants=t;
@@ -0,0 +1,33 @@
1
+ import { tv as e } from "tailwind-variants/lite";
2
+ //#region src/components/Tabs/tabs.styles.ts
3
+ var t = e({
4
+ base: "tabs",
5
+ defaultVariants: { showDivider: !1 },
6
+ variants: { showDivider: {
7
+ true: "tabs--divider",
8
+ false: ""
9
+ } }
10
+ }), n = e({
11
+ base: "tab",
12
+ defaultVariants: {
13
+ variant: "standard",
14
+ disabled: !1,
15
+ active: !1
16
+ },
17
+ variants: {
18
+ variant: {
19
+ fullWidth: "tab--full-width",
20
+ standard: "tab--standard"
21
+ },
22
+ disabled: {
23
+ true: "tab--disabled",
24
+ false: ""
25
+ },
26
+ active: {
27
+ true: "",
28
+ false: ""
29
+ }
30
+ }
31
+ });
32
+ //#endregion
33
+ export { n as tabVariants, t as tabsVariants };
@@ -0,0 +1 @@
1
+ "use client";require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../utils/cn.cjs`),t=require(`../Chip/Chip.cjs`),n=require(`./tagcloud.styles.cjs`);let r=require(`react`);function i(e,t){return e.current&&(e.current.value=t,e.current.dispatchEvent(new Event(`change`,{bubbles:!0}))),{target:{value:t}}}function a(e,t){return Array.isArray(e)?e.filter(e=>t.includes(e)):t.includes(e)?e:null}function o(e,t,n){if(t==null)return[e];if(Array.isArray(t)){let r=t.indexOf(e),i=[...t];return r===-1?((!n||t.length<n)&&i.push(e),i):(i.splice(r,1),i)}return t===e?[]:[t,e]}var s=({className:s,options:c=[],label:l=``,value:u=``,onChange:d,required:f=!1,multiple:p=!1,maxSelection:m=0,tagCloudRef:h,status:g=`default`,helptext:_=``,variant:v=`fill`,selectedTextStyle:y=`bold`,...b})=>{let x=(0,r.useRef)(null),S=h&&typeof h==`object`?h:x;(0,r.useImperativeHandle)(h??null,()=>S.current);let C=c.map(e=>e.value),w=p?a(u,C):u,T=e=>{d&&d(i(S,p?o(e,w,m||void 0):e))},E=c.map(e=>{let n=p?Array.isArray(w)&&w.includes(e.value):w===e.value,i=!p&&y===`normal`?`tag-cloud__chip--normal-selected`:void 0;return(0,r.createElement)(t.default,{key:e.value,active:n,as:`button`,onClick:()=>T(e.value),variant:v,className:i,type:`button`},e.label)});return(0,r.createElement)(`div`,{...b,ref:S,className:e.default(n.tagCloudVariants({status:g}),s),"data-clad":`Tag Cloud`},l?(0,r.createElement)(`label`,{className:e.default(`tag-cloud__label`,f&&`required`)},l):null,(0,r.createElement)(`div`,{className:`tag-cloud__chips`},...E),_?(0,r.createElement)(`p`,{className:`tag-cloud__helptext`},_):null)};s.displayName=`TagCloud`,exports.default=s;
@@ -0,0 +1,47 @@
1
+ "use client";
2
+ import e from "../../utils/cn.es.js";
3
+ import t from "../Chip/Chip.es.js";
4
+ import { tagCloudVariants as n } from "./tagcloud.styles.es.js";
5
+ import { createElement as r, useImperativeHandle as i, useRef as a } from "react";
6
+ //#region src/components/TagCloud/TagCloud.tsx
7
+ function o(e, t) {
8
+ return e.current && (e.current.value = t, e.current.dispatchEvent(new Event("change", { bubbles: !0 }))), { target: { value: t } };
9
+ }
10
+ function s(e, t) {
11
+ return Array.isArray(e) ? e.filter((e) => t.includes(e)) : t.includes(e) ? e : null;
12
+ }
13
+ function c(e, t, n) {
14
+ if (t == null) return [e];
15
+ if (Array.isArray(t)) {
16
+ let r = t.indexOf(e), i = [...t];
17
+ return r === -1 ? ((!n || t.length < n) && i.push(e), i) : (i.splice(r, 1), i);
18
+ }
19
+ return t === e ? [] : [t, e];
20
+ }
21
+ var l = ({ className: l, options: u = [], label: d = "", value: f = "", onChange: p, required: m = !1, multiple: h = !1, maxSelection: g = 0, tagCloudRef: _, status: v = "default", helptext: y = "", variant: b = "fill", selectedTextStyle: x = "bold", ...S }) => {
22
+ let C = a(null), w = _ && typeof _ == "object" ? _ : C;
23
+ i(_ ?? null, () => w.current);
24
+ let T = u.map((e) => e.value), E = h ? s(f, T) : f, D = (e) => {
25
+ p && p(o(w, h ? c(e, E, g || void 0) : e));
26
+ }, O = u.map((e) => {
27
+ let n = h ? Array.isArray(E) && E.includes(e.value) : E === e.value, i = !h && x === "normal" ? "tag-cloud__chip--normal-selected" : void 0;
28
+ return r(t, {
29
+ key: e.value,
30
+ active: n,
31
+ as: "button",
32
+ onClick: () => D(e.value),
33
+ variant: b,
34
+ className: i,
35
+ type: "button"
36
+ }, e.label);
37
+ });
38
+ return r("div", {
39
+ ...S,
40
+ ref: w,
41
+ className: e(n({ status: v }), l),
42
+ "data-clad": "Tag Cloud"
43
+ }, d ? r("label", { className: e("tag-cloud__label", m && "required") }, d) : null, r("div", { className: "tag-cloud__chips" }, ...O), y ? r("p", { className: "tag-cloud__helptext" }, y) : null);
44
+ };
45
+ l.displayName = "TagCloud";
46
+ //#endregion
47
+ export { l as default };
@@ -0,0 +1 @@
1
+ require(`../../_virtual/_rolldown/runtime.cjs`);var e=(0,require(`tailwind-variants/lite`).tv)({base:`tag-cloud`,defaultVariants:{status:`default`},variants:{status:{default:``,error:`tag-cloud--error`}}});exports.tagCloudVariants=e;
@@ -0,0 +1,12 @@
1
+ import { tv as e } from "tailwind-variants/lite";
2
+ //#region src/components/TagCloud/tagcloud.styles.ts
3
+ var t = e({
4
+ base: "tag-cloud",
5
+ defaultVariants: { status: "default" },
6
+ variants: { status: {
7
+ default: "",
8
+ error: "tag-cloud--error"
9
+ } }
10
+ });
11
+ //#endregion
12
+ export { t as tagCloudVariants };
@@ -0,0 +1 @@
1
+ "use client";require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../utils/cn.cjs`),t=require(`../../utils/sizes.cjs`),n=require(`./text-area.styles.cjs`);let r=require(`react`),i=require(`@chotot/icons`),a=require(`react/jsx-runtime`);var o=()=>{};function s(e){let{current:t}=e;if(!t)return;let n=t.value;t.value=``;let r=new Event(`change`,{bubbles:!0});r.simulated=!0,t._valueTracker?.setValue?.(n),t.dispatchEvent(r)}var c=({id:c=``,name:l,label:u=``,value:d=``,onChange:f=o,onBlur:p=o,onFocus:m=o,disabled:h=!1,required:g=!1,status:_=`default`,helptext:v=``,helptextClassName:y=``,inputRef:b,resize:x=`none`,lines:S=5,placeholder:C=``,inputMode:w=`text`,width:T=`full`,characterLimit:E=0,isResizeableOnFocus:D=!1,allowClear:O=!0,autoSize:k=!1,className:A,...j})=>{let M=(0,r.useRef)(null),N=typeof b==`object`&&b?b:M;(0,r.useImperativeHandle)(b,()=>N.current);let P=16+(S+1)*20,[F,I]=(0,r.useState)(P),L=e.default(`text-area-el`,d&&`hasValue`,g&&`required`),R=()=>{N.current&&(N.current.style.height=`auto`,N.current.style.height=`${N.current.scrollHeight}px`)};(0,r.useEffect)(()=>{k&&R()},[d,k]);let z=e=>{k&&R(),f(e)},B=[`both`,`horizontal`,`vertical`].includes(x),V=e.default(n.textAreaVariants({status:_}),h&&`disabled`,B&&`resize-${x}`,O&&`showRightIcon`),H=t.SIZES_MAP[T]||`initial`,U=()=>{N.current?.focus()},W=(0,r.useCallback)(e=>{D&&I(P*2),m(e)},[D,P,m]),G=(0,r.useCallback)(e=>{D&&I(P),p(e)},[D,P,p]),K=()=>{O&&s(N)};return(0,a.jsxs)(`div`,{"data-clad":`Input Field - Text Area`,className:e.default(`text-area-container`,A),style:{width:H},children:[(0,a.jsxs)(`div`,{className:V,style:{height:k?void 0:`${F}px`,minHeight:`${F}px`},children:[(0,a.jsx)(`div`,{className:`focus-capture`,onClick:U}),(0,a.jsx)(`textarea`,{...j,ref:N,className:L,id:c||void 0,name:l||void 0,placeholder:C||void 0,maxLength:E||void 0,value:d,disabled:h,required:g,inputMode:w,onChange:z,onFocus:W,onBlur:G}),!!u&&(0,a.jsx)(`label`,{htmlFor:c,children:u}),!!O&&!!d&&(0,a.jsx)(`button`,{tabIndex:-1,type:`button`,onClick:K,children:(0,a.jsx)(i.CloseFilled,{width:`20px`,height:`30px`,color:`var(--color-icon-tertiary)`})})]}),v?(0,a.jsx)(`p`,{className:e.default(`text-area-helptext`,y),children:v}):null]})};c.displayName=`TextArea`,exports.default=c;
@@ -0,0 +1,104 @@
1
+ "use client";
2
+ import e from "../../utils/cn.es.js";
3
+ import { SIZES_MAP as t } from "../../utils/sizes.es.js";
4
+ import { textAreaVariants as n } from "./text-area.styles.es.js";
5
+ import { useCallback as r, useEffect as i, useImperativeHandle as a, useRef as o, useState as s } from "react";
6
+ import { CloseFilled as c } from "@chotot/icons";
7
+ import { jsx as l, jsxs as u } from "react/jsx-runtime";
8
+ //#region src/components/TextArea/TextArea.tsx
9
+ var d = () => {};
10
+ function f(e) {
11
+ let { current: t } = e;
12
+ if (!t) return;
13
+ let n = t.value;
14
+ t.value = "";
15
+ let r = new Event("change", { bubbles: !0 });
16
+ r.simulated = !0, t._valueTracker?.setValue?.(n), t.dispatchEvent(r);
17
+ }
18
+ var p = ({ id: p = "", name: m, label: h = "", value: g = "", onChange: _ = d, onBlur: v = d, onFocus: y = d, disabled: b = !1, required: x = !1, status: S = "default", helptext: C = "", helptextClassName: w = "", inputRef: T, resize: E = "none", lines: D = 5, placeholder: O = "", inputMode: k = "text", width: A = "full", characterLimit: j = 0, isResizeableOnFocus: M = !1, allowClear: N = !0, autoSize: P = !1, className: F, ...I }) => {
19
+ let L = o(null), R = typeof T == "object" && T ? T : L;
20
+ a(T, () => R.current);
21
+ let z = 16 + (D + 1) * 20, [B, V] = s(z), H = e("text-area-el", g && "hasValue", x && "required"), U = () => {
22
+ R.current && (R.current.style.height = "auto", R.current.style.height = `${R.current.scrollHeight}px`);
23
+ };
24
+ i(() => {
25
+ P && U();
26
+ }, [g, P]);
27
+ let W = (e) => {
28
+ P && U(), _(e);
29
+ }, G = [
30
+ "both",
31
+ "horizontal",
32
+ "vertical"
33
+ ].includes(E), K = e(n({ status: S }), b && "disabled", G && `resize-${E}`, N && "showRightIcon"), q = t[A] || "initial", J = () => {
34
+ R.current?.focus();
35
+ }, Y = r((e) => {
36
+ M && V(z * 2), y(e);
37
+ }, [
38
+ M,
39
+ z,
40
+ y
41
+ ]), X = r((e) => {
42
+ M && V(z), v(e);
43
+ }, [
44
+ M,
45
+ z,
46
+ v
47
+ ]), Z = () => {
48
+ N && f(R);
49
+ };
50
+ return /* @__PURE__ */ u("div", {
51
+ "data-clad": "Input Field - Text Area",
52
+ className: e("text-area-container", F),
53
+ style: { width: q },
54
+ children: [/* @__PURE__ */ u("div", {
55
+ className: K,
56
+ style: {
57
+ height: P ? void 0 : `${B}px`,
58
+ minHeight: `${B}px`
59
+ },
60
+ children: [
61
+ /* @__PURE__ */ l("div", {
62
+ className: "focus-capture",
63
+ onClick: J
64
+ }),
65
+ /* @__PURE__ */ l("textarea", {
66
+ ...I,
67
+ ref: R,
68
+ className: H,
69
+ id: p || void 0,
70
+ name: m || void 0,
71
+ placeholder: O || void 0,
72
+ maxLength: j || void 0,
73
+ value: g,
74
+ disabled: b,
75
+ required: x,
76
+ inputMode: k,
77
+ onChange: W,
78
+ onFocus: Y,
79
+ onBlur: X
80
+ }),
81
+ !!h && /* @__PURE__ */ l("label", {
82
+ htmlFor: p,
83
+ children: h
84
+ }),
85
+ !!N && !!g && /* @__PURE__ */ l("button", {
86
+ tabIndex: -1,
87
+ type: "button",
88
+ onClick: Z,
89
+ children: /* @__PURE__ */ l(c, {
90
+ width: "20px",
91
+ height: "30px",
92
+ color: "var(--color-icon-tertiary)"
93
+ })
94
+ })
95
+ ]
96
+ }), C ? /* @__PURE__ */ l("p", {
97
+ className: e("text-area-helptext", w),
98
+ children: C
99
+ }) : null]
100
+ });
101
+ };
102
+ p.displayName = "TextArea";
103
+ //#endregion
104
+ export { p as default };
@@ -0,0 +1 @@
1
+ require(`../../_virtual/_rolldown/runtime.cjs`);var e=(0,require(`tailwind-variants/lite`).tv)({base:`text-area`,defaultVariants:{status:`default`},variants:{status:{default:``,warning:`warning`,error:`error`}}});exports.textAreaVariants=e;
@@ -0,0 +1,13 @@
1
+ import { tv as e } from "tailwind-variants/lite";
2
+ //#region src/components/TextArea/text-area.styles.ts
3
+ var t = e({
4
+ base: "text-area",
5
+ defaultVariants: { status: "default" },
6
+ variants: { status: {
7
+ default: "",
8
+ warning: "warning",
9
+ error: "error"
10
+ } }
11
+ });
12
+ //#endregion
13
+ export { t as textAreaVariants };
@@ -0,0 +1 @@
1
+ require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../utils/cn.cjs`),t=require(`../../types/index.cjs`),n=require(`./textlabel.styles.cjs`);let r=require(`react`),i=require(`@chotot/icons`);var a={info:i.InfoFilled,success:i.CircleCheckFilled,error:i.CloseFilled,warning:i.WarningFilled,neutral:i.InfoFilled},o=t.forwardRef((t,i)=>{let{size:o=`md`,color:s=`info`,type:c=`text`,label:l=``,icon:u,className:d,as:f=`div`,children:p,...m}=t,h=a[s??`info`],g=c===`status`?u??(0,r.createElement)(h,{"aria-hidden":!0}):null;return(0,r.createElement)(f,{ref:i,className:e.default(n.textlabelVariants({size:o,color:s,type:c}),d),"data-clad":`TextLabel`,...m},g,(0,r.createElement)(`span`,null,l??p))});o.displayName=`TextLabel`,exports.default=o;
@@ -0,0 +1,28 @@
1
+ import e from "../../utils/cn.es.js";
2
+ import { forwardRef as t } from "../../types/index.es.js";
3
+ import { textlabelVariants as n } from "./textlabel.styles.es.js";
4
+ import { createElement as r } from "react";
5
+ import { CircleCheckFilled as i, CloseFilled as a, InfoFilled as o, WarningFilled as s } from "@chotot/icons";
6
+ //#region src/components/TextLabel/TextLabel.tsx
7
+ var c = {
8
+ info: o,
9
+ success: i,
10
+ error: a,
11
+ warning: s,
12
+ neutral: o
13
+ }, l = t((t, i) => {
14
+ let { size: a = "md", color: o = "info", type: s = "text", label: l = "", icon: u, className: d, as: f = "div", children: p, ...m } = t, h = c[o ?? "info"], g = s === "status" ? u ?? r(h, { "aria-hidden": !0 }) : null;
15
+ return r(f, {
16
+ ref: i,
17
+ className: e(n({
18
+ size: a,
19
+ color: o,
20
+ type: s
21
+ }), d),
22
+ "data-clad": "TextLabel",
23
+ ...m
24
+ }, g, r("span", null, l ?? p));
25
+ });
26
+ l.displayName = "TextLabel";
27
+ //#endregion
28
+ export { l as default };
@@ -0,0 +1 @@
1
+ require(`../../_virtual/_rolldown/runtime.cjs`);var e=(0,require(`tailwind-variants/lite`).tv)({base:`textlabel`,defaultVariants:{size:`md`,color:`info`,type:`text`},variants:{size:{md:`textlabel--md`,sm:`textlabel--sm`},color:{info:`textlabel--info`,success:`textlabel--success`,error:`textlabel--error`,warning:`textlabel--warning`,neutral:`textlabel--neutral`},type:{text:`textlabel--text`,status:`textlabel--status`}}});exports.textlabelVariants=e;
@@ -0,0 +1,29 @@
1
+ import { tv as e } from "tailwind-variants/lite";
2
+ //#region src/components/TextLabel/textlabel.styles.ts
3
+ var t = e({
4
+ base: "textlabel",
5
+ defaultVariants: {
6
+ size: "md",
7
+ color: "info",
8
+ type: "text"
9
+ },
10
+ variants: {
11
+ size: {
12
+ md: "textlabel--md",
13
+ sm: "textlabel--sm"
14
+ },
15
+ color: {
16
+ info: "textlabel--info",
17
+ success: "textlabel--success",
18
+ error: "textlabel--error",
19
+ warning: "textlabel--warning",
20
+ neutral: "textlabel--neutral"
21
+ },
22
+ type: {
23
+ text: "textlabel--text",
24
+ status: "textlabel--status"
25
+ }
26
+ }
27
+ });
28
+ //#endregion
29
+ export { t as textlabelVariants };
@@ -0,0 +1 @@
1
+ "use client";require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../utils/cn.cjs`),t=require(`./toggle-switch.styles.cjs`);let n=require(`react/jsx-runtime`);var r=()=>{},i=({id:i,name:a,value:o,checked:s=!1,color:c=`primary`,disabled:l=!1,onChange:u=r,size:d=`md`,className:f,...p})=>{let m=!!s;return(0,n.jsx)(`div`,{"data-clad":`Toggle`,className:e.default(t.toggleSwitchVariants({size:d,color:c}),l&&`toggle-switch--disabled`,f),children:(0,n.jsxs)(`label`,{htmlFor:i,className:`toggle-switch-label`,children:[(0,n.jsx)(`span`,{className:e.default(`toggle-switch-inner`,m&&`toggle-switch-inner--active`)}),(0,n.jsx)(`span`,{className:e.default(`toggle-switch-switcher`,m&&`toggle-switch-switcher--active`)}),(0,n.jsx)(`input`,{...p,type:`checkbox`,className:`toggle-switch-checkbox`,name:a,id:i,onChange:u,checked:s,disabled:l,value:o})]})})};i.displayName=`ToggleSwitch`,exports.default=i;
@@ -0,0 +1,37 @@
1
+ "use client";
2
+ import e from "../../utils/cn.es.js";
3
+ import { toggleSwitchVariants as t } from "./toggle-switch.styles.es.js";
4
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
5
+ //#region src/components/ToggleSwitch/ToggleSwitch.tsx
6
+ var i = () => {}, a = ({ id: a, name: o, value: s, checked: c = !1, color: l = "primary", disabled: u = !1, onChange: d = i, size: f = "md", className: p, ...m }) => {
7
+ let h = !!c;
8
+ return /* @__PURE__ */ n("div", {
9
+ "data-clad": "Toggle",
10
+ className: e(t({
11
+ size: f,
12
+ color: l
13
+ }), u && "toggle-switch--disabled", p),
14
+ children: /* @__PURE__ */ r("label", {
15
+ htmlFor: a,
16
+ className: "toggle-switch-label",
17
+ children: [
18
+ /* @__PURE__ */ n("span", { className: e("toggle-switch-inner", h && "toggle-switch-inner--active") }),
19
+ /* @__PURE__ */ n("span", { className: e("toggle-switch-switcher", h && "toggle-switch-switcher--active") }),
20
+ /* @__PURE__ */ n("input", {
21
+ ...m,
22
+ type: "checkbox",
23
+ className: "toggle-switch-checkbox",
24
+ name: o,
25
+ id: a,
26
+ onChange: d,
27
+ checked: c,
28
+ disabled: u,
29
+ value: s
30
+ })
31
+ ]
32
+ })
33
+ });
34
+ };
35
+ a.displayName = "ToggleSwitch";
36
+ //#endregion
37
+ export { a as default };
@@ -0,0 +1 @@
1
+ require(`../../_virtual/_rolldown/runtime.cjs`);var e=(0,require(`tailwind-variants/lite`).tv)({base:`toggle-switch`,defaultVariants:{size:`md`,color:`primary`},variants:{size:{md:`toggle-switch--md`,sm:`toggle-switch--sm`},color:{primary:`toggle-switch--primary`,info:`toggle-switch--info`,success:`toggle-switch--success`,error:`toggle-switch--error`,neutral:`toggle-switch--neutral`}}});exports.toggleSwitchVariants=e;
@@ -0,0 +1,24 @@
1
+ import { tv as e } from "tailwind-variants/lite";
2
+ //#region src/components/ToggleSwitch/toggle-switch.styles.ts
3
+ var t = e({
4
+ base: "toggle-switch",
5
+ defaultVariants: {
6
+ size: "md",
7
+ color: "primary"
8
+ },
9
+ variants: {
10
+ size: {
11
+ md: "toggle-switch--md",
12
+ sm: "toggle-switch--sm"
13
+ },
14
+ color: {
15
+ primary: "toggle-switch--primary",
16
+ info: "toggle-switch--info",
17
+ success: "toggle-switch--success",
18
+ error: "toggle-switch--error",
19
+ neutral: "toggle-switch--neutral"
20
+ }
21
+ }
22
+ });
23
+ //#endregion
24
+ export { t as toggleSwitchVariants };
@@ -0,0 +1 @@
1
+ "use client";require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../utils/cn.cjs`),t=require(`../../utils/floating.cjs`),n=require(`./tooltip.styles.cjs`);let r=require(`react`),i=require(`@chotot/icons`);var a={none:0,xxxs:2,xxs:4,xs:8,sm:12,md:16,mdl:20,lg:24,xl:32,xxl:48,xxxl:64,xxxxl:96,xxxxxl:128},o={none:0,xxxs:100,xxs:150,xs:300,sm:500,md:1e3,lg:2e3,xl:4e3,xxl:6e3,xxxl:8e3,xxxxl:1e4},s={dark:`var(--color-background-inverted)`,light:`var(--color-background-primary)`},c={dark:`var(--color-border-black)`,light:`var(--color-border-thin)`},l=e=>e.replace(/(<(script|object|applet|embed|frameset|iframe|form|textarea|map)(\s+.*?)?>.*?<\/\2>)|(<(script|object|applet|embed|frameset|iframe|form|textarea|input|button|map)(\s+.*?)?\/?>)|(=.*".*javascript:.*?")/g,``),u=({children:u=null,text:d=null,dangerousHtml:f=null,placement:p=`bottom-center`,manual:m=!1,variant:h=`dark`,delayEnter:g=`none`,delayLeave:_=`none`,arrowOffset:v=`xs`,triggerOffset:y=`sm`,hoverable:b=!1,zIndex:x=1900,fadeDuration:S=`xs`,title:C=``,thumbnail:w=``,haveClose:T=!1,maxWidth:E=`280px`,action:D=null,onClose:O,className:k,style:A,...j})=>{let[M,N]=(0,r.useState)(!0),[P,F]=(0,r.useState)(!1),[I,L]=t.useHover({delayEnter:o[g],delayLeave:o[_]}),R=!M||b&&!I,{triggerProps:z,layerProps:B,arrowProps:V,renderLayer:H}=t.useLayer({isOpen:P,onOutsideClick:()=>{M&&(N(!1),O?.())},arrowOffset:a[v],triggerOffset:a[y],auto:!m,placement:p});(0,r.useLayoutEffect)(()=>{R||F(!0)},[R]);let U=null;typeof f==`string`&&f.trim()&&(U={__html:l(f)});let W=()=>{R&&F(!1)},G=e=>{e.stopPropagation(),N(!1),O?.()};return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(`span`,{...z,...L},u),P&&H((0,r.createElement)(`div`,{...j,...B,className:e.default(n.tooltipVariants({variant:h}),R&&`tooltip--exit`,k),onAnimationEnd:W,style:{"--tooltip-max-width":E,"--tooltip-z-index":x,"--tooltip-fade-duration":`${o[S]}ms`,...B.style,...A},"data-clad":`Tooltip`},(0,r.createElement)(`div`,{className:`tooltip-content-wrapper`},w?(0,r.createElement)(`img`,{className:`tooltip-thumbnail`,src:w,alt:C}):null,(0,r.createElement)(`div`,{className:`tooltip-content`},C?(0,r.createElement)(`span`,{className:`tooltip-title`,style:T?{paddingRight:`18px`}:void 0},C):null,U?(0,r.createElement)(`span`,{className:`tooltip-text`,dangerouslySetInnerHTML:U}):(0,r.createElement)(`span`,{className:`tooltip-text`},d),D??null)),T?(0,r.createElement)(`button`,{type:`button`,className:`tooltip-close`,onClick:G,"aria-label":`Close tooltip`},(0,r.createElement)(i.Close,{"aria-hidden":!0})):null,(0,r.createElement)(t.Arrow,{...V,backgroundColor:s[h],borderColor:c[h]}))))};u.displayName=`Tooltip`,exports.default=u;