@popsure/dirty-swan 0.53.1 → 0.53.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.
@@ -9,8 +9,8 @@ import { Card } from '../cards/card/index.js';
9
9
  import '../icon/IconWrapper/IconWrapper.js';
10
10
  import '../icon/icons/ChevronRight.js';
11
11
 
12
- var css_248z = ".style-module_wrapperBordered__1BsXF {\n border: 1px solid #ededf2;\n}\n\n.style-module_container__37ni0 {\n border-bottom: 1px solid #ededf2;\n}\n.style-module_containerBordered__2IHWI:last-of-type {\n border-bottom: 0;\n}\n\n.style-module_question__2bC30 {\n color: #4c4c53;\n}\n\n.style-module_chevron__2nixo {\n color: #4c4c53;\n transition: transform 0.3s ease-in-out;\n}\n.style-module_chevronOpen__1nFZj {\n transform: rotate(180deg);\n}\n\n.style-module_buttonWrapper__2A5FG {\n background-color: transparent !important;\n color: #8e8cee;\n margin-top: 8px;\n margin-bottom: 8px;\n outline-offset: -4px;\n}\n.style-module_buttonWrapperDefault__2DCgb {\n margin-top: 12px;\n margin-bottom: 12px;\n outline-offset: -2px;\n}\n.style-module_buttonWrapper__2A5FG:hover, .style-module_buttonWrapper__2A5FG:focus-visible {\n background: #f7f7ff;\n}\n.style-module_buttonWrapper__2A5FG:hover .style-module_icon__jyQp0, .style-module_buttonWrapper__2A5FG:focus-visible .style-module_icon__jyQp0 {\n color: #8e8cee !important;\n}\n.style-module_buttonWrapper__2A5FG:hover .style-module_question__2bC30,\n.style-module_buttonWrapper__2A5FG:hover .style-module_chevron__2nixo, .style-module_buttonWrapper__2A5FG:focus-visible .style-module_question__2bC30,\n.style-module_buttonWrapper__2A5FG:focus-visible .style-module_chevron__2nixo {\n color: #8e8cee;\n}\n.style-module_buttonWrapper__2A5FG:hover {\n outline: 0 solid transparent !important;\n}\n.style-module_buttonWrapper__2A5FG:focus-visible {\n outline: 2px solid #8e8cee !important;\n}";
13
- var styles = {"wrapperBordered":"style-module_wrapperBordered__1BsXF","container":"style-module_container__37ni0","containerBordered":"style-module_containerBordered__2IHWI","question":"style-module_question__2bC30","chevron":"style-module_chevron__2nixo","chevronOpen":"style-module_chevronOpen__1nFZj","buttonWrapper":"style-module_buttonWrapper__2A5FG","buttonWrapperDefault":"style-module_buttonWrapperDefault__2DCgb","icon":"style-module_icon__jyQp0"};
12
+ var css_248z = ".style-module_wrapperBordered__1BsXF {\n border: 1px solid #ededf2;\n}\n\n.style-module_container__37ni0 {\n border-bottom: 1px solid #ededf2;\n}\n.style-module_containerBordered__2IHWI:last-of-type {\n border-bottom: 0;\n}\n\n.style-module_question__2bC30 {\n color: #4c4c53;\n}\n\n.style-module_chevron__2nixo {\n color: #4c4c53;\n transition: transform 0.3s ease-in-out;\n}\n.style-module_chevronOpen__1nFZj {\n transform: rotate(180deg);\n}\n\n.style-module_answerIcon__Pugpz {\n padding-left: 20px;\n}\n.style-module_answerIconDefault__2myqw {\n padding-left: 4px;\n}\n\n.style-module_buttonWrapper__2A5FG {\n background-color: transparent !important;\n color: #8e8cee;\n outline-offset: -4px;\n}\n.style-module_buttonWrapperDefault__2DCgb {\n outline-offset: 0;\n}\n.style-module_buttonWrapperOpen__1cunM {\n margin-bottom: 4px !important;\n}\n.style-module_buttonWrapper__2A5FG:hover, .style-module_buttonWrapper__2A5FG:focus-visible {\n background: #f7f7ff;\n}\n.style-module_buttonWrapper__2A5FG:hover .style-module_icon__jyQp0, .style-module_buttonWrapper__2A5FG:focus-visible .style-module_icon__jyQp0 {\n color: #8e8cee !important;\n}\n.style-module_buttonWrapper__2A5FG:hover .style-module_question__2bC30,\n.style-module_buttonWrapper__2A5FG:hover .style-module_chevron__2nixo, .style-module_buttonWrapper__2A5FG:focus-visible .style-module_question__2bC30,\n.style-module_buttonWrapper__2A5FG:focus-visible .style-module_chevron__2nixo {\n color: #8e8cee;\n}\n.style-module_buttonWrapper__2A5FG:hover {\n outline: 0 solid transparent !important;\n}\n.style-module_buttonWrapper__2A5FG:focus-visible {\n outline: 2px solid #8e8cee !important;\n}";
13
+ var styles = {"wrapperBordered":"style-module_wrapperBordered__1BsXF","container":"style-module_container__37ni0","containerBordered":"style-module_containerBordered__2IHWI","question":"style-module_question__2bC30","chevron":"style-module_chevron__2nixo","chevronOpen":"style-module_chevronOpen__1nFZj","answerIcon":"style-module_answerIcon__Pugpz","answerIconDefault":"style-module_answerIconDefault__2myqw","buttonWrapper":"style-module_buttonWrapper__2A5FG","buttonWrapperDefault":"style-module_buttonWrapperDefault__2DCgb","buttonWrapperOpen":"style-module_buttonWrapperOpen__1cunM","icon":"style-module_icon__jyQp0"};
14
14
  styleInject(css_248z);
15
15
 
16
16
  var Accordion = function (_a) {
@@ -41,14 +41,20 @@ var Accordion = function (_a) {
41
41
  },
42
42
  _b[styles.wrapperBordered] = !isDefaultVariant,
43
43
  _b)), children: items.map(function (questionData) {
44
- var _a, _b, _c, _d;
44
+ var _a, _b, _c, _d, _e;
45
45
  var question = questionData.question, answer = questionData.answer, id = questionData.id, icon = questionData.icon;
46
46
  var isOpen = selectedQuestionId.includes(id);
47
- return (jsxs("div", { className: classNames(classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.questionWrapper, styles.container, (_a = {}, _a[styles.containerBordered] = !isDefaultVariant, _a)), children: [jsx(Card, { title: question, titleVariant: "small", density: 'compact', icon: icon, classNames: __assign({ icon: classNames(classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.icon, styles.icon, 'tc-grey-700'), buttonWrapper: classNames(classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.buttonWrapper, styles.buttonWrapper, (_b = {},
47
+ return (jsxs("div", { className: classNames(classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.questionWrapper, styles.container, (_a = {}, _a[styles.containerBordered] = !isDefaultVariant, _a)), children: [jsx(Card, { title: question, titleVariant: "small", density: 'compact', icon: icon, classNames: __assign({ icon: classNames(classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.icon, styles.icon, 'tc-grey-700'), buttonWrapper: classNames('py8 my8', classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.buttonWrapper, styles.buttonWrapper, (_b = {},
48
48
  _b[styles.buttonWrapperDefault] = isDefaultVariant,
49
- _b)), wrapper: classNames(classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.wrapper, 'bg-transparent br0 px8 py8', { 'pl0': isDefaultVariant }), title: classNames(classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.question, styles.question, 'fw-bold', (_c = {}, _c[styles.questionOpen] = isOpen, _c)) }, classNames$1), dropShadow: false, onClick: function () { return handleClick(questionData); }, "aria-expanded": isOpen, actionIcon: jsx(ChevronDownIcon, { className: classNames(styles.chevron, (_d = {},
49
+ _b[styles.buttonWrapperOpen] = isOpen,
50
+ _b)), wrapper: classNames(classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.wrapper, 'bg-transparent br0 py0', { 'pl0': isDefaultVariant }), title: classNames(classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.question, styles.question, 'fw-bold', (_c = {}, _c[styles.questionOpen] = isOpen, _c)) }, classNames$1), dropShadow: false, onClick: function () { return handleClick(questionData); }, "aria-expanded": isOpen, actionIcon: jsx(ChevronDownIcon, { className: classNames(styles.chevron, (_d = {},
50
51
  _d[styles.chevronOpen] = isOpen,
51
- _d)), size: 20, noMargin: true }) }), jsx(AnimateHeight, { duration: 300, height: isOpen ? 'auto' : 0, children: jsx("div", { className: classNames(classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.answer, 'tc-grey-600 pr16 pb16', { 'pl16': !isDefaultVariant }), children: answer }) })] }, id));
52
+ _d)), size: 20, noMargin: true }) }), jsx(AnimateHeight, { duration: 300, height: isOpen ? 'auto' : 0, children: jsx("div", { className: classNames(classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.answer, 'tc-grey-600 pr16 pb24', (_e = {
53
+ 'pl16': !isDefaultVariant
54
+ },
55
+ _e[styles === null || styles === void 0 ? void 0 : styles.answerIcon] = !isDefaultVariant && icon,
56
+ _e[styles === null || styles === void 0 ? void 0 : styles.answerIconDefault] = isDefaultVariant && icon,
57
+ _e)), children: answer }) })] }, id));
52
58
  }) }));
53
59
  };
54
60
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../src/lib/components/accordion/index.tsx"],"sourcesContent":["import classnamesUtil from 'classnames';\nimport { ReactNode, useCallback, useState } from 'react';\nimport AnimateHeight from 'react-animate-height';\n\nimport styles from './style.module.scss';\nimport { ChevronDownIcon } from '../icon';\nimport { Card } from '../cards/card';\n\nexport interface AccordionItem {\n id: string;\n question: string;\n icon?: ReactNode;\n answer: ReactNode;\n}\n\nexport interface AccordionProps {\n items: AccordionItem[];\n classNames?: {\n questionWrapper?: string;\n buttonWrapper?: string;\n wrapper?: string;\n question?: string;\n answer?: string;\n icon?: string;\n markdown?: string;\n };\n multiple?: boolean;\n onClick?: (item: AccordionItem) => void;\n variant?: 'default' | 'bordered';\n};\n\nconst Accordion = ({\n items = [],\n classNames = {},\n variant = 'default',\n multiple = false,\n onClick,\n}: AccordionProps) => {\n const [selectedQuestionId, setSelectedQuestionId] = useState<(string[])>([]);\n const isDefaultVariant = variant === 'default';\n\n const handleClick = useCallback((questionData: AccordionItem) => {\n const { id } = questionData;\n if (selectedQuestionId.includes(id)) {\n if (!multiple) {\n setSelectedQuestionId([]);\n return\n }\n\n setSelectedQuestionId((selectedItems) => \n selectedItems.filter((selectedId) => selectedId !== id)\n );\n } else {\n onClick?.(questionData);\n setSelectedQuestionId((selectedIds) => [\n id, ...multiple ? selectedIds : [],\n ]);\n }\n }, [multiple, onClick, selectedQuestionId]);\n\n return (\n <div\n className={\n classnamesUtil(\n {\n 'br8': !isDefaultVariant,\n [styles.wrapperBordered]: !isDefaultVariant,\n }\n )\n }\n >\n {items.map((questionData) => {\n const { question, answer, id, icon } = questionData;\n const isOpen = selectedQuestionId.includes(id);\n\n return (\n <div\n key={id}\n className={classnamesUtil(\n classNames?.questionWrapper,\n styles.container,\n { [styles.containerBordered]: !isDefaultVariant }\n )}\n >\n <Card\n title={question}\n titleVariant=\"small\"\n density='compact'\n icon={icon}\n classNames={{\n icon: classnamesUtil(\n classNames?.icon,\n styles.icon,\n 'tc-grey-700',\n ),\n buttonWrapper: classnamesUtil(\n classNames?.buttonWrapper,\n styles.buttonWrapper, {\n [styles.buttonWrapperDefault]: isDefaultVariant\n },\n ),\n wrapper: classnamesUtil(\n classNames?.wrapper,\n 'bg-transparent br0 px8 py8',\n { 'pl0': isDefaultVariant },\n ),\n title: classnamesUtil(\n classNames?.question,\n styles.question,\n 'fw-bold', \n { [styles.questionOpen]: isOpen }\n ),\n ...classNames,\n }}\n dropShadow={false}\n onClick={() => handleClick(questionData)}\n aria-expanded={isOpen}\n actionIcon={\n <ChevronDownIcon\n className={classnamesUtil(styles.chevron, {\n [styles.chevronOpen]: isOpen\n })}\n size={20}\n noMargin\n />\n }\n />\n\n <AnimateHeight\n duration={300}\n height={isOpen ? 'auto' : 0}\n >\n <div \n className={classnamesUtil(\n classNames?.answer,\n 'tc-grey-600 pr16 pb16', \n { 'pl16': !isDefaultVariant },\n )}\n >\n {answer}\n </div>\n </AnimateHeight>\n </div>\n );\n })}\n </div>\n );\n};\n\nexport { Accordion };"],"names":["classNames","_jsx","classnamesUtil","_jsxs"],"mappings":";;;;;;;;;;;;;;;IA+BM,SAAS,GAAG,UAAC,EAMF;;QALf,aAAU,EAAV,KAAK,mBAAG,EAAE,KAAA,EACV,kBAAe,EAAfA,YAAU,mBAAG,EAAE,KAAA,EACf,eAAmB,EAAnB,OAAO,mBAAG,SAAS,KAAA,EACnB,gBAAgB,EAAhB,QAAQ,mBAAG,KAAK,KAAA,EAChB,OAAO,aAAA;IAED,IAAA,KAA8C,QAAQ,CAAa,EAAE,CAAC,EAArE,kBAAkB,QAAA,EAAE,qBAAqB,QAA4B,CAAC;IAC7E,IAAM,gBAAgB,GAAG,OAAO,KAAK,SAAS,CAAC;IAE/C,IAAM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AC,GACE,EACN;AACJ;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/lib/components/accordion/index.tsx"],"sourcesContent":["import classnamesUtil from 'classnames';\nimport { ReactNode, useCallback, useState } from 'react';\nimport AnimateHeight from 'react-animate-height';\n\nimport styles from './style.module.scss';\nimport { ChevronDownIcon } from '../icon';\nimport { Card } from '../cards/card';\n\nexport interface AccordionItem {\n id: string;\n question: string;\n icon?: ReactNode;\n answer: ReactNode;\n}\n\nexport interface AccordionProps {\n items: AccordionItem[];\n classNames?: {\n questionWrapper?: string;\n buttonWrapper?: string;\n wrapper?: string;\n question?: string;\n answer?: string;\n icon?: string;\n markdown?: string;\n };\n multiple?: boolean;\n onClick?: (item: AccordionItem) => void;\n variant?: 'default' | 'bordered';\n};\n\nconst Accordion = ({\n items = [],\n classNames = {},\n variant = 'default',\n multiple = false,\n onClick,\n}: AccordionProps) => {\n const [selectedQuestionId, setSelectedQuestionId] = useState<(string[])>([]);\n const isDefaultVariant = variant === 'default';\n\n const handleClick = useCallback((questionData: AccordionItem) => {\n const { id } = questionData;\n if (selectedQuestionId.includes(id)) {\n if (!multiple) {\n setSelectedQuestionId([]);\n return\n }\n\n setSelectedQuestionId((selectedItems) => \n selectedItems.filter((selectedId) => selectedId !== id)\n );\n } else {\n onClick?.(questionData);\n setSelectedQuestionId((selectedIds) => [\n id, ...multiple ? selectedIds : [],\n ]);\n }\n }, [multiple, onClick, selectedQuestionId]);\n\n return (\n <div\n className={\n classnamesUtil(\n {\n 'br8': !isDefaultVariant,\n [styles.wrapperBordered]: !isDefaultVariant,\n }\n )\n }\n >\n {items.map((questionData) => {\n const { question, answer, id, icon } = questionData;\n const isOpen = selectedQuestionId.includes(id);\n\n return (\n <div\n key={id}\n className={classnamesUtil(\n classNames?.questionWrapper,\n styles.container,\n { [styles.containerBordered]: !isDefaultVariant }\n )}\n >\n <Card\n title={question}\n titleVariant=\"small\"\n density='compact'\n icon={icon}\n classNames={{\n icon: classnamesUtil(\n classNames?.icon,\n styles.icon,\n 'tc-grey-700',\n ),\n buttonWrapper: classnamesUtil(\n 'py8 my8',\n classNames?.buttonWrapper,\n styles.buttonWrapper, {\n [styles.buttonWrapperDefault]: isDefaultVariant,\n [styles.buttonWrapperOpen]: isOpen\n },\n ),\n wrapper: classnamesUtil(\n classNames?.wrapper,\n 'bg-transparent br0 py0',\n { 'pl0': isDefaultVariant },\n ),\n title: classnamesUtil(\n classNames?.question,\n styles.question,\n 'fw-bold', \n { [styles.questionOpen]: isOpen }\n ),\n ...classNames,\n }}\n dropShadow={false}\n onClick={() => handleClick(questionData)}\n aria-expanded={isOpen}\n actionIcon={\n <ChevronDownIcon\n className={classnamesUtil(styles.chevron, {\n [styles.chevronOpen]: isOpen\n })}\n size={20}\n noMargin\n />\n }\n />\n\n <AnimateHeight\n duration={300}\n height={isOpen ? 'auto' : 0}\n >\n <div \n className={classnamesUtil(\n classNames?.answer,\n 'tc-grey-600 pr16 pb24', \n { \n 'pl16': !isDefaultVariant,\n [styles?.answerIcon]: !isDefaultVariant && icon,\n [styles?.answerIconDefault]: isDefaultVariant && icon,\n },\n )}\n >\n {answer}\n </div>\n </AnimateHeight>\n </div>\n );\n })}\n </div>\n );\n};\n\nexport { Accordion };"],"names":["classNames","_jsx","classnamesUtil","_jsxs"],"mappings":";;;;;;;;;;;;;;;IA+BM,SAAS,GAAG,UAAC,EAMF;;QALf,aAAU,EAAV,KAAK,mBAAG,EAAE,KAAA,EACV,kBAAe,EAAfA,YAAU,mBAAG,EAAE,KAAA,EACf,eAAmB,EAAnB,OAAO,mBAAG,SAAS,KAAA,EACnB,gBAAgB,EAAhB,QAAQ,mBAAG,KAAK,KAAA,EAChB,OAAO,aAAA;IAED,IAAA,KAA8C,QAAQ,CAAa,EAAE,CAAC,EAArE,kBAAkB,QAAA,EAAE,qBAAqB,QAA4B,CAAC;IAC7E,IAAM,gBAAgB,GAAG,OAAO,KAAK,SAAS,CAAC;IAE/C,IAAM,WAAW,GAAG,WAAW,CAA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MAAM,CAAE,UAAU,IAAG,CAAC,gBAAgB,IAAI,IAAI;gCAC/C,GAAC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,iBAAiB,IAAG,gBAAgB,IAAI,IAAI;oCAExD,YAEE,MAAM,GACL,GACQ,KAtEX,EAAE,CAuEH,EACN;SACH,CAAC,GACE,EACN;AACJ;;;;"}
@@ -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', { 'bs-sm': dropShadow }, {
28
+ }, rest, { children: jsxs("div", { className: classNames('d-flex fd-column jc-center w100 ta-left br8', { 'bs-sm': dropShadow }, {
29
29
  compact: 'p16',
30
30
  balanced: 'p24',
31
31
  spacious: 'p32',
@@ -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',\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 tc-primary-500`,\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-grey-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,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U,aAAVA,YAAU,uBAAVA,YAAU,CAAE,KAAK,CAAC,YAC3D,KAAK,GACH,CACN,EAEA,KAAK,KACJC,YACE,SAAS,EAAEC,UAAc,CACvBF,YAAU,aAAVA,YAAU,uBAAVA,YAAU,CAAE,KAAK,EACjB;gDACE,KAAK,EAAE,MAAM;gDACb,MAAM,EAAE,MAAM;gDACd,KAAK,EAAE,KAAK;6CACb,CAAC,YAAgC,CAAC,CACpC,YAEA,KAAK,GACH,CACN,EAEA,WAAW,KACVC,aACE,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';\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 tc-primary-500`,\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-grey-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,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IACF,EAEL,QAAQ,IAAIA,aAAK,SAAS,EAAED,YAAU,aAAVA,YAAU,uBAAVA,YAAU,CAAE,QAAQ,YAAG,QAAQ,GAAO,IAC/D,IACF,EACN;AACJ;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@popsure/dirty-swan",
3
- "version": "0.53.1",
3
+ "version": "0.53.2",
4
4
  "author": "Vincent Audoire <vincent@getpopsure.com>",
5
5
  "license": "MIT",
6
6
  "private": false,
@@ -94,14 +94,16 @@ const Accordion = ({
94
94
  'tc-grey-700',
95
95
  ),
96
96
  buttonWrapper: classnamesUtil(
97
+ 'py8 my8',
97
98
  classNames?.buttonWrapper,
98
99
  styles.buttonWrapper, {
99
- [styles.buttonWrapperDefault]: isDefaultVariant
100
+ [styles.buttonWrapperDefault]: isDefaultVariant,
101
+ [styles.buttonWrapperOpen]: isOpen
100
102
  },
101
103
  ),
102
104
  wrapper: classnamesUtil(
103
105
  classNames?.wrapper,
104
- 'bg-transparent br0 px8 py8',
106
+ 'bg-transparent br0 py0',
105
107
  { 'pl0': isDefaultVariant },
106
108
  ),
107
109
  title: classnamesUtil(
@@ -133,8 +135,12 @@ const Accordion = ({
133
135
  <div
134
136
  className={classnamesUtil(
135
137
  classNames?.answer,
136
- 'tc-grey-600 pr16 pb16',
137
- { 'pl16': !isDefaultVariant },
138
+ 'tc-grey-600 pr16 pb24',
139
+ {
140
+ 'pl16': !isDefaultVariant,
141
+ [styles?.answerIcon]: !isDefaultVariant && icon,
142
+ [styles?.answerIconDefault]: isDefaultVariant && icon,
143
+ },
138
144
  )}
139
145
  >
140
146
  {answer}
@@ -25,17 +25,27 @@
25
25
  }
26
26
  }
27
27
 
28
+ .answer {
29
+ &Icon {
30
+ padding-left: 20px;
31
+ }
32
+
33
+ &IconDefault {
34
+ padding-left: 4px;
35
+ }
36
+ }
37
+
28
38
  .buttonWrapper {
29
39
  background-color: transparent!important;
30
40
  color: $ds-primary-500;
31
- margin-top: 8px;
32
- margin-bottom: 8px;
33
41
  outline-offset: -4px;
34
42
 
35
43
  &Default {
36
- margin-top: 12px;
37
- margin-bottom: 12px;
38
- outline-offset: -2px;
44
+ outline-offset: 0;
45
+ }
46
+
47
+ &Open {
48
+ margin-bottom: 4px !important;
39
49
  }
40
50
 
41
51
  &:hover,
@@ -81,7 +81,7 @@ const Card = <E extends ElementType = CardDefaultAsType>({
81
81
  >
82
82
  <div
83
83
  className={classNamesUtil(
84
- 'd-flex fd-column jc-center w100 ta-left',
84
+ 'd-flex fd-column jc-center w100 ta-left br8',
85
85
  { 'bs-sm': dropShadow },
86
86
  {
87
87
  compact: 'p16',