@saas-ui/react 3.0.0-next.37 → 3.0.0-next.39

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.
Files changed (44) hide show
  1. package/dist/.tsbuildinfo.json +1 -1
  2. package/dist/components/accordion/accordion.recipe.js +2 -2
  3. package/dist/components/checkbox/checkbox.js +1 -1
  4. package/dist/components/editable/editable.recipe.js +7 -1
  5. package/dist/components/editable/index.d.ts +1 -1
  6. package/dist/components/editable/index.js +1 -1
  7. package/dist/components/heading/heading.recipe.d.ts +33 -11
  8. package/dist/components/heading/heading.recipe.js +55 -11
  9. package/dist/components/menu/menu.recipe.d.ts +7 -6
  10. package/dist/components/menu/menu.recipe.js +12 -11
  11. package/dist/components/navbar/navbar.d.ts +2 -1
  12. package/dist/components/navbar/navbar.js +2 -1
  13. package/dist/components/navbar/navbar.recipe.d.ts +14 -2
  14. package/dist/components/navbar/navbar.recipe.js +22 -3
  15. package/dist/components/persona/index.d.ts +1 -2
  16. package/dist/components/persona/index.js +1 -1
  17. package/dist/components/persona/persona-composed.d.ts +63 -0
  18. package/dist/components/persona/persona-composed.js +19 -0
  19. package/dist/components/persona/persona.context.d.ts +9 -1
  20. package/dist/components/persona/persona.context.js +1 -1
  21. package/dist/components/persona/persona.d.ts +61 -47
  22. package/dist/components/persona/persona.js +62 -13
  23. package/dist/components/radio/radiomark.recipe.js +1 -0
  24. package/dist/components/sidebar/sidebar-nav-item.recipe.js +3 -0
  25. package/dist/components/skeleton/skeleton.recipe.d.ts +1 -0
  26. package/dist/components/skeleton/skeleton.recipe.js +1 -0
  27. package/dist/components/switch/switch.recipe.js +1 -0
  28. package/dist/index.d.ts +2 -2
  29. package/dist/index.js +2 -2
  30. package/dist/theme/global-css.js +0 -4
  31. package/dist/theme/layer-styles.js +1 -1
  32. package/dist/theme/recipes.d.ts +34 -11
  33. package/dist/theme/semantic-tokens/colors.js +2 -2
  34. package/dist/theme/semantic-tokens/shadows.d.ts +6 -0
  35. package/dist/theme/semantic-tokens/shadows.js +6 -0
  36. package/dist/theme/slot-recipes.d.ts +21 -8
  37. package/dist/theme/text-styles.js +59 -15
  38. package/dist/theme/tokens/letter-spacing.d.ts +39 -0
  39. package/dist/theme/tokens/letter-spacing.js +18 -5
  40. package/dist/theme/tokens/line-heights.d.ts +49 -13
  41. package/dist/theme/tokens/line-heights.js +25 -13
  42. package/package.json +2 -2
  43. package/dist/components/persona/persona-primitive.d.ts +0 -77
  44. package/dist/components/persona/persona-primitive.js +0 -58
@@ -1,7 +1,7 @@
1
1
  import { defineSlotRecipe } from '@chakra-ui/react';
2
2
  export const navbarSlotRecipe = defineSlotRecipe({
3
3
  className: 'sui-navbar',
4
- slots: ['root', 'content', 'brand', 'item', 'link'],
4
+ slots: ['root', 'content', 'brand', 'itemGroup', 'item', 'link'],
5
5
  base: {
6
6
  root: {
7
7
  display: 'flex',
@@ -38,6 +38,13 @@ export const navbarSlotRecipe = defineSlotRecipe({
38
38
  whiteSpace: 'nowrap',
39
39
  boxSizing: 'border-box',
40
40
  },
41
+ itemGroup: {
42
+ display: 'flex',
43
+ alignItems: 'center',
44
+ justifyContent: 'flex-start',
45
+ height: 'full',
46
+ bg: 'transparent',
47
+ },
41
48
  link: {
42
49
  bg: 'transparent',
43
50
  color: 'currentColor',
@@ -47,7 +54,7 @@ export const navbarSlotRecipe = defineSlotRecipe({
47
54
  textDecoration: 'none',
48
55
  whiteSpace: 'nowrap',
49
56
  boxSizing: 'border-box',
50
- borderRadius: 'md',
57
+ borderRadius: 'control.md',
51
58
  transitionProperty: 'common',
52
59
  transitionDuration: 'moderate',
53
60
  lineHeight: 1,
@@ -74,9 +81,21 @@ export const navbarSlotRecipe = defineSlotRecipe({
74
81
  },
75
82
  solid: {
76
83
  root: {
77
- bg: 'colorPalette.500',
84
+ bg: 'colorPalette.solid',
78
85
  color: 'colorPalette.contrast',
79
86
  },
87
+ link: {
88
+ _hover: {
89
+ bg: 'colorPalette.contrast/10',
90
+ },
91
+ },
92
+ },
93
+ glass: {
94
+ root: {
95
+ bg: 'bg.overlay',
96
+ backdropFilter: 'var(--overlay-effect)',
97
+ color: 'fg',
98
+ },
80
99
  },
81
100
  },
82
101
  size: {
@@ -1,4 +1,3 @@
1
- export { Persona, PersonaAvatar } from './persona.tsx';
2
- export type { PersonaProps, PersonaAvatarProps } from './persona.tsx';
1
+ export * as Persona from './persona.tsx';
3
2
  export { defaultPersonaPresenceOptions } from './presence.ts';
4
3
  export type { PersonaPresence, PersonaPresenceConfig } from './presence.ts';
@@ -1,2 +1,2 @@
1
- export { Persona, PersonaAvatar } from "./persona.js";
1
+ export * as Persona from "./persona.js";
2
2
  export { defaultPersonaPresenceOptions } from "./presence.js";
@@ -0,0 +1,63 @@
1
+ import * as React from 'react';
2
+ import * as PersonaPrimitive from './persona.tsx';
3
+ import type { PersonaVariantProps } from './persona.recipe.ts';
4
+ import type { PersonaPresence } from './presence.ts';
5
+ interface PersonaOptions {
6
+ /**
7
+ * The name of the person in the avatar.
8
+ *
9
+ * - if `src` has loaded, the name will be used as the `alt` attribute of the `img`
10
+ * - If `src` is not loaded, the name will be used to create the initials
11
+ */
12
+ name?: string;
13
+ /**
14
+ * The presence status of the person
15
+ *
16
+ * If set will add an AvatarBadge with color configured in `Presence`
17
+ * Default presence options:
18
+ * - online
19
+ * - offline
20
+ * - busy
21
+ * - dnd
22
+ * - away
23
+ */
24
+ presence?: PersonaPresence;
25
+ /**
26
+ * The icon shown in the AvatarBadge
27
+ */
28
+ presenceIcon?: React.ReactNode;
29
+ /**
30
+ * Indicates that a person is out of office. Changes the presence badge style.
31
+ */
32
+ isOutOfOffice?: boolean;
33
+ /**
34
+ * Primary label of the persona, defaults to the name
35
+ */
36
+ label?: React.ReactNode;
37
+ /**
38
+ * Secondary label, usually the role of the person
39
+ * Only visible from md size and up.
40
+ */
41
+ secondaryLabel?: React.ReactNode;
42
+ /**
43
+ * Tertiary label, usually the status of the person.
44
+ * Only visible from lg size and up.
45
+ */
46
+ tertiaryLabel?: React.ReactNode;
47
+ /**
48
+ * Hide the persona details next to the avatar.
49
+ */
50
+ hideDetails?: boolean;
51
+ }
52
+ export interface PersonaProps extends PersonaOptions, Omit<PersonaPrimitive.AvatarProps, 'size'>, Omit<PersonaPrimitive.RootProps, 'presence'>, PersonaVariantProps {
53
+ }
54
+ /**
55
+ * The wrapper component that handles default composition.
56
+ *
57
+ * @see Docs https://saas-ui.dev/docs/components/data-display/persona
58
+ */
59
+ export declare const Persona: React.ForwardRefExoticComponent<PersonaProps & React.RefAttributes<HTMLDivElement>>;
60
+ export interface PersonaAvatarProps extends Omit<PersonaProps, 'hideDetails' | 'label' | 'secondaryLabel' | 'tertiaryLabel' | 'children'> {
61
+ }
62
+ export declare const PersonaAvatar: React.ForwardRefExoticComponent<PersonaAvatarProps & React.RefAttributes<HTMLDivElement>>;
63
+ export {};
@@ -0,0 +1,19 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import * as React from 'react';
4
+ import * as PersonaPrimitive from "./persona.js";
5
+ /**
6
+ * The wrapper component that handles default composition.
7
+ *
8
+ * @see Docs https://saas-ui.dev/docs/components/data-display/persona
9
+ */
10
+ export const Persona = React.forwardRef((props, ref) => {
11
+ const { name, presence, presenceIcon, isOutOfOffice, label, secondaryLabel, tertiaryLabel, size, hideDetails, children,
12
+ /** Avatar props */
13
+ getInitials, icon, loading, onError, src, srcSet, fallback, ...rest } = props;
14
+ return (_jsxs(PersonaPrimitive.Root, { ref: ref, outOfOffice: isOutOfOffice, presence: presence, size: size, ...rest, children: [_jsx(PersonaPrimitive.Avatar, { name: name, size: size, getInitials: getInitials, icon: icon, loading: loading, onError: onError, src: src, srcSet: srcSet, fallback: fallback, children: presence ? (_jsx(PersonaPrimitive.PresenceBadge, { children: presenceIcon })) : null }), !hideDetails && (_jsxs(PersonaPrimitive.Details, { children: [_jsx(PersonaPrimitive.Label, { children: label || name }), secondaryLabel && (_jsx(PersonaPrimitive.SecondaryLabel, { children: secondaryLabel })), tertiaryLabel && (_jsx(PersonaPrimitive.TertiaryLabel, { children: tertiaryLabel })), children] }))] }));
15
+ });
16
+ Persona.displayName = 'Persona';
17
+ export const PersonaAvatar = React.forwardRef(function PersonaAvatar(props, ref) {
18
+ return _jsx(Persona, { ref: ref, ...props, hideDetails: true });
19
+ });
@@ -1 +1,9 @@
1
- export declare const usePersonaStyles: () => Record<string, import("@chakra-ui/react").SystemStyleObject>, withProvider: <T, P>(Component: React.ElementType<any>, slot: string, options?: import("@chakra-ui/react").WithProviderOptions<P> | undefined) => import("react").ForwardRefExoticComponent<import("react").PropsWithoutRef<P> & import("react").RefAttributes<T>>, withContext: <T, P_1>(Component: React.ElementType<any>, slot?: string | undefined, options?: import("@chakra-ui/react").WithContextOptions<P_1> | undefined) => import("react").ForwardRefExoticComponent<import("react").PropsWithoutRef<P_1> & import("react").RefAttributes<T>>;
1
+ export declare const usePersonaStyles: () => Record<string, import("@chakra-ui/react").SystemStyleObject>, useRecipeResult: (props: any) => {
2
+ styles: Record<string, import("@chakra-ui/react").SystemStyleObject>;
3
+ classNames: Record<string, string>;
4
+ props: {
5
+ [x: string]: any;
6
+ [x: number]: any;
7
+ [x: symbol]: any;
8
+ };
9
+ }, usePropsContext: () => Record<string, any>, withProvider: <T, P>(Component: React.ElementType<any>, slot: string, options?: import("@chakra-ui/react").WithProviderOptions<P> | undefined) => import("react").ForwardRefExoticComponent<import("react").PropsWithoutRef<P> & import("react").RefAttributes<T>>, withContext: <T, P_1>(Component: React.ElementType<any>, slot?: string | undefined, options?: import("@chakra-ui/react").WithContextOptions<P_1> | undefined) => import("react").ForwardRefExoticComponent<import("react").PropsWithoutRef<P_1> & import("react").RefAttributes<T>>, ClassNamesProvider: import("react").Provider<Record<string, string>>, PropsProvider: import("react").Provider<Record<string, any>>, StylesProvider: import("react").Provider<Record<string, import("@chakra-ui/react").SystemStyleObject>>;
@@ -1,4 +1,4 @@
1
1
  import { createSlotRecipeContext } from '@chakra-ui/react';
2
- export const { useStyles: usePersonaStyles, withProvider, withContext, } = createSlotRecipeContext({
2
+ export const { useStyles: usePersonaStyles, useRecipeResult, usePropsContext, withProvider, withContext, ClassNamesProvider, PropsProvider, StylesProvider, } = createSlotRecipeContext({
3
3
  key: 'suiPersona',
4
4
  });
@@ -1,63 +1,77 @@
1
- import * as React from 'react';
2
- import * as PersonaPrimitive from './persona-primitive.tsx';
1
+ import React from 'react';
2
+ import { HTMLChakraProps, type ImageProps, type SlotRecipeProps } from '@chakra-ui/react';
3
+ import { type AvatarProps } from '../avatar/avatar.tsx';
3
4
  import type { PersonaVariantProps } from './persona.recipe.ts';
4
5
  import type { PersonaPresence } from './presence.ts';
5
- interface PersonaOptions {
6
+ interface PersonaRootProps extends HTMLChakraProps<'div'>, SlotRecipeProps<'suiPersona'>, PersonaVariantProps {
6
7
  /**
7
- * The name of the person in the avatar.
8
- *
9
- * - if `src` has loaded, the name will be used as the `alt` attribute of the `img`
10
- * - If `src` is not loaded, the name will be used to create the initials
8
+ * Indicates that a person is out of office. Changes the presence badge style.
11
9
  */
12
- name?: string;
10
+ outOfOffice?: boolean;
13
11
  /**
14
12
  * The presence status of the person
15
- *
16
- * If set will add an AvatarBadge with color configured in `Presence`
17
- * Default presence options:
18
- * - online
19
- * - offline
20
- * - busy
21
- * - dnd
22
- * - away
23
13
  */
24
14
  presence?: PersonaPresence;
15
+ }
16
+ /**
17
+ * The root component that provides context and styles.
18
+ *
19
+ * @see Docs https://saas-ui.dev/docs/components/persona
20
+ */
21
+ declare const PersonaRoot: React.ForwardRefExoticComponent<PersonaRootProps & React.RefAttributes<HTMLDivElement>>;
22
+ interface PersonaAvatarOptions {
25
23
  /**
26
- * The icon shown in the AvatarBadge
27
- */
28
- presenceIcon?: React.ReactNode;
29
- /**
30
- * Indicates that a person is out of office. Changes the presence badge style.
31
- */
32
- isOutOfOffice?: boolean;
33
- /**
34
- * Primary label of the persona, defaults to the name
35
- */
36
- label?: React.ReactNode;
37
- /**
38
- * Secondary label, usually the role of the person
39
- * Only visible from md size and up.
40
- */
41
- secondaryLabel?: React.ReactNode;
42
- /**
43
- * Tertiary label, usually the status of the person.
44
- * Only visible from lg size and up.
45
- */
46
- tertiaryLabel?: React.ReactNode;
47
- /**
48
- * Hide the persona details next to the avatar.
24
+ * The name of the person in the avatar.
25
+ *
26
+ * - if `src` has loaded, the name will be used as the `alt` attribute of the `img`
27
+ * - If `src` is not loaded, the name will be used to create the initials
49
28
  */
50
- hideDetails?: boolean;
29
+ name?: string;
30
+ }
31
+ interface PersonaAvatarProps extends PersonaAvatarOptions, AvatarProps {
32
+ src?: string;
33
+ srcSet?: string;
34
+ loading?: ImageProps['loading'];
35
+ icon?: React.ReactElement;
36
+ fallback?: React.ReactNode;
37
+ getInitials?: (name?: string | null) => string | null;
38
+ }
39
+ /**
40
+ * An avatar with optional status badge.
41
+ *
42
+ * @see Docs https://saas-ui.dev/docs/components/persona
43
+ */
44
+ declare const PersonaAvatar: React.ForwardRefExoticComponent<PersonaAvatarProps & React.RefAttributes<HTMLDivElement>>;
45
+ interface PersonaPresenceBadgeProps extends HTMLChakraProps<'span'> {
51
46
  }
52
- export interface PersonaProps extends PersonaOptions, Omit<PersonaPrimitive.AvatarProps, 'size'>, Omit<PersonaPrimitive.RootProps, 'presence'>, PersonaVariantProps {
47
+ declare const PersonaPresenceBadge: React.ForwardRefExoticComponent<PersonaPresenceBadgeProps & React.RefAttributes<HTMLSpanElement>>;
48
+ interface PersonaDetailsProps extends HTMLChakraProps<'div'> {
53
49
  }
54
50
  /**
55
- * The wrapper component that handles default composition.
51
+ * Wrapper component for the labels.
56
52
  *
57
- * @see Docs https://saas-ui.dev/docs/components/data-display/persona
53
+ * @see Docs https://saas-ui.dev/docs/components/persona
58
54
  */
59
- export declare const Persona: React.ForwardRefExoticComponent<PersonaProps & React.RefAttributes<HTMLDivElement>>;
60
- export interface PersonaAvatarProps extends Omit<PersonaProps, 'hideDetails' | 'label' | 'secondaryLabel' | 'tertiaryLabel' | 'children'> {
55
+ declare const PersonaDetails: React.ForwardRefExoticComponent<PersonaDetailsProps & React.RefAttributes<HTMLDivElement>>;
56
+ interface PersonaLabelProps extends HTMLChakraProps<'span'> {
61
57
  }
62
- export declare const PersonaAvatar: React.ForwardRefExoticComponent<PersonaAvatarProps & React.RefAttributes<HTMLDivElement>>;
63
- export {};
58
+ /**
59
+ * The main label, usually a name.
60
+ *
61
+ * @see Docs https://saas-ui.dev/docs/components/persona
62
+ */
63
+ declare const PersonaLabel: React.ForwardRefExoticComponent<PersonaLabelProps & React.RefAttributes<HTMLSpanElement>>;
64
+ /**
65
+ * The secondary label, usually the role of a person.
66
+ *
67
+ * @see Docs https://saas-ui.dev/docs/components/persona
68
+ */
69
+ declare const PersonaSecondaryLabel: React.ForwardRefExoticComponent<PersonaLabelProps & React.RefAttributes<HTMLSpanElement>>;
70
+ /**
71
+ * The tertiary label, typically a status message.
72
+ *
73
+ * @see Docs https://saas-ui.dev/docs/components/persona
74
+ */
75
+ declare const PersonaTertiaryLabel: React.ForwardRefExoticComponent<PersonaLabelProps & React.RefAttributes<HTMLSpanElement>>;
76
+ export { PersonaRoot as Root, PersonaAvatar as Avatar, PersonaPresenceBadge as PresenceBadge, PersonaDetails as Details, PersonaLabel as Label, PersonaSecondaryLabel as SecondaryLabel, PersonaTertiaryLabel as TertiaryLabel, };
77
+ export type { PersonaRootProps as RootProps, PersonaAvatarProps as AvatarProps, PersonaPresenceBadgeProps as PresenceBadgeProps, PersonaDetailsProps as DetailsProps, PersonaLabelProps as LabelProps, };
@@ -1,18 +1,67 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import * as React from 'react';
3
- import * as PersonaPrimitive from "./persona-primitive.js";
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { forwardRef, useMemo } from 'react';
4
+ import { AvatarPropsProvider, chakra, mergeProps, } from '@chakra-ui/react';
5
+ import { dataAttr } from '@saas-ui/core/utils';
6
+ import { cx } from '@saas-ui/core/utils';
7
+ import { Avatar } from "../avatar/avatar.js";
8
+ import { ClassNamesProvider, StylesProvider, usePropsContext, useRecipeResult, withContext, } from "./persona.context.js";
4
9
  /**
5
- * The wrapper component that handles default composition.
10
+ * The root component that provides context and styles.
6
11
  *
7
- * @see Docs https://saas-ui.dev/docs/components/data-display/persona
12
+ * @see Docs https://saas-ui.dev/docs/components/persona
8
13
  */
9
- export const Persona = React.forwardRef((props, ref) => {
10
- const { name, presence, presenceIcon, isOutOfOffice, label, secondaryLabel, tertiaryLabel, size, hideDetails, children,
11
- /** Avatar props */
12
- getInitials, icon, loading, onError, src, srcSet, fallback, ...rest } = props;
13
- return (_jsxs(PersonaPrimitive.Root, { ref: ref, outOfOffice: isOutOfOffice, presence: presence, size: size, ...rest, children: [_jsx(PersonaPrimitive.Avatar, { name: name, size: size, getInitials: getInitials, icon: icon, loading: loading, onError: onError, src: src, srcSet: srcSet, fallback: fallback, children: presence ? (_jsx(PersonaPrimitive.PresenceBadge, { children: presenceIcon })) : null }), !hideDetails && (_jsxs(PersonaPrimitive.Details, { children: [_jsx(PersonaPrimitive.Label, { children: label || name }), secondaryLabel && (_jsx(PersonaPrimitive.SecondaryLabel, { children: secondaryLabel })), tertiaryLabel && (_jsx(PersonaPrimitive.TertiaryLabel, { children: tertiaryLabel })), children] }))] }));
14
+ const PersonaRoot = forwardRef((props, ref) => {
15
+ const propsContext = usePropsContext();
16
+ const mergedProps = useMemo(() => mergeProps(propsContext, props), [propsContext, props]);
17
+ const { styles, props: rootProps, classNames, } = useRecipeResult(mergedProps);
18
+ const className = classNames['root'];
19
+ const { outOfOffice, presence, ...rest } = rootProps;
20
+ return (_jsx(StylesProvider, { value: styles, children: _jsx(ClassNamesProvider, { value: classNames, children: _jsx(AvatarPropsProvider, { value: {
21
+ size: props.size,
22
+ }, children: _jsx(chakra.div, { ref: ref, ...rest, "data-out-of-office": dataAttr(outOfOffice), "data-presence": presence, css: [
23
+ presence
24
+ ? {
25
+ '--persona-presence': `colors.presence.${presence}`,
26
+ }
27
+ : undefined,
28
+ styles['root'],
29
+ rest.css,
30
+ ], className: cx(className, rest.className) }) }) }) }));
14
31
  });
15
- Persona.displayName = 'Persona';
16
- export const PersonaAvatar = React.forwardRef(function PersonaAvatar(props, ref) {
17
- return _jsx(Persona, { ref: ref, ...props, hideDetails: true });
32
+ /**
33
+ * An avatar with optional status badge.
34
+ *
35
+ * @see Docs https://saas-ui.dev/docs/components/persona
36
+ */
37
+ const PersonaAvatar = forwardRef((props, ref) => {
38
+ const { children, ...rest } = props;
39
+ return (_jsx(Avatar, { ref: ref, ...rest, children: children }));
18
40
  });
41
+ const PersonaPresenceBadge = withContext('span', 'presence');
42
+ /**
43
+ * Wrapper component for the labels.
44
+ *
45
+ * @see Docs https://saas-ui.dev/docs/components/persona
46
+ */
47
+ const PersonaDetails = withContext('div', 'details');
48
+ /**
49
+ * The main label, usually a name.
50
+ *
51
+ * @see Docs https://saas-ui.dev/docs/components/persona
52
+ */
53
+ const PersonaLabel = withContext('span', 'label');
54
+ PersonaLabel.displayName = 'PersonaLabel';
55
+ /**
56
+ * The secondary label, usually the role of a person.
57
+ *
58
+ * @see Docs https://saas-ui.dev/docs/components/persona
59
+ */
60
+ const PersonaSecondaryLabel = withContext('span', 'secondaryLabel');
61
+ /**
62
+ * The tertiary label, typically a status message.
63
+ *
64
+ * @see Docs https://saas-ui.dev/docs/components/persona
65
+ */
66
+ const PersonaTertiaryLabel = withContext('span', 'tertiaryLabel');
67
+ export { PersonaRoot as Root, PersonaAvatar as Avatar, PersonaPresenceBadge as PresenceBadge, PersonaDetails as Details, PersonaLabel as Label, PersonaSecondaryLabel as SecondaryLabel, PersonaTertiaryLabel as TertiaryLabel, };
@@ -2,6 +2,7 @@ import { defineRecipe } from '@chakra-ui/react/styled-system';
2
2
  export const radiomarkRecipe = defineRecipe({
3
3
  className: 'chakra-radiomark',
4
4
  base: {
5
+ colorPalette: 'accent',
5
6
  display: 'inline-flex',
6
7
  alignItems: 'center',
7
8
  justifyContent: 'center',
@@ -22,6 +22,9 @@ export const sidebarNavItemSlotRecipe = defineSlotRecipe({
22
22
  transitionDuration: 'fast',
23
23
  focusVisibleRing: 'inside',
24
24
  focusRingWidth: '1px',
25
+ _disabled: {
26
+ layerStyle: 'disabled',
27
+ },
25
28
  '& > svg': {
26
29
  boxSize: 4,
27
30
  color: 'var(--sidebar-item-icon-color)',
@@ -35,6 +35,7 @@ export declare const skeletonRecipe: import("@chakra-ui/react").RecipeDefinition
35
35
  };
36
36
  none: {
37
37
  animation: "none";
38
+ background: "bg.muted";
38
39
  };
39
40
  };
40
41
  }>;
@@ -39,6 +39,7 @@ export const skeletonRecipe = defineRecipe({
39
39
  },
40
40
  none: {
41
41
  animation: 'none',
42
+ background: 'bg.muted',
42
43
  },
43
44
  },
44
45
  },
@@ -5,6 +5,7 @@ export const switchSlotRecipe = defineSlotRecipe({
5
5
  className: 'chakra-switch',
6
6
  base: {
7
7
  root: {
8
+ colorPalette: 'accent',
8
9
  display: 'inline-flex',
9
10
  gap: '2.5',
10
11
  alignItems: 'center',
package/dist/index.d.ts CHANGED
@@ -34,7 +34,7 @@ export { Command } from './components/command/index.ts';
34
34
  export { DataList, useDataListStyles } from './components/data-list/index.ts';
35
35
  export { Dialog } from './components/dialog/index.ts';
36
36
  export { Drawer } from './components/drawer/index.ts';
37
- export { Editable } from './components/editable/index.ts';
37
+ export { Editable, useEditable, useEditableContext, } from './components/editable/index.ts';
38
38
  export { EmptyState, type EmptyStateProps, } from './components/empty-state/index.ts';
39
39
  export { FileUpload, useFileUploadContext, } from './components/file-upload/index.ts';
40
40
  export { Field, useFieldContext, useFieldStyles, } from './components/field/index.ts';
@@ -63,7 +63,7 @@ export { Menu } from './components/menu/index.ts';
63
63
  export { Page, usePageStyles } from './components/page/index.ts';
64
64
  export { Pagination } from './components/pagination/index.ts';
65
65
  export { PasswordInput, type PasswordInputProps, } from './components/password-input/index.ts';
66
- export { Persona, PersonaAvatar, type PersonaPresence, type PersonaAvatarProps, type PersonaPresenceConfig, type PersonaProps, defaultPersonaPresenceOptions, } from './components/persona/index.ts';
66
+ export { Persona, type PersonaPresence, type PersonaPresenceConfig, defaultPersonaPresenceOptions, } from './components/persona/index.ts';
67
67
  export { PinInput, type PinInputProps } from './components/pin-input/index.ts';
68
68
  export { Popover } from './components/popover/index.ts';
69
69
  export { Progress } from './components/progress/index.ts';
package/dist/index.js CHANGED
@@ -29,7 +29,7 @@ export { Command } from "./components/command/index.js";
29
29
  export { DataList, useDataListStyles } from "./components/data-list/index.js";
30
30
  export { Dialog } from "./components/dialog/index.js";
31
31
  export { Drawer } from "./components/drawer/index.js";
32
- export { Editable } from "./components/editable/index.js";
32
+ export { Editable, useEditable, useEditableContext, } from "./components/editable/index.js";
33
33
  export { EmptyState, } from "./components/empty-state/index.js";
34
34
  export { FileUpload, useFileUploadContext, } from "./components/file-upload/index.js";
35
35
  export { Field, useFieldContext, useFieldStyles, } from "./components/field/index.js";
@@ -58,7 +58,7 @@ export { Menu } from "./components/menu/index.js";
58
58
  export { Page, usePageStyles } from "./components/page/index.js";
59
59
  export { Pagination } from "./components/pagination/index.js";
60
60
  export { PasswordInput, } from "./components/password-input/index.js";
61
- export { Persona, PersonaAvatar, defaultPersonaPresenceOptions, } from "./components/persona/index.js";
61
+ export { Persona, defaultPersonaPresenceOptions, } from "./components/persona/index.js";
62
62
  export { PinInput } from "./components/pin-input/index.js";
63
63
  export { Popover } from "./components/popover/index.js";
64
64
  export { Progress } from "./components/progress/index.js";
@@ -35,16 +35,12 @@ export const globalCss = defineGlobalStyles({
35
35
  '--cursor-button': 'default',
36
36
  '--radius-full': '9999px',
37
37
  '--scale-factor': '1',
38
- '--overlay-translucency': '95%',
39
38
  '--overlay-effect': 'blur({blurs.lg})',
40
39
  '--backdrop-effect': 'none',
41
40
  '--scrollbar-color': 'colors.border.emphasized',
42
41
  scrollbarWidth: 'thin',
43
42
  scrollbarColor: 'var(--scrollbar-color) transparent',
44
43
  },
45
- '.dark *': {
46
- '--overlay-translucency': '85%',
47
- },
48
44
  body: {
49
45
  color: 'fg',
50
46
  bg: 'bg',
@@ -121,7 +121,7 @@ export const layerStyles = defineLayerStyles({
121
121
  bg: 'bg.overlay',
122
122
  backdropFilter: 'var(--overlay-effect)',
123
123
  borderRadius: 'panel.lg',
124
- boxShadow: 'lg',
124
+ boxShadow: 'overlay',
125
125
  },
126
126
  },
127
127
  backdrop: {
@@ -253,37 +253,59 @@ export declare const recipes: {
253
253
  heading: import("@chakra-ui/react").RecipeDefinition<{
254
254
  size: {
255
255
  xs: {
256
- textStyle: "xs";
256
+ fontSize: "xs";
257
+ lineHeight: "heading.xs";
258
+ letterSpacing: "heading.xs";
257
259
  };
258
260
  sm: {
259
- textStyle: "sm";
261
+ fontSize: "sm";
262
+ lineHeight: "heading.sm";
263
+ letterSpacing: "heading.sm";
260
264
  };
261
265
  md: {
262
- textStyle: "md";
266
+ fontSize: "md";
267
+ lineHeight: "heading.md";
268
+ letterSpacing: "heading.md";
263
269
  };
264
270
  lg: {
265
- textStyle: "lg";
271
+ fontSize: "lg";
272
+ lineHeight: "heading.lg";
273
+ letterSpacing: "heading.lg";
266
274
  };
267
275
  xl: {
268
- textStyle: "xl";
276
+ fontSize: "xl";
277
+ lineHeight: "heading.xl";
278
+ letterSpacing: "heading.xl";
269
279
  };
270
280
  '2xl': {
271
- textStyle: "2xl";
281
+ fontSize: "2xl";
282
+ lineHeight: "heading.2xl";
283
+ letterSpacing: "heading.2xl";
272
284
  };
273
285
  '3xl': {
274
- textStyle: "3xl";
286
+ fontSize: "3xl";
287
+ lineHeight: "heading.3xl";
288
+ letterSpacing: "heading.3xl";
275
289
  };
276
290
  '4xl': {
277
- textStyle: "4xl";
291
+ fontSize: "4xl";
292
+ lineHeight: "heading.4xl";
293
+ letterSpacing: "heading.4xl";
278
294
  };
279
295
  '5xl': {
280
- textStyle: "5xl";
296
+ fontSize: "5xl";
297
+ lineHeight: "heading.5xl";
298
+ letterSpacing: "heading.5xl";
281
299
  };
282
300
  '6xl': {
283
- textStyle: "6xl";
301
+ fontSize: "6xl";
302
+ lineHeight: "heading.6xl";
303
+ letterSpacing: "heading.6xl";
284
304
  };
285
305
  '7xl': {
286
- textStyle: "7xl";
306
+ fontSize: "7xl";
307
+ lineHeight: "heading.7xl";
308
+ letterSpacing: "heading.7xl";
287
309
  };
288
310
  };
289
311
  }>;
@@ -553,6 +575,7 @@ export declare const recipes: {
553
575
  };
554
576
  none: {
555
577
  animation: "none";
578
+ background: "bg.muted";
556
579
  };
557
580
  };
558
581
  }>;
@@ -74,8 +74,8 @@ export const semanticColors = defineSemanticTokens.colors({
74
74
  },
75
75
  overlay: {
76
76
  value: {
77
- _light: 'color-mix(in oklch, {colors.white} var(--overlay-translucency), transparent)',
78
- _dark: 'color-mix(in oklch, {colors.gray.900} var(--overlay-translucency), transparent)',
77
+ _light: 'color-mix(in oklch, {colors.white} var(--overlay-translucency, 95%), transparent)',
78
+ _dark: 'color-mix(in oklch, {colors.gray.900} var(--overlay-translucency, 85%), transparent)',
79
79
  },
80
80
  },
81
81
  backdrop: {
@@ -47,4 +47,10 @@ export declare const semanticShadows: {
47
47
  _dark: string;
48
48
  };
49
49
  };
50
+ overlay: {
51
+ value: {
52
+ _light: string;
53
+ _dark: string;
54
+ };
55
+ };
50
56
  };
@@ -48,4 +48,10 @@ export const semanticShadows = defineSemanticTokens.shadows({
48
48
  _dark: 'inset 0 -1px 2px 0 {colors.gray.300/4}, inset 0 0 0 1px {colors.gray.300/4}',
49
49
  },
50
50
  },
51
+ overlay: {
52
+ value: {
53
+ _light: '0px 8px 16px {colors.gray.900/5}, 0px 0px 4px {colors.gray.900/5}, 0px 0px 1px {colors.gray.500/80}',
54
+ _dark: '0px 8px 16px {black/20}, 0px 0px 3px {colors.gray.900/20}, 0px 0px 1px {colors.gray.100/80}',
55
+ },
56
+ },
51
57
  });