@bitrise/bitkit-v2 0.3.544-beta.3446 → 0.3.544-beta.3449

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.
@@ -17,6 +17,11 @@ export interface BitkitDraggableCardProps extends Omit<BoxProps, 'children'> {
17
17
  isDragging?: boolean;
18
18
  /** Whether this card is a drop target placeholder */
19
19
  isDropTarget?: boolean;
20
+ /**
21
+ * `readOnly` renders a plain card: no drag handle, no hover or drag styles. `handleProps`, `handleRef`,
22
+ * `isDragging` and `isDropTarget` are ignored.
23
+ */
24
+ state?: 'readOnly';
20
25
  }
21
26
  /**
22
27
  * A card with a drag handle, designed for use with `@dnd-kit/react` or `@dnd-kit/core`.
@@ -42,6 +47,11 @@ export interface BitkitDraggableCardProps extends Omit<BoxProps, 'children'> {
42
47
  * </BitkitDraggableCard>
43
48
  * ```
44
49
  *
50
+ * @example Read-only (a plain card, e.g. when the list can't be reordered)
51
+ * ```tsx
52
+ * <BitkitDraggableCard state="readOnly">{children}</BitkitDraggableCard>
53
+ * ```
54
+ *
45
55
  * @example Handle-only drag with `@dnd-kit/core` / `@dnd-kit/sortable` (pass handleProps and handleRef)
46
56
  * ```tsx
47
57
  * const { attributes, isDragging, listeners, setActivatorNodeRef, setNodeRef } = useSortable({ id });
@@ -28,6 +28,11 @@ import { Box } from "@chakra-ui/react/box";
28
28
  * </BitkitDraggableCard>
29
29
  * ```
30
30
  *
31
+ * @example Read-only (a plain card, e.g. when the list can't be reordered)
32
+ * ```tsx
33
+ * <BitkitDraggableCard state="readOnly">{children}</BitkitDraggableCard>
34
+ * ```
35
+ *
31
36
  * @example Handle-only drag with `@dnd-kit/core` / `@dnd-kit/sortable` (pass handleProps and handleRef)
32
37
  * ```tsx
33
38
  * const { attributes, isDragging, listeners, setActivatorNodeRef, setNodeRef } = useSortable({ id });
@@ -43,31 +48,36 @@ import { Box } from "@chakra-ui/react/box";
43
48
  * ```
44
49
  */
45
50
  var BitkitDraggableCard = forwardRef((props, ref) => {
46
- const { children, css, handleProps, handleRef, isDragging = false, isDropTarget = false, ...rest } = props;
47
- const isFullCardDrag = !handleRef && !handleProps;
51
+ const { children, css, handleProps, handleRef, isDragging = false, isDropTarget = false, state, ...rest } = props;
52
+ const isReadOnly = state === "readOnly";
53
+ const dragMode = isReadOnly ? "none" : !handleRef && !handleProps ? "card" : "handle";
48
54
  const styles = useSlotRecipe({ key: "draggableCard" })({
49
- isDragging,
50
- isDropTarget,
51
- isFullCardDrag
55
+ dragMode,
56
+ isDragging: !isReadOnly && isDragging,
57
+ isDropTarget: !isReadOnly && isDropTarget
52
58
  });
53
59
  return /* @__PURE__ */ jsxs(Box, {
54
60
  ref,
55
61
  css: [styles.root, css],
56
62
  ...rest,
57
- children: [isFullCardDrag ? /* @__PURE__ */ jsx(chakra.div, {
58
- css: styles.handle,
59
- children: /* @__PURE__ */ jsx(IconDragHandle, { size: "16" })
60
- }) : /* @__PURE__ */ jsx(chakra.button, {
61
- "aria-label": "Drag handle",
62
- ...handleProps,
63
- ref: handleRef,
64
- type: "button",
65
- css: styles.handle,
66
- children: /* @__PURE__ */ jsx(IconDragHandle, { size: "16" })
67
- }), /* @__PURE__ */ jsx(Box, {
68
- css: styles.content,
69
- children
70
- })]
63
+ children: [
64
+ dragMode === "card" && /* @__PURE__ */ jsx(chakra.div, {
65
+ css: styles.handle,
66
+ children: /* @__PURE__ */ jsx(IconDragHandle, { size: "16" })
67
+ }),
68
+ dragMode === "handle" && /* @__PURE__ */ jsx(chakra.button, {
69
+ "aria-label": "Drag handle",
70
+ ...handleProps,
71
+ ref: handleRef,
72
+ type: "button",
73
+ css: styles.handle,
74
+ children: /* @__PURE__ */ jsx(IconDragHandle, { size: "16" })
75
+ }),
76
+ /* @__PURE__ */ jsx(Box, {
77
+ css: styles.content,
78
+ children
79
+ })
80
+ ]
71
81
  });
72
82
  });
73
83
  BitkitDraggableCard.displayName = "BitkitDraggableCard";
@@ -1 +1 @@
1
- {"version":3,"file":"BitkitDraggableCard.js","names":[],"sources":["../../../lib/components/BitkitDraggableCard/BitkitDraggableCard.tsx"],"sourcesContent":["import { Box, type BoxProps } from '@chakra-ui/react/box';\nimport { chakra, useSlotRecipe } from '@chakra-ui/react/styled-system';\nimport { type ComponentPropsWithoutRef, forwardRef, type ReactNode, type Ref } from 'react';\n\nimport IconDragHandle from '../../icons/IconDragHandle';\n\n// ----- Props -----\n\nexport interface BitkitDraggableCardProps extends Omit<BoxProps, 'children'> {\n children: ReactNode;\n /**\n * Props spread onto the drag handle `<button>` — pass `{ ...attributes, ...listeners }` from `@dnd-kit/core`'s\n * `useSortable()` / `useDraggable()` here. When provided, only the handle initiates drag. Overrides the default\n * `aria-label=\"Drag handle\"`, so name what is being reordered (e.g. `aria-label=\"Reorder trigger\"`).\n */\n handleProps?: Omit<ComponentPropsWithoutRef<'button'>, 'children' | 'type'>;\n /**\n * Ref for the drag handle `<button>` — pass `handleRef` from `@dnd-kit/react`'s `useSortable()`, or\n * `setActivatorNodeRef` from `@dnd-kit/core`'s. When provided, only the handle initiates drag.\n */\n handleRef?: Ref<HTMLButtonElement>;\n /** Whether this card is currently being dragged */\n isDragging?: boolean;\n /** Whether this card is a drop target placeholder */\n isDropTarget?: boolean;\n}\n\n// ----- Component -----\n\n/**\n * A card with a drag handle, designed for use with `@dnd-kit/react` or `@dnd-kit/core`.\n *\n * The component is purely presentational — it does not depend on `@dnd-kit`.\n * Pass the refs, handle props and state flags from `useSortable` (or `useDraggable`) to wire it up.\n *\n * @example Full-card drag (default — no `handleRef` / `handleProps`, the entire card is draggable)\n * ```tsx\n * const { ref, isDragSource, isDropTarget } = useSortable({ id, index });\n *\n * <BitkitDraggableCard ref={ref} isDragging={isDragSource} isDropTarget={isDropTarget}>\n * {children}\n * </BitkitDraggableCard>\n * ```\n *\n * @example Handle-only drag (pass handleRef to restrict drag to the handle)\n * ```tsx\n * const { ref, handleRef, isDragSource, isDropTarget } = useSortable({ id, index });\n *\n * <BitkitDraggableCard ref={ref} handleRef={handleRef} isDragging={isDragSource} isDropTarget={isDropTarget}>\n * {children}\n * </BitkitDraggableCard>\n * ```\n *\n * @example Handle-only drag with `@dnd-kit/core` / `@dnd-kit/sortable` (pass handleProps and handleRef)\n * ```tsx\n * const { attributes, isDragging, listeners, setActivatorNodeRef, setNodeRef } = useSortable({ id });\n *\n * <BitkitDraggableCard\n * ref={setNodeRef}\n * handleProps={{ ...attributes, ...listeners, 'aria-label': 'Reorder trigger' }}\n * handleRef={setActivatorNodeRef}\n * isDragging={isDragging}\n * >\n * {children}\n * </BitkitDraggableCard>\n * ```\n */\nconst BitkitDraggableCard = forwardRef<HTMLDivElement, BitkitDraggableCardProps>((props, ref) => {\n const { children, css, handleProps, handleRef, isDragging = false, isDropTarget = false, ...rest } = props;\n\n const isFullCardDrag = !handleRef && !handleProps;\n const recipe = useSlotRecipe({ key: 'draggableCard' });\n const styles = recipe({ isDragging, isDropTarget, isFullCardDrag });\n\n return (\n <Box ref={ref} css={[styles.root, css]} {...rest}>\n {isFullCardDrag ? (\n <chakra.div css={styles.handle}>\n <IconDragHandle size=\"16\" />\n </chakra.div>\n ) : (\n <chakra.button aria-label=\"Drag handle\" {...handleProps} ref={handleRef} type=\"button\" css={styles.handle}>\n <IconDragHandle size=\"16\" />\n </chakra.button>\n )}\n <Box css={styles.content}>{children}</Box>\n </Box>\n );\n});\n\nBitkitDraggableCard.displayName = 'BitkitDraggableCard';\n\nexport default BitkitDraggableCard;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmEA,IAAM,sBAAsB,YAAsD,OAAO,QAAQ;CAC/F,MAAM,EAAE,UAAU,KAAK,aAAa,WAAW,aAAa,OAAO,eAAe,OAAO,GAAG,SAAS;CAErG,MAAM,iBAAiB,CAAC,aAAa,CAAC;CAEtC,MAAM,SADS,cAAc,EAAE,KAAK,gBAAgB,CACrC,CAAA,CAAO;EAAE;EAAY;EAAc;CAAe,CAAC;CAElE,OACE,qBAAC,KAAD;EAAU;EAAK,KAAK,CAAC,OAAO,MAAM,GAAG;EAAG,GAAI;EAA5C,UAAA,CACG,iBACC,oBAAC,OAAO,KAAR;GAAY,KAAK,OAAO;GACtB,UAAA,oBAAC,gBAAD,EAAgB,MAAK,KAAM,CAAA;EACjB,CAAA,IAEZ,oBAAC,OAAO,QAAR;GAAe,cAAW;GAAc,GAAI;GAAa,KAAK;GAAW,MAAK;GAAS,KAAK,OAAO;GACjG,UAAA,oBAAC,gBAAD,EAAgB,MAAK,KAAM,CAAA;EACd,CAAA,GAEjB,oBAAC,KAAD;GAAK,KAAK,OAAO;GAAU;EAAc,CAAA,CACtC;;AAET,CAAC;AAED,oBAAoB,cAAc"}
1
+ {"version":3,"file":"BitkitDraggableCard.js","names":[],"sources":["../../../lib/components/BitkitDraggableCard/BitkitDraggableCard.tsx"],"sourcesContent":["import { Box, type BoxProps } from '@chakra-ui/react/box';\nimport { chakra, useSlotRecipe } from '@chakra-ui/react/styled-system';\nimport { type ComponentPropsWithoutRef, forwardRef, type ReactNode, type Ref } from 'react';\n\nimport IconDragHandle from '../../icons/IconDragHandle';\n\n// ----- Props -----\n\nexport interface BitkitDraggableCardProps extends Omit<BoxProps, 'children'> {\n children: ReactNode;\n /**\n * Props spread onto the drag handle `<button>` — pass `{ ...attributes, ...listeners }` from `@dnd-kit/core`'s\n * `useSortable()` / `useDraggable()` here. When provided, only the handle initiates drag. Overrides the default\n * `aria-label=\"Drag handle\"`, so name what is being reordered (e.g. `aria-label=\"Reorder trigger\"`).\n */\n handleProps?: Omit<ComponentPropsWithoutRef<'button'>, 'children' | 'type'>;\n /**\n * Ref for the drag handle `<button>` — pass `handleRef` from `@dnd-kit/react`'s `useSortable()`, or\n * `setActivatorNodeRef` from `@dnd-kit/core`'s. When provided, only the handle initiates drag.\n */\n handleRef?: Ref<HTMLButtonElement>;\n /** Whether this card is currently being dragged */\n isDragging?: boolean;\n /** Whether this card is a drop target placeholder */\n isDropTarget?: boolean;\n /**\n * `readOnly` renders a plain card: no drag handle, no hover or drag styles. `handleProps`, `handleRef`,\n * `isDragging` and `isDropTarget` are ignored.\n */\n state?: 'readOnly';\n}\n\n// ----- Component -----\n\n/**\n * A card with a drag handle, designed for use with `@dnd-kit/react` or `@dnd-kit/core`.\n *\n * The component is purely presentational — it does not depend on `@dnd-kit`.\n * Pass the refs, handle props and state flags from `useSortable` (or `useDraggable`) to wire it up.\n *\n * @example Full-card drag (default — no `handleRef` / `handleProps`, the entire card is draggable)\n * ```tsx\n * const { ref, isDragSource, isDropTarget } = useSortable({ id, index });\n *\n * <BitkitDraggableCard ref={ref} isDragging={isDragSource} isDropTarget={isDropTarget}>\n * {children}\n * </BitkitDraggableCard>\n * ```\n *\n * @example Handle-only drag (pass handleRef to restrict drag to the handle)\n * ```tsx\n * const { ref, handleRef, isDragSource, isDropTarget } = useSortable({ id, index });\n *\n * <BitkitDraggableCard ref={ref} handleRef={handleRef} isDragging={isDragSource} isDropTarget={isDropTarget}>\n * {children}\n * </BitkitDraggableCard>\n * ```\n *\n * @example Read-only (a plain card, e.g. when the list can't be reordered)\n * ```tsx\n * <BitkitDraggableCard state=\"readOnly\">{children}</BitkitDraggableCard>\n * ```\n *\n * @example Handle-only drag with `@dnd-kit/core` / `@dnd-kit/sortable` (pass handleProps and handleRef)\n * ```tsx\n * const { attributes, isDragging, listeners, setActivatorNodeRef, setNodeRef } = useSortable({ id });\n *\n * <BitkitDraggableCard\n * ref={setNodeRef}\n * handleProps={{ ...attributes, ...listeners, 'aria-label': 'Reorder trigger' }}\n * handleRef={setActivatorNodeRef}\n * isDragging={isDragging}\n * >\n * {children}\n * </BitkitDraggableCard>\n * ```\n */\nconst BitkitDraggableCard = forwardRef<HTMLDivElement, BitkitDraggableCardProps>((props, ref) => {\n const { children, css, handleProps, handleRef, isDragging = false, isDropTarget = false, state, ...rest } = props;\n\n const isReadOnly = state === 'readOnly';\n const isFullCardDrag = !handleRef && !handleProps;\n const dragMode = isReadOnly ? 'none' : isFullCardDrag ? 'card' : 'handle';\n const recipe = useSlotRecipe({ key: 'draggableCard' });\n const styles = recipe({\n dragMode,\n isDragging: !isReadOnly && isDragging,\n isDropTarget: !isReadOnly && isDropTarget,\n });\n\n return (\n <Box ref={ref} css={[styles.root, css]} {...rest}>\n {dragMode === 'card' && (\n <chakra.div css={styles.handle}>\n <IconDragHandle size=\"16\" />\n </chakra.div>\n )}\n {dragMode === 'handle' && (\n <chakra.button aria-label=\"Drag handle\" {...handleProps} ref={handleRef} type=\"button\" css={styles.handle}>\n <IconDragHandle size=\"16\" />\n </chakra.button>\n )}\n <Box css={styles.content}>{children}</Box>\n </Box>\n );\n});\n\nBitkitDraggableCard.displayName = 'BitkitDraggableCard';\n\nexport default BitkitDraggableCard;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6EA,IAAM,sBAAsB,YAAsD,OAAO,QAAQ;CAC/F,MAAM,EAAE,UAAU,KAAK,aAAa,WAAW,aAAa,OAAO,eAAe,OAAO,OAAO,GAAG,SAAS;CAE5G,MAAM,aAAa,UAAU;CAE7B,MAAM,WAAW,aAAa,SADP,CAAC,aAAa,CAAC,cACkB,SAAS;CAEjE,MAAM,SADS,cAAc,EAAE,KAAK,gBAAgB,CACrC,CAAA,CAAO;EACpB;EACA,YAAY,CAAC,cAAc;EAC3B,cAAc,CAAC,cAAc;CAC/B,CAAC;CAED,OACE,qBAAC,KAAD;EAAU;EAAK,KAAK,CAAC,OAAO,MAAM,GAAG;EAAG,GAAI;EAA5C,UAAA;GACG,aAAa,UACZ,oBAAC,OAAO,KAAR;IAAY,KAAK,OAAO;IACtB,UAAA,oBAAC,gBAAD,EAAgB,MAAK,KAAM,CAAA;GACjB,CAAA;GAEb,aAAa,YACZ,oBAAC,OAAO,QAAR;IAAe,cAAW;IAAc,GAAI;IAAa,KAAK;IAAW,MAAK;IAAS,KAAK,OAAO;IACjG,UAAA,oBAAC,gBAAD,EAAgB,MAAK,KAAM,CAAA;GACd,CAAA;GAEjB,oBAAC,KAAD;IAAK,KAAK,OAAO;IAAU;GAAc,CAAA;EACtC;;AAET,CAAC;AAED,oBAAoB,cAAc"}
@@ -1,34 +1,6 @@
1
1
  declare const draggableCardSlotRecipe: import('@chakra-ui/react').SlotRecipeDefinition<"content" | "root" | "handle", {
2
- isDragging: {
3
- true: {
4
- root: {
5
- borderColor: "border/strong";
6
- boxShadow: "elevation/lg";
7
- cursor: "grabbing";
8
- };
9
- handle: {
10
- color: "icon/secondary";
11
- };
12
- };
13
- };
14
- isDropTarget: {
15
- true: {
16
- root: {
17
- background: "background/secondary";
18
- borderColor: "border/strong";
19
- borderStyle: "dashed";
20
- boxShadow: "none";
21
- };
22
- handle: {
23
- visibility: "hidden";
24
- };
25
- content: {
26
- visibility: "hidden";
27
- };
28
- };
29
- };
30
- isFullCardDrag: {
31
- true: {
2
+ dragMode: {
3
+ card: {
32
4
  root: {
33
5
  cursor: "grab";
34
6
  _hover: {
@@ -48,7 +20,7 @@ declare const draggableCardSlotRecipe: import('@chakra-ui/react').SlotRecipeDefi
48
20
  paddingInlineStart: number;
49
21
  };
50
22
  };
51
- false: {
23
+ handle: {
52
24
  root: {
53
25
  _hover: {
54
26
  borderColor: "border/regular";
@@ -74,25 +46,44 @@ declare const draggableCardSlotRecipe: import('@chakra-ui/react').SlotRecipeDefi
74
46
  _active: {
75
47
  background: "background/active";
76
48
  };
77
- _disabled: {
78
- color: "icon/disabled";
79
- cursor: "not-allowed";
80
- _hover: {
81
- background: "transparent";
82
- color: "icon/disabled";
83
- _active: {
84
- background: "transparent";
85
- };
86
- };
87
- _active: {
88
- background: "transparent";
89
- };
90
- };
91
49
  };
92
50
  content: {
93
51
  paddingInlineStart: "8";
94
52
  };
95
53
  };
54
+ none: {
55
+ content: {
56
+ paddingInlineStart: "16";
57
+ };
58
+ };
59
+ };
60
+ isDragging: {
61
+ true: {
62
+ root: {
63
+ borderColor: "border/strong";
64
+ boxShadow: "elevation/lg";
65
+ cursor: "grabbing";
66
+ };
67
+ handle: {
68
+ color: "icon/secondary";
69
+ };
70
+ };
71
+ };
72
+ isDropTarget: {
73
+ true: {
74
+ root: {
75
+ background: "background/secondary";
76
+ borderColor: "border/strong";
77
+ borderStyle: "dashed";
78
+ boxShadow: "none";
79
+ };
80
+ handle: {
81
+ visibility: "hidden";
82
+ };
83
+ content: {
84
+ visibility: "hidden";
85
+ };
86
+ };
96
87
  };
97
88
  }>;
98
89
  export default draggableCardSlotRecipe;
@@ -35,26 +35,8 @@ var draggableCardSlotRecipe = defineSlotRecipe({
35
35
  }
36
36
  },
37
37
  variants: {
38
- isDragging: { true: {
39
- root: {
40
- borderColor: "border/strong",
41
- boxShadow: "elevation/lg",
42
- cursor: "grabbing"
43
- },
44
- handle: { color: "icon/secondary" }
45
- } },
46
- isDropTarget: { true: {
47
- root: {
48
- background: "background/secondary",
49
- borderColor: "border/strong",
50
- borderStyle: "dashed",
51
- boxShadow: "none"
52
- },
53
- handle: { visibility: "hidden" },
54
- content: { visibility: "hidden" }
55
- } },
56
- isFullCardDrag: {
57
- true: {
38
+ dragMode: {
39
+ card: {
58
40
  root: {
59
41
  cursor: "grab",
60
42
  _hover: {
@@ -66,7 +48,7 @@ var draggableCardSlotRecipe = defineSlotRecipe({
66
48
  handle: { pointerEvents: "none" },
67
49
  content: { paddingInlineStart: 0 }
68
50
  },
69
- false: {
51
+ handle: {
70
52
  root: { _hover: { borderColor: "border/regular" } },
71
53
  handle: {
72
54
  appearance: "none",
@@ -81,34 +63,43 @@ var draggableCardSlotRecipe = defineSlotRecipe({
81
63
  color: "icon/secondary",
82
64
  _active: { background: "background/active" }
83
65
  },
84
- _active: { background: "background/active" },
85
- _disabled: {
86
- color: "icon/disabled",
87
- cursor: "not-allowed",
88
- _hover: {
89
- background: "transparent",
90
- color: "icon/disabled",
91
- _active: { background: "transparent" }
92
- },
93
- _active: { background: "transparent" }
94
- }
66
+ _active: { background: "background/active" }
95
67
  },
96
68
  content: { paddingInlineStart: "8" }
97
- }
98
- }
69
+ },
70
+ none: { content: { paddingInlineStart: "16" } }
71
+ },
72
+ isDragging: { true: {
73
+ root: {
74
+ borderColor: "border/strong",
75
+ boxShadow: "elevation/lg",
76
+ cursor: "grabbing"
77
+ },
78
+ handle: { color: "icon/secondary" }
79
+ } },
80
+ isDropTarget: { true: {
81
+ root: {
82
+ background: "background/secondary",
83
+ borderColor: "border/strong",
84
+ borderStyle: "dashed",
85
+ boxShadow: "none"
86
+ },
87
+ handle: { visibility: "hidden" },
88
+ content: { visibility: "hidden" }
89
+ } }
99
90
  },
100
91
  compoundVariants: [
101
92
  {
93
+ dragMode: "card",
102
94
  isDragging: true,
103
- isFullCardDrag: true,
104
95
  css: { root: {
105
96
  cursor: "grabbing",
106
97
  _hover: { borderColor: "border/strong" }
107
98
  } }
108
99
  },
109
100
  {
101
+ dragMode: "handle",
110
102
  isDragging: true,
111
- isFullCardDrag: false,
112
103
  css: {
113
104
  root: { _hover: { borderColor: "border/strong" } },
114
105
  handle: {
@@ -119,23 +110,23 @@ var draggableCardSlotRecipe = defineSlotRecipe({
119
110
  }
120
111
  },
121
112
  {
113
+ dragMode: "card",
122
114
  isDropTarget: true,
123
- isFullCardDrag: true,
124
115
  css: { root: {
125
116
  cursor: "default",
126
117
  _hover: { borderColor: "border/strong" }
127
118
  } }
128
119
  },
129
120
  {
121
+ dragMode: "handle",
130
122
  isDropTarget: true,
131
- isFullCardDrag: false,
132
123
  css: { root: { _hover: { borderColor: "border/strong" } } }
133
124
  }
134
125
  ],
135
126
  defaultVariants: {
127
+ dragMode: "card",
136
128
  isDragging: false,
137
- isDropTarget: false,
138
- isFullCardDrag: true
129
+ isDropTarget: false
139
130
  }
140
131
  });
141
132
  export { draggableCardSlotRecipe as default };
@@ -1 +1 @@
1
- {"version":3,"file":"DraggableCard.recipe.js","names":[],"sources":["../../../lib/theme/slot-recipes/DraggableCard.recipe.ts"],"sourcesContent":["import { defineSlotRecipe } from '@chakra-ui/react/styled-system';\n\nconst draggableCardSlotRecipe = defineSlotRecipe({\n className: 'draggable-card',\n slots: ['root', 'handle', 'content'],\n base: {\n root: {\n alignItems: 'stretch',\n backgroundColor: 'background/primary',\n border: '1px solid',\n borderColor: 'border/minimal',\n borderRadius: '8',\n boxShadow: 'elevation/sm',\n display: 'flex',\n overflow: 'hidden',\n },\n handle: {\n alignItems: 'center',\n color: 'icon/tertiary',\n display: 'flex',\n flexShrink: 0,\n justifyContent: 'center',\n width: '24',\n },\n content: {\n flex: 1,\n minWidth: 0,\n overflow: 'hidden',\n paddingBlock: '16',\n paddingInlineEnd: '16',\n },\n },\n variants: {\n isDragging: {\n true: {\n root: {\n borderColor: 'border/strong',\n boxShadow: 'elevation/lg',\n cursor: 'grabbing',\n },\n handle: {\n color: 'icon/secondary',\n },\n },\n },\n isDropTarget: {\n true: {\n root: {\n background: 'background/secondary',\n borderColor: 'border/strong',\n borderStyle: 'dashed',\n boxShadow: 'none',\n },\n handle: {\n visibility: 'hidden',\n },\n content: {\n visibility: 'hidden',\n },\n },\n },\n isFullCardDrag: {\n true: {\n root: {\n cursor: 'grab',\n _hover: {\n borderColor: 'border/regular',\n _active: {\n borderColor: 'border/strong',\n },\n },\n _active: {\n borderColor: 'border/strong',\n },\n },\n handle: {\n pointerEvents: 'none',\n },\n content: {\n paddingInlineStart: 0,\n },\n },\n false: {\n root: {\n _hover: {\n borderColor: 'border/regular',\n },\n },\n handle: {\n appearance: 'none',\n background: 'transparent',\n border: 'none',\n cursor: 'grab',\n focusVisibleRing: 'none',\n touchAction: 'none',\n _focusVisible: {\n boxShadow: 'inset 0 0 0 var(--focus-ring-width) var(--focus-ring-color)',\n },\n _hover: {\n background: 'background/hover',\n color: 'icon/secondary',\n _active: {\n background: 'background/active',\n },\n },\n _active: {\n background: 'background/active',\n },\n _disabled: {\n color: 'icon/disabled',\n cursor: 'not-allowed',\n _hover: {\n background: 'transparent',\n color: 'icon/disabled',\n _active: {\n background: 'transparent',\n },\n },\n _active: {\n background: 'transparent',\n },\n },\n },\n content: {\n paddingInlineStart: '8',\n },\n },\n },\n },\n compoundVariants: [\n {\n isDragging: true,\n isFullCardDrag: true,\n css: {\n root: {\n cursor: 'grabbing',\n _hover: {\n borderColor: 'border/strong',\n },\n },\n },\n },\n {\n isDragging: true,\n isFullCardDrag: false,\n css: {\n root: {\n _hover: {\n borderColor: 'border/strong',\n },\n },\n handle: {\n background: 'background/active',\n cursor: 'grabbing',\n _hover: {\n background: 'background/active',\n },\n },\n },\n },\n {\n isDropTarget: true,\n isFullCardDrag: true,\n css: {\n root: {\n cursor: 'default',\n _hover: {\n borderColor: 'border/strong',\n },\n },\n },\n },\n {\n isDropTarget: true,\n isFullCardDrag: false,\n css: {\n root: {\n _hover: {\n borderColor: 'border/strong',\n },\n },\n },\n },\n ],\n defaultVariants: {\n isDragging: false,\n isDropTarget: false,\n isFullCardDrag: true,\n },\n});\n\nexport default draggableCardSlotRecipe;\n"],"mappings":";;AAEA,IAAM,0BAA0B,iBAAiB;CAC/C,WAAW;CACX,OAAO;EAAC;EAAQ;EAAU;CAAS;CACnC,MAAM;EACJ,MAAM;GACJ,YAAY;GACZ,iBAAiB;GACjB,QAAQ;GACR,aAAa;GACb,cAAc;GACd,WAAW;GACX,SAAS;GACT,UAAU;EACZ;EACA,QAAQ;GACN,YAAY;GACZ,OAAO;GACP,SAAS;GACT,YAAY;GACZ,gBAAgB;GAChB,OAAO;EACT;EACA,SAAS;GACP,MAAM;GACN,UAAU;GACV,UAAU;GACV,cAAc;GACd,kBAAkB;EACpB;CACF;CACA,UAAU;EACR,YAAY,EACV,MAAM;GACJ,MAAM;IACJ,aAAa;IACb,WAAW;IACX,QAAQ;GACV;GACA,QAAQ,EACN,OAAO,iBACT;EACF,EACF;EACA,cAAc,EACZ,MAAM;GACJ,MAAM;IACJ,YAAY;IACZ,aAAa;IACb,aAAa;IACb,WAAW;GACb;GACA,QAAQ,EACN,YAAY,SACd;GACA,SAAS,EACP,YAAY,SACd;EACF,EACF;EACA,gBAAgB;GACd,MAAM;IACJ,MAAM;KACJ,QAAQ;KACR,QAAQ;MACN,aAAa;MACb,SAAS,EACP,aAAa,gBACf;KACF;KACA,SAAS,EACP,aAAa,gBACf;IACF;IACA,QAAQ,EACN,eAAe,OACjB;IACA,SAAS,EACP,oBAAoB,EACtB;GACF;GACA,OAAO;IACL,MAAM,EACJ,QAAQ,EACN,aAAa,iBACf,EACF;IACA,QAAQ;KACN,YAAY;KACZ,YAAY;KACZ,QAAQ;KACR,QAAQ;KACR,kBAAkB;KAClB,aAAa;KACb,eAAe,EACb,WAAW,8DACb;KACA,QAAQ;MACN,YAAY;MACZ,OAAO;MACP,SAAS,EACP,YAAY,oBACd;KACF;KACA,SAAS,EACP,YAAY,oBACd;KACA,WAAW;MACT,OAAO;MACP,QAAQ;MACR,QAAQ;OACN,YAAY;OACZ,OAAO;OACP,SAAS,EACP,YAAY,cACd;MACF;MACA,SAAS,EACP,YAAY,cACd;KACF;IACF;IACA,SAAS,EACP,oBAAoB,IACtB;GACF;EACF;CACF;CACA,kBAAkB;EAChB;GACE,YAAY;GACZ,gBAAgB;GAChB,KAAK,EACH,MAAM;IACJ,QAAQ;IACR,QAAQ,EACN,aAAa,gBACf;GACF,EACF;EACF;EACA;GACE,YAAY;GACZ,gBAAgB;GAChB,KAAK;IACH,MAAM,EACJ,QAAQ,EACN,aAAa,gBACf,EACF;IACA,QAAQ;KACN,YAAY;KACZ,QAAQ;KACR,QAAQ,EACN,YAAY,oBACd;IACF;GACF;EACF;EACA;GACE,cAAc;GACd,gBAAgB;GAChB,KAAK,EACH,MAAM;IACJ,QAAQ;IACR,QAAQ,EACN,aAAa,gBACf;GACF,EACF;EACF;EACA;GACE,cAAc;GACd,gBAAgB;GAChB,KAAK,EACH,MAAM,EACJ,QAAQ,EACN,aAAa,gBACf,EACF,EACF;EACF;CACF;CACA,iBAAiB;EACf,YAAY;EACZ,cAAc;EACd,gBAAgB;CAClB;AACF,CAAC"}
1
+ {"version":3,"file":"DraggableCard.recipe.js","names":[],"sources":["../../../lib/theme/slot-recipes/DraggableCard.recipe.ts"],"sourcesContent":["import { defineSlotRecipe } from '@chakra-ui/react/styled-system';\n\nconst draggableCardSlotRecipe = defineSlotRecipe({\n className: 'draggable-card',\n slots: ['root', 'handle', 'content'],\n base: {\n root: {\n alignItems: 'stretch',\n backgroundColor: 'background/primary',\n border: '1px solid',\n borderColor: 'border/minimal',\n borderRadius: '8',\n boxShadow: 'elevation/sm',\n display: 'flex',\n overflow: 'hidden',\n },\n handle: {\n alignItems: 'center',\n color: 'icon/tertiary',\n display: 'flex',\n flexShrink: 0,\n justifyContent: 'center',\n width: '24',\n },\n content: {\n flex: 1,\n minWidth: 0,\n overflow: 'hidden',\n paddingBlock: '16',\n paddingInlineEnd: '16',\n },\n },\n variants: {\n dragMode: {\n card: {\n root: {\n cursor: 'grab',\n _hover: {\n borderColor: 'border/regular',\n _active: {\n borderColor: 'border/strong',\n },\n },\n _active: {\n borderColor: 'border/strong',\n },\n },\n handle: {\n pointerEvents: 'none',\n },\n content: {\n paddingInlineStart: 0,\n },\n },\n handle: {\n root: {\n _hover: {\n borderColor: 'border/regular',\n },\n },\n handle: {\n appearance: 'none',\n background: 'transparent',\n border: 'none',\n cursor: 'grab',\n focusVisibleRing: 'none',\n touchAction: 'none',\n _focusVisible: {\n boxShadow: 'inset 0 0 0 var(--focus-ring-width) var(--focus-ring-color)',\n },\n _hover: {\n background: 'background/hover',\n color: 'icon/secondary',\n _active: {\n background: 'background/active',\n },\n },\n _active: {\n background: 'background/active',\n },\n },\n content: {\n paddingInlineStart: '8',\n },\n },\n none: {\n content: {\n paddingInlineStart: '16',\n },\n },\n },\n isDragging: {\n true: {\n root: {\n borderColor: 'border/strong',\n boxShadow: 'elevation/lg',\n cursor: 'grabbing',\n },\n handle: {\n color: 'icon/secondary',\n },\n },\n },\n isDropTarget: {\n true: {\n root: {\n background: 'background/secondary',\n borderColor: 'border/strong',\n borderStyle: 'dashed',\n boxShadow: 'none',\n },\n handle: {\n visibility: 'hidden',\n },\n content: {\n visibility: 'hidden',\n },\n },\n },\n },\n compoundVariants: [\n {\n dragMode: 'card',\n isDragging: true,\n css: {\n root: {\n cursor: 'grabbing',\n _hover: {\n borderColor: 'border/strong',\n },\n },\n },\n },\n {\n dragMode: 'handle',\n isDragging: true,\n css: {\n root: {\n _hover: {\n borderColor: 'border/strong',\n },\n },\n handle: {\n background: 'background/active',\n cursor: 'grabbing',\n _hover: {\n background: 'background/active',\n },\n },\n },\n },\n {\n dragMode: 'card',\n isDropTarget: true,\n css: {\n root: {\n cursor: 'default',\n _hover: {\n borderColor: 'border/strong',\n },\n },\n },\n },\n {\n dragMode: 'handle',\n isDropTarget: true,\n css: {\n root: {\n _hover: {\n borderColor: 'border/strong',\n },\n },\n },\n },\n ],\n defaultVariants: {\n dragMode: 'card',\n isDragging: false,\n isDropTarget: false,\n },\n});\n\nexport default draggableCardSlotRecipe;\n"],"mappings":";;AAEA,IAAM,0BAA0B,iBAAiB;CAC/C,WAAW;CACX,OAAO;EAAC;EAAQ;EAAU;CAAS;CACnC,MAAM;EACJ,MAAM;GACJ,YAAY;GACZ,iBAAiB;GACjB,QAAQ;GACR,aAAa;GACb,cAAc;GACd,WAAW;GACX,SAAS;GACT,UAAU;EACZ;EACA,QAAQ;GACN,YAAY;GACZ,OAAO;GACP,SAAS;GACT,YAAY;GACZ,gBAAgB;GAChB,OAAO;EACT;EACA,SAAS;GACP,MAAM;GACN,UAAU;GACV,UAAU;GACV,cAAc;GACd,kBAAkB;EACpB;CACF;CACA,UAAU;EACR,UAAU;GACR,MAAM;IACJ,MAAM;KACJ,QAAQ;KACR,QAAQ;MACN,aAAa;MACb,SAAS,EACP,aAAa,gBACf;KACF;KACA,SAAS,EACP,aAAa,gBACf;IACF;IACA,QAAQ,EACN,eAAe,OACjB;IACA,SAAS,EACP,oBAAoB,EACtB;GACF;GACA,QAAQ;IACN,MAAM,EACJ,QAAQ,EACN,aAAa,iBACf,EACF;IACA,QAAQ;KACN,YAAY;KACZ,YAAY;KACZ,QAAQ;KACR,QAAQ;KACR,kBAAkB;KAClB,aAAa;KACb,eAAe,EACb,WAAW,8DACb;KACA,QAAQ;MACN,YAAY;MACZ,OAAO;MACP,SAAS,EACP,YAAY,oBACd;KACF;KACA,SAAS,EACP,YAAY,oBACd;IACF;IACA,SAAS,EACP,oBAAoB,IACtB;GACF;GACA,MAAM,EACJ,SAAS,EACP,oBAAoB,KACtB,EACF;EACF;EACA,YAAY,EACV,MAAM;GACJ,MAAM;IACJ,aAAa;IACb,WAAW;IACX,QAAQ;GACV;GACA,QAAQ,EACN,OAAO,iBACT;EACF,EACF;EACA,cAAc,EACZ,MAAM;GACJ,MAAM;IACJ,YAAY;IACZ,aAAa;IACb,aAAa;IACb,WAAW;GACb;GACA,QAAQ,EACN,YAAY,SACd;GACA,SAAS,EACP,YAAY,SACd;EACF,EACF;CACF;CACA,kBAAkB;EAChB;GACE,UAAU;GACV,YAAY;GACZ,KAAK,EACH,MAAM;IACJ,QAAQ;IACR,QAAQ,EACN,aAAa,gBACf;GACF,EACF;EACF;EACA;GACE,UAAU;GACV,YAAY;GACZ,KAAK;IACH,MAAM,EACJ,QAAQ,EACN,aAAa,gBACf,EACF;IACA,QAAQ;KACN,YAAY;KACZ,QAAQ;KACR,QAAQ,EACN,YAAY,oBACd;IACF;GACF;EACF;EACA;GACE,UAAU;GACV,cAAc;GACd,KAAK,EACH,MAAM;IACJ,QAAQ;IACR,QAAQ,EACN,aAAa,gBACf;GACF,EACF;EACF;EACA;GACE,UAAU;GACV,cAAc;GACd,KAAK,EACH,MAAM,EACJ,QAAQ,EACN,aAAa,gBACf,EACF,EACF;EACF;CACF;CACA,iBAAiB;EACf,UAAU;EACV,YAAY;EACZ,cAAc;CAChB;AACF,CAAC"}
@@ -934,36 +934,8 @@ declare const slotRecipes: {
934
934
  };
935
935
  }>;
936
936
  draggableCard: import('@chakra-ui/react').SlotRecipeDefinition<"content" | "root" | "handle", {
937
- isDragging: {
938
- true: {
939
- root: {
940
- borderColor: "border/strong";
941
- boxShadow: "elevation/lg";
942
- cursor: "grabbing";
943
- };
944
- handle: {
945
- color: "icon/secondary";
946
- };
947
- };
948
- };
949
- isDropTarget: {
950
- true: {
951
- root: {
952
- background: "background/secondary";
953
- borderColor: "border/strong";
954
- borderStyle: "dashed";
955
- boxShadow: "none";
956
- };
957
- handle: {
958
- visibility: "hidden";
959
- };
960
- content: {
961
- visibility: "hidden";
962
- };
963
- };
964
- };
965
- isFullCardDrag: {
966
- true: {
937
+ dragMode: {
938
+ card: {
967
939
  root: {
968
940
  cursor: "grab";
969
941
  _hover: {
@@ -983,7 +955,7 @@ declare const slotRecipes: {
983
955
  paddingInlineStart: number;
984
956
  };
985
957
  };
986
- false: {
958
+ handle: {
987
959
  root: {
988
960
  _hover: {
989
961
  borderColor: "border/regular";
@@ -1009,25 +981,44 @@ declare const slotRecipes: {
1009
981
  _active: {
1010
982
  background: "background/active";
1011
983
  };
1012
- _disabled: {
1013
- color: "icon/disabled";
1014
- cursor: "not-allowed";
1015
- _hover: {
1016
- background: "transparent";
1017
- color: "icon/disabled";
1018
- _active: {
1019
- background: "transparent";
1020
- };
1021
- };
1022
- _active: {
1023
- background: "transparent";
1024
- };
1025
- };
1026
984
  };
1027
985
  content: {
1028
986
  paddingInlineStart: "8";
1029
987
  };
1030
988
  };
989
+ none: {
990
+ content: {
991
+ paddingInlineStart: "16";
992
+ };
993
+ };
994
+ };
995
+ isDragging: {
996
+ true: {
997
+ root: {
998
+ borderColor: "border/strong";
999
+ boxShadow: "elevation/lg";
1000
+ cursor: "grabbing";
1001
+ };
1002
+ handle: {
1003
+ color: "icon/secondary";
1004
+ };
1005
+ };
1006
+ };
1007
+ isDropTarget: {
1008
+ true: {
1009
+ root: {
1010
+ background: "background/secondary";
1011
+ borderColor: "border/strong";
1012
+ borderStyle: "dashed";
1013
+ boxShadow: "none";
1014
+ };
1015
+ handle: {
1016
+ visibility: "hidden";
1017
+ };
1018
+ content: {
1019
+ visibility: "hidden";
1020
+ };
1021
+ };
1031
1022
  };
1032
1023
  }>;
1033
1024
  drawer: import('@chakra-ui/react').SlotRecipeDefinition<"content" | "body" | "footer" | "header" | "title" | "trigger" | "positioner" | "closeTrigger" | "description" | "backdrop", {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bitrise/bitkit-v2",
3
3
  "private": false,
4
- "version": "0.3.544-beta.3446",
4
+ "version": "0.3.544-beta.3449",
5
5
  "description": "Bitrise Design System Components built with Chakra UI V3",
6
6
  "keywords": [
7
7
  "react",