@midas-ds/components 9.0.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,81 @@
1
- # 9.0.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)
2
79
 
3
80
  ### 🩹 Fixes
4
81
 
@@ -10,7 +87,7 @@
10
87
 
11
88
  - **toast:** fix local example in storybook ([#542](https://github.com/migrationsverket/midas/pull/542))
12
89
 
13
- ## 8.3.0
90
+ ## 8.3.0 (2025-05-03)
14
91
 
15
92
  ### 🚀 Features
16
93
 
@@ -34,7 +111,7 @@
34
111
 
35
112
  - improvements to preview 💅 🔍 ✨ ([#530](https://github.com/migrationsverket/midas/pull/530))
36
113
 
37
- ## 8.2.0
114
+ ## 8.2.0 (2025-05-01)
38
115
 
39
116
  ### 🚀 Features
40
117
 
@@ -52,7 +129,7 @@
52
129
  - **propstable:** add support for enums in table ([#511](https://github.com/migrationsverket/midas/pull/511))
53
130
  - **modal:** change arg types in storybook ([f9588f170b](https://github.com/migrationsverket/midas/commit/f9588f170b))
54
131
 
55
- ## 8.1.0
132
+ ## 8.1.0 (2025-05-02)
56
133
 
57
134
  ### 🚀 Features
58
135
 
@@ -66,7 +143,7 @@
66
143
  - **select:** remove explicit size for indeterminate symbol ([5f805c134](https://github.com/migrationsverket/midas/commit/5f805c134))
67
144
  - **select:** change checkbox size to prevent disappearing border ([3ab520633](https://github.com/migrationsverket/midas/commit/3ab520633))
68
145
 
69
- # 8.0.0
146
+ # 8.0.0 (2025-05-01)
70
147
 
71
148
  ### 🚀 Features
72
149
 
@@ -105,7 +182,7 @@
105
182
  - update link docs with new code and examples ([a25a2def3](https://github.com/migrationsverket/midas/commit/a25a2def3))
106
183
  - use markdown links ([f1fb5714b](https://github.com/migrationsverket/midas/commit/f1fb5714b))
107
184
 
108
- ## 7.1.0
185
+ ## 7.1.0 (2025-05-01)
109
186
 
110
187
  ### 🚀 Features
111
188
 
@@ -117,11 +194,11 @@
117
194
  - **combobox:** fix background color to input ([997eac80b](https://github.com/migrationsverket/midas/commit/997eac80b))
118
195
  - **theme:** replace invalid text and border colors in dark mode ([3291a9cbd](https://github.com/migrationsverket/midas/commit/3291a9cbd))
119
196
 
120
- # 7.0.0
197
+ # 7.0.0 (2025-05-01)
121
198
 
122
199
  This was a version bump only for components to align it with other projects, there were no code changes.
123
200
 
124
- ## 6.2.0
201
+ ## 6.2.0 (2025-05-01)
125
202
 
126
203
  ### 🚀 Features
127
204
 
@@ -137,7 +214,7 @@ This was a version bump only for components to align it with other projects, the
137
214
  - **theme:** change the token value to icon secondary
138
215
  - **link-button:** fix secondary border and icon color in dark mode
139
216
 
140
- ## 6.1.0
217
+ ## 6.1.0 (2025-05-01)
141
218
 
142
219
  ### 🚀 Features
143
220
 
@@ -148,13 +225,13 @@ This was a version bump only for components to align it with other projects, the
148
225
  - **textfield:** fix token on input value ([e79f935e3](https://github.com/migrationsverket/midas/commit/e79f935e3))
149
226
  - **link-button:** add pseudo-classes in CSS link-button ([#385](https://github.com/migrationsverket/midas/pull/385))
150
227
 
151
- ## 6.0.1
228
+ ## 6.0.1 (2025-05-01)
152
229
 
153
230
  ### 🩹 Fixes
154
231
 
155
232
  - **select:** 🐛 Selected values doesn't match selected IDs
156
233
 
157
- # 6.0.0
234
+ # 6.0.0 (2025-05-01)
158
235
 
159
236
  ### 🚀 Features
160
237
 
@@ -181,7 +258,7 @@ This was a version bump only for components to align it with other projects, the
181
258
 
182
259
  - **modal:** Use the new DialogTrigger and Modal instead of ModalTrigger and Dialog. New API will apply.
183
260
 
184
- ## 5.0.1
261
+ ## 5.0.1 (2025-03-25)
185
262
 
186
263
  ### 🩹 Fixes
187
264
 
@@ -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>;