@bifrostui/react 1.3.2 → 1.4.0-beta.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/dist/ActionSheet/ActionSheet.css +6 -3
- package/dist/ActionSheet/ActionSheetItem.css +10 -6
- package/dist/Alert/index.css +14 -8
- package/dist/Avatar/Avatar.css +13 -9
- package/dist/Avatar/AvatarGroup.css +15 -8
- package/dist/Backdrop/Backdrop.css +2 -1
- package/dist/Badge/Badge.css +27 -17
- package/dist/Breadcrumb/Breadcrumb.css +34 -0
- package/dist/Breadcrumb/Breadcrumb.d.ts +5 -0
- package/dist/Breadcrumb/Breadcrumb.js +128 -0
- package/dist/Breadcrumb/Breadcrumb.types.d.ts +49 -0
- package/dist/Breadcrumb/Breadcrumb.types.js +15 -0
- package/dist/Breadcrumb/BreadcrumbItem.d.ts +4 -0
- package/dist/Breadcrumb/BreadcrumbItem.js +78 -0
- package/dist/Breadcrumb/index.d.ts +4 -0
- package/dist/Breadcrumb/index.js +45 -0
- package/dist/Button/Button.css +37 -25
- package/dist/Calendar/Calendar.css +33 -18
- package/dist/Calendar/Calendar.d.ts +1 -1
- package/dist/Calendar/Calendar.js +38 -17
- package/dist/Calendar/Calendar.types.d.ts +21 -0
- package/dist/Card/CardFooter.css +2 -1
- package/dist/Card/CardHeader.css +3 -1
- package/dist/Checkbox/Checkbox.css +7 -5
- package/dist/CitySelector/CitySelector.css +29 -15
- package/dist/CitySelector/CitySelectorCore.js +25 -16
- package/dist/CitySelector/Selector/index.css +4 -4
- package/dist/Collapse/Collapse.css +6 -0
- package/dist/Collapse/Collapse.d.ts +5 -0
- package/dist/Collapse/Collapse.js +165 -0
- package/dist/Collapse/Collapse.types.d.ts +16 -0
- package/dist/Collapse/Collapse.types.js +15 -0
- package/dist/Collapse/index.d.ts +2 -0
- package/dist/Collapse/index.js +41 -0
- package/dist/CollapsePanel/CollapsePanel.css +32 -0
- package/dist/CollapsePanel/CollapsePanel.d.ts +5 -0
- package/dist/CollapsePanel/CollapsePanel.js +159 -0
- package/dist/CollapsePanel/CollapsePanel.types.d.ts +64 -0
- package/dist/CollapsePanel/CollapsePanel.types.js +15 -0
- package/dist/CollapsePanel/CollapsePanelItem.d.ts +4 -0
- package/dist/CollapsePanel/CollapsePanelItem.js +112 -0
- package/dist/CollapsePanel/index.d.ts +4 -0
- package/dist/CollapsePanel/index.js +45 -0
- package/dist/Countdown/Countdown.css +2 -1
- package/dist/Dialog/Dialog.d.ts +2 -2
- package/dist/Dialog/Dialog.js +20 -8
- package/dist/Dialog/Dialog.types.d.ts +12 -1
- package/dist/Dialog/FunctionalDialog.js +38 -2
- package/dist/Dialog/index.css +27 -18
- package/dist/Divider/Divider.css +6 -4
- package/dist/IconButton/IconButton.css +9 -7
- package/dist/Image/index.css +2 -1
- package/dist/Input/Input.css +14 -7
- package/dist/List/List.css +3 -0
- package/dist/List/ListItem.css +3 -3
- package/dist/List/ListItemContent.css +1 -1
- package/dist/Loading/Loading.css +4 -2
- package/dist/NavBar/NavBar.css +9 -5
- package/dist/Picker/Picker.css +25 -29
- package/dist/Picker/Picker.js +31 -11
- package/dist/Picker/Picker.types.d.ts +4 -0
- package/dist/Picker/PickerPanel.css +8 -8
- package/dist/Picker/PickerPanel.js +14 -8
- package/dist/Picker/utils.d.ts +16 -0
- package/dist/Picker/utils.js +32 -2
- package/dist/Popover/Popover.css +97 -0
- package/dist/Popover/Popover.d.ts +5 -0
- package/dist/Popover/Popover.js +195 -0
- package/dist/Popover/Popover.types.d.ts +58 -0
- package/dist/Popover/Popover.types.js +15 -0
- package/dist/Popover/index.d.ts +2 -0
- package/dist/Popover/index.js +41 -0
- package/dist/Portal/Portal.types.d.ts +4 -0
- package/dist/Portal/PortalCore.js +8 -1
- package/dist/Progress/Progress.css +9 -7
- package/dist/Radio/Radio.css +5 -4
- package/dist/Rating/Rating.css +8 -4
- package/dist/Select/Select.css +21 -10
- package/dist/Select/Select.js +1 -1
- package/dist/Select/SelectOption.js +3 -0
- package/dist/Skeleton/Skeleton.css +5 -5
- package/dist/Slider/Slider.css +29 -18
- package/dist/Steps/Step.css +13 -13
- package/dist/Steps/Steps.css +14 -7
- package/dist/Swiper/Swiper.css +2 -1
- package/dist/Switch/Switch.css +31 -16
- package/dist/TabBar/TabBar.css +7 -3
- package/dist/TabBar/TabBarItem.css +0 -1
- package/dist/Tabs/Tab.css +6 -10
- package/dist/Tabs/Tabs.css +10 -9
- package/dist/Tag/Tag.css +7 -10
- package/dist/Tag/TagGroup.css +9 -1
- package/dist/TextArea/TextArea.css +23 -13
- package/dist/ThemeProvider/ThemeProvider.d.ts +4 -0
- package/dist/ThemeProvider/ThemeProvider.js +91 -0
- package/dist/ThemeProvider/ThemeProvider.types.d.ts +127 -0
- package/dist/ThemeProvider/ThemeProvider.types.js +27 -0
- package/dist/ThemeProvider/hooks/ThemeContext.d.ts +4 -0
- package/dist/ThemeProvider/hooks/ThemeContext.js +35 -0
- package/dist/ThemeProvider/hooks/createTheme.d.ts +2 -0
- package/dist/ThemeProvider/hooks/createTheme.js +55 -0
- package/dist/ThemeProvider/hooks/index.d.ts +4 -0
- package/dist/ThemeProvider/hooks/index.js +43 -0
- package/dist/ThemeProvider/hooks/useTheme.d.ts +1 -0
- package/dist/ThemeProvider/hooks/useTheme.js +39 -0
- package/dist/ThemeProvider/index.d.ts +4 -0
- package/dist/ThemeProvider/index.js +45 -0
- package/dist/ThemeProvider/utils/constants.d.ts +38 -0
- package/dist/ThemeProvider/utils/constants.js +65 -0
- package/dist/ThemeProvider/utils/index.d.ts +2 -0
- package/dist/ThemeProvider/utils/index.js +23 -0
- package/dist/ThemeProvider/utils/mountTokens.d.ts +26 -0
- package/dist/ThemeProvider/utils/mountTokens.js +123 -0
- package/dist/Toast/FunctionalToast.js +18 -0
- package/dist/Toast/Toast.css +18 -20
- package/dist/Toast/Toast.d.ts +2 -2
- package/dist/Toast/Toast.js +52 -48
- package/dist/Toast/Toast.types.d.ts +15 -1
- package/dist/Tooltip/Tooltip.css +91 -0
- package/dist/Tooltip/Tooltip.d.ts +5 -0
- package/dist/Tooltip/Tooltip.js +184 -0
- package/dist/Tooltip/Tooltip.types.d.ts +49 -0
- package/dist/Tooltip/Tooltip.types.js +15 -0
- package/dist/Tooltip/index.d.ts +2 -0
- package/dist/Tooltip/index.js +41 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +15 -1
- package/dist/locales/base.d.ts +40 -0
- package/dist/locales/base.js +15 -0
- package/dist/locales/en-US.d.ts +3 -0
- package/dist/locales/en-US.js +69 -0
- package/dist/locales/hooks/useLocaleText.d.ts +3 -0
- package/dist/locales/hooks/useLocaleText.js +43 -0
- package/dist/locales/index.d.ts +5 -0
- package/dist/locales/index.js +49 -0
- package/dist/locales/zh-CN.d.ts +3 -0
- package/dist/locales/zh-CN.js +51 -0
- package/dist/locales/zh-TW.d.ts +3 -0
- package/dist/locales/zh-TW.js +51 -0
- package/es/ActionSheet/ActionSheet.css +6 -3
- package/es/ActionSheet/ActionSheetItem.css +10 -6
- package/es/Alert/index.css +14 -8
- package/es/Avatar/Avatar.css +13 -9
- package/es/Avatar/AvatarGroup.css +15 -8
- package/es/Backdrop/Backdrop.css +2 -1
- package/es/Badge/Badge.css +27 -17
- package/es/Breadcrumb/Breadcrumb.css +34 -0
- package/es/Breadcrumb/Breadcrumb.d.ts +5 -0
- package/es/Breadcrumb/Breadcrumb.js +101 -0
- package/es/Breadcrumb/Breadcrumb.types.d.ts +49 -0
- package/es/Breadcrumb/Breadcrumb.types.js +1 -0
- package/es/Breadcrumb/BreadcrumbItem.d.ts +4 -0
- package/es/Breadcrumb/BreadcrumbItem.js +51 -0
- package/es/Breadcrumb/index.d.ts +4 -0
- package/es/Breadcrumb/index.js +9 -0
- package/es/Button/Button.css +37 -25
- package/es/Calendar/Calendar.css +33 -18
- package/es/Calendar/Calendar.d.ts +1 -1
- package/es/Calendar/Calendar.js +38 -17
- package/es/Calendar/Calendar.types.d.ts +21 -0
- package/es/Card/CardFooter.css +2 -1
- package/es/Card/CardHeader.css +3 -1
- package/es/Checkbox/Checkbox.css +7 -5
- package/es/CitySelector/CitySelector.css +29 -15
- package/es/CitySelector/CitySelectorCore.js +25 -16
- package/es/CitySelector/Selector/index.css +4 -4
- package/es/Collapse/Collapse.css +6 -0
- package/es/Collapse/Collapse.d.ts +5 -0
- package/es/Collapse/Collapse.js +144 -0
- package/es/Collapse/Collapse.types.d.ts +16 -0
- package/es/Collapse/Collapse.types.js +1 -0
- package/es/Collapse/index.d.ts +2 -0
- package/es/Collapse/index.js +6 -0
- package/es/CollapsePanel/CollapsePanel.css +32 -0
- package/es/CollapsePanel/CollapsePanel.d.ts +5 -0
- package/es/CollapsePanel/CollapsePanel.js +132 -0
- package/es/CollapsePanel/CollapsePanel.types.d.ts +64 -0
- package/es/CollapsePanel/CollapsePanel.types.js +1 -0
- package/es/CollapsePanel/CollapsePanelItem.d.ts +4 -0
- package/es/CollapsePanel/CollapsePanelItem.js +85 -0
- package/es/CollapsePanel/index.d.ts +4 -0
- package/es/CollapsePanel/index.js +9 -0
- package/es/Countdown/Countdown.css +2 -1
- package/es/Dialog/Dialog.d.ts +2 -2
- package/es/Dialog/Dialog.js +20 -8
- package/es/Dialog/Dialog.types.d.ts +12 -1
- package/es/Dialog/FunctionalDialog.js +38 -2
- package/es/Dialog/index.css +27 -18
- package/es/Divider/Divider.css +6 -4
- package/es/IconButton/IconButton.css +9 -7
- package/es/Image/index.css +2 -1
- package/es/Input/Input.css +14 -7
- package/es/List/List.css +3 -0
- package/es/List/ListItem.css +3 -3
- package/es/List/ListItemContent.css +1 -1
- package/es/Loading/Loading.css +4 -2
- package/es/Modal/Modal.miniapp.d.ts +1 -1
- package/es/NavBar/NavBar.css +9 -5
- package/es/Picker/Picker.css +25 -29
- package/es/Picker/Picker.js +32 -12
- package/es/Picker/Picker.types.d.ts +4 -0
- package/es/Picker/PickerPanel.css +8 -8
- package/es/Picker/PickerPanel.js +14 -8
- package/es/Picker/utils.d.ts +16 -0
- package/es/Picker/utils.js +29 -1
- package/es/Popover/Popover.css +97 -0
- package/es/Popover/Popover.d.ts +5 -0
- package/es/Popover/Popover.js +172 -0
- package/es/Popover/Popover.types.d.ts +58 -0
- package/es/Popover/Popover.types.js +1 -0
- package/es/Popover/index.d.ts +2 -0
- package/es/Popover/index.js +6 -0
- package/es/Portal/Portal.types.d.ts +4 -0
- package/es/Portal/PortalCore.js +8 -1
- package/es/Progress/Progress.css +9 -7
- package/es/Radio/Radio.css +5 -4
- package/es/Rating/Rating.css +8 -4
- package/es/Select/Select.css +21 -10
- package/es/Select/Select.js +1 -1
- package/es/Select/SelectOption.js +3 -0
- package/es/Skeleton/Skeleton.css +5 -5
- package/es/Slider/Slider.css +29 -18
- package/es/Steps/Step.css +13 -13
- package/es/Steps/Steps.css +14 -7
- package/es/Swiper/Swiper.css +2 -1
- package/es/Switch/Switch.css +31 -16
- package/es/TabBar/TabBar.css +7 -3
- package/es/TabBar/TabBarItem.css +0 -1
- package/es/Tabs/Tab.css +6 -10
- package/es/Tabs/Tabs.css +10 -9
- package/es/Tag/Tag.css +7 -10
- package/es/Tag/TagGroup.css +9 -1
- package/es/TextArea/TextArea.css +23 -13
- package/es/ThemeProvider/ThemeProvider.d.ts +4 -0
- package/es/ThemeProvider/ThemeProvider.js +62 -0
- package/es/ThemeProvider/ThemeProvider.types.d.ts +127 -0
- package/es/ThemeProvider/ThemeProvider.types.js +1 -0
- package/es/ThemeProvider/hooks/ThemeContext.d.ts +4 -0
- package/es/ThemeProvider/hooks/ThemeContext.js +6 -0
- package/es/ThemeProvider/hooks/createTheme.d.ts +2 -0
- package/es/ThemeProvider/hooks/createTheme.js +38 -0
- package/es/ThemeProvider/hooks/index.d.ts +4 -0
- package/es/ThemeProvider/hooks/index.js +8 -0
- package/es/ThemeProvider/hooks/useTheme.d.ts +1 -0
- package/es/ThemeProvider/hooks/useTheme.js +10 -0
- package/es/ThemeProvider/index.d.ts +4 -0
- package/es/ThemeProvider/index.js +8 -0
- package/es/ThemeProvider/utils/constants.d.ts +38 -0
- package/es/ThemeProvider/utils/constants.js +40 -0
- package/es/ThemeProvider/utils/index.d.ts +2 -0
- package/es/ThemeProvider/utils/index.js +2 -0
- package/es/ThemeProvider/utils/mountTokens.d.ts +26 -0
- package/es/ThemeProvider/utils/mountTokens.js +88 -0
- package/es/Toast/FunctionalToast.js +18 -0
- package/es/Toast/Toast.css +18 -20
- package/es/Toast/Toast.d.ts +2 -2
- package/es/Toast/Toast.js +53 -49
- package/es/Toast/Toast.types.d.ts +15 -1
- package/es/Tooltip/Tooltip.css +91 -0
- package/es/Tooltip/Tooltip.d.ts +5 -0
- package/es/Tooltip/Tooltip.js +161 -0
- package/es/Tooltip/Tooltip.types.d.ts +49 -0
- package/es/Tooltip/Tooltip.types.js +1 -0
- package/es/Tooltip/index.d.ts +2 -0
- package/es/Tooltip/index.js +6 -0
- package/es/index.d.ts +7 -0
- package/es/index.js +7 -0
- package/es/locales/base.d.ts +40 -0
- package/es/locales/base.js +0 -0
- package/es/locales/en-US.d.ts +3 -0
- package/es/locales/en-US.js +50 -0
- package/es/locales/hooks/useLocaleText.d.ts +3 -0
- package/es/locales/hooks/useLocaleText.js +26 -0
- package/es/locales/index.d.ts +5 -0
- package/es/locales/index.js +11 -0
- package/es/locales/zh-CN.d.ts +3 -0
- package/es/locales/zh-CN.js +32 -0
- package/es/locales/zh-TW.d.ts +3 -0
- package/es/locales/zh-TW.js +32 -0
- package/package.json +5 -5
package/dist/Steps/Step.css
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
font-family: var(--bui-font-family);
|
|
6
6
|
}
|
|
7
7
|
.bui-step-label-horizontal {
|
|
8
|
-
line-height:
|
|
8
|
+
line-height: var(--step-label-horizontal-line-height);
|
|
9
9
|
}
|
|
10
10
|
.bui-step:last-child .bui-step-line::after {
|
|
11
11
|
display: none;
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
.bui-step-line {
|
|
14
14
|
position: absolute;
|
|
15
15
|
top: 0;
|
|
16
|
-
width:
|
|
17
|
-
height:
|
|
16
|
+
width: var(--step-line-width);
|
|
17
|
+
height: var(--step-line-height);
|
|
18
18
|
box-sizing: border-box;
|
|
19
19
|
left: 13px;
|
|
20
20
|
padding: var(--step-line-padding);
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
.bui-step-line::after {
|
|
23
23
|
display: inline-block;
|
|
24
24
|
content: "";
|
|
25
|
-
width:
|
|
26
|
-
border-left-width:
|
|
25
|
+
width: var(--step-line-width);
|
|
26
|
+
border-left-width: var(--step-line-width);
|
|
27
27
|
border-left-style: dotted;
|
|
28
28
|
height: calc(100% + 11px);
|
|
29
29
|
}
|
|
@@ -41,14 +41,14 @@
|
|
|
41
41
|
}
|
|
42
42
|
.bui-step-icon {
|
|
43
43
|
flex-shrink: 0;
|
|
44
|
-
width:
|
|
44
|
+
width: var(--step-icon-width);
|
|
45
45
|
text-align: center;
|
|
46
46
|
margin: var(--step-icon-margin);
|
|
47
|
-
font-size: var(--
|
|
47
|
+
font-size: var(--step-icon-font-size);
|
|
48
48
|
}
|
|
49
49
|
.bui-step-icon-active {
|
|
50
|
-
width:
|
|
51
|
-
height:
|
|
50
|
+
width: var(--step-icon-active-width);
|
|
51
|
+
height: var(--step-icon-active-height);
|
|
52
52
|
position: relative;
|
|
53
53
|
background-color: var(--bui-color-primary);
|
|
54
54
|
border-radius: 50%;
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
display: inline-block;
|
|
57
57
|
}
|
|
58
58
|
.bui-step-content {
|
|
59
|
-
padding:
|
|
59
|
+
padding: var(--step-content-padding);
|
|
60
60
|
box-sizing: border-box;
|
|
61
61
|
flex: 1 0 0;
|
|
62
62
|
overflow: hidden;
|
|
@@ -71,8 +71,8 @@
|
|
|
71
71
|
align-items: flex-start;
|
|
72
72
|
}
|
|
73
73
|
.bui-step-title {
|
|
74
|
-
font-size: var(--title-
|
|
75
|
-
font-weight: var(--
|
|
74
|
+
font-size: var(--bui-title-size-4);
|
|
75
|
+
font-weight: var(--bui-font-weight-medium);
|
|
76
76
|
width: auto;
|
|
77
77
|
overflow: hidden;
|
|
78
78
|
text-overflow: ellipsis;
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
}
|
|
129
129
|
.bui-step-horizontal .bui-step-line {
|
|
130
130
|
display: none;
|
|
131
|
-
padding:
|
|
131
|
+
padding: var(--step-horizontal-line-padding);
|
|
132
132
|
}
|
|
133
133
|
.bui-step-horizontal .bui-step-icon {
|
|
134
134
|
margin-right: 0;
|
package/dist/Steps/Steps.css
CHANGED
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
.bui-steps {
|
|
2
|
-
--
|
|
3
|
-
--
|
|
4
|
-
--
|
|
5
|
-
--
|
|
6
|
-
--step-
|
|
7
|
-
--step-line-
|
|
2
|
+
--font-size: var(--bui-steps-font-size, var(--bui-title-size-3));
|
|
3
|
+
--subtitle-font-size: var(--bui-step-subtitle-font-size, var(--bui-text-size-2));
|
|
4
|
+
--step-line-padding: var(--bui-step-line-padding, 20px 0 3px 0);
|
|
5
|
+
--step-line-width: var(--bui-step-line-width, 1px);
|
|
6
|
+
--step-line-height: var(--bui-step-line-height, 100%);
|
|
7
|
+
--step-label-horizontal-line-height: var(--bui-step-label-horizontal-line-height, 1.8);
|
|
8
|
+
--step-icon-width: var(--bui-step-icon-width, 28px);
|
|
9
|
+
--step-icon-active-width: var(--bui-step-icon-active-width, 12px);
|
|
10
|
+
--step-icon-active-height: var(--bui-step-icon-active-height, 12px);
|
|
11
|
+
--step-icon-font-size: var(--bui-step-icon-font-size, var(--bui-title-size-4));
|
|
12
|
+
--step-icon-margin: var(--bui-step-icon-margin, var(--bui-spacing-xs) var(--bui-spacing-xs) 0 0);
|
|
13
|
+
--step-content-padding: var(--bui-step-content-padding, 3px 0);
|
|
14
|
+
--step-horizontal-line-padding: var(--bui-step-horizontal-line-padding, 28px 0 6px);
|
|
8
15
|
display: flex;
|
|
9
|
-
font-size: var(--
|
|
16
|
+
font-size: var(--font-size);
|
|
10
17
|
font-family: var(--bui-font-family);
|
|
11
18
|
}
|
|
12
19
|
.bui-steps-vertical {
|
package/dist/Swiper/Swiper.css
CHANGED
package/dist/Switch/Switch.css
CHANGED
|
@@ -1,11 +1,26 @@
|
|
|
1
1
|
.bui-switch {
|
|
2
|
-
--bg-color: #ccc;
|
|
2
|
+
--bg-color: var(--bui-switch-bg-color, #ccc);
|
|
3
|
+
--padding: var(--bui-switch-padding, 0);
|
|
4
|
+
--border-radius: var(--bui-switch-border-radius, 15px);
|
|
5
|
+
--small-width: var(--bui-switch-small-width, 24px);
|
|
6
|
+
--small-height: var(--bui-switch-small-height, 16px);
|
|
7
|
+
--small-font-size: var(--bui-switch-small-font-size, 9px);
|
|
8
|
+
--controller-small-width: var(--bui-switch-controller-small-width, 12px);
|
|
9
|
+
--controller-small-height: var(--bui-switch-controller-small-height, 12px);
|
|
10
|
+
--medium-width: var(--bui-switch-medium-width, 44px);
|
|
11
|
+
--medium-height: var(--bui-switch-medium-height, 22px);
|
|
12
|
+
--controller-medium-width: var(--bui-switch-controller-medium-width, 18px);
|
|
13
|
+
--controller-medium-height: var(--bui-switch-controller-medium-height, 18px);
|
|
14
|
+
--large-width: var(--bui-switch-large-width, 51px);
|
|
15
|
+
--large-height: var(--bui-switch-large-height, 30px);
|
|
16
|
+
--controller-large-width: var(--bui-switch-controller-large-width, 24px);
|
|
17
|
+
--controller-large-height: var(--bui-switch-controller-large-height, 24px);
|
|
3
18
|
position: relative;
|
|
4
19
|
display: inline-block;
|
|
5
20
|
box-sizing: border-box;
|
|
6
|
-
padding:
|
|
21
|
+
padding: var(--padding);
|
|
7
22
|
vertical-align: middle;
|
|
8
|
-
border-radius:
|
|
23
|
+
border-radius: var(--border-radius);
|
|
9
24
|
background-color: var(--bg-color);
|
|
10
25
|
transition: all 0.3s cubic-bezier(0.35, 0, 0.25, 1);
|
|
11
26
|
font-family: var(--bui-font-family);
|
|
@@ -27,16 +42,16 @@
|
|
|
27
42
|
outline: none;
|
|
28
43
|
}
|
|
29
44
|
.bui-switch-small {
|
|
30
|
-
width:
|
|
31
|
-
height:
|
|
45
|
+
width: var(--small-width);
|
|
46
|
+
height: var(--small-height);
|
|
32
47
|
}
|
|
33
48
|
.bui-switch-small .bui-switch-inner {
|
|
34
49
|
left: calc(100% - 10px);
|
|
35
|
-
font-size:
|
|
50
|
+
font-size: var(--font-size-smal);
|
|
36
51
|
}
|
|
37
52
|
.bui-switch-small::after {
|
|
38
|
-
width:
|
|
39
|
-
height:
|
|
53
|
+
width: var(--controller-small-width);
|
|
54
|
+
height: var(--controller-small-height);
|
|
40
55
|
left: 2px;
|
|
41
56
|
top: 2px;
|
|
42
57
|
}
|
|
@@ -47,12 +62,12 @@
|
|
|
47
62
|
left: 2px;
|
|
48
63
|
}
|
|
49
64
|
.bui-switch-medium {
|
|
50
|
-
width:
|
|
51
|
-
height:
|
|
65
|
+
width: var(--medium-width);
|
|
66
|
+
height: var(--medium-height);
|
|
52
67
|
}
|
|
53
68
|
.bui-switch-medium::after {
|
|
54
|
-
width:
|
|
55
|
-
height:
|
|
69
|
+
width: var(--controller-medium-width);
|
|
70
|
+
height: var(--controller-medium-height);
|
|
56
71
|
}
|
|
57
72
|
.bui-switch-medium.bui-switch-checked::after {
|
|
58
73
|
left: calc(100% - 20px);
|
|
@@ -61,15 +76,15 @@
|
|
|
61
76
|
left: var(--bui-spacing-sm);
|
|
62
77
|
}
|
|
63
78
|
.bui-switch-large {
|
|
64
|
-
width:
|
|
65
|
-
height:
|
|
79
|
+
width: var(--large-width);
|
|
80
|
+
height: var(--large-height);
|
|
66
81
|
}
|
|
67
82
|
.bui-switch-large .bui-switch-inner {
|
|
68
83
|
left: calc(100% - 22px);
|
|
69
84
|
}
|
|
70
85
|
.bui-switch-large::after {
|
|
71
|
-
width:
|
|
72
|
-
height:
|
|
86
|
+
width: var(--controller-large-width);
|
|
87
|
+
height: var(--controller-large-height);
|
|
73
88
|
left: 3px;
|
|
74
89
|
top: 3px;
|
|
75
90
|
}
|
package/dist/TabBar/TabBar.css
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
.bui-tab-bar {
|
|
2
|
+
--width: var(--bui-tab-bar-width, 100%);
|
|
3
|
+
--height: var(--bui-tab-bar-height, 50px);
|
|
4
|
+
--padding: var(--bui-tab-bar-padding, 6px 0);
|
|
5
|
+
--bui-tab-bar-color: var(--bui-tab-bar-default-color, var(--bui-color-fg-default));
|
|
2
6
|
display: flex;
|
|
3
|
-
width:
|
|
4
|
-
height:
|
|
5
|
-
padding:
|
|
7
|
+
width: var(--width);
|
|
8
|
+
height: var(--height);
|
|
9
|
+
padding: var(--padding);
|
|
6
10
|
background: var(--bui-color-white);
|
|
7
11
|
font-family: var(--bui-font-family);
|
|
8
12
|
}
|
package/dist/Tabs/Tab.css
CHANGED
|
@@ -4,28 +4,24 @@
|
|
|
4
4
|
justify-content: center;
|
|
5
5
|
white-space: nowrap;
|
|
6
6
|
width: min-content;
|
|
7
|
-
height:
|
|
7
|
+
height: var(--tab-height);
|
|
8
8
|
box-sizing: border-box;
|
|
9
9
|
position: relative;
|
|
10
10
|
cursor: pointer;
|
|
11
|
-
font-size: var(--
|
|
11
|
+
font-size: var(--bui-text-size-1);
|
|
12
12
|
line-height: var(--bui-line-height);
|
|
13
13
|
color: var(--color);
|
|
14
|
-
padding: var(--
|
|
14
|
+
padding: var(--tab-padding);
|
|
15
15
|
font-family: var(--bui-font-family);
|
|
16
16
|
}
|
|
17
|
-
.bui-tab-center {
|
|
18
|
-
flex: 1 0 auto;
|
|
19
|
-
margin: 0 auto;
|
|
20
|
-
}
|
|
21
17
|
.bui-tab-active {
|
|
22
|
-
font-size: var(--
|
|
18
|
+
font-size: var(--bui-text-size-1);
|
|
23
19
|
line-height: var(--bui-line-height);
|
|
24
20
|
font-weight: var(--bui-font-weight-medium);
|
|
25
21
|
color: var(--active-color);
|
|
26
22
|
}
|
|
27
23
|
.bui-tab-miniapp-active {
|
|
28
|
-
font-size: var(--
|
|
24
|
+
font-size: var(--bui-text-size-1);
|
|
29
25
|
line-height: 1.5;
|
|
30
26
|
font-weight: var(--bui-font-weight-medium);
|
|
31
27
|
color: var(--active-color);
|
|
@@ -40,7 +36,7 @@
|
|
|
40
36
|
width: 18px;
|
|
41
37
|
height: 2px;
|
|
42
38
|
transition: all 100ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
|
43
|
-
background-color: var(--
|
|
39
|
+
background-color: var(--bui-color-primary);
|
|
44
40
|
}
|
|
45
41
|
.bui-tab-disabled {
|
|
46
42
|
opacity: 0.5;
|
package/dist/Tabs/Tabs.css
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
.bui-tabs {
|
|
2
|
-
--height: 39px;
|
|
3
|
-
--
|
|
4
|
-
--color: var(--bui-color-fg-
|
|
5
|
-
--
|
|
6
|
-
--line-
|
|
7
|
-
--
|
|
8
|
-
--
|
|
2
|
+
--height: var(--bui-tabs-height, 39px);
|
|
3
|
+
--color: var(--bui-tabs-color, var(--bui-color-fg-subtle));
|
|
4
|
+
--active-color: var(--bui-tabs-active-color, var(--bui-color-fg-default));
|
|
5
|
+
--line-height: var(--bui-tabs-line-height, 3PX);
|
|
6
|
+
--line-width: var(--bui-tabs-line-width, 18px);
|
|
7
|
+
--mask-height: var(--bui-tabs-mask-height, 100%);
|
|
8
|
+
--tab-height: var(--bui-tab-height, 100%);
|
|
9
|
+
--tab-padding: var(--bui-tab-padding, var(--bui-spacing-lg) var(--bui-spacing-lg) 10px);
|
|
9
10
|
position: relative;
|
|
10
11
|
font-family: var(--bui-font-family);
|
|
11
12
|
}
|
|
@@ -28,7 +29,7 @@
|
|
|
28
29
|
bottom: 0;
|
|
29
30
|
height: var(--line-height);
|
|
30
31
|
color: var(--bui-color-primary);
|
|
31
|
-
background: var(--
|
|
32
|
+
background: var(--bui-color-primary);
|
|
32
33
|
border-radius: var(--bui-shape-radius-label);
|
|
33
34
|
}
|
|
34
35
|
.bui-tabs-content {
|
|
@@ -40,7 +41,7 @@
|
|
|
40
41
|
bottom: 0;
|
|
41
42
|
z-index: 1;
|
|
42
43
|
width: 12px;
|
|
43
|
-
height:
|
|
44
|
+
height: var(--bui-tabs-mask-height);
|
|
44
45
|
pointer-events: none;
|
|
45
46
|
}
|
|
46
47
|
.bui-tabs-mask-left {
|
package/dist/Tag/Tag.css
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
.bui-tag {
|
|
2
|
-
--color: var(--bui-tag-color, var(--bui-color-gray));
|
|
3
|
-
--border-color: var(--bui-tag-border-color, var(--bui-color-border-gray));
|
|
4
|
-
--bg-color: var(--bui-tag-bg-color, var(--bui-color-gray));
|
|
5
2
|
position: relative;
|
|
6
3
|
display: inline-flex;
|
|
7
4
|
align-items: center;
|
|
8
5
|
justify-content: center;
|
|
9
6
|
white-space: nowrap;
|
|
10
|
-
height:
|
|
11
|
-
line-height:
|
|
12
|
-
padding:
|
|
7
|
+
height: var(--tag-height);
|
|
8
|
+
line-height: var(--tag-line-height);
|
|
9
|
+
padding: var(--tag-padding);
|
|
13
10
|
font-size: var(--bui-text-size-5);
|
|
14
11
|
font-weight: var(--bui-font-weight-normal);
|
|
15
12
|
border-radius: var(--bui-shape-radius-label);
|
|
@@ -19,8 +16,8 @@
|
|
|
19
16
|
font-family: var(--bui-font-family);
|
|
20
17
|
}
|
|
21
18
|
.bui-tag-outlined {
|
|
22
|
-
color: var(--color);
|
|
23
|
-
border: 1px solid var(--border-color);
|
|
19
|
+
color: var(--tag-color);
|
|
20
|
+
border: 1px solid var(--tag-border-color);
|
|
24
21
|
}
|
|
25
22
|
.bui-tag-outlined.bui-tag-primary {
|
|
26
23
|
color: var(--bui-color-primary);
|
|
@@ -47,7 +44,7 @@
|
|
|
47
44
|
border: 1px solid var(--bui-color-border-primary);
|
|
48
45
|
}
|
|
49
46
|
.bui-tag-contained {
|
|
50
|
-
background-color: var(--bg-color);
|
|
47
|
+
background-color: var(--tag-bg-color);
|
|
51
48
|
}
|
|
52
49
|
.bui-tag-contained.bui-tag-primary {
|
|
53
50
|
background-color: var(--bui-color-primary);
|
|
@@ -92,6 +89,6 @@
|
|
|
92
89
|
color: var(--bui-color-danger);
|
|
93
90
|
}
|
|
94
91
|
.bui-tag-light.bui-tag-vip {
|
|
95
|
-
background-color:
|
|
92
|
+
background-color: var(--tag-bg-color-vip);
|
|
96
93
|
color: var(--bui-color-vip);
|
|
97
94
|
}
|
package/dist/Tag/TagGroup.css
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
.bui-tag-group {
|
|
2
|
+
--height: var(--bui-tag-group-divider-height, 13%);
|
|
3
|
+
--tag-color: var(--bui-tag-color, var(--bui-color-gray));
|
|
4
|
+
--tag-border-color: var(--bui-tag-border-color, var(--bui-color-border-gray));
|
|
5
|
+
--tag-bg-color: var(--bui-tag-bg-color, var(--bui-color-gray));
|
|
6
|
+
--tag-height: var(--bui-tag-height, 15px);
|
|
7
|
+
--tag-line-height: var(--bui-tag-line-height, 15px);
|
|
8
|
+
--tag-padding: var(--bui-tag-padding, 0 var(--bui-spacing-xs));
|
|
9
|
+
--tag-bg-color-vip: var(--bui-tag-color-vip, rgba(255, 134, 110, 0.3));
|
|
2
10
|
display: inline-flex;
|
|
3
11
|
font-family: var(--bui-font-family);
|
|
4
12
|
}
|
|
@@ -24,7 +32,7 @@
|
|
|
24
32
|
position: absolute;
|
|
25
33
|
right: -1px;
|
|
26
34
|
width: 1px;
|
|
27
|
-
height:
|
|
35
|
+
height: var(--height);
|
|
28
36
|
color: #fff;
|
|
29
37
|
background-color: #fff;
|
|
30
38
|
border-right-style: solid;
|
|
@@ -1,18 +1,28 @@
|
|
|
1
1
|
.bui-textarea {
|
|
2
|
-
--
|
|
3
|
-
--
|
|
2
|
+
--border-radius: var(--bui-textarea-border-radius, var(--bui-shape-radius-label));
|
|
3
|
+
--width: var(--bui-textarea-width, 100%);
|
|
4
|
+
--bg-color: var(--bui-textarea-background-color, var(--bui-color-bg-default));
|
|
5
|
+
--text-color: var(--bui-textarea-text-color, var(--bui-color-fg-subtle));
|
|
4
6
|
--count-bg-color: var(--bg-color, var(--bui-color-bg-default));
|
|
5
|
-
--count-text-color: var(--bui-color-fg-subtle);
|
|
7
|
+
--count-text-color: var(--bui-textarea-count-color, var(--bui-color-fg-subtle));
|
|
8
|
+
--text-font-size: var(--bui-textarea-text-font-size, var(--bui-text-size-2));
|
|
9
|
+
--count-font-size: var(--bui-textarea-count-font-size, var(--bui-title-size-3));
|
|
10
|
+
--content-padding: var(--bui-textarea-padding, 8px);
|
|
11
|
+
--count-padding: var(--bui-textarea-count-padding, 0 4px);
|
|
12
|
+
--placeholder-color: var(--bui-textarea-placeholder-color, #ced1d6);
|
|
13
|
+
--placeholder-line-height: var(--bui-textarea-placeholder-line-height, 1.3);
|
|
6
14
|
background: var(--bui-color-bg-default);
|
|
15
|
+
border-radius: var(--border-radius);
|
|
7
16
|
font-family: var(--bui-font-family);
|
|
17
|
+
overflow: hidden;
|
|
8
18
|
}
|
|
9
19
|
.bui-textarea textarea {
|
|
10
|
-
font-size: var(--
|
|
20
|
+
font-size: var(--text-font-size);
|
|
11
21
|
color: var(--text-color);
|
|
12
22
|
line-height: var(--bui-line-height);
|
|
13
23
|
}
|
|
14
24
|
.bui-textarea .bui-mini-placeholder {
|
|
15
|
-
color: var(--
|
|
25
|
+
color: var(--placeholder-color);
|
|
16
26
|
}
|
|
17
27
|
.bui-textarea-disabled {
|
|
18
28
|
pointer-events: none;
|
|
@@ -21,23 +31,23 @@
|
|
|
21
31
|
display: none;
|
|
22
32
|
}
|
|
23
33
|
.bui-textarea-content {
|
|
24
|
-
width:
|
|
34
|
+
width: var(--width);
|
|
25
35
|
resize: none;
|
|
26
|
-
background: var(--bg-color);
|
|
27
|
-
padding:
|
|
36
|
+
background-color: var(--bg-color);
|
|
37
|
+
padding: var(--content-padding);
|
|
28
38
|
border: none;
|
|
29
39
|
outline: none;
|
|
30
40
|
word-break: break-all;
|
|
31
41
|
box-sizing: border-box;
|
|
32
42
|
}
|
|
33
43
|
.bui-textarea-content::placeholder {
|
|
34
|
-
color: var(--
|
|
35
|
-
line-height:
|
|
44
|
+
color: var(--placeholder-color);
|
|
45
|
+
line-height: var(--placeholder-line-height);
|
|
36
46
|
}
|
|
37
47
|
.bui-textarea-count {
|
|
38
|
-
background: var(--count-bg-color);
|
|
48
|
+
background-color: var(--count-bg-color);
|
|
39
49
|
color: var(--count-text-color);
|
|
40
50
|
text-align: right;
|
|
41
|
-
padding:
|
|
42
|
-
font-size: var(--
|
|
51
|
+
padding: var(--count-padding);
|
|
52
|
+
font-size: var(--count-font-size);
|
|
43
53
|
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
var ThemeProvider_exports = {};
|
|
29
|
+
__export(ThemeProvider_exports, {
|
|
30
|
+
default: () => ThemeProvider_default
|
|
31
|
+
});
|
|
32
|
+
module.exports = __toCommonJS(ThemeProvider_exports);
|
|
33
|
+
var import_react = __toESM(require("react"));
|
|
34
|
+
var import_utils = require("@bifrostui/utils");
|
|
35
|
+
var import_hooks = require("./hooks");
|
|
36
|
+
var import_constants = require("./utils/constants");
|
|
37
|
+
var import_mountTokens = require("./utils/mountTokens");
|
|
38
|
+
const ThemeProvider = /* @__PURE__ */ import_react.default.forwardRef(
|
|
39
|
+
(props, ref) => {
|
|
40
|
+
var _a;
|
|
41
|
+
const {
|
|
42
|
+
isRoot,
|
|
43
|
+
locale,
|
|
44
|
+
responsive,
|
|
45
|
+
defaultLightToken,
|
|
46
|
+
defaultDarkToken,
|
|
47
|
+
dmLightToken,
|
|
48
|
+
dmDarkToken,
|
|
49
|
+
token,
|
|
50
|
+
children
|
|
51
|
+
} = props;
|
|
52
|
+
let containerId = (0, import_utils.useUniqueId)();
|
|
53
|
+
containerId = `${import_constants.BUI_VAR_PREFIX}${containerId}`;
|
|
54
|
+
const theme = (0, import_react.useMemo)(() => {
|
|
55
|
+
return { locale };
|
|
56
|
+
}, [locale]);
|
|
57
|
+
let childrenNode = children;
|
|
58
|
+
if (!isRoot && import_react.default.isValidElement(children)) {
|
|
59
|
+
childrenNode = import_react.default.cloneElement(children, {
|
|
60
|
+
className: `${containerId} ${((_a = children == null ? void 0 : children.props) == null ? void 0 : _a.className) || ""}`.trim()
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
(0, import_react.useEffect)(() => {
|
|
64
|
+
if (responsive || defaultLightToken || defaultDarkToken || dmLightToken || dmDarkToken || token) {
|
|
65
|
+
(0, import_mountTokens.mountTokens)({
|
|
66
|
+
isRoot,
|
|
67
|
+
containerId,
|
|
68
|
+
container: children,
|
|
69
|
+
responsive,
|
|
70
|
+
defaultLightToken,
|
|
71
|
+
defaultDarkToken,
|
|
72
|
+
dmLightToken,
|
|
73
|
+
dmDarkToken,
|
|
74
|
+
token
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
}, [
|
|
78
|
+
isRoot,
|
|
79
|
+
containerId,
|
|
80
|
+
responsive,
|
|
81
|
+
defaultLightToken,
|
|
82
|
+
defaultDarkToken,
|
|
83
|
+
dmLightToken,
|
|
84
|
+
dmDarkToken,
|
|
85
|
+
token
|
|
86
|
+
]);
|
|
87
|
+
return /* @__PURE__ */ import_react.default.createElement(import_hooks.ThemeContext.Provider, { value: theme }, childrenNode);
|
|
88
|
+
}
|
|
89
|
+
);
|
|
90
|
+
ThemeProvider.displayName = "BuiThemeProvider";
|
|
91
|
+
var ThemeProvider_default = ThemeProvider;
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { OverrideProps } from '@bifrostui/types';
|
|
3
|
+
import { BaseLang } from '../locales/base';
|
|
4
|
+
export type ThemeProviderProps<D extends React.ElementType = 'div', P = {}> = OverrideProps<{
|
|
5
|
+
props: P & ThemeProps;
|
|
6
|
+
defaultComponent: D;
|
|
7
|
+
}, D>;
|
|
8
|
+
export interface Breakpoints {
|
|
9
|
+
/**
|
|
10
|
+
* 超小屏幕 (小于 576px,实际为了处理临界值,断点值为 575.98px)
|
|
11
|
+
* @default '575.98px'
|
|
12
|
+
*/
|
|
13
|
+
xs?: string;
|
|
14
|
+
/**
|
|
15
|
+
* 小屏幕
|
|
16
|
+
* @default '576px'
|
|
17
|
+
*/
|
|
18
|
+
sm?: string;
|
|
19
|
+
/**
|
|
20
|
+
* 中等屏幕
|
|
21
|
+
* @default '768px'
|
|
22
|
+
*/
|
|
23
|
+
md?: string;
|
|
24
|
+
/**
|
|
25
|
+
* 大屏幕
|
|
26
|
+
* @default '992px'
|
|
27
|
+
*/
|
|
28
|
+
lg?: string;
|
|
29
|
+
/**
|
|
30
|
+
* 超大屏幕
|
|
31
|
+
* @default '1200px'
|
|
32
|
+
*/
|
|
33
|
+
xl?: string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* 响应式屏幕断点配置
|
|
37
|
+
*/
|
|
38
|
+
interface ResponsiveTokenOptions {
|
|
39
|
+
/**
|
|
40
|
+
* 超小屏幕 (小于 576px,实际为了处理临界值,断点值为 575.98px)
|
|
41
|
+
*/
|
|
42
|
+
xs?: Record<string, string>;
|
|
43
|
+
/**
|
|
44
|
+
* 小屏幕 (≥ 576px)
|
|
45
|
+
*/
|
|
46
|
+
sm?: Record<string, string>;
|
|
47
|
+
/**
|
|
48
|
+
* 中等屏幕 (≥ 768px)
|
|
49
|
+
*/
|
|
50
|
+
md?: Record<string, string>;
|
|
51
|
+
/**
|
|
52
|
+
* 大屏幕 (≥ 992px)
|
|
53
|
+
*/
|
|
54
|
+
lg?: Record<string, string>;
|
|
55
|
+
/**
|
|
56
|
+
* 超大屏幕 (≥ 1200px)
|
|
57
|
+
*/
|
|
58
|
+
xl?: Record<string, string>;
|
|
59
|
+
}
|
|
60
|
+
interface ThemeProps {
|
|
61
|
+
/**
|
|
62
|
+
* 当前ThemeProvider是否为最顶层
|
|
63
|
+
* 若当前应用会出现嵌套的ThemeProvider,则需要将最外层的ThemeProvider isRoot属性设置为true
|
|
64
|
+
* TODO 不通过属性判断
|
|
65
|
+
* @default false
|
|
66
|
+
*/
|
|
67
|
+
isRoot?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* 挂载的容器
|
|
70
|
+
* @default root
|
|
71
|
+
*/
|
|
72
|
+
container?: ReactNode;
|
|
73
|
+
/**
|
|
74
|
+
* 挂载容器的id
|
|
75
|
+
*/
|
|
76
|
+
containerId?: string;
|
|
77
|
+
/**
|
|
78
|
+
* 语言
|
|
79
|
+
*/
|
|
80
|
+
locale?: BaseLang;
|
|
81
|
+
/**
|
|
82
|
+
* 响应式屏幕断点配置
|
|
83
|
+
*/
|
|
84
|
+
responsive?: ResponsiveTokenOptions;
|
|
85
|
+
/**
|
|
86
|
+
* 默认高亮主题Token
|
|
87
|
+
*/
|
|
88
|
+
defaultLightToken?: Record<string, string>;
|
|
89
|
+
/**
|
|
90
|
+
* 默认暗黑主题Token
|
|
91
|
+
*/
|
|
92
|
+
defaultDarkToken?: Record<string, string>;
|
|
93
|
+
/**
|
|
94
|
+
* 大麦高亮主题Token
|
|
95
|
+
*/
|
|
96
|
+
dmLightToken?: Record<string, string>;
|
|
97
|
+
/**
|
|
98
|
+
* 大麦暗黑主题Token
|
|
99
|
+
*/
|
|
100
|
+
dmDarkToken?: Record<string, string>;
|
|
101
|
+
/**
|
|
102
|
+
* 组件全局Token
|
|
103
|
+
*/
|
|
104
|
+
token?: Record<string, string>;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* 复写内置主题Tokens
|
|
108
|
+
*/
|
|
109
|
+
type BuiltInThemesTokenOptions = Pick<ThemeProps, 'defaultLightToken' | 'defaultDarkToken' | 'dmLightToken' | 'dmDarkToken'>;
|
|
110
|
+
/**
|
|
111
|
+
* 挂载组件自定义Tokens参数
|
|
112
|
+
*/
|
|
113
|
+
export type MountComponentsTokenOptions = Pick<ThemeProps, 'isRoot' | 'container' | 'containerId' | 'token'>;
|
|
114
|
+
/**
|
|
115
|
+
* 挂载响应式Tokens参数
|
|
116
|
+
*/
|
|
117
|
+
type componentsTokenOptions = Pick<ThemeProps, 'token'>;
|
|
118
|
+
export type MountResponsiveTokenOptions = Pick<ThemeProps, 'responsive'> & {
|
|
119
|
+
breakpoints?: Breakpoints;
|
|
120
|
+
};
|
|
121
|
+
/**
|
|
122
|
+
* 更新Tokens
|
|
123
|
+
*/
|
|
124
|
+
export type UpdateTokensOptions = Pick<ThemeProps, 'isRoot' | 'containerId' | 'container'> & {
|
|
125
|
+
rootString: string;
|
|
126
|
+
};
|
|
127
|
+
export { BaseLang, ResponsiveTokenOptions, ThemeProps, BuiltInThemesTokenOptions, componentsTokenOptions, };
|