@midas-ds/components 1.1.0 → 1.2.3

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.
Files changed (180) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/index.cjs +138 -0
  3. package/index.css +1 -0
  4. package/index.d.ts +0 -2
  5. package/index.js +27067 -105
  6. package/package.json +21 -4
  7. package/theme.cjs +1 -0
  8. package/theme.js +20 -0
  9. package/tokens-BskyMDHv.cjs +1 -0
  10. package/Breadcrumbs.css +0 -1
  11. package/Button-DL6nqUco.js +0 -182
  12. package/Button.css +0 -1
  13. package/ButtonGroup.css +0 -1
  14. package/Card.css +0 -1
  15. package/Checkbox-q0dugR2t.js +0 -402
  16. package/Checkbox.css +0 -1
  17. package/Collection-KMFfVuzU.js +0 -510
  18. package/ComboBox.css +0 -1
  19. package/DatePicker.css +0 -1
  20. package/Dialog-D6Bqrpn-.js +0 -1952
  21. package/Disclosure-dAZYXyTH.js +0 -225
  22. package/Disclosure.css +0 -1
  23. package/DragAndDrop-B0T3WgjL.js +0 -40
  24. package/Dropdown.css +0 -1
  25. package/FileUpload.css +0 -1
  26. package/Flex.css +0 -1
  27. package/Flex.module-CpoxBzQX.js +0 -37
  28. package/FocusScope-B7CkxXNC.js +0 -513
  29. package/Form-BWBjJC6v.js +0 -238
  30. package/Grid.css +0 -1
  31. package/Grid.module-Ia0e9Dix.js +0 -36
  32. package/Group-D7_8007y.js +0 -42
  33. package/Heading-RCRHv6hd.js +0 -15
  34. package/Hidden-CVlUgUJM.js +0 -37
  35. package/InfoBanner.css +0 -1
  36. package/Layout.css +0 -1
  37. package/Link-BnQvB-hH.js +0 -75
  38. package/Link.css +0 -1
  39. package/LinkButton.css +0 -1
  40. package/ListBox-DBBiqvcR.js +0 -474
  41. package/ListKeyboardDelegate-gCXy-Xnn.js +0 -172
  42. package/Logo.css +0 -1
  43. package/Modal.css +0 -1
  44. package/MultiSelect.css +0 -1
  45. package/PressResponder-B4g56kDz.js +0 -31
  46. package/RSPContexts-BW2SEIqe.js +0 -11
  47. package/Radio.css +0 -1
  48. package/SearchField.css +0 -1
  49. package/Select.css +0 -1
  50. package/SelectionManager-BfXUE1qg.js +0 -1031
  51. package/Separator-BBX9m2O2.js +0 -49
  52. package/Spinner.css +0 -1
  53. package/Table.css +0 -1
  54. package/Tabs.css +0 -1
  55. package/Tag-DWt0koFj.js +0 -728
  56. package/Tag.css +0 -1
  57. package/Text-BCF0xvqL.js +0 -15
  58. package/TextArea.css +0 -1
  59. package/TextField-CX4eOQf6.js +0 -225
  60. package/TextField.css +0 -1
  61. package/TextField.module-DdICj682.js +0 -143
  62. package/Toast.css +0 -1
  63. package/VisuallyHidden-Dhr5caPC.js +0 -39
  64. package/chevron-down-Cd1bkzXT.js +0 -13
  65. package/chevron-right-DBMc9VMi.js +0 -23
  66. package/clsx-OuTLNxxd.js +0 -16
  67. package/context-BpJLnOuu.js +0 -80
  68. package/createLucideIcon-DeWljiyi.js +0 -79
  69. package/index-B-jHjTDC.js +0 -120
  70. package/index-BPdc9gJ8.js +0 -3122
  71. package/index-KSgQWWiy.js +0 -26984
  72. package/index10.js +0 -4
  73. package/index11.js +0 -5
  74. package/index12.js +0 -4
  75. package/index13.js +0 -4
  76. package/index14.js +0 -4
  77. package/index15.js +0 -6
  78. package/index16.js +0 -6
  79. package/index17.js +0 -6
  80. package/index18.js +0 -4
  81. package/index19.js +0 -6
  82. package/index2.js +0 -8
  83. package/index20.js +0 -6
  84. package/index21.js +0 -4
  85. package/index22.js +0 -5
  86. package/index23.js +0 -5
  87. package/index24.js +0 -5
  88. package/index25.js +0 -6
  89. package/index26.js +0 -6
  90. package/index27.js +0 -6
  91. package/index28.js +0 -4
  92. package/index29.js +0 -6
  93. package/index3.js +0 -6
  94. package/index30.js +0 -21
  95. package/index31.js +0 -22
  96. package/index32.js +0 -14
  97. package/index33.js +0 -11
  98. package/index34.js +0 -31
  99. package/index35.js +0 -8
  100. package/index36.js +0 -9
  101. package/index37.js +0 -19
  102. package/index38.js +0 -9
  103. package/index39.js +0 -9
  104. package/index4.js +0 -4
  105. package/index40.js +0 -23
  106. package/index41.js +0 -63
  107. package/index42.js +0 -53
  108. package/index43.js +0 -18
  109. package/index44.js +0 -27
  110. package/index45.js +0 -18
  111. package/index46.js +0 -21
  112. package/index47.js +0 -49
  113. package/index48.js +0 -5
  114. package/index49.js +0 -25
  115. package/index5.js +0 -5
  116. package/index50.js +0 -18
  117. package/index51.js +0 -9
  118. package/index52.js +0 -25
  119. package/index53.js +0 -18
  120. package/index54.js +0 -11
  121. package/index55.js +0 -12
  122. package/index56.js +0 -15
  123. package/index57.js +0 -9
  124. package/index58.js +0 -9
  125. package/index59.js +0 -19
  126. package/index6.js +0 -4
  127. package/index60.js +0 -22
  128. package/index61.js +0 -61
  129. package/index62.js +0 -15
  130. package/index63.js +0 -11
  131. package/index64.js +0 -53
  132. package/index65.js +0 -85
  133. package/index66.js +0 -74
  134. package/index67.js +0 -24
  135. package/index68.js +0 -69
  136. package/index69.js +0 -80
  137. package/index7.js +0 -9
  138. package/index70.js +0 -140
  139. package/index71.js +0 -70
  140. package/index72.js +0 -42
  141. package/index73.js +0 -82
  142. package/index74.js +0 -71
  143. package/index75.js +0 -104
  144. package/index76.js +0 -275
  145. package/index77.js +0 -723
  146. package/index78.js +0 -489
  147. package/index79.js +0 -314
  148. package/index8.js +0 -4
  149. package/index80.js +0 -389
  150. package/index81.js +0 -252
  151. package/index82.js +0 -1364
  152. package/index83.js +0 -1009
  153. package/index84.js +0 -386
  154. package/index85.js +0 -2101
  155. package/index86.js +0 -2368
  156. package/index87.js +0 -6831
  157. package/index88.js +0 -17
  158. package/index89.js +0 -14
  159. package/index9.js +0 -5
  160. package/index90.js +0 -6
  161. package/index91.js +0 -9
  162. package/intlStrings-Cd44R5hT.js +0 -278
  163. package/react.esm-sMU8Z7rL.js +0 -11060
  164. package/triangle-alert-1OYl9KWz.js +0 -56
  165. package/useControlledState-Kv9K2AYu.js +0 -30
  166. package/useDescription-B7stiK3j.js +0 -32
  167. package/useEvent-Xk5kn5Ns.js +0 -21
  168. package/useField-DMzJIIN4.js +0 -67
  169. package/useFilter-Bt9dbV1U.js +0 -35
  170. package/useFocusRing-9PXyKy2A.js +0 -1297
  171. package/useFocusable-CcEBZe40.js +0 -59
  172. package/useGridSelectionCheckbox-DYgEnElE.js +0 -22
  173. package/useHasTabbableChild-D6DwR81L.js +0 -34
  174. package/useHighlightSelectionDescription-WYAbP4No.js +0 -552
  175. package/useLabels-9zaZ9oa0.js +0 -17
  176. package/useListState-BfTeKTk5.js +0 -119
  177. package/useLocalizedStringFormatter-BlCbn-hX.js +0 -96
  178. package/useSingleSelectListState-DPkaL0la.js +0 -34
  179. package/useUpdateEffect-Dtz-i14F.js +0 -12
  180. package/x-JK7i-TQC.js +0 -14
package/package.json CHANGED
@@ -14,8 +14,9 @@
14
14
  "description": "Midas Components",
15
15
  "homepage": "https://designsystem.migrationsverket.se/",
16
16
  "license": "CC0-1.0",
17
- "version": "1.1.0",
18
- "main": "./index.js",
17
+ "version": "1.2.3",
18
+ "main": "./index.cjs",
19
+ "module": "./index.js",
19
20
  "types": "./index.d.ts",
20
21
  "type": "module",
21
22
  "files": [
@@ -29,7 +30,23 @@
29
30
  "url": "https://github.com/migrationsverket/midas"
30
31
  },
31
32
  "peerDependencies": {
32
- "react": "^18.3.1",
33
- "react-dom": "^18.3.1"
33
+ "react": "^18.3.1 || ^19.0.0",
34
+ "react-dom": "^18.3.1 || ^19.0.0"
35
+ },
36
+ "exports": {
37
+ ".": {
38
+ "import": "./index.js",
39
+ "require": "./index.cjs"
40
+ },
41
+ "./theme": {
42
+ "import": "./theme.js",
43
+ "require": "./theme.cjs"
44
+ }
45
+ },
46
+ "dependencies": {
47
+ "@react-stately/toast": "3.0.0-beta.7",
48
+ "react-aria": "3.37.0",
49
+ "react-aria-components": "^1.6.0",
50
+ "react-stately": "3.35.0"
34
51
  }
35
52
  }
package/theme.cjs ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./tokens-BskyMDHv.cjs"),s={...o.tokens};exports.accessibility=o.accessibility;exports.baseColors=o.baseColors;exports.borderRadius=o.borderRadius;exports.borderWidths=o.borderWidths;exports.boxShadow=o.boxShadow;exports.breakpoints=o.breakpoints;exports.buttonColors=o.buttonColors;exports.font=o.font;exports.fontSizes=o.fontSizes;exports.fontWeights=o.fontWeights;exports.inputColor=o.inputColor;exports.midasColors=o.midasColors;exports.midasTransitions=o.midasTransitions;exports.signalColors=o.signalColors;exports.theme=s;
package/theme.js ADDED
@@ -0,0 +1,20 @@
1
+ import { t as s } from "./tokens-CjXmpXTi.js";
2
+ import { j as r, b as e, c as n, d as b, l as d, h as l, a as m, k as f, e as h, f as p, i as C, m as c, g, s as k } from "./tokens-CjXmpXTi.js";
3
+ const a = { ...s };
4
+ export {
5
+ r as accessibility,
6
+ e as baseColors,
7
+ n as borderRadius,
8
+ b as borderWidths,
9
+ d as boxShadow,
10
+ l as breakpoints,
11
+ m as buttonColors,
12
+ f as font,
13
+ h as fontSizes,
14
+ p as fontWeights,
15
+ C as inputColor,
16
+ c as midasColors,
17
+ g as midasTransitions,
18
+ k as signalColors,
19
+ a as theme
20
+ };
@@ -0,0 +1 @@
1
+ "use strict";const e={white:"#ffffff",black:"#000000",gray10:"#f2f2f2",gray20:"#e6e6e6",gray30:"#d9d9d9",gray40:"#cccccc",gray50:"#bfbfbf",gray60:"#b3b3b3",gray70:"#a6a6a6",gray80:"#999999",gray90:"#8c8c8c",gray100:"#808080",gray130:"#5d5d5d",gray150:"#1f1f1f",red10:"#f7e9e7",red20:"#f1d4d1",red30:"#e9beba",red40:"#e2a8a4",red50:"#d9918e",red60:"#d37a7a",red70:"#cc6467",red80:"#c54c56",red90:"#be3345",red100:"#b90835",red130:"#8b1327",red150:"#641018",blue10:"#eaf2f6",blue20:"#d5e5ed",blue30:"#c0d7e4",blue40:"#abcbdb",blue50:"#94bcd1",blue60:"#82b0c9",blue70:"#6ca3c0",blue80:"#5897b8",blue90:"#4289ad",blue100:"#2e7ca5",blue130:"#25607f",blue150:"#143c50"},o={outline:"#303030",primaryBackground:e.blue150,primaryText:"#303030",primaryHover:e.blue130,primaryFocus:e.black,primaryActive:"#4289ae",secondaryBackground:e.gray130,secondaryText:e.white,secondaryHover:"#303030",secondaryActive:"#303030"},i={inputText:e.gray150},r={signalGreen10:"#d5f2d9",signalGreen100:"#008d3c",signalBlue10:e.blue10,signalBlue100:"#0066cc",signalYellow10:"#fff8e1",signalYellow100:"#f1c21b",signalRed10:"#ffdfdf",signalRed100:"#e62323",signalRed130:"#b31b1b",signalRed150:"#801313"},a={sRadius:" 0.125rem",mRadius:" 0.25rem"},t={xsWidth:" 0.0625rem",sWidth:" 0.125rem",mWidth:" 0.25rem"},d={lightWeight:"300",regularWeight:"400",mediumWeight:"500",semiBoldWeight:"600",boldWeight:"700",blackWeight:"900"},n={desktopSize:"1rem",mobileSize:"1rem",largeSize:"1.5rem",inputNormalSize:"0.875rem",inputMessageSize:"0.75rem",inputLabelSize:"1rem",inputDescriptionSize:"0.875rem"},s={logoPrimary:e.red100,logoSecondary:e.white,textPrimary:e.gray150,textSecondary:e.white,textTertiary:e.red100,link:e.blue130,linkVisited:"#663366",backgroundPrimary:e.white,backgroundSecondary:e.gray10,backgroundFooter1:e.red100,backgroundFooter2:e.red130,backgroundInfo:e.blue10,backgroundImportant:r.signalYellow10,borderPrimary:e.black,borderSecondary:e.gray60,borderFocusOuter:e.black,borderFocusInner:e.white,iconPrimary:e.black,iconInverted:e.white},c={slowTransition:"500ms",normalTransition:"300ms",fastTransition:"250ms"},l={smBreakpoint:"(max-width: 767px)",mdBreakpoint:"(min-width: 768px)",lgBreakpoint:"(min-width: 1200px)",xlBreakpoint:"(min-width: 1440px)"},b={forcedColorsMode:"(forced-colors: active)",prefersReducedMotion:"(prefers-reduced-motion: reduced)"},g={display:'"Inter", sans-serif'},u={focus:"0 0 0 2px white, 0 0 0 4px black"},m=Object.freeze(Object.defineProperty({__proto__:null,accessibility:b,baseColors:e,borderRadius:a,borderWidths:t,boxShadow:u,breakpoints:l,buttonColors:o,font:g,fontSizes:n,fontWeights:d,inputColor:i,midasColors:s,midasTransitions:c,signalColors:r},Symbol.toStringTag,{value:"Module"}));exports.accessibility=b;exports.baseColors=e;exports.borderRadius=a;exports.borderWidths=t;exports.boxShadow=u;exports.breakpoints=l;exports.buttonColors=o;exports.font=g;exports.fontSizes=n;exports.fontWeights=d;exports.inputColor=i;exports.midasColors=s;exports.midasTransitions=c;exports.signalColors=r;exports.tokens=m;
package/Breadcrumbs.css DELETED
@@ -1 +0,0 @@
1
- ._container_k9jic_4{padding-inline-start:0;font-family:Inter,sans-serif;display:flex;flex-flow:row wrap;gap:.25rem;list-style:none;margin:0}._container_k9jic_4 li:not(:last-child):after{color:#1f1f1f;content:"/";alt:" ";padding:0 5px}._container_k9jic_4 li[data-current=true] a{cursor:default}
@@ -1,182 +0,0 @@
1
- import { n as I, e as x, o as E, a as w, c as F, b as N, d as O, k as y } from "./useFocusRing-9PXyKy2A.js";
2
- import L, { createContext as A, useRef as S, useEffect as V } from "react";
3
- import { $ as M } from "./Hidden-CVlUgUJM.js";
4
- import { $ as R } from "./useFocusable-CcEBZe40.js";
5
- function k(n, e) {
6
- let {
7
- elementType: t = "button",
8
- isDisabled: d,
9
- onPress: i,
10
- onPressStart: a,
11
- onPressEnd: r,
12
- onPressUp: v,
13
- onPressChange: l,
14
- preventFocusOnPress: $,
15
- allowFocusWhenDisabled: g,
16
- // @ts-ignore
17
- onClick: c,
18
- href: h,
19
- target: P,
20
- rel: u,
21
- type: f = "button"
22
- } = n, o;
23
- t === "button" ? o = {
24
- type: f,
25
- disabled: d
26
- } : o = {
27
- role: "button",
28
- tabIndex: d ? void 0 : 0,
29
- href: t === "a" && !d ? h : void 0,
30
- target: t === "a" ? P : void 0,
31
- type: t === "input" ? f : void 0,
32
- disabled: t === "input" ? d : void 0,
33
- "aria-disabled": !d || t === "input" ? void 0 : d,
34
- rel: t === "a" ? u : void 0
35
- };
36
- let { pressProps: b, isPressed: p } = I({
37
- onPressStart: a,
38
- onPressEnd: r,
39
- onPressChange: l,
40
- onPress: i,
41
- onPressUp: v,
42
- isDisabled: d,
43
- preventFocusOnPress: $,
44
- ref: e
45
- }), { focusableProps: m } = R(n, e);
46
- g && (m.tabIndex = d ? -1 : m.tabIndex);
47
- let _ = x(m, b, E(n, {
48
- labelable: !0
49
- }));
50
- return {
51
- isPressed: p,
52
- buttonProps: x(o, _, {
53
- "aria-haspopup": n["aria-haspopup"],
54
- "aria-expanded": n["aria-expanded"],
55
- "aria-controls": n["aria-controls"],
56
- "aria-pressed": n["aria-pressed"],
57
- onClick: (D) => {
58
- c && (c(D), console.warn("onClick is deprecated, please use onPress"));
59
- }
60
- })
61
- };
62
- }
63
- const T = 7e3;
64
- let s = null;
65
- function C(n, e = "assertive", t = T) {
66
- s ? s.announce(n, e, t) : (s = new H(), (typeof IS_REACT_ACT_ENVIRONMENT == "boolean" ? IS_REACT_ACT_ENVIRONMENT : typeof jest < "u") ? s.announce(n, e, t) : setTimeout(() => {
67
- s != null && s.isAttached() && (s == null || s.announce(n, e, t));
68
- }, 100));
69
- }
70
- function z(n) {
71
- s && s.clear(n);
72
- }
73
- class H {
74
- isAttached() {
75
- var e;
76
- return (e = this.node) === null || e === void 0 ? void 0 : e.isConnected;
77
- }
78
- createLog(e) {
79
- let t = document.createElement("div");
80
- return t.setAttribute("role", "log"), t.setAttribute("aria-live", e), t.setAttribute("aria-relevant", "additions"), t;
81
- }
82
- destroy() {
83
- this.node && (document.body.removeChild(this.node), this.node = null);
84
- }
85
- announce(e, t = "assertive", d = T) {
86
- var i, a;
87
- if (!this.node) return;
88
- let r = document.createElement("div");
89
- typeof e == "object" ? (r.setAttribute("role", "img"), r.setAttribute("aria-labelledby", e["aria-labelledby"])) : r.textContent = e, t === "assertive" ? (i = this.assertiveLog) === null || i === void 0 || i.appendChild(r) : (a = this.politeLog) === null || a === void 0 || a.appendChild(r), e !== "" && setTimeout(() => {
90
- r.remove();
91
- }, d);
92
- }
93
- clear(e) {
94
- this.node && ((!e || e === "assertive") && this.assertiveLog && (this.assertiveLog.innerHTML = ""), (!e || e === "polite") && this.politeLog && (this.politeLog.innerHTML = ""));
95
- }
96
- constructor() {
97
- this.node = null, this.assertiveLog = null, this.politeLog = null, typeof document < "u" && (this.node = document.createElement("div"), this.node.dataset.liveAnnouncer = "true", Object.assign(this.node.style, {
98
- border: 0,
99
- clip: "rect(0 0 0 0)",
100
- clipPath: "inset(50%)",
101
- height: "1px",
102
- margin: "-1px",
103
- overflow: "hidden",
104
- padding: 0,
105
- position: "absolute",
106
- width: "1px",
107
- whiteSpace: "nowrap"
108
- }), this.assertiveLog = this.createLog("assertive"), this.node.appendChild(this.assertiveLog), this.politeLog = this.createLog("polite"), this.node.appendChild(this.politeLog), document.body.prepend(this.node));
109
- }
110
- }
111
- const U = /* @__PURE__ */ A(null), j = /* @__PURE__ */ new Set([
112
- "form",
113
- "formAction",
114
- "formEncType",
115
- "formMethod",
116
- "formNoValidate",
117
- "formTarget",
118
- "name",
119
- "value"
120
- ]), B = /* @__PURE__ */ A({}), J = /* @__PURE__ */ M(function(e, t) {
121
- [e, t] = w(e, t, B), e = K(e);
122
- let d = e, { isPending: i } = d, { buttonProps: a, isPressed: r } = k(e, t), { focusProps: v, isFocused: l, isFocusVisible: $ } = F(e), { hoverProps: g, isHovered: c } = N({
123
- ...e,
124
- isDisabled: e.isDisabled || i
125
- }), h = {
126
- isHovered: c,
127
- isPressed: (d.isPressed || r) && !i,
128
- isFocused: l,
129
- isFocusVisible: $,
130
- isDisabled: e.isDisabled || !1,
131
- isPending: i ?? !1
132
- }, P = O({
133
- ...e,
134
- values: h,
135
- defaultClassName: "react-aria-Button"
136
- }), u = y(a.id), f = y(), o = a["aria-labelledby"];
137
- i && (o ? o = `${o} ${f}` : a["aria-label"] && (o = `${u} ${f}`));
138
- let b = S(i);
139
- return V(() => {
140
- let p = {
141
- "aria-labelledby": o || u
142
- };
143
- (!b.current && l && i || b.current && l && !i) && C(p, "assertive"), b.current = i;
144
- }, [
145
- i,
146
- l,
147
- o,
148
- u
149
- ]), /* @__PURE__ */ L.createElement("button", {
150
- ...E(e, {
151
- propNames: j
152
- }),
153
- ...x(a, v, g),
154
- ...P,
155
- type: a.type === "submit" && i ? "button" : a.type,
156
- id: u,
157
- ref: t,
158
- "aria-labelledby": o,
159
- slot: e.slot || void 0,
160
- "aria-disabled": i ? "true" : a["aria-disabled"],
161
- "data-disabled": e.isDisabled || void 0,
162
- "data-pressed": h.isPressed || void 0,
163
- "data-hovered": c || void 0,
164
- "data-focused": l || void 0,
165
- "data-pending": i || void 0,
166
- "data-focus-visible": $ || void 0
167
- }, /* @__PURE__ */ L.createElement(U.Provider, {
168
- value: {
169
- id: f
170
- }
171
- }, P.children));
172
- });
173
- function K(n) {
174
- return n.isPending && (n.onPress = void 0, n.onPressStart = void 0, n.onPressEnd = void 0, n.onPressChange = void 0, n.onPressUp = void 0, n.onKeyDown = void 0, n.onKeyUp = void 0, n.onClick = void 0, n.href = void 0), n;
175
- }
176
- export {
177
- J as $,
178
- B as a,
179
- C as b,
180
- k as c,
181
- z as d
182
- };
package/Button.css DELETED
@@ -1 +0,0 @@
1
- ._button_1tedv_4{font-family:Inter,sans-serif;font-size:1rem;font-weight:500;padding:.8125rem 1.9375rem;background-color:#143c50;border:solid 1px transparent;color:#fff;cursor:pointer;opacity:1;outline:none;display:inline-flex;flex-direction:row;align-items:center;justify-content:center;gap:.5rem}._button_1tedv_4[data-focus-visible],._button_1tedv_4:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #000}._button_1tedv_4:hover{background-color:#25607f}._button_1tedv_4[data-pressed]{background-color:#4289ad;outline:none}._primary_1tedv_36[data-disabled]{color:#bfbfbf;pointer-events:none;background-color:#f2f2f2}._secondary_1tedv_42{color:#143c50;background-color:#fff;border-color:#143c50;opacity:1}._secondary_1tedv_42:hover{color:#143c50;background-color:#f2f2f2}._secondary_1tedv_42[data-disabled]{color:#bfbfbf;pointer-events:none;background-color:#fff;border-color:#bfbfbf}._secondary_1tedv_42[data-pressed]{background-color:#e6e6e6;border-color:#143c50}._tertiary_1tedv_66{color:#143c50;background-color:transparent;padding:.8125rem .9375rem;opacity:1}._tertiary_1tedv_66:hover{color:#143c50;background-color:#f2f2f2}._tertiary_1tedv_66[data-disabled]{color:#bfbfbf;pointer-events:none;background-color:#fff}._tertiary_1tedv_66[data-pressed]{background-color:#e6e6e6}._iconBtn_1tedv_88{background-color:transparent;padding:.875rem;color:#000;display:flex;align-items:center}._iconBtn_1tedv_88:hover{background-color:#0000001a}._iconBtn_1tedv_88[data-disabled]{color:#bfbfbf;pointer-events:none}._iconBtn_1tedv_88[data-pressed]{background-color:#e6e6e6}._danger_1tedv_109{color:#fff;background-color:#e62323;opacity:1}._danger_1tedv_109:hover{color:#fff;background-color:#b31b1b}._danger_1tedv_109[data-disabled]{color:#bfbfbf;pointer-events:none;background-color:#f2f2f2}._danger_1tedv_109[data-pressed]{background-color:#801313;outline:none}._iconRight_1tedv_131{flex-direction:row-reverse}._fullwidth_1tedv_135{width:100%}._small_1tedv_139{min-height:1.5rem;font-size:.75rem;padding:.25rem .5rem}
package/ButtonGroup.css DELETED
@@ -1 +0,0 @@
1
- ._buttonGroup_5pd8y_4{display:flex;flex-flow:row wrap;gap:.5rem}@media (max-width: 767px){._buttonGroup_5pd8y_4>*{width:100%}}
package/Card.css DELETED
@@ -1 +0,0 @@
1
- ._card_vbecj_4{position:relative;font-family:Inter,sans-serif;display:flex;flex:1;flex-direction:column;justify-content:space-between;gap:1rem;padding:2rem 1.5rem;border-bottom:1px solid #000000;background-color:#fff;transition:transform .25s ease-in-out,background-color .25s ease-in-out}._card_vbecj_4:hover{background-color:#e6e6e6}._card_vbecj_4:active{background-color:#f2f2f2}._card_vbecj_4:focus-visible{outline:2px solid #000000;outline-offset:-2px}._content_vbecj_33{display:flex;flex-direction:column;gap:.5rem}._heading_vbecj_39{margin:0;font-size:1.5rem;line-height:2rem;font-weight:500;color:#1f1f1f}._image_vbecj_47{height:auto;width:100%;object-fit:cover;max-width:100%;vertical-align:middle;aspect-ratio:4/3}._background_vbecj_56{background-color:#d5e5ed}._text_vbecj_60{margin-block-start:0;color:#000;margin:0;padding:0}
@@ -1,402 +0,0 @@
1
- import { jsx as P, jsxs as K, Fragment as Q } from "react/jsx-runtime";
2
- import { c as U } from "./clsx-OuTLNxxd.js";
3
- import { a as X } from "./RSPContexts-BW2SEIqe.js";
4
- import { n as D, e as g, o as S, f as Y, a as w, y as M, z as Z, d as E, B as ee, i as ae, F as ie, A as q, c as de, b as le } from "./useFocusRing-9PXyKy2A.js";
5
- import { d as ne, c as B, e as te, f as F, g as se, h as re, $ as W, a as oe } from "./Form-BWBjJC6v.js";
6
- import { b as ce, $ as fe } from "./useField-DMzJIIN4.js";
7
- import { $ as ue } from "./Text-BCF0xvqL.js";
8
- import R, { useEffect as G, useRef as N, forwardRef as L, useContext as be, createContext as j } from "react";
9
- import { $ as H } from "./useControlledState-Kv9K2AYu.js";
10
- import { $ as ve } from "./useFocusable-CcEBZe40.js";
11
- import { a as $e } from "./VisuallyHidden-Dhr5caPC.js";
12
- import './Checkbox.css';function he(a, e, d) {
13
- let { isDisabled: t = !1, isReadOnly: s = !1, value: r, name: o, children: l, "aria-label": f, "aria-labelledby": i, validationState: n = "valid", isInvalid: c } = a, v = (y) => {
14
- y.stopPropagation(), e.setSelected(y.target.checked);
15
- }, $ = l != null, u = f != null || i != null;
16
- !$ && !u && console.warn("If you do not provide children, you must specify an aria-label for accessibility");
17
- let { pressProps: b, isPressed: h } = D({
18
- isDisabled: t
19
- }), { pressProps: m, isPressed: x } = D({
20
- isDisabled: t || s,
21
- onPress() {
22
- e.toggle();
23
- }
24
- }), { focusableProps: I } = ve(a, d), p = g(b, I), V = S(a, {
25
- labelable: !0
26
- });
27
- return ne(d, e.isSelected, e.setSelected), {
28
- labelProps: g(m, {
29
- onClick: (y) => y.preventDefault()
30
- }),
31
- inputProps: g(V, {
32
- "aria-invalid": c || n === "invalid" || void 0,
33
- "aria-errormessage": a["aria-errormessage"],
34
- "aria-controls": a["aria-controls"],
35
- "aria-readonly": s || void 0,
36
- onChange: v,
37
- disabled: t,
38
- ...r == null ? {} : {
39
- value: r
40
- },
41
- name: o,
42
- type: "checkbox",
43
- ...p
44
- }),
45
- isSelected: e.isSelected,
46
- isPressed: h || x,
47
- isDisabled: t,
48
- isReadOnly: s,
49
- isInvalid: c || n === "invalid"
50
- };
51
- }
52
- function T(a, e, d) {
53
- let t = B({
54
- ...a,
55
- value: e.isSelected
56
- }), { isInvalid: s, validationErrors: r, validationDetails: o } = t.displayValidation, { labelProps: l, inputProps: f, isSelected: i, isPressed: n, isDisabled: c, isReadOnly: v } = he({
57
- ...a,
58
- isInvalid: s
59
- }, e, d);
60
- te(a, t, d);
61
- let { isIndeterminate: $, isRequired: u, validationBehavior: b = "aria" } = a;
62
- G(() => {
63
- d.current && (d.current.indeterminate = !!$);
64
- });
65
- let { pressProps: h } = D({
66
- isDisabled: c || v,
67
- onPress() {
68
- let { [F]: m } = a, { commitValidation: x } = m || t;
69
- x();
70
- }
71
- });
72
- return {
73
- labelProps: g(l, h),
74
- inputProps: {
75
- ...f,
76
- checked: i,
77
- "aria-required": u && b === "aria" || void 0,
78
- required: u && b === "native"
79
- },
80
- isSelected: i,
81
- isPressed: n,
82
- isDisabled: c,
83
- isReadOnly: v,
84
- isInvalid: s,
85
- validationErrors: r,
86
- validationDetails: o
87
- };
88
- }
89
- const A = /* @__PURE__ */ new WeakMap();
90
- function me(a, e) {
91
- let { isDisabled: d, name: t, validationBehavior: s = "aria" } = a, { isInvalid: r, validationErrors: o, validationDetails: l } = e.displayValidation, { labelProps: f, fieldProps: i, descriptionProps: n, errorMessageProps: c } = ce({
92
- ...a,
93
- // Checkbox group is not an HTML input element so it
94
- // shouldn't be labeled by a <label> element.
95
- labelElementType: "span",
96
- isInvalid: r,
97
- errorMessage: a.errorMessage || o
98
- });
99
- A.set(e, {
100
- name: t,
101
- descriptionId: n.id,
102
- errorMessageId: c.id,
103
- validationBehavior: s
104
- });
105
- let v = S(a, {
106
- labelable: !0
107
- }), { focusWithinProps: $ } = Y({
108
- onBlurWithin: a.onBlur,
109
- onFocusWithin: a.onFocus,
110
- onFocusWithinChange: a.onFocusChange
111
- });
112
- return {
113
- groupProps: g(v, {
114
- role: "group",
115
- "aria-disabled": d || void 0,
116
- ...i,
117
- ...$
118
- }),
119
- labelProps: f,
120
- descriptionProps: n,
121
- errorMessageProps: c,
122
- isInvalid: r,
123
- validationErrors: o,
124
- validationDetails: l
125
- };
126
- }
127
- function z(a = {}) {
128
- let { isReadOnly: e } = a, [d, t] = H(a.isSelected, a.defaultSelected || !1, a.onChange);
129
- function s(o) {
130
- e || t(o);
131
- }
132
- function r() {
133
- e || t(!d);
134
- }
135
- return {
136
- isSelected: d,
137
- setSelected: s,
138
- toggle: r
139
- };
140
- }
141
- function ge(a, e, d) {
142
- const t = z({
143
- isReadOnly: a.isReadOnly || e.isReadOnly,
144
- isSelected: e.isSelected(a.value),
145
- onChange(h) {
146
- h ? e.addValue(a.value) : e.removeValue(a.value), a.onChange && a.onChange(h);
147
- }
148
- });
149
- let { name: s, descriptionId: r, errorMessageId: o, validationBehavior: l } = A.get(e);
150
- var f;
151
- l = (f = a.validationBehavior) !== null && f !== void 0 ? f : l;
152
- let { realtimeValidation: i } = B({
153
- ...a,
154
- value: t.isSelected,
155
- // Server validation is handled at the group level.
156
- name: void 0,
157
- validationBehavior: "aria"
158
- }), n = N(se), c = () => {
159
- e.setInvalid(a.value, i.isInvalid ? i : n.current);
160
- };
161
- G(c);
162
- let v = e.realtimeValidation.isInvalid ? e.realtimeValidation : i, $ = l === "native" ? e.displayValidation : v;
163
- var u;
164
- let b = T({
165
- ...a,
166
- isReadOnly: a.isReadOnly || e.isReadOnly,
167
- isDisabled: a.isDisabled || e.isDisabled,
168
- name: a.name || s,
169
- isRequired: (u = a.isRequired) !== null && u !== void 0 ? u : e.isRequired,
170
- validationBehavior: l,
171
- [F]: {
172
- realtimeValidation: v,
173
- displayValidation: $,
174
- resetValidation: e.resetValidation,
175
- commitValidation: e.commitValidation,
176
- updateValidation(h) {
177
- n.current = h, c();
178
- }
179
- }
180
- }, t, d);
181
- return {
182
- ...b,
183
- inputProps: {
184
- ...b.inputProps,
185
- "aria-describedby": [
186
- a["aria-describedby"],
187
- e.isInvalid ? o : null,
188
- r
189
- ].filter(Boolean).join(" ") || void 0
190
- }
191
- };
192
- }
193
- function xe(a = {}) {
194
- let [e, d] = H(a.value, a.defaultValue || [], a.onChange), t = !!a.isRequired && e.length === 0, s = N(/* @__PURE__ */ new Map()), r = B({
195
- ...a,
196
- value: e
197
- }), o = r.displayValidation.isInvalid;
198
- var l;
199
- return {
200
- ...r,
201
- value: e,
202
- setValue(i) {
203
- a.isReadOnly || a.isDisabled || d(i);
204
- },
205
- isDisabled: a.isDisabled || !1,
206
- isReadOnly: a.isReadOnly || !1,
207
- isSelected(i) {
208
- return e.includes(i);
209
- },
210
- addValue(i) {
211
- a.isReadOnly || a.isDisabled || e.includes(i) || d(e.concat(i));
212
- },
213
- removeValue(i) {
214
- a.isReadOnly || a.isDisabled || e.includes(i) && d(e.filter((n) => n !== i));
215
- },
216
- toggleValue(i) {
217
- a.isReadOnly || a.isDisabled || (e.includes(i) ? d(e.filter((n) => n !== i)) : d(e.concat(i)));
218
- },
219
- setInvalid(i, n) {
220
- let c = new Map(s.current);
221
- n.isInvalid ? c.set(i, n) : c.delete(i), s.current = c, r.updateValidation(re(...c.values()));
222
- },
223
- validationState: (l = a.validationState) !== null && l !== void 0 ? l : o ? "invalid" : null,
224
- isInvalid: o,
225
- isRequired: t
226
- };
227
- }
228
- const ye = /* @__PURE__ */ j(null), J = /* @__PURE__ */ j(null), da = /* @__PURE__ */ L(function(e, d) {
229
- [e, d] = w(e, d, ye);
230
- let { validationBehavior: t } = M(W) || {};
231
- var s, r;
232
- let o = (r = (s = e.validationBehavior) !== null && s !== void 0 ? s : t) !== null && r !== void 0 ? r : "native", l = xe({
233
- ...e,
234
- validationBehavior: o
235
- }), [f, i] = Z(), { groupProps: n, labelProps: c, descriptionProps: v, errorMessageProps: $, ...u } = me({
236
- ...e,
237
- label: i,
238
- validationBehavior: o
239
- }, l), b = E({
240
- ...e,
241
- values: {
242
- isDisabled: l.isDisabled,
243
- isReadOnly: l.isReadOnly,
244
- isRequired: e.isRequired || !1,
245
- isInvalid: l.isInvalid,
246
- state: l
247
- },
248
- defaultClassName: "react-aria-CheckboxGroup"
249
- });
250
- return /* @__PURE__ */ R.createElement("div", {
251
- ...n,
252
- ...b,
253
- ref: d,
254
- slot: e.slot || void 0,
255
- "data-readonly": l.isReadOnly || void 0,
256
- "data-required": e.isRequired || void 0,
257
- "data-invalid": l.isInvalid || void 0,
258
- "data-disabled": e.isDisabled || void 0
259
- }, /* @__PURE__ */ R.createElement(ee, {
260
- values: [
261
- [
262
- J,
263
- l
264
- ],
265
- [
266
- fe,
267
- {
268
- ...c,
269
- ref: f,
270
- elementType: "span"
271
- }
272
- ],
273
- [
274
- ue,
275
- {
276
- slots: {
277
- description: v,
278
- errorMessage: $
279
- }
280
- }
281
- ],
282
- [
283
- oe,
284
- u
285
- ]
286
- ]
287
- }, b.children));
288
- }), Pe = /* @__PURE__ */ L(function(e, d) {
289
- let { inputRef: t = null, ...s } = e;
290
- [e, d] = w(s, d, X);
291
- let { validationBehavior: r } = M(W) || {};
292
- var o, l;
293
- let f = (l = (o = e.validationBehavior) !== null && o !== void 0 ? o : r) !== null && l !== void 0 ? l : "native", i = be(J), n = ae(ie(t, e.inputRef !== void 0 ? e.inputRef : null)), { labelProps: c, inputProps: v, isSelected: $, isDisabled: u, isReadOnly: b, isPressed: h, isInvalid: m } = i ? ge({
294
- ...q(e),
295
- // Value is optional for standalone checkboxes, but required for CheckboxGroup items;
296
- // it's passed explicitly here to avoid typescript error (requires ignore).
297
- // @ts-ignore
298
- value: e.value,
299
- // ReactNode type doesn't allow function children.
300
- children: typeof e.children == "function" ? !0 : e.children
301
- }, i, n) : T({
302
- ...q(e),
303
- children: typeof e.children == "function" ? !0 : e.children,
304
- validationBehavior: f
305
- }, z(e), n), { isFocused: x, isFocusVisible: I, focusProps: p } = de(), V = u || b, { hoverProps: y, isHovered: k } = le({
306
- ...e,
307
- isDisabled: V
308
- }), O = E({
309
- ...e,
310
- defaultClassName: "react-aria-Checkbox",
311
- values: {
312
- isSelected: $,
313
- isIndeterminate: e.isIndeterminate || !1,
314
- isPressed: h,
315
- isHovered: k,
316
- isFocused: x,
317
- isFocusVisible: I,
318
- isDisabled: u,
319
- isReadOnly: b,
320
- isInvalid: m,
321
- isRequired: e.isRequired || !1
322
- }
323
- }), _ = S(e);
324
- return delete _.id, /* @__PURE__ */ R.createElement("label", {
325
- ...g(_, c, y, O),
326
- ref: d,
327
- slot: e.slot || void 0,
328
- "data-selected": $ || void 0,
329
- "data-indeterminate": e.isIndeterminate || void 0,
330
- "data-pressed": h || void 0,
331
- "data-hovered": k || void 0,
332
- "data-focused": x || void 0,
333
- "data-focus-visible": I || void 0,
334
- "data-disabled": u || void 0,
335
- "data-readonly": b || void 0,
336
- "data-invalid": m || void 0,
337
- "data-required": e.isRequired || void 0
338
- }, /* @__PURE__ */ R.createElement($e, {
339
- elementType: "span"
340
- }, /* @__PURE__ */ R.createElement("input", {
341
- ...g(v, p),
342
- ref: n
343
- })), O.children);
344
- }), Re = '"../theme/tokens.css"', Ie = '"Inter", sans-serif', pe = "#000000", Ve = "#143c50", De = "#5897b8", Se = "#25607f", Be = "#ffdfdf", ke = "#e62323", Oe = "0 0 0 2px #ffffff, 0 0 0 4px #000000", _e = "#b31b1b", qe = "#ffffff", Ce = "#f2f2f2", we = "#cccccc", Me = "#808080", Ee = "#bfbfbf", Fe = "#e6e6e6", We = "400", Ge = "500", Ne = "(max-width: 767px)", Le = "#b3b3b3", je = "_wrap_qn5vw_4", He = "_checkboxInner_qn5vw_11", Te = "_checkbox_qn5vw_11", Ae = "_checkboxGroup_qn5vw_129", C = {
345
- tokens: Re,
346
- display: Ie,
347
- black: pe,
348
- primaryBackground: Ve,
349
- blue80: De,
350
- blue130: Se,
351
- signalRed10: Be,
352
- signalRed100: ke,
353
- focus: Oe,
354
- signalRed130: _e,
355
- white: qe,
356
- gray10: Ce,
357
- gray40: we,
358
- gray100: Me,
359
- gray50: Ee,
360
- gray20: Fe,
361
- regularWeight: We,
362
- mediumWeight: Ge,
363
- smBreakpoint: Ne,
364
- borderSecondary: Le,
365
- wrap: je,
366
- checkboxInner: He,
367
- checkbox: Te,
368
- checkboxGroup: Ae
369
- }, la = ({ children: a, ...e }) => /* @__PURE__ */ P(
370
- Pe,
371
- {
372
- className: U(C.checkbox, e.className),
373
- ...e,
374
- children: ({ isIndeterminate: d }) => /* @__PURE__ */ K(Q, { children: [
375
- /* @__PURE__ */ P("div", { className: C.checkboxInner, children: /* @__PURE__ */ P(
376
- "svg",
377
- {
378
- width: 16,
379
- height: 16,
380
- viewBox: "0 0 18 18",
381
- "aria-hidden": "true",
382
- children: d ? /* @__PURE__ */ P(
383
- "rect",
384
- {
385
- x: 4,
386
- y: 8,
387
- width: 10,
388
- height: 2
389
- }
390
- ) : /* @__PURE__ */ P("polyline", { points: "3,9 7,13 15,4" })
391
- }
392
- ) }),
393
- a
394
- ] })
395
- }
396
- );
397
- export {
398
- da as $,
399
- la as C,
400
- J as a,
401
- C as s
402
- };
package/Checkbox.css DELETED
@@ -1 +0,0 @@
1
- ._wrap_qn5vw_4{grid-area:Input;display:flex;flex-direction:column;gap:.5rem}._checkboxInner_qn5vw_11{width:1rem;height:1rem;box-sizing:border-box;border:1px solid #000000;transition:all .2s;align-items:center;justify-content:center;forced-color-adjust:none;display:flex}._checkboxInner_qn5vw_11 svg{width:1rem;height:1rem;fill:none;stroke:var(--checkmarkColor, #ffffff);stroke-width:2px;stroke-dasharray:22;stroke-dashoffset:66;transition:all .2s}._checkbox_qn5vw_11{font-family:Inter,sans-serif;font-weight:400;--borderColorPressed: #b3b3b3;--selectedColor: #143c50;--selectedPressed: #5897b8;--selectedHover: #25607f;--invalidColor: #e62323;--invalidPressed: #b31b1b;--checkmarkColor: #ffffff;gap:.5rem;align-items:center;forced-color-adjust:none;display:flex;width:max-content}._checkbox_qn5vw_11:hover div{border-color:gray}._checkbox_qn5vw_11[data-pressed] div{border-color:var(--borderColorPressed)}._checkbox_qn5vw_11[data-focus-visible],._checkbox_qn5vw_11:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #000;outline:none}._checkbox_qn5vw_11[data-selected] div,._checkbox_qn5vw_11[data-indeterminate] div{background:var(--selectedColor);border-color:var(--selectedColor)}._checkbox_qn5vw_11[data-invalid] div{border:2px solid var(--invalidColor)}._checkbox_qn5vw_11[data-disabled] div{pointer-events:none;border:1px solid #bfbfbf}._checkbox_qn5vw_11[data-selected]:hover div,._checkbox_qn5vw_11[data-indeterminate]:hover div{background:var(--selectedHover);border-color:var(--selectedHover)}._checkbox_qn5vw_11[data-selected][data-pressed] div,._checkbox_qn5vw_11[data-indeterminate][data-pressed] div{border-color:blue100;background:blue100}._checkbox_qn5vw_11[data-selected] svg,._checkbox_qn5vw_11[data-indeterminate] svg{stroke-dashoffset:44}._checkbox_qn5vw_11[data-indeterminate] svg{stroke:none;fill:var(--checkmarkColor)}._checkbox_qn5vw_11[data-invalid]:hover div{opacity:.5;border-color:var(--invalidColor)}._checkbox_qn5vw_11[data-invalid][data-pressed] div{border-color:var(--invalidPressed)}._checkbox_qn5vw_11[data-disabled]{color:#bfbfbf}._checkbox_qn5vw_11[data-disabled][data-selected] div,._checkbox_qn5vw_11[data-disabled][data-indeterminate] div{pointer-events:none;border:none;background:#e6e6e6}._checkboxGroup_qn5vw_129{font-family:Inter,sans-serif;display:flex;flex-direction:column;gap:.5rem;font-size:1rem;min-width:150px}._checkboxGroup_qn5vw_129 span{display:flex;align-items:center;gap:.5rem}._checkboxGroup_qn5vw_129[data-disabled]{color:#bfbfbf}@media (max-width: 767px){._checkboxGroup_qn5vw_129 ._checkbox_qn5vw_11{padding:.875rem 1rem;border:1px solid #000000;width:auto}._checkboxGroup_qn5vw_129 ._checkbox_qn5vw_11:hover{background-color:#f2f2f2}._checkboxGroup_qn5vw_129 ._checkbox_qn5vw_11[data-invalid]{border:2px solid var(--invalidColor)}._checkboxGroup_qn5vw_129 ._checkbox_qn5vw_11[data-disabled]{pointer-events:none;border-color:#bfbfbf}}