asma-ui-core 3.101.0 → 3.101.1

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,8 +1,7 @@
1
- import { cn as u } from "../../../../helpers/cn.js";
2
- import { jsx as d, jsxs as x } from "react/jsx-runtime";
3
- var g = ({ dataTest: a, options: c, value: t, title: n, size: i = "medium", valueKey: o = "value", labelKey: m = "label", renderLabel: r }) => {
4
- const s = (e) => typeof e == "object" ? e?.[o] : e, f = (e) => typeof e == "object" ? e?.[m]?.toString() ?? "" : e?.toString() ?? "", l = t == null ? null : c.find((e) => s(e) === s(t)) ?? t;
5
- return /* @__PURE__ */ x("div", {
1
+ import { jsx as d, jsxs as u } from "react/jsx-runtime";
2
+ var m = ({ dataTest: a, options: c, value: t, title: n, valueKey: i = "value", labelKey: o = "label", renderLabel: r }) => {
3
+ const s = (e) => typeof e == "object" ? e?.[i] : e, f = (e) => typeof e == "object" ? e?.[o]?.toString() ?? "" : e?.toString() ?? "", l = t == null ? null : c.find((e) => s(e) === s(t)) ?? t;
4
+ return /* @__PURE__ */ u("div", {
6
5
  "data-testid": `${a}-read-only`,
7
6
  className: "flex flex-col gap-y-1",
8
7
  children: [n && /* @__PURE__ */ d("span", {
@@ -10,11 +9,11 @@ var g = ({ dataTest: a, options: c, value: t, title: n, size: i = "medium", valu
10
9
  children: n
11
10
  }), /* @__PURE__ */ d("div", {
12
11
  "data-testid": `${a}-read-only-value`,
13
- className: u("text-delta-700", i === "small" ? "text-sm/5" : "text-base/6"),
12
+ className: "text-base/6 text-delta-700",
14
13
  children: l === null ? "-" : r ? r(l) : f(l)
15
14
  })]
16
15
  });
17
16
  };
18
17
  export {
19
- g as DynamicSelectReadOnlyValue
18
+ m as DynamicSelectReadOnlyValue
20
19
  };
@@ -1,5 +1,5 @@
1
1
  import { DynamicSelectOption, StyledDynamicSelectProps } from '../types';
2
- type DynamicSelectReadOnlyValueProps<TOption extends DynamicSelectOption> = Pick<StyledDynamicSelectProps<TOption>, 'dataTest' | 'options' | 'title' | 'size' | 'valueKey' | 'labelKey' | 'renderLabel'> & {
2
+ type DynamicSelectReadOnlyValueProps<TOption extends DynamicSelectOption> = Pick<StyledDynamicSelectProps<TOption>, 'dataTest' | 'options' | 'title' | 'valueKey' | 'labelKey' | 'renderLabel'> & {
3
3
  value: TOption | null;
4
4
  };
5
5
  /**
@@ -7,8 +7,9 @@ type DynamicSelectReadOnlyValueProps<TOption extends DynamicSelectOption> = Pick
7
7
  * input field, no helper/error row (there is nothing to validate). Applies whatever the option
8
8
  * count, so the ≤5 chip variant and the 6+ autocomplete variant read the same.
9
9
  *
10
- * Text = Body Base 16/24 `text-icon/body` (delta-700); 14/20 at `size='small'`. No value → `-`, the
11
- * same placeholder the chip variant shows. Multiple selects never reach this component.
10
+ * Text = Body Base 16/24 `text-icon/body` (delta-700) at every `size`: `size` scales chips and
11
+ * buttons, and read-only draws neither. No value → `-`, the same placeholder the chip variant shows.
12
+ * Multiple selects never reach this component.
12
13
  */
13
- export declare const DynamicSelectReadOnlyValue: <TOption extends DynamicSelectOption>({ dataTest, options, value, title, size, valueKey, labelKey, renderLabel, }: DynamicSelectReadOnlyValueProps<TOption>) => JSX.Element;
14
+ export declare const DynamicSelectReadOnlyValue: <TOption extends DynamicSelectOption>({ dataTest, options, value, title, valueKey, labelKey, renderLabel, }: DynamicSelectReadOnlyValueProps<TOption>) => JSX.Element;
14
15
  export {};
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "3.101.0",
6
+ "version": "3.101.1",
7
7
  "type": "module",
8
8
  "sideEffects": [
9
9
  "**/*.css",