@dfds-ui/react-components 0.9.10 → 0.9.11-alpha.6c614078

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.
Files changed (210) hide show
  1. package/cjs/loader/DfdsLoader.js +83 -0
  2. package/cjs/loader/Loader.js +4 -4
  3. package/cjs/loader/index.js +8 -0
  4. package/cjs/stepper/Step.js +56 -58
  5. package/cjs/stepper/StepButton.js +68 -0
  6. package/cjs/stepper/StepLabel.js +31 -0
  7. package/cjs/stepper/Stepper.js +36 -69
  8. package/cjs/stepper/Stepper.styles.js +40 -0
  9. package/cjs/stepper/index.js +1 -11
  10. package/loader/DfdsLoader.d.ts +9 -0
  11. package/loader/DfdsLoader.js +55 -0
  12. package/loader/Loader.js +4 -4
  13. package/loader/index.d.ts +1 -0
  14. package/loader/index.js +2 -1
  15. package/package.json +9 -9
  16. package/stepper/Step.d.ts +37 -5
  17. package/stepper/Step.js +59 -65
  18. package/stepper/StepButton.d.ts +4 -0
  19. package/stepper/StepButton.js +54 -0
  20. package/stepper/StepLabel.d.ts +6 -0
  21. package/stepper/StepLabel.js +19 -0
  22. package/stepper/Stepper.d.ts +23 -11
  23. package/stepper/Stepper.js +34 -86
  24. package/stepper/Stepper.styles.d.ts +3 -0
  25. package/stepper/Stepper.styles.js +27 -0
  26. package/stepper/index.d.ts +1 -1
  27. package/stepper/index.js +1 -1
  28. package/cjs/accordion/Accordion.d.ts +0 -97
  29. package/cjs/accordion/AccordionContent.d.ts +0 -13
  30. package/cjs/accordion/AccordionSmall.d.ts +0 -55
  31. package/cjs/accordion/index.d.ts +0 -3
  32. package/cjs/app-bar/AppBar.d.ts +0 -12
  33. package/cjs/app-bar/AppBarContext.d.ts +0 -10
  34. package/cjs/app-bar/AppBarDrawer.d.ts +0 -3
  35. package/cjs/app-bar/AppBarIconButton.d.ts +0 -10
  36. package/cjs/app-bar/AppBarItem.d.ts +0 -21
  37. package/cjs/app-bar/AppBarListItem.d.ts +0 -15
  38. package/cjs/app-bar/index.d.ts +0 -7
  39. package/cjs/assertions/banner/Banner.d.ts +0 -52
  40. package/cjs/assertions/banner/BannerAction.d.ts +0 -18
  41. package/cjs/assertions/banner/BannerActionContext.d.ts +0 -12
  42. package/cjs/assertions/banner/BannerTypography.d.ts +0 -7
  43. package/cjs/assertions/banner/index.d.ts +0 -4
  44. package/cjs/assertions/index.d.ts +0 -2
  45. package/cjs/assertions/toast/Toast.d.ts +0 -11
  46. package/cjs/assertions/toast/Toaster.d.ts +0 -18
  47. package/cjs/assertions/toast/index.d.ts +0 -2
  48. package/cjs/badge/Badge.d.ts +0 -26
  49. package/cjs/badge/index.d.ts +0 -2
  50. package/cjs/button/BadgeIcon.d.ts +0 -6
  51. package/cjs/button/BaseButton.d.ts +0 -14
  52. package/cjs/button/Button.d.ts +0 -18
  53. package/cjs/button/IconButton.d.ts +0 -75
  54. package/cjs/button/LinkButton.d.ts +0 -8
  55. package/cjs/button/button-style.d.ts +0 -7
  56. package/cjs/button/index.d.ts +0 -7
  57. package/cjs/button-stack/ButtonStack.d.ts +0 -11
  58. package/cjs/button-stack/index.d.ts +0 -1
  59. package/cjs/card/Card.d.ts +0 -18
  60. package/cjs/card/CardActions.d.ts +0 -4
  61. package/cjs/card/CardContent.d.ts +0 -13
  62. package/cjs/card/CardMedia.d.ts +0 -18
  63. package/cjs/card/CardPriceTag.d.ts +0 -24
  64. package/cjs/card/CardTitle.d.ts +0 -18
  65. package/cjs/card/index.d.ts +0 -6
  66. package/cjs/chip/Chip.d.ts +0 -19
  67. package/cjs/chip/index.d.ts +0 -2
  68. package/cjs/common/LockBodyScroll.d.ts +0 -25
  69. package/cjs/common/arrow.d.ts +0 -6
  70. package/cjs/common/emotionCloneElement.d.ts +0 -2
  71. package/cjs/common/intent.d.ts +0 -3
  72. package/cjs/common/miniMoize.d.ts +0 -1
  73. package/cjs/common/polymorphic.d.ts +0 -25
  74. package/cjs/common/use-media.d.ts +0 -1
  75. package/cjs/common/useOnClickOutside.d.ts +0 -3
  76. package/cjs/common/utils.d.ts +0 -3
  77. package/cjs/counter/Counter.d.ts +0 -26
  78. package/cjs/counter/PluralCounter.d.ts +0 -13
  79. package/cjs/counter/index.d.ts +0 -2
  80. package/cjs/data-table/DataTable.d.ts +0 -10
  81. package/cjs/data-table/index.d.ts +0 -1
  82. package/cjs/date-range-picker/DatePickerDefaultStyles.d.ts +0 -2
  83. package/cjs/date-range-picker/DatePickerDfdsStyles.d.ts +0 -2
  84. package/cjs/date-range-picker/DateRangePicker.d.ts +0 -33
  85. package/cjs/date-range-picker/index.d.ts +0 -1
  86. package/cjs/divider/Divider.d.ts +0 -22
  87. package/cjs/divider/index.d.ts +0 -1
  88. package/cjs/drawer/Drawer.d.ts +0 -31
  89. package/cjs/drawer/index.d.ts +0 -1
  90. package/cjs/dropdown-menu/Dropdown.d.ts +0 -46
  91. package/cjs/dropdown-menu/DropdownContext.d.ts +0 -12
  92. package/cjs/dropdown-menu/MenuCheckbox.d.ts +0 -34
  93. package/cjs/dropdown-menu/MenuItem.d.ts +0 -45
  94. package/cjs/dropdown-menu/MenuTitle.d.ts +0 -14
  95. package/cjs/dropdown-menu/index.d.ts +0 -5
  96. package/cjs/elevation/index.d.ts +0 -3
  97. package/cjs/flexbox/FlexBox.d.ts +0 -98
  98. package/cjs/flexbox/index.d.ts +0 -1
  99. package/cjs/footer/Footer.d.ts +0 -6
  100. package/cjs/footer/index.d.ts +0 -1
  101. package/cjs/forms/assistive-text/AssistiveText.d.ts +0 -7
  102. package/cjs/forms/asterisk/Asterisk.d.ts +0 -2
  103. package/cjs/forms/checkbox/Checkbox.d.ts +0 -39
  104. package/cjs/forms/checkbox/ExampleControlComponent.d.ts +0 -10
  105. package/cjs/forms/checkbox/index.d.ts +0 -1
  106. package/cjs/forms/email-field/EmailField.d.ts +0 -6
  107. package/cjs/forms/error-text/ErrorText.d.ts +0 -7
  108. package/cjs/forms/field/Field.d.ts +0 -10
  109. package/cjs/forms/index.d.ts +0 -21
  110. package/cjs/forms/input/Input.d.ts +0 -19
  111. package/cjs/forms/input/InputComposition.d.ts +0 -43
  112. package/cjs/forms/label/Label.d.ts +0 -10
  113. package/cjs/forms/number-field/NumberField.d.ts +0 -6
  114. package/cjs/forms/password-field/PasswordField.d.ts +0 -4
  115. package/cjs/forms/radio/Radio.d.ts +0 -35
  116. package/cjs/forms/reactselect/ReactSelect.d.ts +0 -25
  117. package/cjs/forms/searchable-select/AsyncSearchableSelect.d.ts +0 -6
  118. package/cjs/forms/select/Select.d.ts +0 -16
  119. package/cjs/forms/select-field/SelectField.d.ts +0 -17
  120. package/cjs/forms/switch/Switch.d.ts +0 -13
  121. package/cjs/forms/tel-field/TelField.d.ts +0 -6
  122. package/cjs/forms/text-field/TextField.d.ts +0 -26
  123. package/cjs/global-styles/GlobalStyles.d.ts +0 -2
  124. package/cjs/global-styles/sanitize.d.ts +0 -1
  125. package/cjs/grid/Column.d.ts +0 -9
  126. package/cjs/grid/Container.d.ts +0 -14
  127. package/cjs/grid/index.d.ts +0 -2
  128. package/cjs/hero/Hero.d.ts +0 -10
  129. package/cjs/hero/index.d.ts +0 -1
  130. package/cjs/hero/stripes.d.ts +0 -6
  131. package/cjs/ie-banner/IEBanner.d.ts +0 -11
  132. package/cjs/ie-banner/index.d.ts +0 -1
  133. package/cjs/index.d.ts +0 -42
  134. package/cjs/layout/LayoutLegacy.d.ts +0 -1
  135. package/cjs/lists/FeatureList.d.ts +0 -24
  136. package/cjs/lists/ListAddon.d.ts +0 -11
  137. package/cjs/lists/ListDivider.d.ts +0 -4
  138. package/cjs/lists/ListIcon.d.ts +0 -18
  139. package/cjs/lists/ListItem.d.ts +0 -46
  140. package/cjs/lists/ListText.d.ts +0 -39
  141. package/cjs/lists/ListTextGroup.d.ts +0 -15
  142. package/cjs/lists/ListTitle.d.ts +0 -3
  143. package/cjs/lists/index.d.ts +0 -8
  144. package/cjs/loader/Loader.d.ts +0 -5
  145. package/cjs/loader/index.d.ts +0 -1
  146. package/cjs/localization/LocaleFlag.d.ts +0 -13
  147. package/cjs/localization/index.d.ts +0 -2
  148. package/cjs/localization/locales.d.ts +0 -34
  149. package/cjs/logo/Logo.d.ts +0 -10
  150. package/cjs/logo/index.d.ts +0 -1
  151. package/cjs/media/index.d.ts +0 -2
  152. package/cjs/menu/Menu.d.ts +0 -7
  153. package/cjs/menu/index.d.ts +0 -2
  154. package/cjs/nav-bar/NavBar.d.ts +0 -35
  155. package/cjs/nav-bar/index.d.ts +0 -2
  156. package/cjs/nav-menu/NavMenuItem.d.ts +0 -10
  157. package/cjs/nav-menu/index.d.ts +0 -1
  158. package/cjs/pagination/Pagination.d.ts +0 -44
  159. package/cjs/pagination/Pagination.styles.d.ts +0 -2
  160. package/cjs/pagination/index.d.ts +0 -1
  161. package/cjs/popper/Popper.d.ts +0 -29
  162. package/cjs/popper/index.d.ts +0 -1
  163. package/cjs/progress-bar/ProgressBar.d.ts +0 -7
  164. package/cjs/progress-bar/index.d.ts +0 -2
  165. package/cjs/schedule/ScheduleItem.d.ts +0 -21
  166. package/cjs/schedule/ScheduleList.d.ts +0 -11
  167. package/cjs/schedule/index.d.ts +0 -2
  168. package/cjs/side-sheet/SideSheet.d.ts +0 -57
  169. package/cjs/side-sheet/SideSheetCloseButton.d.ts +0 -13
  170. package/cjs/side-sheet/SideSheetContent.d.ts +0 -7
  171. package/cjs/side-sheet/SideSheetFooter.d.ts +0 -7
  172. package/cjs/side-sheet/SideSheetHeader.d.ts +0 -9
  173. package/cjs/side-sheet/SideSheetHeadline.d.ts +0 -7
  174. package/cjs/side-sheet/index.d.ts +0 -4
  175. package/cjs/site-layout/SiteLayout.d.ts +0 -36
  176. package/cjs/site-layout/index.d.ts +0 -2
  177. package/cjs/skeleton/Skeleton.d.ts +0 -6
  178. package/cjs/skeleton/index.d.ts +0 -1
  179. package/cjs/social-media-link-list/SocialMediaLinkList.d.ts +0 -26
  180. package/cjs/social-media-link-list/index.d.ts +0 -1
  181. package/cjs/spinner/Spinner.d.ts +0 -57
  182. package/cjs/spinner/index.d.ts +0 -1
  183. package/cjs/stepper/Step.d.ts +0 -9
  184. package/cjs/stepper/Stepper.d.ts +0 -15
  185. package/cjs/stepper/index.d.ts +0 -2
  186. package/cjs/styles/index.d.ts +0 -3
  187. package/cjs/styles/media.d.ts +0 -21
  188. package/cjs/styles/rem.d.ts +0 -1
  189. package/cjs/styles/style-helpers.d.ts +0 -1
  190. package/cjs/styles/theme.d.ts +0 -39
  191. package/cjs/surface/Surface.d.ts +0 -30
  192. package/cjs/surface/index.d.ts +0 -1
  193. package/cjs/tab/Tab.d.ts +0 -11
  194. package/cjs/tab/TabPanel.d.ts +0 -7
  195. package/cjs/tab/Tabs.d.ts +0 -11
  196. package/cjs/tab/TabsContext.d.ts +0 -14
  197. package/cjs/tab/index.d.ts +0 -4
  198. package/cjs/table/Table.d.ts +0 -22
  199. package/cjs/table/TableBody.d.ts +0 -9
  200. package/cjs/table/TableDataCell.d.ts +0 -14
  201. package/cjs/table/TableHead.d.ts +0 -14
  202. package/cjs/table/TableHeaderCell.d.ts +0 -15
  203. package/cjs/table/TableRow.d.ts +0 -17
  204. package/cjs/table/index.d.ts +0 -6
  205. package/cjs/test/Test.d.ts +0 -8
  206. package/cjs/tooltip/Tooltip.d.ts +0 -22
  207. package/cjs/tooltip/index.d.ts +0 -2
  208. package/cjs/typography/Headlines.d.ts +0 -70
  209. package/cjs/typography/Text.d.ts +0 -4
  210. package/cjs/typography/index.d.ts +0 -2
@@ -1,15 +1,27 @@
1
- import React, { SetStateAction, Dispatch, ReactNode } from 'react';
2
- declare type StepperProps = {
3
- children: ReactNode;
4
- initialStep?: number;
1
+ import React, { ReactNode } from 'react';
2
+ declare type StepperContextType = {
3
+ activeStep: number;
4
+ orientation: 'horizontal' | 'vertical';
5
+ nonSequential: boolean;
5
6
  };
6
- export declare const useStepperContext: () => {
7
- activeStep: string;
8
- setStep: (id: string) => void;
9
- setNext: () => Dispatch<SetStateAction<number>> | void;
10
- setBack: () => Dispatch<SetStateAction<number>> | void;
11
- setReset: () => Dispatch<SetStateAction<number>> | void;
12
- setActiveIndex: Dispatch<SetStateAction<number>>;
7
+ export declare type StepperProps = {
8
+ /**
9
+ * Stepper layout orientation
10
+ */
11
+ orientation?: 'horizontal' | 'vertical';
12
+ /**
13
+ * Multiple `<Step/>` components
14
+ */
15
+ children: ReactNode;
16
+ /**
17
+ * The initial step
18
+ */
19
+ activeStep?: number;
20
+ /**
21
+ * The initial step
22
+ */
23
+ nonSequential?: boolean;
13
24
  };
25
+ export declare const StepperContext: React.Context<StepperContextType>;
14
26
  declare const _default: React.NamedExoticComponent<StepperProps>;
15
27
  export default _default;
@@ -1,97 +1,45 @@
1
- var _excluded = ["children", "initialStep"];
1
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
2
2
 
3
- 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); }
3
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
4
4
 
5
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
5
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
6
 
7
- function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
8
-
9
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
10
-
11
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
12
-
13
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
14
-
15
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
16
-
17
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
18
-
19
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
20
-
21
- function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
22
-
23
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
24
-
25
- 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; }
26
-
27
- 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; }
28
-
29
- import React, { useState, useContext, createContext, useCallback, memo } from 'react';
30
- import { Stepper } from '@material-ui/core';
7
+ import React, { createContext, memo } from 'react';
8
+ import { stepperWrapperStyles } from './Stepper.styles';
31
9
  import { jsx as ___EmotionJSX } from "@emotion/react";
32
- var StepperContext = /*#__PURE__*/createContext(undefined);
33
- export var useStepperContext = function useStepperContext() {
34
- var context = useContext(StepperContext);
35
-
36
- if (context === undefined) {
37
- throw new Error('useStepperContext must be used within a StepperProvider');
38
- }
39
-
40
- return context;
41
- };
10
+ export var StepperContext = /*#__PURE__*/createContext({
11
+ activeStep: 0,
12
+ orientation: 'horizontal',
13
+ nonSequential: false
14
+ });
42
15
 
43
16
  var StepperProvider = function StepperProvider(_ref) {
44
17
  var children = _ref.children,
45
- initialStep = _ref.initialStep,
46
- props = _objectWithoutProperties(_ref, _excluded);
47
-
48
- var _useState = useState([]),
49
- _useState2 = _slicedToArray(_useState, 2),
50
- steps = _useState2[0],
51
- setSteps = _useState2[1];
52
-
53
- var _useState3 = useState(initialStep || 0),
54
- _useState4 = _slicedToArray(_useState3, 2),
55
- activeIndex = _useState4[0],
56
- setActiveIndex = _useState4[1];
57
-
58
- var activeStep = steps[activeIndex];
59
- var setStep = useCallback(function (newStep) {
60
- return setSteps(function (prevSteps) {
61
- return [].concat(_toConsumableArray(prevSteps), [newStep]);
62
- });
63
- }, []);
64
- var setNext = useCallback(function () {
65
- return setActiveIndex(function (prevIndex) {
66
- return prevIndex + 1;
67
- });
68
- }, []);
69
- var setBack = useCallback(function () {
70
- return setActiveIndex(function (prevIndex) {
71
- return prevIndex - 1;
72
- });
73
- }, []);
74
- var setReset = useCallback(function () {
75
- return setActiveIndex(0);
76
- }, []);
77
- return ___EmotionJSX(StepperContext.Provider, {
78
- value: {
79
- setStep: setStep,
18
+ _ref$activeStep = _ref.activeStep,
19
+ activeStep = _ref$activeStep === void 0 ? 0 : _ref$activeStep,
20
+ _ref$nonSequential = _ref.nonSequential,
21
+ nonSequential = _ref$nonSequential === void 0 ? false : _ref$nonSequential,
22
+ _ref$orientation = _ref.orientation,
23
+ orientation = _ref$orientation === void 0 ? 'horizontal' : _ref$orientation;
24
+ var childrenArray = React.Children.toArray(children).filter(Boolean);
25
+ var stepArray = childrenArray.map(function (child, index) {
26
+ return /*#__PURE__*/React.cloneElement(child, _objectSpread({
27
+ index: index,
28
+ last: index + 1 === childrenArray.length
29
+ }, child.props));
30
+ });
31
+ var contextValue = React.useMemo(function () {
32
+ return {
80
33
  activeStep: activeStep,
81
- setNext: setNext,
82
- setBack: setBack,
83
- setReset: setReset,
84
- setActiveIndex: setActiveIndex
85
- }
86
- }, ___EmotionJSX(Stepper, _extends({
87
- style: {
88
- padding: 0
89
- }
90
- }, props, {
91
- connector: ___EmotionJSX(React.Fragment, null),
92
- orientation: "vertical",
93
- activeStep: activeIndex
94
- }), children));
34
+ nonSequential: nonSequential,
35
+ orientation: orientation
36
+ };
37
+ }, [activeStep, nonSequential, orientation]);
38
+ return ___EmotionJSX(StepperContext.Provider, {
39
+ value: contextValue
40
+ }, ___EmotionJSX("div", {
41
+ css: stepperWrapperStyles
42
+ }, stepArray));
95
43
  };
96
44
 
97
45
  export default /*#__PURE__*/memo(StepperProvider);
@@ -0,0 +1,3 @@
1
+ export declare const stepperWrapperStyles: import("@emotion/react").SerializedStyles;
2
+ export declare const stepWrapperStyles: import("@emotion/react").SerializedStyles;
3
+ export declare const stepButtonStyles: ({ active, completed }: any) => import("@emotion/react").SerializedStyles;
@@ -0,0 +1,27 @@
1
+ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
2
+
3
+ import { theme } from '@dfds-ui/theme';
4
+ import { css } from '@emotion/react';
5
+ export var stepperWrapperStyles = process.env.NODE_ENV === "production" ? {
6
+ name: "zjik7",
7
+ styles: "display:flex"
8
+ } : {
9
+ name: "1efy7gc-stepperWrapperStyles",
10
+ styles: "display:flex;label:stepperWrapperStyles;",
11
+ map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zdGVwcGVyL1N0ZXBwZXIuc3R5bGVzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFHdUMiLCJmaWxlIjoiLi4vLi4vc3JjL3N0ZXBwZXIvU3RlcHBlci5zdHlsZXMudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgdGhlbWUgfSBmcm9tICdAZGZkcy11aS90aGVtZSdcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0J1xuXG5leHBvcnQgY29uc3Qgc3RlcHBlcldyYXBwZXJTdHlsZXMgPSBjc3NgXG4gIGRpc3BsYXk6IGZsZXg7XG5gXG5cbmV4cG9ydCBjb25zdCBzdGVwV3JhcHBlclN0eWxlcyA9IGNzc2BcbiAgZGlzcGxheTogZmxleDtcbiAgZ2FwOiAwLjVyZW07XG4gIGFsaWduLWl0ZW1zOiBjZW50ZXI7XG4gIGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG4gICY6bm90KDpsYXN0LWNoaWxkKSB7XG4gICAgZmxleDogMTtcbiAgICAmOmFmdGVyIHtcbiAgICAgIGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG4gICAgICBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7XG4gICAgICBjb250ZW50OiAnJztcbiAgICAgIHBvc2l0aW9uOiByZWxhdGl2ZTtcbiAgICAgIHotaW5kZXg6IC0xO1xuICAgICAgaGVpZ2h0OiAycHg7XG4gICAgICBiYWNrZ3JvdW5kLWNvbG9yOiAjYTZiNWJkO1xuICAgICAgZmxleDogMTtcbiAgICAgIHdpZHRoOiAxMDAlO1xuICAgICAgbWFyZ2luLXJpZ2h0OiAwLjVyZW07XG4gICAgfVxuICB9XG5gXG5cbmV4cG9ydCBjb25zdCBzdGVwQnV0dG9uU3R5bGVzID0gKHsgYWN0aXZlLCBjb21wbGV0ZWQgfTogYW55KSA9PiBjc3NgXG4gIGJvcmRlcjogbm9uZTtcbiAgbWFyZ2luOiAwO1xuICBwYWRkaW5nOiAwO1xuICBjdXJzb3I6IHBvaW50ZXI7XG4gIGJvcmRlci1yYWRpdXM6IDUwJTtcbiAgYmFja2dyb3VuZC1jb2xvcjogJHthY3RpdmUgfHwgY29tcGxldGVkID8gdGhlbWUuY29sb3JzLnNlY29uZGFyeS5tYWluIDogJyNhNmI1YmQnfTtcbiAgZm9udC13ZWlnaHQ6ICR7YWN0aXZlIHx8IGNvbXBsZXRlZCA/ICdib2xkJyA6ICcnfTtcbiAgbWluLXdpZHRoOiAxLjVlbTtcbiAgbWluLWhlaWdodDogMS41ZW07XG4gIGRpc3BsYXk6IGZsZXg7XG4gIGp1c3RpZnktY29udGVudDogY2VudGVyO1xuICBhbGlnbi1pdGVtczogY2VudGVyO1xuICBjb2xvcjogI2ZmZjtcbiAgOmhvdmVyIHtcbiAgICBjb2xvcjogI2ZmZjtcbiAgfVxuYFxuIl19 */",
12
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
13
+ };
14
+ export var stepWrapperStyles = process.env.NODE_ENV === "production" ? {
15
+ name: "qws31f",
16
+ styles: "display:flex;gap:0.5rem;align-items:center;box-sizing:border-box;&:not(:last-child){flex:1;&:after{box-sizing:border-box;display:inline-block;content:'';position:relative;z-index:-1;height:2px;background-color:#a6b5bd;flex:1;width:100%;margin-right:0.5rem;}}"
17
+ } : {
18
+ name: "8b6k6d-stepWrapperStyles",
19
+ styles: "display:flex;gap:0.5rem;align-items:center;box-sizing:border-box;&:not(:last-child){flex:1;&:after{box-sizing:border-box;display:inline-block;content:'';position:relative;z-index:-1;height:2px;background-color:#a6b5bd;flex:1;width:100%;margin-right:0.5rem;}};label:stepWrapperStyles;",
20
+ map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zdGVwcGVyL1N0ZXBwZXIuc3R5bGVzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFPb0MiLCJmaWxlIjoiLi4vLi4vc3JjL3N0ZXBwZXIvU3RlcHBlci5zdHlsZXMudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgdGhlbWUgfSBmcm9tICdAZGZkcy11aS90aGVtZSdcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0J1xuXG5leHBvcnQgY29uc3Qgc3RlcHBlcldyYXBwZXJTdHlsZXMgPSBjc3NgXG4gIGRpc3BsYXk6IGZsZXg7XG5gXG5cbmV4cG9ydCBjb25zdCBzdGVwV3JhcHBlclN0eWxlcyA9IGNzc2BcbiAgZGlzcGxheTogZmxleDtcbiAgZ2FwOiAwLjVyZW07XG4gIGFsaWduLWl0ZW1zOiBjZW50ZXI7XG4gIGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG4gICY6bm90KDpsYXN0LWNoaWxkKSB7XG4gICAgZmxleDogMTtcbiAgICAmOmFmdGVyIHtcbiAgICAgIGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG4gICAgICBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7XG4gICAgICBjb250ZW50OiAnJztcbiAgICAgIHBvc2l0aW9uOiByZWxhdGl2ZTtcbiAgICAgIHotaW5kZXg6IC0xO1xuICAgICAgaGVpZ2h0OiAycHg7XG4gICAgICBiYWNrZ3JvdW5kLWNvbG9yOiAjYTZiNWJkO1xuICAgICAgZmxleDogMTtcbiAgICAgIHdpZHRoOiAxMDAlO1xuICAgICAgbWFyZ2luLXJpZ2h0OiAwLjVyZW07XG4gICAgfVxuICB9XG5gXG5cbmV4cG9ydCBjb25zdCBzdGVwQnV0dG9uU3R5bGVzID0gKHsgYWN0aXZlLCBjb21wbGV0ZWQgfTogYW55KSA9PiBjc3NgXG4gIGJvcmRlcjogbm9uZTtcbiAgbWFyZ2luOiAwO1xuICBwYWRkaW5nOiAwO1xuICBjdXJzb3I6IHBvaW50ZXI7XG4gIGJvcmRlci1yYWRpdXM6IDUwJTtcbiAgYmFja2dyb3VuZC1jb2xvcjogJHthY3RpdmUgfHwgY29tcGxldGVkID8gdGhlbWUuY29sb3JzLnNlY29uZGFyeS5tYWluIDogJyNhNmI1YmQnfTtcbiAgZm9udC13ZWlnaHQ6ICR7YWN0aXZlIHx8IGNvbXBsZXRlZCA/ICdib2xkJyA6ICcnfTtcbiAgbWluLXdpZHRoOiAxLjVlbTtcbiAgbWluLWhlaWdodDogMS41ZW07XG4gIGRpc3BsYXk6IGZsZXg7XG4gIGp1c3RpZnktY29udGVudDogY2VudGVyO1xuICBhbGlnbi1pdGVtczogY2VudGVyO1xuICBjb2xvcjogI2ZmZjtcbiAgOmhvdmVyIHtcbiAgICBjb2xvcjogI2ZmZjtcbiAgfVxuYFxuIl19 */",
21
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
22
+ };
23
+ export var stepButtonStyles = function stepButtonStyles(_ref) {
24
+ var active = _ref.active,
25
+ completed = _ref.completed;
26
+ return /*#__PURE__*/css("border:none;margin:0;padding:0;cursor:pointer;border-radius:50%;background-color:", active || completed ? theme.colors.secondary.main : '#a6b5bd', ";font-weight:", active || completed ? 'bold' : '', ";min-width:1.5em;min-height:1.5em;display:flex;justify-content:center;align-items:center;color:#fff;:hover{color:#fff;}" + (process.env.NODE_ENV === "production" ? "" : ";label:stepButtonStyles;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zdGVwcGVyL1N0ZXBwZXIuc3R5bGVzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE2Qm1FIiwiZmlsZSI6Ii4uLy4uL3NyYy9zdGVwcGVyL1N0ZXBwZXIuc3R5bGVzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IHRoZW1lIH0gZnJvbSAnQGRmZHMtdWkvdGhlbWUnXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCdcblxuZXhwb3J0IGNvbnN0IHN0ZXBwZXJXcmFwcGVyU3R5bGVzID0gY3NzYFxuICBkaXNwbGF5OiBmbGV4O1xuYFxuXG5leHBvcnQgY29uc3Qgc3RlcFdyYXBwZXJTdHlsZXMgPSBjc3NgXG4gIGRpc3BsYXk6IGZsZXg7XG4gIGdhcDogMC41cmVtO1xuICBhbGlnbi1pdGVtczogY2VudGVyO1xuICBib3gtc2l6aW5nOiBib3JkZXItYm94O1xuICAmOm5vdCg6bGFzdC1jaGlsZCkge1xuICAgIGZsZXg6IDE7XG4gICAgJjphZnRlciB7XG4gICAgICBib3gtc2l6aW5nOiBib3JkZXItYm94O1xuICAgICAgZGlzcGxheTogaW5saW5lLWJsb2NrO1xuICAgICAgY29udGVudDogJyc7XG4gICAgICBwb3NpdGlvbjogcmVsYXRpdmU7XG4gICAgICB6LWluZGV4OiAtMTtcbiAgICAgIGhlaWdodDogMnB4O1xuICAgICAgYmFja2dyb3VuZC1jb2xvcjogI2E2YjViZDtcbiAgICAgIGZsZXg6IDE7XG4gICAgICB3aWR0aDogMTAwJTtcbiAgICAgIG1hcmdpbi1yaWdodDogMC41cmVtO1xuICAgIH1cbiAgfVxuYFxuXG5leHBvcnQgY29uc3Qgc3RlcEJ1dHRvblN0eWxlcyA9ICh7IGFjdGl2ZSwgY29tcGxldGVkIH06IGFueSkgPT4gY3NzYFxuICBib3JkZXI6IG5vbmU7XG4gIG1hcmdpbjogMDtcbiAgcGFkZGluZzogMDtcbiAgY3Vyc29yOiBwb2ludGVyO1xuICBib3JkZXItcmFkaXVzOiA1MCU7XG4gIGJhY2tncm91bmQtY29sb3I6ICR7YWN0aXZlIHx8IGNvbXBsZXRlZCA/IHRoZW1lLmNvbG9ycy5zZWNvbmRhcnkubWFpbiA6ICcjYTZiNWJkJ307XG4gIGZvbnQtd2VpZ2h0OiAke2FjdGl2ZSB8fCBjb21wbGV0ZWQgPyAnYm9sZCcgOiAnJ307XG4gIG1pbi13aWR0aDogMS41ZW07XG4gIG1pbi1oZWlnaHQ6IDEuNWVtO1xuICBkaXNwbGF5OiBmbGV4O1xuICBqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcbiAgYWxpZ24taXRlbXM6IGNlbnRlcjtcbiAgY29sb3I6ICNmZmY7XG4gIDpob3ZlciB7XG4gICAgY29sb3I6ICNmZmY7XG4gIH1cbmBcbiJdfQ== */");
27
+ };
@@ -1,2 +1,2 @@
1
1
  export { default as Step } from './Step';
2
- export { default as Stepper, useStepperContext } from './Stepper';
2
+ export { default as Stepper } from './Stepper';
package/stepper/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  export { default as Step } from './Step';
2
- export { default as Stepper, useStepperContext } from './Stepper';
2
+ export { default as Stepper } from './Stepper';
@@ -1,97 +0,0 @@
1
- import React, { ReactNode } from 'react';
2
- import { CollapseProps } from '@kunukn/react-collapse';
3
- export declare type AccordionHeaderProps = {
4
- /**
5
- * Add heading to the Accordion.
6
- */
7
- heading?: string;
8
- /**
9
- * Add secondary heading to the Accordion.
10
- */
11
- secondaryHeading?: ReactNode;
12
- /**
13
- * Specify the duration of the transition between open and closed.
14
- */
15
- transitionDuration?: string;
16
- /**
17
- * If set to `true` the Accordion is open.
18
- */
19
- isOpen?: boolean;
20
- /**
21
- * Disable the Accordion.
22
- */
23
- disabled?: boolean;
24
- /**
25
- * Use the Accordion without animation.
26
- */
27
- noAnimation?: boolean;
28
- /**
29
- * Hide the secondary heading when the Accordion is opened.
30
- */
31
- noSecondaryHeadingWhenOpen?: boolean;
32
- /**
33
- * Callback when toggling the accordion
34
- */
35
- onToggle?: () => void;
36
- };
37
- export declare const AccordionHeader: React.FunctionComponent<AccordionHeaderProps>;
38
- export declare type AccordionProps = {
39
- /**
40
- * Add heading to the Accordion.
41
- */
42
- heading?: string;
43
- /**
44
- * Add a custom header to the Accordion.
45
- */
46
- header?: ReactNode;
47
- /**
48
- * Add secondary heading to the Accordion.
49
- */
50
- secondaryHeading?: ReactNode;
51
- /**
52
- * Specify the duration of the transition between open and closed.
53
- */
54
- transitionDuration?: string;
55
- /**
56
- * If set to `true` the Accordion is open.
57
- */
58
- isOpen?: boolean;
59
- /**
60
- * Disable the Accordion.
61
- */
62
- disabled?: boolean;
63
- /**
64
- * Callback when toggling the accordion
65
- */
66
- onToggle?: () => void;
67
- /**
68
- * Props passed on to the Collapse component
69
- */
70
- collapseProps?: CollapseProps;
71
- /**
72
- * Use the Accordion without animation.
73
- */
74
- noAnimation?: boolean;
75
- /**
76
- * The compressed variant removes the `margin-bottom` of the Accordion.
77
- */
78
- variant?: 'default' | 'compressed';
79
- /**
80
- * Specify the content padding of the Accordion.
81
- */
82
- type?: 'small' | 'medium';
83
- /**
84
- * Add a className to the Accordion.
85
- */
86
- className?: string;
87
- /**
88
- * Hide the secondary heading when the Accordion is opened.
89
- */
90
- noSecondaryHeadingWhenOpen?: boolean;
91
- /**
92
- * Hide the Divider (the grey line under the header)
93
- */
94
- hideDivider?: boolean;
95
- };
96
- export declare const Accordion: React.FunctionComponent<AccordionProps>;
97
- export default Accordion;
@@ -1,13 +0,0 @@
1
- import React from 'react';
2
- export declare type AccordionContentProps = {
3
- /**
4
- * The compressed variant removes the `margin-bottom` of the Accordion.
5
- */
6
- variant?: 'default' | 'compressed';
7
- /**
8
- * Specify the content padding of the Accordion.
9
- */
10
- type?: 'small' | 'medium';
11
- };
12
- export declare const AccordionContent: React.FunctionComponent<AccordionContentProps>;
13
- export default AccordionContent;
@@ -1,55 +0,0 @@
1
- import React from 'react';
2
- export declare type AccordionSmallHeaderProps = {
3
- /**
4
- * Add a heading to the Accordion.
5
- */
6
- heading: string;
7
- /**
8
- * Add a secondary heading to the Accordion.
9
- */
10
- secondaryHeading?: string;
11
- /**
12
- * Specify the duration of the transition between open and closed.
13
- */
14
- transitionDuration?: string;
15
- /**
16
- * If set to `true` the Accordion is open.
17
- */
18
- isOpen?: boolean;
19
- /**
20
- * Disable the Accordion.
21
- */
22
- disabled?: boolean;
23
- /**
24
- * Use the Accordion without animation.
25
- */
26
- noAnimation?: boolean;
27
- onToggle?: () => void;
28
- };
29
- export declare const AccordionSmallHeader: React.FunctionComponent<AccordionSmallHeaderProps>;
30
- export declare type AccordionSmallProps = {
31
- /**
32
- * Add a heading to the Accordion.
33
- */
34
- heading: string;
35
- /**
36
- * Specify the duration of the transition between open and closed.
37
- */
38
- transitionDuration?: string;
39
- /**
40
- * If set to `true` the Accordion is open.
41
- */
42
- isOpen?: boolean;
43
- /**
44
- * Disable the Accordion.
45
- */
46
- disabled?: boolean;
47
- /**
48
- * Use the Accordion without animation.
49
- */
50
- noAnimation?: boolean;
51
- onToggle?: () => void;
52
- collapseProps?: object;
53
- };
54
- export declare const AccordionSmall: React.FunctionComponent<AccordionSmallProps>;
55
- export default AccordionSmall;
@@ -1,3 +0,0 @@
1
- export * from './Accordion';
2
- export * from './AccordionSmall';
3
- export * from './AccordionContent';
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- declare type Breakpoint = 's' | 'm' | 'l';
3
- declare const AppBar: React.FC<{
4
- leftActions?: React.ReactNode;
5
- actions?: React.ReactNode;
6
- className?: string;
7
- logoProps?: any;
8
- menuBreakpoint?: Breakpoint;
9
- hasMenuButton?: boolean;
10
- handleMenuButtonClick?: () => void;
11
- }>;
12
- export default AppBar;
@@ -1,10 +0,0 @@
1
- import * as React from 'react';
2
- declare type AppBarState = {
3
- drawerOpen: boolean;
4
- setDrawerOpen: React.Dispatch<React.SetStateAction<boolean>>;
5
- height: number;
6
- setHeight: React.Dispatch<React.SetStateAction<number>>;
7
- };
8
- export declare const AppBarProvider: React.FC;
9
- export declare const useAppBarContext: () => AppBarState;
10
- export {};
@@ -1,3 +0,0 @@
1
- import * as React from 'react';
2
- declare const AppBarDrawer: React.FC;
3
- export default AppBarDrawer;
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- declare type AppBarIconButtonProps = {
3
- isActive?: boolean;
4
- ariaLabel: string;
5
- icon: React.ElementType;
6
- showTooltip?: boolean;
7
- onClick?: (event: React.MouseEvent) => void;
8
- };
9
- declare const AppBarIconButton: React.FC<AppBarIconButtonProps>;
10
- export default AppBarIconButton;
@@ -1,21 +0,0 @@
1
- import React from 'react';
2
- export declare type AppBarItemProps = {
3
- id: string;
4
- Icon?: React.ElementType;
5
- LeadingIcon?: React.ElementType;
6
- TrailingIcon?: React.ElementType;
7
- title: string;
8
- divider?: 'start' | 'end' | 'both';
9
- children?: React.ReactNode;
10
- as?: React.ElementType;
11
- onClick?: () => void;
12
- placement?: 'bottom-start' | 'bottom-end';
13
- isActive?: boolean;
14
- };
15
- export declare const MenuPopOverContext: React.Context<{
16
- handlePopoverClose: () => void;
17
- } | undefined>;
18
- export declare const AppBarPopper: import("@emotion/styled").StyledComponent<import("@material-ui/core/Popper").PopperProps & {
19
- theme?: import("@emotion/react").Theme | undefined;
20
- }, {}, {}>;
21
- export declare const AppBarItem: React.FC<AppBarItemProps & JSX.IntrinsicElements['a']>;
@@ -1,15 +0,0 @@
1
- declare const AppBarListItem: import("@emotion/styled").StyledComponent<{
2
- multiline?: boolean | undefined;
3
- selected?: boolean | undefined;
4
- condensed?: boolean | undefined;
5
- tabIndex?: number | undefined;
6
- clickable?: boolean | undefined;
7
- divider?: boolean | undefined;
8
- onClick?: (() => void) | undefined;
9
- flexBoxProps?: import("../flexbox").FlexBoxProps | undefined;
10
- className?: string | undefined;
11
- children?: import("react").ReactNode;
12
- } & import("..").PolymorphicComponentProps & {
13
- theme?: import("@emotion/react").Theme | undefined;
14
- }, {}, {}>;
15
- export default AppBarListItem;
@@ -1,7 +0,0 @@
1
- import { useAppBarContext, AppBarProvider } from './AppBarContext';
2
- import { AppBarItem, MenuPopOverContext } from './AppBarItem';
3
- export { default as AppBarDrawer } from './AppBarDrawer';
4
- export { default as AppBar } from './AppBar';
5
- export { default as AppBarIconButton } from './AppBarIconButton';
6
- export { default as AppBarListItem } from './AppBarListItem';
7
- export { useAppBarContext, AppBarProvider, AppBarItem, MenuPopOverContext };
@@ -1,52 +0,0 @@
1
- import React from 'react';
2
- import { Intent } from '../../common/intent';
3
- export declare type BannerProps = {
4
- /**
5
- * Specifies the intent of the Banner (change the color of the banner icon to match intended status)
6
- */
7
- intent?: Intent;
8
- /**
9
- * Actions to be displayed inside the banner
10
- */
11
- actions?: React.ReactNode;
12
- /**
13
- * Class name to be added to the banner
14
- */
15
- className?: string;
16
- /**
17
- * Add a close icon in the top-right corner which will invoke the provided callback
18
- */
19
- onRequestClose?: () => void;
20
- /**
21
- * Specifies the ariaLabel to be added to the close(x) button
22
- */
23
- closeLabel?: string;
24
- /**
25
- * Specifies the variation of the banner.
26
- */
27
- variant?: 'default' | 'inverted';
28
- /**
29
- * Specifies if the Banner should be displayed with `position: fixed;`
30
- *
31
- * When the value is `undefined` the Banner default to being sticky if `variant` is set to `inverted`
32
- */
33
- sticky?: boolean;
34
- /**
35
- * Specifies the position of the Sticky Banner.
36
- */
37
- stickyPosition?: 'top' | 'bottom';
38
- /**
39
- * Specifies if the Banner should have a border/divider at the bottom`
40
- */
41
- divider?: boolean;
42
- /**
43
- * Specify a custom icon to replace the one derived from `intent`
44
- *
45
- * @type {React.ElementType<{ className?: string }>}
46
- */
47
- icon?: React.ElementType<{
48
- className?: string;
49
- }>;
50
- };
51
- declare const Banner: React.FunctionComponent<BannerProps>;
52
- export default Banner;
@@ -1,18 +0,0 @@
1
- import React from 'react';
2
- import { Intent } from '../../common/intent';
3
- export declare type BannerActionVariation = 'primary' | 'secondary';
4
- export interface BannerActionProps {
5
- variation?: BannerActionVariation;
6
- variant?: 'default' | 'inverted';
7
- intent?: Intent;
8
- onClick?: () => void;
9
- /**
10
- * className to be assigned to the button
11
- */
12
- className?: string;
13
- /**
14
- * HTML tag or custom component being rendered
15
- */
16
- as?: React.ElementType;
17
- }
18
- export declare const BannerAction: React.FunctionComponent<BannerActionProps>;
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- import { Intent } from '../../common/intent';
3
- declare type BannerActionContextProps = {
4
- variant: 'default' | 'inverted';
5
- intent: Intent;
6
- };
7
- export declare const BannerActionContext: React.Context<BannerActionContextProps>;
8
- export declare const BannerActionContextProvider: React.FC<{
9
- value: BannerActionContextProps;
10
- }>;
11
- declare const useBannerActionContext: () => BannerActionContextProps;
12
- export default useBannerActionContext;
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- export declare const BannerHeadline: React.FunctionComponent<{
3
- className?: string;
4
- }>;
5
- export declare const BannerParagraph: React.FunctionComponent<{
6
- className?: string;
7
- }>;
@@ -1,4 +0,0 @@
1
- export * from './BannerAction';
2
- export * from './BannerTypography';
3
- export * from './Banner';
4
- export { default as Banner } from './Banner';
@@ -1,2 +0,0 @@
1
- export * from './banner';
2
- export * from './toast';
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- import { Intent } from '../../common/intent';
3
- export declare type ToastProps = {
4
- intent?: Intent;
5
- className?: string;
6
- onRequestClose?: () => void;
7
- loading?: boolean;
8
- onRequestAction?: () => void;
9
- };
10
- declare const Toast: React.FunctionComponent<ToastProps>;
11
- export default Toast;
@@ -1,18 +0,0 @@
1
- import { PropsWithChildren, FunctionComponent } from 'react';
2
- import { ToastProps } from './Toast';
3
- declare type TimeoutType = {
4
- timeout?: number;
5
- };
6
- declare type ToasterState = {
7
- open: boolean;
8
- hasActive: boolean;
9
- toastProps: ToastProps | null;
10
- } & TimeoutType;
11
- export declare const useToaster: () => {
12
- addToast: (props: PropsWithChildren<ToastProps & TimeoutType>) => void;
13
- state: ToasterState;
14
- };
15
- declare const Toaster: FunctionComponent<{
16
- globalTimeout?: number;
17
- }>;
18
- export default Toaster;
@@ -1,2 +0,0 @@
1
- export { default as Toast } from './Toast';
2
- export { default as Toaster, useToaster } from './Toaster';