@midas-ds/components 7.1.0 → 8.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,3 +1,42 @@
1
+ # 8.0.0
2
+
3
+ ### 🚀 Features
4
+
5
+ - **spinner:** change prop `dark` to `isOnColor` ([#443](https://github.com/migrationsverket/midas/pull/443))
6
+ - ✨ add errorPosition to form fields ([#416](https://github.com/migrationsverket/midas/pull/416))
7
+ - **layout:** new navbar component and external variant of layout ([ad54f5955](https://github.com/migrationsverket/midas/commit/ad54f5955))
8
+ - ✨💄 add semantic z-index tokens ([#401](https://github.com/migrationsverket/midas/pull/401))
9
+
10
+ ### 🩹 Fixes
11
+
12
+ - **calendar:** add high contrast styling for selected date ([a5af1cafe](https://github.com/migrationsverket/midas/commit/a5af1cafe))
13
+ - **calendar:** sync calendars ([3e7b4fb06](https://github.com/migrationsverket/midas/commit/3e7b4fb06))
14
+ - **calendar:** add border for high contrast mode ([7ed989df8](https://github.com/migrationsverket/midas/commit/7ed989df8))
15
+ - **radio:** add support for horizontal orientation ([e5c9ad3eb](https://github.com/migrationsverket/midas/commit/e5c9ad3eb))
16
+ - **link:** remove active styling in disabled state ([71c1e1400](https://github.com/migrationsverket/midas/commit/71c1e1400))
17
+ - **heading:** set correct styles for heading and affected components ([#394](https://github.com/migrationsverket/midas/pull/394))
18
+ - **accordion:** fix responsive content hiding when changing screen size ([#446](https://github.com/migrationsverket/midas/pull/446))
19
+ - **button:** add cursor styling for disabled state ([1ab3f6c55](https://github.com/migrationsverket/midas/commit/1ab3f6c55))
20
+ - **date-picker:** add missing disabled styles ([492a1b789](https://github.com/migrationsverket/midas/commit/492a1b789))
21
+ - **combobox:** fix background color to input ([6ec2c1d3e](https://github.com/migrationsverket/midas/commit/6ec2c1d3e))
22
+ - **theme:** replace invalid text and border colors in dark mode ([a6259f46c](https://github.com/migrationsverket/midas/commit/a6259f46c))
23
+
24
+ ### Documentation Changes
25
+
26
+ - **calendar:** update docs ([#469](https://github.com/migrationsverket/midas/pull/469))
27
+ - **link-button:** remove live-code from docs ([#451](https://github.com/migrationsverket/midas/pull/451))
28
+ - **heading:** expose ElementType ([79b85f4e4](https://github.com/migrationsverket/midas/commit/79b85f4e4))
29
+ - **tabs:** remove generic in prop interface ([d8bcf2b92](https://github.com/migrationsverket/midas/commit/d8bcf2b92))
30
+ - **tabs:** remove live code and update documentation ([c4b2c2e47](https://github.com/migrationsverket/midas/commit/c4b2c2e47))
31
+ - **tooltip:** update tooltip documentation 🔧 ([#439](https://github.com/migrationsverket/midas/pull/439))
32
+ - **label:** remove live code and update documentation ([1803a3ee1](https://github.com/migrationsverket/midas/commit/1803a3ee1))
33
+ - **table:** add prop comment ([6089593a4](https://github.com/migrationsverket/midas/commit/6089593a4))
34
+ - new page explaining tokens and use of color + removed and updated tokens ([c970f0eb5](https://github.com/migrationsverket/midas/commit/c970f0eb5))
35
+ - **text:** remove union type for documentation visibility ([675b94795](https://github.com/migrationsverket/midas/commit/675b94795))
36
+ - define error types at component level ([14dc2b8da](https://github.com/migrationsverket/midas/commit/14dc2b8da))
37
+ - update link docs with new code and examples ([a25a2def3](https://github.com/migrationsverket/midas/commit/a25a2def3))
38
+ - use markdown links ([f1fb5714b](https://github.com/migrationsverket/midas/commit/f1fb5714b))
39
+
1
40
  ## 7.1.0
2
41
 
3
42
  ### 🚀 Features
@@ -4,7 +4,7 @@ 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
- /** Weither to allow the user to have multiple accordions open at the same time */
7
+ /** @deprecated Use 'allowsMultipleExpanded' instead */
8
8
  type?: 'single' | 'multiple';
9
9
  }
10
10
  /**
@@ -1,9 +1,8 @@
1
1
  export interface BreadcrumbProps {
2
- items: MidasBreadcrumb[];
3
- }
4
- export interface MidasBreadcrumb {
5
- href: string;
6
- title: string;
7
- isDisabled?: boolean;
2
+ items: {
3
+ href: string;
4
+ title: string;
5
+ isDisabled?: boolean;
6
+ }[];
8
7
  }
9
8
  export declare const Breadcrumbs: React.FC<BreadcrumbProps>;
@@ -1,3 +1,6 @@
1
1
  import { InputProps } from 'react-aria-components';
2
2
  import * as React from 'react';
3
- export declare const CharacterCounter: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
3
+ export interface CharacterCounterProps extends InputProps {
4
+ isLonely?: boolean;
5
+ }
6
+ export declare const CharacterCounter: React.ForwardRefExoticComponent<CharacterCounterProps & React.RefAttributes<HTMLInputElement>>;
@@ -6,5 +6,6 @@ export interface CheckboxGroupProps extends Omit<AriaCheckboxGroupProps, 'childr
6
6
  description?: string;
7
7
  showSelectAll?: boolean;
8
8
  errorMessage?: string | ((validation: ValidationResult) => string);
9
+ errorPosition?: 'top' | 'bottom';
9
10
  }
10
- export declare const CheckboxGroup: ({ label, description, errorMessage, showSelectAll, children, ...props }: CheckboxGroupProps) => import("react/jsx-runtime").JSX.Element;
11
+ export declare const CheckboxGroup: ({ label, description, errorMessage, showSelectAll, children, errorPosition, ...props }: CheckboxGroupProps) => import("react/jsx-runtime").JSX.Element;
@@ -7,6 +7,7 @@ export interface ComboBoxProps<T extends object> extends Omit<AriaComboBoxProps<
7
7
  items?: Iterable<T>;
8
8
  children: React.ReactNode | ((item: T) => React.ReactNode);
9
9
  placeholder?: string;
10
+ errorPosition?: 'top' | 'bottom';
10
11
  }
11
- export declare function ComboBox<T extends object>({ label, description, errorMessage, children, items, className, ...props }: ComboBoxProps<T>): import("react/jsx-runtime").JSX.Element;
12
+ export declare function ComboBox<T extends object>({ label, description, errorMessage, children, items, className, errorPosition, ...props }: ComboBoxProps<T>): import("react/jsx-runtime").JSX.Element;
12
13
  export declare function ComboBoxItem(props: ListBoxItemProps): import("react/jsx-runtime").JSX.Element;
@@ -3,6 +3,7 @@ interface DateFieldProps<T extends DateValue> extends AriaDateFieldProps<T> {
3
3
  label?: string;
4
4
  description?: string;
5
5
  errorMessage?: string | ((validation: ValidationResult) => string);
6
+ errorPosition?: 'top' | 'bottom';
6
7
  }
7
- export declare function DateField<T extends DateValue>({ label, description, errorMessage, className, ...props }: DateFieldProps<T>): import("react/jsx-runtime").JSX.Element;
8
+ export declare function DateField<T extends DateValue>({ label, description, errorMessage, className, errorPosition, ...props }: DateFieldProps<T>): import("react/jsx-runtime").JSX.Element;
8
9
  export {};
@@ -3,12 +3,14 @@ interface MidasDateRangePickerProps<T extends DateValue> extends DateRangePicker
3
3
  label?: string;
4
4
  description?: string;
5
5
  errorMessage?: string | ((validation: ValidationResult) => string);
6
+ errorPosition?: 'top' | 'bottom';
6
7
  }
7
- export declare const DateRangePicker: <T extends DateValue>({ label, description, errorMessage, ...props }: MidasDateRangePickerProps<T>) => import("react/jsx-runtime").JSX.Element;
8
+ export declare const DateRangePicker: <T extends DateValue>({ label, description, errorMessage, errorPosition, ...props }: MidasDateRangePickerProps<T>) => import("react/jsx-runtime").JSX.Element;
8
9
  interface MidasDatePickerProps<T extends DateValue> extends DatePickerProps<T> {
9
10
  label?: string;
10
11
  description?: string;
11
12
  errorMessage?: string | ((validation: ValidationResult) => string);
13
+ errorPosition?: 'top' | 'bottom';
12
14
  }
13
- export declare const DatePicker: <T extends DateValue>({ label, description, errorMessage, ...props }: MidasDatePickerProps<T>) => import("react/jsx-runtime").JSX.Element;
15
+ export declare const DatePicker: <T extends DateValue>({ label, description, errorMessage, errorPosition, ...props }: MidasDatePickerProps<T>) => import("react/jsx-runtime").JSX.Element;
14
16
  export {};
@@ -1 +1 @@
1
- export { FieldError } from './FieldError';
1
+ export * from './FieldError';
@@ -1,11 +1,10 @@
1
1
  import { HeadingProps as AriaHeadingProps } from 'react-aria-components';
2
2
  import * as React from 'react';
3
- export type ElementType = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
4
3
  export interface HeadingProps extends AriaHeadingProps {
5
4
  /**
6
5
  * Override the semantic element of the component but keep the look of the level property
7
6
  */
8
- elementType?: ElementType;
7
+ elementType?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
9
8
  /**
10
9
  * Use the external/expressive look
11
10
  */