@kaio-xyz/design-system 1.1.21 → 1.1.24

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/index.d.ts CHANGED
@@ -160,24 +160,28 @@ declare const Checkbox: {
160
160
 
161
161
  type ClipboardProps = {
162
162
  value: string;
163
+ dataTest: string;
163
164
  trim?: boolean;
164
165
  trimLength?: number;
165
166
  };
166
- declare const Clipboard: ({ value, trim, trimLength }: ClipboardProps) => react_jsx_runtime.JSX.Element;
167
+ declare const Clipboard: ({ value, dataTest, trim, trimLength }: ClipboardProps) => react_jsx_runtime.JSX.Element;
167
168
 
168
169
  type StepperProps = {
169
170
  children: ReactNode;
171
+ className?: string;
172
+ dataTest?: string;
170
173
  };
171
- declare const Stepper: ({ children }: StepperProps) => react_jsx_runtime.JSX.Element;
174
+ declare const Stepper: ({ children, dataTest, className }: StepperProps) => react_jsx_runtime.JSX.Element;
172
175
 
173
176
  type StepProps = {
174
177
  label: string;
178
+ dataTest: string;
175
179
  isCompleted?: boolean;
176
180
  isCurrent?: boolean;
177
181
  iconSize?: number;
178
182
  key?: string;
179
183
  };
180
- declare const Step: ({ key, label, iconSize, isCompleted, isCurrent }: StepProps) => react_jsx_runtime.JSX.Element;
184
+ declare const Step: ({ key, label, dataTest, iconSize, isCompleted, isCurrent, }: StepProps) => react_jsx_runtime.JSX.Element;
181
185
 
182
186
  type ListProps = {
183
187
  label?: string;
@@ -186,7 +190,7 @@ type ListProps = {
186
190
  declare const List: ({ label, children }: ListProps) => react_jsx_runtime.JSX.Element;
187
191
 
188
192
  type ListItem = {
189
- value?: string;
193
+ value?: ReactNode;
190
194
  label: string;
191
195
  key?: string;
192
196
  };
package/dist/index.esm.js CHANGED
@@ -525,10 +525,9 @@ var trimString = function (str, noOfChars) {
525
525
  return "".concat(str.slice(0, noOfChars), "...").concat(str.slice(-noOfChars));
526
526
  };
527
527
  var Clipboard = function (_a) {
528
- var value = _a.value, _b = _a.trim, trim = _b === void 0 ? false : _b, _c = _a.trimLength, trimLength = _c === void 0 ? 4 : _c;
528
+ var value = _a.value, dataTest = _a.dataTest, _b = _a.trim, trim = _b === void 0 ? false : _b, _c = _a.trimLength, trimLength = _c === void 0 ? 4 : _c;
529
529
  var _d = useState(false), isCopied = _d[0], setIsCopied = _d[1];
530
530
  var _e = useState(false), isShowingCopy = _e[0], setIsShowingCopy = _e[1];
531
- var _f = useState(false); _f[0]; _f[1];
532
531
  var displayValue = trim ? trimString(value, trimLength) : value;
533
532
  var handleClick = useCallback(function () {
534
533
  navigator.clipboard.writeText(value);
@@ -540,20 +539,20 @@ var Clipboard = function (_a) {
540
539
  }, [value]);
541
540
  var text = isShowingCopy ? 'Copied!' : displayValue;
542
541
  var icon = isShowingCopy ? jsx(SvgCheck, {}) : jsx(SvgClipboard, {});
543
- return (jsx("button", { type: "button", onClick: handleClick, className: style$f.root, "data-is-copied": isCopied, "data-is-showing-copy": isShowingCopy, children: jsxs(Stack, { position: "horizontal", children: [jsx("span", { children: text }), icon] }) }));
542
+ return (jsx("button", { type: "button", onClick: handleClick, className: style$f.root, "data-is-copied": isCopied, "data-is-showing-copy": isShowingCopy, "data-test": dataTest, children: jsxs(Stack, { position: "horizontal", children: [jsx("span", { children: text }), icon] }) }));
544
543
  };
545
544
 
546
545
  var style$e = {"root":"stepper-module__root__hgDss"};
547
546
 
548
547
  var Stepper = function (_a) {
549
- var children = _a.children;
550
- return (jsx("ul", { className: style$e.root, children: children }));
548
+ var children = _a.children, dataTest = _a.dataTest, className = _a.className;
549
+ return (jsx("ul", { className: clsx(style$e.root, className), "data-test": dataTest, children: children }));
551
550
  };
552
551
 
553
552
  var style$d = {"root":"step-module__root__Tk1Yq","container":"step-module__container__XbQSB","label":"step-module__label__UNF3I","emptyIcon":"step-module__emptyIcon__-xNcB","checkIcon":"step-module__checkIcon__MWBUM","loadingIcon":"step-module__loadingIcon__-VoCZ"};
554
553
 
555
554
  var Step = function (_a) {
556
- var key = _a.key, label = _a.label, _b = _a.iconSize, iconSize = _b === void 0 ? 16 : _b, _c = _a.isCompleted, isCompleted = _c === void 0 ? false : _c, _d = _a.isCurrent, isCurrent = _d === void 0 ? false : _d;
555
+ var key = _a.key, label = _a.label, dataTest = _a.dataTest, _b = _a.iconSize, iconSize = _b === void 0 ? 16 : _b, _c = _a.isCompleted, isCompleted = _c === void 0 ? false : _c, _d = _a.isCurrent, isCurrent = _d === void 0 ? false : _d;
557
556
  var icon = useMemo(function () {
558
557
  switch (true) {
559
558
  case isCompleted: return jsx(SvgCheck, { className: style$d.checkIcon });
@@ -561,7 +560,7 @@ var Step = function (_a) {
561
560
  default: return jsx("span", { className: style$d.emptyIcon });
562
561
  }
563
562
  }, [isCompleted, isCurrent]);
564
- return (jsx("li", { className: style$d.root, "data-is-current": isCurrent, style: { '--icon-size': "".concat(iconSize, "px") }, children: jsxs(Stack, { className: style$d.container, position: "horizontal", children: [icon, jsx("span", { className: style$d.label, children: label })] }) }, key));
563
+ return (jsx("li", { className: style$d.root, "data-is-current": isCurrent, "data-test": dataTest, style: { '--icon-size': "".concat(iconSize, "px") }, children: jsxs(Stack, { className: style$d.container, position: "horizontal", children: [icon, jsx("span", { className: style$d.label, children: label })] }) }, key));
565
564
  };
566
565
 
567
566
  var style$c = {"root":"list-module__root__OXx93"};