gd-design-library 1.0.2 → 1.2.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 +2 -2
- package/ai/README.md +210 -16
- package/ai/schemas/components/Accordion.d.ts +84 -0
- package/ai/schemas/components/Button.d.ts +12 -0
- package/ai/schemas/components/ChatContainer.d.ts +0 -8
- package/ai/schemas/components/Column.d.ts +5 -5
- package/ai/schemas/components/InputFile.d.ts +17 -5
- package/ai/schemas/components/Menu.d.ts +37 -0
- package/ai/schemas/components/Row.d.ts +6 -6
- package/ai/schemas/components/Scroll.d.ts +7 -0
- package/ai/schemas/components/Typography.d.ts +0 -21
- package/assets/icons/account_circle.d.ts +1 -3
- package/assets/icons/account_circle.js +7 -14
- package/assets/icons/arrow-down.d.ts +2 -3
- package/assets/icons/arrow-down.js +6 -11
- package/assets/icons/arrow-forward.d.ts +1 -3
- package/assets/icons/arrow-forward.js +6 -13
- package/assets/icons/attachment.d.ts +1 -3
- package/assets/icons/attachment.js +7 -14
- package/assets/icons/check.d.ts +1 -3
- package/assets/icons/check.js +5 -11
- package/assets/icons/chevron-left.d.ts +1 -3
- package/assets/icons/chevron-left.js +7 -14
- package/assets/icons/chevron-right.d.ts +1 -3
- package/assets/icons/chevron-right.js +6 -13
- package/assets/icons/content-copy.d.ts +1 -3
- package/assets/icons/content-copy.js +7 -14
- package/assets/icons/delete_outlined.d.ts +1 -3
- package/assets/icons/delete_outlined.js +5 -12
- package/assets/icons/dot.d.ts +1 -3
- package/assets/icons/dot.js +5 -11
- package/assets/icons/error_outline.d.ts +1 -4
- package/assets/icons/error_outline.js +6 -18
- package/assets/icons/eye.d.ts +1 -3
- package/assets/icons/eye.js +7 -14
- package/assets/icons/file-copy.d.ts +1 -3
- package/assets/icons/file-copy.js +7 -13
- package/assets/icons/filter.d.ts +1 -3
- package/assets/icons/filter.js +6 -13
- package/assets/icons/folder.d.ts +1 -3
- package/assets/icons/folder.js +6 -13
- package/assets/icons/folderOpen.d.ts +1 -3
- package/assets/icons/folderOpen.js +7 -14
- package/assets/icons/home.d.ts +1 -3
- package/assets/icons/home.js +6 -13
- package/assets/icons/local_shipping.d.ts +1 -3
- package/assets/icons/local_shipping.js +4 -11
- package/assets/icons/minus.d.ts +1 -3
- package/assets/icons/minus.js +7 -13
- package/assets/icons/mobile_menu_button.d.ts +1 -3
- package/assets/icons/mobile_menu_button.js +7 -14
- package/assets/icons/paymentCard.d.ts +1 -3
- package/assets/icons/paymentCard.js +6 -13
- package/assets/icons/plus.d.ts +1 -3
- package/assets/icons/plus.js +5 -11
- package/assets/icons/portrait.d.ts +1 -3
- package/assets/icons/portrait.js +5 -12
- package/assets/icons/processing.d.ts +1 -3
- package/assets/icons/processing.js +6 -13
- package/assets/icons/ruler.d.ts +1 -3
- package/assets/icons/ruler.js +6 -13
- package/assets/icons/search.d.ts +1 -3
- package/assets/icons/search.js +6 -13
- package/assets/icons/shopping_bag.d.ts +1 -3
- package/assets/icons/shopping_bag.js +7 -14
- package/assets/icons/slash.d.ts +1 -3
- package/assets/icons/slash.js +6 -13
- package/assets/icons/star.d.ts +1 -3
- package/assets/icons/star.js +6 -12
- package/assets/icons/starOutlined.d.ts +1 -3
- package/assets/icons/starOutlined.js +5 -11
- package/assets/icons/toast_error.d.ts +1 -3
- package/assets/icons/toast_error.js +9 -15
- package/assets/icons/toast_info.d.ts +1 -3
- package/assets/icons/toast_info.js +7 -13
- package/assets/icons/toast_warning.d.ts +1 -3
- package/assets/icons/toast_warning.js +7 -13
- package/assets/icons/upload.d.ts +1 -3
- package/assets/icons/upload.js +6 -13
- package/assets/icons/volume-up.d.ts +1 -3
- package/assets/icons/volume-up.js +6 -13
- package/assets/icons/wifiTethering.d.ts +1 -3
- package/assets/icons/wifiTethering.js +4 -11
- package/components/core/Button/Button.js +30 -27
- package/components/core/Button/Button.types.d.ts +2 -2
- package/components/core/Button/ButtonStyled.js +40 -39
- package/components/core/Dropdown/Dropdown.d.ts +1 -1
- package/components/core/Dropdown/Dropdown.js +16 -16
- package/components/core/Dropdown/Dropdown.types.d.ts +3 -3
- package/components/core/Dropdown/DropdownStyled.js +13 -14
- package/components/core/Icon/Icon.js +41 -33
- package/components/core/Icon/Icon.types.d.ts +2 -1
- package/components/core/Icon/constants.d.ts +37 -109
- package/components/core/Input/Input.d.ts +1 -1
- package/components/core/InputFile/InputFile.d.ts +0 -32
- package/components/core/InputFile/InputFile.js +47 -33
- package/components/core/InputFile/InputFileStyled.js +24 -22
- package/components/core/Loader/Loader.js +19 -17
- package/components/core/Loader/Loader.types.d.ts +3 -1
- package/components/core/Loader/LoaderStyled.js +34 -30
- package/components/core/Menu/Menu.d.ts +2 -2
- package/components/core/Menu/Menu.js +113 -93
- package/components/core/Menu/Menu.types.d.ts +16 -11
- package/components/core/Menu/MenuStyled.d.ts +1 -1
- package/components/core/Menu/constants.js +4 -12
- package/components/core/Modal/Modal.js +60 -36
- package/components/core/Modal/ModalStyled.js +21 -22
- package/components/core/Scroll/Scroll.d.ts +6 -0
- package/components/core/Scroll/Scroll.js +53 -31
- package/components/core/Scroll/Scroll.types.d.ts +5 -0
- package/components/core/Scroll/ScrollBar.js +45 -43
- package/components/core/Scroll/ScrollStyled.js +46 -42
- package/components/core/Scroll/constants.d.ts +2 -0
- package/components/core/Scroll/constants.js +6 -4
- package/components/core/Select/Select.js +162 -134
- package/components/core/Select/Select.types.d.ts +2 -4
- package/components/core/Snackbar/Snackbar.js +60 -37
- package/components/core/Snackbar/Snackbar.types.d.ts +1 -2
- package/components/core/Snackbar/SnackbarManager.js +45 -30
- package/components/core/Snackbar/SnackbarStyled.d.ts +5 -5
- package/components/core/Snackbar/SnackbarStyled.js +111 -101
- package/components/core/Textarea/Textarea.d.ts +4 -0
- package/components/core/Tooltip/Tooltip.js +68 -44
- package/components/core/Tooltip/TooltipStyled.js +26 -27
- package/components/core/Tooltip/utils.js +47 -45
- package/components/core/Typography/Typography.js +18 -18
- package/components/core/Typography/Typography.types.d.ts +3 -3
- package/components/core/Typography/TypographyStyled.js +28 -29
- package/components/domainSpecific/Accordion/Accordion.d.ts +1 -1
- package/components/domainSpecific/Accordion/Accordion.js +19 -17
- package/components/domainSpecific/Accordion/Accordion.types.d.ts +7 -4
- package/components/domainSpecific/Accordion/AccordionContent/AccordionContent.d.ts +1 -1
- package/components/domainSpecific/Accordion/AccordionContent/AccordionContent.js +13 -12
- package/components/domainSpecific/Accordion/AccordionHeader/AccordionHeader.d.ts +1 -1
- package/components/domainSpecific/Accordion/AccordionHeader/AccordionHeader.js +15 -14
- package/components/domainSpecific/Accordion/AccordionItem/AccordionItem.d.ts +1 -1
- package/components/domainSpecific/Accordion/AccordionItem/AccordionItem.js +18 -16
- package/components/domainSpecific/Accordion/AccordionStyled.js +44 -35
- package/components/domainSpecific/Card/Card.js +31 -27
- package/components/domainSpecific/Card/CardTitle/constants.js +4 -4
- package/components/domainSpecific/Header/Header.js +4 -4
- package/components/domainSpecific/SearchModal/SearchModal.js +0 -1
- package/components/domainSpecific/SearchModal/SearchModal.types.d.ts +1 -1
- package/components/index.types.d.ts +1 -0
- package/components/layout/ChatContainer/ChatContainer.d.ts +1 -1
- package/components/layout/ChatContainer/ChatContainer.js +58 -41
- package/components/layout/ChatContainer/ChatContainer.types.d.ts +8 -5
- package/components/layout/ChatContainer/ChatContainerStyled.d.ts +2 -0
- package/components/layout/ChatContainer/ChatContainerStyled.js +105 -84
- package/components/layout/Column/Column.types.d.ts +3 -1
- package/components/layout/Column/ColumnStyled.js +23 -23
- package/components/layout/FlexContainer/FlexContainerStyled.js +7 -8
- package/components/layout/Row/Row.d.ts +1 -1
- package/components/layout/Row/Row.js +20 -20
- package/components/layout/Row/Row.types.d.ts +3 -1
- package/components/layout/Row/RowStyled.js +26 -26
- package/constants/index.d.ts +0 -1
- package/hooks/index.d.ts +1 -0
- package/hooks/useLogger/NoOpLogger.d.ts +11 -0
- package/hooks/useLogger/NoOpLogger.js +15 -0
- package/hooks/useLogger/index.d.ts +2 -0
- package/hooks/useLogger/useLogger.d.ts +4 -0
- package/hooks/useLogger/useLogger.js +27 -0
- package/hooks/useLogger/useLogger.types.d.ts +30 -0
- package/hooks/useTheme/NoOpTheme.d.ts +4050 -0
- package/hooks/useTheme/NoOpTheme.js +15 -0
- package/hooks/useTheme/useTheme.d.ts +3 -4
- package/hooks/useTheme/useTheme.js +62 -41
- package/hooks/useTheme/useTheme.types.d.ts +3 -2
- package/index.d.ts +4 -0
- package/index.js +354 -350
- package/llms.txt +39 -19
- package/package.json +1 -1
- package/tokens/accordion.d.ts +9 -3
- package/tokens/accordion.js +14 -11
- package/tokens/button.d.ts +17 -19
- package/tokens/button.js +54 -56
- package/tokens/card.d.ts +2 -3
- package/tokens/card.js +50 -53
- package/tokens/carousel.d.ts +2 -2
- package/tokens/carousel.js +8 -9
- package/tokens/chat.d.ts +69 -48
- package/tokens/chat.js +86 -68
- package/tokens/constants.d.ts +0 -1
- package/tokens/constants.js +1 -1
- package/tokens/defaultTheme.d.ts +199 -112
- package/tokens/defaultTheme.js +27 -25
- package/tokens/header.d.ts +1 -1
- package/tokens/header.js +3 -4
- package/tokens/index.d.ts +175 -104
- package/tokens/index.js +102 -101
- package/tokens/input.d.ts +2 -2
- package/tokens/input.js +25 -26
- package/tokens/inputfile.d.ts +1 -1
- package/tokens/inputfile.js +4 -4
- package/tokens/link.d.ts +5 -0
- package/tokens/loader.d.ts +3 -0
- package/tokens/loader.js +3 -0
- package/tokens/menu.d.ts +1 -0
- package/tokens/menu.js +1 -0
- package/tokens/modal.d.ts +6 -4
- package/tokens/modal.js +42 -60
- package/tokens/scroll.d.ts +19 -2
- package/tokens/scroll.js +23 -7
- package/tokens/select.d.ts +9 -7
- package/tokens/select.js +30 -29
- package/tokens/snackbar.d.ts +36 -20
- package/tokens/snackbar.js +92 -93
- package/tokens/stepper.d.ts +1 -1
- package/tokens/stepper.js +3 -3
- package/tokens/tabs.d.ts +1 -1
- package/tokens/tabs.js +1 -1
- package/tokens/textarea.d.ts +4 -0
- package/tokens/tooltip.d.ts +5 -1
- package/tokens/tooltip.js +23 -21
- package/tokens/typography.js +114 -116
- package/tokens/values.d.ts +5 -1
- package/tokens/values.js +12 -8
- package/tokens/wrapper.d.ts +2 -2
- package/tokens/wrapper.js +7 -7
- package/tokens/zIndex.d.ts +9 -0
- package/tokens/zIndex.js +12 -0
- package/types/index.d.ts +0 -1
- package/types/styles.d.ts +1 -0
- package/utils/helpers.js +14 -15
- package/CHANGELOG.md +0 -177
- package/constants/positioning.d.ts +0 -9
- package/constants/positioning.js +0 -11
- package/types/chat.d.ts +0 -5
- package/types/chat.js +0 -4
package/tokens/typography.js
CHANGED
|
@@ -1,150 +1,148 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { SizeVariant as n } from "../types/common.js";
|
|
4
|
-
const m = {
|
|
1
|
+
import { get as t } from "../utils/helpers.js";
|
|
2
|
+
const n = {
|
|
5
3
|
base: {
|
|
6
|
-
fontFamily: (
|
|
4
|
+
fontFamily: (e) => t(e, "font.family", "theme.font.family")
|
|
7
5
|
},
|
|
8
|
-
|
|
6
|
+
span: {
|
|
9
7
|
fontSize: "inherit",
|
|
10
8
|
fontWeight: "inherit",
|
|
11
9
|
lineHeight: "inherit"
|
|
12
10
|
},
|
|
13
|
-
|
|
14
|
-
fontSize: (
|
|
15
|
-
fontWeight: (
|
|
16
|
-
lineHeight: (
|
|
17
|
-
marginTop: (
|
|
18
|
-
marginBottom: (
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
fontSize: (
|
|
22
|
-
fontWeight: (
|
|
23
|
-
lineHeight: (
|
|
24
|
-
marginTop: (
|
|
25
|
-
marginBottom: (
|
|
26
|
-
},
|
|
27
|
-
|
|
28
|
-
fontSize: (
|
|
29
|
-
fontWeight: (
|
|
30
|
-
lineHeight: (
|
|
31
|
-
marginTop: (
|
|
32
|
-
marginBottom: (
|
|
33
|
-
},
|
|
34
|
-
|
|
35
|
-
fontSize: (
|
|
36
|
-
fontWeight: (
|
|
37
|
-
lineHeight: (
|
|
38
|
-
marginTop: (
|
|
39
|
-
marginBottom: (
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
fontSize: (
|
|
43
|
-
fontWeight: (
|
|
44
|
-
lineHeight: (
|
|
45
|
-
marginTop: (
|
|
46
|
-
marginBottom: (
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
fontSize: (
|
|
50
|
-
fontWeight: (
|
|
51
|
-
lineHeight: (
|
|
52
|
-
marginTop: (
|
|
53
|
-
marginBottom: (
|
|
54
|
-
},
|
|
55
|
-
|
|
56
|
-
fontWeight: (
|
|
57
|
-
},
|
|
58
|
-
|
|
11
|
+
h1: {
|
|
12
|
+
fontSize: (e) => t(e, "font.size.h1", "font.size.h1"),
|
|
13
|
+
fontWeight: (e) => t(e, "font.weight.normal", "theme.font.weight.normal"),
|
|
14
|
+
lineHeight: (e) => t(e, "font.line.height.h1", "font.line.height.h1"),
|
|
15
|
+
marginTop: (e) => t(e, "spacing.xl", "theme.spacing.xl"),
|
|
16
|
+
marginBottom: (e) => t(e, "spacing.xl", "theme.spacing.xl")
|
|
17
|
+
},
|
|
18
|
+
h2: {
|
|
19
|
+
fontSize: (e) => t(e, "font.size.h2", "font.size.h2"),
|
|
20
|
+
fontWeight: (e) => t(e, "font.weight.normal", "theme.font.weight.normal"),
|
|
21
|
+
lineHeight: (e) => t(e, "font.line.height.h2", "font.line.height.h2"),
|
|
22
|
+
marginTop: (e) => t(e, "spacing.lg", "theme.spacing.lg"),
|
|
23
|
+
marginBottom: (e) => t(e, "spacing.lg", "theme.spacing.lg")
|
|
24
|
+
},
|
|
25
|
+
h3: {
|
|
26
|
+
fontSize: (e) => t(e, "font.size.h3", "font.size.h3"),
|
|
27
|
+
fontWeight: (e) => t(e, "font.weight.normal", "theme.font.weight.normal"),
|
|
28
|
+
lineHeight: (e) => t(e, "font.line.height.h3", "font.line.height.h3"),
|
|
29
|
+
marginTop: (e) => t(e, "spacing.md", "theme.spacing.md"),
|
|
30
|
+
marginBottom: (e) => t(e, "spacing.md", "theme.spacing.md")
|
|
31
|
+
},
|
|
32
|
+
h4: {
|
|
33
|
+
fontSize: (e) => t(e, "font.size.h4", "font.size.h4"),
|
|
34
|
+
fontWeight: (e) => t(e, "font.weight.normal", "theme.font.weight.normal"),
|
|
35
|
+
lineHeight: (e) => t(e, "font.line.height.h4", "font.line.height.h4"),
|
|
36
|
+
marginTop: (e) => t(e, "spacing.md", "theme.spacing.md"),
|
|
37
|
+
marginBottom: (e) => t(e, "spacing.md", "theme.spacing.md")
|
|
38
|
+
},
|
|
39
|
+
h5: {
|
|
40
|
+
fontSize: (e) => t(e, "font.size.h5", "font.size.h5"),
|
|
41
|
+
fontWeight: (e) => t(e, "font.weight.normal", "theme.font.weight.normal"),
|
|
42
|
+
lineHeight: (e) => t(e, "font.line.height.h5", "font.line.height.h5"),
|
|
43
|
+
marginTop: (e) => t(e, "spacing.sm", "theme.spacing.sm"),
|
|
44
|
+
marginBottom: (e) => t(e, "spacing.sm", "theme.spacing.sm")
|
|
45
|
+
},
|
|
46
|
+
h6: {
|
|
47
|
+
fontSize: (e) => t(e, "font.size.h6", "font.size.h6"),
|
|
48
|
+
fontWeight: (e) => t(e, "font.weight.normal", "theme.font.weight.normal"),
|
|
49
|
+
lineHeight: (e) => t(e, "font.line.height.h6", "font.line.height.h6"),
|
|
50
|
+
marginTop: (e) => t(e, "spacing.sm", "theme.spacing.sm"),
|
|
51
|
+
marginBottom: (e) => t(e, "spacing.sm", "theme.spacing.sm")
|
|
52
|
+
},
|
|
53
|
+
strong: {
|
|
54
|
+
fontWeight: (e) => t(e, "font.weight.bold", "theme.font.weight.bold")
|
|
55
|
+
},
|
|
56
|
+
i: {
|
|
59
57
|
fontStyle: "italic"
|
|
60
58
|
},
|
|
61
|
-
|
|
62
|
-
fontSize: (
|
|
63
|
-
fontWeight: (
|
|
64
|
-
lineHeight: (
|
|
65
|
-
},
|
|
66
|
-
|
|
67
|
-
fontSize: (
|
|
68
|
-
fontWeight: (
|
|
69
|
-
lineHeight: (
|
|
70
|
-
},
|
|
71
|
-
|
|
72
|
-
fontSize: (
|
|
73
|
-
fontWeight: (
|
|
74
|
-
lineHeight: (
|
|
75
|
-
},
|
|
76
|
-
|
|
77
|
-
fontSize: (
|
|
78
|
-
fontWeight: (
|
|
79
|
-
lineHeight: (
|
|
80
|
-
},
|
|
81
|
-
|
|
82
|
-
fontFamily: (
|
|
83
|
-
fontSize: (
|
|
84
|
-
fontWeight: (
|
|
85
|
-
lineHeight: (
|
|
86
|
-
},
|
|
87
|
-
|
|
88
|
-
fontFamily: (
|
|
89
|
-
fontSize: (
|
|
90
|
-
fontWeight: (
|
|
91
|
-
lineHeight: (
|
|
92
|
-
},
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
fontSize: (
|
|
96
|
-
lineHeight: (
|
|
59
|
+
p: {
|
|
60
|
+
fontSize: (e) => t(e, "font.size.p", "font.size.p"),
|
|
61
|
+
fontWeight: (e) => t(e, "font.weight.normal", "theme.font.weight.normal"),
|
|
62
|
+
lineHeight: (e) => t(e, "font.line.height.p", "font.line.height.p")
|
|
63
|
+
},
|
|
64
|
+
small: {
|
|
65
|
+
fontSize: (e) => t(e, "font.size.small", "font.size.small"),
|
|
66
|
+
fontWeight: (e) => t(e, "font.weight.normal", "theme.font.weight.normal"),
|
|
67
|
+
lineHeight: (e) => t(e, "font.line.height.small", "theme.font.line.height.small")
|
|
68
|
+
},
|
|
69
|
+
caption: {
|
|
70
|
+
fontSize: (e) => t(e, "font.size.caption", "font.size.caption"),
|
|
71
|
+
fontWeight: (e) => t(e, "font.weight.normal", "theme.font.weight.normal"),
|
|
72
|
+
lineHeight: (e) => t(e, "font.line.height.caption", "theme.font.line.height.caption")
|
|
73
|
+
},
|
|
74
|
+
header: {
|
|
75
|
+
fontSize: (e) => t(e, "font.size.header", "font.size.header"),
|
|
76
|
+
fontWeight: (e) => t(e, "font.weight.normal", "theme.font.weight.normal"),
|
|
77
|
+
lineHeight: (e) => t(e, "font.line.height.header", "theme.font.line.height.header")
|
|
78
|
+
},
|
|
79
|
+
code: {
|
|
80
|
+
fontFamily: (e) => t(e, 'font["family.code"]', 'theme.font["family.code"]'),
|
|
81
|
+
fontSize: (e) => t(e, "font.size.code", "font.size.code"),
|
|
82
|
+
fontWeight: (e) => t(e, "font.weight.normal", "theme.font.weight.normal"),
|
|
83
|
+
lineHeight: (e) => t(e, "font.line.height.code", "theme.font.line.height.code")
|
|
84
|
+
},
|
|
85
|
+
kbd: {
|
|
86
|
+
fontFamily: (e) => t(e, 'font["family.code"]', 'theme.font["family.code"]'),
|
|
87
|
+
fontSize: (e) => t(e, "font.size.kbd", "font.size.kbd"),
|
|
88
|
+
fontWeight: (e) => t(e, "font.weight.normal", "theme.font.weight.normal"),
|
|
89
|
+
lineHeight: (e) => t(e, "font.line.height.kbd", "theme.font.line.height.kbd")
|
|
90
|
+
},
|
|
91
|
+
div: {
|
|
92
|
+
xs: {
|
|
93
|
+
fontSize: (e) => t(e, "font.size.xs", "theme.font.size.xs"),
|
|
94
|
+
lineHeight: (e) => t(e, "font.line.height.xs", "font.line.height.xs")
|
|
97
95
|
},
|
|
98
|
-
|
|
99
|
-
fontSize: (
|
|
100
|
-
lineHeight: (
|
|
96
|
+
sm: {
|
|
97
|
+
fontSize: (e) => t(e, "font.size.sm", "theme.font.size.sm"),
|
|
98
|
+
lineHeight: (e) => t(e, "font.line.height.sm", "font.line.height.sm")
|
|
101
99
|
},
|
|
102
|
-
|
|
103
|
-
fontSize: (
|
|
104
|
-
lineHeight: (
|
|
100
|
+
md: {
|
|
101
|
+
fontSize: (e) => t(e, "font.size.md", "font.size.md"),
|
|
102
|
+
lineHeight: (e) => t(e, "font.line.height.md", "font.line.height.md")
|
|
105
103
|
},
|
|
106
|
-
|
|
107
|
-
fontSize: (
|
|
108
|
-
lineHeight: (
|
|
104
|
+
lg: {
|
|
105
|
+
fontSize: (e) => t(e, "font.size.lg", "theme.font.size.lg"),
|
|
106
|
+
lineHeight: (e) => t(e, "font.line.height.lg", "font.line.height.lg")
|
|
109
107
|
},
|
|
110
|
-
|
|
111
|
-
fontSize: (
|
|
112
|
-
lineHeight: (
|
|
108
|
+
xl: {
|
|
109
|
+
fontSize: (e) => t(e, "font.size.xl", "theme.font.size.xl"),
|
|
110
|
+
lineHeight: (e) => t(e, "font.line.height.xl", "font.line.height.xl")
|
|
113
111
|
}
|
|
114
112
|
},
|
|
115
113
|
styleVariant: {
|
|
116
|
-
|
|
117
|
-
fontWeight: (
|
|
114
|
+
light: {
|
|
115
|
+
fontWeight: (e) => t(e, "font.weight.light", "theme.font.weight.light")
|
|
118
116
|
},
|
|
119
|
-
|
|
120
|
-
fontWeight: (
|
|
117
|
+
normal: {
|
|
118
|
+
fontWeight: (e) => t(e, "font.weight.normal", "theme.font.weight.normal")
|
|
121
119
|
},
|
|
122
|
-
|
|
123
|
-
fontWeight: (
|
|
120
|
+
semibold: {
|
|
121
|
+
fontWeight: (e) => t(e, "font.weight.medium", "theme.font.weight.medium")
|
|
124
122
|
},
|
|
125
|
-
|
|
126
|
-
fontWeight: (
|
|
123
|
+
bold: {
|
|
124
|
+
fontWeight: (e) => t(e, "font.weight.bold", "theme.font.weight.bold")
|
|
127
125
|
},
|
|
128
|
-
|
|
126
|
+
italic: {
|
|
129
127
|
fontStyle: "italic"
|
|
130
128
|
},
|
|
131
|
-
|
|
132
|
-
fontSize: (
|
|
129
|
+
small: {
|
|
130
|
+
fontSize: (e) => t(e, "font.size.small", "theme.font.size.small")
|
|
133
131
|
},
|
|
134
|
-
|
|
132
|
+
uppercase: {
|
|
135
133
|
textTransform: "uppercase"
|
|
136
134
|
},
|
|
137
|
-
|
|
135
|
+
lowercase: {
|
|
138
136
|
textTransform: "lowercase"
|
|
139
137
|
},
|
|
140
|
-
|
|
138
|
+
underline: {
|
|
141
139
|
textDecoration: "underline"
|
|
142
140
|
},
|
|
143
|
-
|
|
141
|
+
strike: {
|
|
144
142
|
textDecoration: "line-through"
|
|
145
143
|
}
|
|
146
144
|
}
|
|
147
145
|
};
|
|
148
146
|
export {
|
|
149
|
-
|
|
147
|
+
n as typography
|
|
150
148
|
};
|
package/tokens/values.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export declare const values: {
|
|
|
17
17
|
responsiveLarge: string;
|
|
18
18
|
responsiveXLarge: string;
|
|
19
19
|
zIndex: {
|
|
20
|
-
snackbar:
|
|
20
|
+
snackbar: (theme: Record<symbol, unknown>) => string;
|
|
21
21
|
};
|
|
22
22
|
transitions: {
|
|
23
23
|
stepper: {
|
|
@@ -47,6 +47,10 @@ export declare const values: {
|
|
|
47
47
|
tabs: {
|
|
48
48
|
label: string;
|
|
49
49
|
};
|
|
50
|
+
chat: {
|
|
51
|
+
sidebar: string;
|
|
52
|
+
sidebarWrapper: string;
|
|
53
|
+
};
|
|
50
54
|
};
|
|
51
55
|
transform: {
|
|
52
56
|
rotateUp: string;
|
package/tokens/values.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { convertToUnit as r } from "./utils.js";
|
|
2
|
-
import { radius as
|
|
3
|
-
import { borders as
|
|
2
|
+
import { radius as t } from "./radius.js";
|
|
3
|
+
import { borders as a } from "./borders.js";
|
|
4
4
|
import { Unit as o } from "./types/index.types.js";
|
|
5
|
-
import {
|
|
5
|
+
import { get as n } from "../utils/helpers.js";
|
|
6
6
|
import { SizeVariant as e } from "../types/common.js";
|
|
7
|
-
const
|
|
7
|
+
const u = {
|
|
8
8
|
// Border tokens
|
|
9
9
|
borderThin: r(1, o.Rem),
|
|
10
10
|
borderMedium: r(2, o.Rem),
|
|
11
11
|
borderThick: r(4, o.Rem),
|
|
12
|
-
borderNone:
|
|
12
|
+
borderNone: a.none,
|
|
13
13
|
border: {
|
|
14
14
|
radius: {
|
|
15
|
-
none:
|
|
15
|
+
none: t.none
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
18
|
// Layout tokens
|
|
@@ -25,7 +25,7 @@ const b = {
|
|
|
25
25
|
responsiveLarge: "60%",
|
|
26
26
|
responsiveXLarge: "80%",
|
|
27
27
|
zIndex: {
|
|
28
|
-
snackbar:
|
|
28
|
+
snackbar: (s) => n(s, "zIndex.high", "theme.zIndex.high")
|
|
29
29
|
},
|
|
30
30
|
transitions: {
|
|
31
31
|
stepper: {
|
|
@@ -54,6 +54,10 @@ const b = {
|
|
|
54
54
|
},
|
|
55
55
|
tabs: {
|
|
56
56
|
label: "border 0.2s ease-in"
|
|
57
|
+
},
|
|
58
|
+
chat: {
|
|
59
|
+
sidebar: "transform 0.3s ease-in-out, width 0.3s ease-in-out, opacity 0.3s ease-in-out",
|
|
60
|
+
sidebarWrapper: "opacity 0.2s ease-in"
|
|
57
61
|
}
|
|
58
62
|
},
|
|
59
63
|
transform: {
|
|
@@ -72,5 +76,5 @@ const b = {
|
|
|
72
76
|
}
|
|
73
77
|
};
|
|
74
78
|
export {
|
|
75
|
-
|
|
79
|
+
u as values
|
|
76
80
|
};
|
package/tokens/wrapper.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export declare const wrapper: {
|
|
|
15
15
|
width: string;
|
|
16
16
|
height: string;
|
|
17
17
|
position: string;
|
|
18
|
-
zIndex:
|
|
18
|
+
zIndex: (theme: Record<symbol, unknown>) => string;
|
|
19
19
|
};
|
|
20
20
|
fullPage: {
|
|
21
21
|
display: string;
|
|
@@ -24,6 +24,6 @@ export declare const wrapper: {
|
|
|
24
24
|
left: number;
|
|
25
25
|
width: string;
|
|
26
26
|
height: string;
|
|
27
|
-
zIndex:
|
|
27
|
+
zIndex: (theme: Record<symbol, unknown>) => string;
|
|
28
28
|
};
|
|
29
29
|
};
|
package/tokens/wrapper.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { WrapperVariant as
|
|
2
|
-
import {
|
|
1
|
+
import { WrapperVariant as t } from "../types/wrapper.js";
|
|
2
|
+
import { get as i } from "../utils/helpers.js";
|
|
3
3
|
const l = {
|
|
4
4
|
default: {
|
|
5
5
|
justifyContent: "center",
|
|
@@ -7,26 +7,26 @@ const l = {
|
|
|
7
7
|
backdropFilter: "blur(2px)",
|
|
8
8
|
backgroundColor: "rgba(0, 0, 0, 0.1)"
|
|
9
9
|
},
|
|
10
|
-
[
|
|
10
|
+
[t.Inline]: {
|
|
11
11
|
display: "inline-flex"
|
|
12
12
|
},
|
|
13
|
-
[
|
|
13
|
+
[t.Section]: {
|
|
14
14
|
display: "flex",
|
|
15
15
|
top: 0,
|
|
16
16
|
left: 0,
|
|
17
17
|
width: "100%",
|
|
18
18
|
height: "100%",
|
|
19
19
|
position: "absolute",
|
|
20
|
-
zIndex:
|
|
20
|
+
zIndex: (e) => i(e, "zIndex.high", "theme.zIndex.high")
|
|
21
21
|
},
|
|
22
|
-
[
|
|
22
|
+
[t.FullPage]: {
|
|
23
23
|
display: "flex",
|
|
24
24
|
position: "fixed",
|
|
25
25
|
top: 0,
|
|
26
26
|
left: 0,
|
|
27
27
|
width: "100vw",
|
|
28
28
|
height: "100vh",
|
|
29
|
-
zIndex:
|
|
29
|
+
zIndex: (e) => i(e, "zIndex.top", "theme.zIndex.top")
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
32
|
export {
|
package/tokens/zIndex.js
ADDED
package/types/index.d.ts
CHANGED
package/types/styles.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export type BoxStyles<T = number> = Record<string, string | boolean | T | undefined>;
|
|
2
2
|
export type BoxComputedStyles<T = number> = Record<string, string | boolean | T | never>;
|
|
3
3
|
export type InlineBoxStyles = Record<string, string | number | undefined>;
|
|
4
|
+
export type Rounded = 'none' | 'default' | 'round' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
package/utils/helpers.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const y = (e) => Array.isArray(e),
|
|
1
|
+
const y = (e) => Array.isArray(e), c = (e, r, s) => {
|
|
2
2
|
let f;
|
|
3
|
-
Array.isArray(r) ? f = r : typeof r == "string" ? f =
|
|
3
|
+
Array.isArray(r) ? f = r : typeof r == "string" ? f = l(r) : f = Object.keys(r);
|
|
4
4
|
let i = e;
|
|
5
5
|
for (const n of f) {
|
|
6
6
|
if (i == null || typeof i != "object")
|
|
@@ -8,7 +8,7 @@ const y = (e) => Array.isArray(e), l = (e) => typeof e == "object" && e !== null
|
|
|
8
8
|
i = i[n];
|
|
9
9
|
}
|
|
10
10
|
return i === void 0 ? s : i;
|
|
11
|
-
},
|
|
11
|
+
}, l = (e) => {
|
|
12
12
|
if (!e) return [];
|
|
13
13
|
const r = [];
|
|
14
14
|
let s = "", f = !1, i = "", n = "";
|
|
@@ -18,8 +18,8 @@ const y = (e) => Array.isArray(e), l = (e) => typeof e == "object" && e !== null
|
|
|
18
18
|
` && (n += t) : t === "[" ? (s && (r.push(s), s = ""), f = !0, n = "") : t === "." && s ? (r.push(s), s = "") : t !== "." && (s += t);
|
|
19
19
|
}
|
|
20
20
|
return s && r.push(s), r;
|
|
21
|
-
},
|
|
22
|
-
const i = Array.isArray(r)
|
|
21
|
+
}, g = (e, r, s, f = !1) => {
|
|
22
|
+
const i = Array.isArray(r) ? r : typeof r == "string" ? l(r) : Object.keys(r);
|
|
23
23
|
let n = e;
|
|
24
24
|
try {
|
|
25
25
|
for (let u = 0; u < i.length; u++) {
|
|
@@ -35,12 +35,12 @@ const y = (e) => Array.isArray(e), l = (e) => typeof e == "object" && e !== null
|
|
|
35
35
|
} catch (u) {
|
|
36
36
|
return console.error(u), e;
|
|
37
37
|
}
|
|
38
|
-
},
|
|
38
|
+
}, k = (e, ...r) => e.filter((s) => !r.includes(s)), A = (e) => e == null ? 0 : Array.isArray(e) || typeof e == "string" ? e.length : Object.keys(e).length, a = (e) => {
|
|
39
39
|
if (typeof e == "number") return e;
|
|
40
40
|
if (!e) return null;
|
|
41
41
|
const r = Number(e);
|
|
42
42
|
return isNaN(r) ? null : r;
|
|
43
|
-
},
|
|
43
|
+
}, b = (e, r) => {
|
|
44
44
|
let s;
|
|
45
45
|
return (...f) => {
|
|
46
46
|
s && clearTimeout(s), s = setTimeout(() => {
|
|
@@ -49,13 +49,12 @@ const y = (e) => Array.isArray(e), l = (e) => typeof e == "object" && e !== null
|
|
|
49
49
|
};
|
|
50
50
|
};
|
|
51
51
|
export {
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
b as debounce,
|
|
53
|
+
c as get,
|
|
54
54
|
y as isArray,
|
|
55
|
-
l as
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
g as without
|
|
55
|
+
l as parsePathString,
|
|
56
|
+
g as set,
|
|
57
|
+
A as size,
|
|
58
|
+
a as toNumber,
|
|
59
|
+
k as without
|
|
61
60
|
};
|