asma-ui-core 3.135.2 → 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.
@@ -204,7 +204,7 @@ var Te = {
204
204
  }),
205
205
  h && /* @__PURE__ */ o("div", {
206
206
  id: p,
207
- className: "my-0 block min-w-0 whitespace-normal text-[20px] font-bold leading-[26px] text-delta-800 [overflow-wrap:anywhere] hyphens-auto min-[744px]:text-lg min-[744px]:leading-6",
207
+ className: "my-0 block min-w-0 whitespace-normal text-[20px] font-bold leading-[26px] text-delta-800 [overflow-wrap:anywhere] hyphens-auto min-[744px]:text-2xl min-[744px]:leading-8",
208
208
  children: h
209
209
  }),
210
210
  /* @__PURE__ */ o("div", {
@@ -1,17 +1,18 @@
1
1
  import { resolveSx as d } from "../../../helpers/sx.js";
2
- import n from "clsx";
3
- import { jsx as i } from "react/jsx-runtime";
4
- var p = ({ children: e, className: o, sx: t, style: r, dividers: l, classes: m, ...a }) => {
2
+ import i from "clsx";
3
+ import { jsx as n } from "react/jsx-runtime";
4
+ var p = ({ children: e, className: o, sx: t, style: r, dividers: a, classes: m, ...l }) => {
5
5
  const s = {
6
+ "--dialog-header-offset": "0px",
6
7
  ...d(t),
7
8
  ...r
8
9
  };
9
- return /* @__PURE__ */ i("div", {
10
+ return /* @__PURE__ */ n("div", {
10
11
  "data-test": "styled-dialog-content",
11
12
  tabIndex: 0,
12
- className: n("min-h-0 w-full min-w-0 flex-auto overflow-auto px-6 py-4", l && "border-y border-solid border-[rgba(0,0,0,0.12)]", o),
13
+ className: i("min-h-0 w-full min-w-0 flex-auto overflow-auto px-6 py-4", a && "border-y border-solid border-[rgba(0,0,0,0.12)]", o),
13
14
  style: s,
14
- ...a,
15
+ ...l,
15
16
  "data-dialog-content": "",
16
17
  children: e
17
18
  });
@@ -3,7 +3,7 @@ var x = "box-border w-full min-w-0 max-w-full shrink-0 bg-white px-4 pb-3 pt-4",
3
3
  scrollPaddingBottom: l,
4
4
  "--dialog-header-offset": `${e}px`,
5
5
  "--dialog-footer-offset": `${l}px`
6
- }), o = "flex min-h-11 w-full min-w-0 items-center justify-between gap-x-2 max-xs:flex-wrap max-xs:gap-y-1", i = "my-0 block min-w-0 whitespace-normal text-[20px] font-bold leading-[26px] text-delta-800 [overflow-wrap:anywhere] hyphens-auto min-[744px]:text-lg min-[744px]:leading-6";
6
+ }), o = "flex min-h-11 w-full min-w-0 items-center justify-between gap-x-2 max-xs:flex-wrap max-xs:gap-y-1", i = "my-0 block min-w-0 whitespace-normal text-[20px] font-bold leading-[26px] text-delta-800 [overflow-wrap:anywhere] hyphens-auto min-[744px]:text-2xl min-[744px]:leading-8";
7
7
  export {
8
8
  o as DIALOG_HEADER_ACTIONS_ROW_CLASSES,
9
9
  x as DIALOG_HEADER_CLASSES,
@@ -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
  };
@@ -12,7 +12,7 @@ interface DialogPaperProps {
12
12
  * @figmaNode wXrXt5uKNNzV2DnQCgyYZH#15820-18954
13
13
  * Figma "Dialog": white paper radius 8 with the Dialogue-popup shadow (#22213366, 0 4 40) over a
14
14
  * bg/modal #626e7eb2 overlay. Header = actions row (optional label, Helper delta-600, + close button)
15
- * over the full-width title (ASMA-8737: 18/24 Bold, 20/26 Bold below 744 px, delta-800, never
15
+ * over the full-width title (ASMA-8737: 24/32 Bold, 20/26 Bold below 744 px, delta-800, never
16
16
  * truncated). `fullScreen`/mobile drops the radius and fills the viewport.
17
17
  */
18
18
  export interface IStyledDialogProps {
@@ -64,7 +64,7 @@ export interface IStyledDialogProps {
64
64
  showCloseIcon?: boolean;
65
65
  /** @figmaProp header Label (Helper 14, delta-600) */
66
66
  dialogLabel?: ReactNode;
67
- /** @figmaProp header Title (18/24 Bold, 20/26 Bold on mobile, delta-800), on its own full-width row */
67
+ /** @figmaProp header Title (24/32 Bold, 20/26 Bold on mobile, delta-800), on its own full-width row */
68
68
  dialogTitle?: ReactNode;
69
69
  dialogHeaderNode?: ReactNode;
70
70
  /**
@@ -2,8 +2,8 @@ import { CSSProperties } from 'react';
2
2
  /**
3
3
  * The one dialog header layout (ASMA-8737), shared by `StyledDialog`, `MinimizableDialog` and
4
4
  * `MinimizableDialogV2`: the actions row on top, then the title on a row of its own across the full
5
- * width. Geometry from the ticket: 44 px actions row, 28 px vertical padding (16 + 12), title lines
6
- * of 26 px below 744 px wide and 24 px from there up.
5
+ * width. Geometry: 44 px actions row, 28 px vertical padding (16 + 12), title lines of 26 px
6
+ * below 744 px wide and 32 px from there up.
7
7
  */
8
8
  export declare const DIALOG_HEADER_CLASSES = "box-border w-full min-w-0 max-w-full shrink-0 bg-white px-4 pb-3 pt-4";
9
9
  /**
@@ -33,7 +33,8 @@ export declare const dialogScrollerStyle: (scrollPaddingTop: number, scrollPaddi
33
33
  /** Label (if any) on the left, the header actions on the right. Wraps rather than overflowing at 320 px. */
34
34
  export declare const DIALOG_HEADER_ACTIONS_ROW_CLASSES = "flex min-h-11 w-full min-w-0 items-center justify-between gap-x-2 max-xs:flex-wrap max-xs:gap-y-1";
35
35
  /**
36
- * Title type: 20/26 Bold below 744 px, 18/24 Bold from 744 px. Never truncated or clamped: it wraps
37
- * to as many lines as it needs, breaking an over-long word rather than scrolling sideways (WCAG 1.4.10).
36
+ * Title type: 20/26 Bold below 744 px, 24/32 Bold from 744 px (the desktop size from before
37
+ * ASMA-8737). Never truncated or clamped: it wraps to as many lines as it needs, breaking an
38
+ * over-long word rather than scrolling sideways (WCAG 1.4.10).
38
39
  */
39
- export declare const DIALOG_TITLE_CLASSES = "my-0 block min-w-0 whitespace-normal text-[20px] font-bold leading-[26px] text-delta-800 [overflow-wrap:anywhere] hyphens-auto min-[744px]:text-lg min-[744px]:leading-6";
40
+ export declare const DIALOG_TITLE_CLASSES = "my-0 block min-w-0 whitespace-normal text-[20px] font-bold leading-[26px] text-delta-800 [overflow-wrap:anywhere] hyphens-auto min-[744px]:text-2xl min-[744px]:leading-8";
@@ -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.2",
6
+ "version": "3.136.0",
7
7
  "type": "module",
8
8
  "sideEffects": [
9
9
  "**/*.css",