@itcase/ui 1.8.19 → 1.8.22
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/Avatar_cjs_DSXs1Yrg.js +221 -0
- package/dist/Avatar_es_DByUaJL6.js +217 -0
- package/dist/{Button_cjs_DjCsrrlr.js → Button_cjs_CukkOE-v.js} +15 -6
- package/dist/{Button_es_CHDT0-8K.js → Button_es_DXcCJuNX.js} +15 -6
- package/dist/{ChipsGroup_cjs_CTpMiyQb.js → ChipsGroup_cjs_9wrMZrzL.js} +2 -2
- package/dist/{ChipsGroup_es_CP_xm25C.js → ChipsGroup_es_CjGZ-ulT.js} +2 -2
- package/dist/{DatePicker_cjs_DPtOL1eW.js → DatePicker_cjs_BriuTQqj.js} +4 -4
- package/dist/{DatePicker_es_DCuzMD0T.js → DatePicker_es_DzY_fVii.js} +4 -4
- package/dist/{DropdownItem_cjs_DW0UXopm.js → DropdownItem_cjs_DY61IdLK.js} +15 -15
- package/dist/{DropdownItem_es_vuNthDPa.js → DropdownItem_es_D8mY9vFZ.js} +15 -15
- package/dist/{Group_cjs_B0oM0pjF.js → Group_cjs_Cwt0gWk4.js} +9 -2
- package/dist/{Group_es_B8pQHYsC.js → Group_es_CYW2Hquh.js} +9 -2
- package/dist/{Image_cjs_DuIBtUq5.js → Image_cjs_CCWqbNn4.js} +11 -3
- package/dist/{Image_es_CSzHhlA1.js → Image_es_DZUVp0FS.js} +11 -3
- package/dist/{Label_cjs_mw4pHZR1.js → Label_cjs_CnwET26s.js} +12 -4
- package/dist/{Label_es_CiPEDFcR.js → Label_es_Dc18d1gY.js} +12 -4
- package/dist/Link_cjs_DbRGq2Yk.js +303 -0
- package/dist/Link_es_DxtZLeKY.js +298 -0
- package/dist/{Loader_cjs_DZbIy6Ko.js → Loader_cjs_3VRzFLI2.js} +14 -2
- package/dist/{Loader_es_SHdP0IkA.js → Loader_es_DEYowVdU.js} +14 -2
- package/dist/Text_cjs_DPhKj3wf.js +68 -0
- package/dist/{Text_es_D012qJ8s.js → Text_es_BRb3qqKM.js} +8 -3
- package/dist/{Tooltip_cjs_BKOjNMkt.js → Tooltip_cjs_PkuRdzzy.js} +480 -17
- package/dist/{Tooltip_es_C7zstTA2.js → Tooltip_es_BaGfb-qC.js} +480 -17
- package/dist/cjs/components/Accordion.js +3 -3
- package/dist/cjs/components/Avatar.js +13 -236
- package/dist/cjs/components/AvatarStack.js +35 -0
- package/dist/cjs/components/Badge.js +3 -3
- package/dist/cjs/components/Breadcrumbs.js +4 -4
- package/dist/cjs/components/Button.js +5 -5
- package/dist/cjs/components/Cell.js +16 -150
- package/dist/cjs/components/Checkbox.js +1 -1
- package/dist/cjs/components/Chips.js +4 -4
- package/dist/cjs/components/Choice.js +6 -6
- package/dist/cjs/components/Code.js +2 -8
- package/dist/cjs/components/CookiesWarning.js +13 -6
- package/dist/cjs/components/DatePeriod.js +8 -8
- package/dist/cjs/components/DatePicker.js +7 -7
- package/dist/cjs/components/Drawer.js +26 -2
- package/dist/cjs/components/Dropdown.js +5 -2
- package/dist/cjs/components/Group.js +1 -1
- package/dist/cjs/components/Icon.js +3 -3
- package/dist/cjs/components/Image.js +2 -2
- package/dist/cjs/components/InputPassword.js +166 -44
- package/dist/cjs/components/Label.js +4 -4
- package/dist/cjs/components/Link.js +1 -1
- package/dist/cjs/components/List.js +1 -1
- package/dist/cjs/components/Loader.js +2 -2
- package/dist/cjs/components/Logo.js +1 -1
- package/dist/cjs/components/MenuItem.js +30 -10
- package/dist/cjs/components/Modal.js +4 -4
- package/dist/cjs/components/ModalSheetBottom.js +7 -0
- package/dist/cjs/components/Notification.js +1 -1
- package/dist/cjs/components/Pagination.js +11 -9
- package/dist/cjs/components/Radio.js +1 -1
- package/dist/cjs/components/Response/img.js +33 -0
- package/dist/cjs/components/Response.js +96 -184
- package/dist/cjs/components/Search.js +126 -13
- package/dist/cjs/components/Segmented.js +1 -1
- package/dist/cjs/components/Select.js +4 -4
- package/dist/cjs/components/Swiper.js +3 -3
- package/dist/cjs/components/Switch.js +238 -3
- package/dist/cjs/components/Tab.js +3 -3
- package/dist/cjs/components/Text.js +1 -1
- package/dist/cjs/components/Tile.js +81 -8
- package/dist/cjs/components/Title.js +3 -3
- package/dist/cjs/components/Tooltip.js +3 -3
- package/dist/components/Accordion.js +3 -3
- package/dist/components/Avatar.js +10 -237
- package/dist/components/AvatarStack.js +33 -0
- package/dist/components/Badge.js +3 -3
- package/dist/components/Breadcrumbs.js +4 -4
- package/dist/components/Button.js +5 -5
- package/dist/components/Cell.js +16 -150
- package/dist/components/Checkbox.js +1 -1
- package/dist/components/Chips.js +4 -4
- package/dist/components/Choice.js +6 -6
- package/dist/components/Code.js +2 -8
- package/dist/components/CookiesWarning.js +13 -7
- package/dist/components/DatePeriod.js +8 -8
- package/dist/components/DatePicker.js +7 -7
- package/dist/components/Drawer.js +26 -2
- package/dist/components/Dropdown.js +5 -2
- package/dist/components/Group.js +1 -1
- package/dist/components/Icon.js +3 -3
- package/dist/components/Image.js +2 -2
- package/dist/components/InputPassword.js +166 -43
- package/dist/components/Label.js +4 -4
- package/dist/components/Link.js +1 -1
- package/dist/components/List.js +1 -1
- package/dist/components/Loader.js +2 -2
- package/dist/components/Logo.js +1 -1
- package/dist/components/MenuItem.js +30 -10
- package/dist/components/Modal.js +4 -4
- package/dist/components/ModalSheetBottom.js +7 -1
- package/dist/components/Notification.js +1 -1
- package/dist/components/Pagination.js +11 -9
- package/dist/components/Radio.js +1 -1
- package/dist/components/Response/img.js +31 -0
- package/dist/components/Response.js +96 -184
- package/dist/components/Search.js +126 -13
- package/dist/components/Segmented.js +1 -1
- package/dist/components/Select.js +4 -4
- package/dist/components/Swiper.js +3 -3
- package/dist/components/Switch.js +238 -3
- package/dist/components/Tab.js +3 -3
- package/dist/components/Text.js +1 -1
- package/dist/components/Tile.js +81 -8
- package/dist/components/Title.js +3 -3
- package/dist/components/Tooltip.js +3 -3
- package/dist/css/components/AvatarStack/AvatarStack.css +54 -0
- package/dist/css/components/Code/Code.css +3 -6
- package/dist/css/components/Icon/Icon.css +128 -4
- package/dist/css/components/Label/Label.css +4 -4
- package/dist/css/components/MenuItem/MenuItem.css +19 -43
- package/dist/css/components/Response/Response.css +6 -3
- package/dist/css/components/Tab/Tab.css +14 -31
- package/dist/css/components/Text/Text.css +0 -9
- package/dist/css/components/Tile/Tile.css +7 -5
- package/dist/css/styles/border-color/border-color_hover.css +6 -8
- package/dist/css/styles/fill/fill_active.css +19 -9
- package/dist/css/styles/fill/fill_active_hover.css +19 -0
- package/dist/css/styles/fill/fill_hover.css +19 -0
- package/dist/css/styles/svg-color/svg_fill.css +5 -5
- package/dist/css/styles/text-color/text-color_active.css +17 -0
- package/dist/css/styles/text-color/text-color_active_hover.css +40 -0
- package/dist/stories/Plsyground.mdx +0 -1
- package/dist/stories/index.stories.js +46 -0
- package/dist/stories/useDevicePropsGenerator.mdx +76 -102
- package/dist/stories/useMediaQueries.mdx +32 -7
- package/dist/stories/useStyles.mdx +50 -2
- package/dist/types/components/Avatar/appearance/avatarAccent.d.ts +0 -4
- package/dist/types/components/Avatar/appearance/avatarDanger.d.ts +0 -1
- package/dist/types/components/Avatar/appearance/avatarInfo.d.ts +0 -4
- package/dist/types/components/Avatar/appearance/avatarPrimary.d.ts +0 -1
- package/dist/types/components/Avatar/appearance/avatarSecondary.d.ts +0 -1
- package/dist/types/components/Avatar/appearance/avatarSuccess.d.ts +1 -3
- package/dist/types/components/Avatar/appearance/avatarSurface.d.ts +0 -6
- package/dist/types/components/AvatarStack/AvatarStack.d.ts +3 -0
- package/dist/types/components/AvatarStack/AvatarStack.interface.d.ts +9 -0
- package/dist/types/components/AvatarStack/index.d.ts +2 -0
- package/dist/types/components/Button/appearance/buttonAccent.d.ts +1 -0
- package/dist/types/components/Button/appearance/buttonDanger.d.ts +8 -0
- package/dist/types/components/Cell/appearance/cellSize.d.ts +8 -44
- package/dist/types/components/Code/appearance/codeSize.d.ts +2 -8
- package/dist/types/components/CookiesWarning/CookiesWarning.appearance.d.ts +5 -0
- package/dist/types/components/CookiesWarning/index.d.ts +2 -1
- package/dist/types/components/Drawer/appearance/drawerSurface.d.ts +25 -0
- package/dist/types/components/Dropdown/appearance/dropdownAccent.d.ts +0 -6
- package/dist/types/components/Dropdown/appearance/dropdownSurface.d.ts +5 -0
- package/dist/types/components/InputPassword/InputPassword.appearance.d.ts +2 -3
- package/dist/types/components/InputPassword/InputPassword.interface.d.ts +4 -11
- package/dist/types/components/InputPassword/appearance/inputPasswordDefault.d.ts +24 -0
- package/dist/types/components/InputPassword/appearance/inputPasswordDisabled.d.ts +20 -0
- package/dist/types/components/InputPassword/appearance/inputPasswordError.d.ts +20 -0
- package/dist/types/components/InputPassword/appearance/inputPasswordRequire.d.ts +20 -0
- package/dist/types/components/InputPassword/appearance/inputPasswordSize.d.ts +59 -0
- package/dist/types/components/InputPassword/appearance/inputPasswordStyle.d.ts +16 -0
- package/dist/types/components/InputPassword/appearance/inputPasswordSuccess.d.ts +20 -0
- package/dist/types/components/InputPassword/index.d.ts +1 -1
- package/dist/types/components/Label/appearance/labelAccent.d.ts +7 -0
- package/dist/types/components/Label/appearance/labelSize.d.ts +1 -0
- package/dist/types/components/Link/Link.interface.d.ts +1 -1
- package/dist/types/components/{Cell/appearance/cellAccent.d.ts → Link/appearance/linkAccent.d.ts} +2 -3
- package/dist/types/components/{Cell/appearance/cellDanger.d.ts → Link/appearance/linkDanger.d.ts} +2 -2
- package/dist/types/components/Link/appearance/linkDisabled.d.ts +20 -0
- package/dist/types/components/{Cell/appearance/cellError.d.ts → Link/appearance/linkError.d.ts} +2 -2
- package/dist/types/components/{Cell/appearance/cellInfo.d.ts → Link/appearance/linkInfo.d.ts} +2 -2
- package/dist/types/components/{Cell/appearance/cellPrimary.d.ts → Link/appearance/linkPrimary.d.ts} +2 -2
- package/dist/types/components/Link/appearance/linkRequire.d.ts +20 -0
- package/dist/types/components/{Cell/appearance/cellSecondary.d.ts → Link/appearance/linkSecondary.d.ts} +2 -2
- package/dist/types/components/Link/appearance/linkSize.d.ts +59 -0
- package/dist/types/components/Link/appearance/linkStyle.d.ts +16 -0
- package/dist/types/components/{Cell/appearance/cellSuccess.d.ts → Link/appearance/linkSuccess.d.ts} +2 -2
- package/dist/types/components/Link/appearance/linkSurface.d.ts +25 -0
- package/dist/types/components/{Cell/appearance/cellWarning.d.ts → Link/appearance/linkWarning.d.ts} +2 -2
- package/dist/types/components/Loader/Loader.appearance.d.ts +3 -2
- package/dist/types/components/Loader/Loader.interface.d.ts +16 -17
- package/dist/types/components/Loader/appearance/loaderSize.d.ts +12 -0
- package/dist/types/components/MenuItem/appearance/menuItemSize.d.ts +1 -0
- package/dist/types/components/MenuItem/appearance/menuItemSurface.d.ts +4 -2
- package/dist/types/components/ModalSheetBottom/ModalSheetBottom.appearance.d.ts +5 -0
- package/dist/types/components/ModalSheetBottom/index.d.ts +1 -0
- package/dist/types/components/Pagination/appearance/paginationSize.d.ts +8 -0
- package/dist/types/components/Pagination/appearance/paginationSurface.d.ts +2 -0
- package/dist/types/components/Response/Response.appearance.d.ts +2 -2
- package/dist/types/components/Response/appearance/responceConfirm.d.ts +13 -0
- package/dist/types/components/Response/appearance/responceFail.d.ts +13 -0
- package/dist/types/components/Response/appearance/responceNothingFound.d.ts +13 -0
- package/dist/types/components/Response/appearance/responceRefresh.d.ts +13 -0
- package/dist/types/components/Response/appearance/responseError.d.ts +13 -0
- package/dist/types/components/Response/appearance/responseSuccess.d.ts +13 -0
- package/dist/types/components/Response/appearance/responseUnableLoadData.d.ts +13 -0
- package/dist/types/components/Response/appearance/responseWarning.d.ts +13 -0
- package/dist/types/components/Response/img/index.d.ts +12 -0
- package/dist/types/components/Search/appearance/searchDefault.d.ts +24 -0
- package/dist/types/components/Search/appearance/searchDisabled.d.ts +20 -0
- package/dist/types/components/Search/appearance/searchError.d.ts +20 -0
- package/dist/types/components/Search/appearance/searchRequire.d.ts +20 -0
- package/dist/types/components/Search/appearance/searchSize.d.ts +18 -8
- package/dist/types/components/Search/appearance/searchSuccess.d.ts +20 -0
- package/dist/types/components/Switch/Switch.appearance.d.ts +1 -1
- package/dist/types/components/Switch/appearance/switchAccent.d.ts +20 -0
- package/dist/types/components/Switch/appearance/switchDanger.d.ts +7 -0
- package/dist/types/components/Switch/appearance/switchDisabled.d.ts +20 -0
- package/dist/types/components/Switch/appearance/switchError.d.ts +11 -0
- package/dist/types/components/Switch/appearance/switchInfo.d.ts +21 -0
- package/dist/types/components/Switch/appearance/switchPrimary.d.ts +8 -0
- package/dist/types/components/Switch/appearance/switchRequire.d.ts +20 -0
- package/dist/types/components/Switch/appearance/switchSecondary.d.ts +8 -0
- package/dist/types/components/Switch/appearance/switchSize.d.ts +59 -0
- package/dist/types/components/Switch/appearance/switchStyle.d.ts +16 -0
- package/dist/types/components/Switch/appearance/switchSuccess.d.ts +11 -0
- package/dist/types/components/Switch/appearance/switchSurface.d.ts +25 -0
- package/dist/types/components/Switch/appearance/switchWarning.d.ts +11 -0
- package/dist/types/components/Tile/appearance/tileSize.d.ts +51 -0
- package/dist/types/components/Tile/appearance/tileSurface.d.ts +24 -0
- package/dist/types/components/Title/Title.appearance.d.ts +2 -2
- package/dist/types/components/Title/Title.interface.d.ts +3 -3
- package/dist/types/components/Title/appearance/titleAccent.d.ts +20 -0
- package/dist/types/components/Title/appearance/titleDanger.d.ts +7 -0
- package/dist/types/components/Title/appearance/titleDisabled.d.ts +20 -0
- package/dist/types/components/Title/appearance/titleError.d.ts +11 -0
- package/dist/types/components/Title/appearance/titleInfo.d.ts +21 -0
- package/dist/types/components/Title/appearance/titlePrimary.d.ts +8 -0
- package/dist/types/components/Title/appearance/titleRequire.d.ts +20 -0
- package/dist/types/components/Title/appearance/titleSecondary.d.ts +8 -0
- package/dist/types/components/Title/appearance/titleSize.d.ts +59 -0
- package/dist/types/components/Title/appearance/titleStyle.d.ts +16 -0
- package/dist/types/components/Title/appearance/titleSuccess.d.ts +11 -0
- package/dist/types/components/Title/appearance/titleSurface.d.ts +25 -0
- package/dist/types/components/Title/appearance/titleWarning.d.ts +11 -0
- package/dist/types/components/Tooltip/Tooltip.appearance.d.ts +1 -1
- package/dist/types/components/Tooltip/appearance/tooltipAccent.d.ts +20 -0
- package/dist/types/components/Tooltip/appearance/tooltipDanger.d.ts +7 -0
- package/dist/types/components/Tooltip/appearance/tooltipDisabled.d.ts +20 -0
- package/dist/types/components/Tooltip/appearance/tooltipError.d.ts +11 -0
- package/dist/types/components/Tooltip/appearance/tooltipInfo.d.ts +21 -0
- package/dist/types/components/Tooltip/appearance/tooltipPrimary.d.ts +8 -0
- package/dist/types/components/Tooltip/appearance/tooltipRequire.d.ts +20 -0
- package/dist/types/components/Tooltip/appearance/tooltipSecondary.d.ts +8 -0
- package/dist/types/components/Tooltip/appearance/tooltipSize.d.ts +59 -0
- package/dist/types/components/Tooltip/appearance/tooltipStyle.d.ts +16 -0
- package/dist/types/components/Tooltip/appearance/tooltipSuccess.d.ts +11 -0
- package/dist/types/components/Tooltip/appearance/tooltipSurface.d.ts +25 -0
- package/dist/types/components/Tooltip/appearance/tooltipWarning.d.ts +11 -0
- package/package.json +7 -7
- package/dist/Link_cjs_yht44xJv.js +0 -68
- package/dist/Link_es_DkW06IM-.js +0 -63
- package/dist/Text_cjs_iL1l_7V1.js +0 -63
- package/dist/cjs/components/InputMask.js +0 -65
- package/dist/cjs/components/Panel.js +0 -44
- package/dist/components/InputMask.js +0 -62
- package/dist/components/Panel.js +0 -41
- package/dist/css/components/InputMask/InputMask.css +0 -77
- package/dist/css/components/Panel/Panel.css +0 -107
- package/dist/stories/Accordion.mdx +0 -11
- package/dist/stories/AccordionItem.mdx +0 -15
- package/dist/stories/Breadcrumbs.mdx +0 -15
- package/dist/stories/BreadcrumbsItem.mdx +0 -17
- package/dist/stories/Dot.mdx +0 -19
- package/dist/stories/Drawer.mdx +0 -11
- package/dist/stories/Dropdown.mdx +0 -12
- package/dist/stories/DropdownItem.mdx +0 -19
- package/dist/stories/Image.mdx +0 -15
- package/dist/stories/Input.mdx +0 -31
- package/dist/stories/InputPassword.mdx +0 -15
- package/dist/stories/Label.mdx +0 -11
- package/dist/stories/ListItem.mdx +0 -11
- package/dist/stories/Logo.mdx +0 -24
- package/dist/stories/MenuItem.mdx +0 -15
- package/dist/stories/Modal.mdx +0 -15
- package/dist/stories/Notification.mdx +0 -23
- package/dist/stories/Pagination.mdx +0 -11
- package/dist/stories/Radio.mdx +0 -28
- package/dist/stories/Response.mdx +0 -11
- package/dist/stories/SearchInput.mdx +0 -19
- package/dist/stories/Switch.mdx +0 -23
- package/dist/stories/Tab.mdx +0 -27
- package/dist/stories/Text.mdx +0 -35
- package/dist/stories/Tile.mdx +0 -11
- package/dist/types/components/InputMask/InputMask.d.ts +0 -5
- package/dist/types/components/InputMask/InputMask.interface.d.ts +0 -54
- package/dist/types/components/InputMask/index.d.ts +0 -1
- package/dist/types/components/Panel/Panel.d.ts +0 -5
- package/dist/types/components/Panel/Panel.interface.d.ts +0 -58
- package/dist/types/components/Panel/index.d.ts +0 -1
|
@@ -0,0 +1,303 @@
|
|
|
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
|
+
|
|
10
|
+
var linkAppearanceAccent = {
|
|
11
|
+
accent: {
|
|
12
|
+
fill: 'accentPrimary',
|
|
13
|
+
fillHover: 'accentPrimaryHover',
|
|
14
|
+
},
|
|
15
|
+
accentPrimary: {
|
|
16
|
+
fill: 'accentPrimary',
|
|
17
|
+
fillHover: 'accentPrimaryHover',
|
|
18
|
+
borderColor: 'accentBorderPrimary',
|
|
19
|
+
},
|
|
20
|
+
accentSecondary: {
|
|
21
|
+
fill: 'accentPrimary',
|
|
22
|
+
fillHover: 'accentPrimaryHover',
|
|
23
|
+
labelTextColor: 'accentTextSecondary',
|
|
24
|
+
labelTextColorHover: 'accentTextSecondary',
|
|
25
|
+
borderColor: 'accentBorderPrimary',
|
|
26
|
+
loaderItemFill: 'accentItemPrimary',
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
var linkAppearanceDanger = {
|
|
31
|
+
danger: {
|
|
32
|
+
fill: 'dangerPrimary',
|
|
33
|
+
fillHover: 'dangerPrimaryHover',
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
var linkAppearanceDisabled = {
|
|
38
|
+
disabledPrimary: {
|
|
39
|
+
fill: 'surfaceFillDisabled',
|
|
40
|
+
borderColor: 'errorBorderQuaternary',
|
|
41
|
+
borderHover: 'errorBorderQuaternary',
|
|
42
|
+
textColor: 'surfaceTextQuaternary',
|
|
43
|
+
iconBeforeFill: 'errorItemQuaternary',
|
|
44
|
+
iconClearFill: 'errorItemPrimary',
|
|
45
|
+
placeholderTextColor: 'surfaceTextQuaternary',
|
|
46
|
+
},
|
|
47
|
+
disabledSecondary: {
|
|
48
|
+
fill: 'surfaceSecondary',
|
|
49
|
+
borderColor: 'surfaceBorderTertiary',
|
|
50
|
+
borderHover: 'surfaceBorderQuaternary',
|
|
51
|
+
iconBeforeFill: 'surfaceItemQuaternary',
|
|
52
|
+
iconClearFill: 'surfaceItemPrimary',
|
|
53
|
+
placeholderTextColor: 'surfaceTextSecondary',
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
var linkAppearanceError = {
|
|
58
|
+
error: {
|
|
59
|
+
fill: 'errorPrimary',
|
|
60
|
+
fillHover: 'errorPrimaryHover',
|
|
61
|
+
labelTextColor: 'errorTextPrimary',
|
|
62
|
+
labelTextColorHover: 'errorTextPrimary',
|
|
63
|
+
loaderFill: 'errorPrimary',
|
|
64
|
+
loaderItemFill: 'errorItemPrimary',
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
var linkAppearanceInfo = {
|
|
69
|
+
info: {
|
|
70
|
+
fill: 'accentPrimary',
|
|
71
|
+
fillHover: 'accentPrimaryHover',
|
|
72
|
+
labelTextColor: 'accentTextPrimary',
|
|
73
|
+
labelTextColorHover: 'accentTextPrimary',
|
|
74
|
+
borderColor: 'accentBorderPrimary',
|
|
75
|
+
loaderFill: 'accentPrimary',
|
|
76
|
+
loaderItemFill: 'accentItemPrimary',
|
|
77
|
+
},
|
|
78
|
+
infoSecondary: {
|
|
79
|
+
fill: 'accentPrimary',
|
|
80
|
+
fillHover: 'accentPrimaryHover',
|
|
81
|
+
labelTextColor: 'accentTextSecondary',
|
|
82
|
+
labelTextColorHover: 'accentTextSecondary',
|
|
83
|
+
borderColor: 'accentBorderPrimary',
|
|
84
|
+
loaderFill: 'accentPrimary',
|
|
85
|
+
loaderItemFill: 'accentItemPrimary',
|
|
86
|
+
},
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
var linkAppearancePrimary = {
|
|
90
|
+
primary: {
|
|
91
|
+
fill: 'primaryPrimary',
|
|
92
|
+
fillHover: 'primaryPrimaryHover',
|
|
93
|
+
labelTextColor: 'primaryTextPrimary',
|
|
94
|
+
},
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
var linkAppearanceRequire = {
|
|
98
|
+
requirePrimary: {
|
|
99
|
+
fill: 'warningTertiary',
|
|
100
|
+
borderColor: 'warningBorderQuaternary',
|
|
101
|
+
borderHover: 'warningBorderQuaternary',
|
|
102
|
+
textColor: 'surfaceTextPrimary',
|
|
103
|
+
iconBeforeFill: 'warningItemQuaternary',
|
|
104
|
+
iconClearFill: 'warningItemPrimary',
|
|
105
|
+
placeholderTextColor: 'surfaceTextQuaternary',
|
|
106
|
+
},
|
|
107
|
+
requireSecondary: {
|
|
108
|
+
fill: 'surfaceSecondary',
|
|
109
|
+
borderColor: 'surfaceBorderTertiary',
|
|
110
|
+
borderHover: 'surfaceBorderQuaternary',
|
|
111
|
+
iconBeforeFill: 'surfaceItemQuaternary',
|
|
112
|
+
iconClearFill: 'surfaceItemPrimary',
|
|
113
|
+
placeholderTextColor: 'surfaceTextSecondary',
|
|
114
|
+
},
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
var linkAppearanceSecondary = {
|
|
118
|
+
secondary: {
|
|
119
|
+
fill: 'secondaryPrimary',
|
|
120
|
+
fillHover: 'secondaryPrimaryHover',
|
|
121
|
+
labelTextColor: 'secondaryTextPrimary',
|
|
122
|
+
},
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
var linkAppearanceSize = {
|
|
126
|
+
sizeXXL: {
|
|
127
|
+
size: 'xxl',
|
|
128
|
+
labelTextSize: 'xxl',
|
|
129
|
+
iconAfterFillSize: '24',
|
|
130
|
+
iconAfterSize: '24',
|
|
131
|
+
iconBeforeFillSize: '24',
|
|
132
|
+
iconBeforeSize: '24',
|
|
133
|
+
},
|
|
134
|
+
sizeXL: {
|
|
135
|
+
size: 'xl',
|
|
136
|
+
labelTextSize: 'l',
|
|
137
|
+
iconAfterFillSize: '24',
|
|
138
|
+
iconAfterSize: '24',
|
|
139
|
+
iconBeforeFillSize: '24',
|
|
140
|
+
iconBeforeSize: '24',
|
|
141
|
+
},
|
|
142
|
+
sizeL: {
|
|
143
|
+
size: 'l',
|
|
144
|
+
labelTextSize: 'l',
|
|
145
|
+
iconAfterFillSize: '24',
|
|
146
|
+
iconAfterSize: '24',
|
|
147
|
+
iconBeforeFillSize: '24',
|
|
148
|
+
iconBeforeSize: '24',
|
|
149
|
+
},
|
|
150
|
+
sizeM: {
|
|
151
|
+
size: 'm',
|
|
152
|
+
labelTextSize: 'm',
|
|
153
|
+
iconAfterFillSize: '24',
|
|
154
|
+
iconAfterSize: '24',
|
|
155
|
+
iconBeforeFillSize: '24',
|
|
156
|
+
iconBeforeSize: '24',
|
|
157
|
+
},
|
|
158
|
+
sizeS: {
|
|
159
|
+
size: 's',
|
|
160
|
+
labelTextSize: 's',
|
|
161
|
+
iconAfterFillSize: '20',
|
|
162
|
+
iconAfterSize: '20',
|
|
163
|
+
iconBeforeFillSize: '20',
|
|
164
|
+
iconBeforeSize: '20',
|
|
165
|
+
},
|
|
166
|
+
sizeXS: {
|
|
167
|
+
size: 'xs',
|
|
168
|
+
labelTextSize: 'xs',
|
|
169
|
+
iconAfterFillSize: '16',
|
|
170
|
+
iconAfterSize: '16',
|
|
171
|
+
iconBeforeFillSize: '16',
|
|
172
|
+
iconBeforeSize: '16',
|
|
173
|
+
},
|
|
174
|
+
sizeXXS: {
|
|
175
|
+
size: 'xxs',
|
|
176
|
+
labelTextSize: 'xs',
|
|
177
|
+
iconAfterFillSize: '14',
|
|
178
|
+
iconAfterSize: '14',
|
|
179
|
+
iconBeforeFillSize: '14',
|
|
180
|
+
iconBeforeSize: '14',
|
|
181
|
+
},
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
var linkAppearanceStyle = {
|
|
185
|
+
full: {
|
|
186
|
+
borderColor: '0',
|
|
187
|
+
},
|
|
188
|
+
ghost: {
|
|
189
|
+
fill: 'none',
|
|
190
|
+
borderColor: '0',
|
|
191
|
+
},
|
|
192
|
+
outlined: {
|
|
193
|
+
fill: 'none',
|
|
194
|
+
},
|
|
195
|
+
solid: {
|
|
196
|
+
borderColor: '0',
|
|
197
|
+
},
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
var linkAppearanceSuccess = {
|
|
201
|
+
success: {
|
|
202
|
+
fill: 'successPrimary',
|
|
203
|
+
fillHover: 'successPrimaryHover',
|
|
204
|
+
labelTextColor: 'successTextSecondary',
|
|
205
|
+
labelTextColorHover: 'successTextSecondary',
|
|
206
|
+
loaderFill: 'successPrimary',
|
|
207
|
+
loaderItemFill: 'successItemPrimary',
|
|
208
|
+
},
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
var linkAppearanceSurface = {
|
|
212
|
+
surfacePrimary: {
|
|
213
|
+
fill: 'surfacePrimary',
|
|
214
|
+
fillHover: 'surfacePrimaryHover',
|
|
215
|
+
labelTextColor: 'surfaceTextPrimary',
|
|
216
|
+
},
|
|
217
|
+
surfaceQuaternary: {
|
|
218
|
+
fill: 'surfaceQuaternary',
|
|
219
|
+
fillHover: 'surfaceQuaternaryHover',
|
|
220
|
+
labelTextColor: 'surfaceTextPrimary',
|
|
221
|
+
},
|
|
222
|
+
surfaceSecondary: {
|
|
223
|
+
fill: 'surfaceSecondary',
|
|
224
|
+
fillHover: 'surfaceSecondaryHover',
|
|
225
|
+
labelTextColor: 'surfaceTextPrimary',
|
|
226
|
+
loaderFill: 'surfaceSecondary',
|
|
227
|
+
loaderItemFill: 'surfaceItemPrimary',
|
|
228
|
+
},
|
|
229
|
+
surfaceTertiary: {
|
|
230
|
+
fill: 'surfaceTertiary',
|
|
231
|
+
fillHover: 'surfaceTertiaryHover',
|
|
232
|
+
labelTextColor: 'surfaceTextPrimary',
|
|
233
|
+
},
|
|
234
|
+
};
|
|
235
|
+
|
|
236
|
+
var linkAppearanceWarning = {
|
|
237
|
+
warning: {
|
|
238
|
+
fill: 'warningPrimary',
|
|
239
|
+
fillHover: 'warningPrimaryHover',
|
|
240
|
+
labelTextColor: 'warningTextSecondary',
|
|
241
|
+
labelTextColorHover: 'warningTextSecondary',
|
|
242
|
+
loaderFill: 'warningPrimary',
|
|
243
|
+
loaderItemFill: 'warningItemPrimary',
|
|
244
|
+
},
|
|
245
|
+
};
|
|
246
|
+
|
|
247
|
+
var linkAppearance = 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(tslib_es6.__assign({}, linkAppearanceSize), linkAppearanceDisabled), linkAppearanceRequire), linkAppearanceStyle), linkAppearanceAccent), linkAppearanceDanger), linkAppearanceError), linkAppearanceInfo), linkAppearancePrimary), linkAppearanceSecondary), linkAppearanceSuccess), linkAppearanceSurface), linkAppearanceWarning);
|
|
248
|
+
|
|
249
|
+
var linkConfig = {
|
|
250
|
+
appearance: linkAppearance,
|
|
251
|
+
LinkComponent: 'a',
|
|
252
|
+
setAppearance: function (appearanceConfig) {
|
|
253
|
+
linkConfig.appearance = appearanceConfig;
|
|
254
|
+
},
|
|
255
|
+
setLinkComponent: function (newComponent) {
|
|
256
|
+
linkConfig.LinkComponent = newComponent;
|
|
257
|
+
},
|
|
258
|
+
};
|
|
259
|
+
function Link(props) {
|
|
260
|
+
var className = props.className, appearance = props.appearance, text = props.text, href = props.href, link = props.link, LinkComponent = props.LinkComponent, rel = props.rel, style = props.style, target = props.target, before = props.before, after = props.after, onClick = props.onClick, onMouseDown = props.onMouseDown, children = props.children;
|
|
261
|
+
var appearanceConfig = appearance === null || appearance === void 0 ? void 0 : appearance.split(' ').reduce(function (resultConfig, appearanceKey) {
|
|
262
|
+
var _a;
|
|
263
|
+
return (tslib_es6.__assign(tslib_es6.__assign({}, resultConfig), (_a = linkConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearanceKey]));
|
|
264
|
+
}, {});
|
|
265
|
+
var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
|
|
266
|
+
var directionClass = propsGenerator.directionClass, fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, borderColorClass = propsGenerator.borderColorClass, borderColorHoverClass = propsGenerator.borderColorHoverClass, borderTypeClass = propsGenerator.borderTypeClass, borderWidthClass = propsGenerator.borderWidthClass, textColorClass = propsGenerator.textColorClass, textColorHoverClass = propsGenerator.textColorHoverClass, textGradientClass = propsGenerator.textGradientClass, textStyleClass = propsGenerator.textStyleClass, textWeightClass = propsGenerator.textWeightClass, heightClass = propsGenerator.heightClass, shapeClass = propsGenerator.shapeClass, sizeClass = propsGenerator.sizeClass, svgFillClass = propsGenerator.svgFillClass, svgFillHoverClass = propsGenerator.svgFillHoverClass, _a = propsGenerator.underline, underline = _a === void 0 ? 'underline' : _a, widthClass = propsGenerator.widthClass;
|
|
267
|
+
// @ts-expect-error
|
|
268
|
+
var styles = useStyles.useStyles(props).styles;
|
|
269
|
+
return (jsxRuntime.jsxs(LinkWrapper, { className: clsx(className, 'link', widthClass && "width_".concat(widthClass), heightClass && "height_".concat(heightClass), directionClass && "link_direction_".concat(directionClass), sizeClass && "text_size_".concat(sizeClass), svgFillClass && "svg_fill_".concat(svgFillClass), svgFillHoverClass && "svg_fill_hover_".concat(svgFillHoverClass), underline && "link_underline_".concat(underline), 'text', (textColorClass ||
|
|
270
|
+
textColorHoverClass ||
|
|
271
|
+
textGradientClass ||
|
|
272
|
+
textStyleClass ||
|
|
273
|
+
textWeightClass) &&
|
|
274
|
+
'text', textColorClass && "text-color_".concat(textColorClass), textColorHoverClass && "text-color_hover_".concat(textColorHoverClass), textGradientClass && "text-gradient_".concat(textGradientClass), textStyleClass && "text-style_".concat(textStyleClass), textWeightClass && "text-weight_".concat(textWeightClass), fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass), borderColorClass && "border-color_".concat(borderColorClass), borderColorHoverClass && "border-color_hover_".concat(borderColorHoverClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderTypeClass && "border_type_".concat(borderTypeClass), shapeClass && "link_shape_".concat(shapeClass)), href: href || link, LinkComponent: LinkComponent, rel: rel, style: Object.assign({}, styles, style), target: target, onClick: onClick, onMouseDown: onMouseDown, children: [before, children || text, after] }));
|
|
275
|
+
}
|
|
276
|
+
// Wrapper with "Link" by condition
|
|
277
|
+
function LinkWrapper(props) {
|
|
278
|
+
var href = props.href, LinkComponent = props.LinkComponent, rel = props.rel, target = props.target, children = props.children, otherProps = tslib_es6.__rest(props, ["href", "LinkComponent", "rel", "target", "children"]);
|
|
279
|
+
if (href) {
|
|
280
|
+
// If href passed, make link-wrapper
|
|
281
|
+
var Component = LinkComponent || linkConfig.LinkComponent;
|
|
282
|
+
if (Component) {
|
|
283
|
+
return (jsxRuntime.jsx(Component, tslib_es6.__assign({ href: href, rel: rel, target: target }, otherProps, { children: children })));
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
else if (LinkComponent) {
|
|
287
|
+
// If has default "Component" - render it
|
|
288
|
+
return jsxRuntime.jsx(LinkComponent, tslib_es6.__assign({}, otherProps, { children: children }));
|
|
289
|
+
}
|
|
290
|
+
// Return children and pass current props to
|
|
291
|
+
return React.Children.toArray(children)
|
|
292
|
+
.filter(Boolean)
|
|
293
|
+
.map(function (child) {
|
|
294
|
+
return React.isValidElement(child)
|
|
295
|
+
? React.cloneElement(child, otherProps)
|
|
296
|
+
: child;
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
exports.Link = Link;
|
|
301
|
+
exports.LinkWrapper = LinkWrapper;
|
|
302
|
+
exports.linkAppearance = linkAppearance;
|
|
303
|
+
exports.linkConfig = linkConfig;
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
import { _ as __assign, b as __rest } from './tslib.es6_es_Bwu1Cn-t.js';
|
|
2
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import clsx from 'clsx';
|
|
5
|
+
import { useDevicePropsGenerator } from './hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
6
|
+
import { useStyles } from './hooks/useStyles/useStyles.js';
|
|
7
|
+
|
|
8
|
+
var linkAppearanceAccent = {
|
|
9
|
+
accent: {
|
|
10
|
+
fill: 'accentPrimary',
|
|
11
|
+
fillHover: 'accentPrimaryHover',
|
|
12
|
+
},
|
|
13
|
+
accentPrimary: {
|
|
14
|
+
fill: 'accentPrimary',
|
|
15
|
+
fillHover: 'accentPrimaryHover',
|
|
16
|
+
borderColor: 'accentBorderPrimary',
|
|
17
|
+
},
|
|
18
|
+
accentSecondary: {
|
|
19
|
+
fill: 'accentPrimary',
|
|
20
|
+
fillHover: 'accentPrimaryHover',
|
|
21
|
+
labelTextColor: 'accentTextSecondary',
|
|
22
|
+
labelTextColorHover: 'accentTextSecondary',
|
|
23
|
+
borderColor: 'accentBorderPrimary',
|
|
24
|
+
loaderItemFill: 'accentItemPrimary',
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
var linkAppearanceDanger = {
|
|
29
|
+
danger: {
|
|
30
|
+
fill: 'dangerPrimary',
|
|
31
|
+
fillHover: 'dangerPrimaryHover',
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
var linkAppearanceDisabled = {
|
|
36
|
+
disabledPrimary: {
|
|
37
|
+
fill: 'surfaceFillDisabled',
|
|
38
|
+
borderColor: 'errorBorderQuaternary',
|
|
39
|
+
borderHover: 'errorBorderQuaternary',
|
|
40
|
+
textColor: 'surfaceTextQuaternary',
|
|
41
|
+
iconBeforeFill: 'errorItemQuaternary',
|
|
42
|
+
iconClearFill: 'errorItemPrimary',
|
|
43
|
+
placeholderTextColor: 'surfaceTextQuaternary',
|
|
44
|
+
},
|
|
45
|
+
disabledSecondary: {
|
|
46
|
+
fill: 'surfaceSecondary',
|
|
47
|
+
borderColor: 'surfaceBorderTertiary',
|
|
48
|
+
borderHover: 'surfaceBorderQuaternary',
|
|
49
|
+
iconBeforeFill: 'surfaceItemQuaternary',
|
|
50
|
+
iconClearFill: 'surfaceItemPrimary',
|
|
51
|
+
placeholderTextColor: 'surfaceTextSecondary',
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
var linkAppearanceError = {
|
|
56
|
+
error: {
|
|
57
|
+
fill: 'errorPrimary',
|
|
58
|
+
fillHover: 'errorPrimaryHover',
|
|
59
|
+
labelTextColor: 'errorTextPrimary',
|
|
60
|
+
labelTextColorHover: 'errorTextPrimary',
|
|
61
|
+
loaderFill: 'errorPrimary',
|
|
62
|
+
loaderItemFill: 'errorItemPrimary',
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
var linkAppearanceInfo = {
|
|
67
|
+
info: {
|
|
68
|
+
fill: 'accentPrimary',
|
|
69
|
+
fillHover: 'accentPrimaryHover',
|
|
70
|
+
labelTextColor: 'accentTextPrimary',
|
|
71
|
+
labelTextColorHover: 'accentTextPrimary',
|
|
72
|
+
borderColor: 'accentBorderPrimary',
|
|
73
|
+
loaderFill: 'accentPrimary',
|
|
74
|
+
loaderItemFill: 'accentItemPrimary',
|
|
75
|
+
},
|
|
76
|
+
infoSecondary: {
|
|
77
|
+
fill: 'accentPrimary',
|
|
78
|
+
fillHover: 'accentPrimaryHover',
|
|
79
|
+
labelTextColor: 'accentTextSecondary',
|
|
80
|
+
labelTextColorHover: 'accentTextSecondary',
|
|
81
|
+
borderColor: 'accentBorderPrimary',
|
|
82
|
+
loaderFill: 'accentPrimary',
|
|
83
|
+
loaderItemFill: 'accentItemPrimary',
|
|
84
|
+
},
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
var linkAppearancePrimary = {
|
|
88
|
+
primary: {
|
|
89
|
+
fill: 'primaryPrimary',
|
|
90
|
+
fillHover: 'primaryPrimaryHover',
|
|
91
|
+
labelTextColor: 'primaryTextPrimary',
|
|
92
|
+
},
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
var linkAppearanceRequire = {
|
|
96
|
+
requirePrimary: {
|
|
97
|
+
fill: 'warningTertiary',
|
|
98
|
+
borderColor: 'warningBorderQuaternary',
|
|
99
|
+
borderHover: 'warningBorderQuaternary',
|
|
100
|
+
textColor: 'surfaceTextPrimary',
|
|
101
|
+
iconBeforeFill: 'warningItemQuaternary',
|
|
102
|
+
iconClearFill: 'warningItemPrimary',
|
|
103
|
+
placeholderTextColor: 'surfaceTextQuaternary',
|
|
104
|
+
},
|
|
105
|
+
requireSecondary: {
|
|
106
|
+
fill: 'surfaceSecondary',
|
|
107
|
+
borderColor: 'surfaceBorderTertiary',
|
|
108
|
+
borderHover: 'surfaceBorderQuaternary',
|
|
109
|
+
iconBeforeFill: 'surfaceItemQuaternary',
|
|
110
|
+
iconClearFill: 'surfaceItemPrimary',
|
|
111
|
+
placeholderTextColor: 'surfaceTextSecondary',
|
|
112
|
+
},
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
var linkAppearanceSecondary = {
|
|
116
|
+
secondary: {
|
|
117
|
+
fill: 'secondaryPrimary',
|
|
118
|
+
fillHover: 'secondaryPrimaryHover',
|
|
119
|
+
labelTextColor: 'secondaryTextPrimary',
|
|
120
|
+
},
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
var linkAppearanceSize = {
|
|
124
|
+
sizeXXL: {
|
|
125
|
+
size: 'xxl',
|
|
126
|
+
labelTextSize: 'xxl',
|
|
127
|
+
iconAfterFillSize: '24',
|
|
128
|
+
iconAfterSize: '24',
|
|
129
|
+
iconBeforeFillSize: '24',
|
|
130
|
+
iconBeforeSize: '24',
|
|
131
|
+
},
|
|
132
|
+
sizeXL: {
|
|
133
|
+
size: 'xl',
|
|
134
|
+
labelTextSize: 'l',
|
|
135
|
+
iconAfterFillSize: '24',
|
|
136
|
+
iconAfterSize: '24',
|
|
137
|
+
iconBeforeFillSize: '24',
|
|
138
|
+
iconBeforeSize: '24',
|
|
139
|
+
},
|
|
140
|
+
sizeL: {
|
|
141
|
+
size: 'l',
|
|
142
|
+
labelTextSize: 'l',
|
|
143
|
+
iconAfterFillSize: '24',
|
|
144
|
+
iconAfterSize: '24',
|
|
145
|
+
iconBeforeFillSize: '24',
|
|
146
|
+
iconBeforeSize: '24',
|
|
147
|
+
},
|
|
148
|
+
sizeM: {
|
|
149
|
+
size: 'm',
|
|
150
|
+
labelTextSize: 'm',
|
|
151
|
+
iconAfterFillSize: '24',
|
|
152
|
+
iconAfterSize: '24',
|
|
153
|
+
iconBeforeFillSize: '24',
|
|
154
|
+
iconBeforeSize: '24',
|
|
155
|
+
},
|
|
156
|
+
sizeS: {
|
|
157
|
+
size: 's',
|
|
158
|
+
labelTextSize: 's',
|
|
159
|
+
iconAfterFillSize: '20',
|
|
160
|
+
iconAfterSize: '20',
|
|
161
|
+
iconBeforeFillSize: '20',
|
|
162
|
+
iconBeforeSize: '20',
|
|
163
|
+
},
|
|
164
|
+
sizeXS: {
|
|
165
|
+
size: 'xs',
|
|
166
|
+
labelTextSize: 'xs',
|
|
167
|
+
iconAfterFillSize: '16',
|
|
168
|
+
iconAfterSize: '16',
|
|
169
|
+
iconBeforeFillSize: '16',
|
|
170
|
+
iconBeforeSize: '16',
|
|
171
|
+
},
|
|
172
|
+
sizeXXS: {
|
|
173
|
+
size: 'xxs',
|
|
174
|
+
labelTextSize: 'xs',
|
|
175
|
+
iconAfterFillSize: '14',
|
|
176
|
+
iconAfterSize: '14',
|
|
177
|
+
iconBeforeFillSize: '14',
|
|
178
|
+
iconBeforeSize: '14',
|
|
179
|
+
},
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
var linkAppearanceStyle = {
|
|
183
|
+
full: {
|
|
184
|
+
borderColor: '0',
|
|
185
|
+
},
|
|
186
|
+
ghost: {
|
|
187
|
+
fill: 'none',
|
|
188
|
+
borderColor: '0',
|
|
189
|
+
},
|
|
190
|
+
outlined: {
|
|
191
|
+
fill: 'none',
|
|
192
|
+
},
|
|
193
|
+
solid: {
|
|
194
|
+
borderColor: '0',
|
|
195
|
+
},
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
var linkAppearanceSuccess = {
|
|
199
|
+
success: {
|
|
200
|
+
fill: 'successPrimary',
|
|
201
|
+
fillHover: 'successPrimaryHover',
|
|
202
|
+
labelTextColor: 'successTextSecondary',
|
|
203
|
+
labelTextColorHover: 'successTextSecondary',
|
|
204
|
+
loaderFill: 'successPrimary',
|
|
205
|
+
loaderItemFill: 'successItemPrimary',
|
|
206
|
+
},
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
var linkAppearanceSurface = {
|
|
210
|
+
surfacePrimary: {
|
|
211
|
+
fill: 'surfacePrimary',
|
|
212
|
+
fillHover: 'surfacePrimaryHover',
|
|
213
|
+
labelTextColor: 'surfaceTextPrimary',
|
|
214
|
+
},
|
|
215
|
+
surfaceQuaternary: {
|
|
216
|
+
fill: 'surfaceQuaternary',
|
|
217
|
+
fillHover: 'surfaceQuaternaryHover',
|
|
218
|
+
labelTextColor: 'surfaceTextPrimary',
|
|
219
|
+
},
|
|
220
|
+
surfaceSecondary: {
|
|
221
|
+
fill: 'surfaceSecondary',
|
|
222
|
+
fillHover: 'surfaceSecondaryHover',
|
|
223
|
+
labelTextColor: 'surfaceTextPrimary',
|
|
224
|
+
loaderFill: 'surfaceSecondary',
|
|
225
|
+
loaderItemFill: 'surfaceItemPrimary',
|
|
226
|
+
},
|
|
227
|
+
surfaceTertiary: {
|
|
228
|
+
fill: 'surfaceTertiary',
|
|
229
|
+
fillHover: 'surfaceTertiaryHover',
|
|
230
|
+
labelTextColor: 'surfaceTextPrimary',
|
|
231
|
+
},
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
var linkAppearanceWarning = {
|
|
235
|
+
warning: {
|
|
236
|
+
fill: 'warningPrimary',
|
|
237
|
+
fillHover: 'warningPrimaryHover',
|
|
238
|
+
labelTextColor: 'warningTextSecondary',
|
|
239
|
+
labelTextColorHover: 'warningTextSecondary',
|
|
240
|
+
loaderFill: 'warningPrimary',
|
|
241
|
+
loaderItemFill: 'warningItemPrimary',
|
|
242
|
+
},
|
|
243
|
+
};
|
|
244
|
+
|
|
245
|
+
var linkAppearance = __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, linkAppearanceSize), linkAppearanceDisabled), linkAppearanceRequire), linkAppearanceStyle), linkAppearanceAccent), linkAppearanceDanger), linkAppearanceError), linkAppearanceInfo), linkAppearancePrimary), linkAppearanceSecondary), linkAppearanceSuccess), linkAppearanceSurface), linkAppearanceWarning);
|
|
246
|
+
|
|
247
|
+
var linkConfig = {
|
|
248
|
+
appearance: linkAppearance,
|
|
249
|
+
LinkComponent: 'a',
|
|
250
|
+
setAppearance: function (appearanceConfig) {
|
|
251
|
+
linkConfig.appearance = appearanceConfig;
|
|
252
|
+
},
|
|
253
|
+
setLinkComponent: function (newComponent) {
|
|
254
|
+
linkConfig.LinkComponent = newComponent;
|
|
255
|
+
},
|
|
256
|
+
};
|
|
257
|
+
function Link(props) {
|
|
258
|
+
var className = props.className, appearance = props.appearance, text = props.text, href = props.href, link = props.link, LinkComponent = props.LinkComponent, rel = props.rel, style = props.style, target = props.target, before = props.before, after = props.after, onClick = props.onClick, onMouseDown = props.onMouseDown, children = props.children;
|
|
259
|
+
var appearanceConfig = appearance === null || appearance === void 0 ? void 0 : appearance.split(' ').reduce(function (resultConfig, appearanceKey) {
|
|
260
|
+
var _a;
|
|
261
|
+
return (__assign(__assign({}, resultConfig), (_a = linkConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearanceKey]));
|
|
262
|
+
}, {});
|
|
263
|
+
var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
264
|
+
var directionClass = propsGenerator.directionClass, fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, borderColorClass = propsGenerator.borderColorClass, borderColorHoverClass = propsGenerator.borderColorHoverClass, borderTypeClass = propsGenerator.borderTypeClass, borderWidthClass = propsGenerator.borderWidthClass, textColorClass = propsGenerator.textColorClass, textColorHoverClass = propsGenerator.textColorHoverClass, textGradientClass = propsGenerator.textGradientClass, textStyleClass = propsGenerator.textStyleClass, textWeightClass = propsGenerator.textWeightClass, heightClass = propsGenerator.heightClass, shapeClass = propsGenerator.shapeClass, sizeClass = propsGenerator.sizeClass, svgFillClass = propsGenerator.svgFillClass, svgFillHoverClass = propsGenerator.svgFillHoverClass, _a = propsGenerator.underline, underline = _a === void 0 ? 'underline' : _a, widthClass = propsGenerator.widthClass;
|
|
265
|
+
// @ts-expect-error
|
|
266
|
+
var styles = useStyles(props).styles;
|
|
267
|
+
return (jsxs(LinkWrapper, { className: clsx(className, 'link', widthClass && "width_".concat(widthClass), heightClass && "height_".concat(heightClass), directionClass && "link_direction_".concat(directionClass), sizeClass && "text_size_".concat(sizeClass), svgFillClass && "svg_fill_".concat(svgFillClass), svgFillHoverClass && "svg_fill_hover_".concat(svgFillHoverClass), underline && "link_underline_".concat(underline), 'text', (textColorClass ||
|
|
268
|
+
textColorHoverClass ||
|
|
269
|
+
textGradientClass ||
|
|
270
|
+
textStyleClass ||
|
|
271
|
+
textWeightClass) &&
|
|
272
|
+
'text', textColorClass && "text-color_".concat(textColorClass), textColorHoverClass && "text-color_hover_".concat(textColorHoverClass), textGradientClass && "text-gradient_".concat(textGradientClass), textStyleClass && "text-style_".concat(textStyleClass), textWeightClass && "text-weight_".concat(textWeightClass), fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass), borderColorClass && "border-color_".concat(borderColorClass), borderColorHoverClass && "border-color_hover_".concat(borderColorHoverClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderTypeClass && "border_type_".concat(borderTypeClass), shapeClass && "link_shape_".concat(shapeClass)), href: href || link, LinkComponent: LinkComponent, rel: rel, style: Object.assign({}, styles, style), target: target, onClick: onClick, onMouseDown: onMouseDown, children: [before, children || text, after] }));
|
|
273
|
+
}
|
|
274
|
+
// Wrapper with "Link" by condition
|
|
275
|
+
function LinkWrapper(props) {
|
|
276
|
+
var href = props.href, LinkComponent = props.LinkComponent, rel = props.rel, target = props.target, children = props.children, otherProps = __rest(props, ["href", "LinkComponent", "rel", "target", "children"]);
|
|
277
|
+
if (href) {
|
|
278
|
+
// If href passed, make link-wrapper
|
|
279
|
+
var Component = LinkComponent || linkConfig.LinkComponent;
|
|
280
|
+
if (Component) {
|
|
281
|
+
return (jsx(Component, __assign({ href: href, rel: rel, target: target }, otherProps, { children: children })));
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
else if (LinkComponent) {
|
|
285
|
+
// If has default "Component" - render it
|
|
286
|
+
return jsx(LinkComponent, __assign({}, otherProps, { children: children }));
|
|
287
|
+
}
|
|
288
|
+
// Return children and pass current props to
|
|
289
|
+
return React.Children.toArray(children)
|
|
290
|
+
.filter(Boolean)
|
|
291
|
+
.map(function (child) {
|
|
292
|
+
return React.isValidElement(child)
|
|
293
|
+
? React.cloneElement(child, otherProps)
|
|
294
|
+
: child;
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
export { Link as L, LinkWrapper as a, linkAppearance as b, linkConfig as l };
|
|
@@ -5,7 +5,7 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
5
5
|
var clsx = require('clsx');
|
|
6
6
|
var useDevicePropsGenerator = require('./cjs/hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
|
|
7
7
|
var useStyles = require('./cjs/hooks/useStyles/useStyles.js');
|
|
8
|
-
var Text = require('./
|
|
8
|
+
var Text = require('./Text_cjs_DPhKj3wf.js');
|
|
9
9
|
|
|
10
10
|
var loaderAppearanceAccent = {
|
|
11
11
|
accentPrimary: {
|
|
@@ -28,6 +28,18 @@ var loaderAppearanceSecondary = {
|
|
|
28
28
|
},
|
|
29
29
|
};
|
|
30
30
|
|
|
31
|
+
var loaderAppearanceSize = {
|
|
32
|
+
sizeL: {
|
|
33
|
+
size: 'l',
|
|
34
|
+
},
|
|
35
|
+
sizeM: {
|
|
36
|
+
size: 'm',
|
|
37
|
+
},
|
|
38
|
+
sizeS: {
|
|
39
|
+
size: 's',
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
|
|
31
43
|
var loaderAppearanceSurface = {
|
|
32
44
|
surfacePrimary: {
|
|
33
45
|
fill: 'surfacePrimary',
|
|
@@ -43,7 +55,7 @@ var loaderAppearanceSurface = {
|
|
|
43
55
|
},
|
|
44
56
|
};
|
|
45
57
|
|
|
46
|
-
var loaderAppearance = tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign({}, loaderAppearanceAccent), loaderAppearancePrimary), loaderAppearanceSecondary), loaderAppearanceSurface);
|
|
58
|
+
var loaderAppearance = tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign({}, loaderAppearanceAccent), loaderAppearancePrimary), loaderAppearanceSize), loaderAppearanceSecondary), loaderAppearanceSurface);
|
|
47
59
|
|
|
48
60
|
var loaderConfig = {
|
|
49
61
|
appearance: loaderAppearance,
|
|
@@ -3,7 +3,7 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import { useDevicePropsGenerator } from './hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
5
5
|
import { useStyles } from './hooks/useStyles/useStyles.js';
|
|
6
|
-
import { T as Text } from './
|
|
6
|
+
import { T as Text } from './Text_es_BRb3qqKM.js';
|
|
7
7
|
|
|
8
8
|
var loaderAppearanceAccent = {
|
|
9
9
|
accentPrimary: {
|
|
@@ -26,6 +26,18 @@ var loaderAppearanceSecondary = {
|
|
|
26
26
|
},
|
|
27
27
|
};
|
|
28
28
|
|
|
29
|
+
var loaderAppearanceSize = {
|
|
30
|
+
sizeL: {
|
|
31
|
+
size: 'l',
|
|
32
|
+
},
|
|
33
|
+
sizeM: {
|
|
34
|
+
size: 'm',
|
|
35
|
+
},
|
|
36
|
+
sizeS: {
|
|
37
|
+
size: 's',
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
|
|
29
41
|
var loaderAppearanceSurface = {
|
|
30
42
|
surfacePrimary: {
|
|
31
43
|
fill: 'surfacePrimary',
|
|
@@ -41,7 +53,7 @@ var loaderAppearanceSurface = {
|
|
|
41
53
|
},
|
|
42
54
|
};
|
|
43
55
|
|
|
44
|
-
var loaderAppearance = __assign(__assign(__assign(__assign({}, loaderAppearanceAccent), loaderAppearancePrimary), loaderAppearanceSecondary), loaderAppearanceSurface);
|
|
56
|
+
var loaderAppearance = __assign(__assign(__assign(__assign(__assign({}, loaderAppearanceAccent), loaderAppearancePrimary), loaderAppearanceSize), loaderAppearanceSecondary), loaderAppearanceSurface);
|
|
45
57
|
|
|
46
58
|
var loaderConfig = {
|
|
47
59
|
appearance: loaderAppearance,
|