@livechat/design-system-react-components 1.0.0-alpha.2 → 1.0.0-alpha.4
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/.eslintrc +9 -0
- package/.storybook/main.js +20 -0
- package/.storybook/preview-head.html +31 -0
- package/.storybook/preview.js +21 -0
- package/package.json +40 -37
- package/src/components/Alert/Alert.module.scss +88 -0
- package/src/components/Alert/Alert.spec.tsx +78 -0
- package/src/components/Alert/Alert.stories.tsx +73 -0
- package/src/components/Alert/Alert.tsx +94 -0
- package/src/components/Alert/index.ts +1 -0
- package/src/components/Badge/Badge.module.scss +23 -0
- package/src/components/Badge/Badge.spec.tsx +12 -0
- package/src/components/Badge/Badge.stories.tsx +24 -0
- package/src/components/Badge/Badge.tsx +24 -0
- package/src/components/Badge/index.ts +1 -0
- package/src/components/Button/Button.module.scss +257 -0
- package/src/components/Button/Button.spec.tsx +110 -0
- package/src/components/Button/Button.stories.tsx +152 -0
- package/src/components/Button/Button.tsx +88 -0
- package/src/components/Button/index.ts +2 -0
- package/src/components/ButtonGroup/ButtonGroup.module.scss +31 -0
- package/src/components/ButtonGroup/ButtonGroup.spec.tsx +61 -0
- package/src/components/ButtonGroup/ButtonGroup.stories.tsx +53 -0
- package/src/components/ButtonGroup/ButtonGroup.tsx +75 -0
- package/src/components/ButtonGroup/index.ts +1 -0
- package/src/components/Card/Card.module.scss +31 -0
- package/src/components/Card/Card.spec.tsx +38 -0
- package/src/components/Card/Card.stories.tsx +30 -0
- package/src/components/Card/Card.tsx +34 -0
- package/src/components/Card/index.ts +2 -0
- package/src/components/Checkbox/Checkbox.module.scss +99 -0
- package/src/components/Checkbox/Checkbox.tsx +39 -0
- package/src/components/Checkbox/CheckboxField.spec.tsx +58 -0
- package/src/components/Checkbox/CheckboxField.stories.tsx +30 -0
- package/src/components/Checkbox/CheckboxField.tsx +46 -0
- package/src/components/Checkbox/index.ts +2 -0
- package/src/components/FieldDescription/FieldDescription.module.scss +5 -0
- package/src/components/FieldDescription/FieldDescription.tsx +23 -0
- package/src/components/FieldDescription/index.ts +1 -0
- package/src/components/FieldError/FieldError.module.scss +5 -0
- package/src/components/FieldError/FieldError.tsx +23 -0
- package/src/components/FieldError/index.ts +1 -0
- package/src/components/FieldGroup/FieldGroup.module.scss +25 -0
- package/src/components/FieldGroup/FieldGroup.spec.tsx +42 -0
- package/src/components/FieldGroup/FieldGroup.stories.tsx +34 -0
- package/src/components/FieldGroup/FieldGroup.tsx +38 -0
- package/src/components/FieldGroup/index.ts +1 -0
- package/src/components/Form/Form.module.scss +22 -0
- package/src/components/Form/Form.spec.tsx +38 -0
- package/src/components/Form/Form.stories.tsx +42 -0
- package/src/components/Form/Form.tsx +46 -0
- package/src/components/Form/index.ts +2 -0
- package/src/components/FormGroup/FormGroup.module.scss +20 -0
- package/src/components/FormGroup/FormGroup.spec.tsx +34 -0
- package/src/components/FormGroup/FormGroup.stories.tsx +30 -0
- package/src/components/FormGroup/FormGroup.tsx +44 -0
- package/src/components/FormGroup/index.ts +1 -0
- package/src/components/Icon/Icon.module.scss +70 -0
- package/src/components/Icon/Icon.stories.tsx +53 -0
- package/src/components/Icon/Icon.tsx +118 -0
- package/src/components/Icon/index.ts +1 -0
- package/src/components/InputField/InputField.module.scss +37 -0
- package/src/components/InputField/InputField.spec.tsx +53 -0
- package/src/components/InputField/InputField.stories.tsx +73 -0
- package/src/components/InputField/InputField.tsx +72 -0
- package/src/components/InputField/index.ts +1 -0
- package/src/components/Link/Link.module.scss +18 -0
- package/src/components/Link/Link.stories.tsx +17 -0
- package/src/components/Link/Link.tsx +37 -0
- package/src/components/Link/index.ts +1 -0
- package/src/components/Loader/Loader.module.scss +66 -0
- package/src/components/Loader/Loader.spec.tsx +64 -0
- package/src/components/Loader/Loader.stories.tsx +25 -0
- package/src/components/Loader/Loader.tsx +48 -0
- package/src/components/Loader/index.ts +1 -0
- package/src/components/Modal/ActionModal.tsx +37 -0
- package/src/components/Modal/Modal.module.scss +131 -0
- package/src/components/Modal/Modal.stories.tsx +85 -0
- package/src/components/Modal/Modal.tsx +41 -0
- package/src/components/Modal/ModalBase.spec.tsx +58 -0
- package/src/components/Modal/ModalBase.tsx +66 -0
- package/src/components/Modal/ModalCloseButton.tsx +20 -0
- package/src/components/Modal/ModalPortal.tsx +35 -0
- package/src/components/Modal/index.ts +11 -0
- package/src/components/NumericInput/NumericInput.module.scss +110 -0
- package/src/components/NumericInput/NumericInput.spec.tsx +129 -0
- package/src/components/NumericInput/NumericInput.stories.tsx +56 -0
- package/src/components/NumericInput/NumericInput.tsx +161 -0
- package/src/components/NumericInput/NumericInputField.stories.tsx +58 -0
- package/src/components/NumericInput/NumericInputField.tsx +57 -0
- package/src/components/NumericInput/index.ts +2 -0
- package/src/components/Popover/Popover.module.scss +16 -0
- package/src/components/Popover/Popover.spec.tsx +39 -0
- package/src/components/Popover/Popover.stories.css +23 -0
- package/src/components/Popover/Popover.stories.tsx +164 -0
- package/src/components/Popover/Popover.tsx +124 -0
- package/src/components/Popover/index.ts +1 -0
- package/src/components/Progress/ProgressBar.module.scss +48 -0
- package/src/components/Progress/ProgressBar.spec.tsx +33 -0
- package/src/components/Progress/ProgressBar.stories.tsx +23 -0
- package/src/components/Progress/ProgressBar.tsx +62 -0
- package/src/components/Progress/ProgressCircle.module.scss +64 -0
- package/src/components/Progress/ProgressCircle.spec.tsx +34 -0
- package/src/components/Progress/ProgressCircle.stories.tsx +28 -0
- package/src/components/Progress/ProgressCircle.tsx +104 -0
- package/src/components/Progress/constants.ts +23 -0
- package/src/components/Progress/helpers.ts +23 -0
- package/src/components/Progress/index.ts +1 -0
- package/src/components/PromoBanner/PromoBanner.module.scss +121 -0
- package/src/components/PromoBanner/PromoBanner.spec.tsx +119 -0
- package/src/components/PromoBanner/PromoBanner.stories.tsx +125 -0
- package/src/components/PromoBanner/PromoBanner.tsx +99 -0
- package/src/components/PromoBanner/index.ts +1 -0
- package/src/components/RadioButton/RadioButton.module.scss +100 -0
- package/src/components/RadioButton/RadioButton.spec.tsx +70 -0
- package/src/components/RadioButton/RadioButton.stories.tsx +34 -0
- package/src/components/RadioButton/RadioButton.tsx +54 -0
- package/src/components/RadioButton/index.ts +1 -0
- package/src/components/Switch/Switch.module.scss +126 -0
- package/src/components/Switch/Switch.spec.tsx +40 -0
- package/src/components/Switch/Switch.stories.tsx +23 -0
- package/src/components/Switch/Switch.tsx +100 -0
- package/src/components/Switch/index.ts +1 -0
- package/src/components/Tab/Tab.module.scss +56 -0
- package/src/components/Tab/Tab.spec.tsx +34 -0
- package/src/components/Tab/Tab.stories.tsx +20 -0
- package/src/components/Tab/Tab.tsx +49 -0
- package/src/components/Tab/TabsWrapper.module.scss +11 -0
- package/src/components/Tab/TabsWrapper.spec.tsx +19 -0
- package/src/components/Tab/TabsWrapper.stories.tsx +46 -0
- package/src/components/Tab/TabsWrapper.tsx +24 -0
- package/src/components/Tab/index.ts +2 -0
- package/src/components/Tag/Tag.module.scss +131 -0
- package/src/components/Tag/Tag.spec.tsx +93 -0
- package/src/components/Tag/Tag.stories.tsx +151 -0
- package/src/components/Tag/Tag.tsx +129 -0
- package/src/components/Tag/index.ts +1 -0
- package/src/components/TagInput/EditableTag.tsx +54 -0
- package/src/components/TagInput/EditableTagContent.tsx +81 -0
- package/src/components/TagInput/EmailTagInput.tsx +31 -0
- package/src/components/TagInput/TagInput.module.scss +81 -0
- package/src/components/TagInput/TagInput.spec.tsx +58 -0
- package/src/components/TagInput/TagInput.stories.tsx +49 -0
- package/src/components/TagInput/TagInput.tsx +133 -0
- package/src/components/TagInput/index.ts +4 -0
- package/src/components/TextField/TextField.module.scss +90 -0
- package/src/components/TextField/TextField.spec.tsx +40 -0
- package/src/components/TextField/TextField.stories.tsx +60 -0
- package/src/components/TextField/TextField.tsx +100 -0
- package/src/components/TextField/index.ts +1 -0
- package/src/components/Toast/Toast.module.scss +218 -0
- package/src/components/Toast/Toast.spec.tsx +96 -0
- package/src/components/Toast/Toast.stories.tsx +64 -0
- package/src/components/Toast/Toast.tsx +121 -0
- package/src/components/Toast/ToastWrapper.spec.tsx +13 -0
- package/src/components/Toast/ToastWrapper.stories.tsx +55 -0
- package/src/components/Toast/ToastWrapper.tsx +87 -0
- package/src/components/Toast/index.ts +2 -0
- package/src/components/Typography/Heading.tsx +36 -0
- package/src/components/Typography/Text.tsx +49 -0
- package/src/components/Typography/Typography.module.scss +132 -0
- package/src/components/Typography/index.ts +2 -0
- package/src/index.scss +9 -0
- package/src/index.ts +32 -0
- package/src/stories/ColorTokens.stories.mdx +10 -0
- package/src/stories/Icons.stories.mdx +12 -0
- package/src/stories/Typography.stories.mdx +65 -0
- package/src/stories/components/ColorTokens.tsx +99 -0
- package/src/stories/components/IconsShowcase.tsx +25 -0
- package/src/stories/components/iconsShowcase.css +13 -0
- package/src/test/setup.ts +1 -0
- package/{dist/test-utils.d.ts → src/test/utils.ts} +3 -2
- package/src/themes/dark.scss +127 -0
- package/src/themes/designTokens.ts +126 -0
- package/src/themes/legacy.scss +128 -0
- package/src/themes/light.scss +127 -0
- package/src/utils/keyCodes.ts +12 -0
- package/src/utils/noop.ts +2 -0
- package/src/vite-env.d.ts +1 -0
- package/tsconfig.json +25 -0
- package/tsconfig.node.json +8 -0
- package/vite.config.ts +44 -0
- package/dist/components/Alert.d.ts +0 -19
- package/dist/components/Alert.spec.d.ts +0 -1
- package/dist/components/Badge.d.ts +0 -6
- package/dist/components/Badge.spec.d.ts +0 -1
- package/dist/components/Button.d.ts +0 -13
- package/dist/components/Button.spec.d.ts +0 -1
- package/dist/components/ButtonGroup.d.ts +0 -11
- package/dist/components/ButtonGroup.spec.d.ts +0 -1
- package/dist/components/Card.d.ts +0 -6
- package/dist/components/Card.spec.d.ts +0 -1
- package/dist/components/Checkbox.d.ts +0 -7
- package/dist/components/CheckboxField.d.ts +0 -7
- package/dist/components/CheckboxField.spec.d.ts +0 -1
- package/dist/components/FieldDescription.d.ts +0 -3
- package/dist/components/FieldError.d.ts +0 -3
- package/dist/components/FieldGroup.d.ts +0 -8
- package/dist/components/FieldGroup.spec.d.ts +0 -1
- package/dist/components/FieldLabel.d.ts +0 -3
- package/dist/components/Form.d.ts +0 -7
- package/dist/components/Form.spec.d.ts +0 -1
- package/dist/components/FormGroup.d.ts +0 -7
- package/dist/components/FormGroup.spec.d.ts +0 -1
- package/dist/components/Heading.d.ts +0 -11
- package/dist/components/Icon.d.ts +0 -69
- package/dist/components/Loader.d.ts +0 -10
- package/dist/components/Loader.spec.d.ts +0 -1
- package/dist/components/Modal/ActionModal.d.ts +0 -8
- package/dist/components/Modal/Modal.d.ts +0 -7
- package/dist/components/Modal/ModalBase.d.ts +0 -6
- package/dist/components/Modal/ModalBase.spec.d.ts +0 -1
- package/dist/components/Modal/ModalCloseButton.d.ts +0 -3
- package/dist/components/Modal/ModalPortal.d.ts +0 -7
- package/dist/components/ProgressBar.d.ts +0 -9
- package/dist/components/ProgressBar.spec.d.ts +0 -1
- package/dist/components/ProgressCircle.d.ts +0 -9
- package/dist/components/ProgressCircle.spec.d.ts +0 -1
- package/dist/components/PromoBanner.d.ts +0 -19
- package/dist/components/PromoBanner.spec.d.ts +0 -1
- package/dist/components/RadioButton.d.ts +0 -7
- package/dist/components/RadioButton.spec.d.ts +0 -1
- package/dist/components/Switch.d.ts +0 -17
- package/dist/components/Switch.spec.d.ts +0 -1
- package/dist/components/Tab.d.ts +0 -12
- package/dist/components/Tab.spec.d.ts +0 -1
- package/dist/components/TabsWrapper.d.ts +0 -3
- package/dist/components/TabsWrapper.spec.d.ts +0 -1
- package/dist/components/Text.d.ts +0 -15
- package/dist/components/Toast.d.ts +0 -22
- package/dist/components/Toast.spec.d.ts +0 -1
- package/dist/components/ToastWrapper.d.ts +0 -26
- package/dist/components/ToastWrapper.spec.d.ts +0 -1
- package/dist/components/constants.d.ts +0 -12
- package/dist/components/helpers.d.ts +0 -3
- package/dist/constants/keyCodes.d.ts +0 -3
- package/dist/index.css +0 -2
- package/dist/index.css.map +0 -1
- package/dist/index.d.ts +0 -8
- package/dist/index.js +0 -2
- package/dist/index.js.map +0 -1
- package/dist/index.modern.js +0 -2
- package/dist/index.modern.js.map +0 -1
- package/dist/index.module.js +0 -2
- package/dist/index.module.js.map +0 -1
- package/dist/index.umd.js +0 -2
- package/dist/index.umd.js.map +0 -1
- package/dist/stories/Alert.stories.d.ts +0 -14
- package/dist/stories/Badge.stories.d.ts +0 -16
- package/dist/stories/Button.stories.d.ts +0 -20
- package/dist/stories/ButtonGroup.stories.d.ts +0 -18
- package/dist/stories/Card.stories.d.ts +0 -10
- package/dist/stories/CheckboxField.stories.d.ts +0 -9
- package/dist/stories/FieldGroup.stories.d.ts +0 -9
- package/dist/stories/Form.stories.d.ts +0 -6
- package/dist/stories/FormGroup.stories.d.ts +0 -9
- package/dist/stories/Icon.stories.d.ts +0 -14
- package/dist/stories/Loader.stories.d.ts +0 -8
- package/dist/stories/Modal.stories.d.ts +0 -19
- package/dist/stories/ProgressCircle.stories.d.ts +0 -13
- package/dist/stories/Progressbar.stories.d.ts +0 -13
- package/dist/stories/PromoBanner.stories.d.ts +0 -13
- package/dist/stories/RadioButton.stories.d.ts +0 -9
- package/dist/stories/Switch.stories.d.ts +0 -12
- package/dist/stories/Tab.stories.d.ts +0 -10
- package/dist/stories/TabsWrapper.stories.d.ts +0 -15
- package/dist/stories/Toast.stories.d.ts +0 -15
- package/dist/stories/ToastWrapper.stories.d.ts +0 -40
- package/dist/stories/foundations/components/ColorTokens.d.ts +0 -2
- package/dist/stories/foundations/components/IconsShowcase.d.ts +0 -6
- package/dist/utils/noop.d.ts +0 -1
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
.lc-light-theme {
|
|
2
|
+
--background: #fff;
|
|
3
|
+
--surface-basic-default: #fff;
|
|
4
|
+
--surface-basic-subtle: #f6f6f7;
|
|
5
|
+
--surface-basic-hover: #e2e2e4;
|
|
6
|
+
--surface-basic-active: #c9c9cd;
|
|
7
|
+
--surface-basic-disabled: #f6f6f7;
|
|
8
|
+
--surface-secondary-default: #c9c9cd;
|
|
9
|
+
--surface-secondary-subtle: #e4e8ec;
|
|
10
|
+
--surface-secondary-hover: #ababb1;
|
|
11
|
+
--surface-secondary-disabled: #eeeeef;
|
|
12
|
+
--surface-feedback-info: #daedff;
|
|
13
|
+
--surface-feedback-negative: #ffe5e5;
|
|
14
|
+
--surface-feedback-warning: #fff2d6;
|
|
15
|
+
--surface-feedback-positive: #e4f4ed;
|
|
16
|
+
--surface-invert-default: #1b1b20;
|
|
17
|
+
--surface-invert-subtle: #4e4e58;
|
|
18
|
+
--surface-invert-disabled: #8d8d95;
|
|
19
|
+
--surface-overlay: rgba(19, 19, 23, 0.7);
|
|
20
|
+
--content-default: #131317;
|
|
21
|
+
--content-subtle: #62626d;
|
|
22
|
+
--content-disabled: #8d8d95;
|
|
23
|
+
--content-white-locked: #fff;
|
|
24
|
+
--content-invert-default: #fff;
|
|
25
|
+
--content-invert-subtle: rgba(255, 255, 255, 0.7);
|
|
26
|
+
--content-invert-disabled: rgba(255, 255, 255, 0.5);
|
|
27
|
+
--border-default: #c9c9cd;
|
|
28
|
+
--border-subtle: #eeeeef;
|
|
29
|
+
--border-hover: #ababb1;
|
|
30
|
+
--border-disabled: #e2e2e4;
|
|
31
|
+
--border-invert-default: rgba(255, 255, 255, 0.7);
|
|
32
|
+
--border-invert-subtle: rgba(255, 255, 255, 0.3);
|
|
33
|
+
--border-invert-hover: #fff;
|
|
34
|
+
--border-invert-disabled: rgba(255, 255, 255, 0.5);
|
|
35
|
+
--color-action-active: #003fa4;
|
|
36
|
+
--color-action-hover: #004bc2;
|
|
37
|
+
--color-action-default: #06f;
|
|
38
|
+
--color-action-default-rgb: 0, 102, 255;
|
|
39
|
+
--color-action-disabled: #9dceff;
|
|
40
|
+
--color-negative-active: #930002;
|
|
41
|
+
--color-negative-hover: #ae0003;
|
|
42
|
+
--color-negative-default: #ca0005;
|
|
43
|
+
--color-negative-disabled: #eba3a3;
|
|
44
|
+
--color-warning-default: #e8bb00;
|
|
45
|
+
--color-warning-hover: #c9a100;
|
|
46
|
+
--color-positive-default: #00893c;
|
|
47
|
+
--color-positive-hover: #006329;
|
|
48
|
+
--color-positive-disabled: #d1f4d5;
|
|
49
|
+
--color-bot: #50009c;
|
|
50
|
+
--color-black: #131317;
|
|
51
|
+
--color-white: #fff;
|
|
52
|
+
--decor-blue900: #003288;
|
|
53
|
+
--decor-blue800: #003fa4;
|
|
54
|
+
--decor-blue700: #004bc2;
|
|
55
|
+
--decor-blue600: #0059e1;
|
|
56
|
+
--decor-blue500: #06f;
|
|
57
|
+
--decor-blue400: #328dff;
|
|
58
|
+
--decor-blue300: #68afff;
|
|
59
|
+
--decor-blue200: #9dceff;
|
|
60
|
+
--decor-blue100: #daedff;
|
|
61
|
+
--decor-blue50: #f4faff;
|
|
62
|
+
--decor-orange900: #6c1d00;
|
|
63
|
+
--decor-orange800: #842600;
|
|
64
|
+
--decor-orange700: #9c2e00;
|
|
65
|
+
--decor-orange600: #b43700;
|
|
66
|
+
--decor-orange500: #d54300;
|
|
67
|
+
--decor-orange400: #ff5100;
|
|
68
|
+
--decor-orange300: #ff8a77;
|
|
69
|
+
--decor-orange200: #ffb8af;
|
|
70
|
+
--decor-orange100: #ffe5e3;
|
|
71
|
+
--decor-orange50: #fff8f7;
|
|
72
|
+
--decor-yellow900: #493700;
|
|
73
|
+
--decor-yellow800: #755b00;
|
|
74
|
+
--decor-yellow700: #c9a100;
|
|
75
|
+
--decor-yellow600: #e8bb00;
|
|
76
|
+
--decor-yellow500: #f3c600;
|
|
77
|
+
--decor-yellow400: #d1aa00;
|
|
78
|
+
--decor-yellow300: #fed65e;
|
|
79
|
+
--decor-yellow200: #fedc89;
|
|
80
|
+
--decor-yellow100: #fff2d6;
|
|
81
|
+
--decor-yellow50: #fff9ed;
|
|
82
|
+
--decor-gray950: #131317;
|
|
83
|
+
--decor-gray900: #1b1b20;
|
|
84
|
+
--decor-gray800: #29292f;
|
|
85
|
+
--decor-gray700: #3b3b43;
|
|
86
|
+
--decor-gray600: #4e4e58;
|
|
87
|
+
--decor-gray500: #62626d;
|
|
88
|
+
--decor-gray400: #767680;
|
|
89
|
+
--decor-gray300: #8d8d95;
|
|
90
|
+
--decor-gray200: #ababb1;
|
|
91
|
+
--decor-gray150: #c9c9cd;
|
|
92
|
+
--decor-gray100: #c9c9cd;
|
|
93
|
+
--decor-gray75: #eeeeef;
|
|
94
|
+
--decor-gray50: #e2e2e4;
|
|
95
|
+
--decor-gray40: #eeeeef;
|
|
96
|
+
--decor-gray20: #fcfcfc;
|
|
97
|
+
--decor-green900: #00431a;
|
|
98
|
+
--decor-green800: #005321;
|
|
99
|
+
--decor-green700: #006329;
|
|
100
|
+
--decor-green600: #007331;
|
|
101
|
+
--decor-green500: #00893c;
|
|
102
|
+
--decor-green400: #00a449;
|
|
103
|
+
--decor-green300: #00c057;
|
|
104
|
+
--decor-green200: #7edd92;
|
|
105
|
+
--decor-green100: #e4f4ed;
|
|
106
|
+
--decor-green50: #f3fcf4;
|
|
107
|
+
--decor-red900: #790002;
|
|
108
|
+
--decor-red800: #930002;
|
|
109
|
+
--decor-red700: #ae0003;
|
|
110
|
+
--decor-red600: #ca0005;
|
|
111
|
+
--decor-red500: #ee0007;
|
|
112
|
+
--decor-red400: #ff4c4d;
|
|
113
|
+
--decor-red300: #ff8889;
|
|
114
|
+
--decor-red200: #ffb7b7;
|
|
115
|
+
--decor-red100: #ffe5e5;
|
|
116
|
+
--decor-red50: #fff8f8;
|
|
117
|
+
--decor-purple900: #50009c;
|
|
118
|
+
--decor-purple800: #6100bd;
|
|
119
|
+
--decor-purple700: #7400df;
|
|
120
|
+
--decor-purple600: #8609ff;
|
|
121
|
+
--decor-purple500: #9146ff;
|
|
122
|
+
--decor-purple400: #a372ff;
|
|
123
|
+
--decor-purple300: #b99aff;
|
|
124
|
+
--decor-purple200: #d1c0ff;
|
|
125
|
+
--decor-purple100: #eee8ff;
|
|
126
|
+
--decor-purple50: #faf8ff;
|
|
127
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/// <reference types="vite/client" />
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ESNext",
|
|
4
|
+
"useDefineForClassFields": true,
|
|
5
|
+
"lib": ["DOM", "DOM.Iterable", "ESNext"],
|
|
6
|
+
"allowJs": false,
|
|
7
|
+
"skipLibCheck": false,
|
|
8
|
+
"esModuleInterop": false,
|
|
9
|
+
"allowSyntheticDefaultImports": true,
|
|
10
|
+
"strict": true,
|
|
11
|
+
"forceConsistentCasingInFileNames": true,
|
|
12
|
+
"module": "ESNext",
|
|
13
|
+
"moduleResolution": "Node",
|
|
14
|
+
"resolveJsonModule": true,
|
|
15
|
+
"isolatedModules": true,
|
|
16
|
+
"noEmit": true,
|
|
17
|
+
"jsx": "react",
|
|
18
|
+
"baseUrl": "src",
|
|
19
|
+
"paths": {
|
|
20
|
+
"test-utils": ["test/utils.ts"]
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"include": ["src"],
|
|
24
|
+
"references": [{ "path": "./tsconfig.node.json" }]
|
|
25
|
+
}
|
package/vite.config.ts
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/// <reference types="vitest" />
|
|
2
|
+
/// <reference types="vite/client" />
|
|
3
|
+
|
|
4
|
+
import { defineConfig } from 'vite';
|
|
5
|
+
import dts from 'vite-plugin-dts';
|
|
6
|
+
import react from '@vitejs/plugin-react';
|
|
7
|
+
|
|
8
|
+
import * as path from 'path';
|
|
9
|
+
|
|
10
|
+
// https://vitejs.dev/config/
|
|
11
|
+
export default defineConfig({
|
|
12
|
+
css: {
|
|
13
|
+
modules: {
|
|
14
|
+
generateScopedName: 'lc-[name]__[local]___[hash:base64:5]',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
build: {
|
|
18
|
+
lib: {
|
|
19
|
+
entry: path.resolve(__dirname, 'src/index.ts'),
|
|
20
|
+
name: 'dsrc',
|
|
21
|
+
formats: ['es', 'umd', 'cjs'],
|
|
22
|
+
fileName: (format) => `dsrc.${format}.js`,
|
|
23
|
+
},
|
|
24
|
+
rollupOptions: {
|
|
25
|
+
external: (id: string) => !id.startsWith('.') && !path.isAbsolute(id),
|
|
26
|
+
output: {
|
|
27
|
+
globals: {
|
|
28
|
+
react: 'React',
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
test: {
|
|
34
|
+
globals: true,
|
|
35
|
+
environment: 'jsdom',
|
|
36
|
+
setupFiles: './src/test/setup.ts',
|
|
37
|
+
},
|
|
38
|
+
resolve: {
|
|
39
|
+
alias: {
|
|
40
|
+
'test-utils': path.resolve(__dirname, 'src/test/utils.ts'),
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
plugins: [dts(), react({ jsxRuntime: 'classic' })],
|
|
44
|
+
});
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export declare enum AlertSize {
|
|
3
|
-
Small = "small",
|
|
4
|
-
Medium = "medium",
|
|
5
|
-
Large = "large"
|
|
6
|
-
}
|
|
7
|
-
export declare enum AlertType {
|
|
8
|
-
Info = "info",
|
|
9
|
-
Warning = "warning",
|
|
10
|
-
Success = "success",
|
|
11
|
-
Error = "error"
|
|
12
|
-
}
|
|
13
|
-
export interface IAlertProps {
|
|
14
|
-
className?: string;
|
|
15
|
-
size?: AlertSize;
|
|
16
|
-
type?: AlertType;
|
|
17
|
-
onClose?: () => void;
|
|
18
|
-
}
|
|
19
|
-
export declare const Alert: React.FC<IAlertProps>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export declare type ButtonSize = 'compact' | 'medium' | 'large';
|
|
3
|
-
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
4
|
-
kind?: 'basic' | 'primary' | 'secondary' | 'destructive' | 'text';
|
|
5
|
-
size?: ButtonSize;
|
|
6
|
-
disabled?: boolean;
|
|
7
|
-
loading?: boolean;
|
|
8
|
-
fullWidth?: boolean;
|
|
9
|
-
loaderLabel?: string;
|
|
10
|
-
icon?: React.ReactElement;
|
|
11
|
-
iconPosition?: 'left' | 'right';
|
|
12
|
-
}
|
|
13
|
-
export declare const Button: React.FC<ButtonProps>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { ButtonSize, ButtonProps } from './Button';
|
|
3
|
-
export interface ButtonGroupProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
-
currentIndex?: number;
|
|
5
|
-
initialIndex?: number;
|
|
6
|
-
fullWidth?: boolean;
|
|
7
|
-
size?: ButtonSize;
|
|
8
|
-
children: ReadonlyArray<React.ReactElement<React.PropsWithChildren<ButtonProps>>>;
|
|
9
|
-
onIndexChange?: (currentIndex: number, event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
10
|
-
}
|
|
11
|
-
export declare const ButtonGroup: React.FC<ButtonGroupProps>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export interface IFieldGroupProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
-
description?: React.ReactNode;
|
|
4
|
-
error?: string;
|
|
5
|
-
inline?: boolean;
|
|
6
|
-
stretch?: boolean;
|
|
7
|
-
}
|
|
8
|
-
export declare const FieldGroup: React.FC<IFieldGroupProps>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
declare type TSize = 'xl' | 'lg' | 'md' | 'sm' | 'xs';
|
|
3
|
-
interface IProps {
|
|
4
|
-
size?: TSize;
|
|
5
|
-
/** DOM element name that will be rendered */
|
|
6
|
-
as?: string;
|
|
7
|
-
/** Optional custom className */
|
|
8
|
-
className?: string;
|
|
9
|
-
}
|
|
10
|
-
export declare const Heading: React.FC<IProps>;
|
|
11
|
-
export {};
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export declare enum IconSizeName {
|
|
3
|
-
XSmall = "xsmall",
|
|
4
|
-
Small = "small",
|
|
5
|
-
Medium = "medium",
|
|
6
|
-
Large = "large",
|
|
7
|
-
XLarge = "xlarge"
|
|
8
|
-
}
|
|
9
|
-
export declare const IconSize: {
|
|
10
|
-
xsmall: {
|
|
11
|
-
width: number;
|
|
12
|
-
height: number;
|
|
13
|
-
};
|
|
14
|
-
small: {
|
|
15
|
-
width: number;
|
|
16
|
-
height: number;
|
|
17
|
-
};
|
|
18
|
-
medium: {
|
|
19
|
-
width: number;
|
|
20
|
-
height: number;
|
|
21
|
-
};
|
|
22
|
-
large: {
|
|
23
|
-
width: number;
|
|
24
|
-
height: number;
|
|
25
|
-
};
|
|
26
|
-
xlarge: {
|
|
27
|
-
width: number;
|
|
28
|
-
height: number;
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
export declare enum IconTypeName {
|
|
32
|
-
Primary = "primary",
|
|
33
|
-
Subtle = "subtle",
|
|
34
|
-
Inverted = "inverted",
|
|
35
|
-
InvertedSubtle = "inverted_subtle",
|
|
36
|
-
Link = "link",
|
|
37
|
-
Success = "success",
|
|
38
|
-
Warning = "warning",
|
|
39
|
-
Error = "error"
|
|
40
|
-
}
|
|
41
|
-
export declare const IconColorMapper: {
|
|
42
|
-
primary: string;
|
|
43
|
-
subtle: string;
|
|
44
|
-
inverted: string;
|
|
45
|
-
inverted_subtle: string;
|
|
46
|
-
link: string;
|
|
47
|
-
success: string;
|
|
48
|
-
warning: string;
|
|
49
|
-
error: string;
|
|
50
|
-
};
|
|
51
|
-
export declare const IconColorDisabledMapper: {
|
|
52
|
-
primary: string;
|
|
53
|
-
subtle: string;
|
|
54
|
-
inverted: string;
|
|
55
|
-
inverted_subtle: string;
|
|
56
|
-
link: string;
|
|
57
|
-
success: string;
|
|
58
|
-
warning: string;
|
|
59
|
-
error: string;
|
|
60
|
-
};
|
|
61
|
-
export interface IIconProps {
|
|
62
|
-
source: React.FC<React.SVGProps<SVGSVGElement>> | string;
|
|
63
|
-
size?: IconSizeName;
|
|
64
|
-
iconType?: IconTypeName;
|
|
65
|
-
disabled?: boolean;
|
|
66
|
-
className?: string;
|
|
67
|
-
}
|
|
68
|
-
export declare const Icon: React.FC<IIconProps>;
|
|
69
|
-
export default Icon;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export interface Props extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
-
size?: 'small' | 'medium' | 'large';
|
|
4
|
-
label?: string;
|
|
5
|
-
/** Fragment circle color */
|
|
6
|
-
primaryColor?: string;
|
|
7
|
-
/** Main circle color */
|
|
8
|
-
secondaryColor?: string;
|
|
9
|
-
}
|
|
10
|
-
export declare const Loader: React.FC<Props>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { IModalBaseProps } from './ModalBase';
|
|
3
|
-
export interface IActionModalProps extends IModalBaseProps {
|
|
4
|
-
icon?: React.ReactNode;
|
|
5
|
-
heading?: React.ReactNode;
|
|
6
|
-
actions?: React.ReactNode;
|
|
7
|
-
}
|
|
8
|
-
export declare const ActionModal: React.FC<IActionModalProps>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { ProgressSize, ProgressStatus } from './constants';
|
|
3
|
-
export interface IProps {
|
|
4
|
-
className?: string;
|
|
5
|
-
percent: number;
|
|
6
|
-
status?: ProgressStatus;
|
|
7
|
-
size?: ProgressSize;
|
|
8
|
-
}
|
|
9
|
-
export declare const ProgressBar: React.ExoticComponent<IProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { ProgressSize, ProgressStatus } from './constants';
|
|
3
|
-
export interface IProps {
|
|
4
|
-
className?: string;
|
|
5
|
-
percent: number;
|
|
6
|
-
status?: ProgressStatus;
|
|
7
|
-
size?: ProgressSize;
|
|
8
|
-
}
|
|
9
|
-
export declare const ProgressCircle: React.ExoticComponent<IProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export declare enum PromoBannerSize {
|
|
3
|
-
Small = "small",
|
|
4
|
-
Medium = "medium",
|
|
5
|
-
Large = "large"
|
|
6
|
-
}
|
|
7
|
-
export interface IPromoBannerProps {
|
|
8
|
-
className?: string;
|
|
9
|
-
buttonText?: string;
|
|
10
|
-
header: string;
|
|
11
|
-
img?: string;
|
|
12
|
-
light?: boolean;
|
|
13
|
-
linkText?: string;
|
|
14
|
-
size?: PromoBannerSize;
|
|
15
|
-
onButtonClick?: () => void;
|
|
16
|
-
onClose?: () => void;
|
|
17
|
-
onLinkClick?: () => void;
|
|
18
|
-
}
|
|
19
|
-
export declare const PromoBanner: React.FC<IPromoBannerProps>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
declare enum SwitchSize {
|
|
3
|
-
Basic = "basic",
|
|
4
|
-
Compact = "compact"
|
|
5
|
-
}
|
|
6
|
-
export interface IProps {
|
|
7
|
-
className?: string;
|
|
8
|
-
defaultOn?: boolean;
|
|
9
|
-
disabled?: boolean;
|
|
10
|
-
innerRef?: React.LegacyRef<HTMLInputElement> | undefined;
|
|
11
|
-
name?: string;
|
|
12
|
-
on?: boolean;
|
|
13
|
-
onChange?(e: React.FormEvent, value: boolean): void;
|
|
14
|
-
size?: SwitchSize;
|
|
15
|
-
}
|
|
16
|
-
export declare const Switch: React.FC<IProps>;
|
|
17
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/components/Tab.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
declare type HTMLProps = (React.AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
3
|
-
href: string;
|
|
4
|
-
}) | (React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
5
|
-
href?: never;
|
|
6
|
-
});
|
|
7
|
-
export declare type ITabProps = HTMLProps & {
|
|
8
|
-
description?: React.ReactNode;
|
|
9
|
-
isSelected?: boolean;
|
|
10
|
-
};
|
|
11
|
-
export declare const Tab: React.FC<ITabProps>;
|
|
12
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
declare type TSize = 'md' | 'sm' | 'xs';
|
|
3
|
-
interface IProps {
|
|
4
|
-
/** DOM element name that will be rendered */
|
|
5
|
-
as?: string;
|
|
6
|
-
size?: TSize;
|
|
7
|
-
/** Optional custom className */
|
|
8
|
-
className?: string;
|
|
9
|
-
caps?: boolean;
|
|
10
|
-
bold?: boolean;
|
|
11
|
-
underline?: boolean;
|
|
12
|
-
strike?: boolean;
|
|
13
|
-
}
|
|
14
|
-
export declare const Text: React.FC<IProps>;
|
|
15
|
-
export {};
|