@midas-ds/components 8.1.0 → 8.3.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 +42 -0
- package/accordion/Accordion.d.ts +1 -1
- package/button/Button.d.ts +1 -1
- 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/card/Card.d.ts +29 -32
- 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 +32 -32
- package/index.css +1 -1
- package/index.js +6165 -6096
- package/label/Label.d.ts +1 -1
- package/modal/Dialog.d.ts +2 -2
- package/package.json +1 -1
- package/spinner/Spinner.d.ts +1 -1
- package/table/Table.d.ts +1 -1
- package/tabs/Tabs.d.ts +1 -1
- package/textfield/TextFieldBase.d.ts +5 -0
- package/theme/index.d.ts +3 -0
- package/theme/tokens.d.ts +3 -0
- package/theme.cjs +1 -1
- package/theme.js +2 -2
- package/{tokens-B0IQe84F.cjs → tokens-B6mMZ0T6.cjs} +1 -1
- package/{tokens-BWq37Xsh.js → tokens-CEzXihhV.js} +10 -2
- package/tooltip/Tooltip.d.ts +1 -2
- package/utils/intl/useMessageFormatter.d.ts +1 -1
- package/utils/storybook.d.ts +4 -0
- package/utils/test.d.ts +7 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,45 @@
|
|
|
1
|
+
## 8.3.0
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- **theme:** use `--support-border-warning` instead of `--border-invalid` ([#518](https://github.com/migrationsverket/midas/pull/518))
|
|
6
|
+
- **textfield:** add medium size variant ([#520](https://github.com/migrationsverket/midas/pull/520))
|
|
7
|
+
- **layout:** change font weight for active menu item ([57e2485234](https://github.com/migrationsverket/midas/commit/57e2485234))
|
|
8
|
+
- **layout:** change background color for menu item ([d9ffc16bb6](https://github.com/migrationsverket/midas/commit/d9ffc16bb6))
|
|
9
|
+
|
|
10
|
+
### 🩹 Fixes
|
|
11
|
+
|
|
12
|
+
- **modal:** adjust modal header when content is scollable ([#527](https://github.com/migrationsverket/midas/pull/527))
|
|
13
|
+
- **combobox:** add disabled color to the icon in disabled state ([9cd5657149](https://github.com/migrationsverket/midas/commit/9cd5657149))
|
|
14
|
+
- **select:** add disabled styling to description ([4cabb0c8ae](https://github.com/migrationsverket/midas/commit/4cabb0c8ae))
|
|
15
|
+
- **select:** change invalid border from 3px to 2 px ([834f1f8fdc](https://github.com/migrationsverket/midas/commit/834f1f8fdc))
|
|
16
|
+
- **accordion:** add a minimal padding to allow items with margin-bottom ([e0b2d8058b](https://github.com/migrationsverket/midas/commit/e0b2d8058b))
|
|
17
|
+
- **accordion:** remove padding bottom for last uncontained accordionitem ([463a7fa29e](https://github.com/migrationsverket/midas/commit/463a7fa29e))
|
|
18
|
+
- **textfield:** remove opacity from disabled ([0332d83cb6](https://github.com/migrationsverket/midas/commit/0332d83cb6))
|
|
19
|
+
- **textfield:** add border bottom in disabled and change ivalid border to 2px ([2bcd1d5beb](https://github.com/migrationsverket/midas/commit/2bcd1d5beb))
|
|
20
|
+
|
|
21
|
+
### Documentation Changes
|
|
22
|
+
|
|
23
|
+
- improvements to preview 💅 🔍 ✨ ([#530](https://github.com/migrationsverket/midas/pull/530))
|
|
24
|
+
|
|
25
|
+
## 8.2.0
|
|
26
|
+
|
|
27
|
+
### 🚀 Features
|
|
28
|
+
|
|
29
|
+
- **theme:** add --icon-tertiary, new color for --icon-secondary ([f0ef381472](https://github.com/migrationsverket/midas/commit/f0ef381472))
|
|
30
|
+
- **label:** deprecate prop variant and add new css class ([42e33be662](https://github.com/migrationsverket/midas/commit/42e33be662))
|
|
31
|
+
- **tooltip:** allow locale agnostic tooltip placement ([#492](https://github.com/migrationsverket/midas/pull/492))
|
|
32
|
+
|
|
33
|
+
### 🩹 Fixes
|
|
34
|
+
|
|
35
|
+
- **accordion:** remove disabled styling if component has disabled children ([1c704b714d](https://github.com/migrationsverket/midas/commit/1c704b714d))
|
|
36
|
+
- **checkbox:** set correct line-height and adjust high contrast visibility ([6ca7ea9ba9](https://github.com/migrationsverket/midas/commit/6ca7ea9ba9))
|
|
37
|
+
|
|
38
|
+
### Documentation Changes
|
|
39
|
+
|
|
40
|
+
- **propstable:** add support for enums in table ([#511](https://github.com/migrationsverket/midas/pull/511))
|
|
41
|
+
- **modal:** change arg types in storybook ([f9588f170b](https://github.com/migrationsverket/midas/commit/f9588f170b))
|
|
42
|
+
|
|
1
43
|
## 8.1.0
|
|
2
44
|
|
|
3
45
|
### 🚀 Features
|
package/accordion/Accordion.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export declare const ACCORDION_TEST_ID = "accordion";
|
|
|
4
4
|
interface MidasAccordion extends DisclosureGroupProps {
|
|
5
5
|
/** Display either the larger contained variant or a smaller uncontained variant */
|
|
6
6
|
variant?: 'uncontained' | 'contained';
|
|
7
|
-
/** @deprecated Use 'allowsMultipleExpanded' instead */
|
|
7
|
+
/** @deprecated since v8.0.0 Use 'allowsMultipleExpanded' instead */
|
|
8
8
|
type?: 'single' | 'multiple';
|
|
9
9
|
}
|
|
10
10
|
/**
|
package/button/Button.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export interface MidasButtonProps {
|
|
|
15
15
|
*/
|
|
16
16
|
fullwidth?: boolean;
|
|
17
17
|
/** Choose between different button sizes */
|
|
18
|
-
/** @deprecated This variant will be replaced with a new scaling api accross all components. */
|
|
18
|
+
/** @deprecated since v4.0.0 This variant will be replaced with a new scaling api accross all components. */
|
|
19
19
|
size?: 'small';
|
|
20
20
|
/** Add an icon from lucide-react
|
|
21
21
|
*
|
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';
|
package/card/Card.d.ts
CHANGED
|
@@ -1,35 +1,32 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { HeadingProps } from '../heading';
|
|
2
|
+
import { ButtonProps, Link } from 'react-aria-components';
|
|
2
3
|
import * as React from 'react';
|
|
3
|
-
export interface
|
|
4
|
-
/**
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
/** Header as h1 for the component rendered below image if there is one */
|
|
15
|
-
title: string;
|
|
16
|
-
/** Content as p element for the component */
|
|
17
|
-
content: string;
|
|
18
|
-
/** Props for when card element is clicked */
|
|
19
|
-
link: LinkProps<C>;
|
|
20
|
-
/** Adjust the tag to be used for the header
|
|
21
|
-
* @default 'h1'
|
|
22
|
-
*/
|
|
23
|
-
headingTag?: React.ElementType;
|
|
4
|
+
export interface MidasCard extends React.HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
/** Stack content in card vertical or horizontal */
|
|
6
|
+
horizontal?: boolean;
|
|
7
|
+
/** Card content, usually wrap with CardContent */
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export interface MidasCardContext {
|
|
11
|
+
horizontal?: MidasCard['horizontal'];
|
|
12
|
+
titleId?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface MidasCardImage {
|
|
24
15
|
/** Custom image component to be used instead of the default img tag */
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
16
|
+
as?: React.ElementType;
|
|
17
|
+
className?: string;
|
|
18
|
+
[key: string]: unknown;
|
|
19
|
+
}
|
|
20
|
+
interface MidasCardLink<C extends React.ElementType> {
|
|
21
|
+
children: React.ReactNode;
|
|
22
|
+
as?: C;
|
|
28
23
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
export declare const
|
|
35
|
-
export
|
|
24
|
+
export type MidasCardLinkProps<C extends React.ElementType> = MidasCardLink<C> & Omit<React.ComponentProps<C>, keyof MidasCardLink<C>>;
|
|
25
|
+
export declare const Card: React.FC<MidasCard>;
|
|
26
|
+
export declare const CardContent: React.FC<React.HTMLAttributes<HTMLDivElement>>;
|
|
27
|
+
export declare const CardTitle: React.FC<HeadingProps>;
|
|
28
|
+
export declare const CardActions: React.FC<React.HTMLAttributes<HTMLDivElement>>;
|
|
29
|
+
export declare const CardActionArea: React.FC<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
30
|
+
export declare const CardImage: React.FC<MidasCardImage>;
|
|
31
|
+
export declare const CardLink: <C extends React.ElementType = (props: import('react-aria-components').LinkProps & React.RefAttributes<HTMLAnchorElement>) => React.ReactElement | null>({ children, as, ...rest }: MidasCardLinkProps<C>) => import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export {};
|
|
@@ -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';
|