@coinbase/cds-web 8.21.3 → 8.21.5

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
@@ -8,6 +8,18 @@ All notable changes to this project will be documented in this file.
8
8
 
9
9
  <!-- template-start -->
10
10
 
11
+ ## 8.21.5 (11/19/2025 PST)
12
+
13
+ #### 🐞 Fixes
14
+
15
+ - Auto-fill DatePicker width. [[#118](https://github.com/coinbase/cds/pull/118)] [DX-4988]
16
+
17
+ ## 8.21.4 (11/18/2025 PST)
18
+
19
+ #### 🐞 Fixes
20
+
21
+ - Update styling of DefaultSelectControl to use compact chips. [[#156](https://github.com/coinbase/cds/pull/156)]
22
+
11
23
  ## 8.21.3 ((11/17/2025, 10:03 AM PST))
12
24
 
13
25
  This is an artificial version bump with no new change.
@@ -1 +1 @@
1
- {"version":3,"file":"DefaultSelectControl.d.ts","sourceRoot":"","sources":["../../../src/alpha/select/DefaultSelectControl.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyD,MAAM,OAAO,CAAC;AAgB9E,OAAO,KAAK,EAAE,kBAAkB,EAAgB,UAAU,EAAE,MAAM,UAAU,CAAC;AAmB7E,KAAK,wBAAwB,GAAG,CAC9B,IAAI,SAAS,UAAU,EACvB,iBAAiB,SAAS,MAAM,GAAG,MAAM,EAEzC,KAAK,EAAE,kBAAkB,CAAC,IAAI,EAAE,iBAAiB,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,CAAA;CAAE,KAClF,KAAK,CAAC,YAAY,CAAC;AAgUxB,eAAO,MAAM,oBAAoB,EAAoC,wBAAwB,CAAC"}
1
+ {"version":3,"file":"DefaultSelectControl.d.ts","sourceRoot":"","sources":["../../../src/alpha/select/DefaultSelectControl.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyD,MAAM,OAAO,CAAC;AAe9E,OAAO,KAAK,EAAE,kBAAkB,EAAgB,UAAU,EAAE,MAAM,UAAU,CAAC;AAyB7E,KAAK,wBAAwB,GAAG,CAC9B,IAAI,SAAS,UAAU,EACvB,iBAAiB,SAAS,MAAM,GAAG,MAAM,EAEzC,KAAK,EAAE,kBAAkB,CAAC,IAAI,EAAE,iBAAiB,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,CAAA;CAAE,KAClF,KAAK,CAAC,YAAY,CAAC;AAyUxB,eAAO,MAAM,oBAAoB,EAAoC,wBAAwB,CAAC"}
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import { type DateInputValidationError } from '@coinbase/cds-common/dates/DateInputValidationError';
3
2
  import { type PopoverProps } from '../overlays/popover/PopoverProps';
4
3
  import { type CalendarProps } from './Calendar';
@@ -75,8 +74,8 @@ export type DatePickerProps = {
75
74
  | 'style'
76
75
  > &
77
76
  Pick<PopoverProps, 'showOverlay'>;
78
- export declare const DatePicker: React.MemoExoticComponent<
79
- React.ForwardRefExoticComponent<
77
+ export declare const DatePicker: import('react').MemoExoticComponent<
78
+ import('react').ForwardRefExoticComponent<
80
79
  {
81
80
  /** Control the date value of the DatePicker. */
82
81
  date: Date | null;
@@ -149,7 +148,7 @@ export declare const DatePicker: React.MemoExoticComponent<
149
148
  | 'highlightedDates'
150
149
  > &
151
150
  Pick<PopoverProps, 'showOverlay'> &
152
- React.RefAttributes<HTMLDivElement>
151
+ import('react').RefAttributes<HTMLDivElement>
153
152
  >
154
153
  >;
155
154
  //# sourceMappingURL=DatePicker.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../src/dates/DatePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmE,MAAM,OAAO,CAAC;AAOxF,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,qDAAqD,CAAC;AASpG,OAAO,EAEL,KAAK,YAAY,EAClB,MAAM,kCAAkC,CAAC;AAE1C,OAAO,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ChD,OAAO;IACrB,sOAAsO;eAC3N,CAAC,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI;IAC/D,oEAAoE;aAC3D,MAAM,IAAI;IACnB,6IAA6I;cACnI,MAAM,IAAI;IACpB,2LAA2L;gBAC/K,MAAM,IAAI;IACtB,sMAAsM;eAC3L,MAAM,IAAI;IACrB;;;;;OAKG;4BACqB,OAAO;IAC/B;;;OAGG;2CACoC,MAAM;oBAC7B,KAAK,CAAC,aAAa;wBACf,MAAM;qBACT,KAAK,CAAC,aAAa;yBACf,MAAM;gYAqR5B,CAAC"}
@@ -7,7 +7,6 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
7
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
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
9
  import React, { forwardRef, memo, useCallback, useMemo, useRef } from 'react';
10
- import { Chip } from '../../chips/Chip';
11
10
  import { InputChip } from '../../chips/InputChip';
12
11
  import { HelperText } from '../../controls/HelperText';
13
12
  import { InputLabel } from '../../controls/InputLabel';
@@ -19,6 +18,11 @@ import { Pressable } from '../../system/Pressable';
19
18
  import { Text } from '../../typography/Text';
20
19
  import { findClosestNonDisabledNodeIndex } from '../../utils/findClosestNonDisabledNodeIndex';
21
20
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
21
+ // The height is smaller for the inside label variant since the label takes
22
+ // up space above the input.
23
+ const LABEL_VARIANT_INSIDE_HEIGHT = 32;
24
+ const COMPACT_HEIGHT = 40;
25
+ const DEFAULT_HEIGHT = 56;
22
26
  const noFocusOutlineCss = "noFocusOutlineCss-n1gl6kcn";
23
27
  const variantColor = {
24
28
  foreground: 'fg',
@@ -93,6 +97,7 @@ const DefaultSelectControlComponent = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(
93
97
  noScaleOnPress: true,
94
98
  className: classNames === null || classNames === void 0 ? void 0 : classNames.controlLabelNode,
95
99
  disabled: disabled,
100
+ height: 28,
96
101
  onClick: () => setOpen(s => !s),
97
102
  style: styles === null || styles === void 0 ? void 0 : styles.controlLabelNode,
98
103
  tabIndex: -1,
@@ -116,15 +121,21 @@ const DefaultSelectControlComponent = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(
116
121
  var _option$value, _ref2, _ref3, _option$label;
117
122
  const accessibilityLabel = typeof option.label === 'string' ? option.label : typeof option.description === 'string' ? option.description : (_option$value = option.value) !== null && _option$value !== void 0 ? _option$value : '';
118
123
  return /*#__PURE__*/_jsx(InputChip, {
124
+ compact: true,
119
125
  "data-selected-value": true,
120
126
  accessibilityLabel: "".concat(removeSelectedOptionAccessibilityLabel, " ").concat(accessibilityLabel),
127
+ borderWidth: 0,
121
128
  disabled: option.disabled,
122
129
  invertColorScheme: false,
123
130
  maxWidth: 200,
124
131
  onClick: event => handleUnselectValue(event, index),
125
132
  children: (_ref2 = (_ref3 = (_option$label = option.label) !== null && _option$label !== void 0 ? _option$label : option.description) !== null && _ref3 !== void 0 ? _ref3 : option.value) !== null && _ref2 !== void 0 ? _ref2 : ''
126
133
  }, option.value);
127
- }), value.length - maxSelectedOptionsToShow > 0 && /*#__PURE__*/_jsx(Chip, {
134
+ }), value.length - maxSelectedOptionsToShow > 0 && /*#__PURE__*/_jsx(InputChip, {
135
+ compact: true,
136
+ borderWidth: 0,
137
+ end: null,
138
+ invertColorScheme: false,
128
139
  children: "+".concat(value.length - maxSelectedOptionsToShow, " ").concat(hiddenSelectedOptionsLabel)
129
140
  })]
130
141
  });
@@ -151,10 +162,11 @@ const DefaultSelectControlComponent = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(
151
162
  "aria-haspopup": ariaHaspopup,
152
163
  background: "transparent",
153
164
  blendStyles: interactableBlendStyles,
165
+ borderWidth: 0,
154
166
  className: cx(noFocusOutlineCss, classNames === null || classNames === void 0 ? void 0 : classNames.controlInputNode),
155
167
  disabled: disabled,
156
168
  focusable: false,
157
- minHeight: isMultiSelect ? 76 : undefined,
169
+ minHeight: labelVariant === 'inside' ? LABEL_VARIANT_INSIDE_HEIGHT : compact ? COMPACT_HEIGHT : DEFAULT_HEIGHT,
158
170
  onClick: () => setOpen(s => !s),
159
171
  paddingStart: 1,
160
172
  style: styles === null || styles === void 0 ? void 0 : styles.controlInputNode,
@@ -172,7 +184,7 @@ const DefaultSelectControlComponent = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(
172
184
  alignItems: "center",
173
185
  height: "100%",
174
186
  maxWidth: "40%",
175
- padding: 1,
187
+ paddingStart: 1,
176
188
  children: /*#__PURE__*/_jsx(InputLabel, {
177
189
  color: "fg",
178
190
  overflow: "truncate",
@@ -181,7 +193,6 @@ const DefaultSelectControlComponent = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(
181
193
  }) : null, /*#__PURE__*/_jsx(HStack, {
182
194
  alignItems: "center",
183
195
  borderRadius: 200,
184
- height: "100%",
185
196
  justifyContent: "space-between",
186
197
  width: "100%",
187
198
  children: /*#__PURE__*/_jsx(HStack, {
@@ -192,17 +203,16 @@ const DefaultSelectControlComponent = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(
192
203
  flexShrink: 1,
193
204
  flexWrap: "wrap",
194
205
  gap: 1,
195
- height: "100%",
196
206
  justifyContent: shouldShowCompactLabel ? 'flex-end' : 'flex-start',
197
207
  overflow: "auto",
198
- paddingTop: labelVariant === 'inside' ? 0 : compact ? 1 : 2,
208
+ paddingTop: labelVariant === 'inside' ? 0 : undefined,
199
209
  paddingX: 1,
200
- paddingY: labelVariant === 'inside' || compact ? 1 : 2,
210
+ paddingY: labelVariant === 'inside' || compact ? 0.5 : 1.5,
201
211
  style: styles === null || styles === void 0 ? void 0 : styles.controlValueNode,
202
212
  children: valueNode
203
213
  })
204
214
  })]
205
- }), [accessibilityLabel, ariaHaspopup, interactableBlendStyles, classNames === null || classNames === void 0 ? void 0 : classNames.controlInputNode, classNames === null || classNames === void 0 ? void 0 : classNames.controlStartNode, classNames === null || classNames === void 0 ? void 0 : classNames.controlValueNode, disabled, isMultiSelect, styles === null || styles === void 0 ? void 0 : styles.controlInputNode, styles === null || styles === void 0 ? void 0 : styles.controlStartNode, styles === null || styles === void 0 ? void 0 : styles.controlValueNode, startNode, shouldShowCompactLabel, label, labelVariant, compact, valueNode, setOpen]);
215
+ }), [accessibilityLabel, ariaHaspopup, interactableBlendStyles, classNames === null || classNames === void 0 ? void 0 : classNames.controlInputNode, classNames === null || classNames === void 0 ? void 0 : classNames.controlStartNode, classNames === null || classNames === void 0 ? void 0 : classNames.controlValueNode, disabled, styles === null || styles === void 0 ? void 0 : styles.controlInputNode, styles === null || styles === void 0 ? void 0 : styles.controlStartNode, styles === null || styles === void 0 ? void 0 : styles.controlValueNode, startNode, shouldShowCompactLabel, label, labelVariant, compact, valueNode, setOpen]);
206
216
  const endNode = useMemo(() => /*#__PURE__*/_jsx(HStack, {
207
217
  alignItems: "center",
208
218
  className: classNames === null || classNames === void 0 ? void 0 : classNames.controlEndNode,
@@ -1,4 +1,4 @@
1
- const _excluded = ["date", "onChangeDate", "error", "onErrorDate", "required", "disabled", "seedDate", "disabledDates", "highlightedDates", "minDate", "maxDate", "requiredError", "invalidDateError", "disabledDateError", "label", "restoreFocusOnUnmount", "accessibilityLabel", "accessibilityLabelledBy", "calendarIconButtonAccessibilityLabel", "nextArrowAccessibilityLabel", "previousArrowAccessibilityLabel", "compact", "variant", "helperText", "showOverlay", "defaultOpen", "calendarStyle", "calendarClassName", "dateInputStyle", "dateInputClassName", "onOpen", "onClose", "onConfirm", "onCancel", "onChange"];
1
+ const _excluded = ["date", "onChangeDate", "error", "onErrorDate", "required", "disabled", "seedDate", "disabledDates", "highlightedDates", "minDate", "maxDate", "requiredError", "invalidDateError", "disabledDateError", "label", "restoreFocusOnUnmount", "accessibilityLabel", "accessibilityLabelledBy", "calendarIconButtonAccessibilityLabel", "nextArrowAccessibilityLabel", "previousArrowAccessibilityLabel", "compact", "variant", "helperText", "showOverlay", "defaultOpen", "calendarStyle", "calendarClassName", "dateInputStyle", "dateInputClassName", "width", "onOpen", "onClose", "onConfirm", "onCancel", "onChange"];
2
2
  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; }
3
3
  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; }
4
4
  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; }
@@ -6,13 +6,13 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
6
6
  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; }
7
7
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
8
8
  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); }
9
- import React, { forwardRef, memo, useCallback, useMemo, useRef, useState } from 'react';
9
+ import { forwardRef, memo, useCallback, useMemo, useRef, useState } from 'react';
10
10
  import { animateDropdownOpacityInConfig, animateDropdownOpacityOutConfig, animateDropdownTransformInConfig, animateDropdownTransformOutConfig } from '@coinbase/cds-common/animation/dropdown';
11
11
  import { getISOStringLocal } from '@coinbase/cds-common/dates/getISOStringLocal';
12
12
  import { zIndex } from '@coinbase/cds-common/tokens/zIndex';
13
13
  import { m as motion } from 'framer-motion';
14
14
  import { InputIconButton } from '../controls/InputIconButton';
15
- import { VStack } from '../layout/VStack';
15
+ import { Box, VStack } from '../layout';
16
16
  import { getMotionProps } from '../motion/useMotionProps';
17
17
  import { Popover } from '../overlays/popover/Popover';
18
18
  import { Calendar } from './Calendar';
@@ -64,6 +64,7 @@ export const DatePicker = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref)
64
64
  calendarClassName,
65
65
  dateInputStyle,
66
66
  dateInputClassName,
67
+ width = '100%',
67
68
  onOpen,
68
69
  onClose,
69
70
  onConfirm,
@@ -172,9 +173,11 @@ export const DatePicker = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref)
172
173
  style: calendarStyle
173
174
  })
174
175
  })), [date, disabled, seedDate, disabledDates, highlightedDates, minDate, maxDate, disabledDateError, handleConfirmCalendarDate, calendarRef, calendarStyle, calendarClassName, nextArrowAccessibilityLabel, previousArrowAccessibilityLabel]);
175
- return /*#__PURE__*/_jsx("div", {
176
+ return /*#__PURE__*/_jsx(Box, {
176
177
  ref: ref,
178
+ width: width,
177
179
  children: /*#__PURE__*/_jsx(Popover, {
180
+ block: true,
178
181
  respectNegativeTabIndex: true,
179
182
  content: calendar,
180
183
  contentPosition: calendarPopoverPosition,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coinbase/cds-web",
3
- "version": "8.21.3",
3
+ "version": "8.21.5",
4
4
  "description": "Coinbase Design System - Web",
5
5
  "repository": {
6
6
  "type": "git",
@@ -147,9 +147,9 @@
147
147
  "react-dom": "^18.3.1"
148
148
  },
149
149
  "dependencies": {
150
- "@coinbase/cds-common": "^8.21.3",
151
- "@coinbase/cds-icons": "^5.6.0",
152
- "@coinbase/cds-illustrations": "^4.27.0",
150
+ "@coinbase/cds-common": "^8.21.5",
151
+ "@coinbase/cds-icons": "^5.7.0",
152
+ "@coinbase/cds-illustrations": "^4.28.0",
153
153
  "@coinbase/cds-lottie-files": "^3.3.3",
154
154
  "@coinbase/cds-utils": "^2.3.4",
155
155
  "@floating-ui/react-dom": "^2.1.1",