@itcase/ui 1.8.13 → 1.8.17
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/{Button_cjs_Bb9svkwu.js → Button_cjs_DjCsrrlr.js} +20 -39
- package/dist/{Button_es_Cd4sw9Q5.js → Button_es_CHDT0-8K.js} +20 -39
- package/dist/ChipsGroup_cjs_CTpMiyQb.js +164 -0
- package/dist/ChipsGroup_es_CP_xm25C.js +159 -0
- package/dist/DatePicker_cjs_DPtOL1eW.js +201 -0
- package/dist/DatePicker_es_DCuzMD0T.js +197 -0
- package/dist/Divider_cjs_DzFVtGkF.js +155 -0
- package/dist/Divider_es_BdU9qjKa.js +151 -0
- package/dist/{DropdownItem_cjs_TdJHpFgg.js → DropdownItem_cjs_DW0UXopm.js} +67 -3
- package/dist/{DropdownItem_es_CdYP5BQN.js → DropdownItem_es_vuNthDPa.js} +67 -3
- package/dist/{Label_cjs_CbcENlSZ.js → Label_cjs_mw4pHZR1.js} +29 -30
- package/dist/{Label_es_BCpDqP3q.js → Label_es_CiPEDFcR.js} +29 -30
- package/dist/{Loader_cjs_D753D3li.js → Loader_cjs_DZbIy6Ko.js} +1 -1
- package/dist/{Loader_es_BE4nyzXi.js → Loader_es_SHdP0IkA.js} +1 -1
- package/dist/Overlay_cjs_BdAm_zrO.js +229 -0
- package/dist/Overlay_es_cI_-_xUO.js +225 -0
- package/dist/{Text_cjs_D4xG0cKD.js → Text_cjs_iL1l_7V1.js} +31 -5
- package/dist/{Text_es_FJGduy7Z.js → Text_es_D012qJ8s.js} +31 -5
- package/dist/Tooltip_cjs_BKOjNMkt.js +676 -0
- package/dist/Tooltip_es_C7zstTA2.js +663 -0
- package/dist/cjs/components/Accordion.js +105 -12
- package/dist/cjs/components/Avatar.js +208 -10
- package/dist/cjs/components/Badge.js +6 -9
- package/dist/cjs/components/Breadcrumbs.js +205 -25
- package/dist/cjs/components/Button.js +5 -7
- package/dist/cjs/components/Cell.js +202 -8
- package/dist/cjs/components/Checkbox.js +1 -1
- package/dist/cjs/components/Chips.js +13 -132
- package/dist/cjs/components/Choice.js +5 -7
- package/dist/cjs/components/Code.js +116 -3
- package/dist/cjs/components/CookiesWarning.js +8 -10
- package/dist/cjs/components/DatePeriod.js +65 -0
- package/dist/cjs/components/DatePicker.js +20 -197
- package/dist/cjs/components/Divider.js +1 -1
- package/dist/cjs/components/Dropdown.js +3 -3
- package/dist/cjs/components/HeroTitle.js +26 -3
- package/dist/cjs/components/Icon.js +6 -8
- package/dist/cjs/components/InputPassword.js +4 -6
- package/dist/cjs/components/Label.js +5 -4
- package/dist/cjs/components/List.js +209 -3
- package/dist/cjs/components/Loader.js +2 -2
- package/dist/cjs/components/MenuItem.js +139 -6
- package/dist/cjs/components/Modal.js +7 -5
- package/dist/cjs/components/Notification.js +104 -27
- package/dist/cjs/components/Overlay.js +1 -1
- package/dist/cjs/components/Pagination.js +7 -9
- package/dist/cjs/components/Panel.js +1 -1
- package/dist/cjs/components/Radio.js +1 -1
- package/dist/cjs/components/Response.js +4 -6
- package/dist/cjs/components/Search.js +4 -6
- package/dist/cjs/components/Segmented.js +102 -10
- package/dist/cjs/components/Select.js +8 -11
- package/dist/cjs/components/Swiper.js +5 -2
- package/dist/cjs/components/Switch.js +1 -1
- package/dist/cjs/components/Tab.js +4 -7
- package/dist/cjs/components/Text.js +1 -1
- package/dist/cjs/components/Tile.js +3 -6
- package/dist/cjs/components/Title.js +7 -4
- package/dist/cjs/components/Tooltip.js +4 -3
- package/dist/components/Accordion.js +105 -11
- package/dist/components/Avatar.js +208 -10
- package/dist/components/Badge.js +3 -6
- package/dist/components/Breadcrumbs.js +206 -27
- package/dist/components/Button.js +5 -7
- package/dist/components/Cell.js +201 -7
- package/dist/components/Checkbox.js +1 -1
- package/dist/components/Chips.js +9 -133
- package/dist/components/Choice.js +3 -5
- package/dist/components/Code.js +116 -3
- package/dist/components/CookiesWarning.js +8 -10
- package/dist/components/DatePeriod.js +61 -0
- package/dist/components/DatePicker.js +17 -198
- package/dist/components/Divider.js +1 -1
- package/dist/components/Dropdown.js +3 -3
- package/dist/components/HeroTitle.js +26 -3
- package/dist/components/Icon.js +3 -5
- package/dist/components/InputPassword.js +3 -5
- package/dist/components/Label.js +5 -4
- package/dist/components/List.js +209 -3
- package/dist/components/Loader.js +2 -2
- package/dist/components/MenuItem.js +139 -6
- package/dist/components/Modal.js +6 -4
- package/dist/components/Notification.js +104 -27
- package/dist/components/Overlay.js +1 -1
- package/dist/components/Pagination.js +4 -6
- package/dist/components/Panel.js +1 -1
- package/dist/components/Radio.js +1 -1
- package/dist/components/Response.js +4 -6
- package/dist/components/Search.js +2 -4
- package/dist/components/Segmented.js +102 -10
- package/dist/components/Select.js +4 -7
- package/dist/components/Swiper.js +4 -1
- package/dist/components/Switch.js +1 -1
- package/dist/components/Tab.js +3 -6
- package/dist/components/Text.js +1 -1
- package/dist/components/Tile.js +2 -5
- package/dist/components/Title.js +4 -1
- package/dist/components/Tooltip.js +4 -3
- package/dist/css/components/Badge/Badge.css +4 -4
- package/dist/css/components/Chips/Chips.css +10 -6
- package/dist/css/components/DatePeriod/DatePeriod.css +105 -0
- package/dist/css/components/Group/Group.css +3 -0
- package/dist/css/components/Icon/Icon.css +78 -22
- package/dist/css/components/Segmented/Segmented.css +3 -6
- package/dist/css/components/Title/Title.css +11 -5
- package/dist/css/styles/border/border.css +14 -0
- package/dist/css/styles/fill/fill.css +2 -1
- package/dist/css/styles/text-color/text-color.css +2 -1
- package/dist/stories/BreadcrumbsItem.mdx +1 -1
- package/dist/stories/Plsyground.mdx +1 -3
- package/dist/stories/Text.mdx +1 -1
- package/dist/types/components/Accordion/Accordion.appearance.d.ts +1 -2
- package/dist/types/components/Accordion/appearance/accordionSize.d.ts +59 -0
- package/dist/types/components/Accordion/appearance/accordionStyle.d.ts +16 -0
- package/dist/types/components/Accordion/appearance/accordionSurface.d.ts +26 -0
- package/dist/types/components/Accordion/index.d.ts +2 -2
- package/dist/types/components/Avatar/appearance/avatarAccent.d.ts +19 -0
- package/dist/types/components/Avatar/appearance/avatarDanger.d.ts +7 -0
- package/dist/types/components/Avatar/appearance/avatarError.d.ts +9 -0
- package/dist/types/components/Avatar/appearance/avatarInfo.d.ts +17 -0
- package/dist/types/components/Avatar/appearance/avatarPrimary.d.ts +8 -0
- package/dist/types/components/Avatar/appearance/avatarSecondary.d.ts +8 -0
- package/dist/types/components/Avatar/appearance/avatarSize.d.ts +75 -0
- package/dist/types/components/Avatar/appearance/avatarStyle.d.ts +16 -0
- package/dist/types/components/Avatar/appearance/avatarSuccess.d.ts +9 -0
- package/dist/types/components/Avatar/appearance/avatarSurface.d.ts +25 -0
- package/dist/types/components/Avatar/appearance/avatarWarning.d.ts +9 -0
- package/dist/types/components/Badge/appearance/badgeAccent.d.ts +7 -0
- package/dist/types/components/Badge/appearance/badgeSurface.d.ts +0 -4
- package/dist/types/components/Breadcrumbs/Breadcrumbs.appearance.d.ts +2 -0
- package/dist/types/components/Breadcrumbs/Breadcrumbs.d.ts +3 -2
- package/dist/types/components/Breadcrumbs/Breadcrumbs.interface.d.ts +22 -1
- package/dist/types/components/Breadcrumbs/appearance/breadcrumbsAccent.d.ts +19 -0
- package/dist/types/components/Breadcrumbs/appearance/breadcrumbsDanger.d.ts +7 -0
- package/dist/types/components/Breadcrumbs/appearance/breadcrumbsError.d.ts +9 -0
- package/dist/types/components/Breadcrumbs/appearance/breadcrumbsInfo.d.ts +17 -0
- package/dist/types/components/Breadcrumbs/appearance/breadcrumbsPrimary.d.ts +8 -0
- package/dist/types/components/Breadcrumbs/appearance/breadcrumbsSecondary.d.ts +8 -0
- package/dist/types/components/Breadcrumbs/appearance/breadcrumbsSize.d.ts +52 -0
- package/dist/types/components/Breadcrumbs/appearance/breadcrumbsStyle.d.ts +16 -0
- package/dist/types/components/Breadcrumbs/appearance/breadcrumbsSuccess.d.ts +9 -0
- package/dist/types/components/Breadcrumbs/appearance/breadcrumbsSurface.d.ts +23 -0
- package/dist/types/components/Breadcrumbs/appearance/breadcrumbsWarning.d.ts +9 -0
- package/dist/types/components/Breadcrumbs/index.d.ts +1 -0
- package/dist/types/components/Button/appearance/buttonAccent.d.ts +0 -16
- package/dist/types/components/Button/appearance/buttonStyle.d.ts +7 -7
- package/dist/types/components/Button/appearance/buttonSurface.d.ts +6 -5
- package/dist/types/components/Cell/appearance/cellAccent.d.ts +21 -0
- package/dist/types/components/Cell/appearance/cellDanger.d.ts +7 -0
- package/dist/types/components/Cell/appearance/cellError.d.ts +11 -0
- package/dist/types/components/Cell/appearance/cellInfo.d.ts +21 -0
- package/dist/types/components/Cell/appearance/cellPrimary.d.ts +8 -0
- package/dist/types/components/Cell/appearance/cellSecondary.d.ts +8 -0
- package/dist/types/components/Cell/appearance/cellSize.d.ts +59 -0
- package/dist/types/components/Cell/appearance/cellStyle.d.ts +16 -0
- package/dist/types/components/Cell/appearance/cellSuccess.d.ts +11 -0
- package/dist/types/components/Cell/appearance/cellSurface.d.ts +25 -0
- package/dist/types/components/Cell/appearance/cellWarning.d.ts +11 -0
- package/dist/types/components/Chips/ChipsGroup.d.ts +2 -0
- package/dist/types/components/Chips/appearance/chipsSize.d.ts +4 -0
- package/dist/types/components/Chips/appearance/chipsStyle.d.ts +15 -1
- package/dist/types/components/Chips/appearance/chipsSurface.d.ts +2 -0
- package/dist/types/components/Chips/index.d.ts +1 -0
- package/dist/types/components/Code/Code.appearance.d.ts +1 -1
- package/dist/types/components/Code/appearance/codeDefault.d.ts +18 -0
- package/dist/types/components/Code/appearance/codeDisabled.d.ts +20 -0
- package/dist/types/components/Code/appearance/codeError.d.ts +11 -0
- package/dist/types/components/Code/appearance/codeRequire.d.ts +20 -0
- package/dist/types/components/Code/appearance/codeSize.d.ts +19 -0
- package/dist/types/components/Code/appearance/codeStyle.d.ts +16 -0
- package/dist/types/components/Code/appearance/codeSuccess.d.ts +11 -0
- package/dist/types/components/CookiesWarning/CookiesWarning.d.ts +1 -1
- package/dist/types/components/DatePeriod/DatePeriod.appearance.d.ts +2 -0
- package/dist/types/components/DatePeriod/DatePeriod.d.ts +4 -0
- package/dist/types/components/DatePeriod/DatePeriod.interface.d.ts +45 -0
- package/dist/types/components/DatePeriod/index.d.ts +2 -0
- package/dist/types/components/DatePicker/DatePicker.appearance.d.ts +3 -0
- package/dist/types/components/DatePicker/appearance/datePickerSize.d.ts +3 -0
- package/dist/types/components/Divider/Divider.appearance.d.ts +2 -2
- package/dist/types/components/Divider/Divider.interface.d.ts +3 -3
- package/dist/types/components/Divider/appearance/dividerAccent.d.ts +21 -0
- package/dist/types/components/Divider/appearance/dividerError.d.ts +11 -0
- package/dist/types/components/Divider/appearance/dividerPrimary.d.ts +8 -0
- package/dist/types/components/Divider/appearance/dividerSecondary.d.ts +8 -0
- package/dist/types/components/Divider/appearance/dividerSize.d.ts +12 -0
- package/dist/types/components/Divider/appearance/dividerStyle.d.ts +16 -0
- package/dist/types/components/Divider/appearance/dividerSuccess.d.ts +11 -0
- package/dist/types/components/Divider/appearance/dividerSurface.d.ts +25 -0
- package/dist/types/components/Divider/appearance/dividerWarning.d.ts +11 -0
- package/dist/types/components/Dropdown/appearance/dropdownAccent.d.ts +21 -0
- package/dist/types/components/Dropdown/appearance/dropdownSize.d.ts +27 -0
- package/dist/types/components/Dropdown/appearance/dropdownStyle.d.ts +16 -0
- package/dist/types/components/HeroTitle/HeroTitle.appearance.d.ts +2 -2
- package/dist/types/components/HeroTitle/HeroTitle.interface.d.ts +8 -8
- package/dist/types/components/HeroTitle/appearance/heroTitleSize.d.ts +27 -0
- package/dist/types/components/Icon/appearance/iconAccent.d.ts +34 -0
- package/dist/types/components/Icon/appearance/iconDanger.d.ts +11 -0
- package/dist/types/components/Icon/appearance/iconError.d.ts +11 -0
- package/dist/types/components/Icon/appearance/iconInfo.d.ts +21 -0
- package/dist/types/components/Icon/appearance/iconPrimary.d.ts +8 -0
- package/dist/types/components/Icon/appearance/iconSecondary.d.ts +8 -0
- package/dist/types/components/Icon/appearance/iconSize.d.ts +115 -0
- package/dist/types/components/Icon/appearance/iconStyle.d.ts +16 -0
- package/dist/types/components/Icon/appearance/iconSuccess.d.ts +11 -0
- package/dist/types/components/Icon/appearance/iconSurface.d.ts +27 -0
- package/dist/types/components/Icon/appearance/iconWarning.d.ts +11 -0
- package/dist/types/components/Label/appearance/labelDanger.d.ts +0 -2
- package/dist/types/components/Label/appearance/labelError.d.ts +6 -2
- package/dist/types/components/Label/appearance/labelGradient.d.ts +0 -2
- package/dist/types/components/Label/appearance/labelInfo.d.ts +2 -6
- package/dist/types/components/Label/appearance/labelSize.d.ts +0 -7
- package/dist/types/components/Label/appearance/labelStyle.d.ts +7 -7
- package/dist/types/components/Label/appearance/labelSuccess.d.ts +6 -2
- package/dist/types/components/Label/appearance/labelWarning.d.ts +6 -2
- package/dist/types/components/List/List.appearance.d.ts +2 -0
- package/dist/types/components/List/List.interface.d.ts +22 -1
- package/dist/types/components/List/appearance/listAccent.d.ts +21 -0
- package/dist/types/components/List/appearance/listDanger.d.ts +7 -0
- package/dist/types/components/List/appearance/listError.d.ts +11 -0
- package/dist/types/components/List/appearance/listInfo.d.ts +21 -0
- package/dist/types/components/List/appearance/listPrimary.d.ts +8 -0
- package/dist/types/components/List/appearance/listSecondary.d.ts +8 -0
- package/dist/types/components/List/appearance/listSize.d.ts +59 -0
- package/dist/types/components/List/appearance/listStyle.d.ts +16 -0
- package/dist/types/components/List/appearance/listSuccess.d.ts +11 -0
- package/dist/types/components/List/appearance/listSurface.d.ts +25 -0
- package/dist/types/components/List/appearance/listWarning.d.ts +11 -0
- package/dist/types/components/MenuItem/appearance/menuItemAccent.d.ts +21 -0
- package/dist/types/components/MenuItem/appearance/menuItemError.d.ts +11 -0
- package/dist/types/components/MenuItem/appearance/menuItemPrimary.d.ts +8 -0
- package/dist/types/components/MenuItem/appearance/menuItemSize.d.ts +59 -0
- package/dist/types/components/MenuItem/appearance/menuItemStyle.d.ts +16 -0
- package/dist/types/components/MenuItem/appearance/menuItemSurface.d.ts +25 -0
- package/dist/types/components/Notification/appearance/notificationItemError.d.ts +11 -0
- package/dist/types/components/Notification/appearance/notificationItemSize.d.ts +59 -0
- package/dist/types/components/Notification/appearance/notificationItemStyle.d.ts +16 -0
- package/dist/types/components/Notification/appearance/notificationItemSuccess.d.ts +11 -0
- package/dist/types/components/Notification/appearance/notificationItemWarning.d.ts +11 -0
- package/dist/types/components/Overlay/appearance/overlayAccent.d.ts +21 -0
- package/dist/types/components/Overlay/appearance/overlayDanger.d.ts +7 -0
- package/dist/types/components/Overlay/appearance/overlayError.d.ts +11 -0
- package/dist/types/components/Overlay/appearance/overlayInfo.d.ts +21 -0
- package/dist/types/components/Overlay/appearance/overlayPrimary.d.ts +8 -0
- package/dist/types/components/Overlay/appearance/overlaySecondary.d.ts +8 -0
- package/dist/types/components/Overlay/appearance/overlaySize.d.ts +59 -0
- package/dist/types/components/Overlay/appearance/overlayStyle.d.ts +16 -0
- package/dist/types/components/Overlay/appearance/overlaySuccess.d.ts +11 -0
- package/dist/types/components/Overlay/appearance/overlaySurface.d.ts +25 -0
- package/dist/types/components/Overlay/appearance/overlayWarning.d.ts +11 -0
- package/dist/types/components/Pagination/appearance/paginationAccent.d.ts +21 -0
- package/dist/types/components/Pagination/appearance/paginationDanger.d.ts +7 -0
- package/dist/types/components/Pagination/appearance/paginationError.d.ts +11 -0
- package/dist/types/components/Pagination/appearance/paginationInfo.d.ts +21 -0
- package/dist/types/components/Pagination/appearance/paginationPrimary.d.ts +8 -0
- package/dist/types/components/Pagination/appearance/paginationSecondary.d.ts +8 -0
- package/dist/types/components/Pagination/appearance/paginationSize.d.ts +59 -0
- package/dist/types/components/Pagination/appearance/paginationStyle.d.ts +16 -0
- package/dist/types/components/Pagination/appearance/paginationSuccess.d.ts +11 -0
- package/dist/types/components/Pagination/appearance/paginationWarning.d.ts +11 -0
- package/dist/types/components/Radio/appearance/radioDefault.d.ts +18 -0
- package/dist/types/components/Radio/appearance/radioError.d.ts +11 -0
- package/dist/types/components/Radio/appearance/radioRequire.d.ts +20 -0
- package/dist/types/components/Radio/appearance/radioSize.d.ts +27 -0
- package/dist/types/components/Radio/appearance/radioStyle.d.ts +16 -0
- package/dist/types/components/Radio/appearance/radioSuccess.d.ts +11 -0
- package/dist/types/components/Segmented/appearance/segmentedAccent.d.ts +19 -0
- package/dist/types/components/Segmented/appearance/segmentedDisabled.d.ts +18 -0
- package/dist/types/components/Segmented/appearance/segmentedError.d.ts +9 -0
- package/dist/types/components/Segmented/appearance/segmentedFalse.d.ts +4 -0
- package/dist/types/components/Segmented/appearance/segmentedSize.d.ts +10 -2
- package/dist/types/components/Segmented/appearance/segmentedStyle.d.ts +16 -0
- package/dist/types/components/Segmented/appearance/segmentedSuccess.d.ts +9 -0
- package/dist/types/components/Segmented/appearance/segmentedWarning.d.ts +9 -0
- package/dist/types/components/Text/Text.appearance.d.ts +2 -2
- package/dist/types/components/Text/Text.interface.d.ts +3 -3
- package/dist/types/components/Text/appearance/textSize.d.ts +31 -0
- package/package.json +5 -5
- package/dist/Badge_cjs_CeqDdbMs.js +0 -227
- package/dist/Badge_es_uDX0eyDM.js +0 -223
- package/dist/Divider_cjs_DakITdTv.js +0 -34
- package/dist/Divider_es_CWsDM2Rm.js +0 -30
- package/dist/Icon_cjs_BaWMPaAR.js +0 -67
- package/dist/Icon_es_B0sySEUu.js +0 -63
- package/dist/Overlay_cjs_BTSfcGrM.js +0 -33
- package/dist/Overlay_es_CR7d-ISF.js +0 -29
- package/dist/Title_cjs_ByPcFb15.js +0 -44
- package/dist/Title_es_eejUqSJf.js +0 -40
- package/dist/Tooltip_cjs_CY4HOzhz.js +0 -97
- package/dist/Tooltip_es_B9hN4Zlm.js +0 -93
- package/dist/stories/Divider.mdx +0 -35
- package/dist/stories/Icon.mdx +0 -15
- package/dist/stories/Loader.mdx +0 -11
- package/dist/stories/Segmented.mdx +0 -11
|
@@ -4,10 +4,10 @@ var tslib_es6 = require('./tslib.es6_cjs_CCZ3TN_7.js');
|
|
|
4
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var clsx = require('clsx');
|
|
7
|
-
var
|
|
7
|
+
var Tooltip = require('./Tooltip_cjs_BKOjNMkt.js');
|
|
8
8
|
var Link = require('./Link_cjs_yht44xJv.js');
|
|
9
|
-
var Loader = require('./
|
|
10
|
-
var Text = require('./
|
|
9
|
+
var Loader = require('./Loader_cjs_DZbIy6Ko.js');
|
|
10
|
+
var Text = require('./Text_cjs_iL1l_7V1.js');
|
|
11
11
|
var useDevicePropsGenerator = require('./cjs/hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
|
|
12
12
|
var useStyles = require('./cjs/hooks/useStyles/useStyles.js');
|
|
13
13
|
|
|
@@ -42,23 +42,7 @@ var buttonAppearanceAccent = {
|
|
|
42
42
|
borderColor: 'accentBorderPrimary',
|
|
43
43
|
loaderFill: 'accentPrimary',
|
|
44
44
|
loaderItemFill: 'accentItemPrimary',
|
|
45
|
-
}
|
|
46
|
-
full: {},
|
|
47
|
-
ghost: {
|
|
48
|
-
fill: null,
|
|
49
|
-
labelTextColor: 'accentTextSecondary',
|
|
50
|
-
borderColor: null,
|
|
51
|
-
},
|
|
52
|
-
outlined: {
|
|
53
|
-
fill: null,
|
|
54
|
-
labelTextColor: 'accentTextSecondary',
|
|
55
|
-
borderColor: 'accentBorderPrimary',
|
|
56
|
-
},
|
|
57
|
-
solid: {
|
|
58
|
-
fill: 'accentPrimary',
|
|
59
|
-
labelTextColor: 'accentTextPrimary',
|
|
60
|
-
borderColor: null,
|
|
61
|
-
},
|
|
45
|
+
}
|
|
62
46
|
};
|
|
63
47
|
|
|
64
48
|
var buttonAppearanceDanger = {
|
|
@@ -180,18 +164,18 @@ var buttonAppearanceSize = {
|
|
|
180
164
|
};
|
|
181
165
|
|
|
182
166
|
var buttonAppearanceStyle = {
|
|
183
|
-
full: {
|
|
184
|
-
borderColor: null,
|
|
185
|
-
},
|
|
167
|
+
full: {},
|
|
186
168
|
ghost: {
|
|
187
|
-
fill:
|
|
188
|
-
|
|
169
|
+
fill: 'none',
|
|
170
|
+
fillHover: 'none',
|
|
171
|
+
borderColor: '0',
|
|
189
172
|
},
|
|
190
173
|
outlined: {
|
|
191
|
-
fill:
|
|
174
|
+
fill: 'none',
|
|
175
|
+
fillHover: 'none',
|
|
192
176
|
},
|
|
193
177
|
solid: {
|
|
194
|
-
borderColor:
|
|
178
|
+
borderColor: '0',
|
|
195
179
|
},
|
|
196
180
|
};
|
|
197
181
|
|
|
@@ -213,11 +197,6 @@ var buttonAppearanceSurface = {
|
|
|
213
197
|
labelTextColor: 'surfaceTextPrimary',
|
|
214
198
|
iconFillIcon: 'surfaceItemPrimary',
|
|
215
199
|
},
|
|
216
|
-
surfaceQuaternary: {
|
|
217
|
-
fill: 'surfaceQuaternary',
|
|
218
|
-
fillHover: 'surfaceQuaternaryHover',
|
|
219
|
-
labelTextColor: 'surfaceTextPrimary',
|
|
220
|
-
},
|
|
221
200
|
surfaceSecondary: {
|
|
222
201
|
fill: 'surfaceSecondary',
|
|
223
202
|
fillHover: 'surfaceSecondaryHover',
|
|
@@ -230,6 +209,12 @@ var buttonAppearanceSurface = {
|
|
|
230
209
|
fillHover: 'surfaceTertiaryHover',
|
|
231
210
|
labelTextColor: 'surfaceTextPrimary',
|
|
232
211
|
},
|
|
212
|
+
surfaceQuaternary: {
|
|
213
|
+
fill: 'surfaceQuaternary',
|
|
214
|
+
fillHover: 'surfaceHover',
|
|
215
|
+
labelTextColor: 'surfaceTextPrimary',
|
|
216
|
+
labelTextColorHover: 'surfaceTextHover',
|
|
217
|
+
},
|
|
233
218
|
};
|
|
234
219
|
|
|
235
220
|
var buttonAppearanceWarning = {
|
|
@@ -252,17 +237,13 @@ var buttonConfig = {
|
|
|
252
237
|
},
|
|
253
238
|
};
|
|
254
239
|
var Button = React.forwardRef(function Button(props, ref) {
|
|
255
|
-
var className = props.className, appearance = props.appearance, label = props.label, isDisabled = props.isDisabled, Badge = props.Badge, dataTestId = props.dataTestId, dataTour = props.dataTour, href = props.href, _a = props.htmlType, htmlType = _a === void 0 ? 'button' : _a,
|
|
240
|
+
var className = props.className, appearance = props.appearance, label = props.label, isDisabled = props.isDisabled, Badge = props.Badge, dataTestId = props.dataTestId, dataTour = props.dataTour, href = props.href, _a = props.htmlType, htmlType = _a === void 0 ? 'button' : _a, link = props.link, rel = props.rel, target = props.target, before = props.before, after = props.after, _b = props.isLoading, isLoading = _b === void 0 ? false : _b, onClick = props.onClick, onMouseDown = props.onMouseDown, children = props.children;
|
|
256
241
|
var appearanceConfig = appearance === null || appearance === void 0 ? void 0 : appearance.split(' ').reduce(function (resultConfig, appearanceKey) {
|
|
257
242
|
var _a;
|
|
258
243
|
return (tslib_es6.__assign(tslib_es6.__assign({}, resultConfig), (_a = buttonConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearanceKey]));
|
|
259
244
|
}, {});
|
|
260
|
-
if (loading !== undefined) {
|
|
261
|
-
console.warn('DEPRECATED: prop Loading is deprecated, use isLoading');
|
|
262
|
-
}
|
|
263
|
-
var _isLoading = isLoading !== null && isLoading !== void 0 ? isLoading : loading;
|
|
264
245
|
var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
|
|
265
|
-
var fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, labelTextColor = propsGenerator.labelTextColor, labelTextColorHover = propsGenerator.labelTextColorHover, labelTextSize = propsGenerator.labelTextSize,
|
|
246
|
+
var fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, labelTextColor = propsGenerator.labelTextColor, labelTextColorHover = propsGenerator.labelTextColorHover, labelTextSize = propsGenerator.labelTextSize, labelTextTruncate = propsGenerator.labelTextTruncate, labelTextWeight = propsGenerator.labelTextWeight, labelTextWidth = propsGenerator.labelTextWidth, labelTextWrap = propsGenerator.labelTextWrap, borderColorClass = propsGenerator.borderColorClass, borderTypeClass = propsGenerator.borderTypeClass, borderWidthClass = propsGenerator.borderWidthClass, elevationClass = propsGenerator.elevationClass, icon = propsGenerator.icon, iconAfter = propsGenerator.iconAfter, iconAfterFill = propsGenerator.iconAfterFill, iconAfterFillIcon = propsGenerator.iconAfterFillIcon, iconAfterFillSize = propsGenerator.iconAfterFillSize, iconAfterShape = propsGenerator.iconAfterShape, iconAfterSize = propsGenerator.iconAfterSize, iconAfterSrc = propsGenerator.iconAfterSrc, iconBefore = propsGenerator.iconBefore, iconBeforeFill = propsGenerator.iconBeforeFill, iconBeforeFillIcon = propsGenerator.iconBeforeFillIcon, iconBeforeFillSize = propsGenerator.iconBeforeFillSize, iconBeforeShape = propsGenerator.iconBeforeShape, iconBeforeSize = propsGenerator.iconBeforeSize, iconBeforeSrc = propsGenerator.iconBeforeSrc, iconFill = propsGenerator.iconFill, iconFillIcon = propsGenerator.iconFillIcon, iconFillSize = propsGenerator.iconFillSize, iconShape = propsGenerator.iconShape, iconSize = propsGenerator.iconSize, iconSrc = propsGenerator.iconSrc, loaderFill = propsGenerator.loaderFill, loaderItemFill = propsGenerator.loaderItemFill, loaderShapeClass = propsGenerator.loaderShapeClass, _c = propsGenerator.loadertype, loadertype = _c === void 0 ? 'simple' : _c, shapeClass = propsGenerator.shapeClass, sizeClass = propsGenerator.sizeClass, widthClass = propsGenerator.widthClass, isSkeleton = propsGenerator.isSkeleton;
|
|
266
247
|
var shapeStrengthClass = propsGenerator.getClassName('shapeStrength', {
|
|
267
248
|
replace: [/\./, '-'],
|
|
268
249
|
});
|
|
@@ -285,7 +266,7 @@ var Button = React.forwardRef(function Button(props, ref) {
|
|
|
285
266
|
? 'button_type_icon'
|
|
286
267
|
: '', borderWidthClass && "border-width_".concat(borderWidthClass), borderColorClass && "border-color_".concat(borderColorClass), borderTypeClass && "border_type_".concat(borderTypeClass), fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass), shapeClass && "shape_".concat(shapeClass), shapeStrengthClass
|
|
287
268
|
? "shape-strength_".concat(shapeStrengthClass)
|
|
288
|
-
: shapeClass === 'rounded' && 'shape-strength_default', sizeClass && "button_size_".concat(sizeClass), widthClass && "button_width_".concat(widthClass), elevationClass && "elevation_".concat(elevationClass), onClick && 'cursor_type_pointer', isDisabled && 'cursor_type_default', Badge && 'button_type_badge',
|
|
269
|
+
: shapeClass === 'rounded' && 'shape-strength_default', sizeClass && "button_size_".concat(sizeClass), widthClass && "button_width_".concat(widthClass), elevationClass && "elevation_".concat(elevationClass), onClick && 'cursor_type_pointer', isDisabled && 'cursor_type_default', Badge && 'button_type_badge', isLoading && 'button_state_loading', isSkeleton && "button_skeleton"), type: htmlType, disabled: isDisabled, "data-testid": dataTestId && "".concat(dataTestId, "Button"), "data-tour": dataTour, DefaultComponent: "button", href: link || href, rel: rel, style: buttonStyles, target: target, onClick: onClick, onMouseDown: onMouseDown, children: jsxRuntime.jsxs("div", { className: "button__wrapper", ref: ref, children: [isLoading && (jsxRuntime.jsx(Loader.Loader, { className: clsx(className, 'button__loader', loaderShapeClass), type: loadertype, fill: loaderFill, itemFill: loaderItemFill })), before, (iconBefore || iconBeforeSrc) && (jsxRuntime.jsx(Tooltip.Icon, { className: "button__icon_before", size: iconBeforeSize, fill: iconBeforeFill, fillSize: iconBeforeFillSize, iconFill: iconBeforeFillIcon, imageSrc: iconBeforeSrc, shape: iconBeforeShape, SvgImage: iconBefore })), (icon || iconSrc) && (jsxRuntime.jsx(Tooltip.Icon, { className: "button__icon", size: iconSize, fill: iconFill, fillSize: iconFillSize, iconFill: iconFillIcon, imageSrc: iconSrc, shape: iconShape, SvgImage: icon })), (children || label) && (jsxRuntime.jsx(Text.Text, { className: "button__label", width: labelTextWidth, size: labelTextSize, textColor: labelTextColor, textColorHover: labelTextColorHover, textTruncate: labelTextTruncate, textWeight: labelTextWeight, textWrap: labelTextWrap, style: labelStyles, children: children || label })), (iconAfter || iconAfterSrc) && (jsxRuntime.jsx(Tooltip.Icon, { className: "button__icon_after", size: iconAfterSize, fill: iconAfterFill, fillSize: iconAfterFillSize, iconFill: iconAfterFillIcon, imageSrc: iconAfterSrc, shape: iconAfterShape, SvgImage: iconAfter })), Badge, after] }) }));
|
|
289
270
|
});
|
|
290
271
|
|
|
291
272
|
exports.Button = Button;
|
|
@@ -2,10 +2,10 @@ import { _ as __assign } from './tslib.es6_es_Bwu1Cn-t.js';
|
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
|
-
import { I as Icon } from './
|
|
5
|
+
import { I as Icon } from './Tooltip_es_C7zstTA2.js';
|
|
6
6
|
import { a as LinkWrapper } from './Link_es_DkW06IM-.js';
|
|
7
|
-
import { L as Loader } from './
|
|
8
|
-
import { T as Text } from './
|
|
7
|
+
import { L as Loader } from './Loader_es_SHdP0IkA.js';
|
|
8
|
+
import { T as Text } from './Text_es_D012qJ8s.js';
|
|
9
9
|
import { useDevicePropsGenerator } from './hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
10
10
|
import { useStyles } from './hooks/useStyles/useStyles.js';
|
|
11
11
|
|
|
@@ -40,23 +40,7 @@ var buttonAppearanceAccent = {
|
|
|
40
40
|
borderColor: 'accentBorderPrimary',
|
|
41
41
|
loaderFill: 'accentPrimary',
|
|
42
42
|
loaderItemFill: 'accentItemPrimary',
|
|
43
|
-
}
|
|
44
|
-
full: {},
|
|
45
|
-
ghost: {
|
|
46
|
-
fill: null,
|
|
47
|
-
labelTextColor: 'accentTextSecondary',
|
|
48
|
-
borderColor: null,
|
|
49
|
-
},
|
|
50
|
-
outlined: {
|
|
51
|
-
fill: null,
|
|
52
|
-
labelTextColor: 'accentTextSecondary',
|
|
53
|
-
borderColor: 'accentBorderPrimary',
|
|
54
|
-
},
|
|
55
|
-
solid: {
|
|
56
|
-
fill: 'accentPrimary',
|
|
57
|
-
labelTextColor: 'accentTextPrimary',
|
|
58
|
-
borderColor: null,
|
|
59
|
-
},
|
|
43
|
+
}
|
|
60
44
|
};
|
|
61
45
|
|
|
62
46
|
var buttonAppearanceDanger = {
|
|
@@ -178,18 +162,18 @@ var buttonAppearanceSize = {
|
|
|
178
162
|
};
|
|
179
163
|
|
|
180
164
|
var buttonAppearanceStyle = {
|
|
181
|
-
full: {
|
|
182
|
-
borderColor: null,
|
|
183
|
-
},
|
|
165
|
+
full: {},
|
|
184
166
|
ghost: {
|
|
185
|
-
fill:
|
|
186
|
-
|
|
167
|
+
fill: 'none',
|
|
168
|
+
fillHover: 'none',
|
|
169
|
+
borderColor: '0',
|
|
187
170
|
},
|
|
188
171
|
outlined: {
|
|
189
|
-
fill:
|
|
172
|
+
fill: 'none',
|
|
173
|
+
fillHover: 'none',
|
|
190
174
|
},
|
|
191
175
|
solid: {
|
|
192
|
-
borderColor:
|
|
176
|
+
borderColor: '0',
|
|
193
177
|
},
|
|
194
178
|
};
|
|
195
179
|
|
|
@@ -211,11 +195,6 @@ var buttonAppearanceSurface = {
|
|
|
211
195
|
labelTextColor: 'surfaceTextPrimary',
|
|
212
196
|
iconFillIcon: 'surfaceItemPrimary',
|
|
213
197
|
},
|
|
214
|
-
surfaceQuaternary: {
|
|
215
|
-
fill: 'surfaceQuaternary',
|
|
216
|
-
fillHover: 'surfaceQuaternaryHover',
|
|
217
|
-
labelTextColor: 'surfaceTextPrimary',
|
|
218
|
-
},
|
|
219
198
|
surfaceSecondary: {
|
|
220
199
|
fill: 'surfaceSecondary',
|
|
221
200
|
fillHover: 'surfaceSecondaryHover',
|
|
@@ -228,6 +207,12 @@ var buttonAppearanceSurface = {
|
|
|
228
207
|
fillHover: 'surfaceTertiaryHover',
|
|
229
208
|
labelTextColor: 'surfaceTextPrimary',
|
|
230
209
|
},
|
|
210
|
+
surfaceQuaternary: {
|
|
211
|
+
fill: 'surfaceQuaternary',
|
|
212
|
+
fillHover: 'surfaceHover',
|
|
213
|
+
labelTextColor: 'surfaceTextPrimary',
|
|
214
|
+
labelTextColorHover: 'surfaceTextHover',
|
|
215
|
+
},
|
|
231
216
|
};
|
|
232
217
|
|
|
233
218
|
var buttonAppearanceWarning = {
|
|
@@ -250,17 +235,13 @@ var buttonConfig = {
|
|
|
250
235
|
},
|
|
251
236
|
};
|
|
252
237
|
var Button = React.forwardRef(function Button(props, ref) {
|
|
253
|
-
var className = props.className, appearance = props.appearance, label = props.label, isDisabled = props.isDisabled, Badge = props.Badge, dataTestId = props.dataTestId, dataTour = props.dataTour, href = props.href, _a = props.htmlType, htmlType = _a === void 0 ? 'button' : _a,
|
|
238
|
+
var className = props.className, appearance = props.appearance, label = props.label, isDisabled = props.isDisabled, Badge = props.Badge, dataTestId = props.dataTestId, dataTour = props.dataTour, href = props.href, _a = props.htmlType, htmlType = _a === void 0 ? 'button' : _a, link = props.link, rel = props.rel, target = props.target, before = props.before, after = props.after, _b = props.isLoading, isLoading = _b === void 0 ? false : _b, onClick = props.onClick, onMouseDown = props.onMouseDown, children = props.children;
|
|
254
239
|
var appearanceConfig = appearance === null || appearance === void 0 ? void 0 : appearance.split(' ').reduce(function (resultConfig, appearanceKey) {
|
|
255
240
|
var _a;
|
|
256
241
|
return (__assign(__assign({}, resultConfig), (_a = buttonConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearanceKey]));
|
|
257
242
|
}, {});
|
|
258
|
-
if (loading !== undefined) {
|
|
259
|
-
console.warn('DEPRECATED: prop Loading is deprecated, use isLoading');
|
|
260
|
-
}
|
|
261
|
-
var _isLoading = isLoading !== null && isLoading !== void 0 ? isLoading : loading;
|
|
262
243
|
var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
263
|
-
var fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, labelTextColor = propsGenerator.labelTextColor, labelTextColorHover = propsGenerator.labelTextColorHover, labelTextSize = propsGenerator.labelTextSize,
|
|
244
|
+
var fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, labelTextColor = propsGenerator.labelTextColor, labelTextColorHover = propsGenerator.labelTextColorHover, labelTextSize = propsGenerator.labelTextSize, labelTextTruncate = propsGenerator.labelTextTruncate, labelTextWeight = propsGenerator.labelTextWeight, labelTextWidth = propsGenerator.labelTextWidth, labelTextWrap = propsGenerator.labelTextWrap, borderColorClass = propsGenerator.borderColorClass, borderTypeClass = propsGenerator.borderTypeClass, borderWidthClass = propsGenerator.borderWidthClass, elevationClass = propsGenerator.elevationClass, icon = propsGenerator.icon, iconAfter = propsGenerator.iconAfter, iconAfterFill = propsGenerator.iconAfterFill, iconAfterFillIcon = propsGenerator.iconAfterFillIcon, iconAfterFillSize = propsGenerator.iconAfterFillSize, iconAfterShape = propsGenerator.iconAfterShape, iconAfterSize = propsGenerator.iconAfterSize, iconAfterSrc = propsGenerator.iconAfterSrc, iconBefore = propsGenerator.iconBefore, iconBeforeFill = propsGenerator.iconBeforeFill, iconBeforeFillIcon = propsGenerator.iconBeforeFillIcon, iconBeforeFillSize = propsGenerator.iconBeforeFillSize, iconBeforeShape = propsGenerator.iconBeforeShape, iconBeforeSize = propsGenerator.iconBeforeSize, iconBeforeSrc = propsGenerator.iconBeforeSrc, iconFill = propsGenerator.iconFill, iconFillIcon = propsGenerator.iconFillIcon, iconFillSize = propsGenerator.iconFillSize, iconShape = propsGenerator.iconShape, iconSize = propsGenerator.iconSize, iconSrc = propsGenerator.iconSrc, loaderFill = propsGenerator.loaderFill, loaderItemFill = propsGenerator.loaderItemFill, loaderShapeClass = propsGenerator.loaderShapeClass, _c = propsGenerator.loadertype, loadertype = _c === void 0 ? 'simple' : _c, shapeClass = propsGenerator.shapeClass, sizeClass = propsGenerator.sizeClass, widthClass = propsGenerator.widthClass, isSkeleton = propsGenerator.isSkeleton;
|
|
264
245
|
var shapeStrengthClass = propsGenerator.getClassName('shapeStrength', {
|
|
265
246
|
replace: [/\./, '-'],
|
|
266
247
|
});
|
|
@@ -283,7 +264,7 @@ var Button = React.forwardRef(function Button(props, ref) {
|
|
|
283
264
|
? 'button_type_icon'
|
|
284
265
|
: '', borderWidthClass && "border-width_".concat(borderWidthClass), borderColorClass && "border-color_".concat(borderColorClass), borderTypeClass && "border_type_".concat(borderTypeClass), fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass), shapeClass && "shape_".concat(shapeClass), shapeStrengthClass
|
|
285
266
|
? "shape-strength_".concat(shapeStrengthClass)
|
|
286
|
-
: shapeClass === 'rounded' && 'shape-strength_default', sizeClass && "button_size_".concat(sizeClass), widthClass && "button_width_".concat(widthClass), elevationClass && "elevation_".concat(elevationClass), onClick && 'cursor_type_pointer', isDisabled && 'cursor_type_default', Badge && 'button_type_badge',
|
|
267
|
+
: shapeClass === 'rounded' && 'shape-strength_default', sizeClass && "button_size_".concat(sizeClass), widthClass && "button_width_".concat(widthClass), elevationClass && "elevation_".concat(elevationClass), onClick && 'cursor_type_pointer', isDisabled && 'cursor_type_default', Badge && 'button_type_badge', isLoading && 'button_state_loading', isSkeleton && "button_skeleton"), type: htmlType, disabled: isDisabled, "data-testid": dataTestId && "".concat(dataTestId, "Button"), "data-tour": dataTour, DefaultComponent: "button", href: link || href, rel: rel, style: buttonStyles, target: target, onClick: onClick, onMouseDown: onMouseDown, children: jsxs("div", { className: "button__wrapper", ref: ref, children: [isLoading && (jsx(Loader, { className: clsx(className, 'button__loader', loaderShapeClass), type: loadertype, fill: loaderFill, itemFill: loaderItemFill })), before, (iconBefore || iconBeforeSrc) && (jsx(Icon, { className: "button__icon_before", size: iconBeforeSize, fill: iconBeforeFill, fillSize: iconBeforeFillSize, iconFill: iconBeforeFillIcon, imageSrc: iconBeforeSrc, shape: iconBeforeShape, SvgImage: iconBefore })), (icon || iconSrc) && (jsx(Icon, { className: "button__icon", size: iconSize, fill: iconFill, fillSize: iconFillSize, iconFill: iconFillIcon, imageSrc: iconSrc, shape: iconShape, SvgImage: icon })), (children || label) && (jsx(Text, { className: "button__label", width: labelTextWidth, size: labelTextSize, textColor: labelTextColor, textColorHover: labelTextColorHover, textTruncate: labelTextTruncate, textWeight: labelTextWeight, textWrap: labelTextWrap, style: labelStyles, children: children || label })), (iconAfter || iconAfterSrc) && (jsx(Icon, { className: "button__icon_after", size: iconAfterSize, fill: iconAfterFill, fillSize: iconAfterFillSize, iconFill: iconAfterFillIcon, imageSrc: iconAfterSrc, shape: iconAfterShape, SvgImage: iconAfter })), Badge, after] }) }));
|
|
287
268
|
});
|
|
288
269
|
|
|
289
270
|
export { Button as B, buttonAppearance as a, buttonConfig as b };
|
|
@@ -0,0 +1,164 @@
|
|
|
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 useDevicePropsGenerator = require('./cjs/hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
|
|
8
|
+
var useStyles = require('./cjs/hooks/useStyles/useStyles.js');
|
|
9
|
+
var Tooltip = require('./Tooltip_cjs_BKOjNMkt.js');
|
|
10
|
+
var Text = require('./Text_cjs_iL1l_7V1.js');
|
|
11
|
+
|
|
12
|
+
var chipsAppearanceAccent = {
|
|
13
|
+
accent: {
|
|
14
|
+
fill: 'accentPrimary',
|
|
15
|
+
fillHover: 'accentPrimaryHover',
|
|
16
|
+
labelTextColor: 'accentTextPrimary',
|
|
17
|
+
borderColor: 'accentBorderSecondary',
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
var chipsAppearanceDanger = {};
|
|
22
|
+
|
|
23
|
+
var chipsAppearanceDisabled = {
|
|
24
|
+
disabled: {
|
|
25
|
+
fill: 'disabledPrimary',
|
|
26
|
+
fillActive: 'disabledPrimary',
|
|
27
|
+
fillHover: 'disabledPrimary',
|
|
28
|
+
labelTextColor: 'disabledTextPrimary',
|
|
29
|
+
labelTextHoverColor: 'disabledTextPrimary',
|
|
30
|
+
borderColor: 'disabledBorderPrimary',
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
var chipsAppearanceError = {};
|
|
35
|
+
|
|
36
|
+
var chipsAppearanceInfo = {};
|
|
37
|
+
|
|
38
|
+
var chipsAppearancePrimary = {
|
|
39
|
+
primary: {
|
|
40
|
+
fill: 'primaryPrimary',
|
|
41
|
+
fillHover: 'primaryPrimaryHover',
|
|
42
|
+
labelTextColor: 'primaryTextPrimary',
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
var chipsAppearanceSecondary = {
|
|
47
|
+
secondary: {
|
|
48
|
+
fill: 'secondaryPrimary',
|
|
49
|
+
fillHover: 'secondaryPrimaryHover',
|
|
50
|
+
labelTextColor: 'secondaryTextPrimary',
|
|
51
|
+
borderColor: 'secondaryBorderSecondary',
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
var chipsAppearanceSize = {
|
|
56
|
+
sizeM: {
|
|
57
|
+
size: 'm',
|
|
58
|
+
labelTextSize: 's',
|
|
59
|
+
},
|
|
60
|
+
sizeL: {
|
|
61
|
+
size: 'l',
|
|
62
|
+
labelTextSize: 'm',
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
var chipsAppearanceStyle = {
|
|
67
|
+
full: {
|
|
68
|
+
borderColor: null,
|
|
69
|
+
},
|
|
70
|
+
ghost: {
|
|
71
|
+
fill: null,
|
|
72
|
+
borderColor: null,
|
|
73
|
+
},
|
|
74
|
+
outlined: {
|
|
75
|
+
fill: null,
|
|
76
|
+
},
|
|
77
|
+
solid: {
|
|
78
|
+
borderColor: null,
|
|
79
|
+
},
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
var chipsAppearanceSuccess = {};
|
|
83
|
+
|
|
84
|
+
var chipsAppearanceSurface = {
|
|
85
|
+
surfacePrimary: {
|
|
86
|
+
fill: 'surfacePrimary',
|
|
87
|
+
fillActive: 'accentPrimary',
|
|
88
|
+
fillActiveHover: 'accentSecondary',
|
|
89
|
+
fillHover: 'surfaceHover',
|
|
90
|
+
labelTextActiveColor: 'accentTextPrimary',
|
|
91
|
+
labelTextColor: 'surfaceTextPrimary',
|
|
92
|
+
labelTextHoverColor: 'surfaceTextPrimary',
|
|
93
|
+
borderColor: 'surfaceBorderTertiary',
|
|
94
|
+
activeIconItemFill: 'surfaceItemSecondary',
|
|
95
|
+
iconBeforeFillIcon: 'surfaceItemPrimary',
|
|
96
|
+
badgeAppearance: 'surfacePrimary sizeXS solid'
|
|
97
|
+
},
|
|
98
|
+
surfaceSecondary: {
|
|
99
|
+
fill: 'surfaceSecondary',
|
|
100
|
+
fillHover: 'surfaceHover',
|
|
101
|
+
labelTextColor: 'surfaceTextPrimary',
|
|
102
|
+
borderColor: 'surfaceBorderSecondary',
|
|
103
|
+
},
|
|
104
|
+
surfaceTertiary: {
|
|
105
|
+
fill: 'surfaceTertiary',
|
|
106
|
+
fillHover: 'surfaceHover',
|
|
107
|
+
labelTextColor: 'surfaceTextPrimary',
|
|
108
|
+
borderColor: 'surfaceBorderTertiary',
|
|
109
|
+
},
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
var chipsAppearanceWarning = {};
|
|
113
|
+
|
|
114
|
+
var chipsAppearance = tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign({}, chipsAppearanceSize), chipsAppearanceStyle), chipsAppearanceAccent), chipsAppearanceDanger), chipsAppearanceError), chipsAppearanceInfo), chipsAppearancePrimary), chipsAppearanceSecondary), chipsAppearanceSuccess), chipsAppearanceSurface), chipsAppearanceWarning), chipsAppearanceDisabled);
|
|
115
|
+
|
|
116
|
+
var chipsConfig = {
|
|
117
|
+
appearance: chipsAppearance,
|
|
118
|
+
setAppearance: function (appearanceConfig) {
|
|
119
|
+
chipsConfig.appearance = appearanceConfig;
|
|
120
|
+
},
|
|
121
|
+
};
|
|
122
|
+
function Chips(props) {
|
|
123
|
+
var className = props.className, appearance = props.appearance, _a = props.label, label = _a === void 0 ? '' : _a, isDisabled = props.isDisabled, dataTestId = props.dataTestId, dataTour = props.dataTour, iconAfter = props.iconAfter, iconAfterSrc = props.iconAfterSrc, iconBefore = props.iconBefore, iconBeforeSrc = props.iconBeforeSrc, isActive = props.isActive, onClick = props.onClick, children = props.children;
|
|
124
|
+
var appearanceConfig = React.useMemo(function () {
|
|
125
|
+
if (appearance) {
|
|
126
|
+
var appearanceProps = appearance.split(' ').reduce(function (resultConfig, appearanceKey) {
|
|
127
|
+
var _a;
|
|
128
|
+
return (tslib_es6.__assign(tslib_es6.__assign({}, resultConfig), (_a = chipsConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearanceKey]));
|
|
129
|
+
}, {});
|
|
130
|
+
if (isDisabled && chipsConfig.appearance.disabled) {
|
|
131
|
+
Object.assign(appearanceProps, chipsConfig.appearance.disabled);
|
|
132
|
+
}
|
|
133
|
+
return appearanceProps;
|
|
134
|
+
}
|
|
135
|
+
if (isDisabled) {
|
|
136
|
+
return chipsConfig.appearance.disabled;
|
|
137
|
+
}
|
|
138
|
+
return {};
|
|
139
|
+
}, [appearance, isDisabled]);
|
|
140
|
+
var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
|
|
141
|
+
var alignClass = propsGenerator.alignClass, alignDirectionClass = propsGenerator.alignDirectionClass, fillActiveClass = propsGenerator.fillActiveClass, fillActiveHoverClass = propsGenerator.fillActiveHoverClass, fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, labelTextActiveColor = propsGenerator.labelTextActiveColor, labelTextActiveHoverColor = propsGenerator.labelTextActiveHoverColor, labelTextColor = propsGenerator.labelTextColor, labelTextHoverColor = propsGenerator.labelTextHoverColor, labelTextSize = propsGenerator.labelTextSize, labelTextWeight = propsGenerator.labelTextWeight, labelTextWrap = propsGenerator.labelTextWrap, borderColorClass = propsGenerator.borderColorClass, borderTypeClass = propsGenerator.borderTypeClass, badgeAppearance = propsGenerator.badgeAppearance, badgeShape = propsGenerator.badgeShape, badgeSize = propsGenerator.badgeSize, badgeTextColor = propsGenerator.badgeTextColor, badgeTextSize = propsGenerator.badgeTextSize, badgeValue = propsGenerator.badgeValue, cursorClass = propsGenerator.cursorClass, iconAfterFill = propsGenerator.iconAfterFill, iconAfterFillIcon = propsGenerator.iconAfterFillIcon, iconAfterFillSize = propsGenerator.iconAfterFillSize, iconAfterShape = propsGenerator.iconAfterShape, iconAfterSize = propsGenerator.iconAfterSize, iconBeforeFill = propsGenerator.iconBeforeFill, iconBeforeFillIcon = propsGenerator.iconBeforeFillIcon, iconBeforeFillSize = propsGenerator.iconBeforeFillSize, iconBeforeShape = propsGenerator.iconBeforeShape, iconBeforeSize = propsGenerator.iconBeforeSize, shapeClass = propsGenerator.shapeClass, sizeClass = propsGenerator.sizeClass;
|
|
142
|
+
var chipsStyles = useStyles.useStyles(props).styles;
|
|
143
|
+
return (jsxRuntime.jsx("div", { className: clsx(className, 'chips', isActive && 'chips_state_active', !isActive
|
|
144
|
+
? fillClass && "fill_".concat(fillClass)
|
|
145
|
+
: fillActiveClass && "fill_active_".concat(fillActiveClass), !isActive
|
|
146
|
+
? fillHoverClass && "fill_hover_".concat(fillHoverClass)
|
|
147
|
+
: fillActiveHoverClass && "fill_active_hover_".concat(fillActiveHoverClass), shapeClass && "chips_shape_".concat(shapeClass), borderColorClass && "border-color_".concat(borderColorClass), borderTypeClass && "border_type_".concat(borderTypeClass), sizeClass && "chips_size_".concat(sizeClass), alignDirectionClass && "align_".concat(alignDirectionClass), alignClass && "align_".concat(alignClass), isDisabled && "chips_state_disabled", cursorClass && "cursor_".concat(cursorClass), onClick && 'cursor_type_pointer'), "data-testid": dataTestId && "".concat(dataTestId, "Chips"), "data-tour": dataTour, style: chipsStyles, onClick: !isDisabled ? onClick : undefined, children: jsxRuntime.jsxs("div", { className: "chips__inner", children: [(iconBefore || iconBeforeSrc) && (jsxRuntime.jsx(Tooltip.Icon, { className: "chips__icon_before", size: iconBeforeSize, fill: iconBeforeFill, fillSize: iconBeforeFillSize, iconFill: iconBeforeFillIcon, imageSrc: iconBeforeSrc, shape: iconBeforeShape, SvgImage: iconBefore })), typeof label === 'string' ? (jsxRuntime.jsx(Text.Text, { className: "chips__label", size: labelTextSize, textColor: labelTextColor, textColorActive: isActive && labelTextActiveColor, textColorHover: !isDisabled && !isActive
|
|
148
|
+
? labelTextHoverColor
|
|
149
|
+
: labelTextActiveHoverColor, textWeight: labelTextWeight, textWrap: labelTextWrap, children: label })) : (jsxRuntime.jsx("div", { className: "chips__label", children: label })), children, (iconAfter || iconAfterSrc) && (jsxRuntime.jsx(Tooltip.Icon, { className: "chips__icon_after", size: iconAfterSize, fill: iconAfterFill, fillSize: iconAfterFillSize, iconFill: iconAfterFillIcon, imageSrc: iconAfterSrc, shape: iconAfterShape, SvgImage: iconAfter })), badgeValue && (jsxRuntime.jsx(Tooltip.Badge, { className: "chips__badge", appearance: badgeAppearance, size: badgeSize, textColor: badgeTextColor, shape: badgeShape, textSize: badgeTextSize, value: badgeValue }))] }) }));
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
function ChipsGroup(props) {
|
|
153
|
+
var className = props.className, dataTestId = props.dataTestId, dataTour = props.dataTour, horizontalScroll = props.horizontalScroll, style = props.style, set = props.set, children = props.children;
|
|
154
|
+
var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props);
|
|
155
|
+
var directionClass = propsGenerator.directionClass, alignClass = propsGenerator.alignClass, alignDirectionClass = propsGenerator.alignDirectionClass, fillClass = propsGenerator.fillClass, borderColorClass = propsGenerator.borderColorClass, borderTypeClass = propsGenerator.borderTypeClass, borderWidthClass = propsGenerator.borderWidthClass, contentAlignClass = propsGenerator.contentAlignClass, widthClass = propsGenerator.widthClass, wrapClass = propsGenerator.wrapClass;
|
|
156
|
+
// @ts-expect-error
|
|
157
|
+
var _a = useStyles.useStyles(props), groupStyles = _a.styles, groupWrapperStyles = _a.wrapper;
|
|
158
|
+
return (jsxRuntime.jsx("div", { className: clsx(className, 'chips-group', 'group', widthClass && "width_".concat(widthClass), contentAlignClass && "group_content-align_".concat(contentAlignClass), alignDirectionClass && "align_".concat(alignDirectionClass), directionClass && "group_direction_".concat(directionClass), alignClass && "align_".concat(alignClass), fillClass && "fill_".concat(fillClass), set && "group_set_".concat(set), horizontalScroll && 'group_type_horizontal_scroll', wrapClass && "group_wrap_".concat(wrapClass), borderColorClass && "border-color_".concat(borderColorClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderTypeClass && "border_type_".concat(borderTypeClass)), "data-testid": dataTestId, "data-tour": dataTour, style: Object.assign({}, groupStyles, style), children: horizontalScroll ? (jsxRuntime.jsx("div", { className: "chips-group__wrapper", style: groupWrapperStyles, children: children })) : (children) }));
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
exports.Chips = Chips;
|
|
162
|
+
exports.ChipsGroup = ChipsGroup;
|
|
163
|
+
exports.chipsAppearance = chipsAppearance;
|
|
164
|
+
exports.chipsConfig = chipsConfig;
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { _ as __assign } from './tslib.es6_es_Bwu1Cn-t.js';
|
|
2
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
+
import { useMemo } from 'react';
|
|
4
|
+
import clsx from 'clsx';
|
|
5
|
+
import { useDevicePropsGenerator } from './hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
6
|
+
import { useStyles } from './hooks/useStyles/useStyles.js';
|
|
7
|
+
import { I as Icon, B as Badge } from './Tooltip_es_C7zstTA2.js';
|
|
8
|
+
import { T as Text } from './Text_es_D012qJ8s.js';
|
|
9
|
+
|
|
10
|
+
var chipsAppearanceAccent = {
|
|
11
|
+
accent: {
|
|
12
|
+
fill: 'accentPrimary',
|
|
13
|
+
fillHover: 'accentPrimaryHover',
|
|
14
|
+
labelTextColor: 'accentTextPrimary',
|
|
15
|
+
borderColor: 'accentBorderSecondary',
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
var chipsAppearanceDanger = {};
|
|
20
|
+
|
|
21
|
+
var chipsAppearanceDisabled = {
|
|
22
|
+
disabled: {
|
|
23
|
+
fill: 'disabledPrimary',
|
|
24
|
+
fillActive: 'disabledPrimary',
|
|
25
|
+
fillHover: 'disabledPrimary',
|
|
26
|
+
labelTextColor: 'disabledTextPrimary',
|
|
27
|
+
labelTextHoverColor: 'disabledTextPrimary',
|
|
28
|
+
borderColor: 'disabledBorderPrimary',
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
var chipsAppearanceError = {};
|
|
33
|
+
|
|
34
|
+
var chipsAppearanceInfo = {};
|
|
35
|
+
|
|
36
|
+
var chipsAppearancePrimary = {
|
|
37
|
+
primary: {
|
|
38
|
+
fill: 'primaryPrimary',
|
|
39
|
+
fillHover: 'primaryPrimaryHover',
|
|
40
|
+
labelTextColor: 'primaryTextPrimary',
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
var chipsAppearanceSecondary = {
|
|
45
|
+
secondary: {
|
|
46
|
+
fill: 'secondaryPrimary',
|
|
47
|
+
fillHover: 'secondaryPrimaryHover',
|
|
48
|
+
labelTextColor: 'secondaryTextPrimary',
|
|
49
|
+
borderColor: 'secondaryBorderSecondary',
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
var chipsAppearanceSize = {
|
|
54
|
+
sizeM: {
|
|
55
|
+
size: 'm',
|
|
56
|
+
labelTextSize: 's',
|
|
57
|
+
},
|
|
58
|
+
sizeL: {
|
|
59
|
+
size: 'l',
|
|
60
|
+
labelTextSize: 'm',
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
var chipsAppearanceStyle = {
|
|
65
|
+
full: {
|
|
66
|
+
borderColor: null,
|
|
67
|
+
},
|
|
68
|
+
ghost: {
|
|
69
|
+
fill: null,
|
|
70
|
+
borderColor: null,
|
|
71
|
+
},
|
|
72
|
+
outlined: {
|
|
73
|
+
fill: null,
|
|
74
|
+
},
|
|
75
|
+
solid: {
|
|
76
|
+
borderColor: null,
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
var chipsAppearanceSuccess = {};
|
|
81
|
+
|
|
82
|
+
var chipsAppearanceSurface = {
|
|
83
|
+
surfacePrimary: {
|
|
84
|
+
fill: 'surfacePrimary',
|
|
85
|
+
fillActive: 'accentPrimary',
|
|
86
|
+
fillActiveHover: 'accentSecondary',
|
|
87
|
+
fillHover: 'surfaceHover',
|
|
88
|
+
labelTextActiveColor: 'accentTextPrimary',
|
|
89
|
+
labelTextColor: 'surfaceTextPrimary',
|
|
90
|
+
labelTextHoverColor: 'surfaceTextPrimary',
|
|
91
|
+
borderColor: 'surfaceBorderTertiary',
|
|
92
|
+
activeIconItemFill: 'surfaceItemSecondary',
|
|
93
|
+
iconBeforeFillIcon: 'surfaceItemPrimary',
|
|
94
|
+
badgeAppearance: 'surfacePrimary sizeXS solid'
|
|
95
|
+
},
|
|
96
|
+
surfaceSecondary: {
|
|
97
|
+
fill: 'surfaceSecondary',
|
|
98
|
+
fillHover: 'surfaceHover',
|
|
99
|
+
labelTextColor: 'surfaceTextPrimary',
|
|
100
|
+
borderColor: 'surfaceBorderSecondary',
|
|
101
|
+
},
|
|
102
|
+
surfaceTertiary: {
|
|
103
|
+
fill: 'surfaceTertiary',
|
|
104
|
+
fillHover: 'surfaceHover',
|
|
105
|
+
labelTextColor: 'surfaceTextPrimary',
|
|
106
|
+
borderColor: 'surfaceBorderTertiary',
|
|
107
|
+
},
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
var chipsAppearanceWarning = {};
|
|
111
|
+
|
|
112
|
+
var chipsAppearance = __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, chipsAppearanceSize), chipsAppearanceStyle), chipsAppearanceAccent), chipsAppearanceDanger), chipsAppearanceError), chipsAppearanceInfo), chipsAppearancePrimary), chipsAppearanceSecondary), chipsAppearanceSuccess), chipsAppearanceSurface), chipsAppearanceWarning), chipsAppearanceDisabled);
|
|
113
|
+
|
|
114
|
+
var chipsConfig = {
|
|
115
|
+
appearance: chipsAppearance,
|
|
116
|
+
setAppearance: function (appearanceConfig) {
|
|
117
|
+
chipsConfig.appearance = appearanceConfig;
|
|
118
|
+
},
|
|
119
|
+
};
|
|
120
|
+
function Chips(props) {
|
|
121
|
+
var className = props.className, appearance = props.appearance, _a = props.label, label = _a === void 0 ? '' : _a, isDisabled = props.isDisabled, dataTestId = props.dataTestId, dataTour = props.dataTour, iconAfter = props.iconAfter, iconAfterSrc = props.iconAfterSrc, iconBefore = props.iconBefore, iconBeforeSrc = props.iconBeforeSrc, isActive = props.isActive, onClick = props.onClick, children = props.children;
|
|
122
|
+
var appearanceConfig = useMemo(function () {
|
|
123
|
+
if (appearance) {
|
|
124
|
+
var appearanceProps = appearance.split(' ').reduce(function (resultConfig, appearanceKey) {
|
|
125
|
+
var _a;
|
|
126
|
+
return (__assign(__assign({}, resultConfig), (_a = chipsConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearanceKey]));
|
|
127
|
+
}, {});
|
|
128
|
+
if (isDisabled && chipsConfig.appearance.disabled) {
|
|
129
|
+
Object.assign(appearanceProps, chipsConfig.appearance.disabled);
|
|
130
|
+
}
|
|
131
|
+
return appearanceProps;
|
|
132
|
+
}
|
|
133
|
+
if (isDisabled) {
|
|
134
|
+
return chipsConfig.appearance.disabled;
|
|
135
|
+
}
|
|
136
|
+
return {};
|
|
137
|
+
}, [appearance, isDisabled]);
|
|
138
|
+
var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
139
|
+
var alignClass = propsGenerator.alignClass, alignDirectionClass = propsGenerator.alignDirectionClass, fillActiveClass = propsGenerator.fillActiveClass, fillActiveHoverClass = propsGenerator.fillActiveHoverClass, fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, labelTextActiveColor = propsGenerator.labelTextActiveColor, labelTextActiveHoverColor = propsGenerator.labelTextActiveHoverColor, labelTextColor = propsGenerator.labelTextColor, labelTextHoverColor = propsGenerator.labelTextHoverColor, labelTextSize = propsGenerator.labelTextSize, labelTextWeight = propsGenerator.labelTextWeight, labelTextWrap = propsGenerator.labelTextWrap, borderColorClass = propsGenerator.borderColorClass, borderTypeClass = propsGenerator.borderTypeClass, badgeAppearance = propsGenerator.badgeAppearance, badgeShape = propsGenerator.badgeShape, badgeSize = propsGenerator.badgeSize, badgeTextColor = propsGenerator.badgeTextColor, badgeTextSize = propsGenerator.badgeTextSize, badgeValue = propsGenerator.badgeValue, cursorClass = propsGenerator.cursorClass, iconAfterFill = propsGenerator.iconAfterFill, iconAfterFillIcon = propsGenerator.iconAfterFillIcon, iconAfterFillSize = propsGenerator.iconAfterFillSize, iconAfterShape = propsGenerator.iconAfterShape, iconAfterSize = propsGenerator.iconAfterSize, iconBeforeFill = propsGenerator.iconBeforeFill, iconBeforeFillIcon = propsGenerator.iconBeforeFillIcon, iconBeforeFillSize = propsGenerator.iconBeforeFillSize, iconBeforeShape = propsGenerator.iconBeforeShape, iconBeforeSize = propsGenerator.iconBeforeSize, shapeClass = propsGenerator.shapeClass, sizeClass = propsGenerator.sizeClass;
|
|
140
|
+
var chipsStyles = useStyles(props).styles;
|
|
141
|
+
return (jsx("div", { className: clsx(className, 'chips', isActive && 'chips_state_active', !isActive
|
|
142
|
+
? fillClass && "fill_".concat(fillClass)
|
|
143
|
+
: fillActiveClass && "fill_active_".concat(fillActiveClass), !isActive
|
|
144
|
+
? fillHoverClass && "fill_hover_".concat(fillHoverClass)
|
|
145
|
+
: fillActiveHoverClass && "fill_active_hover_".concat(fillActiveHoverClass), shapeClass && "chips_shape_".concat(shapeClass), borderColorClass && "border-color_".concat(borderColorClass), borderTypeClass && "border_type_".concat(borderTypeClass), sizeClass && "chips_size_".concat(sizeClass), alignDirectionClass && "align_".concat(alignDirectionClass), alignClass && "align_".concat(alignClass), isDisabled && "chips_state_disabled", cursorClass && "cursor_".concat(cursorClass), onClick && 'cursor_type_pointer'), "data-testid": dataTestId && "".concat(dataTestId, "Chips"), "data-tour": dataTour, style: chipsStyles, onClick: !isDisabled ? onClick : undefined, children: jsxs("div", { className: "chips__inner", children: [(iconBefore || iconBeforeSrc) && (jsx(Icon, { className: "chips__icon_before", size: iconBeforeSize, fill: iconBeforeFill, fillSize: iconBeforeFillSize, iconFill: iconBeforeFillIcon, imageSrc: iconBeforeSrc, shape: iconBeforeShape, SvgImage: iconBefore })), typeof label === 'string' ? (jsx(Text, { className: "chips__label", size: labelTextSize, textColor: labelTextColor, textColorActive: isActive && labelTextActiveColor, textColorHover: !isDisabled && !isActive
|
|
146
|
+
? labelTextHoverColor
|
|
147
|
+
: labelTextActiveHoverColor, textWeight: labelTextWeight, textWrap: labelTextWrap, children: label })) : (jsx("div", { className: "chips__label", children: label })), children, (iconAfter || iconAfterSrc) && (jsx(Icon, { className: "chips__icon_after", size: iconAfterSize, fill: iconAfterFill, fillSize: iconAfterFillSize, iconFill: iconAfterFillIcon, imageSrc: iconAfterSrc, shape: iconAfterShape, SvgImage: iconAfter })), badgeValue && (jsx(Badge, { className: "chips__badge", appearance: badgeAppearance, size: badgeSize, textColor: badgeTextColor, shape: badgeShape, textSize: badgeTextSize, value: badgeValue }))] }) }));
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
function ChipsGroup(props) {
|
|
151
|
+
var className = props.className, dataTestId = props.dataTestId, dataTour = props.dataTour, horizontalScroll = props.horizontalScroll, style = props.style, set = props.set, children = props.children;
|
|
152
|
+
var propsGenerator = useDevicePropsGenerator(props);
|
|
153
|
+
var directionClass = propsGenerator.directionClass, alignClass = propsGenerator.alignClass, alignDirectionClass = propsGenerator.alignDirectionClass, fillClass = propsGenerator.fillClass, borderColorClass = propsGenerator.borderColorClass, borderTypeClass = propsGenerator.borderTypeClass, borderWidthClass = propsGenerator.borderWidthClass, contentAlignClass = propsGenerator.contentAlignClass, widthClass = propsGenerator.widthClass, wrapClass = propsGenerator.wrapClass;
|
|
154
|
+
// @ts-expect-error
|
|
155
|
+
var _a = useStyles(props), groupStyles = _a.styles, groupWrapperStyles = _a.wrapper;
|
|
156
|
+
return (jsx("div", { className: clsx(className, 'chips-group', 'group', widthClass && "width_".concat(widthClass), contentAlignClass && "group_content-align_".concat(contentAlignClass), alignDirectionClass && "align_".concat(alignDirectionClass), directionClass && "group_direction_".concat(directionClass), alignClass && "align_".concat(alignClass), fillClass && "fill_".concat(fillClass), set && "group_set_".concat(set), horizontalScroll && 'group_type_horizontal_scroll', wrapClass && "group_wrap_".concat(wrapClass), borderColorClass && "border-color_".concat(borderColorClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderTypeClass && "border_type_".concat(borderTypeClass)), "data-testid": dataTestId, "data-tour": dataTour, style: Object.assign({}, groupStyles, style), children: horizontalScroll ? (jsx("div", { className: "chips-group__wrapper", style: groupWrapperStyles, children: children })) : (children) }));
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export { Chips as C, chipsAppearance as a, ChipsGroup as b, chipsConfig as c };
|