@flightlesslabs/dodo-ui 0.5.0 → 0.6.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/index.d.ts +3 -0
- package/dist/index.js +2 -0
- package/dist/stories/components/Form/Button/Button.stories.svelte +1 -1
- package/dist/stories/components/Form/Button/Button.svelte +37 -37
- package/dist/stories/components/Form/Button/Button.svelte.d.ts +1 -1
- package/dist/stories/components/Form/Button/Color/Color.stories.svelte +9 -7
- package/dist/stories/components/Form/Message/Color/Color.stories.svelte +4 -4
- package/dist/stories/components/Form/Message/Message.stories.svelte +1 -1
- package/dist/stories/components/Form/Message/Message.svelte +3 -3
- package/dist/stories/components/Form/Message/Message.svelte.d.ts +1 -1
- package/dist/stories/components/Layout/Paper/Paper.stories.svelte +32 -0
- package/dist/stories/components/Layout/Paper/Paper.stories.svelte.d.ts +21 -0
- package/dist/stories/components/Layout/Paper/Paper.svelte +52 -0
- package/dist/stories/components/Layout/Paper/Paper.svelte.d.ts +23 -0
- package/dist/stories/components/Layout/Paper/Roundness/Roundness.stories.svelte +30 -0
- package/dist/stories/components/Layout/Paper/Roundness/Roundness.stories.svelte.d.ts +26 -0
- package/dist/stories/components/Layout/Paper/Shadow/Shadow.stories.svelte +42 -0
- package/dist/stories/components/Layout/Paper/Shadow/Shadow.stories.svelte.d.ts +26 -0
- package/dist/stories/philosophy/Colors/utils/color.js +1 -1
- package/dist/styles/_colors.css +26 -26
- package/dist/styles/_shadow.css +39 -0
- package/dist/styles/global.css +1 -0
- package/dist/types.d.ts +1 -0
- package/package.json +1 -1
- package/src/lib/index.ts +7 -0
- package/src/lib/stories/components/Form/Button/Button.stories.svelte +1 -1
- package/src/lib/stories/components/Form/Button/Button.svelte +4 -4
- package/src/lib/stories/components/Form/Button/Color/Color.stories.svelte +9 -7
- package/src/lib/stories/components/Form/Message/Color/Color.stories.svelte +4 -4
- package/src/lib/stories/components/Form/Message/Message.stories.svelte +1 -1
- package/src/lib/stories/components/Form/Message/Message.svelte +5 -5
- package/src/lib/stories/components/Layout/Paper/Paper.stories.svelte +36 -0
- package/src/lib/stories/components/Layout/Paper/Paper.svelte +91 -0
- package/src/lib/stories/components/Layout/Paper/Roundness/Roundness.stories.svelte +30 -0
- package/src/lib/stories/components/Layout/Paper/Shadow/Shadow.stories.svelte +42 -0
- package/src/lib/styles/_colors.css +26 -26
- package/src/lib/styles/_shadow.css +39 -0
- package/src/lib/styles/global.css +1 -0
- package/src/lib/types.ts +1 -0
package/dist/index.d.ts
CHANGED
|
@@ -23,3 +23,6 @@ export type { MessageColor } from './stories/components/Form/Message/Message.sve
|
|
|
23
23
|
/** Form: SimpleSelect */
|
|
24
24
|
export { default as SimpleSelect } from './stories/components/Form/SimpleSelect/SimpleSelect.svelte';
|
|
25
25
|
export type { SimpleSelectFocusEvent, SimpleSelectOption, } from './stories/components/Form/SimpleSelect/SimpleSelect.svelte';
|
|
26
|
+
/** Layout: Paper */
|
|
27
|
+
export { default as Paper } from './stories/components/Layout/Paper/Paper.svelte';
|
|
28
|
+
export type { PaperRoundness, PaperShadow, } from './stories/components/Layout/Paper/Paper.svelte';
|
package/dist/index.js
CHANGED
|
@@ -17,3 +17,5 @@ export { default as FormControl } from './stories/components/Form/FormControl/Fo
|
|
|
17
17
|
export { default as Message } from './stories/components/Form/Message/Message.svelte';
|
|
18
18
|
/** Form: SimpleSelect */
|
|
19
19
|
export { default as SimpleSelect } from './stories/components/Form/SimpleSelect/SimpleSelect.svelte';
|
|
20
|
+
/** Layout: Paper */
|
|
21
|
+
export { default as Paper } from './stories/components/Layout/Paper/Paper.svelte';
|
|
@@ -8,7 +8,7 @@ export const storyButtonArgTypes = {
|
|
|
8
8
|
},
|
|
9
9
|
color: {
|
|
10
10
|
control: { type: 'select' },
|
|
11
|
-
options: ['default', 'primary', 'safe', 'warning', 'danger'
|
|
11
|
+
options: ['default', 'secondary', 'primary', 'safe', 'warning', 'danger'],
|
|
12
12
|
},
|
|
13
13
|
variant: {
|
|
14
14
|
control: { type: 'select' },
|
|
@@ -96,6 +96,13 @@ export {};
|
|
|
96
96
|
--dodo-ui-Button-solid-primary-bg: var(--dodo-color-primary-500);
|
|
97
97
|
--dodo-ui-Button-solid-primary-hover-bg: var(--dodo-color-primary-600);
|
|
98
98
|
--dodo-ui-Button-solid-primary-active-bg: var(--dodo-color-primary-700);
|
|
99
|
+
--dodo-ui-Button-outline-secondary: var(--dodo-color-secondary-400);
|
|
100
|
+
--dodo-ui-Button-text-secondary-bg: var(--dodo-color-secondary-100);
|
|
101
|
+
--dodo-ui-Button-text-secondary-hover-bg: var(--dodo-color-secondary-200);
|
|
102
|
+
--dodo-ui-Button-text-secondary-active-bg: var(--dodo-color-secondary-300);
|
|
103
|
+
--dodo-ui-Button-solid-secondary-bg: var(--dodo-color-secondary-500);
|
|
104
|
+
--dodo-ui-Button-solid-secondary-hover-bg: var(--dodo-color-secondary-600);
|
|
105
|
+
--dodo-ui-Button-solid-secondary-active-bg: var(--dodo-color-secondary-700);
|
|
99
106
|
--dodo-ui-Button-outline-safe: var(--dodo-color-safe-400);
|
|
100
107
|
--dodo-ui-Button-text-safe-bg: var(--dodo-color-safe-100);
|
|
101
108
|
--dodo-ui-Button-text-safe-hover-bg: var(--dodo-color-safe-200);
|
|
@@ -117,13 +124,6 @@ export {};
|
|
|
117
124
|
--dodo-ui-Button-solid-danger-bg: var(--dodo-color-danger-500);
|
|
118
125
|
--dodo-ui-Button-solid-danger-hover-bg: var(--dodo-color-danger-600);
|
|
119
126
|
--dodo-ui-Button-solid-danger-active-bg: var(--dodo-color-danger-700);
|
|
120
|
-
--dodo-ui-Button-outline-info: var(--dodo-color-info-400);
|
|
121
|
-
--dodo-ui-Button-text-info-bg: var(--dodo-color-info-100);
|
|
122
|
-
--dodo-ui-Button-text-info-hover-bg: var(--dodo-color-info-200);
|
|
123
|
-
--dodo-ui-Button-text-info-active-bg: var(--dodo-color-info-300);
|
|
124
|
-
--dodo-ui-Button-solid-info-bg: var(--dodo-color-info-500);
|
|
125
|
-
--dodo-ui-Button-solid-info-hover-bg: var(--dodo-color-info-600);
|
|
126
|
-
--dodo-ui-Button-solid-info-active-bg: var(--dodo-color-info-700);
|
|
127
127
|
}
|
|
128
128
|
|
|
129
129
|
:global(.dodo-theme--dark) {
|
|
@@ -143,6 +143,13 @@ export {};
|
|
|
143
143
|
--dodo-ui-Button-solid-primary-bg: var(--dodo-color-primary-300);
|
|
144
144
|
--dodo-ui-Button-solid-primary-hover-bg: var(--dodo-color-primary-200);
|
|
145
145
|
--dodo-ui-Button-solid-primary-active-bg: var(--dodo-color-primary-100);
|
|
146
|
+
--dodo-ui-Button-outline-secondary: var(--dodo-color-secondary-300);
|
|
147
|
+
--dodo-ui-Button-text-secondary-bg: var(--dodo-color-secondary-50);
|
|
148
|
+
--dodo-ui-Button-text-secondary-hover-bg: var(--dodo-color-secondary-100);
|
|
149
|
+
--dodo-ui-Button-text-secondary-active-bg: var(--dodo-color-secondary-200);
|
|
150
|
+
--dodo-ui-Button-solid-secondary-bg: var(--dodo-color-secondary-300);
|
|
151
|
+
--dodo-ui-Button-solid-secondary-hover-bg: var(--dodo-color-secondary-200);
|
|
152
|
+
--dodo-ui-Button-solid-secondary-active-bg: var(--dodo-color-secondary-100);
|
|
146
153
|
--dodo-ui-Button-outline-safe: var(--dodo-color-safe-300);
|
|
147
154
|
--dodo-ui-Button-text-safe-bg: var(--dodo-color-safe-50);
|
|
148
155
|
--dodo-ui-Button-text-safe-hover-bg: var(--dodo-color-safe-100);
|
|
@@ -164,13 +171,6 @@ export {};
|
|
|
164
171
|
--dodo-ui-Button-solid-danger-bg: var(--dodo-color-danger-300);
|
|
165
172
|
--dodo-ui-Button-solid-danger-hover-bg: var(--dodo-color-danger-200);
|
|
166
173
|
--dodo-ui-Button-solid-danger-active-bg: var(--dodo-color-danger-100);
|
|
167
|
-
--dodo-ui-Button-outline-info: var(--dodo-color-info-300);
|
|
168
|
-
--dodo-ui-Button-text-info-bg: var(--dodo-color-info-50);
|
|
169
|
-
--dodo-ui-Button-text-info-hover-bg: var(--dodo-color-info-100);
|
|
170
|
-
--dodo-ui-Button-text-info-active-bg: var(--dodo-color-info-200);
|
|
171
|
-
--dodo-ui-Button-solid-info-bg: var(--dodo-color-info-300);
|
|
172
|
-
--dodo-ui-Button-solid-info-hover-bg: var(--dodo-color-info-200);
|
|
173
|
-
--dodo-ui-Button-solid-info-active-bg: var(--dodo-color-info-100);
|
|
174
174
|
}
|
|
175
175
|
|
|
176
176
|
.dodo-ui-Button {
|
|
@@ -268,6 +268,29 @@ export {};
|
|
|
268
268
|
.dodo-ui-Button.color--primary.variant--solid:active {
|
|
269
269
|
background-color: var(--dodo-ui-Button-solid-primary-active-bg);
|
|
270
270
|
}
|
|
271
|
+
.dodo-ui-Button.color--secondary.variant--text {
|
|
272
|
+
color: var(--dodo-color-secondary-800);
|
|
273
|
+
background-color: var(--dodo-ui-Button-text-secondary-bg);
|
|
274
|
+
}
|
|
275
|
+
.dodo-ui-Button.color--secondary.variant--text:hover {
|
|
276
|
+
background-color: var(--dodo-ui-Button-text-secondary-hover-bg);
|
|
277
|
+
}
|
|
278
|
+
.dodo-ui-Button.color--secondary.variant--text:active {
|
|
279
|
+
background-color: var(--dodo-ui-Button-text-secondary-active-bg);
|
|
280
|
+
}
|
|
281
|
+
.dodo-ui-Button.color--secondary.variant--text.outline {
|
|
282
|
+
border-color: var(--dodo-ui-Button-outline-secondary);
|
|
283
|
+
}
|
|
284
|
+
.dodo-ui-Button.color--secondary.variant--solid {
|
|
285
|
+
color: var(--dodo-color-constant-white);
|
|
286
|
+
background-color: var(--dodo-ui-Button-solid-secondary-bg);
|
|
287
|
+
}
|
|
288
|
+
.dodo-ui-Button.color--secondary.variant--solid:hover {
|
|
289
|
+
background-color: var(--dodo-ui-Button-solid-secondary-hover-bg);
|
|
290
|
+
}
|
|
291
|
+
.dodo-ui-Button.color--secondary.variant--solid:active {
|
|
292
|
+
background-color: var(--dodo-ui-Button-solid-secondary-active-bg);
|
|
293
|
+
}
|
|
271
294
|
.dodo-ui-Button.color--safe.variant--text {
|
|
272
295
|
color: var(--dodo-color-safe-800);
|
|
273
296
|
background-color: var(--dodo-ui-Button-text-safe-bg);
|
|
@@ -337,29 +360,6 @@ export {};
|
|
|
337
360
|
.dodo-ui-Button.color--danger.variant--solid:active {
|
|
338
361
|
background-color: var(--dodo-ui-Button-solid-danger-active-bg);
|
|
339
362
|
}
|
|
340
|
-
.dodo-ui-Button.color--info.variant--text {
|
|
341
|
-
color: var(--dodo-color-info-800);
|
|
342
|
-
background-color: var(--dodo-ui-Button-text-info-bg);
|
|
343
|
-
}
|
|
344
|
-
.dodo-ui-Button.color--info.variant--text:hover {
|
|
345
|
-
background-color: var(--dodo-ui-Button-text-info-hover-bg);
|
|
346
|
-
}
|
|
347
|
-
.dodo-ui-Button.color--info.variant--text:active {
|
|
348
|
-
background-color: var(--dodo-ui-Button-text-info-active-bg);
|
|
349
|
-
}
|
|
350
|
-
.dodo-ui-Button.color--info.variant--text.outline {
|
|
351
|
-
border-color: var(--dodo-ui-Button-outline-info);
|
|
352
|
-
}
|
|
353
|
-
.dodo-ui-Button.color--info.variant--solid {
|
|
354
|
-
color: var(--dodo-color-constant-white);
|
|
355
|
-
background-color: var(--dodo-ui-Button-solid-info-bg);
|
|
356
|
-
}
|
|
357
|
-
.dodo-ui-Button.color--info.variant--solid:hover {
|
|
358
|
-
background-color: var(--dodo-ui-Button-solid-info-hover-bg);
|
|
359
|
-
}
|
|
360
|
-
.dodo-ui-Button.color--info.variant--solid:active {
|
|
361
|
-
background-color: var(--dodo-ui-Button-solid-info-active-bg);
|
|
362
|
-
}
|
|
363
363
|
.dodo-ui-Button[disabled] {
|
|
364
364
|
cursor: initial;
|
|
365
365
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type ButtonColor = 'default' | 'primary' | '
|
|
1
|
+
export type ButtonColor = 'default' | 'primary' | 'secondary' | 'safe' | 'warning' | 'danger';
|
|
2
2
|
export type ButtonRoundness = ComponentRoundness | false | ComponentRoundnessFull;
|
|
3
3
|
export type ButtonLinkTarget = '_self' | '_blank' | '_parent' | '_top' | (string & {}) | undefined | null;
|
|
4
4
|
export type ButtonLinkReferrerpolicy = ReferrerPolicy | undefined | null;
|
|
@@ -19,10 +19,12 @@
|
|
|
19
19
|
<Button>Click me!</Button>
|
|
20
20
|
</Story>
|
|
21
21
|
<Story name="Primary" args={{ color: 'primary' }}><Button color="primary">Click me!</Button></Story>
|
|
22
|
+
<Story name="Secondary" args={{ color: 'secondary' }}>
|
|
23
|
+
<Button color="secondary">Click me!</Button>
|
|
24
|
+
</Story>
|
|
22
25
|
<Story name="Safe" args={{ color: 'safe' }}><Button color="safe">Click me!</Button></Story>
|
|
23
26
|
<Story name="Warning" args={{ color: 'warning' }}><Button color="warning">Click me!</Button></Story>
|
|
24
27
|
<Story name="Danger" args={{ color: 'danger' }}><Button color="danger">Click me!</Button></Story>
|
|
25
|
-
<Story name="Info" args={{ color: 'info' }}><Button color="info">Click me!</Button></Story>
|
|
26
28
|
|
|
27
29
|
<Story
|
|
28
30
|
name="Default Solid"
|
|
@@ -33,6 +35,9 @@
|
|
|
33
35
|
<Story name="Primary Solid" args={{ color: 'primary', variant: 'solid' }}>
|
|
34
36
|
<Button color="primary" variant="solid">Click me!</Button>
|
|
35
37
|
</Story>
|
|
38
|
+
<Story name="Secondary Solid" args={{ color: 'secondary', variant: 'solid' }}>
|
|
39
|
+
<Button color="secondary" variant="solid">Click me!</Button>
|
|
40
|
+
</Story>
|
|
36
41
|
<Story name="Safe Solid" args={{ color: 'safe', variant: 'solid' }}>
|
|
37
42
|
<Button color="safe" variant="solid">Click me!</Button>
|
|
38
43
|
</Story>
|
|
@@ -42,9 +47,6 @@
|
|
|
42
47
|
<Story name="Danger Solid" args={{ color: 'danger', variant: 'solid' }}>
|
|
43
48
|
<Button color="danger" variant="solid">Click me!</Button>
|
|
44
49
|
</Story>
|
|
45
|
-
<Story name="Info Solid" args={{ color: 'info', variant: 'solid' }}>
|
|
46
|
-
<Button color="info" variant="solid">Click me!</Button>
|
|
47
|
-
</Story>
|
|
48
50
|
|
|
49
51
|
<Story name="Default Outline" args={{ outline: true, disabled: false, compact: false }}>
|
|
50
52
|
<Button outline>Click me!</Button>
|
|
@@ -52,6 +54,9 @@
|
|
|
52
54
|
<Story name="Primary Outline" args={{ outline: true, color: 'primary' }}>
|
|
53
55
|
<Button color="primary" outline>Click me!</Button>
|
|
54
56
|
</Story>
|
|
57
|
+
<Story name="Secondary Outline" args={{ outline: true, color: 'secondary' }}>
|
|
58
|
+
<Button color="secondary" outline>Click me!</Button>
|
|
59
|
+
</Story>
|
|
55
60
|
<Story name="Safe Outline" args={{ outline: true, color: 'safe' }}>
|
|
56
61
|
<Button color="safe" outline>Click me!</Button>
|
|
57
62
|
</Story>
|
|
@@ -61,6 +66,3 @@
|
|
|
61
66
|
<Story name="Danger Outline" args={{ outline: true, color: 'danger' }}>
|
|
62
67
|
<Button color="danger" outline>Click me!</Button>
|
|
63
68
|
</Story>
|
|
64
|
-
<Story name="Info Outline" args={{ outline: true, color: 'info' }}>
|
|
65
|
-
<Button color="info" outline>Click me!</Button>
|
|
66
|
-
</Story>
|
|
@@ -19,6 +19,10 @@
|
|
|
19
19
|
<Message color="primary">Lorem ipsum dolor sit amet, consectetur adipiscing elit</Message>
|
|
20
20
|
</Story>
|
|
21
21
|
|
|
22
|
+
<Story name="Secondary" args={{ color: 'secondary' }}>
|
|
23
|
+
<Message color="secondary">Lorem ipsum dolor sit amet, consectetur adipiscing elit</Message>
|
|
24
|
+
</Story>
|
|
25
|
+
|
|
22
26
|
<Story name="Safe" args={{ color: 'safe' }}>
|
|
23
27
|
<Message color="safe">Lorem ipsum dolor sit amet, consectetur adipiscing elit</Message>
|
|
24
28
|
</Story>
|
|
@@ -30,7 +34,3 @@
|
|
|
30
34
|
<Story name="Danger" args={{ color: 'danger' }}>
|
|
31
35
|
<Message color="danger">Lorem ipsum dolor sit amet, consectetur adipiscing elit</Message>
|
|
32
36
|
</Story>
|
|
33
|
-
|
|
34
|
-
<Story name="Info" args={{ color: 'info' }}>
|
|
35
|
-
<Message color="info">Lorem ipsum dolor sit amet, consectetur adipiscing elit</Message>
|
|
36
|
-
</Story>
|
|
@@ -3,7 +3,7 @@ import Message from './Message.svelte';
|
|
|
3
3
|
export const storyMessageArgTypes = {
|
|
4
4
|
color: {
|
|
5
5
|
control: { type: 'select' },
|
|
6
|
-
options: ['default', 'primary', '
|
|
6
|
+
options: ['default', 'primary', 'secondary', 'safe', 'warning', 'danger'],
|
|
7
7
|
},
|
|
8
8
|
size: {
|
|
9
9
|
control: { type: 'select' },
|
|
@@ -36,6 +36,9 @@ export {};
|
|
|
36
36
|
.dodo-ui-Message.color--primary {
|
|
37
37
|
color: var(--dodo-color-primary-600);
|
|
38
38
|
}
|
|
39
|
+
.dodo-ui-Message.color--secondary {
|
|
40
|
+
color: var(--dodo-color-secondary-600);
|
|
41
|
+
}
|
|
39
42
|
.dodo-ui-Message.color--safe {
|
|
40
43
|
color: var(--dodo-color-safe-600);
|
|
41
44
|
}
|
|
@@ -44,7 +47,4 @@ export {};
|
|
|
44
47
|
}
|
|
45
48
|
.dodo-ui-Message.color--danger {
|
|
46
49
|
color: var(--dodo-color-danger-600);
|
|
47
|
-
}
|
|
48
|
-
.dodo-ui-Message.color--info {
|
|
49
|
-
color: var(--dodo-color-info-600);
|
|
50
50
|
}</style>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type MessageColor = 'default' | 'primary' | '
|
|
1
|
+
export type MessageColor = 'default' | 'primary' | 'secondary' | 'safe' | 'warning' | 'danger';
|
|
2
2
|
import type { ComponentSize } from '../../../../types.js';
|
|
3
3
|
import type { Snippet } from 'svelte';
|
|
4
4
|
interface MessageProps {
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<script module lang="ts">import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
2
|
+
import Paper from './Paper.svelte';
|
|
3
|
+
export const storyPaperArgTypes = {
|
|
4
|
+
roundness: {
|
|
5
|
+
control: { type: 'select' },
|
|
6
|
+
options: [false, '1x', '2x', '3x', 'full'],
|
|
7
|
+
},
|
|
8
|
+
shadow: {
|
|
9
|
+
control: { type: 'select' },
|
|
10
|
+
options: [false, '1x', '2x', '3x', '4x', '5x', '6x', '7x'],
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
// More on how to set up stories at: https://storybook.js.org/docs/writing-stories
|
|
14
|
+
const { Story } = defineMeta({
|
|
15
|
+
component: Paper,
|
|
16
|
+
tags: ['autodocs'],
|
|
17
|
+
argTypes: storyPaperArgTypes,
|
|
18
|
+
});
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<!-- ⚠️ Test Paper: Do not use! -->
|
|
22
|
+
<Story
|
|
23
|
+
name="Test Paper"
|
|
24
|
+
args={{
|
|
25
|
+
_unsafeChildrenStringForTesting: 'Hola!',
|
|
26
|
+
}}
|
|
27
|
+
/>
|
|
28
|
+
|
|
29
|
+
<!-- Paper with default style -->
|
|
30
|
+
<Story name="Default">
|
|
31
|
+
<Paper>Hola!</Paper>
|
|
32
|
+
</Story>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import Paper from './Paper.svelte';
|
|
2
|
+
import type { StoryBookArgTypes } from '../../../../storybook-types.js';
|
|
3
|
+
export declare const storyPaperArgTypes: StoryBookArgTypes;
|
|
4
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
5
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
6
|
+
$$bindings?: Bindings;
|
|
7
|
+
} & Exports;
|
|
8
|
+
(internal: unknown, props: {
|
|
9
|
+
$$events?: Events;
|
|
10
|
+
$$slots?: Slots;
|
|
11
|
+
}): Exports & {
|
|
12
|
+
$set?: any;
|
|
13
|
+
$on?: any;
|
|
14
|
+
};
|
|
15
|
+
z_$$bindings?: Bindings;
|
|
16
|
+
}
|
|
17
|
+
declare const Paper: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
18
|
+
[evt: string]: CustomEvent<any>;
|
|
19
|
+
}, {}, {}, string>;
|
|
20
|
+
type Paper = InstanceType<typeof Paper>;
|
|
21
|
+
export default Paper;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<script lang="ts" module>export {};
|
|
2
|
+
</script>
|
|
3
|
+
|
|
4
|
+
<script lang="ts">let { children, roundness = '1x', shadow = '1x', id, class: className = '', _unsafeChildrenStringForTesting, ref = $bindable(), } = $props();
|
|
5
|
+
export {};
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<div
|
|
9
|
+
class={[
|
|
10
|
+
'dodo-ui-Paper',
|
|
11
|
+
`roundness--${roundness}`,
|
|
12
|
+
`${shadow ? `shadow--${shadow} dodo-shadow-${shadow}` : `shadow--${shadow}`}`,
|
|
13
|
+
className,
|
|
14
|
+
].join(' ')}
|
|
15
|
+
{id}
|
|
16
|
+
bind:this={ref}
|
|
17
|
+
>
|
|
18
|
+
{#if children}
|
|
19
|
+
{@render children()}
|
|
20
|
+
{:else if _unsafeChildrenStringForTesting}
|
|
21
|
+
{_unsafeChildrenStringForTesting}
|
|
22
|
+
{/if}
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
<style>:global(:root) {
|
|
26
|
+
--dodo-ui-Paper-bg: var(--dodo-color-white);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
:global(.dodo-theme--dark) {
|
|
30
|
+
--dodo-ui-Paper-bg: var(--dodo-color-default-100);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.dodo-ui-Paper {
|
|
34
|
+
outline: none;
|
|
35
|
+
transition: all 150ms;
|
|
36
|
+
font-family: inherit;
|
|
37
|
+
color: inherit;
|
|
38
|
+
background-color: var(--dodo-ui-Paper-bg);
|
|
39
|
+
overflow: hidden;
|
|
40
|
+
}
|
|
41
|
+
.dodo-ui-Paper.roundness--1x {
|
|
42
|
+
border-radius: var(--dodo-ui-element-roundness-1x);
|
|
43
|
+
}
|
|
44
|
+
.dodo-ui-Paper.roundness--2x {
|
|
45
|
+
border-radius: var(--dodo-ui-element-roundness-2x);
|
|
46
|
+
}
|
|
47
|
+
.dodo-ui-Paper.roundness--3x {
|
|
48
|
+
border-radius: var(--dodo-ui-element-roundness-3x);
|
|
49
|
+
}
|
|
50
|
+
.dodo-ui-Paper.roundness--full {
|
|
51
|
+
border-radius: 50%;
|
|
52
|
+
}</style>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export type PaperRoundness = ComponentRoundness | false | ComponentRoundnessFull;
|
|
2
|
+
export type PaperShadow = false | '1x' | '2x' | '3x' | '4x' | '5x' | '6x' | '7x';
|
|
3
|
+
import type { ComponentRoundness, ComponentRoundnessFull } from '../../../../types.js';
|
|
4
|
+
import type { Snippet } from 'svelte';
|
|
5
|
+
interface PaperProps {
|
|
6
|
+
/** Paper contents goes here */
|
|
7
|
+
children?: Snippet;
|
|
8
|
+
/** Paper ref */
|
|
9
|
+
ref?: HTMLDivElement;
|
|
10
|
+
/** How round should the border radius be? */
|
|
11
|
+
roundness?: PaperRoundness;
|
|
12
|
+
/** Shadow elevation */
|
|
13
|
+
shadow?: PaperShadow;
|
|
14
|
+
/** Custom css class*/
|
|
15
|
+
class?: string;
|
|
16
|
+
/** Id */
|
|
17
|
+
id?: string;
|
|
18
|
+
/** Test: ⚠️ Unsafe Children String. Do Not use*/
|
|
19
|
+
_unsafeChildrenStringForTesting?: string;
|
|
20
|
+
}
|
|
21
|
+
declare const Paper: import("svelte").Component<PaperProps, {}, "ref">;
|
|
22
|
+
type Paper = ReturnType<typeof Paper>;
|
|
23
|
+
export default Paper;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script module>
|
|
2
|
+
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
|
+
import Paper from '../Paper.svelte';
|
|
4
|
+
import { storyPaperArgTypes } from '../Paper.stories.svelte';
|
|
5
|
+
|
|
6
|
+
// More on how to set up stories at: https://storybook.js.org/docs/writing-stories
|
|
7
|
+
const { Story } = defineMeta({
|
|
8
|
+
component: Paper,
|
|
9
|
+
tags: ['autodocs'],
|
|
10
|
+
argTypes: storyPaperArgTypes,
|
|
11
|
+
});
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<Story name="Roundness 1x">
|
|
15
|
+
<Paper>Hola!</Paper>
|
|
16
|
+
</Story>
|
|
17
|
+
|
|
18
|
+
<Story name="Roundness 2x" args={{ roundness: '2x' }}><Paper roundness="2x">Hola!</Paper></Story>
|
|
19
|
+
|
|
20
|
+
<Story name="Roundness 3x" args={{ roundness: '3x' }}>
|
|
21
|
+
<Paper roundness="3x">Hola!</Paper>
|
|
22
|
+
</Story>
|
|
23
|
+
|
|
24
|
+
<Story name="Roundness False" args={{ roundness: false }}>
|
|
25
|
+
<Paper roundness={false}>Hola!</Paper>
|
|
26
|
+
</Story>
|
|
27
|
+
|
|
28
|
+
<Story name="Roundness Full" args={{ roundness: 'full' }}>
|
|
29
|
+
<Paper roundness="full">Hola!</Paper>
|
|
30
|
+
</Story>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export default Roundness;
|
|
2
|
+
type Roundness = SvelteComponent<{
|
|
3
|
+
[x: string]: never;
|
|
4
|
+
}, {
|
|
5
|
+
[evt: string]: CustomEvent<any>;
|
|
6
|
+
}, {}> & {
|
|
7
|
+
$$bindings?: string | undefined;
|
|
8
|
+
};
|
|
9
|
+
declare const Roundness: $$__sveltets_2_IsomorphicComponent<{
|
|
10
|
+
[x: string]: never;
|
|
11
|
+
}, {
|
|
12
|
+
[evt: string]: CustomEvent<any>;
|
|
13
|
+
}, {}, {}, string>;
|
|
14
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
15
|
+
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
|
16
|
+
$$bindings?: Bindings;
|
|
17
|
+
} & Exports;
|
|
18
|
+
(internal: unknown, props: {
|
|
19
|
+
$$events?: Events;
|
|
20
|
+
$$slots?: Slots;
|
|
21
|
+
}): Exports & {
|
|
22
|
+
$set?: any;
|
|
23
|
+
$on?: any;
|
|
24
|
+
};
|
|
25
|
+
z_$$bindings?: Bindings;
|
|
26
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<script module>
|
|
2
|
+
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
|
+
import Paper from '../Paper.svelte';
|
|
4
|
+
import { storyPaperArgTypes } from '../Paper.stories.svelte';
|
|
5
|
+
|
|
6
|
+
// More on how to set up stories at: https://storybook.js.org/docs/writing-stories
|
|
7
|
+
const { Story } = defineMeta({
|
|
8
|
+
component: Paper,
|
|
9
|
+
tags: ['autodocs'],
|
|
10
|
+
argTypes: storyPaperArgTypes,
|
|
11
|
+
});
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<Story name="Shadow 1x">
|
|
15
|
+
<Paper>Hola!</Paper>
|
|
16
|
+
</Story>
|
|
17
|
+
|
|
18
|
+
<Story name="Shadow 2x" args={{ shadow: '2x' }}><Paper shadow="2x">Hola!</Paper></Story>
|
|
19
|
+
|
|
20
|
+
<Story name="Shadow 3x" args={{ shadow: '3x' }}>
|
|
21
|
+
<Paper shadow="3x">Hola!</Paper>
|
|
22
|
+
</Story>
|
|
23
|
+
|
|
24
|
+
<Story name="Shadow 4x" args={{ shadow: '4x' }}>
|
|
25
|
+
<Paper shadow="4x">Hola!</Paper>
|
|
26
|
+
</Story>
|
|
27
|
+
|
|
28
|
+
<Story name="Shadow 5x" args={{ shadow: '5x' }}>
|
|
29
|
+
<Paper shadow="5x">Hola!</Paper>
|
|
30
|
+
</Story>
|
|
31
|
+
|
|
32
|
+
<Story name="Shadow 6x" args={{ shadow: '6x' }}>
|
|
33
|
+
<Paper shadow="6x">Hola!</Paper>
|
|
34
|
+
</Story>
|
|
35
|
+
|
|
36
|
+
<Story name="Shadow 7x" args={{ shadow: '7x' }}>
|
|
37
|
+
<Paper shadow="7x">Hola!</Paper>
|
|
38
|
+
</Story>
|
|
39
|
+
|
|
40
|
+
<Story name="Shadow False" args={{ shadow: false }}>
|
|
41
|
+
<Paper shadow={false}>Hola!</Paper>
|
|
42
|
+
</Story>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export default Shadow;
|
|
2
|
+
type Shadow = SvelteComponent<{
|
|
3
|
+
[x: string]: never;
|
|
4
|
+
}, {
|
|
5
|
+
[evt: string]: CustomEvent<any>;
|
|
6
|
+
}, {}> & {
|
|
7
|
+
$$bindings?: string | undefined;
|
|
8
|
+
};
|
|
9
|
+
declare const Shadow: $$__sveltets_2_IsomorphicComponent<{
|
|
10
|
+
[x: string]: never;
|
|
11
|
+
}, {
|
|
12
|
+
[evt: string]: CustomEvent<any>;
|
|
13
|
+
}, {}, {}, string>;
|
|
14
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
15
|
+
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
|
16
|
+
$$bindings?: Bindings;
|
|
17
|
+
} & Exports;
|
|
18
|
+
(internal: unknown, props: {
|
|
19
|
+
$$events?: Events;
|
|
20
|
+
$$slots?: Slots;
|
|
21
|
+
}): Exports & {
|
|
22
|
+
$set?: any;
|
|
23
|
+
$on?: any;
|
|
24
|
+
};
|
|
25
|
+
z_$$bindings?: Bindings;
|
|
26
|
+
}
|
|
@@ -22,7 +22,7 @@ export const colorPaletteBase = [
|
|
|
22
22
|
'stone',
|
|
23
23
|
];
|
|
24
24
|
export const colorPaletteNeutral = ['black', 'white'];
|
|
25
|
-
export const colorPalette = ['default', 'primary', 'safe', 'warning', 'danger', '
|
|
25
|
+
export const colorPalette = ['default', 'primary', 'safe', 'warning', 'danger', 'secondary'];
|
|
26
26
|
export const colorPaletteValues = [
|
|
27
27
|
'50',
|
|
28
28
|
'100',
|
package/dist/styles/_colors.css
CHANGED
|
@@ -33,6 +33,19 @@
|
|
|
33
33
|
--dodo-color-primary-900: var(--dodo-color-base-violet-900);
|
|
34
34
|
--dodo-color-primary-950: var(--dodo-color-base-violet-950);
|
|
35
35
|
|
|
36
|
+
/* Secondary color */
|
|
37
|
+
--dodo-color-secondary-50: var(--dodo-color-base-cyan-50);
|
|
38
|
+
--dodo-color-secondary-100: var(--dodo-color-base-cyan-100);
|
|
39
|
+
--dodo-color-secondary-200: var(--dodo-color-base-cyan-200);
|
|
40
|
+
--dodo-color-secondary-300: var(--dodo-color-base-cyan-300);
|
|
41
|
+
--dodo-color-secondary-400: var(--dodo-color-base-cyan-400);
|
|
42
|
+
--dodo-color-secondary-500: var(--dodo-color-base-cyan-500);
|
|
43
|
+
--dodo-color-secondary-600: var(--dodo-color-base-cyan-600);
|
|
44
|
+
--dodo-color-secondary-700: var(--dodo-color-base-cyan-700);
|
|
45
|
+
--dodo-color-secondary-800: var(--dodo-color-base-cyan-800);
|
|
46
|
+
--dodo-color-secondary-900: var(--dodo-color-base-cyan-900);
|
|
47
|
+
--dodo-color-secondary-950: var(--dodo-color-base-cyan-950);
|
|
48
|
+
|
|
36
49
|
/* Safe color */
|
|
37
50
|
--dodo-color-safe-50: var(--dodo-color-base-emerald-50);
|
|
38
51
|
--dodo-color-safe-100: var(--dodo-color-base-emerald-100);
|
|
@@ -71,19 +84,6 @@
|
|
|
71
84
|
--dodo-color-danger-800: var(--dodo-color-base-red-800);
|
|
72
85
|
--dodo-color-danger-900: var(--dodo-color-base-red-900);
|
|
73
86
|
--dodo-color-danger-950: var(--dodo-color-base-red-950);
|
|
74
|
-
|
|
75
|
-
/* Info color */
|
|
76
|
-
--dodo-color-info-50: var(--dodo-color-base-cyan-50);
|
|
77
|
-
--dodo-color-info-100: var(--dodo-color-base-cyan-100);
|
|
78
|
-
--dodo-color-info-200: var(--dodo-color-base-cyan-200);
|
|
79
|
-
--dodo-color-info-300: var(--dodo-color-base-cyan-300);
|
|
80
|
-
--dodo-color-info-400: var(--dodo-color-base-cyan-400);
|
|
81
|
-
--dodo-color-info-500: var(--dodo-color-base-cyan-500);
|
|
82
|
-
--dodo-color-info-600: var(--dodo-color-base-cyan-600);
|
|
83
|
-
--dodo-color-info-700: var(--dodo-color-base-cyan-700);
|
|
84
|
-
--dodo-color-info-800: var(--dodo-color-base-cyan-800);
|
|
85
|
-
--dodo-color-info-900: var(--dodo-color-base-cyan-900);
|
|
86
|
-
--dodo-color-info-950: var(--dodo-color-base-cyan-950);
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
.dodo-theme--dark {
|
|
@@ -117,6 +117,19 @@
|
|
|
117
117
|
--dodo-color-primary-900: var(--dodo-color-base-violet-100);
|
|
118
118
|
--dodo-color-primary-950: var(--dodo-color-base-violet-50);
|
|
119
119
|
|
|
120
|
+
/* Dark: Secondary color */
|
|
121
|
+
--dodo-color-secondary-50: var(--dodo-color-base-cyan-950);
|
|
122
|
+
--dodo-color-secondary-100: var(--dodo-color-base-cyan-900);
|
|
123
|
+
--dodo-color-secondary-200: var(--dodo-color-base-cyan-800);
|
|
124
|
+
--dodo-color-secondary-300: var(--dodo-color-base-cyan-700);
|
|
125
|
+
--dodo-color-secondary-400: var(--dodo-color-base-cyan-600);
|
|
126
|
+
--dodo-color-secondary-500: var(--dodo-color-base-cyan-500);
|
|
127
|
+
--dodo-color-secondary-600: var(--dodo-color-base-cyan-400);
|
|
128
|
+
--dodo-color-secondary-700: var(--dodo-color-base-cyan-300);
|
|
129
|
+
--dodo-color-secondary-800: var(--dodo-color-base-cyan-200);
|
|
130
|
+
--dodo-color-secondary-900: var(--dodo-color-base-cyan-100);
|
|
131
|
+
--dodo-color-secondary-950: var(--dodo-color-base-cyan-50);
|
|
132
|
+
|
|
120
133
|
/* Dark: Safe color */
|
|
121
134
|
--dodo-color-safe-50: var(--dodo-color-base-emerald-950);
|
|
122
135
|
--dodo-color-safe-100: var(--dodo-color-base-emerald-900);
|
|
@@ -155,17 +168,4 @@
|
|
|
155
168
|
--dodo-color-danger-800: var(--dodo-color-base-red-200);
|
|
156
169
|
--dodo-color-danger-900: var(--dodo-color-base-red-100);
|
|
157
170
|
--dodo-color-danger-950: var(--dodo-color-base-red-50);
|
|
158
|
-
|
|
159
|
-
/* Dark: Info color */
|
|
160
|
-
--dodo-color-info-50: var(--dodo-color-base-cyan-950);
|
|
161
|
-
--dodo-color-info-100: var(--dodo-color-base-cyan-900);
|
|
162
|
-
--dodo-color-info-200: var(--dodo-color-base-cyan-800);
|
|
163
|
-
--dodo-color-info-300: var(--dodo-color-base-cyan-700);
|
|
164
|
-
--dodo-color-info-400: var(--dodo-color-base-cyan-600);
|
|
165
|
-
--dodo-color-info-500: var(--dodo-color-base-cyan-500);
|
|
166
|
-
--dodo-color-info-600: var(--dodo-color-base-cyan-400);
|
|
167
|
-
--dodo-color-info-700: var(--dodo-color-base-cyan-300);
|
|
168
|
-
--dodo-color-info-800: var(--dodo-color-base-cyan-200);
|
|
169
|
-
--dodo-color-info-900: var(--dodo-color-base-cyan-100);
|
|
170
|
-
--dodo-color-info-950: var(--dodo-color-base-cyan-50);
|
|
171
171
|
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--dodo-shadow-color: #0000000d;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.dodo-shadow-1x {
|
|
6
|
+
--dodo-shadow: 0 1px var(--dodo-shadow-color);
|
|
7
|
+
box-shadow: var(--dodo-shadow);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.dodo-shadow-2x {
|
|
11
|
+
--dodo-shadow: 0 1px 2px 0 var(--dodo-shadow-color);
|
|
12
|
+
box-shadow: var(--dodo-shadow);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.dodo-shadow-3x {
|
|
16
|
+
--dodo-shadow: 0 1px 3px 0 var(--dodo-shadow-color);
|
|
17
|
+
box-shadow: var(--dodo-shadow);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.dodo-shadow-4x {
|
|
21
|
+
--dodo-shadow: 0 4px 6px -1px var(--dodo-shadow-color), 0 2px 4px -2px var(--dodo-shadow-color);
|
|
22
|
+
box-shadow: var(--dodo-shadow);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.dodo-shadow-5x {
|
|
26
|
+
--dodo-shadow: 0 10px 15px -3px var(--dodo-shadow-color), 0 4px 6px -4px var(--dodo-shadow-color);
|
|
27
|
+
box-shadow: var(--dodo-shadow);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.dodo-shadow-6x {
|
|
31
|
+
--dodo-shadow:
|
|
32
|
+
0 20px 25px -5px var(--dodo-shadow-color), 0 8px 10px -6px var(--dodo-shadow-color);
|
|
33
|
+
box-shadow: var(--dodo-shadow);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.dodo-shadow-7x {
|
|
37
|
+
--dodo-shadow: 0 25px 50px -12px var(--dodo-shadow-color);
|
|
38
|
+
box-shadow: var(--dodo-shadow);
|
|
39
|
+
}
|
package/dist/styles/global.css
CHANGED
package/dist/types.d.ts
CHANGED
package/package.json
CHANGED
package/src/lib/index.ts
CHANGED
|
@@ -45,3 +45,10 @@ export type {
|
|
|
45
45
|
SimpleSelectFocusEvent,
|
|
46
46
|
SimpleSelectOption,
|
|
47
47
|
} from '$lib/stories/components/Form/SimpleSelect/SimpleSelect.svelte';
|
|
48
|
+
|
|
49
|
+
/** Layout: Paper */
|
|
50
|
+
export { default as Paper } from '$lib/stories/components/Layout/Paper/Paper.svelte';
|
|
51
|
+
export type {
|
|
52
|
+
PaperRoundness,
|
|
53
|
+
PaperShadow,
|
|
54
|
+
} from '$lib/stories/components/Layout/Paper/Paper.svelte';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts" module>
|
|
2
|
-
export type ButtonColor = 'default' | 'primary' | '
|
|
2
|
+
export type ButtonColor = 'default' | 'primary' | 'secondary' | 'safe' | 'warning' | 'danger';
|
|
3
3
|
export type ButtonRoundness = ComponentRoundness | false | ComponentRoundnessFull;
|
|
4
4
|
export type ButtonLinkTarget =
|
|
5
5
|
| '_self'
|
|
@@ -192,10 +192,10 @@
|
|
|
192
192
|
|
|
193
193
|
@include generate-dodo-ui-button-colors(default);
|
|
194
194
|
@include generate-dodo-ui-button-colors(primary);
|
|
195
|
+
@include generate-dodo-ui-button-colors(secondary);
|
|
195
196
|
@include generate-dodo-ui-button-colors(safe);
|
|
196
197
|
@include generate-dodo-ui-button-colors(warning);
|
|
197
198
|
@include generate-dodo-ui-button-colors(danger);
|
|
198
|
-
@include generate-dodo-ui-button-colors(info);
|
|
199
199
|
}
|
|
200
200
|
|
|
201
201
|
:global(.dodo-theme--dark) {
|
|
@@ -204,10 +204,10 @@
|
|
|
204
204
|
|
|
205
205
|
@include generate-dodo-ui-button-colors-dark(default);
|
|
206
206
|
@include generate-dodo-ui-button-colors-dark(primary);
|
|
207
|
+
@include generate-dodo-ui-button-colors-dark(secondary);
|
|
207
208
|
@include generate-dodo-ui-button-colors-dark(safe);
|
|
208
209
|
@include generate-dodo-ui-button-colors-dark(warning);
|
|
209
210
|
@include generate-dodo-ui-button-colors-dark(danger);
|
|
210
|
-
@include generate-dodo-ui-button-colors-dark(info);
|
|
211
211
|
}
|
|
212
212
|
|
|
213
213
|
.dodo-ui-Button {
|
|
@@ -273,10 +273,10 @@
|
|
|
273
273
|
&.color {
|
|
274
274
|
@include generate-dodo-ui-button-color(default);
|
|
275
275
|
@include generate-dodo-ui-button-color(primary);
|
|
276
|
+
@include generate-dodo-ui-button-color(secondary);
|
|
276
277
|
@include generate-dodo-ui-button-color(safe);
|
|
277
278
|
@include generate-dodo-ui-button-color(warning);
|
|
278
279
|
@include generate-dodo-ui-button-color(danger);
|
|
279
|
-
@include generate-dodo-ui-button-color(info);
|
|
280
280
|
}
|
|
281
281
|
|
|
282
282
|
&[disabled] {
|
|
@@ -19,10 +19,12 @@
|
|
|
19
19
|
<Button>Click me!</Button>
|
|
20
20
|
</Story>
|
|
21
21
|
<Story name="Primary" args={{ color: 'primary' }}><Button color="primary">Click me!</Button></Story>
|
|
22
|
+
<Story name="Secondary" args={{ color: 'secondary' }}>
|
|
23
|
+
<Button color="secondary">Click me!</Button>
|
|
24
|
+
</Story>
|
|
22
25
|
<Story name="Safe" args={{ color: 'safe' }}><Button color="safe">Click me!</Button></Story>
|
|
23
26
|
<Story name="Warning" args={{ color: 'warning' }}><Button color="warning">Click me!</Button></Story>
|
|
24
27
|
<Story name="Danger" args={{ color: 'danger' }}><Button color="danger">Click me!</Button></Story>
|
|
25
|
-
<Story name="Info" args={{ color: 'info' }}><Button color="info">Click me!</Button></Story>
|
|
26
28
|
|
|
27
29
|
<Story
|
|
28
30
|
name="Default Solid"
|
|
@@ -33,6 +35,9 @@
|
|
|
33
35
|
<Story name="Primary Solid" args={{ color: 'primary', variant: 'solid' }}>
|
|
34
36
|
<Button color="primary" variant="solid">Click me!</Button>
|
|
35
37
|
</Story>
|
|
38
|
+
<Story name="Secondary Solid" args={{ color: 'secondary', variant: 'solid' }}>
|
|
39
|
+
<Button color="secondary" variant="solid">Click me!</Button>
|
|
40
|
+
</Story>
|
|
36
41
|
<Story name="Safe Solid" args={{ color: 'safe', variant: 'solid' }}>
|
|
37
42
|
<Button color="safe" variant="solid">Click me!</Button>
|
|
38
43
|
</Story>
|
|
@@ -42,9 +47,6 @@
|
|
|
42
47
|
<Story name="Danger Solid" args={{ color: 'danger', variant: 'solid' }}>
|
|
43
48
|
<Button color="danger" variant="solid">Click me!</Button>
|
|
44
49
|
</Story>
|
|
45
|
-
<Story name="Info Solid" args={{ color: 'info', variant: 'solid' }}>
|
|
46
|
-
<Button color="info" variant="solid">Click me!</Button>
|
|
47
|
-
</Story>
|
|
48
50
|
|
|
49
51
|
<Story name="Default Outline" args={{ outline: true, disabled: false, compact: false }}>
|
|
50
52
|
<Button outline>Click me!</Button>
|
|
@@ -52,6 +54,9 @@
|
|
|
52
54
|
<Story name="Primary Outline" args={{ outline: true, color: 'primary' }}>
|
|
53
55
|
<Button color="primary" outline>Click me!</Button>
|
|
54
56
|
</Story>
|
|
57
|
+
<Story name="Secondary Outline" args={{ outline: true, color: 'secondary' }}>
|
|
58
|
+
<Button color="secondary" outline>Click me!</Button>
|
|
59
|
+
</Story>
|
|
55
60
|
<Story name="Safe Outline" args={{ outline: true, color: 'safe' }}>
|
|
56
61
|
<Button color="safe" outline>Click me!</Button>
|
|
57
62
|
</Story>
|
|
@@ -61,6 +66,3 @@
|
|
|
61
66
|
<Story name="Danger Outline" args={{ outline: true, color: 'danger' }}>
|
|
62
67
|
<Button color="danger" outline>Click me!</Button>
|
|
63
68
|
</Story>
|
|
64
|
-
<Story name="Info Outline" args={{ outline: true, color: 'info' }}>
|
|
65
|
-
<Button color="info" outline>Click me!</Button>
|
|
66
|
-
</Story>
|
|
@@ -19,6 +19,10 @@
|
|
|
19
19
|
<Message color="primary">Lorem ipsum dolor sit amet, consectetur adipiscing elit</Message>
|
|
20
20
|
</Story>
|
|
21
21
|
|
|
22
|
+
<Story name="Secondary" args={{ color: 'secondary' }}>
|
|
23
|
+
<Message color="secondary">Lorem ipsum dolor sit amet, consectetur adipiscing elit</Message>
|
|
24
|
+
</Story>
|
|
25
|
+
|
|
22
26
|
<Story name="Safe" args={{ color: 'safe' }}>
|
|
23
27
|
<Message color="safe">Lorem ipsum dolor sit amet, consectetur adipiscing elit</Message>
|
|
24
28
|
</Story>
|
|
@@ -30,7 +34,3 @@
|
|
|
30
34
|
<Story name="Danger" args={{ color: 'danger' }}>
|
|
31
35
|
<Message color="danger">Lorem ipsum dolor sit amet, consectetur adipiscing elit</Message>
|
|
32
36
|
</Story>
|
|
33
|
-
|
|
34
|
-
<Story name="Info" args={{ color: 'info' }}>
|
|
35
|
-
<Message color="info">Lorem ipsum dolor sit amet, consectetur adipiscing elit</Message>
|
|
36
|
-
</Story>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
export const storyMessageArgTypes: StoryBookArgTypes = {
|
|
7
7
|
color: {
|
|
8
8
|
control: { type: 'select' },
|
|
9
|
-
options: ['default', 'primary', '
|
|
9
|
+
options: ['default', 'primary', 'secondary', 'safe', 'warning', 'danger'],
|
|
10
10
|
},
|
|
11
11
|
size: {
|
|
12
12
|
control: { type: 'select' },
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts" module>
|
|
2
|
-
export type MessageColor = 'default' | 'primary' | '
|
|
2
|
+
export type MessageColor = 'default' | 'primary' | 'secondary' | 'safe' | 'warning' | 'danger';
|
|
3
3
|
</script>
|
|
4
4
|
|
|
5
5
|
<script lang="ts">
|
|
@@ -72,6 +72,10 @@
|
|
|
72
72
|
color: var(--dodo-color-primary-600);
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
+
&--secondary {
|
|
76
|
+
color: var(--dodo-color-secondary-600);
|
|
77
|
+
}
|
|
78
|
+
|
|
75
79
|
&--safe {
|
|
76
80
|
color: var(--dodo-color-safe-600);
|
|
77
81
|
}
|
|
@@ -83,10 +87,6 @@
|
|
|
83
87
|
&--danger {
|
|
84
88
|
color: var(--dodo-color-danger-600);
|
|
85
89
|
}
|
|
86
|
-
|
|
87
|
-
&--info {
|
|
88
|
-
color: var(--dodo-color-info-600);
|
|
89
|
-
}
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
</style>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<script module lang="ts">
|
|
2
|
+
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
|
+
import Paper from './Paper.svelte';
|
|
4
|
+
import type { StoryBookArgTypes } from '$lib/storybook-types.js';
|
|
5
|
+
|
|
6
|
+
export const storyPaperArgTypes: StoryBookArgTypes = {
|
|
7
|
+
roundness: {
|
|
8
|
+
control: { type: 'select' },
|
|
9
|
+
options: [false, '1x', '2x', '3x', 'full'],
|
|
10
|
+
},
|
|
11
|
+
shadow: {
|
|
12
|
+
control: { type: 'select' },
|
|
13
|
+
options: [false, '1x', '2x', '3x', '4x', '5x', '6x', '7x'],
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
// More on how to set up stories at: https://storybook.js.org/docs/writing-stories
|
|
18
|
+
const { Story } = defineMeta({
|
|
19
|
+
component: Paper,
|
|
20
|
+
tags: ['autodocs'],
|
|
21
|
+
argTypes: storyPaperArgTypes,
|
|
22
|
+
});
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<!-- ⚠️ Test Paper: Do not use! -->
|
|
26
|
+
<Story
|
|
27
|
+
name="Test Paper"
|
|
28
|
+
args={{
|
|
29
|
+
_unsafeChildrenStringForTesting: 'Hola!',
|
|
30
|
+
}}
|
|
31
|
+
/>
|
|
32
|
+
|
|
33
|
+
<!-- Paper with default style -->
|
|
34
|
+
<Story name="Default">
|
|
35
|
+
<Paper>Hola!</Paper>
|
|
36
|
+
</Story>
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
<script lang="ts" module>
|
|
2
|
+
export type PaperRoundness = ComponentRoundness | false | ComponentRoundnessFull;
|
|
3
|
+
export type PaperShadow = false | '1x' | '2x' | '3x' | '4x' | '5x' | '6x' | '7x';
|
|
4
|
+
</script>
|
|
5
|
+
|
|
6
|
+
<script lang="ts">
|
|
7
|
+
import type { ComponentRoundness, ComponentRoundnessFull } from '$lib/types.js';
|
|
8
|
+
import type { Snippet } from 'svelte';
|
|
9
|
+
|
|
10
|
+
interface PaperProps {
|
|
11
|
+
/** Paper contents goes here */
|
|
12
|
+
children?: Snippet;
|
|
13
|
+
/** Paper ref */
|
|
14
|
+
ref?: HTMLDivElement;
|
|
15
|
+
/** How round should the border radius be? */
|
|
16
|
+
roundness?: PaperRoundness;
|
|
17
|
+
/** Shadow elevation */
|
|
18
|
+
shadow?: PaperShadow;
|
|
19
|
+
/** Custom css class*/
|
|
20
|
+
class?: string;
|
|
21
|
+
/** Id */
|
|
22
|
+
id?: string;
|
|
23
|
+
/** Test: ⚠️ Unsafe Children String. Do Not use*/
|
|
24
|
+
_unsafeChildrenStringForTesting?: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
let {
|
|
28
|
+
children,
|
|
29
|
+
roundness = '1x',
|
|
30
|
+
shadow = '1x',
|
|
31
|
+
id,
|
|
32
|
+
class: className = '',
|
|
33
|
+
_unsafeChildrenStringForTesting,
|
|
34
|
+
ref = $bindable<HTMLDivElement>(),
|
|
35
|
+
}: PaperProps = $props();
|
|
36
|
+
</script>
|
|
37
|
+
|
|
38
|
+
<div
|
|
39
|
+
class={[
|
|
40
|
+
'dodo-ui-Paper',
|
|
41
|
+
`roundness--${roundness}`,
|
|
42
|
+
`${shadow ? `shadow--${shadow} dodo-shadow-${shadow}` : `shadow--${shadow}`}`,
|
|
43
|
+
className,
|
|
44
|
+
].join(' ')}
|
|
45
|
+
{id}
|
|
46
|
+
bind:this={ref}
|
|
47
|
+
>
|
|
48
|
+
{#if children}
|
|
49
|
+
{@render children()}
|
|
50
|
+
{:else if _unsafeChildrenStringForTesting}
|
|
51
|
+
{_unsafeChildrenStringForTesting}
|
|
52
|
+
{/if}
|
|
53
|
+
</div>
|
|
54
|
+
|
|
55
|
+
<style lang="scss">
|
|
56
|
+
:global(:root) {
|
|
57
|
+
--dodo-ui-Paper-bg: var(--dodo-color-white);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
:global(.dodo-theme--dark) {
|
|
61
|
+
--dodo-ui-Paper-bg: var(--dodo-color-default-100);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.dodo-ui-Paper {
|
|
65
|
+
outline: none;
|
|
66
|
+
transition: all 150ms;
|
|
67
|
+
font-family: inherit;
|
|
68
|
+
color: inherit;
|
|
69
|
+
|
|
70
|
+
background-color: var(--dodo-ui-Paper-bg);
|
|
71
|
+
overflow: hidden;
|
|
72
|
+
|
|
73
|
+
&.roundness {
|
|
74
|
+
&--1x {
|
|
75
|
+
border-radius: var(--dodo-ui-element-roundness-1x);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&--2x {
|
|
79
|
+
border-radius: var(--dodo-ui-element-roundness-2x);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
&--3x {
|
|
83
|
+
border-radius: var(--dodo-ui-element-roundness-3x);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&--full {
|
|
87
|
+
border-radius: 50%;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
</style>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script module>
|
|
2
|
+
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
|
+
import Paper from '../Paper.svelte';
|
|
4
|
+
import { storyPaperArgTypes } from '../Paper.stories.svelte';
|
|
5
|
+
|
|
6
|
+
// More on how to set up stories at: https://storybook.js.org/docs/writing-stories
|
|
7
|
+
const { Story } = defineMeta({
|
|
8
|
+
component: Paper,
|
|
9
|
+
tags: ['autodocs'],
|
|
10
|
+
argTypes: storyPaperArgTypes,
|
|
11
|
+
});
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<Story name="Roundness 1x">
|
|
15
|
+
<Paper>Hola!</Paper>
|
|
16
|
+
</Story>
|
|
17
|
+
|
|
18
|
+
<Story name="Roundness 2x" args={{ roundness: '2x' }}><Paper roundness="2x">Hola!</Paper></Story>
|
|
19
|
+
|
|
20
|
+
<Story name="Roundness 3x" args={{ roundness: '3x' }}>
|
|
21
|
+
<Paper roundness="3x">Hola!</Paper>
|
|
22
|
+
</Story>
|
|
23
|
+
|
|
24
|
+
<Story name="Roundness False" args={{ roundness: false }}>
|
|
25
|
+
<Paper roundness={false}>Hola!</Paper>
|
|
26
|
+
</Story>
|
|
27
|
+
|
|
28
|
+
<Story name="Roundness Full" args={{ roundness: 'full' }}>
|
|
29
|
+
<Paper roundness="full">Hola!</Paper>
|
|
30
|
+
</Story>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<script module>
|
|
2
|
+
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
|
+
import Paper from '../Paper.svelte';
|
|
4
|
+
import { storyPaperArgTypes } from '../Paper.stories.svelte';
|
|
5
|
+
|
|
6
|
+
// More on how to set up stories at: https://storybook.js.org/docs/writing-stories
|
|
7
|
+
const { Story } = defineMeta({
|
|
8
|
+
component: Paper,
|
|
9
|
+
tags: ['autodocs'],
|
|
10
|
+
argTypes: storyPaperArgTypes,
|
|
11
|
+
});
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<Story name="Shadow 1x">
|
|
15
|
+
<Paper>Hola!</Paper>
|
|
16
|
+
</Story>
|
|
17
|
+
|
|
18
|
+
<Story name="Shadow 2x" args={{ shadow: '2x' }}><Paper shadow="2x">Hola!</Paper></Story>
|
|
19
|
+
|
|
20
|
+
<Story name="Shadow 3x" args={{ shadow: '3x' }}>
|
|
21
|
+
<Paper shadow="3x">Hola!</Paper>
|
|
22
|
+
</Story>
|
|
23
|
+
|
|
24
|
+
<Story name="Shadow 4x" args={{ shadow: '4x' }}>
|
|
25
|
+
<Paper shadow="4x">Hola!</Paper>
|
|
26
|
+
</Story>
|
|
27
|
+
|
|
28
|
+
<Story name="Shadow 5x" args={{ shadow: '5x' }}>
|
|
29
|
+
<Paper shadow="5x">Hola!</Paper>
|
|
30
|
+
</Story>
|
|
31
|
+
|
|
32
|
+
<Story name="Shadow 6x" args={{ shadow: '6x' }}>
|
|
33
|
+
<Paper shadow="6x">Hola!</Paper>
|
|
34
|
+
</Story>
|
|
35
|
+
|
|
36
|
+
<Story name="Shadow 7x" args={{ shadow: '7x' }}>
|
|
37
|
+
<Paper shadow="7x">Hola!</Paper>
|
|
38
|
+
</Story>
|
|
39
|
+
|
|
40
|
+
<Story name="Shadow False" args={{ shadow: false }}>
|
|
41
|
+
<Paper shadow={false}>Hola!</Paper>
|
|
42
|
+
</Story>
|
|
@@ -33,6 +33,19 @@
|
|
|
33
33
|
--dodo-color-primary-900: var(--dodo-color-base-violet-900);
|
|
34
34
|
--dodo-color-primary-950: var(--dodo-color-base-violet-950);
|
|
35
35
|
|
|
36
|
+
/* Secondary color */
|
|
37
|
+
--dodo-color-secondary-50: var(--dodo-color-base-cyan-50);
|
|
38
|
+
--dodo-color-secondary-100: var(--dodo-color-base-cyan-100);
|
|
39
|
+
--dodo-color-secondary-200: var(--dodo-color-base-cyan-200);
|
|
40
|
+
--dodo-color-secondary-300: var(--dodo-color-base-cyan-300);
|
|
41
|
+
--dodo-color-secondary-400: var(--dodo-color-base-cyan-400);
|
|
42
|
+
--dodo-color-secondary-500: var(--dodo-color-base-cyan-500);
|
|
43
|
+
--dodo-color-secondary-600: var(--dodo-color-base-cyan-600);
|
|
44
|
+
--dodo-color-secondary-700: var(--dodo-color-base-cyan-700);
|
|
45
|
+
--dodo-color-secondary-800: var(--dodo-color-base-cyan-800);
|
|
46
|
+
--dodo-color-secondary-900: var(--dodo-color-base-cyan-900);
|
|
47
|
+
--dodo-color-secondary-950: var(--dodo-color-base-cyan-950);
|
|
48
|
+
|
|
36
49
|
/* Safe color */
|
|
37
50
|
--dodo-color-safe-50: var(--dodo-color-base-emerald-50);
|
|
38
51
|
--dodo-color-safe-100: var(--dodo-color-base-emerald-100);
|
|
@@ -71,19 +84,6 @@
|
|
|
71
84
|
--dodo-color-danger-800: var(--dodo-color-base-red-800);
|
|
72
85
|
--dodo-color-danger-900: var(--dodo-color-base-red-900);
|
|
73
86
|
--dodo-color-danger-950: var(--dodo-color-base-red-950);
|
|
74
|
-
|
|
75
|
-
/* Info color */
|
|
76
|
-
--dodo-color-info-50: var(--dodo-color-base-cyan-50);
|
|
77
|
-
--dodo-color-info-100: var(--dodo-color-base-cyan-100);
|
|
78
|
-
--dodo-color-info-200: var(--dodo-color-base-cyan-200);
|
|
79
|
-
--dodo-color-info-300: var(--dodo-color-base-cyan-300);
|
|
80
|
-
--dodo-color-info-400: var(--dodo-color-base-cyan-400);
|
|
81
|
-
--dodo-color-info-500: var(--dodo-color-base-cyan-500);
|
|
82
|
-
--dodo-color-info-600: var(--dodo-color-base-cyan-600);
|
|
83
|
-
--dodo-color-info-700: var(--dodo-color-base-cyan-700);
|
|
84
|
-
--dodo-color-info-800: var(--dodo-color-base-cyan-800);
|
|
85
|
-
--dodo-color-info-900: var(--dodo-color-base-cyan-900);
|
|
86
|
-
--dodo-color-info-950: var(--dodo-color-base-cyan-950);
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
.dodo-theme--dark {
|
|
@@ -117,6 +117,19 @@
|
|
|
117
117
|
--dodo-color-primary-900: var(--dodo-color-base-violet-100);
|
|
118
118
|
--dodo-color-primary-950: var(--dodo-color-base-violet-50);
|
|
119
119
|
|
|
120
|
+
/* Dark: Secondary color */
|
|
121
|
+
--dodo-color-secondary-50: var(--dodo-color-base-cyan-950);
|
|
122
|
+
--dodo-color-secondary-100: var(--dodo-color-base-cyan-900);
|
|
123
|
+
--dodo-color-secondary-200: var(--dodo-color-base-cyan-800);
|
|
124
|
+
--dodo-color-secondary-300: var(--dodo-color-base-cyan-700);
|
|
125
|
+
--dodo-color-secondary-400: var(--dodo-color-base-cyan-600);
|
|
126
|
+
--dodo-color-secondary-500: var(--dodo-color-base-cyan-500);
|
|
127
|
+
--dodo-color-secondary-600: var(--dodo-color-base-cyan-400);
|
|
128
|
+
--dodo-color-secondary-700: var(--dodo-color-base-cyan-300);
|
|
129
|
+
--dodo-color-secondary-800: var(--dodo-color-base-cyan-200);
|
|
130
|
+
--dodo-color-secondary-900: var(--dodo-color-base-cyan-100);
|
|
131
|
+
--dodo-color-secondary-950: var(--dodo-color-base-cyan-50);
|
|
132
|
+
|
|
120
133
|
/* Dark: Safe color */
|
|
121
134
|
--dodo-color-safe-50: var(--dodo-color-base-emerald-950);
|
|
122
135
|
--dodo-color-safe-100: var(--dodo-color-base-emerald-900);
|
|
@@ -155,17 +168,4 @@
|
|
|
155
168
|
--dodo-color-danger-800: var(--dodo-color-base-red-200);
|
|
156
169
|
--dodo-color-danger-900: var(--dodo-color-base-red-100);
|
|
157
170
|
--dodo-color-danger-950: var(--dodo-color-base-red-50);
|
|
158
|
-
|
|
159
|
-
/* Dark: Info color */
|
|
160
|
-
--dodo-color-info-50: var(--dodo-color-base-cyan-950);
|
|
161
|
-
--dodo-color-info-100: var(--dodo-color-base-cyan-900);
|
|
162
|
-
--dodo-color-info-200: var(--dodo-color-base-cyan-800);
|
|
163
|
-
--dodo-color-info-300: var(--dodo-color-base-cyan-700);
|
|
164
|
-
--dodo-color-info-400: var(--dodo-color-base-cyan-600);
|
|
165
|
-
--dodo-color-info-500: var(--dodo-color-base-cyan-500);
|
|
166
|
-
--dodo-color-info-600: var(--dodo-color-base-cyan-400);
|
|
167
|
-
--dodo-color-info-700: var(--dodo-color-base-cyan-300);
|
|
168
|
-
--dodo-color-info-800: var(--dodo-color-base-cyan-200);
|
|
169
|
-
--dodo-color-info-900: var(--dodo-color-base-cyan-100);
|
|
170
|
-
--dodo-color-info-950: var(--dodo-color-base-cyan-50);
|
|
171
171
|
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--dodo-shadow-color: #0000000d;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.dodo-shadow-1x {
|
|
6
|
+
--dodo-shadow: 0 1px var(--dodo-shadow-color);
|
|
7
|
+
box-shadow: var(--dodo-shadow);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.dodo-shadow-2x {
|
|
11
|
+
--dodo-shadow: 0 1px 2px 0 var(--dodo-shadow-color);
|
|
12
|
+
box-shadow: var(--dodo-shadow);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.dodo-shadow-3x {
|
|
16
|
+
--dodo-shadow: 0 1px 3px 0 var(--dodo-shadow-color);
|
|
17
|
+
box-shadow: var(--dodo-shadow);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.dodo-shadow-4x {
|
|
21
|
+
--dodo-shadow: 0 4px 6px -1px var(--dodo-shadow-color), 0 2px 4px -2px var(--dodo-shadow-color);
|
|
22
|
+
box-shadow: var(--dodo-shadow);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.dodo-shadow-5x {
|
|
26
|
+
--dodo-shadow: 0 10px 15px -3px var(--dodo-shadow-color), 0 4px 6px -4px var(--dodo-shadow-color);
|
|
27
|
+
box-shadow: var(--dodo-shadow);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.dodo-shadow-6x {
|
|
31
|
+
--dodo-shadow:
|
|
32
|
+
0 20px 25px -5px var(--dodo-shadow-color), 0 8px 10px -6px var(--dodo-shadow-color);
|
|
33
|
+
box-shadow: var(--dodo-shadow);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.dodo-shadow-7x {
|
|
37
|
+
--dodo-shadow: 0 25px 50px -12px var(--dodo-shadow-color);
|
|
38
|
+
box-shadow: var(--dodo-shadow);
|
|
39
|
+
}
|