@itcase/ui 1.8.123 → 1.8.125

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 (246) hide show
  1. package/dist/Avatar_cjs_AwXEUY8j.js +161 -0
  2. package/dist/Avatar_es_BtlaCRc5.js +157 -0
  3. package/dist/{Button_cjs_Ce97psFT.js → Button_cjs_C34BU1BK.js} +46 -34
  4. package/dist/{Button_es_CZss7cXh.js → Button_es_DnlzLBUT.js} +46 -34
  5. package/dist/ChipsGroup_cjs_DfAKN5CA.js +344 -0
  6. package/dist/{ChipsGroup_es_ayPPUwQ7.js → ChipsGroup_es_DBKY2UyF.js} +48 -35
  7. package/dist/DatePicker_cjs_DfbeIL2m.js +182 -0
  8. package/dist/DatePicker_es_BIJNx427.js +178 -0
  9. package/dist/Divider_cjs_DrmV2ezS.js +105 -0
  10. package/dist/Divider_es_BiYozVBS.js +101 -0
  11. package/dist/DropdownItem_cjs_vHuzXW9M.js +211 -0
  12. package/dist/DropdownItem_es_DVHWWgnU.js +206 -0
  13. package/dist/Group_cjs_DmfeUcFI.js +59 -0
  14. package/dist/Group_es_BU5k8f5S.js +55 -0
  15. package/dist/{Icon_cjs_Cz6IyOkb.js → Icon_cjs_BVLGzj7Y.js} +170 -157
  16. package/dist/{Icon_es_BrwLifge.js → Icon_es_DkVkzTha.js} +170 -157
  17. package/dist/Image_cjs_BUM81t4Y.js +28 -0
  18. package/dist/Image_es_C-IjVkKX.js +26 -0
  19. package/dist/{Input_cjs_DRPK_RHK.js → Input_cjs_DDi5JVAV.js} +27 -19
  20. package/dist/{Input_es_Cv5nEb_n.js → Input_es_BnCXATnh.js} +27 -19
  21. package/dist/{Label_cjs_DMoaOoHi.js → Label_cjs_DwAmukik.js} +45 -33
  22. package/dist/{Label_es_SULlg9bL.js → Label_es_B2kcstsG.js} +45 -33
  23. package/dist/{Link_cjs_C5UsZUiF.js → Link_cjs_qKXVfU8e.js} +43 -30
  24. package/dist/{Link_es_XiqbdwLp.js → Link_es_P2b6ya7P.js} +43 -30
  25. package/dist/Loader_cjs_DIDsIq3J.js +143 -0
  26. package/dist/Loader_es_CmSggwbR.js +139 -0
  27. package/dist/Overlay_cjs_tGA2fU43.js +42 -0
  28. package/dist/Overlay_es_BS7OTFoy.js +38 -0
  29. package/dist/{Scrollbar_cjs_DcKOfcNp.js → Scrollbar_cjs_Cp-7v2Mt.js} +1 -1
  30. package/dist/{Scrollbar_es_CThJeCLF.js → Scrollbar_es_CcMgNvGi.js} +1 -1
  31. package/dist/Text_cjs_BDTjOTVB.js +69 -0
  32. package/dist/Text_es_CnymlElo.js +65 -0
  33. package/dist/cjs/components/Accordion.js +37 -34
  34. package/dist/cjs/components/Avatar.js +5 -6
  35. package/dist/cjs/components/AvatarStack/stories/__mock__.js +1 -1
  36. package/dist/cjs/components/AvatarStack.js +17 -16
  37. package/dist/cjs/components/Badge.js +3 -4
  38. package/dist/cjs/components/Breadcrumbs/stories/__mock__.js +1 -1
  39. package/dist/cjs/components/Breadcrumbs.js +27 -23
  40. package/dist/cjs/components/Button.js +5 -6
  41. package/dist/cjs/components/Cell/stories/__mock__.js +1 -1
  42. package/dist/cjs/components/Cell.js +28 -25
  43. package/dist/cjs/components/Checkbox.js +33 -26
  44. package/dist/cjs/components/Checkmark.js +28 -23
  45. package/dist/cjs/components/Chips/stories/__mock__.js +1 -1
  46. package/dist/cjs/components/Chips.js +4 -5
  47. package/dist/cjs/components/Choice/stories/__mock__.js +2 -2
  48. package/dist/cjs/components/Choice.js +46 -40
  49. package/dist/cjs/components/Code.js +34 -26
  50. package/dist/cjs/components/CookiesWarning.js +23 -23
  51. package/dist/cjs/components/Dadata.js +14 -9
  52. package/dist/cjs/components/DatePeriod.js +32 -30
  53. package/dist/cjs/components/DatePicker.js +8 -9
  54. package/dist/cjs/components/Divider.js +1 -2
  55. package/dist/cjs/components/Dot.js +5 -6
  56. package/dist/cjs/components/Drawer.js +23 -21
  57. package/dist/cjs/components/Dropdown/stories/__mock__.js +6 -6
  58. package/dist/cjs/components/Dropdown.js +5 -6
  59. package/dist/cjs/components/Flex.js +11 -12
  60. package/dist/cjs/components/Grid.js +15 -16
  61. package/dist/cjs/components/Group.js +1 -2
  62. package/dist/cjs/components/HTMLContent.js +5 -6
  63. package/dist/cjs/components/HeroTitle.js +17 -16
  64. package/dist/cjs/components/Icon.js +3 -4
  65. package/dist/cjs/components/Image.js +1 -2
  66. package/dist/cjs/components/Input.js +1 -2
  67. package/dist/cjs/components/InputPassword.js +34 -26
  68. package/dist/cjs/components/Label.js +4 -5
  69. package/dist/cjs/components/Link.js +1 -2
  70. package/dist/cjs/components/List.js +39 -28
  71. package/dist/cjs/components/Loader.js +2 -3
  72. package/dist/cjs/components/Logo.js +10 -11
  73. package/dist/cjs/components/MenuItem.js +36 -33
  74. package/dist/cjs/components/Modal.js +40 -38
  75. package/dist/cjs/components/ModalSheetBottom.js +17 -18
  76. package/dist/cjs/components/Notification/stories/__mock__.js +1 -1
  77. package/dist/cjs/components/Notification.js +31 -24
  78. package/dist/cjs/components/Overlay.js +1 -2
  79. package/dist/cjs/components/Pagination.js +43 -41
  80. package/dist/cjs/components/Radio.js +34 -26
  81. package/dist/cjs/components/RangeSlider.js +8 -9
  82. package/dist/cjs/components/Response/img.js +1 -1
  83. package/dist/cjs/components/Response.js +45 -34
  84. package/dist/cjs/components/SVGContent.js +6 -7
  85. package/dist/cjs/components/ScrollOnDrag/stories/__mock__.js +2 -2
  86. package/dist/cjs/components/ScrollOnDrag.js +7 -8
  87. package/dist/cjs/components/ScrollToView.js +8 -9
  88. package/dist/cjs/components/Scrollbar/stories/__mock__.js +1 -1
  89. package/dist/cjs/components/Scrollbar.js +1 -1
  90. package/dist/cjs/components/Search.js +39 -31
  91. package/dist/cjs/components/Segmented/stories/__mock__.js +23 -10
  92. package/dist/cjs/components/Segmented.js +46 -41
  93. package/dist/cjs/components/Select.js +118 -113
  94. package/dist/cjs/components/Swiper/stories/__mock__.js +3 -3
  95. package/dist/cjs/components/Swiper.js +27 -29
  96. package/dist/cjs/components/Switch.js +33 -26
  97. package/dist/cjs/components/Tab/stories/__mock__.js +1 -1
  98. package/dist/cjs/components/Tab.js +33 -29
  99. package/dist/cjs/components/Text.js +1 -2
  100. package/dist/cjs/components/Textarea.js +26 -18
  101. package/dist/cjs/components/Tile.js +21 -17
  102. package/dist/cjs/components/Title.js +3 -4
  103. package/dist/cjs/components/Tooltip.js +3 -4
  104. package/dist/cjs/components/Video/stories/__mocks__.js +1 -1
  105. package/dist/cjs/components/Video.js +3 -4
  106. package/dist/cjs/components/Warning.js +26 -20
  107. package/dist/cjs/context/Notifications.js +38 -42
  108. package/dist/cjs/context/UIContext.js +19 -17
  109. package/dist/cjs/context/UrlAssetPrefix.js +3 -3
  110. package/dist/cjs/hoc/urlWithAssetPrefix.js +13 -16
  111. package/dist/cjs/hooks/useActiveClasses/useActiveClasses.helpers.js +13 -40
  112. package/dist/cjs/hooks/useActiveClasses/useActiveClasses.interface.js +1 -1
  113. package/dist/cjs/hooks/useActiveClasses/useActiveClasses.js +25 -29
  114. package/dist/cjs/hooks/useAppearanceConfig/useAppearanceConfig.js +13 -15
  115. package/dist/cjs/hooks/useAppearanceConfig.js +0 -1
  116. package/dist/cjs/hooks/useDevicePropsGenerator/useDevicePropsGenerator.js +21 -28
  117. package/dist/cjs/hooks/useDevicePropsGenerator.js +0 -1
  118. package/dist/cjs/hooks/useDeviceTargetClass.js +0 -1
  119. package/dist/cjs/hooks/useStyles/styleAttributes.js +1 -1
  120. package/dist/cjs/hooks/useStyles/useStyles.js +0 -1
  121. package/dist/cjs/hooks/useStyles.js +0 -1
  122. package/dist/cjs/hooks/useViewportFix.js +5 -5
  123. package/dist/cjs/hooks.js +1 -1
  124. package/dist/cjs/utils/setViewportProperty.js +3 -3
  125. package/dist/components/Accordion.js +37 -34
  126. package/dist/components/Avatar.js +5 -6
  127. package/dist/components/AvatarStack/stories/__mock__.js +1 -1
  128. package/dist/components/AvatarStack.js +17 -16
  129. package/dist/components/Badge.js +3 -4
  130. package/dist/components/Breadcrumbs/stories/__mock__.js +1 -1
  131. package/dist/components/Breadcrumbs.js +27 -23
  132. package/dist/components/Button.js +5 -6
  133. package/dist/components/Cell/stories/__mock__.js +1 -1
  134. package/dist/components/Cell.js +28 -25
  135. package/dist/components/Checkbox.js +33 -26
  136. package/dist/components/Checkmark.js +28 -23
  137. package/dist/components/Chips/stories/__mock__.js +1 -1
  138. package/dist/components/Chips.js +4 -5
  139. package/dist/components/Choice/stories/__mock__.js +2 -2
  140. package/dist/components/Choice.js +46 -40
  141. package/dist/components/Code.js +34 -26
  142. package/dist/components/CookiesWarning.js +23 -23
  143. package/dist/components/Dadata.js +14 -9
  144. package/dist/components/DatePeriod.js +32 -30
  145. package/dist/components/DatePicker.js +8 -9
  146. package/dist/components/Divider.js +1 -2
  147. package/dist/components/Dot.js +5 -6
  148. package/dist/components/Drawer.js +23 -21
  149. package/dist/components/Dropdown/stories/__mock__.js +6 -6
  150. package/dist/components/Dropdown.js +5 -6
  151. package/dist/components/Flex.js +11 -12
  152. package/dist/components/Grid.js +15 -16
  153. package/dist/components/Group.js +1 -2
  154. package/dist/components/HTMLContent.js +5 -6
  155. package/dist/components/HeroTitle.js +17 -16
  156. package/dist/components/Icon.js +3 -4
  157. package/dist/components/Image.js +1 -2
  158. package/dist/components/Input.js +1 -2
  159. package/dist/components/InputPassword.js +34 -26
  160. package/dist/components/Label.js +4 -5
  161. package/dist/components/Link.js +1 -2
  162. package/dist/components/List.js +39 -28
  163. package/dist/components/Loader.js +2 -3
  164. package/dist/components/Logo.js +10 -11
  165. package/dist/components/MenuItem.js +36 -33
  166. package/dist/components/Modal.js +40 -38
  167. package/dist/components/ModalSheetBottom.js +17 -18
  168. package/dist/components/Notification/stories/__mock__.js +1 -1
  169. package/dist/components/Notification.js +31 -24
  170. package/dist/components/Overlay.js +1 -2
  171. package/dist/components/Pagination.js +43 -41
  172. package/dist/components/Radio.js +34 -26
  173. package/dist/components/RangeSlider.js +8 -9
  174. package/dist/components/Response/img.js +1 -1
  175. package/dist/components/Response.js +45 -34
  176. package/dist/components/SVGContent.js +6 -7
  177. package/dist/components/ScrollOnDrag/stories/__mock__.js +2 -2
  178. package/dist/components/ScrollOnDrag.js +7 -8
  179. package/dist/components/ScrollToView.js +8 -9
  180. package/dist/components/Scrollbar/stories/__mock__.js +1 -1
  181. package/dist/components/Scrollbar.js +1 -1
  182. package/dist/components/Search.js +39 -31
  183. package/dist/components/Segmented/stories/__mock__.js +23 -10
  184. package/dist/components/Segmented.js +46 -41
  185. package/dist/components/Select.js +118 -113
  186. package/dist/components/Swiper/stories/__mock__.js +3 -3
  187. package/dist/components/Swiper.js +27 -29
  188. package/dist/components/Switch.js +33 -26
  189. package/dist/components/Tab/stories/__mock__.js +1 -1
  190. package/dist/components/Tab.js +33 -29
  191. package/dist/components/Text.js +1 -2
  192. package/dist/components/Textarea.js +26 -18
  193. package/dist/components/Tile.js +21 -17
  194. package/dist/components/Title.js +3 -4
  195. package/dist/components/Tooltip.js +3 -4
  196. package/dist/components/Video/stories/__mocks__.js +1 -1
  197. package/dist/components/Video.js +3 -4
  198. package/dist/components/Warning.js +26 -20
  199. package/dist/context/Notifications.js +38 -42
  200. package/dist/context/UIContext.js +19 -17
  201. package/dist/context/UrlAssetPrefix.js +3 -3
  202. package/dist/css/components/Tile/Tile.css +3 -3
  203. package/dist/hoc/urlWithAssetPrefix.js +13 -16
  204. package/dist/hooks/useActiveClasses/useActiveClasses.helpers.js +13 -40
  205. package/dist/hooks/useActiveClasses/useActiveClasses.interface.js +1 -1
  206. package/dist/hooks/useActiveClasses/useActiveClasses.js +25 -29
  207. package/dist/hooks/useAppearanceConfig/useAppearanceConfig.js +13 -15
  208. package/dist/hooks/useAppearanceConfig.js +0 -1
  209. package/dist/hooks/useDevicePropsGenerator/useDevicePropsGenerator.js +21 -28
  210. package/dist/hooks/useDevicePropsGenerator.js +0 -1
  211. package/dist/hooks/useDeviceTargetClass.js +0 -1
  212. package/dist/hooks/useStyles/styleAttributes.js +1 -1
  213. package/dist/hooks/useStyles/useStyles.js +0 -1
  214. package/dist/hooks/useStyles.js +0 -1
  215. package/dist/hooks/useViewportFix.js +5 -5
  216. package/dist/hooks.js +1 -1
  217. package/dist/types/components/Button/Button.appearance.d.ts +232 -232
  218. package/dist/types/components/Button/Button.d.ts +4 -4
  219. package/dist/types/components/Button/Button.interface.d.ts +5 -5
  220. package/dist/types/components/Pagination/Pagination.d.ts +1 -1
  221. package/dist/types/components/Select/SelectContainer.d.ts +1 -1
  222. package/dist/types/components/Text/Text.appearance.d.ts +58 -58
  223. package/dist/types/components/Text/Text.interface.d.ts +1 -1
  224. package/dist/utils/setViewportProperty.js +3 -3
  225. package/package.json +3 -3
  226. package/dist/Avatar_cjs_CLJnKU39.js +0 -157
  227. package/dist/Avatar_es_BgN-fbOj.js +0 -153
  228. package/dist/ChipsGroup_cjs_C8L3ZeD_.js +0 -331
  229. package/dist/DatePicker_cjs_BzEtDAb8.js +0 -183
  230. package/dist/DatePicker_es_DRyCMO0I.js +0 -179
  231. package/dist/Divider_cjs_DUYtmwn2.js +0 -97
  232. package/dist/Divider_es_CCLBFIx6.js +0 -93
  233. package/dist/DropdownItem_cjs_Bhss6lyM.js +0 -207
  234. package/dist/DropdownItem_es_BXl6lPJx.js +0 -202
  235. package/dist/Group_cjs_CsJ6ICKK.js +0 -59
  236. package/dist/Group_es_DRqIIM9m.js +0 -55
  237. package/dist/Image_cjs_DRhhc66R.js +0 -29
  238. package/dist/Image_es_BpMidmve.js +0 -27
  239. package/dist/Loader_cjs_D3lnxPlI.js +0 -132
  240. package/dist/Loader_es_BUSqFrCd.js +0 -128
  241. package/dist/Overlay_cjs_CcfJYN5o.js +0 -41
  242. package/dist/Overlay_es_DF3DAdxS.js +0 -37
  243. package/dist/Text_cjs_0EINiUq4.js +0 -68
  244. package/dist/Text_es_CwV9rjFD.js +0 -64
  245. package/dist/tslib.es6_cjs_CCZ3TN_7.js +0 -59
  246. package/dist/tslib.es6_es_Bwu1Cn-t.js +0 -56
@@ -1,183 +0,0 @@
1
- 'use strict';
2
-
3
- var tslib_es6 = require('./tslib.es6_cjs_CCZ3TN_7.js');
4
- var jsxRuntime = require('react/jsx-runtime');
5
- var React = require('react');
6
- var clsx = require('clsx');
7
- var locale = require('date-fns/locale');
8
- var DatePicker = require('react-datepicker');
9
- var useAppearanceConfig = require('./cjs/hooks/useAppearanceConfig/useAppearanceConfig.js');
10
- var useDevicePropsGenerator = require('./cjs/hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
11
- var useStyles = require('./cjs/hooks/useStyles/useStyles.js');
12
- var Button = require('./Button_cjs_Ce97psFT.js');
13
- var Icon = require('./Icon_cjs_Cz6IyOkb.js');
14
- var Input = require('./Input_cjs_DRPK_RHK.js');
15
- var Label = require('./Label_cjs_DMoaOoHi.js');
16
- var Text = require('./Text_cjs_0EINiUq4.js');
17
- var _default = require('@itcase/icons/default');
18
-
19
- var datePickerSize = {
20
- sizeL: {
21
- size: 'l',
22
- daySize: 'xs',
23
- dayTextSize: 'm',
24
- iconFillSize: 24,
25
- iconLeft: _default.icons14.Arrow.ChevronLeft,
26
- iconRight: _default.icons14.Arrow.ChevronRight,
27
- },
28
- sizeM: {
29
- size: 'm',
30
- daySize: 'xxl',
31
- dayTextSize: 'm',
32
- iconFillSize: 24,
33
- iconLeft: _default.icons14.Arrow.ChevronLeft,
34
- iconRight: _default.icons14.Arrow.ChevronRight,
35
- iconSize: 14,
36
- monthTextSize: 'm',
37
- yearTextSize: 'm',
38
- },
39
- sizeS: {
40
- size: 's',
41
- daySize: 'xs',
42
- dayTextSize: 'm',
43
- iconFillSize: 24,
44
- iconLeft: _default.icons14.Arrow.ChevronLeft,
45
- iconRight: _default.icons14.Arrow.ChevronRight,
46
- },
47
- };
48
-
49
- var datePickerStyle = {
50
- solid: {
51
- inputProps: {
52
- borderColor: 'none',
53
- },
54
- },
55
- outlined: {
56
- inputProps: {
57
- fill: 'none',
58
- },
59
- },
60
- full: {},
61
- ghost: {
62
- inputProps: {
63
- fill: 'none',
64
- borderColor: 'none',
65
- },
66
- },
67
- };
68
-
69
- var datePickerAppearanceSurface = {
70
- surfacePrimary: {
71
- dayTextColor: 'surfaceTextPrimary',
72
- dayTextShape: 'rounded',
73
- iconFillHover: 'surfaceSecondary',
74
- iconItemFill: 'surfaceItemPrimary',
75
- iconShape: 'circular',
76
- monthTextColor: 'surfaceTextPrimary',
77
- monthTextWeight: 400,
78
- placeholderTextColor: 'surfaceTextPrimary',
79
- yearTextColor: 'surfaceTextPrimary',
80
- yearTextWeight: 400,
81
- },
82
- };
83
-
84
- var datePickerAppearance = tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign({}, datePickerAppearanceSurface), datePickerSize), datePickerStyle);
85
-
86
- var datePickerConfig = {
87
- appearance: datePickerAppearance,
88
- setAppearance: function (appearanceConfig) {
89
- datePickerConfig.appearance = appearanceConfig;
90
- },
91
- };
92
- function DatePickerInput(props) {
93
- var className = props.className, _a = props.datePickerProps, datePickerProps = _a === void 0 ? {} : _a, endValue = props.endValue, _b = props.inputProps, inputProps = _b === void 0 ? {} : _b, value = props.value, onChange = props.onChange;
94
- var datepickerRef = React.useRef(null);
95
- var customTimeInput = datePickerProps.customTimeInput, disablePastDays = datePickerProps.disablePastDays, monthsShown = datePickerProps.monthsShown, selectsRange = datePickerProps.selectsRange;
96
- var appearanceConfig = useAppearanceConfig.useAppearanceConfig(datePickerProps.appearance, datePickerConfig);
97
- var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(datePickerProps, appearanceConfig);
98
- var daySize = propsGenerator.daySize, dayTextColor = propsGenerator.dayTextColor, dayTextShape = propsGenerator.dayTextShape, dayTextSize = propsGenerator.dayTextSize, iconFill = propsGenerator.iconFill, iconFillHover = propsGenerator.iconFillHover, iconFillSize = propsGenerator.iconFillSize, iconItemFill = propsGenerator.iconItemFill, iconLeft = propsGenerator.iconLeft, iconRight = propsGenerator.iconRight, iconShape = propsGenerator.iconShape, monthTextColor = propsGenerator.monthTextColor, monthTextSize = propsGenerator.monthTextSize, monthTextWeight = propsGenerator.monthTextWeight, popper = propsGenerator.popper, popperPlacement = propsGenerator.popperPlacement, sizeClass = propsGenerator.sizeClass, widthClass = propsGenerator.widthClass, yearTextColor = propsGenerator.yearTextColor, yearTextSize = propsGenerator.yearTextSize, yearTextWeight = propsGenerator.yearTextWeight, isClearable = propsGenerator.isClearable;
99
- var _c = React.useMemo(function () {
100
- var dateStart;
101
- if (value) {
102
- if (typeof value === 'string') {
103
- dateStart = new Date(value);
104
- }
105
- else {
106
- dateStart = value;
107
- }
108
- }
109
- else {
110
- dateStart = undefined;
111
- }
112
- var dateEnd;
113
- if (endValue) {
114
- if (typeof endValue === 'string') {
115
- dateEnd = new Date(endValue);
116
- }
117
- else {
118
- dateEnd = endValue;
119
- }
120
- }
121
- else {
122
- dateEnd = undefined;
123
- }
124
- return [dateStart, dateEnd];
125
- }, [value, endValue]), dateStart = _c[0], dateEnd = _c[1];
126
- var handleChange = React.useCallback(function (valuesList) {
127
- var newDateStart = valuesList[0], newDateEnd = valuesList[1];
128
- onChange(newDateStart, newDateEnd);
129
- }, [onChange]);
130
- var renderDayContents = React.useCallback(function (day, date) {
131
- return (jsxRuntime.jsx(Button.Button, { className: "react-datepicker__day-button", size: daySize, label: date.getDate().toString(), labelTextColor: dayTextColor, labelTextSize: dayTextSize, shape: dayTextShape }));
132
- }, [daySize, dayTextColor, dayTextShape, dayTextSize]);
133
- var renderCustomHeader = React.useCallback(function (_a) {
134
- var decreaseMonth = _a.decreaseMonth, increaseMonth = _a.increaseMonth, monthDate = _a.monthDate;
135
- return (jsxRuntime.jsxs("div", { className: "react-datepicker__header--div", children: [iconLeft && (jsxRuntime.jsx(Icon.Icon, { className: "react-datepicker__icon", fill: iconFill, fillHover: iconFillHover, fillSize: iconFillSize, iconFill: iconItemFill, shape: iconShape, SvgImage: iconLeft, onClick: decreaseMonth })), jsxRuntime.jsxs("div", { className: "react-datepicker__data", children: [jsxRuntime.jsx(Text.Text, { className: "react-datepicker__month", size: monthTextSize, textColor: monthTextColor, textWeight: monthTextWeight, children: monthDate.toLocaleString('ru-RU', { month: 'long' }) }), jsxRuntime.jsx(Text.Text, { className: "react-datepicker__year", size: yearTextSize, textColor: yearTextColor, textWeight: yearTextWeight, children: monthDate.toLocaleString('ru-RU', { year: 'numeric' }) })] }), iconRight && (jsxRuntime.jsx(Icon.Icon, { className: "react-datepicker__icon", fill: iconFill, fillHover: iconFillHover, fillSize: iconFillSize, iconFill: iconItemFill, shape: iconShape, SvgImage: iconRight, onClick: increaseMonth }))] }));
136
- }, [
137
- iconFill,
138
- iconFillHover,
139
- iconFillSize,
140
- iconItemFill,
141
- iconLeft,
142
- iconRight,
143
- iconShape,
144
- monthTextColor,
145
- monthTextSize,
146
- monthTextWeight,
147
- yearTextColor,
148
- yearTextSize,
149
- yearTextWeight,
150
- ]);
151
- var datePickerStyles = useStyles.useStyles(props).styles;
152
- return (jsxRuntime.jsx("div", { className: clsx(className, 'datepicker', monthsShown && 'datepicker_multiple-months', customTimeInput && 'datepicker_button', sizeClass && "datepicker_size_".concat(sizeClass), widthClass && "datepicker_width_".concat(widthClass)), style: datePickerStyles, children: jsxRuntime.jsx(DatePicker, tslib_es6.__assign({ minDate: disablePastDays ? new Date() : undefined, customInput: jsxRuntime.jsx(DatePickerCustomInput, { datepickerRef: datepickerRef, inputProps: inputProps, isClearable: isClearable }), endDate: selectsRange ? dateEnd : undefined, locale: locale.ru, popperClassName: popper && "react-datepicker-popper-".concat(popper), popperPlacement: popperPlacement, ref: datepickerRef, renderCustomHeader: renderCustomHeader, renderDayContents: renderDayContents, selected: dateStart, startDate: dateStart, onChange: selectsRange ? handleChange : onChange }, datePickerProps, {
153
- // Important for use custom clear button
154
- isClearable: false })) }));
155
- }
156
- var DatePickerCustomInput = React.forwardRef(function (props, ref) {
157
- var inputIcon = props.inputIcon, inputProps = props.inputProps, value = props.value, isClearable = props.isClearable;
158
- var multipleValue = React.useMemo(function () {
159
- if (value) {
160
- var twoDates = value.split(' - ');
161
- return twoDates[0] === twoDates[1] ? twoDates[0] : value;
162
- }
163
- return '';
164
- }, [value]);
165
- return (jsxRuntime.jsxs(React.Fragment, { children: [jsxRuntime.jsx(Input.Input, tslib_es6.__assign({}, props, inputProps, { className: clsx(inputProps.className, 'datepicker__input'), autocomplete: "off", ref: ref, value: multipleValue })), inputIcon && jsxRuntime.jsx(DatePickerInputIcon, tslib_es6.__assign({}, inputProps)), isClearable && jsxRuntime.jsx(DatePickerClearButton, tslib_es6.__assign({}, inputProps))] }));
166
- });
167
- function DatePickerClearButton(props) {
168
- var clearIcon = props.clearIcon, clearIconFill = props.clearIconFill, clearIconFillHover = props.clearIconFillHover, clearIconFillSize = props.clearIconFillSize, clearIconItemFill = props.clearIconItemFill, clearIconItemFillHover = props.clearIconItemFillHover, clearIconShape = props.clearIconShape, clearIconSize = props.clearIconSize, clearIconSrc = props.clearIconSrc, clearLabel = props.clearLabel, clearLabelTextColor = props.clearLabelTextColor, clearLabelTextColorHover = props.clearLabelTextColorHover, clearLabelTextSize = props.clearLabelTextSize, datepickerRef = props.datepickerRef;
169
- var onClick = React.useCallback(function (event) {
170
- var _a, _b;
171
- (_a = datepickerRef === null || datepickerRef === void 0 ? void 0 : datepickerRef.current) === null || _a === void 0 ? void 0 : _a.onClearClick(event);
172
- (_b = datepickerRef === null || datepickerRef === void 0 ? void 0 : datepickerRef.current) === null || _b === void 0 ? void 0 : _b.handleFocus(event);
173
- }, []);
174
- return (jsxRuntime.jsx(React.Fragment, { children: clearLabel ? (jsxRuntime.jsx(Label.Label, { className: clsx('react-datepicker__clear-label', 'cursor_type_pointer'), label: clearLabel, labelTextColor: clearLabelTextColor, labelTextColorHover: clearLabelTextColorHover, labelTextSize: clearLabelTextSize, onClick: onClick })) : ((clearIcon || clearIconSrc) && (jsxRuntime.jsx(Icon.Icon, { className: clsx('react-datepicker__clear-icon', 'cursor_type_pointer'), size: clearIconSize, fill: clearIconFill, fillHover: clearIconFillHover, fillSize: clearIconFillSize, iconFill: clearIconItemFill, iconFillHover: clearIconItemFillHover, imageSrc: clearIconSrc, shape: clearIconShape, SvgImage: clearIcon, onClick: onClick }))) }));
175
- }
176
- function DatePickerInputIcon(props) {
177
- var inputIcon = props.inputIcon, inputIconFill = props.inputIconFill, inputIconFillHover = props.inputIconFillHover, inputIconFillSize = props.inputIconFillSize, inputIconItemFill = props.inputIconItemFill, inputIconShape = props.inputIconShape, inputIconSize = props.inputIconSize, inputIconSrc = props.inputIconSrc, onClick = props.onClick;
178
- return (jsxRuntime.jsx(Icon.Icon, { className: clsx('react-datepicker__input-icon', 'cursor_type_pointer'), size: inputIconSize, fill: inputIconFill, fillHover: inputIconFillHover, fillSize: inputIconFillSize, iconFill: inputIconItemFill, imageSrc: inputIconSrc, shape: inputIconShape, SvgImage: inputIcon, onClick: function () { return onClick && onClick(); } }));
179
- }
180
-
181
- exports.DatePickerInput = DatePickerInput;
182
- exports.datePickerAppearance = datePickerAppearance;
183
- exports.datePickerConfig = datePickerConfig;
@@ -1,179 +0,0 @@
1
- import { _ as __assign } from './tslib.es6_es_Bwu1Cn-t.js';
2
- import { jsxs, jsx } from 'react/jsx-runtime';
3
- import React, { useMemo, useCallback, useRef } from 'react';
4
- import clsx from 'clsx';
5
- import { ru } from 'date-fns/locale';
6
- import DatePicker from 'react-datepicker';
7
- import { useAppearanceConfig } from './hooks/useAppearanceConfig/useAppearanceConfig.js';
8
- import { useDevicePropsGenerator } from './hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
9
- import { useStyles } from './hooks/useStyles/useStyles.js';
10
- import { B as Button } from './Button_es_CZss7cXh.js';
11
- import { I as Icon } from './Icon_es_BrwLifge.js';
12
- import { I as Input } from './Input_es_Cv5nEb_n.js';
13
- import { L as Label } from './Label_es_SULlg9bL.js';
14
- import { T as Text } from './Text_es_CwV9rjFD.js';
15
- import { icons14 } from '@itcase/icons/default';
16
-
17
- var datePickerSize = {
18
- sizeL: {
19
- size: 'l',
20
- daySize: 'xs',
21
- dayTextSize: 'm',
22
- iconFillSize: 24,
23
- iconLeft: icons14.Arrow.ChevronLeft,
24
- iconRight: icons14.Arrow.ChevronRight,
25
- },
26
- sizeM: {
27
- size: 'm',
28
- daySize: 'xxl',
29
- dayTextSize: 'm',
30
- iconFillSize: 24,
31
- iconLeft: icons14.Arrow.ChevronLeft,
32
- iconRight: icons14.Arrow.ChevronRight,
33
- iconSize: 14,
34
- monthTextSize: 'm',
35
- yearTextSize: 'm',
36
- },
37
- sizeS: {
38
- size: 's',
39
- daySize: 'xs',
40
- dayTextSize: 'm',
41
- iconFillSize: 24,
42
- iconLeft: icons14.Arrow.ChevronLeft,
43
- iconRight: icons14.Arrow.ChevronRight,
44
- },
45
- };
46
-
47
- var datePickerStyle = {
48
- solid: {
49
- inputProps: {
50
- borderColor: 'none',
51
- },
52
- },
53
- outlined: {
54
- inputProps: {
55
- fill: 'none',
56
- },
57
- },
58
- full: {},
59
- ghost: {
60
- inputProps: {
61
- fill: 'none',
62
- borderColor: 'none',
63
- },
64
- },
65
- };
66
-
67
- var datePickerAppearanceSurface = {
68
- surfacePrimary: {
69
- dayTextColor: 'surfaceTextPrimary',
70
- dayTextShape: 'rounded',
71
- iconFillHover: 'surfaceSecondary',
72
- iconItemFill: 'surfaceItemPrimary',
73
- iconShape: 'circular',
74
- monthTextColor: 'surfaceTextPrimary',
75
- monthTextWeight: 400,
76
- placeholderTextColor: 'surfaceTextPrimary',
77
- yearTextColor: 'surfaceTextPrimary',
78
- yearTextWeight: 400,
79
- },
80
- };
81
-
82
- var datePickerAppearance = __assign(__assign(__assign({}, datePickerAppearanceSurface), datePickerSize), datePickerStyle);
83
-
84
- var datePickerConfig = {
85
- appearance: datePickerAppearance,
86
- setAppearance: function (appearanceConfig) {
87
- datePickerConfig.appearance = appearanceConfig;
88
- },
89
- };
90
- function DatePickerInput(props) {
91
- var className = props.className, _a = props.datePickerProps, datePickerProps = _a === void 0 ? {} : _a, endValue = props.endValue, _b = props.inputProps, inputProps = _b === void 0 ? {} : _b, value = props.value, onChange = props.onChange;
92
- var datepickerRef = useRef(null);
93
- var customTimeInput = datePickerProps.customTimeInput, disablePastDays = datePickerProps.disablePastDays, monthsShown = datePickerProps.monthsShown, selectsRange = datePickerProps.selectsRange;
94
- var appearanceConfig = useAppearanceConfig(datePickerProps.appearance, datePickerConfig);
95
- var propsGenerator = useDevicePropsGenerator(datePickerProps, appearanceConfig);
96
- var daySize = propsGenerator.daySize, dayTextColor = propsGenerator.dayTextColor, dayTextShape = propsGenerator.dayTextShape, dayTextSize = propsGenerator.dayTextSize, iconFill = propsGenerator.iconFill, iconFillHover = propsGenerator.iconFillHover, iconFillSize = propsGenerator.iconFillSize, iconItemFill = propsGenerator.iconItemFill, iconLeft = propsGenerator.iconLeft, iconRight = propsGenerator.iconRight, iconShape = propsGenerator.iconShape, monthTextColor = propsGenerator.monthTextColor, monthTextSize = propsGenerator.monthTextSize, monthTextWeight = propsGenerator.monthTextWeight, popper = propsGenerator.popper, popperPlacement = propsGenerator.popperPlacement, sizeClass = propsGenerator.sizeClass, widthClass = propsGenerator.widthClass, yearTextColor = propsGenerator.yearTextColor, yearTextSize = propsGenerator.yearTextSize, yearTextWeight = propsGenerator.yearTextWeight, isClearable = propsGenerator.isClearable;
97
- var _c = useMemo(function () {
98
- var dateStart;
99
- if (value) {
100
- if (typeof value === 'string') {
101
- dateStart = new Date(value);
102
- }
103
- else {
104
- dateStart = value;
105
- }
106
- }
107
- else {
108
- dateStart = undefined;
109
- }
110
- var dateEnd;
111
- if (endValue) {
112
- if (typeof endValue === 'string') {
113
- dateEnd = new Date(endValue);
114
- }
115
- else {
116
- dateEnd = endValue;
117
- }
118
- }
119
- else {
120
- dateEnd = undefined;
121
- }
122
- return [dateStart, dateEnd];
123
- }, [value, endValue]), dateStart = _c[0], dateEnd = _c[1];
124
- var handleChange = useCallback(function (valuesList) {
125
- var newDateStart = valuesList[0], newDateEnd = valuesList[1];
126
- onChange(newDateStart, newDateEnd);
127
- }, [onChange]);
128
- var renderDayContents = useCallback(function (day, date) {
129
- return (jsx(Button, { className: "react-datepicker__day-button", size: daySize, label: date.getDate().toString(), labelTextColor: dayTextColor, labelTextSize: dayTextSize, shape: dayTextShape }));
130
- }, [daySize, dayTextColor, dayTextShape, dayTextSize]);
131
- var renderCustomHeader = useCallback(function (_a) {
132
- var decreaseMonth = _a.decreaseMonth, increaseMonth = _a.increaseMonth, monthDate = _a.monthDate;
133
- return (jsxs("div", { className: "react-datepicker__header--div", children: [iconLeft && (jsx(Icon, { className: "react-datepicker__icon", fill: iconFill, fillHover: iconFillHover, fillSize: iconFillSize, iconFill: iconItemFill, shape: iconShape, SvgImage: iconLeft, onClick: decreaseMonth })), jsxs("div", { className: "react-datepicker__data", children: [jsx(Text, { className: "react-datepicker__month", size: monthTextSize, textColor: monthTextColor, textWeight: monthTextWeight, children: monthDate.toLocaleString('ru-RU', { month: 'long' }) }), jsx(Text, { className: "react-datepicker__year", size: yearTextSize, textColor: yearTextColor, textWeight: yearTextWeight, children: monthDate.toLocaleString('ru-RU', { year: 'numeric' }) })] }), iconRight && (jsx(Icon, { className: "react-datepicker__icon", fill: iconFill, fillHover: iconFillHover, fillSize: iconFillSize, iconFill: iconItemFill, shape: iconShape, SvgImage: iconRight, onClick: increaseMonth }))] }));
134
- }, [
135
- iconFill,
136
- iconFillHover,
137
- iconFillSize,
138
- iconItemFill,
139
- iconLeft,
140
- iconRight,
141
- iconShape,
142
- monthTextColor,
143
- monthTextSize,
144
- monthTextWeight,
145
- yearTextColor,
146
- yearTextSize,
147
- yearTextWeight,
148
- ]);
149
- var datePickerStyles = useStyles(props).styles;
150
- return (jsx("div", { className: clsx(className, 'datepicker', monthsShown && 'datepicker_multiple-months', customTimeInput && 'datepicker_button', sizeClass && "datepicker_size_".concat(sizeClass), widthClass && "datepicker_width_".concat(widthClass)), style: datePickerStyles, children: jsx(DatePicker, __assign({ minDate: disablePastDays ? new Date() : undefined, customInput: jsx(DatePickerCustomInput, { datepickerRef: datepickerRef, inputProps: inputProps, isClearable: isClearable }), endDate: selectsRange ? dateEnd : undefined, locale: ru, popperClassName: popper && "react-datepicker-popper-".concat(popper), popperPlacement: popperPlacement, ref: datepickerRef, renderCustomHeader: renderCustomHeader, renderDayContents: renderDayContents, selected: dateStart, startDate: dateStart, onChange: selectsRange ? handleChange : onChange }, datePickerProps, {
151
- // Important for use custom clear button
152
- isClearable: false })) }));
153
- }
154
- var DatePickerCustomInput = React.forwardRef(function (props, ref) {
155
- var inputIcon = props.inputIcon, inputProps = props.inputProps, value = props.value, isClearable = props.isClearable;
156
- var multipleValue = useMemo(function () {
157
- if (value) {
158
- var twoDates = value.split(' - ');
159
- return twoDates[0] === twoDates[1] ? twoDates[0] : value;
160
- }
161
- return '';
162
- }, [value]);
163
- return (jsxs(React.Fragment, { children: [jsx(Input, __assign({}, props, inputProps, { className: clsx(inputProps.className, 'datepicker__input'), autocomplete: "off", ref: ref, value: multipleValue })), inputIcon && jsx(DatePickerInputIcon, __assign({}, inputProps)), isClearable && jsx(DatePickerClearButton, __assign({}, inputProps))] }));
164
- });
165
- function DatePickerClearButton(props) {
166
- var clearIcon = props.clearIcon, clearIconFill = props.clearIconFill, clearIconFillHover = props.clearIconFillHover, clearIconFillSize = props.clearIconFillSize, clearIconItemFill = props.clearIconItemFill, clearIconItemFillHover = props.clearIconItemFillHover, clearIconShape = props.clearIconShape, clearIconSize = props.clearIconSize, clearIconSrc = props.clearIconSrc, clearLabel = props.clearLabel, clearLabelTextColor = props.clearLabelTextColor, clearLabelTextColorHover = props.clearLabelTextColorHover, clearLabelTextSize = props.clearLabelTextSize, datepickerRef = props.datepickerRef;
167
- var onClick = useCallback(function (event) {
168
- var _a, _b;
169
- (_a = datepickerRef === null || datepickerRef === void 0 ? void 0 : datepickerRef.current) === null || _a === void 0 ? void 0 : _a.onClearClick(event);
170
- (_b = datepickerRef === null || datepickerRef === void 0 ? void 0 : datepickerRef.current) === null || _b === void 0 ? void 0 : _b.handleFocus(event);
171
- }, []);
172
- return (jsx(React.Fragment, { children: clearLabel ? (jsx(Label, { className: clsx('react-datepicker__clear-label', 'cursor_type_pointer'), label: clearLabel, labelTextColor: clearLabelTextColor, labelTextColorHover: clearLabelTextColorHover, labelTextSize: clearLabelTextSize, onClick: onClick })) : ((clearIcon || clearIconSrc) && (jsx(Icon, { className: clsx('react-datepicker__clear-icon', 'cursor_type_pointer'), size: clearIconSize, fill: clearIconFill, fillHover: clearIconFillHover, fillSize: clearIconFillSize, iconFill: clearIconItemFill, iconFillHover: clearIconItemFillHover, imageSrc: clearIconSrc, shape: clearIconShape, SvgImage: clearIcon, onClick: onClick }))) }));
173
- }
174
- function DatePickerInputIcon(props) {
175
- var inputIcon = props.inputIcon, inputIconFill = props.inputIconFill, inputIconFillHover = props.inputIconFillHover, inputIconFillSize = props.inputIconFillSize, inputIconItemFill = props.inputIconItemFill, inputIconShape = props.inputIconShape, inputIconSize = props.inputIconSize, inputIconSrc = props.inputIconSrc, onClick = props.onClick;
176
- return (jsx(Icon, { className: clsx('react-datepicker__input-icon', 'cursor_type_pointer'), size: inputIconSize, fill: inputIconFill, fillHover: inputIconFillHover, fillSize: inputIconFillSize, iconFill: inputIconItemFill, imageSrc: inputIconSrc, shape: inputIconShape, SvgImage: inputIcon, onClick: function () { return onClick && onClick(); } }));
177
- }
178
-
179
- export { DatePickerInput as D, datePickerAppearance as a, datePickerConfig as d };
@@ -1,97 +0,0 @@
1
- 'use strict';
2
-
3
- var jsxRuntime = require('react/jsx-runtime');
4
- var clsx = require('clsx');
5
- var useAppearanceConfig = require('./cjs/hooks/useAppearanceConfig/useAppearanceConfig.js');
6
- var useDevicePropsGenerator = require('./cjs/hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
7
- var useStyles = require('./cjs/hooks/useStyles/useStyles.js');
8
- var tslib_es6 = require('./tslib.es6_cjs_CCZ3TN_7.js');
9
-
10
- var dividerAppearanceAccent = {
11
- accentPrimary: {
12
- fill: 'accentPrimary',
13
- },
14
- };
15
-
16
- var dividerAppearanceError = {
17
- errorPrimary: {
18
- fill: 'errorPrimary',
19
- },
20
- };
21
-
22
- var dividerAppearancePrimary = {
23
- primaryPrimary: {
24
- fill: 'primaryPrimary',
25
- },
26
- };
27
-
28
- var dividerAppearanceSecondary = {
29
- secondaryPrimary: {
30
- fill: 'secondaryPrimary',
31
- },
32
- };
33
-
34
- var dividerAppearanceSize = {
35
- sizeL: {
36
- size: 'l',
37
- },
38
- sizeM: {
39
- size: 'm',
40
- },
41
- sizeS: {
42
- size: 's',
43
- },
44
- };
45
-
46
- var dividerAppearanceSuccess = {
47
- successPrimary: {
48
- fill: 'successPrimary',
49
- },
50
- };
51
-
52
- var dividerAppearanceSurface = {
53
- surfacePrimary: {
54
- fill: 'surfacePrimary',
55
- },
56
- surfaceSecondary: {
57
- fill: 'surfaceSecondary',
58
- },
59
- surfaceTertiary: {
60
- fill: 'surfaceTertiary',
61
- },
62
- surfaceQuaternary: {
63
- fill: 'surfaceQuaternary',
64
- },
65
- };
66
-
67
- var dividerAppearanceWarning = {
68
- warningPrimary: {
69
- fill: 'warningPrimary',
70
- },
71
- };
72
-
73
- var dividerAppearance = tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign({}, dividerAppearanceSize), dividerAppearanceAccent), dividerAppearanceError), dividerAppearancePrimary), dividerAppearanceSecondary), dividerAppearanceSuccess), dividerAppearanceSurface), dividerAppearanceWarning);
74
-
75
- var dividerConfig = {
76
- appearance: dividerAppearance,
77
- setAppearance: function (appearanceConfig) {
78
- dividerConfig.appearance = appearanceConfig;
79
- },
80
- };
81
- function Divider(props) {
82
- var className = props.className, appearance = props.appearance, isDisabled = props.isDisabled, isActive = props.isActive, isSkeleton = props.isSkeleton;
83
- var appearanceConfig = useAppearanceConfig.useAppearanceConfig(appearance, dividerConfig);
84
- var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
85
- var directionClass = propsGenerator.directionClass, fillActiveClass = propsGenerator.fillActiveClass, fillActiveHoverClass = propsGenerator.fillActiveHoverClass, fillClass = propsGenerator.fillClass, fillDisabledClass = propsGenerator.fillDisabledClass, fillHoverClass = propsGenerator.fillHoverClass, shapeClass = propsGenerator.shapeClass, shapeStrengthClass = propsGenerator.shapeStrengthClass, sizeClass = propsGenerator.sizeClass, widthClass = propsGenerator.widthClass;
86
- // @ts-expect-error
87
- var hrStyles = useStyles.useStyles(props).styles;
88
- return (jsxRuntime.jsx("hr", { className: clsx(className, 'divider', widthClass && "width_".concat(widthClass), directionClass && "divider_direction_".concat(directionClass), shapeClass && "shape_".concat(shapeClass), shapeStrengthClass && "shape-strength_".concat(shapeStrengthClass), sizeClass && "divider_size_".concat(sizeClass), !isActive
89
- ? fillClass && "fill_".concat(fillClass)
90
- : fillActiveClass && "fill_active_".concat(fillActiveClass), !isActive
91
- ? fillHoverClass && "fill_hover_".concat(fillHoverClass)
92
- : fillActiveHoverClass && "fill_active_hover_".concat(fillActiveHoverClass), isDisabled && fillDisabledClass && "fill_disabled_".concat(fillDisabledClass), isSkeleton && "divider_skeleton"), style: hrStyles }));
93
- }
94
-
95
- exports.Divider = Divider;
96
- exports.dividerAppearance = dividerAppearance;
97
- exports.dividerConfig = dividerConfig;
@@ -1,93 +0,0 @@
1
- import { jsx } from 'react/jsx-runtime';
2
- import clsx from 'clsx';
3
- import { useAppearanceConfig } from './hooks/useAppearanceConfig/useAppearanceConfig.js';
4
- import { useDevicePropsGenerator } from './hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
5
- import { useStyles } from './hooks/useStyles/useStyles.js';
6
- import { _ as __assign } from './tslib.es6_es_Bwu1Cn-t.js';
7
-
8
- var dividerAppearanceAccent = {
9
- accentPrimary: {
10
- fill: 'accentPrimary',
11
- },
12
- };
13
-
14
- var dividerAppearanceError = {
15
- errorPrimary: {
16
- fill: 'errorPrimary',
17
- },
18
- };
19
-
20
- var dividerAppearancePrimary = {
21
- primaryPrimary: {
22
- fill: 'primaryPrimary',
23
- },
24
- };
25
-
26
- var dividerAppearanceSecondary = {
27
- secondaryPrimary: {
28
- fill: 'secondaryPrimary',
29
- },
30
- };
31
-
32
- var dividerAppearanceSize = {
33
- sizeL: {
34
- size: 'l',
35
- },
36
- sizeM: {
37
- size: 'm',
38
- },
39
- sizeS: {
40
- size: 's',
41
- },
42
- };
43
-
44
- var dividerAppearanceSuccess = {
45
- successPrimary: {
46
- fill: 'successPrimary',
47
- },
48
- };
49
-
50
- var dividerAppearanceSurface = {
51
- surfacePrimary: {
52
- fill: 'surfacePrimary',
53
- },
54
- surfaceSecondary: {
55
- fill: 'surfaceSecondary',
56
- },
57
- surfaceTertiary: {
58
- fill: 'surfaceTertiary',
59
- },
60
- surfaceQuaternary: {
61
- fill: 'surfaceQuaternary',
62
- },
63
- };
64
-
65
- var dividerAppearanceWarning = {
66
- warningPrimary: {
67
- fill: 'warningPrimary',
68
- },
69
- };
70
-
71
- var dividerAppearance = __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, dividerAppearanceSize), dividerAppearanceAccent), dividerAppearanceError), dividerAppearancePrimary), dividerAppearanceSecondary), dividerAppearanceSuccess), dividerAppearanceSurface), dividerAppearanceWarning);
72
-
73
- var dividerConfig = {
74
- appearance: dividerAppearance,
75
- setAppearance: function (appearanceConfig) {
76
- dividerConfig.appearance = appearanceConfig;
77
- },
78
- };
79
- function Divider(props) {
80
- var className = props.className, appearance = props.appearance, isDisabled = props.isDisabled, isActive = props.isActive, isSkeleton = props.isSkeleton;
81
- var appearanceConfig = useAppearanceConfig(appearance, dividerConfig);
82
- var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
83
- var directionClass = propsGenerator.directionClass, fillActiveClass = propsGenerator.fillActiveClass, fillActiveHoverClass = propsGenerator.fillActiveHoverClass, fillClass = propsGenerator.fillClass, fillDisabledClass = propsGenerator.fillDisabledClass, fillHoverClass = propsGenerator.fillHoverClass, shapeClass = propsGenerator.shapeClass, shapeStrengthClass = propsGenerator.shapeStrengthClass, sizeClass = propsGenerator.sizeClass, widthClass = propsGenerator.widthClass;
84
- // @ts-expect-error
85
- var hrStyles = useStyles(props).styles;
86
- return (jsx("hr", { className: clsx(className, 'divider', widthClass && "width_".concat(widthClass), directionClass && "divider_direction_".concat(directionClass), shapeClass && "shape_".concat(shapeClass), shapeStrengthClass && "shape-strength_".concat(shapeStrengthClass), sizeClass && "divider_size_".concat(sizeClass), !isActive
87
- ? fillClass && "fill_".concat(fillClass)
88
- : fillActiveClass && "fill_active_".concat(fillActiveClass), !isActive
89
- ? fillHoverClass && "fill_hover_".concat(fillHoverClass)
90
- : fillActiveHoverClass && "fill_active_hover_".concat(fillActiveHoverClass), isDisabled && fillDisabledClass && "fill_disabled_".concat(fillDisabledClass), isSkeleton && "divider_skeleton"), style: hrStyles }));
91
- }
92
-
93
- export { Divider as D, dividerAppearance as a, dividerConfig as d };