@crystallize/design-system 1.17.5 → 1.17.6

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @crystallize/design-system
2
2
 
3
+ ## 1.17.6
4
+
5
+ ### Patch Changes
6
+
7
+ - 30a9c6c: Extend the dropdown menu component to take a `modal` as a prop and pass it to the root element.
8
+
3
9
  ## 1.17.5
4
10
 
5
11
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -34,15 +34,14 @@ type DropdownMenuLabelProps = {
34
34
  declare function DropdownMenuLabel({ children }: DropdownMenuLabelProps): JSX.Element;
35
35
 
36
36
  type Container = HTMLElement | null | undefined;
37
- type DropdownMenuRootProps = DropdownMenuPrimitive.MenuContentProps & {
37
+ type DropdownMenuRootProps = DropdownMenuPrimitive.MenuContentProps & Pick<DropdownMenuPrimitive.DropdownMenuProps, 'onOpenChange' | 'modal'> & {
38
38
  children: ReactNode;
39
39
  content: ReactNode;
40
40
  alignContent?: 'start' | 'center' | 'end';
41
41
  disabled?: boolean;
42
- onOpenChange?: (open: boolean) => void;
43
42
  container?: Container;
44
43
  };
45
- declare function DropdownMenuRoot({ children, content, alignContent, disabled, onOpenChange, container, ...delegated }: DropdownMenuRootProps): JSX.Element;
44
+ declare function DropdownMenuRoot({ children, content, alignContent, disabled, onOpenChange, container, modal, ...delegated }: DropdownMenuRootProps): JSX.Element;
46
45
 
47
46
  declare const DropdownMenu: {
48
47
  Root: typeof DropdownMenuRoot;
package/dist/index.js CHANGED
@@ -29124,6 +29124,7 @@ function DropdownMenuRoot({
29124
29124
  disabled,
29125
29125
  onOpenChange,
29126
29126
  container,
29127
+ modal,
29127
29128
  ...delegated
29128
29129
  }) {
29129
29130
  const contentProps = {
@@ -29135,6 +29136,7 @@ function DropdownMenuRoot({
29135
29136
  };
29136
29137
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(DropdownMenuPrimitive3.Root, {
29137
29138
  onOpenChange,
29139
+ modal,
29138
29140
  children: [
29139
29141
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DropdownMenuPrimitive3.Trigger, {
29140
29142
  disabled,
package/dist/index.mjs CHANGED
@@ -236,6 +236,7 @@ function DropdownMenuRoot({
236
236
  disabled,
237
237
  onOpenChange,
238
238
  container,
239
+ modal,
239
240
  ...delegated
240
241
  }) {
241
242
  const contentProps = {
@@ -247,6 +248,7 @@ function DropdownMenuRoot({
247
248
  };
248
249
  return /* @__PURE__ */ jsxs3(DropdownMenuPrimitive3.Root, {
249
250
  onOpenChange,
251
+ modal,
250
252
  children: [
251
253
  /* @__PURE__ */ jsx6(DropdownMenuPrimitive3.Trigger, {
252
254
  disabled,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crystallize/design-system",
3
- "version": "1.17.5",
3
+ "version": "1.17.6",
4
4
  "types": "./dist/index.d.ts",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -3,14 +3,14 @@ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
3
3
 
4
4
  export type Container = HTMLElement | null | undefined;
5
5
 
6
- export type DropdownMenuRootProps = DropdownMenuPrimitive.MenuContentProps & {
7
- children: ReactNode;
8
- content: ReactNode;
9
- alignContent?: 'start' | 'center' | 'end';
10
- disabled?: boolean;
11
- onOpenChange?: (open: boolean) => void;
12
- container?: Container;
13
- };
6
+ export type DropdownMenuRootProps = DropdownMenuPrimitive.MenuContentProps &
7
+ Pick<DropdownMenuPrimitive.DropdownMenuProps, 'onOpenChange' | 'modal'> & {
8
+ children: ReactNode;
9
+ content: ReactNode;
10
+ alignContent?: 'start' | 'center' | 'end';
11
+ disabled?: boolean;
12
+ container?: Container;
13
+ };
14
14
 
15
15
  export function DropdownMenuRoot({
16
16
  children,
@@ -19,6 +19,7 @@ export function DropdownMenuRoot({
19
19
  disabled,
20
20
  onOpenChange,
21
21
  container,
22
+ modal,
22
23
  ...delegated
23
24
  }: DropdownMenuRootProps) {
24
25
  const contentProps = {
@@ -30,7 +31,7 @@ export function DropdownMenuRoot({
30
31
  };
31
32
 
32
33
  return (
33
- <DropdownMenuPrimitive.Root onOpenChange={onOpenChange}>
34
+ <DropdownMenuPrimitive.Root onOpenChange={onOpenChange} modal={modal}>
34
35
  <DropdownMenuPrimitive.Trigger disabled={disabled} asChild>
35
36
  {children}
36
37
  </DropdownMenuPrimitive.Trigger>