@popsure/dirty-swan 0.26.10 → 0.26.11
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/package.json +2 -1
- package/src/App.tsx +50 -0
- package/src/bin/index.ts +71 -0
- package/src/bin/tsconfig.json +13 -0
- package/src/bin/util/index.test.ts +85 -0
- package/src/bin/util/index.ts +132 -0
- package/src/bin/util/test/data.json +13 -0
- package/src/colors.scss +1 -0
- package/src/font-weight.scss +1 -0
- package/src/grid.scss +1 -0
- package/src/index.tsx +37 -0
- package/src/intro.stories.mdx +41 -0
- package/src/lib/components/autocompleteAddress/demo.tsx +38 -0
- package/src/lib/components/autocompleteAddress/index.stories.mdx +44 -0
- package/src/lib/components/autocompleteAddress/index.tsx +316 -0
- package/src/lib/components/autocompleteAddress/mapStyle.ts +187 -0
- package/src/lib/components/autocompleteAddress/style.module.scss +82 -0
- package/src/lib/components/autocompleteAddress/util/index.test.ts +51 -0
- package/src/lib/components/autocompleteAddress/util/index.ts +55 -0
- package/src/lib/components/button/icons/index.ts +14 -0
- package/src/lib/components/button/icons/send-purple.svg +4 -0
- package/src/lib/components/button/icons/send-white.svg +4 -0
- package/src/lib/components/button/index.stories.mdx +121 -0
- package/src/lib/components/button/index.tsx +64 -0
- package/src/lib/components/button/styles.module.scss +5 -0
- package/src/lib/components/cards/a.stories.mdx +44 -0
- package/src/lib/components/cards/cardButton/index.stories.mdx +47 -0
- package/src/lib/components/cards/cardButton/index.tsx +61 -0
- package/src/lib/components/cards/cardButton/style.module.scss +33 -0
- package/src/lib/components/cards/cardWithLeftIcon/index.stories.mdx +103 -0
- package/src/lib/components/cards/cardWithLeftIcon/index.tsx +87 -0
- package/src/lib/components/cards/cardWithLeftIcon/style.module.scss +23 -0
- package/src/lib/components/cards/cardWithTopIcon/index.stories.mdx +105 -0
- package/src/lib/components/cards/cardWithTopIcon/index.tsx +60 -0
- package/src/lib/components/cards/cardWithTopIcon/style.module.scss +10 -0
- package/src/lib/components/cards/cardWithTopLeftIcon/index.stories.mdx +101 -0
- package/src/lib/components/cards/cardWithTopLeftIcon/index.tsx +72 -0
- package/src/lib/components/cards/cardWithTopLeftIcon/style.module.scss +21 -0
- package/src/lib/components/cards/icons/arrow-right.svg +4 -0
- package/src/lib/components/cards/icons/chevron-right.svg +3 -0
- package/src/lib/components/cards/icons/feather-logo.svg +10 -0
- package/src/lib/components/cards/icons/index.ts +36 -0
- package/src/lib/components/cards/icons/info.svg +12 -0
- package/src/lib/components/cards/index.test.ts +37 -0
- package/src/lib/components/cards/index.tsx +57 -0
- package/src/lib/components/cards/infoCard/index.stories.mdx +61 -0
- package/src/lib/components/cards/infoCard/index.tsx +47 -0
- package/src/lib/components/cards/infoCard/style.module.scss +53 -0
- package/src/lib/components/chip/icons/remove-button-highlighted.svg +4 -0
- package/src/lib/components/chip/icons/remove-button.svg +4 -0
- package/src/lib/components/chip/index.stories.mdx +101 -0
- package/src/lib/components/chip/index.tsx +38 -0
- package/src/lib/components/chip/style.module.scss +54 -0
- package/src/lib/components/comparisonTable/components/Chevron.tsx +19 -0
- package/src/lib/components/comparisonTable/components/Row/index.tsx +68 -0
- package/src/lib/components/comparisonTable/components/Row/style.module.scss +114 -0
- package/src/lib/components/comparisonTable/components/TableArrows/Arrow.tsx +19 -0
- package/src/lib/components/comparisonTable/components/TableArrows/index.tsx +52 -0
- package/src/lib/components/comparisonTable/components/TableArrows/style.module.scss +53 -0
- package/src/lib/components/comparisonTable/components/TableInfoButton/index.tsx +37 -0
- package/src/lib/components/comparisonTable/components/TableInfoButton/style.module.scss +30 -0
- package/src/lib/components/comparisonTable/components/TableRating/StarIcon.tsx +13 -0
- package/src/lib/components/comparisonTable/components/TableRating/ZapIcon.tsx +17 -0
- package/src/lib/components/comparisonTable/components/TableRating/index.tsx +45 -0
- package/src/lib/components/comparisonTable/components/TableRating/style.module.scss +13 -0
- package/src/lib/components/comparisonTable/components/TableRowHeader/index.tsx +35 -0
- package/src/lib/components/comparisonTable/components/TableRowHeader/style.module.scss +3 -0
- package/src/lib/components/comparisonTable/components/TableTrueFalse.tsx +40 -0
- package/src/lib/components/comparisonTable/hooks/useActiveTableArrows.ts +63 -0
- package/src/lib/components/comparisonTable/index.stories.mdx +254 -0
- package/src/lib/components/comparisonTable/index.tsx +211 -0
- package/src/lib/components/comparisonTable/style.module.scss +104 -0
- package/src/lib/components/dateSelector/datepicker.scss +406 -0
- package/src/lib/components/dateSelector/icons/calendar.svg +6 -0
- package/src/lib/components/dateSelector/icons/chevron-left.svg +3 -0
- package/src/lib/components/dateSelector/icons/chevron-right.svg +3 -0
- package/src/lib/components/dateSelector/index.stories.mdx +62 -0
- package/src/lib/components/dateSelector/index.test.ts +33 -0
- package/src/lib/components/dateSelector/index.tsx +247 -0
- package/src/lib/components/dateSelector/style.module.scss +77 -0
- package/src/lib/components/downloadButton/icons/check.svg +3 -0
- package/src/lib/components/downloadButton/icons/download.svg +5 -0
- package/src/lib/components/downloadButton/index.stories.mdx +59 -0
- package/src/lib/components/downloadButton/index.tsx +67 -0
- package/src/lib/components/downloadButton/style.module.scss +19 -0
- package/src/lib/components/downloadRing/icons/check-outside-circle.tsx +26 -0
- package/src/lib/components/downloadRing/icons/download-cloud.tsx +18 -0
- package/src/lib/components/downloadRing/icons/style.module.scss +7 -0
- package/src/lib/components/downloadRing/index.stories.mdx +35 -0
- package/src/lib/components/downloadRing/index.tsx +79 -0
- package/src/lib/components/downloadRing/style.module.scss +66 -0
- package/src/lib/components/dropzone/images/error.tsx +18 -0
- package/src/lib/components/dropzone/images/file.tsx +26 -0
- package/src/lib/components/dropzone/images/style.module.scss +7 -0
- package/src/lib/components/dropzone/images/upload-complete.tsx +24 -0
- package/src/lib/components/dropzone/images/upload.tsx +18 -0
- package/src/lib/components/dropzone/index.stories.mdx +44 -0
- package/src/lib/components/dropzone/index.tsx +152 -0
- package/src/lib/components/dropzone/style.module.scss +90 -0
- package/src/lib/components/input/a.stories.mdx +28 -0
- package/src/lib/components/input/autoSuggestInput/index.stories.mdx +137 -0
- package/src/lib/components/input/autoSuggestInput/index.tsx +81 -0
- package/src/lib/components/input/autoSuggestInput/style.module.scss +71 -0
- package/src/lib/components/input/autoSuggestMultiSelect/index.stories.mdx +115 -0
- package/src/lib/components/input/autoSuggestMultiSelect/index.tsx +75 -0
- package/src/lib/components/input/autoSuggestMultiSelect/style.module.scss +4 -0
- package/src/lib/components/input/currency/format/index.test.ts +49 -0
- package/src/lib/components/input/currency/format/index.ts +15 -0
- package/src/lib/components/input/currency/index.stories.mdx +25 -0
- package/src/lib/components/input/currency/index.test.tsx +56 -0
- package/src/lib/components/input/currency/index.tsx +53 -0
- package/src/lib/components/input/iban/formatIban/index.test.ts +11 -0
- package/src/lib/components/input/iban/formatIban/index.ts +22 -0
- package/src/lib/components/input/iban/index.stories.mdx +21 -0
- package/src/lib/components/input/iban/index.tsx +20 -0
- package/src/lib/components/input/index.stories.mdx +62 -0
- package/src/lib/components/input/index.tsx +51 -0
- package/src/lib/components/input/style.module.scss +94 -0
- package/src/lib/components/modal/bottomModal/img/close.svg +4 -0
- package/src/lib/components/modal/bottomModal/index.tsx +68 -0
- package/src/lib/components/modal/bottomModal/style.module.scss +104 -0
- package/src/lib/components/modal/bottomOrRegularModal/index.tsx +43 -0
- package/src/lib/components/modal/bottomOrRegularModal/style.module.scss +16 -0
- package/src/lib/components/modal/hooks/useOnClose.ts +51 -0
- package/src/lib/components/modal/index.stories.mdx +316 -0
- package/src/lib/components/modal/index.ts +14 -0
- package/src/lib/components/modal/regularModal/img/close.svg +4 -0
- package/src/lib/components/modal/regularModal/index.tsx +55 -0
- package/src/lib/components/modal/regularModal/style.module.scss +106 -0
- package/src/lib/components/multiDropzone/UploadFileCell/index.tsx +138 -0
- package/src/lib/components/multiDropzone/UploadFileCell/style.module.scss +101 -0
- package/src/lib/components/multiDropzone/icons/bmp-complete.svg +10 -0
- package/src/lib/components/multiDropzone/icons/bmp.svg +10 -0
- package/src/lib/components/multiDropzone/icons/doc-complete.svg +11 -0
- package/src/lib/components/multiDropzone/icons/doc.svg +11 -0
- package/src/lib/components/multiDropzone/icons/docx-complete.svg +12 -0
- package/src/lib/components/multiDropzone/icons/docx.svg +12 -0
- package/src/lib/components/multiDropzone/icons/eye.svg +4 -0
- package/src/lib/components/multiDropzone/icons/generic-complete.svg +4 -0
- package/src/lib/components/multiDropzone/icons/generic-error.svg +7 -0
- package/src/lib/components/multiDropzone/icons/generic.svg +4 -0
- package/src/lib/components/multiDropzone/icons/heic-complete.svg +11 -0
- package/src/lib/components/multiDropzone/icons/heic.svg +11 -0
- package/src/lib/components/multiDropzone/icons/index.ts +51 -0
- package/src/lib/components/multiDropzone/icons/jpeg-complete.svg +11 -0
- package/src/lib/components/multiDropzone/icons/jpeg.svg +11 -0
- package/src/lib/components/multiDropzone/icons/jpg-complete.svg +10 -0
- package/src/lib/components/multiDropzone/icons/jpg.svg +10 -0
- package/src/lib/components/multiDropzone/icons/pdf-complete.svg +8 -0
- package/src/lib/components/multiDropzone/icons/pdf.svg +8 -0
- package/src/lib/components/multiDropzone/icons/png-complete.svg +10 -0
- package/src/lib/components/multiDropzone/icons/png.svg +10 -0
- package/src/lib/components/multiDropzone/icons/trash.svg +6 -0
- package/src/lib/components/multiDropzone/icons/upload.svg +5 -0
- package/src/lib/components/multiDropzone/index.stories.mdx +91 -0
- package/src/lib/components/multiDropzone/index.tsx +99 -0
- package/src/lib/components/multiDropzone/style.module.scss +32 -0
- package/src/lib/components/segmentedControl/index.stories.mdx +47 -0
- package/src/lib/components/segmentedControl/index.tsx +105 -0
- package/src/lib/components/segmentedControl/style.module.scss +36 -0
- package/src/lib/components/signaturePad/img/reset.svg +4 -0
- package/src/lib/components/signaturePad/img/sign.svg +3 -0
- package/src/lib/components/signaturePad/index.stories.mdx +17 -0
- package/src/lib/components/signaturePad/index.tsx +96 -0
- package/src/lib/components/signaturePad/style.module.scss +90 -0
- package/src/lib/index.tsx +71 -0
- package/src/lib/models/autoSuggestInput/index.ts +4 -0
- package/src/lib/models/download.ts +1 -0
- package/src/lib/models/downloadRing/index.ts +6 -0
- package/src/lib/scss/index.scss +22 -0
- package/src/lib/scss/private/_reset.scss +149 -0
- package/src/lib/scss/private/base/_colors.scss +19 -0
- package/src/lib/scss/private/base/_cursors.scss +31 -0
- package/src/lib/scss/private/base/_display.scss +35 -0
- package/src/lib/scss/private/base/_grid.scss +52 -0
- package/src/lib/scss/private/base/_index.scss +9 -0
- package/src/lib/scss/private/base/_shadows.scss +2 -0
- package/src/lib/scss/private/base/_spacing.scss +89 -0
- package/src/lib/scss/private/base/_typography.scss +128 -0
- package/src/lib/scss/private/base/_width_and_height.scss +25 -0
- package/src/lib/scss/private/base/cursors.stories.mdx +18 -0
- package/src/lib/scss/private/base/demo.tsx +119 -0
- package/src/lib/scss/private/base/display.stories.mdx +19 -0
- package/src/lib/scss/private/base/flex/_flex.scss +63 -0
- package/src/lib/scss/private/base/flex/flex.stories.mdx +139 -0
- package/src/lib/scss/private/base/flex/style.module.scss +24 -0
- package/src/lib/scss/private/base/spacing.stories.mdx +173 -0
- package/src/lib/scss/private/base/style.module.scss +42 -0
- package/src/lib/scss/private/base/typography.stories.mdx +71 -0
- package/src/lib/scss/private/base/width_and_height.stories.mdx +172 -0
- package/src/lib/scss/private/components/_badge.scss +41 -0
- package/src/lib/scss/private/components/_buttons.scss +193 -0
- package/src/lib/scss/private/components/_cards.scss +32 -0
- package/src/lib/scss/private/components/_index.scss +6 -0
- package/src/lib/scss/private/components/_input.scss +241 -0
- package/src/lib/scss/private/components/_notices.scss +39 -0
- package/src/lib/scss/private/components/_spinner.scss +60 -0
- package/src/lib/scss/private/components/assets/checkmark.svg +3 -0
- package/src/lib/scss/private/components/assets/icon-form-dropdown.svg +3 -0
- package/src/lib/scss/private/components/badge.stories.mdx +37 -0
- package/src/lib/scss/private/components/button.stories.mdx +107 -0
- package/src/lib/scss/private/components/cards.stories.mdx +35 -0
- package/src/lib/scss/private/components/checkbox.stories.mdx +47 -0
- package/src/lib/scss/private/components/input.stories.mdx +33 -0
- package/src/lib/scss/private/components/notices.stories.mdx +37 -0
- package/src/lib/scss/private/components/radio.stories.mdx +47 -0
- package/src/lib/scss/private/components/select.stories.mdx +17 -0
- package/src/lib/scss/private/components/spinner.stories.mdx +25 -0
- package/src/lib/scss/public/colors/_index.scss +2 -0
- package/src/lib/scss/public/colors/default.scss +125 -0
- package/src/lib/scss/public/colors/overrides.scss +0 -0
- package/src/lib/scss/public/colors.stories.mdx +27 -0
- package/src/lib/scss/public/demo.tsx +285 -0
- package/src/lib/scss/public/font/_index.scss +2 -0
- package/src/lib/scss/public/font/default.scss +3 -0
- package/src/lib/scss/public/font/overrides.scss +0 -0
- package/src/lib/scss/public/font-weight.scss +9 -0
- package/src/lib/scss/public/font-weight.stories.mdx +32 -0
- package/src/lib/scss/public/grid.scss +21 -0
- package/src/lib/scss/public/grid.stories.mdx +41 -0
- package/src/lib/scss/third-party/_google_places.scss +62 -0
- package/src/lib/scss/third-party/_index.scss +1 -0
- package/src/lib/scss/utils/_index.scss +3 -0
- package/src/lib/util/calendarDate/index.test.ts +32 -0
- package/src/lib/util/calendarDate/index.ts +30 -0
- package/src/lib/util/zeroFill.test.ts +15 -0
- package/src/lib/util/zeroFill.ts +7 -0
- package/src/react-app-env.d.ts +1 -0
- package/src/setupTests.js +8 -0
- package/src/theme.stories.mdx +54 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
@use '../../public/colors' as *;
|
|
2
|
+
|
|
3
|
+
.ds-spinner {
|
|
4
|
+
position: relative;
|
|
5
|
+
|
|
6
|
+
width: 16px;
|
|
7
|
+
height: 16px;
|
|
8
|
+
|
|
9
|
+
&::before,
|
|
10
|
+
&::after {
|
|
11
|
+
content: '';
|
|
12
|
+
box-sizing: border-box;
|
|
13
|
+
position: absolute;
|
|
14
|
+
width: 100%;
|
|
15
|
+
height: 100%;
|
|
16
|
+
border: 2px solid $ds-primary-500;
|
|
17
|
+
border-radius: 16px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&::before {
|
|
21
|
+
opacity: 0.5;
|
|
22
|
+
transform: rotate(90deg);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&::after {
|
|
26
|
+
border-top-color: transparent;
|
|
27
|
+
border-right-color: transparent;
|
|
28
|
+
border-bottom-color: transparent;
|
|
29
|
+
animation: spinner-rotate 0.9s infinite cubic-bezier(0.5, 0.1, 0.5, 0.9);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&.ds-spinner__l {
|
|
33
|
+
width: 48px;
|
|
34
|
+
height: 48px;
|
|
35
|
+
&::before,
|
|
36
|
+
&::after {
|
|
37
|
+
border-radius: 48px;
|
|
38
|
+
border-width: 6px;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&.ds-spinner__m {
|
|
43
|
+
width: 32px;
|
|
44
|
+
height: 32px;
|
|
45
|
+
&::before,
|
|
46
|
+
&::after {
|
|
47
|
+
border-radius: 32px;
|
|
48
|
+
border-width: 4px;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@keyframes spinner-rotate {
|
|
54
|
+
from {
|
|
55
|
+
transform: rotate(0deg);
|
|
56
|
+
}
|
|
57
|
+
to {
|
|
58
|
+
transform: rotate(360deg);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Meta, Preview } from '@storybook/addon-docs/blocks';
|
|
2
|
+
|
|
3
|
+
<Meta title="CSS/Components/Badge" />
|
|
4
|
+
|
|
5
|
+
# Badges
|
|
6
|
+
|
|
7
|
+
Badges are label used for flags.
|
|
8
|
+
|
|
9
|
+
## Active
|
|
10
|
+
|
|
11
|
+
<Preview>
|
|
12
|
+
<div className="p-badge--active">Active badge</div>
|
|
13
|
+
</Preview>
|
|
14
|
+
|
|
15
|
+
## Pending
|
|
16
|
+
|
|
17
|
+
<Preview>
|
|
18
|
+
<div className="p-badge--pending">Pending badge</div>
|
|
19
|
+
</Preview>
|
|
20
|
+
|
|
21
|
+
## Inactive
|
|
22
|
+
|
|
23
|
+
<Preview>
|
|
24
|
+
<div className="p-badge--inactive">Inactive badge</div>
|
|
25
|
+
</Preview>
|
|
26
|
+
|
|
27
|
+
## Danger
|
|
28
|
+
|
|
29
|
+
<Preview>
|
|
30
|
+
<div className="p-badge--danger">Danger badge</div>
|
|
31
|
+
</Preview>
|
|
32
|
+
|
|
33
|
+
## Info
|
|
34
|
+
|
|
35
|
+
<Preview>
|
|
36
|
+
<div className="p-badge--info">Info badge</div>
|
|
37
|
+
</Preview>
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { Meta, Story, Preview } from '@storybook/addon-docs/blocks';
|
|
2
|
+
|
|
3
|
+
<Meta title="CSS/Components/Button" />
|
|
4
|
+
|
|
5
|
+
# Button
|
|
6
|
+
|
|
7
|
+
Buttons allow users to take actions, and make choices, with a single tap. Buttons communicate actions that users can take.
|
|
8
|
+
|
|
9
|
+
You are looking at the css definition of the Button component, if you want you can use the [pure JSX alternative](?path=/story/jsx-button--page)
|
|
10
|
+
|
|
11
|
+
## Primary button
|
|
12
|
+
|
|
13
|
+
### Default
|
|
14
|
+
|
|
15
|
+
<Preview>
|
|
16
|
+
<button className="p-btn--primary">Primary button</button>
|
|
17
|
+
</Preview>
|
|
18
|
+
|
|
19
|
+
### Disabled
|
|
20
|
+
|
|
21
|
+
<Preview>
|
|
22
|
+
<button className="p-btn--primary" disabled={true}>
|
|
23
|
+
Primary button
|
|
24
|
+
</button>
|
|
25
|
+
</Preview>
|
|
26
|
+
|
|
27
|
+
### Loading
|
|
28
|
+
|
|
29
|
+
<Preview>
|
|
30
|
+
<button className="p-btn--primary p-btn--loading">Primary button</button>
|
|
31
|
+
</Preview>
|
|
32
|
+
|
|
33
|
+
## Secondary button
|
|
34
|
+
|
|
35
|
+
### Default
|
|
36
|
+
|
|
37
|
+
<Preview>
|
|
38
|
+
<button className="p-btn--secondary">Secondary button</button>
|
|
39
|
+
</Preview>
|
|
40
|
+
|
|
41
|
+
### Disabled
|
|
42
|
+
|
|
43
|
+
<Preview>
|
|
44
|
+
<button className="p-btn--secondary" disabled={true}>
|
|
45
|
+
Secondary button
|
|
46
|
+
</button>
|
|
47
|
+
</Preview>
|
|
48
|
+
|
|
49
|
+
### Loading
|
|
50
|
+
|
|
51
|
+
<Preview>
|
|
52
|
+
<button className="p-btn--secondary p-btn--loading">Secondary button</button>
|
|
53
|
+
</Preview>
|
|
54
|
+
|
|
55
|
+
## Danger button
|
|
56
|
+
|
|
57
|
+
### Default
|
|
58
|
+
|
|
59
|
+
<Preview>
|
|
60
|
+
<button className="p-btn--danger">Danger button</button>
|
|
61
|
+
</Preview>
|
|
62
|
+
|
|
63
|
+
### Disabled
|
|
64
|
+
|
|
65
|
+
<Preview>
|
|
66
|
+
<button className="p-btn--danger" disabled={true}>
|
|
67
|
+
Danger button
|
|
68
|
+
</button>
|
|
69
|
+
</Preview>
|
|
70
|
+
|
|
71
|
+
### Loading
|
|
72
|
+
|
|
73
|
+
<Preview>
|
|
74
|
+
<button className="p-btn--danger p-btn--loading">Danger button</button>
|
|
75
|
+
</Preview>
|
|
76
|
+
|
|
77
|
+
## Outline button
|
|
78
|
+
|
|
79
|
+
### Default
|
|
80
|
+
|
|
81
|
+
<Preview>
|
|
82
|
+
<button className="p-btn--outline">Outline button</button>
|
|
83
|
+
</Preview>
|
|
84
|
+
|
|
85
|
+
### Disabled
|
|
86
|
+
|
|
87
|
+
<Preview>
|
|
88
|
+
<button className="p-btn--outline" disabled={true}>
|
|
89
|
+
Outline button
|
|
90
|
+
</button>
|
|
91
|
+
</Preview>
|
|
92
|
+
|
|
93
|
+
## Outline grey button
|
|
94
|
+
|
|
95
|
+
### Default
|
|
96
|
+
|
|
97
|
+
<Preview>
|
|
98
|
+
<button className="p-btn--outline-grey">Outline button</button>
|
|
99
|
+
</Preview>
|
|
100
|
+
|
|
101
|
+
### Disabled
|
|
102
|
+
|
|
103
|
+
<Preview>
|
|
104
|
+
<button className="p-btn--outline-grey" disabled={true}>
|
|
105
|
+
Outline button
|
|
106
|
+
</button>
|
|
107
|
+
</Preview>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Meta, Preview } from '@storybook/addon-docs/blocks';
|
|
2
|
+
|
|
3
|
+
<Meta title="CSS/Components/Cards" />
|
|
4
|
+
|
|
5
|
+
# Cards
|
|
6
|
+
|
|
7
|
+
## Actionable
|
|
8
|
+
|
|
9
|
+
An actionable card has an hovering state
|
|
10
|
+
|
|
11
|
+
<Preview>
|
|
12
|
+
<div className="ds-card--actionable">
|
|
13
|
+
<p className="p-p mt16 mr16 mb16 ml16">Actionable card</p>
|
|
14
|
+
</div>
|
|
15
|
+
</Preview>
|
|
16
|
+
|
|
17
|
+
## Static
|
|
18
|
+
|
|
19
|
+
A static card doesn’t have an hovering state
|
|
20
|
+
|
|
21
|
+
<Preview>
|
|
22
|
+
<div className="ds-card">
|
|
23
|
+
<p className="p-p mt16 mr16 mb16 ml16">Static card</p>
|
|
24
|
+
</div>
|
|
25
|
+
</Preview>
|
|
26
|
+
|
|
27
|
+
## Muted
|
|
28
|
+
|
|
29
|
+
A muted card is semi transparent
|
|
30
|
+
|
|
31
|
+
<Preview>
|
|
32
|
+
<div className="ds-card--muted">
|
|
33
|
+
<p className="p-p mt16 mr16 mb16 ml16">Muted card</p>
|
|
34
|
+
</div>
|
|
35
|
+
</Preview>
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Meta, Story, Preview } from '@storybook/addon-docs/blocks';
|
|
2
|
+
|
|
3
|
+
<Meta title="CSS/Components/Checkbox" />
|
|
4
|
+
|
|
5
|
+
# Checkbox
|
|
6
|
+
|
|
7
|
+
A small box on a form into which a tick or other mark is entered as the response to a question.
|
|
8
|
+
|
|
9
|
+
## Checkbox input with label
|
|
10
|
+
|
|
11
|
+
### Default
|
|
12
|
+
|
|
13
|
+
<Preview>
|
|
14
|
+
<div className="p-label-container">
|
|
15
|
+
<input id="default-1" className="p-checkbox" type="radio" />
|
|
16
|
+
<label htmlFor="default-1" className="p-label">
|
|
17
|
+
Checkbox label 1
|
|
18
|
+
</label>
|
|
19
|
+
<input id="default-2" className="p-checkbox" type="radio" checked={true} />
|
|
20
|
+
<label htmlFor="default-2" className="p-label">
|
|
21
|
+
Checkbox label 2
|
|
22
|
+
</label>
|
|
23
|
+
<input id="default-3" className="p-checkbox" type="radio" />
|
|
24
|
+
<label htmlFor="default-3" className="p-label">
|
|
25
|
+
Checkbox label 3
|
|
26
|
+
</label>
|
|
27
|
+
</div>
|
|
28
|
+
</Preview>
|
|
29
|
+
|
|
30
|
+
### Bordered
|
|
31
|
+
|
|
32
|
+
<Preview>
|
|
33
|
+
<div className="p-label-container">
|
|
34
|
+
<input id="bordered-1" className="p-checkbox" type="radio" />
|
|
35
|
+
<label htmlFor="bordered-1" className="p-label p-label--bordered">
|
|
36
|
+
Checkbox label 1
|
|
37
|
+
</label>
|
|
38
|
+
<input id="bordered-2" className="p-checkbox" type="radio" checked={true} />
|
|
39
|
+
<label htmlFor="bordered-2" className="p-label p-label--bordered mt16">
|
|
40
|
+
Checkbox label 2
|
|
41
|
+
</label>
|
|
42
|
+
<input id="bordered-3" className="p-checkbox" type="radio" />
|
|
43
|
+
<label htmlFor="bordered-3" className="p-label p-label--bordered mt16">
|
|
44
|
+
Checkbox label 3
|
|
45
|
+
</label>
|
|
46
|
+
</div>
|
|
47
|
+
</Preview>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Meta, Story, Preview } from '@storybook/addon-docs/blocks';
|
|
2
|
+
|
|
3
|
+
<Meta title="CSS/Components/Input" />
|
|
4
|
+
|
|
5
|
+
# Input
|
|
6
|
+
|
|
7
|
+
Input elements are used to gather information from users.
|
|
8
|
+
|
|
9
|
+
You are looking at the css definition of the Input component, if you want you can use the [pure JSX alternative](?path=/story/jsx-inputs-intro--page)
|
|
10
|
+
|
|
11
|
+
### Default
|
|
12
|
+
|
|
13
|
+
<Preview>
|
|
14
|
+
<input className="p-input wmx5" />
|
|
15
|
+
</Preview>
|
|
16
|
+
|
|
17
|
+
### Error
|
|
18
|
+
|
|
19
|
+
<Preview>
|
|
20
|
+
<input className="p-input--error wmx5" />
|
|
21
|
+
</Preview>
|
|
22
|
+
|
|
23
|
+
### With placeholder
|
|
24
|
+
|
|
25
|
+
<Preview>
|
|
26
|
+
<input className="p-input wmx5" placeholder="Enter your input here" />
|
|
27
|
+
</Preview>
|
|
28
|
+
|
|
29
|
+
### Disabled
|
|
30
|
+
|
|
31
|
+
<Preview>
|
|
32
|
+
<input className="p-input wmx5" disabled={true} />
|
|
33
|
+
</Preview>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Meta, Preview } from '@storybook/addon-docs/blocks';
|
|
2
|
+
|
|
3
|
+
<Meta title="CSS/Components/Notices" />
|
|
4
|
+
|
|
5
|
+
# Notices
|
|
6
|
+
|
|
7
|
+
Notices deliver informations to the user. Wether it’s _warnings_, _informations_, _danger_ …
|
|
8
|
+
|
|
9
|
+
## Primary
|
|
10
|
+
|
|
11
|
+
<Preview>
|
|
12
|
+
<div className="p-notice--primary">Primary filled notice</div>
|
|
13
|
+
</Preview>
|
|
14
|
+
|
|
15
|
+
## Info
|
|
16
|
+
|
|
17
|
+
<Preview>
|
|
18
|
+
<div className="p-notice--info">Info filled notice</div>
|
|
19
|
+
</Preview>
|
|
20
|
+
|
|
21
|
+
## Danger
|
|
22
|
+
|
|
23
|
+
<Preview>
|
|
24
|
+
<div className="p-notice--danger">Danger filled notice</div>
|
|
25
|
+
</Preview>
|
|
26
|
+
|
|
27
|
+
## Warning
|
|
28
|
+
|
|
29
|
+
<Preview>
|
|
30
|
+
<div className="p-notice--warning">Warning filled notice</div>
|
|
31
|
+
</Preview>
|
|
32
|
+
|
|
33
|
+
## Success
|
|
34
|
+
|
|
35
|
+
<Preview>
|
|
36
|
+
<div className="p-notice--success">Success filled notice</div>
|
|
37
|
+
</Preview>
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Meta, Story, Preview } from '@storybook/addon-docs/blocks';
|
|
2
|
+
|
|
3
|
+
<Meta title="CSS/Components/Radio" />
|
|
4
|
+
|
|
5
|
+
# Radio
|
|
6
|
+
|
|
7
|
+
A radio button or option button is a graphical control element that allows the user to choose only one of a predefined set of mutually exclusive options.
|
|
8
|
+
|
|
9
|
+
## Radio input with label
|
|
10
|
+
|
|
11
|
+
### Default
|
|
12
|
+
|
|
13
|
+
<Preview>
|
|
14
|
+
<div className="p-label-container">
|
|
15
|
+
<input id="default-1" className="p-radio" type="radio" />
|
|
16
|
+
<label htmlFor="default-1" className="p-label">
|
|
17
|
+
Radio label 1
|
|
18
|
+
</label>
|
|
19
|
+
<input id="default-2" className="p-radio" type="radio" checked={true} />
|
|
20
|
+
<label htmlFor="default-2" className="p-label">
|
|
21
|
+
Radio label 2
|
|
22
|
+
</label>
|
|
23
|
+
<input id="default-3" className="p-radio" type="radio" />
|
|
24
|
+
<label htmlFor="default-3" className="p-label">
|
|
25
|
+
Radio label 3
|
|
26
|
+
</label>
|
|
27
|
+
</div>
|
|
28
|
+
</Preview>
|
|
29
|
+
|
|
30
|
+
### Bordered
|
|
31
|
+
|
|
32
|
+
<Preview>
|
|
33
|
+
<div className="p-label-container">
|
|
34
|
+
<input id="bordered-1" className="p-radio" type="radio" />
|
|
35
|
+
<label htmlFor="bordered-1" className="p-label p-label--bordered">
|
|
36
|
+
Radio label 1
|
|
37
|
+
</label>
|
|
38
|
+
<input id="bordered-2" className="p-radio" type="radio" checked={true} />
|
|
39
|
+
<label htmlFor="bordered-2" className="p-label p-label--bordered mt16">
|
|
40
|
+
Radio label 2
|
|
41
|
+
</label>
|
|
42
|
+
<input id="bordered-3" className="p-radio" type="radio" />
|
|
43
|
+
<label htmlFor="bordered-3" className="p-label p-label--bordered mt16">
|
|
44
|
+
Radio label 3
|
|
45
|
+
</label>
|
|
46
|
+
</div>
|
|
47
|
+
</Preview>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Meta, Story, Preview } from '@storybook/addon-docs/blocks';
|
|
2
|
+
|
|
3
|
+
<Meta title="CSS/Components/Select" />
|
|
4
|
+
|
|
5
|
+
# Select
|
|
6
|
+
|
|
7
|
+
Select elements are used to create drop down list of options
|
|
8
|
+
|
|
9
|
+
<Preview>
|
|
10
|
+
<label htmlFor="cars">Choose a car:</label>
|
|
11
|
+
<select className="p-select" id="cars">
|
|
12
|
+
<option value="volvo">Volvo</option>
|
|
13
|
+
<option value="saab">Saab</option>
|
|
14
|
+
<option value="mercedes">Mercedes</option>
|
|
15
|
+
<option value="audi">Audi</option>
|
|
16
|
+
</select>
|
|
17
|
+
</Preview>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Meta, Preview } from '@storybook/addon-docs/blocks';
|
|
2
|
+
|
|
3
|
+
<Meta title="CSS/Components/Spinner" />
|
|
4
|
+
|
|
5
|
+
# Spinner
|
|
6
|
+
|
|
7
|
+
Spinning ring component to indicate that an action or a page is currently loading
|
|
8
|
+
|
|
9
|
+
## Default size
|
|
10
|
+
|
|
11
|
+
<Preview>
|
|
12
|
+
<div className="ds-spinner" />
|
|
13
|
+
</Preview>
|
|
14
|
+
|
|
15
|
+
## Medium
|
|
16
|
+
|
|
17
|
+
<Preview>
|
|
18
|
+
<div className="ds-spinner ds-spinner__m" />
|
|
19
|
+
</Preview>
|
|
20
|
+
|
|
21
|
+
## Large
|
|
22
|
+
|
|
23
|
+
<Preview>
|
|
24
|
+
<div className="ds-spinner ds-spinner__l" />
|
|
25
|
+
</Preview>
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
// TODO: Reference colors
|
|
2
|
+
$ds-primary-25: #fcfcff !default;
|
|
3
|
+
$ds-primary-50: #f7f7ff !default;
|
|
4
|
+
$ds-primary-100: #e6e5ff !default;
|
|
5
|
+
$ds-primary-300: #b1b0f5 !default;
|
|
6
|
+
$ds-primary-500: #8e8cee !default;
|
|
7
|
+
$ds-primary-700: #6160a2 !default;
|
|
8
|
+
$ds-primary-900: #2e2e4c !default;
|
|
9
|
+
|
|
10
|
+
$ds-purple-25: #fcfcff;
|
|
11
|
+
$ds-purple-50: #f7f7ff;
|
|
12
|
+
$ds-purple-100: #e6e5ff;
|
|
13
|
+
$ds-purple-300: #b1b0f5;
|
|
14
|
+
$ds-purple-500: #8e8cee;
|
|
15
|
+
$ds-purple-700: #6160a2;
|
|
16
|
+
$ds-purple-900: #2e2e4c;
|
|
17
|
+
|
|
18
|
+
$ds-blue-100: #e5f0ff;
|
|
19
|
+
$ds-blue-300: #b0cdf3;
|
|
20
|
+
$ds-blue-500: #8bb4ea;
|
|
21
|
+
$ds-blue-700: #5f7ba0;
|
|
22
|
+
$ds-blue-900: #2d394a;
|
|
23
|
+
|
|
24
|
+
$ds-glacier-100: #e0f7fe;
|
|
25
|
+
$ds-glacier-300: #aeddec;
|
|
26
|
+
$ds-glacier-500: #8bcbdf;
|
|
27
|
+
$ds-glacier-700: #5d8896;
|
|
28
|
+
$ds-glacier-900: #2d4148;
|
|
29
|
+
|
|
30
|
+
$ds-red-100: #fedede;
|
|
31
|
+
$ds-red-300: #faa0a0;
|
|
32
|
+
$ds-red-500: #e55454;
|
|
33
|
+
$ds-red-700: #c64848;
|
|
34
|
+
$ds-red-900: #4b2525;
|
|
35
|
+
|
|
36
|
+
$ds-pink-100: #ffebf1;
|
|
37
|
+
$ds-pink-300: #ffb1cb;
|
|
38
|
+
$ds-pink-500: #f96092;
|
|
39
|
+
$ds-pink-700: #c0305f;
|
|
40
|
+
$ds-pink-900: #700024;
|
|
41
|
+
|
|
42
|
+
$ds-grey-100: #fafaff;
|
|
43
|
+
$ds-grey-200: #f5f5fa;
|
|
44
|
+
$ds-grey-300: #d2d2d8;
|
|
45
|
+
$ds-grey-500: #b4b4ba;
|
|
46
|
+
$ds-grey-600: #696970;
|
|
47
|
+
$ds-grey-700: #4c4c53;
|
|
48
|
+
$ds-grey-900: #26262e;
|
|
49
|
+
|
|
50
|
+
$ds-green-100: #e4ffe6;
|
|
51
|
+
$ds-green-300: #c4f5c8;
|
|
52
|
+
$ds-green-500: #84de8a;
|
|
53
|
+
$ds-green-700: #5b985f;
|
|
54
|
+
$ds-green-900: #354a2d;
|
|
55
|
+
|
|
56
|
+
$ds-spearmint-100: #e3fff2;
|
|
57
|
+
$ds-spearmint-300: #aaeacc;
|
|
58
|
+
$ds-spearmint-500: #85dcb4;
|
|
59
|
+
$ds-spearmint-700: #599278;
|
|
60
|
+
$ds-spearmint-900: #2b4639;
|
|
61
|
+
|
|
62
|
+
$ds-yellow-100: #fff8e3;
|
|
63
|
+
$ds-yellow-300: #fae3a5;
|
|
64
|
+
$ds-yellow-500: #f7ce5c;
|
|
65
|
+
$ds-yellow-700: #cc9e21;
|
|
66
|
+
$ds-yellow-900: #4a3d10;
|
|
67
|
+
|
|
68
|
+
$colors: (
|
|
69
|
+
'blue-100': $ds-blue-100,
|
|
70
|
+
'blue-300': $ds-blue-300,
|
|
71
|
+
'blue-500': $ds-blue-500,
|
|
72
|
+
'blue-700': $ds-blue-700,
|
|
73
|
+
'blue-900': $ds-blue-900,
|
|
74
|
+
'purple-25': $ds-purple-25,
|
|
75
|
+
'purple-50': $ds-purple-50,
|
|
76
|
+
'purple-100': $ds-purple-100,
|
|
77
|
+
'purple-300': $ds-purple-300,
|
|
78
|
+
'purple-500': $ds-purple-500,
|
|
79
|
+
'purple-700': $ds-purple-700,
|
|
80
|
+
'purple-900': $ds-purple-900,
|
|
81
|
+
'primary-25': $ds-primary-25,
|
|
82
|
+
'primary-50': $ds-primary-50,
|
|
83
|
+
'primary-100': $ds-primary-100,
|
|
84
|
+
'primary-300': $ds-primary-300,
|
|
85
|
+
'primary-500': $ds-primary-500,
|
|
86
|
+
'primary-700': $ds-primary-700,
|
|
87
|
+
'primary-900': $ds-primary-900,
|
|
88
|
+
'red-100': $ds-red-100,
|
|
89
|
+
'red-300': $ds-red-300,
|
|
90
|
+
'red-500': $ds-red-500,
|
|
91
|
+
'red-700': $ds-red-700,
|
|
92
|
+
'red-900': $ds-red-900,
|
|
93
|
+
'grey-100': $ds-grey-100,
|
|
94
|
+
'grey-200': $ds-grey-200,
|
|
95
|
+
'grey-300': $ds-grey-300,
|
|
96
|
+
'grey-500': $ds-grey-500,
|
|
97
|
+
'grey-600': $ds-grey-600,
|
|
98
|
+
'grey-700': $ds-grey-700,
|
|
99
|
+
'grey-900': $ds-grey-900,
|
|
100
|
+
'green-100': $ds-green-100,
|
|
101
|
+
'green-300': $ds-green-300,
|
|
102
|
+
'green-500': $ds-green-500,
|
|
103
|
+
'green-700': $ds-green-700,
|
|
104
|
+
'green-900': $ds-green-900,
|
|
105
|
+
'glacier-100': $ds-glacier-100,
|
|
106
|
+
'glacier-300': $ds-glacier-300,
|
|
107
|
+
'glacier-500': $ds-glacier-500,
|
|
108
|
+
'glacier-700': $ds-glacier-700,
|
|
109
|
+
'glacier-900': $ds-glacier-900,
|
|
110
|
+
'spearmint-100': $ds-spearmint-100,
|
|
111
|
+
'spearmint-300': $ds-spearmint-300,
|
|
112
|
+
'spearmint-500': $ds-spearmint-500,
|
|
113
|
+
'spearmint-700': $ds-spearmint-700,
|
|
114
|
+
'spearmint-900': $ds-spearmint-900,
|
|
115
|
+
'pink-100': $ds-pink-100,
|
|
116
|
+
'pink-300': $ds-pink-300,
|
|
117
|
+
'pink-500': $ds-pink-500,
|
|
118
|
+
'pink-700': $ds-pink-700,
|
|
119
|
+
'pink-900': $ds-pink-900,
|
|
120
|
+
'yellow-100': $ds-yellow-100,
|
|
121
|
+
'yellow-300': $ds-yellow-300,
|
|
122
|
+
'yellow-500': $ds-yellow-500,
|
|
123
|
+
'yellow-700': $ds-yellow-700,
|
|
124
|
+
'yellow-900': $ds-yellow-900,
|
|
125
|
+
);
|
|
File without changes
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Colors } from './demo';
|
|
2
|
+
|
|
3
|
+
<Meta title="CSS/Variables/Colors" />
|
|
4
|
+
|
|
5
|
+
# Colors
|
|
6
|
+
|
|
7
|
+
For enhanced reusability we’re providing you with a set of color variables. Please don’t hardcode color value and use this instead.
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
Dirty swan provides colors variables for you to use in your Sass files.
|
|
12
|
+
To do so, `@import` or `@use` at the top for your `.scss` file.
|
|
13
|
+
|
|
14
|
+
```sass
|
|
15
|
+
// demo.scss
|
|
16
|
+
@import '@popsure/dirty-swan/dist/colors';
|
|
17
|
+
|
|
18
|
+
.element {
|
|
19
|
+
color: $ds-grey-900;
|
|
20
|
+
}
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Table
|
|
24
|
+
|
|
25
|
+
<Preview>
|
|
26
|
+
<Colors />
|
|
27
|
+
</Preview>
|