chop-logic-components 4.0.0 → 4.0.3

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 (247) hide show
  1. package/README.md +6 -0
  2. package/dist/components/atoms/button/Button.css +1 -1
  3. package/dist/components/atoms/button/Button2.js +51 -0
  4. package/dist/components/atoms/button/icon-button/IconButton.css +1 -1
  5. package/dist/components/atoms/button/icon-button/IconButton2.js +18 -0
  6. package/dist/components/atoms/button/inner-button/InnerButton.css +1 -1
  7. package/dist/components/atoms/button/inner-button/InnerButton2.js +21 -0
  8. package/dist/components/atoms/button/primary-button/PrimaryButton.css +1 -1
  9. package/dist/components/atoms/button/primary-button/PrimaryButton2.js +20 -0
  10. package/dist/components/atoms/button/secondary-button/SecondaryButton.css +1 -1
  11. package/dist/components/atoms/button/secondary-button/SecondaryButton2.js +20 -0
  12. package/dist/components/atoms/editable-text/EditView.js +18 -37
  13. package/dist/components/atoms/editable-text/EditableText.css +1 -1
  14. package/dist/components/atoms/editable-text/EditableText2.js +53 -0
  15. package/dist/components/atoms/editable-text/ReadView.js +16 -25
  16. package/dist/components/atoms/editable-text/useEditModeState.js +16 -16
  17. package/dist/components/atoms/editable-text/useInputFocus.js +13 -8
  18. package/dist/components/atoms/editable-text/useValueState.js +20 -20
  19. package/dist/components/atoms/error-message/ErrorMessage.css +1 -1
  20. package/dist/components/atoms/error-message/ErrorMessage2.js +18 -0
  21. package/dist/components/atoms/header/Header.css +1 -1
  22. package/dist/components/atoms/header/Header2.js +23 -0
  23. package/dist/components/atoms/icon/Icon.css +1 -1
  24. package/dist/components/atoms/icon/Icon2.js +29 -0
  25. package/dist/components/atoms/image/BasicImage.js +15 -27
  26. package/dist/components/atoms/image/FallBackImage.js +16 -10
  27. package/dist/components/atoms/image/Image.css +1 -1
  28. package/dist/components/atoms/image/Image2.js +28 -0
  29. package/dist/components/atoms/image/ResponsivePicture.js +13 -17
  30. package/dist/components/atoms/input/Input.css +1 -1
  31. package/dist/components/atoms/input/Input2.js +13 -0
  32. package/dist/components/atoms/label/Label.css +1 -1
  33. package/dist/components/atoms/label/Label2.js +35 -0
  34. package/dist/components/atoms/link/Link.css +1 -1
  35. package/dist/components/atoms/link/Link2.js +36 -0
  36. package/dist/components/atoms/portal/Portal.js +10 -10
  37. package/dist/components/atoms/tooltip/Tooltip.controller.js +42 -34
  38. package/dist/components/atoms/tooltip/Tooltip.css +1 -1
  39. package/dist/components/atoms/tooltip/Tooltip2.js +49 -0
  40. package/dist/components/contexts/form/FormContext.js +5 -5
  41. package/dist/components/contexts/theme/ThemeContext.js +6 -9
  42. package/dist/components/contexts/theme/ThemeProvider.js +23 -20
  43. package/dist/components/hocs/with-figure-caption/Figure.css +1 -1
  44. package/dist/components/hocs/with-figure-caption/with-figure-caption.js +13 -10
  45. package/dist/components/hocs/with-tooltip/with-tooltip.js +10 -6
  46. package/dist/components/molecules/accordion/Accordion.css +1 -1
  47. package/dist/components/molecules/accordion/Accordion2.js +11 -0
  48. package/dist/components/molecules/accordion/AccordionItem.css +1 -1
  49. package/dist/components/molecules/accordion/AccordionItem2.js +24 -0
  50. package/dist/components/molecules/alert/Alert.css +1 -1
  51. package/dist/components/molecules/alert/Alert.helpers.js +24 -38
  52. package/dist/components/molecules/alert/Alert2.js +63 -0
  53. package/dist/components/molecules/alert/AlertProgressBar.js +10 -13
  54. package/dist/components/molecules/breadcrumbs/BreadcrumbItem.js +29 -27
  55. package/dist/components/molecules/breadcrumbs/BreadcrumbList.js +12 -6
  56. package/dist/components/molecules/breadcrumbs/Breadcrumbs.css +1 -1
  57. package/dist/components/molecules/breadcrumbs/Breadcrumbs2.js +20 -0
  58. package/dist/components/molecules/checkbox/Checkbox.controller.js +28 -24
  59. package/dist/components/molecules/checkbox/Checkbox.css +1 -1
  60. package/dist/components/molecules/checkbox/Checkbox.helpers.js +5 -9
  61. package/dist/components/molecules/checkbox/Checkbox2.js +7 -0
  62. package/dist/components/molecules/checkbox/CheckboxStateful.js +46 -59
  63. package/dist/components/molecules/checkbox/CheckboxStateless.js +41 -58
  64. package/dist/components/molecules/multi-select/MultiSelect.Combobox.js +34 -46
  65. package/dist/components/molecules/multi-select/MultiSelect.Dropdown.js +22 -30
  66. package/dist/components/molecules/multi-select/MultiSelect.controller.js +32 -36
  67. package/dist/components/molecules/multi-select/MultiSelect.helpers.js +17 -20
  68. package/dist/components/molecules/multi-select/MultiSelect.js +59 -60
  69. package/dist/components/molecules/multi-select/MultiSelectComboboxSelectedValues.js +7 -7
  70. package/dist/components/molecules/multi-select/Option.js +40 -39
  71. package/dist/components/molecules/numeric-input/NumericInput.controller.js +50 -44
  72. package/dist/components/molecules/numeric-input/NumericInput.css +1 -1
  73. package/dist/components/molecules/numeric-input/NumericInput.helpers.js +7 -18
  74. package/dist/components/molecules/numeric-input/NumericInput2.js +7 -0
  75. package/dist/components/molecules/numeric-input/NumericInputStateful.js +72 -107
  76. package/dist/components/molecules/numeric-input/NumericInputStateless.js +60 -95
  77. package/dist/components/molecules/search/Search.controller.js +31 -41
  78. package/dist/components/molecules/search/Search.css +1 -1
  79. package/dist/components/molecules/search/Search2.js +67 -0
  80. package/dist/components/molecules/select/Select.controller.js +35 -31
  81. package/dist/components/molecules/select/Select.css +1 -1
  82. package/dist/components/molecules/select/Select.helpers.js +10 -15
  83. package/dist/components/molecules/select/Select2.js +62 -0
  84. package/dist/components/molecules/select/combobox/Combobox.css +1 -1
  85. package/dist/components/molecules/select/combobox/Combobox2.js +31 -0
  86. package/dist/components/molecules/select/dropdown/Dropdown.css +1 -1
  87. package/dist/components/molecules/select/dropdown/Dropdown2.js +31 -0
  88. package/dist/components/molecules/select/option/Option.css +1 -1
  89. package/dist/components/molecules/select/option/Option2.js +36 -0
  90. package/dist/components/molecules/switch/Switch.controller.js +32 -32
  91. package/dist/components/molecules/switch/Switch.css +1 -1
  92. package/dist/components/molecules/switch/Switch.helpers.js +5 -9
  93. package/dist/components/molecules/switch/Switch2.js +58 -0
  94. package/dist/components/molecules/text-input/TextInput.controller.js +46 -35
  95. package/dist/components/molecules/text-input/TextInput.css +1 -1
  96. package/dist/components/molecules/text-input/TextInput.helpers.js +7 -16
  97. package/dist/components/molecules/text-input/TextInput2.js +7 -0
  98. package/dist/components/molecules/text-input/TextInputButtons.js +20 -37
  99. package/dist/components/molecules/text-input/TextInputStateful.js +62 -91
  100. package/dist/components/molecules/text-input/TextInputStateless.js +59 -88
  101. package/dist/components/organisms/dialog/Dialog.css +1 -1
  102. package/dist/components/organisms/dialog/Dialog2.js +50 -0
  103. package/dist/components/organisms/form/Form.controller.js +28 -28
  104. package/dist/components/organisms/form/Form.css +1 -1
  105. package/dist/components/organisms/form/Form.helpers.js +9 -11
  106. package/dist/components/organisms/form/Form2.js +52 -0
  107. package/dist/components/organisms/grid/Grid.controller.js +27 -33
  108. package/dist/components/organisms/grid/Grid.css +1 -1
  109. package/dist/components/organisms/grid/Grid.helpers.js +13 -14
  110. package/dist/components/organisms/grid/Grid2.js +52 -0
  111. package/dist/components/organisms/grid/body/GridBody.css +1 -1
  112. package/dist/components/organisms/grid/body/GridBody2.js +26 -0
  113. package/dist/components/organisms/grid/checkbox/GridCheckbox.css +1 -1
  114. package/dist/components/organisms/grid/checkbox/GridCheckbox2.js +35 -0
  115. package/dist/components/organisms/grid/column-group/GridColumnGroup2.js +14 -0
  116. package/dist/components/organisms/grid/data-cell/GridDataCell.js +5 -5
  117. package/dist/components/organisms/grid/grid-row/GridRow2.js +24 -0
  118. package/dist/components/organisms/grid/head/GridHead.css +1 -1
  119. package/dist/components/organisms/grid/head/GridHead2.js +23 -0
  120. package/dist/components/organisms/grid/header-cell/HeaderCell.js +5 -8
  121. package/dist/components/organisms/grid/select-all-grid-rows-cell/SelectAllGridRowsCell.js +15 -24
  122. package/dist/components/organisms/grid/select-grid-row-cell/SelectGridRowCell.js +14 -23
  123. package/dist/components/organisms/menu/Menu.css +1 -1
  124. package/dist/components/organisms/menu/Menu2.js +24 -0
  125. package/dist/components/organisms/menu/leaf/MenuLeaf.css +1 -1
  126. package/dist/components/organisms/menu/leaf/MenuLeaf2.js +31 -0
  127. package/dist/components/organisms/menu/list-item/MenuListItem.css +1 -1
  128. package/dist/components/organisms/menu/list-item/MenuListItem2.js +38 -0
  129. package/dist/components/organisms/menu/sub-menu/SubMenu.css +1 -1
  130. package/dist/components/organisms/menu/sub-menu/SubMenu2.js +56 -0
  131. package/dist/components/organisms/tabs/Tabs.css +1 -1
  132. package/dist/components/organisms/tabs/Tabs2.js +60 -0
  133. package/dist/components/organisms/tabs/button/TabButton.css +1 -1
  134. package/dist/components/organisms/tabs/button/TabButton2.js +83 -0
  135. package/dist/components/organisms/tabs/content/TabContent.css +1 -1
  136. package/dist/components/organisms/tabs/content/TabContent2.js +16 -0
  137. package/dist/components/organisms/tabs/edit-input/TabEditInput.css +1 -1
  138. package/dist/components/organisms/tabs/edit-input/TabEditInput2.js +45 -0
  139. package/dist/components/organisms/tabs/list/TabList.css +1 -1
  140. package/dist/components/organisms/tabs/list/TabList2.js +51 -0
  141. package/dist/enums/alert-mode.js +6 -4
  142. package/dist/enums/button-view.js +6 -4
  143. package/dist/enums/element-size.js +6 -4
  144. package/dist/enums/icon-name.js +6 -4
  145. package/dist/enums/loader-view.js +6 -4
  146. package/dist/enums/orientation-mode.js +6 -4
  147. package/dist/enums/semantic-color.js +6 -4
  148. package/dist/enums/tooltip-container.js +6 -4
  149. package/dist/hooks/use-auto-close/use-auto-close.js +17 -17
  150. package/dist/hooks/use-click-outside/use-click-outside.js +18 -18
  151. package/dist/hooks/use-container-dimensions/use-container-dimensions.js +15 -15
  152. package/dist/hooks/use-debounce/use-debounce.js +14 -14
  153. package/dist/hooks/use-element-ids/use-element-ids.js +11 -11
  154. package/dist/hooks/use-is-hovered/use-is-hovered.js +14 -14
  155. package/dist/hooks/use-is-mounted/use-is-mounted.js +14 -14
  156. package/dist/hooks/use-is-overflow/use-is-overflow.js +26 -26
  157. package/dist/hooks/use-key-press/use-key-press.js +17 -13
  158. package/dist/hooks/use-modal-focus-trap/use-modal-focus-trap.js +15 -19
  159. package/dist/hooks/use-remaining-timer/use-remaining-timer.js +35 -37
  160. package/dist/hooks/use-reset-form-input/use-reset-form-input.js +10 -10
  161. package/dist/hooks/use-theme/use-theme.js +6 -6
  162. package/dist/hooks/use-tooltip-position/use-tooltip-position.js +36 -30
  163. package/dist/hooks/use-window-dimensions/use-window-dimensions.js +18 -15
  164. package/dist/index.es.js +55 -112
  165. package/dist/styles/icons.css +1 -1
  166. package/dist/styles/main.css +1 -1
  167. package/dist/utils/get-class-name.js +13 -15
  168. package/dist/utils/handle-dropdown-list-key-press.js +26 -31
  169. package/dist/utils/move-focus-on-element-by-id.js +6 -6
  170. package/package.json +15 -17
  171. package/dist/components/atoms/button/Button.js +0 -66
  172. package/dist/components/atoms/button/icon-button/IconButton.js +0 -15
  173. package/dist/components/atoms/button/icon-button/index.js +0 -3
  174. package/dist/components/atoms/button/index.js +0 -3
  175. package/dist/components/atoms/button/inner-button/InnerButton.js +0 -28
  176. package/dist/components/atoms/button/inner-button/index.js +0 -3
  177. package/dist/components/atoms/button/primary-button/PrimaryButton.js +0 -18
  178. package/dist/components/atoms/button/primary-button/index.js +0 -3
  179. package/dist/components/atoms/button/secondary-button/SecondaryButton.js +0 -18
  180. package/dist/components/atoms/button/secondary-button/index.js +0 -3
  181. package/dist/components/atoms/editable-text/EditableText.js +0 -71
  182. package/dist/components/atoms/editable-text/index.js +0 -3
  183. package/dist/components/atoms/error-message/ErrorMessage.js +0 -30
  184. package/dist/components/atoms/error-message/index.js +0 -3
  185. package/dist/components/atoms/header/Header.js +0 -22
  186. package/dist/components/atoms/header/index.js +0 -3
  187. package/dist/components/atoms/icon/Icon.js +0 -31
  188. package/dist/components/atoms/icon/index.js +0 -3
  189. package/dist/components/atoms/image/Image.js +0 -24
  190. package/dist/components/atoms/image/index.js +0 -3
  191. package/dist/components/atoms/input/Input.js +0 -10
  192. package/dist/components/atoms/input/index.js +0 -3
  193. package/dist/components/atoms/label/Label.js +0 -30
  194. package/dist/components/atoms/label/index.js +0 -3
  195. package/dist/components/atoms/link/Link.js +0 -39
  196. package/dist/components/atoms/link/index.js +0 -3
  197. package/dist/components/atoms/tooltip/Tooltip.js +0 -70
  198. package/dist/components/atoms/tooltip/index.js +0 -3
  199. package/dist/components/molecules/accordion/Accordion.js +0 -11
  200. package/dist/components/molecules/accordion/AccordionItem.js +0 -24
  201. package/dist/components/molecules/accordion/index.js +0 -3
  202. package/dist/components/molecules/alert/Alert.js +0 -59
  203. package/dist/components/molecules/alert/index.js +0 -3
  204. package/dist/components/molecules/breadcrumbs/Breadcrumbs.js +0 -31
  205. package/dist/components/molecules/breadcrumbs/index.js +0 -3
  206. package/dist/components/molecules/checkbox/Checkbox.js +0 -7
  207. package/dist/components/molecules/checkbox/index.js +0 -3
  208. package/dist/components/molecules/numeric-input/NumericInput.js +0 -7
  209. package/dist/components/molecules/numeric-input/index.js +0 -3
  210. package/dist/components/molecules/search/Search.js +0 -112
  211. package/dist/components/molecules/search/index.js +0 -3
  212. package/dist/components/molecules/select/Select.js +0 -64
  213. package/dist/components/molecules/select/combobox/Combobox.js +0 -46
  214. package/dist/components/molecules/select/combobox/index.js +0 -3
  215. package/dist/components/molecules/select/dropdown/Dropdown.js +0 -46
  216. package/dist/components/molecules/select/dropdown/index.js +0 -3
  217. package/dist/components/molecules/select/index.js +0 -3
  218. package/dist/components/molecules/select/option/Option.js +0 -38
  219. package/dist/components/molecules/select/option/index.js +0 -3
  220. package/dist/components/molecules/switch/Switch.js +0 -68
  221. package/dist/components/molecules/switch/index.js +0 -3
  222. package/dist/components/molecules/text-input/TextInput.js +0 -7
  223. package/dist/components/molecules/text-input/index.js +0 -3
  224. package/dist/components/organisms/dialog/Dialog.js +0 -32
  225. package/dist/components/organisms/dialog/index.js +0 -3
  226. package/dist/components/organisms/form/Form.js +0 -48
  227. package/dist/components/organisms/form/index.js +0 -3
  228. package/dist/components/organisms/grid/Grid.js +0 -60
  229. package/dist/components/organisms/grid/body/GridBody.js +0 -31
  230. package/dist/components/organisms/grid/checkbox/GridCheckbox.js +0 -52
  231. package/dist/components/organisms/grid/column-group/GridColumnGroup.js +0 -26
  232. package/dist/components/organisms/grid/grid-row/GridRow.js +0 -35
  233. package/dist/components/organisms/grid/grid-row/index.js +0 -3
  234. package/dist/components/organisms/grid/head/GridHead.js +0 -35
  235. package/dist/components/organisms/grid/index.js +0 -3
  236. package/dist/components/organisms/menu/Menu.js +0 -22
  237. package/dist/components/organisms/menu/index.js +0 -3
  238. package/dist/components/organisms/menu/leaf/MenuLeaf.js +0 -28
  239. package/dist/components/organisms/menu/list-item/MenuListItem.js +0 -35
  240. package/dist/components/organisms/menu/sub-menu/SubMenu.js +0 -67
  241. package/dist/components/organisms/menu/sub-menu/index.js +0 -3
  242. package/dist/components/organisms/tabs/Tabs.js +0 -80
  243. package/dist/components/organisms/tabs/button/TabButton.js +0 -111
  244. package/dist/components/organisms/tabs/content/TabContent.js +0 -19
  245. package/dist/components/organisms/tabs/edit-input/TabEditInput.js +0 -64
  246. package/dist/components/organisms/tabs/index.js +0 -3
  247. package/dist/components/organisms/tabs/list/TabList.js +0 -67
package/README.md CHANGED
@@ -13,10 +13,15 @@
13
13
  [![Code Style: Prettier](https://img.shields.io/badge/Code_Style-Prettier-ff69b4.svg?style=flat)](https://prettier.io)
14
14
  [![Keep a changelog](https://img.shields.io/badge/Keep%20a%20changelog-1.1.0-E05735?logo=keep-a-changelog&labelColor)](https://keepachangelog.com/en/1.1.0/)
15
15
  [![Semantic versioning](https://img.shields.io/badge/SemVer-2.0.0-3F4551?logo=semver&labelColor)](https://semver.org/spec/v2.0.0)
16
+ [![Mutation testing badge](https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2FChopLogic%2Fchop-logic-components%2Fmain)](https://dashboard.stryker-mutator.io/reports/github.com/ChopLogic/chop-logic-components/main)
16
17
 
17
18
  Welcome to **Chop Logic Components**, a React components library packed with a variety of **styled
18
19
  components** and **custom hooks** that are easy to integrate into any React project.
19
20
 
21
+ ## 📚 About This Library
22
+
23
+ Chop Logic Components follows **Atomic Design** principles with **Fully Typed TypeScript** components. All styling uses **pure CSS with CSS variables** (BEM naming convention with `cl-` prefix) for consistent theming across light and dark modes. Built for developer productivity with comprehensive Storybook documentation and accessibility-first approach.
24
+
20
25
  ## ✨ Features
21
26
 
22
27
  Chop Logic is designed to speed up development by providing reusable, accessible, and highly customizable components.
@@ -60,6 +65,7 @@ yarn add chop-logic-components
60
65
  | `test` | Runs unit tests using Vitest in watch mode (interactive). |
61
66
  | `test:ci` | Runs tests once in CI mode and allows empty test sets. |
62
67
  | `coverage` | Runs tests and generates a coverage report using Vitest. |
68
+ | `test:mutation` | Runs mutation testing using Stryker to verify test quality. |
63
69
  | `release:version` | Bumps the version (`patch`, `minor`, or `major`), commits the change, creates a Git tag, and pushes to `main`. Usage: `npm run release:version patch` |
64
70
 
65
71
  ## 🛠 Contributing
@@ -1 +1 @@
1
- .cl-button{font-size:var(--cl-typography-base-mobile);padding:var(--cl-m-gap);display:flex;align-items:center;justify-content:center;width:fit-content}.cl-button:focus-visible{outline:var(--cl-outline-border);outline-offset:var(--cl-s-gap)}.cl-button[disabled]{pointer-events:none;opacity:.5}.cl-button_extended{width:100%}@media(min-width:640px){.cl-button{font-size:var(--cl-typography-base-tablet);padding:var(--cl-m-gap) var(--cl-l-gap)}}@media(min-width:1024px){.cl-button{font-size:var(--cl-typography-base-desktop)}}
1
+ .cl-button{font-size:var(--cl-typography-base-mobile);padding:var(--cl-m-gap);justify-content:center;align-items:center;width:fit-content;display:flex}.cl-button:focus-visible{outline:var(--cl-outline-border);outline-offset:var(--cl-s-gap)}.cl-button[disabled]{pointer-events:none;opacity:.5}.cl-button_extended{width:100%}@media (width>=640px){.cl-button{font-size:var(--cl-typography-base-tablet);padding:var(--cl-m-gap) var(--cl-l-gap)}}@media (width>=1024px){.cl-button{font-size:var(--cl-typography-base-desktop)}}
@@ -0,0 +1,51 @@
1
+ import { getClassName as e } from "../../../utils/get-class-name.js";
2
+ import { withTooltip as t } from "../../hocs/with-tooltip/with-tooltip.js";
3
+ import './Button.css';/* empty css */
4
+ import { ButtonView as n } from "../../../enums/button-view.js";
5
+ import { IconButton as r } from "./icon-button/IconButton2.js";
6
+ import { InnerButton as i } from "./inner-button/InnerButton2.js";
7
+ import { PrimaryButton as a } from "./primary-button/PrimaryButton2.js";
8
+ import { SecondaryButton as o } from "./secondary-button/SecondaryButton2.js";
9
+ import { jsx as s } from "react/jsx-runtime";
10
+ var c = t(({ text: t, icon: c, tooltip: l, extended: u = !1, view: d = n.Primary, label: f, className: p, iconSize: m, ...h }) => {
11
+ let g = e([
12
+ p,
13
+ "cl-button",
14
+ { "cl-button_extended": u }
15
+ ]);
16
+ switch (d) {
17
+ case n.Primary: return /* @__PURE__ */ s(a, {
18
+ className: g,
19
+ icon: c,
20
+ text: t,
21
+ "aria-label": f,
22
+ iconSize: m,
23
+ ...h
24
+ });
25
+ case n.Secondary: return /* @__PURE__ */ s(o, {
26
+ className: g,
27
+ icon: c,
28
+ text: t,
29
+ "aria-label": f,
30
+ iconSize: m,
31
+ ...h
32
+ });
33
+ case n.Icon: return /* @__PURE__ */ s(r, {
34
+ label: f,
35
+ icon: c,
36
+ iconSize: m,
37
+ ...h,
38
+ className: p
39
+ });
40
+ case n.Inner: return /* @__PURE__ */ s(i, {
41
+ label: f,
42
+ icon: c,
43
+ iconSize: m,
44
+ ...h,
45
+ className: p
46
+ });
47
+ default: return null;
48
+ }
49
+ });
50
+ //#endregion
51
+ export { c as default };
@@ -1 +1 @@
1
- .cl-icon-button{border:none;cursor:pointer;padding:var(--cl-m-gap);border-radius:50%;background:transparent;width:fit-content;transition:all .15s ease}.cl-icon-button__icon:before{color:var(--cl-base-font-color)}.cl-icon-button:hover{transform:scale(1.1);filter:drop-shadow(0 2px 4px hsla(0,0%,0%,.15))}.cl-icon-button:hover .cl-icon-button__icon:before{color:var(--cl-accent-a0)}.cl-icon-button:active{transform:scale(.95)}.cl-icon-button[disabled]{pointer-events:none;opacity:.5}
1
+ .cl-icon-button{cursor:pointer;padding:var(--cl-m-gap);background:0 0;border:none;border-radius:50%;width:fit-content;transition:all .15s}.cl-icon-button__icon:before{color:var(--cl-base-font-color)}.cl-icon-button:hover{filter:drop-shadow(0 2px 4px #00000026);transform:scale(1.1)}.cl-icon-button:hover .cl-icon-button__icon:before{color:var(--cl-accent-a0)}.cl-icon-button:active{transform:scale(.95)}.cl-icon-button[disabled]{pointer-events:none;opacity:.5}
@@ -0,0 +1,18 @@
1
+ import { getClassName as e } from "../../../../utils/get-class-name.js";
2
+ import { ElementSize as t } from "../../../../enums/element-size.js";
3
+ import './IconButton.css';/* empty css */
4
+ import n from "../../icon/Icon2.js";
5
+ import { jsx as r } from "react/jsx-runtime";
6
+ //#region src/components/atoms/button/icon-button/IconButton.tsx
7
+ var i = ({ icon: i, className: a, label: o, iconSize: s = t.Medium, ...c }) => /* @__PURE__ */ r("button", {
8
+ ...c,
9
+ "aria-label": o,
10
+ className: e(["cl-icon-button", a]),
11
+ children: i && /* @__PURE__ */ r(n, {
12
+ name: i,
13
+ className: "cl-icon-button__icon",
14
+ size: s
15
+ })
16
+ });
17
+ //#endregion
18
+ export { i as IconButton };
@@ -1 +1 @@
1
- .cl-inner-button{background:transparent;border:none;padding:0;cursor:pointer;height:var(--cl-icon-size);width:var(--cl-icon-size);transition:all .15s ease}.cl-inner-button:focus-visible{outline:var(--cl-outline-border);outline-offset:-1px}.cl-inner-button:hover{transform:scale(1.15);filter:var(--cl-drop-shadow)}.cl-inner-button:hover .cl-inner-button__icon:before{color:var(--cl-accent-a10)}.cl-inner-button:active{transform:scale(.95)}.cl-inner-button[disabled]{pointer-events:none;opacity:.5}
1
+ .cl-inner-button{cursor:pointer;height:var(--cl-icon-size);width:var(--cl-icon-size);background:0 0;border:none;padding:0;transition:all .15s}.cl-inner-button:focus-visible{outline:var(--cl-outline-border);outline-offset:-1px}.cl-inner-button:hover{filter:var(--cl-drop-shadow);transform:scale(1.15)}.cl-inner-button:hover .cl-inner-button__icon:before{color:var(--cl-accent-a10)}.cl-inner-button:active{transform:scale(.95)}.cl-inner-button[disabled]{pointer-events:none;opacity:.5}
@@ -0,0 +1,21 @@
1
+ import { getClassName as e } from "../../../../utils/get-class-name.js";
2
+ import { ElementSize as t } from "../../../../enums/element-size.js";
3
+ import './InnerButton.css';/* empty css */
4
+ import n from "../../icon/Icon2.js";
5
+ import { jsx as r } from "react/jsx-runtime";
6
+ //#region src/components/atoms/button/inner-button/InnerButton.tsx
7
+ var i = ({ onClick: i, label: a, icon: o, disabled: s, className: c, iconSize: l = t.Small, ...u }) => /* @__PURE__ */ r("button", {
8
+ className: e(["cl-inner-button", c]),
9
+ onClick: i,
10
+ "aria-label": a,
11
+ type: "button",
12
+ disabled: s,
13
+ ...u,
14
+ children: /* @__PURE__ */ r(n, {
15
+ name: o,
16
+ size: l,
17
+ className: "cl-inner-button__icon"
18
+ })
19
+ });
20
+ //#endregion
21
+ export { i as InnerButton };
@@ -1 +1 @@
1
- .cl-primary-button{border:none;cursor:pointer;border-radius:var(--cl-border-radius);background:var(--cl-accent-gradient);box-shadow:var(--cl-box-shadow);gap:var(--cl-s-gap);transition:all .15s ease}.cl-primary-button:hover{filter:brightness(1.1);box-shadow:var(--cl-box-shadow-extended)}.cl-primary-button:active{transform:scale(.98);box-shadow:var(--cl-box-shadow)}.cl-primary-button__text{font-family:var(--cl-core-font);font-size:inherit;color:var(--cl-base-background-color);font-weight:400;line-height:1.5;letter-spacing:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.cl-primary-button__icon:before{color:var(--cl-base-background-color)}
1
+ .cl-primary-button{cursor:pointer;border-radius:var(--cl-border-radius);background:var(--cl-accent-gradient);box-shadow:var(--cl-box-shadow);gap:var(--cl-s-gap);border:none;transition:all .15s}.cl-primary-button:hover{filter:brightness(1.1);box-shadow:var(--cl-box-shadow-extended)}.cl-primary-button:active{box-shadow:var(--cl-box-shadow);transform:scale(.98)}.cl-primary-button__text{font-family:var(--cl-core-font);font-size:inherit;color:var(--cl-base-background-color);letter-spacing:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;line-height:1.5}.cl-primary-button__icon:before{color:var(--cl-base-background-color)}
@@ -0,0 +1,20 @@
1
+ import { getClassName as e } from "../../../../utils/get-class-name.js";
2
+ import { ElementSize as t } from "../../../../enums/element-size.js";
3
+ import './PrimaryButton.css';/* empty css */
4
+ import n from "../../icon/Icon2.js";
5
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
6
+ //#region src/components/atoms/button/primary-button/PrimaryButton.tsx
7
+ var a = ({ icon: a, text: o, className: s, iconSize: c = t.Small, ...l }) => /* @__PURE__ */ i("button", {
8
+ ...l,
9
+ className: e(["cl-primary-button", s]),
10
+ children: [a && /* @__PURE__ */ r(n, {
11
+ name: a,
12
+ className: "cl-primary-button__icon",
13
+ size: c
14
+ }), /* @__PURE__ */ r("span", {
15
+ className: "cl-primary-button__text",
16
+ children: o
17
+ })]
18
+ });
19
+ //#endregion
20
+ export { a as PrimaryButton };
@@ -1 +1 @@
1
- .cl-secondary-button{background:var(--cl-surface-a10);cursor:pointer;border-radius:var(--cl-border-radius);border:none;gap:var(--cl-s-gap);transition:all .15s ease;box-shadow:var(--cl-box-shadow)}.cl-secondary-button:hover{box-shadow:var(--cl-box-shadow-extended)}.cl-secondary-button:active{transform:scale(.98);box-shadow:var(--cl-box-shadow)}.cl-secondary-button__text{font-family:var(--cl-core-font);font-size:inherit;color:var(--cl-base-font-color);font-weight:400;line-height:1.5;letter-spacing:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.cl-secondary-button__icon:before{color:var(--cl-base-font-color);margin-right:var(--cl-s-gap)}
1
+ .cl-secondary-button{background:var(--cl-surface-a10);cursor:pointer;border-radius:var(--cl-border-radius);gap:var(--cl-s-gap);box-shadow:var(--cl-box-shadow);border:none;transition:all .15s}.cl-secondary-button:hover{box-shadow:var(--cl-box-shadow-extended)}.cl-secondary-button:active{box-shadow:var(--cl-box-shadow);transform:scale(.98)}.cl-secondary-button__text{font-family:var(--cl-core-font);font-size:inherit;color:var(--cl-base-font-color);letter-spacing:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;line-height:1.5}.cl-secondary-button__icon:before{color:var(--cl-base-font-color);margin-right:var(--cl-s-gap)}
@@ -0,0 +1,20 @@
1
+ import { getClassName as e } from "../../../../utils/get-class-name.js";
2
+ import { ElementSize as t } from "../../../../enums/element-size.js";
3
+ import './SecondaryButton.css';/* empty css */
4
+ import n from "../../icon/Icon2.js";
5
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
6
+ //#region src/components/atoms/button/secondary-button/SecondaryButton.tsx
7
+ var a = ({ icon: a, text: o, className: s, iconSize: c = t.Small, ...l }) => /* @__PURE__ */ i("button", {
8
+ ...l,
9
+ className: e(["cl-secondary-button", s]),
10
+ children: [a && /* @__PURE__ */ r(n, {
11
+ name: a,
12
+ className: "cl-secondary-button__icon",
13
+ size: c
14
+ }), /* @__PURE__ */ r("span", {
15
+ className: "cl-secondary-button__text",
16
+ children: o
17
+ })]
18
+ });
19
+ //#endregion
20
+ export { a as SecondaryButton };
@@ -1,37 +1,18 @@
1
- import { jsx as d } from "react/jsx-runtime";
2
- import { useCallback as f } from "react";
3
- const g = ({
4
- multiline: t,
5
- value: e,
6
- placeholder: r,
7
- onChange: o,
8
- onBlur: n,
9
- onKeyDown: a,
10
- className: p,
11
- inputRef: s,
12
- ...c
13
- }) => {
14
- const i = t ? "textarea" : "input", m = f(
15
- (u) => {
16
- o(u.target.value);
17
- },
18
- [o]
19
- );
20
- return /* @__PURE__ */ d(
21
- i,
22
- {
23
- ref: s,
24
- value: e,
25
- onChange: m,
26
- onBlur: n,
27
- onKeyDown: a,
28
- placeholder: r,
29
- className: p,
30
- rows: t ? 3 : void 0,
31
- ...c
32
- }
33
- );
34
- };
35
- export {
36
- g as EditView
37
- };
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { useCallback as t } from "react";
3
+ //#region src/components/atoms/editable-text/EditView.tsx
4
+ var n = ({ multiline: n, value: r, placeholder: i, onChange: a, onBlur: o, onKeyDown: s, className: c, inputRef: l, ...u }) => /* @__PURE__ */ e(n ? "textarea" : "input", {
5
+ ref: l,
6
+ value: r,
7
+ onChange: t((e) => {
8
+ a(e.target.value);
9
+ }, [a]),
10
+ onBlur: o,
11
+ onKeyDown: s,
12
+ placeholder: i,
13
+ className: c,
14
+ rows: n ? 3 : void 0,
15
+ ...u
16
+ });
17
+ //#endregion
18
+ export { n as EditView };
@@ -1 +1 @@
1
- .cl-editable-text{color:var(--cl-base-font-color);border-radius:var(--cl-border-radius);display:inline-block;font-family:var(--cl-core-font);font-size:var(--cl-typography-base-mobile);font-weight:400;line-height:1.5;letter-spacing:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.cl-editable-text:hover,.cl-editable-text:focus{outline:var(--cl-accent-border);outline-offset:var(--cl-xs-gap)}.cl-editable-text_edit-mode{border:none;background:transparent;outline:var(--cl-accent-border);outline-offset:var(--cl-xs-gap);min-width:var(--cl-l-gap)}.cl-editable-text_read-only:hover,.cl-editable-text_read-only:focus{outline:none}.cl-editable-text_empty{min-width:var(--cl-l-gap);min-height:24px;outline:var(--cl-accent-border);outline-offset:var(--cl-xs-gap)}@media(min-width:640px){.cl-editable-text{font-size:var(--cl-typography-base-tablet)}}@media(min-width:1024px){.cl-editable-text{font-size:var(--cl-typography-base-desktop)}}
1
+ .cl-editable-text{color:var(--cl-base-font-color);border-radius:var(--cl-border-radius);font-family:var(--cl-core-font);font-size:var(--cl-typography-base-mobile);letter-spacing:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;line-height:1.5;display:inline-block}.cl-editable-text:hover,.cl-editable-text:focus{outline:var(--cl-accent-border);outline-offset:var(--cl-xs-gap)}.cl-editable-text_edit-mode{outline:var(--cl-accent-border);outline-offset:var(--cl-xs-gap);min-width:var(--cl-l-gap);background:0 0;border:none}.cl-editable-text_read-only:hover,.cl-editable-text_read-only:focus{outline:none}.cl-editable-text_empty{min-width:var(--cl-l-gap);outline:var(--cl-accent-border);outline-offset:var(--cl-xs-gap);min-height:24px}@media (width>=640px){.cl-editable-text{font-size:var(--cl-typography-base-tablet)}}@media (width>=1024px){.cl-editable-text{font-size:var(--cl-typography-base-desktop)}}
@@ -0,0 +1,53 @@
1
+ import { getClassName as e } from "../../../utils/get-class-name.js";
2
+ import './EditableText.css';/* empty css */
3
+ import { EditView as t } from "./EditView.js";
4
+ import { ReadView as n } from "./ReadView.js";
5
+ import { useEditModeState as r } from "./useEditModeState.js";
6
+ import { useInputFocus as i } from "./useInputFocus.js";
7
+ import { useValueState as a } from "./useValueState.js";
8
+ import { jsx as o } from "react/jsx-runtime";
9
+ import { useCallback as s, useRef as c } from "react";
10
+ //#region src/components/atoms/editable-text/EditableText.tsx
11
+ var l = ({ value: l, isEditMode: u, onChange: d, onClick: f, className: p, autoSelectTextOnEditMode: m = !1, multiline: h = !1, placeholder: g = "Click to edit...", readOnly: _ = !1, ...v }) => {
12
+ let y = c(null), { editMode: b, enterEditMode: x, exitEditMode: S } = r(u, _), { internalValue: C, updateValue: w, commitValue: T, resetValue: E } = a(l, d);
13
+ i(y, b, m, _);
14
+ let D = s((e) => {
15
+ f?.(e), x();
16
+ }, [f, x]), O = s(() => {
17
+ S(), T();
18
+ }, [S, T]), k = s((e) => {
19
+ e.key === "Enter" && !h && (e.preventDefault(), O()), e.key === "Escape" && (E(), S());
20
+ }, [
21
+ h,
22
+ O,
23
+ E,
24
+ S
25
+ ]), A = e([
26
+ "cl-editable-text",
27
+ p,
28
+ {
29
+ "cl-editable-text_edit-mode": b,
30
+ "cl-editable-text_read-only": _,
31
+ "cl-editable-text_empty": !C
32
+ }
33
+ ]);
34
+ return b && !_ ? /* @__PURE__ */ o(t, {
35
+ multiline: h,
36
+ value: C,
37
+ placeholder: g,
38
+ onChange: w,
39
+ onBlur: O,
40
+ onKeyDown: k,
41
+ className: A,
42
+ inputRef: y,
43
+ ...v
44
+ }) : /* @__PURE__ */ o(n, {
45
+ value: C,
46
+ placeholder: g,
47
+ onClick: D,
48
+ className: A,
49
+ ...v
50
+ });
51
+ };
52
+ //#endregion
53
+ export { l as default };
@@ -1,25 +1,16 @@
1
- import { jsx as l } from "react/jsx-runtime";
2
- const y = ({
3
- value: t,
4
- placeholder: a,
5
- onClick: n,
6
- className: o,
7
- ...r
8
- }) => /* @__PURE__ */ l(
9
- "span",
10
- {
11
- onClick: n,
12
- className: o,
13
- role: "button",
14
- tabIndex: 0,
15
- onKeyDown: (e) => {
16
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), n(e));
17
- },
18
- "aria-label": "Editable text",
19
- ...r,
20
- children: t || a
21
- }
22
- );
23
- export {
24
- y as ReadView
25
- };
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ //#region src/components/atoms/editable-text/ReadView.tsx
3
+ var t = ({ value: t, placeholder: n, onClick: r, className: i, ...a }) => /* @__PURE__ */ e("span", {
4
+ onClick: r,
5
+ className: i,
6
+ role: "button",
7
+ tabIndex: 0,
8
+ onKeyDown: (e) => {
9
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), r(e));
10
+ },
11
+ "aria-label": "Editable text",
12
+ ...a,
13
+ children: t || n
14
+ });
15
+ //#endregion
16
+ export { t as ReadView };
@@ -1,17 +1,17 @@
1
- import { useState as d } from "react";
2
- const c = (e, i) => {
3
- const [s, o] = d(!1), [t] = d(e !== void 0);
4
- return {
5
- editMode: t ? !!e : s,
6
- enterEditMode: () => {
7
- !t && !i && o(!0);
8
- },
9
- exitEditMode: () => {
10
- t || o(!1);
11
- },
12
- isControlled: t
13
- };
14
- };
15
- export {
16
- c as useEditModeState
1
+ import { useState as e } from "react";
2
+ //#region src/components/atoms/editable-text/useEditModeState.ts
3
+ var t = (t, n) => {
4
+ let [r, i] = e(!1), [a] = e(t !== void 0);
5
+ return {
6
+ editMode: a ? !!t : r,
7
+ enterEditMode: () => {
8
+ !a && !n && i(!0);
9
+ },
10
+ exitEditMode: () => {
11
+ a || i(!1);
12
+ },
13
+ isControlled: a
14
+ };
17
15
  };
16
+ //#endregion
17
+ export { t as useEditModeState };
@@ -1,9 +1,14 @@
1
- import { useEffect as t } from "react";
2
- const n = (c, u, s, r) => {
3
- t(() => {
4
- u && c.current && !r && (c.current.focus(), s && c.current.select());
5
- }, [u, s, r, c]);
6
- };
7
- export {
8
- n as useInputFocus
1
+ import { useEffect as e } from "react";
2
+ //#region src/components/atoms/editable-text/useInputFocus.ts
3
+ var t = (t, n, r, i) => {
4
+ e(() => {
5
+ n && t.current && !i && (t.current.focus(), r && t.current.select());
6
+ }, [
7
+ n,
8
+ r,
9
+ i,
10
+ t
11
+ ]);
9
12
  };
13
+ //#endregion
14
+ export { t as useInputFocus };
@@ -1,21 +1,21 @@
1
- import { useState as n, useEffect as o } from "react";
2
- const m = (e, s) => {
3
- const [t, a] = n(e);
4
- return o(() => {
5
- a(e);
6
- }, [e]), {
7
- internalValue: t,
8
- updateValue: (u) => {
9
- a(u);
10
- },
11
- commitValue: () => {
12
- t !== e && s?.(t);
13
- },
14
- resetValue: () => {
15
- a(e);
16
- }
17
- };
18
- };
19
- export {
20
- m as useValueState
1
+ import { useEffect as e, useState as t } from "react";
2
+ //#region src/components/atoms/editable-text/useValueState.ts
3
+ var n = (n, r) => {
4
+ let [i, a] = t(n);
5
+ return e(() => {
6
+ a(n);
7
+ }, [n]), {
8
+ internalValue: i,
9
+ updateValue: (e) => {
10
+ a(e);
11
+ },
12
+ commitValue: () => {
13
+ i !== n && r?.(i);
14
+ },
15
+ resetValue: () => {
16
+ a(n);
17
+ }
18
+ };
21
19
  };
20
+ //#endregion
21
+ export { n as useValueState };
@@ -1 +1 @@
1
- .cl-error-message{display:none;max-width:100%;z-index:var(--cl-z-index-popup);background-color:var(--cl-surface-a10);color:var(--cl-base-font-color);padding:var(--cl-s-gap) var(--cl-m-gap);border-radius:var(--cl-border-radius);border:var(--cl-danger-border);box-shadow:var(--cl-box-shadow);pointer-events:none;animation:cl-fade-in ease .4s;font-family:var(--cl-core-font);font-size:var(--cl-typography-small-mobile);font-weight:400;line-height:1.5;letter-spacing:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media(min-width:640px){.cl-error-message{font-size:var(--cl-typography-small-tablet)}}@media(min-width:1024px){.cl-error-message{font-size:var(--cl-typography-small-desktop)}}.cl-error-message_visible{display:block}
1
+ .cl-error-message{max-width:100%;z-index:var(--cl-z-index-popup);background-color:var(--cl-surface-a10);color:var(--cl-base-font-color);padding:var(--cl-s-gap) var(--cl-m-gap);border-radius:var(--cl-border-radius);border:var(--cl-danger-border);box-shadow:var(--cl-box-shadow);pointer-events:none;font-family:var(--cl-core-font);font-size:var(--cl-typography-small-mobile);letter-spacing:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;line-height:1.5;animation:.4s cl-fade-in;display:none}@media (width>=640px){.cl-error-message{font-size:var(--cl-typography-small-tablet)}}@media (width>=1024px){.cl-error-message{font-size:var(--cl-typography-small-desktop)}}.cl-error-message_visible{display:block}
@@ -0,0 +1,18 @@
1
+ import { getClassName as e } from "../../../utils/get-class-name.js";
2
+ import './ErrorMessage.css';/* empty css */
3
+ import { jsx as t } from "react/jsx-runtime";
4
+ //#region src/components/atoms/error-message/ErrorMessage.tsx
5
+ var n = ({ errorId: n, testId: r, message: i = "Error!", visible: a = !1, className: o }) => /* @__PURE__ */ t("span", {
6
+ id: n,
7
+ className: e([
8
+ "cl-error-message",
9
+ o,
10
+ { "cl-error-message_visible": a }
11
+ ]),
12
+ "data-testid": r,
13
+ "aria-hidden": !a,
14
+ "aria-live": "polite",
15
+ children: i
16
+ });
17
+ //#endregion
18
+ export { n as default };
@@ -1 +1 @@
1
- .cl-header{margin:0;color:var(--cl-base-font-color)}.cl-header:before{padding-right:var(--cl-m-gap)}.cl-header__h1{border-bottom:var(--cl-light-border);font-family:var(--cl-fancy-font);font-weight:700;line-height:1.5;letter-spacing:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:var(--cl-typography-h1-mobile)}@media(min-width:640px){.cl-header__h1{font-size:var(--cl-typography-h1-tablet)}}@media(min-width:1024px){.cl-header__h1{font-size:var(--cl-typography-h1-desktop)}}.cl-header__h2{border-bottom:var(--cl-light-border);font-family:var(--cl-fancy-font);font-weight:700;line-height:1.5;letter-spacing:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:var(--cl-typography-h2-mobile)}@media(min-width:640px){.cl-header__h2{font-size:var(--cl-typography-h2-tablet)}}@media(min-width:1024px){.cl-header__h2{font-size:var(--cl-typography-h2-desktop)}}.cl-header__h3{border-bottom:var(--cl-light-border);font-family:var(--cl-fancy-font);font-weight:700;line-height:1.5;letter-spacing:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:var(--cl-typography-h3-mobile)}@media(min-width:640px){.cl-header__h3{font-size:var(--cl-typography-h3-tablet)}}@media(min-width:1024px){.cl-header__h3{font-size:var(--cl-typography-h3-desktop)}}.cl-header__h4{font-family:var(--cl-fancy-font);font-weight:700;line-height:1.5;letter-spacing:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:var(--cl-typography-h4-mobile)}@media(min-width:640px){.cl-header__h4{font-size:var(--cl-typography-h4-tablet)}}@media(min-width:1024px){.cl-header__h4{font-size:var(--cl-typography-h4-desktop)}}.cl-header__h5{font-family:var(--cl-fancy-font);font-weight:700;line-height:1.5;letter-spacing:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:var(--cl-typography-h5-mobile)}@media(min-width:640px){.cl-header__h5{font-size:var(--cl-typography-h5-tablet)}}@media(min-width:1024px){.cl-header__h5{font-size:var(--cl-typography-h5-desktop)}}.cl-header__h6{font-family:var(--cl-fancy-font);font-weight:700;line-height:1.5;letter-spacing:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:var(--cl-typography-h6-mobile)}@media(min-width:640px){.cl-header__h6{font-size:var(--cl-typography-h6-tablet)}}@media(min-width:1024px){.cl-header__h6{font-size:var(--cl-typography-h6-desktop)}}
1
+ .cl-header{color:var(--cl-base-font-color);margin:0}.cl-header:before{padding-right:var(--cl-m-gap)}.cl-header__h1{border-bottom:var(--cl-light-border);font-family:var(--cl-fancy-font);letter-spacing:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;line-height:1.5;font-size:var(--cl-typography-h1-mobile)}@media (width>=640px){.cl-header__h1{font-size:var(--cl-typography-h1-tablet)}}@media (width>=1024px){.cl-header__h1{font-size:var(--cl-typography-h1-desktop)}}.cl-header__h2{border-bottom:var(--cl-light-border);font-family:var(--cl-fancy-font);letter-spacing:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;line-height:1.5;font-size:var(--cl-typography-h2-mobile)}@media (width>=640px){.cl-header__h2{font-size:var(--cl-typography-h2-tablet)}}@media (width>=1024px){.cl-header__h2{font-size:var(--cl-typography-h2-desktop)}}.cl-header__h3{border-bottom:var(--cl-light-border);font-family:var(--cl-fancy-font);letter-spacing:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;line-height:1.5;font-size:var(--cl-typography-h3-mobile)}@media (width>=640px){.cl-header__h3{font-size:var(--cl-typography-h3-tablet)}}@media (width>=1024px){.cl-header__h3{font-size:var(--cl-typography-h3-desktop)}}.cl-header__h4{font-family:var(--cl-fancy-font);letter-spacing:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;line-height:1.5;font-size:var(--cl-typography-h4-mobile)}@media (width>=640px){.cl-header__h4{font-size:var(--cl-typography-h4-tablet)}}@media (width>=1024px){.cl-header__h4{font-size:var(--cl-typography-h4-desktop)}}.cl-header__h5{font-family:var(--cl-fancy-font);letter-spacing:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;line-height:1.5;font-size:var(--cl-typography-h5-mobile)}@media (width>=640px){.cl-header__h5{font-size:var(--cl-typography-h5-tablet)}}@media (width>=1024px){.cl-header__h5{font-size:var(--cl-typography-h5-desktop)}}.cl-header__h6{font-family:var(--cl-fancy-font);letter-spacing:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;line-height:1.5;font-size:var(--cl-typography-h6-mobile)}@media (width>=640px){.cl-header__h6{font-size:var(--cl-typography-h6-tablet)}}@media (width>=1024px){.cl-header__h6{font-size:var(--cl-typography-h6-desktop)}}
@@ -0,0 +1,23 @@
1
+ import { getClassName as e } from "../../../utils/get-class-name.js";
2
+ import './Header.css';/* empty css */
3
+ import { jsx as t } from "react/jsx-runtime";
4
+ //#region src/components/atoms/header/Header.tsx
5
+ var n = ({ as: n = "h1", icon: r, children: i, className: a, ...o }) => /* @__PURE__ */ t(n, {
6
+ className: e([
7
+ a,
8
+ "cl-header",
9
+ r,
10
+ {
11
+ "cl-header__h1": n === "h1",
12
+ "cl-header__h2": n === "h2",
13
+ "cl-header__h3": n === "h3",
14
+ "cl-header__h4": n === "h4",
15
+ "cl-header__h5": n === "h5",
16
+ "cl-header__h6": n === "h6"
17
+ }
18
+ ]),
19
+ ...o,
20
+ children: i
21
+ });
22
+ //#endregion
23
+ export { n as default };
@@ -1 +1 @@
1
- .cl-icon{color:var(--cl-base-font-color);display:inline-flex;width:var(--cl-icon-size);height:var(--cl-icon-size);align-items:center;justify-content:center}.cl-icon_extra-small{font-size:var(--cl-typography-small-mobile)}.cl-icon_small{font-size:var(--cl-typography-base-mobile)}.cl-icon_medium{font-size:var(--cl-typography-h5-mobile)}.cl-icon_large{font-size:var(--cl-typography-h4-mobile)}.cl-icon_xlarge{font-size:var(--cl-typography-h3-mobile)}.cl-icon_2xlarge{font-size:var(--cl-typography-h2-mobile)}@media(min-width:640px){.cl-icon_extra-small{font-size:var(--cl-typography-small-tablet)}.cl-icon_small{font-size:var(--cl-typography-base-tablet)}.cl-icon_medium{font-size:var(--cl-typography-h5-tablet)}.cl-icon_large{font-size:var(--cl-typography-h4-tablet)}.cl-icon_xlarge{font-size:var(--cl-typography-h3-tablet)}.cl-icon_2xlarge{font-size:var(--cl-typography-h2-tablet)}}@media(min-width:1024px){.cl-icon_extra-small{font-size:var(--cl-typography-small-desktop)}.cl-icon_small{font-size:var(--cl-typography-base-desktop)}.cl-icon_medium{font-size:var(--cl-typography-h5-desktop)}.cl-icon_large{font-size:var(--cl-typography-h4-desktop)}.cl-icon_xlarge{font-size:var(--cl-typography-h3-desktop)}.cl-icon_2xlarge{font-size:var(--cl-typography-h2-desktop)}}
1
+ .cl-icon{color:var(--cl-base-font-color);width:var(--cl-icon-size);height:var(--cl-icon-size);justify-content:center;align-items:center;display:inline-flex}.cl-icon_extra-small{font-size:var(--cl-typography-small-mobile)}.cl-icon_small{font-size:var(--cl-typography-base-mobile)}.cl-icon_medium{font-size:var(--cl-typography-h5-mobile)}.cl-icon_large{font-size:var(--cl-typography-h4-mobile)}.cl-icon_xlarge{font-size:var(--cl-typography-h3-mobile)}.cl-icon_2xlarge{font-size:var(--cl-typography-h2-mobile)}@media (width>=640px){.cl-icon_extra-small{font-size:var(--cl-typography-small-tablet)}.cl-icon_small{font-size:var(--cl-typography-base-tablet)}.cl-icon_medium{font-size:var(--cl-typography-h5-tablet)}.cl-icon_large{font-size:var(--cl-typography-h4-tablet)}.cl-icon_xlarge{font-size:var(--cl-typography-h3-tablet)}.cl-icon_2xlarge{font-size:var(--cl-typography-h2-tablet)}}@media (width>=1024px){.cl-icon_extra-small{font-size:var(--cl-typography-small-desktop)}.cl-icon_small{font-size:var(--cl-typography-base-desktop)}.cl-icon_medium{font-size:var(--cl-typography-h5-desktop)}.cl-icon_large{font-size:var(--cl-typography-h4-desktop)}.cl-icon_xlarge{font-size:var(--cl-typography-h3-desktop)}.cl-icon_2xlarge{font-size:var(--cl-typography-h2-desktop)}}
@@ -0,0 +1,29 @@
1
+ import { getClassName as e } from "../../../utils/get-class-name.js";
2
+ import { ElementSize as t } from "../../../enums/element-size.js";
3
+ import './Icon.css';/* empty css */
4
+ import { jsx as n } from "react/jsx-runtime";
5
+ //#region src/components/atoms/icon/Icon.tsx
6
+ var r = ({ name: r, testId: i, className: a, hidden: o, size: s = t.Medium, ...c }) => {
7
+ if (!r) return null;
8
+ let l = e([
9
+ a,
10
+ "cl-icon",
11
+ r,
12
+ {
13
+ "cl-icon_extra-small": s === t.ExtraSmall,
14
+ "cl-icon_small": s === t.Small,
15
+ "cl-icon_medium": s === t.Medium,
16
+ "cl-icon_large": s === t.Large,
17
+ "cl-icon_xlarge": s === t.ExtraLarge,
18
+ "cl-icon_2xlarge": s === t.ExtraExtraLarge
19
+ }
20
+ ]);
21
+ return /* @__PURE__ */ n("span", {
22
+ "data-testid": i,
23
+ className: l,
24
+ "aria-hidden": o,
25
+ ...c
26
+ });
27
+ };
28
+ //#endregion
29
+ export { r as default };
@@ -1,27 +1,15 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- const l = ({
3
- src: a,
4
- alt: m,
5
- width: s,
6
- height: c,
7
- sizes: e,
8
- loading: i = "lazy",
9
- decoding: r = "async",
10
- onError: g
11
- }) => /* @__PURE__ */ o(
12
- "img",
13
- {
14
- src: a,
15
- alt: m,
16
- width: s,
17
- height: c,
18
- loading: i,
19
- decoding: r,
20
- sizes: e,
21
- className: "cl-image__img",
22
- onError: g
23
- }
24
- );
25
- export {
26
- l as BasicImage
27
- };
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ //#region src/components/atoms/image/BasicImage.tsx
3
+ var t = ({ src: t, alt: n, width: r, height: i, sizes: a, loading: o = "lazy", decoding: s = "async", onError: c }) => /* @__PURE__ */ e("img", {
4
+ src: t,
5
+ alt: n,
6
+ width: r,
7
+ height: i,
8
+ loading: o,
9
+ decoding: s,
10
+ sizes: a,
11
+ className: "cl-image__img",
12
+ onError: c
13
+ });
14
+ //#endregion
15
+ export { t as BasicImage };
@@ -1,10 +1,16 @@
1
- import { jsxs as l, jsx as a } from "react/jsx-runtime";
2
- import m from "../icon/Icon.js";
3
- import { IconName as c } from "../../../enums/icon-name.js";
4
- const s = () => /* @__PURE__ */ l("div", { className: "cl-image__fallback", children: [
5
- /* @__PURE__ */ a(m, { name: c.Image, className: "cl-image__fallback-icon" }),
6
- /* @__PURE__ */ a("span", { className: "cl-image__fallback-text", children: "Image not available" })
7
- ] });
8
- export {
9
- s as FallbackImage
10
- };
1
+ import { IconName as e } from "../../../enums/icon-name.js";
2
+ import t from "../icon/Icon2.js";
3
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
+ //#region src/components/atoms/image/FallBackImage.tsx
5
+ var i = () => /* @__PURE__ */ r("div", {
6
+ className: "cl-image__fallback",
7
+ children: [/* @__PURE__ */ n(t, {
8
+ name: e.Image,
9
+ className: "cl-image__fallback-icon"
10
+ }), /* @__PURE__ */ n("span", {
11
+ className: "cl-image__fallback-text",
12
+ children: "Image not available"
13
+ })]
14
+ });
15
+ //#endregion
16
+ export { i as FallbackImage };