@midas-ds/components 17.7.8 → 17.8.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.
- package/CHANGELOG.md +13 -0
- package/accordion/AccordionItem.d.ts +2 -3
- package/accordion/AccordionItem.stories.d.ts +1 -1
- package/accordion/index.js +1 -1
- package/assets/TagGroup.css +1 -1
- package/chunks/AccordionItem-w6c28fSu.js +129 -0
- package/chunks/Radio-D-sGYrD6.js +44 -0
- package/chunks/{Select--xr0jiPR.js → Select-DJ_VE1E4.js} +1 -1
- package/chunks/{TagGroup-D-bzpYQJ.js → TagGroup-YCiXkdo3.js} +21 -21
- package/index.js +5 -5
- package/package.json +1 -1
- package/radio/Radio.d.ts +7 -4
- package/radio/Radio.stories.d.ts +1 -1
- package/radio/index.d.ts +1 -1
- package/radio/index.js +1 -1
- package/select/index.js +1 -1
- package/tag/index.js +1 -1
- package/chunks/AccordionItem-2xB1a2b_.js +0 -129
- package/chunks/Radio-F1vaYCPS.js +0 -44
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
## 17.8.1 (2026-03-13)
|
|
2
|
+
|
|
3
|
+
### 🩹 Fixes
|
|
4
|
+
|
|
5
|
+
- **components, tag:** add box-sizing for consistent height ([b66bd4adfd](https://github.com/migrationsverket/midas/commit/b66bd4adfd))
|
|
6
|
+
|
|
7
|
+
## 17.8.0 (2026-03-12)
|
|
8
|
+
|
|
9
|
+
### 🚀 Features
|
|
10
|
+
|
|
11
|
+
- **components, radio:** accept function for children prop ([75260130c8](https://github.com/migrationsverket/midas/commit/75260130c8))
|
|
12
|
+
- **components, accordion:** accept function for children prop ([08bc1ba117](https://github.com/migrationsverket/midas/commit/08bc1ba117))
|
|
13
|
+
|
|
1
14
|
## 17.7.8 (2026-03-12)
|
|
2
15
|
|
|
3
16
|
### 🩹 Fixes
|
|
@@ -3,10 +3,9 @@ import { HeadingProps } from '../heading';
|
|
|
3
3
|
import { FeedbackStatus, Size } from '../common/types';
|
|
4
4
|
import { FeedbackStatusIconProps } from '../common/FeedbackStatusIcon';
|
|
5
5
|
import * as React from 'react';
|
|
6
|
-
export interface AccordionItemProps extends
|
|
6
|
+
export interface AccordionItemProps extends DisclosureProps {
|
|
7
7
|
/** The text displayed in the collapsed state. If a ReactNode is provided, a heading will not be automatically added, and you must provide one yourself. */
|
|
8
8
|
title?: string | React.ReactNode;
|
|
9
|
-
children?: React.ReactNode;
|
|
10
9
|
/** Adjust the heading level of the title to match your document's heading tag structure */
|
|
11
10
|
headingLevel?: HeadingProps['elementType'];
|
|
12
11
|
/** Display an accordion item with different type styles. */
|
|
@@ -26,4 +25,4 @@ export interface AccordionItemProps extends Omit<DisclosureProps, 'children'> {
|
|
|
26
25
|
*/
|
|
27
26
|
iconAriaLabel?: FeedbackStatusIconProps['aria-label'];
|
|
28
27
|
}
|
|
29
|
-
export declare const AccordionItem:
|
|
28
|
+
export declare const AccordionItem: ({ title, children, className, headingLevel, type, hasBackground, size, isContained: isContainedFromProp, iconAriaLabel, ...props }: AccordionItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,7 +2,7 @@ import { StoryObj } from '@storybook/react-vite';
|
|
|
2
2
|
import { AccordionItem } from './AccordionItem';
|
|
3
3
|
type Story = StoryObj<typeof AccordionItem>;
|
|
4
4
|
declare const _default: {
|
|
5
|
-
component: import('
|
|
5
|
+
component: ({ title, children, className, headingLevel, type, hasBackground, size, isContained: isContainedFromProp, iconAriaLabel, ...props }: import('./AccordionItem').AccordionItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
title: string;
|
|
7
7
|
tags: string[];
|
|
8
8
|
args: {
|
package/accordion/index.js
CHANGED
package/assets/TagGroup.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._button_qyfvb_1{color:var(--midas-icon-primary);padding:var(--midas-space-xsmall)!important;border-radius:1.5rem;margin-left:var(--midas-space-10)}._button_qyfvb_1[data-hovered]{background-color:var(--midas-button-icon-hover)}._button_qyfvb_1[data-pressed]{background-color:var(--midas-button-icon-active)}._button_qyfvb_1._green_qyfvb_15[data-hovered],._button_qyfvb_1._red_qyfvb_16[data-hovered],._button_qyfvb_1._blue_qyfvb_17[data-hovered],._button_qyfvb_1._yellow_qyfvb_18[data-hovered]{background-color:var(--midas-button-icon-hover)}._button_qyfvb_1._green_qyfvb_15[data-pressed],._button_qyfvb_1._red_qyfvb_16[data-pressed],._button_qyfvb_1._blue_qyfvb_17[data-pressed],._button_qyfvb_1._yellow_qyfvb_18[data-pressed]{background-color:var(--midas-button-icon-active)}._tag_qyfvb_30{align-items:center;background-color:var(--midas-field-01-base);border-color:var(--midas-border-color-primary);border-radius:1.25rem;border-style:solid;border-width:1px;color:var(--midas-text-primary);display:inline-flex;font-family:var(--midas-typography-font-family);font-size:var(--midas-typography-font-size-20);line-height:var(--midas-typography-line-height-20)}._tag_qyfvb_30._green_qyfvb_15{background-color:var(--midas-tag-green-background);border-color:var(--midas-tag-green-border-color)}._tag_qyfvb_30._blue_qyfvb_17{background-color:var(--midas-tag-blue-background);border-color:var(--midas-tag-blue-border-color)}._tag_qyfvb_30._yellow_qyfvb_18{background-color:var(--midas-tag-yellow-background);border-color:var(--midas-tag-yellow-border-color)}._tag_qyfvb_30._red_qyfvb_16{background-color:var(--midas-tag-red-background);border-color:var(--midas-tag-red-border-color)}._tag_qyfvb_30[data-disabled]{background-color:var(--midas-field-01-base);border-color:var(--midas-border-color-disabled);color:var(--midas-text-disabled);cursor:not-allowed}._tag_qyfvb_30[data-focused],._tag_qyfvb_30[data-focus-visible]{outline:none}._tag_qyfvb_30[data-focus-visible]{box-shadow:var(--midas-state-focus)}@media(forced-colors:active){._tag_qyfvb_30[data-focus-visible]{outline:3px solid highlight;outline-offset:2px}}._tagText_qyfvb_85{align-items:center;box-sizing:border-box;display:flex;gap:var(--midas-space-xsmall);padding:5px var(--midas-space-small);min-height:1.875rem}._tagText_qyfvb_85 svg{width:var(--midas-size-icon-sm);height:var(--midas-size-icon-sm)}._dismissable_qyfvb_99 ._tagText_qyfvb_85{padding:5px 0 5px var(--midas-space-small)}._tagList_17pz2_1{display:flex;flex-wrap:wrap;gap:var(--midas-space-xsmall)}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as n, jsxs as m, Fragment as x } from "react/jsx-runtime";
|
|
3
|
+
import { c as l } from "./clsx-AexbMWKp.js";
|
|
4
|
+
import { DisclosureGroup as C, Disclosure as I, composeRenderProps as N, DisclosurePanel as B } from "react-aria-components";
|
|
5
|
+
import { createContext as b, useContext as k, useEffect as w } from "react";
|
|
6
|
+
import { B as A } from "./Button-D22xOe8j.js";
|
|
7
|
+
import { H as T } from "./Heading-nfcRc2QF.js";
|
|
8
|
+
import { F as D } from "./FeedbackStatusIcon-X9Bjgeta.js";
|
|
9
|
+
import { C as M } from "./chevron-down-BBFYYzZq.js";
|
|
10
|
+
import '../assets/AccordionItem.css';const j = "_root_17bdp_1", F = "_contained_17bdp_5", a = {
|
|
11
|
+
root: j,
|
|
12
|
+
contained: F
|
|
13
|
+
}, d = b(void 0), st = ({
|
|
14
|
+
children: o,
|
|
15
|
+
className: s,
|
|
16
|
+
isContained: i,
|
|
17
|
+
size: r = "large",
|
|
18
|
+
...e
|
|
19
|
+
}) => /* @__PURE__ */ n(d.Provider, { value: { isContained: i, size: r }, children: /* @__PURE__ */ n(
|
|
20
|
+
C,
|
|
21
|
+
{
|
|
22
|
+
className: l(
|
|
23
|
+
a.root,
|
|
24
|
+
i ? a.contained : a.uncontained,
|
|
25
|
+
s
|
|
26
|
+
),
|
|
27
|
+
...e,
|
|
28
|
+
children: o
|
|
29
|
+
}
|
|
30
|
+
) }), P = "_item_1l4iy_1", z = "_contained_1l4iy_18", H = "_medium_1l4iy_28", R = "_success_1l4iy_33", S = "_warning_1l4iy_39", E = "_info_1l4iy_45", G = "_important_1l4iy_51", W = "_triggerButton_1l4iy_62", $ = "_triggerText_1l4iy_66", q = "_trigger_1l4iy_62", J = "_triggerMainContent_1l4iy_77", K = "_chevronIcon_1l4iy_94", L = "_statusIcon_1l4iy_100", O = "_panel_1l4iy_122", Q = "_content_1l4iy_130", U = "_hasBackground_1l4iy_135", V = "_header_1l4iy_139", t = {
|
|
31
|
+
item: P,
|
|
32
|
+
contained: z,
|
|
33
|
+
medium: H,
|
|
34
|
+
success: R,
|
|
35
|
+
warning: S,
|
|
36
|
+
info: E,
|
|
37
|
+
important: G,
|
|
38
|
+
triggerButton: W,
|
|
39
|
+
triggerText: $,
|
|
40
|
+
trigger: q,
|
|
41
|
+
triggerMainContent: J,
|
|
42
|
+
" ": "_ _1l4iy_1",
|
|
43
|
+
chevronIcon: K,
|
|
44
|
+
statusIcon: L,
|
|
45
|
+
panel: O,
|
|
46
|
+
content: Q,
|
|
47
|
+
hasBackground: U,
|
|
48
|
+
header: V
|
|
49
|
+
}, rt = ({
|
|
50
|
+
title: o,
|
|
51
|
+
children: s,
|
|
52
|
+
className: i,
|
|
53
|
+
headingLevel: r = "h2",
|
|
54
|
+
type: e,
|
|
55
|
+
hasBackground: g = !0,
|
|
56
|
+
size: u = "large",
|
|
57
|
+
isContained: h,
|
|
58
|
+
iconAriaLabel: p,
|
|
59
|
+
...y
|
|
60
|
+
}) => {
|
|
61
|
+
const _ = k(d), c = h ?? _?.isContained ?? !1, f = typeof o == "object";
|
|
62
|
+
return w(() => {
|
|
63
|
+
e && !c && console.warn(
|
|
64
|
+
"AccordionItem: When 'type' is set, it is recommended to also set 'isContained' to true for visual consistency."
|
|
65
|
+
);
|
|
66
|
+
}, [e, c]), /* @__PURE__ */ n(
|
|
67
|
+
I,
|
|
68
|
+
{
|
|
69
|
+
...y,
|
|
70
|
+
className: l(
|
|
71
|
+
t.item,
|
|
72
|
+
e && t[e],
|
|
73
|
+
(u === "medium" || _?.size === "medium") && t.medium,
|
|
74
|
+
c && t.contained,
|
|
75
|
+
i
|
|
76
|
+
),
|
|
77
|
+
children: N(s, (v) => /* @__PURE__ */ m(x, { children: [
|
|
78
|
+
/* @__PURE__ */ n("div", { className: t.trigger, children: /* @__PURE__ */ m(
|
|
79
|
+
A,
|
|
80
|
+
{
|
|
81
|
+
className: t.triggerButton,
|
|
82
|
+
slot: "trigger",
|
|
83
|
+
variant: "icon",
|
|
84
|
+
children: [
|
|
85
|
+
/* @__PURE__ */ n(
|
|
86
|
+
M,
|
|
87
|
+
{
|
|
88
|
+
size: 20,
|
|
89
|
+
className: t.chevronIcon
|
|
90
|
+
}
|
|
91
|
+
),
|
|
92
|
+
/* @__PURE__ */ n("div", { className: t.triggerMainContent, children: f ? o : /* @__PURE__ */ n(
|
|
93
|
+
T,
|
|
94
|
+
{
|
|
95
|
+
level: 3,
|
|
96
|
+
elementType: r,
|
|
97
|
+
className: t.triggerText,
|
|
98
|
+
children: o
|
|
99
|
+
}
|
|
100
|
+
) }),
|
|
101
|
+
e && /* @__PURE__ */ n(
|
|
102
|
+
D,
|
|
103
|
+
{
|
|
104
|
+
"aria-label": p,
|
|
105
|
+
className: t.statusIcon,
|
|
106
|
+
status: e
|
|
107
|
+
}
|
|
108
|
+
)
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
) }),
|
|
112
|
+
/* @__PURE__ */ n(B, { className: t.panel, children: /* @__PURE__ */ n(
|
|
113
|
+
"div",
|
|
114
|
+
{
|
|
115
|
+
className: l(
|
|
116
|
+
t.content,
|
|
117
|
+
g && t.hasBackground
|
|
118
|
+
),
|
|
119
|
+
children: v
|
|
120
|
+
}
|
|
121
|
+
) })
|
|
122
|
+
] }))
|
|
123
|
+
}
|
|
124
|
+
);
|
|
125
|
+
};
|
|
126
|
+
export {
|
|
127
|
+
st as A,
|
|
128
|
+
rt as a
|
|
129
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as r, jsxs as u, Fragment as _ } from "react/jsx-runtime";
|
|
3
|
+
import { Radio as f, RadioGroup as h, composeRenderProps as G, Group as R } from "react-aria-components";
|
|
4
|
+
import { c as p } from "./clsx-AexbMWKp.js";
|
|
5
|
+
import { a as x, L as w } from "./Label-BNQY5OnB.js";
|
|
6
|
+
import { T as z } from "./Text-D0r_W4lH.js";
|
|
7
|
+
import { F as t } from "./FieldError-krpMBtie.js";
|
|
8
|
+
import '../assets/Radio.css';const E = "_radioGroup_1ls9z_1", F = "_wrap_1ls9z_12", L = "_radio_1ls9z_1", s = {
|
|
9
|
+
radioGroup: E,
|
|
10
|
+
wrap: F,
|
|
11
|
+
radio: L
|
|
12
|
+
}, W = ({
|
|
13
|
+
label: o,
|
|
14
|
+
description: a,
|
|
15
|
+
errorMessage: i,
|
|
16
|
+
children: e,
|
|
17
|
+
className: c,
|
|
18
|
+
errorPosition: d = "top",
|
|
19
|
+
popover: l,
|
|
20
|
+
...m
|
|
21
|
+
}) => /* @__PURE__ */ r(
|
|
22
|
+
h,
|
|
23
|
+
{
|
|
24
|
+
...m,
|
|
25
|
+
className: p(s.radioGroup, c),
|
|
26
|
+
children: G(e, (n) => /* @__PURE__ */ u(_, { children: [
|
|
27
|
+
/* @__PURE__ */ r(x, { popover: l, children: o && /* @__PURE__ */ r(w, { children: o }) }),
|
|
28
|
+
a && /* @__PURE__ */ r(z, { slot: "description", children: a }),
|
|
29
|
+
d === "top" && /* @__PURE__ */ r(t, { "data-testid": "fieldError", children: i }),
|
|
30
|
+
/* @__PURE__ */ r(R, { className: s.wrap, children: n }),
|
|
31
|
+
d === "bottom" && /* @__PURE__ */ r(t, { "data-testid": "fieldError", children: i })
|
|
32
|
+
] }))
|
|
33
|
+
}
|
|
34
|
+
), g = ({ className: o, ...a }) => /* @__PURE__ */ r(
|
|
35
|
+
f,
|
|
36
|
+
{
|
|
37
|
+
className: p(s.radio, o),
|
|
38
|
+
...a
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
export {
|
|
42
|
+
g as R,
|
|
43
|
+
W as a
|
|
44
|
+
};
|
|
@@ -12,7 +12,7 @@ import { useFocusManager as L } from "react-aria";
|
|
|
12
12
|
import { X as I } from "./x-B9bYxG31.js";
|
|
13
13
|
import { L as G } from "./ListBox-BmONCo_D.js";
|
|
14
14
|
import { P as j } from "./Popover-6cnHxDEK.js";
|
|
15
|
-
import { a as k, T as R } from "./TagGroup-
|
|
15
|
+
import { a as k, T as R } from "./TagGroup-YCiXkdo3.js";
|
|
16
16
|
import { C as $ } from "./chevron-down-BBFYYzZq.js";
|
|
17
17
|
import '../assets/Select.css';const w = { clearAll: "Clear all", selectAll: "Select all", selectedItems: "Selected items", selected: "selected" }, z = { clearAll: "Rensa alla", selectAll: "Välj alla", selectedItems: "Valda objekt", selected: "valda" }, u = {
|
|
18
18
|
en: w,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as i, jsxs as
|
|
2
|
-
import { Tag as
|
|
3
|
-
import { B as
|
|
1
|
+
import { jsx as i, jsxs as _, Fragment as u } from "react/jsx-runtime";
|
|
2
|
+
import { Tag as b, composeRenderProps as T, useContextProps as d, TagListContext as p, TagList as v, TagGroupContext as y, TagGroup as x } from "react-aria-components";
|
|
3
|
+
import { B as h } from "./Button-D22xOe8j.js";
|
|
4
4
|
import { c } from "./clsx-AexbMWKp.js";
|
|
5
|
-
import { X as
|
|
6
|
-
import { forwardRef as
|
|
7
|
-
import '../assets/TagGroup.css';const
|
|
8
|
-
button:
|
|
5
|
+
import { X as L } from "./x-B9bYxG31.js";
|
|
6
|
+
import { forwardRef as f, Children as N, isValidElement as w } from "react";
|
|
7
|
+
import '../assets/TagGroup.css';const q = "_button_qyfvb_1", G = "_green_qyfvb_15", C = "_red_qyfvb_16", R = "_blue_qyfvb_17", V = "_yellow_qyfvb_18", $ = "_tag_qyfvb_30", z = "_tagText_qyfvb_85", E = "_dismissable_qyfvb_99", a = {
|
|
8
|
+
button: q,
|
|
9
9
|
green: G,
|
|
10
10
|
red: C,
|
|
11
11
|
blue: R,
|
|
@@ -13,7 +13,7 @@ import '../assets/TagGroup.css';const w = "_button_k5bh7_1", G = "_green_k5bh7_1
|
|
|
13
13
|
tag: $,
|
|
14
14
|
tagText: z,
|
|
15
15
|
dismissable: E
|
|
16
|
-
},
|
|
16
|
+
}, X = ({
|
|
17
17
|
className: r,
|
|
18
18
|
color: e,
|
|
19
19
|
dismissable: o = !1,
|
|
@@ -23,7 +23,7 @@ import '../assets/TagGroup.css';const w = "_button_k5bh7_1", G = "_green_k5bh7_1
|
|
|
23
23
|
}) => {
|
|
24
24
|
const g = t || typeof t > "u" && o;
|
|
25
25
|
return /* @__PURE__ */ i(
|
|
26
|
-
|
|
26
|
+
b,
|
|
27
27
|
{
|
|
28
28
|
className: c(
|
|
29
29
|
a.tag,
|
|
@@ -38,16 +38,16 @@ import '../assets/TagGroup.css';const w = "_button_k5bh7_1", G = "_green_k5bh7_1
|
|
|
38
38
|
),
|
|
39
39
|
...n,
|
|
40
40
|
textValue: n.textValue || (typeof n.children == "string" ? n.children : void 0),
|
|
41
|
-
children:
|
|
41
|
+
children: T(n.children, (l) => /* @__PURE__ */ _(u, { children: [
|
|
42
42
|
/* @__PURE__ */ i("div", { className: a.tagText, children: l }),
|
|
43
43
|
g && /* @__PURE__ */ i(
|
|
44
|
-
|
|
44
|
+
h,
|
|
45
45
|
{
|
|
46
46
|
variant: "icon",
|
|
47
47
|
size: "medium",
|
|
48
48
|
className: a.button,
|
|
49
49
|
slot: "remove",
|
|
50
|
-
children: /* @__PURE__ */ i(
|
|
50
|
+
children: /* @__PURE__ */ i(L, { size: 20 })
|
|
51
51
|
}
|
|
52
52
|
)
|
|
53
53
|
] }))
|
|
@@ -59,27 +59,27 @@ import '../assets/TagGroup.css';const w = "_button_k5bh7_1", G = "_green_k5bh7_1
|
|
|
59
59
|
const [{ className: o, ...t }, s] = d(
|
|
60
60
|
r,
|
|
61
61
|
e,
|
|
62
|
-
|
|
62
|
+
p
|
|
63
63
|
);
|
|
64
64
|
return /* @__PURE__ */ i(
|
|
65
|
-
|
|
65
|
+
v,
|
|
66
66
|
{
|
|
67
67
|
className: c(o, B.tagList),
|
|
68
68
|
ref: s,
|
|
69
69
|
...t
|
|
70
70
|
}
|
|
71
71
|
);
|
|
72
|
-
}, m =
|
|
72
|
+
}, m = f(P), k = f(
|
|
73
73
|
(r, e) => {
|
|
74
74
|
const [{ className: o, children: t, ...s }, n] = d(
|
|
75
75
|
r,
|
|
76
76
|
e,
|
|
77
|
-
|
|
78
|
-
), g = N.toArray(t).filter(
|
|
77
|
+
y
|
|
78
|
+
), g = N.toArray(t).filter(w).find((l) => l.type === m);
|
|
79
79
|
return !g && process.env.NODE_ENV === "development" && console.warn(
|
|
80
80
|
"Using a TagGroup without providing a TagList component is deprecated since v17.0.0, see: https://designsystem.migrationsverket.se/components/tag/"
|
|
81
81
|
), /* @__PURE__ */ i(
|
|
82
|
-
|
|
82
|
+
x,
|
|
83
83
|
{
|
|
84
84
|
className: c(o),
|
|
85
85
|
ref: n,
|
|
@@ -89,9 +89,9 @@ import '../assets/TagGroup.css';const w = "_button_k5bh7_1", G = "_green_k5bh7_1
|
|
|
89
89
|
);
|
|
90
90
|
}
|
|
91
91
|
);
|
|
92
|
-
|
|
92
|
+
k.displayName = "TagGroup";
|
|
93
93
|
export {
|
|
94
|
-
|
|
95
|
-
|
|
94
|
+
X as T,
|
|
95
|
+
k as a,
|
|
96
96
|
m as b
|
|
97
97
|
};
|
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { A as s, a as p } from "./chunks/AccordionItem-
|
|
2
|
+
import { A as s, a as p } from "./chunks/AccordionItem-w6c28fSu.js";
|
|
3
3
|
import { B as m, a as i } from "./chunks/BadgeContainer-CKVsfTlF.js";
|
|
4
4
|
import { B as f, a as d } from "./chunks/Breadcrumb-Bs836gOn.js";
|
|
5
5
|
import { B as c } from "./chunks/Button-D22xOe8j.js";
|
|
@@ -28,14 +28,14 @@ import { L as Bo, a as bo } from "./chunks/Logo-DDykn5b2.js";
|
|
|
28
28
|
import { M as Do } from "./chunks/Dialog-SBj6IJAF.js";
|
|
29
29
|
import { P as Ro } from "./chunks/Popover-6cnHxDEK.js";
|
|
30
30
|
import { P as Po } from "./chunks/ProgressBar-BIfkrfrH.js";
|
|
31
|
-
import { R as vo, a as Fo } from "./chunks/Radio-
|
|
31
|
+
import { R as vo, a as Fo } from "./chunks/Radio-D-sGYrD6.js";
|
|
32
32
|
import { S as Ao } from "./chunks/SearchField-D2Mm_VUO.js";
|
|
33
|
-
import { S as Ho } from "./chunks/Select
|
|
33
|
+
import { S as Ho } from "./chunks/Select-DJ_VE1E4.js";
|
|
34
34
|
import { S as Eo } from "./chunks/Skeleton-D6mxKxuu.js";
|
|
35
35
|
import { S as wo } from "./chunks/Spinner-CfKMn18u.js";
|
|
36
36
|
import { C as Oo, a as Qo, R as Vo, T as Zo, b as jo, c as qo } from "./chunks/Table-Bg-AKi7d.js";
|
|
37
37
|
import { T as Ko, a as Uo, b as Wo, c as Xo } from "./chunks/TabList-CJSnr6O0.js";
|
|
38
|
-
import { T as _o, a as $o, b as oa } from "./chunks/TagGroup-
|
|
38
|
+
import { T as _o, a as $o, b as oa } from "./chunks/TagGroup-YCiXkdo3.js";
|
|
39
39
|
import { T as ra } from "./chunks/Text-D0r_W4lH.js";
|
|
40
40
|
import { I as ta, T as sa, a as pa, b as xa } from "./chunks/TextArea-Z4BKGpA9.js";
|
|
41
41
|
import { G as ia, T as na, a as fa, b as da, t as Ta } from "./chunks/Toast-D8euCY5O.js";
|
|
@@ -49,7 +49,7 @@ import { c as wa } from "./chunks/clsx-AexbMWKp.js";
|
|
|
49
49
|
import { DialogTrigger as Oa, MenuTrigger as Qa, RouterProvider as Va } from "react-aria-components";
|
|
50
50
|
import { u as ja } from "./chunks/useLocalizedStringFormatter-BHvsRxDk.js";
|
|
51
51
|
import { useToastState as Ja } from "react-stately";
|
|
52
|
-
const o = "17.
|
|
52
|
+
const o = "17.8.1", a = {
|
|
53
53
|
version: o
|
|
54
54
|
}, r = a.version;
|
|
55
55
|
export {
|
package/package.json
CHANGED
package/radio/Radio.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { RadioGroupProps, RadioProps, ValidationResult } from 'react-aria-components';
|
|
1
|
+
import { RadioGroupProps as AriaRadioGroupProps, RadioProps, ValidationResult } from 'react-aria-components';
|
|
2
2
|
import { InfoPopoverProps } from '../label';
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
export interface
|
|
5
|
-
children?: React.ReactNode;
|
|
4
|
+
export interface RadioGroupProps extends AriaRadioGroupProps {
|
|
6
5
|
/** Label for the RadioGroup */
|
|
7
6
|
label?: string;
|
|
8
7
|
/** Additional description rendered below the label */
|
|
@@ -13,8 +12,12 @@ export interface MVDSRadioGroupProps extends Omit<RadioGroupProps, 'children'> {
|
|
|
13
12
|
/** An assistive text that helps the user understand the field better. Will be hidden in a popover with an info icon button. */
|
|
14
13
|
popover?: InfoPopoverProps;
|
|
15
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated since v17.0.0 please use `RadioGroupProps` instead
|
|
17
|
+
*/
|
|
18
|
+
export type MVDSRadioGroupProps = RadioGroupProps;
|
|
16
19
|
/**
|
|
17
20
|
* RadioGroup is used to group several radio items together
|
|
18
21
|
*/
|
|
19
|
-
export declare const RadioGroup: React.FC<
|
|
22
|
+
export declare const RadioGroup: React.FC<RadioGroupProps>;
|
|
20
23
|
export declare const Radio: ({ className, ...rest }: RadioProps) => import("react/jsx-runtime").JSX.Element;
|
package/radio/Radio.stories.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { StoryObj } from '@storybook/react-vite';
|
|
|
2
2
|
import { RadioGroup } from './Radio';
|
|
3
3
|
declare const _default: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: import('react').FC<import('./Radio').
|
|
5
|
+
component: import('react').FC<import('./Radio').RadioGroupProps>;
|
|
6
6
|
subcomponents: {
|
|
7
7
|
Radio: ({ className, ...rest }: import('react-aria-components').RadioProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
};
|
package/radio/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from './Radio';
|
package/radio/index.js
CHANGED
package/select/index.js
CHANGED
package/tag/index.js
CHANGED
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as n, jsxs as m } from "react/jsx-runtime";
|
|
3
|
-
import { c as _ } from "./clsx-AexbMWKp.js";
|
|
4
|
-
import { DisclosureGroup as v, Disclosure as x, DisclosurePanel as C } from "react-aria-components";
|
|
5
|
-
import { createContext as I, useContext as N, useEffect as B } from "react";
|
|
6
|
-
import { B as b } from "./Button-D22xOe8j.js";
|
|
7
|
-
import { H as k } from "./Heading-nfcRc2QF.js";
|
|
8
|
-
import { F as w } from "./FeedbackStatusIcon-X9Bjgeta.js";
|
|
9
|
-
import { C as A } from "./chevron-down-BBFYYzZq.js";
|
|
10
|
-
import '../assets/AccordionItem.css';const T = "_root_17bdp_1", D = "_contained_17bdp_5", a = {
|
|
11
|
-
root: T,
|
|
12
|
-
contained: D
|
|
13
|
-
}, d = I(void 0), et = ({
|
|
14
|
-
children: o,
|
|
15
|
-
className: s,
|
|
16
|
-
isContained: i,
|
|
17
|
-
size: c = "large",
|
|
18
|
-
...e
|
|
19
|
-
}) => /* @__PURE__ */ n(d.Provider, { value: { isContained: i, size: c }, children: /* @__PURE__ */ n(
|
|
20
|
-
v,
|
|
21
|
-
{
|
|
22
|
-
className: _(
|
|
23
|
-
a.root,
|
|
24
|
-
i ? a.contained : a.uncontained,
|
|
25
|
-
s
|
|
26
|
-
),
|
|
27
|
-
...e,
|
|
28
|
-
children: o
|
|
29
|
-
}
|
|
30
|
-
) }), M = "_item_1l4iy_1", j = "_contained_1l4iy_18", z = "_medium_1l4iy_28", F = "_success_1l4iy_33", H = "_warning_1l4iy_39", P = "_info_1l4iy_45", S = "_important_1l4iy_51", E = "_triggerButton_1l4iy_62", G = "_triggerText_1l4iy_66", R = "_trigger_1l4iy_62", W = "_triggerMainContent_1l4iy_77", $ = "_chevronIcon_1l4iy_94", q = "_statusIcon_1l4iy_100", J = "_panel_1l4iy_122", K = "_content_1l4iy_130", L = "_hasBackground_1l4iy_135", O = "_header_1l4iy_139", t = {
|
|
31
|
-
item: M,
|
|
32
|
-
contained: j,
|
|
33
|
-
medium: z,
|
|
34
|
-
success: F,
|
|
35
|
-
warning: H,
|
|
36
|
-
info: P,
|
|
37
|
-
important: S,
|
|
38
|
-
triggerButton: E,
|
|
39
|
-
triggerText: G,
|
|
40
|
-
trigger: R,
|
|
41
|
-
triggerMainContent: W,
|
|
42
|
-
" ": "_ _1l4iy_1",
|
|
43
|
-
chevronIcon: $,
|
|
44
|
-
statusIcon: q,
|
|
45
|
-
panel: J,
|
|
46
|
-
content: K,
|
|
47
|
-
hasBackground: L,
|
|
48
|
-
header: O
|
|
49
|
-
}, ot = ({
|
|
50
|
-
title: o,
|
|
51
|
-
children: s,
|
|
52
|
-
className: i,
|
|
53
|
-
headingLevel: c = "h2",
|
|
54
|
-
type: e,
|
|
55
|
-
hasBackground: g = !0,
|
|
56
|
-
size: u = "large",
|
|
57
|
-
isContained: h,
|
|
58
|
-
iconAriaLabel: y,
|
|
59
|
-
...f
|
|
60
|
-
}) => {
|
|
61
|
-
const l = N(d), r = h ?? l?.isContained ?? !1, p = typeof o == "object";
|
|
62
|
-
return B(() => {
|
|
63
|
-
e && !r && console.warn(
|
|
64
|
-
"AccordionItem: When 'type' is set, it is recommended to also set 'isContained' to true for visual consistency."
|
|
65
|
-
);
|
|
66
|
-
}, [e, r]), /* @__PURE__ */ m(
|
|
67
|
-
x,
|
|
68
|
-
{
|
|
69
|
-
...f,
|
|
70
|
-
className: _(
|
|
71
|
-
t.item,
|
|
72
|
-
e && t[e],
|
|
73
|
-
(u === "medium" || l?.size === "medium") && t.medium,
|
|
74
|
-
r && t.contained,
|
|
75
|
-
i
|
|
76
|
-
),
|
|
77
|
-
children: [
|
|
78
|
-
/* @__PURE__ */ n("div", { className: t.trigger, children: /* @__PURE__ */ m(
|
|
79
|
-
b,
|
|
80
|
-
{
|
|
81
|
-
className: t.triggerButton,
|
|
82
|
-
slot: "trigger",
|
|
83
|
-
variant: "icon",
|
|
84
|
-
children: [
|
|
85
|
-
/* @__PURE__ */ n(
|
|
86
|
-
A,
|
|
87
|
-
{
|
|
88
|
-
size: 20,
|
|
89
|
-
className: t.chevronIcon
|
|
90
|
-
}
|
|
91
|
-
),
|
|
92
|
-
/* @__PURE__ */ n("div", { className: t.triggerMainContent, children: p ? o : /* @__PURE__ */ n(
|
|
93
|
-
k,
|
|
94
|
-
{
|
|
95
|
-
level: 3,
|
|
96
|
-
elementType: c,
|
|
97
|
-
className: t.triggerText,
|
|
98
|
-
children: o
|
|
99
|
-
}
|
|
100
|
-
) }),
|
|
101
|
-
e && /* @__PURE__ */ n(
|
|
102
|
-
w,
|
|
103
|
-
{
|
|
104
|
-
"aria-label": y,
|
|
105
|
-
className: t.statusIcon,
|
|
106
|
-
status: e
|
|
107
|
-
}
|
|
108
|
-
)
|
|
109
|
-
]
|
|
110
|
-
}
|
|
111
|
-
) }),
|
|
112
|
-
/* @__PURE__ */ n(C, { className: t.panel, children: /* @__PURE__ */ n(
|
|
113
|
-
"div",
|
|
114
|
-
{
|
|
115
|
-
className: _(
|
|
116
|
-
t.content,
|
|
117
|
-
g && t.hasBackground
|
|
118
|
-
),
|
|
119
|
-
children: s
|
|
120
|
-
}
|
|
121
|
-
) })
|
|
122
|
-
]
|
|
123
|
-
}
|
|
124
|
-
);
|
|
125
|
-
};
|
|
126
|
-
export {
|
|
127
|
-
et as A,
|
|
128
|
-
ot as a
|
|
129
|
-
};
|
package/chunks/Radio-F1vaYCPS.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as r, jsxs as n } from "react/jsx-runtime";
|
|
3
|
-
import { Radio as u, RadioGroup as _, Group as f } from "react-aria-components";
|
|
4
|
-
import { c as p } from "./clsx-AexbMWKp.js";
|
|
5
|
-
import { a as G, L as R } from "./Label-BNQY5OnB.js";
|
|
6
|
-
import { T as h } from "./Text-D0r_W4lH.js";
|
|
7
|
-
import { F as t } from "./FieldError-krpMBtie.js";
|
|
8
|
-
import '../assets/Radio.css';const x = "_radioGroup_1ls9z_1", w = "_wrap_1ls9z_12", z = "_radio_1ls9z_1", s = {
|
|
9
|
-
radioGroup: x,
|
|
10
|
-
wrap: w,
|
|
11
|
-
radio: z
|
|
12
|
-
}, T = ({
|
|
13
|
-
label: o,
|
|
14
|
-
description: a,
|
|
15
|
-
errorMessage: i,
|
|
16
|
-
children: l,
|
|
17
|
-
className: c,
|
|
18
|
-
errorPosition: d = "top",
|
|
19
|
-
popover: e,
|
|
20
|
-
...m
|
|
21
|
-
}) => /* @__PURE__ */ n(
|
|
22
|
-
_,
|
|
23
|
-
{
|
|
24
|
-
...m,
|
|
25
|
-
className: p(s.radioGroup, c),
|
|
26
|
-
children: [
|
|
27
|
-
/* @__PURE__ */ r(G, { popover: e, children: o && /* @__PURE__ */ r(R, { children: o }) }),
|
|
28
|
-
a && /* @__PURE__ */ r(h, { slot: "description", children: a }),
|
|
29
|
-
d === "top" && /* @__PURE__ */ r(t, { "data-testid": "fieldError", children: i }),
|
|
30
|
-
/* @__PURE__ */ r(f, { className: s.wrap, children: l }),
|
|
31
|
-
d === "bottom" && /* @__PURE__ */ r(t, { "data-testid": "fieldError", children: i })
|
|
32
|
-
]
|
|
33
|
-
}
|
|
34
|
-
), $ = ({ className: o, ...a }) => /* @__PURE__ */ r(
|
|
35
|
-
u,
|
|
36
|
-
{
|
|
37
|
-
className: p(s.radio, o),
|
|
38
|
-
...a
|
|
39
|
-
}
|
|
40
|
-
);
|
|
41
|
-
export {
|
|
42
|
-
$ as R,
|
|
43
|
-
T as a
|
|
44
|
-
};
|