@itcase/ui 1.3.24 → 1.3.26
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.
- package/dist/{Badge-Bcj5H3vs.js → Badge-CcaG-4ly.js} +49 -8
- package/dist/{Badge-DxHwStfq.js → Badge-CoHPvO35.js} +49 -8
- package/dist/{Button-BSygAkO5.js → Button-BFX_EEum.js} +6 -6
- package/dist/{Button-Bn8Mjoeh.js → Button-BSzqA8CB.js} +6 -6
- package/dist/{DropdownItem-CExjlJjQ.js → DropdownItem-Bq-oPnWX.js} +4 -4
- package/dist/{DropdownItem-DFE1HsyX.js → DropdownItem-FNOztnTT.js} +4 -4
- package/dist/{Group-CIIZoSm5.js → Group-B9L2NTgM.js} +1 -1
- package/dist/{Group-pMTTxQH4.js → Group-D6CXN4hS.js} +1 -1
- package/dist/{Icon-DotE-03d.js → Icon-BZa8B7te.js} +3 -3
- package/dist/{Icon-ByLHEhHL.js → Icon-B_bS-o4g.js} +2 -2
- package/dist/{Input-Ck5IbuH6.js → Input-BrV5_NoV.js} +1 -1
- package/dist/{Input-zkYoZhQk.js → Input-ffioh1sj.js} +1 -1
- package/dist/{Label-9O3dQlUa.js → Label-DQyB2ThM.js} +6 -6
- package/dist/{Label-GEBQXoVJ.js → Label-HKRKV3mn.js} +6 -6
- package/dist/{Link-CoAhRbFg.js → Link-CxWmYMyL.js} +1 -1
- package/dist/{Link-C53o3P6_.js → Link-DN2LhPjD.js} +4 -4
- package/dist/{Loader-D_53c71f.js → Loader-Dn036JwE.js} +2 -2
- package/dist/{Loader-Cm98w6lJ.js → Loader-K_DJmah6.js} +2 -2
- package/dist/{MenuItem-Cu6wlj-X.js → MenuItem-CLDNk2l8.js} +3 -3
- package/dist/{MenuItem-Ybh5Mpoi.js → MenuItem-amqx61Y0.js} +3 -3
- package/dist/{Scrollbar-DkJr3S-w.js → Scrollbar-Bo7z7ELm.js} +1 -1
- package/dist/{Scrollbar-CL9V8d1X.js → Scrollbar-CKbA0jQU.js} +1 -1
- package/dist/{Text-COHpLTYr.js → Text-Beslj4Ns.js} +1 -1
- package/dist/{Text-D9sEeRE4.js → Text-JayJa3hj.js} +1 -1
- package/dist/{Title-Cl95USIn.js → Title-CHgrIarR.js} +1 -1
- package/dist/{Title-BduD-TXE.js → Title-DBaHcpvB.js} +1 -1
- package/dist/{Tooltip-BsbXMzGd.js → Tooltip-1Jbub0K6.js} +4 -4
- package/dist/{Tooltip-CyZCVyba.js → Tooltip-CNua1g76.js} +4 -4
- package/dist/cjs/components/Accordion.js +8 -7
- package/dist/cjs/components/Avatar.js +10 -9
- package/dist/cjs/components/Badge.js +4 -3
- package/dist/cjs/components/Breadcrumbs.js +7 -6
- package/dist/cjs/components/Button.js +8 -7
- package/dist/cjs/components/Caption.js +1 -0
- package/dist/cjs/components/Card.js +3 -2
- package/dist/cjs/components/Cell.js +10 -9
- package/dist/cjs/components/Checkbox.js +4 -3
- package/dist/cjs/components/Checkmark.js +65 -0
- package/dist/cjs/components/Chips.js +5 -4
- package/dist/cjs/components/Choice.js +11 -10
- package/dist/cjs/components/Code.js +4 -3
- package/dist/cjs/components/CookiesWarning.js +11 -10
- package/dist/cjs/components/DadataHintField.js +2 -1
- package/dist/cjs/components/DatePicker.js +17 -16
- package/dist/cjs/components/Divider.js +1 -0
- package/dist/cjs/components/Dot.js +1 -0
- package/dist/cjs/components/Dropdown.js +4 -3
- package/dist/cjs/components/Flex.js +3 -2
- package/dist/cjs/components/Grid.js +3 -2
- package/dist/cjs/components/Group.js +2 -1
- package/dist/cjs/components/HTMLContent.js +1 -0
- package/dist/cjs/components/HeroTitle.js +2 -1
- package/dist/cjs/components/Icon.js +6 -5
- package/dist/cjs/components/Image.js +1 -0
- package/dist/cjs/components/Input.js +2 -1
- package/dist/cjs/components/InputMask.js +2 -1
- package/dist/cjs/components/InputPassword.js +6 -5
- package/dist/cjs/components/Label.js +5 -4
- package/dist/cjs/components/Link.js +2 -1
- package/dist/cjs/components/List.js +2 -1
- package/dist/cjs/components/Loader.js +3 -2
- package/dist/cjs/components/Logo.js +3 -2
- package/dist/cjs/components/Menu.js +5 -4
- package/dist/cjs/components/MenuItem.js +4 -3
- package/dist/cjs/components/Modal.js +6 -5
- package/dist/cjs/components/ModalSheetBottom.js +1 -0
- package/dist/cjs/components/Notification.js +4 -5
- package/dist/cjs/components/Overlay.js +1 -0
- package/dist/cjs/components/Pagination.js +29 -28
- package/dist/cjs/components/Panel.js +3 -2
- package/dist/cjs/components/Radio.js +4 -3
- package/dist/cjs/components/RangeSlider.js +1 -0
- package/dist/cjs/components/Response.js +82 -57
- package/dist/cjs/components/SVGContent.js +1 -0
- package/dist/cjs/components/ScrollOnDrag.js +1 -0
- package/dist/cjs/components/ScrollToView.js +2 -1
- package/dist/cjs/components/Scrollbar.js +1 -1
- package/dist/cjs/components/Search.js +10 -9
- package/dist/cjs/components/Segmented.js +14 -13
- package/dist/cjs/components/Select.js +28 -12
- package/dist/cjs/components/SiteMenu.js +7 -6
- package/dist/cjs/components/Swiper.js +9 -8
- package/dist/cjs/components/Tab.js +10 -9
- package/dist/cjs/components/Text.js +2 -1
- package/dist/cjs/components/Textarea.js +1 -0
- package/dist/cjs/components/Tile.js +5 -4
- package/dist/cjs/components/Title.js +2 -1
- package/dist/cjs/components/Tooltip.js +4 -3
- package/dist/cjs/components/Video.js +1 -0
- package/dist/cjs/components/Wrapper.js +2 -1
- package/dist/cjs/context/Notifications.js +6 -6
- package/dist/cjs/context/UIContext.js +6 -1
- package/dist/cjs/hooks/useDeviceTargetClass.js +1 -0
- package/dist/cjs/hooks/useDeviceTargetClassGenerator.interface.js +1 -0
- package/dist/cjs/hooks/useDeviceTargetClassGenerator.js +5 -4
- package/dist/cjs/hooks/useMediaQueries.js +0 -12
- package/dist/cjs/hooks/useStyles.js +1 -0
- package/dist/cjs/hooks.js +0 -1
- package/dist/cjs/utils/setViewportProperty.js +8 -0
- package/dist/cjs/utils.js +7 -0
- package/dist/components/Accordion.js +9 -8
- package/dist/components/Avatar.js +11 -10
- package/dist/components/Badge.js +4 -3
- package/dist/components/Breadcrumbs.js +8 -7
- package/dist/components/Button.js +9 -8
- package/dist/components/Caption.js +2 -1
- package/dist/components/Card.js +4 -3
- package/dist/components/Cell.js +11 -10
- package/dist/components/Checkbox.js +5 -4
- package/dist/components/Checkmark.js +61 -0
- package/dist/components/Chips.js +6 -5
- package/dist/components/Choice.js +12 -11
- package/dist/components/Code.js +5 -4
- package/dist/components/CookiesWarning.js +12 -11
- package/dist/components/DadataHintField.js +3 -2
- package/dist/components/DatePicker.js +18 -17
- package/dist/components/Divider.js +2 -1
- package/dist/components/Dot.js +2 -1
- package/dist/components/Dropdown.js +5 -4
- package/dist/components/Flex.js +4 -3
- package/dist/components/Grid.js +4 -3
- package/dist/components/Group.js +3 -2
- package/dist/components/HTMLContent.js +2 -1
- package/dist/components/HeroTitle.js +3 -2
- package/dist/components/Icon.js +7 -6
- package/dist/components/Image.js +2 -1
- package/dist/components/Input.js +3 -2
- package/dist/components/InputMask.js +3 -2
- package/dist/components/InputPassword.js +7 -6
- package/dist/components/Label.js +6 -5
- package/dist/components/Link.js +3 -2
- package/dist/components/List.js +3 -2
- package/dist/components/Loader.js +4 -3
- package/dist/components/Logo.js +4 -3
- package/dist/components/Menu.js +6 -5
- package/dist/components/MenuItem.js +5 -4
- package/dist/components/Modal.js +7 -6
- package/dist/components/ModalSheetBottom.js +2 -1
- package/dist/components/Notification.js +5 -6
- package/dist/components/Overlay.js +2 -1
- package/dist/components/Pagination.js +30 -29
- package/dist/components/Panel.js +4 -3
- package/dist/components/Radio.js +5 -4
- package/dist/components/RangeSlider.js +2 -1
- package/dist/components/Response.js +83 -58
- package/dist/components/SVGContent.js +2 -1
- package/dist/components/ScrollOnDrag.js +2 -1
- package/dist/components/ScrollToView.js +3 -2
- package/dist/components/Scrollbar.js +1 -1
- package/dist/components/Search.js +11 -10
- package/dist/components/Segmented.js +15 -14
- package/dist/components/Select.js +29 -13
- package/dist/components/SiteMenu.js +8 -7
- package/dist/components/Swiper.js +10 -9
- package/dist/components/Tab.js +11 -10
- package/dist/components/Text.js +3 -2
- package/dist/components/Textarea.js +2 -1
- package/dist/components/Tile.js +6 -5
- package/dist/components/Title.js +3 -2
- package/dist/components/Tooltip.js +5 -4
- package/dist/components/Video.js +1 -0
- package/dist/components/Wrapper.js +3 -2
- package/dist/context/Notifications.js +7 -7
- package/dist/context/UIContext.js +7 -2
- package/dist/css/components/Checkmark/Checkmark.css +30 -0
- package/dist/css/components/Checkmark/Checkmark.tokens.css +16 -0
- package/dist/css/components/Code/Code.css +2 -1
- package/dist/css/components/Dropdown/Dropdown.css +1 -1
- package/dist/css/components/Notification/Notification.css +6 -2
- package/dist/css/components/Notification/css/__item/notification__item_set_form.css +6 -2
- package/dist/css/components/Pagination/Pagination.css +4 -4
- package/dist/css/components/Pagination/css/__item/pagination__item_state_active.css +4 -4
- package/dist/css/components/Response/Response.css +10 -2
- package/dist/css/components/Swiper/Swiper.css +2 -2
- package/dist/css/components/Switch/Switch.css +1 -1
- package/dist/css/components/Tile/Tile.css +1 -1
- package/dist/css/tokens/colors.css +9 -0
- package/dist/hooks/useDeviceTargetClass.js +1 -0
- package/dist/hooks/useDeviceTargetClassGenerator.interface.js +1 -1
- package/dist/hooks/useDeviceTargetClassGenerator.js +6 -5
- package/dist/hooks/useMediaQueries.js +0 -12
- package/dist/hooks/useStyles.js +1 -0
- package/dist/hooks.js +1 -1
- package/dist/stories/Checkmark.mdx +11 -0
- package/dist/stories/Overview.mdx +5 -5
- package/dist/stories/Playground.mdx +4 -4
- package/dist/{tslib.es6-5FtW-kfi.js → tslib.es6-Bwu1Cn-t.js} +1 -1
- package/dist/types/components/Badge/stories/args.d.ts +69 -0
- package/dist/types/components/Checkmark/Checkmark.appearance.d.ts +2 -0
- package/dist/types/components/Checkmark/Checkmark.d.ts +4 -0
- package/dist/types/components/Checkmark/Checkmark.interface.d.ts +29 -0
- package/dist/types/components/Checkmark/index.d.ts +2 -0
- package/dist/types/components/Notification/Notification.interface.d.ts +3 -3
- package/dist/types/components/Select/index.d.ts +15 -15
- package/dist/types/utils/index.d.ts +2 -0
- package/dist/types/utils/setViewportProperty.d.ts +2 -0
- package/dist/utils/setViewportProperty.js +6 -0
- package/dist/utils.js +1 -0
- package/package.json +29 -53
|
@@ -1,32 +1,35 @@
|
|
|
1
|
-
import { _ as __assign } from '../tslib.es6-
|
|
1
|
+
import { _ as __assign } from '../tslib.es6-Bwu1Cn-t.js';
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import { useMemo } from 'react';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import SVG from 'react-inlinesvg';
|
|
6
6
|
import { useDeviceTargetClassGenerator } from '../hooks/useDeviceTargetClassGenerator.js';
|
|
7
7
|
import { useStyles } from '../hooks/useStyles.js';
|
|
8
|
-
import { B as Button } from '../Button-
|
|
9
|
-
import { G as Group } from '../Group-
|
|
10
|
-
import { T as Text } from '../Text-
|
|
11
|
-
import { T as Title } from '../Title-Cl95USIn.js';
|
|
8
|
+
import { B as Button } from '../Button-BSzqA8CB.js';
|
|
9
|
+
import { G as Group } from '../Group-B9L2NTgM.js';
|
|
10
|
+
import { T as Text } from '../Text-JayJa3hj.js';
|
|
12
11
|
import 'lodash/camelCase';
|
|
13
12
|
import 'lodash/castArray';
|
|
14
13
|
import '../context/UIContext.js';
|
|
15
14
|
import '../hooks/useMediaQueries.js';
|
|
16
15
|
import 'react-responsive';
|
|
16
|
+
import '../utils/setViewportProperty.js';
|
|
17
17
|
import 'lodash/maxBy';
|
|
18
18
|
import 'lodash/upperFirst';
|
|
19
19
|
import '../hooks/styleAttributes.js';
|
|
20
|
-
import '../Icon-
|
|
21
|
-
import '../Link-
|
|
22
|
-
import '../Tooltip-
|
|
23
|
-
import '../
|
|
20
|
+
import '../Icon-BZa8B7te.js';
|
|
21
|
+
import '../Link-DN2LhPjD.js';
|
|
22
|
+
import '../Tooltip-1Jbub0K6.js';
|
|
23
|
+
import '../Title-CHgrIarR.js';
|
|
24
|
+
import '../Loader-K_DJmah6.js';
|
|
24
25
|
|
|
25
|
-
var img$
|
|
26
|
+
var img$7 = "data:image/svg+xml,%3csvg width='180' height='180' viewBox='0 0 180 180' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='90' cy='90' r='90' fill='%23D9D9D9'/%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M85.7155 56.9042L54.1865 115.911C53.0219 118.09 54.5678 121.43 58.4708 121.43H121.529C125.432 121.43 126.978 118.09 125.814 115.911L94.2845 56.9043C93.5012 55.4392 91.8762 54.57 89.9998 54.57C88.1237 54.57 86.4986 55.439 85.7155 56.9042ZM89.9998 48C93.9317 48 98.1142 49.8644 100.253 53.8659L131.782 112.873C135.732 120.266 129.482 128 121.529 128H58.4708C50.5181 128 44.2675 120.266 48.2181 112.873L79.7471 53.866C81.8855 49.8645 86.0683 48 89.9998 48ZM90.0002 74.0886C91.8588 74.0886 93.3658 75.5593 93.3658 77.3736V92.8756C93.3658 94.6897 91.8588 96.1606 90.0002 96.1606C88.1411 96.1606 86.6345 94.6897 86.6345 92.8756V77.3736C86.6345 75.5593 88.1411 74.0886 90.0002 74.0886ZM93.3658 108.377C93.3658 106.563 91.8588 105.092 90.0002 105.092C88.1411 105.092 86.6345 106.563 86.6345 108.377V108.457C86.6345 110.271 88.1411 111.742 90.0002 111.742C91.8588 111.742 93.3658 110.271 93.3658 108.457V108.377Z' fill='%23747474'/%3e%3c/svg%3e";
|
|
26
27
|
|
|
27
|
-
var img$
|
|
28
|
+
var img$6 = "data:image/svg+xml,%3csvg width='180' height='180' viewBox='0 0 180 180' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='90' cy='90' r='90' fill='%23E00000'/%3e%3cpath d='M90.5027 104.581V45.2513' stroke='white' stroke-width='12' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M90.5027 134.749V129.721' stroke='white' stroke-width='12' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e";
|
|
28
29
|
|
|
29
|
-
var img$
|
|
30
|
+
var img$5 = "data:image/svg+xml,%3csvg width='180' height='180' viewBox='0 0 180 180' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='90' cy='90' r='90' fill='%23D9D9D9'/%3e%3cpath d='M116.144 71.2426C118.487 68.8995 118.487 65.1005 116.144 62.7574C113.801 60.4142 110.002 60.4142 107.659 62.7574L89.4506 80.9654L71.2426 62.7574C68.8995 60.4142 65.1005 60.4142 62.7574 62.7574C60.4142 65.1005 60.4142 68.8995 62.7574 71.2426L80.9654 89.4506L62.7574 107.659C60.4142 110.002 60.4142 113.801 62.7574 116.144C65.1005 118.487 68.8995 118.487 71.2426 116.144L89.4506 97.9359L107.659 116.144C110.002 118.487 113.801 118.487 116.144 116.144C118.487 113.801 118.487 110.002 116.144 107.659L97.9359 89.4506L116.144 71.2426Z' fill='%23747474'/%3e%3c/svg%3e";
|
|
31
|
+
|
|
32
|
+
var img$4 = "data:image/svg+xml,%3csvg width='180' height='180' viewBox='0 0 180 180' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='90' cy='90' r='90' fill='%23D9D9D9'/%3e%3cpath d='M93.2275 101.842H84.0659C83.8263 99.1898 83.976 96.839 84.515 94.7895C85.1138 92.74 86.2216 90.8111 87.8383 89.0027C89.515 87.1341 91.7904 85.2051 94.6647 83.2159C96.5808 81.8898 97.9581 80.5637 98.7964 79.2375C99.6946 77.9114 100.144 76.4345 100.144 74.807C100.144 72.2753 99.2156 70.1957 97.3593 68.5682C95.503 66.9406 93.0778 66.1269 90.0838 66.1269C87.3892 66.1269 84.7246 66.9105 82.0898 68.4777C79.4551 69.9847 77.0299 72.3959 74.8144 75.7112L67 67.9352C70.0539 64.0774 73.5868 61.1237 77.5988 59.0742C81.6707 57.0247 85.9521 56 90.4431 56C94.5749 56 98.2575 56.8439 101.491 58.5317C104.725 60.1592 107.269 62.3896 109.126 65.2227C111.042 67.9955 112 71.1601 112 74.7166C112 78.0922 111.042 81.1062 109.126 83.7584C107.269 86.4107 104.455 88.8821 100.683 91.1727C97.7485 92.8605 95.7725 94.4881 94.7545 96.0553C93.7365 97.6226 93.2275 99.5515 93.2275 101.842ZM96.1916 115.767C96.1916 117.756 95.4731 119.474 94.0359 120.92C92.5988 122.307 90.8323 123 88.7365 123C86.6407 123 84.8743 122.307 83.4371 120.92C82 119.474 81.2814 117.756 81.2814 115.767C81.2814 113.717 82 111.999 83.4371 110.613C84.8743 109.166 86.6407 108.443 88.7365 108.443C90.8323 108.443 92.5988 109.166 94.0359 110.613C95.4731 111.999 96.1916 113.717 96.1916 115.767Z' fill='%23747474'/%3e%3c/svg%3e";
|
|
30
33
|
|
|
31
34
|
var img$3 = "data:image/svg+xml,%3csvg width='180' height='180' viewBox='0 0 180 180' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='90' cy='90' r='90' fill='%23D9D9D9'/%3e%3cpath d='M89.4468 113.833C98.5743 113.833 106.51 108.762 110.56 101.299L116.507 109.116C110.49 117.519 100.612 123 89.4468 123C74.5162 123 61.888 113.2 57.7156 99.7167H51L62.3388 84.8667L73.6777 99.7167H67.55C71.2908 108.036 79.6878 113.833 89.4468 113.833Z' fill='%23747474'/%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M122.212 84.6833C119.654 68.9858 105.958 57 89.4468 57C77.527 57 67.0747 63.2463 61.2209 72.6261L67.4218 80.5738C71.0963 72.0991 79.5747 66.1667 89.4468 66.1667C100.848 66.1667 110.391 74.0798 112.821 84.6833H106.322L117.661 99.5333L129 84.6833H122.212ZM118.759 84.6833H118.81L118.793 84.6618L118.759 84.6833Z' fill='%23747474'/%3e%3c/svg%3e";
|
|
32
35
|
|
|
@@ -36,12 +39,12 @@ var img$1 = "data:image/svg+xml,%3csvg width='180' height='180' viewBox='0 0 180
|
|
|
36
39
|
|
|
37
40
|
var img = "data:image/svg+xml,%3csvg width='180' height='180' viewBox='0 0 180 180' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='90' cy='90' r='90' fill='%23DE8806'/%3e%3cpath d='M90.5028 104.581V45.2513' stroke='white' stroke-width='12' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M90.5028 134.749V129.721' stroke='white' stroke-width='12' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e";
|
|
38
41
|
|
|
42
|
+
/* eslint-disable perfectionist/sort-objects */
|
|
39
43
|
var responseAppearance = {
|
|
40
|
-
|
|
41
|
-
fill: 'surfaceSecondary',
|
|
44
|
+
cantLoadData: {
|
|
42
45
|
messageTextColor: 'surfaceTextPrimary',
|
|
43
46
|
messageTextSize: 'm',
|
|
44
|
-
messageTextWeight:
|
|
47
|
+
messageTextWeight: 400,
|
|
45
48
|
primaryButtonAppearance: 'surfaceTertiary',
|
|
46
49
|
primaryButtonLabelTextSize: 'l',
|
|
47
50
|
primaryButtonShape: 'rounded',
|
|
@@ -52,14 +55,15 @@ var responseAppearance = {
|
|
|
52
55
|
secondaryButtonShape: 'rounded',
|
|
53
56
|
secondaryButtonSize: 'xxl',
|
|
54
57
|
secondaryButtonWidth: 'fill',
|
|
58
|
+
svgSrc: img$7,
|
|
55
59
|
titleTextColor: 'surfaceTextPrimary',
|
|
56
|
-
titleTextSize: '
|
|
60
|
+
titleTextSize: 'xxl',
|
|
57
61
|
titleTextWeight: 400,
|
|
58
62
|
},
|
|
59
63
|
custom: {
|
|
60
64
|
messageTextColor: 'surfaceTextPrimary',
|
|
61
65
|
messageTextSize: 'm',
|
|
62
|
-
messageTextWeight:
|
|
66
|
+
messageTextWeight: 400,
|
|
63
67
|
primaryButtonAppearance: 'accent',
|
|
64
68
|
primaryButtonLabelTextSize: 'l',
|
|
65
69
|
primaryButtonShape: 'rounded',
|
|
@@ -71,15 +75,15 @@ var responseAppearance = {
|
|
|
71
75
|
secondaryButtonSize: 'xxl',
|
|
72
76
|
secondaryButtonWidth: 'fill',
|
|
73
77
|
titleTextColor: 'surfaceTextPrimary',
|
|
74
|
-
titleTextSize: '
|
|
78
|
+
titleTextSize: 'xxl',
|
|
75
79
|
titleTextWeight: 400,
|
|
76
80
|
},
|
|
77
|
-
|
|
78
|
-
|
|
81
|
+
dev: {
|
|
82
|
+
fill: 'surfaceSecondary',
|
|
79
83
|
messageTextColor: 'surfaceTextPrimary',
|
|
80
84
|
messageTextSize: 'm',
|
|
81
|
-
messageTextWeight:
|
|
82
|
-
primaryButtonAppearance: '
|
|
85
|
+
messageTextWeight: 400,
|
|
86
|
+
primaryButtonAppearance: 'surfaceTertiary',
|
|
83
87
|
primaryButtonLabelTextSize: 'l',
|
|
84
88
|
primaryButtonShape: 'rounded',
|
|
85
89
|
primaryButtonSize: 'xxl',
|
|
@@ -90,15 +94,14 @@ var responseAppearance = {
|
|
|
90
94
|
secondaryButtonSize: 'xxl',
|
|
91
95
|
secondaryButtonWidth: 'fill',
|
|
92
96
|
titleTextColor: 'surfaceTextPrimary',
|
|
93
|
-
titleTextSize: '
|
|
97
|
+
titleTextSize: 'xxl',
|
|
94
98
|
titleTextWeight: 400,
|
|
95
99
|
},
|
|
96
|
-
|
|
97
|
-
svgSrc: img$1,
|
|
100
|
+
error: {
|
|
98
101
|
messageTextColor: 'surfaceTextPrimary',
|
|
99
102
|
messageTextSize: 'm',
|
|
100
|
-
messageTextWeight:
|
|
101
|
-
primaryButtonAppearance: '
|
|
103
|
+
messageTextWeight: 400,
|
|
104
|
+
primaryButtonAppearance: 'secondary',
|
|
102
105
|
primaryButtonLabelTextSize: 'l',
|
|
103
106
|
primaryButtonShape: 'rounded',
|
|
104
107
|
primaryButtonSize: 'xxl',
|
|
@@ -108,16 +111,16 @@ var responseAppearance = {
|
|
|
108
111
|
secondaryButtonShape: 'rounded',
|
|
109
112
|
secondaryButtonSize: 'xxl',
|
|
110
113
|
secondaryButtonWidth: 'fill',
|
|
114
|
+
svgSrc: img$6,
|
|
111
115
|
titleTextColor: 'surfaceTextPrimary',
|
|
112
|
-
titleTextSize: '
|
|
116
|
+
titleTextSize: 'xxl',
|
|
113
117
|
titleTextWeight: 400,
|
|
114
118
|
},
|
|
115
|
-
|
|
116
|
-
svgSrc: img,
|
|
119
|
+
fail: {
|
|
117
120
|
messageTextColor: 'surfaceTextPrimary',
|
|
118
121
|
messageTextSize: 'm',
|
|
119
|
-
messageTextWeight:
|
|
120
|
-
primaryButtonAppearance: '
|
|
122
|
+
messageTextWeight: 400,
|
|
123
|
+
primaryButtonAppearance: 'surfaceTertiary',
|
|
121
124
|
primaryButtonLabelTextSize: 'l',
|
|
122
125
|
primaryButtonShape: 'rounded',
|
|
123
126
|
primaryButtonSize: 'xxl',
|
|
@@ -127,15 +130,15 @@ var responseAppearance = {
|
|
|
127
130
|
secondaryButtonShape: 'rounded',
|
|
128
131
|
secondaryButtonSize: 'xxl',
|
|
129
132
|
secondaryButtonWidth: 'fill',
|
|
133
|
+
svgSrc: img$5,
|
|
130
134
|
titleTextColor: 'surfaceTextPrimary',
|
|
131
|
-
titleTextSize: '
|
|
135
|
+
titleTextSize: 'xxl',
|
|
132
136
|
titleTextWeight: 400,
|
|
133
137
|
},
|
|
134
|
-
|
|
135
|
-
svgSrc: img$4,
|
|
138
|
+
refresh: {
|
|
136
139
|
messageTextColor: 'surfaceTextPrimary',
|
|
137
140
|
messageTextSize: 'm',
|
|
138
|
-
messageTextWeight:
|
|
141
|
+
messageTextWeight: 400,
|
|
139
142
|
primaryButtonAppearance: 'surfaceTertiary',
|
|
140
143
|
primaryButtonLabelTextSize: 'l',
|
|
141
144
|
primaryButtonShape: 'rounded',
|
|
@@ -146,17 +149,36 @@ var responseAppearance = {
|
|
|
146
149
|
secondaryButtonShape: 'rounded',
|
|
147
150
|
secondaryButtonSize: 'xxl',
|
|
148
151
|
secondaryButtonWidth: 'fill',
|
|
152
|
+
svgSrc: img$3,
|
|
149
153
|
titleTextColor: 'surfaceTextPrimary',
|
|
150
|
-
titleTextSize: '
|
|
154
|
+
titleTextSize: 'xxl',
|
|
151
155
|
titleTextWeight: 400,
|
|
152
156
|
},
|
|
153
|
-
|
|
154
|
-
|
|
157
|
+
off: {
|
|
158
|
+
messageTextColor: 'surfaceTextPrimary',
|
|
159
|
+
messageTextSize: 'm',
|
|
160
|
+
messageTextWeight: 400,
|
|
161
|
+
primaryButtonAppearance: 'success',
|
|
162
|
+
primaryButtonLabelTextSize: 'l',
|
|
163
|
+
primaryButtonShape: 'rounded',
|
|
164
|
+
primaryButtonSize: 'xxl',
|
|
165
|
+
primaryButtonWidth: 'fill',
|
|
166
|
+
secondaryButtonAppearance: 'secondary',
|
|
167
|
+
secondaryButtonLabelTextSize: 'l',
|
|
168
|
+
secondaryButtonShape: 'rounded',
|
|
169
|
+
secondaryButtonSize: 'xxl',
|
|
170
|
+
secondaryButtonWidth: 'fill',
|
|
155
171
|
svgFill: 'errorPrimary',
|
|
156
172
|
svgPathFill: 'surfaceItemTertiary',
|
|
173
|
+
svgSrc: img$4,
|
|
174
|
+
titleTextColor: 'surfaceTextPrimary',
|
|
175
|
+
titleTextSize: 'xxl',
|
|
176
|
+
titleTextWeight: 400,
|
|
177
|
+
},
|
|
178
|
+
search: {
|
|
157
179
|
messageTextColor: 'surfaceTextPrimary',
|
|
158
180
|
messageTextSize: 'm',
|
|
159
|
-
messageTextWeight:
|
|
181
|
+
messageTextWeight: 400,
|
|
160
182
|
primaryButtonAppearance: 'surfaceTertiary',
|
|
161
183
|
primaryButtonLabelTextSize: 'l',
|
|
162
184
|
primaryButtonShape: 'rounded',
|
|
@@ -167,16 +189,18 @@ var responseAppearance = {
|
|
|
167
189
|
secondaryButtonShape: 'rounded',
|
|
168
190
|
secondaryButtonSize: 'xxl',
|
|
169
191
|
secondaryButtonWidth: 'fill',
|
|
192
|
+
svgFill: 'errorPrimary',
|
|
193
|
+
svgPathFill: 'surfaceItemTertiary',
|
|
194
|
+
svgSrc: img$2,
|
|
170
195
|
titleTextColor: 'surfaceTextPrimary',
|
|
171
|
-
titleTextSize: '
|
|
196
|
+
titleTextSize: 'xxl',
|
|
172
197
|
titleTextWeight: 400,
|
|
173
198
|
},
|
|
174
|
-
|
|
175
|
-
svgSrc: img$6,
|
|
199
|
+
success: {
|
|
176
200
|
messageTextColor: 'surfaceTextPrimary',
|
|
177
201
|
messageTextSize: 'm',
|
|
178
|
-
messageTextWeight:
|
|
179
|
-
primaryButtonAppearance: '
|
|
202
|
+
messageTextWeight: 400,
|
|
203
|
+
primaryButtonAppearance: 'accent',
|
|
180
204
|
primaryButtonLabelTextSize: 'l',
|
|
181
205
|
primaryButtonShape: 'rounded',
|
|
182
206
|
primaryButtonSize: 'xxl',
|
|
@@ -186,16 +210,16 @@ var responseAppearance = {
|
|
|
186
210
|
secondaryButtonShape: 'rounded',
|
|
187
211
|
secondaryButtonSize: 'xxl',
|
|
188
212
|
secondaryButtonWidth: 'fill',
|
|
213
|
+
svgSrc: img$1,
|
|
189
214
|
titleTextColor: 'surfaceTextPrimary',
|
|
190
|
-
titleTextSize: '
|
|
215
|
+
titleTextSize: 'xxl',
|
|
191
216
|
titleTextWeight: 400,
|
|
192
217
|
},
|
|
193
|
-
|
|
194
|
-
svgSrc: img$3,
|
|
218
|
+
warning: {
|
|
195
219
|
messageTextColor: 'surfaceTextPrimary',
|
|
196
220
|
messageTextSize: 'm',
|
|
197
|
-
messageTextWeight:
|
|
198
|
-
primaryButtonAppearance: '
|
|
221
|
+
messageTextWeight: 400,
|
|
222
|
+
primaryButtonAppearance: 'primary',
|
|
199
223
|
primaryButtonLabelTextSize: 'l',
|
|
200
224
|
primaryButtonShape: 'rounded',
|
|
201
225
|
primaryButtonSize: 'xxl',
|
|
@@ -205,8 +229,9 @@ var responseAppearance = {
|
|
|
205
229
|
secondaryButtonShape: 'rounded',
|
|
206
230
|
secondaryButtonSize: 'xxl',
|
|
207
231
|
secondaryButtonWidth: 'fill',
|
|
232
|
+
svgSrc: img,
|
|
208
233
|
titleTextColor: 'surfaceTextPrimary',
|
|
209
|
-
titleTextSize: '
|
|
234
|
+
titleTextSize: 'xxl',
|
|
210
235
|
titleTextWeight: 400,
|
|
211
236
|
},
|
|
212
237
|
};
|
|
@@ -222,10 +247,10 @@ function Response(props) {
|
|
|
222
247
|
// @ts-expect-error
|
|
223
248
|
var appearanceConfig = responseConfig.appearance && responseConfig.appearance[appearance];
|
|
224
249
|
var classGenerator = useDeviceTargetClassGenerator(props, appearanceConfig);
|
|
225
|
-
var borderColorClass = classGenerator.borderColorClass, borderColorHoverClass = classGenerator.borderColorHoverClass, borderTypeClass = classGenerator.borderTypeClass, borderWidthClass = classGenerator.borderWidthClass, fillClass = classGenerator.fillClass, fillHoverClass = classGenerator.fillHoverClass, shapeClass = classGenerator.shapeClass, svgFillClass = classGenerator.svgFillClass, svgPathFillClass = classGenerator.svgPathFillClass;
|
|
250
|
+
var borderColorClass = classGenerator.borderColorClass, borderColorHoverClass = classGenerator.borderColorHoverClass, borderTypeClass = classGenerator.borderTypeClass, borderWidthClass = classGenerator.borderWidthClass, fillClass = classGenerator.fillClass, fillHoverClass = classGenerator.fillHoverClass, shapeClass = classGenerator.shapeClass, svgFillClass = classGenerator.svgFillClass, svgPathFillClass = classGenerator.svgPathFillClass, textAlignClass = classGenerator.textAlignClass;
|
|
226
251
|
var ImageComponent = useMemo(function () {
|
|
227
|
-
var src = imageSrc || (appearanceConfig === null || appearanceConfig ===
|
|
228
|
-
var Image = SvgImage || (appearanceConfig === null || appearanceConfig ===
|
|
252
|
+
var src = imageSrc || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.imageSrc) || svgSrc || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.svgSrc);
|
|
253
|
+
var Image = SvgImage || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.SvgImage);
|
|
229
254
|
if (Image) {
|
|
230
255
|
var sizes = {};
|
|
231
256
|
if (width) {
|
|
@@ -238,7 +263,7 @@ function Response(props) {
|
|
|
238
263
|
}
|
|
239
264
|
if (src) {
|
|
240
265
|
if (src.endsWith('.svg') || src.startsWith('data:image/svg')) {
|
|
241
|
-
if (svgFillClass || (appearanceConfig === null || appearanceConfig ===
|
|
266
|
+
if (svgFillClass || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.svgFill)) {
|
|
242
267
|
return jsx(SVG, { preProcessor: removeFillStroke, src: src });
|
|
243
268
|
}
|
|
244
269
|
else {
|
|
@@ -250,12 +275,12 @@ function Response(props) {
|
|
|
250
275
|
return null;
|
|
251
276
|
}, [imageSrc, appearanceConfig, SvgImage, width, height, svgFillClass]);
|
|
252
277
|
// @ts-expect-error
|
|
253
|
-
var
|
|
254
|
-
return (jsxs("div", { className: clsx(className, 'response', fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass), shapeClass && "response_shape_".concat(shapeClass), borderColorClass && "border-color_".concat(borderColorClass), borderColorHoverClass && "border-color_hover_".concat(borderColorHoverClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderTypeClass && "border_type_".concat(borderTypeClass), set && "response_set_".concat(set)), style: responseStyles, children: [before, jsx("div", { className: clsx('response__image', svgFillClass && "svg_fill_".concat(svgFillClass), svgPathFillClass && "svg_path_fill_".concat(svgPathFillClass)), children: ImageComponent }), jsxs(Group, { className:
|
|
278
|
+
var _a = useStyles(props), responseStyles = _a.styles, wrapperStyles = _a.wrapper;
|
|
279
|
+
return (jsxs("div", { className: clsx(className, 'response', fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass), shapeClass && "response_shape_".concat(shapeClass), borderColorClass && "border-color_".concat(borderColorClass), borderColorHoverClass && "border-color_hover_".concat(borderColorHoverClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderTypeClass && "border_type_".concat(borderTypeClass), set && "response_set_".concat(set)), style: responseStyles, children: [before, jsxs("div", { className: "response__wrapper", style: wrapperStyles, children: [jsx("div", { className: clsx('response__image', svgFillClass && "svg_fill_".concat(svgFillClass), svgPathFillClass && "svg_path_fill_".concat(svgPathFillClass)), children: ImageComponent }), jsxs(Group, { className: clsx('response__desc', textAlignClass && "text-align_".concat(textAlignClass)), width: "fill", children: [title && (jsx(Text, { className: "response__title", size: titleTextSize || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.titleTextSize) || 'xxl', textColor: titleTextColor || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.titleTextColor), textWeight: titleTextWeight || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.titleTextWeight) || '400', children: title })), message && (jsx(Text, { className: "response__message", size: messageTextSize || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.messageTextSize) || 'm', textColor: messageTextColor || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.messageTextColor), textWeight: messageTextWeight || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.messageTextWeight), children: message }))] })] }), (primaryButtonLabel ||
|
|
255
280
|
primaryButton ||
|
|
256
281
|
secondaryButtonLabel ||
|
|
257
282
|
secondaryButton ||
|
|
258
|
-
appearanceConfig) && (jsxs(Group, { className: "response__button", width: "fill", children: [primaryButtonLabel || (appearanceConfig === null || appearanceConfig ===
|
|
283
|
+
appearanceConfig) && (jsxs(Group, { className: "response__button", width: "fill", children: [primaryButtonLabel || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.primaryButtonLabel) ? (jsx(Button, { className: "response__button-item", width: primaryButtonWidth || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.primaryButtonWidth) || 'fill', labelTextColor: primaryButtonLabelTextColor, labelTextSize: primaryButtonLabelTextSize || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.primaryButtonLabelTextSize), fill: primaryButtonFill, fillHover: primaryButtonFillHover, after: primaryButtonAfter, before: primaryButtonBefore, label: primaryButtonLabel || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.primaryButtonLabel), shape: primaryButtonShape || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.primaryButtonShape), size: primaryButtonSize || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.primaryButtonSize), appearance: primaryButtonAppearance || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.primaryButtonAppearance) || 'dev', onClick: onClickPrimaryButton })) : (primaryButton), secondaryButtonLabel || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.secondaryButtonLabel) ? (jsx(Button, { className: "response__button-item", width: secondaryButtonWidth || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.secondaryButtonWidth) || 'fill', labelTextColor: secondaryButtonLabelTextColor, labelTextSize: secondaryButtonLabelTextSize || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.secondaryButtonLabelTextSize), fill: secondaryButtonFill, fillHover: secondaryButtonFillHover, after: secondaryButtonAfter, before: secondaryButtonBefore, label: secondaryButtonLabel || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.secondaryButtonLabel), shape: secondaryButtonShape || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.secondaryButtonShape), size: secondaryButtonSize || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.secondaryButtonSize), appearance: secondaryButtonAppearance || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.secondaryButtonAppearance) || 'dev', onClick: onClickSecondaryButton })) : (secondaryButton)] })), after] }));
|
|
259
284
|
}
|
|
260
285
|
var removeFillStroke = function (code) {
|
|
261
286
|
return code
|
|
@@ -3,13 +3,14 @@ import clsx from 'clsx';
|
|
|
3
3
|
import SVG from 'react-inlinesvg';
|
|
4
4
|
import { useDeviceTargetClassGenerator } from '../hooks/useDeviceTargetClassGenerator.js';
|
|
5
5
|
import { useStyles } from '../hooks/useStyles.js';
|
|
6
|
-
import '../tslib.es6-
|
|
6
|
+
import '../tslib.es6-Bwu1Cn-t.js';
|
|
7
7
|
import 'react';
|
|
8
8
|
import 'lodash/camelCase';
|
|
9
9
|
import 'lodash/castArray';
|
|
10
10
|
import '../context/UIContext.js';
|
|
11
11
|
import '../hooks/useMediaQueries.js';
|
|
12
12
|
import 'react-responsive';
|
|
13
|
+
import '../utils/setViewportProperty.js';
|
|
13
14
|
import 'lodash/maxBy';
|
|
14
15
|
import 'lodash/upperFirst';
|
|
15
16
|
import '../hooks/styleAttributes.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as __assign } from '../tslib.es6-
|
|
1
|
+
import { _ as __assign } from '../tslib.es6-Bwu1Cn-t.js';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { useRef } from 'react';
|
|
4
4
|
import clsx from 'clsx';
|
|
@@ -10,6 +10,7 @@ import 'lodash/castArray';
|
|
|
10
10
|
import '../context/UIContext.js';
|
|
11
11
|
import '../hooks/useMediaQueries.js';
|
|
12
12
|
import 'react-responsive';
|
|
13
|
+
import '../utils/setViewportProperty.js';
|
|
13
14
|
import 'lodash/maxBy';
|
|
14
15
|
import 'lodash/upperFirst';
|
|
15
16
|
import '../hooks/styleAttributes.js';
|
|
@@ -3,19 +3,20 @@ import clsx from 'clsx';
|
|
|
3
3
|
import { ScrollLink } from 'react-scroll';
|
|
4
4
|
import { useDeviceTargetClassGenerator } from '../hooks/useDeviceTargetClassGenerator.js';
|
|
5
5
|
import { useStyles } from '../hooks/useStyles.js';
|
|
6
|
-
import '../tslib.es6-
|
|
6
|
+
import '../tslib.es6-Bwu1Cn-t.js';
|
|
7
7
|
import 'react';
|
|
8
8
|
import 'lodash/camelCase';
|
|
9
9
|
import 'lodash/castArray';
|
|
10
10
|
import '../context/UIContext.js';
|
|
11
11
|
import '../hooks/useMediaQueries.js';
|
|
12
12
|
import 'react-responsive';
|
|
13
|
+
import '../utils/setViewportProperty.js';
|
|
13
14
|
import 'lodash/maxBy';
|
|
14
15
|
import 'lodash/upperFirst';
|
|
15
16
|
import '../hooks/styleAttributes.js';
|
|
16
17
|
|
|
17
18
|
var ScrollToView = ScrollLink(function ScrollToView(props) {
|
|
18
|
-
var id = props.id, children = props.children, className = props.className, _a = props.tag, Tag = _a ===
|
|
19
|
+
var id = props.id, children = props.children, className = props.className, _a = props.tag, Tag = _a === void 0 ? 'div' : _a;
|
|
19
20
|
var classGenerator = useDeviceTargetClassGenerator(props);
|
|
20
21
|
var alignClass = classGenerator.alignClass, alignDirectionClass = classGenerator.alignDirectionClass, alignItemsClass = classGenerator.alignItemsClass, alignSelfClass = classGenerator.alignSelfClass, directionClass = classGenerator.directionClass, heightClass = classGenerator.heightClass, justifyContentClass = classGenerator.justifyContentClass, textColorActiveClass = classGenerator.textColorActiveClass, textColorClass = classGenerator.textColorClass, textColorHoverClass = classGenerator.textColorHoverClass, widthClass = classGenerator.widthClass;
|
|
21
22
|
var scrollToViewStyles = useStyles(props).styles;
|
|
@@ -3,22 +3,23 @@ import React, { useCallback } from 'react';
|
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import { useDeviceTargetClassGenerator } from '../hooks/useDeviceTargetClassGenerator.js';
|
|
5
5
|
import { useStyles } from '../hooks/useStyles.js';
|
|
6
|
-
import { I as Icon } from '../Icon-
|
|
7
|
-
import { T as Text } from '../Text-
|
|
8
|
-
import { S as Scrollbar } from '../Scrollbar-
|
|
9
|
-
import '../tslib.es6-
|
|
6
|
+
import { I as Icon } from '../Icon-BZa8B7te.js';
|
|
7
|
+
import { T as Text } from '../Text-JayJa3hj.js';
|
|
8
|
+
import { S as Scrollbar } from '../Scrollbar-Bo7z7ELm.js';
|
|
9
|
+
import '../tslib.es6-Bwu1Cn-t.js';
|
|
10
10
|
import 'lodash/camelCase';
|
|
11
11
|
import 'lodash/castArray';
|
|
12
12
|
import '../context/UIContext.js';
|
|
13
13
|
import '../hooks/useMediaQueries.js';
|
|
14
14
|
import 'react-responsive';
|
|
15
|
+
import '../utils/setViewportProperty.js';
|
|
15
16
|
import 'lodash/maxBy';
|
|
16
17
|
import 'lodash/upperFirst';
|
|
17
18
|
import '../hooks/styleAttributes.js';
|
|
18
19
|
import 'react-inlinesvg';
|
|
19
|
-
import '../Link-
|
|
20
|
-
import '../Tooltip-
|
|
21
|
-
import '../Title-
|
|
20
|
+
import '../Link-DN2LhPjD.js';
|
|
21
|
+
import '../Tooltip-1Jbub0K6.js';
|
|
22
|
+
import '../Title-CHgrIarR.js';
|
|
22
23
|
import 'react-scrollbars-custom';
|
|
23
24
|
|
|
24
25
|
var searchAppearance = {
|
|
@@ -38,7 +39,7 @@ var searchInputConfig = {
|
|
|
38
39
|
},
|
|
39
40
|
};
|
|
40
41
|
var SearchInput = React.forwardRef(function SearchInput(props, ref) {
|
|
41
|
-
var after = props.after, appearance = props.appearance, before = props.before, className = props.className, dataTour = props.dataTour, iconAfter = props.iconAfter, iconAfterFill = props.iconAfterFill, iconAfterSize = props.iconAfterSize, iconAfterSrc = props.iconAfterSrc, iconBefore = props.iconBefore, iconBeforeFill = props.iconBeforeFill, iconBeforeSize = props.iconBeforeSize, iconBeforeSrc = props.iconBeforeSrc, iconClear = props.iconClear, iconClearFill = props.iconClearFill, iconClearSize = props.iconClearSize, iconClearSrc = props.iconClearSrc, placeholder = props.placeholder, placeholderTextColor = props.placeholderTextColor, _a = props.placeholderTextSize, placeholderTextSize = _a ===
|
|
42
|
+
var after = props.after, appearance = props.appearance, before = props.before, className = props.className, dataTour = props.dataTour, iconAfter = props.iconAfter, iconAfterFill = props.iconAfterFill, iconAfterSize = props.iconAfterSize, iconAfterSrc = props.iconAfterSrc, iconBefore = props.iconBefore, iconBeforeFill = props.iconBeforeFill, iconBeforeSize = props.iconBeforeSize, iconBeforeSrc = props.iconBeforeSrc, iconClear = props.iconClear, iconClearFill = props.iconClearFill, iconClearSize = props.iconClearSize, iconClearSrc = props.iconClearSrc, placeholder = props.placeholder, placeholderTextColor = props.placeholderTextColor, _a = props.placeholderTextSize, placeholderTextSize = _a === void 0 ? 'm' : _a, placeholderTextStyle = props.placeholderTextStyle, placeholderTextWeight = props.placeholderTextWeight, _b = props.size, size = _b === void 0 ? 'normal' : _b, type = props.type, value = props.value, onChange = props.onChange, onClickClean = props.onClickClean, onFocus = props.onFocus, onKeyDown = props.onKeyDown;
|
|
42
43
|
var onChangeSearchInput = useCallback(function (event) {
|
|
43
44
|
onChange && onChange(event.target.value);
|
|
44
45
|
}, [onChange]);
|
|
@@ -55,11 +56,11 @@ var SearchInput = React.forwardRef(function SearchInput(props, ref) {
|
|
|
55
56
|
var borderColorClass = classGenerator.borderColorClass, borderHoverClass = classGenerator.borderHoverClass, borderTypeClass = classGenerator.borderTypeClass, borderWidthClass = classGenerator.borderWidthClass, fillClass = classGenerator.fillClass, inputFillClass = classGenerator.inputFillClass, inputShapeClass = classGenerator.inputShapeClass, inputTextColorClass = classGenerator.inputTextColorClass, inputTextSizeClass = classGenerator.inputTextSizeClass, inputTextStyleClass = classGenerator.inputTextStyleClass, inputTextWeightClass = classGenerator.inputTextWeightClass, shapeClass = classGenerator.shapeClass, widthClass = classGenerator.widthClass;
|
|
56
57
|
// @ts-expect-error
|
|
57
58
|
var searchInputStyles = useStyles(props).styles;
|
|
58
|
-
return (jsxs("label", { className: clsx(className, 'search-input', shapeClass && "search_shape_".concat(shapeClass), fillClass && "fill_".concat(fillClass), widthClass && "width_".concat(widthClass), borderColorClass && "border-color_".concat(borderColorClass), borderHoverClass && "border-color_hover_".concat(borderHoverClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderTypeClass && "border_type_".concat(borderTypeClass), size && "search-input_size_".concat(size), type && "search-input_type_".concat(type)), "data-tour": dataTour, style: searchInputStyles, children: [before, (iconBefore || iconBeforeSrc) && (jsx(Icon, { className: "search-input__icon search-input__icon-before", iconFill: iconBeforeFill || (appearanceConfig === null || appearanceConfig ===
|
|
59
|
+
return (jsxs("label", { className: clsx(className, 'search-input', shapeClass && "search_shape_".concat(shapeClass), fillClass && "fill_".concat(fillClass), widthClass && "width_".concat(widthClass), borderColorClass && "border-color_".concat(borderColorClass), borderHoverClass && "border-color_hover_".concat(borderHoverClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderTypeClass && "border_type_".concat(borderTypeClass), size && "search-input_size_".concat(size), type && "search-input_type_".concat(type)), "data-tour": dataTour, style: searchInputStyles, children: [before, (iconBefore || iconBeforeSrc) && (jsx(Icon, { className: "search-input__icon search-input__icon-before", iconFill: iconBeforeFill || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.iconBeforeFill), imageSrc: iconBeforeSrc || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.iconBeforeSrc), size: iconBeforeSize || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.iconBeforeSize), SvgImage: iconBefore || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.iconBefore) })), jsxs("div", { className: clsx('search-input__wrapper', inputFillClass && "fill_".concat(inputFillClass), inputShapeClass && "search-input_shape_".concat(inputShapeClass)), children: [jsx("input", { className: clsx('search-input__value', (inputTextSizeClass ||
|
|
59
60
|
inputTextWeightClass ||
|
|
60
61
|
inputTextColorClass ||
|
|
61
62
|
inputTextStyleClass) &&
|
|
62
|
-
'text', inputTextSizeClass && "text_size_".concat(inputTextSizeClass), inputTextWeightClass && "text-weight_".concat(inputTextWeightClass), inputTextColorClass && "text-color_".concat(inputTextColorClass), inputTextStyleClass && "text-style_".concat(inputTextStyleClass)), ref: ref, required: true, type: "text", value: value, onChange: onChangeSearchInput, onFocus: onFocus, onKeyDown: onKeyDown }), jsx("div", { className: "search-input__placeholder", children: jsx(Text, { className: clsx('search-input__placeholder-value'), size: placeholderTextSize || (appearanceConfig === null || appearanceConfig ===
|
|
63
|
+
'text', inputTextSizeClass && "text_size_".concat(inputTextSizeClass), inputTextWeightClass && "text-weight_".concat(inputTextWeightClass), inputTextColorClass && "text-color_".concat(inputTextColorClass), inputTextStyleClass && "text-style_".concat(inputTextStyleClass)), ref: ref, required: true, type: "text", value: value, onChange: onChangeSearchInput, onFocus: onFocus, onKeyDown: onKeyDown }), jsx("div", { className: "search-input__placeholder", children: jsx(Text, { className: clsx('search-input__placeholder-value'), size: placeholderTextSize || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.placeholderTextSize), textColor: placeholderTextColor || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.placeholderTextColor), textStyle: placeholderTextStyle, textWeight: placeholderTextWeight, children: placeholder || 'Search' }) }), value && (jsx(Icon, { className: clsx('search-input__clear', 'cursor_type_pointer'), iconFill: iconClearFill || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.iconClearFill), imageSrc: iconClearSrc || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.iconClearSrc), size: iconClearSize || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.iconClearSize), SvgImage: iconClear || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.iconClear), onClick: onClickClearIcon }))] }), (iconAfter || iconAfterSrc) && (jsx(Icon, { className: "search-input__icon search-input__icon-after", iconFill: iconAfterFill || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.iconAfterFill), imageSrc: iconAfterSrc || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.iconAfterSrc), size: iconAfterSize || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.iconAfterSize), SvgImage: iconAfter || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.iconAfter) })), after] }));
|
|
63
64
|
});
|
|
64
65
|
// @ts-expect-error
|
|
65
66
|
SearchInput.DEFAULT_REF_STATE = {
|
|
@@ -2,13 +2,14 @@ import { jsx, jsxs } from 'react/jsx-runtime';
|
|
|
2
2
|
import React, { useRef, useMemo, createRef, useCallback, useEffect } from 'react';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import { useDeviceTargetClassGenerator } from '../hooks/useDeviceTargetClassGenerator.js';
|
|
5
|
-
import { T as Text } from '../Text-
|
|
6
|
-
import '../tslib.es6-
|
|
5
|
+
import { T as Text } from '../Text-JayJa3hj.js';
|
|
6
|
+
import '../tslib.es6-Bwu1Cn-t.js';
|
|
7
7
|
import 'lodash/camelCase';
|
|
8
8
|
import 'lodash/castArray';
|
|
9
9
|
import '../context/UIContext.js';
|
|
10
10
|
import '../hooks/useMediaQueries.js';
|
|
11
11
|
import 'react-responsive';
|
|
12
|
+
import '../utils/setViewportProperty.js';
|
|
12
13
|
import '../hooks/useStyles.js';
|
|
13
14
|
import 'lodash/maxBy';
|
|
14
15
|
import 'lodash/upperFirst';
|
|
@@ -34,7 +35,7 @@ var segmentedConfig = {
|
|
|
34
35
|
},
|
|
35
36
|
};
|
|
36
37
|
var Segmented = React.forwardRef(function (props, ref) {
|
|
37
|
-
var isDisabled = props.isDisabled, _a = props.activeSegment, activeSegment = _a ===
|
|
38
|
+
var isDisabled = props.isDisabled, _a = props.activeSegment, activeSegment = _a === void 0 ? {} : _a, appearance = props.appearance, className = props.className, labelTextActiveColor = props.labelTextActiveColor, labelTextActiveHoverColor = props.labelTextActiveHoverColor, labelTextColor = props.labelTextColor, labelTextHoverColor = props.labelTextHoverColor, labelTextSize = props.labelTextSize, labelTextWrap = props.labelTextWrap, name = props.name, segments = props.segments, setActiveSegment = props.setActiveSegment, size = props.size, type = props.type, onChange = props.onChange;
|
|
38
39
|
var controlRef = useRef(null);
|
|
39
40
|
var segmentsRefs = useMemo(function () { return new Map(segments.map(function (item) { return [item.value, createRef()]; })); }, [segments]);
|
|
40
41
|
var onChangeValue = useCallback(function (item) {
|
|
@@ -45,14 +46,14 @@ var Segmented = React.forwardRef(function (props, ref) {
|
|
|
45
46
|
var _a, _b;
|
|
46
47
|
var offsetWidth = 0;
|
|
47
48
|
var offsetLeft = 0;
|
|
48
|
-
var activeSegmentRef = segmentsRefs.get(activeSegment === null || activeSegment ===
|
|
49
|
-
if (activeSegmentRef === null || activeSegmentRef ===
|
|
49
|
+
var activeSegmentRef = segmentsRefs.get(activeSegment === null || activeSegment === void 0 ? void 0 : activeSegment.value);
|
|
50
|
+
if (activeSegmentRef === null || activeSegmentRef === void 0 ? void 0 : activeSegmentRef.current) {
|
|
50
51
|
offsetWidth = activeSegmentRef.current.offsetWidth;
|
|
51
52
|
offsetLeft = activeSegmentRef.current.offsetLeft;
|
|
52
53
|
}
|
|
53
|
-
(_a = controlRef.current) === null || _a ===
|
|
54
|
+
(_a = controlRef.current) === null || _a === void 0 ? void 0 : _a.style.setProperty('--segmented-active-width', "".concat(offsetWidth, "px"));
|
|
54
55
|
// controlRef.current.style.setProperty('--segmented-active-x-pos', `${offsetLeft - 2}px`)
|
|
55
|
-
(_b = controlRef.current) === null || _b ===
|
|
56
|
+
(_b = controlRef.current) === null || _b === void 0 ? void 0 : _b.style.setProperty('--segmented-active-x-pos', "".concat(offsetLeft, "px"));
|
|
56
57
|
}, [activeSegment, segmentsRefs]);
|
|
57
58
|
// @ts-expect-error
|
|
58
59
|
var appearanceConfig = segmentedConfig.appearance && segmentedConfig.appearance[appearance];
|
|
@@ -60,15 +61,15 @@ var Segmented = React.forwardRef(function (props, ref) {
|
|
|
60
61
|
var borderTypeClass = classGenerator.borderTypeClass, borderWidthClass = classGenerator.borderWidthClass, fillClass = classGenerator.fillClass, fillHoverClass = classGenerator.fillHoverClass, indicatorFillClass = classGenerator.indicatorFillClass, inputBorderColorClass = classGenerator.inputBorderColorClass, shapeClass = classGenerator.shapeClass, widthClass = classGenerator.widthClass;
|
|
61
62
|
return (jsx("div", { className: clsx(className, 'segmented', shapeClass && "segmented_shape_".concat(shapeClass), fillClass && "fill_".concat(fillClass), widthClass && "segmented_width_".concat(widthClass), size
|
|
62
63
|
? "segmented_size_".concat(size)
|
|
63
|
-
: (appearanceConfig === null || appearanceConfig ===
|
|
64
|
+
: (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.size) &&
|
|
64
65
|
"segmented_size_".concat(appearanceConfig.size).replace(/([A-Z])/g, '-$1').toLowerCase(), type
|
|
65
66
|
? "segmented_type_".concat(type)
|
|
66
|
-
: (appearanceConfig === null || appearanceConfig ===
|
|
67
|
-
"segmented_type_".concat(appearanceConfig.type).replace(/([A-Z])/g, '-$1').toLowerCase(), inputBorderColorClass && "border-color_".concat(inputBorderColorClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderTypeClass && "border_type_".concat(borderTypeClass)), ref: controlRef, children: jsx("div", { className: "segmented__wrapper", children: jsxs("div", { className: clsx('segmented__wrapper-inner'), children: [segments === null || segments ===
|
|
68
|
-
? labelTextActiveColor || (appearanceConfig === null || appearanceConfig ===
|
|
69
|
-
: labelTextColor || (appearanceConfig === null || appearanceConfig ===
|
|
70
|
-
? labelTextActiveHoverColor || (appearanceConfig === null || appearanceConfig ===
|
|
71
|
-
: labelTextHoverColor || (appearanceConfig === null || appearanceConfig ===
|
|
67
|
+
: (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.type) &&
|
|
68
|
+
"segmented_type_".concat(appearanceConfig.type).replace(/([A-Z])/g, '-$1').toLowerCase(), inputBorderColorClass && "border-color_".concat(inputBorderColorClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderTypeClass && "border_type_".concat(borderTypeClass)), ref: controlRef, children: jsx("div", { className: "segmented__wrapper", children: jsxs("div", { className: clsx('segmented__wrapper-inner'), children: [segments === null || segments === void 0 ? void 0 : segments.map(function (item, i) { return (jsxs("div", { className: clsx('segmented__item', fillHoverClass && "fill_hover_".concat(fillHoverClass), item.value === (activeSegment === null || activeSegment === void 0 ? void 0 : activeSegment.value) && 'segmented__item_active', onChange && 'cursor_type_pointer', isDisabled && 'cursor_type_default'), ref: segmentsRefs.get(item.value), children: [jsx("input", { className: "segmented__item-radio", name: name, checked: item.value === (activeSegment === null || activeSegment === void 0 ? void 0 : activeSegment.value), id: item.label, type: "radio", value: item.value, onChange: function () { return onChangeValue(item); } }), jsx("label", { className: clsx('segmented__item-label'), htmlFor: item.label, children: jsx(Text, { className: clsx('segmented__item-label-text', labelTextWrap && "word-wrap_".concat(labelTextWrap)), size: labelTextSize || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.labelTextSize), textColor: item.value === (activeSegment === null || activeSegment === void 0 ? void 0 : activeSegment.value)
|
|
69
|
+
? labelTextActiveColor || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.labelTextActiveColor)
|
|
70
|
+
: labelTextColor || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.labelTextColor), textColorHover: item.value === (activeSegment === null || activeSegment === void 0 ? void 0 : activeSegment.value)
|
|
71
|
+
? labelTextActiveHoverColor || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.labelTextActiveHoverColor)
|
|
72
|
+
: labelTextHoverColor || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.labelTextHoverColor), children: item.label }) })] }, item.value)); }), jsx("div", { className: clsx('segmented__indicator', indicatorFillClass && "fill_".concat(indicatorFillClass)), children: "\u00A0" })] }) }) }));
|
|
72
73
|
});
|
|
73
74
|
Segmented.displayName = 'Segmented';
|
|
74
75
|
|