pixelize-design-library 2.3.22 → 2.3.25
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/Assets/defaultLogo.tsx +30 -0
- package/dist/Components/Accordion/accordionColors.d.ts +6 -0
- package/dist/Components/Accordion/accordionColors.d.ts.map +1 -0
- package/dist/Components/Accordion/accordionColors.js +20 -0
- package/dist/Components/Editor/joditThemeVars.d.ts +21 -0
- package/dist/Components/Editor/joditThemeVars.d.ts.map +1 -0
- package/dist/Components/Editor/joditThemeVars.js +70 -0
- package/dist/Components/FilterSidebar/filterHoverStyle.d.ts +12 -0
- package/dist/Components/FilterSidebar/filterHoverStyle.d.ts.map +1 -0
- package/dist/Components/FilterSidebar/filterHoverStyle.js +14 -0
- package/dist/Components/OrganizationDetails/CreateOrgModal.js +6 -4
- package/dist/Components/OrganizationDetails/OrganizationDetails.d.ts.map +1 -1
- package/dist/Components/OrganizationDetails/OrganizationDetails.js +55 -7
- package/dist/Components/OrganizationDetails/OrganizationDetailsProps.d.ts +24 -14
- package/dist/Components/OrganizationDetails/OrganizationDetailsProps.d.ts.map +1 -1
- package/dist/Components/SelectV2/SelectV2.d.ts +3 -0
- package/dist/Components/SelectV2/SelectV2.d.ts.map +1 -0
- package/dist/Components/SelectV2/SelectV2.js +185 -0
- package/dist/Components/SelectV2/SelectV2Props.d.ts +67 -0
- package/dist/Components/SelectV2/SelectV2Props.d.ts.map +1 -0
- package/dist/Components/SelectV2/SelectV2Props.js +2 -0
- package/dist/Components/SideBar/sidebarAccentColors.d.ts +21 -0
- package/dist/Components/SideBar/sidebarAccentColors.d.ts.map +1 -0
- package/dist/Components/SideBar/sidebarAccentColors.js +36 -0
- package/dist/Components/Table/components/tableRowHoverStyle.d.ts +13 -0
- package/dist/Components/Table/components/tableRowHoverStyle.d.ts.map +1 -0
- package/dist/Components/Table/components/tableRowHoverStyle.js +26 -0
- package/dist/Theme/chakra/Avatar.styles.d.ts +33 -0
- package/dist/Theme/chakra/Avatar.styles.d.ts.map +1 -0
- package/dist/Theme/chakra/Avatar.styles.js +28 -0
- package/dist/Theme/chakra/Drawer.styles.d.ts +32 -0
- package/dist/Theme/chakra/Drawer.styles.d.ts.map +1 -0
- package/dist/Theme/chakra/Drawer.styles.js +26 -0
- package/dist/Theme/chakra/Menu.styles.d.ts +70 -0
- package/dist/Theme/chakra/Menu.styles.d.ts.map +1 -0
- package/dist/Theme/chakra/Menu.styles.js +50 -0
- package/dist/Theme/chakra/Modal.styles.d.ts +32 -0
- package/dist/Theme/chakra/Modal.styles.d.ts.map +1 -0
- package/dist/Theme/chakra/Modal.styles.js +26 -0
- package/dist/Theme/chakra/Popover.styles.d.ts +37 -0
- package/dist/Theme/chakra/Popover.styles.d.ts.map +1 -0
- package/dist/Theme/chakra/Popover.styles.js +30 -0
- package/dist/Theme/chakra/Slider.styles.d.ts +31 -0
- package/dist/Theme/chakra/Slider.styles.d.ts.map +1 -0
- package/dist/Theme/chakra/Slider.styles.js +25 -0
- package/dist/Theme/chakra/Switch.styles.d.ts +31 -0
- package/dist/Theme/chakra/Switch.styles.d.ts.map +1 -0
- package/dist/Theme/chakra/Switch.styles.js +24 -0
- package/dist/Theme/chakra/Tabs.styles.d.ts +43 -0
- package/dist/Theme/chakra/Tabs.styles.d.ts.map +1 -0
- package/dist/Theme/chakra/Tabs.styles.js +41 -0
- package/dist/Theme/chakra/common.web.d.ts +171 -0
- package/dist/Theme/chakra/common.web.d.ts.map +1 -0
- package/dist/Theme/chakra/common.web.js +21 -0
- package/dist/Theme/chakra/componentStyles.d.ts +240 -0
- package/dist/Theme/chakra/componentStyles.d.ts.map +1 -0
- package/dist/Theme/chakra/componentStyles.js +150 -0
- package/dist/Theme/chakra/createBrandTheme.d.ts +18 -0
- package/dist/Theme/chakra/createBrandTheme.d.ts.map +1 -0
- package/dist/Theme/chakra/createBrandTheme.js +78 -0
- package/dist/Theme/chakra/fonts.web.d.ts +42 -0
- package/dist/Theme/chakra/fonts.web.d.ts.map +1 -0
- package/dist/Theme/chakra/fonts.web.js +15 -0
- package/dist/Theme/provider/PixelizeThemeProvider.d.ts +46 -0
- package/dist/Theme/provider/PixelizeThemeProvider.d.ts.map +1 -0
- package/dist/Theme/provider/PixelizeThemeProvider.js +124 -0
- package/dist/Theme/provider/ThemeSwitcher.d.ts +8 -0
- package/dist/Theme/provider/ThemeSwitcher.d.ts.map +1 -0
- package/dist/Theme/provider/ThemeSwitcher.js +111 -0
- package/dist/Theme/provider/colorModeStorage.d.ts +10 -0
- package/dist/Theme/provider/colorModeStorage.d.ts.map +1 -0
- package/dist/Theme/provider/colorModeStorage.js +106 -0
- package/dist/Theme/provider/index.d.ts +6 -0
- package/dist/Theme/provider/index.d.ts.map +1 -0
- package/dist/Theme/provider/index.js +9 -0
- package/dist/Theme/provider/useThemeMode.d.ts +3 -0
- package/dist/Theme/provider/useThemeMode.d.ts.map +1 -0
- package/dist/Theme/provider/useThemeMode.js +13 -0
- package/dist/Theme/tokens/brands/emerald/palette.dark.d.ts +7 -0
- package/dist/Theme/tokens/brands/emerald/palette.dark.d.ts.map +1 -0
- package/dist/Theme/tokens/brands/emerald/palette.dark.js +13 -0
- package/dist/Theme/tokens/brands/emerald/palette.light.d.ts +375 -0
- package/dist/Theme/tokens/brands/emerald/palette.light.d.ts.map +1 -0
- package/dist/Theme/tokens/brands/emerald/palette.light.js +135 -0
- package/dist/Theme/tokens/brands/index.d.ts +28 -0
- package/dist/Theme/tokens/brands/index.d.ts.map +1 -0
- package/dist/Theme/tokens/brands/index.js +93 -0
- package/dist/Theme/tokens/brands/lavender/palette.dark.d.ts +7 -0
- package/dist/Theme/tokens/brands/lavender/palette.dark.d.ts.map +1 -0
- package/dist/Theme/tokens/brands/lavender/palette.dark.js +13 -0
- package/dist/Theme/tokens/brands/lavender/palette.light.d.ts +375 -0
- package/dist/Theme/tokens/brands/lavender/palette.light.d.ts.map +1 -0
- package/dist/Theme/tokens/brands/lavender/palette.light.js +316 -0
- package/dist/Theme/tokens/brands/meadow/palette.dark.d.ts +7 -0
- package/dist/Theme/tokens/brands/meadow/palette.dark.d.ts.map +1 -0
- package/dist/Theme/tokens/brands/meadow/palette.dark.js +13 -0
- package/dist/Theme/tokens/brands/meadow/palette.light.d.ts +375 -0
- package/dist/Theme/tokens/brands/meadow/palette.light.d.ts.map +1 -0
- package/dist/Theme/tokens/brands/meadow/palette.light.js +133 -0
- package/dist/Theme/tokens/brands/radiant/palette.dark.d.ts +7 -0
- package/dist/Theme/tokens/brands/radiant/palette.dark.d.ts.map +1 -0
- package/dist/Theme/tokens/brands/radiant/palette.dark.js +13 -0
- package/dist/Theme/tokens/brands/radiant/palette.light.d.ts +375 -0
- package/dist/Theme/tokens/brands/radiant/palette.light.d.ts.map +1 -0
- package/dist/Theme/tokens/brands/radiant/palette.light.js +135 -0
- package/dist/Theme/tokens/brands/rosewood/palette.dark.d.ts +7 -0
- package/dist/Theme/tokens/brands/rosewood/palette.dark.d.ts.map +1 -0
- package/dist/Theme/tokens/brands/rosewood/palette.dark.js +13 -0
- package/dist/Theme/tokens/brands/rosewood/palette.light.d.ts +375 -0
- package/dist/Theme/tokens/brands/rosewood/palette.light.d.ts.map +1 -0
- package/dist/Theme/tokens/brands/rosewood/palette.light.js +139 -0
- package/dist/Theme/tokens/brands/skyline/palette.dark.d.ts +7 -0
- package/dist/Theme/tokens/brands/skyline/palette.dark.d.ts.map +1 -0
- package/dist/Theme/tokens/brands/skyline/palette.dark.js +13 -0
- package/dist/Theme/tokens/brands/skyline/palette.light.d.ts +375 -0
- package/dist/Theme/tokens/brands/skyline/palette.light.d.ts.map +1 -0
- package/dist/Theme/tokens/brands/skyline/palette.light.js +133 -0
- package/dist/Theme/tokens/brands/slate/palette.dark.d.ts +7 -0
- package/dist/Theme/tokens/brands/slate/palette.dark.d.ts.map +1 -0
- package/dist/Theme/tokens/brands/slate/palette.dark.js +13 -0
- package/dist/Theme/tokens/brands/slate/palette.light.d.ts +375 -0
- package/dist/Theme/tokens/brands/slate/palette.light.d.ts.map +1 -0
- package/dist/Theme/tokens/brands/slate/palette.light.js +137 -0
- package/dist/Theme/tokens/brands/storefront/palette.dark.d.ts +7 -0
- package/dist/Theme/tokens/brands/storefront/palette.dark.d.ts.map +1 -0
- package/dist/Theme/tokens/brands/storefront/palette.dark.js +13 -0
- package/dist/Theme/tokens/brands/storefront/palette.light.d.ts +375 -0
- package/dist/Theme/tokens/brands/storefront/palette.light.d.ts.map +1 -0
- package/dist/Theme/tokens/brands/storefront/palette.light.js +127 -0
- package/dist/Theme/tokens/brands/zinc/palette.dark.d.ts +204 -0
- package/dist/Theme/tokens/brands/zinc/palette.dark.d.ts.map +1 -0
- package/dist/Theme/tokens/brands/zinc/palette.dark.js +204 -0
- package/dist/Theme/tokens/brands/zinc/palette.light.d.ts +375 -0
- package/dist/Theme/tokens/brands/zinc/palette.light.d.ts.map +1 -0
- package/dist/Theme/tokens/brands/zinc/palette.light.js +383 -0
- package/dist/Theme/tokens/builders/accentText.d.ts +56 -0
- package/dist/Theme/tokens/builders/accentText.d.ts.map +1 -0
- package/dist/Theme/tokens/builders/accentText.js +92 -0
- package/dist/Theme/tokens/builders/buildBrandTokens.d.ts +16 -0
- package/dist/Theme/tokens/builders/buildBrandTokens.d.ts.map +1 -0
- package/dist/Theme/tokens/builders/buildBrandTokens.js +33 -0
- package/dist/Theme/tokens/builders/buildDarkPalette.d.ts +23 -0
- package/dist/Theme/tokens/builders/buildDarkPalette.d.ts.map +1 -0
- package/dist/Theme/tokens/builders/buildDarkPalette.js +282 -0
- package/dist/Theme/tokens/builders/chartColorsFromTheme.d.ts +17 -0
- package/dist/Theme/tokens/builders/chartColorsFromTheme.d.ts.map +1 -0
- package/dist/Theme/tokens/builders/chartColorsFromTheme.js +26 -0
- package/dist/Theme/tokens/builders/color.d.ts +50 -0
- package/dist/Theme/tokens/builders/color.d.ts.map +1 -0
- package/dist/Theme/tokens/builders/color.js +156 -0
- package/dist/Theme/tokens/builders/index.d.ts +6 -0
- package/dist/Theme/tokens/builders/index.d.ts.map +1 -0
- package/dist/Theme/tokens/builders/index.js +21 -0
- package/dist/Theme/tokens/index.d.ts +15 -0
- package/dist/Theme/tokens/index.d.ts.map +1 -0
- package/dist/Theme/tokens/index.js +30 -0
- package/dist/Theme/tokens/primitives/breakpoints.d.ts +9 -0
- package/dist/Theme/tokens/primitives/breakpoints.d.ts.map +1 -0
- package/dist/Theme/tokens/primitives/breakpoints.js +10 -0
- package/dist/Theme/tokens/primitives/index.d.ts +10 -0
- package/dist/Theme/tokens/primitives/index.d.ts.map +1 -0
- package/dist/Theme/tokens/primitives/index.js +27 -0
- package/dist/Theme/tokens/primitives/letterSpacings.d.ts +10 -0
- package/dist/Theme/tokens/primitives/letterSpacings.d.ts.map +1 -0
- package/dist/Theme/tokens/primitives/letterSpacings.js +11 -0
- package/dist/Theme/tokens/primitives/lineHeights.d.ts +19 -0
- package/dist/Theme/tokens/primitives/lineHeights.d.ts.map +1 -0
- package/dist/Theme/tokens/primitives/lineHeights.js +20 -0
- package/dist/Theme/tokens/primitives/radii.d.ts +13 -0
- package/dist/Theme/tokens/primitives/radii.d.ts.map +1 -0
- package/dist/Theme/tokens/primitives/radii.js +14 -0
- package/dist/Theme/tokens/primitives/shadows.d.ts +16 -0
- package/dist/Theme/tokens/primitives/shadows.d.ts.map +1 -0
- package/dist/Theme/tokens/primitives/shadows.js +17 -0
- package/dist/Theme/tokens/primitives/sizes.d.ts +63 -0
- package/dist/Theme/tokens/primitives/sizes.d.ts.map +1 -0
- package/dist/Theme/tokens/primitives/sizes.js +39 -0
- package/dist/Theme/tokens/primitives/space.d.ts +34 -0
- package/dist/Theme/tokens/primitives/space.d.ts.map +1 -0
- package/dist/Theme/tokens/primitives/space.js +35 -0
- package/dist/Theme/tokens/primitives/typography.d.ts +73 -0
- package/dist/Theme/tokens/primitives/typography.d.ts.map +1 -0
- package/dist/Theme/tokens/primitives/typography.js +43 -0
- package/dist/Theme/tokens/primitives/zIndices.d.ts +17 -0
- package/dist/Theme/tokens/primitives/zIndices.d.ts.map +1 -0
- package/dist/Theme/tokens/primitives/zIndices.js +18 -0
- package/dist/Theme/tokens/types.d.ts +116 -0
- package/dist/Theme/tokens/types.d.ts.map +1 -0
- package/dist/Theme/tokens/types.js +8 -0
- package/package.json +1 -1
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
import { ComponentStyleConfig, StyleFunctionProps } from "@chakra-ui/react";
|
|
2
|
+
export declare const componentStyles: {
|
|
3
|
+
Checkbox: ComponentStyleConfig;
|
|
4
|
+
Input: ComponentStyleConfig;
|
|
5
|
+
Button: ComponentStyleConfig;
|
|
6
|
+
Select: ComponentStyleConfig;
|
|
7
|
+
Tag: import("@chakra-ui/react").ComponentMultiStyleConfig;
|
|
8
|
+
Textarea: ComponentStyleConfig;
|
|
9
|
+
NumberInput: ComponentStyleConfig;
|
|
10
|
+
Badge: import("@chakra-ui/react").ComponentSingleStyleConfig;
|
|
11
|
+
FormError: import("@chakra-ui/react").ComponentSingleStyleConfig;
|
|
12
|
+
Drawer: {
|
|
13
|
+
baseStyle?: (({ theme }: StyleFunctionProps) => {
|
|
14
|
+
dialog: {
|
|
15
|
+
[x: string]: any;
|
|
16
|
+
bg: string;
|
|
17
|
+
color: any;
|
|
18
|
+
};
|
|
19
|
+
}) | undefined;
|
|
20
|
+
sizes?: {
|
|
21
|
+
[key: string]: import("@chakra-ui/react").PartsStyleInterpolation<{
|
|
22
|
+
keys: ("overlay" | "body" | "dialog" | "footer" | "header" | "closeButton" | "dialogContainer")[];
|
|
23
|
+
}>;
|
|
24
|
+
} | undefined;
|
|
25
|
+
variants?: {
|
|
26
|
+
[key: string]: import("@chakra-ui/react").PartsStyleInterpolation<{
|
|
27
|
+
keys: ("overlay" | "body" | "dialog" | "footer" | "header" | "closeButton" | "dialogContainer")[];
|
|
28
|
+
}>;
|
|
29
|
+
} | undefined;
|
|
30
|
+
defaultProps?: {
|
|
31
|
+
size?: string | number | undefined;
|
|
32
|
+
variant?: string | number | undefined;
|
|
33
|
+
colorScheme?: string | undefined;
|
|
34
|
+
} | undefined;
|
|
35
|
+
parts: ("overlay" | "body" | "dialog" | "footer" | "header" | "closeButton" | "dialogContainer")[];
|
|
36
|
+
};
|
|
37
|
+
Menu: {
|
|
38
|
+
baseStyle?: (({ theme }: StyleFunctionProps) => {
|
|
39
|
+
list: {
|
|
40
|
+
[x: string]: any;
|
|
41
|
+
bg: string;
|
|
42
|
+
color: any;
|
|
43
|
+
};
|
|
44
|
+
item: {
|
|
45
|
+
bg: string;
|
|
46
|
+
_focus: {
|
|
47
|
+
[x: string]: any;
|
|
48
|
+
bg: string;
|
|
49
|
+
};
|
|
50
|
+
_hover: {
|
|
51
|
+
[x: string]: any;
|
|
52
|
+
bg: string;
|
|
53
|
+
};
|
|
54
|
+
_active: {
|
|
55
|
+
[x: string]: any;
|
|
56
|
+
bg: string;
|
|
57
|
+
};
|
|
58
|
+
_expanded: {
|
|
59
|
+
[x: string]: any;
|
|
60
|
+
bg: string;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
}) | undefined;
|
|
64
|
+
sizes?: {
|
|
65
|
+
[key: string]: import("@chakra-ui/react").PartsStyleInterpolation<{
|
|
66
|
+
keys: ("button" | "list" | "icon" | "item" | "groupTitle" | "command" | "divider")[];
|
|
67
|
+
}>;
|
|
68
|
+
} | undefined;
|
|
69
|
+
variants?: {
|
|
70
|
+
[key: string]: import("@chakra-ui/react").PartsStyleInterpolation<{
|
|
71
|
+
keys: ("button" | "list" | "icon" | "item" | "groupTitle" | "command" | "divider")[];
|
|
72
|
+
}>;
|
|
73
|
+
} | undefined;
|
|
74
|
+
defaultProps?: {
|
|
75
|
+
size?: string | number | undefined;
|
|
76
|
+
variant?: string | number | undefined;
|
|
77
|
+
colorScheme?: string | undefined;
|
|
78
|
+
} | undefined;
|
|
79
|
+
parts: ("button" | "list" | "icon" | "item" | "groupTitle" | "command" | "divider")[];
|
|
80
|
+
};
|
|
81
|
+
Modal: {
|
|
82
|
+
baseStyle?: (({ theme }: StyleFunctionProps) => {
|
|
83
|
+
dialog: {
|
|
84
|
+
[x: string]: any;
|
|
85
|
+
bg: string;
|
|
86
|
+
color: any;
|
|
87
|
+
};
|
|
88
|
+
}) | undefined;
|
|
89
|
+
sizes?: {
|
|
90
|
+
[key: string]: import("@chakra-ui/react").PartsStyleInterpolation<{
|
|
91
|
+
keys: ("overlay" | "body" | "dialog" | "footer" | "header" | "closeButton" | "dialogContainer")[];
|
|
92
|
+
}>;
|
|
93
|
+
} | undefined;
|
|
94
|
+
variants?: {
|
|
95
|
+
[key: string]: import("@chakra-ui/react").PartsStyleInterpolation<{
|
|
96
|
+
keys: ("overlay" | "body" | "dialog" | "footer" | "header" | "closeButton" | "dialogContainer")[];
|
|
97
|
+
}>;
|
|
98
|
+
} | undefined;
|
|
99
|
+
defaultProps?: {
|
|
100
|
+
size?: string | number | undefined;
|
|
101
|
+
variant?: string | number | undefined;
|
|
102
|
+
colorScheme?: string | undefined;
|
|
103
|
+
} | undefined;
|
|
104
|
+
parts: ("overlay" | "body" | "dialog" | "footer" | "header" | "closeButton" | "dialogContainer")[];
|
|
105
|
+
};
|
|
106
|
+
Popover: {
|
|
107
|
+
baseStyle?: (({ theme }: StyleFunctionProps) => {
|
|
108
|
+
content: {
|
|
109
|
+
[x: string]: any;
|
|
110
|
+
bg: string;
|
|
111
|
+
color: any;
|
|
112
|
+
};
|
|
113
|
+
}) | undefined;
|
|
114
|
+
sizes?: {
|
|
115
|
+
[key: string]: import("@chakra-ui/react").PartsStyleInterpolation<{
|
|
116
|
+
keys: ("content" | "body" | "footer" | "header" | "closeButton" | "popper" | "arrow")[];
|
|
117
|
+
}>;
|
|
118
|
+
} | undefined;
|
|
119
|
+
variants?: {
|
|
120
|
+
[key: string]: import("@chakra-ui/react").PartsStyleInterpolation<{
|
|
121
|
+
keys: ("content" | "body" | "footer" | "header" | "closeButton" | "popper" | "arrow")[];
|
|
122
|
+
}>;
|
|
123
|
+
} | undefined;
|
|
124
|
+
defaultProps?: {
|
|
125
|
+
size?: string | number | undefined;
|
|
126
|
+
variant?: string | number | undefined;
|
|
127
|
+
colorScheme?: string | undefined;
|
|
128
|
+
} | undefined;
|
|
129
|
+
parts: ("content" | "body" | "footer" | "header" | "closeButton" | "popper" | "arrow")[];
|
|
130
|
+
};
|
|
131
|
+
Slider: {
|
|
132
|
+
baseStyle?: (({ theme }: StyleFunctionProps) => {
|
|
133
|
+
thumb: {
|
|
134
|
+
[x: string]: any;
|
|
135
|
+
bg: string;
|
|
136
|
+
};
|
|
137
|
+
}) | undefined;
|
|
138
|
+
sizes?: {
|
|
139
|
+
[key: string]: import("@chakra-ui/react").PartsStyleInterpolation<{
|
|
140
|
+
keys: ("container" | "mark" | "track" | "filledTrack" | "thumb")[];
|
|
141
|
+
}>;
|
|
142
|
+
} | undefined;
|
|
143
|
+
variants?: {
|
|
144
|
+
[key: string]: import("@chakra-ui/react").PartsStyleInterpolation<{
|
|
145
|
+
keys: ("container" | "mark" | "track" | "filledTrack" | "thumb")[];
|
|
146
|
+
}>;
|
|
147
|
+
} | undefined;
|
|
148
|
+
defaultProps?: {
|
|
149
|
+
size?: string | number | undefined;
|
|
150
|
+
variant?: string | number | undefined;
|
|
151
|
+
colorScheme?: string | undefined;
|
|
152
|
+
} | undefined;
|
|
153
|
+
parts: ("container" | "mark" | "track" | "filledTrack" | "thumb")[];
|
|
154
|
+
};
|
|
155
|
+
Switch: {
|
|
156
|
+
baseStyle?: (({ theme }: StyleFunctionProps) => {
|
|
157
|
+
thumb: {
|
|
158
|
+
[x: string]: any;
|
|
159
|
+
bg: string;
|
|
160
|
+
};
|
|
161
|
+
}) | undefined;
|
|
162
|
+
sizes?: {
|
|
163
|
+
[key: string]: import("@chakra-ui/react").PartsStyleInterpolation<{
|
|
164
|
+
keys: ("container" | "label" | "track" | "thumb")[];
|
|
165
|
+
}>;
|
|
166
|
+
} | undefined;
|
|
167
|
+
variants?: {
|
|
168
|
+
[key: string]: import("@chakra-ui/react").PartsStyleInterpolation<{
|
|
169
|
+
keys: ("container" | "label" | "track" | "thumb")[];
|
|
170
|
+
}>;
|
|
171
|
+
} | undefined;
|
|
172
|
+
defaultProps?: {
|
|
173
|
+
size?: string | number | undefined;
|
|
174
|
+
variant?: string | number | undefined;
|
|
175
|
+
colorScheme?: string | undefined;
|
|
176
|
+
} | undefined;
|
|
177
|
+
parts: ("container" | "label" | "track" | "thumb")[];
|
|
178
|
+
};
|
|
179
|
+
Tabs: {
|
|
180
|
+
baseStyle?: import("@chakra-ui/react").PartsStyleInterpolation<{
|
|
181
|
+
keys: ("tab" | "tablist" | "tabpanel" | "tabpanels" | "root" | "indicator")[];
|
|
182
|
+
}> | undefined;
|
|
183
|
+
sizes?: {
|
|
184
|
+
[key: string]: import("@chakra-ui/react").PartsStyleInterpolation<{
|
|
185
|
+
keys: ("tab" | "tablist" | "tabpanel" | "tabpanels" | "root" | "indicator")[];
|
|
186
|
+
}>;
|
|
187
|
+
} | undefined;
|
|
188
|
+
variants?: {
|
|
189
|
+
enclosed: ({ theme }: StyleFunctionProps) => {
|
|
190
|
+
tab: {
|
|
191
|
+
_selected: {
|
|
192
|
+
[x: string]: any;
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
};
|
|
196
|
+
"enclosed-colored": ({ theme }: StyleFunctionProps) => {
|
|
197
|
+
tab: {
|
|
198
|
+
_selected: {
|
|
199
|
+
[x: string]: any;
|
|
200
|
+
};
|
|
201
|
+
};
|
|
202
|
+
};
|
|
203
|
+
} | undefined;
|
|
204
|
+
defaultProps?: {
|
|
205
|
+
size?: string | number | undefined;
|
|
206
|
+
variant?: "enclosed" | "enclosed-colored" | undefined;
|
|
207
|
+
colorScheme?: string | undefined;
|
|
208
|
+
} | undefined;
|
|
209
|
+
parts: ("tab" | "tablist" | "tabpanel" | "tabpanels" | "root" | "indicator")[];
|
|
210
|
+
};
|
|
211
|
+
Avatar: {
|
|
212
|
+
baseStyle?: (({ theme }: StyleFunctionProps) => {
|
|
213
|
+
badge: {
|
|
214
|
+
[x: string]: any;
|
|
215
|
+
};
|
|
216
|
+
container: {
|
|
217
|
+
[x: string]: any;
|
|
218
|
+
};
|
|
219
|
+
}) | undefined;
|
|
220
|
+
sizes?: {
|
|
221
|
+
[key: string]: import("@chakra-ui/react").PartsStyleInterpolation<{
|
|
222
|
+
keys: ("container" | "label" | "group" | "badge" | "excessLabel")[];
|
|
223
|
+
}>;
|
|
224
|
+
} | undefined;
|
|
225
|
+
variants?: {
|
|
226
|
+
[key: string]: import("@chakra-ui/react").PartsStyleInterpolation<{
|
|
227
|
+
keys: ("container" | "label" | "group" | "badge" | "excessLabel")[];
|
|
228
|
+
}>;
|
|
229
|
+
} | undefined;
|
|
230
|
+
defaultProps?: {
|
|
231
|
+
size?: string | number | undefined;
|
|
232
|
+
variant?: string | number | undefined;
|
|
233
|
+
colorScheme?: string | undefined;
|
|
234
|
+
} | undefined;
|
|
235
|
+
parts: ("container" | "label" | "group" | "badge" | "excessLabel")[];
|
|
236
|
+
};
|
|
237
|
+
Skeleton: import("@chakra-ui/react").ComponentSingleStyleConfig;
|
|
238
|
+
Tooltip: import("@chakra-ui/react").ComponentSingleStyleConfig;
|
|
239
|
+
};
|
|
240
|
+
//# sourceMappingURL=componentStyles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"componentStyles.d.ts","sourceRoot":"","sources":["../../../src/Theme/chakra/componentStyles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAU,MAAM,kBAAkB,CAAC;AA4HpF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoB3B,CAAC"}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.componentStyles = void 0;
|
|
4
|
+
const react_1 = require("@chakra-ui/react");
|
|
5
|
+
const Button_styles_1 = require("../../Components/Button/Button.styles");
|
|
6
|
+
const Checkbox_styles_1 = require("../../Components/Checkbox/Checkbox.styles");
|
|
7
|
+
const TextInput_styles_1 = require("../../Components/Input/TextInput.styles");
|
|
8
|
+
const Select_styles_1 = require("../../Components/Select/Select.styles");
|
|
9
|
+
const Tag_styles_1 = require("../../Components/Tag/Tag.styles");
|
|
10
|
+
const InputTextArea_style_1 = require("../../Components/InputTextArea/InputTextArea.style");
|
|
11
|
+
const NumberInput_styles_1 = require("../../Components/NumberInput/NumberInput.styles");
|
|
12
|
+
const accentText_1 = require("../tokens/builders/accentText");
|
|
13
|
+
const color_1 = require("../tokens/builders/color");
|
|
14
|
+
const Drawer_styles_1 = require("./Drawer.styles");
|
|
15
|
+
const Menu_styles_1 = require("./Menu.styles");
|
|
16
|
+
const Modal_styles_1 = require("./Modal.styles");
|
|
17
|
+
const Popover_styles_1 = require("./Popover.styles");
|
|
18
|
+
const Slider_styles_1 = require("./Slider.styles");
|
|
19
|
+
const Switch_styles_1 = require("./Switch.styles");
|
|
20
|
+
const Tabs_styles_1 = require("./Tabs.styles");
|
|
21
|
+
const Avatar_styles_1 = require("./Avatar.styles");
|
|
22
|
+
// `colorScheme` accepts any Chakra scale, including built-ins we never themed (blackAlpha,
|
|
23
|
+
// whiteAlpha) whose rungs are translucent `rgba(...)` strings, not opaque hex — our contrast
|
|
24
|
+
// math (hexToRgb) throws on those on purpose (see color.ts). Guard so those scales fall back to
|
|
25
|
+
// Chakra's own original fixed rung instead of computing contrast on a color it can't parse.
|
|
26
|
+
const isHexColor = (color) => typeof color === "string" && /^#([0-9a-f]{3}|[0-9a-f]{6})$/i.test(color);
|
|
27
|
+
// Badge isn't its own component family (no Components/Badge/), so its style config lives here —
|
|
28
|
+
// Chakra's stock `solid` variant hardcodes a white label on a variable fill, same AA gap Tag had.
|
|
29
|
+
const Badge = {
|
|
30
|
+
variants: {
|
|
31
|
+
solid: ({ theme, colorScheme = "gray" }) => {
|
|
32
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
33
|
+
const swatch = (_d = (_b = (_a = theme.colors) === null || _a === void 0 ? void 0 : _a[colorScheme]) !== null && _b !== void 0 ? _b : (_c = theme.colors) === null || _c === void 0 ? void 0 : _c.gray) !== null && _d !== void 0 ? _d : {};
|
|
34
|
+
const bg = swatch === null || swatch === void 0 ? void 0 : swatch[500];
|
|
35
|
+
const white = (_f = (_e = theme.colors) === null || _e === void 0 ? void 0 : _e.white) !== null && _f !== void 0 ? _f : "#fff";
|
|
36
|
+
const black = (_h = (_g = theme.colors) === null || _g === void 0 ? void 0 : _g.black) !== null && _h !== void 0 ? _h : "#000";
|
|
37
|
+
return {
|
|
38
|
+
bg,
|
|
39
|
+
color: isHexColor(bg) ? (0, accentText_1.onFilled)(bg, white, black) : swatch === null || swatch === void 0 ? void 0 : swatch[800],
|
|
40
|
+
};
|
|
41
|
+
},
|
|
42
|
+
// Chakra's stock `subtle` picks its bg/color pair via `mode()`, keyed to Chakra's own
|
|
43
|
+
// colorMode — which this app never toggles (dark mode swaps the palette object instead), so
|
|
44
|
+
// it always takes the light-mode branch. Applied to our mode-reversed dark scales, that
|
|
45
|
+
// branch's fixed rung pair (100/800) measures 4.06 in dark mode, just under AA.
|
|
46
|
+
subtle: ({ theme, colorScheme = "gray" }) => {
|
|
47
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
48
|
+
const swatch = (_d = (_b = (_a = theme.colors) === null || _a === void 0 ? void 0 : _a[colorScheme]) !== null && _b !== void 0 ? _b : (_c = theme.colors) === null || _c === void 0 ? void 0 : _c.gray) !== null && _d !== void 0 ? _d : {};
|
|
49
|
+
const bg = (_e = swatch === null || swatch === void 0 ? void 0 : swatch[100]) !== null && _e !== void 0 ? _e : swatch === null || swatch === void 0 ? void 0 : swatch[50];
|
|
50
|
+
if (!isHexColor(bg))
|
|
51
|
+
return { bg, color: swatch === null || swatch === void 0 ? void 0 : swatch[800] };
|
|
52
|
+
// accentTextOnCanvas keeps brand hue by trying this scale's own rungs first, but some
|
|
53
|
+
// narrow-gamut hues (e.g. yellow) don't reach far enough at either end to clear AA against
|
|
54
|
+
// every bg they can land on in dark mode (measured 4.42 for a reversed-yellow badge) — its
|
|
55
|
+
// own doc admits it falls back to "the most extreme rung" rather than guaranteeing AA. Verify
|
|
56
|
+
// the candidate actually clears AA; if not, drop brand hue for the guaranteed white/black ink
|
|
57
|
+
// (onFilled is provably >=4.5 against any bg) rather than ship a near-miss.
|
|
58
|
+
const accent = (0, accentText_1.accentTextOnCanvas)(swatch, bg);
|
|
59
|
+
if ((0, color_1.contrastRatio)(accent, bg) >= 4.5)
|
|
60
|
+
return { bg, color: accent };
|
|
61
|
+
const white = (_g = (_f = theme.colors) === null || _f === void 0 ? void 0 : _f.white) !== null && _g !== void 0 ? _g : "#fff";
|
|
62
|
+
const black = (_j = (_h = theme.colors) === null || _h === void 0 ? void 0 : _h.black) !== null && _j !== void 0 ? _j : "#000";
|
|
63
|
+
return { bg, color: (0, accentText_1.onFilled)(bg, white, black) };
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
defaultProps: {
|
|
67
|
+
variant: "subtle",
|
|
68
|
+
colorScheme: "gray",
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
// Chakra's stock FormErrorMessage hardcodes `colors.red.500` (our own `red[500]`, since
|
|
72
|
+
// `createBrandTheme` sets `theme.colors = palette`) — same AA gap as our own ErrorMessage/
|
|
73
|
+
// ErrorComponent, fixed the same way rather than leaving Chakra's raw usage (e.g. FeedbackForm)
|
|
74
|
+
// unfixed.
|
|
75
|
+
const FormError = {
|
|
76
|
+
baseStyle: ({ theme }) => {
|
|
77
|
+
var _a, _b, _c, _d;
|
|
78
|
+
// `icon` (FormErrorIcon) shares the same AA gap as `text` — both must be fixed together or
|
|
79
|
+
// the icon stays on Chakra's raw `red.500`.
|
|
80
|
+
const color = (0, accentText_1.accentTextOnCanvas)((_a = theme.colors) === null || _a === void 0 ? void 0 : _a.red, (_d = (_c = (_b = theme.colors) === null || _b === void 0 ? void 0 : _b.backgroundColor) === null || _c === void 0 ? void 0 : _c.main) !== null && _d !== void 0 ? _d : "#ffffff");
|
|
81
|
+
return {
|
|
82
|
+
text: { color },
|
|
83
|
+
icon: { color },
|
|
84
|
+
};
|
|
85
|
+
},
|
|
86
|
+
};
|
|
87
|
+
const $tooltipBg = (0, react_1.cssVar)("tooltip-bg");
|
|
88
|
+
const $tooltipFg = (0, react_1.cssVar)("tooltip-fg");
|
|
89
|
+
/**
|
|
90
|
+
* Chakra's own Tooltip baseStyle hardcodes `--tooltip-bg`/`--tooltip-fg` to `colors.gray.700`/
|
|
91
|
+
* `colors.whiteAlpha.900` (gated behind `_dark`, which this theme-swap app never triggers — see
|
|
92
|
+
* Menu.styles.ts / createBrandTheme's colorMode comment). Our reversed dark gray ramp makes
|
|
93
|
+
* `gray.700` LIGHT (~L79), so every bare `<Tooltip>` renders a near-white bubble with near-white
|
|
94
|
+
* text on the dark canvas — invisible. A tooltip floats over arbitrary content in either mode, so
|
|
95
|
+
* unlike Menu/Modal/Drawer (which follow the canvas) it needs a FIXED high-contrast chip that
|
|
96
|
+
* doesn't invert with the palette — `black`/`white` are exactly the two tokens `buildDarkPalette`
|
|
97
|
+
* deliberately never remaps, so they stay a stable dark-bg/white-text pair in both modes.
|
|
98
|
+
*/
|
|
99
|
+
const Tooltip = {
|
|
100
|
+
baseStyle: ({ theme }) => {
|
|
101
|
+
var _a, _b, _c, _d;
|
|
102
|
+
return ({
|
|
103
|
+
[$tooltipBg.variable]: (_b = (_a = theme.colors) === null || _a === void 0 ? void 0 : _a.black) !== null && _b !== void 0 ? _b : "colors.gray.700",
|
|
104
|
+
[$tooltipFg.variable]: (_d = (_c = theme.colors) === null || _c === void 0 ? void 0 : _c.white) !== null && _d !== void 0 ? _d : "colors.whiteAlpha.900",
|
|
105
|
+
});
|
|
106
|
+
},
|
|
107
|
+
};
|
|
108
|
+
const $skeletonStart = (0, react_1.cssVar)("skeleton-start-color");
|
|
109
|
+
const $skeletonEnd = (0, react_1.cssVar)("skeleton-end-color");
|
|
110
|
+
/**
|
|
111
|
+
* Chakra's own Skeleton baseStyle hardcodes `--skeleton-start-color`/`--skeleton-end-color` to
|
|
112
|
+
* `colors.gray.100`/`colors.gray.400` the same `_dark`-gated way Menu/Popover did (Wave G/H), so
|
|
113
|
+
* every bare `<Skeleton>` shimmers between two near-white tones on the dark canvas. Fixed at the
|
|
114
|
+
* theme level rather than in `Skeletons.tsx`: Chakra's `Skeleton` only writes these vars from its
|
|
115
|
+
* `startColor`/`endColor` PROPS when a caller actually passes them (`useToken` on an empty string
|
|
116
|
+
* resolves to `undefined`, so the prop-driven `cssVarStyles` object stays empty) — an explicit
|
|
117
|
+
* prop still wins via that mechanism, this only supplies the default the base style already owns.
|
|
118
|
+
*/
|
|
119
|
+
const Skeleton = {
|
|
120
|
+
baseStyle: ({ theme }) => {
|
|
121
|
+
var _a, _b, _c, _d, _e, _f;
|
|
122
|
+
return ({
|
|
123
|
+
[$skeletonStart.variable]: (_c = (_b = (_a = theme.colors) === null || _a === void 0 ? void 0 : _a.gray) === null || _b === void 0 ? void 0 : _b[100]) !== null && _c !== void 0 ? _c : "colors.gray.100",
|
|
124
|
+
[$skeletonEnd.variable]: (_f = (_e = (_d = theme.colors) === null || _d === void 0 ? void 0 : _d.gray) === null || _e === void 0 ? void 0 : _e[300]) !== null && _f !== void 0 ? _f : "colors.gray.400",
|
|
125
|
+
background: $skeletonStart.reference,
|
|
126
|
+
borderColor: $skeletonEnd.reference,
|
|
127
|
+
});
|
|
128
|
+
},
|
|
129
|
+
};
|
|
130
|
+
exports.componentStyles = {
|
|
131
|
+
Checkbox: Checkbox_styles_1.Checkbox,
|
|
132
|
+
Input: TextInput_styles_1.Input,
|
|
133
|
+
Button: Button_styles_1.Button,
|
|
134
|
+
Select: Select_styles_1.Select,
|
|
135
|
+
Tag: Tag_styles_1.Tag,
|
|
136
|
+
Textarea: InputTextArea_style_1.Textarea,
|
|
137
|
+
NumberInput: NumberInput_styles_1.NumberInput,
|
|
138
|
+
Badge,
|
|
139
|
+
FormError,
|
|
140
|
+
Drawer: Drawer_styles_1.Drawer,
|
|
141
|
+
Menu: Menu_styles_1.Menu,
|
|
142
|
+
Modal: Modal_styles_1.Modal,
|
|
143
|
+
Popover: Popover_styles_1.Popover,
|
|
144
|
+
Slider: Slider_styles_1.Slider,
|
|
145
|
+
Switch: Switch_styles_1.Switch,
|
|
146
|
+
Tabs: Tabs_styles_1.Tabs,
|
|
147
|
+
Avatar: Avatar_styles_1.Avatar,
|
|
148
|
+
Skeleton,
|
|
149
|
+
Tooltip,
|
|
150
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { PaletteProps, ResolvedColorMode } from "../tokens/types";
|
|
2
|
+
export interface CreateBrandThemeOptions {
|
|
3
|
+
/** Which palette this theme represents. Defaults to `light`. */
|
|
4
|
+
colorMode?: ResolvedColorMode;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Builds a Chakra theme from a pure brand palette.
|
|
8
|
+
*
|
|
9
|
+
* Replaces the seven byte-identical `<Brand>/theme.ts` files — they differed only in
|
|
10
|
+
* which palette they imported.
|
|
11
|
+
*
|
|
12
|
+
* Dark mode works by swapping which palette the theme carries: `componentStyles` variants
|
|
13
|
+
* are functions of `({ theme })` and `useCustomTheme()` reads `theme.colors`, so both follow
|
|
14
|
+
* the palette automatically without any per-component `_dark` overrides.
|
|
15
|
+
*/
|
|
16
|
+
export declare const createBrandTheme: (palette: PaletteProps, options?: CreateBrandThemeOptions) => Record<string, any>;
|
|
17
|
+
export default createBrandTheme;
|
|
18
|
+
//# sourceMappingURL=createBrandTheme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createBrandTheme.d.ts","sourceRoot":"","sources":["../../../src/Theme/chakra/createBrandTheme.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAMvE,MAAM,WAAW,uBAAuB;IACtC,gEAAgE;IAChE,SAAS,CAAC,EAAE,iBAAiB,CAAC;CAC/B;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB,GAC3B,SAAS,YAAY,EACrB,UAAS,uBAA4B,wBAwDtC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.createBrandTheme = void 0;
|
|
7
|
+
const react_1 = require("@chakra-ui/react");
|
|
8
|
+
const common_web_1 = __importDefault(require("./common.web"));
|
|
9
|
+
const fonts_web_1 = __importDefault(require("./fonts.web"));
|
|
10
|
+
const componentStyles_1 = require("./componentStyles");
|
|
11
|
+
/**
|
|
12
|
+
* Builds a Chakra theme from a pure brand palette.
|
|
13
|
+
*
|
|
14
|
+
* Replaces the seven byte-identical `<Brand>/theme.ts` files — they differed only in
|
|
15
|
+
* which palette they imported.
|
|
16
|
+
*
|
|
17
|
+
* Dark mode works by swapping which palette the theme carries: `componentStyles` variants
|
|
18
|
+
* are functions of `({ theme })` and `useCustomTheme()` reads `theme.colors`, so both follow
|
|
19
|
+
* the palette automatically without any per-component `_dark` overrides.
|
|
20
|
+
*/
|
|
21
|
+
const createBrandTheme = (palette, options = {}) => {
|
|
22
|
+
var _a;
|
|
23
|
+
const colorMode = (_a = options.colorMode) !== null && _a !== void 0 ? _a : "light";
|
|
24
|
+
const brand = {
|
|
25
|
+
colors: palette,
|
|
26
|
+
...fonts_web_1.default,
|
|
27
|
+
...common_web_1.default,
|
|
28
|
+
};
|
|
29
|
+
return (0, react_1.extendTheme)({
|
|
30
|
+
...brand,
|
|
31
|
+
config: {
|
|
32
|
+
...common_web_1.default.config,
|
|
33
|
+
// Deliberately ALWAYS "light", even for the dark theme — this is not a bug.
|
|
34
|
+
//
|
|
35
|
+
// Dark works by swapping the palette, so the palette is ALREADY mode-adapted by the time
|
|
36
|
+
// Chakra sees it. Telling Chakra it is in dark mode makes it adapt a second time: its
|
|
37
|
+
// built-ins carry `_dark` blocks that reach for `gray.700`/`gray.800` assuming a scale where
|
|
38
|
+
// those rungs are dark. Our dark gray ramp runs dark -> light, so those rungs are LIGHT —
|
|
39
|
+
// producing a light Card/Skeleton/Menu on a dark canvas. Adapting twice cancels out.
|
|
40
|
+
//
|
|
41
|
+
// Keeping Chakra on its `_light` branch is what makes the swap work: those defaults are
|
|
42
|
+
// gray-RUNG references (`gray.100`, `gray.200`, `gray.600`), and our reversed ramp already
|
|
43
|
+
// maps each rung to the right value per mode. `semanticTokens` below patches the one default
|
|
44
|
+
// that hardcodes a literal color instead of a rung.
|
|
45
|
+
initialColorMode: "light",
|
|
46
|
+
useSystemColorMode: false,
|
|
47
|
+
},
|
|
48
|
+
// `chakra-body-bg` is the only stock semantic token that resolves to a LITERAL (`white`)
|
|
49
|
+
// rather than a gray rung, so it is the only one the palette swap cannot correct on its own —
|
|
50
|
+
// it is what paints a white Card/Modal/Menu on the dark canvas. `background[50]` is the
|
|
51
|
+
// canvas-following equivalent: byte-identical `#ffffff` in light, the canvas in dark.
|
|
52
|
+
// `chakra-inverse-text` is the same literal-`white` problem in text form.
|
|
53
|
+
semanticTokens: {
|
|
54
|
+
colors: {
|
|
55
|
+
"chakra-body-bg": palette.background[50],
|
|
56
|
+
"chakra-inverse-text": palette.background[50],
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
// Light themes intentionally declare no global styles — that is the pre-existing
|
|
60
|
+
// behavior, and adding any would shift every consuming app's light rendering.
|
|
61
|
+
// Dark needs a canvas, otherwise the page stays white behind the components.
|
|
62
|
+
...(colorMode === "dark"
|
|
63
|
+
? {
|
|
64
|
+
styles: {
|
|
65
|
+
global: {
|
|
66
|
+
body: {
|
|
67
|
+
bg: palette.backgroundColor.main,
|
|
68
|
+
color: palette.text[900],
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
}
|
|
73
|
+
: {}),
|
|
74
|
+
components: componentStyles_1.componentStyles,
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
exports.createBrandTheme = createBrandTheme;
|
|
78
|
+
exports.default = exports.createBrandTheme;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/** Self-hosted Inter Variable (wght 100–900); required for theme fontWeights to render correctly. */
|
|
2
|
+
import "@fontsource-variable/inter/index.css";
|
|
3
|
+
/**
|
|
4
|
+
* Web font binding: loads the Inter font face (CSS side-effect) and re-exports the pure
|
|
5
|
+
* typography tokens. The CSS import lives here rather than in `tokens/` so the token
|
|
6
|
+
* layer stays portable to mobile.
|
|
7
|
+
*/
|
|
8
|
+
declare const fonts: {
|
|
9
|
+
fonts: {
|
|
10
|
+
body: string;
|
|
11
|
+
heading: string;
|
|
12
|
+
mono: string;
|
|
13
|
+
};
|
|
14
|
+
fontSizes: {
|
|
15
|
+
xs: string;
|
|
16
|
+
sm: string;
|
|
17
|
+
md: string;
|
|
18
|
+
lg: string;
|
|
19
|
+
xl: string;
|
|
20
|
+
"2xl": string;
|
|
21
|
+
"3xl": string;
|
|
22
|
+
"4xl": string;
|
|
23
|
+
"5xl": string;
|
|
24
|
+
"6xl": string;
|
|
25
|
+
"7xl": string;
|
|
26
|
+
"8xl": string;
|
|
27
|
+
"9xl": string;
|
|
28
|
+
};
|
|
29
|
+
fontWeights: {
|
|
30
|
+
hairline: number;
|
|
31
|
+
thin: number;
|
|
32
|
+
light: number;
|
|
33
|
+
normal: number;
|
|
34
|
+
medium: number;
|
|
35
|
+
semibold: number;
|
|
36
|
+
bold: number;
|
|
37
|
+
extrabold: number;
|
|
38
|
+
black: number;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
export default fonts;
|
|
42
|
+
//# sourceMappingURL=fonts.web.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fonts.web.d.ts","sourceRoot":"","sources":["../../../src/Theme/chakra/fonts.web.ts"],"names":[],"mappings":"AAAA,qGAAqG;AACrG,OAAO,sCAAsC,CAAC;AAG9C;;;;GAIG;AACH,QAAA,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAa,CAAC;AAEzB,eAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
/** Self-hosted Inter Variable (wght 100–900); required for theme fontWeights to render correctly. */
|
|
7
|
+
require("@fontsource-variable/inter/index.css");
|
|
8
|
+
const typography_1 = __importDefault(require("../tokens/primitives/typography"));
|
|
9
|
+
/**
|
|
10
|
+
* Web font binding: loads the Inter font face (CSS side-effect) and re-exports the pure
|
|
11
|
+
* typography tokens. The CSS import lives here rather than in `tokens/` so the token
|
|
12
|
+
* layer stays portable to mobile.
|
|
13
|
+
*/
|
|
14
|
+
const fonts = typography_1.default;
|
|
15
|
+
exports.default = fonts;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { ColorMode, ResolvedColorMode, ThemeName } from "../tokens/types";
|
|
3
|
+
export type ThemeModeContextValue = {
|
|
4
|
+
mode: ColorMode;
|
|
5
|
+
resolvedMode: ResolvedColorMode;
|
|
6
|
+
setMode: (mode: ColorMode) => void;
|
|
7
|
+
toggle: () => void;
|
|
8
|
+
brand: ThemeName;
|
|
9
|
+
setBrand: (brand: ThemeName) => void;
|
|
10
|
+
};
|
|
11
|
+
export type PixelizeThemeProviderProps = {
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
/** Initial brand. A persisted brand wins over this. */
|
|
14
|
+
brand?: ThemeName;
|
|
15
|
+
/** Initial color mode. A persisted mode wins over this. */
|
|
16
|
+
defaultMode?: ColorMode;
|
|
17
|
+
storageKey?: string;
|
|
18
|
+
disablePersistence?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* App-specific theme overrides (fonts, sizes, component defaultProps, zIndices, ...) merged
|
|
21
|
+
* onto the resolved `brandThemes[brand][resolvedMode]` via `extendTheme`. Re-evaluated whenever
|
|
22
|
+
* `brand`/`resolvedMode` change, so overrides always layer onto the CURRENT palette rather than
|
|
23
|
+
* a stale one. Safe to merge post-resolution: `createBrandTheme` already fixes
|
|
24
|
+
* `config.initialColorMode` to `"light"` on every palette, and `extendTheme` is a pure additive
|
|
25
|
+
* merge — it does not re-derive `_dark:` blocks or re-run color-mode resolution, so this cannot
|
|
26
|
+
* reintroduce the double-adaptation bug `forcedLightColorModeManager` avoids (see above).
|
|
27
|
+
*/
|
|
28
|
+
themeOverrides?: Record<string, unknown>;
|
|
29
|
+
};
|
|
30
|
+
export declare const ThemeModeContext: React.Context<ThemeModeContextValue | undefined>;
|
|
31
|
+
/**
|
|
32
|
+
* Chakra's own color mode is deliberately NOT synced to `resolvedMode`, and must not be.
|
|
33
|
+
*
|
|
34
|
+
* This provider adapts for dark by swapping the palette, so `theme.colors` is already correct for
|
|
35
|
+
* the active mode. Putting Chakra into dark mode on top of that adapts a second time: its built-in
|
|
36
|
+
* `_dark` blocks reach for `gray.700`/`gray.800` expecting those rungs to be dark, but our dark
|
|
37
|
+
* ramp runs dark -> light, so they resolve LIGHT — a white Card/Skeleton/Menu on a dark canvas.
|
|
38
|
+
* A previous revision synced it to keep `useColorModeValue()` working and shipped exactly that.
|
|
39
|
+
*
|
|
40
|
+
* Consequence for consumers: `useColorModeValue(light, dark)` always returns its LIGHT argument.
|
|
41
|
+
* That is correct here — the palette has already resolved the mode, so the "light" argument is
|
|
42
|
+
* whatever the active palette says. Read the mode from `useThemeMode()` instead. Existing apps are
|
|
43
|
+
* unaffected: they are light-only, where that argument was always the one returned anyway.
|
|
44
|
+
*/
|
|
45
|
+
export declare const PixelizeThemeProvider: ({ children, brand: brandProp, defaultMode, storageKey, disablePersistence, themeOverrides, }: PixelizeThemeProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
//# sourceMappingURL=PixelizeThemeProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PixelizeThemeProvider.d.ts","sourceRoot":"","sources":["../../../src/Theme/provider/PixelizeThemeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAON,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAU/E,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,SAAS,CAAC;IAChB,YAAY,EAAE,iBAAiB,CAAC;IAChC,OAAO,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;IACnC,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,KAAK,EAAE,SAAS,CAAC;IACjB,QAAQ,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;CACtC,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACvC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,uDAAuD;IACvD,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,2DAA2D;IAC3D,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;;;;;;;OAQG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC1C,CAAC;AA2BF,eAAO,MAAM,gBAAgB,kDAE5B,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,qBAAqB,GAAI,8FAOnC,0BAA0B,4CA8F5B,CAAC"}
|