@midas-ds/components 17.29.0 → 17.30.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (171) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/accordion/index.js +1 -1
  3. package/badge/index.js +1 -1
  4. package/breadcrumbs/index.js +1 -1
  5. package/button/index.js +1 -1
  6. package/calendar/index.js +1 -1
  7. package/card/index.js +1 -1
  8. package/checkbox/index.js +1 -1
  9. package/chunks/FeedbackStatusIcon-DvMDGBGL.js +36 -0
  10. package/chunks/{accordion-DIVTJU3O.js → accordion-DlVM6IKH.js} +24 -24
  11. package/chunks/{badge-BfK6XrlL.js → badge-C4bXJmhn.js} +1 -1
  12. package/chunks/{breadcrumbs-DV0ZJc62.js → breadcrumbs-BGnyY3bO.js} +1 -1
  13. package/chunks/{button-CenXTGXL.js → button-dpe6hXmI.js} +2 -2
  14. package/chunks/calendar-BnT8aqrk.js +108 -0
  15. package/chunks/card-C0S9Kyi2.js +103 -0
  16. package/chunks/checkbox-B1RWLsu9.js +106 -0
  17. package/chunks/clear-button-DWtOkhCH.js +17 -0
  18. package/chunks/clsx-DAqHMl_k.js +7 -0
  19. package/chunks/color-scheme-switch-DVyIszaD.js +160 -0
  20. package/chunks/{combobox-DIou4Z-d.js → combobox-BLAVO2ax.js} +25 -25
  21. package/chunks/{date-field-BF2f9bSf.js → date-field-D5QLfSD_.js} +5 -5
  22. package/chunks/date-picker-BWSHiwIN.js +142 -0
  23. package/chunks/{drop-zone-DH3ZyHsr.js → drop-zone-DNhEbH4w.js} +1 -1
  24. package/chunks/{field-error-LtNtEKDp.js → field-error-BHoPnRe4.js} +2 -2
  25. package/chunks/file-list-Ntos8dkG.js +139 -0
  26. package/chunks/{grid-Cn_8RSvj.js → grid-BR68fpvW.js} +1 -1
  27. package/chunks/{heading-BEl_z-5T.js → heading-DcOjYrUM.js} +1 -1
  28. package/chunks/{info-banner-osR4e6nB.js → info-banner-DXjPEG69.js} +15 -15
  29. package/chunks/label-pGlER0ro.js +50 -0
  30. package/chunks/layout-Bue2Lkbc.js +378 -0
  31. package/chunks/link-B76JDA2N.js +44 -0
  32. package/chunks/link-button-BeXxC22w.js +44 -0
  33. package/chunks/{list-box-BN_MSiOD.js → list-box-BzBJX0nP.js} +3 -3
  34. package/chunks/{logo-DyZ2pXt7.js → logo-DSJ1bUJZ.js} +1 -1
  35. package/chunks/menu-DbQ98noD.js +48 -0
  36. package/chunks/modal-C8rs1jfL.js +66 -0
  37. package/chunks/{popover-DGcogqbS.js → popover-B82BcP5n.js} +1 -1
  38. package/chunks/{progress-bar-CknF4qAm.js → progress-bar-S6GNHQRZ.js} +2 -2
  39. package/chunks/{radio-BD1EuxSa.js → radio-uAtTm38S.js} +4 -4
  40. package/chunks/search-field-Bx3JApAJ.js +91 -0
  41. package/chunks/select-CuKVJ1x9.js +177 -0
  42. package/chunks/{skeleton-B_BPRPJy.js → skeleton-R_3dS7Ro.js} +1 -1
  43. package/chunks/spinner-CIjfJeGm.js +29 -0
  44. package/chunks/{stack-LF3ExhH9.js → stack-BAHKom_Q.js} +1 -1
  45. package/chunks/table-DDTeIVh8.js +84 -0
  46. package/chunks/{tabs-Co09VWvC.js → tabs-owuRVJ3N.js} +1 -1
  47. package/chunks/tag-BEawJnJm.js +78 -0
  48. package/chunks/{text-DwmZ-ew8.js → text-DnvD4Cjc.js} +1 -1
  49. package/chunks/textfield-G6u6RJD5.js +113 -0
  50. package/chunks/{time-field-CmjGBQph.js → time-field-Mm1iDLzS.js} +6 -6
  51. package/chunks/{toast-gJgjitZF.js → toast-DZuvVRD_.js} +21 -21
  52. package/chunks/{toggle-button-CIvsOXQf.js → toggle-button-DD_bXanH.js} +1 -1
  53. package/chunks/{tooltip-BkesIUIF.js → tooltip-1GBTeMrm.js} +1 -1
  54. package/clear-button/index.js +1 -1
  55. package/color-scheme-switch/index.js +1 -1
  56. package/combobox/index.js +1 -1
  57. package/date-field/index.js +1 -1
  58. package/date-picker/index.js +1 -1
  59. package/drop-zone/index.js +1 -1
  60. package/field-error/index.js +1 -1
  61. package/file-list/index.js +1 -1
  62. package/grid/index.js +1 -1
  63. package/heading/index.js +1 -1
  64. package/index.js +52 -50
  65. package/info-banner/index.js +1 -1
  66. package/label/index.js +1 -1
  67. package/layout/Layout.d.ts +1 -2
  68. package/layout/context/LayoutContext.d.ts +7 -1
  69. package/layout/index.js +1 -1
  70. package/link/index.js +1 -1
  71. package/link-button/index.js +1 -1
  72. package/list-box/index.js +1 -1
  73. package/logo/index.js +1 -1
  74. package/menu/index.js +1 -1
  75. package/modal/index.js +1 -1
  76. package/package.json +4 -2
  77. package/popover/index.js +1 -1
  78. package/progress-bar/index.js +1 -1
  79. package/radio/index.js +1 -1
  80. package/search-field/index.js +1 -1
  81. package/select/index.js +1 -1
  82. package/skeleton/index.js +1 -1
  83. package/spinner/index.js +1 -1
  84. package/stack/index.js +1 -1
  85. package/table/index.js +1 -1
  86. package/tabs/index.js +1 -1
  87. package/tag/index.js +1 -1
  88. package/text/index.js +1 -1
  89. package/textfield/index.js +1 -1
  90. package/time-field/index.js +1 -1
  91. package/toast/index.js +1 -1
  92. package/toggle-button/index.js +1 -1
  93. package/tooltip/index.js +1 -1
  94. package/accordion/Accordion.stories.d.ts +0 -23
  95. package/accordion/AccordionItem.stories.d.ts +0 -25
  96. package/badge/Badge.stories.d.ts +0 -17
  97. package/breadcrumbs/Breadcrumbs.stories.d.ts +0 -25
  98. package/button/Button.stories.d.ts +0 -25
  99. package/button/ButtonGroup.stories.d.ts +0 -15
  100. package/calendar/Calendar.stories.d.ts +0 -17
  101. package/calendar/RangeCalendar.stories.d.ts +0 -15
  102. package/card/Card.stories.d.ts +0 -19
  103. package/checkbox/Checkbox.stories.d.ts +0 -30
  104. package/checkbox/CheckboxGroup.stories.d.ts +0 -31
  105. package/chunks/FeedbackStatusIcon-DRI7WrSU.js +0 -54
  106. package/chunks/arrow-right-Db_H9KjE.js +0 -10
  107. package/chunks/calendar-Bl_obez5.js +0 -111
  108. package/chunks/card-zIYA-SQh.js +0 -103
  109. package/chunks/check-DV00NPU0.js +0 -7
  110. package/chunks/checkbox-Bqd8B58G.js +0 -110
  111. package/chunks/chevron-down-CP7nEDei.js +0 -7
  112. package/chunks/chevron-right-DwqboCdU.js +0 -7
  113. package/chunks/clear-button-D3I1X3yG.js +0 -17
  114. package/chunks/clsx-Di52oYUU.js +0 -23
  115. package/chunks/color-scheme-switch-DVZjdwc9.js +0 -203
  116. package/chunks/createLucideIcon-BgluSHFG.js +0 -39
  117. package/chunks/date-picker-DZivTUB_.js +0 -187
  118. package/chunks/file-list-B4vG_egr.js +0 -161
  119. package/chunks/info-jCyacVsy.js +0 -19
  120. package/chunks/label-LWlgvAwz.js +0 -50
  121. package/chunks/layout-Db5um0f7.js +0 -426
  122. package/chunks/link-BAgs4RwY.js +0 -59
  123. package/chunks/link-button-BuPMEGUj.js +0 -52
  124. package/chunks/menu-aT2IR0tO.js +0 -49
  125. package/chunks/modal-C-UsxdO0.js +0 -66
  126. package/chunks/search-field-GNTRFpzf.js +0 -100
  127. package/chunks/select-oLCNpryY.js +0 -177
  128. package/chunks/spinner-LdHPVms_.js +0 -32
  129. package/chunks/square-arrow-out-up-right-DkgXD7hj.js +0 -17
  130. package/chunks/table-CmNWoAYO.js +0 -150
  131. package/chunks/tag-BIcqtf7b.js +0 -78
  132. package/chunks/textfield-BSvCsAyC.js +0 -112
  133. package/chunks/x-BJAOO5a5.js +0 -10
  134. package/color-scheme-switch/ColorSchemeSwitch.stories.d.ts +0 -7
  135. package/color-scheme-switch/ColorSchemeSwitchMenu.stories.d.ts +0 -8
  136. package/combobox/ComboBox.stories.d.ts +0 -43
  137. package/date-field/DateField.stories.d.ts +0 -15
  138. package/date-picker/DatePicker.stories.d.ts +0 -17
  139. package/date-picker/DateRangePicker.stories.d.ts +0 -39
  140. package/drop-zone/DropZone.stories.d.ts +0 -16
  141. package/file-list/FileList.stories.d.ts +0 -31
  142. package/grid/Grid.stories.d.ts +0 -28
  143. package/heading/Heading.stories.d.ts +0 -30
  144. package/info-banner/InfoBanner.stories.d.ts +0 -16
  145. package/label/Label.stories.d.ts +0 -10
  146. package/layout/Layout.stories.d.ts +0 -9
  147. package/link/Link.stories.d.ts +0 -14
  148. package/link-button/LinkButton.stories.d.ts +0 -13
  149. package/list-box/ListBox.stories.d.ts +0 -24
  150. package/logo/Logo.stories.d.ts +0 -7
  151. package/menu/Menu.stories.d.ts +0 -35
  152. package/modal/Modal.stories.d.ts +0 -15
  153. package/popover/Popover.stories.d.ts +0 -18
  154. package/progress-bar/ProgressBar.stories.d.ts +0 -18
  155. package/radio/Radio.stories.d.ts +0 -110
  156. package/radio/RadioGroup.stories.d.ts +0 -27
  157. package/search-field/SearchField.stories.d.ts +0 -34
  158. package/select/Select.stories.d.ts +0 -53
  159. package/skeleton/Skeleton.Form.stories.d.ts +0 -20
  160. package/skeleton/Skeleton.stories.d.ts +0 -10
  161. package/spinner/Spinner.stories.d.ts +0 -20
  162. package/stack/Stack.stories.d.ts +0 -24
  163. package/table/Table.stories.d.ts +0 -39
  164. package/tabs/Tabs.stories.d.ts +0 -31
  165. package/tag/Tag.stories.d.ts +0 -17
  166. package/text/Text.stories.d.ts +0 -10
  167. package/textfield/TextArea.stories.d.ts +0 -365
  168. package/textfield/TextField.stories.d.ts +0 -39
  169. package/time-field/TimeField.stories.d.ts +0 -37
  170. package/toast/Toast.stories.d.ts +0 -24
  171. package/tooltip/Tooltip.stories.d.ts +0 -26
@@ -1,15 +0,0 @@
1
- import { StoryObj } from '@storybook/react-vite';
2
- import { ButtonGroup } from './ButtonGroup';
3
- type Story = StoryObj<typeof ButtonGroup>;
4
- declare const _default: {
5
- component: import('react').FC<import('react').HTMLAttributes<HTMLDivElement>>;
6
- title: string;
7
- tags: string[];
8
- parameters: {
9
- layout: string;
10
- };
11
- args: {};
12
- argTypes: {};
13
- };
14
- export default _default;
15
- export declare const Primary: Story;
@@ -1,17 +0,0 @@
1
- import { StoryObj } from '@storybook/react-vite';
2
- import { Calendar } from './Calendar';
3
- type Story = StoryObj<typeof Calendar<'single'>>;
4
- declare const _default: {
5
- component: <M extends import('react-stately/useCalendarState').CalendarSelectionMode = "single">({ className, errorMessage, showMonthYearPicker, ...rest }: import('./Calendar').CalendarProps<M>) => import('react').JSX.Element;
6
- render: (args: import('./Calendar').CalendarProps<"single">) => import('react').JSX.Element;
7
- title: string;
8
- tags: string[];
9
- };
10
- export default _default;
11
- export declare const Primary: Story;
12
- export declare const Disabled: Story;
13
- export declare const ReadOnly: Story;
14
- export declare const Invalid: Story;
15
- export declare const UnavailableWeekends: Story;
16
- export declare const WithMonthYearPicker: Story;
17
- export declare const MultiSelect: StoryObj<typeof Calendar<'multiple'>>;
@@ -1,15 +0,0 @@
1
- import { StoryObj } from '@storybook/react-vite';
2
- import { RangeCalendar } from './RangeCalendar';
3
- type Story = StoryObj<typeof RangeCalendar>;
4
- declare const _default: {
5
- component: ({ className, errorMessage, showMonthYearPicker, commitBehavior, ...rest }: import('./RangeCalendar').RangeCalendarProps) => import('react').JSX.Element;
6
- title: string;
7
- tags: string[];
8
- };
9
- export default _default;
10
- export declare const Primary: Story;
11
- export declare const SelectedDates: Story;
12
- export declare const Disabled: Story;
13
- export declare const ReadOnly: Story;
14
- export declare const WithMonthYearPicker: Story;
15
- export declare const MaxRangeDuration: Story;
@@ -1,19 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react-vite';
2
- import { Card } from './Card';
3
- declare const meta: Meta<typeof Card>;
4
- export default meta;
5
- type Story = StoryObj<typeof Card>;
6
- export declare const Example: Story;
7
- export declare const WithHeaderAndBody: Story;
8
- export declare const WithHeaderImageAndBody: Story;
9
- export declare const WithImageHeaderAndBody: Story;
10
- export declare const WithCustomBody: Story;
11
- export declare const CardWithImageAndAction: Story;
12
- export declare const LegacyExample: Story;
13
- export declare const LegacyWithActions: Story;
14
- export declare const LegacyWithPrimaryAction: Story;
15
- export declare const LegacyWithLink: Story;
16
- export declare const LegacyWithCustomLink: Story;
17
- export declare const LegacyWithImage: Story;
18
- export declare const WithFormFields: Story;
19
- export declare const LegacyWithContainedImage: Story;
@@ -1,30 +0,0 @@
1
- import { StoryObj } from '@storybook/react-vite';
2
- import { Checkbox } from './Checkbox';
3
- type Story = StoryObj<typeof Checkbox>;
4
- declare const _default: {
5
- component: import('react').ForwardRefExoticComponent<import('./Checkbox').CheckboxProps & import('react').RefAttributes<HTMLLabelElement>>;
6
- title: string;
7
- tags: string[];
8
- parameters: {
9
- layout: string;
10
- };
11
- args: {
12
- isDisabled: false;
13
- isIndeterminate: false;
14
- isInvalid: false;
15
- isReadOnly: false;
16
- isRequired: false;
17
- value: string;
18
- children: string;
19
- };
20
- };
21
- export default _default;
22
- export declare const Primary: Story;
23
- export declare const Disabled: Story;
24
- export declare const ReadOnly: Story;
25
- export declare const Invalid: Story;
26
- export declare const Indeterminate: Story;
27
- export declare const Selected: Story;
28
- export declare const WithDescription: Story;
29
- export declare const WithErrorMessage: Story;
30
- export declare const Required: Story;
@@ -1,31 +0,0 @@
1
- import { StoryObj } from '@storybook/react-vite';
2
- import { CheckboxGroup } from './CheckboxGroup';
3
- type Story = StoryObj<typeof CheckboxGroup>;
4
- declare const _default: {
5
- title: string;
6
- component: ({ label, description, errorMessage, errorPosition, popover, showSelectAll, selectAllLabel, className, children, ...props }: import('./CheckboxGroup').CheckboxGroupProps) => import('react').JSX.Element;
7
- parameters: {
8
- layout: string;
9
- };
10
- args: {
11
- isInvalid: false;
12
- isDisabled: false;
13
- isRequired: false;
14
- isReadOnly: false;
15
- label: string;
16
- description: string;
17
- errorMessage: string;
18
- errorPosition: "top";
19
- children: import('react').JSX.Element[];
20
- };
21
- tags: string[];
22
- };
23
- export default _default;
24
- export declare const Primary: Story;
25
- export declare const ShowSelectAll: Story;
26
- export declare const SelectAllInteraction: Story;
27
- export declare const SelectAllWithPreselectedDisabledItem: Story;
28
- export declare const Disabled: Story;
29
- export declare const ReadOnly: Story;
30
- export declare const Invalid: Story;
31
- export declare const WithHelpPopover: Story;
@@ -1,54 +0,0 @@
1
- import { t as e } from "./createLucideIcon-BgluSHFG.js";
2
- import { t } from "./check-DV00NPU0.js";
3
- import { t as n } from "./info-jCyacVsy.js";
4
- import { t as r } from "./useLocalizedStringFormatter-CeyBc0x0.js";
5
- import { jsx as i } from "react/jsx-runtime";
6
- var a = e("flag", [["path", {
7
- d: "M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",
8
- key: "1jaruq"
9
- }]]), o = e("triangle-alert", [
10
- ["path", {
11
- d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",
12
- key: "wmoenq"
13
- }],
14
- ["path", {
15
- d: "M12 9v4",
16
- key: "juzpu7"
17
- }],
18
- ["path", {
19
- d: "M12 17h.01",
20
- key: "p32p05"
21
- }]
22
- ]), s = {
23
- en: {
24
- ok: "okay",
25
- information: "information",
26
- importantInformation: "important information",
27
- warning: "warning"
28
- },
29
- sv: {
30
- ok: "okej",
31
- information: "information",
32
- importantInformation: "viktig information",
33
- warning: "varning"
34
- }
35
- }, c = {
36
- success: t,
37
- info: n,
38
- important: a,
39
- warning: o
40
- }, l = {
41
- success: "ok",
42
- info: "information",
43
- important: "importantInformation",
44
- warning: "warning"
45
- }, u = ({ status: e, "aria-label": t, size: n = 20, ...a }) => {
46
- let o = r(s), u = c[e];
47
- return /* @__PURE__ */ i(u, {
48
- "aria-label": t || o.format(l[e]),
49
- size: n,
50
- ...a
51
- });
52
- };
53
- //#endregion
54
- export { u as t };
@@ -1,10 +0,0 @@
1
- import { t as e } from "./createLucideIcon-BgluSHFG.js";
2
- var t = e("arrow-right", [["path", {
3
- d: "M5 12h14",
4
- key: "1ays0h"
5
- }], ["path", {
6
- d: "m12 5 7 7-7 7",
7
- key: "xquz4c"
8
- }]]);
9
- //#endregion
10
- export { t };
@@ -1,111 +0,0 @@
1
- import { n as e, t } from "./clsx-Di52oYUU.js";
2
- import { t as n } from "./createLucideIcon-BgluSHFG.js";
3
- import { t as r } from "./chevron-right-DwqboCdU.js";
4
- import { n as i } from "./button-CenXTGXL.js";
5
- import { t as a } from "./heading-BEl_z-5T.js";
6
- import { t as o } from "./field-error-LtNtEKDp.js";
7
- import { n as s } from "./select-oLCNpryY.js";
8
- import { a as c, c as l, o as u } from "./list-box-BN_MSiOD.js";
9
- import * as d from "react";
10
- import { Calendar as f, CalendarCell as p, CalendarGrid as m, CalendarMonthPicker as h, CalendarYearPicker as g, RangeCalendar as _, RangeCalendarContext as v, Select as y } from "react-aria-components";
11
- import { jsx as b, jsxs as x } from "react/jsx-runtime";
12
- import '../assets/calendar.css';var S = n("chevron-left", [["path", {
13
- d: "m15 18-6-6 6-6",
14
- key: "1wnfg3"
15
- }]]), C = {
16
- container: "_container_mn6zv_1",
17
- calendar: "_calendar_mn6zv_6",
18
- day: "_day_mn6zv_28",
19
- header: "_header_mn6zv_90",
20
- pickers: "_pickers_mn6zv_130",
21
- range: "_range_mn6zv_180"
22
- }, w = ({ weekdayStyle: e = "short", isReadOnly: n }) => {
23
- let r = !!d.useContext(v);
24
- return /* @__PURE__ */ b(m, {
25
- weekdayStyle: e,
26
- children: (e) => /* @__PURE__ */ b(p, {
27
- date: e,
28
- className: t(C.day, r && C.range),
29
- "data-readonly": n || void 0
30
- })
31
- });
32
- }, T = ({ isDisabled: e, isReadOnly: t, items: n, ...r }) => /* @__PURE__ */ x(y, {
33
- isDisabled: e,
34
- "data-readonly": t || void 0,
35
- ...r,
36
- children: [/* @__PURE__ */ b(s, {
37
- size: "small",
38
- isDisabled: e
39
- }), /* @__PURE__ */ b(c, { children: /* @__PURE__ */ b(l, {
40
- items: n,
41
- virtualized: !1,
42
- size: "small",
43
- children: (e) => /* @__PURE__ */ b(u, {
44
- id: e.id,
45
- textValue: e.formatted,
46
- children: e.formatted
47
- })
48
- }) })]
49
- }), E = ({ isDisabled: e, isReadOnly: t, showMonthYearPicker: n }) => {
50
- let o = (n) => /* @__PURE__ */ b(T, {
51
- ...n,
52
- isDisabled: e,
53
- isReadOnly: t
54
- });
55
- return /* @__PURE__ */ x("header", {
56
- className: C.header,
57
- children: [
58
- /* @__PURE__ */ b(i, {
59
- slot: "previous",
60
- size: "medium",
61
- "data-readonly": t || void 0,
62
- children: /* @__PURE__ */ b(S, { size: 20 })
63
- }),
64
- n ? /* @__PURE__ */ x("div", {
65
- className: C.pickers,
66
- children: [/* @__PURE__ */ b(h, { children: o }), /* @__PURE__ */ b(g, { children: o })]
67
- }) : /* @__PURE__ */ b(a, {
68
- level: 3,
69
- elementType: "h2",
70
- "data-disabled": e || void 0
71
- }),
72
- /* @__PURE__ */ b(i, {
73
- slot: "next",
74
- size: "medium",
75
- "data-readonly": t || void 0,
76
- children: /* @__PURE__ */ b(r, { size: 20 })
77
- })
78
- ]
79
- });
80
- }, D = ({ className: t, errorMessage: n, showMonthYearPicker: r, ...i }) => /* @__PURE__ */ x("div", {
81
- className: C.container,
82
- children: [/* @__PURE__ */ x(f, {
83
- className: e(C.calendar, t),
84
- "data-readonly": i.isReadOnly || void 0,
85
- ...i,
86
- children: [/* @__PURE__ */ b(E, {
87
- ...i,
88
- showMonthYearPicker: r
89
- }), /* @__PURE__ */ b(w, { ...i })]
90
- }), /* @__PURE__ */ b(o, {
91
- isInvalid: i.isInvalid,
92
- children: n
93
- })]
94
- }), O = ({ className: t, errorMessage: n, showMonthYearPicker: r, commitBehavior: i, ...a }) => /* @__PURE__ */ x("div", {
95
- className: C.container,
96
- children: [/* @__PURE__ */ x(_, {
97
- className: e(C.calendar, t),
98
- "data-readonly": a.isReadOnly || void 0,
99
- commitBehavior: i ?? (r ? "reset" : void 0),
100
- ...a,
101
- children: [/* @__PURE__ */ b(E, {
102
- ...a,
103
- showMonthYearPicker: r
104
- }), /* @__PURE__ */ b(w, { ...a })]
105
- }), /* @__PURE__ */ b(o, {
106
- isInvalid: a.isInvalid,
107
- children: n
108
- })]
109
- });
110
- //#endregion
111
- export { D as n, O as t };
@@ -1,103 +0,0 @@
1
- import { t as e } from "./clsx-Di52oYUU.js";
2
- import { t } from "./arrow-right-Db_H9KjE.js";
3
- import { t as n } from "./heading-BEl_z-5T.js";
4
- import { t as r } from "./text-DwmZ-ew8.js";
5
- import * as i from "react";
6
- import { Button as a, Link as o } from "react-aria-components";
7
- import { jsx as s, jsxs as c } from "react/jsx-runtime";
8
- import '../assets/card.css';var l = {
9
- card: "_card_yandx_1",
10
- horizontal: "_horizontal_yandx_26",
11
- cardLink: "_cardLink_yandx_31",
12
- cardContent: "_cardContent_yandx_42",
13
- cardActions: "_cardActions_yandx_61",
14
- deprecated: "_deprecated_yandx_75",
15
- cardActionArea: "_cardActionArea_yandx_81",
16
- cardImage: "_cardImage_yandx_114",
17
- cardLinkIcon: "_cardLinkIcon_yandx_146"
18
- }, u = i.createContext({
19
- horizontal: void 0,
20
- titleId: void 0
21
- }), d = i.createContext(void 0), f = ({ horizontal: t, className: n, children: r, ...a }) => {
22
- let o = `card-title-${i.useId()}`;
23
- return /* @__PURE__ */ s(u.Provider, {
24
- value: {
25
- horizontal: t,
26
- titleId: o
27
- },
28
- children: /* @__PURE__ */ s("div", {
29
- ...a,
30
- className: e(l.card, t && l.horizontal, n),
31
- children: r
32
- })
33
- });
34
- }, p = ({ children: t, ...n }) => {
35
- let { horizontal: r } = i.useContext(u);
36
- return /* @__PURE__ */ s(d.Provider, {
37
- value: {},
38
- children: /* @__PURE__ */ s("div", {
39
- ...n,
40
- className: e(l.cardContent, r && l.horizontal),
41
- children: t
42
- })
43
- });
44
- }, m = ({ elementType: t = "h2", children: r, className: a, ...o }) => {
45
- let { horizontal: c, titleId: d } = i.useContext(u);
46
- return /* @__PURE__ */ s(n, {
47
- level: 3,
48
- elementType: t,
49
- className: e(a, l.cardTitle, c && l.horizontal),
50
- id: d,
51
- ...o,
52
- children: r
53
- });
54
- }, h = ({ children: t, ...n }) => {
55
- let { horizontal: r } = i.useContext(u), a = !!i.useContext(d);
56
- return /* @__PURE__ */ s("div", {
57
- ...n,
58
- className: e(l.cardActions, r && l.horizontal, a && l.deprecated),
59
- children: t
60
- });
61
- }, g = ({ children: t, className: n, ...r }) => {
62
- let { titleId: o } = i.useContext(u);
63
- return /* @__PURE__ */ s(a, {
64
- ...r,
65
- "aria-labelledby": o,
66
- className: e(l.cardActionArea, n),
67
- children: t
68
- });
69
- }, _ = ({ as: t = "img", className: n, ...r }) => /* @__PURE__ */ s(t, {
70
- ...r,
71
- "data-card-image": !0,
72
- className: e(l.cardImage, n)
73
- }), v = ({ children: n, as: r, ...i }) => /* @__PURE__ */ c(r || o, {
74
- ...i,
75
- className: e(l.cardLink, i.className),
76
- children: [n, /* @__PURE__ */ s(t, {
77
- className: l.cardLinkIcon,
78
- size: 24
79
- })]
80
- }), y = { cardBody: "_cardBody_337uy_1" }, b = ({ className: t, ...n }) => /* @__PURE__ */ s("div", {
81
- className: e(t, y.cardBody),
82
- ...n
83
- }), x = {
84
- cardHeader: "_cardHeader_1625c_1",
85
- textContainer: "_textContainer_1625c_14",
86
- subHeading: "_subHeading_1625c_20"
87
- }, S = ({ children: t, className: n, heading: i, headingLevel: a, subHeading: o, ...l }) => /* @__PURE__ */ c("div", {
88
- className: e(n, x.cardHeader),
89
- ...l,
90
- children: [/* @__PURE__ */ c("div", {
91
- className: x.textContainer,
92
- children: [/* @__PURE__ */ s(m, {
93
- elementType: a,
94
- children: i
95
- }), o && /* @__PURE__ */ s(r, {
96
- slot: "description",
97
- className: x.subHeading,
98
- children: o
99
- })]
100
- }), t]
101
- });
102
- //#endregion
103
- export { h as a, v as c, g as i, m as l, b as n, p as o, f as r, _ as s, S as t };
@@ -1,7 +0,0 @@
1
- import { t as e } from "./createLucideIcon-BgluSHFG.js";
2
- var t = e("check", [["path", {
3
- d: "M20 6 9 17l-5-5",
4
- key: "1gmf2c"
5
- }]]);
6
- //#endregion
7
- export { t };
@@ -1,110 +0,0 @@
1
- 'use client';
2
- import { t as e } from "./clsx-Di52oYUU.js";
3
- import { t } from "./createLucideIcon-BgluSHFG.js";
4
- import { t as n } from "./check-DV00NPU0.js";
5
- import { t as r } from "./useLocalizedStringFormatter-CeyBc0x0.js";
6
- import { n as i, t as a } from "./label-LWlgvAwz.js";
7
- import { t as o } from "./text-DwmZ-ew8.js";
8
- import { t as s } from "./field-error-LtNtEKDp.js";
9
- import { t as c } from "./splitDataAttributes-_JTFOOIb.js";
10
- import * as l from "react";
11
- import { forwardRef as u, useContext as d } from "react";
12
- import { CheckboxButton as f, CheckboxField as p, CheckboxGroup as m, CheckboxGroupStateContext as h, composeRenderProps as g } from "react-aria-components";
13
- import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
14
- import { variables as b } from "@midas-ds/theme";
15
- import '../assets/checkbox.css';var x = t("minus", [["path", {
16
- d: "M5 12h14",
17
- key: "1ays0h"
18
- }]]), S = {
19
- indicator: "_indicator_3jfn4_1",
20
- checkboxButton: "_checkboxButton_3jfn4_27",
21
- checkboxField: "_checkboxField_3jfn4_144",
22
- checkboxGroup: "_checkboxGroup_3jfn4_155",
23
- checkboxList: "_checkboxList_3jfn4_166"
24
- }, C = ({ className: t, ...n }) => /* @__PURE__ */ v(p, {
25
- className: e(S.checkboxField, t),
26
- ...n
27
- }), w = u(({ className: t, ...n }, r) => /* @__PURE__ */ v(f, {
28
- className: e(S.checkboxButton, t),
29
- ref: r,
30
- ...n
31
- })), T = u(({ className: e, description: t, errorMessage: r, errorPosition: i = "top", children: a, ...l }, u) => {
32
- let [d, f] = c(l);
33
- return /* @__PURE__ */ y(C, {
34
- ...f,
35
- children: [
36
- t && /* @__PURE__ */ v(o, {
37
- slot: "description",
38
- children: t
39
- }),
40
- i === "top" && /* @__PURE__ */ v(s, { children: r }),
41
- /* @__PURE__ */ v(w, {
42
- ...d,
43
- ref: u,
44
- className: e,
45
- children: ({ isIndeterminate: e }) => /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("div", {
46
- className: S.indicator,
47
- children: v(e ? x : n, {
48
- size: 14,
49
- color: b.iconOnColor
50
- })
51
- }), a] })
52
- }),
53
- i === "bottom" && /* @__PURE__ */ v(s, { children: r })
54
- ]
55
- });
56
- });
57
- T.displayName = "Checkbox";
58
- //#endregion
59
- //#region src/checkbox/useSelectAll.ts
60
- var E = (e, t) => {
61
- let n = t?.value ?? [], r = l.Children.toArray(e).filter((e) => l.isValidElement(e) && e.type === T), i = r.filter((e) => !e.props.isDisabled).map((e) => e.props.value || ""), a = r.filter((e) => e.props.isDisabled).map((e) => e.props.value || "").filter((e) => n.includes(e)), o = n.filter((e) => i.includes(e)).length, s = o === 0, c = o === i.length;
62
- return {
63
- allSelected: c,
64
- someSelected: !s && !c,
65
- checkboxValues: i,
66
- disabledSelectedValues: a
67
- };
68
- }, D = {
69
- en: { selectAll: "Select all" },
70
- sv: { selectAll: "Välj alla" }
71
- }, O = ({ checkboxes: e, label: t }) => {
72
- let n = d(h), i = r(D), { allSelected: a, someSelected: o, checkboxValues: s, disabledSelectedValues: c } = E(e, n);
73
- return /* @__PURE__ */ v(h.Provider, {
74
- value: null,
75
- children: /* @__PURE__ */ v(T, {
76
- isSelected: a,
77
- isIndeterminate: o,
78
- isReadOnly: n?.isReadOnly,
79
- isDisabled: n?.isDisabled,
80
- onChange: (e) => {
81
- n?.setValue(e ? [...s, ...c] : c);
82
- },
83
- children: t || i.format("selectAll")
84
- })
85
- });
86
- }, k = ({ label: t, description: n, errorMessage: r, errorPosition: c = "top", popover: l, showSelectAll: u, selectAllLabel: d, className: f, children: p, ...h }) => /* @__PURE__ */ v(m, {
87
- ...h,
88
- className: e(S.checkboxGroup, f),
89
- children: g(p, (e) => /* @__PURE__ */ y(_, { children: [
90
- /* @__PURE__ */ v(i, {
91
- popover: l,
92
- children: t && /* @__PURE__ */ v(a, { children: t })
93
- }),
94
- n && /* @__PURE__ */ v(o, {
95
- slot: "description",
96
- children: n
97
- }),
98
- c === "top" && r && /* @__PURE__ */ v(s, { children: r }),
99
- /* @__PURE__ */ y("div", {
100
- className: S.checkboxList,
101
- children: [u && /* @__PURE__ */ v(O, {
102
- label: d,
103
- checkboxes: e
104
- }), e]
105
- }),
106
- c === "bottom" && r && /* @__PURE__ */ v(s, { children: r })
107
- ] }))
108
- });
109
- //#endregion
110
- export { C as i, T as n, w as r, k as t };
@@ -1,7 +0,0 @@
1
- import { t as e } from "./createLucideIcon-BgluSHFG.js";
2
- var t = e("chevron-down", [["path", {
3
- d: "m6 9 6 6 6-6",
4
- key: "qrunsl"
5
- }]]);
6
- //#endregion
7
- export { t };
@@ -1,7 +0,0 @@
1
- import { t as e } from "./createLucideIcon-BgluSHFG.js";
2
- var t = e("chevron-right", [["path", {
3
- d: "m9 18 6-6-6-6",
4
- key: "mthhwq"
5
- }]]);
6
- //#endregion
7
- export { t };
@@ -1,17 +0,0 @@
1
- 'use client';
2
- import { t as e } from "./x-BJAOO5a5.js";
3
- import { n as t } from "./button-CenXTGXL.js";
4
- import "react";
5
- import { jsx as n } from "react/jsx-runtime";
6
- //#region src/clear-button/ClearButton.tsx
7
- var r = (r) => /* @__PURE__ */ n(t, {
8
- variant: "icon",
9
- slot: null,
10
- ...r,
11
- children: /* @__PURE__ */ n(e, {
12
- size: 20,
13
- "aria-hidden": !0
14
- })
15
- });
16
- //#endregion
17
- export { r as t };
@@ -1,23 +0,0 @@
1
- //#region ../../node_modules/clsx/dist/clsx.mjs
2
- function e(t) {
3
- var n, r, i = "";
4
- if (typeof t == "string" || typeof t == "number") i += t;
5
- else if (typeof t == "object") {
6
- if (Array.isArray(t)) {
7
- var a = t.length;
8
- for (n = 0; n < a; n++) t[n] && (r = e(t[n])) && (i && (i += " "), i += r);
9
- } else for (r in t) t[r] && (i && (i += " "), i += r);
10
- }
11
- return i;
12
- }
13
- function t() {
14
- for (var t, n, r = 0, i = "", a = arguments.length; r < a; r++) (t = arguments[r]) && (n = e(t)) && (i && (i += " "), i += n);
15
- return i;
16
- }
17
- //#endregion
18
- //#region src/utils/clsx.ts
19
- function n(...e) {
20
- return e.some((e) => typeof e == "function") ? (n) => t(e.map((e) => typeof e == "function" ? e(n) : e)) : t(e);
21
- }
22
- //#endregion
23
- export { t as n, n as t };