@midas-ds/components 17.28.1 → 17.29.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/TextField.css +1 -1
- package/assets/file-list.css +1 -1
- package/assets/progress-bar.css +1 -1
- package/chunks/TextField.module-BLGiCC4q.js +12 -0
- package/chunks/file-list-B4vG_egr.js +161 -0
- package/chunks/progress-bar-CknF4qAm.js +65 -0
- package/chunks/{search-field-BvfOHvUI.js → search-field-GNTRFpzf.js} +1 -1
- package/chunks/{textfield-CXqzzOtw.js → textfield-BSvCsAyC.js} +1 -1
- package/date-field/DateField.stories.d.ts +1 -0
- package/date-picker/DatePicker.stories.d.ts +1 -0
- package/file-list/FileList.stories.d.ts +15 -3
- package/file-list/FileListItem.d.ts +21 -1
- package/file-list/index.js +1 -1
- package/file-list/intl/translations.json.d.ts +10 -2
- package/index.js +11 -11
- package/package.json +1 -1
- package/progress-bar/ProgressBar.d.ts +11 -0
- package/progress-bar/ProgressBar.stories.d.ts +3 -0
- package/progress-bar/index.js +1 -1
- package/search-field/index.js +1 -1
- package/textfield/TextArea.stories.d.ts +1 -0
- package/textfield/TextField.stories.d.ts +1 -0
- package/textfield/index.js +1 -1
- package/time-field/TimeField.stories.d.ts +1 -0
- package/chunks/TextField.module-D_tUnemB.js +0 -12
- package/chunks/file-list-TmEuO1fJ.js +0 -68
- package/chunks/progress-bar-7w_kWo2f.js +0 -40
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,36 @@
|
|
|
1
|
+
## 17.29.0 (2026-10-09)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- **components,file-list:** name the file in screen reader output and announce upload errors ([37b3d4545b6](https://github.com/migrationsverket/midas/commit/37b3d4545b6))
|
|
6
|
+
- **components,file-list:** animate the upload-complete and upload-failed transitions ([76157f5d350](https://github.com/migrationsverket/midas/commit/76157f5d350))
|
|
7
|
+
- **components,file-list:** auto-restore focus to a sibling row on removal ([c5356b073ef](https://github.com/migrationsverket/midas/commit/c5356b073ef))
|
|
8
|
+
- **components,file-list,progress-bar:** add upload progress states and a circular ProgressBar ([935847ee8ce](https://github.com/migrationsverket/midas/commit/935847ee8ce))
|
|
9
|
+
|
|
10
|
+
### 🩹 Fixes
|
|
11
|
+
|
|
12
|
+
- **components,file-list:** read the upload state first in each row and separate name and size ([4ce25f2de0c](https://github.com/migrationsverket/midas/commit/4ce25f2de0c))
|
|
13
|
+
- **components,file-list:** only render the progress bar and checkmark in their own state ([d7a8371ed70](https://github.com/migrationsverket/midas/commit/d7a8371ed70))
|
|
14
|
+
|
|
15
|
+
### 🧪 Tests updated
|
|
16
|
+
|
|
17
|
+
- update visual regression screenshots ([7052703314c](https://github.com/migrationsverket/midas/commit/7052703314c))
|
|
18
|
+
- update visual regression screenshots ([c7c1aeca056](https://github.com/migrationsverket/midas/commit/c7c1aeca056))
|
|
19
|
+
|
|
20
|
+
## 17.28.2 (2026-10-08)
|
|
21
|
+
|
|
22
|
+
### 🩹 Fixes
|
|
23
|
+
|
|
24
|
+
- **components,text-field:** dim text color for isDisabled ([fd2792d0090](https://github.com/migrationsverket/midas/commit/fd2792d0090))
|
|
25
|
+
|
|
26
|
+
### 📖 Documentation changes
|
|
27
|
+
|
|
28
|
+
- **components,date-field,date-picker,text-area,time-field:** add stories ([8bf62618e81](https://github.com/migrationsverket/midas/commit/8bf62618e81))
|
|
29
|
+
|
|
30
|
+
### 🧪 Tests updated
|
|
31
|
+
|
|
32
|
+
- update visual regression screenshots ([11cc3df68e6](https://github.com/migrationsverket/midas/commit/11cc3df68e6))
|
|
33
|
+
|
|
1
34
|
## 17.28.1 (2026-10-08)
|
|
2
35
|
|
|
3
36
|
### 🩹 Fixes
|
package/assets/TextField.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._textField_1ddv0_1{grid-template:"Label Count"min-content"Desc Count"min-content"Error Count"min-content"Input Input"min-content"BottomError BottomError"/1fr auto;grid-auto-rows:1fr 1fr;grid-auto-columns:1fr;align-content:flex-end;width:100%;display:grid}._textField_1ddv0_1>[slot=description]{grid-area:Desc}._textField_1ddv0_1>._bottomError_1ddv0_20{grid-area:BottomError}._textField_1ddv0_1[data-disabled]{color:var(--midas-text-disabled)}._textField_1ddv0_1[data-readonly] ._textArea_1ddv0_29,._textField_1ddv0_1[data-readonly] ._input_1ddv0_30{border-color:var(--midas-border-color-subtle);background-color:#0000}._textArea_1ddv0_29{all:unset;color:var(--midas-text-primary);font-family:var(--midas-typography-font-family);border-bottom:1px solid var(--midas-border-color-primary);background-color:var(--midas-field-base,var(--midas-field-01-base));box-sizing:border-box;overflow-wrap:break-word;resize:both;grid-area:Input;justify-content:center;align-items:center;width:100%;padding:1rem 1rem 1.25rem;font-size:1rem;display:flex;overflow:auto}@media (forced-colors:active){._textArea_1ddv0_29{outline-offset:2px;outline:3px solid}}._textArea_1ddv0_29[data-hovered]{background-color:var(--midas-field-hover,var(--midas-field-01-hover))}._textArea_1ddv0_29[data-focused],._textArea_1ddv0_29[data-focus-visible]{box-shadow:var(--midas-state-focus)}@media (forced-colors:active){._textArea_1ddv0_29[data-focused],._textArea_1ddv0_29[data-focus-visible]{border:1px solid}}._textArea_1ddv0_29[data-invalid]{box-shadow:var(--midas-state-invalid);border:none}._textArea_1ddv0_29[data-disabled]{cursor:not-allowed;background-color:var(--midas-field-disabled,var(--midas-field-01-disabled));border:none;border-bottom:1px solid var(--midas-border-color-disabled);color:var(--midas-text-disabled)}._wrap_1ddv0_90{grid-area:Input;position:relative}._medium_1ddv0_95 ._input_1ddv0_30{min-height:var(--midas-size-control-md)}._input_1ddv0_30{all:unset;color:var(--midas-text-primary);font-family:var(--midas-typography-font-family);border-bottom:1px solid var(--midas-border-color-primary);background-color:var(--midas-field-base,var(--midas-field-01-base));box-sizing:border-box;width:100%;min-height:var(--midas-size-control);border-radius:0;grid-area:Input;padding:0 1rem;font-size:1rem;line-height:1}@media (forced-colors:active){._input_1ddv0_30{border:1px solid}}._input_1ddv0_30[data-hovered]{background-color:var(--midas-field-hover,var(--midas-field-01-hover))}._input_1ddv0_30[data-hovered]+._passwordText_1ddv0_123{background-color:var(--midas-field-hover,var(--midas-field-01-hover))}._input_1ddv0_30[data-focused]{box-shadow:var(--midas-state-focus)}@media (forced-colors:active){._input_1ddv0_30[data-focused]{outline-offset:2px;outline:3px solid highlight}}._input_1ddv0_30[data-invalid]{box-shadow:var(--midas-state-invalid);border:none}@media (forced-colors:active){._input_1ddv0_30[data-invalid]{border:1px solid}}._input_1ddv0_30[data-disabled]{color:var(--midas-text-disabled);cursor:not-allowed;background-color:var(--midas-field-disabled,var(--midas-field-01-disabled));border:none;border-bottom:1px solid var(--midas-border-color-disabled)}@media (forced-colors:active){._input_1ddv0_30[data-disabled]{border:1px solid}}._input_1ddv0_30::-ms-reveal{display:none}._passwordButton_1ddv0_166{z-index:calc(var(--midas-z-index-base) + var(--midas-z-index-above));position:absolute;right:0}._passwordButton_1ddv0_166[data-pressed]{background-color:#0000!important}
|
package/assets/file-list.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._fileList_mb5n3_1{gap:var(--midas-space-small);flex-direction:column;margin:0;padding:0;list-style:none;display:flex}._fileListItem_mb5n3_18{--file-list-success-duration:2s;flex-direction:column;display:flex}._row_mb5n3_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_mb5n3_18[data-status=error] ._row_mb5n3_25{box-shadow:var(--midas-state-invalid)}._iconSlot_mb5n3_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_mb5n3_18[data-status=uploading] ._iconSlot_mb5n3_46,._fileListItem_mb5n3_18[data-status=success] ._iconSlot_mb5n3_46{opacity:1;width:var(--midas-size-icon-sm);margin-inline-end:var(--midas-space-small)}._progressIcon_mb5n3_70{position:absolute;inset:0}._ring_mb5n3_82{border:2px solid var(--midas-icon-success);box-sizing:border-box;opacity:0;border-radius:50%;position:absolute;inset:0}._fileListItem_mb5n3_18[data-status=success] ._ring_mb5n3_82{animation:_successRing_mb5n3_1 var(--file-list-success-duration) var(--midas-transition-timing-ease-out) forwards}._checkmark_mb5n3_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_mb5n3_18[data-status=success] ._checkmark_mb5n3_106{animation:_successCheckmark_mb5n3_1 var(--file-list-success-duration) var(--midas-transition-timing-ease-out) forwards}._successIcon_mb5n3_121{color:var(--midas-icon-success)}@keyframes _successRing_mb5n3_1{0%,30%{opacity:1}55%,to{opacity:0}}@keyframes _successCheckmark_mb5n3_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_mb5n3_25,._iconSlot_mb5n3_46,._ring_mb5n3_82,._checkmark_mb5n3_106,._errorReveal_mb5n3_163{transition-duration:1ms!important;animation-duration:1ms!important}}._fileInfo_mb5n3_169{align-items:baseline;gap:var(--midas-space-small);flex:1;min-width:0;display:flex}._fileName_mb5n3_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_mb5n3_186{color:var(--midas-text-secondary);font-size:var(--midas-typography-font-size-30);flex-shrink:0}._deleteButton_mb5n3_192{color:var(--midas-icon-primary);flex-shrink:0;margin-inline-start:var(--midas-space-small)}._errorReveal_mb5n3_163{max-height:0;transition:max-height var(--midas-transition-duration-normal) var(--midas-transition-timing-ease-out);overflow:clip}._fileListItem_mb5n3_18[data-status=error] ._errorReveal_mb5n3_163{max-height:6.25rem}
|
package/assets/progress-bar.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._progressBar_15k4b_1{column-gap:var(--midas-space-small);grid-template-columns:1fr auto;grid-template-areas:"label value""track track";display:grid}._progressBar_15k4b_1 ._label_15k4b_9{margin:0 0 var(--midas-space-small);grid-area:label}._progressBar_15k4b_1 ._value_15k4b_14{margin:0 0 var(--midas-space-small);grid-area:value}._progressBar_15k4b_1 ._track_15k4b_19{background:var(--midas-progress-bar-track-background);grid-area:track;height:.25rem;overflow:hidden}@media (forced-colors:active){._progressBar_15k4b_1 ._track_15k4b_19{border:1px solid}}._progressBar_15k4b_1 ._track_15k4b_19 ._indicator_15k4b_29{background:var(--midas-progress-bar-indicator-background);height:100%}@media (forced-colors:active){._progressBar_15k4b_1 ._track_15k4b_19 ._indicator_15k4b_29{background:highlight}}._progressBar_15k4b_1:not([aria-valuenow]) ._indicator_15k4b_29{will-change:transform;background:var(--midas-progress-bar-indicator-background);height:100%;animation:2s var(--midas-transition-timing-ease-in-out) infinite _indeterminate_15k4b_1}@media (forced-colors:active){._progressBar_15k4b_1:not([aria-valuenow]) ._indicator_15k4b_29{background:highlight}}._progressBar_15k4b_1 ._circular_15k4b_53{height:var(--midas-size-icon);width:var(--midas-size-icon);grid-area:track;transform:rotate(-90deg)}._progressBar_15k4b_1 ._circular_15k4b_53._circularSmall_15k4b_59{height:var(--midas-size-icon-sm);width:var(--midas-size-icon-sm)}._progressBar_15k4b_1 ._circularTrack_15k4b_65{fill:none;stroke:var(--midas-progress-bar-track-background);stroke-width:2px}@media (forced-colors:active){._progressBar_15k4b_1 ._circularTrack_15k4b_65{stroke:canvastext}}._progressBar_15k4b_1 ._circularIndicator_15k4b_75{fill:none;stroke:var(--midas-progress-bar-indicator-background);stroke-linecap:round;stroke-width:2px;transition:stroke-dashoffset var(--midas-transition-duration-normal) var(--midas-transition-timing-ease-out)}@media (forced-colors:active){._progressBar_15k4b_1 ._circularIndicator_15k4b_75{stroke:highlight}}._progressBar_15k4b_1 ._circularIndicator_15k4b_75._circularIndeterminate_15k4b_87{stroke-linecap:square;transform-origin:50%;animation:1s linear infinite _circularRotate_15k4b_1}@media (prefers-reduced-motion:reduce){._progressBar_15k4b_1 ._circularIndicator_15k4b_75._circularIndeterminate_15k4b_87{animation-duration:2s}}@keyframes _indeterminate_15k4b_1{0%{transform:translate(-100%)}to{transform:translate(200%)}}@keyframes _circularRotate_15k4b_1{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){._progressBar_15k4b_1:not([aria-valuenow]) ._indicator_15k4b_29{animation-duration:6s}}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import '../assets/TextField.css';var e = {
|
|
2
|
+
textField: "_textField_1ddv0_1",
|
|
3
|
+
bottomError: "_bottomError_1ddv0_20",
|
|
4
|
+
textArea: "_textArea_1ddv0_29",
|
|
5
|
+
input: "_input_1ddv0_30",
|
|
6
|
+
wrap: "_wrap_1ddv0_90",
|
|
7
|
+
medium: "_medium_1ddv0_95",
|
|
8
|
+
passwordText: "_passwordText_1ddv0_123",
|
|
9
|
+
passwordButton: "_passwordButton_1ddv0_166"
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { e as t };
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { t as e } from "./clsx-Di52oYUU.js";
|
|
3
|
+
import { t } from "./createLucideIcon-BgluSHFG.js";
|
|
4
|
+
import { t as n } from "./FeedbackStatusIcon-DRI7WrSU.js";
|
|
5
|
+
import { t as r } from "./x-BJAOO5a5.js";
|
|
6
|
+
import { t as i } from "./useLocalizedStringFormatter-CeyBc0x0.js";
|
|
7
|
+
import { n as a } from "./button-CenXTGXL.js";
|
|
8
|
+
import { t as o } from "./field-error-LtNtEKDp.js";
|
|
9
|
+
import { t as s } from "./progress-bar-CknF4qAm.js";
|
|
10
|
+
import { useEffect as c, useId as l, useRef as u } from "react";
|
|
11
|
+
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
12
|
+
import { FocusScope as m, VisuallyHidden as h, useFocusManager as g } from "react-aria";
|
|
13
|
+
import '../assets/file-list.css';var _ = t("trash-2", [
|
|
14
|
+
["path", {
|
|
15
|
+
d: "M10 11v6",
|
|
16
|
+
key: "nco0om"
|
|
17
|
+
}],
|
|
18
|
+
["path", {
|
|
19
|
+
d: "M14 11v6",
|
|
20
|
+
key: "outv1u"
|
|
21
|
+
}],
|
|
22
|
+
["path", {
|
|
23
|
+
d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",
|
|
24
|
+
key: "miytrc"
|
|
25
|
+
}],
|
|
26
|
+
["path", {
|
|
27
|
+
d: "M3 6h18",
|
|
28
|
+
key: "d0wm0j"
|
|
29
|
+
}],
|
|
30
|
+
["path", {
|
|
31
|
+
d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",
|
|
32
|
+
key: "e791ji"
|
|
33
|
+
}]
|
|
34
|
+
]), v = {
|
|
35
|
+
fileList: "_fileList_mb5n3_1",
|
|
36
|
+
fileListItem: "_fileListItem_mb5n3_18",
|
|
37
|
+
row: "_row_mb5n3_25",
|
|
38
|
+
iconSlot: "_iconSlot_mb5n3_46",
|
|
39
|
+
progressIcon: "_progressIcon_mb5n3_70",
|
|
40
|
+
ring: "_ring_mb5n3_82",
|
|
41
|
+
successRing: "_successRing_mb5n3_1",
|
|
42
|
+
checkmark: "_checkmark_mb5n3_106",
|
|
43
|
+
successCheckmark: "_successCheckmark_mb5n3_1",
|
|
44
|
+
successIcon: "_successIcon_mb5n3_121",
|
|
45
|
+
errorReveal: "_errorReveal_mb5n3_163",
|
|
46
|
+
fileInfo: "_fileInfo_mb5n3_169",
|
|
47
|
+
fileName: "_fileName_mb5n3_177",
|
|
48
|
+
fileSize: "_fileSize_mb5n3_186",
|
|
49
|
+
deleteButton: "_deleteButton_mb5n3_192"
|
|
50
|
+
}, y = ({ className: t, children: n, ...r }) => {
|
|
51
|
+
let i = u(null);
|
|
52
|
+
return /* @__PURE__ */ f(m, { children: /* @__PURE__ */ p("ul", {
|
|
53
|
+
...r,
|
|
54
|
+
ref: i,
|
|
55
|
+
tabIndex: -1,
|
|
56
|
+
className: e(v.fileList, t),
|
|
57
|
+
children: [/* @__PURE__ */ f(b, { containerRef: i }), n]
|
|
58
|
+
}) });
|
|
59
|
+
}, b = ({ containerRef: e }) => {
|
|
60
|
+
let t = g(), n = u(t);
|
|
61
|
+
return c(() => {
|
|
62
|
+
n.current = t;
|
|
63
|
+
}), c(() => {
|
|
64
|
+
let t = e.current;
|
|
65
|
+
if (!t) return;
|
|
66
|
+
let r = new MutationObserver((e) => {
|
|
67
|
+
e.some((e) => e.removedNodes.length > 0) && document.activeElement === document.body && (n.current?.focusFirst({ tabbable: !0 }) || t.focus());
|
|
68
|
+
});
|
|
69
|
+
return r.observe(t, { childList: !0 }), () => r.disconnect();
|
|
70
|
+
}, [e]), null;
|
|
71
|
+
}, x = {
|
|
72
|
+
en: {
|
|
73
|
+
removeFile: "Remove",
|
|
74
|
+
cancelUpload: "Cancel",
|
|
75
|
+
uploading: "Uploading",
|
|
76
|
+
uploadComplete: "Upload complete",
|
|
77
|
+
uploadFailed: "Upload failed"
|
|
78
|
+
},
|
|
79
|
+
sv: {
|
|
80
|
+
removeFile: "Ta bort",
|
|
81
|
+
cancelUpload: "Avbryt",
|
|
82
|
+
uploading: "Laddar upp",
|
|
83
|
+
uploadComplete: "Uppladdning klar",
|
|
84
|
+
uploadFailed: "Uppladdning misslyckades"
|
|
85
|
+
}
|
|
86
|
+
}, S = ({ fileName: t, fileSize: c, status: u = "idle", progress: m, errorMessage: g, onCancel: y, onDelete: b, className: S }) => {
|
|
87
|
+
let C = i(x), w = u === "uploading", T = u === "success", E = u === "error", D = E && !!g, O = l(), k = l(), A = T ? C.format("uploadComplete") : E ? C.format("uploadFailed") : void 0, j = [A && k, D && O].filter(Boolean).join(" ") || void 0, M = w ? y ?? b : b;
|
|
88
|
+
return /* @__PURE__ */ p("li", {
|
|
89
|
+
className: e(v.fileListItem, S),
|
|
90
|
+
"data-status": u,
|
|
91
|
+
children: [
|
|
92
|
+
/* @__PURE__ */ p("div", {
|
|
93
|
+
className: v.row,
|
|
94
|
+
children: [
|
|
95
|
+
/* @__PURE__ */ p("span", {
|
|
96
|
+
className: v.iconSlot,
|
|
97
|
+
children: [
|
|
98
|
+
w && /* @__PURE__ */ f(s, {
|
|
99
|
+
shape: "circular",
|
|
100
|
+
small: !0,
|
|
101
|
+
value: m,
|
|
102
|
+
isIndeterminate: m === void 0,
|
|
103
|
+
"aria-label": `${C.format("uploading")} ${t}`,
|
|
104
|
+
className: v.progressIcon
|
|
105
|
+
}),
|
|
106
|
+
/* @__PURE__ */ f("span", {
|
|
107
|
+
className: v.ring,
|
|
108
|
+
"aria-hidden": !0
|
|
109
|
+
}),
|
|
110
|
+
T && /* @__PURE__ */ f(n, {
|
|
111
|
+
status: "success",
|
|
112
|
+
"aria-hidden": !0,
|
|
113
|
+
size: 16,
|
|
114
|
+
className: e(v.checkmark, v.successIcon)
|
|
115
|
+
})
|
|
116
|
+
]
|
|
117
|
+
}),
|
|
118
|
+
A && /* @__PURE__ */ f(h, {
|
|
119
|
+
id: k,
|
|
120
|
+
children: A
|
|
121
|
+
}),
|
|
122
|
+
/* @__PURE__ */ p("span", {
|
|
123
|
+
className: v.fileInfo,
|
|
124
|
+
children: [/* @__PURE__ */ f("span", {
|
|
125
|
+
className: v.fileName,
|
|
126
|
+
children: t
|
|
127
|
+
}), c && /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(h, { children: ", " }), /* @__PURE__ */ f("span", {
|
|
128
|
+
className: v.fileSize,
|
|
129
|
+
children: c
|
|
130
|
+
})] })]
|
|
131
|
+
}),
|
|
132
|
+
M && /* @__PURE__ */ f(a, {
|
|
133
|
+
variant: "icon",
|
|
134
|
+
onPress: M,
|
|
135
|
+
"aria-label": `${C.format(w ? "cancelUpload" : "removeFile")} ${t}`,
|
|
136
|
+
"aria-describedby": j,
|
|
137
|
+
className: v.deleteButton,
|
|
138
|
+
children: f(w ? r : _, {
|
|
139
|
+
size: 20,
|
|
140
|
+
"aria-hidden": !0
|
|
141
|
+
})
|
|
142
|
+
})
|
|
143
|
+
]
|
|
144
|
+
}),
|
|
145
|
+
/* @__PURE__ */ f("div", {
|
|
146
|
+
id: O,
|
|
147
|
+
className: v.errorReveal,
|
|
148
|
+
children: g && /* @__PURE__ */ f(o, {
|
|
149
|
+
isInvalid: !0,
|
|
150
|
+
children: g
|
|
151
|
+
})
|
|
152
|
+
}),
|
|
153
|
+
/* @__PURE__ */ p(h, {
|
|
154
|
+
role: "status",
|
|
155
|
+
children: [T && `${C.format("uploadComplete")}: ${t}`, D && `${t}: ${g}`]
|
|
156
|
+
})
|
|
157
|
+
]
|
|
158
|
+
});
|
|
159
|
+
};
|
|
160
|
+
//#endregion
|
|
161
|
+
export { y as n, S as t };
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { t as e } from "./clsx-Di52oYUU.js";
|
|
2
|
+
import { t } from "./label-LWlgvAwz.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { ProgressBar as n } from "react-aria-components";
|
|
5
|
+
import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
6
|
+
import '../assets/progress-bar.css';var o = {
|
|
7
|
+
progressBar: "_progressBar_15k4b_1",
|
|
8
|
+
indeterminate: "_indeterminate_15k4b_1",
|
|
9
|
+
circularRotate: "_circularRotate_15k4b_1",
|
|
10
|
+
label: "_label_15k4b_9",
|
|
11
|
+
value: "_value_15k4b_14",
|
|
12
|
+
track: "_track_15k4b_19",
|
|
13
|
+
indicator: "_indicator_15k4b_29",
|
|
14
|
+
circular: "_circular_15k4b_53",
|
|
15
|
+
circularSmall: "_circularSmall_15k4b_59",
|
|
16
|
+
circularTrack: "_circularTrack_15k4b_65",
|
|
17
|
+
circularIndicator: "_circularIndicator_15k4b_75",
|
|
18
|
+
circularIndeterminate: "_circularIndeterminate_15k4b_87"
|
|
19
|
+
}, s = 8, c = 2 * Math.PI * s, l = c * .25, u = ({ label: u, labelProps: d, showValueLabel: f = !1, shape: p = "linear", small: m = !1, ...h }) => /* @__PURE__ */ i(n, {
|
|
20
|
+
...h,
|
|
21
|
+
className: e(o.progressBar, h.className),
|
|
22
|
+
children: ({ percentage: n, valueText: h, isIndeterminate: g }) => /* @__PURE__ */ a(r, { children: [
|
|
23
|
+
u && /* @__PURE__ */ i(t, {
|
|
24
|
+
elementType: "span",
|
|
25
|
+
...d,
|
|
26
|
+
className: e(d?.className, o.label),
|
|
27
|
+
children: u
|
|
28
|
+
}),
|
|
29
|
+
f && /* @__PURE__ */ i(t, {
|
|
30
|
+
elementType: "span",
|
|
31
|
+
...d,
|
|
32
|
+
id: u ? "" : d?.id,
|
|
33
|
+
className: e(d?.className, o.value),
|
|
34
|
+
children: h
|
|
35
|
+
}),
|
|
36
|
+
p === "circular" ? /* @__PURE__ */ a("svg", {
|
|
37
|
+
className: e(o.circular, m && o.circularSmall),
|
|
38
|
+
viewBox: "0 0 20 20",
|
|
39
|
+
"aria-hidden": !0,
|
|
40
|
+
children: [/* @__PURE__ */ i("circle", {
|
|
41
|
+
className: o.circularTrack,
|
|
42
|
+
cx: 10,
|
|
43
|
+
cy: 10,
|
|
44
|
+
r: s
|
|
45
|
+
}), /* @__PURE__ */ i("circle", {
|
|
46
|
+
className: e(o.circularIndicator, g && o.circularIndeterminate),
|
|
47
|
+
cx: 10,
|
|
48
|
+
cy: 10,
|
|
49
|
+
r: s,
|
|
50
|
+
style: g ? { strokeDasharray: `${l} ${c}` } : {
|
|
51
|
+
strokeDasharray: c,
|
|
52
|
+
strokeDashoffset: c * (1 - (n ?? 0) / 100)
|
|
53
|
+
}
|
|
54
|
+
})]
|
|
55
|
+
}) : /* @__PURE__ */ i("div", {
|
|
56
|
+
className: o.track,
|
|
57
|
+
children: /* @__PURE__ */ i("div", {
|
|
58
|
+
className: o.indicator,
|
|
59
|
+
style: { width: `${g ? 50 : n}%` }
|
|
60
|
+
})
|
|
61
|
+
})
|
|
62
|
+
] })
|
|
63
|
+
});
|
|
64
|
+
//#endregion
|
|
65
|
+
export { u as t };
|
|
@@ -7,7 +7,7 @@ import { n as i } from "./button-CenXTGXL.js";
|
|
|
7
7
|
import { n as a, t as o } from "./label-LWlgvAwz.js";
|
|
8
8
|
import { t as s } from "./text-DwmZ-ew8.js";
|
|
9
9
|
import { t as c } from "./field-error-LtNtEKDp.js";
|
|
10
|
-
import { t as l } from "./TextField.module-
|
|
10
|
+
import { t as l } from "./TextField.module-BLGiCC4q.js";
|
|
11
11
|
import { FormContext as u, Input as d, SearchField as f, useSlottedContext as p } from "react-aria-components";
|
|
12
12
|
import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
13
13
|
import '../assets/search-field.css';var _ = t("search", [["path", {
|
|
@@ -6,7 +6,7 @@ import { n as i, t as a } from "./label-LWlgvAwz.js";
|
|
|
6
6
|
import { t as o } from "./text-DwmZ-ew8.js";
|
|
7
7
|
import { t as s } from "./field-error-LtNtEKDp.js";
|
|
8
8
|
import { t as c } from "./character-counter-CSoVSrxZ.js";
|
|
9
|
-
import { t as l } from "./TextField.module-
|
|
9
|
+
import { t as l } from "./TextField.module-BLGiCC4q.js";
|
|
10
10
|
import { forwardRef as u, useState as d } from "react";
|
|
11
11
|
import { Input as f, InputContext as p, TextArea as m, TextField as h, TextFieldContext as g, useContextProps as _ } from "react-aria-components";
|
|
12
12
|
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
@@ -10,5 +10,6 @@ export declare const Disabled: Story;
|
|
|
10
10
|
export declare const ReadOnly: Story;
|
|
11
11
|
/** When using uncontrolled value */
|
|
12
12
|
export declare const WithDefaultValue: Story;
|
|
13
|
+
export declare const DisabledWithDefaultValue: Story;
|
|
13
14
|
export declare const WithClearButton: Story;
|
|
14
15
|
export declare const WithHelpPopover: Story;
|
|
@@ -7,6 +7,7 @@ type Story = StoryObj<typeof DatePicker<CalendarDate>>;
|
|
|
7
7
|
export declare const Primary: Story;
|
|
8
8
|
export declare const WithTime: Story;
|
|
9
9
|
export declare const Disabled: Story;
|
|
10
|
+
export declare const DisabledWithDefaultValue: Story;
|
|
10
11
|
export declare const ReadOnly: Story;
|
|
11
12
|
export declare const Invalid: Story;
|
|
12
13
|
export declare const Required: Story;
|
|
@@ -1,19 +1,31 @@
|
|
|
1
1
|
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { default as React } from 'react';
|
|
2
3
|
import { FileList } from './FileList';
|
|
3
4
|
type Story = StoryObj<typeof FileList>;
|
|
4
5
|
declare const _default: {
|
|
5
|
-
component: ({ className, children, ...props }: import('./FileList').FileListProps) =>
|
|
6
|
+
component: ({ className, children, ...props }: import('./FileList').FileListProps) => React.JSX.Element;
|
|
6
7
|
subcomponents: {
|
|
7
|
-
FileListItem: ({ fileName, fileSize, onDelete, className, }: import('./FileListItem').FileListItemProps) =>
|
|
8
|
+
FileListItem: ({ fileName, fileSize, status, progress, errorMessage, onCancel, onDelete, className, }: import('./FileListItem').FileListItemProps) => React.JSX.Element;
|
|
8
9
|
};
|
|
9
10
|
title: string;
|
|
10
11
|
tags: string[];
|
|
11
12
|
args: {
|
|
12
13
|
'aria-label': string;
|
|
13
14
|
};
|
|
14
|
-
render: (args: import('./FileList').FileListProps) =>
|
|
15
|
+
render: (args: import('./FileList').FileListProps) => React.JSX.Element;
|
|
15
16
|
};
|
|
16
17
|
export default _default;
|
|
17
18
|
export declare const Default: Story;
|
|
18
19
|
export declare const WithoutFileSize: Story;
|
|
19
20
|
export declare const Empty: Story;
|
|
21
|
+
export declare const Uploading: Story;
|
|
22
|
+
export declare const UploadingDeterminate: Story;
|
|
23
|
+
export declare const Success: Story;
|
|
24
|
+
export declare const Error: Story;
|
|
25
|
+
export declare const MixedStates: Story;
|
|
26
|
+
export declare const AnimatedCompletion: StoryObj;
|
|
27
|
+
export declare const AnimatedFailure: StoryObj;
|
|
28
|
+
interface FocusTestContainerProps {
|
|
29
|
+
initialFiles: string[];
|
|
30
|
+
}
|
|
31
|
+
export declare const FocusManagementTest: StoryObj<FocusTestContainerProps>;
|
|
@@ -1,7 +1,27 @@
|
|
|
1
1
|
export interface FileListItemProps {
|
|
2
2
|
fileName: string;
|
|
3
3
|
fileSize?: string;
|
|
4
|
+
/** @default 'idle' */
|
|
5
|
+
status?: 'idle' | 'uploading' | 'success' | 'error';
|
|
6
|
+
/** 0-100. Only meaningful when `status='uploading'`; omit for indeterminate. */
|
|
7
|
+
progress?: number;
|
|
8
|
+
/** Shown below the row when `status='error'`. */
|
|
9
|
+
errorMessage?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Called when the cancel button is pressed while `status='uploading'` —
|
|
12
|
+
* this is where you'd abort the in-flight request (e.g.
|
|
13
|
+
* `XMLHttpRequest.abort()` or `AbortController.abort()`). Falls back to
|
|
14
|
+
* `onDelete` if omitted, so an in-progress upload isn't silently left
|
|
15
|
+
* running in the background with no way to stop it.
|
|
16
|
+
*/
|
|
17
|
+
onCancel?: () => void;
|
|
18
|
+
/**
|
|
19
|
+
* Called when the delete button is pressed for any status other than
|
|
20
|
+
* `uploading` (use `onCancel` for that). `FileList` has no concept of
|
|
21
|
+
* "uploaded" vs "local only" — if the file is already persisted
|
|
22
|
+
* server-side by the time this fires, deleting it there too is your call.
|
|
23
|
+
*/
|
|
4
24
|
onDelete?: () => void;
|
|
5
25
|
className?: string;
|
|
6
26
|
}
|
|
7
|
-
export declare const FileListItem: ({ fileName, fileSize, onDelete, className, }: FileListItemProps) => import('react').JSX.Element;
|
|
27
|
+
export declare const FileListItem: ({ fileName, fileSize, status, progress, errorMessage, onCancel, onDelete, className, }: FileListItemProps) => import('react').JSX.Element;
|
package/file-list/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, t } from "../chunks/file-list-
|
|
1
|
+
import { n as e, t } from "../chunks/file-list-B4vG_egr.js";
|
|
2
2
|
export { e as FileList, t as FileListItem };
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
"en": {
|
|
3
|
-
"removeFile": "Remove"
|
|
3
|
+
"removeFile": "Remove",
|
|
4
|
+
"cancelUpload": "Cancel",
|
|
5
|
+
"uploading": "Uploading",
|
|
6
|
+
"uploadComplete": "Upload complete",
|
|
7
|
+
"uploadFailed": "Upload failed"
|
|
4
8
|
},
|
|
5
9
|
"sv": {
|
|
6
|
-
"removeFile": "Ta bort"
|
|
10
|
+
"removeFile": "Ta bort",
|
|
11
|
+
"cancelUpload": "Avbryt",
|
|
12
|
+
"uploading": "Laddar upp",
|
|
13
|
+
"uploadComplete": "Uppladdning klar",
|
|
14
|
+
"uploadFailed": "Uppladdning misslyckades"
|
|
7
15
|
}
|
|
8
16
|
}
|
|
9
17
|
;
|
package/index.js
CHANGED
|
@@ -11,8 +11,8 @@ import { n as h, t as g } from "./chunks/calendar-Bl_obez5.js";
|
|
|
11
11
|
import { a as _, i as v, n as y, r as b, t as x } from "./chunks/layout-Db5um0f7.js";
|
|
12
12
|
import { i as S, n as C, r as w, t as T } from "./chunks/checkbox-Bqd8B58G.js";
|
|
13
13
|
import { n as E, t as D } from "./chunks/color-scheme-switch-DVZjdwc9.js";
|
|
14
|
-
import { t as O } from "./chunks/search-field-
|
|
15
|
-
import { n as k, t as A } from "./chunks/file-list-
|
|
14
|
+
import { t as O } from "./chunks/search-field-GNTRFpzf.js";
|
|
15
|
+
import { n as k, t as A } from "./chunks/file-list-B4vG_egr.js";
|
|
16
16
|
import { t as j } from "./chunks/useLocalizedStringFormatter-CeyBc0x0.js";
|
|
17
17
|
import { n as M, t as N } from "./chunks/button-CenXTGXL.js";
|
|
18
18
|
import { t as P } from "./chunks/heading-BEl_z-5T.js";
|
|
@@ -34,17 +34,17 @@ import { a as ve, i as ye, n as be, o as xe, r as Se, t as Ce } from "./chunks/m
|
|
|
34
34
|
import { t as we } from "./chunks/combobox-DIou4Z-d.js";
|
|
35
35
|
import { i as Te, n as Ee, r as De, t as Oe } from "./chunks/date-field-BF2f9bSf.js";
|
|
36
36
|
import { t as ke } from "./chunks/drop-zone-DH3ZyHsr.js";
|
|
37
|
-
import { t as Ae } from "./chunks/
|
|
38
|
-
import {
|
|
39
|
-
import { t as Ne } from "./chunks/
|
|
40
|
-
import {
|
|
41
|
-
import { n as
|
|
42
|
-
import { t as Re } from "./chunks/
|
|
37
|
+
import { t as Ae } from "./chunks/progress-bar-CknF4qAm.js";
|
|
38
|
+
import { t as je } from "./chunks/file-trigger-Dp5nH8oS.js";
|
|
39
|
+
import { n as Me, t as Ne } from "./chunks/grid-Cn_8RSvj.js";
|
|
40
|
+
import { t as Pe } from "./chunks/info-banner-osR4e6nB.js";
|
|
41
|
+
import { n as Fe, t as Ie } from "./chunks/tooltip-BkesIUIF.js";
|
|
42
|
+
import { n as Le, t as Re } from "./chunks/logo-DyZ2pXt7.js";
|
|
43
43
|
import { i as ze, n as Be, r as Ve, t as He } from "./chunks/radio-BD1EuxSa.js";
|
|
44
44
|
import { t as Ue } from "./chunks/skeleton-B_BPRPJy.js";
|
|
45
45
|
import { t as We } from "./chunks/stack-LF3ExhH9.js";
|
|
46
46
|
import { i as Ge, n as Ke, r as qe, t as Je } from "./chunks/tabs-Co09VWvC.js";
|
|
47
|
-
import { i as Ye, n as Xe, r as Ze, t as Qe } from "./chunks/textfield-
|
|
47
|
+
import { i as Ye, n as Xe, r as Ze, t as Qe } from "./chunks/textfield-BSvCsAyC.js";
|
|
48
48
|
import { t as $e } from "./chunks/time-field-CmjGBQph.js";
|
|
49
49
|
import { a as et, i as tt, n as nt, o as rt, r as it, t as at } from "./chunks/toast-gJgjitZF.js";
|
|
50
50
|
//#endregion
|
|
@@ -61,7 +61,7 @@ var ot = {
|
|
|
61
61
|
description: "Midas Components",
|
|
62
62
|
homepage: "https://designsystem.migrationsverket.se/",
|
|
63
63
|
license: "CC0-1.0",
|
|
64
|
-
version: "17.
|
|
64
|
+
version: "17.29.0",
|
|
65
65
|
module: "./index.js",
|
|
66
66
|
type: "module",
|
|
67
67
|
main: "./index.js",
|
|
@@ -93,4 +93,4 @@ var ot = {
|
|
|
93
93
|
}
|
|
94
94
|
}.version;
|
|
95
95
|
//#endregion
|
|
96
|
-
export { e as Accordion, t as AccordionItem, F as Badge, I as BadgeContainer, R as Breadcrumb, L as Breadcrumbs, M as Button, N as ButtonGroup, h as Calendar, de as Card, se as CardActionArea, ae as CardActions, le as CardBody, ue as CardContent, pe as CardHeader, fe as CardImage, oe as CardLink, ce as CardTitle, d as Cell, me as CharacterCounter, C as Checkbox, w as CheckboxButton, S as CheckboxField, T as CheckboxGroup, E as ColorSchemeSwitch, D as ColorSchemeSwitchMenu, c as Column, we as ComboBox, he as ContrastFilled, Te as DateField, Ee as DateInput, Oe as DateInputDivider, p as DatePicker, m as DateRangePicker, De as DateSegment, U as DialogTrigger, ke as DropZone, G as FieldError, k as FileList, A as FileListItem,
|
|
96
|
+
export { e as Accordion, t as AccordionItem, F as Badge, I as BadgeContainer, R as Breadcrumb, L as Breadcrumbs, M as Button, N as ButtonGroup, h as Calendar, de as Card, se as CardActionArea, ae as CardActions, le as CardBody, ue as CardContent, pe as CardHeader, fe as CardImage, oe as CardLink, ce as CardTitle, d as Cell, me as CharacterCounter, C as Checkbox, w as CheckboxButton, S as CheckboxField, T as CheckboxGroup, E as ColorSchemeSwitch, D as ColorSchemeSwitchMenu, c as Column, we as ComboBox, he as ContrastFilled, Te as DateField, Ee as DateInput, Oe as DateInputDivider, p as DatePicker, m as DateRangePicker, De as DateSegment, U as DialogTrigger, ke as DropZone, G as FieldError, k as FileList, A as FileListItem, je as FileTrigger, at as GlobalToastRegion, Me as Grid, Ne as GridItem, b as Header, P as Heading, Pe as InfoBanner, Ze as Input, z as Label, x as Layout, a as Link, f as LinkButton, Y as ListBox, ee as ListBoxButton, te as ListBoxEmptyState, Z as ListBoxHeader, Q as ListBoxItem, $ as ListBoxLoadMoreItem, J as ListBoxPopover, X as ListBoxSection, Re as Logo, Le as LogoContext, ve as Menu, ye as MenuItem, Se as MenuPopover, be as MenuSection, xe as MenuTrigger, V as Modal, H as ModalOverlay, y as Navbar, B as Popover, Ae as ProgressBar, Be as Radio, Ve as RadioButton, ze as RadioField, He as RadioGroup, g as RangeCalendar, i as RouterProvider, u as Row, O as SearchField, q as Select, K as SelectTrigger, Ce as Separator, v as Sidebar, _ as SidebarLink, Ue as Skeleton, r as Spinner, We as Stack, qe as Tab, Je as TabList, Ke as TabPanel, s as Table, o as TableBody, l as TableHeader, Ge as Tabs, re as Tag, ie as TagGroup, ne as TagList, W as Text, Qe as TextArea, Xe as TextField, Ye as TextFieldBase, $e as TimeField, nt as Toast, it as ToastProvider, tt as ToastRegion, ge as ToggleButton, _e as ToggleButtonGroup, Ie as Tooltip, Fe as TooltipTrigger, ot as VERSION, n as clsx, et as toastQueue, j as useLocalizedStringFormatter, rt as useToastState };
|
package/package.json
CHANGED
|
@@ -13,5 +13,16 @@ export interface ProgressBarProps extends AriaProgressBarProps {
|
|
|
13
13
|
* Show the value label
|
|
14
14
|
*/
|
|
15
15
|
showValueLabel?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Renders a linear bar or a small circular ring.
|
|
18
|
+
* @default 'linear'
|
|
19
|
+
*/
|
|
20
|
+
shape?: 'linear' | 'circular';
|
|
21
|
+
/**
|
|
22
|
+
* Renders a smaller (20px) circular indicator, matching Spinner's `small` size.
|
|
23
|
+
* Only meaningful when `shape='circular'`.
|
|
24
|
+
* @default false
|
|
25
|
+
*/
|
|
26
|
+
small?: boolean;
|
|
16
27
|
}
|
|
17
28
|
export declare const ProgressBar: React.FC<ProgressBarProps>;
|
|
@@ -13,3 +13,6 @@ export default _default;
|
|
|
13
13
|
export declare const Primary: Story;
|
|
14
14
|
export declare const WithoutLabels: Story;
|
|
15
15
|
export declare const IsIndeterminate: Story;
|
|
16
|
+
export declare const Circular: Story;
|
|
17
|
+
export declare const CircularSmall: Story;
|
|
18
|
+
export declare const CircularIndeterminate: Story;
|
package/progress-bar/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../chunks/progress-bar-
|
|
1
|
+
import { t as e } from "../chunks/progress-bar-CknF4qAm.js";
|
|
2
2
|
export { e as ProgressBar };
|
package/search-field/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../chunks/search-field-
|
|
1
|
+
import { t as e } from "../chunks/search-field-GNTRFpzf.js";
|
|
2
2
|
export { e as SearchField };
|
|
@@ -359,6 +359,7 @@ export declare const Disabled: {
|
|
|
359
359
|
};
|
|
360
360
|
};
|
|
361
361
|
};
|
|
362
|
+
export declare const DisabledWithDefaultValue: Story;
|
|
362
363
|
export declare const ReadOnly: Story;
|
|
363
364
|
export declare const ShowCounter: Story;
|
|
364
365
|
export declare const MaxLengthAndShowCounter: Story;
|
|
@@ -29,6 +29,7 @@ export declare const CustomValidation: Story;
|
|
|
29
29
|
export declare const Number: Story;
|
|
30
30
|
export declare const Numeric: Story;
|
|
31
31
|
export declare const Disabled: Story;
|
|
32
|
+
export declare const DisabledWithDefaultValue: Story;
|
|
32
33
|
export declare const ReadOnly: Story;
|
|
33
34
|
export declare const ShowCounter: Story;
|
|
34
35
|
export declare const MaxLengthAndShowCounter: Story;
|
package/textfield/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as e, n as t, r as n, t as r } from "../chunks/textfield-
|
|
1
|
+
import { i as e, n as t, r as n, t as r } from "../chunks/textfield-BSvCsAyC.js";
|
|
2
2
|
export { n as Input, r as TextArea, t as TextField, e as TextFieldBase };
|
|
@@ -30,6 +30,7 @@ export declare const Invalid: Story;
|
|
|
30
30
|
export declare const Disabled: Story;
|
|
31
31
|
export declare const ReadOnly: Story;
|
|
32
32
|
export declare const WithDefaultValue: Story;
|
|
33
|
+
export declare const DisabledWithDefaultValue: Story;
|
|
33
34
|
export declare const WithClearButton: Story;
|
|
34
35
|
export declare const WithSeconds: Story;
|
|
35
36
|
export declare const HourCycle12: Story;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import '../assets/TextField.css';var e = {
|
|
2
|
-
textField: "_textField_1e7zw_1",
|
|
3
|
-
bottomError: "_bottomError_1e7zw_20",
|
|
4
|
-
textArea: "_textArea_1e7zw_29",
|
|
5
|
-
input: "_input_1e7zw_30",
|
|
6
|
-
wrap: "_wrap_1e7zw_90",
|
|
7
|
-
medium: "_medium_1e7zw_95",
|
|
8
|
-
passwordText: "_passwordText_1e7zw_123",
|
|
9
|
-
passwordButton: "_passwordButton_1e7zw_165"
|
|
10
|
-
};
|
|
11
|
-
//#endregion
|
|
12
|
-
export { e as t };
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { t as e } from "./clsx-Di52oYUU.js";
|
|
3
|
-
import { t } from "./createLucideIcon-BgluSHFG.js";
|
|
4
|
-
import { t as n } from "./useLocalizedStringFormatter-CeyBc0x0.js";
|
|
5
|
-
import { n as r } from "./button-CenXTGXL.js";
|
|
6
|
-
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
7
|
-
import '../assets/file-list.css';var o = t("trash-2", [
|
|
8
|
-
["path", {
|
|
9
|
-
d: "M10 11v6",
|
|
10
|
-
key: "nco0om"
|
|
11
|
-
}],
|
|
12
|
-
["path", {
|
|
13
|
-
d: "M14 11v6",
|
|
14
|
-
key: "outv1u"
|
|
15
|
-
}],
|
|
16
|
-
["path", {
|
|
17
|
-
d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",
|
|
18
|
-
key: "miytrc"
|
|
19
|
-
}],
|
|
20
|
-
["path", {
|
|
21
|
-
d: "M3 6h18",
|
|
22
|
-
key: "d0wm0j"
|
|
23
|
-
}],
|
|
24
|
-
["path", {
|
|
25
|
-
d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",
|
|
26
|
-
key: "e791ji"
|
|
27
|
-
}]
|
|
28
|
-
]), s = {
|
|
29
|
-
fileList: "_fileList_1jd3b_1",
|
|
30
|
-
fileListItem: "_fileListItem_1jd3b_10",
|
|
31
|
-
fileInfo: "_fileInfo_1jd3b_20",
|
|
32
|
-
fileName: "_fileName_1jd3b_28",
|
|
33
|
-
fileSize: "_fileSize_1jd3b_37",
|
|
34
|
-
deleteButton: "_deleteButton_1jd3b_43"
|
|
35
|
-
}, c = ({ className: t, children: n, ...r }) => /* @__PURE__ */ i("ul", {
|
|
36
|
-
...r,
|
|
37
|
-
className: e(s.fileList, t),
|
|
38
|
-
children: n
|
|
39
|
-
}), l = {
|
|
40
|
-
en: { removeFile: "Remove" },
|
|
41
|
-
sv: { removeFile: "Ta bort" }
|
|
42
|
-
}, u = ({ fileName: t, fileSize: c, onDelete: u, className: d }) => {
|
|
43
|
-
let f = n(l);
|
|
44
|
-
return /* @__PURE__ */ a("li", {
|
|
45
|
-
className: e(s.fileListItem, d),
|
|
46
|
-
children: [/* @__PURE__ */ a("span", {
|
|
47
|
-
className: s.fileInfo,
|
|
48
|
-
children: [/* @__PURE__ */ i("span", {
|
|
49
|
-
className: s.fileName,
|
|
50
|
-
children: t
|
|
51
|
-
}), c && /* @__PURE__ */ i("span", {
|
|
52
|
-
className: s.fileSize,
|
|
53
|
-
children: c
|
|
54
|
-
})]
|
|
55
|
-
}), u && /* @__PURE__ */ i(r, {
|
|
56
|
-
variant: "icon",
|
|
57
|
-
onPress: u,
|
|
58
|
-
"aria-label": `${f.format("removeFile")} ${t}`,
|
|
59
|
-
className: s.deleteButton,
|
|
60
|
-
children: /* @__PURE__ */ i(o, {
|
|
61
|
-
size: 20,
|
|
62
|
-
"aria-hidden": !0
|
|
63
|
-
})
|
|
64
|
-
})]
|
|
65
|
-
});
|
|
66
|
-
};
|
|
67
|
-
//#endregion
|
|
68
|
-
export { c as n, u as t };
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./clsx-Di52oYUU.js";
|
|
2
|
-
import { t } from "./label-LWlgvAwz.js";
|
|
3
|
-
import "react";
|
|
4
|
-
import { ProgressBar as n } from "react-aria-components";
|
|
5
|
-
import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
6
|
-
import '../assets/progress-bar.css';var o = {
|
|
7
|
-
progressBar: "_progressBar_13dw9_1",
|
|
8
|
-
indeterminate: "_indeterminate_13dw9_1",
|
|
9
|
-
label: "_label_13dw9_9",
|
|
10
|
-
value: "_value_13dw9_14",
|
|
11
|
-
track: "_track_13dw9_19",
|
|
12
|
-
indicator: "_indicator_13dw9_29"
|
|
13
|
-
}, s = ({ label: s, labelProps: c, showValueLabel: l = !1, ...u }) => /* @__PURE__ */ i(n, {
|
|
14
|
-
...u,
|
|
15
|
-
className: e(o.progressBar, u.className),
|
|
16
|
-
children: ({ percentage: n, valueText: u, isIndeterminate: d }) => /* @__PURE__ */ a(r, { children: [
|
|
17
|
-
s && /* @__PURE__ */ i(t, {
|
|
18
|
-
elementType: "span",
|
|
19
|
-
...c,
|
|
20
|
-
className: e(c?.className, o.label),
|
|
21
|
-
children: s
|
|
22
|
-
}),
|
|
23
|
-
l && /* @__PURE__ */ i(t, {
|
|
24
|
-
elementType: "span",
|
|
25
|
-
...c,
|
|
26
|
-
id: s ? "" : c?.id,
|
|
27
|
-
className: e(c?.className, o.value),
|
|
28
|
-
children: u
|
|
29
|
-
}),
|
|
30
|
-
/* @__PURE__ */ i("div", {
|
|
31
|
-
className: o.track,
|
|
32
|
-
children: /* @__PURE__ */ i("div", {
|
|
33
|
-
className: o.indicator,
|
|
34
|
-
style: { width: `${d ? 50 : n}%` }
|
|
35
|
-
})
|
|
36
|
-
})
|
|
37
|
-
] })
|
|
38
|
-
});
|
|
39
|
-
//#endregion
|
|
40
|
-
export { s as t };
|