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.
- package/dist/asma-ui-core.css +1 -1
- package/dist/components/feedback/dialog/StyledDialog.js +1 -1
- package/dist/components/feedback/dialog/StyledDialogContent.js +7 -6
- package/dist/components/feedback/dialog/dialogHeaderStyles.js +1 -1
- package/dist/components/inputs/form-layout/StyledFormColumn.js +4 -4
- package/dist/components/miscellaneous/StyledFormControlLabel.js +18 -17
- package/dist/components/miscellaneous/StyledFormControlLabel.module.js +4 -0
- package/dist/components/utils/accordion/base-ui/StyledAccordionSummary.js +22 -22
- package/dist/src/components/feedback/dialog/StyledDialog.d.ts +2 -2
- package/dist/src/components/feedback/dialog/dialogHeaderStyles.d.ts +6 -5
- package/dist/src/components/inputs/form-layout/StyledFormColumn.d.ts +5 -3
- package/dist/src/components/miscellaneous/StyledFormControlLabel.d.ts +5 -1
- package/dist/src/components/utils/accordion/base-ui/StyledAccordionSummary.d.ts +7 -1
- package/package.json +1 -1
|
@@ -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-
|
|
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
|
|
3
|
-
import { jsx as
|
|
4
|
-
var p = ({ children: e, className: o, sx: t, style: r, dividers:
|
|
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__ */
|
|
10
|
+
return /* @__PURE__ */ n("div", {
|
|
10
11
|
"data-test": "styled-dialog-content",
|
|
11
12
|
tabIndex: 0,
|
|
12
|
-
className:
|
|
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
|
-
...
|
|
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-
|
|
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
|
|
2
|
-
var
|
|
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
|
-
|
|
12
|
+
a as StyledFormColumn
|
|
13
13
|
};
|
|
@@ -1,34 +1,35 @@
|
|
|
1
|
-
import { cn as
|
|
2
|
-
import { resolveSx as
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
|
|
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
|
-
},
|
|
11
|
-
const e =
|
|
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 ??
|
|
14
|
-
disabled:
|
|
14
|
+
onChange: e.onChange ?? u,
|
|
15
|
+
disabled: o,
|
|
15
16
|
name: e.name ?? m,
|
|
16
17
|
value: e.value ?? c,
|
|
17
|
-
...
|
|
18
|
+
...r ? { "aria-labelledby": t } : {}
|
|
18
19
|
}) : l;
|
|
19
|
-
return /* @__PURE__ */
|
|
20
|
-
className:
|
|
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
|
-
...
|
|
24
|
+
...C(b)
|
|
24
25
|
},
|
|
25
|
-
children: [
|
|
26
|
-
id:
|
|
27
|
-
className:
|
|
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
|
-
|
|
34
|
+
k as StyledFormControlLabel
|
|
34
35
|
};
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import { ChevronDownIcon as
|
|
2
|
-
import
|
|
3
|
-
import { useAccordionContext as
|
|
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
|
|
8
|
-
const { open: n, toggle:
|
|
9
|
-
"--trigger-height":
|
|
10
|
-
"--trigger-padding-x":
|
|
11
|
-
"--trigger-font-size":
|
|
12
|
-
"--chevron-size":
|
|
13
|
-
...
|
|
14
|
-
}, s = /* @__PURE__ */ t(
|
|
15
|
-
className: o(
|
|
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(
|
|
19
|
+
className: o(r.Header, p),
|
|
20
20
|
children: /* @__PURE__ */ t("button", {
|
|
21
|
-
...
|
|
21
|
+
...u,
|
|
22
22
|
type: "button",
|
|
23
|
-
id:
|
|
23
|
+
id: I,
|
|
24
24
|
"aria-expanded": n,
|
|
25
|
-
"aria-controls":
|
|
26
|
-
disabled:
|
|
27
|
-
onClick: (
|
|
28
|
-
|
|
25
|
+
"aria-controls": b,
|
|
26
|
+
disabled: y,
|
|
27
|
+
onClick: (S) => {
|
|
28
|
+
h?.(S), f();
|
|
29
29
|
},
|
|
30
|
-
className: o(
|
|
31
|
-
style:
|
|
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
|
-
|
|
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:
|
|
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 (
|
|
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
|
|
6
|
-
*
|
|
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,
|
|
37
|
-
* to as many lines as it needs, breaking an
|
|
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-
|
|
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;
|