@qasa/qds-ui 0.9.0-next.3 → 0.9.0-next.5
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/dist/cjs/index.js +2 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/button/button-icon.d.ts +10 -0
- package/dist/cjs/types/components/button/button-styles.d.ts +7 -8
- package/dist/cjs/types/components/button/button-types.d.ts +43 -0
- package/dist/cjs/types/components/button/button.d.ts +1 -36
- package/dist/cjs/types/components/heading/heading.d.ts +2 -2
- package/dist/cjs/types/components/icon/icon.types.d.ts +4 -2
- package/dist/cjs/types/components/icon-button/icon-button-styles.d.ts +7 -10
- package/dist/cjs/types/components/label/label.d.ts +2 -2
- package/dist/cjs/types/components/loading-dots/loading-dots.d.ts +2 -2
- package/dist/cjs/types/components/paragraph/paragraph.d.ts +2 -2
- package/dist/cjs/types/styles/common-styles.d.ts +2 -2
- package/dist/cjs/types/theme/foundations/colors.d.ts +2 -2
- package/dist/cjs/types/theme/foundations/index.d.ts +2 -2
- package/dist/cjs/types/theme/theme-tools.d.ts +2 -2
- package/dist/cjs/types/theme/theme.d.ts +2 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/button/button-icon.d.ts +10 -0
- package/dist/esm/types/components/button/button-styles.d.ts +7 -8
- package/dist/esm/types/components/button/button-types.d.ts +43 -0
- package/dist/esm/types/components/button/button.d.ts +1 -36
- package/dist/esm/types/components/heading/heading.d.ts +2 -2
- package/dist/esm/types/components/icon/icon.types.d.ts +4 -2
- package/dist/esm/types/components/icon-button/icon-button-styles.d.ts +7 -10
- package/dist/esm/types/components/label/label.d.ts +2 -2
- package/dist/esm/types/components/loading-dots/loading-dots.d.ts +2 -2
- package/dist/esm/types/components/paragraph/paragraph.d.ts +2 -2
- package/dist/esm/types/styles/common-styles.d.ts +2 -2
- package/dist/esm/types/theme/foundations/colors.d.ts +2 -2
- package/dist/esm/types/theme/foundations/index.d.ts +2 -2
- package/dist/esm/types/theme/theme-tools.d.ts +2 -2
- package/dist/esm/types/theme/theme.d.ts +2 -2
- package/dist/index.d.ts +182 -178
- package/package.json +1 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ElementType } from 'react';
|
|
2
|
+
import type { IconProps } from '../icon';
|
|
3
|
+
import type { ButtonSize } from './button-styles';
|
|
4
|
+
interface ButtonIconProps {
|
|
5
|
+
buttonSize: ButtonSize;
|
|
6
|
+
icon: ElementType<IconProps>;
|
|
7
|
+
placement: 'left' | 'right';
|
|
8
|
+
}
|
|
9
|
+
export declare function ButtonIcon({ buttonSize, icon: Icon, placement }: ButtonIconProps): JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { VariantProps } from '../../styles';
|
|
1
2
|
export declare const getSizeStyles: (theme: {
|
|
2
3
|
mediaQueries: {
|
|
3
4
|
readonly smUp: "@media(min-width: 480px)";
|
|
@@ -142,7 +143,7 @@ export declare const getSizeStyles: (theme: {
|
|
|
142
143
|
disabled: string;
|
|
143
144
|
negative: string;
|
|
144
145
|
warning: string;
|
|
145
|
-
|
|
146
|
+
positive: string;
|
|
146
147
|
onBrandPrimary: string;
|
|
147
148
|
onBrandSecondary: string;
|
|
148
149
|
onBrandTertiary: string;
|
|
@@ -155,7 +156,7 @@ export declare const getSizeStyles: (theme: {
|
|
|
155
156
|
subtle: string;
|
|
156
157
|
negative: string;
|
|
157
158
|
warning: string;
|
|
158
|
-
|
|
159
|
+
positive: string;
|
|
159
160
|
};
|
|
160
161
|
};
|
|
161
162
|
sizes: {
|
|
@@ -404,7 +405,6 @@ export declare const getSizeStyles: (theme: {
|
|
|
404
405
|
lineHeight: string;
|
|
405
406
|
letterSpacing: string;
|
|
406
407
|
height: string;
|
|
407
|
-
minWidth: string;
|
|
408
408
|
paddingLeft: string;
|
|
409
409
|
paddingRight: string;
|
|
410
410
|
};
|
|
@@ -415,7 +415,6 @@ export declare const getSizeStyles: (theme: {
|
|
|
415
415
|
lineHeight: string;
|
|
416
416
|
letterSpacing: string;
|
|
417
417
|
height: string;
|
|
418
|
-
minWidth: string;
|
|
419
418
|
paddingLeft: string;
|
|
420
419
|
paddingRight: string;
|
|
421
420
|
};
|
|
@@ -426,7 +425,6 @@ export declare const getSizeStyles: (theme: {
|
|
|
426
425
|
lineHeight: string;
|
|
427
426
|
letterSpacing: string;
|
|
428
427
|
height: string;
|
|
429
|
-
minWidth: string;
|
|
430
428
|
paddingLeft: string;
|
|
431
429
|
paddingRight: string;
|
|
432
430
|
};
|
|
@@ -437,7 +435,6 @@ export declare const getSizeStyles: (theme: {
|
|
|
437
435
|
lineHeight: string;
|
|
438
436
|
letterSpacing: string;
|
|
439
437
|
height: string;
|
|
440
|
-
minWidth: string;
|
|
441
438
|
paddingLeft: string;
|
|
442
439
|
paddingRight: string;
|
|
443
440
|
};
|
|
@@ -452,6 +449,7 @@ export declare const getSizeStyles: (theme: {
|
|
|
452
449
|
paddingRight: string;
|
|
453
450
|
};
|
|
454
451
|
};
|
|
452
|
+
export declare type ButtonSize = VariantProps<typeof getSizeStyles>;
|
|
455
453
|
export declare const getVariantStyles: (theme: {
|
|
456
454
|
mediaQueries: {
|
|
457
455
|
readonly smUp: "@media(min-width: 480px)";
|
|
@@ -596,7 +594,7 @@ export declare const getVariantStyles: (theme: {
|
|
|
596
594
|
disabled: string;
|
|
597
595
|
negative: string;
|
|
598
596
|
warning: string;
|
|
599
|
-
|
|
597
|
+
positive: string;
|
|
600
598
|
onBrandPrimary: string;
|
|
601
599
|
onBrandSecondary: string;
|
|
602
600
|
onBrandTertiary: string;
|
|
@@ -609,7 +607,7 @@ export declare const getVariantStyles: (theme: {
|
|
|
609
607
|
subtle: string;
|
|
610
608
|
negative: string;
|
|
611
609
|
warning: string;
|
|
612
|
-
|
|
610
|
+
positive: string;
|
|
613
611
|
};
|
|
614
612
|
};
|
|
615
613
|
sizes: {
|
|
@@ -894,3 +892,4 @@ export declare const getVariantStyles: (theme: {
|
|
|
894
892
|
};
|
|
895
893
|
};
|
|
896
894
|
};
|
|
895
|
+
export declare type ButtonVariant = VariantProps<typeof getVariantStyles>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { ElementType } from 'react';
|
|
2
|
+
import type { IconProps } from '../icon';
|
|
3
|
+
import type { ButtonSize, ButtonVariant } from './button-styles';
|
|
4
|
+
export interface ButtonOptions {
|
|
5
|
+
/**
|
|
6
|
+
* Sets the size of the button
|
|
7
|
+
* @default 'md'
|
|
8
|
+
*/
|
|
9
|
+
size?: ButtonSize;
|
|
10
|
+
/**
|
|
11
|
+
* Sets the style variant of the button
|
|
12
|
+
* @default 'secondary'
|
|
13
|
+
*/
|
|
14
|
+
variant?: ButtonVariant;
|
|
15
|
+
/**
|
|
16
|
+
* If `true` the button will fill its container
|
|
17
|
+
* @default false
|
|
18
|
+
*/
|
|
19
|
+
isFullWidth?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* If `true` the button will show a spinner
|
|
22
|
+
* @default false
|
|
23
|
+
*/
|
|
24
|
+
isLoading?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* If `true` the button will be disabled
|
|
27
|
+
* @default false
|
|
28
|
+
*/
|
|
29
|
+
isDisabled?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Icon to display before the button label
|
|
32
|
+
*/
|
|
33
|
+
iconLeft?: ElementType<IconProps>;
|
|
34
|
+
/**
|
|
35
|
+
* Icon to display after the button label
|
|
36
|
+
*/
|
|
37
|
+
iconRight?: ElementType<IconProps>;
|
|
38
|
+
/**
|
|
39
|
+
* The HTML `type` attribute
|
|
40
|
+
* @default 'button'
|
|
41
|
+
*/
|
|
42
|
+
type?: 'button' | 'submit' | 'reset';
|
|
43
|
+
}
|
|
@@ -1,40 +1,5 @@
|
|
|
1
|
-
import type { VariantProps } from '../../styles';
|
|
2
1
|
import type * as Polymorphic from '../../utils/polymorphic';
|
|
3
|
-
import {
|
|
4
|
-
declare type ButtonVariant = VariantProps<typeof getVariantStyles>;
|
|
5
|
-
declare type ButtonSize = VariantProps<typeof getSizeStyles>;
|
|
6
|
-
interface ButtonOptions {
|
|
7
|
-
/**
|
|
8
|
-
* Sets the size of the button
|
|
9
|
-
* @default 'md'
|
|
10
|
-
*/
|
|
11
|
-
size?: ButtonSize;
|
|
12
|
-
/**
|
|
13
|
-
* Sets the style variant of the button
|
|
14
|
-
* @default 'secondary'
|
|
15
|
-
*/
|
|
16
|
-
variant?: ButtonVariant;
|
|
17
|
-
/**
|
|
18
|
-
* If `true` the button will fill its container
|
|
19
|
-
* @default false
|
|
20
|
-
*/
|
|
21
|
-
isFullWidth?: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* If `true` the button will show a spinner
|
|
24
|
-
* @default false
|
|
25
|
-
*/
|
|
26
|
-
isLoading?: boolean;
|
|
27
|
-
/**
|
|
28
|
-
* If `true` the button will be disabled
|
|
29
|
-
* @default false
|
|
30
|
-
*/
|
|
31
|
-
isDisabled?: boolean;
|
|
32
|
-
/**
|
|
33
|
-
* The HTML `type` attribute
|
|
34
|
-
* @default 'button'
|
|
35
|
-
*/
|
|
36
|
-
type?: 'button' | 'submit' | 'reset';
|
|
37
|
-
}
|
|
2
|
+
import type { ButtonOptions } from './button-types';
|
|
38
3
|
declare type PolymorphicButton = Polymorphic.ForwardRefComponent<'button', ButtonOptions>;
|
|
39
4
|
export declare type ButtonProps = Polymorphic.PropsOf<PolymorphicButton>;
|
|
40
5
|
export declare const Button: PolymorphicButton;
|
|
@@ -145,7 +145,7 @@ declare const getSizeStyles: (theme: {
|
|
|
145
145
|
disabled: string;
|
|
146
146
|
negative: string;
|
|
147
147
|
warning: string;
|
|
148
|
-
|
|
148
|
+
positive: string;
|
|
149
149
|
onBrandPrimary: string;
|
|
150
150
|
onBrandSecondary: string;
|
|
151
151
|
onBrandTertiary: string;
|
|
@@ -158,7 +158,7 @@ declare const getSizeStyles: (theme: {
|
|
|
158
158
|
subtle: string;
|
|
159
159
|
negative: string;
|
|
160
160
|
warning: string;
|
|
161
|
-
|
|
161
|
+
positive: string;
|
|
162
162
|
};
|
|
163
163
|
};
|
|
164
164
|
sizes: {
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import type { Theme } from '@emotion/react';
|
|
2
1
|
import type { SVGAttributes } from 'react';
|
|
2
|
+
import type { Theme } from '../../theme';
|
|
3
3
|
declare type IconSize = 16 | 20 | 24 | 32;
|
|
4
4
|
declare type IconColor = keyof Theme['colors']['icon'] | 'currentColor';
|
|
5
5
|
export interface IconOptions {
|
|
6
6
|
/**
|
|
7
7
|
* The size of the icon.
|
|
8
8
|
*
|
|
9
|
-
* @default
|
|
9
|
+
* @default 24
|
|
10
10
|
*/
|
|
11
11
|
size?: IconSize;
|
|
12
12
|
/**
|
|
13
13
|
* The color of the icon.
|
|
14
|
+
*
|
|
15
|
+
* @default 'default'
|
|
14
16
|
*/
|
|
15
17
|
color?: IconColor;
|
|
16
18
|
}
|
|
@@ -142,7 +142,7 @@ export declare const getSizeStyles: (theme: {
|
|
|
142
142
|
disabled: string;
|
|
143
143
|
negative: string;
|
|
144
144
|
warning: string;
|
|
145
|
-
|
|
145
|
+
positive: string;
|
|
146
146
|
onBrandPrimary: string;
|
|
147
147
|
onBrandSecondary: string;
|
|
148
148
|
onBrandTertiary: string;
|
|
@@ -155,7 +155,7 @@ export declare const getSizeStyles: (theme: {
|
|
|
155
155
|
subtle: string;
|
|
156
156
|
negative: string;
|
|
157
157
|
warning: string;
|
|
158
|
-
|
|
158
|
+
positive: string;
|
|
159
159
|
};
|
|
160
160
|
};
|
|
161
161
|
sizes: {
|
|
@@ -400,17 +400,14 @@ export declare const getSizeStyles: (theme: {
|
|
|
400
400
|
xs: {
|
|
401
401
|
width: string;
|
|
402
402
|
height: string;
|
|
403
|
-
fontSize: string;
|
|
404
403
|
};
|
|
405
404
|
sm: {
|
|
406
405
|
width: string;
|
|
407
406
|
height: string;
|
|
408
|
-
fontSize: string;
|
|
409
407
|
};
|
|
410
408
|
md: {
|
|
411
409
|
width: string;
|
|
412
410
|
height: string;
|
|
413
|
-
fontSize: string;
|
|
414
411
|
};
|
|
415
412
|
};
|
|
416
413
|
export declare const getVariantStyles: (theme: {
|
|
@@ -557,7 +554,7 @@ export declare const getVariantStyles: (theme: {
|
|
|
557
554
|
disabled: string;
|
|
558
555
|
negative: string;
|
|
559
556
|
warning: string;
|
|
560
|
-
|
|
557
|
+
positive: string;
|
|
561
558
|
onBrandPrimary: string;
|
|
562
559
|
onBrandSecondary: string;
|
|
563
560
|
onBrandTertiary: string;
|
|
@@ -570,7 +567,7 @@ export declare const getVariantStyles: (theme: {
|
|
|
570
567
|
subtle: string;
|
|
571
568
|
negative: string;
|
|
572
569
|
warning: string;
|
|
573
|
-
|
|
570
|
+
positive: string;
|
|
574
571
|
};
|
|
575
572
|
};
|
|
576
573
|
sizes: {
|
|
@@ -862,9 +859,9 @@ export declare const getVariantStyles: (theme: {
|
|
|
862
859
|
':hover': {
|
|
863
860
|
background: string;
|
|
864
861
|
};
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
862
|
+
};
|
|
863
|
+
':active': {
|
|
864
|
+
background: string;
|
|
868
865
|
};
|
|
869
866
|
};
|
|
870
867
|
};
|
|
@@ -148,7 +148,7 @@ declare const getSizeStyles: (theme: {
|
|
|
148
148
|
disabled: string;
|
|
149
149
|
negative: string;
|
|
150
150
|
warning: string;
|
|
151
|
-
|
|
151
|
+
positive: string;
|
|
152
152
|
onBrandPrimary: string;
|
|
153
153
|
onBrandSecondary: string;
|
|
154
154
|
onBrandTertiary: string;
|
|
@@ -161,7 +161,7 @@ declare const getSizeStyles: (theme: {
|
|
|
161
161
|
subtle: string;
|
|
162
162
|
negative: string;
|
|
163
163
|
warning: string;
|
|
164
|
-
|
|
164
|
+
positive: string;
|
|
165
165
|
};
|
|
166
166
|
};
|
|
167
167
|
sizes: {
|
|
@@ -145,7 +145,7 @@ declare const getSizeStyles: (theme: {
|
|
|
145
145
|
disabled: string;
|
|
146
146
|
negative: string;
|
|
147
147
|
warning: string;
|
|
148
|
-
|
|
148
|
+
positive: string;
|
|
149
149
|
onBrandPrimary: string;
|
|
150
150
|
onBrandSecondary: string;
|
|
151
151
|
onBrandTertiary: string;
|
|
@@ -158,7 +158,7 @@ declare const getSizeStyles: (theme: {
|
|
|
158
158
|
subtle: string;
|
|
159
159
|
negative: string;
|
|
160
160
|
warning: string;
|
|
161
|
-
|
|
161
|
+
positive: string;
|
|
162
162
|
};
|
|
163
163
|
};
|
|
164
164
|
sizes: {
|
|
@@ -145,7 +145,7 @@ declare const getSizeStyles: (theme: {
|
|
|
145
145
|
disabled: string;
|
|
146
146
|
negative: string;
|
|
147
147
|
warning: string;
|
|
148
|
-
|
|
148
|
+
positive: string;
|
|
149
149
|
onBrandPrimary: string;
|
|
150
150
|
onBrandSecondary: string;
|
|
151
151
|
onBrandTertiary: string;
|
|
@@ -158,7 +158,7 @@ declare const getSizeStyles: (theme: {
|
|
|
158
158
|
subtle: string;
|
|
159
159
|
negative: string;
|
|
160
160
|
warning: string;
|
|
161
|
-
|
|
161
|
+
positive: string;
|
|
162
162
|
};
|
|
163
163
|
};
|
|
164
164
|
sizes: {
|
|
@@ -142,7 +142,7 @@ export declare const getFormFieldBaseStyles: (theme: {
|
|
|
142
142
|
disabled: string;
|
|
143
143
|
negative: string;
|
|
144
144
|
warning: string;
|
|
145
|
-
|
|
145
|
+
positive: string;
|
|
146
146
|
onBrandPrimary: string;
|
|
147
147
|
onBrandSecondary: string;
|
|
148
148
|
onBrandTertiary: string;
|
|
@@ -155,7 +155,7 @@ export declare const getFormFieldBaseStyles: (theme: {
|
|
|
155
155
|
subtle: string;
|
|
156
156
|
negative: string;
|
|
157
157
|
warning: string;
|
|
158
|
-
|
|
158
|
+
positive: string;
|
|
159
159
|
};
|
|
160
160
|
};
|
|
161
161
|
sizes: {
|
|
@@ -97,7 +97,7 @@ export declare const colors: {
|
|
|
97
97
|
disabled: string;
|
|
98
98
|
negative: string;
|
|
99
99
|
warning: string;
|
|
100
|
-
|
|
100
|
+
positive: string;
|
|
101
101
|
onBrandPrimary: string;
|
|
102
102
|
onBrandSecondary: string;
|
|
103
103
|
onBrandTertiary: string;
|
|
@@ -110,6 +110,6 @@ export declare const colors: {
|
|
|
110
110
|
subtle: string;
|
|
111
111
|
negative: string;
|
|
112
112
|
warning: string;
|
|
113
|
-
|
|
113
|
+
positive: string;
|
|
114
114
|
};
|
|
115
115
|
};
|
|
@@ -147,7 +147,7 @@ export declare const foundations: {
|
|
|
147
147
|
disabled: string;
|
|
148
148
|
negative: string;
|
|
149
149
|
warning: string;
|
|
150
|
-
|
|
150
|
+
positive: string;
|
|
151
151
|
onBrandPrimary: string;
|
|
152
152
|
onBrandSecondary: string;
|
|
153
153
|
onBrandTertiary: string;
|
|
@@ -160,7 +160,7 @@ export declare const foundations: {
|
|
|
160
160
|
subtle: string;
|
|
161
161
|
negative: string;
|
|
162
162
|
warning: string;
|
|
163
|
-
|
|
163
|
+
positive: string;
|
|
164
164
|
};
|
|
165
165
|
};
|
|
166
166
|
sizes: {
|
|
@@ -301,7 +301,7 @@ export declare const overrideTheme: (overrides: ThemeOverrides) => {
|
|
|
301
301
|
disabled: string;
|
|
302
302
|
negative: string;
|
|
303
303
|
warning: string;
|
|
304
|
-
|
|
304
|
+
positive: string;
|
|
305
305
|
onBrandPrimary: string;
|
|
306
306
|
onBrandSecondary: string;
|
|
307
307
|
onBrandTertiary: string;
|
|
@@ -314,7 +314,7 @@ export declare const overrideTheme: (overrides: ThemeOverrides) => {
|
|
|
314
314
|
subtle: string;
|
|
315
315
|
negative: string;
|
|
316
316
|
warning: string;
|
|
317
|
-
|
|
317
|
+
positive: string;
|
|
318
318
|
};
|
|
319
319
|
};
|
|
320
320
|
mediaQueries: {
|
|
@@ -142,7 +142,7 @@ export declare const theme: {
|
|
|
142
142
|
disabled: string;
|
|
143
143
|
negative: string;
|
|
144
144
|
warning: string;
|
|
145
|
-
|
|
145
|
+
positive: string;
|
|
146
146
|
onBrandPrimary: string;
|
|
147
147
|
onBrandSecondary: string;
|
|
148
148
|
onBrandTertiary: string;
|
|
@@ -155,7 +155,7 @@ export declare const theme: {
|
|
|
155
155
|
subtle: string;
|
|
156
156
|
negative: string;
|
|
157
157
|
warning: string;
|
|
158
|
-
|
|
158
|
+
positive: string;
|
|
159
159
|
};
|
|
160
160
|
};
|
|
161
161
|
sizes: {
|