@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.
Files changed (143) hide show
  1. package/dist/cjs/index.d.ts +1 -1
  2. package/dist/cjs/index.js +210 -39037
  3. package/dist/cjs/index.js.map +1 -1
  4. package/dist/cjs/lib/components/accordion/index.d.ts +24 -0
  5. package/dist/cjs/lib/components/accordion/index.stories.d.ts +50 -0
  6. package/dist/cjs/lib/components/chip/index.d.ts +3 -2
  7. package/dist/cjs/lib/components/chip/index.stories.d.ts +35 -0
  8. package/dist/cjs/lib/components/comparisonTable/index.stories.d.ts +172 -0
  9. package/dist/cjs/lib/index.d.ts +1 -2
  10. package/dist/esm/{Calendar-ab50ad9c.js → Calendar-da0c3e4e.js} +1 -1
  11. package/dist/esm/{Calendar-ab50ad9c.js.map → Calendar-da0c3e4e.js.map} +1 -1
  12. package/dist/esm/components/accordion/index.js +56 -0
  13. package/dist/esm/components/accordion/index.js.map +1 -0
  14. package/dist/esm/components/accordion/index.stories.js +89 -0
  15. package/dist/esm/components/accordion/index.stories.js.map +1 -0
  16. package/dist/esm/components/autocompleteAddress/index.js +1 -1
  17. package/dist/esm/components/autocompleteAddress/index.stories.js +1 -1
  18. package/dist/esm/components/autocompleteAddress/index.test.js +2 -2
  19. package/dist/esm/components/badge/index.test.js +2 -2
  20. package/dist/esm/components/button/index.js +1 -1
  21. package/dist/esm/components/button/index.stories.js +1 -1
  22. package/dist/esm/components/button/index.test.js +2 -2
  23. package/dist/esm/components/cards/card/index.js +7 -7
  24. package/dist/esm/components/cards/card/index.js.map +1 -1
  25. package/dist/esm/components/cards/card/index.stories.js +1 -1
  26. package/dist/esm/components/cards/cardButton/index.js +1 -1
  27. package/dist/esm/components/cards/cardButton/index.stories.js +1 -1
  28. package/dist/esm/components/cards/index.js +1 -1
  29. package/dist/esm/components/cards/infoCard/index.js +1 -1
  30. package/dist/esm/components/cards/infoCard/index.stories.js +1 -1
  31. package/dist/esm/components/chip/index.js.map +1 -1
  32. package/dist/esm/components/chip/index.stories.js +70 -0
  33. package/dist/esm/components/chip/index.stories.js.map +1 -0
  34. package/dist/esm/components/comparisonTable/components/TableButton/index.test.js +3 -3
  35. package/dist/esm/components/comparisonTable/components/TableRowHeader/index.test.js +3 -3
  36. package/dist/esm/components/comparisonTable/index.js +1 -1
  37. package/dist/esm/components/comparisonTable/index.stories.js +308 -0
  38. package/dist/esm/components/comparisonTable/index.stories.js.map +1 -0
  39. package/dist/esm/components/dateSelector/components/Calendar.js +2 -2
  40. package/dist/esm/components/dateSelector/index.js +2 -2
  41. package/dist/esm/components/dateSelector/index.stories.js +2 -2
  42. package/dist/esm/components/dateSelector/index.test.js +3 -3
  43. package/dist/esm/components/downloadButton/index.js +1 -1
  44. package/dist/esm/components/downloadButton/index.stories.js +1 -1
  45. package/dist/esm/components/icon/icons/Arthritis.js +2 -2
  46. package/dist/esm/components/icon/icons/Arthritis.js.map +1 -1
  47. package/dist/esm/components/icon/icons/ChevronDown.js +2 -2
  48. package/dist/esm/components/icon/icons/ChevronDown.js.map +1 -1
  49. package/dist/esm/components/icon/icons/Cpu.js +2 -2
  50. package/dist/esm/components/icon/icons/Cpu.js.map +1 -1
  51. package/dist/esm/components/icon/icons/Wind.js +2 -2
  52. package/dist/esm/components/icon/icons/Wind.js.map +1 -1
  53. package/dist/esm/components/icon/icons/Zap.js +2 -2
  54. package/dist/esm/components/icon/icons/Zap.js.map +1 -1
  55. package/dist/esm/components/icon/icons.stories.js +2 -2
  56. package/dist/esm/components/icon/index.stories.js +1 -1
  57. package/dist/esm/components/informationBox/index.test.js +2 -2
  58. package/dist/esm/components/input/autoSuggestInput/index.js +1 -1
  59. package/dist/esm/components/input/autoSuggestInput/index.stories.js +1 -1
  60. package/dist/esm/components/input/autoSuggestMultiSelect/index.js +1 -1
  61. package/dist/esm/components/input/autoSuggestMultiSelect/index.stories.js +1 -1
  62. package/dist/esm/components/input/checkbox/index.js +1 -1
  63. package/dist/esm/components/input/checkbox/index.stories.js +1 -1
  64. package/dist/esm/components/input/checkbox/index.test.js +2 -2
  65. package/dist/esm/components/input/currency/index.js +1 -1
  66. package/dist/esm/components/input/currency/index.test.js +2 -2
  67. package/dist/esm/components/input/currency/input.stories.js +1 -1
  68. package/dist/esm/components/input/iban/index.js +1 -1
  69. package/dist/esm/components/input/index.js +1 -1
  70. package/dist/esm/components/input/input.stories.js +1 -1
  71. package/dist/esm/components/input/radio/index.test.js +2 -2
  72. package/dist/esm/components/input/toggle/index.js +1 -1
  73. package/dist/esm/components/input/toggle/index.stories.js +1 -1
  74. package/dist/esm/components/input/toggle/index.test.js +2 -2
  75. package/dist/esm/components/link/index.js +1 -1
  76. package/dist/esm/components/link/index.stories.js +1 -1
  77. package/dist/esm/components/modal/bottomModal/index.js +1 -1
  78. package/dist/esm/components/modal/bottomOrRegularModal/index.js +1 -1
  79. package/dist/esm/components/modal/genericModal/index.js +2 -2
  80. package/dist/esm/components/modal/genericModal/index.js.map +1 -1
  81. package/dist/esm/components/modal/index.stories.js +4 -11
  82. package/dist/esm/components/modal/index.stories.js.map +1 -1
  83. package/dist/esm/components/modal/regularModal/index.js +1 -1
  84. package/dist/esm/components/multiDropzone/index.js +1 -1
  85. package/dist/esm/components/multiDropzone/index.stories.js +1 -1
  86. package/dist/esm/components/multiDropzone/index.test.js +3 -3
  87. package/dist/esm/components/segmentedControl/index.test.js +2 -2
  88. package/dist/esm/components/signaturePad/index.js +1 -1
  89. package/dist/esm/components/signaturePad/index.stories.js +1 -1
  90. package/dist/esm/components/spinner/index.test.js +2 -2
  91. package/dist/esm/components/toast/index.js +2 -2
  92. package/dist/esm/components/toast/index.stories.js +2 -2
  93. package/dist/esm/components/toast/index.test.js +3 -3
  94. package/dist/esm/{customRender-7c4f92fb.js → customRender-b3d1dc00.js} +2 -2
  95. package/dist/esm/{customRender-7c4f92fb.js.map → customRender-b3d1dc00.js.map} +1 -1
  96. package/dist/esm/{extend-expect-6a57cfd5.js → extend-expect-5a71e666.js} +2 -2
  97. package/dist/esm/{extend-expect-6a57cfd5.js.map → extend-expect-5a71e666.js.map} +1 -1
  98. package/dist/esm/{index-df63ee5a.js → index-27e1f1cc.js} +11 -11
  99. package/dist/esm/{index-df63ee5a.js.map → index-27e1f1cc.js.map} +1 -1
  100. package/dist/esm/{index-5abf080f.js → index-2a2fcd04.js} +2 -2
  101. package/dist/esm/{index-5abf080f.js.map → index-2a2fcd04.js.map} +1 -1
  102. package/dist/esm/index.d.ts +1 -1
  103. package/dist/esm/index.js +3 -9
  104. package/dist/esm/index.js.map +1 -1
  105. package/dist/esm/lib/components/accordion/index.d.ts +24 -0
  106. package/dist/esm/lib/components/accordion/index.stories.d.ts +50 -0
  107. package/dist/esm/lib/components/chip/index.d.ts +3 -2
  108. package/dist/esm/lib/components/chip/index.stories.d.ts +35 -0
  109. package/dist/esm/lib/components/comparisonTable/index.stories.d.ts +172 -0
  110. package/dist/esm/lib/index.d.ts +1 -2
  111. package/dist/esm/{tslib.es6-5bc94358.js → tslib.es6-a39f91fc.js} +2 -2
  112. package/dist/esm/{tslib.es6-5bc94358.js.map → tslib.es6-a39f91fc.js.map} +1 -1
  113. package/dist/esm/util/images/index.stories.js +1 -1
  114. package/dist/esm/util/testUtils/customRender.js +2 -2
  115. package/package.json +2 -5
  116. package/src/index.tsx +0 -1
  117. package/src/lib/components/accordion/index.stories.tsx +85 -0
  118. package/src/lib/components/accordion/index.tsx +150 -0
  119. package/src/lib/components/accordion/style.module.scss +62 -0
  120. package/src/lib/components/cards/card/index.tsx +7 -6
  121. package/src/lib/components/cards/card/style.module.scss +5 -0
  122. package/src/lib/components/chip/index.stories.tsx +86 -0
  123. package/src/lib/components/chip/index.tsx +7 -5
  124. package/src/lib/components/comparisonTable/index.stories.tsx +360 -0
  125. package/src/lib/components/modal/genericModal/index.tsx +1 -0
  126. package/src/lib/components/modal/index.stories.tsx +7 -16
  127. package/src/lib/index.tsx +0 -2
  128. package/dist/cjs/lib/components/markdown/config.d.ts +0 -22
  129. package/dist/cjs/lib/components/markdown/index.d.ts +0 -10
  130. package/dist/cjs/lib/components/markdown/index.stories.d.ts +0 -39
  131. package/dist/esm/components/markdown/index.js +0 -38833
  132. package/dist/esm/components/markdown/index.js.map +0 -1
  133. package/dist/esm/components/markdown/index.stories.js +0 -61
  134. package/dist/esm/components/markdown/index.stories.js.map +0 -1
  135. package/dist/esm/lib/components/markdown/config.d.ts +0 -22
  136. package/dist/esm/lib/components/markdown/index.d.ts +0 -10
  137. package/dist/esm/lib/components/markdown/index.stories.d.ts +0 -39
  138. package/src/lib/components/chip/index.mdx +0 -95
  139. package/src/lib/components/comparisonTable/index.mdx +0 -570
  140. package/src/lib/components/markdown/config.ts +0 -45
  141. package/src/lib/components/markdown/index.stories.tsx +0 -185
  142. package/src/lib/components/markdown/index.tsx +0 -163
  143. package/src/lib/components/markdown/styles.module.scss +0 -37
@@ -1,185 +0,0 @@
1
- import { render } from 'sass';
2
- import { Markdown, MarkdownProps } from '.';
3
-
4
- const story = {
5
- title: 'JSX/Markdown',
6
- component: Markdown,
7
- argTypes: {
8
-
9
- children: {
10
- description: 'MD content to be rendered in the component.',
11
- },
12
- className: {
13
- description: 'This property allows to add custom styles to the component.',
14
- },
15
- renderRawMarkdownChild: {
16
- description: 'This property allows to render the raw markdown child as a component.',
17
- },
18
- openLinksInNewTab: {
19
- description: 'Wether link components rendered inside Markdown should open in a new tab (`target="_blank"`).',
20
- },
21
- styling: {
22
- desription: 'This property allows to customize the styling of the markdown content.',
23
- }
24
- },
25
- args: {
26
- children: '## Title \n This is **our content**.',
27
- className: '',
28
- renderRawMarkdownChild: false,
29
- openLinksInNewTab: false,
30
- styling: {},
31
- },
32
- parameters: {
33
- componentSubtitle: (
34
- <>
35
- Display markdown text based on <a href="https://github.com/remarkjs/react-markdown" target='_blank' rel="noreferrer">react-markdown</a> with custom styling.
36
- </>
37
- ),
38
- },
39
- };
40
-
41
- export const MarkdownStory = ({ children, className }: MarkdownProps) => (
42
- <Markdown className={className}>
43
- {children}
44
- </Markdown>
45
- );
46
-
47
- MarkdownStory.storyName = "Markdown";
48
-
49
- export const AvailableMDComponents = ({ className }: MarkdownProps) => (
50
- <Markdown className={className}>
51
- {`
52
- ## Headers
53
- The header options range from h1 to h4.
54
-
55
- \`\`\`
56
- # H1
57
- ## H2
58
- ### H3
59
- #### H4
60
- \`\`\`
61
-
62
- # H1 Lorem ipsum non sunt qui sunt
63
-
64
- ## H2 Lorem ipsum non sunt qui sunt
65
-
66
- ### H3 Lorem ipsum non sunt qui sunt
67
-
68
- #### H4 Lorem ipsum non sunt qui sunt
69
-
70
- ## Emphasis
71
-
72
- \`\`\`
73
- Emphasis or italics, use *asterisk* or _underscore_.
74
- Strong emphasis or bold, use **asterisks** or __underscores__.
75
- Combined emphasis, use **_asterisks and underscores_**.
76
- \`\`\`
77
-
78
- Emphasis or italics, use _asterisk_ or _underscore_.
79
-
80
- Strong emphasis or bold, use **asterisks** or **underscores**.
81
-
82
- Combined emphasis, use **_asterisks and underscores_**.
83
-
84
- ## Lists
85
-
86
- \`\`\`
87
- 1. First ordered list item
88
- 2. Another item
89
- 3. Actual numbers don't matter, just that it's a number
90
- 4. And another item.
91
-
92
- * Unordered list can use asterisks
93
- - Or minuses
94
- + Or pluses
95
- \`\`\`
96
-
97
- 1. First ordered list item
98
- 2. Another item
99
- 3. Actual numbers don't matter, just that it's a number
100
- 4. And another item.
101
-
102
- - Unordered list can use asterisks
103
- - Or minuses
104
- - Or pluses
105
-
106
- ## Links
107
-
108
- For links markdown syntax should be used.
109
-
110
- \`\`\`
111
- [This is an inline link](https://feather-insurance.com)
112
- \`\`\`
113
-
114
- [This is an inline link](https://feather-insurance.com)
115
-
116
- ## Inline code block
117
-
118
- Inline code block can be set by using backtick or \`\`\`
119
-
120
- \`\`\`
121
- It is usefull to define a \`variable\` inside a text
122
- \`\`\`
123
-
124
- It is usefull to define a \`variable\` inside a text
125
-
126
- ## Quote
127
-
128
- You can use quote markdown by using \`>\` at the beginning of your text
129
-
130
- \`\`\`
131
- > The busy man is least busy with living. - Seneca
132
- \`\`\`
133
-
134
- > The busy man is least busy with living. - Seneca
135
-
136
- ## Images
137
-
138
- Images markdown syntax is the following
139
- \`\`\`
140
- ![Feather logo](https://feather-website.cdn.prismic.io/feather-website/88519fe0-d85f-47d3-83d7-20a74ee94591_feather-logo-icon.svg)
141
- \`\`\`
142
-
143
- ![Feather logo](https://feather-website.cdn.prismic.io/feather-website/88519fe0-d85f-47d3-83d7-20a74ee94591_feather-logo-icon.svg)
144
-
145
- ## Tables
146
-
147
- Defining a table in markdown is a bit tricky. You can use websites such as [tablesgenerator.com](https://www.tablesgenerator.com/markdown_tables) for help
148
-
149
- \`\`\`
150
- | Department | Yearly spend | Category |
151
- |------------|--------------|----------|
152
- | Marketing | 150k€ | \`c\` |
153
- | Sales | 200k€ | \`e\` |
154
- | Product | 84k€ | \`f\` |
155
- \`\`\`
156
-
157
- | Department | Yearly spend | Category |
158
- |------------|--------------|----------|
159
- | Marketing | 150k€ | \`c\` |
160
- | Sales | 200k€ | \`e\` |
161
- | Product | 84k€ | \`f\` |
162
-
163
- `}
164
- </Markdown>
165
- );
166
-
167
- export const AddingCustomComponents = ({
168
- className,
169
- openLinksInNewTab,
170
- renderRawMarkdownChild
171
- }: MarkdownProps) => (
172
- <Markdown
173
- className={className}
174
- openLinksInNewTab={openLinksInNewTab}
175
- styling={{
176
- h6: 'tc-red-500'
177
- }}
178
- renderRawMarkdownChild={renderRawMarkdownChild}
179
-
180
- >
181
- ###### This is a custom H6 that will always be red
182
- </Markdown>
183
- );
184
-
185
- export default story;
@@ -1,163 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import ReactMarkdown from 'react-markdown';
3
- import rehypeRaw from 'rehype-raw';
4
- import remarkDirective from 'remark-directive';
5
- import remarkGfm from 'remark-gfm';
6
-
7
- import { MarkdownStyling, defaultStyling } from './config';
8
-
9
- type ComponentProps = {
10
- children?: ReactNode;
11
- }
12
-
13
- export interface MarkdownProps {
14
- children: string;
15
- className?: string;
16
- openLinksInNewTab?: boolean;
17
- styling?: Partial<MarkdownStyling>;
18
- renderRawMarkdownChild?: boolean;
19
- }
20
-
21
- const Markdown = ({
22
- children: rawMarkdownChild,
23
- className = '',
24
- openLinksInNewTab = false,
25
- styling: rawStyling,
26
- renderRawMarkdownChild = false
27
- }: MarkdownProps) => {
28
- const styling = { ...defaultStyling, ...rawStyling };
29
-
30
- if (renderRawMarkdownChild) {
31
- return <>{rawMarkdownChild}</>;
32
- }
33
-
34
- const Link = ({ children, href }: ComponentProps & { href?: string }) =>
35
- openLinksInNewTab ? (
36
- <a href={href} className={styling.a} target="_blank" rel="noreferrer">
37
- {children}
38
- </a>
39
- ) : (
40
- <a href={href} className={styling.a}>
41
- {children}
42
- </a>
43
- );
44
-
45
- const Paragraph = ({ children }: ComponentProps) => (
46
- <p className={styling.p}>{children}</p>
47
- );
48
-
49
- const Heading = ({
50
- children,
51
- node,
52
- }: ComponentProps & { node?: { tagName: string } }) => {
53
- switch (node?.tagName) {
54
- case 'h1':
55
- return <h1 className={styling.h1}>{children}</h1>;
56
- case 'h2':
57
- return <h2 className={styling.h2}>{children}</h2>;
58
- case 'h3':
59
- return <h3 className={styling.h3}>{children}</h3>;
60
- case 'h4':
61
- return <h4 className={styling.h4}>{children}</h4>;
62
- case 'h5':
63
- return <h5 className={styling.h5}>{children}</h5>;
64
- case 'h6':
65
- return <h6 className={styling.h6}>{children}</h6>;
66
- default:
67
- return <p>{children}</p>;
68
- }
69
- };
70
-
71
- const UList = ({ children }: ComponentProps) => {
72
- return <ul className={styling.ul}>{children}</ul>;
73
- };
74
-
75
- const OList = ({ children }: ComponentProps) => {
76
- return <ol className={styling.ol}>{children}</ol>;
77
- };
78
-
79
- const Strong = ({ children }: ComponentProps) => {
80
- return <strong className={styling.strong}>{children}</strong>;
81
- };
82
-
83
- const Emphasis = ({ children }: ComponentProps) => {
84
- return <em className={styling.em}>{children}</em>;
85
- };
86
-
87
- const Table = ({ children }: ComponentProps) => {
88
- return <table className={styling.table}>{children}</table>;
89
- };
90
-
91
- const TableRow = ({ children }: ComponentProps) => {
92
- return <tr className={styling.tr}>{children}</tr>;
93
- };
94
-
95
- const TableCell = ({ children }: ComponentProps) => {
96
- return <td className={styling.td}>{children}</td>;
97
- };
98
-
99
- const TableHeader = ({ children }: ComponentProps) => {
100
- return <th className={styling.th}>{children}</th>;
101
- };
102
-
103
- const Image = ({
104
- src,
105
- alt,
106
- ...props
107
- }: {
108
- src?: string | undefined;
109
- alt?: string | undefined;
110
- }) => {
111
- return (
112
- <a href={src} target="_blank" rel="noreferrer noreferrer">
113
- <img style={{ maxWidth: '100%' }} src={src} alt={alt} {...props} />
114
- </a>
115
- );
116
- };
117
-
118
- const BlockQuote = ({ children }: ComponentProps) => {
119
- return <blockquote className={styling.blockquote}>{children}</blockquote>;
120
- };
121
-
122
- const Pre = ({ children }: ComponentProps) => {
123
- return <pre className={styling.pre}>{children}</pre>;
124
- };
125
-
126
- const Code = ({ children }: ComponentProps) => {
127
- return <code className={styling.code}>{children}</code>;
128
- };
129
-
130
- return (
131
- <ReactMarkdown
132
- className={className}
133
- components={{
134
- a: Link,
135
- p: Paragraph,
136
- h1: Heading,
137
- h2: Heading,
138
- h3: Heading,
139
- h4: Heading,
140
- h5: Heading,
141
- h6: Heading,
142
- ol: OList,
143
- ul: UList,
144
- strong: Strong,
145
- em: Emphasis,
146
- table: Table,
147
- th: TableHeader,
148
- tr: TableRow,
149
- td: TableCell,
150
- blockquote: BlockQuote,
151
- img: Image,
152
- code: Code,
153
- pre: Pre,
154
- }}
155
- rehypePlugins={[rehypeRaw]}
156
- remarkPlugins={[remarkDirective, remarkGfm]}
157
- >
158
- {rawMarkdownChild}
159
- </ReactMarkdown>
160
- );
161
- };
162
-
163
- export { Markdown };
@@ -1,37 +0,0 @@
1
- @use "../../scss/public/colors" as *;
2
-
3
- .ulist {
4
- list-style-type: disc;
5
- list-style-position: outside;
6
- padding-left: 16px;
7
-
8
- > li {
9
- padding-left: 8px;
10
- }
11
- }
12
-
13
- .olist {
14
- list-style-type: decimal;
15
- list-style-position: inside;
16
- }
17
-
18
- .table td,
19
- .table th {
20
- border: 1px solid $ds-grey-300;
21
- }
22
-
23
- .pre {
24
- line-height: 24px;
25
- }
26
-
27
- .code {
28
- font-family: monospace;
29
- padding: 2px 4px;
30
- }
31
-
32
- :not(.pre) > .code {
33
- border: 1px solid $ds-grey-400;
34
- background-color: $ds-grey-200;
35
- color: $ds-red-500;
36
- border-radius: 4px;
37
- }