@bitrise/bitkit-v2 0.3.544-beta.3446 → 0.3.544-beta.3451
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/dist/components/BitkitDraggableCard/BitkitDraggableCard.d.ts +10 -0
- package/dist/components/BitkitDraggableCard/BitkitDraggableCard.js +29 -19
- package/dist/components/BitkitDraggableCard/BitkitDraggableCard.js.map +1 -1
- package/dist/components/BitkitPinInput/BitkitPinInput.js +4 -2
- package/dist/components/BitkitPinInput/BitkitPinInput.js.map +1 -1
- package/dist/theme/slot-recipes/DraggableCard.recipe.d.ts +36 -45
- package/dist/theme/slot-recipes/DraggableCard.recipe.js +31 -40
- package/dist/theme/slot-recipes/DraggableCard.recipe.js.map +1 -1
- package/dist/theme/slot-recipes/index.d.ts +36 -45
- package/package.json +1 -1
|
@@ -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
|
|
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
|
-
|
|
50
|
-
|
|
51
|
-
|
|
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: [
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
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
|
|
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"}
|
|
@@ -30,7 +30,8 @@ var BitkitPinInput = forwardRef((props, ref) => {
|
|
|
30
30
|
});
|
|
31
31
|
const hasWarning = state === "warning" || !!fieldProps.warningText;
|
|
32
32
|
const isInvalid = state === "error" || !!fieldProps.errorText;
|
|
33
|
-
const
|
|
33
|
+
const isReadOnly = state === "readOnly";
|
|
34
|
+
const isRequired = fieldProps.required ?? !isReadOnly;
|
|
34
35
|
const iconSize = size === "lg" ? "24" : "16";
|
|
35
36
|
let describedBy;
|
|
36
37
|
if (fieldProps.errorText) describedBy = fieldIds.errorText;
|
|
@@ -42,10 +43,11 @@ var BitkitPinInput = forwardRef((props, ref) => {
|
|
|
42
43
|
});
|
|
43
44
|
else if (hasWarning) statusIcon = /* @__PURE__ */ jsx(IconWarningYellow, { size: iconSize });
|
|
44
45
|
const handleValueChange = (details) => {
|
|
46
|
+
if (isReadOnly) return;
|
|
45
47
|
setCurrentValue(details.valueAsString);
|
|
46
48
|
onValueChange?.(details.valueAsString);
|
|
47
49
|
};
|
|
48
|
-
const handleValueComplete = onValueComplete ? (details) => onValueComplete(details.valueAsString) : void 0;
|
|
50
|
+
const handleValueComplete = onValueComplete && !isReadOnly ? (details) => onValueComplete(details.valueAsString) : void 0;
|
|
49
51
|
const cells = toCells(currentValue, count);
|
|
50
52
|
return /* @__PURE__ */ jsx(BitkitField, {
|
|
51
53
|
ref,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BitkitPinInput.js","names":[],"sources":["../../../lib/components/BitkitPinInput/BitkitPinInput.tsx"],"sourcesContent":["import { useControllableState } from '@chakra-ui/react/hooks';\nimport { PinInput, type PinInputRootProps } from '@chakra-ui/react/pin-input';\nimport { forwardRef, type ReactNode, useId } from 'react';\n\nimport { IconErrorCircleFilled, IconWarningYellow } from '../../icons';\nimport BitkitField, { type BitkitFieldProps } from '../BitkitField/BitkitField';\n\nconst toCells = (value: string, count: number) => Array.from({ length: count }, (_, index) => value[index] ?? '');\n\nconst stripSeparators = (value: string) => value.replace(/[\\s-]/g, '');\n\nexport interface BitkitPinInputProps extends Omit<\n BitkitFieldProps,\n 'children' | 'counterText' | 'defaultValue' | 'disabled' | 'invalid' | 'optional' | 'readOnly'\n> {\n /** Number of characters (and input cells). */\n count?: number;\n /** Initial value for uncontrolled usage, as a single string (e.g. `'123'`). */\n defaultValue?: string;\n /**\n * Escape hatch for Ark's `PinInput.Root` — options like `pattern`, `sanitizeValue`, `autoSubmit`,\n * `blurOnComplete` or `name`. `sanitizeValue` defaults to stripping whitespace and dashes from a\n * pasted code, so `123 456` and `123-456` are accepted.\n */\n inputProps?: Omit<\n PinInputRootProps,\n | 'count'\n | 'defaultValue'\n | 'disabled'\n | 'ids'\n | 'invalid'\n | 'mask'\n | 'onValueChange'\n | 'onValueComplete'\n | 'otp'\n | 'placeholder'\n | 'readOnly'\n | 'required'\n | 'size'\n | 'type'\n | 'value'\n >;\n /** Mask the entered characters, like `type=\"password\"`. */\n masked?: boolean;\n /** Called with the whole value as a string whenever a cell changes. */\n onValueChange?: (value: string) => void;\n /** Called with the whole value once every cell is filled. */\n onValueComplete?: (value: string) => void;\n /** Hint the browser to autofill a one-time code from SMS or email (`autocomplete=\"one-time-code\"`). */\n otp?: boolean;\n /** Field size — controls the cell size and typography. */\n size?: 'md' | 'lg';\n /**\n * Field state. `error`/`warning` are also implied by `errorText`/`warningText`; `disabled` and\n * `readOnly` gate interaction.\n */\n state?: 'disabled' | 'error' | 'readOnly' | 'warning';\n /** Which characters each cell accepts. */\n type?: 'alphabetic' | 'alphanumeric' | 'numeric';\n /** Controlled value, as a single string. Pair with `onValueChange`. */\n value?: string;\n}\n\n/**\n * A row of single-character cells for verification codes and PINs, built on Ark's PinInput. The\n * value is a plain string — control it with `value` + `onValueChange`, or start uncontrolled with\n * `defaultValue`; `onValueComplete` fires once every cell is filled. `count` sets the number of\n * cells. Includes the standard label and helper/error/warning chrome.\n */\nconst BitkitPinInput = forwardRef<HTMLDivElement, BitkitPinInputProps>((props, ref) => {\n const {\n count = 6,\n defaultValue,\n inputProps,\n masked,\n onValueChange,\n onValueComplete,\n otp,\n size = 'lg',\n state,\n type = 'numeric',\n value,\n ...fieldProps\n } = props;\n\n const id = useId();\n const getCellId = (index: number | string) => `${id}-cell-${index}`;\n const fieldIds = {\n control: getCellId(0),\n errorText: `${id}-error-text`,\n helperText: `${id}-helper-text`,\n label: `${id}-label`,\n };\n\n const [currentValue, setCurrentValue] = useControllableState({ defaultValue: defaultValue ?? '', value });\n\n const hasWarning = state === 'warning' || !!fieldProps.warningText;\n const isInvalid = state === 'error' || !!fieldProps.errorText;\n const isRequired = fieldProps.required ??
|
|
1
|
+
{"version":3,"file":"BitkitPinInput.js","names":[],"sources":["../../../lib/components/BitkitPinInput/BitkitPinInput.tsx"],"sourcesContent":["import { useControllableState } from '@chakra-ui/react/hooks';\nimport { PinInput, type PinInputRootProps } from '@chakra-ui/react/pin-input';\nimport { forwardRef, type ReactNode, useId } from 'react';\n\nimport { IconErrorCircleFilled, IconWarningYellow } from '../../icons';\nimport BitkitField, { type BitkitFieldProps } from '../BitkitField/BitkitField';\n\nconst toCells = (value: string, count: number) => Array.from({ length: count }, (_, index) => value[index] ?? '');\n\nconst stripSeparators = (value: string) => value.replace(/[\\s-]/g, '');\n\nexport interface BitkitPinInputProps extends Omit<\n BitkitFieldProps,\n 'children' | 'counterText' | 'defaultValue' | 'disabled' | 'invalid' | 'optional' | 'readOnly'\n> {\n /** Number of characters (and input cells). */\n count?: number;\n /** Initial value for uncontrolled usage, as a single string (e.g. `'123'`). */\n defaultValue?: string;\n /**\n * Escape hatch for Ark's `PinInput.Root` — options like `pattern`, `sanitizeValue`, `autoSubmit`,\n * `blurOnComplete` or `name`. `sanitizeValue` defaults to stripping whitespace and dashes from a\n * pasted code, so `123 456` and `123-456` are accepted.\n */\n inputProps?: Omit<\n PinInputRootProps,\n | 'count'\n | 'defaultValue'\n | 'disabled'\n | 'ids'\n | 'invalid'\n | 'mask'\n | 'onValueChange'\n | 'onValueComplete'\n | 'otp'\n | 'placeholder'\n | 'readOnly'\n | 'required'\n | 'size'\n | 'type'\n | 'value'\n >;\n /** Mask the entered characters, like `type=\"password\"`. */\n masked?: boolean;\n /** Called with the whole value as a string whenever a cell changes. */\n onValueChange?: (value: string) => void;\n /** Called with the whole value once every cell is filled. */\n onValueComplete?: (value: string) => void;\n /** Hint the browser to autofill a one-time code from SMS or email (`autocomplete=\"one-time-code\"`). */\n otp?: boolean;\n /** Field size — controls the cell size and typography. */\n size?: 'md' | 'lg';\n /**\n * Field state. `error`/`warning` are also implied by `errorText`/`warningText`; `disabled` and\n * `readOnly` gate interaction.\n */\n state?: 'disabled' | 'error' | 'readOnly' | 'warning';\n /** Which characters each cell accepts. */\n type?: 'alphabetic' | 'alphanumeric' | 'numeric';\n /** Controlled value, as a single string. Pair with `onValueChange`. */\n value?: string;\n}\n\n/**\n * A row of single-character cells for verification codes and PINs, built on Ark's PinInput. The\n * value is a plain string — control it with `value` + `onValueChange`, or start uncontrolled with\n * `defaultValue`; `onValueComplete` fires once every cell is filled. `count` sets the number of\n * cells. Includes the standard label and helper/error/warning chrome.\n */\nconst BitkitPinInput = forwardRef<HTMLDivElement, BitkitPinInputProps>((props, ref) => {\n const {\n count = 6,\n defaultValue,\n inputProps,\n masked,\n onValueChange,\n onValueComplete,\n otp,\n size = 'lg',\n state,\n type = 'numeric',\n value,\n ...fieldProps\n } = props;\n\n const id = useId();\n const getCellId = (index: number | string) => `${id}-cell-${index}`;\n const fieldIds = {\n control: getCellId(0),\n errorText: `${id}-error-text`,\n helperText: `${id}-helper-text`,\n label: `${id}-label`,\n };\n\n const [currentValue, setCurrentValue] = useControllableState({ defaultValue: defaultValue ?? '', value });\n\n const hasWarning = state === 'warning' || !!fieldProps.warningText;\n const isInvalid = state === 'error' || !!fieldProps.errorText;\n const isReadOnly = state === 'readOnly';\n const isRequired = fieldProps.required ?? !isReadOnly;\n const iconSize = size === 'lg' ? '24' : '16';\n\n let describedBy: string | undefined;\n if (fieldProps.errorText) {\n describedBy = fieldIds.errorText;\n } else if (fieldProps.helperText || fieldProps.warningText) {\n describedBy = fieldIds.helperText;\n }\n\n let statusIcon: ReactNode = null;\n if (isInvalid) {\n statusIcon = <IconErrorCircleFilled color=\"icon/negative\" size={iconSize} />;\n } else if (hasWarning) {\n statusIcon = <IconWarningYellow size={iconSize} />;\n }\n\n const handleValueChange: PinInputRootProps['onValueChange'] = (details) => {\n if (isReadOnly) {\n return;\n }\n setCurrentValue(details.valueAsString);\n onValueChange?.(details.valueAsString);\n };\n\n const handleValueComplete: PinInputRootProps['onValueComplete'] =\n onValueComplete && !isReadOnly ? (details) => onValueComplete(details.valueAsString) : undefined;\n\n const cells = toCells(currentValue, count);\n\n return (\n <BitkitField ref={ref} state={state} {...fieldProps} ids={fieldIds}>\n <PinInput.Root\n count={count}\n key={count}\n mask={masked}\n onValueChange={handleValueChange}\n onValueComplete={handleValueComplete}\n otp={otp}\n placeholder=\"\"\n sanitizeValue={stripSeparators}\n size={size}\n type={type}\n value={cells}\n {...inputProps}\n ids={{ hiddenInput: `${id}-hidden-input`, input: getCellId, label: fieldIds.label }}\n required={false}\n >\n <PinInput.HiddenInput />\n <PinInput.Control>\n {cells.map((_, index) => (\n <PinInput.Input\n aria-describedby={describedBy}\n aria-labelledby={fieldProps.label ? `${fieldIds.label} ${getCellId(index)}` : undefined}\n index={index}\n // eslint-disable-next-line react/no-array-index-key\n key={index}\n required={isRequired}\n />\n ))}\n </PinInput.Control>\n {statusIcon}\n </PinInput.Root>\n </BitkitField>\n );\n});\n\nBitkitPinInput.displayName = 'BitkitPinInput';\n\nexport default BitkitPinInput;\n"],"mappings":";;;;;;;;AAOA,IAAM,WAAW,OAAe,UAAkB,MAAM,KAAK,EAAE,QAAQ,MAAM,IAAI,GAAG,UAAU,MAAM,UAAU,EAAE;AAEhH,IAAM,mBAAmB,UAAkB,MAAM,QAAQ,UAAU,EAAE;;;;;;;AA4DrE,IAAM,iBAAiB,YAAiD,OAAO,QAAQ;CACrF,MAAM,EACJ,QAAQ,GACR,cACA,YACA,QACA,eACA,iBACA,KACA,OAAO,MACP,OACA,OAAO,WACP,OACA,GAAG,eACD;CAEJ,MAAM,KAAK,MAAM;CACjB,MAAM,aAAa,UAA2B,GAAG,GAAG,QAAQ;CAC5D,MAAM,WAAW;EACf,SAAS,UAAU,CAAC;EACpB,WAAW,GAAG,GAAG;EACjB,YAAY,GAAG,GAAG;EAClB,OAAO,GAAG,GAAG;CACf;CAEA,MAAM,CAAC,cAAc,mBAAmB,qBAAqB;EAAE,cAAc,gBAAgB;EAAI;CAAM,CAAC;CAExG,MAAM,aAAa,UAAU,aAAa,CAAC,CAAC,WAAW;CACvD,MAAM,YAAY,UAAU,WAAW,CAAC,CAAC,WAAW;CACpD,MAAM,aAAa,UAAU;CAC7B,MAAM,aAAa,WAAW,YAAY,CAAC;CAC3C,MAAM,WAAW,SAAS,OAAO,OAAO;CAExC,IAAI;CACJ,IAAI,WAAW,WACb,cAAc,SAAS;MAClB,IAAI,WAAW,cAAc,WAAW,aAC7C,cAAc,SAAS;CAGzB,IAAI,aAAwB;CAC5B,IAAI,WACF,aAAa,oBAAC,uBAAD;EAAuB,OAAM;EAAgB,MAAM;CAAW,CAAA;MACtE,IAAI,YACT,aAAa,oBAAC,mBAAD,EAAmB,MAAM,SAAW,CAAA;CAGnD,MAAM,qBAAyD,YAAY;EACzE,IAAI,YACF;EAEF,gBAAgB,QAAQ,aAAa;EACrC,gBAAgB,QAAQ,aAAa;CACvC;CAEA,MAAM,sBACJ,mBAAmB,CAAC,cAAc,YAAY,gBAAgB,QAAQ,aAAa,IAAI,KAAA;CAEzF,MAAM,QAAQ,QAAQ,cAAc,KAAK;CAEzC,OACE,oBAAC,aAAD;EAAkB;EAAY;EAAO,GAAI;EAAY,KAAK;EACxD,UAAA,qBAAC,SAAS,MAAV;GACS;GAEP,MAAM;GACN,eAAe;GACf,iBAAiB;GACZ;GACL,aAAY;GACZ,eAAe;GACT;GACA;GACN,OAAO;GACP,GAAI;GACJ,KAAK;IAAE,aAAa,GAAG,GAAG;IAAgB,OAAO;IAAW,OAAO,SAAS;GAAM;GAClF,UAAU;GAdZ,UAAA;IAgBE,oBAAC,SAAS,aAAV,CAAuB,CAAA;IACvB,oBAAC,SAAS,SAAV,EAAA,UACG,MAAM,KAAK,GAAG,UACb,oBAAC,SAAS,OAAV;KACE,oBAAkB;KAClB,mBAAiB,WAAW,QAAQ,GAAG,SAAS,MAAM,GAAG,UAAU,KAAK,MAAM,KAAA;KACvE;KAGP,UAAU;IACX,GAFM,KAEN,CACF,EACe,CAAA;IACjB;GACY;EA5BR,GAAA,KA4BQ;CACJ,CAAA;AAEjB,CAAC;AAED,eAAe,cAAc"}
|
|
@@ -1,34 +1,6 @@
|
|
|
1
1
|
declare const draggableCardSlotRecipe: import('@chakra-ui/react').SlotRecipeDefinition<"content" | "root" | "handle", {
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
|
|
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
|
-
|
|
39
|
-
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
938
|
-
|
|
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
|
-
|
|
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", {
|