@deque/cauldron-react 6.7.0-canary.4be82cb3 → 6.7.0-canary.5a2f12d4
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.
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
|
|
5
|
+
function _interopNamespace(e) {
|
|
6
|
+
if (e && e.__esModule) return e;
|
|
7
|
+
var n = Object.create(null);
|
|
8
|
+
if (e) {
|
|
9
|
+
Object.keys(e).forEach(function (k) {
|
|
10
|
+
if (k !== 'default') {
|
|
11
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
12
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () { return e[k]; }
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
n["default"] = e;
|
|
20
|
+
return Object.freeze(n);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
24
|
+
|
|
25
|
+
var _path;
|
|
26
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
27
|
+
const SvgBrokenImage = props => /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
28
|
+
viewBox: "0 0 24 24",
|
|
29
|
+
fill: "currentColor",
|
|
30
|
+
height: 24,
|
|
31
|
+
width: 24
|
|
32
|
+
}, props), _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
|
|
33
|
+
d: "M22.154 0H1.846c-.49 0-.96.23-1.305.639C.195 1.049 0 1.603 0 2.182v19.636c0 .579.195 1.134.54 1.543.347.41.817.639 1.306.639h7.385a.831.831 0 0 0 .54-.206c.157-.134.274-.323.335-.54l1.712-6.065 4.22-1.994a.935.935 0 0 0 .31-.242c.088-.105.158-.23.205-.366l1.687-4.984 5.132-2.023a.952.952 0 0 0 .455-.398A1.23 1.23 0 0 0 24 6.545V2.182c0-.579-.195-1.134-.54-1.543C23.112.229 22.642 0 22.153 0ZM10.2 16.019l-1.636 5.8H1.846V18l6-7.09 3.51 4.147-.625.293a.933.933 0 0 0-.327.266c-.092.115-.16.253-.203.403Zm11.953-10.26-4.907 1.933a.908.908 0 0 0-.342.242 1.117 1.117 0 0 0-.224.388l-1.698 5.021-1.762.839-4.07-4.81c-.346-.409-.815-.638-1.305-.638s-.959.23-1.305.638l-4.695 5.542V2.182h20.308v3.577Zm1.463 4.5a.852.852 0 0 0-.4-.194.789.789 0 0 0-.432.044l-2.746 1.082a.908.908 0 0 0-.341.241 1.117 1.117 0 0 0-.224.388l-1.652 4.878-4.127 1.951a.934.934 0 0 0-.328.265 1.146 1.146 0 0 0-.204.403l-.916 3.246a1.28 1.28 0 0 0-.037.51c.021.17.078.333.163.474.086.14.198.254.329.333.13.079.274.12.42.12h9.032c.49 0 .96-.23 1.305-.639.346-.41.541-.964.541-1.543V11.145c0-.173-.035-.343-.101-.497a1.062 1.062 0 0 0-.282-.388v-.001Zm-1.463 11.56h-7.75l.374-1.33 4.098-1.937a.936.936 0 0 0 .31-.242c.088-.104.158-.229.204-.366l1.639-4.842 1.125-.443v9.16Z"
|
|
34
|
+
})));
|
|
35
|
+
|
|
36
|
+
exports["default"] = SvgBrokenImage;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ContentNode } from '../../types';
|
|
3
|
+
declare const BottomSheet: React.ForwardRefExoticComponent<{
|
|
4
|
+
label: ContentNode;
|
|
5
|
+
closeButtonText?: ContentNode | undefined;
|
|
6
|
+
open?: boolean | undefined;
|
|
7
|
+
} & React.HTMLAttributes<HTMLDivElement> & Pick<import("../Drawer").DrawerProps<HTMLElement> & React.RefAttributes<HTMLDivElement>, "open" | "onClose" | "portal" | "focusOptions"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
export default BottomSheet;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
interface DrawerProps<T extends HTMLElement = HTMLElement> extends React.HTMLAttributes<HTMLDivElement> {
|
|
2
|
+
export interface DrawerProps<T extends HTMLElement = HTMLElement> extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
3
|
children: React.ReactNode;
|
|
4
4
|
position: 'top' | 'bottom' | 'left' | 'right';
|
|
5
5
|
open?: boolean;
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
* GENERATED CODE. DO NOT EDIT DIRECTLY!
|
|
3
3
|
*/
|
|
4
4
|
/** IconType represents each valid icon type. */
|
|
5
|
-
export 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' | 'clipboard' | 'clock' | 'close' | 'code' | 'copy' | 'download' | 'dropper' | 'exchange' | 'export-solid' | 'external-link' | 'eye' | 'filter-solid' | 'filter' | 'flag' | 'gears' | 'github' | 'grid' | 'hamburger-menu' | 'hashtag' | 'highlight' | 'images' | 'info-circle-alt' | 'info-circle' | 'info-square' | 'kabob' | 'link' | 'linkedin' | 'list' | 'lock' | 'magnifying-glass' | 'menu' | 'minus' | 'new-releases' | 'new' | 'no' | 'pencil' | 'person-running' | 'play' | 'plus' | 'question-circle-alt' | 'question-circle' | 'radio-checked' | 'radio-unchecked' | 'recycle-square' | 'recycle' | 'resend' | 'robot' | 'run-again' | 'save' | 'share-nodes' | 'share' | 'sort-triangle' | 'sort' | 'star' | 'step-back' | 'step-forward' | 'sun' | 'table-sort-ascending' | 'table-sort-descending' | 'tag' | 'target' | 'trash' | 'triangle-up' | 'triangle-down' | 'triangle-left' | 'triangle-right' | 'twitter' | 'upload';
|
|
5
|
+
export 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' | 'broken-image' | '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' | 'clipboard' | 'clock' | 'close' | 'code' | 'copy' | 'download' | 'dropper' | 'exchange' | 'export-solid' | 'external-link' | 'eye' | 'filter-solid' | 'filter' | 'flag' | 'gears' | 'github' | 'grid' | 'hamburger-menu' | 'hashtag' | 'highlight' | 'images' | 'info-circle-alt' | 'info-circle' | 'info-square' | 'kabob' | 'link' | 'linkedin' | 'list' | 'lock' | 'magnifying-glass' | 'menu' | 'minus' | 'new-releases' | 'new' | 'no' | 'pencil' | 'person-running' | 'play' | 'plus' | 'question-circle-alt' | 'question-circle' | 'radio-checked' | 'radio-unchecked' | 'recycle-square' | 'recycle' | 'resend' | 'robot' | 'run-again' | 'save' | 'share-nodes' | 'share' | 'sort-triangle' | 'sort' | 'star' | 'step-back' | 'step-forward' | 'sun' | 'table-sort-ascending' | 'table-sort-descending' | 'tag' | 'target' | 'trash' | 'triangle-up' | 'triangle-down' | 'triangle-left' | 'triangle-right' | 'twitter' | 'upload';
|
|
6
6
|
/** iconTypes holds each valid icon type. */
|
|
7
7
|
export declare const iconTypes: string[];
|
package/lib/index.d.ts
CHANGED
|
@@ -60,6 +60,7 @@ export { default as Timeline, TimelineItem } from './components/Timeline';
|
|
|
60
60
|
export { default as TextEllipsis } from './components/TextEllipsis';
|
|
61
61
|
export { default as CopyButton } from './components/CopyButton';
|
|
62
62
|
export { default as Drawer } from './components/Drawer';
|
|
63
|
+
export { default as BottomSheet } from './components/BottomSheet';
|
|
63
64
|
/**
|
|
64
65
|
* Helpers / Utils
|
|
65
66
|
*/
|
package/lib/index.js
CHANGED
|
@@ -114,6 +114,7 @@ var iconTypes = [
|
|
|
114
114
|
'arrow-right',
|
|
115
115
|
'arrows-alt',
|
|
116
116
|
'bolt',
|
|
117
|
+
'broken-image',
|
|
117
118
|
'caution',
|
|
118
119
|
'check-circle',
|
|
119
120
|
'check-shield',
|
|
@@ -206,6 +207,7 @@ function __variableDynamicImportRuntime0__(path) {
|
|
|
206
207
|
case './icons/arrow.svg': return Promise.resolve().then(function () { return require('./arrow.js'); });
|
|
207
208
|
case './icons/arrows-alt.svg': return Promise.resolve().then(function () { return require('./arrows-alt.js'); });
|
|
208
209
|
case './icons/bolt.svg': return Promise.resolve().then(function () { return require('./bolt.js'); });
|
|
210
|
+
case './icons/broken-image.svg': return Promise.resolve().then(function () { return require('./broken-image.js'); });
|
|
209
211
|
case './icons/caution.svg': return Promise.resolve().then(function () { return require('./caution.js'); });
|
|
210
212
|
case './icons/check-circle.svg': return Promise.resolve().then(function () { return require('./check-circle.js'); });
|
|
211
213
|
case './icons/check-shield.svg': return Promise.resolve().then(function () { return require('./check-shield.js'); });
|
|
@@ -3365,8 +3367,8 @@ var iconTypeMap = {
|
|
|
3365
3367
|
};
|
|
3366
3368
|
var Notice = React.forwardRef(function (_a, ref) {
|
|
3367
3369
|
var _b;
|
|
3368
|
-
var _c = _a.type, type = _c === void 0 ? 'info' : _c, title = _a.title, icon = _a.icon, _d = _a.variant, variant = _d === void 0 ? 'default' : _d, children = _a.children, otherProps = tslib.__rest(_a, ["type", "title", "icon", "variant", "children"]);
|
|
3369
|
-
return (React__default["default"].createElement("div", tslib.__assign({ className: classNames__default["default"]('Notice', (_b = {},
|
|
3370
|
+
var className = _a.className, _c = _a.type, type = _c === void 0 ? 'info' : _c, title = _a.title, icon = _a.icon, _d = _a.variant, variant = _d === void 0 ? 'default' : _d, children = _a.children, otherProps = tslib.__rest(_a, ["className", "type", "title", "icon", "variant", "children"]);
|
|
3371
|
+
return (React__default["default"].createElement("div", tslib.__assign({ className: classNames__default["default"]('Notice', className, (_b = {},
|
|
3370
3372
|
_b["Notice--".concat(type)] = type,
|
|
3371
3373
|
_b["Notice--condensed"] = variant === 'condensed',
|
|
3372
3374
|
_b)), ref: ref }, otherProps),
|
|
@@ -4312,6 +4314,28 @@ var Drawer = React.forwardRef(function (_a, ref) {
|
|
|
4312
4314
|
});
|
|
4313
4315
|
Drawer.displayName = 'Drawer';
|
|
4314
4316
|
|
|
4317
|
+
var BottomSheet = React.forwardRef(function (_a, ref) {
|
|
4318
|
+
var label = _a.label, children = _a.children, className = _a.className, _b = _a.closeButtonText, closeButtonText = _b === void 0 ? 'Close' : _b, _c = _a.open, open = _c === void 0 ? false : _c, onClose = _a.onClose, focusOptions = _a.focusOptions, props = tslib.__rest(_a, ["label", "children", "className", "closeButtonText", "open", "onClose", "focusOptions"]);
|
|
4319
|
+
var bottomSheetRef = useSharedRef(ref);
|
|
4320
|
+
var _d = tslib.__read(nextId.useId(1, 'bottom-sheet-label'), 1), labelId = _d[0];
|
|
4321
|
+
var handleClose = React.useCallback(function () {
|
|
4322
|
+
// istanbul ignore else
|
|
4323
|
+
if (typeof onClose === 'function') {
|
|
4324
|
+
onClose();
|
|
4325
|
+
}
|
|
4326
|
+
}, [onClose]);
|
|
4327
|
+
return (React__default["default"].createElement(Drawer, tslib.__assign({ open: open, onClose: handleClose, focusOptions: tslib.__assign({ initialFocus: bottomSheetRef }, focusOptions) }, props, { behavior: "modal", position: "bottom" }),
|
|
4328
|
+
React__default["default"].createElement("div", { ref: bottomSheetRef, className: classNames__default["default"]('BottomSheet', className), tabIndex: -1, role: "dialog", "aria-labelledby": labelId },
|
|
4329
|
+
React__default["default"].createElement("div", { className: "BottomSheet__header" },
|
|
4330
|
+
React__default["default"].createElement("div", { id: labelId, className: "BottomSheet__title" }, label),
|
|
4331
|
+
React__default["default"].createElement(IconButton, { icon: "close", label: closeButtonText, "aria-label": "".concat(closeButtonText), onClick: handleClose, tooltipProps: {
|
|
4332
|
+
show: false,
|
|
4333
|
+
association: 'none'
|
|
4334
|
+
} })),
|
|
4335
|
+
React__default["default"].createElement("div", { className: "BottomSheet__contents" }, children))));
|
|
4336
|
+
});
|
|
4337
|
+
BottomSheet.displayName = 'BottomSheet';
|
|
4338
|
+
|
|
4315
4339
|
var LIGHT_THEME_CLASS = 'cauldron--theme-light';
|
|
4316
4340
|
var DARK_THEME_CLASS = 'cauldron--theme-dark';
|
|
4317
4341
|
var ThemeContext = React.createContext({
|
|
@@ -4391,6 +4415,7 @@ exports.AlertContent = AlertContent;
|
|
|
4391
4415
|
exports.AriaIsolate = AriaIsolate;
|
|
4392
4416
|
exports.Badge = Badge;
|
|
4393
4417
|
exports.BadgeLabel = BadgeLabel;
|
|
4418
|
+
exports.BottomSheet = BottomSheet;
|
|
4394
4419
|
exports.Breadcrumb = Breadcrumb;
|
|
4395
4420
|
exports.BreadcrumbItem = BreadcrumbItem;
|
|
4396
4421
|
exports.BreadcrumbLink = BreadcrumbLink;
|
package/package.json
CHANGED