@midas-ds/components 4.0.0 → 5.0.1

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.
@@ -0,0 +1,10 @@
1
+ import { LabelProps as AriaLabelProps } from 'react-aria-components';
2
+ import * as React from 'react';
3
+ export type LabelVariant = 'label-01' | 'label-02';
4
+ export interface LabelProps extends AriaLabelProps {
5
+ /**
6
+ * The visual variant of the component
7
+ */
8
+ variant?: LabelVariant;
9
+ }
10
+ export declare const Label: React.FC<LabelProps>;
@@ -0,0 +1 @@
1
+ export * from './Label';
package/logo/Logo.d.ts CHANGED
@@ -8,8 +8,6 @@ export interface LogoProps extends React.DetailedHTMLProps<React.HTMLAttributes<
8
8
  * Specify logo size
9
9
  */
10
10
  size?: 'x-small' | 'small' | 'medium' | 'large';
11
- /** Display background fill using selected primary or dark color */
12
- background?: boolean;
13
11
  /** There must be whitespace around the logo. By disabling our built in padding you must add at least an equal amount yourself. */
14
12
  padding?: boolean;
15
13
  }
package/package.json CHANGED
@@ -14,7 +14,7 @@
14
14
  "description": "Midas Components",
15
15
  "homepage": "https://designsystem.migrationsverket.se/",
16
16
  "license": "CC0-1.0",
17
- "version": "4.0.0",
17
+ "version": "5.0.1",
18
18
  "main": "./index.cjs",
19
19
  "module": "./index.js",
20
20
  "types": "./index.d.ts",
@@ -48,9 +48,8 @@
48
48
  }
49
49
  },
50
50
  "dependencies": {
51
- "@react-stately/toast": "3.0.0-beta.7",
52
- "react-aria": "3.37.0",
53
- "react-aria-components": "^1.6.0",
54
- "react-stately": "3.35.0"
51
+ "react-aria": "^3.38.1",
52
+ "react-aria-components": "^1.7.1",
53
+ "react-stately": "^3.36.1"
55
54
  }
56
55
  }
@@ -0,0 +1,19 @@
1
+ import { ProgressBarProps as AriaProgressBarProps } from 'react-aria-components';
2
+ import { LabelProps } from '../label';
3
+ import * as React from 'react';
4
+ interface ProgressBarProps extends AriaProgressBarProps {
5
+ /**
6
+ * A visual label
7
+ * */
8
+ label?: string;
9
+ /**
10
+ * Props for the visual label and/or the value label
11
+ * */
12
+ labelProps?: LabelProps;
13
+ /**
14
+ * Show the value label
15
+ */
16
+ showValueLabel?: boolean;
17
+ }
18
+ export declare const ProgressBar: React.FC<ProgressBarProps>;
19
+ export {};
@@ -0,0 +1 @@
1
+ export * from './ProgressBar';
@@ -6,5 +6,5 @@ type PopoverProps = {
6
6
  onClose: () => void;
7
7
  triggerRef: React.RefObject<HTMLButtonElement>;
8
8
  };
9
- export declare const SelectPopover: React.VFC<PopoverProps>;
9
+ export declare const SelectPopover: React.FC<PopoverProps>;
10
10
  export {};
package/text/Text.d.ts ADDED
@@ -0,0 +1,14 @@
1
+ import { TextProps as AriaTextProps } from 'react-aria-components';
2
+ import * as React from 'react';
3
+ export type TextVariant = 'body-01' | 'body-02';
4
+ export interface TextProps extends AriaTextProps {
5
+ /**
6
+ * The visual variant of the component
7
+ */
8
+ variant?: TextVariant;
9
+ /**
10
+ * Use the external/expressive look
11
+ */
12
+ isExpressive?: boolean;
13
+ }
14
+ export declare const Text: React.FC<TextProps>;
@@ -0,0 +1 @@
1
+ export * from './Text';
@@ -21,4 +21,5 @@ export declare const TextField: React.FC<TextFieldProps>;
21
21
  type InputWrapperProps = Pick<TextFieldProps, 'label' | 'description' | 'errorMessage' | 'children'>;
22
22
  export declare const InputWrapper: ({ label, description, errorMessage, children, }: InputWrapperProps) => import("react/jsx-runtime").JSX.Element;
23
23
  export declare const ssnRegEx: RegExp;
24
+ export declare const dossNrRegEx: RegExp;
24
25
  export {};
package/theme/index.d.ts CHANGED
@@ -1,8 +1,10 @@
1
1
  export * from './tokens';
2
2
  export declare const theme: {
3
3
  baseColors: {
4
- white: string;
5
4
  black: string;
5
+ white: string;
6
+ blackHover: string;
7
+ whiteHover: string;
6
8
  gray10: string;
7
9
  gray20: string;
8
10
  gray30: string;
@@ -13,23 +15,18 @@ export declare const theme: {
13
15
  gray80: string;
14
16
  gray90: string;
15
17
  gray100: string;
18
+ gray110: string;
19
+ gray120: string;
16
20
  gray130: string;
21
+ gray140: string;
17
22
  gray150: string;
18
- red10: string;
19
- red20: string;
20
- red30: string;
21
- red40: string;
22
- red50: string;
23
- red60: string;
24
- red70: string;
25
- red80: string;
26
- red90: string;
27
- red100: string;
28
- red130: string;
29
- red150: string;
23
+ gray160: string;
24
+ gray170: string;
25
+ gray180: string;
26
+ gray190: string;
27
+ gray200: string;
30
28
  blue10: string;
31
29
  blue20: string;
32
- blue30: string;
33
30
  blue40: string;
34
31
  blue50: string;
35
32
  blue60: string;
@@ -37,102 +34,166 @@ export declare const theme: {
37
34
  blue80: string;
38
35
  blue90: string;
39
36
  blue100: string;
40
- blue130: string;
41
- blue150: string;
42
- };
43
- buttonColors: {
44
- outline: string;
45
- primaryBackground: string;
46
- primaryText: string;
47
- primaryHover: string;
48
- primaryFocus: string;
49
- primaryActive: string;
50
- secondaryBackground: string;
51
- secondaryText: string;
52
- secondaryHover: string;
53
- secondaryActive: string;
54
- };
55
- inputColor: {
56
- inputText: string;
57
- };
58
- signalColors: {
59
- signalGreen10: string;
60
- signalGreen100: string;
61
- signalBlue10: string;
62
- signalBlue100: string;
63
- signalYellow10: string;
64
- signalYellow100: string;
65
- signalRed10: string;
66
- signalRed100: string;
67
- signalRed130: string;
68
- signalRed150: string;
69
- };
70
- borderRadius: {
71
- sRadius: string;
72
- mRadius: string;
73
- };
74
- borderWidths: {
75
- xsWidth: string;
76
- sWidth: string;
77
- mWidth: string;
37
+ blue140: string;
38
+ blue170: string;
39
+ purple80: string;
40
+ purple140: string;
41
+ red100: string;
42
+ signalBlue20: string;
43
+ signalBlue140: string;
44
+ signalGreen20: string;
45
+ signalGreen140: string;
46
+ signalRed20: string;
47
+ signalRed140: string;
48
+ signalRed160: string;
49
+ signalRed180: string;
50
+ signalYellow20: string;
51
+ signalYellow140: string;
78
52
  };
79
- fontWeights: {
80
- lightWeight: string;
81
- regularWeight: string;
82
- mediumWeight: string;
83
- semiBoldWeight: string;
84
- boldWeight: string;
85
- blackWeight: string;
53
+ typography: {
54
+ fontFamily: string;
55
+ lineHeight01: number;
56
+ lineHeight02: number;
57
+ lineHeight03: number;
58
+ lineHeight04: number;
59
+ lineHeight05: number;
60
+ lineHeight06: number;
61
+ lineHeight07: number;
62
+ lineHeight08: number;
63
+ lineHeight09: number;
64
+ size01: string;
65
+ size02: string;
66
+ size03: string;
67
+ size04: string;
68
+ size05: string;
69
+ size06: string;
70
+ size07: string;
71
+ size08: string;
72
+ size09: string;
73
+ size10: string;
74
+ weightThin: number;
75
+ weightExtraLight: number;
76
+ weightLight: number;
77
+ weightRegular: number;
78
+ weightMedium: number;
79
+ weightSemiBold: number;
80
+ weightBold: number;
81
+ weightExtraBold: number;
82
+ weightBlack: number;
86
83
  };
87
- fontSizes: {
88
- desktopSize: string;
89
- mobileSize: string;
90
- largeSize: string;
91
- inputNormalSize: string;
92
- inputMessageSize: string;
93
- inputLabelSize: string;
94
- inputDescriptionSize: string;
84
+ spacing: {
85
+ '01': string;
86
+ '02': string;
87
+ '03': string;
88
+ '04': string;
89
+ '05': string;
90
+ '06': string;
91
+ '07': string;
92
+ '08': string;
93
+ '09': string;
94
+ '10': string;
95
+ '11': string;
96
+ '12': string;
95
97
  };
96
- midasColors: {
97
- logoPrimary: string;
98
- logoSecondary: string;
99
- textPrimary: string;
100
- textSecondary: string;
101
- textTertiary: string;
102
- link: string;
103
- linkVisited: string;
104
- backgroundPrimary: string;
105
- backgroundSecondary: string;
106
- backgroundFooter1: string;
107
- backgroundFooter2: string;
108
- backgroundInfo: string;
109
- backgroundImportant: string;
110
- borderPrimary: string;
111
- borderSecondary: string;
112
- borderFocusOuter: string;
113
- borderFocusInner: string;
114
- iconPrimary: string;
115
- iconInverted: string;
98
+ states: {
99
+ focus: string;
116
100
  };
117
- midasTransitions: {
118
- slowTransition: string;
119
- normalTransition: string;
120
- fastTransition: string;
101
+ transitions: {
102
+ slow: string;
103
+ normal: string;
104
+ fast: string;
121
105
  };
122
106
  breakpoints: {
123
- smBreakpoint: string;
124
- mdBreakpoint: string;
125
- lgBreakpoint: string;
126
- xlBreakpoint: string;
127
- };
128
- accessibility: {
107
+ sm: string;
108
+ md: string;
109
+ lg: string;
110
+ xl: string;
129
111
  forcedColorsMode: string;
112
+ darkMode: string;
130
113
  prefersReducedMotion: string;
131
114
  };
132
- font: {
133
- display: string;
134
- };
135
- boxShadow: {
136
- focus: string;
115
+ semantic: {
116
+ background01: string;
117
+ backgroundHover01: string;
118
+ backgroundInverse01: string;
119
+ layer01: string;
120
+ layerHover01: string;
121
+ layerSelected01: string;
122
+ layerSelectedHover01: string;
123
+ layer02: string;
124
+ layerHover02: string;
125
+ layerSelected02: string;
126
+ layerSelectedHover02: string;
127
+ layerAccent01: string;
128
+ layerAccentHover01: string;
129
+ layerAccentSelected01: string;
130
+ layerAccent02: string;
131
+ layerAccentHover02: string;
132
+ layerAccentSelected02: string;
133
+ brandPrimary: string;
134
+ borderStrong: string;
135
+ borderMedium: string;
136
+ borderSubtle: string;
137
+ borderBrand: string;
138
+ borderInvalid: string;
139
+ borderDisabled: string;
140
+ borderSkeleton: string;
141
+ borderInverse: string;
142
+ field01: string;
143
+ fieldHover01: string;
144
+ fieldActive01: string;
145
+ field02: string;
146
+ fieldHover02: string;
147
+ fieldActive02: string;
148
+ fieldDisabled: string;
149
+ fieldSkeleton: string;
150
+ iconPrimary: string;
151
+ iconSecondary: string;
152
+ iconInverse: string;
153
+ iconOnColor: string;
154
+ iconDanger: string;
155
+ iconDisabled: string;
156
+ iconSuccess: string;
157
+ iconInfo: string;
158
+ iconWarning: string;
159
+ iconImportant: string;
160
+ linkEnabled: string;
161
+ linkHover: string;
162
+ linkPressed: string;
163
+ linkVisited: string;
164
+ notificationBorderSuccess: string;
165
+ notificationBorderInfo: string;
166
+ notificationBorderImportant: string;
167
+ notificationBorderWarning: string;
168
+ notificationBackgroundSuccess: string;
169
+ notificationBackgroundInfo: string;
170
+ notificationBackgroundImportant: string;
171
+ notificationBackgroundWarning: string;
172
+ textPrimary: string;
173
+ textSecondary: string;
174
+ textBrand: string;
175
+ textOnColor: string;
176
+ textInverse: string;
177
+ textSubtle: string;
178
+ textDisabled: string;
179
+ textInvalid: string;
180
+ textPlaceholder: string;
181
+ buttonBackgroundPrimary: string;
182
+ buttonBackgroundPrimaryHover: string;
183
+ buttonBackgroundPrimaryActive: string;
184
+ buttonBackgroundSecondary: string;
185
+ buttonBackgroundSecondaryHover: string;
186
+ buttonBackgroundSecondaryActive: string;
187
+ buttonBackgroundTertiaryHover: string;
188
+ buttonBackgroundTertiaryActive: string;
189
+ buttonBackgroundDanger: string;
190
+ buttonBackgroundDangerHover: string;
191
+ buttonBackgroundDangerActive: string;
192
+ buttonBackgroundDisabled: string;
193
+ buttonBackgroundSkeleton: string;
194
+ buttonBackgroundGhostHover: string;
195
+ buttonBackgroundGhostActive: string;
196
+ buttonBorderPrimary: string;
197
+ logoPrimary: string;
137
198
  };
138
199
  };