@dfds-ui/react-components 3.0.2-alpha.44219a9f → 3.0.2-alpha.812bc5fd

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 (325) hide show
  1. package/accordion/Accordion.js +1 -1
  2. package/accordion/AccordionContent.js +1 -1
  3. package/accordion/AccordionSmall.js +1 -1
  4. package/app-bar/AppBar.js +1 -1
  5. package/app-bar/AppBarDrawer.js +1 -1
  6. package/app-bar/AppBarIconButton.js +1 -1
  7. package/app-bar/AppBarItem.js +1 -1
  8. package/assertions/banner/Banner.js +1 -1
  9. package/assertions/banner/BannerAction.js +1 -1
  10. package/assertions/banner/BannerTypography.js +1 -1
  11. package/assertions/toast/Toast.js +1 -1
  12. package/assertions/toast/Toaster.js +1 -1
  13. package/badge/Badge.js +1 -1
  14. package/button/Button.js +1 -1
  15. package/button/IconButton.js +1 -1
  16. package/button/LinkButton.js +1 -1
  17. package/button-stack/ButtonStack.js +1 -1
  18. package/card/Card.js +1 -1
  19. package/card/CardActions.js +1 -1
  20. package/card/CardContent.js +1 -1
  21. package/card/CardMedia.js +1 -1
  22. package/card/CardPriceTag.js +1 -1
  23. package/card/CardTitle.js +1 -1
  24. package/chip/Chip.js +1 -1
  25. package/cjs/accordion/Accordion.d.ts +101 -0
  26. package/cjs/accordion/AccordionContent.d.ts +14 -0
  27. package/cjs/accordion/AccordionSmall.d.ts +56 -0
  28. package/cjs/accordion/index.d.ts +3 -0
  29. package/cjs/app-bar/AppBar.d.ts +13 -0
  30. package/cjs/app-bar/AppBar.js +2 -1
  31. package/cjs/app-bar/AppBarContext.d.ts +12 -0
  32. package/cjs/app-bar/AppBarContext.js +2 -1
  33. package/cjs/app-bar/AppBarDrawer.d.ts +5 -0
  34. package/cjs/app-bar/AppBarDrawer.js +2 -1
  35. package/cjs/app-bar/AppBarIconButton.d.ts +10 -0
  36. package/cjs/app-bar/AppBarItem.d.ts +23 -0
  37. package/cjs/app-bar/AppBarListItem.d.ts +15 -0
  38. package/cjs/app-bar/index.d.ts +7 -0
  39. package/cjs/assertions/banner/Banner.d.ts +74 -0
  40. package/cjs/assertions/banner/Banner.js +2 -1
  41. package/cjs/assertions/banner/BannerAction.d.ts +19 -0
  42. package/cjs/assertions/banner/BannerTypography.d.ts +9 -0
  43. package/cjs/assertions/banner/index.d.ts +3 -0
  44. package/cjs/assertions/index.d.ts +2 -0
  45. package/cjs/assertions/toast/Toast.d.ts +13 -0
  46. package/cjs/assertions/toast/Toaster.d.ts +19 -0
  47. package/cjs/assertions/toast/Toaster.js +2 -1
  48. package/cjs/assertions/toast/index.d.ts +2 -0
  49. package/cjs/assertions/toast/index.js +2 -1
  50. package/cjs/badge/Badge.d.ts +26 -0
  51. package/cjs/badge/index.d.ts +2 -0
  52. package/cjs/badge/index.js +2 -1
  53. package/cjs/button/BadgeIcon.d.ts +7 -0
  54. package/cjs/button/BaseButton.d.ts +14 -0
  55. package/cjs/button/Button.d.ts +19 -0
  56. package/cjs/button/IconButton.d.ts +75 -0
  57. package/cjs/button/LinkButton.d.ts +8 -0
  58. package/cjs/button/LinkButton.js +2 -1
  59. package/cjs/button/button-style.d.ts +7 -0
  60. package/cjs/button/index.d.ts +7 -0
  61. package/cjs/button/index.js +2 -1
  62. package/cjs/button-stack/ButtonStack.d.ts +12 -0
  63. package/cjs/button-stack/index.d.ts +1 -0
  64. package/cjs/card/Card.d.ts +19 -0
  65. package/cjs/card/Card.js +2 -1
  66. package/cjs/card/CardActions.d.ts +4 -0
  67. package/cjs/card/CardContent.d.ts +14 -0
  68. package/cjs/card/CardMedia.d.ts +19 -0
  69. package/cjs/card/CardPriceTag.d.ts +25 -0
  70. package/cjs/card/CardTitle.d.ts +19 -0
  71. package/cjs/card/index.d.ts +6 -0
  72. package/cjs/chip/Chip.d.ts +19 -0
  73. package/cjs/chip/Chip.js +2 -1
  74. package/cjs/chip/index.d.ts +2 -0
  75. package/cjs/chip/index.js +2 -1
  76. package/cjs/common/LockBodyScroll.d.ts +26 -0
  77. package/cjs/common/arrow.d.ts +6 -0
  78. package/cjs/common/emotionCloneElement.d.ts +2 -0
  79. package/cjs/common/intent.d.ts +3 -0
  80. package/cjs/common/miniMoize.d.ts +1 -0
  81. package/cjs/common/polymorphic.d.ts +25 -0
  82. package/cjs/common/use-media.d.ts +1 -0
  83. package/cjs/common/useOnClickOutside.d.ts +3 -0
  84. package/cjs/common/utils.d.ts +3 -0
  85. package/cjs/counter/Counter.d.ts +27 -0
  86. package/cjs/counter/Counter.js +2 -1
  87. package/cjs/counter/PluralCounter.d.ts +14 -0
  88. package/cjs/counter/PluralCounter.js +2 -1
  89. package/cjs/counter/index.d.ts +2 -0
  90. package/cjs/data-table/DataTable.d.ts +11 -0
  91. package/cjs/data-table/DataTable.js +2 -1
  92. package/cjs/data-table/index.d.ts +1 -0
  93. package/cjs/divider/Divider.d.ts +26 -0
  94. package/cjs/divider/index.d.ts +1 -0
  95. package/cjs/drawer/Drawer.d.ts +32 -0
  96. package/cjs/drawer/index.d.ts +1 -0
  97. package/cjs/dropdown-menu/Dropdown.d.ts +46 -0
  98. package/cjs/dropdown-menu/DropdownContext.d.ts +13 -0
  99. package/cjs/dropdown-menu/DropdownContext.js +2 -1
  100. package/cjs/dropdown-menu/MenuCheckbox.d.ts +34 -0
  101. package/cjs/dropdown-menu/MenuItem.d.ts +45 -0
  102. package/cjs/dropdown-menu/MenuTitle.d.ts +14 -0
  103. package/cjs/dropdown-menu/index.d.ts +5 -0
  104. package/cjs/dropdown-menu/index.js +2 -1
  105. package/cjs/elevation/index.d.ts +3 -0
  106. package/cjs/flexbox/FlexBox.d.ts +100 -0
  107. package/cjs/flexbox/index.d.ts +1 -0
  108. package/cjs/footer/Footer.d.ts +7 -0
  109. package/cjs/footer/index.d.ts +1 -0
  110. package/cjs/forms/assistive-text/AssistiveText.d.ts +7 -0
  111. package/cjs/forms/asterisk/Asterisk.d.ts +3 -0
  112. package/cjs/forms/checkbox/Checkbox.d.ts +39 -0
  113. package/cjs/forms/checkbox/ExampleControlComponent.d.ts +11 -0
  114. package/cjs/forms/checkbox/index.d.ts +1 -0
  115. package/cjs/forms/email-field/EmailField.d.ts +22 -0
  116. package/cjs/forms/error-text/ErrorText.d.ts +7 -0
  117. package/cjs/forms/field/Field.d.ts +11 -0
  118. package/cjs/forms/index.d.ts +21 -0
  119. package/cjs/forms/input/Input.d.ts +19 -0
  120. package/cjs/forms/input/InputComposition.d.ts +43 -0
  121. package/cjs/forms/label/Label.d.ts +11 -0
  122. package/cjs/forms/number-field/NumberField.d.ts +22 -0
  123. package/cjs/forms/password-field/PasswordField.d.ts +4 -0
  124. package/cjs/forms/password-field/PasswordField.js +2 -1
  125. package/cjs/forms/radio/Radio.d.ts +35 -0
  126. package/cjs/forms/reactselect/ReactSelect.d.ts +25 -0
  127. package/cjs/forms/reactselect/ReactSelect.js +2 -1
  128. package/cjs/forms/searchable-select/AsyncSearchableSelect.d.ts +6 -0
  129. package/cjs/forms/select/Select.d.ts +16 -0
  130. package/cjs/forms/select-field/SelectField.d.ts +25 -0
  131. package/cjs/forms/switch/Switch.d.ts +13 -0
  132. package/cjs/forms/tel-field/TelField.d.ts +22 -0
  133. package/cjs/forms/text-field/TextField.d.ts +43 -0
  134. package/cjs/global-styles/GlobalStyles.d.ts +3 -0
  135. package/cjs/global-styles/ResetStyles.d.ts +9 -0
  136. package/cjs/global-styles/sanitize.d.ts +1 -0
  137. package/cjs/grid/Column.d.ts +10 -0
  138. package/cjs/grid/Container.d.ts +15 -0
  139. package/cjs/grid/index.d.ts +2 -0
  140. package/cjs/hero/Hero.d.ts +10 -0
  141. package/cjs/hero/index.d.ts +1 -0
  142. package/cjs/hero/stripes.d.ts +6 -0
  143. package/cjs/ie-banner/IEBanner.d.ts +12 -0
  144. package/cjs/ie-banner/IEBanner.js +2 -1
  145. package/cjs/ie-banner/index.d.ts +1 -0
  146. package/cjs/index.d.ts +43 -0
  147. package/cjs/layout/LayoutLegacy.d.ts +2 -0
  148. package/cjs/lists/FeatureList.d.ts +22 -0
  149. package/cjs/lists/ListAddon.d.ts +11 -0
  150. package/cjs/lists/ListDivider.d.ts +5 -0
  151. package/cjs/lists/ListIcon.d.ts +18 -0
  152. package/cjs/lists/ListItem.d.ts +46 -0
  153. package/cjs/lists/ListText.d.ts +39 -0
  154. package/cjs/lists/ListTextGroup.d.ts +15 -0
  155. package/cjs/lists/ListTitle.d.ts +4 -0
  156. package/cjs/lists/index.d.ts +8 -0
  157. package/cjs/loader/DfdsLoader.d.ts +9 -0
  158. package/cjs/loader/Loader.d.ts +6 -0
  159. package/cjs/loader/index.d.ts +2 -0
  160. package/cjs/localization/LocaleFlag.d.ts +13 -0
  161. package/cjs/localization/LocaleFlag.js +2 -1
  162. package/cjs/localization/index.d.ts +2 -0
  163. package/cjs/localization/locales.d.ts +35 -0
  164. package/cjs/logo/Logo.d.ts +11 -0
  165. package/cjs/logo/Logo.js +2 -1
  166. package/cjs/logo/index.d.ts +1 -0
  167. package/cjs/media/index.d.ts +2 -0
  168. package/cjs/menu/Menu.d.ts +7 -0
  169. package/cjs/menu/index.d.ts +2 -0
  170. package/cjs/menu/index.js +2 -1
  171. package/cjs/mobile-stepper/MobileStepper.d.ts +25 -0
  172. package/cjs/mobile-stepper/index.d.ts +1 -0
  173. package/cjs/nav-bar/NavBar.d.ts +37 -0
  174. package/cjs/nav-bar/NavBar.js +2 -1
  175. package/cjs/nav-bar/index.d.ts +2 -0
  176. package/cjs/nav-bar/index.js +2 -1
  177. package/cjs/nav-menu/NavMenuItem.d.ts +10 -0
  178. package/cjs/nav-menu/index.d.ts +1 -0
  179. package/cjs/pagination/Pagination.d.ts +44 -0
  180. package/cjs/pagination/Pagination.styles.d.ts +6 -0
  181. package/cjs/pagination/index.d.ts +1 -0
  182. package/cjs/popper/Popper.d.ts +29 -0
  183. package/cjs/popper/index.d.ts +1 -0
  184. package/cjs/progress-bar/ProgressBar.d.ts +8 -0
  185. package/cjs/progress-bar/index.d.ts +2 -0
  186. package/cjs/progress-bar/index.js +2 -1
  187. package/cjs/schedule/ScheduleItem.d.ts +19 -0
  188. package/cjs/schedule/ScheduleList.d.ts +11 -0
  189. package/cjs/schedule/index.d.ts +2 -0
  190. package/cjs/side-sheet/SideSheet.d.ts +57 -0
  191. package/cjs/side-sheet/SideSheet.js +2 -1
  192. package/cjs/side-sheet/SideSheetCloseButton.d.ts +13 -0
  193. package/cjs/side-sheet/SideSheetContent.d.ts +7 -0
  194. package/cjs/side-sheet/SideSheetContent.js +2 -1
  195. package/cjs/side-sheet/SideSheetFooter.d.ts +7 -0
  196. package/cjs/side-sheet/SideSheetFooter.js +2 -1
  197. package/cjs/side-sheet/SideSheetHeader.d.ts +9 -0
  198. package/cjs/side-sheet/SideSheetHeader.js +2 -1
  199. package/cjs/side-sheet/SideSheetHeadline.d.ts +7 -0
  200. package/cjs/side-sheet/index.d.ts +4 -0
  201. package/cjs/side-sheet/index.js +2 -1
  202. package/cjs/site-layout/SiteLayout.d.ts +40 -0
  203. package/cjs/site-layout/index.d.ts +2 -0
  204. package/cjs/site-layout/index.js +2 -1
  205. package/cjs/skeleton/Skeleton.d.ts +8 -0
  206. package/cjs/skeleton/index.d.ts +1 -0
  207. package/cjs/social-media-link-list/SocialMediaLinkList.d.ts +24 -0
  208. package/cjs/social-media-link-list/index.d.ts +1 -0
  209. package/cjs/spinner/Spinner.d.ts +58 -0
  210. package/cjs/spinner/index.d.ts +1 -0
  211. package/cjs/step/Step.d.ts +45 -0
  212. package/cjs/step/Step.js +2 -1
  213. package/cjs/step/Step.styles.d.ts +4 -0
  214. package/cjs/step/StepButton.d.ts +4 -0
  215. package/cjs/step/StepContent.d.ts +6 -0
  216. package/cjs/step/StepContext.d.ts +12 -0
  217. package/cjs/step/StepLabel.d.ts +7 -0
  218. package/cjs/step/index.d.ts +1 -0
  219. package/cjs/stepper/Stepper.d.ts +25 -0
  220. package/cjs/stepper/Stepper.js +2 -1
  221. package/cjs/stepper/StepperContext.d.ts +9 -0
  222. package/cjs/stepper/index.d.ts +1 -0
  223. package/cjs/stepper-feedback-message/StepperFeedbackMessage.d.ts +5 -0
  224. package/cjs/stepper-feedback-message/index.d.ts +1 -0
  225. package/cjs/styles/index.d.ts +3 -0
  226. package/cjs/styles/index.js +2 -1
  227. package/cjs/styles/media.d.ts +21 -0
  228. package/cjs/styles/rem.d.ts +1 -0
  229. package/cjs/styles/style-helpers.d.ts +1 -0
  230. package/cjs/styles/theme.d.ts +39 -0
  231. package/cjs/surface/Surface.d.ts +33 -0
  232. package/cjs/surface/Surface.js +2 -1
  233. package/cjs/surface/index.d.ts +1 -0
  234. package/cjs/tab/Tab.d.ts +12 -0
  235. package/cjs/tab/TabPanel.d.ts +7 -0
  236. package/cjs/tab/Tabs.d.ts +11 -0
  237. package/cjs/tab/Tabs.js +2 -1
  238. package/cjs/tab/TabsContext.d.ts +16 -0
  239. package/cjs/tab/TabsContext.js +2 -1
  240. package/cjs/tab/index.d.ts +4 -0
  241. package/cjs/table/Table.d.ts +22 -0
  242. package/cjs/table/Table.js +2 -1
  243. package/cjs/table/TableBody.d.ts +9 -0
  244. package/cjs/table/TableDataCell.d.ts +14 -0
  245. package/cjs/table/TableHead.d.ts +14 -0
  246. package/cjs/table/TableHeaderCell.d.ts +15 -0
  247. package/cjs/table/TableRow.d.ts +17 -0
  248. package/cjs/table/index.d.ts +6 -0
  249. package/cjs/test/Test.d.ts +8 -0
  250. package/cjs/tooltip/Tooltip.d.ts +32 -0
  251. package/cjs/tooltip/Tooltip.js +2 -1
  252. package/cjs/tooltip/index.d.ts +2 -0
  253. package/cjs/tooltip/index.js +2 -1
  254. package/cjs/typography/Headlines.d.ts +71 -0
  255. package/cjs/typography/Text.d.ts +4 -0
  256. package/cjs/typography/index.d.ts +2 -0
  257. package/common/LockBodyScroll.js +1 -1
  258. package/common/emotionCloneElement.js +1 -1
  259. package/common/polymorphic.js +1 -1
  260. package/counter/PluralCounter.js +1 -1
  261. package/data-table/DataTable.js +1 -1
  262. package/divider/Divider.js +1 -1
  263. package/drawer/Drawer.js +1 -1
  264. package/dropdown-menu/Dropdown.js +1 -1
  265. package/dropdown-menu/MenuCheckbox.js +1 -1
  266. package/dropdown-menu/MenuItem.js +1 -1
  267. package/forms/checkbox/Checkbox.js +1 -1
  268. package/forms/checkbox/ExampleControlComponent.js +1 -1
  269. package/forms/email-field/EmailField.js +1 -1
  270. package/forms/input/Input.js +1 -1
  271. package/forms/input/InputComposition.js +1 -1
  272. package/forms/label/Label.js +1 -1
  273. package/forms/number-field/NumberField.js +1 -1
  274. package/forms/password-field/PasswordField.js +1 -1
  275. package/forms/radio/Radio.js +1 -1
  276. package/forms/reactselect/ReactSelect.js +1 -1
  277. package/forms/searchable-select/AsyncSearchableSelect.js +1 -1
  278. package/forms/select/Select.js +1 -1
  279. package/forms/select-field/SelectField.js +1 -1
  280. package/forms/switch/Switch.js +1 -1
  281. package/forms/tel-field/TelField.js +1 -1
  282. package/forms/text-field/TextField.js +1 -1
  283. package/grid/Column.js +1 -1
  284. package/grid/Container.js +1 -1
  285. package/hero/Hero.js +1 -1
  286. package/lists/FeatureList.js +1 -1
  287. package/lists/ListAddon.js +1 -1
  288. package/lists/ListDivider.js +1 -1
  289. package/lists/ListIcon.js +1 -1
  290. package/lists/ListItem.js +1 -1
  291. package/lists/ListText.js +1 -1
  292. package/lists/ListTextGroup.js +1 -1
  293. package/lists/ListTitle.js +1 -1
  294. package/localization/LocaleFlag.js +1 -1
  295. package/logo/Logo.js +1 -1
  296. package/menu/Menu.js +1 -1
  297. package/mobile-stepper/MobileStepper.js +1 -1
  298. package/nav-bar/NavBar.js +1 -1
  299. package/package.json +12 -12
  300. package/pagination/Pagination.js +1 -1
  301. package/popper/Popper.js +1 -1
  302. package/schedule/ScheduleList.js +1 -1
  303. package/side-sheet/SideSheet.js +1 -1
  304. package/side-sheet/SideSheetCloseButton.js +1 -1
  305. package/side-sheet/SideSheetContent.js +1 -1
  306. package/side-sheet/SideSheetFooter.js +1 -1
  307. package/side-sheet/SideSheetHeader.js +1 -1
  308. package/site-layout/SiteLayout.js +1 -1
  309. package/skeleton/Skeleton.js +1 -1
  310. package/social-media-link-list/SocialMediaLinkList.js +1 -1
  311. package/spinner/Spinner.js +1 -1
  312. package/step/Step.js +1 -1
  313. package/step/StepButton.js +1 -1
  314. package/stepper/Stepper.js +1 -1
  315. package/surface/Surface.js +1 -1
  316. package/tab/Tab.js +1 -1
  317. package/tab/Tabs.js +1 -1
  318. package/table/Table.js +1 -1
  319. package/table/TableBody.js +1 -1
  320. package/table/TableDataCell.js +1 -1
  321. package/table/TableHead.js +1 -1
  322. package/table/TableHeaderCell.js +1 -1
  323. package/table/TableRow.js +1 -1
  324. package/tooltip/Tooltip.js +1 -1
  325. package/typography/Headlines.js +1 -1
package/cjs/chip/index.js CHANGED
@@ -24,4 +24,5 @@ Object.keys(_Chip).forEach(function (key) {
24
24
  }
25
25
  });
26
26
  });
27
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
27
+ var cache;
28
+ function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var r, c, a = Object.defineProperty, n = { __proto__: null, default: e }; if (Object(e) !== e) return n; if (cache || "function" != typeof WeakMap || (cache = new WeakMap()), cache) { if (cache.has(e)) return cache.get(e); cache.set(e, n); } for (c in e) "default" !== c && {}.hasOwnProperty.call(e, c) && ((r = a && Object.getOwnPropertyDescriptor(e, c)) && (r.get || r.set) ? a(n, c, r) : n[c] = e[c]); return n; }
@@ -0,0 +1,26 @@
1
+ import React from 'react';
2
+ export type LockBodyScrollProps = {
3
+ /**
4
+ * If `true` scroll locking will be enabled
5
+ */
6
+ enabled?: boolean;
7
+ /**
8
+ * ClassName to be applied to the body element when scroll is locked
9
+ */
10
+ bodyClassNameApplied?: string;
11
+ /**
12
+ * ClassName to be applied to the html element when scroll is locked
13
+ */
14
+ htmlClassNameApplied?: string;
15
+ /**
16
+ * Preserve scroll position when locking.
17
+ */
18
+ preserveScrollPosition?: boolean;
19
+ children?: React.ReactNode;
20
+ ref?: React.Ref<LockBodyScrollResult>;
21
+ };
22
+ export type LockBodyScrollResult = {
23
+ getGap(): number;
24
+ };
25
+ export declare const LockBodyScroll: ({ enabled, children, ref, ...rest }: LockBodyScrollProps) => React.JSX.Element;
26
+ export default LockBodyScroll;
@@ -0,0 +1,6 @@
1
+ export type ArrowPosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
2
+ /**
3
+ * Create css for an arrow
4
+ * A <div> tag must surround {children} to work
5
+ */
6
+ export default function arrow(size: number, color: string, offset?: number, position?: ArrowPosition): import("@emotion/utils").SerializedStyles;
@@ -0,0 +1,2 @@
1
+ declare const emotionCloneElement: (element: any, config: any, ...children: any) => import("react").DetailedReactHTMLElement<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
2
+ export default emotionCloneElement;
@@ -0,0 +1,3 @@
1
+ export type Intent = 'info' | 'critical' | 'success' | 'warning' | 'none';
2
+ export declare function getIntentColor(intent?: Intent, muted?: boolean): string;
3
+ export declare function getIntentTextColor(intent: Intent): string;
@@ -0,0 +1 @@
1
+ export declare function miniMoize(fn: (...args: any[]) => any): (...args: any[]) => any;
@@ -0,0 +1,25 @@
1
+ import React, { ComponentType, ElementType } from 'react';
2
+ export type RenderContainerProps<T> = {
3
+ renderContainer: (props: T) => React.JSX.Element;
4
+ };
5
+ export type PolymorphicComponentProps = {
6
+ /**
7
+ * HTML tag or custom component being rendered.
8
+ */
9
+ as?: ElementType;
10
+ };
11
+ /**
12
+ * Given a PolymorphicComponent and a desired RenderComponent this function will returns are new component where the
13
+ * polymorphic prop will point to the provided `RenderComponent`.
14
+ *
15
+ * @example
16
+ * import { Link } from `gatsby`;
17
+ * import { AppBarItem, withRenderAs } from `@dfds-ui/react-components`;
18
+ *
19
+ * const AppBarLink = withRenderAs(AppBarItem, Link);
20
+ *
21
+ * const Example = () => {
22
+ * return <AppBarLink id="1" title="example" to="/example">Example</AppBarLink>;
23
+ * }
24
+ */
25
+ export declare function withRenderAs<PCProps extends PolymorphicComponentProps, RCProps>(PolymorphicComponent: ComponentType<PCProps>, RenderComponent: ComponentType<RCProps>): ({ ...props }: Omit<PCProps, keyof PolymorphicComponentProps> & RCProps) => React.JSX.Element;
@@ -0,0 +1 @@
1
+ export default function useMedia(queries: any, values: any, defaultValue: any): any;
@@ -0,0 +1,3 @@
1
+ type Handler = (...args: any[]) => void;
2
+ export default function useOnClickOutside(ref: React.RefObject<HTMLElement | null>, handler: Handler | null): void;
3
+ export {};
@@ -0,0 +1,3 @@
1
+ export declare function ie11MinHeightFix(minHeight?: string): import("@emotion/utils").SerializedStyles | undefined;
2
+ export declare function onlyIE(strings: TemplateStringsArray, ...args: any): import("@emotion/utils").SerializedStyles;
3
+ export declare function onlyChrome(strings: TemplateStringsArray, ...args: any): import("@emotion/utils").SerializedStyles;
@@ -0,0 +1,27 @@
1
+ import React, { ReactNode } from 'react';
2
+ export type CounterProps = {
3
+ label?: ReactNode | string;
4
+ /**
5
+ * Minimum value
6
+ */
7
+ minVal: number;
8
+ /**
9
+ * Maximum value
10
+ */
11
+ maxVal: number;
12
+ disableMin?: boolean;
13
+ disableMax?: boolean;
14
+ /**
15
+ *Name of the input element
16
+ */
17
+ name?: string;
18
+ currentVal?: number;
19
+ initialVal?: number;
20
+ /**
21
+ *Callback when the value changes
22
+ */
23
+ executeOnChange?: (arg: number) => any;
24
+ ref?: React.Ref<HTMLInputElement>;
25
+ };
26
+ export declare const Counter: (props: CounterProps) => React.JSX.Element;
27
+ export default Counter;
@@ -9,7 +9,8 @@ var _react = _interopRequireWildcard(require("react"));
9
9
  var _system = require("@dfds-ui/icons/system");
10
10
  var _react2 = require("@emotion/react");
11
11
  var _jsxRuntime = require("@emotion/react/jsx-runtime");
12
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
12
+ var cache;
13
+ function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var r, c, a = Object.defineProperty, n = { __proto__: null, default: e }; if (Object(e) !== e) return n; if (cache || "function" != typeof WeakMap || (cache = new WeakMap()), cache) { if (cache.has(e)) return cache.get(e); cache.set(e, n); } for (c in e) "default" !== c && {}.hasOwnProperty.call(e, c) && ((r = a && Object.getOwnPropertyDescriptor(e, c)) && (r.get || r.set) ? a(n, c, r) : n[c] = e[c]); return n; }
13
14
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
15
  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)."; }
15
16
  const StyledCounter = /*#__PURE__*/(0, _base.default)("div", process.env.NODE_ENV === "production" ? {
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ type PluralCounterProps = {
3
+ minVal: number;
4
+ maxVal: number;
5
+ currentVal?: number;
6
+ initialVal?: number;
7
+ singularLabel: string;
8
+ name?: string;
9
+ pluralLabel: string;
10
+ executeOnChange?: (arg: number) => any;
11
+ ref?: React.Ref<HTMLInputElement>;
12
+ };
13
+ declare const PluralCounter: ({ singularLabel, pluralLabel, executeOnChange, ...rest }: PluralCounterProps) => React.JSX.Element;
14
+ export default PluralCounter;
@@ -8,7 +8,8 @@ var _base = _interopRequireDefault(require("@emotion/styled/base"));
8
8
  var _react = _interopRequireWildcard(require("react"));
9
9
  var _Counter = _interopRequireDefault(require("./Counter"));
10
10
  var _jsxRuntime = require("@emotion/react/jsx-runtime");
11
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
11
+ var cache;
12
+ function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var r, c, a = Object.defineProperty, n = { __proto__: null, default: e }; if (Object(e) !== e) return n; if (cache || "function" != typeof WeakMap || (cache = new WeakMap()), cache) { if (cache.has(e)) return cache.get(e); cache.set(e, n); } for (c in e) "default" !== c && {}.hasOwnProperty.call(e, c) && ((r = a && Object.getOwnPropertyDescriptor(e, c)) && (r.get || r.set) ? a(n, c, r) : n[c] = e[c]); return n; }
12
13
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
14
  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)."; }
14
15
  //Insert plural with max value as hidden to ensure rows are aligned. Assumes plural is longer than singular.
@@ -0,0 +1,2 @@
1
+ export { default as Counter } from './Counter';
2
+ export { default as PluralCounter } from './PluralCounter';
@@ -0,0 +1,11 @@
1
+ import React, { FunctionComponent } from 'react';
2
+ export type DataTableProps = {
3
+ children?: React.ReactNode;
4
+ onChange?: (model: object[]) => object[];
5
+ columns?: string[];
6
+ data: object[];
7
+ className?: string;
8
+ hasHeader?: boolean;
9
+ };
10
+ export declare const DataTable: FunctionComponent<DataTableProps>;
11
+ export default DataTable;
@@ -9,7 +9,8 @@ var _react2 = require("@emotion/react");
9
9
  var _checkbox = require("../forms/checkbox");
10
10
  var _theme = require("@dfds-ui/theme");
11
11
  var _jsxRuntime = require("@emotion/react/jsx-runtime");
12
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
12
+ var cache;
13
+ function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var r, c, a = Object.defineProperty, n = { __proto__: null, default: e }; if (Object(e) !== e) return n; if (cache || "function" != typeof WeakMap || (cache = new WeakMap()), cache) { if (cache.has(e)) return cache.get(e); cache.set(e, n); } for (c in e) "default" !== c && {}.hasOwnProperty.call(e, c) && ((r = a && Object.getOwnPropertyDescriptor(e, c)) && (r.get || r.set) ? a(n, c, r) : n[c] = e[c]); return n; }
13
14
  const tableStyle = () => /*#__PURE__*/(0, _react2.css)("text-align:left;border-collapse:collapse;width:100%;border:none;color:", _theme.theme.colors.text.dark.primary, ";font-size:12px;tr{border-top:1px solid ", _theme.theme.colors.text.dark.disabled, ";border-bottom:1px solid ", _theme.theme.colors.text.dark.disabled, ";}th,td{padding:16px;label{color:", _theme.theme.colors.primary.main, ";font-weight:bold;}}" + (process.env.NODE_ENV === "production" ? "" : ";label:tableStyle;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9kYXRhLXRhYmxlL0RhdGFUYWJsZS50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBYzRCIiwiZmlsZSI6Ii4uLy4uLy4uL3NyYy9kYXRhLXRhYmxlL0RhdGFUYWJsZS50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgUmVhY3QsIHsgRnVuY3Rpb25Db21wb25lbnQsIHVzZVJlZHVjZXIgfSBmcm9tICdyZWFjdCdcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0J1xuaW1wb3J0IHsgQ2hlY2tib3ggfSBmcm9tICcuLi9mb3Jtcy9jaGVja2JveCdcbmltcG9ydCB7IHRoZW1lIH0gZnJvbSAnQGRmZHMtdWkvdGhlbWUnXG5cbmV4cG9ydCB0eXBlIERhdGFUYWJsZVByb3BzID0ge1xuICBjaGlsZHJlbj86IFJlYWN0LlJlYWN0Tm9kZVxuICBvbkNoYW5nZT86IChtb2RlbDogb2JqZWN0W10pID0+IG9iamVjdFtdXG4gIGNvbHVtbnM/OiBzdHJpbmdbXVxuICBkYXRhOiBvYmplY3RbXVxuICBjbGFzc05hbWU/OiBzdHJpbmdcbiAgaGFzSGVhZGVyPzogYm9vbGVhblxufVxuXG5jb25zdCB0YWJsZVN0eWxlID0gKCkgPT4gY3NzYFxuICB0ZXh0LWFsaWduOiBsZWZ0O1xuICBib3JkZXItY29sbGFwc2U6IGNvbGxhcHNlO1xuICB3aWR0aDogMTAwJTtcbiAgYm9yZGVyOiBub25lO1xuICBjb2xvcjogJHt0aGVtZS5jb2xvcnMudGV4dC5kYXJrLnByaW1hcnl9O1xuICBmb250LXNpemU6IDEycHg7XG4gIHRyIHtcbiAgICBib3JkZXItdG9wOiAxcHggc29saWQgJHt0aGVtZS5jb2xvcnMudGV4dC5kYXJrLmRpc2FibGVkfTtcbiAgICBib3JkZXItYm90dG9tOiAxcHggc29saWQgJHt0aGVtZS5jb2xvcnMudGV4dC5kYXJrLmRpc2FibGVkfTtcbiAgfVxuICB0aCxcbiAgdGQge1xuICAgIHBhZGRpbmc6IDE2cHg7XG4gICAgbGFiZWwge1xuICAgICAgY29sb3I6ICR7dGhlbWUuY29sb3JzLnByaW1hcnkubWFpbn07XG4gICAgICBmb250LXdlaWdodDogYm9sZDtcbiAgICB9XG4gIH1cbmBcblxuY29uc3QgVE9HR0xFID0gJ3RvZ2dsZSdcblxuZnVuY3Rpb24gcmVkdWNlcihtb2RlbDogYW55LCBhY3Rpb246IGFueSk6IG9iamVjdFtdIHtcbiAgY29uc3QgbmV3TW9kZWwgPSBbLi4ubW9kZWxdXG4gIHN3aXRjaCAoYWN0aW9uLnR5cGUpIHtcbiAgICBjYXNlIFRPR0dMRTpcbiAgICAgIG5ld01vZGVsW2FjdGlvbi5rZXldLmZpZWxkLnZhbHVlID0gIW5ld01vZGVsW2FjdGlvbi5rZXldLmZpZWxkLnZhbHVlXG4gICAgICByZXR1cm4gbmV3TW9kZWxcbiAgICBkZWZhdWx0OlxuICAgICAgcmV0dXJuIG5ld01vZGVsXG4gIH1cbn1cblxuLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIEB0eXBlc2NyaXB0LWVzbGludC9uby11bnVzZWQtdmFyc1xuZXhwb3J0IGNvbnN0IERhdGFUYWJsZTogRnVuY3Rpb25Db21wb25lbnQ8RGF0YVRhYmxlUHJvcHM+ID0gKHtcbiAgY2hpbGRyZW4sXG4gIG9uQ2hhbmdlLFxuICBjb2x1bW5zLFxuICBkYXRhLFxuICBoYXNIZWFkZXIsXG4gIC4uLnJlc3Rcbn0pID0+IHtcbiAgY29uc3QgW21vZGVsLCBkaXNwYXRjaF0gPSB1c2VSZWR1Y2VyKHJlZHVjZXIsIGRhdGEpXG4gIGNvbnN0IGRhdGFLZXlzID0gT2JqZWN0LmtleXMobW9kZWxbMF0pXG4gIGNvbnN0IGRpc3BsYXlDb2x1bW5zID0gY29sdW1ucyA/IGNvbHVtbnMgOiBkYXRhS2V5c1xuXG4gIFJlYWN0LnVzZUVmZmVjdCgoKSA9PiB7XG4gICAgaWYgKG9uQ2hhbmdlKSB7XG4gICAgICBvbkNoYW5nZShtb2RlbClcbiAgICB9XG4gICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIEBlc2xpbnQtcmVhY3QvZXhoYXVzdGl2ZS1kZXBzXG4gIH0sIFttb2RlbF0pXG5cbiAgcmV0dXJuIChcbiAgICA8dGFibGUgY3NzPXt0YWJsZVN0eWxlKCl9IHsuLi5yZXN0fT5cbiAgICAgIHtoYXNIZWFkZXIgJiYgKFxuICAgICAgICA8dGhlYWQ+XG4gICAgICAgICAgPHRyPlxuICAgICAgICAgICAge2Rpc3BsYXlDb2x1bW5zLm1hcCgoa2V5LCBpKSA9PiB7XG4gICAgICAgICAgICAgIHJldHVybiA8dGgga2V5PXtpfT4ge2tleX0gPC90aD5cbiAgICAgICAgICAgIH0pfVxuICAgICAgICAgIDwvdHI+XG4gICAgICAgIDwvdGhlYWQ+XG4gICAgICApfVxuICAgICAgPHRib2R5PlxuICAgICAgICB7ZGF0YS5tYXAoKHZhbHVlT2JqOiBhbnksIGkpID0+IHtcbiAgICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgPHRyIGtleT17aX0+XG4gICAgICAgICAgICAgIHtkYXRhS2V5cy5tYXAoKGtleTogYW55LCB5KSA9PiB7XG4gICAgICAgICAgICAgICAgaWYgKGtleSA9PT0gJ2ZpZWxkJykge1xuICAgICAgICAgICAgICAgICAgY29uc3QgeyBuYW1lLCB2YWx1ZSwgbGFiZWwgfSA9IHZhbHVlT2JqLmZpZWxkXG4gICAgICAgICAgICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgICAgICAgICA8dGQga2V5PXt5fT5cbiAgICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgICA8Q2hlY2tib3hcbiAgICAgICAgICAgICAgICAgICAgICAgICAgbmFtZT17bmFtZX1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgY2hlY2tlZD17dmFsdWV9XG4gICAgICAgICAgICAgICAgICAgICAgICAgIG9uQ2hhbmdlPXsoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGlzcGF0Y2goeyB0eXBlOiBUT0dHTEUsIGtleTogaSB9KVxuICAgICAgICAgICAgICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgICAgICAgICAgICB7bGFiZWx9XG4gICAgICAgICAgICAgICAgICAgICAgICA8L0NoZWNrYm94PlxuICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgPC90ZD5cbiAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIDx0ZCBrZXk9e3l9PiB7dmFsdWVPYmpba2V5XX0gPC90ZD5cbiAgICAgICAgICAgICAgfSl9XG4gICAgICAgICAgICA8L3RyPlxuICAgICAgICAgIClcbiAgICAgICAgfSl9XG4gICAgICA8L3Rib2R5PlxuICAgIDwvdGFibGU+XG4gIClcbn1cblxuZXhwb3J0IGRlZmF1bHQgRGF0YVRhYmxlXG4iXX0= */");
14
15
  const TOGGLE = 'toggle';
15
16
  function reducer(model, action) {
@@ -0,0 +1 @@
1
+ export * from './DataTable';
@@ -0,0 +1,26 @@
1
+ import React from 'react';
2
+ export type DividerProps = {
3
+ /**
4
+ * Display the Divider in "light" mode.
5
+ */
6
+ light?: boolean;
7
+ /**
8
+ * Display the Divider in "indent" style
9
+ */
10
+ indent?: boolean;
11
+ /**
12
+ * Display the Divider in "margin" style
13
+ */
14
+ margins?: boolean;
15
+ /**
16
+ * HTML tag or custom component being rendered
17
+ */
18
+ as?: React.ElementType;
19
+ /**
20
+ * Class name to be assigned to the component
21
+ */
22
+ className?: string;
23
+ };
24
+ export declare const dividerBorder: (light?: boolean, placement?: "top" | "bottom") => import("@emotion/utils").SerializedStyles;
25
+ export declare const Divider: ({ light, indent, margins, ...rest }: DividerProps) => React.JSX.Element;
26
+ export default Divider;
@@ -0,0 +1 @@
1
+ export * from './Divider';
@@ -0,0 +1,32 @@
1
+ import React from 'react';
2
+ import { theme } from '@dfds-ui/theme';
3
+ type HorizontalPosition = 'left' | 'right';
4
+ type VerticalPosition = 'top' | 'bottom';
5
+ type Elevation = keyof typeof theme.elevation;
6
+ export type DrawerProps = {
7
+ /**
8
+ * Horizontal position of the drawer
9
+ */
10
+ position?: HorizontalPosition;
11
+ /**
12
+ * Show arrow to visually indicate the relation to a connected component
13
+ */
14
+ showArrow?: boolean;
15
+ /**
16
+ * Set the `elevation` for the Drawer.
17
+ */
18
+ elevation?: Elevation;
19
+ /**
20
+ * Vertical position of the drawer in relation to a connected component.
21
+ * Will only be used for placing the arrow on either the `top` or `bottom`
22
+ */
23
+ verticalPosition?: VerticalPosition;
24
+ /**
25
+ * Class name to be assigned to the component
26
+ */
27
+ className?: string;
28
+ children?: React.ReactNode;
29
+ ref?: React.Ref<HTMLDivElement>;
30
+ };
31
+ export declare const Drawer: ({ className, children, position, verticalPosition, showArrow, elevation, ...rest }: DrawerProps) => React.JSX.Element;
32
+ export default Drawer;
@@ -0,0 +1 @@
1
+ export * from './Drawer';
@@ -0,0 +1,46 @@
1
+ import React, { ReactElement } from 'react';
2
+ import { PopperProps, PopperPlacementType } from '@mui/material';
3
+ export type DropdownSize = 'medium' | 'small';
4
+ export type DropdownProps = {
5
+ /**
6
+ * Placement for the `Dropdown`.
7
+ */
8
+ placement?: PopperPlacementType;
9
+ /**
10
+ * HTML element that the `Dropdown` will be anchor to.
11
+ */
12
+ anchorEl?: PopperProps['anchorEl'];
13
+ /**
14
+ * If set to `true`, the `Dropdown` is shown.
15
+ */
16
+ isOpen: boolean;
17
+ /**
18
+ * Set the state of the `Dropdown`.
19
+ */
20
+ setIsOpen: React.Dispatch<React.SetStateAction<boolean>>;
21
+ /**
22
+ * Specify the size of the `Dropdown`.
23
+ */
24
+ size?: DropdownSize;
25
+ /**
26
+ * Close the `Dropdown` on `esc` key.
27
+ */
28
+ shouldCloseOnEsc?: boolean;
29
+ /**
30
+ * className to be assigned to component.
31
+ */
32
+ className?: string;
33
+ /**
34
+ * Select multiple children from the `Dropdown`.
35
+ */
36
+ multiselect?: boolean;
37
+ /**
38
+ * Add an `id` to the `Dropdown`.
39
+ */
40
+ id?: string;
41
+ onClickAway?: () => void;
42
+ children: ReactElement<any>[];
43
+ filter?: boolean;
44
+ };
45
+ declare const DropdownMenu: ({ isOpen, multiselect, children, anchorEl, onClickAway, size, id, className, placement, setIsOpen, shouldCloseOnEsc, filter, ...rest }: DropdownProps) => React.JSX.Element;
46
+ export default DropdownMenu;
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ type DropdownSize = 'medium' | 'small';
3
+ type DropdownContextProps = {
4
+ size?: DropdownSize;
5
+ multiselect?: boolean;
6
+ };
7
+ export declare const DropdownContext: React.Context<DropdownContextProps>;
8
+ export declare const DropdownContextProvider: ({ children, value, }: {
9
+ value: DropdownContextProps;
10
+ children?: React.ReactNode;
11
+ }) => React.JSX.Element;
12
+ declare const useDropdownContext: () => DropdownContextProps;
13
+ export default useDropdownContext;
@@ -6,7 +6,8 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = exports.DropdownContextProvider = exports.DropdownContext = void 0;
7
7
  var _react = _interopRequireWildcard(require("react"));
8
8
  var _jsxRuntime = require("@emotion/react/jsx-runtime");
9
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
9
+ var cache;
10
+ function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var r, c, a = Object.defineProperty, n = { __proto__: null, default: e }; if (Object(e) !== e) return n; if (cache || "function" != typeof WeakMap || (cache = new WeakMap()), cache) { if (cache.has(e)) return cache.get(e); cache.set(e, n); } for (c in e) "default" !== c && {}.hasOwnProperty.call(e, c) && ((r = a && Object.getOwnPropertyDescriptor(e, c)) && (r.get || r.set) ? a(n, c, r) : n[c] = e[c]); return n; }
10
11
  const DropdownContext = exports.DropdownContext = /*#__PURE__*/(0, _react.createContext)({
11
12
  size: 'small',
12
13
  multiselect: true
@@ -0,0 +1,34 @@
1
+ import React from 'react';
2
+ export interface MenuCheckboxProps {
3
+ /**
4
+ * HTML tag or custom component being rendered.
5
+ */
6
+ as?: React.ElementType;
7
+ /**
8
+ * Override the default color for the text.
9
+ */
10
+ color?: string;
11
+ /**
12
+ * Indicates that the `MenuCheckbox` is disabled.
13
+ */
14
+ disabled?: boolean;
15
+ /**
16
+ * Invoke the provided callback when the `MenuCheckbox` is clicked.
17
+ */
18
+ onClick?: () => void;
19
+ /**
20
+ * Indicates that the `MenuCheckbox` is selected.
21
+ */
22
+ selected?: boolean;
23
+ /**
24
+ * Add interactive styles to the `MenuCheckbox`.
25
+ */
26
+ clickable?: boolean;
27
+ /**
28
+ * className to be assigned to component.
29
+ */
30
+ className?: string;
31
+ children?: React.ReactNode;
32
+ }
33
+ declare const MenuCheckbox: ({ color, children, disabled, as, onClick, selected, clickable, className, }: MenuCheckboxProps) => React.JSX.Element;
34
+ export default MenuCheckbox;
@@ -0,0 +1,45 @@
1
+ import React from 'react';
2
+ import { DropdownSize } from './Dropdown';
3
+ export interface MenuItemProps {
4
+ /**
5
+ * HTML tag or custom component being rendered.
6
+ */
7
+ as?: React.ElementType;
8
+ /**
9
+ * Invoke the provided callback when the `MenuItem` is clicked.
10
+ */
11
+ onClick?: (event?: any) => void;
12
+ /**
13
+ * Indicates that the `MenuItem` is selected.
14
+ */
15
+ selected?: boolean;
16
+ /**
17
+ * Indicates that the `MenuItem` is disabled.
18
+ */
19
+ disabled?: boolean;
20
+ /**
21
+ * Add interactive styles to the `MenuItem`.
22
+ */
23
+ clickable?: boolean;
24
+ /**
25
+ * Override the default color for the text.
26
+ */
27
+ color?: string;
28
+ /**
29
+ * Choose an icon that will be left aligned.
30
+ */
31
+ iconLeft?: React.ElementType;
32
+ /**
33
+ * Choose an icon that will be right aligned.
34
+ */
35
+ iconRight?: React.ElementType;
36
+ /**
37
+ * className to be assigned to component.
38
+ */
39
+ className?: string;
40
+ children?: React.ReactNode;
41
+ }
42
+ export declare const getListItemStyle: (size?: DropdownSize, disabled?: boolean) => import("@emotion/utils").SerializedStyles;
43
+ export declare const getListTextStyle: (size?: DropdownSize) => import("@emotion/utils").SerializedStyles;
44
+ declare const MenuItem: ({ as, clickable, className, onClick, selected, disabled, children, color, iconLeft, iconRight, ...rest }: MenuItemProps) => React.JSX.Element;
45
+ export default MenuItem;
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ export interface MenuTitleProps {
3
+ /**
4
+ * Change the color of the text.
5
+ */
6
+ color?: string;
7
+ /**
8
+ * className to be assigned to component.
9
+ */
10
+ className?: string;
11
+ children?: React.ReactNode;
12
+ }
13
+ declare const MenuTitle: ({ color, children, className }: MenuTitleProps) => React.JSX.Element;
14
+ export default MenuTitle;
@@ -0,0 +1,5 @@
1
+ export { default as Dropdown } from './Dropdown';
2
+ export * from './Dropdown';
3
+ export { default as MenuItem } from './MenuItem';
4
+ export { default as MenuTitle } from './MenuTitle';
5
+ export { default as MenuCheckbox } from './MenuCheckbox';
@@ -49,4 +49,5 @@ var _MenuItem = _interopRequireDefault(require("./MenuItem"));
49
49
  var _MenuTitle = _interopRequireDefault(require("./MenuTitle"));
50
50
  var _MenuCheckbox = _interopRequireDefault(require("./MenuCheckbox"));
51
51
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
52
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
52
+ var cache;
53
+ function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var r, c, a = Object.defineProperty, n = { __proto__: null, default: e }; if (Object(e) !== e) return n; if (cache || "function" != typeof WeakMap || (cache = new WeakMap()), cache) { if (cache.has(e)) return cache.get(e); cache.set(e, n); } for (c in e) "default" !== c && {}.hasOwnProperty.call(e, c) && ((r = a && Object.getOwnPropertyDescriptor(e, c)) && (r.get || r.set) ? a(n, c, r) : n[c] = e[c]); return n; }
@@ -0,0 +1,3 @@
1
+ type Level = 3 | 8 | 16;
2
+ declare const elevation: (level: Level) => import("@emotion/utils").SerializedStyles;
3
+ export default elevation;
@@ -0,0 +1,100 @@
1
+ type RenderAs = {
2
+ /**
3
+ * HTML tag or custom component being rendered
4
+ */
5
+ as?: React.ElementType;
6
+ };
7
+ export type FlexBoxProps = {
8
+ children?: React.ReactNode;
9
+ /**
10
+ * Set this prop to `true` to set `display` to `inline-flex` instead of `flex`
11
+ */
12
+ inline?: boolean;
13
+ /**
14
+ * Set this prop to `true` to set `flex-direction` to `row-reverse`
15
+ */
16
+ directionRowReverse?: boolean;
17
+ /**
18
+ * Set this prop to `true` to set `flex-direction` to `row`
19
+ */
20
+ directionRow?: boolean;
21
+ /**
22
+ * Set this prop to `true` to set `flex-direction` to `column`
23
+ */
24
+ directionColumn?: boolean;
25
+ /**
26
+ * Set this prop to `true` to set `flex-direction` to `column-reverse`
27
+ */
28
+ directionColumnReverse?: boolean;
29
+ /**
30
+ * Set this prop to `true` to set `flex-wrap` to `wrap`
31
+ */
32
+ wrapWrap?: boolean;
33
+ /**
34
+ * Set this prop to `true` to set `flex-wrap` to `wrap-reverse`
35
+ */
36
+ wrapWrapReverse?: boolean;
37
+ /**
38
+ * Set this prop to `true` to set `align-items` to `flex-start`
39
+ */
40
+ itemsFlexStart?: boolean;
41
+ /**
42
+ * Set this prop to `true` to set `align-items` to `flex-end`
43
+ */
44
+ itemsFlexEnd?: boolean;
45
+ /**
46
+ * Set this prop to `true` to set `align-items` to `flex-center`
47
+ */
48
+ itemsCenter?: boolean;
49
+ /**
50
+ * Set this prop to `true` to set `align-items` to `flex-baseline`
51
+ */
52
+ itemsBaseline?: boolean;
53
+ /**
54
+ * Set this prop to `true` to set `align-content` to `flex-start`
55
+ */
56
+ contentFlexStart?: boolean;
57
+ /**
58
+ * Set this prop to `true` to set `align-content` to `flex-end`
59
+ */
60
+ contentFlexEnd?: boolean;
61
+ /**
62
+ * Set this prop to `true` to set `align-content` to `center`
63
+ */
64
+ contentCenter?: boolean;
65
+ /**
66
+ * Set this prop to `true` to set `align-content` to `space-between`
67
+ */
68
+ contentSpaceBetween?: boolean;
69
+ /**
70
+ * Set this prop to `true` to set `align-content` to `space-around`
71
+ */
72
+ contentSpaceAround?: boolean;
73
+ /**
74
+ * Set this prop to `true` to set `justify-content` to `space-between`
75
+ */
76
+ justifySpaceBetween?: boolean;
77
+ /**
78
+ * Set this prop to `true` to set `justify-content` to `space-around`
79
+ */
80
+ justifySpaceAround?: boolean;
81
+ /**
82
+ * Set this prop to `true` to set `justify-content` to `flex-end`
83
+ */
84
+ justifyFlexEnd?: boolean;
85
+ /**
86
+ * Set this prop to `true` to set `justify-content` to `center`
87
+ */
88
+ justifyCenter?: boolean;
89
+ /**
90
+ * Set the `flex` shorthand property
91
+ */
92
+ flex?: number;
93
+ gap?: string;
94
+ };
95
+ export declare const FlexBox: import("@emotion/styled").StyledComponent<{
96
+ theme?: import("@emotion/react").Theme;
97
+ as?: React.ElementType;
98
+ } & FlexBoxProps & RenderAs, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
99
+ export declare function flexBoxStyles(props?: FlexBoxProps): import("@emotion/utils").SerializedStyles;
100
+ export default FlexBox;
@@ -0,0 +1 @@
1
+ export * from './FlexBox';
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ declare const Footer: ({ className, children, bottomChildren, }: {
3
+ className?: string;
4
+ bottomChildren?: React.ReactNode;
5
+ children?: React.ReactNode;
6
+ }) => React.JSX.Element;
7
+ export default Footer;
@@ -0,0 +1 @@
1
+ export { default as Footer } from './Footer';
@@ -0,0 +1,7 @@
1
+ declare const AssistiveText: import("@emotion/styled").StyledComponent<{
2
+ theme?: import("@emotion/react").Theme;
3
+ as?: React.ElementType;
4
+ } & {
5
+ inverted?: boolean;
6
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
7
+ export default AssistiveText;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const Asterisk: () => React.JSX.Element;
3
+ export default Asterisk;
@@ -0,0 +1,39 @@
1
+ import React from 'react';
2
+ declare const checkboxSizes: {
3
+ small: {
4
+ checkbox: string;
5
+ outline: string;
6
+ tick: string;
7
+ fontSize: string;
8
+ lineHeight: string;
9
+ paddingLeft: string;
10
+ };
11
+ medium: {
12
+ checkbox: string;
13
+ outline: string;
14
+ fontSize: string;
15
+ lineHeight: string;
16
+ tick: string;
17
+ paddingLeft: string;
18
+ };
19
+ };
20
+ type Size = keyof typeof checkboxSizes;
21
+ type BaseProps = Omit<React.JSX.IntrinsicElements['input'], 'size' | 'css'> & {
22
+ htmlSize?: number;
23
+ };
24
+ export type CheckboxProps = BaseProps & {
25
+ className?: string;
26
+ error?: boolean;
27
+ name?: string;
28
+ value?: string;
29
+ onChange?: (...args: any[]) => void;
30
+ onLabelClick?: React.JSX.IntrinsicElements['label']['onClick'];
31
+ disabled?: boolean;
32
+ checked?: boolean;
33
+ htmlSize?: number;
34
+ size?: Size;
35
+ indeterminate?: boolean;
36
+ leadingLabel?: boolean;
37
+ };
38
+ declare const Checkbox: ({ children, className, error, checked, disabled, indeterminate, onChange, onLabelClick, size, htmlSize, leadingLabel, ...rest }: CheckboxProps) => React.JSX.Element;
39
+ export default Checkbox;