@react-xp/design-system 1.0.0-beta.1 → 1.0.0-beta.3
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/cjs/components/button/button.native.js +31 -0
- package/dist/cjs/components/button/button.shared.js +59 -0
- package/dist/cjs/{styles/buttons.js → components/button/button.styles.js} +24 -13
- package/dist/cjs/components/button/button.types.js +2 -0
- package/dist/cjs/components/button/button.web.js +46 -0
- package/dist/cjs/components/button/index.js +18 -0
- package/dist/cjs/components/index.js +17 -0
- package/dist/cjs/helpers/styles.js +18 -2
- package/dist/cjs/index.js +3 -1
- package/dist/cjs/showcase/buttons/buttons.native.js +10 -0
- package/dist/cjs/showcase/buttons/buttons.web.js +10 -0
- package/dist/cjs/showcase/buttons/index.js +17 -0
- package/dist/cjs/showcase/buttons/index.native.js +17 -0
- package/dist/cjs/showcase/index.js +17 -0
- package/dist/cjs/showcase/themeWrapper.native.js +40 -0
- package/dist/cjs/showcase/themeWrapper.web.js +42 -0
- package/dist/cjs/styles/index.js +0 -1
- package/dist/cjs/theme/index.js +19 -0
- package/dist/cjs/theme/themeContext.js +5 -0
- package/dist/cjs/theme/themeProvider.js +9 -0
- package/dist/cjs/theme/useTheme.js +13 -0
- package/dist/cjs/theme/useTokens.js +6 -0
- package/dist/cjs/types/states.js +1 -4
- package/dist/esm/components/button/button.native.js +27 -0
- package/dist/esm/components/button/button.shared.js +54 -0
- package/dist/esm/{styles/buttons.js → components/button/button.styles.js} +24 -13
- package/dist/esm/components/button/button.types.js +1 -0
- package/dist/esm/components/button/button.web.js +42 -0
- package/dist/esm/components/button/index.js +2 -0
- package/dist/esm/components/index.js +1 -0
- package/dist/esm/helpers/styles.js +16 -2
- package/dist/esm/index.js +3 -1
- package/dist/esm/showcase/buttons/buttons.native.js +6 -0
- package/dist/esm/showcase/buttons/buttons.web.js +6 -0
- package/dist/esm/showcase/buttons/index.js +1 -0
- package/dist/esm/showcase/buttons/index.native.js +1 -0
- package/dist/esm/showcase/index.js +1 -0
- package/dist/esm/showcase/themeWrapper.native.js +36 -0
- package/dist/esm/showcase/themeWrapper.web.js +38 -0
- package/dist/esm/styles/cards.js +1 -1
- package/dist/esm/styles/checkboxes.js +1 -1
- package/dist/esm/styles/chips.js +1 -1
- package/dist/esm/styles/datePickers.js +1 -1
- package/dist/esm/styles/index.js +0 -1
- package/dist/esm/styles/inputs.js +1 -1
- package/dist/esm/styles/listItems.js +1 -1
- package/dist/esm/styles/popovers.js +1 -1
- package/dist/esm/styles/radios.js +1 -1
- package/dist/esm/styles/selects.js +1 -1
- package/dist/esm/styles/steppers.js +1 -1
- package/dist/esm/styles/switches.js +1 -1
- package/dist/esm/styles/tabs.js +1 -1
- package/dist/esm/styles/toasts.js +1 -1
- package/dist/esm/styles/tooltips.js +1 -1
- package/dist/esm/theme/index.js +3 -0
- package/dist/esm/theme/themeContext.js +2 -0
- package/dist/esm/theme/themeProvider.js +5 -0
- package/dist/esm/theme/useTheme.js +9 -0
- package/dist/esm/theme/useTokens.js +2 -0
- package/dist/esm/types/states.js +0 -2
- package/dist/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/tsconfig.esm.tsbuildinfo +1 -1
- package/dist/types/components/button/button.native.d.ts +3 -0
- package/dist/types/components/button/button.native.d.ts.map +1 -0
- package/dist/types/components/button/button.shared.d.ts +27 -0
- package/dist/types/components/button/button.shared.d.ts.map +1 -0
- package/dist/types/components/button/button.styles.d.ts +20 -0
- package/dist/types/components/button/button.styles.d.ts.map +1 -0
- package/dist/types/components/button/button.types.d.ts +19 -0
- package/dist/types/components/button/button.types.d.ts.map +1 -0
- package/dist/types/components/button/button.web.d.ts +3 -0
- package/dist/types/components/button/button.web.d.ts.map +1 -0
- package/dist/types/components/button/index.d.ts +3 -0
- package/dist/types/components/button/index.d.ts.map +1 -0
- package/dist/types/components/index.d.ts +2 -0
- package/dist/types/components/index.d.ts.map +1 -0
- package/dist/types/helpers/a11y.d.ts +5 -5
- package/dist/types/helpers/a11y.d.ts.map +1 -1
- package/dist/types/helpers/styles.d.ts +12 -9
- package/dist/types/helpers/styles.d.ts.map +1 -1
- package/dist/types/index.d.ts +3 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/showcase/buttons/buttons.native.d.ts +2 -0
- package/dist/types/showcase/buttons/buttons.native.d.ts.map +1 -0
- package/dist/types/showcase/buttons/buttons.web.d.ts +2 -0
- package/dist/types/showcase/buttons/buttons.web.d.ts.map +1 -0
- package/dist/types/showcase/buttons/index.d.ts +2 -0
- package/dist/types/showcase/buttons/index.d.ts.map +1 -0
- package/dist/types/showcase/buttons/index.native.d.ts +2 -0
- package/dist/types/showcase/buttons/index.native.d.ts.map +1 -0
- package/dist/types/showcase/index.d.ts +2 -0
- package/dist/types/showcase/index.d.ts.map +1 -0
- package/dist/types/showcase/themeWrapper.native.d.ts +5 -0
- package/dist/types/showcase/themeWrapper.native.d.ts.map +1 -0
- package/dist/types/showcase/themeWrapper.web.d.ts +5 -0
- package/dist/types/showcase/themeWrapper.web.d.ts.map +1 -0
- package/dist/types/styles/avatars.d.ts +2 -2
- package/dist/types/styles/avatars.d.ts.map +1 -1
- package/dist/types/styles/badges.d.ts +2 -2
- package/dist/types/styles/badges.d.ts.map +1 -1
- package/dist/types/styles/bottomSheets.d.ts +2 -2
- package/dist/types/styles/bottomSheets.d.ts.map +1 -1
- package/dist/types/styles/cards.d.ts +2 -2
- package/dist/types/styles/cards.d.ts.map +1 -1
- package/dist/types/styles/checkboxes.d.ts +2 -2
- package/dist/types/styles/checkboxes.d.ts.map +1 -1
- package/dist/types/styles/chips.d.ts +2 -2
- package/dist/types/styles/chips.d.ts.map +1 -1
- package/dist/types/styles/datePickers.d.ts +3 -3
- package/dist/types/styles/datePickers.d.ts.map +1 -1
- package/dist/types/styles/dividers.d.ts +2 -2
- package/dist/types/styles/dividers.d.ts.map +1 -1
- package/dist/types/styles/emptyStates.d.ts +2 -2
- package/dist/types/styles/emptyStates.d.ts.map +1 -1
- package/dist/types/styles/forms.d.ts +2 -2
- package/dist/types/styles/forms.d.ts.map +1 -1
- package/dist/types/styles/headers.d.ts +2 -2
- package/dist/types/styles/headers.d.ts.map +1 -1
- package/dist/types/styles/index.d.ts +0 -1
- package/dist/types/styles/index.d.ts.map +1 -1
- package/dist/types/styles/inputs.d.ts +2 -2
- package/dist/types/styles/inputs.d.ts.map +1 -1
- package/dist/types/styles/listItems.d.ts +2 -2
- package/dist/types/styles/listItems.d.ts.map +1 -1
- package/dist/types/styles/modals.d.ts +2 -2
- package/dist/types/styles/modals.d.ts.map +1 -1
- package/dist/types/styles/pagination.d.ts +2 -2
- package/dist/types/styles/pagination.d.ts.map +1 -1
- package/dist/types/styles/popovers.d.ts +2 -2
- package/dist/types/styles/popovers.d.ts.map +1 -1
- package/dist/types/styles/progress.d.ts +4 -4
- package/dist/types/styles/progress.d.ts.map +1 -1
- package/dist/types/styles/radios.d.ts +2 -2
- package/dist/types/styles/radios.d.ts.map +1 -1
- package/dist/types/styles/selects.d.ts +2 -2
- package/dist/types/styles/selects.d.ts.map +1 -1
- package/dist/types/styles/skeletons.d.ts +3 -3
- package/dist/types/styles/skeletons.d.ts.map +1 -1
- package/dist/types/styles/steppers.d.ts +3 -3
- package/dist/types/styles/steppers.d.ts.map +1 -1
- package/dist/types/styles/switches.d.ts +2 -2
- package/dist/types/styles/switches.d.ts.map +1 -1
- package/dist/types/styles/tables.d.ts +2 -2
- package/dist/types/styles/tables.d.ts.map +1 -1
- package/dist/types/styles/tabs.d.ts +3 -3
- package/dist/types/styles/tabs.d.ts.map +1 -1
- package/dist/types/styles/toasts.d.ts +3 -3
- package/dist/types/styles/toasts.d.ts.map +1 -1
- package/dist/types/styles/tooltips.d.ts +2 -2
- package/dist/types/styles/tooltips.d.ts.map +1 -1
- package/dist/types/theme/index.d.ts +4 -0
- package/dist/types/theme/index.d.ts.map +1 -0
- package/dist/types/theme/themeContext.d.ts +6 -0
- package/dist/types/theme/themeContext.d.ts.map +1 -0
- package/dist/types/theme/themeProvider.d.ts +6 -0
- package/dist/types/theme/themeProvider.d.ts.map +1 -0
- package/dist/types/theme/themes/corporate/colors.d.ts.map +1 -0
- package/dist/types/theme/themes/corporate/index.d.ts.map +1 -0
- package/dist/types/theme/useTheme.d.ts +2 -0
- package/dist/types/theme/useTheme.d.ts.map +1 -0
- package/dist/types/theme/useTokens.d.ts +2 -0
- package/dist/types/theme/useTokens.d.ts.map +1 -0
- package/dist/types/types/states.d.ts +3 -9
- package/dist/types/types/states.d.ts.map +1 -1
- package/dist/types/types/tokens.d.ts +5 -6
- package/dist/types/types/tokens.d.ts.map +1 -1
- package/package.json +5 -3
- package/dist/types/styles/buttons.d.ts +0 -22
- package/dist/types/styles/buttons.d.ts.map +0 -1
- package/dist/types/themes/corporate/colors.d.ts.map +0 -1
- package/dist/types/themes/corporate/index.d.ts.map +0 -1
- /package/dist/cjs/{themes → theme/themes}/corporate/colors.js +0 -0
- /package/dist/cjs/{themes → theme/themes}/corporate/index.js +0 -0
- /package/dist/esm/{themes → theme/themes}/corporate/colors.js +0 -0
- /package/dist/esm/{themes → theme/themes}/corporate/index.js +0 -0
- /package/dist/types/{themes → theme/themes}/corporate/colors.d.ts +0 -0
- /package/dist/types/{themes → theme/themes}/corporate/index.d.ts +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// styles/buttons.ts
|
|
2
|
-
import { merge, tok, } from '
|
|
2
|
+
import { merge, tok, } from '../../types/tokens';
|
|
3
3
|
const variantStyles = (t) => ({
|
|
4
4
|
primary: {
|
|
5
5
|
container: {
|
|
@@ -74,10 +74,11 @@ const sizeStyles = (t) => ({
|
|
|
74
74
|
},
|
|
75
75
|
},
|
|
76
76
|
});
|
|
77
|
-
export const getButtonParts = (t, opts = {}) => {
|
|
77
|
+
export const getButtonParts = (t, opts = { props: {} }) => {
|
|
78
78
|
const variant = opts.variant ?? 'primary';
|
|
79
79
|
const size = opts.size ?? 'md';
|
|
80
|
-
const
|
|
80
|
+
const disabled = opts.props.disabled ?? false;
|
|
81
|
+
const fullWidth = opts.props.fullWidth ?? false;
|
|
81
82
|
const baseContainer = {
|
|
82
83
|
borderWidth: tok(t, 'border-width-default'),
|
|
83
84
|
borderRadius: tok(t, 'radius-3'),
|
|
@@ -106,20 +107,30 @@ export const getButtonParts = (t, opts = {}) => {
|
|
|
106
107
|
label: { color: tok(t, 'color-state-disabled-fg') },
|
|
107
108
|
};
|
|
108
109
|
const interaction = {
|
|
109
|
-
hovered: { container: { opacity: 0.
|
|
110
|
-
pressed: {
|
|
110
|
+
hovered: { container: { opacity: 0.7 } },
|
|
111
|
+
pressed: {
|
|
112
|
+
container: { opacity: tok(t, 'opacity-pressed') },
|
|
113
|
+
},
|
|
111
114
|
fullWidth: { container: { alignSelf: 'stretch' } },
|
|
112
115
|
};
|
|
113
116
|
const v = variantStyles(t)[variant];
|
|
114
117
|
const s = sizeStyles(t)[size];
|
|
115
118
|
return {
|
|
116
|
-
container:
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
119
|
+
container: {
|
|
120
|
+
...merge(baseContainer, s.container, v.container, fullWidth && interaction.fullWidth.container, disabled && disabledStyles.container),
|
|
121
|
+
$hovered: interaction.hovered.container,
|
|
122
|
+
$pressed: interaction.pressed.container,
|
|
123
|
+
},
|
|
124
|
+
focusRing: {
|
|
125
|
+
$focused: focusRing,
|
|
126
|
+
},
|
|
127
|
+
icon: {
|
|
128
|
+
...merge(s.icon, { color: v.label.color }),
|
|
129
|
+
$disabled: { color: disabledStyles.label.color },
|
|
130
|
+
},
|
|
131
|
+
label: {
|
|
132
|
+
...merge(baseLabel, s.label, v.label),
|
|
133
|
+
$disabled: disabled && disabledStyles.label,
|
|
134
|
+
},
|
|
124
135
|
};
|
|
125
136
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { A } from '@react-xp/aeiou';
|
|
3
|
+
import { useTokens } from '../../theme';
|
|
4
|
+
import { applyIconStyle, resolveButtonStyles } from './button.shared';
|
|
5
|
+
export const Button = (props) => {
|
|
6
|
+
const tokens = useTokens();
|
|
7
|
+
const { children, variant = 'primary', size = 'md', disabled, loading, fullWidth, leftIcon, rightIcon, type = 'button', onClick, onPress, accessibilityLabel, testId, } = props;
|
|
8
|
+
const isDisabled = Boolean(disabled || loading);
|
|
9
|
+
const st = resolveButtonStyles({
|
|
10
|
+
platform: 'web',
|
|
11
|
+
tokens,
|
|
12
|
+
variant,
|
|
13
|
+
size,
|
|
14
|
+
props,
|
|
15
|
+
});
|
|
16
|
+
// wrapper + ring (para "gap" + outline consistente)
|
|
17
|
+
const Wrapper = ({ children }) => {
|
|
18
|
+
// if (!st.focusWrapper || !st.focusRing) return <>{children}</>;
|
|
19
|
+
return (
|
|
20
|
+
// <span style={st.focusWrapper as TAny}>
|
|
21
|
+
// <span style={st.focusRing as TAny}>{children}</span>
|
|
22
|
+
// </span>
|
|
23
|
+
_jsx(_Fragment, { children: children }));
|
|
24
|
+
};
|
|
25
|
+
console.log('button web render', {
|
|
26
|
+
isDisabled,
|
|
27
|
+
loading,
|
|
28
|
+
st,
|
|
29
|
+
});
|
|
30
|
+
return (_jsx(Wrapper, { children: _jsxs(A, { disabled: isDisabled, loading: loading, accessibilityLabel: accessibilityLabel, testId: testId, style: st.style.container, onClick: onClick, onPress: onPress, children: [applyIconStyle(leftIcon, st.style.icon), _jsx("span", { style: st.style.label, children: children }), applyIconStyle(rightIcon, st.style.icon), loading ? (_jsx("span", { "aria-hidden": "true", style: {
|
|
31
|
+
marginLeft: 8,
|
|
32
|
+
display: 'inline-flex',
|
|
33
|
+
alignItems: 'center',
|
|
34
|
+
justifyContent: 'center',
|
|
35
|
+
}, children: _jsx("span", { style: {
|
|
36
|
+
width: 14,
|
|
37
|
+
height: 14,
|
|
38
|
+
borderRadius: 9999,
|
|
39
|
+
border: '2px solid currentColor',
|
|
40
|
+
borderTopColor: 'transparent',
|
|
41
|
+
} }) })) : null] }) }));
|
|
42
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './button';
|
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
// - filtrar props web-only/native-only
|
|
5
5
|
// - mapear shadow tokens (CSS box-shadow) para RN shadow props
|
|
6
6
|
// - focus ring cross-platform (wrapper approach)
|
|
7
|
-
|
|
8
|
-
import { tok, } from '../types';
|
|
7
|
+
import { tok } from '../types';
|
|
9
8
|
/**
|
|
10
9
|
* Tokens utilitários são string com px (ex.: "1px", "44px")
|
|
11
10
|
* No RN queres number (dp), no Web queres string (px) — define UMA regra no teu binder.
|
|
@@ -156,3 +155,18 @@ export const getFocusWrapperSx = (t, platform, opts) => ({
|
|
|
156
155
|
padding: getFocusRingGap(t, platform),
|
|
157
156
|
borderRadius: opts?.borderRadius,
|
|
158
157
|
});
|
|
158
|
+
const isPx = (v) => typeof v === 'string' && v.trim().endsWith('px');
|
|
159
|
+
const pxToNumber = (v) => Number.parseFloat(v);
|
|
160
|
+
export const normalizeSxForPlatform = (platform, sx) => {
|
|
161
|
+
if (platform === 'web')
|
|
162
|
+
return sx;
|
|
163
|
+
// native: converter strings "Npx" -> number
|
|
164
|
+
const out = {};
|
|
165
|
+
for (const [k, v] of Object.entries(sx)) {
|
|
166
|
+
if (v === undefined)
|
|
167
|
+
continue;
|
|
168
|
+
out[k] = isPx(v) ? pxToNumber(v) : v;
|
|
169
|
+
}
|
|
170
|
+
return out;
|
|
171
|
+
};
|
|
172
|
+
export const mergeSx = (...styles) => Object.assign({}, ...styles.filter(Boolean));
|
package/dist/esm/index.js
CHANGED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Button } from '../../components/button/button.native';
|
|
3
|
+
import { ThemeWrapper } from '../themeWrapper.native';
|
|
4
|
+
export const ButtonsShowcase = () => {
|
|
5
|
+
return (_jsx(ThemeWrapper, { children: _jsx(Button, { children: "Button example" }) }));
|
|
6
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Button } from '../../components/button/button.web';
|
|
3
|
+
import { ThemeWrapper } from '../themeWrapper.web';
|
|
4
|
+
export const ButtonsShowcase = () => {
|
|
5
|
+
return (_jsx(ThemeWrapper, { children: _jsx(Button, { children: "Button example" }) }));
|
|
6
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './buttons.web';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './buttons.native';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './buttons';
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { styleguideBreakpoints, styleguideComponentPadding, styleguideLayoutGrid, styleguideMotionDuration, styleguideMotionEasing, styleguideMotionPreset, styleguideRadius, styleguideShadows, styleguideSpaceX, styleguideSpaceY, styleguideSpacing, styleguideTypography, styleguideUtils, styleguideZIndex, } from '@react-xp/styleguide';
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
import { Button } from '../components/button/button.native';
|
|
5
|
+
import { ThemeProvider } from '../theme';
|
|
6
|
+
import { themeCorporateColors } from '../theme/themes/corporate';
|
|
7
|
+
export const ThemeWrapper = ({ children }) => {
|
|
8
|
+
const [currentTheme, setCurrentTheme] = useState('corporate');
|
|
9
|
+
const [currentThemeMode, setCurrentThemeMode] = useState('light');
|
|
10
|
+
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
|
|
11
|
+
const themeTokens = (() => {
|
|
12
|
+
switch (currentTheme) {
|
|
13
|
+
case 'corporate':
|
|
14
|
+
return currentThemeMode === 'light'
|
|
15
|
+
? themeCorporateColors.light
|
|
16
|
+
: themeCorporateColors.dark;
|
|
17
|
+
}
|
|
18
|
+
})();
|
|
19
|
+
return (_jsxs(ThemeProvider, { tokens: {
|
|
20
|
+
...styleguideBreakpoints,
|
|
21
|
+
...styleguideComponentPadding,
|
|
22
|
+
...styleguideLayoutGrid,
|
|
23
|
+
...styleguideMotionDuration,
|
|
24
|
+
...styleguideMotionEasing,
|
|
25
|
+
...styleguideMotionPreset,
|
|
26
|
+
...styleguideRadius,
|
|
27
|
+
...styleguideShadows,
|
|
28
|
+
...styleguideSpaceX,
|
|
29
|
+
...styleguideSpaceY,
|
|
30
|
+
...styleguideSpacing,
|
|
31
|
+
...styleguideTypography,
|
|
32
|
+
...styleguideUtils,
|
|
33
|
+
...styleguideZIndex,
|
|
34
|
+
...themeTokens,
|
|
35
|
+
}, children: [_jsx(Button, { onClick: () => setCurrentThemeMode(currentThemeMode === 'light' ? 'dark' : 'light'), children: "Toggle Theme Mode" }), children] }));
|
|
36
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { styleguideBreakpoints, styleguideComponentPadding, styleguideLayoutGrid, styleguideMotionDuration, styleguideMotionEasing, styleguideMotionPreset, styleguideRadius, styleguideShadows, styleguideSpaceX, styleguideSpaceY, styleguideSpacing, styleguideTypography, styleguideUtils, styleguideZIndex, } from '@react-xp/styleguide';
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
import { Button } from '../components/button/button.web';
|
|
5
|
+
import { ThemeProvider } from '../theme';
|
|
6
|
+
import { themeCorporateColors } from '../theme/themes/corporate';
|
|
7
|
+
export const ThemeWrapper = ({ children }) => {
|
|
8
|
+
const [currentTheme, setCurrentTheme] = useState('corporate');
|
|
9
|
+
const [currentThemeMode, setCurrentThemeMode] = useState('light');
|
|
10
|
+
const themeTokens = (() => {
|
|
11
|
+
switch (currentTheme) {
|
|
12
|
+
case 'corporate':
|
|
13
|
+
return currentThemeMode === 'light'
|
|
14
|
+
? themeCorporateColors.light
|
|
15
|
+
: themeCorporateColors.dark;
|
|
16
|
+
}
|
|
17
|
+
})();
|
|
18
|
+
console.log('themeTokens', themeTokens);
|
|
19
|
+
console.log('currentThemeMode', currentThemeMode);
|
|
20
|
+
return (_jsx(ThemeProvider, { tokens: {
|
|
21
|
+
...styleguideBreakpoints,
|
|
22
|
+
...styleguideComponentPadding,
|
|
23
|
+
...styleguideLayoutGrid,
|
|
24
|
+
...styleguideMotionDuration,
|
|
25
|
+
...styleguideMotionEasing,
|
|
26
|
+
...styleguideMotionPreset,
|
|
27
|
+
...styleguideRadius,
|
|
28
|
+
...styleguideShadows,
|
|
29
|
+
...styleguideSpaceX,
|
|
30
|
+
...styleguideSpaceY,
|
|
31
|
+
...styleguideSpacing,
|
|
32
|
+
...styleguideTypography,
|
|
33
|
+
...styleguideUtils,
|
|
34
|
+
...styleguideZIndex,
|
|
35
|
+
...themeTokens,
|
|
36
|
+
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
|
|
37
|
+
}, children: _jsxs("div", { className: "flex m-4", style: { backgroundColor: themeTokens['color-bg-default'] }, children: [_jsx(Button, { onClick: () => setCurrentThemeMode(currentThemeMode === 'light' ? 'dark' : 'light'), children: "Toggle Theme Mode" }), children] }) }));
|
|
38
|
+
};
|
package/dist/esm/styles/cards.js
CHANGED
package/dist/esm/styles/chips.js
CHANGED
package/dist/esm/styles/index.js
CHANGED
package/dist/esm/styles/tabs.js
CHANGED
package/dist/esm/types/states.js
CHANGED