@coinbase/cds-web 8.21.4 → 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,12 @@ 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
|
+
|
|
11
17
|
## 8.21.4 (11/18/2025 PST)
|
|
12
18
|
|
|
13
19
|
#### 🐞 Fixes
|
|
@@ -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:
|
|
79
|
-
|
|
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
|
-
|
|
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":"
|
|
1
|
+
{"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../src/dates/DatePicker.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,qDAAqD,CAAC;AASpG,OAAO,EAEL,KAAK,YAAY,EAClB,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAI7D,MAAM,MAAM,eAAe,GAAG;IAC5B,gDAAgD;IAChD,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAClB,uGAAuG;IACvG,YAAY,EAAE,CAAC,YAAY,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;IAClD,iDAAiD;IACjD,KAAK,EAAE,wBAAwB,GAAG,IAAI,CAAC;IACvC,uKAAuK;IACvK,WAAW,EAAE,CAAC,KAAK,EAAE,wBAAwB,GAAG,IAAI,KAAK,IAAI,CAAC;IAC9D,iCAAiC;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,4NAA4N;IAC5N,aAAa,CAAC,EAAE,CAAC,IAAI,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,EAAE,CAAC;IACxC,0JAA0J;IAC1J,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,wJAAwJ;IACxJ,OAAO,CAAC,EAAE,IAAI,CAAC;IACf;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,8DAA8D;IAC9D,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,sOAAsO;IACtO,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAChE,oEAAoE;IACpE,MAAM,CAAC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AChD,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"}
|
package/esm/dates/DatePicker.js
CHANGED
|
@@ -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
|
|
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
|
|
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(
|
|
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
|
+
"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.
|
|
151
|
-
"@coinbase/cds-icons": "^5.
|
|
152
|
-
"@coinbase/cds-illustrations": "^4.
|
|
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",
|