@keboola/design 6.0.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.
@@ -1043,13 +1043,14 @@ var init_Clipboard2 = __esm({
1043
1043
  init_Clipboard();
1044
1044
  }
1045
1045
  });
1046
- var DEFAULT_ICON, ClipboardButton;
1046
+ var DEFAULT_ICON, DEFAULT_ARIA_LABEL, ClipboardButton;
1047
1047
  var init_ClipboardButton = __esm({
1048
1048
  "src/blocks/ClipboardButton/ClipboardButton.tsx"() {
1049
1049
  init_Button2();
1050
1050
  init_Clipboard2();
1051
1051
  init_icons();
1052
1052
  DEFAULT_ICON = /* @__PURE__ */ jsx(icons_exports.Copy, {});
1053
+ DEFAULT_ARIA_LABEL = "Copy";
1053
1054
  ClipboardButton = ({
1054
1055
  // clipboard props
1055
1056
  text,
@@ -1061,20 +1062,24 @@ var init_ClipboardButton = __esm({
1061
1062
  variant = "outline",
1062
1063
  children,
1063
1064
  ...rest
1064
- }) => /* @__PURE__ */ jsx(
1065
- Clipboard,
1066
- {
1067
- asChild: true,
1068
- tooltip,
1069
- tooltipPlacement,
1070
- tooltipVariant,
1071
- text,
1072
- children: /* @__PURE__ */ jsxs(Button, { ...rest, variant, disabled: !text, children: [
1073
- icon,
1074
- children
1075
- ] })
1076
- }
1077
- );
1065
+ }) => {
1066
+ const defaultAriaLabel = typeof tooltip === "string" && tooltip.trim() ? tooltip : DEFAULT_ARIA_LABEL;
1067
+ const ariaLabel = rest["aria-label"] ?? (children == null ? defaultAriaLabel : void 0);
1068
+ return /* @__PURE__ */ jsx(
1069
+ Clipboard,
1070
+ {
1071
+ asChild: true,
1072
+ tooltip,
1073
+ tooltipPlacement,
1074
+ tooltipVariant,
1075
+ text,
1076
+ children: /* @__PURE__ */ jsxs(Button, { ...rest, "aria-label": ariaLabel, variant, disabled: !text, children: [
1077
+ icon,
1078
+ children
1079
+ ] })
1080
+ }
1081
+ );
1082
+ };
1078
1083
  }
1079
1084
  });
1080
1085