@midas-ds/components 17.7.3 → 17.7.5

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 CHANGED
@@ -1,3 +1,24 @@
1
+ ## 17.7.5 (2026-03-11)
2
+
3
+ ### 🩹 Fixes
4
+
5
+ - **components,table-styles:** update RAC to latest ([e2877fa6e2](https://github.com/migrationsverket/midas/commit/e2877fa6e2))
6
+
7
+ ### 🏭 Refactoring
8
+
9
+ - **components,label:** remove local state ([f64cb9d51c](https://github.com/migrationsverket/midas/commit/f64cb9d51c))
10
+ - **components,popover:** enable context props ([aeae93325a](https://github.com/migrationsverket/midas/commit/aeae93325a))
11
+
12
+ ### 🧱 Updated Dependencies
13
+
14
+ - Updated theme to 3.12.10
15
+
16
+ ## 17.7.4 (2026-03-11)
17
+
18
+ ### 🧱 Updated Dependencies
19
+
20
+ - Updated theme to 3.12.9
21
+
1
22
  ## 17.7.3 (2026-03-10)
2
23
 
3
24
  ### 🩹 Fixes
package/checkbox/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { C as e } from "../chunks/Checkbox-sAkQe7Q9.js";
2
- import { C } from "../chunks/CheckboxGroup-C5JLzeJv.js";
2
+ import { C } from "../chunks/CheckboxGroup-Bit-LRe2.js";
3
3
  export {
4
4
  e as Checkbox,
5
5
  C as CheckboxGroup
@@ -1,7 +1,7 @@
1
1
  import { jsx as o, jsxs as h } from "react/jsx-runtime";
2
2
  import { useCheckboxGroup as C } from "react-aria";
3
3
  import { useCheckboxGroupState as v } from "react-stately";
4
- import { a as k, L as S } from "./Label-Bhnpbs10.js";
4
+ import { a as k, L as S } from "./Label-DqTDExC-.js";
5
5
  import { T as y } from "./Text-D0r_W4lH.js";
6
6
  import * as r from "react";
7
7
  import { C as d, s as u, a as g } from "./Checkbox-sAkQe7Q9.js";
@@ -3,7 +3,7 @@ import { jsxs as c, jsx as o } from "react/jsx-runtime";
3
3
  import L from "react";
4
4
  import { ComboBox as F, Input as w, Button as R } from "react-aria-components";
5
5
  import { c as s } from "./clsx-AexbMWKp.js";
6
- import { a as y, L as B } from "./Label-Bhnpbs10.js";
6
+ import { a as y, L as B } from "./Label-DqTDExC-.js";
7
7
  import { T as C } from "./Text-D0r_W4lH.js";
8
8
  import { F as u } from "./FieldError-krpMBtie.js";
9
9
  import { L as N } from "./ListBox-CDlOUvzJ.js";
@@ -4,7 +4,7 @@ import { DateField as h, DateFieldStateContext as D } from "react-aria-component
4
4
  import { c as d } from "./clsx-AexbMWKp.js";
5
5
  import { D as g, b as B } from "./DateInputDivider-DwopMIb9.js";
6
6
  import { F } from "./FieldError-krpMBtie.js";
7
- import { a as C, L as b } from "./Label-Bhnpbs10.js";
7
+ import { a as C, L as b } from "./Label-DqTDExC-.js";
8
8
  import { T as L } from "./Text-D0r_W4lH.js";
9
9
  import { C as S } from "./ClearButton-DBr9Zfwq.js";
10
10
  import { FocusScope as v, useFocusManager as N } from "@react-aria/focus";
@@ -5,7 +5,7 @@ import { a as k } from "./clsx-AexbMWKp.js";
5
5
  import { C as I, R as O } from "./RangeCalendar-LheFd9WF.js";
6
6
  import { D as P, b as _, a as V } from "./DateInputDivider-DwopMIb9.js";
7
7
  import { F as g } from "./FieldError-krpMBtie.js";
8
- import { a as y, L as v } from "./Label-Bhnpbs10.js";
8
+ import { a as y, L as v } from "./Label-DqTDExC-.js";
9
9
  import { T as D } from "./Text-D0r_W4lH.js";
10
10
  import * as f from "react";
11
11
  import { C as j } from "./ClearButton-DBr9Zfwq.js";
@@ -0,0 +1,66 @@
1
+ import { jsxs as n, jsx as r } from "react/jsx-runtime";
2
+ import * as b from "react";
3
+ import i, { useContext as f } from "react";
4
+ import { c as v } from "./clsx-AexbMWKp.js";
5
+ import { DialogTrigger as d, Label as g } from "react-aria-components";
6
+ import { P as u } from "./Popover-6cnHxDEK.js";
7
+ import { B as P } from "./Button-BhIvfqOc.js";
8
+ import { I as _ } from "./info-N5jWZg2A.js";
9
+ import { u as x } from "./useLocalizedStringFormatter-BHvsRxDk.js";
10
+ import '../assets/Label.css';const I = "_labelBase_f5wtf_1", L = {
11
+ labelBase: I
12
+ }, T = "_labelPopover_1iatl_1", B = "_labelPopoverTrigger_1iatl_7", c = {
13
+ labelPopover: T,
14
+ labelPopoverTrigger: B
15
+ }, y = { moreInfo: "More info" }, C = { moreInfo: "Mer information" }, E = {
16
+ en: y,
17
+ sv: C
18
+ }, N = ({
19
+ children: e,
20
+ "aria-label": o
21
+ }) => {
22
+ const a = f(s), t = x(E);
23
+ return /* @__PURE__ */ n(d, { children: [
24
+ /* @__PURE__ */ r(
25
+ P,
26
+ {
27
+ variant: "icon",
28
+ size: "medium",
29
+ className: c.labelPopoverTrigger,
30
+ "aria-label": o || t.format("moreInfo"),
31
+ id: a?.popoverId,
32
+ children: /* @__PURE__ */ r(_, { size: 20 })
33
+ }
34
+ ),
35
+ /* @__PURE__ */ r(u, { children: e })
36
+ ] });
37
+ }, s = i.createContext(void 0), $ = ({ children: e, popover: o }) => {
38
+ const a = i.useId();
39
+ return o ? /* @__PURE__ */ r(s.Provider, { value: { popoverId: a }, children: /* @__PURE__ */ n("div", { className: c.labelPopover, children: [
40
+ e,
41
+ /* @__PURE__ */ r(N, { ...o })
42
+ ] }) }) : e;
43
+ }, l = "label", w = ({
44
+ children: e,
45
+ className: o,
46
+ elementType: a = l,
47
+ ...t
48
+ }) => {
49
+ const m = {
50
+ className: v(L.labelBase, o),
51
+ elementType: a || l,
52
+ ...t
53
+ }, p = b.useContext(s);
54
+ return /* @__PURE__ */ r(
55
+ g,
56
+ {
57
+ ...m,
58
+ "aria-describedby": p?.popoverId,
59
+ children: e
60
+ }
61
+ );
62
+ };
63
+ export {
64
+ w as L,
65
+ $ as a
66
+ };
@@ -0,0 +1,34 @@
1
+ import { jsx as r, jsxs as d, Fragment as l } from "react/jsx-runtime";
2
+ import { forwardRef as f } from "react";
3
+ import { useContextProps as v, PopoverContext as h, Popover as w, composeRenderProps as x, OverlayArrow as P } from "react-aria-components";
4
+ import { c as _ } from "./clsx-AexbMWKp.js";
5
+ import '../assets/Popover.css';const g = "_popover_1sqxu_1", u = "_arrow_1sqxu_23", e = {
6
+ popover: g,
7
+ arrow: u
8
+ }, y = f((s, t) => {
9
+ const [o, p] = v(s, t, h), { className: a, hideArrow: c = !1, offset: n = 4, ...m } = o;
10
+ return /* @__PURE__ */ r(
11
+ w,
12
+ {
13
+ className: _(e.popover, a),
14
+ offset: n,
15
+ ref: p,
16
+ ...m,
17
+ children: x(o.children, (i) => /* @__PURE__ */ d(l, { children: [
18
+ !c && /* @__PURE__ */ r(P, { className: e.arrow, children: /* @__PURE__ */ r(
19
+ "svg",
20
+ {
21
+ height: 16,
22
+ viewBox: "0 0 16 16",
23
+ width: 16,
24
+ children: /* @__PURE__ */ r("path", { d: "M0 0 L8 8 L16 0" })
25
+ }
26
+ ) }),
27
+ i
28
+ ] }))
29
+ }
30
+ );
31
+ });
32
+ export {
33
+ y as P
34
+ };
@@ -1,6 +1,6 @@
1
1
  import { jsx as s, jsxs as d, Fragment as _ } from "react/jsx-runtime";
2
2
  import { ProgressBar as f } from "react-aria-components";
3
- import { L as t } from "./Label-Bhnpbs10.js";
3
+ import { L as t } from "./Label-DqTDExC-.js";
4
4
  import { c as l } from "./clsx-AexbMWKp.js";
5
5
  import '../assets/ProgressBar.css';const N = "_progressBar_1a2ad_1", g = "_label_1a2ad_9", p = "_value_1a2ad_14", v = "_bar_1a2ad_19", h = "_fill_1a2ad_29", e = {
6
6
  progressBar: N,
@@ -2,7 +2,7 @@
2
2
  import { jsx as r, jsxs as n } from "react/jsx-runtime";
3
3
  import { Radio as u, RadioGroup as _, Group as f } from "react-aria-components";
4
4
  import { c as p } from "./clsx-AexbMWKp.js";
5
- import { a as G, L as R } from "./Label-Bhnpbs10.js";
5
+ import { a as G, L as R } from "./Label-DqTDExC-.js";
6
6
  import { T as h } from "./Text-D0r_W4lH.js";
7
7
  import { F as t } from "./FieldError-krpMBtie.js";
8
8
  import '../assets/Radio.css';const x = "_radioGroup_1ls9z_1", w = "_wrap_1ls9z_12", z = "_radio_1ls9z_1", s = {
@@ -1,7 +1,7 @@
1
1
  import { jsx as e, Fragment as C, jsxs as i } from "react/jsx-runtime";
2
2
  import { SelectStateContext as d, SelectValue as f, Button as p, TagList as N, Select as x } from "react-aria-components";
3
3
  import { FocusScope as b } from "@react-aria/focus";
4
- import { a as T, L as y } from "./Label-Bhnpbs10.js";
4
+ import { a as T, L as y } from "./Label-DqTDExC-.js";
5
5
  import { a as B, c as g } from "./clsx-AexbMWKp.js";
6
6
  import { T as M } from "./Text-D0r_W4lH.js";
7
7
  import { F as _ } from "./FieldError-krpMBtie.js";
@@ -11,7 +11,7 @@ import { u as m } from "./useLocalizedStringFormatter-BHvsRxDk.js";
11
11
  import { useFocusManager as L } from "react-aria";
12
12
  import { X as I } from "./x-B9bYxG31.js";
13
13
  import { L as G } from "./ListBox-CDlOUvzJ.js";
14
- import { P as j } from "./Popover-CaP4LFhg.js";
14
+ import { P as j } from "./Popover-6cnHxDEK.js";
15
15
  import { a as k, T as R } from "./TagGroup-CntiwvfQ.js";
16
16
  import { C as $ } from "./chevron-down-BBFYYzZq.js";
17
17
  import '../assets/Select.css';const w = { clearAll: "Clear all", selectAll: "Select all", selectedItems: "Selected items", selected: "selected" }, z = { clearAll: "Rensa alla", selectAll: "Välj alla", selectedItems: "Valda objekt", selected: "valda" }, u = {
@@ -9,7 +9,7 @@ import { u as B } from "./useLocalizedStringFormatter-BHvsRxDk.js";
9
9
  import { T as L } from "./Text-D0r_W4lH.js";
10
10
  import { F as f } from "./FieldError-krpMBtie.js";
11
11
  import { C as S } from "./CharacterCounter-Dgnv-orm.js";
12
- import { a as v, L as E } from "./Label-Bhnpbs10.js";
12
+ import { a as v, L as E } from "./Label-DqTDExC-.js";
13
13
  const x = c(
14
14
  (e, o) => {
15
15
  [e] = u(e, o, y);
package/combobox/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { C as r } from "../chunks/ComboBox-I4tZIYpb.js";
1
+ import { C as r } from "../chunks/ComboBox-uD5DREps.js";
2
2
  export {
3
3
  r as ComboBox
4
4
  };
@@ -1,4 +1,4 @@
1
- import { D as t } from "../chunks/DateField-cAJ_r2cj.js";
1
+ import { D as t } from "../chunks/DateField-D3HP1eyS.js";
2
2
  import { D as r, a as o, b as p } from "../chunks/DateInputDivider-DwopMIb9.js";
3
3
  export {
4
4
  t as DateField,
@@ -1,4 +1,4 @@
1
- import { D as r, a as t } from "../chunks/DateRangePicker-BGoKQCZf.js";
1
+ import { D as r, a as t } from "../chunks/DateRangePicker-wBbSTH-B.js";
2
2
  export {
3
3
  r as DatePicker,
4
4
  t as DateRangePicker
package/index.js CHANGED
@@ -8,36 +8,36 @@ import { C, R as L } from "./chunks/RangeCalendar-LheFd9WF.js";
8
8
  import { C as b, a as S, b as D, c as I, d as R, e as G, f as P } from "./chunks/Card-CVwiT9zm.js";
9
9
  import { C as v } from "./chunks/CharacterCounter-Dgnv-orm.js";
10
10
  import { C as M } from "./chunks/Checkbox-sAkQe7Q9.js";
11
- import { C as h } from "./chunks/CheckboxGroup-C5JLzeJv.js";
11
+ import { C as h } from "./chunks/CheckboxGroup-Bit-LRe2.js";
12
12
  import { C as y } from "./chunks/ColorSchemeSwitch-D52V0sr3.js";
13
- import { C as N } from "./chunks/ComboBox-I4tZIYpb.js";
14
- import { D as z } from "./chunks/DateField-cAJ_r2cj.js";
13
+ import { C as N } from "./chunks/ComboBox-uD5DREps.js";
14
+ import { D as z } from "./chunks/DateField-D3HP1eyS.js";
15
15
  import { D as Q, a as V, b as Z } from "./chunks/DateInputDivider-DwopMIb9.js";
16
- import { D as q, a as J } from "./chunks/DateRangePicker-BGoKQCZf.js";
16
+ import { D as q, a as J } from "./chunks/DateRangePicker-wBbSTH-B.js";
17
17
  import { F as U } from "./chunks/FieldError-krpMBtie.js";
18
18
  import { D as X, F as Y } from "./chunks/FileUpload-Cu8DCSjX.js";
19
19
  import { G as $ } from "./chunks/Grid-CettmpaZ.js";
20
20
  import { G as ao } from "./chunks/GridItem-z7zclNdT.js";
21
21
  import { H as eo } from "./chunks/Heading-nfcRc2QF.js";
22
22
  import { I as so } from "./chunks/InfoBanner-D_pwTOHH.js";
23
- import { L as xo } from "./chunks/Label-Bhnpbs10.js";
23
+ import { L as xo } from "./chunks/Label-DqTDExC-.js";
24
24
  import { H as io, L as no, N as fo, S as To, a as co } from "./chunks/Layout-SqGyudO8.js";
25
25
  import { L as lo } from "./chunks/Link-rqGQvFQq.js";
26
26
  import { L as Co } from "./chunks/LinkButton-DJ-D5PkB.js";
27
27
  import { L as Bo, a as bo } from "./chunks/Logo-DDykn5b2.js";
28
28
  import { M as Do } from "./chunks/Dialog-DVff9MDd.js";
29
- import { P as Ro } from "./chunks/Popover-CaP4LFhg.js";
30
- import { P as Po } from "./chunks/ProgressBar-BGBPAJCv.js";
31
- import { R as vo, a as Fo } from "./chunks/Radio-DebU3D38.js";
29
+ import { P as Ro } from "./chunks/Popover-6cnHxDEK.js";
30
+ import { P as Po } from "./chunks/ProgressBar-DuHPYIDe.js";
31
+ import { R as vo, a as Fo } from "./chunks/Radio-DEBKK7v9.js";
32
32
  import { S as Ao } from "./chunks/SearchField-1DYv0w4b.js";
33
- import { S as Ho } from "./chunks/Select-YGQv4Oxx.js";
33
+ import { S as Ho } from "./chunks/Select-Dt_shvH_.js";
34
34
  import { S as Eo } from "./chunks/Skeleton-D6mxKxuu.js";
35
35
  import { S as wo } from "./chunks/Spinner-CfKMn18u.js";
36
36
  import { C as Oo, a as Qo, R as Vo, T as Zo, b as jo, c as qo } from "./chunks/Table-Bg-AKi7d.js";
37
37
  import { T as Ko, a as Uo, b as Wo, c as Xo } from "./chunks/TabList-CJSnr6O0.js";
38
38
  import { T as _o, a as $o, b as oa } from "./chunks/TagGroup-CntiwvfQ.js";
39
39
  import { T as ra } from "./chunks/Text-D0r_W4lH.js";
40
- import { I as ta, T as sa, a as pa, b as xa } from "./chunks/TextArea-BL0NbUHd.js";
40
+ import { I as ta, T as sa, a as pa, b as xa } from "./chunks/TextArea-CDnC5fhC.js";
41
41
  import { G as ia, T as na, a as fa, b as da, t as Ta } from "./chunks/Toast-Cxm230CK.js";
42
42
  import { T as ga, a as la } from "./chunks/ToggleButtonGroup-Bv9xpwTT.js";
43
43
  import { T as Ca, a as La } from "./chunks/Tooltip-C1bbgr2l.js";
@@ -49,7 +49,7 @@ import { c as wa } from "./chunks/clsx-AexbMWKp.js";
49
49
  import { DialogTrigger as Oa, MenuTrigger as Qa, RouterProvider as Va } from "react-aria-components";
50
50
  import { u as ja } from "./chunks/useLocalizedStringFormatter-BHvsRxDk.js";
51
51
  import { useToastState as Ja } from "react-stately";
52
- const o = "17.7.3", a = {
52
+ const o = "17.7.5", a = {
53
53
  version: o
54
54
  }, r = a.version;
55
55
  export {
@@ -1,9 +1,9 @@
1
- import { default as React } from 'react';
1
+ import { ReactNode } from 'react';
2
2
  /** Display an info-icon with popover next to the label to further explain what the user should enter in the field */
3
3
  export interface InfoPopoverProps {
4
4
  /** An assistive text that helps the user understand the field better. Will be hidden in a popover with an info icon button. */
5
- children: React.ReactNode;
5
+ children: ReactNode;
6
6
  /** An aria-label for the info icon button trigger */
7
7
  'aria-label'?: string;
8
8
  }
9
- export declare const InfoPopover: React.FC<InfoPopoverProps>;
9
+ export declare const InfoPopover: ({ children, "aria-label": ariaLabel, }: InfoPopoverProps) => import("react/jsx-runtime").JSX.Element;
package/label/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { L as o } from "../chunks/Label-Bhnpbs10.js";
1
+ import { L as o } from "../chunks/Label-DqTDExC-.js";
2
2
  export {
3
3
  o as Label
4
4
  };
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": "17.7.3",
17
+ "version": "17.7.5",
18
18
  "module": "./index.js",
19
19
  "type": "module",
20
20
  "main": "./index.js",
@@ -41,7 +41,7 @@
41
41
  "./*": "./*/index.js"
42
42
  },
43
43
  "dependencies": {
44
- "@midas-ds/theme": "3.12.8",
45
- "react-aria-components": "1.14.0"
44
+ "@midas-ds/theme": "3.12.10",
45
+ "react-aria-components": "1.16.0"
46
46
  }
47
47
  }
@@ -1,7 +1,9 @@
1
- import { PopoverProps } from 'react-aria-components';
2
- import * as React from 'react';
3
- export interface MidasPopoverProps extends Omit<PopoverProps, 'children'> {
4
- children: React.ReactNode;
1
+ import { PopoverProps as AriaPopoverProps } from 'react-aria-components';
2
+ export interface PopoverProps extends AriaPopoverProps {
5
3
  hideArrow?: boolean;
6
4
  }
7
- export declare function Popover({ children, className, offset, hideArrow, ...props }: MidasPopoverProps): import("react/jsx-runtime").JSX.Element;
5
+ /**
6
+ * @deprecated since v17.0.0 please use `PopoverProps` instead
7
+ */
8
+ export type MidasPopoverProps = PopoverProps;
9
+ export declare const Popover: import('react').ForwardRefExoticComponent<PopoverProps & import('react').RefAttributes<HTMLElement>>;
@@ -3,7 +3,7 @@ import { Popover } from './Popover';
3
3
  import { DialogTrigger } from 'react-aria-components';
4
4
  type Story = StoryObj<typeof Popover>;
5
5
  declare const _default: {
6
- component: typeof Popover;
6
+ component: import('react').ForwardRefExoticComponent<import('./Popover').PopoverProps & import('react').RefAttributes<HTMLElement>>;
7
7
  subcomponents: {
8
8
  DialogTrigger: typeof DialogTrigger;
9
9
  };
package/popover/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { P as e } from "../chunks/Popover-CaP4LFhg.js";
1
+ import { P as e } from "../chunks/Popover-6cnHxDEK.js";
2
2
  export {
3
3
  e as Popover
4
4
  };
@@ -1,4 +1,4 @@
1
- import { P as s } from "../chunks/ProgressBar-BGBPAJCv.js";
1
+ import { P as s } from "../chunks/ProgressBar-DuHPYIDe.js";
2
2
  export {
3
3
  s as ProgressBar
4
4
  };
package/radio/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { R as r, a as R } from "../chunks/Radio-DebU3D38.js";
1
+ import { R as r, a as R } from "../chunks/Radio-DEBKK7v9.js";
2
2
  export {
3
3
  r as Radio,
4
4
  R as RadioGroup
package/select/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { S as r } from "../chunks/Select-YGQv4Oxx.js";
1
+ import { S as r } from "../chunks/Select-Dt_shvH_.js";
2
2
  export {
3
3
  r as Select
4
4
  };
@@ -31,6 +31,7 @@ export declare const Disabled: {
31
31
  style?: (import('react').CSSProperties | ((values: import('react-aria-components').TextFieldRenderProps & {
32
32
  defaultStyle: import('react').CSSProperties;
33
33
  }) => import('react').CSSProperties | undefined)) | undefined;
34
+ render?: ((props: import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, renderProps: import('react-aria-components').TextFieldRenderProps) => import('react').ReactElement) | undefined;
34
35
  id?: string;
35
36
  dir?: string | undefined;
36
37
  lang?: string | undefined;
@@ -1,4 +1,4 @@
1
- import { I as s, T as t, a as x, b as T } from "../chunks/TextArea-BL0NbUHd.js";
1
+ import { I as s, T as t, a as x, b as T } from "../chunks/TextArea-CDnC5fhC.js";
2
2
  export {
3
3
  s as Input,
4
4
  t as TextArea,
@@ -1,74 +0,0 @@
1
- import { jsxs as m, jsx as r } from "react/jsx-runtime";
2
- import * as b from "react";
3
- import s from "react";
4
- import { c as v } from "./clsx-AexbMWKp.js";
5
- import { DialogTrigger as g, Label as d } from "react-aria-components";
6
- import { P as u } from "./Popover-CaP4LFhg.js";
7
- import { B as P } from "./Button-BhIvfqOc.js";
8
- import { I as _ } from "./info-N5jWZg2A.js";
9
- import { u as I } from "./useLocalizedStringFormatter-BHvsRxDk.js";
10
- import '../assets/Label.css';const x = "_labelBase_f5wtf_1", L = {
11
- labelBase: x
12
- }, T = "_labelPopover_1iatl_1", B = "_labelPopoverTrigger_1iatl_7", f = {
13
- labelPopover: T,
14
- labelPopoverTrigger: B
15
- }, C = { moreInfo: "More info" }, h = { moreInfo: "Mer information" }, y = {
16
- en: C,
17
- sv: h
18
- }, E = ({
19
- children: e,
20
- "aria-label": o
21
- }) => {
22
- const [a, t] = s.useState(!1), l = s.useContext(i), n = I(y), c = s.useRef(null);
23
- return /* @__PURE__ */ m(
24
- g,
25
- {
26
- isOpen: a,
27
- onOpenChange: t,
28
- children: [
29
- /* @__PURE__ */ r(
30
- P,
31
- {
32
- ref: c,
33
- variant: "icon",
34
- size: "medium",
35
- className: f.labelPopoverTrigger,
36
- "aria-label": o || n.format("moreInfo"),
37
- id: l?.popoverId,
38
- children: /* @__PURE__ */ r(_, { size: 20 })
39
- }
40
- ),
41
- /* @__PURE__ */ r(u, { triggerRef: c, children: e })
42
- ]
43
- }
44
- );
45
- }, i = s.createContext(void 0), S = ({ children: e, popover: o }) => {
46
- const a = s.useId();
47
- return o ? /* @__PURE__ */ r(i.Provider, { value: { popoverId: a }, children: /* @__PURE__ */ m("div", { className: f.labelPopover, children: [
48
- e,
49
- /* @__PURE__ */ r(E, { ...o })
50
- ] }) }) : e;
51
- }, p = "label", W = ({
52
- children: e,
53
- className: o,
54
- elementType: a = p,
55
- ...t
56
- }) => {
57
- const l = {
58
- className: v(L.labelBase, o),
59
- elementType: a || p,
60
- ...t
61
- }, n = b.useContext(i);
62
- return /* @__PURE__ */ r(
63
- d,
64
- {
65
- ...l,
66
- "aria-describedby": n?.popoverId,
67
- children: e
68
- }
69
- );
70
- };
71
- export {
72
- W as L,
73
- S as a
74
- };
@@ -1,38 +0,0 @@
1
- import { jsxs as c, jsx as o } from "react/jsx-runtime";
2
- import { c as i } from "./clsx-AexbMWKp.js";
3
- import { Popover as v, OverlayArrow as l } from "react-aria-components";
4
- import '../assets/Popover.css';const n = "_popover_1sqxu_1", m = "_arrow_1sqxu_23", r = {
5
- popover: n,
6
- arrow: m
7
- };
8
- function _({
9
- children: s,
10
- className: e,
11
- offset: p = 4,
12
- hideArrow: a = !1,
13
- ...t
14
- }) {
15
- return /* @__PURE__ */ c(
16
- v,
17
- {
18
- ...t,
19
- offset: p,
20
- className: i(r.popover, e),
21
- children: [
22
- !a && /* @__PURE__ */ o(l, { className: r.arrow, children: /* @__PURE__ */ o(
23
- "svg",
24
- {
25
- width: 16,
26
- height: 16,
27
- viewBox: "0 0 16 16",
28
- children: /* @__PURE__ */ o("path", { d: "M0 0 L8 8 L16 0" })
29
- }
30
- ) }),
31
- s
32
- ]
33
- }
34
- );
35
- }
36
- export {
37
- _ as P
38
- };