@crystallize/design-system 0.0.1 → 0.0.2

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
+ ## 0.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 742b7b00: Add collapse all chunks button and remove unused prop from ActionMenu
8
+
3
9
  ## 0.0.1
4
10
 
5
11
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -12,10 +12,9 @@ declare function Item({ children, className, onSelect }: ItemProps): JSX.Element
12
12
 
13
13
  declare type ActionMenuProps = {
14
14
  children: ReactNode;
15
- className?: string;
16
15
  tabIndex?: number;
17
16
  };
18
- declare function ActionMenu({ children, className, tabIndex }: ActionMenuProps): JSX.Element;
17
+ declare function ActionMenu({ children, tabIndex }: ActionMenuProps): JSX.Element;
19
18
  declare namespace ActionMenu {
20
19
  var Item: typeof Item;
21
20
  }
@@ -102,7 +101,7 @@ declare type DropdownMenuRootProps = {
102
101
  children: ReactNode;
103
102
  content: ReactNode;
104
103
  alignContent?: 'start' | 'center' | 'end';
105
- onOpenChange: (isOpen: boolean) => void;
104
+ onOpenChange?: (isOpen: boolean) => void;
106
105
  };
107
106
  declare function DropdownMenuRoot({ children, content, onOpenChange, alignContent }: DropdownMenuRootProps): JSX.Element;
108
107
 
package/dist/index.js CHANGED
@@ -650,17 +650,17 @@ function Item2({ children, className, onSelect }) {
650
650
 
651
651
  // src/action-menu/action-menu.tsx
652
652
  var import_jsx_runtime14 = require("react/jsx-runtime");
653
- function ActionMenu({ children, className, tabIndex }) {
653
+ function ActionMenu({ children, tabIndex }) {
654
654
  return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DropdownMenu.Root, {
655
655
  content: children,
656
+ alignContent: "center",
656
657
  children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("button", {
657
658
  tabIndex,
658
659
  type: "button",
659
660
  className: (0, import_clsx4.default)(
660
661
  "items-center bg-transparent rounded-full border-none cursor-pointer flex justify-center p-1",
661
662
  "hover:bg-gray-6 focus:bg-gray-6 focus:outline-offset-2 focus:outline focus:outline-1 focus:outline-glacier focus-visible:outline-offset-2 focus-visible:outline focus-visible:outline-1 focus-visible:outline-glacier",
662
- "active:scale-95",
663
- className
663
+ "active:scale-95"
664
664
  ),
665
665
  "aria-label": "more options",
666
666
  children: [
package/dist/index.mjs CHANGED
@@ -609,17 +609,17 @@ function Item2({ children, className, onSelect }) {
609
609
 
610
610
  // src/action-menu/action-menu.tsx
611
611
  import { jsx as jsx14, jsxs as jsxs9 } from "react/jsx-runtime";
612
- function ActionMenu({ children, className, tabIndex }) {
612
+ function ActionMenu({ children, tabIndex }) {
613
613
  return /* @__PURE__ */ jsx14(DropdownMenu.Root, {
614
614
  content: children,
615
+ alignContent: "center",
615
616
  children: /* @__PURE__ */ jsxs9("button", {
616
617
  tabIndex,
617
618
  type: "button",
618
619
  className: clsx4(
619
620
  "items-center bg-transparent rounded-full border-none cursor-pointer flex justify-center p-1",
620
621
  "hover:bg-gray-6 focus:bg-gray-6 focus:outline-offset-2 focus:outline focus:outline-1 focus:outline-glacier focus-visible:outline-offset-2 focus-visible:outline focus-visible:outline-1 focus-visible:outline-glacier",
621
- "active:scale-95",
622
- className
622
+ "active:scale-95"
623
623
  ),
624
624
  "aria-label": "more options",
625
625
  children: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crystallize/design-system",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "types": "./dist/index.d.ts",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -8,14 +8,12 @@ import { Item } from './action-item';
8
8
 
9
9
  type ActionMenuProps = {
10
10
  children: ReactNode;
11
- className?: string;
12
11
  tabIndex?: number;
13
12
  };
14
13
 
15
- export function ActionMenu({ children, className, tabIndex }: ActionMenuProps) {
14
+ export function ActionMenu({ children, tabIndex }: ActionMenuProps) {
16
15
  return (
17
- // @ts-expect-error
18
- <DropdownMenu.Root content={children}>
16
+ <DropdownMenu.Root content={children} alignContent="center">
19
17
  <button
20
18
  tabIndex={tabIndex}
21
19
  type="button"
@@ -23,7 +21,6 @@ export function ActionMenu({ children, className, tabIndex }: ActionMenuProps) {
23
21
  'items-center bg-transparent rounded-full border-none cursor-pointer flex justify-center p-1',
24
22
  'hover:bg-gray-6 focus:bg-gray-6 focus:outline-offset-2 focus:outline focus:outline-1 focus:outline-glacier focus-visible:outline-offset-2 focus-visible:outline focus-visible:outline-1 focus-visible:outline-glacier',
25
23
  'active:scale-95',
26
- className,
27
24
  )}
28
25
  aria-label="more options"
29
26
  >
@@ -5,7 +5,7 @@ type DropdownMenuRootProps = {
5
5
  children: ReactNode;
6
6
  content: ReactNode;
7
7
  alignContent?: 'start' | 'center' | 'end';
8
- onOpenChange: (isOpen: boolean) => void;
8
+ onOpenChange?: (isOpen: boolean) => void;
9
9
  };
10
10
 
11
11
  export function DropdownMenuRoot({ children, content, onOpenChange, alignContent = 'start' }: DropdownMenuRootProps) {