@midas-ds/components 17.17.3 → 17.19.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/CHANGELOG.md +40 -0
- package/assets/checkbox.css +1 -1
- package/assets/date-picker.css +1 -1
- package/breadcrumbs/Breadcrumbs.stories.d.ts +1 -1
- package/calendar/Calendar.d.ts +3 -3
- package/calendar/Calendar.stories.d.ts +4 -3
- package/calendar/RangeCalendar.stories.d.ts +1 -0
- package/checkbox/Checkbox.d.ts +3 -0
- package/checkbox/Checkbox.stories.d.ts +5 -0
- package/checkbox/context.d.ts +1 -1
- package/checkbox/index.js +1 -1
- package/checkbox/types.d.ts +4 -1
- package/chunks/{checkbox-B1fsgVOD.js → checkbox-DEN5T_Km.js} +54 -29
- package/chunks/{combobox-Ids5V9io.js → combobox-UjxDfSoD.js} +1 -1
- package/chunks/{date-field-U4owDpGF.js → date-field-CYk8-UEY.js} +1 -1
- package/chunks/date-picker-BQcIYROH.js +187 -0
- package/chunks/{list-box-BozMU8so.js → list-box-DvX6VTa1.js} +10 -7
- package/chunks/{select-iEvRNP3W.js → select-DneAUko_.js} +16 -16
- package/chunks/{table-lU-UeRjC.js → table-jarDZ4q4.js} +1 -1
- package/chunks/{time-field-BROZiten.js → time-field-Dv9xYdex.js} +2 -2
- package/combobox/ComboBox.stories.d.ts +2 -1
- package/combobox/index.js +1 -1
- package/date-field/index.js +1 -1
- package/date-picker/DateRangePicker.stories.d.ts +1 -0
- package/date-picker/index.js +1 -1
- package/index.js +10 -10
- package/list-box/ListBox.d.ts +6 -3
- package/list-box/ListBox.stories.d.ts +2 -1
- package/list-box/index.js +1 -1
- package/package.json +2 -2
- package/select/Select.d.ts +6 -1
- package/select/Select.stories.d.ts +1 -0
- package/select/index.js +1 -1
- package/table/Table.stories.d.ts +1 -0
- package/table/index.js +1 -1
- package/textfield/TextArea.stories.d.ts +12 -16
- package/time-field/TimeField.stories.d.ts +1 -1
- package/time-field/index.js +1 -1
- package/chunks/date-picker-C9KL-4Lj.js +0 -191
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,43 @@
|
|
|
1
|
+
## 17.19.0 (2026-08-13)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- **components,list-box:** add virtualized opt-out to ListBox/Select/ComboBox ([fc140394ec9](https://github.com/migrationsverket/midas/commit/fc140394ec9))
|
|
6
|
+
|
|
7
|
+
### 🩹 Fixes
|
|
8
|
+
|
|
9
|
+
- **components,combobox:** stop relying on ArrowDown to open in CI ([9b40aeb068a](https://github.com/migrationsverket/midas/commit/9b40aeb068a))
|
|
10
|
+
- **components,combobox:** fix flaky virtualized opt-out test in CI ([8b4f9bffe21](https://github.com/migrationsverket/midas/commit/8b4f9bffe21))
|
|
11
|
+
|
|
12
|
+
## 17.18.0 (2026-08-13)
|
|
13
|
+
|
|
14
|
+
### 🚀 Features
|
|
15
|
+
|
|
16
|
+
- **components,calendar:** make Calendar generic over selection mode ([8d5d4074ff7](https://github.com/migrationsverket/midas/commit/8d5d4074ff7))
|
|
17
|
+
- **components,deps:** bump react-aria-components to 1.20.0 ([b38ce4d3001](https://github.com/migrationsverket/midas/commit/b38ce4d3001))
|
|
18
|
+
|
|
19
|
+
### 🩹 Fixes
|
|
20
|
+
|
|
21
|
+
- **components,checkbox:** keep Checkbox functional with the new RAC API ([59b959a2238](https://github.com/migrationsverket/midas/commit/59b959a2238))
|
|
22
|
+
- **components,select:** thread generic type through SelectValue for RAC 1.20 ([9dac80b4a3d](https://github.com/migrationsverket/midas/commit/9dac80b4a3d))
|
|
23
|
+
- **components,date-picker:** drop unnecessary Dialog wrapper around Calendar popover ([#10430](https://github.com/migrationsverket/midas/issues/10430))
|
|
24
|
+
- **components,checkbox,radio:** use Space instead of Enter in keyboard tests ([0440d5274d4](https://github.com/migrationsverket/midas/commit/0440d5274d4))
|
|
25
|
+
|
|
26
|
+
### 📖 Documentation changes
|
|
27
|
+
|
|
28
|
+
- **components,date-picker:** add DateRangePicker story for anchor-date-aware isDateUnavailable ([157ca1e7740](https://github.com/migrationsverket/midas/commit/157ca1e7740))
|
|
29
|
+
- **components,calendar:** add RangeCalendar story for anchor-date-aware isDateUnavailable ([c4828b8f6b5](https://github.com/migrationsverket/midas/commit/c4828b8f6b5))
|
|
30
|
+
|
|
31
|
+
### 🧪 Tests updated
|
|
32
|
+
|
|
33
|
+
- **components,table:** verify interactive cell content works with RAC 1.20 ([08accacef11](https://github.com/migrationsverket/midas/commit/08accacef11))
|
|
34
|
+
- **components,combobox:** tolerate sub-pixel layout rounding in toggle-button overlap check ([46403b50321](https://github.com/migrationsverket/midas/commit/46403b50321))
|
|
35
|
+
- **components,menu:** update test-utils API for RAC 1.20 ([a2bc23753f0](https://github.com/migrationsverket/midas/commit/a2bc23753f0))
|
|
36
|
+
|
|
37
|
+
### 🧱 Updated Dependencies
|
|
38
|
+
|
|
39
|
+
- Updated theme to 3.15.5
|
|
40
|
+
|
|
1
41
|
## 17.17.3 (2026-07-08)
|
|
2
42
|
|
|
3
43
|
### 🧱 Updated Dependencies
|
package/assets/checkbox.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._checkboxInner_lybbg_1{--border-color:var(--midas-border-color-primary);width:var(--midas-size-icon-sm);height:var(--midas-size-icon-sm);box-sizing:border-box;border:1px solid var(--border-color);transition:background-color 50ms,border-color 50ms;display:flex}._checkboxInner_lybbg_1[data-readonly]{--border-color:var(--midas-border-color-subtle)}._checkboxInner_lybbg_1 svg path{stroke-dasharray:24;stroke-dashoffset:24px;transition:stroke-dashoffset var(--midas-transition-duration-quick) var(--midas-transition-timing-ease-in-out)}._checkbox_lybbg_1[data-selected] svg path,._checkbox_lybbg_1[data-indeterminate] svg path{stroke-dashoffset:0}._checkbox_lybbg_1{--checkbox-base-color:var(--midas-button-background-primary-base);--checkbox-hover-color:var(--midas-button-background-primary-hover);--checkbox-active-color:var(--midas-button-background-primary-active);--checkbox-disabled-border:var(--midas-border-color-disabled);--checkbox-disabled-background:var(--midas-field-disabled);--checkbox-readonly-border:var(--midas-border-color-subtle);--checkbox-warning-border:var(--midas-support-border-warning);font-family:var(--midas-typography-font-family);font-weight:var(--midas-typography-weight-regular);gap:var(--midas-space-small);cursor:pointer;width:max-content;color:var(--midas-text-primary);line-height:var(--midas-typography-line-height-30);align-items:center;display:flex}._checkbox_lybbg_1[data-focus-visible],._checkbox_lybbg_1:focus-visible{box-shadow:var(--midas-state-focus);outline:none}@media (forced-colors:active){._checkbox_lybbg_1[data-focus-visible],._checkbox_lybbg_1:focus-visible{outline:var(--midas-state-focus-contrast-mode-outline) solid;outline-offset:var(--midas-state-focus-contrast-mode-offset)}}._checkbox_lybbg_1[data-hovered] ._checkboxInner_lybbg_1{border-color:var(--checkbox-hover-color)}._checkbox_lybbg_1[data-pressed] ._checkboxInner_lybbg_1{border-color:var(--checkbox-active-color)}._checkbox_lybbg_1[data-selected] ._checkboxInner_lybbg_1,._checkbox_lybbg_1[data-indeterminate] ._checkboxInner_lybbg_1{background:var(--checkbox-base-color);border-color:var(--checkbox-base-color)}._checkbox_lybbg_1[data-selected][data-hovered] ._checkboxInner_lybbg_1,._checkbox_lybbg_1[data-indeterminate][data-hovered] ._checkboxInner_lybbg_1{background:var(--checkbox-hover-color);border-color:var(--checkbox-hover-color)}._checkbox_lybbg_1[data-selected][data-pressed] ._checkboxInner_lybbg_1,._checkbox_lybbg_1[data-indeterminate][data-pressed] ._checkboxInner_lybbg_1{background:var(--checkbox-active-color);border-color:var(--checkbox-active-color)}._checkbox_lybbg_1[data-invalid] ._checkboxInner_lybbg_1{outline:2px solid var(--checkbox-warning-border);outline-offset:-2px}._checkbox_lybbg_1[data-invalid][data-hovered] ._checkboxInner_lybbg_1{opacity:.5;transition:opacity 50ms}._checkbox_lybbg_1[data-disabled]{color:var(--midas-text-disabled);cursor:not-allowed}._checkbox_lybbg_1[data-disabled] ._checkboxInner_lybbg_1{pointer-events:none;border:1px solid var(--checkbox-disabled-border)}._checkbox_lybbg_1[data-disabled][data-selected] ._checkboxInner_lybbg_1,._checkbox_lybbg_1[data-disabled][data-indeterminate] ._checkboxInner_lybbg_1{background:var(--checkbox-disabled-background)}._checkbox_lybbg_1[data-readonly],._checkbox_lybbg_1[data-readonly][data-indeterminate],._checkbox_lybbg_1[data-readonly][data-selected]{pointer-events:none;border-color:var(--checkbox-readonly-border);background-color:#0000}:is(._checkbox_lybbg_1[data-readonly],._checkbox_lybbg_1[data-readonly][data-indeterminate],._checkbox_lybbg_1[data-readonly][data-selected]) ._checkboxInner_lybbg_1{border-color:var(--checkbox-readonly-border);background:0 0}:is(._checkbox_lybbg_1[data-readonly],._checkbox_lybbg_1[data-readonly][data-indeterminate],._checkbox_lybbg_1[data-readonly][data-selected]) svg{stroke:currentColor}._checkboxWrapper_lybbg_141{align-items:flex-start;gap:var(--midas-space-05);flex-direction:column;width:100%;display:flex}._checkboxGroup_lybbg_152{font-family:var(--midas-typography-font-family);font-size:var(--midas-typography-font-size-30);flex-direction:column;min-width:150px;display:flex}._checkboxGroup_lybbg_152[data-disabled]{color:var(--midas-text-disabled)}._checkboxGroup_lybbg_152 ._checkboxList_lybbg_163{gap:var(--midas-space-small);flex-direction:column;display:flex}@media (width<=479px){._checkboxGroup_lybbg_152 ._checkbox_lybbg_1{padding:var(--midas-space-70) var(--midas-space-medium);border:1px solid var(--midas-border-color-primary);width:auto}._checkboxGroup_lybbg_152 ._checkbox_lybbg_1[data-hovered]{background-color:var(--midas-layer-01-hover)}._checkboxGroup_lybbg_152 ._checkbox_lybbg_1[data-invalid]{border:2px solid var(--checkbox-warning-border)}._checkboxGroup_lybbg_152 ._checkbox_lybbg_1[data-disabled]{border-color:var(--checkbox-disabled-border);pointer-events:none}._checkboxGroup_lybbg_152 ._checkbox_lybbg_1[data-readonly]{border-color:var(--checkbox-readonly-border)}}@media (forced-colors:active){._checkbox_lybbg_1[data-hovered] ._checkboxInner_lybbg_1,._checkbox_lybbg_1[data-selected] ._checkboxInner_lybbg_1,._checkbox_lybbg_1[data-indeterminate] ._checkboxInner_lybbg_1{border-color:selecteditem}._checkbox_lybbg_1[data-selected] ._checkboxInner_lybbg_1,._checkbox_lybbg_1[data-indeterminate] ._checkboxInner_lybbg_1{background:selecteditem}._checkbox_lybbg_1[data-disabled]{color:graytext}._checkbox_lybbg_1[data-disabled] ._checkboxInner_lybbg_1{border-color:graytext}._checkbox_lybbg_1[data-disabled][data-selected] ._checkboxInner_lybbg_1,._checkbox_lybbg_1[data-disabled][data-indeterminate] ._checkboxInner_lybbg_1{background:graytext}}@media (prefers-reduced-motion){._checkboxInner_lybbg_1 svg path{transition:none}}
|
package/assets/date-picker.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._dropdownAnimation_1ljkv_4{opacity:1;transition:opacity var(--midas-transition-duration-quick) var(--midas-transition-timing-ease-out)}._dropdownAnimation_1ljkv_4[data-entering]{opacity:0}._dropdownAnimation_1ljkv_4[data-exiting]{opacity:0;transition-timing-function:var(--midas-transition-timing-ease-in)}@media (prefers-reduced-motion){._dropdownAnimation_1ljkv_4{transition:none}}.
|
|
1
|
+
._dropdownAnimation_1ljkv_4{opacity:1;transition:opacity var(--midas-transition-duration-quick) var(--midas-transition-timing-ease-out)}._dropdownAnimation_1ljkv_4[data-entering]{opacity:0}._dropdownAnimation_1ljkv_4[data-exiting]{opacity:0;transition-timing-function:var(--midas-transition-timing-ease-in)}@media (prefers-reduced-motion){._dropdownAnimation_1ljkv_4{transition:none}}._datePicker_10ewm_1{font-family:var(--midas-typography-font-family);flex-direction:column;align-items:flex-start;display:flex}._inputField_10ewm_8{box-sizing:border-box;width:100%;height:var(--midas-size-control);background-color:var(--midas-field-01-base);border-bottom:1px solid var(--midas-border-color-primary);justify-content:flex-start;align-items:center;gap:1rem;padding-left:1rem;display:flex}@media (forced-colors:active){._inputField_10ewm_8{border:1px solid var(--midas-border-color-primary)}}._inputField_10ewm_8._medium_10ewm_24{height:var(--midas-size-control-md)}._inputField_10ewm_8[data-disabled]{cursor:not-allowed;border-color:var(--midas-border-color-disabled)}._inputField_10ewm_8:focus-visible,._inputField_10ewm_8[data-focus-visible]{outline:none}._inputField_10ewm_8[data-invalid]{box-shadow:var(--midas-state-invalid);border:none}@media (forced-colors:active){._inputField_10ewm_8[data-invalid]{border:1px solid var(--midas-border-color-primary)}}._inputField_10ewm_8._readOnly_10ewm_47{border-color:var(--midas-border-color-subtle);background-color:#0000}._inputField_10ewm_8 ._buttonGroup_10ewm_52{height:100%;margin-left:auto;display:flex}._inputField_10ewm_8 ._iconButton_10ewm_58{aspect-ratio:1;border:none;height:100%;padding:0}._inputField_10ewm_8 ._iconButton_10ewm_58[data-disabled]{background-color:#0000}._inputField_10ewm_8 ._iconButton_10ewm_58:focus-visible,._inputField_10ewm_8 ._iconButton_10ewm_58[data-focus-visible]{box-shadow:var(--midas-state-focus-inset);outline:none}@media (forced-colors:active){._inputField_10ewm_8 ._iconButton_10ewm_58:focus-visible,._inputField_10ewm_8 ._iconButton_10ewm_58[data-focus-visible]{outline-offset:2px;outline:3px solid highlight}}._popover_10ewm_81{box-shadow:0 3px 5px #0003}
|
|
@@ -9,7 +9,7 @@ declare const _default: {
|
|
|
9
9
|
component: <T extends object>({ className, ...rest }: import('./Breadcrumbs').BreadcrumbsProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
subcomponents: {
|
|
11
11
|
Breadcrumb: ({ className, children, ...rest }: import('./Breadcrumb').BreadcrumbProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
Link: <C extends React.ElementType = (props: import('react-aria-components').LinkProps & React.RefAttributes<HTMLAnchorElement>) => React.ReactElement | null>({ children, standalone, target, stretched, download, icon: customIcon, className, as, ...rest }: import('..').LinkProps<C>) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
Link: <C extends React.ElementType = (props: import('react-aria-components').LinkProps & React.RefAttributes<HTMLAnchorElement>) => React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | null>({ children, standalone, target, stretched, download, icon: customIcon, className, as, ...rest }: import('..').LinkProps<C>) => import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
};
|
|
14
14
|
title: string;
|
|
15
15
|
tags: string[];
|
package/calendar/Calendar.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CalendarProps as AriaCalendarProps, DateValue } from 'react-aria-components';
|
|
2
|
-
import
|
|
3
|
-
export interface CalendarProps extends AriaCalendarProps<DateValue> {
|
|
2
|
+
import { CalendarSelectionMode } from 'react-stately/useCalendarState';
|
|
3
|
+
export interface CalendarProps<M extends CalendarSelectionMode = 'single'> extends AriaCalendarProps<DateValue, M> {
|
|
4
4
|
errorMessage?: string;
|
|
5
5
|
}
|
|
6
|
-
export declare const Calendar:
|
|
6
|
+
export declare const Calendar: <M extends CalendarSelectionMode = "single">({ className, errorMessage, ...rest }: CalendarProps<M>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { StoryObj } from '@storybook/react-vite';
|
|
2
2
|
import { Calendar } from './Calendar';
|
|
3
|
-
type Story = StoryObj<typeof Calendar
|
|
3
|
+
type Story = StoryObj<typeof Calendar<'single'>>;
|
|
4
4
|
declare const _default: {
|
|
5
|
-
component: import('react').
|
|
6
|
-
render: (args: import('./Calendar').CalendarProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
component: <M extends import('react-stately/useCalendarState').CalendarSelectionMode = "single">({ className, errorMessage, ...rest }: import('./Calendar').CalendarProps<M>) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
render: (args: import('./Calendar').CalendarProps<"single">) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
title: string;
|
|
8
8
|
tags: string[];
|
|
9
9
|
};
|
|
@@ -13,3 +13,4 @@ export declare const Disabled: Story;
|
|
|
13
13
|
export declare const ReadOnly: Story;
|
|
14
14
|
export declare const Invalid: Story;
|
|
15
15
|
export declare const UnavailableWeekends: Story;
|
|
16
|
+
export declare const MultiSelect: StoryObj<typeof Calendar<'multiple'>>;
|
package/checkbox/Checkbox.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
export declare const Checkbox: import('react').ForwardRefExoticComponent<import('react-aria').AriaCheckboxProps & import('react-aria-components').SlotProps & {
|
|
2
2
|
className?: string;
|
|
3
|
+
description?: string;
|
|
4
|
+
errorMessage?: string | ((validation: import('react-aria-components').ValidationResult) => string);
|
|
5
|
+
errorPosition?: "top" | "bottom";
|
|
3
6
|
} & import('react').RefAttributes<HTMLLabelElement>>;
|
|
@@ -4,6 +4,9 @@ type Story = StoryObj<typeof Checkbox>;
|
|
|
4
4
|
declare const _default: {
|
|
5
5
|
component: import('react').ForwardRefExoticComponent<import('react-aria').AriaCheckboxProps & import('react-aria-components').SlotProps & {
|
|
6
6
|
className?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
errorMessage?: string | ((validation: import('react-aria-components').ValidationResult) => string);
|
|
9
|
+
errorPosition?: "top" | "bottom";
|
|
7
10
|
} & import('react').RefAttributes<HTMLLabelElement>>;
|
|
8
11
|
title: string;
|
|
9
12
|
tags: string[];
|
|
@@ -27,4 +30,6 @@ export declare const ReadOnly: Story;
|
|
|
27
30
|
export declare const Invalid: Story;
|
|
28
31
|
export declare const Indeterminate: Story;
|
|
29
32
|
export declare const Selected: Story;
|
|
33
|
+
export declare const WithDescription: Story;
|
|
34
|
+
export declare const WithErrorMessage: Story;
|
|
30
35
|
export declare const Required: Story;
|
package/checkbox/context.d.ts
CHANGED
package/checkbox/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, t } from "../chunks/checkbox-
|
|
1
|
+
import { n as e, t } from "../chunks/checkbox-DEN5T_Km.js";
|
|
2
2
|
export { e as Checkbox, t as CheckboxGroup };
|
package/checkbox/types.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { AriaCheckboxProps, CheckboxAria, FocusRingAria, HoverResult, PressResult } from 'react-aria';
|
|
2
|
-
import { SlotProps } from 'react-aria-components';
|
|
2
|
+
import { SlotProps, ValidationResult } from 'react-aria-components';
|
|
3
3
|
import { CheckboxGroupState } from 'react-stately';
|
|
4
4
|
export type CheckboxProps = AriaCheckboxProps & SlotProps & {
|
|
5
5
|
className?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
errorMessage?: string | ((validation: ValidationResult) => string);
|
|
8
|
+
errorPosition?: 'top' | 'bottom';
|
|
6
9
|
};
|
|
7
10
|
export interface CheckboxComponentProps extends CheckboxProps {
|
|
8
11
|
focusRingAria: FocusRingAria;
|
|
@@ -11,46 +11,71 @@ import { CheckboxContext as p, FieldErrorContext as m, FormContext as h, useCont
|
|
|
11
11
|
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
12
12
|
import { VisuallyHidden as b, mergeProps as x, useCheckbox as S, useCheckboxGroup as C, useCheckboxGroupItem as w, useFocusRing as T, useHover as E, usePress as D } from "react-aria";
|
|
13
13
|
import { variables as O } from "@midas-ds/theme";
|
|
14
|
-
import {
|
|
15
|
-
import { useCheckboxGroupState as A } from "react-stately";
|
|
14
|
+
import { useCheckboxGroupState as k, useToggleState as A } from "react-stately";
|
|
16
15
|
import '../assets/checkbox.css';var j = t("minus", [["path", {
|
|
17
16
|
d: "M5 12h14",
|
|
18
17
|
key: "1ays0h"
|
|
19
18
|
}]]), M = l.createContext(null), N = {
|
|
20
|
-
checkboxInner: "
|
|
21
|
-
checkbox: "
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
ref:
|
|
28
|
-
...x(
|
|
29
|
-
slot:
|
|
30
|
-
className: e(N.checkbox,
|
|
31
|
-
"data-hovered":
|
|
32
|
-
"data-selected":
|
|
33
|
-
"data-indeterminate":
|
|
34
|
-
"data-pressed":
|
|
35
|
-
"data-disabled":
|
|
36
|
-
"data-readonly":
|
|
37
|
-
"data-invalid":
|
|
38
|
-
"data-focused":
|
|
39
|
-
"data-focus-visible":
|
|
40
|
-
"data-required":
|
|
19
|
+
checkboxInner: "_checkboxInner_lybbg_1",
|
|
20
|
+
checkbox: "_checkbox_lybbg_1",
|
|
21
|
+
checkboxWrapper: "_checkboxWrapper_lybbg_141",
|
|
22
|
+
checkboxGroup: "_checkboxGroup_lybbg_152",
|
|
23
|
+
checkboxList: "_checkboxList_lybbg_163"
|
|
24
|
+
}, P = u(({ hoverResult: t, pressResult: r, focusRingAria: o, labelProps: s, slot: c, className: l, isSelected: u, isIndeterminate: d, isDisabled: f, isInvalid: p, isReadOnly: h, isRequired: g, inputProps: _, inputRef: S, children: C, description: w, errorMessage: T, errorPosition: E = "top", descriptionProps: D, errorMessageProps: k, validationErrors: A, validationDetails: M }, P) => {
|
|
25
|
+
let { hoverProps: F, isHovered: I } = t, { pressProps: L, isPressed: R } = r, { isFocused: z, isFocusVisible: B, focusProps: V } = o, H = /* @__PURE__ */ y("label", {
|
|
26
|
+
ref: P,
|
|
27
|
+
...x(F, L, s),
|
|
28
|
+
slot: w || T ? void 0 : c || void 0,
|
|
29
|
+
className: e(N.checkbox, l),
|
|
30
|
+
"data-hovered": I || void 0,
|
|
31
|
+
"data-selected": u || void 0,
|
|
32
|
+
"data-indeterminate": d || void 0,
|
|
33
|
+
"data-pressed": R || void 0,
|
|
34
|
+
"data-disabled": f || void 0,
|
|
35
|
+
"data-readonly": h || void 0,
|
|
36
|
+
"data-invalid": p || void 0,
|
|
37
|
+
"data-focused": z || void 0,
|
|
38
|
+
"data-focus-visible": B || void 0,
|
|
39
|
+
"data-required": g || void 0,
|
|
41
40
|
children: [
|
|
42
41
|
/* @__PURE__ */ v("div", {
|
|
43
42
|
className: e(N.checkboxInner),
|
|
44
|
-
children: v(
|
|
43
|
+
children: v(d ? j : n, {
|
|
45
44
|
size: 14,
|
|
46
45
|
color: O.iconOnColor
|
|
47
46
|
})
|
|
48
47
|
}),
|
|
49
48
|
/* @__PURE__ */ v(b, { children: /* @__PURE__ */ v("input", {
|
|
50
|
-
...x(
|
|
51
|
-
ref:
|
|
49
|
+
...x(_, V),
|
|
50
|
+
ref: S
|
|
52
51
|
}) }),
|
|
53
|
-
|
|
52
|
+
C
|
|
53
|
+
]
|
|
54
|
+
});
|
|
55
|
+
if (!w && !T) return H;
|
|
56
|
+
let U = T && /* @__PURE__ */ v(m.Provider, {
|
|
57
|
+
value: {
|
|
58
|
+
isInvalid: !!p,
|
|
59
|
+
validationErrors: A,
|
|
60
|
+
validationDetails: M
|
|
61
|
+
},
|
|
62
|
+
children: /* @__PURE__ */ v(a, {
|
|
63
|
+
...k,
|
|
64
|
+
children: T
|
|
65
|
+
})
|
|
66
|
+
});
|
|
67
|
+
return /* @__PURE__ */ y("div", {
|
|
68
|
+
className: N.checkboxWrapper,
|
|
69
|
+
slot: c || void 0,
|
|
70
|
+
children: [
|
|
71
|
+
w && /* @__PURE__ */ v(i, {
|
|
72
|
+
slot: "description",
|
|
73
|
+
...D,
|
|
74
|
+
children: w
|
|
75
|
+
}),
|
|
76
|
+
E === "top" && U,
|
|
77
|
+
H,
|
|
78
|
+
E === "bottom" && U
|
|
54
79
|
]
|
|
55
80
|
});
|
|
56
81
|
});
|
|
@@ -72,7 +97,7 @@ F.displayName = "CheckBoxGroupItem";
|
|
|
72
97
|
//#endregion
|
|
73
98
|
//#region packages/components/src/checkbox/SingleCheckbox.tsx
|
|
74
99
|
var I = u((e, t) => {
|
|
75
|
-
let n = S(e,
|
|
100
|
+
let n = S(e, A(e), e.inputRef);
|
|
76
101
|
return /* @__PURE__ */ v(P, {
|
|
77
102
|
...e,
|
|
78
103
|
...n,
|
|
@@ -125,7 +150,7 @@ var R = (e, { value: t }) => {
|
|
|
125
150
|
//#endregion
|
|
126
151
|
//#region packages/components/src/checkbox/CheckboxGroup.tsx
|
|
127
152
|
function V(e) {
|
|
128
|
-
let t =
|
|
153
|
+
let t = k(e), n = r(B), { groupProps: a, labelProps: c, descriptionProps: l } = C(e, t), { allSelected: u, someSelected: d, checkboxValues: f } = R(e.children, t), p = (e) => {
|
|
129
154
|
t.setValue(e ? f : []);
|
|
130
155
|
};
|
|
131
156
|
return /* @__PURE__ */ y("div", {
|
|
@@ -5,7 +5,7 @@ import { t as n } from "./useLocalizedStringFormatter-bRLuRzVD.js";
|
|
|
5
5
|
import { t as r } from "./text-mAeDlv5N.js";
|
|
6
6
|
import { t as i } from "./field-error-DYp2kgFr.js";
|
|
7
7
|
import { n as a, t as o } from "./label-Bius53F0.js";
|
|
8
|
-
import { a as s, c, t as l } from "./list-box-
|
|
8
|
+
import { a as s, c, t as l } from "./list-box-DvX6VTa1.js";
|
|
9
9
|
import { useRef as u } from "react";
|
|
10
10
|
import { Button as d, ComboBox as f, Input as p } from "react-aria-components";
|
|
11
11
|
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
@@ -7,7 +7,7 @@ import { t as o } from "./clear-button-Cb4MTvBR.js";
|
|
|
7
7
|
import * as s from "react";
|
|
8
8
|
import { DateField as c, DateFieldStateContext as l, DateInput as u, DateSegment as d } from "react-aria-components";
|
|
9
9
|
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
10
|
-
import { FocusScope as m, useFocusManager as h } from "
|
|
10
|
+
import { FocusScope as m, useFocusManager as h } from "react-aria";
|
|
11
11
|
import '../assets/date-field.css';var g = {
|
|
12
12
|
en: { clear: "Clear date" },
|
|
13
13
|
sv: { clear: "Rensa datum" }
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { n as e } from "./clsx-BtlV5Vo3.js";
|
|
3
|
+
import { t } from "./createLucideIcon-DhIhuN5D.js";
|
|
4
|
+
import { n, t as r } from "./calendar-C0rlcHfr.js";
|
|
5
|
+
import { t as i } from "./useLocalizedStringFormatter-bRLuRzVD.js";
|
|
6
|
+
import { n as a } from "./button-CFjf-bDe.js";
|
|
7
|
+
import { t as o } from "./text-mAeDlv5N.js";
|
|
8
|
+
import { t as s } from "./field-error-DYp2kgFr.js";
|
|
9
|
+
import { n as c, t as l } from "./label-Bius53F0.js";
|
|
10
|
+
import { t as u } from "./clear-button-Cb4MTvBR.js";
|
|
11
|
+
import { n as d, r as f, t as p } from "./date-field-CYk8-UEY.js";
|
|
12
|
+
import * as m from "react";
|
|
13
|
+
import { DatePicker as h, DatePickerStateContext as g, DateRangePicker as _, DateRangePickerStateContext as v, Group as y, Popover as b } from "react-aria-components";
|
|
14
|
+
import { jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
15
|
+
import { FocusScope as C, useFocusManager as w } from "react-aria";
|
|
16
|
+
import '../assets/date-picker.css';var T = t("calendar-days", [
|
|
17
|
+
["path", {
|
|
18
|
+
d: "M8 2v4",
|
|
19
|
+
key: "1cmpym"
|
|
20
|
+
}],
|
|
21
|
+
["path", {
|
|
22
|
+
d: "M16 2v4",
|
|
23
|
+
key: "4m81vk"
|
|
24
|
+
}],
|
|
25
|
+
["rect", {
|
|
26
|
+
width: "18",
|
|
27
|
+
height: "18",
|
|
28
|
+
x: "3",
|
|
29
|
+
y: "4",
|
|
30
|
+
rx: "2",
|
|
31
|
+
key: "1hopcy"
|
|
32
|
+
}],
|
|
33
|
+
["path", {
|
|
34
|
+
d: "M3 10h18",
|
|
35
|
+
key: "8toen8"
|
|
36
|
+
}],
|
|
37
|
+
["path", {
|
|
38
|
+
d: "M8 14h.01",
|
|
39
|
+
key: "6423bh"
|
|
40
|
+
}],
|
|
41
|
+
["path", {
|
|
42
|
+
d: "M12 14h.01",
|
|
43
|
+
key: "1etili"
|
|
44
|
+
}],
|
|
45
|
+
["path", {
|
|
46
|
+
d: "M16 14h.01",
|
|
47
|
+
key: "1gbofw"
|
|
48
|
+
}],
|
|
49
|
+
["path", {
|
|
50
|
+
d: "M8 18h.01",
|
|
51
|
+
key: "lrp35t"
|
|
52
|
+
}],
|
|
53
|
+
["path", {
|
|
54
|
+
d: "M12 18h.01",
|
|
55
|
+
key: "mhygvu"
|
|
56
|
+
}],
|
|
57
|
+
["path", {
|
|
58
|
+
d: "M16 18h.01",
|
|
59
|
+
key: "kzsmim"
|
|
60
|
+
}]
|
|
61
|
+
]), E = {
|
|
62
|
+
en: {
|
|
63
|
+
clear: "Clear date",
|
|
64
|
+
"open-calendar": "Open calendar"
|
|
65
|
+
},
|
|
66
|
+
sv: {
|
|
67
|
+
clear: "Rensa datum",
|
|
68
|
+
"open-calendar": "Öppna kalender"
|
|
69
|
+
}
|
|
70
|
+
}, D = {
|
|
71
|
+
datePicker: "_datePicker_10ewm_1",
|
|
72
|
+
inputField: "_inputField_10ewm_8",
|
|
73
|
+
medium: "_medium_10ewm_24",
|
|
74
|
+
readOnly: "_readOnly_10ewm_47",
|
|
75
|
+
buttonGroup: "_buttonGroup_10ewm_52",
|
|
76
|
+
iconButton: "_iconButton_10ewm_58",
|
|
77
|
+
popover: "_popover_10ewm_81 _dropdownAnimation_1ljkv_4"
|
|
78
|
+
}, O = (e) => !!e && !!e.value && Object.prototype.hasOwnProperty.call(e.value, "start"), k = ({ isClearable: t, isDisabled: n, isReadOnly: r, size: a }) => {
|
|
79
|
+
let o = m.useContext(g), s = m.useContext(v), c = i(E), l = w(), d = s ?? o, f = O(d) ? !!d.value.start && d.value.end : !!d?.value;
|
|
80
|
+
return t && f && !r ? /* @__PURE__ */ x(u, {
|
|
81
|
+
onPress: () => {
|
|
82
|
+
d?.setValue(null), l?.focusFirst();
|
|
83
|
+
},
|
|
84
|
+
size: a,
|
|
85
|
+
isDisabled: n,
|
|
86
|
+
"aria-label": c.format("clear"),
|
|
87
|
+
className: e(D.iconButton, { [D.medium]: a === "medium" })
|
|
88
|
+
}) : null;
|
|
89
|
+
}, A = ({ children: t, isDisabled: n, isInvalid: r, isReadOnly: o, size: s = "large", isClearable: c = !1 }) => {
|
|
90
|
+
let l = i(E);
|
|
91
|
+
return /* @__PURE__ */ x(y, {
|
|
92
|
+
className: e(D.inputField, {
|
|
93
|
+
[D.medium]: s === "medium",
|
|
94
|
+
[D.readOnly]: o
|
|
95
|
+
}),
|
|
96
|
+
children: /* @__PURE__ */ S(C, { children: [t, /* @__PURE__ */ S("div", {
|
|
97
|
+
className: D.buttonGroup,
|
|
98
|
+
children: [/* @__PURE__ */ x(k, {
|
|
99
|
+
isClearable: c,
|
|
100
|
+
isDisabled: n,
|
|
101
|
+
isReadOnly: o,
|
|
102
|
+
size: s
|
|
103
|
+
}), /* @__PURE__ */ x(a, {
|
|
104
|
+
variant: "icon",
|
|
105
|
+
"aria-label": l.format("open-calendar"),
|
|
106
|
+
className: e(D.iconButton, {
|
|
107
|
+
[D.medium]: s === "medium",
|
|
108
|
+
[D.readOnly]: o
|
|
109
|
+
}),
|
|
110
|
+
"data-invalid": r || void 0,
|
|
111
|
+
size: s,
|
|
112
|
+
children: /* @__PURE__ */ x(T, {
|
|
113
|
+
"aria-hidden": !0,
|
|
114
|
+
size: 20
|
|
115
|
+
})
|
|
116
|
+
})]
|
|
117
|
+
})] })
|
|
118
|
+
});
|
|
119
|
+
}, j = ({ children: e }) => /* @__PURE__ */ x(b, {
|
|
120
|
+
className: D.popover,
|
|
121
|
+
children: e
|
|
122
|
+
}), M = m.forwardRef(({ className: t, description: r, errorMessage: i, errorPosition: a = "top", label: u, popover: p, isClearable: m = !1, isReadOnly: g, isDisabled: _, size: v, ...y }, b) => /* @__PURE__ */ S(h, {
|
|
123
|
+
className: e(D.datePicker, t),
|
|
124
|
+
isReadOnly: g,
|
|
125
|
+
isDisabled: _,
|
|
126
|
+
ref: b,
|
|
127
|
+
...y,
|
|
128
|
+
children: [
|
|
129
|
+
/* @__PURE__ */ x(c, {
|
|
130
|
+
popover: p,
|
|
131
|
+
children: u && /* @__PURE__ */ x(l, { children: u })
|
|
132
|
+
}),
|
|
133
|
+
r && /* @__PURE__ */ x(o, {
|
|
134
|
+
slot: "description",
|
|
135
|
+
children: r
|
|
136
|
+
}),
|
|
137
|
+
a === "top" && /* @__PURE__ */ x(s, { children: i }),
|
|
138
|
+
/* @__PURE__ */ x(A, {
|
|
139
|
+
isClearable: m,
|
|
140
|
+
isReadOnly: g,
|
|
141
|
+
isDisabled: _,
|
|
142
|
+
size: v,
|
|
143
|
+
...y,
|
|
144
|
+
children: /* @__PURE__ */ x(d, { children: (e) => /* @__PURE__ */ x(f, { segment: e }) })
|
|
145
|
+
}),
|
|
146
|
+
a === "bottom" && /* @__PURE__ */ x(s, { children: i }),
|
|
147
|
+
/* @__PURE__ */ x(j, { children: /* @__PURE__ */ x(n, {}) })
|
|
148
|
+
]
|
|
149
|
+
})), N = ({ className: t, description: n, errorMessage: i, errorPosition: a = "top", label: u, popover: m, isClearable: h = !1, isReadOnly: g, isDisabled: v, size: y, ...b }) => /* @__PURE__ */ S(_, {
|
|
150
|
+
className: e(D.datePicker, t),
|
|
151
|
+
isReadOnly: g,
|
|
152
|
+
isDisabled: v,
|
|
153
|
+
...b,
|
|
154
|
+
children: [
|
|
155
|
+
/* @__PURE__ */ x(c, {
|
|
156
|
+
popover: m,
|
|
157
|
+
children: u && /* @__PURE__ */ x(l, { children: u })
|
|
158
|
+
}),
|
|
159
|
+
n && /* @__PURE__ */ x(o, {
|
|
160
|
+
slot: "description",
|
|
161
|
+
children: n
|
|
162
|
+
}),
|
|
163
|
+
a === "top" && /* @__PURE__ */ x(s, { children: i }),
|
|
164
|
+
/* @__PURE__ */ S(A, {
|
|
165
|
+
isClearable: h,
|
|
166
|
+
isReadOnly: g,
|
|
167
|
+
isDisabled: v,
|
|
168
|
+
size: y,
|
|
169
|
+
...b,
|
|
170
|
+
children: [
|
|
171
|
+
/* @__PURE__ */ x(d, {
|
|
172
|
+
slot: "start",
|
|
173
|
+
children: (e) => /* @__PURE__ */ x(f, { segment: e })
|
|
174
|
+
}),
|
|
175
|
+
/* @__PURE__ */ x(p, {}),
|
|
176
|
+
/* @__PURE__ */ x(d, {
|
|
177
|
+
slot: "end",
|
|
178
|
+
children: (e) => /* @__PURE__ */ x(f, { segment: e })
|
|
179
|
+
})
|
|
180
|
+
]
|
|
181
|
+
}),
|
|
182
|
+
a === "bottom" && /* @__PURE__ */ x(s, { children: i }),
|
|
183
|
+
/* @__PURE__ */ x(j, { children: /* @__PURE__ */ x(r, {}) })
|
|
184
|
+
]
|
|
185
|
+
});
|
|
186
|
+
//#endregion
|
|
187
|
+
export { M as n, N as t };
|
|
@@ -24,15 +24,18 @@ var g = class extends l {
|
|
|
24
24
|
item: "_item_48j4n_187",
|
|
25
25
|
option: "_option_48j4n_188",
|
|
26
26
|
inputCheckbox: "_inputCheckbox_48j4n_188"
|
|
27
|
-
}, v = ({ className: t, children: n,
|
|
28
|
-
|
|
29
|
-
layoutOptions: { headingHeight: 38 },
|
|
30
|
-
children: /* @__PURE__ */ m(a, {
|
|
27
|
+
}, v = ({ className: t, children: n, virtualized: r = !0, ...i }) => {
|
|
28
|
+
let o = /* @__PURE__ */ m(a, {
|
|
31
29
|
className: e(_.listBox, t),
|
|
32
|
-
...
|
|
30
|
+
...i,
|
|
33
31
|
children: n
|
|
34
|
-
})
|
|
35
|
-
|
|
32
|
+
});
|
|
33
|
+
return r ? /* @__PURE__ */ m(d, {
|
|
34
|
+
layout: g,
|
|
35
|
+
layoutOptions: { headingHeight: 38 },
|
|
36
|
+
children: o
|
|
37
|
+
}) : o;
|
|
38
|
+
}, y = ({ className: t, children: n, ...r }) => /* @__PURE__ */ m("button", {
|
|
36
39
|
type: "button",
|
|
37
40
|
className: e(_.listBoxItem, _.listBoxButton, t),
|
|
38
41
|
...r,
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
import { n as e, t } from "./clsx-BtlV5Vo3.js";
|
|
2
2
|
import { t as n } from "./chevron-down-Buf0eTzo.js";
|
|
3
|
-
import { n as r } from "./checkbox-
|
|
3
|
+
import { n as r } from "./checkbox-DEN5T_Km.js";
|
|
4
4
|
import { t as i } from "./x-Bs_QW3q8.js";
|
|
5
5
|
import { t as a } from "./useLocalizedStringFormatter-bRLuRzVD.js";
|
|
6
6
|
import { t as o } from "./text-mAeDlv5N.js";
|
|
7
7
|
import { t as s } from "./field-error-DYp2kgFr.js";
|
|
8
8
|
import { n as c, t as l } from "./label-Bius53F0.js";
|
|
9
9
|
import { t as u } from "./popover-Bx2Rch_E.js";
|
|
10
|
-
import { c as d } from "./list-box-
|
|
10
|
+
import { c as d } from "./list-box-DvX6VTa1.js";
|
|
11
11
|
import { n as f, r as p, t as m } from "./tag-CELJrUEQ.js";
|
|
12
12
|
import h, { useContext as g } from "react";
|
|
13
13
|
import { Button as _, Select as v, SelectStateContext as y, SelectValue as b } from "react-aria-components";
|
|
14
14
|
import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
15
|
-
import {
|
|
16
|
-
import { FocusScope as T } from "@react-aria/focus";
|
|
15
|
+
import { FocusScope as w, useFocusManager as T } from "react-aria";
|
|
17
16
|
import '../assets/select.css';var E = {
|
|
18
17
|
en: {
|
|
19
18
|
clearAll: "Clear all",
|
|
@@ -68,7 +67,7 @@ import '../assets/select.css';var E = {
|
|
|
68
67
|
})
|
|
69
68
|
});
|
|
70
69
|
}, A = ({ isDisabled: e }) => {
|
|
71
|
-
let t = h.useContext(y), n = a(E), r =
|
|
70
|
+
let t = h.useContext(y), n = a(E), r = T();
|
|
72
71
|
return /* @__PURE__ */ S(_, {
|
|
73
72
|
"aria-label": n.format("clearAll"),
|
|
74
73
|
className: D.clearButton,
|
|
@@ -126,15 +125,15 @@ import '../assets/select.css';var E = {
|
|
|
126
125
|
};
|
|
127
126
|
//#endregion
|
|
128
127
|
//#region packages/components/src/select/Select.tsx
|
|
129
|
-
function N({ children: e, description: n, errorMessage: r, errorPosition: i = "top", items: a, label: f, popover: p, popoverProps: m,
|
|
130
|
-
return /* @__PURE__ */ S(
|
|
131
|
-
...
|
|
132
|
-
className: t(
|
|
128
|
+
function N({ children: e, description: n, errorMessage: r, errorPosition: i = "top", items: a, label: f, popover: p, popoverProps: m, listBoxProps: h, size: g = "large", ..._ }) {
|
|
129
|
+
return /* @__PURE__ */ S(w, { children: /* @__PURE__ */ C(v, {
|
|
130
|
+
..._,
|
|
131
|
+
className: t(_.className, D.select),
|
|
133
132
|
children: [
|
|
134
133
|
/* @__PURE__ */ S(c, {
|
|
135
134
|
popover: p,
|
|
136
135
|
children: f && /* @__PURE__ */ S(l, {
|
|
137
|
-
"data-disabled":
|
|
136
|
+
"data-disabled": _.isDisabled || void 0,
|
|
138
137
|
children: f
|
|
139
138
|
})
|
|
140
139
|
}),
|
|
@@ -145,11 +144,11 @@ function N({ children: e, description: n, errorMessage: r, errorPosition: i = "t
|
|
|
145
144
|
i === "top" && /* @__PURE__ */ S(s, { children: r }),
|
|
146
145
|
/* @__PURE__ */ C("div", {
|
|
147
146
|
className: D.triggerContainer,
|
|
148
|
-
"data-disabled":
|
|
147
|
+
"data-disabled": _.isDisabled || void 0,
|
|
149
148
|
children: [/* @__PURE__ */ S(M, {
|
|
150
|
-
size:
|
|
151
|
-
...
|
|
152
|
-
}),
|
|
149
|
+
size: g,
|
|
150
|
+
..._
|
|
151
|
+
}), _.selectionMode === "multiple" ? /* @__PURE__ */ S(k, { ..._ }) : null]
|
|
153
152
|
}),
|
|
154
153
|
i === "bottom" && /* @__PURE__ */ S(s, { children: r }),
|
|
155
154
|
/* @__PURE__ */ C(u, {
|
|
@@ -157,13 +156,14 @@ function N({ children: e, description: n, errorMessage: r, errorPosition: i = "t
|
|
|
157
156
|
hideArrow: !0,
|
|
158
157
|
...m,
|
|
159
158
|
className: t(m?.className, D.popover),
|
|
160
|
-
children: [
|
|
159
|
+
children: [_.isSelectableAll && /* @__PURE__ */ S(O, {}), /* @__PURE__ */ S(d, {
|
|
161
160
|
escapeKeyBehavior: "none",
|
|
162
161
|
items: a,
|
|
162
|
+
...h,
|
|
163
163
|
children: e
|
|
164
164
|
})]
|
|
165
165
|
}),
|
|
166
|
-
/* @__PURE__ */ S(j, { ...
|
|
166
|
+
/* @__PURE__ */ S(j, { ..._ })
|
|
167
167
|
]
|
|
168
168
|
}) });
|
|
169
169
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { t as e } from "./clsx-BtlV5Vo3.js";
|
|
3
3
|
import { t } from "./createLucideIcon-DhIhuN5D.js";
|
|
4
|
-
import { n } from "./checkbox-
|
|
4
|
+
import { n } from "./checkbox-DEN5T_Km.js";
|
|
5
5
|
import { Button as r, Cell as i, Collection as a, Column as o, Row as s, Table as c, TableBody as l, TableHeader as u, useTableOptions as d } from "react-aria-components";
|
|
6
6
|
import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
7
7
|
import '../assets/table.css';var h = t("arrow-down", [["path", {
|
|
@@ -4,11 +4,11 @@ import { t as n } from "./text-mAeDlv5N.js";
|
|
|
4
4
|
import { t as r } from "./field-error-DYp2kgFr.js";
|
|
5
5
|
import { n as i, t as a } from "./label-Bius53F0.js";
|
|
6
6
|
import { t as o } from "./clear-button-Cb4MTvBR.js";
|
|
7
|
-
import { n as s, r as c } from "./date-field-
|
|
7
|
+
import { n as s, r as c } from "./date-field-CYk8-UEY.js";
|
|
8
8
|
import * as l from "react";
|
|
9
9
|
import { TimeField as u, TimeFieldStateContext as d } from "react-aria-components";
|
|
10
10
|
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
11
|
-
import { FocusScope as m, useFocusManager as h } from "
|
|
11
|
+
import { FocusScope as m, useFocusManager as h } from "react-aria";
|
|
12
12
|
import '../assets/time-field.css';var g = {
|
|
13
13
|
en: { clear: "Clear time" },
|
|
14
14
|
sv: { clear: "Rensa tid" }
|
|
@@ -22,7 +22,7 @@ declare const _default: {
|
|
|
22
22
|
};
|
|
23
23
|
};
|
|
24
24
|
render: (args: import('./ComboBox').ComboBoxProps<{
|
|
25
|
-
id: import('react-aria').Key;
|
|
25
|
+
id: import('react-aria-components').Key;
|
|
26
26
|
name: string;
|
|
27
27
|
}>) => import("react/jsx-runtime").JSX.Element;
|
|
28
28
|
};
|
|
@@ -35,6 +35,7 @@ export declare const Disabled: Story;
|
|
|
35
35
|
export declare const ReadOnly: Story;
|
|
36
36
|
export declare const Required: Story;
|
|
37
37
|
export declare const Sectioned: Story<Section>;
|
|
38
|
+
export declare const NotVirtualized: Story<Section>;
|
|
38
39
|
export declare const PerformanceTest: Story;
|
|
39
40
|
export declare const AsynchronousLoadingWithEmptyMessage: Story;
|
|
40
41
|
export declare const InfiniteScroll: Story;
|
package/combobox/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../chunks/combobox-
|
|
1
|
+
import { t as e } from "../chunks/combobox-UjxDfSoD.js";
|
|
2
2
|
export { e as ComboBox };
|
package/date-field/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as e, n as t, r as n, t as r } from "../chunks/date-field-
|
|
1
|
+
import { i as e, n as t, r as n, t as r } from "../chunks/date-field-CYk8-UEY.js";
|
|
2
2
|
export { e as DateField, t as DateInput, r as DateInputDivider, n as DateSegment };
|
package/date-picker/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, t } from "../chunks/date-picker-
|
|
1
|
+
import { n as e, t } from "../chunks/date-picker-BQcIYROH.js";
|
|
2
2
|
export { e as DatePicker, t as DateRangePicker };
|
package/index.js
CHANGED
|
@@ -5,11 +5,11 @@ import { t as n } from "./chunks/clsx-BtlV5Vo3.js";
|
|
|
5
5
|
import { t as r } from "./chunks/spinner-C3WiZYld.js";
|
|
6
6
|
import { a as i, i as a, n as o, r as s, t as c } from "./chunks/layout-BzK7P4Xn.js";
|
|
7
7
|
import { t as l } from "./chunks/link-CZNuhFX6.js";
|
|
8
|
-
import { a as u, i as d, n as f, o as p, r as m, t as h } from "./chunks/table-
|
|
8
|
+
import { a as u, i as d, n as f, o as p, r as m, t as h } from "./chunks/table-jarDZ4q4.js";
|
|
9
9
|
import { t as g } from "./chunks/link-button-ZsK6UGko.js";
|
|
10
|
-
import { n as _, t as v } from "./chunks/date-picker-
|
|
10
|
+
import { n as _, t as v } from "./chunks/date-picker-BQcIYROH.js";
|
|
11
11
|
import { n as y, t as b } from "./chunks/calendar-C0rlcHfr.js";
|
|
12
|
-
import { n as x, t as S } from "./chunks/checkbox-
|
|
12
|
+
import { n as x, t as S } from "./chunks/checkbox-DEN5T_Km.js";
|
|
13
13
|
import { n as C, t as w } from "./chunks/color-scheme-switch-FjmPZdE4.js";
|
|
14
14
|
import { t as T } from "./chunks/search-field-Ci2UjkmK.js";
|
|
15
15
|
import { n as E, t as D } from "./chunks/file-list-DYOuch5G.js";
|
|
@@ -28,9 +28,9 @@ import { n as X, r as Z, t as Q } from "./chunks/modal-Dr0ythpF.js";
|
|
|
28
28
|
import { t as $ } from "./chunks/icons-Dw_ZbztW.js";
|
|
29
29
|
import { n as ee, t as te } from "./chunks/toggle-button-DlPo9GJW.js";
|
|
30
30
|
import { a as ne, i as re, n as ie, o as ae, r as oe, t as se } from "./chunks/menu-CB6VDQ-u.js";
|
|
31
|
-
import { t as ce } from "./chunks/combobox-
|
|
32
|
-
import { a as le, c as ue, i as de, n as fe, o as pe, r as me, s as he, t as ge } from "./chunks/list-box-
|
|
33
|
-
import { i as _e, n as ve, r as ye, t as be } from "./chunks/date-field-
|
|
31
|
+
import { t as ce } from "./chunks/combobox-UjxDfSoD.js";
|
|
32
|
+
import { a as le, c as ue, i as de, n as fe, o as pe, r as me, s as he, t as ge } from "./chunks/list-box-DvX6VTa1.js";
|
|
33
|
+
import { i as _e, n as ve, r as ye, t as be } from "./chunks/date-field-CYk8-UEY.js";
|
|
34
34
|
import { n as xe, t as Se } from "./chunks/file-upload-CZRTVw5O.js";
|
|
35
35
|
import { n as Ce, t as we } from "./chunks/grid-CUYMbO7c.js";
|
|
36
36
|
import { t as Te } from "./chunks/info-banner-hHq0Atii.js";
|
|
@@ -38,12 +38,12 @@ import { n as Ee, t as De } from "./chunks/tooltip-BE_r_CBm.js";
|
|
|
38
38
|
import { n as Oe, t as ke } from "./chunks/logo-D7tz-4hp.js";
|
|
39
39
|
import { t as Ae } from "./chunks/progress-bar-5H5WvG7R.js";
|
|
40
40
|
import { n as je, t as Me } from "./chunks/radio-CsAvwCn2.js";
|
|
41
|
-
import { t as Ne } from "./chunks/select-
|
|
41
|
+
import { t as Ne } from "./chunks/select-DneAUko_.js";
|
|
42
42
|
import { n as Pe, r as Fe, t as Ie } from "./chunks/tag-CELJrUEQ.js";
|
|
43
43
|
import { t as Le } from "./chunks/skeleton-OqKFBcmO.js";
|
|
44
44
|
import { i as Re, n as ze, r as Be, t as Ve } from "./chunks/tabs-eshGdQJJ.js";
|
|
45
45
|
import { i as He, n as Ue, r as We, t as Ge } from "./chunks/textfield-5Sw4fgE5.js";
|
|
46
|
-
import { t as Ke } from "./chunks/time-field-
|
|
46
|
+
import { t as Ke } from "./chunks/time-field-Dv9xYdex.js";
|
|
47
47
|
import { a as qe, i as Je, n as Ye, o as Xe, r as Ze, t as Qe } from "./chunks/toast-AYzfHBcQ.js";
|
|
48
48
|
//#endregion
|
|
49
49
|
//#region packages/components/src/version.ts
|
|
@@ -59,7 +59,7 @@ var $e = {
|
|
|
59
59
|
description: "Midas Components",
|
|
60
60
|
homepage: "https://designsystem.migrationsverket.se/",
|
|
61
61
|
license: "CC0-1.0",
|
|
62
|
-
version: "17.
|
|
62
|
+
version: "17.19.0",
|
|
63
63
|
module: "./index.js",
|
|
64
64
|
type: "module",
|
|
65
65
|
main: "./index.js",
|
|
@@ -82,7 +82,7 @@ var $e = {
|
|
|
82
82
|
"./*": "./*/index.js"
|
|
83
83
|
},
|
|
84
84
|
dependencies: {
|
|
85
|
-
"@midas-ds/theme": "3.15.
|
|
85
|
+
"@midas-ds/theme": "3.15.5",
|
|
86
86
|
"@react-aria/focus": "^3.21.5",
|
|
87
87
|
"@react-stately/toggle": "^3.9.5",
|
|
88
88
|
"@react-stately/utils": "^3.11.0",
|
package/list-box/ListBox.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
import { ListBoxProps } from 'react-aria-components';
|
|
2
|
-
export
|
|
3
|
-
|
|
1
|
+
import { ListBoxProps as AriaListBoxProps } from 'react-aria-components';
|
|
2
|
+
export interface ListBoxProps<T extends object> extends AriaListBoxProps<T> {
|
|
3
|
+
/** @default true */
|
|
4
|
+
virtualized?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare const ListBox: <T extends object>({ className, children, virtualized, ...rest }: ListBoxProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,7 +3,7 @@ import { Fruit } from '../../../../tools/test-utils/src/index.ts';
|
|
|
3
3
|
import { ListBox } from './ListBox';
|
|
4
4
|
type Story = StoryObj<typeof ListBox<Fruit>>;
|
|
5
5
|
declare const _default: {
|
|
6
|
-
component: <T extends object>({ className, children, ...rest }: import('
|
|
6
|
+
component: <T extends object>({ className, children, virtualized, ...rest }: import('./ListBox').ListBoxProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
subcomponents: {
|
|
8
8
|
ListBoxItem: <T extends object>({ children, className, textValue, ...rest }: import('react-aria-components').ListBoxItemProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
};
|
|
@@ -20,3 +20,4 @@ declare const _default: {
|
|
|
20
20
|
};
|
|
21
21
|
export default _default;
|
|
22
22
|
export declare const SelectionModeSingle: Story;
|
|
23
|
+
export declare const NotVirtualized: Story;
|
package/list-box/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "../chunks/list-box-
|
|
1
|
+
import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "../chunks/list-box-DvX6VTa1.js";
|
|
2
2
|
export { t as ListBox, o as ListBoxButton, s as ListBoxEmptyState, r as ListBoxHeader, i as ListBoxItem, a as ListBoxLoadMoreItem, e as ListBoxPopover, n as ListBoxSection };
|
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.
|
|
17
|
+
"version": "17.19.0",
|
|
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.15.
|
|
44
|
+
"@midas-ds/theme": "3.15.5",
|
|
45
45
|
"@react-aria/focus": "^3.21.5",
|
|
46
46
|
"@react-stately/toggle": "^3.9.5",
|
|
47
47
|
"@react-stately/utils": "^3.11.0",
|
package/select/Select.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { SelectProps, ValidationResult } from 'react-aria-components';
|
|
2
2
|
import { InfoPopoverProps } from '../label';
|
|
3
3
|
import { Size } from '../common/types';
|
|
4
|
+
import { ListBoxProps } from '../list-box';
|
|
4
5
|
import { Popover } from '../popover';
|
|
5
6
|
import * as React from 'react';
|
|
6
7
|
export type SelectionMode = 'single' | 'multiple';
|
|
@@ -35,5 +36,9 @@ export interface MidasSelectProps<T extends object, M extends SelectionMode = 's
|
|
|
35
36
|
* Props passed to the internal Popover element.
|
|
36
37
|
*/
|
|
37
38
|
popoverProps?: Omit<React.ComponentProps<typeof Popover>, 'children'>;
|
|
39
|
+
/**
|
|
40
|
+
* Props passed to the internal ListBox element.
|
|
41
|
+
*/
|
|
42
|
+
listBoxProps?: Omit<ListBoxProps<T>, 'items' | 'children'>;
|
|
38
43
|
}
|
|
39
|
-
export declare function Select<T extends object, M extends SelectionMode = 'single'>({ children, description, errorMessage, errorPosition, items, label, popover, popoverProps, size, ...props }: MidasSelectProps<T, M>): import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
export declare function Select<T extends object, M extends SelectionMode = 'single'>({ children, description, errorMessage, errorPosition, items, label, popover, popoverProps, listBoxProps, size, ...props }: MidasSelectProps<T, M>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -41,6 +41,7 @@ export declare const WithTags: Story<Item, 'multiple'>;
|
|
|
41
41
|
export declare const SelectAllEnabled: Story<Item, 'multiple'>;
|
|
42
42
|
export declare const DS872: Story;
|
|
43
43
|
export declare const StaticSections: Story;
|
|
44
|
+
export declare const NotVirtualized: Story;
|
|
44
45
|
export declare const DynamicSections: Story<Section>;
|
|
45
46
|
export declare const RequiredMultipleWithTags: Story<Item, 'multiple'>;
|
|
46
47
|
export declare const RequiredMultipleWithClearAll: Story<Item, 'multiple'>;
|
package/select/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../chunks/select-
|
|
1
|
+
import { t as e } from "../chunks/select-DneAUko_.js";
|
|
2
2
|
export { e as Select };
|
package/table/Table.stories.d.ts
CHANGED
package/table/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, i as t, n, o as r, r as i, t as a } from "../chunks/table-
|
|
1
|
+
import { a as e, i as t, n, o as r, r as i, t as a } from "../chunks/table-jarDZ4q4.js";
|
|
2
2
|
export { a as Cell, n as Column, i as Row, t as Table, e as TableBody, r as TableHeader };
|
|
@@ -28,10 +28,8 @@ export declare const Disabled: {
|
|
|
28
28
|
isDisabled: boolean;
|
|
29
29
|
size?: import('..').Size;
|
|
30
30
|
children?: import('react').ReactNode;
|
|
31
|
-
style?:
|
|
32
|
-
|
|
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;
|
|
31
|
+
style?: import('react-aria-components').StyleOrFunction<import('react-aria-components').TextFieldRenderProps> | undefined;
|
|
32
|
+
render?: import('react-aria-components').DOMRenderFunction<"div", import('react-aria-components').TextFieldRenderProps> | undefined;
|
|
35
33
|
id?: string;
|
|
36
34
|
dir?: string | undefined;
|
|
37
35
|
lang?: string | undefined;
|
|
@@ -115,20 +113,20 @@ export declare const Disabled: {
|
|
|
115
113
|
'aria-haspopup'?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog";
|
|
116
114
|
'aria-label'?: string;
|
|
117
115
|
'aria-labelledby'?: string;
|
|
118
|
-
onCopy?: import('react').ClipboardEventHandler<HTMLInputElement
|
|
119
|
-
onCut?: import('react').ClipboardEventHandler<HTMLInputElement
|
|
120
|
-
onPaste?: import('react').ClipboardEventHandler<HTMLInputElement
|
|
121
|
-
onCompositionEnd?: import('react').CompositionEventHandler<HTMLInputElement
|
|
122
|
-
onCompositionStart?: import('react').CompositionEventHandler<HTMLInputElement
|
|
123
|
-
onCompositionUpdate?: import('react').CompositionEventHandler<HTMLInputElement
|
|
116
|
+
onCopy?: import('react').ClipboardEventHandler<HTMLInputElement> | undefined;
|
|
117
|
+
onCut?: import('react').ClipboardEventHandler<HTMLInputElement> | undefined;
|
|
118
|
+
onPaste?: import('react').ClipboardEventHandler<HTMLInputElement> | undefined;
|
|
119
|
+
onCompositionEnd?: import('react').CompositionEventHandler<HTMLInputElement> | undefined;
|
|
120
|
+
onCompositionStart?: import('react').CompositionEventHandler<HTMLInputElement> | undefined;
|
|
121
|
+
onCompositionUpdate?: import('react').CompositionEventHandler<HTMLInputElement> | undefined;
|
|
124
122
|
onFocus?: ((e: import('react').FocusEvent<HTMLInputElement, Element>) => void) | undefined;
|
|
125
123
|
onBlur?: ((e: import('react').FocusEvent<HTMLInputElement, Element>) => void) | undefined;
|
|
126
124
|
onChange?: ((value: string) => void) | undefined;
|
|
127
|
-
onBeforeInput?: import('react').FormEventHandler<HTMLInputElement
|
|
128
|
-
onInput?: import('react').FormEventHandler<HTMLInputElement
|
|
125
|
+
onBeforeInput?: import('react').FormEventHandler<HTMLInputElement> | undefined;
|
|
126
|
+
onInput?: import('react').FormEventHandler<HTMLInputElement> | undefined;
|
|
129
127
|
onKeyDown?: (e: import('@react-types/shared').KeyboardEvent) => void;
|
|
130
128
|
onKeyUp?: (e: import('@react-types/shared').KeyboardEvent) => void;
|
|
131
|
-
onSelect?: import('react').ReactEventHandler<HTMLInputElement
|
|
129
|
+
onSelect?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
|
132
130
|
autoFocus?: boolean;
|
|
133
131
|
onFocusChange?: (isFocused: boolean) => void;
|
|
134
132
|
excludeFromTabOrder?: boolean;
|
|
@@ -151,9 +149,7 @@ export declare const Disabled: {
|
|
|
151
149
|
validate?: ((value: string) => import('@react-types/shared').ValidationError | true | null | undefined) | undefined;
|
|
152
150
|
errorPosition?: "top" | "bottom";
|
|
153
151
|
showCounter?: boolean;
|
|
154
|
-
className?:
|
|
155
|
-
defaultClassName: string | undefined;
|
|
156
|
-
}) => string);
|
|
152
|
+
className?: import('react-aria-components').ClassNameOrFunction<import('react-aria-components').InputRenderProps>;
|
|
157
153
|
color?: string | undefined;
|
|
158
154
|
role?: import('react').AriaRole | undefined;
|
|
159
155
|
suppressHydrationWarning?: boolean | undefined;
|
|
@@ -2,7 +2,7 @@ import { StoryObj } from '@storybook/react-vite';
|
|
|
2
2
|
import { TimeField } from './TimeField';
|
|
3
3
|
type Story = StoryObj<typeof TimeField>;
|
|
4
4
|
declare const _default: {
|
|
5
|
-
component: <T extends import('react-aria').TimeValue>(props: import('./TimeField').TimeFieldProps<T> & {
|
|
5
|
+
component: <T extends import('react-aria-components').TimeValue>(props: import('./TimeField').TimeFieldProps<T> & {
|
|
6
6
|
ref?: React.Ref<HTMLDivElement>;
|
|
7
7
|
}) => React.ReactElement | null;
|
|
8
8
|
title: string;
|
package/time-field/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../chunks/time-field-
|
|
1
|
+
import { t as e } from "../chunks/time-field-Dv9xYdex.js";
|
|
2
2
|
export { e as TimeField };
|
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { n as e } from "./clsx-BtlV5Vo3.js";
|
|
3
|
-
import { t } from "./createLucideIcon-DhIhuN5D.js";
|
|
4
|
-
import { n, t as r } from "./calendar-C0rlcHfr.js";
|
|
5
|
-
import { t as i } from "./useLocalizedStringFormatter-bRLuRzVD.js";
|
|
6
|
-
import { n as a } from "./button-CFjf-bDe.js";
|
|
7
|
-
import { t as o } from "./text-mAeDlv5N.js";
|
|
8
|
-
import { t as s } from "./field-error-DYp2kgFr.js";
|
|
9
|
-
import { n as c, t as l } from "./label-Bius53F0.js";
|
|
10
|
-
import { t as u } from "./clear-button-Cb4MTvBR.js";
|
|
11
|
-
import { n as d, r as f, t as p } from "./date-field-U4owDpGF.js";
|
|
12
|
-
import * as m from "react";
|
|
13
|
-
import { DatePicker as h, DatePickerStateContext as g, DateRangePicker as _, DateRangePickerStateContext as v, Dialog as y, Group as b, Popover as x } from "react-aria-components";
|
|
14
|
-
import { jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
15
|
-
import { FocusScope as w, useFocusManager as T } from "@react-aria/focus";
|
|
16
|
-
import '../assets/date-picker.css';var E = t("calendar-days", [
|
|
17
|
-
["path", {
|
|
18
|
-
d: "M8 2v4",
|
|
19
|
-
key: "1cmpym"
|
|
20
|
-
}],
|
|
21
|
-
["path", {
|
|
22
|
-
d: "M16 2v4",
|
|
23
|
-
key: "4m81vk"
|
|
24
|
-
}],
|
|
25
|
-
["rect", {
|
|
26
|
-
width: "18",
|
|
27
|
-
height: "18",
|
|
28
|
-
x: "3",
|
|
29
|
-
y: "4",
|
|
30
|
-
rx: "2",
|
|
31
|
-
key: "1hopcy"
|
|
32
|
-
}],
|
|
33
|
-
["path", {
|
|
34
|
-
d: "M3 10h18",
|
|
35
|
-
key: "8toen8"
|
|
36
|
-
}],
|
|
37
|
-
["path", {
|
|
38
|
-
d: "M8 14h.01",
|
|
39
|
-
key: "6423bh"
|
|
40
|
-
}],
|
|
41
|
-
["path", {
|
|
42
|
-
d: "M12 14h.01",
|
|
43
|
-
key: "1etili"
|
|
44
|
-
}],
|
|
45
|
-
["path", {
|
|
46
|
-
d: "M16 14h.01",
|
|
47
|
-
key: "1gbofw"
|
|
48
|
-
}],
|
|
49
|
-
["path", {
|
|
50
|
-
d: "M8 18h.01",
|
|
51
|
-
key: "lrp35t"
|
|
52
|
-
}],
|
|
53
|
-
["path", {
|
|
54
|
-
d: "M12 18h.01",
|
|
55
|
-
key: "mhygvu"
|
|
56
|
-
}],
|
|
57
|
-
["path", {
|
|
58
|
-
d: "M16 18h.01",
|
|
59
|
-
key: "kzsmim"
|
|
60
|
-
}]
|
|
61
|
-
]), D = {
|
|
62
|
-
en: {
|
|
63
|
-
clear: "Clear date",
|
|
64
|
-
"open-calendar": "Open calendar"
|
|
65
|
-
},
|
|
66
|
-
sv: {
|
|
67
|
-
clear: "Rensa datum",
|
|
68
|
-
"open-calendar": "Öppna kalender"
|
|
69
|
-
}
|
|
70
|
-
}, O = {
|
|
71
|
-
datePicker: "_datePicker_feay3_1",
|
|
72
|
-
inputField: "_inputField_feay3_8",
|
|
73
|
-
medium: "_medium_feay3_24",
|
|
74
|
-
readOnly: "_readOnly_feay3_47",
|
|
75
|
-
buttonGroup: "_buttonGroup_feay3_52",
|
|
76
|
-
iconButton: "_iconButton_feay3_58",
|
|
77
|
-
popover: "_popover_feay3_81 _dropdownAnimation_1ljkv_4",
|
|
78
|
-
dialog: "_dialog_feay3_85"
|
|
79
|
-
}, k = (e) => !!e && !!e.value && Object.prototype.hasOwnProperty.call(e.value, "start"), A = ({ isClearable: t, isDisabled: n, isReadOnly: r, size: a }) => {
|
|
80
|
-
let o = m.useContext(g), s = m.useContext(v), c = i(D), l = T(), d = s ?? o, f = k(d) ? !!d.value.start && d.value.end : !!d?.value;
|
|
81
|
-
return t && f && !r ? /* @__PURE__ */ S(u, {
|
|
82
|
-
onPress: () => {
|
|
83
|
-
d?.setValue(null), l?.focusFirst();
|
|
84
|
-
},
|
|
85
|
-
size: a,
|
|
86
|
-
isDisabled: n,
|
|
87
|
-
"aria-label": c.format("clear"),
|
|
88
|
-
className: e(O.iconButton, { [O.medium]: a === "medium" })
|
|
89
|
-
}) : null;
|
|
90
|
-
}, j = ({ children: t, isDisabled: n, isInvalid: r, isReadOnly: o, size: s = "large", isClearable: c = !1 }) => {
|
|
91
|
-
let l = i(D);
|
|
92
|
-
return /* @__PURE__ */ S(b, {
|
|
93
|
-
className: e(O.inputField, {
|
|
94
|
-
[O.medium]: s === "medium",
|
|
95
|
-
[O.readOnly]: o
|
|
96
|
-
}),
|
|
97
|
-
children: /* @__PURE__ */ C(w, { children: [t, /* @__PURE__ */ C("div", {
|
|
98
|
-
className: O.buttonGroup,
|
|
99
|
-
children: [/* @__PURE__ */ S(A, {
|
|
100
|
-
isClearable: c,
|
|
101
|
-
isDisabled: n,
|
|
102
|
-
isReadOnly: o,
|
|
103
|
-
size: s
|
|
104
|
-
}), /* @__PURE__ */ S(a, {
|
|
105
|
-
variant: "icon",
|
|
106
|
-
"aria-label": l.format("open-calendar"),
|
|
107
|
-
className: e(O.iconButton, {
|
|
108
|
-
[O.medium]: s === "medium",
|
|
109
|
-
[O.readOnly]: o
|
|
110
|
-
}),
|
|
111
|
-
"data-invalid": r || void 0,
|
|
112
|
-
size: s,
|
|
113
|
-
children: /* @__PURE__ */ S(E, {
|
|
114
|
-
"aria-hidden": !0,
|
|
115
|
-
size: 20
|
|
116
|
-
})
|
|
117
|
-
})]
|
|
118
|
-
})] })
|
|
119
|
-
});
|
|
120
|
-
}, M = ({ children: e }) => /* @__PURE__ */ S(x, {
|
|
121
|
-
className: O.popover,
|
|
122
|
-
children: /* @__PURE__ */ S(y, {
|
|
123
|
-
className: O.dialog,
|
|
124
|
-
children: e
|
|
125
|
-
})
|
|
126
|
-
}), N = m.forwardRef(({ className: t, description: r, errorMessage: i, errorPosition: a = "top", label: u, popover: p, isClearable: m = !1, isReadOnly: g, isDisabled: _, size: v, ...y }, b) => /* @__PURE__ */ C(h, {
|
|
127
|
-
className: e(O.datePicker, t),
|
|
128
|
-
isReadOnly: g,
|
|
129
|
-
isDisabled: _,
|
|
130
|
-
ref: b,
|
|
131
|
-
...y,
|
|
132
|
-
children: [
|
|
133
|
-
/* @__PURE__ */ S(c, {
|
|
134
|
-
popover: p,
|
|
135
|
-
children: u && /* @__PURE__ */ S(l, { children: u })
|
|
136
|
-
}),
|
|
137
|
-
r && /* @__PURE__ */ S(o, {
|
|
138
|
-
slot: "description",
|
|
139
|
-
children: r
|
|
140
|
-
}),
|
|
141
|
-
a === "top" && /* @__PURE__ */ S(s, { children: i }),
|
|
142
|
-
/* @__PURE__ */ S(j, {
|
|
143
|
-
isClearable: m,
|
|
144
|
-
isReadOnly: g,
|
|
145
|
-
isDisabled: _,
|
|
146
|
-
size: v,
|
|
147
|
-
...y,
|
|
148
|
-
children: /* @__PURE__ */ S(d, { children: (e) => /* @__PURE__ */ S(f, { segment: e }) })
|
|
149
|
-
}),
|
|
150
|
-
a === "bottom" && /* @__PURE__ */ S(s, { children: i }),
|
|
151
|
-
/* @__PURE__ */ S(M, { children: /* @__PURE__ */ S(n, {}) })
|
|
152
|
-
]
|
|
153
|
-
})), P = ({ className: t, description: n, errorMessage: i, errorPosition: a = "top", label: u, popover: m, isClearable: h = !1, isReadOnly: g, isDisabled: v, size: y, ...b }) => /* @__PURE__ */ C(_, {
|
|
154
|
-
className: e(O.datePicker, t),
|
|
155
|
-
isReadOnly: g,
|
|
156
|
-
isDisabled: v,
|
|
157
|
-
...b,
|
|
158
|
-
children: [
|
|
159
|
-
/* @__PURE__ */ S(c, {
|
|
160
|
-
popover: m,
|
|
161
|
-
children: u && /* @__PURE__ */ S(l, { children: u })
|
|
162
|
-
}),
|
|
163
|
-
n && /* @__PURE__ */ S(o, {
|
|
164
|
-
slot: "description",
|
|
165
|
-
children: n
|
|
166
|
-
}),
|
|
167
|
-
a === "top" && /* @__PURE__ */ S(s, { children: i }),
|
|
168
|
-
/* @__PURE__ */ C(j, {
|
|
169
|
-
isClearable: h,
|
|
170
|
-
isReadOnly: g,
|
|
171
|
-
isDisabled: v,
|
|
172
|
-
size: y,
|
|
173
|
-
...b,
|
|
174
|
-
children: [
|
|
175
|
-
/* @__PURE__ */ S(d, {
|
|
176
|
-
slot: "start",
|
|
177
|
-
children: (e) => /* @__PURE__ */ S(f, { segment: e })
|
|
178
|
-
}),
|
|
179
|
-
/* @__PURE__ */ S(p, {}),
|
|
180
|
-
/* @__PURE__ */ S(d, {
|
|
181
|
-
slot: "end",
|
|
182
|
-
children: (e) => /* @__PURE__ */ S(f, { segment: e })
|
|
183
|
-
})
|
|
184
|
-
]
|
|
185
|
-
}),
|
|
186
|
-
a === "bottom" && /* @__PURE__ */ S(s, { children: i }),
|
|
187
|
-
/* @__PURE__ */ S(M, { children: /* @__PURE__ */ S(r, {}) })
|
|
188
|
-
]
|
|
189
|
-
});
|
|
190
|
-
//#endregion
|
|
191
|
-
export { N as n, P as t };
|