@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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itcase/ui",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.22",
|
|
4
4
|
"description": "UI components (Modal, Loader, Popup, etc)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Modal",
|
|
@@ -96,22 +96,22 @@
|
|
|
96
96
|
},
|
|
97
97
|
"dependencies": {
|
|
98
98
|
"@emotion/is-prop-valid": "^1.3.1",
|
|
99
|
-
"@itcase/common": "^1.2.
|
|
99
|
+
"@itcase/common": "^1.2.26",
|
|
100
100
|
"@itcase/config": "^1.0.47",
|
|
101
101
|
"@itcase/icons": "^1.1.1",
|
|
102
|
-
"@itcase/storybook-config": "^1.1.
|
|
102
|
+
"@itcase/storybook-config": "^1.1.13",
|
|
103
103
|
"@itcase/tokens-am": "^1.1.9",
|
|
104
104
|
"@itcase/tokens-baikal": "^1.1.9",
|
|
105
|
-
"@itcase/types": "^1.0.
|
|
105
|
+
"@itcase/types": "^1.0.4",
|
|
106
106
|
"@itcase/tokens-palette": "^1.1.11",
|
|
107
107
|
"clsx": "^2.1.1",
|
|
108
108
|
"date-fns": "^4.1.0",
|
|
109
109
|
"eslint-import-resolver-alias": "^1.1.2",
|
|
110
110
|
"eslint-plugin-import": "^2.31.0",
|
|
111
|
-
"framer-motion": "^12.
|
|
111
|
+
"framer-motion": "^12.16.0",
|
|
112
112
|
"js-cookie": "^3.0.5",
|
|
113
113
|
"lodash": "^4.17.21",
|
|
114
|
-
"motion": "^12.
|
|
114
|
+
"motion": "^12.16.0",
|
|
115
115
|
"rc-slider": "^11.1.8",
|
|
116
116
|
"react": "^18.3.1",
|
|
117
117
|
"react-dadata": "^2.27.4",
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
"@babel/preset-react": "^7.27.1",
|
|
137
137
|
"@commitlint/cli": "^19.8.1",
|
|
138
138
|
"@commitlint/config-conventional": "^19.8.1",
|
|
139
|
-
"@itcase/lint": "^1.1.
|
|
139
|
+
"@itcase/lint": "^1.1.10",
|
|
140
140
|
"@rollup/plugin-alias": "^5.1.1",
|
|
141
141
|
"@rollup/plugin-babel": "^6.0.4",
|
|
142
142
|
"@rollup/plugin-commonjs": "^28.0.3",
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var tslib_es6 = require('./tslib.es6_cjs_CCZ3TN_7.js');
|
|
4
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
-
var React = require('react');
|
|
6
|
-
var clsx = require('clsx');
|
|
7
|
-
var useDevicePropsGenerator = require('./cjs/hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
|
|
8
|
-
var useStyles = require('./cjs/hooks/useStyles/useStyles.js');
|
|
9
|
-
|
|
10
|
-
var linkAppearance = {
|
|
11
|
-
dev: {},
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
var linkConfig = {
|
|
15
|
-
appearance: linkAppearance,
|
|
16
|
-
LinkComponent: 'a',
|
|
17
|
-
setAppearance: function (appearanceConfig) {
|
|
18
|
-
linkConfig.appearance = appearanceConfig;
|
|
19
|
-
},
|
|
20
|
-
setLinkComponent: function (newComponent) {
|
|
21
|
-
linkConfig.LinkComponent = newComponent;
|
|
22
|
-
},
|
|
23
|
-
};
|
|
24
|
-
function Link(props) {
|
|
25
|
-
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, _a = props.underline, underline = _a === void 0 ? 'underline' : _a, before = props.before, after = props.after, onClick = props.onClick, onMouseDown = props.onMouseDown, children = props.children;
|
|
26
|
-
var appearanceConfig = appearance === null || appearance === void 0 ? void 0 : appearance.split(' ').reduce(function (resultConfig, appearanceKey) {
|
|
27
|
-
var _a;
|
|
28
|
-
return (tslib_es6.__assign(tslib_es6.__assign({}, resultConfig), (_a = linkConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearanceKey]));
|
|
29
|
-
}, {});
|
|
30
|
-
var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
|
|
31
|
-
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, widthClass = propsGenerator.widthClass;
|
|
32
|
-
// @ts-expect-error
|
|
33
|
-
var styles = useStyles.useStyles(props).styles;
|
|
34
|
-
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 ||
|
|
35
|
-
textColorHoverClass ||
|
|
36
|
-
textGradientClass ||
|
|
37
|
-
textStyleClass ||
|
|
38
|
-
textWeightClass) &&
|
|
39
|
-
'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)), Component: LinkComponent, href: href || link, rel: rel, style: Object.assign({}, styles, style), target: target, onClick: onClick, onMouseDown: onMouseDown, children: [before, children || text, after] }));
|
|
40
|
-
}
|
|
41
|
-
// Wrapper with "Link" by condition
|
|
42
|
-
function LinkWrapper(props) {
|
|
43
|
-
var Component = props.Component, DefaultComponent = props.DefaultComponent, href = props.href, rel = props.rel, target = props.target, children = props.children, otherProps = tslib_es6.__rest(props, ["Component", "DefaultComponent", "href", "rel", "target", "children"]);
|
|
44
|
-
if (href) {
|
|
45
|
-
// If href passed, make link-wrapper
|
|
46
|
-
var LinkComponent = Component || linkConfig.LinkComponent;
|
|
47
|
-
if (LinkComponent) {
|
|
48
|
-
return (jsxRuntime.jsx(LinkComponent, tslib_es6.__assign({ href: href, rel: rel, target: target }, otherProps, { children: children })));
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
else if (DefaultComponent) {
|
|
52
|
-
// If has default "Component" - render it
|
|
53
|
-
return jsxRuntime.jsx(DefaultComponent, tslib_es6.__assign({}, otherProps, { children: children }));
|
|
54
|
-
}
|
|
55
|
-
// Return children and pass current props to
|
|
56
|
-
return React.Children.toArray(children)
|
|
57
|
-
.filter(Boolean)
|
|
58
|
-
.map(function (child) {
|
|
59
|
-
return React.isValidElement(child)
|
|
60
|
-
? React.cloneElement(child, otherProps)
|
|
61
|
-
: child;
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
exports.Link = Link;
|
|
66
|
-
exports.LinkWrapper = LinkWrapper;
|
|
67
|
-
exports.linkAppearance = linkAppearance;
|
|
68
|
-
exports.linkConfig = linkConfig;
|
package/dist/Link_es_DkW06IM-.js
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { b as __rest, _ as __assign } 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 linkAppearance = {
|
|
9
|
-
dev: {},
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
var linkConfig = {
|
|
13
|
-
appearance: linkAppearance,
|
|
14
|
-
LinkComponent: 'a',
|
|
15
|
-
setAppearance: function (appearanceConfig) {
|
|
16
|
-
linkConfig.appearance = appearanceConfig;
|
|
17
|
-
},
|
|
18
|
-
setLinkComponent: function (newComponent) {
|
|
19
|
-
linkConfig.LinkComponent = newComponent;
|
|
20
|
-
},
|
|
21
|
-
};
|
|
22
|
-
function Link(props) {
|
|
23
|
-
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, _a = props.underline, underline = _a === void 0 ? 'underline' : _a, before = props.before, after = props.after, onClick = props.onClick, onMouseDown = props.onMouseDown, children = props.children;
|
|
24
|
-
var appearanceConfig = appearance === null || appearance === void 0 ? void 0 : appearance.split(' ').reduce(function (resultConfig, appearanceKey) {
|
|
25
|
-
var _a;
|
|
26
|
-
return (__assign(__assign({}, resultConfig), (_a = linkConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearanceKey]));
|
|
27
|
-
}, {});
|
|
28
|
-
var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
29
|
-
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, widthClass = propsGenerator.widthClass;
|
|
30
|
-
// @ts-expect-error
|
|
31
|
-
var styles = useStyles(props).styles;
|
|
32
|
-
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 ||
|
|
33
|
-
textColorHoverClass ||
|
|
34
|
-
textGradientClass ||
|
|
35
|
-
textStyleClass ||
|
|
36
|
-
textWeightClass) &&
|
|
37
|
-
'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)), Component: LinkComponent, href: href || link, rel: rel, style: Object.assign({}, styles, style), target: target, onClick: onClick, onMouseDown: onMouseDown, children: [before, children || text, after] }));
|
|
38
|
-
}
|
|
39
|
-
// Wrapper with "Link" by condition
|
|
40
|
-
function LinkWrapper(props) {
|
|
41
|
-
var Component = props.Component, DefaultComponent = props.DefaultComponent, href = props.href, rel = props.rel, target = props.target, children = props.children, otherProps = __rest(props, ["Component", "DefaultComponent", "href", "rel", "target", "children"]);
|
|
42
|
-
if (href) {
|
|
43
|
-
// If href passed, make link-wrapper
|
|
44
|
-
var LinkComponent = Component || linkConfig.LinkComponent;
|
|
45
|
-
if (LinkComponent) {
|
|
46
|
-
return (jsx(LinkComponent, __assign({ href: href, rel: rel, target: target }, otherProps, { children: children })));
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
else if (DefaultComponent) {
|
|
50
|
-
// If has default "Component" - render it
|
|
51
|
-
return jsx(DefaultComponent, __assign({}, otherProps, { children: children }));
|
|
52
|
-
}
|
|
53
|
-
// Return children and pass current props to
|
|
54
|
-
return React.Children.toArray(children)
|
|
55
|
-
.filter(Boolean)
|
|
56
|
-
.map(function (child) {
|
|
57
|
-
return React.isValidElement(child)
|
|
58
|
-
? React.cloneElement(child, otherProps)
|
|
59
|
-
: child;
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
export { Link as L, LinkWrapper as a, linkAppearance as b, linkConfig as l };
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var tslib_es6 = require('./tslib.es6_cjs_CCZ3TN_7.js');
|
|
4
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
-
var clsx = require('clsx');
|
|
6
|
-
var useDevicePropsGenerator = require('./cjs/hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
|
|
7
|
-
var useStyles = require('./cjs/hooks/useStyles/useStyles.js');
|
|
8
|
-
|
|
9
|
-
var textAppearanceSize = {
|
|
10
|
-
sizeXXL: {
|
|
11
|
-
size: 'xxl',
|
|
12
|
-
labelTextSize: 'xxl',
|
|
13
|
-
},
|
|
14
|
-
sizeXL: {
|
|
15
|
-
size: 'xl',
|
|
16
|
-
labelTextSize: 'l',
|
|
17
|
-
},
|
|
18
|
-
sizeL: {
|
|
19
|
-
size: 'l',
|
|
20
|
-
labelTextSize: 'l',
|
|
21
|
-
},
|
|
22
|
-
sizeM: {
|
|
23
|
-
size: 'm',
|
|
24
|
-
labelTextSize: 'm',
|
|
25
|
-
},
|
|
26
|
-
sizeS: {
|
|
27
|
-
size: 's',
|
|
28
|
-
labelTextSize: 's',
|
|
29
|
-
},
|
|
30
|
-
sizeXS: {
|
|
31
|
-
size: 'xs',
|
|
32
|
-
labelTextSize: 'xs',
|
|
33
|
-
},
|
|
34
|
-
sizeXXS: {
|
|
35
|
-
size: 'xxs',
|
|
36
|
-
labelTextSize: 'xs',
|
|
37
|
-
},
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
var textAppearance = tslib_es6.__assign({}, textAppearanceSize);
|
|
41
|
-
|
|
42
|
-
var textConfig = {
|
|
43
|
-
appearance: textAppearance,
|
|
44
|
-
setAppearance: function (appearanceConfig) {
|
|
45
|
-
textConfig.appearance = appearanceConfig;
|
|
46
|
-
},
|
|
47
|
-
};
|
|
48
|
-
function Text(props) {
|
|
49
|
-
var className = props.className, type = props.type, appearance = props.appearance, cursor = props.cursor, dataTestId = props.dataTestId, dataTour = props.dataTour, htmlFor = props.htmlFor, _a = props.tag, Tag = _a === void 0 ? 'span' : _a, before = props.before, after = props.after, isSkeleton = props.isSkeleton, onClick = props.onClick, onDoubleClick = props.onDoubleClick, children = props.children;
|
|
50
|
-
var appearanceConfig = appearance === null || appearance === void 0 ? void 0 : appearance.split(' ').reduce(function (resultConfig, appearanceKey) {
|
|
51
|
-
var _a;
|
|
52
|
-
return (tslib_es6.__assign(tslib_es6.__assign({}, resultConfig), (_a = textConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearanceKey]));
|
|
53
|
-
}, {});
|
|
54
|
-
var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
|
|
55
|
-
var textAlignClass = propsGenerator.textAlignClass, textColorActiveClass = propsGenerator.textColorActiveClass, textColorClass = propsGenerator.textColorClass, textColorGradientClass = propsGenerator.textColorGradientClass, textColorHoverClass = propsGenerator.textColorHoverClass, textStyleClass = propsGenerator.textStyleClass, textTruncateClass = propsGenerator.textTruncateClass, textWeightClass = propsGenerator.textWeightClass, textWrapClass = propsGenerator.textWrapClass, cursorClass = propsGenerator.cursorClass, sizeClass = propsGenerator.sizeClass, widthClass = propsGenerator.widthClass;
|
|
56
|
-
// @ts-expect-error
|
|
57
|
-
var textStyles = useStyles.useStyles(props).styles;
|
|
58
|
-
return (jsxRuntime.jsxs(Tag, { className: clsx(className, 'text', sizeClass && "text_size_".concat(sizeClass), textWeightClass && "text-weight_".concat(textWeightClass), textAlignClass && "text-align_".concat(textAlignClass), textColorClass && "text-color_".concat(textColorClass), textColorActiveClass && "text-color_active_".concat(textColorActiveClass), textColorHoverClass && "text-color_hover_".concat(textColorHoverClass), textColorGradientClass && "text-gradient_".concat(textColorGradientClass), textStyleClass && "text-style_".concat(textStyleClass), textWrapClass && "word-wrap_".concat(textWrapClass), textTruncateClass && "text-truncate_".concat(textTruncateClass), type && "text_type_".concat(type), isSkeleton && 'text_skeleton', widthClass && "width_".concat(widthClass), cursorClass && "cursor_".concat(cursorClass), onClick && (cursor || 'cursor_type_pointer')), "data-test-id": dataTestId, "data-tour": dataTour, htmlFor: htmlFor, style: textStyles, onClick: onClick, onDoubleClick: onDoubleClick, children: [before, children, after] }));
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
exports.Text = Text;
|
|
62
|
-
exports.textAppearance = textAppearance;
|
|
63
|
-
exports.textConfig = textConfig;
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var tslib_es6 = require('../../tslib.es6_cjs_CCZ3TN_7.js');
|
|
4
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
-
var React = require('react');
|
|
6
|
-
var clsx = require('clsx');
|
|
7
|
-
var useDevicePropsGenerator = require('../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
|
|
8
|
-
require('lodash/camelCase');
|
|
9
|
-
require('lodash/castArray');
|
|
10
|
-
require('lodash/upperFirst');
|
|
11
|
-
require('../context/Notifications.js');
|
|
12
|
-
require('uuid');
|
|
13
|
-
require('@itcase/common');
|
|
14
|
-
require('../context/UIContext.js');
|
|
15
|
-
require('../hooks/useMediaQueries/useMediaQueries.js');
|
|
16
|
-
require('react-responsive');
|
|
17
|
-
require('../utils/setViewportProperty.js');
|
|
18
|
-
|
|
19
|
-
var inputMaskConfig = {
|
|
20
|
-
appearance: undefined,
|
|
21
|
-
state: undefined,
|
|
22
|
-
setAppearance: function (appearanceConfig) {
|
|
23
|
-
inputMaskConfig.appearance = appearanceConfig;
|
|
24
|
-
},
|
|
25
|
-
setState: function (newComponent) {
|
|
26
|
-
inputMaskConfig.state = newComponent;
|
|
27
|
-
},
|
|
28
|
-
};
|
|
29
|
-
var InputMask = React.forwardRef(function Input(props, ref) {
|
|
30
|
-
var id = props.id, className = props.className,
|
|
31
|
-
// state,
|
|
32
|
-
_a = props.type,
|
|
33
|
-
// state,
|
|
34
|
-
type = _a === void 0 ? 'text' : _a, name = props.name, appearance = props.appearance, isDisabled = props.isDisabled, dataTestId = props.dataTestId, index = props.index, placeholder = props.placeholder, value = props.value, onBlur = props.onBlur, onChange = props.onChange, onFocus = props.onFocus, onKeyDown = props.onKeyDown;
|
|
35
|
-
var appearanceConfig = appearance === null || appearance === void 0 ? void 0 : appearance.split(' ').reduce(function (resultConfig, appearanceKey) {
|
|
36
|
-
var _a;
|
|
37
|
-
return (tslib_es6.__assign(tslib_es6.__assign({}, resultConfig), (_a = inputMaskConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearanceKey]));
|
|
38
|
-
}, {});
|
|
39
|
-
// const stateConfig = useMemo(
|
|
40
|
-
// () => state && inputMaskConfig.state && inputMaskConfig.state[state],
|
|
41
|
-
// [state, inputMaskConfig],
|
|
42
|
-
// )
|
|
43
|
-
var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
|
|
44
|
-
var fillClass = propsGenerator.fillClass, fillDisabledClass = propsGenerator.fillDisabledClass, borderColorClass = propsGenerator.borderColorClass, borderColorDisabledClass = propsGenerator.borderColorDisabledClass, borderWidthClass = propsGenerator.borderWidthClass, borderWidthDisabledClass = propsGenerator.borderWidthDisabledClass, textColorClass = propsGenerator.textColorClass, textColorDisabledClass = propsGenerator.textColorDisabledClass, textSizeClass = propsGenerator.textSizeClass, textWeightClass = propsGenerator.textWeightClass, placeholderTextColorDisabledClass = propsGenerator.placeholderTextColorDisabledClass, caretClass = propsGenerator.caretClass, placeholderTextColorClass = propsGenerator.placeholderTextColorClass, shapeClass = propsGenerator.shapeClass, _b = propsGenerator.sizeClass, sizeClass = _b === void 0 ? 'm' : _b, widthClass = propsGenerator.widthClass;
|
|
45
|
-
return (jsxRuntime.jsx("input", { id: String(id), className: clsx(className, 'input', type === 'number' && 'input_type_number', (textSizeClass || textColorClass || textWeightClass) && 'text', caretClass && "caret-color_".concat(caretClass), !isDisabled
|
|
46
|
-
? fillClass && "fill_".concat(fillClass)
|
|
47
|
-
: fillDisabledClass && "fill_disabled_".concat(fillDisabledClass), shapeClass && "input_shape_".concat(shapeClass), textSizeClass && "text_size_".concat(textSizeClass), textWeightClass && "text-weight_".concat(textWeightClass), widthClass && "width_".concat(widthClass), !isDisabled
|
|
48
|
-
? borderWidthClass && "border-width_".concat(borderWidthClass)
|
|
49
|
-
: borderWidthDisabledClass &&
|
|
50
|
-
"border-width_disabled_".concat(borderWidthDisabledClass), sizeClass && "input_size_".concat(sizeClass), !isDisabled
|
|
51
|
-
? borderColorClass && "border-color_".concat(borderColorClass)
|
|
52
|
-
: borderColorDisabledClass &&
|
|
53
|
-
"border-color_disabled_".concat(borderColorDisabledClass), !isDisabled
|
|
54
|
-
? placeholderTextColorClass &&
|
|
55
|
-
"placeholder-text-color_".concat(placeholderTextColorClass)
|
|
56
|
-
: placeholderTextColorDisabledClass &&
|
|
57
|
-
"placeholder-text-color_disabled_".concat(placeholderTextColorDisabledClass), !isDisabled
|
|
58
|
-
? textColorClass && "text-color_".concat(textColorClass)
|
|
59
|
-
: textColorDisabledClass && "text-color_".concat(textColorDisabledClass)), type: type, disabled: isDisabled, "data-test-id": dataTestId || (name ? "".concat(name, "InputMask") : 'inputMask'), index: index, placeholder: placeholder,
|
|
60
|
-
// @ts-expect-error
|
|
61
|
-
ref: ref, value: value, onBlur: onBlur, onChange: onChange, onFocus: onFocus, onKeyDown: onKeyDown }));
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
exports.InputMask = InputMask;
|
|
65
|
-
exports.inputMaskConfig = inputMaskConfig;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var tslib_es6 = require('../../tslib.es6_cjs_CCZ3TN_7.js');
|
|
4
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
-
var React = require('react');
|
|
6
|
-
var clsx = require('clsx');
|
|
7
|
-
var useDevicePropsGenerator = require('../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
|
|
8
|
-
var useStyles = require('../hooks/useStyles/useStyles.js');
|
|
9
|
-
var Group = require('../../Group_cjs_B0oM0pjF.js');
|
|
10
|
-
var Text = require('../../Text_cjs_iL1l_7V1.js');
|
|
11
|
-
require('lodash/camelCase');
|
|
12
|
-
require('lodash/castArray');
|
|
13
|
-
require('lodash/upperFirst');
|
|
14
|
-
require('../context/Notifications.js');
|
|
15
|
-
require('uuid');
|
|
16
|
-
require('@itcase/common');
|
|
17
|
-
require('../context/UIContext.js');
|
|
18
|
-
require('../hooks/useMediaQueries/useMediaQueries.js');
|
|
19
|
-
require('react-responsive');
|
|
20
|
-
require('../utils/setViewportProperty.js');
|
|
21
|
-
require('lodash/maxBy');
|
|
22
|
-
require('../hooks/useStyles/styleAttributes.js');
|
|
23
|
-
|
|
24
|
-
var panelConfig = {
|
|
25
|
-
appearance: undefined,
|
|
26
|
-
setAppearance: function (appearanceConfig) {
|
|
27
|
-
panelConfig.appearance = appearanceConfig;
|
|
28
|
-
},
|
|
29
|
-
};
|
|
30
|
-
var Panel = React.forwardRef(function Panel(props, ref) {
|
|
31
|
-
var className = props.className, appearance = props.appearance, title = props.title, titleTextColor = props.titleTextColor, titleTextSize = props.titleTextSize, titleTextWeight = props.titleTextWeight, desc = props.desc, descTextColor = props.descTextColor, descTextSize = props.descTextSize, descTextWeight = props.descTextWeight, dataTour = props.dataTour, horizontalScroll = props.horizontalScroll, htmlFor = props.htmlFor, verticalScroll = props.verticalScroll, set = props.set, children = props.children;
|
|
32
|
-
var appearanceConfig = appearance === null || appearance === void 0 ? void 0 : appearance.split(' ').reduce(function (resultConfig, appearanceKey) {
|
|
33
|
-
var _a;
|
|
34
|
-
return (tslib_es6.__assign(tslib_es6.__assign({}, resultConfig), (_a = panelConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearanceKey]));
|
|
35
|
-
}, {});
|
|
36
|
-
var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
|
|
37
|
-
var directionClass = propsGenerator.directionClass, justifyContentClass = propsGenerator.justifyContentClass, alignContentClass = propsGenerator.alignContentClass, alignItemsClass = propsGenerator.alignItemsClass, fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, borderColorClass = propsGenerator.borderColorClass, borderTypeClass = propsGenerator.borderTypeClass, borderWidthClass = propsGenerator.borderWidthClass, elevationClass = propsGenerator.elevationClass, heightClass = propsGenerator.heightClass, positionClass = propsGenerator.positionClass, shapeClass = propsGenerator.shapeClass, widthClass = propsGenerator.widthClass, wrapClass = propsGenerator.wrapClass;
|
|
38
|
-
// @ts-expect-error
|
|
39
|
-
var _a = useStyles.useStyles(props), panelStyles = _a.styles, panelWrapperStyles = _a.wrapper;
|
|
40
|
-
return (jsxRuntime.jsxs(Group.Group, { className: clsx(className, 'panel', widthClass && "width_".concat(widthClass), heightClass && "height_".concat(heightClass), fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass), set && "panel_set_".concat(set), wrapClass && "flex_wrap_".concat(wrapClass), shapeClass && "panel_shape_".concat(shapeClass), borderColorClass && "border-color_".concat(borderColorClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderTypeClass && "border_type_".concat(borderTypeClass), alignContentClass && "panel_align-content_".concat(alignContentClass), alignItemsClass && "panel_align-items_".concat(alignItemsClass), elevationClass && "elevation_".concat(elevationClass), justifyContentClass && "panel_justify-content_".concat(justifyContentClass), positionClass && "position_".concat(positionClass), horizontalScroll && 'panel_type_scroll_horizontal', verticalScroll && 'panel_type_scroll_vertical'), "data-tour": dataTour, htmlFor: htmlFor, ref: ref, style: panelStyles, children: [title && (jsxRuntime.jsx("div", { className: "panel__header", children: jsxRuntime.jsx(Text.Text, { className: "panel__title", size: titleTextSize, textColor: titleTextColor, textWeight: titleTextWeight, children: title }) })), jsxRuntime.jsx("div", { className: clsx('panel__wrapper', directionClass && "panel_direction_".concat(directionClass)), style: panelWrapperStyles, children: children }), desc && (jsxRuntime.jsx("div", { className: "panel__footer", children: jsxRuntime.jsx(Text.Text, { className: "panel__desc", size: descTextSize, textColor: descTextColor, textWeight: descTextWeight, children: desc }) }))] }));
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
exports.Panel = Panel;
|
|
44
|
-
exports.panelConfig = panelConfig;
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { _ as __assign } from '../tslib.es6_es_Bwu1Cn-t.js';
|
|
2
|
-
import { jsx } from 'react/jsx-runtime';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import clsx from 'clsx';
|
|
5
|
-
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
6
|
-
import 'lodash/camelCase';
|
|
7
|
-
import 'lodash/castArray';
|
|
8
|
-
import 'lodash/upperFirst';
|
|
9
|
-
import '../context/Notifications.js';
|
|
10
|
-
import 'uuid';
|
|
11
|
-
import '@itcase/common';
|
|
12
|
-
import '../context/UIContext.js';
|
|
13
|
-
import '../hooks/useMediaQueries/useMediaQueries.js';
|
|
14
|
-
import 'react-responsive';
|
|
15
|
-
import '../utils/setViewportProperty.js';
|
|
16
|
-
|
|
17
|
-
var inputMaskConfig = {
|
|
18
|
-
appearance: undefined,
|
|
19
|
-
state: undefined,
|
|
20
|
-
setAppearance: function (appearanceConfig) {
|
|
21
|
-
inputMaskConfig.appearance = appearanceConfig;
|
|
22
|
-
},
|
|
23
|
-
setState: function (newComponent) {
|
|
24
|
-
inputMaskConfig.state = newComponent;
|
|
25
|
-
},
|
|
26
|
-
};
|
|
27
|
-
var InputMask = React.forwardRef(function Input(props, ref) {
|
|
28
|
-
var id = props.id, className = props.className,
|
|
29
|
-
// state,
|
|
30
|
-
_a = props.type,
|
|
31
|
-
// state,
|
|
32
|
-
type = _a === void 0 ? 'text' : _a, name = props.name, appearance = props.appearance, isDisabled = props.isDisabled, dataTestId = props.dataTestId, index = props.index, placeholder = props.placeholder, value = props.value, onBlur = props.onBlur, onChange = props.onChange, onFocus = props.onFocus, onKeyDown = props.onKeyDown;
|
|
33
|
-
var appearanceConfig = appearance === null || appearance === void 0 ? void 0 : appearance.split(' ').reduce(function (resultConfig, appearanceKey) {
|
|
34
|
-
var _a;
|
|
35
|
-
return (__assign(__assign({}, resultConfig), (_a = inputMaskConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearanceKey]));
|
|
36
|
-
}, {});
|
|
37
|
-
// const stateConfig = useMemo(
|
|
38
|
-
// () => state && inputMaskConfig.state && inputMaskConfig.state[state],
|
|
39
|
-
// [state, inputMaskConfig],
|
|
40
|
-
// )
|
|
41
|
-
var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
42
|
-
var fillClass = propsGenerator.fillClass, fillDisabledClass = propsGenerator.fillDisabledClass, borderColorClass = propsGenerator.borderColorClass, borderColorDisabledClass = propsGenerator.borderColorDisabledClass, borderWidthClass = propsGenerator.borderWidthClass, borderWidthDisabledClass = propsGenerator.borderWidthDisabledClass, textColorClass = propsGenerator.textColorClass, textColorDisabledClass = propsGenerator.textColorDisabledClass, textSizeClass = propsGenerator.textSizeClass, textWeightClass = propsGenerator.textWeightClass, placeholderTextColorDisabledClass = propsGenerator.placeholderTextColorDisabledClass, caretClass = propsGenerator.caretClass, placeholderTextColorClass = propsGenerator.placeholderTextColorClass, shapeClass = propsGenerator.shapeClass, _b = propsGenerator.sizeClass, sizeClass = _b === void 0 ? 'm' : _b, widthClass = propsGenerator.widthClass;
|
|
43
|
-
return (jsx("input", { id: String(id), className: clsx(className, 'input', type === 'number' && 'input_type_number', (textSizeClass || textColorClass || textWeightClass) && 'text', caretClass && "caret-color_".concat(caretClass), !isDisabled
|
|
44
|
-
? fillClass && "fill_".concat(fillClass)
|
|
45
|
-
: fillDisabledClass && "fill_disabled_".concat(fillDisabledClass), shapeClass && "input_shape_".concat(shapeClass), textSizeClass && "text_size_".concat(textSizeClass), textWeightClass && "text-weight_".concat(textWeightClass), widthClass && "width_".concat(widthClass), !isDisabled
|
|
46
|
-
? borderWidthClass && "border-width_".concat(borderWidthClass)
|
|
47
|
-
: borderWidthDisabledClass &&
|
|
48
|
-
"border-width_disabled_".concat(borderWidthDisabledClass), sizeClass && "input_size_".concat(sizeClass), !isDisabled
|
|
49
|
-
? borderColorClass && "border-color_".concat(borderColorClass)
|
|
50
|
-
: borderColorDisabledClass &&
|
|
51
|
-
"border-color_disabled_".concat(borderColorDisabledClass), !isDisabled
|
|
52
|
-
? placeholderTextColorClass &&
|
|
53
|
-
"placeholder-text-color_".concat(placeholderTextColorClass)
|
|
54
|
-
: placeholderTextColorDisabledClass &&
|
|
55
|
-
"placeholder-text-color_disabled_".concat(placeholderTextColorDisabledClass), !isDisabled
|
|
56
|
-
? textColorClass && "text-color_".concat(textColorClass)
|
|
57
|
-
: textColorDisabledClass && "text-color_".concat(textColorDisabledClass)), type: type, disabled: isDisabled, "data-test-id": dataTestId || (name ? "".concat(name, "InputMask") : 'inputMask'), index: index, placeholder: placeholder,
|
|
58
|
-
// @ts-expect-error
|
|
59
|
-
ref: ref, value: value, onBlur: onBlur, onChange: onChange, onFocus: onFocus, onKeyDown: onKeyDown }));
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
export { InputMask, inputMaskConfig };
|
package/dist/components/Panel.js
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { _ as __assign } from '../tslib.es6_es_Bwu1Cn-t.js';
|
|
2
|
-
import { jsxs, jsx } 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
|
-
import { G as Group } from '../Group_es_B8pQHYsC.js';
|
|
8
|
-
import { T as Text } from '../Text_es_D012qJ8s.js';
|
|
9
|
-
import 'lodash/camelCase';
|
|
10
|
-
import 'lodash/castArray';
|
|
11
|
-
import 'lodash/upperFirst';
|
|
12
|
-
import '../context/Notifications.js';
|
|
13
|
-
import 'uuid';
|
|
14
|
-
import '@itcase/common';
|
|
15
|
-
import '../context/UIContext.js';
|
|
16
|
-
import '../hooks/useMediaQueries/useMediaQueries.js';
|
|
17
|
-
import 'react-responsive';
|
|
18
|
-
import '../utils/setViewportProperty.js';
|
|
19
|
-
import 'lodash/maxBy';
|
|
20
|
-
import '../hooks/useStyles/styleAttributes.js';
|
|
21
|
-
|
|
22
|
-
var panelConfig = {
|
|
23
|
-
appearance: undefined,
|
|
24
|
-
setAppearance: function (appearanceConfig) {
|
|
25
|
-
panelConfig.appearance = appearanceConfig;
|
|
26
|
-
},
|
|
27
|
-
};
|
|
28
|
-
var Panel = React.forwardRef(function Panel(props, ref) {
|
|
29
|
-
var className = props.className, appearance = props.appearance, title = props.title, titleTextColor = props.titleTextColor, titleTextSize = props.titleTextSize, titleTextWeight = props.titleTextWeight, desc = props.desc, descTextColor = props.descTextColor, descTextSize = props.descTextSize, descTextWeight = props.descTextWeight, dataTour = props.dataTour, horizontalScroll = props.horizontalScroll, htmlFor = props.htmlFor, verticalScroll = props.verticalScroll, set = props.set, children = props.children;
|
|
30
|
-
var appearanceConfig = appearance === null || appearance === void 0 ? void 0 : appearance.split(' ').reduce(function (resultConfig, appearanceKey) {
|
|
31
|
-
var _a;
|
|
32
|
-
return (__assign(__assign({}, resultConfig), (_a = panelConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearanceKey]));
|
|
33
|
-
}, {});
|
|
34
|
-
var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
35
|
-
var directionClass = propsGenerator.directionClass, justifyContentClass = propsGenerator.justifyContentClass, alignContentClass = propsGenerator.alignContentClass, alignItemsClass = propsGenerator.alignItemsClass, fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, borderColorClass = propsGenerator.borderColorClass, borderTypeClass = propsGenerator.borderTypeClass, borderWidthClass = propsGenerator.borderWidthClass, elevationClass = propsGenerator.elevationClass, heightClass = propsGenerator.heightClass, positionClass = propsGenerator.positionClass, shapeClass = propsGenerator.shapeClass, widthClass = propsGenerator.widthClass, wrapClass = propsGenerator.wrapClass;
|
|
36
|
-
// @ts-expect-error
|
|
37
|
-
var _a = useStyles(props), panelStyles = _a.styles, panelWrapperStyles = _a.wrapper;
|
|
38
|
-
return (jsxs(Group, { className: clsx(className, 'panel', widthClass && "width_".concat(widthClass), heightClass && "height_".concat(heightClass), fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass), set && "panel_set_".concat(set), wrapClass && "flex_wrap_".concat(wrapClass), shapeClass && "panel_shape_".concat(shapeClass), borderColorClass && "border-color_".concat(borderColorClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderTypeClass && "border_type_".concat(borderTypeClass), alignContentClass && "panel_align-content_".concat(alignContentClass), alignItemsClass && "panel_align-items_".concat(alignItemsClass), elevationClass && "elevation_".concat(elevationClass), justifyContentClass && "panel_justify-content_".concat(justifyContentClass), positionClass && "position_".concat(positionClass), horizontalScroll && 'panel_type_scroll_horizontal', verticalScroll && 'panel_type_scroll_vertical'), "data-tour": dataTour, htmlFor: htmlFor, ref: ref, style: panelStyles, children: [title && (jsx("div", { className: "panel__header", children: jsx(Text, { className: "panel__title", size: titleTextSize, textColor: titleTextColor, textWeight: titleTextWeight, children: title }) })), jsx("div", { className: clsx('panel__wrapper', directionClass && "panel_direction_".concat(directionClass)), style: panelWrapperStyles, children: children }), desc && (jsx("div", { className: "panel__footer", children: jsx(Text, { className: "panel__desc", size: descTextSize, textColor: descTextColor, textWeight: descTextWeight, children: desc }) }))] }));
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
export { Panel, panelConfig };
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
.input-mask {
|
|
2
|
-
min-width: unset;
|
|
3
|
-
padding: 0;
|
|
4
|
-
margin: 0;
|
|
5
|
-
border: none;
|
|
6
|
-
position: relative;
|
|
7
|
-
box-shadow: none;
|
|
8
|
-
appearance: none;
|
|
9
|
-
outline: 0;
|
|
10
|
-
caret-color: var(--input-caret-color);
|
|
11
|
-
&:disabled {
|
|
12
|
-
background: var(--input-state-disabled-background);
|
|
13
|
-
border: solid 1px var(--input-state-disabled-border);
|
|
14
|
-
&:hover {
|
|
15
|
-
background: var(--input-state-disabled-background);
|
|
16
|
-
border: solid 1px var(--input-state-disabled-border);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
&:focus {
|
|
20
|
-
outline: none;
|
|
21
|
-
}
|
|
22
|
-
&:hover {
|
|
23
|
-
background: var(--input-state-hover-background);
|
|
24
|
-
border: solid 1px var(--input-state-hover-border);
|
|
25
|
-
}
|
|
26
|
-
&&_state {
|
|
27
|
-
&_success {
|
|
28
|
-
background: var(--input-state-success-background);
|
|
29
|
-
border: solid 1px var(--input-state-success-border);
|
|
30
|
-
}
|
|
31
|
-
&_error {
|
|
32
|
-
background: var(--input-state-error-background);
|
|
33
|
-
border: solid 1px var(--input-state-error-border);
|
|
34
|
-
}
|
|
35
|
-
&_focus {
|
|
36
|
-
background: var(--input-state-focus-background);
|
|
37
|
-
border: solid 1px var(--input-state-focus-border);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
.input-mask {
|
|
42
|
-
&_shape {
|
|
43
|
-
&_rounded {
|
|
44
|
-
border-radius: var(--input-shape-rounded);
|
|
45
|
-
position: relative;
|
|
46
|
-
}
|
|
47
|
-
&_underline {
|
|
48
|
-
border-left: none !important;
|
|
49
|
-
border-top: none !important;
|
|
50
|
-
border-right: none !important;
|
|
51
|
-
position: relative;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
.input-mask {
|
|
56
|
-
&&_size {
|
|
57
|
-
@each $size in xxl, xl, l, m, s, xs, xxs, normal, tiny, compact, large {
|
|
58
|
-
&_$(size) {
|
|
59
|
-
padding: var(--input-size-$(size)-padding);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
.input-mask {
|
|
65
|
-
&_type {
|
|
66
|
-
&_number {
|
|
67
|
-
appearance: none;
|
|
68
|
-
&[type='number'] {
|
|
69
|
-
appearance: textfield;
|
|
70
|
-
}
|
|
71
|
-
&::-webkit-outer-spin-button,
|
|
72
|
-
&::-webkit-inner-spin-button {
|
|
73
|
-
appearance: none;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|