@saas-ui/react 3.0.0-next.27 → 3.0.0-next.29

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 (52) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/.tsbuildinfo.json +1 -1
  3. package/dist/components/action-bar/action-bar.recipe.js +1 -1
  4. package/dist/components/app-shell/app-shell.d.ts +5 -7
  5. package/dist/components/app-shell/app-shell.recipe.d.ts +3 -8
  6. package/dist/components/app-shell/app-shell.recipe.js +4 -8
  7. package/dist/components/breadcrumb/breadcrumb.recipe.js +1 -1
  8. package/dist/components/button/button.recipe.d.ts +4 -1
  9. package/dist/components/button/button.recipe.js +4 -1
  10. package/dist/components/card/card.recipe.d.ts +1 -1
  11. package/dist/components/checkbox/checkbox.recipe.d.ts +1 -1
  12. package/dist/components/checkbox-card/checkbox-card.recipe.d.ts +1 -1
  13. package/dist/components/checkbox-card/checkbox-card.recipe.js +3 -2
  14. package/dist/components/code/code.recipe.js +1 -1
  15. package/dist/components/collapsible/collapsible.recipe.d.ts +1 -1
  16. package/dist/components/dialog/dialog.recipe.d.ts +1 -1
  17. package/dist/components/drawer/drawer.recipe.js +5 -0
  18. package/dist/components/editable/editable.recipe.js +1 -1
  19. package/dist/components/kbd/kbd.recipe.js +1 -1
  20. package/dist/components/link/link.recipe.js +1 -1
  21. package/dist/components/menu/menu.js +2 -1
  22. package/dist/components/menu/menu.recipe.d.ts +2 -0
  23. package/dist/components/menu/menu.recipe.js +2 -0
  24. package/dist/components/native-select/native-select.recipe.js +1 -1
  25. package/dist/components/navbar/navbar.d.ts +3 -3
  26. package/dist/components/navbar/navbar.recipe.d.ts +1 -1
  27. package/dist/components/page/page.d.ts +3 -3
  28. package/dist/components/progress/progress.recipe.d.ts +2 -2
  29. package/dist/components/progress/progress.recipe.js +3 -2
  30. package/dist/components/radio-card/radio-card.recipe.js +1 -1
  31. package/dist/components/section/section.d.ts +2 -2
  32. package/dist/components/select/select.recipe.js +5 -4
  33. package/dist/components/sidebar/sidebar.d.ts +13 -13
  34. package/dist/components/sidebar/sidebar.js +2 -2
  35. package/dist/components/sidebar/sidebar.recipe.js +1 -1
  36. package/dist/components/skeleton/skeleton.recipe.d.ts +1 -1
  37. package/dist/components/skeleton/skeleton.recipe.js +1 -1
  38. package/dist/components/skip-nav-link/skip-nav-link.recipe.js +1 -1
  39. package/dist/components/stat/stat.recipe.js +1 -1
  40. package/dist/components/steps/steps.recipe.js +1 -1
  41. package/dist/components/tabs/tabs.recipe.d.ts +2 -1
  42. package/dist/components/tabs/tabs.recipe.js +1 -0
  43. package/dist/components/tag/tag.recipe.d.ts +1 -1
  44. package/dist/components/tooltip/tooltip.recipe.js +1 -1
  45. package/dist/theme/conditions.d.ts +1 -0
  46. package/dist/theme/conditions.js +1 -0
  47. package/dist/theme/global-css.js +5 -2
  48. package/dist/theme/recipes.d.ts +5 -2
  49. package/dist/theme/semantic-tokens/colors.js +1 -1
  50. package/dist/theme/semantic-tokens/shadows.js +1 -1
  51. package/dist/theme/slot-recipes.d.ts +47 -49
  52. package/package.json +2 -2
@@ -48,7 +48,7 @@ export const actionBarSlotRecipe = defineSlotRecipe({
48
48
  textStyle: 'sm',
49
49
  px: '4',
50
50
  py: '1',
51
- borderRadius: 'l2',
51
+ borderRadius: 'control.md',
52
52
  borderWidth: '1px',
53
53
  borderStyle: 'dashed',
54
54
  },
@@ -1,7 +1,7 @@
1
1
  import { type HTMLChakraProps, type SlotRecipeProps } from '@chakra-ui/react/styled-system';
2
2
  declare const useAppShellStyles: () => Record<string, import("@chakra-ui/react").SystemStyleObject>;
3
3
  export { useAppShellStyles };
4
- export interface AppShellProps extends HTMLChakraProps<'div'> {
4
+ export interface AppShellBaseProps {
5
5
  /**
6
6
  * The top header navigation
7
7
  */
@@ -18,12 +18,8 @@ export interface AppShellProps extends HTMLChakraProps<'div'> {
18
18
  * The footer
19
19
  */
20
20
  footer?: React.ReactNode;
21
- /**
22
- * The main content
23
- */
24
- children: React.ReactNode;
25
21
  }
26
- export interface AppShellRootProps extends Omit<AppShellProps, 'position'>, SlotRecipeProps<'suiAppShell'> {
22
+ export interface AppShellRootProps extends HTMLChakraProps<'div'>, SlotRecipeProps<'suiAppShell'> {
27
23
  }
28
24
  /**
29
25
  * The App Shell defines the main structure of your app.
@@ -37,4 +33,6 @@ export declare const AppShellContent: import("react").ForwardRefExoticComponent<
37
33
  export interface AppShellMainProps extends HTMLChakraProps<'div'> {
38
34
  }
39
35
  export declare const AppShellMain: import("react").ForwardRefExoticComponent<AppShellMainProps & import("react").RefAttributes<HTMLDivElement>>;
40
- export declare const AppShell: import("react").ForwardRefExoticComponent<AppShellRootProps & import("react").RefAttributes<HTMLDivElement>>;
36
+ export interface AppShellProps extends AppShellBaseProps, HTMLChakraProps<'div'> {
37
+ }
38
+ export declare const AppShell: import("react").ForwardRefExoticComponent<AppShellProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,11 +1,6 @@
1
- export declare const appShellSlotRecipe: import("@chakra-ui/react").SlotRecipeDefinition<"content" | "root" | "main", {
2
- position: {
3
- static: {
4
- root: {
5
- height: "100dvh";
6
- };
7
- };
8
- fullscreen: {
1
+ export declare const appShellSlotRecipe: import("@chakra-ui/react").SlotRecipeDefinition<"root" | "content" | "main", {
2
+ fullscreen: {
3
+ true: {
9
4
  root: {
10
5
  position: "fixed";
11
6
  inset: number;
@@ -6,6 +6,7 @@ export const appShellSlotRecipe = defineSlotRecipe({
6
6
  root: {
7
7
  display: 'flex',
8
8
  flexDirection: 'column',
9
+ height: '100dvh',
9
10
  },
10
11
  content: {
11
12
  display: 'flex',
@@ -21,13 +22,8 @@ export const appShellSlotRecipe = defineSlotRecipe({
21
22
  },
22
23
  },
23
24
  variants: {
24
- position: {
25
- static: {
26
- root: {
27
- height: '100dvh',
28
- },
29
- },
30
- fullscreen: {
25
+ fullscreen: {
26
+ true: {
31
27
  root: {
32
28
  position: 'fixed',
33
29
  inset: 0,
@@ -39,7 +35,7 @@ export const appShellSlotRecipe = defineSlotRecipe({
39
35
  },
40
36
  },
41
37
  defaultVariants: {
42
- position: 'static',
38
+ fullscreen: false,
43
39
  variant: 'plain',
44
40
  },
45
41
  });
@@ -13,7 +13,7 @@ export const breadcrumbSlotRecipe = defineSlotRecipe({
13
13
  link: {
14
14
  outline: '0',
15
15
  textDecoration: 'none',
16
- borderRadius: 'l1',
16
+ borderRadius: 'control.sm',
17
17
  focusRing: 'outside',
18
18
  display: 'inline-flex',
19
19
  alignItems: 'center',
@@ -67,7 +67,10 @@ export declare const buttonRecipe: import("@chakra-ui/react").RecipeDefinition<{
67
67
  bg: "colorPalette.solid";
68
68
  color: "colorPalette.contrast";
69
69
  '--btn-shadow': "shadows.sm";
70
- boxShadow: "0 0 0 1px rgba(0,0,0,0.25) inset, 0px 2px 0px 0px rgba(255,255,255,0.2) inset, var(--btn-shadow)";
70
+ boxShadow: {
71
+ base: "0 0 0 1px rgba(0,0,0,0.25) inset, 0px 2px 0px 0px rgba(255,255,255,0.2) inset, var(--btn-shadow)";
72
+ _dark: " 0px 1px 0px 0px rgba(255,255,255,0.2) inset, var(--btn-shadow)";
73
+ };
71
74
  textShadow: "0 1px 2px rgba(0,0,0,0.3)";
72
75
  overflow: "clip";
73
76
  _after: {
@@ -97,7 +97,10 @@ export const buttonRecipe = defineRecipe({
97
97
  bg: 'colorPalette.solid',
98
98
  color: 'colorPalette.contrast',
99
99
  '--btn-shadow': 'shadows.sm',
100
- boxShadow: '0 0 0 1px rgba(0,0,0,0.25) inset, 0px 2px 0px 0px rgba(255,255,255,0.2) inset, var(--btn-shadow)',
100
+ boxShadow: {
101
+ base: '0 0 0 1px rgba(0,0,0,0.25) inset, 0px 2px 0px 0px rgba(255,255,255,0.2) inset, var(--btn-shadow)',
102
+ _dark: ' 0px 1px 0px 0px rgba(255,255,255,0.2) inset, var(--btn-shadow)',
103
+ },
101
104
  textShadow: '0 1px 2px rgba(0,0,0,0.3)',
102
105
  overflow: 'clip',
103
106
  _after: {
@@ -1,4 +1,4 @@
1
- export declare const cardSlotRecipe: import("@chakra-ui/react").SlotRecipeDefinition<"description" | "root" | "title" | "header" | "body" | "footer", {
1
+ export declare const cardSlotRecipe: import("@chakra-ui/react").SlotRecipeDefinition<"description" | "body" | "root" | "title" | "header" | "footer", {
2
2
  size: {
3
3
  sm: {
4
4
  root: {
@@ -1,4 +1,4 @@
1
- export declare const checkboxSlotRecipe: import("@chakra-ui/react").SlotRecipeDefinition<"label" | "root" | "group" | "indicator" | "control", {
1
+ export declare const checkboxSlotRecipe: import("@chakra-ui/react").SlotRecipeDefinition<"label" | "control" | "indicator" | "root" | "group", {
2
2
  size: {
3
3
  xs: {
4
4
  root: {
@@ -1,4 +1,4 @@
1
- export declare const checkboxCardSlotRecipe: import("@chakra-ui/react").SlotRecipeDefinition<"content" | "description" | "label" | "root" | "indicator" | "control" | "addon", {
1
+ export declare const checkboxCardSlotRecipe: import("@chakra-ui/react").SlotRecipeDefinition<"description" | "content" | "label" | "control" | "indicator" | "root" | "addon", {
2
2
  size: {
3
3
  sm: {
4
4
  root: {
@@ -6,11 +6,12 @@ export const checkboxCardSlotRecipe = defineSlotRecipe({
6
6
  className: 'chakra-checkbox-card',
7
7
  base: {
8
8
  root: {
9
+ colorPalette: 'accent',
9
10
  display: 'flex',
10
11
  flexDirection: 'column',
11
12
  userSelect: 'none',
12
13
  position: 'relative',
13
- borderRadius: 'l2',
14
+ borderRadius: 'panel.md',
14
15
  flex: '1',
15
16
  focusVisibleRing: 'outside',
16
17
  _disabled: {
@@ -26,7 +27,7 @@ export const checkboxCardSlotRecipe = defineSlotRecipe({
26
27
  display: 'inline-flex',
27
28
  flex: '1',
28
29
  position: 'relative',
29
- borderRadius: 'inherit',
30
+ borderRadius: 'panel.md',
30
31
  justifyContent: 'var(--checkbox-card-justify)',
31
32
  alignItems: 'var(--checkbox-card-align)',
32
33
  },
@@ -7,7 +7,7 @@ export const codeRecipe = defineRecipe({
7
7
  fontFamily: 'mono',
8
8
  alignItems: 'center',
9
9
  display: 'inline-flex',
10
- borderRadius: 'l2',
10
+ borderRadius: 'indicator.md',
11
11
  },
12
12
  variants,
13
13
  defaultVariants,
@@ -1 +1 @@
1
- export declare const collapsibleSlotRecipe: import("@chakra-ui/react").SlotRecipeDefinition<"content" | "root" | "trigger", import("@chakra-ui/react").SlotRecipeVariantRecord<"content" | "root" | "trigger">>;
1
+ export declare const collapsibleSlotRecipe: import("@chakra-ui/react").SlotRecipeDefinition<"content" | "indicator" | "root" | "trigger", import("@chakra-ui/react").SlotRecipeVariantRecord<"content" | "indicator" | "root" | "trigger">>;
@@ -1,4 +1,4 @@
1
- export declare const dialogSlotRecipe: import("@chakra-ui/react").SlotRecipeDefinition<"content" | "description" | "backdrop" | "positioner" | "closeTrigger" | "title" | "header" | "body" | "footer" | "trigger", {
1
+ export declare const dialogSlotRecipe: import("@chakra-ui/react").SlotRecipeDefinition<"description" | "content" | "body" | "backdrop" | "positioner" | "closeTrigger" | "title" | "header" | "footer" | "trigger", {
2
2
  variant: {
3
3
  dialog: {};
4
4
  confirm: {
@@ -84,6 +84,11 @@ export const drawerSlotRecipe = defineSlotRecipe({
84
84
  description: {
85
85
  color: 'fg.muted',
86
86
  },
87
+ closeTrigger: {
88
+ position: 'absolute',
89
+ top: '4',
90
+ right: '4',
91
+ },
87
92
  },
88
93
  variants: {
89
94
  size: {
@@ -5,7 +5,7 @@ const sharedStyles = defineStyle({
5
5
  fontWeight: 'inherit',
6
6
  textAlign: 'inherit',
7
7
  bg: 'transparent',
8
- borderRadius: 'l2',
8
+ borderRadius: 'control.md',
9
9
  });
10
10
  export const editableSlotRecipe = defineSlotRecipe({
11
11
  slots: editableAnatomy.keys(),
@@ -11,7 +11,7 @@ export const kbdRecipe = defineRecipe({
11
11
  wordSpacing: '-0.5em',
12
12
  userSelect: 'none',
13
13
  px: '1',
14
- borderRadius: 'l2',
14
+ borderRadius: 'indicator.md',
15
15
  },
16
16
  variants: {
17
17
  variant: {
@@ -7,7 +7,7 @@ export const linkRecipe = defineRecipe({
7
7
  outline: 'none',
8
8
  gap: '1.5',
9
9
  cursor: 'pointer',
10
- borderRadius: 'l1',
10
+ borderRadius: 'control.sm',
11
11
  focusRing: 'outside',
12
12
  },
13
13
  variants: {
@@ -1,6 +1,7 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { forwardRef } from 'react';
4
+ import { Flex } from '@chakra-ui/react';
4
5
  import { Menu as ChakraMenu } from '@chakra-ui/react/menu';
5
6
  import { Portal } from '@chakra-ui/react/portal';
6
7
  import { Button } from "../button/index.js";
@@ -22,7 +23,7 @@ const MenuRadioItem = forwardRef(function MenuRadioItem(props, ref) {
22
23
  });
23
24
  const MenuItemIndicator = forwardRef(function MenuItemIndicator(props, ref) {
24
25
  const { children = _jsx(CheckIcon, {}), ...rest } = props;
25
- return (_jsx(ChakraMenu.ItemIndicator, { ref: ref, ...rest, children: children }));
26
+ return (_jsx(Flex, { alignItems: "center", justifyContent: "center", w: "4", children: _jsx(ChakraMenu.ItemIndicator, { ref: ref, ...rest, children: children }) }));
26
27
  });
27
28
  const MenuItemGroup = forwardRef(function MenuItemGroup(props, ref) {
28
29
  const { title, children, ...rest } = props;
@@ -27,6 +27,7 @@ export declare const menuSlotRecipe: import("@chakra-ui/react").SlotRecipeDefini
27
27
  textStyle: "xs";
28
28
  py: "1";
29
29
  px: "1.5";
30
+ ps: "var(--menu-item-inset, {sizes.1.5})";
30
31
  };
31
32
  itemGroupLabel: {
32
33
  textStyle: "xs";
@@ -44,6 +45,7 @@ export declare const menuSlotRecipe: import("@chakra-ui/react").SlotRecipeDefini
44
45
  textStyle: "sm";
45
46
  py: "1.5";
46
47
  px: "2";
48
+ ps: "var(--menu-item-inset, {sizes.2})";
47
49
  };
48
50
  itemGroupLabel: {
49
51
  textStyle: "sm";
@@ -97,6 +97,7 @@ export const menuSlotRecipe = defineSlotRecipe({
97
97
  textStyle: 'xs',
98
98
  py: '1',
99
99
  px: '1.5',
100
+ ps: 'var(--menu-item-inset, {sizes.1.5})',
100
101
  },
101
102
  itemGroupLabel: {
102
103
  textStyle: 'xs',
@@ -114,6 +115,7 @@ export const menuSlotRecipe = defineSlotRecipe({
114
115
  textStyle: 'sm',
115
116
  py: '1.5',
116
117
  px: '2',
118
+ ps: 'var(--menu-item-inset, {sizes.2})',
117
119
  },
118
120
  itemGroupLabel: {
119
121
  textStyle: 'sm',
@@ -16,7 +16,7 @@ export const nativeSelectSlotRecipe = defineSlotRecipe({
16
16
  minWidth: '0',
17
17
  outline: '0',
18
18
  appearance: 'none',
19
- borderRadius: 'l2',
19
+ borderRadius: 'control.md',
20
20
  _disabled: {
21
21
  layerStyle: 'disabled',
22
22
  },