@bitrise/bitkit-v2 0.3.544-beta.3453 → 0.3.544
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 +5 -38
- package/dist/components/BitkitDraggableCard/BitkitDraggableCard.js +21 -46
- package/dist/components/BitkitDraggableCard/BitkitDraggableCard.js.map +1 -1
- package/dist/components/BitkitPinInput/BitkitPinInput.js +2 -4
- package/dist/components/BitkitPinInput/BitkitPinInput.js.map +1 -1
- package/dist/components/BitkitToggletip/BitkitToggletip.d.ts +3 -9
- package/dist/components/BitkitToggletip/BitkitToggletip.js +6 -10
- package/dist/components/BitkitToggletip/BitkitToggletip.js.map +1 -1
- package/dist/theme/slot-recipes/DraggableCard.recipe.d.ts +31 -37
- package/dist/theme/slot-recipes/DraggableCard.recipe.js +29 -31
- package/dist/theme/slot-recipes/DraggableCard.recipe.js.map +1 -1
- package/dist/theme/slot-recipes/Drawer.recipe.d.ts +3 -13
- package/dist/theme/slot-recipes/Drawer.recipe.js +8 -22
- package/dist/theme/slot-recipes/Drawer.recipe.js.map +1 -1
- package/dist/theme/slot-recipes/Table.recipe.js +1 -0
- package/dist/theme/slot-recipes/Table.recipe.js.map +1 -1
- package/dist/theme/slot-recipes/index.d.ts +34 -50
- package/package.json +1 -1
|
@@ -1,35 +1,21 @@
|
|
|
1
1
|
import { BoxProps } from '@chakra-ui/react/box';
|
|
2
|
-
import {
|
|
2
|
+
import { ReactNode, Ref } from 'react';
|
|
3
3
|
export interface BitkitDraggableCardProps extends Omit<BoxProps, 'children'> {
|
|
4
4
|
children: ReactNode;
|
|
5
|
-
/**
|
|
6
|
-
* Props spread onto the drag handle `<button>` — pass `{ ...attributes, ...listeners }` from `@dnd-kit/core`'s
|
|
7
|
-
* `useSortable()` / `useDraggable()` here. When provided, only the handle initiates drag. Overrides the default
|
|
8
|
-
* `aria-label="Drag handle"`, so name what is being reordered (e.g. `aria-label="Reorder trigger"`).
|
|
9
|
-
*/
|
|
10
|
-
handleProps?: Omit<ComponentPropsWithoutRef<'button'>, 'children' | 'type'>;
|
|
11
|
-
/**
|
|
12
|
-
* Ref for the drag handle `<button>` — pass `handleRef` from `@dnd-kit/react`'s `useSortable()`, or
|
|
13
|
-
* `setActivatorNodeRef` from `@dnd-kit/core`'s. When provided, only the handle initiates drag.
|
|
14
|
-
*/
|
|
5
|
+
/** Ref for the drag handle element — pass useSortable().handleRef here. When provided, only the handle initiates drag. */
|
|
15
6
|
handleRef?: Ref<HTMLButtonElement>;
|
|
16
7
|
/** Whether this card is currently being dragged */
|
|
17
8
|
isDragging?: boolean;
|
|
18
9
|
/** Whether this card is a drop target placeholder */
|
|
19
10
|
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';
|
|
25
11
|
}
|
|
26
12
|
/**
|
|
27
|
-
* A card with a drag handle, designed for use with `@dnd-kit/react
|
|
13
|
+
* A card with a drag handle, designed for use with `@dnd-kit/react`.
|
|
28
14
|
*
|
|
29
15
|
* The component is purely presentational — it does not depend on `@dnd-kit`.
|
|
30
|
-
* Pass the refs
|
|
16
|
+
* Pass the refs and state flags from `useSortable` (or `useDraggable`) to wire it up.
|
|
31
17
|
*
|
|
32
|
-
* @example Full-card drag (default —
|
|
18
|
+
* @example Full-card drag (default — the entire card is draggable)
|
|
33
19
|
* ```tsx
|
|
34
20
|
* const { ref, isDragSource, isDropTarget } = useSortable({ id, index });
|
|
35
21
|
*
|
|
@@ -46,25 +32,6 @@ export interface BitkitDraggableCardProps extends Omit<BoxProps, 'children'> {
|
|
|
46
32
|
* {children}
|
|
47
33
|
* </BitkitDraggableCard>
|
|
48
34
|
* ```
|
|
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
|
-
*
|
|
55
|
-
* @example Handle-only drag with `@dnd-kit/core` / `@dnd-kit/sortable` (pass handleProps and handleRef)
|
|
56
|
-
* ```tsx
|
|
57
|
-
* const { attributes, isDragging, listeners, setActivatorNodeRef, setNodeRef } = useSortable({ id });
|
|
58
|
-
*
|
|
59
|
-
* <BitkitDraggableCard
|
|
60
|
-
* ref={setNodeRef}
|
|
61
|
-
* handleProps={{ ...attributes, ...listeners, 'aria-label': 'Reorder trigger' }}
|
|
62
|
-
* handleRef={setActivatorNodeRef}
|
|
63
|
-
* isDragging={isDragging}
|
|
64
|
-
* >
|
|
65
|
-
* {children}
|
|
66
|
-
* </BitkitDraggableCard>
|
|
67
|
-
* ```
|
|
68
35
|
*/
|
|
69
36
|
declare const BitkitDraggableCard: import('react').ForwardRefExoticComponent<BitkitDraggableCardProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
70
37
|
export default BitkitDraggableCard;
|
|
@@ -5,12 +5,12 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
5
5
|
import { Box } from "@chakra-ui/react/box";
|
|
6
6
|
// lib/components/BitkitDraggableCard/BitkitDraggableCard.tsx
|
|
7
7
|
/**
|
|
8
|
-
* A card with a drag handle, designed for use with `@dnd-kit/react
|
|
8
|
+
* A card with a drag handle, designed for use with `@dnd-kit/react`.
|
|
9
9
|
*
|
|
10
10
|
* The component is purely presentational — it does not depend on `@dnd-kit`.
|
|
11
|
-
* Pass the refs
|
|
11
|
+
* Pass the refs and state flags from `useSortable` (or `useDraggable`) to wire it up.
|
|
12
12
|
*
|
|
13
|
-
* @example Full-card drag (default —
|
|
13
|
+
* @example Full-card drag (default — the entire card is draggable)
|
|
14
14
|
* ```tsx
|
|
15
15
|
* const { ref, isDragSource, isDropTarget } = useSortable({ id, index });
|
|
16
16
|
*
|
|
@@ -27,57 +27,32 @@ import { Box } from "@chakra-ui/react/box";
|
|
|
27
27
|
* {children}
|
|
28
28
|
* </BitkitDraggableCard>
|
|
29
29
|
* ```
|
|
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
|
-
*
|
|
36
|
-
* @example Handle-only drag with `@dnd-kit/core` / `@dnd-kit/sortable` (pass handleProps and handleRef)
|
|
37
|
-
* ```tsx
|
|
38
|
-
* const { attributes, isDragging, listeners, setActivatorNodeRef, setNodeRef } = useSortable({ id });
|
|
39
|
-
*
|
|
40
|
-
* <BitkitDraggableCard
|
|
41
|
-
* ref={setNodeRef}
|
|
42
|
-
* handleProps={{ ...attributes, ...listeners, 'aria-label': 'Reorder trigger' }}
|
|
43
|
-
* handleRef={setActivatorNodeRef}
|
|
44
|
-
* isDragging={isDragging}
|
|
45
|
-
* >
|
|
46
|
-
* {children}
|
|
47
|
-
* </BitkitDraggableCard>
|
|
48
|
-
* ```
|
|
49
30
|
*/
|
|
50
31
|
var BitkitDraggableCard = forwardRef((props, ref) => {
|
|
51
|
-
const { children, css,
|
|
52
|
-
const
|
|
53
|
-
const dragMode = isReadOnly ? "none" : !handleRef && !handleProps ? "card" : "handle";
|
|
32
|
+
const { children, css, handleRef, isDragging = false, isDropTarget = false, ...rest } = props;
|
|
33
|
+
const isFullCardDrag = !handleRef;
|
|
54
34
|
const styles = useSlotRecipe({ key: "draggableCard" })({
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
35
|
+
isDragging,
|
|
36
|
+
isDropTarget,
|
|
37
|
+
isFullCardDrag
|
|
58
38
|
});
|
|
59
39
|
return /* @__PURE__ */ jsxs(Box, {
|
|
60
40
|
ref,
|
|
61
41
|
css: [styles.root, css],
|
|
62
42
|
...rest,
|
|
63
|
-
children: [
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
/* @__PURE__ */ jsx(Box, {
|
|
77
|
-
css: styles.content,
|
|
78
|
-
children
|
|
79
|
-
})
|
|
80
|
-
]
|
|
43
|
+
children: [isFullCardDrag ? /* @__PURE__ */ jsx(chakra.div, {
|
|
44
|
+
css: styles.handle,
|
|
45
|
+
children: /* @__PURE__ */ jsx(IconDragHandle, { size: "16" })
|
|
46
|
+
}) : /* @__PURE__ */ jsx(chakra.button, {
|
|
47
|
+
ref: handleRef,
|
|
48
|
+
type: "button",
|
|
49
|
+
"aria-label": "Drag handle",
|
|
50
|
+
css: styles.handle,
|
|
51
|
+
children: /* @__PURE__ */ jsx(IconDragHandle, { size: "16" })
|
|
52
|
+
}), /* @__PURE__ */ jsx(Box, {
|
|
53
|
+
css: styles.content,
|
|
54
|
+
children
|
|
55
|
+
})]
|
|
81
56
|
});
|
|
82
57
|
});
|
|
83
58
|
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 {
|
|
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 { 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 /** Ref for the drag handle element — pass useSortable().handleRef here. When provided, only the handle initiates drag. */\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`.\n *\n * The component is purely presentational — it does not depend on `@dnd-kit`.\n * Pass the refs and state flags from `useSortable` (or `useDraggable`) to wire it up.\n *\n * @example Full-card drag (default — 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 */\nconst BitkitDraggableCard = forwardRef<HTMLDivElement, BitkitDraggableCardProps>((props, ref) => {\n const { children, css, handleRef, isDragging = false, isDropTarget = false, ...rest } = props;\n\n const isFullCardDrag = !handleRef;\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 ref={handleRef} type=\"button\" aria-label=\"Drag handle\" 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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CA,IAAM,sBAAsB,YAAsD,OAAO,QAAQ;CAC/F,MAAM,EAAE,UAAU,KAAK,WAAW,aAAa,OAAO,eAAe,OAAO,GAAG,SAAS;CAExF,MAAM,iBAAiB,CAAC;CAExB,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,KAAK;GAAW,MAAK;GAAS,cAAW;GAAc,KAAK,OAAO;GAChF,UAAA,oBAAC,gBAAD,EAAgB,MAAK,KAAM,CAAA;EACd,CAAA,GAEjB,oBAAC,KAAD;GAAK,KAAK,OAAO;GAAU;EAAc,CAAA,CACtC;;AAET,CAAC;AAED,oBAAoB,cAAc"}
|
|
@@ -30,8 +30,7 @@ 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
|
|
34
|
-
const isRequired = fieldProps.required ?? !isReadOnly;
|
|
33
|
+
const isRequired = fieldProps.required ?? state !== "readOnly";
|
|
35
34
|
const iconSize = size === "lg" ? "24" : "16";
|
|
36
35
|
let describedBy;
|
|
37
36
|
if (fieldProps.errorText) describedBy = fieldIds.errorText;
|
|
@@ -43,11 +42,10 @@ var BitkitPinInput = forwardRef((props, ref) => {
|
|
|
43
42
|
});
|
|
44
43
|
else if (hasWarning) statusIcon = /* @__PURE__ */ jsx(IconWarningYellow, { size: iconSize });
|
|
45
44
|
const handleValueChange = (details) => {
|
|
46
|
-
if (isReadOnly) return;
|
|
47
45
|
setCurrentValue(details.valueAsString);
|
|
48
46
|
onValueChange?.(details.valueAsString);
|
|
49
47
|
};
|
|
50
|
-
const handleValueComplete = onValueComplete
|
|
48
|
+
const handleValueComplete = onValueComplete ? (details) => onValueComplete(details.valueAsString) : void 0;
|
|
51
49
|
const cells = toCells(currentValue, count);
|
|
52
50
|
return /* @__PURE__ */ jsx(BitkitField, {
|
|
53
51
|
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
|
|
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 ?? state !== 'readOnly';\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 setCurrentValue(details.valueAsString);\n onValueChange?.(details.valueAsString);\n };\n\n const handleValueComplete: PinInputRootProps['onValueComplete'] = onValueComplete\n ? (details) => onValueComplete(details.valueAsString)\n : 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,WAAW,YAAY,UAAU;CACpD,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,gBAAgB,QAAQ,aAAa;EACrC,gBAAgB,QAAQ,aAAa;CACvC;CAEA,MAAM,sBAA4D,mBAC7D,YAAY,gBAAgB,QAAQ,aAAa,IAClD,KAAA;CAEJ,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"}
|
|
@@ -7,10 +7,9 @@ export type BitkitToggletipProps = {
|
|
|
7
7
|
button?: BitkitColorButtonProps;
|
|
8
8
|
/**
|
|
9
9
|
* The trigger the toggletip opens from. Rendered via `asChild`, so it must be a focusable control
|
|
10
|
-
* that accepts a ref — unless `wrapTrigger` puts a button in between.
|
|
11
|
-
* only anchored to an element, not opened by it: control `open` and pass `positioning.getAnchorElement`.
|
|
10
|
+
* that accepts a ref — unless `wrapTrigger` puts a button in between.
|
|
12
11
|
*/
|
|
13
|
-
children
|
|
12
|
+
children: ReactNode;
|
|
14
13
|
/** Open on first render, for an uncontrolled toggletip. */
|
|
15
14
|
defaultOpen?: PopoverRootProps['defaultOpen'];
|
|
16
15
|
/**
|
|
@@ -32,8 +31,6 @@ export type BitkitToggletipProps = {
|
|
|
32
31
|
open?: PopoverRootProps['open'];
|
|
33
32
|
/** Where the toggletip sits relative to the trigger (default `top`). It flips if space is short. */
|
|
34
33
|
placement?: NonNullable<PopoverRootProps['positioning']>['placement'];
|
|
35
|
-
/** `getAnchorElement` positions the toggletip against that element instead of the trigger. */
|
|
36
|
-
positioning?: Pick<NonNullable<PopoverRootProps['positioning']>, 'getAnchorElement'>;
|
|
37
34
|
/** The toggletip's text. */
|
|
38
35
|
text: string;
|
|
39
36
|
/** Accessible name of the `wrapTrigger` button, for a trigger with no text of its own, like an icon. */
|
|
@@ -52,14 +49,11 @@ export type BitkitToggletipProps = {
|
|
|
52
49
|
*
|
|
53
50
|
* Reach for `BitkitTooltip` when the hint is text only; this component when it links or acts.
|
|
54
51
|
*
|
|
55
|
-
* Without `children` it renders no trigger: anchor it with `positioning.getAnchorElement` and control
|
|
56
|
-
* `open`, for a hint that points at an element without the element opening it.
|
|
57
|
-
*
|
|
58
52
|
* The content renders in a portal, so it escapes any ancestor that traps stacking or clips overflow.
|
|
59
53
|
* Dialogs turn that off through `BitkitPortalContext`; `disablePortal` is the manual override.
|
|
60
54
|
*/
|
|
61
55
|
declare const BitkitToggletip: {
|
|
62
|
-
({ button, children, defaultOpen, disablePortal, disabled, icon: Icon, learnMoreTarget, learnMoreUrl, onOpenChange, open, placement,
|
|
56
|
+
({ button, children, defaultOpen, disablePortal, disabled, icon: Icon, learnMoreTarget, learnMoreUrl, onOpenChange, open, placement, text, triggerAriaLabel, wrapTrigger, }: BitkitToggletipProps): import('react').JSX.Element;
|
|
63
57
|
displayName: string;
|
|
64
58
|
};
|
|
65
59
|
export default BitkitToggletip;
|
|
@@ -24,31 +24,27 @@ var ArrowTip = withContext(Popover.ArrowTip, "arrowTip", { forwardAsChild: true
|
|
|
24
24
|
*
|
|
25
25
|
* Reach for `BitkitTooltip` when the hint is text only; this component when it links or acts.
|
|
26
26
|
*
|
|
27
|
-
* Without `children` it renders no trigger: anchor it with `positioning.getAnchorElement` and control
|
|
28
|
-
* `open`, for a hint that points at an element without the element opening it.
|
|
29
|
-
*
|
|
30
27
|
* The content renders in a portal, so it escapes any ancestor that traps stacking or clips overflow.
|
|
31
28
|
* Dialogs turn that off through `BitkitPortalContext`; `disablePortal` is the manual override.
|
|
32
29
|
*/
|
|
33
|
-
var BitkitToggletip = ({ button, children, defaultOpen, disablePortal, disabled, icon: Icon, learnMoreTarget, learnMoreUrl, onOpenChange, open, placement = "top",
|
|
30
|
+
var BitkitToggletip = ({ button, children, defaultOpen, disablePortal, disabled, icon: Icon, learnMoreTarget, learnMoreUrl, onOpenChange, open, placement = "top", text, triggerAriaLabel, wrapTrigger }) => {
|
|
34
31
|
const { disablePortal: disablePortalFromContext } = useContext(BitkitPortalContext);
|
|
35
32
|
const hasActions = !!learnMoreUrl || !!button;
|
|
36
|
-
if (disabled) return
|
|
33
|
+
if (disabled) return /* @__PURE__ */ jsx(Fragment$1, { children });
|
|
37
34
|
return /* @__PURE__ */ jsxs(Root, {
|
|
38
35
|
defaultOpen,
|
|
39
36
|
lazyMount: true,
|
|
40
37
|
onOpenChange,
|
|
41
38
|
open,
|
|
42
39
|
positioning: {
|
|
43
|
-
|
|
40
|
+
placement,
|
|
44
41
|
offset: {
|
|
45
42
|
mainAxis: 4,
|
|
46
43
|
crossAxis: 0
|
|
47
|
-
}
|
|
48
|
-
placement
|
|
44
|
+
}
|
|
49
45
|
},
|
|
50
46
|
unmountOnExit: true,
|
|
51
|
-
children: [
|
|
47
|
+
children: [wrapTrigger || !isValidElement(children) ? /* @__PURE__ */ jsx(Trigger, {
|
|
52
48
|
"aria-label": triggerAriaLabel,
|
|
53
49
|
css: {
|
|
54
50
|
alignItems: "center",
|
|
@@ -70,7 +66,7 @@ var BitkitToggletip = ({ button, children, defaultOpen, disablePortal, disabled,
|
|
|
70
66
|
}
|
|
71
67
|
},
|
|
72
68
|
children
|
|
73
|
-
}) :
|
|
69
|
+
}) : /* @__PURE__ */ jsx(Trigger, {
|
|
74
70
|
asChild: true,
|
|
75
71
|
children
|
|
76
72
|
}), /* @__PURE__ */ jsx(Portal, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BitkitToggletip.js","names":["ArkPopover","_Fragment"],"sources":["../../../lib/components/BitkitToggletip/BitkitToggletip.tsx"],"sourcesContent":["import { Popover as ArkPopover, type PopoverRootProps } from '@ark-ui/react/popover';\nimport { Box } from '@chakra-ui/react/box';\nimport { Link } from '@chakra-ui/react/link';\nimport {\n type PopoverArrowProps,\n type PopoverArrowTipProps,\n type PopoverContentProps,\n type PopoverPositionerProps,\n type PopoverTitleProps,\n type PopoverTriggerProps,\n} from '@chakra-ui/react/popover';\nimport { Portal } from '@chakra-ui/react/portal';\nimport { createSlotRecipeContext } from '@chakra-ui/react/styled-system';\nimport { isValidElement, type ReactNode, useContext } from 'react';\n\nimport { type BitkitIconComponent } from '../../icons';\nimport BitkitPortalContext from '../../utilities/BitkitPortalContext';\nimport BitkitColorButton, { type BitkitColorButtonProps } from '../BitkitColorButton/BitkitColorButton';\n\n// Chakra's own Popover is Ark's popover under the `popover` recipe; this is the same composition\n// under `toggletip`, so the bubble can share the tooltip's surface instead of the popover's card.\nconst { withRootProvider, withContext } = createSlotRecipeContext({ key: 'toggletip' });\nconst Root = withRootProvider<PopoverRootProps>(ArkPopover.Root);\nconst Trigger = withContext<HTMLButtonElement, PopoverTriggerProps>(ArkPopover.Trigger, 'trigger', {\n forwardAsChild: true,\n});\nconst Positioner = withContext<HTMLDivElement, PopoverPositionerProps>(ArkPopover.Positioner, 'positioner', {\n forwardAsChild: true,\n});\nconst Content = withContext<HTMLDivElement, PopoverContentProps>(ArkPopover.Content, 'content', {\n forwardAsChild: true,\n});\n// The text is the popover's title, which is what names its dialog for assistive technology.\nconst Title = withContext<HTMLDivElement, PopoverTitleProps>(ArkPopover.Title, 'title', { forwardAsChild: true });\nconst Arrow = withContext<HTMLDivElement, PopoverArrowProps>(ArkPopover.Arrow, 'arrow', { forwardAsChild: true });\nconst ArrowTip = withContext<HTMLDivElement, PopoverArrowTipProps>(ArkPopover.ArrowTip, 'arrowTip', {\n forwardAsChild: true,\n});\n\nexport type BitkitToggletipProps = {\n /** Action button at the end of the toggletip. Defaults to the `contrast` colour variant, which follows the toggletip's background in both color modes. */\n button?: BitkitColorButtonProps;\n /**\n * The trigger the toggletip opens from. Rendered via `asChild`, so it must be a focusable control\n * that accepts a ref — unless `wrapTrigger` puts a button in between. Omit it for a hint that is\n * only anchored to an element, not opened by it: control `open` and pass `positioning.getAnchorElement`.\n */\n children?: ReactNode;\n /** Open on first render, for an uncontrolled toggletip. */\n defaultOpen?: PopoverRootProps['defaultOpen'];\n /**\n * Render the toggletip inline instead of in a portal. Only needed when it must stay inside its\n * parent's DOM subtree — a dialog already sets this for you.\n */\n disablePortal?: boolean;\n /** Render the trigger without a toggletip — for hints that only apply in some states. */\n disabled?: boolean;\n /** Icon after the text — `IconArrowNortheast` when the trigger opens something in a new tab, for instance. */\n icon?: BitkitIconComponent;\n /** Target for the \"Learn more\" link. `_blank` also sets `rel=\"noopener noreferrer\"`. */\n learnMoreTarget?: HTMLAnchorElement['target'];\n /** Adds a \"Learn more\" link pointing here, for the fuller explanation. */\n learnMoreUrl?: string;\n /** Called when the toggletip opens or closes. */\n onOpenChange?: PopoverRootProps['onOpenChange'];\n /** Controls the open state. */\n open?: PopoverRootProps['open'];\n /** Where the toggletip sits relative to the trigger (default `top`). It flips if space is short. */\n placement?: NonNullable<PopoverRootProps['positioning']>['placement'];\n /** `getAnchorElement` positions the toggletip against that element instead of the trigger. */\n positioning?: Pick<NonNullable<PopoverRootProps['positioning']>, 'getAnchorElement'>;\n /** The toggletip's text. */\n text: string;\n /** Accessible name of the `wrapTrigger` button, for a trigger with no text of its own, like an icon. */\n triggerAriaLabel?: string;\n /**\n * Put the trigger inside a button instead of rendering on it — for a trigger that is not a control\n * itself, like a badge or an icon. The button takes the click, the tap and the keyboard.\n */\n wrapTrigger?: boolean;\n};\n\n/**\n * A tooltip's bubble that opens on click, tap or Enter and stays open, so what it carries — a \"Learn\n * more\" link, an action button — can be reached by pointer, touch and keyboard alike. It is a\n * popover, not a tooltip: a tooltip closes as soon as focus leaves its trigger and ignores touch, so\n * anything clickable inside one can't be reached.\n *\n * Reach for `BitkitTooltip` when the hint is text only; this component when it links or acts.\n *\n * Without `children` it renders no trigger: anchor it with `positioning.getAnchorElement` and control\n * `open`, for a hint that points at an element without the element opening it.\n *\n * The content renders in a portal, so it escapes any ancestor that traps stacking or clips overflow.\n * Dialogs turn that off through `BitkitPortalContext`; `disablePortal` is the manual override.\n */\nconst BitkitToggletip = ({\n button,\n children,\n defaultOpen,\n disablePortal,\n disabled,\n icon: Icon,\n learnMoreTarget,\n learnMoreUrl,\n onOpenChange,\n open,\n placement = 'top',\n positioning,\n text,\n triggerAriaLabel,\n wrapTrigger,\n}: BitkitToggletipProps) => {\n const { disablePortal: disablePortalFromContext } = useContext(BitkitPortalContext);\n const hasActions = !!learnMoreUrl || !!button;\n\n if (disabled) {\n return children == null ? null : <>{children}</>;\n }\n\n return (\n // Mounted only while open, like Chakra's tooltip: a list of closed toggletips keeps no content in the DOM.\n <Root\n defaultOpen={defaultOpen}\n lazyMount\n onOpenChange={onOpenChange}\n open={open}\n positioning={{ ...positioning, offset: { mainAxis: 4, crossAxis: 0 }, placement }}\n unmountOnExit\n >\n {children != null && (wrapTrigger || !isValidElement(children)) ? (\n <Trigger\n aria-label={triggerAriaLabel}\n css={{\n alignItems: 'center',\n appearance: 'none',\n background: 'none',\n border: 0,\n color: 'inherit',\n display: 'inline-flex',\n font: 'inherit',\n padding: 0,\n // The button owns the tab stop, but the focus ring belongs on the trigger inside it: an\n // outline follows the border-radius of the element it is drawn on, and the button has\n // none — so leaving it here squares off a pill or a round trigger.\n _focusVisible: {\n outline: 'none',\n '& > *': {\n outlineColor: 'var(--focus-ring-color)',\n outlineOffset: 'var(--focus-ring-offset, 2px)',\n outlineStyle: 'var(--focus-ring-style, solid)',\n outlineWidth: 'var(--focus-ring-width, 2px)',\n },\n },\n }}\n >\n {children}\n </Trigger>\n ) : (\n children != null && <Trigger asChild>{children}</Trigger>\n )}\n <Portal disabled={disablePortal || disablePortalFromContext}>\n <Positioner>\n <Content>\n <Arrow>\n <ArrowTip />\n </Arrow>\n <Box display=\"flex\" gap=\"8\">\n <Title>{text}</Title>\n {Icon && <Icon flexShrink=\"0\" size=\"16\" />}\n </Box>\n {hasActions && (\n <Box alignItems=\"center\" display=\"flex\" gap=\"16\" marginBlockStart=\"16\">\n {learnMoreUrl && (\n <Link\n color=\"color/purple/highlight\"\n href={learnMoreUrl}\n rel={learnMoreTarget === '_blank' ? 'noopener noreferrer' : undefined}\n target={learnMoreTarget}\n >\n Learn more\n </Link>\n )}\n {button && <BitkitColorButton colorVariant=\"contrast\" marginInlineStart=\"auto\" {...button} />}\n </Box>\n )}\n </Content>\n </Positioner>\n </Portal>\n </Root>\n );\n};\n\nBitkitToggletip.displayName = 'BitkitToggletip';\n\nexport default BitkitToggletip;\n"],"mappings":";;;;;;;;;;AAqBA,IAAM,EAAE,kBAAkB,gBAAgB,wBAAwB,EAAE,KAAK,YAAY,CAAC;AACtF,IAAM,OAAO,iBAAmCA,QAAW,IAAI;AAC/D,IAAM,UAAU,YAAoDA,QAAW,SAAS,WAAW,EACjG,gBAAgB,KAClB,CAAC;AACD,IAAM,aAAa,YAAoDA,QAAW,YAAY,cAAc,EAC1G,gBAAgB,KAClB,CAAC;AACD,IAAM,UAAU,YAAiDA,QAAW,SAAS,WAAW,EAC9F,gBAAgB,KAClB,CAAC;AAED,IAAM,QAAQ,YAA+CA,QAAW,OAAO,SAA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,UAAQ,KAAY,CAAA,GACnB,QAAQ,oBAAC,MAAD;MAAM,YAAW;MAAI,MAAK;KAAM,CAAA,CACtC;;IACJ,cACC,qBAAC,KAAD;KAAK,YAAW;KAAS,SAAQ;KAAO,KAAI;KAAK,kBAAiB;KAAlE,UAAA,CACG,gBACC,oBAAC,MAAD;MACE,OAAM;MACN,MAAM;MACN,KAAK,oBAAoB,WAAW,wBAAwB,KAAA;MAC5D,QAAQ;MACT,UAAA;KAEK,CAAA,GAEP,UAAU,oBAAC,mBAAD;MAAmB,cAAa;MAAW,mBAAkB;MAAO,GAAI;KAAS,CAAA,CACzF;;GAEA,EAAA,CAAA,EACC,CAAA;EACN,CAAA,CACJ;;AAEV;AAEA,gBAAgB,cAAc"}
|
|
1
|
+
{"version":3,"file":"BitkitToggletip.js","names":["ArkPopover","_Fragment"],"sources":["../../../lib/components/BitkitToggletip/BitkitToggletip.tsx"],"sourcesContent":["import { Popover as ArkPopover, type PopoverRootProps } from '@ark-ui/react/popover';\nimport { Box } from '@chakra-ui/react/box';\nimport { Link } from '@chakra-ui/react/link';\nimport {\n type PopoverArrowProps,\n type PopoverArrowTipProps,\n type PopoverContentProps,\n type PopoverPositionerProps,\n type PopoverTitleProps,\n type PopoverTriggerProps,\n} from '@chakra-ui/react/popover';\nimport { Portal } from '@chakra-ui/react/portal';\nimport { createSlotRecipeContext } from '@chakra-ui/react/styled-system';\nimport { isValidElement, type ReactNode, useContext } from 'react';\n\nimport { type BitkitIconComponent } from '../../icons';\nimport BitkitPortalContext from '../../utilities/BitkitPortalContext';\nimport BitkitColorButton, { type BitkitColorButtonProps } from '../BitkitColorButton/BitkitColorButton';\n\n// Chakra's own Popover is Ark's popover under the `popover` recipe; this is the same composition\n// under `toggletip`, so the bubble can share the tooltip's surface instead of the popover's card.\nconst { withRootProvider, withContext } = createSlotRecipeContext({ key: 'toggletip' });\nconst Root = withRootProvider<PopoverRootProps>(ArkPopover.Root);\nconst Trigger = withContext<HTMLButtonElement, PopoverTriggerProps>(ArkPopover.Trigger, 'trigger', {\n forwardAsChild: true,\n});\nconst Positioner = withContext<HTMLDivElement, PopoverPositionerProps>(ArkPopover.Positioner, 'positioner', {\n forwardAsChild: true,\n});\nconst Content = withContext<HTMLDivElement, PopoverContentProps>(ArkPopover.Content, 'content', {\n forwardAsChild: true,\n});\n// The text is the popover's title, which is what names its dialog for assistive technology.\nconst Title = withContext<HTMLDivElement, PopoverTitleProps>(ArkPopover.Title, 'title', { forwardAsChild: true });\nconst Arrow = withContext<HTMLDivElement, PopoverArrowProps>(ArkPopover.Arrow, 'arrow', { forwardAsChild: true });\nconst ArrowTip = withContext<HTMLDivElement, PopoverArrowTipProps>(ArkPopover.ArrowTip, 'arrowTip', {\n forwardAsChild: true,\n});\n\nexport type BitkitToggletipProps = {\n /** Action button at the end of the toggletip. Defaults to the `contrast` colour variant, which follows the toggletip's background in both color modes. */\n button?: BitkitColorButtonProps;\n /**\n * The trigger the toggletip opens from. Rendered via `asChild`, so it must be a focusable control\n * that accepts a ref — unless `wrapTrigger` puts a button in between.\n */\n children: ReactNode;\n /** Open on first render, for an uncontrolled toggletip. */\n defaultOpen?: PopoverRootProps['defaultOpen'];\n /**\n * Render the toggletip inline instead of in a portal. Only needed when it must stay inside its\n * parent's DOM subtree — a dialog already sets this for you.\n */\n disablePortal?: boolean;\n /** Render the trigger without a toggletip — for hints that only apply in some states. */\n disabled?: boolean;\n /** Icon after the text — `IconArrowNortheast` when the trigger opens something in a new tab, for instance. */\n icon?: BitkitIconComponent;\n /** Target for the \"Learn more\" link. `_blank` also sets `rel=\"noopener noreferrer\"`. */\n learnMoreTarget?: HTMLAnchorElement['target'];\n /** Adds a \"Learn more\" link pointing here, for the fuller explanation. */\n learnMoreUrl?: string;\n /** Called when the toggletip opens or closes. */\n onOpenChange?: PopoverRootProps['onOpenChange'];\n /** Controls the open state. */\n open?: PopoverRootProps['open'];\n /** Where the toggletip sits relative to the trigger (default `top`). It flips if space is short. */\n placement?: NonNullable<PopoverRootProps['positioning']>['placement'];\n /** The toggletip's text. */\n text: string;\n /** Accessible name of the `wrapTrigger` button, for a trigger with no text of its own, like an icon. */\n triggerAriaLabel?: string;\n /**\n * Put the trigger inside a button instead of rendering on it — for a trigger that is not a control\n * itself, like a badge or an icon. The button takes the click, the tap and the keyboard.\n */\n wrapTrigger?: boolean;\n};\n\n/**\n * A tooltip's bubble that opens on click, tap or Enter and stays open, so what it carries — a \"Learn\n * more\" link, an action button — can be reached by pointer, touch and keyboard alike. It is a\n * popover, not a tooltip: a tooltip closes as soon as focus leaves its trigger and ignores touch, so\n * anything clickable inside one can't be reached.\n *\n * Reach for `BitkitTooltip` when the hint is text only; this component when it links or acts.\n *\n * The content renders in a portal, so it escapes any ancestor that traps stacking or clips overflow.\n * Dialogs turn that off through `BitkitPortalContext`; `disablePortal` is the manual override.\n */\nconst BitkitToggletip = ({\n button,\n children,\n defaultOpen,\n disablePortal,\n disabled,\n icon: Icon,\n learnMoreTarget,\n learnMoreUrl,\n onOpenChange,\n open,\n placement = 'top',\n text,\n triggerAriaLabel,\n wrapTrigger,\n}: BitkitToggletipProps) => {\n const { disablePortal: disablePortalFromContext } = useContext(BitkitPortalContext);\n const hasActions = !!learnMoreUrl || !!button;\n\n if (disabled) {\n return <>{children}</>;\n }\n\n return (\n // Mounted only while open, like Chakra's tooltip: a list of closed toggletips keeps no content in the DOM.\n <Root\n defaultOpen={defaultOpen}\n lazyMount\n onOpenChange={onOpenChange}\n open={open}\n positioning={{ placement, offset: { mainAxis: 4, crossAxis: 0 } }}\n unmountOnExit\n >\n {wrapTrigger || !isValidElement(children) ? (\n <Trigger\n aria-label={triggerAriaLabel}\n css={{\n alignItems: 'center',\n appearance: 'none',\n background: 'none',\n border: 0,\n color: 'inherit',\n display: 'inline-flex',\n font: 'inherit',\n padding: 0,\n // The button owns the tab stop, but the focus ring belongs on the trigger inside it: an\n // outline follows the border-radius of the element it is drawn on, and the button has\n // none — so leaving it here squares off a pill or a round trigger.\n _focusVisible: {\n outline: 'none',\n '& > *': {\n outlineColor: 'var(--focus-ring-color)',\n outlineOffset: 'var(--focus-ring-offset, 2px)',\n outlineStyle: 'var(--focus-ring-style, solid)',\n outlineWidth: 'var(--focus-ring-width, 2px)',\n },\n },\n }}\n >\n {children}\n </Trigger>\n ) : (\n <Trigger asChild>{children}</Trigger>\n )}\n <Portal disabled={disablePortal || disablePortalFromContext}>\n <Positioner>\n <Content>\n <Arrow>\n <ArrowTip />\n </Arrow>\n <Box display=\"flex\" gap=\"8\">\n <Title>{text}</Title>\n {Icon && <Icon flexShrink=\"0\" size=\"16\" />}\n </Box>\n {hasActions && (\n <Box alignItems=\"center\" display=\"flex\" gap=\"16\" marginBlockStart=\"16\">\n {learnMoreUrl && (\n <Link\n color=\"color/purple/highlight\"\n href={learnMoreUrl}\n rel={learnMoreTarget === '_blank' ? 'noopener noreferrer' : undefined}\n target={learnMoreTarget}\n >\n Learn more\n </Link>\n )}\n {button && <BitkitColorButton colorVariant=\"contrast\" marginInlineStart=\"auto\" {...button} />}\n </Box>\n )}\n </Content>\n </Positioner>\n </Portal>\n </Root>\n );\n};\n\nBitkitToggletip.displayName = 'BitkitToggletip';\n\nexport default BitkitToggletip;\n"],"mappings":";;;;;;;;;;AAqBA,IAAM,EAAE,kBAAkB,gBAAgB,wBAAwB,EAAE,KAAK,YAAY,CAAC;AACtF,IAAM,OAAO,iBAAmCA,QAAW,IAAI;AAC/D,IAAM,UAAU,YAAoDA,QAAW,SAAS,WAAW,EACjG,gBAAgB,KAClB,CAAC;AACD,IAAM,aAAa,YAAoDA,QAAW,YAAY,cAAc,EAC1G,gBAAgB,KAClB,CAAC;AACD,IAAM,UAAU,YAAiDA,QAAW,SAAS,WAAW,EAC9F,gBAAgB,KAClB,CAAC;AAED,IAAM,QAAQ,YAA+CA,QAAW,OAAO,SAAS,EAAE,gBAAgB,KAAK,CAAC;AAChH,IAAM,QAAQ,YAA+CA,QAAW,OAAO,SAAS,EAAE,gBAAgB,KAAK,CAAC;A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AAlE,UAAA,CACG,gBACC,oBAAC,MAAD;MACE,OAAM;MACN,MAAM;MACN,KAAK,oBAAoB,WAAW,wBAAwB,KAAA;MAC5D,QAAQ;MACT,UAAA;KAEK,CAAA,GAEP,UAAU,oBAAC,mBAAD;MAAmB,cAAa;MAAW,mBAAkB;MAAO,GAAI;KAAS,CAAA,CACzF;;GAEA,EAAA,CAAA,EACC,CAAA;EACN,CAAA,CACJ;;AAEV;AAEA,gBAAgB,cAAc"}
|
|
@@ -1,6 +1,34 @@
|
|
|
1
1
|
declare const draggableCardSlotRecipe: import('@chakra-ui/react').SlotRecipeDefinition<"content" | "root" | "handle", {
|
|
2
|
-
|
|
3
|
-
|
|
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: {
|
|
4
32
|
root: {
|
|
5
33
|
cursor: "grab";
|
|
6
34
|
_hover: {
|
|
@@ -20,7 +48,7 @@ declare const draggableCardSlotRecipe: import('@chakra-ui/react').SlotRecipeDefi
|
|
|
20
48
|
paddingInlineStart: number;
|
|
21
49
|
};
|
|
22
50
|
};
|
|
23
|
-
|
|
51
|
+
false: {
|
|
24
52
|
root: {
|
|
25
53
|
_hover: {
|
|
26
54
|
borderColor: "border/regular";
|
|
@@ -32,7 +60,6 @@ declare const draggableCardSlotRecipe: import('@chakra-ui/react').SlotRecipeDefi
|
|
|
32
60
|
border: "none";
|
|
33
61
|
cursor: "grab";
|
|
34
62
|
focusVisibleRing: "none";
|
|
35
|
-
touchAction: "none";
|
|
36
63
|
_focusVisible: {
|
|
37
64
|
boxShadow: "inset 0 0 0 var(--focus-ring-width) var(--focus-ring-color)";
|
|
38
65
|
};
|
|
@@ -51,39 +78,6 @@ declare const draggableCardSlotRecipe: import('@chakra-ui/react').SlotRecipeDefi
|
|
|
51
78
|
paddingInlineStart: "8";
|
|
52
79
|
};
|
|
53
80
|
};
|
|
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
|
-
};
|
|
87
81
|
};
|
|
88
82
|
}>;
|
|
89
83
|
export default draggableCardSlotRecipe;
|
|
@@ -35,8 +35,26 @@ var draggableCardSlotRecipe = defineSlotRecipe({
|
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
37
|
variants: {
|
|
38
|
-
|
|
39
|
-
|
|
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: {
|
|
40
58
|
root: {
|
|
41
59
|
cursor: "grab",
|
|
42
60
|
_hover: {
|
|
@@ -48,7 +66,7 @@ var draggableCardSlotRecipe = defineSlotRecipe({
|
|
|
48
66
|
handle: { pointerEvents: "none" },
|
|
49
67
|
content: { paddingInlineStart: 0 }
|
|
50
68
|
},
|
|
51
|
-
|
|
69
|
+
false: {
|
|
52
70
|
root: { _hover: { borderColor: "border/regular" } },
|
|
53
71
|
handle: {
|
|
54
72
|
appearance: "none",
|
|
@@ -56,7 +74,6 @@ var draggableCardSlotRecipe = defineSlotRecipe({
|
|
|
56
74
|
border: "none",
|
|
57
75
|
cursor: "grab",
|
|
58
76
|
focusVisibleRing: "none",
|
|
59
|
-
touchAction: "none",
|
|
60
77
|
_focusVisible: { boxShadow: "inset 0 0 0 var(--focus-ring-width) var(--focus-ring-color)" },
|
|
61
78
|
_hover: {
|
|
62
79
|
background: "background/hover",
|
|
@@ -66,40 +83,21 @@ var draggableCardSlotRecipe = defineSlotRecipe({
|
|
|
66
83
|
_active: { background: "background/active" }
|
|
67
84
|
},
|
|
68
85
|
content: { paddingInlineStart: "8" }
|
|
69
|
-
}
|
|
70
|
-
|
|
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
|
-
} }
|
|
86
|
+
}
|
|
87
|
+
}
|
|
90
88
|
},
|
|
91
89
|
compoundVariants: [
|
|
92
90
|
{
|
|
93
|
-
dragMode: "card",
|
|
94
91
|
isDragging: true,
|
|
92
|
+
isFullCardDrag: true,
|
|
95
93
|
css: { root: {
|
|
96
94
|
cursor: "grabbing",
|
|
97
95
|
_hover: { borderColor: "border/strong" }
|
|
98
96
|
} }
|
|
99
97
|
},
|
|
100
98
|
{
|
|
101
|
-
dragMode: "handle",
|
|
102
99
|
isDragging: true,
|
|
100
|
+
isFullCardDrag: false,
|
|
103
101
|
css: {
|
|
104
102
|
root: { _hover: { borderColor: "border/strong" } },
|
|
105
103
|
handle: {
|
|
@@ -110,23 +108,23 @@ var draggableCardSlotRecipe = defineSlotRecipe({
|
|
|
110
108
|
}
|
|
111
109
|
},
|
|
112
110
|
{
|
|
113
|
-
dragMode: "card",
|
|
114
111
|
isDropTarget: true,
|
|
112
|
+
isFullCardDrag: true,
|
|
115
113
|
css: { root: {
|
|
116
114
|
cursor: "default",
|
|
117
115
|
_hover: { borderColor: "border/strong" }
|
|
118
116
|
} }
|
|
119
117
|
},
|
|
120
118
|
{
|
|
121
|
-
dragMode: "handle",
|
|
122
119
|
isDropTarget: true,
|
|
120
|
+
isFullCardDrag: false,
|
|
123
121
|
css: { root: { _hover: { borderColor: "border/strong" } } }
|
|
124
122
|
}
|
|
125
123
|
],
|
|
126
124
|
defaultVariants: {
|
|
127
|
-
dragMode: "card",
|
|
128
125
|
isDragging: false,
|
|
129
|
-
isDropTarget: false
|
|
126
|
+
isDropTarget: false,
|
|
127
|
+
isFullCardDrag: true
|
|
130
128
|
}
|
|
131
129
|
});
|
|
132
130
|
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 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 _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 },\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,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;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"}
|
|
@@ -28,16 +28,8 @@ declare const drawerSlotRecipe: import('@chakra-ui/react').SlotRecipeDefinition<
|
|
|
28
28
|
base: "16";
|
|
29
29
|
tablet: "24";
|
|
30
30
|
};
|
|
31
|
-
paddingInlineEnd: {
|
|
32
|
-
base: "64";
|
|
33
|
-
tablet: `${number}rem`;
|
|
34
|
-
};
|
|
35
31
|
'& :has(> [role=tablist])': {
|
|
36
|
-
|
|
37
|
-
base: `${number}rem`;
|
|
38
|
-
tablet: "-64";
|
|
39
|
-
};
|
|
40
|
-
marginInlineStart: {
|
|
32
|
+
marginInline: {
|
|
41
33
|
base: "-8";
|
|
42
34
|
tablet: "-16";
|
|
43
35
|
};
|
|
@@ -49,7 +41,7 @@ declare const drawerSlotRecipe: import('@chakra-ui/react').SlotRecipeDefinition<
|
|
|
49
41
|
paddingBlockEnd: "24";
|
|
50
42
|
paddingBlockStart: "8";
|
|
51
43
|
paddingInline: "24";
|
|
52
|
-
'
|
|
44
|
+
'.chakra-drawer__header:has([role=tablist]) ~ &': {
|
|
53
45
|
paddingBlockStart: "24";
|
|
54
46
|
};
|
|
55
47
|
};
|
|
@@ -72,10 +64,8 @@ declare const drawerSlotRecipe: import('@chakra-ui/react').SlotRecipeDefinition<
|
|
|
72
64
|
paddingBlockEnd: "16";
|
|
73
65
|
paddingBlockStart: "24";
|
|
74
66
|
paddingInline: "24";
|
|
75
|
-
paddingInlineEnd: `${number}rem`;
|
|
76
67
|
'& :has(> [role=tablist])': {
|
|
77
|
-
|
|
78
|
-
marginInlineStart: "-16";
|
|
68
|
+
marginInline: "-16";
|
|
79
69
|
};
|
|
80
70
|
};
|
|
81
71
|
footer: {
|
|
@@ -26,7 +26,6 @@ var drawerSlotRecipe = defineSlotRecipe({
|
|
|
26
26
|
inset: 0,
|
|
27
27
|
justifyContent: "flex-end",
|
|
28
28
|
overscrollBehaviorY: "none",
|
|
29
|
-
pointerEvents: "none",
|
|
30
29
|
position: "fixed",
|
|
31
30
|
zIndex: "calc({zIndex.dialog} + var(--layer-index, 0))"
|
|
32
31
|
},
|
|
@@ -36,7 +35,6 @@ var drawerSlotRecipe = defineSlotRecipe({
|
|
|
36
35
|
flexDirection: "column",
|
|
37
36
|
maxHeight: "100dvh",
|
|
38
37
|
outline: "none",
|
|
39
|
-
pointerEvents: "auto",
|
|
40
38
|
position: "relative",
|
|
41
39
|
_open: {
|
|
42
40
|
animationDuration: "slowest",
|
|
@@ -72,6 +70,8 @@ var drawerSlotRecipe = defineSlotRecipe({
|
|
|
72
70
|
},
|
|
73
71
|
title: {
|
|
74
72
|
color: "text/tertiary",
|
|
73
|
+
flex: "1",
|
|
74
|
+
paddingInlineEnd: "48",
|
|
75
75
|
textStyle: "heading/h6"
|
|
76
76
|
},
|
|
77
77
|
description: {},
|
|
@@ -113,20 +113,10 @@ var drawerSlotRecipe = defineSlotRecipe({
|
|
|
113
113
|
base: "16",
|
|
114
114
|
tablet: "24"
|
|
115
115
|
},
|
|
116
|
-
|
|
117
|
-
base: "
|
|
118
|
-
tablet:
|
|
119
|
-
}
|
|
120
|
-
"& :has(> [role=tablist])": {
|
|
121
|
-
marginInlineEnd: {
|
|
122
|
-
base: rem(-56),
|
|
123
|
-
tablet: "-64"
|
|
124
|
-
},
|
|
125
|
-
marginInlineStart: {
|
|
126
|
-
base: "-8",
|
|
127
|
-
tablet: "-16"
|
|
128
|
-
}
|
|
129
|
-
}
|
|
116
|
+
"& :has(> [role=tablist])": { marginInline: {
|
|
117
|
+
base: "-8",
|
|
118
|
+
tablet: "-16"
|
|
119
|
+
} }
|
|
130
120
|
}
|
|
131
121
|
},
|
|
132
122
|
floating: {
|
|
@@ -134,7 +124,7 @@ var drawerSlotRecipe = defineSlotRecipe({
|
|
|
134
124
|
paddingBlockEnd: "24",
|
|
135
125
|
paddingBlockStart: "8",
|
|
136
126
|
paddingInline: "24",
|
|
137
|
-
"
|
|
127
|
+
".chakra-drawer__header:has([role=tablist]) ~ &": { paddingBlockStart: "24" }
|
|
138
128
|
},
|
|
139
129
|
closeTrigger: {
|
|
140
130
|
height: "32",
|
|
@@ -153,11 +143,7 @@ var drawerSlotRecipe = defineSlotRecipe({
|
|
|
153
143
|
paddingBlockEnd: "16",
|
|
154
144
|
paddingBlockStart: "24",
|
|
155
145
|
paddingInline: "24",
|
|
156
|
-
|
|
157
|
-
"& :has(> [role=tablist])": {
|
|
158
|
-
marginInlineEnd: "-64",
|
|
159
|
-
marginInlineStart: "-16"
|
|
160
|
-
}
|
|
146
|
+
"& :has(> [role=tablist])": { marginInline: "-16" }
|
|
161
147
|
},
|
|
162
148
|
footer: {
|
|
163
149
|
borderBlockStartColor: "transparent",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.recipe.js","names":[],"sources":["../../../lib/theme/slot-recipes/Drawer.recipe.ts"],"sourcesContent":["import { drawerAnatomy } from '@chakra-ui/react/anatomy';\nimport { defineSlotRecipe } from '@chakra-ui/react/styled-system';\n\nimport { rem } from '../themeUtils';\n\nconst drawerSlotRecipe = defineSlotRecipe({\n className: 'drawer',\n slots: drawerAnatomy.keys(),\n base: {\n backdrop: {\n background: 'utilities/overlay-light',\n inset: 0,\n position: 'fixed',\n zIndex: 'calc({zIndex.dialogOverlay} + var(--layer-index, 0))',\n _open: {\n animationName: 'fade-in',\n animationDuration: 'slow',\n },\n _closed: {\n animationName: 'fade-out',\n animationDuration: 'moderate',\n },\n },\n positioner: {\n alignItems: 'stretch',\n display: 'flex',\n inset: 0,\n justifyContent: 'flex-end',\n overscrollBehaviorY: 'none',\n
|
|
1
|
+
{"version":3,"file":"Drawer.recipe.js","names":[],"sources":["../../../lib/theme/slot-recipes/Drawer.recipe.ts"],"sourcesContent":["import { drawerAnatomy } from '@chakra-ui/react/anatomy';\nimport { defineSlotRecipe } from '@chakra-ui/react/styled-system';\n\nimport { rem } from '../themeUtils';\n\nconst drawerSlotRecipe = defineSlotRecipe({\n className: 'drawer',\n slots: drawerAnatomy.keys(),\n base: {\n backdrop: {\n background: 'utilities/overlay-light',\n inset: 0,\n position: 'fixed',\n zIndex: 'calc({zIndex.dialogOverlay} + var(--layer-index, 0))',\n _open: {\n animationName: 'fade-in',\n animationDuration: 'slow',\n },\n _closed: {\n animationName: 'fade-out',\n animationDuration: 'moderate',\n },\n },\n positioner: {\n alignItems: 'stretch',\n display: 'flex',\n inset: 0,\n justifyContent: 'flex-end',\n overscrollBehaviorY: 'none',\n position: 'fixed',\n zIndex: 'calc({zIndex.dialog} + var(--layer-index, 0))',\n },\n content: {\n background: 'background/primary',\n display: 'flex',\n flexDirection: 'column',\n maxHeight: '100dvh',\n outline: 'none',\n position: 'relative',\n _open: {\n animationDuration: 'slowest',\n animationName: {\n base: 'slide-from-right-full, fade-in',\n _rtl: 'slide-from-left-full, fade-in',\n },\n animationTimingFunction: 'ease-in-smooth',\n },\n _closed: {\n animationDuration: 'slower',\n animationName: {\n base: 'slide-to-right-full, fade-out',\n _rtl: 'slide-to-left-full, fade-out',\n },\n animationTimingFunction: 'ease-in-smooth',\n },\n },\n header: {\n paddingBlockEnd: '8',\n paddingBlockStart: '24',\n paddingInline: '24',\n // A tab list in the header closes it off with its own baseline.\n '&:has([role=tablist])': {\n paddingBlockEnd: 0,\n },\n },\n body: {\n flex: '1',\n overflow: 'auto',\n },\n footer: {\n borderBlockStartColor: 'border/regular',\n borderBlockStartWidth: '1',\n paddingBlock: '12',\n },\n title: {\n color: 'text/tertiary',\n flex: '1',\n // The close button is absolutely positioned, so the title keeps clear of it.\n paddingInlineEnd: '48',\n textStyle: 'heading/h6',\n },\n description: {},\n closeTrigger: {\n alignItems: 'center',\n borderRadius: '4',\n color: 'icon/primary',\n cursor: 'pointer',\n display: 'inline-flex',\n height: '40',\n justifyContent: 'center',\n position: 'absolute',\n width: '40',\n _hover: {\n backgroundColor: 'color/neutral/subtle',\n },\n _active: {\n backgroundColor: 'color/neutral/moderate',\n },\n },\n },\n variants: {\n variant: {\n // One inline padding for header, body and footer, so their content lines up: 16 on mobile, 24 from tablet.\n docked: {\n body: {\n padding: { base: '16', tablet: '24' },\n },\n closeTrigger: {\n insetEnd: rem(18),\n top: '12',\n },\n content: {\n width: { base: '100vw', tablet: rem(320) },\n },\n footer: {\n paddingInline: { base: '16', tablet: '24' },\n },\n header: {\n paddingInline: { base: '16', tablet: '24' },\n // Tabs sit 8px from the edge, so their baseline runs nearly full width.\n '& :has(> [role=tablist])': {\n marginInline: { base: '-8', tablet: '-16' },\n },\n },\n },\n floating: {\n body: {\n // The bottom 24 is the body's, not the footer's, so a drawer without a footer still ends on it.\n paddingBlockEnd: '24',\n paddingBlockStart: '8',\n paddingInline: '24',\n '.chakra-drawer__header:has([role=tablist]) ~ &': {\n paddingBlockStart: '24',\n },\n },\n closeTrigger: {\n height: '32',\n insetEnd: '20',\n top: '20',\n width: '32',\n },\n positioner: {\n padding: '32',\n },\n content: {\n borderRadius: '12',\n boxShadow: 'elevation/lg',\n // A size lifts this cap through the variable, which also reaches a responsive `variant`'s tablet-scoped rule.\n maxWidth: `var(--drawer-floating-max-width, ${rem(700)})`,\n // 480 is the floating drawer's smallest step, so xxs and xs land on it too; on narrow screens it gives way to the viewport.\n minWidth: `min(100%, ${rem(480)})`,\n },\n header: {\n paddingBlockEnd: '16',\n paddingBlockStart: '24',\n paddingInline: '24',\n '& :has(> [role=tablist])': {\n marginInline: '-16',\n },\n },\n footer: {\n borderBlockStartColor: 'transparent',\n borderBlockStartWidth: 0,\n paddingBlockEnd: '24',\n // With the body's bottom 24, the gap above the footer stays 32.\n paddingBlockStart: '8',\n paddingInline: '24',\n },\n title: {\n color: 'text/primary',\n textStyle: 'heading/h3',\n },\n },\n },\n // Plain variants rather than compounds, so a size also works with a responsive `variant`, which compound variants\n // never match. Widths apply from tablet up; below that the variant's own width stays (docked: full width,\n // floating: sized to content).\n size: {\n xxs: { content: { '--drawer-floating-max-width': '100%', width: { tablet: rem(320) } } },\n xs: { content: { '--drawer-floating-max-width': '100%', width: { tablet: rem(360) } } },\n sm: { content: { '--drawer-floating-max-width': '100%', width: { tablet: rem(480) } } },\n md: { content: { '--drawer-floating-max-width': '100%', width: { tablet: rem(640) } } },\n lg: { content: { '--drawer-floating-max-width': '100%', width: { tablet: rem(800) } } },\n },\n },\n defaultVariants: {\n variant: 'docked',\n },\n});\n\nexport default drawerSlotRecipe;\n"],"mappings":";;;;AAKA,IAAM,mBAAmB,iBAAiB;CACxC,WAAW;CACX,OAAO,cAAc,KAAK;CAC1B,MAAM;EACJ,UAAU;GACR,YAAY;GACZ,OAAO;GACP,UAAU;GACV,QAAQ;GACR,OAAO;IACL,eAAe;IACf,mBAAmB;GACrB;GACA,SAAS;IACP,eAAe;IACf,mBAAmB;GACrB;EACF;EACA,YAAY;GACV,YAAY;GACZ,SAAS;GACT,OAAO;GACP,gBAAgB;GAChB,qBAAqB;GACrB,UAAU;GACV,QAAQ;EACV;EACA,SAAS;GACP,YAAY;GACZ,SAAS;GACT,eAAe;GACf,WAAW;GACX,SAAS;GACT,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,KACX;IACA,SAAS;KACP,cAAc;KACd,WAAW;KAEX,UAAU,oCAAoC,IAAI,GAAG,EAAE;KAEvD,UAAU,aAAa,IAAI,GAAG,EAAE;IAClC;IACA,QAAQ;KACN,iBAAiB;KACjB,mBAAmB;KACnB,eAAe;KACf,4BAA4B,EAC1B,cAAc,MAChB;IACF;IACA,QAAQ;KACN,uBAAuB;KACvB,uBAAuB;KACvB,iBAAiB;KAEjB,mBAAmB;KACnB,eAAe;IACjB;IACA,OAAO;KACL,OAAO;KACP,WAAW;IACb;GACF;EACF;EAIA,MAAM;GACJ,KAAK,EAAE,SAAS;IAAE,+BAA+B;IAAQ,OAAO,EAAE,QAAQ,IAAI,GAAG,EAAE;GAAE,EAAE;GACvF,IAAI,EAAE,SAAS;IAAE,+BAA+B;IAAQ,OAAO,EAAE,QAAQ,IAAI,GAAG,EAAE;GAAE,EAAE;GACtF,IAAI,EAAE,SAAS;IAAE,+BAA+B;IAAQ,OAAO,EAAE,QAAQ,IAAI,GAAG,EAAE;GAAE,EAAE;GACtF,IAAI,EAAE,SAAS;IAAE,+BAA+B;IAAQ,OAAO,EAAE,QAAQ,IAAI,GAAG,EAAE;GAAE,EAAE;GACtF,IAAI,EAAE,SAAS;IAAE,+BAA+B;IAAQ,OAAO,EAAE,QAAQ,IAAI,GAAG,EAAE;GAAE,EAAE;EACxF;CACF;CACA,iBAAiB,EACf,SAAS,SACX;AACF,CAAC"}
|
|
@@ -131,6 +131,7 @@ var tableSlotRecipe = defineSlotRecipe({
|
|
|
131
131
|
} },
|
|
132
132
|
linkedRow: {
|
|
133
133
|
position: "relative",
|
|
134
|
+
transform: "scale(1)",
|
|
134
135
|
_hover: { backgroundColor: "background/secondary" },
|
|
135
136
|
"& :where(a:not([data-link-cell] a), button, input, label, select)": {
|
|
136
137
|
position: "relative",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.recipe.js","names":[],"sources":["../../../lib/theme/slot-recipes/Table.recipe.ts"],"sourcesContent":["import { tableAnatomy } from '@chakra-ui/react/anatomy';\nimport { defineSlotRecipe } from '@chakra-ui/react/styled-system';\n\nimport { rem } from '../themeUtils';\n\n// A control like a checkbox renders as an inline-flex <label>, which sits on the line box's\n// baseline — so the text strut's descender space leaves it a pixel or two above the row's centre.\n// Making it block-level takes the line box out of the equation and lets vertical-align: middle\n// centre it exactly.\nconst controlOnlyCell = {\n '& > :where(label):only-child': {\n display: 'flex',\n },\n};\n\nconst tableSlotRecipe = defineSlotRecipe({\n className: 'table',\n slots: [\n ...tableAnatomy.keys(),\n 'actionsCell',\n 'actionsGroup',\n 'bulkActionsGroup',\n 'bulkActionsButtons',\n 'definitionTrigger',\n 'expandCell',\n 'expandTrigger',\n 'expandableRow',\n 'expandedCell',\n 'expandedContent',\n 'expandedRow',\n 'filterControls',\n 'linkCell',\n 'linkedRow',\n 'sortColumnHeader',\n 'sortTrigger',\n 'utilityCell',\n ],\n base: {\n root: {\n fontVariantNumeric: 'lining-nums tabular-nums',\n textAlign: 'start',\n width: 'full',\n },\n caption: {\n captionSide: 'top !important',\n textAlign: 'start',\n '& > * + *': {\n marginBlockStart: '4',\n },\n },\n cell: {\n textStyle: 'body/md/regular',\n },\n actionsCell: {\n textAlign: 'end',\n whiteSpace: 'nowrap',\n // Shrink-to-fit: a table cell can't go below its content width, so any value under the\n // content's own width collapses the column around the buttons and leaves the rest to\n // the data columns.\n width: '1%',\n },\n actionsGroup: {\n alignItems: 'center',\n display: 'inline-flex',\n gap: '8',\n position: 'relative',\n },\n bulkActionsGroup: {\n alignItems: 'center',\n display: 'flex',\n gap: '12',\n },\n bulkActionsButtons: {\n alignItems: 'center',\n display: 'flex',\n gap: '12',\n marginInlineStart: 'auto',\n },\n // The column header's own `heading/h5` has to survive, so the trigger inherits its type and\n // colour rather than setting them — which is what rules out BitkitDefinitionTooltip in a header,\n // since its recipe always pins a textStyle. The offset is that recipe's own value for 14px type.\n definitionTrigger: {\n color: 'inherit',\n cursor: 'pointer',\n font: 'inherit',\n letterSpacing: 'inherit',\n maxWidth: 'full',\n textDecoration: 'underline dotted',\n textDecorationColor: 'color/neutral/bold',\n textUnderlineOffset: '0.25em',\n _hover: {\n textDecorationColor: 'color/purple/base',\n },\n },\n expandCell: {\n paddingBlock: 0,\n paddingInline: 0,\n verticalAlign: 'middle',\n width: '48',\n },\n // A fixed 32x32 box (per the design), centred in the cell by the cell's own vertical-align.\n // Deriving the size from padding instead leaves it at the mercy of the Collapsible recipe's\n // asymmetric paddingBlockStart, which is what pushed the chevron 2px above the row's centre.\n expandTrigger: {\n alignItems: 'center',\n background: 'none',\n border: 'none',\n cursor: 'pointer',\n display: 'flex',\n height: '32',\n justifyContent: 'center',\n marginInlineStart: '12',\n padding: 0,\n width: '32',\n },\n expandableRow: {\n '& > td': {\n borderBottomWidth: 0,\n },\n },\n expandedCell: {\n height: 0,\n paddingBlock: 0,\n paddingInline: 0,\n },\n expandedContent: {\n borderBlockStartColor: 'border/minimal',\n borderBlockStartStyle: 'solid',\n borderBlockStartWidth: '1',\n marginInlineEnd: '16',\n marginInlineStart: '48',\n paddingBlockEnd: '24',\n paddingBlockStart: '16',\n paddingInlineEnd: '16',\n paddingInlineStart: '12',\n },\n expandedRow: {\n _hover: {\n background: 'none',\n },\n },\n filterControls: {\n alignItems: 'center',\n display: 'flex',\n flexWrap: 'wrap',\n gap: '16',\n width: 'full',\n },\n linkCell: {\n // The link inside is the row's link: its stretched pseudo covers the whole row, so the row\n // becomes the click and focus target.\n '& a': {\n textDecoration: 'none',\n // The row's own background change is the hover affordance; the link recipe's hover\n // underline would fire on every row hover, since the stretched pseudo covers the row.\n _hover: {\n textDecoration: 'none',\n },\n _after: {\n content: '\"\"',\n inset: 0,\n position: 'absolute',\n },\n _focusVisible: {\n outline: 'none',\n _after: {\n outline: 'var(--focus-ring-width) var(--focus-ring-style) var(--focus-ring-color)',\n outlineOffset: 'calc(var(--focus-ring-width) * -1)',\n },\n },\n },\n },\n linkedRow: {\n position: 'relative',\n _hover: {\n backgroundColor: 'background/secondary',\n },\n '& :where(a:not([data-link-cell] a), button, input, label, select)': {\n position: 'relative',\n zIndex: '1',\n },\n },\n sortColumnHeader: {\n paddingBlock: 0,\n paddingInline: 0,\n },\n sortTrigger: {\n alignItems: 'center',\n appearance: 'none',\n background: 'none',\n border: 'none',\n color: 'inherit',\n cursor: 'pointer',\n display: 'flex',\n font: 'inherit',\n gap: '8',\n height: 'full',\n paddingBlock: '12',\n paddingInline: '16',\n userSelect: 'none',\n width: 'full',\n _focusVisible: {\n outlineOffset: '-3px',\n },\n _hover: {\n backgroundColor: 'background/active',\n },\n },\n utilityCell: {\n height: 'auto',\n paddingBlock: '12',\n paddingInline: '16',\n },\n },\n variants: {\n variant: {\n default: {\n root: {\n borderColor: 'border/regular',\n borderRadius: '4',\n borderStyle: 'solid',\n borderWidth: '1',\n overflow: 'hidden',\n },\n header: {\n '& :where(th)': {\n backgroundColor: 'background/tertiary',\n },\n },\n columnHeader: {\n borderBottomColor: 'border/minimal',\n paddingBlock: '12',\n paddingInline: '16',\n },\n cell: {\n borderBottomColor: 'border/minimal',\n borderTopColor: 'border/minimal',\n paddingInline: '16',\n },\n footer: {\n borderTopColor: 'border/minimal',\n },\n },\n borderless: {\n columnHeader: {\n borderBottomColor: 'border/regular',\n padding: '12',\n },\n cell: {\n borderBottomColor: 'border/regular',\n borderTopColor: 'border/regular',\n paddingInline: '12',\n },\n footer: {\n borderTopColor: 'border/regular',\n },\n },\n card: {\n columnHeader: {\n borderBottomColor: 'border/minimal',\n height: '48',\n padding: '12',\n },\n cell: {\n borderBottomColor: 'border/minimal',\n borderTopColor: 'border/minimal',\n paddingInline: '12',\n },\n row: {\n 'thead &, tbody &': {\n '& > :where(td, th):first-child': {\n paddingInlineStart: '24',\n },\n '& > :where(td, th):last-child': {\n paddingInlineEnd: '24',\n },\n },\n },\n footer: {\n borderTopColor: 'border/minimal',\n },\n },\n },\n size: {\n sm: {\n cell: {\n height: '48',\n },\n },\n md: {\n cell: {\n height: rem(56),\n },\n },\n lg: {\n cell: {\n height: '64',\n },\n },\n },\n // Hovering a row tints it. Usually a reading aid on a long or wide table rather than a hint\n // that the row is clickable, so it says nothing about the row being interactive — turn it off\n // for short, static tables where there is no place to lose.\n rowHover: {\n true: {},\n false: {},\n },\n layout: {\n table: {\n root: {\n borderCollapse: 'separate',\n borderSpacing: '0',\n },\n caption: {\n marginBlockEnd: '24',\n },\n columnHeader: {\n borderBottomStyle: 'solid',\n borderBottomWidth: '1',\n color: 'text/primary',\n fontWeight: 'bold',\n textAlign: 'start',\n textStyle: 'heading/h5',\n verticalAlign: 'middle',\n ...controlOnlyCell,\n },\n cell: {\n borderBottomStyle: 'solid',\n borderBottomWidth: '1',\n verticalAlign: 'middle',\n ...controlOnlyCell,\n // border-collapse: separate ignores borders on tfoot itself (CSS 2.1 §17.6.1),\n // so the body/footer divider has to live on the footer's cells.\n // A footer holds one full-width block (pagination, a \"new item\" action) that brings its\n // own padding and height, so the body cell's 16px inset and fixed row height would\n // double up on it.\n 'tfoot &': {\n borderBottomWidth: 0,\n borderTopStyle: 'solid',\n borderTopWidth: '1',\n height: 'auto',\n paddingBlock: 0,\n paddingInline: 0,\n },\n },\n body: {\n '& :where(tr)': {\n '&[data-selected]': {\n backgroundColor: 'background/selected',\n _hover: {\n backgroundColor: 'background/selected',\n },\n },\n },\n '& :where(tr:last-child) td': {\n borderBottomWidth: 0,\n },\n },\n },\n stacked: {\n root: {\n display: 'block',\n },\n caption: {\n display: 'block',\n padding: '16',\n backgroundColor: 'background/secondary',\n borderBottomColor: 'border/minimal',\n borderBottomStyle: 'solid',\n borderBottomWidth: '1',\n },\n header: {\n borderWidth: 0,\n clip: 'rect(0, 0, 0, 0)',\n height: '1',\n margin: '-1px',\n overflow: 'hidden',\n padding: 0,\n position: 'absolute',\n whiteSpace: 'nowrap',\n width: '1',\n },\n body: {\n display: 'block',\n },\n row: {\n borderBottomColor: 'border/minimal',\n borderBottomStyle: 'solid',\n borderBottomWidth: '1',\n display: 'block',\n paddingBlock: '12',\n '&:last-child': {\n borderBottomWidth: 0,\n },\n },\n cell: {\n alignItems: 'center',\n display: 'flex',\n minHeight: '48',\n paddingInline: '16',\n _before: {\n alignSelf: 'center',\n color: 'text/primary',\n content: 'attr(data-label)',\n flexShrink: 0,\n fontWeight: 'semibold',\n marginInlineEnd: '16',\n width: '96',\n },\n 'tfoot &': {\n display: 'block',\n paddingInline: 0,\n _before: {\n content: 'none',\n },\n },\n },\n // display: block takes tfoot out of the table model, so a border on it does render here\n footer: {\n borderTopStyle: 'solid',\n borderTopWidth: '1',\n display: 'block',\n },\n },\n },\n },\n compoundVariants: [\n {\n css: {\n row: {\n borderBottomColor: 'border/regular',\n },\n },\n layout: 'stacked',\n variant: 'borderless',\n },\n // The card gutter and the 12px cell padding are for the wide layout. Stacked rows are blocks\n // whose cells run vertically, so an inline indent on only the first and last one reads as a\n // misalignment — everything goes back to the stacked layout's own 16px.\n {\n css: {\n cell: {\n paddingInline: '16',\n },\n row: {\n 'thead &, tbody &': {\n '& > :where(td, th):first-child': {\n paddingInlineStart: '16',\n },\n '& > :where(td, th):last-child': {\n paddingInlineEnd: '16',\n },\n },\n },\n },\n layout: 'stacked',\n variant: 'card',\n },\n // The `size` variant pins a fixed cell height (48/56/64px), and it is merged after `layout`\n // regardless of declaration order — so only a compound variant can release it. Stacked cells\n // are flex containers whose content (label gutter + a multi-line value) routinely needs more\n // room than the fixed height, and the stacked `cell` keeps `minHeight: 48` as the floor.\n {\n css: {\n cell: {\n height: 'auto',\n },\n },\n layout: 'stacked',\n },\n // Scoped to `layout: table` because that is where the hover lived before: the stacked layout\n // renders rows as blocks and never tinted them.\n {\n css: {\n body: {\n '& :where(tr)': {\n _hover: {\n backgroundColor: 'background/secondary',\n },\n },\n },\n },\n layout: 'table',\n rowHover: true,\n },\n ],\n defaultVariants: {\n layout: 'table',\n rowHover: true,\n size: 'lg',\n variant: 'default',\n },\n});\n\nexport default tableSlotRecipe;\n"],"mappings":";;;;AASA,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AmB;KACnB,mBAAmB;KACnB,mBAAmB;KACnB,SAAS;KACT,cAAc;KACd,gBAAgB,EACd,mBAAmB,EACrB;IACF;IACA,MAAM;KACJ,YAAY;KACZ,SAAS;KACT,WAAW;KACX,eAAe;KACf,SAAS;MACP,WAAW;MACX,OAAO;MACP,SAAS;MACT,YAAY;MACZ,YAAY;MACZ,iBAAiB;MACjB,OAAO;KACT;KACA,WAAW;MACT,SAAS;MACT,eAAe;MACf,SAAS,EACP,SAAS,OACX;KACF;IACF;IAEA,QAAQ;KACN,gBAAgB;KAChB,gBAAgB;KAChB,SAAS;IACX;GACF;EACF;CACF;CACA,kBAAkB;EAChB;GACE,KAAK,EACH,KAAK,EACH,mBAAmB,iBACrB,EACF;GACA,QAAQ;GACR,SAAS;EACX;EAIA;GACE,KAAK;IACH,MAAM,EACJ,eAAe,KACjB;IACA,KAAK,EACH,oBAAoB;KAClB,kCAAkC,EAChC,oBAAoB,KACtB;KACA,iCAAiC,EAC/B,kBAAkB,KACpB;IACF,EACF;GACF;GACA,QAAQ;GACR,SAAS;EACX;EAKA;GACE,KAAK,EACH,MAAM,EACJ,QAAQ,OACV,EACF;GACA,QAAQ;EACV;EAGA;GACE,KAAK,EACH,MAAM,EACJ,gBAAgB,EACd,QAAQ,EACN,iBAAiB,uBACnB,EACF,EACF,EACF;GACA,QAAQ;GACR,UAAU;EACZ;CACF;CACA,iBAAiB;EACf,QAAQ;EACR,UAAU;EACV,MAAM;EACN,SAAS;CACX;AACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"Table.recipe.js","names":[],"sources":["../../../lib/theme/slot-recipes/Table.recipe.ts"],"sourcesContent":["import { tableAnatomy } from '@chakra-ui/react/anatomy';\nimport { defineSlotRecipe } from '@chakra-ui/react/styled-system';\n\nimport { rem } from '../themeUtils';\n\n// A control like a checkbox renders as an inline-flex <label>, which sits on the line box's\n// baseline — so the text strut's descender space leaves it a pixel or two above the row's centre.\n// Making it block-level takes the line box out of the equation and lets vertical-align: middle\n// centre it exactly.\nconst controlOnlyCell = {\n '& > :where(label):only-child': {\n display: 'flex',\n },\n};\n\nconst tableSlotRecipe = defineSlotRecipe({\n className: 'table',\n slots: [\n ...tableAnatomy.keys(),\n 'actionsCell',\n 'actionsGroup',\n 'bulkActionsGroup',\n 'bulkActionsButtons',\n 'definitionTrigger',\n 'expandCell',\n 'expandTrigger',\n 'expandableRow',\n 'expandedCell',\n 'expandedContent',\n 'expandedRow',\n 'filterControls',\n 'linkCell',\n 'linkedRow',\n 'sortColumnHeader',\n 'sortTrigger',\n 'utilityCell',\n ],\n base: {\n root: {\n fontVariantNumeric: 'lining-nums tabular-nums',\n textAlign: 'start',\n width: 'full',\n },\n caption: {\n captionSide: 'top !important',\n textAlign: 'start',\n '& > * + *': {\n marginBlockStart: '4',\n },\n },\n cell: {\n textStyle: 'body/md/regular',\n },\n actionsCell: {\n textAlign: 'end',\n whiteSpace: 'nowrap',\n // Shrink-to-fit: a table cell can't go below its content width, so any value under the\n // content's own width collapses the column around the buttons and leaves the rest to\n // the data columns.\n width: '1%',\n },\n actionsGroup: {\n alignItems: 'center',\n display: 'inline-flex',\n gap: '8',\n position: 'relative',\n },\n bulkActionsGroup: {\n alignItems: 'center',\n display: 'flex',\n gap: '12',\n },\n bulkActionsButtons: {\n alignItems: 'center',\n display: 'flex',\n gap: '12',\n marginInlineStart: 'auto',\n },\n // The column header's own `heading/h5` has to survive, so the trigger inherits its type and\n // colour rather than setting them — which is what rules out BitkitDefinitionTooltip in a header,\n // since its recipe always pins a textStyle. The offset is that recipe's own value for 14px type.\n definitionTrigger: {\n color: 'inherit',\n cursor: 'pointer',\n font: 'inherit',\n letterSpacing: 'inherit',\n maxWidth: 'full',\n textDecoration: 'underline dotted',\n textDecorationColor: 'color/neutral/bold',\n textUnderlineOffset: '0.25em',\n _hover: {\n textDecorationColor: 'color/purple/base',\n },\n },\n expandCell: {\n paddingBlock: 0,\n paddingInline: 0,\n verticalAlign: 'middle',\n width: '48',\n },\n // A fixed 32x32 box (per the design), centred in the cell by the cell's own vertical-align.\n // Deriving the size from padding instead leaves it at the mercy of the Collapsible recipe's\n // asymmetric paddingBlockStart, which is what pushed the chevron 2px above the row's centre.\n expandTrigger: {\n alignItems: 'center',\n background: 'none',\n border: 'none',\n cursor: 'pointer',\n display: 'flex',\n height: '32',\n justifyContent: 'center',\n marginInlineStart: '12',\n padding: 0,\n width: '32',\n },\n expandableRow: {\n '& > td': {\n borderBottomWidth: 0,\n },\n },\n expandedCell: {\n height: 0,\n paddingBlock: 0,\n paddingInline: 0,\n },\n expandedContent: {\n borderBlockStartColor: 'border/minimal',\n borderBlockStartStyle: 'solid',\n borderBlockStartWidth: '1',\n marginInlineEnd: '16',\n marginInlineStart: '48',\n paddingBlockEnd: '24',\n paddingBlockStart: '16',\n paddingInlineEnd: '16',\n paddingInlineStart: '12',\n },\n expandedRow: {\n _hover: {\n background: 'none',\n },\n },\n filterControls: {\n alignItems: 'center',\n display: 'flex',\n flexWrap: 'wrap',\n gap: '16',\n width: 'full',\n },\n linkCell: {\n // The link inside is the row's link: its stretched pseudo covers the whole row, so the row\n // becomes the click and focus target.\n '& a': {\n textDecoration: 'none',\n // The row's own background change is the hover affordance; the link recipe's hover\n // underline would fire on every row hover, since the stretched pseudo covers the row.\n _hover: {\n textDecoration: 'none',\n },\n _after: {\n content: '\"\"',\n inset: 0,\n position: 'absolute',\n },\n _focusVisible: {\n outline: 'none',\n _after: {\n outline: 'var(--focus-ring-width) var(--focus-ring-style) var(--focus-ring-color)',\n outlineOffset: 'calc(var(--focus-ring-width) * -1)',\n },\n },\n },\n },\n linkedRow: {\n position: 'relative',\n // Safari before 27 ignores `position: relative` on a `<tr>`, so the stretched link covers the\n // whole page and the last row takes every click, even on controls outside the table. A\n // transform makes the row its containing block there (https://bugs.webkit.org/show_bug.cgi?id=240961).\n transform: 'scale(1)',\n _hover: {\n backgroundColor: 'background/secondary',\n },\n '& :where(a:not([data-link-cell] a), button, input, label, select)': {\n position: 'relative',\n zIndex: '1',\n },\n },\n sortColumnHeader: {\n paddingBlock: 0,\n paddingInline: 0,\n },\n sortTrigger: {\n alignItems: 'center',\n appearance: 'none',\n background: 'none',\n border: 'none',\n color: 'inherit',\n cursor: 'pointer',\n display: 'flex',\n font: 'inherit',\n gap: '8',\n height: 'full',\n paddingBlock: '12',\n paddingInline: '16',\n userSelect: 'none',\n width: 'full',\n _focusVisible: {\n outlineOffset: '-3px',\n },\n _hover: {\n backgroundColor: 'background/active',\n },\n },\n utilityCell: {\n height: 'auto',\n paddingBlock: '12',\n paddingInline: '16',\n },\n },\n variants: {\n variant: {\n default: {\n root: {\n borderColor: 'border/regular',\n borderRadius: '4',\n borderStyle: 'solid',\n borderWidth: '1',\n overflow: 'hidden',\n },\n header: {\n '& :where(th)': {\n backgroundColor: 'background/tertiary',\n },\n },\n columnHeader: {\n borderBottomColor: 'border/minimal',\n paddingBlock: '12',\n paddingInline: '16',\n },\n cell: {\n borderBottomColor: 'border/minimal',\n borderTopColor: 'border/minimal',\n paddingInline: '16',\n },\n footer: {\n borderTopColor: 'border/minimal',\n },\n },\n borderless: {\n columnHeader: {\n borderBottomColor: 'border/regular',\n padding: '12',\n },\n cell: {\n borderBottomColor: 'border/regular',\n borderTopColor: 'border/regular',\n paddingInline: '12',\n },\n footer: {\n borderTopColor: 'border/regular',\n },\n },\n card: {\n columnHeader: {\n borderBottomColor: 'border/minimal',\n height: '48',\n padding: '12',\n },\n cell: {\n borderBottomColor: 'border/minimal',\n borderTopColor: 'border/minimal',\n paddingInline: '12',\n },\n row: {\n 'thead &, tbody &': {\n '& > :where(td, th):first-child': {\n paddingInlineStart: '24',\n },\n '& > :where(td, th):last-child': {\n paddingInlineEnd: '24',\n },\n },\n },\n footer: {\n borderTopColor: 'border/minimal',\n },\n },\n },\n size: {\n sm: {\n cell: {\n height: '48',\n },\n },\n md: {\n cell: {\n height: rem(56),\n },\n },\n lg: {\n cell: {\n height: '64',\n },\n },\n },\n // Hovering a row tints it. Usually a reading aid on a long or wide table rather than a hint\n // that the row is clickable, so it says nothing about the row being interactive — turn it off\n // for short, static tables where there is no place to lose.\n rowHover: {\n true: {},\n false: {},\n },\n layout: {\n table: {\n root: {\n borderCollapse: 'separate',\n borderSpacing: '0',\n },\n caption: {\n marginBlockEnd: '24',\n },\n columnHeader: {\n borderBottomStyle: 'solid',\n borderBottomWidth: '1',\n color: 'text/primary',\n fontWeight: 'bold',\n textAlign: 'start',\n textStyle: 'heading/h5',\n verticalAlign: 'middle',\n ...controlOnlyCell,\n },\n cell: {\n borderBottomStyle: 'solid',\n borderBottomWidth: '1',\n verticalAlign: 'middle',\n ...controlOnlyCell,\n // border-collapse: separate ignores borders on tfoot itself (CSS 2.1 §17.6.1),\n // so the body/footer divider has to live on the footer's cells.\n // A footer holds one full-width block (pagination, a \"new item\" action) that brings its\n // own padding and height, so the body cell's 16px inset and fixed row height would\n // double up on it.\n 'tfoot &': {\n borderBottomWidth: 0,\n borderTopStyle: 'solid',\n borderTopWidth: '1',\n height: 'auto',\n paddingBlock: 0,\n paddingInline: 0,\n },\n },\n body: {\n '& :where(tr)': {\n '&[data-selected]': {\n backgroundColor: 'background/selected',\n _hover: {\n backgroundColor: 'background/selected',\n },\n },\n },\n '& :where(tr:last-child) td': {\n borderBottomWidth: 0,\n },\n },\n },\n stacked: {\n root: {\n display: 'block',\n },\n caption: {\n display: 'block',\n padding: '16',\n backgroundColor: 'background/secondary',\n borderBottomColor: 'border/minimal',\n borderBottomStyle: 'solid',\n borderBottomWidth: '1',\n },\n header: {\n borderWidth: 0,\n clip: 'rect(0, 0, 0, 0)',\n height: '1',\n margin: '-1px',\n overflow: 'hidden',\n padding: 0,\n position: 'absolute',\n whiteSpace: 'nowrap',\n width: '1',\n },\n body: {\n display: 'block',\n },\n row: {\n borderBottomColor: 'border/minimal',\n borderBottomStyle: 'solid',\n borderBottomWidth: '1',\n display: 'block',\n paddingBlock: '12',\n '&:last-child': {\n borderBottomWidth: 0,\n },\n },\n cell: {\n alignItems: 'center',\n display: 'flex',\n minHeight: '48',\n paddingInline: '16',\n _before: {\n alignSelf: 'center',\n color: 'text/primary',\n content: 'attr(data-label)',\n flexShrink: 0,\n fontWeight: 'semibold',\n marginInlineEnd: '16',\n width: '96',\n },\n 'tfoot &': {\n display: 'block',\n paddingInline: 0,\n _before: {\n content: 'none',\n },\n },\n },\n // display: block takes tfoot out of the table model, so a border on it does render here\n footer: {\n borderTopStyle: 'solid',\n borderTopWidth: '1',\n display: 'block',\n },\n },\n },\n },\n compoundVariants: [\n {\n css: {\n row: {\n borderBottomColor: 'border/regular',\n },\n },\n layout: 'stacked',\n variant: 'borderless',\n },\n // The card gutter and the 12px cell padding are for the wide layout. Stacked rows are blocks\n // whose cells run vertically, so an inline indent on only the first and last one reads as a\n // misalignment — everything goes back to the stacked layout's own 16px.\n {\n css: {\n cell: {\n paddingInline: '16',\n },\n row: {\n 'thead &, tbody &': {\n '& > :where(td, th):first-child': {\n paddingInlineStart: '16',\n },\n '& > :where(td, th):last-child': {\n paddingInlineEnd: '16',\n },\n },\n },\n },\n layout: 'stacked',\n variant: 'card',\n },\n // The `size` variant pins a fixed cell height (48/56/64px), and it is merged after `layout`\n // regardless of declaration order — so only a compound variant can release it. Stacked cells\n // are flex containers whose content (label gutter + a multi-line value) routinely needs more\n // room than the fixed height, and the stacked `cell` keeps `minHeight: 48` as the floor.\n {\n css: {\n cell: {\n height: 'auto',\n },\n },\n layout: 'stacked',\n },\n // Scoped to `layout: table` because that is where the hover lived before: the stacked layout\n // renders rows as blocks and never tinted them.\n {\n css: {\n body: {\n '& :where(tr)': {\n _hover: {\n backgroundColor: 'background/secondary',\n },\n },\n },\n },\n layout: 'table',\n rowHover: true,\n },\n ],\n defaultVariants: {\n layout: 'table',\n rowHover: true,\n size: 'lg',\n variant: 'default',\n },\n});\n\nexport default tableSlotRecipe;\n"],"mappings":";;;;AASA,IAAM,kBAAkB,EACtB,gCAAgC,EAC9B,SAAS,OACX,EACF;AAEA,IAAM,kBAAkB,iBAA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AgB,EACd,mBAAmB,EACrB;IACF;IACA,MAAM;KACJ,YAAY;KACZ,SAAS;KACT,WAAW;KACX,eAAe;KACf,SAAS;MACP,WAAW;MACX,OAAO;MACP,SAAS;MACT,YAAY;MACZ,YAAY;MACZ,iBAAiB;MACjB,OAAO;KACT;KACA,WAAW;MACT,SAAS;MACT,eAAe;MACf,SAAS,EACP,SAAS,OACX;KACF;IACF;IAEA,QAAQ;KACN,gBAAgB;KAChB,gBAAgB;KAChB,SAAS;IACX;GACF;EACF;CACF;CACA,kBAAkB;EAChB;GACE,KAAK,EACH,KAAK,EACH,mBAAmB,iBACrB,EACF;GACA,QAAQ;GACR,SAAS;EACX;EAIA;GACE,KAAK;IACH,MAAM,EACJ,eAAe,KACjB;IACA,KAAK,EACH,oBAAoB;KAClB,kCAAkC,EAChC,oBAAoB,KACtB;KACA,iCAAiC,EAC/B,kBAAkB,KACpB;IACF,EACF;GACF;GACA,QAAQ;GACR,SAAS;EACX;EAKA;GACE,KAAK,EACH,MAAM,EACJ,QAAQ,OACV,EACF;GACA,QAAQ;EACV;EAGA;GACE,KAAK,EACH,MAAM,EACJ,gBAAgB,EACd,QAAQ,EACN,iBAAiB,uBACnB,EACF,EACF,EACF;GACA,QAAQ;GACR,UAAU;EACZ;CACF;CACA,iBAAiB;EACf,QAAQ;EACR,UAAU;EACV,MAAM;EACN,SAAS;CACX;AACF,CAAC"}
|
|
@@ -934,8 +934,36 @@ declare const slotRecipes: {
|
|
|
934
934
|
};
|
|
935
935
|
}>;
|
|
936
936
|
draggableCard: import('@chakra-ui/react').SlotRecipeDefinition<"content" | "root" | "handle", {
|
|
937
|
-
|
|
938
|
-
|
|
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: {
|
|
939
967
|
root: {
|
|
940
968
|
cursor: "grab";
|
|
941
969
|
_hover: {
|
|
@@ -955,7 +983,7 @@ declare const slotRecipes: {
|
|
|
955
983
|
paddingInlineStart: number;
|
|
956
984
|
};
|
|
957
985
|
};
|
|
958
|
-
|
|
986
|
+
false: {
|
|
959
987
|
root: {
|
|
960
988
|
_hover: {
|
|
961
989
|
borderColor: "border/regular";
|
|
@@ -967,7 +995,6 @@ declare const slotRecipes: {
|
|
|
967
995
|
border: "none";
|
|
968
996
|
cursor: "grab";
|
|
969
997
|
focusVisibleRing: "none";
|
|
970
|
-
touchAction: "none";
|
|
971
998
|
_focusVisible: {
|
|
972
999
|
boxShadow: "inset 0 0 0 var(--focus-ring-width) var(--focus-ring-color)";
|
|
973
1000
|
};
|
|
@@ -986,39 +1013,6 @@ declare const slotRecipes: {
|
|
|
986
1013
|
paddingInlineStart: "8";
|
|
987
1014
|
};
|
|
988
1015
|
};
|
|
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
|
-
};
|
|
1022
1016
|
};
|
|
1023
1017
|
}>;
|
|
1024
1018
|
drawer: import('@chakra-ui/react').SlotRecipeDefinition<"content" | "body" | "footer" | "header" | "title" | "trigger" | "positioner" | "closeTrigger" | "description" | "backdrop", {
|
|
@@ -1051,16 +1045,8 @@ declare const slotRecipes: {
|
|
|
1051
1045
|
base: "16";
|
|
1052
1046
|
tablet: "24";
|
|
1053
1047
|
};
|
|
1054
|
-
paddingInlineEnd: {
|
|
1055
|
-
base: "64";
|
|
1056
|
-
tablet: `${number}rem`;
|
|
1057
|
-
};
|
|
1058
1048
|
'& :has(> [role=tablist])': {
|
|
1059
|
-
|
|
1060
|
-
base: `${number}rem`;
|
|
1061
|
-
tablet: "-64";
|
|
1062
|
-
};
|
|
1063
|
-
marginInlineStart: {
|
|
1049
|
+
marginInline: {
|
|
1064
1050
|
base: "-8";
|
|
1065
1051
|
tablet: "-16";
|
|
1066
1052
|
};
|
|
@@ -1072,7 +1058,7 @@ declare const slotRecipes: {
|
|
|
1072
1058
|
paddingBlockEnd: "24";
|
|
1073
1059
|
paddingBlockStart: "8";
|
|
1074
1060
|
paddingInline: "24";
|
|
1075
|
-
'
|
|
1061
|
+
'.chakra-drawer__header:has([role=tablist]) ~ &': {
|
|
1076
1062
|
paddingBlockStart: "24";
|
|
1077
1063
|
};
|
|
1078
1064
|
};
|
|
@@ -1095,10 +1081,8 @@ declare const slotRecipes: {
|
|
|
1095
1081
|
paddingBlockEnd: "16";
|
|
1096
1082
|
paddingBlockStart: "24";
|
|
1097
1083
|
paddingInline: "24";
|
|
1098
|
-
paddingInlineEnd: `${number}rem`;
|
|
1099
1084
|
'& :has(> [role=tablist])': {
|
|
1100
|
-
|
|
1101
|
-
marginInlineStart: "-16";
|
|
1085
|
+
marginInline: "-16";
|
|
1102
1086
|
};
|
|
1103
1087
|
};
|
|
1104
1088
|
footer: {
|