@midas-ds/components 9.0.0 → 10.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 CHANGED
@@ -1,4 +1,119 @@
1
- # 9.0.0
1
+ ## 10.1.0 (2025-05-23)
2
+
3
+ ### 🚀 Features
4
+
5
+ - **select:** allow for option id to be string or number ([b9f31bac6b](https://github.com/migrationsverket/midas/commit/b9f31bac6b))
6
+ - **select:** use midas checkbox ([94c2cdb61d](https://github.com/migrationsverket/midas/commit/94c2cdb61d))
7
+ - **accordion:** add variant `hasBackground` ([2b429a73b3](https://github.com/migrationsverket/midas/commit/2b429a73b3))
8
+ - **accordion:** add new variant `hasBackground` ([1022bcc58a](https://github.com/migrationsverket/midas/commit/1022bcc58a))
9
+ - **tag:** add dark mode style ([408be2acb7](https://github.com/migrationsverket/midas/commit/408be2acb7))
10
+ - **tag:** add new prop ([82a0998769](https://github.com/migrationsverket/midas/commit/82a0998769))
11
+
12
+ ### 🩹 Fixes
13
+
14
+ - **link-button:** add disabled styling ([143f708127](https://github.com/migrationsverket/midas/commit/143f708127))
15
+ - **radio:** remove interactions with radiogroup items outside the label and button ([0b9f197971](https://github.com/migrationsverket/midas/commit/0b9f197971))
16
+ - **skeleton:** dont overwrite className and style props ([155a8ff437](https://github.com/migrationsverket/midas/commit/155a8ff437))
17
+ - **select:** virtualize the scroll box ([523b138e17](https://github.com/migrationsverket/midas/commit/523b138e17))
18
+ - **tag:** fix the hover and fix the disabled style ([3a21642715](https://github.com/migrationsverket/midas/commit/3a21642715))
19
+ - **tag:** unset border to make button the right width/height ([769cfa8ec5](https://github.com/migrationsverket/midas/commit/769cfa8ec5))
20
+ - **tag:** change token on button hover and pressed ([0f2ff1c422](https://github.com/migrationsverket/midas/commit/0f2ff1c422))
21
+ - **tag:** fix the missing nesting selector ([87ac33ab1c](https://github.com/migrationsverket/midas/commit/87ac33ab1c))
22
+
23
+ ### 💅 Refactors
24
+
25
+ - **tag:** move render function to meta data ([48d9f9b126](https://github.com/migrationsverket/midas/commit/48d9f9b126))
26
+
27
+ ### 📖 Documentation changes
28
+
29
+ - control size globally in storybook + new dark mode control ([#596](https://github.com/migrationsverket/midas/pull/596))
30
+
31
+ ### 🔧 Maintenance
32
+
33
+ - **deps:** update RAC ([20da285b9e](https://github.com/migrationsverket/midas/commit/20da285b9e))
34
+ - extend commitlint conventional commits config ([4daa47926d](https://github.com/migrationsverket/midas/commit/4daa47926d))
35
+ - update eslint rule to handle major versions > 9 ([ba85178773](https://github.com/migrationsverket/midas/commit/ba85178773))
36
+ - **changelog:** group and display more commit types in changelog ([d86d18ae94](https://github.com/migrationsverket/midas/commit/d86d18ae94))
37
+ - change react import statement ([efe3c867f0](https://github.com/migrationsverket/midas/commit/efe3c867f0))
38
+
39
+ # 10.0.0 (2025-05-20)
40
+
41
+ ### 🚀 Features
42
+
43
+ - **tokens:** add new tokens `blue50` and `blue70`, update link colors ([d814a4c961](https://github.com/migrationsverket/midas/commit/d814a4c961))
44
+ - ⚠️ **tokens:** rename tokens `blue140` & `blue170` and add new tokens `blue110`, `blue120`, rename `purple140` to `purple110` ([b79d586d53](https://github.com/migrationsverket/midas/commit/b79d586d53))
45
+ - **table:** remove deprecation of prop `narrow` and update documentation ([4cbbb8efd9](https://github.com/migrationsverket/midas/commit/4cbbb8efd9))
46
+ - **tag:** use button size medium instead of small ([731df78796](https://github.com/migrationsverket/midas/commit/731df78796))
47
+ - **search-field:** use button size medium instead of small ([a5f6020bbd](https://github.com/migrationsverket/midas/commit/a5f6020bbd))
48
+ - **progress-bar:** use button size medium instead of small ([24dad8eb80](https://github.com/migrationsverket/midas/commit/24dad8eb80))
49
+ - **file-upload:** use button size medium instead of small ([c4351ff469](https://github.com/migrationsverket/midas/commit/c4351ff469))
50
+ - ⚠️ **skeleton:** remove deprecated props ([cf5b52095c](https://github.com/migrationsverket/midas/commit/cf5b52095c))
51
+ - ⚠️ **label:** remove deprecated variants ([36c893a748](https://github.com/migrationsverket/midas/commit/36c893a748))
52
+ - ⚠️ **theme:** remove deprecated tokens `borderInvalid` and `textInvalid` ([d2f1620dc4](https://github.com/migrationsverket/midas/commit/d2f1620dc4))
53
+ - ⚠️ **table:** remove deprecated prop `narrow` from table ([2b61d27b75](https://github.com/migrationsverket/midas/commit/2b61d27b75))
54
+ - ⚠️ **tabs:** remove deprecated prop `defaultSelected` ([5271e93984](https://github.com/migrationsverket/midas/commit/5271e93984))
55
+ - ⚠️ **spinner:** remove deprecated prop `dark` ([309da278c9](https://github.com/migrationsverket/midas/commit/309da278c9))
56
+ - ⚠️ **modal:** remove deprecated `ModalTrigger` and `Dialog` ([9789773886](https://github.com/migrationsverket/midas/commit/9789773886))
57
+ - ⚠️ **accordion:** remove deprecated prop `type='multiple'`, use `allowsMultipleExpanded` instead ([8c82cbd681](https://github.com/migrationsverket/midas/commit/8c82cbd681))
58
+ - ⚠️ **button:** remove small size variant from button ([06430f2df2](https://github.com/migrationsverket/midas/commit/06430f2df2))
59
+ - **skeleton:** allow for more semantically correct props ([703237ec04](https://github.com/migrationsverket/midas/commit/703237ec04))
60
+ - **button:** add back the small variant ([2112557050](https://github.com/migrationsverket/midas/commit/2112557050))
61
+ - **button:** add size property, a story and style ([946bd9aa7d](https://github.com/migrationsverket/midas/commit/946bd9aa7d))
62
+ - **search-field:** add size prop ([4dab7eea96](https://github.com/migrationsverket/midas/commit/4dab7eea96))
63
+ - **combobox:** add size prop ([e64826ab11](https://github.com/migrationsverket/midas/commit/e64826ab11))
64
+ - **date-picker:** add size prop ([c1e1a04444](https://github.com/migrationsverket/midas/commit/c1e1a04444))
65
+ - **select:** add size property ([b1519f00cd](https://github.com/migrationsverket/midas/commit/b1519f00cd))
66
+ - **date-field:** ✨ medium size ([#558](https://github.com/migrationsverket/midas/pull/558))
67
+ - **theme:** add full scale of signal-red tokens ([abdca1e267](https://github.com/migrationsverket/midas/commit/abdca1e267))
68
+
69
+ ### 🩹 Fixes
70
+
71
+ - **select:** increase the margin top to give more space between tag group and select ([5514f642b0](https://github.com/migrationsverket/midas/commit/5514f642b0))
72
+ - **calendar:** add cursor: not-allowed on disabled dates ([6592b4fb15](https://github.com/migrationsverket/midas/commit/6592b4fb15))
73
+ - **accordion:** set correct height on uncontained variant ([#557](https://github.com/migrationsverket/midas/pull/557))
74
+
75
+ ### 📖 Documentation changes
76
+
77
+ - **layout:** update docs on clientSideHref prop ([6f1e0807ad](https://github.com/migrationsverket/midas/commit/6f1e0807ad))
78
+ - add untracked changelog files and update tsconfig ([9527e80ac0](https://github.com/migrationsverket/midas/commit/9527e80ac0))
79
+ - **changelog:** add docusaurus style changelog and release notes ([cba214be09](https://github.com/migrationsverket/midas/commit/cba214be09))
80
+
81
+ ### 🔧 Maintenance
82
+
83
+ - **deps:** bump undici in the npm_and_yarn group across 1 directory ([63e9f61a23](https://github.com/migrationsverket/midas/commit/63e9f61a23))
84
+ - **deps:** bump vite in the npm_and_yarn group across 1 directory ([193b8d80b5](https://github.com/migrationsverket/midas/commit/193b8d80b5))
85
+ - disable snapshots for duplicate states ([52197ad135](https://github.com/migrationsverket/midas/commit/52197ad135))
86
+ - use medium sized buttons ([7d55406881](https://github.com/migrationsverket/midas/commit/7d55406881))
87
+ - ⚠️ **useMessageFormatter:** remove `useMessageFormatter` since deprecation ([01d94a8d75](https://github.com/migrationsverket/midas/commit/01d94a8d75))
88
+ - **button:** fix code documentation ([28974126de](https://github.com/migrationsverket/midas/commit/28974126de))
89
+ - add npm provenance flag ([039f1daa0d](https://github.com/migrationsverket/midas/commit/039f1daa0d))
90
+ - add new eslint rules ([#545](https://github.com/migrationsverket/midas/pull/545))
91
+ - update version in eslint config ([93edc05f7c](https://github.com/migrationsverket/midas/commit/93edc05f7c))
92
+
93
+ ### 🧪 Tests updated
94
+
95
+ - **button:** add await to expect tests ([6a72c8d05b](https://github.com/migrationsverket/midas/commit/6a72c8d05b))
96
+ - **button:** add a test to stories ([0348794fc7](https://github.com/migrationsverket/midas/commit/0348794fc7))
97
+ - **button:** add a test in primary story ([53f4fe042e](https://github.com/migrationsverket/midas/commit/53f4fe042e))
98
+ - **docs:** add test baseline and chromatic tests ([57d6255477](https://github.com/migrationsverket/midas/commit/57d6255477))
99
+ - **select:** fix the test ([f41535787b](https://github.com/migrationsverket/midas/commit/f41535787b))
100
+ - **select:** add test to check the size ([2c692d9ea0](https://github.com/migrationsverket/midas/commit/2c692d9ea0))
101
+
102
+ ### ⚠️ Breaking Changes
103
+
104
+ - ⚠️ **tokens:** rename tokens `blue140` & `blue170` and add new tokens `blue110`, `blue120`, rename `purple140` to `purple110` ([b79d586d53](https://github.com/migrationsverket/midas/commit/b79d586d53))
105
+ - **skeleton:** variant `rectangular` is no longer available, use `rectangle` instead. Animation is now a boolean and the prop to use is `isAnimated`
106
+ - **label:** label variants are no longer available, use component `Text` instead
107
+ - **useMessageFormatter:** Adobe has deprecated this hook in favour of `useLocalizedStringFormatter`. Use that instead!
108
+ - **theme:** use `supportBorderWarning` and `textWarning` instead
109
+ - **table:** prop `narrow` is no longer available
110
+ - **tabs:** `defaultSelected` no longer works, use `defaultSelectedKey` instead
111
+ - **spinner:** prop `dark` no longer works, use `isOnColor` instead
112
+ - **modal:** `ModalTrigger` and `Dialog` no longer works, use `DialogTrigger` and `Modal` instead
113
+ - **accordion:** API now conforms to React Aria standard. Same behavior is accomplished using `allowsMultipleExpanded`
114
+ - **button:** `size='small'` no longer has any effect on button size. Allowed sizes are `'medium' | 'large'`
115
+
116
+ # 9.0.0 (2025-05-05)
2
117
 
3
118
  ### 🩹 Fixes
4
119
 
@@ -10,7 +125,7 @@
10
125
 
11
126
  - **toast:** fix local example in storybook ([#542](https://github.com/migrationsverket/midas/pull/542))
12
127
 
13
- ## 8.3.0
128
+ ## 8.3.0 (2025-05-03)
14
129
 
15
130
  ### 🚀 Features
16
131
 
@@ -34,7 +149,7 @@
34
149
 
35
150
  - improvements to preview 💅 🔍 ✨ ([#530](https://github.com/migrationsverket/midas/pull/530))
36
151
 
37
- ## 8.2.0
152
+ ## 8.2.0 (2025-05-01)
38
153
 
39
154
  ### 🚀 Features
40
155
 
@@ -52,7 +167,7 @@
52
167
  - **propstable:** add support for enums in table ([#511](https://github.com/migrationsverket/midas/pull/511))
53
168
  - **modal:** change arg types in storybook ([f9588f170b](https://github.com/migrationsverket/midas/commit/f9588f170b))
54
169
 
55
- ## 8.1.0
170
+ ## 8.1.0 (2025-05-02)
56
171
 
57
172
  ### 🚀 Features
58
173
 
@@ -66,7 +181,7 @@
66
181
  - **select:** remove explicit size for indeterminate symbol ([5f805c134](https://github.com/migrationsverket/midas/commit/5f805c134))
67
182
  - **select:** change checkbox size to prevent disappearing border ([3ab520633](https://github.com/migrationsverket/midas/commit/3ab520633))
68
183
 
69
- # 8.0.0
184
+ # 8.0.0 (2025-05-01)
70
185
 
71
186
  ### 🚀 Features
72
187
 
@@ -105,7 +220,7 @@
105
220
  - update link docs with new code and examples ([a25a2def3](https://github.com/migrationsverket/midas/commit/a25a2def3))
106
221
  - use markdown links ([f1fb5714b](https://github.com/migrationsverket/midas/commit/f1fb5714b))
107
222
 
108
- ## 7.1.0
223
+ ## 7.1.0 (2025-05-01)
109
224
 
110
225
  ### 🚀 Features
111
226
 
@@ -117,11 +232,11 @@
117
232
  - **combobox:** fix background color to input ([997eac80b](https://github.com/migrationsverket/midas/commit/997eac80b))
118
233
  - **theme:** replace invalid text and border colors in dark mode ([3291a9cbd](https://github.com/migrationsverket/midas/commit/3291a9cbd))
119
234
 
120
- # 7.0.0
235
+ # 7.0.0 (2025-05-01)
121
236
 
122
237
  This was a version bump only for components to align it with other projects, there were no code changes.
123
238
 
124
- ## 6.2.0
239
+ ## 6.2.0 (2025-05-01)
125
240
 
126
241
  ### 🚀 Features
127
242
 
@@ -137,7 +252,7 @@ This was a version bump only for components to align it with other projects, the
137
252
  - **theme:** change the token value to icon secondary
138
253
  - **link-button:** fix secondary border and icon color in dark mode
139
254
 
140
- ## 6.1.0
255
+ ## 6.1.0 (2025-05-01)
141
256
 
142
257
  ### 🚀 Features
143
258
 
@@ -148,13 +263,13 @@ This was a version bump only for components to align it with other projects, the
148
263
  - **textfield:** fix token on input value ([e79f935e3](https://github.com/migrationsverket/midas/commit/e79f935e3))
149
264
  - **link-button:** add pseudo-classes in CSS link-button ([#385](https://github.com/migrationsverket/midas/pull/385))
150
265
 
151
- ## 6.0.1
266
+ ## 6.0.1 (2025-05-01)
152
267
 
153
268
  ### 🩹 Fixes
154
269
 
155
270
  - **select:** 🐛 Selected values doesn't match selected IDs
156
271
 
157
- # 6.0.0
272
+ # 6.0.0 (2025-05-01)
158
273
 
159
274
  ### 🚀 Features
160
275
 
@@ -181,7 +296,7 @@ This was a version bump only for components to align it with other projects, the
181
296
 
182
297
  - **modal:** Use the new DialogTrigger and Modal instead of ModalTrigger and Dialog. New API will apply.
183
298
 
184
- ## 5.0.1
299
+ ## 5.0.1 (2025-03-25)
185
300
 
186
301
  ### 🩹 Fixes
187
302
 
@@ -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.
@@ -9,6 +9,11 @@ interface MidasAccordionItem extends Omit<DisclosureProps, 'children'> {
9
9
  headingLevel?: HeadingProps['elementType'];
10
10
  /** Display an accordion item in different status states */
11
11
  type?: 'default' | 'success' | 'warning';
12
+ /**
13
+ * Adds a background element to the content, set to false for a transparent look
14
+ * @default true
15
+ **/
16
+ hasBackground?: boolean;
12
17
  }
13
18
  export declare const AccordionItem: React.FC<MidasAccordionItem>;
14
19
  export {};
@@ -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>;