@popsure/dirty-swan 0.59.0-alpha → 0.59.0-beta-2

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 (176) hide show
  1. package/dist/cjs/index.js +87 -93
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/lib/components/button/index.d.ts +1 -1
  4. package/dist/cjs/lib/components/cards/card/index.d.ts +4 -1
  5. package/dist/cjs/lib/components/cards/card/index.stories.d.ts +2 -1
  6. package/dist/cjs/lib/components/cards/infoCard/index.d.ts +9 -7
  7. package/dist/cjs/lib/components/cards/infoCard/index.stories.d.ts +23 -17
  8. package/dist/cjs/lib/components/input/currency/input.stories.d.ts +1 -0
  9. package/dist/cjs/lib/components/input/input.stories.d.ts +2 -1
  10. package/dist/cjs/lib/components/input/stories/config.d.ts +1 -0
  11. package/dist/cjs/lib/components/table/components/TableCell/BaseCell/BaseCell.d.ts +1 -1
  12. package/dist/cjs/lib/scss/public/borders.stories.d.ts +13 -0
  13. package/dist/esm/{Calendar-2d7e51b5.js → Calendar-5ad3eccf.js} +2 -2
  14. package/dist/esm/Calendar-5ad3eccf.js.map +1 -0
  15. package/dist/esm/{TableSection-5277dae1.js → TableSection-018d8e8f.js} +1 -1
  16. package/dist/esm/{TableSection-5277dae1.js.map → TableSection-018d8e8f.js.map} +1 -1
  17. package/dist/esm/components/accordion/index.js +2 -2
  18. package/dist/esm/components/accordion/index.js.map +1 -1
  19. package/dist/esm/components/button/index.js +4 -5
  20. package/dist/esm/components/button/index.js.map +1 -1
  21. package/dist/esm/components/button/index.stories.js +5 -9
  22. package/dist/esm/components/button/index.stories.js.map +1 -1
  23. package/dist/esm/components/cards/card/index.js +6 -6
  24. package/dist/esm/components/cards/card/index.js.map +1 -1
  25. package/dist/esm/components/cards/card/index.stories.js +8 -3
  26. package/dist/esm/components/cards/card/index.stories.js.map +1 -1
  27. package/dist/esm/components/cards/cardButton/index.js +6 -4
  28. package/dist/esm/components/cards/cardButton/index.js.map +1 -1
  29. package/dist/esm/components/cards/cardButton/index.stories.js +2 -2
  30. package/dist/esm/components/cards/cardButton/index.stories.js.map +1 -1
  31. package/dist/esm/components/cards/index.js +7 -21
  32. package/dist/esm/components/cards/index.js.map +1 -1
  33. package/dist/esm/components/cards/infoCard/index.js +34 -8
  34. package/dist/esm/components/cards/infoCard/index.js.map +1 -1
  35. package/dist/esm/components/cards/infoCard/index.stories.js +44 -31
  36. package/dist/esm/components/cards/infoCard/index.stories.js.map +1 -1
  37. package/dist/esm/components/comparisonTable/components/AccordionItem/AccordionItem.js +1 -1
  38. package/dist/esm/components/comparisonTable/components/Chevron.js +1 -1
  39. package/dist/esm/components/comparisonTable/components/Chevron.js.map +1 -1
  40. package/dist/esm/components/comparisonTable/components/Row/index.js +1 -1
  41. package/dist/esm/components/comparisonTable/components/TableArrows/index.js +1 -1
  42. package/dist/esm/components/comparisonTable/components/TableInfoButton/index.js +3 -3
  43. package/dist/esm/components/comparisonTable/components/TableInfoButton/index.js.map +1 -1
  44. package/dist/esm/components/comparisonTable/components/TableRating/index.js +1 -1
  45. package/dist/esm/components/comparisonTable/components/TableTrueFalse.js +2 -2
  46. package/dist/esm/components/comparisonTable/components/TableTrueFalse.js.map +1 -1
  47. package/dist/esm/components/comparisonTable/index.js +2 -2
  48. package/dist/esm/components/comparisonTable/index.js.map +1 -1
  49. package/dist/esm/components/dateSelector/components/Calendar.js +1 -1
  50. package/dist/esm/components/dateSelector/index.js +1 -1
  51. package/dist/esm/components/dateSelector/index.stories.js +1 -1
  52. package/dist/esm/components/dateSelector/index.test.js +1 -1
  53. package/dist/esm/components/icon/icons/BasketballSports.js +2 -2
  54. package/dist/esm/components/icon/icons/BasketballSports.js.map +1 -1
  55. package/dist/esm/components/icon/icons/BookOpen.js +2 -2
  56. package/dist/esm/components/icon/icons/BookOpen.js.map +1 -1
  57. package/dist/esm/components/icon/icons/Heart.js +2 -2
  58. package/dist/esm/components/icon/icons/Heart.js.map +1 -1
  59. package/dist/esm/components/icon/icons/Info.js +2 -2
  60. package/dist/esm/components/icon/icons/Info.js.map +1 -1
  61. package/dist/esm/components/icon/icons/Star.js +2 -2
  62. package/dist/esm/components/icon/icons/Star.js.map +1 -1
  63. package/dist/esm/components/icon/icons.stories.js +1 -1
  64. package/dist/esm/components/icon/index.stories.js +1 -1
  65. package/dist/esm/components/input/currency/input.stories.js +1 -1
  66. package/dist/esm/components/input/index.js +5 -5
  67. package/dist/esm/components/input/index.js.map +1 -1
  68. package/dist/esm/components/input/input.stories.js +3 -3
  69. package/dist/esm/components/input/input.stories.js.map +1 -1
  70. package/dist/esm/components/input/toggle/index.js +1 -1
  71. package/dist/esm/components/modal/index.stories.js +7 -7
  72. package/dist/esm/components/modal/index.stories.js.map +1 -1
  73. package/dist/esm/components/segmentedControl/index.js +1 -1
  74. package/dist/esm/components/table/Table.js +4 -5
  75. package/dist/esm/components/table/Table.js.map +1 -1
  76. package/dist/esm/components/table/Table.stories.js +1 -1
  77. package/dist/esm/components/table/Table.test.js +1 -1
  78. package/dist/esm/components/table/components/TableCell/BaseCell/BaseCell.js +3 -3
  79. package/dist/esm/components/table/components/TableCell/BaseCell/BaseCell.js.map +1 -1
  80. package/dist/esm/components/table/components/TableCell/ButtonCell/ButtonCell.js +2 -2
  81. package/dist/esm/components/table/components/TableCell/ButtonCell/ButtonCell.js.map +1 -1
  82. package/dist/esm/components/table/components/TableCell/TableCell.js +1 -1
  83. package/dist/esm/components/table/components/TableCell/TableCell.js.map +1 -1
  84. package/dist/esm/components/table/components/TableContents/TableContents.js +6 -5
  85. package/dist/esm/components/table/components/TableContents/TableContents.js.map +1 -1
  86. package/dist/esm/components/table/components/TableContents/TableContents.test.js +1 -1
  87. package/dist/esm/components/table/components/TableControls/TableControls.js +4 -3
  88. package/dist/esm/components/table/components/TableControls/TableControls.js.map +1 -1
  89. package/dist/esm/components/table/components/TableSection/TableSection.js +1 -1
  90. package/dist/esm/components/table/components/TableSection/TableSection.test.js +1 -1
  91. package/dist/esm/{config-4b5ffe4f.js → config-bc609993.js} +3 -2
  92. package/dist/esm/config-bc609993.js.map +1 -0
  93. package/dist/esm/{index-d2e06251.js → index-7427c96f.js} +11 -11
  94. package/dist/esm/{index-d2e06251.js.map → index-7427c96f.js.map} +1 -1
  95. package/dist/esm/index.js +3 -3
  96. package/dist/esm/lib/components/button/index.d.ts +1 -1
  97. package/dist/esm/lib/components/cards/card/index.d.ts +4 -1
  98. package/dist/esm/lib/components/cards/card/index.stories.d.ts +2 -1
  99. package/dist/esm/lib/components/cards/infoCard/index.d.ts +9 -7
  100. package/dist/esm/lib/components/cards/infoCard/index.stories.d.ts +23 -17
  101. package/dist/esm/lib/components/input/currency/input.stories.d.ts +1 -0
  102. package/dist/esm/lib/components/input/input.stories.d.ts +2 -1
  103. package/dist/esm/lib/components/input/stories/config.d.ts +1 -0
  104. package/dist/esm/lib/components/table/components/TableCell/BaseCell/BaseCell.d.ts +1 -1
  105. package/dist/esm/lib/scss/public/borders.stories.d.ts +13 -0
  106. package/dist/esm/scss/public/borders.stories.js +86 -0
  107. package/dist/esm/scss/public/borders.stories.js.map +1 -0
  108. package/dist/index.css +212 -122
  109. package/dist/index.css.map +1 -1
  110. package/dist/lib/scss/index.scss +1 -0
  111. package/dist/lib/scss/private/base/_typography.scss +21 -52
  112. package/dist/lib/scss/private/borders/_index.scss +1 -0
  113. package/dist/lib/scss/private/borders/default.scss +61 -0
  114. package/dist/lib/scss/private/components/_buttons.scss +105 -63
  115. package/dist/lib/scss/private/components/_cards.scss +2 -1
  116. package/dist/lib/scss/private/components/_input.scss +32 -26
  117. package/dist/lib/scss/private/components/_spinner.scss +2 -2
  118. package/dist/lib/scss/public/borders.stories.tsx +124 -0
  119. package/dist/lib/scss/public/colors/default.scss +1 -0
  120. package/dist/lib/scss/public/shadows.scss +5 -5
  121. package/package.json +1 -1
  122. package/src/lib/components/accordion/index.tsx +1 -0
  123. package/src/lib/components/accordion/style.module.scss +0 -4
  124. package/src/lib/components/button/index.stories.tsx +22 -57
  125. package/src/lib/components/button/index.tsx +7 -9
  126. package/src/lib/components/cards/card/index.stories.tsx +60 -1
  127. package/src/lib/components/cards/card/index.tsx +13 -3
  128. package/src/lib/components/cards/card/style.module.scss +87 -10
  129. package/src/lib/components/cards/cardButton/index.stories.tsx +2 -2
  130. package/src/lib/components/cards/cardButton/index.tsx +4 -2
  131. package/src/lib/components/cards/cardButton/style.module.scss +4 -0
  132. package/src/lib/components/cards/infoCard/index.stories.tsx +164 -40
  133. package/src/lib/components/cards/infoCard/index.tsx +72 -37
  134. package/src/lib/components/cards/infoCard/style.module.scss +46 -33
  135. package/src/lib/components/comparisonTable/components/AccordionItem/AccordionItem.module.scss +2 -2
  136. package/src/lib/components/comparisonTable/components/Chevron.tsx +1 -1
  137. package/src/lib/components/comparisonTable/components/Row/style.module.scss +0 -4
  138. package/src/lib/components/comparisonTable/components/TableArrows/style.module.scss +6 -5
  139. package/src/lib/components/comparisonTable/components/TableInfoButton/index.tsx +2 -2
  140. package/src/lib/components/comparisonTable/components/TableInfoButton/style.module.scss +3 -4
  141. package/src/lib/components/comparisonTable/components/TableRating/style.module.scss +2 -2
  142. package/src/lib/components/comparisonTable/components/TableTrueFalse.tsx +2 -2
  143. package/src/lib/components/comparisonTable/index.tsx +1 -1
  144. package/src/lib/components/comparisonTable/style.module.scss +6 -2
  145. package/src/lib/components/dateSelector/components/Calendar.tsx +1 -1
  146. package/src/lib/components/input/index.tsx +2 -1
  147. package/src/lib/components/input/input.stories.tsx +3 -1
  148. package/src/lib/components/input/stories/config.ts +4 -1
  149. package/src/lib/components/input/style.module.scss +8 -4
  150. package/src/lib/components/input/toggle/styles.module.scss +8 -4
  151. package/src/lib/components/modal/index.stories.tsx +23 -23
  152. package/src/lib/components/segmentedControl/style.module.scss +1 -1
  153. package/src/lib/components/table/Table.module.scss +18 -0
  154. package/src/lib/components/table/Table.tsx +1 -2
  155. package/src/lib/components/table/components/TableCell/BaseCell/BaseCell.module.scss +0 -10
  156. package/src/lib/components/table/components/TableCell/BaseCell/BaseCell.tsx +6 -9
  157. package/src/lib/components/table/components/TableCell/ButtonCell/ButtonCell.module.scss +1 -2
  158. package/src/lib/components/table/components/TableCell/ButtonCell/ButtonCell.tsx +1 -1
  159. package/src/lib/components/table/components/TableCell/TableCell.tsx +1 -1
  160. package/src/lib/components/table/components/TableContents/TableContents.module.scss +19 -0
  161. package/src/lib/components/table/components/TableContents/TableContents.tsx +3 -1
  162. package/src/lib/components/table/components/TableControls/TableControls.module.scss +7 -3
  163. package/src/lib/components/table/components/TableControls/TableControls.tsx +38 -25
  164. package/src/lib/scss/index.scss +1 -0
  165. package/src/lib/scss/private/base/_typography.scss +21 -52
  166. package/src/lib/scss/private/borders/_index.scss +1 -0
  167. package/src/lib/scss/private/borders/default.scss +61 -0
  168. package/src/lib/scss/private/components/_buttons.scss +105 -63
  169. package/src/lib/scss/private/components/_cards.scss +2 -1
  170. package/src/lib/scss/private/components/_input.scss +32 -26
  171. package/src/lib/scss/private/components/_spinner.scss +2 -2
  172. package/src/lib/scss/public/borders.stories.tsx +124 -0
  173. package/src/lib/scss/public/colors/default.scss +1 -0
  174. package/src/lib/scss/public/shadows.scss +5 -5
  175. package/dist/esm/Calendar-2d7e51b5.js.map +0 -1
  176. package/dist/esm/config-4b5ffe4f.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../src/lib/components/button/index.tsx"],"sourcesContent":["import classNames from 'classnames';\nimport React, { ReactElement, ReactNode } from 'react';\n\ntype ButtonVariant =\n | 'filledColor'\n | 'filledGray'\n | 'filledWhite'\n | 'filledBlack'\n | 'textColor'\n | 'textWhite'\n | 'outlineWhite'\n | 'filledSuccess'\n | 'filledError';\n\nconst buttonTypeClassNameMap: { [K in ButtonVariant]: string } = {\n filledColor: 'p-btn--primary',\n filledGray: 'p-btn--secondary-grey',\n filledWhite: 'p-btn--secondary-white',\n filledBlack: 'p-btn--secondary-black',\n textColor: 'p-btn--secondary',\n textWhite: 'p-btn--secondary-inverted',\n outlineWhite: 'p-btn--outline-white',\n filledSuccess: 'p-btn--success',\n filledError: 'p-btn--danger',\n};\n\ntype ButtonProps = {\n as?: React.ElementType\n children: ReactNode;\n variant?: ButtonVariant;\n leftIcon?: ReactElement;\n rightIcon?: ReactElement;\n loading?: boolean;\n hideLabel?: boolean;\n} & Omit<JSX.IntrinsicElements['button'], 'children'>;\n\nconst buttonDefaultAsType = 'button' as const;\ntype ButtonDefaultAsType = typeof buttonDefaultAsType;\n\ntype Merge<P1 = {}, P2 = {}> = Omit<P1, keyof P2> & P2;\ntype IntrinsicElement<E> = E extends PolymorphicButton ? IntrinsicElement<E> : never;\n\ninterface PolymorphicButton {\n <As = ButtonDefaultAsType>(props:\n As extends React.ComponentType<infer P> ? Merge<P, ButtonProps & {\n as?: As;\n }> : As extends keyof JSX.IntrinsicElements ? Merge<JSX.IntrinsicElements[As], ButtonProps & {\n as?: As;\n }> : never): React.ReactElement | null;\n}\n\nconst Button = React.forwardRef((\n {\n as: ButtonTag = buttonDefaultAsType,\n className,\n loading = false,\n children,\n variant = 'filledColor',\n leftIcon,\n rightIcon,\n hideLabel,\n ...props\n }: ButtonProps,\n ref?: React.ForwardedRef<HTMLButtonElement>\n) => (\n <ButtonTag\n ref={ref}\n className={classNames(\n buttonTypeClassNameMap[variant], \n className, {\n 'p-btn--loading': loading,\n 'tc-transparent': loading,\n 'p-btn--icon-only': hideLabel,\n })}\n data-testid=\"button\"\n {...props}\n >\n {!loading && (leftIcon || rightIcon) ? (\n <div className=\"d-flex jc-center ai-center\">\n {leftIcon && (\n <span\n className={classNames('d-inline-flex', {\n 'mr8': !hideLabel\n })}\n >\n {React.cloneElement(leftIcon, { \n size: 20, \n noMargin: true\n })}\n </span>\n )}\n \n <div className={classNames({\n 'sr-only': hideLabel\n })}\n >\n {children}\n </div>\n\n {rightIcon && (\n <span\n className={classNames('d-inline-flex', {\n 'ml8': !hideLabel\n })}\n >\n {React.cloneElement(rightIcon, { \n size: 20, \n noMargin: true\n })}\n </span>\n )}\n </div>\n ) : children}\n </ButtonTag>\n )\n) as PolymorphicButton;\n\nexport { Button };\nexport type { ButtonProps, ButtonVariant };\n"],"names":["React","_jsx","_jsxs"],"mappings":";;;;;AAcA,IAAM,sBAAsB,GAAqC;IAC/D,WAAW,EAAE,gBAAgB;IAC7B,UAAU,EAAE,uBAAuB;IACnC,WAAW,EAAE,wBAAwB;IACrC,WAAW,EAAE,wBAAwB;IACrC,SAAS,EAAE,kBAAkB;IAC7B,SAAS,EAAE,2BAA2B;IACtC,YAAY,EAAE,sBAAsB;IACpC,aAAa,EAAE,gBAAgB;IAC/B,WAAW,EAAE,eAAe;CAC7B,CAAC;AAYF,IAAM,mBAAmB,GAAG,QAAiB,CAAC;IAexC,MAAM,GAAGA,cAAK,CAAC,UAAU,CAAC,UAC9B,EAUc,EACd,GAA2C;IAVzC,IAAA,UAAmC,EAA/B,SAAS,mBAAG,mBAAmB,KAAA,EACnC,SAAS,eAAA,EACT,eAAe,EAAf,OAAO,mBAAG,KAAK,KAAA,EACf,QAAQ,cAAA,EACR,eAAuB,EAAvB,OAAO,mBAAG,aAAa,KAAA,EACvB,QAAQ,cAAA,EACR,SAAS,eAAA,EACT,SAAS,eAAA,EACN,KAAK,cATV,2FAUC,CADS;IAGP,QACDC,IAAC,SAAS,aACR,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,UAAU,CACnB,sBAAsB,CAAC,OAAO,CAAC,EAC/B,SAAS,EAAE;YACT,gBAAgB,EAAE,OAAO;YACzB,gBAAgB,EAAE,OAAO;YACzB,kBAAkB,EAAE,SAAS;SAC9B,CAAC,iBACQ,QAAQ,IAChB,KAAK,cAER,CAAC,OAAO,KAAK,QAAQ,IAAI,SAAS,CAAC,IAClCC,cAAK,SAAS,EAAC,4BAA4B,aACxC,QAAQ,KACPD,cACE,SAAS,EAAE,UAAU,CAAC,eAAe,EAAE;wBACrC,KAAK,EAAE,CAAC,SAAS;qBAClB,CAAC,YAEDD,cAAK,CAAC,YAAY,CAAC,QAAQ,EAAE;wBAC5B,IAAI,EAAE,EAAE;wBACR,QAAQ,EAAE,IAAI;qBACf,CAAC,GACG,CACR,EAEDC,aAAK,SAAS,EAAE,UAAU,CAAC;wBACvB,SAAS,EAAE,SAAS;qBACrB,CAAC,YAED,QAAQ,GACL,EAEL,SAAS,KACRA,cACE,SAAS,EAAE,UAAU,CAAC,eAAe,EAAE;wBACrC,KAAK,EAAE,CAAC,SAAS;qBAClB,CAAC,YAEDD,cAAK,CAAC,YAAY,CAAC,SAAS,EAAE;wBAC7B,IAAI,EAAE,EAAE;wBACR,QAAQ,EAAE,IAAI;qBACf,CAAC,GACG,CACR,IACG,IACJ,QAAQ,IACF,EACb;CAAA;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/lib/components/button/index.tsx"],"sourcesContent":["import classNames from 'classnames';\nimport React, { ReactElement, ReactNode } from 'react';\n\ntype ButtonVariant =\n | 'filledBlack'\n | 'filledGray'\n | 'filledWhite'\n | 'textBlack'\n | 'textWhite'\n | 'outlineGray'\n | 'outlineWhite'\n | 'filledError';\n\nconst buttonTypeClassNameMap: { [K in ButtonVariant]: string } = {\n filledBlack: 'p-btn--secondary-black',\n filledGray: 'p-btn--secondary-grey',\n filledWhite: 'p-btn--secondary-white',\n textBlack: 'p-btn--text-black',\n textWhite: 'p-btn--secondary-inverted',\n outlineWhite: 'p-btn--outline-white',\n outlineGray: 'p-btn--outline-grey',\n filledError: 'p-btn--danger',\n};\n\ntype ButtonProps = {\n as?: React.ElementType\n children: ReactNode;\n variant?: ButtonVariant;\n leftIcon?: ReactElement;\n rightIcon?: ReactElement;\n loading?: boolean;\n hideLabel?: boolean;\n} & Omit<JSX.IntrinsicElements['button'], 'children'>;\n\nconst buttonDefaultAsType = 'button' as const;\ntype ButtonDefaultAsType = typeof buttonDefaultAsType;\n\ntype Merge<P1 = {}, P2 = {}> = Omit<P1, keyof P2> & P2;\ntype IntrinsicElement<E> = E extends PolymorphicButton ? IntrinsicElement<E> : never;\n\ninterface PolymorphicButton {\n <As = ButtonDefaultAsType>(props:\n As extends React.ComponentType<infer P> ? Merge<P, ButtonProps & {\n as?: As;\n }> : As extends keyof JSX.IntrinsicElements ? Merge<JSX.IntrinsicElements[As], ButtonProps & {\n as?: As;\n }> : never): React.ReactElement | null;\n}\n\nconst Button = React.forwardRef((\n {\n as: ButtonTag = buttonDefaultAsType,\n className,\n loading = false,\n children,\n variant = 'filledBlack',\n leftIcon,\n rightIcon,\n hideLabel,\n ...props\n }: ButtonProps,\n ref?: React.ForwardedRef<HTMLButtonElement>\n) => (\n <ButtonTag\n ref={ref}\n className={classNames(\n buttonTypeClassNameMap[variant], \n className, {\n 'p-btn--loading': loading,\n 'tc-transparent': loading,\n 'p-btn--icon-only': hideLabel,\n })}\n data-testid=\"button\"\n {...props}\n >\n {!loading && (leftIcon || rightIcon) ? (\n <div className=\"d-flex jc-center ai-center\">\n {leftIcon && (\n <span\n className={classNames('d-inline-flex', {\n 'mr8': !hideLabel\n })}\n >\n {React.cloneElement(leftIcon, { \n size: 20, \n noMargin: true\n })}\n </span>\n )}\n \n <div className={classNames({\n 'sr-only': hideLabel\n })}\n >\n {children}\n </div>\n\n {rightIcon && (\n <span\n className={classNames('d-inline-flex', {\n 'ml8': !hideLabel\n })}\n >\n {React.cloneElement(rightIcon, { \n size: 20, \n noMargin: true\n })}\n </span>\n )}\n </div>\n ) : children}\n </ButtonTag>\n )\n) as PolymorphicButton;\n\nexport { Button };\nexport type { ButtonProps, ButtonVariant };\n"],"names":["React","_jsx","_jsxs"],"mappings":";;;;;AAaA,IAAM,sBAAsB,GAAqC;IAC/D,WAAW,EAAE,wBAAwB;IACrC,UAAU,EAAE,uBAAuB;IACnC,WAAW,EAAE,wBAAwB;IACrC,SAAS,EAAE,mBAAmB;IAC9B,SAAS,EAAE,2BAA2B;IACtC,YAAY,EAAE,sBAAsB;IACpC,WAAW,EAAE,qBAAqB;IAClC,WAAW,EAAE,eAAe;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CACR,IACG,IACJ,QAAQ,IACF,EACb;CAAA;;;;"}
@@ -1,6 +1,6 @@
1
1
  import { jsx, jsxs } from 'react/jsx-runtime';
2
2
  import { Button } from './index.js';
3
- import Info from '../icon/icons/Info.js';
3
+ import InfoIcon from '../icon/icons/Info.js';
4
4
  import PlusIcon from '../icon/icons/Plus.js';
5
5
  import SendIcon from '../icon/icons/Send.js';
6
6
  import '../../tslib.es6-a39f91fc.js';
@@ -44,7 +44,7 @@ var story = {
44
44
  args: {
45
45
  children: 'Click me',
46
46
  disabled: false,
47
- variant: 'filledColor',
47
+ variant: 'filledBlack',
48
48
  loading: false,
49
49
  hideLabel: false,
50
50
  className: 'wmn3',
@@ -63,11 +63,7 @@ var ButtonStory = function (_a) {
63
63
  ButtonStory.storyName = "Button";
64
64
  var ButtonVariants = function (_a) {
65
65
  var children = _a.children, onClick = _a.onClick;
66
- return (jsxs("div", { children: [jsx("h3", { className: 'p-h3 mb24', children: "Filled variants" }), jsx("div", { className: 'd-flex gap16 p24 bg-neutral-300 br8', children: ["filledColor", "filledGray", "filledWhite", "filledBlack"].map(function (variant) { return (jsxs("div", { children: [jsx("h4", { className: 'p-h4 mb16', children: variant }), jsx(Button, { onClick: onClick, variant: variant, children: children })] }, variant)); }) }), jsx("h3", { className: 'p-h3 my24', children: "Text variants" }), jsx("div", { className: 'd-flex gap16 p24 bg-neutral-300 br8', children: ["textColor", "textWhite"].map(function (variant, index) { return (jsxs("div", { className: variant === "textWhite" ? "bg-purple-600 px32 br8" : "", children: [jsx("h4", { className: "p-h4 mb16 ".concat(variant === "textWhite" ? "tc-white" : ''), children: variant }), jsx(Button, { onClick: onClick, variant: variant, children: children })] }, variant)); }) }), jsx("h3", { className: 'p-h3 my24', children: "Outline variants" }), jsx("div", { className: 'd-flex gap16 p24 bg-purple-600 br8', children: jsxs("div", { children: [jsx("h4", { className: 'p-h4 mb16 tc-white', children: "outlineWhite" }), jsx(Button, { onClick: onClick, variant: 'outlineWhite', children: children })] }) }), jsx("h3", { className: 'p-h3 my24', children: "State variants" }), jsx("div", { className: 'd-flex gap16 p24 bg-neutral-300 br8', children: ["filledSuccess", "filledError"].map(function (variant) { return (jsxs("div", { children: [jsx("h4", { className: 'p-h4 mb16', children: variant }), jsx(Button, { onClick: onClick, variant: variant, children: children })] }, variant)); }) })] }));
67
- };
68
- var ButtonOnBackgrounds = function (_a) {
69
- var onClick = _a.onClick;
70
- return (jsxs("div", { children: [jsxs("div", { className: 'p24 bg-white br8', children: [jsx("h3", { className: 'p-h3 mb16', children: "On white" }), jsx("div", { className: 'd-flex gap16', children: ["filledColor", "filledGray", "textColor"].map(function (variant) { return (jsx(Button, { onClick: onClick, variant: variant, children: variant }, variant)); }) })] }), jsxs("div", { className: 'p24 bg-neutral-100 br8', children: [jsx("h3", { className: 'p-h3 mb16', children: "On grey" }), jsx("div", { className: 'd-flex gap16', children: ["filledColor", "filledWhite", "textColor"].map(function (variant) { return (jsx(Button, { onClick: onClick, variant: variant, children: variant }, variant)); }) })] }), jsxs("div", { className: 'p24 bg-purple-600 br8', children: [jsx("h3", { className: 'p-h3 mb16 tc-white', children: "On primary" }), jsx("div", { className: 'd-flex gap16', children: ["filledWhite", "outlineWhite", "textWhite"].map(function (variant) { return (jsx(Button, { onClick: onClick, variant: variant, children: variant }, variant)); }) })] })] }));
66
+ return (jsxs("div", { children: [jsx("h3", { className: 'p-h3 mb24', children: "Filled variants" }), jsx("div", { className: 'd-flex gap16 p24 bg-neutral-100 br8', children: ["filledBlack", "filledGray", "filledWhite"].map(function (variant) { return (jsxs("div", { children: [jsx("h4", { className: 'p-h4 mb16', children: variant }), jsx(Button, { onClick: onClick, variant: variant, children: children })] }, variant)); }) }), jsx("h3", { className: 'p-h3 my24', children: "Text variants" }), jsx("div", { className: 'd-flex gap16 p24 bg-neutral-100 br8', children: ["textBlack", "textWhite"].map(function (variant, index) { return (jsxs("div", { className: variant === "textWhite" ? "bg-neutral-800 px32 pb16 br8" : "", children: [jsx("h4", { className: "p-h4 mb16 ".concat(variant === "textWhite" ? "tc-white" : ''), children: variant }), jsx(Button, { onClick: onClick, variant: variant, children: children })] }, variant)); }) }), jsx("h3", { className: 'p-h3 my24', children: "Outline variants" }), jsx("div", { className: 'd-flex gap16 p24 bg-neutral-100 br8', children: ["outlineGray", "outlineWhite"].map(function (variant, index) { return (jsx("div", { className: variant === "outlineWhite" ? "bg-neutral-800 px32 py16 br8" : "px32 py16", children: jsxs("div", { children: [jsx("h4", { className: "p-h4 mb16 ".concat(variant === "outlineWhite" ? "tc-white" : ''), children: variant }), jsx(Button, { onClick: onClick, variant: variant, children: children })] }) }, variant)); }) }), jsx("h3", { className: 'p-h3 my24', children: "State variants" }), jsx("div", { className: 'd-flex gap16 p24 bg-neutral-100 br8', children: jsxs("div", { children: [jsx("h4", { className: 'p-h4 mb16', children: "filledError" }), jsx(Button, { onClick: onClick, variant: "filledError", children: children })] }) })] }));
71
67
  };
72
68
  var ButtonWithIcons = function (_a) {
73
69
  var children = _a.children, onClick = _a.onClick;
@@ -87,9 +83,9 @@ var ButtonDisabled = function (_a) {
87
83
  };
88
84
  var ButtonAsOtherComponents = function (_a) {
89
85
  var children = _a.children; _a.as; var onClick = _a.onClick;
90
- return (jsxs("div", { className: 'd-flex fd-column gap16 p24 bg-neutral-100', children: [jsx("h3", { className: 'p-h3', children: "As an anchor:" }), jsx(Button, { as: "a", href: "https://feather-insurance.com", target: "_blank", children: children }), jsx("h3", { className: 'p-h3', children: "As a button:" }), jsx(Button, { as: "button", onClick: onClick, children: children }), jsx("h3", { className: 'p-h3', children: "As a h3:" }), jsx(Button, { as: "h3", children: children }), jsxs("p", { className: 'p-p p-p--small fw-bold d-flex ai-center gap8 mt32', children: [jsx(Info, {}), "Inspect elements to see the different HTML tags being rendered."] })] }));
86
+ return (jsxs("div", { className: 'd-flex fd-column gap16 p24 bg-neutral-100', children: [jsx("h3", { className: 'p-h3', children: "As an anchor:" }), jsx(Button, { as: "a", href: "https://feather-insurance.com", target: "_blank", children: children }), jsx("h3", { className: 'p-h3', children: "As a button:" }), jsx(Button, { as: "button", onClick: onClick, children: children }), jsx("h3", { className: 'p-h3', children: "As a h3:" }), jsx(Button, { as: "h3", children: children }), jsxs("p", { className: 'p-p p-p--small fw-bold d-flex ai-center gap8 mt32', children: [jsx(InfoIcon, {}), "Inspect elements to see the different HTML tags being rendered."] })] }));
91
87
  };
92
88
 
93
89
  export default story;
94
- export { ButtonAsOtherComponents, ButtonDisabled, ButtonLoading, ButtonOnBackgrounds, ButtonStory, ButtonVariants, ButtonWithIconOnly, ButtonWithIcons };
90
+ export { ButtonAsOtherComponents, ButtonDisabled, ButtonLoading, ButtonStory, ButtonVariants, ButtonWithIconOnly, ButtonWithIcons };
95
91
  //# sourceMappingURL=index.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.stories.js","sources":["../../../../../src/lib/components/button/index.stories.tsx"],"sourcesContent":["import { ElementType } from 'react';\nimport { Button, ButtonProps, ButtonVariant } from '.';\nimport { InfoIcon, PlusIcon, SendIcon } from '../icon';\n\nconst story = {\n title: 'JSX/Button',\n component: Button,\n argTypes: {\n as: {\n control: { type: 'text' },\n description: 'Allow wrapper element type to be custom defined'\n },\n children: {\n control: 'text',\n description: 'Text that is displayed inside the button. Hidden when hideLabel is set as true',\n },\n variant: {\n description: 'Variant that defines the style of the Button',\n },\n leftIcon: {\n description: 'Icon to be displayed on the left side of the button. This makes use of [dirty swan Icon component](http://localhost:9009/?path=/docs/jsx-icon--icon-story).',\n },\n rightIcon: {\n description: 'Icon to be displayed on the right side of the button. This makes use of [dirty swan Icon component](http://localhost:9009/?path=/docs/jsx-icon--icon-story).',\n },\n loading: {\n description: 'Show button on a loading state.',\n },\n hideLabel: {\n description: 'Show button as an icon only button. This hides the label but still keeps it for accessibility purposes.',\n },\n className: {\n type: 'text',\n description: 'Class name for most top parent element',\n },\n },\n args: {\n children: 'Click me',\n disabled: false,\n variant: 'filledColor',\n loading: false,\n hideLabel: false,\n className: 'wmn3',\n },\n parameters: {\n design: {\n url: 'https://www.figma.com/embed?embed_host=share&url=https%3A%2F%2Fwww.figma.com%2Ffile%2FMKs4cbojdVOBKUxv7okb93%2FDirty-Swan-Pattern-Library%3Fnode-id%3D251%253A26',\n type: 'figma'\n },\n },\n};\n\nexport const ButtonStory = ({\n className,\n loading = false,\n children,\n variant,\n hideLabel,\n leftIcon,\n rightIcon,\n disabled,\n}: ButtonProps) => (\n <div className='wmx6'>\n <Button\n className={className}\n loading={loading}\n variant={variant}\n hideLabel={hideLabel}\n leftIcon={leftIcon}\n rightIcon={rightIcon}\n disabled={disabled}\n >\n {children}\n </Button>\n </div>\n);\n\nButtonStory.storyName = \"Button\";\n\nexport const ButtonVariants = ({ children, onClick }: ButtonProps) => (\n <div>\n <h3 className='p-h3 mb24'>Filled variants</h3>\n <div className='d-flex gap16 p24 bg-neutral-300 br8'>\n {[ \"filledColor\", \"filledGray\", \"filledWhite\", \"filledBlack\"].map((variant) => (\n <div key={variant}>\n <h4 className='p-h4 mb16'>\n {variant}\n </h4>\n\n <Button onClick={onClick} variant={variant as ButtonVariant}>\n {children}\n </Button>\n </div>\n ))}\n </div>\n\n <h3 className='p-h3 my24'>Text variants</h3>\n <div className='d-flex gap16 p24 bg-neutral-300 br8'>\n {[\"textColor\", \"textWhite\"].map((variant, index) => (\n <div key={variant} className={variant === \"textWhite\" ? \"bg-purple-600 px32 br8\" : \"\"}>\n <h4 className={`p-h4 mb16 ${variant === \"textWhite\" ? \"tc-white\" : ''}`}>\n {variant}\n </h4>\n\n <Button onClick={onClick} variant={variant as ButtonVariant}>\n {children}\n </Button>\n </div>\n ))}\n </div>\n\n <h3 className='p-h3 my24'>Outline variants</h3>\n <div className='d-flex gap16 p24 bg-purple-600 br8'>\n <div>\n <h4 className='p-h4 mb16 tc-white'>\n outlineWhite\n </h4>\n\n <Button onClick={onClick} variant={'outlineWhite'}>\n {children}\n </Button>\n </div>\n </div>\n \n <h3 className='p-h3 my24'>State variants</h3>\n <div className='d-flex gap16 p24 bg-neutral-300 br8'>\n {[\"filledSuccess\", \"filledError\"].map((variant) => (\n <div key={variant}>\n <h4 className='p-h4 mb16'>\n {variant}\n </h4>\n\n <Button onClick={onClick} variant={variant as ButtonVariant}>\n {children}\n </Button>\n </div>\n ))}\n </div>\n </div>\n);\n\nexport const ButtonOnBackgrounds = ({ onClick }: ButtonProps) => (\n <div>\n <div className='p24 bg-white br8'>\n <h3 className='p-h3 mb16'>On white</h3>\n <div className='d-flex gap16'>\n {[ \"filledColor\", \"filledGray\", \"textColor\"].map((variant) => (\n <Button key={variant} onClick={onClick} variant={variant as ButtonVariant}>\n {variant}\n </Button>\n ))}\n </div>\n </div>\n\n <div className='p24 bg-neutral-100 br8'>\n <h3 className='p-h3 mb16'>On grey</h3>\n <div className='d-flex gap16'>\n {[ \"filledColor\", \"filledWhite\", \"textColor\"].map((variant) => (\n <Button key={variant} onClick={onClick} variant={variant as ButtonVariant}>\n {variant}\n </Button>\n ))}\n </div>\n </div>\n\n <div className='p24 bg-purple-600 br8'>\n <h3 className='p-h3 mb16 tc-white'>On primary</h3>\n <div className='d-flex gap16'>\n {[\"filledWhite\", \"outlineWhite\", \"textWhite\"].map((variant) => (\n <Button key={variant} onClick={onClick} variant={variant as ButtonVariant}>\n {variant}\n </Button>\n ))}\n </div>\n </div>\n </div>\n);\n\nexport const ButtonWithIcons = ({ children, onClick }: ButtonProps) => (\n <div className='d-flex gap16'>\n <Button leftIcon={<SendIcon />} onClick={onClick}>\n {children}\n </Button>\n <Button rightIcon={<SendIcon />} onClick={onClick}>\n {children}\n </Button>\n </div>\n);\n\nexport const ButtonWithIconOnly = ({ children, onClick }: ButtonProps) => (\n <Button leftIcon={<PlusIcon />} hideLabel onClick={onClick}>\n {children}\n </Button>\n);\n\nexport const ButtonLoading = ({ children, onClick }: ButtonProps) => (\n <Button loading onClick={onClick}>\n {children}\n </Button>\n);\n\nexport const ButtonDisabled = ({ children, onClick }: ButtonProps) => (\n <Button disabled onClick={onClick}>\n {children}\n </Button>\n);\n\nexport const ButtonAsOtherComponents = ({ children, as, onClick }: ButtonProps) => (\n <div className='d-flex fd-column gap16 p24 bg-neutral-100'>\n <h3 className='p-h3'>As an anchor:</h3>\n <Button as=\"a\" href=\"https://feather-insurance.com\" target=\"_blank\">\n {children}\n </Button>\n\n <h3 className='p-h3'>As a button:</h3>\n <Button as=\"button\" onClick={onClick}>\n {children}\n </Button>\n\n <h3 className='p-h3'>As a h3:</h3>\n <Button as=\"h3\">\n {children}\n </Button>\n\n <p className='p-p p-p--small fw-bold d-flex ai-center gap8 mt32'>\n <InfoIcon />\n Inspect elements to see the different HTML tags being rendered.\n </p>\n </div>\n);\n\nexport default story;\n"],"names":["_jsx","_jsxs","InfoIcon"],"mappings":";;;;;;;;;;;IAIM,KAAK,GAAG;IACZ,KAAK,EAAE,YAAY;IACnB,SAAS,EAAE,MAAM;IACjB,QAAQ,EAAE;QACR,EAAE,EAAE;YACF,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;YACzB,WAAW,EAAE,iDAAiD;SAC/D;QACD,QAAQ,EAAE;YACR,OAAO,EAAE,MAAM;YACf,WAAW,EAAE,gFAAgF;SAC9F;QACD,OAAO,EAAE;YACP,WAAW,EAAE,8CAA8C;SAC5D;QACD,QAAQ,EAAE;YACR,WAAW,EAAE,6JAA6J;SAC3K;QACD,SAAS,EAAE;YACT,WAAW,EAAE,8JAA8J;SAC5K;QACD,OAAO,EAAE;YACP,WAAW,EAAE,iCAAiC;SAC/C;QACD,SAAS,EAAE;YACT,WAAW,EAAE,yGAAyG;SACvH;QACD,SAAS,EAAE;YACT,IAAI,EAAE,MAAM;YACZ,WAAW,EAAE,wCAAwC;SACtD;KACF;IACD,IAAI,EAAE;QACJ,QAAQ,EAAE,UAAU;QACpB,QAAQ,EAAE,KAAK;QACf,OAAO,EAAE,aAAa;QACtB,OAAO,EAAE,KAAK;QACd,SAAS,EAAE,KAAK;QAChB,SAAS,EAAE,MAAM;KAClB;IACD,UAAU,E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AE,OAAO,YAC7B,QAAQ,GACF;AAH0D,EAInE;IAEW,cAAc,GAAG,UAAC,EAAkC;QAAhC,QAAQ,cAAA,EAAE,OAAO,aAAA;IAAoB,QACpEA,IAAC,MAAM,IAAC,QAAQ,QAAC,OAAO,EAAE,OAAO,YAC9B,QAAQ,GACF;AAH2D,EAIpE;IAEW,uBAAuB,GAAG,UAAC,EAAsC;QAApC,QAAQ,cAAA,OAAI,MAAE,OAAO;IAAoB,QACjFC,cAAK,SAAS,EAAC,2CAA2C,aACxDD,YAAI,SAAS,EAAC,MAAM,8BAAmB,EACrCA,IAAC,MAAM,IAAC,EAAE,EAAC,GAAG,EAAC,IAAI,EAAC,+BAA+B,EAAC,MAAM,EAAC,QAAQ,YAChE,QAAQ,GACF,EAEbA,YAAI,SAAS,EAAC,MAAM,6BAAkB,EACpCA,IAAC,MAAM,IAAC,EAAE,EAAC,QAAQ,EAAC,OAAO,EAAE,OAAO,YACjC,QAAQ,GACF,EAEXA,YAAI,SAAS,EAAC,MAAM,yBAAc,EAChCA,IAAC,MAAM,IAAC,EAAE,EAAC,IAAI,YACZ,QAAQ,GACF,EAETC,YAAG,SAAS,EAAC,mDAAmD,aAC9DD,IAACE,IAAQ,KAAG,uEAEV,IACA;AArB2E;;;;;"}
1
+ {"version":3,"file":"index.stories.js","sources":["../../../../../src/lib/components/button/index.stories.tsx"],"sourcesContent":["import { ElementType } from 'react';\nimport { Button, ButtonProps, ButtonVariant } from '.';\nimport { InfoIcon, PlusIcon, SendIcon } from '../icon';\n\nconst story = {\n title: 'JSX/Button',\n component: Button,\n argTypes: {\n as: {\n control: { type: 'text' },\n description: 'Allow wrapper element type to be custom defined'\n },\n children: {\n control: 'text',\n description: 'Text that is displayed inside the button. Hidden when hideLabel is set as true',\n },\n variant: {\n description: 'Variant that defines the style of the Button',\n },\n leftIcon: {\n description: 'Icon to be displayed on the left side of the button. This makes use of [dirty swan Icon component](http://localhost:9009/?path=/docs/jsx-icon--icon-story).',\n },\n rightIcon: {\n description: 'Icon to be displayed on the right side of the button. This makes use of [dirty swan Icon component](http://localhost:9009/?path=/docs/jsx-icon--icon-story).',\n },\n loading: {\n description: 'Show button on a loading state.',\n },\n hideLabel: {\n description: 'Show button as an icon only button. This hides the label but still keeps it for accessibility purposes.',\n },\n className: {\n type: 'text',\n description: 'Class name for most top parent element',\n },\n },\n args: {\n children: 'Click me',\n disabled: false,\n variant: 'filledBlack',\n loading: false,\n hideLabel: false,\n className: 'wmn3',\n },\n parameters: {\n design: {\n url: 'https://www.figma.com/embed?embed_host=share&url=https%3A%2F%2Fwww.figma.com%2Ffile%2FMKs4cbojdVOBKUxv7okb93%2FDirty-Swan-Pattern-Library%3Fnode-id%3D251%253A26',\n type: 'figma'\n },\n },\n};\n\nexport const ButtonStory = ({\n className,\n loading = false,\n children,\n variant,\n hideLabel,\n leftIcon,\n rightIcon,\n disabled,\n}: ButtonProps) => (\n <div className='wmx6'>\n <Button\n className={className}\n loading={loading}\n variant={variant}\n hideLabel={hideLabel}\n leftIcon={leftIcon}\n rightIcon={rightIcon}\n disabled={disabled}\n >\n {children}\n </Button>\n </div>\n);\n\nButtonStory.storyName = \"Button\";\n\nexport const ButtonVariants = ({ children, onClick }: ButtonProps) => (\n <div>\n <h3 className='p-h3 mb24'>Filled variants</h3>\n <div className='d-flex gap16 p24 bg-neutral-100 br8'>\n {[ \"filledBlack\", \"filledGray\", \"filledWhite\"].map((variant) => (\n <div key={variant}>\n <h4 className='p-h4 mb16'>\n {variant}\n </h4>\n\n <Button onClick={onClick} variant={variant as ButtonVariant}>\n {children}\n </Button>\n </div>\n ))}\n </div>\n\n <h3 className='p-h3 my24'>Text variants</h3>\n <div className='d-flex gap16 p24 bg-neutral-100 br8'>\n {[\"textBlack\", \"textWhite\"].map((variant, index) => (\n <div key={variant} className={variant === \"textWhite\" ? \"bg-neutral-800 px32 pb16 br8\" : \"\"}>\n <h4 className={`p-h4 mb16 ${variant === \"textWhite\" ? \"tc-white\" : ''}`}>\n {variant}\n </h4>\n\n <Button onClick={onClick} variant={variant as ButtonVariant}>\n {children}\n </Button>\n </div>\n ))}\n </div>\n\n <h3 className='p-h3 my24'>Outline variants</h3>\n <div className='d-flex gap16 p24 bg-neutral-100 br8'>\n {[\"outlineGray\", \"outlineWhite\"].map((variant, index) => (\n <div key={variant} className={variant === \"outlineWhite\" ? \"bg-neutral-800 px32 py16 br8\" : \"px32 py16\"}>\n <div>\n <h4 className={`p-h4 mb16 ${variant === \"outlineWhite\" ? \"tc-white\" : ''}`}>\n {variant}\n </h4>\n\n <Button onClick={onClick} variant={variant as ButtonVariant}>\n {children}\n </Button>\n </div>\n </div>\n ))}\n </div>\n \n <h3 className='p-h3 my24'>State variants</h3>\n <div className='d-flex gap16 p24 bg-neutral-100 br8'>\n <div>\n <h4 className='p-h4 mb16'>\n filledError\n </h4>\n\n <Button onClick={onClick} variant=\"filledError\">\n {children}\n </Button>\n </div>\n </div>\n </div>\n);\n\nexport const ButtonWithIcons = ({ children, onClick }: ButtonProps) => (\n <div className='d-flex gap16'>\n <Button leftIcon={<SendIcon />} onClick={onClick}>\n {children}\n </Button>\n <Button rightIcon={<SendIcon />} onClick={onClick}>\n {children}\n </Button>\n </div>\n);\n\nexport const ButtonWithIconOnly = ({ children, onClick }: ButtonProps) => (\n <Button leftIcon={<PlusIcon />} hideLabel onClick={onClick}>\n {children}\n </Button>\n);\n\nexport const ButtonLoading = ({ children, onClick }: ButtonProps) => (\n <Button loading onClick={onClick}>\n {children}\n </Button>\n);\n\nexport const ButtonDisabled = ({ children, onClick }: ButtonProps) => (\n <Button disabled onClick={onClick}>\n {children}\n </Button>\n);\n\nexport const ButtonAsOtherComponents = ({ children, as, onClick }: ButtonProps) => (\n <div className='d-flex fd-column gap16 p24 bg-neutral-100'>\n <h3 className='p-h3'>As an anchor:</h3>\n <Button as=\"a\" href=\"https://feather-insurance.com\" target=\"_blank\">\n {children}\n </Button>\n\n <h3 className='p-h3'>As a button:</h3>\n <Button as=\"button\" onClick={onClick}>\n {children}\n </Button>\n\n <h3 className='p-h3'>As a h3:</h3>\n <Button as=\"h3\">\n {children}\n </Button>\n\n <p className='p-p p-p--small fw-bold d-flex ai-center gap8 mt32'>\n <InfoIcon />\n Inspect elements to see the different HTML tags being rendered.\n </p>\n </div>\n);\n\nexport default story;\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;;;IAIM,KAAK,GAAG;IACZ,KAAK,EAAE,YAAY;IACnB,SAAS,EAAE,MAAM;IACjB,QAAQ,EAAE;QACR,EAAE,EAAE;YACF,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;YACzB,WAAW,EAAE,iDAAiD;SAC/D;QACD,QAAQ,EAAE;YACR,OAAO,EAAE,MAAM;YACf,WAAW,EAAE,gFAAgF;SAC9F;QACD,OAAO,EAAE;YACP,WAAW,EAAE,8CAA8C;SAC5D;QACD,QAAQ,EAAE;YACR,WAAW,EAAE,6JAA6J;SAC3K;QACD,SAAS,EAAE;YACT,WAAW,EAAE,8JAA8J;SAC5K;QACD,OAAO,EAAE;YACP,WAAW,EAAE,iCAAiC;SAC/C;QACD,SAAS,EAAE;YACT,WAAW,EAAE,yGAAyG;SACvH;QACD,SAAS,EAAE;YACT,IAAI,EAAE,MAAM;YACZ,WAAW,EAAE,wCAAwC;SACtD;KACF;IACD,IAAI,EAAE;QACJ,QAAQ,EAAE,UAAU;QACpB,QAAQ,EAAE,KAAK;QACf,OAAO,EAAE,aAAa;QACtB,OAAO,EAAE,KAAK;QACd,SAAS,EAAE,KAAK;QAChB,SAAS,EAAE,MAAM;KAClB;IACD,UAAU,EAAE;QACV,MAAM,EAAE;YACN,GAAG,EAAE,kKAAkK;YACvK,IAAI,EAAE,OAAO;SACd;KACF;EACD;IAEW,WAAW,GAAG,UAAC,EASd;QARZ,SAAS,eAAA,EACT,eAAe,EAAf,OAAO,mBAAG,KAAK,KAAA,EACf,QAAQ,cAAA,EACR,OAAO,aAAA,EACP,SAAS,eAAA,EACT,QAAQ,cAAA,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QAAhC,QAAQ,cAAA,EAAE,OAAO,aAAA;IAAoB,QACnEA,IAAC,MAAM,IAAC,OAAO,QAAC,OAAO,EAAE,OAAO,YAC7B,QAAQ,GACF;AAH0D,EAInE;IAEW,cAAc,GAAG,UAAC,EAAkC;QAAhC,QAAQ,cAAA,EAAE,OAAO,aAAA;IAAoB,QACpEA,IAAC,MAAM,IAAC,QAAQ,QAAC,OAAO,EAAE,OAAO,YAC9B,QAAQ,GACF;AAH2D,EAIpE;IAEW,uBAAuB,GAAG,UAAC,EAAsC;QAApC,QAAQ,cAAA,OAAI,MAAE,OAAO;IAAoB,QACjFC,cAAK,SAAS,EAAC,2CAA2C,aACxDD,YAAI,SAAS,EAAC,MAAM,8BAAmB,EACrCA,IAAC,MAAM,IAAC,EAAE,EAAC,GAAG,EAAC,IAAI,EAAC,+BAA+B,EAAC,MAAM,EAAC,QAAQ,YAChE,QAAQ,GACF,EAEbA,YAAI,SAAS,EAAC,MAAM,6BAAkB,EACpCA,IAAC,MAAM,IAAC,EAAE,EAAC,QAAQ,EAAC,OAAO,EAAE,OAAO,YACjC,QAAQ,GACF,EAEXA,YAAI,SAAS,EAAC,MAAM,yBAAc,EAChCA,IAAC,MAAM,IAAC,EAAE,EAAC,IAAI,YACZ,QAAQ,GACF,EAETC,YAAG,SAAS,EAAC,mDAAmD,aAC9DD,IAAC,QAAQ,KAAG,uEAEV,IACA;AArB2E;;;;;"}
@@ -6,14 +6,14 @@ import { s as styleInject } from '../../../style-inject.es-1f59c1d0.js';
6
6
  import 'react';
7
7
  import '../../icon/IconWrapper/IconWrapper.js';
8
8
 
9
- var css_248z = ".style-module_button__P-UIa {\n background-color: transparent;\n color: #26262e;\n outline: 1px solid transparent;\n transition: all 0.2s ease-in-out;\n text-decoration: none;\n border-radius: 8px;\n}\n.style-module_button__P-UIa:hover {\n outline: 1px solid #8883D8;\n color: #8883D8;\n}\n.style-module_button__P-UIa:focus-visible {\n outline: 2px solid #8883D8;\n color: #8883D8;\n}\n\n.style-module_wrapper__35C6V {\n background-color: #fff;\n}\n\n.style-module_icon__15X1c {\n margin-right: 12px;\n color: #8883D8;\n}\n.style-module_iconbalanced__Zb-hZ {\n margin-right: 16px;\n}\n.style-module_iconspacious__3Ly0X {\n margin-right: 24px;\n}\n\n.style-module_actionIcon__3pnwR {\n margin-left: 12px;\n}\n.style-module_actionIconbalanced__19jnn {\n margin-left: 16px;\n}\n.style-module_actionIconspacious__2LJN4 {\n margin-left: 24px;\n}\n\n.style-module_description__ksrnP {\n color: #696971;\n}";
10
- var styles = {"button":"style-module_button__P-UIa","wrapper":"style-module_wrapper__35C6V","icon":"style-module_icon__15X1c","iconbalanced":"style-module_iconbalanced__Zb-hZ","iconspacious":"style-module_iconspacious__3Ly0X","actionIcon":"style-module_actionIcon__3pnwR","actionIconbalanced":"style-module_actionIconbalanced__19jnn","actionIconspacious":"style-module_actionIconspacious__2LJN4","description":"style-module_description__ksrnP"};
9
+ var css_248z = ".style-module_border-strong-default__3_zF3 {\n border: 1px solid #d2d2d9;\n}\n\n.style-module_border-strong-hover__2gkuG {\n border: 1px solid #919199;\n}\n\n.style-module_border-strong-active__3BFbj {\n border: 1px solid #26262e;\n}\n\n.style-module_border-medium-default__21dIE {\n border: 1px solid #e7e7ed;\n}\n\n.style-module_border-medium-hover__Pq6pQ {\n border: 1px solid #b8b8c0;\n}\n\n.style-module_border-medium-active__uLwlN {\n border: 1px solid #3f3f47;\n}\n\n.style-module_border-soft-default__398BS {\n border: 1px solid #f5f5fb;\n}\n\n.style-module_border-soft-hover__30OW0 {\n border: 1px solid #d2d2d9;\n}\n\n.style-module_border-soft-active__eUC5s {\n border: 1px solid #919199;\n}\n\n.style-module_border-focus__28f29 {\n border: 2px solid #26262e;\n}\n\n.style-module_wrapper__35C6V {\n background-color: #fff;\n border: 1px solid transparent;\n transition: all 0.2s ease-in-out;\n}\n.style-module_wrapper--default__NYcwG {\n background-color: #fff;\n}\n.style-module_wrapper--transparent__1M1sg {\n background-color: transparent;\n}\n.style-module_wrapper--outline__3fBDi {\n background-color: #fff;\n border: 1px solid #d2d2d9;\n}\n.style-module_wrapper--secondary__1l7bB {\n background-color: #EEEEFE;\n}\n.style-module_wrapper--primary__Sulin {\n background-color: #FEECD3;\n}\n\n.style-module_button__P-UIa {\n background-color: transparent;\n color: #26262e;\n outline: 1px solid transparent;\n transition: all 0.2s ease-in-out;\n text-decoration: none;\n border-radius: 8px;\n border: 1px solid transparent;\n outline: 1px solid transparent;\n}\n.style-module_button__P-UIa:hover .style-module_wrapper--default__NYcwG {\n border: 1px solid #d2d2d9;\n}\n.style-module_button__P-UIa:hover .style-module_wrapper--transparent__1M1sg {\n background-color: transparent;\n border-color: transparent;\n}\n.style-module_button__P-UIa:hover .style-module_wrapper--outline__3fBDi {\n background-color: #fff;\n border: 1px solid #26262e;\n}\n.style-module_button__P-UIa:hover .style-module_wrapper--secondary__1l7bB {\n background-color: #EEEEFE;\n border-color: #B8B4F3;\n}\n.style-module_button__P-UIa:hover .style-module_wrapper--primary__Sulin {\n background-color: #FEECD3;\n border-color: #F2B873;\n}\n.style-module_button__P-UIa:focus .style-module_wrapper--default__NYcwG, .style-module_button__P-UIa:focus-visible .style-module_wrapper--default__NYcwG {\n border-color: #26262e;\n box-shadow: inset 0 0 0 1px #26262e;\n}\n.style-module_button__P-UIa:focus .style-module_wrapper--outline__3fBDi, .style-module_button__P-UIa:focus-visible .style-module_wrapper--outline__3fBDi {\n box-shadow: inset 0 0 0 1px #26262e;\n border-color: #26262e;\n}\n.style-module_button__P-UIa:focus .style-module_wrapper--transparent__1M1sg, .style-module_button__P-UIa:focus-visible .style-module_wrapper--transparent__1M1sg {\n background-color: #f5f5fb;\n box-shadow: none;\n}\n.style-module_button__P-UIa:focus .style-module_wrapper--primary__Sulin, .style-module_button__P-UIa:focus-visible .style-module_wrapper--primary__Sulin {\n border-color: #C6824E;\n box-shadow: inset 0 0 0 1px #C6824E;\n}\n.style-module_button__P-UIa:focus .style-module_wrapper--secondary__1l7bB, .style-module_button__P-UIa:focus-visible .style-module_wrapper--secondary__1l7bB {\n border-color: #6A65AE;\n box-shadow: inset 0 0 0 1px #6A65AE;\n}\n.style-module_button__P-UIa:focus-visible .style-module_wrapper__35C6V {\n border-color: #26262e;\n box-shadow: inset 0 0 0 1px #26262e;\n}\n\n.style-module_icon__15X1c {\n margin-right: 12px;\n color: #26262e;\n}\n.style-module_iconbalanced__Zb-hZ {\n margin-right: 16px;\n}\n.style-module_iconspacious__3Ly0X {\n margin-right: 24px;\n}\n\n.style-module_actionIcon__3pnwR {\n color: #26262e;\n margin-left: 12px;\n}\n.style-module_actionIconbalanced__19jnn {\n margin-left: 16px;\n}\n.style-module_actionIconspacious__2LJN4 {\n margin-left: 24px;\n}\n\n.style-module_description__ksrnP {\n color: #696971;\n}";
10
+ var styles = {"border-strong-default":"style-module_border-strong-default__3_zF3","border-strong-hover":"style-module_border-strong-hover__2gkuG","border-strong-active":"style-module_border-strong-active__3BFbj","border-medium-default":"style-module_border-medium-default__21dIE","border-medium-hover":"style-module_border-medium-hover__Pq6pQ","border-medium-active":"style-module_border-medium-active__uLwlN","border-soft-default":"style-module_border-soft-default__398BS","border-soft-hover":"style-module_border-soft-hover__30OW0","border-soft-active":"style-module_border-soft-active__eUC5s","border-focus":"style-module_border-focus__28f29","wrapper":"style-module_wrapper__35C6V","wrapper--default":"style-module_wrapper--default__NYcwG","wrapper--transparent":"style-module_wrapper--transparent__1M1sg","wrapper--outline":"style-module_wrapper--outline__3fBDi","wrapper--secondary":"style-module_wrapper--secondary__1l7bB","wrapper--primary":"style-module_wrapper--primary__Sulin","button":"style-module_button__P-UIa","icon":"style-module_icon__15X1c","iconbalanced":"style-module_iconbalanced__Zb-hZ","iconspacious":"style-module_iconspacious__3Ly0X","actionIcon":"style-module_actionIcon__3pnwR","actionIconbalanced":"style-module_actionIconbalanced__19jnn","actionIconspacious":"style-module_actionIconspacious__2LJN4","description":"style-module_description__ksrnP"};
11
11
  styleInject(css_248z);
12
12
 
13
13
  var cardDefaultAs = 'section';
14
14
  var Card = function (_a) {
15
15
  var _b;
16
- var as = _a.as, children = _a.children, classNames$1 = _a.classNames, _c = _a.density, density = _c === void 0 ? 'balanced' : _c, description = _a.description, _d = _a.descriptionVariant, descriptionVariant = _d === void 0 ? 'large' : _d, _e = _a.dropShadow, dropShadow = _e === void 0 ? true : _e, icon = _a.icon, label = _a.label, onClick = _a.onClick, actionIcon = _a.actionIcon, title = _a.title, _f = _a.titleVariant, titleVariant = _f === void 0 ? 'large' : _f, showActionIcon = _a.showActionIcon, _g = _a.verticalAlignment, verticalAlignment = _g === void 0 ? 'center' : _g, rest = __rest(_a, ["as", "children", "classNames", "density", "description", "descriptionVariant", "dropShadow", "icon", "label", "onClick", "actionIcon", "title", "titleVariant", "showActionIcon", "verticalAlignment"]);
16
+ var as = _a.as, children = _a.children, classNames$1 = _a.classNames, _c = _a.density, density = _c === void 0 ? 'balanced' : _c, description = _a.description, _d = _a.descriptionVariant, descriptionVariant = _d === void 0 ? 'large' : _d, _e = _a.dropShadow, dropShadow = _e === void 0 ? true : _e, icon = _a.icon, label = _a.label, onClick = _a.onClick, actionIcon = _a.actionIcon, title = _a.title, _f = _a.titleVariant, titleVariant = _f === void 0 ? 'large' : _f, showActionIcon = _a.showActionIcon, _g = _a.verticalAlignment, verticalAlignment = _g === void 0 ? 'center' : _g, _h = _a.variant, variant = _h === void 0 ? 'default' : _h, rest = __rest(_a, ["as", "children", "classNames", "density", "description", "descriptionVariant", "dropShadow", "icon", "label", "onClick", "actionIcon", "title", "titleVariant", "showActionIcon", "verticalAlignment", "variant"]);
17
17
  var hideActionIcon = typeof actionIcon !== 'undefined' && !actionIcon;
18
18
  var propsWithActionIcon = onClick || (rest === null || rest === void 0 ? void 0 : rest.href) || rest.to;
19
19
  var cardDefaultTag = onClick ? 'button' : cardDefaultAs;
@@ -25,7 +25,7 @@ var Card = function (_a) {
25
25
  _b)) }, onClick && {
26
26
  onClick: onClick,
27
27
  type: "button"
28
- }, rest, { children: jsxs("div", { className: classNames('d-flex fd-column jc-center w100 ta-left br8', { 'bs-sm': dropShadow }, {
28
+ }, rest, { children: jsxs("div", { className: classNames('d-flex fd-column jc-center w100 ta-left br8', { 'bs-sm': dropShadow && variant === 'default' }, {
29
29
  compact: 'p16',
30
30
  balanced: 'p24',
31
31
  spacious: 'p32',
@@ -33,11 +33,11 @@ var Card = function (_a) {
33
33
  top: 'jc-start',
34
34
  center: 'jc-center',
35
35
  bottom: 'jc-end',
36
- }[verticalAlignment], styles === null || styles === void 0 ? void 0 : styles.wrapper, classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.wrapper), children: [jsxs("div", { className: "d-flex w100", children: [icon && (jsx("div", { className: classNames("d-flex", styles.icon, styles["icon".concat(density)], classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.icon, {
36
+ }[verticalAlignment], styles === null || styles === void 0 ? void 0 : styles.wrapper, styles === null || styles === void 0 ? void 0 : styles["wrapper--".concat(variant)], classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.wrapper), children: [jsxs("div", { className: "d-flex w100", children: [icon && (jsx("div", { className: classNames("d-flex", styles.icon, styles["icon".concat(density)], classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.icon, {
37
37
  top: 'ai-start',
38
38
  center: 'ai-center',
39
39
  bottom: 'ai-end',
40
- }[verticalAlignment]), children: icon })), jsxs("div", { className: "d-flex jc-between w100", children: [jsxs("div", { className: "d-flex jc-center gap8 fd-column tc-neutral-900 w100", children: [label && (jsx("h4", { className: classNames('p-p--small', classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.label), children: label })), title && (jsx("h3", { className: classNames(classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.title, {
40
+ }[verticalAlignment]), children: icon })), jsxs("div", { className: "d-flex jc-between w100", children: [jsxs("div", { className: classNames((classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.contentWrapper) || '', "d-flex jc-center gap8 fd-column tc-neutral-900 w100"), children: [label && (jsx("h4", { className: classNames('p-p--small', classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.label), children: label })), title && (jsx("h3", { className: classNames(classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.title, {
41
41
  large: 'p-h3',
42
42
  medium: 'p-h4',
43
43
  small: 'p-p',
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../../src/lib/components/cards/card/index.tsx"],"sourcesContent":["import { ComponentProps, ElementType, ReactNode } from 'react';\nimport classNamesUtil from 'classnames';\nimport { ChevronRightIcon } from '../../icon';\n\nimport styles from './style.module.scss';\n\nconst cardDefaultAs = 'section' as const\ntype CardDefaultAsType = typeof cardDefaultAs;\ntype DensityType = 'balanced' | 'compact' | 'spacious';\ntype TitleVariantType = 'small' | 'medium' | 'large';\ntype VerticalAlignmentType = 'top' | 'center' | 'bottom';\n\ntype CardOwnProps<E extends ElementType = CardDefaultAsType> = {\n as?: E;\n children?: ReactNode;\n classNames?: {\n buttonWrapper?: string;\n wrapper?: string;\n label?: string;\n title?: string;\n description?: string;\n children?: string;\n icon?: string;\n actionIcon?: string;\n };\n density?: DensityType;\n dropShadow?: boolean;\n icon?: ReactNode;\n title?: ReactNode;\n titleVariant?: TitleVariantType;\n description?: ReactNode;\n descriptionVariant?: 'small' | 'large';\n label?: ReactNode;\n onClick?: () => void;\n actionIcon?: ReactNode;\n showActionIcon?: boolean;\n verticalAlignment?: VerticalAlignmentType;\n} \n\nexport type CardProps<E extends ElementType = CardDefaultAsType> = CardOwnProps<E> &\n Omit<ComponentProps<E>, keyof CardOwnProps<E>>\n\nconst Card = <E extends ElementType = CardDefaultAsType>({\n as,\n children,\n classNames,\n density = 'balanced',\n description,\n descriptionVariant = 'large',\n dropShadow = true,\n icon,\n label,\n onClick,\n actionIcon,\n title,\n titleVariant = 'large',\n showActionIcon,\n verticalAlignment = 'center',\n ...rest\n}: CardProps<E>) => {\n const hideActionIcon = typeof actionIcon !== 'undefined' && !actionIcon;\n const propsWithActionIcon = onClick || rest?.href || rest.to; \n const cardDefaultTag = onClick ? 'button' : cardDefaultAs;\n const Tag = as || cardDefaultTag;\n \n return (\n <Tag\n className={classNamesUtil(\n classNames?.buttonWrapper,\n 'd-flex w100 ai-stretch',\n {\n 'c-pointer': propsWithActionIcon,\n [styles.button]: propsWithActionIcon\n },\n )}\n {...onClick && { \n onClick, \n type: \"button\"\n }}\n {...rest}\n >\n <div\n className={classNamesUtil(\n 'd-flex fd-column jc-center w100 ta-left br8',\n { 'bs-sm': dropShadow },\n {\n compact: 'p16',\n balanced: 'p24',\n spacious: 'p32',\n }[density as DensityType],\n {\n top: 'jc-start',\n center: 'jc-center',\n bottom: 'jc-end',\n }[verticalAlignment as VerticalAlignmentType],\n styles?.wrapper,\n classNames?.wrapper\n )}\n >\n <div className=\"d-flex w100\">\n {icon && (\n <div\n className={classNamesUtil(\n `d-flex`,\n styles.icon,\n styles[`icon${density}`],\n classNames?.icon, \n {\n top: 'ai-start',\n center: 'ai-center',\n bottom: 'ai-end',\n }[verticalAlignment as VerticalAlignmentType],\n )}\n >\n {icon}\n </div>\n )}\n\n <div className=\"d-flex jc-between w100\">\n <div className=\"d-flex jc-center gap8 fd-column tc-neutral-900 w100\">\n {label && (\n <h4 className={classNamesUtil('p-p--small', classNames?.label)}>\n {label}\n </h4>\n )}\n\n {title && (\n <h3\n className={classNamesUtil(\n classNames?.title,\n {\n large: 'p-h3',\n medium: 'p-h4',\n small: 'p-p',\n }[titleVariant as TitleVariantType]\n )}\n >\n {title}\n </h3>\n )}\n\n {description && (\n <div\n className={classNamesUtil(\n styles.description,\n classNames?.description,\n descriptionVariant === 'small' ? 'p-p--small' : 'p-p',\n )}\n >\n {description}\n </div>\n )}\n </div>\n\n {(showActionIcon || (propsWithActionIcon && !hideActionIcon)) && (\n <div\n className={classNamesUtil(\n styles.actionIcon,\n classNames?.actionIcon,\n styles[`actionIcon${density}`],\n 'd-flex ai-center'\n )}\n >\n {actionIcon || <ChevronRightIcon size={24} />}\n </div>\n )}\n </div>\n </div>\n\n {children && <div className={classNames?.children}>{children}</div>}\n </div>\n </Tag>\n );\n};\n\nexport { Card };\n"],"names":["classNames","_jsx","classNamesUtil","_jsxs"],"mappings":";;;;;;;;;;;;AAMA,IAAM,aAAa,GAAG,SAAkB,CAAA;IAoClC,IAAI,GAAG,UAA4C,EAiB1C;;IAhBb,IAAA,EAAE,QAAA,EACF,QAAQ,cAAA,EACRA,YAAU,gBAAA,EACV,eAAoB,EAApB,OAAO,mBAAG,UAAU,KAAA,EACpB,WAAW,iBAAA,EACX,0BAA4B,EAA5B,kBAAkB,mBAAG,OAAO,KAAA,EAC5B,kBAAiB,EAAjB,UAAU,mBAAG,IAAI,KAAA,EACjB,IAAI,UAAA,EACJ,KAAK,WAAA,EACL,OAAO,aAAA,EACP,UAAU,gBAAA,EACV,KAAK,WAAA,EACL,oBAAsB,EAAtB,YAAY,mBAAG,OAAO,KAAA,EACtB,cAAc,oBAAA,EACd,yBAA4B,EAA5B,iBAAiB,mBAAG,QAAQ,KAAA,EACzB,IAAI,cAhBgD,wMAiBxD,CADQ;IAEP,IAAM,cAAc,GAAG,OAAO,UAAU,KAAK,WAAW,IAAI,CAAC,UAAU,CAAC;IACxE,IAAM,mBAAmB,GAAG,OAAO,KAAI,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,CAAA,IAAI,IAAI,CAAC,EAAE,CAAC;IAC7D,IAAM,cAAc,GAAG,OAAO,GAAG,QAAQ,GAAG,aAAa,CAAC;IAC1D,IAAM,GAAG,GAAG,EAAE,IAAI,cAAc,CAAC;IAEjC,QACEC,IAAC,GAAG,aACF,SAAS,EAAEC,UAAc,CACvBF,YAAU,aAAVA,YAAU,uBAAVA,YAAU,CAAE,aAAa,EACzB,wBAAwB;gBAEtB,WAAW,EAAE,mBAAmB;;YAChC,GAAC,MAAM,CAAC,MAAM,IAAG,mBAAmB;gBAEvC,IACG,OAAO,IAAI;QACb,OAAO,SAAA;QACP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SAAS,EAAEC,UAAc,CACvB,MAAM,CAAC,WAAW,EAClBF,YAAU,aAAVA,YAAU,uBAAVA,YAAU,CAAE,WAAW,EACvB,kBAAkB,KAAK,OAAO,GAAG,YAAY,GAAG,KAAK,CACtD,YAEA,WAAW,GACR,CACP,IACG,EAEL,CAAC,cAAc,KAAK,mBAAmB,IAAI,CAAC,cAAc,CAAC,MAC1DC,aACE,SAAS,EAAEC,UAAc,CACvB,MAAM,CAAC,UAAU,EACjBF,YAAU,aAAVA,YAAU,uBAAVA,YAAU,CAAE,UAAU,EACtB,MAAM,CAAC,oBAAa,OAAO,CAAE,CAAC,EAC9B,kBAAkB,CACnB,YAEA,UAAU,IAAIC,IAAC,gBAAgB,IAAC,IAAI,EAAE,EAAE,GAAI,GACzC,CACP,IACG,IACF,EAEL,QAAQ,IAAIA,aAAK,SAAS,EAAED,YAAU,aAAVA,YAAU,uBAAVA,YAAU,CAAE,QAAQ,YAAG,QAAQ,GAAO,IAC/D,IACF,EACN;AACJ;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../../src/lib/components/cards/card/index.tsx"],"sourcesContent":["import { ComponentProps, ElementType, ReactNode } from 'react';\nimport classNamesUtil from 'classnames';\nimport { ChevronRightIcon } from '../../icon';\n\nimport styles from './style.module.scss';\n\nconst cardDefaultAs = 'section' as const\ntype CardDefaultAsType = typeof cardDefaultAs;\ntype DensityType = 'balanced' | 'compact' | 'spacious';\ntype TitleVariantType = 'small' | 'medium' | 'large';\ntype VerticalAlignmentType = 'top' | 'center' | 'bottom';\ntype CardVariant = 'default' | 'transparent' | 'outline' | 'secondary' | 'primary';\n\ntype CardOwnProps<E extends ElementType = CardDefaultAsType> = {\n as?: E;\n children?: ReactNode;\n classNames?: {\n buttonWrapper?: string;\n wrapper?: string\n contentWrapper?: string;\n label?: string;\n title?: string;\n description?: string;\n children?: string;\n icon?: string;\n actionIcon?: string;\n };\n density?: DensityType;\n dropShadow?: boolean;\n icon?: ReactNode;\n title?: ReactNode;\n titleVariant?: TitleVariantType;\n description?: ReactNode;\n descriptionVariant?: 'small' | 'large';\n label?: ReactNode;\n onClick?: () => void;\n actionIcon?: ReactNode;\n showActionIcon?: boolean;\n verticalAlignment?: VerticalAlignmentType;\n variant?: CardVariant\n} \n\nexport type CardProps<E extends ElementType = CardDefaultAsType> = CardOwnProps<E> &\n Omit<ComponentProps<E>, keyof CardOwnProps<E>>\n\nconst Card = <E extends ElementType = CardDefaultAsType>({\n as,\n children,\n classNames,\n density = 'balanced',\n description,\n descriptionVariant = 'large',\n dropShadow = true,\n icon,\n label,\n onClick,\n actionIcon,\n title,\n titleVariant = 'large',\n showActionIcon,\n verticalAlignment = 'center',\n variant = 'default',\n ...rest\n}: CardProps<E>) => {\n const hideActionIcon = typeof actionIcon !== 'undefined' && !actionIcon;\n const propsWithActionIcon = onClick || rest?.href || rest.to; \n const cardDefaultTag = onClick ? 'button' : cardDefaultAs;\n const Tag = as || cardDefaultTag;\n \n return (\n <Tag\n className={classNamesUtil(\n classNames?.buttonWrapper,\n 'd-flex w100 ai-stretch',\n {\n 'c-pointer': propsWithActionIcon,\n [styles.button]: propsWithActionIcon\n },\n )}\n {...onClick && { \n onClick, \n type: \"button\"\n }}\n {...rest}\n >\n <div\n className={classNamesUtil(\n 'd-flex fd-column jc-center w100 ta-left br8',\n { 'bs-sm': dropShadow && variant === 'default' },\n {\n compact: 'p16',\n balanced: 'p24',\n spacious: 'p32',\n }[density as DensityType],\n {\n top: 'jc-start',\n center: 'jc-center',\n bottom: 'jc-end',\n }[verticalAlignment as VerticalAlignmentType],\n styles?.wrapper,\n styles?.[`wrapper--${variant}`],\n classNames?.wrapper\n )}\n >\n <div className=\"d-flex w100\">\n {icon && (\n <div\n className={classNamesUtil(\n `d-flex`,\n styles.icon,\n styles[`icon${density}`],\n classNames?.icon, \n {\n top: 'ai-start',\n center: 'ai-center',\n bottom: 'ai-end',\n }[verticalAlignment as VerticalAlignmentType],\n )}\n >\n {icon}\n </div>\n )}\n\n <div className=\"d-flex jc-between w100\">\n <div\n className={classNamesUtil(\n classNames?.contentWrapper || '',\n \"d-flex jc-center gap8 fd-column tc-neutral-900 w100\"\n )}\n >\n {label && (\n <h4 className={classNamesUtil('p-p--small', classNames?.label)}>\n {label}\n </h4>\n )}\n\n {title && (\n <h3\n className={classNamesUtil(\n classNames?.title,\n {\n large: 'p-h3',\n medium: 'p-h4',\n small: 'p-p',\n }[titleVariant as TitleVariantType]\n )}\n >\n {title}\n </h3>\n )}\n\n {description && (\n <div\n className={classNamesUtil(\n styles.description,\n classNames?.description,\n descriptionVariant === 'small' ? 'p-p--small' : 'p-p',\n )}\n >\n {description}\n </div>\n )}\n </div>\n\n {(showActionIcon || (propsWithActionIcon && !hideActionIcon)) && (\n <div\n className={classNamesUtil(\n styles.actionIcon,\n classNames?.actionIcon,\n styles[`actionIcon${density}`],\n 'd-flex ai-center'\n )}\n >\n {actionIcon || <ChevronRightIcon size={24} />}\n </div>\n )}\n </div>\n </div>\n\n {children && <div className={classNames?.children}>{children}</div>}\n </div>\n </Tag>\n );\n};\n\nexport { Card };\n"],"names":["classNames","_jsx","classNamesUtil","_jsxs"],"mappings":";;;;;;;;;;;;AAMA,IAAM,aAAa,GAAG,SAAkB,CAAA;IAuClC,IAAI,GAAG,UAA4C,EAkB1C;;IAjBb,IAAA,EAAE,QAAA,EACF,QAAQ,cAAA,EACRA,YAAU,gBAAA,EACV,eAAoB,EAApB,OAAO,mBAAG,UAAU,KAAA,EACpB,WAAW,iBAAA,EACX,0BAA4B,EAA5B,kBAAkB,mBAAG,OAAO,KAAA,EAC5B,kBAAiB,EAAjB,UAAU,mBAAG,IAAI,KAAA,EACjB,IAAI,UAAA,EACJ,KAAK,WAAA,EACL,OAAO,aAAA,EACP,UAAU,gBAAA,EACV,KAAK,WAAA,EACL,oBAAsB,EAAtB,YAAY,mBAAG,OAAO,KAAA,EACtB,cAAc,oBAAA,EACd,yBAA4B,EAA5B,iBAAiB,mBAAG,QAAQ,KAAA,EAC5B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AC,gBAAgB,IAAC,IAAI,EAAE,EAAE,GAAI,GACzC,CACP,IACG,IACF,EAEL,QAAQ,IAAIA,aAAK,SAAS,EAAED,YAAU,aAAVA,YAAU,uBAAVA,YAAU,CAAE,QAAQ,YAAG,QAAQ,GAAO,IAC/D,IACF,EACN;AACJ;;;;"}
@@ -3,8 +3,9 @@ import { Card } from './index.js';
3
3
  import { i as illustrations } from '../../../index-29e6f39e.js';
4
4
  import { Button } from '../../button/index.js';
5
5
  import { Badge } from '../../badge/index.js';
6
+ import BasketballSportsIcon from '../../icon/icons/BasketballSports.js';
6
7
  import CheckIcon from '../../icon/icons/Check.js';
7
- import Info from '../../icon/icons/Info.js';
8
+ import InfoIcon from '../../icon/icons/Info.js';
8
9
  import MehIcon from '../../icon/icons/Meh.js';
9
10
  import PlusCircleIcon from '../../icon/icons/PlusCircle.js';
10
11
  import XIcon from '../../icon/icons/X.js';
@@ -95,8 +96,12 @@ var CardStory = function (_a) {
95
96
  var as = _a.as, actionIcon = _a.actionIcon, showActionIcon = _a.showActionIcon, children = _a.children, classNames = _a.classNames, density = _a.density, description = _a.description, descriptionVariant = _a.descriptionVariant, dropShadow = _a.dropShadow, icon = _a.icon, label = _a.label, onClick = _a.onClick, title = _a.title, titleVariant = _a.titleVariant, verticalAlignment = _a.verticalAlignment;
96
97
  return (jsx("div", { className: 'd-flex p24 bg-neutral-100', children: jsx(Card, { as: as, classNames: classNames, description: description, descriptionVariant: descriptionVariant, density: density, dropShadow: dropShadow, icon: icon, label: label, title: title, titleVariant: titleVariant, onClick: onClick, actionIcon: actionIcon, showActionIcon: showActionIcon, verticalAlignment: verticalAlignment, children: children }) }));
97
98
  };
99
+ var CardVariants = function (_a) {
100
+ var description = _a.description, onClick = _a.onClick, title = _a.title;
101
+ return (jsxs("div", { className: 'd-flex fd-column gap24 p24 bg-neutral-50', children: [jsxs("div", { children: [jsx("h4", { className: 'p-h4 mb16', children: "default" }), jsx(Card, { description: description, icon: jsx(BasketballSportsIcon, { size: 24 }), onClick: onClick, title: title, variant: 'default' })] }), jsxs("div", { children: [jsx("h4", { className: 'p-h4 mb16', children: "transparent" }), jsx(Card, { description: description, icon: jsx(BasketballSportsIcon, { size: 24 }), onClick: onClick, title: title, variant: 'transparent' })] }), jsxs("div", { children: [jsx("h4", { className: 'p-h4 mb16', children: "outline" }), jsx(Card, { description: description, icon: jsx(BasketballSportsIcon, { size: 24 }), onClick: onClick, title: title, variant: 'outline' })] }), jsxs("div", { children: [jsx("h4", { className: 'p-h4 mb16', children: "secondary" }), jsx(Card, { description: description, icon: jsx(BasketballSportsIcon, { size: 24 }), onClick: onClick, title: title, variant: 'secondary' })] }), jsxs("div", { children: [jsx("h4", { className: 'p-h4 mb16', children: "primary" }), jsx(Card, { description: description, icon: jsx(BasketballSportsIcon, { size: 24 }), onClick: onClick, title: title, variant: 'primary' })] })] }));
102
+ };
98
103
  CardStory.storyName = "Card";
99
- var CardAsOtherComponents = function () { return (jsxs("div", { className: 'd-flex fd-column gap16 p24 bg-neutral-100', children: [jsx("h3", { className: 'p-h3', children: "As an anchor:" }), jsx(Card, { as: "a", href: "https://feather-insurance.com", target: "_blank", title: "Card with an a tag", density: 'compact' }), jsx("h3", { className: 'p-h3', children: "As a nav:" }), jsx(Card, { as: "nav", title: "Card with a nav tag", density: 'compact' }), jsxs("p", { className: 'p-p p-p--small fw-bold d-flex ai-center gap8 mt32', children: [jsx(Info, {}), "Inspect elements to see the different HTML tags being rendered."] })] })); };
104
+ var CardAsOtherComponents = function () { return (jsxs("div", { className: 'd-flex fd-column gap16 p24 bg-neutral-100', children: [jsx("h3", { className: 'p-h3', children: "As an anchor:" }), jsx(Card, { as: "a", href: "https://feather-insurance.com", target: "_blank", title: "Card with an a tag", density: 'compact' }), jsx("h3", { className: 'p-h3', children: "As a nav:" }), jsx(Card, { as: "nav", title: "Card with a nav tag", density: 'compact' }), jsxs("p", { className: 'p-p p-p--small fw-bold d-flex ai-center gap8 mt32', children: [jsx(InfoIcon, {}), "Inspect elements to see the different HTML tags being rendered."] })] })); };
100
105
  var CardDensities = function () { return (jsxs("div", { className: 'd-flex fd-column gap16 p24 bg-neutral-100', children: [jsx(Card, { title: 'Card density: Compact', density: 'compact' }), jsx(Card, { title: 'Card density: Balanced', density: 'balanced' }), jsx(Card, { title: 'Card density: Spacious', density: 'spacious' })] })); };
101
106
  var CardsWithIcons = function (_a) {
102
107
  var title = _a.title;
@@ -117,5 +122,5 @@ var CardOverridesStyles = function (_a) {
117
122
  var CardsWithinCardsAndComplexLayout = function () { return (jsx("div", { className: 'd-flex p24 bg-neutral-100', children: jsxs(Card, { label: (jsx(Badge, { size: 'small', variant: 'success', children: "Active" })), title: (jsxs("div", { className: 'd-flex jc-between ai-center w100', children: ["Coverage overview", jsx(Button, { as: "a", href: "#", onClick: console.log, children: "Full covxerage details" })] })), children: [jsxs("div", { className: 'd-flex gap16 mt16', children: [jsx(Card, { description: "Lost keys", classNames: { wrapper: 'bg-neutral-300' }, icon: jsx(CheckIcon, { color: 'purple-600' }), density: 'compact' }), jsx(Card, { description: "Broken glass", classNames: { wrapper: 'bg-neutral-300' }, icon: jsx(XIcon, { color: 'purple-600' }), density: 'compact' })] }), jsxs("div", { className: 'd-flex gap16 mt16', children: [jsx(Card, { description: "Damage to property", classNames: { wrapper: 'bg-neutral-300' }, icon: jsx(CheckIcon, { color: 'purple-600' }), density: 'compact' }), jsx(Card, { description: "Drones", classNames: { wrapper: 'bg-neutral-300' }, icon: jsx(XIcon, { color: 'purple-600' }), density: 'compact' })] })] }) })); };
118
123
 
119
124
  export default story;
120
- export { CardAsOtherComponents, CardDensities, CardOverridesStyles, CardStory, CardWithOnClickAction, CardsWithIcons, CardsWithinCardsAndComplexLayout };
125
+ export { CardAsOtherComponents, CardDensities, CardOverridesStyles, CardStory, CardVariants, CardWithOnClickAction, CardsWithIcons, CardsWithinCardsAndComplexLayout };
121
126
  //# sourceMappingURL=index.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.stories.js","sources":["../../../../../../src/lib/components/cards/card/index.stories.tsx"],"sourcesContent":["import { Card, CardProps } from '.';\nimport { illustrations } from '../../../util/images';\nimport { Button } from '../../button';\nimport { Badge } from '../../badge';\nimport { CheckIcon, InfoIcon, MehIcon, PlusCircleIcon, XIcon } from '../../icon';\n\nconst story = {\n title: 'JSX/Cards/Card',\n component: Card,\n argTypes: {\n as: {\n control: 'text',\n description: 'Allow wrapper element type to be custom defined'\n },\n density: {\n description: 'Spacing around the card'\n },\n label: {\n description: 'Content to be rendered as label'\n },\n title: {\n description: 'Content to be rendered as title'\n },\n titleVariant: {\n description: 'Variant that allows changing title sizing styles.'\n },\n description: {\n description: 'Content to be rendered as description'\n },\n descriptionVariant: {\n description: 'Variant that allows changing description sizing styles.'\n },\n icon: {\n description: 'ReactNode to be rendered on the left side of the card',\n },\n children: {\n control: 'text',\n description: 'Content that is displayed inside the card under the pre-defined props',\n },\n onClick: {\n action: true,\n table: {\n category: \"Callbacks\",\n },\n description: 'On click action to be triggered on card click.',\n },\n dropShadow: {\n description: 'Wether to display card with drop shadow styles or not.',\n },\n actionIcon: {\n control: 'text',\n description: 'ReactNode to be rendered on the right side of the card when there is an onClick action. By default it renders the ChevronRightIcon.',\n },\n showActionIcon: {\n description: 'Property that always displays action icon even if no onClick is set.',\n },\n verticalAlignment: {\n description: 'Vertical alignment of the card content',\n control: { type: 'select' },\n },\n },\n args: {\n density: 'balanced',\n description: 'Believe you’re a great fit but can’t find a position listed for your skill set? We’d love to hear from you!',\n descriptionVariant: 'large',\n label: 'Label',\n title: 'Honest, simple insurance',\n titleVariant: 'large',\n icon: 'ABC',\n children: '',\n classNames: {\n wrapper: '',\n label: '',\n title: '',\n description: '',\n children: '',\n icon: ''\n },\n dropShadow: true,\n verticalAlignment: 'center',\n }\n};\n\nexport const CardStory = ({ \n as,\n actionIcon,\n showActionIcon,\n children,\n classNames,\n density,\n description,\n descriptionVariant,\n dropShadow,\n icon,\n label,\n onClick,\n title,\n titleVariant,\n verticalAlignment,\n}: CardProps) => (\n <div className='d-flex p24 bg-neutral-100'>\n <Card\n as={as}\n classNames={classNames}\n description={description}\n descriptionVariant={descriptionVariant}\n density={density}\n dropShadow={dropShadow}\n icon={icon}\n label={label}\n title={title}\n titleVariant={titleVariant}\n onClick={onClick}\n actionIcon={actionIcon}\n showActionIcon={showActionIcon}\n verticalAlignment={verticalAlignment}\n >\n {children}\n </Card>\n </div>\n);\n\nCardStory.storyName = \"Card\";\n\nexport const CardAsOtherComponents = () => (\n <div className='d-flex fd-column gap16 p24 bg-neutral-100'>\n \n <h3 className='p-h3'>As an anchor:</h3>\n <Card\n as=\"a\"\n href=\"https://feather-insurance.com\"\n target=\"_blank\"\n title=\"Card with an a tag\"\n density='compact'\n />\n\n <h3 className='p-h3'>As a nav:</h3>\n <Card\n as=\"nav\"\n title=\"Card with a nav tag\"\n density='compact'\n />\n\n <p className='p-p p-p--small fw-bold d-flex ai-center gap8 mt32'>\n <InfoIcon />\n Inspect elements to see the different HTML tags being rendered.\n </p>\n </div>\n);\n\nexport const CardDensities = () => (\n <div className='d-flex fd-column gap16 p24 bg-neutral-100'>\n <Card\n title={'Card density: Compact'}\n density='compact'\n />\n <Card\n title={'Card density: Balanced'}\n density='balanced'\n />\n <Card\n title={'Card density: Spacious'}\n density='spacious'\n />\n </div>\n);\n\nexport const CardsWithIcons = ({ title }: CardProps) => (\n <div className='d-flex gap16 p24 bg-neutral-100'>\n <Card\n icon={\n <img\n alt=\"\"\n src={illustrations.aids}\n width={24}\n />\n }\n title={title}\n />\n <Card\n icon={<MehIcon size={24} noMargin />}\n title={title}\n />\n </div>\n);\n\nexport const CardWithOnClickAction = ({ \n children,\n title,\n}: CardProps) => (\n <div className='d-flex p24 bg-neutral-100'>\n <Card\n icon={\n <img\n alt=\"\"\n src={illustrations.aids}\n width={24}\n />\n }\n title={title}\n titleVariant={'medium'}\n onClick={() => {}}\n >\n {children}\n </Card>\n </div>\n);\n\nexport const CardOverridesStyles = ({ \n children,\n label,\n title,\n}: CardProps) => (\n <div className='d-flex p24 bg-neutral-100'>\n <Card\n label={label}\n title={title}\n titleVariant={'medium'}\n icon={<PlusCircleIcon color=\"neutral-50\" size={32} />}\n classNames={{ \n wrapper: 'bg-neutral-800',\n label: 'tc-white',\n title: 'tc-white'\n }}\n >\n {children}\n </Card>\n </div>\n);\n\nexport const CardsWithinCardsAndComplexLayout = () => (\n <div className='d-flex p24 bg-neutral-100'>\n <Card\n label={(\n <Badge size='small' variant='success'>\n Active\n </Badge>\n )}\n title={(\n <div className='d-flex jc-between ai-center w100'>\n Coverage overview\n\n <Button\n as=\"a\"\n href=\"#\"\n onClick={console.log}\n >\n Full covxerage details\n </Button>\n </div>\n )}\n >\n <div className='d-flex gap16 mt16'>\n <Card\n description=\"Lost keys\"\n classNames={{ wrapper: 'bg-neutral-300' }}\n icon={<CheckIcon color={'purple-600'} />}\n density='compact'\n />\n <Card\n description=\"Broken glass\"\n classNames={{ wrapper: 'bg-neutral-300' }}\n icon={<XIcon color={'purple-600'} />}\n density='compact'\n />\n </div>\n \n <div className='d-flex gap16 mt16'>\n <Card\n description=\"Damage to property\"\n classNames={{ wrapper: 'bg-neutral-300' }}\n icon={<CheckIcon color={'purple-600'} />}\n density='compact'\n />\n <Card\n description=\"Drones\"\n classNames={{ wrapper: 'bg-neutral-300' }}\n icon={<XIcon color={'purple-600'} />}\n density='compact'\n />\n </div>\n </Card>\n </div>\n);\n\nexport default story;\n"],"names":["_jsx","_jsxs","InfoIcon"],"mappings":";;;;;;;;;;;;;;;;;IAMM,KAAK,GAAG;IACZ,KAAK,EAAE,gBAAgB;IACvB,SAAS,EAAE,IAAI;IACf,QAAQ,EAAE;QACR,EAAE,EAAE;YACF,OAAO,EAAE,MAAM;YACf,WAAW,EAAE,iDAAiD;SAC/D;QACD,OAAO,EAAE;YACP,WAAW,EAAE,yBAAyB;SACvC;QACD,KAAK,EAAE;YACL,WAAW,EAAE,iCAAiC;SAC/C;QACD,KAAK,EAAE;YACL,WAAW,EAA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,IAAC,KAAK,EAAE,YAAY,GAAI,EACpC,OAAO,EAAC,SAAS,GACjB,IACE,IACD,GACH;;;;;"}
1
+ {"version":3,"file":"index.stories.js","sources":["../../../../../../src/lib/components/cards/card/index.stories.tsx"],"sourcesContent":["import { Card, CardProps } from '.';\nimport { illustrations } from '../../../util/images';\nimport { Button } from '../../button';\nimport { Badge } from '../../badge';\nimport { BasketballSportsIcon, CheckIcon, InfoIcon, MehIcon, PlusCircleIcon, XIcon } from '../../icon';\n\nconst story = {\n title: 'JSX/Cards/Card',\n component: Card,\n argTypes: {\n as: {\n control: 'text',\n description: 'Allow wrapper element type to be custom defined'\n },\n density: {\n description: 'Spacing around the card'\n },\n label: {\n description: 'Content to be rendered as label'\n },\n title: {\n description: 'Content to be rendered as title'\n },\n titleVariant: {\n description: 'Variant that allows changing title sizing styles.'\n },\n description: {\n description: 'Content to be rendered as description'\n },\n descriptionVariant: {\n description: 'Variant that allows changing description sizing styles.'\n },\n icon: {\n description: 'ReactNode to be rendered on the left side of the card',\n },\n children: {\n control: 'text',\n description: 'Content that is displayed inside the card under the pre-defined props',\n },\n onClick: {\n action: true,\n table: {\n category: \"Callbacks\",\n },\n description: 'On click action to be triggered on card click.',\n },\n dropShadow: {\n description: 'Wether to display card with drop shadow styles or not.',\n },\n actionIcon: {\n control: 'text',\n description: 'ReactNode to be rendered on the right side of the card when there is an onClick action. By default it renders the ChevronRightIcon.',\n },\n showActionIcon: {\n description: 'Property that always displays action icon even if no onClick is set.',\n },\n verticalAlignment: {\n description: 'Vertical alignment of the card content',\n control: { type: 'select' },\n },\n },\n args: {\n density: 'balanced',\n description: 'Believe you’re a great fit but can’t find a position listed for your skill set? We’d love to hear from you!',\n descriptionVariant: 'large',\n label: 'Label',\n title: 'Honest, simple insurance',\n titleVariant: 'large',\n icon: 'ABC',\n children: '',\n classNames: {\n wrapper: '',\n label: '',\n title: '',\n description: '',\n children: '',\n icon: ''\n },\n dropShadow: true,\n verticalAlignment: 'center',\n }\n};\n\nexport const CardStory = ({ \n as,\n actionIcon,\n showActionIcon,\n children,\n classNames,\n density,\n description,\n descriptionVariant,\n dropShadow,\n icon,\n label,\n onClick,\n title,\n titleVariant,\n verticalAlignment,\n}: CardProps) => (\n <div className='d-flex p24 bg-neutral-100'>\n <Card\n as={as}\n classNames={classNames}\n description={description}\n descriptionVariant={descriptionVariant}\n density={density}\n dropShadow={dropShadow}\n icon={icon}\n label={label}\n title={title}\n titleVariant={titleVariant}\n onClick={onClick}\n actionIcon={actionIcon}\n showActionIcon={showActionIcon}\n verticalAlignment={verticalAlignment}\n >\n {children}\n </Card>\n </div>\n);\n\nexport const CardVariants = ({ \n description,\n onClick,\n title,\n}: CardProps) => (\n <div className='d-flex fd-column gap24 p24 bg-neutral-50'>\n <div>\n <h4 className='p-h4 mb16'>default</h4>\n <Card\n description={description}\n icon={<BasketballSportsIcon size={24} />}\n onClick={onClick}\n title={title}\n variant='default'\n />\n </div>\n <div>\n <h4 className='p-h4 mb16'>transparent</h4>\n <Card\n description={description}\n icon={<BasketballSportsIcon size={24} />}\n onClick={onClick}\n title={title}\n variant='transparent'\n />\n </div>\n <div>\n <h4 className='p-h4 mb16'>outline</h4>\n <Card\n description={description}\n icon={<BasketballSportsIcon size={24} />}\n onClick={onClick}\n title={title}\n variant='outline'\n />\n </div>\n <div>\n <h4 className='p-h4 mb16'>secondary</h4>\n <Card\n description={description}\n icon={<BasketballSportsIcon size={24} />}\n onClick={onClick}\n title={title}\n variant='secondary'\n />\n </div>\n <div>\n <h4 className='p-h4 mb16'>primary</h4>\n <Card\n description={description}\n icon={<BasketballSportsIcon size={24} />}\n onClick={onClick}\n title={title}\n variant='primary'\n />\n </div>\n </div>\n);\n\nCardStory.storyName = \"Card\";\n\nexport const CardAsOtherComponents = () => (\n <div className='d-flex fd-column gap16 p24 bg-neutral-100'>\n \n <h3 className='p-h3'>As an anchor:</h3>\n <Card\n as=\"a\"\n href=\"https://feather-insurance.com\"\n target=\"_blank\"\n title=\"Card with an a tag\"\n density='compact'\n />\n\n <h3 className='p-h3'>As a nav:</h3>\n <Card\n as=\"nav\"\n title=\"Card with a nav tag\"\n density='compact'\n />\n\n <p className='p-p p-p--small fw-bold d-flex ai-center gap8 mt32'>\n <InfoIcon />\n Inspect elements to see the different HTML tags being rendered.\n </p>\n </div>\n);\n\nexport const CardDensities = () => (\n <div className='d-flex fd-column gap16 p24 bg-neutral-100'>\n <Card\n title={'Card density: Compact'}\n density='compact'\n />\n <Card\n title={'Card density: Balanced'}\n density='balanced'\n />\n <Card\n title={'Card density: Spacious'}\n density='spacious'\n />\n </div>\n);\n\nexport const CardsWithIcons = ({ title }: CardProps) => (\n <div className='d-flex gap16 p24 bg-neutral-100'>\n <Card\n icon={\n <img\n alt=\"\"\n src={illustrations.aids}\n width={24}\n />\n }\n title={title}\n />\n <Card\n icon={<MehIcon size={24} noMargin />}\n title={title}\n />\n </div>\n);\n\nexport const CardWithOnClickAction = ({ \n children,\n title,\n}: CardProps) => (\n <div className='d-flex p24 bg-neutral-100'>\n <Card\n icon={\n <img\n alt=\"\"\n src={illustrations.aids}\n width={24}\n />\n }\n title={title}\n titleVariant={'medium'}\n onClick={() => {}}\n >\n {children}\n </Card>\n </div>\n);\n\nexport const CardOverridesStyles = ({ \n children,\n label,\n title,\n}: CardProps) => (\n <div className='d-flex p24 bg-neutral-100'>\n <Card\n label={label}\n title={title}\n titleVariant={'medium'}\n icon={<PlusCircleIcon color=\"neutral-50\" size={32} />}\n classNames={{ \n wrapper: 'bg-neutral-800',\n label: 'tc-white',\n title: 'tc-white'\n }}\n >\n {children}\n </Card>\n </div>\n);\n\nexport const CardsWithinCardsAndComplexLayout = () => (\n <div className='d-flex p24 bg-neutral-100'>\n <Card\n label={(\n <Badge size='small' variant='success'>\n Active\n </Badge>\n )}\n title={(\n <div className='d-flex jc-between ai-center w100'>\n Coverage overview\n\n <Button\n as=\"a\"\n href=\"#\"\n onClick={console.log}\n >\n Full covxerage details\n </Button>\n </div>\n )}\n >\n <div className='d-flex gap16 mt16'>\n <Card\n description=\"Lost keys\"\n classNames={{ wrapper: 'bg-neutral-300' }}\n icon={<CheckIcon color={'purple-600'} />}\n density='compact'\n />\n <Card\n description=\"Broken glass\"\n classNames={{ wrapper: 'bg-neutral-300' }}\n icon={<XIcon color={'purple-600'} />}\n density='compact'\n />\n </div>\n \n <div className='d-flex gap16 mt16'>\n <Card\n description=\"Damage to property\"\n classNames={{ wrapper: 'bg-neutral-300' }}\n icon={<CheckIcon color={'purple-600'} />}\n density='compact'\n />\n <Card\n description=\"Drones\"\n classNames={{ wrapper: 'bg-neutral-300' }}\n icon={<XIcon color={'purple-600'} />}\n density='compact'\n />\n </div>\n </Card>\n </div>\n);\n\nexport default story;\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;;;;;;;;;;IAMM,KAAK,GAAG;IACZ,KAAK,EAAE,gBAAgB;IACvB,SAAS,EAAE,IAAI;IACf,QAAQ,EAAE;QACR,EAAE,EAAE;YACF,OAAO,EAAE,MAAM;YACf,WAAW,EAAE,iDAAiD;SAC/D;QACD,OAAO,EAAE;YACP,WAAW,EAAE,yBAAyB;SACvC;QACD,KAAK,EAAE;YACL,WAAW,EAAE,iCAAiC;SAC/C;QACD,KAAK,EAAE;YACL,WAAW,EAAE,iCAAiC;SAC/C;QACD,YAAY,EAAE;YACZ,WAAW,EAAE,mDAAmD;SACjE;QACD,WAAW,EAAE;YACX,WAAW,EAAE,uCAAuC;SACrD;QACD,kBAAkB,EAAE;YAClB,WAAW,EAAE,yDAAyD;SACvE;QACD,IAAI,EAAE;YACJ,WAAW,EAAE,uDAAuD;SACrE;QACD,QAAQ,EAAE;YACR,OAAO,EAAE,MAAM;YACf,WAAW,EAAE,uEAAuE;SACrF;QACD,OAAO,EAAE;YACP,MAAM,EAAE,IAAI;YACZ,KAAK,EAAE;gBACL,QAAQ,EAAE,WAAW;aACtB;YACD,WAAW,EAAE,gDAAgD;SAC9D;QACD,UAAU,EAAE;YACV,WAAW,EAAE,wDA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AAC,MAAM,IACP,EAAE,EAAC,GAAG,EACN,IAAI,EAAC,GAAG,EACN,OAAO,EAAE,OAAO,CAAC,GAAG,uCAGb,IACL,CACP,aAEDC,cAAK,SAAS,EAAC,mBAAmB,aAChCD,IAAC,IAAI,IACH,WAAW,EAAC,WAAW,EACvB,UAAU,EAAE,EAAE,OAAO,EAAE,gBAAgB,EAAE,EACzC,IAAI,EAAEA,IAAC,SAAS,IAAC,KAAK,EAAE,YAAY,GAAI,EACxC,OAAO,EAAC,SAAS,GACjB,EACFA,IAAC,IAAI,IACH,WAAW,EAAC,cAAc,EAC1B,UAAU,EAAE,EAAE,OAAO,EAAE,gBAAgB,EAAE,EACzC,IAAI,EAAEA,IAAC,KAAK,IAAC,KAAK,EAAE,YAAY,GAAI,EACpC,OAAO,EAAC,SAAS,GACjB,IACE,EAENC,cAAK,SAAS,EAAC,mBAAmB,aAChCD,IAAC,IAAI,IACH,WAAW,EAAC,oBAAoB,EAChC,UAAU,EAAE,EAAE,OAAO,EAAE,gBAAgB,EAAE,EACzC,IAAI,EAAEA,IAAC,SAAS,IAAC,KAAK,EAAE,YAAY,GAAI,EACxC,OAAO,EAAC,SAAS,GACjB,EACFA,IAAC,IAAI,IACH,WAAW,EAAC,QAAQ,EACpB,UAAU,EAAE,EAAE,OAAO,EAAE,gBAAgB,EAAE,EACzC,IAAI,EAAEA,IAAC,KAAK,IAAC,KAAK,EAAE,YAAY,GAAI,EACpC,OAAO,EAAC,SAAS,GACjB,IACE,IACD,GACH;;;;;"}
@@ -7,8 +7,8 @@ import { c as classNames } from '../../../index-6ea95111.js';
7
7
  import 'react';
8
8
  import '../../icon/IconWrapper/IconWrapper.js';
9
9
 
10
- var css_248z = ".style-module_containerDisabled__2j9_N {\n pointer-events: none;\n opacity: 0.25;\n}";
11
- var styles = {"containerDisabled":"style-module_containerDisabled__2j9_N"};
10
+ var css_248z = ".style-module_containerDisabled__2j9_N {\n pointer-events: none;\n opacity: 0.25;\n}\n\n.style-module_contentWrapper__EkTN9 {\n gap: 4px !important;\n}";
11
+ var styles = {"containerDisabled":"style-module_containerDisabled__2j9_N","contentWrapper":"style-module_contentWrapper__EkTN9"};
12
12
  styleInject(css_248z);
13
13
 
14
14
  var CardButton = function (_a) {
@@ -16,8 +16,10 @@ var CardButton = function (_a) {
16
16
  var title = _a.title, description = _a.description, _c = _a.disabled, disabled = _c === void 0 ? false : _c, className = _a.className, href = _a.href;
17
17
  return (jsx(Card, __assign({ as: href ? 'a' : 'button', classNames: {
18
18
  buttonWrapper: classNames('c-pointer ta-left w100', className, (_b = {}, _b[styles.containerDisabled] = disabled, _b)),
19
- description: 'tc-purple-600 p-p',
20
- }, density: 'compact', label: title, description: typeof description === 'string' ? description : null, actionIcon: jsx(ChevronRightIcon, { size: 20, color: 'purple-600', className: styles.chevronRight }), showActionIcon: true }, href ? { href: href } : {}, { children: typeof description !== 'string' ? description : null })));
19
+ label: 'tc-neutral-700',
20
+ description: 'tc-neutral-900 p-p',
21
+ contentWrapper: styles.contentWrapper
22
+ }, density: 'compact', label: title, description: typeof description === 'string' ? description : null, actionIcon: jsx(ChevronRightIcon, { size: 20, color: 'neutral-900', className: styles.chevronRight }), showActionIcon: true }, href ? { href: href } : {}, { children: typeof description !== 'string' ? description : null })));
21
23
  };
22
24
 
23
25
  export { CardButton };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../../src/lib/components/cards/cardButton/index.tsx"],"sourcesContent":["import { ReactNode } from 'react';\n\nimport { ChevronRightIcon } from '../../icon/icons';\n\nimport styles from './style.module.scss';\nimport { Card, CardProps } from '../card';\nimport classNames from 'classnames';\n\nexport type CardButtonProps = {\n title: string;\n description: string | ReactNode;\n disabled?: boolean;\n className?: string;\n href?: string;\n} & CardProps;\n\nexport const CardButton = ({\n title,\n description,\n disabled = false,\n className,\n href,\n}: CardButtonProps) => (\n <Card\n as={href ? 'a' : 'button'}\n classNames={{\n buttonWrapper: classNames(\n 'c-pointer ta-left w100',\n className,\n { [styles.containerDisabled]: disabled }\n ),\n description: 'tc-purple-600 p-p',\n }}\n density='compact'\n label={title}\n description={typeof description === 'string' ? description : null}\n actionIcon={\n <ChevronRightIcon\n size={20}\n color={'purple-600'}\n className={styles.chevronRight}\n />\n }\n showActionIcon\n {...href ? { href } : {}}\n >\n {typeof description !== 'string' ? description : null}\n </Card>\n);\n"],"names":["_jsx"],"mappings":";;;;;;;;;;;;;IAgBa,UAAU,GAAG,UAAC,EAMT;;QALhB,KAAK,WAAA,EACL,WAAW,iBAAA,EACX,gBAAgB,EAAhB,QAAQ,mBAAG,KAAK,KAAA,EAChB,SAAS,eAAA,EACT,IAAI,UAAA;IACiB,QACrBA,IAAC,IAAI,aACD,EAAE,EAAE,IAAI,GAAG,GAAG,GAAG,QAAQ,EACzB,UAAU,EAAE;YACV,aAAa,EAAE,UAAU,CACvB,wBAAwB,EACxB,SAAS,YACP,GAAC,MAAM,CAAC,iBAAiB,IAAG,QAAQ,MACvC;YACD,WAAW,EAAE,mBAAmB;SACjC,EACD,OAAO,EAAC,SAAS,EACjB,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,OAAO,WAAW,KAAK,QAAQ,GAAG,WAAW,GAAG,IAAI,EACjE,UAAU,EACRA,IAAC,gBAAgB,IACf,IAAI,EAAE,EAAE,EACR,KAAK,EAAE,YAAY,EACnB,SAAS,EAAE,MAAM,CAAC,YAAY,GAC9B,EAEJ,cAAc,UACV,IAAI,GAAG,EAAE,IAAI,MAAA,EAAE,GAAG,EAAE,cAEvB,OAAO,WAAW,KAAK,QAAQ,GAAG,WAAW,GAAG,IAAI,IAClD;AAzBc;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../../src/lib/components/cards/cardButton/index.tsx"],"sourcesContent":["import { ReactNode } from 'react';\n\nimport { ChevronRightIcon } from '../../icon/icons';\n\nimport styles from './style.module.scss';\nimport { Card, CardProps } from '../card';\nimport classNames from 'classnames';\n\nexport type CardButtonProps = {\n title: string;\n description: string | ReactNode;\n disabled?: boolean;\n className?: string;\n href?: string;\n} & CardProps;\n\nexport const CardButton = ({\n title,\n description,\n disabled = false,\n className,\n href,\n}: CardButtonProps) => (\n <Card\n as={href ? 'a' : 'button'}\n classNames={{\n buttonWrapper: classNames(\n 'c-pointer ta-left w100',\n className,\n { [styles.containerDisabled]: disabled }\n ),\n label: 'tc-neutral-700',\n description: 'tc-neutral-900 p-p',\n contentWrapper: styles.contentWrapper\n }}\n density='compact'\n label={title}\n description={typeof description === 'string' ? description : null}\n actionIcon={\n <ChevronRightIcon\n size={20}\n color={'neutral-900'}\n className={styles.chevronRight}\n />\n }\n showActionIcon\n {...href ? { href } : {}}\n >\n {typeof description !== 'string' ? description : null}\n </Card>\n);\n"],"names":["_jsx"],"mappings":";;;;;;;;;;;;;IAgBa,UAAU,GAAG,UAAC,EAMT;;QALhB,KAAK,WAAA,EACL,WAAW,iBAAA,EACX,gBAAgB,EAAhB,QAAQ,mBAAG,KAAK,KAAA,EAChB,SAAS,eAAA,EACT,IAAI,UAAA;IACiB,QACrBA,IAAC,IAAI,aACD,EAAE,EAAE,IAAI,GAAG,GAAG,GAAG,QAAQ,EACzB,UAAU,EAAE;YACV,aAAa,EAAE,UAAU,CACvB,wBAAwB,EACxB,SAAS,YACP,GAAC,MAAM,CAAC,iBAAiB,IAAG,QAAQ,MACvC;YACD,KAAK,EAAE,gBAAgB;YACvB,WAAW,EAAE,oBAAoB;YACjC,cAAc,EAAE,MAAM,CAAC,cAAc;SACtC,EACD,OAAO,EAAC,SAAS,EACjB,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,OAAO,WAAW,KAAK,QAAQ,GAAG,WAAW,GAAG,IAAI,EACjE,UAAU,EACRA,IAAC,gBAAgB,IACf,IAAI,EAAE,EAAE,EACR,KAAK,EAAE,aAAa,EACpB,SAAS,EAAE,MAAM,CAAC,YAAY,GAC9B,EAEJ,cAAc,UACV,IAAI,GAAG,EAAE,IAAI,MAAA,EAAE,GAAG,EAAE,cAEvB,OAAO,WAAW,KAAK,QAAQ,GAAG,WAAW,GAAG,IAAI,IAClD;AA3Bc;;;;"}
@@ -36,8 +36,8 @@ var story = {
36
36
  },
37
37
  },
38
38
  args: {
39
- title: 'Risky Sports',
40
- description: 'Mountain or rock climbing, Bouldering, Martial arts, Extreme sports, Scuba diving, Sky diving, Bungee jumping, Mountain or rock climbing, Bouldering, Martial arts,',
39
+ title: 'Label',
40
+ description: 'Honest, simple insurance',
41
41
  disabled: false,
42
42
  className: '',
43
43
  href: 'https://feather-insurance.com/',
@@ -1 +1 @@
1
- {"version":3,"file":"index.stories.js","sources":["../../../../../../src/lib/components/cards/cardButton/index.stories.tsx"],"sourcesContent":["import { CardButton, CardButtonProps } from '.';\n\nconst story = {\n title: 'JSX/Cards/CardButton',\n component: CardButton,\n argTypes: {\n title: {\n description: 'Title text that needs to be displayed',\n },\n description: {\n description: 'Description text that is displayed under title',\n },\n disabled: {\n description: 'Disabled state of the button',\n },\n className: {\n description: 'Class name for most top parent element',\n },\n onClick: {\n description: 'Function that runs on click of the button',\n action: true,\n table: {\n category: 'Callbacks',\n },\n },\n href: {\n description: 'Redirect URL on click of the button',\n },\n },\n args: {\n title: 'Risky Sports',\n description: 'Mountain or rock climbing, Bouldering, Martial arts, Extreme sports, Scuba diving, Sky diving, Bungee jumping, Mountain or rock climbing, Bouldering, Martial arts,',\n disabled: false,\n className: '',\n href: 'https://feather-insurance.com/',\n }\n};\n\nexport const CardButtonStory = ({\n title,\n description,\n disabled,\n className,\n href,\n onClick,\n}: CardButtonProps) => (\n <CardButton\n title={title}\n description={description}\n disabled={disabled}\n className={className}\n href={href}\n onClick={onClick}\n />\n);\n\nCardButtonStory.storyName = \"CardButton\";\n\nexport default story;\n"],"names":["_jsx"],"mappings":";;;;;;;;;;IAEM,KAAK,GAAG;IACZ,KAAK,EAAE,sBAAsB;IAC7B,SAAS,EAAE,UAAU;IACrB,QAAQ,EAAE;QACR,KAAK,EAAE;YACL,WAAW,EAAE,uCAAuC;SACrD;QACD,WAAW,EAAE;YACX,WAAW,EAAE,gDAAgD;SAC9D;QACD,QAAQ,EAAE;YACR,WAAW,EAAE,8BAA8B;SAC5C;QACD,SAAS,EAAE;YACT,WAAW,EAAE,wCAAwC;SACtD;QACD,OAAO,EAAE;YACP,WAAW,EAAE,2CAA2C;YACxD,MAAM,EAAE,IAAI;YACZ,KAAK,EAAE;gBACL,QAAQ,EAAE,WAAW;aACtB;SACF;QACD,IAAI,EAAE;YACJ,WAAW,EAAE,qCAAqC;SACnD;KACF;IACD,IAAI,EAAE;QACJ,KAAK,EAAE,cAAc;QACrB,WAAW,EAAE,qKAAqK;QAClL,QAAQ,EAAE,KAAK;QACf,SAAS,EAAE,EAAE;QACb,IAAI,EAAE,gCAAgC;KACvC;EACD;IAEW,eAAe,GAAG,UAAC,EAOd;QANhB,KAAK,WAAA,EACL,WAAW,iBAAA,EACX,QAAQ,cAAA,EACR,SAAS,eAAA,EACT,IAAI,UAAA,EACJ,OAAO,aAAA;IACc,QACrBA,IAAC,UAAU,IACT,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,GAChB;AARmB,EASrB;AAEF,eAAe,CAAC,SAAS,GAAG,YAAY;;;;;"}
1
+ {"version":3,"file":"index.stories.js","sources":["../../../../../../src/lib/components/cards/cardButton/index.stories.tsx"],"sourcesContent":["import { CardButton, CardButtonProps } from '.';\n\nconst story = {\n title: 'JSX/Cards/CardButton',\n component: CardButton,\n argTypes: {\n title: {\n description: 'Title text that needs to be displayed',\n },\n description: {\n description: 'Description text that is displayed under title',\n },\n disabled: {\n description: 'Disabled state of the button',\n },\n className: {\n description: 'Class name for most top parent element',\n },\n onClick: {\n description: 'Function that runs on click of the button',\n action: true,\n table: {\n category: 'Callbacks',\n },\n },\n href: {\n description: 'Redirect URL on click of the button',\n },\n },\n args: {\n title: 'Label',\n description: 'Honest, simple insurance',\n disabled: false,\n className: '',\n href: 'https://feather-insurance.com/',\n }\n};\n\nexport const CardButtonStory = ({\n title,\n description,\n disabled,\n className,\n href,\n onClick,\n}: CardButtonProps) => (\n <CardButton\n title={title}\n description={description}\n disabled={disabled}\n className={className}\n href={href}\n onClick={onClick}\n />\n);\n\nCardButtonStory.storyName = \"CardButton\";\n\nexport default story;\n"],"names":["_jsx"],"mappings":";;;;;;;;;;IAEM,KAAK,GAAG;IACZ,KAAK,EAAE,sBAAsB;IAC7B,SAAS,EAAE,UAAU;IACrB,QAAQ,EAAE;QACR,KAAK,EAAE;YACL,WAAW,EAAE,uCAAuC;SACrD;QACD,WAAW,EAAE;YACX,WAAW,EAAE,gDAAgD;SAC9D;QACD,QAAQ,EAAE;YACR,WAAW,EAAE,8BAA8B;SAC5C;QACD,SAAS,EAAE;YACT,WAAW,EAAE,wCAAwC;SACtD;QACD,OAAO,EAAE;YACP,WAAW,EAAE,2CAA2C;YACxD,MAAM,EAAE,IAAI;YACZ,KAAK,EAAE;gBACL,QAAQ,EAAE,WAAW;aACtB;SACF;QACD,IAAI,EAAE;YACJ,WAAW,EAAE,qCAAqC;SACnD;KACF;IACD,IAAI,EAAE;QACJ,KAAK,EAAE,OAAO;QACd,WAAW,EAAE,0BAA0B;QACvC,QAAQ,EAAE,KAAK;QACf,SAAS,EAAE,EAAE;QACb,IAAI,EAAE,gCAAgC;KACvC;EACD;IAEW,eAAe,GAAG,UAAC,EAOd;QANhB,KAAK,WAAA,EACL,WAAW,iBAAA,EACX,QAAQ,cAAA,EACR,SAAS,eAAA,EACT,IAAI,UAAA,EACJ,OAAO,aAAA;IACc,QACrBA,IAAC,UAAU,IACT,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,GAChB;AARmB,EASrB;AAEF,eAAe,CAAC,SAAS,GAAG,YAAY;;;;;"}
@@ -1,28 +1,14 @@
1
- import { b as __rest, a as __assign } from '../../tslib.es6-a39f91fc.js';
2
- import { jsxs, jsx } from 'react/jsx-runtime';
1
+ export { InfoCard } from './infoCard/index.js';
3
2
  export { CardButton } from './cardButton/index.js';
4
- import { s as styleInject } from '../../style-inject.es-1f59c1d0.js';
5
- import '../icon/icons/ChevronRight.js';
3
+ import '../../tslib.es6-a39f91fc.js';
4
+ import 'react/jsx-runtime';
5
+ import '../icon/icons/ArrowRight.js';
6
6
  import 'react';
7
7
  import '../icon/IconWrapper/IconWrapper.js';
8
8
  import '../../index-6ea95111.js';
9
+ import '../../style-inject.es-1f59c1d0.js';
9
10
  import './card/index.js';
10
-
11
- var infoImage = "data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20clip-path%3D%22url%28%23clip0%29%22%3E%3Cpath%20d%3D%22M10%2018.3334C14.6024%2018.3334%2018.3334%2014.6024%2018.3334%2010C18.3334%205.39765%2014.6024%201.66669%2010%201.66669C5.39765%201.66669%201.66669%205.39765%201.66669%2010C1.66669%2014.6024%205.39765%2018.3334%2010%2018.3334Z%22%20stroke%3D%22%238E8CEE%22%20strokeWidth%3D%222%22%20strokeLinecap%3D%22round%22%20strokeLinejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M10%2013.3333V10%22%20stroke%3D%22%238E8CEE%22%20strokeWidth%3D%222%22%20strokeLinecap%3D%22round%22%20strokeLinejoin%3D%22round%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%226.66665%22%20r%3D%220.833333%22%20fill%3D%22%238E8CEE%22%2F%3E%3C%2Fg%3E%3Cdefs%3E%3CclipPath%20id%3D%22clip0%22%3E%3Crect%20width%3D%2220%22%20height%3D%2220%22%20fill%3D%22white%22%2F%3E%3C%2FclipPath%3E%3C%2Fdefs%3E%3C%2Fsvg%3E";
12
-
13
- var info = {
14
- src: infoImage,
15
- alt: 'circle with the letter i inside for information',
16
- };
17
-
18
- var css_248z = "@keyframes style-module_appear-in__23V7k {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n.style-module_root-container__3r_b9 {\n position: relative;\n padding-top: 40px;\n}\n.style-module_root-container__3r_b9:hover .style-module_right-icon__L6sf3 {\n visibility: visible;\n animation-name: style-module_appear-in__23V7k;\n animation-duration: 0.3s;\n animation-fill-mode: both;\n}\n\n.style-module_top-icon__10CJ3 {\n position: absolute;\n left: 50%;\n transform: translateX(-50%) translateY(-40px);\n}\n.style-module_top-icon--muted__3PZ1X {\n opacity: 0.25;\n}\n\n.style-module_right-icon__L6sf3 {\n visibility: hidden;\n position: absolute;\n top: 64px;\n right: 24px;\n}\n\n.style-module_container__19mu2 {\n padding: 0 24px 24px 24px;\n height: 100%;\n}\n@media (max-width: 34rem) {\n .style-module_container__19mu2 {\n height: fit-content;\n }\n}";
19
- var styles = {"root-container":"style-module_root-container__3r_b9","right-icon":"style-module_right-icon__L6sf3","appear-in":"style-module_appear-in__23V7k","top-icon":"style-module_top-icon__10CJ3","top-icon--muted":"style-module_top-icon--muted__3PZ1X","container":"style-module_container__19mu2"};
20
- styleInject(css_248z);
21
-
22
- var InfoCard = function (_a) {
23
- var className = _a.className, title = _a.title, children = _a.children, topIcon = _a.topIcon, rightIcon = _a.rightIcon, _b = _a.state, state = _b === void 0 ? 'actionable' : _b, _c = _a.dropshadow, dropshadow = _c === void 0 ? true : _c, props = __rest(_a, ["className", "title", "children", "topIcon", "rightIcon", "state", "dropshadow"]);
24
- return (jsxs("div", __assign({ className: "".concat(styles['root-container'], " ").concat(className !== null && className !== void 0 ? className : '') }, props, { children: [jsx("img", { src: topIcon.src, alt: topIcon.alt, className: "".concat(styles['top-icon'], " ").concat(state === 'muted' ? styles['top-icon--muted'] : '', " "), width: "80px", height: "80px" }), jsxs("div", { className: "".concat(associatedClassForCardState(state, dropshadow), " ").concat(styles.container), children: [rightIcon && (jsx("img", { width: "20px", height: "20px", className: styles['right-icon'], src: rightIcon === 'info' ? info.src : rightIcon.src, alt: rightIcon === 'info' ? info.alt : rightIcon.alt })), jsx("h3", { className: "p-h4 ta-center mt64", children: title }), jsx("div", { className: "p-p mt16 tc-neutral-700", children: children })] })] })));
25
- };
11
+ import '../icon/icons/ChevronRight.js';
26
12
 
27
13
  var headingForCardSize = function (cardSize) {
28
14
  switch (cardSize) {
@@ -52,5 +38,5 @@ var associatedClassForCardState = function (state, dropshadow) {
52
38
  return baseClass;
53
39
  };
54
40
 
55
- export { InfoCard, associatedClassForCardState, headingForCardSize };
41
+ export { associatedClassForCardState, headingForCardSize };
56
42
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/lib/components/cards/icons/info.svg","../../../../../src/lib/components/cards/icons/index.ts","../../../../../src/lib/components/cards/infoCard/index.tsx","../../../../../src/lib/components/cards/index.tsx"],"sourcesContent":["export default \"data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20clip-path%3D%22url%28%23clip0%29%22%3E%3Cpath%20d%3D%22M10%2018.3334C14.6024%2018.3334%2018.3334%2014.6024%2018.3334%2010C18.3334%205.39765%2014.6024%201.66669%2010%201.66669C5.39765%201.66669%201.66669%205.39765%201.66669%2010C1.66669%2014.6024%205.39765%2018.3334%2010%2018.3334Z%22%20stroke%3D%22%238E8CEE%22%20strokeWidth%3D%222%22%20strokeLinecap%3D%22round%22%20strokeLinejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M10%2013.3333V10%22%20stroke%3D%22%238E8CEE%22%20strokeWidth%3D%222%22%20strokeLinecap%3D%22round%22%20strokeLinejoin%3D%22round%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%226.66665%22%20r%3D%220.833333%22%20fill%3D%22%238E8CEE%22%2F%3E%3C%2Fg%3E%3Cdefs%3E%3CclipPath%20id%3D%22clip0%22%3E%3Crect%20width%3D%2220%22%20height%3D%2220%22%20fill%3D%22white%22%2F%3E%3C%2FclipPath%3E%3C%2Fdefs%3E%3C%2Fsvg%3E\"","import arrowRightImage from './arrow-right.svg';\nimport featherLogoImage from './feather-logo.svg';\nimport infoImage from './info.svg';\n\nexport interface Icon {\n src: string;\n alt: string;\n}\n\nexport interface IconSize {\n width: number;\n height: number;\n}\n\nconst arrowRight: Icon = {\n src: arrowRightImage,\n alt: 'arrow pointing right',\n};\n\nconst featherLogo: Icon = {\n src: featherLogoImage,\n alt: 'feather logo',\n};\n\nconst info: Icon = {\n src: infoImage,\n alt: 'circle with the letter i inside for information',\n};\n\n\nexport { arrowRight, featherLogo, info };\n","import { associatedClassForCardState, CardProps } from '..';\nimport { Icon, info } from '../icons';\n\nimport styles from './style.module.scss';\n\nexport type InfoCardProps = CardProps & {\n topIcon: Icon;\n rightIcon?: 'info' | Icon;\n};\n\nexport const InfoCard = ({\n className,\n title,\n children,\n topIcon,\n rightIcon,\n state = 'actionable',\n dropshadow = true,\n ...props\n}: InfoCardProps) => (\n <div className={`${styles['root-container']} ${className ?? ''}`} {...props}>\n <img\n src={topIcon.src}\n alt={topIcon.alt}\n className={`${styles['top-icon']} ${\n state === 'muted' ? styles['top-icon--muted'] : ''\n } `}\n width=\"80px\"\n height=\"80px\"\n />\n <div\n className={`${associatedClassForCardState(state, dropshadow)} ${\n styles.container\n }`}\n >\n {rightIcon && (\n <img\n width=\"20px\"\n height=\"20px\"\n className={styles['right-icon']}\n src={rightIcon === 'info' ? info.src : rightIcon.src}\n alt={rightIcon === 'info' ? info.alt : rightIcon.alt}\n />\n )}\n <h3 className=\"p-h4 ta-center mt64\">{title}</h3>\n <div className=\"p-p mt16 tc-neutral-700\">{children}</div>\n </div>\n </div>\n);\n","import { InfoCard } from './infoCard';\nimport { CardButton } from './cardButton';\n\ntype CardState = 'actionable' | 'static' | 'muted';\n\nexport type CardProps = {\n title: string;\n children: React.ReactNode;\n state?: CardState;\n dropshadow?: boolean;\n} & JSX.IntrinsicElements['div'];\n\nexport const headingForCardSize = (\n cardSize: 'xsmall' | 'small' | 'medium' | 'big'\n): string => {\n switch (cardSize) {\n case 'xsmall':\n case 'small':\n return 'p-h4';\n case 'medium':\n return 'p-h3';\n case 'big':\n return 'p-h2';\n }\n};\n\nexport const associatedClassForCardState = (\n state: CardState,\n dropshadow: boolean\n): string => {\n const baseClass = (() => {\n switch (state) {\n case 'actionable':\n return 'ds-card--actionable';\n case 'muted':\n return 'ds-card--muted';\n case 'static':\n return 'ds-card';\n }\n })();\n\n if (dropshadow === false) {\n return `${baseClass} ds-card--no-dropshadow`;\n }\n return baseClass;\n};\n\nexport {\n InfoCard,\n CardButton,\n};\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;;;;;;AAAA,gBAAe;;ACwBf,IAAM,IAAI,GAAS;IACjB,GAAG,EAAE,SAAS;IACd,GAAG,EAAE,iDAAiD;CACvD;;;;;;ICjBY,QAAQ,GAAG,UAAC,EAST;IARd,IAAA,SAAS,eAAA,EACT,KAAK,WAAA,EACL,QAAQ,cAAA,EACR,OAAO,aAAA,EACP,SAAS,eAAA,EACT,aAAoB,EAApB,KAAK,mBAAG,YAAY,KAAA,EACpB,kBAAiB,EAAjB,UAAU,mBAAG,IAAI,KAAA,EACd,KAAK,cARe,iFASxB,CADS;IACW,QACnBA,uBAAK,SAAS,EAAE,UAAG,MAAM,CAAC,gBAAgB,CAAC,cAAI,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,EAAE,CAAE,IAAM,KAAK,eACzEC,aACE,GAAG,EAAE,OAAO,CAAC,GAAG,EAChB,GAAG,EAAE,OAAO,CAAC,GAAG,EAChB,SAAS,EAAE,UAAG,MAAM,CAAC,UAAU,CAAC,cAC9B,KAAK,KAAK,OAAO,GAAG,MAA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ards/index.tsx"],"sourcesContent":["import { InfoCard } from './infoCard';\nimport { CardButton } from './cardButton';\n\ntype CardState = 'actionable' | 'static' | 'muted';\n\nexport type CardProps = {\n title: string;\n children: React.ReactNode;\n state?: CardState;\n dropshadow?: boolean;\n} & JSX.IntrinsicElements['div'];\n\nexport const headingForCardSize = (\n cardSize: 'xsmall' | 'small' | 'medium' | 'big'\n): string => {\n switch (cardSize) {\n case 'xsmall':\n case 'small':\n return 'p-h4';\n case 'medium':\n return 'p-h3';\n case 'big':\n return 'p-h2';\n }\n};\n\nexport const associatedClassForCardState = (\n state: CardState,\n dropshadow: boolean\n): string => {\n const baseClass = (() => {\n switch (state) {\n case 'actionable':\n return 'ds-card--actionable';\n case 'muted':\n return 'ds-card--muted';\n case 'static':\n return 'ds-card';\n }\n })();\n\n if (dropshadow === false) {\n return `${baseClass} ds-card--no-dropshadow`;\n }\n return baseClass;\n};\n\nexport {\n InfoCard,\n CardButton,\n};\n"],"names":[],"mappings":";;;;;;;;;;;;IAYa,kBAAkB,GAAG,UAChC,QAA+C;IAE/C,QAAQ,QAAQ;QACd,KAAK,QAAQ,CAAC;QACd,KAAK,OAAO;YACV,OAAO,MAAM,CAAC;QAChB,KAAK,QAAQ;YACX,OAAO,MAAM,CAAC;QAChB,KAAK,KAAK;YACR,OAAO,MAAM,CAAC;KACjB;AACH,EAAE;IAEW,2BAA2B,GAAG,UACzC,KAAgB,EAChB,UAAmB;IAEnB,IAAM,SAAS,GAAG,CAAC;QACjB,QAAQ,KAAK;YACX,KAAK,YAAY;gBACf,OAAO,qBAAqB,CAAC;YAC/B,KAAK,OAAO;gBACV,OAAO,gBAAgB,CAAC;YAC1B,KAAK,QAAQ;gBACX,OAAO,SAAS,CAAC;SACpB;KACF,GAAG,CAAC;IAEL,IAAI,UAAU,KAAK,KAAK,EAAE;QACxB,OAAO,UAAG,SAAS,4BAAyB,CAAC;KAC9C;IACD,OAAO,SAAS,CAAC;AACnB;;;;"}
@@ -1,11 +1,37 @@
1
- import '../../../tslib.es6-a39f91fc.js';
2
- import 'react/jsx-runtime';
3
- export { InfoCard } from '../index.js';
4
- import '../cardButton/index.js';
5
- import '../../icon/icons/ChevronRight.js';
1
+ import { b as __rest, a as __assign } from '../../../tslib.es6-a39f91fc.js';
2
+ import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
3
+ import ArrowRight from '../../icon/icons/ArrowRight.js';
4
+ import { Card } from '../card/index.js';
5
+ import { s as styleInject } from '../../../style-inject.es-1f59c1d0.js';
6
+ import { c as classNames } from '../../../index-6ea95111.js';
6
7
  import 'react';
7
8
  import '../../icon/IconWrapper/IconWrapper.js';
8
- import '../../../index-6ea95111.js';
9
- import '../../../style-inject.es-1f59c1d0.js';
10
- import '../card/index.js';
9
+ import '../../icon/icons/ChevronRight.js';
10
+
11
+ var css_248z = ".style-module_bs-xs__2s8AD {\n box-shadow: 0 2px 12px rgba(38, 38, 46, 0.03);\n}\n\n.style-module_bs-sm__2KgTp {\n box-shadow: 0 2px 20px 0 rgba(38, 38, 46, 0.04);\n}\n\n.style-module_bs-md__3yrN1 {\n box-shadow: 0 2px 28px rgba(38, 38, 46, 0.08);\n}\n\n.style-module_bs-lg__Ydmy8 {\n box-shadow: 0 2px 32px rgba(38, 38, 46, 0.1);\n}\n\n.style-module_bs-xl__9OYoN {\n box-shadow: 0 2px 50px rgba(38, 38, 46, 0.18);\n}\n\n.style-module_bannerWrapper__1m3mn {\n padding-top: 124px;\n}\n\n.style-module_buttonWrapper__-dmFc:focus .style-module_wrapper__rVPyi {\n border-color: #696971;\n box-shadow: 0 2px 12px rgba(38, 38, 46, 0.03), 0 0 0 1px #696971;\n}\n\n.style-module_buttonWrapper__-dmFc:focus-visible .style-module_wrapper__rVPyi {\n overflow: hidden;\n border-color: #26262e;\n box-shadow: 0 2px 12px rgba(38, 38, 46, 0.03), 0 0 0 1px #26262e;\n}\n\n.style-module_topIconWrapper__VYKR7 {\n position: absolute;\n width: 80px;\n height: 80px;\n left: 50%;\n transform: translateX(-50%) translateY(-80px);\n}\n.style-module_topIconWrapper--muted__2a4Lq {\n opacity: 0.25;\n}\n\n.style-module_topIconBanner__31-Hc {\n position: absolute;\n top: -123px;\n left: -15px;\n right: -15px;\n height: 124px;\n width: calc(100% + 30px);\n overflow: hidden;\n}\n.style-module_topIconBanner__31-Hc img {\n position: absolute;\n border-top-left-radius: 6px;\n border-top-right-radius: 6px;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n object-fit: cover;\n min-width: 100%;\n min-height: 100%;\n}\n\n.style-module_contentWrapper__B1Dn1 {\n gap: 0 !important;\n}\n\n.style-module_floatingLabel__1iIBj {\n position: relative;\n}\n\n.style-module_disabled__1u28- {\n opacity: 0.25;\n cursor: not-allowed;\n}";
12
+ var styles = {"bs-xs":"style-module_bs-xs__2s8AD","bs-sm":"style-module_bs-sm__2KgTp","bs-md":"style-module_bs-md__3yrN1","bs-lg":"style-module_bs-lg__Ydmy8","bs-xl":"style-module_bs-xl__9OYoN","bannerWrapper":"style-module_bannerWrapper__1m3mn","buttonWrapper":"style-module_buttonWrapper__-dmFc","wrapper":"style-module_wrapper__rVPyi","topIconWrapper":"style-module_topIconWrapper__VYKR7","topIconWrapper--muted":"style-module_topIconWrapper--muted__2a4Lq","topIconBanner":"style-module_topIconBanner__31-Hc","contentWrapper":"style-module_contentWrapper__B1Dn1","floatingLabel":"style-module_floatingLabel__1iIBj","disabled":"style-module_disabled__1u28-"};
13
+ styleInject(css_248z);
14
+
15
+ var InfoCard = function (_a) {
16
+ var _b, _c, _d;
17
+ _a.className; var _e = _a.showIcon, showIcon = _e === void 0 ? true : _e, title = _a.title, children = _a.children, topIcon = _a.topIcon, topIconType = _a.topIconType, _f = _a.disabled, disabled = _f === void 0 ? false : _f, onClick = _a.onClick, cardProps = __rest(_a, ["className", "showIcon", "title", "children", "topIcon", "topIconType", "disabled", "onClick"]);
18
+ return (jsx(Card, __assign({}, cardProps, { label: topIcon && (jsx(Fragment, { children: topIconType === 'icon' ? (jsx("div", { className: classNames('d-flex ai-center jc-center bg-orange-200 br-circle p16', styles.topIconWrapper), children: topIcon })) : (jsx("div", { className: classNames('d-flex ai-center jc-center', (_b = {}, _b[styles.topIconBanner] = topIconType === 'banner', _b)), children: topIcon })) })), title: title && (jsxs(Fragment, { children: [title, showIcon && jsx(ArrowRight, { size: 20 })] })), titleVariant: 'medium', description: children, descriptionVariant: 'small', actionIcon: null, showActionIcon: false, classNames: {
19
+ buttonWrapper: styles.buttonWrapper,
20
+ wrapper: classNames((_c = {},
21
+ _c[styles.wrapper] = true,
22
+ _c[styles.disabled] = disabled,
23
+ _c['pt40'] = topIcon && topIconType === 'icon',
24
+ _c['mt40'] = topIcon && topIconType === 'icon',
25
+ _c[styles.bannerWrapper] = topIcon && topIconType === 'banner',
26
+ _c)),
27
+ label: classNames((_d = {},
28
+ _d[styles.floatingLabel] = topIcon && topIconType !== 'image',
29
+ _d)),
30
+ title: classNames({ 'mt16': topIcon && topIconType === 'banner' }, 'd-flex ai-center jc-center my8'),
31
+ description: 'ta-center',
32
+ contentWrapper: styles.contentWrapper,
33
+ }, variant: 'default', onClick: disabled ? undefined : onClick, density: 'compact' })));
34
+ };
35
+
36
+ export { InfoCard };
11
37
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../../src/lib/components/cards/infoCard/index.tsx"],"sourcesContent":["import { ReactNode } from 'react';\nimport ArrowRight from '../../icon/icons/ArrowRight';\nimport { Card, CardProps } from '../card';\n\nimport styles from './style.module.scss';\nimport classNames from 'classnames';\n\nexport interface InfoCardProps extends CardProps {\n topIcon: ReactNode;\n showIcon?: boolean;\n topIconType?: 'image' | 'icon' | 'banner';\n disabled?: boolean;\n};\n\nexport const InfoCard = ({\n className,\n showIcon = true,\n title,\n children,\n topIcon,\n topIconType,\n disabled = false,\n onClick,\n ...cardProps\n}: InfoCardProps) => (\n <Card\n {...cardProps}\n label={topIcon && (\n <>\n {topIconType === 'icon' ? (\n <div\n className={classNames(\n 'd-flex ai-center jc-center bg-orange-200 br-circle p16',\n styles.topIconWrapper\n )}\n >\n {topIcon}\n </div>\n ) : (\n <div className={classNames(\n 'd-flex ai-center jc-center',\n { [styles.topIconBanner]: topIconType === 'banner' }\n )}>\n {topIcon}\n </div>\n )}\n </>\n )}\n title={title && (\n <>\n {title}\n\n {showIcon && <ArrowRight size={20} />}\n </>\n )}\n titleVariant='medium'\n description={children}\n descriptionVariant='small'\n actionIcon={null}\n showActionIcon={false}\n classNames={{\n buttonWrapper: styles.buttonWrapper,\n wrapper: classNames({\n [styles.wrapper]: true,\n [styles.disabled]: disabled,\n 'pt40': topIcon && topIconType === 'icon',\n 'mt40': topIcon && topIconType === 'icon',\n [styles.bannerWrapper]: topIcon && topIconType === 'banner',\n }),\n label: classNames({\n [styles.floatingLabel]: topIcon && topIconType !== 'image',\n }),\n title: classNames(\n {'mt16': topIcon && topIconType === 'banner'},\n 'd-flex ai-center jc-center my8'\n ),\n description: 'ta-center',\n contentWrapper: styles.contentWrapper,\n }}\n variant='default'\n onClick={disabled ? undefined : onClick}\n density='compact'\n />\n);\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;;;;;;IAca,QAAQ,GAAG,UAAC,EAUT;;gBATL,MACT,gBAAe,EAAf,QAAQ,mBAAG,IAAI,KAAA,EACf,KAAK,WAAA,EACL,QAAQ,cAAA,EACR,OAAO,aAAA,EACP,WAAW,iBAAA,EACX,gBAAgB,EAAhB,QAAQ,mBAAG,KAAK,KAAA,EAChB,OAAO,aAAA,EACJ,SAAS,cATW,+FAUxB;IAAoB,QACnBA,IAAC,IAAI,eACC,SAAS,IACb,KAAK,EAAE,OAAO,KACZA,0BACG,WAAW,KAAK,MAAM,IACrBA,aACE,SAAS,EAAE,UAAU,CACnB,wDAAwD,EACxD,MAAM,CAAC,cAAc,CACtB,YAEA,OAAO,GACJ,KAENA,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