@itcase/ui 1.3.26 → 1.3.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Badge-CcaG-4ly.js → Badge-5gtVywXB.js} +4 -6
- package/dist/{Badge-CoHPvO35.js → Badge-DhOJoJgc.js} +4 -6
- package/dist/{Button-BFX_EEum.js → Button-BSnodY9v.js} +2 -2
- package/dist/{Button-BSzqA8CB.js → Button-Kcw2DdY0.js} +2 -2
- package/dist/{Group-D6CXN4hS.js → Group-BY8OkVsS.js} +2 -2
- package/dist/{Group-B9L2NTgM.js → Group-c3ZkPu8e.js} +2 -2
- package/dist/{Icon-BZa8B7te.js → Icon-BdHr6E6M.js} +1 -1
- package/dist/{Icon-B_bS-o4g.js → Icon-pUvizy3W.js} +1 -1
- package/dist/{Label-HKRKV3mn.js → Label-CBwPiUuf.js} +1 -1
- package/dist/{Label-DQyB2ThM.js → Label-DgyUhGTQ.js} +1 -1
- package/dist/{Overlay-DcGWchjp.js → Overlay-B9nOIfLe.js} +2 -2
- package/dist/{Overlay-CCx7yAPc.js → Overlay-Yf9EEclM.js} +2 -2
- package/dist/{Title-DBaHcpvB.js → Title-BfKF5WvZ.js} +2 -2
- package/dist/{Title-CHgrIarR.js → Title-C7Qv9WfS.js} +2 -2
- package/dist/{Tooltip-1Jbub0K6.js → Tooltip-AodzD-7D.js} +1 -1
- package/dist/{Tooltip-CNua1g76.js → Tooltip-BDEyAnd-.js} +1 -1
- package/dist/cjs/components/Accordion.js +3 -3
- package/dist/cjs/components/Avatar.js +3 -3
- package/dist/cjs/components/Badge.js +1 -1
- package/dist/cjs/components/Breadcrumbs.js +3 -3
- package/dist/cjs/components/Button.js +4 -4
- package/dist/cjs/components/Cell.js +4 -4
- package/dist/cjs/components/Checkmark.js +6 -12
- package/dist/cjs/components/Choice.js +3 -3
- package/dist/cjs/components/CookiesWarning.js +5 -5
- package/dist/cjs/components/DatePicker.js +5 -5
- package/dist/cjs/components/Drawer.js +2 -2
- package/dist/cjs/components/Flex.js +4 -4
- package/dist/cjs/components/Grid.js +4 -4
- package/dist/cjs/components/Group.js +1 -1
- package/dist/cjs/components/Icon.js +3 -3
- package/dist/cjs/components/InputPassword.js +3 -3
- package/dist/cjs/components/Label.js +3 -3
- package/dist/cjs/components/Modal.js +3 -3
- package/dist/cjs/components/ModalSheetBottom.js +2 -2
- package/dist/cjs/components/Notification.js +2 -2
- package/dist/cjs/components/Overlay.js +1 -1
- package/dist/cjs/components/Pagination.js +3 -3
- package/dist/cjs/components/Panel.js +1 -1
- package/dist/cjs/components/Response.js +7 -7
- package/dist/cjs/components/SVGContent.js +0 -1
- package/dist/cjs/components/Search.js +3 -3
- package/dist/cjs/components/Select.js +5 -5
- package/dist/cjs/components/Swiper.js +1 -1
- package/dist/cjs/components/Tab.js +1 -1
- package/dist/cjs/components/Tile.js +4 -4
- package/dist/cjs/components/Title.js +1 -1
- package/dist/cjs/components/Tooltip.js +2 -2
- package/dist/components/Accordion.js +3 -3
- package/dist/components/Avatar.js +3 -3
- package/dist/components/Badge.js +1 -1
- package/dist/components/Breadcrumbs.js +3 -3
- package/dist/components/Button.js +4 -4
- package/dist/components/Cell.js +4 -4
- package/dist/components/Checkmark.js +6 -12
- package/dist/components/Choice.js +3 -3
- package/dist/components/CookiesWarning.js +5 -5
- package/dist/components/DatePicker.js +5 -5
- package/dist/components/Drawer.js +2 -2
- package/dist/components/Flex.js +4 -4
- package/dist/components/Grid.js +4 -4
- package/dist/components/Group.js +1 -1
- package/dist/components/Icon.js +3 -3
- package/dist/components/InputPassword.js +3 -3
- package/dist/components/Label.js +3 -3
- package/dist/components/Modal.js +3 -3
- package/dist/components/ModalSheetBottom.js +2 -2
- package/dist/components/Notification.js +2 -2
- package/dist/components/Overlay.js +1 -1
- package/dist/components/Pagination.js +3 -3
- package/dist/components/Panel.js +1 -1
- package/dist/components/Response.js +7 -7
- package/dist/components/SVGContent.js +0 -1
- package/dist/components/Search.js +3 -3
- package/dist/components/Select.js +5 -5
- package/dist/components/Swiper.js +1 -1
- package/dist/components/Tab.js +1 -1
- package/dist/components/Tile.js +4 -4
- package/dist/components/Title.js +1 -1
- package/dist/components/Tooltip.js +2 -2
- package/dist/css/components/Checkmark/Checkmark.css +2 -4
- package/dist/css/tokens/colors.css +19 -7
- package/dist/stories/Overview.mdx +5 -5
- package/dist/stories/Playground.mdx +4 -4
- package/package.json +8 -5
- package/dist/cjs/components/Caption.js +0 -28
- package/dist/cjs/components/SiteMenu.js +0 -87
- package/dist/cjs/components/Wrapper.js +0 -28
- package/dist/components/Caption.js +0 -26
- package/dist/components/SiteMenu.js +0 -82
- package/dist/components/Wrapper.js +0 -26
- package/dist/css/components/Caption/Caption.css +0 -22
- package/dist/css/components/SiteMenu/SiteMenu.css +0 -37
- package/dist/css/components/Wrapper/Wrapper.css +0 -36
- package/dist/types/components/Caption/Caption.d.ts +0 -3
- package/dist/types/components/Caption/Caption.interface.d.ts +0 -22
- package/dist/types/components/Caption/index.d.ts +0 -1
- package/dist/types/components/SiteMenu/SiteMenu.appearance.d.ts +0 -2
- package/dist/types/components/SiteMenu/SiteMenu.d.ts +0 -4
- package/dist/types/components/SiteMenu/SiteMenu.interface.d.ts +0 -39
- package/dist/types/components/SiteMenu/SiteMenuButton.d.ts +0 -3
- package/dist/types/components/SiteMenu/index.d.ts +0 -4
- package/dist/types/components/Wrapper/Wrapper.d.ts +0 -3
- package/dist/types/components/Wrapper/Wrapper.interface.d.ts +0 -21
- package/dist/types/components/Wrapper/index.d.ts +0 -1
|
@@ -1,17 +1,25 @@
|
|
|
1
1
|
/* stylelint-disable custom-property-empty-line-before, value-keyword-case */
|
|
2
2
|
|
|
3
3
|
:root {
|
|
4
|
-
--color-accent-primary: hsla(
|
|
5
|
-
--color-accent-
|
|
4
|
+
--color-accent-primary: hsla(92, 49%, 47%, 1);
|
|
5
|
+
--color-accent-secondary: hsla(92, 28%, 62%, 1);
|
|
6
|
+
--color-accent-tertiary: hsla(93, 53%, 93%, 1);
|
|
7
|
+
--color-accent-quaternary: hsla(92, 71%, 27%, 1);
|
|
6
8
|
|
|
7
9
|
--color-accent-text-primary: hsla(0, 0%, 100%, 1);
|
|
8
|
-
--color-accent-text-secondary: hsla(
|
|
10
|
+
--color-accent-text-secondary: hsla(92, 71%, 27%, 1);
|
|
11
|
+
--color-accent-text-tertiary: hsla(92, 49%, 47%, 1);
|
|
12
|
+
--color-accent-text-quaternary: hsla(0, 0%, 100%, 1);
|
|
9
13
|
|
|
10
14
|
--color-accent-item-primary: hsla(0, 0%, 100%, 1);
|
|
11
|
-
--color-accent-item-secondary: hsla(
|
|
15
|
+
--color-accent-item-secondary: hsla(92, 37%, 35%, 1);
|
|
16
|
+
--color-accent-item-tertiary: hsla(92, 49%, 47%, 1);
|
|
17
|
+
--color-accent-item-quaternary: hsla(0, 0%, 100%, 1);
|
|
12
18
|
|
|
13
|
-
--color-accent-border-primary: hsla(
|
|
14
|
-
--color-accent-border-
|
|
19
|
+
--color-accent-border-primary: hsla(92, 37%, 35%, 1);
|
|
20
|
+
--color-accent-border-secondary: hsla(92, 37%, 35%, 1);
|
|
21
|
+
--color-accent-border-tertiary: hsla(92, 49%, 47%, 1);
|
|
22
|
+
--color-accent-border-quaternary: hsla(0, 0%, 100%, 1);
|
|
15
23
|
|
|
16
24
|
--color-primary: hsla(0, 94%, 66%, 1);
|
|
17
25
|
--color-primary-primary: hsla(0, 94%, 66%, 1);
|
|
@@ -42,7 +50,7 @@
|
|
|
42
50
|
--color-secondary-item-primary: hsla(0, 0%, 100%, 1);
|
|
43
51
|
--color-secondary-item-secondary: hsla(0, 0%, 59%, 1);
|
|
44
52
|
|
|
45
|
-
--color-secondary-border-primary: hsla(
|
|
53
|
+
--color-secondary-border-primary: hsla(210, 8%, 75%, 1);
|
|
46
54
|
|
|
47
55
|
--color-tertiary-primary: hsla(50, 100%, 62%, 1);
|
|
48
56
|
--color-tertiary-secondary: hsla(50, 100%, 77%, 1);
|
|
@@ -98,10 +106,14 @@
|
|
|
98
106
|
--color-warning-text-primary: hsla(43, 68%, 50%, 1);
|
|
99
107
|
--color-warning-text-secondary: hsla(0, 0%, 100%, 1);
|
|
100
108
|
|
|
109
|
+
--color-warning-border-primary: hsla(43, 68%, 50%, 1);
|
|
110
|
+
|
|
101
111
|
--color-danger-primary: hsla(349, 96%, 44%, 1);
|
|
102
112
|
--color-danger-text-primary: hsla(349, 96%, 44%, 1);
|
|
103
113
|
--color-danger-text-secondary: hsla(0, 0%, 100%, 1);
|
|
104
114
|
|
|
115
|
+
--color-danger-border-primary: hsla(349, 96%, 44%, 1);
|
|
116
|
+
|
|
105
117
|
--color-error-primary: hsla(6, 99%, 57%, 1);
|
|
106
118
|
--color-error-text-primary: hsla(0, 0%, 100%, 1);
|
|
107
119
|
--color-error-text-secondary: hsla(6, 99%, 57%, 1);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Meta, Story } from '@storybook/blocks'
|
|
2
2
|
|
|
3
|
-
import * as
|
|
3
|
+
import * as TooltipStories from './Tooltip.stories.tsx'
|
|
4
4
|
|
|
5
|
-
<Meta title="Atoms /
|
|
5
|
+
<Meta title="Atoms / Tooltip / Overview" />
|
|
6
6
|
|
|
7
|
-
#
|
|
7
|
+
# Tooltip
|
|
8
8
|
|
|
9
|
-
`
|
|
9
|
+
`Tooltip` - это небольшой фрагмент контекстной информации, который появляется, когда пользователи наводят курсор мыши на элемент пользовательского интерфейса.
|
|
10
10
|
|
|
11
|
-
<Story of={
|
|
11
|
+
<Story of={TooltipStories.surfacePrimary} />
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Canvas, Controls, Meta } from '@storybook/blocks'
|
|
2
2
|
|
|
3
|
-
import * as
|
|
3
|
+
import * as TooltipStories from './Tooltip.stories.tsx'
|
|
4
4
|
|
|
5
|
-
<Meta title="Atoms /
|
|
5
|
+
<Meta title="Atoms / Tooltip / Playground" />
|
|
6
6
|
|
|
7
7
|
# Playground
|
|
8
8
|
|
|
9
|
-
<Canvas sourceState="shown" of={
|
|
10
|
-
<Controls of={
|
|
9
|
+
<Canvas sourceState="shown" of={TooltipStories.surfacePrimary} />
|
|
10
|
+
<Controls of={TooltipStories.surfacePrimary} />
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itcase/ui",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.28",
|
|
4
4
|
"description": "UI components (Modal, Loader, Popup, etc)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Modal",
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
},
|
|
92
92
|
"dependencies": {
|
|
93
93
|
"@emotion/is-prop-valid": "^1.3.1",
|
|
94
|
-
"@itcase/storybook-config": "^1.0.
|
|
94
|
+
"@itcase/storybook-config": "^1.0.49",
|
|
95
95
|
"@itcase/common": "^1.2.18",
|
|
96
96
|
"@itcase/config": "^1.0.16",
|
|
97
97
|
"@itcase/icons": "^1.0.21",
|
|
@@ -121,8 +121,6 @@
|
|
|
121
121
|
},
|
|
122
122
|
"devDependencies": {
|
|
123
123
|
"@babel/core": "^7.26.9",
|
|
124
|
-
"@babel/eslint-parser": "^7.26.8",
|
|
125
|
-
"@babel/eslint-plugin": "^7.25.9",
|
|
126
124
|
"@babel/preset-env": "^7.26.9",
|
|
127
125
|
"@babel/preset-react": "^7.26.3",
|
|
128
126
|
"@commitlint/cli": "^19.7.1",
|
|
@@ -162,8 +160,13 @@
|
|
|
162
160
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
163
161
|
"rollup-preserve-directives": "^1.1.3",
|
|
164
162
|
"semantic-release": "^24.2.3",
|
|
165
|
-
"storybook": "^8.
|
|
163
|
+
"storybook": "^8.6.0",
|
|
166
164
|
"stylelint": "^16.14.1",
|
|
167
165
|
"typescript": "^5.7.3"
|
|
166
|
+
},
|
|
167
|
+
"msw": {
|
|
168
|
+
"workerDirectory": [
|
|
169
|
+
"public"
|
|
170
|
+
]
|
|
168
171
|
}
|
|
169
172
|
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var clsx = require('clsx');
|
|
5
|
-
var useDeviceTargetClassGenerator = require('../hooks/useDeviceTargetClassGenerator.js');
|
|
6
|
-
var useStyles = require('../hooks/useStyles.js');
|
|
7
|
-
require('../../tslib.es6-CCZ3TN_7.js');
|
|
8
|
-
require('react');
|
|
9
|
-
require('lodash/camelCase');
|
|
10
|
-
require('lodash/castArray');
|
|
11
|
-
require('../context/UIContext.js');
|
|
12
|
-
require('../hooks/useMediaQueries.js');
|
|
13
|
-
require('react-responsive');
|
|
14
|
-
require('../utils/setViewportProperty.js');
|
|
15
|
-
require('lodash/maxBy');
|
|
16
|
-
require('lodash/upperFirst');
|
|
17
|
-
require('../hooks/styleAttributes.js');
|
|
18
|
-
|
|
19
|
-
function Caption(props) {
|
|
20
|
-
var children = props.children, className = props.className;
|
|
21
|
-
var classGenerator = useDeviceTargetClassGenerator.useDeviceTargetClassGenerator(props);
|
|
22
|
-
var fillClass = classGenerator.fillClass, fillGradientClass = classGenerator.fillGradientClass, positionClass = classGenerator.positionClass;
|
|
23
|
-
// @ts-expect-error
|
|
24
|
-
var captionStyles = useStyles.useStyles(props).styles;
|
|
25
|
-
return (jsxRuntime.jsx("div", { className: clsx(className, 'caption', positionClass && "caption_position_".concat(positionClass), fillClass && "fill_".concat(fillClass), fillGradientClass && "fill-gradient_".concat(fillGradientClass)), style: captionStyles, children: children }));
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
exports.Caption = Caption;
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var React = require('react');
|
|
5
|
-
var clsx = require('clsx');
|
|
6
|
-
var UIContext = require('../context/UIContext.js');
|
|
7
|
-
var useDeviceTargetClassGenerator = require('../hooks/useDeviceTargetClassGenerator.js');
|
|
8
|
-
var Icon = require('../../Icon-B_bS-o4g.js');
|
|
9
|
-
var Text = require('../../Text-Beslj4Ns.js');
|
|
10
|
-
require('../hooks/useMediaQueries.js');
|
|
11
|
-
require('react-responsive');
|
|
12
|
-
require('../utils/setViewportProperty.js');
|
|
13
|
-
require('../../tslib.es6-CCZ3TN_7.js');
|
|
14
|
-
require('lodash/camelCase');
|
|
15
|
-
require('lodash/castArray');
|
|
16
|
-
require('react-inlinesvg');
|
|
17
|
-
require('../hooks/useStyles.js');
|
|
18
|
-
require('lodash/maxBy');
|
|
19
|
-
require('lodash/upperFirst');
|
|
20
|
-
require('../hooks/styleAttributes.js');
|
|
21
|
-
require('../../Link-CxWmYMyL.js');
|
|
22
|
-
require('../../Tooltip-CNua1g76.js');
|
|
23
|
-
require('../../Title-DBaHcpvB.js');
|
|
24
|
-
|
|
25
|
-
var siteMenuAppearance = {
|
|
26
|
-
dev: {},
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
var siteMenuConfig = {
|
|
30
|
-
appearance: siteMenuAppearance,
|
|
31
|
-
setAppearance: function (newComponent) {
|
|
32
|
-
siteMenuConfig.appearance = newComponent;
|
|
33
|
-
},
|
|
34
|
-
};
|
|
35
|
-
function SiteMenu(props) {
|
|
36
|
-
var children = props.children, appearance = props.appearance, className = props.className, closeText = props.closeText, closeTextColor = props.closeTextColor, closeTextColorHover = props.closeTextColorHover, closeTextSize = props.closeTextSize, iconClose = props.iconClose, iconCloseBgFill = props.iconCloseBgFill, iconCloseFill = props.iconCloseFill, iconCloseSize = props.iconCloseSize, onClose = props.onClose;
|
|
37
|
-
var _a = UIContext.useSiteMenuContext(), isSiteMenuOpen = _a.isSiteMenuOpen, setIsSiteMenuOpen = _a.setIsSiteMenuOpen;
|
|
38
|
-
var onClickClose = React.useCallback(
|
|
39
|
-
// @ts-expect-error
|
|
40
|
-
function (event) {
|
|
41
|
-
// @ts-expect-error
|
|
42
|
-
setIsSiteMenuOpen(false);
|
|
43
|
-
// @ts-expect-error
|
|
44
|
-
onClose && onClose(event);
|
|
45
|
-
}, [onClose]);
|
|
46
|
-
// TODO: dont delete!
|
|
47
|
-
// const onClickHeaderLink = useCallback((event) => {
|
|
48
|
-
// // simulate a click on a link
|
|
49
|
-
// event.stopPropagation()
|
|
50
|
-
// event.preventDefault()
|
|
51
|
-
// // save anchor in history
|
|
52
|
-
// history.pushState(
|
|
53
|
-
// location.href,
|
|
54
|
-
// event.target.getAttribute('href'),
|
|
55
|
-
// `${location.origin}/${event.target.getAttribute('href')}`
|
|
56
|
-
// )
|
|
57
|
-
// // scroll to anchor
|
|
58
|
-
// document.querySelector(event.target.getAttribute('href')).scrollIntoView({
|
|
59
|
-
// behavior: 'smooth',
|
|
60
|
-
// })
|
|
61
|
-
// }, [])
|
|
62
|
-
// @ts-expect-error
|
|
63
|
-
var appearanceConfig = siteMenuConfig.appearance && siteMenuConfig.appearance[appearance];
|
|
64
|
-
var classGenerator = useDeviceTargetClassGenerator.useDeviceTargetClassGenerator(props, appearanceConfig);
|
|
65
|
-
var fillClass = classGenerator.fillClass;
|
|
66
|
-
return (jsxRuntime.jsx("div", { className: clsx(className, 'site-menu', fillClass && "fill_".concat(fillClass), isSiteMenuOpen && 'site-menu_state_visible', !isSiteMenuOpen && 'site-menu_state_hidden'), children: jsxRuntime.jsxs("div", { className: "site-menu__wrapper", children: [jsxRuntime.jsx("div", { className: "site-menu__close", children: iconClose ? (jsxRuntime.jsx(Icon.Icon, { fill: iconCloseFill || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.iconCloseFill), bgFill: iconCloseBgFill || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.iconCloseBgFill), size: iconCloseSize || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.iconCloseSize), SvgImage: iconClose || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.iconClose), onClick: onClickClose })) : (jsxRuntime.jsx(Text.Text, { size: closeTextSize || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.closeTextSize), textColor: closeTextColor || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.closeTextColor), textColorHover: closeTextColorHover || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.closeTextColorHover),
|
|
67
|
-
// @ts-expect-error
|
|
68
|
-
onClick: onClickClose, children: closeText })) }), jsxRuntime.jsx("div", { className: "site-menu__items", children: children })] }) }));
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
function SiteMenuButton(props) {
|
|
72
|
-
var children = props.children, className = props.className, text = props.text, onClick = props.onClick;
|
|
73
|
-
var setIsSiteMenuOpen = UIContext.useSiteMenuContext().setIsSiteMenuOpen;
|
|
74
|
-
// @ts-expect-error
|
|
75
|
-
var onClickButton = React.useCallback(function (event) {
|
|
76
|
-
// @ts-expect-error
|
|
77
|
-
setIsSiteMenuOpen(true);
|
|
78
|
-
// @ts-expect-error
|
|
79
|
-
onClick && onClick(event);
|
|
80
|
-
}, []);
|
|
81
|
-
return (jsxRuntime.jsx("div", { className: clsx(className, 'site-menu__button'), onClick: onClickButton, children: children || text }));
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
exports.SiteMenu = SiteMenu;
|
|
85
|
-
exports.SiteMenuButton = SiteMenuButton;
|
|
86
|
-
exports.siteMenuAppearance = siteMenuAppearance;
|
|
87
|
-
exports.siteMenuConfig = siteMenuConfig;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var clsx = require('clsx');
|
|
5
|
-
var useDeviceTargetClassGenerator = require('../hooks/useDeviceTargetClassGenerator.js');
|
|
6
|
-
var useStyles = require('../hooks/useStyles.js');
|
|
7
|
-
require('../../tslib.es6-CCZ3TN_7.js');
|
|
8
|
-
require('react');
|
|
9
|
-
require('lodash/camelCase');
|
|
10
|
-
require('lodash/castArray');
|
|
11
|
-
require('../context/UIContext.js');
|
|
12
|
-
require('../hooks/useMediaQueries.js');
|
|
13
|
-
require('react-responsive');
|
|
14
|
-
require('../utils/setViewportProperty.js');
|
|
15
|
-
require('lodash/maxBy');
|
|
16
|
-
require('lodash/upperFirst');
|
|
17
|
-
require('../hooks/styleAttributes.js');
|
|
18
|
-
|
|
19
|
-
function Wrapper(props) {
|
|
20
|
-
var id = props.id, children = props.children, after = props.after, before = props.before, _a = props.className, className = _a === void 0 ? 'wrapper' : _a, _b = props.tag, Tag = _b === void 0 ? 'div' : _b, type = props.type;
|
|
21
|
-
var classGenerator = useDeviceTargetClassGenerator.useDeviceTargetClassGenerator(props);
|
|
22
|
-
var alignClass = classGenerator.alignClass, alignDirectionClass = classGenerator.alignDirectionClass, fillClass = classGenerator.fillClass, horizontalResizingClass = classGenerator.horizontalResizingClass, positionClass = classGenerator.positionClass, verticalResizingClass = classGenerator.verticalResizingClass, wrapperPositionClass = classGenerator.wrapperPositionClass;
|
|
23
|
-
// @ts-expect-error
|
|
24
|
-
var _c = useStyles.useStyles(props), innerStyles = _c.inner, wrapperStyles = _c.styles;
|
|
25
|
-
return (jsxRuntime.jsx(Tag, { className: clsx(className, type && "".concat(className, "_type_").concat(type), fillClass && "fill_".concat(fillClass), horizontalResizingClass && "wrapper_resize-horizontal_".concat(horizontalResizingClass), verticalResizingClass && "wrapper_resize-vertical_".concat(verticalResizingClass), positionClass && "position_".concat(positionClass)), id: id, style: wrapperStyles, children: jsxRuntime.jsxs("div", { className: clsx("".concat(className, "__inner"), alignDirectionClass && "align_".concat(alignDirectionClass), alignClass && "align_".concat(alignClass), wrapperPositionClass && "position_".concat(wrapperPositionClass)), style: innerStyles, children: [before, children, after] }) }));
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
exports.Wrapper = Wrapper;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import clsx from 'clsx';
|
|
3
|
-
import { useDeviceTargetClassGenerator } from '../hooks/useDeviceTargetClassGenerator.js';
|
|
4
|
-
import { useStyles } from '../hooks/useStyles.js';
|
|
5
|
-
import '../tslib.es6-Bwu1Cn-t.js';
|
|
6
|
-
import 'react';
|
|
7
|
-
import 'lodash/camelCase';
|
|
8
|
-
import 'lodash/castArray';
|
|
9
|
-
import '../context/UIContext.js';
|
|
10
|
-
import '../hooks/useMediaQueries.js';
|
|
11
|
-
import 'react-responsive';
|
|
12
|
-
import '../utils/setViewportProperty.js';
|
|
13
|
-
import 'lodash/maxBy';
|
|
14
|
-
import 'lodash/upperFirst';
|
|
15
|
-
import '../hooks/styleAttributes.js';
|
|
16
|
-
|
|
17
|
-
function Caption(props) {
|
|
18
|
-
var children = props.children, className = props.className;
|
|
19
|
-
var classGenerator = useDeviceTargetClassGenerator(props);
|
|
20
|
-
var fillClass = classGenerator.fillClass, fillGradientClass = classGenerator.fillGradientClass, positionClass = classGenerator.positionClass;
|
|
21
|
-
// @ts-expect-error
|
|
22
|
-
var captionStyles = useStyles(props).styles;
|
|
23
|
-
return (jsx("div", { className: clsx(className, 'caption', positionClass && "caption_position_".concat(positionClass), fillClass && "fill_".concat(fillClass), fillGradientClass && "fill-gradient_".concat(fillGradientClass)), style: captionStyles, children: children }));
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export { Caption };
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
-
import { useCallback } from 'react';
|
|
3
|
-
import clsx from 'clsx';
|
|
4
|
-
import { useSiteMenuContext } from '../context/UIContext.js';
|
|
5
|
-
import { useDeviceTargetClassGenerator } from '../hooks/useDeviceTargetClassGenerator.js';
|
|
6
|
-
import { I as Icon } from '../Icon-BZa8B7te.js';
|
|
7
|
-
import { T as Text } from '../Text-JayJa3hj.js';
|
|
8
|
-
import '../hooks/useMediaQueries.js';
|
|
9
|
-
import 'react-responsive';
|
|
10
|
-
import '../utils/setViewportProperty.js';
|
|
11
|
-
import '../tslib.es6-Bwu1Cn-t.js';
|
|
12
|
-
import 'lodash/camelCase';
|
|
13
|
-
import 'lodash/castArray';
|
|
14
|
-
import 'react-inlinesvg';
|
|
15
|
-
import '../hooks/useStyles.js';
|
|
16
|
-
import 'lodash/maxBy';
|
|
17
|
-
import 'lodash/upperFirst';
|
|
18
|
-
import '../hooks/styleAttributes.js';
|
|
19
|
-
import '../Link-DN2LhPjD.js';
|
|
20
|
-
import '../Tooltip-1Jbub0K6.js';
|
|
21
|
-
import '../Title-CHgrIarR.js';
|
|
22
|
-
|
|
23
|
-
var siteMenuAppearance = {
|
|
24
|
-
dev: {},
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
var siteMenuConfig = {
|
|
28
|
-
appearance: siteMenuAppearance,
|
|
29
|
-
setAppearance: function (newComponent) {
|
|
30
|
-
siteMenuConfig.appearance = newComponent;
|
|
31
|
-
},
|
|
32
|
-
};
|
|
33
|
-
function SiteMenu(props) {
|
|
34
|
-
var children = props.children, appearance = props.appearance, className = props.className, closeText = props.closeText, closeTextColor = props.closeTextColor, closeTextColorHover = props.closeTextColorHover, closeTextSize = props.closeTextSize, iconClose = props.iconClose, iconCloseBgFill = props.iconCloseBgFill, iconCloseFill = props.iconCloseFill, iconCloseSize = props.iconCloseSize, onClose = props.onClose;
|
|
35
|
-
var _a = useSiteMenuContext(), isSiteMenuOpen = _a.isSiteMenuOpen, setIsSiteMenuOpen = _a.setIsSiteMenuOpen;
|
|
36
|
-
var onClickClose = useCallback(
|
|
37
|
-
// @ts-expect-error
|
|
38
|
-
function (event) {
|
|
39
|
-
// @ts-expect-error
|
|
40
|
-
setIsSiteMenuOpen(false);
|
|
41
|
-
// @ts-expect-error
|
|
42
|
-
onClose && onClose(event);
|
|
43
|
-
}, [onClose]);
|
|
44
|
-
// TODO: dont delete!
|
|
45
|
-
// const onClickHeaderLink = useCallback((event) => {
|
|
46
|
-
// // simulate a click on a link
|
|
47
|
-
// event.stopPropagation()
|
|
48
|
-
// event.preventDefault()
|
|
49
|
-
// // save anchor in history
|
|
50
|
-
// history.pushState(
|
|
51
|
-
// location.href,
|
|
52
|
-
// event.target.getAttribute('href'),
|
|
53
|
-
// `${location.origin}/${event.target.getAttribute('href')}`
|
|
54
|
-
// )
|
|
55
|
-
// // scroll to anchor
|
|
56
|
-
// document.querySelector(event.target.getAttribute('href')).scrollIntoView({
|
|
57
|
-
// behavior: 'smooth',
|
|
58
|
-
// })
|
|
59
|
-
// }, [])
|
|
60
|
-
// @ts-expect-error
|
|
61
|
-
var appearanceConfig = siteMenuConfig.appearance && siteMenuConfig.appearance[appearance];
|
|
62
|
-
var classGenerator = useDeviceTargetClassGenerator(props, appearanceConfig);
|
|
63
|
-
var fillClass = classGenerator.fillClass;
|
|
64
|
-
return (jsx("div", { className: clsx(className, 'site-menu', fillClass && "fill_".concat(fillClass), isSiteMenuOpen && 'site-menu_state_visible', !isSiteMenuOpen && 'site-menu_state_hidden'), children: jsxs("div", { className: "site-menu__wrapper", children: [jsx("div", { className: "site-menu__close", children: iconClose ? (jsx(Icon, { fill: iconCloseFill || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.iconCloseFill), bgFill: iconCloseBgFill || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.iconCloseBgFill), size: iconCloseSize || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.iconCloseSize), SvgImage: iconClose || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.iconClose), onClick: onClickClose })) : (jsx(Text, { size: closeTextSize || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.closeTextSize), textColor: closeTextColor || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.closeTextColor), textColorHover: closeTextColorHover || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.closeTextColorHover),
|
|
65
|
-
// @ts-expect-error
|
|
66
|
-
onClick: onClickClose, children: closeText })) }), jsx("div", { className: "site-menu__items", children: children })] }) }));
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
function SiteMenuButton(props) {
|
|
70
|
-
var children = props.children, className = props.className, text = props.text, onClick = props.onClick;
|
|
71
|
-
var setIsSiteMenuOpen = useSiteMenuContext().setIsSiteMenuOpen;
|
|
72
|
-
// @ts-expect-error
|
|
73
|
-
var onClickButton = useCallback(function (event) {
|
|
74
|
-
// @ts-expect-error
|
|
75
|
-
setIsSiteMenuOpen(true);
|
|
76
|
-
// @ts-expect-error
|
|
77
|
-
onClick && onClick(event);
|
|
78
|
-
}, []);
|
|
79
|
-
return (jsx("div", { className: clsx(className, 'site-menu__button'), onClick: onClickButton, children: children || text }));
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
export { SiteMenu, SiteMenuButton, siteMenuAppearance, siteMenuConfig };
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
-
import clsx from 'clsx';
|
|
3
|
-
import { useDeviceTargetClassGenerator } from '../hooks/useDeviceTargetClassGenerator.js';
|
|
4
|
-
import { useStyles } from '../hooks/useStyles.js';
|
|
5
|
-
import '../tslib.es6-Bwu1Cn-t.js';
|
|
6
|
-
import 'react';
|
|
7
|
-
import 'lodash/camelCase';
|
|
8
|
-
import 'lodash/castArray';
|
|
9
|
-
import '../context/UIContext.js';
|
|
10
|
-
import '../hooks/useMediaQueries.js';
|
|
11
|
-
import 'react-responsive';
|
|
12
|
-
import '../utils/setViewportProperty.js';
|
|
13
|
-
import 'lodash/maxBy';
|
|
14
|
-
import 'lodash/upperFirst';
|
|
15
|
-
import '../hooks/styleAttributes.js';
|
|
16
|
-
|
|
17
|
-
function Wrapper(props) {
|
|
18
|
-
var id = props.id, children = props.children, after = props.after, before = props.before, _a = props.className, className = _a === void 0 ? 'wrapper' : _a, _b = props.tag, Tag = _b === void 0 ? 'div' : _b, type = props.type;
|
|
19
|
-
var classGenerator = useDeviceTargetClassGenerator(props);
|
|
20
|
-
var alignClass = classGenerator.alignClass, alignDirectionClass = classGenerator.alignDirectionClass, fillClass = classGenerator.fillClass, horizontalResizingClass = classGenerator.horizontalResizingClass, positionClass = classGenerator.positionClass, verticalResizingClass = classGenerator.verticalResizingClass, wrapperPositionClass = classGenerator.wrapperPositionClass;
|
|
21
|
-
// @ts-expect-error
|
|
22
|
-
var _c = useStyles(props), innerStyles = _c.inner, wrapperStyles = _c.styles;
|
|
23
|
-
return (jsx(Tag, { className: clsx(className, type && "".concat(className, "_type_").concat(type), fillClass && "fill_".concat(fillClass), horizontalResizingClass && "wrapper_resize-horizontal_".concat(horizontalResizingClass), verticalResizingClass && "wrapper_resize-vertical_".concat(verticalResizingClass), positionClass && "position_".concat(positionClass)), id: id, style: wrapperStyles, children: jsxs("div", { className: clsx("".concat(className, "__inner"), alignDirectionClass && "align_".concat(alignDirectionClass), alignClass && "align_".concat(alignClass), wrapperPositionClass && "position_".concat(wrapperPositionClass)), style: innerStyles, children: [before, children, after] }) }));
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export { Wrapper };
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
.caption {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-flow: column nowrap;
|
|
4
|
-
}
|
|
5
|
-
.caption {
|
|
6
|
-
&_position {
|
|
7
|
-
&_on-image {
|
|
8
|
-
&-top {
|
|
9
|
-
width: 100%;
|
|
10
|
-
position: absolute;
|
|
11
|
-
left: 0;
|
|
12
|
-
top: 0;
|
|
13
|
-
}
|
|
14
|
-
&-bottom {
|
|
15
|
-
width: 100%;
|
|
16
|
-
position: absolute;
|
|
17
|
-
left: 0;
|
|
18
|
-
bottom: 0;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
.site-menu {
|
|
2
|
-
width: 100%;
|
|
3
|
-
height: 100%;
|
|
4
|
-
min-width: 100%;
|
|
5
|
-
min-height: 100%;
|
|
6
|
-
position: fixed;
|
|
7
|
-
display: flex;
|
|
8
|
-
left: 0;
|
|
9
|
-
top: 0;
|
|
10
|
-
z-index: 100;
|
|
11
|
-
transition: all 300ms cubic-bezier(0.165, 0.84, 0.44, 1);
|
|
12
|
-
&__wrapper {
|
|
13
|
-
min-width: 100%;
|
|
14
|
-
z-index: 10;
|
|
15
|
-
position: relative;
|
|
16
|
-
display: flex;
|
|
17
|
-
flex-flow: row wrap;
|
|
18
|
-
align-content: center;
|
|
19
|
-
^&__close {
|
|
20
|
-
position: absolute;
|
|
21
|
-
top: 24px;
|
|
22
|
-
right: 24px;
|
|
23
|
-
}
|
|
24
|
-
^&__items {
|
|
25
|
-
padding: 0 24px 48px 24px;
|
|
26
|
-
width: 100%;
|
|
27
|
-
height: 100%;
|
|
28
|
-
overflow: scroll;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
&&_state_visible {
|
|
32
|
-
transform: translate(0%, 0);
|
|
33
|
-
}
|
|
34
|
-
&&_state_hidden {
|
|
35
|
-
transform: translate(100%, 0);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
.wrapper {
|
|
2
|
-
width: 100%;
|
|
3
|
-
&__inner {
|
|
4
|
-
width: 100%;
|
|
5
|
-
max-width: var(--max);
|
|
6
|
-
margin: 0 auto;
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
.wrapper {
|
|
10
|
-
&_resize-horizontal {
|
|
11
|
-
&_hug {
|
|
12
|
-
display: inline-flex;
|
|
13
|
-
}
|
|
14
|
-
&_fill {
|
|
15
|
-
min-height: 100%;
|
|
16
|
-
flex: 1;
|
|
17
|
-
}
|
|
18
|
-
&__inner {
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
.wrapper {
|
|
24
|
-
&_resize-vertical {
|
|
25
|
-
&_hug {
|
|
26
|
-
display: inline-flex;
|
|
27
|
-
}
|
|
28
|
-
&_fill {
|
|
29
|
-
flex: 1;
|
|
30
|
-
display: flex;
|
|
31
|
-
^^&__inner {
|
|
32
|
-
flex: 1;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { tCaptionPositionProps, tFillGradientProps, tFillProps } from 'types';
|
|
3
|
-
import { iStyleAttributes } from '../../hooks/styleAttributes.interface';
|
|
4
|
-
export interface iCaptionThemeColor {
|
|
5
|
-
fill: tFillProps;
|
|
6
|
-
fillDesktop: tFillProps;
|
|
7
|
-
fillGradient: tFillGradientProps;
|
|
8
|
-
fillGradientDesktop: tFillGradientProps;
|
|
9
|
-
fillGradientMobile: tFillGradientProps;
|
|
10
|
-
fillGradientTablet: tFillGradientProps;
|
|
11
|
-
fillMobile: tFillProps;
|
|
12
|
-
fillTablet: tFillProps;
|
|
13
|
-
position: tCaptionPositionProps;
|
|
14
|
-
positionDesktop: tCaptionPositionProps;
|
|
15
|
-
positionMobile: tCaptionPositionProps;
|
|
16
|
-
positionTablet: tCaptionPositionProps;
|
|
17
|
-
}
|
|
18
|
-
export interface iCaptionProps extends iCaptionThemeColor, Omit<iStyleAttributes, 'position'> {
|
|
19
|
-
[key: number | string | symbol]: any;
|
|
20
|
-
children?: ReactNode;
|
|
21
|
-
className?: string;
|
|
22
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Caption } from './Caption';
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { tFillProps, tIconSizeProps, tTextColorHoverProps, tTextColorProps, tTextSizeProps } from 'types';
|
|
3
|
-
import { tAppearanceKeysDefault } from 'types/componentProps/appearanceKeys';
|
|
4
|
-
import { iStyleAttributes } from '../../hooks/styleAttributes.interface';
|
|
5
|
-
export interface iSiteMenuThemeColor {
|
|
6
|
-
[key: number | string | symbol]: any;
|
|
7
|
-
closeTextColor?: tTextColorProps;
|
|
8
|
-
closeTextColorHover?: tTextColorHoverProps;
|
|
9
|
-
closeTextSize?: tTextSizeProps;
|
|
10
|
-
fill?: tFillProps;
|
|
11
|
-
iconClose?: ReactNode;
|
|
12
|
-
iconCloseBgFill?: tFillProps;
|
|
13
|
-
iconCloseFill?: tFillProps;
|
|
14
|
-
iconCloseSize?: tIconSizeProps;
|
|
15
|
-
}
|
|
16
|
-
type tAppearanceKeys = tAppearanceKeysDefault & {};
|
|
17
|
-
export type siteMenuAppearanceType = {
|
|
18
|
-
[key in tAppearanceKeys]?: iSiteMenuThemeColor;
|
|
19
|
-
};
|
|
20
|
-
export interface iSiteMenuConfig {
|
|
21
|
-
[key: number | string | symbol]: any;
|
|
22
|
-
appearance: siteMenuAppearanceType | undefined;
|
|
23
|
-
setAppearance: (newComponent: siteMenuAppearanceType) => void;
|
|
24
|
-
}
|
|
25
|
-
export interface iSiteMenuProps extends iSiteMenuThemeColor, iStyleAttributes {
|
|
26
|
-
[key: number | string | symbol]: any;
|
|
27
|
-
appearance?: tAppearanceKeys;
|
|
28
|
-
children?: ReactNode;
|
|
29
|
-
className?: string;
|
|
30
|
-
closeText?: string;
|
|
31
|
-
onClose?: () => void;
|
|
32
|
-
}
|
|
33
|
-
export interface iSiteMenuButtonProps extends iStyleAttributes {
|
|
34
|
-
children?: ReactNode;
|
|
35
|
-
className?: string;
|
|
36
|
-
text?: string;
|
|
37
|
-
onClick?: () => void;
|
|
38
|
-
}
|
|
39
|
-
export {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { CSSProperties, ElementType, ReactNode } from 'react';
|
|
2
|
-
import { tAlignDirectionProps, tAlignProps, tFillProps, tHorizontalResizeModeProps, tPositionProps, tVerticalResizeModeProps } from 'types';
|
|
3
|
-
import { iStyleAttributes } from '../../hooks/styleAttributes.interface';
|
|
4
|
-
export interface iWrapperProps extends iStyleAttributes {
|
|
5
|
-
id?: string;
|
|
6
|
-
[key: number | string | symbol]: any;
|
|
7
|
-
after?: ReactNode;
|
|
8
|
-
align?: tAlignProps;
|
|
9
|
-
alignDirection?: tAlignDirectionProps;
|
|
10
|
-
before?: ReactNode;
|
|
11
|
-
children?: ReactNode;
|
|
12
|
-
className?: string;
|
|
13
|
-
fill?: tFillProps;
|
|
14
|
-
horizontalResizing?: tHorizontalResizeModeProps;
|
|
15
|
-
position?: tPositionProps;
|
|
16
|
-
style?: CSSProperties;
|
|
17
|
-
tag?: ElementType;
|
|
18
|
-
type?: string;
|
|
19
|
-
verticalResizing?: tVerticalResizeModeProps;
|
|
20
|
-
wrapperPosition?: tPositionProps;
|
|
21
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Wrapper } from './Wrapper';
|