@spaced-out/ui-design-system 0.5.10 → 0.5.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/.storybook/public/component-parent-levels.json +77 -77
- package/CHANGELOG.md +9 -0
- package/lib/components/Card/Card.d.ts +7 -5
- package/lib/components/Card/Card.d.ts.map +1 -1
- package/lib/components/Card/Card.js +33 -1
- package/lib/components/CircularLoader/CircularLoader.d.ts +1 -0
- package/lib/components/CircularLoader/CircularLoader.d.ts.map +1 -1
- package/lib/components/CircularLoader/CircularLoader.js +7 -1
- package/lib/components/EmptyState/EmptyState.d.ts +1 -0
- package/lib/components/EmptyState/EmptyState.d.ts.map +1 -1
- package/lib/components/EmptyState/EmptyState.js +26 -1
- package/lib/components/ErrorMessage/ErrorMessage.d.ts +1 -0
- package/lib/components/ErrorMessage/ErrorMessage.d.ts.map +1 -1
- package/lib/components/ErrorMessage/ErrorMessage.js +30 -1
- package/lib/components/FocusManager/FocusManager.d.ts +1 -0
- package/lib/components/FocusManager/FocusManager.d.ts.map +1 -1
- package/lib/components/FocusManager/FocusManager.js +6 -1
- package/lib/components/Grid/Grid.d.ts +4 -2
- package/lib/components/Grid/Grid.d.ts.map +1 -1
- package/lib/components/Grid/Grid.js +13 -3
- package/lib/components/Icon/Icon.d.ts +1 -0
- package/lib/components/Icon/Icon.d.ts.map +1 -1
- package/lib/components/Icon/Icon.js +7 -1
- package/lib/components/Input/Input.d.ts +1 -0
- package/lib/components/Input/Input.d.ts.map +1 -1
- package/lib/components/Input/Input.js +64 -0
- package/lib/components/LinearLoader/LinearLoader.d.ts +1 -0
- package/lib/components/LinearLoader/LinearLoader.d.ts.map +1 -1
- package/lib/components/LinearLoader/LinearLoader.js +7 -1
- package/lib/components/PromptChip/PromptChip.d.ts +2 -0
- package/lib/components/PromptChip/PromptChip.d.ts.map +1 -1
- package/lib/components/PromptChip/PromptChip.js +2 -2
- package/lib/components/Separator/Separator.d.ts +1 -0
- package/lib/components/Separator/Separator.d.ts.map +1 -1
- package/lib/components/Separator/Separator.js +7 -2
- package/lib/components/Shimmer/Shimmer.d.ts +5 -2
- package/lib/components/Shimmer/Shimmer.d.ts.map +1 -1
- package/lib/components/Shimmer/Shimmer.js +39 -8
- package/lib/components/StatusIndicator/StatusIndicator.d.ts +1 -0
- package/lib/components/StatusIndicator/StatusIndicator.d.ts.map +1 -1
- package/lib/components/StatusIndicator/StatusIndicator.js +6 -1
- package/lib/components/StickyBar/StickyBar.d.ts +4 -2
- package/lib/components/StickyBar/StickyBar.d.ts.map +1 -1
- package/lib/components/StickyBar/StickyBar.js +16 -1
- package/lib/components/Text/Text.d.ts +2 -0
- package/lib/components/Text/Text.d.ts.map +1 -1
- package/lib/components/Text/Text.js +189 -27
- package/lib/components/Toggle/Toggle.d.ts +1 -0
- package/lib/components/Toggle/Toggle.d.ts.map +1 -1
- package/lib/components/Toggle/Toggle.js +18 -0
- package/lib/components/Truncate/Truncate.d.ts +1 -0
- package/lib/components/Truncate/Truncate.d.ts.map +1 -1
- package/lib/components/Truncate/Truncate.js +12 -3
- package/package.json +1 -1
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.Row = exports.Col = void 0;
|
|
7
7
|
var React = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _classify = require("../../utils/classify");
|
|
9
|
+
var _qa = require("../../utils/qa");
|
|
9
10
|
var _GridModule = _interopRequireDefault(require("./Grid.module.css"));
|
|
10
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
12
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -22,7 +23,8 @@ const Row = _ref => {
|
|
|
22
23
|
className,
|
|
23
24
|
children,
|
|
24
25
|
gridType = 'medium',
|
|
25
|
-
repeatTracks = '1fr'
|
|
26
|
+
repeatTracks = '1fr',
|
|
27
|
+
testId
|
|
26
28
|
} = _ref;
|
|
27
29
|
const gridRepeatCount = GRID_SYSTEM_MAP[gridType];
|
|
28
30
|
let columnSpanCount = 0;
|
|
@@ -65,7 +67,10 @@ const Row = _ref => {
|
|
|
65
67
|
return child;
|
|
66
68
|
});
|
|
67
69
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
68
|
-
"data-testid":
|
|
70
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
71
|
+
base: testId,
|
|
72
|
+
slot: 'row'
|
|
73
|
+
}),
|
|
69
74
|
className: (0, _classify.classify)(_GridModule.default.gridRow, className),
|
|
70
75
|
style: {
|
|
71
76
|
'--grid-repeat-count': gridRepeatCount,
|
|
@@ -80,9 +85,14 @@ const Col = _ref2 => {
|
|
|
80
85
|
className,
|
|
81
86
|
children,
|
|
82
87
|
gridColumnStart,
|
|
83
|
-
gridColumnEnd
|
|
88
|
+
gridColumnEnd,
|
|
89
|
+
testId
|
|
84
90
|
} = _ref2;
|
|
85
91
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
92
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
93
|
+
base: testId,
|
|
94
|
+
slot: 'col'
|
|
95
|
+
}),
|
|
86
96
|
className: (0, _classify.classify)(_GridModule.default.gridColumn, className),
|
|
87
97
|
style: {
|
|
88
98
|
'--grid-column-start': gridColumnStart || 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../src/components/Icon/Icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAErD,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../src/components/Icon/Icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAErD,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAC;AAQrD,eAAO,MAAM,SAAS;;;;;EAKpB,CAAC;AAEH,eAAO,MAAM,SAAS;;;;EAIpB,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,MAAM,OAAO,SAAS,CAAC;AAC9C,MAAM,MAAM,QAAQ,GAAG,MAAM,OAAO,SAAS,CAAC;AAE9C,MAAM,WAAW,SAAS;IACxB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,CAAC,EAAE;QACN,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;KACvB,CAAC;IACF,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,IAAI,EAAE,IAAI,CAAC,iBAAiB,CAAC,SAAS,EAAE,cAAc,CAuChE,CAAC"}
|
|
@@ -7,6 +7,7 @@ exports.Icon = exports.ICON_TYPE = exports.ICON_SIZE = void 0;
|
|
|
7
7
|
var React = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _typography = require("../../types/typography");
|
|
9
9
|
var _classify = _interopRequireDefault(require("../../utils/classify"));
|
|
10
|
+
var _qa = require("../../utils/qa");
|
|
10
11
|
var _typographyModule = _interopRequireDefault(require("../../styles/typography.module.css"));
|
|
11
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
13
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -31,10 +32,15 @@ const Icon = exports.Icon = /*#__PURE__*/React.forwardRef((_ref, forwardRef) =>
|
|
|
31
32
|
className,
|
|
32
33
|
style,
|
|
33
34
|
onClick,
|
|
34
|
-
swapOpacity
|
|
35
|
+
swapOpacity,
|
|
36
|
+
testId = 'icon'
|
|
35
37
|
} = _ref;
|
|
36
38
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
37
39
|
children: !!name && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
40
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
41
|
+
base: testId,
|
|
42
|
+
slot: 'icon'
|
|
43
|
+
}),
|
|
38
44
|
className: (0, _classify.default)(_typographyModule.default.centerAlignFlex, _typographyModule.default[`${size}Icon`], _typographyModule.default[color], className),
|
|
39
45
|
onClick: onClick,
|
|
40
46
|
ref: forwardRef,
|
|
@@ -70,6 +70,7 @@ export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElem
|
|
|
70
70
|
step?: string;
|
|
71
71
|
hideNumberSpinner?: boolean;
|
|
72
72
|
hidePasswordToggleIcon?: boolean;
|
|
73
|
+
testId?: string;
|
|
73
74
|
}
|
|
74
75
|
export declare const Input: Flow.AbstractComponent<InputProps, HTMLInputElement>;
|
|
75
76
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAKrD,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,qBAAqB,CAAC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nB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAiRD,eAAO,MAAM,KAAK,EAEb,IAAI,CAAC,iBAAiB,CAAC,UAAU,EAAE,gBAAgB,CAAC,CAAC"}
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.Input = exports.INPUT_TYPES = exports.EXPONENT_CHARACTER_LIST = void 0;
|
|
7
7
|
var React = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _classify = require("../../utils/classify");
|
|
9
|
+
var _qa = require("../../utils/qa");
|
|
9
10
|
var _Icon = require("../Icon");
|
|
10
11
|
var _Text = require("../Text");
|
|
11
12
|
var _InputModule = _interopRequireDefault(require("./Input.module.css"));
|
|
@@ -58,6 +59,7 @@ const Input_ = (props, ref) => {
|
|
|
58
59
|
disallowExponents,
|
|
59
60
|
hideNumberSpinner,
|
|
60
61
|
hidePasswordToggleIcon,
|
|
62
|
+
testId,
|
|
61
63
|
...inputProps
|
|
62
64
|
} = props;
|
|
63
65
|
const [showPassword, setShowPassword] = React.useState(false);
|
|
@@ -80,23 +82,43 @@ const Input_ = (props, ref) => {
|
|
|
80
82
|
onKeyDown?.(e);
|
|
81
83
|
};
|
|
82
84
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
85
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
86
|
+
base: testId,
|
|
87
|
+
slot: 'root'
|
|
88
|
+
}),
|
|
83
89
|
className: (0, _classify.classify)(_InputModule.default.wrapper, {
|
|
84
90
|
[_InputModule.default.filled]: controlledInputFilled ?? false,
|
|
85
91
|
[_InputModule.default.withError]: error ?? false
|
|
86
92
|
}, classNames?.wrapper),
|
|
87
93
|
children: [Boolean(label) && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
94
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
95
|
+
base: testId,
|
|
96
|
+
slot: 'label'
|
|
97
|
+
}),
|
|
88
98
|
className: _InputModule.default.info,
|
|
89
99
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
90
100
|
className: _InputModule.default.infoContent,
|
|
91
101
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.FormLabelSmall, {
|
|
92
102
|
color: "secondary",
|
|
103
|
+
testId: (0, _qa.generateTestId)({
|
|
104
|
+
base: testId,
|
|
105
|
+
slot: 'labelText'
|
|
106
|
+
}),
|
|
93
107
|
children: label ?? ''
|
|
94
108
|
}), "\xA0", required && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.FormLabelSmall, {
|
|
95
109
|
color: "danger",
|
|
110
|
+
testId: (0, _qa.generateTestId)({
|
|
111
|
+
base: testId,
|
|
112
|
+
slot: 'requiredIndicator'
|
|
113
|
+
}),
|
|
96
114
|
children: '*'
|
|
97
115
|
})]
|
|
98
116
|
})
|
|
99
117
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
118
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
119
|
+
base: testId,
|
|
120
|
+
slot: 'box'
|
|
121
|
+
}),
|
|
100
122
|
className: (0, _classify.classify)(_InputModule.default.box, {
|
|
101
123
|
[_InputModule.default.inputDisabled]: disabled ?? false,
|
|
102
124
|
[_InputModule.default.medium]: size === 'medium',
|
|
@@ -108,6 +130,10 @@ const Input_ = (props, ref) => {
|
|
|
108
130
|
onClick: !(disabled || locked) ? onContainerClick : undefined,
|
|
109
131
|
ref: boxRef,
|
|
110
132
|
children: [iconLeftName && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
|
|
133
|
+
testId: (0, _qa.generateTestId)({
|
|
134
|
+
base: testId,
|
|
135
|
+
slot: 'iconLeft'
|
|
136
|
+
}),
|
|
111
137
|
className: (0, _classify.classify)(classNames?.iconLeft),
|
|
112
138
|
name: iconLeftName,
|
|
113
139
|
color: disabled ? 'disabled' : 'secondary',
|
|
@@ -115,6 +141,10 @@ const Input_ = (props, ref) => {
|
|
|
115
141
|
type: iconLeftType
|
|
116
142
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
117
143
|
...inputProps,
|
|
144
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
145
|
+
base: testId,
|
|
146
|
+
slot: 'input'
|
|
147
|
+
}),
|
|
118
148
|
disabled: locked || disabled,
|
|
119
149
|
name: name,
|
|
120
150
|
ref: ref,
|
|
@@ -127,11 +157,16 @@ const Input_ = (props, ref) => {
|
|
|
127
157
|
readOnly: readOnly,
|
|
128
158
|
onKeyDown: handleKeyDown
|
|
129
159
|
}), type === 'color' && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
160
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
161
|
+
base: testId,
|
|
162
|
+
slot: 'colorText'
|
|
163
|
+
}),
|
|
130
164
|
className: (0, _classify.classify)(_InputModule.default.colorText, _InputModule.default[size], {
|
|
131
165
|
[_InputModule.default.hasValue]: value
|
|
132
166
|
}),
|
|
133
167
|
children: value ? value : placeholder
|
|
134
168
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(RightInputIcon, {
|
|
169
|
+
testId: testId,
|
|
135
170
|
isEmail: type === 'email',
|
|
136
171
|
isPassword: type === 'password',
|
|
137
172
|
showPassword: showPassword,
|
|
@@ -144,12 +179,24 @@ const Input_ = (props, ref) => {
|
|
|
144
179
|
className: classNames?.iconRight
|
|
145
180
|
})]
|
|
146
181
|
}), (Boolean(helperText) || error) && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
182
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
183
|
+
base: testId,
|
|
184
|
+
slot: 'helperText'
|
|
185
|
+
}),
|
|
147
186
|
className: _InputModule.default.info,
|
|
148
187
|
children: error && errorText ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.BodySmall, {
|
|
149
188
|
color: "danger",
|
|
189
|
+
testId: (0, _qa.generateTestId)({
|
|
190
|
+
base: testId,
|
|
191
|
+
slot: 'errorText'
|
|
192
|
+
}),
|
|
150
193
|
children: errorText
|
|
151
194
|
}) : typeof helperText === 'string' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.BodySmall, {
|
|
152
195
|
color: disabled ? 'disabled' : 'secondary',
|
|
196
|
+
testId: (0, _qa.generateTestId)({
|
|
197
|
+
base: testId,
|
|
198
|
+
slot: 'helperText'
|
|
199
|
+
}),
|
|
153
200
|
children: helperText
|
|
154
201
|
}) : helperText
|
|
155
202
|
})]
|
|
@@ -157,6 +204,7 @@ const Input_ = (props, ref) => {
|
|
|
157
204
|
};
|
|
158
205
|
const RightInputIcon = _ref => {
|
|
159
206
|
let {
|
|
207
|
+
testId,
|
|
160
208
|
isEmail,
|
|
161
209
|
isPassword,
|
|
162
210
|
showPassword,
|
|
@@ -169,6 +217,10 @@ const RightInputIcon = _ref => {
|
|
|
169
217
|
} = _ref;
|
|
170
218
|
if (isLocked) {
|
|
171
219
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
|
|
220
|
+
testId: (0, _qa.generateTestId)({
|
|
221
|
+
base: testId,
|
|
222
|
+
slot: 'iconRight'
|
|
223
|
+
}),
|
|
172
224
|
name: "lock",
|
|
173
225
|
color: isDisabled ? 'disabled' : 'secondary',
|
|
174
226
|
size: "small",
|
|
@@ -177,6 +229,10 @@ const RightInputIcon = _ref => {
|
|
|
177
229
|
}
|
|
178
230
|
if (isEmail) {
|
|
179
231
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
|
|
232
|
+
testId: (0, _qa.generateTestId)({
|
|
233
|
+
base: testId,
|
|
234
|
+
slot: 'iconRight'
|
|
235
|
+
}),
|
|
180
236
|
name: "at",
|
|
181
237
|
color: isDisabled ? 'disabled' : 'secondary',
|
|
182
238
|
size: "small",
|
|
@@ -186,6 +242,10 @@ const RightInputIcon = _ref => {
|
|
|
186
242
|
}
|
|
187
243
|
if (isPassword && showPasswordToggleIcon) {
|
|
188
244
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
|
|
245
|
+
testId: (0, _qa.generateTestId)({
|
|
246
|
+
base: testId,
|
|
247
|
+
slot: 'iconRight'
|
|
248
|
+
}),
|
|
189
249
|
name: showPassword ? 'eye-slash' : 'eye',
|
|
190
250
|
color: isDisabled ? 'disabled' : 'secondary',
|
|
191
251
|
size: "small",
|
|
@@ -198,6 +258,10 @@ const RightInputIcon = _ref => {
|
|
|
198
258
|
}
|
|
199
259
|
if (iconRightName) {
|
|
200
260
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
|
|
261
|
+
testId: (0, _qa.generateTestId)({
|
|
262
|
+
base: testId,
|
|
263
|
+
slot: 'iconRight'
|
|
264
|
+
}),
|
|
201
265
|
name: iconRightName || '',
|
|
202
266
|
color: isDisabled ? 'disabled' : 'secondary',
|
|
203
267
|
size: "small",
|
|
@@ -4,6 +4,7 @@ export interface LinearLoaderProps {
|
|
|
4
4
|
size?: 'large' | 'medium' | 'small';
|
|
5
5
|
className?: string;
|
|
6
6
|
indeterminate?: boolean;
|
|
7
|
+
testId?: string;
|
|
7
8
|
}
|
|
8
9
|
export declare const LinearLoader: Flow.AbstractComponent<LinearLoaderProps, HTMLDivElement>;
|
|
9
10
|
//# sourceMappingURL=LinearLoader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinearLoader.d.ts","sourceRoot":"","sources":["../../../src/components/LinearLoader/LinearLoader.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"LinearLoader.d.ts","sourceRoot":"","sources":["../../../src/components/LinearLoader/LinearLoader.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAQrD,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,YAAY,EAAE,IAAI,CAAC,iBAAiB,CAC/C,iBAAiB,EACjB,cAAc,CAqCf,CAAC"}
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.LinearLoader = void 0;
|
|
7
7
|
var React = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _classify = require("../../utils/classify");
|
|
9
|
+
var _qa = require("../../utils/qa");
|
|
9
10
|
var _LinearLoaderModule = _interopRequireDefault(require("./LinearLoader.module.css"));
|
|
10
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
12
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -15,9 +16,14 @@ const LinearLoader = exports.LinearLoader = /*#__PURE__*/React.forwardRef((_ref,
|
|
|
15
16
|
value,
|
|
16
17
|
size = 'medium',
|
|
17
18
|
className,
|
|
18
|
-
indeterminate
|
|
19
|
+
indeterminate,
|
|
20
|
+
testId
|
|
19
21
|
} = _ref;
|
|
20
22
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
23
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
24
|
+
base: testId,
|
|
25
|
+
slot: 'loader'
|
|
26
|
+
}),
|
|
21
27
|
className: (0, _classify.classify)(_LinearLoaderModule.default.lineContainer, {
|
|
22
28
|
[_LinearLoaderModule.default.large]: size === 'large',
|
|
23
29
|
[_LinearLoaderModule.default.medium]: size === 'medium',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PromptChip.d.ts","sourceRoot":"","sources":["../../../src/components/PromptChip/PromptChip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAErD,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAC;AAKrD,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,qBAAqB,CAAC;AAElD,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,wBAAwB,CAAC;AAM7D,KAAK,UAAU,GAAG,QAAQ,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;EAG3B,CAAC;AAEH,MAAM,MAAM,cAAc,GACxB,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC;AAC3D,MAAM,MAAM,eAAe,GAAG;IAC5B,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB,GAAG,CACA;IACE,SAAS,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,KAAK,OAAO,CAAC;IAC9D,WAAW,EAAE,IAAI,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,GACD;IACE,WAAW,CAAC,EAAE,KAAK,CAAC;IACpB,SAAS,CAAC,EAAE,KAAK,CAAC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C,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;EAG3B,CAAC;AAEH,MAAM,MAAM,cAAc,GACxB,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC;AAC3D,MAAM,MAAM,eAAe,GAAG;IAC5B,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB,GAAG,CACA;IACE,SAAS,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,KAAK,OAAO,CAAC;IAC9D,WAAW,EAAE,IAAI,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,GACD;IACE,WAAW,CAAC,EAAE,KAAK,CAAC;IACpB,SAAS,CAAC,EAAE,KAAK,CAAC;IAClB,WAAW,CAAC,EAAE,KAAK,CAAC;CACrB,CACJ,GAAG;IACA,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,OAAO,CAAC,EACJ,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,KAAK,OAAO,CAAC,GACtD,IAAI,GACJ,SAAS,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,UAAU,CAAC;IACvB,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,gBAAgB,CAAC;CACpC,CAAC;AAEJ,eAAO,MAAM,UAAU,EAAE,IAAI,CAAC,iBAAiB,CAC7C,eAAe,EACf,cAAc,CA8Hf,CAAC"}
|
|
@@ -61,7 +61,7 @@ const PromptChip = exports.PromptChip = /*#__PURE__*/React.forwardRef((props, re
|
|
|
61
61
|
[_PromptChipModule.default.promptChipContainerHover]: !!onClick
|
|
62
62
|
}, classNames?.container),
|
|
63
63
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
64
|
-
className: _PromptChipModule.default.leftSection,
|
|
64
|
+
className: (0, _classify.classify)(_PromptChipModule.default.leftSection, classNames?.leftSlot),
|
|
65
65
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
|
|
66
66
|
size: _Icon.ICON_SIZE.small,
|
|
67
67
|
name: iconName,
|
|
@@ -75,7 +75,7 @@ const PromptChip = exports.PromptChip = /*#__PURE__*/React.forwardRef((props, re
|
|
|
75
75
|
children: children
|
|
76
76
|
})]
|
|
77
77
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
78
|
-
className: _PromptChipModule.default.rightSection,
|
|
78
|
+
className: (0, _classify.classify)(_PromptChipModule.default.rightSection, classNames?.rightSlot),
|
|
79
79
|
children: [rightSlot ? rightSlot : null, !!showInfoIcon && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ConditionalWrapper.ConditionalWrapper, {
|
|
80
80
|
condition: infoIconTooltip && typeof infoIconTooltip === 'object' && Object.keys(infoIconTooltip).length > 0,
|
|
81
81
|
wrapper: children => /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.Tooltip, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Separator.d.ts","sourceRoot":"","sources":["../../../src/components/Separator/Separator.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"Separator.d.ts","sourceRoot":"","sources":["../../../src/components/Separator/Separator.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AASrD,KAAK,UAAU,GAAG,QAAQ,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC,CAAC;AAEH,eAAO,MAAM,WAAW;;;EAGtB,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC;AAE7E,MAAM,WAAW,cAAc;IAC7B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,SAAS,EAAE,IAAI,CAAC,iBAAiB,CAAC,cAAc,EAAE,cAAc,CAgC1E,CAAC"}
|
|
@@ -7,6 +7,7 @@ exports.Separator = exports.ORIENTATION = void 0;
|
|
|
7
7
|
var React = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _size = require("../../styles/variables/_size");
|
|
9
9
|
var _classify = _interopRequireDefault(require("../../utils/classify"));
|
|
10
|
+
var _qa = require("../../utils/qa");
|
|
10
11
|
var _SeparatorModule = _interopRequireDefault(require("./Separator.module.css"));
|
|
11
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
13
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -20,7 +21,8 @@ const Separator = exports.Separator = /*#__PURE__*/React.forwardRef((_ref, ref)
|
|
|
20
21
|
classNames,
|
|
21
22
|
orientation = ORIENTATION.vertical,
|
|
22
23
|
width,
|
|
23
|
-
height
|
|
24
|
+
height,
|
|
25
|
+
testId
|
|
24
26
|
} = _ref;
|
|
25
27
|
// Dynamically compute width and height based on orientation if not provided
|
|
26
28
|
const resolvedWidth = width || (orientation === ORIENTATION.vertical ? _size.size2 : 'auto');
|
|
@@ -31,7 +33,10 @@ const Separator = exports.Separator = /*#__PURE__*/React.forwardRef((_ref, ref)
|
|
|
31
33
|
};
|
|
32
34
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
33
35
|
ref: ref,
|
|
34
|
-
"data-testid":
|
|
36
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
37
|
+
base: testId,
|
|
38
|
+
slot: 'separator'
|
|
39
|
+
}),
|
|
35
40
|
style: style,
|
|
36
41
|
className: (0, _classify.default)(_SeparatorModule.default.wrapper, classNames?.wrapper)
|
|
37
42
|
});
|
|
@@ -24,9 +24,11 @@ export interface ShimmerProps {
|
|
|
24
24
|
height?: number | string;
|
|
25
25
|
borderRadius?: number | string;
|
|
26
26
|
children?: React.ReactNode;
|
|
27
|
+
testId?: string;
|
|
27
28
|
}
|
|
28
29
|
export interface ShimmerWrapperProps {
|
|
29
30
|
children?: React.ReactNode;
|
|
31
|
+
testId?: string;
|
|
30
32
|
}
|
|
31
33
|
/**
|
|
32
34
|
* Note(Nishant): ShimmerWrapper is a wrapper component for Shimmer component. This should only be used for Text based Shimmers
|
|
@@ -37,7 +39,7 @@ export interface ShimmerWrapperProps {
|
|
|
37
39
|
* This would ensure the layout remains same even when you toggle the shimmer to show your actual content
|
|
38
40
|
* @param {React.Node} children - The children to be rendered
|
|
39
41
|
*/
|
|
40
|
-
export declare const ShimmerWrapper: ({ children, }: ShimmerWrapperProps) => React.ReactElement<React.ComponentProps<"span">>;
|
|
42
|
+
export declare const ShimmerWrapper: ({ children, testId, }: ShimmerWrapperProps) => React.ReactElement<React.ComponentProps<"span">>;
|
|
41
43
|
export declare const Shimmer: Flow.AbstractComponent<ShimmerProps, HTMLSpanElement>;
|
|
42
44
|
type KPIShimmerClassNames = Readonly<{
|
|
43
45
|
wrapper?: string;
|
|
@@ -51,7 +53,8 @@ export interface KPIShimmerProps {
|
|
|
51
53
|
hasBottomContent?: boolean;
|
|
52
54
|
hasIcon?: boolean;
|
|
53
55
|
classNames?: KPIShimmerClassNames;
|
|
56
|
+
testId?: string;
|
|
54
57
|
}
|
|
55
|
-
export declare const KPIShimmer: ({ textWidth, hasBottomContent, hasIcon, hasTopContent, hasMiddleContent, classNames, }: KPIShimmerProps) => React.JSX.Element;
|
|
58
|
+
export declare const KPIShimmer: ({ textWidth, hasBottomContent, hasIcon, hasTopContent, hasMiddleContent, classNames, testId, }: KPIShimmerProps) => React.JSX.Element;
|
|
56
59
|
export {};
|
|
57
60
|
//# sourceMappingURL=Shimmer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Shimmer.d.ts","sourceRoot":"","sources":["../../../src/components/Shimmer/Shimmer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"Shimmer.d.ts","sourceRoot":"","sources":["../../../src/components/Shimmer/Shimmer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAgBrD,KAAK,UAAU,GAAG,QAAQ,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC,CAAC;AAEH,eAAO,MAAM,aAAa;;;;;EAKxB,CAAC;AAEH,eAAO,MAAM,iCAAiC;;;;;EAK5C,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC;AAE7E,MAAM,WAAW,YAAY;IAC3B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc,GAAI,uBAG5B,mBAAmB,KAAG,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAIvE,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,IAAI,CAAC,iBAAiB,CAAC,YAAY,EAAE,eAAe,CAmCvE,CAAC;AAEJ,KAAK,oBAAoB,GAAG,QAAQ,CAAC;IACnC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC,CAAC;AAEH,MAAM,WAAW,eAAe;IAC9B,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,oBAAoB,CAAC;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,UAAU,GAAI,gGAQxB,eAAe,sBA0CjB,CAAC"}
|
|
@@ -8,6 +8,7 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
8
8
|
var _border = require("../../styles/variables/_border");
|
|
9
9
|
var _size = require("../../styles/variables/_size");
|
|
10
10
|
var _classify = _interopRequireDefault(require("../../utils/classify"));
|
|
11
|
+
var _qa = require("../../utils/qa");
|
|
11
12
|
var _string = require("../../utils/string");
|
|
12
13
|
var _ShimmerModule = _interopRequireDefault(require("./Shimmer.module.css"));
|
|
13
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -36,9 +37,14 @@ const SHIMMER_TYPE_TO_BORDER_RADIUS_MAP = exports.SHIMMER_TYPE_TO_BORDER_RADIUS_
|
|
|
36
37
|
*/
|
|
37
38
|
const ShimmerWrapper = _ref => {
|
|
38
39
|
let {
|
|
39
|
-
children
|
|
40
|
+
children,
|
|
41
|
+
testId
|
|
40
42
|
} = _ref;
|
|
41
43
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
44
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
45
|
+
base: testId,
|
|
46
|
+
slot: 'wrapper'
|
|
47
|
+
}),
|
|
42
48
|
children: children
|
|
43
49
|
});
|
|
44
50
|
};
|
|
@@ -51,7 +57,8 @@ const Shimmer = exports.Shimmer = /*#__PURE__*/React.forwardRef((_ref2, ref) =>
|
|
|
51
57
|
children,
|
|
52
58
|
width = _size.size40,
|
|
53
59
|
height = _size.sizeFluid,
|
|
54
|
-
borderRadius
|
|
60
|
+
borderRadius,
|
|
61
|
+
testId
|
|
55
62
|
} = _ref2;
|
|
56
63
|
if (!show) {
|
|
57
64
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
@@ -61,7 +68,10 @@ const Shimmer = exports.Shimmer = /*#__PURE__*/React.forwardRef((_ref2, ref) =>
|
|
|
61
68
|
const borderRadiusValue = borderRadius ?? SHIMMER_TYPE_TO_BORDER_RADIUS_MAP[type];
|
|
62
69
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
63
70
|
ref: ref,
|
|
64
|
-
"data-testid":
|
|
71
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
72
|
+
base: testId,
|
|
73
|
+
slot: 'shimmer'
|
|
74
|
+
}),
|
|
65
75
|
className: (0, _classify.default)(_ShimmerModule.default.wrapper, _ShimmerModule.default[type], classNames?.wrapper),
|
|
66
76
|
style: {
|
|
67
77
|
'--width': (0, _string.appendPx)(width),
|
|
@@ -77,31 +87,52 @@ const KPIShimmer = _ref3 => {
|
|
|
77
87
|
hasIcon = true,
|
|
78
88
|
hasTopContent = true,
|
|
79
89
|
hasMiddleContent = true,
|
|
80
|
-
classNames
|
|
90
|
+
classNames,
|
|
91
|
+
testId
|
|
81
92
|
} = _ref3;
|
|
82
93
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
94
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
95
|
+
base: testId,
|
|
96
|
+
slot: 'kpiShimmer'
|
|
97
|
+
}),
|
|
83
98
|
className: (0, _classify.default)(_ShimmerModule.default.kpiBox, classNames?.wrapper),
|
|
84
99
|
children: [hasIcon && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
85
100
|
className: (0, _classify.default)(_ShimmerModule.default.section, _ShimmerModule.default.iconSection, classNames?.icon),
|
|
86
101
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Shimmer, {
|
|
87
102
|
type: "rounded",
|
|
88
103
|
width: 60,
|
|
89
|
-
height: 60
|
|
104
|
+
height: 60,
|
|
105
|
+
testId: (0, _qa.generateTestId)({
|
|
106
|
+
base: testId,
|
|
107
|
+
slot: 'iconShimmer'
|
|
108
|
+
})
|
|
90
109
|
})
|
|
91
110
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
92
111
|
className: (0, _classify.default)(_ShimmerModule.default.section, classNames?.text),
|
|
93
112
|
children: [hasTopContent && /*#__PURE__*/(0, _jsxRuntime.jsx)(Shimmer, {
|
|
94
113
|
type: "text",
|
|
95
114
|
width: textWidth,
|
|
96
|
-
height: 15
|
|
115
|
+
height: 15,
|
|
116
|
+
testId: (0, _qa.generateTestId)({
|
|
117
|
+
base: testId,
|
|
118
|
+
slot: 'topTextShimmer'
|
|
119
|
+
})
|
|
97
120
|
}), hasMiddleContent && /*#__PURE__*/(0, _jsxRuntime.jsx)(Shimmer, {
|
|
98
121
|
type: "text",
|
|
99
122
|
width: textWidth,
|
|
100
|
-
height: 25
|
|
123
|
+
height: 25,
|
|
124
|
+
testId: (0, _qa.generateTestId)({
|
|
125
|
+
base: testId,
|
|
126
|
+
slot: 'middleTextShimmer'
|
|
127
|
+
})
|
|
101
128
|
}), hasBottomContent && /*#__PURE__*/(0, _jsxRuntime.jsx)(Shimmer, {
|
|
102
129
|
type: "text",
|
|
103
130
|
width: textWidth,
|
|
104
|
-
height: 15
|
|
131
|
+
height: 15,
|
|
132
|
+
testId: (0, _qa.generateTestId)({
|
|
133
|
+
base: testId,
|
|
134
|
+
slot: 'bottomTextShimmer'
|
|
135
|
+
})
|
|
105
136
|
})]
|
|
106
137
|
})]
|
|
107
138
|
});
|
|
@@ -19,6 +19,7 @@ export interface StatusIndicatorProps {
|
|
|
19
19
|
withBorder?: boolean;
|
|
20
20
|
borderColorToken?: keyof typeof COLORS;
|
|
21
21
|
disabled?: boolean;
|
|
22
|
+
testId?: string;
|
|
22
23
|
}
|
|
23
24
|
export declare const StatusIndicator: Flow.AbstractComponent<StatusIndicatorProps, HTMLDivElement>;
|
|
24
25
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusIndicator.d.ts","sourceRoot":"","sources":["../../../src/components/StatusIndicator/StatusIndicator.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAErD,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"StatusIndicator.d.ts","sourceRoot":"","sources":["../../../src/components/StatusIndicator/StatusIndicator.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAErD,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AAOtD,KAAK,UAAU,GAAG,QAAQ,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC,CAAC;AAEH,eAAO,MAAM,eAAe;;;;;;;;EAQ1B,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAC5B,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,OAAO,eAAe,CAAC,CAAC;AAEzD,MAAM,WAAW,oBAAoB;IACnC,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,OAAO,MAAM,CAAC;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,eAAe,EAAE,IAAI,CAAC,iBAAiB,CAClD,oBAAoB,EACpB,cAAc,CAiCf,CAAC"}
|
|
@@ -7,6 +7,7 @@ exports.StatusIndicator = exports.STATUS_SEMANTIC = void 0;
|
|
|
7
7
|
var React = _interopRequireWildcard(require("react"));
|
|
8
8
|
var COLORS = _interopRequireWildcard(require("../../styles/variables/_color"));
|
|
9
9
|
var _classify = _interopRequireDefault(require("../../utils/classify"));
|
|
10
|
+
var _qa = require("../../utils/qa");
|
|
10
11
|
var _StatusIndicatorModule = _interopRequireDefault(require("./StatusIndicator.module.css"));
|
|
11
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
13
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -27,11 +28,15 @@ const StatusIndicator = exports.StatusIndicator = /*#__PURE__*/React.forwardRef(
|
|
|
27
28
|
withBorder,
|
|
28
29
|
borderColorToken = 'colorBackgroundTertiary',
|
|
29
30
|
disabled,
|
|
31
|
+
testId,
|
|
30
32
|
...props
|
|
31
33
|
} = _ref;
|
|
32
34
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
33
35
|
...props,
|
|
34
|
-
"data-testid":
|
|
36
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
37
|
+
base: testId,
|
|
38
|
+
slot: 'indicator'
|
|
39
|
+
}),
|
|
35
40
|
className: (0, _classify.default)(_StatusIndicatorModule.default.statusWrapper, _StatusIndicatorModule.default[status], {
|
|
36
41
|
[_StatusIndicatorModule.default.withBorder]: withBorder,
|
|
37
42
|
[_StatusIndicatorModule.default.disabled]: disabled
|
|
@@ -4,12 +4,14 @@ export interface StickyBarProps {
|
|
|
4
4
|
className?: string;
|
|
5
5
|
children: React.ReactNode;
|
|
6
6
|
position?: 'top' | 'bottom';
|
|
7
|
+
testId?: string;
|
|
7
8
|
}
|
|
8
9
|
export interface StickyBarChildProps {
|
|
9
10
|
className?: string;
|
|
10
11
|
children: React.ReactNode;
|
|
12
|
+
testId?: string;
|
|
11
13
|
}
|
|
12
|
-
export declare const StickyBarLeftSlot: ({ className, children, ...props }: StickyBarChildProps) => React.JSX.Element;
|
|
13
|
-
export declare const StickyBarRightSlot: ({ className, children, ...props }: StickyBarChildProps) => React.JSX.Element;
|
|
14
|
+
export declare const StickyBarLeftSlot: ({ className, children, testId, ...props }: StickyBarChildProps) => React.JSX.Element;
|
|
15
|
+
export declare const StickyBarRightSlot: ({ className, children, testId, ...props }: StickyBarChildProps) => React.JSX.Element;
|
|
14
16
|
export declare const StickyBar: Flow.AbstractComponent<StickyBarProps, HTMLDivElement>;
|
|
15
17
|
//# sourceMappingURL=StickyBar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StickyBar.d.ts","sourceRoot":"","sources":["../../../src/components/StickyBar/StickyBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"StickyBar.d.ts","sourceRoot":"","sources":["../../../src/components/StickyBar/StickyBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAQrD,MAAM,WAAW,cAAc;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,QAAQ,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,iBAAiB,GAAI,2CAK/B,mBAAmB,sBAQrB,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,2CAKhC,mBAAmB,sBAQrB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,IAAI,CAAC,iBAAiB,CAAC,cAAc,EAAE,cAAc,CA4B1E,CAAC"}
|