@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.
@@ -1072,13 +1072,14 @@ var init_Clipboard2 = __esm({
1072
1072
  init_Clipboard();
1073
1073
  }
1074
1074
  });
1075
- var DEFAULT_ICON, ClipboardButton;
1075
+ var DEFAULT_ICON, DEFAULT_ARIA_LABEL, ClipboardButton;
1076
1076
  var init_ClipboardButton = __esm({
1077
1077
  "src/blocks/ClipboardButton/ClipboardButton.tsx"() {
1078
1078
  init_Button2();
1079
1079
  init_Clipboard2();
1080
1080
  init_icons();
1081
1081
  DEFAULT_ICON = /* @__PURE__ */ jsxRuntime.jsx(icons_exports.Copy, {});
1082
+ DEFAULT_ARIA_LABEL = "Copy";
1082
1083
  ClipboardButton = ({
1083
1084
  // clipboard props
1084
1085
  text,
@@ -1090,20 +1091,24 @@ var init_ClipboardButton = __esm({
1090
1091
  variant = "outline",
1091
1092
  children,
1092
1093
  ...rest
1093
- }) => /* @__PURE__ */ jsxRuntime.jsx(
1094
- Clipboard,
1095
- {
1096
- asChild: true,
1097
- tooltip,
1098
- tooltipPlacement,
1099
- tooltipVariant,
1100
- text,
1101
- children: /* @__PURE__ */ jsxRuntime.jsxs(Button, { ...rest, variant, disabled: !text, children: [
1102
- icon,
1103
- children
1104
- ] })
1105
- }
1106
- );
1094
+ }) => {
1095
+ const defaultAriaLabel = typeof tooltip === "string" && tooltip.trim() ? tooltip : DEFAULT_ARIA_LABEL;
1096
+ const ariaLabel = rest["aria-label"] ?? (children == null ? defaultAriaLabel : void 0);
1097
+ return /* @__PURE__ */ jsxRuntime.jsx(
1098
+ Clipboard,
1099
+ {
1100
+ asChild: true,
1101
+ tooltip,
1102
+ tooltipPlacement,
1103
+ tooltipVariant,
1104
+ text,
1105
+ children: /* @__PURE__ */ jsxRuntime.jsxs(Button, { ...rest, "aria-label": ariaLabel, variant, disabled: !text, children: [
1106
+ icon,
1107
+ children
1108
+ ] })
1109
+ }
1110
+ );
1111
+ };
1107
1112
  }
1108
1113
  });
1109
1114
 
@@ -2971,8 +2976,8 @@ var AlignmentDropdown = ({
2971
2976
  {
2972
2977
  type: "button",
2973
2978
  className: cn(
2974
- "tw-flex tw-h-7 tw-cursor-pointer tw-items-center tw-gap-1 tw-rounded tw-border-0 tw-bg-transparent tw-px-1.5 tw-text-xs tw-text-neutral-600",
2975
- "hover:tw-bg-neutral-100"
2979
+ "tw-flex tw-h-7 tw-cursor-pointer tw-items-center tw-gap-1 tw-rounded tw-border-0 tw-bg-transparent tw-px-1.5 tw-text-xs tw-text-muted-foreground",
2980
+ "hover:tw-bg-accent"
2976
2981
  ),
2977
2982
  children: [
2978
2983
  /* @__PURE__ */ jsxRuntime.jsx(CurrentAlignmentIcon, { className: "tw-size-4" }),
@@ -3057,8 +3062,8 @@ var BlockTypeDropdown = ({
3057
3062
  {
3058
3063
  type: "button",
3059
3064
  className: cn(
3060
- "tw-flex tw-h-7 tw-cursor-pointer tw-items-center tw-gap-1.5 tw-rounded tw-border-0 tw-bg-transparent tw-px-1.5 tw-text-xs tw-text-neutral-600",
3061
- "hover:tw-bg-neutral-100"
3065
+ "tw-flex tw-h-7 tw-cursor-pointer tw-items-center tw-gap-1.5 tw-rounded tw-border-0 tw-bg-transparent tw-px-1.5 tw-text-xs tw-text-muted-foreground",
3066
+ "hover:tw-bg-accent"
3062
3067
  ),
3063
3068
  children: [
3064
3069
  /* @__PURE__ */ jsxRuntime.jsx(CurrentBlockIcon, { className: "tw-size-4" }),
@@ -4110,8 +4115,8 @@ var ToolbarButton = ({
4110
4115
  disabled,
4111
4116
  onClick,
4112
4117
  className: cn(
4113
- "tw-flex tw-h-7 tw-min-w-7 tw-cursor-pointer tw-items-center tw-justify-center tw-rounded tw-border-0 tw-bg-transparent tw-px-1 tw-text-xs tw-text-neutral-600",
4114
- "hover:tw-bg-neutral-100 disabled:tw-cursor-not-allowed disabled:tw-opacity-30",
4118
+ "tw-flex tw-h-7 tw-min-w-7 tw-cursor-pointer tw-items-center tw-justify-center tw-rounded tw-border-0 tw-bg-transparent tw-px-1 tw-text-xs tw-text-muted-foreground",
4119
+ "hover:tw-bg-accent disabled:tw-cursor-not-allowed disabled:tw-opacity-30",
4115
4120
  active && "tw-bg-secondary-100 tw-text-secondary-500",
4116
4121
  extraClassName
4117
4122
  ),
@@ -4194,7 +4199,7 @@ var LinkPanel = ({ editor, isLink }) => {
4194
4199
  "div",
4195
4200
  {
4196
4201
  ref: panelRef,
4197
- className: "tw-absolute tw-left-0 tw-top-full tw-z-50 tw-mt-1 tw-w-80 tw-rounded-md tw-border tw-border-neutral-200 tw-bg-white tw-p-3 tw-shadow-lg",
4202
+ className: "tw-absolute tw-left-0 tw-top-full tw-z-50 tw-mt-1 tw-w-80 tw-rounded-md tw-border tw-border-border tw-bg-popover tw-text-popover-foreground tw-p-3 tw-shadow-lg",
4198
4203
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tw-flex tw-flex-col tw-gap-2", children: [
4199
4204
  /* @__PURE__ */ jsxRuntime.jsxs(FormGroup, { children: [
4200
4205
  /* @__PURE__ */ jsxRuntime.jsx(Label2, { htmlFor: "link-label", className: "tw-mb-1 tw-text-xs", children: "Label" }),
@@ -4234,7 +4239,7 @@ var LinkPanel = ({ editor, isLink }) => {
4234
4239
  )
4235
4240
  ] });
4236
4241
  };
4237
- var ToolbarDivider = () => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tw-mx-0.5 tw-h-5 tw-w-px tw-bg-neutral-200" });
4242
+ var ToolbarDivider = () => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tw-mx-0.5 tw-h-5 tw-w-px tw-bg-border" });
4238
4243
  var ELEMENT_FORMAT_TYPES = ["left", "center", "right", "justify", "start", "end", ""];
4239
4244
  var isElementFormatType = (value) => ELEMENT_FORMAT_TYPES.includes(value);
4240
4245
  var toElementFormatType = (value) => isElementFormatType(value) ? value : "left";
@@ -4343,7 +4348,7 @@ var ToolbarPlugin = () => {
4343
4348
  "aria-label": "Formatting options",
4344
4349
  onMouseDown: (e) => e.preventDefault(),
4345
4350
  style: { top: position.top, left: position.left },
4346
- className: "tw-absolute tw-z-[1060] tw-flex tw--translate-y-full tw-items-center tw-gap-0.5 tw-rounded-lg tw-border tw-border-neutral-200 tw-bg-white tw-px-1.5 tw-py-1 tw-shadow-lg",
4351
+ className: "tw-absolute tw-z-[1060] tw-flex tw--translate-y-full tw-items-center tw-gap-0.5 tw-rounded-lg tw-border tw-border-border tw-bg-popover tw-text-popover-foreground tw-px-1.5 tw-py-1 tw-shadow-lg",
4347
4352
  children: [
4348
4353
  /* @__PURE__ */ jsxRuntime.jsx(BlockTypeDropdown, { editor, blockType }),
4349
4354
  /* @__PURE__ */ jsxRuntime.jsx(ToolbarDivider, {}),