@midas-ds/components 15.1.3 → 15.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +43 -0
- package/{CharacterCounter-CTpQ12f7.cjs → CharacterCounter-BjOzWOoN.cjs} +1 -1
- package/{CharacterCounter-gbDGfize.js → CharacterCounter-b6RpXKDF.js} +5 -5
- package/Checkbox-D9X5vM4a.cjs +6 -0
- package/Checkbox-ujNi8mrO.js +288 -0
- package/{CheckboxGroup-BkzQi1FB.js → CheckboxGroup-BeBThHOu.js} +16 -13
- package/CheckboxGroup-BmEiqFKx.cjs +1 -0
- package/{ComboBox-t1RVXiiQ.js → ComboBox-BGXUTKrW.js} +138 -142
- package/{ComboBox-BISNYEw3.cjs → ComboBox-lteAZwCb.cjs} +1 -1
- package/DateField-ZPcapPji.cjs +1 -0
- package/DateField-snXaUoBR.js +45 -0
- package/{DateInputDivider-DOHpVaNE.js → DateInputDivider-BjVsNVEk.js} +1 -1
- package/{DateInputDivider-CCrXjsUB.cjs → DateInputDivider-YOvEmapQ.cjs} +1 -1
- package/{DateRangePicker-mlnh0C1A.cjs → DateRangePicker-Biwt-Q8X.cjs} +2 -2
- package/{DateRangePicker-ezrFzzrO.js → DateRangePicker-CgvPZfMd.js} +168 -165
- package/{FieldError-JWxR_EqN.cjs → FieldError-DHzrxRPt.cjs} +1 -1
- package/{FieldError-CIxlNQCM.js → FieldError-DtEDCIQK.js} +1 -1
- package/{Label-C3ZSrB04.cjs → Label-Cbp1q387.cjs} +1 -1
- package/{Label-BqvFQoEF.js → Label-DH4JI6a4.js} +5 -5
- package/Layout-DQiqgjqR.cjs +16 -0
- package/{Layout-Hd1e_MEA.js → Layout-FveYuBny.js} +59 -58
- package/{ListBox-Rke-lL0z.cjs → ListBox-CMM6O46x.cjs} +1 -1
- package/{ListBox-BP_jDOdE.js → ListBox-CfzKpJFW.js} +26 -26
- package/{ListBoxLoadMoreItem-8dHDWs3w.cjs → ListBoxLoadMoreItem-10BeO9ux.cjs} +1 -1
- package/{ListBoxLoadMoreItem-BE5zpVVP.js → ListBoxLoadMoreItem-k-uwDi4f.js} +1 -1
- package/ListBoxSection-B5l2LIMZ.cjs +1 -0
- package/ListBoxSection-XoMfdRLd.js +51 -0
- package/{ProgressBar-BrtaxoR8.cjs → ProgressBar-C6ExqGom.cjs} +1 -1
- package/{ProgressBar-DhVQOs4P.js → ProgressBar-CePyiuw1.js} +1 -1
- package/{Radio-DClH8mWz.js → Radio-CNO4IHkf.js} +28 -28
- package/{Radio-VFIiuJIR.cjs → Radio-bfeheQ39.cjs} +1 -1
- package/{RangeCalendar-CH0CyBui.cjs → RangeCalendar-D7xj3ObC.cjs} +2 -2
- package/{RangeCalendar-DT_KVd80.js → RangeCalendar-DKsuoiPF.js} +101 -92
- package/{SearchField-Cd6X2rY4.js → SearchField-3XoN9q0k.js} +2 -2
- package/{SearchField-Cz5Pb0XE.cjs → SearchField-ClK2IHpM.cjs} +1 -1
- package/{Select-DL5Mvadi.cjs → Select-C1rNC9sy.cjs} +1 -1
- package/Select-CCyvb02g.cjs +1 -0
- package/{Select-zDwMkzOI.js → Select-mz65sX1p.js} +7 -8
- package/{Select-D4xRL7l2.js → Select-oiNYST-S.js} +5 -5
- package/{Table-DxqKDp7N.js → Table-3x_iGkVe.js} +1 -1
- package/{Table-B1nxmW14.cjs → Table-BKbmV4Yp.cjs} +1 -1
- package/{Text-BBFWBNAH.js → Text-CnY7jiPS.js} +9 -9
- package/Text-DUIBTA3N.cjs +1 -0
- package/{TextArea-CcKY4TI2.js → TextArea-Bzgu6xU_.js} +6 -6
- package/{TextArea-D68vGjYJ.cjs → TextArea-DPeIoF7V.cjs} +1 -1
- package/{TextField-DtD9-arA.cjs → TextField-CdhdTYjC.cjs} +1 -1
- package/{TextField-DyR61bjZ.js → TextField-DFMRyd9V.js} +1 -1
- package/TextField.module-D9xjQoiS.js +13 -0
- package/TextField.module-gwQfMD2x.cjs +1 -0
- package/assets/CharacterCounter.css +1 -1
- package/assets/Checkbox.css +1 -1
- package/assets/ComboBox.css +1 -1
- package/assets/DateField.css +1 -1
- package/assets/DateRangePicker.css +1 -1
- package/assets/Label.css +1 -1
- package/assets/ListBox.css +1 -1
- package/assets/Radio.css +1 -1
- package/assets/RangeCalendar.css +1 -1
- package/assets/Text.css +1 -1
- package/assets/TextField.css +1 -1
- package/assets/default.css +1 -1
- package/calendar/CalendarGrid.d.ts +1 -0
- package/calendar/CalendarHeader.d.ts +3 -1
- package/calendar/index.cjs +1 -1
- package/calendar/index.js +1 -1
- package/character-counter/index.cjs +1 -1
- package/character-counter/index.js +1 -1
- package/checkbox/index.cjs +1 -1
- package/checkbox/index.js +2 -2
- package/combobox/ComboBox.d.ts +10 -3
- package/combobox/index.cjs +1 -1
- package/combobox/index.js +1 -1
- package/combobox/utils.d.ts +12 -3
- package/date-field/index.cjs +1 -1
- package/date-field/index.js +2 -2
- package/date-picker/DatePicker.d.ts +1 -2
- package/date-picker/DatePickerInputField.d.ts +2 -5
- package/date-picker/index.cjs +1 -1
- package/date-picker/index.js +1 -1
- package/field-error/index.cjs +1 -1
- package/field-error/index.js +1 -1
- package/index.cjs +1 -1
- package/index.js +22 -22
- package/label/index.cjs +1 -1
- package/label/index.js +1 -1
- package/layout/index.cjs +1 -1
- package/layout/index.js +1 -1
- package/legacy-select/Select.d.ts +1 -1
- package/legacy-select/index.cjs +1 -1
- package/legacy-select/index.js +1 -1
- package/legacy-select/types.d.ts +3 -0
- package/list-box/ListBoxItem.d.ts +3 -9
- package/list-box/ListBoxSection.d.ts +6 -3
- package/list-box/index.cjs +1 -1
- package/list-box/index.js +3 -3
- package/list-box/types.d.ts +6 -0
- package/package.json +2 -2
- 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/table/index.cjs +1 -1
- package/table/index.js +1 -1
- package/text/index.cjs +1 -1
- package/text/index.js +1 -1
- package/textfield/index.cjs +1 -1
- package/textfield/index.js +1 -1
- package/variables-BkqZ2WGF.js +5 -0
- package/variables-CVumCR9l.cjs +1 -0
- package/Checkbox-BgrLxY6P.cjs +0 -1
- package/Checkbox-CdN1D5pD.js +0 -282
- package/CheckboxGroup-BdRG71EM.cjs +0 -1
- package/DateField-B9Yxknuy.cjs +0 -1
- package/DateField-BUZ7i9eS.js +0 -47
- package/Layout-BrEuHajQ.cjs +0 -16
- package/ListBoxSection-7Xzi-bqq.cjs +0 -1
- package/ListBoxSection-AIWxdu1v.js +0 -53
- package/Select-CHJefc5g.cjs +0 -1
- package/Text-D5OSv6Uv.cjs +0 -1
- package/TextField.module-BndKUn-7.js +0 -13
- package/TextField.module-Du0bmSGZ.cjs +0 -1
package/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./AccordionItem-DKE794Si.cjs"),l=require("./BadgeContainer-BZl6mSeb.cjs"),m=require("./Breadcrumbs-BBDGxc68.cjs"),I=require("./Button-BEWKXjlP.cjs"),D=require("./ButtonGroup-BpvDDECt.cjs"),g=require("./RangeCalendar-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./AccordionItem-DKE794Si.cjs"),l=require("./BadgeContainer-BZl6mSeb.cjs"),m=require("./Breadcrumbs-BBDGxc68.cjs"),I=require("./Button-BEWKXjlP.cjs"),D=require("./ButtonGroup-BpvDDECt.cjs"),g=require("./RangeCalendar-D7xj3ObC.cjs"),e=require("./Card-Db9xdzJ0.cjs"),k=require("./CharacterCounter-BjOzWOoN.cjs"),P=require("./Checkbox-D9X5vM4a.cjs"),G=require("./CheckboxGroup-BmEiqFKx.cjs"),h=require("./ColorSchemeSwitch-Ckna0otR.cjs"),u=require("./ComboBox-lteAZwCb.cjs"),R=require("./DateField-ZPcapPji.cjs"),s=require("./DateInputDivider-YOvEmapQ.cjs"),T=require("./DateRangePicker-Biwt-Q8X.cjs"),B=require("./Dropdown-_g9l5k07.cjs"),v=require("./FieldError-DHzrxRPt.cjs"),b=require("./FileUpload-C0TjNkuh.cjs"),F=require("./Grid-B6G4PWn5.cjs"),M=require("./GridItem-BZ8eOXMB.cjs"),A=require("./Heading-x7y3xadc.cjs"),$=require("./InfoBanner-_M_rGQiu.cjs"),w=require("./Label-Cbp1q387.cjs"),t=require("./Layout-DQiqgjqR.cjs"),f=require("./Link-BvUSTIip.cjs"),H=require("./LinkButton-DGdnbTgR.cjs"),y=require("./Logo-4tRnV4Su.cjs"),E=require("./Dialog-DtOf0vWx.cjs"),N=require("./Popover-DpB0XDBp.cjs"),Q=require("./ProgressBar-C6ExqGom.cjs"),C=require("./Radio-bfeheQ39.cjs"),Z=require("./SearchField-ClK2IHpM.cjs"),j=require("./Select-C1rNC9sy.cjs"),O=require("./Select-CCyvb02g.cjs"),U=require("./Skeleton-8onymGEG.cjs"),z=require("./Spinner-DIapnvIz.cjs"),o=require("./Table-BKbmV4Yp.cjs"),a=require("./TabList-DVzXuGXA.cjs"),p=require("./Tag-BL-_PONN.cjs"),J=require("./Text-DUIBTA3N.cjs"),n=require("./TextArea-DPeIoF7V.cjs"),r=require("./Toast-DUZ5jfG1.cjs"),q=require("./ToggleButtonGroup-dnvnzkaD.cjs"),x=require("./Tooltip-D-ATlbIM.cjs"),K=require("./ListBox-CMM6O46x.cjs"),L=require("./ListBoxLoadMoreItem-10BeO9ux.cjs"),c=require("./ListBoxSection-B5l2LIMZ.cjs"),i=require("./Separator-CSyYDGNE.cjs"),V=require("./usePress-DmU79HEg.cjs"),S=require("./Dialog-DycTLpdr.cjs");exports.Accordion=d.Accordion;exports.AccordionItem=d.AccordionItem;exports.Badge=l.Badge;exports.BadgeContainer=l.BadgeContainer;exports.Breadcrumbs=m.Breadcrumbs;exports.Button=I.Button;exports.ButtonGroup=D.ButtonGroup;exports.Calendar=g.Calendar;exports.RangeCalendar=g.RangeCalendar;exports.Card=e.Card;exports.CardActionArea=e.CardActionArea;exports.CardActions=e.CardActions;exports.CardContent=e.CardContent;exports.CardImage=e.CardImage;exports.CardLink=e.CardLink;exports.CardTitle=e.CardTitle;exports.CharacterCounter=k.CharacterCounter;exports.Checkbox=P.Checkbox;exports.CheckboxGroup=G.CheckboxGroup;exports.ColorSchemeSwitch=h.ColorSchemeSwitch;exports.ComboBox=u.ComboBox;exports.ComboBoxItem=u.ComboBoxItem;exports.ComboBoxSection=u.ComboBoxSection;exports.DateField=R.DateField;exports.DateInput=s.DateInput;exports.DateInputDivider=s.DateInputDivider;exports.DateSegment=s.DateSegment;exports.DatePicker=T.DatePicker;exports.DateRangePicker=T.DateRangePicker;exports.Dropdown=B.Dropdown;exports.DropdownItem=B.DropdownItem;exports.FieldError=v.FieldError;exports.DropZone=b.DropZone;exports.FileTrigger=b.FileTrigger;exports.Grid=F.Grid;exports.GridItem=M.GridItem;exports.Heading=A.Heading;exports.InfoBanner=$.InfoBanner;exports.Label=w.Label;exports.Header=t.Header;exports.Layout=t.Layout;exports.Navbar=t.Navbar;exports.Sidebar=t.Sidebar;exports.SidebarLink=t.SidebarLink;exports.Link=f.Link;exports.LinkButton=H.LinkButton;exports.Logo=y.Logo;exports.Modal=E.Modal;exports.Popover=N.Popover;exports.ProgressBar=Q.ProgressBar;exports.Radio=C.Radio;exports.RadioGroup=C.RadioGroup;exports.SearchField=Z.SearchField;exports.Select=j.Select;exports.LegacySelect=O.Select;exports.Skeleton=U.Skeleton;exports.Spinner=z.Spinner;exports.Cell=o.Cell;exports.Column=o.Column;exports.Row=o.Row;exports.Table=o.Table;exports.TableBody=o.TableBody;exports.TableHeader=o.TableHeader;exports.Tab=a.Tab;exports.TabList=a.TabList;exports.TabPanel=a.TabPanel;exports.Tabs=a.Tabs;exports.Tag=p.Tag;exports.TagGroup=p.TagGroup;exports.Text=J.Text;exports.Input=n.Input;exports.TextArea=n.TextArea;exports.TextField=n.TextField;exports.TextFieldBase=n.TextFieldBase;exports.GlobalToastRegion=r.GlobalToastRegion;exports.Toast=r.Toast;exports.ToastProvider=r.ToastProvider;exports.ToastRegion=r.ToastRegion;exports.toastQueue=r.toastQueue;exports.useToastState=r.useToastState;exports.ToggleButton=q.ToggleButton;exports.ToggleButtonGroup=q.ToggleButtonGroup;exports.Tooltip=x.Tooltip;exports.TooltipTrigger=x.TooltipTrigger;exports.ListBox=K.ListBox;exports.ListBoxButton=L.ListBoxButton;exports.ListBoxLoadMoreItem=L.ListBoxLoadMoreItem;exports.ListBoxHeader=c.ListBoxHeader;exports.ListBoxItem=c.ListBoxItem;exports.ListBoxPopover=c.ListBoxPopover;exports.ListBoxSection=c.ListBoxSection;exports.Menu=i.Menu;exports.MenuItem=i.MenuItem;exports.MenuPopover=i.MenuPopover;exports.MenuSection=i.MenuSection;exports.Separator=i.Separator;exports.RouterProvider=V.$ea8dcbcb9ea1b556$export$323e4fc2fa4753fb;exports.DialogTrigger=S.$de32f1b87079253c$export$2e1e1122cf0cba88;exports.MenuTrigger=S.$3674c52c6b3c5bce$export$27d2ad3c5815583e;
|
package/index.js
CHANGED
|
@@ -3,48 +3,48 @@ import { B as s, a as p } from "./BadgeContainer-DilMiV6u.js";
|
|
|
3
3
|
import { B as m } from "./Breadcrumbs-BenPNv8Z.js";
|
|
4
4
|
import { B as i } from "./Button-DdXFHfXw.js";
|
|
5
5
|
import { B as d } from "./ButtonGroup-Swh2E6Es.js";
|
|
6
|
-
import { C as l, R as C } from "./RangeCalendar-
|
|
6
|
+
import { C as l, R as C } from "./RangeCalendar-DKsuoiPF.js";
|
|
7
7
|
import { C as b, d as g, c as B, a as c, e as L, f as S, b as D } from "./Card-CdqGFff2.js";
|
|
8
|
-
import { C as G } from "./CharacterCounter-
|
|
9
|
-
import { C as R } from "./Checkbox-
|
|
10
|
-
import { C as M } from "./CheckboxGroup-
|
|
8
|
+
import { C as G } from "./CharacterCounter-b6RpXKDF.js";
|
|
9
|
+
import { C as R } from "./Checkbox-ujNi8mrO.js";
|
|
10
|
+
import { C as M } from "./CheckboxGroup-BeBThHOu.js";
|
|
11
11
|
import { C as v } from "./ColorSchemeSwitch-aF2UxI20.js";
|
|
12
|
-
import { C as h, a as H, b as w } from "./ComboBox-
|
|
13
|
-
import { D as N } from "./DateField-
|
|
14
|
-
import { a as E, b as Q, D as Z } from "./DateInputDivider-
|
|
15
|
-
import { D as q, a as z } from "./DateRangePicker-
|
|
12
|
+
import { C as h, a as H, b as w } from "./ComboBox-BGXUTKrW.js";
|
|
13
|
+
import { D as N } from "./DateField-snXaUoBR.js";
|
|
14
|
+
import { a as E, b as Q, D as Z } from "./DateInputDivider-BjVsNVEk.js";
|
|
15
|
+
import { D as q, a as z } from "./DateRangePicker-CgvPZfMd.js";
|
|
16
16
|
import { D as K, a as O } from "./Dropdown-B4lwe0Hn.js";
|
|
17
|
-
import { F as V } from "./FieldError-
|
|
17
|
+
import { F as V } from "./FieldError-DtEDCIQK.js";
|
|
18
18
|
import { D as X, F as Y } from "./FileUpload-DLBP3VPp.js";
|
|
19
19
|
import { G as oo } from "./Grid-0XOQPryP.js";
|
|
20
20
|
import { G as ro } from "./GridItem-YtIpL5V2.js";
|
|
21
21
|
import { H as to } from "./Heading-CCoGfKQ8.js";
|
|
22
22
|
import { I as po } from "./InfoBanner-D7Ta-7PI.js";
|
|
23
|
-
import { L as mo } from "./Label-
|
|
24
|
-
import { H as io, L as no, N as To, S as lo, a as Co } from "./Layout-
|
|
23
|
+
import { L as mo } from "./Label-DH4JI6a4.js";
|
|
24
|
+
import { H as io, L as no, N as To, S as lo, a as Co } from "./Layout-FveYuBny.js";
|
|
25
25
|
import { L as bo } from "./Link-BudFjYrw.js";
|
|
26
26
|
import { L as Bo } from "./LinkButton-DP9W-E32.js";
|
|
27
27
|
import { L as Lo } from "./Logo-DLlt576_.js";
|
|
28
28
|
import { M as Do } from "./Dialog-CPuJA2fm.js";
|
|
29
29
|
import { P as Go } from "./Popover-CS8Yyfrq.js";
|
|
30
|
-
import { P as Ro } from "./ProgressBar-
|
|
31
|
-
import { R as Mo, a as Fo } from "./Radio-
|
|
32
|
-
import { S as Ao } from "./SearchField-
|
|
33
|
-
import { S as Ho } from "./Select-
|
|
34
|
-
import { S as yo } from "./Select-
|
|
30
|
+
import { P as Ro } from "./ProgressBar-CePyiuw1.js";
|
|
31
|
+
import { R as Mo, a as Fo } from "./Radio-CNO4IHkf.js";
|
|
32
|
+
import { S as Ao } from "./SearchField-3XoN9q0k.js";
|
|
33
|
+
import { S as Ho } from "./Select-oiNYST-S.js";
|
|
34
|
+
import { S as yo } from "./Select-mz65sX1p.js";
|
|
35
35
|
import { S as $o } from "./Skeleton-BjTEGRpe.js";
|
|
36
36
|
import { S as Qo } from "./Spinner-D6Fcu_Dp.js";
|
|
37
|
-
import { b as jo, C as qo, R as zo, T as Jo, c as Ko, a as Oo } from "./Table-
|
|
37
|
+
import { b as jo, C as qo, R as zo, T as Jo, c as Ko, a as Oo } from "./Table-3x_iGkVe.js";
|
|
38
38
|
import { a as Vo, c as Wo, b as Xo, T as Yo } from "./TabList-BBmBumm6.js";
|
|
39
39
|
import { T as oa, a as aa } from "./Tag-DX1X_NZE.js";
|
|
40
|
-
import { T as ea } from "./Text-
|
|
41
|
-
import { I as sa, b as pa, a as xa, T as ma } from "./TextArea-
|
|
40
|
+
import { T as ea } from "./Text-CnY7jiPS.js";
|
|
41
|
+
import { I as sa, b as pa, a as xa, T as ma } from "./TextArea-Bzgu6xU_.js";
|
|
42
42
|
import { G as ia, b as na, T as da, a as Ta, t as la, u as Ca } from "./Toast-B99bLWnh.js";
|
|
43
43
|
import { T as ba, a as ga } from "./ToggleButtonGroup-CFRutAZ4.js";
|
|
44
44
|
import { T as ca, a as La } from "./Tooltip-CUdmOznK.js";
|
|
45
|
-
import { L as Da } from "./ListBox-
|
|
46
|
-
import { L as Ga, a as Pa } from "./ListBoxLoadMoreItem-
|
|
47
|
-
import { c as ka, L as Ma, a as Fa, b as va } from "./ListBoxSection-
|
|
45
|
+
import { L as Da } from "./ListBox-CfzKpJFW.js";
|
|
46
|
+
import { L as Ga, a as Pa } from "./ListBoxLoadMoreItem-k-uwDi4f.js";
|
|
47
|
+
import { c as ka, L as Ma, a as Fa, b as va } from "./ListBoxSection-XoMfdRLd.js";
|
|
48
48
|
import { M as ha, a as Ha, b as wa, c as ya, S as Na } from "./Separator-DLr4kUJD.js";
|
|
49
49
|
import { $ as Ea } from "./usePress-BqQIhkNY.js";
|
|
50
50
|
import { $ as Za, a as ja } from "./Dialog-D4Py85wi.js";
|
package/label/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Label-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Label-Cbp1q387.cjs");exports.Label=e.Label;
|
package/label/index.js
CHANGED
package/layout/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Layout-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Layout-DQiqgjqR.cjs");exports.Header=e.Header;exports.Layout=e.Layout;exports.Navbar=e.Navbar;exports.Sidebar=e.Sidebar;exports.SidebarLink=e.SidebarLink;
|
package/layout/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SelectProps } from './types';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
/**
|
|
4
|
-
* @deprecated Kept for backwards compatibility, but will be removed in a future version. Use `Select` from `@midas-ds/components` instead.
|
|
4
|
+
* @deprecated since v15.2.0 Kept for backwards compatibility, but will be removed in a future version. Use `Select` from `@midas-ds/components` instead.
|
|
5
5
|
*/
|
|
6
6
|
export declare const Select: React.ForwardRefExoticComponent<Omit<SelectProps, "children" | "items"> & {
|
|
7
7
|
options: import('..').ListBoxOption[];
|
package/legacy-select/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Select-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Select-CCyvb02g.cjs");exports.LegacySelect=e.Select;
|
package/legacy-select/index.js
CHANGED
package/legacy-select/types.d.ts
CHANGED
|
@@ -170,6 +170,9 @@ export interface SelectProps extends MultiSelectStateProps<ListBoxOption> {
|
|
|
170
170
|
*/
|
|
171
171
|
size?: Size;
|
|
172
172
|
}
|
|
173
|
+
/**
|
|
174
|
+
* @deprecated since v15.2.0 please use `Select` and `SelectProps` instead
|
|
175
|
+
*/
|
|
173
176
|
export type SelectContainerProps = Omit<SelectProps, 'children' | 'items'> & {
|
|
174
177
|
/** Item objects in the collection. */
|
|
175
178
|
options: ListBoxOption[];
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
import { ListBoxItemProps
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
* Wheter to hide the checkmarks and checkboxes for selected items
|
|
5
|
-
* @default false
|
|
6
|
-
*/
|
|
7
|
-
hideSelectionIndicator?: boolean;
|
|
8
|
-
}
|
|
9
|
-
export declare const ListBoxItem: <T extends object>({ children, className, hideSelectionIndicator, textValue, ...rest }: ListBoxItemProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
import { ListBoxItemProps } from 'react-aria-components';
|
|
2
|
+
export type { ListBoxItemProps };
|
|
3
|
+
export declare const ListBoxItem: <T extends object>({ children, className, textValue, ...rest }: ListBoxItemProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { ListBoxSectionProps as AriaListBoxSectionProps } from 'react-aria-components';
|
|
2
|
-
import { ListBoxSectionElement } from './types';
|
|
3
2
|
import * as React from 'react';
|
|
4
|
-
export interface ListBoxSectionProps<T extends
|
|
3
|
+
export interface ListBoxSectionProps<T extends object> extends Omit<AriaListBoxSectionProps<T>, 'children'> {
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated since v15.2.0 please remove as soon as we drop ComboBoxSection.
|
|
6
|
+
* Also consider using only AriaListBoxSectionProps, the custom children is just for the use of ListBoxHeader.
|
|
7
|
+
*/
|
|
5
8
|
name?: React.ReactNode;
|
|
6
9
|
children?: React.ReactNode;
|
|
7
10
|
}
|
|
8
|
-
export declare const ListBoxSection: <T extends
|
|
11
|
+
export declare const ListBoxSection: <T extends object>({ children, name, ...rest }: ListBoxSectionProps<T>) => import("react/jsx-runtime").JSX.Element;
|
package/list-box/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../ListBox-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../ListBox-CMM6O46x.cjs"),t=require("../ListBoxLoadMoreItem-10BeO9ux.cjs"),o=require("../ListBoxSection-B5l2LIMZ.cjs");exports.ListBox=e.ListBox;exports.ListBoxButton=t.ListBoxButton;exports.ListBoxLoadMoreItem=t.ListBoxLoadMoreItem;exports.ListBoxHeader=o.ListBoxHeader;exports.ListBoxItem=o.ListBoxItem;exports.ListBoxPopover=o.ListBoxPopover;exports.ListBoxSection=o.ListBoxSection;
|
package/list-box/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { L as s } from "../ListBox-
|
|
2
|
-
import { L, a as e } from "../ListBoxLoadMoreItem-
|
|
3
|
-
import { c as r, L as i, a as B, b as m } from "../ListBoxSection-
|
|
1
|
+
import { L as s } from "../ListBox-CfzKpJFW.js";
|
|
2
|
+
import { L, a as e } from "../ListBoxLoadMoreItem-k-uwDi4f.js";
|
|
3
|
+
import { c as r, L as i, a as B, b as m } from "../ListBoxSection-XoMfdRLd.js";
|
|
4
4
|
export {
|
|
5
5
|
s as ListBox,
|
|
6
6
|
L as ListBoxButton,
|
package/list-box/types.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { Key } from 'react-aria-components';
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated since v15.2.0 ListBoxItem will extend `object` from now on
|
|
4
|
+
*/
|
|
2
5
|
export type ListBoxItemElement = {
|
|
3
6
|
children?: never;
|
|
4
7
|
id: Key;
|
|
@@ -12,6 +15,9 @@ export type ListBoxItemElement = {
|
|
|
12
15
|
*/
|
|
13
16
|
[prop: string]: unknown;
|
|
14
17
|
};
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated since v15.2.0 ListBoxSection will extend `object` from now on
|
|
20
|
+
*/
|
|
15
21
|
export type ListBoxSectionElement = {
|
|
16
22
|
children: ListBoxItemElement[];
|
|
17
23
|
name: string;
|
package/package.json
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"description": "Midas Components",
|
|
15
15
|
"homepage": "https://designsystem.migrationsverket.se/",
|
|
16
16
|
"license": "CC0-1.0",
|
|
17
|
-
"version": "15.1
|
|
17
|
+
"version": "15.2.1",
|
|
18
18
|
"main": "./index.cjs",
|
|
19
19
|
"module": "./index.js",
|
|
20
20
|
"types": "./index.d.ts",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
}
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@midas-ds/theme": "3.
|
|
47
|
+
"@midas-ds/theme": "3.2.0",
|
|
48
48
|
"react-aria-components": "1.13.0",
|
|
49
49
|
"react-stately": "3.42.0"
|
|
50
50
|
}
|
package/progress-bar/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../ProgressBar-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../ProgressBar-C6ExqGom.cjs");exports.ProgressBar=r.ProgressBar;
|
package/progress-bar/index.js
CHANGED
package/radio/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../Radio-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../Radio-bfeheQ39.cjs");exports.Radio=o.Radio;exports.RadioGroup=o.RadioGroup;
|
package/radio/index.js
CHANGED
package/search-field/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../SearchField-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../SearchField-ClK2IHpM.cjs");exports.SearchField=e.SearchField;
|
package/search-field/index.js
CHANGED
package/select/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Select-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Select-C1rNC9sy.cjs");exports.Select=e.Select;
|
package/select/index.js
CHANGED
package/table/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Table-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Table-BKbmV4Yp.cjs");exports.Cell=e.Cell;exports.Column=e.Column;exports.Row=e.Row;exports.Table=e.Table;exports.TableBody=e.TableBody;exports.TableHeader=e.TableHeader;
|
package/table/index.js
CHANGED
package/text/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Text-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Text-DUIBTA3N.cjs");exports.Text=e.Text;
|
package/text/index.js
CHANGED
package/textfield/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../TextArea-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../TextArea-DPeIoF7V.cjs");exports.Input=e.Input;exports.TextArea=e.TextArea;exports.TextField=e.TextField;exports.TextFieldBase=e.TextFieldBase;
|
package/textfield/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const r="light-dark(#b90835, #b90835)",n="light-dark(#fff, #fff)";exports.brandPrimary=r;exports.iconOnColor=n;
|
package/Checkbox-BgrLxY6P.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";require('./assets/Checkbox.css');const o=require("react/jsx-runtime"),k=require("react"),T=require("./RSPContexts-XUvspq3j.cjs"),q=require("./utils-CtICjCYt.cjs"),z=require("./Form-BuOomA4T.cjs"),D=require("./clsx-C11secjj.cjs"),R=require("./mergeProps-Du5A8xi8.cjs"),W=require("./VisuallyHidden-BMelU6B0.cjs"),m=require("./useFormValidation-DV2Ioblb.cjs"),I=require("./usePress-DmU79HEg.cjs"),J=require("./filterDOMProps-RRlKPKX0.cjs"),K=require("./useFocusable-M4se1KJt.cjs"),O=require("./useToggleState-DaxmInOW.cjs"),Q=require("./useHover-DULSfLuK.cjs"),X=require("./useFocusRing-C-XVcAE5.cjs");function Y(e){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const d=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(i,a,d.get?d:{enumerable:!0,get:()=>e[a]})}}return i.default=e,Object.freeze(i)}const g=Y(k);function Z(e,i,a){let{isDisabled:d=!1,isReadOnly:n=!1,value:r,name:l,form:c,children:t,"aria-label":b,"aria-labelledby":x,validationState:$="valid",isInvalid:v,onPressStart:h,onPressEnd:P,onPressChange:u,onPress:f,onPressUp:s,onClick:S}=e,w=y=>{y.stopPropagation(),i.setSelected(y.target.checked)},E=t!=null,G=b!=null||x!=null;!E&&!G&&process.env.NODE_ENV!=="production"&&console.warn("If you do not provide children, you must specify an aria-label for accessibility");let{pressProps:M,isPressed:F}=I.$f6c31cce2adf654f$export$45712eceda6fad21({onPressStart:h,onPressEnd:P,onPressChange:u,onPress:f,onPressUp:s,onClick:S,isDisabled:d}),{pressProps:N,isPressed:L}=I.$f6c31cce2adf654f$export$45712eceda6fad21({onPressStart:h,onPressEnd:P,onPressChange:u,onPressUp:s,onClick:S,onPress(y){var C;f==null||f(y),i.toggle(),(C=a.current)===null||C===void 0||C.focus()},isDisabled:d||n}),{focusableProps:U}=K.$f645667febf57a63$export$4c014de7c8940b4c(e,a),A=R.$3ef42575df84b30b$export$9d1611c77c2fe928(M,U),H=J.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(e,{labelable:!0});return m.$99facab73266f662$export$5add1d006293d136(a,i.defaultSelected,i.setSelected),{labelProps:R.$3ef42575df84b30b$export$9d1611c77c2fe928(N,{onClick:y=>y.preventDefault()}),inputProps:R.$3ef42575df84b30b$export$9d1611c77c2fe928(H,{"aria-invalid":v||$==="invalid"||void 0,"aria-errormessage":e["aria-errormessage"],"aria-controls":e["aria-controls"],"aria-readonly":n||void 0,onChange:w,disabled:d,...r==null?{}:{value:r},name:l,form:c,type:"checkbox",...A}),isSelected:i.isSelected,isPressed:F||L,isDisabled:d,isReadOnly:n,isInvalid:v||$==="invalid"}}function _(e,i,a){let d=m.$e5be200c675c3b3a$export$fc1a364ae1f3ff10({...e,value:i.isSelected}),{isInvalid:n,validationErrors:r,validationDetails:l}=d.displayValidation,{labelProps:c,inputProps:t,isSelected:b,isPressed:x,isDisabled:$,isReadOnly:v}=Z({...e,isInvalid:n},i,a);m.$e93e671b31057976$export$b8473d3665f3a75a(e,d,a);let{isIndeterminate:h,isRequired:P,validationBehavior:u="aria"}=e;k.useEffect(()=>{a.current&&(a.current.indeterminate=!!h)});let{pressProps:f}=I.$f6c31cce2adf654f$export$45712eceda6fad21({isDisabled:$||v,onPress(){let{[m.$e5be200c675c3b3a$export$a763b9476acd3eb]:s}=e,{commitValidation:S}=s||d;S()}});return{labelProps:R.$3ef42575df84b30b$export$9d1611c77c2fe928(c,f,k.useMemo(()=>({onMouseDown:s=>s.preventDefault()}),[])),inputProps:{...t,checked:b,"aria-required":P&&u==="aria"||void 0,required:P&&u==="native"},isSelected:b,isPressed:x,isDisabled:$,isReadOnly:v,isInvalid:n,validationErrors:r,validationDetails:l}}const j=new WeakMap;function ee(e,i,a){const d=O.$3017fa7ffdddec74$export$8042c6c013fd5226({isReadOnly:e.isReadOnly||i.isReadOnly,isSelected:i.isSelected(e.value),defaultSelected:i.defaultValue.includes(e.value),onChange(s){s?i.addValue(e.value):i.removeValue(e.value),e.onChange&&e.onChange(s)}});let{name:n,form:r,descriptionId:l,errorMessageId:c,validationBehavior:t}=j.get(i);var b;t=(b=e.validationBehavior)!==null&&b!==void 0?b:t;let{realtimeValidation:x}=m.$e5be200c675c3b3a$export$fc1a364ae1f3ff10({...e,value:d.isSelected,name:void 0,validationBehavior:"aria"}),$=k.useRef(m.$e5be200c675c3b3a$export$dad6ae84456c676a),v=()=>{i.setInvalid(e.value,x.isInvalid?x:$.current)};k.useEffect(v);let h=i.realtimeValidation.isInvalid?i.realtimeValidation:x,P=t==="native"?i.displayValidation:h;var u;let f=_({...e,isReadOnly:e.isReadOnly||i.isReadOnly,isDisabled:e.isDisabled||i.isDisabled,name:e.name||n,form:e.form||r,isRequired:(u=e.isRequired)!==null&&u!==void 0?u:i.isRequired,validationBehavior:t,[m.$e5be200c675c3b3a$export$a763b9476acd3eb]:{realtimeValidation:h,displayValidation:P,resetValidation:i.resetValidation,commitValidation:i.commitValidation,updateValidation(s){$.current=s,v()}}},d,a);return{...f,inputProps:{...f.inputProps,"aria-describedby":[e["aria-describedby"],i.isInvalid?c:null,l].filter(Boolean).join(" ")||void 0}}}const p=k.createContext(null),ie="_checkboxInner_164xy_1",ae="_checkbox_164xy_1",de="_checkboxGroup_164xy_142",V={checkboxInner:ie,checkbox:ae,checkboxGroup:de},B=g.forwardRef((e,i)=>{const{hoverProps:a,isHovered:d}=e.hoverResult,{pressProps:n,isPressed:r}=e.pressResult,{isFocused:l,isFocusVisible:c,focusProps:t}=e.focusRingAria;return o.jsxs("label",{ref:i,...R.$3ef42575df84b30b$export$9d1611c77c2fe928(a,n,e.labelProps),slot:e.slot||void 0,className:D.clsx(V.checkbox,e.className),"data-hovered":d||void 0,"data-selected":e.isSelected||void 0,"data-indeterminate":e.isIndeterminate||void 0,"data-pressed":r||void 0,"data-disabled":e.isDisabled||void 0,"data-readonly":e.isReadOnly||void 0,"data-invalid":e.isInvalid||void 0,"data-focused":l||void 0,"data-focus-visible":c||void 0,"data-required":e.isRequired||void 0,children:[o.jsx("div",{className:D.clsx(V.checkboxInner),children:o.jsx("svg",{width:16,height:16,viewBox:"0 0 18 18","aria-hidden":"true",children:e.isIndeterminate?o.jsx("rect",{x:4,y:8,width:10,height:2}):o.jsx("polyline",{points:"3,9 7,13 15,4"})})}),o.jsx(W.$5c3e21d68f1c4674$export$439d29a4e110a164,{children:o.jsx("input",{...R.$3ef42575df84b30b$export$9d1611c77c2fe928(e.inputProps,t),ref:e.inputRef})}),e.children]})}),ne=g.forwardRef((e,i)=>{const a=ee({...e,value:e.value||""},e.state,e.inputRef);return o.jsx(B,{...e,...a,ref:i})}),te=g.forwardRef((e,i)=>{const a=_(e,O.$3017fa7ffdddec74$export$8042c6c013fd5226(e),e.inputRef);return o.jsx(B,{...e,...a,ref:i})}),se=g.forwardRef((e,i)=>{[e,i]=q.$64fa3d84918910a7$export$29f1550f4b0d4415(e,i,T.$4e85f108e88277b8$export$b085522c77523c51);const a=q.$64fa3d84918910a7$export$fabf2dc03a41866e(z.$d3e0e05bdfcf66bd$export$c24727297075ec6a),d=e.validationBehavior??(a==null?void 0:a.validationBehavior)??"native",n=g.useContext(p),r=g.useRef(null),l=Q.$6179b936705e76d3$export$ae780daf29e6d456(e),c=I.$f6c31cce2adf654f$export$45712eceda6fad21({ref:i,isDisabled:e.isDisabled}),t=X.$f7dceffc5ad7768b$export$4e328f61c538687f();return n?o.jsx(ne,{...e,state:n,inputRef:r,hoverResult:l,pressResult:c,focusRingAria:t,validationBehavior:d}):o.jsx(te,{...e,inputRef:r,hoverResult:l,pressResult:c,focusRingAria:t,validationBehavior:d})});exports.$1ae600c947479353$export$ec98120685d4f57d=j;exports.Checkbox=se;exports.CheckboxGroupContext=p;exports.styles=V;
|
package/Checkbox-CdN1D5pD.js
DELETED
|
@@ -1,282 +0,0 @@
|
|
|
1
|
-
import { jsxs as F, jsx as c } from "react/jsx-runtime";
|
|
2
|
-
import * as R from "react";
|
|
3
|
-
import H, { useEffect as C, useMemo as W, useRef as z } from "react";
|
|
4
|
-
import { c as J } from "./RSPContexts-B0lEq7qq.js";
|
|
5
|
-
import { $ as K, c as Q } from "./utils-D2iKpxcZ.js";
|
|
6
|
-
import { $ as T } from "./Form-CXcEMuBf.js";
|
|
7
|
-
import { c as S } from "./clsx-OuTLNxxd.js";
|
|
8
|
-
import { a as y } from "./mergeProps-Ct8m5-xW.js";
|
|
9
|
-
import { $ as X } from "./VisuallyHidden-DuW70K-5.js";
|
|
10
|
-
import { a as Y, $ as D, b as Z, d as _, e as ee } from "./useFormValidation-By7G-T7y.js";
|
|
11
|
-
import { b as g } from "./usePress-BqQIhkNY.js";
|
|
12
|
-
import { $ as ae } from "./filterDOMProps-wsa9OcNI.js";
|
|
13
|
-
import { a as ie } from "./useFocusable-BJj-Bkig.js";
|
|
14
|
-
import { $ as B } from "./useToggleState-BVOqL4hI.js";
|
|
15
|
-
import { $ as de } from "./useHover-DkC5FyNd.js";
|
|
16
|
-
import { $ as ne } from "./useFocusRing-CcxI7nbg.js";
|
|
17
|
-
import './assets/Checkbox.css';function oe(e, a, i) {
|
|
18
|
-
let { isDisabled: d = !1, isReadOnly: n = !1, value: s, name: t, form: r, children: o, "aria-label": v, "aria-labelledby": $, validationState: b = "valid", isInvalid: m, onPressStart: h, onPressEnd: P, onPressChange: f, onPress: u, onPressUp: l, onClick: I } = e, q = (x) => {
|
|
19
|
-
x.stopPropagation(), a.setSelected(x.target.checked);
|
|
20
|
-
}, w = o != null, E = v != null || $ != null;
|
|
21
|
-
!w && !E && process.env.NODE_ENV !== "production" && console.warn("If you do not provide children, you must specify an aria-label for accessibility");
|
|
22
|
-
let { pressProps: G, isPressed: M } = g({
|
|
23
|
-
onPressStart: h,
|
|
24
|
-
onPressEnd: P,
|
|
25
|
-
onPressChange: f,
|
|
26
|
-
onPress: u,
|
|
27
|
-
onPressUp: l,
|
|
28
|
-
onClick: I,
|
|
29
|
-
isDisabled: d
|
|
30
|
-
}), { pressProps: N, isPressed: L } = g({
|
|
31
|
-
onPressStart: h,
|
|
32
|
-
onPressEnd: P,
|
|
33
|
-
onPressChange: f,
|
|
34
|
-
onPressUp: l,
|
|
35
|
-
onClick: I,
|
|
36
|
-
onPress(x) {
|
|
37
|
-
var k;
|
|
38
|
-
u == null || u(x), a.toggle(), (k = i.current) === null || k === void 0 || k.focus();
|
|
39
|
-
},
|
|
40
|
-
isDisabled: d || n
|
|
41
|
-
}), { focusableProps: U } = ie(e, i), j = y(G, U), A = ae(e, {
|
|
42
|
-
labelable: !0
|
|
43
|
-
});
|
|
44
|
-
return Y(i, a.defaultSelected, a.setSelected), {
|
|
45
|
-
labelProps: y(N, {
|
|
46
|
-
onClick: (x) => x.preventDefault()
|
|
47
|
-
}),
|
|
48
|
-
inputProps: y(A, {
|
|
49
|
-
"aria-invalid": m || b === "invalid" || void 0,
|
|
50
|
-
"aria-errormessage": e["aria-errormessage"],
|
|
51
|
-
"aria-controls": e["aria-controls"],
|
|
52
|
-
"aria-readonly": n || void 0,
|
|
53
|
-
onChange: q,
|
|
54
|
-
disabled: d,
|
|
55
|
-
...s == null ? {} : {
|
|
56
|
-
value: s
|
|
57
|
-
},
|
|
58
|
-
name: t,
|
|
59
|
-
form: r,
|
|
60
|
-
type: "checkbox",
|
|
61
|
-
...j
|
|
62
|
-
}),
|
|
63
|
-
isSelected: a.isSelected,
|
|
64
|
-
isPressed: M || L,
|
|
65
|
-
isDisabled: d,
|
|
66
|
-
isReadOnly: n,
|
|
67
|
-
isInvalid: m || b === "invalid"
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
function O(e, a, i) {
|
|
71
|
-
let d = D({
|
|
72
|
-
...e,
|
|
73
|
-
value: a.isSelected
|
|
74
|
-
}), { isInvalid: n, validationErrors: s, validationDetails: t } = d.displayValidation, { labelProps: r, inputProps: o, isSelected: v, isPressed: $, isDisabled: b, isReadOnly: m } = oe({
|
|
75
|
-
...e,
|
|
76
|
-
isInvalid: n
|
|
77
|
-
}, a, i);
|
|
78
|
-
Z(e, d, i);
|
|
79
|
-
let { isIndeterminate: h, isRequired: P, validationBehavior: f = "aria" } = e;
|
|
80
|
-
C(() => {
|
|
81
|
-
i.current && (i.current.indeterminate = !!h);
|
|
82
|
-
});
|
|
83
|
-
let { pressProps: u } = g({
|
|
84
|
-
isDisabled: b || m,
|
|
85
|
-
onPress() {
|
|
86
|
-
let { [_]: l } = e, { commitValidation: I } = l || d;
|
|
87
|
-
I();
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
return {
|
|
91
|
-
labelProps: y(r, u, W(() => ({
|
|
92
|
-
// Prevent label from being focused when mouse down on it.
|
|
93
|
-
// Note, this does not prevent the input from being focused in the `click` event.
|
|
94
|
-
onMouseDown: (l) => l.preventDefault()
|
|
95
|
-
}), [])),
|
|
96
|
-
inputProps: {
|
|
97
|
-
...o,
|
|
98
|
-
checked: v,
|
|
99
|
-
"aria-required": P && f === "aria" || void 0,
|
|
100
|
-
required: P && f === "native"
|
|
101
|
-
},
|
|
102
|
-
isSelected: v,
|
|
103
|
-
isPressed: $,
|
|
104
|
-
isDisabled: b,
|
|
105
|
-
isReadOnly: m,
|
|
106
|
-
isInvalid: n,
|
|
107
|
-
validationErrors: s,
|
|
108
|
-
validationDetails: t
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
|
-
const le = /* @__PURE__ */ new WeakMap();
|
|
112
|
-
function se(e, a, i) {
|
|
113
|
-
const d = B({
|
|
114
|
-
isReadOnly: e.isReadOnly || a.isReadOnly,
|
|
115
|
-
isSelected: a.isSelected(e.value),
|
|
116
|
-
defaultSelected: a.defaultValue.includes(e.value),
|
|
117
|
-
onChange(l) {
|
|
118
|
-
l ? a.addValue(e.value) : a.removeValue(e.value), e.onChange && e.onChange(l);
|
|
119
|
-
}
|
|
120
|
-
});
|
|
121
|
-
let { name: n, form: s, descriptionId: t, errorMessageId: r, validationBehavior: o } = le.get(a);
|
|
122
|
-
var v;
|
|
123
|
-
o = (v = e.validationBehavior) !== null && v !== void 0 ? v : o;
|
|
124
|
-
let { realtimeValidation: $ } = D({
|
|
125
|
-
...e,
|
|
126
|
-
value: d.isSelected,
|
|
127
|
-
// Server validation is handled at the group level.
|
|
128
|
-
name: void 0,
|
|
129
|
-
validationBehavior: "aria"
|
|
130
|
-
}), b = z(ee), m = () => {
|
|
131
|
-
a.setInvalid(e.value, $.isInvalid ? $ : b.current);
|
|
132
|
-
};
|
|
133
|
-
C(m);
|
|
134
|
-
let h = a.realtimeValidation.isInvalid ? a.realtimeValidation : $, P = o === "native" ? a.displayValidation : h;
|
|
135
|
-
var f;
|
|
136
|
-
let u = O({
|
|
137
|
-
...e,
|
|
138
|
-
isReadOnly: e.isReadOnly || a.isReadOnly,
|
|
139
|
-
isDisabled: e.isDisabled || a.isDisabled,
|
|
140
|
-
name: e.name || n,
|
|
141
|
-
form: e.form || s,
|
|
142
|
-
isRequired: (f = e.isRequired) !== null && f !== void 0 ? f : a.isRequired,
|
|
143
|
-
validationBehavior: o,
|
|
144
|
-
[_]: {
|
|
145
|
-
realtimeValidation: h,
|
|
146
|
-
displayValidation: P,
|
|
147
|
-
resetValidation: a.resetValidation,
|
|
148
|
-
commitValidation: a.commitValidation,
|
|
149
|
-
updateValidation(l) {
|
|
150
|
-
b.current = l, m();
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
}, d, i);
|
|
154
|
-
return {
|
|
155
|
-
...u,
|
|
156
|
-
inputProps: {
|
|
157
|
-
...u.inputProps,
|
|
158
|
-
"aria-describedby": [
|
|
159
|
-
e["aria-describedby"],
|
|
160
|
-
a.isInvalid ? r : null,
|
|
161
|
-
t
|
|
162
|
-
].filter(Boolean).join(" ") || void 0
|
|
163
|
-
}
|
|
164
|
-
};
|
|
165
|
-
}
|
|
166
|
-
const te = H.createContext(null), re = "_checkboxInner_164xy_1", ce = "_checkbox_164xy_1", fe = "_checkboxGroup_164xy_142", V = {
|
|
167
|
-
checkboxInner: re,
|
|
168
|
-
checkbox: ce,
|
|
169
|
-
checkboxGroup: fe
|
|
170
|
-
}, p = R.forwardRef((e, a) => {
|
|
171
|
-
const { hoverProps: i, isHovered: d } = e.hoverResult, { pressProps: n, isPressed: s } = e.pressResult, { isFocused: t, isFocusVisible: r, focusProps: o } = e.focusRingAria;
|
|
172
|
-
return /* @__PURE__ */ F(
|
|
173
|
-
"label",
|
|
174
|
-
{
|
|
175
|
-
ref: a,
|
|
176
|
-
...y(i, n, e.labelProps),
|
|
177
|
-
slot: e.slot || void 0,
|
|
178
|
-
className: S(V.checkbox, e.className),
|
|
179
|
-
"data-hovered": d || void 0,
|
|
180
|
-
"data-selected": e.isSelected || void 0,
|
|
181
|
-
"data-indeterminate": e.isIndeterminate || void 0,
|
|
182
|
-
"data-pressed": s || void 0,
|
|
183
|
-
"data-disabled": e.isDisabled || void 0,
|
|
184
|
-
"data-readonly": e.isReadOnly || void 0,
|
|
185
|
-
"data-invalid": e.isInvalid || void 0,
|
|
186
|
-
"data-focused": t || void 0,
|
|
187
|
-
"data-focus-visible": r || void 0,
|
|
188
|
-
"data-required": e.isRequired || void 0,
|
|
189
|
-
children: [
|
|
190
|
-
/* @__PURE__ */ c("div", { className: S(V.checkboxInner), children: /* @__PURE__ */ c(
|
|
191
|
-
"svg",
|
|
192
|
-
{
|
|
193
|
-
width: 16,
|
|
194
|
-
height: 16,
|
|
195
|
-
viewBox: "0 0 18 18",
|
|
196
|
-
"aria-hidden": "true",
|
|
197
|
-
children: e.isIndeterminate ? /* @__PURE__ */ c(
|
|
198
|
-
"rect",
|
|
199
|
-
{
|
|
200
|
-
x: 4,
|
|
201
|
-
y: 8,
|
|
202
|
-
width: 10,
|
|
203
|
-
height: 2
|
|
204
|
-
}
|
|
205
|
-
) : /* @__PURE__ */ c("polyline", { points: "3,9 7,13 15,4" })
|
|
206
|
-
}
|
|
207
|
-
) }),
|
|
208
|
-
/* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(
|
|
209
|
-
"input",
|
|
210
|
-
{
|
|
211
|
-
...y(e.inputProps, o),
|
|
212
|
-
ref: e.inputRef
|
|
213
|
-
}
|
|
214
|
-
) }),
|
|
215
|
-
e.children
|
|
216
|
-
]
|
|
217
|
-
}
|
|
218
|
-
);
|
|
219
|
-
}), ue = R.forwardRef((e, a) => {
|
|
220
|
-
const i = se(
|
|
221
|
-
{
|
|
222
|
-
...e,
|
|
223
|
-
value: e.value || ""
|
|
224
|
-
},
|
|
225
|
-
e.state,
|
|
226
|
-
e.inputRef
|
|
227
|
-
);
|
|
228
|
-
return /* @__PURE__ */ c(
|
|
229
|
-
p,
|
|
230
|
-
{
|
|
231
|
-
...e,
|
|
232
|
-
...i,
|
|
233
|
-
ref: a
|
|
234
|
-
}
|
|
235
|
-
);
|
|
236
|
-
}), ve = R.forwardRef((e, a) => {
|
|
237
|
-
const i = O(e, B(e), e.inputRef);
|
|
238
|
-
return /* @__PURE__ */ c(
|
|
239
|
-
p,
|
|
240
|
-
{
|
|
241
|
-
...e,
|
|
242
|
-
...i,
|
|
243
|
-
ref: a
|
|
244
|
-
}
|
|
245
|
-
);
|
|
246
|
-
}), _e = R.forwardRef(
|
|
247
|
-
(e, a) => {
|
|
248
|
-
[e, a] = K(e, a, J);
|
|
249
|
-
const i = Q(T), d = e.validationBehavior ?? (i == null ? void 0 : i.validationBehavior) ?? "native", n = R.useContext(te), s = R.useRef(null), t = de(e), r = g({
|
|
250
|
-
ref: a,
|
|
251
|
-
isDisabled: e.isDisabled
|
|
252
|
-
}), o = ne();
|
|
253
|
-
return n ? /* @__PURE__ */ c(
|
|
254
|
-
ue,
|
|
255
|
-
{
|
|
256
|
-
...e,
|
|
257
|
-
state: n,
|
|
258
|
-
inputRef: s,
|
|
259
|
-
hoverResult: t,
|
|
260
|
-
pressResult: r,
|
|
261
|
-
focusRingAria: o,
|
|
262
|
-
validationBehavior: d
|
|
263
|
-
}
|
|
264
|
-
) : /* @__PURE__ */ c(
|
|
265
|
-
ve,
|
|
266
|
-
{
|
|
267
|
-
...e,
|
|
268
|
-
inputRef: s,
|
|
269
|
-
hoverResult: t,
|
|
270
|
-
pressResult: r,
|
|
271
|
-
focusRingAria: o,
|
|
272
|
-
validationBehavior: d
|
|
273
|
-
}
|
|
274
|
-
);
|
|
275
|
-
}
|
|
276
|
-
);
|
|
277
|
-
export {
|
|
278
|
-
le as $,
|
|
279
|
-
_e as C,
|
|
280
|
-
te as a,
|
|
281
|
-
V as s
|
|
282
|
-
};
|