@spaced-out/ui-design-system 0.6.11 → 0.6.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,20 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [0.6.13](https://github.com/spaced-out/ui-design-system/compare/v0.6.12...v0.6.13) (2026-04-23)
6
+
7
+
8
+ ### Features
9
+
10
+ * **ProgressDonut:** add icon support in center slot ([#478](https://github.com/spaced-out/ui-design-system/issues/478)) ([4c1a30e](https://github.com/spaced-out/ui-design-system/commit/4c1a30e5033fa544cea7ac3511b5c250c5f52a7d))
11
+
12
+ ### [0.6.12](https://github.com/spaced-out/ui-design-system/compare/v0.6.11...v0.6.12) (2026-04-22)
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * **DraggableWrapper:** decouple from native HTML5 drag to support multiple DnD libraries ([#477](https://github.com/spaced-out/ui-design-system/issues/477)) ([fdd7386](https://github.com/spaced-out/ui-design-system/commit/fdd7386c033d248c8e5eb9de738ba00c7873bebe))
18
+
5
19
  ### [0.6.11](https://github.com/spaced-out/ui-design-system/compare/v0.6.10...v0.6.11) (2026-04-15)
6
20
 
7
21
 
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- type DraggableWrapperClassNames = Readonly<{
2
+ export type DraggableWrapperClassNames = Readonly<{
3
3
  /** Override or extend the root wrapper element. */
4
4
  wrapper?: string;
5
5
  /** Override or extend the drag handle element. */
@@ -19,7 +19,14 @@ export interface DraggableWrapperProps extends Pick<React.HTMLAttributes<HTMLDiv
19
19
  */
20
20
  onKeyboardReorder?: (direction: 'up' | 'down') => void;
21
21
  testId?: string;
22
+ /** Set false when using @dnd-kit / react-beautiful-dnd (pointer-event libs). Keep true for react-dnd HTML5 backend. Default true. */
23
+ enableNativeDrag?: boolean;
24
+ /** Extra props to spread on the wrapper (library listeners/attributes). */
25
+ wrapperProps?: React.HTMLAttributes<HTMLDivElement>;
26
+ /** Extra props to spread on the drag handle (some libs attach activator listeners here). */
27
+ dragHandleProps?: React.HTMLAttributes<HTMLDivElement>;
28
+ /** Separate ref for the drag handle (for libs with setActivatorNodeRef / react-dnd's drag). */
29
+ dragHandleRef?: React.Ref<HTMLDivElement>;
22
30
  }
23
- export declare const DraggableWrapper: ({ children, isDragging, dragHandleLabel, classNames, testId, onDragStart, onDragEnd, onDragOver, onDrop, onKeyboardReorder, }: DraggableWrapperProps) => React.JSX.Element;
24
- export {};
31
+ export declare const DraggableWrapper: React.ForwardRefExoticComponent<DraggableWrapperProps & React.RefAttributes<HTMLDivElement>>;
25
32
  //# sourceMappingURL=DraggableWrapper.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DraggableWrapper.d.ts","sourceRoot":"","sources":["../../../src/components/DraggableWrapper/DraggableWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,KAAK,0BAA0B,GAAG,QAAQ,CAAC;IACzC,mDAAmD;IACnD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kDAAkD;IAClD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC,CAAC;AAEH,MAAM,WAAW,qBACf,SAAQ,IAAI,CACV,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EACpC,aAAa,GAAG,WAAW,GAAG,YAAY,GAAG,QAAQ,CACtD;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,4EAA4E;IAC5E,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,6FAA6F;IAC7F,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,0FAA0F;IAC1F,UAAU,CAAC,EAAE,0BAA0B,CAAC;IACxC;;;OAGG;IACH,iBAAiB,CAAC,EAAE,CAAC,SAAS,EAAE,IAAI,GAAG,MAAM,KAAK,IAAI,CAAC;IACvD,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 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.DraggableWrapper = void 0;
7
7
  var React = _interopRequireWildcard(require("react"));
8
8
  var _classify = _interopRequireDefault(require("../../utils/classify"));
9
+ var _mergeRefs = require("../../utils/merge-refs");
9
10
  var _qa = require("../../utils/qa");
10
11
  var _Icon = require("../Icon");
11
12
  var _Tooltip = require("../Tooltip");
@@ -13,7 +14,7 @@ var _DraggableWrapperModule = _interopRequireDefault(require("./DraggableWrapper
13
14
  var _jsxRuntime = require("react/jsx-runtime");
14
15
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
15
16
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
16
- const DraggableWrapper = _ref => {
17
+ const DraggableWrapper = exports.DraggableWrapper = /*#__PURE__*/React.forwardRef((_ref, ref) => {
17
18
  let {
18
19
  children,
19
20
  isDragging,
@@ -24,12 +25,17 @@ const DraggableWrapper = _ref => {
24
25
  onDragEnd,
25
26
  onDragOver,
26
27
  onDrop,
27
- onKeyboardReorder
28
+ onKeyboardReorder,
29
+ enableNativeDrag = true,
30
+ wrapperProps,
31
+ dragHandleProps,
32
+ dragHandleRef
28
33
  } = _ref;
29
- const wrapperRef = React.useRef(null);
34
+ const internalRef = React.useRef(null);
35
+ const mergedRef = React.useMemo(() => (0, _mergeRefs.mergeRefs)([internalRef, ref]), [ref]);
30
36
  const isKeyboardGrabbed = React.useRef(false);
31
37
  const dispatchDragEvent = type => {
32
- wrapperRef.current?.dispatchEvent(new DragEvent(type, {
38
+ internalRef.current?.dispatchEvent(new DragEvent(type, {
33
39
  bubbles: true,
34
40
  dataTransfer: new DataTransfer()
35
41
  }));
@@ -38,6 +44,17 @@ const DraggableWrapper = _ref => {
38
44
  isKeyboardGrabbed.current = false;
39
45
  dispatchDragEvent('dragend');
40
46
  };
47
+ React.useEffect(() => {
48
+ const element = internalRef.current;
49
+ return () => {
50
+ if (isKeyboardGrabbed.current && element) {
51
+ element.dispatchEvent(new DragEvent('dragend', {
52
+ bubbles: true,
53
+ dataTransfer: new DataTransfer()
54
+ }));
55
+ }
56
+ };
57
+ }, []);
41
58
  const handleBlur = () => {
42
59
  if (isKeyboardGrabbed.current) {
43
60
  releaseKeyboardGrab();
@@ -67,26 +84,29 @@ const DraggableWrapper = _ref => {
67
84
  }
68
85
  };
69
86
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
70
- ref: wrapperRef,
71
- draggable: true,
87
+ ref: mergedRef,
72
88
  onDragStart: onDragStart,
73
89
  onDragEnd: onDragEnd,
74
90
  onDragOver: onDragOver,
75
91
  onDrop: onDrop,
92
+ ...wrapperProps,
93
+ draggable: enableNativeDrag,
76
94
  "data-testid": (0, _qa.generateTestId)({
77
95
  base: testId
78
96
  }),
79
97
  className: (0, _classify.default)(_DraggableWrapperModule.default.wrapper, {
80
98
  [_DraggableWrapperModule.default.dragging]: !!isDragging
81
- }, classNames?.wrapper),
99
+ }, classNames?.wrapper, wrapperProps?.className),
82
100
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
83
- className: (0, _classify.default)(_DraggableWrapperModule.default.dragHandle, classNames?.dragHandle),
101
+ ref: dragHandleRef,
102
+ ...dragHandleProps,
103
+ onKeyDownCapture: enableNativeDrag ? handleKeyDown : dragHandleProps?.onKeyDownCapture,
104
+ onBlur: enableNativeDrag ? handleBlur : dragHandleProps?.onBlur,
84
105
  "data-testid": (0, _qa.generateTestId)({
85
106
  base: testId,
86
107
  slot: 'drag-handle'
87
108
  }),
88
- onKeyDownCapture: handleKeyDown,
89
- onBlur: handleBlur,
109
+ className: (0, _classify.default)(_DraggableWrapperModule.default.dragHandle, classNames?.dragHandle, dragHandleProps?.className),
90
110
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.Tooltip, {
91
111
  title: dragHandleLabel,
92
112
  placement: "top",
@@ -98,5 +118,5 @@ const DraggableWrapper = _ref => {
98
118
  })
99
119
  }), children]
100
120
  });
101
- };
102
- exports.DraggableWrapper = DraggableWrapper;
121
+ });
122
+ DraggableWrapper.displayName = 'DraggableWrapper';
@@ -1,3 +1,3 @@
1
1
  export { DraggableWrapper } from '../../components/DraggableWrapper/DraggableWrapper';
2
- export type { DraggableWrapperProps } from '../../components/DraggableWrapper/DraggableWrapper';
2
+ export type { DraggableWrapperProps, DraggableWrapperClassNames, } from '../../components/DraggableWrapper/DraggableWrapper';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DraggableWrapper/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAC,MAAM,kDAAkD,CAAC;AAClF,YAAY,EAAC,qBAAqB,EAAC,MAAM,kDAAkD,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DraggableWrapper/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAC,MAAM,kDAAkD,CAAC;AAClF,YAAY,EACV,qBAAqB,EACrB,0BAA0B,GAC3B,MAAM,kDAAkD,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import type { Flow } from 'flow-to-typescript-codemod';
2
2
  import * as COLORS from '../../styles/variables/_color';
3
+ import type { IconProps } from '../../components/Icon';
3
4
  type ClassNames = Readonly<{
4
5
  wrapper?: string;
5
6
  donutChart?: string;
@@ -9,6 +10,7 @@ export type ProgressDonutProps = {
9
10
  color?: keyof typeof COLORS;
10
11
  size?: 'small' | 'medium';
11
12
  testId?: string;
13
+ icon?: Omit<IconProps, 'size'>;
12
14
  } & ({
13
15
  percentage?: number;
14
16
  rating?: never;
@@ -1 +1 @@
1
- {"version":3,"file":"ProgressDonut.d.ts","sourceRoot":"","sources":["../../../src/components/ProgressDonut/ProgressDonut.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAErD,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AAuBtD,KAAK,UAAU,GAAG,QAAQ,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,OAAO,MAAM,CAAC;IAC5B,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,GAAG,CACA;IAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,KAAK,CAAA;CAAC,GACrC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,KAAK,CAAA;CAAC,CACvC,CAAC;AAcF,eAAO,MAAM,aAAa,EAAE,IAAI,CAAC,iBAAiB,CAChD,kBAAkB,EAClB,cAAc,CAsGf,CAAC"}
1
+ {"version":3,"file":"ProgressDonut.d.ts","sourceRoot":"","sources":["../../../src/components/ProgressDonut/ProgressDonut.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAErD,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AAItD,OAAO,KAAK,EAAC,SAAS,EAAW,MAAM,qBAAqB,CAAC;AA0B7D,KAAK,UAAU,GAAG,QAAQ,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,OAAO,MAAM,CAAC;IAC5B,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;CAChC,GAAG,CACA;IAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,KAAK,CAAA;CAAC,GACrC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,KAAK,CAAA;CAAC,CACvC,CAAC;AAcF,eAAO,MAAM,aAAa,EAAE,IAAI,CAAC,iBAAiB,CAChD,kBAAkB,EAClB,cAAc,CAgHf,CAAC"}
@@ -8,6 +8,7 @@ var React = _interopRequireWildcard(require("react"));
8
8
  var COLORS = _interopRequireWildcard(require("../../styles/variables/_color"));
9
9
  var _classify = _interopRequireDefault(require("../../utils/classify"));
10
10
  var _qa = require("../../utils/qa");
11
+ var _Icon = require("../Icon");
11
12
  var _Text = require("../Text");
12
13
  var _ProgressDonutModule = _interopRequireDefault(require("./ProgressDonut.module.css"));
13
14
  var _jsxRuntime = require("react/jsx-runtime");
@@ -31,6 +32,10 @@ const DONUT_CONFIG = {
31
32
  strokeWidth: 8
32
33
  }
33
34
  };
35
+ const DONUT_TO_ICON_SIZE = {
36
+ small: 'small',
37
+ medium: 'large'
38
+ };
34
39
  const getProgressDonutColor = percentage => {
35
40
  if (percentage >= SUCCESS_THRESHOLD) {
36
41
  return COLORS.colorSuccess;
@@ -49,7 +54,8 @@ const ProgressDonut = exports.ProgressDonut = /*#__PURE__*/React.forwardRef((_re
49
54
  rating,
50
55
  color,
51
56
  size = 'medium',
52
- testId
57
+ testId,
58
+ icon
53
59
  } = _ref;
54
60
  const clampedRating = rating !== undefined ? Math.min(Math.max(Math.round(rating), MIN_RATING), MAX_RATING) : undefined;
55
61
  const donutPercentage = React.useMemo(() => {
@@ -99,7 +105,17 @@ const ProgressDonut = exports.ProgressDonut = /*#__PURE__*/React.forwardRef((_re
99
105
  stroke: COLORS[color || ''] || donutColor,
100
106
  strokeLinecap: "round"
101
107
  })]
102
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(TextComponent, {
108
+ }), icon ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
109
+ className: _ProgressDonutModule.default.donutChartIcon,
110
+ "data-testid": (0, _qa.generateTestId)({
111
+ base: testId,
112
+ slot: 'icon'
113
+ }),
114
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
115
+ ...icon,
116
+ size: DONUT_TO_ICON_SIZE[size]
117
+ })
118
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(TextComponent, {
103
119
  className: (0, _classify.default)(_ProgressDonutModule.default.donutChartPercentage, {
104
120
  [_ProgressDonutModule.default.donutChartPercentageSmallPercent]: size === 'small' && rating === undefined
105
121
  }),
@@ -46,3 +46,7 @@
46
46
  .donutChartPercentageSmallPercent {
47
47
  font-size: fontSize12;
48
48
  }
49
+
50
+ .donutChartIcon {
51
+ position: absolute;
52
+ }
package/mcp/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spaced-out/genesis-mcp",
3
- "version": "1.0.24",
3
+ "version": "1.0.26",
4
4
  "description": "MCP server for Genesis UI Design System - provides AI assistants with access to components, hooks, and design tokens",
5
5
  "type": "module",
6
6
  "main": "index.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spaced-out/ui-design-system",
3
- "version": "0.6.11",
3
+ "version": "0.6.13",
4
4
  "description": "Sense UI components library",
5
5
  "author": {
6
6
  "name": "Spaced Out"