@povio/ui 3.3.0-rc.1 → 3.3.0-rc.2

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.
@@ -1,5 +1,7 @@
1
1
  import { CloseIcon } from "../../../assets/icons/Close.js";
2
+ import { UIOverrides } from "../../../config/uiOverrides.context.js";
2
3
  import { UIConfig } from "../../../config/uiConfig.context.js";
4
+ import { buttonIconSizeDefinition } from "../../buttons/Button/button.cva.js";
3
5
  import { InlineIconButton } from "../../buttons/InlineIconButton/InlineIconButton.js";
4
6
  import "../../../config/i18n.js";
5
7
  import { c } from "react/compiler-runtime";
@@ -8,56 +10,70 @@ import { clsx } from "clsx";
8
10
  import { useTranslation } from "react-i18next";
9
11
  //#region src/components/inputs/shared/InputClear.tsx
10
12
  var InputClear = (t0) => {
11
- const $ = c(12);
13
+ const $ = c(16);
12
14
  const { onClear, className, style, show, renderStatic } = t0;
13
- const alwaysShowClear = UIConfig.useConfig().input.alwaysShowClear;
15
+ const ui = UIConfig.useConfig();
16
+ const buttonIconSizeCva = UIOverrides.useCva("button.iconSize", buttonIconSizeDefinition);
17
+ const alwaysShowClear = ui.input.alwaysShowClear;
14
18
  let clearClassName;
15
19
  let t1;
16
- if ($[0] !== alwaysShowClear || $[1] !== className || $[2] !== renderStatic || $[3] !== show || $[4] !== style) {
20
+ if ($[0] !== alwaysShowClear || $[1] !== buttonIconSizeCva || $[2] !== className || $[3] !== renderStatic || $[4] !== show || $[5] !== style) {
17
21
  t1 = Symbol.for("react.early_return_sentinel");
18
22
  bb0: {
19
23
  clearClassName = clsx("relative z-raised flex items-center", !alwaysShowClear && "md:invisible group-focus-within:visible group-hover/date-picker-content:visible group-hover/select-content:visible group-hover/text-area:visible group-hover:visible", "border-0!", !show && "invisible!", className);
20
24
  if (renderStatic) {
21
- let t2;
22
- if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
23
- t2 = /* @__PURE__ */ jsx(CloseIcon, { className: "h-6 w-6 shrink-0" });
24
- $[7] = t2;
25
- } else t2 = $[7];
25
+ const t2 = clsx("group inline-flex items-center justify-center border border-solid border-support-transparent-outline", "rounded-button-rounding-s p-0 text-interactive-text-secondary-idle", clearClassName);
26
+ let t3;
27
+ if ($[8] !== buttonIconSizeCva) {
28
+ t3 = buttonIconSizeCva({
29
+ size: "none",
30
+ className: "shrink-0"
31
+ });
32
+ $[8] = buttonIconSizeCva;
33
+ $[9] = t3;
34
+ } else t3 = $[9];
35
+ let t4;
36
+ if ($[10] !== t3) {
37
+ t4 = /* @__PURE__ */ jsx(CloseIcon, { className: t3 });
38
+ $[10] = t3;
39
+ $[11] = t4;
40
+ } else t4 = $[11];
26
41
  t1 = /* @__PURE__ */ jsx("button", {
27
42
  type: "button",
28
43
  "aria-hidden": "true",
29
44
  tabIndex: -1,
30
- className: clsx("group inline-flex items-center justify-center border border-solid border-support-transparent-outline", "rounded-button-rounding-s p-0 text-interactive-text-secondary-idle", clearClassName),
45
+ className: t2,
31
46
  style,
32
- children: t2
47
+ children: t4
33
48
  });
34
49
  break bb0;
35
50
  }
36
51
  }
37
52
  $[0] = alwaysShowClear;
38
- $[1] = className;
39
- $[2] = renderStatic;
40
- $[3] = show;
41
- $[4] = style;
42
- $[5] = clearClassName;
43
- $[6] = t1;
53
+ $[1] = buttonIconSizeCva;
54
+ $[2] = className;
55
+ $[3] = renderStatic;
56
+ $[4] = show;
57
+ $[5] = style;
58
+ $[6] = clearClassName;
59
+ $[7] = t1;
44
60
  } else {
45
- clearClassName = $[5];
46
- t1 = $[6];
61
+ clearClassName = $[6];
62
+ t1 = $[7];
47
63
  }
48
64
  if (t1 !== Symbol.for("react.early_return_sentinel")) return t1;
49
65
  let t2;
50
- if ($[8] !== clearClassName || $[9] !== onClear || $[10] !== style) {
66
+ if ($[12] !== clearClassName || $[13] !== onClear || $[14] !== style) {
51
67
  t2 = /* @__PURE__ */ jsx(InputClearButton, {
52
68
  onClear,
53
69
  className: clearClassName,
54
70
  style
55
71
  });
56
- $[8] = clearClassName;
57
- $[9] = onClear;
58
- $[10] = style;
59
- $[11] = t2;
60
- } else t2 = $[11];
72
+ $[12] = clearClassName;
73
+ $[13] = onClear;
74
+ $[14] = style;
75
+ $[15] = t2;
76
+ } else t2 = $[15];
61
77
  return t2;
62
78
  };
63
79
  var InputClearButton = (t0) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@povio/ui",
3
- "version": "3.3.0-rc.1",
3
+ "version": "3.3.0-rc.2",
4
4
  "type": "module",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",