@popsure/dirty-swan 0.27.0 → 0.27.1
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/Readme.md +8 -0
- package/dist/bin/index.js +0 -0
- package/dist/index.css +369 -7
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +2 -3
- package/dist/index.js +36 -1089
- package/dist/index.js.map +1 -1
- package/dist/lib/components/modal/bottomOrRegularModal/index.d.ts +2 -1
- package/dist/lib/components/modal/hooks/useOnClose.d.ts +1 -1
- package/dist/lib/scss/private/base/_border_radius.scss +15 -0
- package/dist/lib/scss/private/base/_display.scss +4 -0
- package/dist/lib/scss/private/base/_grid.scss +8 -0
- package/dist/lib/scss/private/base/_index.scss +1 -0
- package/dist/lib/scss/private/base/_spacing.scss +14 -0
- package/dist/lib/scss/private/base/_typography.scss +7 -0
- package/dist/lib/scss/private/base/demo.tsx +4 -0
- package/dist/lib/scss/private/base/style.module.scss +10 -0
- package/dist/lib/scss/private/components/_buttons.scss +4 -4
- package/dist/lib/scss/private/components/_input.scss +1 -4
- package/dist/lib/scss/public/colors/default.scss +38 -0
- package/dist/lib/scss/public/demo.tsx +109 -22
- package/package.json +1 -1
- package/src/lib/scss/private/base/_typography.scss +7 -0
- package/src/lib/scss/private/base/demo.tsx +4 -0
- package/src/lib/scss/private/base/typography.stories.mdx +3 -0
- package/src/lib/scss/private/components/_input.scss +1 -4
- package/src/lib/.DS_Store +0 -0
- package/src/lib/components/.DS_Store +0 -0
- package/src/lib/components/downloadButton/.DS_Store +0 -0
|
@@ -2,6 +2,6 @@ import React from 'react';
|
|
|
2
2
|
declare const useOnClose: (onClose: () => void, isOpen: boolean, dismissable: boolean) => {
|
|
3
3
|
isClosing: boolean;
|
|
4
4
|
handleContainerClick: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
|
5
|
-
handleOnClose: () =>
|
|
5
|
+
handleOnClose: () => void;
|
|
6
6
|
};
|
|
7
7
|
export default useOnClose;
|
|
@@ -15,6 +15,14 @@
|
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
.p-container {
|
|
19
|
+
max-width: 928px; // 896px + 2 * 16px padding
|
|
20
|
+
padding-left: 16px;
|
|
21
|
+
padding-right: 16px;
|
|
22
|
+
margin-left: auto;
|
|
23
|
+
margin-right: auto;
|
|
24
|
+
}
|
|
25
|
+
|
|
18
26
|
// Taken from https://gist.github.com/Bamieh/912a6f0b63cbb53f3ad0bd8df7171c6a
|
|
19
27
|
@function remove-dot-from-class($class) {
|
|
20
28
|
$class-string: quote($class);
|
|
@@ -73,3 +73,17 @@ $valid_areas: (
|
|
|
73
73
|
margin-top: auto;
|
|
74
74
|
margin-bottom: auto;
|
|
75
75
|
}
|
|
76
|
+
|
|
77
|
+
@for $i from 0 through 12 {
|
|
78
|
+
.gap#{$i * 8} {
|
|
79
|
+
gap: $i * 8px;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.c-gap#{$i * 8} {
|
|
83
|
+
column-gap: $i * 8px;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.r-gap#{$i * 8} {
|
|
87
|
+
row-gap: $i * 8px;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
@@ -95,10 +95,17 @@ body {
|
|
|
95
95
|
.p-a {
|
|
96
96
|
color: $ds-primary-500;
|
|
97
97
|
text-decoration: none;
|
|
98
|
+
|
|
98
99
|
&:hover,
|
|
99
100
|
&:focus {
|
|
100
101
|
color: $ds-primary-700;
|
|
101
102
|
}
|
|
103
|
+
|
|
104
|
+
&:focus-visible {
|
|
105
|
+
outline: 2px solid $ds-grey-900;
|
|
106
|
+
border-radius: 2px;
|
|
107
|
+
outline-offset: 2px;
|
|
108
|
+
}
|
|
102
109
|
}
|
|
103
110
|
|
|
104
111
|
// Layout
|
|
@@ -11,6 +11,10 @@ export const Typography = () => (
|
|
|
11
11
|
<h4 className="p-h4">The quick brown fox jumps over the lazy dog</h4>
|
|
12
12
|
<p className="p-p">The quick brown fox jumps over the lazy dog</p>
|
|
13
13
|
<p className="p-p--small">The quick brown fox jumps over the lazy dog</p>
|
|
14
|
+
<a href="#" className="p-a">
|
|
15
|
+
The quick brown fox jumps over the lazy dog
|
|
16
|
+
</a>
|
|
17
|
+
<p className="p-error">The quick brown fox jumps over the lazy dog</p>
|
|
14
18
|
</>
|
|
15
19
|
);
|
|
16
20
|
|
|
@@ -12,18 +12,18 @@
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
.p-btn {
|
|
15
|
-
position: relative;
|
|
16
|
-
|
|
17
15
|
display: inline-block;
|
|
18
16
|
|
|
17
|
+
position: relative;
|
|
19
18
|
cursor: pointer;
|
|
20
19
|
|
|
21
20
|
height: 48px;
|
|
22
|
-
padding:
|
|
21
|
+
padding: 12px 24px;
|
|
22
|
+
|
|
23
|
+
line-height: 24px;
|
|
23
24
|
|
|
24
25
|
font-size: 16px;
|
|
25
26
|
font-family: inherit;
|
|
26
|
-
line-height: 48px;
|
|
27
27
|
letter-spacing: 0.5px;
|
|
28
28
|
text-decoration: none;
|
|
29
29
|
text-align: center;
|
|
@@ -94,10 +94,7 @@
|
|
|
94
94
|
.p-radio:checked {
|
|
95
95
|
& + label::before {
|
|
96
96
|
border-color: $ds-primary-500;
|
|
97
|
-
|
|
98
|
-
background-image: url('data:image/svg+xml;utf8,<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="6" cy="6" r="5.5" fill="#{util.url-encoded-color($ds-primary-500)}" /></svg>');
|
|
99
|
-
background-repeat: no-repeat;
|
|
100
|
-
background-position: center;
|
|
97
|
+
background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 20 20" stroke="white" stroke-width="4" xmlns="http://www.w3.org/2000/svg"><circle cx="10" cy="10" r="50%" fill="#{util.url-encoded-color($ds-primary-500)}"/></svg>');
|
|
101
98
|
}
|
|
102
99
|
}
|
|
103
100
|
|
|
@@ -21,12 +21,24 @@ $ds-blue-500: #8bb4ea;
|
|
|
21
21
|
$ds-blue-700: #5f7ba0;
|
|
22
22
|
$ds-blue-900: #2d394a;
|
|
23
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
|
+
|
|
24
30
|
$ds-red-100: #fedede;
|
|
25
31
|
$ds-red-300: #faa0a0;
|
|
26
32
|
$ds-red-500: #e55454;
|
|
27
33
|
$ds-red-700: #c64848;
|
|
28
34
|
$ds-red-900: #4b2525;
|
|
29
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
|
+
|
|
30
42
|
$ds-grey-100: #fafaff;
|
|
31
43
|
$ds-grey-200: #f5f5fa;
|
|
32
44
|
$ds-grey-300: #d2d2d8;
|
|
@@ -41,13 +53,24 @@ $ds-green-500: #84de8a;
|
|
|
41
53
|
$ds-green-700: #5b985f;
|
|
42
54
|
$ds-green-900: #354a2d;
|
|
43
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
|
+
|
|
44
62
|
$ds-yellow-100: #fff8e3;
|
|
45
63
|
$ds-yellow-300: #fae3a5;
|
|
46
64
|
$ds-yellow-500: #f7ce5c;
|
|
47
65
|
$ds-yellow-700: #cc9e21;
|
|
48
66
|
$ds-yellow-900: #4a3d10;
|
|
49
67
|
|
|
68
|
+
$ds-white: #fff;
|
|
69
|
+
$ds-transparent: transparent;
|
|
70
|
+
|
|
50
71
|
$colors: (
|
|
72
|
+
'white': #fff,
|
|
73
|
+
'transparent': transparent,
|
|
51
74
|
'blue-100': $ds-blue-100,
|
|
52
75
|
'blue-300': $ds-blue-300,
|
|
53
76
|
'blue-500': $ds-blue-500,
|
|
@@ -84,6 +107,21 @@ $colors: (
|
|
|
84
107
|
'green-500': $ds-green-500,
|
|
85
108
|
'green-700': $ds-green-700,
|
|
86
109
|
'green-900': $ds-green-900,
|
|
110
|
+
'glacier-100': $ds-glacier-100,
|
|
111
|
+
'glacier-300': $ds-glacier-300,
|
|
112
|
+
'glacier-500': $ds-glacier-500,
|
|
113
|
+
'glacier-700': $ds-glacier-700,
|
|
114
|
+
'glacier-900': $ds-glacier-900,
|
|
115
|
+
'spearmint-100': $ds-spearmint-100,
|
|
116
|
+
'spearmint-300': $ds-spearmint-300,
|
|
117
|
+
'spearmint-500': $ds-spearmint-500,
|
|
118
|
+
'spearmint-700': $ds-spearmint-700,
|
|
119
|
+
'spearmint-900': $ds-spearmint-900,
|
|
120
|
+
'pink-100': $ds-pink-100,
|
|
121
|
+
'pink-300': $ds-pink-300,
|
|
122
|
+
'pink-500': $ds-pink-500,
|
|
123
|
+
'pink-700': $ds-pink-700,
|
|
124
|
+
'pink-900': $ds-pink-900,
|
|
87
125
|
'yellow-100': $ds-yellow-100,
|
|
88
126
|
'yellow-300': $ds-yellow-300,
|
|
89
127
|
'yellow-500': $ds-yellow-500,
|
|
@@ -2,29 +2,14 @@ import React from 'react';
|
|
|
2
2
|
|
|
3
3
|
const colors = [
|
|
4
4
|
{
|
|
5
|
-
name: '
|
|
6
|
-
code: '
|
|
7
|
-
hex: '
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
name: 'Blue 300',
|
|
11
|
-
code: 'blue-300',
|
|
12
|
-
hex: '#b0cdf3',
|
|
5
|
+
name: 'Transparent',
|
|
6
|
+
code: 'transparent',
|
|
7
|
+
hex: 'transparent',
|
|
13
8
|
},
|
|
14
9
|
{
|
|
15
|
-
name: '
|
|
16
|
-
code: '
|
|
17
|
-
hex: '#
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
name: 'Blue 700',
|
|
21
|
-
code: 'blue-700',
|
|
22
|
-
hex: '#5f7ba0',
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
name: 'Blue 900',
|
|
26
|
-
code: 'blue-900',
|
|
27
|
-
hex: '#2d394a',
|
|
10
|
+
name: 'White',
|
|
11
|
+
code: 'white',
|
|
12
|
+
hex: '#fff',
|
|
28
13
|
},
|
|
29
14
|
{
|
|
30
15
|
name: 'Primary 25',
|
|
@@ -61,6 +46,56 @@ const colors = [
|
|
|
61
46
|
code: 'primary-900',
|
|
62
47
|
hex: '#2e2e4c',
|
|
63
48
|
},
|
|
49
|
+
{
|
|
50
|
+
name: 'Blue 100',
|
|
51
|
+
code: 'blue-100',
|
|
52
|
+
hex: '#e5f0ff',
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: 'Blue 300',
|
|
56
|
+
code: 'blue-300',
|
|
57
|
+
hex: '#b0cdf3',
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: 'Blue 500',
|
|
61
|
+
code: 'blue-500',
|
|
62
|
+
hex: '#8bb4ea',
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
name: 'Blue 700',
|
|
66
|
+
code: 'blue-700',
|
|
67
|
+
hex: '#5f7ba0',
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: 'Blue 900',
|
|
71
|
+
code: 'blue-900',
|
|
72
|
+
hex: '#2d394a',
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
name: 'Glacier 100',
|
|
76
|
+
code: 'glacier-100',
|
|
77
|
+
hex: '#e0f7fe',
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: 'Glacier 300',
|
|
81
|
+
code: 'glacier-300',
|
|
82
|
+
hex: '#aeddec',
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
name: 'Glacier 500',
|
|
86
|
+
code: 'glacier-500',
|
|
87
|
+
hex: '#8bcbdf',
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
name: 'Glacier 700',
|
|
91
|
+
code: 'glacier-700',
|
|
92
|
+
hex: '#5d8896',
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
name: 'Glacier 900',
|
|
96
|
+
code: 'glacier-900',
|
|
97
|
+
hex: '#2d4148',
|
|
98
|
+
},
|
|
64
99
|
{
|
|
65
100
|
name: 'Red 100',
|
|
66
101
|
code: 'red-100',
|
|
@@ -86,6 +121,31 @@ const colors = [
|
|
|
86
121
|
code: 'red-900',
|
|
87
122
|
hex: '#4b2525',
|
|
88
123
|
},
|
|
124
|
+
{
|
|
125
|
+
name: 'Pink 100',
|
|
126
|
+
code: 'pink-100',
|
|
127
|
+
hex: '#ffebf1',
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
name: 'Pink 300',
|
|
131
|
+
code: 'pink-300',
|
|
132
|
+
hex: '#ffb1cb',
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
name: 'Pink 500',
|
|
136
|
+
code: 'pink-500',
|
|
137
|
+
hex: '#f96092',
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
name: 'Pink 700',
|
|
141
|
+
code: 'pink-700',
|
|
142
|
+
hex: '#c0305f',
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
name: 'Pink 900',
|
|
146
|
+
code: 'pink-900',
|
|
147
|
+
hex: '#700024',
|
|
148
|
+
},
|
|
89
149
|
{
|
|
90
150
|
name: 'Grey 100',
|
|
91
151
|
code: 'grey-100',
|
|
@@ -146,6 +206,31 @@ const colors = [
|
|
|
146
206
|
code: 'green-900',
|
|
147
207
|
hex: '#354a2d',
|
|
148
208
|
},
|
|
209
|
+
{
|
|
210
|
+
name: 'Spearmint 100',
|
|
211
|
+
code: 'spearmint-100',
|
|
212
|
+
hex: '#e3fff2',
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
name: 'Spearmint 300',
|
|
216
|
+
code: 'spearmint-300',
|
|
217
|
+
hex: '#aaeacc',
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
name: 'Spearmint 500',
|
|
221
|
+
code: 'spearmint-500',
|
|
222
|
+
hex: '#85dcb4',
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
name: 'Spearmint 700',
|
|
226
|
+
code: 'spearmint-700',
|
|
227
|
+
hex: '#599278',
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
name: 'Spearmint 900',
|
|
231
|
+
code: 'spearmint-900',
|
|
232
|
+
hex: '#2b4639',
|
|
233
|
+
},
|
|
149
234
|
{
|
|
150
235
|
name: 'Yellow 100',
|
|
151
236
|
code: 'yellow-100',
|
|
@@ -185,7 +270,8 @@ export const Colors = () => (
|
|
|
185
270
|
<th style={{ fontWeight: 'bold' }}>Color</th>
|
|
186
271
|
<th style={{ fontWeight: 'bold' }}>Name</th>
|
|
187
272
|
<th style={{ fontWeight: 'bold' }}>Sass</th>
|
|
188
|
-
<th style={{ fontWeight: 'bold' }}>Text class</th>
|
|
273
|
+
<th style={{ fontWeight: 'bold' }}>Text color class</th>
|
|
274
|
+
<th style={{ fontWeight: 'bold' }}>BG color class</th>
|
|
189
275
|
<th style={{ fontWeight: 'bold' }}>Hex</th>
|
|
190
276
|
</tr>
|
|
191
277
|
{colors.map((color) => (
|
|
@@ -203,6 +289,7 @@ export const Colors = () => (
|
|
|
203
289
|
<td>{color.name}</td>
|
|
204
290
|
<td>{`$ds-${color.code}`}</td>
|
|
205
291
|
<td>{`tc-${color.code}`}</td>
|
|
292
|
+
<td>{`bg-${color.code}`}</td>
|
|
206
293
|
<td>{color.hex}</td>
|
|
207
294
|
</tr>
|
|
208
295
|
))}
|
package/package.json
CHANGED
|
@@ -95,10 +95,17 @@ body {
|
|
|
95
95
|
.p-a {
|
|
96
96
|
color: $ds-primary-500;
|
|
97
97
|
text-decoration: none;
|
|
98
|
+
|
|
98
99
|
&:hover,
|
|
99
100
|
&:focus {
|
|
100
101
|
color: $ds-primary-700;
|
|
101
102
|
}
|
|
103
|
+
|
|
104
|
+
&:focus-visible {
|
|
105
|
+
outline: 2px solid $ds-grey-900;
|
|
106
|
+
border-radius: 2px;
|
|
107
|
+
outline-offset: 2px;
|
|
108
|
+
}
|
|
102
109
|
}
|
|
103
110
|
|
|
104
111
|
// Layout
|
|
@@ -11,6 +11,10 @@ export const Typography = () => (
|
|
|
11
11
|
<h4 className="p-h4">The quick brown fox jumps over the lazy dog</h4>
|
|
12
12
|
<p className="p-p">The quick brown fox jumps over the lazy dog</p>
|
|
13
13
|
<p className="p-p--small">The quick brown fox jumps over the lazy dog</p>
|
|
14
|
+
<a href="#" className="p-a">
|
|
15
|
+
The quick brown fox jumps over the lazy dog
|
|
16
|
+
</a>
|
|
17
|
+
<p className="p-error">The quick brown fox jumps over the lazy dog</p>
|
|
14
18
|
</>
|
|
15
19
|
);
|
|
16
20
|
|
|
@@ -48,6 +48,8 @@ Dirty swan provides classes to override default heading.
|
|
|
48
48
|
<h4 class="p-h4">The quick brown fox jumps over the lazy dog</h4>
|
|
49
49
|
<p class="p-p">The quick brown fox jumps over the lazy dog</p>
|
|
50
50
|
<p class="p-p--small">The quick brown fox jumps over the lazy dog</p>
|
|
51
|
+
<a class="p-a">The quick brown fox jumps over the lazy dog</a>
|
|
52
|
+
<p class="p-error">The quick brown fox jumps over the lazy dog</p>
|
|
51
53
|
```
|
|
52
54
|
|
|
53
55
|
## Layout
|
|
@@ -69,3 +71,4 @@ Dirty swan provides classes to override default heading.
|
|
|
69
71
|
| ----------- | ------------------- |
|
|
70
72
|
| `fs-italic` | font-style: italic; |
|
|
71
73
|
| `fs-normal` | font-style: normal; |
|
|
74
|
+
|
|
@@ -94,10 +94,7 @@
|
|
|
94
94
|
.p-radio:checked {
|
|
95
95
|
& + label::before {
|
|
96
96
|
border-color: $ds-primary-500;
|
|
97
|
-
|
|
98
|
-
background-image: url('data:image/svg+xml;utf8,<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="6" cy="6" r="5.5" fill="#{util.url-encoded-color($ds-primary-500)}" /></svg>');
|
|
99
|
-
background-repeat: no-repeat;
|
|
100
|
-
background-position: center;
|
|
97
|
+
background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 20 20" stroke="white" stroke-width="4" xmlns="http://www.w3.org/2000/svg"><circle cx="10" cy="10" r="50%" fill="#{util.url-encoded-color($ds-primary-500)}"/></svg>');
|
|
101
98
|
}
|
|
102
99
|
}
|
|
103
100
|
|
package/src/lib/.DS_Store
DELETED
|
Binary file
|
|
Binary file
|
|
Binary file
|