spaper 1.1.0 → 1.2.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/README.md +3 -1
- package/components/Hero.svelte +22 -3
- package/components/Layout/Col.svelte +21 -0
- package/components/Layout/Col.svelte.d.ts +26 -0
- package/components/Layout/Row.svelte +20 -0
- package/components/Layout/Row.svelte.d.ts +25 -0
- package/components/Layout/index.d.ts +2 -0
- package/components/Layout/index.js +2 -0
- package/index.d.ts +2 -1
- package/index.js +2 -1
- package/package.json +4 -1
- package/utils.js +4 -0
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ Browse [documentation and demo here](https://oli8.github.io/spaper/).
|
|
|
14
14
|
Add a link to the CDN into your HTML file:
|
|
15
15
|
|
|
16
16
|
```html
|
|
17
|
-
<link rel="stylesheet" href="https://unpkg.com/papercss
|
|
17
|
+
<link rel="stylesheet" href="https://unpkg.com/papercss/dist/paper.min.css">
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
Or use NPM:
|
|
@@ -94,6 +94,7 @@ Any donation is greatly appreciated :heart:
|
|
|
94
94
|
- Card
|
|
95
95
|
- Carousel
|
|
96
96
|
- CloseButton
|
|
97
|
+
- Col
|
|
97
98
|
- Collapsible
|
|
98
99
|
- CopyButton
|
|
99
100
|
- Form
|
|
@@ -109,6 +110,7 @@ Any donation is greatly appreciated :heart:
|
|
|
109
110
|
- Pagination
|
|
110
111
|
- Popover
|
|
111
112
|
- Progress
|
|
113
|
+
- Row
|
|
112
114
|
- Skeleton
|
|
113
115
|
- Table
|
|
114
116
|
- Tabs
|
package/components/Hero.svelte
CHANGED
|
@@ -30,9 +30,9 @@ export let size = 'default';
|
|
|
30
30
|
export let border = true;
|
|
31
31
|
export let title = '';
|
|
32
32
|
export let textLead = '';
|
|
33
|
-
$: classes = `hero
|
|
33
|
+
$: classes = `hero
|
|
34
34
|
${(_a = $$restProps.class) !== null && _a !== void 0 ? _a : ''}
|
|
35
|
-
${computeClasses('hero', { size })}`;
|
|
35
|
+
${computeClasses('hero', { size, type })}`;
|
|
36
36
|
</script>
|
|
37
37
|
|
|
38
38
|
<style >.hero {
|
|
@@ -52,8 +52,27 @@ $: classes = `hero background-${type}
|
|
|
52
52
|
padding: 0 1.5rem;
|
|
53
53
|
}
|
|
54
54
|
.hero-large {
|
|
55
|
-
padding: 5rem
|
|
55
|
+
padding: 5rem;
|
|
56
56
|
}
|
|
57
57
|
.hero-fullheight {
|
|
58
58
|
min-height: 100vh;
|
|
59
|
+
}
|
|
60
|
+
.hero-primary {
|
|
61
|
+
background-color: var(--primary-light);
|
|
62
|
+
}
|
|
63
|
+
.hero-secondary {
|
|
64
|
+
background-color: var(--secondary-light);
|
|
65
|
+
}
|
|
66
|
+
.hero-success {
|
|
67
|
+
background-color: var(--success-light);
|
|
68
|
+
}
|
|
69
|
+
.hero-warning {
|
|
70
|
+
background-color: var(--warning-light);
|
|
71
|
+
}
|
|
72
|
+
.hero-danger {
|
|
73
|
+
background-color: var(--danger-light);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
:global(.dark .hero-primary) {
|
|
77
|
+
color: var(--primary-text);
|
|
59
78
|
}</style>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<div {...$$restProps}
|
|
2
|
+
class={classes}
|
|
3
|
+
class:col-fill={fill}
|
|
4
|
+
class:align-top={top}
|
|
5
|
+
class:align-middle={middle}
|
|
6
|
+
class:align-bottom={bottom}>
|
|
7
|
+
<slot />
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<script >var _a;
|
|
11
|
+
import { computeClasses } from '../../utils';
|
|
12
|
+
export let col = null;
|
|
13
|
+
export let sm = null;
|
|
14
|
+
export let md = null;
|
|
15
|
+
export let lg = null;
|
|
16
|
+
export let fill = false;
|
|
17
|
+
export let top = false;
|
|
18
|
+
export let middle = false;
|
|
19
|
+
export let bottom = false;
|
|
20
|
+
$: classes = `col ${(_a = $$restProps.class) !== null && _a !== void 0 ? _a : ''} ${computeClasses('col', { col, sm, md, lg })}`;
|
|
21
|
+
</script>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
[x: string]: any;
|
|
5
|
+
col?: string | number;
|
|
6
|
+
sm?: string | number;
|
|
7
|
+
md?: string | number;
|
|
8
|
+
lg?: string | number;
|
|
9
|
+
fill?: boolean;
|
|
10
|
+
top?: boolean;
|
|
11
|
+
middle?: boolean;
|
|
12
|
+
bottom?: boolean;
|
|
13
|
+
};
|
|
14
|
+
events: {
|
|
15
|
+
[evt: string]: CustomEvent<any>;
|
|
16
|
+
};
|
|
17
|
+
slots: {
|
|
18
|
+
default: {};
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export declare type ColProps = typeof __propDef.props;
|
|
22
|
+
export declare type ColEvents = typeof __propDef.events;
|
|
23
|
+
export declare type ColSlots = typeof __propDef.slots;
|
|
24
|
+
export default class Col extends SvelteComponentTyped<ColProps, ColEvents, ColSlots> {
|
|
25
|
+
}
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<div {...$$restProps}
|
|
2
|
+
class="{$$restProps.class ?? ''} row"
|
|
3
|
+
class:flex-right={right}
|
|
4
|
+
class:flex-center={center}
|
|
5
|
+
class:flex-edges={edges}
|
|
6
|
+
class:flex-spaces={spaces}
|
|
7
|
+
class:flex-top={top}
|
|
8
|
+
class:flex-middle={middle}
|
|
9
|
+
class:flex-bottom={bottom}>
|
|
10
|
+
<slot />
|
|
11
|
+
</div>
|
|
12
|
+
|
|
13
|
+
<script >export let right = false;
|
|
14
|
+
export let center = false;
|
|
15
|
+
export let edges = false;
|
|
16
|
+
export let spaces = false;
|
|
17
|
+
export let top = false;
|
|
18
|
+
export let middle = false;
|
|
19
|
+
export let bottom = false;
|
|
20
|
+
</script>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
[x: string]: any;
|
|
5
|
+
right?: boolean;
|
|
6
|
+
center?: boolean;
|
|
7
|
+
edges?: boolean;
|
|
8
|
+
spaces?: boolean;
|
|
9
|
+
top?: boolean;
|
|
10
|
+
middle?: boolean;
|
|
11
|
+
bottom?: boolean;
|
|
12
|
+
};
|
|
13
|
+
events: {
|
|
14
|
+
[evt: string]: CustomEvent<any>;
|
|
15
|
+
};
|
|
16
|
+
slots: {
|
|
17
|
+
default: {};
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export declare type RowProps = typeof __propDef.props;
|
|
21
|
+
export declare type RowEvents = typeof __propDef.events;
|
|
22
|
+
export declare type RowSlots = typeof __propDef.slots;
|
|
23
|
+
export default class Row extends SvelteComponentTyped<RowProps, RowEvents, RowSlots> {
|
|
24
|
+
}
|
|
25
|
+
export {};
|
package/index.d.ts
CHANGED
|
@@ -19,4 +19,5 @@ import CopyButton from './components/CopyButton.svelte';
|
|
|
19
19
|
import Skeleton from './components/Skeleton.svelte';
|
|
20
20
|
import { Carousel, CarouselItem } from './components/Carousel';
|
|
21
21
|
import Hero from './components/Hero.svelte';
|
|
22
|
-
|
|
22
|
+
import { Col, Row } from './components/Layout';
|
|
23
|
+
export { Button, Alert, Badge, Breadcrumb, Navbar, Modal, Tabs, Tab, Form, Input, Select, Radio, Checkbox, Switch, Slider, Article, Card, Collapsible, Popover, Progress, Table, Pagination, Toast, CloseButton, CopyButton, Skeleton, Carousel, CarouselItem, Hero, Col, Row, };
|
package/index.js
CHANGED
|
@@ -19,4 +19,5 @@ import CopyButton from './components/CopyButton.svelte';
|
|
|
19
19
|
import Skeleton from './components/Skeleton.svelte';
|
|
20
20
|
import { Carousel, CarouselItem } from './components/Carousel';
|
|
21
21
|
import Hero from './components/Hero.svelte';
|
|
22
|
-
|
|
22
|
+
import { Col, Row } from './components/Layout';
|
|
23
|
+
export { Button, Alert, Badge, Breadcrumb, Navbar, Modal, Tabs, Tab, Form, Input, Select, Radio, Checkbox, Switch, Slider, Article, Card, Collapsible, Popover, Progress, Table, Pagination, Toast, CloseButton, CopyButton, Skeleton, Carousel, CarouselItem, Hero, Col, Row, };
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"papercss",
|
|
9
9
|
"components"
|
|
10
10
|
],
|
|
11
|
-
"version": "1.
|
|
11
|
+
"version": "1.2.0",
|
|
12
12
|
"repository": {
|
|
13
13
|
"type": "git",
|
|
14
14
|
"url": "git+https://github.com/Oli8/spaper.git"
|
|
@@ -46,6 +46,9 @@
|
|
|
46
46
|
"./components/Form": "./components/Form/index.js",
|
|
47
47
|
"./components/Form/style.scss": "./components/Form/style.scss",
|
|
48
48
|
"./components/Hero.svelte": "./components/Hero.svelte",
|
|
49
|
+
"./components/Layout/Col.svelte": "./components/Layout/Col.svelte",
|
|
50
|
+
"./components/Layout/Row.svelte": "./components/Layout/Row.svelte",
|
|
51
|
+
"./components/Layout": "./components/Layout/index.js",
|
|
49
52
|
"./components/Modal/Modal.svelte": "./components/Modal/Modal.svelte",
|
|
50
53
|
"./components/Modal": "./components/Modal/index.js",
|
|
51
54
|
"./components/Navbar.svelte": "./components/Navbar.svelte",
|
package/utils.js
CHANGED
|
@@ -4,6 +4,10 @@ const propToClass = {
|
|
|
4
4
|
block: (pf, _val) => `${pf}-block`,
|
|
5
5
|
type: (pf, val) => `${pf}-${val}`,
|
|
6
6
|
outline: (pf, val) => `${pf}-${val}-outline`,
|
|
7
|
+
col: (pf, val) => `${pf}-${val}`,
|
|
8
|
+
sm: (_pf, val) => `sm-${val}`,
|
|
9
|
+
md: (_pf, val) => `md-${val}`,
|
|
10
|
+
lg: (_pf, val) => `lg-${val}`,
|
|
7
11
|
};
|
|
8
12
|
function omit(obj, properties) {
|
|
9
13
|
return Object.fromEntries(Object.entries(obj)
|