@aurora-ds/components 0.19.2 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +196 -52
- package/dist/cjs/components/actions/button/Button.props.d.ts +9 -9
- package/dist/cjs/components/actions/icon-button/IconButton.props.d.ts +9 -10
- package/dist/cjs/components/data-display/chip/Chip.props.d.ts +5 -5
- package/dist/cjs/components/data-display/skeleton/Skeleton.props.d.ts +2 -2
- package/dist/cjs/components/data-display/skeleton/Skeleton.styles.d.ts +1 -1
- package/dist/cjs/components/foundation/icon/Icon.props.d.ts +6 -6
- package/dist/cjs/components/foundation/icon/Icon.styles.d.ts +1 -1
- package/dist/cjs/components/foundation/text/Text.props.d.ts +5 -5
- package/dist/cjs/components/layout/card/Card.props.d.ts +13 -13
- package/dist/cjs/components/layout/grid/Grid.props.d.ts +7 -7
- package/dist/cjs/components/layout/page-construction/page-section/PageSection.props.d.ts +7 -7
- package/dist/cjs/components/layout/separator/Separator.props.d.ts +3 -3
- package/dist/cjs/components/layout/stack/Stack.props.d.ts +5 -5
- package/dist/cjs/components/overlay/accordion/Accordion.props.d.ts +3 -3
- package/dist/cjs/components/overlay/menu/MenuItem/MenuItem.props.d.ts +3 -3
- package/dist/cjs/index.d.ts +3 -0
- package/dist/cjs/index.js +235 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/interfaces/button.types.d.ts +2 -2
- package/dist/cjs/interfaces/index.d.ts +1 -0
- package/dist/cjs/interfaces/theme.contracts.d.ts +235 -0
- package/dist/cjs/theme/defaultTheme.d.ts +29 -0
- package/dist/cjs/theme/theme.module.d.ts +32 -0
- package/dist/cjs/theme/theme.types.d.ts +17 -0
- package/dist/cjs/theme/types/themeBreakpoints.types.d.ts +5 -0
- package/dist/cjs/theme/types/themeColor.types.d.ts +5 -0
- package/dist/cjs/theme/types/themeFontSize.types.d.ts +5 -0
- package/dist/cjs/theme/types/themeFontWeight.types.d.ts +5 -0
- package/dist/cjs/theme/types/themeLineHeight.types.d.ts +5 -0
- package/dist/cjs/theme/types/themeOpacity.types.d.ts +5 -0
- package/dist/cjs/theme/types/themeRadius.types.d.ts +5 -0
- package/dist/cjs/theme/types/themeShadows.types.d.ts +5 -0
- package/dist/cjs/theme/types/themeSpacing.types.d.ts +5 -0
- package/dist/cjs/theme/types/themeTransition.types.d.ts +5 -0
- package/dist/cjs/theme/types/themeZIndex.types.d.ts +5 -0
- package/dist/cjs/theme/values/themeBreakpoints.d.ts +5 -0
- package/dist/cjs/theme/values/themeColors.d.ts +6 -0
- package/dist/cjs/theme/values/themeFontSize.d.ts +5 -0
- package/dist/cjs/theme/values/themeFontWeight.d.ts +5 -0
- package/dist/cjs/theme/values/themeLineHeight.d.ts +5 -0
- package/dist/cjs/theme/values/themeOpacity.d.ts +5 -0
- package/dist/cjs/theme/values/themeRadius.d.ts +5 -0
- package/dist/cjs/theme/values/themeShadows.d.ts +5 -0
- package/dist/cjs/theme/values/themeSpacing.d.ts +5 -0
- package/dist/cjs/theme/values/themeTransition.d.ts +5 -0
- package/dist/cjs/theme/values/themeZIndex.d.ts +5 -0
- package/dist/cjs/utils/ui/components/actions/button/getButtonSizeStyles.utils.d.ts +4 -4
- package/dist/cjs/utils/ui/components/actions/icon-button/getIconButtonSizeStyles.utils.d.ts +3 -3
- package/dist/cjs/utils/ui/components/data-display/avatar/getAvatarSizes.utils.d.ts +2 -2
- package/dist/cjs/utils/ui/components/data-display/chip/getChipColorStyles.utils.d.ts +2 -2
- package/dist/cjs/utils/ui/components/data-display/chip/getChipSizeStyles.utils.d.ts +2 -2
- package/dist/cjs/utils/ui/components/foundation/text/getTextVariantStyles.utils.d.ts +2 -2
- package/dist/cjs/utils/ui/components/overlay/alert/getAlertVariantColors.utils.d.ts +2 -2
- package/dist/esm/components/actions/button/Button.props.d.ts +9 -9
- package/dist/esm/components/actions/icon-button/IconButton.props.d.ts +9 -10
- package/dist/esm/components/data-display/chip/Chip.props.d.ts +5 -5
- package/dist/esm/components/data-display/skeleton/Skeleton.props.d.ts +2 -2
- package/dist/esm/components/data-display/skeleton/Skeleton.styles.d.ts +1 -1
- package/dist/esm/components/foundation/icon/Icon.props.d.ts +6 -6
- package/dist/esm/components/foundation/icon/Icon.styles.d.ts +1 -1
- package/dist/esm/components/foundation/text/Text.props.d.ts +5 -5
- package/dist/esm/components/layout/card/Card.props.d.ts +13 -13
- package/dist/esm/components/layout/grid/Grid.props.d.ts +7 -7
- package/dist/esm/components/layout/page-construction/page-section/PageSection.props.d.ts +7 -7
- package/dist/esm/components/layout/separator/Separator.props.d.ts +3 -3
- package/dist/esm/components/layout/stack/Stack.props.d.ts +5 -5
- package/dist/esm/components/overlay/accordion/Accordion.props.d.ts +3 -3
- package/dist/esm/components/overlay/menu/MenuItem/MenuItem.props.d.ts +3 -3
- package/dist/esm/index.d.ts +3 -0
- package/dist/esm/index.js +235 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/interfaces/button.types.d.ts +2 -2
- package/dist/esm/interfaces/index.d.ts +1 -0
- package/dist/esm/interfaces/theme.contracts.d.ts +235 -0
- package/dist/esm/theme/defaultTheme.d.ts +29 -0
- package/dist/esm/theme/theme.module.d.ts +32 -0
- package/dist/esm/theme/theme.types.d.ts +17 -0
- package/dist/esm/theme/types/themeBreakpoints.types.d.ts +5 -0
- package/dist/esm/theme/types/themeColor.types.d.ts +5 -0
- package/dist/esm/theme/types/themeFontSize.types.d.ts +5 -0
- package/dist/esm/theme/types/themeFontWeight.types.d.ts +5 -0
- package/dist/esm/theme/types/themeLineHeight.types.d.ts +5 -0
- package/dist/esm/theme/types/themeOpacity.types.d.ts +5 -0
- package/dist/esm/theme/types/themeRadius.types.d.ts +5 -0
- package/dist/esm/theme/types/themeShadows.types.d.ts +5 -0
- package/dist/esm/theme/types/themeSpacing.types.d.ts +5 -0
- package/dist/esm/theme/types/themeTransition.types.d.ts +5 -0
- package/dist/esm/theme/types/themeZIndex.types.d.ts +5 -0
- package/dist/esm/theme/values/themeBreakpoints.d.ts +5 -0
- package/dist/esm/theme/values/themeColors.d.ts +6 -0
- package/dist/esm/theme/values/themeFontSize.d.ts +5 -0
- package/dist/esm/theme/values/themeFontWeight.d.ts +5 -0
- package/dist/esm/theme/values/themeLineHeight.d.ts +5 -0
- package/dist/esm/theme/values/themeOpacity.d.ts +5 -0
- package/dist/esm/theme/values/themeRadius.d.ts +5 -0
- package/dist/esm/theme/values/themeShadows.d.ts +5 -0
- package/dist/esm/theme/values/themeSpacing.d.ts +5 -0
- package/dist/esm/theme/values/themeTransition.d.ts +5 -0
- package/dist/esm/theme/values/themeZIndex.d.ts +5 -0
- package/dist/esm/utils/ui/components/actions/button/getButtonSizeStyles.utils.d.ts +4 -4
- package/dist/esm/utils/ui/components/actions/icon-button/getIconButtonSizeStyles.utils.d.ts +3 -3
- package/dist/esm/utils/ui/components/data-display/avatar/getAvatarSizes.utils.d.ts +2 -2
- package/dist/esm/utils/ui/components/data-display/chip/getChipColorStyles.utils.d.ts +2 -2
- package/dist/esm/utils/ui/components/data-display/chip/getChipSizeStyles.utils.d.ts +2 -2
- package/dist/esm/utils/ui/components/foundation/text/getTextVariantStyles.utils.d.ts +2 -2
- package/dist/esm/utils/ui/components/overlay/alert/getAlertVariantColors.utils.d.ts +2 -2
- package/dist/index.d.ts +420 -108
- package/package.json +4 -5
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Theme } from '@aurora-ds/theme';
|
|
2
1
|
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
import { ThemeContract } from '@/interfaces';
|
|
3
3
|
export type AccordionProps = {
|
|
4
4
|
/** Title displayed in the accordion header */
|
|
5
5
|
title: string;
|
|
@@ -16,7 +16,7 @@ export type AccordionProps = {
|
|
|
16
16
|
/** Optional icon to display before title */
|
|
17
17
|
icon?: ReactNode;
|
|
18
18
|
/** Optional background color */
|
|
19
|
-
backgroundColor?: keyof
|
|
19
|
+
backgroundColor?: keyof ThemeContract['colors'];
|
|
20
20
|
/** Optional width */
|
|
21
21
|
width?: CSSProperties['width'];
|
|
22
22
|
/** Padding for the accordion header */
|
|
@@ -40,7 +40,7 @@ export type AccordionStyleParams = {
|
|
|
40
40
|
};
|
|
41
41
|
export type AccordionHeaderStyleParams = {
|
|
42
42
|
disabled: boolean;
|
|
43
|
-
backgroundColor?: keyof
|
|
43
|
+
backgroundColor?: keyof ThemeContract['colors'];
|
|
44
44
|
headerPadding?: CSSProperties['padding'];
|
|
45
45
|
};
|
|
46
46
|
export type AccordionContentStyleParams = {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Theme } from '@aurora-ds/theme';
|
|
2
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { ThemeContract } from '@/interfaces';
|
|
3
3
|
export type MenuItemProps = {
|
|
4
4
|
label: string;
|
|
5
5
|
icon?: ReactNode;
|
|
6
6
|
onClick: () => void;
|
|
7
|
-
textColor?: keyof
|
|
8
|
-
iconColor?: keyof
|
|
7
|
+
textColor?: keyof ThemeContract['colors'];
|
|
8
|
+
iconColor?: keyof ThemeContract['colors'];
|
|
9
9
|
};
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
export * from '@components/index';
|
|
2
2
|
export * from '@hooks/index';
|
|
3
|
+
export { defaultTheme } from '@/theme/defaultTheme';
|
|
4
|
+
export type { Theme } from '@/theme/theme.types';
|
|
5
|
+
export type { ThemeContract, ThemeColorContract, ThemeSpacingContract, ThemeRadiusContract, ThemeFontSizeContract, ThemeFontWeightContract, ThemeLineHeightContract, ThemeOpacityContract, ThemeShadowsContract, ThemeTransitionContract, ThemeBreakpointsContract, ThemeZIndexContract, } from '@interfaces/theme.contracts';
|
|
3
6
|
import '@styles/globals.css';
|
package/dist/cjs/index.js
CHANGED
|
@@ -2371,7 +2371,7 @@ const Modal = ({ isOpen, onClose, label, children, isForm, action }) => {
|
|
|
2371
2371
|
}
|
|
2372
2372
|
};
|
|
2373
2373
|
// body of the modal
|
|
2374
|
-
const body = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs(Stack, { justify: 'space-between', height: BUTTON_SIZE, width: '100%', children: [jsxRuntime.jsx(Text, { variant: 'h3', children: label }), !action && (jsxRuntime.jsx(IconButton, { icon: jsxRuntime.jsx(CloseIcon, {}), onClick: onClose, size: 'small', variant: 'text', textColor: 'text' }))] }), children, action && (jsxRuntime.jsxs(Stack, { justify: 'flex-end', width: '100%', children: [jsxRuntime.jsx(Button, { label: 'Cancel', onClick: onClose, variant: 'outlined' }), jsxRuntime.jsx(Button, { ...action, type: isForm ? 'submit' : 'button' })] }))] }));
|
|
2374
|
+
const body = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs(Stack, { justify: 'space-between', height: BUTTON_SIZE, width: '100%', children: [jsxRuntime.jsx(Text, { variant: 'h3', children: label }), !action && (jsxRuntime.jsx(IconButton, { icon: jsxRuntime.jsx(CloseIcon, {}), onClick: onClose, size: 'small', variant: 'text', textColor: 'text' }))] }), children, action && (jsxRuntime.jsxs(Stack, { justify: 'flex-end', width: '100%', children: [jsxRuntime.jsx(Button, { label: 'Cancel', onClick: onClose, variant: 'outlined' }), jsxRuntime.jsx(Button, { ...action, type: isForm ? 'submit' : 'button', onClick: isForm ? undefined : action.onClick })] }))] }));
|
|
2375
2375
|
return reactDom.createPortal(jsxRuntime.jsx(React.Fragment, { children: isVisible ? (jsxRuntime.jsx("div", { className: MODAL_STYLES.background(isFadingIn), ref: modalRef, children: jsxRuntime.jsx("div", { className: MODAL_STYLES.content(isFadingIn), children: isForm ? (jsxRuntime.jsx(Form$1, { onSubmit: (e) => { e.preventDefault(); safeInvokeAction(); }, children: body })) : (jsxRuntime.jsx(React.Fragment, { children: body })) }) })) : null }), document.body);
|
|
2376
2376
|
};
|
|
2377
2377
|
Modal.displayName = 'Modal';
|
|
@@ -2973,6 +2973,239 @@ const useAlert = () => {
|
|
|
2973
2973
|
return context;
|
|
2974
2974
|
};
|
|
2975
2975
|
|
|
2976
|
+
/**
|
|
2977
|
+
* Default breakpoint tokens
|
|
2978
|
+
*/
|
|
2979
|
+
const themeBreakpoints = {
|
|
2980
|
+
xs: '480px', // Extra small devices (phones in landscape)
|
|
2981
|
+
sm: '640px', // Small devices (large phones, small tablets)
|
|
2982
|
+
md: '768px', // Medium devices (tablets)
|
|
2983
|
+
lg: '1024px', // Large devices (desktops)
|
|
2984
|
+
xl: '1280px', // Extra large devices (large desktops)
|
|
2985
|
+
'2xl': '1536px', // Extra extra large devices (wide screens)
|
|
2986
|
+
};
|
|
2987
|
+
|
|
2988
|
+
/**
|
|
2989
|
+
* Default color tokens
|
|
2990
|
+
* Uses color scales from @aurora-ds/theme
|
|
2991
|
+
*/
|
|
2992
|
+
const themeColors = {
|
|
2993
|
+
// Surface colors
|
|
2994
|
+
background: theme.colors.slate[25],
|
|
2995
|
+
surface: theme.colors.white,
|
|
2996
|
+
surfaceHover: theme.colors.slate[100],
|
|
2997
|
+
surfaceActive: theme.colors.slate[200],
|
|
2998
|
+
// Text colors
|
|
2999
|
+
text: theme.colors.slate[800],
|
|
3000
|
+
textSecondary: theme.colors.slate[500],
|
|
3001
|
+
textTertiary: theme.colors.slate[400],
|
|
3002
|
+
// Primary colors (Indigo)
|
|
3003
|
+
primary: theme.colors.indigo[600],
|
|
3004
|
+
primaryHover: theme.colors.indigo[700],
|
|
3005
|
+
primaryActive: theme.colors.indigo[800],
|
|
3006
|
+
primarySubtle: theme.colors.indigo[50],
|
|
3007
|
+
primaryDisabled: theme.colors.indigo[300],
|
|
3008
|
+
onPrimary: theme.colors.white,
|
|
3009
|
+
// Secondary colors (Slate)
|
|
3010
|
+
secondary: theme.colors.slate[100],
|
|
3011
|
+
secondaryHover: theme.colors.slate[200],
|
|
3012
|
+
secondaryActive: theme.colors.slate[300],
|
|
3013
|
+
secondarySubtle: theme.colors.slate[50],
|
|
3014
|
+
secondaryDisabled: theme.colors.slate[200],
|
|
3015
|
+
onSecondary: theme.colors.slate[700],
|
|
3016
|
+
// Border colors
|
|
3017
|
+
border: theme.colors.slate[200],
|
|
3018
|
+
// Disabled state
|
|
3019
|
+
disabledText: theme.colors.slate[400],
|
|
3020
|
+
disabled: theme.colors.slate[300],
|
|
3021
|
+
// Semantic colors - Success (Emerald)
|
|
3022
|
+
success: theme.colors.emerald[600],
|
|
3023
|
+
successSubtle: theme.colors.emerald[50],
|
|
3024
|
+
// Semantic colors - Warning (Amber)
|
|
3025
|
+
warning: theme.colors.amber[500],
|
|
3026
|
+
warningSubtle: theme.colors.amber[50],
|
|
3027
|
+
// Semantic colors - Error (Red)
|
|
3028
|
+
error: theme.colors.red[600],
|
|
3029
|
+
errorHover: theme.colors.red[700],
|
|
3030
|
+
errorSubtle: theme.colors.red[50],
|
|
3031
|
+
onError: theme.colors.white,
|
|
3032
|
+
// Semantic colors - Info (Blue)
|
|
3033
|
+
info: theme.colors.blue[600],
|
|
3034
|
+
infoSubtle: theme.colors.blue[50],
|
|
3035
|
+
// Semantic colors - Highlight (Orange)
|
|
3036
|
+
highlight: theme.colors.orange[500],
|
|
3037
|
+
highlightSubtle: theme.colors.orange[100],
|
|
3038
|
+
// Semantic colors - Accent (Purple)
|
|
3039
|
+
accent: theme.colors.purple[500],
|
|
3040
|
+
accentSubtle: theme.colors.purple[100],
|
|
3041
|
+
// Link colors (Indigo)
|
|
3042
|
+
link: theme.colors.indigo[600],
|
|
3043
|
+
linkHover: theme.colors.indigo[700],
|
|
3044
|
+
linkActive: theme.colors.indigo[800],
|
|
3045
|
+
linkDisabled: theme.colors.indigo[300],
|
|
3046
|
+
};
|
|
3047
|
+
|
|
3048
|
+
/**
|
|
3049
|
+
* Default font size tokens
|
|
3050
|
+
*/
|
|
3051
|
+
const themeFontSize = {
|
|
3052
|
+
'2xs': '0.625rem', // 10px
|
|
3053
|
+
xs: '0.75rem', // 12px
|
|
3054
|
+
sm: '0.875rem', // 14px
|
|
3055
|
+
md: '1rem', // 16px
|
|
3056
|
+
lg: '1.25rem', // 20px
|
|
3057
|
+
xl: '1.5rem', // 24px
|
|
3058
|
+
'2xl': '2rem', // 32px
|
|
3059
|
+
'3xl': '2.5rem', // 40px
|
|
3060
|
+
'4xl': '3rem', // 48px
|
|
3061
|
+
'5xl': '4rem', // 64px
|
|
3062
|
+
};
|
|
3063
|
+
|
|
3064
|
+
/**
|
|
3065
|
+
* Default font weight tokens
|
|
3066
|
+
*/
|
|
3067
|
+
const themeFontWeight = {
|
|
3068
|
+
light: 300,
|
|
3069
|
+
regular: 400,
|
|
3070
|
+
medium: 500,
|
|
3071
|
+
semibold: 600,
|
|
3072
|
+
bold: 700,
|
|
3073
|
+
};
|
|
3074
|
+
|
|
3075
|
+
/**
|
|
3076
|
+
* Default line height tokens
|
|
3077
|
+
*/
|
|
3078
|
+
const themeLineHeight = {
|
|
3079
|
+
none: 1,
|
|
3080
|
+
tight: 1.25,
|
|
3081
|
+
normal: 1.5,
|
|
3082
|
+
relaxed: 1.75,
|
|
3083
|
+
loose: 2,
|
|
3084
|
+
};
|
|
3085
|
+
|
|
3086
|
+
/**
|
|
3087
|
+
* Default opacity tokens
|
|
3088
|
+
*/
|
|
3089
|
+
const themeOpacity = {
|
|
3090
|
+
none: 0,
|
|
3091
|
+
lowest: 0.05,
|
|
3092
|
+
low: 0.1,
|
|
3093
|
+
medium: 0.25,
|
|
3094
|
+
high: 0.5,
|
|
3095
|
+
higher: 0.75,
|
|
3096
|
+
full: 1,
|
|
3097
|
+
};
|
|
3098
|
+
|
|
3099
|
+
/**
|
|
3100
|
+
* Default border radius tokens
|
|
3101
|
+
*/
|
|
3102
|
+
const themeRadius = {
|
|
3103
|
+
none: '0',
|
|
3104
|
+
xs: '0.125rem', // 2px
|
|
3105
|
+
sm: '0.25rem', // 4px
|
|
3106
|
+
md: '0.375rem', // 6px
|
|
3107
|
+
lg: '0.5rem', // 8px
|
|
3108
|
+
xl: '0.75rem', // 12px
|
|
3109
|
+
'2xl': '1rem', // 16px
|
|
3110
|
+
full: '9999px',
|
|
3111
|
+
};
|
|
3112
|
+
|
|
3113
|
+
/**
|
|
3114
|
+
* Default shadow tokens
|
|
3115
|
+
*/
|
|
3116
|
+
const themeShadows = {
|
|
3117
|
+
none: 'none',
|
|
3118
|
+
xs: '0 1px 2px 0 rgb(0 0 0 / 0.05)',
|
|
3119
|
+
sm: '0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)',
|
|
3120
|
+
md: '0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)',
|
|
3121
|
+
lg: '0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)',
|
|
3122
|
+
xl: '0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)',
|
|
3123
|
+
'2xl': '0 25px 50px -12px rgb(0 0 0 / 0.25)',
|
|
3124
|
+
inner: 'inset 0 2px 4px 0 rgb(0 0 0 / 0.05)',
|
|
3125
|
+
focus: '0 0 0 3px rgb(99 102 241 / 0.4)',
|
|
3126
|
+
};
|
|
3127
|
+
|
|
3128
|
+
/**
|
|
3129
|
+
* Default spacing tokens
|
|
3130
|
+
*/
|
|
3131
|
+
const themeSpacing = {
|
|
3132
|
+
none: '0',
|
|
3133
|
+
'2xs': '0.125rem', // 2px
|
|
3134
|
+
xs: '0.25rem', // 4px
|
|
3135
|
+
sm: '0.5rem', // 8px
|
|
3136
|
+
md: '1rem', // 16px
|
|
3137
|
+
lg: '1.5rem', // 24px
|
|
3138
|
+
xl: '2rem', // 32px
|
|
3139
|
+
'2xl': '3rem', // 48px
|
|
3140
|
+
'3xl': '4rem', // 64px
|
|
3141
|
+
'4xl': '6rem', // 96px
|
|
3142
|
+
'5xl': '8rem', // 128px
|
|
3143
|
+
};
|
|
3144
|
+
|
|
3145
|
+
/**
|
|
3146
|
+
* Default transition tokens
|
|
3147
|
+
*/
|
|
3148
|
+
const themeTransition = {
|
|
3149
|
+
fast: '150ms ease-out',
|
|
3150
|
+
normal: '250ms ease-out',
|
|
3151
|
+
slow: '350ms ease-out',
|
|
3152
|
+
};
|
|
3153
|
+
|
|
3154
|
+
/**
|
|
3155
|
+
* Default z-index tokens
|
|
3156
|
+
*/
|
|
3157
|
+
const themeZIndex = {
|
|
3158
|
+
behind: -1,
|
|
3159
|
+
base: 0,
|
|
3160
|
+
dropdown: 1000,
|
|
3161
|
+
sticky: 1100,
|
|
3162
|
+
overlay: 1300,
|
|
3163
|
+
modal: 1400,
|
|
3164
|
+
popover: 1500,
|
|
3165
|
+
tooltip: 1600,
|
|
3166
|
+
toast: 1700,
|
|
3167
|
+
};
|
|
3168
|
+
|
|
3169
|
+
/**
|
|
3170
|
+
* Default theme for aurora-ds-components
|
|
3171
|
+
*
|
|
3172
|
+
* This theme is used by default if no custom theme is provided.
|
|
3173
|
+
* You can override it by passing your own theme to ThemeProvider:
|
|
3174
|
+
*
|
|
3175
|
+
* @example
|
|
3176
|
+
* ```tsx
|
|
3177
|
+
* import { ThemeProvider } from '@aurora-ds/theme'
|
|
3178
|
+
* import { defaultTheme } from '@aurora-ds/components'
|
|
3179
|
+
*
|
|
3180
|
+
* // Use default theme
|
|
3181
|
+
* <ThemeProvider theme={defaultTheme}>
|
|
3182
|
+
* <App />
|
|
3183
|
+
* </ThemeProvider>
|
|
3184
|
+
*
|
|
3185
|
+
* // Or extend/override it
|
|
3186
|
+
* const myTheme = {
|
|
3187
|
+
* ...defaultTheme,
|
|
3188
|
+
* colors: {
|
|
3189
|
+
* ...defaultTheme.colors,
|
|
3190
|
+
* primary: '#FF0000', // Override primary color
|
|
3191
|
+
* }
|
|
3192
|
+
* }
|
|
3193
|
+
* ```
|
|
3194
|
+
*/
|
|
3195
|
+
const defaultTheme = {
|
|
3196
|
+
colors: themeColors,
|
|
3197
|
+
spacing: themeSpacing,
|
|
3198
|
+
radius: themeRadius,
|
|
3199
|
+
shadows: themeShadows,
|
|
3200
|
+
fontSize: themeFontSize,
|
|
3201
|
+
fontWeight: themeFontWeight,
|
|
3202
|
+
lineHeight: themeLineHeight,
|
|
3203
|
+
zIndex: themeZIndex,
|
|
3204
|
+
transition: themeTransition,
|
|
3205
|
+
opacity: themeOpacity,
|
|
3206
|
+
breakpoints: themeBreakpoints,
|
|
3207
|
+
};
|
|
3208
|
+
|
|
2976
3209
|
exports.Accordion = Accordion;
|
|
2977
3210
|
exports.Alert = Alert;
|
|
2978
3211
|
exports.AlertProvider = AlertProvider;
|
|
@@ -3008,6 +3241,7 @@ exports.TabItem = TabItem;
|
|
|
3008
3241
|
exports.Tabs = Tabs;
|
|
3009
3242
|
exports.Text = Text;
|
|
3010
3243
|
exports.TextArea = TextArea_default;
|
|
3244
|
+
exports.defaultTheme = defaultTheme;
|
|
3011
3245
|
exports.useAlert = useAlert;
|
|
3012
3246
|
exports.useAnchorPosition = useAnchorPosition;
|
|
3013
3247
|
exports.useClickOutside = useClickOutside;
|