@midas-ds/components 3.1.0 → 5.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.
Files changed (47) hide show
  1. package/CHANGELOG.md +90 -0
  2. package/accordion/Accordion.d.ts +1 -0
  3. package/button/Button.d.ts +1 -0
  4. package/calendar/Calendar.d.ts +6 -0
  5. package/calendar/RangeCalendar.d.ts +6 -0
  6. package/calendar/index.d.ts +2 -0
  7. package/card/Card.d.ts +1 -0
  8. package/date-field/DateField.d.ts +8 -0
  9. package/date-field/index.d.ts +1 -0
  10. package/global.css +1 -1
  11. package/heading/Heading.d.ts +14 -0
  12. package/heading/index.d.ts +1 -0
  13. package/index.cjs +33 -28
  14. package/index.css +1 -1
  15. package/index.d.ts +6 -1
  16. package/index.js +8790 -8769
  17. package/label/Label.d.ts +10 -0
  18. package/label/index.d.ts +1 -0
  19. package/logo/Logo.d.ts +0 -2
  20. package/modal/Dialog.d.ts +18 -0
  21. package/modal/index.d.ts +1 -1
  22. package/package.json +1 -1
  23. package/progress-bar/ProgressBar.d.ts +19 -0
  24. package/progress-bar/index.d.ts +1 -0
  25. package/select/HiddenMultiSelect.d.ts +47 -0
  26. package/select/Select.d.ts +73 -10
  27. package/select/SelectListBox.d.ts +9 -0
  28. package/select/SelectPopover.d.ts +10 -0
  29. package/select/useMultiSelect.d.ts +21 -0
  30. package/select/useMultiSelectListState.d.ts +15 -0
  31. package/select/useMultiSelectState.d.ts +25 -0
  32. package/table/Table.d.ts +1 -0
  33. package/text/Text.d.ts +14 -0
  34. package/text/index.d.ts +1 -0
  35. package/textfield/TextField.d.ts +1 -0
  36. package/theme/index.d.ts +163 -102
  37. package/theme/tokens.d.ts +163 -102
  38. package/theme.cjs +1 -1
  39. package/theme.js +11 -18
  40. package/tokens-Ce2Sj8HD.js +240 -0
  41. package/tokens-DZsQgihc.cjs +1 -0
  42. package/utils/useObserveElement.d.ts +4 -0
  43. package/modal/Modal.d.ts +0 -13
  44. package/multi-select/MultiSelect.d.ts +0 -28
  45. package/multi-select/index.d.ts +0 -1
  46. package/tokens-BskyMDHv.cjs +0 -1
  47. package/tokens-CjXmpXTi.js +0 -160
package/CHANGELOG.md CHANGED
@@ -1,3 +1,93 @@
1
+ # 5.0.0 (2025-03-17)
2
+
3
+ ### 🚀 Features
4
+
5
+ - ⚠️ updated select, multi-select and modal components
6
+ - **button:** set primary border to 2px when in high-contrast mode
7
+
8
+ ### 🩹 Fixes
9
+
10
+ - **card:** deprecate card background
11
+ - **select:** change direct element selector
12
+ - **modal:** remove unused code
13
+ - **link-button:** remove ts-ignore comment
14
+ - **link:** remove unused code
15
+ - **docs:** remove unused code
16
+ - **select:** remove unsupported attribute
17
+ - **select:** remove useless fragment
18
+ - **search-field:** use aria-label instead of hidden label
19
+ - add and remove comments
20
+ - **layout:** final design adjustments
21
+ - **layout:** design tweaks
22
+ - **layout:** design tweaks
23
+ - **layout:** design adjustments
24
+ - **button:** write a deprecate comment that size small will be deprecate
25
+ - **table:** write a deprecate comment that narrow will be deprecate
26
+ - **date-picker:** resize button in invalid state, fixes #312
27
+ - **date-picker:** change selected date color to blue150
28
+ - change the weekday names to swedish languge
29
+ - change disabled cursor to not-allowed
30
+ - **datepicker:** change cursor to pointer
31
+ - **radio:** change cursor to pointer
32
+ - **checkbox:** change cursor to pointer
33
+
34
+ ### Documentation Changes
35
+
36
+ - fix local dark mode on portals in SB
37
+ - add security disclaimers
38
+ - **date-picker:** add style unavailable and code example for Unavailable Date in docs
39
+ - dark mode support for storybook and docusaurus
40
+
41
+ ### ⚠️ Breaking Changes
42
+
43
+ - `Select`, `MultiSelect` and `Modal` now have updated API:s, expect things not to work as before. Make sure to check the API:s before upgrading."
44
+
45
+ ### ❤️ Thank You
46
+
47
+ - derpbravely
48
+ - jabir Khalil
49
+ - pixelrickdreamer
50
+ - Wilhelm Hjelm
51
+
52
+ # 4.0.0 (2025-03-10)
53
+
54
+ ### 🚀 Features
55
+
56
+ - ⚠️ updated select, multi-select and modal components
57
+ - **button:** set primary border to 2px when in high-contrast mode
58
+
59
+ ### 🩹 Fixes
60
+
61
+ - **layout:** final design adjustments
62
+ - **layout:** design tweaks
63
+ - **layout:** design tweaks
64
+ - **layout:** design adjustments
65
+ - **button:** write a deprecate comment that size small will be deprecate
66
+ - **table:** write a deprecate comment that narrow will be deprecate
67
+ - **date-picker:** resize button in invalid state, fixes #312
68
+ - **date-picker:** change selected date color to blue150
69
+ - change the weekday names to swedish languge
70
+ - change disabled cursor to not-allowed
71
+ - **datepicker:** change cursor to pointer
72
+ - **radio:** change cursor to pointer
73
+ - **checkbox:** change cursor to pointer
74
+
75
+ ### Documentation Changes
76
+
77
+ - add security disclaimers
78
+ - **date-picker:** add style unavailable and code example for Unavailable Date in docs
79
+
80
+ ### ⚠️ Breaking Changes
81
+
82
+ - `Select`, `MultiSelect` and `Modal` now have updated API:s, expect things not to work as before. Make sure to check the API:s before upgrading."
83
+
84
+ ### ❤️ Thank You
85
+
86
+ - derpbravely
87
+ - jabir Khalil
88
+ - pixelrickdreamer
89
+ - Wilhelm Hjelm
90
+
1
91
  ## 3.1.0 (2025-03-06)
2
92
 
3
93
  ### 🚀 Features
@@ -1,5 +1,6 @@
1
1
  import { DisclosureGroupProps } from 'react-aria-components';
2
2
  import * as React from 'react';
3
+ export declare const ACCORDION_TEST_ID = "accordion";
3
4
  interface MidasAccordion extends DisclosureGroupProps {
4
5
  /** Display either the larger contained variant or a smaller uncontained variant */
5
6
  variant?: 'uncontained' | 'contained';
@@ -15,6 +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
19
  size?: 'small';
19
20
  /** Add an icon from lucide-react
20
21
  *
@@ -0,0 +1,6 @@
1
+ import { CalendarGridProps, CalendarProps, DateValue } from 'react-aria-components';
2
+ interface MidasCalendarProps<T extends DateValue> extends CalendarProps<T>, Pick<CalendarGridProps, 'weekdayStyle'> {
3
+ errorMessage?: string;
4
+ }
5
+ export declare function Calendar<T extends DateValue>({ errorMessage, weekdayStyle, className, ...props }: MidasCalendarProps<T>): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,6 @@
1
+ import { CalendarGridProps, RangeCalendarProps, DateValue } from 'react-aria-components';
2
+ interface MidasCalendarProps<T extends DateValue> extends RangeCalendarProps<T>, Pick<CalendarGridProps, 'weekdayStyle'> {
3
+ errorMessage?: string;
4
+ }
5
+ export declare function RangeCalendar<T extends DateValue>({ errorMessage, weekdayStyle, className, ...props }: MidasCalendarProps<T>): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,2 @@
1
+ export { Calendar } from './Calendar';
2
+ export { RangeCalendar } from './RangeCalendar';
package/card/Card.d.ts CHANGED
@@ -8,6 +8,7 @@ export interface CardProps<C extends React.ElementType = typeof Link> extends Re
8
8
  };
9
9
  /** Sets background to predetermined color
10
10
  * @default false
11
+ * @deprecated Not supported since v5.0.0
11
12
  * */
12
13
  background?: boolean;
13
14
  /** Header as h1 for the component rendered below image if there is one */
@@ -0,0 +1,8 @@
1
+ import { DateFieldProps as AriaDateFieldProps, DateValue, ValidationResult } from 'react-aria-components';
2
+ interface DateFieldProps<T extends DateValue> extends AriaDateFieldProps<T> {
3
+ label?: string;
4
+ description?: string;
5
+ errorMessage?: string | ((validation: ValidationResult) => string);
6
+ }
7
+ export declare function DateField<T extends DateValue>({ label, description, errorMessage, className, ...props }: DateFieldProps<T>): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1 @@
1
+ export { DateField } from './DateField';
package/global.css CHANGED
@@ -1 +1 @@
1
- @font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:100 900;src:url(https://cdn.jsdelivr.net/fontsource/fonts/inter:vf@latest/latin-wght-normal.woff2) format("woff2-variations");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}*{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
1
+ @font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:100 900;src:url(https://cdn.jsdelivr.net/fontsource/fonts/inter:vf@latest/latin-wght-normal.woff2) format("woff2-variations");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}*{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:root{color-scheme:light dark}
@@ -0,0 +1,14 @@
1
+ import { HeadingProps as AriaHeadingProps } from 'react-aria-components';
2
+ import * as React from 'react';
3
+ export type ElementType = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
4
+ export interface HeadingProps extends AriaHeadingProps {
5
+ /**
6
+ * Override the semantic element of the component but keep the look of the level property
7
+ */
8
+ elementType?: ElementType;
9
+ /**
10
+ * Use the external/expressive look
11
+ */
12
+ isExpressive?: boolean;
13
+ }
14
+ export declare const Heading: React.FC<HeadingProps>;
@@ -0,0 +1 @@
1
+ export * from './Heading';