@midas-ds/components 8.0.0 → 8.1.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 +14 -0
- package/accordion/AccordionItem.d.ts +5 -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/index.cjs +44 -29
- package/index.css +1 -1
- package/index.d.ts +11 -9
- package/index.js +6581 -6255
- package/package.json +1 -1
- package/select/utils.d.ts +7 -0
- package/theme/index.d.ts +22 -17
- package/theme/tokens.d.ts +22 -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-B0IQe84F.cjs +1 -0
- package/{tokens-f_GueHFO.js → tokens-BWq37Xsh.js} +41 -36
- package/tokens-BzHPOv0Z.cjs +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## 8.1.0
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- **accordion:** accordion status ✅ / 🚨 ([#485](https://github.com/migrationsverket/midas/pull/485))
|
|
6
|
+
|
|
7
|
+
### 🩹 Fixes
|
|
8
|
+
|
|
9
|
+
- **theme:** add dark mode focus ([#483](https://github.com/migrationsverket/midas/pull/483))
|
|
10
|
+
- **modal:** make text in modal selectable ([#490](https://github.com/migrationsverket/midas/pull/490))
|
|
11
|
+
- **accordion:** rename invalid token ([e4b13c928](https://github.com/migrationsverket/midas/commit/e4b13c928))
|
|
12
|
+
- **select:** remove explicit size for indeterminate symbol ([5f805c134](https://github.com/migrationsverket/midas/commit/5f805c134))
|
|
13
|
+
- **select:** change checkbox size to prevent disappearing border ([3ab520633](https://github.com/migrationsverket/midas/commit/3ab520633))
|
|
14
|
+
|
|
1
15
|
# 8.0.0
|
|
2
16
|
|
|
3
17
|
### 🚀 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 {};
|
|
@@ -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