@bethinkpl/design-system 37.0.6 → 38.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/README.md +1 -2
- package/dist/design-system.css +1 -1
- package/dist/design-system.js +6454 -6404
- package/dist/design-system.js.map +1 -1
- package/dist/lib/js/components/Banner/Banner.consts.d.ts +1 -0
- package/dist/lib/js/components/Banner/Banner.vue.d.ts +6 -0
- package/dist/lib/js/components/Buttons/Button/Button.consts.d.ts +1 -0
- package/dist/lib/js/components/Buttons/Button/useMagicGradient.d.ts +5 -0
- package/dist/lib/js/components/Buttons/IconButton/IconButton.consts.d.ts +1 -0
- package/dist/lib/js/components/Buttons/IconButton/IconButton.vue.d.ts +5 -2
- package/dist/lib/js/components/Drawer/DrawerHeader/DrawerHeader.vue.d.ts +3 -0
- package/dist/lib/js/components/Drawer/DrawerSection/DrawerSection.vue.d.ts +5 -0
- package/dist/lib/js/components/Headers/OverlayHeader/OverlayHeader.vue.d.ts +4 -0
- package/dist/lib/js/components/Headers/SectionHeader/SectionHeader.vue.d.ts +4 -0
- package/dist/lib/js/components/Modals/Modal/Modal.vue.d.ts +5 -0
- package/dist/lib/js/components/Modals/ModalDialog/ModalDialog.vue.d.ts +5 -0
- package/dist/lib/js/components/Pagination/Pagination.vue.d.ts +4 -0
- package/dist/lib/js/components/SurveyQuestions/SurveyQuestionOpenEnded/SurveyQuestionOpenEnded.vue.d.ts +4 -0
- package/dist/lib/js/components/SurveyQuestions/SurveyQuestionScale/SurveyQuestionScale.vue.d.ts +4 -0
- package/dist/lib/js/components/Tile/Tile.sb.shared.d.ts +10 -0
- package/dist/lib/js/components/Toast/Toast.vue.d.ts +1 -0
- package/lib/js/components/Banner/Banner.consts.ts +1 -0
- package/lib/js/components/Banner/Banner.spec.ts +15 -0
- package/lib/js/components/Banner/Banner.stories.ts +5 -0
- package/lib/js/components/Banner/Banner.vue +16 -1
- package/lib/js/components/Buttons/Button/Button.consts.ts +1 -0
- package/lib/js/components/Buttons/Button/Button.spec.ts +35 -0
- package/lib/js/components/Buttons/Button/Button.vue +19 -0
- package/lib/js/components/Buttons/Button/useMagicGradient.spec.ts +47 -0
- package/lib/js/components/Buttons/Button/useMagicGradient.ts +50 -0
- package/lib/js/components/Buttons/IconButton/IconButton.consts.ts +1 -0
- package/lib/js/components/Buttons/IconButton/IconButton.spec.ts +107 -0
- package/lib/js/components/Buttons/IconButton/IconButton.stories.ts +5 -1
- package/lib/js/components/Buttons/IconButton/IconButton.vue +45 -5
- package/lib/js/components/DatePickers/DatePicker/DatePicker.vue +5 -0
- package/lib/js/components/DatePickers/DateRangePicker/DateRangePicker.vue +5 -0
- package/lib/js/components/Switch/Switch.vue +3 -3
- package/lib/styles/components/_buttons.scss +96 -1
- package/lib/styles/design-system.scss +9 -3
- package/lib/styles/mixins/_scrollbars.scss +6 -2
- package/lib/styles/settings/_gradients-variables.scss +34 -0
- package/lib/styles/settings/_gradients.scss +4 -0
- package/lib/styles/settings/colors/_magic-variables.scss +10 -0
- package/lib/styles/settings/colors/_magic.scss +9 -0
- package/lib/styles/settings/colors/_raw-bodywork-dark.scss +22 -0
- package/lib/styles/settings/colors/_raw-mc-dark.scss +22 -0
- package/lib/styles/settings/colors/_raw-wnl-dark.scss +22 -0
- package/lib/styles/settings/colors/_raw.json +1 -1
- package/lib/styles/settings/colors/_raw.scss +26 -0
- package/lib/styles/settings/colors/_tokens-variables-dark.scss +513 -0
- package/package.json +1 -1
|
@@ -28,6 +28,9 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
28
28
|
size: {
|
|
29
29
|
type: import('vue').PropType<string>;
|
|
30
30
|
};
|
|
31
|
+
isTitleWeak: {
|
|
32
|
+
type: import('vue').PropType<boolean>;
|
|
33
|
+
};
|
|
31
34
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
32
35
|
close: () => void;
|
|
33
36
|
"button-clicked": () => void;
|
|
@@ -53,6 +56,9 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
53
56
|
size: {
|
|
54
57
|
type: import('vue').PropType<string>;
|
|
55
58
|
};
|
|
59
|
+
isTitleWeak: {
|
|
60
|
+
type: import('vue').PropType<boolean>;
|
|
61
|
+
};
|
|
56
62
|
}>> & Readonly<{
|
|
57
63
|
onClose?: (() => any) | undefined;
|
|
58
64
|
"onButton-clicked"?: (() => any) | undefined;
|
|
@@ -18,6 +18,7 @@ export declare const BUTTON_COLORS: {
|
|
|
18
18
|
readonly DANGER: "danger";
|
|
19
19
|
readonly SUCCESS: "success";
|
|
20
20
|
readonly INVERTED: "inverted";
|
|
21
|
+
readonly MAGIC: "magic";
|
|
21
22
|
};
|
|
22
23
|
export type ButtonColor = Value<typeof BUTTON_COLORS>;
|
|
23
24
|
export declare const BUTTON_RADIUSES: {
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { MaybeRefOrGetter } from 'vue';
|
|
2
|
+
|
|
3
|
+
export declare const GRADIENT_MAGIC_ICON_ID = "ds-gradient-magic-icon";
|
|
4
|
+
export declare const GRADIENT_MAGIC_ICON_DISABLED_ID = "ds-gradient-magic-icon-disabled";
|
|
5
|
+
export declare function useMagicGradient(enabled: MaybeRefOrGetter<boolean>): void;
|
|
@@ -29,6 +29,7 @@ export declare const ICON_BUTTON_COLORS: {
|
|
|
29
29
|
readonly INVERTED: "inverted";
|
|
30
30
|
readonly WARNING: "warning";
|
|
31
31
|
readonly INFO: "info";
|
|
32
|
+
readonly MAGIC: "magic";
|
|
32
33
|
};
|
|
33
34
|
export type IconButtonColor = Value<typeof ICON_BUTTON_COLORS>;
|
|
34
35
|
export declare const ICON_BUTTON_STATES: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ButtonElevation, ButtonRadius } from '../Button';
|
|
2
|
-
import { ICON_BUTTON_STATES, IconButtonColor, IconButtonColorScheme, IconButtonSize, IconButtonType } from './IconButton.consts';
|
|
1
|
+
import { ButtonElevation, ButtonRadius, ButtonState } from '../Button';
|
|
2
|
+
import { ICON_BUTTON_STATES, IconButtonColor, IconButtonColorScheme, IconButtonSize, IconButtonState, IconButtonType } from './IconButton.consts';
|
|
3
3
|
import { Value } from '../../../utils/type.utils';
|
|
4
4
|
|
|
5
5
|
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
@@ -48,6 +48,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
48
48
|
validator(value: Value<typeof ICON_BUTTON_STATES>): boolean;
|
|
49
49
|
};
|
|
50
50
|
}>, {
|
|
51
|
+
ICON_BUTTON_STATE_MAP: Record<IconButtonState, ButtonState>;
|
|
51
52
|
isHovered: import('vue').Ref<boolean>;
|
|
52
53
|
mouseOver: () => void;
|
|
53
54
|
mouseLeave: () => void;
|
|
@@ -371,6 +372,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
371
372
|
readonly INVERTED: "inverted";
|
|
372
373
|
readonly WARNING: "warning";
|
|
373
374
|
readonly INFO: "info";
|
|
375
|
+
readonly MAGIC: "magic";
|
|
374
376
|
}>;
|
|
375
377
|
BUTTON_COLORS: Readonly<{
|
|
376
378
|
readonly PRIMARY: "primary";
|
|
@@ -378,6 +380,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
378
380
|
readonly DANGER: "danger";
|
|
379
381
|
readonly SUCCESS: "success";
|
|
380
382
|
readonly INVERTED: "inverted";
|
|
383
|
+
readonly MAGIC: "magic";
|
|
381
384
|
}>;
|
|
382
385
|
}, {
|
|
383
386
|
iconSize(): string;
|
|
@@ -693,6 +693,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
693
693
|
validator(value: import('../../../utils/type.utils').Value<typeof import('../../Buttons/IconButton').ICON_BUTTON_STATES>): boolean;
|
|
694
694
|
};
|
|
695
695
|
}>, {
|
|
696
|
+
ICON_BUTTON_STATE_MAP: Record<import('../../Buttons/IconButton').IconButtonState, import('../../Buttons/Button').ButtonState>;
|
|
696
697
|
isHovered: import('vue').Ref<boolean>;
|
|
697
698
|
mouseOver: () => void;
|
|
698
699
|
mouseLeave: () => void;
|
|
@@ -1016,6 +1017,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
1016
1017
|
readonly INVERTED: "inverted";
|
|
1017
1018
|
readonly WARNING: "warning";
|
|
1018
1019
|
readonly INFO: "info";
|
|
1020
|
+
readonly MAGIC: "magic";
|
|
1019
1021
|
}>;
|
|
1020
1022
|
BUTTON_COLORS: Readonly<{
|
|
1021
1023
|
readonly PRIMARY: "primary";
|
|
@@ -1023,6 +1025,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
1023
1025
|
readonly DANGER: "danger";
|
|
1024
1026
|
readonly SUCCESS: "success";
|
|
1025
1027
|
readonly INVERTED: "inverted";
|
|
1028
|
+
readonly MAGIC: "magic";
|
|
1026
1029
|
}>;
|
|
1027
1030
|
}, {
|
|
1028
1031
|
iconSize(): string;
|
|
@@ -70,6 +70,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
70
70
|
readonly INVERTED: "inverted";
|
|
71
71
|
readonly WARNING: "warning";
|
|
72
72
|
readonly INFO: "info";
|
|
73
|
+
readonly MAGIC: "magic";
|
|
73
74
|
};
|
|
74
75
|
ICON_BUTTON_SIZES: {
|
|
75
76
|
readonly XX_SMALL: "xx-small";
|
|
@@ -806,6 +807,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
806
807
|
readonly INVERTED: "inverted";
|
|
807
808
|
readonly WARNING: "warning";
|
|
808
809
|
readonly INFO: "info";
|
|
810
|
+
readonly MAGIC: "magic";
|
|
809
811
|
}>;
|
|
810
812
|
SECTION_HEADER_MOBILE_LAYOUTS: Readonly<{
|
|
811
813
|
readonly VERTICAL: "vertical";
|
|
@@ -1027,6 +1029,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
1027
1029
|
validator(value: import('../../../utils/type.utils').Value<typeof import('../../Buttons/IconButton').ICON_BUTTON_STATES>): boolean;
|
|
1028
1030
|
};
|
|
1029
1031
|
}>, {
|
|
1032
|
+
ICON_BUTTON_STATE_MAP: Record<import('../../Buttons/IconButton').IconButtonState, import('../../..').ButtonState>;
|
|
1030
1033
|
isHovered: import('vue').Ref<boolean>;
|
|
1031
1034
|
mouseOver: () => void;
|
|
1032
1035
|
mouseLeave: () => void;
|
|
@@ -1350,6 +1353,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
1350
1353
|
readonly INVERTED: "inverted";
|
|
1351
1354
|
readonly WARNING: "warning";
|
|
1352
1355
|
readonly INFO: "info";
|
|
1356
|
+
readonly MAGIC: "magic";
|
|
1353
1357
|
}>;
|
|
1354
1358
|
BUTTON_COLORS: Readonly<{
|
|
1355
1359
|
readonly PRIMARY: "primary";
|
|
@@ -1357,6 +1361,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
1357
1361
|
readonly DANGER: "danger";
|
|
1358
1362
|
readonly SUCCESS: "success";
|
|
1359
1363
|
readonly INVERTED: "inverted";
|
|
1364
|
+
readonly MAGIC: "magic";
|
|
1360
1365
|
}>;
|
|
1361
1366
|
}, {
|
|
1362
1367
|
iconSize(): string;
|
|
@@ -58,6 +58,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
58
58
|
readonly INVERTED: "inverted";
|
|
59
59
|
readonly WARNING: "warning";
|
|
60
60
|
readonly INFO: "info";
|
|
61
|
+
readonly MAGIC: "magic";
|
|
61
62
|
}>;
|
|
62
63
|
ICON_BUTTON_STATES: Readonly<{
|
|
63
64
|
readonly DEFAULT: "default";
|
|
@@ -469,6 +470,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
469
470
|
validator(value: Value<typeof ICON_BUTTON_STATES>): boolean;
|
|
470
471
|
};
|
|
471
472
|
}>, {
|
|
473
|
+
ICON_BUTTON_STATE_MAP: Record<import('../../Buttons/IconButton').IconButtonState, import('../../..').ButtonState>;
|
|
472
474
|
isHovered: import('vue').Ref<boolean>;
|
|
473
475
|
mouseOver: () => void;
|
|
474
476
|
mouseLeave: () => void;
|
|
@@ -792,6 +794,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
792
794
|
readonly INVERTED: "inverted";
|
|
793
795
|
readonly WARNING: "warning";
|
|
794
796
|
readonly INFO: "info";
|
|
797
|
+
readonly MAGIC: "magic";
|
|
795
798
|
}>;
|
|
796
799
|
BUTTON_COLORS: Readonly<{
|
|
797
800
|
readonly PRIMARY: "primary";
|
|
@@ -799,6 +802,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
799
802
|
readonly DANGER: "danger";
|
|
800
803
|
readonly SUCCESS: "success";
|
|
801
804
|
readonly INVERTED: "inverted";
|
|
805
|
+
readonly MAGIC: "magic";
|
|
802
806
|
}>;
|
|
803
807
|
}, {
|
|
804
808
|
iconSize(): string;
|
|
@@ -370,6 +370,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
370
370
|
readonly INVERTED: "inverted";
|
|
371
371
|
readonly WARNING: "warning";
|
|
372
372
|
readonly INFO: "info";
|
|
373
|
+
readonly MAGIC: "magic";
|
|
373
374
|
}>;
|
|
374
375
|
SECTION_HEADER_MOBILE_LAYOUTS: Readonly<{
|
|
375
376
|
readonly VERTICAL: "vertical";
|
|
@@ -591,6 +592,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
591
592
|
validator(value: import('../../../utils/type.utils').Value<typeof import('../../Buttons/IconButton').ICON_BUTTON_STATES>): boolean;
|
|
592
593
|
};
|
|
593
594
|
}>, {
|
|
595
|
+
ICON_BUTTON_STATE_MAP: Record<import('../../Buttons/IconButton').IconButtonState, import('../../..').ButtonState>;
|
|
594
596
|
isHovered: import('vue').Ref<boolean>;
|
|
595
597
|
mouseOver: () => void;
|
|
596
598
|
mouseLeave: () => void;
|
|
@@ -914,6 +916,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
914
916
|
readonly INVERTED: "inverted";
|
|
915
917
|
readonly WARNING: "warning";
|
|
916
918
|
readonly INFO: "info";
|
|
919
|
+
readonly MAGIC: "magic";
|
|
917
920
|
}>;
|
|
918
921
|
BUTTON_COLORS: Readonly<{
|
|
919
922
|
readonly PRIMARY: "primary";
|
|
@@ -921,6 +924,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
921
924
|
readonly DANGER: "danger";
|
|
922
925
|
readonly SUCCESS: "success";
|
|
923
926
|
readonly INVERTED: "inverted";
|
|
927
|
+
readonly MAGIC: "magic";
|
|
924
928
|
}>;
|
|
925
929
|
}, {
|
|
926
930
|
iconSize(): string;
|
|
@@ -104,6 +104,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
104
104
|
readonly DANGER: "danger";
|
|
105
105
|
readonly SUCCESS: "success";
|
|
106
106
|
readonly INVERTED: "inverted";
|
|
107
|
+
readonly MAGIC: "magic";
|
|
107
108
|
};
|
|
108
109
|
BUTTON_ELEVATIONS: {
|
|
109
110
|
readonly NONE: "none";
|
|
@@ -399,6 +400,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
399
400
|
readonly INVERTED: "inverted";
|
|
400
401
|
readonly WARNING: "warning";
|
|
401
402
|
readonly INFO: "info";
|
|
403
|
+
readonly MAGIC: "magic";
|
|
402
404
|
};
|
|
403
405
|
ICON_SIZES: {
|
|
404
406
|
XXX_SMALL: string;
|
|
@@ -721,6 +723,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
721
723
|
validator(value: import('../../../utils/type.utils').Value<typeof import('../../Buttons/IconButton').ICON_BUTTON_STATES>): boolean;
|
|
722
724
|
};
|
|
723
725
|
}>, {
|
|
726
|
+
ICON_BUTTON_STATE_MAP: Record<import('../../Buttons/IconButton').IconButtonState, ButtonState>;
|
|
724
727
|
isHovered: import('vue').Ref<boolean>;
|
|
725
728
|
mouseOver: () => void;
|
|
726
729
|
mouseLeave: () => void;
|
|
@@ -1044,6 +1047,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
1044
1047
|
readonly INVERTED: "inverted";
|
|
1045
1048
|
readonly WARNING: "warning";
|
|
1046
1049
|
readonly INFO: "info";
|
|
1050
|
+
readonly MAGIC: "magic";
|
|
1047
1051
|
}>;
|
|
1048
1052
|
BUTTON_COLORS: Readonly<{
|
|
1049
1053
|
readonly PRIMARY: "primary";
|
|
@@ -1051,6 +1055,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
1051
1055
|
readonly DANGER: "danger";
|
|
1052
1056
|
readonly SUCCESS: "success";
|
|
1053
1057
|
readonly INVERTED: "inverted";
|
|
1058
|
+
readonly MAGIC: "magic";
|
|
1054
1059
|
}>;
|
|
1055
1060
|
}, {
|
|
1056
1061
|
iconSize(): string;
|
|
@@ -239,6 +239,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
239
239
|
readonly DANGER: "danger";
|
|
240
240
|
readonly SUCCESS: "success";
|
|
241
241
|
readonly INVERTED: "inverted";
|
|
242
|
+
readonly MAGIC: "magic";
|
|
242
243
|
};
|
|
243
244
|
BUTTON_ELEVATIONS: {
|
|
244
245
|
readonly NONE: "none";
|
|
@@ -534,6 +535,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
534
535
|
readonly INVERTED: "inverted";
|
|
535
536
|
readonly WARNING: "warning";
|
|
536
537
|
readonly INFO: "info";
|
|
538
|
+
readonly MAGIC: "magic";
|
|
537
539
|
};
|
|
538
540
|
ICON_SIZES: {
|
|
539
541
|
XXX_SMALL: string;
|
|
@@ -856,6 +858,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
856
858
|
validator(value: import('../../../utils/type.utils').Value<typeof import('../../..').ICON_BUTTON_STATES>): boolean;
|
|
857
859
|
};
|
|
858
860
|
}>, {
|
|
861
|
+
ICON_BUTTON_STATE_MAP: Record<import('../../..').IconButtonState, ButtonState>;
|
|
859
862
|
isHovered: import('vue').Ref<boolean>;
|
|
860
863
|
mouseOver: () => void;
|
|
861
864
|
mouseLeave: () => void;
|
|
@@ -1179,6 +1182,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
1179
1182
|
readonly INVERTED: "inverted";
|
|
1180
1183
|
readonly WARNING: "warning";
|
|
1181
1184
|
readonly INFO: "info";
|
|
1185
|
+
readonly MAGIC: "magic";
|
|
1182
1186
|
}>;
|
|
1183
1187
|
BUTTON_COLORS: Readonly<{
|
|
1184
1188
|
readonly PRIMARY: "primary";
|
|
@@ -1186,6 +1190,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
1186
1190
|
readonly DANGER: "danger";
|
|
1187
1191
|
readonly SUCCESS: "success";
|
|
1188
1192
|
readonly INVERTED: "inverted";
|
|
1193
|
+
readonly MAGIC: "magic";
|
|
1189
1194
|
}>;
|
|
1190
1195
|
}, {
|
|
1191
1196
|
iconSize(): string;
|
|
@@ -52,6 +52,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
52
52
|
readonly INVERTED: "inverted";
|
|
53
53
|
readonly WARNING: "warning";
|
|
54
54
|
readonly INFO: "info";
|
|
55
|
+
readonly MAGIC: "magic";
|
|
55
56
|
}>;
|
|
56
57
|
ICON_BUTTON_STATES: Readonly<{
|
|
57
58
|
readonly DEFAULT: "default";
|
|
@@ -423,6 +424,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
423
424
|
validator(value: import('../../utils/type.utils').Value<typeof ICON_BUTTON_STATES>): boolean;
|
|
424
425
|
};
|
|
425
426
|
}>, {
|
|
427
|
+
ICON_BUTTON_STATE_MAP: Record<import('../Buttons/IconButton').IconButtonState, import('../..').ButtonState>;
|
|
426
428
|
isHovered: import('vue').Ref<boolean>;
|
|
427
429
|
mouseOver: () => void;
|
|
428
430
|
mouseLeave: () => void;
|
|
@@ -746,6 +748,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
746
748
|
readonly INVERTED: "inverted";
|
|
747
749
|
readonly WARNING: "warning";
|
|
748
750
|
readonly INFO: "info";
|
|
751
|
+
readonly MAGIC: "magic";
|
|
749
752
|
}>;
|
|
750
753
|
BUTTON_COLORS: Readonly<{
|
|
751
754
|
readonly PRIMARY: "primary";
|
|
@@ -753,6 +756,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
753
756
|
readonly DANGER: "danger";
|
|
754
757
|
readonly SUCCESS: "success";
|
|
755
758
|
readonly INVERTED: "inverted";
|
|
759
|
+
readonly MAGIC: "magic";
|
|
756
760
|
}>;
|
|
757
761
|
}, {
|
|
758
762
|
iconSize(): string;
|
|
@@ -307,6 +307,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
307
307
|
readonly INVERTED: "inverted";
|
|
308
308
|
readonly WARNING: "warning";
|
|
309
309
|
readonly INFO: "info";
|
|
310
|
+
readonly MAGIC: "magic";
|
|
310
311
|
}>;
|
|
311
312
|
ICON_SIZES: Readonly<{
|
|
312
313
|
XXX_SMALL: string;
|
|
@@ -687,6 +688,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
687
688
|
validator(value: import('../../../utils/type.utils').Value<typeof import('../../Buttons/IconButton').ICON_BUTTON_STATES>): boolean;
|
|
688
689
|
};
|
|
689
690
|
}>, {
|
|
691
|
+
ICON_BUTTON_STATE_MAP: Record<import('../../Buttons/IconButton').IconButtonState, import('../../Buttons/Button').ButtonState>;
|
|
690
692
|
isHovered: import('vue').Ref<boolean>;
|
|
691
693
|
mouseOver: () => void;
|
|
692
694
|
mouseLeave: () => void;
|
|
@@ -1010,6 +1012,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
1010
1012
|
readonly INVERTED: "inverted";
|
|
1011
1013
|
readonly WARNING: "warning";
|
|
1012
1014
|
readonly INFO: "info";
|
|
1015
|
+
readonly MAGIC: "magic";
|
|
1013
1016
|
}>;
|
|
1014
1017
|
BUTTON_COLORS: Readonly<{
|
|
1015
1018
|
readonly PRIMARY: "primary";
|
|
@@ -1017,6 +1020,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
1017
1020
|
readonly DANGER: "danger";
|
|
1018
1021
|
readonly SUCCESS: "success";
|
|
1019
1022
|
readonly INVERTED: "inverted";
|
|
1023
|
+
readonly MAGIC: "magic";
|
|
1020
1024
|
}>;
|
|
1021
1025
|
}, {
|
|
1022
1026
|
iconSize(): string;
|
package/dist/lib/js/components/SurveyQuestions/SurveyQuestionScale/SurveyQuestionScale.vue.d.ts
CHANGED
|
@@ -336,6 +336,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
336
336
|
readonly INVERTED: "inverted";
|
|
337
337
|
readonly WARNING: "warning";
|
|
338
338
|
readonly INFO: "info";
|
|
339
|
+
readonly MAGIC: "magic";
|
|
339
340
|
}>;
|
|
340
341
|
BUTTON_TYPES: Readonly<{
|
|
341
342
|
readonly FILLED: "filled";
|
|
@@ -659,6 +660,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
659
660
|
validator(value: import('../../../utils/type.utils').Value<typeof import('../../Buttons/IconButton').ICON_BUTTON_STATES>): boolean;
|
|
660
661
|
};
|
|
661
662
|
}>, {
|
|
663
|
+
ICON_BUTTON_STATE_MAP: Record<import('../../Buttons/IconButton').IconButtonState, import('../../Buttons/Button').ButtonState>;
|
|
662
664
|
isHovered: import('vue').Ref<boolean>;
|
|
663
665
|
mouseOver: () => void;
|
|
664
666
|
mouseLeave: () => void;
|
|
@@ -982,6 +984,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
982
984
|
readonly INVERTED: "inverted";
|
|
983
985
|
readonly WARNING: "warning";
|
|
984
986
|
readonly INFO: "info";
|
|
987
|
+
readonly MAGIC: "magic";
|
|
985
988
|
}>;
|
|
986
989
|
BUTTON_COLORS: Readonly<{
|
|
987
990
|
readonly PRIMARY: "primary";
|
|
@@ -989,6 +992,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
989
992
|
readonly DANGER: "danger";
|
|
990
993
|
readonly SUCCESS: "success";
|
|
991
994
|
readonly INVERTED: "inverted";
|
|
995
|
+
readonly MAGIC: "magic";
|
|
992
996
|
}>;
|
|
993
997
|
}, {
|
|
994
998
|
iconSize(): string;
|
|
@@ -279,6 +279,7 @@ export declare const data: () => {
|
|
|
279
279
|
BANNER_COLORS: Readonly<{
|
|
280
280
|
readonly DEFAULT: "default";
|
|
281
281
|
readonly NEUTRAL: "neutral";
|
|
282
|
+
readonly PRIMARY: "primary";
|
|
282
283
|
readonly INFO: "info";
|
|
283
284
|
readonly SUCCESS: "success";
|
|
284
285
|
readonly WARNING: "warning";
|
|
@@ -321,6 +322,9 @@ export declare const components: {
|
|
|
321
322
|
size: {
|
|
322
323
|
type: import('vue').PropType<string>;
|
|
323
324
|
};
|
|
325
|
+
isTitleWeak: {
|
|
326
|
+
type: import('vue').PropType<boolean>;
|
|
327
|
+
};
|
|
324
328
|
}>> & Readonly<{
|
|
325
329
|
onClose?: (() => any) | undefined;
|
|
326
330
|
"onButton-clicked"?: (() => any) | undefined;
|
|
@@ -356,6 +360,9 @@ export declare const components: {
|
|
|
356
360
|
size: {
|
|
357
361
|
type: import('vue').PropType<string>;
|
|
358
362
|
};
|
|
363
|
+
isTitleWeak: {
|
|
364
|
+
type: import('vue').PropType<boolean>;
|
|
365
|
+
};
|
|
359
366
|
}>> & Readonly<{
|
|
360
367
|
onClose?: (() => any) | undefined;
|
|
361
368
|
"onButton-clicked"?: (() => any) | undefined;
|
|
@@ -385,6 +392,9 @@ export declare const components: {
|
|
|
385
392
|
size: {
|
|
386
393
|
type: import('vue').PropType<string>;
|
|
387
394
|
};
|
|
395
|
+
isTitleWeak: {
|
|
396
|
+
type: import('vue').PropType<boolean>;
|
|
397
|
+
};
|
|
388
398
|
}>> & Readonly<{
|
|
389
399
|
onClose?: (() => any) | undefined;
|
|
390
400
|
"onButton-clicked"?: (() => any) | undefined;
|
|
@@ -55,6 +55,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
55
55
|
readonly DANGER: "danger";
|
|
56
56
|
readonly SUCCESS: "success";
|
|
57
57
|
readonly INVERTED: "inverted";
|
|
58
|
+
readonly MAGIC: "magic";
|
|
58
59
|
}>;
|
|
59
60
|
BUTTON_RADIUSES: Readonly<{
|
|
60
61
|
readonly CAPSULE: "capsule";
|
|
@@ -57,6 +57,10 @@ describe('Banner', () => {
|
|
|
57
57
|
color: BANNER_COLORS.NEUTRAL,
|
|
58
58
|
expectedClass: '-ds-neutral',
|
|
59
59
|
},
|
|
60
|
+
{
|
|
61
|
+
color: BANNER_COLORS.PRIMARY,
|
|
62
|
+
expectedClass: '-ds-primary',
|
|
63
|
+
},
|
|
60
64
|
{
|
|
61
65
|
color: BANNER_COLORS.INFO,
|
|
62
66
|
expectedClass: '-ds-info',
|
|
@@ -88,6 +92,17 @@ describe('Banner', () => {
|
|
|
88
92
|
expect(wrapper.find('.ds-banner__inner').classes()).toContain(expectedClass);
|
|
89
93
|
});
|
|
90
94
|
|
|
95
|
+
it('renders title with weak weight when isTitleWeak is set', () => {
|
|
96
|
+
const wrapper = mount(Banner, {
|
|
97
|
+
props: {
|
|
98
|
+
title: 'Test Banner',
|
|
99
|
+
isTitleWeak: true,
|
|
100
|
+
},
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
expect(wrapper.find('.ds-banner__title').classes()).toContain('-ds-titleWeak');
|
|
104
|
+
});
|
|
105
|
+
|
|
91
106
|
it('handles closable', async () => {
|
|
92
107
|
const onClose = vi.fn();
|
|
93
108
|
const wrapper = mount(Banner, {
|
|
@@ -40,6 +40,7 @@ const StoryTemplate: StoryFn<typeof Banner> = (args) => {
|
|
|
40
40
|
:is-expanded="isExpanded"
|
|
41
41
|
:is-icon-hidden-on-mobile="isIconHiddenOnMobile"
|
|
42
42
|
:size="size"
|
|
43
|
+
:is-title-weak="isTitleWeak"
|
|
43
44
|
@update:isExpanded="onIsExpandedUpdated"
|
|
44
45
|
>
|
|
45
46
|
<template v-if="defaultText" #defaultText><span v-html="defaultText" /></template>
|
|
@@ -61,6 +62,7 @@ const args = {
|
|
|
61
62
|
icon: null,
|
|
62
63
|
isIconHiddenOnMobile: false,
|
|
63
64
|
title: 'Banner Title',
|
|
65
|
+
isTitleWeak: false,
|
|
64
66
|
buttonText: '',
|
|
65
67
|
closable: false,
|
|
66
68
|
isExpanded: false,
|
|
@@ -86,6 +88,9 @@ const argTypes = {
|
|
|
86
88
|
title: {
|
|
87
89
|
control: 'text',
|
|
88
90
|
},
|
|
91
|
+
isTitleWeak: {
|
|
92
|
+
control: 'boolean',
|
|
93
|
+
},
|
|
89
94
|
buttonText: {
|
|
90
95
|
control: 'text',
|
|
91
96
|
},
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
|
|
23
23
|
<div class="ds-banner__textWrapper">
|
|
24
24
|
<div class="ds-banner__titleWrapper">
|
|
25
|
-
<div class="ds-banner__title">
|
|
25
|
+
<div class="ds-banner__title" :class="{ '-ds-titleWeak': isTitleWeak }">
|
|
26
26
|
<div
|
|
27
27
|
v-if="icon && size === BANNER_SIZES.SMALL"
|
|
28
28
|
class="ds-banner__iconWrapperSmall"
|
|
@@ -201,6 +201,13 @@
|
|
|
201
201
|
border-color: $color-accent-border-weak;
|
|
202
202
|
}
|
|
203
203
|
|
|
204
|
+
&.-ds-primary {
|
|
205
|
+
--ds-banner-title-color: #{$color-primary-text-strong};
|
|
206
|
+
|
|
207
|
+
background-color: $color-primary-background;
|
|
208
|
+
border-color: $color-primary-border-weak;
|
|
209
|
+
}
|
|
210
|
+
|
|
204
211
|
&.-ds-small {
|
|
205
212
|
#{$self}__header {
|
|
206
213
|
padding: 0;
|
|
@@ -250,6 +257,10 @@
|
|
|
250
257
|
color: var(--ds-banner-title-color);
|
|
251
258
|
display: flex;
|
|
252
259
|
gap: $space-3;
|
|
260
|
+
|
|
261
|
+
&.-ds-titleWeak {
|
|
262
|
+
@include heading-s-default-regular;
|
|
263
|
+
}
|
|
253
264
|
}
|
|
254
265
|
|
|
255
266
|
&__iconWrapperSmall {
|
|
@@ -338,6 +349,7 @@ const {
|
|
|
338
349
|
color = BANNER_COLORS.DEFAULT,
|
|
339
350
|
isIconHiddenOnMobile = false,
|
|
340
351
|
size = BANNER_SIZES.MEDIUM,
|
|
352
|
+
isTitleWeak = false,
|
|
341
353
|
} = defineProps<{
|
|
342
354
|
icon?: IconItem | null;
|
|
343
355
|
buttonText?: string;
|
|
@@ -346,6 +358,7 @@ const {
|
|
|
346
358
|
title: string;
|
|
347
359
|
isIconHiddenOnMobile?: boolean;
|
|
348
360
|
size?: BannerSize;
|
|
361
|
+
isTitleWeak?: boolean;
|
|
349
362
|
}>();
|
|
350
363
|
|
|
351
364
|
defineEmits<{
|
|
@@ -360,6 +373,7 @@ const iconColor = computed(() => {
|
|
|
360
373
|
const colorMap: Record<BannerColor, FeatureIconColor> = {
|
|
361
374
|
[BANNER_COLORS.DEFAULT]: FEATURE_ICON_COLOR.NEUTRAL,
|
|
362
375
|
[BANNER_COLORS.NEUTRAL]: FEATURE_ICON_COLOR.NEUTRAL,
|
|
376
|
+
[BANNER_COLORS.PRIMARY]: FEATURE_ICON_COLOR.PRIMARY,
|
|
363
377
|
[BANNER_COLORS.INFO]: FEATURE_ICON_COLOR.INFO,
|
|
364
378
|
[BANNER_COLORS.SUCCESS]: FEATURE_ICON_COLOR.SUCCESS,
|
|
365
379
|
[BANNER_COLORS.WARNING]: FEATURE_ICON_COLOR.WARNING,
|
|
@@ -376,6 +390,7 @@ function useBannerClasses() {
|
|
|
376
390
|
const colorMap: Record<BannerColor, string> = {
|
|
377
391
|
[BANNER_COLORS.NEUTRAL]: '-ds-neutral',
|
|
378
392
|
[BANNER_COLORS.DEFAULT]: '-ds-default',
|
|
393
|
+
[BANNER_COLORS.PRIMARY]: '-ds-primary',
|
|
379
394
|
[BANNER_COLORS.FAIL]: '-ds-fail',
|
|
380
395
|
[BANNER_COLORS.INFO]: '-ds-info',
|
|
381
396
|
[BANNER_COLORS.SUCCESS]: '-ds-success',
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
BUTTON_STATES,
|
|
10
10
|
BUTTON_TYPES,
|
|
11
11
|
} from './Button.consts';
|
|
12
|
+
import { GRADIENT_MAGIC_ICON_DISABLED_ID, GRADIENT_MAGIC_ICON_ID } from './useMagicGradient';
|
|
12
13
|
import Icon, { ICONS } from '../../Icons/Icon';
|
|
13
14
|
|
|
14
15
|
describe('Button', () => {
|
|
@@ -35,6 +36,12 @@ describe('Button', () => {
|
|
|
35
36
|
[{ props: { color: BUTTON_COLORS.PRIMARY }, expectedClass: '-ds-color-primary' }],
|
|
36
37
|
[{ props: { color: BUTTON_COLORS.DANGER }, expectedClass: '-ds-color-danger' }],
|
|
37
38
|
[{ props: { color: BUTTON_COLORS.SUCCESS }, expectedClass: '-ds-color-success' }],
|
|
39
|
+
[
|
|
40
|
+
{
|
|
41
|
+
props: { color: BUTTON_COLORS.MAGIC, type: BUTTON_TYPES.OUTLINED },
|
|
42
|
+
expectedClass: '-ds-color-magic',
|
|
43
|
+
},
|
|
44
|
+
],
|
|
38
45
|
[{ props: { radius: BUTTON_RADIUSES.ROUNDED }, expectedClass: '-ds-rounded' }],
|
|
39
46
|
[{ props: { state: BUTTON_STATES.HOVERED }, expectedClass: '-ds-hovered' }],
|
|
40
47
|
[{ props: { state: BUTTON_STATES.FOCUSED }, expectedClass: '-ds-focused' }],
|
|
@@ -45,6 +52,34 @@ describe('Button', () => {
|
|
|
45
52
|
expect(outlinedButton.classes()).toContain(expectedClass);
|
|
46
53
|
});
|
|
47
54
|
|
|
55
|
+
it('magic button fills with the magic gradient', () => {
|
|
56
|
+
const component = createComponent({ color: BUTTON_COLORS.MAGIC });
|
|
57
|
+
|
|
58
|
+
expect(component.element.style.getPropertyValue('--ds-magic-fill')).toBe(
|
|
59
|
+
`url(#${GRADIENT_MAGIC_ICON_ID})`,
|
|
60
|
+
);
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
it('disabled magic button fills with the disabled magic gradient', () => {
|
|
64
|
+
const component = createComponent({
|
|
65
|
+
color: BUTTON_COLORS.MAGIC,
|
|
66
|
+
state: BUTTON_STATES.DISABLED,
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
expect(component.element.style.getPropertyValue('--ds-magic-fill')).toBe(
|
|
70
|
+
`url(#${GRADIENT_MAGIC_ICON_DISABLED_ID})`,
|
|
71
|
+
);
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
it('non-magic button has no magic fill style', () => {
|
|
75
|
+
const component = createComponent({
|
|
76
|
+
color: BUTTON_COLORS.PRIMARY,
|
|
77
|
+
state: BUTTON_STATES.DISABLED,
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
expect(component.element.style.getPropertyValue('--ds-magic-fill')).toBe('');
|
|
81
|
+
});
|
|
82
|
+
|
|
48
83
|
it('loading should have correct text container and loading icon', () => {
|
|
49
84
|
const component = createComponent({ state: BUTTON_STATES.LOADING });
|
|
50
85
|
|