@midas-ds/components 16.4.2 → 16.5.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/CHANGELOG.md +26 -0
- package/accordion/Accordion.d.ts +6 -2
- package/accordion/Accordion.stories.d.ts +1 -1
- package/accordion/AccordionItem.d.ts +2 -3
- package/accordion/AccordionItem.stories.d.ts +22 -0
- package/accordion/index.d.ts +1 -1
- package/accordion/index.js +1 -1
- package/assets/DateField.css +1 -1
- package/assets/DateRangePicker.css +1 -1
- package/button/Button.d.ts +1 -1
- package/button/index.js +1 -1
- package/calendar/index.js +1 -1
- package/checkbox/index.js +1 -1
- package/chunks/{AccordionItem-Cu5L1c1h.js → AccordionItem-BvJQhuYO.js} +3 -3
- package/chunks/Button-BGu-SRi7.js +55 -0
- package/chunks/{CheckboxGroup-C6LIpj_R.js → CheckboxGroup-C5NpRdqR.js} +1 -1
- package/chunks/{ClearButton-DavPe5uU.js → ClearButton-Dtkd_M_7.js} +1 -1
- package/chunks/{ComboBox-BXcuyHPd.js → ComboBox-BrpJ6b7d.js} +1 -1
- package/chunks/DateField-CodiOrfY.js +91 -0
- package/chunks/DateRangePicker-DQB5TrfF.js +192 -0
- package/chunks/{Dialog-DprWZBKT.js → Dialog-DRpxD3Gh.js} +1 -1
- package/chunks/{InfoBanner-BOKZ4lBE.js → InfoBanner-DEwlyEud.js} +1 -1
- package/chunks/{Label-6SXmzRZE.js → Label-xWKvOuML.js} +1 -1
- package/chunks/{Layout-BUK3KFXi.js → Layout-BiPXXkKY.js} +1 -1
- package/chunks/{ProgressBar-67lCngwJ.js → ProgressBar-KQdaaME2.js} +1 -1
- package/chunks/{Radio-XQA8CylD.js → Radio-Clk616ep.js} +1 -1
- package/chunks/{RangeCalendar-Bt8q3FZi.js → RangeCalendar-pgiXYhpG.js} +1 -1
- package/chunks/{SearchField-Jqn3dKGs.js → SearchField-C493CTGJ.js} +2 -2
- package/chunks/{Select-CyYUhMOg.js → Select-CaSZY6w_.js} +2 -2
- package/chunks/{Select-BNCz_ox4.js → Select-D9db38XE.js} +2 -2
- package/chunks/{Tag-BKcduKRR.js → Tag-CZrQBEgv.js} +1 -1
- package/chunks/{TextArea-BM5wOL3b.js → TextArea-kEpt5DKm.js} +2 -2
- package/chunks/{Toast-C-EV39pd.js → Toast-BehM7JJP.js} +1 -1
- package/clear-button/index.js +1 -1
- package/combobox/ComboBox.stories.d.ts +2 -6
- package/combobox/index.js +1 -1
- package/date-field/index.js +1 -1
- package/date-picker/index.js +1 -1
- package/index.js +19 -19
- package/info-banner/index.js +1 -1
- package/label/index.js +1 -1
- package/layout/index.js +1 -1
- package/legacy-select/LegacySelect.stories.d.ts +1 -1
- package/legacy-select/index.js +1 -1
- package/modal/index.js +1 -1
- package/package.json +1 -1
- package/progress-bar/index.js +1 -1
- package/radio/index.js +1 -1
- package/search-field/index.js +1 -1
- package/select/Select.stories.d.ts +4 -3
- package/select/index.js +1 -1
- package/tag/index.js +1 -1
- package/textfield/index.js +1 -1
- package/toast/index.js +1 -1
- package/chunks/Button-BYrLbzir.js +0 -46
- package/chunks/DateField-D9CEvqnd.js +0 -91
- package/chunks/DateRangePicker-DGfdhIjR.js +0 -191
- package/combobox/utils.d.ts +0 -12
- package/legacy-select/utils.d.ts +0 -11
- package/utils/tests.d.ts +0 -17
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,29 @@
|
|
|
1
|
+
## 16.5.0 (2026-01-23)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- **components, button:** enable context props ([733668775a](https://github.com/migrationsverket/midas/commit/733668775a))
|
|
6
|
+
|
|
7
|
+
### 🩹 Fixes
|
|
8
|
+
|
|
9
|
+
- **components, date-picker:** remove focus indicator for parent element ([e97917f674](https://github.com/migrationsverket/midas/commit/e97917f674))
|
|
10
|
+
- **components, date-field:** update styles for clear button ([194d0d1901](https://github.com/migrationsverket/midas/commit/194d0d1901))
|
|
11
|
+
- **components, date-picker:** update styles for icon buttons ([3a8b469747](https://github.com/migrationsverket/midas/commit/3a8b469747))
|
|
12
|
+
|
|
13
|
+
## 16.4.3 (2026-01-20)
|
|
14
|
+
|
|
15
|
+
### 🚀 Features
|
|
16
|
+
|
|
17
|
+
- **test-utils:** add tool for common test utils ([eb2df9b414](https://github.com/migrationsverket/midas/commit/eb2df9b414))
|
|
18
|
+
|
|
19
|
+
### 🩹 Fixes
|
|
20
|
+
|
|
21
|
+
- **components, accordion:** rename types ([2f9f64de2f](https://github.com/migrationsverket/midas/commit/2f9f64de2f))
|
|
22
|
+
|
|
23
|
+
### 🧪 Tests updated
|
|
24
|
+
|
|
25
|
+
- **components:** update failing tests after data change ([ec21833a37](https://github.com/migrationsverket/midas/commit/ec21833a37))
|
|
26
|
+
|
|
1
27
|
## 16.4.2 (2026-01-19)
|
|
2
28
|
|
|
3
29
|
### 🩹 Fixes
|
package/accordion/Accordion.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DisclosureGroupProps } from 'react-aria-components';
|
|
2
2
|
import { Size } from '../common/types';
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
export interface
|
|
4
|
+
export interface AccordionProps extends DisclosureGroupProps {
|
|
5
5
|
children?: React.ReactNode;
|
|
6
6
|
isDisabled?: boolean;
|
|
7
7
|
isContained?: boolean;
|
|
@@ -10,7 +10,11 @@ export interface MidasAccordion extends DisclosureGroupProps {
|
|
|
10
10
|
**/
|
|
11
11
|
size?: Size;
|
|
12
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* @deprecated since v 16.4.1 please use AccordionProps instead
|
|
15
|
+
*/
|
|
16
|
+
export type MidasAccordion = AccordionProps;
|
|
13
17
|
/**
|
|
14
18
|
* Accordions help reduce visual clutter on a page by organizing content into collapsible sections.
|
|
15
19
|
*/
|
|
16
|
-
export declare const Accordion: React.FC<
|
|
20
|
+
export declare const Accordion: React.FC<AccordionProps>;
|
|
@@ -3,7 +3,7 @@ import { StoryObj } from '@storybook/react-vite';
|
|
|
3
3
|
import { Accordion } from '.';
|
|
4
4
|
type Story = StoryObj<typeof Accordion>;
|
|
5
5
|
declare const _default: {
|
|
6
|
-
component: React.FC<import('./Accordion').
|
|
6
|
+
component: React.FC<import('./Accordion').AccordionProps>;
|
|
7
7
|
subcomponents: {
|
|
8
8
|
AccordionItem: React.ComponentType<unknown>;
|
|
9
9
|
};
|
|
@@ -3,7 +3,7 @@ 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
|
-
interface
|
|
6
|
+
export interface AccordionItemProps extends Omit<DisclosureProps, 'children'> {
|
|
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
9
|
children?: React.ReactNode;
|
|
@@ -26,5 +26,4 @@ interface MidasAccordionItem extends Omit<DisclosureProps, 'children'> {
|
|
|
26
26
|
*/
|
|
27
27
|
iconAriaLabel?: FeedbackStatusIconProps['aria-label'];
|
|
28
28
|
}
|
|
29
|
-
export declare const AccordionItem: React.FC<
|
|
30
|
-
export {};
|
|
29
|
+
export declare const AccordionItem: React.FC<AccordionItemProps>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { AccordionItem } from './AccordionItem';
|
|
3
|
+
type Story = StoryObj<typeof AccordionItem>;
|
|
4
|
+
declare const _default: {
|
|
5
|
+
component: import('react').FC<import('./AccordionItem').AccordionItemProps>;
|
|
6
|
+
title: string;
|
|
7
|
+
tags: string[];
|
|
8
|
+
args: {
|
|
9
|
+
title: string;
|
|
10
|
+
children: string;
|
|
11
|
+
size: "large";
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export default _default;
|
|
15
|
+
export declare const Default: Story;
|
|
16
|
+
export declare const Contained: Story;
|
|
17
|
+
export declare const Success: Story;
|
|
18
|
+
export declare const Info: Story;
|
|
19
|
+
export declare const Warning: Story;
|
|
20
|
+
export declare const Important: Story;
|
|
21
|
+
export declare const Disabled: Story;
|
|
22
|
+
export declare const StatusDisabled: Story;
|
package/accordion/index.d.ts
CHANGED
package/accordion/index.js
CHANGED
package/assets/DateField.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._dateField_1ywx9_1{font-family:var(--midas-typography-font-family);display:flex;flex-direction:column;align-items:flex-start}._dateField_1ywx9_1[data-readonly] ._inputField_1ywx9_7{background-color:transparent;border-bottom-color:var(--midas-border-color-subtle)}._dateField_1ywx9_1[data-disabled] ._inputField_1ywx9_7{color:var(--midas-text-disabled);cursor:not-allowed;border-bottom-color:var(--midas-border-color-disabled);background-color:var(--midas-field-disabled)}._dateField_1ywx9_1[data-invalid] ._inputField_1ywx9_7{box-shadow:inset 0 0 0 3px var(--midas-support-border-warning);border-color:transparent}._inputField_1ywx9_7{box-sizing:border-box;width:100%;min-height:var(--midas-size-150);display:flex;justify-content:space-between;align-items:center;background-color:var(--midas-field-01-base);border:1px solid transparent;border-bottom-color:var(--midas-border-color-primary);padding:0 0 0 1rem;position:relative}._inputField_1ywx9_7._medium_1ywx9_38{min-height:var(--midas-size-130)}._dateField_1ywx9_1:not([data-disabled],[data-readonly]) ._inputField_1ywx9_7 :hover{background-color:var(--midas-field-01-hover)}._clearButton_1ywx9_47{border:none;background-color:transparent}@media(forced-colors:active){._inputField_1ywx9_7{border:1px solid var(--midas-border-color-primary)}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._datePicker_1pnmm_1{font-family:var(--midas-typography-font-family);display:flex;flex-direction:column;align-items:flex-start}._inputField_1pnmm_8{box-sizing:border-box;width:100%;height:var(--midas-size-150);align-items:center;background-color:var(--midas-field-01-base);border-bottom:1px solid var(--midas-border-color-primary);padding-left:1rem;display:flex;justify-content:flex-start;gap:1rem}@media(forced-colors:active){._inputField_1pnmm_8{border:1px solid var(--midas-border-color-primary)}}._inputField_1pnmm_8._medium_1pnmm_24{height:var(--midas-size-130)}._inputField_1pnmm_8[data-disabled]{cursor:not-allowed;border-color:var(--midas-border-color-disabled)}._inputField_1pnmm_8:focus-visible,._inputField_1pnmm_8[data-focus-visible]{outline:none}._inputField_1pnmm_8[data-invalid]{border:none;box-shadow:inset 0 0 0 3px var(--midas-support-border-warning)}@media(forced-colors:active){._inputField_1pnmm_8[data-invalid]{border:1px solid var(--midas-border-color-primary)}}._inputField_1pnmm_8._readOnly_1pnmm_47{background-color:transparent;border-color:var(--midas-border-color-subtle)}._inputField_1pnmm_8 ._buttonGroup_1pnmm_52{display:flex;margin-left:auto;gap:0}._inputField_1pnmm_8 ._iconButton_1pnmm_58{border:none}._inputField_1pnmm_8 ._iconButton_1pnmm_58[data-disabled]{background-color:transparent}._inputField_1pnmm_8 ._iconButton_1pnmm_58:focus-visible,._inputField_1pnmm_8 ._iconButton_1pnmm_58[data-focus-visible]{outline:none;box-shadow:var(--midas-state-focus-inset)}@media(forced-colors:active){._inputField_1pnmm_8 ._iconButton_1pnmm_58:focus-visible,._inputField_1pnmm_8 ._iconButton_1pnmm_58[data-focus-visible]{outline:3px solid highlight;outline-offset:2px}}._dialog_1pnmm_78{box-shadow:0 3px 5px #0003}
|
package/button/Button.d.ts
CHANGED
|
@@ -43,4 +43,4 @@ export type MidasButton = MidasButtonProps & ButtonProps;
|
|
|
43
43
|
*
|
|
44
44
|
* @see {@link https://designsystem.migrationsverket.se/components/button}
|
|
45
45
|
*/
|
|
46
|
-
export declare const Button: React.
|
|
46
|
+
export declare const Button: React.ForwardRefExoticComponent<MidasButtonProps & ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
package/button/index.js
CHANGED
package/calendar/index.js
CHANGED
package/checkbox/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx as n, jsxs as m } from "react/jsx-runtime";
|
|
|
2
2
|
import { c as d } from "./clsx-AexbMWKp.js";
|
|
3
3
|
import { DisclosureGroup as f, Disclosure as v, DisclosurePanel as C } from "react-aria-components";
|
|
4
4
|
import { createContext as I, useContext as N, useEffect as B } from "react";
|
|
5
|
-
import { B as k } from "./Button-
|
|
5
|
+
import { B as k } from "./Button-BGu-SRi7.js";
|
|
6
6
|
import { H as w } from "./Heading-D8tNNJkt.js";
|
|
7
7
|
import { F as A } from "./FeedbackStatusIcon-YJaUAfjp.js";
|
|
8
8
|
import { C as T } from "./chevron-down-DgT-uSF9.js";
|
|
@@ -123,6 +123,6 @@ import '../assets/AccordionItem.css';const D = "_root_17bdp_1", M = "_contained_
|
|
|
123
123
|
);
|
|
124
124
|
};
|
|
125
125
|
export {
|
|
126
|
-
|
|
127
|
-
|
|
126
|
+
et as A,
|
|
127
|
+
ot as a
|
|
128
128
|
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { jsx as e, jsxs as h, Fragment as y } from "react/jsx-runtime";
|
|
2
|
+
import { B as r } from "./Button.module-Cm0H98vy.js";
|
|
3
|
+
import { useContextProps as B, ButtonContext as x, Button as P } from "react-aria-components";
|
|
4
|
+
import { c as S } from "./clsx-AexbMWKp.js";
|
|
5
|
+
import { S as w } from "./Spinner-tvJ7rPiT.js";
|
|
6
|
+
import { forwardRef as z } from "react";
|
|
7
|
+
const F = z(
|
|
8
|
+
(i, a) => {
|
|
9
|
+
const [m, s] = B(i, a, x), {
|
|
10
|
+
children: c,
|
|
11
|
+
className: d,
|
|
12
|
+
fullwidth: l,
|
|
13
|
+
icon: o,
|
|
14
|
+
iconPlacement: p,
|
|
15
|
+
iconSize: u,
|
|
16
|
+
isPending: n,
|
|
17
|
+
size: f = "large",
|
|
18
|
+
variant: t = "primary",
|
|
19
|
+
...g
|
|
20
|
+
} = m;
|
|
21
|
+
return /* @__PURE__ */ e(
|
|
22
|
+
P,
|
|
23
|
+
{
|
|
24
|
+
className: S(
|
|
25
|
+
r.button,
|
|
26
|
+
t === "primary" && r.primary,
|
|
27
|
+
t === "secondary" && r.secondary,
|
|
28
|
+
t === "tertiary" && r.tertiary,
|
|
29
|
+
t === "danger" && r.danger,
|
|
30
|
+
t === "icon" && r.iconBtn,
|
|
31
|
+
l && r.fullwidth,
|
|
32
|
+
f === "medium" && r.medium,
|
|
33
|
+
p === "right" && r.iconRight,
|
|
34
|
+
d
|
|
35
|
+
),
|
|
36
|
+
ref: s,
|
|
37
|
+
...g,
|
|
38
|
+
children: /* @__PURE__ */ h(y, { children: [
|
|
39
|
+
o && !n && /* @__PURE__ */ e(
|
|
40
|
+
o,
|
|
41
|
+
{
|
|
42
|
+
"aria-hidden": !0,
|
|
43
|
+
size: u ?? 20
|
|
44
|
+
}
|
|
45
|
+
),
|
|
46
|
+
n && /* @__PURE__ */ e(w, { small: !0 }),
|
|
47
|
+
c
|
|
48
|
+
] })
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
export {
|
|
54
|
+
F as B
|
|
55
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as o, jsxs as h } from "react/jsx-runtime";
|
|
2
2
|
import { useCheckboxGroup as C } from "react-aria";
|
|
3
3
|
import { useCheckboxGroupState as v } from "react-stately";
|
|
4
|
-
import { a as k, L as S } from "./Label-
|
|
4
|
+
import { a as k, L as S } from "./Label-xWKvOuML.js";
|
|
5
5
|
import { T as y } from "./Text-TWzJxnto.js";
|
|
6
6
|
import * as r from "react";
|
|
7
7
|
import { C as d, s as u, a as g } from "./Checkbox-BTAfwDxU.js";
|
|
@@ -2,7 +2,7 @@ import { jsxs as l, jsx as t } from "react/jsx-runtime";
|
|
|
2
2
|
import y from "react";
|
|
3
3
|
import { ComboBox as B, Input as F, Button as w, Collection as C } from "react-aria-components";
|
|
4
4
|
import { c as s } from "./clsx-AexbMWKp.js";
|
|
5
|
-
import { a as S, L as v } from "./Label-
|
|
5
|
+
import { a as S, L as v } from "./Label-xWKvOuML.js";
|
|
6
6
|
import { T as u } from "./Text-TWzJxnto.js";
|
|
7
7
|
import { F as f } from "./FieldError-Bra5aRT3.js";
|
|
8
8
|
import { L as R } from "./ListBox-D5BBeZWL.js";
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { jsxs as p, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import * as x from "react";
|
|
3
|
+
import { DateField as h, DateFieldStateContext as D } from "react-aria-components";
|
|
4
|
+
import { c as d } from "./clsx-AexbMWKp.js";
|
|
5
|
+
import { a as g, D as B } from "./DateInputDivider-CkTB5q5k.js";
|
|
6
|
+
import { F } from "./FieldError-Bra5aRT3.js";
|
|
7
|
+
import { a as C, L as b } from "./Label-xWKvOuML.js";
|
|
8
|
+
import { T as w } from "./Text-TWzJxnto.js";
|
|
9
|
+
import { C as y } from "./ClearButton-Dtkd_M_7.js";
|
|
10
|
+
import { FocusScope as L, useFocusManager as S } from "@react-aria/focus";
|
|
11
|
+
import { u as v } from "./useLocalizedStringFormatter-BHvsRxDk.js";
|
|
12
|
+
import '../assets/DateField.css';const N = { clear: "Clear date" }, V = { clear: "Rensa datum" }, j = {
|
|
13
|
+
en: N,
|
|
14
|
+
sv: V
|
|
15
|
+
}, T = "_dateField_1ywx9_1", E = "_inputField_1ywx9_7", I = "_medium_1ywx9_38", M = "_clearButton_1ywx9_47", s = {
|
|
16
|
+
dateField: T,
|
|
17
|
+
inputField: E,
|
|
18
|
+
medium: I,
|
|
19
|
+
clearButton: M
|
|
20
|
+
}, P = ({
|
|
21
|
+
isClearable: i,
|
|
22
|
+
size: t,
|
|
23
|
+
isDisabled: o,
|
|
24
|
+
isReadOnly: r
|
|
25
|
+
}) => {
|
|
26
|
+
const l = v(j), a = x.useContext(D), n = S(), m = () => {
|
|
27
|
+
a?.setValue(null), n?.focusFirst();
|
|
28
|
+
};
|
|
29
|
+
return i && a?.value != null && !r ? /* @__PURE__ */ e(
|
|
30
|
+
y,
|
|
31
|
+
{
|
|
32
|
+
onPress: m,
|
|
33
|
+
size: t,
|
|
34
|
+
isDisabled: o,
|
|
35
|
+
"aria-label": l.format("clear"),
|
|
36
|
+
className: d(s.clearButton, {
|
|
37
|
+
[s.medium]: t === "medium"
|
|
38
|
+
})
|
|
39
|
+
}
|
|
40
|
+
) : null;
|
|
41
|
+
}, Q = ({
|
|
42
|
+
className: i,
|
|
43
|
+
description: t,
|
|
44
|
+
errorMessage: o,
|
|
45
|
+
errorPosition: r = "top",
|
|
46
|
+
label: l,
|
|
47
|
+
size: a = "large",
|
|
48
|
+
popover: n,
|
|
49
|
+
isClearable: m = !1,
|
|
50
|
+
isReadOnly: c,
|
|
51
|
+
isDisabled: u,
|
|
52
|
+
...f
|
|
53
|
+
}) => /* @__PURE__ */ p(
|
|
54
|
+
h,
|
|
55
|
+
{
|
|
56
|
+
...f,
|
|
57
|
+
isReadOnly: c,
|
|
58
|
+
isDisabled: u,
|
|
59
|
+
className: d(s.dateField, i),
|
|
60
|
+
children: [
|
|
61
|
+
/* @__PURE__ */ e(C, { popover: n, children: l && /* @__PURE__ */ e(b, { children: l }) }),
|
|
62
|
+
t && /* @__PURE__ */ e(w, { slot: "description", children: t }),
|
|
63
|
+
r === "top" && /* @__PURE__ */ e(F, { children: o }),
|
|
64
|
+
/* @__PURE__ */ e(
|
|
65
|
+
"div",
|
|
66
|
+
{
|
|
67
|
+
className: d(s.inputField, {
|
|
68
|
+
[s.medium]: a === "medium"
|
|
69
|
+
}),
|
|
70
|
+
"data-testid": "date-field_input-field",
|
|
71
|
+
children: /* @__PURE__ */ p(L, { children: [
|
|
72
|
+
/* @__PURE__ */ e(g, { children: (_) => /* @__PURE__ */ e(B, { segment: _ }) }),
|
|
73
|
+
/* @__PURE__ */ e(
|
|
74
|
+
P,
|
|
75
|
+
{
|
|
76
|
+
isClearable: m,
|
|
77
|
+
size: a,
|
|
78
|
+
isDisabled: u,
|
|
79
|
+
isReadOnly: c
|
|
80
|
+
}
|
|
81
|
+
)
|
|
82
|
+
] })
|
|
83
|
+
}
|
|
84
|
+
),
|
|
85
|
+
r === "bottom" && /* @__PURE__ */ e(F, { children: o })
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
);
|
|
89
|
+
export {
|
|
90
|
+
Q as D
|
|
91
|
+
};
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { jsx as e, jsxs as h } from "react/jsx-runtime";
|
|
2
|
+
import { Group as x, DatePickerStateContext as F, DateRangePickerStateContext as B, Popover as M, Dialog as S, DatePicker as N, DateRangePicker as R } from "react-aria-components";
|
|
3
|
+
import { a as k } from "./clsx-AexbMWKp.js";
|
|
4
|
+
import { C as G, R as L } from "./RangeCalendar-pgiXYhpG.js";
|
|
5
|
+
import { a as _, D as f, b as I } from "./DateInputDivider-CkTB5q5k.js";
|
|
6
|
+
import { F as P } from "./FieldError-Bra5aRT3.js";
|
|
7
|
+
import { a as y, L as v } from "./Label-xWKvOuML.js";
|
|
8
|
+
import { T as D } from "./Text-TWzJxnto.js";
|
|
9
|
+
import * as g from "react";
|
|
10
|
+
import { C as V } from "./ClearButton-Dtkd_M_7.js";
|
|
11
|
+
import { FocusScope as j, useFocusManager as w } from "@react-aria/focus";
|
|
12
|
+
import { B as O } from "./Button-BGu-SRi7.js";
|
|
13
|
+
import { c as T } from "./createLucideIcon-D4r5Phnh.js";
|
|
14
|
+
import { u as $ } from "./useLocalizedStringFormatter-BHvsRxDk.js";
|
|
15
|
+
import '../assets/DateRangePicker.css';const E = [
|
|
16
|
+
["path", { d: "M8 2v4", key: "1cmpym" }],
|
|
17
|
+
["path", { d: "M16 2v4", key: "4m81vk" }],
|
|
18
|
+
["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
|
|
19
|
+
["path", { d: "M3 10h18", key: "8toen8" }],
|
|
20
|
+
["path", { d: "M8 14h.01", key: "6423bh" }],
|
|
21
|
+
["path", { d: "M12 14h.01", key: "1etili" }],
|
|
22
|
+
["path", { d: "M16 14h.01", key: "1gbofw" }],
|
|
23
|
+
["path", { d: "M8 18h.01", key: "lrp35t" }],
|
|
24
|
+
["path", { d: "M12 18h.01", key: "mhygvu" }],
|
|
25
|
+
["path", { d: "M16 18h.01", key: "kzsmim" }]
|
|
26
|
+
], W = T("calendar-days", E), q = { clear: "Clear date" }, A = { clear: "Rensa datum" }, H = {
|
|
27
|
+
en: q,
|
|
28
|
+
sv: A
|
|
29
|
+
}, J = "_datePicker_1pnmm_1", K = "_inputField_1pnmm_8", Q = "_medium_1pnmm_24", U = "_readOnly_1pnmm_47", X = "_buttonGroup_1pnmm_52", Y = "_iconButton_1pnmm_58", Z = "_dialog_1pnmm_78", r = {
|
|
30
|
+
datePicker: J,
|
|
31
|
+
inputField: K,
|
|
32
|
+
medium: Q,
|
|
33
|
+
readOnly: U,
|
|
34
|
+
buttonGroup: X,
|
|
35
|
+
iconButton: Y,
|
|
36
|
+
dialog: Z
|
|
37
|
+
}, z = (t) => !!t && !!t.value && Object.prototype.hasOwnProperty.call(t.value, "start"), ee = ({
|
|
38
|
+
isClearable: t,
|
|
39
|
+
isDisabled: c,
|
|
40
|
+
isReadOnly: i,
|
|
41
|
+
size: a
|
|
42
|
+
}) => {
|
|
43
|
+
const n = g.useContext(F), s = g.useContext(B), u = $(H), l = w(), o = s ?? n, p = z(o) ? !!o.value.start && o.value.end : !!o?.value;
|
|
44
|
+
return t && p && !i ? /* @__PURE__ */ e(
|
|
45
|
+
V,
|
|
46
|
+
{
|
|
47
|
+
onPress: () => {
|
|
48
|
+
o?.setValue(null), l?.focusFirst();
|
|
49
|
+
},
|
|
50
|
+
size: a,
|
|
51
|
+
isDisabled: c,
|
|
52
|
+
"aria-label": u.format("clear"),
|
|
53
|
+
className: k(r.iconButton, {
|
|
54
|
+
[r.medium]: a === "medium"
|
|
55
|
+
})
|
|
56
|
+
}
|
|
57
|
+
) : null;
|
|
58
|
+
}, C = ({
|
|
59
|
+
children: t,
|
|
60
|
+
isDisabled: c,
|
|
61
|
+
isInvalid: i,
|
|
62
|
+
isReadOnly: a,
|
|
63
|
+
size: n = "large",
|
|
64
|
+
isClearable: s = !1
|
|
65
|
+
}) => /* @__PURE__ */ e(
|
|
66
|
+
x,
|
|
67
|
+
{
|
|
68
|
+
className: k(r.inputField, {
|
|
69
|
+
[r.medium]: n === "medium",
|
|
70
|
+
[r.readOnly]: a
|
|
71
|
+
}),
|
|
72
|
+
children: /* @__PURE__ */ h(j, { children: [
|
|
73
|
+
t,
|
|
74
|
+
/* @__PURE__ */ h("div", { className: r.buttonGroup, children: [
|
|
75
|
+
/* @__PURE__ */ e(
|
|
76
|
+
ee,
|
|
77
|
+
{
|
|
78
|
+
isClearable: s,
|
|
79
|
+
isDisabled: c,
|
|
80
|
+
isReadOnly: a,
|
|
81
|
+
size: n
|
|
82
|
+
}
|
|
83
|
+
),
|
|
84
|
+
/* @__PURE__ */ e(
|
|
85
|
+
O,
|
|
86
|
+
{
|
|
87
|
+
variant: "icon",
|
|
88
|
+
className: k(r.iconButton, {
|
|
89
|
+
[r.medium]: n === "medium",
|
|
90
|
+
[r.readOnly]: a
|
|
91
|
+
}),
|
|
92
|
+
"data-invalid": i || void 0,
|
|
93
|
+
size: n,
|
|
94
|
+
children: /* @__PURE__ */ e(
|
|
95
|
+
W,
|
|
96
|
+
{
|
|
97
|
+
"aria-hidden": !0,
|
|
98
|
+
size: 20
|
|
99
|
+
}
|
|
100
|
+
)
|
|
101
|
+
}
|
|
102
|
+
)
|
|
103
|
+
] })
|
|
104
|
+
] })
|
|
105
|
+
}
|
|
106
|
+
), b = ({
|
|
107
|
+
children: t
|
|
108
|
+
}) => /* @__PURE__ */ e(M, { children: /* @__PURE__ */ e(S, { className: r.dialog, children: t }) }), he = ({
|
|
109
|
+
className: t,
|
|
110
|
+
description: c,
|
|
111
|
+
errorMessage: i,
|
|
112
|
+
errorPosition: a = "top",
|
|
113
|
+
label: n,
|
|
114
|
+
popover: s,
|
|
115
|
+
isClearable: u = !1,
|
|
116
|
+
isReadOnly: l,
|
|
117
|
+
isDisabled: o,
|
|
118
|
+
size: p,
|
|
119
|
+
...d
|
|
120
|
+
}) => /* @__PURE__ */ h(
|
|
121
|
+
N,
|
|
122
|
+
{
|
|
123
|
+
className: k(r.datePicker, t),
|
|
124
|
+
isReadOnly: l,
|
|
125
|
+
isDisabled: o,
|
|
126
|
+
...d,
|
|
127
|
+
children: [
|
|
128
|
+
/* @__PURE__ */ e(y, { popover: s, children: n && /* @__PURE__ */ e(v, { children: n }) }),
|
|
129
|
+
c && /* @__PURE__ */ e(D, { slot: "description", children: c }),
|
|
130
|
+
a === "top" && /* @__PURE__ */ e(P, { children: i }),
|
|
131
|
+
/* @__PURE__ */ e(
|
|
132
|
+
C,
|
|
133
|
+
{
|
|
134
|
+
isClearable: u,
|
|
135
|
+
isReadOnly: l,
|
|
136
|
+
isDisabled: o,
|
|
137
|
+
size: p,
|
|
138
|
+
...d,
|
|
139
|
+
children: /* @__PURE__ */ e(_, { children: (m) => /* @__PURE__ */ e(f, { segment: m }) })
|
|
140
|
+
}
|
|
141
|
+
),
|
|
142
|
+
a === "bottom" && /* @__PURE__ */ e(P, { children: i }),
|
|
143
|
+
/* @__PURE__ */ e(b, { children: /* @__PURE__ */ e(G, {}) })
|
|
144
|
+
]
|
|
145
|
+
}
|
|
146
|
+
), ke = ({
|
|
147
|
+
className: t,
|
|
148
|
+
description: c,
|
|
149
|
+
errorMessage: i,
|
|
150
|
+
errorPosition: a = "top",
|
|
151
|
+
label: n,
|
|
152
|
+
popover: s,
|
|
153
|
+
isClearable: u = !1,
|
|
154
|
+
isReadOnly: l,
|
|
155
|
+
isDisabled: o,
|
|
156
|
+
size: p,
|
|
157
|
+
...d
|
|
158
|
+
}) => /* @__PURE__ */ h(
|
|
159
|
+
R,
|
|
160
|
+
{
|
|
161
|
+
className: k(r.datePicker, t),
|
|
162
|
+
isReadOnly: l,
|
|
163
|
+
isDisabled: o,
|
|
164
|
+
...d,
|
|
165
|
+
children: [
|
|
166
|
+
/* @__PURE__ */ e(y, { popover: s, children: n && /* @__PURE__ */ e(v, { children: n }) }),
|
|
167
|
+
c && /* @__PURE__ */ e(D, { slot: "description", children: c }),
|
|
168
|
+
a === "top" && /* @__PURE__ */ e(P, { children: i }),
|
|
169
|
+
/* @__PURE__ */ h(
|
|
170
|
+
C,
|
|
171
|
+
{
|
|
172
|
+
isClearable: u,
|
|
173
|
+
isReadOnly: l,
|
|
174
|
+
isDisabled: o,
|
|
175
|
+
size: p,
|
|
176
|
+
...d,
|
|
177
|
+
children: [
|
|
178
|
+
/* @__PURE__ */ e(_, { slot: "start", children: (m) => /* @__PURE__ */ e(f, { segment: m }) }),
|
|
179
|
+
/* @__PURE__ */ e(I, {}),
|
|
180
|
+
/* @__PURE__ */ e(_, { slot: "end", children: (m) => /* @__PURE__ */ e(f, { segment: m }) })
|
|
181
|
+
]
|
|
182
|
+
}
|
|
183
|
+
),
|
|
184
|
+
a === "bottom" && /* @__PURE__ */ e(P, { children: i }),
|
|
185
|
+
/* @__PURE__ */ e(b, { children: /* @__PURE__ */ e(L, {}) })
|
|
186
|
+
]
|
|
187
|
+
}
|
|
188
|
+
);
|
|
189
|
+
export {
|
|
190
|
+
he as D,
|
|
191
|
+
ke as a
|
|
192
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as o, jsxs as e } from "react/jsx-runtime";
|
|
2
2
|
import { ModalOverlay as n, Modal as c, Dialog as i } from "react-aria-components";
|
|
3
|
-
import { B as _ } from "./Button-
|
|
3
|
+
import { B as _ } from "./Button-BGu-SRi7.js";
|
|
4
4
|
import { H as y } from "./Heading-D8tNNJkt.js";
|
|
5
5
|
import { c as v } from "./clsx-AexbMWKp.js";
|
|
6
6
|
import { X as x } from "./x-BXShoIAM.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as e, jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import * as h from "react";
|
|
3
3
|
import { c as j } from "./clsx-AexbMWKp.js";
|
|
4
|
-
import { B as x } from "./Button-
|
|
4
|
+
import { B as x } from "./Button-BGu-SRi7.js";
|
|
5
5
|
import { F as B } from "./FeedbackStatusIcon-YJaUAfjp.js";
|
|
6
6
|
import { X as N } from "./x-BXShoIAM.js";
|
|
7
7
|
import { u as b } from "./useLocalizedStringFormatter-BHvsRxDk.js";
|
|
@@ -4,7 +4,7 @@ import s from "react";
|
|
|
4
4
|
import { c as f } from "./clsx-AexbMWKp.js";
|
|
5
5
|
import { DialogTrigger as v, Label as d } from "react-aria-components";
|
|
6
6
|
import { P as g } from "./Popover-BcEtFiU1.js";
|
|
7
|
-
import { B as u } from "./Button-
|
|
7
|
+
import { B as u } from "./Button-BGu-SRi7.js";
|
|
8
8
|
import { I as P } from "./info-kdfED7Wh.js";
|
|
9
9
|
import { u as _ } from "./useLocalizedStringFormatter-BHvsRxDk.js";
|
|
10
10
|
import '../assets/Label.css';const I = "_labelBase_f5wtf_1", x = {
|
|
@@ -4,7 +4,7 @@ import * as N from "react";
|
|
|
4
4
|
import { useState as G, useEffect as W } from "react";
|
|
5
5
|
import { c as u } from "./clsx-AexbMWKp.js";
|
|
6
6
|
import { Link as L, RouterProvider as O } from "react-aria-components";
|
|
7
|
-
import { B as M } from "./Button-
|
|
7
|
+
import { B as M } from "./Button-BGu-SRi7.js";
|
|
8
8
|
import { a as j, T as D } from "./Tooltip-m032jGgF.js";
|
|
9
9
|
import { a as y, B as I } from "./BadgeContainer-CKVsfTlF.js";
|
|
10
10
|
import { c as E } from "./createLucideIcon-D4r5Phnh.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as s, jsxs as d, Fragment as _ } from "react/jsx-runtime";
|
|
2
2
|
import { ProgressBar as f } from "react-aria-components";
|
|
3
|
-
import { L as t } from "./Label-
|
|
3
|
+
import { L as t } from "./Label-xWKvOuML.js";
|
|
4
4
|
import { c as l } from "./clsx-AexbMWKp.js";
|
|
5
5
|
import '../assets/ProgressBar.css';const N = "_progressBar_1a2ad_1", g = "_label_1a2ad_9", p = "_value_1a2ad_14", v = "_bar_1a2ad_19", h = "_fill_1a2ad_29", e = {
|
|
6
6
|
progressBar: N,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as r, jsxs as n } from "react/jsx-runtime";
|
|
2
2
|
import { Radio as u, RadioGroup as _, Group as f } from "react-aria-components";
|
|
3
3
|
import { c as p } from "./clsx-AexbMWKp.js";
|
|
4
|
-
import { a as G, L as R } from "./Label-
|
|
4
|
+
import { a as G, L as R } from "./Label-xWKvOuML.js";
|
|
5
5
|
import { T as h } from "./Text-TWzJxnto.js";
|
|
6
6
|
import { F as t } from "./FieldError-Bra5aRT3.js";
|
|
7
7
|
import '../assets/Radio.css';const x = "_radioGroup_1ls9z_1", w = "_wrap_1ls9z_12", z = "_radio_1ls9z_1", s = {
|
|
@@ -3,7 +3,7 @@ import { RangeCalendarContext as h, CalendarGrid as C, CalendarCell as g, Calend
|
|
|
3
3
|
import { c as p, a as l } from "./clsx-AexbMWKp.js";
|
|
4
4
|
import { F as c } from "./FieldError-Bra5aRT3.js";
|
|
5
5
|
import * as y from "react";
|
|
6
|
-
import { B as i } from "./Button-
|
|
6
|
+
import { B as i } from "./Button-BGu-SRi7.js";
|
|
7
7
|
import { H as f } from "./Heading-D8tNNJkt.js";
|
|
8
8
|
import { c as R } from "./createLucideIcon-D4r5Phnh.js";
|
|
9
9
|
import { C as x } from "./chevron-right-GpyqdYK4.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as u, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { s as C } from "./TextField.module-DZslrEPC.js";
|
|
3
|
-
import { B as F } from "./Button-
|
|
4
|
-
import { C as N } from "./ClearButton-
|
|
3
|
+
import { B as F } from "./Button-BGu-SRi7.js";
|
|
4
|
+
import { C as N } from "./ClearButton-Dtkd_M_7.js";
|
|
5
5
|
import { c as l } from "./clsx-AexbMWKp.js";
|
|
6
6
|
import * as x from "react";
|
|
7
7
|
import { useSearchFieldState as j } from "react-stately";
|
|
@@ -14,10 +14,10 @@ import { ListKeyboardDelegate as le, useTypeSelect as ne } from "@react-aria/sel
|
|
|
14
14
|
import { useMenuTriggerState as oe } from "@react-stately/menu";
|
|
15
15
|
import { useFormValidationState as ie } from "@react-stately/form";
|
|
16
16
|
import { useListState as re } from "@react-stately/list";
|
|
17
|
-
import { a as se, T as ae } from "./Tag-
|
|
17
|
+
import { a as se, T as ae } from "./Tag-CZrQBEgv.js";
|
|
18
18
|
import { useFormValidation as ce } from "@react-aria/form";
|
|
19
19
|
import { useVisuallyHidden as de } from "@react-aria/visually-hidden";
|
|
20
|
-
import { a as ue, L as me } from "./Label-
|
|
20
|
+
import { a as ue, L as me } from "./Label-xWKvOuML.js";
|
|
21
21
|
import { T as ge } from "./Text-TWzJxnto.js";
|
|
22
22
|
import { C as fe } from "./Checkbox-BTAfwDxU.js";
|
|
23
23
|
import { X as pe } from "./x-BXShoIAM.js";
|