@keboola/design 5.1.0 → 6.1.0

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/editors.js CHANGED
@@ -298,14 +298,13 @@ var helpVariants = cva(["tw-m-0", "tw-text-xs"], {
298
298
  variants: {
299
299
  state: {
300
300
  default: ["tw-text-muted-foreground"],
301
- error: ["tw-text-destructive"],
302
301
  warning: ["tw-text-warning"]
303
302
  }
304
303
  }
305
304
  });
306
- var HelpBlock = ({ children, className, state = "default", testId }) => {
305
+ var HelpBlock = ({ children, className, state = "default", ...rest }) => {
307
306
  if (!children) return null;
308
- return /* @__PURE__ */ jsx("p", { "data-testid": testId, className: helpVariants({ state, className }), children });
307
+ return /* @__PURE__ */ jsx("p", { ...rest, className: helpVariants({ state, className }), children });
309
308
  };
310
309
 
311
310
  // src/icons/index.ts
@@ -345,11 +344,12 @@ var variants = cva(
345
344
  "tw-items-center",
346
345
  "tw-justify-center",
347
346
  "tw-gap-2",
348
- // text
347
+ // text — chrome weight/tracking are brand-overridable tokens
348
+ // (`--font-weight-medium` / `--letter-spacing-chrome`); casing stays `tw-uppercase`.
349
349
  "tw-text-xs",
350
350
  "tw-leading-5",
351
351
  "tw-font-medium",
352
- "tw-tracking-[1px]",
352
+ "tw-tracking-chrome",
353
353
  "tw-uppercase",
354
354
  // border — legacy (non-argo) chrome uses a fixed radius, not the brand token.
355
355
  "tw-rounded",
@@ -724,6 +724,7 @@ var Clipboard = ({
724
724
  ] });
725
725
  };
726
726
  var DEFAULT_ICON = /* @__PURE__ */ jsx(icons_exports.Copy, {});
727
+ var DEFAULT_ARIA_LABEL = "Copy";
727
728
  var ClipboardButton = ({
728
729
  // clipboard props
729
730
  text,
@@ -735,20 +736,24 @@ var ClipboardButton = ({
735
736
  variant = "outline",
736
737
  children,
737
738
  ...rest
738
- }) => /* @__PURE__ */ jsx(
739
- Clipboard,
740
- {
741
- asChild: true,
742
- tooltip,
743
- tooltipPlacement,
744
- tooltipVariant,
745
- text,
746
- children: /* @__PURE__ */ jsxs(Button, { ...rest, variant, disabled: !text, children: [
747
- icon,
748
- children
749
- ] })
750
- }
751
- );
739
+ }) => {
740
+ const defaultAriaLabel = typeof tooltip === "string" && tooltip.trim() ? tooltip : DEFAULT_ARIA_LABEL;
741
+ const ariaLabel = rest["aria-label"] ?? (children == null ? defaultAriaLabel : void 0);
742
+ return /* @__PURE__ */ jsx(
743
+ Clipboard,
744
+ {
745
+ asChild: true,
746
+ tooltip,
747
+ tooltipPlacement,
748
+ tooltipVariant,
749
+ text,
750
+ children: /* @__PURE__ */ jsxs(Button, { ...rest, "aria-label": ariaLabel, variant, disabled: !text, children: [
751
+ icon,
752
+ children
753
+ ] })
754
+ }
755
+ );
756
+ };
752
757
  var ButtonToolbar = ({ value, children }) => {
753
758
  if (!value && !children) return null;
754
759
  return /* @__PURE__ */ jsxs("div", { className: "tw-pointer-events-auto tw-ml-auto tw-mr-4 tw-flex tw-w-fit tw-gap-1 tw-overflow-visible tw-rounded-lg tw-border tw-border-solid tw-border-border !tw-bg-background tw-p-[3px] tw-shadow", children: [