@deque/cauldron-react 3.0.0 → 3.0.1-canary.5ac97228
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/lib/components/Address/index.d.ts +38 -0
- package/lib/components/Icon/types.d.ts +1 -1
- package/lib/components/Tabs/Tabs.d.ts +1 -0
- package/lib/components/Tooltip/index.d.ts +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +47 -10
- package/lib/magnifying-glass-2907fb77.js +23 -0
- package/lib/types.d.ts +7 -0
- package/package.json +2 -2
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
interface AddressProps extends React.HTMLAttributes<HTMLElement> {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export declare const Address: {
|
|
7
|
+
({ children, className, ...other }: AddressProps): JSX.Element;
|
|
8
|
+
displayName: string;
|
|
9
|
+
propTypes: {
|
|
10
|
+
children: PropTypes.Validator<string | number | boolean | {} | PropTypes.ReactElementLike | PropTypes.ReactNodeArray>;
|
|
11
|
+
className: PropTypes.Requireable<string>;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
declare type AddressLineProps = React.HTMLAttributes<HTMLElement>;
|
|
15
|
+
export declare const AddressLine: {
|
|
16
|
+
({ children, className, ...other }: AddressLineProps): false | JSX.Element;
|
|
17
|
+
displayName: string;
|
|
18
|
+
propTypes: {
|
|
19
|
+
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
20
|
+
className: PropTypes.Requireable<string>;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
interface AddressCityStateZipProps extends React.HTMLAttributes<HTMLElement> {
|
|
24
|
+
city: React.ReactNode;
|
|
25
|
+
state: React.ReactNode;
|
|
26
|
+
zip: React.ReactNode;
|
|
27
|
+
}
|
|
28
|
+
export declare const AddressCityStateZip: {
|
|
29
|
+
({ city, state, zip, className, ...other }: AddressCityStateZipProps): false | JSX.Element;
|
|
30
|
+
displayName: string;
|
|
31
|
+
propTypes: {
|
|
32
|
+
city: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
33
|
+
state: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
34
|
+
zip: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
35
|
+
className: PropTypes.Requireable<string>;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
export {};
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
* GENERATED CODE. DO NOT EDIT DIRECTLY!
|
|
3
3
|
*/
|
|
4
4
|
/** IconType represents each valid icon type. */
|
|
5
|
-
export declare type IconType = 'add-user' | 'arrow-circle-up' | 'arrow-circle-down' | 'arrow-circle-left' | 'arrow-circle-right' | 'arrow-up' | 'arrow-down' | 'arrow-left' | 'arrow-right' | 'arrows-alt' | 'bolt' | 'caution' | 'check-circle' | 'check-shield' | 'check-solid' | 'check' | 'checkbox-checked' | 'checkbox-unchecked' | 'chevron-double-up' | 'chevron-double-down' | 'chevron-double-left' | 'chevron-double-right' | 'chevron-up' | 'chevron-down' | 'chevron-left' | 'chevron-right' | 'close' | 'code' | 'copy' | 'download' | 'exchange' | 'external-link' | 'eye' | 'filter' | 'flag' | 'gears' | 'grid' | 'hamburger-menu' | 'highlight' | 'info-circle-alt' | 'info-circle' | 'info-square' | 'kabob' | 'list' | 'lock' | 'menu' | 'new-releases' | 'new' | 'no' | 'pencil' | 'plus' | 'question-circle' | 'radio-checked' | 'radio-unchecked' | 'recycle' | 'robot' | 'run-again' | 'save' | 'share' | 'sort' | 'star' | 'sun' | 'tag' | 'target' | 'trash' | 'triangle-up' | 'triangle-down' | 'triangle-left' | 'triangle-right' | 'upload';
|
|
5
|
+
export declare type IconType = 'add-user' | 'arrow-circle-up' | 'arrow-circle-down' | 'arrow-circle-left' | 'arrow-circle-right' | 'arrow-up' | 'arrow-down' | 'arrow-left' | 'arrow-right' | 'arrows-alt' | 'bolt' | 'caution' | 'check-circle' | 'check-shield' | 'check-solid' | 'check' | 'checkbox-checked' | 'checkbox-unchecked' | 'chevron-double-up' | 'chevron-double-down' | 'chevron-double-left' | 'chevron-double-right' | 'chevron-up' | 'chevron-down' | 'chevron-left' | 'chevron-right' | 'close' | 'code' | 'copy' | 'download' | 'exchange' | 'external-link' | 'eye' | 'filter' | 'flag' | 'gears' | 'grid' | 'hamburger-menu' | 'highlight' | 'info-circle-alt' | 'info-circle' | 'info-square' | 'kabob' | 'list' | 'lock' | 'magnifying-glass' | 'menu' | 'new-releases' | 'new' | 'no' | 'pencil' | 'plus' | 'question-circle' | 'radio-checked' | 'radio-unchecked' | 'recycle' | 'robot' | 'run-again' | 'save' | 'share' | 'sort' | 'star' | 'sun' | 'tag' | 'target' | 'trash' | 'triangle-up' | 'triangle-down' | 'triangle-left' | 'triangle-right' | 'upload';
|
|
6
6
|
/** iconTypes holds each valid icon type. */
|
|
7
7
|
export declare const iconTypes: string[];
|
|
@@ -11,7 +11,7 @@ export interface TooltipProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
11
11
|
portal?: React.RefObject<HTMLElement> | HTMLElement;
|
|
12
12
|
hideElementOnHidden?: boolean;
|
|
13
13
|
}
|
|
14
|
-
declare function Tooltip({ id: propId, placement: initialPlacement, children, portal, target, association, variant, show: showProp, hideElementOnHidden, ...props }: TooltipProps): React.ReactPortal | null;
|
|
14
|
+
declare function Tooltip({ id: propId, placement: initialPlacement, children, portal, target, association, variant, show: showProp, hideElementOnHidden, className, ...props }: TooltipProps): React.ReactPortal | null;
|
|
15
15
|
declare namespace Tooltip {
|
|
16
16
|
var displayName: string;
|
|
17
17
|
var propTypes: {
|
package/lib/index.d.ts
CHANGED
|
@@ -43,6 +43,7 @@ export { DescriptionList, DescriptionListItem, DescriptionTerm, DescriptionDetai
|
|
|
43
43
|
export { default as Stepper, Step } from './components/Stepper';
|
|
44
44
|
export { default as Panel } from './components/Panel';
|
|
45
45
|
export { default as ProgressBar } from './components/ProgressBar';
|
|
46
|
+
export { Address, AddressLine, AddressCityStateZip } from './components/Address';
|
|
46
47
|
/**
|
|
47
48
|
* Helpers / Utils
|
|
48
49
|
*/
|
package/lib/index.js
CHANGED
|
@@ -162,6 +162,7 @@ var iconTypes = [
|
|
|
162
162
|
'kabob',
|
|
163
163
|
'list',
|
|
164
164
|
'lock',
|
|
165
|
+
'magnifying-glass',
|
|
165
166
|
'menu',
|
|
166
167
|
'new-releases',
|
|
167
168
|
'new',
|
|
@@ -224,6 +225,7 @@ function __variableDynamicImportRuntime0__(path) {
|
|
|
224
225
|
case './icons/kabob.svg': return Promise.resolve().then(function () { return require('./kabob-692fdc00.js'); });
|
|
225
226
|
case './icons/list.svg': return Promise.resolve().then(function () { return require('./list-8fbd8209.js'); });
|
|
226
227
|
case './icons/lock.svg': return Promise.resolve().then(function () { return require('./lock-bd0122db.js'); });
|
|
228
|
+
case './icons/magnifying-glass.svg': return Promise.resolve().then(function () { return require('./magnifying-glass-2907fb77.js'); });
|
|
227
229
|
case './icons/menu.svg': return Promise.resolve().then(function () { return require('./menu-2f2be7c2.js'); });
|
|
228
230
|
case './icons/new-releases.svg': return Promise.resolve().then(function () { return require('./new-releases-ac749bdd.js'); });
|
|
229
231
|
case './icons/new.svg': return Promise.resolve().then(function () { return require('./new-6c3ac7d7.js'); });
|
|
@@ -1465,7 +1467,7 @@ var fireCustomEvent = function (show, button) {
|
|
|
1465
1467
|
};
|
|
1466
1468
|
function Tooltip(_a) {
|
|
1467
1469
|
var _this = this;
|
|
1468
|
-
var propId = _a.id, _b = _a.placement, initialPlacement = _b === void 0 ? 'auto' : _b, children = _a.children, portal = _a.portal, target = _a.target, _c = _a.association, association = _c === void 0 ? 'aria-describedby' : _c, _d = _a.variant, variant = _d === void 0 ? 'text' : _d, _e = _a.show, showProp = _e === void 0 ? false : _e, _f = _a.hideElementOnHidden, hideElementOnHidden = _f === void 0 ? false : _f, props = tslib.__rest(_a, ["id", "placement", "children", "portal", "target", "association", "variant", "show", "hideElementOnHidden"]);
|
|
1470
|
+
var propId = _a.id, _b = _a.placement, initialPlacement = _b === void 0 ? 'auto' : _b, children = _a.children, portal = _a.portal, target = _a.target, _c = _a.association, association = _c === void 0 ? 'aria-describedby' : _c, _d = _a.variant, variant = _d === void 0 ? 'text' : _d, _e = _a.show, showProp = _e === void 0 ? false : _e, _f = _a.hideElementOnHidden, hideElementOnHidden = _f === void 0 ? false : _f, className = _a.className, props = tslib.__rest(_a, ["id", "placement", "children", "portal", "target", "association", "variant", "show", "hideElementOnHidden", "className"]);
|
|
1469
1471
|
var id = (propId ? [propId] : nextId.useId(1, 'tooltip'))[0];
|
|
1470
1472
|
var hovering = React.useRef(false);
|
|
1471
1473
|
var _g = React.useState(initialPlacement), placement = _g[0], setPlacement = _g[1];
|
|
@@ -1586,7 +1588,7 @@ function Tooltip(_a) {
|
|
|
1586
1588
|
}
|
|
1587
1589
|
}, [targetElement, id]);
|
|
1588
1590
|
return showTooltip || hideElementOnHidden
|
|
1589
|
-
? reactDom.createPortal(React__default.createElement("div", tslib.__assign({ id: id, className: classNames('Tooltip', "Tooltip--" + placement, {
|
|
1591
|
+
? reactDom.createPortal(React__default.createElement("div", tslib.__assign({ id: id, className: classNames('Tooltip', "Tooltip--" + placement, className, {
|
|
1590
1592
|
TooltipInfo: variant === 'info',
|
|
1591
1593
|
'Tooltip--hidden': !showTooltip && hideElementOnHidden,
|
|
1592
1594
|
'Tooltip--big': variant === 'big'
|
|
@@ -2294,13 +2296,13 @@ var RadioGroup = function (_a) {
|
|
|
2294
2296
|
handleChange(radioValue);
|
|
2295
2297
|
onChange(radio, (_a = inputs.current) === null || _a === void 0 ? void 0 : _a[index]);
|
|
2296
2298
|
}, disabled: disabled, checked: isChecked }, other)),
|
|
2299
|
+
React__default.createElement("label", { htmlFor: id, className: classNames('Field__label', {
|
|
2300
|
+
'Field__label--disabled': disabled
|
|
2301
|
+
}) }, label),
|
|
2297
2302
|
React__default.createElement(Icon, { className: classNames('Radio__overlay', {
|
|
2298
2303
|
'Radio__overlay--focused': isFocused,
|
|
2299
2304
|
'Radio__overlay--disabled': disabled
|
|
2300
|
-
}), type: isChecked ? 'radio-checked' : 'radio-unchecked', "aria-hidden": "true", onClick: function () { return onRadioClick(index); } })
|
|
2301
|
-
React__default.createElement("label", { htmlFor: id, className: classNames('Field__label', {
|
|
2302
|
-
'Field__label--disabled': disabled
|
|
2303
|
-
}) }, label)));
|
|
2305
|
+
}), type: isChecked ? 'radio-checked' : 'radio-unchecked', "aria-hidden": "true", onClick: function () { return onRadioClick(index); } })));
|
|
2304
2306
|
});
|
|
2305
2307
|
// reset the input refs array
|
|
2306
2308
|
// refs get clobbered every re-render anyway and this supports "dynamic" radios
|
|
@@ -2350,6 +2352,9 @@ var Checkbox = React.forwardRef(function (_a, ref) {
|
|
|
2350
2352
|
onChange(e);
|
|
2351
2353
|
}
|
|
2352
2354
|
} }, other)),
|
|
2355
|
+
React__default.createElement("label", { className: classNames('Field__label', {
|
|
2356
|
+
'Field__label--disabled': disabled
|
|
2357
|
+
}), htmlFor: id }, label),
|
|
2353
2358
|
React__default.createElement(Icon, { className: classNames('Checkbox__overlay', {
|
|
2354
2359
|
'Checkbox__overlay--disabled': disabled,
|
|
2355
2360
|
'Checkbox__overlay--focused': focused,
|
|
@@ -2362,10 +2367,7 @@ var Checkbox = React.forwardRef(function (_a, ref) {
|
|
|
2362
2367
|
else {
|
|
2363
2368
|
(_b = checkRef.current) === null || _b === void 0 ? void 0 : _b.click();
|
|
2364
2369
|
}
|
|
2365
|
-
} }),
|
|
2366
|
-
React__default.createElement("label", { className: classNames('Field__label', {
|
|
2367
|
-
'Field__label--disabled': disabled
|
|
2368
|
-
}), htmlFor: id }, label)),
|
|
2370
|
+
} })),
|
|
2369
2371
|
React__default.createElement("div", { id: errorId, className: "Error" }, error)));
|
|
2370
2372
|
});
|
|
2371
2373
|
Checkbox.displayName = 'Checkbox';
|
|
@@ -8203,6 +8205,38 @@ var ProgressBar = React.forwardRef(function (_a, ref) {
|
|
|
8203
8205
|
});
|
|
8204
8206
|
ProgressBar.displayName = 'ProgressBar';
|
|
8205
8207
|
|
|
8208
|
+
var Address = function (_a) {
|
|
8209
|
+
var children = _a.children, className = _a.className, other = tslib.__rest(_a, ["children", "className"]);
|
|
8210
|
+
return (React__default.createElement("address", tslib.__assign({ className: classNames('Address', className) }, other), children));
|
|
8211
|
+
};
|
|
8212
|
+
Address.displayName = 'Address';
|
|
8213
|
+
Address.propTypes = {
|
|
8214
|
+
children: PropTypes.node.isRequired,
|
|
8215
|
+
className: PropTypes.string
|
|
8216
|
+
};
|
|
8217
|
+
var AddressLine = function (_a) {
|
|
8218
|
+
var children = _a.children, className = _a.className, other = tslib.__rest(_a, ["children", "className"]);
|
|
8219
|
+
return !!children && (React__default.createElement("div", tslib.__assign({ className: classNames('Address__line', className) }, other), children));
|
|
8220
|
+
};
|
|
8221
|
+
AddressLine.displayName = 'AddressLine';
|
|
8222
|
+
AddressLine.propTypes = {
|
|
8223
|
+
children: PropTypes.node,
|
|
8224
|
+
className: PropTypes.string
|
|
8225
|
+
};
|
|
8226
|
+
var AddressCityStateZip = function (_a) {
|
|
8227
|
+
var city = _a.city, state = _a.state, zip = _a.zip, className = _a.className, other = tslib.__rest(_a, ["city", "state", "zip", "className"]);
|
|
8228
|
+
return !!(city || state || zip) && (React__default.createElement("div", tslib.__assign({ className: classNames('Address__city-state-zip', className) }, other), [[city, state].filter(Boolean).join(', '), zip]
|
|
8229
|
+
.filter(Boolean)
|
|
8230
|
+
.join(' ')));
|
|
8231
|
+
};
|
|
8232
|
+
AddressCityStateZip.displayName = 'AddressCityStateZip';
|
|
8233
|
+
AddressCityStateZip.propTypes = {
|
|
8234
|
+
city: PropTypes.node,
|
|
8235
|
+
state: PropTypes.node,
|
|
8236
|
+
zip: PropTypes.node,
|
|
8237
|
+
className: PropTypes.string
|
|
8238
|
+
};
|
|
8239
|
+
|
|
8206
8240
|
/**
|
|
8207
8241
|
* Hook to be used similarly to the React.Component#componentDidMount.
|
|
8208
8242
|
* Executes the provided `effect` when `dependencies` change but does not
|
|
@@ -8271,6 +8305,9 @@ ThemeProvider.propTypes = {
|
|
|
8271
8305
|
initialTheme: PropTypes.string
|
|
8272
8306
|
};
|
|
8273
8307
|
|
|
8308
|
+
exports.Address = Address;
|
|
8309
|
+
exports.AddressCityStateZip = AddressCityStateZip;
|
|
8310
|
+
exports.AddressLine = AddressLine;
|
|
8274
8311
|
exports.Alert = Alert;
|
|
8275
8312
|
exports.AlertActions = AlertActions;
|
|
8276
8313
|
exports.AlertContent = AlertContent;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
4
|
+
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var React__default = _interopDefault(React);
|
|
7
|
+
|
|
8
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
9
|
+
|
|
10
|
+
var _ref = /*#__PURE__*/React.createElement("path", {
|
|
11
|
+
d: "M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 109.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z",
|
|
12
|
+
fill: "currentColor"
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
function SvgMagnifyingGlass(props) {
|
|
16
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
17
|
+
viewBox: "0 0 24 24",
|
|
18
|
+
width: 19,
|
|
19
|
+
height: 19
|
|
20
|
+
}, props), _ref);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
exports.default = SvgMagnifyingGlass;
|
package/lib/types.d.ts
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deque/cauldron-react",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.1-canary.5ac97228",
|
|
4
4
|
"description": "Fully accessible react components library for Deque Cauldron",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -124,4 +124,4 @@
|
|
|
124
124
|
"\\.svg$": "<rootDir>/__tests__/svgMock.js"
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
|
-
}
|
|
127
|
+
}
|