asma-ui-core 3.135.3 → 3.136.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.
@@ -1,13 +1,13 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- var i = ({ children: t, className: d, dataTest: m }) => /* @__PURE__ */ o("div", {
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ var a = ({ children: t, className: d, dataTest: m, maxWidth: o }) => /* @__PURE__ */ r("div", {
3
3
  "data-testid": m,
4
4
  className: d,
5
5
  style: {
6
6
  width: "100%",
7
- maxWidth: "var(--form-column-width)"
7
+ maxWidth: o ?? "var(--form-column-width)"
8
8
  },
9
9
  children: t
10
10
  });
11
11
  export {
12
- i as StyledFormColumn
12
+ a as StyledFormColumn
13
13
  };
@@ -1,34 +1,35 @@
1
- import { cn as r } from "../../helpers/cn.js";
2
- import { resolveSx as g } from "../../helpers/sx.js";
3
- import { cloneElement as w, isValidElement as n, useId as C } from "react";
4
- import { jsx as L, jsxs as A } from "react/jsx-runtime";
5
- var E = {
1
+ import { cn as n } from "../../helpers/cn.js";
2
+ import { resolveSx as C } from "../../helpers/sx.js";
3
+ import L from "./StyledFormControlLabel.module.js";
4
+ import { cloneElement as g, isValidElement as s, useId as S } from "react";
5
+ import { jsx as A, jsxs as E } from "react/jsx-runtime";
6
+ var N = {
6
7
  end: "flex-row",
7
8
  start: "flex-row-reverse",
8
9
  top: "flex-col-reverse",
9
10
  bottom: "flex-col"
10
- }, O = ({ control: l, label: a, checked: i, disabled: d, name: m, value: c, labelPlacement: x = "end", className: f, sx: p, onChange: h }) => {
11
- const e = n(l) ? l.props : {}, s = d ?? e.disabled ?? !1, u = !!e.readOnly, t = C(), b = e["aria-label"] != null || e["aria-labelledby"] != null, v = typeof a == "string" ? a.trim().length > 0 : a != null, o = n(l) && v && !b, y = n(l) ? w(l, {
11
+ }, k = ({ control: l, label: a, checked: i, disabled: d, name: m, value: c, labelPlacement: x = "end", className: f, classes: p, sx: b, onChange: u }) => {
12
+ const e = s(l) ? l.props : {}, o = d ?? e.disabled ?? !1, h = !!e.readOnly, t = S(), y = e["aria-label"] != null || e["aria-labelledby"] != null, v = typeof a == "string" ? a.trim().length > 0 : a != null, r = s(l) && v && !y, w = s(l) ? g(l, {
12
13
  checked: e.checked ?? i,
13
- onChange: e.onChange ?? h,
14
- disabled: s,
14
+ onChange: e.onChange ?? u,
15
+ disabled: o,
15
16
  name: e.name ?? m,
16
17
  value: e.value ?? c,
17
- ...o ? { "aria-labelledby": t } : {}
18
+ ...r ? { "aria-labelledby": t } : {}
18
19
  }) : l;
19
- return /* @__PURE__ */ A("label", {
20
- className: r("m-0 inline-flex items-center gap-2 align-middle text-delta-800", s || u ? "cursor-default" : "cursor-pointer", E[x], f),
20
+ return /* @__PURE__ */ E("label", {
21
+ className: n("m-0 inline-flex items-center gap-2 align-middle text-delta-800", o || h ? "cursor-default" : "cursor-pointer", N[x], f),
21
22
  style: {
22
23
  fontFamily: "Roboto, Helvetica, Arial, sans-serif",
23
- ...g(p)
24
+ ...C(b)
24
25
  },
25
- children: [y, a != null && /* @__PURE__ */ L("span", {
26
- id: o ? t : void 0,
27
- className: r("text-sm leading-5 tracking-[0.00938em]", "max-xs:min-w-0 max-xs:hyphens-auto max-xs:![overflow-wrap:anywhere]", s && "text-delta-300"),
26
+ children: [w, a != null && /* @__PURE__ */ A("span", {
27
+ id: r ? t : void 0,
28
+ className: n(L.Label, "max-xs:min-w-0 max-xs:hyphens-auto max-xs:![overflow-wrap:anywhere]", o && "text-delta-300", p?.label),
28
29
  children: a
29
30
  })]
30
31
  });
31
32
  };
32
33
  export {
33
- O as StyledFormControlLabel
34
+ k as StyledFormControlLabel
34
35
  };
@@ -0,0 +1,4 @@
1
+ var a = "_Label_tkzt8_2", e = { Label: a };
2
+ export {
3
+ e as default
4
+ };
@@ -1,39 +1,39 @@
1
- import { ChevronDownIcon as S } from "../../../icons/chevron-down-icon/ChevronDownIcon.js";
2
- import e from "./StyledAccordion.module.js";
3
- import { useAccordionContext as A } from "./AccordionContext.js";
1
+ import { ChevronDownIcon as A } from "../../../icons/chevron-down-icon/ChevronDownIcon.js";
2
+ import r from "./StyledAccordion.module.js";
3
+ import { useAccordionContext as N } from "./AccordionContext.js";
4
4
  import o from "clsx";
5
5
  import "react";
6
6
  import { Fragment as c, jsx as t, jsxs as l } from "react/jsx-runtime";
7
- var _ = ({ size: d = "large", expandChevronRight: a, className: m, headerClassName: p, sx: g, children: i, onClick: x, ...h }) => {
8
- const { open: n, toggle: u, disabled: f, triggerId: y, panelId: I } = A(), r = d === "small", b = {
9
- "--trigger-height": r ? "48px" : "72px",
10
- "--trigger-padding-x": r ? "8px" : "16px",
11
- "--trigger-font-size": r ? "14px" : "18px",
12
- "--chevron-size": r ? "20px" : "24px",
13
- ...g
14
- }, s = /* @__PURE__ */ t(S, {
15
- className: o(e.TriggerIcon, a && e.TriggerIconRight),
7
+ var $ = ({ size: d = "large", expandChevronRight: a, chevronAlign: g = "edge", className: m, headerClassName: p, sx: x, children: i, onClick: h, ...u }) => {
8
+ const { open: n, toggle: f, disabled: y, triggerId: I, panelId: b } = N(), e = d === "small", v = {
9
+ "--trigger-height": e ? "48px" : "72px",
10
+ "--trigger-padding-x": e ? "8px" : "16px",
11
+ "--trigger-font-size": e ? "14px" : "18px",
12
+ "--chevron-size": e ? "20px" : "24px",
13
+ ...x
14
+ }, s = /* @__PURE__ */ t(A, {
15
+ className: o(r.TriggerIcon, a && g === "edge" && r.TriggerIconRight),
16
16
  "data-state-icon": !0
17
17
  });
18
18
  return /* @__PURE__ */ t("h3", {
19
- className: o(e.Header, p),
19
+ className: o(r.Header, p),
20
20
  children: /* @__PURE__ */ t("button", {
21
- ...h,
21
+ ...u,
22
22
  type: "button",
23
- id: y,
23
+ id: I,
24
24
  "aria-expanded": n,
25
- "aria-controls": I,
26
- disabled: f,
27
- onClick: (v) => {
28
- x?.(v), u();
25
+ "aria-controls": b,
26
+ disabled: y,
27
+ onClick: (S) => {
28
+ h?.(S), f();
29
29
  },
30
- className: o(e.Trigger, "asma-pressable", m),
31
- style: b,
30
+ className: o(r.Trigger, "asma-pressable", m),
31
+ style: v,
32
32
  "data-panel-open": n ? "" : void 0,
33
33
  children: a ? /* @__PURE__ */ l(c, { children: [i, s] }) : /* @__PURE__ */ l(c, { children: [s, i] })
34
34
  })
35
35
  });
36
36
  };
37
37
  export {
38
- _ as StyledAccordionSummary
38
+ $ as StyledAccordionSummary
39
39
  };
@@ -1,12 +1,14 @@
1
- import { ReactNode } from 'react';
1
+ import { CSSProperties, ReactNode } from 'react';
2
2
  export interface StyledFormColumnProps {
3
3
  children?: ReactNode;
4
4
  className?: string;
5
5
  dataTest?: string;
6
+ maxWidth?: CSSProperties['maxWidth'];
6
7
  }
7
8
  /**
8
9
  * The one form column (field width pattern WID-1): at most 37.5rem (600 px), left-aligned, and as wide
9
10
  * as its container when that is narrower. Fields, labels, hints and errors all sit inside it.
10
- * A full-screen `MinimizableDialog` widens it to the dialog (WID-10).
11
+ * A full-screen `MinimizableDialog` widens it to the dialog (WID-10). Pass `maxWidth` to uncap it
12
+ * without changing the field-width tokens.
11
13
  */
12
- export declare const StyledFormColumn: ({ children, className, dataTest }: StyledFormColumnProps) => JSX.Element;
14
+ export declare const StyledFormColumn: ({ children, className, dataTest, maxWidth, }: StyledFormColumnProps) => JSX.Element;
@@ -1,5 +1,8 @@
1
1
  import { ChangeEvent, ReactElement, ReactNode } from 'react';
2
2
  export type LabelPlacement = 'end' | 'start' | 'top' | 'bottom';
3
+ export interface FormControlLabelClasses {
4
+ label?: string;
5
+ }
3
6
  export interface FormControlLabelProps {
4
7
  /** The control element (a checkbox, radio, or switch). Receives `checked`/`onChange`/`disabled`/`name`/`value` unless already set. */
5
8
  control: ReactElement;
@@ -10,6 +13,7 @@ export interface FormControlLabelProps {
10
13
  value?: unknown;
11
14
  labelPlacement?: LabelPlacement;
12
15
  className?: string;
16
+ classes?: FormControlLabelClasses;
13
17
  sx?: unknown;
14
18
  onChange?: (event: ChangeEvent<HTMLInputElement>, checked: boolean) => void;
15
19
  }
@@ -28,4 +32,4 @@ export interface FormControlLabelProps {
28
32
  * is unchanged and no markup moves. A control that already sets `aria-label`/`aria-labelledby`
29
33
  * keeps its own.
30
34
  */
31
- export declare const StyledFormControlLabel: ({ control, label, checked, disabled, name, value, labelPlacement, className, sx, onChange, }: FormControlLabelProps) => JSX.Element;
35
+ export declare const StyledFormControlLabel: ({ control, label, checked, disabled, name, value, labelPlacement, className, classes, sx, onChange, }: FormControlLabelProps) => JSX.Element;
@@ -1,5 +1,6 @@
1
1
  import * as React from 'react';
2
2
  export type StyledAccordionSummarySize = 'small' | 'large';
3
+ export type StyledAccordionSummaryChevronAlign = 'edge' | 'title';
3
4
  /**
4
5
  * @figmaNode wXrXt5uKNNzV2DnQCgyYZH#21228-37809
5
6
  * The accordion header. Figma: rounded-8 white container (border/outline delta-300), 16px padding,
@@ -12,6 +13,11 @@ export interface StyledAccordionSummaryProps extends Omit<React.ButtonHTMLAttrib
12
13
  size?: StyledAccordionSummarySize;
13
14
  /** @figmaProp Chevron placement — Figma default is left; true = right (MUI parity) */
14
15
  expandChevronRight?: boolean;
16
+ /**
17
+ * Where the right-hand chevron sits: `edge` (default) pushes it to the trigger's trailing edge,
18
+ * `title` keeps it immediately after the title text. No effect with the left-hand chevron.
19
+ */
20
+ chevronAlign?: StyledAccordionSummaryChevronAlign;
15
21
  sx?: React.CSSProperties;
16
22
  }
17
23
  /**
@@ -19,4 +25,4 @@ export interface StyledAccordionSummaryProps extends Omit<React.ButtonHTMLAttrib
19
25
  * inside a header, toggling the shared context. `data-panel-open` drives the chevron rotation in
20
26
  * SCSS. TASK-201.
21
27
  */
22
- export declare const StyledAccordionSummary: ({ size, expandChevronRight, className, headerClassName, sx, children, onClick, ...rest }: StyledAccordionSummaryProps) => JSX.Element;
28
+ export declare const StyledAccordionSummary: ({ size, expandChevronRight, chevronAlign, className, headerClassName, sx, children, onClick, ...rest }: StyledAccordionSummaryProps) => JSX.Element;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "3.135.3",
6
+ "version": "3.136.0",
7
7
  "type": "module",
8
8
  "sideEffects": [
9
9
  "**/*.css",