@popsure/dirty-swan 0.51.3 → 0.53.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/index.js +210 -39037
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/lib/components/accordion/index.d.ts +24 -0
- package/dist/cjs/lib/components/accordion/index.stories.d.ts +50 -0
- package/dist/cjs/lib/components/chip/index.d.ts +3 -2
- package/dist/cjs/lib/components/chip/index.stories.d.ts +35 -0
- package/dist/cjs/lib/components/comparisonTable/index.stories.d.ts +172 -0
- package/dist/cjs/lib/index.d.ts +1 -2
- package/dist/esm/{Calendar-ab50ad9c.js → Calendar-da0c3e4e.js} +1 -1
- package/dist/esm/{Calendar-ab50ad9c.js.map → Calendar-da0c3e4e.js.map} +1 -1
- package/dist/esm/components/accordion/index.js +56 -0
- package/dist/esm/components/accordion/index.js.map +1 -0
- package/dist/esm/components/accordion/index.stories.js +89 -0
- package/dist/esm/components/accordion/index.stories.js.map +1 -0
- package/dist/esm/components/autocompleteAddress/index.js +1 -1
- package/dist/esm/components/autocompleteAddress/index.stories.js +1 -1
- package/dist/esm/components/autocompleteAddress/index.test.js +2 -2
- package/dist/esm/components/badge/index.test.js +2 -2
- package/dist/esm/components/button/index.js +1 -1
- package/dist/esm/components/button/index.stories.js +1 -1
- package/dist/esm/components/button/index.test.js +2 -2
- package/dist/esm/components/cards/card/index.js +7 -7
- package/dist/esm/components/cards/card/index.js.map +1 -1
- package/dist/esm/components/cards/card/index.stories.js +1 -1
- package/dist/esm/components/cards/cardButton/index.js +1 -1
- package/dist/esm/components/cards/cardButton/index.stories.js +1 -1
- package/dist/esm/components/cards/index.js +1 -1
- package/dist/esm/components/cards/infoCard/index.js +1 -1
- package/dist/esm/components/cards/infoCard/index.stories.js +1 -1
- package/dist/esm/components/chip/index.js.map +1 -1
- package/dist/esm/components/chip/index.stories.js +70 -0
- package/dist/esm/components/chip/index.stories.js.map +1 -0
- package/dist/esm/components/comparisonTable/components/TableButton/index.test.js +3 -3
- package/dist/esm/components/comparisonTable/components/TableRowHeader/index.test.js +3 -3
- package/dist/esm/components/comparisonTable/index.js +1 -1
- package/dist/esm/components/comparisonTable/index.stories.js +308 -0
- package/dist/esm/components/comparisonTable/index.stories.js.map +1 -0
- package/dist/esm/components/dateSelector/components/Calendar.js +2 -2
- package/dist/esm/components/dateSelector/index.js +2 -2
- package/dist/esm/components/dateSelector/index.stories.js +2 -2
- package/dist/esm/components/dateSelector/index.test.js +3 -3
- package/dist/esm/components/downloadButton/index.js +1 -1
- package/dist/esm/components/downloadButton/index.stories.js +1 -1
- package/dist/esm/components/icon/icons/Arthritis.js +2 -2
- package/dist/esm/components/icon/icons/Arthritis.js.map +1 -1
- package/dist/esm/components/icon/icons/ChevronDown.js +2 -2
- package/dist/esm/components/icon/icons/ChevronDown.js.map +1 -1
- package/dist/esm/components/icon/icons/Cpu.js +2 -2
- package/dist/esm/components/icon/icons/Cpu.js.map +1 -1
- package/dist/esm/components/icon/icons/Wind.js +2 -2
- package/dist/esm/components/icon/icons/Wind.js.map +1 -1
- package/dist/esm/components/icon/icons/Zap.js +2 -2
- package/dist/esm/components/icon/icons/Zap.js.map +1 -1
- package/dist/esm/components/icon/icons.stories.js +2 -2
- package/dist/esm/components/icon/index.stories.js +1 -1
- package/dist/esm/components/informationBox/index.test.js +2 -2
- package/dist/esm/components/input/autoSuggestInput/index.js +1 -1
- package/dist/esm/components/input/autoSuggestInput/index.stories.js +1 -1
- package/dist/esm/components/input/autoSuggestMultiSelect/index.js +1 -1
- package/dist/esm/components/input/autoSuggestMultiSelect/index.stories.js +1 -1
- package/dist/esm/components/input/checkbox/index.js +1 -1
- package/dist/esm/components/input/checkbox/index.stories.js +1 -1
- package/dist/esm/components/input/checkbox/index.test.js +2 -2
- package/dist/esm/components/input/currency/index.js +1 -1
- package/dist/esm/components/input/currency/index.test.js +2 -2
- package/dist/esm/components/input/currency/input.stories.js +1 -1
- package/dist/esm/components/input/iban/index.js +1 -1
- package/dist/esm/components/input/index.js +1 -1
- package/dist/esm/components/input/input.stories.js +1 -1
- package/dist/esm/components/input/radio/index.test.js +2 -2
- package/dist/esm/components/input/toggle/index.js +1 -1
- package/dist/esm/components/input/toggle/index.stories.js +1 -1
- package/dist/esm/components/input/toggle/index.test.js +2 -2
- package/dist/esm/components/link/index.js +1 -1
- package/dist/esm/components/link/index.stories.js +1 -1
- package/dist/esm/components/modal/bottomModal/index.js +1 -1
- package/dist/esm/components/modal/bottomOrRegularModal/index.js +1 -1
- package/dist/esm/components/modal/genericModal/index.js +2 -2
- package/dist/esm/components/modal/genericModal/index.js.map +1 -1
- package/dist/esm/components/modal/index.stories.js +4 -11
- package/dist/esm/components/modal/index.stories.js.map +1 -1
- package/dist/esm/components/modal/regularModal/index.js +1 -1
- package/dist/esm/components/multiDropzone/index.js +1 -1
- package/dist/esm/components/multiDropzone/index.stories.js +1 -1
- package/dist/esm/components/multiDropzone/index.test.js +3 -3
- package/dist/esm/components/segmentedControl/index.test.js +2 -2
- package/dist/esm/components/signaturePad/index.js +1 -1
- package/dist/esm/components/signaturePad/index.stories.js +1 -1
- package/dist/esm/components/spinner/index.test.js +2 -2
- package/dist/esm/components/toast/index.js +2 -2
- package/dist/esm/components/toast/index.stories.js +2 -2
- package/dist/esm/components/toast/index.test.js +3 -3
- package/dist/esm/{customRender-7c4f92fb.js → customRender-b3d1dc00.js} +2 -2
- package/dist/esm/{customRender-7c4f92fb.js.map → customRender-b3d1dc00.js.map} +1 -1
- package/dist/esm/{extend-expect-6a57cfd5.js → extend-expect-5a71e666.js} +2 -2
- package/dist/esm/{extend-expect-6a57cfd5.js.map → extend-expect-5a71e666.js.map} +1 -1
- package/dist/esm/{index-df63ee5a.js → index-27e1f1cc.js} +11 -11
- package/dist/esm/{index-df63ee5a.js.map → index-27e1f1cc.js.map} +1 -1
- package/dist/esm/{index-5abf080f.js → index-2a2fcd04.js} +2 -2
- package/dist/esm/{index-5abf080f.js.map → index-2a2fcd04.js.map} +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +3 -9
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/lib/components/accordion/index.d.ts +24 -0
- package/dist/esm/lib/components/accordion/index.stories.d.ts +50 -0
- package/dist/esm/lib/components/chip/index.d.ts +3 -2
- package/dist/esm/lib/components/chip/index.stories.d.ts +35 -0
- package/dist/esm/lib/components/comparisonTable/index.stories.d.ts +172 -0
- package/dist/esm/lib/index.d.ts +1 -2
- package/dist/esm/{tslib.es6-5bc94358.js → tslib.es6-a39f91fc.js} +2 -2
- package/dist/esm/{tslib.es6-5bc94358.js.map → tslib.es6-a39f91fc.js.map} +1 -1
- package/dist/esm/util/images/index.stories.js +1 -1
- package/dist/esm/util/testUtils/customRender.js +2 -2
- package/package.json +2 -5
- package/src/index.tsx +0 -1
- package/src/lib/components/accordion/index.stories.tsx +85 -0
- package/src/lib/components/accordion/index.tsx +150 -0
- package/src/lib/components/accordion/style.module.scss +62 -0
- package/src/lib/components/cards/card/index.tsx +7 -6
- package/src/lib/components/cards/card/style.module.scss +5 -0
- package/src/lib/components/chip/index.stories.tsx +86 -0
- package/src/lib/components/chip/index.tsx +7 -5
- package/src/lib/components/comparisonTable/index.stories.tsx +360 -0
- package/src/lib/components/modal/genericModal/index.tsx +1 -0
- package/src/lib/components/modal/index.stories.tsx +7 -16
- package/src/lib/index.tsx +0 -2
- package/dist/cjs/lib/components/markdown/config.d.ts +0 -22
- package/dist/cjs/lib/components/markdown/index.d.ts +0 -10
- package/dist/cjs/lib/components/markdown/index.stories.d.ts +0 -39
- package/dist/esm/components/markdown/index.js +0 -38833
- package/dist/esm/components/markdown/index.js.map +0 -1
- package/dist/esm/components/markdown/index.stories.js +0 -61
- package/dist/esm/components/markdown/index.stories.js.map +0 -1
- package/dist/esm/lib/components/markdown/config.d.ts +0 -22
- package/dist/esm/lib/components/markdown/index.d.ts +0 -10
- package/dist/esm/lib/components/markdown/index.stories.d.ts +0 -39
- package/src/lib/components/chip/index.mdx +0 -95
- package/src/lib/components/comparisonTable/index.mdx +0 -570
- package/src/lib/components/markdown/config.ts +0 -45
- package/src/lib/components/markdown/index.stories.tsx +0 -185
- package/src/lib/components/markdown/index.tsx +0 -163
- package/src/lib/components/markdown/styles.module.scss +0 -37
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { Markdown } from './index.js';
|
|
3
|
-
import '../../tslib.es6-5bc94358.js';
|
|
4
|
-
import '../../style-inject.es-1f59c1d0.js';
|
|
5
|
-
import 'devlop';
|
|
6
|
-
import 'vfile/do-not-use-conditional-minpath';
|
|
7
|
-
import 'vfile/do-not-use-conditional-minproc';
|
|
8
|
-
import 'vfile/do-not-use-conditional-minurl';
|
|
9
|
-
import 'unist-util-visit-parents/do-not-use-color';
|
|
10
|
-
import '../../_commonjsHelpers-e7f67fd8.js';
|
|
11
|
-
|
|
12
|
-
var story = {
|
|
13
|
-
title: 'JSX/Markdown',
|
|
14
|
-
component: Markdown,
|
|
15
|
-
argTypes: {
|
|
16
|
-
children: {
|
|
17
|
-
description: 'MD content to be rendered in the component.',
|
|
18
|
-
},
|
|
19
|
-
className: {
|
|
20
|
-
description: 'This property allows to add custom styles to the component.',
|
|
21
|
-
},
|
|
22
|
-
renderRawMarkdownChild: {
|
|
23
|
-
description: 'This property allows to render the raw markdown child as a component.',
|
|
24
|
-
},
|
|
25
|
-
openLinksInNewTab: {
|
|
26
|
-
description: 'Wether link components rendered inside Markdown should open in a new tab (`target="_blank"`).',
|
|
27
|
-
},
|
|
28
|
-
styling: {
|
|
29
|
-
desription: 'This property allows to customize the styling of the markdown content.',
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
args: {
|
|
33
|
-
children: '## Title \n This is **our content**.',
|
|
34
|
-
className: '',
|
|
35
|
-
renderRawMarkdownChild: false,
|
|
36
|
-
openLinksInNewTab: false,
|
|
37
|
-
styling: {},
|
|
38
|
-
},
|
|
39
|
-
parameters: {
|
|
40
|
-
componentSubtitle: (jsxs(Fragment, { children: ["Display markdown text based on ", jsx("a", { href: "https://github.com/remarkjs/react-markdown", target: '_blank', rel: "noreferrer", children: "react-markdown" }), " with custom styling."] })),
|
|
41
|
-
},
|
|
42
|
-
};
|
|
43
|
-
var MarkdownStory = function (_a) {
|
|
44
|
-
var children = _a.children, className = _a.className;
|
|
45
|
-
return (jsx(Markdown, { className: className, children: children }));
|
|
46
|
-
};
|
|
47
|
-
MarkdownStory.storyName = "Markdown";
|
|
48
|
-
var AvailableMDComponents = function (_a) {
|
|
49
|
-
var className = _a.className;
|
|
50
|
-
return (jsx(Markdown, { className: className, children: "\n## Headers\nThe header options range from h1 to h4.\n\n```\n# H1\n## H2\n### H3\n#### H4\n```\n\n# H1 Lorem ipsum non sunt qui sunt\n\n## H2 Lorem ipsum non sunt qui sunt\n\n### H3 Lorem ipsum non sunt qui sunt\n\n#### H4 Lorem ipsum non sunt qui sunt\n\n## Emphasis\n\n```\nEmphasis or italics, use *asterisk* or _underscore_.\nStrong emphasis or bold, use **asterisks** or __underscores__.\nCombined emphasis, use **_asterisks and underscores_**.\n```\n\nEmphasis or italics, use _asterisk_ or _underscore_.\n\nStrong emphasis or bold, use **asterisks** or **underscores**.\n\nCombined emphasis, use **_asterisks and underscores_**.\n\n## Lists\n\n```\n1. First ordered list item\n2. Another item\n3. Actual numbers don't matter, just that it's a number\n4. And another item.\n\n* Unordered list can use asterisks\n- Or minuses\n+ Or pluses\n```\n\n1. First ordered list item\n2. Another item\n3. Actual numbers don't matter, just that it's a number\n4. And another item.\n\n- Unordered list can use asterisks\n- Or minuses\n- Or pluses\n\n## Links\n\nFor links markdown syntax should be used.\n\n```\n[This is an inline link](https://feather-insurance.com)\n```\n\n[This is an inline link](https://feather-insurance.com)\n\n## Inline code block\n\nInline code block can be set by using backtick or ```\n\n```\nIt is usefull to define a `variable` inside a text\n```\n\nIt is usefull to define a `variable` inside a text\n\n## Quote\n\nYou can use quote markdown by using `>` at the beginning of your text\n\n```\n> The busy man is least busy with living. - Seneca\n```\n\n> The busy man is least busy with living. - Seneca\n\n## Images\n\nImages markdown syntax is the following\n```\n\n```\n\n\n\n## Tables\n\nDefining a table in markdown is a bit tricky. You can use websites such as [tablesgenerator.com](https://www.tablesgenerator.com/markdown_tables) for help\n\n```\n| Department | Yearly spend | Category |\n|------------|--------------|----------|\n| Marketing | 150k\u20AC | `c` |\n| Sales | 200k\u20AC | `e` |\n| Product | 84k\u20AC | `f` |\n```\n\n| Department | Yearly spend | Category |\n|------------|--------------|----------|\n| Marketing | 150k\u20AC | `c` |\n| Sales | 200k\u20AC | `e` |\n| Product | 84k\u20AC | `f` |\n\n" }));
|
|
51
|
-
};
|
|
52
|
-
var AddingCustomComponents = function (_a) {
|
|
53
|
-
var className = _a.className, openLinksInNewTab = _a.openLinksInNewTab, renderRawMarkdownChild = _a.renderRawMarkdownChild;
|
|
54
|
-
return (jsx(Markdown, { className: className, openLinksInNewTab: openLinksInNewTab, styling: {
|
|
55
|
-
h6: 'tc-red-500'
|
|
56
|
-
}, renderRawMarkdownChild: renderRawMarkdownChild, children: "###### This is a custom H6 that will always be red" }));
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
export default story;
|
|
60
|
-
export { AddingCustomComponents, AvailableMDComponents, MarkdownStory };
|
|
61
|
-
//# sourceMappingURL=index.stories.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.stories.js","sources":["../../../../../src/lib/components/markdown/index.stories.tsx"],"sourcesContent":["import { render } from 'sass';\nimport { Markdown, MarkdownProps } from '.';\n\nconst story = {\n title: 'JSX/Markdown',\n component: Markdown,\n argTypes: {\n \n children: {\n description: 'MD content to be rendered in the component.',\n },\n className: {\n description: 'This property allows to add custom styles to the component.',\n },\n renderRawMarkdownChild: {\n description: 'This property allows to render the raw markdown child as a component.',\n },\n openLinksInNewTab: {\n description: 'Wether link components rendered inside Markdown should open in a new tab (`target=\"_blank\"`).',\n },\n styling: {\n desription: 'This property allows to customize the styling of the markdown content.',\n }\n },\n args: {\n children: '## Title \\n This is **our content**.',\n className: '',\n renderRawMarkdownChild: false,\n openLinksInNewTab: false,\n styling: {},\n },\n parameters: {\n componentSubtitle: (\n <>\n Display markdown text based on <a href=\"https://github.com/remarkjs/react-markdown\" target='_blank' rel=\"noreferrer\">react-markdown</a> with custom styling.\n </>\n ),\n },\n};\n\nexport const MarkdownStory = ({ children, className }: MarkdownProps) => (\n <Markdown className={className}>\n {children}\n </Markdown>\n);\n\nMarkdownStory.storyName = \"Markdown\";\n\nexport const AvailableMDComponents = ({ className }: MarkdownProps) => (\n <Markdown className={className}>\n {`\n## Headers\nThe header options range from h1 to h4.\n\n\\`\\`\\`\n# H1\n## H2\n### H3\n#### H4\n\\`\\`\\`\n\n# H1 Lorem ipsum non sunt qui sunt\n\n## H2 Lorem ipsum non sunt qui sunt\n\n### H3 Lorem ipsum non sunt qui sunt\n\n#### H4 Lorem ipsum non sunt qui sunt\n\n## Emphasis\n\n\\`\\`\\`\nEmphasis or italics, use *asterisk* or _underscore_.\nStrong emphasis or bold, use **asterisks** or __underscores__.\nCombined emphasis, use **_asterisks and underscores_**.\n\\`\\`\\`\n\nEmphasis or italics, use _asterisk_ or _underscore_.\n\nStrong emphasis or bold, use **asterisks** or **underscores**.\n\nCombined emphasis, use **_asterisks and underscores_**.\n\n## Lists\n\n\\`\\`\\`\n1. First ordered list item\n2. Another item\n3. Actual numbers don't matter, just that it's a number\n4. And another item.\n\n* Unordered list can use asterisks\n- Or minuses\n+ Or pluses\n\\`\\`\\`\n\n1. First ordered list item\n2. Another item\n3. Actual numbers don't matter, just that it's a number\n4. And another item.\n\n- Unordered list can use asterisks\n- Or minuses\n- Or pluses\n\n## Links\n\nFor links markdown syntax should be used.\n\n\\`\\`\\`\n[This is an inline link](https://feather-insurance.com)\n\\`\\`\\`\n\n[This is an inline link](https://feather-insurance.com)\n\n## Inline code block\n\nInline code block can be set by using backtick or \\`\\`\\`\n\n\\`\\`\\`\nIt is usefull to define a \\`variable\\` inside a text\n\\`\\`\\`\n\nIt is usefull to define a \\`variable\\` inside a text\n\n## Quote\n\nYou can use quote markdown by using \\`>\\` at the beginning of your text\n\n\\`\\`\\`\n> The busy man is least busy with living. - Seneca\n\\`\\`\\`\n\n> The busy man is least busy with living. - Seneca\n\n## Images\n\nImages markdown syntax is the following\n\\`\\`\\`\n\n\\`\\`\\`\n\n\n\n## Tables\n\nDefining a table in markdown is a bit tricky. You can use websites such as [tablesgenerator.com](https://www.tablesgenerator.com/markdown_tables) for help\n\n\\`\\`\\`\n| Department | Yearly spend | Category |\n|------------|--------------|----------|\n| Marketing | 150k€ | \\`c\\` |\n| Sales | 200k€ | \\`e\\` |\n| Product | 84k€ | \\`f\\` |\n\\`\\`\\`\n\n| Department | Yearly spend | Category |\n|------------|--------------|----------|\n| Marketing | 150k€ | \\`c\\` |\n| Sales | 200k€ | \\`e\\` |\n| Product | 84k€ | \\`f\\` |\n\n`}\n </Markdown>\n);\n\nexport const AddingCustomComponents = ({ \n className,\n openLinksInNewTab,\n renderRawMarkdownChild\n }: MarkdownProps) => (\n <Markdown\n className={className}\n openLinksInNewTab={openLinksInNewTab}\n styling={{\n h6: 'tc-red-500'\n }}\n renderRawMarkdownChild={renderRawMarkdownChild}\n\n >\n ###### This is a custom H6 that will always be red\n </Markdown>\n);\n\nexport default story;\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;;;;;;;IAGM,KAAK,GAAG;IACZ,KAAK,EAAE,cAAc;IACrB,SAAS,EAAE,QAAQ;IACnB,QAAQ,EAAE;QAER,QAAQ,EAAE;YACR,WAAW,EAAE,6CAA6C;SAC3D;QACD,SAAS,EAAE;YACT,WAAW,EAAE,6DAA6D;SAC3E;QACD,sBAAsB,EAAE;YACtB,WAAW,EAAE,uEAAuE;SACrF;QACD,iBAAiB,EAAE;YACjB,WAAW,EAAE,+FAA+F;SAC7G;QACD,OAAO,EAAE;YACP,UAAU,EAAE,wEAAwE;SACrF;KACF;IACD,IAAI,EAAE;QACJ,QAAQ,EAAE,sCAAsC;QAChD,SAAS,EAAE,EAAE;QACb,sBAAsB,EAAE,KAAK;QAC7B,iBAAiB,EAAE,KAAK;QACxB,OAAO,EAAE,EAAE;KACZ;IACD,UAAU,EAAE;QACV,iBAAiB,GACfA,+DACiCC,WAAG,IAAI,EAAC,4CAA4C,EAAC,MAAM,EAAC,QAAQ,EAAC,GAAG,EAAC,YAAY,+BAAmB,6BACtI,CACJ;KACF;EACD;IAEW,aAAa,GAAG,UAAC,EAAsC;QAApC,QAAQ,cAAA,EAAE,SAAS,eAAA;IAAsB,QACvEA,IAAC,QAAQ,IAAC,SAAS,EAAE,SAAS,YAC3B,QAAQ,GACA;AAH4D,EAIvE;AAEF,aAAa,CAAC,SAAS,GAAG,UAAU,CAAC;IAExB,qBAAqB,GAAG,UAAC,EAA4B;QAA1B,SAAS,eAAA;IAAsB,QACrEA,IAAC,QAAQ,IAAC,SAAS,EAAE,SAAS,YAC3B,4hFAgHJ,GACY;AAnH0D,EAoHrE;IAEW,sBAAsB,GAAG,UAAC,EAItB;QAHf,SAAS,eAAA,EACT,iBAAiB,uBAAA,EACjB,sBAAsB,4BAAA;IACF,QACpBA,IAAC,QAAQ,IACP,SAAS,EAAE,SAAS,EACpB,iBAAiB,EAAE,iBAAiB,EACpC,OAAO,EAAE;YACP,EAAE,EAAE,YAAY;SACjB,EACD,sBAAsB,EAAE,sBAAsB,mEAIrC;AAXS;;;;;"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export interface MarkdownStyling {
|
|
2
|
-
a: string;
|
|
3
|
-
p: string;
|
|
4
|
-
h1: string;
|
|
5
|
-
h2: string;
|
|
6
|
-
h3: string;
|
|
7
|
-
h4: string;
|
|
8
|
-
h5: string;
|
|
9
|
-
h6: string;
|
|
10
|
-
ol: string;
|
|
11
|
-
ul: string;
|
|
12
|
-
strong: string;
|
|
13
|
-
em: string;
|
|
14
|
-
table: string;
|
|
15
|
-
th: string;
|
|
16
|
-
tr: string;
|
|
17
|
-
td: string;
|
|
18
|
-
blockquote: string;
|
|
19
|
-
code: string;
|
|
20
|
-
pre: string;
|
|
21
|
-
}
|
|
22
|
-
export declare const defaultStyling: MarkdownStyling;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { MarkdownStyling } from './config';
|
|
2
|
-
export interface MarkdownProps {
|
|
3
|
-
children: string;
|
|
4
|
-
className?: string;
|
|
5
|
-
openLinksInNewTab?: boolean;
|
|
6
|
-
styling?: Partial<MarkdownStyling>;
|
|
7
|
-
renderRawMarkdownChild?: boolean;
|
|
8
|
-
}
|
|
9
|
-
declare const Markdown: ({ children: rawMarkdownChild, className, openLinksInNewTab, styling: rawStyling, renderRawMarkdownChild }: MarkdownProps) => JSX.Element;
|
|
10
|
-
export { Markdown };
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { MarkdownProps } from '.';
|
|
2
|
-
declare const story: {
|
|
3
|
-
title: string;
|
|
4
|
-
component: ({ children: rawMarkdownChild, className, openLinksInNewTab, styling: rawStyling, renderRawMarkdownChild }: MarkdownProps) => JSX.Element;
|
|
5
|
-
argTypes: {
|
|
6
|
-
children: {
|
|
7
|
-
description: string;
|
|
8
|
-
};
|
|
9
|
-
className: {
|
|
10
|
-
description: string;
|
|
11
|
-
};
|
|
12
|
-
renderRawMarkdownChild: {
|
|
13
|
-
description: string;
|
|
14
|
-
};
|
|
15
|
-
openLinksInNewTab: {
|
|
16
|
-
description: string;
|
|
17
|
-
};
|
|
18
|
-
styling: {
|
|
19
|
-
desription: string;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
args: {
|
|
23
|
-
children: string;
|
|
24
|
-
className: string;
|
|
25
|
-
renderRawMarkdownChild: boolean;
|
|
26
|
-
openLinksInNewTab: boolean;
|
|
27
|
-
styling: {};
|
|
28
|
-
};
|
|
29
|
-
parameters: {
|
|
30
|
-
componentSubtitle: JSX.Element;
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
export declare const MarkdownStory: {
|
|
34
|
-
({ children, className }: MarkdownProps): JSX.Element;
|
|
35
|
-
storyName: string;
|
|
36
|
-
};
|
|
37
|
-
export declare const AvailableMDComponents: ({ className }: MarkdownProps) => JSX.Element;
|
|
38
|
-
export declare const AddingCustomComponents: ({ className, openLinksInNewTab, renderRawMarkdownChild }: MarkdownProps) => JSX.Element;
|
|
39
|
-
export default story;
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import { useState } from 'react';
|
|
2
|
-
import { Meta } from '@storybook/blocks';
|
|
3
|
-
|
|
4
|
-
import Chip from '.';
|
|
5
|
-
import featherLogo from '../cards/icons/feather-logo.svg';
|
|
6
|
-
|
|
7
|
-
<Meta title="JSX/Chip" />
|
|
8
|
-
|
|
9
|
-
# Chip
|
|
10
|
-
|
|
11
|
-
Chip component displays text and image (optional) of given values.
|
|
12
|
-
|
|
13
|
-
The X button in the right calls the prop `onRemove` function to keep track of removed selected values.
|
|
14
|
-
|
|
15
|
-
<iframe width="100%" height="450" src="https://www.figma.com/embed?embed_host=share&url=https%3A%2F%2Fwww.figma.com%2Ffile%2FMKs4cbojdVOBKUxv7okb93%2FDirty-Swan-Design-System%3Fnode-id%3D245%253A42" allowFullScreen />
|
|
16
|
-
|
|
17
|
-
## Example
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
export const ChipStory = () => {
|
|
21
|
-
const values = [
|
|
22
|
-
{ value: 'feather', leftIcon: featherLogo },
|
|
23
|
-
{ value: 'feather2', leftIcon: featherLogo },
|
|
24
|
-
{
|
|
25
|
-
value: 'feather3',
|
|
26
|
-
leftIcon: featherLogo,
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
value: 'dirtyswan',
|
|
30
|
-
leftIcon: featherLogo,
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
value: 'test value',
|
|
34
|
-
leftIcon: featherLogo,
|
|
35
|
-
},
|
|
36
|
-
];
|
|
37
|
-
const [selectedValues, setSelectedValues] = useState(values);
|
|
38
|
-
return (
|
|
39
|
-
<div style={{ display: 'flex', flexWrap: 'wrap' }}>
|
|
40
|
-
{selectedValues.map((value) => (
|
|
41
|
-
<Chip
|
|
42
|
-
value={value}
|
|
43
|
-
onRemove={(value) => {
|
|
44
|
-
const newValues = [...selectedValues].filter(
|
|
45
|
-
(selectedValue) => selectedValue.value !== value.value
|
|
46
|
-
);
|
|
47
|
-
setSelectedValues(newValues);
|
|
48
|
-
}}
|
|
49
|
-
/>
|
|
50
|
-
))}
|
|
51
|
-
</div>
|
|
52
|
-
);
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
<ChipStory />
|
|
56
|
-
|
|
57
|
-
```typescript
|
|
58
|
-
import React, { useState } from 'react';
|
|
59
|
-
import { Chip } from '@popsure/dirty-swan';
|
|
60
|
-
|
|
61
|
-
export default () => {
|
|
62
|
-
const values = [
|
|
63
|
-
{ value: 'feather', leftIcon: featherLogo },
|
|
64
|
-
{ value: 'feather2', leftIcon: featherLogo },
|
|
65
|
-
{
|
|
66
|
-
value: 'feather3',
|
|
67
|
-
leftIcon: featherLogo,
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
value: 'dirtyswan',
|
|
71
|
-
leftIcon: featherLogo,
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
value: 'test value',
|
|
75
|
-
leftIcon: featherLogo,
|
|
76
|
-
},
|
|
77
|
-
];
|
|
78
|
-
const [selectedValues, setSelectedValues] = useState(values);
|
|
79
|
-
return (
|
|
80
|
-
<div style={{ display: 'flex', flexWrap: 'wrap' }}>
|
|
81
|
-
{selectedValues.map((value) => (
|
|
82
|
-
<Chip
|
|
83
|
-
value={value}
|
|
84
|
-
onRemove={(value) => {
|
|
85
|
-
const newValues = [...selectedValues].filter(
|
|
86
|
-
(selectedValue) => selectedValue.value !== value.value
|
|
87
|
-
);
|
|
88
|
-
setSelectedValues(newValues);
|
|
89
|
-
}}
|
|
90
|
-
/>
|
|
91
|
-
))}
|
|
92
|
-
</div>
|
|
93
|
-
);
|
|
94
|
-
};
|
|
95
|
-
```
|