@coinbase/cds-web 8.43.2 → 8.44.1

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 (75) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dts/alpha/__figma__/Select.figma.d.ts +2 -0
  3. package/dts/alpha/__figma__/Select.figma.d.ts.map +1 -0
  4. package/dts/alpha/data-card/DataCard.d.ts +2 -0
  5. package/dts/alpha/data-card/DataCard.d.ts.map +1 -1
  6. package/dts/alpha/data-card/DataCardLayout.d.ts +8 -0
  7. package/dts/alpha/data-card/DataCardLayout.d.ts.map +1 -1
  8. package/dts/alpha/select/types.d.ts +118 -116
  9. package/dts/alpha/select/types.d.ts.map +1 -1
  10. package/dts/alpha/tabbed-chips/TabbedChips.d.ts +7 -21
  11. package/dts/alpha/tabbed-chips/TabbedChips.d.ts.map +1 -1
  12. package/dts/banner/Banner.d.ts.map +1 -1
  13. package/dts/cards/ContentCard/ContentCardBody.d.ts +8 -24
  14. package/dts/cards/ContentCard/ContentCardBody.d.ts.map +1 -1
  15. package/dts/cards/ContentCard/ContentCardHeader.d.ts +6 -18
  16. package/dts/cards/ContentCard/ContentCardHeader.d.ts.map +1 -1
  17. package/dts/cards/MediaCard/MediaCardLayout.d.ts +10 -0
  18. package/dts/cards/MediaCard/MediaCardLayout.d.ts.map +1 -1
  19. package/dts/cards/MediaCard/index.d.ts +2 -0
  20. package/dts/cards/MediaCard/index.d.ts.map +1 -1
  21. package/dts/cards/MessagingCard/MessagingCardLayout.d.ts +10 -0
  22. package/dts/cards/MessagingCard/MessagingCardLayout.d.ts.map +1 -1
  23. package/dts/cards/MessagingCard/index.d.ts +2 -0
  24. package/dts/cards/MessagingCard/index.d.ts.map +1 -1
  25. package/dts/carousel/Carousel.d.ts +14 -46
  26. package/dts/carousel/Carousel.d.ts.map +1 -1
  27. package/dts/cells/Cell.d.ts +22 -6
  28. package/dts/cells/Cell.d.ts.map +1 -1
  29. package/dts/cells/ContentCell.d.ts +26 -6
  30. package/dts/cells/ContentCell.d.ts.map +1 -1
  31. package/dts/cells/ListCell.d.ts +30 -10
  32. package/dts/cells/ListCell.d.ts.map +1 -1
  33. package/dts/chips/ChipProps.d.ts +6 -2
  34. package/dts/chips/ChipProps.d.ts.map +1 -1
  35. package/dts/controls/CheckboxCell.d.ts +10 -0
  36. package/dts/controls/CheckboxCell.d.ts.map +1 -1
  37. package/dts/controls/RadioCell.d.ts +10 -0
  38. package/dts/controls/RadioCell.d.ts.map +1 -1
  39. package/dts/dots/DotCount.d.ts +8 -30
  40. package/dts/dots/DotCount.d.ts.map +1 -1
  41. package/dts/icons/Icon.d.ts +6 -4
  42. package/dts/icons/Icon.d.ts.map +1 -1
  43. package/dts/navigation/Sidebar.d.ts +10 -30
  44. package/dts/navigation/Sidebar.d.ts.map +1 -1
  45. package/dts/numbers/RollingNumber/RollingNumber.d.ts +38 -138
  46. package/dts/numbers/RollingNumber/RollingNumber.d.ts.map +1 -1
  47. package/dts/overlays/FocusTrap.d.ts +3 -1
  48. package/dts/overlays/FocusTrap.d.ts.map +1 -1
  49. package/dts/overlays/handlebar/HandleBar.d.ts +44 -0
  50. package/dts/overlays/handlebar/HandleBar.d.ts.map +1 -0
  51. package/dts/overlays/handlebar/index.d.ts +2 -0
  52. package/dts/overlays/handlebar/index.d.ts.map +1 -0
  53. package/dts/overlays/tray/Tray.d.ts +113 -20
  54. package/dts/overlays/tray/Tray.d.ts.map +1 -1
  55. package/dts/page/PageHeader.d.ts +11 -31
  56. package/dts/page/PageHeader.d.ts.map +1 -1
  57. package/dts/stepper/Stepper.d.ts +17 -17
  58. package/dts/stepper/Stepper.d.ts.map +1 -1
  59. package/dts/visualizations/ProgressBar.d.ts +12 -48
  60. package/dts/visualizations/ProgressBar.d.ts.map +1 -1
  61. package/dts/visualizations/ProgressBarWithFixedLabels.d.ts +10 -36
  62. package/dts/visualizations/ProgressBarWithFixedLabels.d.ts.map +1 -1
  63. package/dts/visualizations/ProgressBarWithFloatLabel.d.ts +8 -30
  64. package/dts/visualizations/ProgressBarWithFloatLabel.d.ts.map +1 -1
  65. package/dts/visualizations/ProgressCircle.d.ts +20 -72
  66. package/dts/visualizations/ProgressCircle.d.ts.map +1 -1
  67. package/esm/alpha/__figma__/Select.figma.js +68 -0
  68. package/esm/banner/Banner.js +5 -4
  69. package/esm/overlays/FocusTrap.js +3 -1
  70. package/esm/overlays/handlebar/HandleBar.css +3 -0
  71. package/esm/overlays/handlebar/HandleBar.js +66 -0
  72. package/esm/overlays/handlebar/index.js +1 -0
  73. package/esm/overlays/tray/Tray.css +7 -0
  74. package/esm/overlays/tray/Tray.js +300 -112
  75. package/package.json +2 -2
@@ -24,54 +24,28 @@ export type ProgressCircleBaseProps = ProgressBaseProps & {
24
24
  contentNode?: React.ReactNode;
25
25
  };
26
26
  export type ProgressCircleProps = ProgressCircleBaseProps & {
27
- /**
28
- * Custom styles for the progress circle root.
29
- */
30
27
  style?: React.CSSProperties;
31
- /**
32
- * Custom class name for the progress circle root.
33
- */
34
28
  className?: string;
35
- /**
36
- * Custom styles for the progress circle.
37
- */
29
+ /** Custom styles for individual elements of the ProgressCircle component */
38
30
  styles?: {
39
- /**
40
- * Custom styles for the progress circle root.
41
- */
31
+ /** Root element */
42
32
  root?: React.CSSProperties;
43
- /**
44
- * Custom styles for the progress circle svg.
45
- */
33
+ /** SVG element */
46
34
  svg?: React.CSSProperties;
47
- /**
48
- * Custom styles for the background circle.
49
- */
35
+ /** Background circle element */
50
36
  circle?: React.CSSProperties;
51
- /**
52
- * Custom styles for the foreground circle.
53
- */
37
+ /** Foreground progress circle element */
54
38
  progress?: React.CSSProperties;
55
39
  };
56
- /**
57
- * Custom class names for the progress circle.
58
- */
40
+ /** Custom class names for individual elements of the ProgressCircle component */
59
41
  classNames?: {
60
- /**
61
- * Class name for the progress circle root.
62
- */
42
+ /** Root element */
63
43
  root?: string;
64
- /**
65
- * Class name for the progress circle svg.
66
- */
44
+ /** SVG element */
67
45
  svg?: string;
68
- /**
69
- * Class name for the progress circle background circle.
70
- */
46
+ /** Background circle element */
71
47
  circle?: string;
72
- /**
73
- * Class name for the progress circle foreground circle.
74
- */
48
+ /** Foreground progress circle element */
75
49
  progress?: string;
76
50
  };
77
51
  };
@@ -118,54 +92,28 @@ export declare const ProgressCircle: React.MemoExoticComponent<
118
92
  */
119
93
  contentNode?: React.ReactNode;
120
94
  } & {
121
- /**
122
- * Custom styles for the progress circle root.
123
- */
124
95
  style?: React.CSSProperties;
125
- /**
126
- * Custom class name for the progress circle root.
127
- */
128
96
  className?: string;
129
- /**
130
- * Custom styles for the progress circle.
131
- */
97
+ /** Custom styles for individual elements of the ProgressCircle component */
132
98
  styles?: {
133
- /**
134
- * Custom styles for the progress circle root.
135
- */
99
+ /** Root element */
136
100
  root?: React.CSSProperties;
137
- /**
138
- * Custom styles for the progress circle svg.
139
- */
101
+ /** SVG element */
140
102
  svg?: React.CSSProperties;
141
- /**
142
- * Custom styles for the background circle.
143
- */
103
+ /** Background circle element */
144
104
  circle?: React.CSSProperties;
145
- /**
146
- * Custom styles for the foreground circle.
147
- */
105
+ /** Foreground progress circle element */
148
106
  progress?: React.CSSProperties;
149
107
  };
150
- /**
151
- * Custom class names for the progress circle.
152
- */
108
+ /** Custom class names for individual elements of the ProgressCircle component */
153
109
  classNames?: {
154
- /**
155
- * Class name for the progress circle root.
156
- */
110
+ /** Root element */
157
111
  root?: string;
158
- /**
159
- * Class name for the progress circle svg.
160
- */
112
+ /** SVG element */
161
113
  svg?: string;
162
- /**
163
- * Class name for the progress circle background circle.
164
- */
114
+ /** Background circle element */
165
115
  circle?: string;
166
- /**
167
- * Class name for the progress circle foreground circle.
168
- */
116
+ /** Foreground progress circle element */
169
117
  progress?: string;
170
118
  };
171
119
  } & React.RefAttributes<HTMLDivElement>
@@ -1 +1 @@
1
- {"version":3,"file":"ProgressCircle.d.ts","sourceRoot":"","sources":["../../src/visualizations/ProgressCircle.tsx"],"names":[],"mappings":"AAAA,OAAO,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AK,CAAC,EAAE,SAAS,CAAC,KAAK,CAAC;CACzB,CAAC;AAkEF,eAAO,MAAM,cAAc;;;;;;;;IAtJzB;;OAEG;kBACW,OAAO;IACrB;;;OAGG;eACQ,OAAO;IAClB;;;;;OAKG;WACI,MAAM;IACb;;OAEG;kBACW,KAAK,CAAC,SAAS;;IAI7B;;OAEG;YACK,KAAK,CAAC,aAAa;IAC3B;;OAEG;gBACS,MAAM;IAClB;;OAEG;aACM;QACP;;WAEG;QACH,IAAI,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAC3B;;WAEG;QACH,GAAG,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAC1B;;WAEG;QACH,MAAM,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAC7B;;WAEG;QACH,QAAQ,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;KAChC;IACD;;OAEG;iBACU;QACX;;WAEG;QACH,IAAI,CAAC,EAAE,MAAM,CAAC;QACd;;WAEG;QACH,GAAG,CAAC,EAAE,MAAM,CAAC;QACb;;WAEG;QACH,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB;;WAEG;QACH,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB;yCAkMF,CAAC"}
1
+ {"version":3,"file":"ProgressCircle.d.ts","sourceRoot":"","sources":["../../src/visualizations/ProgressCircle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmC,MAAM,OAAO,CAAC;AACxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAatD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAWvD,MAAM,MAAM,uBAAuB,GAAG,iBAAiB,GAAG;IACxD;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,CAAC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KAAK,CAAC,aAAa,CAAC;QAC1B,gCAAgC;QAChC,MAAM,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAC7B,yCAAyC;QACzC,QAAQ,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;KAChC;IACD,iFAAiF;iBACpE;QACX,mBAAmB;QACnB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,kBAAkB;QAClB,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,gCAAgC;QAChC,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,yCAAyC;QACzC,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB;yCAkMF,CAAC"}
@@ -0,0 +1,68 @@
1
+ const _excluded = ["type", "value"];
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
6
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
8
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
9
+ import { figma } from '@figma/code-connect';
10
+ import { Select } from '../select/Select';
11
+ import { jsx as _jsx } from "react/jsx-runtime";
12
+ const selectOptions = [{
13
+ value: 'apple',
14
+ label: 'Apple'
15
+ }, {
16
+ value: 'banana',
17
+ label: 'Banana'
18
+ }, {
19
+ value: 'orange',
20
+ label: 'Orange',
21
+ description: 'Citrus'
22
+ }];
23
+ figma.connect(Select, 'https://www.figma.com/design/k5CtyJccNQUGMI5bI4lJ2g/✨-CDS-Components?node-id=71762-14938', {
24
+ imports: ["import { Select } from '@coinbase/cds-web/alpha/select/Select'"],
25
+ props: {
26
+ type: figma.enum('type', {
27
+ 'single select': 'single',
28
+ 'multi-select': 'multi'
29
+ }),
30
+ disabled: figma.boolean('disabled'),
31
+ compact: figma.boolean('compact'),
32
+ label: figma.boolean('show label', {
33
+ true: figma.boolean('show info icon') ? "<HStack alignItems=\"center\">\n <InputLabel>".concat(figma.string('label string'), "</InputLabel>\n <Tooltip content=\"This will be visible to other users.\">\n <Icon active color=\"fg\" name=\"info\" padding={0.75} size=\"xs\" tabIndex={0} />\n </Tooltip>\n </HStack>") : figma.string('label string'),
34
+ false: undefined
35
+ }),
36
+ start: figma.boolean('show start', {
37
+ true: figma.instance('start'),
38
+ false: undefined
39
+ }),
40
+ helperText: figma.boolean('show helper text', {
41
+ true: figma.string('helper text'),
42
+ false: undefined
43
+ }),
44
+ placeholder: figma.string('placeholderText'),
45
+ variant: figma.enum('state', {
46
+ default: undefined,
47
+ positive: 'positive',
48
+ negative: 'negative'
49
+ }),
50
+ value: figma.enum('type', {
51
+ 'single select': 'Item 1',
52
+ 'multi-select': ['Item 1', 'Item 2']
53
+ })
54
+ },
55
+ example: _ref => {
56
+ let {
57
+ type,
58
+ value
59
+ } = _ref,
60
+ props = _objectWithoutProperties(_ref, _excluded);
61
+ return /*#__PURE__*/_jsx(Select, _objectSpread(_objectSpread({}, props), {}, {
62
+ onChange: () => {},
63
+ options: selectOptions,
64
+ type: type,
65
+ value: value
66
+ }));
67
+ }
68
+ });
@@ -1,4 +1,4 @@
1
- const _excluded = ["variant", "startIcon", "startIconActive", "onClose", "primaryAction", "secondaryAction", "title", "children", "showDismiss", "testID", "style", "className", "numberOfLines", "label", "styleVariant", "startIconAccessibilityLabel", "closeAccessibilityLabel", "borderRadius", "margin", "marginY", "marginX", "marginTop", "marginBottom", "marginStart", "marginEnd"];
1
+ const _excluded = ["variant", "startIcon", "startIconActive", "onClose", "primaryAction", "secondaryAction", "title", "children", "showDismiss", "testID", "style", "className", "numberOfLines", "label", "styleVariant", "startIconAccessibilityLabel", "closeAccessibilityLabel", "borderRadius", "margin", "marginY", "marginX", "marginTop", "marginBottom", "marginStart", "marginEnd", "width"];
2
2
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
3
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
4
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
@@ -47,7 +47,8 @@ export const Banner = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref) => {
47
47
  marginTop,
48
48
  marginBottom,
49
49
  marginStart,
50
- marginEnd
50
+ marginEnd,
51
+ width = '100%'
51
52
  } = _ref,
52
53
  props = _objectWithoutProperties(_ref, _excluded);
53
54
  const [isCollapsed, setIsCollapsed] = useState(false);
@@ -114,7 +115,7 @@ export const Banner = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref) => {
114
115
  }), [borderColor]);
115
116
  const content = /*#__PURE__*/_jsxs(Box, _objectSpread(_objectSpread({
116
117
  position: "relative",
117
- width: "100%"
118
+ width: width
118
119
  }, !showDismiss && marginStyles), {}, {
119
120
  height: "fit-content",
120
121
  children: [/*#__PURE__*/_jsxs(HStack, _objectSpread(_objectSpread({
@@ -200,7 +201,7 @@ export const Banner = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref) => {
200
201
  display: "block",
201
202
  height: "fit-content",
202
203
  position: "relative",
203
- width: "100%"
204
+ width: width
204
205
  }, marginStyles), {}, {
205
206
  children: [/*#__PURE__*/_jsx(Collapsible, {
206
207
  accessibilityLabelledBy: accessibilityLabelledBy,
@@ -1,4 +1,5 @@
1
1
  import React, { memo, useCallback, useEffect, useMemo, useRef } from 'react';
2
+ import { useMergeRefs } from '@coinbase/cds-common/hooks/useMergeRefs';
2
3
  import { FOCUSABLE_ELEMENTS } from '@coinbase/cds-common/tokens/overlays';
3
4
  import { debounce } from '@coinbase/cds-common/utils/debounce';
4
5
  import { getBrowserGlobals } from '../utils/browser';
@@ -203,12 +204,13 @@ export const FocusTrap = /*#__PURE__*/memo(function FocusTrap(_ref) {
203
204
 
204
205
  // only works for single child
205
206
  const onlyChild = React.Children.only(children);
207
+ const mergedRef = useMergeRefs(childrenRef, children === null || children === void 0 ? void 0 : children.ref);
206
208
  if (!onlyChild) {
207
209
  return /*#__PURE__*/_jsx(_Fragment, {
208
210
  children: children
209
211
  });
210
212
  }
211
213
  return /*#__PURE__*/React.cloneElement(children, {
212
- ref: childrenRef
214
+ ref: mergedRef
213
215
  });
214
216
  });
@@ -0,0 +1,3 @@
1
+ @layer cds{.containerBaseCss-c1oq904k{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;padding-top:var(--space-2);padding-bottom:var(--space-2);}
2
+ .containerPressableCss-cya0rqx{width:100%;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab;touch-action:none;}.containerPressableCss-cya0rqx:active{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing;}
3
+ .handleCss-h1mpswnh{width:32px;height:4px;border-radius:var(--borderRadius-1000);opacity:0.4;}}
@@ -0,0 +1,66 @@
1
+ const _excluded = ["testID", "onClose", "accessibilityLabel", "accessibilityHint", "classNames", "styles", "className", "style"];
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
6
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
8
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
9
+ import React, { memo, useMemo } from 'react';
10
+ import { handleBarHeight } from '@coinbase/cds-common/tokens/drawer';
11
+ import { cx } from '../../cx';
12
+ import { Box } from '../../layout';
13
+ import { Pressable } from '../../system/Pressable';
14
+
15
+ // Fixed pixel values used intentionally — handle size should not scale with theme density.
16
+ import { jsx as _jsx } from "react/jsx-runtime";
17
+ const HANDLE_WIDTH = 32;
18
+ const HANDLE_OPACITY = 0.4;
19
+ const containerBaseCss = "containerBaseCss-c1oq904k";
20
+ const containerPressableCss = "containerPressableCss-cya0rqx";
21
+ const handleCss = "handleCss-h1mpswnh";
22
+
23
+ /**
24
+ * A draggable handle indicator for overlay components like Tray.
25
+ * @note Web only supports inside handlebar.
26
+ */
27
+
28
+ export const HandleBar = /*#__PURE__*/memo(_ref => {
29
+ var _classNames$root;
30
+ let {
31
+ testID = 'handleBar',
32
+ onClose,
33
+ accessibilityLabel,
34
+ accessibilityHint,
35
+ classNames,
36
+ styles,
37
+ className,
38
+ style
39
+ } = _ref,
40
+ props = _objectWithoutProperties(_ref, _excluded);
41
+ const rootStyle = useMemo(() => style || styles !== null && styles !== void 0 && styles.root ? _objectSpread(_objectSpread({}, style), styles === null || styles === void 0 ? void 0 : styles.root) : undefined, [style, styles === null || styles === void 0 ? void 0 : styles.root]);
42
+ const handleClassName = cx(handleCss, classNames === null || classNames === void 0 ? void 0 : classNames.handle);
43
+ return /*#__PURE__*/_jsx(Box, _objectSpread(_objectSpread({
44
+ className: cx(containerBaseCss, onClose && containerPressableCss, (_classNames$root = classNames === null || classNames === void 0 ? void 0 : classNames.root) !== null && _classNames$root !== void 0 ? _classNames$root : className),
45
+ "data-testid": testID,
46
+ style: rootStyle
47
+ }, props), {}, {
48
+ children: onClose ? /*#__PURE__*/_jsx(Pressable, {
49
+ noScaleOnPress: true,
50
+ accessibilityHint: accessibilityHint,
51
+ accessibilityLabel: accessibilityLabel,
52
+ background: "bgInverse",
53
+ borderColor: "transparent",
54
+ className: handleClassName,
55
+ onClick: onClose,
56
+ style: styles === null || styles === void 0 ? void 0 : styles.handle
57
+ }) : /*#__PURE__*/_jsx(Box, {
58
+ accessibilityHint: accessibilityHint,
59
+ accessibilityLabel: accessibilityLabel,
60
+ background: "bgInverse",
61
+ className: handleClassName,
62
+ style: styles === null || styles === void 0 ? void 0 : styles.handle
63
+ })
64
+ }));
65
+ });
66
+ import "./HandleBar.css";
@@ -0,0 +1 @@
1
+ export * from './HandleBar';
@@ -0,0 +1,7 @@
1
+ @layer cds{.trayHeaderBorderBaseCss-t552jyb{border-bottom-width:var(--borderWidth-100);border-bottom-style:solid;border-bottom-color:transparent;}
2
+ .trayHeaderBorderVisibleCss-tx59ve0{border-bottom-color:var(--color-bgLine);}
3
+ .trayContainerBaseCss-t1gubbn2{z-index:1;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;overflow:hidden;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;min-height:0;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}
4
+ .trayContainerPinBottomCss-ttp17ir{border-top-left-radius:var(--borderRadius-600);border-top-right-radius:var(--borderRadius-600);}
5
+ .trayContainerPinTopCss-t1ql0a7m{border-bottom-left-radius:var(--borderRadius-600);border-bottom-right-radius:var(--borderRadius-600);}
6
+ .trayContainerPinLeftCss-tddpnpb{border-top-right-radius:var(--borderRadius-600);border-bottom-right-radius:var(--borderRadius-600);}
7
+ .trayContainerPinRightCss-t17d10kx{border-top-left-radius:var(--borderRadius-600);border-bottom-left-radius:var(--borderRadius-600);}}