@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
@@ -1419,7 +1419,7 @@ export declare const slotRecipes: {
1419
1419
  subtle: {
1420
1420
  item: {
1421
1421
  _highlighted: {
1422
- bg: "bg.subtle";
1422
+ bg: "bg.emphasized";
1423
1423
  };
1424
1424
  };
1425
1425
  };
@@ -1436,18 +1436,19 @@ export declare const slotRecipes: {
1436
1436
  sm: {
1437
1437
  content: {
1438
1438
  minW: "8rem";
1439
- padding: "0.5";
1439
+ padding: "1";
1440
+ borderRadius: "panel.md";
1440
1441
  };
1441
1442
  item: {
1442
1443
  gap: "1";
1443
1444
  textStyle: "xs";
1444
- py: "1";
1445
+ minH: "6";
1445
1446
  px: "1.5";
1446
1447
  ps: "var(--menu-item-inset, {sizes.1.5})";
1447
1448
  };
1448
1449
  itemGroupLabel: {
1449
1450
  textStyle: "xs";
1450
- py: "1";
1451
+ minH: "6";
1451
1452
  px: "1.5";
1452
1453
  };
1453
1454
  };
@@ -1459,13 +1460,13 @@ export declare const slotRecipes: {
1459
1460
  item: {
1460
1461
  gap: "2";
1461
1462
  textStyle: "sm";
1462
- py: "1.5";
1463
+ minH: "7";
1463
1464
  px: "2";
1464
1465
  ps: "var(--menu-item-inset, {sizes.2})";
1465
1466
  };
1466
1467
  itemGroupLabel: {
1467
1468
  textStyle: "sm";
1468
- py: "1.5";
1469
+ minH: "7";
1469
1470
  px: "2";
1470
1471
  };
1471
1472
  };
@@ -3700,7 +3701,7 @@ export declare const slotRecipes: {
3700
3701
  };
3701
3702
  };
3702
3703
  }>;
3703
- suiNavbar: import("@chakra-ui/react").SlotRecipeDefinition<"content" | "link" | "root" | "item" | "brand", {
3704
+ suiNavbar: import("@chakra-ui/react").SlotRecipeDefinition<"content" | "link" | "root" | "item" | "itemGroup" | "brand", {
3704
3705
  variant: {
3705
3706
  neutral: {
3706
3707
  root: {
@@ -3710,9 +3711,21 @@ export declare const slotRecipes: {
3710
3711
  };
3711
3712
  solid: {
3712
3713
  root: {
3713
- bg: "colorPalette.500";
3714
+ bg: "colorPalette.solid";
3714
3715
  color: "colorPalette.contrast";
3715
3716
  };
3717
+ link: {
3718
+ _hover: {
3719
+ bg: "colorPalette.contrast/10";
3720
+ };
3721
+ };
3722
+ };
3723
+ glass: {
3724
+ root: {
3725
+ bg: "bg.overlay";
3726
+ backdropFilter: "var(--overlay-effect)";
3727
+ color: "fg";
3728
+ };
3716
3729
  };
3717
3730
  };
3718
3731
  size: {
@@ -1,35 +1,79 @@
1
1
  import { defineTextStyles } from '@chakra-ui/react';
2
2
  export const textStyles = defineTextStyles({
3
- '2xs': { value: { fontSize: '2xs', lineHeight: '0.75rem' } },
4
- xs: { value: { fontSize: 'xs', lineHeight: '1rem' } },
5
- sm: { value: { fontSize: 'sm', lineHeight: '1.25rem' } },
6
- md: { value: { fontSize: 'md', lineHeight: '1.5rem' } },
7
- lg: { value: { fontSize: 'lg', lineHeight: '1.75rem' } },
8
- xl: { value: { fontSize: 'xl', lineHeight: '1.875rem' } },
9
- '2xl': { value: { fontSize: '2xl', lineHeight: '2rem' } },
10
- '3xl': { value: { fontSize: '3xl', lineHeight: '2.375rem' } },
3
+ '2xs': {
4
+ value: {
5
+ fontSize: '2xs',
6
+ lineHeight: '2xs',
7
+ },
8
+ },
9
+ xs: {
10
+ value: {
11
+ fontSize: 'xs',
12
+ lineHeight: 'xs',
13
+ },
14
+ },
15
+ sm: {
16
+ value: {
17
+ fontSize: 'sm',
18
+ lineHeight: 'sm',
19
+ },
20
+ },
21
+ md: {
22
+ value: {
23
+ fontSize: 'md',
24
+ lineHeight: 'md',
25
+ },
26
+ },
27
+ lg: {
28
+ value: {
29
+ fontSize: 'lg',
30
+ lineHeight: 'lg',
31
+ },
32
+ },
33
+ xl: {
34
+ value: {
35
+ fontSize: 'xl',
36
+ lineHeight: 'xl',
37
+ },
38
+ },
39
+ '2xl': {
40
+ value: {
41
+ fontSize: '2xl',
42
+ lineHeight: '2xl',
43
+ },
44
+ },
45
+ '3xl': {
46
+ value: {
47
+ fontSize: '3xl',
48
+ lineHeight: '3xl',
49
+ },
50
+ },
11
51
  '4xl': {
12
52
  value: {
13
53
  fontSize: '4xl',
14
- lineHeight: '2.75rem',
15
- letterSpacing: '-0.025em',
54
+ lineHeight: '4xl',
55
+ letterSpacing: 'tight',
16
56
  },
17
57
  },
18
58
  '5xl': {
19
59
  value: {
20
60
  fontSize: '5xl',
21
- lineHeight: '3.75rem',
22
- letterSpacing: '-0.025em',
61
+ lineHeight: '5xl',
62
+ letterSpacing: 'tight',
23
63
  },
24
64
  },
25
65
  '6xl': {
26
- value: { fontSize: '6xl', lineHeight: '4.5rem', letterSpacing: '-0.025em' },
66
+ value: {
67
+ fontSize: '6xl',
68
+ lineHeight: '6xl',
69
+ letterSpacing: 'tighter',
70
+ },
27
71
  },
28
72
  '7xl': {
29
73
  value: {
30
74
  fontSize: '7xl',
31
- lineHeight: '5.75rem',
32
- letterSpacing: '-0.025em',
75
+ lineHeight: '7xl',
76
+ letterSpacing: 'tightest',
33
77
  },
34
78
  },
35
79
  none: {
@@ -1,10 +1,16 @@
1
1
  export declare const letterSpacings: {
2
+ tightest: {
3
+ value: string;
4
+ };
2
5
  tighter: {
3
6
  value: string;
4
7
  };
5
8
  tight: {
6
9
  value: string;
7
10
  };
11
+ normal: {
12
+ value: string;
13
+ };
8
14
  wide: {
9
15
  value: string;
10
16
  };
@@ -14,4 +20,37 @@ export declare const letterSpacings: {
14
20
  widest: {
15
21
  value: string;
16
22
  };
23
+ 'heading.xs': {
24
+ value: string;
25
+ };
26
+ 'heading.sm': {
27
+ value: string;
28
+ };
29
+ 'heading.md': {
30
+ value: string;
31
+ };
32
+ 'heading.lg': {
33
+ value: string;
34
+ };
35
+ 'heading.xl': {
36
+ value: string;
37
+ };
38
+ 'heading.2xl': {
39
+ value: string;
40
+ };
41
+ 'heading.3xl': {
42
+ value: string;
43
+ };
44
+ 'heading.4xl': {
45
+ value: string;
46
+ };
47
+ 'heading.5xl': {
48
+ value: string;
49
+ };
50
+ 'heading.6xl': {
51
+ value: string;
52
+ };
53
+ 'heading.7xl': {
54
+ value: string;
55
+ };
17
56
  };
@@ -1,8 +1,21 @@
1
1
  import { defineTokens } from '@chakra-ui/react';
2
2
  export const letterSpacings = defineTokens.letterSpacings({
3
- tighter: { value: '-0.05em' },
4
- tight: { value: '-0.025em' },
5
- wide: { value: '0.025em' },
6
- wider: { value: '0.05em' },
7
- widest: { value: '0.1em' },
3
+ tightest: { value: '-0.05em' },
4
+ tighter: { value: '-0.025em' },
5
+ tight: { value: '-0.0125em' },
6
+ normal: { value: '0' },
7
+ wide: { value: '0.0125em' },
8
+ wider: { value: '0.025em' },
9
+ widest: { value: '0.05em' },
10
+ 'heading.xs': { value: '0.0025em' },
11
+ 'heading.sm': { value: '0' },
12
+ 'heading.md': { value: '0' },
13
+ 'heading.lg': { value: '-0.0025em' },
14
+ 'heading.xl': { value: '-0.005' },
15
+ 'heading.2xl': { value: '-0.00625em' },
16
+ 'heading.3xl': { value: '-0.0075em' },
17
+ 'heading.4xl': { value: '-0.01em' },
18
+ 'heading.5xl': { value: '-0.025em' },
19
+ 'heading.6xl': { value: '-0.03em' },
20
+ 'heading.7xl': { value: '-0.035em' },
8
21
  });
@@ -1,41 +1,77 @@
1
1
  export declare const lineHeights: {
2
- shorter: {
2
+ '2xs': {
3
3
  value: string;
4
4
  };
5
- short: {
5
+ xs: {
6
6
  value: string;
7
7
  };
8
- moderate: {
8
+ sm: {
9
9
  value: string;
10
10
  };
11
- tall: {
11
+ md: {
12
12
  value: string;
13
13
  };
14
- taller: {
14
+ lg: {
15
15
  value: string;
16
16
  };
17
- '3': {
17
+ xl: {
18
18
  value: string;
19
19
  };
20
- '4': {
20
+ '2xl': {
21
21
  value: string;
22
22
  };
23
- '5': {
23
+ '3xl': {
24
24
  value: string;
25
25
  };
26
- '6': {
26
+ '4xl': {
27
27
  value: string;
28
28
  };
29
- '7': {
29
+ '5xl': {
30
30
  value: string;
31
31
  };
32
- '8': {
32
+ '6xl': {
33
33
  value: string;
34
34
  };
35
- '9': {
35
+ '7xl': {
36
36
  value: string;
37
37
  };
38
- '10': {
38
+ '8xl': {
39
+ value: string;
40
+ };
41
+ '9xl': {
42
+ value: string;
43
+ };
44
+ 'heading.xs': {
45
+ value: string;
46
+ };
47
+ 'heading.sm': {
48
+ value: string;
49
+ };
50
+ 'heading.md': {
51
+ value: string;
52
+ };
53
+ 'heading.lg': {
54
+ value: string;
55
+ };
56
+ 'heading.xl': {
57
+ value: string;
58
+ };
59
+ 'heading.2xl': {
60
+ value: string;
61
+ };
62
+ 'heading.3xl': {
63
+ value: string;
64
+ };
65
+ 'heading.4xl': {
66
+ value: string;
67
+ };
68
+ 'heading.5xl': {
69
+ value: string;
70
+ };
71
+ 'heading.6xl': {
72
+ value: string;
73
+ };
74
+ 'heading.7xl': {
39
75
  value: string;
40
76
  };
41
77
  };
@@ -1,17 +1,29 @@
1
1
  import { defineTokens } from '@chakra-ui/react';
2
2
  import { scaleToken } from "../utils.js";
3
3
  export const lineHeights = defineTokens.lineHeights({
4
- shorter: { value: scaleToken('1.25') },
5
- short: { value: scaleToken('1.375') },
6
- moderate: { value: scaleToken('1.5') },
7
- tall: { value: scaleToken('1.625') },
8
- taller: { value: scaleToken('2') },
9
- '3': { value: scaleToken('0.75rem') },
10
- '4': { value: scaleToken('1rem') },
11
- '5': { value: scaleToken('1.25rem') },
12
- '6': { value: scaleToken('1.5rem') },
13
- '7': { value: scaleToken('1.75rem') },
14
- '8': { value: scaleToken('2rem') },
15
- '9': { value: scaleToken('2.25rem') },
16
- '10': { value: scaleToken('2.5rem') },
4
+ '2xs': { value: scaleToken('0.845rem') }, // 1.25
5
+ xs: { value: scaleToken('1rem') }, //1.33
6
+ sm: { value: scaleToken('1.1375rem') }, // 1.4
7
+ md: { value: scaleToken('1.26rem') }, // 1.44
8
+ lg: { value: scaleToken('1.5rem') }, // 1.5
9
+ xl: { value: scaleToken('1.62rem') }, // 1.44
10
+ '2xl': { value: scaleToken('1.75rem') }, // 1.4
11
+ '3xl': { value: scaleToken('1.95rem') }, // 1.3
12
+ '4xl': { value: scaleToken('2.345rem') }, // 1.25
13
+ '5xl': { value: scaleToken('2.7rem') }, // 1.2
14
+ '6xl': { value: scaleToken('3.45rem') }, // 1.15
15
+ '7xl': { value: scaleToken('4.125rem') }, // 1.1
16
+ '8xl': { value: scaleToken('4.5rem') }, // 1
17
+ '9xl': { value: scaleToken('6rem') }, // 1
18
+ 'heading.xs': { value: scaleToken('0.95rem') }, // 1.33
19
+ 'heading.sm': { value: scaleToken('1rem') }, // 1.28
20
+ 'heading.md': { value: scaleToken('1.20rem') }, // 1.375
21
+ 'heading.lg': { value: scaleToken('1.33rem') }, // 1.33
22
+ 'heading.xl': { value: scaleToken('1.46rem') }, // 1.3
23
+ 'heading.2xl': { value: scaleToken('1.55rem') }, // 1.25
24
+ 'heading.3xl': { value: scaleToken('1.8rem') }, // 1.2
25
+ 'heading.4xl': { value: scaleToken('2.15rem') }, // 1.15
26
+ 'heading.5xl': { value: scaleToken('2.475rem') }, // 1.1
27
+ 'heading.6xl': { value: scaleToken('3rem') }, // 1
28
+ 'heading.7xl': { value: scaleToken('3.75rem') }, // 1
17
29
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saas-ui/react",
3
- "version": "3.0.0-next.37",
3
+ "version": "3.0.0-next.39",
4
4
  "description": "Saas UI - The React component library for startups.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -62,7 +62,7 @@
62
62
  "dependencies": {
63
63
  "@ark-ui/react": "^5.9.1",
64
64
  "next-themes": "^0.4.6",
65
- "@saas-ui/core": "3.0.0-next.10",
65
+ "@saas-ui/core": "3.0.0-next.11",
66
66
  "@saas-ui/hooks": "3.0.0-next.3"
67
67
  },
68
68
  "peerDependencies": {
@@ -1,77 +0,0 @@
1
- import React from 'react';
2
- import { HTMLChakraProps, type ImageProps, type SlotRecipeProps } from '@chakra-ui/react';
3
- import { type AvatarProps } from '../avatar/avatar.tsx';
4
- import type { PersonaVariantProps } from './persona.recipe.ts';
5
- import type { PersonaPresence } from './presence.ts';
6
- interface PersonaRootProps extends HTMLChakraProps<'div'>, SlotRecipeProps<'suiPersona'>, PersonaVariantProps {
7
- /**
8
- * Indicates that a person is out of office. Changes the presence badge style.
9
- */
10
- outOfOffice?: boolean;
11
- /**
12
- * The presence status of the person
13
- */
14
- presence?: PersonaPresence;
15
- }
16
- /**
17
- * The root component that provides context and styles.
18
- *
19
- * @see Docs https://saas-ui.dev/docs/components/data-display/persona
20
- */
21
- declare const PersonaRoot: React.ForwardRefExoticComponent<PersonaRootProps & React.RefAttributes<HTMLDivElement>>;
22
- interface PersonaAvatarOptions {
23
- /**
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
28
- */
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/data-display/persona
43
- */
44
- declare const PersonaAvatar: React.ForwardRefExoticComponent<PersonaAvatarProps & React.RefAttributes<HTMLDivElement>>;
45
- interface PersonaPresenceBadgeProps extends HTMLChakraProps<'span'> {
46
- }
47
- declare const PersonaPresenceBadge: React.ForwardRefExoticComponent<PersonaPresenceBadgeProps & React.RefAttributes<HTMLSpanElement>>;
48
- interface PersonaDetailsProps extends HTMLChakraProps<'div'> {
49
- }
50
- /**
51
- * Wrapper component for the labels.
52
- *
53
- * @see Docs https://saas-ui.dev/docs/components/data-display/persona
54
- */
55
- declare const PersonaDetails: React.ForwardRefExoticComponent<PersonaDetailsProps & React.RefAttributes<HTMLDivElement>>;
56
- interface PersonaLabelProps extends HTMLChakraProps<'span'> {
57
- }
58
- /**
59
- * The main label, usually a name.
60
- *
61
- * @see Docs https://saas-ui.dev/docs/components/data-display/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/data-display/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/data-display/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,58 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { forwardRef } from 'react';
3
- import { chakra, } from '@chakra-ui/react';
4
- import { dataAttr } from '@saas-ui/core/utils';
5
- import { Avatar } from "../avatar/avatar.js";
6
- import { withContext, withProvider } from "./persona.context.js";
7
- /**
8
- * The root component that provides context and styles.
9
- *
10
- * @see Docs https://saas-ui.dev/docs/components/data-display/persona
11
- */
12
- const PersonaRoot = withProvider(forwardRef((props, ref) => {
13
- const { outOfOffice, presence, ...rest } = props;
14
- return (_jsx(chakra.div, { ref: ref, ...rest, "data-out-of-office": dataAttr(outOfOffice), "data-presence": presence, css: [
15
- presence
16
- ? {
17
- '--persona-presence': `colors.presence.${presence}`,
18
- }
19
- : undefined,
20
- rest.css,
21
- ] }));
22
- }), 'root');
23
- /**
24
- * An avatar with optional status badge.
25
- *
26
- * @see Docs https://saas-ui.dev/docs/components/data-display/persona
27
- */
28
- const PersonaAvatar = forwardRef((props, ref) => {
29
- const { children, ...rest } = props;
30
- return (_jsx(Avatar, { ref: ref, ...rest, children: children }));
31
- });
32
- const PersonaPresenceBadge = withContext('span', 'presence');
33
- /**
34
- * Wrapper component for the labels.
35
- *
36
- * @see Docs https://saas-ui.dev/docs/components/data-display/persona
37
- */
38
- const PersonaDetails = withContext('div', 'details');
39
- /**
40
- * The main label, usually a name.
41
- *
42
- * @see Docs https://saas-ui.dev/docs/components/data-display/persona
43
- */
44
- const PersonaLabel = withContext('span', 'label');
45
- PersonaLabel.displayName = 'PersonaLabel';
46
- /**
47
- * The secondary label, usually the role of a person.
48
- *
49
- * @see Docs https://saas-ui.dev/docs/components/data-display/persona
50
- */
51
- const PersonaSecondaryLabel = withContext('span', 'secondaryLabel');
52
- /**
53
- * The tertiary label, typically a status message.
54
- *
55
- * @see Docs https://saas-ui.dev/docs/components/data-display/persona
56
- */
57
- const PersonaTertiaryLabel = withContext('span', 'tertiaryLabel');
58
- export { PersonaRoot as Root, PersonaAvatar as Avatar, PersonaPresenceBadge as PresenceBadge, PersonaDetails as Details, PersonaLabel as Label, PersonaSecondaryLabel as SecondaryLabel, PersonaTertiaryLabel as TertiaryLabel, };