@itcase/ui 1.3.9 → 1.3.11
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/cjs/components/Choice.js +10 -0
- package/dist/cjs/components/Drawer.js +1 -1
- package/dist/cjs/components/Tab.js +2 -2
- package/dist/components/Choice.js +10 -0
- package/dist/components/Drawer.js +1 -1
- package/dist/components/Tab.js +2 -2
- package/dist/css/components/DatePicker/DatePicker.css +1 -1
- package/dist/css/components/Dot/Dot.css +11 -9
- package/dist/css/components/Tab/Tab.css +0 -6
- package/dist/css/styles/text-color/text-color.css +1 -1
- package/dist/types/components/Link/Link.d.ts +1 -1
- package/dist/types/types/componentProps/textColor.d.ts +1 -1
- package/package.json +17 -17
- package/dist/stories/appearance.mdx +0 -62
|
@@ -23,6 +23,16 @@ require('../../Tooltip-CNua1g76.js');
|
|
|
23
23
|
require('../../Title-DBaHcpvB.js');
|
|
24
24
|
|
|
25
25
|
var choiceAppearance = {
|
|
26
|
+
accent: {
|
|
27
|
+
borderColor: 'surfaceBorderSecondary',
|
|
28
|
+
fill: 'surfacePrimary',
|
|
29
|
+
fillActive: 'accentPrimary',
|
|
30
|
+
labelTextActiveColor: 'accentTextPrimary',
|
|
31
|
+
labelTextColor: 'surfaceTextPrimary',
|
|
32
|
+
labelTextSize: 's',
|
|
33
|
+
shape: 'rounded',
|
|
34
|
+
size: 'normal',
|
|
35
|
+
},
|
|
26
36
|
dev: {
|
|
27
37
|
borderColor: 'surfaceBorderTertiary',
|
|
28
38
|
fill: 'surfacePrimary',
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
4
|
var clsx = require('clsx');
|
|
5
|
-
var useDeviceTargetClassGenerator = require('../hooks/useDeviceTargetClassGenerator.js');
|
|
6
5
|
var ReactDrawer = require('react-modern-drawer');
|
|
6
|
+
var useDeviceTargetClassGenerator = require('../hooks/useDeviceTargetClassGenerator.js');
|
|
7
7
|
require('../../tslib.es6-CCZ3TN_7.js');
|
|
8
8
|
require('react');
|
|
9
9
|
require('lodash/camelCase');
|
|
@@ -125,7 +125,7 @@ var tabConfig = {
|
|
|
125
125
|
},
|
|
126
126
|
};
|
|
127
127
|
function Tab(props) {
|
|
128
|
-
var children = props.children, _a = props.isActive, isActive = _a === void 0 ? false : _a, _b = props.isDisabled, isDisabled = _b === void 0 ? false : _b, _c = props.isHover, isHover = _c === void 0 ? false : _c, after = props.after, appearance = props.appearance, badgeAppearance = props.badgeAppearance, badgeSize = props.badgeSize, badgeTextColor = props.badgeTextColor, badgeTextSize = props.badgeTextSize, badgeValue = props.badgeValue, before = props.before, className = props.className, dataTour = props.dataTour, _d = props.dividerDirection, dividerDirection = _d === void 0 ? 'horizontal' : _d, dividerFill = props.dividerFill, dividerFillActive = props.dividerFillActive, dividerFillActiveHover = props.dividerFillActiveHover, dividerFillDisabled = props.dividerFillDisabled, dividerFillHover = props.dividerFillHover, dividerSize = props.dividerSize, href = props.href, label = props.label, labelColor = props.labelColor, labelColorActive = props.labelColorActive, labelColorDisabled = props.labelColorDisabled, labelTextAlign = props.labelTextAlign, labelTextColorHover = props.labelTextColorHover, labelTextGradient = props.labelTextGradient, labelTextSize = props.labelTextSize, labelTextStyle = props.labelTextStyle, labelTextWeight = props.labelTextWeight, labelTextWrap = props.labelTextWrap, link = props.link, linkFill = props.linkFill, rel = props.rel, reset = props.reset, set = props.set, target = props.target, onClick = props.onClick, onMouseEnter = props.onMouseEnter;
|
|
128
|
+
var children = props.children, _a = props.isActive, isActive = _a === void 0 ? false : _a, _b = props.isDisabled, isDisabled = _b === void 0 ? false : _b, _c = props.isHover, isHover = _c === void 0 ? false : _c, after = props.after, appearance = props.appearance, badgeAppearance = props.badgeAppearance, badgeShape = props.badgeShape, badgeSize = props.badgeSize, badgeTextColor = props.badgeTextColor, badgeTextSize = props.badgeTextSize, badgeValue = props.badgeValue, before = props.before, className = props.className, dataTour = props.dataTour, _d = props.dividerDirection, dividerDirection = _d === void 0 ? 'horizontal' : _d, dividerFill = props.dividerFill, dividerFillActive = props.dividerFillActive, dividerFillActiveHover = props.dividerFillActiveHover, dividerFillDisabled = props.dividerFillDisabled, dividerFillHover = props.dividerFillHover, dividerSize = props.dividerSize, href = props.href, label = props.label, labelColor = props.labelColor, labelColorActive = props.labelColorActive, labelColorDisabled = props.labelColorDisabled, labelTextAlign = props.labelTextAlign, labelTextColorHover = props.labelTextColorHover, labelTextGradient = props.labelTextGradient, labelTextSize = props.labelTextSize, labelTextStyle = props.labelTextStyle, labelTextWeight = props.labelTextWeight, labelTextWrap = props.labelTextWrap, link = props.link, linkFill = props.linkFill, rel = props.rel, reset = props.reset, set = props.set, target = props.target, onClick = props.onClick, onMouseEnter = props.onMouseEnter;
|
|
129
129
|
// @ts-expect-error
|
|
130
130
|
var appearanceConfig = tabConfig.appearance && tabConfig.appearance[appearance];
|
|
131
131
|
var classGenerator = useDeviceTargetClassGenerator.useDeviceTargetClassGenerator(props, appearanceConfig);
|
|
@@ -136,7 +136,7 @@ function Tab(props) {
|
|
|
136
136
|
? fillClass && "fill_".concat(fillClass)
|
|
137
137
|
: fillDisabledClass && "fill_disabled_".concat(fillDisabledClass), !isDisabled ? fillHoverClass && "fill_hover_".concat(fillHoverClass) : null, className, sizeClass && "tab_size_".concat(sizeClass), fillActiveClass && "fill_active_".concat(fillActiveClass), fillActiveHoverClass && "fill_active_hover_".concat(fillActiveHoverClass), shapeClass && "tab_shape_".concat(shapeClass), typeClass && "tab_type_".concat(typeClass), widthClass && "width_".concat(widthClass), reset && 'tab-reset', set && "tab_set_".concat(set), justifyContentClass && "tab_justify-content_".concat(justifyContentClass), onClick && 'cursor_type_pointer'), "data-tour": dataTour, style: tab, onClick: onClick, onMouseEnter: onMouseEnter, children: jsxRuntime.jsx(Link.Link, { className: clsx('tab__link', alignDirectionClass && "align_".concat(alignDirectionClass), alignClass && "align_".concat(alignClass)), fill: linkFill, href: link || href, rel: rel, target: target, children: jsxRuntime.jsxs(React.Fragment, { children: [before, children || (jsxRuntime.jsxs(React.Fragment, { children: [jsxRuntime.jsxs("div", { className: "tab__wrapper", children: [(label || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.label)) && (jsxRuntime.jsx(Text.Text, { className: "tab__label", size: labelTextSize || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.labelTextSize), textAlign: labelTextAlign, textColorGradient: labelTextGradient, textColorHover: labelTextColorHover, textStyle: labelTextStyle, textWeight: labelTextWeight, textWrap: labelTextWrap, textColor: isDisabled
|
|
138
138
|
? labelColorDisabled || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.labelColorDisabled)
|
|
139
|
-
: labelColor || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.labelColor), textColorActive: isActive && (labelColorActive || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.labelColorActive)), children: label || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.label) })), (badgeValue || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.badgeValue)) && (jsxRuntime.jsx(Badge.Badge, { appearance: badgeAppearance || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.badgeAppearance), size: badgeSize || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.badgeSize), textColor: badgeTextColor || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.badgeTextColor), textSize: badgeTextSize || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.badgeTextSize), value: badgeValue || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.badgeValue) }))] }), jsxRuntime.jsx(Divider.Divider, { width: "fill", fill: isDisabled
|
|
139
|
+
: labelColor || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.labelColor), textColorActive: isActive && (labelColorActive || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.labelColorActive)), children: label || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.label) })), (badgeValue || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.badgeValue)) && (jsxRuntime.jsx(Badge.Badge, { appearance: badgeAppearance || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.badgeAppearance), shape: badgeShape, size: badgeSize || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.badgeSize), textColor: badgeTextColor || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.badgeTextColor), textSize: badgeTextSize || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.badgeTextSize), value: badgeValue || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.badgeValue) }))] }), jsxRuntime.jsx(Divider.Divider, { width: "fill", fill: isDisabled
|
|
140
140
|
? dividerFillDisabled || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.dividerFillDisabled)
|
|
141
141
|
: dividerFill || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.dividerFill), fillHover: isHover && (dividerFillHover || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.dividerFillHover)), direction: dividerDirection, fillActive: isActive && (dividerFillActive || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.dividerFillActive)), fillActiveHover: dividerFillActiveHover, size: dividerSize })] })), after] }) }) }));
|
|
142
142
|
}
|
|
@@ -21,6 +21,16 @@ import '../Tooltip-1Jbub0K6.js';
|
|
|
21
21
|
import '../Title-CHgrIarR.js';
|
|
22
22
|
|
|
23
23
|
var choiceAppearance = {
|
|
24
|
+
accent: {
|
|
25
|
+
borderColor: 'surfaceBorderSecondary',
|
|
26
|
+
fill: 'surfacePrimary',
|
|
27
|
+
fillActive: 'accentPrimary',
|
|
28
|
+
labelTextActiveColor: 'accentTextPrimary',
|
|
29
|
+
labelTextColor: 'surfaceTextPrimary',
|
|
30
|
+
labelTextSize: 's',
|
|
31
|
+
shape: 'rounded',
|
|
32
|
+
size: 'normal',
|
|
33
|
+
},
|
|
24
34
|
dev: {
|
|
25
35
|
borderColor: 'surfaceBorderTertiary',
|
|
26
36
|
fill: 'surfacePrimary',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
|
-
import { useDeviceTargetClassGenerator } from '../hooks/useDeviceTargetClassGenerator.js';
|
|
4
3
|
import ReactDrawer from 'react-modern-drawer';
|
|
4
|
+
import { useDeviceTargetClassGenerator } from '../hooks/useDeviceTargetClassGenerator.js';
|
|
5
5
|
import '../tslib.es6-5FtW-kfi.js';
|
|
6
6
|
import 'react';
|
|
7
7
|
import 'lodash/camelCase';
|
package/dist/components/Tab.js
CHANGED
|
@@ -123,7 +123,7 @@ var tabConfig = {
|
|
|
123
123
|
},
|
|
124
124
|
};
|
|
125
125
|
function Tab(props) {
|
|
126
|
-
var children = props.children, _a = props.isActive, isActive = _a === void 0 ? false : _a, _b = props.isDisabled, isDisabled = _b === void 0 ? false : _b, _c = props.isHover, isHover = _c === void 0 ? false : _c, after = props.after, appearance = props.appearance, badgeAppearance = props.badgeAppearance, badgeSize = props.badgeSize, badgeTextColor = props.badgeTextColor, badgeTextSize = props.badgeTextSize, badgeValue = props.badgeValue, before = props.before, className = props.className, dataTour = props.dataTour, _d = props.dividerDirection, dividerDirection = _d === void 0 ? 'horizontal' : _d, dividerFill = props.dividerFill, dividerFillActive = props.dividerFillActive, dividerFillActiveHover = props.dividerFillActiveHover, dividerFillDisabled = props.dividerFillDisabled, dividerFillHover = props.dividerFillHover, dividerSize = props.dividerSize, href = props.href, label = props.label, labelColor = props.labelColor, labelColorActive = props.labelColorActive, labelColorDisabled = props.labelColorDisabled, labelTextAlign = props.labelTextAlign, labelTextColorHover = props.labelTextColorHover, labelTextGradient = props.labelTextGradient, labelTextSize = props.labelTextSize, labelTextStyle = props.labelTextStyle, labelTextWeight = props.labelTextWeight, labelTextWrap = props.labelTextWrap, link = props.link, linkFill = props.linkFill, rel = props.rel, reset = props.reset, set = props.set, target = props.target, onClick = props.onClick, onMouseEnter = props.onMouseEnter;
|
|
126
|
+
var children = props.children, _a = props.isActive, isActive = _a === void 0 ? false : _a, _b = props.isDisabled, isDisabled = _b === void 0 ? false : _b, _c = props.isHover, isHover = _c === void 0 ? false : _c, after = props.after, appearance = props.appearance, badgeAppearance = props.badgeAppearance, badgeShape = props.badgeShape, badgeSize = props.badgeSize, badgeTextColor = props.badgeTextColor, badgeTextSize = props.badgeTextSize, badgeValue = props.badgeValue, before = props.before, className = props.className, dataTour = props.dataTour, _d = props.dividerDirection, dividerDirection = _d === void 0 ? 'horizontal' : _d, dividerFill = props.dividerFill, dividerFillActive = props.dividerFillActive, dividerFillActiveHover = props.dividerFillActiveHover, dividerFillDisabled = props.dividerFillDisabled, dividerFillHover = props.dividerFillHover, dividerSize = props.dividerSize, href = props.href, label = props.label, labelColor = props.labelColor, labelColorActive = props.labelColorActive, labelColorDisabled = props.labelColorDisabled, labelTextAlign = props.labelTextAlign, labelTextColorHover = props.labelTextColorHover, labelTextGradient = props.labelTextGradient, labelTextSize = props.labelTextSize, labelTextStyle = props.labelTextStyle, labelTextWeight = props.labelTextWeight, labelTextWrap = props.labelTextWrap, link = props.link, linkFill = props.linkFill, rel = props.rel, reset = props.reset, set = props.set, target = props.target, onClick = props.onClick, onMouseEnter = props.onMouseEnter;
|
|
127
127
|
// @ts-expect-error
|
|
128
128
|
var appearanceConfig = tabConfig.appearance && tabConfig.appearance[appearance];
|
|
129
129
|
var classGenerator = useDeviceTargetClassGenerator(props, appearanceConfig);
|
|
@@ -134,7 +134,7 @@ function Tab(props) {
|
|
|
134
134
|
? fillClass && "fill_".concat(fillClass)
|
|
135
135
|
: fillDisabledClass && "fill_disabled_".concat(fillDisabledClass), !isDisabled ? fillHoverClass && "fill_hover_".concat(fillHoverClass) : null, className, sizeClass && "tab_size_".concat(sizeClass), fillActiveClass && "fill_active_".concat(fillActiveClass), fillActiveHoverClass && "fill_active_hover_".concat(fillActiveHoverClass), shapeClass && "tab_shape_".concat(shapeClass), typeClass && "tab_type_".concat(typeClass), widthClass && "width_".concat(widthClass), reset && 'tab-reset', set && "tab_set_".concat(set), justifyContentClass && "tab_justify-content_".concat(justifyContentClass), onClick && 'cursor_type_pointer'), "data-tour": dataTour, style: tab, onClick: onClick, onMouseEnter: onMouseEnter, children: jsx(Link, { className: clsx('tab__link', alignDirectionClass && "align_".concat(alignDirectionClass), alignClass && "align_".concat(alignClass)), fill: linkFill, href: link || href, rel: rel, target: target, children: jsxs(React.Fragment, { children: [before, children || (jsxs(React.Fragment, { children: [jsxs("div", { className: "tab__wrapper", children: [(label || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.label)) && (jsx(Text, { className: "tab__label", size: labelTextSize || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.labelTextSize), textAlign: labelTextAlign, textColorGradient: labelTextGradient, textColorHover: labelTextColorHover, textStyle: labelTextStyle, textWeight: labelTextWeight, textWrap: labelTextWrap, textColor: isDisabled
|
|
136
136
|
? labelColorDisabled || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.labelColorDisabled)
|
|
137
|
-
: labelColor || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.labelColor), textColorActive: isActive && (labelColorActive || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.labelColorActive)), children: label || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.label) })), (badgeValue || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.badgeValue)) && (jsx(Badge, { appearance: badgeAppearance || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.badgeAppearance), size: badgeSize || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.badgeSize), textColor: badgeTextColor || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.badgeTextColor), textSize: badgeTextSize || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.badgeTextSize), value: badgeValue || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.badgeValue) }))] }), jsx(Divider, { width: "fill", fill: isDisabled
|
|
137
|
+
: labelColor || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.labelColor), textColorActive: isActive && (labelColorActive || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.labelColorActive)), children: label || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.label) })), (badgeValue || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.badgeValue)) && (jsx(Badge, { appearance: badgeAppearance || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.badgeAppearance), shape: badgeShape, size: badgeSize || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.badgeSize), textColor: badgeTextColor || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.badgeTextColor), textSize: badgeTextSize || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.badgeTextSize), value: badgeValue || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.badgeValue) }))] }), jsx(Divider, { width: "fill", fill: isDisabled
|
|
138
138
|
? dividerFillDisabled || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.dividerFillDisabled)
|
|
139
139
|
: dividerFill || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.dividerFill), fillHover: isHover && (dividerFillHover || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.dividerFillHover)), direction: dividerDirection, fillActive: isActive && (dividerFillActive || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.dividerFillActive)), fillActiveHover: dividerFillActiveHover, size: dividerSize })] })), after] }) }) }));
|
|
140
140
|
}
|
|
@@ -12,14 +12,16 @@
|
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
-
.
|
|
16
|
-
&
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
15
|
+
.dot {
|
|
16
|
+
&_shape {
|
|
17
|
+
&_rounded {
|
|
18
|
+
border-radius: var(--dot-shape-rounded, 12px);
|
|
19
|
+
}
|
|
20
|
+
&_circular {
|
|
21
|
+
border-radius: 50%;
|
|
22
|
+
}
|
|
23
|
+
&_geometric {
|
|
24
|
+
border-radius: 0;
|
|
25
|
+
}
|
|
24
26
|
}
|
|
25
27
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
.text {
|
|
2
2
|
&&-color {
|
|
3
3
|
@each $type in accent, primary, secondary, tertiary, quaternary, quinary, senary, surface,
|
|
4
|
-
success, error, info, warning {
|
|
4
|
+
success, error, info, warning, danger {
|
|
5
5
|
&_$(type) {
|
|
6
6
|
&-text {
|
|
7
7
|
@each $color in primary, secondary, tertiary, quaternary, quinary, senary, accent,
|
|
@@ -2,5 +2,5 @@ import React from 'react';
|
|
|
2
2
|
import type { iLinkConfig, iLinkProps, iLinkWrapperProps } from './Link.interface';
|
|
3
3
|
declare const linkConfig: iLinkConfig;
|
|
4
4
|
declare function Link(props: iLinkProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
declare function LinkWrapper(props: iLinkWrapperProps): import("react/jsx-runtime").JSX.Element | (string | number | React.ReactElement<
|
|
5
|
+
declare function LinkWrapper(props: iLinkWrapperProps): import("react/jsx-runtime").JSX.Element | (string | number | bigint | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | React.ReactElement<unknown, string | React.JSXElementConstructor<any>>)[];
|
|
6
6
|
export { Link, linkConfig, LinkWrapper };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type tTextColorProps = false | undefined | 'accentTextPrimary' | 'accentTextSecondary' | 'accentTextTertiary' | 'primaryTextPrimary' | 'primaryTextSecondary' | 'primaryTextTertiary' | 'secondaryTextPrimary' | 'secondaryTextSecondary' | 'secondaryTextTertiary' | 'tertiaryTextPrimary' | 'tertiaryTextSecondary' | 'surfaceTextPrimary' | 'surfaceTextAccent' | 'surfaceTextSecondary' | 'surfaceTextTertiary' | 'surfaceTextQuaternary' | 'surfaceTextAccent' | 'surfaceTextHover' | 'surfaceTextFocus' | 'surfaceTextActive' | 'surfaceTextDisabled' | 'errorTextPrimary' | 'errorTextSecondary' | 'successTextPrimary' | 'successTextSecondary' | 'surfaceTextInverse';
|
|
1
|
+
export type tTextColorProps = false | undefined | 'accentTextPrimary' | 'accentTextSecondary' | 'accentTextTertiary' | 'primaryTextPrimary' | 'primaryTextSecondary' | 'primaryTextTertiary' | 'secondaryTextPrimary' | 'secondaryTextSecondary' | 'secondaryTextTertiary' | 'tertiaryTextPrimary' | 'tertiaryTextSecondary' | 'surfaceTextPrimary' | 'surfaceTextAccent' | 'surfaceTextSecondary' | 'surfaceTextTertiary' | 'surfaceTextQuaternary' | 'surfaceTextAccent' | 'surfaceTextHover' | 'surfaceTextFocus' | 'surfaceTextActive' | 'surfaceTextDisabled' | 'errorTextPrimary' | 'errorTextSecondary' | 'successTextPrimary' | 'successTextSecondary' | 'surfaceTextInverse' | 'dangerTextPrimary' | 'dangerTextSecondary';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itcase/ui",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.11",
|
|
4
4
|
"description": "UI components (Modal, Loader, Popup, etc)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Modal",
|
|
@@ -96,11 +96,12 @@
|
|
|
96
96
|
"registry": "https://registry.npmjs.org/"
|
|
97
97
|
},
|
|
98
98
|
"dependencies": {
|
|
99
|
+
"@emotion/is-prop-valid": "^1.3.1",
|
|
99
100
|
"@itcase/common": "^1.2.17",
|
|
100
|
-
"@itcase/icons": "^1.0.
|
|
101
|
+
"@itcase/icons": "^1.0.14",
|
|
101
102
|
"clsx": "^2.1.1",
|
|
102
103
|
"date-fns": "^4.1.0",
|
|
103
|
-
"framer-motion": "^11.
|
|
104
|
+
"framer-motion": "^11.15.0",
|
|
104
105
|
"js-cookie": "^3.0.5",
|
|
105
106
|
"lodash": "^4.17.21",
|
|
106
107
|
"rc-slider": "^11.1.7",
|
|
@@ -118,7 +119,7 @@
|
|
|
118
119
|
"react-responsive": "^10.0.0",
|
|
119
120
|
"react-scroll": "^1.9.0",
|
|
120
121
|
"react-scrollbars-custom": "^4.1.1",
|
|
121
|
-
"react-select": "^5.
|
|
122
|
+
"react-select": "^5.9.0",
|
|
122
123
|
"swiper": "^11.1.15",
|
|
123
124
|
"uuid": "^11.0.3"
|
|
124
125
|
},
|
|
@@ -128,42 +129,41 @@
|
|
|
128
129
|
"@babel/eslint-plugin": "^7.25.9",
|
|
129
130
|
"@babel/preset-env": "^7.26.0",
|
|
130
131
|
"@babel/preset-react": "^7.26.3",
|
|
131
|
-
"@
|
|
132
|
-
"@commitlint/cli": "^19.6.0",
|
|
132
|
+
"@commitlint/cli": "^19.6.1",
|
|
133
133
|
"@commitlint/config-conventional": "^19.6.0",
|
|
134
|
-
"@itcase/
|
|
134
|
+
"@itcase/icons": "^1.0.11",
|
|
135
|
+
"@itcase/lint": "^1.0.34",
|
|
136
|
+
"@itcase/ui": "^1.3.9",
|
|
135
137
|
"@lehoczky/postcss-fluid": "^1.0.3",
|
|
136
138
|
"@rollup/plugin-babel": "^6.0.4",
|
|
137
|
-
"@rollup/plugin-commonjs": "^28.0.
|
|
139
|
+
"@rollup/plugin-commonjs": "^28.0.2",
|
|
138
140
|
"@rollup/plugin-image": "^3.0.3",
|
|
139
141
|
"@rollup/plugin-json": "^6.1.0",
|
|
140
|
-
"@rollup/plugin-node-resolve": "^
|
|
142
|
+
"@rollup/plugin-node-resolve": "^16.0.0",
|
|
141
143
|
"@rollup/plugin-terser": "^0.4.4",
|
|
142
|
-
"@rollup/plugin-typescript": "^12.1.
|
|
144
|
+
"@rollup/plugin-typescript": "^12.1.2",
|
|
143
145
|
"@semantic-release/changelog": "^6.0.3",
|
|
144
146
|
"@semantic-release/git": "^10.0.1",
|
|
145
147
|
"@semantic-release/release-notes-generator": "14.0.1",
|
|
146
148
|
"@storybook/addon-essentials": "^8.4.7",
|
|
147
149
|
"@storybook/addon-interactions": "^8.4.7",
|
|
148
|
-
"@storybook/addon-links": "^8.4.7",
|
|
149
|
-
"@storybook/addon-onboarding": "^8.4.7",
|
|
150
150
|
"@storybook/addon-styling-webpack": "^1.0.1",
|
|
151
151
|
"@storybook/addon-themes": "^8.4.7",
|
|
152
152
|
"@storybook/addon-webpack5-compiler-swc": "^1.0.5",
|
|
153
153
|
"@storybook/blocks": "^8.4.7",
|
|
154
154
|
"@storybook/react": "^8.4.7",
|
|
155
155
|
"@storybook/react-webpack5": "^8.4.7",
|
|
156
|
-
"@storybook/test": "^8.4.7",
|
|
157
156
|
"@types/js-cookie": "^3.0.6",
|
|
158
157
|
"@types/lodash": "^4.17.13",
|
|
159
|
-
"@types/react": "^
|
|
158
|
+
"@types/react": "^19",
|
|
160
159
|
"@types/react-datepicker": "^7.0.0",
|
|
161
|
-
"@types/react-dom": "^
|
|
160
|
+
"@types/react-dom": "^19.0.2",
|
|
162
161
|
"@types/react-scroll": "^1.8.10",
|
|
163
162
|
"@types/uuid": "^10.0.0",
|
|
164
163
|
"babel-loader": "^9.2.1",
|
|
165
164
|
"babel-plugin-inline-react-svg": "^2.0.2",
|
|
166
165
|
"babel-plugin-react-docgen": "^4.2.1",
|
|
166
|
+
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
|
|
167
167
|
"conventional-changelog-conventionalcommits": "^8.0.0",
|
|
168
168
|
"eslint": "9.16.0",
|
|
169
169
|
"husky": "^9.1.7",
|
|
@@ -187,7 +187,7 @@
|
|
|
187
187
|
"postcss-nested-ancestors": "^3.0.0",
|
|
188
188
|
"postcss-normalize": "^13.0.1",
|
|
189
189
|
"postcss-prepend-imports": "^1.0.1",
|
|
190
|
-
"postcss-preset-env": "^10.1.
|
|
190
|
+
"postcss-preset-env": "^10.1.2",
|
|
191
191
|
"postcss-pxtorem": "^6.1.0",
|
|
192
192
|
"postcss-sort-media-queries": "^5.2.0",
|
|
193
193
|
"prettier": "^3.4.2",
|
|
@@ -198,7 +198,7 @@
|
|
|
198
198
|
"rollup-preserve-directives": "^1.1.3",
|
|
199
199
|
"semantic-release": "^24.2.0",
|
|
200
200
|
"storybook": "^8.4.7",
|
|
201
|
-
"stylelint": "^16.
|
|
201
|
+
"stylelint": "^16.12.0",
|
|
202
202
|
"typescript": "^5.7.2"
|
|
203
203
|
}
|
|
204
204
|
}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { Meta } from '@storybook/blocks'
|
|
2
|
-
|
|
3
|
-
<Meta title="Appearance / Overview" />
|
|
4
|
-
|
|
5
|
-
# Appearance
|
|
6
|
-
|
|
7
|
-
`Appearance` - это заранее прописанные стили (по сути пропсы с указанными значениями) для более быстрого применения в коде.
|
|
8
|
-
|
|
9
|
-
Для того чтобы добавить возможность использовать `Appearance` для компонента необходимо:
|
|
10
|
-
|
|
11
|
-
- добавить `appearance` в пропсы компонента
|
|
12
|
-
`const { appearance, children, className, textColor, textSize, value } = props`
|
|
13
|
-
|
|
14
|
-
- а также конфиг:
|
|
15
|
-
|
|
16
|
-
```
|
|
17
|
-
const badgeConfig: iBadgeConfig = {
|
|
18
|
-
appearance: badgeAppearance,
|
|
19
|
-
setAppearance: (newComponent) => {
|
|
20
|
-
badgeConfig.appearance = newComponent
|
|
21
|
-
},
|
|
22
|
-
}
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
- записать в переменную сокращенное название для дальнейшего использования в коде компонента:
|
|
26
|
-
|
|
27
|
-
```
|
|
28
|
-
const appearanceConfig = badgeConfig.appearance && badgeConfig.appearance[appearance]
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
- использовать для пропсов:
|
|
32
|
-
|
|
33
|
-
```
|
|
34
|
-
fillClass && `fill_${fillClass}`,
|
|
35
|
-
|
|
36
|
-
fillHoverClass && `fill_hover_${fillHoverClass}`,
|
|
37
|
-
|
|
38
|
-
textColor={textColor || appearanceConfig?.textColor}
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
- описать варианты `Appearance` необходимо в `src/components/Badge/Badge.appearance.ts`
|
|
42
|
-
|
|
43
|
-
```
|
|
44
|
-
import { badgeAppearanceType } from './Badge.interface'
|
|
45
|
-
|
|
46
|
-
export const badgeAppearance: badgeAppearanceType = {
|
|
47
|
-
surfacePrimary: {
|
|
48
|
-
fill: 'surfacePrimary',
|
|
49
|
-
fillHover: 'surfacePrimaryHover',
|
|
50
|
-
textColor: 'surfaceTextPrimary',
|
|
51
|
-
},
|
|
52
|
-
surfaceSecondary: {
|
|
53
|
-
fill: 'surfaceSecondary',
|
|
54
|
-
fillHover: 'surfaceSecondaryHover',
|
|
55
|
-
textColor: 'surfaceTextPrimary',
|
|
56
|
-
}
|
|
57
|
-
...
|
|
58
|
-
}
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
- в коде на проекте использовать:
|
|
62
|
-
`<Badge appearance="surfacePrimary" ..../>`
|