@cruk/cruk-react-components 3.5.1 → 4.0.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 (120) hide show
  1. package/lib/components/AddressLookup/AddressLookup.stories.d.ts +2 -2
  2. package/lib/components/AddressLookup/index.d.ts +2 -2
  3. package/lib/components/AllThemesWrapper.d.ts +3 -3
  4. package/lib/components/Avatar/Avatar.stories.d.ts +2 -1
  5. package/lib/components/Avatar/index.d.ts +2 -2
  6. package/lib/components/Badge/Badge.stories.d.ts +2 -1
  7. package/lib/components/Badge/index.d.ts +2 -2
  8. package/lib/components/Button/Button.stories.d.ts +2 -2
  9. package/lib/components/Button/index.d.ts +2 -2
  10. package/lib/components/Carousel/Carousel.stories.d.ts +2 -2
  11. package/lib/components/Carousel/Dots.d.ts +4 -4
  12. package/lib/components/Carousel/index.d.ts +2 -2
  13. package/lib/components/Checkbox/Checkbox.stories.d.ts +2 -2
  14. package/lib/components/Checkbox/index.d.ts +2 -2
  15. package/lib/components/Collapse/Collapse.stories.d.ts +2 -1
  16. package/lib/components/Collapse/styles.d.ts +3 -3
  17. package/lib/components/DateField/DateField.stories.d.ts +2 -1
  18. package/lib/components/DateField/index.d.ts +2 -2
  19. package/lib/components/DateField/styles.d.ts +1 -0
  20. package/lib/components/Divider.d.ts +2 -2
  21. package/lib/components/Footer/Footer.stories.d.ts +3 -2
  22. package/lib/components/Footer/index.d.ts +2 -2
  23. package/lib/components/Header/Header.stories.d.ts +3 -2
  24. package/lib/components/Header/index.d.ts +2 -2
  25. package/lib/components/Heading/Heading.stories.d.ts +2 -1
  26. package/lib/components/Heading/index.d.ts +2 -2
  27. package/lib/components/IconFa/IconFa.stories.d.ts +2 -1
  28. package/lib/components/IconFa/index.d.ts +2 -1
  29. package/lib/components/InfoBox/InfoBox.stories.d.ts +1 -1
  30. package/lib/components/LabelWrapper/index.d.ts +2 -2
  31. package/lib/components/LabelWrapper/styles.d.ts +6 -1
  32. package/lib/components/LegendWrapper/LegendWrapper.stories.d.ts +2 -1
  33. package/lib/components/LegendWrapper/index.d.ts +2 -2
  34. package/lib/components/Link/Link.stories.d.ts +2 -2
  35. package/lib/components/Link/index.d.ts +2 -2
  36. package/lib/components/Link/styles.d.ts +3 -6
  37. package/lib/components/Loader/Loader.stories.d.ts +2 -1
  38. package/lib/components/Loader/index.d.ts +2 -1
  39. package/lib/components/Modal/Modal.stories.d.ts +2 -3
  40. package/lib/components/Modal/index.d.ts +2 -2
  41. package/lib/components/Modal/styles.d.ts +2 -2
  42. package/lib/components/Pagination/Pagination.stories.d.ts +2 -1
  43. package/lib/components/Pagination/index.d.ts +2 -2
  44. package/lib/components/PopOver/Popover.stories.d.ts +4 -3
  45. package/lib/components/PopOver/index.d.ts +2 -2
  46. package/lib/components/ProgressBar/ProgressBar.stories.d.ts +2 -1
  47. package/lib/components/ProgressBar/index.d.ts +2 -2
  48. package/lib/components/Radio/Radio.stories.d.ts +2 -2
  49. package/lib/components/Radio/index.d.ts +2 -2
  50. package/lib/components/RadioConsent/styles.d.ts +3 -3
  51. package/lib/components/Text/index.d.ts +3 -1
  52. package/lib/components/Text/styles.d.ts +2 -0
  53. package/lib/components/Totaliser/Totaliser.stories.d.ts +2 -1
  54. package/lib/components/Totaliser/index.d.ts +2 -2
  55. package/lib/components/Totaliser/styles.d.ts +1 -1
  56. package/lib/components/UserBlock/UserBlock.stories.d.ts +2 -1
  57. package/lib/components/UserBlock/index.d.ts +2 -2
  58. package/lib/es/node_modules/@babel/runtime/helpers/esm/typeof.js.map +1 -1
  59. package/lib/es/node_modules/@fortawesome/free-solid-svg-icons/index.mjs.js +1 -1
  60. package/lib/es/node_modules/@fortawesome/free-solid-svg-icons/index.mjs.js.map +1 -1
  61. package/lib/es/node_modules/focus-lock/dist/es2015/commands.js +2 -0
  62. package/lib/es/node_modules/focus-lock/dist/es2015/commands.js.map +1 -0
  63. package/lib/es/node_modules/focus-lock/dist/es2015/focusInside.js.map +1 -1
  64. package/lib/es/node_modules/focus-lock/dist/es2015/focusIsHidden.js.map +1 -1
  65. package/lib/es/node_modules/focus-lock/dist/es2015/focusSolver.js +2 -0
  66. package/lib/es/node_modules/focus-lock/dist/es2015/focusSolver.js.map +1 -0
  67. package/lib/es/node_modules/focus-lock/dist/es2015/focusables.js +1 -1
  68. package/lib/es/node_modules/focus-lock/dist/es2015/focusables.js.map +1 -1
  69. package/lib/es/node_modules/focus-lock/dist/es2015/moveFocusInside.js +2 -0
  70. package/lib/es/node_modules/focus-lock/dist/es2015/moveFocusInside.js.map +1 -0
  71. package/lib/es/node_modules/focus-lock/dist/es2015/utils/DOMutils.js +1 -1
  72. package/lib/es/node_modules/focus-lock/dist/es2015/utils/DOMutils.js.map +1 -1
  73. package/lib/es/node_modules/focus-lock/dist/es2015/utils/all-affected.js.map +1 -1
  74. package/lib/es/node_modules/focus-lock/dist/es2015/utils/getActiveElement.js.map +1 -1
  75. package/lib/es/node_modules/react-focus-lock/dist/es2015/Trap.js +1 -1
  76. package/lib/es/node_modules/react-focus-lock/dist/es2015/Trap.js.map +1 -1
  77. package/lib/es/node_modules/react-focus-lock/dist/es2015/util.js +1 -1
  78. package/lib/es/node_modules/react-focus-lock/dist/es2015/util.js.map +1 -1
  79. package/lib/es/node_modules/react-intersection-observer/index.mjs.js.map +1 -1
  80. package/lib/es/node_modules/use-callback-ref/dist/es2015/useRef.js.map +1 -1
  81. package/lib/es/src/components/Avatar/styles.js +1 -1
  82. package/lib/es/src/components/Button/styles.js +1 -1
  83. package/lib/es/src/components/Checkbox/index.js +1 -1
  84. package/lib/es/src/components/Checkbox/styles.js +1 -1
  85. package/lib/es/src/components/DateField/index.js +1 -1
  86. package/lib/es/src/components/DateField/styles.js +1 -1
  87. package/lib/es/src/components/Fontface.js +1 -1
  88. package/lib/es/src/components/Footer/styles.js +1 -1
  89. package/lib/es/src/components/GlobalStyle.js +1 -1
  90. package/lib/es/src/components/Header/styles.js +1 -1
  91. package/lib/es/src/components/Heading/styles.js +1 -1
  92. package/lib/es/src/components/LabelWrapper/index.js +1 -1
  93. package/lib/es/src/components/LabelWrapper/styles.js +1 -1
  94. package/lib/es/src/components/LegendWrapper/styles.js +1 -1
  95. package/lib/es/src/components/Link/index.js +1 -1
  96. package/lib/es/src/components/Link/styles.js +1 -1
  97. package/lib/es/src/components/Modal/styles.js +1 -1
  98. package/lib/es/src/components/ProgressBar/styles.js +1 -1
  99. package/lib/es/src/components/Radio/styles.js +1 -1
  100. package/lib/es/src/components/RadioConsent/styles.js +1 -1
  101. package/lib/es/src/components/Select/styles.js +1 -1
  102. package/lib/es/src/components/Step/styles.js +1 -1
  103. package/lib/es/src/components/Text/styles.js +1 -1
  104. package/lib/es/src/components/TextAreaField/styles.js +1 -1
  105. package/lib/es/src/components/TextField/styles.js +1 -1
  106. package/lib/es/src/components/UserBlock/index.js +1 -1
  107. package/lib/es/src/themes/bowelbabe.js +1 -1
  108. package/lib/es/src/themes/cruk.js +1 -1
  109. package/lib/es/src/themes/su2c.js +1 -1
  110. package/lib/types.d.ts +22 -8
  111. package/package.json +18 -24
  112. package/lib/docs/Docs.d.ts +0 -2
  113. package/lib/docs/index.d.ts +0 -1
  114. package/lib/es/node_modules/focus-lock/dist/es2015/focusMerge.js +0 -2
  115. package/lib/es/node_modules/focus-lock/dist/es2015/focusMerge.js.map +0 -1
  116. package/lib/es/node_modules/focus-lock/dist/es2015/index.js +0 -2
  117. package/lib/es/node_modules/focus-lock/dist/es2015/index.js.map +0 -1
  118. package/lib/es/node_modules/focus-lock/dist/es2015/setFocus.js +0 -2
  119. package/lib/es/node_modules/focus-lock/dist/es2015/setFocus.js.map +0 -1
  120. package/lib/hocs/MdxProvider.d.ts +0 -6
@@ -0,0 +1,2 @@
1
+ var n=function(n,o){"focus"in n&&n.focus(o),"contentWindow"in n&&n.contentWindow&&n.contentWindow.focus()};export{n as focusOn};
2
+ //# sourceMappingURL=commands.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commands.js","sources":["../../../../../../node_modules/focus-lock/dist/es2015/commands.js"],"sourcesContent":["export var focusOn = function (target, focusOptions) {\n if ('focus' in target) {\n target.focus(focusOptions);\n }\n if ('contentWindow' in target && target.contentWindow) {\n target.contentWindow.focus();\n }\n};\n"],"names":["focusOn","target","focusOptions","focus","contentWindow"],"mappings":"AAAU,IAACA,EAAU,SAAUC,EAAQC,GAC/B,UAAWD,GACXA,EAAOE,MAAMD,GAEb,kBAAmBD,GAAUA,EAAOG,eACpCH,EAAOG,cAAcD,OAE7B"}
@@ -1 +1 @@
1
- {"version":3,"file":"focusInside.js","sources":["../../../../../../node_modules/focus-lock/dist/es2015/focusInside.js"],"sourcesContent":["import { contains } from './utils/DOMutils';\nimport { getAllAffectedNodes } from './utils/all-affected';\nimport { getFirst, toArray } from './utils/array';\nimport { getActiveElement } from './utils/getActiveElement';\nvar focusInFrame = function (frame, activeElement) { return frame === activeElement; };\nvar focusInsideIframe = function (topNode, activeElement) {\n return Boolean(toArray(topNode.querySelectorAll('iframe')).some(function (node) { return focusInFrame(node, activeElement); }));\n};\n/**\n * @returns {Boolean} true, if the current focus is inside given node or nodes\n */\nexport var focusInside = function (topNode, activeElement) {\n // const activeElement = document && getActiveElement();\n if (activeElement === void 0) { activeElement = getActiveElement(getFirst(topNode).ownerDocument); }\n if (!activeElement || (activeElement.dataset && activeElement.dataset.focusGuard)) {\n return false;\n }\n return getAllAffectedNodes(topNode).some(function (node) {\n return contains(node, activeElement) || focusInsideIframe(node, activeElement);\n });\n};\n"],"names":["focusInside","topNode","activeElement","getActiveElement","getFirst","ownerDocument","dataset","focusGuard","getAllAffectedNodes","some","node","contains","Boolean","toArray","querySelectorAll","frame","focusInFrame","focusInsideIframe"],"mappings":"qOAIA,IAOWA,EAAc,SAAUC,EAASC,GAGxC,YADsB,IAAlBA,IAA4BA,EAAgBC,EAAiBC,EAASH,GAASI,mBAC9EH,GAAkBA,EAAcI,SAAWJ,EAAcI,QAAQC,aAG/DC,EAAoBP,GAASQ,MAAK,SAAUC,GAC/C,OAAOC,EAASD,EAAMR,IAbN,SAAUD,EAASC,GACvC,OAAOU,QAAQC,EAAQZ,EAAQa,iBAAiB,WAAWL,MAAK,SAAUC,GAAQ,OAFnE,SAAUK,EAAOb,GAAiB,OAAOa,IAAUb,EAEuBc,CAAaN,EAAMR,EAAiB,IACjI,CAWgDe,CAAkBP,EAAMR,EACxE,GACA"}
1
+ {"version":3,"file":"focusInside.js","sources":["../../../../../../node_modules/focus-lock/dist/es2015/focusInside.js"],"sourcesContent":["import { contains } from './utils/DOMutils';\nimport { getAllAffectedNodes } from './utils/all-affected';\nimport { getFirst, toArray } from './utils/array';\nimport { getActiveElement } from './utils/getActiveElement';\nvar focusInFrame = function (frame, activeElement) { return frame === activeElement; };\nvar focusInsideIframe = function (topNode, activeElement) {\n return Boolean(toArray(topNode.querySelectorAll('iframe')).some(function (node) { return focusInFrame(node, activeElement); }));\n};\n/**\n * @returns {Boolean} true, if the current focus is inside given node or nodes.\n * Supports nodes hidden inside shadowDom\n */\nexport var focusInside = function (topNode, activeElement) {\n // const activeElement = document && getActiveElement();\n if (activeElement === void 0) { activeElement = getActiveElement(getFirst(topNode).ownerDocument); }\n if (!activeElement || (activeElement.dataset && activeElement.dataset.focusGuard)) {\n return false;\n }\n return getAllAffectedNodes(topNode).some(function (node) {\n return contains(node, activeElement) || focusInsideIframe(node, activeElement);\n });\n};\n"],"names":["focusInside","topNode","activeElement","getActiveElement","getFirst","ownerDocument","dataset","focusGuard","getAllAffectedNodes","some","node","contains","Boolean","toArray","querySelectorAll","frame","focusInFrame","focusInsideIframe"],"mappings":"qOAIA,IAQWA,EAAc,SAAUC,EAASC,GAGxC,YADsB,IAAlBA,IAA4BA,EAAgBC,EAAiBC,EAASH,GAASI,mBAC9EH,GAAkBA,EAAcI,SAAWJ,EAAcI,QAAQC,aAG/DC,EAAoBP,GAASQ,MAAK,SAAUC,GAC/C,OAAOC,EAASD,EAAMR,IAdN,SAAUD,EAASC,GACvC,OAAOU,QAAQC,EAAQZ,EAAQa,iBAAiB,WAAWL,MAAK,SAAUC,GAAQ,OAFnE,SAAUK,EAAOb,GAAiB,OAAOa,IAAUb,EAEuBc,CAAaN,EAAMR,EAAiB,IACjI,CAYgDe,CAAkBP,EAAMR,EACxE,GACA"}
@@ -1 +1 @@
1
- {"version":3,"file":"focusIsHidden.js","sources":["../../../../../../node_modules/focus-lock/dist/es2015/focusIsHidden.js"],"sourcesContent":["import { FOCUS_ALLOW } from './constants';\nimport { contains } from './utils/DOMutils';\nimport { toArray } from './utils/array';\nimport { getActiveElement } from './utils/getActiveElement';\n/**\n * focus is hidden FROM the focus-lock\n * ie contained inside a node focus-lock shall ignore\n * @returns {boolean} focus is currently is in \"allow\" area\n */\nexport var focusIsHidden = function (inDocument) {\n if (inDocument === void 0) { inDocument = document; }\n var activeElement = getActiveElement(inDocument);\n if (!activeElement) {\n return false;\n }\n // this does not support setting FOCUS_ALLOW within shadow dom\n return toArray(inDocument.querySelectorAll(\"[\".concat(FOCUS_ALLOW, \"]\"))).some(function (node) { return contains(node, activeElement); });\n};\n"],"names":["focusIsHidden","inDocument","document","activeElement","getActiveElement","toArray","querySelectorAll","concat","FOCUS_ALLOW","some","node","contains"],"mappings":"sMASU,IAACA,EAAgB,SAAUC,QACd,IAAfA,IAAyBA,EAAaC,UAC1C,IAAIC,EAAgBC,EAAiBH,GACrC,QAAKE,GAIEE,EAAQJ,EAAWK,iBAAiB,IAAIC,OAAOC,EAAa,OAAOC,MAAK,SAAUC,GAAQ,OAAOC,EAASD,EAAMP,EAAe,GAC1I"}
1
+ {"version":3,"file":"focusIsHidden.js","sources":["../../../../../../node_modules/focus-lock/dist/es2015/focusIsHidden.js"],"sourcesContent":["import { FOCUS_ALLOW } from './constants';\nimport { contains } from './utils/DOMutils';\nimport { toArray } from './utils/array';\nimport { getActiveElement } from './utils/getActiveElement';\n/**\n * checks if focus is hidden FROM the focus-lock\n * ie contained inside a node focus-lock shall ignore\n *\n * This is a utility function coupled with {@link FOCUS_ALLOW} constant\n *\n * @returns {boolean} focus is currently is in \"allow\" area\n */\nexport var focusIsHidden = function (inDocument) {\n if (inDocument === void 0) { inDocument = document; }\n var activeElement = getActiveElement(inDocument);\n if (!activeElement) {\n return false;\n }\n // this does not support setting FOCUS_ALLOW within shadow dom\n return toArray(inDocument.querySelectorAll(\"[\".concat(FOCUS_ALLOW, \"]\"))).some(function (node) { return contains(node, activeElement); });\n};\n"],"names":["focusIsHidden","inDocument","document","activeElement","getActiveElement","toArray","querySelectorAll","concat","FOCUS_ALLOW","some","node","contains"],"mappings":"sMAYU,IAACA,EAAgB,SAAUC,QACd,IAAfA,IAAyBA,EAAaC,UAC1C,IAAIC,EAAgBC,EAAiBH,GACrC,QAAKE,GAIEE,EAAQJ,EAAWK,iBAAiB,IAAIC,OAAOC,EAAa,OAAOC,MAAK,SAAUC,GAAQ,OAAOC,EAASD,EAAMP,EAAe,GAC1I"}
@@ -0,0 +1,2 @@
1
+ import{newFocus as o,NEW_FOCUS as t}from"./solver.js";import{getFocusableNodes as r,getTabbableNodes as n}from"./utils/DOMutils.js";import{getAllAffectedNodes as e}from"./utils/all-affected.js";import{asArray as i,getFirst as u}from"./utils/array.js";import{pickAutofocus as f}from"./utils/auto-focus.js";import{getActiveElement as m}from"./utils/getActiveElement.js";import{isNotAGuard as s,isDefined as a}from"./utils/is.js";import{getTopCommonParent as l,allParentAutofocusables as c}from"./utils/parenting.js";var p=function(p,d){var v=m(i(p).length>0?document:u(p).ownerDocument),j=e(p).filter(s),g=l(v||p,p,j),w=new Map,M=r(j,w),h=n(j,w).filter((function(o){var t=o.node;return s(t)}));if(h[0]||(h=M)[0]){var y,D,E,k=r([g],w).map((function(o){return o.node})),x=(y=k,D=h,E=new Map,D.forEach((function(o){return E.set(o.node,o)})),y.map((function(o){return E.get(o)})).filter(a)),A=x.map((function(o){return o.node})),O=o(A,k,v,d);if(O===t){var b=f(M,A,c(j,w));return b?{node:b}:void console.warn("focus-lock: cannot find any node to move focus into")}return void 0===O?O:x[O]}};export{p as focusSolver};
2
+ //# sourceMappingURL=focusSolver.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"focusSolver.js","sources":["../../../../../../node_modules/focus-lock/dist/es2015/focusSolver.js"],"sourcesContent":["import { NEW_FOCUS, newFocus } from './solver';\nimport { getFocusableNodes, getTabbableNodes } from './utils/DOMutils';\nimport { getAllAffectedNodes } from './utils/all-affected';\nimport { asArray, getFirst } from './utils/array';\nimport { pickAutofocus } from './utils/auto-focus';\nimport { getActiveElement } from './utils/getActiveElement';\nimport { isDefined, isNotAGuard } from './utils/is';\nimport { allParentAutofocusables, getTopCommonParent } from './utils/parenting';\nvar reorderNodes = function (srcNodes, dstNodes) {\n var remap = new Map();\n // no Set(dstNodes) for IE11 :(\n dstNodes.forEach(function (entity) { return remap.set(entity.node, entity); });\n // remap to dstNodes\n return srcNodes.map(function (node) { return remap.get(node); }).filter(isDefined);\n};\n/**\n * contains the main logic of the `focus-lock` package.\n *\n * ! you probably dont need this function !\n *\n * given top node(s) and the last active element returns the element to be focused next\n * @returns element which should be focused to move focus inside\n * @param topNode\n * @param lastNode\n */\nexport var focusSolver = function (topNode, lastNode) {\n var activeElement = getActiveElement(asArray(topNode).length > 0 ? document : getFirst(topNode).ownerDocument);\n var entries = getAllAffectedNodes(topNode).filter(isNotAGuard);\n var commonParent = getTopCommonParent(activeElement || topNode, topNode, entries);\n var visibilityCache = new Map();\n var anyFocusable = getFocusableNodes(entries, visibilityCache);\n var innerElements = getTabbableNodes(entries, visibilityCache).filter(function (_a) {\n var node = _a.node;\n return isNotAGuard(node);\n });\n if (!innerElements[0]) {\n innerElements = anyFocusable;\n if (!innerElements[0]) {\n return undefined;\n }\n }\n var outerNodes = getFocusableNodes([commonParent], visibilityCache).map(function (_a) {\n var node = _a.node;\n return node;\n });\n var orderedInnerElements = reorderNodes(outerNodes, innerElements);\n var innerNodes = orderedInnerElements.map(function (_a) {\n var node = _a.node;\n return node;\n });\n var newId = newFocus(innerNodes, outerNodes, activeElement, lastNode);\n if (newId === NEW_FOCUS) {\n var focusNode = pickAutofocus(anyFocusable, innerNodes, allParentAutofocusables(entries, visibilityCache));\n if (focusNode) {\n return { node: focusNode };\n }\n else {\n console.warn('focus-lock: cannot find any node to move focus into');\n return undefined;\n }\n }\n if (newId === undefined) {\n return newId;\n }\n return orderedInnerElements[newId];\n};\n"],"names":["focusSolver","topNode","lastNode","activeElement","getActiveElement","asArray","length","document","getFirst","ownerDocument","entries","getAllAffectedNodes","filter","isNotAGuard","commonParent","getTopCommonParent","visibilityCache","Map","anyFocusable","getFocusableNodes","innerElements","getTabbableNodes","_a","node","srcNodes","dstNodes","remap","outerNodes","map","orderedInnerElements","forEach","entity","set","get","isDefined","innerNodes","newId","newFocus","NEW_FOCUS","focusNode","pickAutofocus","allParentAutofocusables","console","warn","undefined"],"mappings":"kgBAQA,IAiBWA,EAAc,SAAUC,EAASC,GACxC,IAAIC,EAAgBC,EAAiBC,EAAQJ,GAASK,OAAS,EAAIC,SAAWC,EAASP,GAASQ,eAC5FC,EAAUC,EAAoBV,GAASW,OAAOC,GAC9CC,EAAeC,EAAmBZ,GAAiBF,EAASA,EAASS,GACrEM,EAAkB,IAAIC,IACtBC,EAAeC,EAAkBT,EAASM,GAC1CI,EAAgBC,EAAiBX,EAASM,GAAiBJ,QAAO,SAAUU,GAC5E,IAAIC,EAAOD,EAAGC,KACd,OAAOV,EAAYU,EAC3B,IACI,GAAKH,EAAc,KACfA,EAAgBF,GACG,GAFvB,CAMA,IAjCyBM,EAAUC,EAC/BC,EAgCAC,EAAaR,EAAkB,CAACL,GAAeE,GAAiBY,KAAI,SAAUN,GAE9E,OADWA,EAAGC,IAEtB,IACQM,GArCqBL,EAqCeG,EArCLF,EAqCiBL,EApChDM,EAAQ,IAAIT,IAEhBQ,EAASK,SAAQ,SAAUC,GAAU,OAAOL,EAAMM,IAAID,EAAOR,KAAMQ,EAAU,IAEtEP,EAASI,KAAI,SAAUL,GAAQ,OAAOG,EAAMO,IAAIV,EAAQ,IAAEX,OAAOsB,IAiCpEC,EAAaN,EAAqBD,KAAI,SAAUN,GAEhD,OADWA,EAAGC,IAEtB,IACQa,EAAQC,EAASF,EAAYR,EAAYxB,EAAeD,GAC5D,GAAIkC,IAAUE,EAAW,CACrB,IAAIC,EAAYC,EAActB,EAAciB,EAAYM,EAAwB/B,EAASM,IACzF,OAAIuB,EACO,CAAEhB,KAAMgB,QAGfG,QAAQC,KAAK,sDAGpB,CACD,YAAcC,IAAVR,EACOA,EAEJP,EAAqBO,EAxB3B,CAyBL"}
@@ -1,2 +1,2 @@
1
- import{getTabbableNodes as r}from"./utils/DOMutils.js";import{getAllAffectedNodes as t}from"./utils/all-affected.js";import{isNotAGuard as n,isGuard as i}from"./utils/is.js";import{getTopCommonParent as e}from"./utils/parenting.js";var o=function(o){var u=t(o).filter(n),f=e(o,o,u),a=new Map,m=r([f],a,!0),l=r(u,a).filter((function(r){var t=r.node;return n(t)})).map((function(r){return r.node}));return m.map((function(r){var t=r.node;return{node:t,index:r.index,lockItem:l.indexOf(t)>=0,guard:i(t)}}))};export{o as getFocusabledIn};
1
+ import{getTabbableNodes as r}from"./utils/DOMutils.js";import{getAllAffectedNodes as t}from"./utils/all-affected.js";import{isNotAGuard as n,isGuard as i}from"./utils/is.js";import{getTopCommonParent as e}from"./utils/parenting.js";var o=function(o){var u=t(o).filter(n),f=e(o,o,u),a=new Map,m=r([f],a,!0),l=r(u,a).filter((function(r){var t=r.node;return n(t)})).map((function(r){return r.node}));return m.map((function(r){var t=r.node;return{node:t,index:r.index,lockItem:l.indexOf(t)>=0,guard:i(t)}}))};export{o as expandFocusableNodes};
2
2
  //# sourceMappingURL=focusables.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"focusables.js","sources":["../../../../../../node_modules/focus-lock/dist/es2015/focusables.js"],"sourcesContent":["import { getTabbableNodes } from './utils/DOMutils';\nimport { getAllAffectedNodes } from './utils/all-affected';\nimport { isGuard, isNotAGuard } from './utils/is';\nimport { getTopCommonParent } from './utils/parenting';\n/**\n * return list of focusable elements inside a given top node\n * @deprecated use {@link getFocusableIn}. Yep, there is typo in the function name\n */\nexport var getFocusabledIn = function (topNode) {\n var entries = getAllAffectedNodes(topNode).filter(isNotAGuard);\n var commonParent = getTopCommonParent(topNode, topNode, entries);\n var visibilityCache = new Map();\n var outerNodes = getTabbableNodes([commonParent], visibilityCache, true);\n var innerElements = getTabbableNodes(entries, visibilityCache)\n .filter(function (_a) {\n var node = _a.node;\n return isNotAGuard(node);\n })\n .map(function (_a) {\n var node = _a.node;\n return node;\n });\n return outerNodes.map(function (_a) {\n var node = _a.node, index = _a.index;\n return ({\n node: node,\n index: index,\n lockItem: innerElements.indexOf(node) >= 0,\n guard: isGuard(node),\n });\n });\n};\n/**\n * return list of focusable elements inside a given top node\n */\nexport var getFocusableIn = getFocusabledIn;\n"],"names":["getFocusabledIn","topNode","entries","getAllAffectedNodes","filter","isNotAGuard","commonParent","getTopCommonParent","visibilityCache","Map","outerNodes","getTabbableNodes","innerElements","_a","node","map","index","lockItem","indexOf","guard","isGuard"],"mappings":"wOAQU,IAACA,EAAkB,SAAUC,GACnC,IAAIC,EAAUC,EAAoBF,GAASG,OAAOC,GAC9CC,EAAeC,EAAmBN,EAASA,EAASC,GACpDM,EAAkB,IAAIC,IACtBC,EAAaC,EAAiB,CAACL,GAAeE,GAAiB,GAC/DI,EAAgBD,EAAiBT,EAASM,GACzCJ,QAAO,SAAUS,GAClB,IAAIC,EAAOD,EAAGC,KACd,OAAOT,EAAYS,EAC3B,IACSC,KAAI,SAAUF,GAEf,OADWA,EAAGC,IAEtB,IACI,OAAOJ,EAAWK,KAAI,SAAUF,GAC5B,IAAIC,EAAOD,EAAGC,KACd,MAAQ,CACJA,KAAMA,EACNE,MAHwBH,EAAGG,MAI3BC,SAAUL,EAAcM,QAAQJ,IAAS,EACzCK,MAAOC,EAAQN,GAE3B,GACA"}
1
+ {"version":3,"file":"focusables.js","sources":["../../../../../../node_modules/focus-lock/dist/es2015/focusables.js"],"sourcesContent":["import { getTabbableNodes } from './utils/DOMutils';\nimport { getAllAffectedNodes } from './utils/all-affected';\nimport { isGuard, isNotAGuard } from './utils/is';\nimport { getTopCommonParent } from './utils/parenting';\n/**\n * @returns list of focusable elements inside a given top node\n * @see {@link getFocusableNodes} for lower level access\n */\nexport var expandFocusableNodes = function (topNode) {\n var entries = getAllAffectedNodes(topNode).filter(isNotAGuard);\n var commonParent = getTopCommonParent(topNode, topNode, entries);\n var visibilityCache = new Map();\n var outerNodes = getTabbableNodes([commonParent], visibilityCache, true);\n var innerElements = getTabbableNodes(entries, visibilityCache)\n .filter(function (_a) {\n var node = _a.node;\n return isNotAGuard(node);\n })\n .map(function (_a) {\n var node = _a.node;\n return node;\n });\n return outerNodes.map(function (_a) {\n var node = _a.node, index = _a.index;\n return ({\n node: node,\n index: index,\n lockItem: innerElements.indexOf(node) >= 0,\n guard: isGuard(node),\n });\n });\n};\n"],"names":["expandFocusableNodes","topNode","entries","getAllAffectedNodes","filter","isNotAGuard","commonParent","getTopCommonParent","visibilityCache","Map","outerNodes","getTabbableNodes","innerElements","_a","node","map","index","lockItem","indexOf","guard","isGuard"],"mappings":"wOAQU,IAACA,EAAuB,SAAUC,GACxC,IAAIC,EAAUC,EAAoBF,GAASG,OAAOC,GAC9CC,EAAeC,EAAmBN,EAASA,EAASC,GACpDM,EAAkB,IAAIC,IACtBC,EAAaC,EAAiB,CAACL,GAAeE,GAAiB,GAC/DI,EAAgBD,EAAiBT,EAASM,GACzCJ,QAAO,SAAUS,GAClB,IAAIC,EAAOD,EAAGC,KACd,OAAOT,EAAYS,EAC3B,IACSC,KAAI,SAAUF,GAEf,OADWA,EAAGC,IAEtB,IACI,OAAOJ,EAAWK,KAAI,SAAUF,GAC5B,IAAIC,EAAOD,EAAGC,KACd,MAAQ,CACJA,KAAMA,EACNE,MAHwBH,EAAGG,MAI3BC,SAAUL,EAAcM,QAAQJ,IAAS,EACzCK,MAAOC,EAAQN,GAE3B,GACA"}
@@ -0,0 +1,2 @@
1
+ import{focusOn as o}from"./commands.js";import{focusSolver as e}from"./focusSolver.js";var t=0,c=!1,s=function(s,i,n){void 0===n&&(n={});var f=e(s,i);if(!c&&f){if(t>2)return console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),c=!0,void setTimeout((function(){c=!1}),1);t++,o(f.node,n.focusOptions),t--}};export{s as moveFocusInside};
2
+ //# sourceMappingURL=moveFocusInside.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"moveFocusInside.js","sources":["../../../../../../node_modules/focus-lock/dist/es2015/moveFocusInside.js"],"sourcesContent":["import { focusOn } from './commands';\nimport { focusSolver } from './focusSolver';\nvar guardCount = 0;\nvar lockDisabled = false;\n/**\n * The main functionality of the focus-lock package\n *\n * Contains focus at a given node.\n * The last focused element will help to determine which element(first or last) should be focused.\n * The found element will be focused.\n *\n * This is one time action (move), not a persistent focus-lock\n *\n * HTML markers (see {@link import('./constants').FOCUS_AUTO} constants) can control autofocus\n * @see {@link focusSolver} for the same functionality without autofocus\n */\nexport var moveFocusInside = function (topNode, lastNode, options) {\n if (options === void 0) { options = {}; }\n var focusable = focusSolver(topNode, lastNode);\n // global local side effect to countain recursive lock activation and resolve focus-fighting\n if (lockDisabled) {\n return;\n }\n if (focusable) {\n /** +FOCUS-FIGHTING prevention **/\n if (guardCount > 2) {\n // we have recursive entered back the lock activation\n console.error('FocusLock: focus-fighting detected. Only one focus management system could be active. ' +\n 'See https://github.com/theKashey/focus-lock/#focus-fighting');\n lockDisabled = true;\n setTimeout(function () {\n lockDisabled = false;\n }, 1);\n return;\n }\n guardCount++;\n focusOn(focusable.node, options.focusOptions);\n guardCount--;\n }\n};\n"],"names":["guardCount","lockDisabled","moveFocusInside","topNode","lastNode","options","focusable","focusSolver","console","error","setTimeout","focusOn","node","focusOptions"],"mappings":"uFAEA,IAAIA,EAAa,EACbC,GAAe,EAaRC,EAAkB,SAAUC,EAASC,EAAUC,QACtC,IAAZA,IAAsBA,EAAU,CAAE,GACtC,IAAIC,EAAYC,EAAYJ,EAASC,GAErC,IAAIH,GAGAK,EAAW,CAEX,GAAIN,EAAa,EAQb,OANAQ,QAAQC,MAAM,qJAEdR,GAAe,OACfS,YAAW,WACPT,GAAe,CAClB,GAAE,GAGPD,IACAW,EAAQL,EAAUM,KAAMP,EAAQQ,cAChCb,GACH,CACL"}
@@ -1,2 +1,2 @@
1
- import{toArray as t}from"./array.js";import{isVisibleCached as r,notHiddenInput as n,isAutoFocusAllowedCached as o}from"./is.js";import{orderByTabIndex as e}from"./tabOrder.js";import{getFocusables as i,getParentAutofocusables as u}from"./tabUtils.js";var f=function(o,e){return t(o).filter((function(t){return r(e,t)})).filter((function(t){return n(t)}))},c=function(r,n){return void 0===n&&(n=new Map),t(r).filter((function(t){return o(n,t)}))},a=function(t,r,n){return e(f(i(t,n),r),!0,n)},m=function(t,r){return e(f(i(t),r),!1)},s=function(t,r){return f(u(t),r)},l=function(r,n){return r.shadowRoot?l(r.shadowRoot,n):!(void 0===Object.getPrototypeOf(r).contains||!Object.getPrototypeOf(r).contains.call(r,n))||t(r.children).some((function(t){var r;if(t instanceof HTMLIFrameElement){var o=null===(r=t.contentDocument)||void 0===r?void 0:r.body;return!!o&&l(o,n)}return l(t,n)}))};export{l as contains,c as filterAutoFocusable,f as filterFocusable,m as getAllTabbableNodes,a as getTabbableNodes,s as parentAutofocusables};
1
+ import{toArray as t}from"./array.js";import{isVisibleCached as r,notHiddenInput as n,isAutoFocusAllowedCached as o}from"./is.js";import{orderByTabIndex as e}from"./tabOrder.js";import{getFocusables as i,getParentAutofocusables as u}from"./tabUtils.js";var f=function(o,e){return t(o).filter((function(t){return r(e,t)})).filter((function(t){return n(t)}))},c=function(r,n){return void 0===n&&(n=new Map),t(r).filter((function(t){return o(n,t)}))},a=function(t,r,n){return e(f(i(t,n),r),!0,n)},m=function(t,r){return e(f(i(t),r),!1)},s=function(t,r){return f(u(t),r)},l=function(r,n){return r.shadowRoot?l(r.shadowRoot,n):!(void 0===Object.getPrototypeOf(r).contains||!Object.getPrototypeOf(r).contains.call(r,n))||t(r.children).some((function(t){var r;if(t instanceof HTMLIFrameElement){var o=null===(r=t.contentDocument)||void 0===r?void 0:r.body;return!!o&&l(o,n)}return l(t,n)}))};export{l as contains,c as filterAutoFocusable,f as filterFocusable,m as getFocusableNodes,a as getTabbableNodes,s as parentAutofocusables};
2
2
  //# sourceMappingURL=DOMutils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DOMutils.js","sources":["../../../../../../../node_modules/focus-lock/dist/es2015/utils/DOMutils.js"],"sourcesContent":["import { toArray } from './array';\nimport { isAutoFocusAllowedCached, isVisibleCached, notHiddenInput } from './is';\nimport { orderByTabIndex } from './tabOrder';\nimport { getFocusables, getParentAutofocusables } from './tabUtils';\n/**\n * given list of focusable elements keeps the ones user can interact with\n * @param nodes\n * @param visibilityCache\n */\nexport var filterFocusable = function (nodes, visibilityCache) {\n return toArray(nodes)\n .filter(function (node) { return isVisibleCached(visibilityCache, node); })\n .filter(function (node) { return notHiddenInput(node); });\n};\nexport var filterAutoFocusable = function (nodes, cache) {\n if (cache === void 0) { cache = new Map(); }\n return toArray(nodes).filter(function (node) { return isAutoFocusAllowedCached(cache, node); });\n};\n/**\n * only tabbable ones\n * (but with guards which would be ignored)\n */\nexport var getTabbableNodes = function (topNodes, visibilityCache, withGuards) {\n return orderByTabIndex(filterFocusable(getFocusables(topNodes, withGuards), visibilityCache), true, withGuards);\n};\n/**\n * actually anything \"focusable\", not only tabbable\n * (without guards, as long as they are not expected to be focused)\n */\nexport var getAllTabbableNodes = function (topNodes, visibilityCache) {\n return orderByTabIndex(filterFocusable(getFocusables(topNodes), visibilityCache), false);\n};\n/**\n * return list of nodes which are expected to be auto-focused\n * @param topNode\n * @param visibilityCache\n */\nexport var parentAutofocusables = function (topNode, visibilityCache) {\n return filterFocusable(getParentAutofocusables(topNode), visibilityCache);\n};\n/*\n * Determines if element is contained in scope, including nested shadow DOMs\n */\nexport var contains = function (scope, element) {\n if (scope.shadowRoot) {\n return contains(scope.shadowRoot, element);\n }\n else {\n if (Object.getPrototypeOf(scope).contains !== undefined &&\n Object.getPrototypeOf(scope).contains.call(scope, element)) {\n return true;\n }\n return toArray(scope.children).some(function (child) {\n var _a;\n if (child instanceof HTMLIFrameElement) {\n var iframeBody = (_a = child.contentDocument) === null || _a === void 0 ? void 0 : _a.body;\n if (iframeBody) {\n return contains(iframeBody, element);\n }\n return false;\n }\n return contains(child, element);\n });\n }\n};\n"],"names":["filterFocusable","nodes","visibilityCache","toArray","filter","node","isVisibleCached","notHiddenInput","filterAutoFocusable","cache","Map","isAutoFocusAllowedCached","getTabbableNodes","topNodes","withGuards","orderByTabIndex","getFocusables","getAllTabbableNodes","parentAutofocusables","topNode","getParentAutofocusables","contains","scope","element","shadowRoot","undefined","Object","getPrototypeOf","call","children","some","child","_a","HTMLIFrameElement","iframeBody","contentDocument","body"],"mappings":"4PASU,IAACA,EAAkB,SAAUC,EAAOC,GAC1C,OAAOC,EAAQF,GACVG,QAAO,SAAUC,GAAQ,OAAOC,EAAgBJ,EAAiBG,MACjED,QAAO,SAAUC,GAAQ,OAAOE,EAAeF,EAAM,GAC9D,EACWG,EAAsB,SAAUP,EAAOQ,GAE9C,YADc,IAAVA,IAAoBA,EAAQ,IAAIC,KAC7BP,EAAQF,GAAOG,QAAO,SAAUC,GAAQ,OAAOM,EAAyBF,EAAOJ,EAAQ,GAClG,EAKWO,EAAmB,SAAUC,EAAUX,EAAiBY,GAC/D,OAAOC,EAAgBf,EAAgBgB,EAAcH,EAAUC,GAAaZ,IAAkB,EAAMY,EACxG,EAKWG,EAAsB,SAAUJ,EAAUX,GACjD,OAAOa,EAAgBf,EAAgBgB,EAAcH,GAAWX,IAAkB,EACtF,EAMWgB,EAAuB,SAAUC,EAASjB,GACjD,OAAOF,EAAgBoB,EAAwBD,GAAUjB,EAC7D,EAIWmB,EAAW,SAAUC,EAAOC,GACnC,OAAID,EAAME,WACCH,EAASC,EAAME,WAAYD,UAGYE,IAA1CC,OAAOC,eAAeL,GAAOD,WAC7BK,OAAOC,eAAeL,GAAOD,SAASO,KAAKN,EAAOC,KAG/CpB,EAAQmB,EAAMO,UAAUC,MAAK,SAAUC,GAC1C,IAAIC,EACJ,GAAID,aAAiBE,kBAAmB,CACpC,IAAIC,EAA8C,QAAhCF,EAAKD,EAAMI,uBAAoC,IAAPH,OAAgB,EAASA,EAAGI,KACtF,QAAIF,GACOb,EAASa,EAAYX,EAGnC,CACD,OAAOF,EAASU,EAAOR,EACnC,GAEA"}
1
+ {"version":3,"file":"DOMutils.js","sources":["../../../../../../../node_modules/focus-lock/dist/es2015/utils/DOMutils.js"],"sourcesContent":["import { toArray } from './array';\nimport { isAutoFocusAllowedCached, isVisibleCached, notHiddenInput } from './is';\nimport { orderByTabIndex } from './tabOrder';\nimport { getFocusables, getParentAutofocusables } from './tabUtils';\n/**\n * given list of focusable elements keeps the ones user can interact with\n * @param nodes\n * @param visibilityCache\n */\nexport var filterFocusable = function (nodes, visibilityCache) {\n return toArray(nodes)\n .filter(function (node) { return isVisibleCached(visibilityCache, node); })\n .filter(function (node) { return notHiddenInput(node); });\n};\nexport var filterAutoFocusable = function (nodes, cache) {\n if (cache === void 0) { cache = new Map(); }\n return toArray(nodes).filter(function (node) { return isAutoFocusAllowedCached(cache, node); });\n};\n/**\n * !__WARNING__! Low level API.\n * @returns all tabbable nodes\n *\n * @see {@link getFocusableNodes} to get any focusable element\n *\n * @param topNodes - array of top level HTMLElements to search inside\n * @param visibilityCache - an cache to store intermediate measurements. Expected to be a fresh `new Map` on every call\n */\nexport var getTabbableNodes = function (topNodes, visibilityCache, withGuards) {\n return orderByTabIndex(filterFocusable(getFocusables(topNodes, withGuards), visibilityCache), true, withGuards);\n};\n/**\n * !__WARNING__! Low level API.\n *\n * @returns anything \"focusable\", not only tabbable. The difference is in `tabIndex=-1`\n * (without guards, as long as they are not expected to be ever focused)\n *\n * @see {@link getTabbableNodes} to get only tabble nodes element\n *\n * @param topNodes - array of top level HTMLElements to search inside\n * @param visibilityCache - an cache to store intermediate measurements. Expected to be a fresh `new Map` on every call\n */\nexport var getFocusableNodes = function (topNodes, visibilityCache) {\n return orderByTabIndex(filterFocusable(getFocusables(topNodes), visibilityCache), false);\n};\n/**\n * return list of nodes which are expected to be auto-focused\n * @param topNode\n * @param visibilityCache\n */\nexport var parentAutofocusables = function (topNode, visibilityCache) {\n return filterFocusable(getParentAutofocusables(topNode), visibilityCache);\n};\n/*\n * Determines if element is contained in scope, including nested shadow DOMs\n */\nexport var contains = function (scope, element) {\n if (scope.shadowRoot) {\n return contains(scope.shadowRoot, element);\n }\n else {\n if (Object.getPrototypeOf(scope).contains !== undefined &&\n Object.getPrototypeOf(scope).contains.call(scope, element)) {\n return true;\n }\n return toArray(scope.children).some(function (child) {\n var _a;\n if (child instanceof HTMLIFrameElement) {\n var iframeBody = (_a = child.contentDocument) === null || _a === void 0 ? void 0 : _a.body;\n if (iframeBody) {\n return contains(iframeBody, element);\n }\n return false;\n }\n return contains(child, element);\n });\n }\n};\n"],"names":["filterFocusable","nodes","visibilityCache","toArray","filter","node","isVisibleCached","notHiddenInput","filterAutoFocusable","cache","Map","isAutoFocusAllowedCached","getTabbableNodes","topNodes","withGuards","orderByTabIndex","getFocusables","getFocusableNodes","parentAutofocusables","topNode","getParentAutofocusables","contains","scope","element","shadowRoot","undefined","Object","getPrototypeOf","call","children","some","child","_a","HTMLIFrameElement","iframeBody","contentDocument","body"],"mappings":"4PASU,IAACA,EAAkB,SAAUC,EAAOC,GAC1C,OAAOC,EAAQF,GACVG,QAAO,SAAUC,GAAQ,OAAOC,EAAgBJ,EAAiBG,MACjED,QAAO,SAAUC,GAAQ,OAAOE,EAAeF,EAAM,GAC9D,EACWG,EAAsB,SAAUP,EAAOQ,GAE9C,YADc,IAAVA,IAAoBA,EAAQ,IAAIC,KAC7BP,EAAQF,GAAOG,QAAO,SAAUC,GAAQ,OAAOM,EAAyBF,EAAOJ,EAAQ,GAClG,EAUWO,EAAmB,SAAUC,EAAUX,EAAiBY,GAC/D,OAAOC,EAAgBf,EAAgBgB,EAAcH,EAAUC,GAAaZ,IAAkB,EAAMY,EACxG,EAYWG,EAAoB,SAAUJ,EAAUX,GAC/C,OAAOa,EAAgBf,EAAgBgB,EAAcH,GAAWX,IAAkB,EACtF,EAMWgB,EAAuB,SAAUC,EAASjB,GACjD,OAAOF,EAAgBoB,EAAwBD,GAAUjB,EAC7D,EAIWmB,EAAW,SAAUC,EAAOC,GACnC,OAAID,EAAME,WACCH,EAASC,EAAME,WAAYD,UAGYE,IAA1CC,OAAOC,eAAeL,GAAOD,WAC7BK,OAAOC,eAAeL,GAAOD,SAASO,KAAKN,EAAOC,KAG/CpB,EAAQmB,EAAMO,UAAUC,MAAK,SAAUC,GAC1C,IAAIC,EACJ,GAAID,aAAiBE,kBAAmB,CACpC,IAAIC,EAA8C,QAAhCF,EAAKD,EAAMI,uBAAoC,IAAPH,OAAgB,EAASA,EAAGI,KACtF,QAAIF,GACOb,EAASa,EAAYX,EAGnC,CACD,OAAOF,EAASU,EAAOR,EACnC,GAEA"}
@@ -1 +1 @@
1
- {"version":3,"file":"all-affected.js","sources":["../../../../../../../node_modules/focus-lock/dist/es2015/utils/all-affected.js"],"sourcesContent":["import { FOCUS_DISABLED, FOCUS_GROUP } from '../constants';\nimport { asArray, toArray } from './array';\n/**\n * in case of multiple nodes nested inside each other\n * keeps only top ones\n * this is O(nlogn)\n * @param nodes\n * @returns {*}\n */\nvar filterNested = function (nodes) {\n var contained = new Set();\n var l = nodes.length;\n for (var i = 0; i < l; i += 1) {\n for (var j = i + 1; j < l; j += 1) {\n var position = nodes[i].compareDocumentPosition(nodes[j]);\n /* eslint-disable no-bitwise */\n if ((position & Node.DOCUMENT_POSITION_CONTAINED_BY) > 0) {\n contained.add(j);\n }\n if ((position & Node.DOCUMENT_POSITION_CONTAINS) > 0) {\n contained.add(i);\n }\n /* eslint-enable */\n }\n }\n return nodes.filter(function (_, index) { return !contained.has(index); });\n};\n/**\n * finds top most parent for a node\n * @param node\n * @returns {*}\n */\nvar getTopParent = function (node) {\n return node.parentNode ? getTopParent(node.parentNode) : node;\n};\n/**\n * returns all \"focus containers\" inside a given node\n * @param node\n * @returns {T}\n */\nexport var getAllAffectedNodes = function (node) {\n var nodes = asArray(node);\n return nodes.filter(Boolean).reduce(function (acc, currentNode) {\n var group = currentNode.getAttribute(FOCUS_GROUP);\n acc.push.apply(acc, (group\n ? filterNested(toArray(getTopParent(currentNode).querySelectorAll(\"[\".concat(FOCUS_GROUP, \"=\\\"\").concat(group, \"\\\"]:not([\").concat(FOCUS_DISABLED, \"=\\\"disabled\\\"])\"))))\n : [currentNode]));\n return acc;\n }, []);\n};\n"],"names":["getTopParent","node","parentNode","getAllAffectedNodes","asArray","filter","Boolean","reduce","acc","currentNode","group","getAttribute","FOCUS_GROUP","push","apply","nodes","contained","Set","l","length","i","j","position","compareDocumentPosition","Node","DOCUMENT_POSITION_CONTAINED_BY","add","DOCUMENT_POSITION_CONTAINS","_","index","has","filterNested","toArray","querySelectorAll","concat","FOCUS_DISABLED"],"mappings":"oHASA,IAuBIA,EAAe,SAAUC,GACzB,OAAOA,EAAKC,WAAaF,EAAaC,EAAKC,YAAcD,CAC7D,EAMWE,EAAsB,SAAUF,GAEvC,OADYG,EAAQH,GACPI,OAAOC,SAASC,QAAO,SAAUC,EAAKC,GAC/C,IAAIC,EAAQD,EAAYE,aAAaC,GAIrC,OAHAJ,EAAIK,KAAKC,MAAMN,EAAME,EAnCV,SAAUK,GAGzB,IAFA,IAAIC,EAAY,IAAIC,IAChBC,EAAIH,EAAMI,OACLC,EAAI,EAAGA,EAAIF,EAAGE,GAAK,EACxB,IAAK,IAAIC,EAAID,EAAI,EAAGC,EAAIH,EAAGG,GAAK,EAAG,CAC/B,IAAIC,EAAWP,EAAMK,GAAGG,wBAAwBR,EAAMM,KAEjDC,EAAWE,KAAKC,gCAAkC,GACnDT,EAAUU,IAAIL,IAEbC,EAAWE,KAAKG,4BAA8B,GAC/CX,EAAUU,IAAIN,EAGrB,CAEL,OAAOL,EAAMV,QAAO,SAAUuB,EAAGC,GAAS,OAAQb,EAAUc,IAAID,EAAS,GAC7E,CAmBcE,CAAaC,EAAQhC,EAAaS,GAAawB,iBAAiB,IAAIC,OAAOtB,EAAa,MAAOsB,OAAOxB,EAAO,YAAawB,OAAOC,EAAgB,oBACjJ,CAAC1B,IACAD,CACV,GAAE,GACP"}
1
+ {"version":3,"file":"all-affected.js","sources":["../../../../../../../node_modules/focus-lock/dist/es2015/utils/all-affected.js"],"sourcesContent":["import { FOCUS_DISABLED, FOCUS_GROUP } from '../constants';\nimport { asArray, toArray } from './array';\n/**\n * in case of multiple nodes nested inside each other\n * keeps only top ones\n * this is O(nlogn)\n * @param nodes\n * @returns {*}\n */\nvar filterNested = function (nodes) {\n var contained = new Set();\n var l = nodes.length;\n for (var i = 0; i < l; i += 1) {\n for (var j = i + 1; j < l; j += 1) {\n var position = nodes[i].compareDocumentPosition(nodes[j]);\n /* eslint-disable no-bitwise */\n if ((position & Node.DOCUMENT_POSITION_CONTAINED_BY) > 0) {\n contained.add(j);\n }\n if ((position & Node.DOCUMENT_POSITION_CONTAINS) > 0) {\n contained.add(i);\n }\n /* eslint-enable */\n }\n }\n return nodes.filter(function (_, index) { return !contained.has(index); });\n};\n/**\n * finds top most parent for a node\n * @param node\n * @returns {*}\n */\nvar getTopParent = function (node) {\n return node.parentNode ? getTopParent(node.parentNode) : node;\n};\n/**\n * returns all \"focus containers\" inside a given node\n * @param node - node or nodes to look inside\n * @returns Element[]\n */\nexport var getAllAffectedNodes = function (node) {\n var nodes = asArray(node);\n return nodes.filter(Boolean).reduce(function (acc, currentNode) {\n var group = currentNode.getAttribute(FOCUS_GROUP);\n acc.push.apply(acc, (group\n ? filterNested(toArray(getTopParent(currentNode).querySelectorAll(\"[\".concat(FOCUS_GROUP, \"=\\\"\").concat(group, \"\\\"]:not([\").concat(FOCUS_DISABLED, \"=\\\"disabled\\\"])\"))))\n : [currentNode]));\n return acc;\n }, []);\n};\n"],"names":["getTopParent","node","parentNode","getAllAffectedNodes","asArray","filter","Boolean","reduce","acc","currentNode","group","getAttribute","FOCUS_GROUP","push","apply","nodes","contained","Set","l","length","i","j","position","compareDocumentPosition","Node","DOCUMENT_POSITION_CONTAINED_BY","add","DOCUMENT_POSITION_CONTAINS","_","index","has","filterNested","toArray","querySelectorAll","concat","FOCUS_DISABLED"],"mappings":"oHASA,IAuBIA,EAAe,SAAUC,GACzB,OAAOA,EAAKC,WAAaF,EAAaC,EAAKC,YAAcD,CAC7D,EAMWE,EAAsB,SAAUF,GAEvC,OADYG,EAAQH,GACPI,OAAOC,SAASC,QAAO,SAAUC,EAAKC,GAC/C,IAAIC,EAAQD,EAAYE,aAAaC,GAIrC,OAHAJ,EAAIK,KAAKC,MAAMN,EAAME,EAnCV,SAAUK,GAGzB,IAFA,IAAIC,EAAY,IAAIC,IAChBC,EAAIH,EAAMI,OACLC,EAAI,EAAGA,EAAIF,EAAGE,GAAK,EACxB,IAAK,IAAIC,EAAID,EAAI,EAAGC,EAAIH,EAAGG,GAAK,EAAG,CAC/B,IAAIC,EAAWP,EAAMK,GAAGG,wBAAwBR,EAAMM,KAEjDC,EAAWE,KAAKC,gCAAkC,GACnDT,EAAUU,IAAIL,IAEbC,EAAWE,KAAKG,4BAA8B,GAC/CX,EAAUU,IAAIN,EAGrB,CAEL,OAAOL,EAAMV,QAAO,SAAUuB,EAAGC,GAAS,OAAQb,EAAUc,IAAID,EAAS,GAC7E,CAmBcE,CAAaC,EAAQhC,EAAaS,GAAawB,iBAAiB,IAAIC,OAAOtB,EAAa,MAAOsB,OAAOxB,EAAO,YAAawB,OAAOC,EAAgB,oBACjJ,CAAC1B,IACAD,CACV,GAAE,GACP"}
@@ -1 +1 @@
1
- {"version":3,"file":"getActiveElement.js","sources":["../../../../../../../node_modules/focus-lock/dist/es2015/utils/getActiveElement.js"],"sourcesContent":["/**\n * returns active element from document or from nested shadowdoms\n */\nimport { safeProbe } from './safe';\nexport var getActiveElement = function (inDocument) {\n if (inDocument === void 0) { inDocument = document; }\n if (!inDocument || !inDocument.activeElement) {\n return undefined;\n }\n var activeElement = inDocument.activeElement;\n return (activeElement.shadowRoot\n ? getActiveElement(activeElement.shadowRoot)\n : activeElement instanceof HTMLIFrameElement && safeProbe(function () { return activeElement.contentWindow.document; })\n ? getActiveElement(activeElement.contentWindow.document)\n : activeElement);\n};\n"],"names":["getActiveElement","inDocument","document","activeElement","shadowRoot","HTMLIFrameElement","safeProbe","contentWindow"],"mappings":"sCAIU,IAACA,EAAmB,SAAUC,GAEpC,QADmB,IAAfA,IAAyBA,EAAaC,UACrCD,GAAeA,EAAWE,cAA/B,CAGA,IAAIA,EAAgBF,EAAWE,cAC/B,OAAQA,EAAcC,WAChBJ,EAAiBG,EAAcC,YAC/BD,aAAyBE,mBAAqBC,GAAU,WAAc,OAAOH,EAAcI,cAAcL,YACrGF,EAAiBG,EAAcI,cAAcL,UAC7CC,CANT,CAOL"}
1
+ {"version":3,"file":"getActiveElement.js","sources":["../../../../../../../node_modules/focus-lock/dist/es2015/utils/getActiveElement.js"],"sourcesContent":["/**\n * returns active element from document or from nested shadowdoms\n */\nimport { safeProbe } from './safe';\n/**\n * returns current active element. If the active element is a \"container\" itself(shadowRoot or iframe) returns active element inside it\n * @param [inDocument]\n */\nexport var getActiveElement = function (inDocument) {\n if (inDocument === void 0) { inDocument = document; }\n if (!inDocument || !inDocument.activeElement) {\n return undefined;\n }\n var activeElement = inDocument.activeElement;\n return (activeElement.shadowRoot\n ? getActiveElement(activeElement.shadowRoot)\n : activeElement instanceof HTMLIFrameElement && safeProbe(function () { return activeElement.contentWindow.document; })\n ? getActiveElement(activeElement.contentWindow.document)\n : activeElement);\n};\n"],"names":["getActiveElement","inDocument","document","activeElement","shadowRoot","HTMLIFrameElement","safeProbe","contentWindow"],"mappings":"sCAQU,IAACA,EAAmB,SAAUC,GAEpC,QADmB,IAAfA,IAAyBA,EAAaC,UACrCD,GAAeA,EAAWE,cAA/B,CAGA,IAAIA,EAAgBF,EAAWE,cAC/B,OAAQA,EAAcC,WAChBJ,EAAiBG,EAAcC,YAC/BD,aAAyBE,mBAAqBC,GAAU,WAAc,OAAOH,EAAcI,cAAcL,YACrGF,EAAiBG,EAAcI,cAAcL,UAC7CC,CANT,CAOL"}
@@ -1,2 +1,2 @@
1
- import"react";import e from"prop-types";import n from"../../../react-clientside-effect/lib/index.es.js";import t from"../../../focus-lock/dist/es2015/index.js";import{deferAction as o}from"./util.js";import{mediumFocus as r,mediumBlur as u,mediumEffect as i}from"./medium.js";import{focusInside as c}from"../../../focus-lock/dist/es2015/focusInside.js";import{getFocusabledIn as s}from"../../../focus-lock/dist/es2015/focusables.js";import{focusIsHidden as d}from"../../../focus-lock/dist/es2015/focusIsHidden.js";var a=function(){return document&&document.activeElement===document.body||d()},f=null,m=null,l=null,v=!1,p=function(){return!0};function E(e,n,t,o){var r=null,u=e;do{var i=o[u];if(i.guard)i.node.dataset.focusAutoGuard&&(r=i);else{if(!i.lockItem)break;if(u!==e)return;r=null}}while((u+=t)!==n);r&&(r.node.tabIndex=0)}var b=function(e){return e&&"current"in e?e.current:e},g=function e(n,t,o){return t&&(t.host===n&&(!t.activeElement||o.contains(t.activeElement))||t.parentNode&&e(n,t.parentNode,o))},h=function(){var e,n=!1;if(f){var o=f,r=o.observed,u=o.persistentFocus,i=o.autoFocus,d=o.shards,h=o.crossFrame,j=o.focusOptions,w=r||l&&l.portaledElement,I=document&&document.activeElement;if(w){var L=[w].concat(d.map(b).filter(Boolean));if(I&&!function(e){return(f.whiteList||p)(e)}(I)||(u||(h?Boolean(v):"meanwhile"===v)||!a()||!m&&i)&&(w&&!(c(L)||I&&function(e,n){return n.some((function(n){return g(e,n,n)}))}(I,L)||(e=I,l&&l.portaledElement===e))&&(document&&!m&&I&&!i?(I.blur&&I.blur(),document.body.focus()):(n=t(L,m,{focusOptions:j}),l={})),v=!1,m=document&&document.activeElement),document){var k=document&&document.activeElement,x=s(L),F=x.map((function(e){return e.node})).indexOf(k);F>-1&&(x.filter((function(e){var n=e.guard,t=e.node;return n&&t.dataset.focusAutoGuard})).forEach((function(e){return e.node.removeAttribute("tabIndex")})),E(F,x.length,1,x),E(F,-1,-1,x))}}}return n},j=function(e){h()&&e&&(e.stopPropagation(),e.preventDefault())},w=function(){return o(h)};"production"===process.env.NODE_ENV||e.node.isRequired;var I=function(){v="just",setTimeout((function(){v="meanwhile"}),0)};r.assignSyncMedium((function(e){var n=e.target,t=e.currentTarget;t.contains(n)||(l={observerNode:t,portaledElement:n})})),u.assignMedium(w),i.assignMedium((function(e){return e({moveFocusInside:t,focusInside:c})}));var L=n((function(e){return e.filter((function(e){return!e.disabled}))}),(function(e){var n=e.slice(-1)[0];n&&!f&&(document.addEventListener("focusin",j),document.addEventListener("focusout",w),window.addEventListener("blur",I));var t=f,r=t&&n&&n.id===t.id;f=n,t&&!r&&(t.onDeactivation(),e.filter((function(e){return e.id===t.id})).length||t.returnFocus(!n)),n?(m=null,r&&t.observed===n.observed||n.onActivation(),h(),o(h)):(document.removeEventListener("focusin",j),document.removeEventListener("focusout",w),window.removeEventListener("blur",I),m=null)}))((function(){return null}));export{L as default};
1
+ import"react";import e from"prop-types";import n from"../../../react-clientside-effect/lib/index.es.js";import{focusInside as t}from"../../../focus-lock/dist/es2015/focusInside.js";import{focusIsHidden as o}from"../../../focus-lock/dist/es2015/focusIsHidden.js";import{expandFocusableNodes as r}from"../../../focus-lock/dist/es2015/focusables.js";import{moveFocusInside as u}from"../../../focus-lock/dist/es2015/moveFocusInside.js";import{deferAction as i}from"./util.js";import{mediumFocus as c,mediumBlur as s,mediumEffect as d}from"./medium.js";var a=function(){return document&&document.activeElement===document.body||o()},f=null,m=null,l=null,v=!1,p=function(){return!0};function E(e,n,t,o){var r=null,u=e;do{var i=o[u];if(i.guard)i.node.dataset.focusAutoGuard&&(r=i);else{if(!i.lockItem)break;if(u!==e)return;r=null}}while((u+=t)!==n);r&&(r.node.tabIndex=0)}var b=function(e){return e&&"current"in e?e.current:e},g=function e(n,t,o){return t&&(t.host===n&&(!t.activeElement||o.contains(t.activeElement))||t.parentNode&&e(n,t.parentNode,o))},h=function(){var e,n=!1;if(f){var o=f,i=o.observed,c=o.persistentFocus,s=o.autoFocus,d=o.shards,h=o.crossFrame,j=o.focusOptions,w=i||l&&l.portaledElement,I=document&&document.activeElement;if(w){var L=[w].concat(d.map(b).filter(Boolean));if(I&&!function(e){return(f.whiteList||p)(e)}(I)||(c||(h?Boolean(v):"meanwhile"===v)||!a()||!m&&s)&&(w&&!(t(L)||I&&function(e,n){return n.some((function(n){return g(e,n,n)}))}(I,L)||(e=I,l&&l.portaledElement===e))&&(document&&!m&&I&&!s?(I.blur&&I.blur(),document.body.focus()):(n=u(L,m,{focusOptions:j}),l={})),v=!1,m=document&&document.activeElement),document){var k=document&&document.activeElement,F=r(L),x=F.map((function(e){return e.node})).indexOf(k);x>-1&&(F.filter((function(e){var n=e.guard,t=e.node;return n&&t.dataset.focusAutoGuard})).forEach((function(e){return e.node.removeAttribute("tabIndex")})),E(x,F.length,1,F),E(x,-1,-1,F))}}}return n},j=function(e){h()&&e&&(e.stopPropagation(),e.preventDefault())},w=function(){return i(h)};"production"===process.env.NODE_ENV||e.node.isRequired;var I=function(){v="just",i((function(){v="meanwhile"}))};c.assignSyncMedium((function(e){var n=e.target,t=e.currentTarget;t.contains(n)||(l={observerNode:t,portaledElement:n})})),s.assignMedium(w),d.assignMedium((function(e){return e({moveFocusInside:u,focusInside:t})}));var L=n((function(e){return e.filter((function(e){return!e.disabled}))}),(function(e){var n=e.slice(-1)[0];n&&!f&&(document.addEventListener("focusin",j),document.addEventListener("focusout",w),window.addEventListener("blur",I));var t=f,o=t&&n&&n.id===t.id;f=n,t&&!o&&(t.onDeactivation(),e.filter((function(e){return e.id===t.id})).length||t.returnFocus(!n)),n?(m=null,o&&t.observed===n.observed||n.onActivation(),h(),i(h)):(document.removeEventListener("focusin",j),document.removeEventListener("focusout",w),window.removeEventListener("blur",I),m=null)}))((function(){return null}));export{L as default};
2
2
  //# sourceMappingURL=Trap.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Trap.js","sources":["../../../../../../node_modules/react-focus-lock/dist/es2015/Trap.js"],"sourcesContent":["/* eslint-disable no-mixed-operators */\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport withSideEffect from 'react-clientside-effect';\nimport moveFocusInside, { focusInside, focusIsHidden, getFocusabledIn } from 'focus-lock';\nimport { deferAction } from './util';\nimport { mediumFocus, mediumBlur, mediumEffect } from './medium';\n\nvar focusOnBody = function focusOnBody() {\n return document && document.activeElement === document.body;\n};\n\nvar isFreeFocus = function isFreeFocus() {\n return focusOnBody() || focusIsHidden();\n};\n\nvar lastActiveTrap = null;\nvar lastActiveFocus = null;\nvar lastPortaledElement = null;\nvar focusWasOutsideWindow = false;\n\nvar defaultWhitelist = function defaultWhitelist() {\n return true;\n};\n\nvar focusWhitelisted = function focusWhitelisted(activeElement) {\n return (lastActiveTrap.whiteList || defaultWhitelist)(activeElement);\n};\n\nvar recordPortal = function recordPortal(observerNode, portaledElement) {\n lastPortaledElement = {\n observerNode: observerNode,\n portaledElement: portaledElement\n };\n};\n\nvar focusIsPortaledPair = function focusIsPortaledPair(element) {\n return lastPortaledElement && lastPortaledElement.portaledElement === element;\n};\n\nfunction autoGuard(startIndex, end, step, allNodes) {\n var lastGuard = null;\n var i = startIndex;\n\n do {\n var item = allNodes[i];\n\n if (item.guard) {\n if (item.node.dataset.focusAutoGuard) {\n lastGuard = item;\n }\n } else if (item.lockItem) {\n if (i !== startIndex) {\n // we will tab to the next element\n return;\n }\n\n lastGuard = null;\n } else {\n break;\n }\n } while ((i += step) !== end);\n\n if (lastGuard) {\n lastGuard.node.tabIndex = 0;\n }\n}\n\nvar extractRef = function extractRef(ref) {\n return ref && 'current' in ref ? ref.current : ref;\n};\n\nvar focusWasOutside = function focusWasOutside(crossFrameOption) {\n if (crossFrameOption) {\n // with cross frame return true for any value\n return Boolean(focusWasOutsideWindow);\n } // in other case return only of focus went a while aho\n\n\n return focusWasOutsideWindow === 'meanwhile';\n};\n\nvar checkInHost = function checkInHost(check, el, boundary) {\n return el && ( // find host equal to active element and check nested active element\n el.host === check && (!el.activeElement || boundary.contains(el.activeElement)) // dive up\n || el.parentNode && checkInHost(check, el.parentNode, boundary));\n};\n\nvar withinHost = function withinHost(activeElement, workingArea) {\n return workingArea.some(function (area) {\n return checkInHost(activeElement, area, area);\n });\n};\n\nvar activateTrap = function activateTrap() {\n var result = false;\n\n if (lastActiveTrap) {\n var _lastActiveTrap = lastActiveTrap,\n observed = _lastActiveTrap.observed,\n persistentFocus = _lastActiveTrap.persistentFocus,\n autoFocus = _lastActiveTrap.autoFocus,\n shards = _lastActiveTrap.shards,\n crossFrame = _lastActiveTrap.crossFrame,\n focusOptions = _lastActiveTrap.focusOptions;\n var workingNode = observed || lastPortaledElement && lastPortaledElement.portaledElement;\n var activeElement = document && document.activeElement;\n\n if (workingNode) {\n var workingArea = [workingNode].concat(shards.map(extractRef).filter(Boolean));\n\n if (!activeElement || focusWhitelisted(activeElement)) {\n if (persistentFocus || focusWasOutside(crossFrame) || !isFreeFocus() || !lastActiveFocus && autoFocus) {\n if (workingNode && !( // active element is \"inside\" working area\n focusInside(workingArea) || // check for shadow-dom contained elements\n activeElement && withinHost(activeElement, workingArea) || focusIsPortaledPair(activeElement, workingNode))) {\n if (document && !lastActiveFocus && activeElement && !autoFocus) {\n // Check if blur() exists, which is missing on certain elements on IE\n if (activeElement.blur) {\n activeElement.blur();\n }\n\n document.body.focus();\n } else {\n result = moveFocusInside(workingArea, lastActiveFocus, {\n focusOptions: focusOptions\n });\n lastPortaledElement = {};\n }\n }\n\n focusWasOutsideWindow = false;\n lastActiveFocus = document && document.activeElement;\n }\n }\n\n if (document) {\n var newActiveElement = document && document.activeElement;\n var allNodes = getFocusabledIn(workingArea);\n var focusedIndex = allNodes.map(function (_ref) {\n var node = _ref.node;\n return node;\n }).indexOf(newActiveElement);\n\n if (focusedIndex > -1) {\n // remove old focus\n allNodes.filter(function (_ref2) {\n var guard = _ref2.guard,\n node = _ref2.node;\n return guard && node.dataset.focusAutoGuard;\n }).forEach(function (_ref3) {\n var node = _ref3.node;\n return node.removeAttribute('tabIndex');\n });\n autoGuard(focusedIndex, allNodes.length, +1, allNodes);\n autoGuard(focusedIndex, -1, -1, allNodes);\n }\n }\n }\n }\n\n return result;\n};\n\nvar onTrap = function onTrap(event) {\n if (activateTrap() && event) {\n // prevent scroll jump\n event.stopPropagation();\n event.preventDefault();\n }\n};\n\nvar onBlur = function onBlur() {\n return deferAction(activateTrap);\n};\n\nvar onFocus = function onFocus(event) {\n // detect portal\n var source = event.target;\n var currentNode = event.currentTarget;\n\n if (!currentNode.contains(source)) {\n recordPortal(currentNode, source);\n }\n};\n\nvar FocusWatcher = function FocusWatcher() {\n return null;\n};\n\nvar FocusTrap = function FocusTrap(_ref4) {\n var children = _ref4.children;\n return /*#__PURE__*/React.createElement(\"div\", {\n onBlur: onBlur,\n onFocus: onFocus\n }, children);\n};\n\nFocusTrap.propTypes = process.env.NODE_ENV !== \"production\" ? {\n children: PropTypes.node.isRequired\n} : {};\n\nvar onWindowBlur = function onWindowBlur() {\n focusWasOutsideWindow = 'just'; // using setTimeout to set this variable after React/sidecar reaction\n\n setTimeout(function () {\n focusWasOutsideWindow = 'meanwhile';\n }, 0);\n};\n\nvar attachHandler = function attachHandler() {\n document.addEventListener('focusin', onTrap);\n document.addEventListener('focusout', onBlur);\n window.addEventListener('blur', onWindowBlur);\n};\n\nvar detachHandler = function detachHandler() {\n document.removeEventListener('focusin', onTrap);\n document.removeEventListener('focusout', onBlur);\n window.removeEventListener('blur', onWindowBlur);\n};\n\nfunction reducePropsToState(propsList) {\n return propsList.filter(function (_ref5) {\n var disabled = _ref5.disabled;\n return !disabled;\n });\n}\n\nfunction handleStateChangeOnClient(traps) {\n var trap = traps.slice(-1)[0];\n\n if (trap && !lastActiveTrap) {\n attachHandler();\n }\n\n var lastTrap = lastActiveTrap;\n var sameTrap = lastTrap && trap && trap.id === lastTrap.id;\n lastActiveTrap = trap;\n\n if (lastTrap && !sameTrap) {\n lastTrap.onDeactivation(); // return focus only of last trap was removed\n\n if (!traps.filter(function (_ref6) {\n var id = _ref6.id;\n return id === lastTrap.id;\n }).length) {\n // allow defer is no other trap is awaiting restore\n lastTrap.returnFocus(!trap);\n }\n }\n\n if (trap) {\n lastActiveFocus = null;\n\n if (!sameTrap || lastTrap.observed !== trap.observed) {\n trap.onActivation();\n }\n\n activateTrap(true);\n deferAction(activateTrap);\n } else {\n detachHandler();\n lastActiveFocus = null;\n }\n} // bind medium\n\n\nmediumFocus.assignSyncMedium(onFocus);\nmediumBlur.assignMedium(onBlur);\nmediumEffect.assignMedium(function (cb) {\n return cb({\n moveFocusInside: moveFocusInside,\n focusInside: focusInside\n });\n});\nexport default withSideEffect(reducePropsToState, handleStateChangeOnClient)(FocusWatcher);"],"names":["isFreeFocus","document","activeElement","body","focusIsHidden","lastActiveTrap","lastActiveFocus","lastPortaledElement","focusWasOutsideWindow","defaultWhitelist","autoGuard","startIndex","end","step","allNodes","lastGuard","i","item","guard","node","dataset","focusAutoGuard","lockItem","tabIndex","extractRef","ref","current","checkInHost","check","el","boundary","host","contains","parentNode","activateTrap","element","result","_lastActiveTrap","observed","persistentFocus","autoFocus","shards","crossFrame","focusOptions","workingNode","portaledElement","workingArea","concat","map","filter","Boolean","whiteList","focusWhitelisted","focusInside","some","area","withinHost","blur","focus","moveFocusInside","newActiveElement","getFocusabledIn","focusedIndex","_ref","indexOf","_ref2","forEach","_ref3","removeAttribute","length","onTrap","event","stopPropagation","preventDefault","onBlur","deferAction","process","env","NODE_ENV","PropTypes","isRequired","onWindowBlur","setTimeout","mediumFocus","assignSyncMedium","source","target","currentNode","currentTarget","observerNode","mediumBlur","assignMedium","mediumEffect","cb","FocusTrap","withSideEffect","propsList","_ref5","disabled","traps","trap","slice","addEventListener","window","lastTrap","sameTrap","id","onDeactivation","_ref6","returnFocus","onActivation","removeEventListener"],"mappings":"kgBAQA,IAIIA,EAAc,WAChB,OAJOC,UAAYA,SAASC,gBAAkBD,SAASE,MAI/BC,GAC1B,EAEIC,EAAiB,KACjBC,EAAkB,KAClBC,EAAsB,KACtBC,GAAwB,EAExBC,EAAmB,WACrB,OAAO,CACT,EAiBA,SAASC,EAAUC,EAAYC,EAAKC,EAAMC,GACxC,IAAIC,EAAY,KACZC,EAAIL,EAER,EAAG,CACD,IAAIM,EAAOH,EAASE,GAEpB,GAAIC,EAAKC,MACHD,EAAKE,KAAKC,QAAQC,iBACpBN,EAAYE,OAET,KAAIA,EAAKK,SAQd,MAPA,GAAIN,IAAML,EAER,OAGFI,EAAY,IAGb,CACL,QAAYC,GAAKH,KAAUD,GAErBG,IACFA,EAAUI,KAAKI,SAAW,EAE9B,CAEA,IAAIC,EAAa,SAAoBC,GACnC,OAAOA,GAAO,YAAaA,EAAMA,EAAIC,QAAUD,CACjD,EAYIE,EAAc,SAASA,EAAYC,EAAOC,EAAIC,GAChD,OAAOD,IACPA,EAAGE,OAASH,KAAWC,EAAG3B,eAAiB4B,EAASE,SAASH,EAAG3B,iBAC7D2B,EAAGI,YAAcN,EAAYC,EAAOC,EAAGI,WAAYH,GACxD,EAQII,EAAe,WACjB,IA3DqDC,EA2DjDC,GAAS,EAEb,GAAI/B,EAAgB,CAClB,IAAIgC,EAAkBhC,EAClBiC,EAAWD,EAAgBC,SAC3BC,EAAkBF,EAAgBE,gBAClCC,EAAYH,EAAgBG,UAC5BC,EAASJ,EAAgBI,OACzBC,EAAaL,EAAgBK,WAC7BC,EAAeN,EAAgBM,aAC/BC,EAAcN,GAAY/B,GAAuBA,EAAoBsC,gBACrE3C,EAAgBD,UAAYA,SAASC,cAEzC,GAAI0C,EAAa,CACf,IAAIE,EAAc,CAACF,GAAaG,OAAON,EAAOO,IAAIxB,GAAYyB,OAAO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js"],"sourcesContent":["/* eslint-disable no-mixed-operators */\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport withSideEffect from 'react-clientside-effect';\nimport { moveFocusInside, focusInside, focusIsHidden, expandFocusableNodes } from 'focus-lock';\nimport { deferAction } from './util';\nimport { mediumFocus, mediumBlur, mediumEffect } from './medium';\n\nvar focusOnBody = function focusOnBody() {\n return document && document.activeElement === document.body;\n};\n\nvar isFreeFocus = function isFreeFocus() {\n return focusOnBody() || focusIsHidden();\n};\n\nvar lastActiveTrap = null;\nvar lastActiveFocus = null;\nvar lastPortaledElement = null;\nvar focusWasOutsideWindow = false;\n\nvar defaultWhitelist = function defaultWhitelist() {\n return true;\n};\n\nvar focusWhitelisted = function focusWhitelisted(activeElement) {\n return (lastActiveTrap.whiteList || defaultWhitelist)(activeElement);\n};\n\nvar recordPortal = function recordPortal(observerNode, portaledElement) {\n lastPortaledElement = {\n observerNode: observerNode,\n portaledElement: portaledElement\n };\n};\n\nvar focusIsPortaledPair = function focusIsPortaledPair(element) {\n return lastPortaledElement && lastPortaledElement.portaledElement === element;\n};\n\nfunction autoGuard(startIndex, end, step, allNodes) {\n var lastGuard = null;\n var i = startIndex;\n\n do {\n var item = allNodes[i];\n\n if (item.guard) {\n if (item.node.dataset.focusAutoGuard) {\n lastGuard = item;\n }\n } else if (item.lockItem) {\n if (i !== startIndex) {\n // we will tab to the next element\n return;\n }\n\n lastGuard = null;\n } else {\n break;\n }\n } while ((i += step) !== end);\n\n if (lastGuard) {\n lastGuard.node.tabIndex = 0;\n }\n}\n\nvar extractRef = function extractRef(ref) {\n return ref && 'current' in ref ? ref.current : ref;\n};\n\nvar focusWasOutside = function focusWasOutside(crossFrameOption) {\n if (crossFrameOption) {\n // with cross frame return true for any value\n return Boolean(focusWasOutsideWindow);\n } // in other case return only of focus went a while aho\n\n\n return focusWasOutsideWindow === 'meanwhile';\n};\n\nvar checkInHost = function checkInHost(check, el, boundary) {\n return el && ( // find host equal to active element and check nested active element\n el.host === check && (!el.activeElement || boundary.contains(el.activeElement)) // dive up\n || el.parentNode && checkInHost(check, el.parentNode, boundary));\n};\n\nvar withinHost = function withinHost(activeElement, workingArea) {\n return workingArea.some(function (area) {\n return checkInHost(activeElement, area, area);\n });\n};\n\nvar activateTrap = function activateTrap() {\n var result = false;\n\n if (lastActiveTrap) {\n var _lastActiveTrap = lastActiveTrap,\n observed = _lastActiveTrap.observed,\n persistentFocus = _lastActiveTrap.persistentFocus,\n autoFocus = _lastActiveTrap.autoFocus,\n shards = _lastActiveTrap.shards,\n crossFrame = _lastActiveTrap.crossFrame,\n focusOptions = _lastActiveTrap.focusOptions;\n var workingNode = observed || lastPortaledElement && lastPortaledElement.portaledElement;\n var activeElement = document && document.activeElement;\n\n if (workingNode) {\n var workingArea = [workingNode].concat(shards.map(extractRef).filter(Boolean));\n\n if (!activeElement || focusWhitelisted(activeElement)) {\n if (persistentFocus || focusWasOutside(crossFrame) || !isFreeFocus() || !lastActiveFocus && autoFocus) {\n if (workingNode && !( // active element is \"inside\" working area\n focusInside(workingArea) || // check for shadow-dom contained elements\n activeElement && withinHost(activeElement, workingArea) || focusIsPortaledPair(activeElement, workingNode))) {\n if (document && !lastActiveFocus && activeElement && !autoFocus) {\n // Check if blur() exists, which is missing on certain elements on IE\n if (activeElement.blur) {\n activeElement.blur();\n }\n\n document.body.focus();\n } else {\n result = moveFocusInside(workingArea, lastActiveFocus, {\n focusOptions: focusOptions\n });\n lastPortaledElement = {};\n }\n }\n\n focusWasOutsideWindow = false;\n lastActiveFocus = document && document.activeElement;\n }\n }\n\n if (document) {\n var newActiveElement = document && document.activeElement;\n var allNodes = expandFocusableNodes(workingArea);\n var focusedIndex = allNodes.map(function (_ref) {\n var node = _ref.node;\n return node;\n }).indexOf(newActiveElement);\n\n if (focusedIndex > -1) {\n // remove old focus\n allNodes.filter(function (_ref2) {\n var guard = _ref2.guard,\n node = _ref2.node;\n return guard && node.dataset.focusAutoGuard;\n }).forEach(function (_ref3) {\n var node = _ref3.node;\n return node.removeAttribute('tabIndex');\n });\n autoGuard(focusedIndex, allNodes.length, +1, allNodes);\n autoGuard(focusedIndex, -1, -1, allNodes);\n }\n }\n }\n }\n\n return result;\n};\n\nvar onTrap = function onTrap(event) {\n if (activateTrap() && event) {\n // prevent scroll jump\n event.stopPropagation();\n event.preventDefault();\n }\n};\n\nvar onBlur = function onBlur() {\n return deferAction(activateTrap);\n};\n\nvar onFocus = function onFocus(event) {\n // detect portal\n var source = event.target;\n var currentNode = event.currentTarget;\n\n if (!currentNode.contains(source)) {\n recordPortal(currentNode, source);\n }\n};\n\nvar FocusWatcher = function FocusWatcher() {\n return null;\n};\n\nvar FocusTrap = function FocusTrap(_ref4) {\n var children = _ref4.children;\n return /*#__PURE__*/React.createElement(\"div\", {\n onBlur: onBlur,\n onFocus: onFocus\n }, children);\n};\n\nFocusTrap.propTypes = process.env.NODE_ENV !== \"production\" ? {\n children: PropTypes.node.isRequired\n} : {};\n\nvar onWindowBlur = function onWindowBlur() {\n focusWasOutsideWindow = 'just'; // using setTimeout to set this variable after React/sidecar reaction\n\n deferAction(function () {\n focusWasOutsideWindow = 'meanwhile';\n });\n};\n\nvar attachHandler = function attachHandler() {\n document.addEventListener('focusin', onTrap);\n document.addEventListener('focusout', onBlur);\n window.addEventListener('blur', onWindowBlur);\n};\n\nvar detachHandler = function detachHandler() {\n document.removeEventListener('focusin', onTrap);\n document.removeEventListener('focusout', onBlur);\n window.removeEventListener('blur', onWindowBlur);\n};\n\nfunction reducePropsToState(propsList) {\n return propsList.filter(function (_ref5) {\n var disabled = _ref5.disabled;\n return !disabled;\n });\n}\n\nfunction handleStateChangeOnClient(traps) {\n var trap = traps.slice(-1)[0];\n\n if (trap && !lastActiveTrap) {\n attachHandler();\n }\n\n var lastTrap = lastActiveTrap;\n var sameTrap = lastTrap && trap && trap.id === lastTrap.id;\n lastActiveTrap = trap;\n\n if (lastTrap && !sameTrap) {\n lastTrap.onDeactivation(); // return focus only of last trap was removed\n\n if (!traps.filter(function (_ref6) {\n var id = _ref6.id;\n return id === lastTrap.id;\n }).length) {\n // allow defer is no other trap is awaiting restore\n lastTrap.returnFocus(!trap);\n }\n }\n\n if (trap) {\n lastActiveFocus = null;\n\n if (!sameTrap || lastTrap.observed !== trap.observed) {\n trap.onActivation();\n }\n\n activateTrap(true);\n deferAction(activateTrap);\n } else {\n detachHandler();\n lastActiveFocus = null;\n }\n} // bind medium\n\n\nmediumFocus.assignSyncMedium(onFocus);\nmediumBlur.assignMedium(onBlur);\nmediumEffect.assignMedium(function (cb) {\n return cb({\n moveFocusInside: moveFocusInside,\n focusInside: focusInside\n });\n});\nexport default withSideEffect(reducePropsToState, handleStateChangeOnClient)(FocusWatcher);"],"names":["isFreeFocus","document","activeElement","body","focusIsHidden","lastActiveTrap","lastActiveFocus","lastPortaledElement","focusWasOutsideWindow","defaultWhitelist","autoGuard","startIndex","end","step","allNodes","lastGuard","i","item","guard","node","dataset","focusAutoGuard","lockItem","tabIndex","extractRef","ref","current","checkInHost","check","el","boundary","host","contains","parentNode","activateTrap","element","result","_lastActiveTrap","observed","persistentFocus","autoFocus","shards","crossFrame","focusOptions","workingNode","portaledElement","workingArea","concat","map","filter","Boolean","whiteList","focusWhitelisted","focusInside","some","area","withinHost","blur","focus","moveFocusInside","newActiveElement","expandFocusableNodes","focusedIndex","_ref","indexOf","_ref2","forEach","_ref3","removeAttribute","length","onTrap","event","stopPropagation","preventDefault","onBlur","deferAction","process","env","NODE_ENV","PropTypes","isRequired","onWindowBlur","mediumFocus","assignSyncMedium","source","target","currentNode","currentTarget","observerNode","mediumBlur","assignMedium","mediumEffect","cb","FocusTrap","withSideEffect","propsList","_ref5","disabled","traps","trap","slice","addEventListener","window","lastTrap","sameTrap","id","onDeactivation","_ref6","returnFocus","onActivation","removeEventListener"],"mappings":"oiBAQA,IAIIA,EAAc,WAChB,OAJOC,UAAYA,SAASC,gBAAkBD,SAASE,MAI/BC,GAC1B,EAEIC,EAAiB,KACjBC,EAAkB,KAClBC,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,EAAYtD,SAASoD,KAvJ1B7E,EAAsB,CACpBiF,aAuJaF,EAtJbzC,gBAsJ0BuC,GAE9B,IAqFAK,EAAWC,aAAahB,GACxBiB,EAAaD,cAAa,SAAUE,GAClC,OAAOA,EAAG,CACRjC,gBAAiBA,EACjBN,YAAaA,GAEjB,IACA,IAAewC,EAAAC,GAtDf,SAA4BC,GAC1B,OAAOA,EAAU9C,QAAO,SAAU+C,GAEhC,OADeA,EAAMC,QAEzB,GACA,IAEA,SAAmCC,GACjC,IAAIC,EAAOD,EAAME,OAAO,GAAG,GAEvBD,IAAS9F,IArBbJ,SAASoG,iBAAiB,UAAW/B,GACrCrE,SAASoG,iBAAiB,WAAY3B,GACtC4B,OAAOD,iBAAiB,OAAQpB,IAuBhC,IAAIsB,EAAWlG,EACXmG,EAAWD,GAAYJ,GAAQA,EAAKM,KAAOF,EAASE,GACxDpG,EAAiB8F,EAEbI,IAAaC,IACfD,EAASG,iBAEJR,EAAMjD,QAAO,SAAU0D,GAE1B,OADSA,EAAMF,KACDF,EAASE,EACxB,IAAEpC,QAEDkC,EAASK,aAAaT,IAItBA,GACF7F,EAAkB,KAEbkG,GAAYD,EAASjE,WAAa6D,EAAK7D,UAC1C6D,EAAKU,eAGP3E,IACAyC,EAAYzC,KA3CdjC,SAAS6G,oBAAoB,UAAWxC,GACxCrE,SAAS6G,oBAAoB,WAAYpC,GACzC4B,OAAOQ,oBAAoB,OAAQ7B,GA4CjC3E,EAAkB,KAEtB,GAWewF,EA1FI,WACjB,OAAO,IACT"}
@@ -1,2 +1,2 @@
1
- function e(e){var t=window.setImmediate;void 0!==t?t(e):setTimeout(e,1)}export{e as deferAction};
1
+ function t(t){setTimeout(t,1)}export{t as deferAction};
2
2
  //# sourceMappingURL=util.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"util.js","sources":["../../../../../../node_modules/react-focus-lock/dist/es2015/util.js"],"sourcesContent":["export function deferAction(action) {\n // Hidding setImmediate from Webpack to avoid inserting polyfill\n var _window = window,\n setImmediate = _window.setImmediate;\n\n if (typeof setImmediate !== 'undefined') {\n setImmediate(action);\n } else {\n setTimeout(action, 1);\n }\n}\nexport var inlineProp = function inlineProp(name, value) {\n var obj = {};\n obj[name] = value;\n return obj;\n};"],"names":["deferAction","action","setImmediate","window","setTimeout"],"mappings":"AAAO,SAASA,EAAYC,GAE1B,IACIC,EADUC,OACaD,kBAEC,IAAjBA,EACTA,EAAaD,GAEbG,WAAWH,EAAQ,EAEvB"}
1
+ {"version":3,"file":"util.js","sources":["../../../../../../node_modules/react-focus-lock/dist/es2015/util.js"],"sourcesContent":["export function deferAction(action) {\n setTimeout(action, 1);\n}\nexport var inlineProp = function inlineProp(name, value) {\n var obj = {};\n obj[name] = value;\n return obj;\n};"],"names":["deferAction","action","setTimeout"],"mappings":"AAAO,SAASA,EAAYC,GAC1BC,WAAWD,EAAQ,EACrB"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs.js","sources":["../../../../node_modules/react-intersection-observer/index.mjs"],"sourcesContent":["\"use client\";\nvar __defProp = Object.defineProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField = (obj, key, value) => {\n __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\n return value;\n};\n\n// src/InView.tsx\nimport * as React from \"react\";\n\n// src/observe.ts\nvar observerMap = /* @__PURE__ */ new Map();\nvar RootIds = /* @__PURE__ */ new WeakMap();\nvar rootId = 0;\nvar unsupportedValue = void 0;\nfunction defaultFallbackInView(inView) {\n unsupportedValue = inView;\n}\nfunction getRootId(root) {\n if (!root)\n return \"0\";\n if (RootIds.has(root))\n return RootIds.get(root);\n rootId += 1;\n RootIds.set(root, rootId.toString());\n return RootIds.get(root);\n}\nfunction optionsToId(options) {\n return Object.keys(options).sort().filter(\n (key) => options[key] !== void 0\n ).map((key) => {\n return `${key}_${key === \"root\" ? getRootId(options.root) : options[key]}`;\n }).toString();\n}\nfunction createObserver(options) {\n let id = optionsToId(options);\n let instance = observerMap.get(id);\n if (!instance) {\n const elements = /* @__PURE__ */ new Map();\n let thresholds;\n const observer = new IntersectionObserver((entries) => {\n entries.forEach((entry) => {\n var _a;\n const inView = entry.isIntersecting && thresholds.some((threshold) => entry.intersectionRatio >= threshold);\n if (options.trackVisibility && typeof entry.isVisible === \"undefined\") {\n entry.isVisible = inView;\n }\n (_a = elements.get(entry.target)) == null ? void 0 : _a.forEach((callback) => {\n callback(inView, entry);\n });\n });\n }, options);\n thresholds = observer.thresholds || (Array.isArray(options.threshold) ? options.threshold : [options.threshold || 0]);\n instance = {\n id,\n observer,\n elements\n };\n observerMap.set(id, instance);\n }\n return instance;\n}\nfunction observe(element, callback, options = {}, fallbackInView = unsupportedValue) {\n if (typeof window.IntersectionObserver === \"undefined\" && fallbackInView !== void 0) {\n const bounds = element.getBoundingClientRect();\n callback(fallbackInView, {\n isIntersecting: fallbackInView,\n target: element,\n intersectionRatio: typeof options.threshold === \"number\" ? options.threshold : 0,\n time: 0,\n boundingClientRect: bounds,\n intersectionRect: bounds,\n rootBounds: bounds\n });\n return () => {\n };\n }\n const { id, observer, elements } = createObserver(options);\n let callbacks = elements.get(element) || [];\n if (!elements.has(element)) {\n elements.set(element, callbacks);\n }\n callbacks.push(callback);\n observer.observe(element);\n return function unobserve() {\n callbacks.splice(callbacks.indexOf(callback), 1);\n if (callbacks.length === 0) {\n elements.delete(element);\n observer.unobserve(element);\n }\n if (elements.size === 0) {\n observer.disconnect();\n observerMap.delete(id);\n }\n };\n}\n\n// src/InView.tsx\nfunction isPlainChildren(props) {\n return typeof props.children !== \"function\";\n}\nvar InView = class extends React.Component {\n constructor(props) {\n super(props);\n __publicField(this, \"node\", null);\n __publicField(this, \"_unobserveCb\", null);\n __publicField(this, \"handleNode\", (node) => {\n if (this.node) {\n this.unobserve();\n if (!node && !this.props.triggerOnce && !this.props.skip) {\n this.setState({ inView: !!this.props.initialInView, entry: void 0 });\n }\n }\n this.node = node ? node : null;\n this.observeNode();\n });\n __publicField(this, \"handleChange\", (inView, entry) => {\n if (inView && this.props.triggerOnce) {\n this.unobserve();\n }\n if (!isPlainChildren(this.props)) {\n this.setState({ inView, entry });\n }\n if (this.props.onChange) {\n this.props.onChange(inView, entry);\n }\n });\n this.state = {\n inView: !!props.initialInView,\n entry: void 0\n };\n }\n componentDidUpdate(prevProps) {\n if (prevProps.rootMargin !== this.props.rootMargin || prevProps.root !== this.props.root || prevProps.threshold !== this.props.threshold || prevProps.skip !== this.props.skip || prevProps.trackVisibility !== this.props.trackVisibility || prevProps.delay !== this.props.delay) {\n this.unobserve();\n this.observeNode();\n }\n }\n componentWillUnmount() {\n this.unobserve();\n this.node = null;\n }\n observeNode() {\n if (!this.node || this.props.skip)\n return;\n const {\n threshold,\n root,\n rootMargin,\n trackVisibility,\n delay,\n fallbackInView\n } = this.props;\n this._unobserveCb = observe(\n this.node,\n this.handleChange,\n {\n threshold,\n root,\n rootMargin,\n // @ts-ignore\n trackVisibility,\n // @ts-ignore\n delay\n },\n fallbackInView\n );\n }\n unobserve() {\n if (this._unobserveCb) {\n this._unobserveCb();\n this._unobserveCb = null;\n }\n }\n render() {\n const { children } = this.props;\n if (typeof children === \"function\") {\n const { inView, entry } = this.state;\n return children({ inView, entry, ref: this.handleNode });\n }\n const {\n as,\n triggerOnce,\n threshold,\n root,\n rootMargin,\n onChange,\n skip,\n trackVisibility,\n delay,\n initialInView,\n fallbackInView,\n ...props\n } = this.props;\n return React.createElement(\n as || \"div\",\n { ref: this.handleNode, ...props },\n children\n );\n }\n};\n\n// src/useInView.tsx\nimport * as React2 from \"react\";\nfunction useInView({\n threshold,\n delay,\n trackVisibility,\n rootMargin,\n root,\n triggerOnce,\n skip,\n initialInView,\n fallbackInView,\n onChange\n} = {}) {\n var _a;\n const [ref, setRef] = React2.useState(null);\n const callback = React2.useRef();\n const [state, setState] = React2.useState({\n inView: !!initialInView,\n entry: void 0\n });\n callback.current = onChange;\n React2.useEffect(\n () => {\n if (skip || !ref)\n return;\n let unobserve;\n unobserve = observe(\n ref,\n (inView, entry) => {\n setState({\n inView,\n entry\n });\n if (callback.current)\n callback.current(inView, entry);\n if (entry.isIntersecting && triggerOnce && unobserve) {\n unobserve();\n unobserve = void 0;\n }\n },\n {\n root,\n rootMargin,\n threshold,\n // @ts-ignore\n trackVisibility,\n // @ts-ignore\n delay\n },\n fallbackInView\n );\n return () => {\n if (unobserve) {\n unobserve();\n }\n };\n },\n // We break the rule here, because we aren't including the actual `threshold` variable\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [\n // If the threshold is an array, convert it to a string, so it won't change between renders.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n Array.isArray(threshold) ? threshold.toString() : threshold,\n ref,\n root,\n rootMargin,\n triggerOnce,\n skip,\n trackVisibility,\n fallbackInView,\n delay\n ]\n );\n const entryTarget = (_a = state.entry) == null ? void 0 : _a.target;\n const previousEntryTarget = React2.useRef();\n if (!ref && entryTarget && !triggerOnce && !skip && previousEntryTarget.current !== entryTarget) {\n previousEntryTarget.current = entryTarget;\n setState({\n inView: !!initialInView,\n entry: void 0\n });\n }\n const result = [setRef, state.inView, state.entry];\n result.ref = result[0];\n result.inView = result[1];\n result.entry = result[2];\n return result;\n}\nexport {\n InView,\n defaultFallbackInView,\n observe,\n useInView\n};\n//# sourceMappingURL=index.mjs.map"],"names":["__defProp","Object","defineProperty","__publicField","obj","key","value","enumerable","configurable","writable","__defNormalProp","observerMap","Map","RootIds","WeakMap","rootId","optionsToId","options","keys","sort","filter","map","root","has","set","toString","get","observe","element","callback","fallbackInView","window","IntersectionObserver","bounds","getBoundingClientRect","isIntersecting","target","intersectionRatio","threshold","time","boundingClientRect","intersectionRect","rootBounds","id","observer","elements","instance","thresholds","entries","forEach","entry","_a","inView","some","trackVisibility","isVisible","Array","isArray","createObserver","callbacks","push","splice","indexOf","length","delete","unobserve","size","disconnect","InView","React","Component","constructor","props","super","this","node","triggerOnce","skip","setState","initialInView","observeNode","children","isPlainChildren","onChange","state","componentDidUpdate","prevProps","rootMargin","delay","componentWillUnmount","_unobserveCb","handleChange","render","ref","handleNode","as","createElement"],"mappings":"wBACA,IAAIA,EAAYC,OAAOC,eAEnBC,EAAgB,CAACC,EAAKC,EAAKC,KADT,EAACF,EAAKC,EAAKC,KAAUD,KAAOD,EAAMJ,EAAUI,EAAKC,EAAK,CAAEE,YAAY,EAAMC,cAAc,EAAMC,UAAU,EAAMH,UAAWF,EAAIC,GAAOC,CAAK,EAE7JI,CAAgBN,EAAoB,iBAARC,EAAmBA,EAAM,GAAKA,EAAKC,GACxDA,GAOLK,EAA8B,IAAIC,IAClCC,EAA0B,IAAIC,QAC9BC,EAAS,EAcb,SAASC,EAAYC,GACnB,OAAOhB,OAAOiB,KAAKD,GAASE,OAAOC,QAChCf,QAAyB,IAAjBY,EAAQZ,KACjBgB,KAAKhB,IACL,MAAO,GAAGA,KAAe,SAARA,GAbFiB,EAa6BL,EAAQK,KAZjDA,GAEDT,EAAQU,IAAID,KAEhBP,GAAU,EACVF,EAAQW,IAAIF,EAAMP,EAAOU,aAFhBZ,EAAQa,IAAIJ,IAFZ,KAWqDL,EAAQZ,KAbxE,IAAmBiB,CAa2D,IACzEG,UACL,CA6BA,SAASE,EAAQC,EAASC,EAAUZ,EAAU,CAAE,EAAEa,EAhD3B,WAiDrB,QAA2C,IAAhCC,OAAOC,2BAA2D,IAAnBF,EAA2B,CACnF,MAAMG,EAASL,EAAQM,wBAUvB,OATAL,EAASC,EAAgB,CACvBK,eAAgBL,EAChBM,OAAQR,EACRS,kBAAgD,iBAAtBpB,EAAQqB,UAAyBrB,EAAQqB,UAAY,EAC/EC,KAAM,EACNC,mBAAoBP,EACpBQ,iBAAkBR,EAClBS,WAAYT,IAEP,MAER,CACD,MAAMU,GAAEA,EAAEC,SAAEA,EAAQC,SAAEA,GA3CxB,SAAwB5B,GACtB,IAAI0B,EAAK3B,EAAYC,GACjB6B,EAAWnC,EAAYe,IAAIi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MAAMC,GACJA,EAAEnB,YACFA,EAAWtC,UACXA,EAAShB,KACTA,EAAIiE,WACJA,EAAUJ,SACVA,EAAQN,KACRA,EAAIvB,gBACJA,EAAekC,MACfA,EAAKT,cACLA,EAAajD,eACbA,KACG0C,GACDE,KAAKF,MACT,OAAOH,EAAM2B,cACXD,GAAM,MACN,CAAEF,IAAKnB,KAAKoB,cAAetB,GAC3BS,EAEH"}
1
+ {"version":3,"file":"index.mjs.js","sources":["../../../../node_modules/react-intersection-observer/index.mjs"],"sourcesContent":["\"use client\";\nvar __defProp = Object.defineProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField = (obj, key, value) => {\n __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\n return value;\n};\n\n// src/InView.tsx\nimport * as React from \"react\";\n\n// src/observe.ts\nvar observerMap = /* @__PURE__ */ new Map();\nvar RootIds = /* @__PURE__ */ new WeakMap();\nvar rootId = 0;\nvar unsupportedValue = void 0;\nfunction defaultFallbackInView(inView) {\n unsupportedValue = inView;\n}\nfunction getRootId(root) {\n if (!root)\n return \"0\";\n if (RootIds.has(root))\n return RootIds.get(root);\n rootId += 1;\n RootIds.set(root, rootId.toString());\n return RootIds.get(root);\n}\nfunction optionsToId(options) {\n return Object.keys(options).sort().filter(\n (key) => options[key] !== void 0\n ).map((key) => {\n return `${key}_${key === \"root\" ? getRootId(options.root) : options[key]}`;\n }).toString();\n}\nfunction createObserver(options) {\n let id = optionsToId(options);\n let instance = observerMap.get(id);\n if (!instance) {\n const elements = /* @__PURE__ */ new Map();\n let thresholds;\n const observer = new IntersectionObserver((entries) => {\n entries.forEach((entry) => {\n var _a;\n const inView = entry.isIntersecting && thresholds.some((threshold) => entry.intersectionRatio >= threshold);\n if (options.trackVisibility && typeof entry.isVisible === \"undefined\") {\n entry.isVisible = inView;\n }\n (_a = elements.get(entry.target)) == null ? void 0 : _a.forEach((callback) => {\n callback(inView, entry);\n });\n });\n }, options);\n thresholds = observer.thresholds || (Array.isArray(options.threshold) ? options.threshold : [options.threshold || 0]);\n instance = {\n id,\n observer,\n elements\n };\n observerMap.set(id, instance);\n }\n return instance;\n}\nfunction observe(element, callback, options = {}, fallbackInView = unsupportedValue) {\n if (typeof window.IntersectionObserver === \"undefined\" && fallbackInView !== void 0) {\n const bounds = element.getBoundingClientRect();\n callback(fallbackInView, {\n isIntersecting: fallbackInView,\n target: element,\n intersectionRatio: typeof options.threshold === \"number\" ? options.threshold : 0,\n time: 0,\n boundingClientRect: bounds,\n intersectionRect: bounds,\n rootBounds: bounds\n });\n return () => {\n };\n }\n const { id, observer, elements } = createObserver(options);\n let callbacks = elements.get(element) || [];\n if (!elements.has(element)) {\n elements.set(element, callbacks);\n }\n callbacks.push(callback);\n observer.observe(element);\n return function unobserve() {\n callbacks.splice(callbacks.indexOf(callback), 1);\n if (callbacks.length === 0) {\n elements.delete(element);\n observer.unobserve(element);\n }\n if (elements.size === 0) {\n observer.disconnect();\n observerMap.delete(id);\n }\n };\n}\n\n// src/InView.tsx\nfunction isPlainChildren(props) {\n return typeof props.children !== \"function\";\n}\nvar InView = class extends React.Component {\n constructor(props) {\n super(props);\n __publicField(this, \"node\", null);\n __publicField(this, \"_unobserveCb\", null);\n __publicField(this, \"handleNode\", (node) => {\n if (this.node) {\n this.unobserve();\n if (!node && !this.props.triggerOnce && !this.props.skip) {\n this.setState({ inView: !!this.props.initialInView, entry: void 0 });\n }\n }\n this.node = node ? node : null;\n this.observeNode();\n });\n __publicField(this, \"handleChange\", (inView, entry) => {\n if (inView && this.props.triggerOnce) {\n this.unobserve();\n }\n if (!isPlainChildren(this.props)) {\n this.setState({ inView, entry });\n }\n if (this.props.onChange) {\n this.props.onChange(inView, entry);\n }\n });\n this.state = {\n inView: !!props.initialInView,\n entry: void 0\n };\n }\n componentDidUpdate(prevProps) {\n if (prevProps.rootMargin !== this.props.rootMargin || prevProps.root !== this.props.root || prevProps.threshold !== this.props.threshold || prevProps.skip !== this.props.skip || prevProps.trackVisibility !== this.props.trackVisibility || prevProps.delay !== this.props.delay) {\n this.unobserve();\n this.observeNode();\n }\n }\n componentWillUnmount() {\n this.unobserve();\n this.node = null;\n }\n observeNode() {\n if (!this.node || this.props.skip)\n return;\n const {\n threshold,\n root,\n rootMargin,\n trackVisibility,\n delay,\n fallbackInView\n } = this.props;\n this._unobserveCb = observe(\n this.node,\n this.handleChange,\n {\n threshold,\n root,\n rootMargin,\n // @ts-ignore\n trackVisibility,\n // @ts-ignore\n delay\n },\n fallbackInView\n );\n }\n unobserve() {\n if (this._unobserveCb) {\n this._unobserveCb();\n this._unobserveCb = null;\n }\n }\n render() {\n const { children } = this.props;\n if (typeof children === \"function\") {\n const { inView, entry } = this.state;\n return children({ inView, entry, ref: this.handleNode });\n }\n const {\n as,\n triggerOnce,\n threshold,\n root,\n rootMargin,\n onChange,\n skip,\n trackVisibility,\n delay,\n initialInView,\n fallbackInView,\n ...props\n } = this.props;\n return React.createElement(\n as || \"div\",\n { ref: this.handleNode, ...props },\n children\n );\n }\n};\n\n// src/useInView.tsx\nimport * as React2 from \"react\";\nfunction useInView({\n threshold,\n delay,\n trackVisibility,\n rootMargin,\n root,\n triggerOnce,\n skip,\n initialInView,\n fallbackInView,\n onChange\n} = {}) {\n var _a;\n const [ref, setRef] = React2.useState(null);\n const callback = React2.useRef();\n const [state, setState] = React2.useState({\n inView: !!initialInView,\n entry: void 0\n });\n callback.current = onChange;\n React2.useEffect(\n () => {\n if (skip || !ref)\n return;\n let unobserve;\n unobserve = observe(\n ref,\n (inView, entry) => {\n setState({\n inView,\n entry\n });\n if (callback.current)\n callback.current(inView, entry);\n if (entry.isIntersecting && triggerOnce && unobserve) {\n unobserve();\n unobserve = void 0;\n }\n },\n {\n root,\n rootMargin,\n threshold,\n // @ts-ignore\n trackVisibility,\n // @ts-ignore\n delay\n },\n fallbackInView\n );\n return () => {\n if (unobserve) {\n unobserve();\n }\n };\n },\n // We break the rule here, because we aren't including the actual `threshold` variable\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [\n // If the threshold is an array, convert it to a string, so it won't change between renders.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n Array.isArray(threshold) ? threshold.toString() : threshold,\n ref,\n root,\n rootMargin,\n triggerOnce,\n skip,\n trackVisibility,\n fallbackInView,\n delay\n ]\n );\n const entryTarget = (_a = state.entry) == null ? void 0 : _a.target;\n const previousEntryTarget = React2.useRef();\n if (!ref && entryTarget && !triggerOnce && !skip && previousEntryTarget.current !== entryTarget) {\n previousEntryTarget.current = entryTarget;\n setState({\n inView: !!initialInView,\n entry: void 0\n });\n }\n const result = [setRef, state.inView, state.entry];\n result.ref = result[0];\n result.inView = result[1];\n result.entry = result[2];\n return result;\n}\nexport {\n InView,\n defaultFallbackInView,\n observe,\n useInView\n};\n//# sourceMappingURL=index.mjs.map"],"names":["__defProp","Object","defineProperty","__publicField","obj","key","value","enumerable","configurable","writable","__defNormalProp","observerMap","Map","RootIds","WeakMap","rootId","optionsToId","options","keys","sort","filter","map","root","has","set","toString","get","observe","element","callback","fallbackInView","window","IntersectionObserver","bounds","getBoundingClientRect","isIntersecting","target","intersectionRatio","threshold","time","boundingClientRect","intersectionRect","rootBounds","id","observer","elements","instance","thresholds","entries","forEach","entry","_a","inView","some","trackVisibility","isVisible","Array","isArray","createObserver","callbacks","push","splice","indexOf","length","delete","unobserve","size","disconnect","InView","React","Component","constructor","props","super","this","node","triggerOnce","skip","setState","initialInView","observeNode","children","isPlainChildren","onChange","state","componentDidUpdate","prevProps","rootMargin","delay","componentWillUnmount","_unobserveCb","handleChange","render","ref","handleNode","as","createElement"],"mappings":"wBACA,IAAIA,EAAYC,OAAOC,eAEnBC,EAAgB,CAACC,EAAKC,EAAKC,KADT,EAACF,EAAKC,EAAKC,KAAUD,KAAOD,EAAMJ,EAAUI,EAAKC,EAAK,CAAEE,YAAY,EAAMC,cAAc,EAAMC,UAAU,EAAMH,UAAWF,EA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 +1 @@
1
- {"version":3,"file":"useRef.js","sources":["../../../../../../node_modules/use-callback-ref/dist/es2015/useRef.js"],"sourcesContent":["import { useState } from 'react';\n/**\n * creates a MutableRef with ref change callback\n * @param initialValue - initial ref value\n * @param {Function} callback - a callback to run when value changes\n *\n * @example\n * const ref = useCallbackRef(0, (newValue, oldValue) => console.log(oldValue, '->', newValue);\n * ref.current = 1;\n * // prints 0 -> 1\n *\n * @see https://reactjs.org/docs/hooks-reference.html#useref\n * @see https://github.com/theKashey/use-callback-ref#usecallbackref---to-replace-reactuseref\n * @returns {MutableRefObject}\n */\nexport function useCallbackRef(initialValue, callback) {\n var ref = useState(function () { return ({\n // value\n value: initialValue,\n // last callback\n callback: callback,\n // \"memoized\" public interface\n facade: {\n get current() {\n return ref.value;\n },\n set current(value) {\n var last = ref.value;\n if (last !== value) {\n ref.value = value;\n ref.callback(value, last);\n }\n },\n },\n }); })[0];\n // update callback\n ref.callback = callback;\n return ref.facade;\n}\n"],"names":["useCallbackRef","initialValue","callback","ref","useState","value","facade","current","last"],"mappings":"iCAeO,SAASA,EAAeC,EAAcC,GACzC,IAAIC,EAAMC,GAAS,WAAc,MAAQ,CAErCC,MAAOJ,EAEPC,SAAUA,EAEVI,OAAQ,CACAC,cACA,OAAOJ,EAAIE,KACd,EACGE,YAAQF,GACR,IAAIG,EAAOL,EAAIE,MACXG,IAASH,IACTF,EAAIE,MAAQA,EACZF,EAAID,SAASG,EAAOG,GAE3B,GAEJ,IAAE,GAGP,OADAL,EAAID,SAAWA,EACRC,EAAIG,MACf"}
1
+ {"version":3,"file":"useRef.js","sources":["../../../../../../node_modules/use-callback-ref/dist/es2015/useRef.js"],"sourcesContent":["import { useState } from 'react';\n/**\n * creates a MutableRef with ref change callback\n * @param initialValue - initial ref value\n * @param {Function} callback - a callback to run when value changes\n *\n * @example\n * const ref = useCallbackRef(0, (newValue, oldValue) => console.log(oldValue, '->', newValue);\n * ref.current = 1;\n * // prints 0 -> 1\n *\n * @see https://reactjs.org/docs/hooks-reference.html#useref\n * @see https://github.com/theKashey/use-callback-ref#usecallbackref---to-replace-reactuseref\n * @returns {MutableRefObject}\n */\nexport function useCallbackRef(initialValue, callback) {\n var ref = useState(function () { return ({\n // value\n value: initialValue,\n // last callback\n callback: callback,\n // \"memoized\" public interface\n facade: {\n get current() {\n return ref.value;\n },\n set current(value) {\n var last = ref.value;\n if (last !== value) {\n ref.value = value;\n ref.callback(value, last);\n }\n },\n },\n }); })[0];\n // update callback\n ref.callback = callback;\n return ref.facade;\n}\n"],"names":["useCallbackRef","initialValue","callback","ref","useState","value","facade","current","last"],"mappings":"iCAeO,SAASA,EAAeC,EAAcC,GACzC,IAAIC,EAAMC,GAAS,WAAc,MAAQ,CAErCC,MAAOJ,EAEPC,SAAUA,EAEVI,OAAQ,CACJ,WAAIC,GACA,OAAOJ,EAAIE,KACd,EACD,WAAIE,CAAQF,GACR,IAAIG,EAAOL,EAAIE,MACXG,IAASH,IACTF,EAAIE,MAAQA,EACZF,EAAID,SAASG,EAAOG,GAE3B,GAEJ,IAAE,GAGP,OADAL,EAAID,SAAWA,EACRC,EAAIG,MACf"}
@@ -1,2 +1,2 @@
1
- import{__makeTemplateObject as t}from"../../../_virtual/_tslib.js";import r from"styled-components";var n,i=r.img(n||(n=t(["\n border-radius: 50%;\n height: ",";\n object-fit: cover;\n width: ",";\n"],["\n border-radius: 50%;\n height: ",";\n object-fit: cover;\n width: ",";\n"])),(function(t){return t.size}),(function(t){return t.size}));export{i as StyledAvatar,i as default};
1
+ import{__makeTemplateObject as n}from"../../../_virtual/_tslib.js";import o from"styled-components";var r,t=o.img(r||(r=n(["\n box-sizing: border-box;\n border-radius: 50%;\n height: ",";\n object-fit: cover;\n width: ",";\n box-shadow: ",";\n"],["\n box-sizing: border-box;\n border-radius: 50%;\n height: ",";\n object-fit: cover;\n width: ",";\n box-shadow: ",";\n"])),(function(n){return n.size}),(function(n){return n.size}),(function(n){return n.theme.shadows.s}));export{t as StyledAvatar,t as default};
2
2
  //# sourceMappingURL=styles.js.map
@@ -1,2 +1,2 @@
1
- import{__makeTemplateObject as n}from"../../../_virtual/_tslib.js";import o,{css as r}from"styled-components";var t,e,c,i,a,l,d,u,s="3rem",b="4rem",m=o.span(t||(t=n(["\n margin-left: ",";\n &:first-of-type {\n margin-left: 0;\n }\n"],["\n margin-left: ",";\n &:first-of-type {\n margin-left: 0;\n }\n"])),(function(n){return n.theme.spacing.xxs})),h=o.button(u||(u=n(["\n box-sizing: border-box;\n min-height: ",";\n height: min-content;\n display: inline-block;\n vertical-align: middle;\n padding: ",";\n width: ",";\n min-width: ",";\n\n border-radius: ",";\n border-style: solid;\n border-width: ",";\n\n transition: color 0.2s ease, background-color 0.2s ease,\n border-color 0.2s ease;\n\n cursor: pointer;\n font-size: ",";\n font-family: ",";\n font-weight: ",";\n text-align: center;\n text-transform: ",";\n text-decoration: ",";\n\n &:focus-visible {\n outline: auto;\n }\n\n ","\n\n ","\n\n ","\n \n ","\n\n ","\n\n ","\n"],["\n box-sizing: border-box;\n min-height: ",";\n height: min-content;\n display: inline-block;\n vertical-align: middle;\n padding: ",";\n width: ",";\n min-width: ",";\n\n border-radius: ",";\n border-style: solid;\n border-width: ",";\n\n transition: color 0.2s ease, background-color 0.2s ease,\n border-color 0.2s ease;\n\n cursor: pointer;\n font-size: ",";\n font-family: ",";\n font-weight: ",";\n text-align: center;\n text-transform: ",";\n text-decoration: ",";\n\n &:focus-visible {\n outline: auto;\n }\n\n ","\n\n ","\n\n ","\n \n ","\n\n ","\n\n ","\n"])),s,(function(n){var o=n.theme;return n.isIconButton?"0":"calc( (".concat(s," - ( ").concat(o.button.buttonBorderThickness," * 2) - ").concat(o.typography.lineHeight," ) / 2) ").concat(o.button.horizontalPadding)}),(function(n){return n.isIconButton?"".concat(s):"auto"}),(function(n){return n.isIconButton?"".concat(s):"auto"}),(function(n){return n.theme.button.borderRadius}),(function(n){return n.theme.button.buttonBorderThickness}),(function(n){return n.theme.fontSizes.m}),(function(n){return n.theme.typography.fontFamilyHeadings}),(function(n){return n.theme.typography.fontWeightMedium}),(function(n){return n.theme.button.textTransform}),(function(n){return n.theme.button.textDecoration}),(function(o){return"primary"===o.appearance&&r(e||(e=n(["\n background-color: ",";\n border-color: ",";\n color: "," !important;\n :focus,\n :hover {\n background-color: ",";\n border-color: ",";\n color: "," !important;\n }\n :disabled {\n cursor: not-allowed;\n background-color: ",";\n color: "," !important;\n border-color: ",";\n }\n "],["\n background-color: ",";\n border-color: ",";\n color: "," !important;\n :focus,\n :hover {\n background-color: ",";\n border-color: ",";\n color: "," !important;\n }\n :disabled {\n cursor: not-allowed;\n background-color: ",";\n color: "," !important;\n border-color: ",";\n }\n "])),o.theme.colors.buttonPrimaryBackground,o.theme.colors.buttonPrimaryBorder,o.theme.colors.buttonPrimaryText,o.theme.colors.buttonPrimaryBackgroundHover,o.theme.colors.buttonPrimaryBorderHover,o.theme.colors.buttonPrimaryTextHover,o.theme.colors.buttonPrimaryDisabledBackground,o.theme.colors.buttonPrimaryDisabledText,o.theme.colors.buttonPrimaryDisabledBorder)}),(function(o){return"secondary"===o.appearance&&r(c||(c=n(["\n background-color: ",";\n border-color: ",";\n color: "," !important;\n :focus,\n :hover {\n background-color: ",";\n border-color: ",";\n color: "," !important;\n }\n :disabled {\n cursor: not-allowed;\n background-color: ",";\n color: "," !important;\n border-color: ",";\n }\n "],["\n background-color: ",";\n border-color: ",";\n color: "," !important;\n :focus,\n :hover {\n background-color: ",";\n border-color: ",";\n color: "," !important;\n }\n :disabled {\n cursor: not-allowed;\n background-color: ",";\n color: "," !important;\n border-color: ",";\n }\n "])),o.theme.colors.buttonSecondaryBackground,o.theme.colors.buttonSecondaryBorder,o.theme.colors.buttonSecondaryText,o.theme.colors.buttonSecondaryBackgroundHover,o.theme.colors.buttonSecondaryBorderHover,o.theme.colors.buttonSecondaryTextHover,o.theme.colors.buttonSecondaryDisabledBackground,o.theme.colors.buttonSecondaryDisabledText,o.theme.colors.buttonSecondaryDisabledBorder)}),(function(o){return"tertiary"===o.appearance&&r(i||(i=n(["\n display: inline-block;\n padding: 0;\n border: 0px;\n background-color: rgba(255, 255, 255, 0);\n transition: color 0.2s ease;\n color: ",";\n :focus,\n :hover {\n color: ",";\n }\n :disabled {\n cursor: not-allowed;\n background-color: transparent;\n color: "," !important;\n border-color: transparent;\n }\n "],["\n display: inline-block;\n padding: 0;\n border: 0px;\n background-color: rgba(255, 255, 255, 0);\n transition: color 0.2s ease;\n color: ",";\n :focus,\n :hover {\n color: ",";\n }\n :disabled {\n cursor: not-allowed;\n background-color: transparent;\n color: "," !important;\n border-color: transparent;\n }\n "])),o.theme.colors.buttonTertiaryText,o.theme.colors.buttonTertiaryTextHover,o.theme.colors.buttonTertiaryDisabledText)}),(function(o){return"l"===o.size&&r(a||(a=n(["\n min-height: ",";\n border-radius: ",";\n padding: ",";\n min-width: ",";\n height: ",";\n "],["\n min-height: ",";\n border-radius: ",";\n padding: ",";\n min-width: ",";\n height: ",";\n "])),b,(function(n){return n.theme.button.borderRadiusLarge}),(function(n){var o=n.theme;return n.isIconButton?"0":"calc( (".concat(b," - ( ").concat(o.button.buttonBorderThickness," * 2) - ").concat(o.typography.lineHeight," ) / 2) ").concat(o.spacing.m)}),(function(n){return n.isIconButton?"".concat(b):"auto"}),(function(n){return n.isIconButton?"".concat(b):"min-content"}))}),(function(o){return o.full&&r(l||(l=n(["\n width: 100%;\n "],["\n width: 100%;\n "])))}),(function(o){return o.css&&r(d||(d=n(["\n ","\n "],["\n ","\n "])),o.css)}));export{m as Spacer,h as StyledButton};
1
+ import{__makeTemplateObject as n}from"../../../_virtual/_tslib.js";import o,{css as r}from"styled-components";var t,e,c,i,a,l,d,u,s="3rem",b="4rem",m=o.span(t||(t=n(["\n margin-left: ",";\n &:first-of-type {\n margin-left: 0;\n }\n"],["\n margin-left: ",";\n &:first-of-type {\n margin-left: 0;\n }\n"])),(function(n){return n.theme.spacing.xxs})),h=o.button(u||(u=n(["\n box-sizing: border-box;\n min-height: ",";\n height: min-content;\n display: inline-block;\n vertical-align: middle;\n\n padding: ",";\n width: ",";\n min-width: ",";\n\n border-radius: ",";\n border-style: solid;\n border-width: ",";\n\n transition: color 0.2s ease, background-color 0.2s ease,\n border-color 0.2s ease;\n\n cursor: pointer;\n font-size: ",";\n font-family: ",";\n font-weight: ",";\n text-align: center;\n text-transform: ",";\n text-decoration: ",";\n\n &:focus-visible {\n outline: auto;\n }\n\n ","\n\n ","\n\n ","\n \n ","\n\n ","\n\n ","\n"],["\n box-sizing: border-box;\n min-height: ",";\n height: min-content;\n display: inline-block;\n vertical-align: middle;\n\n padding: ",";\n width: ",";\n min-width: ",";\n\n border-radius: ",";\n border-style: solid;\n border-width: ",";\n\n transition: color 0.2s ease, background-color 0.2s ease,\n border-color 0.2s ease;\n\n cursor: pointer;\n font-size: ",";\n font-family: ",";\n font-weight: ",";\n text-align: center;\n text-transform: ",";\n text-decoration: ",";\n\n &:focus-visible {\n outline: auto;\n }\n\n ","\n\n ","\n\n ","\n \n ","\n\n ","\n\n ","\n"])),s,(function(n){var o=n.theme;return n.isIconButton?"0":"calc( (".concat(s," - ( ").concat(o.button.buttonBorderThickness," * 2) - ").concat(o.typography.lineHeight," ) / 2) ").concat(o.button.horizontalPadding)}),(function(n){return n.isIconButton?"".concat(s):"auto"}),(function(n){return n.isIconButton?"".concat(s):"auto"}),(function(n){return n.theme.button.borderRadius}),(function(n){return n.theme.button.buttonBorderThickness}),(function(n){return n.theme.fontSizes.m}),(function(n){return n.theme.typography.fontFamilyButtons}),(function(n){return n.theme.typography.fontWeightButtons}),(function(n){return n.theme.button.textTransform}),(function(n){return n.theme.button.textDecoration}),(function(o){return"primary"===o.appearance&&r(e||(e=n(["\n background-color: ",";\n border-color: ",";\n color: "," !important;\n :focus,\n :hover {\n background-color: ",";\n border-color: ",";\n color: "," !important;\n }\n :disabled {\n cursor: not-allowed;\n background-color: ",";\n color: "," !important;\n border-color: ",";\n }\n "],["\n background-color: ",";\n border-color: ",";\n color: "," !important;\n :focus,\n :hover {\n background-color: ",";\n border-color: ",";\n color: "," !important;\n }\n :disabled {\n cursor: not-allowed;\n background-color: ",";\n color: "," !important;\n border-color: ",";\n }\n "])),o.theme.colors.buttonPrimaryBackground,o.theme.colors.buttonPrimaryBorder,o.theme.colors.buttonPrimaryText,o.theme.colors.buttonPrimaryBackgroundHover,o.theme.colors.buttonPrimaryBorderHover,o.theme.colors.buttonPrimaryTextHover,o.theme.colors.buttonPrimaryDisabledBackground,o.theme.colors.buttonPrimaryDisabledText,o.theme.colors.buttonPrimaryDisabledBorder)}),(function(o){return"secondary"===o.appearance&&r(c||(c=n(["\n background-color: ",";\n border-color: ",";\n color: "," !important;\n :focus,\n :hover {\n background-color: ",";\n border-color: ",";\n color: "," !important;\n }\n :disabled {\n cursor: not-allowed;\n background-color: ",";\n color: "," !important;\n border-color: ",";\n }\n "],["\n background-color: ",";\n border-color: ",";\n color: "," !important;\n :focus,\n :hover {\n background-color: ",";\n border-color: ",";\n color: "," !important;\n }\n :disabled {\n cursor: not-allowed;\n background-color: ",";\n color: "," !important;\n border-color: ",";\n }\n "])),o.theme.colors.buttonSecondaryBackground,o.theme.colors.buttonSecondaryBorder,o.theme.colors.buttonSecondaryText,o.theme.colors.buttonSecondaryBackgroundHover,o.theme.colors.buttonSecondaryBorderHover,o.theme.colors.buttonSecondaryTextHover,o.theme.colors.buttonSecondaryDisabledBackground,o.theme.colors.buttonSecondaryDisabledText,o.theme.colors.buttonSecondaryDisabledBorder)}),(function(o){return"tertiary"===o.appearance&&r(i||(i=n(["\n display: inline-block;\n padding: 0;\n border: 0px;\n background-color: rgba(255, 255, 255, 0);\n transition: color 0.2s ease;\n color: ",";\n :focus,\n :hover {\n color: ",";\n }\n :disabled {\n cursor: not-allowed;\n background-color: transparent;\n color: "," !important;\n border-color: transparent;\n }\n "],["\n display: inline-block;\n padding: 0;\n border: 0px;\n background-color: rgba(255, 255, 255, 0);\n transition: color 0.2s ease;\n color: ",";\n :focus,\n :hover {\n color: ",";\n }\n :disabled {\n cursor: not-allowed;\n background-color: transparent;\n color: "," !important;\n border-color: transparent;\n }\n "])),o.theme.colors.buttonTertiaryText,o.theme.colors.buttonTertiaryTextHover,o.theme.colors.buttonTertiaryDisabledText)}),(function(o){return"l"===o.size&&r(a||(a=n(["\n min-height: ",";\n border-radius: ",";\n padding: ",";\n min-width: ",";\n height: ",";\n "],["\n min-height: ",";\n border-radius: ",";\n padding: ",";\n min-width: ",";\n height: ",";\n "])),b,(function(n){return n.theme.button.borderRadiusLarge}),(function(n){var o=n.theme;return n.isIconButton?"0":"calc( (".concat(b," - ( ").concat(o.button.buttonBorderThickness," * 2) - ").concat(o.typography.lineHeight," ) / 2) ").concat(o.spacing.m)}),(function(n){return n.isIconButton?"".concat(b):"auto"}),(function(n){return n.isIconButton?"".concat(b):"min-content"}))}),(function(o){return o.full&&r(l||(l=n(["\n width: 100%;\n "],["\n width: 100%;\n "])))}),(function(o){return o.css&&r(d||(d=n(["\n ","\n "],["\n ","\n "])),o.css)}));export{m as Spacer,h as StyledButton};
2
2
  //# sourceMappingURL=styles.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e,__rest as r}from"../../../_virtual/_tslib.js";import o,{forwardRef as t}from"react";import{useTheme as s,ThemeProvider as i}from"styled-components";import{faCheck as a}from"../../../node_modules/@fortawesome/free-solid-svg-icons/index.mjs.js";import l from"../../themes/cruk.js";import m from"../ErrorText/index.js";import d from"../IconFa/index.js";import{StyledLabel as c,StyledInput as n,SelectedBorder as f,CheckWrapper as u,Check as p}from"./styles.js";var E=t((function(t,E){var h=s(),b=e(e({},l),h),x=t.children,j=r(t,["children"]);return o.createElement(i,{theme:b},o.createElement(c,{hasError:t.hasError||!!t.errorMessage||!1,checked:t.checked||t.defaultChecked||!1,disabled:t.disabled||!1},o.createElement(n,e({},j,{disabled:t.disabled||!1,type:"checkbox",ref:E,"aria-describedby":t.id&&t.errorMessage?"".concat(t.id,"-error"):void 0})),o.createElement(f,null),x||t.value,b.utilities.useDefaultFromControls?null:o.createElement(u,null,o.createElement(p,null,o.createElement(d,{faIcon:a,color:"primary",size:"1.25em"})))),!!t.errorMessage&&o.createElement(m,{marginTop:"xxs",id:t.id?"".concat(t.id,"-error"):void 0},t.errorMessage))}));export{E as default};
1
+ import{__assign as e,__rest as r}from"../../../_virtual/_tslib.js";import o,{forwardRef as t}from"react";import{useTheme as s,ThemeProvider as i}from"styled-components";import{faCheck as a}from"../../../node_modules/@fortawesome/free-solid-svg-icons/index.mjs.js";import l from"../../themes/cruk.js";import m from"../ErrorText/index.js";import c from"../IconFa/index.js";import{StyledLabel as d,StyledInput as n,SelectedBorder as f,CheckWrapper as u,Check as p}from"./styles.js";var h=t((function(t,h){var E=s(),b=e(e({},l),E),x=t.children,j=r(t,["children"]);return o.createElement(i,{theme:b},o.createElement(d,{hasError:t.hasError||!!t.errorMessage||!1,checked:t.checked||t.defaultChecked||!1,disabled:t.disabled||!1},o.createElement(n,e({},j,{disabled:t.disabled||!1,type:"checkbox",ref:h,"aria-describedby":t.id&&t.errorMessage?"".concat(t.id,"-error"):void 0})),o.createElement(f,null),x||t.value,b.utilities.useDefaultFromControls?null:o.createElement(u,null,o.createElement(p,null,o.createElement(c,{faIcon:a,color:"check",size:"1.25em"})))),!!t.errorMessage&&o.createElement(m,{marginTop:"xxs",id:t.id?"".concat(t.id,"-error"):void 0},t.errorMessage))}));export{h as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- import{__makeTemplateObject as n}from"../../../_virtual/_tslib.js";import t,{css as o}from"styled-components";var e,i,r,s,a,l,c,d,p="1.5rem",u=t.div(e||(e=n(["\n display: inline-block;\n height: ",";\n width: ",";\n position: absolute;\n top: calc(50% - ("," / 2));\n left: ",";\n"],["\n display: inline-block;\n height: ",";\n width: ",";\n position: absolute;\n top: calc(50% - ("," / 2));\n left: ",";\n"])),p,p,p,(function(n){return n.theme.spacing.xs})),h=t.span(i||(i=n(["\n display: block;\n position: relative;\n border: 1px solid ",";\n height: ",";\n width: ",";\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 5;\n transition: border 0.25s ease;\n overflow: hidden;\n\n svg {\n /* asset is little wonky */\n margin-left: 0.05rem;\n path {\n transition: transform 0.25s ease;\n transform: rotateY(90deg);\n transform-origin: center;\n }\n }\n"],["\n display: block;\n position: relative;\n border: 1px solid ",";\n height: ",";\n width: ",";\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 5;\n transition: border 0.25s ease;\n overflow: hidden;\n\n svg {\n /* asset is little wonky */\n margin-left: 0.05rem;\n path {\n transition: transform 0.25s ease;\n transform: rotateY(90deg);\n transform-origin: center;\n }\n }\n"])),(function(n){return n.theme.colors.selectionBorder}),p,p),f=t.label(s||(s=n(["\n background-color: ",";\n position: relative;\n border-width: ",";\n border-style: solid;\n border-color: ",";\n cursor: ",";\n display: block;\n font-weight: ",";\n color: ",";\n padding: ",";\n &:focus ~ "," "," {\n outline: 2px solid #7aacfe; /* for non-webkit browsers */\n outline: 5px auto -webkit-focus-ring-color;\n }\n\n svg {\n path {\n fill: ",";\n }\n }\n\n ","\n"],["\n background-color: ",";\n position: relative;\n border-width: ",";\n border-style: solid;\n border-color: ",";\n cursor: ",";\n display: block;\n font-weight: ",";\n color: ",";\n padding: ",";\n &:focus ~ "," "," {\n outline: 2px solid #7aacfe; /* for non-webkit browsers */\n outline: 5px auto -webkit-focus-ring-color;\n }\n\n svg {\n path {\n fill: ",";\n }\n }\n\n ","\n"])),(function(n){return n.theme.colors.backgroundLight}),(function(n){return n.theme.utilities.inputBorderWidth}),(function(n){var t=n.disabled,o=n.hasError,e=n.theme,i=n.checked;return t?e.colors.disabled:o?e.colors.textError:i&&!e.utilities.useDefaultFocusRect?e.colors.primary:e.colors.inputBorder}),(function(n){return n.disabled?"not-allowed":"pointer"}),(function(n){var t=n.theme;return n.checked||!t.utilities.useDefaultFocusRect?t.typography.fontWeightHeavy:t.typography.fontWeightNormal}),(function(n){var t=n.theme;return n.disabled?t.colors.disabled:t.colors.textDark}),(function(n){var t=n.theme;return"calc( (".concat("3em"," - ( ").concat(t.utilities.inputBorderWidth," * 2) - ").concat(t.typography.lineHeight," ) / 2) ").concat(t.spacing.m," calc( (").concat("3em"," - ( ").concat(t.utilities.inputBorderWidth," * 2) - ").concat(t.typography.lineHeight," ) / 2) ").concat(t.spacing.xl)}),u,h,(function(n){var t=n.theme;return n.disabled&&t.colors.disabled}),(function(t){var e=t.theme,i=t.disabled;return e.utilities.useDefaultFromControls?null:o(r||(r=n(["\n min-height: 2rem;\n &:hover "," "," {\n border: solid 1px\n ",";\n }\n "],["\n min-height: 2rem;\n &:hover "," "," {\n border: solid 1px\n ",";\n }\n "])),u,h,(function(n){var t=n.theme.colors,o=t.primary,e=t.disabled;return i?e:o}))})),g=t.div(a||(a=n(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"],["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"]))),b=t.input(d||(d=n(["\n margin-right: 5px !important;\n\n ","\n"],["\n margin-right: 5px !important;\n\n ","\n"])),(function(t){var e=t.theme;return e.utilities.useDefaultFromControls?o(l||(l=n(["\n position: absolute;\n display: inline-block;\n transform: translate(-50%, -50%);\n top: 50%;\n margin: 0;\n padding: 0;\n left: ",";\n "],["\n position: absolute;\n display: inline-block;\n transform: translate(-50%, -50%);\n top: 50%;\n margin: 0;\n padding: 0;\n left: ",";\n "])),(function(n){return n.theme.spacing.s})):o(c||(c=n(["\n /* This hides the original input */\n position: absolute;\n left: ",";\n opacity: 0;\n\n &:focus ~ "," {\n outline: none !important;\n box-shadow: inset 0 0 0 2px ",";\n box-shadow: inset 0 0 0 2px -webkit-focus-ring-color;\n }\n\n &:checked ~ "," svg path {\n transform: rotateY(0deg);\n }\n "],["\n /* This hides the original input */\n position: absolute;\n left: ",";\n opacity: 0;\n\n &:focus ~ "," {\n outline: none !important;\n box-shadow: inset 0 0 0 2px ",";\n box-shadow: inset 0 0 0 2px -webkit-focus-ring-color;\n }\n\n &:checked ~ "," svg path {\n transform: rotateY(0deg);\n }\n "])),(function(n){return n.theme.spacing.xxs}),g,e.colors.inputBorder,u)}));export{h as Check,u as CheckWrapper,g as SelectedBorder,b as StyledInput,f as StyledLabel};
1
+ import{__makeTemplateObject as n}from"../../../_virtual/_tslib.js";import o,{css as t}from"styled-components";var e,i,r,s,a,l,c,d,p="1.5rem",h=o.div(e||(e=n(["\n display: inline-block;\n height: ",";\n width: ",";\n position: absolute;\n top: calc(50% - ("," / 2));\n left: ",";\n"],["\n display: inline-block;\n height: ",";\n width: ",";\n position: absolute;\n top: calc(50% - ("," / 2));\n left: ",";\n"])),p,p,p,(function(n){return n.theme.spacing.xs})),u=o.span(i||(i=n(["\n display: block;\n position: relative;\n border: 2px solid ",";\n height: ",";\n width: ",";\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 5;\n transition: border 0.25s ease;\n overflow: hidden;\n\n svg {\n path {\n transition: transform 0.25s ease;\n transform: rotateY(90deg);\n transform-origin: center;\n }\n }\n"],["\n display: block;\n position: relative;\n border: 2px solid ",";\n height: ",";\n width: ",";\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 5;\n transition: border 0.25s ease;\n overflow: hidden;\n\n svg {\n path {\n transition: transform 0.25s ease;\n transform: rotateY(90deg);\n transform-origin: center;\n }\n }\n"])),(function(n){return n.theme.colors.selectionBorder}),p,p),f=o.label(s||(s=n(["\n box-sizing: border-box;\n *,\n *:after,\n *:before {\n box-sizing: border-box;\n }\n line-height: ",";\n font-size: ",";\n font-family: ",";\n\n background-color: ",";\n position: relative;\n\n cursor: ",";\n display: block;\n\n color: ",";\n padding: ",";\n &:focus ~ "," "," {\n outline: 2px solid #7aacfe; /* for non-webkit browsers */\n outline: 5px auto -webkit-focus-ring-color;\n }\n\n svg {\n path {\n fill: ",";\n }\n }\n\n ","\n"],["\n box-sizing: border-box;\n *,\n *:after,\n *:before {\n box-sizing: border-box;\n }\n line-height: ",";\n font-size: ",";\n font-family: ",";\n\n background-color: ",";\n position: relative;\n\n cursor: ",";\n display: block;\n\n color: ",";\n padding: ",";\n &:focus ~ "," "," {\n outline: 2px solid #7aacfe; /* for non-webkit browsers */\n outline: 5px auto -webkit-focus-ring-color;\n }\n\n svg {\n path {\n fill: ",";\n }\n }\n\n ","\n"])),(function(n){return n.theme.typography.lineHeight}),(function(n){return n.theme.typography.fontSizeBase}),(function(n){return n.theme.typography.fontFamilyBase}),(function(n){return n.theme.colors.backgroundLight}),(function(n){return n.disabled?"not-allowed":"pointer"}),(function(n){var o=n.theme;return n.disabled?o.colors.disabled:o.colors.textDark}),(function(n){var o=n.theme;return"calc( (".concat("3em"," - ( ").concat(o.utilities.inputBorderWidth," * 2) - ").concat(o.typography.lineHeight," ) / 2) ").concat(o.spacing.m," calc( (").concat("3em"," - ( ").concat(o.utilities.inputBorderWidth," * 2) - ").concat(o.typography.lineHeight," ) / 2) ").concat(o.spacing.xl)}),h,u,(function(n){var o=n.theme;return n.disabled&&o.colors.disabled}),(function(o){var e=o.theme,i=o.disabled,s=o.checked,a=o.hasError;return e.utilities.useDefaultFromControls?null:t(r||(r=n(["\n min-height: 2rem;\n\n "," "," {\n border: solid ","\n ",";\n }\n\n &:hover "," "," {\n border: solid ","\n ",";\n }\n "],["\n min-height: 2rem;\n\n "," "," {\n border: solid ","\n ",";\n }\n\n &:hover "," "," {\n border: solid ","\n ",";\n }\n "])),h,u,"2px",(function(n){var o=n.theme.colors,t=o.check,e=o.disabled,r=o.inputBorder,l=o.danger;return i?e:a?l:s?t:r}),h,u,"2px",(function(n){var o=n.theme.colors,t=o.check,e=o.disabled;return i?e:t}))})),b=o.div(a||(a=n(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"],["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"]))),g=o.input(d||(d=n(["\n margin-right: 5px !important;\n\n ","\n"],["\n margin-right: 5px !important;\n\n ","\n"])),(function(o){var e=o.theme;return e.utilities.useDefaultFromControls?t(l||(l=n(["\n position: absolute;\n display: inline-block;\n transform: translate(-50%, -50%);\n top: 50%;\n margin: 0;\n padding: 0;\n left: ",";\n "],["\n position: absolute;\n display: inline-block;\n transform: translate(-50%, -50%);\n top: 50%;\n margin: 0;\n padding: 0;\n left: ",";\n "])),(function(n){return n.theme.spacing.s})):t(c||(c=n(["\n /* This hides the original input */\n position: absolute;\n left: ",";\n opacity: 0;\n\n &:focus ~ "," {\n outline: none !important;\n box-shadow: inset 0 0 0 2px ",";\n box-shadow: inset 0 0 0 2px -webkit-focus-ring-color;\n }\n\n &:checked ~ "," svg path {\n transform: rotateY(0deg);\n }\n "],["\n /* This hides the original input */\n position: absolute;\n left: ",";\n opacity: 0;\n\n &:focus ~ "," {\n outline: none !important;\n box-shadow: inset 0 0 0 2px ",";\n box-shadow: inset 0 0 0 2px -webkit-focus-ring-color;\n }\n\n &:checked ~ "," svg path {\n transform: rotateY(0deg);\n }\n "])),(function(n){return n.theme.spacing.xxs}),b,e.colors.inputBorder,h)}));export{u as Check,h as CheckWrapper,b as SelectedBorder,g as StyledInput,f as StyledLabel};
2
2
  //# sourceMappingURL=styles.js.map
@@ -1,2 +1,2 @@
1
- import e from"react";import r from"../ErrorText/index.js";import{Text as t}from"../Text/index.js";import a from"../TextField/index.js";import{Fieldset as n,DateTextFieldWrapper as o,LargeDateTextFieldWrapper as l,ErrorTextWrapper as i}from"./styles.js";var m=function(m){var d=m.label,u=m.hintText,s=m.day,c=m.month,h=m.year,p=m.dayName,x=void 0===p?"day":p,y=m.monthName,E=void 0===y?"month":y,b=m.yearName,g=void 0===b?"year":b,v=m.dayHasError,f=m.monthHasError,q=m.yearHasError,C=m.errorMessage,L=m.onChange,B=void 0===L?function(){}:L,F=m.onBlur,M=void 0===F?function(){}:F,T=m.onFocus,j=void 0===T?function(){}:T,H=m.disabled,I=m.required;return e.createElement(n,null,e.createElement(t,{as:"legend",textWeight:700,marginBottom:"xxs"},d," ",!!I&&" (required)"),u&&e.createElement(t,null,u),e.createElement(o,null,e.createElement(a,{label:"Day",type:"text",name:x,required:!!I,hideRequiredInLabel:!0,maxLength:2,autoComplete:"bday-day",pattern:"[0-9]*",inputMode:"numeric",value:s,onChange:B,onBlur:M,onFocus:j,hasError:v,disabled:H})),e.createElement(o,null,e.createElement(a,{label:"Month",type:"text",name:E,required:!!I,hideRequiredInLabel:!0,maxLength:2,autoComplete:"bday-month",pattern:"[0-9]*",inputMode:"numeric",value:c,onChange:B,onBlur:M,onFocus:j,hasError:f,disabled:H})),e.createElement(l,null,e.createElement(a,{label:"Year",type:"text",name:g,required:!!I,hideRequiredInLabel:!0,maxLength:4,autoComplete:"bday-year",pattern:"[0-9]*",inputMode:"numeric",value:h,onChange:B,onBlur:M,onFocus:j,hasError:q,disabled:H})),C&&e.createElement(i,null,e.createElement(r,{marginTop:"xxs"},C)))};export{m as default};
1
+ import e from"react";import{useTheme as t}from"styled-components";import r from"../ErrorText/index.js";import{Text as a}from"../Text/index.js";import n from"../TextField/index.js";import{Fieldset as o,DateTextFieldWrapper as l,LargeDateTextFieldWrapper as i,ErrorTextWrapper as m}from"./styles.js";var d=function(d){var u=d.label,s=d.hintText,p=d.day,y=d.month,h=d.year,c=d.dayName,x=void 0===c?"day":c,E=d.monthName,g=void 0===E?"month":E,b=d.yearName,f=void 0===b?"year":b,v=d.dayHasError,q=d.monthHasError,F=d.yearHasError,L=d.errorMessage,C=d.onChange,B=void 0===C?function(){}:C,M=d.onBlur,T=void 0===M?function(){}:M,j=d.onFocus,W=void 0===j?function(){}:j,H=d.disabled,I=d.required,N=t();return e.createElement(o,null,e.createElement(a,{as:"legend",textWeight:N.typography.fontWeightLabels||700,marginBottom:"xxs",textFontFamily:N.typography.fontFamilyLabel},u,!!I&&e.createElement("span",{style:{fontWeight:N.typography.fontWeightBase}}," (required)")),s&&e.createElement(a,null,s),e.createElement(l,null,e.createElement(n,{label:"Day",type:"text",name:x,required:!!I,hideRequiredInLabel:!0,maxLength:2,autoComplete:"bday-day",pattern:"[0-9]*",inputMode:"numeric",value:p,onChange:B,onBlur:T,onFocus:W,hasError:v,disabled:H})),e.createElement(l,null,e.createElement(n,{label:"Month",type:"text",name:g,required:!!I,hideRequiredInLabel:!0,maxLength:2,autoComplete:"bday-month",pattern:"[0-9]*",inputMode:"numeric",value:y,onChange:B,onBlur:T,onFocus:W,hasError:q,disabled:H})),e.createElement(i,null,e.createElement(n,{label:"Year",type:"text",name:f,required:!!I,hideRequiredInLabel:!0,maxLength:4,autoComplete:"bday-year",pattern:"[0-9]*",inputMode:"numeric",value:h,onChange:B,onBlur:T,onFocus:W,hasError:F,disabled:H})),L&&e.createElement(m,null,e.createElement(r,{marginTop:"xxs"},L)))};export{d as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- import{__makeTemplateObject as n}from"../../../_virtual/_tslib.js";import i from"styled-components";var t,r,e,a,o=i.fieldset(t||(t=n(["\n margin: 0;\n padding: 0;\n border: 0;\n"],["\n margin: 0;\n padding: 0;\n border: 0;\n"]))),s=i.div(r||(r=n(["\n display: inline-block;\n width: 60px;\n margin-right: ",";\n span {\n margin-bottom: 0.25rem; // this is smaller than xxs spacing\n font-weight: ",";\n }\n"],["\n display: inline-block;\n width: 60px;\n margin-right: ",";\n span {\n margin-bottom: 0.25rem; // this is smaller than xxs spacing\n font-weight: ",";\n }\n"])),(function(n){return n.theme.spacing.xs}),(function(n){return n.theme.typography.fontWeightNormal})),m=i(s)(e||(e=n(["\n width: 80px;\n"],["\n width: 80px;\n"]))),l=i.div(a||(a=n(["\n clear: left;\n"],["\n clear: left;\n"])));export{s as DateTextFieldWrapper,l as ErrorTextWrapper,o as Fieldset,m as LargeDateTextFieldWrapper};
1
+ import{__makeTemplateObject as n}from"../../../_virtual/_tslib.js";import i from"styled-components";import{Text as r}from"../Text/index.js";var o=i.fieldset(t||(t=n(["\n margin: 0;\n padding: 0;\n border: 0;\n *,\n *:after,\n *:before {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n }\n"],["\n margin: 0;\n padding: 0;\n border: 0;\n *,\n *:after,\n *:before {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n }\n"])));i(r)(e||(e=n(["\n font-family: ",";\n"],["\n font-family: ",";\n"])),(function(n){return n.theme.typography.fontFamilyLabel}));var t,e,a,b,s,m=i.div(a||(a=n(["\n display: inline-block;\n width: 60px;\n margin-right: ",";\n span {\n margin-bottom: 0.25rem; // this is smaller than xxs spacing\n font-weight: ","\n"],["\n display: inline-block;\n width: 60px;\n margin-right: ",";\n span {\n margin-bottom: 0.25rem; // this is smaller than xxs spacing\n font-weight: ","\n"])),(function(n){return n.theme.spacing.xs}),(function(n){return n.theme.typography.fontWeightBase})),g=i(m)(b||(b=n(["\n width: 80px;\n"],["\n width: 80px;\n"]))),x=i.div(s||(s=n(["\n clear: left;\n"],["\n clear: left;\n"])));export{m as DateTextFieldWrapper,x as ErrorTextWrapper,o as Fieldset,g as LargeDateTextFieldWrapper};
2
2
  //# sourceMappingURL=styles.js.map
@@ -1,2 +1,2 @@
1
- import o from"../themes/cruk.js";import n from"../themes/su2c.js";import t from"../themes/bowelbabe.js";var f=function(o){return o.map((function(o){return"\n @font-face {\n font-family: ".concat(o.family,";\n src: ").concat((null==o?void 0:o.urlWoff2)?'url("'.concat(o.urlWoff2,"\") format('woff2')"):"").concat(o.urlWoff&&(null==o?void 0:o.urlWoff2)?", ":"","\n ").concat((null==o?void 0:o.urlWoff)?'url("'.concat(o.urlWoff,"\") format('woff')"):"",";\n font-weight: normal;\n font-style: normal;\n font-display: fallback;\n }\n ")})).join("")},r="\n".concat(f(o.typography.customFonts),"\n").concat(f(n.typography.customFonts),"\n").concat(f(t.typography.customFonts),"\n");export{r as default,r as fontFaceStyleString};
1
+ import o from"../themes/cruk.js";import n from"../themes/su2c.js";import t from"../themes/bowelbabe.js";var f=function(o){return o.map((function(o){return"\n @font-face {\n font-family: ".concat(o.family,";\n src: ").concat((null==o?void 0:o.urlWoff2)?'url("'.concat(o.urlWoff2,"\") format('woff2')"):"").concat(o.urlWoff&&(null==o?void 0:o.urlWoff2)?", ":"","\n ").concat((null==o?void 0:o.urlWoff)?'url("'.concat(o.urlWoff,"\") format('woff')"):"",";\n font-weight: ").concat(o.fontWeight||"normal",";\n font-style: normal;\n font-display: fallback;\n }\n ")})).join("")},c="\n".concat(f(o.typography.customFonts),"\n").concat(f(n.typography.customFonts),"\n").concat(f(t.typography.customFonts),"\n");export{c as default,c as fontFaceStyleString};
2
2
  //# sourceMappingURL=Fontface.js.map
@@ -1,2 +1,2 @@
1
- import{__makeTemplateObject as n}from"../../../_virtual/_tslib.js";import t from"styled-components";var i,e,o,l,d,a,r,s,p,f,h,c=t.footer(i||(i=n(["\n box-sizing: border-box;\n display: block;\n position: relative;\n width: 100%;\n background-color: ",";\n"],["\n box-sizing: border-box;\n display: block;\n position: relative;\n width: 100%;\n background-color: ",";\n"])),(function(n){return n.theme.colors.footerBackground})),m=t.div(e||(e=n(["\n max-width: ",";\n display: block;\n margin: 0 auto;\n\n @media (min-width: ",") {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n }\n"],["\n max-width: ",";\n display: block;\n margin: 0 auto;\n\n @media (min-width: ",") {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n }\n"])),(function(n){return n.theme.utilities.contentMaxWidth}),(function(n){return n.theme.breakpoint.desktop})),u=t.div(o||(o=n(["\n display: inline-block;\n padding: ",";\n position: relative;\n width: 100%;\n flex: 0 1 auto;\n"],["\n display: inline-block;\n padding: ",";\n position: relative;\n width: 100%;\n flex: 0 1 auto;\n"])),(function(n){return n.theme.spacing.xs})),x=t(u)(l||(l=n(["\n width: 50%;\n display: block;\n float: left;\n\n @media (min-width: ",") {\n flex: 0 0 140px;\n width: auto;\n }\n"],["\n width: 50%;\n display: block;\n float: left;\n\n @media (min-width: ",") {\n flex: 0 0 140px;\n width: auto;\n }\n"])),(function(n){return n.theme.breakpoint.desktop})),w=t(u)(d||(d=n(["\n width: 50%;\n display: block;\n float: left;\n\n @media (min-width: ",") {\n flex: 0 0 170px;\n width: auto;\n }\n"],["\n width: 50%;\n display: block;\n float: left;\n\n @media (min-width: ",") {\n flex: 0 0 170px;\n width: auto;\n }\n"])),(function(n){return n.theme.breakpoint.desktop})),y=t.nav(a||(a=n(["\n display: flex;\n flex-direction: column;\n\n /* TODO: make this work with themes currently there is no difference, will fix when themes are strongly typed */\n a {\n font-size: ",";\n font-weight: ",";\n }\n"],["\n display: flex;\n flex-direction: column;\n\n /* TODO: make this work with themes currently there is no difference, will fix when themes are strongly typed */\n a {\n font-size: ",";\n font-weight: ",";\n }\n"])),(function(n){return n.theme.fontSizes.s}),(function(n){return n.theme.typography.fontWeightHeavy})),g=t.ul(r||(r=n(["\n padding: 0;\n margin: 0;\n"],["\n padding: 0;\n margin: 0;\n"]))),b=t.li(s||(s=n(["\n list-style-type: none;\n display: block;\n padding: 0;\n margin: 0;\n line-height: 1;\n padding-bottom: ",";\n"],["\n list-style-type: none;\n display: block;\n padding: 0;\n margin: 0;\n line-height: 1;\n padding-bottom: ",";\n"])),(function(n){return n.theme.spacing.xxs})),k=t(u)(p||(p=n(["\n flex: 0 0 150px;\n"],["\n flex: 0 0 150px;\n"]))),v=t.img(f||(f=n(["\n height: 40px;\n width: auto;\n"],["\n height: 40px;\n width: auto;\n"]))),z=t.address(h||(h=n(["\n display: flex;\n flex-direction: column;\n font-style: normal;\n"],["\n display: flex;\n flex-direction: column;\n font-style: normal;\n"])));export{m as FooterContentWrapper,u as FooterSection,k as FooterSectionAddress,w as FooterSectionLinks,x as FooterSectionLogo,z as StyledAddress,c as StyledFooter,b as StyledLI,y as StyledNav,v as StyledRegulatorLogo,g as StyledUL};
1
+ import{__makeTemplateObject as n}from"../../../_virtual/_tslib.js";import i from"styled-components";var t,e,o,l,d,a,r,p,s,f,c,h=i.footer(t||(t=n(["\n ",";\n box-sizing: border-box;\n display: block;\n position: relative;\n width: 100%;\n background-color: ",";\n"],["\n ",";\n box-sizing: border-box;\n display: block;\n position: relative;\n width: 100%;\n background-color: ",";\n"])),(function(n){return n.theme.colors.inputBorder}),(function(n){return n.theme.colors.footerBackground})),m=i.div(e||(e=n(["\n max-width: ",";\n display: block;\n margin: 0 auto;\n\n @media (min-width: ",") {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n }\n"],["\n max-width: ",";\n display: block;\n margin: 0 auto;\n\n @media (min-width: ",") {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n }\n"])),(function(n){return n.theme.utilities.contentMaxWidth}),(function(n){return n.theme.breakpoint.desktop})),u=i.div(o||(o=n(["\n box-sizing: border-box;\n display: inline-block;\n padding: ",";\n position: relative;\n width: 100%;\n flex: 0 1 auto;\n"],["\n box-sizing: border-box;\n display: inline-block;\n padding: ",";\n position: relative;\n width: 100%;\n flex: 0 1 auto;\n"])),(function(n){return n.theme.spacing.xs})),x=i(u)(l||(l=n(["\n width: 50%;\n display: block;\n float: left;\n\n @media (min-width: ",") {\n flex: 0 0 140px;\n width: auto;\n }\n"],["\n width: 50%;\n display: block;\n float: left;\n\n @media (min-width: ",") {\n flex: 0 0 140px;\n width: auto;\n }\n"])),(function(n){return n.theme.breakpoint.desktop})),b=i(u)(d||(d=n(["\n width: 50%;\n display: block;\n float: left;\n\n @media (min-width: ",") {\n flex: 0 0 170px;\n width: auto;\n }\n"],["\n width: 50%;\n display: block;\n float: left;\n\n @media (min-width: ",") {\n flex: 0 0 170px;\n width: auto;\n }\n"])),(function(n){return n.theme.breakpoint.desktop})),g=i.nav(a||(a=n(["\n display: flex;\n flex-direction: column;\n a {\n font-size: ",";\n font-weight: ",";\n }\n"],["\n display: flex;\n flex-direction: column;\n a {\n font-size: ",";\n font-weight: ",";\n }\n"])),(function(n){return n.theme.fontSizes.s}),(function(n){return n.theme.typography.fontWeightLinks})),y=i.ul(r||(r=n(["\n padding: 0;\n margin: 0;\n"],["\n padding: 0;\n margin: 0;\n"]))),w=i.li(p||(p=n(["\n list-style-type: none;\n display: block;\n padding: 0;\n margin: 0;\n line-height: 1;\n padding-bottom: ",";\n"],["\n list-style-type: none;\n display: block;\n padding: 0;\n margin: 0;\n line-height: 1;\n padding-bottom: ",";\n"])),(function(n){return n.theme.spacing.xxs})),k=i(u)(s||(s=n(["\n flex: 0 0 150px;\n"],["\n flex: 0 0 150px;\n"]))),v=i.img(f||(f=n(["\n height: 40px;\n width: auto;\n"],["\n height: 40px;\n width: auto;\n"]))),z=i.address(c||(c=n(["\n display: flex;\n flex-direction: column;\n font-style: normal;\n"],["\n display: flex;\n flex-direction: column;\n font-style: normal;\n"])));export{m as FooterContentWrapper,u as FooterSection,k as FooterSectionAddress,b as FooterSectionLinks,x as FooterSectionLogo,z as StyledAddress,h as StyledFooter,w as StyledLI,g as StyledNav,v as StyledRegulatorLogo,y as StyledUL};
2
2
  //# sourceMappingURL=styles.js.map
@@ -1,2 +1,2 @@
1
- import{__makeTemplateObject as n,__assign as o}from"../../_virtual/_tslib.js";import{createGlobalStyle as t,withTheme as e}from"styled-components";import i from"../themes/cruk.js";var r=t(a||(a=n(["\n ","\n *, *:after, *:before {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n }\n \n @media (prefers-reduced-motion: reduce) {\n *, *:after, *:before {\n animation-play-state: paused !important;\n animation-direction: reverse !important;\n transition: none !important;\n scroll-behavior: auto !important;\n }\n }\n\n table, td, th {\n border-spacing: 0;\n border: 1px solid #ccc;\n padding: 10px;\n }\n .no-focus-outline a:focus,\n .no-focus-outline button:focus {\n outline: none;\n }\n img {\n width: 100%;\n height: auto;\n }\n section {\n width: 100%;\n }\n button {\n font-size: 1em;\n }\n"],["\n ","\n *, *:after, *:before {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n }\n \n @media (prefers-reduced-motion: reduce) {\n *, *:after, *:before {\n animation-play-state: paused !important;\n animation-direction: reverse !important;\n transition: none !important;\n scroll-behavior: auto !important;\n }\n }\n\n table, td, th {\n border-spacing: 0;\n border: 1px solid #ccc;\n padding: 10px;\n }\n .no-focus-outline a:focus,\n .no-focus-outline button:focus {\n outline: none;\n }\n img {\n width: 100%;\n height: auto;\n }\n section {\n width: 100%;\n }\n button {\n font-size: 1em;\n }\n"])),(function(n){var t,e=o(o({},i),n.theme);return"\n ".concat((t=e.typography.customFonts,t.map((function(n){return"\n @font-face {\n font-family: ".concat(n.family,";\n src: ").concat((null==n?void 0:n.urlWoff2)?'url("'.concat(n.urlWoff2,"\") format('woff2')"):"").concat(n.urlWoff&&(null==n?void 0:n.urlWoff2)?", ":"","\n ").concat((null==n?void 0:n.urlWoff)?'url("'.concat(n.urlWoff,"\") format('woff')"):"",";\n font-weight: normal;\n font-style: normal;\n font-display: fallback;\n }\n ")})).join("")),"\n html {\n font-size: ").concat(e.typography.fontSizeBase,";\n font-family: ").concat(e.typography.fontFamilyBase,";\n line-height: ").concat(e.typography.lineHeight,";\n }\n body {\n background-color: ").concat(e.colors.backgroundMid,";\n color: ").concat(e.colors.textDark,";\n margin: 0;\n padding: 0;\n overflow-x: hidden;\n -webkit-text-size-adjust: 100%;\n -moz-text-size-adjust: none;\n -ms-text-size-adjust: 100%;\n }\n ")}));r.defaultProps={theme:i};var a,c=e(r);export{c as default};
1
+ import{__makeTemplateObject as n,__assign as o}from"../../_virtual/_tslib.js";import{createGlobalStyle as t,withTheme as e}from"styled-components";import i from"../themes/cruk.js";var r=t(a||(a=n(["\n ","\n *, *:after, *:before {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n }\n \n @media (prefers-reduced-motion: reduce) {\n *, *:after, *:before {\n animation-play-state: paused !important;\n animation-direction: reverse !important;\n transition: none !important;\n scroll-behavior: auto !important;\n }\n }\n\n table, td, th {\n border-spacing: 0;\n border: 1px solid #ccc;\n padding: 10px;\n }\n .no-focus-outline a:focus,\n .no-focus-outline button:focus {\n outline: none;\n }\n img {\n width: 100%;\n height: auto;\n }\n section {\n width: 100%;\n }\n button {\n font-size: 1em;\n }\n"],["\n ","\n *, *:after, *:before {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n }\n \n @media (prefers-reduced-motion: reduce) {\n *, *:after, *:before {\n animation-play-state: paused !important;\n animation-direction: reverse !important;\n transition: none !important;\n scroll-behavior: auto !important;\n }\n }\n\n table, td, th {\n border-spacing: 0;\n border: 1px solid #ccc;\n padding: 10px;\n }\n .no-focus-outline a:focus,\n .no-focus-outline button:focus {\n outline: none;\n }\n img {\n width: 100%;\n height: auto;\n }\n section {\n width: 100%;\n }\n button {\n font-size: 1em;\n }\n"])),(function(n){var t,e=o(o({},i),n.theme);return"\n ".concat((t=e.typography.customFonts,t.map((function(n){return"\n @font-face {\n font-family: ".concat(n.family,";\n src: ").concat((null==n?void 0:n.urlWoff2)?'url("'.concat(n.urlWoff2,"\") format('woff2')"):"").concat(n.urlWoff&&(null==n?void 0:n.urlWoff2)?", ":"","\n ").concat((null==n?void 0:n.urlWoff)?'url("'.concat(n.urlWoff,"\") format('woff')"):"",";\n font-weight: ").concat(null==n?void 0:n.fontWeight,";\n font-style: normal;\n font-display: fallback;\n }\n ")})).join("")),"\n html {\n font-size: ").concat(e.typography.fontSizeBase,";\n font-family: ").concat(e.typography.fontFamilyBase,";\n line-height: ").concat(e.typography.lineHeight,";\n }\n body {\n background-color: ").concat(e.colors.backgroundMid,";\n color: ").concat(e.colors.textDark,";\n margin: 0;\n padding: 0;\n overflow-x: hidden;\n -webkit-text-size-adjust: 100%;\n -moz-text-size-adjust: none;\n -ms-text-size-adjust: 100%;\n }\n ")}));r.defaultProps={theme:i};var a,c=e(r);export{c as default};
2
2
  //# sourceMappingURL=GlobalStyle.js.map
@@ -1,2 +1,2 @@
1
- import{__makeTemplateObject as n}from"../../../_virtual/_tslib.js";import t from"styled-components";import i from"../../themes/cruk.js";var e,o,a,r,h,d,s,u,c,l,p,f="120px",g="72px",m=i.spacing.xs,x="40px",w="0.2s",y=t.header(e||(e=n(["\n box-sizing: border-box;\n position: relative;\n width: 100%;\n background-color: ",";\n z-index: 9998;\n"],["\n box-sizing: border-box;\n position: relative;\n width: 100%;\n background-color: ",";\n z-index: 9998;\n"])),(function(n){return n.theme.colors.headerBackground})),b=t.div(o||(o=n(["\n position: relative;\n box-sizing: border-box;\n width: 100%;\n height: ",";\n\n @media (min-width: ",") {\n height: ",";\n }\n"],["\n position: relative;\n box-sizing: border-box;\n width: 100%;\n height: ",";\n\n @media (min-width: ",") {\n height: ",";\n }\n"])),g,(function(n){return n.theme.breakpoint.desktop}),f),v=t.div(a||(a=n(["\n width: 100%;\n height: 100%;\n padding: 0 ",";\n background-color: ",";\n position: relative;\n border-bottom: ",";\n height: ",";\n box-shadow: ",";\n top: ",";\n position: ",";\n transition: height "," ease;\n\n @media (min-width: ",") {\n position: ",";\n height: ",";\n }\n"],["\n width: 100%;\n height: 100%;\n padding: 0 ",";\n background-color: ",";\n position: relative;\n border-bottom: ",";\n height: ",";\n box-shadow: ",";\n top: ",";\n position: ",";\n transition: height "," ease;\n\n @media (min-width: ",") {\n position: ",";\n height: ",";\n }\n"])),m,(function(n){return n.theme.colors.headerBackground}),(function(n){var t=n.theme.colors.headerBorder;return"solid 1px ".concat(t)}),g,(function(n){var t=n.theme;return n.isSticky?t.shadows.l:"none"}),(function(n){return n.isSticky?0:"auto"}),(function(n){return n.isSticky?"fixed":"relative"}),w,(function(n){return n.theme.breakpoint.desktop}),(function(n){return n.isSticky?"fixed":"relative"}),(function(n){var t=n.isSmall,i=n.isSticky;return t&&i?g:f})),k=t.div(r||(r=n(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n height: 100%;\n margin: 0 auto;\n max-width: ",";\n"],["\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n height: 100%;\n margin: 0 auto;\n max-width: ",";\n"])),(function(n){var t=n.fullWidth,i=n.theme.utilities.contentMaxWidth;return t?"100%":i})),z=t.img(h||(h=n(["\n height: 100%;\n width: auto;\n max-width: 100%;\n max-height: 100%;\n"],["\n height: 100%;\n width: auto;\n max-width: 100%;\n max-height: 100%;\n"]))),S=t.div(d||(d=n(["\n display: flex;\n flex-direction: column;\n justify-content: space-around;\n width: auto;\n transition: height "," ease;\n\n height: ",";\n\n @media (min-width: ",") {\n height: ",";\n }\n"],["\n display: flex;\n flex-direction: column;\n justify-content: space-around;\n width: auto;\n transition: height "," ease;\n\n height: ",";\n\n @media (min-width: ",") {\n height: ",";\n }\n"])),w,x,(function(n){return n.theme.breakpoint.desktop}),(function(n){var t=n.isSmall,i=n.isSticky;return t&&i?x:"80px"})),j=t.a(s||(s=n(["\n display: inline-block;\n"],["\n display: inline-block;\n"]))),B=t.a(u||(u=n(["\n left: -999px;\n position: absolute;\n top: auto;\n width: 1px;\n height: 1px;\n overflow: hidden;\n z-index: -999;\n &:focus,\n &:active,\n &:focus-within {\n left: auto;\n top: auto;\n width: 30%;\n height: auto;\n overflow: auto;\n margin: 10px 35%;\n padding: ",";\n border-radius: 15px;\n border: 4px solid yellow;\n text-align: center;\n font-size: 1.2em;\n z-index: 999;\n }\n"],["\n left: -999px;\n position: absolute;\n top: auto;\n width: 1px;\n height: 1px;\n overflow: hidden;\n z-index: -999;\n &:focus,\n &:active,\n &:focus-within {\n left: auto;\n top: auto;\n width: 30%;\n height: auto;\n overflow: auto;\n margin: 10px 35%;\n padding: ",";\n border-radius: 15px;\n border: 4px solid yellow;\n text-align: center;\n font-size: 1.2em;\n z-index: 999;\n }\n"])),(function(n){return n.theme.spacing.xs})),W=t.p(c||(c=n(["\n flex: 1 1 auto;\n font-family: ",";\n font-weight: ",";\n font-size: ",";\n color: ",";\n text-align: center;\n opacity: 0;\n transition: opacity "," ease;\n display: none;\n\n @media (min-width: ",") {\n display: block;\n opacity: ",";\n }\n"],["\n flex: 1 1 auto;\n font-family: ",";\n font-weight: ",";\n font-size: ",";\n color: ",";\n text-align: center;\n opacity: 0;\n transition: opacity "," ease;\n display: none;\n\n @media (min-width: ",") {\n display: block;\n opacity: ",";\n }\n"])),(function(n){return n.theme.typography.fontFamilyHeadings}),(function(n){return n.theme.typography.fontWeightLight}),(function(n){return n.theme.fontSizes.xl}),(function(n){return n.theme.colors.primary}),w,(function(n){return n.theme.breakpoint.desktop}),(function(n){var t=n.isSmall,i=n.isSticky;return t&&i?0:1})),_=t.div(l||(l=n(["\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: space-around;\n"],["\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: space-around;\n"]))),F=t.div(p||(p=n(["\n height: auto;\n margin: auto 0;\n"],["\n height: auto;\n margin: auto 0;\n"])));export{F as ChildInner,_ as ChildWrapper,k as HeaderMainContent,v as HeaderStickyContainer,b as HeaderStickyPlaceHolder,z as Logo,S as LogoWrapper,B as SkipToMain,y as StyledHeader,j as StyledLink,W as Tagline};
1
+ import{__makeTemplateObject as n}from"../../../_virtual/_tslib.js";import i from"styled-components";import t from"../../themes/cruk.js";var e,o,r,a,d,h,s,l,u,c,p,x="120px",g="72px",m=t.spacing.xs,f="40px",b="0.2s",w=i.header(e||(e=n(["\n box-sizing: border-box;\n position: relative;\n width: 100%;\n background-color: ",";\n z-index: 9998;\n"],["\n box-sizing: border-box;\n position: relative;\n width: 100%;\n background-color: ",";\n z-index: 9998;\n"])),(function(n){return n.theme.colors.headerBackground})),y=i.div(o||(o=n(["\n position: relative;\n box-sizing: border-box;\n width: 100%;\n height: ",";\n\n @media (min-width: ",") {\n height: ",";\n }\n"],["\n position: relative;\n box-sizing: border-box;\n width: 100%;\n height: ",";\n\n @media (min-width: ",") {\n height: ",";\n }\n"])),g,(function(n){return n.theme.breakpoint.desktop}),x),v=i.div(r||(r=n(["\n box-sizing: border-box;\n width: 100%;\n height: 100%;\n padding: 0 ",";\n background-color: ",";\n position: relative;\n border-bottom: ",";\n height: ",";\n box-shadow: ",";\n top: ",";\n position: ",";\n transition: height "," ease;\n\n @media (min-width: ",") {\n position: ",";\n height: ",";\n }\n"],["\n box-sizing: border-box;\n width: 100%;\n height: 100%;\n padding: 0 ",";\n background-color: ",";\n position: relative;\n border-bottom: ",";\n height: ",";\n box-shadow: ",";\n top: ",";\n position: ",";\n transition: height "," ease;\n\n @media (min-width: ",") {\n position: ",";\n height: ",";\n }\n"])),m,(function(n){return n.theme.colors.headerBackground}),(function(n){var i=n.theme.colors.headerBorder;return"solid 1px ".concat(i)}),g,(function(n){var i=n.theme;return n.isSticky?i.shadows.l:"none"}),(function(n){return n.isSticky?0:"auto"}),(function(n){return n.isSticky?"fixed":"relative"}),b,(function(n){return n.theme.breakpoint.desktop}),(function(n){return n.isSticky?"fixed":"relative"}),(function(n){var i=n.isSmall,t=n.isSticky;return i&&t?g:x})),k=i.div(a||(a=n(["\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n height: 100%;\n margin: 0 auto;\n max-width: ",";\n"],["\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n height: 100%;\n margin: 0 auto;\n max-width: ",";\n"])),(function(n){var i=n.fullWidth,t=n.theme.utilities.contentMaxWidth;return i?"100%":t})),z=i.img(d||(d=n(["\n height: 100%;\n width: auto;\n max-width: 100%;\n max-height: 100%;\n"],["\n height: 100%;\n width: auto;\n max-width: 100%;\n max-height: 100%;\n"]))),S=i.div(h||(h=n(["\n display: flex;\n flex-direction: column;\n justify-content: space-around;\n width: auto;\n transition: height "," ease;\n\n height: ",";\n\n @media (min-width: ",") {\n height: ",";\n }\n"],["\n display: flex;\n flex-direction: column;\n justify-content: space-around;\n width: auto;\n transition: height "," ease;\n\n height: ",";\n\n @media (min-width: ",") {\n height: ",";\n }\n"])),b,f,(function(n){return n.theme.breakpoint.desktop}),(function(n){var i=n.isSmall,t=n.isSticky;return i&&t?f:"80px"})),j=i.a(s||(s=n(["\n display: inline-block;\n"],["\n display: inline-block;\n"]))),B=i.a(l||(l=n(["\n left: -999px;\n position: absolute;\n top: auto;\n width: 1px;\n height: 1px;\n overflow: hidden;\n z-index: -999;\n &:focus,\n &:active,\n &:focus-within {\n left: auto;\n top: auto;\n width: 30%;\n height: auto;\n overflow: auto;\n margin: 10px 35%;\n padding: ",";\n border-radius: 15px;\n border: 4px solid yellow;\n text-align: center;\n font-size: 1.2em;\n z-index: 999;\n }\n"],["\n left: -999px;\n position: absolute;\n top: auto;\n width: 1px;\n height: 1px;\n overflow: hidden;\n z-index: -999;\n &:focus,\n &:active,\n &:focus-within {\n left: auto;\n top: auto;\n width: 30%;\n height: auto;\n overflow: auto;\n margin: 10px 35%;\n padding: ",";\n border-radius: 15px;\n border: 4px solid yellow;\n text-align: center;\n font-size: 1.2em;\n z-index: 999;\n }\n"])),(function(n){return n.theme.spacing.xs})),T=i.p(u||(u=n(["\n flex: 1 1 auto;\n font-family: ",";\n\n font-size: ",";\n color: ",";\n text-align: center;\n opacity: 0;\n transition: opacity "," ease;\n display: none;\n\n @media (min-width: ",") {\n display: block;\n opacity: ",";\n }\n"],["\n flex: 1 1 auto;\n font-family: ",";\n\n font-size: ",";\n color: ",";\n text-align: center;\n opacity: 0;\n transition: opacity "," ease;\n display: none;\n\n @media (min-width: ",") {\n display: block;\n opacity: ",";\n }\n"])),(function(n){return n.theme.typography.fontFamilyHeadings}),(function(n){return n.theme.fontSizes.xl}),(function(n){return n.theme.colors.headerTaglineText}),b,(function(n){return n.theme.breakpoint.desktop}),(function(n){var i=n.isSmall,t=n.isSticky;return i&&t?0:1})),W=i.div(c||(c=n(["\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: space-around;\n"],["\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: space-around;\n"]))),_=i.div(p||(p=n(["\n height: auto;\n margin: auto 0;\n"],["\n height: auto;\n margin: auto 0;\n"])));export{_ as ChildInner,W as ChildWrapper,k as HeaderMainContent,v as HeaderStickyContainer,y as HeaderStickyPlaceHolder,z as Logo,S as LogoWrapper,B as SkipToMain,w as StyledHeader,j as StyledLink,T as Tagline};
2
2
  //# sourceMappingURL=styles.js.map