@bitrise/bitkit-v2 0.3.186 → 0.3.188

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.
Files changed (31) hide show
  1. package/dist/components/BitkitDraggableCard/BitkitDraggableCard.d.ts +37 -0
  2. package/dist/components/BitkitDraggableCard/BitkitDraggableCard.js +62 -0
  3. package/dist/components/BitkitDraggableCard/BitkitDraggableCard.js.map +1 -0
  4. package/dist/components/BitkitLabeledData/BitkitLabeledData.d.ts +16 -0
  5. package/dist/components/BitkitLabeledData/BitkitLabeledData.js +112 -0
  6. package/dist/components/BitkitLabeledData/BitkitLabeledData.js.map +1 -0
  7. package/dist/components/BitkitStat/BitkitStat.d.ts +19 -0
  8. package/dist/components/BitkitStat/BitkitStat.js +166 -0
  9. package/dist/components/BitkitStat/BitkitStat.js.map +1 -0
  10. package/dist/components/index.d.ts +3 -0
  11. package/dist/icons/IconDragHandle.d.ts +8 -0
  12. package/dist/icons/IconDragHandle.js +97 -0
  13. package/dist/icons/IconDragHandle.js.map +1 -0
  14. package/dist/icons/index.d.ts +1 -0
  15. package/dist/main.js +5 -1
  16. package/dist/theme/recipes/DefinitionTooltip.recipe.js +4 -3
  17. package/dist/theme/recipes/DefinitionTooltip.recipe.js.map +1 -1
  18. package/dist/theme/slot-recipes/DraggableCard.recipe.d.ts +83 -0
  19. package/dist/theme/slot-recipes/DraggableCard.recipe.js +133 -0
  20. package/dist/theme/slot-recipes/DraggableCard.recipe.js.map +1 -0
  21. package/dist/theme/slot-recipes/ImageCropper.recipe.d.ts +1 -1
  22. package/dist/theme/slot-recipes/LabeledData.recipe.d.ts +38 -0
  23. package/dist/theme/slot-recipes/LabeledData.recipe.js +64 -0
  24. package/dist/theme/slot-recipes/LabeledData.recipe.js.map +1 -0
  25. package/dist/theme/slot-recipes/Stat.recipe.d.ts +44 -0
  26. package/dist/theme/slot-recipes/Stat.recipe.js +73 -0
  27. package/dist/theme/slot-recipes/Stat.recipe.js.map +1 -0
  28. package/dist/theme/slot-recipes/index.d.ts +163 -1
  29. package/dist/theme/slot-recipes/index.js +6 -0
  30. package/dist/theme/slot-recipes/index.js.map +1 -1
  31. package/package.json +2 -2
@@ -0,0 +1,37 @@
1
+ import { BoxProps } from '@chakra-ui/react/box';
2
+ import { ReactNode, Ref } from 'react';
3
+ export interface BitkitDraggableCardProps extends Omit<BoxProps, 'children'> {
4
+ children: ReactNode;
5
+ /** Ref for the drag handle element — pass useSortable().handleRef here. When provided, only the handle initiates drag. */
6
+ handleRef?: Ref<HTMLButtonElement>;
7
+ /** Whether this card is currently being dragged */
8
+ isDragging?: boolean;
9
+ /** Whether this card is a drop target placeholder */
10
+ isDropTarget?: boolean;
11
+ }
12
+ /**
13
+ * A card with a drag handle, designed for use with `@dnd-kit/react`.
14
+ *
15
+ * The component is purely presentational — it does not depend on `@dnd-kit`.
16
+ * Pass the refs and state flags from `useSortable` (or `useDraggable`) to wire it up.
17
+ *
18
+ * @example Full-card drag (default — the entire card is draggable)
19
+ * ```tsx
20
+ * const { ref, isDragSource, isDropTarget } = useSortable({ id, index });
21
+ *
22
+ * <BitkitDraggableCard ref={ref} isDragging={isDragSource} isDropTarget={isDropTarget}>
23
+ * {children}
24
+ * </BitkitDraggableCard>
25
+ * ```
26
+ *
27
+ * @example Handle-only drag (pass handleRef to restrict drag to the handle)
28
+ * ```tsx
29
+ * const { ref, handleRef, isDragSource, isDropTarget } = useSortable({ id, index });
30
+ *
31
+ * <BitkitDraggableCard ref={ref} handleRef={handleRef} isDragging={isDragSource} isDropTarget={isDropTarget}>
32
+ * {children}
33
+ * </BitkitDraggableCard>
34
+ * ```
35
+ */
36
+ declare const BitkitDraggableCard: import('react').ForwardRefExoticComponent<BitkitDraggableCardProps & import('react').RefAttributes<HTMLDivElement>>;
37
+ export default BitkitDraggableCard;
@@ -0,0 +1,62 @@
1
+ import IconDragHandle from "../../icons/IconDragHandle.js";
2
+ import { Box } from "@chakra-ui/react/box";
3
+ import { chakra, useSlotRecipe } from "@chakra-ui/react/styled-system";
4
+ import { forwardRef } from "react";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ //#region lib/components/BitkitDraggableCard/BitkitDraggableCard.tsx
7
+ /**
8
+ * A card with a drag handle, designed for use with `@dnd-kit/react`.
9
+ *
10
+ * The component is purely presentational — it does not depend on `@dnd-kit`.
11
+ * Pass the refs and state flags from `useSortable` (or `useDraggable`) to wire it up.
12
+ *
13
+ * @example Full-card drag (default — the entire card is draggable)
14
+ * ```tsx
15
+ * const { ref, isDragSource, isDropTarget } = useSortable({ id, index });
16
+ *
17
+ * <BitkitDraggableCard ref={ref} isDragging={isDragSource} isDropTarget={isDropTarget}>
18
+ * {children}
19
+ * </BitkitDraggableCard>
20
+ * ```
21
+ *
22
+ * @example Handle-only drag (pass handleRef to restrict drag to the handle)
23
+ * ```tsx
24
+ * const { ref, handleRef, isDragSource, isDropTarget } = useSortable({ id, index });
25
+ *
26
+ * <BitkitDraggableCard ref={ref} handleRef={handleRef} isDragging={isDragSource} isDropTarget={isDropTarget}>
27
+ * {children}
28
+ * </BitkitDraggableCard>
29
+ * ```
30
+ */
31
+ var BitkitDraggableCard = forwardRef((props, ref) => {
32
+ const { children, handleRef, isDragging = false, isDropTarget = false, ...rest } = props;
33
+ const isFullCardDrag = !handleRef;
34
+ const styles = useSlotRecipe({ key: "draggableCard" })({
35
+ isDragging,
36
+ isDropTarget,
37
+ isFullCardDrag
38
+ });
39
+ return /* @__PURE__ */ jsxs(Box, {
40
+ ref,
41
+ css: styles.root,
42
+ ...rest,
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
+ })]
56
+ });
57
+ });
58
+ BitkitDraggableCard.displayName = "BitkitDraggableCard";
59
+ //#endregion
60
+ export { BitkitDraggableCard as default };
61
+
62
+ //# sourceMappingURL=BitkitDraggableCard.js.map
@@ -0,0 +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 { 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, 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} {...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,WAAW,aAAa,OAAO,eAAe,OAAO,GAAG,SAAS;CAEnF,MAAM,iBAAiB,CAAC;CAExB,MAAM,SADS,cAAc,EAAE,KAAK,iBAAiB,CAAC,CAChC;EAAE;EAAY;EAAc;EAAgB,CAAC;AAEnE,QACE,qBAAC,KAAD;EAAU;EAAK,KAAK,OAAO;EAAM,GAAI;YAArC,CACG,iBACC,oBAAC,OAAO,KAAR;GAAY,KAAK,OAAO;aACtB,oBAAC,gBAAD,EAAgB,MAAK,MAAO,CAAA;GACjB,CAAA,GAEb,oBAAC,OAAO,QAAR;GAAe,KAAK;GAAW,MAAK;GAAS,cAAW;GAAc,KAAK,OAAO;aAChF,oBAAC,gBAAD,EAAgB,MAAK,MAAO,CAAA;GACd,CAAA,EAElB,oBAAC,KAAD;GAAK,KAAK,OAAO;GAAU;GAAe,CAAA,CACtC;;EAER;AAEF,oBAAoB,cAAc"}
@@ -0,0 +1,16 @@
1
+ import { BoxProps } from '@chakra-ui/react/box';
2
+ export interface BitkitLabeledDataProps extends Omit<BoxProps, 'colorPalette'> {
3
+ label: string;
4
+ labelVariant?: 'primary' | 'secondary';
5
+ limitValue?: string;
6
+ showWarning?: boolean;
7
+ size?: 'lg' | '2xl' | '3xl' | 'sm' | 'md';
8
+ state?: 'default' | 'skeleton';
9
+ subtext?: string;
10
+ tooltip?: string;
11
+ tooltipAnchor?: 'label' | 'value';
12
+ value?: string;
13
+ variant?: 'default' | 'inline';
14
+ }
15
+ declare const BitkitLabeledData: import('react').ForwardRefExoticComponent<BitkitLabeledDataProps & import('react').RefAttributes<HTMLElement>>;
16
+ export default BitkitLabeledData;
@@ -0,0 +1,112 @@
1
+ import IconInfoCircle from "../../icons/IconInfoCircle.js";
2
+ import IconWarningYellow from "../../icons/IconWarningYellow.js";
3
+ import BitkitTooltip from "../BitkitTooltip/BitkitTooltip.js";
4
+ import BitkitDefinitionTooltip from "../BitkitDefinitionTooltip/BitkitDefinitionTooltip.js";
5
+ import { chakra, useSlotRecipe } from "@chakra-ui/react/styled-system";
6
+ import { forwardRef } from "react";
7
+ import { jsx, jsxs } from "react/jsx-runtime";
8
+ import { Skeleton } from "@chakra-ui/react/skeleton";
9
+ //#region lib/components/BitkitLabeledData/BitkitLabeledData.tsx
10
+ var SKELETON_VALUE_HEIGHTS = {
11
+ lg: "24",
12
+ "2xl": "36px",
13
+ "3xl": "40"
14
+ };
15
+ var BitkitLabeledData = forwardRef((props, ref) => {
16
+ const { label, labelVariant = "primary", limitValue, showWarning, size = "lg", state = "default", subtext, tooltip, tooltipAnchor = "value", value, variant = "default", ...rest } = props;
17
+ const styles = useSlotRecipe({ key: "labeledData" })({ size: variant === "inline" ? void 0 : size });
18
+ if (variant === "inline") {
19
+ const isSm = size === "sm";
20
+ const isPrimary = labelVariant === "primary";
21
+ const labelTextStyle = isPrimary ? isSm ? "body/sm/semibold" : "body/md/semibold" : isSm ? "body/sm/regular" : "body/md/regular";
22
+ if (state === "skeleton") return /* @__PURE__ */ jsxs(chakra.div, {
23
+ ref,
24
+ display: "flex",
25
+ alignItems: "center",
26
+ gap: isSm ? "4" : "8",
27
+ ...rest,
28
+ children: [/* @__PURE__ */ jsx(chakra.span, {
29
+ textStyle: labelTextStyle,
30
+ color: isPrimary ? "text/primary" : "text/secondary",
31
+ children: label
32
+ }), /* @__PURE__ */ jsx(Skeleton, {
33
+ height: isSm ? "16" : "20",
34
+ width: "64"
35
+ })]
36
+ });
37
+ const wrapWithTooltip = (text, anchor) => tooltip && tooltipAnchor === anchor ? /* @__PURE__ */ jsx(BitkitDefinitionTooltip, {
38
+ text: tooltip,
39
+ children: text
40
+ }) : text;
41
+ return /* @__PURE__ */ jsxs(chakra.div, {
42
+ ref,
43
+ display: "flex",
44
+ alignItems: "center",
45
+ gap: isSm ? "4" : "8",
46
+ ...rest,
47
+ children: [
48
+ !!showWarning && /* @__PURE__ */ jsx(IconWarningYellow, { size: "16" }),
49
+ /* @__PURE__ */ jsx(chakra.span, {
50
+ textStyle: labelTextStyle,
51
+ color: isPrimary ? "text/primary" : "text/secondary",
52
+ children: wrapWithTooltip(label, "label")
53
+ }),
54
+ /* @__PURE__ */ jsx(chakra.span, {
55
+ textStyle: isSm ? "body/sm/regular" : "body/md/regular",
56
+ color: "text/body",
57
+ children: wrapWithTooltip(value ?? "", "value")
58
+ })
59
+ ]
60
+ });
61
+ }
62
+ const labelContent = /* @__PURE__ */ jsxs(chakra.dt, {
63
+ css: styles.label,
64
+ children: [label, !!tooltip && /* @__PURE__ */ jsx(BitkitTooltip, {
65
+ text: tooltip,
66
+ children: /* @__PURE__ */ jsx(IconInfoCircle, {
67
+ size: "16",
68
+ color: "icon/tertiary"
69
+ })
70
+ })]
71
+ });
72
+ if (state === "skeleton") return /* @__PURE__ */ jsxs(chakra.dl, {
73
+ css: styles.root,
74
+ ref,
75
+ ...rest,
76
+ children: [
77
+ labelContent,
78
+ /* @__PURE__ */ jsx(Skeleton, {
79
+ height: SKELETON_VALUE_HEIGHTS[size],
80
+ width: "128"
81
+ }),
82
+ /* @__PURE__ */ jsx(Skeleton, {
83
+ height: "20",
84
+ width: "128"
85
+ })
86
+ ]
87
+ });
88
+ return /* @__PURE__ */ jsxs(chakra.dl, {
89
+ css: styles.root,
90
+ ref,
91
+ ...rest,
92
+ children: [
93
+ labelContent,
94
+ /* @__PURE__ */ jsxs(chakra.dd, {
95
+ css: styles.value,
96
+ children: [value, !!limitValue && /* @__PURE__ */ jsxs(chakra.span, {
97
+ css: styles.limit,
98
+ children: ["/ ", limitValue]
99
+ })]
100
+ }),
101
+ !!subtext && /* @__PURE__ */ jsx(chakra.dd, {
102
+ css: styles.helpText,
103
+ children: subtext
104
+ })
105
+ ]
106
+ });
107
+ });
108
+ BitkitLabeledData.displayName = "BitkitLabeledData";
109
+ //#endregion
110
+ export { BitkitLabeledData as default };
111
+
112
+ //# sourceMappingURL=BitkitLabeledData.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BitkitLabeledData.js","names":[],"sources":["../../../lib/components/BitkitLabeledData/BitkitLabeledData.tsx"],"sourcesContent":["import { type BoxProps } from '@chakra-ui/react/box';\nimport { Skeleton } from '@chakra-ui/react/skeleton';\nimport { chakra, useSlotRecipe } from '@chakra-ui/react/styled-system';\nimport { forwardRef } from 'react';\n\nimport { IconInfoCircle, IconWarningYellow } from '../../icons';\nimport BitkitDefinitionTooltip from '../BitkitDefinitionTooltip/BitkitDefinitionTooltip';\nimport BitkitTooltip from '../BitkitTooltip/BitkitTooltip';\n\n// --- Types ---\n\nexport interface BitkitLabeledDataProps extends Omit<BoxProps, 'colorPalette'> {\n label: string;\n labelVariant?: 'primary' | 'secondary';\n limitValue?: string;\n showWarning?: boolean;\n size?: 'lg' | '2xl' | '3xl' | 'sm' | 'md';\n state?: 'default' | 'skeleton';\n subtext?: string;\n tooltip?: string;\n tooltipAnchor?: 'label' | 'value';\n value?: string;\n variant?: 'default' | 'inline';\n}\n\nconst SKELETON_VALUE_HEIGHTS = { lg: '24', '2xl': '36px', '3xl': '40' } as const;\n\n// --- Component ---\n\nconst BitkitLabeledData = forwardRef<HTMLElement, BitkitLabeledDataProps>((props, ref) => {\n const {\n label,\n labelVariant = 'primary',\n limitValue,\n showWarning,\n size = 'lg',\n state = 'default',\n subtext,\n tooltip,\n tooltipAnchor = 'value',\n value,\n variant = 'default',\n ...rest\n } = props;\n\n const styles = useSlotRecipe({ key: 'labeledData' })({\n size: variant === 'inline' ? undefined : (size as 'lg' | '2xl' | '3xl'),\n });\n\n // --- Inline variant ---\n if (variant === 'inline') {\n const isSm = size === 'sm';\n const isPrimary = labelVariant === 'primary';\n const labelTextStyle = isPrimary\n ? isSm\n ? 'body/sm/semibold'\n : 'body/md/semibold'\n : isSm\n ? 'body/sm/regular'\n : 'body/md/regular';\n\n if (state === 'skeleton') {\n return (\n <chakra.div ref={ref} display=\"flex\" alignItems=\"center\" gap={isSm ? '4' : '8'} {...rest}>\n <chakra.span textStyle={labelTextStyle} color={isPrimary ? 'text/primary' : 'text/secondary'}>\n {label}\n </chakra.span>\n <Skeleton height={isSm ? '16' : '20'} width=\"64\" />\n </chakra.div>\n );\n }\n\n const wrapWithTooltip = (text: string, anchor: 'label' | 'value') =>\n tooltip && tooltipAnchor === anchor ? (\n <BitkitDefinitionTooltip text={tooltip}>{text}</BitkitDefinitionTooltip>\n ) : (\n text\n );\n\n return (\n <chakra.div ref={ref} display=\"flex\" alignItems=\"center\" gap={isSm ? '4' : '8'} {...rest}>\n {!!showWarning && <IconWarningYellow size=\"16\" />}\n <chakra.span textStyle={labelTextStyle} color={isPrimary ? 'text/primary' : 'text/secondary'}>\n {wrapWithTooltip(label, 'label')}\n </chakra.span>\n <chakra.span textStyle={isSm ? 'body/sm/regular' : 'body/md/regular'} color=\"text/body\">\n {wrapWithTooltip(value ?? '', 'value')}\n </chakra.span>\n </chakra.div>\n );\n }\n\n // --- Default variant ---\n\n const labelContent = (\n <chakra.dt css={styles.label}>\n {label}\n {!!tooltip && (\n <BitkitTooltip text={tooltip}>\n <IconInfoCircle size=\"16\" color=\"icon/tertiary\" />\n </BitkitTooltip>\n )}\n </chakra.dt>\n );\n\n if (state === 'skeleton') {\n return (\n <chakra.dl css={styles.root} ref={ref} {...(rest as Record<string, unknown>)}>\n {labelContent}\n <Skeleton height={SKELETON_VALUE_HEIGHTS[size as keyof typeof SKELETON_VALUE_HEIGHTS]} width=\"128\" />\n <Skeleton height=\"20\" width=\"128\" />\n </chakra.dl>\n );\n }\n\n return (\n <chakra.dl css={styles.root} ref={ref} {...(rest as Record<string, unknown>)}>\n {labelContent}\n <chakra.dd css={styles.value}>\n {value}\n {!!limitValue && <chakra.span css={styles.limit}>/ {limitValue}</chakra.span>}\n </chakra.dd>\n {!!subtext && <chakra.dd css={styles.helpText}>{subtext}</chakra.dd>}\n </chakra.dl>\n );\n});\n\nBitkitLabeledData.displayName = 'BitkitLabeledData';\n\nexport default BitkitLabeledData;\n"],"mappings":";;;;;;;;;AAyBA,IAAM,yBAAyB;CAAE,IAAI;CAAM,OAAO;CAAQ,OAAO;CAAM;AAIvE,IAAM,oBAAoB,YAAiD,OAAO,QAAQ;CACxF,MAAM,EACJ,OACA,eAAe,WACf,YACA,aACA,OAAO,MACP,QAAQ,WACR,SACA,SACA,gBAAgB,SAChB,OACA,UAAU,WACV,GAAG,SACD;CAEJ,MAAM,SAAS,cAAc,EAAE,KAAK,eAAe,CAAC,CAAC,EACnD,MAAM,YAAY,WAAW,KAAA,IAAa,MAC3C,CAAC;AAGF,KAAI,YAAY,UAAU;EACxB,MAAM,OAAO,SAAS;EACtB,MAAM,YAAY,iBAAiB;EACnC,MAAM,iBAAiB,YACnB,OACE,qBACA,qBACF,OACE,oBACA;AAEN,MAAI,UAAU,WACZ,QACE,qBAAC,OAAO,KAAR;GAAiB;GAAK,SAAQ;GAAO,YAAW;GAAS,KAAK,OAAO,MAAM;GAAK,GAAI;aAApF,CACE,oBAAC,OAAO,MAAR;IAAa,WAAW;IAAgB,OAAO,YAAY,iBAAiB;cACzE;IACW,CAAA,EACd,oBAAC,UAAD;IAAU,QAAQ,OAAO,OAAO;IAAM,OAAM;IAAO,CAAA,CAC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GAC1D;;EAEd;AAEF,kBAAkB,cAAc"}
@@ -0,0 +1,19 @@
1
+ import { BoxProps } from '@chakra-ui/react/box';
2
+ export type TrendColor = 'positive' | 'negative' | 'neutral';
3
+ export type TrendDirection = 'up' | 'down';
4
+ export type TrendTextPlacement = 'below' | 'inline';
5
+ export interface BitkitStatProps extends Omit<BoxProps, 'colorPalette'> {
6
+ label: string;
7
+ size?: 'lg' | '2xl' | '3xl';
8
+ state?: 'default' | 'skeleton';
9
+ subtext?: string;
10
+ tooltip?: string;
11
+ trendColor?: TrendColor;
12
+ trendDirection?: TrendDirection;
13
+ trendText?: string;
14
+ trendTextPlacement?: TrendTextPlacement;
15
+ value?: string;
16
+ variant?: 'default' | 'compact';
17
+ }
18
+ declare const BitkitStat: import('react').ForwardRefExoticComponent<BitkitStatProps & import('react').RefAttributes<HTMLElement>>;
19
+ export default BitkitStat;
@@ -0,0 +1,166 @@
1
+ import IconArrowDown from "../../icons/IconArrowDown.js";
2
+ import IconArrowUp from "../../icons/IconArrowUp.js";
3
+ import IconInfoCircle from "../../icons/IconInfoCircle.js";
4
+ import BitkitTooltip from "../BitkitTooltip/BitkitTooltip.js";
5
+ import { chakra, useSlotRecipe } from "@chakra-ui/react/styled-system";
6
+ import { forwardRef } from "react";
7
+ import { jsx, jsxs } from "react/jsx-runtime";
8
+ import { Skeleton } from "@chakra-ui/react/skeleton";
9
+ //#region lib/components/BitkitStat/BitkitStat.tsx
10
+ var TREND_COLORS = {
11
+ positive: {
12
+ text: "text/positive",
13
+ icon: "icon/positive"
14
+ },
15
+ negative: {
16
+ text: "text/negative",
17
+ icon: "icon/negative"
18
+ },
19
+ neutral: {
20
+ text: "text/secondary",
21
+ icon: "icon/tertiary"
22
+ }
23
+ };
24
+ var TREND_ICONS = {
25
+ up: IconArrowUp,
26
+ down: IconArrowDown
27
+ };
28
+ var DEFAULT_COLORS = {
29
+ up: "positive",
30
+ down: "negative"
31
+ };
32
+ var resolveTrend = (trendColor, trendDirection) => {
33
+ const color = trendColor ?? (trendDirection ? DEFAULT_COLORS[trendDirection] : void 0);
34
+ const colors = color ? TREND_COLORS[color] : void 0;
35
+ return {
36
+ textColor: colors?.text ?? "text/secondary",
37
+ iconColor: colors?.icon ?? "icon/tertiary",
38
+ Icon: trendDirection ? TREND_ICONS[trendDirection] : void 0
39
+ };
40
+ };
41
+ var BELOW_ICON_SIZES = {
42
+ lg: "16",
43
+ "2xl": "24",
44
+ "3xl": "24"
45
+ };
46
+ var INLINE_TREND_STYLES = {
47
+ lg: { paddingBlockStart: "2" },
48
+ "2xl": { paddingBlockStart: "6" },
49
+ "3xl": { paddingBlockEnd: "4" }
50
+ };
51
+ var SKELETON_VALUE_HEIGHTS = {
52
+ lg: "24",
53
+ "2xl": "36px",
54
+ "3xl": "40"
55
+ };
56
+ var BitkitStat = forwardRef((props, ref) => {
57
+ const { label, size = "lg", state = "default", subtext, tooltip, trendColor, trendDirection, trendText, trendTextPlacement = "below", value, variant = "default", ...rest } = props;
58
+ const styles = useSlotRecipe({ key: "stat" })({
59
+ size,
60
+ variant
61
+ });
62
+ const trend = resolveTrend(trendColor, trendDirection);
63
+ const { Icon: TrendIcon } = trend;
64
+ if (variant === "compact") {
65
+ if (state === "skeleton") return /* @__PURE__ */ jsxs(chakra.div, {
66
+ css: styles.root,
67
+ ref,
68
+ ...rest,
69
+ children: [/* @__PURE__ */ jsx(Skeleton, {
70
+ height: "20",
71
+ width: "64"
72
+ }), /* @__PURE__ */ jsx(Skeleton, {
73
+ height: "16",
74
+ width: "48"
75
+ })]
76
+ });
77
+ return /* @__PURE__ */ jsxs(chakra.div, {
78
+ css: styles.root,
79
+ ref,
80
+ ...rest,
81
+ children: [/* @__PURE__ */ jsxs(chakra.span, {
82
+ css: styles.value,
83
+ children: [!!TrendIcon && /* @__PURE__ */ jsx(TrendIcon, {
84
+ size: "16",
85
+ color: trend.iconColor
86
+ }), value]
87
+ }), !!trendText && /* @__PURE__ */ jsx(chakra.span, {
88
+ css: styles.helpText,
89
+ color: trend.textColor,
90
+ children: trendText
91
+ })]
92
+ });
93
+ }
94
+ const labelContent = /* @__PURE__ */ jsxs(chakra.dt, {
95
+ css: styles.label,
96
+ children: [label, !!tooltip && /* @__PURE__ */ jsx(BitkitTooltip, {
97
+ text: tooltip,
98
+ children: /* @__PURE__ */ jsx(IconInfoCircle, {
99
+ size: "16",
100
+ color: "icon/tertiary"
101
+ })
102
+ })]
103
+ });
104
+ if (state === "skeleton") return /* @__PURE__ */ jsxs(chakra.dl, {
105
+ css: styles.root,
106
+ ref,
107
+ ...rest,
108
+ children: [
109
+ labelContent,
110
+ /* @__PURE__ */ jsx(Skeleton, {
111
+ height: SKELETON_VALUE_HEIGHTS[size],
112
+ width: "128"
113
+ }),
114
+ /* @__PURE__ */ jsx(Skeleton, {
115
+ height: "20",
116
+ width: "128"
117
+ })
118
+ ]
119
+ });
120
+ const isInline = trendTextPlacement === "inline";
121
+ const showHelpText = !isInline && !!trendText || !!subtext;
122
+ return /* @__PURE__ */ jsxs(chakra.dl, {
123
+ css: styles.root,
124
+ ref,
125
+ ...rest,
126
+ children: [
127
+ labelContent,
128
+ /* @__PURE__ */ jsxs(chakra.dd, {
129
+ css: styles.value,
130
+ alignItems: isInline && size === "3xl" ? "flex-end" : void 0,
131
+ children: [value, isInline ? /* @__PURE__ */ jsxs(chakra.span, {
132
+ display: "inline-flex",
133
+ gap: "4",
134
+ alignItems: "center",
135
+ css: INLINE_TREND_STYLES[size],
136
+ children: [!!TrendIcon && /* @__PURE__ */ jsx(TrendIcon, {
137
+ size: "16",
138
+ color: trend.iconColor
139
+ }), !!trendText && /* @__PURE__ */ jsx(chakra.span, {
140
+ color: trend.textColor,
141
+ textStyle: "body/md/regular",
142
+ children: trendText
143
+ })]
144
+ }) : !!TrendIcon && /* @__PURE__ */ jsx(TrendIcon, {
145
+ size: BELOW_ICON_SIZES[size],
146
+ color: trend.iconColor
147
+ })]
148
+ }),
149
+ showHelpText && /* @__PURE__ */ jsxs(chakra.dd, {
150
+ css: styles.helpText,
151
+ children: [!isInline && !!trendText && /* @__PURE__ */ jsx(chakra.span, {
152
+ color: trend.textColor,
153
+ children: trendText
154
+ }), !!subtext && /* @__PURE__ */ jsx(chakra.span, {
155
+ color: "text/tertiary",
156
+ children: subtext
157
+ })]
158
+ })
159
+ ]
160
+ });
161
+ });
162
+ BitkitStat.displayName = "BitkitStat";
163
+ //#endregion
164
+ export { BitkitStat as default };
165
+
166
+ //# sourceMappingURL=BitkitStat.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BitkitStat.js","names":[],"sources":["../../../lib/components/BitkitStat/BitkitStat.tsx"],"sourcesContent":["import { type BoxProps } from '@chakra-ui/react/box';\nimport { Skeleton } from '@chakra-ui/react/skeleton';\nimport { chakra, useSlotRecipe } from '@chakra-ui/react/styled-system';\nimport { forwardRef } from 'react';\n\nimport { IconArrowDown, IconArrowUp, IconInfoCircle } from '../../icons';\nimport BitkitTooltip from '../BitkitTooltip/BitkitTooltip';\n\n// --- Types ---\n\nexport type TrendColor = 'positive' | 'negative' | 'neutral';\nexport type TrendDirection = 'up' | 'down';\nexport type TrendTextPlacement = 'below' | 'inline';\n\nconst TREND_COLORS = {\n positive: { text: 'text/positive', icon: 'icon/positive' },\n negative: { text: 'text/negative', icon: 'icon/negative' },\n neutral: { text: 'text/secondary', icon: 'icon/tertiary' },\n} as const;\n\nconst TREND_ICONS = { up: IconArrowUp, down: IconArrowDown } as const;\nconst DEFAULT_COLORS: Record<TrendDirection, TrendColor> = { up: 'positive', down: 'negative' };\n\nconst resolveTrend = (trendColor?: TrendColor, trendDirection?: TrendDirection) => {\n const color = trendColor ?? (trendDirection ? DEFAULT_COLORS[trendDirection] : undefined);\n const colors = color ? TREND_COLORS[color] : undefined;\n return {\n textColor: colors?.text ?? 'text/secondary',\n iconColor: colors?.icon ?? 'icon/tertiary',\n Icon: trendDirection ? TREND_ICONS[trendDirection] : undefined,\n };\n};\n\nconst BELOW_ICON_SIZES = { lg: '16', '2xl': '24', '3xl': '24' } as const;\nconst INLINE_TREND_STYLES = {\n lg: { paddingBlockStart: '2' },\n '2xl': { paddingBlockStart: '6' },\n '3xl': { paddingBlockEnd: '4' },\n} as const;\nconst SKELETON_VALUE_HEIGHTS = { lg: '24', '2xl': '36px', '3xl': '40' } as const;\n\nexport interface BitkitStatProps extends Omit<BoxProps, 'colorPalette'> {\n label: string;\n size?: 'lg' | '2xl' | '3xl';\n state?: 'default' | 'skeleton';\n subtext?: string;\n tooltip?: string;\n trendColor?: TrendColor;\n trendDirection?: TrendDirection;\n trendText?: string;\n trendTextPlacement?: TrendTextPlacement;\n value?: string;\n variant?: 'default' | 'compact';\n}\n\n// --- Component ---\n\nconst BitkitStat = forwardRef<HTMLElement, BitkitStatProps>((props, ref) => {\n const {\n label,\n size = 'lg',\n state = 'default',\n subtext,\n tooltip,\n trendColor,\n trendDirection,\n trendText,\n trendTextPlacement = 'below',\n value,\n variant = 'default',\n ...rest\n } = props;\n\n const styles = useSlotRecipe({ key: 'stat' })({ size, variant });\n const trend = resolveTrend(trendColor, trendDirection);\n const { Icon: TrendIcon } = trend;\n const isCompact = variant === 'compact';\n\n // --- Compact ---\n if (isCompact) {\n if (state === 'skeleton') {\n return (\n <chakra.div css={styles.root} ref={ref} {...(rest as Record<string, unknown>)}>\n <Skeleton height=\"20\" width=\"64\" />\n <Skeleton height=\"16\" width=\"48\" />\n </chakra.div>\n );\n }\n\n return (\n <chakra.div css={styles.root} ref={ref} {...(rest as Record<string, unknown>)}>\n <chakra.span css={styles.value}>\n {!!TrendIcon && <TrendIcon size=\"16\" color={trend.iconColor} />}\n {value}\n </chakra.span>\n {!!trendText && (\n <chakra.span css={styles.helpText} color={trend.textColor}>\n {trendText}\n </chakra.span>\n )}\n </chakra.div>\n );\n }\n\n // --- Default ---\n\n const labelContent = (\n <chakra.dt css={styles.label}>\n {label}\n {!!tooltip && (\n <BitkitTooltip text={tooltip}>\n <IconInfoCircle size=\"16\" color=\"icon/tertiary\" />\n </BitkitTooltip>\n )}\n </chakra.dt>\n );\n\n if (state === 'skeleton') {\n return (\n <chakra.dl css={styles.root} ref={ref} {...(rest as Record<string, unknown>)}>\n {labelContent}\n <Skeleton height={SKELETON_VALUE_HEIGHTS[size]} width=\"128\" />\n <Skeleton height=\"20\" width=\"128\" />\n </chakra.dl>\n );\n }\n\n const isInline = trendTextPlacement === 'inline';\n const showHelpText = (!isInline && !!trendText) || !!subtext;\n\n return (\n <chakra.dl css={styles.root} ref={ref} {...(rest as Record<string, unknown>)}>\n {labelContent}\n\n <chakra.dd css={styles.value} alignItems={isInline && size === '3xl' ? 'flex-end' : undefined}>\n {value}\n {isInline ? (\n <chakra.span display=\"inline-flex\" gap=\"4\" alignItems=\"center\" css={INLINE_TREND_STYLES[size]}>\n {!!TrendIcon && <TrendIcon size=\"16\" color={trend.iconColor} />}\n {!!trendText && (\n <chakra.span color={trend.textColor} textStyle=\"body/md/regular\">\n {trendText}\n </chakra.span>\n )}\n </chakra.span>\n ) : (\n !!TrendIcon && <TrendIcon size={BELOW_ICON_SIZES[size]} color={trend.iconColor} />\n )}\n </chakra.dd>\n\n {showHelpText && (\n <chakra.dd css={styles.helpText}>\n {!isInline && !!trendText && <chakra.span color={trend.textColor}>{trendText}</chakra.span>}\n {!!subtext && <chakra.span color=\"text/tertiary\">{subtext}</chakra.span>}\n </chakra.dd>\n )}\n </chakra.dl>\n );\n});\n\nBitkitStat.displayName = 'BitkitStat';\n\nexport default BitkitStat;\n"],"mappings":";;;;;;;;;AAcA,IAAM,eAAe;CACnB,UAAU;EAAE,MAAM;EAAiB,MAAM;EAAiB;CAC1D,UAAU;EAAE,MAAM;EAAiB,MAAM;EAAiB;CAC1D,SAAS;EAAE,MAAM;EAAkB,MAAM;EAAiB;CAC3D;AAED,IAAM,cAAc;CAAE,IAAI;CAAa,MAAM;CAAe;AAC5D,IAAM,iBAAqD;CAAE,IAAI;CAAY,MAAM;CAAY;AAE/F,IAAM,gBAAgB,YAAyB,mBAAoC;CACjF,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OAAO,MAAR;KAAa,OAAO,MAAM;eAAY;KAAwB,CAAA,EAC1F,CAAC,CAAC,WAAW,oBAAC,OAAO,MAAR;KAAa,OAAM;eAAiB;KAAsB,CAAA,CAC9D;;GAEJ;;EAEd;AAEF,WAAW,cAAc"}
@@ -19,6 +19,7 @@ export { default as BitkitDialog, type BitkitDialogProps } from './BitkitDialog/
19
19
  export { default as BitkitDialogBody, type BitkitDialogBodyProps } from './BitkitDialog/BitkitDialogBody';
20
20
  export { default as BitkitDialogContent, type BitkitDialogContentProps } from './BitkitDialog/BitkitDialogContent';
21
21
  export { default as BitkitDialogRoot, type BitkitDialogRootProps } from './BitkitDialog/BitkitDialogRoot';
22
+ export { default as BitkitDraggableCard, type BitkitDraggableCardProps, } from './BitkitDraggableCard/BitkitDraggableCard';
22
23
  export { default as BitkitEmptyState, type BitkitEmptyStateProps } from './BitkitEmptyState/BitkitEmptyState';
23
24
  export { default as BitkitExpandableCard, type BitkitExpandableCardProps, } from './BitkitExpandableCard/BitkitExpandableCard';
24
25
  export { default as BitkitExplainerList, type BitkitExplainerListItemProps, type BitkitExplainerListProps, } from './BitkitExplainerList/BitkitExplainerList';
@@ -28,6 +29,7 @@ export { default as BitkitGroupHeading, type BitkitGroupHeadingProps } from './B
28
29
  export { default as BitkitIconButton, type BitkitIconButtonProps } from './BitkitIconButton/BitkitIconButton';
29
30
  export { default as BitkitInlineLoading, type BitkitInlineLoadingProps, } from './BitkitInlineLoading/BitkitInlineLoading';
30
31
  export { default as BitkitLabel, type BitkitLabelProps } from './BitkitLabel/BitkitLabel';
32
+ export { default as BitkitLabeledData, type BitkitLabeledDataProps } from './BitkitLabeledData/BitkitLabeledData';
31
33
  export { default as BitkitLabelTooltip, type BitkitLabelTooltipProps } from './BitkitLabelTooltip/BitkitLabelTooltip';
32
34
  export { default as BitkitLink, type BitkitLinkProps } from './BitkitLink/BitkitLink';
33
35
  export { default as BitkitLinkButton, type BitkitLinkButtonProps } from './BitkitLinkButton/BitkitLinkButton';
@@ -49,6 +51,7 @@ export { default as BitkitSelect, type BitkitSelectProps } from './BitkitSelect/
49
51
  export { default as BitkitSelectableTag, type BitkitSelectableTagItemProps, type BitkitSelectableTagProps, } from './BitkitSelectableTag/BitkitSelectableTag';
50
52
  export { default as BitkitSelectMenu, type BitkitSelectMenuProps } from './BitkitSelectMenu/BitkitSelectMenu';
51
53
  export { default as BitkitSplitButton, type BitkitSplitButtonProps } from './BitkitSplitButton/BitkitSplitButton';
54
+ export { default as BitkitStat, type BitkitStatProps, type TrendColor, type TrendDirection, type TrendTextPlacement, } from './BitkitStat/BitkitStat';
52
55
  export { default as BitkitTabs } from './BitkitTabs/BitkitTabs';
53
56
  export { default as BitkitTag, type BitkitTagProps } from './BitkitTag/BitkitTag';
54
57
  export { default as BitkitTagsInput, type BitkitTagsInputProps } from './BitkitTagsInput/BitkitTagsInput';
@@ -0,0 +1,8 @@
1
+ import { IconProps } from '@chakra-ui/react/icon';
2
+ export interface IconDragHandleProps extends IconProps {
3
+ size?: '16' | '24';
4
+ }
5
+ declare const IconDragHandle: import('react').ForwardRefExoticComponent<IconDragHandleProps> & {
6
+ __bitkitIcon: true;
7
+ };
8
+ export default IconDragHandle;
@@ -0,0 +1,97 @@
1
+ import { bitkitIcon } from "./bitkitIcon.js";
2
+ import { Icon } from "@chakra-ui/react/icon";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ //#region lib/icons/IconDragHandle.tsx
5
+ var IconDragHandle = bitkitIcon(function IconDragHandle({ size = "24", ...props }, ref) {
6
+ if (size === "16") return /* @__PURE__ */ jsx(Icon, {
7
+ asChild: true,
8
+ ref,
9
+ ...props,
10
+ children: /* @__PURE__ */ jsxs("svg", {
11
+ width: "16",
12
+ height: "16",
13
+ viewBox: "0 0 16 16",
14
+ fill: "currentColor",
15
+ children: [
16
+ /* @__PURE__ */ jsx("circle", {
17
+ cx: "6",
18
+ cy: "4",
19
+ r: "1"
20
+ }),
21
+ /* @__PURE__ */ jsx("circle", {
22
+ cx: "10",
23
+ cy: "4",
24
+ r: "1"
25
+ }),
26
+ /* @__PURE__ */ jsx("circle", {
27
+ cx: "6",
28
+ cy: "8",
29
+ r: "1"
30
+ }),
31
+ /* @__PURE__ */ jsx("circle", {
32
+ cx: "10",
33
+ cy: "8",
34
+ r: "1"
35
+ }),
36
+ /* @__PURE__ */ jsx("circle", {
37
+ cx: "6",
38
+ cy: "12",
39
+ r: "1"
40
+ }),
41
+ /* @__PURE__ */ jsx("circle", {
42
+ cx: "10",
43
+ cy: "12",
44
+ r: "1"
45
+ })
46
+ ]
47
+ })
48
+ });
49
+ return /* @__PURE__ */ jsx(Icon, {
50
+ asChild: true,
51
+ ref,
52
+ ...props,
53
+ children: /* @__PURE__ */ jsxs("svg", {
54
+ width: "24",
55
+ height: "24",
56
+ viewBox: "0 0 24 24",
57
+ fill: "currentColor",
58
+ children: [
59
+ /* @__PURE__ */ jsx("circle", {
60
+ cx: "9",
61
+ cy: "6",
62
+ r: "1.5"
63
+ }),
64
+ /* @__PURE__ */ jsx("circle", {
65
+ cx: "15",
66
+ cy: "6",
67
+ r: "1.5"
68
+ }),
69
+ /* @__PURE__ */ jsx("circle", {
70
+ cx: "9",
71
+ cy: "12",
72
+ r: "1.5"
73
+ }),
74
+ /* @__PURE__ */ jsx("circle", {
75
+ cx: "15",
76
+ cy: "12",
77
+ r: "1.5"
78
+ }),
79
+ /* @__PURE__ */ jsx("circle", {
80
+ cx: "9",
81
+ cy: "18",
82
+ r: "1.5"
83
+ }),
84
+ /* @__PURE__ */ jsx("circle", {
85
+ cx: "15",
86
+ cy: "18",
87
+ r: "1.5"
88
+ })
89
+ ]
90
+ })
91
+ });
92
+ });
93
+ IconDragHandle.displayName = "IconDragHandle";
94
+ //#endregion
95
+ export { IconDragHandle as default };
96
+
97
+ //# sourceMappingURL=IconDragHandle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconDragHandle.js","names":[],"sources":["../../lib/icons/IconDragHandle.tsx"],"sourcesContent":["// @generate:skip\n// This file is manually maintained — the drag handle icon has no Figma source.\n\nimport { Icon, type IconProps } from '@chakra-ui/react/icon';\nimport { type Ref } from 'react';\n\nimport { bitkitIcon } from './bitkitIcon';\n\nexport interface IconDragHandleProps extends IconProps {\n size?: '16' | '24';\n}\n\nconst IconDragHandle = bitkitIcon(function IconDragHandle(\n { size = '24', ...props }: IconDragHandleProps,\n ref: Ref<SVGSVGElement>,\n) {\n if (size === '16') {\n return (\n <Icon asChild ref={ref} {...props}>\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"currentColor\">\n <circle cx=\"6\" cy=\"4\" r=\"1\" />\n <circle cx=\"10\" cy=\"4\" r=\"1\" />\n <circle cx=\"6\" cy=\"8\" r=\"1\" />\n <circle cx=\"10\" cy=\"8\" r=\"1\" />\n <circle cx=\"6\" cy=\"12\" r=\"1\" />\n <circle cx=\"10\" cy=\"12\" r=\"1\" />\n </svg>\n </Icon>\n );\n }\n\n return (\n <Icon asChild ref={ref} {...props}>\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"currentColor\">\n <circle cx=\"9\" cy=\"6\" r=\"1.5\" />\n <circle cx=\"15\" cy=\"6\" r=\"1.5\" />\n <circle cx=\"9\" cy=\"12\" r=\"1.5\" />\n <circle cx=\"15\" cy=\"12\" r=\"1.5\" />\n <circle cx=\"9\" cy=\"18\" r=\"1.5\" />\n <circle cx=\"15\" cy=\"18\" r=\"1.5\" />\n </svg>\n </Icon>\n );\n});\n\nIconDragHandle.displayName = 'IconDragHandle';\n\nexport default IconDragHandle;\n"],"mappings":";;;;AAYA,IAAM,iBAAiB,WAAW,SAAS,eACzC,EAAE,OAAO,MAAM,GAAG,SAClB,KACA;AACA,KAAI,SAAS,KACX,QACE,oBAAC,MAAD;EAAM,SAAA;EAAa;EAAK,GAAI;YAC1B,qBAAC,OAAD;GAAK,OAAM;GAAK,QAAO;GAAK,SAAQ;GAAY,MAAK;aAArD;IACE,oBAAC,UAAD;KAAQ,IAAG;KAAI,IAAG;KAAI,GAAE;KAAM,CAAA;IAC9B,oBAAC,UAAD;KAAQ,IAAG;KAAK,IAAG;KAAI,GAAE;KAAM,CAAA;IAC/B,oBAAC,UAAD;KAAQ,IAAG;KAAI,IAAG;KAAI,GAAE;KAAM,CAAA;IAC9B,oBAAC,UAAD;KAAQ,IAAG;KAAK,IAAG;KAAI,GAAE;KAAM,CAAA;IAC/B,oBAAC,UAAD;KAAQ,IAAG;KAAI,IAAG;KAAK,GAAE;KAAM,CAAA;IAC/B,oBAAC,UAAD;KAAQ,IAAG;KAAK,IAAG;KAAK,GAAE;KAAM,CAAA;IAC5B;;EACD,CAAA;AAIX,QACE,oBAAC,MAAD;EAAM,SAAA;EAAa;EAAK,GAAI;YAC1B,qBAAC,OAAD;GAAK,OAAM;GAAK,QAAO;GAAK,SAAQ;GAAY,MAAK;aAArD;IACE,oBAAC,UAAD;KAAQ,IAAG;KAAI,IAAG;KAAI,GAAE;KAAQ,CAAA;IAChC,oBAAC,UAAD;KAAQ,IAAG;KAAK,IAAG;KAAI,GAAE;KAAQ,CAAA;IACjC,oBAAC,UAAD;KAAQ,IAAG;KAAI,IAAG;KAAK,GAAE;KAAQ,CAAA;IACjC,oBAAC,UAAD;KAAQ,IAAG;KAAK,IAAG;KAAK,GAAE;KAAQ,CAAA;IAClC,oBAAC,UAAD;KAAQ,IAAG;KAAI,IAAG;KAAK,GAAE;KAAQ,CAAA;IACjC,oBAAC,UAAD;KAAQ,IAAG;KAAK,IAAG;KAAK,GAAE;KAAQ,CAAA;IAC9B;;EACD,CAAA;EAET;AAEF,eAAe,cAAc"}
@@ -118,6 +118,7 @@ export { default as IconDotnetText, type IconDotnetTextProps } from './IconDotne
118
118
  export { default as IconDotnetTextColor, type IconDotnetTextColorProps } from './IconDotnetTextColor';
119
119
  export { default as IconDoubleCircle, type IconDoubleCircleProps } from './IconDoubleCircle';
120
120
  export { default as IconDownload, type IconDownloadProps } from './IconDownload';
121
+ export { default as IconDragHandle, type IconDragHandleProps } from './IconDragHandle';
121
122
  export { default as IconEc2Ami, type IconEc2AmiProps } from './IconEc2Ami';
122
123
  export { default as IconEnterprise, type IconEnterpriseProps } from './IconEnterprise';
123
124
  export { default as IconErrorCircle, type IconErrorCircleProps } from './IconErrorCircle';