UNPKG

@pantheon-systems/design-toolkit-react

Version:
322 lines (298 loc) 11.4 kB
import _defineProperty from '@babel/runtime/helpers/defineProperty'; import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties'; import PropTypes from 'prop-types'; import Button from './Button.js'; export { default as Button } from './Button.js'; import LinkButton from './LinkButton.js'; export { default as LinkButton } from './LinkButton.js'; import RouterLinkButton from './RouterLinkButton.js'; export { default as RouterLinkButton } from './RouterLinkButton.js'; import SubmitButton from './SubmitButton.js'; export { default as SubmitButton } from './SubmitButton.js'; import { jsx } from 'react/jsx-runtime'; var _excluded = ["children"], _excluded2 = ["children"], _excluded3 = ["children"], _excluded4 = ["children"], _excluded5 = ["children"], _excluded6 = ["children"], _excluded7 = ["children"], _excluded8 = ["children"], _excluded9 = ["children"], _excluded10 = ["children"], _excluded11 = ["children"], _excluded12 = ["children"], _excluded13 = ["children"], _excluded14 = ["children"], _excluded15 = ["children"], _excluded16 = ["children"], _excluded17 = ["children"], _excluded18 = ["children"], _excluded19 = ["children"], _excluded20 = ["children"]; function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } // TODO: Remove this, should be <Button type="danger" /> var ButtonDanger = function ButtonDanger(_ref) { var children = _ref.children, props = _objectWithoutProperties(_ref, _excluded); return /*#__PURE__*/jsx(Button, _objectSpread(_objectSpread({ type: "danger" }, props), {}, { children: children })); }; ButtonDanger.propTypes = { children: PropTypes.node.isRequired }; // TODO: Remove this, should be <Button type="subtle" /> var ButtonSubtle = function ButtonSubtle(_ref2) { var children = _ref2.children, props = _objectWithoutProperties(_ref2, _excluded2); return /*#__PURE__*/jsx(Button, _objectSpread(_objectSpread({ type: "subtle" }, props), {}, { children: children })); }; ButtonSubtle.propTypes = { children: PropTypes.node.isRequired }; // TODO: Remove this, should be <Button type="primary" /> var ButtonPrimary = function ButtonPrimary(_ref3) { var children = _ref3.children, props = _objectWithoutProperties(_ref3, _excluded3); return /*#__PURE__*/jsx(Button, _objectSpread(_objectSpread({ type: "primary" }, props), {}, { children: children })); }; ButtonPrimary.propTypes = { children: PropTypes.node.isRequired }; // TODO: Remove this, should be <Button /> var ButtonSecondary = function ButtonSecondary(_ref4) { var children = _ref4.children, props = _objectWithoutProperties(_ref4, _excluded4); return /*#__PURE__*/jsx(Button, _objectSpread(_objectSpread({ type: "secondary" }, props), {}, { children: children })); }; ButtonSecondary.propTypes = { children: PropTypes.node.isRequired }; // TODO: Remove this, unclear why there's a separate React component alias var ButtonTable = ButtonSubtle; // TODO: Remove this, should be <Button type="tertiary" /> var ButtonTertiary = function ButtonTertiary(_ref5) { var children = _ref5.children, props = _objectWithoutProperties(_ref5, _excluded5); return /*#__PURE__*/jsx(Button, _objectSpread(_objectSpread({ type: "tertiary" }, props), {}, { children: children })); }; ButtonTertiary.propTypes = { children: PropTypes.node.isRequired }; // TODO: Remove this, should be <Button type="warning" /> var ButtonWarning = function ButtonWarning(_ref6) { var children = _ref6.children, props = _objectWithoutProperties(_ref6, _excluded6); return /*#__PURE__*/jsx(Button, _objectSpread(_objectSpread({ type: "warning" }, props), {}, { children: children })); }; ButtonWarning.propTypes = { children: PropTypes.node.isRequired }; // TODO: Remove this, should be <Button type="danger" /> with appropriate actions var SubmitButtonDanger = function SubmitButtonDanger(_ref7) { var children = _ref7.children, props = _objectWithoutProperties(_ref7, _excluded7); return /*#__PURE__*/jsx(SubmitButton, _objectSpread(_objectSpread({ type: "danger" }, props), {}, { children: children })); }; SubmitButtonDanger.propTypes = { children: PropTypes.node.isRequired }; // TODO: Remove this, should be <Button type="primary" /> with appropriate actions var SubmitButtonPrimary = function SubmitButtonPrimary(_ref8) { var children = _ref8.children, props = _objectWithoutProperties(_ref8, _excluded8); return /*#__PURE__*/jsx(SubmitButton, _objectSpread(_objectSpread({ type: "primary" }, props), {}, { children: children })); }; SubmitButtonPrimary.propTypes = { children: PropTypes.node.isRequired }; // TODO: Remove this, should be <Button /> with appropriate actions var SubmitButtonSecondary = function SubmitButtonSecondary(_ref9) { var children = _ref9.children, props = _objectWithoutProperties(_ref9, _excluded9); return /*#__PURE__*/jsx(SubmitButton, _objectSpread(_objectSpread({ type: "secondary" }, props), {}, { children: children })); }; SubmitButtonSecondary.propTypes = { children: PropTypes.node.isRequired }; // TODO: Remove this, should not be a button at all. This is a text link var LinkButtonPrimary = function LinkButtonPrimary(_ref10) { var children = _ref10.children, props = _objectWithoutProperties(_ref10, _excluded10); return /*#__PURE__*/jsx(LinkButton, _objectSpread(_objectSpread({ type: "primary" }, props), {}, { children: children })); }; LinkButtonPrimary.propTypes = { children: PropTypes.node.isRequired }; // TODO: Remove this, should not be a button at all. This is a text link var LinkButtonSecondary = function LinkButtonSecondary(_ref11) { var children = _ref11.children, props = _objectWithoutProperties(_ref11, _excluded11); return /*#__PURE__*/jsx(LinkButton, _objectSpread(_objectSpread({ type: "secondary" }, props), {}, { children: children })); }; LinkButtonSecondary.propTypes = { children: PropTypes.node.isRequired }; // TODO: Remove this, should not be a button at all. This is a text link var LinkButtonSubtle = function LinkButtonSubtle(_ref12) { var children = _ref12.children, props = _objectWithoutProperties(_ref12, _excluded12); return /*#__PURE__*/jsx(LinkButton, _objectSpread(_objectSpread({ type: "subtle" }, props), {}, { children: children })); }; LinkButtonSubtle.propTypes = { children: PropTypes.node.isRequired }; // TODO: Remove this, should not be a button at all. This is a text link var LinkButtonTertiary = function LinkButtonTertiary(_ref13) { var children = _ref13.children, props = _objectWithoutProperties(_ref13, _excluded13); return /*#__PURE__*/jsx(LinkButton, _objectSpread(_objectSpread({ type: "tertiary" }, props), {}, { children: children })); }; LinkButtonTertiary.propTypes = { children: PropTypes.node.isRequired }; // TODO: Remove this, should not be a button at all. This is a text link var LinkButtonGitHub = function LinkButtonGitHub(_ref14) { var children = _ref14.children, props = _objectWithoutProperties(_ref14, _excluded14); return /*#__PURE__*/jsx(LinkButton, _objectSpread(_objectSpread({ type: "github" }, props), {}, { children: children })); }; LinkButtonGitHub.propTypes = { children: PropTypes.node.isRequired }; // TODO: Remove this, should not be a button at all. This is a text link var LinkButtonGitLab = function LinkButtonGitLab(_ref15) { var children = _ref15.children, props = _objectWithoutProperties(_ref15, _excluded15); return /*#__PURE__*/jsx(LinkButton, _objectSpread(_objectSpread({ type: "gitlab" }, props), {}, { children: children })); }; LinkButtonGitLab.propTypes = { children: PropTypes.node.isRequired }; // TODO: Remove this, should not be a button at all. This is a text link var LinkButtonBitbucket = function LinkButtonBitbucket(_ref16) { var children = _ref16.children, props = _objectWithoutProperties(_ref16, _excluded16); return /*#__PURE__*/jsx(LinkButton, _objectSpread(_objectSpread({ type: "bitbucket" }, props), {}, { children: children })); }; LinkButtonBitbucket.propTypes = { children: PropTypes.node.isRequired }; // TODO: Remove this, should not be a button at all. This is a text link var RouterLinkButtonPrimary = function RouterLinkButtonPrimary(_ref17) { var children = _ref17.children, props = _objectWithoutProperties(_ref17, _excluded17); return /*#__PURE__*/jsx(RouterLinkButton, _objectSpread(_objectSpread({ type: "primary" }, props), {}, { children: children })); }; RouterLinkButtonPrimary.propTypes = { children: PropTypes.node.isRequired }; // TODO: Remove this, should not be a button at all. This is a text link var RouterLinkButtonSecondary = function RouterLinkButtonSecondary(_ref18) { var children = _ref18.children, props = _objectWithoutProperties(_ref18, _excluded18); return /*#__PURE__*/jsx(RouterLinkButton, _objectSpread(_objectSpread({ type: "secondary" }, props), {}, { children: children })); }; RouterLinkButtonSecondary.propTypes = { children: PropTypes.node.isRequired }; // TODO: Remove this, should not be a button at all. This is a text link var RouterLinkButtonSubtle = function RouterLinkButtonSubtle(_ref19) { var children = _ref19.children, props = _objectWithoutProperties(_ref19, _excluded19); return /*#__PURE__*/jsx(RouterLinkButton, _objectSpread(_objectSpread({ type: "subtle" }, props), {}, { children: children })); }; RouterLinkButtonSubtle.propTypes = { children: PropTypes.node.isRequired }; // TODO: Remove this, should not be a button at all. This is a text link var RouterLinkButtonTertiary = function RouterLinkButtonTertiary(_ref20) { var children = _ref20.children, props = _objectWithoutProperties(_ref20, _excluded20); return /*#__PURE__*/jsx(RouterLinkButton, _objectSpread(_objectSpread({ type: "tertiary" }, props), {}, { children: children })); }; RouterLinkButtonTertiary.propTypes = { children: PropTypes.node.isRequired }; export { ButtonDanger, ButtonPrimary, ButtonSecondary, ButtonSubtle, ButtonTable, ButtonTertiary, ButtonWarning, LinkButtonBitbucket, LinkButtonGitHub, LinkButtonGitLab, LinkButtonPrimary, LinkButtonSecondary, LinkButtonSubtle, LinkButtonTertiary, RouterLinkButtonPrimary, RouterLinkButtonSecondary, RouterLinkButtonSubtle, RouterLinkButtonTertiary, SubmitButtonDanger, SubmitButtonPrimary, SubmitButtonSecondary }; //# sourceMappingURL=index.js.map