@popsure/dirty-swan 0.55.3 → 0.56.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/dist/cjs/index.d.ts +2 -2
  2. package/dist/cjs/index.js +2684 -889
  3. package/dist/cjs/index.js.map +1 -1
  4. package/dist/cjs/lib/components/modal/bottomModal/index.d.ts +1 -1
  5. package/dist/cjs/lib/components/modal/fullScreenModal/index.d.ts +3 -0
  6. package/dist/cjs/lib/components/modal/genericModal/index.d.ts +16 -14
  7. package/dist/cjs/lib/components/modal/index.d.ts +4 -1
  8. package/dist/cjs/lib/components/modal/index.stories.d.ts +19 -1
  9. package/dist/cjs/lib/components/modal/regularModal/index.d.ts +1 -1
  10. package/dist/cjs/lib/hooks/useEscapeKey.d.ts +1 -0
  11. package/dist/cjs/lib/hooks/useFocusWithin.d.ts +1 -0
  12. package/dist/cjs/lib/index.d.ts +4 -2
  13. package/dist/esm/{Calendar-3239814b.js → Calendar-d39056f4.js} +9 -9
  14. package/dist/esm/{Calendar-3239814b.js.map → Calendar-d39056f4.js.map} +1 -1
  15. package/dist/esm/{TableSection-a1be2bd3.js → TableSection-24337bc7.js} +1 -1
  16. package/dist/esm/{TableSection-a1be2bd3.js.map → TableSection-24337bc7.js.map} +1 -1
  17. package/dist/esm/components/accordion/index.js +1 -1
  18. package/dist/esm/components/accordion/index.stories.js +1 -1
  19. package/dist/esm/components/autocompleteAddress/index.test.js +1 -1
  20. package/dist/esm/components/badge/index.test.js +1 -1
  21. package/dist/esm/components/button/index.js +4 -4
  22. package/dist/esm/components/button/index.js.map +1 -1
  23. package/dist/esm/components/button/index.test.js +1 -1
  24. package/dist/esm/components/comparisonTable/components/AccordionItem/AccordionItem.js +1 -1
  25. package/dist/esm/components/comparisonTable/components/AccordionItem/index.js +1 -1
  26. package/dist/esm/components/comparisonTable/components/Row/index.js +2 -2
  27. package/dist/esm/components/comparisonTable/components/Row/index.js.map +1 -1
  28. package/dist/esm/components/comparisonTable/components/TableButton/index.test.js +2 -2
  29. package/dist/esm/components/comparisonTable/components/TableRowHeader/index.test.js +2 -2
  30. package/dist/esm/components/comparisonTable/index.js +2 -2
  31. package/dist/esm/components/comparisonTable/index.stories.js +2 -2
  32. package/dist/esm/components/dateSelector/components/Calendar.js +1 -1
  33. package/dist/esm/components/dateSelector/index.js +1 -1
  34. package/dist/esm/components/dateSelector/index.stories.js +1 -1
  35. package/dist/esm/components/dateSelector/index.test.js +2 -2
  36. package/dist/esm/components/informationBox/index.test.js +1 -1
  37. package/dist/esm/components/input/autoSuggestInput/index.js +8 -998
  38. package/dist/esm/components/input/autoSuggestInput/index.js.map +1 -1
  39. package/dist/esm/components/input/autoSuggestInput/index.stories.js +1 -0
  40. package/dist/esm/components/input/autoSuggestInput/index.stories.js.map +1 -1
  41. package/dist/esm/components/input/autoSuggestMultiSelect/index.js +1 -0
  42. package/dist/esm/components/input/autoSuggestMultiSelect/index.js.map +1 -1
  43. package/dist/esm/components/input/autoSuggestMultiSelect/index.stories.js +1 -0
  44. package/dist/esm/components/input/autoSuggestMultiSelect/index.stories.js.map +1 -1
  45. package/dist/esm/components/input/checkbox/index.test.js +1 -1
  46. package/dist/esm/components/input/currency/index.test.js +1 -1
  47. package/dist/esm/components/input/index.js +2 -2
  48. package/dist/esm/components/input/index.js.map +1 -1
  49. package/dist/esm/components/input/radio/index.test.js +1 -1
  50. package/dist/esm/components/input/toggle/index.test.js +1 -1
  51. package/dist/esm/components/modal/bottomModal/index.js +6 -8
  52. package/dist/esm/components/modal/bottomModal/index.js.map +1 -1
  53. package/dist/esm/components/modal/bottomOrRegularModal/index.js +2 -0
  54. package/dist/esm/components/modal/bottomOrRegularModal/index.js.map +1 -1
  55. package/dist/esm/components/modal/fullScreenModal/index.js +29 -0
  56. package/dist/esm/components/modal/fullScreenModal/index.js.map +1 -0
  57. package/dist/esm/components/modal/genericModal/index.js +1751 -13
  58. package/dist/esm/components/modal/genericModal/index.js.map +1 -1
  59. package/dist/esm/components/modal/index.stories.js +48 -21
  60. package/dist/esm/components/modal/index.stories.js.map +1 -1
  61. package/dist/esm/components/modal/regularModal/index.js +6 -7
  62. package/dist/esm/components/modal/regularModal/index.js.map +1 -1
  63. package/dist/esm/components/multiDropzone/index.js +3 -3
  64. package/dist/esm/components/multiDropzone/index.js.map +1 -1
  65. package/dist/esm/components/multiDropzone/index.stories.js +1 -1
  66. package/dist/esm/components/multiDropzone/index.test.js +3 -3
  67. package/dist/esm/components/segmentedControl/index.test.js +1 -1
  68. package/dist/esm/components/signaturePad/index.js +2 -2
  69. package/dist/esm/components/signaturePad/index.js.map +1 -1
  70. package/dist/esm/components/spinner/index.test.js +1 -1
  71. package/dist/esm/components/table/Table.js +4 -2
  72. package/dist/esm/components/table/Table.js.map +1 -1
  73. package/dist/esm/components/table/Table.stories.js +4 -2
  74. package/dist/esm/components/table/Table.stories.js.map +1 -1
  75. package/dist/esm/components/table/Table.test.js +5 -3
  76. package/dist/esm/components/table/Table.test.js.map +1 -1
  77. package/dist/esm/components/table/components/TableCell/BaseCell/BaseCell.js +1 -1
  78. package/dist/esm/components/table/components/TableCell/BaseCell/BaseCell.stories.js +1 -1
  79. package/dist/esm/components/table/components/TableCell/TableCell.js +3 -3
  80. package/dist/esm/components/table/components/TableCell/TableCell.js.map +1 -1
  81. package/dist/esm/components/table/components/TableCell/TableCell.test.js +2 -2
  82. package/dist/esm/components/table/components/TableContents/TableContents.js +2 -2
  83. package/dist/esm/components/table/components/TableContents/TableContents.test.js +3 -3
  84. package/dist/esm/components/table/components/TableControls/TableControls.test.js +1 -1
  85. package/dist/esm/components/table/components/TableSection/TableSection.js +2 -2
  86. package/dist/esm/components/table/components/TableSection/TableSection.test.js +3 -3
  87. package/dist/esm/components/toast/index.js +1 -1
  88. package/dist/esm/components/toast/index.stories.js +1 -1
  89. package/dist/esm/components/toast/index.test.js +2 -2
  90. package/dist/esm/{customRender-d03c10b6.js → customRender-be47569b.js} +4 -4
  91. package/dist/esm/{customRender-d03c10b6.js.map → customRender-be47569b.js.map} +1 -1
  92. package/dist/esm/index-171a0108.js +997 -0
  93. package/dist/esm/index-171a0108.js.map +1 -0
  94. package/dist/esm/{index-3aa7e697.js → index-4b19aafb.js} +4 -4
  95. package/dist/esm/{index-3aa7e697.js.map → index-4b19aafb.js.map} +1 -1
  96. package/dist/esm/{index-6f567b0b.js → index-86558de6.js} +2 -2
  97. package/dist/esm/{index-6f567b0b.js.map → index-86558de6.js.map} +1 -1
  98. package/dist/esm/{index-3d286178.js → index-af1860d8.js} +3 -3
  99. package/dist/esm/{index-3d286178.js.map → index-af1860d8.js.map} +1 -1
  100. package/dist/esm/{index-a0ef2ab4.js → index-e27b50cf.js} +4 -4
  101. package/dist/esm/{index-a0ef2ab4.js.map → index-e27b50cf.js.map} +1 -1
  102. package/dist/esm/index.d.ts +2 -2
  103. package/dist/esm/index.js +36 -6
  104. package/dist/esm/index.js.map +1 -1
  105. package/dist/esm/lib/components/modal/bottomModal/index.d.ts +1 -1
  106. package/dist/esm/lib/components/modal/fullScreenModal/index.d.ts +3 -0
  107. package/dist/esm/lib/components/modal/genericModal/index.d.ts +16 -14
  108. package/dist/esm/lib/components/modal/index.d.ts +4 -1
  109. package/dist/esm/lib/components/modal/index.stories.d.ts +19 -1
  110. package/dist/esm/lib/components/modal/regularModal/index.d.ts +1 -1
  111. package/dist/esm/lib/hooks/useEscapeKey.d.ts +1 -0
  112. package/dist/esm/lib/hooks/useFocusWithin.d.ts +1 -0
  113. package/dist/esm/lib/index.d.ts +4 -2
  114. package/dist/esm/util/testUtils/customRender.js +1 -1
  115. package/package.json +2 -1
  116. package/src/index.tsx +4 -1
  117. package/src/lib/components/modal/bottomModal/index.tsx +17 -13
  118. package/src/lib/components/modal/fullScreenModal/index.tsx +28 -0
  119. package/src/lib/components/modal/fullScreenModal/style.module.scss +49 -0
  120. package/src/lib/components/modal/genericModal/index.tsx +88 -88
  121. package/src/lib/components/modal/hooks/useOnClose.ts +10 -8
  122. package/src/lib/components/modal/index.stories.tsx +133 -80
  123. package/src/lib/components/modal/index.ts +4 -1
  124. package/src/lib/components/modal/regularModal/index.tsx +17 -12
  125. package/src/lib/hooks/useEscapeKey.ts +18 -0
  126. package/src/lib/hooks/useFocusWithin.ts +22 -0
  127. package/src/lib/index.tsx +6 -0
@@ -1 +1 @@
1
- {"version":3,"file":"index-a0ef2ab4.js","sources":["../../node_modules/react-animate-height/dist/esm/index.js"],"sourcesContent":["var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport React, { useEffect, useRef, useState } from 'react';\nimport classNames from 'classnames';\n// ------------------ Helpers\nfunction isNumber(n) {\n const number = parseFloat(n);\n return !isNaN(number) && isFinite(number);\n}\nfunction isPercentage(height) {\n // Percentage height\n return (typeof height === 'string' &&\n height[height.length - 1] === '%' &&\n isNumber(height.substring(0, height.length - 1)));\n}\nfunction hideContent(element, height) {\n // Check for element?.style is added cause this would fail in tests (react-test-renderer)\n // Read more here: https://github.com/Stanko/react-animate-height/issues/17\n if (height === 0 && (element === null || element === void 0 ? void 0 : element.style)) {\n element.style.display = 'none';\n }\n}\nfunction showContent(element, height) {\n // Check for element?.style is added cause this would fail in tests (react-test-renderer)\n // Read more here: https://github.com/Stanko/react-animate-height/issues/17\n if (height === 0 && (element === null || element === void 0 ? void 0 : element.style)) {\n element.style.display = '';\n }\n}\nconst ANIMATION_STATE_CLASSES = {\n animating: 'rah-animating',\n animatingUp: 'rah-animating--up',\n animatingDown: 'rah-animating--down',\n animatingToHeightZero: 'rah-animating--to-height-zero',\n animatingToHeightAuto: 'rah-animating--to-height-auto',\n animatingToHeightSpecific: 'rah-animating--to-height-specific',\n static: 'rah-static',\n staticHeightZero: 'rah-static--height-zero',\n staticHeightAuto: 'rah-static--height-auto',\n staticHeightSpecific: 'rah-static--height-specific',\n};\nfunction getStaticStateClasses(animationStateClasses, height) {\n return classNames({\n [animationStateClasses.static]: true,\n [animationStateClasses.staticHeightZero]: height === 0,\n [animationStateClasses.staticHeightSpecific]: height > 0,\n [animationStateClasses.staticHeightAuto]: height === 'auto',\n });\n}\nconst AnimateHeight = (_a) => {\n var { animateOpacity = false, animationStateClasses = {}, applyInlineTransitions = true, children, className = '', contentClassName, delay: userDelay = 0, duration: userDuration = 500, easing = 'ease', height, onHeightAnimationEnd, onHeightAnimationStart, style } = _a, props = __rest(_a, [\"animateOpacity\", \"animationStateClasses\", \"applyInlineTransitions\", \"children\", \"className\", \"contentClassName\", \"delay\", \"duration\", \"easing\", \"height\", \"onHeightAnimationEnd\", \"onHeightAnimationStart\", \"style\"]);\n // ------------------ Initialization\n const prevHeight = useRef(height);\n const contentElement = useRef(null);\n const animationClassesTimeoutID = useRef();\n const timeoutID = useRef();\n const stateClasses = useRef(Object.assign(Object.assign({}, ANIMATION_STATE_CLASSES), animationStateClasses));\n const isBrowser = typeof window !== 'undefined';\n const prefersReducedMotion = useRef(isBrowser && window.matchMedia\n ? window.matchMedia('(prefers-reduced-motion)').matches\n : false);\n const delay = prefersReducedMotion.current ? 0 : userDelay;\n const duration = prefersReducedMotion.current ? 0 : userDuration;\n let initHeight = height;\n let initOverflow = 'visible';\n if (typeof initHeight === 'number') {\n // Reset negative height to 0\n initHeight = height < 0 ? 0 : height;\n initOverflow = 'hidden';\n }\n else if (isPercentage(initHeight)) {\n // If value is string \"0%\" make sure we convert it to number 0\n initHeight = height === '0%' ? 0 : height;\n initOverflow = 'hidden';\n }\n const [currentHeight, setCurrentHeight] = useState(initHeight);\n const [overflow, setOverflow] = useState(initOverflow);\n const [useTransitions, setUseTransitions] = useState(false);\n const [animationStateClassNames, setAnimationStateClassNames] = useState(getStaticStateClasses(stateClasses.current, height));\n // ------------------ Did mount\n useEffect(() => {\n // Hide content if height is 0 (to prevent tabbing into it)\n hideContent(contentElement.current, currentHeight);\n // This should be explicitly run only on mount\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n // ------------------ Height update\n useEffect(() => {\n if (height !== prevHeight.current && contentElement.current) {\n showContent(contentElement.current, prevHeight.current);\n // Cache content height\n contentElement.current.style.overflow = 'hidden';\n const contentHeight = contentElement.current.offsetHeight;\n contentElement.current.style.overflow = '';\n // set total animation time\n const totalDuration = duration + delay;\n let newHeight;\n let timeoutHeight;\n let timeoutOverflow = 'hidden';\n let timeoutUseTransitions;\n const isCurrentHeightAuto = prevHeight.current === 'auto';\n if (typeof height === 'number') {\n // Reset negative height to 0\n newHeight = height < 0 ? 0 : height;\n timeoutHeight = newHeight;\n }\n else if (isPercentage(height)) {\n // If value is string \"0%\" make sure we convert it to number 0\n newHeight = height === '0%' ? 0 : height;\n timeoutHeight = newHeight;\n }\n else {\n // If not, animate to content height\n // and then reset to auto\n newHeight = contentHeight; // TODO solve contentHeight = 0\n timeoutHeight = 'auto';\n timeoutOverflow = undefined;\n }\n if (isCurrentHeightAuto) {\n // This is the height to be animated to\n timeoutHeight = newHeight;\n // If previous height was 'auto'\n // set starting height explicitly to be able to use transition\n newHeight = contentHeight;\n }\n // Animation classes\n const newAnimationStateClassNames = classNames({\n [stateClasses.current.animating]: true,\n [stateClasses.current.animatingUp]: prevHeight.current === 'auto' || height < prevHeight.current,\n [stateClasses.current.animatingDown]: height === 'auto' || height > prevHeight.current,\n [stateClasses.current.animatingToHeightZero]: timeoutHeight === 0,\n [stateClasses.current.animatingToHeightAuto]: timeoutHeight === 'auto',\n [stateClasses.current.animatingToHeightSpecific]: timeoutHeight > 0,\n });\n // Animation classes to be put after animation is complete\n const timeoutAnimationStateClasses = getStaticStateClasses(stateClasses.current, timeoutHeight);\n // Set starting height and animating classes\n // When animating from 'auto' we first need to set fixed height\n // that change should be animated\n setCurrentHeight(newHeight);\n setOverflow('hidden');\n setUseTransitions(!isCurrentHeightAuto);\n setAnimationStateClassNames(newAnimationStateClassNames);\n // Clear timeouts\n clearTimeout(timeoutID.current);\n clearTimeout(animationClassesTimeoutID.current);\n if (isCurrentHeightAuto) {\n // When animating from 'auto' we use a short timeout to start animation\n // after setting fixed height above\n timeoutUseTransitions = true;\n // Short timeout to allow rendering of the initial animation state first\n timeoutID.current = setTimeout(() => {\n setCurrentHeight(timeoutHeight);\n setOverflow(timeoutOverflow);\n setUseTransitions(timeoutUseTransitions);\n // ANIMATION STARTS, run a callback if it exists\n onHeightAnimationStart === null || onHeightAnimationStart === void 0 ? void 0 : onHeightAnimationStart(timeoutHeight);\n }, 50);\n // Set static classes and remove transitions when animation ends\n animationClassesTimeoutID.current = setTimeout(() => {\n setUseTransitions(false);\n setAnimationStateClassNames(timeoutAnimationStateClasses);\n // ANIMATION ENDS\n // Hide content if height is 0 (to prevent tabbing into it)\n hideContent(contentElement.current, timeoutHeight);\n // Run a callback if it exists\n onHeightAnimationEnd === null || onHeightAnimationEnd === void 0 ? void 0 : onHeightAnimationEnd(timeoutHeight);\n }, totalDuration);\n }\n else {\n // ANIMATION STARTS, run a callback if it exists\n onHeightAnimationStart === null || onHeightAnimationStart === void 0 ? void 0 : onHeightAnimationStart(newHeight);\n // Set end height, classes and remove transitions when animation is complete\n timeoutID.current = setTimeout(() => {\n setCurrentHeight(timeoutHeight);\n setOverflow(timeoutOverflow);\n setUseTransitions(false);\n setAnimationStateClassNames(timeoutAnimationStateClasses);\n // ANIMATION ENDS\n // If height is auto, don't hide the content\n // (case when element is empty, therefore height is 0)\n if (height !== 'auto') {\n // Hide content if height is 0 (to prevent tabbing into it)\n hideContent(contentElement.current, newHeight); // TODO solve newHeight = 0\n }\n // Run a callback if it exists\n onHeightAnimationEnd === null || onHeightAnimationEnd === void 0 ? void 0 : onHeightAnimationEnd(newHeight);\n }, totalDuration);\n }\n }\n prevHeight.current = height;\n return () => {\n clearTimeout(timeoutID.current);\n clearTimeout(animationClassesTimeoutID.current);\n };\n // This should be explicitly run only on height change\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [height]);\n // ------------------ Render\n const componentStyle = Object.assign(Object.assign({}, style), { height: currentHeight, overflow: overflow || (style === null || style === void 0 ? void 0 : style.overflow) });\n if (useTransitions && applyInlineTransitions) {\n componentStyle.transition = `height ${duration}ms ${easing} ${delay}ms`;\n // Include transition passed through styles\n if (style === null || style === void 0 ? void 0 : style.transition) {\n componentStyle.transition = `${style.transition}, ${componentStyle.transition}`;\n }\n // Add webkit vendor prefix still used by opera, blackberry...\n componentStyle.WebkitTransition = componentStyle.transition;\n }\n const contentStyle = {};\n if (animateOpacity) {\n contentStyle.transition = `opacity ${duration}ms ${easing} ${delay}ms`;\n // Add webkit vendor prefix still used by opera, blackberry...\n contentStyle.WebkitTransition = contentStyle.transition;\n if (currentHeight === 0) {\n contentStyle.opacity = 0;\n }\n }\n // Check if user passed aria-hidden prop\n const hasAriaHiddenProp = typeof props['aria-hidden'] !== 'undefined';\n const ariaHidden = hasAriaHiddenProp ? props['aria-hidden'] : height === 0;\n return (React.createElement(\"div\", Object.assign({}, props, { \"aria-hidden\": ariaHidden, className: `${animationStateClassNames} ${className}`, style: componentStyle }),\n React.createElement(\"div\", { className: contentClassName, style: contentStyle, ref: contentElement }, children)));\n};\nexport default AnimateHeight;\n"],"names":["this","React"],"mappings":";;;AAAA,IAAI,MAAM,GAAG,CAACA,SAAI,IAAIA,SAAI,CAAC,MAAM,KAAK,UAAU,CAAC,EAAE,CAAC,EAAE;AACtD,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;AACf,IAAI,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC;AACvF,QAAQ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AAG,EAAE,CAAC;AAC5B,IAAI,IAAI,cAAc,EAAE;AACxB,QAAQ,YAAY,CAAC,UAAU,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC;AAC/E;AACA,QAAQ,YAAY,CAAC,gBAAgB,GAAG,YAAY,CAAC,UAAU,CAAC;AAChE,QAAQ,IAAI,aAAa,KAAK,CAAC,EAAE;AACjC,YAAY,YAAY,CAAC,OAAO,GAAG,CAAC,CAAC;AACrC,SAAS;AACT,KAAK;AACL;AACA,IAAI,MAAM,iBAAiB,GAAG,OAAO,KAAK,CAAC,aAAa,CAAC,KAAK,WAAW,CAAC;AAC1E,IAAI,MAAM,UAAU,GAAG,iBAAiB,GAAG,KAAK,CAAC,aAAa,CAAC,GAAG,MAAM,KAAK,CAAC,CAAC;AAC/E,IAAI,QAAQC,mBAAK,CAAC,aAAa,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC,EAAE,wBAAwB,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,cAAc,EAAE,CAAC;AAC5K,QAAQA,mBAAK,CAAC,aAAa,CAAC,KAAK,EAAE,EAAE,SAAS,EAAE,gBAAgB,EAAE,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,cAAc,EAAE,EAAE,QAAQ,CAAC,CAAC,EAAE;AAC1H;;;;"}
1
+ {"version":3,"file":"index-e27b50cf.js","sources":["../../node_modules/react-animate-height/dist/esm/index.js"],"sourcesContent":["var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport React, { useEffect, useRef, useState } from 'react';\nimport classNames from 'classnames';\n// ------------------ Helpers\nfunction isNumber(n) {\n const number = parseFloat(n);\n return !isNaN(number) && isFinite(number);\n}\nfunction isPercentage(height) {\n // Percentage height\n return (typeof height === 'string' &&\n height[height.length - 1] === '%' &&\n isNumber(height.substring(0, height.length - 1)));\n}\nfunction hideContent(element, height) {\n // Check for element?.style is added cause this would fail in tests (react-test-renderer)\n // Read more here: https://github.com/Stanko/react-animate-height/issues/17\n if (height === 0 && (element === null || element === void 0 ? void 0 : element.style)) {\n element.style.display = 'none';\n }\n}\nfunction showContent(element, height) {\n // Check for element?.style is added cause this would fail in tests (react-test-renderer)\n // Read more here: https://github.com/Stanko/react-animate-height/issues/17\n if (height === 0 && (element === null || element === void 0 ? void 0 : element.style)) {\n element.style.display = '';\n }\n}\nconst ANIMATION_STATE_CLASSES = {\n animating: 'rah-animating',\n animatingUp: 'rah-animating--up',\n animatingDown: 'rah-animating--down',\n animatingToHeightZero: 'rah-animating--to-height-zero',\n animatingToHeightAuto: 'rah-animating--to-height-auto',\n animatingToHeightSpecific: 'rah-animating--to-height-specific',\n static: 'rah-static',\n staticHeightZero: 'rah-static--height-zero',\n staticHeightAuto: 'rah-static--height-auto',\n staticHeightSpecific: 'rah-static--height-specific',\n};\nfunction getStaticStateClasses(animationStateClasses, height) {\n return classNames({\n [animationStateClasses.static]: true,\n [animationStateClasses.staticHeightZero]: height === 0,\n [animationStateClasses.staticHeightSpecific]: height > 0,\n [animationStateClasses.staticHeightAuto]: height === 'auto',\n });\n}\nconst AnimateHeight = (_a) => {\n var { animateOpacity = false, animationStateClasses = {}, applyInlineTransitions = true, children, className = '', contentClassName, delay: userDelay = 0, duration: userDuration = 500, easing = 'ease', height, onHeightAnimationEnd, onHeightAnimationStart, style } = _a, props = __rest(_a, [\"animateOpacity\", \"animationStateClasses\", \"applyInlineTransitions\", \"children\", \"className\", \"contentClassName\", \"delay\", \"duration\", \"easing\", \"height\", \"onHeightAnimationEnd\", \"onHeightAnimationStart\", \"style\"]);\n // ------------------ Initialization\n const prevHeight = useRef(height);\n const contentElement = useRef(null);\n const animationClassesTimeoutID = useRef();\n const timeoutID = useRef();\n const stateClasses = useRef(Object.assign(Object.assign({}, ANIMATION_STATE_CLASSES), animationStateClasses));\n const isBrowser = typeof window !== 'undefined';\n const prefersReducedMotion = useRef(isBrowser && window.matchMedia\n ? window.matchMedia('(prefers-reduced-motion)').matches\n : false);\n const delay = prefersReducedMotion.current ? 0 : userDelay;\n const duration = prefersReducedMotion.current ? 0 : userDuration;\n let initHeight = height;\n let initOverflow = 'visible';\n if (typeof initHeight === 'number') {\n // Reset negative height to 0\n initHeight = height < 0 ? 0 : height;\n initOverflow = 'hidden';\n }\n else if (isPercentage(initHeight)) {\n // If value is string \"0%\" make sure we convert it to number 0\n initHeight = height === '0%' ? 0 : height;\n initOverflow = 'hidden';\n }\n const [currentHeight, setCurrentHeight] = useState(initHeight);\n const [overflow, setOverflow] = useState(initOverflow);\n const [useTransitions, setUseTransitions] = useState(false);\n const [animationStateClassNames, setAnimationStateClassNames] = useState(getStaticStateClasses(stateClasses.current, height));\n // ------------------ Did mount\n useEffect(() => {\n // Hide content if height is 0 (to prevent tabbing into it)\n hideContent(contentElement.current, currentHeight);\n // This should be explicitly run only on mount\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n // ------------------ Height update\n useEffect(() => {\n if (height !== prevHeight.current && contentElement.current) {\n showContent(contentElement.current, prevHeight.current);\n // Cache content height\n contentElement.current.style.overflow = 'hidden';\n const contentHeight = contentElement.current.offsetHeight;\n contentElement.current.style.overflow = '';\n // set total animation time\n const totalDuration = duration + delay;\n let newHeight;\n let timeoutHeight;\n let timeoutOverflow = 'hidden';\n let timeoutUseTransitions;\n const isCurrentHeightAuto = prevHeight.current === 'auto';\n if (typeof height === 'number') {\n // Reset negative height to 0\n newHeight = height < 0 ? 0 : height;\n timeoutHeight = newHeight;\n }\n else if (isPercentage(height)) {\n // If value is string \"0%\" make sure we convert it to number 0\n newHeight = height === '0%' ? 0 : height;\n timeoutHeight = newHeight;\n }\n else {\n // If not, animate to content height\n // and then reset to auto\n newHeight = contentHeight; // TODO solve contentHeight = 0\n timeoutHeight = 'auto';\n timeoutOverflow = undefined;\n }\n if (isCurrentHeightAuto) {\n // This is the height to be animated to\n timeoutHeight = newHeight;\n // If previous height was 'auto'\n // set starting height explicitly to be able to use transition\n newHeight = contentHeight;\n }\n // Animation classes\n const newAnimationStateClassNames = classNames({\n [stateClasses.current.animating]: true,\n [stateClasses.current.animatingUp]: prevHeight.current === 'auto' || height < prevHeight.current,\n [stateClasses.current.animatingDown]: height === 'auto' || height > prevHeight.current,\n [stateClasses.current.animatingToHeightZero]: timeoutHeight === 0,\n [stateClasses.current.animatingToHeightAuto]: timeoutHeight === 'auto',\n [stateClasses.current.animatingToHeightSpecific]: timeoutHeight > 0,\n });\n // Animation classes to be put after animation is complete\n const timeoutAnimationStateClasses = getStaticStateClasses(stateClasses.current, timeoutHeight);\n // Set starting height and animating classes\n // When animating from 'auto' we first need to set fixed height\n // that change should be animated\n setCurrentHeight(newHeight);\n setOverflow('hidden');\n setUseTransitions(!isCurrentHeightAuto);\n setAnimationStateClassNames(newAnimationStateClassNames);\n // Clear timeouts\n clearTimeout(timeoutID.current);\n clearTimeout(animationClassesTimeoutID.current);\n if (isCurrentHeightAuto) {\n // When animating from 'auto' we use a short timeout to start animation\n // after setting fixed height above\n timeoutUseTransitions = true;\n // Short timeout to allow rendering of the initial animation state first\n timeoutID.current = setTimeout(() => {\n setCurrentHeight(timeoutHeight);\n setOverflow(timeoutOverflow);\n setUseTransitions(timeoutUseTransitions);\n // ANIMATION STARTS, run a callback if it exists\n onHeightAnimationStart === null || onHeightAnimationStart === void 0 ? void 0 : onHeightAnimationStart(timeoutHeight);\n }, 50);\n // Set static classes and remove transitions when animation ends\n animationClassesTimeoutID.current = setTimeout(() => {\n setUseTransitions(false);\n setAnimationStateClassNames(timeoutAnimationStateClasses);\n // ANIMATION ENDS\n // Hide content if height is 0 (to prevent tabbing into it)\n hideContent(contentElement.current, timeoutHeight);\n // Run a callback if it exists\n onHeightAnimationEnd === null || onHeightAnimationEnd === void 0 ? void 0 : onHeightAnimationEnd(timeoutHeight);\n }, totalDuration);\n }\n else {\n // ANIMATION STARTS, run a callback if it exists\n onHeightAnimationStart === null || onHeightAnimationStart === void 0 ? void 0 : onHeightAnimationStart(newHeight);\n // Set end height, classes and remove transitions when animation is complete\n timeoutID.current = setTimeout(() => {\n setCurrentHeight(timeoutHeight);\n setOverflow(timeoutOverflow);\n setUseTransitions(false);\n setAnimationStateClassNames(timeoutAnimationStateClasses);\n // ANIMATION ENDS\n // If height is auto, don't hide the content\n // (case when element is empty, therefore height is 0)\n if (height !== 'auto') {\n // Hide content if height is 0 (to prevent tabbing into it)\n hideContent(contentElement.current, newHeight); // TODO solve newHeight = 0\n }\n // Run a callback if it exists\n onHeightAnimationEnd === null || onHeightAnimationEnd === void 0 ? void 0 : onHeightAnimationEnd(newHeight);\n }, totalDuration);\n }\n }\n prevHeight.current = height;\n return () => {\n clearTimeout(timeoutID.current);\n clearTimeout(animationClassesTimeoutID.current);\n };\n // This should be explicitly run only on height change\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [height]);\n // ------------------ Render\n const componentStyle = Object.assign(Object.assign({}, style), { height: currentHeight, overflow: overflow || (style === null || style === void 0 ? void 0 : style.overflow) });\n if (useTransitions && applyInlineTransitions) {\n componentStyle.transition = `height ${duration}ms ${easing} ${delay}ms`;\n // Include transition passed through styles\n if (style === null || style === void 0 ? void 0 : style.transition) {\n componentStyle.transition = `${style.transition}, ${componentStyle.transition}`;\n }\n // Add webkit vendor prefix still used by opera, blackberry...\n componentStyle.WebkitTransition = componentStyle.transition;\n }\n const contentStyle = {};\n if (animateOpacity) {\n contentStyle.transition = `opacity ${duration}ms ${easing} ${delay}ms`;\n // Add webkit vendor prefix still used by opera, blackberry...\n contentStyle.WebkitTransition = contentStyle.transition;\n if (currentHeight === 0) {\n contentStyle.opacity = 0;\n }\n }\n // Check if user passed aria-hidden prop\n const hasAriaHiddenProp = typeof props['aria-hidden'] !== 'undefined';\n const ariaHidden = hasAriaHiddenProp ? props['aria-hidden'] : height === 0;\n return (React.createElement(\"div\", Object.assign({}, props, { \"aria-hidden\": ariaHidden, className: `${animationStateClassNames} ${className}`, style: componentStyle }),\n React.createElement(\"div\", { className: contentClassName, style: contentStyle, ref: contentElement }, children)));\n};\nexport default AnimateHeight;\n"],"names":["this","React"],"mappings":";;;AAAA,IAAI,MAAM,GAAG,CAACA,SAAI,IAAIA,SAAI,CAAC,MAAM,KAAK,UAAU,CAAC,EAAE,CAAC,EAAE;AACtD,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;AACf,IAAI,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC;AACvF,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AACpB,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,OAAO,MAAM,CAAC,qBAAqB,KAAK,UAAU;AACvE,QAAQ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AAChF,YAAY,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAA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GAAG,iBAAiB,GAAG,KAAK,CAAC,aAAa,CAAC,GAAG,MAAM,KAAK,CAAC,CAAC;AAC/E,IAAI,QAAQC,cAAK,CAAC,aAAa,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC,EAAE,wBAAwB,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,cAAc,EAAE,CAAC;AAC5K,QAAQA,cAAK,CAAC,aAAa,CAAC,KAAK,EAAE,EAAE,SAAS,EAAE,gBAAgB,EAAE,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,cAAc,EAAE,EAAE,QAAQ,CAAC,CAAC,EAAE;AAC1H;;;;"}
@@ -1,3 +1,3 @@
1
- export { Accordion, DateSelector, SignaturePad, AutocompleteAddress, Input, MultiDropzone, IbanInput, CurrencyInput, BottomModal, RegularModal, BottomOrRegularModal, InfoCard, CardButton, Card, Button, AutoSuggestMultiSelect, Chip, AutoSuggestInput, ComparisonTable, TableRating, TableTrueFalse, TableRowHeader, TableButton, TableInfoButton, SegmentedControl, DownloadButton, Checkbox, Radio, Link, InformationBox, Badge, images, illustrations, Spinner, Table, Toggle, Toaster, toast, } from './lib';
1
+ export { Accordion, DateSelector, SignaturePad, AutocompleteAddress, Input, MultiDropzone, IbanInput, CurrencyInput, BottomModal, RegularModal, BottomOrRegularModal, FullScreenModal, InfoCard, CardButton, Card, Button, AutoSuggestMultiSelect, Chip, AutoSuggestInput, ComparisonTable, TableRating, TableTrueFalse, TableRowHeader, TableButton, TableInfoButton, SegmentedControl, DownloadButton, Checkbox, Radio, Link, InformationBox, Badge, images, illustrations, Spinner, Table, Toggle, Toaster, toast, useEscapeKey, useFocusWithin, } from './lib';
2
2
  export * from './lib/components/icon';
3
- export type { AccordionProps, DownloadStatus, InformationBoxProps, InputProps, IllustrationKeys, FileType, MultiDropzoneProps, TableHeader, UploadedFile, UploadStatus, CardProps, IconWrapperProps, TableData, TableProps } from './lib';
3
+ export type { AccordionProps, DownloadStatus, InformationBoxProps, InputProps, IllustrationKeys, FileType, MultiDropzoneProps, TableHeader, UploadedFile, UploadStatus, CardProps, IconWrapperProps, TableData, TableProps, } from './lib';
package/dist/esm/index.js CHANGED
@@ -13,6 +13,7 @@ export { Radio } from './components/input/radio/index.js';
13
13
  export { BottomModal } from './components/modal/bottomModal/index.js';
14
14
  export { RegularModal } from './components/modal/regularModal/index.js';
15
15
  export { BottomOrRegularModal } from './components/modal/bottomOrRegularModal/index.js';
16
+ export { FullScreenModal } from './components/modal/fullScreenModal/index.js';
16
17
  export { InfoCard } from './components/cards/index.js';
17
18
  export { CardButton } from './components/cards/cardButton/index.js';
18
19
  export { Card } from './components/cards/card/index.js';
@@ -26,9 +27,10 @@ export { Link } from './components/link/index.js';
26
27
  export { i as illustrations, a as images } from './index-29e6f39e.js';
27
28
  export { Spinner } from './components/spinner/index.js';
28
29
  export { Toggle } from './components/input/toggle/index.js';
29
- export { a as Toaster, t as toast } from './index-3aa7e697.js';
30
+ export { a as Toaster, t as toast } from './index-4b19aafb.js';
30
31
  export { Accordion } from './components/accordion/index.js';
31
32
  export { Table } from './components/table/Table.js';
33
+ import { useCallback, useEffect } from 'react';
32
34
  export { default as Svg1Icon } from './components/icon/icons/1.js';
33
35
  export { default as Svg2Icon } from './components/icon/icons/2.js';
34
36
  export { default as Svg3Icon } from './components/icon/icons/3.js';
@@ -418,8 +420,7 @@ export { default as TableButton } from './components/comparisonTable/components/
418
420
  export { default as TableInfoButton } from './components/comparisonTable/components/TableInfoButton/index.js';
419
421
  import './tslib.es6-a39f91fc.js';
420
422
  import 'react/jsx-runtime';
421
- import 'react';
422
- import './Calendar-3239814b.js';
423
+ import './Calendar-d39056f4.js';
423
424
  import './_commonjsHelpers-4730bd53.js';
424
425
  import './style-inject.es-1f59c1d0.js';
425
426
  import './index-6ea95111.js';
@@ -427,10 +428,11 @@ import './components/icon/IconWrapper/IconWrapper.js';
427
428
  import './index-69a46657.js';
428
429
  import './index-5e72c3d4.js';
429
430
  import './index-dd80248b.js';
430
- import './index-a0ef2ab4.js';
431
+ import './index-e27b50cf.js';
431
432
  import './components/multiDropzone/UploadFileCell/index.js';
432
433
  import './components/modal/genericModal/index.js';
433
- import './index-3d286178.js';
434
+ import './index-171a0108.js';
435
+ import './index-af1860d8.js';
434
436
  import './components/comparisonTable/components/Chevron.js';
435
437
  import './components/comparisonTable/components/Row/index.js';
436
438
  import './components/comparisonTable/components/TableArrows/index.js';
@@ -445,10 +447,38 @@ import './components/table/components/TableCell/CTACell/CTACell.js';
445
447
  import './components/table/components/IconRenderer/IconRenderer.js';
446
448
  import './components/table/components/TableCell/CardCell/CardCell.js';
447
449
  import './components/table/components/TableCell/ButtonCell/ButtonCell.js';
448
- import './TableSection-a1be2bd3.js';
450
+ import './TableSection-24337bc7.js';
449
451
  import './components/table/components/TableContents/TableContents.js';
450
452
  import './components/table/components/TableContents/Collapsible.js';
451
453
  import './useTableNavigation-f929fbc9.js';
452
454
  import './components/table/components/TableControls/TableControls.js';
453
455
  import './useScrollSync-b2d28bed.js';
456
+
457
+ var useEscapeKey = function (callback) {
458
+ var handleOnEscape = useCallback(function (e) {
459
+ if (e.key === 'Escape') {
460
+ callback();
461
+ }
462
+ }, [callback]);
463
+ useEffect(function () {
464
+ window.addEventListener('keydown', handleOnEscape);
465
+ return function () { return window.removeEventListener('keydown', handleOnEscape); };
466
+ }, [handleOnEscape]);
467
+ };
468
+
469
+ var useFocusWithin = function (ref, callback) {
470
+ useEffect(function () {
471
+ var handleOnFocusIn = function () {
472
+ if (!ref) {
473
+ return;
474
+ }
475
+ var hasFocus = ref === null || ref === void 0 ? void 0 : ref.contains(document.activeElement);
476
+ callback(Boolean(hasFocus));
477
+ };
478
+ document.addEventListener('focusin', handleOnFocusIn);
479
+ return function () { return document === null || document === void 0 ? void 0 : document.removeEventListener('focusin', handleOnFocusIn); };
480
+ }, [callback, ref]);
481
+ };
482
+
483
+ export { useEscapeKey, useFocusWithin };
454
484
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/lib/hooks/useEscapeKey.ts","../../../src/lib/hooks/useFocusWithin.ts"],"sourcesContent":["import { useCallback, useEffect } from 'react';\n\nexport const useEscapeKey = (callback: () => void) => {\n const handleOnEscape = useCallback(\n (e: KeyboardEvent) => {\n if (e.key === 'Escape') {\n callback();\n }\n },\n [callback]\n );\n\n useEffect(() => {\n window.addEventListener('keydown', handleOnEscape);\n\n return () => window.removeEventListener('keydown', handleOnEscape);\n }, [handleOnEscape]);\n};\n","import { useEffect } from 'react';\n\nexport const useFocusWithin = (\n ref: HTMLElement | null,\n callback: (isFocusWithin: boolean) => void\n) => {\n useEffect(() => {\n const handleOnFocusIn = () => {\n if (!ref) {\n return;\n }\n\n const hasFocus = ref?.contains(document.activeElement);\n\n callback(Boolean(hasFocus));\n };\n\n document.addEventListener('focusin', handleOnFocusIn);\n\n return () => document?.remov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C,QAAQ,CAAC,aAAa,CAAC,CAAC;YAEvD,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;SAC7B,CAAC;QAEF,QAAQ,CAAC,gBAAgB,CAAC,SAAS,EAAE,eAAe,CAAC,CAAC;QAEtD,OAAO,cAAM,OAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,mBAAmB,CAAC,SAAS,EAAE,eAAe,CAAC,GAAA,CAAC;KACxE,EAAE,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC;AACtB;;;;"}
@@ -1,3 +1,3 @@
1
1
  import { Props } from '..';
2
- declare const BottomModal: ({ className, ...rest }: Props) => JSX.Element;
2
+ declare const BottomModal: ({ className, classNames, ...rest }: Props) => JSX.Element;
3
3
  export { BottomModal };
@@ -0,0 +1,3 @@
1
+ import { Props } from '..';
2
+ declare const FullScreenModal: ({ className, classNames, ...rest }: Props) => JSX.Element;
3
+ export { FullScreenModal };
@@ -1,19 +1,21 @@
1
1
  import { Props } from '..';
2
+ export interface GenericModalClassNames {
3
+ wrapper?: string | (({ isClosing }: {
4
+ isClosing: boolean;
5
+ }) => string);
6
+ container?: string | (({ isClosing }: {
7
+ isClosing: boolean;
8
+ }) => string);
9
+ overlay?: string;
10
+ header?: string;
11
+ closeButton?: string;
12
+ closeButtonIcon?: string;
13
+ title?: string;
14
+ body?: string;
15
+ footer?: string;
16
+ }
2
17
  interface GenericModalProps extends Props {
3
- classNames?: {
4
- wrapper?: string | (({ isClosing }: {
5
- isClosing: boolean;
6
- }) => string);
7
- container?: string | (({ isClosing }: {
8
- isClosing: boolean;
9
- }) => string);
10
- overlay?: string;
11
- header?: string;
12
- closeButton?: string;
13
- title?: string;
14
- body?: string;
15
- footer?: string;
16
- };
18
+ classNames?: GenericModalClassNames;
17
19
  titleSize?: 'small' | 'default';
18
20
  }
19
21
  export declare const GenericModal: (props: GenericModalProps) => JSX.Element | null;
@@ -1,7 +1,9 @@
1
1
  import { BottomModal } from './bottomModal';
2
2
  import { RegularModal } from './regularModal';
3
3
  import { BottomOrRegularModal } from './bottomOrRegularModal';
4
+ import { FullScreenModal } from './fullScreenModal';
4
5
  import { ReactNode } from 'react';
6
+ import { GenericModalClassNames } from './genericModal';
5
7
  export interface Props {
6
8
  title?: ReactNode;
7
9
  isOpen: boolean;
@@ -9,8 +11,9 @@ export interface Props {
9
11
  onClose: () => void;
10
12
  onModalScroll?: (scrollTop: number, element: HTMLDivElement) => void;
11
13
  className?: string;
14
+ classNames?: GenericModalClassNames;
12
15
  dismissible?: boolean;
13
16
  size?: 'default' | 'large';
14
17
  footer?: ReactNode;
15
18
  }
16
- export { BottomModal, RegularModal, BottomOrRegularModal };
19
+ export { BottomModal, RegularModal, BottomOrRegularModal, FullScreenModal };
@@ -15,6 +15,9 @@ declare const story: {
15
15
  className: {
16
16
  description: string;
17
17
  };
18
+ classNames: {
19
+ description: string;
20
+ };
18
21
  size: {
19
22
  description: string;
20
23
  control: string;
@@ -52,6 +55,17 @@ declare const story: {
52
55
  isOpen: boolean;
53
56
  dismissible: boolean;
54
57
  className: string;
58
+ classNames: {
59
+ wrapper: string;
60
+ container: string;
61
+ overlay: string;
62
+ header: string;
63
+ closeButton: string;
64
+ closeButtonIcon: string;
65
+ title: string;
66
+ body: string;
67
+ footer: string;
68
+ };
55
69
  children: string;
56
70
  size: string;
57
71
  };
@@ -65,7 +79,7 @@ declare const story: {
65
79
  };
66
80
  };
67
81
  export declare const BottomOrRegularModalStory: {
68
- ({ children, className, dismissible, isOpen, onClose, onModalScroll, size, title, }: Props): JSX.Element;
82
+ ({ children, className, classNames, dismissible, isOpen, onClose, onModalScroll, size, title, }: Props): JSX.Element;
69
83
  storyName: string;
70
84
  };
71
85
  export declare const RegularModalStory: {
@@ -76,6 +90,10 @@ export declare const BottomModalStory: {
76
90
  ({ children, isOpen, onClose, title, }: Props): JSX.Element;
77
91
  storyName: string;
78
92
  };
93
+ export declare const FullScreenModalStory: {
94
+ ({ children, isOpen, onClose, title, }: Props): JSX.Element;
95
+ storyName: string;
96
+ };
79
97
  export declare const NonDismissibleModal: ({ children, isOpen, onClose, title, }: Props) => JSX.Element;
80
98
  export declare const ModalWithFooter: ({ children, isOpen, onClose, title, }: Props) => JSX.Element;
81
99
  export declare const ModalWithFooterAndScroll: ({ children, isOpen, onClose, title, }: Props) => JSX.Element;
@@ -1,3 +1,3 @@
1
1
  import { Props } from '..';
2
- declare const RegularModal: ({ className, size, ...rest }: Props) => JSX.Element;
2
+ declare const RegularModal: ({ className, classNames, size, ...rest }: Props) => JSX.Element;
3
3
  export { RegularModal };
@@ -0,0 +1 @@
1
+ export declare const useEscapeKey: (callback: () => void) => void;
@@ -0,0 +1 @@
1
+ export declare const useFocusWithin: (ref: HTMLElement | null, callback: (isFocusWithin: boolean) => void) => void;
@@ -10,7 +10,7 @@ import { CurrencyInput } from './components/input/currency';
10
10
  import { Badge } from './components/badge';
11
11
  import { Checkbox } from './components/input/checkbox';
12
12
  import { Radio } from './components/input/radio';
13
- import { BottomModal, RegularModal, BottomOrRegularModal } from './components/modal';
13
+ import { BottomModal, RegularModal, BottomOrRegularModal, FullScreenModal } from './components/modal';
14
14
  import { InfoCard, CardButton } from './components/cards';
15
15
  import { Card, CardProps } from './components/cards/card';
16
16
  import { Button } from './components/button';
@@ -27,7 +27,9 @@ import { Toaster, toast } from './components/toast';
27
27
  import { IconWrapperProps } from './components/icon/IconWrapper';
28
28
  import { Accordion, AccordionProps } from './components/accordion';
29
29
  import { Table, TableData, TableProps } from './components/table/Table';
30
+ import { useEscapeKey } from './hooks/useEscapeKey';
31
+ import { useFocusWithin } from './hooks/useFocusWithin';
30
32
  export * from './components/icon';
31
- export { Accordion, DateSelector, SignaturePad, AutocompleteAddress, Input, MultiDropzone, DownloadButton, IbanInput, BottomModal, RegularModal, BottomOrRegularModal, InfoCard, Card, CardButton, Button, CurrencyInput, AutoSuggestMultiSelect, Chip, AutoSuggestInput, ComparisonTable, TableRating, TableTrueFalse, TableRowHeader, TableButton, TableInfoButton, SegmentedControl, Checkbox, Radio, Link, InformationBox, Badge, images, illustrations, Spinner, Table, Toggle, Toaster, toast, };
33
+ export { Accordion, DateSelector, SignaturePad, AutocompleteAddress, Input, MultiDropzone, DownloadButton, IbanInput, BottomModal, RegularModal, BottomOrRegularModal, FullScreenModal, InfoCard, Card, CardButton, Button, CurrencyInput, AutoSuggestMultiSelect, Chip, AutoSuggestInput, ComparisonTable, TableRating, TableTrueFalse, TableRowHeader, TableButton, TableInfoButton, SegmentedControl, Checkbox, Radio, Link, InformationBox, Badge, images, illustrations, Spinner, Table, Toggle, Toaster, toast, useEscapeKey, useFocusWithin, };
32
34
  export type { AccordionProps, IllustrationKeys, InformationBoxProps, InputProps, FileType, MultiDropzoneProps, TableHeader, UploadedFile, UploadStatus, CardProps, IconWrapperProps, TableData, TableProps, };
33
35
  export type { DownloadStatus } from './models/download';
@@ -1,5 +1,5 @@
1
1
  import '../../tslib.es6-a39f91fc.js';
2
- export { c as customRender } from '../../customRender-d03c10b6.js';
2
+ export { c as customRender } from '../../customRender-be47569b.js';
3
3
  import 'react';
4
4
  import 'react-dom';
5
5
  import '../../_commonjsHelpers-4730bd53.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@popsure/dirty-swan",
3
- "version": "0.55.3",
3
+ "version": "0.56.1",
4
4
  "author": "Vincent Audoire <vincent@getpopsure.com>",
5
5
  "license": "MIT",
6
6
  "private": false,
@@ -33,6 +33,7 @@
33
33
  "react-autosuggest": "^10.1.0",
34
34
  "react-day-picker": "^7.4.10",
35
35
  "react-dropzone": "^14.2.2",
36
+ "react-focus-lock": "^2.13.2",
36
37
  "react-hot-toast": "^2.4.1",
37
38
  "react-scroll-sync": "^0.11.2",
38
39
  "sass": "^1.35.1",
package/src/index.tsx CHANGED
@@ -13,6 +13,7 @@ export {
13
13
  BottomModal,
14
14
  RegularModal,
15
15
  BottomOrRegularModal,
16
+ FullScreenModal,
16
17
  InfoCard,
17
18
  CardButton,
18
19
  Card,
@@ -40,6 +41,8 @@ export {
40
41
  Toggle,
41
42
  Toaster,
42
43
  toast,
44
+ useEscapeKey,
45
+ useFocusWithin,
43
46
  } from './lib';
44
47
 
45
48
  export * from './lib/components/icon';
@@ -58,7 +61,7 @@ export type {
58
61
  CardProps,
59
62
  IconWrapperProps,
60
63
  TableData,
61
- TableProps
64
+ TableProps,
62
65
  } from './lib';
63
66
 
64
67
  ReactDOM.render(<App />, document.getElementById('root'));
@@ -1,24 +1,28 @@
1
1
  import { Props } from '..';
2
2
  import styles from './style.module.scss';
3
- import classNames from 'classnames';
3
+ import classNamesUtil from 'classnames';
4
4
  import { GenericModal } from '../genericModal';
5
5
 
6
- const BottomModal = ({ className, ...rest }: Props) => (
6
+ const BottomModal = ({ className, classNames, ...rest }: Props) => (
7
7
  <GenericModal
8
- titleSize='small'
8
+ titleSize="small"
9
9
  classNames={{
10
- wrapper: classNames('w100', styles.wrapper),
11
- container: ({ isClosing }) => classNames(
12
- 'bg-white d-flex fd-column w100',
13
- className,
14
- styles.container, {
15
- [styles.containerClose]: isClosing,
16
- }
17
- ),
18
- body: styles.body,
10
+ ...classNames,
11
+ wrapper: classNamesUtil('w100', styles.wrapper, classNames?.wrapper),
12
+ container: ({ isClosing }) =>
13
+ classNamesUtil(
14
+ 'bg-white d-flex fd-column w100',
15
+ className,
16
+ styles.container,
17
+ classNames?.container,
18
+ {
19
+ [styles.containerClose]: isClosing,
20
+ }
21
+ ),
22
+ body: classNamesUtil(styles.body, classNames?.body),
19
23
  }}
20
24
  {...rest}
21
25
  />
22
26
  );
23
27
 
24
- export { BottomModal };
28
+ export { BottomModal };
@@ -0,0 +1,28 @@
1
+ import { Props } from '..';
2
+ import styles from './style.module.scss';
3
+ import classNamesUtil from 'classnames';
4
+ import { GenericModal } from '../genericModal';
5
+
6
+ const FullScreenModal = ({ className, classNames, ...rest }: Props) => (
7
+ <GenericModal
8
+ titleSize="small"
9
+ classNames={{
10
+ ...classNames,
11
+ wrapper: classNamesUtil(classNames?.wrapper, 'w100'),
12
+ container: ({ isClosing }) =>
13
+ classNamesUtil(
14
+ 'bg-white d-flex fd-column w100',
15
+ className,
16
+ styles.container,
17
+ classNames?.container,
18
+ {
19
+ [styles.containerClose]: isClosing,
20
+ }
21
+ ),
22
+ body: classNamesUtil(styles.body, classNames?.body),
23
+ }}
24
+ {...rest}
25
+ />
26
+ );
27
+
28
+ export { FullScreenModal };
@@ -0,0 +1,49 @@
1
+ @use '../../../scss/public/grid' as *;
2
+ @use '../../../scss/public/colors' as *;
3
+
4
+ @keyframes appear-in {
5
+ 0% {
6
+ opacity: 0;
7
+ visibility: hidden;
8
+ }
9
+ 100% {
10
+ opacity: 1;
11
+ visibility: visible;
12
+ }
13
+ }
14
+
15
+ @keyframes disappear-out {
16
+ 0% {
17
+ opacity: 1;
18
+ visibility: visible;
19
+ }
20
+ 100% {
21
+ opacity: 0;
22
+ visibility: hidden;
23
+ }
24
+ }
25
+ .container {
26
+ max-height: 100vh;
27
+ top: 0;
28
+ bottom: 0;
29
+ position: fixed;
30
+
31
+ animation-name: appear-in;
32
+ animation-duration: 0.4s;
33
+ animation-fill-mode: both;
34
+ animation-timing-function: ease-out;
35
+
36
+ &Close {
37
+ animation-name: disappear-out;
38
+ animation-duration: 0.4s;
39
+ animation-delay: 0s;
40
+ animation-fill-mode: both;
41
+ animation-timing-function: ease-out;
42
+ }
43
+ }
44
+
45
+ .body {
46
+ @include p-size-mobile {
47
+ padding-bottom: 48px;
48
+ }
49
+ }