@vchasno/ui-kit 0.4.80 → 0.4.82

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 (136) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +9 -3
  3. package/dist/components/Alert/Alert.js +1 -1
  4. package/dist/components/Alert/Alert.js.map +1 -1
  5. package/dist/components/BlackTooltip/BlackTooltip.d.ts +2 -2
  6. package/dist/components/BlackTooltip/BlackTooltip.js +1 -1
  7. package/dist/components/BlackTooltip/BlackTooltip.js.map +1 -1
  8. package/dist/components/BlackTooltip/utils.js +1 -1
  9. package/dist/components/BlackTooltip/utils.js.map +1 -1
  10. package/dist/components/BodyPortal/BodyPortal.js +1 -1
  11. package/dist/components/BodyPortal/BodyPortal.js.map +1 -1
  12. package/dist/components/Breadcrumbs/Breadcrumbs.js +1 -1
  13. package/dist/components/Breadcrumbs/Breadcrumbs.js.map +1 -1
  14. package/dist/components/BubbleBox/BubbleBox.js +1 -1
  15. package/dist/components/BubbleBox/BubbleBox.js.map +1 -1
  16. package/dist/components/BubbleBox/utils.js +1 -1
  17. package/dist/components/BubbleBox/utils.js.map +1 -1
  18. package/dist/components/Button/Button.js +1 -1
  19. package/dist/components/Button/Button.js.map +1 -1
  20. package/dist/components/Checkbox/Checkbox.js +1 -1
  21. package/dist/components/Checkbox/Checkbox.js.map +1 -1
  22. package/dist/components/Datepicker/DatePicker.js +1 -1
  23. package/dist/components/Datepicker/DatePicker.js.map +1 -1
  24. package/dist/components/FlexBox/FlexBox.js +1 -1
  25. package/dist/components/FlexBox/FlexBox.js.map +1 -1
  26. package/dist/components/FollowUs/FollowUs.js +1 -1
  27. package/dist/components/FollowUs/FollowUs.js.map +1 -1
  28. package/dist/components/FollowUs/config.js +1 -1
  29. package/dist/components/FollowUs/config.js.map +1 -1
  30. package/dist/components/FullScreenModal/FullScreenModal.js +1 -1
  31. package/dist/components/FullScreenModal/FullScreenModal.js.map +1 -1
  32. package/dist/components/FullScreenModal/useLockBodyScroll.js +1 -1
  33. package/dist/components/FullScreenModal/useLockBodyScroll.js.map +1 -1
  34. package/dist/components/Input/Input.js +1 -1
  35. package/dist/components/Input/Input.js.map +1 -1
  36. package/dist/components/InputMeta/InputMeta.js +1 -1
  37. package/dist/components/InputMeta/InputMeta.js.map +1 -1
  38. package/dist/components/LabelText/LabelText.js +1 -1
  39. package/dist/components/LabelText/LabelText.js.map +1 -1
  40. package/dist/components/MaskInput/MaskInput.js +1 -1
  41. package/dist/components/MaskInput/MaskInput.js.map +1 -1
  42. package/dist/components/Menu/Menu.js +1 -1
  43. package/dist/components/Menu/Menu.js.map +1 -1
  44. package/dist/components/MenuButton/MenuButton.js +1 -1
  45. package/dist/components/MenuButton/MenuButton.js.map +1 -1
  46. package/dist/components/MenuItem/MenuItem.js +1 -1
  47. package/dist/components/MenuItem/MenuItem.js.map +1 -1
  48. package/dist/components/MenuSubMenu/MenuSubMenu.js +1 -1
  49. package/dist/components/MenuSubMenu/MenuSubMenu.js.map +1 -1
  50. package/dist/components/MobileAppLinks/MobileAppLinks.js +1 -1
  51. package/dist/components/MobileAppLinks/MobileAppLinks.js.map +1 -1
  52. package/dist/components/MobileAppLinks/config.js +1 -1
  53. package/dist/components/MobileAppLinks/config.js.map +1 -1
  54. package/dist/components/Pagination/BasePagination.js +1 -1
  55. package/dist/components/Pagination/BasePagination.js.map +1 -1
  56. package/dist/components/Pagination/Pagination.js +1 -1
  57. package/dist/components/Pagination/Pagination.js.map +1 -1
  58. package/dist/components/Pagination/utils.js +1 -1
  59. package/dist/components/Pagination/utils.js.map +1 -1
  60. package/dist/components/Paragraph/Paragraph.js +1 -1
  61. package/dist/components/Paragraph/Paragraph.js.map +1 -1
  62. package/dist/components/PasswordInput/PasswordInput.js +1 -1
  63. package/dist/components/PasswordInput/PasswordInput.js.map +1 -1
  64. package/dist/components/ProjectsPopover/ProductLink.js +1 -1
  65. package/dist/components/ProjectsPopover/ProductLink.js.map +1 -1
  66. package/dist/components/ProjectsPopover/ProjectsPopover.js +1 -1
  67. package/dist/components/ProjectsPopover/ProjectsPopover.js.map +1 -1
  68. package/dist/components/ProjectsPopover/mappers.js +1 -1
  69. package/dist/components/ProjectsPopover/mappers.js.map +1 -1
  70. package/dist/components/ProjectsPopover/types.js +1 -1
  71. package/dist/components/ProjectsPopover/types.js.map +1 -1
  72. package/dist/components/ProjectsPopover/utils.js +1 -1
  73. package/dist/components/ProjectsPopover/utils.js.map +1 -1
  74. package/dist/components/PulseDot/PulseDot.js +1 -1
  75. package/dist/components/PulseDot/PulseDot.js.map +1 -1
  76. package/dist/components/ScrollableBox/ScrollableBox.js +1 -1
  77. package/dist/components/ScrollableBox/ScrollableBox.js.map +1 -1
  78. package/dist/components/ScrollableBox/useElementScrollable.js +1 -1
  79. package/dist/components/ScrollableBox/useElementScrollable.js.map +1 -1
  80. package/dist/components/Select/AsyncSelect.js +1 -1
  81. package/dist/components/Select/AsyncSelect.js.map +1 -1
  82. package/dist/components/Select/Label.js +1 -1
  83. package/dist/components/Select/Label.js.map +1 -1
  84. package/dist/components/Select/Select.d.ts +2 -33
  85. package/dist/components/Select/Select.js +1 -1
  86. package/dist/components/Select/Select.js.map +1 -1
  87. package/dist/components/Select/SelectCreatable.d.ts +1 -1
  88. package/dist/components/Select/SelectCreatable.js +1 -1
  89. package/dist/components/Select/SelectCreatable.js.map +1 -1
  90. package/dist/components/Select/customComponents.js +1 -1
  91. package/dist/components/Select/customComponents.js.map +1 -1
  92. package/dist/components/Select/defaultProps.js +1 -1
  93. package/dist/components/Select/defaultProps.js.map +1 -1
  94. package/dist/components/Select/types.d.ts +2 -4
  95. package/dist/components/Select/utils.js +1 -1
  96. package/dist/components/Select/utils.js.map +1 -1
  97. package/dist/components/Slider/Slider.js +1 -1
  98. package/dist/components/Slider/Slider.js.map +1 -1
  99. package/dist/components/Snackbar/ActionButton.js +1 -1
  100. package/dist/components/Snackbar/ActionButton.js.map +1 -1
  101. package/dist/components/Snackbar/Snackbar.js +1 -1
  102. package/dist/components/Snackbar/Snackbar.js.map +1 -1
  103. package/dist/components/Snackbar/WithAction.js +1 -1
  104. package/dist/components/Snackbar/WithAction.js.map +1 -1
  105. package/dist/components/SnowEffect/SnowEffect.js +1 -1
  106. package/dist/components/SnowEffect/SnowEffect.js.map +1 -1
  107. package/dist/components/SnowEffect/contants.js +1 -1
  108. package/dist/components/Spinner/Spinner.js +1 -1
  109. package/dist/components/Spinner/Spinner.js.map +1 -1
  110. package/dist/components/SplashLogo/SplashLogo.js +1 -1
  111. package/dist/components/SplashLogo/SplashLogo.js.map +1 -1
  112. package/dist/components/SplashLogo/dataUrls.js +1 -1
  113. package/dist/components/SplashLogo/dataUrls.js.map +1 -1
  114. package/dist/components/SvgBorder/SvgBorder.js +1 -1
  115. package/dist/components/SvgBorder/SvgBorder.js.map +1 -1
  116. package/dist/components/SvgBorder/utils.js +1 -1
  117. package/dist/components/SvgBorder/utils.js.map +1 -1
  118. package/dist/components/Switch/Switch.js +1 -1
  119. package/dist/components/Switch/Switch.js.map +1 -1
  120. package/dist/components/Tabs/Tabs.js +1 -1
  121. package/dist/components/Tabs/Tabs.js.map +1 -1
  122. package/dist/components/Text/Text.js +1 -1
  123. package/dist/components/Text/Text.js.map +1 -1
  124. package/dist/components/TextAreaInput/TextAreaInput.js +1 -1
  125. package/dist/components/TextAreaInput/TextAreaInput.js.map +1 -1
  126. package/dist/components/TextInput/TextInput.js +1 -1
  127. package/dist/components/TextInput/TextInput.js.map +1 -1
  128. package/dist/components/Title/Title.js +1 -1
  129. package/dist/components/Title/Title.js.map +1 -1
  130. package/dist/css/_theme.css +7 -1
  131. package/dist/css/vchasno-ui.css +1 -1
  132. package/dist/hooks/useClientRect.js +1 -1
  133. package/dist/hooks/useClientRect.js.map +1 -1
  134. package/dist/utils/react.js +1 -1
  135. package/dist/utils/react.js.map +1 -1
  136. package/package.json +9 -16
package/CHANGELOG.md CHANGED
@@ -7,6 +7,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.4.82] - 2026-01-13
11
+
12
+ ### Added
13
+
14
+ - Radii design tokens to components
15
+
16
+ ### Changed
17
+
18
+ - Make tsconfig stricter, fix TypeScript errors
19
+ - Publishing is now only available on version-tagged commits
20
+ - Add npm version badge to README
21
+ - Better explain versioning process in README
22
+
23
+ ## [0.4.81] - 2026-01-09
24
+
25
+ ### Changed
26
+
27
+ - Upgrade Storybook from 8.5.0 to 10.1.11
28
+ - Migrate Storybook from Webpack to Vite for faster development builds
29
+ - Simplify Storybook addon configuration (removed essentials, onboarding, interactions in favor of explicit addons)
30
+ - Replace Babel presets with Vite (removed @babel/preset-env, @babel/preset-react, @babel/preset-typescript)
31
+
10
32
  ## [0.4.80] - 2026-01-09
11
33
 
12
34
  ### Fixed
package/README.md CHANGED
@@ -1,3 +1,5 @@
1
+ ![NPM Version](https://img.shields.io/npm/v/%40vchasno%2Fui-kit)
2
+
1
3
  # UI-Kit library for Vchasno web applications
2
4
 
3
5
  ## 📦 Install
@@ -176,9 +178,13 @@ To publish a new version:
176
178
  4. Commit changes and create a merge request to `master`
177
179
  5. After merge to `master`, checkout `master` and pull latest changes
178
180
  6. Create a version tag by running one of:
179
- - `npm version patch` - for bug fixes (0.0.x)
180
- - `npm version minor` - for new features (0.x.0)
181
- - `npm version major` - for breaking changes (x.0.0)
181
+
182
+ > **Note:** This package is in alpha stage (0.x.x), versioning works differently:
183
+
184
+ - `npm version patch` - for bug fixes or backward-compatible features (0.0.x)
185
+ - `npm version minor` - for features with breaking changes (0.x.0)
186
+
187
+ **DO NOT USE** `npm version major` until v1.0 stable release
182
188
  7. Push the tag: `git push --tags`
183
189
  8. CI/CD pipeline will start the publish job
184
190
  9. Manually confirm the publish stage in CI/CD to release to npm registry
@@ -1,2 +1,2 @@
1
- import e,{useRef as n,useEffect as t}from"react";import r from"classnames";var l={info:function(){return e.createElement(e.Fragment,null,"\uD83D\uDD14")},cross:function(){return e.createElement(e.Fragment,null,"❌")},error:function(){return e.createElement(e.Fragment,null,"❗️")},warning:function(){return e.createElement(e.Fragment,null,"⚠️")},success:function(){return e.createElement(e.Fragment,null,"✅")},config:function(){return e.createElement(e.Fragment,null,"⚙️")}},a=function(a){var c=a.type,o=void 0===c?"info":c,i=a.leftBorder,s=a.hideIcon,u=a.scrollIntoView,m=void 0!==u&&u,f=a.icon,v=a.className,d=a.children,p=a.onClose,E=a.wide,h=a.close,w=a.dataQa,C=a.customIcon,g=null;if(C)g=e.createElement("span",{className:"vchasno-ui-alert__icon-wrapper"},C);else{var L=l[f||o];g=e.createElement("span",{className:"vchasno-ui-alert__icon-wrapper"},e.createElement(L,null))}var F=null;"function"==typeof p&&(F=e.createElement("span",{className:"vchasno-ui-alert__close-icon",onClick:p},e.createElement("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("path",{d:"M6.4 5L9.7 1.7C10.1 1.3 10.1 0.7 9.7 0.3C9.3 -0.1 8.7 -0.1 8.3 0.3L5 3.6L1.7 0.3C1.3 -0.1 0.7 -0.1 0.3 0.3C-0.1 0.7 -0.1 1.3 0.3 1.7L3.6 5L0.3 8.3C-0.1 8.7 -0.1 9.3 0.3 9.7C0.5 9.9 0.7 10 1 10C1.3 10 1.5 9.9 1.7 9.7L5 6.4L8.3 9.7C8.5 9.9 8.7 10 9 10C9.3 10 9.5 9.9 9.7 9.7C10.1 9.3 10.1 8.7 9.7 8.3L6.4 5Z",fill:"currentColor"}))));var _=n(null);return t(function(){m&&_.current&&_.current.scrollIntoView({behavior:"smooth",block:"center"})},[m]),e.createElement("span",{"data-qa":w,ref:_,className:r("vchasno-ui-alert","--".concat(o),{"--close":void 0!==h&&h},{"--wide":E},{"--left-border":void 0===i||i},v)},!(void 0!==s&&s)&&g,e.createElement("div",null,d),F)};export{a as default};
1
+ import e,{useRef as l,useEffect as t}from"react";import n from"classnames";let r={info:()=>e.createElement(e.Fragment,null,"\uD83D\uDD14"),cross:()=>e.createElement(e.Fragment,null,"❌"),error:()=>e.createElement(e.Fragment,null,"❗️"),warning:()=>e.createElement(e.Fragment,null,"⚠️"),success:()=>e.createElement(e.Fragment,null,"✅"),config:()=>e.createElement(e.Fragment,null,"⚙️")},a=({type:a="info",leftBorder:c=!0,hideIcon:o=!1,scrollIntoView:s=!1,icon:m,className:i,children:u,onClose:p,wide:E,close:f=!1,dataQa:g,customIcon:C})=>{let h=null;if(C)h=e.createElement("span",{className:"vchasno-ui-alert__icon-wrapper"},C);else{let l=r[m||a];h=e.createElement("span",{className:"vchasno-ui-alert__icon-wrapper"},e.createElement(l,null))}let w=null;"function"==typeof p&&(w=e.createElement("span",{className:"vchasno-ui-alert__close-icon",onClick:p},e.createElement("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("path",{d:"M6.4 5L9.7 1.7C10.1 1.3 10.1 0.7 9.7 0.3C9.3 -0.1 8.7 -0.1 8.3 0.3L5 3.6L1.7 0.3C1.3 -0.1 0.7 -0.1 0.3 0.3C-0.1 0.7 -0.1 1.3 0.3 1.7L3.6 5L0.3 8.3C-0.1 8.7 -0.1 9.3 0.3 9.7C0.5 9.9 0.7 10 1 10C1.3 10 1.5 9.9 1.7 9.7L5 6.4L8.3 9.7C8.5 9.9 8.7 10 9 10C9.3 10 9.5 9.9 9.7 9.7C10.1 9.3 10.1 8.7 9.7 8.3L6.4 5Z",fill:"currentColor"}))));let v=l(null);return t(()=>{s&&v.current&&v.current.scrollIntoView({behavior:"smooth",block:"center"})},[s]),e.createElement("span",{"data-qa":g,ref:v,className:n("vchasno-ui-alert",`--${a}`,{"--close":f},{"--wide":E},{"--left-border":c},i)},!o&&h,e.createElement("div",null,u),w)};export{a as default};
2
2
  //# sourceMappingURL=Alert.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Alert.js","sources":["../../../src/components/Alert/Alert.tsx"],"sourcesContent":["import React, { useEffect, useRef } from 'react';\n\nimport cn from 'classnames';\n\nimport { DataQa } from '../types';\n\nimport './Alert.global.css';\n\ntype AlertType = 'error' | 'warning' | 'success' | 'info' | 'config';\ntype IconType = 'info' | 'cross' | 'error' | 'warning' | 'success' | 'config';\n\nconst iconMap: Record<IconType, React.FC> = {\n info: () => <>🔔</>,\n cross: () => <>❌</>,\n error: () => <>❗️</>,\n warning: () => <>⚠️</>,\n success: () => <>✅</>,\n config: () => <>⚙️</>,\n};\nexport interface AlertProps extends DataQa {\n type?: AlertType;\n icon?: IconType;\n customIcon?: React.ReactNode;\n hideIcon?: boolean;\n scrollIntoView?: boolean;\n\n leftBorder?: boolean;\n className?: string;\n\n onClose?: VoidFunction;\n close?: boolean;\n wide?: boolean;\n children: React.ReactNode;\n}\n\nconst Alert: React.FC<AlertProps> = ({\n type = 'info',\n leftBorder = true,\n hideIcon = false,\n scrollIntoView = false,\n icon,\n className,\n children,\n onClose,\n wide,\n close = false,\n dataQa,\n customIcon,\n}) => {\n let iconNode = null;\n\n if (customIcon) {\n iconNode = <span className=\"vchasno-ui-alert__icon-wrapper\">{customIcon}</span>;\n } else {\n const Icon = iconMap[icon || type];\n iconNode = (\n <span className=\"vchasno-ui-alert__icon-wrapper\">\n <Icon />\n </span>\n );\n }\n\n let closeNode = null;\n if (typeof onClose === 'function') {\n closeNode = (\n <span className=\"vchasno-ui-alert__close-icon\" onClick={onClose}>\n <svg\n width=\"10\"\n height=\"10\"\n viewBox=\"0 0 10 10\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M6.4 5L9.7 1.7C10.1 1.3 10.1 0.7 9.7 0.3C9.3 -0.1 8.7 -0.1 8.3 0.3L5 3.6L1.7 0.3C1.3 -0.1 0.7 -0.1 0.3 0.3C-0.1 0.7 -0.1 1.3 0.3 1.7L3.6 5L0.3 8.3C-0.1 8.7 -0.1 9.3 0.3 9.7C0.5 9.9 0.7 10 1 10C1.3 10 1.5 9.9 1.7 9.7L5 6.4L8.3 9.7C8.5 9.9 8.7 10 9 10C9.3 10 9.5 9.9 9.7 9.7C10.1 9.3 10.1 8.7 9.7 8.3L6.4 5Z\"\n fill=\"currentColor\"\n />\n </svg>\n </span>\n );\n }\n\n const rootRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n if (scrollIntoView && rootRef.current) {\n rootRef.current.scrollIntoView({\n behavior: 'smooth',\n block: 'center',\n });\n }\n }, [scrollIntoView]);\n\n return (\n <span\n data-qa={dataQa}\n ref={rootRef}\n className={cn(\n 'vchasno-ui-alert',\n `--${type}`,\n { '--close': close },\n { '--wide': wide },\n { '--left-border': leftBorder },\n className,\n )}\n >\n {!hideIcon && iconNode}\n <div>{children}</div>\n {closeNode}\n </span>\n );\n};\n\nexport default Alert;\n"],"names":["iconMap","info","React","createElement","Fragment","cross","error","warning","success","config","Alert","param","type","leftBorder","_param_hideIcon","hideIcon","scrollIntoView","_param_scrollIntoView","undefined","icon","className","children","onClose","wide","close","dataQa","customIcon","iconNode","span","Icon","closeNode","onClick","svg","width","height","viewBox","fill","xmlns","path","d","rootRef","useRef","useEffect","current","behavior","block","data-qa","ref","cn","concat","_param_close","_param_leftBorder","div"],"mappings":"2EAWA,IAAMA,EAAsC,CACxCC,KAAM,kBAAMC,EAAEC,aAAA,CAAAD,EAAAE,QAAA,CAAA,KAAA,iBACdC,MAAO,kBAAMH,EAAEC,aAAA,CAAAD,EAAAE,QAAA,CAAA,KAAA,MACfE,MAAO,kBAAMJ,EAAEC,aAAA,CAAAD,EAAAE,QAAA,CAAA,KAAA,OACfG,QAAS,kBAAML,EAAEC,aAAA,CAAAD,EAAAE,QAAA,CAAA,KAAA,OACjBI,QAAS,kBAAMN,EAAEC,aAAA,CAAAD,EAAAE,QAAA,CAAA,KAAA,MACjBK,OAAQ,kBAAMP,EAAEC,aAAA,CAAAD,EAAAE,QAAA,CAAA,KAAA,MACpB,EAiBMM,EAA8B,SAAAC,CAAA,UAChCC,IAAAA,CAAAA,EAAAA,AAAAA,KAAAA,IAAAA,EAAO,OACPC,EAAAA,EAAAA,EAAAA,UAAAA,CAAaC,EAAAH,EACbI,QAAAA,CACAC,EAAAA,EAAAA,cAAAA,CAAAA,EAAiBC,AAAAC,KAAAA,IAAAD,GAAAA,EACjBE,EAAAA,EAAAA,IAAAA,CACAC,IAAAA,SACAC,CAAAA,EAAAA,EAAAA,QACAC,CAAAA,EAAAA,EAAAA,OACAC,CAAAA,EAAAA,EAAAA,IACAC,CAAAA,EAAAA,EAAAA,KAAAA,CACAC,EAAAA,EAAAA,MAAAA,CACAC,EAAAA,EAAAA,UAAAA,CAEIC,EAAW,KAEf,GAAID,EACAC,EAAWzB,EAAC0B,aAAAA,CAAAA,OAAAA,CAAKR,UAAU,gCAAkCM,EAAAA,OAC1D,CACH,IAAMG,EAAO7B,CAAO,CAACmB,GAAQP,EAAK,CAClCe,EACIzB,EAAC0B,aAAAA,CAAAA,OAAAA,CAAKR,UAAU,kCACZlB,EAAC2B,aAAAA,CAAAA,EAAAA,MAGb,CAEA,IAAIC,EAAY,IACO,CAAA,YAAnB,OAAOR,GACPQ,CAAAA,EACI5B,EAAC0B,aAAAA,CAAAA,OAAAA,CAAKR,UAAU,+BAA+BW,QAAST,GACpDpB,EAAC8B,aAAAA,CAAAA,MAAAA,CACGC,MAAM,KACNC,OAAO,KACPC,QAAQ,YACRC,KAAK,OACLC,MAAM,8BAENnC,EAACoC,aAAAA,CAAAA,OAAAA,CACGC,EAAE,oTACFH,KAAK,oBAOzB,IAAMI,EAAUC,EAAuB,MAWvC,OATAC,EAAU,WACF1B,GAAkBwB,EAAQG,OAAO,EACjCH,EAAQG,OAAO,CAAC3B,cAAc,CAAC,CAC3B4B,SAAU,SACVC,MAAO,QACX,IAEL,CAAC7B,EAAe,EAGfd,EAAC0B,aAAAA,CAAAA,OAAAA,CACGkB,UAASrB,EACTsB,IAAKP,EACLpB,UAAW4B,EACP,mBACA,KAAUC,OAALrC,GACL,CAAE,UAvDNsC,AAAAhC,KAAAA,IAAAgC,GAAAA,GAwDI,CAAE,SAAU3B,GACZ,CAAE,gBAjED4B,AAAAjC,KAAAA,IAAAiC,GAAAA,GAkED/B,EAGH,EAAA,CApETL,CAAAA,AAAAA,KAAAA,IAAAA,GACAC,CAAAA,GAmEsBW,EACdzB,EAACkD,aAAAA,CAAAA,MAAAA,KAAK/B,GACLS,EAGb"}
1
+ {"version":3,"file":"Alert.js","sources":["../../../src/components/Alert/Alert.tsx"],"sourcesContent":["import React, { useEffect, useRef } from 'react';\n\nimport cn from 'classnames';\n\nimport type { DataQa } from '../types';\n\nimport './Alert.global.css';\n\ntype AlertType = 'error' | 'warning' | 'success' | 'info' | 'config';\ntype IconType = 'info' | 'cross' | 'error' | 'warning' | 'success' | 'config';\n\nconst iconMap: Record<IconType, React.FC> = {\n info: () => <>🔔</>,\n cross: () => <>❌</>,\n error: () => <>❗️</>,\n warning: () => <>⚠️</>,\n success: () => <>✅</>,\n config: () => <>⚙️</>,\n};\nexport interface AlertProps extends DataQa {\n type?: AlertType;\n icon?: IconType;\n customIcon?: React.ReactNode;\n hideIcon?: boolean;\n scrollIntoView?: boolean;\n\n leftBorder?: boolean;\n className?: string;\n\n onClose?: VoidFunction;\n close?: boolean;\n wide?: boolean;\n children: React.ReactNode;\n}\n\nconst Alert: React.FC<AlertProps> = ({\n type = 'info',\n leftBorder = true,\n hideIcon = false,\n scrollIntoView = false,\n icon,\n className,\n children,\n onClose,\n wide,\n close = false,\n dataQa,\n customIcon,\n}) => {\n let iconNode = null;\n\n if (customIcon) {\n iconNode = <span className=\"vchasno-ui-alert__icon-wrapper\">{customIcon}</span>;\n } else {\n const Icon = iconMap[icon || type];\n iconNode = (\n <span className=\"vchasno-ui-alert__icon-wrapper\">\n <Icon />\n </span>\n );\n }\n\n let closeNode = null;\n if (typeof onClose === 'function') {\n closeNode = (\n <span className=\"vchasno-ui-alert__close-icon\" onClick={onClose}>\n <svg\n width=\"10\"\n height=\"10\"\n viewBox=\"0 0 10 10\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M6.4 5L9.7 1.7C10.1 1.3 10.1 0.7 9.7 0.3C9.3 -0.1 8.7 -0.1 8.3 0.3L5 3.6L1.7 0.3C1.3 -0.1 0.7 -0.1 0.3 0.3C-0.1 0.7 -0.1 1.3 0.3 1.7L3.6 5L0.3 8.3C-0.1 8.7 -0.1 9.3 0.3 9.7C0.5 9.9 0.7 10 1 10C1.3 10 1.5 9.9 1.7 9.7L5 6.4L8.3 9.7C8.5 9.9 8.7 10 9 10C9.3 10 9.5 9.9 9.7 9.7C10.1 9.3 10.1 8.7 9.7 8.3L6.4 5Z\"\n fill=\"currentColor\"\n />\n </svg>\n </span>\n );\n }\n\n const rootRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n if (scrollIntoView && rootRef.current) {\n rootRef.current.scrollIntoView({\n behavior: 'smooth',\n block: 'center',\n });\n }\n }, [scrollIntoView]);\n\n return (\n <span\n data-qa={dataQa}\n ref={rootRef}\n className={cn(\n 'vchasno-ui-alert',\n `--${type}`,\n { '--close': close },\n { '--wide': wide },\n { '--left-border': leftBorder },\n className,\n )}\n >\n {!hideIcon && iconNode}\n <div>{children}</div>\n {closeNode}\n </span>\n );\n};\n\nexport default Alert;\n"],"names":["iconMap","info","React","createElement","Fragment","cross","error","warning","success","config","Alert","type","leftBorder","hideIcon","scrollIntoView","icon","className","children","onClose","wide","close","dataQa","customIcon","iconNode","span","Icon","closeNode","onClick","svg","width","height","viewBox","fill","xmlns","path","d","rootRef","useRef","useEffect","current","behavior","block","data-qa","ref","cn","div"],"mappings":"2EAWA,IAAMA,EAAsC,CACxCC,KAAM,IAAMC,EAAEC,aAAA,CAAAD,EAAAE,QAAA,CAAA,KAAA,gBACdC,MAAO,IAAMH,EAAEC,aAAA,CAAAD,EAAAE,QAAA,CAAA,KAAA,KACfE,MAAO,IAAMJ,EAAEC,aAAA,CAAAD,EAAAE,QAAA,CAAA,KAAA,MACfG,QAAS,IAAML,EAAEC,aAAA,CAAAD,EAAAE,QAAA,CAAA,KAAA,MACjBI,QAAS,IAAMN,EAAEC,aAAA,CAAAD,EAAAE,QAAA,CAAA,KAAA,KACjBK,OAAQ,IAAMP,EAAEC,aAAA,CAAAD,EAAAE,QAAA,CAAA,KAAA,KACpB,EAiBMM,EAA8B,CAAC,CACjCC,KAAAA,EAAO,MAAM,CACbC,WAAAA,EAAa,CAAA,CAAI,CACjBC,SAAAA,EAAW,CAAA,CAAK,CAChBC,eAAAA,EAAiB,CAAA,CAAK,CACtBC,KAAAA,CAAI,CACJC,UAAAA,CAAS,CACTC,SAAAA,CAAQ,CACRC,QAAAA,CAAO,CACPC,KAAAA,CAAI,CACJC,MAAAA,EAAQ,CAAA,CAAK,CACbC,OAAAA,CAAM,CACNC,WAAAA,CAAU,CACb,IACG,IAAIC,EAAW,KAEf,GAAID,EACAC,EAAWrB,EAACsB,aAAAA,CAAAA,OAAAA,CAAKR,UAAU,gCAAkCM,EAAAA,OAC1D,CACH,IAAMG,EAAOzB,CAAO,CAACe,GAAQJ,EAAK,CAClCY,EACIrB,EAACsB,aAAAA,CAAAA,OAAAA,CAAKR,UAAU,kCACZd,EAACuB,aAAAA,CAAAA,EAAAA,MAGb,CAEA,IAAIC,EAAY,IACO,CAAA,YAAnB,OAAOR,GACPQ,CAAAA,EACIxB,EAACsB,aAAAA,CAAAA,OAAAA,CAAKR,UAAU,+BAA+BW,QAAST,GACpDhB,EAAC0B,aAAAA,CAAAA,MAAAA,CACGC,MAAM,KACNC,OAAO,KACPC,QAAQ,YACRC,KAAK,OACLC,MAAM,8BAEN/B,EAACgC,aAAAA,CAAAA,OAAAA,CACGC,EAAE,oTACFH,KAAK,oBAOzB,IAAMI,EAAUC,EAAuB,MAWvC,OATAC,EAAU,KACFxB,GAAkBsB,EAAQG,OAAO,EACjCH,EAAQG,OAAO,CAACzB,cAAc,CAAC,CAC3B0B,SAAU,SACVC,MAAO,QACX,IAEL,CAAC3B,EAAe,EAGfZ,EAACsB,aAAAA,CAAAA,OAAAA,CACGkB,UAASrB,EACTsB,IAAKP,EACLpB,UAAW4B,EACP,mBACA,CAAC,EAAE,EAAEjC,GAAM,CACX,CAAE,UAAWS,GACb,CAAE,SAAUD,GACZ,CAAE,gBAAiBP,GACnBI,EAGH,EAAA,CAACH,GAAYU,EACdrB,EAAC2C,aAAAA,CAAAA,MAAAA,KAAK5B,GACLS,EAGb"}
@@ -1,10 +1,10 @@
1
1
  import * as _emotion_styled from '@emotion/styled';
2
2
  import * as _mui_system from '@mui/system';
3
- import * as _mui_material_styles from '@mui/material/styles';
3
+ import * as _mui_material from '@mui/material';
4
4
  import { TooltipProps } from '@mui/material/Tooltip';
5
5
 
6
6
  interface BlackTooltipProps extends TooltipProps {
7
7
  }
8
- declare const BlackTooltip: _emotion_styled.StyledComponent<TooltipProps & _mui_system.MUIStyledCommonProps<_mui_material_styles.Theme>, {}, {}>;
8
+ declare const BlackTooltip: _emotion_styled.StyledComponent<TooltipProps & _mui_system.MUIStyledCommonProps<_mui_material.Theme>, {}, {}>;
9
9
 
10
10
  export { type BlackTooltipProps, BlackTooltip as default };
@@ -1,2 +1,2 @@
1
- import t from"react";import{composeSlotProps as r}from"./utils.js";import e,{tooltipClasses as o}from"@mui/material/Tooltip";import{styled as n}from"@mui/material/styles";function i(t,r,e){return r in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}var c=n(function(o){var n,c,a=o.className,l=o.slotProps,p=function(t,r){if(null==t)return{};var e,o,n=function(t,r){if(null==t)return{};var e,o,n={},i=Object.keys(t);for(o=0;o<i.length;o++)e=i[o],r.indexOf(e)>=0||(n[e]=t[e]);return n}(t,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(o=0;o<i.length;o++)e=i[o],!(r.indexOf(e)>=0)&&Object.prototype.propertyIsEnumerable.call(t,e)&&(n[e]=t[e])}return n}(o,["className","slotProps"]);return t.createElement(e,(n=function(t){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{},o=Object.keys(e);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(e).filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.forEach(function(r){i(t,r,e[r])})}return t}({arrow:!0,slotProps:r(l)},p),c=c={classes:{popper:a}},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(c)):(function(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e.push.apply(e,o)}return e})(Object(c)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(c,t))}),n))})(function(){var t;return i(t={},"& .".concat(o.arrow),{color:"var(--vchasno-ui-tooltip-bg-mui)"}),i(t,"& .".concat(o.tooltip),{backgroundColor:"var(--vchasno-ui-tooltip-bg-mui)",fontSize:"var(--vchasno-ui-tooltip-font-size)",color:"var(--vchasno-ui-tooltip-text-color)",padding:"var(--vchasno-ui-tooltip-padding)",lineHeight:"var(--vchasno-ui-tooltip-line-height)"}),t});export{c as default};
1
+ import o from"react";import{composeSlotProps as t}from"./utils.js";import i,{tooltipClasses as r}from"@mui/material/Tooltip";import{styled as a}from"@mui/material/styles";let l=a(({className:r,slotProps:a,...l})=>o.createElement(i,{arrow:!0,slotProps:t(a),...l,classes:{popper:r}}))(()=>({[`& .${r.arrow}`]:{color:"var(--vchasno-ui-tooltip-bg-mui)"},[`& .${r.tooltip}`]:{backgroundColor:"var(--vchasno-ui-tooltip-bg-mui)",fontSize:"var(--vchasno-ui-tooltip-font-size)",color:"var(--vchasno-ui-tooltip-text-color)",padding:"var(--vchasno-ui-tooltip-padding)",lineHeight:"var(--vchasno-ui-tooltip-line-height)"}}));export{l as default};
2
2
  //# sourceMappingURL=BlackTooltip.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BlackTooltip.js","sources":["../../../src/components/BlackTooltip/BlackTooltip.tsx"],"sourcesContent":["import React from 'react';\n\nimport { composeSlotProps } from './utils';\nimport Tooltip, { TooltipProps, tooltipClasses } from '@mui/material/Tooltip';\nimport { styled } from '@mui/material/styles';\n\nexport interface BlackTooltipProps extends TooltipProps {}\n\nconst BlackTooltip = styled<typeof Tooltip>(({ className, slotProps, ...props }: TooltipProps) => (\n <Tooltip\n arrow\n slotProps={composeSlotProps(slotProps)}\n {...props}\n classes={{ popper: className }}\n />\n))(() => ({\n [`& .${tooltipClasses.arrow}`]: {\n color: 'var(--vchasno-ui-tooltip-bg-mui)',\n },\n [`& .${tooltipClasses.tooltip}`]: {\n backgroundColor: 'var(--vchasno-ui-tooltip-bg-mui)',\n fontSize: 'var(--vchasno-ui-tooltip-font-size)',\n color: 'var(--vchasno-ui-tooltip-text-color)',\n padding: 'var(--vchasno-ui-tooltip-padding)',\n lineHeight: 'var(--vchasno-ui-tooltip-line-height)',\n },\n}));\n\nexport default BlackTooltip;\n"],"names":["BlackTooltip","styled","_param","className","slotProps","props","React","Tooltip","arrow","composeSlotProps","classes","popper","_obj","_define_property","concat","tooltipClasses","color","tooltip","backgroundColor","fontSize","padding","lineHeight"],"mappings":"mSAQA,IAAMA,EAAeC,EAAuB,SAAAC,CAAA,UAAGC,EAAAA,EAAAA,SAAAA,CAAWC,IAAAA,SAAcC,CAAAA,EAAAA,sXAAAA,EAAAA,CAAzBF,YAAWC,qBACtDE,EAACC,aAAAA,CAAAA,KAAAA,mUAAAA,CACGC,MAAAA,CAAAA,EACAJ,UAAWK,EAAiBL,EACxBC,EAAAA,OAAAA,CACJK,QAAS,CAAEC,OAAQR,CAAU,+UAElC,GAAA,WAAO,IAAAS,EAAA,OAAAA,AACNC,EADMD,EAAA,CAAA,EACJ,MAA0BE,MAArBC,CAAAA,EAAeP,KAAK,EAAK,CAC5BQ,MAAO,kCACX,GACAH,EAJMD,EAIJ,MAA4BE,MAAvBC,CAAAA,EAAeE,OAAO,EAAK,CAC9BC,gBAAiB,mCACjBC,SAAU,sCACVH,MAAO,uCACPI,QAAS,oCACTC,WAAY,uCATV,GAAAT"}
1
+ {"version":3,"file":"BlackTooltip.js","sources":["../../../src/components/BlackTooltip/BlackTooltip.tsx"],"sourcesContent":["import React from 'react';\n\nimport { composeSlotProps } from './utils';\nimport Tooltip, { type TooltipProps, tooltipClasses } from '@mui/material/Tooltip';\nimport { styled } from '@mui/material/styles';\n\nexport interface BlackTooltipProps extends TooltipProps {}\n\nconst BlackTooltip = styled<typeof Tooltip>(({ className, slotProps, ...props }: TooltipProps) => (\n <Tooltip\n arrow\n slotProps={composeSlotProps(slotProps)}\n {...props}\n classes={{ popper: className }}\n />\n))(() => ({\n [`& .${tooltipClasses.arrow}`]: {\n color: 'var(--vchasno-ui-tooltip-bg-mui)',\n },\n [`& .${tooltipClasses.tooltip}`]: {\n backgroundColor: 'var(--vchasno-ui-tooltip-bg-mui)',\n fontSize: 'var(--vchasno-ui-tooltip-font-size)',\n color: 'var(--vchasno-ui-tooltip-text-color)',\n padding: 'var(--vchasno-ui-tooltip-padding)',\n lineHeight: 'var(--vchasno-ui-tooltip-line-height)',\n },\n}));\n\nexport default BlackTooltip;\n"],"names":["BlackTooltip","styled","className","slotProps","props","React","Tooltip","arrow","composeSlotProps","classes","popper","tooltipClasses","color","tooltip","backgroundColor","fontSize","padding","lineHeight"],"mappings":"2KAQMA,IAAAA,EAAeC,EAAuB,CAAC,CAAEC,UAAAA,CAAS,CAAEC,UAAAA,CAAS,CAAE,GAAGC,EAAqB,GACzFC,EAACC,aAAAA,CAAAA,EAAAA,CACGC,MAAAA,CAAAA,EACAJ,UAAWK,EAAiBL,GAC3B,GAAGC,CAAK,CACTK,QAAS,CAAEC,OAAQR,CAAU,CAElC,IAAA,IAAO,CAAA,CACN,CAAC,CAAC,GAAG,EAAES,EAAeJ,KAAK,CAAA,CAAE,CAAG,CAAA,CAC5BK,MAAO,kCACX,EACA,CAAC,CAAC,GAAG,EAAED,EAAeE,OAAO,CAAA,CAAE,CAAG,CAAA,CAC9BC,gBAAiB,mCACjBC,SAAU,sCACVH,MAAO,uCACPI,QAAS,oCACTC,WAAY,uCAChB"}
@@ -1,2 +1,2 @@
1
- function e(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},o=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.forEach(function(r){var o;o=t[r],r in e?Object.defineProperty(e,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[r]=o})}return e}function r(e,r){return r=null!=r?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):(function(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t.push.apply(t,o)}return t})(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}),e}var t={name:"preventOverflow",options:{padding:{top:10,bottom:10,left:10,right:10}}},o=function(o){var n,i;return r(e({},o),{popper:r(e({},null==o?void 0:o.popper),{modifiers:(null==o?void 0:null===(n=o.popper)||void 0===n?void 0:n.modifiers)?null==o?void 0:null===(i=o.popper)||void 0===i?void 0:i.modifiers.map(function(o){if(o.name===t.name){var n;return r(e({},o),{options:r(e({},o.options),{padding:e({},t.options.padding,null===(n=o.options)||void 0===n?void 0:n.padding)})})}return o}):[t]})})};export{o as composeSlotProps};
1
+ let p={name:"preventOverflow",options:{padding:{top:10,bottom:10,left:10,right:10}}},o=o=>({...o,popper:{...o?.popper,modifiers:o?.popper?.modifiers?o?.popper?.modifiers.map(o=>o.name===p.name?{...o,options:{...o.options,padding:{...p.options.padding,...o.options?.padding}}}:o):[p]}});export{o as composeSlotProps};
2
2
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sources":["../../../src/components/BlackTooltip/utils.ts"],"sourcesContent":["import { TooltipProps } from '@mui/material/Tooltip';\n\nconst preventOverflowOptions = {\n name: 'preventOverflow',\n options: {\n // 10px від краю екрана - щоб не було в притул\n padding: {\n top: 10,\n bottom: 10,\n left: 10,\n right: 10,\n },\n },\n};\n\nexport const composeSlotProps = (\n slotProps?: TooltipProps['slotProps'],\n): TooltipProps['slotProps'] => {\n return {\n ...slotProps,\n popper: {\n ...slotProps?.popper,\n modifiers: slotProps?.popper?.modifiers\n ? slotProps?.popper?.modifiers.map((item) => {\n if (item.name === preventOverflowOptions.name) {\n return {\n ...item,\n options: {\n ...item.options,\n padding: {\n ...preventOverflowOptions.options.padding,\n ...item.options?.padding,\n },\n },\n };\n }\n return item;\n })\n : [preventOverflowOptions],\n },\n };\n};\n"],"names":["preventOverflowOptions","name","options","padding","top","bottom","left","right","composeSlotProps","slotProps","_object_spread_props","popper","modifiers","map","item","_object_spread"],"mappings":"mxBAEA,IAAMA,EAAyB,CAC3BC,KAAM,kBACNC,QAAS,CAELC,QAAS,CACLC,IAAK,GACLC,OAAQ,GACRC,KAAM,GACNC,MAAO,EACX,CACJ,CACJ,EAEaC,EAAmB,SAC5BC,CAAAA,MAMmBA,EACLA,EALd,OAAOC,EACAD,EAAAA,CAAAA,EAAAA,GAAAA,CACHE,OAAQD,EACDD,EAAAA,CAAAA,EAAAA,MAAAA,EAAAA,KAAAA,EAAAA,EAAWE,MAAM,EAAA,CACpBC,UAAWH,AAAAA,CAAAA,MAAAA,EAAAA,KAAAA,EAAAA,AAAiB,OAAjBA,CAAAA,EAAAA,EAAWE,MAAM,AAANA,GAAXF,AAAAA,KAAAA,IAAAA,EAAAA,KAAAA,EAAAA,EAAmBG,SAAS,AAAA,EACjCH,MAAAA,EAAAA,KAAAA,EAAAA,AAAAA,OAAAA,CAAAA,EAAAA,EAAWE,MAAM,AAAA,GAAjBF,AAAAA,KAAAA,IAAAA,EAAAA,KAAAA,EAAAA,EAAmBG,SAAS,CAACC,GAAG,CAAC,SAACC,CAAAA,EAC9B,GAAIA,EAAKb,IAAI,GAAKD,EAAuBC,IAAI,CAAE,CAO5Ba,IAAAA,EANf,OAAOJ,EACAI,EAAAA,CAAAA,EAAAA,GAAAA,CACHZ,QAASQ,EAAAK,EAAA,CAAA,EACFD,EAAKZ,OAAO,EAAA,CACfC,QAASY,EACFf,CAAAA,EAAAA,EAAuBE,OAAO,CAACC,OAAO,CAAA,AAC1B,OAAZW,CAAAA,EAAAA,EAAKZ,OAAO,AAAPA,GAALY,AAAAA,KAAAA,IAAAA,EAAAA,KAAAA,EAAAA,EAAcX,OAAO,KAIxC,CACA,OAAOW,IAEX,CAACd,EAAuB,IAG1C"}
1
+ {"version":3,"file":"utils.js","sources":["../../../src/components/BlackTooltip/utils.ts"],"sourcesContent":["import { type TooltipProps } from '@mui/material/Tooltip';\n\nconst preventOverflowOptions = {\n name: 'preventOverflow',\n options: {\n // 10px від краю екрана - щоб не було в притул\n padding: {\n top: 10,\n bottom: 10,\n left: 10,\n right: 10,\n },\n },\n};\n\nexport const composeSlotProps = (\n slotProps?: TooltipProps['slotProps'],\n): TooltipProps['slotProps'] => {\n return {\n ...slotProps,\n popper: {\n ...slotProps?.popper,\n modifiers: slotProps?.popper?.modifiers\n ? slotProps?.popper?.modifiers.map((item) => {\n if (item.name === preventOverflowOptions.name) {\n return {\n ...item,\n options: {\n ...item.options,\n padding: {\n ...preventOverflowOptions.options.padding,\n ...item.options?.padding,\n },\n },\n };\n }\n return item;\n })\n : [preventOverflowOptions],\n },\n };\n};\n"],"names":["preventOverflowOptions","name","options","padding","top","bottom","left","right","composeSlotProps","slotProps","popper","modifiers","map","item"],"mappings":"AAEA,IAAMA,EAAyB,CAC3BC,KAAM,kBACNC,QAAS,CAELC,QAAS,CACLC,IAAK,GACLC,OAAQ,GACRC,KAAM,GACNC,MAAO,EACX,CACJ,CACJ,EAEaC,EAAmB,AAC5BC,GAEO,CAAA,CACH,GAAGA,CAAS,CACZC,OAAQ,CACJ,GAAGD,GAAWC,MAAM,CACpBC,UAAWF,GAAWC,QAAQC,UACxBF,GAAWC,QAAQC,UAAUC,IAAI,AAACC,GAC9B,AAAIA,EAAKZ,IAAI,GAAKD,EAAuBC,IAAI,CAClC,CACH,GAAGY,CAAI,CACPX,QAAS,CACL,GAAGW,EAAKX,OAAO,CACfC,QAAS,CACL,GAAGH,EAAuBE,OAAO,CAACC,OAAO,CACzC,GAAGU,EAAKX,OAAO,EAAEC,OAAAA,AACrB,CACJ,CACJ,EAEGU,GAEX,CAACb,EAAuB,AAClC,CACJ,CAAA"}
@@ -1,2 +1,2 @@
1
- import"react";import{createPortal as r}from"react-dom";var o=function(o){return r(o.children,document.body)};export{o as default};
1
+ import"react";import{createPortal as o}from"react-dom";let t=({children:t})=>o(t,document.body);export{t as default};
2
2
  //# sourceMappingURL=BodyPortal.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BodyPortal.js","sources":["../../../src/components/BodyPortal/BodyPortal.tsx"],"sourcesContent":["import React from 'react';\nimport { createPortal } from 'react-dom';\n\nexport interface BodyPortalProps {\n children: React.ReactNode;\n}\n\nconst BodyPortal: React.FC<BodyPortalProps> = ({ children }) =>\n createPortal(children, document.body);\n\nexport default BodyPortal;\n"],"names":["BodyPortal","param","createPortal","children","document","body"],"mappings":"uDAOA,IAAMA,EAAwC,SAAAC,CAAA,SAC1CC,EAD6CC,EAAAA,QAAAA,CACtBC,SAASC,IAAI"}
1
+ {"version":3,"file":"BodyPortal.js","sources":["../../../src/components/BodyPortal/BodyPortal.tsx"],"sourcesContent":["import React from 'react';\nimport { createPortal } from 'react-dom';\n\nexport interface BodyPortalProps {\n children: React.ReactNode;\n}\n\nconst BodyPortal: React.FC<BodyPortalProps> = ({ children }) =>\n createPortal(children, document.body);\n\nexport default BodyPortal;\n"],"names":["BodyPortal","children","createPortal","document","body"],"mappings":"uDAOMA,IAAAA,EAAwC,CAAC,CAAEC,SAAAA,CAAQ,CAAE,GACvDC,EAAaD,EAAUE,SAASC,IAAI"}
@@ -1,2 +1,2 @@
1
- import e from"react";import r from"classnames";import t from"../Menu/Menu.js";import n from"@mui/material/Breadcrumbs";function o(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t<r;t++)n[t]=e[t];return n}function a(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},n=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.forEach(function(r){var n;n=t[r],r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n})}return e}var c=function(c){var l,s,i,u=c.maxItems,m=function(e,r){if(null==e)return{};var t,n,o=function(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],r.indexOf(t)>=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}(c,["maxItems"]),f=e.Children.toArray(c.children),b=u&&f.length>u,p=[],y=[];b&&(u>1?(p=f.slice(-(u-1)),y=f.slice(1,-p.length)):1===u&&(y=f.slice(1)));var O=c.menuButton||"...";return e.createElement(n,(l=a({},m),s=s={classes:a({separator:"vchasno-ui-breadcrumbs-separator"},m.classes),className:r("vchasno-ui-breadcrumbs",m.className)},Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(s)):(function(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(s)).forEach(function(e){Object.defineProperty(l,e,Object.getOwnPropertyDescriptor(s,e))}),l),!b&&c.children,b&&[f[0],y.length>0&&e.createElement(t,{menuClassName:c.menuClassName,menuButton:e.createElement(t.Button,{className:c.menuButtonClassName},O)},y.map(function(r,n){return e.createElement(t.Item,{key:n,className:c.menuItemClassName},r)}))].concat(function(e){if(Array.isArray(e))return o(e)}(i=p)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(i)||function(e,r){if(e){if("string"==typeof e)return o(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return o(e,void 0)}}(i)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()))};export{c as default};
1
+ import e from"react";import a from"classnames";import s from"../Menu/Menu.js";import m from"@mui/material/Breadcrumbs";let t=t=>{let{maxItems:r,...l}=t,n=e.Children.toArray(t.children),c=r&&n.length>r,u=[],o=[];c&&(r>1?(u=n.slice(-(r-1)),o=n.slice(1,-u.length)):1===r&&(o=n.slice(1)));let i=t.menuButton||"...";return e.createElement(m,{...l,classes:{separator:"vchasno-ui-breadcrumbs-separator",...l.classes},className:a("vchasno-ui-breadcrumbs",l.className)},!c&&t.children,c&&[n[0],o.length>0&&e.createElement(s,{menuClassName:t.menuClassName,menuButton:e.createElement(s.Button,{className:t.menuButtonClassName},i)},o.map((a,m)=>e.createElement(s.Item,{key:m,className:t.menuItemClassName},a))),...u])};export{t as default};
2
2
  //# sourceMappingURL=Breadcrumbs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Breadcrumbs.js","sources":["../../../src/components/Breadcrumbs/Breadcrumbs.tsx"],"sourcesContent":["import React, { ReactChild, ReactFragment, ReactPortal } from 'react';\n\nimport cn from 'classnames';\n\nimport Menu from '../Menu';\nimport MaterialBreadcrumbs, {\n BreadcrumbsProps as MaterialBreadcrumbsProps,\n} from '@mui/material/Breadcrumbs';\n\nimport './Breadcrumbs.global.css';\n\nexport interface BreadcrumbsProps extends MaterialBreadcrumbsProps {\n menuButton?: React.ReactNode;\n menuButtonClassName?: string;\n menuItemClassName?: string;\n menuClassName?: string;\n}\n\n// TODO remove logic with maxItems, when Material-UI will update to v6\n// https://mui.com/material-ui/react-breadcrumbs/#condensed-with-menu\nconst Breadcrumbs: React.FC<BreadcrumbsProps> = (props) => {\n const { maxItems, ...rest } = props;\n\n const childrenArray = React.Children.toArray(props.children);\n const isShowWithMenu = maxItems && childrenArray.length > maxItems;\n\n let childrenToShow: (ReactChild | ReactFragment | ReactPortal)[] = [];\n let menuChildren: (ReactChild | ReactFragment | ReactPortal)[] = [];\n\n if (isShowWithMenu) {\n if (maxItems > 1) {\n childrenToShow = childrenArray.slice(-(maxItems - 1));\n menuChildren = childrenArray.slice(1, -childrenToShow.length);\n } else if (maxItems === 1) {\n menuChildren = childrenArray.slice(1);\n }\n }\n\n const menuButton = props.menuButton || '...';\n\n return (\n <MaterialBreadcrumbs\n {...rest}\n classes={{ separator: 'vchasno-ui-breadcrumbs-separator', ...rest.classes }}\n className={cn('vchasno-ui-breadcrumbs', rest.className)}\n >\n {!isShowWithMenu && props.children}\n {isShowWithMenu && [\n childrenArray[0],\n menuChildren.length > 0 && (\n <Menu\n menuClassName={props.menuClassName}\n menuButton={\n <Menu.Button className={props.menuButtonClassName}>\n {menuButton}\n </Menu.Button>\n }\n >\n {menuChildren.map((child, index) => (\n <Menu.Item key={index} className={props.menuItemClassName}>\n {child}\n </Menu.Item>\n ))}\n </Menu>\n ),\n ...childrenToShow,\n ]}\n </MaterialBreadcrumbs>\n );\n};\n\nexport default Breadcrumbs;\n"],"names":["Breadcrumbs","props","maxItems","rest","childrenArray","React","Children","toArray","children","isShowWithMenu","length","childrenToShow","menuChildren","slice","menuButton","MaterialBreadcrumbs","classes","_object_spread","separator","className","cn","Menu","menuClassName","createElement","Button","menuButtonClassName","map","child","index","Item","key","menuItemClassName","concat"],"mappings":"+nBAoBA,IAAMA,EAA0C,SAACC,CAAAA,EAC7C,UAAMC,EAAwBD,EAAtBC,QAAAA,CAAaC,EAASF,sXAAAA,EAAAA,CAAtBC,aAEFE,EAAgBC,EAAMC,QAAQ,CAACC,OAAO,CAACN,EAAMO,QAAQ,EACrDC,EAAiBP,GAAYE,EAAcM,MAAM,CAAGR,EAEtDS,EAA+D,EAAE,CACjEC,EAA6D,EAAE,CAE/DH,IACIP,EAAW,GACXS,EAAiBP,EAAcS,KAAK,CAAC,CAAEX,CAAAA,EAAW,CAAA,GAClDU,EAAeR,EAAcS,KAAK,CAAC,EAAG,CAACF,EAAeD,MAAM,GACxC,IAAbR,GACPU,CAAAA,EAAeR,EAAcS,KAAK,CAAC,EAAA,GAI3C,IAAMC,EAAab,EAAMa,UAAU,EAAI,MAEvC,OACIT,gBAACU,KACOZ,EAAAA,CAAAA,EAAAA,OAAAA,CACJa,QAASC,EAAA,CAAEC,UAAW,kCAAuCf,EAAAA,EAAKa,OAAO,EACzEG,UAAWC,EAAG,yBAA0BjB,EAAKgB,SAAS,CAErD,8UAAA,CAACV,GAAkBR,EAAMO,QAAQ,CACjCC,GAAkB,CACfL,CAAa,CAAC,EAAE,CAChBQ,EAAaF,MAAM,CAAG,GAClBL,EAACgB,aAAAA,CAAAA,EAAAA,CACGC,cAAerB,EAAMqB,aAAa,CAClCR,WACIT,EAAAkB,aAAA,CAACF,EAAKG,MAAM,CAAA,CAACL,UAAWlB,EAAMwB,mBAAAA,AACzBX,EAAAA,IAIRF,EAAac,GAAG,CAAC,SAACC,CAAOC,CAAAA,CAAAA,EACtB,OAAAvB,EAAAkB,aAAA,CAACF,EAAKQ,IAAI,CAAA,CAACC,IAAKF,EAAOT,UAAWlB,EAAM8B,iBAAAA,AACnCJ,EAAAA,MAMpB,CAnBkBK,sDAkBZrB,mlBAInB"}
1
+ {"version":3,"file":"Breadcrumbs.js","sources":["../../../src/components/Breadcrumbs/Breadcrumbs.tsx"],"sourcesContent":["import React, { type ReactChild, type ReactFragment, type ReactPortal } from 'react';\n\nimport cn from 'classnames';\n\nimport Menu from '../Menu';\nimport MaterialBreadcrumbs, {\n type BreadcrumbsProps as MaterialBreadcrumbsProps,\n} from '@mui/material/Breadcrumbs';\n\nimport './Breadcrumbs.global.css';\n\nexport interface BreadcrumbsProps extends MaterialBreadcrumbsProps {\n menuButton?: React.ReactNode;\n menuButtonClassName?: string;\n menuItemClassName?: string;\n menuClassName?: string;\n}\n\n// TODO remove logic with maxItems, when Material-UI will update to v6\n// https://mui.com/material-ui/react-breadcrumbs/#condensed-with-menu\nconst Breadcrumbs: React.FC<BreadcrumbsProps> = (props) => {\n const { maxItems, ...rest } = props;\n\n const childrenArray = React.Children.toArray(props.children);\n const isShowWithMenu = maxItems && childrenArray.length > maxItems;\n\n let childrenToShow: (ReactChild | ReactFragment | ReactPortal)[] = [];\n let menuChildren: (ReactChild | ReactFragment | ReactPortal)[] = [];\n\n if (isShowWithMenu) {\n if (maxItems > 1) {\n childrenToShow = childrenArray.slice(-(maxItems - 1));\n menuChildren = childrenArray.slice(1, -childrenToShow.length);\n } else if (maxItems === 1) {\n menuChildren = childrenArray.slice(1);\n }\n }\n\n const menuButton = props.menuButton || '...';\n\n return (\n <MaterialBreadcrumbs\n {...rest}\n classes={{ separator: 'vchasno-ui-breadcrumbs-separator', ...rest.classes }}\n className={cn('vchasno-ui-breadcrumbs', rest.className)}\n >\n {!isShowWithMenu && props.children}\n {isShowWithMenu && [\n childrenArray[0],\n menuChildren.length > 0 && (\n <Menu\n menuClassName={props.menuClassName}\n menuButton={\n <Menu.Button className={props.menuButtonClassName}>\n {menuButton}\n </Menu.Button>\n }\n >\n {menuChildren.map((child, index) => (\n <Menu.Item key={index} className={props.menuItemClassName}>\n {child}\n </Menu.Item>\n ))}\n </Menu>\n ),\n ...childrenToShow,\n ]}\n </MaterialBreadcrumbs>\n );\n};\n\nexport default Breadcrumbs;\n"],"names":["Breadcrumbs","props","maxItems","rest","childrenArray","React","Children","toArray","children","isShowWithMenu","length","childrenToShow","menuChildren","slice","menuButton","MaterialBreadcrumbs","classes","separator","className","cn","Menu","menuClassName","createElement","Button","menuButtonClassName","map","child","index","Item","key","menuItemClassName"],"mappings":"uHAoBA,IAAMA,EAA0C,AAACC,IAC7C,GAAM,CAAEC,SAAAA,CAAQ,CAAE,GAAGC,EAAM,CAAGF,EAExBG,EAAgBC,EAAMC,QAAQ,CAACC,OAAO,CAACN,EAAMO,QAAQ,EACrDC,EAAiBP,GAAYE,EAAcM,MAAM,CAAGR,EAEtDS,EAA+D,EAAE,CACjEC,EAA6D,EAAE,CAE/DH,IACIP,EAAW,GACXS,EAAiBP,EAAcS,KAAK,CAAC,CAAEX,CAAAA,EAAW,CAAA,GAClDU,EAAeR,EAAcS,KAAK,CAAC,EAAG,CAACF,EAAeD,MAAM,GACxC,IAAbR,GACPU,CAAAA,EAAeR,EAAcS,KAAK,CAAC,EAAA,GAI3C,IAAMC,EAAab,EAAMa,UAAU,EAAI,MAEvC,OACIT,EAACU,aAAAA,CAAAA,EAAAA,CACI,GAAGZ,CAAI,CACRa,QAAS,CAAEC,UAAW,mCAAoC,GAAGd,EAAKa,OAAAA,AAAQ,EAC1EE,UAAWC,EAAG,yBAA0BhB,EAAKe,SAAS,CAErD,EAAA,CAACT,GAAkBR,EAAMO,QAAQ,CACjCC,GAAkB,CACfL,CAAa,CAAC,EAAE,CAChBQ,EAAaF,MAAM,CAAG,GAClBL,EAACe,aAAAA,CAAAA,EAAAA,CACGC,cAAepB,EAAMoB,aAAa,CAClCP,WACIT,EAAAiB,aAAA,CAACF,EAAKG,MAAM,CAAA,CAACL,UAAWjB,EAAMuB,mBAAAA,AACzBV,EAAAA,EAIRF,EAAAA,EAAaa,GAAG,CAAC,CAACC,EAAOC,IACtBtB,EAAAiB,aAAA,CAACF,EAAKQ,IAAI,CAAA,CAACC,IAAKF,EAAOT,UAAWjB,EAAM6B,iBAAAA,AACnCJ,EAAAA,QAKdf,EACN,CAGb"}
@@ -1,2 +1,2 @@
1
- import e,{useMemo as r}from"react";import t from"classnames";import{useClientRect as o}from"../../hooks/useClientRect.js";import{composeBubblePath as n}from"./utils.js";function s(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},o=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.forEach(function(r){var o;o=t[r],r in e?Object.defineProperty(e,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[r]=o})}return e}var a=function(a){var i,l,c=a.className,b=a.controlClassName,u=a.svgClassName,f=a.control,p=a.children,d=a.backgroundColor,O=a.shadow,h=a.bubbleSize,m=void 0===h?40:h,y=a.borderColor,v=a.innerOffset,g=void 0===v?5:v,j=a.radiusOffset,w=void 0===j?8:j,P=a.borderWith,x=function(e,r){if(null==e)return{};var t,o,n=function(e,r){if(null==e)return{};var t,o,n={},s=Object.keys(e);for(o=0;o<s.length;o++)t=s[o],r.indexOf(t)>=0||(n[t]=e[t]);return n}(e,r);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)t=s[o],!(r.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n}(a,["className","controlClassName","svgClassName","control","children","backgroundColor","shadow","bubbleSize","borderColor","innerOffset","radiusOffset","borderWith"]),k=o(),B=k.rect,C=k.ref,N=Array.isArray(m)?m[1]:m,S=Array.isArray(m)?m[0]:m,E=(null==B?void 0:B.width)||0,_=(null==B?void 0:B.height)||0,A=s({"--vchasno-ui-bubble-width":"".concat(S,"px"),"--vchasno-ui-bubble-height":"".concat(N,"px")},x.style),D=r(function(){return n(E,_,Math.max(N,S)+2*g,w)},[E,_,N,S,g,w]);return e.createElement("div",(i=s({},x),l=l={ref:C,className:t("vchasno-ui-BubbleBox",c),style:A},Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(l)):(function(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t.push.apply(t,o)}return t})(Object(l)).forEach(function(e){Object.defineProperty(i,e,Object.getOwnPropertyDescriptor(l,e))}),i),B&&e.createElement("svg",{className:t("vchasno-ui-BubbleBox__svg",{"vchasno-ui-BubbleBox__shadow":O},u),width:E,height:_,xmlns:"http://www.w3.org/2000/svg"},e.createElement("path",{d:D,fill:d||"transparent",stroke:y||d||"transparent",strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:void 0===P?1:P})),f&&e.createElement("div",{className:t("vchasno-ui-BubbleBox__bubble",b)},f),p)};export{a as default};
1
+ import e,{useMemo as t}from"react";import r from"classnames";import{useClientRect as s}from"../../hooks/useClientRect.js";import{composeBubblePath as a}from"./utils.js";let o=({className:o,controlClassName:i,svgClassName:l,control:n,children:h,backgroundColor:u,shadow:b,bubbleSize:m=40,borderColor:c,innerOffset:p=5,radiusOffset:d=8,borderWith:v=1,...x})=>{let{rect:B,ref:w}=s(),f=Array.isArray(m)?m[1]:m,g=Array.isArray(m)?m[0]:m,y=B?.width||0,_=B?.height||0,k={"--vchasno-ui-bubble-width":`${g}px`,"--vchasno-ui-bubble-height":`${f}px`,...x.style},A=t(()=>a(y,_,Math.max(f,g)+2*p,d),[y,_,f,g,p,d]);return e.createElement("div",{...x,ref:w,className:r("vchasno-ui-BubbleBox",o),style:k},B&&e.createElement("svg",{className:r("vchasno-ui-BubbleBox__svg",{"vchasno-ui-BubbleBox__shadow":b},l),width:y,height:_,xmlns:"http://www.w3.org/2000/svg"},e.createElement("path",{d:A,fill:u||"transparent",stroke:c||u||"transparent",strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:v})),n&&e.createElement("div",{className:r("vchasno-ui-BubbleBox__bubble",i)},n),h)};export{o as default};
2
2
  //# sourceMappingURL=BubbleBox.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BubbleBox.js","sources":["../../../src/components/BubbleBox/BubbleBox.tsx"],"sourcesContent":["import React, { HTMLAttributes, useMemo } from 'react';\n\nimport cn from 'classnames';\n\nimport { useClientRect } from '../../hooks/useClientRect';\nimport { composeBubblePath } from './utils';\n\nimport './BubbleBox.global.css';\n\nexport interface BubbleBoxProps extends HTMLAttributes<HTMLDivElement> {\n className?: string;\n controlClassName?: string;\n svgClassName?: string;\n control?: React.ReactNode;\n shadow?: boolean;\n bubbleSize?: number | [number, number];\n backgroundColor?: React.CSSProperties['backgroundColor'];\n borderColor?: React.CSSProperties['borderColor'];\n innerOffset?: number;\n radiusOffset?: number;\n borderWith?: 1 | 2 | 3 | 4 | 5;\n}\n\nconst BubbleBox: React.FC<BubbleBoxProps> = ({\n className,\n controlClassName,\n svgClassName,\n control,\n children,\n backgroundColor,\n shadow,\n bubbleSize = 40,\n borderColor,\n innerOffset = 5,\n radiusOffset = 8,\n borderWith = 1,\n ...rest\n}) => {\n const { rect, ref } = useClientRect();\n const bubbleHeight = Array.isArray(bubbleSize) ? bubbleSize[1] : bubbleSize;\n const bubbleWidth = Array.isArray(bubbleSize) ? bubbleSize[0] : bubbleSize;\n const elementWidth = rect?.width || 0;\n const height = rect?.height || 0;\n\n const css = {\n '--vchasno-ui-bubble-width': `${bubbleWidth}px`,\n '--vchasno-ui-bubble-height': `${bubbleHeight}px`,\n ...rest.style,\n } as React.CSSProperties;\n\n const d = useMemo(\n () =>\n composeBubblePath(\n elementWidth,\n height,\n Math.max(bubbleHeight, bubbleWidth) + innerOffset * 2,\n radiusOffset,\n ),\n [elementWidth, height, bubbleHeight, bubbleWidth, innerOffset, radiusOffset],\n );\n\n return (\n <div {...rest} ref={ref} className={cn('vchasno-ui-BubbleBox', className)} style={css}>\n {rect && (\n <svg\n className={cn(\n 'vchasno-ui-BubbleBox__svg',\n { 'vchasno-ui-BubbleBox__shadow': shadow },\n svgClassName,\n )}\n width={elementWidth}\n height={height}\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d={d}\n fill={backgroundColor || 'transparent'}\n stroke={borderColor || backgroundColor || 'transparent'}\n strokeLinejoin=\"round\"\n strokeLinecap=\"round\"\n strokeWidth={borderWith}\n />\n </svg>\n )}\n {control && (\n <div className={cn('vchasno-ui-BubbleBox__bubble', controlClassName)}>\n {control}\n </div>\n )}\n {children}\n </div>\n );\n};\n\nexport default BubbleBox;\n"],"names":["BubbleBox","_param","className","controlClassName","svgClassName","control","children","backgroundColor","shadow","bubbleSize","_param_bubbleSize","undefined","borderColor","innerOffset","radiusOffset","_param_radiusOffset","_param_borderWith","borderWith","rest","useClientRect","rect","ref","bubbleHeight","Array","isArray","bubbleWidth","elementWidth","width","height","css","_object_spread","concat","style","d","useMemo","composeBubblePath","Math","max","React","div","cn","svg","xmlns","path","fill","stroke","strokeLinejoin","strokeLinecap","strokeWidth"],"mappings":"2kBAuBA,IAAMA,EAAsC,SAAAC,CAAA,UACxCC,EAAAA,EAAAA,SAAAA,CACAC,EAAAA,EAAAA,gBAAAA,CACAC,EAAAA,EAAAA,YAAAA,CACAC,EAAAA,EAAAA,OAAAA,CACAC,EAAAA,EAAAA,QAAAA,CACAC,EAAAA,EAAAA,eAAAA,CACAC,EAAAA,EAAAA,MAAAA,CAAAA,EAAAA,EACAC,WAAAA,EAAaC,AAAAC,KAAAA,IAAAD,EAAA,GAAAA,EACbE,EAAAA,EAAAA,WAAAA,CAAAA,EAAAA,EACAC,WAAAA,CAAAA,EAAAA,AAAAA,KAAAA,IAAAA,EAAc,EACdC,EAAAA,EAAAA,EAAAA,YAAAA,CAAAA,EAAeC,AAAAJ,KAAAA,IAAAI,EAAA,EAAAA,EAAAC,EAAAf,EACfgB,UAAAA,CACGC,EAAAA,sXAAAA,EAAAA,CAZHhB,YACAC,mBACAC,eACAC,UACAC,WACAC,kBACAC,SACAC,aACAG,cACAC,cACAC,eACAG,eAGsBE,EAAAA,IAAdC,EAAcD,EAAdC,IAAAA,CAAMC,EAAQF,EAARE,GAAAA,CACRC,EAAeC,MAAMC,OAAO,CAACf,GAAcA,CAAU,CAAC,EAAE,CAAGA,EAC3DgB,EAAcF,MAAMC,OAAO,CAACf,GAAcA,CAAU,CAAC,EAAE,CAAGA,EAC1DiB,EAAeN,AAAAA,CAAAA,MAAAA,EAAAA,KAAAA,EAAAA,EAAMO,KAAK,AAALA,GAAS,EAC9BC,EAASR,AAAAA,CAAAA,MAAAA,EAAAA,KAAAA,EAAAA,EAAMQ,MAAM,AAANA,GAAU,EAEzBC,EAAMC,EAAA,CACR,4BAA8B,GAAcC,MAAA,CAAZN,EAAY,MAC5C,6BAA+B,GAAeM,MAAA,CAAbT,EAAa,KAC3CJ,EAAAA,EAAKc,KAAK,EAGXC,EAAIC,EACN,kBACIC,EACIT,EACAE,EACAQ,KAAKC,GAAG,CAACf,EAAcG,GAAeZ,AAAc,EAAdA,EACtCC,EAER,EAAA,CAACY,EAAcE,EAAQN,EAAcG,EAAaZ,EAAaC,EAAa,EAGhF,OACIwB,gBAACC,SAAQrB,EAAAA,CAAAA,EAAAA,OAAAA,CAAMG,IAAKA,EAAKnB,UAAWsC,EAAG,uBAAwBtC,GAAY8B,MAAOH,CAC7ET,8UAAAA,GACGkB,EAACG,aAAAA,CAAAA,MAAAA,CACGvC,UAAWsC,EACP,4BACA,CAAE,+BAAgChC,CAClCJ,EAAAA,GAEJuB,MAAOD,EACPE,OAAQA,EACRc,MAAM,8BAENJ,EAACK,aAAAA,CAAAA,OAAAA,CACGV,EAAGA,EACHW,KAAMrC,GAAmB,cACzBsC,OAAQjC,GAAeL,GAAmB,cAC1CuC,eAAe,QACfC,cAAc,QACdC,YA7CpB/B,AAAAA,KAAAA,IAAAA,EAAa,EACVC,CAgDMb,IAAAA,GACGiC,EAACC,aAAAA,CAAAA,MAAAA,CAAIrC,UAAWsC,EAAG,+BAAgCrC,IAC9CE,GAGRC,EAGb"}
1
+ {"version":3,"file":"BubbleBox.js","sources":["../../../src/components/BubbleBox/BubbleBox.tsx"],"sourcesContent":["import React, { type HTMLAttributes, useMemo } from 'react';\n\nimport cn from 'classnames';\n\nimport { useClientRect } from '../../hooks/useClientRect';\nimport { composeBubblePath } from './utils';\n\nimport './BubbleBox.global.css';\n\nexport interface BubbleBoxProps extends HTMLAttributes<HTMLDivElement> {\n className?: string;\n controlClassName?: string;\n svgClassName?: string;\n control?: React.ReactNode;\n shadow?: boolean;\n bubbleSize?: number | [number, number];\n backgroundColor?: React.CSSProperties['backgroundColor'];\n borderColor?: React.CSSProperties['borderColor'];\n innerOffset?: number;\n radiusOffset?: number;\n borderWith?: 1 | 2 | 3 | 4 | 5;\n}\n\nconst BubbleBox: React.FC<BubbleBoxProps> = ({\n className,\n controlClassName,\n svgClassName,\n control,\n children,\n backgroundColor,\n shadow,\n bubbleSize = 40,\n borderColor,\n innerOffset = 5,\n radiusOffset = 8,\n borderWith = 1,\n ...rest\n}) => {\n const { rect, ref } = useClientRect();\n const bubbleHeight = Array.isArray(bubbleSize) ? bubbleSize[1] : bubbleSize;\n const bubbleWidth = Array.isArray(bubbleSize) ? bubbleSize[0] : bubbleSize;\n const elementWidth = rect?.width || 0;\n const height = rect?.height || 0;\n\n const css = {\n '--vchasno-ui-bubble-width': `${bubbleWidth}px`,\n '--vchasno-ui-bubble-height': `${bubbleHeight}px`,\n ...rest.style,\n } as React.CSSProperties;\n\n const d = useMemo(\n () =>\n composeBubblePath(\n elementWidth,\n height,\n Math.max(bubbleHeight, bubbleWidth) + innerOffset * 2,\n radiusOffset,\n ),\n [elementWidth, height, bubbleHeight, bubbleWidth, innerOffset, radiusOffset],\n );\n\n return (\n <div {...rest} ref={ref} className={cn('vchasno-ui-BubbleBox', className)} style={css}>\n {rect && (\n <svg\n className={cn(\n 'vchasno-ui-BubbleBox__svg',\n { 'vchasno-ui-BubbleBox__shadow': shadow },\n svgClassName,\n )}\n width={elementWidth}\n height={height}\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d={d}\n fill={backgroundColor || 'transparent'}\n stroke={borderColor || backgroundColor || 'transparent'}\n strokeLinejoin=\"round\"\n strokeLinecap=\"round\"\n strokeWidth={borderWith}\n />\n </svg>\n )}\n {control && (\n <div className={cn('vchasno-ui-BubbleBox__bubble', controlClassName)}>\n {control}\n </div>\n )}\n {children}\n </div>\n );\n};\n\nexport default BubbleBox;\n"],"names":["BubbleBox","className","controlClassName","svgClassName","control","children","backgroundColor","shadow","bubbleSize","borderColor","innerOffset","radiusOffset","borderWith","rest","rect","ref","useClientRect","bubbleHeight","Array","isArray","bubbleWidth","elementWidth","width","height","css","style","d","useMemo","composeBubblePath","Math","max","React","div","cn","svg","xmlns","path","fill","stroke","strokeLinejoin","strokeLinecap","strokeWidth"],"mappings":"yKAuBA,IAAMA,EAAsC,CAAC,CACzCC,UAAAA,CAAS,CACTC,iBAAAA,CAAgB,CAChBC,aAAAA,CAAY,CACZC,QAAAA,CAAO,CACPC,SAAAA,CAAQ,CACRC,gBAAAA,CAAe,CACfC,OAAAA,CAAM,CACNC,WAAAA,EAAa,EAAE,CACfC,YAAAA,CAAW,CACXC,YAAAA,EAAc,CAAC,CACfC,aAAAA,EAAe,CAAC,CAChBC,WAAAA,EAAa,CAAC,CACd,GAAGC,EACN,IACG,GAAM,CAAEC,KAAAA,CAAI,CAAEC,IAAAA,CAAG,CAAE,CAAGC,IAChBC,EAAeC,MAAMC,OAAO,CAACX,GAAcA,CAAU,CAAC,EAAE,CAAGA,EAC3DY,EAAcF,MAAMC,OAAO,CAACX,GAAcA,CAAU,CAAC,EAAE,CAAGA,EAC1Da,EAAeP,GAAMQ,OAAS,EAC9BC,EAAST,GAAMS,QAAU,EAEzBC,EAAM,CACR,4BAA6B,CAAA,EAAGJ,EAAY,EAAE,CAAC,CAC/C,6BAA8B,CAAA,EAAGH,EAAa,EAAE,CAAC,CACjD,GAAGJ,EAAKY,KAAAA,AACZ,EAEMC,EAAIC,EACN,IACIC,EACIP,EACAE,EACAM,KAAKC,GAAG,CAACb,EAAcG,GAAeV,AAAc,EAAdA,EACtCC,GAER,CAACU,EAAcE,EAAQN,EAAcG,EAAaV,EAAaC,EAAa,EAGhF,OACIoB,EAACC,aAAAA,CAAAA,MAAAA,CAAK,GAAGnB,CAAI,CAAEE,IAAKA,EAAKd,UAAWgC,EAAG,uBAAwBhC,GAAYwB,MAAOD,CAC7EV,EAAAA,GACGiB,EAACG,aAAAA,CAAAA,MAAAA,CACGjC,UAAWgC,EACP,4BACA,CAAE,+BAAgC1B,CAClCJ,EAAAA,GAEJmB,MAAOD,EACPE,OAAQA,EACRY,MAAM,8BAENJ,EAACK,aAAAA,CAAAA,OAAAA,CACGV,EAAGA,EACHW,KAAM/B,GAAmB,cACzBgC,OAAQ7B,GAAeH,GAAmB,cAC1CiC,eAAe,QACfC,cAAc,QACdC,YAAa7B,CAIxBR,IAAAA,GACG2B,EAACC,aAAAA,CAAAA,MAAAA,CAAI/B,UAAWgC,EAAG,+BAAgC/B,IAC9CE,GAGRC,EAGb"}
@@ -1,2 +1,2 @@
1
- var c=function(c,o,n,t){var a=c-n,Q=o-n;return["M0 ".concat(t),"L0 ".concat(o-t),"Q0 ".concat(o," ").concat(t," ").concat(o),"H".concat(a-t),"Q".concat(a," ").concat(o," ").concat(a," ").concat(o-t),"L".concat(a," ").concat(o-n/4),"Q".concat(a," ").concat(Q," ").concat(c-n/4," ").concat(Q),"H".concat(c-t),"Q".concat(c," ").concat(Q," ").concat(c," ").concat(Q-t),"V".concat(t),"Q".concat(c," 0 ").concat(c-t," 0"),"H".concat(t),"Q0 0 0 ".concat(t)].join(" ")};export{c as composeBubblePath};
1
+ let $=($,e,Q,t)=>{let l=$-Q,o=e-Q;return`M0 ${t} L0 ${e-t} Q0 ${e} ${t} ${e} H${l-t} Q${l} ${e} ${l} ${e-t} L${l} ${e-Q/4} Q${l} ${o} ${$-Q/4} ${o} H${$-t} Q${$} ${o} ${$} ${o-t} V${t} Q${$} 0 ${$-t} 0 H${t} Q0 0 0 ${t}`};export{$ as composeBubblePath};
2
2
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sources":["../../../src/components/BubbleBox/utils.ts"],"sourcesContent":["export const composeBubblePath = (\n width: number,\n height: number,\n bubble: number,\n radiusOffset: number,\n): string => {\n const offsetWidth = width - bubble;\n const offsetHeight = height - bubble;\n\n return [\n `M0 ${radiusOffset}`,\n `L0 ${height - radiusOffset}`,\n `Q0 ${height} ${radiusOffset} ${height}`,\n `H${offsetWidth - radiusOffset}`,\n `Q${offsetWidth} ${height} ${offsetWidth} ${height - radiusOffset}`,\n `L${offsetWidth} ${height - bubble / 4}`,\n `Q${offsetWidth} ${offsetHeight} ${width - bubble / 4} ${offsetHeight}`,\n `H${width - radiusOffset}`,\n `Q${width} ${offsetHeight} ${width} ${offsetHeight - radiusOffset}`,\n `V${radiusOffset}`,\n `Q${width} 0 ${width - radiusOffset} 0`,\n `H${radiusOffset}`,\n `Q0 0 0 ${radiusOffset}`,\n ].join(' ');\n};\n"],"names":["composeBubblePath","width","height","bubble","radiusOffset","offsetWidth","offsetHeight","concat","join"],"mappings":"AAAaA,IAAAA,EAAoB,SAC7BC,CAAAA,CACAC,EACAC,CACAC,CAAAA,CAAAA,EAEA,IAAMC,EAAcJ,EAAQE,EACtBG,EAAeJ,EAASC,EAE9B,MAAO,CACF,MAAkBI,MAAbH,CAAAA,GACL,MAA2BG,OAAtBL,EAASE,GACd,MAAeA,OAAVF,EAAO,KAAmBA,MAAhBE,CAAAA,EAAa,KAAUG,MAAPL,CAAAA,GAC/B,IAA8BK,OAA3BF,EAAcD,GACjB,IAAkBF,MAAAA,CAAfG,EAAY,KAAaA,MAAVH,CAAAA,EAAO,KAAkBA,MAAfG,CAAAA,EAAY,KAAyBE,MAAA,CAAtBL,EAASE,GACpD,IAAkBF,MAAfG,CAAAA,EAAY,KAAuBE,MAAA,CAApBL,EAASC,EAAS,GACpC,IAAkBG,MAAAA,CAAfD,EAAY,KAAmBJ,MAAhBK,CAAAA,EAAa,KAAyBA,MAAAA,CAAtBL,EAAQE,EAAS,EAAE,KAAgBI,MAAbD,CAAAA,GACxD,IAAwBC,OAArBN,EAAQG,GACX,IAAYE,MAAAA,CAATL,EAAM,KAAmBA,MAAhBK,CAAAA,EAAa,KAAYA,MAATL,CAAAA,EAAM,KAA+BM,MAAA,CAA5BD,EAAeF,GACpD,IAAgBG,MAAbH,CAAAA,GACH,IAAcH,MAAXA,CAAAA,EAAM,OAA0BM,MAAA,CAArBN,EAAQG,EAAa,MACnC,IAAgBG,MAAbH,CAAAA,GACH,UAAsBG,MAAbH,CAAAA,GACb,CAACI,IAAI,CAAC,IACX"}
1
+ {"version":3,"file":"utils.js","sources":["../../../src/components/BubbleBox/utils.ts"],"sourcesContent":["export const composeBubblePath = (\n width: number,\n height: number,\n bubble: number,\n radiusOffset: number,\n): string => {\n const offsetWidth = width - bubble;\n const offsetHeight = height - bubble;\n\n return [\n `M0 ${radiusOffset}`,\n `L0 ${height - radiusOffset}`,\n `Q0 ${height} ${radiusOffset} ${height}`,\n `H${offsetWidth - radiusOffset}`,\n `Q${offsetWidth} ${height} ${offsetWidth} ${height - radiusOffset}`,\n `L${offsetWidth} ${height - bubble / 4}`,\n `Q${offsetWidth} ${offsetHeight} ${width - bubble / 4} ${offsetHeight}`,\n `H${width - radiusOffset}`,\n `Q${width} ${offsetHeight} ${width} ${offsetHeight - radiusOffset}`,\n `V${radiusOffset}`,\n `Q${width} 0 ${width - radiusOffset} 0`,\n `H${radiusOffset}`,\n `Q0 0 0 ${radiusOffset}`,\n ].join(' ');\n};\n"],"names":["composeBubblePath","width","height","bubble","radiusOffset","offsetWidth","offsetHeight"],"mappings":"AAAaA,IAAAA,EAAoB,CAC7BC,EACAC,EACAC,EACAC,KAEA,IAAMC,EAAcJ,EAAQE,EACtBG,EAAeJ,EAASC,EAE9B,MAAO,MACGC,QACAF,EAASE,QACTF,KAAUE,KAAgBF,MAC5BG,EAAcD,MACdC,KAAeH,KAAUG,KAAeH,EAASE,MACjDC,KAAeH,EAASC,EAAS,MACjCE,KAAeC,KAAgBL,EAAQE,EAAS,KAAKG,MACrDL,EAAQG,MACRH,KAASK,KAAgBL,KAASK,EAAeF,MACjDA,MACAH,OAAWA,EAAQG,QACnBA,YACMA,GACb,AACL"}
@@ -1,2 +1,2 @@
1
- import e from"react";import t from"classnames";import r from"../Spinner/Spinner.js";var n=e.forwardRef(function(n,o){var a=n.theme,i=n.type,l=n.size,u=n.outline,c=n.loading,s=void 0!==c&&c,d=n.wide,p=n.suppressPadding,f=n.className,m=n.dataQa,b=n.children,y=n.pulse,v=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(n,["theme","type","size","outline","loading","wide","suppressPadding","className","dataQa","children","pulse"]);return e.createElement("button",function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({"data-qa":m,ref:o,type:void 0===i?"button":i,className:t("vchasno-ui-button","--".concat(void 0===a?"primary":a),"--".concat(void 0===l?"md":l),{"vchasno-ui-pulse-animation":y&&!v.disabled,"--outline":void 0!==u&&u,"--wide":void 0!==d&&d,"--loading":s,"--suppress-padding":void 0!==p&&p},f)},v),b,s&&e.createElement(r,{height:"1rem"}))});n.displayName="Button";export{n as default};
1
+ import e from"react";import t from"classnames";import a from"../Spinner/Spinner.js";let n=e.forwardRef(({theme:n="primary",type:r="button",size:o="md",outline:i=!1,loading:m=!1,wide:s=!1,suppressPadding:p=!1,className:d,dataQa:l,children:u,pulse:c,...f},b)=>e.createElement("button",{"data-qa":l,ref:b,type:r,className:t("vchasno-ui-button",`--${n}`,`--${o}`,{"vchasno-ui-pulse-animation":c&&!f.disabled,"--outline":i,"--wide":s,"--loading":m,"--suppress-padding":p},d),...f},u,m&&e.createElement(a,{height:"1rem"})));n.displayName="Button";export{n as default};
2
2
  //# sourceMappingURL=Button.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Button.js","sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":["import React, { ButtonHTMLAttributes } from 'react';\n\nimport cn from 'classnames';\n\nimport Spinner from '../Spinner';\nimport { DataQa, LoadingFeedback, Sizable, WithPulseAnimation } from '../types';\n\nimport './Button.global.css';\n\n/**\n * @deprecated - it will be removed in the next major version\n */\ntype ButtonThemeLight = 'light';\n/**\n * @deprecated - it will be removed in the next major version\n */\ntype ButtonThemeTransparent = 'transparent';\n\ntype ButtonTheme = 'primary' | 'secondary' | 'danger' | 'pink'; // KEP specific;\nexport interface ButtonProps\n extends ButtonHTMLAttributes<HTMLButtonElement>,\n Partial<Sizable & LoadingFeedback & DataQa & WithPulseAnimation> {\n className?: string;\n theme?: ButtonTheme | ButtonThemeLight | ButtonThemeTransparent;\n /**\n * @deprecated - it will be removed in the next major version\n */\n outline?: boolean;\n wide?: boolean;\n suppressPadding?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n theme = 'primary',\n type = 'button',\n size = 'md',\n outline = false,\n loading = false,\n wide = false,\n suppressPadding = false,\n className,\n dataQa,\n children,\n pulse,\n ...rest\n },\n ref,\n ) => {\n return (\n <button\n data-qa={dataQa}\n ref={ref}\n type={type}\n className={cn(\n 'vchasno-ui-button',\n `--${theme}`,\n `--${size}`,\n {\n 'vchasno-ui-pulse-animation': pulse && !rest.disabled,\n '--outline': outline,\n '--wide': wide,\n '--loading': loading,\n '--suppress-padding': suppressPadding,\n },\n className,\n )}\n {...rest}\n >\n {children}\n {loading && <Spinner height=\"1rem\" />}\n </button>\n );\n },\n);\n\nButton.displayName = 'Button';\n\nexport default Button;\n"],"names":["Button","React","forwardRef","ref","theme","type","_param_size","_param","size","outline","_param_loading","loading","wide","_param_suppressPadding","suppressPadding","className","dataQa","children","pulse","rest","button","data-qa","_param_type","undefined","cn","concat","disabled","_param_outline","_param_wide","Spinner","height","displayName"],"mappings":"oFAgCA,IAAMA,EAASC,EAAMC,UAAU,CAC3B,SAeIC,CAAAA,CAAAA,CAAAA,UAbIC,KAAAA,CACAC,EAAAA,EAAAA,IAAAA,CAAOC,EAAAC,EACPC,IAAAA,CACAC,EAAAA,EAAAA,OAAAA,CAAUC,EAAAH,EACVI,OAAAA,CAAAA,EAAAA,AAAAA,KAAAA,IAAAA,GACAC,EAAAA,EAAAA,EAAAA,IAAAA,CAAOC,EAAAN,EACPO,eAAAA,CACAC,EAAAA,EAAAA,SACAC,CAAAA,EAAAA,EAAAA,MACAC,CAAAA,EAAAA,EAAAA,QACAC,CAAAA,EAAAA,EAAAA,KACGC,CAAAA,EAAAA,sXAAAA,EAAAA,CAXHf,QACAC,OACAG,OACAC,UACAE,UACAC,OACAE,kBACAC,YACAC,SACAC,WACAC,UAKJ,OACIjB,EAACmB,aAAAA,CAAAA,SAAAA,iaAAAA,CACGC,UAASL,EACTb,IAAKA,EACLE,KAlBGiB,AAAAC,KAAAA,IAAAD,EAAA,SAAAA,EAmBHP,UAAWS,EACP,oBACA,KAAWC,OAtBnBrB,AAAAA,KAAAA,IAAAA,EAAQ,UACRC,GAsBS,KAASoB,MAAA,CArBlBjB,AAAAA,KAAAA,IAAAA,EAAO,KACPC,GAqBQ,CACI,6BAA8BS,GAAS,CAACC,EAAKO,QAAQ,CACrD,YAvBFC,AAAAJ,KAAAA,IAAAI,GAAAA,EAwBE,SAtBLC,AAAAL,KAAAA,IAAAK,GAAAA,EAuBK,YAAajB,EACb,qBAvBZG,AAAAA,KAAAA,IAAAA,GACAC,GAwBQA,IAEAI,GAEHF,EACAN,GAAWV,EAAC4B,aAAAA,CAAAA,EAAAA,CAAQC,OAAO,SAGxC,EAGJ9B,CAAAA,EAAO+B,WAAW,CAAG"}
1
+ {"version":3,"file":"Button.js","sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":["import React, { type ButtonHTMLAttributes } from 'react';\n\nimport cn from 'classnames';\n\nimport Spinner from '../Spinner';\nimport type { DataQa, LoadingFeedback, Sizable, WithPulseAnimation } from '../types';\n\nimport './Button.global.css';\n\n/**\n * @deprecated - it will be removed in the next major version\n */\ntype ButtonThemeLight = 'light';\n/**\n * @deprecated - it will be removed in the next major version\n */\ntype ButtonThemeTransparent = 'transparent';\n\ntype ButtonTheme = 'primary' | 'secondary' | 'danger' | 'pink'; // KEP specific;\nexport interface ButtonProps\n extends ButtonHTMLAttributes<HTMLButtonElement>,\n Partial<Sizable & LoadingFeedback & DataQa & WithPulseAnimation> {\n className?: string;\n theme?: ButtonTheme | ButtonThemeLight | ButtonThemeTransparent;\n /**\n * @deprecated - it will be removed in the next major version\n */\n outline?: boolean;\n wide?: boolean;\n suppressPadding?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n theme = 'primary',\n type = 'button',\n size = 'md',\n outline = false,\n loading = false,\n wide = false,\n suppressPadding = false,\n className,\n dataQa,\n children,\n pulse,\n ...rest\n },\n ref,\n ) => {\n return (\n <button\n data-qa={dataQa}\n ref={ref}\n type={type}\n className={cn(\n 'vchasno-ui-button',\n `--${theme}`,\n `--${size}`,\n {\n 'vchasno-ui-pulse-animation': pulse && !rest.disabled,\n '--outline': outline,\n '--wide': wide,\n '--loading': loading,\n '--suppress-padding': suppressPadding,\n },\n className,\n )}\n {...rest}\n >\n {children}\n {loading && <Spinner height=\"1rem\" />}\n </button>\n );\n },\n);\n\nButton.displayName = 'Button';\n\nexport default Button;\n"],"names":["Button","React","forwardRef","theme","type","size","outline","loading","wide","suppressPadding","className","dataQa","children","pulse","rest","ref","button","data-qa","cn","disabled","Spinner","height","displayName"],"mappings":"oFAgCA,IAAMA,EAASC,EAAMC,UAAU,CAC3B,CACI,CACIC,MAAAA,EAAQ,SAAS,CACjBC,KAAAA,EAAO,QAAQ,CACfC,KAAAA,EAAO,IAAI,CACXC,QAAAA,EAAU,CAAA,CAAK,CACfC,QAAAA,EAAU,CAAA,CAAK,CACfC,KAAAA,EAAO,CAAA,CAAK,CACZC,gBAAAA,EAAkB,CAAA,CAAK,CACvBC,UAAAA,CAAS,CACTC,OAAAA,CAAM,CACNC,SAAAA,CAAQ,CACRC,MAAAA,CAAK,CACL,GAAGC,EACN,CACDC,IAGId,EAACe,aAAAA,CAAAA,SAAAA,CACGC,UAASN,EACTI,IAAKA,EACLX,KAAMA,EACNM,UAAWQ,EACP,oBACA,CAAC,EAAE,EAAEf,EAAO,CAAA,CACZ,CAAC,EAAE,EAAEE,EAAAA,CAAM,CACX,CACI,6BAA8BQ,GAAS,CAACC,EAAKK,QAAQ,CACrD,YAAab,EACb,SAAUE,EACV,YAAaD,EACb,qBAAsBE,CAE1BC,EAAAA,GAEH,GAAGI,CAAAA,AAEHF,EAAAA,EACAL,GAAWN,EAACmB,aAAAA,CAAAA,EAAAA,CAAQC,OAAO,UAM5CrB,CAAAA,EAAOsB,WAAW,CAAG"}
@@ -1,2 +1,2 @@
1
- import e from"react";import t from"classnames";import a from"../Spinner/Spinner.js";var r=e.forwardRef(function(r,n){var l=r.className,o=r.label,c=r.partial,i=r.disabled,s=r.loading,b=r.dataQa,u=r.pulse,m=function(e,t){if(null==e)return{};var a,r,n=function(e,t){if(null==e)return{};var a,r,n={},l=Object.keys(e);for(r=0;r<l.length;r++)a=l[r],t.indexOf(a)>=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)a=l[r],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}(r,["className","label","partial","disabled","loading","dataQa","pulse"]);return e.createElement("label",{"data-qa":b,className:t("vchasno-ui-checkbox",l,{"--loading":s,"--disabled":i})},e.createElement("input",function(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{},r=Object.keys(a);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(a).filter(function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable}))),r.forEach(function(t){var r;r=a[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({ref:n,type:"checkbox",hidden:!0,disabled:i},m)),e.createElement("span",{className:t("vchasno-ui-checkbox__box",{"vchasno-ui-pulse-animation":u&&!i})},s&&e.createElement(a,{height:"90%"}),c?e.createElement("svg",{className:"vchasno-ui-checkbox__svg",width:"8",height:"2",viewBox:"0 0 8 2",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("rect",{width:"8",height:"2",rx:"1",fill:"currentColor"})):e.createElement("svg",{className:"vchasno-ui-checkbox__svg",width:"10",height:"7",viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("path",{d:"M4 7C3.8 7 3.5 6.9 3.3 6.7L0.3 3.7C-0.1 3.3 -0.1 2.7 0.3 2.3C0.7 1.9 1.3 1.9 1.7 2.3L4 4.6L8.3 0.3C8.7 -0.1 9.3 -0.1 9.7 0.3C10.1 0.7 10.1 1.3 9.7 1.7L4.7 6.7C4.5 6.9 4.3 7 4 7Z",fill:"currentColor"}))),o&&e.createElement("span",{className:"vchasno-ui-checkbox__label"},o))});r.displayName="Checkbox";export{r as default};
1
+ import e from"react";import a from"classnames";import t from"../Spinner/Spinner.js";let c=e.forwardRef(({className:c,label:l,partial:n,disabled:o,loading:s,dataQa:i,pulse:r,...h},m)=>e.createElement("label",{"data-qa":i,className:a("vchasno-ui-checkbox",c,{"--loading":s,"--disabled":o})},e.createElement("input",{ref:m,type:"checkbox",hidden:!0,disabled:o,...h}),e.createElement("span",{className:a("vchasno-ui-checkbox__box",{"vchasno-ui-pulse-animation":r&&!o})},s&&e.createElement(t,{height:"90%"}),n?e.createElement("svg",{className:"vchasno-ui-checkbox__svg",width:"8",height:"2",viewBox:"0 0 8 2",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("rect",{width:"8",height:"2",rx:"1",fill:"currentColor"})):e.createElement("svg",{className:"vchasno-ui-checkbox__svg",width:"10",height:"7",viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("path",{d:"M4 7C3.8 7 3.5 6.9 3.3 6.7L0.3 3.7C-0.1 3.3 -0.1 2.7 0.3 2.3C0.7 1.9 1.3 1.9 1.7 2.3L4 4.6L8.3 0.3C8.7 -0.1 9.3 -0.1 9.7 0.3C10.1 0.7 10.1 1.3 9.7 1.7L4.7 6.7C4.5 6.9 4.3 7 4 7Z",fill:"currentColor"}))),l&&e.createElement("span",{className:"vchasno-ui-checkbox__label"},l)));c.displayName="Checkbox";export{c as default};
2
2
  //# sourceMappingURL=Checkbox.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.js","sources":["../../../src/components/Checkbox/Checkbox.tsx"],"sourcesContent":["import React, { InputHTMLAttributes } from 'react';\n\nimport cn from 'classnames';\n\nimport Spinner from '../Spinner';\nimport type { DataQa, LoadingFeedback, WithPulseAnimation } from '../types';\n\nimport './Checkbox.global.css';\n\nexport interface CheckboxProps\n extends InputHTMLAttributes<HTMLInputElement>,\n Partial<LoadingFeedback & DataQa & WithPulseAnimation> {\n className?: string;\n label?: string;\n disabled?: boolean;\n partial?: boolean;\n}\n\nconst Checkbox = React.forwardRef<HTMLInputElement, CheckboxProps>(\n ({ className, label, partial, disabled, loading, dataQa, pulse, ...rest }, ref) => {\n return (\n <label\n data-qa={dataQa}\n className={cn('vchasno-ui-checkbox', className, {\n '--loading': loading,\n '--disabled': disabled,\n })}\n >\n <input ref={ref} type=\"checkbox\" hidden disabled={disabled} {...rest} />\n <span\n className={cn('vchasno-ui-checkbox__box', {\n 'vchasno-ui-pulse-animation': pulse && !disabled,\n })}\n >\n {loading && <Spinner height=\"90%\" />}\n {partial ? (\n <svg\n className=\"vchasno-ui-checkbox__svg\"\n width=\"8\"\n height=\"2\"\n viewBox=\"0 0 8 2\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <rect width=\"8\" height=\"2\" rx=\"1\" fill=\"currentColor\" />\n </svg>\n ) : (\n <svg\n className=\"vchasno-ui-checkbox__svg\"\n width=\"10\"\n height=\"7\"\n viewBox=\"0 0 10 7\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M4 7C3.8 7 3.5 6.9 3.3 6.7L0.3 3.7C-0.1 3.3 -0.1 2.7 0.3 2.3C0.7 1.9 1.3 1.9 1.7 2.3L4 4.6L8.3 0.3C8.7 -0.1 9.3 -0.1 9.7 0.3C10.1 0.7 10.1 1.3 9.7 1.7L4.7 6.7C4.5 6.9 4.3 7 4 7Z\"\n fill=\"currentColor\"\n />\n </svg>\n )}\n </span>\n {label && <span className=\"vchasno-ui-checkbox__label\">{label}</span>}\n </label>\n );\n },\n);\n\nCheckbox.displayName = 'Checkbox';\n\nexport default Checkbox;\n"],"names":["Checkbox","React","forwardRef","ref","className","label","partial","disabled","loading","dataQa","pulse","rest","data-qa","cn","input","type","hidden","span","Spinner","height","svg","width","viewBox","fill","xmlns","rect","rx","path","d","displayName"],"mappings":"oFAkBA,IAAMA,EAAWC,EAAMC,UAAU,CAC7B,SAA2EC,CAAAA,CAAAA,CAAAA,EAAxEC,IAAAA,EAAAA,EAAAA,SAAWC,CAAAA,EAAAA,EAAAA,KAAOC,CAAAA,EAAAA,EAAAA,OAASC,CAAAA,EAAAA,EAAAA,QAAUC,CAAAA,EAAAA,EAAAA,OAASC,CAAAA,EAAAA,EAAAA,MAAQC,CAAAA,EAAAA,EAAAA,KAAUC,CAAAA,EAAAA,sXAAAA,EAAAA,CAAhEP,YAAWC,QAAOC,UAASC,WAAUC,UAASC,SAAQC,UACrD,OACIT,EAACI,aAAAA,CAAAA,QAAAA,CACGO,UAASH,EACTL,UAAWS,EAAG,sBAAuBT,EAAW,CAC5C,YAAaI,EACb,aAAcD,CAClB,IAEAN,EAACa,aAAAA,CAAAA,QAAAA,iaAAAA,CAAMX,IAAKA,EAAKY,KAAK,WAAWC,OAAAA,CAAAA,EAAOT,SAAUA,CAAcI,EAAAA,IAChEV,EAACgB,aAAAA,CAAAA,OAAAA,CACGb,UAAWS,EAAG,2BAA4B,CACtC,6BAA8BH,GAAS,CAACH,CAC5C,EAECC,EAAAA,GAAWP,EAACiB,aAAAA,CAAAA,EAAAA,CAAQC,OAAO,KAC3Bb,GAAAA,EACGL,EAACmB,aAAAA,CAAAA,MAAAA,CACGhB,UAAU,2BACViB,MAAM,IACNF,OAAO,IACPG,QAAQ,UACRC,KAAK,OACLC,MAAM,8BAENvB,EAACwB,aAAAA,CAAAA,OAAAA,CAAKJ,MAAM,IAAIF,OAAO,IAAIO,GAAG,IAAIH,KAAK,kBAG3CtB,EAACmB,aAAAA,CAAAA,MAAAA,CACGhB,UAAU,2BACViB,MAAM,KACNF,OAAO,IACPG,QAAQ,WACRC,KAAK,OACLC,MAAM,8BAENvB,EAAC0B,aAAAA,CAAAA,OAAAA,CACGC,EAAE,oLACFL,KAAK,cAKpBlB,KAAAA,GAASJ,EAACgB,aAAAA,CAAAA,OAAAA,CAAKb,UAAU,4BAA8BC,EAAAA,GAGpE,EAGJL,CAAAA,EAAS6B,WAAW,CAAG"}
1
+ {"version":3,"file":"Checkbox.js","sources":["../../../src/components/Checkbox/Checkbox.tsx"],"sourcesContent":["import React, { type InputHTMLAttributes } from 'react';\n\nimport cn from 'classnames';\n\nimport Spinner from '../Spinner';\nimport type { DataQa, LoadingFeedback, WithPulseAnimation } from '../types';\n\nimport './Checkbox.global.css';\n\nexport interface CheckboxProps\n extends InputHTMLAttributes<HTMLInputElement>,\n Partial<LoadingFeedback & DataQa & WithPulseAnimation> {\n className?: string;\n label?: string;\n disabled?: boolean;\n partial?: boolean;\n}\n\nconst Checkbox = React.forwardRef<HTMLInputElement, CheckboxProps>(\n ({ className, label, partial, disabled, loading, dataQa, pulse, ...rest }, ref) => {\n return (\n <label\n data-qa={dataQa}\n className={cn('vchasno-ui-checkbox', className, {\n '--loading': loading,\n '--disabled': disabled,\n })}\n >\n <input ref={ref} type=\"checkbox\" hidden disabled={disabled} {...rest} />\n <span\n className={cn('vchasno-ui-checkbox__box', {\n 'vchasno-ui-pulse-animation': pulse && !disabled,\n })}\n >\n {loading && <Spinner height=\"90%\" />}\n {partial ? (\n <svg\n className=\"vchasno-ui-checkbox__svg\"\n width=\"8\"\n height=\"2\"\n viewBox=\"0 0 8 2\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <rect width=\"8\" height=\"2\" rx=\"1\" fill=\"currentColor\" />\n </svg>\n ) : (\n <svg\n className=\"vchasno-ui-checkbox__svg\"\n width=\"10\"\n height=\"7\"\n viewBox=\"0 0 10 7\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M4 7C3.8 7 3.5 6.9 3.3 6.7L0.3 3.7C-0.1 3.3 -0.1 2.7 0.3 2.3C0.7 1.9 1.3 1.9 1.7 2.3L4 4.6L8.3 0.3C8.7 -0.1 9.3 -0.1 9.7 0.3C10.1 0.7 10.1 1.3 9.7 1.7L4.7 6.7C4.5 6.9 4.3 7 4 7Z\"\n fill=\"currentColor\"\n />\n </svg>\n )}\n </span>\n {label && <span className=\"vchasno-ui-checkbox__label\">{label}</span>}\n </label>\n );\n },\n);\n\nCheckbox.displayName = 'Checkbox';\n\nexport default Checkbox;\n"],"names":["Checkbox","React","forwardRef","className","label","partial","disabled","loading","dataQa","pulse","rest","ref","data-qa","cn","input","type","hidden","span","Spinner","height","svg","width","viewBox","fill","xmlns","rect","rx","path","d","displayName"],"mappings":"oFAkBMA,IAAAA,EAAWC,EAAMC,UAAU,CAC7B,CAAC,CAAEC,UAAAA,CAAS,CAAEC,MAAAA,CAAK,CAAEC,QAAAA,CAAO,CAAEC,SAAAA,CAAQ,CAAEC,QAAAA,CAAO,CAAEC,OAAAA,CAAM,CAAEC,MAAAA,CAAK,CAAE,GAAGC,EAAM,CAAEC,IAEnEV,EAACG,aAAAA,CAAAA,QAAAA,CACGQ,UAASJ,EACTL,UAAWU,EAAG,sBAAuBV,EAAW,CAC5C,YAAaI,EACb,aAAcD,CAClB,IAEAL,EAACa,aAAAA,CAAAA,QAAAA,CAAMH,IAAKA,EAAKI,KAAK,WAAWC,OAAAA,CAAAA,EAAOV,SAAUA,EAAW,GAAGI,CAAAA,GAChET,EAACgB,aAAAA,CAAAA,OAAAA,CACGd,UAAWU,EAAG,2BAA4B,CACtC,6BAA8BJ,GAAS,CAACH,CAC5C,EAECC,EAAAA,GAAWN,EAACiB,aAAAA,CAAAA,EAAAA,CAAQC,OAAO,KAC3Bd,GAAAA,EACGJ,EAACmB,aAAAA,CAAAA,MAAAA,CACGjB,UAAU,2BACVkB,MAAM,IACNF,OAAO,IACPG,QAAQ,UACRC,KAAK,OACLC,MAAM,8BAENvB,EAACwB,aAAAA,CAAAA,OAAAA,CAAKJ,MAAM,IAAIF,OAAO,IAAIO,GAAG,IAAIH,KAAK,kBAG3CtB,EAACmB,aAAAA,CAAAA,MAAAA,CACGjB,UAAU,2BACVkB,MAAM,KACNF,OAAO,IACPG,QAAQ,WACRC,KAAK,OACLC,MAAM,8BAENvB,EAAC0B,aAAAA,CAAAA,OAAAA,CACGC,EAAE,oLACFL,KAAK,cAKpBnB,KAAAA,GAASH,EAACgB,aAAAA,CAAAA,OAAAA,CAAKd,UAAU,4BAA8BC,EAAAA,IAMxEJ,CAAAA,EAAS6B,WAAW,CAAG"}
@@ -1,2 +1,2 @@
1
- import e from"react";import t from"react-datepicker";import a from"react-text-mask";import r from"classnames";import{uk as o}from"date-fns/locale/uk";import n from"../../icons/clear.js";import l from"../InputMeta/InputMeta.js";import i from"../LabelText/LabelText.js";import c from"../Spinner/Spinner.js";var d=function(){return e.createElement("svg",{className:"vchasno-ui-date-picker__custom-calendar-icon",width:"20",height:"20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16 4h1c.6 0 1 .4 1 1v10c0 1.7-1.3 3-3 3H5c-1.7 0-3-1.3-3-3V5c0-.6.4-1 1-1h1V3c0-.6.4-1 1-1s1 .4 1 1v1h8V3c0-.6.4-1 1-1s1 .4 1 1v1zm-1 12c.6 0 1-.4 1-1V6H4v9c0 .6.4 1 1 1h10zM8 9a1 1 0 11-2 0 1 1 0 012 0zm2 1a1 1 0 100-2 1 1 0 000 2zm4-1a1 1 0 11-2 0 1 1 0 012 0zm-7 5a1 1 0 100-2 1 1 0 000 2zm4-1a1 1 0 11-2 0 1 1 0 012 0z",fill:"currentColor"}))},m=function(){return e.createElement("span",{className:"vchasno-ui-date-picker__custom-close-icon"},n)},s=["dd.MM.yyyy","dd-MM-yyyy","dd/MM/yyyy","dd.MM.yy","dd-MM-yy","dd/MM/yy"],p=[/\d/,/\d/,".",/\d/,/\d/,".",/\d/,/\d/,/\d/,/\d/],u=function(n){var u=n.label,y=n.disabled,f=n.required,v=n.loading,b=n.hint,h=n.error,w=n.dateFormat,M=n.className,k=n.timeCaption,g=n.dateFormatCalendar,E=n.enableTabLoop,O=n.locale,j=n.showMask,x=void 0!==j&&j,P=n.showPopperArrow,L=n.mask,C=n.dataQa,_=n.hideEmptyMeta,z=n.wide,N=n.pulse,F=function(e,t){if(null==e)return{};var a,r,o=function(e,t){if(null==e)return{};var a,r,o={},n=Object.keys(e);for(r=0;r<n.length;r++)a=n[r],t.indexOf(a)>=0||(o[a]=e[a]);return o}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(r=0;r<n.length;r++)a=n[r],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(o[a]=e[a])}return o}(n,["label","disabled","required","loading","hint","error","dateFormat","className","timeCaption","dateFormatCalendar","enableTabLoop","locale","showMask","showPopperArrow","mask","dataQa","hideEmptyMeta","wide","pulse"]),S=!!F.selected||!!F.value;return e.createElement("label",{onClick:function(e){return e.preventDefault()},"data-qa":C,className:r("vchasno-ui-date-picker",{"--loading":v,"--required":f,"--disabled":y,"--error":h,"--with-mask":x,"--wide":void 0!==z&&z,"--not-empty":S,"--is-label":!!u},M)},e.createElement("span",{className:r("vchasno-ui-date-picker__wrapper",{"vchasno-ui-pulse-animation":N&&!y})},u&&e.createElement(i,null,u),e.createElement(t,function(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{},r=Object.keys(a);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(a).filter(function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable}))),r.forEach(function(t){var r;r=a[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({enableTabLoop:void 0!==E&&E,locale:void 0===O?o:O,dateFormatCalendar:void 0===g?"LLLL, yyyy":g,timeCaption:void 0===k?"Час":k,disabled:y,placeholderText:" ",showPopperArrow:void 0!==P&&P,className:"vchasno-ui-date-picker__picker",dateFormat:void 0===w?s:w,customInput:x?e.createElement(a,{inputMode:"text",mask:void 0===L?p:L,showMask:!0}):void 0},F)),v?e.createElement(c,{height:"18px"}):e.createElement(d,null),e.createElement(m,null)),!(void 0!==_&&_)||h||b?e.createElement(l,{hint:b,error:h}):null)};export{u as default};
1
+ import e from"react";import a from"react-datepicker";import t from"react-text-mask";import r from"classnames";import{uk as l}from"date-fns/locale/uk";import c from"../../icons/clear.js";import o from"../InputMeta/InputMeta.js";import n from"../LabelText/LabelText.js";import m from"../Spinner/Spinner.js";let d=()=>e.createElement("svg",{className:"vchasno-ui-date-picker__custom-calendar-icon",width:"20",height:"20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16 4h1c.6 0 1 .4 1 1v10c0 1.7-1.3 3-3 3H5c-1.7 0-3-1.3-3-3V5c0-.6.4-1 1-1h1V3c0-.6.4-1 1-1s1 .4 1 1v1h8V3c0-.6.4-1 1-1s1 .4 1 1v1zm-1 12c.6 0 1-.4 1-1V6H4v9c0 .6.4 1 1 1h10zM8 9a1 1 0 11-2 0 1 1 0 012 0zm2 1a1 1 0 100-2 1 1 0 000 2zm4-1a1 1 0 11-2 0 1 1 0 012 0zm-7 5a1 1 0 100-2 1 1 0 000 2zm4-1a1 1 0 11-2 0 1 1 0 012 0z",fill:"currentColor"})),i=()=>e.createElement("span",{className:"vchasno-ui-date-picker__custom-close-icon"},c),s=["dd.MM.yyyy","dd-MM-yyyy","dd/MM/yyyy","dd.MM.yy","dd-MM-yy","dd/MM/yy"],p=[/\d/,/\d/,".",/\d/,/\d/,".",/\d/,/\d/,/\d/,/\d/],u=({label:c,disabled:u,required:y,loading:h,hint:M,error:v,dateFormat:f=s,className:k,timeCaption:E="Час",dateFormatCalendar:w="LLLL, yyyy",enableTabLoop:b=!1,locale:x=l,showMask:_=!1,showPopperArrow:z=!1,mask:L=p,dataQa:g,hideEmptyMeta:N=!1,wide:j=!1,pulse:C,...T})=>{let V=!!T.selected||!!T.value;return e.createElement("label",{onClick:e=>e.preventDefault(),"data-qa":g,className:r("vchasno-ui-date-picker",{"--loading":h,"--required":y,"--disabled":u,"--error":v,"--with-mask":_,"--wide":j,"--not-empty":V,"--is-label":!!c},k)},e.createElement("span",{className:r("vchasno-ui-date-picker__wrapper",{"vchasno-ui-pulse-animation":C&&!u})},c&&e.createElement(n,null,c),e.createElement(a,{enableTabLoop:b,locale:x,dateFormatCalendar:w,timeCaption:E,disabled:u,placeholderText:" ",showPopperArrow:z,className:"vchasno-ui-date-picker__picker",dateFormat:f,customInput:_?e.createElement(t,{inputMode:"text",mask:L,showMask:!0}):void 0,...T}),h?e.createElement(m,{height:"18px"}):e.createElement(d,null),e.createElement(i,null)),!N||v||M?e.createElement(o,{hint:M,error:v}):null)};export{u as default};
2
2
  //# sourceMappingURL=DatePicker.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DatePicker.js","sources":["../../../src/components/Datepicker/DatePicker.tsx"],"sourcesContent":["import React from 'react';\nimport type { ReactDatePickerProps } from 'react-datepicker';\nimport ReactDatePicker from 'react-datepicker';\nimport MaskedInput, { MaskedInputProps } from 'react-text-mask';\n\nimport cn from 'classnames';\nimport { uk } from 'date-fns/locale/uk';\n\nimport clearRawSvg from '../../icons/clear';\nimport InputMeta from '../InputMeta';\nimport LabelText from '../LabelText';\nimport Spinner from '../Spinner';\nimport {\n DataQa,\n ErrorFeedback,\n HideEmptyMeta,\n LoadingFeedback,\n WithHint,\n WithPulseAnimation,\n} from '../types';\n\nimport './DatePicker.global.css';\n\nconst SvgCalendar = () => (\n <svg\n className=\"vchasno-ui-date-picker__custom-calendar-icon\"\n width=\"20\"\n height=\"20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M16 4h1c.6 0 1 .4 1 1v10c0 1.7-1.3 3-3 3H5c-1.7 0-3-1.3-3-3V5c0-.6.4-1 1-1h1V3c0-.6.4-1 1-1s1 .4 1 1v1h8V3c0-.6.4-1 1-1s1 .4 1 1v1zm-1 12c.6 0 1-.4 1-1V6H4v9c0 .6.4 1 1 1h10zM8 9a1 1 0 11-2 0 1 1 0 012 0zm2 1a1 1 0 100-2 1 1 0 000 2zm4-1a1 1 0 11-2 0 1 1 0 012 0zm-7 5a1 1 0 100-2 1 1 0 000 2zm4-1a1 1 0 11-2 0 1 1 0 012 0z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n\n// Вставляємо на місце де має відображатися іконка закриття бібілотеки так як немає API для підміни іконки та її контролю\n// за допомогою :has(.react-datepicker__close-icon) та :has(.react-datepicker__close-icon:hover) контролюємо появу та зміну кольору іконки\nconst CloseSvg = () => (\n <span className=\"vchasno-ui-date-picker__custom-close-icon\">{clearRawSvg}</span>\n);\n\nconst DATE_FORMATS = ['dd.MM.yyyy', 'dd-MM-yyyy', 'dd/MM/yyyy', 'dd.MM.yy', 'dd-MM-yy', 'dd/MM/yy'];\n\nconst defaultMask: MaskedInputProps['mask'] = [\n /\\d/,\n /\\d/,\n '.',\n /\\d/,\n /\\d/,\n '.',\n /\\d/,\n /\\d/,\n /\\d/,\n /\\d/,\n];\n\nexport interface DatePickerProps\n extends ReactDatePickerProps,\n Partial<\n LoadingFeedback & WithHint & ErrorFeedback & DataQa & HideEmptyMeta & WithPulseAnimation\n > {\n label?: string;\n className?: string;\n showMask?: boolean;\n mask?: MaskedInputProps['mask'];\n onChange: ReactDatePickerProps['onChange'];\n isClearable?: ReactDatePickerProps['isClearable'];\n dateFormat?: ReactDatePickerProps['dateFormat'];\n dateFormatCalendar?: ReactDatePickerProps['dateFormatCalendar'];\n wide?: boolean;\n}\n\n/**\n * @see <https://reactdatepicker.com/>\n */\nconst DatePicker: React.FC<DatePickerProps> = ({\n label,\n disabled,\n required,\n loading,\n hint,\n error,\n dateFormat = DATE_FORMATS,\n className,\n timeCaption = 'Час',\n dateFormatCalendar = 'LLLL, yyyy',\n enableTabLoop = false,\n locale = uk,\n showMask = false,\n showPopperArrow = false,\n mask = defaultMask,\n dataQa,\n hideEmptyMeta = false,\n wide = false,\n pulse,\n ...rest\n}) => {\n const valueExists = !!rest.selected || !!rest.value;\n\n return (\n <label\n // issue with label wrapping react-datepicker dosn't close after selecting date\n // https://github.com/Hacker0x01/react-datepicker/issues/1012#issuecomment-344546012\n onClick={(e) => e.preventDefault()}\n data-qa={dataQa}\n className={cn(\n 'vchasno-ui-date-picker',\n {\n '--loading': loading,\n '--required': required,\n '--disabled': disabled,\n '--error': error,\n '--with-mask': showMask,\n '--wide': wide,\n '--not-empty': valueExists,\n '--is-label': !!label,\n },\n className,\n )}\n >\n <span\n className={cn('vchasno-ui-date-picker__wrapper', {\n 'vchasno-ui-pulse-animation': pulse && !disabled,\n })}\n >\n {label && <LabelText>{label}</LabelText>}\n <ReactDatePicker\n enableTabLoop={enableTabLoop}\n locale={locale}\n dateFormatCalendar={dateFormatCalendar}\n timeCaption={timeCaption}\n disabled={disabled}\n placeholderText=\" \"\n showPopperArrow={showPopperArrow}\n className=\"vchasno-ui-date-picker__picker\"\n dateFormat={dateFormat}\n customInput={\n showMask ? <MaskedInput inputMode=\"text\" mask={mask} showMask /> : undefined\n }\n {...rest}\n />\n {loading ? <Spinner height=\"18px\" /> : <SvgCalendar />}\n <CloseSvg />\n </span>\n {hideEmptyMeta && !error && !hint ? null : <InputMeta hint={hint} error={error} />}\n </label>\n );\n};\n\nexport default DatePicker;\n"],"names":["SvgCalendar","React","svg","className","width","height","fill","xmlns","path","fillRule","clipRule","d","CloseSvg","span","clearRawSvg","DATE_FORMATS","defaultMask","DatePicker","_param","label","disabled","required","loading","hint","error","dateFormat","timeCaption","_param_dateFormatCalendar","dateFormatCalendar","enableTabLoop","locale","showMask","showPopperArrow","mask","dataQa","hideEmptyMeta","wide","pulse","rest","valueExists","selected","value","onClick","e","preventDefault","data-qa","cn","createElement","LabelText","ReactDatePicker","uk","_param_timeCaption","undefined","placeholderText","customInput","MaskedInput","inputMode","Spinner","InputMeta"],"mappings":"iTAuBA,IAAMA,EAAc,kBAChBC,EAACC,aAAAA,CAAAA,MAAAA,CACGC,UAAU,+CACVC,MAAM,KACNC,OAAO,KACPC,KAAK,OACLC,MAAM,8BAENN,EAACO,aAAAA,CAAAA,OAAAA,CACGC,SAAS,UACTC,SAAS,UACTC,EAAE,sUACFL,KAAK,mBAOXM,EAAW,kBACbX,EAACY,aAAAA,CAAAA,OAAAA,CAAKV,UAAU,2CAA6CW,EAAAA,IAG3DC,EAAe,CAAC,aAAc,aAAc,aAAc,WAAY,WAAY,WAAW,CAE7FC,EAAwC,CAC1C,KACA,KACA,IACA,KACA,KACA,IACA,KACA,KACA,KACA,KACH,CAqBKC,EAAwC,SAAAC,CAAA,MAC1CC,EAAAA,EAAAA,KAAAA,CACAC,IAAAA,QACAC,CAAAA,EAAAA,EAAAA,SACAC,EAAAA,EAAAA,OAAAA,CACAC,IAAAA,IACAC,CAAAA,EAAAA,EAAAA,UACAC,UAAAA,CACAtB,EAAAA,EAAAA,SAAAA,CAAAA,EAAAA,EACAuB,YAAcC,EAAAT,EACdU,kBAAAA,CACAC,EAAAA,EAAAA,aAAAA,CACAC,EAAAA,EAAAA,MAAAA,CACAC,EAAAA,EAAAA,QAAAA,CAAAA,cACAC,EAAAA,EAAAA,EAAAA,eAAAA,CACAC,EAAAA,EAAAA,IAAAA,CACAC,EAAAA,EAAAA,WACAC,aAAAA,KACAC,IAAAA,CACAC,EAAAA,EAAAA,KACGC,CAAAA,EAAAA,sXAAAA,EAAAA,CAnBHnB,QACAC,WACAC,WACAC,UACAC,OACAC,QACAC,aACAtB,YACAuB,cACAE,qBACAC,gBACAC,SACAC,WACAC,kBACAC,OACAC,SACAC,gBACAC,OACAC,UAGME,EAAc,CAAC,CAACD,EAAKE,QAAQ,EAAI,CAAC,CAACF,EAAKG,KAAK,CAEnD,OACIxC,EAACkB,aAAAA,CAAAA,QAAAA,CAGGuB,QAAS,SAACC,CAAAA,EAAMA,OAAAA,EAAEC,cAAc,IAChCC,UAASX,EACT/B,UAAW2C,EACP,yBACA,CACI,YAAaxB,EACb,aAAcD,EACd,aAAcD,EACd,UAAWI,EACX,cAAeO,EACf,SApBhBK,AAAAA,KAAAA,IAAAA,GACAC,EAoBgB,cAAeE,EACf,aAAc,CAAC,CAACpB,GAEpBhB,IAGJF,EAACY,aAAAA,CAAAA,OAAAA,CACGV,UAAW2C,EAAG,kCAAmC,CAC7C,6BAA8BT,GAAS,CAACjB,CAC5C,IAECD,GAASlB,EAAA8C,aAAA,CAACC,EAAW7B,KAAAA,GACtBlB,EAACgD,aAAAA,CAAAA,EAAAA,iaAAAA,CACGpB,0BAxChBC,EAyCgBA,kBAzCPoB,EACTnB,EAyCgBH,mBA5ChBA,AAAAA,KAAAA,IAAAA,EAAqB,aACrBC,EA4CgBH,YA9CFyB,AAAAC,KAAAA,IAAAD,EAAA,MAAAA,EA+CE/B,SAAUA,EACViC,gBAAgB,IAChBrB,4BA3ChBC,EA4CgB9B,UAAU,iCACVsB,WArDhBA,AAAAA,KAAAA,IAAAA,EAAaV,IAsDGuC,YACIvB,EAAW9B,EAACsD,aAAAA,CAAAA,EAAAA,CAAYC,UAAU,OAAOvB,gBA/CtDjB,EACPkB,EA8CyEH,SAAAA,CAAAA,CAAcqB,GAAAA,KAAAA,CAEnEd,EAAAA,IAEPhB,EAAUrB,EAACwD,aAAAA,CAAAA,EAAAA,CAAQpD,OAAO,SAAYJ,EAACD,aAAAA,CAAAA,EAAAA,MACxCC,gBAACW,EAEJuB,OAAAA,CApDTA,CAAAA,AAAAA,KAAAA,IAAAA,OAoD2BX,GAAUD,EAActB,EAACyD,aAAAA,CAAAA,EAAAA,CAAUnC,KAAMA,EAAMC,MAAOA,IAArC,KAGhD"}
1
+ {"version":3,"file":"DatePicker.js","sources":["../../../src/components/Datepicker/DatePicker.tsx"],"sourcesContent":["import React from 'react';\nimport type { ReactDatePickerProps } from 'react-datepicker';\nimport ReactDatePicker from 'react-datepicker';\nimport MaskedInput, { type MaskedInputProps } from 'react-text-mask';\n\nimport cn from 'classnames';\nimport { uk } from 'date-fns/locale/uk';\n\nimport clearRawSvg from '../../icons/clear';\nimport InputMeta from '../InputMeta';\nimport LabelText from '../LabelText';\nimport Spinner from '../Spinner';\nimport type {\n DataQa,\n ErrorFeedback,\n HideEmptyMeta,\n LoadingFeedback,\n WithHint,\n WithPulseAnimation,\n} from '../types';\n\nimport './DatePicker.global.css';\n\nconst SvgCalendar = () => (\n <svg\n className=\"vchasno-ui-date-picker__custom-calendar-icon\"\n width=\"20\"\n height=\"20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M16 4h1c.6 0 1 .4 1 1v10c0 1.7-1.3 3-3 3H5c-1.7 0-3-1.3-3-3V5c0-.6.4-1 1-1h1V3c0-.6.4-1 1-1s1 .4 1 1v1h8V3c0-.6.4-1 1-1s1 .4 1 1v1zm-1 12c.6 0 1-.4 1-1V6H4v9c0 .6.4 1 1 1h10zM8 9a1 1 0 11-2 0 1 1 0 012 0zm2 1a1 1 0 100-2 1 1 0 000 2zm4-1a1 1 0 11-2 0 1 1 0 012 0zm-7 5a1 1 0 100-2 1 1 0 000 2zm4-1a1 1 0 11-2 0 1 1 0 012 0z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n\n// Вставляємо на місце де має відображатися іконка закриття бібілотеки так як немає API для підміни іконки та її контролю\n// за допомогою :has(.react-datepicker__close-icon) та :has(.react-datepicker__close-icon:hover) контролюємо появу та зміну кольору іконки\nconst CloseSvg = () => (\n <span className=\"vchasno-ui-date-picker__custom-close-icon\">{clearRawSvg}</span>\n);\n\nconst DATE_FORMATS = ['dd.MM.yyyy', 'dd-MM-yyyy', 'dd/MM/yyyy', 'dd.MM.yy', 'dd-MM-yy', 'dd/MM/yy'];\n\nconst defaultMask: MaskedInputProps['mask'] = [\n /\\d/,\n /\\d/,\n '.',\n /\\d/,\n /\\d/,\n '.',\n /\\d/,\n /\\d/,\n /\\d/,\n /\\d/,\n];\n\nexport interface DatePickerProps\n extends ReactDatePickerProps,\n Partial<\n LoadingFeedback & WithHint & ErrorFeedback & DataQa & HideEmptyMeta & WithPulseAnimation\n > {\n label?: string;\n className?: string;\n showMask?: boolean;\n mask?: MaskedInputProps['mask'];\n onChange: ReactDatePickerProps['onChange'];\n isClearable?: ReactDatePickerProps['isClearable'];\n dateFormat?: ReactDatePickerProps['dateFormat'];\n dateFormatCalendar?: ReactDatePickerProps['dateFormatCalendar'];\n wide?: boolean;\n}\n\n/**\n * @see <https://reactdatepicker.com/>\n */\nconst DatePicker: React.FC<DatePickerProps> = ({\n label,\n disabled,\n required,\n loading,\n hint,\n error,\n dateFormat = DATE_FORMATS,\n className,\n timeCaption = 'Час',\n dateFormatCalendar = 'LLLL, yyyy',\n enableTabLoop = false,\n locale = uk,\n showMask = false,\n showPopperArrow = false,\n mask = defaultMask,\n dataQa,\n hideEmptyMeta = false,\n wide = false,\n pulse,\n ...rest\n}) => {\n const valueExists = !!rest.selected || !!rest.value;\n\n return (\n <label\n // issue with label wrapping react-datepicker dosn't close after selecting date\n // https://github.com/Hacker0x01/react-datepicker/issues/1012#issuecomment-344546012\n onClick={(e) => e.preventDefault()}\n data-qa={dataQa}\n className={cn(\n 'vchasno-ui-date-picker',\n {\n '--loading': loading,\n '--required': required,\n '--disabled': disabled,\n '--error': error,\n '--with-mask': showMask,\n '--wide': wide,\n '--not-empty': valueExists,\n '--is-label': !!label,\n },\n className,\n )}\n >\n <span\n className={cn('vchasno-ui-date-picker__wrapper', {\n 'vchasno-ui-pulse-animation': pulse && !disabled,\n })}\n >\n {label && <LabelText>{label}</LabelText>}\n <ReactDatePicker\n enableTabLoop={enableTabLoop}\n locale={locale}\n dateFormatCalendar={dateFormatCalendar}\n timeCaption={timeCaption}\n disabled={disabled}\n placeholderText=\" \"\n showPopperArrow={showPopperArrow}\n className=\"vchasno-ui-date-picker__picker\"\n dateFormat={dateFormat}\n customInput={\n showMask ? <MaskedInput inputMode=\"text\" mask={mask} showMask /> : undefined\n }\n {...rest}\n />\n {loading ? <Spinner height=\"18px\" /> : <SvgCalendar />}\n <CloseSvg />\n </span>\n {hideEmptyMeta && !error && !hint ? null : <InputMeta hint={hint} error={error} />}\n </label>\n );\n};\n\nexport default DatePicker;\n"],"names":["SvgCalendar","React","svg","className","width","height","fill","xmlns","path","fillRule","clipRule","d","CloseSvg","span","clearRawSvg","DATE_FORMATS","defaultMask","DatePicker","label","disabled","required","loading","hint","error","dateFormat","timeCaption","dateFormatCalendar","enableTabLoop","locale","uk","showMask","showPopperArrow","mask","dataQa","hideEmptyMeta","wide","pulse","rest","valueExists","selected","value","onClick","e","preventDefault","data-qa","cn","createElement","LabelText","ReactDatePicker","placeholderText","customInput","MaskedInput","inputMode","undefined","Spinner","InputMeta"],"mappings":"iTAuBA,IAAMA,EAAc,IAChBC,EAACC,aAAAA,CAAAA,MAAAA,CACGC,UAAU,+CACVC,MAAM,KACNC,OAAO,KACPC,KAAK,OACLC,MAAM,8BAENN,EAACO,aAAAA,CAAAA,OAAAA,CACGC,SAAS,UACTC,SAAS,UACTC,EAAE,sUACFL,KAAK,kBAOXM,EAAW,IACbX,EAACY,aAAAA,CAAAA,OAAAA,CAAKV,UAAU,2CAA6CW,EAAAA,GAG3DC,EAAe,CAAC,aAAc,aAAc,aAAc,WAAY,WAAY,WAAW,CAE7FC,EAAwC,CAC1C,KACA,KACA,IACA,KACA,KACA,IACA,KACA,KACA,KACA,KACH,CAqBKC,EAAwC,CAAC,CAC3CC,MAAAA,CAAK,CACLC,SAAAA,CAAQ,CACRC,SAAAA,CAAQ,CACRC,QAAAA,CAAO,CACPC,KAAAA,CAAI,CACJC,MAAAA,CAAK,CACLC,WAAAA,EAAaT,CAAY,CACzBZ,UAAAA,CAAS,CACTsB,YAAAA,EAAc,KAAK,CACnBC,mBAAAA,EAAqB,YAAY,CACjCC,cAAAA,EAAgB,CAAA,CAAK,CACrBC,OAAAA,EAASC,CAAE,CACXC,SAAAA,EAAW,CAAA,CAAK,CAChBC,gBAAAA,EAAkB,CAAA,CAAK,CACvBC,KAAAA,EAAOhB,CAAW,CAClBiB,OAAAA,CAAM,CACNC,cAAAA,EAAgB,CAAA,CAAK,CACrBC,KAAAA,EAAO,CAAA,CAAK,CACZC,MAAAA,CAAK,CACL,GAAGC,EACN,IACG,IAAMC,EAAc,CAAC,CAACD,EAAKE,QAAQ,EAAI,CAAC,CAACF,EAAKG,KAAK,CAEnD,OACIvC,EAACiB,aAAAA,CAAAA,QAAAA,CAGGuB,QAAS,AAACC,GAAMA,EAAEC,cAAc,GAChCC,UAASX,EACT9B,UAAW0C,EACP,yBACA,CACI,YAAaxB,EACb,aAAcD,EACd,aAAcD,EACd,UAAWI,EACX,cAAeO,EACf,SAAUK,EACV,cAAeG,EACf,aAAc,CAAC,CAACpB,GAEpBf,IAGJF,EAACY,aAAAA,CAAAA,OAAAA,CACGV,UAAW0C,EAAG,kCAAmC,CAC7C,6BAA8BT,GAAS,CAACjB,CAC5C,IAECD,GAASjB,EAAA6C,aAAA,CAACC,EAAW7B,KAAAA,GACtBjB,EAAC+C,aAAAA,CAAAA,EAAAA,CACGrB,cAAeA,EACfC,OAAQA,EACRF,mBAAoBA,EACpBD,YAAaA,EACbN,SAAUA,EACV8B,gBAAgB,IAChBlB,gBAAiBA,EACjB5B,UAAU,iCACVqB,WAAYA,EACZ0B,YACIpB,EAAW7B,EAACkD,aAAAA,CAAAA,EAAAA,CAAYC,UAAU,OAAOpB,KAAMA,EAAMF,SAAAA,CAAAA,CAAcuB,GAAAA,KAAAA,EAEtE,GAAGhB,CAAAA,AAEPhB,GAAAA,EAAUpB,EAACqD,aAAAA,CAAAA,EAAAA,CAAQjD,OAAO,SAAYJ,EAACD,aAAAA,CAAAA,EAAAA,MACxCC,gBAACW,EAEJsB,OAAAA,CAAAA,GAAkBX,GAAUD,EAAcrB,EAACsD,aAAAA,CAAAA,EAAAA,CAAUjC,KAAMA,EAAMC,MAAOA,IAArC,KAGhD"}
@@ -1,2 +1,2 @@
1
- import e from"react";import r from"classnames";function t(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},n=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.forEach(function(r){var n;n=t[r],r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n})}return e}var n=e.forwardRef(function(n,o){var a,i,c=n.className,l=n.tagName,f=n.children,s=n.direction,p=n.gap,y=n.wrap,u=n.align,b=n.justify,O=n.grow,g=n.shrink,m=n.style,j=n.dataQa,d=function(e,r){if(null==e)return{};var t,n,o=function(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],r.indexOf(t)>=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}(n,["className","tagName","children","direction","gap","wrap","align","justify","grow","shrink","style","dataQa"]);return e.createElement(void 0===l?"div":l,t({ref:o,className:r("vchasno-ui-flex-box",c),"data-qa":j,style:(a=t({},void 0===m?{}:m),i=i={flexDirection:s,gap:p,flexWrap:y,justifyContent:b,alignItems:u,alignContent:u,flexGrow:O,flexShrink:g},Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(i)):(function(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(i)).forEach(function(e){Object.defineProperty(a,e,Object.getOwnPropertyDescriptor(i,e))}),a)},d),f)});n.displayName="FlexBox";export{n as default};
1
+ import e from"react";import a from"classnames";let t=e.forwardRef(({className:t,tagName:l="div",children:o,direction:r,gap:f,wrap:i,align:n,justify:s,grow:x,shrink:m,style:c={},dataQa:d,...p},u)=>e.createElement(l,{ref:u,className:a("vchasno-ui-flex-box",t),"data-qa":d,style:{...c,flexDirection:r,gap:f,flexWrap:i,justifyContent:s,alignItems:n,alignContent:n,flexGrow:x,flexShrink:m},...p},o));t.displayName="FlexBox";export{t as default};
2
2
  //# sourceMappingURL=FlexBox.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FlexBox.js","sources":["../../../src/components/FlexBox/FlexBox.tsx"],"sourcesContent":["import React, { HTMLAttributes } from 'react';\n\nimport cn from 'classnames';\n\nimport { DataQa } from '../types';\n\nimport './FlexBox.css';\n\nexport interface FlexBoxProps extends HTMLAttributes<HTMLElement>, DataQa {\n className?: string;\n tagName?: keyof HTMLElementTagNameMap;\n direction?: React.CSSProperties['flexDirection'];\n gap?: number;\n grow?: React.CSSProperties['flexGrow'];\n shrink?: React.CSSProperties['flexShrink'];\n wrap?: React.CSSProperties['flexWrap'];\n align?: React.CSSProperties['alignItems'];\n justify?: React.CSSProperties['justifyContent'];\n}\n\nconst FlexBox = React.forwardRef<HTMLElement, FlexBoxProps>(\n (\n {\n className,\n tagName = 'div',\n children,\n direction,\n gap,\n wrap,\n align,\n justify,\n grow,\n shrink,\n style = {},\n dataQa,\n ...rest\n },\n ref,\n ) => {\n return React.createElement(\n tagName,\n {\n ref,\n className: cn('vchasno-ui-flex-box', className),\n 'data-qa': dataQa,\n style: {\n ...style,\n flexDirection: direction,\n gap,\n flexWrap: wrap,\n justifyContent: justify,\n alignItems: align,\n alignContent: align,\n flexGrow: grow,\n flexShrink: shrink,\n },\n ...rest,\n },\n children,\n );\n },\n);\n\nFlexBox.displayName = 'FlexBox';\n\nexport default FlexBox;\n"],"names":["FlexBox","React","forwardRef","ref","className","tagName","children","direction","gap","wrap","align","justify","grow","shrink","style","dataQa","rest","createElement","_object_spread","cn","_param_style","undefined","flexDirection","flexWrap","justifyContent","alignItems","alignContent","flexGrow","flexShrink","displayName"],"mappings":"idAoBA,IAAMA,EAAUC,EAAMC,UAAU,CAC5B,SAgBIC,CAAAA,CAAAA,CAAAA,UAdIC,EAAAA,EAAAA,SAAAA,CAAAA,EAAAA,EACAC,OAAAA,CACAC,EAAAA,EAAAA,SACAC,EAAAA,EAAAA,SAAAA,CACAC,EAAAA,EAAAA,GAAAA,CACAC,EAAAA,EAAAA,IAAAA,CACAC,IAAAA,KACAC,CAAAA,EAAAA,EAAAA,OACAC,CAAAA,EAAAA,EAAAA,IACAC,CAAAA,EAAAA,EAAAA,MACAC,CAAAA,EAAAA,EAAAA,KAAAA,CACAC,EAAAA,EAAAA,MACGC,CAAAA,EAAAA,sXAAAA,EAAAA,CAZHZ,YACAC,UACAC,WACAC,YACAC,MACAC,OACAC,QACAC,UACAC,OACAC,SACAC,QACAC,WAKJ,OAAOd,EAAMgB,aAAa,CAftBZ,AAAAA,KAAAA,IAAAA,EAAU,MACVC,EAgBAY,EAAA,CACIf,IAAAA,EACAC,UAAWe,EAAG,sBAAuBf,GACrC,UAAWW,EACXD,KAAAA,IACOA,EAAAA,CAAAA,EAbHM,AAAAC,KAAAA,IAAAD,EAAA,CACRL,EAAAA,OAYWD,CACHQ,cAAef,EACfC,IAAAA,EACAe,SAAUd,EACVe,eAAgBb,EAChBc,WAAYf,EACZgB,aAAchB,EACdiB,SAAUf,EACVgB,WAAYf,gVAEbG,GAEPV,EAER,EAGJN,CAAAA,EAAQ6B,WAAW,CAAG"}
1
+ {"version":3,"file":"FlexBox.js","sources":["../../../src/components/FlexBox/FlexBox.tsx"],"sourcesContent":["import React, { type HTMLAttributes } from 'react';\n\nimport cn from 'classnames';\n\nimport type { DataQa } from '../types';\n\nimport './FlexBox.css';\n\nexport interface FlexBoxProps extends HTMLAttributes<HTMLElement>, DataQa {\n className?: string;\n tagName?: keyof HTMLElementTagNameMap;\n direction?: React.CSSProperties['flexDirection'];\n gap?: number;\n grow?: React.CSSProperties['flexGrow'];\n shrink?: React.CSSProperties['flexShrink'];\n wrap?: React.CSSProperties['flexWrap'];\n align?: React.CSSProperties['alignItems'];\n justify?: React.CSSProperties['justifyContent'];\n}\n\nconst FlexBox = React.forwardRef<HTMLElement, FlexBoxProps>(\n (\n {\n className,\n tagName = 'div',\n children,\n direction,\n gap,\n wrap,\n align,\n justify,\n grow,\n shrink,\n style = {},\n dataQa,\n ...rest\n },\n ref,\n ) => {\n return React.createElement(\n tagName,\n {\n ref,\n className: cn('vchasno-ui-flex-box', className),\n 'data-qa': dataQa,\n style: {\n ...style,\n flexDirection: direction,\n gap,\n flexWrap: wrap,\n justifyContent: justify,\n alignItems: align,\n alignContent: align,\n flexGrow: grow,\n flexShrink: shrink,\n },\n ...rest,\n },\n children,\n );\n },\n);\n\nFlexBox.displayName = 'FlexBox';\n\nexport default FlexBox;\n"],"names":["FlexBox","React","forwardRef","className","tagName","children","direction","gap","wrap","align","justify","grow","shrink","style","dataQa","rest","ref","createElement","cn","flexDirection","flexWrap","justifyContent","alignItems","alignContent","flexGrow","flexShrink","displayName"],"mappings":"+CAoBA,IAAMA,EAAUC,EAAMC,UAAU,CAC5B,CACI,CACIC,UAAAA,CAAS,CACTC,QAAAA,EAAU,KAAK,CACfC,SAAAA,CAAQ,CACRC,UAAAA,CAAS,CACTC,IAAAA,CAAG,CACHC,KAAAA,CAAI,CACJC,MAAAA,CAAK,CACLC,QAAAA,CAAO,CACPC,KAAAA,CAAI,CACJC,OAAAA,CAAM,CACNC,MAAAA,EAAQ,CAAE,CAAA,CACVC,OAAAA,CAAM,CACN,GAAGC,EACN,CACDC,IAEOf,EAAMgB,aAAa,CACtBb,EACA,CACIY,IAAAA,EACAb,UAAWe,EAAG,sBAAuBf,GACrC,UAAWW,EACXD,MAAO,CACH,GAAGA,CAAK,CACRM,cAAeb,EACfC,IAAAA,EACAa,SAAUZ,EACVa,eAAgBX,EAChBY,WAAYb,EACZc,aAAcd,EACde,SAAUb,EACVc,WAAYb,CAChB,EACA,GAAGG,CAAAA,AAEPV,EAAAA,GAKZL,CAAAA,EAAQ0B,WAAW,CAAG"}
@@ -1,2 +1,2 @@
1
- import e from"react";import o from"../FlexBox/FlexBox.js";import t from"../Text/Text.js";import{config as r}from"./config.js";import i from"./images/fb.png.js";import a from"./images/instagram.png.js";import l from"./images/telegram.png.js";import n from"./images/tiktok.png.js";import m from"./images/youtube.png.js";var s=["inst","fb","tiktok","youtube","telegram"],c={fb:i,inst:a,telegram:l,youtube:m,tiktok:n},p=function(i){var a=i.product,l=void 0===a?"edo":a,n=i.label,m=i.hideTitle,p=i.onClick,u=i.gap,f=i.list,g=(void 0===f?s:f).filter(function(e){var o;return null===(o=r[l])||void 0===o?void 0:o[e]});return 0===g.length?null:e.createElement(o,{className:"vchasno-ui-FollowUs",direction:"column",gap:12},!(void 0!==m&&m)&&e.createElement(t,{type:"secondary",className:"vchasno-ui-FollowUs__label"},void 0===n?"Слідкуйте за нами":n),e.createElement(o,{gap:void 0===u?12:u,wrap:"wrap"},g.map(function(o){return e.createElement("a",{className:"vchasno-ui-FollowUs__link",key:o,href:r[l][o],target:"_blank",rel:"noreferrer",onClick:function(){return null==p?void 0:p(o)}},e.createElement("img",{src:c[o],alt:o}))})))};export{p as default};
1
+ import e from"react";import t from"../FlexBox/FlexBox.js";import o from"../Text/Text.js";import{config as r}from"./config.js";import a from"./images/fb.png.js";import m from"./images/instagram.png.js";import l from"./images/telegram.png.js";import s from"./images/tiktok.png.js";import i from"./images/youtube.png.js";let n=["inst","fb","tiktok","youtube","telegram"],p={fb:a,inst:m,telegram:l,youtube:i,tiktok:s},g=({product:a="edo",label:m="Слідкуйте за нами",hideTitle:l=!1,onClick:s,gap:i=12,list:g=n})=>{let c=g.filter(e=>r[a]?.[e]);return 0===c.length?null:e.createElement(t,{className:"vchasno-ui-FollowUs",direction:"column",gap:12},!l&&e.createElement(o,{type:"secondary",className:"vchasno-ui-FollowUs__label"},m),e.createElement(t,{gap:i,wrap:"wrap"},c.map(t=>e.createElement("a",{className:"vchasno-ui-FollowUs__link",key:t,href:r[a][t],target:"_blank",rel:"noreferrer",onClick:()=>s?.(t)},e.createElement("img",{src:p[t],alt:t})))))};export{g as default};
2
2
  //# sourceMappingURL=FollowUs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FollowUs.js","sources":["../../../src/components/FollowUs/FollowUs.tsx"],"sourcesContent":["import React from 'react';\n\nimport FlexBox from '../FlexBox';\nimport Text from '../Text';\nimport { Product, config } from './config';\nimport { Social } from './types';\n\nimport fb from './images/fb.png';\nimport inst from './images/instagram.png';\nimport telegram from './images/telegram.png';\nimport tiktok from './images/tiktok.png';\nimport youtube from './images/youtube.png';\n\nimport './FollowUs.global.css';\n\nexport interface FollowUsProps {\n label?: string;\n product?: Product;\n hideTitle?: boolean;\n onClick?: (target: Social) => void;\n gap?: number;\n list?: Social[];\n}\n\nconst allSocials: Social[] = ['inst', 'fb', 'tiktok', 'youtube', 'telegram'] as const;\n\nconst imgMap: Record<Social, string> = {\n fb,\n inst,\n telegram,\n youtube,\n tiktok,\n};\n\nconst FollowUs: React.FC<FollowUsProps> = ({\n product = 'edo',\n label = 'Слідкуйте за нами',\n hideTitle = false,\n onClick,\n gap = 12,\n list = allSocials,\n}) => {\n const socials = list.filter((social) => config[product]?.[social]);\n\n if (socials.length === 0) {\n return null;\n }\n\n return (\n <FlexBox className=\"vchasno-ui-FollowUs\" direction=\"column\" gap={12}>\n {!hideTitle && (\n <Text type=\"secondary\" className=\"vchasno-ui-FollowUs__label\">\n {label}\n </Text>\n )}\n <FlexBox gap={gap} wrap=\"wrap\">\n {socials.map((social) => {\n return (\n <a\n className=\"vchasno-ui-FollowUs__link\"\n key={social}\n href={config[product][social]}\n target=\"_blank\"\n rel=\"noreferrer\"\n onClick={() => onClick?.(social)}\n >\n <img src={imgMap[social]} alt={social} />\n </a>\n );\n })}\n </FlexBox>\n </FlexBox>\n );\n};\n\nexport default FollowUs;\n"],"names":["allSocials","imgMap","fb","inst","telegram","youtube","tiktok","FollowUs","param","product","_param_product","undefined","_param_label","label","hideTitle","onClick","gap","_param_list","list","socials","filter","social","config","length","React","FlexBox","className","direction","Text","type","_param_gap","wrap","map","a","key","href","target","rel","img","src","alt"],"mappings":"8TAwBA,IAAMA,EAAuB,CAAC,OAAQ,KAAM,SAAU,UAAW,WAAW,CAEtEC,EAAiC,CACnCC,GAAAA,EACAC,KAAAA,EACAC,SAAAA,EACAC,QAAAA,EACAC,OAAAA,CACJ,EAEMC,EAAoC,SAAAC,CAAA,EACtCC,IAAAA,EAAAA,EAAAA,OAAAA,CAAAA,EAAUC,AAAAC,KAAAA,IAAAD,EAAA,MAAAA,EAAAE,EAAAJ,EACVK,KAAAA,KACAC,SAAAA,CACAC,EAAAA,EAAAA,OACAC,CAAAA,EAAAA,EAAAA,GAAAA,CAAMC,EAAAT,EACNU,KAEMC,EAAUD,AAFTlB,CAAAA,AAAAA,KAAAA,IAAAA,EAAAA,EAAAA,CAAAA,EAEcoB,MAAM,CAAC,SAACC,CAAAA,EAAWC,IAAAA,EAAAA,OAAAA,OAAAA,CAAAA,EAAAA,CAAM,CAACb,EAAQ,AAARA,GAAPa,AAAAA,KAAAA,IAAAA,EAAAA,KAAAA,EAAAA,CAAiB,CAACD,EAAO,UAEjE,AAAIF,AAAmB,IAAnBA,EAAQI,MAAM,CACP,KAIPC,EAACC,aAAAA,CAAAA,EAAAA,CAAQC,UAAU,sBAAsBC,UAAU,SAASX,IAAK,EAC5D,EAAA,CAbTF,CAAAA,AAAAA,KAAAA,IAAAA,GACAC,IAaYS,EAACI,aAAAA,CAAAA,EAAAA,CAAKC,KAAK,YAAYH,UAAU,4BAC5Bb,EAhBjBA,AAAAA,KAAAA,IAAAA,EAAQ,uBAmBAW,EAACC,aAAAA,CAAAA,EAAAA,CAAQT,IAhBXc,AAAAnB,KAAAA,IAAAmB,EAAA,GAAAA,EAgBqBC,KAAK,QACnBZ,EAAQa,GAAG,CAAC,SAACX,CAAAA,EACV,OACIG,EAACS,aAAAA,CAAAA,IAAAA,CACGP,UAAU,4BACVQ,IAAKb,EACLc,KAAMb,CAAM,CAACb,EAAQ,CAACY,EAAO,CAC7Be,OAAO,SACPC,IAAI,aACJtB,QAAS,WAAMA,OAAAA,MAAAA,SAAAA,EAAUM,KAEzBG,EAACc,aAAAA,CAAAA,MAAAA,CAAIC,IAAKtC,CAAM,CAACoB,EAAO,CAAEmB,IAAKnB,IAG3C,IAIhB"}
1
+ {"version":3,"file":"FollowUs.js","sources":["../../../src/components/FollowUs/FollowUs.tsx"],"sourcesContent":["import React from 'react';\n\nimport FlexBox from '../FlexBox';\nimport Text from '../Text';\nimport { type Product, config } from './config';\nimport type { Social } from './types';\n\nimport fb from './images/fb.png';\nimport inst from './images/instagram.png';\nimport telegram from './images/telegram.png';\nimport tiktok from './images/tiktok.png';\nimport youtube from './images/youtube.png';\n\nimport './FollowUs.global.css';\n\nexport interface FollowUsProps {\n label?: string;\n product?: Product;\n hideTitle?: boolean;\n onClick?: (target: Social) => void;\n gap?: number;\n list?: Social[];\n}\n\nconst allSocials: Social[] = ['inst', 'fb', 'tiktok', 'youtube', 'telegram'] as const;\n\nconst imgMap: Record<Social, string> = {\n fb,\n inst,\n telegram,\n youtube,\n tiktok,\n};\n\nconst FollowUs: React.FC<FollowUsProps> = ({\n product = 'edo',\n label = 'Слідкуйте за нами',\n hideTitle = false,\n onClick,\n gap = 12,\n list = allSocials,\n}) => {\n const socials = list.filter((social) => config[product]?.[social]);\n\n if (socials.length === 0) {\n return null;\n }\n\n return (\n <FlexBox className=\"vchasno-ui-FollowUs\" direction=\"column\" gap={12}>\n {!hideTitle && (\n <Text type=\"secondary\" className=\"vchasno-ui-FollowUs__label\">\n {label}\n </Text>\n )}\n <FlexBox gap={gap} wrap=\"wrap\">\n {socials.map((social) => {\n return (\n <a\n className=\"vchasno-ui-FollowUs__link\"\n key={social}\n href={config[product][social]}\n target=\"_blank\"\n rel=\"noreferrer\"\n onClick={() => onClick?.(social)}\n >\n <img src={imgMap[social]} alt={social} />\n </a>\n );\n })}\n </FlexBox>\n </FlexBox>\n );\n};\n\nexport default FollowUs;\n"],"names":["allSocials","imgMap","fb","inst","telegram","youtube","tiktok","FollowUs","product","label","hideTitle","onClick","gap","list","socials","filter","social","config","length","React","FlexBox","className","direction","Text","type","wrap","map","a","key","href","target","rel","img","src","alt"],"mappings":"8TAwBA,IAAMA,EAAuB,CAAC,OAAQ,KAAM,SAAU,UAAW,WAAW,CAEtEC,EAAiC,CACnCC,GAAAA,EACAC,KAAAA,EACAC,SAAAA,EACAC,QAAAA,EACAC,OAAAA,CACJ,EAEMC,EAAoC,CAAC,CACvCC,QAAAA,EAAU,KAAK,CACfC,MAAAA,EAAQ,mBAAmB,CAC3BC,UAAAA,EAAY,CAAA,CAAK,CACjBC,QAAAA,CAAO,CACPC,IAAAA,EAAM,EAAE,CACRC,KAAAA,EAAOb,CAAU,CACpB,IACG,IAAMc,EAAUD,EAAKE,MAAM,CAAC,AAACC,GAAWC,CAAM,CAACT,EAAQ,EAAGQ,CAAAA,EAAO,SAEjE,AAAIF,AAAmB,IAAnBA,EAAQI,MAAM,CACP,KAIPC,EAACC,aAAAA,CAAAA,EAAAA,CAAQC,UAAU,sBAAsBC,UAAU,SAASV,IAAK,EAC5D,EAAA,CAACF,GACES,EAACI,aAAAA,CAAAA,EAAAA,CAAKC,KAAK,YAAYH,UAAU,4BAC5BZ,EAAAA,GAGTU,EAACC,aAAAA,CAAAA,EAAAA,CAAQR,IAAKA,EAAKa,KAAK,QACnBX,EAAQY,GAAG,CAAC,AAACV,GAENG,EAACQ,aAAAA,CAAAA,IAAAA,CACGN,UAAU,4BACVO,IAAKZ,EACLa,KAAMZ,CAAM,CAACT,EAAQ,CAACQ,EAAO,CAC7Bc,OAAO,SACPC,IAAI,aACJpB,QAAS,IAAMA,IAAUK,IAEzBG,EAACa,aAAAA,CAAAA,MAAAA,CAAIC,IAAKhC,CAAM,CAACe,EAAO,CAAEkB,IAAKlB,OAO3D"}
@@ -1,2 +1,2 @@
1
- var t={edo:{fb:"https://www.facebook.com/vchasno.service",telegram:"https://t.me/vchasnoservice",youtube:"https://www.youtube.com/channel/UCE0jekYQINP_h5uHRpugwxw",inst:"https://www.instagram.com/vchasno.service/"},kasa:{inst:"https://www.instagram.com/vchasno.service",tiktok:"https://www.tiktok.com/@vchasno.kasa",fb:"https://www.facebook.com/vchasno.service",youtube:"https://www.youtube.com/channel/UCE0jekYQINP_h5uHRpugwxw"}};export{t as config};
1
+ let t={edo:{fb:"https://www.facebook.com/vchasno.service",telegram:"https://t.me/vchasnoservice",youtube:"https://www.youtube.com/channel/UCE0jekYQINP_h5uHRpugwxw",inst:"https://www.instagram.com/vchasno.service/"},kasa:{inst:"https://www.instagram.com/vchasno.service",tiktok:"https://www.tiktok.com/@vchasno.kasa",fb:"https://www.facebook.com/vchasno.service",youtube:"https://www.youtube.com/channel/UCE0jekYQINP_h5uHRpugwxw"}};export{t as config};
2
2
  //# sourceMappingURL=config.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sources":["../../../src/components/FollowUs/config.ts"],"sourcesContent":["import { VchasnoProduct } from '../types';\nimport { Social } from './types';\n\nexport type Product = Exclude<VchasnoProduct, 'edi' | 'ttn' | 'dm' | 'kep' | 'hrs' | 'zvit'>;\n\nexport const config: Record<Product, Partial<Record<Social, string>>> = {\n edo: {\n fb: 'https://www.facebook.com/vchasno.service',\n telegram: 'https://t.me/vchasnoservice',\n youtube: 'https://www.youtube.com/channel/UCE0jekYQINP_h5uHRpugwxw',\n inst: 'https://www.instagram.com/vchasno.service/',\n },\n kasa: {\n inst: 'https://www.instagram.com/vchasno.service',\n tiktok: 'https://www.tiktok.com/@vchasno.kasa',\n fb: 'https://www.facebook.com/vchasno.service',\n youtube: 'https://www.youtube.com/channel/UCE0jekYQINP_h5uHRpugwxw',\n },\n};\n"],"names":["config","edo","fb","telegram","youtube","inst","kasa","tiktok"],"mappings":"IAKaA,EAA2D,CACpEC,IAAK,CACDC,GAAI,2CACJC,SAAU,8BACVC,QAAS,2DACTC,KAAM,4CACV,EACAC,KAAM,CACFD,KAAM,4CACNE,OAAQ,uCACRL,GAAI,2CACJE,QAAS,0DACb,CACJ"}
1
+ {"version":3,"file":"config.js","sources":["../../../src/components/FollowUs/config.ts"],"sourcesContent":["import type { VchasnoProduct } from '../types';\nimport type { Social } from './types';\n\nexport type Product = Exclude<VchasnoProduct, 'edi' | 'ttn' | 'dm' | 'kep' | 'hrs' | 'zvit'>;\n\nexport const config: Record<Product, Partial<Record<Social, string>>> = {\n edo: {\n fb: 'https://www.facebook.com/vchasno.service',\n telegram: 'https://t.me/vchasnoservice',\n youtube: 'https://www.youtube.com/channel/UCE0jekYQINP_h5uHRpugwxw',\n inst: 'https://www.instagram.com/vchasno.service/',\n },\n kasa: {\n inst: 'https://www.instagram.com/vchasno.service',\n tiktok: 'https://www.tiktok.com/@vchasno.kasa',\n fb: 'https://www.facebook.com/vchasno.service',\n youtube: 'https://www.youtube.com/channel/UCE0jekYQINP_h5uHRpugwxw',\n },\n};\n"],"names":["config","edo","fb","telegram","youtube","inst","kasa","tiktok"],"mappings":"IAKaA,EAA2D,CACpEC,IAAK,CACDC,GAAI,2CACJC,SAAU,8BACVC,QAAS,2DACTC,KAAM,4CACV,EACAC,KAAM,CACFD,KAAM,4CACNE,OAAQ,uCACRL,GAAI,2CACJE,QAAS,0DACb,CACJ"}