@coinbase/cds-web 8.57.1 → 8.59.0
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 +13 -0
- package/dts/alpha/combobox/Combobox.d.ts +1 -1
- package/dts/alpha/combobox/Combobox.d.ts.map +1 -1
- package/dts/alpha/combobox/DefaultComboboxControl.d.ts.map +1 -1
- package/dts/alpha/select/DefaultSelectControl.d.ts.map +1 -1
- package/dts/alpha/select/Select.d.ts.map +1 -1
- package/dts/alpha/select/types.d.ts +1 -0
- package/dts/alpha/select/types.d.ts.map +1 -1
- package/dts/controls/Checkbox.d.ts +5 -0
- package/dts/controls/Checkbox.d.ts.map +1 -1
- package/dts/controls/CheckboxCell.d.ts +5 -0
- package/dts/controls/CheckboxCell.d.ts.map +1 -1
- package/dts/controls/NativeInput.d.ts +13 -28
- package/dts/controls/NativeInput.d.ts.map +1 -1
- package/dts/controls/Radio.d.ts +10 -0
- package/dts/controls/Radio.d.ts.map +1 -1
- package/dts/controls/SearchInput.d.ts +5 -69
- package/dts/controls/SearchInput.d.ts.map +1 -1
- package/dts/controls/TextInput.d.ts +53 -144
- package/dts/controls/TextInput.d.ts.map +1 -1
- package/dts/dates/DateInput.d.ts +1 -8
- package/dts/dates/DateInput.d.ts.map +1 -1
- package/dts/dates/DatePicker.d.ts +1 -114
- package/dts/dates/DatePicker.d.ts.map +1 -1
- package/esm/alpha/combobox/Combobox.js +6 -4
- package/esm/alpha/combobox/DefaultComboboxControl.js +6 -3
- package/esm/alpha/select/DefaultSelectControl.js +4 -3
- package/esm/alpha/select/Select.js +2 -0
- package/esm/controls/Checkbox.css +1 -1
- package/esm/controls/Checkbox.js +8 -3
- package/esm/controls/CheckboxCell.js +3 -1
- package/esm/controls/NativeInput.css +1 -1
- package/esm/controls/NativeInput.js +6 -2
- package/esm/controls/Radio.css +1 -1
- package/esm/controls/Radio.js +13 -5
- package/esm/controls/SearchInput.js +4 -3
- package/esm/controls/TextInput.js +8 -6
- package/package.json +3 -3
package/dts/dates/DateInput.d.ts
CHANGED
|
@@ -13,14 +13,7 @@ export type DateInputProps = DateInputBaseProps &
|
|
|
13
13
|
};
|
|
14
14
|
export declare const DateInput: React.MemoExoticComponent<
|
|
15
15
|
React.ForwardRefExoticComponent<
|
|
16
|
-
Omit<
|
|
17
|
-
Omit<TextInputBaseProps, 'style' | 'defaultValue' | 'value' | 'inputNode'> & {
|
|
18
|
-
/** Date format separator character, e.g. the / in "MM/DD/YYYY". Defaults to forward slash (/). */
|
|
19
|
-
separator?: string;
|
|
20
|
-
} & {
|
|
21
|
-
className?: string;
|
|
22
|
-
style?: React.CSSProperties;
|
|
23
|
-
} & React.RefAttributes<HTMLInputElement>
|
|
16
|
+
Omit<DateInputProps, 'ref'> & React.RefAttributes<HTMLInputElement>
|
|
24
17
|
>
|
|
25
18
|
>;
|
|
26
19
|
//# sourceMappingURL=DateInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateInput.d.ts","sourceRoot":"","sources":["../../src/dates/DateInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyD,MAAM,OAAO,CAAC;AAE9E,OAAO,EAAE,KAAK,gBAAgB,EAAgB,MAAM,yCAAyC,CAAC;AAG9F,OAAO,EAAa,KAAK,kBAAkB,EAAE,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAGhG,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,GACvE,IAAI,CAAC,kBAAkB,EAAE,WAAW,GAAG,OAAO,GAAG,cAAc,GAAG,OAAO,CAAC,GAAG;IAC3E,kGAAkG;IAClG,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEJ,MAAM,MAAM,cAAc,GAAG,kBAAkB,GAC7C,IAAI,CAAC,cAAc,EAAE,WAAW,GAAG,OAAO,GAAG,cAAc,GAAG,OAAO,CAAC,GAAG;IACvE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B,CAAC;AAEJ,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"DateInput.d.ts","sourceRoot":"","sources":["../../src/dates/DateInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyD,MAAM,OAAO,CAAC;AAE9E,OAAO,EAAE,KAAK,gBAAgB,EAAgB,MAAM,yCAAyC,CAAC;AAG9F,OAAO,EAAa,KAAK,kBAAkB,EAAE,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAGhG,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,GACvE,IAAI,CAAC,kBAAkB,EAAE,WAAW,GAAG,OAAO,GAAG,cAAc,GAAG,OAAO,CAAC,GAAG;IAC3E,kGAAkG;IAClG,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEJ,MAAM,MAAM,cAAc,GAAG,kBAAkB,GAC7C,IAAI,CAAC,cAAc,EAAE,WAAW,GAAG,OAAO,GAAG,cAAc,GAAG,OAAO,CAAC,GAAG;IACvE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B,CAAC;AAEJ,eAAO,MAAM,SAAS,iIAuGrB,CAAC"}
|
|
@@ -120,120 +120,7 @@ export type DatePickerProps = DatePickerBaseProps &
|
|
|
120
120
|
};
|
|
121
121
|
export declare const DatePicker: import('react').MemoExoticComponent<
|
|
122
122
|
import('react').ForwardRefExoticComponent<
|
|
123
|
-
|
|
124
|
-
CalendarBaseProps,
|
|
125
|
-
| 'disabled'
|
|
126
|
-
| 'previousArrowAccessibilityLabel'
|
|
127
|
-
| 'nextArrowAccessibilityLabel'
|
|
128
|
-
| 'highlightedDateAccessibilityHint'
|
|
129
|
-
| 'seedDate'
|
|
130
|
-
| 'disabledDates'
|
|
131
|
-
| 'highlightedDates'
|
|
132
|
-
| 'minDate'
|
|
133
|
-
| 'maxDate'
|
|
134
|
-
| 'disabledDateError'
|
|
135
|
-
> & {
|
|
136
|
-
/** Control the date value of the DatePicker. */
|
|
137
|
-
date: Date | null;
|
|
138
|
-
/** Callback function fired when the date changes, e.g. when a valid date is selected or unselected. */
|
|
139
|
-
onChangeDate: (selectedDate: Date | null) => void;
|
|
140
|
-
/** Control the error value of the DatePicker. */
|
|
141
|
-
error: DateInputValidationError | null;
|
|
142
|
-
/** Callback function fired when validation finds an error, e.g. required input fields and impossible or disabled dates. Will always be called after `onChangeDate`. */
|
|
143
|
-
onErrorDate: (error: DateInputValidationError | null) => void;
|
|
144
|
-
/** Callback function fired when the picker is opened. */
|
|
145
|
-
onOpen?: () => void;
|
|
146
|
-
/** Callback function fired when the picker is closed. Will always be called after `onCancel`, `onConfirm`, and `onChangeDate`. */
|
|
147
|
-
onClose?: () => void;
|
|
148
|
-
/** Callback function fired when the user selects a date using the picker. Interacting with the DateInput does not fire this callback. Will always be called before `onClose`. */
|
|
149
|
-
onConfirm?: () => void;
|
|
150
|
-
/** Callback function fired when the user closes the picker without selecting a date. Interacting with the DateInput does not fire this callback. Will always be called before `onClose`. */
|
|
151
|
-
onCancel?: () => void;
|
|
152
|
-
/**
|
|
153
|
-
* Accessibility label describing the calendar IconButton, which opens the calendar when pressed.
|
|
154
|
-
* @deprecated Use openCalendarAccessibilityLabel/closeCalendarAccessibilityLabel instead. This will be removed in a future major release.
|
|
155
|
-
* @deprecationExpectedRemoval v9
|
|
156
|
-
*/
|
|
157
|
-
calendarIconButtonAccessibilityLabel?: string;
|
|
158
|
-
/**
|
|
159
|
-
* Accessibility label for the calendar IconButton when the popover is closed (opens the calendar when pressed).
|
|
160
|
-
* @default 'Open calendar'
|
|
161
|
-
*/
|
|
162
|
-
openCalendarAccessibilityLabel?: string;
|
|
163
|
-
/**
|
|
164
|
-
* Accessibility label for the calendar IconButton when the popover is open (closes the calendar when pressed).
|
|
165
|
-
* @default 'Close calendar'
|
|
166
|
-
*/
|
|
167
|
-
closeCalendarAccessibilityLabel?: string;
|
|
168
|
-
} & Pick<PopoverProps, 'showOverlay'> &
|
|
169
|
-
Omit<
|
|
170
|
-
DateInputProps,
|
|
171
|
-
| 'style'
|
|
172
|
-
| 'className'
|
|
173
|
-
| 'separator'
|
|
174
|
-
| 'date'
|
|
175
|
-
| 'disabledDates'
|
|
176
|
-
| 'minDate'
|
|
177
|
-
| 'maxDate'
|
|
178
|
-
| 'disabledDateError'
|
|
179
|
-
| 'onChangeDate'
|
|
180
|
-
> & {
|
|
181
|
-
/** Control the default open state of the Calendar popover. */
|
|
182
|
-
defaultOpen?: boolean;
|
|
183
|
-
/** Callback function fired when the DateInput text value changes. Prefer to use `onChangeDate` instead. Will always be called before `onChangeDate`. This prop should only be used for edge cases, such as custom error handling. */
|
|
184
|
-
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
185
|
-
/**
|
|
186
|
-
* If `true`, the focus trap will restore focus to the previously focused element when it unmounts.
|
|
187
|
-
*
|
|
188
|
-
* WARNING: If you disable this, you need to ensure that focus is restored properly so it doesn't end up on the body
|
|
189
|
-
* @default true
|
|
190
|
-
*/
|
|
191
|
-
restoreFocusOnUnmount?: boolean;
|
|
192
|
-
/**
|
|
193
|
-
* Custom style to apply to the Calendar container.
|
|
194
|
-
* @deprecated Use `styles.calendar` instead. This will be removed in a future major release.
|
|
195
|
-
* @deprecationExpectedRemoval v9
|
|
196
|
-
*/
|
|
197
|
-
calendarStyle?: React.CSSProperties;
|
|
198
|
-
/**
|
|
199
|
-
* Custom class name to apply to the Calendar container.
|
|
200
|
-
* @deprecated Use `classNames.calendar` instead. This will be removed in a future major release.
|
|
201
|
-
* @deprecationExpectedRemoval v9
|
|
202
|
-
*/
|
|
203
|
-
calendarClassName?: string;
|
|
204
|
-
/**
|
|
205
|
-
* Custom style to apply to the DateInput.
|
|
206
|
-
* @deprecated Use `styles.dateInput` instead. This will be removed in a future major release.
|
|
207
|
-
* @deprecationExpectedRemoval v9
|
|
208
|
-
*/
|
|
209
|
-
dateInputStyle?: React.CSSProperties;
|
|
210
|
-
/**
|
|
211
|
-
* Custom class name to apply to the DateInput.
|
|
212
|
-
* @deprecated Use `classNames.dateInput` instead. This will be removed in a future major release.
|
|
213
|
-
* @deprecationExpectedRemoval v9
|
|
214
|
-
*/
|
|
215
|
-
dateInputClassName?: string;
|
|
216
|
-
/** Custom class names for the DateInput and Calendar subcomponents. */
|
|
217
|
-
classNames?: {
|
|
218
|
-
dateInput?: string;
|
|
219
|
-
calendar?: string;
|
|
220
|
-
calendarHeader?: string;
|
|
221
|
-
calendarTitle?: string;
|
|
222
|
-
calendarNavigation?: string;
|
|
223
|
-
calendarContent?: string;
|
|
224
|
-
calendarDay?: string;
|
|
225
|
-
};
|
|
226
|
-
/** Custom styles for the DateInput and Calendar subcomponents. */
|
|
227
|
-
styles?: {
|
|
228
|
-
dateInput?: React.CSSProperties;
|
|
229
|
-
calendar?: React.CSSProperties;
|
|
230
|
-
calendarHeader?: React.CSSProperties;
|
|
231
|
-
calendarTitle?: React.CSSProperties;
|
|
232
|
-
calendarNavigation?: React.CSSProperties;
|
|
233
|
-
calendarContent?: React.CSSProperties;
|
|
234
|
-
calendarDay?: React.CSSProperties;
|
|
235
|
-
};
|
|
236
|
-
} & import('react').RefAttributes<HTMLDivElement>
|
|
123
|
+
Omit<DatePickerProps, 'ref'> & import('react').RefAttributes<HTMLDivElement>
|
|
237
124
|
>
|
|
238
125
|
>;
|
|
239
126
|
//# sourceMappingURL=DatePicker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../src/dates/DatePicker.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,qDAAqD,CAAC;AAUpG,OAAO,EAEL,KAAK,YAAY,EAClB,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAY,KAA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AAC;KACnC,CAAC;CACH,CAAC;AAmBJ,eAAO,MAAM,UAAU,8JA6QtB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const _excluded = ["ComboboxControlComponent"],
|
|
2
|
-
_excluded2 = ["type", "value", "onChange", "options", "open", "setOpen", "label", "accessibilityLabel", "controlAccessibilityLabel", "defaultOpen", "searchText", "onSearch", "defaultSearchText", "filterFunction", "SelectControlComponent", "ComboboxControlComponent", "hideSearchInput"];
|
|
2
|
+
_excluded2 = ["type", "value", "onChange", "options", "open", "setOpen", "label", "accessibilityLabel", "controlAccessibilityLabel", "defaultOpen", "searchText", "onSearch", "defaultSearchText", "filterFunction", "SelectControlComponent", "ComboboxControlComponent", "hideSearchInput", "font"];
|
|
3
3
|
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; }
|
|
4
4
|
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; }
|
|
5
5
|
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; }
|
|
@@ -68,7 +68,8 @@ const ComboboxBase = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref2, ref) => {
|
|
|
68
68
|
filterFunction,
|
|
69
69
|
SelectControlComponent = DefaultSelectControl,
|
|
70
70
|
ComboboxControlComponent = DefaultComboboxControl,
|
|
71
|
-
hideSearchInput
|
|
71
|
+
hideSearchInput,
|
|
72
|
+
font
|
|
72
73
|
} = _ref2,
|
|
73
74
|
props = _objectWithoutProperties(_ref2, _excluded2);
|
|
74
75
|
const [searchTextInternal, setSearchTextInternal] = useState(defaultSearchText);
|
|
@@ -101,8 +102,9 @@ const ComboboxBase = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref2, ref) => {
|
|
|
101
102
|
const ComboboxControl = useCallback(props => /*#__PURE__*/_jsx(ComboboxControlContextAdapter, _objectSpread(_objectSpread({}, props), {}, {
|
|
102
103
|
ComboboxControlComponent: ComboboxControlComponent,
|
|
103
104
|
SelectControlComponent: SelectControlComponent,
|
|
104
|
-
controlRef: controlRef
|
|
105
|
-
|
|
105
|
+
controlRef: controlRef,
|
|
106
|
+
font: font
|
|
107
|
+
})), [SelectControlComponent, ComboboxControlComponent, font]);
|
|
106
108
|
return /*#__PURE__*/_jsx(ComboboxContext.Provider, {
|
|
107
109
|
value: {
|
|
108
110
|
searchText,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const _excluded = ["SelectControlComponent", "value", "placeholder", "controlRef", "hideSearchInput", "options", "open", "setOpen", "compact", "align", "searchText", "onSearch", "accessibilityLabel"];
|
|
1
|
+
const _excluded = ["SelectControlComponent", "value", "placeholder", "controlRef", "hideSearchInput", "options", "open", "setOpen", "compact", "align", "searchText", "onSearch", "font", "accessibilityLabel"];
|
|
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; }
|
|
@@ -29,6 +29,7 @@ export const DefaultComboboxControl = /*#__PURE__*/memo(_ref => {
|
|
|
29
29
|
align,
|
|
30
30
|
searchText,
|
|
31
31
|
onSearch,
|
|
32
|
+
font = 'body',
|
|
32
33
|
accessibilityLabel
|
|
33
34
|
} = _ref,
|
|
34
35
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
@@ -60,6 +61,7 @@ export const DefaultComboboxControl = /*#__PURE__*/memo(_ref => {
|
|
|
60
61
|
accessibilityLabel: computedAccessibilityLabel,
|
|
61
62
|
align: align,
|
|
62
63
|
compact: compact,
|
|
64
|
+
font: font,
|
|
63
65
|
open: open,
|
|
64
66
|
options: options,
|
|
65
67
|
role: "combobox",
|
|
@@ -72,6 +74,7 @@ export const DefaultComboboxControl = /*#__PURE__*/memo(_ref => {
|
|
|
72
74
|
width: "100%",
|
|
73
75
|
children: /*#__PURE__*/_jsx(NativeInput, {
|
|
74
76
|
ref: searchInputRef,
|
|
77
|
+
font: font,
|
|
75
78
|
onChange: handleSearchChange,
|
|
76
79
|
onClick: handleSearchClick,
|
|
77
80
|
onKeyDown: event => {
|
|
@@ -86,7 +89,7 @@ export const DefaultComboboxControl = /*#__PURE__*/memo(_ref => {
|
|
|
86
89
|
style: {
|
|
87
90
|
paddingLeft: 0,
|
|
88
91
|
paddingRight: 0,
|
|
89
|
-
height: hasValue ?
|
|
92
|
+
height: !hasValue ? compact ? 40 : 48 : undefined,
|
|
90
93
|
minWidth: 0,
|
|
91
94
|
flexGrow: 1,
|
|
92
95
|
width: '100%',
|
|
@@ -103,7 +106,7 @@ export const DefaultComboboxControl = /*#__PURE__*/memo(_ref => {
|
|
|
103
106
|
as: "p",
|
|
104
107
|
color: "fgMuted",
|
|
105
108
|
display: "block",
|
|
106
|
-
font:
|
|
109
|
+
font: font,
|
|
107
110
|
overflow: "truncate",
|
|
108
111
|
paddingY: 0,
|
|
109
112
|
textAlign: align,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const _excluded = ["role", "type", "options", "value", "onChange", "open", "placeholder", "disabled", "setOpen", "variant", "helperText", "label", "labelVariant", "contentNode", "startNode", "endNode", "compact", "blendStyles", "align", "bordered", "borderWidth", "focusedBorderWidth", "maxSelectedOptionsToShow", "hiddenSelectedOptionsLabel", "removeSelectedOptionAccessibilityLabel", "accessibilityLabel", "ariaHaspopup", "tabIndex", "styles", "classNames"];
|
|
1
|
+
const _excluded = ["role", "type", "options", "value", "onChange", "open", "placeholder", "disabled", "setOpen", "variant", "helperText", "label", "labelVariant", "contentNode", "startNode", "endNode", "compact", "blendStyles", "align", "font", "bordered", "borderWidth", "focusedBorderWidth", "maxSelectedOptionsToShow", "hiddenSelectedOptionsLabel", "removeSelectedOptionAccessibilityLabel", "accessibilityLabel", "ariaHaspopup", "tabIndex", "styles", "classNames"];
|
|
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; }
|
|
@@ -57,6 +57,7 @@ const DefaultSelectControlComponent = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(
|
|
|
57
57
|
compact,
|
|
58
58
|
blendStyles,
|
|
59
59
|
align = 'start',
|
|
60
|
+
font = 'body',
|
|
60
61
|
bordered = true,
|
|
61
62
|
borderWidth = bordered ? 100 : 0,
|
|
62
63
|
focusedBorderWidth = bordered ? undefined : 200,
|
|
@@ -219,13 +220,13 @@ const DefaultSelectControlComponent = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(
|
|
|
219
220
|
as: "p",
|
|
220
221
|
color: hasValue ? 'fg' : 'fgMuted',
|
|
221
222
|
display: "block",
|
|
222
|
-
font:
|
|
223
|
+
font: font,
|
|
223
224
|
overflow: "truncate",
|
|
224
225
|
textAlign: align,
|
|
225
226
|
width: "100%",
|
|
226
227
|
children: singleValueContent
|
|
227
228
|
}) : singleValueContent;
|
|
228
|
-
}, [hasValue, isMultiSelect, singleValueContent, align, value, maxSelectedOptionsToShow, hiddenSelectedOptionsLabel, optionsMap, removeSelectedOptionAccessibilityLabel, handleUnselectValue]);
|
|
229
|
+
}, [hasValue, isMultiSelect, singleValueContent, font, align, value, maxSelectedOptionsToShow, hiddenSelectedOptionsLabel, optionsMap, removeSelectedOptionAccessibilityLabel, handleUnselectValue]);
|
|
229
230
|
const inputNode = useMemo(() => /*#__PURE__*/_jsxs(Pressable, {
|
|
230
231
|
ref: controlPressableRef,
|
|
231
232
|
noScaleOnPress: true,
|
|
@@ -59,6 +59,7 @@ const SelectBase = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
59
59
|
media,
|
|
60
60
|
end,
|
|
61
61
|
align,
|
|
62
|
+
font,
|
|
62
63
|
bordered = true,
|
|
63
64
|
SelectOptionComponent = DefaultSelectOption,
|
|
64
65
|
SelectAllOptionComponent = DefaultSelectAllOption,
|
|
@@ -155,6 +156,7 @@ const SelectBase = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
155
156
|
compact: compact,
|
|
156
157
|
disabled: disabled,
|
|
157
158
|
endNode: endNode,
|
|
159
|
+
font: font,
|
|
158
160
|
helperText: helperText,
|
|
159
161
|
hiddenSelectedOptionsLabel: hiddenSelectedOptionsLabel,
|
|
160
162
|
label: label,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer cds{.checkboxCss-c198zdvk{position:relative;
|
|
1
|
+
@layer cds{.checkboxCss-c198zdvk{position:relative;border-style:solid;-webkit-transition: border-color, background-color 0.1s linear;transition: border-color, background-color 0.1s linear;}.checkboxCss-c198zdvk:focus{outline:none;}.checkboxCss-c198zdvk:focus-visible{outline-style:solid;outline-width:2px;outline-color:var(--color-bgPrimary);outline-offset:2px;}}
|
package/esm/controls/Checkbox.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const _excluded = ["children", "checked", "indeterminate", "controlColor", "background", "borderColor", "borderRadius", "borderWidth", "elevation"];
|
|
1
|
+
const _excluded = ["children", "checked", "indeterminate", "controlColor", "background", "borderColor", "borderRadius", "borderWidth", "elevation", "controlSize"];
|
|
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; }
|
|
@@ -26,12 +26,13 @@ const CheckboxWithRef = /*#__PURE__*/forwardRef(function CheckboxWithRef(_ref, r
|
|
|
26
26
|
borderColor = checked || indeterminate ? 'bgPrimary' : 'bgLineHeavy',
|
|
27
27
|
borderRadius = 100,
|
|
28
28
|
borderWidth = 100,
|
|
29
|
-
elevation
|
|
29
|
+
elevation,
|
|
30
|
+
controlSize
|
|
30
31
|
} = _ref,
|
|
31
32
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
32
33
|
const filled = checked || indeterminate;
|
|
33
34
|
const theme = useTheme();
|
|
34
|
-
const checkboxSize = theme.controlSize.checkboxSize;
|
|
35
|
+
const checkboxSize = controlSize !== null && controlSize !== void 0 ? controlSize : theme.controlSize.checkboxSize;
|
|
35
36
|
const iconPadding = checkboxSize / 5;
|
|
36
37
|
const iconSize = checkboxSize - iconPadding;
|
|
37
38
|
const innerContainerMotionProps = useMotionProps({
|
|
@@ -67,6 +68,10 @@ const CheckboxWithRef = /*#__PURE__*/forwardRef(function CheckboxWithRef(_ref, r
|
|
|
67
68
|
flexShrink: 0,
|
|
68
69
|
justifyContent: "center",
|
|
69
70
|
role: "presentation",
|
|
71
|
+
style: {
|
|
72
|
+
width: checkboxSize,
|
|
73
|
+
height: checkboxSize
|
|
74
|
+
},
|
|
70
75
|
testID: "checkbox-outer",
|
|
71
76
|
children: /*#__PURE__*/_jsx(motion.div, _objectSpread(_objectSpread({}, innerContainerMotionProps), {}, {
|
|
72
77
|
"data-testid": "checkbox-inner",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const _excluded = ["title", "description", "checked", "onChange", "disabled", "columnGap", "rowGap", "padding", "borderWidth", "borderRadius", "titleId", "descriptionId", "testID", "style", "value", "noScaleOnPress", "readOnly", "indeterminate", "className", "classNames", "styles"];
|
|
1
|
+
const _excluded = ["title", "description", "checked", "onChange", "disabled", "columnGap", "rowGap", "padding", "borderWidth", "borderRadius", "titleId", "descriptionId", "testID", "style", "value", "noScaleOnPress", "readOnly", "indeterminate", "controlSize", "className", "classNames", "styles"];
|
|
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; }
|
|
@@ -35,6 +35,7 @@ const CheckboxCellWithRef = /*#__PURE__*/forwardRef(function CheckboxCell(_ref,
|
|
|
35
35
|
noScaleOnPress = true,
|
|
36
36
|
readOnly,
|
|
37
37
|
indeterminate,
|
|
38
|
+
controlSize,
|
|
38
39
|
className,
|
|
39
40
|
classNames,
|
|
40
41
|
styles
|
|
@@ -78,6 +79,7 @@ const CheckboxCellWithRef = /*#__PURE__*/forwardRef(function CheckboxCell(_ref,
|
|
|
78
79
|
"aria-describedby": ariaDescribedBy,
|
|
79
80
|
"aria-labelledby": ariaLabelledBy,
|
|
80
81
|
checked: !!checked,
|
|
82
|
+
controlSize: controlSize,
|
|
81
83
|
disabled: disabled,
|
|
82
84
|
indeterminate: indeterminate,
|
|
83
85
|
onChange: onChange,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
@layer cds{.baseCss-bgba8xt{
|
|
1
|
+
@layer cds{.baseCss-bgba8xt{min-width:0;-webkit-box-flex:2;-webkit-flex-grow:2;-ms-flex-positive:2;flex-grow:2;background-color:transparent;color:var(--color-fg);border-color:transparent;}.baseCss-bgba8xt::-webkit-outer-spin-button,.baseCss-bgba8xt::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}.baseCss-bgba8xt:focus{outline-style:none;box-shadow:none;border-color:transparent;}.baseCss-bgba8xt::-webkit-input-placeholder{color:var(--color-fgMuted);opacity:1;}.baseCss-bgba8xt::-moz-placeholder{color:var(--color-fgMuted);opacity:1;}.baseCss-bgba8xt:-ms-input-placeholder{color:var(--color-fgMuted);opacity:1;}.baseCss-bgba8xt::placeholder{color:var(--color-fgMuted);opacity:1;}.baseCss-bgba8xt[type='number']{-moz-appearance:textfield;}.baseCss-bgba8xt[readonly]:not(:disabled){background-color:var(--color-bgSecondary);}.baseCss-bgba8xt[type='search']::-ms-clear{display:none;width:0;height:0;}.baseCss-bgba8xt[type='search']::-ms-reveal{display:none;width:0;height:0;}.baseCss-bgba8xt[type='search']::-webkit-search-decoration,.baseCss-bgba8xt[type='search']::-webkit-search-cancel-button,.baseCss-bgba8xt[type='search']::-webkit-search-results-button,.baseCss-bgba8xt[type='search']::-webkit-search-results-decoration{display:none;}.baseCss-bgba8xt:-webkit-autofill,.baseCss-bgba8xt:-webkit-autofill:hover,.baseCss-bgba8xt:-webkit-autofill:focus,.baseCss-bgba8xt:-webkit-autofill:active{border-radius:var(--borderRadius-200);-webkit-text-fill-color:var(--color-fg);-webkit-transition:background-color 0s ease-in-out 5000s;transition:background-color 0s ease-in-out 5000s;}
|
|
2
2
|
.originalContainerPaddingCss-o1mz6a5p{padding:var(--space-2);}
|
|
3
3
|
.compactContainerPaddingCss-c1lt56dx{padding:var(--space-1);}}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const _excluded = ["containerSpacing", "testID", "align", "onFocus", "onClick", "onBlur", "onKeyDown", "onChange", "accessibilityLabel", "accessibilityLabelledBy", "accessibilityHint", "compact", "className", "style"];
|
|
1
|
+
const _excluded = ["containerSpacing", "testID", "align", "font", "onFocus", "onClick", "onBlur", "onKeyDown", "onChange", "accessibilityLabel", "accessibilityLabelledBy", "accessibilityHint", "compact", "className", "style"];
|
|
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; }
|
|
@@ -9,6 +9,7 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
|
|
|
9
9
|
import React, { forwardRef, memo, useMemo } from 'react';
|
|
10
10
|
import { cx } from '../cx';
|
|
11
11
|
import { useTheme } from '../hooks/useTheme';
|
|
12
|
+
import { Box } from '../layout';
|
|
12
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
14
|
const baseCss = "baseCss-bgba8xt";
|
|
14
15
|
const originalContainerPaddingCss = "originalContainerPaddingCss-o1mz6a5p";
|
|
@@ -18,6 +19,7 @@ export const NativeInput = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function Na
|
|
|
18
19
|
containerSpacing,
|
|
19
20
|
testID,
|
|
20
21
|
align = 'start',
|
|
22
|
+
font = 'body',
|
|
21
23
|
onFocus,
|
|
22
24
|
onClick,
|
|
23
25
|
onBlur,
|
|
@@ -39,13 +41,15 @@ export const NativeInput = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function Na
|
|
|
39
41
|
textAlign: align,
|
|
40
42
|
colorScheme: activeColorScheme
|
|
41
43
|
}, style), [align, activeColorScheme, style]);
|
|
42
|
-
return /*#__PURE__*/_jsx(
|
|
44
|
+
return /*#__PURE__*/_jsx(Box, _objectSpread({
|
|
43
45
|
ref: ref,
|
|
44
46
|
"aria-describedby": accessibilityHint,
|
|
45
47
|
"aria-label": accessibilityLabel,
|
|
46
48
|
"aria-labelledby": accessibilityLabelledBy,
|
|
49
|
+
as: "input",
|
|
47
50
|
className: cx(baseCss, containerSpacing !== null && containerSpacing !== void 0 ? containerSpacing : defaultContainerPadding, className),
|
|
48
51
|
"data-testid": testID,
|
|
52
|
+
font: font,
|
|
49
53
|
onBlur: onBlur,
|
|
50
54
|
onChange: onChange,
|
|
51
55
|
onClick: onClick,
|
package/esm/controls/Radio.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer cds{.baseCss-b1rohblb{position:relative;-webkit-appearance:radio;-moz-appearance:radio;appearance:radio;
|
|
1
|
+
@layer cds{.baseCss-b1rohblb{position:relative;-webkit-appearance:radio;-moz-appearance:radio;appearance:radio;border-style:solid;border-radius:var(--borderRadius-1000);-webkit-transition:border-color 0.2s linear;transition:border-color 0.2s linear;}.baseCss-b1rohblb:focus{outline:none;}.baseCss-b1rohblb:focus-visible{outline-style:solid;outline-width:2px;outline-color:var(--color-bgPrimary);outline-offset:2px;}}
|
package/esm/controls/Radio.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const _excluded = ["children", "controlColor", "checked", "background", "borderColor", "borderWidth", "elevation"];
|
|
1
|
+
const _excluded = ["children", "controlColor", "checked", "background", "borderColor", "borderWidth", "elevation", "controlSize", "dotSize"];
|
|
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; }
|
|
@@ -17,7 +17,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
17
17
|
const DotSvg = _ref => {
|
|
18
18
|
let {
|
|
19
19
|
color = 'black',
|
|
20
|
-
width = 20
|
|
20
|
+
width = 20,
|
|
21
|
+
dotSize = 2 * width / 3
|
|
21
22
|
} = _ref;
|
|
22
23
|
return /*#__PURE__*/_jsx("svg", {
|
|
23
24
|
fill: "none",
|
|
@@ -28,7 +29,7 @@ const DotSvg = _ref => {
|
|
|
28
29
|
cx: "50%",
|
|
29
30
|
cy: "50%",
|
|
30
31
|
fill: color,
|
|
31
|
-
r:
|
|
32
|
+
r: dotSize / 2
|
|
32
33
|
})
|
|
33
34
|
});
|
|
34
35
|
};
|
|
@@ -41,11 +42,13 @@ const RadioWithRef = /*#__PURE__*/forwardRef(function RadioWithRef(_ref2, ref) {
|
|
|
41
42
|
background = 'bg',
|
|
42
43
|
borderColor = checked ? controlColor : 'bgLineHeavy',
|
|
43
44
|
borderWidth = 100,
|
|
44
|
-
elevation
|
|
45
|
+
elevation,
|
|
46
|
+
controlSize,
|
|
47
|
+
dotSize
|
|
45
48
|
} = _ref2,
|
|
46
49
|
props = _objectWithoutProperties(_ref2, _excluded);
|
|
47
50
|
const theme = useTheme();
|
|
48
|
-
const iconWidth = theme.controlSize.radioSize;
|
|
51
|
+
const iconWidth = controlSize !== null && controlSize !== void 0 ? controlSize : theme.controlSize.radioSize;
|
|
49
52
|
const innerContainerMotionProps = useMotionProps({
|
|
50
53
|
enterConfigs: [checkboxOpacityEnterConfig, checkboxScaleEnterConfig],
|
|
51
54
|
exitConfigs: [checkboxOpacityExitConfig, checkboxScaleExitConfig],
|
|
@@ -68,6 +71,10 @@ const RadioWithRef = /*#__PURE__*/forwardRef(function RadioWithRef(_ref2, ref) {
|
|
|
68
71
|
flexShrink: 0,
|
|
69
72
|
justifyContent: "center",
|
|
70
73
|
role: "presentation",
|
|
74
|
+
style: {
|
|
75
|
+
width: iconWidth,
|
|
76
|
+
height: iconWidth
|
|
77
|
+
},
|
|
71
78
|
children: /*#__PURE__*/_jsx(motion.div, _objectSpread(_objectSpread({}, innerContainerMotionProps), {}, {
|
|
72
79
|
children: checked &&
|
|
73
80
|
/*#__PURE__*/
|
|
@@ -77,6 +84,7 @@ const RadioWithRef = /*#__PURE__*/forwardRef(function RadioWithRef(_ref2, ref) {
|
|
|
77
84
|
testID: "radio-icon",
|
|
78
85
|
children: /*#__PURE__*/_jsx(DotSvg, {
|
|
79
86
|
color: "currentColor",
|
|
87
|
+
dotSize: dotSize,
|
|
80
88
|
width: iconWidth
|
|
81
89
|
})
|
|
82
90
|
})
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const _excluded = ["onChange", "onClear", "onChangeText", "onSearch", "testID", "value", "compact", "hideStartIcon", "hideEndIcon", "startIcon", "end", "startIconAccessibilityLabel", "clearIconAccessibilityLabel"];
|
|
1
|
+
const _excluded = ["onChange", "onClear", "onChangeText", "onSearch", "testID", "value", "compact", "hideStartIcon", "hideEndIcon", "startIcon", "end", "startIconAccessibilityLabel", "clearIconAccessibilityLabel", "borderRadius"];
|
|
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; }
|
|
@@ -34,7 +34,8 @@ export const SearchInput = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function Se
|
|
|
34
34
|
startIcon,
|
|
35
35
|
end,
|
|
36
36
|
startIconAccessibilityLabel = 'Back',
|
|
37
|
-
clearIconAccessibilityLabel = 'Clear search query'
|
|
37
|
+
clearIconAccessibilityLabel = 'Clear search query',
|
|
38
|
+
borderRadius = 1000
|
|
38
39
|
} = _ref,
|
|
39
40
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
40
41
|
const internalRef = useRef(null);
|
|
@@ -59,7 +60,7 @@ export const SearchInput = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function Se
|
|
|
59
60
|
const determineStartIconAccessibilityLabel = useMemo(() => startIcon === 'backArrow' ? startIconAccessibilityLabel : undefined, [startIconAccessibilityLabel, startIcon]);
|
|
60
61
|
return /*#__PURE__*/_jsx(TextInput, _objectSpread({
|
|
61
62
|
ref: refs,
|
|
62
|
-
borderRadius:
|
|
63
|
+
borderRadius: borderRadius,
|
|
63
64
|
className: cx(baseCss, compact && compactCss),
|
|
64
65
|
end: end !== null && end !== void 0 ? end : !!value && !hideEndIcon && /*#__PURE__*/_jsx(Box, {
|
|
65
66
|
marginEnd: compact ? -0.5 : 0,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const _excluded = ["label", "accessibilityLabel", "helperText", "variant", "testID", "testIDMap", "start", "end", "width", "disabled", "align", "compact", "suffix", "onFocus", "onBlur", "borderRadius", "height", "inputNode", "bordered", "focusedBorderWidth", "enableColorSurge", "helperTextErrorIconAccessibilityLabel", "labelVariant", "labelNode", "inputBackground"];
|
|
1
|
+
const _excluded = ["label", "accessibilityLabel", "helperText", "variant", "testID", "testIDMap", "start", "end", "width", "disabled", "align", "font", "compact", "suffix", "onFocus", "onBlur", "borderRadius", "height", "inputNode", "bordered", "focusedBorderWidth", "enableColorSurge", "helperTextErrorIconAccessibilityLabel", "labelVariant", "labelNode", "inputBackground"];
|
|
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; }
|
|
@@ -56,6 +56,7 @@ export const TextInput = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function Text
|
|
|
56
56
|
width = '100%',
|
|
57
57
|
disabled = false,
|
|
58
58
|
align = 'start',
|
|
59
|
+
font = 'body',
|
|
59
60
|
compact = false,
|
|
60
61
|
suffix = '',
|
|
61
62
|
onFocus,
|
|
@@ -71,7 +72,7 @@ export const TextInput = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function Text
|
|
|
71
72
|
labelNode,
|
|
72
73
|
inputBackground
|
|
73
74
|
} = _ref,
|
|
74
|
-
|
|
75
|
+
nativeInputRestProps = _objectWithoutProperties(_ref, _excluded);
|
|
75
76
|
const [focused, setFocused] = useState(false);
|
|
76
77
|
const focusedVariant = useInputVariant(focused, variant);
|
|
77
78
|
const internalRef = useRef();
|
|
@@ -108,11 +109,11 @@ export const TextInput = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function Text
|
|
|
108
109
|
|
|
109
110
|
// Define a distinct read-only style to differentiate it from the disabled style.
|
|
110
111
|
const readOnlyInputBackground = useMemo(() => {
|
|
111
|
-
if (!disabled &&
|
|
112
|
+
if (!disabled && nativeInputRestProps.readOnly) {
|
|
112
113
|
return 'bgSecondary';
|
|
113
114
|
}
|
|
114
115
|
return undefined;
|
|
115
|
-
}, [disabled,
|
|
116
|
+
}, [disabled, nativeInputRestProps.readOnly]);
|
|
116
117
|
const hasLabel = useMemo(() => !!label || !!labelNode, [label, labelNode]);
|
|
117
118
|
const inputElement = useMemo(() => {
|
|
118
119
|
/** Ensures that the renderedInput has the blurring, focusing, disabled features */
|
|
@@ -142,12 +143,13 @@ export const TextInput = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function Text
|
|
|
142
143
|
"data-labelvariant": compact || !hasLabel ? 'outside' : labelVariant,
|
|
143
144
|
"data-start": !!start || compact,
|
|
144
145
|
disabled: disabled,
|
|
146
|
+
font: font,
|
|
145
147
|
id: shouldSetLabelId ? labelId : undefined,
|
|
146
148
|
onBlur: handleOnBlur,
|
|
147
149
|
onFocus: handleOnFocus,
|
|
148
150
|
testID: testID
|
|
149
|
-
},
|
|
150
|
-
}, [inputNode, refs, shouldSetHelperTextId, helperTextId, accessibilityLabel, label, hasLabel, align, variant, compact, labelVariant, start, disabled, shouldSetLabelId, labelId, handleOnBlur, handleOnFocus, testID,
|
|
151
|
+
}, nativeInputRestProps));
|
|
152
|
+
}, [inputNode, refs, shouldSetHelperTextId, helperTextId, accessibilityLabel, label, hasLabel, align, font, variant, compact, labelVariant, start, disabled, shouldSetLabelId, labelId, handleOnBlur, handleOnFocus, testID, nativeInputRestProps]);
|
|
151
153
|
return /*#__PURE__*/_jsx(TextInputFocusVariantContext.Provider, {
|
|
152
154
|
value: focused ? focusedVariant : undefined,
|
|
153
155
|
children: /*#__PURE__*/_jsx(InputStack, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coinbase/cds-web",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.59.0",
|
|
4
4
|
"description": "Coinbase Design System - Web",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -207,9 +207,9 @@
|
|
|
207
207
|
"react-dom": "^18.3.1"
|
|
208
208
|
},
|
|
209
209
|
"dependencies": {
|
|
210
|
-
"@coinbase/cds-common": "^8.
|
|
210
|
+
"@coinbase/cds-common": "^8.59.0",
|
|
211
211
|
"@coinbase/cds-icons": "^5.13.0",
|
|
212
|
-
"@coinbase/cds-illustrations": "^4.
|
|
212
|
+
"@coinbase/cds-illustrations": "^4.36.0",
|
|
213
213
|
"@coinbase/cds-lottie-files": "^3.3.4",
|
|
214
214
|
"@coinbase/cds-utils": "^2.3.5",
|
|
215
215
|
"@floating-ui/react-dom": "^2.1.1",
|