@midas-ds/components 8.3.0 → 10.0.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 CHANGED
@@ -1,4 +1,93 @@
1
- ## 8.3.0
1
+ # 10.0.0 (2025-05-20)
2
+
3
+ ### 🚀 Features
4
+
5
+ - **tokens:** add new tokens `blue50` and `blue70`, update link colors ([d814a4c961](https://github.com/migrationsverket/midas/commit/d814a4c961))
6
+ - ⚠️ **tokens:** rename tokens `blue140` & `blue170` and add new tokens `blue110`, `blue120`, rename `purple140` to `purple110` ([b79d586d53](https://github.com/migrationsverket/midas/commit/b79d586d53))
7
+ - **table:** remove deprecation of prop `narrow` and update documentation ([4cbbb8efd9](https://github.com/migrationsverket/midas/commit/4cbbb8efd9))
8
+ - **tag:** use button size medium instead of small ([731df78796](https://github.com/migrationsverket/midas/commit/731df78796))
9
+ - **search-field:** use button size medium instead of small ([a5f6020bbd](https://github.com/migrationsverket/midas/commit/a5f6020bbd))
10
+ - **progress-bar:** use button size medium instead of small ([24dad8eb80](https://github.com/migrationsverket/midas/commit/24dad8eb80))
11
+ - **file-upload:** use button size medium instead of small ([c4351ff469](https://github.com/migrationsverket/midas/commit/c4351ff469))
12
+ - ⚠️ **skeleton:** remove deprecated props ([cf5b52095c](https://github.com/migrationsverket/midas/commit/cf5b52095c))
13
+ - ⚠️ **label:** remove deprecated variants ([36c893a748](https://github.com/migrationsverket/midas/commit/36c893a748))
14
+ - ⚠️ **theme:** remove deprecated tokens `borderInvalid` and `textInvalid` ([d2f1620dc4](https://github.com/migrationsverket/midas/commit/d2f1620dc4))
15
+ - ⚠️ **table:** remove deprecated prop `narrow` from table ([2b61d27b75](https://github.com/migrationsverket/midas/commit/2b61d27b75))
16
+ - ⚠️ **tabs:** remove deprecated prop `defaultSelected` ([5271e93984](https://github.com/migrationsverket/midas/commit/5271e93984))
17
+ - ⚠️ **spinner:** remove deprecated prop `dark` ([309da278c9](https://github.com/migrationsverket/midas/commit/309da278c9))
18
+ - ⚠️ **modal:** remove deprecated `ModalTrigger` and `Dialog` ([9789773886](https://github.com/migrationsverket/midas/commit/9789773886))
19
+ - ⚠️ **accordion:** remove deprecated prop `type='multiple'`, use `allowsMultipleExpanded` instead ([8c82cbd681](https://github.com/migrationsverket/midas/commit/8c82cbd681))
20
+ - ⚠️ **button:** remove small size variant from button ([06430f2df2](https://github.com/migrationsverket/midas/commit/06430f2df2))
21
+ - **skeleton:** allow for more semantically correct props ([703237ec04](https://github.com/migrationsverket/midas/commit/703237ec04))
22
+ - **button:** add back the small variant ([2112557050](https://github.com/migrationsverket/midas/commit/2112557050))
23
+ - **button:** add size property, a story and style ([946bd9aa7d](https://github.com/migrationsverket/midas/commit/946bd9aa7d))
24
+ - **search-field:** add size prop ([4dab7eea96](https://github.com/migrationsverket/midas/commit/4dab7eea96))
25
+ - **combobox:** add size prop ([e64826ab11](https://github.com/migrationsverket/midas/commit/e64826ab11))
26
+ - **date-picker:** add size prop ([c1e1a04444](https://github.com/migrationsverket/midas/commit/c1e1a04444))
27
+ - **select:** add size property ([b1519f00cd](https://github.com/migrationsverket/midas/commit/b1519f00cd))
28
+ - **date-field:** ✨ medium size ([#558](https://github.com/migrationsverket/midas/pull/558))
29
+ - **theme:** add full scale of signal-red tokens ([abdca1e267](https://github.com/migrationsverket/midas/commit/abdca1e267))
30
+
31
+ ### 🩹 Fixes
32
+
33
+ - **select:** increase the margin top to give more space between tag group and select ([5514f642b0](https://github.com/migrationsverket/midas/commit/5514f642b0))
34
+ - **calendar:** add cursor: not-allowed on disabled dates ([6592b4fb15](https://github.com/migrationsverket/midas/commit/6592b4fb15))
35
+ - **accordion:** set correct height on uncontained variant ([#557](https://github.com/migrationsverket/midas/pull/557))
36
+
37
+ ### 📖 Documentation changes
38
+
39
+ - **layout:** update docs on clientSideHref prop ([6f1e0807ad](https://github.com/migrationsverket/midas/commit/6f1e0807ad))
40
+ - add untracked changelog files and update tsconfig ([9527e80ac0](https://github.com/migrationsverket/midas/commit/9527e80ac0))
41
+ - **changelog:** add docusaurus style changelog and release notes ([cba214be09](https://github.com/migrationsverket/midas/commit/cba214be09))
42
+
43
+ ### 🔧 Maintenance
44
+
45
+ - **deps:** bump undici in the npm_and_yarn group across 1 directory ([63e9f61a23](https://github.com/migrationsverket/midas/commit/63e9f61a23))
46
+ - **deps:** bump vite in the npm_and_yarn group across 1 directory ([193b8d80b5](https://github.com/migrationsverket/midas/commit/193b8d80b5))
47
+ - disable snapshots for duplicate states ([52197ad135](https://github.com/migrationsverket/midas/commit/52197ad135))
48
+ - use medium sized buttons ([7d55406881](https://github.com/migrationsverket/midas/commit/7d55406881))
49
+ - ⚠️ **useMessageFormatter:** remove `useMessageFormatter` since deprecation ([01d94a8d75](https://github.com/migrationsverket/midas/commit/01d94a8d75))
50
+ - **button:** fix code documentation ([28974126de](https://github.com/migrationsverket/midas/commit/28974126de))
51
+ - add npm provenance flag ([039f1daa0d](https://github.com/migrationsverket/midas/commit/039f1daa0d))
52
+ - add new eslint rules ([#545](https://github.com/migrationsverket/midas/pull/545))
53
+ - update version in eslint config ([93edc05f7c](https://github.com/migrationsverket/midas/commit/93edc05f7c))
54
+
55
+ ### 🧪 Tests updated
56
+
57
+ - **button:** add await to expect tests ([6a72c8d05b](https://github.com/migrationsverket/midas/commit/6a72c8d05b))
58
+ - **button:** add a test to stories ([0348794fc7](https://github.com/migrationsverket/midas/commit/0348794fc7))
59
+ - **button:** add a test in primary story ([53f4fe042e](https://github.com/migrationsverket/midas/commit/53f4fe042e))
60
+ - **docs:** add test baseline and chromatic tests ([57d6255477](https://github.com/migrationsverket/midas/commit/57d6255477))
61
+ - **select:** fix the test ([f41535787b](https://github.com/migrationsverket/midas/commit/f41535787b))
62
+ - **select:** add test to check the size ([2c692d9ea0](https://github.com/migrationsverket/midas/commit/2c692d9ea0))
63
+
64
+ ### ⚠️ Breaking Changes
65
+
66
+ - ⚠️ **tokens:** rename tokens `blue140` & `blue170` and add new tokens `blue110`, `blue120`, rename `purple140` to `purple110` ([b79d586d53](https://github.com/migrationsverket/midas/commit/b79d586d53))
67
+ - **skeleton:** variant `rectangular` is no longer available, use `rectangle` instead. Animation is now a boolean and the prop to use is `isAnimated`
68
+ - **label:** label variants are no longer available, use component `Text` instead
69
+ - **useMessageFormatter:** Adobe has deprecated this hook in favour of `useLocalizedStringFormatter`. Use that instead!
70
+ - **theme:** use `supportBorderWarning` and `textWarning` instead
71
+ - **table:** prop `narrow` is no longer available
72
+ - **tabs:** `defaultSelected` no longer works, use `defaultSelectedKey` instead
73
+ - **spinner:** prop `dark` no longer works, use `isOnColor` instead
74
+ - **modal:** `ModalTrigger` and `Dialog` no longer works, use `DialogTrigger` and `Modal` instead
75
+ - **accordion:** API now conforms to React Aria standard. Same behavior is accomplished using `allowsMultipleExpanded`
76
+ - **button:** `size='small'` no longer has any effect on button size. Allowed sizes are `'medium' | 'large'`
77
+
78
+ # 9.0.0 (2025-05-05)
79
+
80
+ ### 🩹 Fixes
81
+
82
+ - **info-banner:** add correct line-height ([#540](https://github.com/migrationsverket/midas/pull/540))
83
+ - **grid:** prevent midas classnames to get overwritten ([#541](https://github.com/migrationsverket/midas/pull/541))
84
+ - **textfield:** merge textfield and input/textarea native dom props ([#499](https://github.com/migrationsverket/midas/pull/499))
85
+
86
+ ### Documentation Changes
87
+
88
+ - **toast:** fix local example in storybook ([#542](https://github.com/migrationsverket/midas/pull/542))
89
+
90
+ ## 8.3.0 (2025-05-03)
2
91
 
3
92
  ### 🚀 Features
4
93
 
@@ -22,7 +111,7 @@
22
111
 
23
112
  - improvements to preview 💅 🔍 ✨ ([#530](https://github.com/migrationsverket/midas/pull/530))
24
113
 
25
- ## 8.2.0
114
+ ## 8.2.0 (2025-05-01)
26
115
 
27
116
  ### 🚀 Features
28
117
 
@@ -40,7 +129,7 @@
40
129
  - **propstable:** add support for enums in table ([#511](https://github.com/migrationsverket/midas/pull/511))
41
130
  - **modal:** change arg types in storybook ([f9588f170b](https://github.com/migrationsverket/midas/commit/f9588f170b))
42
131
 
43
- ## 8.1.0
132
+ ## 8.1.0 (2025-05-02)
44
133
 
45
134
  ### 🚀 Features
46
135
 
@@ -54,7 +143,7 @@
54
143
  - **select:** remove explicit size for indeterminate symbol ([5f805c134](https://github.com/migrationsverket/midas/commit/5f805c134))
55
144
  - **select:** change checkbox size to prevent disappearing border ([3ab520633](https://github.com/migrationsverket/midas/commit/3ab520633))
56
145
 
57
- # 8.0.0
146
+ # 8.0.0 (2025-05-01)
58
147
 
59
148
  ### 🚀 Features
60
149
 
@@ -93,7 +182,7 @@
93
182
  - update link docs with new code and examples ([a25a2def3](https://github.com/migrationsverket/midas/commit/a25a2def3))
94
183
  - use markdown links ([f1fb5714b](https://github.com/migrationsverket/midas/commit/f1fb5714b))
95
184
 
96
- ## 7.1.0
185
+ ## 7.1.0 (2025-05-01)
97
186
 
98
187
  ### 🚀 Features
99
188
 
@@ -105,11 +194,11 @@
105
194
  - **combobox:** fix background color to input ([997eac80b](https://github.com/migrationsverket/midas/commit/997eac80b))
106
195
  - **theme:** replace invalid text and border colors in dark mode ([3291a9cbd](https://github.com/migrationsverket/midas/commit/3291a9cbd))
107
196
 
108
- # 7.0.0
197
+ # 7.0.0 (2025-05-01)
109
198
 
110
199
  This was a version bump only for components to align it with other projects, there were no code changes.
111
200
 
112
- ## 6.2.0
201
+ ## 6.2.0 (2025-05-01)
113
202
 
114
203
  ### 🚀 Features
115
204
 
@@ -125,7 +214,7 @@ This was a version bump only for components to align it with other projects, the
125
214
  - **theme:** change the token value to icon secondary
126
215
  - **link-button:** fix secondary border and icon color in dark mode
127
216
 
128
- ## 6.1.0
217
+ ## 6.1.0 (2025-05-01)
129
218
 
130
219
  ### 🚀 Features
131
220
 
@@ -136,13 +225,13 @@ This was a version bump only for components to align it with other projects, the
136
225
  - **textfield:** fix token on input value ([e79f935e3](https://github.com/migrationsverket/midas/commit/e79f935e3))
137
226
  - **link-button:** add pseudo-classes in CSS link-button ([#385](https://github.com/migrationsverket/midas/pull/385))
138
227
 
139
- ## 6.0.1
228
+ ## 6.0.1 (2025-05-01)
140
229
 
141
230
  ### 🩹 Fixes
142
231
 
143
232
  - **select:** 🐛 Selected values doesn't match selected IDs
144
233
 
145
- # 6.0.0
234
+ # 6.0.0 (2025-05-01)
146
235
 
147
236
  ### 🚀 Features
148
237
 
@@ -169,7 +258,7 @@ This was a version bump only for components to align it with other projects, the
169
258
 
170
259
  - **modal:** Use the new DialogTrigger and Modal instead of ModalTrigger and Dialog. New API will apply.
171
260
 
172
- ## 5.0.1
261
+ ## 5.0.1 (2025-03-25)
173
262
 
174
263
  ### 🩹 Fixes
175
264
 
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  React component library implementing Midas Design System (Migrationsverket)
4
4
 
5
- -----
5
+ ---
6
6
 
7
7
  ## Getting started
8
8
 
@@ -11,6 +11,7 @@ Add `@midas-ds/components` to your project:
11
11
  ```
12
12
  npm install @midas-ds/components
13
13
  ```
14
+
14
15
  And then import the components you need:
15
16
 
16
17
  ```
@@ -19,7 +20,6 @@ import {Button, Checkbox, etc} from '@midas-ds/components'
19
20
 
20
21
  ## Documentation
21
22
 
22
- * See the full design system documentation on [Midas](https://designsystem.migrationsverket.se/) (Swedish).
23
-
24
- * Component API documentation on [Storybook](https://designsystem.migrationsverket.se/storybook/).
23
+ - See the full design system documentation on [Midas](https://designsystem.migrationsverket.se/) (Swedish).
25
24
 
25
+ - Component API documentation on [Storybook](https://main--6810d578d5507438df0f0d22.chromatic.com).
@@ -4,8 +4,6 @@ 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 since v8.0.0 Use 'allowsMultipleExpanded' instead */
8
- type?: 'single' | 'multiple';
9
7
  }
10
8
  /**
11
9
  * Accordions are used primarily to reduce the direct amount of information on a page and to sort it clearly.
@@ -1,5 +1,6 @@
1
1
  import { ButtonProps, ButtonRenderProps } from 'react-aria-components';
2
2
  import { LucideIcon } from 'lucide-react';
3
+ import { Size } from '../common/types';
3
4
  import * as React from 'react';
4
5
  export interface MidasButtonProps {
5
6
  /**
@@ -14,17 +15,21 @@ export interface MidasButtonProps {
14
15
  * @default false
15
16
  */
16
17
  fullwidth?: boolean;
17
- /** Choose between different button sizes */
18
- /** @deprecated since v4.0.0 This variant will be replaced with a new scaling api accross all components. */
19
- size?: 'small';
18
+ /** Component size (large: height 48px, medium: height 40px)
19
+ * @default 'large'
20
+ **/
21
+ size?: Size;
20
22
  /** Add an icon from lucide-react
21
23
  *
22
- * @see {@link https://lucide.dev/icons/}
24
+ * @see {@link https://lucide.dev/icons/|Lucide}
23
25
  */
24
26
  icon?: LucideIcon;
25
- /** Adjust icon size */
27
+ /**
28
+ * Adjust icon size
29
+ * @default 20
30
+ * */
26
31
  iconSize?: number;
27
- /** Display your icon on the left och right side of the button text */
32
+ /** Display the icon on the left or right side of the button text */
28
33
  iconPlacement?: 'left' | 'right';
29
34
  children?: React.ReactNode | ((values: ButtonRenderProps & {
30
35
  defaultChildren: React.ReactNode | undefined;
@@ -1,6 +1,7 @@
1
1
  import { default as React } from 'react';
2
2
  import { ComboBoxProps as AriaComboBoxProps, ListBoxItemProps, ValidationResult } from 'react-aria-components';
3
3
  import { Item, Section } from './types';
4
+ import { Size } from '../common/types';
4
5
  export interface ComboBoxProps<T extends object> extends Omit<AriaComboBoxProps<T>, 'children'> {
5
6
  label?: string;
6
7
  description?: string;
@@ -9,7 +10,11 @@ export interface ComboBoxProps<T extends object> extends Omit<AriaComboBoxProps<
9
10
  children: React.ReactNode | ((item: T) => React.ReactNode);
10
11
  placeholder?: string;
11
12
  errorPosition?: 'top' | 'bottom';
13
+ /** Component size (large: height 48px, medium: height 40px)
14
+ * @default 'large'
15
+ * */
16
+ size?: Size;
12
17
  }
13
- export declare function ComboBox<T extends object>({ label, description, errorMessage, children, items, className, errorPosition, ...props }: ComboBoxProps<T>): import("react/jsx-runtime").JSX.Element;
18
+ export declare function ComboBox<T extends object>({ label, description, errorMessage, children, items, className, errorPosition, size, ...props }: ComboBoxProps<T>): import("react/jsx-runtime").JSX.Element;
14
19
  export declare function ComboBoxItem(props: ListBoxItemProps): import("react/jsx-runtime").JSX.Element;
15
20
  export declare function ComboBoxSelection(props: Section<Item>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export type Size = 'large' | 'medium';
@@ -1,9 +1,14 @@
1
1
  import { DateFieldProps as AriaDateFieldProps, DateValue, ValidationResult } from 'react-aria-components';
2
+ import { Size } from '../common/types';
2
3
  import * as React from 'react';
3
4
  export interface DateFieldProps extends AriaDateFieldProps<DateValue> {
4
5
  description?: string;
5
6
  errorMessage?: string | ((validation: ValidationResult) => string);
6
7
  errorPosition?: 'top' | 'bottom';
7
8
  label?: string;
9
+ /** Component size (large: height 48px, medium: height 40px)
10
+ * @default 'large'
11
+ * */
12
+ size?: Size;
8
13
  }
9
14
  export declare const DateField: React.FC<DateFieldProps>;
@@ -1,10 +1,15 @@
1
1
  import { DatePickerProps as AriaDatePickerProps, DateValue, ValidationResult } from 'react-aria-components';
2
+ import { Size } from '../common/types';
2
3
  import * as React from 'react';
3
4
  interface DatePickerProps extends AriaDatePickerProps<DateValue> {
4
5
  description?: string;
5
6
  errorMessage?: string | ((validation: ValidationResult) => string);
6
7
  errorPosition?: 'top' | 'bottom';
7
8
  label?: string;
9
+ /** Component size (large: height 48px, medium: height 40px)
10
+ * @default 'large'
11
+ * */
12
+ size?: Size;
8
13
  }
9
14
  export declare const DatePicker: React.FC<DatePickerProps>;
10
15
  export {};
@@ -1,8 +1,10 @@
1
+ import { Size } from '../common/types';
1
2
  import * as React from 'react';
2
3
  interface DatePickerInputFieldProps {
3
4
  children?: React.ReactNode;
4
5
  isDisabled?: boolean;
5
6
  isInvalid?: boolean;
7
+ size?: Size;
6
8
  }
7
9
  export declare const DatePickerInputField: React.FC<DatePickerInputFieldProps>;
8
10
  export {};
@@ -1,9 +1,14 @@
1
1
  import { DateRangePickerProps as AriaDateRangePickerProps, DateValue, ValidationResult } from 'react-aria-components';
2
+ import { Size } from '../common/types';
2
3
  import * as React from 'react';
3
4
  export interface DateRangePickerProps extends AriaDateRangePickerProps<DateValue> {
4
5
  description?: string;
5
6
  errorMessage?: string | ((validation: ValidationResult) => string);
6
7
  errorPosition?: 'top' | 'bottom';
7
8
  label?: string;
9
+ /** Component size (large: height 48px, medium: height 40px)
10
+ * @default 'large'
11
+ * */
12
+ size?: Size;
8
13
  }
9
14
  export declare const DateRangePicker: React.FC<DateRangePickerProps>;