@superad/ui 0.1.1
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/LICENSE +21 -0
- package/README.md +42 -0
- package/es/Button/Button.d.mts +7 -0
- package/es/Button/Button.mjs +29 -0
- package/es/Button/Button.mjs.map +1 -0
- package/es/Button/index.d.mts +3 -0
- package/es/Button/index.d.ts +1 -0
- package/es/Button/index.js +1 -0
- package/es/Button/index.mjs +2 -0
- package/es/Button/style.mjs +33 -0
- package/es/Button/style.mjs.map +1 -0
- package/es/Button/type.d.mts +21 -0
- package/es/ConfigProvider/index.d.mts +9 -0
- package/es/ConfigProvider/index.d.ts +1 -0
- package/es/ConfigProvider/index.js +1 -0
- package/es/ConfigProvider/index.mjs +82 -0
- package/es/ConfigProvider/index.mjs.map +1 -0
- package/es/ConfigProvider/type.d.mts +24 -0
- package/es/DraggablePanel/DraggablePanel.d.mts +6 -0
- package/es/DraggablePanel/DraggablePanel.mjs +104 -0
- package/es/DraggablePanel/DraggablePanel.mjs.map +1 -0
- package/es/DraggablePanel/index.d.mts +3 -0
- package/es/DraggablePanel/index.d.ts +1 -0
- package/es/DraggablePanel/index.js +1 -0
- package/es/DraggablePanel/index.mjs +3 -0
- package/es/DraggablePanel/style.mjs +86 -0
- package/es/DraggablePanel/style.mjs.map +1 -0
- package/es/DraggablePanel/type.d.mts +27 -0
- package/es/Flex/Center.d.mts +7 -0
- package/es/Flex/Center.mjs +14 -0
- package/es/Flex/Center.mjs.map +1 -0
- package/es/Flex/FlexBasic.d.mts +6 -0
- package/es/Flex/FlexBasic.mjs +46 -0
- package/es/Flex/FlexBasic.mjs.map +1 -0
- package/es/Flex/Flexbox.d.mts +2 -0
- package/es/Flex/index.d.mts +5 -0
- package/es/Flex/index.d.ts +1 -0
- package/es/Flex/index.js +1 -0
- package/es/Flex/index.mjs +3 -0
- package/es/Flex/type.d.mts +35 -0
- package/es/Flex/utils.mjs +24 -0
- package/es/Flex/utils.mjs.map +1 -0
- package/es/FontLoader/index.d.mts +9 -0
- package/es/FontLoader/index.d.ts +1 -0
- package/es/FontLoader/index.js +1 -0
- package/es/FontLoader/index.mjs +23 -0
- package/es/FontLoader/index.mjs.map +1 -0
- package/es/GlobalFocusRing/index.d.mts +6 -0
- package/es/GlobalFocusRing/index.d.ts +1 -0
- package/es/GlobalFocusRing/index.js +1 -0
- package/es/GlobalFocusRing/index.mjs +204 -0
- package/es/GlobalFocusRing/index.mjs.map +1 -0
- package/es/GlobalFocusRing/style.mjs +35 -0
- package/es/GlobalFocusRing/style.mjs.map +1 -0
- package/es/Provider.d.mts +5 -0
- package/es/Table/canvas/canvasPalette.mjs +11 -0
- package/es/Table/canvas/canvasPalette.mjs.map +1 -0
- package/es/Table/canvas/chipPainters.mjs +408 -0
- package/es/Table/canvas/chipPainters.mjs.map +1 -0
- package/es/Table/canvas/controlPainters.mjs +193 -0
- package/es/Table/canvas/controlPainters.mjs.map +1 -0
- package/es/Table/canvas/groupTitle.mjs +181 -0
- package/es/Table/canvas/groupTitle.mjs.map +1 -0
- package/es/Table/canvas/paintUtils.mjs +70 -0
- package/es/Table/canvas/paintUtils.mjs.map +1 -0
- package/es/Table/canvas/rowSeries.mjs +130 -0
- package/es/Table/canvas/rowSeries.mjs.map +1 -0
- package/es/Table/canvas/textPainters.mjs +97 -0
- package/es/Table/canvas/textPainters.mjs.map +1 -0
- package/es/Table/canvas/theme.d.mts +14 -0
- package/es/Table/canvas/theme.mjs +276 -0
- package/es/Table/canvas/theme.mjs.map +1 -0
- package/es/Table/core/cellValue.d.mts +1 -0
- package/es/Table/core/cellValue.mjs +240 -0
- package/es/Table/core/cellValue.mjs.map +1 -0
- package/es/Table/core/rowSelection.mjs +138 -0
- package/es/Table/core/rowSelection.mjs.map +1 -0
- package/es/Table/core/size.mjs +60 -0
- package/es/Table/core/size.mjs.map +1 -0
- package/es/Table/core/tableI18n.d.mts +11 -0
- package/es/Table/core/tableI18n.mjs +123 -0
- package/es/Table/core/tableI18n.mjs.map +1 -0
- package/es/Table/core/tagTone.mjs +245 -0
- package/es/Table/core/tagTone.mjs.map +1 -0
- package/es/Table/core/zIndex.mjs +7 -0
- package/es/Table/core/zIndex.mjs.map +1 -0
- package/es/Table/index.d.mts +6 -0
- package/es/Table/index.d.ts +1 -0
- package/es/Table/index.js +1 -0
- package/es/Table/index.mjs +6 -0
- package/es/Table/react/Table.d.mts +9 -0
- package/es/Table/react/Table.mjs +407 -0
- package/es/Table/react/Table.mjs.map +1 -0
- package/es/Table/react/TableColumnSettings.mjs +65 -0
- package/es/Table/react/TableColumnSettings.mjs.map +1 -0
- package/es/Table/react/a11y.mjs +72 -0
- package/es/Table/react/a11y.mjs.map +1 -0
- package/es/Table/react/editors/base.mjs +427 -0
- package/es/Table/react/editors/base.mjs.map +1 -0
- package/es/Table/react/editors/inline.mjs +225 -0
- package/es/Table/react/editors/inline.mjs.map +1 -0
- package/es/Table/react/editors/picker.mjs +368 -0
- package/es/Table/react/editors/picker.mjs.map +1 -0
- package/es/Table/react/overlayChips.mjs +50 -0
- package/es/Table/react/overlayChips.mjs.map +1 -0
- package/es/Table/react/sameRenderInputs.mjs +50 -0
- package/es/Table/react/sameRenderInputs.mjs.map +1 -0
- package/es/Table/react/style.mjs +650 -0
- package/es/Table/react/style.mjs.map +1 -0
- package/es/Table/react/useTableCellEvents.mjs +32 -0
- package/es/Table/react/useTableCellEvents.mjs.map +1 -0
- package/es/Table/react/useTableColumnSettings.mjs +107 -0
- package/es/Table/react/useTableColumnSettings.mjs.map +1 -0
- package/es/Table/react/useTableEditorSync.mjs +41 -0
- package/es/Table/react/useTableEditorSync.mjs.map +1 -0
- package/es/Table/react/useTableHoverHint.mjs +62 -0
- package/es/Table/react/useTableHoverHint.mjs.map +1 -0
- package/es/Table/react/useTableKeyboard.mjs +41 -0
- package/es/Table/react/useTableKeyboard.mjs.map +1 -0
- package/es/Table/react/useTableRenderState.mjs +194 -0
- package/es/Table/react/useTableRenderState.mjs.map +1 -0
- package/es/Table/react/useTableScroll.mjs +33 -0
- package/es/Table/react/useTableScroll.mjs.map +1 -0
- package/es/Table/react/useTableSelectionInfo.mjs +48 -0
- package/es/Table/react/useTableSelectionInfo.mjs.map +1 -0
- package/es/Table/react/useTableVTableEvents.mjs +132 -0
- package/es/Table/react/useTableVTableEvents.mjs.map +1 -0
- package/es/Table/type.d.mts +279 -0
- package/es/Table/type.mjs +34 -0
- package/es/Table/type.mjs.map +1 -0
- package/es/Table/vtable/columns.d.mts +17 -0
- package/es/Table/vtable/columns.mjs +381 -0
- package/es/Table/vtable/columns.mjs.map +1 -0
- package/es/Table/vtable/frozenShadow.mjs +27 -0
- package/es/Table/vtable/frozenShadow.mjs.map +1 -0
- package/es/Table/vtable/interaction.mjs +175 -0
- package/es/Table/vtable/interaction.mjs.map +1 -0
- package/es/Table/vtable/option.d.mts +39 -0
- package/es/Table/vtable/option.mjs +232 -0
- package/es/Table/vtable/option.mjs.map +1 -0
- package/es/Table/vtable/seriesSelection.mjs +374 -0
- package/es/Table/vtable/seriesSelection.mjs.map +1 -0
- package/es/Table/vtable/vtableAdapter.mjs +96 -0
- package/es/Table/vtable/vtableAdapter.mjs.map +1 -0
- package/es/ThemeProvider/AppElementContext.d.mts +5 -0
- package/es/ThemeProvider/AppElementContext.mjs +10 -0
- package/es/ThemeProvider/AppElementContext.mjs.map +1 -0
- package/es/ThemeProvider/ConfigProvider.mjs +29 -0
- package/es/ThemeProvider/ConfigProvider.mjs.map +1 -0
- package/es/ThemeProvider/GlobalStyle/antdOverride.mjs +73 -0
- package/es/ThemeProvider/GlobalStyle/antdOverride.mjs.map +1 -0
- package/es/ThemeProvider/GlobalStyle/essential.mjs +50 -0
- package/es/ThemeProvider/GlobalStyle/essential.mjs.map +1 -0
- package/es/ThemeProvider/GlobalStyle/global.mjs +90 -0
- package/es/ThemeProvider/GlobalStyle/global.mjs.map +1 -0
- package/es/ThemeProvider/GlobalStyle/index.mjs +14 -0
- package/es/ThemeProvider/GlobalStyle/index.mjs.map +1 -0
- package/es/ThemeProvider/Meta.d.mts +7 -0
- package/es/ThemeProvider/Meta.mjs +48 -0
- package/es/ThemeProvider/Meta.mjs.map +1 -0
- package/es/ThemeProvider/ThemeProvider.d.mts +6 -0
- package/es/ThemeProvider/ThemeProvider.mjs +89 -0
- package/es/ThemeProvider/ThemeProvider.mjs.map +1 -0
- package/es/ThemeProvider/constants.d.mts +5 -0
- package/es/ThemeProvider/constants.mjs +6 -0
- package/es/ThemeProvider/constants.mjs.map +1 -0
- package/es/ThemeProvider/index.d.mts +6 -0
- package/es/ThemeProvider/index.d.ts +1 -0
- package/es/ThemeProvider/index.js +1 -0
- package/es/ThemeProvider/index.mjs +5 -0
- package/es/ThemeProvider/type.d.mts +48 -0
- package/es/_virtual/_rolldown/runtime.mjs +13 -0
- package/es/color/colors/blue.d.mts +6 -0
- package/es/color/colors/blue.mjs +67 -0
- package/es/color/colors/blue.mjs.map +1 -0
- package/es/color/colors/cyan.d.mts +6 -0
- package/es/color/colors/cyan.mjs +67 -0
- package/es/color/colors/cyan.mjs.map +1 -0
- package/es/color/colors/geekblue.d.mts +6 -0
- package/es/color/colors/geekblue.mjs +67 -0
- package/es/color/colors/geekblue.mjs.map +1 -0
- package/es/color/colors/gold.d.mts +6 -0
- package/es/color/colors/gold.mjs +67 -0
- package/es/color/colors/gold.mjs.map +1 -0
- package/es/color/colors/gray.d.mts +6 -0
- package/es/color/colors/gray.mjs +67 -0
- package/es/color/colors/gray.mjs.map +1 -0
- package/es/color/colors/green.d.mts +6 -0
- package/es/color/colors/green.mjs +67 -0
- package/es/color/colors/green.mjs.map +1 -0
- package/es/color/colors/index.d.mts +22 -0
- package/es/color/colors/index.mjs +35 -0
- package/es/color/colors/index.mjs.map +1 -0
- package/es/color/colors/lime.d.mts +6 -0
- package/es/color/colors/lime.mjs +67 -0
- package/es/color/colors/lime.mjs.map +1 -0
- package/es/color/colors/magenta.d.mts +6 -0
- package/es/color/colors/magenta.mjs +67 -0
- package/es/color/colors/magenta.mjs.map +1 -0
- package/es/color/colors/orange.d.mts +6 -0
- package/es/color/colors/orange.mjs +67 -0
- package/es/color/colors/orange.mjs.map +1 -0
- package/es/color/colors/primary.d.mts +6 -0
- package/es/color/colors/primary.mjs +67 -0
- package/es/color/colors/primary.mjs.map +1 -0
- package/es/color/colors/purple.d.mts +6 -0
- package/es/color/colors/purple.mjs +67 -0
- package/es/color/colors/purple.mjs.map +1 -0
- package/es/color/colors/red.d.mts +6 -0
- package/es/color/colors/red.mjs +67 -0
- package/es/color/colors/red.mjs.map +1 -0
- package/es/color/colors/volcano.d.mts +6 -0
- package/es/color/colors/volcano.mjs +67 -0
- package/es/color/colors/volcano.mjs.map +1 -0
- package/es/color/colors/yellow.d.mts +6 -0
- package/es/color/colors/yellow.mjs +67 -0
- package/es/color/colors/yellow.mjs.map +1 -0
- package/es/color/index.d.mts +23 -0
- package/es/color/index.d.ts +1 -0
- package/es/color/index.js +1 -0
- package/es/color/index.mjs +22 -0
- package/es/color/neutrals/index.d.mts +13 -0
- package/es/color/neutrals/index.mjs +17 -0
- package/es/color/neutrals/index.mjs.map +1 -0
- package/es/color/neutrals/mauve.d.mts +6 -0
- package/es/color/neutrals/mauve.mjs +67 -0
- package/es/color/neutrals/mauve.mjs.map +1 -0
- package/es/color/neutrals/olive.d.mts +6 -0
- package/es/color/neutrals/olive.mjs +67 -0
- package/es/color/neutrals/olive.mjs.map +1 -0
- package/es/color/neutrals/sage.d.mts +6 -0
- package/es/color/neutrals/sage.mjs +67 -0
- package/es/color/neutrals/sage.mjs.map +1 -0
- package/es/color/neutrals/sand.d.mts +6 -0
- package/es/color/neutrals/sand.mjs +67 -0
- package/es/color/neutrals/sand.mjs.map +1 -0
- package/es/color/neutrals/slate.d.mts +6 -0
- package/es/color/neutrals/slate.mjs +67 -0
- package/es/color/neutrals/slate.mjs.map +1 -0
- package/es/color/types.d.mts +16 -0
- package/es/eslint/index.d.mts +26 -0
- package/es/eslint/index.d.ts +1 -0
- package/es/eslint/index.js +1 -0
- package/es/eslint/index.mjs +11 -0
- package/es/eslint/index.mjs.map +1 -0
- package/es/hooks/useIsClient.d.mts +8 -0
- package/es/hooks/useIsClient.mjs +13 -0
- package/es/hooks/useIsClient.mjs.map +1 -0
- package/es/i18n/context.d.mts +7 -0
- package/es/i18n/context.mjs +16 -0
- package/es/i18n/context.mjs.map +1 -0
- package/es/i18n/index.d.mts +6 -0
- package/es/i18n/index.d.ts +1 -0
- package/es/i18n/index.js +1 -0
- package/es/i18n/index.mjs +5 -0
- package/es/i18n/resources/en/common.d.mts +35 -0
- package/es/i18n/resources/en/common.mjs +36 -0
- package/es/i18n/resources/en/common.mjs.map +1 -0
- package/es/i18n/resources/en/index.d.mts +7 -0
- package/es/i18n/resources/en/index.mjs +8 -0
- package/es/i18n/resources/en/index.mjs.map +1 -0
- package/es/i18n/resources/zhCn/common.d.mts +35 -0
- package/es/i18n/resources/zhCn/common.mjs +36 -0
- package/es/i18n/resources/zhCn/common.mjs.map +1 -0
- package/es/i18n/resources/zhCn/index.d.mts +7 -0
- package/es/i18n/resources/zhCn/index.mjs +8 -0
- package/es/i18n/resources/zhCn/index.mjs.map +1 -0
- package/es/i18n/types.d.mts +22 -0
- package/es/i18n/useTranslation.d.mts +12 -0
- package/es/i18n/useTranslation.mjs +22 -0
- package/es/i18n/useTranslation.mjs.map +1 -0
- package/es/index.d.mts +43 -0
- package/es/index.mjs +26 -0
- package/es/storybook/StoryBook/StoryBook.d.mts +7 -0
- package/es/storybook/StoryBook/StoryBook.mjs +52 -0
- package/es/storybook/StoryBook/StoryBook.mjs.map +1 -0
- package/es/storybook/StoryBook/index.d.mts +3 -0
- package/es/storybook/StoryBook/style.mjs +97 -0
- package/es/storybook/StoryBook/style.mjs.map +1 -0
- package/es/storybook/StoryBook/type.d.mts +13 -0
- package/es/storybook/index.d.mts +4 -0
- package/es/storybook/index.d.ts +1 -0
- package/es/storybook/index.js +1 -0
- package/es/storybook/index.mjs +2 -0
- package/es/styles/classNames.d.mts +11 -0
- package/es/styles/classNames.mjs +12 -0
- package/es/styles/classNames.mjs.map +1 -0
- package/es/styles/customTheme.d.mts +36 -0
- package/es/styles/customTheme.mjs +71 -0
- package/es/styles/customTheme.mjs.map +1 -0
- package/es/styles/index.d.mts +6 -0
- package/es/styles/index.d.ts +1 -0
- package/es/styles/index.js +1 -0
- package/es/styles/index.mjs +6 -0
- package/es/styles/theme/algorithms/darkAlgorithm.mjs +18 -0
- package/es/styles/theme/algorithms/darkAlgorithm.mjs.map +1 -0
- package/es/styles/theme/algorithms/lightAlgorithm.mjs +18 -0
- package/es/styles/theme/algorithms/lightAlgorithm.mjs.map +1 -0
- package/es/styles/theme/algorithms/resolveScales.mjs +25 -0
- package/es/styles/theme/algorithms/resolveScales.mjs.map +1 -0
- package/es/styles/theme/antdTheme.mjs +31 -0
- package/es/styles/theme/antdTheme.mjs.map +1 -0
- package/es/styles/theme/customStylish.d.mts +7 -0
- package/es/styles/theme/customStylish.mjs +158 -0
- package/es/styles/theme/customStylish.mjs.map +1 -0
- package/es/styles/theme/customStylishStatic.d.mts +6 -0
- package/es/styles/theme/customStylishStatic.mjs +156 -0
- package/es/styles/theme/customStylishStatic.mjs.map +1 -0
- package/es/styles/theme/customToken.d.mts +7 -0
- package/es/styles/theme/customToken.mjs +127 -0
- package/es/styles/theme/customToken.mjs.map +1 -0
- package/es/styles/theme/generateColorPalette.d.mts +16 -0
- package/es/styles/theme/generateColorPalette.mjs +170 -0
- package/es/styles/theme/generateColorPalette.mjs.map +1 -0
- package/es/styles/theme/token/base.mjs +64 -0
- package/es/styles/theme/token/base.mjs.map +1 -0
- package/es/styles/theme/token/dark.mjs +37 -0
- package/es/styles/theme/token/dark.mjs.map +1 -0
- package/es/styles/theme/token/light.mjs +37 -0
- package/es/styles/theme/token/light.mjs.map +1 -0
- package/es/types/customStylish.d.mts +28 -0
- package/es/types/customToken.d.mts +34 -0
- package/es/types/customToken.mjs +32 -0
- package/es/types/customToken.mjs.map +1 -0
- package/es/types/index.d.mts +15 -0
- package/es/types/index.d.ts +1 -0
- package/es/types/index.js +1 -0
- package/es/types/index.mjs +2 -0
- package/es/utils/composeEventHandlers.d.mts +5 -0
- package/es/utils/composeEventHandlers.mjs +10 -0
- package/es/utils/composeEventHandlers.mjs.map +1 -0
- package/es/utils/copyToClipboard.d.mts +5 -0
- package/es/utils/copyToClipboard.mjs +28 -0
- package/es/utils/copyToClipboard.mjs.map +1 -0
- package/es/utils/dom.d.mts +15 -0
- package/es/utils/dom.mjs +16 -0
- package/es/utils/dom.mjs.map +1 -0
- package/es/utils/genCdnUrl.d.mts +12 -0
- package/es/utils/genCdnUrl.mjs +17 -0
- package/es/utils/genCdnUrl.mjs.map +1 -0
- package/es/utils/safeReadableColor.mjs +6 -0
- package/es/utils/safeReadableColor.mjs.map +1 -0
- package/package.json +96 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
//#region src/i18n/resources/zhCn/common.ts
|
|
2
|
+
var common_default = {
|
|
3
|
+
"common.cancel": "取消",
|
|
4
|
+
"common.confirm": "确认",
|
|
5
|
+
"common.delete": "删除",
|
|
6
|
+
"common.edit": "编辑",
|
|
7
|
+
"common.empty": "(空)",
|
|
8
|
+
"table.addByEnter": "回车添加",
|
|
9
|
+
"table.address.city": "城市",
|
|
10
|
+
"table.address.country": "国家",
|
|
11
|
+
"table.address.postcode": "邮编",
|
|
12
|
+
"table.address.state": "州/省",
|
|
13
|
+
"table.address.street": "街道",
|
|
14
|
+
"table.address.street2": "地址2",
|
|
15
|
+
"table.clearSelection": "取消选择",
|
|
16
|
+
"table.copy": "复制",
|
|
17
|
+
"table.endDate": "结束日期",
|
|
18
|
+
"table.fieldSettings": "字段设置",
|
|
19
|
+
"table.hideColumn": "隐藏 {title}",
|
|
20
|
+
"table.moveLeft": "左移",
|
|
21
|
+
"table.moveRight": "右移",
|
|
22
|
+
"table.noMatch": "无匹配项",
|
|
23
|
+
"table.pickDate": "选择日期",
|
|
24
|
+
"table.remove": "移除 {label}",
|
|
25
|
+
"table.search": "搜索",
|
|
26
|
+
"table.searchPeople": "搜索人员或群组…",
|
|
27
|
+
"table.selectedRows": "已选 {count} 行",
|
|
28
|
+
"table.set": "设置",
|
|
29
|
+
"table.setField": "设置 {title}",
|
|
30
|
+
"table.showColumn": "显示 {title}",
|
|
31
|
+
"table.startDate": "开始日期"
|
|
32
|
+
};
|
|
33
|
+
//#endregion
|
|
34
|
+
export { common_default as default };
|
|
35
|
+
|
|
36
|
+
//# sourceMappingURL=common.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.mjs","names":[],"sources":["../../../../src/i18n/resources/zhCn/common.ts"],"sourcesContent":["export default {\n 'common.cancel': '取消',\n 'common.confirm': '确认',\n 'common.delete': '删除',\n 'common.edit': '编辑',\n 'common.empty': '(空)',\n 'table.addByEnter': '回车添加',\n 'table.address.city': '城市',\n 'table.address.country': '国家',\n 'table.address.postcode': '邮编',\n 'table.address.state': '州/省',\n 'table.address.street': '街道',\n 'table.address.street2': '地址2',\n 'table.clearSelection': '取消选择',\n 'table.copy': '复制',\n 'table.endDate': '结束日期',\n 'table.fieldSettings': '字段设置',\n 'table.hideColumn': '隐藏 {title}',\n 'table.moveLeft': '左移',\n 'table.moveRight': '右移',\n 'table.noMatch': '无匹配项',\n 'table.pickDate': '选择日期',\n 'table.remove': '移除 {label}',\n 'table.search': '搜索',\n 'table.searchPeople': '搜索人员或群组…',\n 'table.selectedRows': '已选 {count} 行',\n 'table.set': '设置',\n 'table.setField': '设置 {title}',\n 'table.showColumn': '显示 {title}',\n 'table.startDate': '开始日期',\n} as const;\n"],"mappings":";AAAA,IAAA,iBAAe;CACb,iBAAiB;CACjB,kBAAkB;CAClB,iBAAiB;CACjB,eAAe;CACf,gBAAgB;CAChB,oBAAoB;CACpB,sBAAsB;CACtB,yBAAyB;CACzB,0BAA0B;CAC1B,uBAAuB;CACvB,wBAAwB;CACxB,yBAAyB;CACzB,wBAAwB;CACxB,cAAc;CACd,iBAAiB;CACjB,uBAAuB;CACvB,oBAAoB;CACpB,kBAAkB;CAClB,mBAAmB;CACnB,iBAAiB;CACjB,kBAAkB;CAClB,gBAAgB;CAChB,gBAAgB;CAChB,sBAAsB;CACtB,sBAAsB;CACtB,aAAa;CACb,kBAAkB;CAClB,oBAAoB;CACpB,mBAAmB;AACrB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { __exportAll } from "../../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
import common_default from "./common.mjs";
|
|
3
|
+
//#region src/i18n/resources/zhCn/index.ts
|
|
4
|
+
var zhCn_exports = /* @__PURE__ */ __exportAll({ common: () => common_default });
|
|
5
|
+
//#endregion
|
|
6
|
+
export { common_default as common, zhCn_exports };
|
|
7
|
+
|
|
8
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../src/i18n/resources/zhCn/index.ts"],"sourcesContent":["export { default as common } from './common';\n"],"mappings":""}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import _default from "./resources/en/common.mjs";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
//#region src/i18n/types.d.ts
|
|
4
|
+
type Locale = string;
|
|
5
|
+
type BuiltinTranslationResources = typeof _default;
|
|
6
|
+
type TranslationKey = keyof BuiltinTranslationResources;
|
|
7
|
+
type TranslationValue = string;
|
|
8
|
+
type TranslationResources = Partial<Record<TranslationKey, TranslationValue>>;
|
|
9
|
+
type TranslationResourcesMap = TranslationResources[] | Record<string, TranslationResources>;
|
|
10
|
+
type TranslationResourcesInput = TranslationResourcesMap | Promise<TranslationResourcesMap>;
|
|
11
|
+
type I18nContextValue = {
|
|
12
|
+
locale: Locale;
|
|
13
|
+
t: (key: TranslationKey) => string;
|
|
14
|
+
};
|
|
15
|
+
interface I18nProviderProps {
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
locale?: string;
|
|
18
|
+
resources?: TranslationResourcesInput;
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
export { I18nContextValue, I18nProviderProps, Locale, TranslationKey, TranslationResources, TranslationResourcesInput, TranslationResourcesMap, TranslationValue };
|
|
22
|
+
//# sourceMappingURL=types.d.mts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TranslationKey, TranslationResources } from "./types.mjs";
|
|
2
|
+
//#region src/i18n/useTranslation.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* 取上下文里的翻译函数;传入兜底资源时,key 未翻译(返回值等于 key)就用兜底文案。
|
|
5
|
+
*/
|
|
6
|
+
declare const useTranslation: (fallbackResources?: TranslationResources) => {
|
|
7
|
+
locale: string;
|
|
8
|
+
t: (key: TranslationKey) => string;
|
|
9
|
+
};
|
|
10
|
+
//#endregion
|
|
11
|
+
export { useTranslation };
|
|
12
|
+
//# sourceMappingURL=useTranslation.d.mts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { useI18n } from "../ConfigProvider/index.mjs";
|
|
2
|
+
import { useCallback } from "react";
|
|
3
|
+
//#region src/i18n/useTranslation.ts
|
|
4
|
+
/**
|
|
5
|
+
* 取上下文里的翻译函数;传入兜底资源时,key 未翻译(返回值等于 key)就用兜底文案。
|
|
6
|
+
*/
|
|
7
|
+
const useTranslation = (fallbackResources) => {
|
|
8
|
+
const { t, locale } = useI18n();
|
|
9
|
+
return {
|
|
10
|
+
locale,
|
|
11
|
+
t: useCallback((key) => {
|
|
12
|
+
if (!fallbackResources) return t(key);
|
|
13
|
+
const value = t(key);
|
|
14
|
+
const fallback = fallbackResources[key];
|
|
15
|
+
return value === key && fallback ? fallback : value;
|
|
16
|
+
}, [t, fallbackResources])
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
//#endregion
|
|
20
|
+
export { useTranslation };
|
|
21
|
+
|
|
22
|
+
//# sourceMappingURL=useTranslation.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTranslation.mjs","names":[],"sources":["../../src/i18n/useTranslation.ts"],"sourcesContent":["import { useCallback } from 'react';\n\nimport { useI18n } from '@/ConfigProvider';\n\nimport type { TranslationKey, TranslationResources } from './types';\n\n/**\n * 取上下文里的翻译函数;传入兜底资源时,key 未翻译(返回值等于 key)就用兜底文案。\n */\nexport const useTranslation = (fallbackResources?: TranslationResources) => {\n const { t, locale } = useI18n();\n\n const translate = useCallback(\n (key: TranslationKey): string => {\n if (!fallbackResources) return t(key);\n const value = t(key);\n const fallback = fallbackResources[key];\n return value === key && fallback ? fallback : value;\n },\n [t, fallbackResources],\n );\n\n return { locale, t: translate };\n};\n"],"mappings":";;;;;;AASA,MAAa,kBAAkB,sBAA6C;CAC1E,MAAM,EAAE,GAAG,WAAW,QAAQ;CAY9B,OAAO;EAAE;EAAQ,GAVC,aACf,QAAgC;GAC/B,IAAI,CAAC,mBAAmB,OAAO,EAAE,GAAG;GACpC,MAAM,QAAQ,EAAE,GAAG;GACnB,MAAM,WAAW,kBAAkB;GACnC,OAAO,UAAU,OAAO,WAAW,WAAW;EAChD,GACA,CAAC,GAAG,iBAAiB,CAGK;CAAE;AAChC"}
|
package/es/index.d.mts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { ButtonProps } from "./Button/type.mjs";
|
|
2
|
+
import Button from "./Button/Button.mjs";
|
|
3
|
+
import "./Button/index.mjs";
|
|
4
|
+
import { DraggablePanelPlacement, DraggablePanelProps } from "./DraggablePanel/type.mjs";
|
|
5
|
+
import DraggablePanel from "./DraggablePanel/DraggablePanel.mjs";
|
|
6
|
+
import "./DraggablePanel/index.mjs";
|
|
7
|
+
import { CenterProps, FlexBasicProps, FlexboxProps } from "./Flex/type.mjs";
|
|
8
|
+
import Center from "./Flex/Center.mjs";
|
|
9
|
+
import _default from "./Flex/FlexBasic.mjs";
|
|
10
|
+
import "./Flex/index.mjs";
|
|
11
|
+
import { installGlobalFocusRing } from "./GlobalFocusRing/index.mjs";
|
|
12
|
+
import { TableCellType, TableColumn, TableColumnInput, TableProps, TableRecord, TableSelectOption, TableUser } from "./Table/type.mjs";
|
|
13
|
+
import Table from "./Table/react/Table.mjs";
|
|
14
|
+
import "./Table/index.mjs";
|
|
15
|
+
import { useAppElement } from "./ThemeProvider/AppElementContext.mjs";
|
|
16
|
+
import { SUPERAD_THEME_APP_ID } from "./ThemeProvider/constants.mjs";
|
|
17
|
+
import { NeutralColors, NeutralColorsObj, PrimaryColors, PrimaryColorsObj, findCustomThemeName, neutralColors, neutralColorsSwatches, primaryColors, primaryColorsSwatches } from "./styles/customTheme.mjs";
|
|
18
|
+
import { SuperadCustomStylish } from "./types/customStylish.mjs";
|
|
19
|
+
import { generateCustomStylish } from "./styles/theme/customStylish.mjs";
|
|
20
|
+
import { staticStylish } from "./styles/theme/customStylishStatic.mjs";
|
|
21
|
+
import { ColorPalettes, ColorPalettesAlpha, ColorToken, PresetColorKey, PresetColorType, PresetColors, PresetSystemColorKey, PresetSystemColorType, PresetSystemColors, SuperadCustomToken, SystemColorToken } from "./types/customToken.mjs";
|
|
22
|
+
import { generateCustomToken } from "./styles/theme/customToken.mjs";
|
|
23
|
+
import { generateColorNeutralPalette, generateColorPalette } from "./styles/theme/generateColorPalette.mjs";
|
|
24
|
+
import "./styles/index.mjs";
|
|
25
|
+
import { MetaProps, ThemeProviderProps } from "./ThemeProvider/type.mjs";
|
|
26
|
+
import Meta from "./ThemeProvider/Meta.mjs";
|
|
27
|
+
import ThemeProvider from "./ThemeProvider/ThemeProvider.mjs";
|
|
28
|
+
import "./ThemeProvider/index.mjs";
|
|
29
|
+
import { I18nProviderProps } from "./i18n/types.mjs";
|
|
30
|
+
import { CDN, genCdnUrl } from "./utils/genCdnUrl.mjs";
|
|
31
|
+
import { Config } from "./ConfigProvider/type.mjs";
|
|
32
|
+
import ConfigProvider, { useCdnFn, useI18n } from "./ConfigProvider/index.mjs";
|
|
33
|
+
import { I18nProvider } from "./i18n/context.mjs";
|
|
34
|
+
import { useTranslation } from "./i18n/useTranslation.mjs";
|
|
35
|
+
import FontLoader, { FontLoaderProps } from "./FontLoader/index.mjs";
|
|
36
|
+
import { useIsClient } from "./hooks/useIsClient.mjs";
|
|
37
|
+
import "./Provider.mjs";
|
|
38
|
+
import { CLASSNAMES } from "./styles/classNames.mjs";
|
|
39
|
+
import { AProps, DivProps, ImgProps, InputProps, SpanProps, SvgProps, TextAreaProps, VideoProps } from "./types/index.mjs";
|
|
40
|
+
import { composeEventHandlers } from "./utils/composeEventHandlers.mjs";
|
|
41
|
+
import { copyToClipboard } from "./utils/copyToClipboard.mjs";
|
|
42
|
+
import { preventDefault, preventDefaultAndStopPropagation, stopPropagation } from "./utils/dom.mjs";
|
|
43
|
+
export { type AProps, Button, type ButtonProps, type CDN, CLASSNAMES, Center, type CenterProps, type ColorPalettes, type ColorPalettesAlpha, type ColorToken, type Config, ConfigProvider, type DivProps, DraggablePanel, type DraggablePanelPlacement, type DraggablePanelProps, _default as FlexBasic, type FlexBasicProps, _default as Flexbox, type FlexboxProps, FontLoader, type FontLoaderProps, I18nProvider, type I18nProviderProps, type ImgProps, type InputProps, Meta, type MetaProps, NeutralColors, NeutralColorsObj, type PresetColorKey, type PresetColorType, type PresetColors, type PresetSystemColorKey, type PresetSystemColorType, type PresetSystemColors, PrimaryColors, PrimaryColorsObj, SUPERAD_THEME_APP_ID, type SpanProps, type SuperadCustomStylish, type SuperadCustomToken, I18nProvider as SuperadUIProvider, type SvgProps, type SystemColorToken, Table, type TableCellType, type TableColumn, type TableColumnInput, type TableProps, type TableRecord, type TableSelectOption, type TableUser, type TextAreaProps, ThemeProvider, type ThemeProviderProps, type VideoProps, composeEventHandlers, copyToClipboard, findCustomThemeName, genCdnUrl, generateColorNeutralPalette, generateColorPalette, installGlobalFocusRing, neutralColors, neutralColorsSwatches, preventDefault, preventDefaultAndStopPropagation, primaryColors, primaryColorsSwatches, stopPropagation, generateCustomStylish as superadCustomStylish, generateCustomToken as superadCustomToken, staticStylish as superadStaticStylish, useAppElement, useCdnFn, useI18n, useIsClient, useTranslation };
|
package/es/index.mjs
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { findCustomThemeName, neutralColors, neutralColorsSwatches, primaryColors, primaryColorsSwatches } from "./styles/customTheme.mjs";
|
|
2
|
+
import { generateCustomStylish } from "./styles/theme/customStylish.mjs";
|
|
3
|
+
import { staticStylish } from "./styles/theme/customStylishStatic.mjs";
|
|
4
|
+
import { generateCustomToken } from "./styles/theme/customToken.mjs";
|
|
5
|
+
import { generateColorNeutralPalette, generateColorPalette } from "./styles/theme/generateColorPalette.mjs";
|
|
6
|
+
import Button from "./Button/Button.mjs";
|
|
7
|
+
import { installGlobalFocusRing } from "./GlobalFocusRing/index.mjs";
|
|
8
|
+
import { genCdnUrl } from "./utils/genCdnUrl.mjs";
|
|
9
|
+
import ConfigProvider, { useCdnFn, useI18n } from "./ConfigProvider/index.mjs";
|
|
10
|
+
import DraggablePanel from "./DraggablePanel/DraggablePanel.mjs";
|
|
11
|
+
import FlexBasic_default from "./Flex/FlexBasic.mjs";
|
|
12
|
+
import Center from "./Flex/Center.mjs";
|
|
13
|
+
import FontLoader from "./FontLoader/index.mjs";
|
|
14
|
+
import { useIsClient } from "./hooks/useIsClient.mjs";
|
|
15
|
+
import { I18nProvider } from "./i18n/context.mjs";
|
|
16
|
+
import { useTranslation } from "./i18n/useTranslation.mjs";
|
|
17
|
+
import { CLASSNAMES } from "./styles/classNames.mjs";
|
|
18
|
+
import { copyToClipboard } from "./utils/copyToClipboard.mjs";
|
|
19
|
+
import Table from "./Table/react/Table.mjs";
|
|
20
|
+
import { useAppElement } from "./ThemeProvider/AppElementContext.mjs";
|
|
21
|
+
import { SUPERAD_THEME_APP_ID } from "./ThemeProvider/constants.mjs";
|
|
22
|
+
import Meta from "./ThemeProvider/Meta.mjs";
|
|
23
|
+
import ThemeProvider from "./ThemeProvider/ThemeProvider.mjs";
|
|
24
|
+
import { composeEventHandlers } from "./utils/composeEventHandlers.mjs";
|
|
25
|
+
import { preventDefault, preventDefaultAndStopPropagation, stopPropagation } from "./utils/dom.mjs";
|
|
26
|
+
export { Button, CLASSNAMES, Center, ConfigProvider, DraggablePanel, FlexBasic_default as FlexBasic, FlexBasic_default as Flexbox, FontLoader, I18nProvider, Meta, SUPERAD_THEME_APP_ID, I18nProvider as SuperadUIProvider, Table, ThemeProvider, composeEventHandlers, copyToClipboard, findCustomThemeName, genCdnUrl, generateColorNeutralPalette, generateColorPalette, installGlobalFocusRing, neutralColors, neutralColorsSwatches, preventDefault, preventDefaultAndStopPropagation, primaryColors, primaryColorsSwatches, stopPropagation, generateCustomStylish as superadCustomStylish, generateCustomToken as superadCustomToken, staticStylish as superadStaticStylish, useAppElement, useCdnFn, useI18n, useIsClient, useTranslation };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { StoryBookProps } from "./type.mjs";
|
|
2
|
+
import { useControls, useCreateStore } from "leva";
|
|
3
|
+
//#region src/storybook/StoryBook/StoryBook.d.ts
|
|
4
|
+
declare const StoryBook: import("react").NamedExoticComponent<StoryBookProps>;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { StoryBook, StoryBook as default, useControls, useCreateStore };
|
|
7
|
+
//# sourceMappingURL=StoryBook.d.mts.map
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import DraggablePanel from "../../DraggablePanel/DraggablePanel.mjs";
|
|
3
|
+
import FlexBasic_default from "../../Flex/FlexBasic.mjs";
|
|
4
|
+
import Center from "../../Flex/Center.mjs";
|
|
5
|
+
import { styles } from "./style.mjs";
|
|
6
|
+
import { cx, useResponsive } from "antd-style";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
import { memo } from "react";
|
|
9
|
+
import { LevaPanel, useControls, useCreateStore } from "leva";
|
|
10
|
+
//#region src/storybook/StoryBook/StoryBook.tsx
|
|
11
|
+
const StoryBook = memo(({ ref, levaStore, noPadding, className, children, ...rest }) => {
|
|
12
|
+
const { mobile } = useResponsive();
|
|
13
|
+
return /* @__PURE__ */ jsx("div", {
|
|
14
|
+
className: styles.shell,
|
|
15
|
+
children: /* @__PURE__ */ jsxs(FlexBasic_default, {
|
|
16
|
+
align: "stretch",
|
|
17
|
+
className: cx(styles.editor, className),
|
|
18
|
+
horizontal: !mobile,
|
|
19
|
+
justify: "stretch",
|
|
20
|
+
ref,
|
|
21
|
+
width: "100%",
|
|
22
|
+
children: [/* @__PURE__ */ jsx(Center, {
|
|
23
|
+
allowShrink: true,
|
|
24
|
+
className: cx(noPadding ? styles.left : styles.leftWithPadding),
|
|
25
|
+
flex: 1,
|
|
26
|
+
...rest,
|
|
27
|
+
children
|
|
28
|
+
}), /* @__PURE__ */ jsx(DraggablePanel, {
|
|
29
|
+
className: styles.right,
|
|
30
|
+
defaultSize: { width: 240 },
|
|
31
|
+
maxWidth: 320,
|
|
32
|
+
minWidth: 200,
|
|
33
|
+
placement: mobile ? "bottom" : "right",
|
|
34
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
35
|
+
className: styles.leva,
|
|
36
|
+
children: /* @__PURE__ */ jsx(LevaPanel, {
|
|
37
|
+
fill: true,
|
|
38
|
+
flat: true,
|
|
39
|
+
hideCopyButton: true,
|
|
40
|
+
store: levaStore,
|
|
41
|
+
titleBar: false
|
|
42
|
+
})
|
|
43
|
+
})
|
|
44
|
+
})]
|
|
45
|
+
})
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
StoryBook.displayName = "StoryBook";
|
|
49
|
+
//#endregion
|
|
50
|
+
export { StoryBook, StoryBook as default, useControls, useCreateStore };
|
|
51
|
+
|
|
52
|
+
//# sourceMappingURL=StoryBook.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StoryBook.mjs","names":["Flexbox"],"sources":["../../../src/storybook/StoryBook/StoryBook.tsx"],"sourcesContent":["'use client';\n\nimport { cx, useResponsive } from 'antd-style';\nimport { LevaPanel } from 'leva';\nimport { memo } from 'react';\n\nimport DraggablePanel from '@/DraggablePanel';\nimport { Center, Flexbox } from '@/Flex';\n\nimport { styles } from './style';\nimport type { StoryBookProps } from './type';\n\nexport const StoryBook = memo<StoryBookProps>(\n ({ ref, levaStore, noPadding, className, children, ...rest }) => {\n const { mobile } = useResponsive();\n\n return (\n <div className={styles.shell}>\n <Flexbox\n align=\"stretch\"\n className={cx(styles.editor, className)}\n horizontal={!mobile}\n justify=\"stretch\"\n ref={ref}\n width=\"100%\"\n >\n <Center\n allowShrink\n className={cx(noPadding ? styles.left : styles.leftWithPadding)}\n flex={1}\n {...rest}\n >\n {children}\n </Center>\n <DraggablePanel\n className={styles.right}\n defaultSize={{ width: 240 }}\n maxWidth={320}\n minWidth={200}\n placement={mobile ? 'bottom' : 'right'}\n >\n <div className={styles.leva}>\n <LevaPanel fill flat hideCopyButton store={levaStore} titleBar={false} />\n </div>\n </DraggablePanel>\n </Flexbox>\n </div>\n );\n },\n);\n\nStoryBook.displayName = 'StoryBook';\n\nexport default StoryBook;\n\nexport { useControls, useCreateStore } from 'leva';\n"],"mappings":";;;;;;;;;;AAYA,MAAa,YAAY,MACtB,EAAE,KAAK,WAAW,WAAW,WAAW,UAAU,GAAG,WAAW;CAC/D,MAAM,EAAE,WAAW,cAAc;CAEjC,OACE,oBAAC,OAAD;EAAK,WAAW,OAAO;EACrB,UAAA,qBAACA,mBAAD;GACE,OAAM;GACN,WAAW,GAAG,OAAO,QAAQ,SAAS;GACtC,YAAY,CAAC;GACb,SAAQ;GACH;GACL,OAAM;GANR,UAAA,CAQE,oBAAC,QAAD;IACE,aAAA;IACA,WAAW,GAAG,YAAY,OAAO,OAAO,OAAO,eAAe;IAC9D,MAAM;IACN,GAAI;IAEH;GACK,CAAA,GACR,oBAAC,gBAAD;IACE,WAAW,OAAO;IAClB,aAAa,EAAE,OAAO,IAAI;IAC1B,UAAU;IACV,UAAU;IACV,WAAW,SAAS,WAAW;IAE/B,UAAA,oBAAC,OAAD;KAAK,WAAW,OAAO;KACrB,UAAA,oBAAC,WAAD;MAAW,MAAA;MAAK,MAAA;MAAK,gBAAA;MAAe,OAAO;MAAW,UAAU;KAAQ,CAAA;IACrE,CAAA;GACS,CAAA,CACT;;CACN,CAAA;AAET,CACF;AAEA,UAAU,cAAc"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { createStaticStyles } from "antd-style";
|
|
2
|
+
//#region src/storybook/StoryBook/style.ts
|
|
3
|
+
const styles = createStaticStyles(({ css, cssVar }) => {
|
|
4
|
+
/** shell 与 editor 共用的填充尺寸 */
|
|
5
|
+
const fillSpace = css`
|
|
6
|
+
width: 100%;
|
|
7
|
+
min-width: 0;
|
|
8
|
+
height: 100%;
|
|
9
|
+
min-height: 16rem;
|
|
10
|
+
`;
|
|
11
|
+
return {
|
|
12
|
+
shell: css`
|
|
13
|
+
container-type: inline-size;
|
|
14
|
+
${fillSpace};
|
|
15
|
+
`,
|
|
16
|
+
editor: css`
|
|
17
|
+
overflow: hidden;
|
|
18
|
+
${fillSpace};
|
|
19
|
+
|
|
20
|
+
@container (max-width: 36rem) {
|
|
21
|
+
flex-direction: column !important;
|
|
22
|
+
}
|
|
23
|
+
`,
|
|
24
|
+
left: css`
|
|
25
|
+
position: relative;
|
|
26
|
+
overflow: auto;
|
|
27
|
+
min-width: 0;
|
|
28
|
+
height: 100%;
|
|
29
|
+
`,
|
|
30
|
+
leftWithPadding: css`
|
|
31
|
+
position: relative;
|
|
32
|
+
|
|
33
|
+
overflow: auto;
|
|
34
|
+
|
|
35
|
+
min-width: 0;
|
|
36
|
+
height: 100%;
|
|
37
|
+
padding-block: 40px;
|
|
38
|
+
padding-inline: 24px;
|
|
39
|
+
`,
|
|
40
|
+
right: css`
|
|
41
|
+
height: 100%;
|
|
42
|
+
border-inline-start: 1px solid ${cssVar.colorBorderSecondary};
|
|
43
|
+
background: ${cssVar.colorBgLayout};
|
|
44
|
+
|
|
45
|
+
@container (max-width: 36rem) {
|
|
46
|
+
width: 100%;
|
|
47
|
+
min-width: 0;
|
|
48
|
+
min-height: 10rem;
|
|
49
|
+
border-block-start: 1px solid ${cssVar.colorBorderSecondary};
|
|
50
|
+
border-inline-start: 0;
|
|
51
|
+
}
|
|
52
|
+
`,
|
|
53
|
+
leva: css`
|
|
54
|
+
--leva-sizes-controlWidth: 52%;
|
|
55
|
+
--leva-colors-elevation1: ${cssVar.colorFillSecondary};
|
|
56
|
+
--leva-colors-elevation2: transparent;
|
|
57
|
+
--leva-colors-elevation3: ${cssVar.colorFillSecondary};
|
|
58
|
+
--leva-colors-accent1: ${cssVar.colorPrimary};
|
|
59
|
+
--leva-colors-accent2: ${cssVar.colorPrimaryHover};
|
|
60
|
+
--leva-colors-accent3: ${cssVar.colorPrimaryActive};
|
|
61
|
+
--leva-colors-highlight1: ${cssVar.colorTextTertiary};
|
|
62
|
+
--leva-colors-highlight2: ${cssVar.colorTextSecondary};
|
|
63
|
+
--leva-colors-highlight3: ${cssVar.colorText};
|
|
64
|
+
--leva-colors-vivid1: ${cssVar.colorWarning};
|
|
65
|
+
--leva-shadows-level1: unset;
|
|
66
|
+
--leva-shadows-level2: unset;
|
|
67
|
+
--leva-fonts-mono: ${cssVar.fontFamilyCode};
|
|
68
|
+
|
|
69
|
+
overflow: auto;
|
|
70
|
+
|
|
71
|
+
width: 100%;
|
|
72
|
+
height: 100%;
|
|
73
|
+
padding-block: 6px;
|
|
74
|
+
padding-inline: 1.5rem 0.5rem;
|
|
75
|
+
|
|
76
|
+
> div {
|
|
77
|
+
background: transparent;
|
|
78
|
+
|
|
79
|
+
> div {
|
|
80
|
+
background: transparent;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
input:checked + label > svg {
|
|
85
|
+
stroke: ${cssVar.colorBgLayout};
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
button {
|
|
89
|
+
--leva-colors-accent2: ${cssVar.colorFillSecondary};
|
|
90
|
+
}
|
|
91
|
+
`
|
|
92
|
+
};
|
|
93
|
+
});
|
|
94
|
+
//#endregion
|
|
95
|
+
export { styles };
|
|
96
|
+
|
|
97
|
+
//# sourceMappingURL=style.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.mjs","names":[],"sources":["../../../src/storybook/StoryBook/style.ts"],"sourcesContent":["import { createStaticStyles } from 'antd-style';\n\nexport const styles = createStaticStyles(({ css, cssVar }) => {\n /** shell 与 editor 共用的填充尺寸 */\n const fillSpace = css`\n width: 100%;\n min-width: 0;\n height: 100%;\n min-height: 16rem;\n `;\n\n return {\n shell: css`\n container-type: inline-size;\n ${fillSpace};\n `,\n editor: css`\n overflow: hidden;\n ${fillSpace};\n\n @container (max-width: 36rem) {\n flex-direction: column !important;\n }\n `,\n left: css`\n position: relative;\n overflow: auto;\n min-width: 0;\n height: 100%;\n `,\n leftWithPadding: css`\n position: relative;\n\n overflow: auto;\n\n min-width: 0;\n height: 100%;\n padding-block: 40px;\n padding-inline: 24px;\n `,\n right: css`\n height: 100%;\n border-inline-start: 1px solid ${cssVar.colorBorderSecondary};\n background: ${cssVar.colorBgLayout};\n\n @container (max-width: 36rem) {\n width: 100%;\n min-width: 0;\n min-height: 10rem;\n border-block-start: 1px solid ${cssVar.colorBorderSecondary};\n border-inline-start: 0;\n }\n `,\n // Leva 控制面板接入主题 token\n leva: css`\n --leva-sizes-controlWidth: 52%;\n --leva-colors-elevation1: ${cssVar.colorFillSecondary};\n --leva-colors-elevation2: transparent;\n --leva-colors-elevation3: ${cssVar.colorFillSecondary};\n --leva-colors-accent1: ${cssVar.colorPrimary};\n --leva-colors-accent2: ${cssVar.colorPrimaryHover};\n --leva-colors-accent3: ${cssVar.colorPrimaryActive};\n --leva-colors-highlight1: ${cssVar.colorTextTertiary};\n --leva-colors-highlight2: ${cssVar.colorTextSecondary};\n --leva-colors-highlight3: ${cssVar.colorText};\n --leva-colors-vivid1: ${cssVar.colorWarning};\n --leva-shadows-level1: unset;\n --leva-shadows-level2: unset;\n --leva-fonts-mono: ${cssVar.fontFamilyCode};\n\n overflow: auto;\n\n width: 100%;\n height: 100%;\n padding-block: 6px;\n padding-inline: 1.5rem 0.5rem;\n\n > div {\n background: transparent;\n\n > div {\n background: transparent;\n }\n }\n\n input:checked + label > svg {\n stroke: ${cssVar.colorBgLayout};\n }\n\n button {\n --leva-colors-accent2: ${cssVar.colorFillSecondary};\n }\n `,\n };\n});\n"],"mappings":";;AAEA,MAAa,SAAS,oBAAoB,EAAE,KAAK,aAAa;;CAE5D,MAAM,YAAY,GAAG;;;;;;CAOrB,OAAO;EACL,OAAO,GAAG;;QAEN,UAAU;;EAEd,QAAQ,GAAG;;QAEP,UAAU;;;;;;EAMd,MAAM,GAAG;;;;;;EAMT,iBAAiB,GAAG;;;;;;;;;;EAUpB,OAAO,GAAG;;uCAEyB,OAAO,qBAAqB;oBAC/C,OAAO,cAAc;;;;;;wCAMD,OAAO,qBAAqB;;;;EAKhE,MAAM,GAAG;;kCAEqB,OAAO,mBAAmB;;kCAE1B,OAAO,mBAAmB;+BAC7B,OAAO,aAAa;+BACpB,OAAO,kBAAkB;+BACzB,OAAO,mBAAmB;kCACvB,OAAO,kBAAkB;kCACzB,OAAO,mBAAmB;kCAC1B,OAAO,UAAU;8BACrB,OAAO,aAAa;;;2BAGvB,OAAO,eAAe;;;;;;;;;;;;;;;;;;kBAkB/B,OAAO,cAAc;;;;iCAIN,OAAO,mBAAmB;;;CAGzD;AACF,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FlexboxProps } from "../../Flex/type.mjs";
|
|
2
|
+
import "../../Flex/index.mjs";
|
|
3
|
+
import { Ref } from "react";
|
|
4
|
+
//#region src/storybook/StoryBook/type.d.ts
|
|
5
|
+
/** Leva-powered playground shell with a resizable control panel. */
|
|
6
|
+
interface StoryBookProps extends FlexboxProps {
|
|
7
|
+
levaStore: any;
|
|
8
|
+
noPadding?: boolean;
|
|
9
|
+
ref?: Ref<HTMLDivElement>;
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { StoryBookProps };
|
|
13
|
+
//# sourceMappingURL=type.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './index.d.mts';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './index.mjs';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region src/styles/classNames.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* 对外发布的组件类名。改名属于破坏性变更,新增成员时同步 essential.ts 里的全局样式。
|
|
4
|
+
*/
|
|
5
|
+
declare const CLASSNAMES: {
|
|
6
|
+
readonly ContextTrigger: "superad-context-trigger";
|
|
7
|
+
readonly DropdownMenuTrigger: "superad-dropdown-menu-trigger";
|
|
8
|
+
};
|
|
9
|
+
//#endregion
|
|
10
|
+
export { CLASSNAMES };
|
|
11
|
+
//# sourceMappingURL=classNames.d.mts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//#region src/styles/classNames.ts
|
|
2
|
+
/**
|
|
3
|
+
* 对外发布的组件类名。改名属于破坏性变更,新增成员时同步 essential.ts 里的全局样式。
|
|
4
|
+
*/
|
|
5
|
+
const CLASSNAMES = {
|
|
6
|
+
ContextTrigger: "superad-context-trigger",
|
|
7
|
+
DropdownMenuTrigger: "superad-dropdown-menu-trigger"
|
|
8
|
+
};
|
|
9
|
+
//#endregion
|
|
10
|
+
export { CLASSNAMES };
|
|
11
|
+
|
|
12
|
+
//# sourceMappingURL=classNames.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"classNames.mjs","names":[],"sources":["../../src/styles/classNames.ts"],"sourcesContent":["/**\n * 对外发布的组件类名。改名属于破坏性变更,新增成员时同步 essential.ts 里的全局样式。\n */\nexport const CLASSNAMES = {\n ContextTrigger: 'superad-context-trigger',\n DropdownMenuTrigger: 'superad-dropdown-menu-trigger',\n} as const;\n"],"mappings":";;;;AAGA,MAAa,aAAa;CACxB,gBAAgB;CAChB,qBAAqB;AACvB"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
//#region src/styles/customTheme.d.ts
|
|
2
|
+
/** 各彩色色板的代表色(暗色第 9 步)。 */
|
|
3
|
+
declare const primaryColors: {
|
|
4
|
+
blue: string;
|
|
5
|
+
cyan: string;
|
|
6
|
+
geekblue: string;
|
|
7
|
+
gold: string;
|
|
8
|
+
green: string;
|
|
9
|
+
lime: string;
|
|
10
|
+
magenta: string;
|
|
11
|
+
orange: string;
|
|
12
|
+
purple: string;
|
|
13
|
+
red: string;
|
|
14
|
+
volcano: string;
|
|
15
|
+
yellow: string;
|
|
16
|
+
};
|
|
17
|
+
type PrimaryColorsObj = typeof primaryColors;
|
|
18
|
+
type PrimaryColors = keyof PrimaryColorsObj;
|
|
19
|
+
/** 按色轮顺序排列的彩色色板样本。 */
|
|
20
|
+
declare const primaryColorsSwatches: string[];
|
|
21
|
+
/** 各中性色板的代表色(暗色第 9 步)。 */
|
|
22
|
+
declare const neutralColors: {
|
|
23
|
+
mauve: string;
|
|
24
|
+
olive: string;
|
|
25
|
+
sage: string;
|
|
26
|
+
sand: string;
|
|
27
|
+
slate: string;
|
|
28
|
+
};
|
|
29
|
+
declare const neutralColorsSwatches: string[];
|
|
30
|
+
type NeutralColorsObj = typeof neutralColors;
|
|
31
|
+
type NeutralColors = keyof NeutralColorsObj;
|
|
32
|
+
/** 反查色板名:给代表色值,找它在 primary / neutral 里的名字。 */
|
|
33
|
+
declare const findCustomThemeName: (type: "primary" | "neutral", value: string) => string | undefined;
|
|
34
|
+
//#endregion
|
|
35
|
+
export { NeutralColors, NeutralColorsObj, PrimaryColors, PrimaryColorsObj, findCustomThemeName, neutralColors, neutralColorsSwatches, primaryColors, primaryColorsSwatches };
|
|
36
|
+
//# sourceMappingURL=customTheme.d.mts.map
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import blue from "../color/colors/blue.mjs";
|
|
2
|
+
import cyan from "../color/colors/cyan.mjs";
|
|
3
|
+
import geekblue from "../color/colors/geekblue.mjs";
|
|
4
|
+
import gold from "../color/colors/gold.mjs";
|
|
5
|
+
import green from "../color/colors/green.mjs";
|
|
6
|
+
import lime from "../color/colors/lime.mjs";
|
|
7
|
+
import magenta from "../color/colors/magenta.mjs";
|
|
8
|
+
import orange from "../color/colors/orange.mjs";
|
|
9
|
+
import purple from "../color/colors/purple.mjs";
|
|
10
|
+
import red from "../color/colors/red.mjs";
|
|
11
|
+
import volcano from "../color/colors/volcano.mjs";
|
|
12
|
+
import yellow from "../color/colors/yellow.mjs";
|
|
13
|
+
import mauve from "../color/neutrals/mauve.mjs";
|
|
14
|
+
import olive from "../color/neutrals/olive.mjs";
|
|
15
|
+
import sage from "../color/neutrals/sage.mjs";
|
|
16
|
+
import sand from "../color/neutrals/sand.mjs";
|
|
17
|
+
import slate from "../color/neutrals/slate.mjs";
|
|
18
|
+
//#region src/styles/customTheme.ts
|
|
19
|
+
/** 各彩色色板的代表色(暗色第 9 步)。 */
|
|
20
|
+
const primaryColors = {
|
|
21
|
+
blue: blue.dark[9],
|
|
22
|
+
cyan: cyan.dark[9],
|
|
23
|
+
geekblue: geekblue.dark[9],
|
|
24
|
+
gold: gold.dark[9],
|
|
25
|
+
green: green.dark[9],
|
|
26
|
+
lime: lime.dark[9],
|
|
27
|
+
magenta: magenta.dark[9],
|
|
28
|
+
orange: orange.dark[9],
|
|
29
|
+
purple: purple.dark[9],
|
|
30
|
+
red: red.dark[9],
|
|
31
|
+
volcano: volcano.dark[9],
|
|
32
|
+
yellow: yellow.dark[9]
|
|
33
|
+
};
|
|
34
|
+
/** 按色轮顺序排列的彩色色板样本。 */
|
|
35
|
+
const primaryColorsSwatches = [
|
|
36
|
+
primaryColors.red,
|
|
37
|
+
primaryColors.orange,
|
|
38
|
+
primaryColors.gold,
|
|
39
|
+
primaryColors.yellow,
|
|
40
|
+
primaryColors.lime,
|
|
41
|
+
primaryColors.green,
|
|
42
|
+
primaryColors.cyan,
|
|
43
|
+
primaryColors.blue,
|
|
44
|
+
primaryColors.geekblue,
|
|
45
|
+
primaryColors.purple,
|
|
46
|
+
primaryColors.magenta,
|
|
47
|
+
primaryColors.volcano
|
|
48
|
+
];
|
|
49
|
+
/** 各中性色板的代表色(暗色第 9 步)。 */
|
|
50
|
+
const neutralColors = {
|
|
51
|
+
mauve: mauve.dark[9],
|
|
52
|
+
olive: olive.dark[9],
|
|
53
|
+
sage: sage.dark[9],
|
|
54
|
+
sand: sand.dark[9],
|
|
55
|
+
slate: slate.dark[9]
|
|
56
|
+
};
|
|
57
|
+
const neutralColorsSwatches = [
|
|
58
|
+
neutralColors.mauve,
|
|
59
|
+
neutralColors.slate,
|
|
60
|
+
neutralColors.sage,
|
|
61
|
+
neutralColors.olive,
|
|
62
|
+
neutralColors.sand
|
|
63
|
+
];
|
|
64
|
+
/** 反查色板名:给代表色值,找它在 primary / neutral 里的名字。 */
|
|
65
|
+
const findCustomThemeName = (type, value) => {
|
|
66
|
+
return Object.entries(type === "primary" ? primaryColors : neutralColors).find(([, color]) => color === value)?.[0];
|
|
67
|
+
};
|
|
68
|
+
//#endregion
|
|
69
|
+
export { findCustomThemeName, neutralColors, neutralColorsSwatches, primaryColors, primaryColorsSwatches };
|
|
70
|
+
|
|
71
|
+
//# sourceMappingURL=customTheme.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customTheme.mjs","names":[],"sources":["../../src/styles/customTheme.ts"],"sourcesContent":["import {\n blue,\n cyan,\n geekblue,\n gold,\n green,\n lime,\n magenta,\n orange,\n purple,\n red,\n volcano,\n yellow,\n} from '@/color/colors';\nimport { mauve, olive, sage, sand, slate } from '@/color/neutrals';\n\n/** 各彩色色板的代表色(暗色第 9 步)。 */\nexport const primaryColors = {\n blue: blue.dark[9],\n cyan: cyan.dark[9],\n geekblue: geekblue.dark[9],\n gold: gold.dark[9],\n green: green.dark[9],\n lime: lime.dark[9],\n magenta: magenta.dark[9],\n orange: orange.dark[9],\n purple: purple.dark[9],\n red: red.dark[9],\n volcano: volcano.dark[9],\n yellow: yellow.dark[9],\n};\n\nexport type PrimaryColorsObj = typeof primaryColors;\nexport type PrimaryColors = keyof PrimaryColorsObj;\n\n/** 按色轮顺序排列的彩色色板样本。 */\nexport const primaryColorsSwatches = [\n primaryColors.red,\n primaryColors.orange,\n primaryColors.gold,\n primaryColors.yellow,\n primaryColors.lime,\n primaryColors.green,\n primaryColors.cyan,\n primaryColors.blue,\n primaryColors.geekblue,\n primaryColors.purple,\n primaryColors.magenta,\n primaryColors.volcano,\n];\n\n/** 各中性色板的代表色(暗色第 9 步)。 */\nexport const neutralColors = {\n mauve: mauve.dark[9],\n olive: olive.dark[9],\n sage: sage.dark[9],\n sand: sand.dark[9],\n slate: slate.dark[9],\n};\n\nexport const neutralColorsSwatches = [\n neutralColors.mauve,\n neutralColors.slate,\n neutralColors.sage,\n neutralColors.olive,\n neutralColors.sand,\n];\n\nexport type NeutralColorsObj = typeof neutralColors;\nexport type NeutralColors = keyof NeutralColorsObj;\n\n/** 反查色板名:给代表色值,找它在 primary / neutral 里的名字。 */\nexport const findCustomThemeName = (type: 'primary' | 'neutral', value: string) => {\n const source = type === 'primary' ? primaryColors : neutralColors;\n return Object.entries(source).find(([, color]) => color === value)?.[0];\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAiBA,MAAa,gBAAgB;CAC3B,MAAM,KAAK,KAAK;CAChB,MAAM,KAAK,KAAK;CAChB,UAAU,SAAS,KAAK;CACxB,MAAM,KAAK,KAAK;CAChB,OAAO,MAAM,KAAK;CAClB,MAAM,KAAK,KAAK;CAChB,SAAS,QAAQ,KAAK;CACtB,QAAQ,OAAO,KAAK;CACpB,QAAQ,OAAO,KAAK;CACpB,KAAK,IAAI,KAAK;CACd,SAAS,QAAQ,KAAK;CACtB,QAAQ,OAAO,KAAK;AACtB;;AAMA,MAAa,wBAAwB;CACnC,cAAc;CACd,cAAc;CACd,cAAc;CACd,cAAc;CACd,cAAc;CACd,cAAc;CACd,cAAc;CACd,cAAc;CACd,cAAc;CACd,cAAc;CACd,cAAc;CACd,cAAc;AAChB;;AAGA,MAAa,gBAAgB;CAC3B,OAAO,MAAM,KAAK;CAClB,OAAO,MAAM,KAAK;CAClB,MAAM,KAAK,KAAK;CAChB,MAAM,KAAK,KAAK;CAChB,OAAO,MAAM,KAAK;AACpB;AAEA,MAAa,wBAAwB;CACnC,cAAc;CACd,cAAc;CACd,cAAc;CACd,cAAc;CACd,cAAc;AAChB;;AAMA,MAAa,uBAAuB,MAA6B,UAAkB;CAEjF,OAAO,OAAO,QADC,SAAS,YAAY,gBAAgB,aACxB,CAAC,CAAC,MAAM,GAAG,WAAW,UAAU,KAAK,CAAC,GAAG;AACvE"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { NeutralColors, NeutralColorsObj, PrimaryColors, PrimaryColorsObj, findCustomThemeName, neutralColors, neutralColorsSwatches, primaryColors, primaryColorsSwatches } from "./customTheme.mjs";
|
|
2
|
+
import { generateCustomStylish } from "./theme/customStylish.mjs";
|
|
3
|
+
import { staticStylish } from "./theme/customStylishStatic.mjs";
|
|
4
|
+
import { generateCustomToken } from "./theme/customToken.mjs";
|
|
5
|
+
import { generateColorNeutralPalette, generateColorPalette } from "./theme/generateColorPalette.mjs";
|
|
6
|
+
export { NeutralColors, NeutralColorsObj, PrimaryColors, PrimaryColorsObj, findCustomThemeName, generateColorNeutralPalette, generateColorPalette, neutralColors, neutralColorsSwatches, primaryColors, primaryColorsSwatches, generateCustomStylish as superadCustomStylish, generateCustomToken as superadCustomToken, staticStylish as superadStaticStylish };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './index.d.mts';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './index.mjs';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { findCustomThemeName, neutralColors, neutralColorsSwatches, primaryColors, primaryColorsSwatches } from "./customTheme.mjs";
|
|
2
|
+
import { generateCustomStylish } from "./theme/customStylish.mjs";
|
|
3
|
+
import { staticStylish } from "./theme/customStylishStatic.mjs";
|
|
4
|
+
import { generateCustomToken } from "./theme/customToken.mjs";
|
|
5
|
+
import { generateColorNeutralPalette, generateColorPalette } from "./theme/generateColorPalette.mjs";
|
|
6
|
+
export { findCustomThemeName, generateColorNeutralPalette, generateColorPalette, neutralColors, neutralColorsSwatches, primaryColors, primaryColorsSwatches, generateCustomStylish as superadCustomStylish, generateCustomToken as superadCustomToken, staticStylish as superadStaticStylish };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { generateCustomColorToken } from "../customToken.mjs";
|
|
2
|
+
import darkBaseToken from "../token/dark.mjs";
|
|
3
|
+
import { resolveNeutralTokens, resolvePrimaryTokens } from "./resolveScales.mjs";
|
|
4
|
+
//#region src/styles/theme/algorithms/darkAlgorithm.ts
|
|
5
|
+
const darkAlgorithm = (seedToken, mapToken) => {
|
|
6
|
+
const { neutralColor, primaryColor } = seedToken;
|
|
7
|
+
return {
|
|
8
|
+
...mapToken,
|
|
9
|
+
...darkBaseToken,
|
|
10
|
+
...resolvePrimaryTokens("dark", primaryColor),
|
|
11
|
+
...resolveNeutralTokens("dark", neutralColor),
|
|
12
|
+
...generateCustomColorToken(true)
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
//#endregion
|
|
16
|
+
export { darkAlgorithm };
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=darkAlgorithm.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"darkAlgorithm.mjs","names":[],"sources":["../../../../src/styles/theme/algorithms/darkAlgorithm.ts"],"sourcesContent":["import type { MappingAlgorithm } from 'antd/es/theme/interface';\n\nimport type { NeutralColors, PrimaryColors } from '../../customTheme';\nimport { generateCustomColorToken } from '../customToken';\nimport darkBaseToken from '../token/dark';\nimport { resolveNeutralTokens, resolvePrimaryTokens } from './resolveScales';\n\nexport const darkAlgorithm: MappingAlgorithm = (seedToken, mapToken) => {\n const { neutralColor, primaryColor } = seedToken as typeof seedToken & {\n neutralColor?: NeutralColors;\n primaryColor?: PrimaryColors;\n };\n\n return {\n ...mapToken!,\n ...darkBaseToken,\n ...resolvePrimaryTokens('dark', primaryColor),\n ...resolveNeutralTokens('dark', neutralColor),\n ...generateCustomColorToken(true),\n };\n};\n"],"mappings":";;;;AAOA,MAAa,iBAAmC,WAAW,aAAa;CACtE,MAAM,EAAE,cAAc,iBAAiB;CAKvC,OAAO;EACL,GAAG;EACH,GAAG;EACH,GAAG,qBAAqB,QAAQ,YAAY;EAC5C,GAAG,qBAAqB,QAAQ,YAAY;EAC5C,GAAG,yBAAyB,IAAI;CAClC;AACF"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { generateCustomColorToken } from "../customToken.mjs";
|
|
2
|
+
import { resolveNeutralTokens, resolvePrimaryTokens } from "./resolveScales.mjs";
|
|
3
|
+
import lightBaseToken from "../token/light.mjs";
|
|
4
|
+
//#region src/styles/theme/algorithms/lightAlgorithm.ts
|
|
5
|
+
const lightAlgorithm = (seedToken, mapToken) => {
|
|
6
|
+
const { neutralColor, primaryColor } = seedToken;
|
|
7
|
+
return {
|
|
8
|
+
...mapToken,
|
|
9
|
+
...lightBaseToken,
|
|
10
|
+
...resolvePrimaryTokens("light", primaryColor),
|
|
11
|
+
...resolveNeutralTokens("light", neutralColor),
|
|
12
|
+
...generateCustomColorToken(false)
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
//#endregion
|
|
16
|
+
export { lightAlgorithm };
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=lightAlgorithm.mjs.map
|