@kaizen/components 1.68.10 → 1.68.12
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/Tag/Tag.cjs +2 -33
- package/dist/cjs/Tag/Tag.module.scss.cjs +1 -8
- package/dist/cjs/Tag/subcomponents/LiveIcon/LiveIcon.cjs +56 -0
- package/dist/cjs/Tag/subcomponents/LiveIcon/LiveIcon.module.css.cjs +12 -0
- package/dist/cjs/Tile/TileGrid/TileGrid.cjs +19 -2
- package/dist/cjs/__future__/Tabs/constants.cjs +4 -0
- package/dist/cjs/__future__/Tabs/subcomponents/Tab/Tab.cjs +3 -1
- package/dist/cjs/__future__/Tabs/subcomponents/TabList/TabList.cjs +117 -3
- package/dist/cjs/__future__/Tabs/subcomponents/TabList/TabList.module.css.cjs +4 -1
- package/dist/cjs/__utilities__/isRTL/isRTL.cjs +11 -0
- package/dist/esm/Tag/Tag.mjs +2 -33
- package/dist/esm/Tag/Tag.module.scss.mjs +1 -8
- package/dist/esm/Tag/subcomponents/LiveIcon/LiveIcon.mjs +54 -0
- package/dist/esm/Tag/subcomponents/LiveIcon/LiveIcon.module.css.mjs +10 -0
- package/dist/esm/Tile/TileGrid/TileGrid.mjs +19 -2
- package/dist/esm/__future__/Tabs/constants.mjs +2 -0
- package/dist/esm/__future__/Tabs/subcomponents/Tab/Tab.mjs +3 -1
- package/dist/esm/__future__/Tabs/subcomponents/TabList/TabList.mjs +121 -5
- package/dist/esm/__future__/Tabs/subcomponents/TabList/TabList.module.css.mjs +4 -1
- package/dist/esm/__utilities__/isRTL/isRTL.mjs +9 -0
- package/dist/styles.css +155 -87
- package/dist/types/Tag/subcomponents/LiveIcon/LiveIcon.d.ts +4 -0
- package/dist/types/Tag/subcomponents/LiveIcon/index.d.ts +1 -0
- package/dist/types/Tag/subcomponents/index.d.ts +1 -0
- package/dist/types/Tile/TileGrid/TileGrid.d.ts +1 -1
- package/dist/types/__future__/Tabs/constants.d.ts +1 -0
- package/dist/types/__future__/Tabs/subcomponents/TabList/TabList.d.ts +1 -0
- package/dist/types/__utilities__/isRTL/index.d.ts +1 -0
- package/dist/types/__utilities__/isRTL/isRTL.d.ts +5 -0
- package/package.json +3 -3
- package/src/Tag/Tag.module.scss +0 -92
- package/src/Tag/Tag.tsx +2 -37
- package/src/Tag/subcomponents/LiveIcon/LiveIcon.module.css +91 -0
- package/src/Tag/subcomponents/LiveIcon/LiveIcon.tsx +48 -0
- package/src/Tag/subcomponents/LiveIcon/index.ts +1 -0
- package/src/Tag/subcomponents/index.ts +1 -0
- package/src/Tile/TileGrid/TileGrid.module.scss +1 -0
- package/src/Tile/TileGrid/TileGrid.tsx +32 -7
- package/src/Tile/TileGrid/_docs/TileGrid.stickersheet.stories.tsx +40 -0
- package/src/Tile/TileGrid/_docs/TileGrid.stories.tsx +78 -1
- package/src/Workflow/_docs/ProgressStepper.stickersheet.stories.tsx +59 -0
- package/src/Workflow/subcomponents/Footer/components/ProgressStepper/ProgressStepper.module.css +6 -0
- package/src/__future__/Tabs/_docs/Tabs.spec.stories.tsx +118 -0
- package/src/__future__/Tabs/_docs/Tabs.stickersheet.stories.tsx +84 -0
- package/src/__future__/Tabs/_docs/Tabs.stories.tsx +12 -1
- package/src/__future__/Tabs/constants.ts +1 -0
- package/src/__future__/Tabs/subcomponents/Tab/Tab.tsx +1 -1
- package/src/__future__/Tabs/subcomponents/TabList/TabList.module.css +53 -1
- package/src/__future__/Tabs/subcomponents/TabList/TabList.tsx +138 -10
- package/src/__future__/Tag/Tag/_docs/Tag-migration-guide.stories.tsx +24 -64
- package/src/__utilities__/isRTL/index.ts +1 -0
- package/src/__utilities__/isRTL/isRTL.spec.tsx +38 -0
- package/src/__utilities__/isRTL/isRTL.ts +6 -0
package/dist/cjs/Tag/Tag.cjs
CHANGED
|
@@ -4,9 +4,8 @@ var tslib = require('tslib');
|
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var classnames = require('classnames');
|
|
6
6
|
var Avatar = require('../Avatar/Avatar.cjs');
|
|
7
|
-
require('../Icon/subcomponents/SVG/SVG.cjs');
|
|
8
|
-
var LiveIcon = require('../Icon/LiveIcon.cjs');
|
|
9
7
|
var Icon = require('../__future__/Icon/Icon.cjs');
|
|
8
|
+
var LiveIcon = require('./subcomponents/LiveIcon/LiveIcon.cjs');
|
|
10
9
|
var Tag_module = require('./Tag.module.scss.cjs');
|
|
11
10
|
function _interopDefault(e) {
|
|
12
11
|
return e && e.__esModule ? e : {
|
|
@@ -105,37 +104,7 @@ var Tag = function (props) {
|
|
|
105
104
|
name: "cancel",
|
|
106
105
|
alt: "Dismiss",
|
|
107
106
|
isFilled: true
|
|
108
|
-
})))), variant === 'statusLive' && React__default.default.createElement(
|
|
109
|
-
className: Tag_module.liveIcon
|
|
110
|
-
}, React__default.default.createElement(LiveIcon.LiveIcon, {
|
|
111
|
-
role: "presentation",
|
|
112
|
-
classNameOverride: Tag_module.liveIcon_base,
|
|
113
|
-
width: "16",
|
|
114
|
-
height: "16",
|
|
115
|
-
viewBox: "0 0 16 16",
|
|
116
|
-
fill: "none"
|
|
117
|
-
}), React__default.default.createElement(LiveIcon.LiveIcon, {
|
|
118
|
-
role: "presentation",
|
|
119
|
-
classNameOverride: Tag_module.liveIcon_1,
|
|
120
|
-
width: "16",
|
|
121
|
-
height: "16",
|
|
122
|
-
viewBox: "0 0 16 16",
|
|
123
|
-
fill: "none"
|
|
124
|
-
}), React__default.default.createElement(LiveIcon.LiveIcon, {
|
|
125
|
-
role: "presentation",
|
|
126
|
-
classNameOverride: Tag_module.liveIcon_2,
|
|
127
|
-
width: "16",
|
|
128
|
-
height: "16",
|
|
129
|
-
viewBox: "0 0 16 16",
|
|
130
|
-
fill: "none"
|
|
131
|
-
}), React__default.default.createElement(LiveIcon.LiveIcon, {
|
|
132
|
-
role: "presentation",
|
|
133
|
-
classNameOverride: Tag_module.liveIcon_3,
|
|
134
|
-
width: "16",
|
|
135
|
-
height: "16",
|
|
136
|
-
viewBox: "0 0 16 16",
|
|
137
|
-
fill: "none"
|
|
138
|
-
})))));
|
|
107
|
+
})))), variant === 'statusLive' && React__default.default.createElement(LiveIcon.LiveIcon, null))));
|
|
139
108
|
};
|
|
140
109
|
Tag.displayName = 'Tag';
|
|
141
110
|
exports.Tag = Tag;
|
|
@@ -25,13 +25,6 @@ var styles = {
|
|
|
25
25
|
"statusLive": "Tag-module_statusLive__xG48w",
|
|
26
26
|
"statusAction": "Tag-module_statusAction__woL-O",
|
|
27
27
|
"statusClosed": "Tag-module_statusClosed__VhZP-",
|
|
28
|
-
"statusDraft": "Tag-module_statusDraft__9QZDv"
|
|
29
|
-
"liveIcon": "Tag-module_liveIcon__URtak",
|
|
30
|
-
"liveIcon_base": "Tag-module_liveIcon_base__Nk5um",
|
|
31
|
-
"liveIcon_1": "Tag-module_liveIcon_1__STFJY",
|
|
32
|
-
"liveIcon_2": "Tag-module_liveIcon_2__rko-D",
|
|
33
|
-
"liveIcon_3": "Tag-module_liveIcon_3__fL71y",
|
|
34
|
-
"pulse-inner": "Tag-module_pulse-inner__0-JFL",
|
|
35
|
-
"pulse-outer": "Tag-module_pulse-outer__f9Oox"
|
|
28
|
+
"statusDraft": "Tag-module_statusDraft__9QZDv"
|
|
36
29
|
};
|
|
37
30
|
module.exports = styles;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var SVG = require('../../../Icon/subcomponents/SVG/SVG.cjs');
|
|
5
|
+
var LiveIcon_module = require('./LiveIcon.module.css.cjs');
|
|
6
|
+
function _interopDefault(e) {
|
|
7
|
+
return e && e.__esModule ? e : {
|
|
8
|
+
default: e
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
12
|
+
|
|
13
|
+
// This file is autogenerated by wrapSVGs.ts
|
|
14
|
+
// Changes to this file will be overwritten
|
|
15
|
+
var LiveIconSvg = function (_a) {
|
|
16
|
+
var classNameOverride = _a.classNameOverride;
|
|
17
|
+
return React__default.default.createElement(SVG.SVG, {
|
|
18
|
+
role: "presentation",
|
|
19
|
+
width: "16",
|
|
20
|
+
height: "16",
|
|
21
|
+
viewBox: "0 0 16 16",
|
|
22
|
+
fill: "none",
|
|
23
|
+
classNameOverride: classNameOverride
|
|
24
|
+
}, React__default.default.createElement("path", {
|
|
25
|
+
stroke: "currentColor",
|
|
26
|
+
d: "M3.266 12.733c-2.6-2.6-2.6-6.866 0-9.466M5.2 10.8c-1.534-1.533-1.534-4.067 0-5.667",
|
|
27
|
+
strokeWidth: "1.5",
|
|
28
|
+
strokeLinejoin: "round",
|
|
29
|
+
strokeLinecap: "round"
|
|
30
|
+
}), React__default.default.createElement("path", {
|
|
31
|
+
fill: "currentColor",
|
|
32
|
+
d: "M8 10a2 2 0 1 0 0-4 2 2 0 0 0 0 4"
|
|
33
|
+
}), React__default.default.createElement("path", {
|
|
34
|
+
stroke: "currentColor",
|
|
35
|
+
d: "M10.8 5.2c1.533 1.533 1.533 4.067 0 5.667M12.733 3.267c2.6 2.6 2.6 6.8 0 9.4",
|
|
36
|
+
strokeWidth: "1.5",
|
|
37
|
+
strokeLinejoin: "round",
|
|
38
|
+
strokeLinecap: "round"
|
|
39
|
+
}));
|
|
40
|
+
};
|
|
41
|
+
LiveIconSvg.displayName = 'LiveIconSvg';
|
|
42
|
+
var LiveIcon = function () {
|
|
43
|
+
return React__default.default.createElement("span", {
|
|
44
|
+
className: LiveIcon_module.liveIcon
|
|
45
|
+
}, React__default.default.createElement(LiveIconSvg, {
|
|
46
|
+
classNameOverride: LiveIcon_module.liveIcon_base
|
|
47
|
+
}), React__default.default.createElement(LiveIconSvg, {
|
|
48
|
+
classNameOverride: LiveIcon_module.liveIcon_1
|
|
49
|
+
}), React__default.default.createElement(LiveIconSvg, {
|
|
50
|
+
classNameOverride: LiveIcon_module.liveIcon_2
|
|
51
|
+
}), React__default.default.createElement(LiveIconSvg, {
|
|
52
|
+
classNameOverride: LiveIcon_module.liveIcon_3
|
|
53
|
+
}));
|
|
54
|
+
};
|
|
55
|
+
LiveIcon.displayName = 'LiveIcon';
|
|
56
|
+
exports.LiveIcon = LiveIcon;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var styles = {
|
|
4
|
+
"liveIcon": "LiveIcon-module_liveIcon__v6FG-",
|
|
5
|
+
"liveIcon_base": "LiveIcon-module_liveIcon_base__Kagqm",
|
|
6
|
+
"liveIcon_1": "LiveIcon-module_liveIcon_1__ye1Qk",
|
|
7
|
+
"liveIcon_2": "LiveIcon-module_liveIcon_2__p6f55",
|
|
8
|
+
"liveIcon_3": "LiveIcon-module_liveIcon_3__JmRFR",
|
|
9
|
+
"pulse-inner": "LiveIcon-module_pulse-inner__EGliV",
|
|
10
|
+
"pulse-outer": "LiveIcon-module_pulse-outer__bxHMh"
|
|
11
|
+
};
|
|
12
|
+
module.exports = styles;
|
|
@@ -17,13 +17,30 @@ var classnames__default = /*#__PURE__*/_interopDefault(classnames);
|
|
|
17
17
|
* {@link https://cultureamp.design/storybook/?path=/docs/components-tiles-tilegrid--docs Storybook}
|
|
18
18
|
*/
|
|
19
19
|
var TileGrid = function (_a) {
|
|
20
|
+
var _b;
|
|
20
21
|
var children = _a.children,
|
|
21
22
|
classNameOverride = _a.classNameOverride,
|
|
22
23
|
restProps = tslib.__rest(_a, ["children", "classNameOverride"]);
|
|
23
|
-
|
|
24
|
+
var isFragment = !Array.isArray(children) && children.type === React__default.default.Fragment;
|
|
25
|
+
return React__default.default.createElement("ul", tslib.__assign({
|
|
24
26
|
className: classnames__default.default(TileGrid_module.grid, classNameOverride),
|
|
25
27
|
"data-tile-grid": true
|
|
26
|
-
}, restProps), children)
|
|
28
|
+
}, restProps), isFragment ? ((_b = children === null || children === void 0 ? void 0 : children.props) === null || _b === void 0 ? void 0 : _b.children) ? React__default.default.createElement(TileListItem, {
|
|
29
|
+
tiles: children.props.children
|
|
30
|
+
}) : null : React__default.default.createElement(TileListItem, {
|
|
31
|
+
tiles: children
|
|
32
|
+
}));
|
|
27
33
|
};
|
|
28
34
|
TileGrid.displayName = 'TileGrid';
|
|
35
|
+
var TileListItem = function (_a) {
|
|
36
|
+
var tiles = _a.tiles;
|
|
37
|
+
if (Array.isArray(tiles)) {
|
|
38
|
+
return React__default.default.createElement(React__default.default.Fragment, null, tiles.map(function (tile, index) {
|
|
39
|
+
return React__default.default.createElement("li", {
|
|
40
|
+
key: "".concat(tile.props.title, "-").concat(index)
|
|
41
|
+
}, tile);
|
|
42
|
+
}));
|
|
43
|
+
}
|
|
44
|
+
return React__default.default.createElement("li", null, tiles);
|
|
45
|
+
};
|
|
29
46
|
exports.TileGrid = TileGrid;
|
|
@@ -25,7 +25,9 @@ var Tab = function (props) {
|
|
|
25
25
|
var tabProps = tslib.__assign({
|
|
26
26
|
className: classnames__default.default(Tab_module.tab, className)
|
|
27
27
|
}, restProps);
|
|
28
|
-
return React__default.default.createElement(reactAriaComponents.Tab, tslib.__assign({
|
|
28
|
+
return React__default.default.createElement(reactAriaComponents.Tab, tslib.__assign({
|
|
29
|
+
"data-kz-tab": true
|
|
30
|
+
}, tabProps), function (_a) {
|
|
29
31
|
var isSelected = _a.isSelected,
|
|
30
32
|
isFocusVisible = _a.isFocusVisible,
|
|
31
33
|
isHovered = _a.isHovered;
|
|
@@ -4,6 +4,9 @@ var tslib = require('tslib');
|
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var classnames = require('classnames');
|
|
6
6
|
var reactAriaComponents = require('react-aria-components');
|
|
7
|
+
var Icon = require('../../../Icon/Icon.cjs');
|
|
8
|
+
var isRTL = require('../../../../__utilities__/isRTL/isRTL.cjs');
|
|
9
|
+
var constants = require('../../constants.cjs');
|
|
7
10
|
var TabList_module = require('./TabList.module.css.cjs');
|
|
8
11
|
function _interopDefault(e) {
|
|
9
12
|
return e && e.__esModule ? e : {
|
|
@@ -22,10 +25,121 @@ var TabList = function (props) {
|
|
|
22
25
|
noPadding = _a === void 0 ? false : _a,
|
|
23
26
|
children = props.children,
|
|
24
27
|
className = props.className,
|
|
25
|
-
|
|
26
|
-
|
|
28
|
+
testId = props["data-testid"],
|
|
29
|
+
restProps = tslib.__rest(props, ['aria-label', "noPadding", "children", "className", 'data-testid']);
|
|
30
|
+
var _b = React.useState(false),
|
|
31
|
+
isDocumentReady = _b[0],
|
|
32
|
+
setIsDocumentReady = _b[1];
|
|
33
|
+
var _c = React.useState(false),
|
|
34
|
+
leftArrowEnabled = _c[0],
|
|
35
|
+
setLeftArrowEnabled = _c[1];
|
|
36
|
+
var _d = React.useState(false),
|
|
37
|
+
rightArrowEnabled = _d[0],
|
|
38
|
+
setRightArrowEnabled = _d[1];
|
|
39
|
+
var tabListRef = React.useRef(null);
|
|
40
|
+
var tabListId = React.useId();
|
|
41
|
+
var _e = React.useState(false),
|
|
42
|
+
isRTL$1 = _e[0],
|
|
43
|
+
setIsRTL = _e[1];
|
|
44
|
+
var _f = React.useState(),
|
|
45
|
+
containerElement = _f[0],
|
|
46
|
+
setContainerElement = _f[1];
|
|
47
|
+
var tabListContext = React.useContext(reactAriaComponents.TabListStateContext);
|
|
48
|
+
var selectedKey = tabListContext === null || tabListContext === void 0 ? void 0 : tabListContext.selectedKey;
|
|
49
|
+
React.useEffect(function () {
|
|
50
|
+
if (!isDocumentReady) {
|
|
51
|
+
setIsDocumentReady(true);
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
var container = document.getElementById(tabListId);
|
|
55
|
+
setContainerElement(container);
|
|
56
|
+
setIsRTL(container ? isRTL.isRTL(container) : false);
|
|
57
|
+
}, [isDocumentReady, tabListId]);
|
|
58
|
+
React.useEffect(function () {
|
|
59
|
+
if (!isDocumentReady) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
var tabs = containerElement === null || containerElement === void 0 ? void 0 : containerElement.querySelectorAll('[data-kz-tab]');
|
|
63
|
+
if (!tabs) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
var firstTabObserver = new IntersectionObserver(function (entries) {
|
|
67
|
+
if (!entries[0].isIntersecting) {
|
|
68
|
+
setLeftArrowEnabled(true);
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
setLeftArrowEnabled(false);
|
|
72
|
+
}, {
|
|
73
|
+
threshold: 0.75,
|
|
74
|
+
root: containerElement
|
|
75
|
+
});
|
|
76
|
+
firstTabObserver.observe(isRTL$1 ? tabs[tabs.length - 1] : tabs[0]);
|
|
77
|
+
var lastTabObserver = new IntersectionObserver(function (entries) {
|
|
78
|
+
if (!entries[0].isIntersecting) {
|
|
79
|
+
setRightArrowEnabled(true);
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
setRightArrowEnabled(false);
|
|
83
|
+
}, {
|
|
84
|
+
threshold: 0.75,
|
|
85
|
+
root: containerElement
|
|
86
|
+
});
|
|
87
|
+
lastTabObserver.observe(isRTL$1 ? tabs[0] : tabs[tabs.length - 1]);
|
|
88
|
+
return function () {
|
|
89
|
+
firstTabObserver.disconnect();
|
|
90
|
+
lastTabObserver.disconnect();
|
|
91
|
+
};
|
|
92
|
+
}, [isDocumentReady, containerElement, isRTL$1]);
|
|
93
|
+
React.useEffect(function () {
|
|
94
|
+
var _a;
|
|
95
|
+
if (!isDocumentReady) {
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
// Scroll selected tab into view
|
|
99
|
+
(_a = containerElement === null || containerElement === void 0 ? void 0 : containerElement.querySelector('[role="tab"][data-selected=true]')) === null || _a === void 0 ? void 0 : _a.scrollIntoView({
|
|
100
|
+
block: 'nearest',
|
|
101
|
+
inline: 'center'
|
|
102
|
+
});
|
|
103
|
+
}, [selectedKey, containerElement, isDocumentReady]);
|
|
104
|
+
var handleArrowPress = function (direction) {
|
|
105
|
+
if (tabListRef.current) {
|
|
106
|
+
var tabListScrollPos = tabListRef.current.scrollLeft;
|
|
107
|
+
var newSpot = direction === 'left' ? tabListScrollPos - constants.SCROLL_AMOUNT : tabListScrollPos + constants.SCROLL_AMOUNT;
|
|
108
|
+
tabListRef.current.scrollLeft = newSpot;
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
return React__default.default.createElement("div", {
|
|
112
|
+
className: TabList_module.container,
|
|
113
|
+
id: tabListId
|
|
114
|
+
}, leftArrowEnabled &&
|
|
115
|
+
// making a conscious decision to use <div onClick> over <button> here, because:
|
|
116
|
+
// - <button> would add pointless noise for a screen reader user
|
|
117
|
+
// - keyboard only user can toggle through tabs with left/right arrow keys already
|
|
118
|
+
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
119
|
+
React__default.default.createElement("div", {
|
|
120
|
+
onClick: function () {
|
|
121
|
+
return handleArrowPress('left');
|
|
122
|
+
},
|
|
123
|
+
className: TabList_module.leftArrow,
|
|
124
|
+
"data-testid": testId ? "".concat(testId, "-kz-tablist-left-arrow") : undefined
|
|
125
|
+
}, React__default.default.createElement(Icon.Icon, {
|
|
126
|
+
name: "chevron_left",
|
|
127
|
+
isPresentational: true
|
|
128
|
+
})), React__default.default.createElement(reactAriaComponents.TabList, tslib.__assign({
|
|
27
129
|
"aria-label": ariaLabel,
|
|
130
|
+
ref: tabListRef,
|
|
28
131
|
className: classnames__default.default(TabList_module.tabList, className, noPadding && TabList_module.noPadding)
|
|
29
|
-
}, restProps), children)
|
|
132
|
+
}, restProps), children), rightArrowEnabled &&
|
|
133
|
+
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
134
|
+
React__default.default.createElement("div", {
|
|
135
|
+
onClick: function () {
|
|
136
|
+
return handleArrowPress('right');
|
|
137
|
+
},
|
|
138
|
+
className: TabList_module.rightArrow,
|
|
139
|
+
"data-testid": testId ? "".concat(testId, "-kz-tablist-right-arrow") : undefined
|
|
140
|
+
}, React__default.default.createElement(Icon.Icon, {
|
|
141
|
+
name: "chevron_right",
|
|
142
|
+
isPresentational: true
|
|
143
|
+
})));
|
|
30
144
|
};
|
|
31
145
|
exports.TabList = TabList;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var styles = {
|
|
4
|
+
"container": "TabList-module_container__Z8JCa",
|
|
4
5
|
"tabList": "TabList-module_tabList__e1qAi",
|
|
5
|
-
"noPadding": "TabList-module_noPadding__YM23K"
|
|
6
|
+
"noPadding": "TabList-module_noPadding__YM23K",
|
|
7
|
+
"leftArrow": "TabList-module_leftArrow__CPchY",
|
|
8
|
+
"rightArrow": "TabList-module_rightArrow__0xcW1"
|
|
6
9
|
};
|
|
7
10
|
module.exports = styles;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Finds the first ancestor with a `dir` property on it
|
|
5
|
+
* Returning true is that is `dir=rtl` and returning false in all other cases
|
|
6
|
+
*/
|
|
7
|
+
var isRTL = function (element) {
|
|
8
|
+
var _a;
|
|
9
|
+
return !!((_a = element.closest('[dir]')) === null || _a === void 0 ? void 0 : _a.matches('[dir="rtl"]'));
|
|
10
|
+
};
|
|
11
|
+
exports.isRTL = isRTL;
|
package/dist/esm/Tag/Tag.mjs
CHANGED
|
@@ -2,9 +2,8 @@ import { __assign } from 'tslib';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import classnames from 'classnames';
|
|
4
4
|
import { Avatar } from '../Avatar/Avatar.mjs';
|
|
5
|
-
import '../Icon/subcomponents/SVG/SVG.mjs';
|
|
6
|
-
import { LiveIcon } from '../Icon/LiveIcon.mjs';
|
|
7
5
|
import { Icon } from '../__future__/Icon/Icon.mjs';
|
|
6
|
+
import { LiveIcon } from './subcomponents/LiveIcon/LiveIcon.mjs';
|
|
8
7
|
import styles from './Tag.module.scss.mjs';
|
|
9
8
|
var isJSXElement = function (imageElementOrAvatarProps) {
|
|
10
9
|
return 'props' in imageElementOrAvatarProps;
|
|
@@ -97,37 +96,7 @@ const Tag = /*#__PURE__*/function () {
|
|
|
97
96
|
name: "cancel",
|
|
98
97
|
alt: "Dismiss",
|
|
99
98
|
isFilled: true
|
|
100
|
-
}))))), variant === 'statusLive' &&
|
|
101
|
-
className: styles.liveIcon
|
|
102
|
-
}, /*#__PURE__*/React.createElement(LiveIcon, {
|
|
103
|
-
role: "presentation",
|
|
104
|
-
classNameOverride: styles.liveIcon_base,
|
|
105
|
-
width: "16",
|
|
106
|
-
height: "16",
|
|
107
|
-
viewBox: "0 0 16 16",
|
|
108
|
-
fill: "none"
|
|
109
|
-
}), /*#__PURE__*/React.createElement(LiveIcon, {
|
|
110
|
-
role: "presentation",
|
|
111
|
-
classNameOverride: styles.liveIcon_1,
|
|
112
|
-
width: "16",
|
|
113
|
-
height: "16",
|
|
114
|
-
viewBox: "0 0 16 16",
|
|
115
|
-
fill: "none"
|
|
116
|
-
}), /*#__PURE__*/React.createElement(LiveIcon, {
|
|
117
|
-
role: "presentation",
|
|
118
|
-
classNameOverride: styles.liveIcon_2,
|
|
119
|
-
width: "16",
|
|
120
|
-
height: "16",
|
|
121
|
-
viewBox: "0 0 16 16",
|
|
122
|
-
fill: "none"
|
|
123
|
-
}), /*#__PURE__*/React.createElement(LiveIcon, {
|
|
124
|
-
role: "presentation",
|
|
125
|
-
classNameOverride: styles.liveIcon_3,
|
|
126
|
-
width: "16",
|
|
127
|
-
height: "16",
|
|
128
|
-
viewBox: "0 0 16 16",
|
|
129
|
-
fill: "none"
|
|
130
|
-
}))))));
|
|
99
|
+
}))))), variant === 'statusLive' && /*#__PURE__*/React.createElement(LiveIcon, null))));
|
|
131
100
|
};
|
|
132
101
|
Tag.displayName = 'Tag';
|
|
133
102
|
return Tag;
|
|
@@ -23,13 +23,6 @@ var styles = {
|
|
|
23
23
|
"statusLive": "Tag-module_statusLive__xG48w",
|
|
24
24
|
"statusAction": "Tag-module_statusAction__woL-O",
|
|
25
25
|
"statusClosed": "Tag-module_statusClosed__VhZP-",
|
|
26
|
-
"statusDraft": "Tag-module_statusDraft__9QZDv"
|
|
27
|
-
"liveIcon": "Tag-module_liveIcon__URtak",
|
|
28
|
-
"liveIcon_base": "Tag-module_liveIcon_base__Nk5um",
|
|
29
|
-
"liveIcon_1": "Tag-module_liveIcon_1__STFJY",
|
|
30
|
-
"liveIcon_2": "Tag-module_liveIcon_2__rko-D",
|
|
31
|
-
"liveIcon_3": "Tag-module_liveIcon_3__fL71y",
|
|
32
|
-
"pulse-inner": "Tag-module_pulse-inner__0-JFL",
|
|
33
|
-
"pulse-outer": "Tag-module_pulse-outer__f9Oox"
|
|
26
|
+
"statusDraft": "Tag-module_statusDraft__9QZDv"
|
|
34
27
|
};
|
|
35
28
|
export { styles as default };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SVG } from '../../../Icon/subcomponents/SVG/SVG.mjs';
|
|
3
|
+
import styles from './LiveIcon.module.css.mjs';
|
|
4
|
+
|
|
5
|
+
// This file is autogenerated by wrapSVGs.ts
|
|
6
|
+
// Changes to this file will be overwritten
|
|
7
|
+
const LiveIconSvg = /*#__PURE__*/function () {
|
|
8
|
+
const LiveIconSvg = function (_a) {
|
|
9
|
+
var classNameOverride = _a.classNameOverride;
|
|
10
|
+
return /*#__PURE__*/React.createElement(SVG, {
|
|
11
|
+
role: "presentation",
|
|
12
|
+
width: "16",
|
|
13
|
+
height: "16",
|
|
14
|
+
viewBox: "0 0 16 16",
|
|
15
|
+
fill: "none",
|
|
16
|
+
classNameOverride: classNameOverride
|
|
17
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
18
|
+
stroke: "currentColor",
|
|
19
|
+
d: "M3.266 12.733c-2.6-2.6-2.6-6.866 0-9.466M5.2 10.8c-1.534-1.533-1.534-4.067 0-5.667",
|
|
20
|
+
strokeWidth: "1.5",
|
|
21
|
+
strokeLinejoin: "round",
|
|
22
|
+
strokeLinecap: "round"
|
|
23
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
24
|
+
fill: "currentColor",
|
|
25
|
+
d: "M8 10a2 2 0 1 0 0-4 2 2 0 0 0 0 4"
|
|
26
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
27
|
+
stroke: "currentColor",
|
|
28
|
+
d: "M10.8 5.2c1.533 1.533 1.533 4.067 0 5.667M12.733 3.267c2.6 2.6 2.6 6.8 0 9.4",
|
|
29
|
+
strokeWidth: "1.5",
|
|
30
|
+
strokeLinejoin: "round",
|
|
31
|
+
strokeLinecap: "round"
|
|
32
|
+
}));
|
|
33
|
+
};
|
|
34
|
+
LiveIconSvg.displayName = 'LiveIconSvg';
|
|
35
|
+
return LiveIconSvg;
|
|
36
|
+
}();
|
|
37
|
+
const LiveIcon = /*#__PURE__*/function () {
|
|
38
|
+
const LiveIcon = function () {
|
|
39
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
40
|
+
className: styles.liveIcon
|
|
41
|
+
}, /*#__PURE__*/React.createElement(LiveIconSvg, {
|
|
42
|
+
classNameOverride: styles.liveIcon_base
|
|
43
|
+
}), /*#__PURE__*/React.createElement(LiveIconSvg, {
|
|
44
|
+
classNameOverride: styles.liveIcon_1
|
|
45
|
+
}), /*#__PURE__*/React.createElement(LiveIconSvg, {
|
|
46
|
+
classNameOverride: styles.liveIcon_2
|
|
47
|
+
}), /*#__PURE__*/React.createElement(LiveIconSvg, {
|
|
48
|
+
classNameOverride: styles.liveIcon_3
|
|
49
|
+
}));
|
|
50
|
+
};
|
|
51
|
+
LiveIcon.displayName = 'LiveIcon';
|
|
52
|
+
return LiveIcon;
|
|
53
|
+
}();
|
|
54
|
+
export { LiveIcon };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
var styles = {
|
|
2
|
+
"liveIcon": "LiveIcon-module_liveIcon__v6FG-",
|
|
3
|
+
"liveIcon_base": "LiveIcon-module_liveIcon_base__Kagqm",
|
|
4
|
+
"liveIcon_1": "LiveIcon-module_liveIcon_1__ye1Qk",
|
|
5
|
+
"liveIcon_2": "LiveIcon-module_liveIcon_2__p6f55",
|
|
6
|
+
"liveIcon_3": "LiveIcon-module_liveIcon_3__JmRFR",
|
|
7
|
+
"pulse-inner": "LiveIcon-module_pulse-inner__EGliV",
|
|
8
|
+
"pulse-outer": "LiveIcon-module_pulse-outer__bxHMh"
|
|
9
|
+
};
|
|
10
|
+
export { styles as default };
|
|
@@ -9,15 +9,32 @@ import styles from './TileGrid.module.scss.mjs';
|
|
|
9
9
|
*/
|
|
10
10
|
const TileGrid = /*#__PURE__*/function () {
|
|
11
11
|
const TileGrid = function (_a) {
|
|
12
|
+
var _b;
|
|
12
13
|
var children = _a.children,
|
|
13
14
|
classNameOverride = _a.classNameOverride,
|
|
14
15
|
restProps = __rest(_a, ["children", "classNameOverride"]);
|
|
15
|
-
|
|
16
|
+
var isFragment = !Array.isArray(children) && children.type === React.Fragment;
|
|
17
|
+
return /*#__PURE__*/React.createElement("ul", __assign({
|
|
16
18
|
className: classnames(styles.grid, classNameOverride),
|
|
17
19
|
"data-tile-grid": true
|
|
18
|
-
}, restProps), children)
|
|
20
|
+
}, restProps), isFragment ? ((_b = children === null || children === void 0 ? void 0 : children.props) === null || _b === void 0 ? void 0 : _b.children) ? ( /*#__PURE__*/React.createElement(TileListItem, {
|
|
21
|
+
tiles: children.props.children
|
|
22
|
+
})) : null : ( /*#__PURE__*/React.createElement(TileListItem, {
|
|
23
|
+
tiles: children
|
|
24
|
+
})));
|
|
19
25
|
};
|
|
20
26
|
TileGrid.displayName = 'TileGrid';
|
|
21
27
|
return TileGrid;
|
|
22
28
|
}();
|
|
29
|
+
var TileListItem = function (_a) {
|
|
30
|
+
var tiles = _a.tiles;
|
|
31
|
+
if (Array.isArray(tiles)) {
|
|
32
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, tiles.map(function (tile, index) {
|
|
33
|
+
return /*#__PURE__*/React.createElement("li", {
|
|
34
|
+
key: "".concat(tile.props.title, "-").concat(index)
|
|
35
|
+
}, tile);
|
|
36
|
+
}));
|
|
37
|
+
}
|
|
38
|
+
return /*#__PURE__*/React.createElement("li", null, tiles);
|
|
39
|
+
};
|
|
23
40
|
export { TileGrid };
|
|
@@ -16,7 +16,9 @@ var Tab = function (props) {
|
|
|
16
16
|
var tabProps = __assign({
|
|
17
17
|
className: classnames(styles.tab, className)
|
|
18
18
|
}, restProps);
|
|
19
|
-
return /*#__PURE__*/React.createElement(Tab$1, __assign({
|
|
19
|
+
return /*#__PURE__*/React.createElement(Tab$1, __assign({
|
|
20
|
+
"data-kz-tab": true
|
|
21
|
+
}, tabProps), function (_a) {
|
|
20
22
|
var isSelected = _a.isSelected,
|
|
21
23
|
isFocusVisible = _a.isFocusVisible,
|
|
22
24
|
isHovered = _a.isHovered;
|