@midas-ds/components 17.35.0 → 17.37.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 +33 -0
- package/assets/file-list.css +1 -1
- package/assets/menu.css +1 -1
- package/button/Button.d.ts +4 -1
- package/calendar/index.js +1 -1
- package/chunks/{calendar-uy8xBuNV.js → calendar-BJm5YpLm.js} +2 -2
- package/chunks/{color-scheme-switch-CZGgC68M.js → color-scheme-switch-DAitmhyX.js} +3 -3
- package/chunks/{combobox-Ck-7IepP.js → combobox-B6O0D9Ee.js} +1 -1
- package/chunks/{date-picker-Cn9qhe2G.js → date-picker-C2bpCweL.js} +1 -1
- package/chunks/file-list-k2ZZ-OB2.js +167 -0
- package/chunks/{list-box-Cyiu3Rq7.js → list-box-YaPiKCld.js} +4 -1
- package/chunks/menu-DVrvuxQk.js +51 -0
- package/chunks/{select-b6vie6hj.js → select-CFalvI-4.js} +1 -1
- package/color-scheme-switch/index.js +1 -1
- package/combobox/index.js +1 -1
- package/date-picker/index.js +1 -1
- package/file-list/FileList.d.ts +4 -0
- package/file-list/FileListItem.d.ts +24 -8
- package/file-list/index.js +1 -1
- package/file-list/intl/translations.json.d.ts +4 -2
- package/index.js +32 -32
- package/list-box/ListBoxItem.d.ts +4 -1
- package/list-box/index.js +1 -1
- package/menu/MenuHeader.d.ts +4 -0
- package/menu/index.d.ts +1 -0
- package/menu/index.js +1 -1
- package/package.json +1 -1
- package/select/index.js +1 -1
- package/chunks/file-list-Dld4Shgt.js +0 -138
- package/chunks/menu-7gP2Sovj.js +0 -47
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,36 @@
|
|
|
1
|
+
## 17.37.0 (2026-11-20)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- **components,menu:** add MenuHeader component ([a40cb37aa6b](https://github.com/migrationsverket/midas/commit/a40cb37aa6b))
|
|
6
|
+
|
|
7
|
+
### 📖 Documentation changes
|
|
8
|
+
|
|
9
|
+
- **docs:** add a prop playground to Button and ComboBox ([47ae949317a](https://github.com/migrationsverket/midas/commit/47ae949317a))
|
|
10
|
+
|
|
11
|
+
## 17.36.0 (2026-11-18)
|
|
12
|
+
|
|
13
|
+
### 🚀 Features
|
|
14
|
+
|
|
15
|
+
- **components,file-list:** allow preview for failed uploads ([9eefa45ed7b](https://github.com/migrationsverket/midas/commit/9eefa45ed7b))
|
|
16
|
+
- **components,file-list:** add an optional preview button ([cdce6cff9e3](https://github.com/migrationsverket/midas/commit/cdce6cff9e3))
|
|
17
|
+
|
|
18
|
+
### 🏭 Refactoring
|
|
19
|
+
|
|
20
|
+
- **components,file-list:** move preview focus handling into the row ([7a53427809e](https://github.com/migrationsverket/midas/commit/7a53427809e))
|
|
21
|
+
|
|
22
|
+
### 📖 Documentation changes
|
|
23
|
+
|
|
24
|
+
- **components,file-list:** describe all FileListItem props ([8d4a432c5c0](https://github.com/migrationsverket/midas/commit/8d4a432c5c0))
|
|
25
|
+
|
|
26
|
+
### 🔧 Maintenance
|
|
27
|
+
|
|
28
|
+
- **components,file-list:** hide the modal preview story ([bb6cfe9063b](https://github.com/migrationsverket/midas/commit/bb6cfe9063b))
|
|
29
|
+
|
|
30
|
+
### 🧪 Tests updated
|
|
31
|
+
|
|
32
|
+
- update visual regression screenshots ([0ce17025cfb](https://github.com/migrationsverket/midas/commit/0ce17025cfb))
|
|
33
|
+
|
|
1
34
|
## 17.35.0 (2026-11-17)
|
|
2
35
|
|
|
3
36
|
### 🚀 Features
|
package/assets/file-list.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._fileList_2pw69_1{gap:var(--midas-space-small);flex-direction:column;margin:0;padding:0;list-style:none;display:flex}._fileListItem_2pw69_18{--file-list-success-duration:2s;flex-direction:column;display:flex}._row_2pw69_25{background-color:var(--midas-layer-01-base);box-sizing:border-box;font-family:var(--midas-typography-font-family);height:var(--midas-size-control);transition:box-shadow var(--midas-transition-duration-fast) var(--midas-transition-timing-ease-out);align-items:center;padding-inline-start:var(--midas-space-medium);display:flex}._fileListItem_2pw69_18[data-status=error] ._row_2pw69_25{box-shadow:var(--midas-state-invalid)}._iconSlot_2pw69_46{height:var(--midas-size-icon-sm);opacity:0;transition:margin-inline-end var(--midas-transition-duration-normal) var(--midas-transition-timing-ease-out), opacity var(--midas-transition-duration-normal) var(--midas-transition-timing-ease-out), width var(--midas-transition-duration-normal) var(--midas-transition-timing-ease-out);flex-shrink:0;width:0;margin-inline-end:0;position:relative}._fileListItem_2pw69_18[data-status=uploading] ._iconSlot_2pw69_46,._fileListItem_2pw69_18[data-status=success] ._iconSlot_2pw69_46{opacity:1;width:var(--midas-size-icon-sm);margin-inline-end:var(--midas-space-small)}._progressIcon_2pw69_70{position:absolute;inset:0}._ring_2pw69_82{border:2px solid var(--midas-icon-success);box-sizing:border-box;opacity:0;border-radius:50%;position:absolute;inset:0}._fileListItem_2pw69_18[data-status=success] ._ring_2pw69_82{animation:_successRing_2pw69_1 var(--file-list-success-duration) var(--midas-transition-timing-ease-out) forwards}._checkmark_2pw69_106{height:var(--midas-size-icon-sm);opacity:0;width:var(--midas-size-icon-sm);margin:auto;position:absolute;inset:0;transform:scale(.4)}._fileListItem_2pw69_18[data-status=success] ._checkmark_2pw69_106{animation:_successCheckmark_2pw69_1 var(--file-list-success-duration) var(--midas-transition-timing-ease-out) forwards}._successIcon_2pw69_121{color:var(--midas-icon-success)}@keyframes _successRing_2pw69_1{0%,30%{opacity:1}55%,to{opacity:0}}@keyframes _successCheckmark_2pw69_1{0%,30%{opacity:0;transform:scale(.4)}55%{opacity:1;transform:scale(.65)}65%,to{opacity:1;transform:scale(1)}}@media (prefers-reduced-motion:reduce){._row_2pw69_25,._iconSlot_2pw69_46,._ring_2pw69_82,._checkmark_2pw69_106,._errorReveal_2pw69_163{transition-duration:1ms!important;animation-duration:1ms!important}}._fileInfo_2pw69_169{align-items:baseline;gap:var(--midas-space-small);flex:1;min-width:0;display:flex}._fileName_2pw69_177{color:var(--midas-text-primary);font-size:var(--midas-typography-font-size-30);font-weight:var(--midas-typography-weight-medium);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}._fileSize_2pw69_186{color:var(--midas-text-secondary);font-size:var(--midas-typography-font-size-30);flex-shrink:0}._previewButton_2pw69_192,._deleteButton_2pw69_193{color:var(--midas-icon-primary);flex-shrink:0;margin-inline-start:var(--midas-space-small)}._errorReveal_2pw69_163{max-height:0;transition:max-height var(--midas-transition-duration-normal) var(--midas-transition-timing-ease-out);overflow:clip}._fileListItem_2pw69_18[data-status=error] ._errorReveal_2pw69_163{max-height:6.25rem}
|
package/assets/menu.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._dropdownAnimation_1ljkv_4{opacity:1;transition:opacity var(--midas-transition-duration-quick) var(--midas-transition-timing-ease-out)}._dropdownAnimation_1ljkv_4[data-entering]{opacity:0}._dropdownAnimation_1ljkv_4[data-exiting]{opacity:0;transition-timing-function:var(--midas-transition-timing-ease-in)}@media (prefers-reduced-motion){._dropdownAnimation_1ljkv_4{transition:none}}.
|
|
1
|
+
._dropdownAnimation_1ljkv_4{opacity:1;transition:opacity var(--midas-transition-duration-quick) var(--midas-transition-timing-ease-out)}._dropdownAnimation_1ljkv_4[data-entering]{opacity:0}._dropdownAnimation_1ljkv_4[data-exiting]{opacity:0;transition-timing-function:var(--midas-transition-timing-ease-in)}@media (prefers-reduced-motion){._dropdownAnimation_1ljkv_4{transition:none}}._menu_hfwrp_1{max-height:inherit;box-sizing:border-box;background-color:var(--midas-layer-01-base);font-family:var(--midas-typography-font-family);overflow:auto;box-shadow:0 3px 5px #0003}._menu_hfwrp_1:focus-visible{outline:none}@media (forced-colors:active){._menu_hfwrp_1{border:1px solid}}._menu_hfwrp_1 ._menuSectionHeader_hfwrp_18,._menu_hfwrp_1 ._menuSection_hfwrp_18 header{background-color:var(--midas-layer-01-base);color:var(--midas-menu-text-section-header);font-size:var(--midas-typography-font-size-20);line-height:var(--midas-typography-line-height-20);padding:var(--midas-space-medium) var(--midas-space-medium) var(--midas-space-10) var(--midas-space-60);display:flex}._menu_hfwrp_1._medium_hfwrp_29 ._menuSectionHeader_hfwrp_18,._menu_hfwrp_1._medium_hfwrp_29 ._menuSection_hfwrp_18 header{padding:var(--midas-space-medium) var(--midas-space-60) var(--midas-space-10)}._menu_hfwrp_1 ._menuItem_hfwrp_35{background-color:var(--midas-layer-01-base);color:var(--midas-text-primary);font-size:var(--midas-typography-font-size-30);line-height:var(--midas-typography-line-height-30);padding:var(--midas-space-50) var(--midas-space-small) var(--midas-space-50) var(--midas-space-medium);justify-content:start;align-items:center;gap:0;display:flex}._menu_hfwrp_1 ._menuItem_hfwrp_35[data-disabled]{background-color:var(--midas-menu-item-background-selected);color:var(--midas-text-disabled);cursor:not-allowed}@media (forced-colors:active){._menu_hfwrp_1 ._menuItem_hfwrp_35[data-disabled]{color:graytext}}._menu_hfwrp_1 ._menuItem_hfwrp_35:focus-visible{outline:none}._menu_hfwrp_1 ._menuItem_hfwrp_35[data-focus-visible]{background-color:var(--midas-menu-item-background-selected);box-shadow:var(--midas-state-focus-inset);outline:none}@media (forced-colors:active){._menu_hfwrp_1 ._menuItem_hfwrp_35[data-focused]{outline:var(--midas-state-focus-contrast-mode-outline) solid;outline-offset:calc(var(--midas-state-focus-contrast-mode-outline) * -1)}}._menu_hfwrp_1 ._menuItem_hfwrp_35:not([data-has-submenu]){padding-right:var(--midas-space-medium)}._menu_hfwrp_1 ._menuItem_hfwrp_35[data-hovered]{background-color:var(--midas-layer-01-hover);cursor:pointer}._menu_hfwrp_1 ._menuItem_hfwrp_35[data-open]{background-color:var(--midas-button-background-secondary-active)}._menu_hfwrp_1 ._menuItem_hfwrp_35 [slot=description]{font-size:var(--midas-typography-font-size-10);line-height:var(--midas-typography-line-height-10);grid-area:description;margin:0}._menu_hfwrp_1 ._menuItem_hfwrp_35 kbd{color:var(--midas-text-secondary);font-family:var(--midas-typography-font-family);font-size:var(--midas-typography-font-size-20);margin-left:var(--midas-space-60);grid-area:kbd}._menu_hfwrp_1 ._menuItem_hfwrp_35 ._mainContent_hfwrp_104{flex:1;grid-area:main;grid-template-areas:"label kbd""description kbd";justify-content:space-between;align-items:center;display:grid}._menu_hfwrp_1 ._menuItem_hfwrp_35 ._checkMark_hfwrp_115{color:var(--midas-icon-disabled);margin-right:var(--midas-space-small)}._menu_hfwrp_1 ._menuItem_hfwrp_35 ._checkMark_hfwrp_115[data-selected]{color:var(--midas-icon-primary)}._menu_hfwrp_1 ._separator_hfwrp_125{background-color:var(--midas-layer-01-base);border-bottom:var(--midas-space-05) solid var(--midas-button-border-secondary);margin:0 var(--midas-space-xsmall) var(--midas-space-30);padding:var(--midas-space-30) 0 0;flex-direction:column;justify-content:center;align-self:stretch;align-items:flex-start;display:flex}._menu_hfwrp_1._medium_hfwrp_29 ._menuItem_hfwrp_35{padding:var(--midas-space-30) var(--midas-space-small) var(--midas-space-30) var(--midas-space-medium)}._menu_hfwrp_1._medium_hfwrp_29 ._menuItem_hfwrp_35:not([data-has-submenu]){padding-right:var(--midas-space-medium)}._menuPopover_hfwrp_148:focus-visible{outline:none}
|
package/button/Button.d.ts
CHANGED
|
@@ -35,7 +35,10 @@ export interface ButtonProps extends AriaButtonProps {
|
|
|
35
35
|
* @default 20
|
|
36
36
|
* */
|
|
37
37
|
iconSize?: number;
|
|
38
|
-
/**
|
|
38
|
+
/**
|
|
39
|
+
* Display the icon on the left or right side of the button text
|
|
40
|
+
* @default 'left'
|
|
41
|
+
*/
|
|
39
42
|
iconPlacement?: 'left' | 'right';
|
|
40
43
|
}
|
|
41
44
|
/**
|
package/calendar/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as Calendar, t as RangeCalendar } from "../chunks/calendar-
|
|
1
|
+
export { n as Calendar, t as RangeCalendar } from "../chunks/calendar-BJm5YpLm.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as e } from "./clsx-BtGY0yFD.js";
|
|
2
2
|
import { n as t } from "./button-BZHl22O1.js";
|
|
3
3
|
import { t as n } from "./heading-0P5rm7xK.js";
|
|
4
|
-
import { n as r } from "./select-
|
|
5
|
-
import { a as i, c as a, o } from "./list-box-
|
|
4
|
+
import { n as r } from "./select-CFalvI-4.js";
|
|
5
|
+
import { a as i, c as a, o } from "./list-box-YaPiKCld.js";
|
|
6
6
|
import { t as s } from "./field-error-CUYIkJWj.js";
|
|
7
7
|
import * as c from "react";
|
|
8
8
|
import { clsx as l } from "clsx";
|
|
@@ -3,7 +3,7 @@ import { t as e } from "./icons-a0WawN46.js";
|
|
|
3
3
|
import { n as t, t as n } from "./toggle-button-BVyG8F2K.js";
|
|
4
4
|
import { t as r } from "./useLocalizedStringFormatter-DU97U9ZX.js";
|
|
5
5
|
import { n as i } from "./button-BZHl22O1.js";
|
|
6
|
-
import { a,
|
|
6
|
+
import { o as a, r as o, s } from "./menu-DVrvuxQk.js";
|
|
7
7
|
import { t as c } from "./clsx-BtGY0yFD.js";
|
|
8
8
|
import * as l from "react";
|
|
9
9
|
import { useEffect as u, useState as d } from "react";
|
|
@@ -111,7 +111,7 @@ import '../assets/color-scheme-switch.css';var b = {
|
|
|
111
111
|
e ? b === "light dark" ? delete e.dataset.colorScheme : e.dataset.colorScheme = b : console.warn(`No element found for selector: "${t}"`);
|
|
112
112
|
}, [b, t]);
|
|
113
113
|
let O = r(x);
|
|
114
|
-
return /* @__PURE__ */ h(
|
|
114
|
+
return /* @__PURE__ */ h(s, { children: [/* @__PURE__ */ h(i, {
|
|
115
115
|
variant: "icon",
|
|
116
116
|
size: "medium",
|
|
117
117
|
className: c(w.trigger, p),
|
|
@@ -120,7 +120,7 @@ import '../assets/color-scheme-switch.css';var b = {
|
|
|
120
120
|
size: 20,
|
|
121
121
|
className: w.chevron
|
|
122
122
|
})]
|
|
123
|
-
}), /* @__PURE__ */ m(
|
|
123
|
+
}), /* @__PURE__ */ m(o, {
|
|
124
124
|
placement: "bottom start",
|
|
125
125
|
children: /* @__PURE__ */ h(a, {
|
|
126
126
|
onAction: (e) => C(e),
|
|
@@ -3,7 +3,7 @@ import { t as e } from "./clsx-BtGY0yFD.js";
|
|
|
3
3
|
import { n as t, t as n } from "./label-Biu5Hi7b.js";
|
|
4
4
|
import { t as r } from "./text-CtvUKU-v.js";
|
|
5
5
|
import { t as i } from "./field-error-CUYIkJWj.js";
|
|
6
|
-
import { a, c as o, t as s } from "./list-box-
|
|
6
|
+
import { a, c as o, t as s } from "./list-box-YaPiKCld.js";
|
|
7
7
|
import { t as c } from "./useLocalizedStringFormatter-DU97U9ZX.js";
|
|
8
8
|
import { useRef as l } from "react";
|
|
9
9
|
import { Button as u, ComboBox as d, Input as f } from "react-aria-components";
|
|
@@ -3,7 +3,7 @@ import { t as e } from "./clear-button-BBOWDvaE.js";
|
|
|
3
3
|
import { t } from "./useLocalizedStringFormatter-DU97U9ZX.js";
|
|
4
4
|
import { a as n, n as r, r as i, t as a } from "./date-field-DkypCMfi.js";
|
|
5
5
|
import { n as o } from "./button-BZHl22O1.js";
|
|
6
|
-
import { n as s, t as c } from "./calendar-
|
|
6
|
+
import { n as s, t as c } from "./calendar-BJm5YpLm.js";
|
|
7
7
|
import { t as l } from "./field-error-CUYIkJWj.js";
|
|
8
8
|
import { n as u, t as d } from "./label-Biu5Hi7b.js";
|
|
9
9
|
import { t as f } from "./text-CtvUKU-v.js";
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { t as e } from "./clsx-BtGY0yFD.js";
|
|
3
|
+
import { n as t } from "./button-BZHl22O1.js";
|
|
4
|
+
import { t as n } from "./progress-bar-BvueZ-dg.js";
|
|
5
|
+
import { t as r } from "./FeedbackStatusIcon-DX5ndhm3.js";
|
|
6
|
+
import { t as i } from "./field-error-CUYIkJWj.js";
|
|
7
|
+
import { t as a } from "./useLocalizedStringFormatter-DU97U9ZX.js";
|
|
8
|
+
import { useEffect as o, useId as s, useLayoutEffect as c, useRef as l } from "react";
|
|
9
|
+
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
10
|
+
import { Eye as p, Trash2 as m, X as h } from "lucide-react";
|
|
11
|
+
import { FocusScope as g, VisuallyHidden as _, useFocusManager as v } from "react-aria";
|
|
12
|
+
import '../assets/file-list.css';var y = {
|
|
13
|
+
fileList: "_fileList_2pw69_1",
|
|
14
|
+
fileListItem: "_fileListItem_2pw69_18",
|
|
15
|
+
row: "_row_2pw69_25",
|
|
16
|
+
iconSlot: "_iconSlot_2pw69_46",
|
|
17
|
+
progressIcon: "_progressIcon_2pw69_70",
|
|
18
|
+
ring: "_ring_2pw69_82",
|
|
19
|
+
successRing: "_successRing_2pw69_1",
|
|
20
|
+
checkmark: "_checkmark_2pw69_106",
|
|
21
|
+
successCheckmark: "_successCheckmark_2pw69_1",
|
|
22
|
+
successIcon: "_successIcon_2pw69_121",
|
|
23
|
+
errorReveal: "_errorReveal_2pw69_163",
|
|
24
|
+
fileInfo: "_fileInfo_2pw69_169",
|
|
25
|
+
fileName: "_fileName_2pw69_177",
|
|
26
|
+
fileSize: "_fileSize_2pw69_186",
|
|
27
|
+
previewButton: "_previewButton_2pw69_192",
|
|
28
|
+
deleteButton: "_deleteButton_2pw69_193"
|
|
29
|
+
}, b = ({ className: t, children: n, ...r }) => {
|
|
30
|
+
let i = l(null);
|
|
31
|
+
return /* @__PURE__ */ d(g, { children: /* @__PURE__ */ f("ul", {
|
|
32
|
+
...r,
|
|
33
|
+
ref: i,
|
|
34
|
+
tabIndex: -1,
|
|
35
|
+
className: e(y.fileList, t),
|
|
36
|
+
children: [/* @__PURE__ */ d(x, { containerRef: i }), n]
|
|
37
|
+
}) });
|
|
38
|
+
}, x = ({ containerRef: e }) => {
|
|
39
|
+
let t = v(), n = l(t);
|
|
40
|
+
return o(() => {
|
|
41
|
+
n.current = t;
|
|
42
|
+
}), o(() => {
|
|
43
|
+
let t = e.current;
|
|
44
|
+
if (!t) return;
|
|
45
|
+
let r = new MutationObserver((e) => {
|
|
46
|
+
e.some((e) => e.removedNodes.length > 0) && document.activeElement === document.body && (n.current?.focusFirst({ tabbable: !0 }) || t.focus());
|
|
47
|
+
});
|
|
48
|
+
return r.observe(t, { childList: !0 }), () => r.disconnect();
|
|
49
|
+
}, [e]), null;
|
|
50
|
+
}, S = {
|
|
51
|
+
en: {
|
|
52
|
+
removeFile: "Remove",
|
|
53
|
+
cancelUpload: "Cancel",
|
|
54
|
+
uploading: "Uploading",
|
|
55
|
+
uploadComplete: "Upload complete",
|
|
56
|
+
uploadFailed: "Upload failed",
|
|
57
|
+
previewFile: "Preview"
|
|
58
|
+
},
|
|
59
|
+
sv: {
|
|
60
|
+
removeFile: "Ta bort",
|
|
61
|
+
cancelUpload: "Avbryt",
|
|
62
|
+
uploading: "Laddar upp",
|
|
63
|
+
uploadComplete: "Uppladdning klar",
|
|
64
|
+
uploadFailed: "Uppladdning misslyckades",
|
|
65
|
+
previewFile: "Förhandsgranska"
|
|
66
|
+
}
|
|
67
|
+
}, C = ({ fileName: o, fileSize: g, status: v = "idle", progress: b, errorMessage: x, onCancel: C, onDelete: T, onPreview: E, className: D }) => {
|
|
68
|
+
let O = a(S), k = v === "uploading", A = v === "success", j = v === "error", M = j && !!x, N = s(), P = s(), F = A ? O.format("uploadComplete") : j ? O.format("uploadFailed") : void 0, I = [F && P, M && N].filter(Boolean).join(" ") || void 0, L = k ? C ?? T : T, R = !!E && !k, z = l(null), B = l(!1);
|
|
69
|
+
return c(() => {
|
|
70
|
+
B.current && (B.current = !1, z.current?.focus());
|
|
71
|
+
}, [R]), /* @__PURE__ */ f("li", {
|
|
72
|
+
className: e(y.fileListItem, D),
|
|
73
|
+
"data-status": v,
|
|
74
|
+
children: [
|
|
75
|
+
/* @__PURE__ */ f("div", {
|
|
76
|
+
className: y.row,
|
|
77
|
+
children: [
|
|
78
|
+
/* @__PURE__ */ f("span", {
|
|
79
|
+
className: y.iconSlot,
|
|
80
|
+
children: [
|
|
81
|
+
k && /* @__PURE__ */ d(n, {
|
|
82
|
+
shape: "circular",
|
|
83
|
+
small: !0,
|
|
84
|
+
value: b,
|
|
85
|
+
isIndeterminate: b === void 0,
|
|
86
|
+
"aria-label": `${O.format("uploading")} ${o}`,
|
|
87
|
+
className: y.progressIcon
|
|
88
|
+
}),
|
|
89
|
+
/* @__PURE__ */ d("span", {
|
|
90
|
+
className: y.ring,
|
|
91
|
+
"aria-hidden": !0
|
|
92
|
+
}),
|
|
93
|
+
A && /* @__PURE__ */ d(r, {
|
|
94
|
+
status: "success",
|
|
95
|
+
"aria-hidden": !0,
|
|
96
|
+
size: 16,
|
|
97
|
+
className: e(y.checkmark, y.successIcon)
|
|
98
|
+
})
|
|
99
|
+
]
|
|
100
|
+
}),
|
|
101
|
+
F && /* @__PURE__ */ d(_, {
|
|
102
|
+
id: P,
|
|
103
|
+
children: F
|
|
104
|
+
}),
|
|
105
|
+
/* @__PURE__ */ f("span", {
|
|
106
|
+
className: y.fileInfo,
|
|
107
|
+
children: [/* @__PURE__ */ d("span", {
|
|
108
|
+
className: y.fileName,
|
|
109
|
+
children: o
|
|
110
|
+
}), g && /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(_, { children: ", " }), /* @__PURE__ */ d("span", {
|
|
111
|
+
className: y.fileSize,
|
|
112
|
+
children: g
|
|
113
|
+
})] })]
|
|
114
|
+
}),
|
|
115
|
+
R && /* @__PURE__ */ d(w, {
|
|
116
|
+
hadFocusRef: B,
|
|
117
|
+
variant: "icon",
|
|
118
|
+
onPress: E,
|
|
119
|
+
"aria-label": `${O.format("previewFile")} ${o}`,
|
|
120
|
+
"aria-describedby": I,
|
|
121
|
+
className: y.previewButton,
|
|
122
|
+
children: /* @__PURE__ */ d(p, {
|
|
123
|
+
size: 20,
|
|
124
|
+
"aria-hidden": !0
|
|
125
|
+
})
|
|
126
|
+
}),
|
|
127
|
+
L && /* @__PURE__ */ d(t, {
|
|
128
|
+
ref: z,
|
|
129
|
+
variant: "icon",
|
|
130
|
+
onPress: L,
|
|
131
|
+
"aria-label": `${O.format(k ? "cancelUpload" : "removeFile")} ${o}`,
|
|
132
|
+
"aria-describedby": I,
|
|
133
|
+
className: y.deleteButton,
|
|
134
|
+
children: d(k ? h : m, {
|
|
135
|
+
size: 20,
|
|
136
|
+
"aria-hidden": !0
|
|
137
|
+
})
|
|
138
|
+
})
|
|
139
|
+
]
|
|
140
|
+
}),
|
|
141
|
+
/* @__PURE__ */ d("div", {
|
|
142
|
+
id: N,
|
|
143
|
+
className: y.errorReveal,
|
|
144
|
+
children: x && /* @__PURE__ */ d(i, {
|
|
145
|
+
isInvalid: !0,
|
|
146
|
+
children: x
|
|
147
|
+
})
|
|
148
|
+
}),
|
|
149
|
+
/* @__PURE__ */ f(_, {
|
|
150
|
+
role: "status",
|
|
151
|
+
children: [A && `${O.format("uploadComplete")}: ${o}`, M && `${o}: ${x}`]
|
|
152
|
+
})
|
|
153
|
+
]
|
|
154
|
+
});
|
|
155
|
+
}, w = ({ hadFocusRef: e, ...n }) => {
|
|
156
|
+
let r = l(null);
|
|
157
|
+
return c(() => {
|
|
158
|
+
let t = r.current;
|
|
159
|
+
return () => {
|
|
160
|
+
t && document.activeElement === t && (e.current = !0);
|
|
161
|
+
};
|
|
162
|
+
}, [e]), /* @__PURE__ */ d(t, {
|
|
163
|
+
...n,
|
|
164
|
+
ref: r
|
|
165
|
+
});
|
|
166
|
+
};
|
|
167
|
+
export { b as n, C as t };
|
|
@@ -50,7 +50,10 @@ var g = class extends u {
|
|
|
50
50
|
className: _.textContent,
|
|
51
51
|
children: e
|
|
52
52
|
}))
|
|
53
|
-
})
|
|
53
|
+
});
|
|
54
|
+
b.displayName = "ListBoxItem";
|
|
55
|
+
// src/list-box/ListBoxPopover.tsx
|
|
56
|
+
var x = ({ className: t, children: n, ...r }) => /* @__PURE__ */ m(d, {
|
|
54
57
|
className: e(t, _.listBoxPopover),
|
|
55
58
|
offset: 0,
|
|
56
59
|
...r,
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { t as e } from "./clsx-BtGY0yFD.js";
|
|
2
|
+
import { Header as t, Menu as n, MenuItem as r, MenuSection as i, MenuTrigger as a, Popover as o, Separator as s } from "react-aria-components";
|
|
3
|
+
import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
4
|
+
import { Check as d, ChevronRight as f } from "lucide-react";
|
|
5
|
+
import '../assets/menu.css';var p = {
|
|
6
|
+
menu: "_menu_hfwrp_1",
|
|
7
|
+
menuSectionHeader: "_menuSectionHeader_hfwrp_18",
|
|
8
|
+
menuSection: "_menuSection_hfwrp_18",
|
|
9
|
+
medium: "_medium_hfwrp_29",
|
|
10
|
+
menuItem: "_menuItem_hfwrp_35",
|
|
11
|
+
mainContent: "_mainContent_hfwrp_104",
|
|
12
|
+
checkMark: "_checkMark_hfwrp_115",
|
|
13
|
+
separator: "_separator_hfwrp_125",
|
|
14
|
+
menuPopover: "_menuPopover_hfwrp_148 _dropdownAnimation_1ljkv_4"
|
|
15
|
+
}, m = ({ className: t, size: r = "large", ...i }) => /* @__PURE__ */ l(n, {
|
|
16
|
+
className: e(t, p.menu, r === "medium" && p.medium),
|
|
17
|
+
...i
|
|
18
|
+
}), h = ({ className: n, ...r }) => /* @__PURE__ */ l(t, {
|
|
19
|
+
className: e(n, p.menuSectionHeader),
|
|
20
|
+
...r
|
|
21
|
+
}), g = (t) => /* @__PURE__ */ l(r, {
|
|
22
|
+
...t,
|
|
23
|
+
textValue: t.textValue || (typeof t.children == "string" ? t.children : void 0),
|
|
24
|
+
className: e(p.menuItem, t.className),
|
|
25
|
+
children: (e) => {
|
|
26
|
+
let { children: n } = t, { selectionMode: r, isSelected: i, hasSubmenu: a } = e;
|
|
27
|
+
return /* @__PURE__ */ u(c, { children: [
|
|
28
|
+
r !== "none" && /* @__PURE__ */ l(d, {
|
|
29
|
+
size: 16,
|
|
30
|
+
className: p.checkMark,
|
|
31
|
+
"data-selected": i || void 0
|
|
32
|
+
}),
|
|
33
|
+
/* @__PURE__ */ l("div", {
|
|
34
|
+
className: p.mainContent,
|
|
35
|
+
children: typeof n == "function" ? n(e) : n
|
|
36
|
+
}),
|
|
37
|
+
a && /* @__PURE__ */ l(f, { size: 20 })
|
|
38
|
+
] });
|
|
39
|
+
}
|
|
40
|
+
}), _ = ({ className: t, ...n }) => /* @__PURE__ */ l(o, {
|
|
41
|
+
className: e(t, p.menuPopover),
|
|
42
|
+
offset: 4,
|
|
43
|
+
...n
|
|
44
|
+
}), v = ({ className: t, ...n }) => /* @__PURE__ */ l(i, {
|
|
45
|
+
className: e(t, p.menuSection),
|
|
46
|
+
...n
|
|
47
|
+
}), y = ({ className: t, ...n }) => /* @__PURE__ */ l(s, {
|
|
48
|
+
className: e(t, p.separator),
|
|
49
|
+
...n
|
|
50
|
+
});
|
|
51
|
+
export { h as a, g as i, v as n, m as o, _ as r, a as s, y as t };
|
|
@@ -4,7 +4,7 @@ import { t as r } from "./text-CtvUKU-v.js";
|
|
|
4
4
|
import { t as i } from "./field-error-CUYIkJWj.js";
|
|
5
5
|
import { n as a } from "./checkbox-_8t0WxFw.js";
|
|
6
6
|
import { t as o } from "./useLocalizedStringFormatter-DU97U9ZX.js";
|
|
7
|
-
import { c as s } from "./list-box-
|
|
7
|
+
import { c as s } from "./list-box-YaPiKCld.js";
|
|
8
8
|
import { t as c } from "./popover-C7Ain5Qz.js";
|
|
9
9
|
import { n as l, r as u, t as d } from "./tag-vxSxMsqS.js";
|
|
10
10
|
import f, { useContext as p } from "react";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as ColorSchemeSwitch, t as ColorSchemeSwitchMenu } from "../chunks/color-scheme-switch-
|
|
1
|
+
export { n as ColorSchemeSwitch, t as ColorSchemeSwitchMenu } from "../chunks/color-scheme-switch-DAitmhyX.js";
|
package/combobox/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as ComboBox } from "../chunks/combobox-
|
|
1
|
+
export { t as ComboBox } from "../chunks/combobox-B6O0D9Ee.js";
|
package/date-picker/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as DatePicker, t as DateRangePicker } from "../chunks/date-picker-
|
|
1
|
+
export { n as DatePicker, t as DateRangePicker } from "../chunks/date-picker-C2bpCweL.js";
|
package/file-list/FileList.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
export type FileListProps = HTMLAttributes<HTMLUListElement>;
|
|
3
|
+
/**
|
|
4
|
+
* A list of files the user has picked or uploaded, one `FileListItem` per
|
|
5
|
+
* file. Give it an `aria-label` that says what the files are for.
|
|
6
|
+
*/
|
|
3
7
|
export declare const FileList: ({ className, children, ...props }: FileListProps) => import('react').JSX.Element;
|
|
@@ -1,27 +1,43 @@
|
|
|
1
1
|
export interface FileListItemProps {
|
|
2
|
+
/** Shown in the row, and used in the buttons' accessible names. */
|
|
2
3
|
fileName: string;
|
|
4
|
+
/** Shown after the file name, already formatted, e.g. `'1.2 MB'`. */
|
|
3
5
|
fileSize?: string;
|
|
4
|
-
/**
|
|
6
|
+
/**
|
|
7
|
+
* Where the file is in the upload. Decides what the row shows, and whether
|
|
8
|
+
* its button cancels or deletes.
|
|
9
|
+
* @default 'idle'
|
|
10
|
+
*/
|
|
5
11
|
status?: 'idle' | 'uploading' | 'success' | 'error';
|
|
6
12
|
/** 0-100. Only meaningful when `status='uploading'`; omit for indeterminate. */
|
|
7
13
|
progress?: number;
|
|
8
14
|
/** Shown below the row when `status='error'`. */
|
|
9
15
|
errorMessage?: string;
|
|
10
16
|
/**
|
|
11
|
-
* Called when the cancel button is pressed while `status='uploading'
|
|
12
|
-
*
|
|
13
|
-
* `XMLHttpRequest.abort()` or `AbortController.abort()
|
|
17
|
+
* Called when the cancel button is pressed while `status='uploading'`.
|
|
18
|
+
* This is where you'd abort the in-flight request, e.g. with
|
|
19
|
+
* `XMLHttpRequest.abort()` or `AbortController.abort()`. Falls back to
|
|
14
20
|
* `onDelete` if omitted, so an in-progress upload isn't silently left
|
|
15
21
|
* running in the background with no way to stop it.
|
|
16
22
|
*/
|
|
17
23
|
onCancel?: () => void;
|
|
18
24
|
/**
|
|
19
25
|
* Called when the delete button is pressed for any status other than
|
|
20
|
-
* `uploading` (use `onCancel` for that). `FileList`
|
|
21
|
-
*
|
|
22
|
-
*
|
|
26
|
+
* `uploading` (use `onCancel` for that). `FileList` doesn't know whether a
|
|
27
|
+
* file is uploaded or only local. If it's already stored server-side when
|
|
28
|
+
* this fires, deleting it there too is up to you.
|
|
23
29
|
*/
|
|
24
30
|
onDelete?: () => void;
|
|
31
|
+
/**
|
|
32
|
+
* Shows a preview button next to the delete button. Hidden while
|
|
33
|
+
* `uploading`, when cancelling is the main action in the row. Shown when
|
|
34
|
+
* an upload failed, since the file is still on the user's device and they
|
|
35
|
+
* can check what they picked. Opening the preview, e.g. in a `Modal` or
|
|
36
|
+
* another component, is up to you.
|
|
37
|
+
*/
|
|
38
|
+
onPreview?: () => void;
|
|
39
|
+
/** Class name for the row's `<li>`. */
|
|
25
40
|
className?: string;
|
|
26
41
|
}
|
|
27
|
-
|
|
42
|
+
/** A row in a `FileList`, showing one file and its upload status. */
|
|
43
|
+
export declare const FileListItem: ({ fileName, fileSize, status, progress, errorMessage, onCancel, onDelete, onPreview, className, }: FileListItemProps) => import('react').JSX.Element;
|
package/file-list/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as FileList, t as FileListItem } from "../chunks/file-list-
|
|
1
|
+
export { n as FileList, t as FileListItem } from "../chunks/file-list-k2ZZ-OB2.js";
|
|
@@ -4,14 +4,16 @@ declare const _default: {
|
|
|
4
4
|
"cancelUpload": "Cancel",
|
|
5
5
|
"uploading": "Uploading",
|
|
6
6
|
"uploadComplete": "Upload complete",
|
|
7
|
-
"uploadFailed": "Upload failed"
|
|
7
|
+
"uploadFailed": "Upload failed",
|
|
8
|
+
"previewFile": "Preview"
|
|
8
9
|
},
|
|
9
10
|
"sv": {
|
|
10
11
|
"removeFile": "Ta bort",
|
|
11
12
|
"cancelUpload": "Avbryt",
|
|
12
13
|
"uploading": "Laddar upp",
|
|
13
14
|
"uploadComplete": "Uppladdning klar",
|
|
14
|
-
"uploadFailed": "Uppladdning misslyckades"
|
|
15
|
+
"uploadFailed": "Uppladdning misslyckades",
|
|
16
|
+
"previewFile": "Förhandsgranska"
|
|
15
17
|
}
|
|
16
18
|
}
|
|
17
19
|
;
|
package/index.js
CHANGED
|
@@ -9,48 +9,48 @@ import { n as h, t as g } from "./chunks/button-BZHl22O1.js";
|
|
|
9
9
|
import { t as _ } from "./chunks/heading-0P5rm7xK.js";
|
|
10
10
|
import { n as v, t as y } from "./chunks/badge-C5Sdu_uw.js";
|
|
11
11
|
import { n as b, t as x } from "./chunks/breadcrumbs-BwYDyKWo.js";
|
|
12
|
-
import { n as S, t as C } from "./chunks/calendar-
|
|
12
|
+
import { n as S, t as C } from "./chunks/calendar-BJm5YpLm.js";
|
|
13
13
|
import { t as w } from "./chunks/label-Biu5Hi7b.js";
|
|
14
14
|
import { t as T } from "./chunks/popover-C7Ain5Qz.js";
|
|
15
15
|
import { n as E, r as D, t as O } from "./chunks/modal-DvTcNZNd.js";
|
|
16
16
|
import { t as k } from "./chunks/text-CtvUKU-v.js";
|
|
17
17
|
import { t as A } from "./chunks/field-error-CUYIkJWj.js";
|
|
18
18
|
import { i as j, n as M, r as N, t as P } from "./chunks/checkbox-_8t0WxFw.js";
|
|
19
|
-
import { n as F, t as I } from "./chunks/select-
|
|
20
|
-
import { a as L, c as R, i as z, n as B, o as V, r as H, s as U, t as W } from "./chunks/list-box-
|
|
19
|
+
import { n as F, t as I } from "./chunks/select-CFalvI-4.js";
|
|
20
|
+
import { a as L, c as R, i as z, n as B, o as V, r as H, s as U, t as W } from "./chunks/list-box-YaPiKCld.js";
|
|
21
21
|
import { n as G, r as K, t as q } from "./chunks/tag-vxSxMsqS.js";
|
|
22
22
|
import { a as J, c as Y, i as X, l as Z, n as Q, o as $, r as ee, s as te, t as ne } from "./chunks/card-CFy9gV47.js";
|
|
23
23
|
import { t as re } from "./chunks/character-counter-IbkPoEcq.js";
|
|
24
24
|
import { t as ie } from "./chunks/icons-a0WawN46.js";
|
|
25
25
|
import { n as ae, t as oe } from "./chunks/toggle-button-BVyG8F2K.js";
|
|
26
|
-
import { n as se, t as ce } from "./chunks/color-scheme-switch-
|
|
27
|
-
import { a as le, i as ue, n as de, o as fe, r as pe,
|
|
28
|
-
import { t as
|
|
29
|
-
import { i as
|
|
30
|
-
import { n as
|
|
31
|
-
import { t as
|
|
32
|
-
import { a as
|
|
33
|
-
import { n as
|
|
34
|
-
import { t as
|
|
35
|
-
import { t as
|
|
36
|
-
import { n as
|
|
37
|
-
import { t as
|
|
38
|
-
import { a as
|
|
39
|
-
import { n as
|
|
40
|
-
import { n as
|
|
41
|
-
import { t as
|
|
42
|
-
import { t as
|
|
43
|
-
import { i as
|
|
44
|
-
import { t as
|
|
45
|
-
import { t as
|
|
46
|
-
import { t as
|
|
47
|
-
import { a as
|
|
48
|
-
import { i as
|
|
49
|
-
import { i as
|
|
50
|
-
import { t as
|
|
51
|
-
import { a as
|
|
26
|
+
import { n as se, t as ce } from "./chunks/color-scheme-switch-DAitmhyX.js";
|
|
27
|
+
import { a as le, i as ue, n as de, o as fe, r as pe, s as me, t as he } from "./chunks/menu-DVrvuxQk.js";
|
|
28
|
+
import { t as ge } from "./chunks/combobox-B6O0D9Ee.js";
|
|
29
|
+
import { i as _e, n as ve, r as ye, t as be } from "./chunks/date-field-DkypCMfi.js";
|
|
30
|
+
import { n as xe, t as Se } from "./chunks/date-picker-C2bpCweL.js";
|
|
31
|
+
import { t as Ce } from "./chunks/drop-zone-BL3Z-Sbj.js";
|
|
32
|
+
import { a as we, i as Te, n as Ee, r as De, t as Oe } from "./chunks/empty-state-CnDZoO65.js";
|
|
33
|
+
import { n as ke, t as Ae } from "./chunks/file-list-k2ZZ-OB2.js";
|
|
34
|
+
import { t as je } from "./chunks/progress-bar-BvueZ-dg.js";
|
|
35
|
+
import { t as Me } from "./chunks/file-trigger-gOeeZzDP.js";
|
|
36
|
+
import { n as Ne, t as Pe } from "./chunks/grid-CFn_pqQX.js";
|
|
37
|
+
import { t as Fe } from "./chunks/info-banner-CFmkzyL-.js";
|
|
38
|
+
import { a as Ie, i as Le, n as Re, r as ze, t as Be } from "./chunks/layout-BwW7Scqj.js";
|
|
39
|
+
import { n as Ve, t as He } from "./chunks/tooltip-CR1uxtPd.js";
|
|
40
|
+
import { n as Ue, t as We } from "./chunks/logo-CBGOnROk.js";
|
|
41
|
+
import { t as Ge } from "./chunks/clsx-BtGY0yFD.js";
|
|
42
|
+
import { t as Ke } from "./chunks/link-button-D6t-8zQQ.js";
|
|
43
|
+
import { i as qe, n as Je, r as Ye, t as Xe } from "./chunks/radio-Li_ZoHYq.js";
|
|
44
|
+
import { t as Ze } from "./chunks/search-field-BdS63CpD.js";
|
|
45
|
+
import { t as Qe } from "./chunks/skeleton-6y5HNJZp.js";
|
|
46
|
+
import { t as $e } from "./chunks/stack-DKjRicm1.js";
|
|
47
|
+
import { a as et, i as tt, n as nt, o as rt, r as it, t as at } from "./chunks/table-Cvg_n39H.js";
|
|
48
|
+
import { i as ot, n as st, r as ct, t as lt } from "./chunks/tabs-ZCpVhr_r.js";
|
|
49
|
+
import { i as ut, n as dt, r as ft, t as pt } from "./chunks/textfield-i0dO0qgs.js";
|
|
50
|
+
import { t as mt } from "./chunks/time-field-BG2BH5HH.js";
|
|
51
|
+
import { a as ht, i as gt, n as _t, o as vt, r as yt, t as bt } from "./chunks/toast-CZHBaKdY.js";
|
|
52
52
|
// src/version.ts
|
|
53
|
-
var
|
|
53
|
+
var xt = {
|
|
54
54
|
name: "@midas-ds/components",
|
|
55
55
|
author: { name: "Migrationsverket" },
|
|
56
56
|
keywords: [
|
|
@@ -62,7 +62,7 @@ var bt = {
|
|
|
62
62
|
description: "Midas Components",
|
|
63
63
|
homepage: "https://designsystem.migrationsverket.se/",
|
|
64
64
|
license: "CC0-1.0",
|
|
65
|
-
version: "17.
|
|
65
|
+
version: "17.37.0",
|
|
66
66
|
module: "./index.js",
|
|
67
67
|
type: "module",
|
|
68
68
|
main: "./index.js",
|
|
@@ -95,4 +95,4 @@ var bt = {
|
|
|
95
95
|
"react-stately": "3.50.0"
|
|
96
96
|
}
|
|
97
97
|
}.version;
|
|
98
|
-
export { e as Accordion, t as AccordionItem, v as Badge, y as BadgeContainer, x as Breadcrumb, b as Breadcrumbs, h as Button, n as ButtonContext, g as ButtonGroup, S as Calendar, ee as Card, X as CardActionArea, J as CardActions, Q as CardBody, $ as CardContent, ne as CardHeader, te as CardImage, Y as CardLink, Z as CardTitle,
|
|
98
|
+
export { e as Accordion, t as AccordionItem, v as Badge, y as BadgeContainer, x as Breadcrumb, b as Breadcrumbs, h as Button, n as ButtonContext, g as ButtonGroup, S as Calendar, ee as Card, X as CardActionArea, J as CardActions, Q as CardBody, $ as CardContent, ne as CardHeader, te as CardImage, Y as CardLink, Z as CardTitle, at as Cell, re as CharacterCounter, M as Checkbox, N as CheckboxButton, j as CheckboxField, P as CheckboxGroup, r as Collection, se as ColorSchemeSwitch, ce as ColorSchemeSwitchMenu, nt as Column, ge as ComboBox, ie as ContrastFilled, _e as DateField, ve as DateInput, be as DateInputDivider, xe as DatePicker, Se as DateRangePicker, ye as DateSegment, O as DialogTrigger, Ce as DropZone, Oe as EmptyState, we as EmptyStateActions, Te as EmptyStateHeading, De as EmptyStateText, Ee as EmptyStateVisual, A as FieldError, ke as FileList, Ae as FileListItem, Me as FileTrigger, i as Focusable, a as Form, bt as GlobalToastRegion, Ne as Grid, Pe as GridItem, ze as Header, _ as Heading, o as I18nProvider, Fe as InfoBanner, ft as Input, w as Label, Be as Layout, f as Link, Ke as LinkButton, R as ListBox, U as ListBoxButton, W as ListBoxEmptyState, B as ListBoxHeader, V as ListBoxItem, H as ListBoxLoadMoreItem, L as ListBoxPopover, z as ListBoxSection, We as Logo, Ue as LogoContext, fe as Menu, le as MenuHeader, ue as MenuItem, pe as MenuPopover, de as MenuSection, me as MenuTrigger, E as Modal, D as ModalOverlay, Re as Navbar, T as Popover, s as Pressable, je as ProgressBar, Je as Radio, Ye as RadioButton, qe as RadioField, Xe as RadioGroup, C as RangeCalendar, d as RouterProvider, it as Row, Ze as SearchField, I as Select, F as SelectTrigger, he as Separator, Le as Sidebar, Ie as SidebarLink, Qe as Skeleton, p as Spinner, $e as Stack, ct as Tab, lt as TabList, st as TabPanel, tt as Table, et as TableBody, rt as TableHeader, c as TableLayout, ot as Tabs, K as Tag, q as TagGroup, G as TagList, k as Text, pt as TextArea, dt as TextField, ut as TextFieldBase, mt as TimeField, _t as Toast, yt as ToastProvider, gt as ToastRegion, ae as ToggleButton, oe as ToggleButtonGroup, He as Tooltip, Ve as TooltipTrigger, xt as VERSION, l as Virtualizer, Ge as clsx, ht as toastQueue, u as useLocale, m as useLocalizedStringFormatter, vt as useToastState };
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import { ListBoxItemProps } from 'react-aria-components';
|
|
2
2
|
export type { ListBoxItemProps };
|
|
3
|
-
export declare const ListBoxItem:
|
|
3
|
+
export declare const ListBoxItem: {
|
|
4
|
+
<T extends object>({ children, className, textValue, ...rest }: ListBoxItemProps<T>): import('react').JSX.Element;
|
|
5
|
+
displayName: string;
|
|
6
|
+
};
|
package/list-box/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { c as ListBox, s as ListBoxButton, t as ListBoxEmptyState, n as ListBoxHeader, o as ListBoxItem, r as ListBoxLoadMoreItem, a as ListBoxPopover, i as ListBoxSection } from "../chunks/list-box-
|
|
1
|
+
export { c as ListBox, s as ListBoxButton, t as ListBoxEmptyState, n as ListBoxHeader, o as ListBoxItem, r as ListBoxLoadMoreItem, a as ListBoxPopover, i as ListBoxSection } from "../chunks/list-box-YaPiKCld.js";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { HeaderProps as AriaHeaderProps } from 'react-aria-components';
|
|
2
|
+
import type * as React from 'react';
|
|
3
|
+
export type MenuHeaderProps = AriaHeaderProps & React.RefAttributes<HTMLElement>;
|
|
4
|
+
export declare const MenuHeader: ({ className, ...rest }: MenuHeaderProps) => React.JSX.Element;
|
package/menu/index.d.ts
CHANGED
package/menu/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { o as Menu, a as MenuHeader, i as MenuItem, r as MenuPopover, n as MenuSection, s as MenuTrigger, t as Separator } from "../chunks/menu-DVrvuxQk.js";
|
package/package.json
CHANGED
package/select/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as Select, n as SelectTrigger } from "../chunks/select-
|
|
1
|
+
export { t as Select, n as SelectTrigger } from "../chunks/select-CFalvI-4.js";
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { t as e } from "./clsx-BtGY0yFD.js";
|
|
3
|
-
import { n as t } from "./button-BZHl22O1.js";
|
|
4
|
-
import { t as n } from "./progress-bar-BvueZ-dg.js";
|
|
5
|
-
import { t as r } from "./FeedbackStatusIcon-DX5ndhm3.js";
|
|
6
|
-
import { t as i } from "./field-error-CUYIkJWj.js";
|
|
7
|
-
import { t as a } from "./useLocalizedStringFormatter-DU97U9ZX.js";
|
|
8
|
-
import { useEffect as o, useId as s, useRef as c } from "react";
|
|
9
|
-
import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
10
|
-
import { Trash2 as f, X as p } from "lucide-react";
|
|
11
|
-
import { FocusScope as m, VisuallyHidden as h, useFocusManager as g } from "react-aria";
|
|
12
|
-
import '../assets/file-list.css';var _ = {
|
|
13
|
-
fileList: "_fileList_mb5n3_1",
|
|
14
|
-
fileListItem: "_fileListItem_mb5n3_18",
|
|
15
|
-
row: "_row_mb5n3_25",
|
|
16
|
-
iconSlot: "_iconSlot_mb5n3_46",
|
|
17
|
-
progressIcon: "_progressIcon_mb5n3_70",
|
|
18
|
-
ring: "_ring_mb5n3_82",
|
|
19
|
-
successRing: "_successRing_mb5n3_1",
|
|
20
|
-
checkmark: "_checkmark_mb5n3_106",
|
|
21
|
-
successCheckmark: "_successCheckmark_mb5n3_1",
|
|
22
|
-
successIcon: "_successIcon_mb5n3_121",
|
|
23
|
-
errorReveal: "_errorReveal_mb5n3_163",
|
|
24
|
-
fileInfo: "_fileInfo_mb5n3_169",
|
|
25
|
-
fileName: "_fileName_mb5n3_177",
|
|
26
|
-
fileSize: "_fileSize_mb5n3_186",
|
|
27
|
-
deleteButton: "_deleteButton_mb5n3_192"
|
|
28
|
-
}, v = ({ className: t, children: n, ...r }) => {
|
|
29
|
-
let i = c(null);
|
|
30
|
-
return /* @__PURE__ */ u(m, { children: /* @__PURE__ */ d("ul", {
|
|
31
|
-
...r,
|
|
32
|
-
ref: i,
|
|
33
|
-
tabIndex: -1,
|
|
34
|
-
className: e(_.fileList, t),
|
|
35
|
-
children: [/* @__PURE__ */ u(y, { containerRef: i }), n]
|
|
36
|
-
}) });
|
|
37
|
-
}, y = ({ containerRef: e }) => {
|
|
38
|
-
let t = g(), n = c(t);
|
|
39
|
-
return o(() => {
|
|
40
|
-
n.current = t;
|
|
41
|
-
}), o(() => {
|
|
42
|
-
let t = e.current;
|
|
43
|
-
if (!t) return;
|
|
44
|
-
let r = new MutationObserver((e) => {
|
|
45
|
-
e.some((e) => e.removedNodes.length > 0) && document.activeElement === document.body && (n.current?.focusFirst({ tabbable: !0 }) || t.focus());
|
|
46
|
-
});
|
|
47
|
-
return r.observe(t, { childList: !0 }), () => r.disconnect();
|
|
48
|
-
}, [e]), null;
|
|
49
|
-
}, b = {
|
|
50
|
-
en: {
|
|
51
|
-
removeFile: "Remove",
|
|
52
|
-
cancelUpload: "Cancel",
|
|
53
|
-
uploading: "Uploading",
|
|
54
|
-
uploadComplete: "Upload complete",
|
|
55
|
-
uploadFailed: "Upload failed"
|
|
56
|
-
},
|
|
57
|
-
sv: {
|
|
58
|
-
removeFile: "Ta bort",
|
|
59
|
-
cancelUpload: "Avbryt",
|
|
60
|
-
uploading: "Laddar upp",
|
|
61
|
-
uploadComplete: "Uppladdning klar",
|
|
62
|
-
uploadFailed: "Uppladdning misslyckades"
|
|
63
|
-
}
|
|
64
|
-
}, x = ({ fileName: o, fileSize: c, status: m = "idle", progress: g, errorMessage: v, onCancel: y, onDelete: x, className: S }) => {
|
|
65
|
-
let C = a(b), w = m === "uploading", T = m === "success", E = m === "error", D = E && !!v, O = s(), k = s(), A = T ? C.format("uploadComplete") : E ? C.format("uploadFailed") : void 0, j = [A && k, D && O].filter(Boolean).join(" ") || void 0, M = w ? y ?? x : x;
|
|
66
|
-
return /* @__PURE__ */ d("li", {
|
|
67
|
-
className: e(_.fileListItem, S),
|
|
68
|
-
"data-status": m,
|
|
69
|
-
children: [
|
|
70
|
-
/* @__PURE__ */ d("div", {
|
|
71
|
-
className: _.row,
|
|
72
|
-
children: [
|
|
73
|
-
/* @__PURE__ */ d("span", {
|
|
74
|
-
className: _.iconSlot,
|
|
75
|
-
children: [
|
|
76
|
-
w && /* @__PURE__ */ u(n, {
|
|
77
|
-
shape: "circular",
|
|
78
|
-
small: !0,
|
|
79
|
-
value: g,
|
|
80
|
-
isIndeterminate: g === void 0,
|
|
81
|
-
"aria-label": `${C.format("uploading")} ${o}`,
|
|
82
|
-
className: _.progressIcon
|
|
83
|
-
}),
|
|
84
|
-
/* @__PURE__ */ u("span", {
|
|
85
|
-
className: _.ring,
|
|
86
|
-
"aria-hidden": !0
|
|
87
|
-
}),
|
|
88
|
-
T && /* @__PURE__ */ u(r, {
|
|
89
|
-
status: "success",
|
|
90
|
-
"aria-hidden": !0,
|
|
91
|
-
size: 16,
|
|
92
|
-
className: e(_.checkmark, _.successIcon)
|
|
93
|
-
})
|
|
94
|
-
]
|
|
95
|
-
}),
|
|
96
|
-
A && /* @__PURE__ */ u(h, {
|
|
97
|
-
id: k,
|
|
98
|
-
children: A
|
|
99
|
-
}),
|
|
100
|
-
/* @__PURE__ */ d("span", {
|
|
101
|
-
className: _.fileInfo,
|
|
102
|
-
children: [/* @__PURE__ */ u("span", {
|
|
103
|
-
className: _.fileName,
|
|
104
|
-
children: o
|
|
105
|
-
}), c && /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(h, { children: ", " }), /* @__PURE__ */ u("span", {
|
|
106
|
-
className: _.fileSize,
|
|
107
|
-
children: c
|
|
108
|
-
})] })]
|
|
109
|
-
}),
|
|
110
|
-
M && /* @__PURE__ */ u(t, {
|
|
111
|
-
variant: "icon",
|
|
112
|
-
onPress: M,
|
|
113
|
-
"aria-label": `${C.format(w ? "cancelUpload" : "removeFile")} ${o}`,
|
|
114
|
-
"aria-describedby": j,
|
|
115
|
-
className: _.deleteButton,
|
|
116
|
-
children: u(w ? p : f, {
|
|
117
|
-
size: 20,
|
|
118
|
-
"aria-hidden": !0
|
|
119
|
-
})
|
|
120
|
-
})
|
|
121
|
-
]
|
|
122
|
-
}),
|
|
123
|
-
/* @__PURE__ */ u("div", {
|
|
124
|
-
id: O,
|
|
125
|
-
className: _.errorReveal,
|
|
126
|
-
children: v && /* @__PURE__ */ u(i, {
|
|
127
|
-
isInvalid: !0,
|
|
128
|
-
children: v
|
|
129
|
-
})
|
|
130
|
-
}),
|
|
131
|
-
/* @__PURE__ */ d(h, {
|
|
132
|
-
role: "status",
|
|
133
|
-
children: [T && `${C.format("uploadComplete")}: ${o}`, D && `${o}: ${v}`]
|
|
134
|
-
})
|
|
135
|
-
]
|
|
136
|
-
});
|
|
137
|
-
};
|
|
138
|
-
export { v as n, x as t };
|
package/chunks/menu-7gP2Sovj.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./clsx-BtGY0yFD.js";
|
|
2
|
-
import { Menu as t, MenuItem as n, MenuSection as r, MenuTrigger as i, Popover as a, Separator as o } from "react-aria-components";
|
|
3
|
-
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
4
|
-
import { Check as u, ChevronRight as d } from "lucide-react";
|
|
5
|
-
import '../assets/menu.css';var f = {
|
|
6
|
-
menu: "_menu_1wm5z_1",
|
|
7
|
-
menuSection: "_menuSection_1wm5z_17",
|
|
8
|
-
medium: "_medium_1wm5z_29",
|
|
9
|
-
menuItem: "_menuItem_1wm5z_36",
|
|
10
|
-
mainContent: "_mainContent_1wm5z_105",
|
|
11
|
-
checkMark: "_checkMark_1wm5z_116",
|
|
12
|
-
separator: "_separator_1wm5z_126",
|
|
13
|
-
menuPopover: "_menuPopover_1wm5z_149 _dropdownAnimation_1ljkv_4"
|
|
14
|
-
}, p = ({ className: n, size: r = "large", ...i }) => /* @__PURE__ */ c(t, {
|
|
15
|
-
className: e(n, f.menu, r === "medium" && f.medium),
|
|
16
|
-
...i
|
|
17
|
-
}), m = (t) => /* @__PURE__ */ c(n, {
|
|
18
|
-
...t,
|
|
19
|
-
textValue: t.textValue || (typeof t.children == "string" ? t.children : void 0),
|
|
20
|
-
className: e(f.menuItem, t.className),
|
|
21
|
-
children: (e) => {
|
|
22
|
-
let { children: n } = t, { selectionMode: r, isSelected: i, hasSubmenu: a } = e;
|
|
23
|
-
return /* @__PURE__ */ l(s, { children: [
|
|
24
|
-
r !== "none" && /* @__PURE__ */ c(u, {
|
|
25
|
-
size: 16,
|
|
26
|
-
className: f.checkMark,
|
|
27
|
-
"data-selected": i || void 0
|
|
28
|
-
}),
|
|
29
|
-
/* @__PURE__ */ c("div", {
|
|
30
|
-
className: f.mainContent,
|
|
31
|
-
children: typeof n == "function" ? n(e) : n
|
|
32
|
-
}),
|
|
33
|
-
a && /* @__PURE__ */ c(d, { size: 20 })
|
|
34
|
-
] });
|
|
35
|
-
}
|
|
36
|
-
}), h = ({ className: t, ...n }) => /* @__PURE__ */ c(a, {
|
|
37
|
-
className: e(t, f.menuPopover),
|
|
38
|
-
offset: 4,
|
|
39
|
-
...n
|
|
40
|
-
}), g = ({ className: t, ...n }) => /* @__PURE__ */ c(r, {
|
|
41
|
-
className: e(t, f.menuSection),
|
|
42
|
-
...n
|
|
43
|
-
}), _ = ({ className: t, ...n }) => /* @__PURE__ */ c(o, {
|
|
44
|
-
className: e(t, f.separator),
|
|
45
|
-
...n
|
|
46
|
-
});
|
|
47
|
-
export { p as a, m as i, g as n, i as o, h as r, _ as t };
|