asma-ui-core 3.45.0 → 3.45.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.
- package/dist/components/navigation/tabs/StyledTabs.js +35 -35
- package/dist/src/components/custom/module/header-layout/DynamicToolbarLayoutContext.d.ts +1 -1
- package/dist/src/components/custom/widget/widget-title/StyledWidgetTitle.d.ts +3 -3
- package/dist/src/components/data-display/chip/StyledChip.d.ts +1 -1
- package/dist/src/components/data-display/interactive-chip/StyledInteractiveChip.d.ts +1 -1
- package/dist/src/components/feedback/snack-bar/StyledAlertSnackbar.d.ts +1 -1
- package/dist/src/components/feedback/snack-bar/components/StyledDefaultSnackbar.d.ts +1 -1
- package/dist/src/components/feedback/snack-bar/components/StyledInfoSnackbar.d.ts +1 -1
- package/dist/src/components/inputs/radio-button/base-ui/RadioGroupContext.d.ts +1 -1
- package/dist/src/components/miscellaneous/FormControlContext.d.ts +1 -1
- package/dist/src/components/navigation/tabs/TabsContext.d.ts +1 -1
- package/dist/src/components/utils/accordion/base-ui/AccordionContext.d.ts +1 -1
- package/dist/src/table/components/TableSkeleton.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { cn as n } from "../../../helpers/cn.js";
|
|
2
|
-
import { resolveSx as
|
|
3
|
-
import { ChevronRightIcon as
|
|
4
|
-
import { ChevronLeftIcon as
|
|
5
|
-
import { consumerOverrides as
|
|
6
|
-
import { TabsContext as
|
|
7
|
-
import { Children as
|
|
8
|
-
import { jsx as l, jsxs as
|
|
9
|
-
var I = 120,
|
|
10
|
-
const a =
|
|
2
|
+
import { resolveSx as M } from "../../../helpers/sx.js";
|
|
3
|
+
import { ChevronRightIcon as V } from "../../icons/chevron-right-icon/ChevronRightIcon.js";
|
|
4
|
+
import { ChevronLeftIcon as _ } from "../../icons/chevron-left-icon/ChevronLeftIcon.js";
|
|
5
|
+
import { consumerOverrides as q } from "../../../helpers/classOverride.js";
|
|
6
|
+
import { TabsContext as z } from "./TabsContext.js";
|
|
7
|
+
import { Children as F, cloneElement as G, isValidElement as J, useCallback as u, useLayoutEffect as Q, useMemo as U, useRef as E, useState as A } from "react";
|
|
8
|
+
import { jsx as l, jsxs as B } from "react/jsx-runtime";
|
|
9
|
+
var I = 120, le = ({ value: i, onChange: m, variant: g = "standard", scrollButtons: w = "auto", centered: j, size: b = "default", className: x, sx: N, children: y }) => {
|
|
10
|
+
const a = E(null), d = E(/* @__PURE__ */ new Map()), [h, O] = A({
|
|
11
11
|
left: 0,
|
|
12
12
|
width: 0,
|
|
13
13
|
disabled: !1
|
|
14
|
-
}), [c, W] =
|
|
14
|
+
}), [c, W] = A({
|
|
15
15
|
left: !1,
|
|
16
16
|
right: !1
|
|
17
17
|
}), p = g === "scrollable", v = u((e, t) => {
|
|
18
18
|
t ? d.current.set(e, t) : d.current.delete(e);
|
|
19
|
-
}, []),
|
|
19
|
+
}, []), S = u((e, t) => m?.(e, t), [m]), f = u(() => {
|
|
20
20
|
const e = d.current.get(i), t = a.current;
|
|
21
21
|
if (e && O({
|
|
22
22
|
left: e.offsetLeft,
|
|
@@ -30,19 +30,19 @@ var I = 120, te = ({ value: i, onChange: m, variant: g = "standard", scrollButto
|
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
32
|
}, [i]);
|
|
33
|
-
|
|
33
|
+
Q(() => {
|
|
34
34
|
f();
|
|
35
35
|
const e = a.current;
|
|
36
36
|
if (!e) return;
|
|
37
37
|
const t = new ResizeObserver(f);
|
|
38
38
|
return t.observe(e), () => t.disconnect();
|
|
39
39
|
}, [f, y]);
|
|
40
|
-
const
|
|
40
|
+
const k = (e) => {
|
|
41
41
|
a.current?.scrollBy({
|
|
42
42
|
left: e,
|
|
43
43
|
behavior: "smooth"
|
|
44
44
|
});
|
|
45
|
-
},
|
|
45
|
+
}, D = (e) => {
|
|
46
46
|
if (![
|
|
47
47
|
"ArrowRight",
|
|
48
48
|
"ArrowLeft",
|
|
@@ -55,42 +55,42 @@ var I = 120, te = ({ value: i, onChange: m, variant: g = "standard", scrollButto
|
|
|
55
55
|
const o = t.findIndex((s) => s === document.activeElement);
|
|
56
56
|
let r = o;
|
|
57
57
|
e.key === "ArrowRight" ? r = (o + 1) % t.length : e.key === "ArrowLeft" ? r = (o - 1 + t.length) % t.length : e.key === "Home" ? r = 0 : e.key === "End" && (r = t.length - 1), t[r]?.focus();
|
|
58
|
-
},
|
|
58
|
+
}, L = p && w !== !1, R = w === !0, P = L && (R || c.left), T = L && (R || c.right), H = q(x, "padding-x"), K = U(() => ({
|
|
59
59
|
value: i,
|
|
60
60
|
size: b,
|
|
61
|
-
onSelect:
|
|
61
|
+
onSelect: S,
|
|
62
62
|
register: v
|
|
63
63
|
}), [
|
|
64
64
|
i,
|
|
65
65
|
b,
|
|
66
|
-
|
|
66
|
+
S,
|
|
67
67
|
v
|
|
68
|
-
]),
|
|
69
|
-
return /* @__PURE__ */ l(
|
|
70
|
-
value:
|
|
71
|
-
children: /* @__PURE__ */
|
|
72
|
-
className: n("relative flex items-center rounded-t-lg bg-white", !
|
|
73
|
-
style:
|
|
68
|
+
]), C = "flex h-10 w-10 shrink-0 items-center justify-center self-center rounded-[10%] border border-solid border-delta-500 text-delta-700 transition-colors hover:bg-gama-50 disabled:invisible";
|
|
69
|
+
return /* @__PURE__ */ l(z.Provider, {
|
|
70
|
+
value: K,
|
|
71
|
+
children: /* @__PURE__ */ B("div", {
|
|
72
|
+
className: n("relative flex items-center rounded-t-lg bg-white", !H && "px-4", x),
|
|
73
|
+
style: M(N),
|
|
74
74
|
children: [
|
|
75
|
-
|
|
75
|
+
P && /* @__PURE__ */ l("button", {
|
|
76
76
|
type: "button",
|
|
77
77
|
"aria-label": "scroll tabs left",
|
|
78
|
-
className: n(
|
|
78
|
+
className: n(C, "mr-2"),
|
|
79
79
|
disabled: !c.left,
|
|
80
|
-
onClick: () =>
|
|
81
|
-
children: /* @__PURE__ */ l(
|
|
80
|
+
onClick: () => k(-I),
|
|
81
|
+
children: /* @__PURE__ */ l(_, {
|
|
82
82
|
width: 24,
|
|
83
83
|
height: 24
|
|
84
84
|
})
|
|
85
85
|
}),
|
|
86
|
-
/* @__PURE__ */
|
|
86
|
+
/* @__PURE__ */ B("div", {
|
|
87
87
|
ref: a,
|
|
88
88
|
role: "tablist",
|
|
89
89
|
"aria-orientation": "horizontal",
|
|
90
|
-
onKeyDown:
|
|
90
|
+
onKeyDown: D,
|
|
91
91
|
onScroll: f,
|
|
92
92
|
className: n("relative flex border-x-0 border-b border-t-0 border-solid border-delta-200 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", p ? "flex-1 overflow-x-auto" : "w-full", g === "fullWidth" && "[&>*]:flex-1", j && "justify-center", b === "small" && "min-h-9"),
|
|
93
|
-
children: [
|
|
93
|
+
children: [F.map(y, (e, t) => J(e) ? G(e, { index: t }) : e), /* @__PURE__ */ l("span", {
|
|
94
94
|
"aria-hidden": !0,
|
|
95
95
|
className: n("absolute bottom-0 h-0.5 transition-all duration-300", h.disabled ? "bg-delta-300" : "bg-gama-500"),
|
|
96
96
|
style: {
|
|
@@ -99,13 +99,13 @@ var I = 120, te = ({ value: i, onChange: m, variant: g = "standard", scrollButto
|
|
|
99
99
|
}
|
|
100
100
|
})]
|
|
101
101
|
}),
|
|
102
|
-
|
|
102
|
+
T && /* @__PURE__ */ l("button", {
|
|
103
103
|
type: "button",
|
|
104
104
|
"aria-label": "scroll tabs right",
|
|
105
|
-
className: n(
|
|
105
|
+
className: n(C, "ml-2"),
|
|
106
106
|
disabled: !c.right,
|
|
107
|
-
onClick: () =>
|
|
108
|
-
children: /* @__PURE__ */ l(
|
|
107
|
+
onClick: () => k(I),
|
|
108
|
+
children: /* @__PURE__ */ l(V, {
|
|
109
109
|
width: 24,
|
|
110
110
|
height: 24
|
|
111
111
|
})
|
|
@@ -115,5 +115,5 @@ var I = 120, te = ({ value: i, onChange: m, variant: g = "standard", scrollButto
|
|
|
115
115
|
});
|
|
116
116
|
};
|
|
117
117
|
export {
|
|
118
|
-
|
|
118
|
+
le as StyledTabs
|
|
119
119
|
};
|
|
@@ -3,5 +3,5 @@ export interface DynamicToolbarLayoutContextValue {
|
|
|
3
3
|
filterIconOnly: boolean;
|
|
4
4
|
trailingIconOnly: boolean;
|
|
5
5
|
}
|
|
6
|
-
export declare const DynamicToolbarLayoutContext: import('
|
|
6
|
+
export declare const DynamicToolbarLayoutContext: import('react').Context<DynamicToolbarLayoutContextValue>;
|
|
7
7
|
export declare function useDynamicToolbarLayout(): DynamicToolbarLayoutContextValue;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* @figmaNode none — DS **Section title** typography (Roboto SemiBold 18/28, `delta-800`). Widget/
|
|
3
3
|
* widget-header heading; theme-safe via the delta token layer.
|
|
4
4
|
*/
|
|
5
|
-
export declare const StyledWidgetTitle: import('
|
|
5
|
+
export declare const StyledWidgetTitle: import('react').ForwardRefExoticComponent<{
|
|
6
6
|
className?: string;
|
|
7
7
|
} & {
|
|
8
|
-
children?: import('
|
|
9
|
-
} & import('
|
|
8
|
+
children?: import('react').ReactNode | undefined;
|
|
9
|
+
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -72,5 +72,5 @@ export interface StyledChipProps {
|
|
|
72
72
|
* `data-hovered`/`data-focus` attributes MUI set (state tables rely on them). Public props +
|
|
73
73
|
* `classes`/`sx` slots preserved (DEC-003). TASK-101a.
|
|
74
74
|
*/
|
|
75
|
-
export declare const StyledChip: import('
|
|
75
|
+
export declare const StyledChip: import('react').ForwardRefExoticComponent<StyledChipProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
76
76
|
export {};
|
|
@@ -25,4 +25,4 @@ export interface StyledInteractiveChipProps extends ComponentProps<typeof Styled
|
|
|
25
25
|
* checked/read-only colours, so the old nested `.MuiChip-avatar .Mui*` `sx` is gone). Public props
|
|
26
26
|
* preserved (DEC-003). TASK-101a.
|
|
27
27
|
*/
|
|
28
|
-
export declare const StyledInteractiveChip: import('
|
|
28
|
+
export declare const StyledInteractiveChip: import('react').ForwardRefExoticComponent<Omit<StyledInteractiveChipProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -6,5 +6,5 @@ interface StyledAlertSnackbarProps extends CustomContentProps {
|
|
|
6
6
|
alertVariant?: 'standard' | 'filled' | 'outlined';
|
|
7
7
|
closeButton?: boolean;
|
|
8
8
|
}
|
|
9
|
-
export declare const StyledAlertSnackbar: import('
|
|
9
|
+
export declare const StyledAlertSnackbar: import('react').ForwardRefExoticComponent<StyledAlertSnackbarProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
10
10
|
export {};
|
|
@@ -13,4 +13,4 @@ export interface StyledDefaultSnackbarProps extends CustomContentProps {
|
|
|
13
13
|
/** @figmaProp Label = the bold severity title (falls back to the severity name) */
|
|
14
14
|
title?: SnackbarMessage;
|
|
15
15
|
}
|
|
16
|
-
export declare const StyledDefaultSnackbar: import('
|
|
16
|
+
export declare const StyledDefaultSnackbar: import('react').ForwardRefExoticComponent<StyledDefaultSnackbarProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -7,5 +7,5 @@ interface StyledInfoSnackbarProps extends CustomContentProps {
|
|
|
7
7
|
closeButton?: boolean;
|
|
8
8
|
type?: 'loading';
|
|
9
9
|
}
|
|
10
|
-
export declare const StyledInfoSnackbar: import('
|
|
10
|
+
export declare const StyledInfoSnackbar: import('react').ForwardRefExoticComponent<StyledInfoSnackbarProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
11
11
|
export {};
|
|
@@ -6,5 +6,5 @@ export interface RadioGroupContextValue {
|
|
|
6
6
|
onSelect: (value: RadioValue) => void;
|
|
7
7
|
}
|
|
8
8
|
/** Shared state for the native radio group (replaces `@base-ui/react`'s RadioGroup context). */
|
|
9
|
-
export declare const RadioGroupContext: import('
|
|
9
|
+
export declare const RadioGroupContext: import('react').Context<RadioGroupContextValue | null>;
|
|
10
10
|
export declare const useRadioGroupContext: () => RadioGroupContextValue | null;
|
|
@@ -10,5 +10,5 @@ export interface FormControlContextValue {
|
|
|
10
10
|
setFocused: (value: boolean) => void;
|
|
11
11
|
setFilled: (value: boolean) => void;
|
|
12
12
|
}
|
|
13
|
-
export declare const FormControlContext: import('
|
|
13
|
+
export declare const FormControlContext: import('react').Context<FormControlContextValue | null>;
|
|
14
14
|
export declare const useFormControlContext: () => FormControlContextValue | null;
|
|
@@ -7,5 +7,5 @@ export interface TabsContextValue {
|
|
|
7
7
|
/** Registers a tab button so the parent can measure the active indicator and drive arrow-key focus. */
|
|
8
8
|
register: (value: TabValue, node: HTMLButtonElement | null) => void;
|
|
9
9
|
}
|
|
10
|
-
export declare const TabsContext: import('
|
|
10
|
+
export declare const TabsContext: import('react').Context<TabsContextValue | null>;
|
|
11
11
|
export declare const useTabsContext: () => TabsContextValue | null;
|
|
@@ -6,5 +6,5 @@ export interface AccordionContextValue {
|
|
|
6
6
|
panelId: string;
|
|
7
7
|
}
|
|
8
8
|
/** Shared open-state + ARIA ids for the accordion compound (replaces `@base-ui/react`). */
|
|
9
|
-
export declare const AccordionContext: import('
|
|
9
|
+
export declare const AccordionContext: import('react').Context<AccordionContextValue | null>;
|
|
10
10
|
export declare const useAccordionContext: () => AccordionContextValue;
|