@midas-ds/components 12.1.0 → 13.0.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/AccordionItem-Bq8nUKg4.cjs +1 -0
- package/{AccordionItem-C9dBt-tQ.js → AccordionItem-D2Y0gJZB.js} +109 -109
- package/{Breadcrumbs-DUcHHI_2.cjs → Breadcrumbs-BQLxFZVm.cjs} +1 -1
- package/{Breadcrumbs-BAHJMPsu.js → Breadcrumbs-C6B4fyk3.js} +1 -1
- package/{Button-DYcmg49Z.js → Button-CUMHt7MG.js} +1 -1
- package/{Button-DrL5Jv-s.cjs → Button-D_tRdPW9.cjs} +1 -1
- package/Button.module-BT9wZenr.cjs +1 -0
- package/Button.module-CGIVvzVm.js +14 -0
- package/{ButtonGroup-WZZDPu9Z.js → ButtonGroup-DC8925jD.js} +1 -1
- package/{ButtonGroup-ClYTgaRc.cjs → ButtonGroup-zx-9mxbJ.cjs} +1 -1
- package/CHANGELOG.md +59 -0
- package/Card-D2UbrhDW.js +131 -0
- package/Card-UolcSL5O.cjs +1 -0
- package/{Checkbox-BtM2rFh9.js → Checkbox-DTuryJdM.js} +14 -14
- package/{Checkbox-CvdIG43J.cjs → Checkbox-dtZfsSfx.cjs} +1 -1
- package/{CheckboxGroup-CjcDYBRk.js → CheckboxGroup-BmCK0XG9.js} +2 -2
- package/{CheckboxGroup-C94as9Xt.cjs → CheckboxGroup-DbmYdQEv.cjs} +1 -1
- package/{ColorSchemeSwitch-C4PMYeD5.js → ColorSchemeSwitch-CgZfgCG4.js} +1 -1
- package/{ColorSchemeSwitch-CKcoGZM1.cjs → ColorSchemeSwitch-D5juAHPc.cjs} +1 -1
- package/{ComboBox-BWXJZyOR.js → ComboBox-Cl6jBB-8.js} +85 -85
- package/{ComboBox-B2EmfOyr.cjs → ComboBox-CvD0t2T2.cjs} +1 -1
- package/{DateField-CcQJYDLD.js → DateField-D2IqGDL5.js} +2 -2
- package/{DateField-IpCiF81R.cjs → DateField-DJAQH95Q.cjs} +1 -1
- package/{DateInputDivider-Cf5GZHlM.cjs → DateInputDivider-BnSo_Aox.cjs} +1 -1
- package/{DateInputDivider-CXkUdlzc.js → DateInputDivider-LxS0Kw1H.js} +2 -2
- package/{DateRangePicker-B2BJO1KC.js → DateRangePicker-CNPXbRqx.js} +4 -4
- package/{DateRangePicker-Dfwe9RhJ.cjs → DateRangePicker-CljQy8oD.cjs} +2 -2
- package/{Dialog-P3frHOdq.js → Dialog-COpVrq8B.js} +21 -21
- package/{Dialog-DgJobm71.cjs → Dialog-doGnVsJJ.cjs} +1 -1
- package/{Dropdown-DJ2vWAqk.cjs → Dropdown-C_W6Sizy.cjs} +1 -1
- package/{Dropdown-CIvWpN3v.js → Dropdown-DbeUiGYo.js} +1 -1
- package/{Grid-s8ovKDi8.js → Grid-BmX6arAO.js} +1 -1
- package/{Grid-WbEkSCGh.cjs → Grid-Bn1bCTH8.cjs} +1 -1
- package/GridItem-BtO9kCX9.js +237 -0
- package/GridItem-luVsL9lu.cjs +1 -0
- package/InfoBanner-C82hcpzj.cjs +1 -0
- package/InfoBanner-Dz_0wVSa.js +83 -0
- package/{Label-BG7G0iyG.js → Label-C5TNJ0Ku.js} +1 -1
- package/{Label-C00qz3kQ.cjs → Label-Dp85Vue3.cjs} +1 -1
- package/{Layout-CG-Qxr_1.js → Layout-B-A-s7B0.js} +156 -156
- package/Layout-DlE30BHE.cjs +16 -0
- package/Link-ePZ3nrAW.cjs +6 -0
- package/{Link-BtxKZ0h3.js → Link-lO-Ke97K.js} +20 -20
- package/{LinkButton-D3EnZ65v.js → LinkButton-CJyZh3BS.js} +26 -26
- package/LinkButton-Cw73pOM2.cjs +6 -0
- package/{ListBoxLoadMoreItem-Ceo73a2q.cjs → ListBoxLoadMoreItem-3jGpi90m.cjs} +1 -1
- package/{ListBoxLoadMoreItem-W11V-Lef.js → ListBoxLoadMoreItem-CIFJ3liN.js} +2 -2
- package/{ListBoxSection-BCPv9H50.js → ListBoxSection-BBY8-t3_.js} +11 -11
- package/{ListBoxSection-Dx75ZinL.cjs → ListBoxSection-BeDwnVZx.cjs} +1 -1
- package/{ProgressBar-CdXHEJh6.js → ProgressBar-BYb9d2kC.js} +1 -1
- package/{ProgressBar-CjuHokVZ.cjs → ProgressBar-CgbE08QT.cjs} +1 -1
- package/{Radio-Bll-7H8O.cjs → Radio-BagVPvJX.cjs} +1 -1
- package/{Radio-DoWx2AE1.js → Radio-C98ly9yx.js} +14 -14
- package/{RangeCalendar-D7eFVAPP.js → RangeCalendar-Bi9jc61A.js} +61 -61
- package/{RangeCalendar-A4WQIG7P.cjs → RangeCalendar-KcJooXYf.cjs} +2 -2
- package/{SearchField-BbrUZpQm.cjs → SearchField-BA-X9dzb.cjs} +2 -2
- package/{SearchField-F2FKgYds.js → SearchField-BevjTbcW.js} +46 -46
- package/{Select-Dpi3LhbI.js → Select-BECa8IyZ.js} +112 -112
- package/Select-xBp51JSl.cjs +1 -0
- package/Skeleton-Iovq135_.js +35 -0
- package/Skeleton-MaBUPqhT.cjs +1 -0
- package/{Spinner-DTKb_LAA.js → Spinner-BZ7i01Kt.js} +13 -13
- package/Spinner-DxWDMW6e.cjs +6 -0
- package/TabList-3fErCDyP.cjs +1 -0
- package/{TabList-D9tl2s85.js → TabList-CXaxruLg.js} +54 -54
- package/{Table-CkN3y69S.js → Table-BzJktg2G.js} +2 -2
- package/{Table-C6k3PiiC.cjs → Table-Dyqa6_rE.cjs} +2 -2
- package/{Tag-BUJ20HHw.js → Tag-BYUPXbhG.js} +1 -1
- package/{Tag-7dHEMQum.cjs → Tag-BweDKw1v.cjs} +1 -1
- package/{TextArea-BCikUXaD.cjs → TextArea-BTmzOUZd.cjs} +1 -1
- package/{TextArea-h5_oBQH1.js → TextArea-CSNrZCEO.js} +22 -23
- package/TextField.module-CH39P8ZE.js +13 -0
- package/TextField.module-gJ-ruFra.cjs +1 -0
- package/{Toast-BBkWczCk.js → Toast-B74PMVL9.js} +170 -172
- package/{Toast-DclaxvZM.cjs → Toast-Cs0CEbRr.cjs} +1 -1
- package/{ToggleButtonGroup-BGG64PK1.js → ToggleButtonGroup-CwHPu7w5.js} +1 -1
- package/{ToggleButtonGroup-Da330GRT.cjs → ToggleButtonGroup-DY9S3USc.cjs} +1 -1
- package/accordion/index.cjs +1 -1
- package/accordion/index.js +1 -1
- package/assets/AccordionItem.css +1 -1
- package/assets/Button.css +1 -1
- package/assets/ButtonGroup.css +1 -1
- package/assets/Card.css +1 -1
- package/assets/Checkbox.css +1 -1
- package/assets/ComboBox.css +1 -1
- package/assets/DateInputDivider.css +1 -1
- package/assets/DateRangePicker.css +1 -1
- package/assets/Dialog.css +1 -1
- package/assets/GridItem.css +1 -1
- package/assets/InfoBanner.css +1 -1
- package/assets/Layout.css +1 -1
- package/assets/Link.css +1 -1
- package/assets/LinkButton.css +1 -1
- package/assets/ListBoxSection.css +1 -1
- package/assets/Radio.css +1 -1
- package/assets/RangeCalendar.css +1 -1
- package/assets/SearchField.css +1 -1
- package/assets/Select.css +1 -1
- package/assets/Skeleton.css +1 -1
- package/assets/Spinner.css +1 -1
- package/assets/TabList.css +1 -1
- package/assets/Table.css +1 -1
- package/assets/TextField.css +1 -1
- package/assets/Toast.css +1 -1
- package/assets/default.css +1 -0
- package/breadcrumbs/index.cjs +1 -1
- package/breadcrumbs/index.js +1 -1
- package/button/index.cjs +1 -1
- package/button/index.js +2 -2
- package/calendar/index.cjs +1 -1
- package/calendar/index.js +1 -1
- package/card/index.cjs +1 -1
- package/card/index.js +1 -1
- package/checkbox/index.cjs +1 -1
- package/checkbox/index.js +2 -2
- package/color-scheme-switch/index.cjs +1 -1
- package/color-scheme-switch/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 +2 -2
- package/date-picker/index.cjs +1 -1
- package/date-picker/index.js +1 -1
- package/dropdown/index.cjs +1 -1
- package/dropdown/index.js +1 -1
- package/grid/index.cjs +1 -1
- package/grid/index.js +2 -2
- package/index.cjs +1 -1
- package/index.js +143 -144
- package/info-banner/index.cjs +1 -1
- package/info-banner/index.js +1 -1
- 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/link/index.cjs +1 -1
- package/link/index.js +1 -1
- package/link-button/index.cjs +1 -1
- package/link-button/index.js +1 -1
- package/list-box/index.cjs +1 -1
- package/list-box/index.js +2 -2
- package/modal/index.cjs +1 -1
- package/modal/index.js +1 -1
- package/package.json +4 -14
- 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/skeleton/index.cjs +1 -1
- package/skeleton/index.js +1 -1
- package/spinner/index.cjs +1 -1
- package/spinner/index.js +1 -1
- package/table/index.cjs +1 -1
- package/table/index.js +1 -1
- package/tabs/index.cjs +1 -1
- package/tabs/index.js +1 -1
- package/tag/index.cjs +1 -1
- package/tag/index.js +1 -1
- package/textfield/TextArea.d.ts +2 -7
- package/textfield/TextField.d.ts +2 -6
- package/textfield/index.cjs +1 -1
- package/textfield/index.js +1 -1
- package/toast/index.cjs +1 -1
- package/toast/index.js +1 -1
- package/toggle-button/index.cjs +1 -1
- package/toggle-button/index.js +1 -1
- package/variables-B3KEYyhW.cjs +1 -0
- package/variables-DzXcMW2k.js +5 -0
- package/AccordionItem-SOfjXh3V.cjs +0 -1
- package/Button.module-BNLcvARn.cjs +0 -1
- package/Button.module-Bax2YU6N.js +0 -14
- package/Card-BDDyGAMA.js +0 -131
- package/Card-mj5lCIR4.cjs +0 -1
- package/GridItem-CIVF1fRW.cjs +0 -1
- package/GridItem-D3FZyyO-.js +0 -243
- package/InfoBanner-CqjnTYaa.cjs +0 -1
- package/InfoBanner-CrA8MS3v.js +0 -83
- package/Layout-Bta_Cpq_.cjs +0 -16
- package/Link-Bx6avHVl.cjs +0 -6
- package/LinkButton-BvXu6vAH.cjs +0 -6
- package/Select-BnbDXwgD.cjs +0 -1
- package/Skeleton-BpYj25p8.js +0 -37
- package/Skeleton-DMOxEwnd.cjs +0 -1
- package/Spinner-D1UBuLy4.cjs +0 -6
- package/TabList-D4WwgQY3.cjs +0 -1
- package/TextField.module-C9Zm9unF.js +0 -13
- package/TextField.module-GTQtNO0r.cjs +0 -1
- package/assets/global.css +0 -1
- package/assets/theme.css +0 -1
- package/assets/variables.css +0 -1
- package/theme/generated-object.d.ts +0 -384
- package/theme/generated-tokens.d.ts +0 -334
- package/theme/index.cjs +0 -1
- package/theme/index.d.ts +0 -267
- package/theme/index.js +0 -4039
- package/theme/tokens.d.ts +0 -290
- package/tokens-B3FfJ-rY.cjs +0 -1
- package/tokens-B9ooUP4g.js +0 -327
package/Card-D2UbrhDW.js
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
import { c as n } from "./clsx-OuTLNxxd.js";
|
|
3
|
+
import * as e from "react";
|
|
4
|
+
import { H as m } from "./Heading-BQlmb5Tm.js";
|
|
5
|
+
import { $ as _ } from "./Button-DD5_S-tD.js";
|
|
6
|
+
import { $ as C } from "./Link-CbFSuEI1.js";
|
|
7
|
+
import { A } from "./arrow-right-uemUGIg8.js";
|
|
8
|
+
import './assets/Card.css';const h = "_card_18rs3_1", I = "_horizontal_18rs3_7", p = "_cardLink_18rs3_12", u = "_cardContent_18rs3_17", x = "_cardActions_18rs3_36", f = "_cardActionArea_18rs3_46", z = "_cardImage_18rs3_79", k = "_cardLinkIcon_18rs3_111", o = {
|
|
9
|
+
card: h,
|
|
10
|
+
horizontal: I,
|
|
11
|
+
cardLink: p,
|
|
12
|
+
cardContent: u,
|
|
13
|
+
cardActions: x,
|
|
14
|
+
cardActionArea: f,
|
|
15
|
+
cardImage: z,
|
|
16
|
+
cardLinkIcon: k
|
|
17
|
+
}, d = e.createContext({
|
|
18
|
+
horizontal: void 0,
|
|
19
|
+
titleId: void 0
|
|
20
|
+
}), y = ({
|
|
21
|
+
horizontal: r,
|
|
22
|
+
className: t,
|
|
23
|
+
children: a,
|
|
24
|
+
...s
|
|
25
|
+
}) => {
|
|
26
|
+
const i = `card-title-${e.useId()}`;
|
|
27
|
+
return /* @__PURE__ */ c(d.Provider, { value: { horizontal: r, titleId: i }, children: /* @__PURE__ */ c(
|
|
28
|
+
"div",
|
|
29
|
+
{
|
|
30
|
+
...s,
|
|
31
|
+
className: n(
|
|
32
|
+
o.card,
|
|
33
|
+
r && o.horizontal,
|
|
34
|
+
t
|
|
35
|
+
),
|
|
36
|
+
children: a
|
|
37
|
+
}
|
|
38
|
+
) });
|
|
39
|
+
}, H = ({
|
|
40
|
+
children: r,
|
|
41
|
+
...t
|
|
42
|
+
}) => {
|
|
43
|
+
const { horizontal: a } = e.useContext(d);
|
|
44
|
+
return /* @__PURE__ */ c(
|
|
45
|
+
"div",
|
|
46
|
+
{
|
|
47
|
+
...t,
|
|
48
|
+
className: n(o.cardContent, a && o.horizontal),
|
|
49
|
+
children: r
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
}, R = ({
|
|
53
|
+
elementType: r = "h2",
|
|
54
|
+
children: t
|
|
55
|
+
}) => {
|
|
56
|
+
const { horizontal: a, titleId: s } = e.useContext(d);
|
|
57
|
+
return /* @__PURE__ */ c(
|
|
58
|
+
m,
|
|
59
|
+
{
|
|
60
|
+
level: a ? 5 : 3,
|
|
61
|
+
elementType: r,
|
|
62
|
+
isExpressive: a,
|
|
63
|
+
className: n(o.cardTitle, a && o.horizontal),
|
|
64
|
+
id: s,
|
|
65
|
+
children: t
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
}, T = ({
|
|
69
|
+
children: r,
|
|
70
|
+
...t
|
|
71
|
+
}) => {
|
|
72
|
+
const { horizontal: a } = e.useContext(d);
|
|
73
|
+
return /* @__PURE__ */ c(
|
|
74
|
+
"div",
|
|
75
|
+
{
|
|
76
|
+
...t,
|
|
77
|
+
className: n(o.cardActions, a && o.horizontal),
|
|
78
|
+
children: r
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
}, w = ({ children: r, className: t, ...a }) => {
|
|
82
|
+
const { titleId: s } = e.useContext(d);
|
|
83
|
+
return /* @__PURE__ */ c(
|
|
84
|
+
_,
|
|
85
|
+
{
|
|
86
|
+
...a,
|
|
87
|
+
"aria-labelledby": s,
|
|
88
|
+
className: n(o.cardActionArea, t),
|
|
89
|
+
children: r
|
|
90
|
+
}
|
|
91
|
+
);
|
|
92
|
+
}, E = ({
|
|
93
|
+
as: r = "img",
|
|
94
|
+
className: t,
|
|
95
|
+
...a
|
|
96
|
+
}) => /* @__PURE__ */ c(
|
|
97
|
+
r,
|
|
98
|
+
{
|
|
99
|
+
...a,
|
|
100
|
+
className: n(o.cardImage, t)
|
|
101
|
+
}
|
|
102
|
+
), P = ({
|
|
103
|
+
children: r,
|
|
104
|
+
as: t,
|
|
105
|
+
...a
|
|
106
|
+
}) => /* @__PURE__ */ l(
|
|
107
|
+
t || C,
|
|
108
|
+
{
|
|
109
|
+
...a,
|
|
110
|
+
className: n(o.cardLink, a.className),
|
|
111
|
+
children: [
|
|
112
|
+
r,
|
|
113
|
+
/* @__PURE__ */ c(
|
|
114
|
+
A,
|
|
115
|
+
{
|
|
116
|
+
className: o.cardLinkIcon,
|
|
117
|
+
size: 24
|
|
118
|
+
}
|
|
119
|
+
)
|
|
120
|
+
]
|
|
121
|
+
}
|
|
122
|
+
);
|
|
123
|
+
export {
|
|
124
|
+
y as C,
|
|
125
|
+
H as a,
|
|
126
|
+
R as b,
|
|
127
|
+
T as c,
|
|
128
|
+
w as d,
|
|
129
|
+
E as e,
|
|
130
|
+
P as f
|
|
131
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";require('./assets/Card.css');const a=require("react/jsx-runtime"),o=require("./clsx-C11secjj.cjs"),l=require("react"),u=require("./Heading-D3FR_KXb.cjs"),C=require("./Button-CMIbSc4-.cjs"),x=require("./Link-wM7cVPlS.cjs"),_=require("./arrow-right-BGd86zzR.cjs");function m(r){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>r[t]})}}return e.default=r,Object.freeze(e)}const s=m(l),A="_card_18rs3_1",g="_horizontal_18rs3_7",h="_cardLink_18rs3_12",I="_cardContent_18rs3_17",j="_cardActions_18rs3_36",b="_cardActionArea_18rs3_46",f="_cardImage_18rs3_79",k="_cardLinkIcon_18rs3_111",c={card:A,horizontal:g,cardLink:h,cardContent:I,cardActions:j,cardActionArea:b,cardImage:f,cardLinkIcon:k},i=s.createContext({horizontal:void 0,titleId:void 0}),z=({horizontal:r,className:e,children:t,...n})=>{const d=`card-title-${s.useId()}`;return a.jsx(i.Provider,{value:{horizontal:r,titleId:d},children:a.jsx("div",{...n,className:o.clsx(c.card,r&&c.horizontal,e),children:t})})},L=({children:r,...e})=>{const{horizontal:t}=s.useContext(i);return a.jsx("div",{...e,className:o.clsx(c.cardContent,t&&c.horizontal),children:r})},p=({elementType:r="h2",children:e})=>{const{horizontal:t,titleId:n}=s.useContext(i);return a.jsx(u.Heading,{level:t?5:3,elementType:r,isExpressive:t,className:o.clsx(c.cardTitle,t&&c.horizontal),id:n,children:e})},v=({children:r,...e})=>{const{horizontal:t}=s.useContext(i);return a.jsx("div",{...e,className:o.clsx(c.cardActions,t&&c.horizontal),children:r})},N=({children:r,className:e,...t})=>{const{titleId:n}=s.useContext(i);return a.jsx(C.$d2b4bc8c273e7be6$export$353f5b6fc5456de1,{...t,"aria-labelledby":n,className:o.clsx(c.cardActionArea,e),children:r})},q=({as:r="img",className:e,...t})=>a.jsx(r,{...t,className:o.clsx(c.cardImage,e)}),$=({children:r,as:e,...t})=>{const n=e||x.$4f118338184dc1d9$export$a6c7ac8248d6e38a;return a.jsxs(n,{...t,className:o.clsx(c.cardLink,t.className),children:[r,a.jsx(_.ArrowRight,{className:c.cardLinkIcon,size:24})]})};exports.Card=z;exports.CardActionArea=N;exports.CardActions=v;exports.CardContent=L;exports.CardImage=q;exports.CardLink=$;exports.CardTitle=p;
|
|
@@ -8,41 +8,41 @@ import { c as V } from "./clsx-OuTLNxxd.js";
|
|
|
8
8
|
import { a as y } from "./mergeProps-BSsN7Bgk.js";
|
|
9
9
|
import { $ as T } from "./VisuallyHidden-CGEtjAP7.js";
|
|
10
10
|
import { a as X, $ as D, b as Y, d as _, e as Z } from "./useFormValidation-L0UHvOsP.js";
|
|
11
|
-
import { b as
|
|
11
|
+
import { b as g } from "./usePress-DMUpU0GU.js";
|
|
12
12
|
import { $ as ee } from "./filterDOMProps-wsa9OcNI.js";
|
|
13
13
|
import { a as ae } from "./useFocusable-DXlMChFC.js";
|
|
14
14
|
import { $ as B } from "./useToggleState-BVOqL4hI.js";
|
|
15
15
|
import { $ as ie } from "./useHover-D6bNIkU0.js";
|
|
16
16
|
import { $ as de } from "./useFocusRing-DMo8ctYV.js";
|
|
17
17
|
import './assets/Checkbox.css';function ne(e, a, i) {
|
|
18
|
-
let { isDisabled: d = !1, isReadOnly: n = !1, value: o, name: s, form: t, children: l, "aria-label": v, "aria-labelledby": $, validationState: b = "valid", isInvalid: m, onPressStart: h, onPressEnd: P, onPressChange: f, onPress: u, onPressUp: r, onClick:
|
|
18
|
+
let { isDisabled: d = !1, isReadOnly: n = !1, value: o, name: s, form: t, children: l, "aria-label": v, "aria-labelledby": $, validationState: b = "valid", isInvalid: m, onPressStart: h, onPressEnd: P, onPressChange: f, onPress: u, onPressUp: r, onClick: I } = e, E = (x) => {
|
|
19
19
|
x.stopPropagation(), a.setSelected(x.target.checked);
|
|
20
20
|
}, p = l != null, w = v != null || $ != null;
|
|
21
21
|
!p && !w && process.env.NODE_ENV !== "production" && console.warn("If you do not provide children, you must specify an aria-label for accessibility");
|
|
22
|
-
let { pressProps:
|
|
22
|
+
let { pressProps: j, isPressed: G } = g({
|
|
23
23
|
onPressStart: h,
|
|
24
24
|
onPressEnd: P,
|
|
25
25
|
onPressChange: f,
|
|
26
26
|
onPress: u,
|
|
27
27
|
onPressUp: r,
|
|
28
|
-
onClick:
|
|
28
|
+
onClick: I,
|
|
29
29
|
isDisabled: d
|
|
30
|
-
}), { pressProps:
|
|
30
|
+
}), { pressProps: N, isPressed: L } = g({
|
|
31
31
|
onPressStart: h,
|
|
32
32
|
onPressEnd: P,
|
|
33
33
|
onPressChange: f,
|
|
34
34
|
onPressUp: r,
|
|
35
|
-
onClick:
|
|
35
|
+
onClick: I,
|
|
36
36
|
onPress(x) {
|
|
37
37
|
var k;
|
|
38
38
|
u == null || u(x), a.toggle(), (k = i.current) === null || k === void 0 || k.focus();
|
|
39
39
|
},
|
|
40
40
|
isDisabled: d || n
|
|
41
|
-
}), { focusableProps:
|
|
41
|
+
}), { focusableProps: U } = ae(e, i), A = y(j, U), M = ee(e, {
|
|
42
42
|
labelable: !0
|
|
43
43
|
});
|
|
44
44
|
return X(i, a.defaultSelected, a.setSelected), {
|
|
45
|
-
labelProps: y(
|
|
45
|
+
labelProps: y(N, {
|
|
46
46
|
onClick: (x) => x.preventDefault()
|
|
47
47
|
}),
|
|
48
48
|
inputProps: y(M, {
|
|
@@ -61,7 +61,7 @@ import './assets/Checkbox.css';function ne(e, a, i) {
|
|
|
61
61
|
...A
|
|
62
62
|
}),
|
|
63
63
|
isSelected: a.isSelected,
|
|
64
|
-
isPressed:
|
|
64
|
+
isPressed: G || L,
|
|
65
65
|
isDisabled: d,
|
|
66
66
|
isReadOnly: n,
|
|
67
67
|
isInvalid: m || b === "invalid"
|
|
@@ -80,11 +80,11 @@ function O(e, a, i) {
|
|
|
80
80
|
S(() => {
|
|
81
81
|
i.current && (i.current.indeterminate = !!h);
|
|
82
82
|
});
|
|
83
|
-
let { pressProps: u } =
|
|
83
|
+
let { pressProps: u } = g({
|
|
84
84
|
isDisabled: b || m,
|
|
85
85
|
onPress() {
|
|
86
|
-
let { [_]: r } = e, { commitValidation:
|
|
87
|
-
|
|
86
|
+
let { [_]: r } = e, { commitValidation: I } = r || d;
|
|
87
|
+
I();
|
|
88
88
|
}
|
|
89
89
|
});
|
|
90
90
|
return {
|
|
@@ -159,7 +159,7 @@ function oe(e, a, i) {
|
|
|
159
159
|
}
|
|
160
160
|
};
|
|
161
161
|
}
|
|
162
|
-
const se = H.createContext(null), te = "
|
|
162
|
+
const se = H.createContext(null), te = "_checkboxInner_1jfol_1", re = "_checkbox_1jfol_1", ce = "_checkboxGroup_1jfol_121", C = {
|
|
163
163
|
checkboxInner: te,
|
|
164
164
|
checkbox: re,
|
|
165
165
|
checkboxGroup: ce
|
|
@@ -242,7 +242,7 @@ const se = H.createContext(null), te = "_checkboxInner_1a9gx_4", re = "_checkbox
|
|
|
242
242
|
}), De = R.forwardRef(
|
|
243
243
|
(e, a) => {
|
|
244
244
|
[e, a] = J(e, a, z);
|
|
245
|
-
const i = K(Q), d = e.validationBehavior ?? (i == null ? void 0 : i.validationBehavior) ?? "native", n = R.useContext(se), o = R.useRef(null), s = ie(e), t =
|
|
245
|
+
const i = K(Q), d = e.validationBehavior ?? (i == null ? void 0 : i.validationBehavior) ?? "native", n = R.useContext(se), o = R.useRef(null), s = ie(e), t = g({
|
|
246
246
|
ref: a,
|
|
247
247
|
isDisabled: e.isDisabled
|
|
248
248
|
}), l = de();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require('./assets/Checkbox.css');const
|
|
1
|
+
"use strict";require('./assets/Checkbox.css');const o=require("react/jsx-runtime"),k=require("react"),T=require("./RSPContexts-D8hmBfGm.cjs"),q=require("./utils-CMHKYKlz.cjs"),z=require("./Form-BuOomA4T.cjs"),D=require("./clsx-C11secjj.cjs"),g=require("./mergeProps-JhcJ7uJL.cjs"),W=require("./VisuallyHidden-EjrqodVh.cjs"),m=require("./useFormValidation-BQIRxgbU.cjs"),C=require("./usePress-CicXV7UO.cjs"),J=require("./filterDOMProps-RRlKPKX0.cjs"),K=require("./useFocusable-CsG-IPuC.cjs"),j=require("./useToggleState-SqDyNfRi.cjs"),Q=require("./useHover-DGAmG7jt.cjs"),X=require("./useFocusRing-BcbYske2.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 y=Y(k);function Z(e,i,a){let{isDisabled:d=!1,isReadOnly:n=!1,value:s,name:r,form:l,children:t,"aria-label":b,"aria-labelledby":x,validationState:v="valid",isInvalid:$,onPressStart:h,onPressEnd:P,onPressChange:f,onPress:u,onPressUp:c,onClick:I}=e,E=R=>{R.stopPropagation(),i.setSelected(R.target.checked)},w=t!=null,G=b!=null||x!=null;!w&&!G&&process.env.NODE_ENV!=="production"&&console.warn("If you do not provide children, you must specify an aria-label for accessibility");let{pressProps:F,isPressed:N}=C.$f6c31cce2adf654f$export$45712eceda6fad21({onPressStart:h,onPressEnd:P,onPressChange:f,onPress:u,onPressUp:c,onClick:I,isDisabled:d}),{pressProps:M,isPressed:L}=C.$f6c31cce2adf654f$export$45712eceda6fad21({onPressStart:h,onPressEnd:P,onPressChange:f,onPressUp:c,onClick:I,onPress(R){var S;u==null||u(R),i.toggle(),(S=a.current)===null||S===void 0||S.focus()},isDisabled:d||n}),{focusableProps:U}=K.$f645667febf57a63$export$4c014de7c8940b4c(e,a),A=g.$3ef42575df84b30b$export$9d1611c77c2fe928(F,U),H=J.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(e,{labelable:!0});return m.$99facab73266f662$export$5add1d006293d136(a,i.defaultSelected,i.setSelected),{labelProps:g.$3ef42575df84b30b$export$9d1611c77c2fe928(M,{onClick:R=>R.preventDefault()}),inputProps:g.$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:E,disabled:d,...s==null?{}:{value:s},name:r,form:l,type:"checkbox",...A}),isSelected:i.isSelected,isPressed:N||L,isDisabled:d,isReadOnly:n,isInvalid:$||v==="invalid"}}function O(e,i,a){let d=m.$e5be200c675c3b3a$export$fc1a364ae1f3ff10({...e,value:i.isSelected}),{isInvalid:n,validationErrors:s,validationDetails:r}=d.displayValidation,{labelProps:l,inputProps:t,isSelected:b,isPressed:x,isDisabled:v,isReadOnly:$}=Z({...e,isInvalid:n},i,a);m.$e93e671b31057976$export$b8473d3665f3a75a(e,d,a);let{isIndeterminate:h,isRequired:P,validationBehavior:f="aria"}=e;k.useEffect(()=>{a.current&&(a.current.indeterminate=!!h)});let{pressProps:u}=C.$f6c31cce2adf654f$export$45712eceda6fad21({isDisabled:v||$,onPress(){let{[m.$e5be200c675c3b3a$export$a763b9476acd3eb]:c}=e,{commitValidation:I}=c||d;I()}});return{labelProps:g.$3ef42575df84b30b$export$9d1611c77c2fe928(l,u),inputProps:{...t,checked:b,"aria-required":P&&f==="aria"||void 0,required:P&&f==="native"},isSelected:b,isPressed:x,isDisabled:v,isReadOnly:$,isInvalid:n,validationErrors:s,validationDetails:r}}const _=new WeakMap;function ee(e,i,a){const d=j.$3017fa7ffdddec74$export$8042c6c013fd5226({isReadOnly:e.isReadOnly||i.isReadOnly,isSelected:i.isSelected(e.value),defaultSelected:i.defaultValue.includes(e.value),onChange(c){c?i.addValue(e.value):i.removeValue(e.value),e.onChange&&e.onChange(c)}});let{name:n,form:s,descriptionId:r,errorMessageId:l,validationBehavior:t}=_.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"}),v=k.useRef(m.$e5be200c675c3b3a$export$dad6ae84456c676a),$=()=>{i.setInvalid(e.value,x.isInvalid?x:v.current)};k.useEffect($);let h=i.realtimeValidation.isInvalid?i.realtimeValidation:x,P=t==="native"?i.displayValidation:h;var f;let u=O({...e,isReadOnly:e.isReadOnly||i.isReadOnly,isDisabled:e.isDisabled||i.isDisabled,name:e.name||n,form:e.form||s,isRequired:(f=e.isRequired)!==null&&f!==void 0?f:i.isRequired,validationBehavior:t,[m.$e5be200c675c3b3a$export$a763b9476acd3eb]:{realtimeValidation:h,displayValidation:P,resetValidation:i.resetValidation,commitValidation:i.commitValidation,updateValidation(c){v.current=c,$()}}},d,a);return{...u,inputProps:{...u.inputProps,"aria-describedby":[e["aria-describedby"],i.isInvalid?l:null,r].filter(Boolean).join(" ")||void 0}}}const B=k.createContext(null),ie="_checkboxInner_1jfol_1",ae="_checkbox_1jfol_1",de="_checkboxGroup_1jfol_121",V={checkboxInner:ie,checkbox:ae,checkboxGroup:de},p=y.forwardRef((e,i)=>{const{hoverProps:a,isHovered:d}=e.hoverResult,{pressProps:n,isPressed:s}=e.pressResult,{isFocused:r,isFocusVisible:l,focusProps:t}=e.focusRingAria;return o.jsxs("label",{ref:i,...g.$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":s||void 0,"data-disabled":e.isDisabled||void 0,"data-readonly":e.isReadOnly||void 0,"data-invalid":e.isInvalid||void 0,"data-focused":r||void 0,"data-focus-visible":l||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",{...g.$3ef42575df84b30b$export$9d1611c77c2fe928(e.inputProps,t),ref:e.inputRef})}),e.children]})}),ne=y.forwardRef((e,i)=>{const a=ee({...e,value:e.value||""},e.state,e.inputRef);return o.jsx(p,{...e,...a,ref:i})}),te=y.forwardRef((e,i)=>{const a=O(e,j.$3017fa7ffdddec74$export$8042c6c013fd5226(e),e.inputRef);return o.jsx(p,{...e,...a,ref:i})}),se=y.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=y.useContext(B),s=y.useRef(null),r=Q.$6179b936705e76d3$export$ae780daf29e6d456(e),l=C.$f6c31cce2adf654f$export$45712eceda6fad21({ref:i,isDisabled:e.isDisabled}),t=X.$f7dceffc5ad7768b$export$4e328f61c538687f();return n?o.jsx(ne,{...e,state:n,inputRef:s,hoverResult:r,pressResult:l,focusRingAria:t,validationBehavior:d}):o.jsx(te,{...e,inputRef:s,hoverResult:r,pressResult:l,focusRingAria:t,validationBehavior:d})});exports.$1ae600c947479353$export$ec98120685d4f57d=_;exports.Checkbox=se;exports.CheckboxGroupContext=B;exports.styles=V;
|
|
@@ -1,9 +1,9 @@
|
|
|
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-C5TNJ0Ku.js";
|
|
3
3
|
import { T as C } from "./Text-CmlsaWMA.js";
|
|
4
4
|
import * as m from "react";
|
|
5
5
|
import { useState as S, useRef as y } from "react";
|
|
6
|
-
import { $ as p, C as v, s as D, a as I } from "./Checkbox-
|
|
6
|
+
import { $ as p, C as v, s as D, a as I } from "./Checkbox-DTuryJdM.js";
|
|
7
7
|
import { $ as R, F as k } from "./FieldError-DdvFyIf4.js";
|
|
8
8
|
import { $ as F, c as A } from "./useFormValidation-L0UHvOsP.js";
|
|
9
9
|
import { $ as E } from "./useControlledState-u436Wbp1.js";
|
|
@@ -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-Dp85Vue3.cjs"),C=require("./Text-BAFsaON-.cjs"),$=require("react"),h=require("./Checkbox-dtZfsSfx.cjs"),g=require("./FieldError-Cornph2A.cjs"),P=require("./useFormValidation-BQIRxgbU.cjs"),y=require("./useControlledState-D0L6S_5r.cjs"),j=require("./mergeProps-JhcJ7uJL.cjs"),q=require("./filterDOMProps-RRlKPKX0.cjs"),k=require("./useField-DyeD7MLj.cjs"),D=require("./useFocusWithin-DTnk0e8a.cjs"),F=require("./useLocalizedStringFormatter-BO2iZEL0.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,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as e, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import * as i from "react";
|
|
3
|
-
import { a as y, T as a } from "./ToggleButtonGroup-
|
|
3
|
+
import { a as y, T as a } from "./ToggleButtonGroup-CwHPu7w5.js";
|
|
4
4
|
import { c as d } from "./createLucideIcon-XRdN60yz.js";
|
|
5
5
|
import { $ as r } from "./VisuallyHidden-CGEtjAP7.js";
|
|
6
6
|
import { u as g } from "./useLocalizedStringFormatter-N0AyjzbM.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";require('./assets/ColorSchemeSwitch.css');const e=require("react/jsx-runtime"),m=require("react"),s=require("./ToggleButtonGroup-
|
|
1
|
+
"use strict";require('./assets/ColorSchemeSwitch.css');const e=require("react/jsx-runtime"),m=require("react"),s=require("./ToggleButtonGroup-DY9S3USc.cjs"),i=require("./createLucideIcon-CTVXwe6i.cjs"),a=require("./VisuallyHidden-EjrqodVh.cjs"),g=require("./useLocalizedStringFormatter-BO2iZEL0.cjs");function p(t){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const o in t)if(o!=="default"){const n=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(c,o,n.get?n:{enumerable:!0,get:()=>t[o]})}}return c.default=t,Object.freeze(c)}const u=p(m);/**
|
|
2
2
|
* @license lucide-react v0.525.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|