@kaizen/components 1.68.9 → 1.68.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/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/TextArea/TextArea.cjs +8 -8
- package/dist/cjs/Tile/TileGrid/TileGrid.cjs +19 -2
- 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/TextArea/TextArea.mjs +8 -8
- package/dist/esm/Tile/TileGrid/TileGrid.mjs +19 -2
- package/dist/styles.css +132 -116
- 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/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/TextArea/TextArea.tsx +9 -8
- package/src/TextArea/_docs/TextArea.stickersheet.stories.tsx +23 -14
- 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__/Tag/Tag/_docs/Tag-migration-guide.stories.tsx +24 -64
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;
|
|
@@ -27,27 +27,27 @@ var TextArea = function (_a) {
|
|
|
27
27
|
disabled = _a.disabled,
|
|
28
28
|
propsOnChange = _a.onChange,
|
|
29
29
|
restProps = tslib.__rest(_a, ["textAreaRef", "status", "autogrow", "reversed", "rows", "defaultValue", "value", "disabled", "onChange"]);
|
|
30
|
-
var _h = React.useState(
|
|
30
|
+
var _h = React.useState(defaultValue),
|
|
31
31
|
internalValue = _h[0],
|
|
32
32
|
setInternalValue = _h[1];
|
|
33
|
-
// ^
|
|
34
|
-
// essentially forces the textarea into an (interally) controlled mode if autogrow is true and mode is uncontrolled
|
|
35
|
-
var controlledValue = value !== null && value !== void 0 ? value : internalValue;
|
|
33
|
+
// ^holds an internal state of the value, used for the autogrow feature if uncontrolled (no `value` provided)
|
|
36
34
|
var fallbackRef = React.useRef(null);
|
|
37
35
|
var textAreaRef = propsTextAreaRef !== null && propsTextAreaRef !== void 0 ? propsTextAreaRef : fallbackRef;
|
|
38
36
|
var onChange = function (event) {
|
|
39
37
|
propsOnChange === null || propsOnChange === void 0 ? void 0 : propsOnChange(event);
|
|
40
|
-
|
|
38
|
+
if (!value && autogrow) {
|
|
39
|
+
setInternalValue(event.target.value);
|
|
40
|
+
}
|
|
41
41
|
};
|
|
42
42
|
return React__default.default.createElement("div", {
|
|
43
43
|
className: classnames__default.default(TextArea_module.wrapper, (_b = {}, _b[TextArea_module.wrapperAutogrow] = autogrow, _b)),
|
|
44
|
-
"data-value": autogrow ?
|
|
44
|
+
"data-value": autogrow ? value !== null && value !== void 0 ? value : internalValue : undefined
|
|
45
45
|
}, React__default.default.createElement("textarea", tslib.__assign({
|
|
46
46
|
className: classnames__default.default(TextArea_module.textarea, TextArea_module[status], reversed ? TextArea_module.reversed : TextArea_module.default, (_c = {}, _c[TextArea_module.disabled] = disabled, _c[TextArea_module.textareaAutogrow] = autogrow, _c)),
|
|
47
47
|
rows: rows,
|
|
48
48
|
onChange: onChange,
|
|
49
|
-
value:
|
|
50
|
-
defaultValue:
|
|
49
|
+
value: value,
|
|
50
|
+
defaultValue: value ? undefined : defaultValue,
|
|
51
51
|
// ^ React throws a warning if you specify both a value and a defaultValue
|
|
52
52
|
ref: textAreaRef,
|
|
53
53
|
disabled: disabled
|
|
@@ -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;
|
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 };
|
|
@@ -19,27 +19,27 @@ const TextArea = /*#__PURE__*/function () {
|
|
|
19
19
|
disabled = _a.disabled,
|
|
20
20
|
propsOnChange = _a.onChange,
|
|
21
21
|
restProps = __rest(_a, ["textAreaRef", "status", "autogrow", "reversed", "rows", "defaultValue", "value", "disabled", "onChange"]);
|
|
22
|
-
var _h = useState(
|
|
22
|
+
var _h = useState(defaultValue),
|
|
23
23
|
internalValue = _h[0],
|
|
24
24
|
setInternalValue = _h[1];
|
|
25
|
-
// ^
|
|
26
|
-
// essentially forces the textarea into an (interally) controlled mode if autogrow is true and mode is uncontrolled
|
|
27
|
-
var controlledValue = value !== null && value !== void 0 ? value : internalValue;
|
|
25
|
+
// ^holds an internal state of the value, used for the autogrow feature if uncontrolled (no `value` provided)
|
|
28
26
|
var fallbackRef = useRef(null);
|
|
29
27
|
var textAreaRef = propsTextAreaRef !== null && propsTextAreaRef !== void 0 ? propsTextAreaRef : fallbackRef;
|
|
30
28
|
var onChange = function (event) {
|
|
31
29
|
propsOnChange === null || propsOnChange === void 0 ? void 0 : propsOnChange(event);
|
|
32
|
-
|
|
30
|
+
if (!value && autogrow) {
|
|
31
|
+
setInternalValue(event.target.value);
|
|
32
|
+
}
|
|
33
33
|
};
|
|
34
34
|
return /*#__PURE__*/React.createElement("div", {
|
|
35
35
|
className: classnames(styles.wrapper, (_b = {}, _b[styles.wrapperAutogrow] = autogrow, _b)),
|
|
36
|
-
"data-value": autogrow ?
|
|
36
|
+
"data-value": autogrow ? value !== null && value !== void 0 ? value : internalValue : undefined
|
|
37
37
|
}, /*#__PURE__*/React.createElement("textarea", __assign({
|
|
38
38
|
className: classnames(styles.textarea, styles[status], reversed ? styles.reversed : styles.default, (_c = {}, _c[styles.disabled] = disabled, _c[styles.textareaAutogrow] = autogrow, _c)),
|
|
39
39
|
rows: rows,
|
|
40
40
|
onChange: onChange,
|
|
41
|
-
value:
|
|
42
|
-
defaultValue:
|
|
41
|
+
value: value,
|
|
42
|
+
defaultValue: value ? undefined : defaultValue,
|
|
43
43
|
// ^ React throws a warning if you specify both a value and a defaultValue
|
|
44
44
|
ref: textAreaRef,
|
|
45
45
|
disabled: disabled
|
|
@@ -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 };
|