@midas-ds/components 15.1.0 → 15.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/{CheckboxGroup-thvsvOqD.cjs → CheckboxGroup-BdRG71EM.cjs} +1 -1
- package/{CheckboxGroup-CtJJqk_q.js → CheckboxGroup-BkzQi1FB.js} +1 -1
- package/{ComboBox-BDX4BYWJ.js → ComboBox-C25vUI_6.js} +69 -69
- package/{ComboBox-DFPrJUoV.cjs → ComboBox-CdtDPQRH.cjs} +1 -1
- package/{DateField-B92Cqf9K.cjs → DateField-B9Yxknuy.cjs} +1 -1
- package/{DateField-BPRWrVcu.js → DateField-BUZ7i9eS.js} +1 -1
- package/{DateRangePicker-Cmt9NC35.js → DateRangePicker-ezrFzzrO.js} +1 -1
- package/{DateRangePicker-COSTCOt8.cjs → DateRangePicker-mlnh0C1A.cjs} +1 -1
- package/{Label-FfEnd4ai.js → Label-BqvFQoEF.js} +1 -1
- package/{Label-DpY2SZdQ.cjs → Label-C3ZSrB04.cjs} +1 -1
- package/{ListBox-u6ZXp5Yi.cjs → ListBox-2wZ6XOeD.cjs} +1 -1
- package/{ListBox-LJ3VgZMr.js → ListBox-Der0Te-R.js} +22 -22
- package/{ListBoxLoadMoreItem-DMUOzVtt.cjs → ListBoxLoadMoreItem-CTldtPr1.cjs} +1 -1
- package/{ListBoxLoadMoreItem-B4GFbdYf.js → ListBoxLoadMoreItem-CzGGgav4.js} +1 -1
- package/{ListBoxSection-CBlpg0AG.cjs → ListBoxSection-C_PqDyMP.cjs} +1 -1
- package/{ListBoxSection-DjGs1ndn.js → ListBoxSection-D9EUOerv.js} +1 -1
- package/{ProgressBar-BZqAQTV3.cjs → ProgressBar-BrtaxoR8.cjs} +1 -1
- package/{ProgressBar-BpsvPCKk.js → ProgressBar-DhVQOs4P.js} +1 -1
- package/{Radio-LevFYAg4.js → Radio-DClH8mWz.js} +1 -1
- package/{Radio-B3FBTn4F.cjs → Radio-VFIiuJIR.cjs} +1 -1
- package/{SearchField-C-TFzcJF.js → SearchField-Cd6X2rY4.js} +1 -1
- package/{SearchField-BX7P7BgV.cjs → SearchField-Cz5Pb0XE.cjs} +1 -1
- package/{Select-JIDW2mN8.cjs → Select-BGH_JDbz.cjs} +1 -1
- package/{Select-CiCng7ZP.js → Select-C_AINBgj.js} +3 -3
- package/{Select-C-ykeY_T.js → Select-CnZNRfPa.js} +2 -2
- package/{Select-D4wi-0Jw.cjs → Select-DLGsdsNN.cjs} +1 -1
- package/{TextArea-CJPBvogq.js → TextArea-CcKY4TI2.js} +2 -2
- package/{TextArea-Bjf8CBp0.cjs → TextArea-D68vGjYJ.cjs} +1 -1
- package/TextField.module-BndKUn-7.js +13 -0
- package/TextField.module-Du0bmSGZ.cjs +1 -0
- package/assets/ComboBox.css +1 -1
- package/assets/Label.css +1 -1
- package/assets/ListBox.css +1 -1
- package/assets/TextField.css +1 -1
- package/checkbox/index.cjs +1 -1
- package/checkbox/index.js +1 -1
- package/combobox/index.cjs +1 -1
- package/combobox/index.js +1 -1
- package/date-field/index.cjs +1 -1
- package/date-field/index.js +1 -1
- package/date-picker/index.cjs +1 -1
- package/date-picker/index.js +1 -1
- package/index.cjs +1 -1
- package/index.js +14 -14
- package/label/index.cjs +1 -1
- package/label/index.js +1 -1
- package/legacy-select/index.cjs +1 -1
- package/legacy-select/index.js +1 -1
- package/list-box/index.cjs +1 -1
- package/list-box/index.js +3 -3
- package/package.json +1 -1
- package/progress-bar/index.cjs +1 -1
- package/progress-bar/index.js +1 -1
- package/radio/index.cjs +1 -1
- package/radio/index.js +1 -1
- package/search-field/index.cjs +1 -1
- package/search-field/index.js +1 -1
- package/select/index.cjs +1 -1
- package/select/index.js +1 -1
- package/textfield/index.cjs +1 -1
- package/textfield/index.js +1 -1
- package/TextField.module-C03d0VY9.js +0 -13
- package/TextField.module-DmRrFHra.cjs +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## 15.1.2 (2025-11-06)
|
|
2
|
+
|
|
3
|
+
### 🩹 Fixes
|
|
4
|
+
|
|
5
|
+
- **label:** remove unused global css ([4dccf5ce7f](https://github.com/migrationsverket/midas/commit/4dccf5ce7f))
|
|
6
|
+
- **textfield:** adjust text color in disabled mode ([2790ec6752](https://github.com/migrationsverket/midas/commit/2790ec6752))
|
|
7
|
+
- **combobox:** adjust text color in disabled mode ([88027e5b4a](https://github.com/migrationsverket/midas/commit/88027e5b4a))
|
|
8
|
+
|
|
9
|
+
## 15.1.1 (2025-10-30)
|
|
10
|
+
|
|
11
|
+
### 🩹 Fixes
|
|
12
|
+
|
|
13
|
+
- **list-box:** adjust selected styling for listBoxItem ([#901](https://github.com/migrationsverket/midas/pull/901))
|
|
14
|
+
|
|
1
15
|
## 15.1.0 (2025-10-30)
|
|
2
16
|
|
|
3
17
|
### 🚀 Features
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const s=require("react/jsx-runtime"),m=require("./Label-
|
|
1
|
+
"use strict";const s=require("react/jsx-runtime"),m=require("./Label-C3ZSrB04.cjs"),C=require("./Text-D5OSv6Uv.cjs"),$=require("react"),h=require("./Checkbox-BgrLxY6P.cjs"),g=require("./FieldError-JWxR_EqN.cjs"),P=require("./useFormValidation-DV2Ioblb.cjs"),y=require("./useControlledState-D0L6S_5r.cjs"),j=require("./mergeProps-Du5A8xi8.cjs"),q=require("./filterDOMProps-RRlKPKX0.cjs"),k=require("./useField-DvszkIMx.cjs"),D=require("./useFocusWithin-GBjoTL5o.cjs"),F=require("./useLocalizedStringFormatter-BSac43NO.cjs");function O(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const n=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,n.get?n:{enumerable:!0,get:()=>e[a]})}}return t.default=e,Object.freeze(t)}const v=O($);function R(e,t){let{isDisabled:a,name:n,form:u,validationBehavior:c="aria"}=e,{isInvalid:r,validationErrors:d,validationDetails:l}=t.displayValidation,{labelProps:f,fieldProps:x,descriptionProps:i,errorMessageProps:o}=k.$2baaea4c71418dea$export$294aa081a6c6f55d({...e,labelElementType:"span",isInvalid:r,errorMessage:e.errorMessage||d});h.$1ae600c947479353$export$ec98120685d4f57d.set(t,{name:n,form:u,descriptionId:i.id,errorMessageId:o.id,validationBehavior:c});let b=q.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(e,{labelable:!0}),{focusWithinProps:S}=D.$9ab94262bd0047c7$export$420e68273165f4ec({onBlurWithin:e.onBlur,onFocusWithin:e.onFocus,onFocusWithinChange:e.onFocusChange});return{groupProps:j.$3ef42575df84b30b$export$9d1611c77c2fe928(b,{role:"group","aria-disabled":a||void 0,...x,...S}),labelProps:f,descriptionProps:i,errorMessageProps:o,isInvalid:r,validationErrors:d,validationDetails:l}}function I(e={}){let[t,a]=y.$458b0a5536c1a7cf$export$40bfa8c7b0832715(e.value,e.defaultValue||[],e.onChange),[n]=$.useState(t),u=!!e.isRequired&&t.length===0,c=$.useRef(new Map),r=P.$e5be200c675c3b3a$export$fc1a364ae1f3ff10({...e,value:t}),d=r.displayValidation.isInvalid;var l,f;return{...r,value:t,defaultValue:(l=e.defaultValue)!==null&&l!==void 0?l:n,setValue(i){e.isReadOnly||e.isDisabled||a(i)},isDisabled:e.isDisabled||!1,isReadOnly:e.isReadOnly||!1,isSelected(i){return t.includes(i)},addValue(i){e.isReadOnly||e.isDisabled||t.includes(i)||(t=t.concat(i),a(t))},removeValue(i){e.isReadOnly||e.isDisabled||t.includes(i)&&a(t.filter(o=>o!==i))},toggleValue(i){e.isReadOnly||e.isDisabled||(t.includes(i)?a(t.filter(o=>o!==i)):a(t.concat(i)))},setInvalid(i,o){let b=new Map(c.current);o.isInvalid?b.set(i,o):b.delete(i),c.current=b,r.updateValidation(P.$e5be200c675c3b3a$export$75ee7c75d68f5b0e(...b.values()))},validationState:(f=e.validationState)!==null&&f!==void 0?f:d?"invalid":null,isInvalid:d,isRequired:u}}const M=(e,{value:t})=>{const a=v.Children.toArray(e).filter(l=>v.isValidElement(l)&&l.type===h.Checkbox),n=v.Children.count(a),u=v.Children.toArray(e).filter(l=>v.isValidElement(l)).filter(l=>!!l&&l.type===h.Checkbox).map(l=>l.props.value),c=t.length===0,r=t.length===n;return{allSelected:r,someSelected:!c&&!r,checkboxValues:u}},V=({state:e,errorMessage:t})=>s.jsx(g.$ee014567cb39d3f0$export$ff05c3ac10437e03.Provider,{value:e.displayValidation,children:s.jsx(g.FieldError,{children:t})}),E={selectAll:"Select all"},A={selectAll:"Välj alla"},W={en:E,sv:A};function _(e){const t=I(e),a=F.useLocalizedStringFormatter(W),{groupProps:n,labelProps:u,descriptionProps:c}=R(e,t),{allSelected:r,someSelected:d,checkboxValues:l}=M(e.children,t),f=x=>{t.setValue(x?l:[])};return s.jsxs("div",{...n,className:h.styles.checkboxGroup,children:[s.jsx(m.LabelWrapper,{popover:e.popover,children:e.label&&s.jsx(m.Label,{...u,children:e.label})}),e.description&&s.jsx(C.Text,{slot:"description",...c,children:e.description}),e.errorPosition==="top"&&s.jsx(V,{...e,state:t}),e.showSelectAll&&s.jsx(h.Checkbox,{isSelected:r,isIndeterminate:d,onChange:f,children:e.selectAllLabel||a.format("selectAll")}),s.jsx(h.CheckboxGroupContext.Provider,{value:t,children:e.children}),e.errorPosition==="bottom"&&s.jsx(V,{...e,state:t})]})}exports.CheckboxGroup=_;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as s, jsxs as g } from "react/jsx-runtime";
|
|
2
|
-
import { a as P, L as V } from "./Label-
|
|
2
|
+
import { a as P, L as V } from "./Label-BqvFQoEF.js";
|
|
3
3
|
import { T as S } from "./Text-BBFWBNAH.js";
|
|
4
4
|
import * as m from "react";
|
|
5
5
|
import { useState as C, useRef as y } from "react";
|
|
@@ -9,11 +9,11 @@ import { $ as Fe, a as Tu } from "./Input-CQzv-D9g.js";
|
|
|
9
9
|
import { f as Du, g as yu, c as Se, d as Fu } from "./ListBox-5GK4ZRj1.js";
|
|
10
10
|
import { p as Su, h as Lu, i as gu, n as ku } from "./Dialog-D4Py85wi.js";
|
|
11
11
|
import { $ as Le } from "./Text-bqP9NeVg.js";
|
|
12
|
-
import { b as Ku, c as
|
|
13
|
-
import { $ as
|
|
14
|
-
import { a as
|
|
15
|
-
import { $ as
|
|
16
|
-
import { d as
|
|
12
|
+
import { b as Ku, c as ju } from "./Collection-BkxwF21i.js";
|
|
13
|
+
import { $ as Pu } from "./filterDOMProps-wsa9OcNI.js";
|
|
14
|
+
import { a as Iu, g as Ou } from "./OverlayArrow-CjGslX2c.js";
|
|
15
|
+
import { $ as Ru } from "./useFilter-Dn4vTT3G.js";
|
|
16
|
+
import { d as Vu, $ as wu } from "./useFormValidation-By7G-T7y.js";
|
|
17
17
|
import { e as Gu, f as ge, i as Mu } from "./SelectionManager-DoNLJm8c.js";
|
|
18
18
|
import { $ as zu } from "./useSingleSelectListState-GSY0f4qW.js";
|
|
19
19
|
import { b as Nu } from "./useListState-CP7AKhOX.js";
|
|
@@ -30,10 +30,10 @@ import { a as Yu } from "./ListKeyboardDelegate-BBmpJ-2O.js";
|
|
|
30
30
|
import { $ as Qu } from "./useLocalizedStringFormatter-CSEh15AZ.js";
|
|
31
31
|
import { $ as en } from "./useTextField-I3QVGvyX.js";
|
|
32
32
|
import { c as Ce } from "./clsx-jbLnTBqA.js";
|
|
33
|
-
import { a as un, L as nn } from "./Label-
|
|
33
|
+
import { a as un, L as nn } from "./Label-BqvFQoEF.js";
|
|
34
34
|
import { T as Ae } from "./Text-BBFWBNAH.js";
|
|
35
|
-
import { L as on } from "./ListBox-
|
|
36
|
-
import { a as tn, L as ln, b as cn } from "./ListBoxSection-
|
|
35
|
+
import { L as on } from "./ListBox-Der0Te-R.js";
|
|
36
|
+
import { a as tn, L as ln, b as cn } from "./ListBoxSection-D9EUOerv.js";
|
|
37
37
|
import { C as pn } from "./chevron-down-DmZMdOiC.js";
|
|
38
38
|
import { u as dn } from "./useLocalizedStringFormatter-aOhh7wdl.js";
|
|
39
39
|
import './assets/ComboBox.css';var ke = {};
|
|
@@ -76,8 +76,8 @@ Ke = {
|
|
|
76
76
|
listboxLabel: "Предложения",
|
|
77
77
|
selectedAnnouncement: (e) => `${e.optionText}, избрани`
|
|
78
78
|
};
|
|
79
|
-
var
|
|
80
|
-
|
|
79
|
+
var je = {};
|
|
80
|
+
je = {
|
|
81
81
|
buttonLabel: "Zobrazit doporučení",
|
|
82
82
|
countAnnouncement: (e, u) => `K dispozici ${u.plural(e.optionCount, {
|
|
83
83
|
one: () => `je ${u.number(e.optionCount)} možnost`,
|
|
@@ -96,8 +96,8 @@ Pe = {
|
|
|
96
96
|
listboxLabel: "Návrhy",
|
|
97
97
|
selectedAnnouncement: (e) => `${e.optionText}, vybráno`
|
|
98
98
|
};
|
|
99
|
-
var
|
|
100
|
-
|
|
99
|
+
var Pe = {};
|
|
100
|
+
Pe = {
|
|
101
101
|
buttonLabel: "Vis forslag",
|
|
102
102
|
countAnnouncement: (e, u) => `${u.plural(e.optionCount, {
|
|
103
103
|
one: () => `${u.number(e.optionCount)} mulighed tilgængelig`,
|
|
@@ -116,8 +116,8 @@ Ie = {
|
|
|
116
116
|
listboxLabel: "Forslag",
|
|
117
117
|
selectedAnnouncement: (e) => `${e.optionText}, valgt`
|
|
118
118
|
};
|
|
119
|
-
var
|
|
120
|
-
|
|
119
|
+
var Ie = {};
|
|
120
|
+
Ie = {
|
|
121
121
|
buttonLabel: "Empfehlungen anzeigen",
|
|
122
122
|
countAnnouncement: (e, u) => `${u.plural(e.optionCount, {
|
|
123
123
|
one: () => `${u.number(e.optionCount)} Option`,
|
|
@@ -136,8 +136,8 @@ Oe = {
|
|
|
136
136
|
listboxLabel: "Empfehlungen",
|
|
137
137
|
selectedAnnouncement: (e) => `${e.optionText}, ausgewählt`
|
|
138
138
|
};
|
|
139
|
-
var
|
|
140
|
-
|
|
139
|
+
var Oe = {};
|
|
140
|
+
Oe = {
|
|
141
141
|
buttonLabel: "Προβολή προτάσεων",
|
|
142
142
|
countAnnouncement: (e, u) => `${u.plural(e.optionCount, {
|
|
143
143
|
one: () => `${u.number(e.optionCount)} επιλογή`,
|
|
@@ -156,8 +156,8 @@ Re = {
|
|
|
156
156
|
listboxLabel: "Προτάσεις",
|
|
157
157
|
selectedAnnouncement: (e) => `${e.optionText}, επιλέχθηκε`
|
|
158
158
|
};
|
|
159
|
-
var
|
|
160
|
-
|
|
159
|
+
var Re = {};
|
|
160
|
+
Re = {
|
|
161
161
|
focusAnnouncement: (e, u) => `${u.select({
|
|
162
162
|
true: () => `Entered group ${e.groupTitle}, with ${u.plural(e.groupCount, {
|
|
163
163
|
one: () => `${u.number(e.groupCount)} option`,
|
|
@@ -176,8 +176,8 @@ Ve = {
|
|
|
176
176
|
buttonLabel: "Show suggestions",
|
|
177
177
|
listboxLabel: "Suggestions"
|
|
178
178
|
};
|
|
179
|
-
var
|
|
180
|
-
|
|
179
|
+
var Ve = {};
|
|
180
|
+
Ve = {
|
|
181
181
|
buttonLabel: "Mostrar sugerencias",
|
|
182
182
|
countAnnouncement: (e, u) => `${u.plural(e.optionCount, {
|
|
183
183
|
one: () => `${u.number(e.optionCount)} opción`,
|
|
@@ -720,12 +720,12 @@ var su = {};
|
|
|
720
720
|
su = {
|
|
721
721
|
"ar-AE": ke,
|
|
722
722
|
"bg-BG": Ke,
|
|
723
|
-
"cs-CZ":
|
|
724
|
-
"da-DK":
|
|
725
|
-
"de-DE":
|
|
726
|
-
"el-GR":
|
|
727
|
-
"en-US":
|
|
728
|
-
"es-ES":
|
|
723
|
+
"cs-CZ": je,
|
|
724
|
+
"da-DK": Pe,
|
|
725
|
+
"de-DE": Ie,
|
|
726
|
+
"el-GR": Oe,
|
|
727
|
+
"en-US": Re,
|
|
728
|
+
"es-ES": Ve,
|
|
729
729
|
"et-EE": we,
|
|
730
730
|
"fi-FI": Ge,
|
|
731
731
|
"fr-FR": Me,
|
|
@@ -777,7 +777,7 @@ function sn(e, u) {
|
|
|
777
777
|
f,
|
|
778
778
|
S,
|
|
779
779
|
d
|
|
780
|
-
]), { collectionProps:
|
|
780
|
+
]), { collectionProps: O } = Gu({
|
|
781
781
|
selectionManager: u.selectionManager,
|
|
782
782
|
keyboardDelegate: c,
|
|
783
783
|
disallowTypeAhead: !0,
|
|
@@ -824,17 +824,17 @@ function sn(e, u) {
|
|
|
824
824
|
r || G || (e.onBlur && e.onBlur(n), u.setFocused(!1));
|
|
825
825
|
}, N = (n) => {
|
|
826
826
|
u.isFocused || (e.onFocus && e.onFocus(n), u.setFocused(!0));
|
|
827
|
-
}, { isInvalid: ee, validationErrors:
|
|
827
|
+
}, { isInvalid: ee, validationErrors: j, validationDetails: k } = u.displayValidation, { labelProps: v, inputProps: X, descriptionProps: ue, errorMessageProps: U } = en({
|
|
828
828
|
...e,
|
|
829
829
|
onChange: u.setInputValue,
|
|
830
|
-
onKeyDown: F ? e.onKeyDown : qu(u.isOpen &&
|
|
830
|
+
onKeyDown: F ? e.onKeyDown : qu(u.isOpen && O.onKeyDown, Q, e.onKeyDown),
|
|
831
831
|
onBlur: a,
|
|
832
832
|
value: u.inputValue,
|
|
833
833
|
defaultValue: u.defaultInputValue,
|
|
834
834
|
onFocus: N,
|
|
835
835
|
autoComplete: "off",
|
|
836
836
|
validate: void 0,
|
|
837
|
-
[
|
|
837
|
+
[Vu]: u
|
|
838
838
|
}, t), ne = (n) => {
|
|
839
839
|
if (n.pointerType === "touch") {
|
|
840
840
|
var o;
|
|
@@ -845,11 +845,11 @@ function sn(e, u) {
|
|
|
845
845
|
var o;
|
|
846
846
|
(o = t.current) === null || o === void 0 || o.focus(), u.toggle(n.pointerType === "keyboard" || n.pointerType === "virtual" ? "first" : null, "manual");
|
|
847
847
|
}
|
|
848
|
-
},
|
|
848
|
+
}, P = ve({
|
|
849
849
|
id: T.id,
|
|
850
850
|
"aria-label": E.format("buttonLabel"),
|
|
851
851
|
"aria-labelledby": e["aria-labelledby"] || v.id
|
|
852
|
-
}),
|
|
852
|
+
}), R = ve({
|
|
853
853
|
id: D.id,
|
|
854
854
|
"aria-label": E.format("listboxLabel"),
|
|
855
855
|
"aria-labelledby": e["aria-labelledby"] || v.id
|
|
@@ -869,10 +869,10 @@ function sn(e, u) {
|
|
|
869
869
|
var q;
|
|
870
870
|
let K = (q = C == null ? void 0 : C.parentKey) !== null && q !== void 0 ? q : null;
|
|
871
871
|
var W;
|
|
872
|
-
let
|
|
872
|
+
let I = (W = u.selectionManager.focusedKey) !== null && W !== void 0 ? W : null, Z = y(K), V = y(I);
|
|
873
873
|
ce(() => {
|
|
874
|
-
if (be() && C != null &&
|
|
875
|
-
let o = u.selectionManager.isSelected(
|
|
874
|
+
if (be() && C != null && I != null && I !== V.current) {
|
|
875
|
+
let o = u.selectionManager.isSelected(I), r = K != null ? u.collection.getItem(K) : null, G = (r == null ? void 0 : r["aria-label"]) || (typeof (r == null ? void 0 : r.rendered) == "string" ? r.rendered : "") || "";
|
|
876
876
|
var n;
|
|
877
877
|
let H = E.format("focusAnnouncement", {
|
|
878
878
|
isGroupChange: (n = r && K !== Z.current) !== null && n !== void 0 ? n : !1,
|
|
@@ -885,7 +885,7 @@ function sn(e, u) {
|
|
|
885
885
|
});
|
|
886
886
|
ae(H);
|
|
887
887
|
}
|
|
888
|
-
Z.current = K,
|
|
888
|
+
Z.current = K, V.current = I;
|
|
889
889
|
});
|
|
890
890
|
let w = Ju(u.collection), te = y(w), le = y(u.isOpen);
|
|
891
891
|
ce(() => {
|
|
@@ -926,7 +926,7 @@ function sn(e, u) {
|
|
|
926
926
|
labelProps: v,
|
|
927
927
|
buttonProps: {
|
|
928
928
|
...T,
|
|
929
|
-
...
|
|
929
|
+
...P,
|
|
930
930
|
excludeFromTabOrder: !0,
|
|
931
931
|
preventFocusOnPress: !0,
|
|
932
932
|
onPress: ne,
|
|
@@ -946,7 +946,7 @@ function sn(e, u) {
|
|
|
946
946
|
// This disable's the macOS Safari spell check auto corrections.
|
|
947
947
|
spellCheck: "false"
|
|
948
948
|
}),
|
|
949
|
-
listBoxProps: fe(D,
|
|
949
|
+
listBoxProps: fe(D, R, {
|
|
950
950
|
autoFocus: u.focusStrategy || !0,
|
|
951
951
|
shouldUseVirtualFocus: !0,
|
|
952
952
|
shouldSelectOnPressUp: !0,
|
|
@@ -957,7 +957,7 @@ function sn(e, u) {
|
|
|
957
957
|
descriptionProps: ue,
|
|
958
958
|
errorMessageProps: U,
|
|
959
959
|
isInvalid: ee,
|
|
960
|
-
validationErrors:
|
|
960
|
+
validationErrors: j,
|
|
961
961
|
validationDetails: k
|
|
962
962
|
};
|
|
963
963
|
}
|
|
@@ -967,11 +967,11 @@ function $n(e) {
|
|
|
967
967
|
e.onSelectionChange && e.onSelectionChange(l), l === c && (W(), C());
|
|
968
968
|
};
|
|
969
969
|
var D;
|
|
970
|
-
let { collection: f, selectionManager: S, selectedKey: c, setSelectedKey:
|
|
970
|
+
let { collection: f, selectionManager: S, selectedKey: c, setSelectedKey: O, selectedItem: Y, disabledKeys: Q } = zu({
|
|
971
971
|
...e,
|
|
972
972
|
onSelectionChange: T,
|
|
973
973
|
items: (D = e.items) !== null && D !== void 0 ? D : e.defaultItems
|
|
974
|
-
}), [a, N] = Uu(e.inputValue, Be(e.defaultInputValue, c, f) || "", e.onInputChange), [ee] = z(c), [
|
|
974
|
+
}), [a, N] = Uu(e.inputValue, Be(e.defaultInputValue, c, f) || "", e.onInputChange), [ee] = z(c), [j] = z(a), k = f, v = J(() => (
|
|
975
975
|
// No default filter if items are controlled.
|
|
976
976
|
e.items != null || !i ? f : an(f, a, i)
|
|
977
977
|
), [
|
|
@@ -979,17 +979,17 @@ function $n(e) {
|
|
|
979
979
|
a,
|
|
980
980
|
i,
|
|
981
981
|
e.items
|
|
982
|
-
]), [X, ue] = z(v), U = y("focus"), s =
|
|
982
|
+
]), [X, ue] = z(v), U = y("focus"), s = Iu({
|
|
983
983
|
...e,
|
|
984
984
|
onOpenChange: (l) => {
|
|
985
985
|
e.onOpenChange && e.onOpenChange(l, l ? U.current : void 0), S.setFocused(l), l || S.setFocusedKey(null);
|
|
986
986
|
},
|
|
987
987
|
isOpen: void 0,
|
|
988
988
|
defaultOpen: void 0
|
|
989
|
-
}),
|
|
989
|
+
}), P = (l = null, $) => {
|
|
990
990
|
let m = $ === "manual" || $ === "focus" && p === "focus";
|
|
991
991
|
(t || v.size > 0 || m && k.size > 0 || e.items) && (m && !s.isOpen && e.items === void 0 && x(!0), U.current = $, E(l), s.open());
|
|
992
|
-
},
|
|
992
|
+
}, R = (l = null, $) => {
|
|
993
993
|
let m = $ === "manual" || $ === "focus" && p === "focus";
|
|
994
994
|
!(t || v.size > 0 || m && k.size > 0 || e.items) && !s.isOpen || (m && !s.isOpen && e.items === void 0 && x(!0), s.isOpen || (U.current = $), oe(l));
|
|
995
995
|
}, L = de(() => {
|
|
@@ -1013,16 +1013,16 @@ function $n(e) {
|
|
|
1013
1013
|
let m = c != null && ($ = (l = f.getItem(c)) === null || l === void 0 ? void 0 : l.textValue) !== null && $ !== void 0 ? $ : "";
|
|
1014
1014
|
K(m), N(m);
|
|
1015
1015
|
};
|
|
1016
|
-
var
|
|
1017
|
-
let
|
|
1016
|
+
var I, Z;
|
|
1017
|
+
let V = y((Z = (I = e.selectedKey) !== null && I !== void 0 ? I : e.defaultSelectedKey) !== null && Z !== void 0 ? Z : null);
|
|
1018
1018
|
var w;
|
|
1019
1019
|
let te = y(c != null && (w = (u = f.getItem(c)) === null || u === void 0 ? void 0 : u.textValue) !== null && w !== void 0 ? w : "");
|
|
1020
1020
|
ce(() => {
|
|
1021
1021
|
var l;
|
|
1022
|
-
F && (v.size > 0 || t) && !s.isOpen && a !== q && p !== "manual" &&
|
|
1022
|
+
F && (v.size > 0 || t) && !s.isOpen && a !== q && p !== "manual" && P(null, "input"), !b && !t && s.isOpen && v.size === 0 && C(), c != null && c !== V.current && C(), a !== q && (S.setFocusedKey(null), x(!1), a === "" && (e.inputValue === void 0 || e.selectedKey === void 0) && O(null)), c !== V.current && (e.inputValue === void 0 || e.selectedKey === void 0) ? W() : q !== a && K(a);
|
|
1023
1023
|
var $;
|
|
1024
1024
|
let m = c != null && ($ = (l = f.getItem(c)) === null || l === void 0 ? void 0 : l.textValue) !== null && $ !== void 0 ? $ : "";
|
|
1025
|
-
!F && c != null && e.inputValue === void 0 && c ===
|
|
1025
|
+
!F && c != null && e.inputValue === void 0 && c === V.current && te.current !== m && (K(m), N(m)), V.current = c, te.current = m;
|
|
1026
1026
|
});
|
|
1027
1027
|
let le = wu({
|
|
1028
1028
|
...e,
|
|
@@ -1036,7 +1036,7 @@ function $n(e) {
|
|
|
1036
1036
|
}), pe = () => {
|
|
1037
1037
|
d && c == null ? n() : o();
|
|
1038
1038
|
}, n = () => {
|
|
1039
|
-
|
|
1039
|
+
V.current = null, O(null), C();
|
|
1040
1040
|
}, o = () => {
|
|
1041
1041
|
if (e.selectedKey !== void 0 && e.inputValue !== void 0) {
|
|
1042
1042
|
var l, $;
|
|
@@ -1056,9 +1056,9 @@ function $n(e) {
|
|
|
1056
1056
|
o();
|
|
1057
1057
|
};
|
|
1058
1058
|
let G = () => {
|
|
1059
|
-
s.isOpen && S.focusedKey != null ? c === S.focusedKey ? o() :
|
|
1059
|
+
s.isOpen && S.focusedKey != null ? c === S.focusedKey ? o() : O(S.focusedKey) : r();
|
|
1060
1060
|
}, H = y(a), re = (l) => {
|
|
1061
|
-
l ? (H.current = a, p === "focus" && !e.isReadOnly &&
|
|
1061
|
+
l ? (H.current = a, p === "focus" && !e.isReadOnly && P(null, "focus")) : (B && r(), a !== H.current && le.commitValidation()), g(l);
|
|
1062
1062
|
}, ie = J(() => s.isOpen ? b ? k : v : X, [
|
|
1063
1063
|
s.isOpen,
|
|
1064
1064
|
k,
|
|
@@ -1073,20 +1073,20 @@ function $n(e) {
|
|
|
1073
1073
|
...le,
|
|
1074
1074
|
...s,
|
|
1075
1075
|
focusStrategy: h,
|
|
1076
|
-
toggle:
|
|
1077
|
-
open:
|
|
1076
|
+
toggle: R,
|
|
1077
|
+
open: P,
|
|
1078
1078
|
close: r,
|
|
1079
1079
|
selectionManager: S,
|
|
1080
1080
|
selectedKey: c,
|
|
1081
1081
|
defaultSelectedKey: me,
|
|
1082
|
-
setSelectedKey:
|
|
1082
|
+
setSelectedKey: O,
|
|
1083
1083
|
disabledKeys: Q,
|
|
1084
1084
|
isFocused: F,
|
|
1085
1085
|
setFocused: re,
|
|
1086
1086
|
selectedItem: Y,
|
|
1087
1087
|
collection: ie,
|
|
1088
1088
|
inputValue: a,
|
|
1089
|
-
defaultInputValue: ($e = Be(e.defaultInputValue, me, f)) !== null && $e !== void 0 ? $e :
|
|
1089
|
+
defaultInputValue: ($e = Be(e.defaultInputValue, me, f)) !== null && $e !== void 0 ? $e : j,
|
|
1090
1090
|
setInputValue: N,
|
|
1091
1091
|
commit: G,
|
|
1092
1092
|
revert: pe
|
|
@@ -1162,7 +1162,7 @@ function hn({ props: e, collection: u, comboBoxRef: i }) {
|
|
|
1162
1162
|
d && (t = "text");
|
|
1163
1163
|
let { validationBehavior: B } = xu(Eu) || {};
|
|
1164
1164
|
var b, x;
|
|
1165
|
-
let F = (x = (b = e.validationBehavior) !== null && b !== void 0 ? b : B) !== null && x !== void 0 ? x : "native", { contains: g } =
|
|
1165
|
+
let F = (x = (b = e.validationBehavior) !== null && b !== void 0 ? b : B) !== null && x !== void 0 ? x : "native", { contains: g } = Ru({
|
|
1166
1166
|
sensitivity: "base"
|
|
1167
1167
|
}), h = $n({
|
|
1168
1168
|
defaultFilter: e.defaultFilter || g,
|
|
@@ -1172,7 +1172,7 @@ function hn({ props: e, collection: u, comboBoxRef: i }) {
|
|
|
1172
1172
|
children: void 0,
|
|
1173
1173
|
collection: u,
|
|
1174
1174
|
validationBehavior: F
|
|
1175
|
-
}), E = y(null), T = y(null), D = y(null), f = y(null), [S, c] = hu(!e["aria-label"] && !e["aria-labelledby"]), { buttonProps:
|
|
1175
|
+
}), E = y(null), T = y(null), D = y(null), f = y(null), [S, c] = hu(!e["aria-label"] && !e["aria-labelledby"]), { buttonProps: O, inputProps: Y, listBoxProps: Q, labelProps: a, descriptionProps: N, errorMessageProps: ee, ...j } = sn({
|
|
1176
1176
|
...fu(e),
|
|
1177
1177
|
label: c,
|
|
1178
1178
|
inputRef: T,
|
|
@@ -1183,8 +1183,8 @@ function hn({ props: e, collection: u, comboBoxRef: i }) {
|
|
|
1183
1183
|
validationBehavior: F
|
|
1184
1184
|
}, h), [k, v] = z(null), X = de(() => {
|
|
1185
1185
|
if (T.current) {
|
|
1186
|
-
var
|
|
1187
|
-
let
|
|
1186
|
+
var P;
|
|
1187
|
+
let R = (P = E.current) === null || P === void 0 ? void 0 : P.getBoundingClientRect(), L = T.current.getBoundingClientRect(), oe = R ? Math.min(R.left, L.left) : L.left, C = R ? Math.max(R.right, L.right) : L.right;
|
|
1188
1188
|
v(C - oe + "px");
|
|
1189
1189
|
}
|
|
1190
1190
|
}, [
|
|
@@ -1192,25 +1192,25 @@ function hn({ props: e, collection: u, comboBoxRef: i }) {
|
|
|
1192
1192
|
T,
|
|
1193
1193
|
v
|
|
1194
1194
|
]);
|
|
1195
|
-
|
|
1195
|
+
Ou({
|
|
1196
1196
|
ref: T,
|
|
1197
1197
|
onResize: X
|
|
1198
1198
|
});
|
|
1199
1199
|
let ue = J(() => ({
|
|
1200
1200
|
isOpen: h.isOpen,
|
|
1201
1201
|
isDisabled: e.isDisabled || !1,
|
|
1202
|
-
isInvalid:
|
|
1202
|
+
isInvalid: j.isInvalid || !1,
|
|
1203
1203
|
isRequired: e.isRequired || !1
|
|
1204
1204
|
}), [
|
|
1205
1205
|
h.isOpen,
|
|
1206
1206
|
e.isDisabled,
|
|
1207
|
-
|
|
1207
|
+
j.isInvalid,
|
|
1208
1208
|
e.isRequired
|
|
1209
1209
|
]), U = vu({
|
|
1210
1210
|
...e,
|
|
1211
1211
|
values: ue,
|
|
1212
1212
|
defaultClassName: "react-aria-ComboBox"
|
|
1213
|
-
}), ne =
|
|
1213
|
+
}), ne = Pu(e, {
|
|
1214
1214
|
global: !0
|
|
1215
1215
|
});
|
|
1216
1216
|
delete ne.id;
|
|
@@ -1231,7 +1231,7 @@ function hn({ props: e, collection: u, comboBoxRef: i }) {
|
|
|
1231
1231
|
[
|
|
1232
1232
|
De,
|
|
1233
1233
|
{
|
|
1234
|
-
...
|
|
1234
|
+
...O,
|
|
1235
1235
|
ref: E,
|
|
1236
1236
|
isPressed: h.isOpen
|
|
1237
1237
|
}
|
|
@@ -1285,13 +1285,13 @@ function hn({ props: e, collection: u, comboBoxRef: i }) {
|
|
|
1285
1285
|
[
|
|
1286
1286
|
ye,
|
|
1287
1287
|
{
|
|
1288
|
-
isInvalid:
|
|
1288
|
+
isInvalid: j.isInvalid,
|
|
1289
1289
|
isDisabled: e.isDisabled || !1
|
|
1290
1290
|
}
|
|
1291
1291
|
],
|
|
1292
1292
|
[
|
|
1293
1293
|
Bu,
|
|
1294
|
-
|
|
1294
|
+
j
|
|
1295
1295
|
]
|
|
1296
1296
|
]
|
|
1297
1297
|
}, /* @__PURE__ */ _.createElement("div", {
|
|
@@ -1302,7 +1302,7 @@ function hn({ props: e, collection: u, comboBoxRef: i }) {
|
|
|
1302
1302
|
"data-focused": h.isFocused || void 0,
|
|
1303
1303
|
"data-open": h.isOpen || void 0,
|
|
1304
1304
|
"data-disabled": e.isDisabled || void 0,
|
|
1305
|
-
"data-invalid":
|
|
1305
|
+
"data-invalid": j.isInvalid || void 0,
|
|
1306
1306
|
"data-required": e.isRequired || void 0
|
|
1307
1307
|
}), p && t === "key" && /* @__PURE__ */ _.createElement("input", {
|
|
1308
1308
|
type: "hidden",
|
|
@@ -1311,7 +1311,7 @@ function hn({ props: e, collection: u, comboBoxRef: i }) {
|
|
|
1311
1311
|
value: (s = h.selectedKey) !== null && s !== void 0 ? s : ""
|
|
1312
1312
|
}));
|
|
1313
1313
|
}
|
|
1314
|
-
const fn = "
|
|
1314
|
+
const fn = "_combobox_jpjjo_1", vn = "_inputField_jpjjo_6", An = "_medium_jpjjo_28", Bn = "_wrap_jpjjo_69", En = "_button_jpjjo_75", Tn = "_icon_jpjjo_107", Dn = "_emptyState_jpjjo_113", M = {
|
|
1315
1315
|
combobox: fn,
|
|
1316
1316
|
inputField: vn,
|
|
1317
1317
|
medium: An,
|
|
@@ -1406,7 +1406,7 @@ function Ln(e) {
|
|
|
1406
1406
|
);
|
|
1407
1407
|
}
|
|
1408
1408
|
function mo(e) {
|
|
1409
|
-
return /* @__PURE__ */ A(cn, { ...e, children: /* @__PURE__ */ A(
|
|
1409
|
+
return /* @__PURE__ */ A(cn, { ...e, children: /* @__PURE__ */ A(ju, { items: e.children, children: (u) => /* @__PURE__ */ A(Ln, { children: u.name }, u.id) }) });
|
|
1410
1410
|
}
|
|
1411
1411
|
export {
|
|
1412
1412
|
Co as C,
|