@cruk/cruk-react-components 6.1.1 → 6.2.0

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 (170) hide show
  1. package/lib/node_modules/@babel/runtime/helpers/esm/extends.js.map +1 -1
  2. package/lib/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js.map +1 -1
  3. package/lib/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js.map +1 -1
  4. package/lib/node_modules/@babel/runtime/helpers/esm/toPrimitive.js.map +1 -1
  5. package/lib/node_modules/@babel/runtime/helpers/esm/typeof.js.map +1 -1
  6. package/lib/node_modules/@fortawesome/free-solid-svg-icons/index.js +3 -3
  7. package/lib/node_modules/@fortawesome/free-solid-svg-icons/index.js.map +1 -1
  8. package/lib/node_modules/focus-lock/dist/es2015/focusInside.js.map +1 -1
  9. package/lib/node_modules/focus-lock/dist/es2015/focusIsHidden.js.map +1 -1
  10. package/lib/node_modules/focus-lock/dist/es2015/focusSolver.js.map +1 -1
  11. package/lib/node_modules/focus-lock/dist/es2015/focusables.js.map +1 -1
  12. package/lib/node_modules/focus-lock/dist/es2015/moveFocusInside.js.map +1 -1
  13. package/lib/node_modules/focus-lock/dist/es2015/return-focus.js.map +1 -1
  14. package/lib/node_modules/focus-lock/dist/es2015/sibling.js.map +1 -1
  15. package/lib/node_modules/focus-lock/dist/es2015/solver.js.map +1 -1
  16. package/lib/node_modules/focus-lock/dist/es2015/utils/DOMutils.js.map +1 -1
  17. package/lib/node_modules/focus-lock/dist/es2015/utils/all-affected.js.map +1 -1
  18. package/lib/node_modules/focus-lock/dist/es2015/utils/array.js.map +1 -1
  19. package/lib/node_modules/focus-lock/dist/es2015/utils/auto-focus.js.map +1 -1
  20. package/lib/node_modules/focus-lock/dist/es2015/utils/correctFocus.js.map +1 -1
  21. package/lib/node_modules/focus-lock/dist/es2015/utils/getActiveElement.js.map +1 -1
  22. package/lib/node_modules/focus-lock/dist/es2015/utils/is.js.map +1 -1
  23. package/lib/node_modules/focus-lock/dist/es2015/utils/parenting.js.map +1 -1
  24. package/lib/node_modules/focus-lock/dist/es2015/utils/safe.js.map +1 -1
  25. package/lib/node_modules/focus-lock/dist/es2015/utils/tabOrder.js.map +1 -1
  26. package/lib/node_modules/focus-lock/dist/es2015/utils/tabUtils.js.map +1 -1
  27. package/lib/node_modules/react-clientside-effect/lib/index.es.js.map +1 -1
  28. package/lib/node_modules/react-focus-lock/dist/es2015/Lock.js.map +1 -1
  29. package/lib/node_modules/react-focus-lock/dist/es2015/Trap.js.map +1 -1
  30. package/lib/node_modules/react-intersection-observer/dist/index.js +1 -1
  31. package/lib/node_modules/react-intersection-observer/dist/index.js.map +1 -1
  32. package/lib/node_modules/tslib/tslib.es6.js.map +1 -1
  33. package/lib/node_modules/use-callback-ref/dist/es2015/useMergeRef.js.map +1 -1
  34. package/lib/node_modules/use-callback-ref/dist/es2015/useRef.js.map +1 -1
  35. package/lib/node_modules/use-sidecar/dist/es2015/medium.js.map +1 -1
  36. package/lib/src/components/AddressLookup/index.js.map +1 -1
  37. package/lib/src/components/Box/styles.js.map +1 -1
  38. package/lib/src/components/Button/index.js.map +1 -1
  39. package/lib/src/components/Carousel/Dots.js.map +1 -1
  40. package/lib/src/components/Carousel/index.js.map +1 -1
  41. package/lib/src/components/Carousel/styles.js +1 -1
  42. package/lib/src/components/Carousel/styles.js.map +1 -1
  43. package/lib/src/components/Checkbox/styles.js +1 -1
  44. package/lib/src/components/Checkbox/styles.js.map +1 -1
  45. package/lib/src/components/Collapse/index.js.map +1 -1
  46. package/lib/src/components/Collapse/styles.d.ts +1 -1
  47. package/lib/src/components/DateField/index.js +1 -1
  48. package/lib/src/components/DateField/index.js.map +1 -1
  49. package/lib/src/components/DateField/styles.d.ts +6 -3
  50. package/lib/src/components/DateField/styles.js +1 -1
  51. package/lib/src/components/DateField/styles.js.map +1 -1
  52. package/lib/src/components/ErrorText/styles.d.ts +3 -3
  53. package/lib/src/components/Flex.js.map +1 -1
  54. package/lib/src/components/Fontface.js.map +1 -1
  55. package/lib/src/components/GlobalStyle.js +1 -1
  56. package/lib/src/components/GlobalStyle.js.map +1 -1
  57. package/lib/src/components/Header/index.js.map +1 -1
  58. package/lib/src/components/Heading/styles.js.map +1 -1
  59. package/lib/src/components/IconFa/index.js +1 -1
  60. package/lib/src/components/IconFa/index.js.map +1 -1
  61. package/lib/src/components/IconFa/styles.js +1 -1
  62. package/lib/src/components/IconFa/styles.js.map +1 -1
  63. package/lib/src/components/LabelWrapper/index.js +1 -1
  64. package/lib/src/components/LabelWrapper/index.js.map +1 -1
  65. package/lib/src/components/LabelWrapper/styles.d.ts +3 -0
  66. package/lib/src/components/LabelWrapper/styles.js +1 -1
  67. package/lib/src/components/LabelWrapper/styles.js.map +1 -1
  68. package/lib/src/components/LegendWrapper/index.js +1 -1
  69. package/lib/src/components/LegendWrapper/index.js.map +1 -1
  70. package/lib/src/components/LegendWrapper/styles.d.ts +3 -0
  71. package/lib/src/components/LegendWrapper/styles.js +1 -1
  72. package/lib/src/components/LegendWrapper/styles.js.map +1 -1
  73. package/lib/src/components/Link/styles.d.ts +3 -3
  74. package/lib/src/components/Modal/index.js.map +1 -1
  75. package/lib/src/components/Modal/styles.d.ts +1 -1
  76. package/lib/src/components/Pagination/index.js.map +1 -1
  77. package/lib/src/components/Pagination/styles.js.map +1 -1
  78. package/lib/src/components/PopOver/index.js.map +1 -1
  79. package/lib/src/components/ProgressBar/styles.js.map +1 -1
  80. package/lib/src/components/Radio/styles.js +1 -1
  81. package/lib/src/components/Radio/styles.js.map +1 -1
  82. package/lib/src/components/RadioConsent/index.js.map +1 -1
  83. package/lib/src/components/RadioConsent/styles.js +1 -1
  84. package/lib/src/components/RadioConsent/styles.js.map +1 -1
  85. package/lib/src/components/Select/styles.js +1 -1
  86. package/lib/src/components/Select/styles.js.map +1 -1
  87. package/lib/src/components/Step/styles.js +1 -1
  88. package/lib/src/components/Step/styles.js.map +1 -1
  89. package/lib/src/components/Text/styles.js.map +1 -1
  90. package/lib/src/components/TextAreaField/styles.js +1 -1
  91. package/lib/src/components/TextAreaField/styles.js.map +1 -1
  92. package/lib/src/components/TextField/styles.js +1 -1
  93. package/lib/src/components/TextField/styles.js.map +1 -1
  94. package/lib/src/components/Totaliser/styles.js +1 -1
  95. package/lib/src/components/Totaliser/styles.js.map +1 -1
  96. package/lib/src/hooks/useScrollPosition.js.map +1 -1
  97. package/lib/src/themes/cruk.js +1 -1
  98. package/lib/src/themes/cruk.js.map +1 -1
  99. package/lib/src/themes/rfl.js +1 -1
  100. package/lib/src/themes/rfl.js.map +1 -1
  101. package/lib/src/themes/su2c.js +1 -1
  102. package/lib/src/themes/su2c.js.map +1 -1
  103. package/lib/src/types.d.ts +3 -1
  104. package/lib/src/utils/Helper.js.map +1 -1
  105. package/lib/src/utils/debounce.js.map +1 -1
  106. package/package.json +18 -17
  107. package/lib/playwright/index.d.ts +0 -1
  108. package/lib/playwright/utils.d.ts +0 -19
  109. package/lib/src/components/AddressLookup/AddressLookup.spec.d.ts +0 -1
  110. package/lib/src/components/AddressLookup/AddressLookup.stories.d.ts +0 -24
  111. package/lib/src/components/Avatar/Avatar.spec.d.ts +0 -1
  112. package/lib/src/components/Avatar/Avatar.stories.d.ts +0 -20
  113. package/lib/src/components/Badge/Badge.spec.d.ts +0 -1
  114. package/lib/src/components/Badge/Badge.stories.d.ts +0 -17
  115. package/lib/src/components/Box/Box.spec.d.ts +0 -1
  116. package/lib/src/components/Box/Box.stories.d.ts +0 -14
  117. package/lib/src/components/Button/Button.spec.d.ts +0 -1
  118. package/lib/src/components/Button/Button.stories.d.ts +0 -23
  119. package/lib/src/components/Carousel/Carousel.spec.d.ts +0 -1
  120. package/lib/src/components/Carousel/Carousel.stories.d.ts +0 -14
  121. package/lib/src/components/Checkbox/Checkbox.spec.d.ts +0 -1
  122. package/lib/src/components/Checkbox/Checkbox.stories.d.ts +0 -19
  123. package/lib/src/components/Collapse/Collapse.spec.d.ts +0 -1
  124. package/lib/src/components/Collapse/Collapse.stories.d.ts +0 -18
  125. package/lib/src/components/DateField/DateField.spec.d.ts +0 -1
  126. package/lib/src/components/DateField/DateField.stories.d.ts +0 -27
  127. package/lib/src/components/ErrorText/ErrorText.spec.d.ts +0 -1
  128. package/lib/src/components/ErrorText/ErrorText.stories.d.ts +0 -13
  129. package/lib/src/components/Footer/Footer.spec.d.ts +0 -1
  130. package/lib/src/components/Footer/Footer.stories.d.ts +0 -12
  131. package/lib/src/components/Header/Header.spec.d.ts +0 -1
  132. package/lib/src/components/Header/Header.stories.d.ts +0 -19
  133. package/lib/src/components/Heading/Heading.spec.d.ts +0 -1
  134. package/lib/src/components/Heading/Heading.stories.d.ts +0 -19
  135. package/lib/src/components/IconFa/IconFa.spec.d.ts +0 -1
  136. package/lib/src/components/IconFa/IconFa.stories.d.ts +0 -13
  137. package/lib/src/components/InfoBox/InfoBox.spec.d.ts +0 -1
  138. package/lib/src/components/InfoBox/InfoBox.stories.d.ts +0 -20
  139. package/lib/src/components/LegendWrapper/LegendWrapper.spec.d.ts +0 -1
  140. package/lib/src/components/LegendWrapper/LegendWrapper.stories.d.ts +0 -17
  141. package/lib/src/components/Link/Link.spec.d.ts +0 -1
  142. package/lib/src/components/Link/Link.stories.d.ts +0 -24
  143. package/lib/src/components/Loader/Loader.spec.d.ts +0 -1
  144. package/lib/src/components/Loader/Loader.stories.d.ts +0 -11
  145. package/lib/src/components/Modal/Modal.spec.d.ts +0 -1
  146. package/lib/src/components/Modal/Modal.stories.d.ts +0 -11
  147. package/lib/src/components/Pagination/Pagination.spec.d.ts +0 -1
  148. package/lib/src/components/Pagination/Pagination.stories.d.ts +0 -18
  149. package/lib/src/components/PopOver/PopOver.spec.d.ts +0 -1
  150. package/lib/src/components/PopOver/Popover.stories.d.ts +0 -17
  151. package/lib/src/components/ProgressBar/ProgressBar.spec.d.ts +0 -1
  152. package/lib/src/components/ProgressBar/ProgressBar.stories.d.ts +0 -15
  153. package/lib/src/components/Radio/Radio.spec.d.ts +0 -1
  154. package/lib/src/components/Radio/Radio.stories.d.ts +0 -19
  155. package/lib/src/components/RadioConsent/Radio.stories.d.ts +0 -18
  156. package/lib/src/components/RadioConsent/RadioConsent.spec.d.ts +0 -1
  157. package/lib/src/components/Select/Select.spec.d.ts +0 -1
  158. package/lib/src/components/Select/Selelct.stories.d.ts +0 -20
  159. package/lib/src/components/Step/Step.spec.d.ts +0 -1
  160. package/lib/src/components/Step/Step.stories.d.ts +0 -14
  161. package/lib/src/components/Text/Text.spec.d.ts +0 -1
  162. package/lib/src/components/Text/Text.stories.d.ts +0 -15
  163. package/lib/src/components/TextAreaField/TextAreaField.spec.d.ts +0 -1
  164. package/lib/src/components/TextAreaField/TextAreaField.stories.d.ts +0 -23
  165. package/lib/src/components/TextField/TextField.spec.d.ts +0 -1
  166. package/lib/src/components/TextField/TextField.stories.d.ts +0 -25
  167. package/lib/src/components/Totaliser/Totaliser.spec.d.ts +0 -1
  168. package/lib/src/components/Totaliser/Totaliser.stories.d.ts +0 -19
  169. package/lib/src/components/UserBlock/UserBlock.spec.d.ts +0 -1
  170. package/lib/src/components/UserBlock/UserBlock.stories.d.ts +0 -16
@@ -1,2 +1,2 @@
1
- import{__makeTemplateObject as n}from"../../../node_modules/tslib/tslib.es6.js";import o from"styled-components";var t,e,r=o.span(t||(t=n(["\n display: block;\n color: ",";\n font-size: ",";\n line-height: ",";\n font-weight: ",";\n font-family: ",";\n min-width: 3em;\n margin-bottom: ",";\n\n & > * {\n font-weight: ",";\n }\n"],["\n display: block;\n color: ",";\n font-size: ",";\n line-height: ",";\n font-weight: ",";\n font-family: ",";\n min-width: 3em;\n margin-bottom: ",";\n\n & > * {\n font-weight: ",";\n }\n"])),function(n){return n.theme.colors.textDark},function(n){return n.theme.fontSizes.m},function(n){return n.theme.typography.lineHeight},function(n){return n.theme.typography.fontWeightLabels},function(n){return n.theme.typography.fontFamilyLabel},function(n){var o=n.$hasHintText,t=n.theme;return o?t.spacing.xxs:0},function(n){return n.theme.typography.fontWeightBase}),i=o.fieldset(e||(e=n(["\n *,\n *:after,\n *:before {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n }\n border: none;\n padding: 0;\n legend {\n margin-bottom: ",";\n }\n label {\n border-color: ",";\n margin-bottom: ",";\n &:last-of-type {\n margin-bottom: 0;\n }\n }\n"],["\n *,\n *:after,\n *:before {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n }\n border: none;\n padding: 0;\n legend {\n margin-bottom: ",";\n }\n label {\n border-color: ",";\n margin-bottom: ",";\n &:last-of-type {\n margin-bottom: 0;\n }\n }\n"])),function(n){return n.theme.spacing.xs},function(n){var o=n.$hasError,t=n.theme;return o&&t.colors.textError},function(n){return n.theme.spacing.none});export{r as LegendSpan,i as StyledFieldset};
1
+ import{__makeTemplateObject as n}from"../../../node_modules/tslib/tslib.es6.js";import t from"styled-components";var o,e,r,i=t.span(o||(o=n(["\n display: block;\n color: ",";\n font-size: ",";\n line-height: ",";\n font-weight: ",";\n font-family: ",";\n min-width: 3em;\n margin-bottom: ",";\n\n // increase font size for desktop\n @media (min-width: ",") {\n font-size: ",";\n }\n & > * {\n font-weight: ",";\n }\n"],["\n display: block;\n color: ",";\n font-size: ",";\n line-height: ",";\n font-weight: ",";\n font-family: ",";\n min-width: 3em;\n margin-bottom: ",";\n\n // increase font size for desktop\n @media (min-width: ",") {\n font-size: ",";\n }\n & > * {\n font-weight: ",";\n }\n"])),function(n){return n.theme.colors.textDark},function(n){return n.theme.fontSizes.m},function(n){return n.theme.typography.lineHeight},function(n){return n.theme.typography.fontWeightLabels},function(n){return n.theme.typography.fontFamilyLabel},function(n){var t=n.$hasHintText,o=n.theme;return t?o.spacing.xxs:0},function(n){return n.theme.breakpoint.desktopLarge},function(n){return n.theme.fontSizes.ml},function(n){return n.theme.typography.fontWeightBase}),m=t.span(e||(e=n(["\n font-family: ",";\n font-weight: ",";\n display: block;\n color: ",";\n"],["\n font-family: ",";\n font-weight: ",";\n display: block;\n color: ",";\n"])),function(n){return n.theme.typography.fontFamilyBase},function(n){return n.theme.typography.fontWeightBase},function(n){return n.theme.colors.textMid}),a=t.fieldset(r||(r=n(["\n *,\n *:after,\n *:before {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n }\n border: none;\n padding: 0;\n legend {\n margin-bottom: ",";\n }\n label {\n border-color: ",";\n margin-bottom: ",";\n &:last-of-type {\n margin-bottom: 0;\n }\n }\n"],["\n *,\n *:after,\n *:before {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n }\n border: none;\n padding: 0;\n legend {\n margin-bottom: ",";\n }\n label {\n border-color: ",";\n margin-bottom: ",";\n &:last-of-type {\n margin-bottom: 0;\n }\n }\n"])),function(n){return n.theme.spacing.xs},function(n){var t=n.$hasError,o=n.theme;return t&&o.colors.textError},function(n){return n.theme.spacing.none});export{m as HintText,i as LegendSpan,a as StyledFieldset};
2
2
  //# sourceMappingURL=styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sources":["../../../../src/components/LegendWrapper/styles.ts"],"sourcesContent":["import styled from \"styled-components\";\n\nimport { type ThemeType } from \"../../types\";\n\ntype StyledFieldsetProps = {\n $hasError?: boolean;\n $hasHintText?: boolean;\n theme: ThemeType;\n};\n\nexport const LegendSpan = styled.span<{\n $hasHintText: boolean;\n theme: ThemeType;\n}>`\n display: block;\n color: ${({ theme }) => theme.colors.textDark};\n font-size: ${({ theme }) => theme.fontSizes.m};\n line-height: ${({ theme }) => theme.typography.lineHeight};\n font-weight: ${({ theme }) => theme.typography.fontWeightLabels};\n font-family: ${({ theme }) => theme.typography.fontFamilyLabel};\n min-width: 3em;\n margin-bottom: ${({ $hasHintText, theme }) =>\n $hasHintText ? theme.spacing.xxs : 0};\n\n & > * {\n font-weight: ${({ theme }) => theme.typography.fontWeightBase};\n }\n`;\n\nexport const StyledFieldset = styled.fieldset<StyledFieldsetProps>`\n *,\n *:after,\n *:before {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n }\n border: none;\n padding: 0;\n legend {\n margin-bottom: ${({ theme }) => theme.spacing.xs};\n }\n label {\n border-color: ${({ $hasError, theme }) =>\n $hasError && theme.colors.textError};\n margin-bottom: ${({ theme }) => theme.spacing.none};\n &:last-of-type {\n margin-bottom: 0;\n }\n }\n`;\n"],"names":["LegendSpan","styled","span","templateObject_1","__makeTemplateObject","_a","theme","colors","textDark","fontSizes","m","typography","lineHeight","fontWeightLabels","fontFamilyLabel","$hasHintText","spacing","xxs","fontWeightBase","StyledFieldset","fieldset","templateObject_2","xs","$hasError","textError","none"],"mappings":"iHAUO,QAAMA,EAAaC,EAAOC,KAAIC,IAAAA,EAAAC,EAAA,CAAA,iCAAA,mBAAA,qBAAA,qBAAA,qBAAA,0CAAA,oCAAA,YAAA,CAGnC,iCAE6C,mBACA,qBACY,qBACM,qBACD,0CAGxB,oCAGyB,cAVtD,SAACC,GAAc,OAAPA,EAAAC,MAAaC,OAAOC,QAAb,EACX,SAACH,GAAc,OAAPA,EAAAC,MAAaG,UAAUC,CAAhB,EACb,SAACL,GAAc,OAAPA,EAAAC,MAAaK,WAAWC,UAAjB,EACf,SAACP,GAAc,OAAPA,EAAAC,MAAaK,WAAWE,gBAAjB,EACf,SAACR,GAAc,OAAPA,EAAAC,MAAaK,WAAWG,eAAjB,EAEb,SAACT,OAAEU,EAAYV,EAAAU,aAAET,EAAKD,EAAAC,MACrC,OAAAS,EAAeT,EAAMU,QAAQC,IAAM,CAAnC,EAGe,SAACZ,GAAc,OAAPA,EAAAC,MAAaK,WAAWO,cAAjB,GAIrBC,EAAiBlB,EAAOmB,SAAQC,IAAAA,EAAAjB,EAAA,CAAA,6MAAA,wCAAA,yBAAA,kEAAA,CAAqB,6MAWd,wCAIX,yBACa,oEALjC,SAACC,GAAc,OAAPA,EAAAC,MAAaU,QAAQM,EAAd,EAGhB,SAACjB,OAAEkB,EAASlB,EAAAkB,UAAEjB,EAAKD,EAAAC,MACjC,OAAAiB,GAAajB,EAAMC,OAAOiB,SAA1B,EACe,SAACnB,GAAc,OAAPA,EAAAC,MAAaU,QAAQS,IAAd"}
1
+ {"version":3,"file":"styles.js","sources":["../../../../src/components/LegendWrapper/styles.ts"],"sourcesContent":["import styled from \"styled-components\";\n\nimport { type ThemeType } from \"../../types\";\n\ntype StyledFieldsetProps = {\n $hasError?: boolean;\n $hasHintText?: boolean;\n theme: ThemeType;\n};\n\nexport const LegendSpan = styled.span<{\n $hasHintText: boolean;\n theme: ThemeType;\n}>`\n display: block;\n color: ${({ theme }) => theme.colors.textDark};\n font-size: ${({ theme }) => theme.fontSizes.m};\n line-height: ${({ theme }) => theme.typography.lineHeight};\n font-weight: ${({ theme }) => theme.typography.fontWeightLabels};\n font-family: ${({ theme }) => theme.typography.fontFamilyLabel};\n min-width: 3em;\n margin-bottom: ${({ $hasHintText, theme }) =>\n $hasHintText ? theme.spacing.xxs : 0};\n\n // increase font size for desktop\n @media (min-width: ${({ theme }) => theme.breakpoint.desktopLarge}) {\n font-size: ${({ theme }) => theme.fontSizes.ml};\n }\n & > * {\n font-weight: ${({ theme }) => theme.typography.fontWeightBase};\n }\n`;\n\nexport const HintText = styled.span<{ theme: ThemeType }>`\n font-family: ${({ theme }) => theme.typography.fontFamilyBase};\n font-weight: ${({ theme }) => theme.typography.fontWeightBase};\n display: block;\n color: ${({ theme }) => theme.colors.textMid};\n`;\n\nexport const StyledFieldset = styled.fieldset<StyledFieldsetProps>`\n *,\n *:after,\n *:before {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n }\n border: none;\n padding: 0;\n legend {\n margin-bottom: ${({ theme }) => theme.spacing.xs};\n }\n label {\n border-color: ${({ $hasError, theme }) =>\n $hasError && theme.colors.textError};\n margin-bottom: ${({ theme }) => theme.spacing.none};\n &:last-of-type {\n margin-bottom: 0;\n }\n }\n`;\n"],"names":["LegendSpan","styled","span","templateObject_1","__makeTemplateObject","_a","theme","colors","textDark","fontSizes","m","typography","lineHeight","fontWeightLabels","fontFamilyLabel","$hasHintText","spacing","xxs","breakpoint","desktopLarge","ml","fontWeightBase","HintText","templateObject_2","fontFamilyBase","textMid","StyledFieldset","fieldset","templateObject_3","xs","$hasError","textError","none"],"mappings":"iHAUO,UAAMA,EAAaC,EAAOC,KAAIC,IAAAA,EAAAC,EAAA,CAAA,iCAAA,mBAAA,qBAAA,qBAAA,qBAAA,0CAAA,kEAAA,uBAAA,uCAAA,YAAA,CAGnC,iCAE6C,mBACA,qBACY,qBACM,qBACD,0CAGxB,kEAG2B,uBACjB,uCAGe,cAdtD,SAACC,GAAc,OAAPA,EAAAC,MAAaC,OAAOC,QAAb,EACX,SAACH,GAAc,OAAPA,EAAAC,MAAaG,UAAUC,CAAhB,EACb,SAACL,GAAc,OAAPA,EAAAC,MAAaK,WAAWC,UAAjB,EACf,SAACP,GAAc,OAAPA,EAAAC,MAAaK,WAAWE,gBAAjB,EACf,SAACR,GAAc,OAAPA,EAAAC,MAAaK,WAAWG,eAAjB,EAEb,SAACT,OAAEU,EAAYV,EAAAU,aAAET,EAAKD,EAAAC,MACrC,OAAAS,EAAeT,EAAMU,QAAQC,IAAM,CAAnC,EAGmB,SAACZ,GAAc,OAAPA,EAAAC,MAAaY,WAAWC,YAAjB,EACrB,SAACd,GAAc,OAAPA,EAAAC,MAAaG,UAAUW,EAAhB,EAGb,SAACf,GAAc,OAAPA,EAAAC,MAAaK,WAAWU,cAAjB,GAIrBC,EAAWrB,EAAOC,KAAIqB,IAAAA,EAAAnB,EAAA,CAAA,oBAAA,qBAAA,kCAAA,OAAA,CAAsB,oBACM,qBACA,kCAEjB,SAH7B,SAACC,GAAc,OAAPA,EAAAC,MAAaK,WAAWa,cAAjB,EACf,SAACnB,GAAc,OAAPA,EAAAC,MAAaK,WAAWU,cAAjB,EAErB,SAAChB,GAAc,OAAPA,EAAAC,MAAaC,OAAOkB,OAAb,GAGbC,EAAiBzB,EAAO0B,SAAQC,IAAAA,EAAAxB,EAAA,CAAA,6MAAA,wCAAA,yBAAA,kEAAA,CAAqB,6MAWd,wCAIX,yBACa,oEALjC,SAACC,GAAc,OAAPA,EAAAC,MAAaU,QAAQa,EAAd,EAGhB,SAACxB,OAAEyB,EAASzB,EAAAyB,UAAExB,EAAKD,EAAAC,MACjC,OAAAwB,GAAaxB,EAAMC,OAAOwB,SAA1B,EACe,SAAC1B,GAAc,OAAPA,EAAAC,MAAaU,QAAQgB,IAAd"}
@@ -9,12 +9,12 @@ type StyledLinkProps = AnchorHTMLAttributes<HTMLElement> & TextProps & {
9
9
  export declare const StyledLink: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("../Spacing").SpacingProps & import("react").HTMLAttributes<HTMLElement> & {
10
10
  textColor?: string;
11
11
  textAlign?: "left" | "right" | "center" | "justify";
12
- textSize?: import("../../types").FontSizeType;
12
+ textSize?: import("..").FontSizeType;
13
13
  textWeight?: number | string;
14
14
  textFontFamily?: string;
15
15
  as?: import("react").ElementType;
16
- wordBreak?: import("../../types").WordBreakType;
17
- overflowWrap?: import("../../types").OverflowWrapType;
16
+ wordBreak?: import("..").WordBreakType;
17
+ overflowWrap?: import("..").OverflowWrapType;
18
18
  ref?: import("react").Ref<HTMLElement>;
19
19
  }, StyledLinkProps>> & string & Omit<(props: TextProps) => import("react").JSX.Element, keyof import("react").Component<any, {}, any>>;
20
20
  export default StyledLink;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/components/Modal/index.tsx"],"sourcesContent":["import React, { type ReactNode, useEffect } from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { ThemeProvider, useTheme } from \"styled-components\";\nimport FocusLock from \"react-focus-lock\";\nimport { faClose } from \"@fortawesome/free-solid-svg-icons\";\n\nimport { IconFa } from \"../IconFa\";\nimport { crukTheme as defaultTheme } from \"../../themes/cruk\";\n\nimport { CloseButton, Wrapper, Content, Background } from \"./styles\";\n\nimport { type SpacingProps } from \"../Spacing\";\n\nexport type ModalProps = SpacingProps & {\n /** modal name used for aria-label */\n modalName: string;\n /** callback function called on modal close */\n closeFunction: () => void;\n /** flag to reveal close button with cross in the top right of modal */\n showCloseButton?: boolean;\n /** set max width of modal */\n maxWidth?: string;\n /** set space from top of view port that modal appears */\n top?: string;\n /** background color of dialogue */\n backgroundColor?: string;\n /** children components */\n children?: ReactNode;\n /** width of modal */\n width?: string;\n /** turn on animate in modal */\n isAnimated?: boolean;\n};\n\n/**\n *\n * Use a modal to display content over top of the rest of the site which must be interacted with before the user can continue.\n * ## How modals work\n * - Modals are positioned over everything else in the document and remove scroll from the \"body\" tag so that modal content scrolls instead.\n * - Modals are unmounted when closed.\n * - Modal's \"trap\" focus in them, ensuring the keyboard navigation cycles through the modal, and not the rest of the page.\n * ## Accessibility\n * - Once the Modal is appeared on the screen, the focus must be within the Modal container which will enable the screen readers to be able to navigate within the Modal. You may wish to hide the close button so that a user must click on another button to confirm a choice before the modal is closed. However closing with the 'ESC' key must always work, so the props which contains the function that allows the modal to close itself 'closeFunction' is always required.\n */\nexport function Modal({\n modalName,\n closeFunction,\n showCloseButton,\n maxWidth = \"500px\",\n top = \"1rem\",\n backgroundColor = \"backgroundLight\",\n children,\n width = \"90%\",\n margin,\n marginHorizontal,\n marginVertical,\n marginTop,\n marginRight,\n marginBottom = \"xxl\",\n marginLeft,\n padding = \"xs\",\n paddingHorizontal,\n paddingVertical,\n paddingTop,\n paddingRight,\n paddingBottom,\n paddingLeft,\n isAnimated = true,\n}: ModalProps) {\n const foundTheme = useTheme();\n const theme = {\n ...defaultTheme,\n ...foundTheme,\n };\n const closeByEsc = React.useCallback(\n (event: KeyboardEvent): void => {\n if (event.key === \"Escape\" && !!closeFunction) {\n closeFunction();\n }\n },\n [closeFunction],\n );\n\n useEffect(() => {\n if (typeof window === `undefined`) {\n return undefined;\n }\n document.body.style.overflow = \"hidden\";\n document.addEventListener(\"keydown\", closeByEsc);\n\n return () => {\n if (typeof window === `undefined`) {\n return;\n }\n document.body.style.overflow = \"unset\";\n document.removeEventListener(\"keydown\", closeByEsc);\n };\n }, [closeByEsc]);\n\n return (\n <>\n {typeof window !== `undefined`\n ? createPortal(\n <section>\n <FocusLock returnFocus>\n <ThemeProvider theme={theme}>\n <Wrapper\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label={modalName}\n >\n <Content\n backgroundColor={backgroundColor}\n $maxWidth={maxWidth}\n $width={width}\n $top={top}\n margin={margin}\n marginHorizontal={marginHorizontal}\n marginVertical={marginVertical}\n marginTop={marginTop}\n marginRight={marginRight}\n marginBottom={marginBottom}\n marginLeft={marginLeft}\n padding={padding}\n paddingHorizontal={paddingHorizontal}\n paddingVertical={paddingVertical}\n paddingTop={paddingTop}\n paddingRight={paddingRight}\n paddingBottom={paddingBottom}\n paddingLeft={paddingLeft}\n $isAnimated={isAnimated}\n >\n {showCloseButton && closeFunction ? (\n <CloseButton\n aria-label=\"close\"\n appearance=\"tertiary\"\n onClick={() => {\n closeFunction();\n }}\n >\n <IconFa faIcon={faClose} />\n </CloseButton>\n ) : null}\n {children}\n </Content>\n <Background $isAnimated={isAnimated} />\n </Wrapper>\n </ThemeProvider>\n </FocusLock>\n </section>,\n document.body,\n )\n : null}\n </>\n );\n}\n\nexport default Modal;\n"],"names":["Modal","_a","modalName","closeFunction","showCloseButton","_b","maxWidth","_c","top","_d","backgroundColor","children","_e","width","margin","marginHorizontal","marginVertical","marginTop","marginRight","_f","marginBottom","marginLeft","_g","padding","paddingHorizontal","paddingVertical","paddingTop","paddingRight","paddingBottom","paddingLeft","_h","isAnimated","foundTheme","useTheme","theme","__assign","defaultTheme","closeByEsc","React","useCallback","event","key","useEffect","window","document","body","style","overflow","addEventListener","removeEventListener","createElement","Fragment","createPortal","FocusLock","returnFocus","ThemeProvider","Wrapper","role","Content","$maxWidth","$width","$top","CloseButton","appearance","onClick","IconFa","faIcon","faClose","Background","$isAnimated"],"mappings":"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,SAAQ,aACF,oBACCvD,GAEZoC,EAAAY,cAACQ,EAAO,CACNhD,gBAAiBA,EAAeiD,UACrBrD,EAAQsD,OACX/C,EAAKgD,KACPrD,EACNM,OAAQA,EACRC,iBAAkBA,EAClBC,eAAgBA,EAChBC,UAAWA,EACXC,YAAaA,EACbE,aAAcA,EACdC,WAAYA,EACZE,QAASA,EACTC,kBAAmBA,EACnBC,gBAAiBA,EACjBC,WAAYA,EACZC,aAAcA,EACdC,cAAeA,EACfC,YAAaA,cACAE,GAEZ3B,GAAmBD,EAClBmC,EAAAY,cAACY,EAAW,CAAA,aACC,QACXC,WAAW,WACXC,QAAS,WACP7D,MAGFmC,EAAAY,cAACe,EAAM,CAACC,OAAQC,KAEhB,KACHxD,GAEH2B,EAAAY,cAACkB,EAAU,CAAAC,YAActC,QAKjCa,SAASC,MAEX,KAGV"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/Modal/index.tsx"],"sourcesContent":["import React, { type ReactNode, useEffect } from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { ThemeProvider, useTheme } from \"styled-components\";\nimport FocusLock from \"react-focus-lock\";\nimport { faClose } from \"@fortawesome/free-solid-svg-icons\";\n\nimport { IconFa } from \"../IconFa\";\nimport { crukTheme as defaultTheme } from \"../../themes/cruk\";\n\nimport { CloseButton, Wrapper, Content, Background } from \"./styles\";\n\nimport { type SpacingProps } from \"../Spacing\";\n\nexport type ModalProps = SpacingProps & {\n /** modal name used for aria-label */\n modalName: string;\n /** callback function called on modal close */\n closeFunction: () => void;\n /** flag to reveal close button with cross in the top right of modal */\n showCloseButton?: boolean;\n /** set max width of modal */\n maxWidth?: string;\n /** set space from top of view port that modal appears */\n top?: string;\n /** background color of dialogue */\n backgroundColor?: string;\n /** children components */\n children?: ReactNode;\n /** width of modal */\n width?: string;\n /** turn on animate in modal */\n isAnimated?: boolean;\n};\n\n/**\n *\n * Use a modal to display content over top of the rest of the site which must be interacted with before the user can continue.\n * ## How modals work\n * - Modals are positioned over everything else in the document and remove scroll from the \"body\" tag so that modal content scrolls instead.\n * - Modals are unmounted when closed.\n * - Modal's \"trap\" focus in them, ensuring the keyboard navigation cycles through the modal, and not the rest of the page.\n * ## Accessibility\n * - Once the Modal is appeared on the screen, the focus must be within the Modal container which will enable the screen readers to be able to navigate within the Modal. You may wish to hide the close button so that a user must click on another button to confirm a choice before the modal is closed. However closing with the 'ESC' key must always work, so the props which contains the function that allows the modal to close itself 'closeFunction' is always required.\n */\nexport function Modal({\n modalName,\n closeFunction,\n showCloseButton,\n maxWidth = \"500px\",\n top = \"1rem\",\n backgroundColor = \"backgroundLight\",\n children,\n width = \"90%\",\n margin,\n marginHorizontal,\n marginVertical,\n marginTop,\n marginRight,\n marginBottom = \"xxl\",\n marginLeft,\n padding = \"xs\",\n paddingHorizontal,\n paddingVertical,\n paddingTop,\n paddingRight,\n paddingBottom,\n paddingLeft,\n isAnimated = true,\n}: ModalProps) {\n const foundTheme = useTheme();\n const theme = {\n ...defaultTheme,\n ...foundTheme,\n };\n const closeByEsc = React.useCallback(\n (event: KeyboardEvent): void => {\n if (event.key === \"Escape\" && !!closeFunction) {\n closeFunction();\n }\n },\n [closeFunction],\n );\n\n useEffect(() => {\n if (typeof window === `undefined`) {\n return undefined;\n }\n document.body.style.overflow = \"hidden\";\n document.addEventListener(\"keydown\", closeByEsc);\n\n return () => {\n if (typeof window === `undefined`) {\n return;\n }\n document.body.style.overflow = \"unset\";\n document.removeEventListener(\"keydown\", closeByEsc);\n };\n }, [closeByEsc]);\n\n return (\n <>\n {typeof window !== `undefined`\n ? createPortal(\n <section>\n <FocusLock returnFocus>\n <ThemeProvider theme={theme}>\n <Wrapper\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label={modalName}\n >\n <Content\n backgroundColor={backgroundColor}\n $maxWidth={maxWidth}\n $width={width}\n $top={top}\n margin={margin}\n marginHorizontal={marginHorizontal}\n marginVertical={marginVertical}\n marginTop={marginTop}\n marginRight={marginRight}\n marginBottom={marginBottom}\n marginLeft={marginLeft}\n padding={padding}\n paddingHorizontal={paddingHorizontal}\n paddingVertical={paddingVertical}\n paddingTop={paddingTop}\n paddingRight={paddingRight}\n paddingBottom={paddingBottom}\n paddingLeft={paddingLeft}\n $isAnimated={isAnimated}\n >\n {showCloseButton && closeFunction ? (\n <CloseButton\n aria-label=\"close\"\n appearance=\"tertiary\"\n onClick={() => {\n closeFunction();\n }}\n >\n <IconFa faIcon={faClose} />\n </CloseButton>\n ) : null}\n {children}\n </Content>\n <Background $isAnimated={isAnimated} />\n </Wrapper>\n </ThemeProvider>\n </FocusLock>\n </section>,\n document.body,\n )\n : null}\n </>\n );\n}\n\nexport default Modal;\n"],"names":["Modal","_a","modalName","closeFunction","showCloseButton","_b","maxWidth","_c","top","_d","backgroundColor","children","_e","width","margin","marginHorizontal","marginVertical","marginTop","marginRight","_f","marginBottom","marginLeft","_g","padding","paddingHorizontal","paddingVertical","paddingTop","paddingRight","paddingBottom","paddingLeft","_h","isAnimated","foundTheme","useTheme","theme","__assign","defaultTheme","closeByEsc","React","useCallback","event","key","useEffect","window","document","body","style","overflow","addEventListener","removeEventListener","createElement","Fragment","createPortal","FocusLock","returnFocus","ThemeProvider","Wrapper","role","Content","$maxWidth","$width","$top","CloseButton","appearance","onClick","IconFa","faIcon","faClose","Background","$isAnimated"],"mappings":"+iBA4CM,SAAUA,EAAMC,OACpBC,EAASD,EAAAC,UACTC,EAAaF,EAAAE,cACbC,EAAeH,EAAAG,gBACfC,EAAAJ,EAAAK,SAAAA,OAAQ,IAAAD,EAAG,UACXE,EAAAN,EAAAO,IAAAA,OAAG,IAAAD,EAAG,OAAMA,EACZE,oBAAAC,aAAkB,kBAAiBD,EACnCE,EAAQV,EAAAU,SACRC,EAAAX,EAAAY,MAAAA,OAAK,IAAAD,EAAG,QACRE,WACAC,EAAgBd,EAAAc,iBAChBC,EAAcf,EAAAe,eACdC,EAAShB,EAAAgB,UACTC,EAAWjB,EAAAiB,YACXC,EAAAlB,EAAAmB,aA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,GAEAmC,EAAAY,cAACe,EAAM,CAACC,OAAQC,KAEhB,KACHxD,GAEH2B,EAAAY,cAACkB,EAAU,CAAAC,YAActC,QAKjCa,SAASC,MAEX,KAGV"}
@@ -14,7 +14,7 @@ export declare const Content: import("styled-components/dist/types").IStyledComp
14
14
  theme: ThemeType;
15
15
  }>> & string & Omit<({ ...props }: import("../Box").BoxProps) => import("react").JSX.Element, keyof import("react").Component<any, {}, any>>;
16
16
  export declare const CloseButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").ButtonHTMLAttributes<HTMLElement> & {
17
- appearance?: import("../../types").ButtonAppearanceType;
17
+ appearance?: import("..").ButtonAppearanceType;
18
18
  full?: boolean;
19
19
  href?: string;
20
20
  size?: "m" | "l";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/components/Pagination/index.tsx"],"sourcesContent":["import React, {\n type HTMLAttributes,\n type MouseEvent,\n type ReactNode,\n type TouchEvent,\n} from \"react\";\nimport { ThemeProvider, useTheme } from \"styled-components\";\n\nimport { crukTheme as defaultTheme } from \"../../themes/cruk\";\n\nimport { PagerItem, PagerLink, PagerList, PagerWrapper } from \"./styles\";\n\nexport type PaginationProps = {\n /** set current page number */\n current: number;\n /** total number of pages */\n items: number;\n /** don't show an ellipsise and then the last page link, usefull for search results where the last page isn't important */\n hideLast?: boolean;\n /** callback function which is passed the selected page number on click */\n pagerCallback: (n: number) => void;\n /** number of items per page */\n perPage: number;\n /** the name of the search param in the url that is modified on page click, defaults to 'page' */\n searchParam?: string;\n children?: ReactNode;\n} & HTMLAttributes<HTMLElement>;\n\n/**\n * \n * Pagination is used when we are viewing large amounts of data.\nData is split into multiple pages and pagination is used to\neasily navigate through these pages.\n */\nexport function Pagination({\n current,\n items,\n hideLast,\n pagerCallback,\n perPage,\n searchParam = \"page\",\n children,\n id,\n}: PaginationProps) {\n const foundTheme = useTheme();\n const theme = {\n ...defaultTheme,\n ...foundTheme,\n };\n const perPageValue = perPage > 0 ? perPage : 1;\n const totalPages = Math.ceil(items / perPageValue) || 1;\n\n const linkProps = (number: number) => ({\n href: `${typeof window !== \"undefined\" ? window.location.pathname : \"\"}?${\n searchParam ? `${searchParam}=${number}` : \"\"\n }`,\n onClick: (e: TouchEvent | MouseEvent) => {\n e.preventDefault();\n pagerCallback(number);\n },\n });\n\n const renderPager = (active: number, total: number) => {\n const list = [];\n let pager = [];\n // get the list of items\n for (let number = 1; number <= total; number += 1) {\n list.push(\n <PagerItem key={number}>\n <PagerLink\n data-cta={id ? `${id}-${number}` : null}\n $active={number === active}\n {...linkProps(number)}\n aria-label={`page ${number} of ${total}`}\n >\n {number}\n </PagerLink>\n </PagerItem>,\n );\n }\n const first = list.slice(0, 1).concat(\n <PagerItem key=\"first\">\n <span>...</span>\n </PagerItem>,\n );\n const last = list\n .slice(list.length - 1)\n .concat(\n <PagerItem key=\"last\">\n <span>...</span>\n </PagerItem>,\n )\n .reverse();\n pager = list.slice(0, total);\n if (total > 7) {\n if (active <= 4) {\n pager = hideLast ? list.slice(0, 7) : list.slice(0, 5).concat(last);\n } else {\n pager =\n active > total - 4\n ? first.concat(list.slice(-5))\n : hideLast\n ? first.concat(list.slice(active - 3, active + 2))\n : first.concat(list.slice(active - 2, active + 1)).concat(last);\n }\n }\n return pager;\n };\n\n return (\n <ThemeProvider theme={theme}>\n {items > perPage && (\n <PagerWrapper>\n <PagerList>\n <PagerItem key=\"Prev\">\n <PagerLink\n data-cta={id ? `${id}-prev` : null}\n name=\"Prev\"\n aria-disabled={current === 1}\n {...(current === 1 && { tabIndex: -1 })}\n {...(current !== 1 && linkProps(current - 1))}\n $disabled={current === 1}\n >\n Prev\n </PagerLink>\n </PagerItem>\n {renderPager(current, totalPages)}\n <PagerItem key=\"Next\">\n <PagerLink\n data-cta={id ? `${id}-next` : null}\n name=\"Next\"\n aria-disabled={current === totalPages}\n {...(current === totalPages && { tabIndex: -1 })}\n {...(current !== totalPages && linkProps(current + 1))}\n $disabled={current === totalPages}\n >\n Next\n </PagerLink>\n </PagerItem>\n </PagerList>\n {children}\n </PagerWrapper>\n )}\n </ThemeProvider>\n );\n}\n\nexport default Pagination;\n"],"names":["Pagination","_a","current","items","hideLast","pagerCallback","perPage","_b","searchParam","children","id","foundTheme","useTheme","theme","__assign","defaultTheme","perPageValue","totalPages","Math","ceil","linkProps","number","href","concat","window","location","pathname","onClick","e","preventDefault","React","createElement","ThemeProvider","PagerWrapper","PagerList","PagerItem","key","PagerLink","name","tabIndex","active","total","list","pager","push","$active","first","slice","last","length","reverse","renderPager","$disabled"],"mappings":"kSAkCM,SAAUA,EAAWC,OACzBC,EAAOD,EAAAC,QACPC,EAAKF,EAAAE,MACLC,EAAQH,EAAAG,SACRC,EAAaJ,EAAAI,cACbC,YACAC,EAAAN,EAAAO,YAAAA,OAAW,IAAAD,EAAG,OAAMA,EACpBE,EAAQR,EAAAQ,SACRC,EAAET,EAAAS,GAEIC,EAAaC,IACbC,EAAKC,EAAAA,EAAA,CAAA,EACNC,GACAJ,GAECK,EAAeV,EAAU,EAAIA,EAAU,EACvCW,EAAaC,KAAKC,KAAKhB,EAAQa,IAAiB,EAEhDI,EAAY,SAACC,GAAmB,MAAA,CACpCC,KAAM,GAAAC,OAAqB,oBAAXC,OAAyBA,OAAOC,SAASC,SAAW,GAAE,KAAAH,OACpEf,EAAc,GAAAe,OAAGf,EAAW,KAAAe,OAAIF,GAAW,IAE7CM,QAAS,SAACC,GACRA,EAAEC,iBACFxB,EAAcgB,IAEhB,EAiDF,OACES,EAAAC,cAACC,EAAa,CAACnB,MAAOA,GACnBV,EAAQG,GACPwB,gBAACG,EAAY,KACXH,EAAAC,cAACG,EAAS,KACRJ,EAAAC,cAACI,EAAS,CAACC,IAAI,QACbN,EAAAC,cAACM,EAASvB,EAAA,CAAA,WACEJ,EAAK,GAAAa,OAAGb,EAAE,SAAU,KAC9B4B,KAAK,OAAM,gBACgB,IAAZpC,GACE,IAAZA,GAAiB,CAAEqC,UAAU,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ACtCrC,IAAYe,GAAcG,EAAUlB,EAAU,GAAG,CAAAkD,UAC3ClD,IAAYe,IAAU,UAMtCR,GAKX"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/Pagination/index.tsx"],"sourcesContent":["import React, {\n type HTMLAttributes,\n type MouseEvent,\n type ReactNode,\n type TouchEvent,\n} from \"react\";\nimport { ThemeProvider, useTheme } from \"styled-components\";\n\nimport { crukTheme as defaultTheme } from \"../../themes/cruk\";\n\nimport { PagerItem, PagerLink, PagerList, PagerWrapper } from \"./styles\";\n\nexport type PaginationProps = {\n /** set current page number */\n current: number;\n /** total number of pages */\n items: number;\n /** don't show an ellipsise and then the last page link, usefull for search results where the last page isn't important */\n hideLast?: boolean;\n /** callback function which is passed the selected page number on click */\n pagerCallback: (n: number) => void;\n /** number of items per page */\n perPage: number;\n /** the name of the search param in the url that is modified on page click, defaults to 'page' */\n searchParam?: string;\n children?: ReactNode;\n} & HTMLAttributes<HTMLElement>;\n\n/**\n * \n * Pagination is used when we are viewing large amounts of data.\nData is split into multiple pages and pagination is used to\neasily navigate through these pages.\n */\nexport function Pagination({\n current,\n items,\n hideLast,\n pagerCallback,\n perPage,\n searchParam = \"page\",\n children,\n id,\n}: PaginationProps) {\n const foundTheme = useTheme();\n const theme = {\n ...defaultTheme,\n ...foundTheme,\n };\n const perPageValue = perPage > 0 ? perPage : 1;\n const totalPages = Math.ceil(items / perPageValue) || 1;\n\n const linkProps = (number: number) => ({\n href: `${typeof window !== \"undefined\" ? window.location.pathname : \"\"}?${\n searchParam ? `${searchParam}=${number}` : \"\"\n }`,\n onClick: (e: TouchEvent | MouseEvent) => {\n e.preventDefault();\n pagerCallback(number);\n },\n });\n\n const renderPager = (active: number, total: number) => {\n const list = [];\n let pager = [];\n // get the list of items\n for (let number = 1; number <= total; number += 1) {\n list.push(\n <PagerItem key={number}>\n <PagerLink\n data-cta={id ? `${id}-${number}` : null}\n $active={number === active}\n {...linkProps(number)}\n aria-label={`page ${number} of ${total}`}\n >\n {number}\n </PagerLink>\n </PagerItem>,\n );\n }\n const first = list.slice(0, 1).concat(\n <PagerItem key=\"first\">\n <span>...</span>\n </PagerItem>,\n );\n const last = list\n .slice(list.length - 1)\n .concat(\n <PagerItem key=\"last\">\n <span>...</span>\n </PagerItem>,\n )\n .reverse();\n pager = list.slice(0, total);\n if (total > 7) {\n if (active <= 4) {\n pager = hideLast ? list.slice(0, 7) : list.slice(0, 5).concat(last);\n } else {\n pager =\n active > total - 4\n ? first.concat(list.slice(-5))\n : hideLast\n ? first.concat(list.slice(active - 3, active + 2))\n : first.concat(list.slice(active - 2, active + 1)).concat(last);\n }\n }\n return pager;\n };\n\n return (\n <ThemeProvider theme={theme}>\n {items > perPage && (\n <PagerWrapper>\n <PagerList>\n <PagerItem key=\"Prev\">\n <PagerLink\n data-cta={id ? `${id}-prev` : null}\n name=\"Prev\"\n aria-disabled={current === 1}\n {...(current === 1 && { tabIndex: -1 })}\n {...(current !== 1 && linkProps(current - 1))}\n $disabled={current === 1}\n >\n Prev\n </PagerLink>\n </PagerItem>\n {renderPager(current, totalPages)}\n <PagerItem key=\"Next\">\n <PagerLink\n data-cta={id ? `${id}-next` : null}\n name=\"Next\"\n aria-disabled={current === totalPages}\n {...(current === totalPages && { tabIndex: -1 })}\n {...(current !== totalPages && linkProps(current + 1))}\n $disabled={current === totalPages}\n >\n Next\n </PagerLink>\n </PagerItem>\n </PagerList>\n {children}\n </PagerWrapper>\n )}\n </ThemeProvider>\n );\n}\n\nexport default Pagination;\n"],"names":["Pagination","_a","current","items","hideLast","pagerCallback","perPage","_b","searchParam","children","id","foundTheme","useTheme","theme","__assign","defaultTheme","perPageValue","totalPages","Math","ceil","linkProps","number","href","concat","window","location","pathname","onClick","e","preventDefault","React","createElement","ThemeProvider","PagerWrapper","PagerList","PagerItem","key","PagerLink","name","tabIndex","active","total","list","pager","push","$active","first","slice","last","length","reverse","renderPager","$disabled"],"mappings":"kSAkCM,SAAUA,EAAWC,OACzBC,EAAOD,EA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CpB,KAKT,IAAMyB,EAAQJ,EAAKK,MAAM,EAAG,GAAGxB,OAC7BO,EAAAC,cAACI,EAAS,CAACC,IAAI,SACbN,EAAAC,cAAA,OAAA,KAAA,SAGEiB,EAAON,EACVK,MAAML,EAAKO,OAAS,GACpB1B,OACCO,EAAAC,cAACI,EAAS,CAACC,IAAI,QACbN,EAAAC,cAAA,OAAA,KAAA,SAGHmB,UAcH,OAbAP,EAAQD,EAAKK,MAAM,EAAGN,GAClBA,EAAQ,IAERE,EADEH,GAAU,EACJpC,EAAWsC,EAAKK,MAAM,EAAG,GAAKL,EAAKK,MAAM,EAAG,GAAGxB,OAAOyB,GAG5DR,EAASC,EAAQ,EACbK,EAAMvB,OAAOmB,EAAKK,OAAM,IACxB3C,EACE0C,EAAMvB,OAAOmB,EAAKK,MAAMP,EAAS,EAAGA,EAAS,IAC7CM,EAAMvB,OAAOmB,EAAKK,MAAMP,EAAS,EAAGA,EAAS,IAAIjB,OAAOyB,IAG7DL,CACT,CAmBWQ,CAAYjD,EAASe,GACtBa,EAAAC,cAACI,EAAS,CAACC,IAAI,QACbN,EAAAC,cAACM,EAASvB,EAAA,CAAA,WACEJ,EAAK,GAAAa,OAAGb,EAAE,SAAU,KAC9B4B,KAAK,OAAM,gBACIpC,IAAYe,GACtBf,IAAYe,GAAc,CAAEsB,UAAU,GACtCrC,IAAYe,GAAcG,EAAUlB,EAAU,GAAG,CAAAkD,UAC3ClD,IAAYe,IAAU,UAMtCR,GAKX"}
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sources":["../../../../src/components/Pagination/styles.ts"],"sourcesContent":["import styled, { css } from \"styled-components\";\nimport { type ThemeType } from \"../../types\";\n\nexport const PagerWrapper = styled.div`\n display: table;\n width: 100%;\n clear: both;\n text-align: center;\n`;\n\nexport const PagerList = styled.ul`\n display: inline-block;\n padding-left: 0;\n margin: 20px 0;\n`;\n\nexport const PagerLink = styled.a<{\n name?: string;\n theme: ThemeType;\n $active?: boolean;\n $disabled?: boolean;\n}>`\n font-weight: normal;\n font-family: ${({\n theme: {\n typography: { fontFamilyBase },\n },\n }) => fontFamilyBase};\n font-size: ${({\n theme: {\n fontSizes: { s },\n },\n }) => s};\n color: ${({ theme }) => theme.colors.textLight};\n background-color: ${({ theme }) => theme.colors.paginationBackground};\n cursor: pointer;\n border-radius: 0;\n margin: ${({ theme }) => theme.spacing.xxs};\n padding: 7px 11px;\n text-decoration: none;\n &:active,\n &:focus,\n &:hover {\n opacity: 0.88;\n text-decoration: underline;\n }\n &:visited {\n text-decoration: none;\n }\n\n &:focus-visible {\n outline: auto;\n }\n\n ${({ $active, theme }) =>\n $active &&\n css`\n color: ${theme.colors.textDark};\n background-color: ${theme.colors.paginationActive};\n cursor: default;\n &:hover {\n background-color: ${theme.colors.paginationActive};\n text-decoration: none;\n }\n `}\n\n ${({ name, theme, $disabled }) =>\n (name === \"Prev\" || name === \"Next\") &&\n css`\n color: ${$disabled ? theme.colors.disabled : theme.colors.paginationText};\n background-color: transparent;\n font-weight: bold;\n padding: 8px 6px;\n background-color: transparent;\n &:focus,\n &:hover {\n background-color: transparent;\n text-decoration: underline;\n }\n &:active,\n &:visited {\n text-decoration: none;\n }\n `}\n\n ${({ theme, $disabled }) =>\n $disabled &&\n css`\n color: $ ${theme.colors.disabled};\n cursor: not-allowed;\n pointer-events:none\n text-decoration: none;\n &:hover,\n &:focus,\n &:active,\n &:visited {\n color: ${theme.colors.disabled};\n text-decoration: none;\n }\n `}\n`;\n\nexport const PagerItem = styled.li<{ theme: ThemeType }>`\n display: none;\n &:first-child,\n &:last-child {\n display: inline;\n }\n @media (min-width: ${(props) => props.theme.breakpoint.mobile}) {\n display: inline;\n }\n span {\n border: none;\n min-width: 30px;\n padding: 5px;\n margin: 1px;\n border-radius: 0;\n border-width: ${(props) => props.theme.breakpoint.mobile};\n }\n`;\n"],"names":["PagerWrapper","styled","div","templateObject_1","__makeTemplateObject","PagerList","ul","templateObject_2","PagerLink","a","templateObject_6","_a","theme","typography","fontFamilyBase","fontSizes","s","colors","textLight","paginationBackground","spacing","xxs","$active","css","templateObject_3","textDark","paginationActive","name","$disabled","templateObject_4","disabled","paginationText","templateObject_5","PagerItem","li","templateObject_7","props","breakpoint","mobile"],"mappings":"2HAGO,kBAAMA,EAAeC,EAAOC,IAAGC,IAAAA,EAAAC,EAAA,CAAA,gFAAA,CAAA,mFAOzBC,EAAYJ,EAAOK,GAAEC,IAAAA,EAAAH,EAAA,CAAA,uEAAA,CAAA,0EAMrBI,EAAYP,EAAOQ,EAACC,IAAAA,EAAAN,EAAA,CAAA,4CAAA,mBAAA,eAAA,0BAAA,yDAAA,0PAAA,SAAA,SAAA,MAAA,CAK/B,4CAMoB,mBAKb,eACuC,0BACsB,yDAG1B,0PA2BvC,SAmBA,SAgBA,QA5EY,SAACO,GAIV,OAF0BA,EAAAC,MAAAC,WAAAC,cAE1B,EACO,SAACH,GAIR,OAFYA,EAAAC,MAAAG,UAAAC,CAEZ,EACG,SAACL,GAAc,OAAPA,EAAAC,MAAaK,OAAOC,SAAb,EACJ,SAACP,GAAc,OAAPA,EAAAC,MAAaK,OAAOE,oBAAb,EAGzB,SAACR,GAAc,OAAPA,EAAAC,MAAaQ,QAAQC,GAAd,EAiBvB,SAACV,OAAEW,EAAOX,EAAAW,QAAEV,EAAKD,EAAAC,MACjB,OAAAU,GACAC,EAAGC,IAAAA,EAAApB,EAAA,CAAA,kBAAA,8BAAA,yEAAA,oDAAA,CAAA,kBAC6B,8BACmB,yEAGE,sDAJ1CQ,EAAMK,OAAOQ,SACFb,EAAMK,OAAOS,iBAGXd,EAAMK,OAAOS,iBANrC,EAWA,SAACf,GAAE,IAAAgB,SAAMf,EAAKD,EAAAC,MAAEgB,EAASjB,EAAAiB,UACzB,OAAU,SAATD,GAA4B,SAATA,IACpBJ,EAAGM,IAAAA,EAAAzB,EAAA,CAAA,kBAAA,8UAAA,CAAA,kBACuE,gVAA/DwB,EAAYhB,EAAMK,OAAOa,SAAWlB,EAAMK,OAAOc,eAF5D,EAkBA,SAACpB,OAAEC,EAAKD,EAAAC,MACR,OADmBD,EAAAiB,WAEnBL,EAAGS,IAAAA,EAAA5B,EAAA,CAAA,oBAAA,8KAAA,oDAAA,CAAA,oBAC+B,8KAQA,sDARrBQ,EAAMK,OAAOa,SAQblB,EAAMK,OAAOa,SAV1B,GAgBSG,EAAYhC,EAAOiC,GAAEC,IAAAA,EAAA/B,EAAA,CAAA,2GAAA,oKAAA,YAAA,CAAsB,2GAMO,oKASH,cATrC,SAACgC,GAAU,OAAAA,EAAMxB,MAAMyB,WAAWC,MAAM,EAS3C,SAACF,GAAU,OAAAA,EAAMxB,MAAMyB,WAAWC,MAAM"}
1
+ {"version":3,"file":"styles.js","sources":["../../../../src/components/Pagination/styles.ts"],"sourcesContent":["import styled, { css } from \"styled-components\";\nimport { type ThemeType } from \"../../types\";\n\nexport const PagerWrapper = styled.div`\n display: table;\n width: 100%;\n clear: both;\n text-align: center;\n`;\n\nexport const PagerList = styled.ul`\n display: inline-block;\n padding-left: 0;\n margin: 20px 0;\n`;\n\nexport const PagerLink = styled.a<{\n name?: string;\n theme: ThemeType;\n $active?: boolean;\n $disabled?: boolean;\n}>`\n font-weight: normal;\n font-family: ${({\n theme: {\n typography: { fontFamilyBase },\n },\n }) => fontFamilyBase};\n font-size: ${({\n theme: {\n fontSizes: { s },\n },\n }) => s};\n color: ${({ theme }) => theme.colors.textLight};\n background-color: ${({ theme }) => theme.colors.paginationBackground};\n cursor: pointer;\n border-radius: 0;\n margin: ${({ theme }) => theme.spacing.xxs};\n padding: 7px 11px;\n text-decoration: none;\n &:active,\n &:focus,\n &:hover {\n opacity: 0.88;\n text-decoration: underline;\n }\n &:visited {\n text-decoration: none;\n }\n\n &:focus-visible {\n outline: auto;\n }\n\n ${({ $active, theme }) =>\n $active &&\n css`\n color: ${theme.colors.textDark};\n background-color: ${theme.colors.paginationActive};\n cursor: default;\n &:hover {\n background-color: ${theme.colors.paginationActive};\n text-decoration: none;\n }\n `}\n\n ${({ name, theme, $disabled }) =>\n (name === \"Prev\" || name === \"Next\") &&\n css`\n color: ${$disabled ? theme.colors.disabled : theme.colors.paginationText};\n background-color: transparent;\n font-weight: bold;\n padding: 8px 6px;\n background-color: transparent;\n &:focus,\n &:hover {\n background-color: transparent;\n text-decoration: underline;\n }\n &:active,\n &:visited {\n text-decoration: none;\n }\n `}\n\n ${({ theme, $disabled }) =>\n $disabled &&\n css`\n color: $ ${theme.colors.disabled};\n cursor: not-allowed;\n pointer-events:none\n text-decoration: none;\n &:hover,\n &:focus,\n &:active,\n &:visited {\n color: ${theme.colors.disabled};\n text-decoration: none;\n }\n `}\n`;\n\nexport const PagerItem = styled.li<{ theme: ThemeType }>`\n display: none;\n &:first-child,\n &:last-child {\n display: inline;\n }\n @media (min-width: ${(props) => props.theme.breakpoint.mobile}) {\n display: inline;\n }\n span {\n border: none;\n min-width: 30px;\n padding: 5px;\n margin: 1px;\n border-radius: 0;\n border-width: ${(props) => props.theme.breakpoint.mobile};\n }\n`;\n"],"names":["PagerWrapper","styled","div","templateObject_1","__makeTemplateObject","PagerList","ul","templateObject_2","PagerLink","a","templateObject_6","_a","theme","typography","fontFamilyBase","fontSizes","s","colors","textLight","paginationBackground","spacing","xxs","$active","css","templateObject_3","textDark","paginationActive","name","$disabled","templateObject_4","disabled","paginationText","templateObject_5","PagerItem","li","templateObject_7","props","breakpoint","mobile"],"mappings":"2HAGO,kBAAMA,EAAeC,EAAOC,IAAGC,IAAAA,EAAAC,EAAA,CAAA,gFAAA,CAAA,mFAOzBC,EAAYJ,EAAOK,GAAEC,IAAAA,EAAAH,EAAA,CAAA,uEAAA,CAAA,0EAMrBI,EAAYP,EAAOQ,EAACC,IAAAA,EAAAN,EAAA,CAAA,4CAAA,mBAAA,eAAA,0BAAA,yDAAA,0PAAA,SAAA,SAAA,MAAA,CAK/B,4CAMoB,mBAKb,eACuC,0BACsB,yDAG1B,0PA2BvC,SAmBA,SAgBA,QA5EY,SAACO,GAIV,OAF0BA,EAAAC,MAAAC,WAAAC,cAE1B,EACO,SAACH,GAIR,OAFYA,EAAAC,MAAAG,UAAAC,CAEZ,EACG,SAACL,GAAc,OAAPA,EAAAC,MAAaK,OAAOC,SAAb,EACJ,SAACP,GAAc,OAAPA,EAAAC,MAAaK,OAAOE,oBAAb,EAGzB,SAACR,GAAc,OAAPA,EAAAC,MAAaQ,QAAQC,GAAd,EAiBvB,SAACV,OAAEW,EAAOX,EAAAW,QAAEV,EAAKD,EAAAC,MACjB,OAAAU,GACAC,EAAGC,IAAAA,EAAApB,EAAA,CAAA,kBAAA,8BAAA,yEAAA,oDAAA,CAAA,kBAC6B,8BACmB,yEAGE,sDAJ1CQ,EAAMK,OAAOQ,SACFb,EAAMK,OAAOS,iBAGXd,EAAMK,OAAOS,iBANrC,EAWA,SAACf,GAAE,IAAAgB,SAAMf,EAAKD,EAAAC,MAAEgB,EAASjB,EAAAiB,UACzB,OAAU,SAATD,GAA4B,SAATA,IACpBJ,EAAGM,IAAAA,EAAAzB,EAAA,CAAA,kBAAA,8UAAA,CAAA,kBACuE,gVAA/DwB,EAAYhB,EAAMK,OAAOa,SAAWlB,EAAMK,OAAOc,eAF5D,EAkBA,SAACpB,OAAEC,EAAKD,EAAAC,MACR,OADmBD,EAAAiB,WAEnBL,EAAGS,IAAAA,EAAA5B,EAAA,CAAA,oBAAA,8KAAA,oDAAA,CAAA,oBAC+B,8KAQA,sDARrBQ,EAAMK,OAAOa,SAQblB,EAAMK,OAAOa,SAV1B,GAgBSG,EAAYhC,EAAOiC,GAAEC,IAAAA,EAAA/B,EAAA,CAAA,2GAAA,oKAAA,YAAA,CAAsB,2GAMO,oKASH,cATrC,SAACgC,GAAU,OAAAA,EAAMxB,MAAMyB,WAAWC,MAAvB,EASd,SAACF,GAAU,OAAAA,EAAMxB,MAAMyB,WAAWC,MAAvB"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/components/PopOver/index.tsx"],"sourcesContent":["import React, {\n useState,\n useEffect,\n useRef,\n type ReactNode,\n type DetailedReactHTMLElement,\n} from \"react\";\nimport { ThemeProvider, useTheme } from \"styled-components\";\n\nimport { useKey } from \"../../hooks/useKey\";\nimport { crukTheme as defaultTheme } from \"../../themes/cruk\";\nimport { useEffectBrowser } from \"../../hooks/useEffectBrowser\";\n\nimport { type PopOverPositionType } from \"../../types\";\nimport { PopOverWrapper, PopOverModal } from \"./styles\";\n\nexport type PopOverProps = {\n /** modalLabel: used for aria-label of modal */\n modalLabel: string;\n /** modalContent: contents in side the popover modal */\n modalContent: ReactNode;\n /** position: position that the popover opens relative to the triggering element, the trigger element is the child of the component */\n position?: PopOverPositionType;\n /** full: enable child button extend full width */\n full?: boolean;\n /** maxWidth: popover modal max width */\n maxWidth?: string;\n /** minWidth: popover modal min width */\n minWidth?: string;\n /** onPopOverIsOpenChange: popover isOpen changed handler */\n onPopOverIsOpenChange?: (isOpen: boolean) => void;\n children?: ReactNode;\n css?: string;\n};\n\n/**\n * Popover is a non-modal dialog that floats around its disclosure. It's\ncommonly used for displaying additional rich content on top of something.\n*/\nexport function PopOver({\n onPopOverIsOpenChange,\n children,\n minWidth,\n maxWidth,\n position,\n modalLabel,\n modalContent,\n css,\n full = false,\n}: PopOverProps) {\n const popRef = useRef<HTMLDivElement>(null);\n const [showPopOver, setShowPopOver] = useState(false);\n const foundTheme = useTheme();\n const theme = {\n ...defaultTheme,\n ...foundTheme,\n };\n\n const toggle = () => setShowPopOver(!showPopOver);\n const closePopOver = () => setShowPopOver(false);\n\n // outside click closes popover\n const handleDocumentClick = (e: MouseEvent) => {\n if (!!popRef.current && !popRef.current.contains(e.target as Node)) {\n closePopOver();\n }\n };\n\n useKey(\n () => {\n closePopOver();\n },\n {\n detectKeys: [\"Escape\"],\n },\n [],\n );\n\n useEffect(() => {\n if (onPopOverIsOpenChange) {\n onPopOverIsOpenChange(showPopOver);\n }\n }, [showPopOver, onPopOverIsOpenChange]);\n\n useEffectBrowser(() => {\n document.addEventListener(\"click\", handleDocumentClick, true);\n return () => {\n document.removeEventListener(\"click\", handleDocumentClick, true);\n };\n }, []);\n\n return (\n <ThemeProvider theme={theme}>\n <PopOverWrapper $full={full} $css={css} ref={popRef}>\n {React.Children.map(children, (child) =>\n React.cloneElement(\n child as DetailedReactHTMLElement<object, HTMLElement>,\n {\n onClick: toggle,\n \"aria-expanded\": showPopOver,\n \"aria-haspopup\": \"dialog\",\n },\n ),\n )}\n {showPopOver ? (\n <PopOverModal\n $maxWidth={maxWidth || \"none\"}\n $minWidth={minWidth || \"auto\"}\n $position={position || \"top\"}\n theme={theme}\n role=\"dialog\"\n aria-label={modalLabel}\n aria-modal={showPopOver}\n >\n {modalContent}\n </PopOverModal>\n ) : null}\n </PopOverWrapper>\n </ThemeProvider>\n );\n}\n\nexport default PopOver;\n"],"names":["PopOver","_a","onPopOverIsOpenChange","children","minWidth","maxWidth","position","modalLabel","modalContent","css","_b","full","popRef","useRef","_c","useState","showPopOver","setShowPopOver","foundTheme","useTheme","theme","__assign","defaultTheme","toggle","closePopOver","handleDocumentClick","e","current","contains","target","useKey","detectKeys","useEffect","useEffectBrowser","document","addEventListener","removeEventListener","React","createElement","ThemeProvider","PopOverWrapper","$css","ref","Children","map","child","cloneElement","onClick","PopOverModal","$minWidth","role"],"mappings":"qaAuCM,SAAUA,EAAQC,GACtB,IAAAC,EAAqBD,EAAAC,sBACrBC,EAAQF,EAAAE,SACRC,EAAQH,EAAAG,SACRC,EAAQJ,EAAAI,SACRC,EAAQL,EAAAK,SACRC,EAAUN,EAAAM,WACVC,EAAYP,EAAAO,aACZC,EAAGR,EAAAQ,IACHC,EAAAT,EAAAU,KAAAA,OAAI,IAAAD,GAAQA,EAENE,EAASC,EAAuB,MAChCC,EAAgCC,GAAS,GAAxCC,EAAWF,EAAA,GAAEG,EAAcH,EAAA,GAC5BI,EAAaC,IACbC,EAAKC,EAAAA,EAAA,CAAA,EACNC,GACAJ,GAGCK,EAAS,WAAM,OAAAN,GAAgBD,EAAY,EAC3CQ,EAAe,WAAM,OAAAP,GAAe,EAAM,EAG1CQ,EAAsB,SAACC,GACrBd,EAAOe,UAAYf,EAAOe,QAAQC,SAASF,EAAEG,SACjDL,GAEJ,EAyBA,OAvBAM,EACE,WACEN,GACF,EACA,CACEO,WAAY,CAAC,WAEf,IAGFC,EAAU,WACJ9B,GACFA,EAAsBc,EAE1B,EAAG,CAACA,EAAad,IAEjB+B,EAAiB,WAEf,OADAC,SAASC,iBAAiB,QAASV,GAAqB,GACjD,WACLS,SAASE,oBAAoB,QAASX,GAAqB,EAC7D,GACC,IAGDY,EAAAC,cAACC,EAAa,CAACnB,MAAOA,GACpBiB,EAAAC,cAACE,SAAsB7B,EAAI8B,KAAQhC,EAAKiC,IAAK9B,GAC1CyB,EAAMM,SAASC,IAAIzC,EAAU,SAAC0C,GAC7B,OAAAR,EAAMS,aACJD,EACA,CACEE,QAASxB,EACT,gBAAiBP,EACjB,gBAAiB,UALrB,GASDA,EACCqB,EAAAC,cAACU,aACY3C,GAAY,OAAM4C,UAClB7C,GAAY,iBACZE,GAAY,MACvBc,MAAOA,EACP8B,KAAK,SAAQ,aACD3C,eACAS,GAEXR,GAED,MAIZ"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/PopOver/index.tsx"],"sourcesContent":["import React, {\n useState,\n useEffect,\n useRef,\n type ReactNode,\n type DetailedReactHTMLElement,\n} from \"react\";\nimport { ThemeProvider, useTheme } from \"styled-components\";\n\nimport { useKey } from \"../../hooks/useKey\";\nimport { crukTheme as defaultTheme } from \"../../themes/cruk\";\nimport { useEffectBrowser } from \"../../hooks/useEffectBrowser\";\n\nimport { type PopOverPositionType } from \"../../types\";\nimport { PopOverWrapper, PopOverModal } from \"./styles\";\n\nexport type PopOverProps = {\n /** modalLabel: used for aria-label of modal */\n modalLabel: string;\n /** modalContent: contents in side the popover modal */\n modalContent: ReactNode;\n /** position: position that the popover opens relative to the triggering element, the trigger element is the child of the component */\n position?: PopOverPositionType;\n /** full: enable child button extend full width */\n full?: boolean;\n /** maxWidth: popover modal max width */\n maxWidth?: string;\n /** minWidth: popover modal min width */\n minWidth?: string;\n /** onPopOverIsOpenChange: popover isOpen changed handler */\n onPopOverIsOpenChange?: (isOpen: boolean) => void;\n children?: ReactNode;\n css?: string;\n};\n\n/**\n * Popover is a non-modal dialog that floats around its disclosure. It's\ncommonly used for displaying additional rich content on top of something.\n*/\nexport function PopOver({\n onPopOverIsOpenChange,\n children,\n minWidth,\n maxWidth,\n position,\n modalLabel,\n modalContent,\n css,\n full = false,\n}: PopOverProps) {\n const popRef = useRef<HTMLDivElement>(null);\n const [showPopOver, setShowPopOver] = useState(false);\n const foundTheme = useTheme();\n const theme = {\n ...defaultTheme,\n ...foundTheme,\n };\n\n const toggle = () => setShowPopOver(!showPopOver);\n const closePopOver = () => setShowPopOver(false);\n\n // outside click closes popover\n const handleDocumentClick = (e: MouseEvent) => {\n if (!!popRef.current && !popRef.current.contains(e.target as Node)) {\n closePopOver();\n }\n };\n\n useKey(\n () => {\n closePopOver();\n },\n {\n detectKeys: [\"Escape\"],\n },\n [],\n );\n\n useEffect(() => {\n if (onPopOverIsOpenChange) {\n onPopOverIsOpenChange(showPopOver);\n }\n }, [showPopOver, onPopOverIsOpenChange]);\n\n useEffectBrowser(() => {\n document.addEventListener(\"click\", handleDocumentClick, true);\n return () => {\n document.removeEventListener(\"click\", handleDocumentClick, true);\n };\n }, []);\n\n return (\n <ThemeProvider theme={theme}>\n <PopOverWrapper $full={full} $css={css} ref={popRef}>\n {React.Children.map(children, (child) =>\n React.cloneElement(\n child as DetailedReactHTMLElement<object, HTMLElement>,\n {\n onClick: toggle,\n \"aria-expanded\": showPopOver,\n \"aria-haspopup\": \"dialog\",\n },\n ),\n )}\n {showPopOver ? (\n <PopOverModal\n $maxWidth={maxWidth || \"none\"}\n $minWidth={minWidth || \"auto\"}\n $position={position || \"top\"}\n theme={theme}\n role=\"dialog\"\n aria-label={modalLabel}\n aria-modal={showPopOver}\n >\n {modalContent}\n </PopOverModal>\n ) : null}\n </PopOverWrapper>\n </ThemeProvider>\n );\n}\n\nexport default PopOver;\n"],"names":["PopOver","_a","onPopOverIsOpenChange","children","minWidth","maxWidth","position","modalLabel","modalContent","css","_b","full","popRef","useRef","_c","useState","showPopOver","setShowPopOver","foundTheme","useTheme","theme","__assign","defaultTheme","toggle","closePopOver","handleDocumentClick","e","current","contains","target","useKey","detectKeys","useEffect","useEffectBrowser","document","addEventListener","removeEventListener","React","createElement","ThemeProvider","PopOverWrapper","$css","ref","Children","map","child","cloneElement","onClick","PopOverModal","$minWidth","role"],"mappings":"qaAuCM,SAAUA,EAAQC,GACtB,IAAAC,EAAqBD,EAAAC,sBACrBC,EAAQF,EAAAE,SACRC,EAAQH,EAAAG,SACRC,EAAQJ,EAAAI,SACRC,EAAQL,EAAAK,SACRC,EAAUN,EAAAM,WACVC,EAAYP,EAAAO,aACZC,EAAGR,EAAAQ,IACHC,EAAAT,EAAAU,KAAAA,OAAI,IAAAD,GAAQA,EAENE,EAASC,EAAuB,MAChCC,EAAgCC,GAAS,GAAxCC,EAAWF,EAAA,GAAEG,EAAcH,EAAA,GAC5BI,EAAaC,IACbC,EAAKC,EAAAA,EAAA,CAAA,EACNC,GACAJ,GAGCK,EAAS,WAAM,OAAAN,GAAgBD,EAAhB,EACfQ,EAAe,WAAM,OAAAP,GAAe,EAAf,EAGrBQ,EAAsB,SAACC,GACrBd,EAAOe,UAAYf,EAAOe,QAAQC,SAASF,EAAEG,SACjDL,GAEJ,EAyBA,OAvBAM,EACE,WACEN,GACF,EACA,CACEO,WAAY,CAAC,WAEf,IAGFC,EAAU,WACJ9B,GACFA,EAAsBc,EAE1B,EAAG,CAACA,EAAad,IAEjB+B,EAAiB,WAEf,OADAC,SAASC,iBAAiB,QAASV,GAAqB,GACjD,WACLS,SAASE,oBAAoB,QAASX,GAAqB,EAC7D,CACF,EAAG,IAGDY,EAAAC,cAACC,EAAa,CAACnB,MAAOA,GACpBiB,EAAAC,cAACE,SAAsB7B,EAAI8B,KAAQhC,EAAKiC,IAAK9B,GAC1CyB,EAAMM,SAASC,IAAIzC,EAAU,SAAC0C,GAC7B,OAAAR,EAAMS,aACJD,EACA,CACEE,QAASxB,EACT,gBAAiBP,EACjB,gBAAiB,UALrB,GASDA,EACCqB,EAAAC,cAACU,aACY3C,GAAY,OAAM4C,UAClB7C,GAAY,iBACZE,GAAY,MACvBc,MAAOA,EACP8B,KAAK,SAAQ,aACD3C,eACAS,GAEXR,GAED,MAIZ"}
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sources":["../../../../src/components/ProgressBar/styles.ts"],"sourcesContent":["import styled, { css, keyframes } from \"styled-components\";\nimport { type ThemeType } from \"../../types\";\n\nconst BAR_HEIGHT = \"16px\";\n\ntype CircleKeyCircleFillKeyFramesProps = {\n $strokeDashoffsetInit: number;\n strokeDashoffset: number;\n};\n\nconst CircleFillKeyFrames = ({\n $strokeDashoffsetInit,\n strokeDashoffset,\n}: CircleKeyCircleFillKeyFramesProps) => keyframes`\n 0% {\n stroke-dashoffset: ${$strokeDashoffsetInit} ;\n }\n 50% {\n stroke-dashoffset: ${strokeDashoffset} ;\n }\n 100% {\n stroke-dashoffset: ${strokeDashoffset} ;\n }\n`;\n\nconst SecondaryCircleFillKeyFrames = ({\n $strokeDashoffsetInit,\n strokeDashoffset,\n}: CircleKeyCircleFillKeyFramesProps) => keyframes`\n 0% {\n stroke-dashoffset: ${$strokeDashoffsetInit} ;\n }\n 100% {\n stroke-dashoffset: ${strokeDashoffset} ;\n }\n`;\n\nconst TargetBarPulseKeyFrames = () => keyframes`\n 0% {\n width: 0px;\n height: 0px;\n opacity: 0;\n }\n 50% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n width: 64px;\n height: 64px;\n right: -32px;\n }\n`;\n\nconst LineBarPulseKeyFrames = () => keyframes`\n 0% {\n transform: scale(1);\n border-radius: 0px;\n\n }\n 50% {\n transform:scale(1.025);\n }\n 100% {\n transform: scale(1);\n border-radius: 0px;\n }\n`;\n\nexport const ProgressBarWrapper = styled.div`\n margin-top: ${BAR_HEIGHT};\n`;\n\nexport const LineProgressBarWrapper = styled.div<{\n $percentage: number;\n $secondaryPercentage: number;\n theme: ThemeType;\n}>`\n position: relative;\n height: ${BAR_HEIGHT};\n margin-bottom: 0;\n background-color: ${({\n theme: {\n colors: { progressBarBackground },\n },\n }) => progressBarBackground};\n box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);\n\n ${({ $percentage, $secondaryPercentage }) =>\n ($percentage === 100 || $secondaryPercentage === 100) &&\n css`\n animation: ${LineBarPulseKeyFrames} 0.3s 0.5s 1 ease-out;\n `}\n`;\n\nexport const LineProgressBar = styled.div<{\n $percentage: number;\n $barColor?: string;\n $isSecondary?: boolean;\n theme: ThemeType;\n}>`\n position: absolute;\n left: 0;\n height: ${BAR_HEIGHT};\n background-color: ${({ $barColor, $isSecondary, theme }) =>\n !!$barColor || !!$isSecondary\n ? theme.colors.progressBarSecondary\n : theme.colors.progressBar};\n box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);\n transition: width 0.6s ease;\n width: ${({ $percentage }) => $percentage}%;\n\n &::before {\n content: \"\";\n display: inline-block;\n position: absolute;\n margin: auto;\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: 0px;\n height: 0px;\n border-radius: 50%;\n opacity: 0;\n filter: blur(2px);\n background-color: ${({\n $barColor,\n $isSecondary,\n theme: {\n colors: { progressBar, progressBarSecondary },\n },\n }) => ($barColor || $isSecondary ? progressBarSecondary : progressBar)};\n\n ${({ $percentage }) =>\n $percentage === 100 &&\n css`\n animation: ${TargetBarPulseKeyFrames} 0.33s 0.75s 3 ease-in;\n `}\n }\n`;\n\nexport const ScreenReaderOnly = styled.span`\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n border: 0;\n`;\n\nexport const CircularWrapper = styled.div<{\n $circleSize: string;\n theme: ThemeType;\n}>`\n position: relative;\n width: ${({ $circleSize }) => $circleSize};\n height: ${({ $circleSize }) => $circleSize};\n background: none;\n margin: 0 auto;\n box-shadow: none;\n`;\n\nexport const CircleSvg = styled.svg`\n position: absolute;\n transform: rotate(-90deg);\n fill: none;\n stroke-linecap: round;\n width: 100%;\n height: 100%;\n`;\n\nexport const EmptyCircle = styled.circle<{\n theme: ThemeType;\n}>`\n stroke: ${({ theme }) => theme.tokenColors.grey_200};\n`;\n\nexport const FullCircle = styled.circle<{\n strokeDashoffset: number;\n theme: ThemeType;\n $strokeDashoffsetInit: number;\n $barColor?: string;\n $isSecondary?: boolean;\n}>`\n stroke: ${({\n $isSecondary,\n $barColor,\n theme: {\n colors: { circularProgress, circularProgressSecondary },\n },\n }) =>\n $barColor || $isSecondary ? circularProgressSecondary : circularProgress};\n animation: ${({ $isSecondary, strokeDashoffset, $strokeDashoffsetInit }) =>\n $isSecondary\n ? SecondaryCircleFillKeyFrames({\n strokeDashoffset,\n $strokeDashoffsetInit,\n })\n : CircleFillKeyFrames({ strokeDashoffset, $strokeDashoffsetInit })}\n 1s linear;\n`;\n\nexport const CircularValue = styled.div<{\n theme: ThemeType;\n}>`\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 50%;\n z-index: 2;\n font-size: ${({\n theme: {\n fontSizes: { l },\n },\n }) => l};\n line-height: ${({\n theme: {\n fontSizes: { l },\n },\n }) => l};\n text-align: center;\n height: 100%;\n color: ${({\n theme: {\n colors: { textDark },\n },\n }) => textDark};\n`;\n"],"names":["BAR_HEIGHT","TargetBarPulseKeyFrames","keyframes","templateObject_3","__makeTemplateObject","LineBarPulseKeyFrames","templateObject_4","ProgressBarWrapper","styled","div","templateObject_5","LineProgressBarWrapper","templateObject_7","_a","theme","colors","progressBarBackground","$percentage","$secondaryPercentage","css","templateObject_6","LineProgressBar","templateObject_9","$barColor","$isSecondary","progressBarSecondary","progressBar","_b","templateObject_8","ScreenReaderOnly","span","templateObject_10","CircularWrapper","templateObject_11","$circleSize","CircleSvg","svg","templateObject_12","EmptyCircle","circle","templateObject_13","tokenColors","grey_200","FullCircle","templateObject_14","circularProgress","circularProgressSecondary","strokeDashoffset","$strokeDashoffsetInit","templateObject_2","SecondaryCircleFillKeyFrames","templateObject_1","CircleFillKeyFrames","CircularValue","templateObject_15","fontSizes","l","textDark"],"mappings":"0IAGA,kCAAMA,EAAa,OAkCbC,EAA0B,WAAM,OAAAC,EAASC,IAAAA,EAAAC,EAAA,CAAA,gMAAA,CAAA,kMAe9C,EAEKC,EAAwB,WAAM,OAAAH,EAASI,IAAAA,EAAAF,EAAA,CAAA,sLAAA,CAAA,wLAa5C,EAEYG,EAAqBC,EAAOC,IAAGC,IAAAA,EAAAN,EAAA,CAAA,mBAAA,OAAA,CAAA,mBAClB,SAAVJ,GAGHW,EAAyBH,EAAOC,IAAGG,IAAAA,EAAAR,EAAA,CAAA,sCAAA,+CAAA,6DAAA,MAAA,CAI9C,sCAEoB,+CAMO,6DAOxB,QAbOJ,EAEU,SAACa,GAIf,OAF6BA,EAAAC,MAAAC,OAAAC,qBAE7B,EAGJ,SAACH,OAAEI,EAAWJ,EAAAI,YAAEC,EAAoBL,EAAAK,qBACpC,OAAiB,MAAhBD,GAAgD,MAAzBC,IACxBC,EAAGC,IAAAA,EAAAhB,EAAA,CAAA,sBAAA,gCAAA,CAAA,sBACiC,kCAArBC,EAFf,GAMSgB,EAAkBb,EAAOC,IAAGa,IAAAA,EAAAlB,EAAA,CAAA,kDAAA,0BAAA,kGAAA,kTAAA,YAAA,WAAA,CAKvC,kDAGoB,0BAIU,kGAGW,kTAsB+B,YAMnE,aAnCKJ,EACU,SAACa,GAAE,IAAAU,cAAWC,EAAYX,EAAAW,aAAEV,EAAKD,EAAAC,MACnD,OAAES,GAAeC,EACbV,EAAMC,OAAOU,qBACbX,EAAMC,OAAOW,WAFjB,EAKO,SAACb,GAAoB,OAAPA,EAAAI,WAAO,EAgBR,SAAC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+C,IAAAA,EAAA7C,EAAA,CAAA,qCAAA,8CAAA,aAAA,CAAA,qCAEH,8CAGL,eAHhB4C,EAGAD,EALe,CAyK/BG,CAA6B,CAC3BH,iBAAgBA,EAChBC,sBAAqBA,IA7LL,SAACnC,OAC3BmC,EAAqBnC,EAAAmC,sBACrBD,EAAgBlC,EAAAkC,iBACuB,OAAA7C,EAASiD,IAAAA,EAAA/C,EAAA,CAAA,qCAAA,6CAAA,8CAAA,aAAA,CAAA,qCAEH,6CAGL,8CAGA,eANhB4C,EAGAD,EAGAA,EARe,CA4L/BK,CAAoB,CAAEL,mBAAkBC,sBAAqBA,GALjE,GASOK,EAAgB7C,EAAOC,IAAG6C,IAAAA,EAAAlD,EAAA,CAAA,6MAAA,qBAAA,uDAAA,OAAA,CAErC,6MAeO,qBAKA,uDAOO,SAhBD,SAACS,GAIR,OAFYA,EAAAC,MAAAyC,UAAAC,CAEZ,EACS,SAAC3C,GAIV,OAFYA,EAAAC,MAAAyC,UAAAC,CAEZ,EAGG,SAAC3C,GAIJ,OAFgBA,EAAAC,MAAAC,OAAA0C,QAEhB"}
1
+ {"version":3,"file":"styles.js","sources":["../../../../src/components/ProgressBar/styles.ts"],"sourcesContent":["import styled, { css, keyframes } from \"styled-components\";\nimport { type ThemeType } from \"../../types\";\n\nconst BAR_HEIGHT = \"16px\";\n\ntype CircleKeyCircleFillKeyFramesProps = {\n $strokeDashoffsetInit: number;\n strokeDashoffset: number;\n};\n\nconst CircleFillKeyFrames = ({\n $strokeDashoffsetInit,\n strokeDashoffset,\n}: CircleKeyCircleFillKeyFramesProps) => keyframes`\n 0% {\n stroke-dashoffset: ${$strokeDashoffsetInit} ;\n }\n 50% {\n stroke-dashoffset: ${strokeDashoffset} ;\n }\n 100% {\n stroke-dashoffset: ${strokeDashoffset} ;\n }\n`;\n\nconst SecondaryCircleFillKeyFrames = ({\n $strokeDashoffsetInit,\n strokeDashoffset,\n}: CircleKeyCircleFillKeyFramesProps) => keyframes`\n 0% {\n stroke-dashoffset: ${$strokeDashoffsetInit} ;\n }\n 100% {\n stroke-dashoffset: ${strokeDashoffset} ;\n }\n`;\n\nconst TargetBarPulseKeyFrames = () => keyframes`\n 0% {\n width: 0px;\n height: 0px;\n opacity: 0;\n }\n 50% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n width: 64px;\n height: 64px;\n right: -32px;\n }\n`;\n\nconst LineBarPulseKeyFrames = () => keyframes`\n 0% {\n transform: scale(1);\n border-radius: 0px;\n\n }\n 50% {\n transform:scale(1.025);\n }\n 100% {\n transform: scale(1);\n border-radius: 0px;\n }\n`;\n\nexport const ProgressBarWrapper = styled.div`\n margin-top: ${BAR_HEIGHT};\n`;\n\nexport const LineProgressBarWrapper = styled.div<{\n $percentage: number;\n $secondaryPercentage: number;\n theme: ThemeType;\n}>`\n position: relative;\n height: ${BAR_HEIGHT};\n margin-bottom: 0;\n background-color: ${({\n theme: {\n colors: { progressBarBackground },\n },\n }) => progressBarBackground};\n box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);\n\n ${({ $percentage, $secondaryPercentage }) =>\n ($percentage === 100 || $secondaryPercentage === 100) &&\n css`\n animation: ${LineBarPulseKeyFrames} 0.3s 0.5s 1 ease-out;\n `}\n`;\n\nexport const LineProgressBar = styled.div<{\n $percentage: number;\n $barColor?: string;\n $isSecondary?: boolean;\n theme: ThemeType;\n}>`\n position: absolute;\n left: 0;\n height: ${BAR_HEIGHT};\n background-color: ${({ $barColor, $isSecondary, theme }) =>\n !!$barColor || !!$isSecondary\n ? theme.colors.progressBarSecondary\n : theme.colors.progressBar};\n box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);\n transition: width 0.6s ease;\n width: ${({ $percentage }) => $percentage}%;\n\n &::before {\n content: \"\";\n display: inline-block;\n position: absolute;\n margin: auto;\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: 0px;\n height: 0px;\n border-radius: 50%;\n opacity: 0;\n filter: blur(2px);\n background-color: ${({\n $barColor,\n $isSecondary,\n theme: {\n colors: { progressBar, progressBarSecondary },\n },\n }) => ($barColor || $isSecondary ? progressBarSecondary : progressBar)};\n\n ${({ $percentage }) =>\n $percentage === 100 &&\n css`\n animation: ${TargetBarPulseKeyFrames} 0.33s 0.75s 3 ease-in;\n `}\n }\n`;\n\nexport const ScreenReaderOnly = styled.span`\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n border: 0;\n`;\n\nexport const CircularWrapper = styled.div<{\n $circleSize: string;\n theme: ThemeType;\n}>`\n position: relative;\n width: ${({ $circleSize }) => $circleSize};\n height: ${({ $circleSize }) => $circleSize};\n background: none;\n margin: 0 auto;\n box-shadow: none;\n`;\n\nexport const CircleSvg = styled.svg`\n position: absolute;\n transform: rotate(-90deg);\n fill: none;\n stroke-linecap: round;\n width: 100%;\n height: 100%;\n`;\n\nexport const EmptyCircle = styled.circle<{\n theme: ThemeType;\n}>`\n stroke: ${({ theme }) => theme.tokenColors.grey_200};\n`;\n\nexport const FullCircle = styled.circle<{\n strokeDashoffset: number;\n theme: ThemeType;\n $strokeDashoffsetInit: number;\n $barColor?: string;\n $isSecondary?: boolean;\n}>`\n stroke: ${({\n $isSecondary,\n $barColor,\n theme: {\n colors: { circularProgress, circularProgressSecondary },\n },\n }) =>\n $barColor || $isSecondary ? circularProgressSecondary : circularProgress};\n animation: ${({ $isSecondary, strokeDashoffset, $strokeDashoffsetInit }) =>\n $isSecondary\n ? SecondaryCircleFillKeyFrames({\n strokeDashoffset,\n $strokeDashoffsetInit,\n })\n : CircleFillKeyFrames({ strokeDashoffset, $strokeDashoffsetInit })}\n 1s linear;\n`;\n\nexport const CircularValue = styled.div<{\n theme: ThemeType;\n}>`\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 50%;\n z-index: 2;\n font-size: ${({\n theme: {\n fontSizes: { l },\n },\n }) => l};\n line-height: ${({\n theme: {\n fontSizes: { l },\n },\n }) => l};\n text-align: center;\n height: 100%;\n color: ${({\n theme: {\n colors: { textDark },\n },\n }) => textDark};\n`;\n"],"names":["BAR_HEIGHT","TargetBarPulseKeyFrames","keyframes","templateObject_3","__makeTemplateObject","LineBarPulseKeyFrames","templateObject_4","ProgressBarWrapper","styled","div","templateObject_5","LineProgressBarWrapper","templateObject_7","_a","theme","colors","progressBarBackground","$percentage","$secondaryPercentage","css","templateObject_6","LineProgressBar","templateObject_9","$barColor","$isSecondary","progressBarSecondary","progressBar","_b","templateObject_8","ScreenReaderOnly","span","templateObject_10","CircularWrapper","templateObject_11","$circleSize","CircleSvg","svg","templateObject_12","EmptyCircle","circle","templateObject_13","tokenColors","grey_200","FullCircle","templateObject_14","circularProgress","circularProgressSecondary","strokeDashoffset","$strokeDashoffsetInit","templateObject_2","SecondaryCircleFillKeyFrames","templateObject_1","CircleFillKeyFrames","CircularValue","templateObject_15","fontSizes","l","textDark"],"mappings":"0IAGA,kCAAMA,EAAa,OAkCbC,EAA0B,WAAM,OAAAC,EAASC,IAAAA,EAAAC,EAAA,CAAA,gMAAA,CAAA,kMAAT,EAiBhCC,EAAwB,WAAM,OAAAH,EAASI,IAAAA,EAAAF,EAAA,CAAA,sLAAA,CAAA,wLAAT,EAevBG,EAAqBC,EAAOC,IAAGC,IAAAA,EAAAN,EAAA,CAAA,mBAAA,OAAA,CAAA,mBAClB,SAAVJ,GAGHW,EAAyBH,EAAOC,IAAGG,IAAAA,EAAAR,EAAA,CAAA,sCAAA,+CAAA,6DAAA,MAAA,CAI9C,sCAEoB,+CAMO,6DAOxB,QAbOJ,EAEU,SAACa,GAIf,OAF6BA,EAAAC,MAAAC,OAAAC,qBAE7B,EAGJ,SAACH,OAAEI,EAAWJ,EAAAI,YAAEC,EAAoBL,EAAAK,qBACpC,OAAiB,MAAhBD,GAAgD,MAAzBC,IACxBC,EAAGC,IAAAA,EAAAhB,EAAA,CAAA,sBAAA,gCA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,mBAOF,wBAd9D,SAACS,OACTW,EAAYX,EAAAW,aACZD,EAASV,EAAAU,UAEPI,EAAAd,EAAAC,MAAAC,OAAU8B,EAAgBlB,EAAAkB,iBAAEC,EAAyBnB,EAAAmB,0BAGvD,OAAAvB,GAAaC,EAAesB,EAA4BD,CAAxD,EACW,SAAChC,GAAE,IAAAW,iBAAcuB,EAAgBlC,EAAAkC,iBAAEC,EAAqBnC,EAAAmC,sBACjE,OAAAxB,EA3K+B,SAACX,OACpCmC,EAAqBnC,EAAAmC,sBACrBD,EAAgBlC,EAAAkC,iBACuB,OAAA7C,EAAS+C,IAAAA,EAAA7C,EAAA,CAAA,qCAAA,8CAAA,aAAA,CAAA,qCAEH,8CAGL,eAHhB4C,EAGAD,EALe,CAyK/BG,CAA6B,CAC3BH,iBAAgBA,EAChBC,sBAAqBA,IA7LL,SAACnC,OAC3BmC,EAAqBnC,EAAAmC,sBACrBD,EAAgBlC,EAAAkC,iBACuB,OAAA7C,EAASiD,IAAAA,EAAA/C,EAAA,CAAA,qCAAA,6CAAA,8CAAA,aAAA,CAAA,qCAEH,6CAGL,8CAGA,eANhB4C,EAGAD,EAGAA,EARe,CA4L/BK,CAAoB,CAAEL,mBAAkBC,sBAAqBA,GALjE,GASOK,EAAgB7C,EAAOC,IAAG6C,IAAAA,EAAAlD,EAAA,CAAA,6MAAA,qBAAA,uDAAA,OAAA,CAErC,6MAeO,qBAKA,uDAOO,SAhBD,SAACS,GAIR,OAFYA,EAAAC,MAAAyC,UAAAC,CAEZ,EACS,SAAC3C,GAIV,OAFYA,EAAAC,MAAAyC,UAAAC,CAEZ,EAGG,SAAC3C,GAIJ,OAFgBA,EAAAC,MAAAC,OAAA0C,QAEhB"}
@@ -1,2 +1,2 @@
1
- import{__makeTemplateObject as n}from"../../../node_modules/tslib/tslib.es6.js";import o,{css as e}from"styled-components";var i,t,r,l,a,s,c,d,b,h="1.5rem",p="0.75rem",g=o.div(i||(i=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"])),h,h,h,function(n){return n.theme.spacing.xs}),u=o.span(t||(t=n(["\n display: block;\n position: relative;\n border: 2px solid ",";\n pointer-events: none;\n border-radius: 100%;\n height: ",";\n width: ",';\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 5;\n transition:\n border 0.25s linear,\n box-shadow 0.25s linear;\n\n &:before {\n display: block;\n position: absolute;\n content: "";\n border-radius: 100%;\n pointer-events: none;\n height: ',";\n width: ",";\n top: calc(50% - ("," / 2));\n left: calc(50% - ("," / 2));\n margin: auto;\n background-color: rgba(255, 255, 255, 0);\n transition: background-color 0.25s linear;\n }\n"],["\n display: block;\n position: relative;\n border: 2px solid ",";\n pointer-events: none;\n border-radius: 100%;\n height: ",";\n width: ",';\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 5;\n transition:\n border 0.25s linear,\n box-shadow 0.25s linear;\n\n &:before {\n display: block;\n position: absolute;\n content: "";\n border-radius: 100%;\n pointer-events: none;\n height: ',";\n width: ",";\n top: calc(50% - ("," / 2));\n left: calc(50% - ("," / 2));\n margin: auto;\n background-color: rgba(255, 255, 255, 0);\n transition: background-color 0.25s linear;\n }\n"])),function(n){return n.theme.colors.selectionBorder},h,h,p,p,p,p),f=o.label(l||(l=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 width: 100%;\n position: relative;\n\n cursor: ",";\n display: inline-block;\n\n color: ",";\n padding: ",";\n vertical-align: middle;\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 width: 100%;\n position: relative;\n\n cursor: ",";\n display: inline-block;\n\n color: ",";\n padding: ",";\n vertical-align: middle;\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)},function(o){var i=o.theme,t=o.$disabled,l=o.$checked,a=o.$hasError;return i.utilities.useDefaultFromControls?null:e(r||(r=n(["\n min-height: 2rem;\n\n "," "," {\n border: solid 2px\n ",";\n &:before {\n background-color: ",";\n }\n }\n\n &:hover "," "," {\n border: solid 2px\n ",";\n }\n "],["\n min-height: 2rem;\n\n "," "," {\n border: solid 2px\n ",";\n &:before {\n background-color: ",";\n }\n }\n\n &:hover "," "," {\n border: solid 2px\n ",";\n }\n "])),g,u,t?i.colors.disabled:a?i.colors.danger:l?i.colors.check:i.colors.inputBorder,l?i.colors.check:"rgba(255, 255, 255, 0)",g,u,t?i.colors.disabled:i.colors.check)}),m=o.span(a||(a=n(["\n display: inline;\n vertical-align: middle;\n line-height: 100%;\n background-color: ",";\n min-height: 2em;\n z-index: 1;\n"],["\n display: inline;\n vertical-align: middle;\n line-height: 100%;\n background-color: ",";\n min-height: 2em;\n z-index: 1;\n"])),function(n){return n.theme.colors.backgroundLight}),x=o.div(s||(s=n(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(255, 255, 255, 0);\n z-index: 0;\n"],["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(255, 255, 255, 0);\n z-index: 0;\n"]))),k=o.input(b||(b=n(["\n *,\n *:after,\n *:before {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n }\n margin-right: ",";\n\n ","\n"],["\n *,\n *:after,\n *:before {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n }\n margin-right: ",";\n\n ","\n"])),function(n){return n.theme.spacing.xxs},function(o){var i=o.theme,t=o.disabled;return i.utilities.useDefaultFromControls?e(c||(c=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 "])),i.spacing.s):e(d||(d=n(["\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 ~ "," ","::before {\n background: ",";\n }\n "],["\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 ~ "," ","::before {\n background: ",";\n }\n "])),i.spacing.xxs,x,i.colors.inputBorder,g,u,t?i.colors.disabled:i.colors.check)});export{u as Check,g as CheckWrapper,x as SelectedBorder,k as StyledInput,f as StyledLabel,m as VerticalAlign};
1
+ import{__makeTemplateObject as n}from"../../../node_modules/tslib/tslib.es6.js";import o,{css as e}from"styled-components";var i,t,r,l,a,s,c,d,b,h="1.5rem",p="0.75rem",g=o.div(i||(i=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"])),h,h,h,function(n){return n.theme.spacing.xs}),u=o.span(t||(t=n(["\n display: block;\n position: relative;\n border: 2px solid ",";\n pointer-events: none;\n border-radius: 100%;\n height: ",";\n width: ",';\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 5;\n transition:\n border 0.25s linear,\n box-shadow 0.25s linear;\n\n &:before {\n display: block;\n position: absolute;\n content: "";\n border-radius: 100%;\n pointer-events: none;\n height: ',";\n width: ",";\n top: calc(50% - ("," / 2));\n left: calc(50% - ("," / 2));\n margin: auto;\n background-color: rgba(255, 255, 255, 0);\n transition: background-color 0.25s linear;\n }\n"],["\n display: block;\n position: relative;\n border: 2px solid ",";\n pointer-events: none;\n border-radius: 100%;\n height: ",";\n width: ",';\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 5;\n transition:\n border 0.25s linear,\n box-shadow 0.25s linear;\n\n &:before {\n display: block;\n position: absolute;\n content: "";\n border-radius: 100%;\n pointer-events: none;\n height: ',";\n width: ",";\n top: calc(50% - ("," / 2));\n left: calc(50% - ("," / 2));\n margin: auto;\n background-color: rgba(255, 255, 255, 0);\n transition: background-color 0.25s linear;\n }\n"])),function(n){return n.theme.colors.selectionBorder},h,h,p,p,p,p),f=o.label(l||(l=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 width: 100%;\n position: relative;\n\n cursor: ",";\n display: inline-block;\n\n color: ",";\n padding: ",";\n vertical-align: middle;\n\n ","\n // increase font size for desktop\n @media (min-width: ",") {\n font-size: ",";\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 width: 100%;\n position: relative;\n\n cursor: ",";\n display: inline-block;\n\n color: ",";\n padding: ",";\n vertical-align: middle;\n\n ","\n // increase font size for desktop\n @media (min-width: ",") {\n font-size: ",";\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)},function(o){var i=o.theme,t=o.$disabled,l=o.$checked,a=o.$hasError;return i.utilities.useDefaultFromControls?null:e(r||(r=n(["\n min-height: 2rem;\n\n "," "," {\n border: solid 2px\n ",";\n &:before {\n background-color: ",";\n }\n }\n\n &:hover "," "," {\n border: solid 2px\n ",";\n }\n "],["\n min-height: 2rem;\n\n "," "," {\n border: solid 2px\n ",";\n &:before {\n background-color: ",";\n }\n }\n\n &:hover "," "," {\n border: solid 2px\n ",";\n }\n "])),g,u,t?i.colors.disabled:a?i.colors.danger:l?i.colors.check:i.colors.inputBorder,l?i.colors.check:"rgba(255, 255, 255, 0)",g,u,t?i.colors.disabled:i.colors.check)},function(n){return n.theme.breakpoint.desktopLarge},function(n){return n.theme.fontSizes.ml}),m=o.span(a||(a=n(["\n display: inline;\n vertical-align: middle;\n line-height: 100%;\n background-color: ",";\n min-height: 2em;\n z-index: 1;\n"],["\n display: inline;\n vertical-align: middle;\n line-height: 100%;\n background-color: ",";\n min-height: 2em;\n z-index: 1;\n"])),function(n){return n.theme.colors.backgroundLight}),x=o.div(s||(s=n(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(255, 255, 255, 0);\n z-index: 0;\n"],["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(255, 255, 255, 0);\n z-index: 0;\n"]))),k=o.input(b||(b=n(["\n *,\n *:after,\n *:before {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n }\n margin-right: ",";\n\n ","\n"],["\n *,\n *:after,\n *:before {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n }\n margin-right: ",";\n\n ","\n"])),function(n){return n.theme.spacing.xxs},function(o){var i=o.theme,t=o.disabled;return i.utilities.useDefaultFromControls?e(c||(c=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 "])),i.spacing.s):e(d||(d=n(["\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 ~ "," ","::before {\n background: ",";\n }\n "],["\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 ~ "," ","::before {\n background: ",";\n }\n "])),i.spacing.xxs,x,i.colors.inputBorder,g,u,t?i.colors.disabled:i.colors.check)});export{u as Check,g as CheckWrapper,x as SelectedBorder,k as StyledInput,f as StyledLabel,m as VerticalAlign};
2
2
  //# sourceMappingURL=styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sources":["../../../../src/components/Radio/styles.ts"],"sourcesContent":["import styled, { css } from \"styled-components\";\nimport { type ThemeType } from \"../../types\";\n\nconst RADIO_SIZE = \"1.5rem\";\nconst RADIO_INNER_SIZE = \"0.75rem\";\nconst BUTTON_HEIGHT = \"3em\";\n\nexport const CheckWrapper = styled.div<{\n theme: ThemeType;\n}>`\n display: inline-block;\n height: ${RADIO_SIZE};\n width: ${RADIO_SIZE};\n position: absolute;\n top: calc(50% - (${RADIO_SIZE} / 2));\n left: ${({\n theme: {\n spacing: { xs },\n },\n }) => xs};\n`;\n\nexport const Check = styled.span<{\n theme: ThemeType;\n}>`\n display: block;\n position: relative;\n border: 2px solid ${({ theme }) => theme.colors.selectionBorder};\n pointer-events: none;\n border-radius: 100%;\n height: ${RADIO_SIZE};\n width: ${RADIO_SIZE};\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 5;\n transition:\n border 0.25s linear,\n box-shadow 0.25s linear;\n\n &:before {\n display: block;\n position: absolute;\n content: \"\";\n border-radius: 100%;\n pointer-events: none;\n height: ${RADIO_INNER_SIZE};\n width: ${RADIO_INNER_SIZE};\n top: calc(50% - (${RADIO_INNER_SIZE} / 2));\n left: calc(50% - (${RADIO_INNER_SIZE} / 2));\n margin: auto;\n background-color: rgba(255, 255, 255, 0);\n transition: background-color 0.25s linear;\n }\n`;\n\nexport const StyledLabel = styled.label<{\n $hasError: boolean;\n $disabled: boolean;\n $checked: boolean;\n theme: ThemeType;\n}>`\n box-sizing: border-box;\n *,\n *:after,\n *:before {\n box-sizing: border-box;\n }\n line-height: ${({ theme }) => theme.typography.lineHeight};\n font-size: ${({ theme }) => theme.typography.fontSizeBase};\n font-family: ${({ theme }) => theme.typography.fontFamilyBase};\n\n background-color: ${({ theme }) => theme.colors.backgroundLight};\n width: 100%;\n position: relative;\n\n cursor: ${({ $disabled }) => ($disabled ? \"not-allowed\" : \"pointer\")};\n display: inline-block;\n\n color: ${({ theme, $disabled }) =>\n $disabled ? theme.colors.disabled : theme.colors.textDark};\n padding: ${({ theme }) =>\n `calc( (${BUTTON_HEIGHT} - ( ${theme.utilities.inputBorderWidth} * 2) - ${theme.typography.lineHeight} ) / 2) ${theme.spacing.m} calc( (${BUTTON_HEIGHT} - ( ${theme.utilities.inputBorderWidth} * 2) - ${theme.typography.lineHeight} ) / 2) ${theme.spacing.xl}`};\n vertical-align: middle;\n\n ${({ theme, $disabled: isDisabled, $checked, $hasError }) =>\n theme.utilities.useDefaultFromControls\n ? null\n : css`\n min-height: 2rem;\n\n ${CheckWrapper} ${Check} {\n border: solid 2px\n ${isDisabled\n ? theme.colors.disabled\n : $hasError\n ? theme.colors.danger\n : $checked\n ? theme.colors.check\n : theme.colors.inputBorder};\n &:before {\n background-color: ${$checked\n ? theme.colors.check\n : `rgba(255, 255, 255, 0)`};\n }\n }\n\n &:hover ${CheckWrapper} ${Check} {\n border: solid 2px\n ${isDisabled ? theme.colors.disabled : theme.colors.check};\n }\n `}\n`;\n\nexport const VerticalAlign = styled.span<{\n theme: ThemeType;\n}>`\n display: inline;\n vertical-align: middle;\n line-height: 100%;\n background-color: ${({ theme }) => theme.colors.backgroundLight};\n min-height: 2em;\n z-index: 1;\n`;\n\nexport const SelectedBorder = styled.div`\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(255, 255, 255, 0);\n z-index: 0;\n`;\n\nexport const StyledInput = styled.input<{\n disabled: boolean;\n theme: ThemeType;\n}>`\n *,\n *:after,\n *:before {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n }\n margin-right: ${({\n theme: {\n spacing: { xxs },\n },\n }) => xxs};\n\n ${({ theme, disabled }) =>\n theme.utilities.useDefaultFromControls\n ? css`\n position: absolute;\n display: inline-block;\n transform: translate(-50%, -50%);\n top: 50%;\n margin: 0;\n padding: 0;\n left: ${theme.spacing.s};\n `\n : css`\n position: absolute;\n left: ${theme.spacing.xxs};\n opacity: 0;\n\n &:focus ~ ${SelectedBorder} {\n outline: none !important;\n box-shadow: inset 0 0 0 2px ${theme.colors.inputBorder};\n box-shadow: inset 0 0 0 2px -webkit-focus-ring-color;\n }\n\n &:checked ~ ${CheckWrapper} ${Check}::before {\n background: ${disabled\n ? theme.colors.disabled\n : theme.colors.check};\n }\n `}\n`;\n"],"names":["RADIO_SIZE","RADIO_INNER_SIZE","CheckWrapper","styled","div","templateObject_1","__makeTemplateObject","_a","theme","spacing","xs","Check","span","templateObject_2","colors","selectionBorder","StyledLabel","label","templateObject_4","typography","lineHeight","fontSizeBase","fontFamilyBase","backgroundLight","$disabled","disabled","textDark","concat","utilities","inputBorderWidth","m","xl","isDisabled","$checked","$hasError","useDefaultFromControls","css","templateObject_3","danger","check","inputBorder","VerticalAlign","templateObject_5","SelectedBorder","templateObject_6","StyledInput","input","templateObject_9","xxs","templateObject_7","s","templateObject_8"],"mappings":"2HAGA,sBAAMA,EAAa,SACbC,EAAmB,UAGZC,EAAeC,EAAOC,IAAGC,IAAAA,EAAAC,EAAA,CAAA,yCAAA,eAAA,gDAAA,oBAAA,OAAA,CAEpC,yCAEoB,eACD,gDAEU,oBAKrB,SAREN,EACDA,EAEUA,EACX,SAACO,GAIH,OAFWA,EAAAC,MAAAC,QAAAC,EAEX,GAGKC,EAAQR,EAAOS,KAAIC,IAAAA,EAAAP,EAAA,CAAA,mEAAA,iEAAA,eAAA,+RAAA,iBAAA,2BAAA,kCAAA,oIAAA,CAE9B,mEAG+D,iEAG3C,eACD,+RAgBS,iBACD,2BACU,kCACC,sIAvBlB,SAACC,GAAc,OAAPA,EAAAC,MAAaM,OAAOC,eAAb,EAGzBf,EACDA,EAgBGC,EACDA,EACUA,EACCA,GAOXe,EAAcb,EAAOc,MAAKC,IAAAA,EAAAZ,EAAA,CAAA,iHAAA,mBAAA,qBAAA,4BAAA,yDAAA,2CAAA,iBAAA,qCAAA,MAAA,CAKrC,iHAOyD,mBACA,qBACI,4BAEE,yDAIK,2CAIT,iBAEyM,qCA6B7P,QA3CQ,SAACC,GAAc,OAAPA,EAAAC,MAAaW,WAAWC,UAAjB,EACjB,SAACb,GAAc,OAAPA,EAAAC,MAAaW,WAAWE,YAAjB,EACb,SAACd,GAAc,OAAPA,EAAAC,MAAaW,WAAWG,cAAjB,EAEV,SAACf,GAAc,OAAPA,EAAAC,MAAaM,OAAOS,eAAb,EAIzB,SAAChB,GAAkB,OAAPA,EAAAiB,UAAoB,cAAgB,SAA7B,EAGpB,SAACjB,OA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8JAYS,UA6BF,QAjCS,SAACC,GAIX,OAFYA,EAAAC,MAAAC,QAAAuC,GAEZ,EAEJ,SAACzC,OAAEC,EAAKD,EAAAC,MAAEiB,EAAQlB,EAAAkB,SAClB,OAAAjB,EAAMoB,UAAUO,uBACZC,EAAGa,IAAAA,EAAA3C,EAAA,CAAA,qMAAA,eAAA,CAAA,qMAOsB,iBAAfE,EAAMC,QAAQyC,GAExBd,EAAGe,IAAAA,EAAA7C,EAAA,CAAA,oDAAA,mDAAA,sFAAA,8GAAA,IAAA,uCAAA,4BAAA,CAAA,oDAEwB,mDAGC,sFAE8B,8GAI9B,IAAS,uCAGX,8BAZhBE,EAAMC,QAAQuC,IAGVL,EAEoBnC,EAAMM,OAAO0B,YAI/BtC,EAAgBS,EACdc,EACVjB,EAAMM,OAAOW,SACbjB,EAAMM,OAAOyB,MAxBzB"}
1
+ {"version":3,"file":"styles.js","sources":["../../../../src/components/Radio/styles.ts"],"sourcesContent":["import styled, { css } from \"styled-components\";\nimport { type ThemeType } from \"../../types\";\n\nconst RADIO_SIZE = \"1.5rem\";\nconst RADIO_INNER_SIZE = \"0.75rem\";\nconst BUTTON_HEIGHT = \"3em\";\n\nexport const CheckWrapper = styled.div<{\n theme: ThemeType;\n}>`\n display: inline-block;\n height: ${RADIO_SIZE};\n width: ${RADIO_SIZE};\n position: absolute;\n top: calc(50% - (${RADIO_SIZE} / 2));\n left: ${({\n theme: {\n spacing: { xs },\n },\n }) => xs};\n`;\n\nexport const Check = styled.span<{\n theme: ThemeType;\n}>`\n display: block;\n position: relative;\n border: 2px solid ${({ theme }) => theme.colors.selectionBorder};\n pointer-events: none;\n border-radius: 100%;\n height: ${RADIO_SIZE};\n width: ${RADIO_SIZE};\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 5;\n transition:\n border 0.25s linear,\n box-shadow 0.25s linear;\n\n &:before {\n display: block;\n position: absolute;\n content: \"\";\n border-radius: 100%;\n pointer-events: none;\n height: ${RADIO_INNER_SIZE};\n width: ${RADIO_INNER_SIZE};\n top: calc(50% - (${RADIO_INNER_SIZE} / 2));\n left: calc(50% - (${RADIO_INNER_SIZE} / 2));\n margin: auto;\n background-color: rgba(255, 255, 255, 0);\n transition: background-color 0.25s linear;\n }\n`;\n\nexport const StyledLabel = styled.label<{\n $hasError: boolean;\n $disabled: boolean;\n $checked: boolean;\n theme: ThemeType;\n}>`\n box-sizing: border-box;\n *,\n *:after,\n *:before {\n box-sizing: border-box;\n }\n line-height: ${({ theme }) => theme.typography.lineHeight};\n font-size: ${({ theme }) => theme.typography.fontSizeBase};\n font-family: ${({ theme }) => theme.typography.fontFamilyBase};\n\n background-color: ${({ theme }) => theme.colors.backgroundLight};\n width: 100%;\n position: relative;\n\n cursor: ${({ $disabled }) => ($disabled ? \"not-allowed\" : \"pointer\")};\n display: inline-block;\n\n color: ${({ theme, $disabled }) =>\n $disabled ? theme.colors.disabled : theme.colors.textDark};\n padding: ${({ theme }) =>\n `calc( (${BUTTON_HEIGHT} - ( ${theme.utilities.inputBorderWidth} * 2) - ${theme.typography.lineHeight} ) / 2) ${theme.spacing.m} calc( (${BUTTON_HEIGHT} - ( ${theme.utilities.inputBorderWidth} * 2) - ${theme.typography.lineHeight} ) / 2) ${theme.spacing.xl}`};\n vertical-align: middle;\n\n ${({ theme, $disabled: isDisabled, $checked, $hasError }) =>\n theme.utilities.useDefaultFromControls\n ? null\n : css`\n min-height: 2rem;\n\n ${CheckWrapper} ${Check} {\n border: solid 2px\n ${isDisabled\n ? theme.colors.disabled\n : $hasError\n ? theme.colors.danger\n : $checked\n ? theme.colors.check\n : theme.colors.inputBorder};\n &:before {\n background-color: ${$checked\n ? theme.colors.check\n : `rgba(255, 255, 255, 0)`};\n }\n }\n\n &:hover ${CheckWrapper} ${Check} {\n border: solid 2px\n ${isDisabled ? theme.colors.disabled : theme.colors.check};\n }\n `}\n // increase font size for desktop\n @media (min-width: ${({ theme }) => theme.breakpoint.desktopLarge}) {\n font-size: ${({ theme }) => theme.fontSizes.ml};\n }\n`;\n\nexport const VerticalAlign = styled.span<{\n theme: ThemeType;\n}>`\n display: inline;\n vertical-align: middle;\n line-height: 100%;\n background-color: ${({ theme }) => theme.colors.backgroundLight};\n min-height: 2em;\n z-index: 1;\n`;\n\nexport const SelectedBorder = styled.div`\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(255, 255, 255, 0);\n z-index: 0;\n`;\n\nexport const StyledInput = styled.input<{\n disabled: boolean;\n theme: ThemeType;\n}>`\n *,\n *:after,\n *:before {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n }\n margin-right: ${({\n theme: {\n spacing: { xxs },\n },\n }) => xxs};\n\n ${({ theme, disabled }) =>\n theme.utilities.useDefaultFromControls\n ? css`\n position: absolute;\n display: inline-block;\n transform: translate(-50%, -50%);\n top: 50%;\n margin: 0;\n padding: 0;\n left: ${theme.spacing.s};\n `\n : css`\n position: absolute;\n left: ${theme.spacing.xxs};\n opacity: 0;\n\n &:focus ~ ${SelectedBorder} {\n outline: none !important;\n box-shadow: inset 0 0 0 2px ${theme.colors.inputBorder};\n box-shadow: inset 0 0 0 2px -webkit-focus-ring-color;\n }\n\n &:checked ~ ${CheckWrapper} ${Check}::before {\n background: ${disabled\n ? theme.colors.disabled\n : theme.colors.check};\n }\n `}\n`;\n"],"names":["RADIO_SIZE","RADIO_INNER_SIZE","CheckWrapper","styled","div","templateObject_1","__makeTemplateObject","_a","theme","spacing","xs","Check","span","templateObject_2","colors","selectionBorder","StyledLabel","label","templateObject_4","typography","lineHeight","fontSizeBase","fontFamilyBase","backgroundLight","$disabled","disabled","textDark","concat","utilities","inputBorderWidth","m","xl","isDisabled","$checked","$hasError","useDefaultFromControls","css","templateObject_3","danger","check","inputBorder","breakpoint","desktopLarge","fontSizes","ml","VerticalAlign","templateObject_5","SelectedBorder","templateObject_6","StyledInput","input","templateObject_9","xxs","templateObject_7","s","templateObject_8"],"mappings":"2HA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,EAAQlB,EAAAkB,SAClB,OAAAjB,EAAMoB,UAAUO,uBACZC,EAAGiB,IAAAA,EAAA/C,EAAA,CAAA,qMAAA,eAAA,CAAA,qMAOsB,iBAAfE,EAAMC,QAAQ6C,GAExBlB,EAAGmB,IAAAA,EAAAjD,EAAA,CAAA,oDAAA,mDAAA,sFAAA,8GAAA,IAAA,uCAAA,4BAAA,CAAA,oDAEwB,mDAGC,sFAE8B,8GAI9B,IAAS,uCAGX,8BAZhBE,EAAMC,QAAQ2C,IAGVL,EAEoBvC,EAAMM,OAAO0B,YAI/BtC,EAAgBS,EACdc,EACVjB,EAAMM,OAAOW,SACbjB,EAAMM,OAAOyB,MAxBzB"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/components/RadioConsent/index.tsx"],"sourcesContent":["import React from \"react\";\nimport { useTheme, ThemeProvider } from \"styled-components\";\n\nimport { crukTheme as defaultTheme } from \"../../themes/cruk\";\n\nimport { StyledFieldSet, StyledLegend, StyledRadio } from \"./styles\";\n\ntype Attribute = {\n value: string;\n option: string;\n};\n\nexport type RadioConsentProps = {\n /** because each radio has its own label this is the consent group label text */\n legend: string;\n /** array of option for radio constent group where option is the option name and value is the option value */\n attributes: Attribute[];\n /** on change handler callback passed change event */\n onChange?: React.ChangeEventHandler<HTMLInputElement>;\n /** set the value of selected option */\n selectedValue?: string;\n /** name of field this is what groups all the options together */\n name: string;\n};\n\n/**\n *\n * RadioConsent is a component for showing a bunch of yes/no radios predominantly used for notification selections where a unselected state is usefull for analytics.\n *\n * This is always a controlled component that will only change state with the selectedValue prop\n */\nexport function RadioConsent(props: RadioConsentProps) {\n const foundTheme = useTheme();\n const theme = {\n ...defaultTheme,\n ...foundTheme,\n };\n const { legend, attributes, onChange, selectedValue = \"\", name } = props;\n\n return (\n <ThemeProvider theme={theme}>\n <StyledFieldSet>\n <StyledLegend>{legend}</StyledLegend>\n {attributes.map((item: Attribute) => (\n <StyledRadio\n $numberOfAttributes={attributes.length || 0}\n key={item.value}\n checked={selectedValue === item.value}\n onChange={onChange}\n name={name}\n value={item.value}\n >\n {item.option}\n </StyledRadio>\n ))}\n </StyledFieldSet>\n </ThemeProvider>\n );\n}\n\nexport default RadioConsent;\n"],"names":["RadioConsent","props","foundTheme","useTheme","theme","__assign","defaultTheme","legend","attributes","onChange","_a","selectedValue","name","React","createElement","ThemeProvider","StyledFieldSet","StyledLegend","map","item","StyledRadio","$numberOfAttributes","length","key","value","checked","option"],"mappings":"0RA+BM,SAAUA,EAAaC,GAC3B,IAAMC,EAAaC,IACbC,EAAKC,EAAAA,EAAA,CAAA,EACNC,GACAJ,GAEGK,EAA2DN,EAAKM,OAAxDC,EAAmDP,EAAKO,WAA5CC,EAAuCR,EAAKQ,SAAlCC,EAA6BT,EAAKU,cAAlCA,OAAa,IAAAD,EAAG,GAAEA,EAAEE,EAASX,EAAKW,KAExE,OACEC,EAAAC,cAACC,EAAa,CAACX,MAAOA,GACpBS,EAAAC,cAACE,EAAc,KACbH,EAAAC,cAACG,EAAY,KAAEV,GACdC,EAAWU,IAAI,SAACC,GAAoB,OACnCN,EAAAC,cAACM,EAAW,CAAAC,oBACWb,EAAWc,QAAU,EAC1CC,IAAKJ,EAAKK,MACVC,QAASd,IAAkBQ,EAAKK,MAChCf,SAAUA,EACVG,KAAMA,EACNY,MAAOL,EAAKK,OAEXL,EAAKO,OAET,IAIT"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/RadioConsent/index.tsx"],"sourcesContent":["import React from \"react\";\nimport { useTheme, ThemeProvider } from \"styled-components\";\n\nimport { crukTheme as defaultTheme } from \"../../themes/cruk\";\n\nimport { StyledFieldSet, StyledLegend, StyledRadio } from \"./styles\";\n\ntype Attribute = {\n value: string;\n option: string;\n};\n\nexport type RadioConsentProps = {\n /** because each radio has its own label this is the consent group label text */\n legend: string;\n /** array of option for radio constent group where option is the option name and value is the option value */\n attributes: Attribute[];\n /** on change handler callback passed change event */\n onChange?: React.ChangeEventHandler<HTMLInputElement>;\n /** set the value of selected option */\n selectedValue?: string;\n /** name of field this is what groups all the options together */\n name: string;\n};\n\n/**\n *\n * RadioConsent is a component for showing a bunch of yes/no radios predominantly used for notification selections where a unselected state is usefull for analytics.\n *\n * This is always a controlled component that will only change state with the selectedValue prop\n */\nexport function RadioConsent(props: RadioConsentProps) {\n const foundTheme = useTheme();\n const theme = {\n ...defaultTheme,\n ...foundTheme,\n };\n const { legend, attributes, onChange, selectedValue = \"\", name } = props;\n\n return (\n <ThemeProvider theme={theme}>\n <StyledFieldSet>\n <StyledLegend>{legend}</StyledLegend>\n {attributes.map((item: Attribute) => (\n <StyledRadio\n $numberOfAttributes={attributes.length || 0}\n key={item.value}\n checked={selectedValue === item.value}\n onChange={onChange}\n name={name}\n value={item.value}\n >\n {item.option}\n </StyledRadio>\n ))}\n </StyledFieldSet>\n </ThemeProvider>\n );\n}\n\nexport default RadioConsent;\n"],"names":["RadioConsent","props","foundTheme","useTheme","theme","__assign","defaultTheme","legend","attributes","onChange","_a","selectedValue","name","React","createElement","ThemeProvider","StyledFieldSet","StyledLegend","map","item","StyledRadio","$numberOfAttributes","length","key","value","checked","option"],"mappings":"0RA+BM,SAAUA,EAAaC,GAC3B,IAAMC,EAAaC,IACbC,EAAKC,EAAAA,EAAA,CAAA,EACNC,GACAJ,GAEGK,EAA2DN,EAAKM,OAAxDC,EAAmDP,EAAKO,WAA5CC,EAAuCR,EAAKQ,SAAlCC,EAA6BT,EAAKU,cAAlCA,OAAa,IAAAD,EAAG,GAAEA,EAAEE,EAASX,EAAKW,KAExE,OACEC,EAAAC,cAACC,EAAa,CAACX,MAAOA,GACpBS,EAAAC,cAACE,EAAc,KACbH,EAAAC,cAACG,EAAY,KAAEV,GACdC,EAAWU,IAAI,SAACC,GAAoB,OACnCN,EAAAC,cAACM,EAAW,CAAAC,oBACWb,EAAWc,QAAU,EAC1CC,IAAKJ,EAAKK,MACVC,QAASd,IAAkBQ,EAAKK,MAChCf,SAAUA,EACVG,KAAMA,EACNY,MAAOL,EAAKK,OAEXL,EAAKO,OAT2B,IAe7C"}
@@ -1,2 +1,2 @@
1
- import{__makeTemplateObject as n}from"../../../node_modules/tslib/tslib.es6.js";import t from"styled-components";import{Radio as e}from"../Radio/index.js";var i,o,r,a=t(e)(i||(i=n(["\n display: block;\n float: left;\n text-align: left;\n margin-left: ",";\n max-width: ",";\n width: ",";\n"],["\n display: block;\n float: left;\n text-align: left;\n margin-left: ",";\n max-width: ",";\n width: ",";\n"])),function(n){return n.theme.spacing.s},"5em",function(n){var t=n.$numberOfAttributes,e=n.theme;return"calc(((100% - ".concat("20%",") / ").concat(t,") - ").concat(e.spacing.s,")")}),l=t.legend(o||(o=n(["\n width: ",";\n display: block;\n float: left;\n font-family: ",";\n"],["\n width: ",";\n display: block;\n float: left;\n font-family: ",";\n"])),"20%",function(n){return n.theme.typography.fontFamilyBase}),d=t.fieldset(r||(r=n(["\n box-sizing: border-box;\n *,\n *:after,\n *:before {\n box-sizing: border-box;\n }\n display: block;\n position: relative;\n border: none;\n padding: 0;\n margin: 0 0 "," 0;\n width: 100%;\n"],["\n box-sizing: border-box;\n *,\n *:after,\n *:before {\n box-sizing: border-box;\n }\n display: block;\n position: relative;\n border: none;\n padding: 0;\n margin: 0 0 "," 0;\n width: 100%;\n"])),function(n){return n.theme.spacing.s});export{d as StyledFieldSet,l as StyledLegend,a as StyledRadio};
1
+ import{__makeTemplateObject as n}from"../../../node_modules/tslib/tslib.es6.js";import e from"styled-components";import{Radio as t}from"../Radio/index.js";var i,o,r,a=e(t)(i||(i=n(["\n display: block;\n float: left;\n text-align: left;\n margin-left: ",";\n max-width: ",";\n width: ",";\n\n // increase font size for desktop\n @media (min-width: ",") {\n font-size: ",";\n }\n"],["\n display: block;\n float: left;\n text-align: left;\n margin-left: ",";\n max-width: ",";\n width: ",";\n\n // increase font size for desktop\n @media (min-width: ",") {\n font-size: ",";\n }\n"])),function(n){return n.theme.spacing.s},"5em",function(n){var e=n.$numberOfAttributes,t=n.theme;return"calc(((100% - ".concat("20%",") / ").concat(e,") - ").concat(t.spacing.s,")")},function(n){return n.theme.breakpoint.desktopLarge},function(n){return n.theme.fontSizes.ml}),s=e.legend(o||(o=n(["\n width: ",";\n display: block;\n float: left;\n font-family: ",";\n\n // increase font size for desktop\n @media (min-width: ",") {\n font-size: ",";\n }\n"],["\n width: ",";\n display: block;\n float: left;\n font-family: ",";\n\n // increase font size for desktop\n @media (min-width: ",") {\n font-size: ",";\n }\n"])),"20%",function(n){return n.theme.typography.fontFamilyBase},function(n){return n.theme.breakpoint.desktopLarge},function(n){return n.theme.fontSizes.ml}),f=e.fieldset(r||(r=n(["\n box-sizing: border-box;\n *,\n *:after,\n *:before {\n box-sizing: border-box;\n }\n display: block;\n position: relative;\n border: none;\n padding: 0;\n margin: 0 0 "," 0;\n width: 100%;\n"],["\n box-sizing: border-box;\n *,\n *:after,\n *:before {\n box-sizing: border-box;\n }\n display: block;\n position: relative;\n border: none;\n padding: 0;\n margin: 0 0 "," 0;\n width: 100%;\n"])),function(n){return n.theme.spacing.s});export{f as StyledFieldSet,s as StyledLegend,a as StyledRadio};
2
2
  //# sourceMappingURL=styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sources":["../../../../src/components/RadioConsent/styles.ts"],"sourcesContent":["import styled from \"styled-components\";\n\nimport RadioInput from \"../Radio\";\n\nimport { type ThemeType } from \"../../types\";\n\nconst LEGEND_WIDTH = \"20%\";\nconst MAX_WIDTH = \"5em\";\n\ntype StyleRadioWidthProp = { $numberOfAttributes: number; theme: ThemeType };\n\nexport const StyledRadio = styled(RadioInput)<StyleRadioWidthProp>`\n display: block;\n float: left;\n text-align: left;\n margin-left: ${({ theme }) => theme.spacing.s};\n max-width: ${MAX_WIDTH};\n width: ${({ $numberOfAttributes, theme }) =>\n `calc(((100% - ${LEGEND_WIDTH}) / ${$numberOfAttributes}) - ${theme.spacing.s})`};\n`;\n\nexport const StyledLegend = styled.legend<{\n theme: ThemeType;\n}>`\n width: ${LEGEND_WIDTH};\n display: block;\n float: left;\n font-family: ${({ theme }) => theme.typography.fontFamilyBase};\n`;\n\nexport const StyledFieldSet = styled.fieldset<{\n theme: ThemeType;\n}>`\n box-sizing: border-box;\n *,\n *:after,\n *:before {\n box-sizing: border-box;\n }\n display: block;\n position: relative;\n border: none;\n padding: 0;\n margin: 0 0 ${({ theme }) => theme.spacing.s} 0;\n width: 100%;\n`;\n"],"names":["StyledRadio","styled","RadioInput","templateObject_1","__makeTemplateObject","_a","theme","spacing","s","$numberOfAttributes","concat","StyledLegend","legend","templateObject_2","typography","fontFamilyBase","StyledFieldSet","fieldset","templateObject_3"],"mappings":"2JAMA,UAKaA,EAAcC,EAAOC,EAAPD,CAAkBE,IAAAA,EAAAC,EAAA,CAAA,4EAAA,mBAAA,eAAA,OAAA,CAAqB,4EAInB,mBACvB,eAE4D,SAHnE,SAACC,GAAc,OAAPA,EAAAC,MAAaC,QAAQC,CAAd,EARd,MAUP,SAACH,OAAEI,EAAmBJ,EAAAI,oBAAEH,EAAKD,EAAAC,MACpC,MAAA,iBAAAI,OAZiB,MAYY,QAAAA,OAAOD,EAAmB,QAAAC,OAAOJ,EAAMC,QAAQC,EAAC,IAA7E,GAGSG,EAAeV,EAAOW,OAAMC,IAAAA,EAAAT,EAAA,CAAA,cAAA,wDAAA,OAAA,CAEvC,cACqB,wDAGwC,SArB1C,MAqBJ,SAACC,GAAc,OAAPA,EAAAC,MAAaQ,WAAWC,cAAjB,GAGnBC,EAAiBf,EAAOgB,SAAQC,IAAAA,EAAAd,EAAA,CAAA,0LAAA,yBAAA,CAE3C,0LAW4C,2BAA9B,SAACC,GAAc,OAAPA,EAAAC,MAAaC,QAAQC,CAAd"}
1
+ {"version":3,"file":"styles.js","sources":["../../../../src/components/RadioConsent/styles.ts"],"sourcesContent":["import styled from \"styled-components\";\n\nimport RadioInput from \"../Radio\";\n\nimport { type ThemeType } from \"../../types\";\n\nconst LEGEND_WIDTH = \"20%\";\nconst MAX_WIDTH = \"5em\";\n\ntype StyleRadioWidthProp = { $numberOfAttributes: number; theme: ThemeType };\n\nexport const StyledRadio = styled(RadioInput)<StyleRadioWidthProp>`\n display: block;\n float: left;\n text-align: left;\n margin-left: ${({ theme }) => theme.spacing.s};\n max-width: ${MAX_WIDTH};\n width: ${({ $numberOfAttributes, theme }) =>\n `calc(((100% - ${LEGEND_WIDTH}) / ${$numberOfAttributes}) - ${theme.spacing.s})`};\n\n // increase font size for desktop\n @media (min-width: ${({ theme }) => theme.breakpoint.desktopLarge}) {\n font-size: ${({ theme }) => theme.fontSizes.ml};\n }\n`;\n\nexport const StyledLegend = styled.legend<{\n theme: ThemeType;\n}>`\n width: ${LEGEND_WIDTH};\n display: block;\n float: left;\n font-family: ${({ theme }) => theme.typography.fontFamilyBase};\n\n // increase font size for desktop\n @media (min-width: ${({ theme }) => theme.breakpoint.desktopLarge}) {\n font-size: ${({ theme }) => theme.fontSizes.ml};\n }\n`;\n\nexport const StyledFieldSet = styled.fieldset<{\n theme: ThemeType;\n}>`\n box-sizing: border-box;\n *,\n *:after,\n *:before {\n box-sizing: border-box;\n }\n display: block;\n position: relative;\n border: none;\n padding: 0;\n margin: 0 0 ${({ theme }) => theme.spacing.s} 0;\n width: 100%;\n`;\n"],"names":["StyledRadio","styled","RadioInput","templateObject_1","__makeTemplateObject","_a","theme","spacing","s","$numberOfAttributes","concat","breakpoint","desktopLarge","fontSizes","ml","StyledLegend","legend","typography","fontFamilyBase","StyledFieldSet","fieldset","templateObject_3"],"mappings":"2JAMA,UAKaA,EAAcC,EAAOC,EAAPD,CAAkBE,IAAAA,EAAAC,EAAA,CAAA,4EAAA,mBAAA,eAAA,kEAAA,uBAAA,YAAA,CAAqB,4EAInB,mBACvB,eAE4D,kEAGjB,uBACjB,cAPjC,SAACC,GAAc,OAAPA,EAAAC,MAAaC,QAAQC,CAAd,EARd,MAUP,SAACH,OAAEI,EAAmBJ,EAAAI,oBAAEH,EAAKD,EAAAC,MACpC,MAAA,iBAAAI,OAZiB,MAYY,QAAAA,OAAOD,EAAmB,QAAAC,OAAOJ,EAAMC,QAAQC,EAAC,IAA7E,EAGmB,SAACH,GAAc,OAAPA,EAAAC,MAAaK,WAAWC,YAAjB,EACrB,SAACP,GAAc,OAAPA,EAAAC,MAAaO,UAAUC,EAAhB,GAInBC,EAAed,EAAOe,4LAEjC,cACqB,wDAGwC,kEAGI,uBACjB,cA9B7B,MA0BJ,SAACX,GAAc,OAAPA,EAAAC,MAAaW,WAAWC,cAAjB,EAGT,SAACb,GAAc,OAAPA,EAAAC,MAAaK,WAAWC,YAAjB,EACrB,SAACP,GAAc,OAAPA,EAAAC,MAAaO,UAAUC,EAAhB,GAInBK,EAAiBlB,EAAOmB,SAAQC,IAAAA,EAAAjB,EAAA,CAAA,0LAAA,yBAAA,CAE3C,0LAW4C,2BAA9B,SAACC,GAAc,OAAPA,EAAAC,MAAaC,QAAQC,CAAd"}
@@ -1,2 +1,2 @@
1
- import{__makeTemplateObject as n}from"../../../node_modules/tslib/tslib.es6.js";import o,{css as r}from"styled-components";var e,t,c="3rem",i=o.select(t||(t=n(["\n appearance: none;\n background:\n linear-gradient(\n 45deg,\n "," 50%,\n "," 50%\n ),\n linear-gradient(\n 135deg,\n "," 50%,\n "," 50%\n );\n background-color: ",";\n background-position:\n calc(100% - 16px) 50%,\n calc(100% - 10px) 50%;\n background-size: 6px 6px;\n background-repeat: no-repeat;\n border: ",";\n color: ",";\n display: block;\n font-size: ",";\n min-height: ",";\n padding: ",";\n width: 100%;\n transition: border-color 150ms linear;\n &:hover {\n border-color: ",";\n }\n &:disabled {\n border-color: ",";\n color: ",";\n }\n\n ",";\n"],["\n appearance: none;\n background:\n linear-gradient(\n 45deg,\n "," 50%,\n "," 50%\n ),\n linear-gradient(\n 135deg,\n "," 50%,\n "," 50%\n );\n background-color: ",";\n background-position:\n calc(100% - 16px) 50%,\n calc(100% - 10px) 50%;\n background-size: 6px 6px;\n background-repeat: no-repeat;\n border: ",";\n color: ",";\n display: block;\n font-size: ",";\n min-height: ",";\n padding: ",";\n width: 100%;\n transition: border-color 150ms linear;\n &:hover {\n border-color: ",";\n }\n &:disabled {\n border-color: ",";\n color: ",";\n }\n\n ",";\n"])),function(n){return n.theme.colors.backgroundLight},function(n){return n.theme.colors.selectBackground},function(n){return n.theme.colors.selectBackground},function(n){return n.theme.colors.backgroundLight},function(n){return n.theme.colors.backgroundLight},function(n){var o=n.theme,r=n.$hasError,e=n.$errorMessage;return"solid ".concat(o.utilities.inputBorderWidth," ").concat(r||e?o.colors.textError:o.colors.textInputBorder)},function(n){return n.theme.colors.textDark},function(n){return n.theme.fontSizes.m},c,function(n){var o=n.theme;return"calc( (".concat(c," - ( ").concat(o.utilities.inputBorderWidth," * 2) - ").concat(o.typography.lineHeight," ) / 2) ").concat(o.spacing.m," calc( (").concat(c," - ( ").concat(o.utilities.inputBorderWidth," * 2) - ").concat(o.typography.lineHeight," ) / 2) ").concat(o.spacing.xs)},function(n){return n.theme.colors.secondary},function(n){return n.theme.colors.disabled},function(n){return n.theme.colors.disabled},function(o){var t=o.theme;return t.utilities.useDefaultFocusRect?null:r(e||(e=n(["\n &:focus {\n outline: 0;\n border-color: ",";\n }\n "],["\n &:focus {\n outline: 0;\n border-color: ",";\n }\n "])),t.colors.tertiary)});export{i as StyledSelect,i as default};
1
+ import{__makeTemplateObject as n}from"../../../node_modules/tslib/tslib.es6.js";import o,{css as e}from"styled-components";var r,t,c="3rem",i=o.select(t||(t=n(["\n appearance: none;\n background:\n linear-gradient(\n 45deg,\n "," 50%,\n "," 50%\n ),\n linear-gradient(\n 135deg,\n "," 50%,\n "," 50%\n );\n background-color: ",";\n background-position:\n calc(100% - 16px) 50%,\n calc(100% - 10px) 50%;\n background-size: 6px 6px;\n background-repeat: no-repeat;\n border: ",";\n color: ",";\n display: block;\n font-size: ",";\n min-height: ",";\n padding: ",";\n width: 100%;\n transition: border-color 150ms linear;\n &:hover {\n border-color: ",";\n }\n &:disabled {\n border-color: ",";\n color: ",";\n }\n\n ",";\n\n // increase font size for desktop\n @media (min-width: ",") {\n font-size: ",";\n }\n"],["\n appearance: none;\n background:\n linear-gradient(\n 45deg,\n "," 50%,\n "," 50%\n ),\n linear-gradient(\n 135deg,\n "," 50%,\n "," 50%\n );\n background-color: ",";\n background-position:\n calc(100% - 16px) 50%,\n calc(100% - 10px) 50%;\n background-size: 6px 6px;\n background-repeat: no-repeat;\n border: ",";\n color: ",";\n display: block;\n font-size: ",";\n min-height: ",";\n padding: ",";\n width: 100%;\n transition: border-color 150ms linear;\n &:hover {\n border-color: ",";\n }\n &:disabled {\n border-color: ",";\n color: ",";\n }\n\n ",";\n\n // increase font size for desktop\n @media (min-width: ",") {\n font-size: ",";\n }\n"])),function(n){return n.theme.colors.backgroundLight},function(n){return n.theme.colors.selectBackground},function(n){return n.theme.colors.selectBackground},function(n){return n.theme.colors.backgroundLight},function(n){return n.theme.colors.backgroundLight},function(n){var o=n.theme,e=n.$hasError,r=n.$errorMessage;return"solid ".concat(o.utilities.inputBorderWidth," ").concat(e||r?o.colors.textError:o.colors.textInputBorder)},function(n){return n.theme.colors.textDark},function(n){return n.theme.fontSizes.m},c,function(n){var o=n.theme;return"calc( (".concat(c," - ( ").concat(o.utilities.inputBorderWidth," * 2) - ").concat(o.typography.lineHeight," ) / 2) ").concat(o.spacing.m," calc( (").concat(c," - ( ").concat(o.utilities.inputBorderWidth," * 2) - ").concat(o.typography.lineHeight," ) / 2) ").concat(o.spacing.xs)},function(n){return n.theme.colors.secondary},function(n){return n.theme.colors.disabled},function(n){return n.theme.colors.disabled},function(o){var t=o.theme;return t.utilities.useDefaultFocusRect?null:e(r||(r=n(["\n &:focus {\n outline: 0;\n border-color: ",";\n }\n "],["\n &:focus {\n outline: 0;\n border-color: ",";\n }\n "])),t.colors.tertiary)},function(n){return n.theme.breakpoint.desktopLarge},function(n){return n.theme.fontSizes.ml});export{i as StyledSelect,i as default};
2
2
  //# sourceMappingURL=styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sources":["../../../../src/components/Select/styles.ts"],"sourcesContent":["import styled, { css } from \"styled-components\";\n\nimport { type ThemeType } from \"../../types\";\n\nconst BUTTON_HEIGHT = \"3rem\";\n\ntype StyledSelectProps = {\n $hasError: boolean;\n $errorMessage?: string;\n theme: ThemeType;\n};\n\nconst StyledSelect = styled.select<StyledSelectProps>`\n appearance: none;\n background:\n linear-gradient(\n 45deg,\n ${({ theme }) => theme.colors.backgroundLight} 50%,\n ${({ theme }) => theme.colors.selectBackground} 50%\n ),\n linear-gradient(\n 135deg,\n ${({ theme }) => theme.colors.selectBackground} 50%,\n ${({ theme }) => theme.colors.backgroundLight} 50%\n );\n background-color: ${({ theme }) => theme.colors.backgroundLight};\n background-position:\n calc(100% - 16px) 50%,\n calc(100% - 10px) 50%;\n background-size: 6px 6px;\n background-repeat: no-repeat;\n border: ${({ theme, $hasError, $errorMessage }) =>\n `solid ${theme.utilities.inputBorderWidth} ${\n $hasError || $errorMessage\n ? theme.colors.textError\n : theme.colors.textInputBorder\n }`};\n color: ${({ theme }) => theme.colors.textDark};\n display: block;\n font-size: ${({ theme }) => theme.fontSizes.m};\n min-height: ${BUTTON_HEIGHT};\n padding: ${({ theme }) =>\n `calc( (${BUTTON_HEIGHT} - ( ${theme.utilities.inputBorderWidth} * 2) - ${theme.typography.lineHeight} ) / 2) ${theme.spacing.m} calc( (${BUTTON_HEIGHT} - ( ${theme.utilities.inputBorderWidth} * 2) - ${theme.typography.lineHeight} ) / 2) ${theme.spacing.xs}`};\n width: 100%;\n transition: border-color 150ms linear;\n &:hover {\n border-color: ${({ theme }) => theme.colors.secondary};\n }\n &:disabled {\n border-color: ${({ theme }) => theme.colors.disabled};\n color: ${({ theme }) => theme.colors.disabled};\n }\n\n ${({ theme }) =>\n !theme.utilities.useDefaultFocusRect\n ? css`\n &:focus {\n outline: 0;\n border-color: ${theme.colors.tertiary};\n }\n `\n : null};\n`;\n\nexport default StyledSelect;\nexport { StyledSelect };\n"],"names":["BUTTON_HEIGHT","StyledSelect","styled","select","_a","theme","colors","backgroundLight","selectBackground","$hasError","$errorMessage","concat","utilities","inputBorderWidth","textError","textInputBorder","textDark","fontSizes","m","typography","lineHeight","spacing","xs","secondary","disabled","useDefaultFocusRect","css","templateObject_1","__makeTemplateObject","tertiary"],"mappings":"2HAIA,QAAMA,EAAgB,OAQhBC,EAAeC,EAAOC,gpBAAyB,mFAKF,gBACC,4DAIA,gBACD,qCAEc,8JAW3D,eACyC,sCAEA,oBAClB,iBAEyO,+FAI7M,6CAGD,iBACP,eAWrC,SA5CJ,SAACC,GAAc,OAAPA,EAAAC,MAAaC,OAAOC,eAAb,EACf,SAACH,GAAc,OAAPA,EAAAC,MAAaC,OAAOE,gBAAb,EAIf,SAACJ,GAAc,OAAPA,EAAAC,MAAaC,OAAOE,gBAAb,EACf,SAACJ,GAAc,OAAPA,EAAAC,MAAaC,OAAOC,eAAb,EAED,SAACH,GAAc,OAAPA,EAAAC,MAAaC,OAAOC,eAAb,EAMzB,SAACH,GAAE,IAAAC,UAAOI,EAASL,EAAAK,UAAEC,EAAaN,EAAAM,cAC1C,MAAA,SAAAC,OAASN,EAAMO,UAAUC,iBAAgB,KAAAF,OACvCF,GAAaC,EACTL,EAAMC,OAAOQ,UACbT,EAAMC,OAAOS,gBAHnB,EAKO,SAACX,GAAc,OAAPA,EAAAC,MAAaC,OAAOU,QAAb,EAEX,SAACZ,GAAc,OAAPA,EAAAC,MAAaY,UAAUC,CAAhB,EACdlB,EACH,SAACI,GAAE,IAAAC,EAAKD,EAAAC,MACjB,MAAA,iBAAUL,EAAa,SAAAW,OAAQN,EAAMO,UAAUC,iBAAgB,YAAAF,OAAWN,EAAMc,WAAWC,8BAAqBf,EAAMgB,QAAQH,EAAC,YAAAP,OAAWX,kBAAqBK,EAAMO,UAAUC,oCAA2BR,EAAMc,WAAWC,WAAU,YAAAT,OAAWN,EAAMgB,QAAQC,GAA9P,EAIgB,SAAClB,GAAc,OAAPA,EAAAC,MAAaC,OAAOiB,SAAb,EAGf,SAACnB,GAAc,OAAPA,EAAAC,MAAaC,OAAOkB,QAAb,EACtB,SAACpB,GAAc,OAAPA,EAAAC,MAAaC,OAAOkB,QAAb,EAGxB,SAACpB,GAAE,IAAAC,EAAKD,EAAAC,MACR,OAACA,EAAMO,UAAUa,oBAOb,KANAC,EAAGC,IAAAA,EAAAC,EAAA,CAAA,6EAAA,4BAAA,CAAA,6EAGsC,8BAArBvB,EAAMC,OAAOuB,SAJrC"}
1
+ {"version":3,"file":"styles.js","sources":["../../../../src/components/Select/styles.ts"],"sourcesContent":["import styled, { css } from \"styled-components\";\n\nimport { type ThemeType } from \"../../types\";\n\nconst BUTTON_HEIGHT = \"3rem\";\n\ntype StyledSelectProps = {\n $hasError: boolean;\n $errorMessage?: string;\n theme: ThemeType;\n};\n\nconst StyledSelect = styled.select<StyledSelectProps>`\n appearance: none;\n background:\n linear-gradient(\n 45deg,\n ${({ theme }) => theme.colors.backgroundLight} 50%,\n ${({ theme }) => theme.colors.selectBackground} 50%\n ),\n linear-gradient(\n 135deg,\n ${({ theme }) => theme.colors.selectBackground} 50%,\n ${({ theme }) => theme.colors.backgroundLight} 50%\n );\n background-color: ${({ theme }) => theme.colors.backgroundLight};\n background-position:\n calc(100% - 16px) 50%,\n calc(100% - 10px) 50%;\n background-size: 6px 6px;\n background-repeat: no-repeat;\n border: ${({ theme, $hasError, $errorMessage }) =>\n `solid ${theme.utilities.inputBorderWidth} ${\n $hasError || $errorMessage\n ? theme.colors.textError\n : theme.colors.textInputBorder\n }`};\n color: ${({ theme }) => theme.colors.textDark};\n display: block;\n font-size: ${({ theme }) => theme.fontSizes.m};\n min-height: ${BUTTON_HEIGHT};\n padding: ${({ theme }) =>\n `calc( (${BUTTON_HEIGHT} - ( ${theme.utilities.inputBorderWidth} * 2) - ${theme.typography.lineHeight} ) / 2) ${theme.spacing.m} calc( (${BUTTON_HEIGHT} - ( ${theme.utilities.inputBorderWidth} * 2) - ${theme.typography.lineHeight} ) / 2) ${theme.spacing.xs}`};\n width: 100%;\n transition: border-color 150ms linear;\n &:hover {\n border-color: ${({ theme }) => theme.colors.secondary};\n }\n &:disabled {\n border-color: ${({ theme }) => theme.colors.disabled};\n color: ${({ theme }) => theme.colors.disabled};\n }\n\n ${({ theme }) =>\n !theme.utilities.useDefaultFocusRect\n ? css`\n &:focus {\n outline: 0;\n border-color: ${theme.colors.tertiary};\n }\n `\n : null};\n\n // increase font size for desktop\n @media (min-width: ${({ theme }) => theme.breakpoint.desktopLarge}) {\n font-size: ${({ theme }) => theme.fontSizes.ml};\n }\n`;\n\nexport default StyledSelect;\nexport { StyledSelect };\n"],"names":["BUTTON_HEIGHT","StyledSelect","styled","select","templateObject_2","__makeTemplateObject","_a","theme","colors","backgroundLight","selectBackground","$hasError","$errorMessage","concat","utilities","inputBorderWidth","textError","textInputBorder","textDark","fontSizes","m","typography","lineHeight","spacing","xs","secondary","disabled","useDefaultFocusRect","css","templateObject_1","tertiary","breakpoint","desktopLarge","ml"],"mappings":"2HAIA,QAAMA,EAAgB,OAQhBC,EAAeC,EAAOC,OAAMC,IAAAA,EAAAC,EAAA,CAAA,mFAAA,gBAAA,4DAAA,gBAAA,qCAAA,8JAAA,eAAA,sCAAA,oBAAA,iBAAA,+FAAA,6CAAA,iBAAA,eAAA,kEAAA,uBAAA,YAAA,CAAmB,mFAKF,gBACC,4DAIA,gBACD,qCAEc,8JAW3D,eACyC,sCAEA,oBAClB,iBAEyO,+FAI7M,6CAGD,iBACP,eAWrC,kEAGuD,uBACjB,cAhD1C,SAACC,GAAc,OAAPA,EAAAC,MAAaC,OAAOC,eAAb,EACf,SAACH,GAAc,OAAPA,EAAAC,MAAaC,OAAOE,gBAAb,EAIf,SAACJ,GAAc,OAAPA,EAAAC,MAAaC,OAAOE,gBAAb,EACf,SAACJ,GAAc,OAAPA,EAAAC,MAAaC,OAAOC,eAAb,EAED,SAACH,GAAc,OAAPA,EAAAC,MAAaC,OAAOC,eAAb,EAMzB,SAACH,GAAE,IAAAC,UAAOI,EAASL,EAAAK,UAAEC,EAAaN,EAAAM,cAC1C,MAAA,SAAAC,OAASN,EAAMO,UAAUC,iBAAgB,KAAAF,OACvCF,GAAaC,EACTL,EAAMC,OAAOQ,UACbT,EAAMC,OAAOS,gBAHnB,EAKO,SAACX,GAAc,OAAPA,EAAAC,MAAaC,OAAOU,QAAb,EAEX,SAACZ,GAAc,OAAPA,EAAAC,MAAaY,UAAUC,CAAhB,EACdpB,EACH,SAACM,GAAE,IAAAC,EAAKD,EAAAC,MACjB,MAAA,iBAAUP,EAAa,SAAAa,OAAQN,EAAMO,UAAUC,iBAAgB,YAAAF,OAAWN,EAAMc,WAAWC,8BAAqBf,EAAMgB,QAAQH,EAAC,YAAAP,OAAWb,kBAAqBO,EAAMO,UAAUC,oCAA2BR,EAAMc,WAAWC,WAAU,YAAAT,OAAWN,EAAMgB,QAAQC,GAA9P,EAIgB,SAAClB,GAAc,OAAPA,EAAAC,MAAaC,OAAOiB,SAAb,EAGf,SAACnB,GAAc,OAAPA,EAAAC,MAAaC,OAAOkB,QAAb,EACtB,SAACpB,GAAc,OAAPA,EAAAC,MAAaC,OAAOkB,QAAb,EAGxB,SAACpB,GAAE,IAAAC,EAAKD,EAAAC,MACR,OAACA,EAAMO,UAAUa,oBAOb,KANAC,EAAGC,IAAAA,EAAAxB,EAAA,CAAA,6EAAA,4BAAA,CAAA,6EAGsC,8BAArBE,EAAMC,OAAOsB,SAJrC,EAUmB,SAACxB,GAAc,OAAPA,EAAAC,MAAawB,WAAWC,YAAjB,EACrB,SAAC1B,GAAc,OAAPA,EAAAC,MAAaY,UAAUc,EAAhB"}
@@ -1,2 +1,2 @@
1
- import{__makeTemplateObject as n}from"../../../node_modules/tslib/tslib.es6.js";import t,{css as o}from"styled-components";var r,e,i,a,l,d,p,s,c=t.div(r||(r=n(["\n box-sizing: border-box;\n *,\n *:after,\n *:before {\n box-sizing: border-box;\n }\n text-align: center;\n text-transform: capitalize;\n"],["\n box-sizing: border-box;\n *,\n *:after,\n *:before {\n box-sizing: border-box;\n }\n text-align: center;\n text-transform: capitalize;\n"]))),b=t.ul(i||(i=n(["\n list-style: none;\n padding: 0;\n margin: 0;\n display: flex;\n justify-content: space-between;\n width: 100%;\n\n ","\n"],["\n list-style: none;\n padding: 0;\n margin: 0;\n display: flex;\n justify-content: space-between;\n width: 100%;\n\n ","\n"])),function(t){var r=t.$total;return r&&o(e||(e=n(["\n li {\n width: ","%;\n }\n li:last-child span:after {\n display: none;\n }\n "],["\n li {\n width: ","%;\n }\n li:last-child span:after {\n display: none;\n }\n "])),100/r)}),x=t.span(a||(a=n(["\n border-radius: 50%;\n background-clip: padding-box;\n width: 24px;\n height: 24px;\n background-color: ",";\n display: block;\n margin: 0 auto 0.5em auto;\n border: 2px solid ",';\n text-indent: -999px;\n\n &:after {\n display: block;\n position: absolute;\n width: 100%;\n height: 2px;\n content: "";\n background-color: transparent;\n border-bottom: 2px solid ',";\n left: 50%;\n top: 11px;\n margin-left: 12px;\n }\n"],["\n border-radius: 50%;\n background-clip: padding-box;\n width: 24px;\n height: 24px;\n background-color: ",";\n display: block;\n margin: 0 auto 0.5em auto;\n border: 2px solid ",';\n text-indent: -999px;\n\n &:after {\n display: block;\n position: absolute;\n width: 100%;\n height: 2px;\n content: "";\n background-color: transparent;\n border-bottom: 2px solid ',";\n left: 50%;\n top: 11px;\n margin-left: 12px;\n }\n"])),function(n){return n.theme.colors.stepBackground},function(n){return n.theme.colors.stepBorder},function(n){return n.theme.colors.stepBorder}),f=t.span(l||(l=n(["\n display: block;\n transform: rotate(45deg);\n transform-origin: center center;\n height: 14px;\n width: 8px;\n border-bottom: ",";\n border-right: ",";\n margin-top: 4px;\n margin-left: 8px;\n"],["\n display: block;\n transform: rotate(45deg);\n transform-origin: center center;\n height: 14px;\n width: 8px;\n border-bottom: ",";\n border-right: ",";\n margin-top: 4px;\n margin-left: 8px;\n"])),function(n){var t=n.theme.colors.textLight;return"2px solid ".concat(t)},function(n){var t=n.theme.colors.textLight;return"2px solid ".concat(t)}),g=t.li(s||(s=n(["\n display: flex;\n flex-direction: column;\n position: relative;\n font-family: ",";\n\n ","\n ","\n"],["\n display: flex;\n flex-direction: column;\n position: relative;\n font-family: ",";\n\n ","\n ","\n"])),function(n){return n.theme.typography.fontFamilyBase},function(t){var r=t.theme;return t.$active&&o(d||(d=n(["\n "," {\n border-color: ",";\n }\n "],["\n "," {\n border-color: ",";\n }\n "])),x,r.colors.tertiary)},function(t){var r=t.$done,e=t.theme;return r&&o(p||(p=n(["\n "," {\n border: none;\n background-color: ",";\n &:after {\n border-bottom: 2px solid ",";\n }\n }\n "],["\n "," {\n border: none;\n background-color: ",";\n &:after {\n border-bottom: 2px solid ",";\n }\n }\n "])),x,e.colors.tertiary,e.colors.tertiary)});export{x as StepBar,g as StepItem,b as StepList,f as StepTick,c as StepWrapper};
1
+ import{__makeTemplateObject as n}from"../../../node_modules/tslib/tslib.es6.js";import o,{css as t}from"styled-components";var r,e,i,a,l,d,s,c,p=o.div(r||(r=n(["\n box-sizing: border-box;\n *,\n *:after,\n *:before {\n box-sizing: border-box;\n }\n text-align: center;\n text-transform: capitalize;\n"],["\n box-sizing: border-box;\n *,\n *:after,\n *:before {\n box-sizing: border-box;\n }\n text-align: center;\n text-transform: capitalize;\n"]))),b=o.ul(i||(i=n(["\n list-style: none;\n padding: 0;\n margin: 0;\n display: flex;\n justify-content: space-between;\n width: 100%;\n\n ","\n"],["\n list-style: none;\n padding: 0;\n margin: 0;\n display: flex;\n justify-content: space-between;\n width: 100%;\n\n ","\n"])),function(o){var r=o.$total;return r&&t(e||(e=n(["\n li {\n width: ","%;\n }\n li:last-child span:after {\n display: none;\n }\n "],["\n li {\n width: ","%;\n }\n li:last-child span:after {\n display: none;\n }\n "])),100/r)}),x=o.span(a||(a=n(["\n border-radius: 50%;\n background-clip: padding-box;\n width: 24px;\n height: 24px;\n background-color: ",";\n display: block;\n margin: 0 auto 0.5em auto;\n border: 2px solid ",';\n text-indent: -999px;\n\n &:after {\n display: block;\n position: absolute;\n width: 100%;\n height: 2px;\n content: "";\n background-color: transparent;\n border-bottom: 2px solid ',";\n left: 50%;\n top: 11px;\n margin-left: 12px;\n }\n"],["\n border-radius: 50%;\n background-clip: padding-box;\n width: 24px;\n height: 24px;\n background-color: ",";\n display: block;\n margin: 0 auto 0.5em auto;\n border: 2px solid ",';\n text-indent: -999px;\n\n &:after {\n display: block;\n position: absolute;\n width: 100%;\n height: 2px;\n content: "";\n background-color: transparent;\n border-bottom: 2px solid ',";\n left: 50%;\n top: 11px;\n margin-left: 12px;\n }\n"])),function(n){return n.theme.colors.stepBackground},function(n){return n.theme.colors.stepBorder},function(n){return n.theme.colors.stepBorder}),f=o.span(l||(l=n(["\n display: block;\n transform: rotate(45deg);\n transform-origin: center center;\n height: 14px;\n width: 8px;\n border-bottom: ",";\n border-right: ",";\n margin-top: 4px;\n margin-left: 8px;\n"],["\n display: block;\n transform: rotate(45deg);\n transform-origin: center center;\n height: 14px;\n width: 8px;\n border-bottom: ",";\n border-right: ",";\n margin-top: 4px;\n margin-left: 8px;\n"])),function(n){var o=n.theme.colors.textLight;return"2px solid ".concat(o)},function(n){var o=n.theme.colors.textLight;return"2px solid ".concat(o)}),g=o.li(c||(c=n(["\n display: flex;\n flex-direction: column;\n position: relative;\n font-family: ",";\n\n ","\n ","\n"],["\n display: flex;\n flex-direction: column;\n position: relative;\n font-family: ",";\n\n ","\n ","\n"])),function(n){return n.theme.typography.fontFamilyBase},function(o){var r=o.theme;return o.$active&&t(d||(d=n(["\n "," {\n border-color: ",";\n background-color: ",";\n }\n "],["\n "," {\n border-color: ",";\n background-color: ",";\n }\n "])),x,r.colors.tertiary,r.colors.tertiary)},function(o){var r=o.$done,e=o.theme;return r&&t(s||(s=n(["\n "," {\n border: none;\n background-color: ",";\n &:after {\n border-bottom: 2px solid ",";\n }\n }\n "],["\n "," {\n border: none;\n background-color: ",";\n &:after {\n border-bottom: 2px solid ",";\n }\n }\n "])),x,e.colors.tertiary,e.colors.tertiary)});export{x as StepBar,g as StepItem,b as StepList,f as StepTick,p as StepWrapper};
2
2
  //# sourceMappingURL=styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sources":["../../../../src/components/Step/styles.ts"],"sourcesContent":["import styled, { css } from \"styled-components\";\nimport { type ThemeType } from \"../../types\";\n\nexport const StepWrapper = styled.div`\n box-sizing: border-box;\n *,\n *:after,\n *:before {\n box-sizing: border-box;\n }\n text-align: center;\n text-transform: capitalize;\n`;\n\nexport const StepList = styled.ul<{\n $total: number;\n}>`\n list-style: none;\n padding: 0;\n margin: 0;\n display: flex;\n justify-content: space-between;\n width: 100%;\n\n ${({ $total }) =>\n $total &&\n css`\n li {\n width: ${100 / $total}%;\n }\n li:last-child span:after {\n display: none;\n }\n `}\n`;\n\nexport const StepBar = styled.span<{\n theme: ThemeType;\n}>`\n border-radius: 50%;\n background-clip: padding-box;\n width: 24px;\n height: 24px;\n background-color: ${({ theme }) => theme.colors.stepBackground};\n display: block;\n margin: 0 auto 0.5em auto;\n border: 2px solid ${({ theme }) => theme.colors.stepBorder};\n text-indent: -999px;\n\n &:after {\n display: block;\n position: absolute;\n width: 100%;\n height: 2px;\n content: \"\";\n background-color: transparent;\n border-bottom: 2px solid ${({ theme }) => theme.colors.stepBorder};\n left: 50%;\n top: 11px;\n margin-left: 12px;\n }\n`;\n\nexport const StepTick = styled.span<{\n theme: ThemeType;\n}>`\n display: block;\n transform: rotate(45deg);\n transform-origin: center center;\n height: 14px;\n width: 8px;\n border-bottom: ${({\n theme: {\n colors: { textLight },\n },\n }) => `2px solid ${textLight}`};\n border-right: ${({\n theme: {\n colors: { textLight },\n },\n }) => `2px solid ${textLight}`};\n margin-top: 4px;\n margin-left: 8px;\n`;\n\nexport const StepItem = styled.li<{\n $active: boolean;\n $done: boolean;\n theme: ThemeType;\n}>`\n display: flex;\n flex-direction: column;\n position: relative;\n font-family: ${({ theme }) => theme.typography.fontFamilyBase};\n\n ${({ theme, $active }) =>\n $active &&\n css`\n ${StepBar} {\n border-color: ${theme.colors.tertiary};\n }\n `}\n ${({ $done, theme }) =>\n $done &&\n css`\n ${StepBar} {\n border: none;\n background-color: ${theme.colors.tertiary};\n &:after {\n border-bottom: 2px solid ${theme.colors.tertiary};\n }\n }\n `}\n`;\n"],"names":["StepWrapper","styled","div","templateObject_1","__makeTemplateObject","StepList","ul","templateObject_3","_a","$total","css","templateObject_2","StepBar","span","templateObject_4","theme","colors","stepBackground","stepBorder","StepTick","templateObject_5","textLight","concat","StepItem","li","templateObject_8","typography","fontFamilyBase","$active","templateObject_6","tertiary","$done","templateObject_7"],"mappings":"2HAGO,oBAAMA,EAAcC,EAAOC,IAAGC,IAAAA,EAAAC,EAAA,CAAA,yJAAA,CAAA,4JAWxBC,EAAWJ,EAAOK,GAAEC,IAAAA,EAAAH,EAAA,CAAA,gIAAA,MAAA,CAE/B,gIAiBG,QATD,SAACI,GAAE,IAAAC,EAAMD,EAAAC,OACT,OAAAA,GACAC,EAAGC,IAAAA,EAAAP,EAAA,CAAA,gCAAA,wFAAA,CAAA,gCAEsB,0FAAZ,IAAMK,EAHnB,GAWSG,EAAUX,EAAOY,KAAIC,IAAAA,EAAAV,EAAA,CAAA,kHAAA,2EAAA,kNAAA,oEAAA,CAEhC,kHAK8D,2EAGJ,kNAUS,sEAb/C,SAACI,GAAc,OAAPA,EAAAO,MAAaC,OAAOC,cAAb,EAGf,SAACT,GAAc,OAAPA,EAAAO,MAAaC,OAAOE,UAAb,EAUN,SAACV,GAAc,OAAPA,EAAAO,MAAaC,OAAOE,UAAb,GAOjCC,EAAWlB,EAAOY,KAAIO,IAAAA,EAAAhB,EAAA,CAAA,0IAAA,sBAAA,gDAAA,CAEjC,0IAU8B,sBAKA,kDATb,SAACI,GAEJ,IAAAa,EAASb,EAAAO,MAAAC,OAAAK,UAEjB,MAAA,aAAAC,OAAaD,EAAb,EACU,SAACb,GAEH,IAAAa,EAASb,EAAAO,MAAAC,OAAAK,UAEjB,MAAA,aAAAC,OAAaD,EAAb,GAKKE,EAAWtB,EAAOuB,GAAEC,IAAAA,EAAArB,EAAA,CAAA,wFAAA,UAAA,OAAA,MAAA,CAI/B,wFAI6D,UAQ1D,OAWA,QAnBY,SAACI,GAAc,OAAPA,EAAAO,MAAaW,WAAWC,cAAjB,EAE5B,SAACnB,OAAEO,EAAKP,EAAAO,MACR,OADiBP,EAAAoB,SAEjBlB,EAAGmB,IAAAA,EAAAzB,EAAA,CAAA,WAAA,6BAAA,oBAAA,CAAA,WACQ,6BAC8B,sBADrCQ,EACgBG,EAAMC,OAAOc,SAHjC,EAMA,SAACtB,OAAEuB,EAAKvB,EAAAuB,MAAEhB,EAAKP,EAAAO,MACf,OAAAgB,GACArB,EAAGsB,IAAAA,EAAA5B,EAAA,CAAA,WAAA,wDAAA,4DAAA,+BAAA,CAAA,WACQ,wDAEkC,4DAES,iCAJlDQ,EAEoBG,EAAMC,OAAOc,SAEJf,EAAMC,OAAOc,SAN9C"}
1
+ {"version":3,"file":"styles.js","sources":["../../../../src/components/Step/styles.ts"],"sourcesContent":["import styled, { css } from \"styled-components\";\nimport { type ThemeType } from \"../../types\";\n\nexport const StepWrapper = styled.div`\n box-sizing: border-box;\n *,\n *:after,\n *:before {\n box-sizing: border-box;\n }\n text-align: center;\n text-transform: capitalize;\n`;\n\nexport const StepList = styled.ul<{\n $total: number;\n}>`\n list-style: none;\n padding: 0;\n margin: 0;\n display: flex;\n justify-content: space-between;\n width: 100%;\n\n ${({ $total }) =>\n $total &&\n css`\n li {\n width: ${100 / $total}%;\n }\n li:last-child span:after {\n display: none;\n }\n `}\n`;\n\nexport const StepBar = styled.span<{\n theme: ThemeType;\n}>`\n border-radius: 50%;\n background-clip: padding-box;\n width: 24px;\n height: 24px;\n background-color: ${({ theme }) => theme.colors.stepBackground};\n display: block;\n margin: 0 auto 0.5em auto;\n border: 2px solid ${({ theme }) => theme.colors.stepBorder};\n text-indent: -999px;\n\n &:after {\n display: block;\n position: absolute;\n width: 100%;\n height: 2px;\n content: \"\";\n background-color: transparent;\n border-bottom: 2px solid ${({ theme }) => theme.colors.stepBorder};\n left: 50%;\n top: 11px;\n margin-left: 12px;\n }\n`;\n\nexport const StepTick = styled.span<{\n theme: ThemeType;\n}>`\n display: block;\n transform: rotate(45deg);\n transform-origin: center center;\n height: 14px;\n width: 8px;\n border-bottom: ${({\n theme: {\n colors: { textLight },\n },\n }) => `2px solid ${textLight}`};\n border-right: ${({\n theme: {\n colors: { textLight },\n },\n }) => `2px solid ${textLight}`};\n margin-top: 4px;\n margin-left: 8px;\n`;\n\nexport const StepItem = styled.li<{\n $active: boolean;\n $done: boolean;\n theme: ThemeType;\n}>`\n display: flex;\n flex-direction: column;\n position: relative;\n font-family: ${({ theme }) => theme.typography.fontFamilyBase};\n\n ${({ theme, $active }) =>\n $active &&\n css`\n ${StepBar} {\n border-color: ${theme.colors.tertiary};\n background-color: ${theme.colors.tertiary};\n }\n `}\n ${({ $done, theme }) =>\n $done &&\n css`\n ${StepBar} {\n border: none;\n background-color: ${theme.colors.tertiary};\n &:after {\n border-bottom: 2px solid ${theme.colors.tertiary};\n }\n }\n `}\n`;\n"],"names":["StepWrapper","styled","div","templateObject_1","__makeTemplateObject","StepList","ul","templateObject_3","_a","$total","css","templateObject_2","StepBar","span","templateObject_4","theme","colors","stepBackground","stepBorder","StepTick","templateObject_5","textLight","concat","StepItem","li","templateObject_8","typography","fontFamilyBase","$active","templateObject_6","tertiary","$done","templateObject_7"],"mappings":"2HAGO,oBAAMA,EAAcC,EAAOC,IAAGC,IAAAA,EAAAC,EAAA,CAAA,yJAAA,CAAA,4JAWxBC,EAAWJ,EAAOK,GAAEC,IAAAA,EAAAH,EAAA,CAAA,gIAAA,MAAA,CAE/B,gIAiBG,QATD,SAACI,GAAE,IAAAC,EAAMD,EAAAC,OACT,OAAAA,GACAC,EAAGC,IAAAA,EAAAP,EAAA,CAAA,gCAAA,wFAAA,CAAA,gCAEsB,0FAAZ,IAAMK,EAHnB,GAWSG,EAA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":["import { type ElementType } from \"react\";\nimport styled from \"styled-components\";\n\nimport { spacing, type SpacingPropsInternal } from \"../Spacing\";\nimport {\n type WordBreakType,\n type FontSizeType,\n type ThemeType,\n type ColorKeyType,\n type OverflowWrapType,\n} from \"../../types\";\n\nexport type TextStyledProps = SpacingPropsInternal & {\n $textColor?: string;\n $textAlign?: \"left\" | \"right\" | \"center\" | \"justify\";\n $textSize?: FontSizeType;\n $textWeight?: number | string;\n as?: ElementType;\n $wordBreak?: WordBreakType;\n $overflowWrap?: OverflowWrapType;\n $textFontFamily?: string;\n theme: ThemeType;\n};\n\nexport const TextStyled = styled.p<TextStyledProps>`\n font-family: ${({ $textFontFamily, theme }) =>\n $textFontFamily || theme.typography.fontFamilyBase};\n word-break: ${({ $wordBreak }) => $wordBreak || \"normal\"};\n overflow-wrap: ${({ $overflowWrap }) => $overflowWrap || \"break-word\"};\n color: ${({ theme: { colors }, $textColor }) =>\n $textColor && typeof colors[$textColor as ColorKeyType] !== \"undefined\"\n ? colors[$textColor as ColorKeyType]\n : $textColor || colors.textDark};\n text-align: ${({ $textAlign }) => $textAlign || \"left\"};\n font-size: ${({\n theme: {\n fontSizes,\n fontSizes: { m },\n },\n $textSize,\n }) => ($textSize ? fontSizes[$textSize] : m)};\n line-height: ${({ theme }) => theme.typography.lineHeight};\n font-weight: ${({ $textWeight, theme }) =>\n $textWeight || theme.typography.fontWeightBase};\n padding: 0;\n margin: 0;\n margin-bottom: ${({\n as,\n theme: {\n spacing: { xs },\n },\n }) => (typeof as === \"undefined\" || as === \"p\" ? `${xs}` : 0)};\n\n &:last-child {\n margin-bottom: 0;\n }\n\n ${(props) => spacing(props, props.theme as ThemeType)}\n`;\n"],"names":["TextStyled","styled","p","templateObject_1","__makeTemplateObject","_a","$textFontFamily","theme","typography","fontFamilyBase","$wordBreak","$overflowWrap","colors","$textColor","textDark","$textAlign","_b","fontSizes","m","$textSize","lineHeight","$textWeight","fontWeightBase","as","xs","spacing","props"],"mappings":"+JAwBO,MAAMA,EAAaC,EAAOC,EAACC,IAAAA,EAAAC,EAAA,CAAA,oBAAA,oBAAA,uBAAA,eAAA,oBAAA,mBAAA,qBAAA,qBAAA,oDAAA,0DAAA,MAAA,CAAiB,oBAEG,oBACI,uBACa,eAIlC,oBACmB,mBAOV,qBACa,qBAET,oDAQa,0DAMR,QAhCtC,SAACC,OAAEC,EAAeD,EAAAC,gBAAEC,EAAKF,EAAAE,MACtC,OAAAD,GAAmBC,EAAMC,WAAWC,cAApC,EACY,SAACJ,GAAmB,OAAPA,EAAAK,YAAqB,QAAd,EACjB,SAACL,GAAsB,OAAPA,EAAAM,eAAwB,YAAjB,EAC/B,SAACN,OAAWO,EAAMP,EAAAE,MAAAK,OAAIC,EAAUR,EAAAQ,WACvC,OAAAA,QAA4D,IAAvCD,EAAOC,GACxBD,EAAOC,GACPA,GAAcD,EAAOE,QAFzB,EAGY,SAACT,GAAmB,OAAPA,EAAAU,YAAqB,MAAd,EACrB,SAACV,OACZW,EAAAX,EAAAE,MACEU,EAASD,EAAAC,UACIC,EAACF,EAAAC,UAAAC,EAEhBC,EAASd,EAAAc,UACL,OAACA,EAAYF,EAAUE,GAAaD,CAApC,EACS,SAACb,GAAc,OAAPA,EAAAE,MAAaC,WAAWY,UAAjB,EACf,SAACf,OAAEgB,EAAWhB,EAAAgB,YAAEd,EAAKF,EAAAE,MAClC,OAAAc,GAAed,EAAMC,WAAWc,cAAhC,EAGe,SAACjB,OAChBkB,EAAElB,EAAAkB,GAEWC,EAAEnB,EAAAE,MAAAkB,QAAAD,GAEX,YAAe,IAAPD,GAA6B,MAAPA,EAAa,UAAGC,GAAO,CAArD,EAMJ,SAACE,GAAU,OAAAD,EAAQC,EAAOA,EAAMnB,MAAmB"}
1
+ {"version":3,"file":"styles.js","sources":["../../../../src/components/Text/styles.ts"],"sourcesContent":["import { type ElementType } from \"react\";\nimport styled from \"styled-components\";\n\nimport { spacing, type SpacingPropsInternal } from \"../Spacing\";\nimport {\n type WordBreakType,\n type FontSizeType,\n type ThemeType,\n type ColorKeyType,\n type OverflowWrapType,\n} from \"../../types\";\n\nexport type TextStyledProps = SpacingPropsInternal & {\n $textColor?: string;\n $textAlign?: \"left\" | \"right\" | \"center\" | \"justify\";\n $textSize?: FontSizeType;\n $textWeight?: number | string;\n as?: ElementType;\n $wordBreak?: WordBreakType;\n $overflowWrap?: OverflowWrapType;\n $textFontFamily?: string;\n theme: ThemeType;\n};\n\nexport const TextStyled = styled.p<TextStyledProps>`\n font-family: ${({ $textFontFamily, theme }) =>\n $textFontFamily || theme.typography.fontFamilyBase};\n word-break: ${({ $wordBreak }) => $wordBreak || \"normal\"};\n overflow-wrap: ${({ $overflowWrap }) => $overflowWrap || \"break-word\"};\n color: ${({ theme: { colors }, $textColor }) =>\n $textColor && typeof colors[$textColor as ColorKeyType] !== \"undefined\"\n ? colors[$textColor as ColorKeyType]\n : $textColor || colors.textDark};\n text-align: ${({ $textAlign }) => $textAlign || \"left\"};\n font-size: ${({\n theme: {\n fontSizes,\n fontSizes: { m },\n },\n $textSize,\n }) => ($textSize ? fontSizes[$textSize] : m)};\n line-height: ${({ theme }) => theme.typography.lineHeight};\n font-weight: ${({ $textWeight, theme }) =>\n $textWeight || theme.typography.fontWeightBase};\n padding: 0;\n margin: 0;\n margin-bottom: ${({\n as,\n theme: {\n spacing: { xs },\n },\n }) => (typeof as === \"undefined\" || as === \"p\" ? `${xs}` : 0)};\n\n &:last-child {\n margin-bottom: 0;\n }\n\n ${(props) => spacing(props, props.theme as ThemeType)}\n`;\n"],"names":["TextStyled","styled","p","templateObject_1","__makeTemplateObject","_a","$textFontFamily","theme","typography","fontFamilyBase","$wordBreak","$overflowWrap","colors","$textColor","textDark","$textAlign","_b","fontSizes","m","$textSize","lineHeight","$textWeight","fontWeightBase","as","xs","spacing","props"],"mappings":"+JAwBO,MAAMA,EAAaC,EAAOC,EAACC,IAAAA,EAAAC,EAAA,CAAA,oBAAA,oBAAA,uBAAA,eAAA,oBAAA,mBAAA,qBAAA,qBAAA,oDAAA,0DAAA,MAAA,CAAiB,oBAEG,oBACI,uBACa,eAIlC,oBACmB,mBAOV,qBACa,qBAET,oDAQa,0DAMR,QAhCtC,SAACC,OAAEC,EAAeD,EAAAC,gBAAEC,EAAKF,EAAAE,MACtC,OAAAD,GAAmBC,EAAMC,WAAWC,cAApC,EACY,SAACJ,GAAmB,OAAPA,EAAAK,YAAqB,QAAd,EACjB,SAACL,GAAsB,OAAPA,EAAAM,eAAwB,YAAjB,EAC/B,SAACN,OAAWO,EAAMP,EAAAE,MAAAK,OAAIC,EAAUR,EAAAQ,WACvC,OAAAA,QAA4D,IAAvCD,EAAOC,GACxBD,EAAOC,GACPA,GAAcD,EAAOE,QAFzB,EAGY,SAACT,GAAmB,OAAPA,EAAAU,YAAqB,MAAd,EACrB,SAACV,OACZW,EAAAX,EAAAE,MACEU,EAASD,EAAAC,UACIC,EAACF,EAAAC,UAAAC,EAEhBC,EAASd,EAAAc,UACL,OAACA,EAAYF,EAAUE,GAAaD,CAApC,EACS,SAACb,GAAc,OAAPA,EAAAE,MAAaC,WAAWY,UAAjB,EACf,SAACf,OAAEgB,EAAWhB,EAAAgB,YAAEd,EAAKF,EAAAE,MAClC,OAAAc,GAAed,EAAMC,WAAWc,cAAhC,EAGe,SAACjB,OAChBkB,EAAElB,EAAAkB,GAEWC,EAAEnB,EAAAE,MAAAkB,QAAAD,GAEX,YAAe,IAAPD,GAA6B,MAAPA,EAAa,UAAGC,GAAO,CAArD,EAMJ,SAACE,GAAU,OAAAD,EAAQC,EAAOA,EAAMnB,MAArB"}
@@ -1,2 +1,2 @@
1
- import{__makeTemplateObject as n}from"../../../node_modules/tslib/tslib.es6.js";import o,{css as r}from"styled-components";var e,t,i=o.textarea(t||(t=n(["\n resize: ",";\n background-color: ",";\n background-image: none;\n border: ",";\n color: ",";\n display: block;\n font-family: ",";\n font-size: ",";\n padding: 6px 8px;\n width: 100%;\n height: ",";\n\n transition: border-color 150ms linear;\n &:hover {\n border-color: ",";\n }\n &:disabled {\n border-color: ",";\n color: ",";\n }\n\n ",";\n"],["\n resize: ",";\n background-color: ",";\n background-image: none;\n border: ",";\n color: ",";\n display: block;\n font-family: ",";\n font-size: ",";\n padding: 6px 8px;\n width: 100%;\n height: ",";\n\n transition: border-color 150ms linear;\n &:hover {\n border-color: ",";\n }\n &:disabled {\n border-color: ",";\n color: ",";\n }\n\n ",";\n"])),function(n){return n.$resize},function(n){return n.theme.colors.backgroundLight},function(n){var o=n.theme,r=n.$hasError;return"solid ".concat(o.utilities.inputBorderWidth,"\n ").concat(r?o.colors.textError:o.colors.textInputBorder)},function(n){return n.theme.colors.textDark},function(n){return n.theme.typography.fontFamilyBase},function(n){return n.theme.fontSizes.m},function(n){var o=n.$lineCount,r=n.theme;return"calc(".concat(r.typography.lineHeight," * ").concat(o,")")},function(n){return n.theme.colors.secondary},function(n){return n.theme.colors.disabled},function(n){return n.theme.colors.disabled},function(o){var t=o.theme;return t.utilities.useDefaultFocusRect?null:r(e||(e=n(["\n &:focus {\n outline: 0;\n border-color: ",";\n }\n "],["\n &:focus {\n outline: 0;\n border-color: ",";\n }\n "])),t.colors.tertiary)});export{i as StyledTextArea,i as default};
1
+ import{__makeTemplateObject as n}from"../../../node_modules/tslib/tslib.es6.js";import o,{css as r}from"styled-components";var e,t,i=o.textarea(t||(t=n(["\n resize: ",";\n background-color: ",";\n background-image: none;\n border: ",";\n color: ",";\n display: block;\n font-family: ",";\n font-size: ",";\n padding: 6px 8px;\n width: 100%;\n height: ",";\n\n transition: border-color 150ms linear;\n &:hover {\n border-color: ",";\n }\n &:disabled {\n border-color: ",";\n color: ",";\n }\n\n ",";\n\n // increase font size for desktop\n @media (min-width: ",") {\n font-size: ",";\n }\n"],["\n resize: ",";\n background-color: ",";\n background-image: none;\n border: ",";\n color: ",";\n display: block;\n font-family: ",";\n font-size: ",";\n padding: 6px 8px;\n width: 100%;\n height: ",";\n\n transition: border-color 150ms linear;\n &:hover {\n border-color: ",";\n }\n &:disabled {\n border-color: ",";\n color: ",";\n }\n\n ",";\n\n // increase font size for desktop\n @media (min-width: ",") {\n font-size: ",";\n }\n"])),function(n){return n.$resize},function(n){return n.theme.colors.backgroundLight},function(n){var o=n.theme,r=n.$hasError;return"solid ".concat(o.utilities.inputBorderWidth,"\n ").concat(r?o.colors.textError:o.colors.textInputBorder)},function(n){return n.theme.colors.textDark},function(n){return n.theme.typography.fontFamilyBase},function(n){return n.theme.fontSizes.m},function(n){var o=n.$lineCount,r=n.theme;return"calc(".concat(r.typography.lineHeight," * ").concat(o,")")},function(n){return n.theme.colors.secondary},function(n){return n.theme.colors.disabled},function(n){return n.theme.colors.disabled},function(o){var t=o.theme;return t.utilities.useDefaultFocusRect?null:r(e||(e=n(["\n &:focus {\n outline: 0;\n border-color: ",";\n }\n "],["\n &:focus {\n outline: 0;\n border-color: ",";\n }\n "])),t.colors.tertiary)},function(n){return n.theme.breakpoint.desktopLarge},function(n){return n.theme.fontSizes.ml});export{i as StyledTextArea,i as default};
2
2
  //# sourceMappingURL=styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sources":["../../../../src/components/TextAreaField/styles.ts"],"sourcesContent":["import styled, { css } from \"styled-components\";\nimport { type ThemeType } from \"../../types\";\n\ntype StyledTextareaProps = {\n $hasError: boolean;\n $lineCount: number;\n $resize: \"both\" | \"vertical\" | \"horizontal\" | \"none\";\n theme: ThemeType;\n};\n\nconst StyledTextArea = styled.textarea<StyledTextareaProps>`\n resize: ${({ $resize }) => $resize};\n background-color: ${({ theme }) => theme.colors.backgroundLight};\n background-image: none;\n border: ${({ theme, $hasError }) => `solid ${theme.utilities.inputBorderWidth}\n ${$hasError ? theme.colors.textError : theme.colors.textInputBorder}`};\n color: ${({ theme }) => theme.colors.textDark};\n display: block;\n font-family: ${({ theme }) => theme.typography.fontFamilyBase};\n font-size: ${({ theme }) => theme.fontSizes.m};\n padding: 6px 8px;\n width: 100%;\n height: ${({ $lineCount, theme }) =>\n `calc(${theme.typography.lineHeight} * ${$lineCount})`};\n\n transition: border-color 150ms linear;\n &:hover {\n border-color: ${({ theme }) => theme.colors.secondary};\n }\n &:disabled {\n border-color: ${({ theme }) => theme.colors.disabled};\n color: ${({ theme }) => theme.colors.disabled};\n }\n\n ${({ theme }) =>\n !theme.utilities.useDefaultFocusRect\n ? css`\n &:focus {\n outline: 0;\n border-color: ${theme.colors.tertiary};\n }\n `\n : null};\n`;\n\nexport default StyledTextArea;\nexport { StyledTextArea };\n"],"names":["StyledTextArea","styled","textarea","templateObject_2","__makeTemplateObject","_a","$resize","theme","colors","backgroundLight","$hasError","concat","utilities","inputBorderWidth","textError","textInputBorder","textDark","typography","fontFamilyBase","fontSizes","m","$lineCount","lineHeight","secondary","disabled","useDefaultFocusRect","css","templateObject_1","tertiary"],"mappings":"2HAUA,QAAMA,EAAiBC,EAAOC,SAAQC,IAAAA,EAAAC,EAAA,CAAA,eAAA,0BAAA,2CAAA,eAAA,wCAAA,mBAAA,qDAAA,iFAAA,6CAAA,iBAAA,eAAA,OAAA,CAAqB,eACvB,0BAC6B,2CAGQ,eAC1B,wCAEgB,mBAChB,qDAIW,iFAID,6CAGD,iBACP,eAWrC,SA/BA,SAACC,GAAgB,OAAPA,EAAAC,OAAO,EACP,SAACD,GAAc,OAAPA,EAAAE,MAAaC,OAAOC,eAAb,EAEzB,SAACJ,OAAEE,EAAKF,EAAAE,MAAEG,EAASL,EAAAK,UAAO,MAAA,SAAAC,OAASJ,EAAMK,UAAUC,iBAAgB,UAAAF,OACzED,EAAYH,EAAMC,OAAOM,UAAYP,EAAMC,OAAOO,gBADlB,EAE3B,SAACV,GAAc,OAAPA,EAAAE,MAAaC,OAAOQ,QAAb,EAET,SAACX,GAAc,OAAPA,EAAAE,MAAaU,WAAWC,cAAjB,EACjB,SAACb,GAAc,OAAPA,EAAAE,MAAaY,UAAUC,CAAhB,EAGlB,SAACf,OAAEgB,EAAUhB,EAAAgB,WAAEd,EAAKF,EAAAE,MAC5B,MAAA,QAAAI,OAAQJ,EAAMU,WAAWK,WAAU,OAAAX,OAAMU,EAAU,IAAnD,EAIgB,SAAChB,GAAc,OAAPA,EAAAE,MAAaC,OAAOe,SAAb,EAGf,SAAClB,GAAc,OAAPA,EAAAE,MAAaC,OAAOgB,QAAb,EACtB,SAACnB,GAAc,OAAPA,EAAAE,MAAaC,OAAOgB,QAAb,EAGxB,SAACnB,GAAE,IAAAE,EAAKF,EAAAE,MACR,OAACA,EAAMK,UAAUa,oBAOb,KANAC,EAAGC,IAAAA,EAAAvB,EAAA,CAAA,6EAAA,4BAAA,CAAA,6EAGsC,8BAArBG,EAAMC,OAAOoB,SAJrC"}
1
+ {"version":3,"file":"styles.js","sources":["../../../../src/components/TextAreaField/styles.ts"],"sourcesContent":["import styled, { css } from \"styled-components\";\nimport { type ThemeType } from \"../../types\";\n\ntype StyledTextareaProps = {\n $hasError: boolean;\n $lineCount: number;\n $resize: \"both\" | \"vertical\" | \"horizontal\" | \"none\";\n theme: ThemeType;\n};\n\nconst StyledTextArea = styled.textarea<StyledTextareaProps>`\n resize: ${({ $resize }) => $resize};\n background-color: ${({ theme }) => theme.colors.backgroundLight};\n background-image: none;\n border: ${({ theme, $hasError }) => `solid ${theme.utilities.inputBorderWidth}\n ${$hasError ? theme.colors.textError : theme.colors.textInputBorder}`};\n color: ${({ theme }) => theme.colors.textDark};\n display: block;\n font-family: ${({ theme }) => theme.typography.fontFamilyBase};\n font-size: ${({ theme }) => theme.fontSizes.m};\n padding: 6px 8px;\n width: 100%;\n height: ${({ $lineCount, theme }) =>\n `calc(${theme.typography.lineHeight} * ${$lineCount})`};\n\n transition: border-color 150ms linear;\n &:hover {\n border-color: ${({ theme }) => theme.colors.secondary};\n }\n &:disabled {\n border-color: ${({ theme }) => theme.colors.disabled};\n color: ${({ theme }) => theme.colors.disabled};\n }\n\n ${({ theme }) =>\n !theme.utilities.useDefaultFocusRect\n ? css`\n &:focus {\n outline: 0;\n border-color: ${theme.colors.tertiary};\n }\n `\n : null};\n\n // increase font size for desktop\n @media (min-width: ${({ theme }) => theme.breakpoint.desktopLarge}) {\n font-size: ${({ theme }) => theme.fontSizes.ml};\n }\n`;\n\nexport default StyledTextArea;\nexport { StyledTextArea };\n"],"names":["StyledTextArea","styled","textarea","templateObject_2","__makeTemplateObject","_a","$resize","theme","colors","backgroundLight","$hasError","concat","utilities","inputBorderWidth","textError","textInputBorder","textDark","typography","fontFamilyBase","fontSizes","m","$lineCount","lineHeight","secondary","disabled","useDefaultFocusRect","css","templateObject_1","tertiary","breakpoint","desktopLarge","ml"],"mappings":"2HAUA,QAAMA,EAAiBC,EAAOC,SAAQC,IAAAA,EAAAC,EAAA,CAAA,eAAA,0BAAA,2CAAA,eAAA,wCAAA,mBAAA,qDAAA,iFAAA,6CAAA,iBAAA,eAAA,kEAAA,uBAAA,YAAA,CAAqB,eACvB,0BAC6B,2CAGQ,eAC1B,wCAEgB,mBAChB,qDAIW,iFAID,6CAGD,iBACP,eAWrC,kEAGuD,uBACjB,cAnCtC,SAACC,GAAgB,OAAPA,EAAAC,OAAO,EACP,SAACD,GAAc,OAAPA,EAAAE,MAAaC,OAAOC,eAAb,EAEzB,SAACJ,OAAEE,EAAKF,EAAAE,MAAEG,EAASL,EAAAK,UAAO,MAAA,SAAAC,OAASJ,EAAMK,UAAUC,iBAAgB,UAAAF,OACzED,EAAYH,EAAMC,OAAOM,UAAYP,EAAMC,OAAOO,gBADlB,EAE3B,SAACV,GAAc,OAAPA,EAAAE,MAAaC,OAAOQ,QAAb,EAET,SAACX,GAAc,OAAPA,EAAAE,MAAaU,WAAWC,cAAjB,EACjB,SAACb,GAAc,OAAPA,EAAAE,MAAaY,UAAUC,CAAhB,EAGlB,SAACf,OAAEgB,EAAUhB,EAAAgB,WAAEd,EAAKF,EAAAE,MAC5B,MAAA,QAAAI,OAAQJ,EAAMU,WAAWK,WAAU,OAAAX,OAAMU,EAAU,IAAnD,EAIgB,SAAChB,GAAc,OAAPA,EAAAE,MAAaC,OAAOe,SAAb,EAGf,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