@keboola/design 6.0.0 → 6.2.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/COMPONENT-API.md CHANGED
@@ -388,9 +388,11 @@ _No own props — see note above for passthrough attributes._
388
388
 
389
389
  Source: `src/components/Card/CardTitle.tsx`
390
390
 
391
- > Native `<div>` attributes only.
391
+ > Renders a heading (`as`, default `h3`); accepts native heading attributes, not `<div>` attributes.
392
392
 
393
- _No own props — see note above for passthrough attributes._
393
+ | Prop | Type | Required | Default | Description |
394
+ | ---- | -------------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
395
+ | `as` | `HeadingLevel` | no | — | Heading tag to render. Defaults to `h3`; set explicitly to avoid a heading-order skip (e.g. `as="h2"` when the Card sits directly under a page's `h1`). |
394
396
 
395
397
  ### `Card.Content`
396
398
 
package/dist/editors.cjs CHANGED
@@ -750,6 +750,7 @@ var Clipboard = ({
750
750
  ] });
751
751
  };
752
752
  var DEFAULT_ICON = /* @__PURE__ */ jsxRuntime.jsx(icons_exports.Copy, {});
753
+ var DEFAULT_ARIA_LABEL = "Copy";
753
754
  var ClipboardButton = ({
754
755
  // clipboard props
755
756
  text,
@@ -761,20 +762,24 @@ var ClipboardButton = ({
761
762
  variant = "outline",
762
763
  children,
763
764
  ...rest
764
- }) => /* @__PURE__ */ jsxRuntime.jsx(
765
- Clipboard,
766
- {
767
- asChild: true,
768
- tooltip,
769
- tooltipPlacement,
770
- tooltipVariant,
771
- text,
772
- children: /* @__PURE__ */ jsxRuntime.jsxs(Button, { ...rest, variant, disabled: !text, children: [
773
- icon,
774
- children
775
- ] })
776
- }
777
- );
765
+ }) => {
766
+ const defaultAriaLabel = typeof tooltip === "string" && tooltip.trim() ? tooltip : DEFAULT_ARIA_LABEL;
767
+ const ariaLabel = rest["aria-label"] ?? (children == null ? defaultAriaLabel : void 0);
768
+ return /* @__PURE__ */ jsxRuntime.jsx(
769
+ Clipboard,
770
+ {
771
+ asChild: true,
772
+ tooltip,
773
+ tooltipPlacement,
774
+ tooltipVariant,
775
+ text,
776
+ children: /* @__PURE__ */ jsxRuntime.jsxs(Button, { ...rest, "aria-label": ariaLabel, variant, disabled: !text, children: [
777
+ icon,
778
+ children
779
+ ] })
780
+ }
781
+ );
782
+ };
778
783
  var ButtonToolbar = ({ value, children }) => {
779
784
  if (!value && !children) return null;
780
785
  return /* @__PURE__ */ jsxRuntime.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: [