@coinbase/cds-web 9.25.0 → 9.26.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
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { SharedProps } from '@coinbase/cds-common/types/SharedProps';
|
|
3
|
+
import type { TypographyProps } from '@coinbase/cds-common/types/TextBaseProps';
|
|
3
4
|
import { type InteractableBaseProps } from '../system/Interactable';
|
|
4
5
|
import type { FilteredHTMLAttributes, StylesAndClassNames } from '../types';
|
|
5
6
|
/**
|
|
@@ -21,6 +22,7 @@ export type ControlBaseProps<ControlValue extends string> = FilteredHTMLAttribut
|
|
|
21
22
|
'value' | 'color'
|
|
22
23
|
> &
|
|
23
24
|
SharedProps &
|
|
25
|
+
TypographyProps &
|
|
24
26
|
Partial<
|
|
25
27
|
Pick<
|
|
26
28
|
InteractableBaseProps,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Control.d.ts","sourceRoot":"","sources":["../../src/controls/Control.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4C,MAAM,OAAO,CAAC;AAIjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;
|
|
1
|
+
{"version":3,"file":"Control.d.ts","sourceRoot":"","sources":["../../src/controls/Control.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4C,MAAM,OAAO,CAAC;AAIjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAOhF,OAAO,EAAgB,KAAK,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAClF,OAAO,KAAK,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAI5E;;;GAGG;AACH,eAAO,MAAM,iBAAiB;IAC5B,sEAAsE;;IAEtE,wCA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AAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAA;CAAE,KACtE,KAAK,CAAC,YAAY,CAAC;AAExB,eAAO,MAAM,OAAO,EAA2B,OAAO,cAAc,GAClE,KAAK,CAAC,mBAAmB,CAAC,OAAO,cAAc,CAAC,CAAC"}
|
package/dts/controls/Switch.d.ts
CHANGED
package/esm/controls/Control.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const _excluded = ["type", "checked", "disabled", "indeterminate", "readOnly", "required", "value", "children", "label", "aria-labelledby", "background", "borderColor", "borderRadius", "borderWidth", "color", "elevation", "testID", "iconStyle", "labelStyle", "className", "style", "classNames", "styles"];
|
|
1
|
+
const _excluded = ["type", "checked", "disabled", "indeterminate", "readOnly", "required", "value", "children", "label", "aria-labelledby", "background", "borderColor", "borderRadius", "borderWidth", "color", "elevation", "testID", "iconStyle", "labelStyle", "className", "style", "classNames", "styles", "font", "fontFamily", "fontSize", "fontWeight", "lineHeight", "textTransform"];
|
|
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; }
|
|
@@ -62,7 +62,13 @@ const ControlWithRef = /*#__PURE__*/forwardRef(function ControlWithRef(_props, r
|
|
|
62
62
|
className,
|
|
63
63
|
style,
|
|
64
64
|
classNames,
|
|
65
|
-
styles
|
|
65
|
+
styles,
|
|
66
|
+
font = 'body',
|
|
67
|
+
fontFamily = font,
|
|
68
|
+
fontSize = font,
|
|
69
|
+
fontWeight = font,
|
|
70
|
+
lineHeight = font,
|
|
71
|
+
textTransform
|
|
66
72
|
} = mergedProps,
|
|
67
73
|
htmlProps = _objectWithoutProperties(mergedProps, _excluded);
|
|
68
74
|
if (isDevelopment() && !children && !ariaLabelledby) {
|
|
@@ -121,14 +127,19 @@ const ControlWithRef = /*#__PURE__*/forwardRef(function ControlWithRef(_props, r
|
|
|
121
127
|
gap: 1,
|
|
122
128
|
children: [/*#__PURE__*/_jsx(Box, {
|
|
123
129
|
alignItems: "center",
|
|
124
|
-
height: "var(--lineHeight-
|
|
130
|
+
height: "var(--lineHeight-".concat(lineHeight, ")"),
|
|
125
131
|
role: "presentation",
|
|
126
132
|
children: iconElement
|
|
127
133
|
}), typeof label === 'string' ? /*#__PURE__*/_jsx(Text, {
|
|
128
134
|
color: color,
|
|
129
135
|
disabled: disabled || readOnly,
|
|
130
|
-
font:
|
|
136
|
+
font: font,
|
|
137
|
+
fontFamily: fontFamily,
|
|
138
|
+
fontSize: fontSize,
|
|
139
|
+
fontWeight: fontWeight,
|
|
131
140
|
id: labelId,
|
|
141
|
+
lineHeight: lineHeight,
|
|
142
|
+
textTransform: textTransform,
|
|
132
143
|
children: label
|
|
133
144
|
}) : /*#__PURE__*/_jsx(Box, {
|
|
134
145
|
id: labelId,
|
|
@@ -136,7 +147,7 @@ const ControlWithRef = /*#__PURE__*/forwardRef(function ControlWithRef(_props, r
|
|
|
136
147
|
})]
|
|
137
148
|
})
|
|
138
149
|
});
|
|
139
|
-
}, [label, iconElement, inputId, labelStyle, color, disabled, readOnly, labelId, classNames === null || classNames === void 0 ? void 0 : classNames.label, styles === null || styles === void 0 ? void 0 : styles.label]);
|
|
150
|
+
}, [label, iconElement, inputId, labelStyle, color, disabled, readOnly, labelId, classNames === null || classNames === void 0 ? void 0 : classNames.label, styles === null || styles === void 0 ? void 0 : styles.label, font, fontFamily, fontSize, fontWeight, lineHeight, textTransform]);
|
|
140
151
|
|
|
141
152
|
// If no label is provided, consumer should wrap the checkbox with <label> or provide a value for the aria-labelledby prop.
|
|
142
153
|
return /*#__PURE__*/_jsx(Box, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coinbase/cds-web",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.26.0",
|
|
4
4
|
"description": "Coinbase Design System - Web",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -227,7 +227,7 @@
|
|
|
227
227
|
"react-dom": "^18.0.0 || ~19.1.2"
|
|
228
228
|
},
|
|
229
229
|
"dependencies": {
|
|
230
|
-
"@coinbase/cds-common": "^9.
|
|
230
|
+
"@coinbase/cds-common": "^9.26.0",
|
|
231
231
|
"@coinbase/cds-icons": "^5.22.0",
|
|
232
232
|
"@coinbase/cds-illustrations": "^4.48.0",
|
|
233
233
|
"@coinbase/cds-lottie-files": "^3.3.4",
|