@canonical/react-components 3.9.0 → 3.9.1
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/dist/components/Accordion/Accordion.js +15 -11
- package/dist/components/ActionButton/ActionButton.js +13 -10
- package/dist/components/ApplicationLayout/AppAside/AppAside.js +12 -9
- package/dist/components/ApplicationLayout/AppMain/AppMain.js +7 -4
- package/dist/components/ApplicationLayout/AppNavigation/AppNavigation.js +9 -6
- package/dist/components/ApplicationLayout/AppNavigationBar/AppNavigationBar.js +7 -4
- package/dist/components/ApplicationLayout/AppStatus/AppStatus.js +7 -4
- package/dist/components/ApplicationLayout/Application/Application.js +7 -4
- package/dist/components/ApplicationLayout/ApplicationLayout.js +22 -19
- package/dist/components/ArticlePagination/ArticlePagination.js +10 -7
- package/dist/components/Badge/Badge.js +9 -6
- package/dist/components/Button/Button.js +15 -12
- package/dist/components/Card/Card.js +11 -8
- package/dist/components/Card/Card.stories.d.ts +5 -0
- package/dist/components/Card/Card.stories.js +13 -4
- package/dist/components/CheckboxInput/CheckableInput/CheckableInput.js +10 -7
- package/dist/components/CheckboxInput/CheckboxInput.js +7 -4
- package/dist/components/Chip/Chip.js +18 -15
- package/dist/components/Code/Code.js +10 -7
- package/dist/components/CodeSnippet/CodeSnippet.js +7 -4
- package/dist/components/CodeSnippet/CodeSnippetDropdown.js +12 -8
- package/dist/components/Col/Col.js +15 -12
- package/dist/components/ColumnSelector/columnSelectorHelper.js +7 -3
- package/dist/components/ConfirmationButton/ConfirmationButton.js +10 -7
- package/dist/components/ConfirmationModal/ConfirmationModal.js +15 -12
- package/dist/components/ContextualMenu/ContextualMenu.js +27 -24
- package/dist/components/ContextualMenu/ContextualMenuDropdown/ContextualMenuDropdown.js +47 -44
- package/dist/components/CustomSelect/CustomSelect.js +25 -22
- package/dist/components/CustomSelect/CustomSelect.stories.js +8 -5
- package/dist/components/EmptyState/EmptyState.js +9 -6
- package/dist/components/Field/Field.js +22 -19
- package/dist/components/Form/Form.js +9 -6
- package/dist/components/FormikField/FormikField.js +10 -7
- package/dist/components/Icon/Icon.js +8 -5
- package/dist/components/Input/Input.js +28 -21
- package/dist/components/Label/Label.js +9 -6
- package/dist/components/Link/Link.js +11 -8
- package/dist/components/List/List.js +28 -19
- package/dist/components/MainTable/MainTable.js +34 -28
- package/dist/components/Modal/Modal.js +13 -10
- package/dist/components/ModularTable/ModularTable.js +25 -21
- package/dist/components/MultiSelect/MultiSelect.js +17 -14
- package/dist/components/MultiSelect/MultiSelect.stories.js +14 -14
- package/dist/components/Navigation/Navigation.js +31 -23
- package/dist/components/Navigation/NavigationLink/NavigationLink.js +26 -17
- package/dist/components/Navigation/NavigationMenu/NavigationMenu.js +16 -9
- package/dist/components/Notifications/Notification/Notification.js +19 -16
- package/dist/components/Notifications/ToastNotification/ToastNotificationProvider.js +15 -15
- package/dist/components/Pagination/Pagination.js +20 -17
- package/dist/components/Panel/Panel.js +29 -25
- package/dist/components/PasswordToggle/PasswordToggle.js +16 -13
- package/dist/components/RadioInput/RadioInput.js +6 -3
- package/dist/components/Row/Row.js +7 -4
- package/dist/components/ScrollableTable/ScrollableTable.stories.js +7 -3
- package/dist/components/SearchAndFilter/SearchAndFilter.js +10 -7
- package/dist/components/SearchBox/SearchBox.js +18 -15
- package/dist/components/Select/Select.js +25 -21
- package/dist/components/SideNavigation/SideNavigation.js +19 -13
- package/dist/components/SideNavigation/SideNavigationBase/SideNavigationBase.js +11 -8
- package/dist/components/SideNavigation/SideNavigationItem/SideNavigationItem.js +12 -6
- package/dist/components/SideNavigation/SideNavigationLink/SideNavigationLink.js +7 -4
- package/dist/components/SideNavigation/SideNavigationText/SideNavigationText.js +7 -4
- package/dist/components/Slider/Slider.js +17 -14
- package/dist/components/Spinner/Spinner.js +11 -8
- package/dist/components/StatusLabel/StatusLabel.js +8 -5
- package/dist/components/Stepper/Step/Step.js +15 -12
- package/dist/components/Strip/Strip.js +18 -15
- package/dist/components/Strip/Strip.stories.js +6 -1
- package/dist/components/Switch/Switch.js +9 -6
- package/dist/components/Table/Table.js +9 -6
- package/dist/components/TableCell/TableCell.js +11 -8
- package/dist/components/TableHeader/TableHeader.js +7 -4
- package/dist/components/TablePagination/TablePagination.js +14 -11
- package/dist/components/TablePagination/TablePaginationControls/TablePaginationControls.js +22 -19
- package/dist/components/TableRow/TableRow.js +6 -3
- package/dist/components/Tabs/Tabs.js +10 -7
- package/dist/components/Textarea/Textarea.js +29 -22
- package/dist/esm/components/Card/Card.stories.d.ts +5 -0
- package/dist/esm/components/Card/Card.stories.js +6 -1
- package/dist/esm/components/Strip/Strip.stories.js +6 -1
- package/dist/external/useSSR.js +6 -4
- package/package.json +50 -47
|
@@ -7,15 +7,19 @@ exports.default = void 0;
|
|
|
7
7
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _AccordionSection = _interopRequireDefault(require("./AccordionSection"));
|
|
10
|
+
const _excluded = ["key"],
|
|
11
|
+
_excluded2 = ["className", "expanded", "externallyControlled", "onExpandedChange", "sections", "titleElement"];
|
|
10
12
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
11
13
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
12
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
15
|
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); }
|
|
16
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
17
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
14
18
|
const generateSections = (sections, setExpanded, expanded, titleElement) => sections.map((_ref, i) => {
|
|
15
19
|
let {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
20
|
+
key
|
|
21
|
+
} = _ref,
|
|
22
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
19
23
|
return /*#__PURE__*/_react.default.createElement(_AccordionSection.default, _extends({
|
|
20
24
|
expanded: expanded,
|
|
21
25
|
key: key || i,
|
|
@@ -32,14 +36,14 @@ const generateSections = (sections, setExpanded, expanded, titleElement) => sect
|
|
|
32
36
|
*/
|
|
33
37
|
const Accordion = _ref2 => {
|
|
34
38
|
let {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
className,
|
|
40
|
+
expanded,
|
|
41
|
+
externallyControlled,
|
|
42
|
+
onExpandedChange,
|
|
43
|
+
sections,
|
|
44
|
+
titleElement
|
|
45
|
+
} = _ref2,
|
|
46
|
+
asideProps = _objectWithoutProperties(_ref2, _excluded2);
|
|
43
47
|
const [expandedSection, setExpandedSection] = (0, _react.useState)(expanded);
|
|
44
48
|
const setExpanded = (id, title) => {
|
|
45
49
|
setExpandedSection(id);
|
|
@@ -7,10 +7,13 @@ exports.default = exports.SUCCESS_DURATION = exports.Label = exports.LOADER_MIN_
|
|
|
7
7
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _Icon = _interopRequireDefault(require("../Icon"));
|
|
10
|
+
const _excluded = ["appearance", "children", "className", "onClick", "disabled", "inline", "loading", "success"];
|
|
10
11
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
11
12
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
12
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
14
|
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); }
|
|
15
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
16
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
14
17
|
const LOADER_MIN_DURATION = exports.LOADER_MIN_DURATION = 400; // minimium duration (ms) loader displays
|
|
15
18
|
const SUCCESS_DURATION = exports.SUCCESS_DURATION = 2000; // duration (ms) success tick is displayed
|
|
16
19
|
let Label = exports.Label = /*#__PURE__*/function (Label) {
|
|
@@ -27,16 +30,16 @@ let Label = exports.Label = /*#__PURE__*/function (Label) {
|
|
|
27
30
|
*/
|
|
28
31
|
const ActionButton = _ref => {
|
|
29
32
|
let {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
33
|
+
appearance,
|
|
34
|
+
children,
|
|
35
|
+
className,
|
|
36
|
+
onClick,
|
|
37
|
+
disabled = null,
|
|
38
|
+
inline = false,
|
|
39
|
+
loading = false,
|
|
40
|
+
success = false
|
|
41
|
+
} = _ref,
|
|
42
|
+
buttonProps = _objectWithoutProperties(_ref, _excluded);
|
|
40
43
|
const [height, setHeight] = (0, _react.useState)();
|
|
41
44
|
const [width, setWidth] = (0, _react.useState)();
|
|
42
45
|
const [showLoader, setShowLoader] = (0, _react.useState)(false);
|
|
@@ -6,19 +6,22 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
9
|
+
const _excluded = ["children", "className", "collapsed", "narrow", "forwardRef", "pinned", "wide"];
|
|
9
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
11
|
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); }
|
|
12
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
13
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
11
14
|
const AppAside = _ref => {
|
|
12
15
|
let {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
children,
|
|
17
|
+
className,
|
|
18
|
+
collapsed,
|
|
19
|
+
narrow,
|
|
20
|
+
forwardRef,
|
|
21
|
+
pinned,
|
|
22
|
+
wide
|
|
23
|
+
} = _ref,
|
|
24
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
22
25
|
return /*#__PURE__*/_react.default.createElement("aside", _extends({
|
|
23
26
|
className: (0, _classnames.default)("l-aside", className, {
|
|
24
27
|
"is-collapsed": collapsed,
|
|
@@ -6,18 +6,21 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
9
|
+
const _excluded = ["children", "className"];
|
|
9
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
11
|
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); }
|
|
12
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
13
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
11
14
|
/**
|
|
12
15
|
* This is a [React](https://reactjs.org/) component for main content area in the Vanilla
|
|
13
16
|
* [Application Layout](https://vanillaframework.io/docs/layouts/application).
|
|
14
17
|
*/
|
|
15
18
|
const AppMain = _ref => {
|
|
16
19
|
let {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
children,
|
|
21
|
+
className
|
|
22
|
+
} = _ref,
|
|
23
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
21
24
|
return /*#__PURE__*/_react.default.createElement("main", _extends({
|
|
22
25
|
className: (0, _classnames.default)("l-main", className)
|
|
23
26
|
}, props), children);
|
|
@@ -6,8 +6,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
9
|
+
const _excluded = ["children", "className", "collapsed", "pinned"];
|
|
9
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
11
|
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); }
|
|
12
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
13
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
11
14
|
/**
|
|
12
15
|
* This is a [React](https://reactjs.org/) component for the navigation panel in the Vanilla
|
|
13
16
|
* [Application Layout](https://vanillaframework.io/docs/layouts/application).
|
|
@@ -17,12 +20,12 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
17
20
|
*/
|
|
18
21
|
const AppNavigation = _ref => {
|
|
19
22
|
let {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
children,
|
|
24
|
+
className,
|
|
25
|
+
collapsed,
|
|
26
|
+
pinned
|
|
27
|
+
} = _ref,
|
|
28
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
26
29
|
return /*#__PURE__*/_react.default.createElement("header", _extends({
|
|
27
30
|
className: (0, _classnames.default)("l-navigation", className, {
|
|
28
31
|
"is-collapsed": collapsed,
|
|
@@ -6,8 +6,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
9
|
+
const _excluded = ["children", "className"];
|
|
9
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
11
|
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); }
|
|
12
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
13
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
11
14
|
/**
|
|
12
15
|
* This is a [React](https://reactjs.org/) component for navigation bar in the Vanilla
|
|
13
16
|
* [Application Layout](https://vanillaframework.io/docs/layouts/application).
|
|
@@ -17,10 +20,10 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
17
20
|
*/
|
|
18
21
|
const AppNavigationBar = _ref => {
|
|
19
22
|
let {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
children,
|
|
24
|
+
className
|
|
25
|
+
} = _ref,
|
|
26
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
24
27
|
return /*#__PURE__*/_react.default.createElement("header", _extends({
|
|
25
28
|
className: (0, _classnames.default)("l-navigation-bar", className)
|
|
26
29
|
}, props), children);
|
|
@@ -6,18 +6,21 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
9
|
+
const _excluded = ["children", "className"];
|
|
9
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
11
|
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); }
|
|
12
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
13
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
11
14
|
/**
|
|
12
15
|
* This is a [React](https://reactjs.org/) component for status area in the Vanilla
|
|
13
16
|
* [Application Layout](https://vanillaframework.io/docs/layouts/application).
|
|
14
17
|
*/
|
|
15
18
|
const AppStatus = _ref => {
|
|
16
19
|
let {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
children,
|
|
21
|
+
className
|
|
22
|
+
} = _ref,
|
|
23
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
21
24
|
return /*#__PURE__*/_react.default.createElement("aside", _extends({
|
|
22
25
|
className: (0, _classnames.default)("l-status", className)
|
|
23
26
|
}, props), children);
|
|
@@ -6,18 +6,21 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
9
|
+
const _excluded = ["children", "className"];
|
|
9
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
11
|
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); }
|
|
12
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
13
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
11
14
|
/**
|
|
12
15
|
* This is a [React](https://reactjs.org/) component for the application wrapper in the Vanilla
|
|
13
16
|
* [Application Layout](https://vanillaframework.io/docs/layouts/application).
|
|
14
17
|
*/
|
|
15
18
|
const Application = _ref => {
|
|
16
19
|
let {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
children,
|
|
21
|
+
className
|
|
22
|
+
} = _ref,
|
|
23
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
21
24
|
return /*#__PURE__*/_react.default.createElement("div", _extends({
|
|
22
25
|
className: (0, _classnames.default)("l-application", className),
|
|
23
26
|
role: "presentation"
|
|
@@ -16,9 +16,12 @@ var _Application = _interopRequireDefault(require("./Application"));
|
|
|
16
16
|
var _Button = _interopRequireDefault(require("../Button"));
|
|
17
17
|
var _Icon = _interopRequireDefault(require("../Icon"));
|
|
18
18
|
var _SkipLink = _interopRequireDefault(require("../SkipLink"));
|
|
19
|
+
const _excluded = ["aside", "children", "dark", "logo", "mainClassName", "menuCollapsed", "menuPinned", "navigationBarClassName", "navigationClassName", "navItems", "navLinkComponent", "onCollapseMenu", "onPinMenu", "sideNavigation", "status", "statusClassName", "mainId"];
|
|
19
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20
21
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
21
22
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
23
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
24
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
22
25
|
/**
|
|
23
26
|
* This is a [React](https://reactjs.org/) component for the Vanilla
|
|
24
27
|
* [Application Layout](https://vanillaframework.io/docs/layouts/application).
|
|
@@ -32,25 +35,25 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
32
35
|
*/
|
|
33
36
|
const ApplicationLayout = _ref => {
|
|
34
37
|
let {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
38
|
+
aside,
|
|
39
|
+
children,
|
|
40
|
+
dark = true,
|
|
41
|
+
logo,
|
|
42
|
+
mainClassName,
|
|
43
|
+
menuCollapsed,
|
|
44
|
+
menuPinned,
|
|
45
|
+
navigationBarClassName,
|
|
46
|
+
navigationClassName,
|
|
47
|
+
navItems,
|
|
48
|
+
navLinkComponent,
|
|
49
|
+
onCollapseMenu,
|
|
50
|
+
onPinMenu,
|
|
51
|
+
sideNavigation,
|
|
52
|
+
status,
|
|
53
|
+
statusClassName,
|
|
54
|
+
mainId = "main-content"
|
|
55
|
+
} = _ref,
|
|
56
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
54
57
|
const [internalMenuPinned, setInternalMenuPinned] = (0, _react.useState)(false);
|
|
55
58
|
const [internalMenuCollapsed, setInternalMenuCollapsed] = (0, _react.useState)(true);
|
|
56
59
|
const menuIsPinned = menuPinned !== null && menuPinned !== void 0 ? menuPinned : internalMenuPinned;
|
|
@@ -6,8 +6,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
const _excluded = ["className", "nextURL", "nextLabel", "previousURL", "previousLabel"];
|
|
9
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
11
|
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); }
|
|
12
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
13
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
11
14
|
/**
|
|
12
15
|
* This is a [React](https://reactjs.org/) component for the Vanilla [Article pagination](https://docs.vanillaframework.io/patterns/article-pagination/).
|
|
13
16
|
*
|
|
@@ -15,13 +18,13 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
15
18
|
*/
|
|
16
19
|
const ArticlePagination = _ref => {
|
|
17
20
|
let {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
className,
|
|
22
|
+
nextURL,
|
|
23
|
+
nextLabel,
|
|
24
|
+
previousURL,
|
|
25
|
+
previousLabel
|
|
26
|
+
} = _ref,
|
|
27
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
25
28
|
return /*#__PURE__*/_react.default.createElement("footer", _extends({
|
|
26
29
|
className: (0, _classnames.default)(className, "p-article-pagination")
|
|
27
30
|
}, props), previousURL && previousLabel && /*#__PURE__*/_react.default.createElement("a", {
|
|
@@ -6,8 +6,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = exports.BadgeType = void 0;
|
|
7
7
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
const _excluded = ["value", "badgeType", "className", "isNegative"];
|
|
9
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
11
|
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); }
|
|
12
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
13
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
11
14
|
const BadgeType = exports.BadgeType = {
|
|
12
15
|
ROUNDED_LARGE_NUMBER: "ROUNDED_LARGE_NUMBER",
|
|
13
16
|
UNDEFINED_LARGE_NUMBER: "UNDEFINED_LARGE_NUMBER"
|
|
@@ -45,12 +48,12 @@ const clamp = value => {
|
|
|
45
48
|
*/
|
|
46
49
|
const Badge = _ref => {
|
|
47
50
|
let {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
value,
|
|
52
|
+
badgeType = BadgeType.UNDEFINED_LARGE_NUMBER,
|
|
53
|
+
className,
|
|
54
|
+
isNegative
|
|
55
|
+
} = _ref,
|
|
56
|
+
spanProps = _objectWithoutProperties(_ref, _excluded);
|
|
54
57
|
const badgeClassName = (0, _classnames.default)({
|
|
55
58
|
["p-badge--negative"]: !!isNegative,
|
|
56
59
|
"p-badge": !isNegative
|
|
@@ -6,8 +6,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = exports.ButtonAppearance = void 0;
|
|
7
7
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
const _excluded = ["appearance", "children", "className", "dense", "disabled", "element", "hasIcon", "inline", "onClick", "small"];
|
|
9
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
11
|
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); }
|
|
12
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
13
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
11
14
|
const ButtonAppearance = exports.ButtonAppearance = {
|
|
12
15
|
BASE: "base",
|
|
13
16
|
BRAND: "brand",
|
|
@@ -30,18 +33,18 @@ const ButtonAppearance = exports.ButtonAppearance = {
|
|
|
30
33
|
*/
|
|
31
34
|
const Button = _ref => {
|
|
32
35
|
let {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
36
|
+
appearance,
|
|
37
|
+
children,
|
|
38
|
+
className,
|
|
39
|
+
dense,
|
|
40
|
+
disabled,
|
|
41
|
+
element: Component = "button",
|
|
42
|
+
hasIcon,
|
|
43
|
+
inline,
|
|
44
|
+
onClick,
|
|
45
|
+
small
|
|
46
|
+
} = _ref,
|
|
47
|
+
buttonProps = _objectWithoutProperties(_ref, _excluded);
|
|
45
48
|
const classes = (0, _classnames.default)(appearance ? "p-button--".concat(appearance) : "p-button", {
|
|
46
49
|
"has-icon": hasIcon,
|
|
47
50
|
"is-dense": dense,
|
|
@@ -6,10 +6,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
const _excluded = ["children", "className", "highlighted", "overlay", "thumbnail", "title"];
|
|
9
10
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
10
11
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
11
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
13
|
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); }
|
|
14
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
15
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
13
16
|
/**
|
|
14
17
|
* This is a [React](https://reactjs.org/) component for the Vanilla [Card](https://docs.vanillaframework.io/patterns/card/).
|
|
15
18
|
*
|
|
@@ -18,14 +21,14 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
18
21
|
|
|
19
22
|
const Card = _ref => {
|
|
20
23
|
let {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
children,
|
|
25
|
+
className,
|
|
26
|
+
highlighted,
|
|
27
|
+
overlay,
|
|
28
|
+
thumbnail,
|
|
29
|
+
title
|
|
30
|
+
} = _ref,
|
|
31
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
29
32
|
const titleId = (0, _react.useId)();
|
|
30
33
|
return /*#__PURE__*/_react.default.createElement("div", _extends({
|
|
31
34
|
"aria-labelledby": title ? titleId : undefined,
|
|
@@ -9,6 +9,11 @@ var _ = _interopRequireDefault(require("./"));
|
|
|
9
9
|
var _Col = _interopRequireDefault(require("../Col"));
|
|
10
10
|
var _Row = _interopRequireDefault(require("../Row"));
|
|
11
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
+
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; }
|
|
13
|
+
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; }
|
|
14
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
15
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
|
16
|
+
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); }
|
|
12
17
|
const meta = {
|
|
13
18
|
component: _.default,
|
|
14
19
|
tags: ["autodocs"]
|
|
@@ -28,10 +33,9 @@ const Header = exports.Header = {
|
|
|
28
33
|
}
|
|
29
34
|
};
|
|
30
35
|
const Highlighted = exports.Highlighted = {
|
|
31
|
-
args: {
|
|
32
|
-
...Default.args,
|
|
36
|
+
args: _objectSpread(_objectSpread({}, Default.args), {}, {
|
|
33
37
|
highlighted: true
|
|
34
|
-
}
|
|
38
|
+
})
|
|
35
39
|
};
|
|
36
40
|
const Overlay = exports.Overlay = {
|
|
37
41
|
args: {
|
|
@@ -47,5 +51,10 @@ const Overlay = exports.Overlay = {
|
|
|
47
51
|
}, /*#__PURE__*/_react.default.createElement(_Row.default, null, /*#__PURE__*/_react.default.createElement(_Col.default, {
|
|
48
52
|
size: 6,
|
|
49
53
|
emptyLarge: 7
|
|
50
|
-
}, /*#__PURE__*/_react.default.createElement(_.default, args))))
|
|
54
|
+
}, /*#__PURE__*/_react.default.createElement(_.default, args)))),
|
|
55
|
+
parameters: {
|
|
56
|
+
percy: {
|
|
57
|
+
waitForTimeout: 1000 // Wait for 1 second before taking a snapshot to allow the image to load
|
|
58
|
+
}
|
|
59
|
+
}
|
|
51
60
|
};
|
|
@@ -6,19 +6,22 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
const _excluded = ["inputType", "label", "labelClassName", "indeterminate", "inline"];
|
|
9
10
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
10
11
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
11
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
13
|
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); }
|
|
14
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
15
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
13
16
|
const CheckableInput = _ref => {
|
|
14
17
|
let {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
inputType,
|
|
19
|
+
label,
|
|
20
|
+
labelClassName,
|
|
21
|
+
indeterminate = false,
|
|
22
|
+
inline
|
|
23
|
+
} = _ref,
|
|
24
|
+
checkboxProps = _objectWithoutProperties(_ref, _excluded);
|
|
22
25
|
const inputId = (0, _react.useId)();
|
|
23
26
|
const inputRef = (0, _react.useRef)(null);
|
|
24
27
|
(0, _react.useEffect)(() => {
|
|
@@ -6,8 +6,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _CheckableInput = _interopRequireDefault(require("./CheckableInput"));
|
|
9
|
+
const _excluded = ["label", "indeterminate"];
|
|
9
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
11
|
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); }
|
|
12
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
13
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
11
14
|
/**
|
|
12
15
|
* This is a [React](https://reactjs.org/) component for the Vanilla [Checkbox input](https://docs.vanillaframework.io/base/forms#checkbox).
|
|
13
16
|
*
|
|
@@ -15,10 +18,10 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
15
18
|
*/
|
|
16
19
|
const CheckboxInput = _ref => {
|
|
17
20
|
let {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
label,
|
|
22
|
+
indeterminate = false
|
|
23
|
+
} = _ref,
|
|
24
|
+
checkboxProps = _objectWithoutProperties(_ref, _excluded);
|
|
22
25
|
return /*#__PURE__*/_react.default.createElement(_CheckableInput.default, _extends({
|
|
23
26
|
label: label,
|
|
24
27
|
inputType: "checkbox",
|