@midas-ds/components 8.0.0 → 8.2.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 +32 -0
- package/accordion/AccordionItem.d.ts +5 -2
- package/calendar/Calendar.d.ts +4 -4
- package/calendar/CalendarGrid.d.ts +6 -0
- package/calendar/CalendarHeader.d.ts +2 -0
- package/calendar/RangeCalendar.d.ts +4 -4
- package/calendar/index.d.ts +2 -2
- package/color-scheme-switch/ColorSchemeSwitch.d.ts +13 -0
- package/color-scheme-switch/index.d.ts +1 -0
- package/combobox/ComboBox.d.ts +2 -0
- package/combobox/index.d.ts +2 -1
- package/combobox/types.d.ts +3 -0
- package/combobox/utils.d.ts +8 -0
- package/date-field/DateField.d.ts +4 -4
- package/date-field/DateInput.d.ts +4 -0
- package/date-field/DateInputDivider.d.ts +2 -0
- package/date-field/DateSegment.d.ts +4 -0
- package/date-field/index.d.ts +4 -1
- package/date-picker/DatePicker.d.ts +4 -10
- package/date-picker/DatePickerInputField.d.ts +8 -0
- package/date-picker/DatePickerPopover.d.ts +6 -0
- package/date-picker/DateRangePicker.d.ts +9 -0
- package/date-picker/index.d.ts +2 -2
- package/index.cjs +44 -29
- package/index.css +1 -1
- package/index.d.ts +11 -9
- package/index.js +6335 -6044
- package/label/Label.d.ts +1 -1
- package/package.json +1 -1
- package/select/utils.d.ts +7 -0
- package/theme/index.d.ts +23 -17
- package/theme/tokens.d.ts +23 -17
- package/theme.cjs +1 -1
- package/theme.js +2 -2
- package/toggle-button/ToggleButton.d.ts +2 -0
- package/toggle-button/ToggleButtonGroup.d.ts +3 -0
- package/toggle-button/index.d.ts +2 -0
- package/tokens-CIuAmuws.cjs +1 -0
- package/{tokens-f_GueHFO.js → tokens-Dq5vcWLv.js} +43 -37
- package/tooltip/Tooltip.d.ts +1 -2
- package/utils/storybook.d.ts +4 -0
- package/utils/test.d.ts +7 -0
- package/tokens-BzHPOv0Z.cjs +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,35 @@
|
|
|
1
|
+
## 8.2.0
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- **theme:** add --icon-tertiary, new color for --icon-secondary ([f0ef381472](https://github.com/migrationsverket/midas/commit/f0ef381472))
|
|
6
|
+
- **label:** deprecate prop variant and add new css class ([42e33be662](https://github.com/migrationsverket/midas/commit/42e33be662))
|
|
7
|
+
- **tooltip:** allow locale agnostic tooltip placement ([#492](https://github.com/migrationsverket/midas/pull/492))
|
|
8
|
+
|
|
9
|
+
### 🩹 Fixes
|
|
10
|
+
|
|
11
|
+
- **accordion:** remove disabled styling if component has disabled children ([1c704b714d](https://github.com/migrationsverket/midas/commit/1c704b714d))
|
|
12
|
+
- **checkbox:** set correct line-height and adjust high contrast visibility ([6ca7ea9ba9](https://github.com/migrationsverket/midas/commit/6ca7ea9ba9))
|
|
13
|
+
|
|
14
|
+
### Documentation Changes
|
|
15
|
+
|
|
16
|
+
- **propstable:** add support for enums in table ([#511](https://github.com/migrationsverket/midas/pull/511))
|
|
17
|
+
- **modal:** change arg types in storybook ([f9588f170b](https://github.com/migrationsverket/midas/commit/f9588f170b))
|
|
18
|
+
|
|
19
|
+
## 8.1.0
|
|
20
|
+
|
|
21
|
+
### 🚀 Features
|
|
22
|
+
|
|
23
|
+
- **accordion:** accordion status ✅ / 🚨 ([#485](https://github.com/migrationsverket/midas/pull/485))
|
|
24
|
+
|
|
25
|
+
### 🩹 Fixes
|
|
26
|
+
|
|
27
|
+
- **theme:** add dark mode focus ([#483](https://github.com/migrationsverket/midas/pull/483))
|
|
28
|
+
- **modal:** make text in modal selectable ([#490](https://github.com/migrationsverket/midas/pull/490))
|
|
29
|
+
- **accordion:** rename invalid token ([e4b13c928](https://github.com/migrationsverket/midas/commit/e4b13c928))
|
|
30
|
+
- **select:** remove explicit size for indeterminate symbol ([5f805c134](https://github.com/migrationsverket/midas/commit/5f805c134))
|
|
31
|
+
- **select:** change checkbox size to prevent disappearing border ([3ab520633](https://github.com/migrationsverket/midas/commit/3ab520633))
|
|
32
|
+
|
|
1
33
|
# 8.0.0
|
|
2
34
|
|
|
3
35
|
### 🚀 Features
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import { DisclosureProps
|
|
1
|
+
import { DisclosureProps } from 'react-aria-components';
|
|
2
|
+
import { HeadingProps } from '../heading';
|
|
2
3
|
import * as React from 'react';
|
|
3
4
|
interface MidasAccordionItem extends Omit<DisclosureProps, 'children'> {
|
|
4
5
|
/** The text displayed in the collapsed state. If a ReactNode is proveded we're not adding a heading and you have to provide one yourself. */
|
|
5
6
|
title?: string | React.ReactNode;
|
|
6
7
|
children?: React.ReactNode;
|
|
7
8
|
/** Adjust the titles heading level to your heading tag structure */
|
|
8
|
-
headingLevel?: HeadingProps['
|
|
9
|
+
headingLevel?: HeadingProps['elementType'];
|
|
10
|
+
/** Display an accordion item in different status states */
|
|
11
|
+
type?: 'default' | 'success' | 'warning';
|
|
9
12
|
}
|
|
10
13
|
export declare const AccordionItem: React.FC<MidasAccordionItem>;
|
|
11
14
|
export {};
|
package/calendar/Calendar.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { CalendarProps as AriaCalendarProps, DateValue } from 'react-aria-components';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export interface CalendarProps extends AriaCalendarProps<DateValue> {
|
|
3
4
|
errorMessage?: string;
|
|
4
5
|
}
|
|
5
|
-
export declare
|
|
6
|
-
export {};
|
|
6
|
+
export declare const Calendar: React.FC<CalendarProps>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CalendarGridProps as AriaCalendarGridProps } from 'react-aria-components';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export interface CalendarGridProps {
|
|
4
|
+
weekdayStyle?: AriaCalendarGridProps['weekdayStyle'];
|
|
5
|
+
}
|
|
6
|
+
export declare const CalendarGrid: React.FC<CalendarGridProps>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { DateValue, RangeCalendarProps as AriaRangeCalendarProps } from 'react-aria-components';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export interface RangeCalendarProps extends AriaRangeCalendarProps<DateValue> {
|
|
3
4
|
errorMessage?: string;
|
|
4
5
|
}
|
|
5
|
-
export declare
|
|
6
|
-
export {};
|
|
6
|
+
export declare const RangeCalendar: React.FC<RangeCalendarProps>;
|
package/calendar/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export * from './Calendar';
|
|
2
|
+
export * from './RangeCalendar';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface ColorSchemeSwitchProps {
|
|
3
|
+
/** Choose what element that should be affected by the scheme switch.
|
|
4
|
+
* @default body
|
|
5
|
+
*/
|
|
6
|
+
selector?: string;
|
|
7
|
+
/** Set the default value for the color scheme. Default is "light dark" meaning follow system settings
|
|
8
|
+
*
|
|
9
|
+
* @default new Set(['light dark'])
|
|
10
|
+
*/
|
|
11
|
+
defaultValue?: Set<'light' | 'dark' | 'light dark'>;
|
|
12
|
+
}
|
|
13
|
+
export declare const ColorSchemeSwitch: React.FC<ColorSchemeSwitchProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ColorSchemeSwitch';
|
package/combobox/ComboBox.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { ComboBoxProps as AriaComboBoxProps, ListBoxItemProps, ValidationResult } from 'react-aria-components';
|
|
3
|
+
import { Item, Section } from './types';
|
|
3
4
|
export interface ComboBoxProps<T extends object> extends Omit<AriaComboBoxProps<T>, 'children'> {
|
|
4
5
|
label?: string;
|
|
5
6
|
description?: string;
|
|
@@ -11,3 +12,4 @@ export interface ComboBoxProps<T extends object> extends Omit<AriaComboBoxProps<
|
|
|
11
12
|
}
|
|
12
13
|
export declare function ComboBox<T extends object>({ label, description, errorMessage, children, items, className, errorPosition, ...props }: ComboBoxProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
13
14
|
export declare function ComboBoxItem(props: ListBoxItemProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare function ComboBoxSelection(props: Section<Item>): import("react/jsx-runtime").JSX.Element;
|
package/combobox/index.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { ComboBox, ComboBoxItem } from './ComboBox';
|
|
1
|
+
export { ComboBox, ComboBoxItem, ComboBoxSelection } from './ComboBox';
|
|
2
|
+
export type { Section, Item } from './types';
|
package/combobox/types.d.ts
CHANGED
package/combobox/utils.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { DateFieldProps as AriaDateFieldProps, DateValue, ValidationResult } from 'react-aria-components';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export interface DateFieldProps extends AriaDateFieldProps<DateValue> {
|
|
4
4
|
description?: string;
|
|
5
5
|
errorMessage?: string | ((validation: ValidationResult) => string);
|
|
6
6
|
errorPosition?: 'top' | 'bottom';
|
|
7
|
+
label?: string;
|
|
7
8
|
}
|
|
8
|
-
export declare
|
|
9
|
-
export {};
|
|
9
|
+
export declare const DateField: React.FC<DateFieldProps>;
|
package/date-field/index.d.ts
CHANGED
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
import { DatePickerProps
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { DatePickerProps as AriaDatePickerProps, DateValue, ValidationResult } from 'react-aria-components';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
interface DatePickerProps extends AriaDatePickerProps<DateValue> {
|
|
4
4
|
description?: string;
|
|
5
5
|
errorMessage?: string | ((validation: ValidationResult) => string);
|
|
6
6
|
errorPosition?: 'top' | 'bottom';
|
|
7
|
-
}
|
|
8
|
-
export declare const DateRangePicker: <T extends DateValue>({ label, description, errorMessage, errorPosition, ...props }: MidasDateRangePickerProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
interface MidasDatePickerProps<T extends DateValue> extends DatePickerProps<T> {
|
|
10
7
|
label?: string;
|
|
11
|
-
description?: string;
|
|
12
|
-
errorMessage?: string | ((validation: ValidationResult) => string);
|
|
13
|
-
errorPosition?: 'top' | 'bottom';
|
|
14
8
|
}
|
|
15
|
-
export declare const DatePicker: <
|
|
9
|
+
export declare const DatePicker: React.FC<DatePickerProps>;
|
|
16
10
|
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DateRangePickerProps as AriaDateRangePickerProps, DateValue, ValidationResult } from 'react-aria-components';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export interface DateRangePickerProps extends AriaDateRangePickerProps<DateValue> {
|
|
4
|
+
description?: string;
|
|
5
|
+
errorMessage?: string | ((validation: ValidationResult) => string);
|
|
6
|
+
errorPosition?: 'top' | 'bottom';
|
|
7
|
+
label?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const DateRangePicker: React.FC<DateRangePickerProps>;
|
package/date-picker/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export * from './DatePicker';
|
|
2
|
+
export * from './DateRangePicker';
|