spaper 1.0.0 → 1.1.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 +4 -3
- package/components/Form/Form.svelte.d.ts +7 -0
- package/components/Hero.svelte +78 -0
- package/components/Hero.svelte.d.ts +26 -0
- package/components/Tabs/Tab.svelte +3 -4
- package/components/Tabs/Tabs.svelte +3 -2
- package/components/Tabs/utils.d.ts +1 -1
- package/components/Tabs/utils.js +2 -2
- package/index.d.ts +2 -1
- package/index.js +2 -1
- package/package.json +2 -1
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:
|
|
@@ -82,7 +82,7 @@ Any donation is greatly appreciated :heart:
|
|
|
82
82
|
| Github Sponsor | https://github.com/sponsors/Oli8 |
|
|
83
83
|
| PayPal | https://paypal.me/OliCrt |
|
|
84
84
|
| Bitcoin | 1Ez3Ts2WShUcbeGCjhZapdxVDK77DbYjdU |
|
|
85
|
-
| Ethereum |
|
|
85
|
+
| Ethereum | 0xc4364cafac87fd8085dc26af4a4a8c3bbad1bd3e |
|
|
86
86
|
|
|
87
87
|
#### Components
|
|
88
88
|
|
|
@@ -103,6 +103,7 @@ Any donation is greatly appreciated :heart:
|
|
|
103
103
|
- Select
|
|
104
104
|
- Slider
|
|
105
105
|
- Switch
|
|
106
|
+
- Hero
|
|
106
107
|
- Modal
|
|
107
108
|
- Navbar
|
|
108
109
|
- Pagination
|
|
@@ -111,4 +112,4 @@ Any donation is greatly appreciated :heart:
|
|
|
111
112
|
- Skeleton
|
|
112
113
|
- Table
|
|
113
114
|
- Tabs
|
|
114
|
-
- Toast
|
|
115
|
+
- Toast
|
|
@@ -4,6 +4,13 @@ declare const __propDef: {
|
|
|
4
4
|
[x: string]: any;
|
|
5
5
|
};
|
|
6
6
|
events: {
|
|
7
|
+
submit: Event;
|
|
8
|
+
click: MouseEvent;
|
|
9
|
+
keydown: KeyboardEvent;
|
|
10
|
+
mouseover: MouseEvent;
|
|
11
|
+
mouseenter: MouseEvent;
|
|
12
|
+
mouseleave: MouseEvent;
|
|
13
|
+
} & {
|
|
7
14
|
[evt: string]: CustomEvent<any>;
|
|
8
15
|
};
|
|
9
16
|
slots: {
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
<section {...$$restProps}
|
|
2
|
+
class={classes}
|
|
3
|
+
class:border>
|
|
4
|
+
<div class="hero-body">
|
|
5
|
+
{#if $$slots.title}
|
|
6
|
+
<slot name="title" />
|
|
7
|
+
{:else}
|
|
8
|
+
<h2 class="hero-title">{title}</h2>
|
|
9
|
+
{/if}
|
|
10
|
+
|
|
11
|
+
{#if $$slots.textLead || textLead}
|
|
12
|
+
<p class="hero-text-lead">
|
|
13
|
+
{#if $$slots.textLead}
|
|
14
|
+
<slot name="textLead" />
|
|
15
|
+
{:else}
|
|
16
|
+
{textLead}
|
|
17
|
+
{/if}
|
|
18
|
+
</p>
|
|
19
|
+
{/if}
|
|
20
|
+
|
|
21
|
+
<div><slot /></div>
|
|
22
|
+
</div>
|
|
23
|
+
</section>
|
|
24
|
+
|
|
25
|
+
<script >var _a;
|
|
26
|
+
;
|
|
27
|
+
import { computeClasses } from '../utils';
|
|
28
|
+
export let type = 'primary';
|
|
29
|
+
export let size = 'default';
|
|
30
|
+
export let border = true;
|
|
31
|
+
export let title = '';
|
|
32
|
+
export let textLead = '';
|
|
33
|
+
$: classes = `hero
|
|
34
|
+
${(_a = $$restProps.class) !== null && _a !== void 0 ? _a : ''}
|
|
35
|
+
${computeClasses('hero', { size, type })}`;
|
|
36
|
+
</script>
|
|
37
|
+
|
|
38
|
+
<style >.hero {
|
|
39
|
+
display: flex;
|
|
40
|
+
flex-direction: column;
|
|
41
|
+
justify-content: center;
|
|
42
|
+
padding: 1.5rem 3rem;
|
|
43
|
+
margin-bottom: 20px;
|
|
44
|
+
}
|
|
45
|
+
.hero-title {
|
|
46
|
+
margin-block: 1rem 0.5rem;
|
|
47
|
+
}
|
|
48
|
+
.hero-text-lead {
|
|
49
|
+
font-size: 1.25rem;
|
|
50
|
+
}
|
|
51
|
+
.hero-small {
|
|
52
|
+
padding: 0 1.5rem;
|
|
53
|
+
}
|
|
54
|
+
.hero-large {
|
|
55
|
+
padding: 5rem;
|
|
56
|
+
}
|
|
57
|
+
.hero-fullheight {
|
|
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);
|
|
78
|
+
}</style>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import type { PaperSize, PaperType } from '../types';
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
[x: string]: any;
|
|
6
|
+
type?: PaperType;
|
|
7
|
+
size?: PaperSize | "fullheight";
|
|
8
|
+
border?: boolean;
|
|
9
|
+
title?: string;
|
|
10
|
+
textLead?: string;
|
|
11
|
+
};
|
|
12
|
+
events: {
|
|
13
|
+
[evt: string]: CustomEvent<any>;
|
|
14
|
+
};
|
|
15
|
+
slots: {
|
|
16
|
+
title: {};
|
|
17
|
+
textLead: {};
|
|
18
|
+
default: {};
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export declare type HeroProps = typeof __propDef.props;
|
|
22
|
+
export declare type HeroEvents = typeof __propDef.events;
|
|
23
|
+
export declare type HeroSlots = typeof __propDef.slots;
|
|
24
|
+
export default class Hero extends SvelteComponentTyped<HeroProps, HeroEvents, HeroSlots> {
|
|
25
|
+
}
|
|
26
|
+
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<div {...$$restProps}
|
|
2
2
|
class="{$$restProps.class ?? ''} content margin"
|
|
3
3
|
class:content--active={active}
|
|
4
|
-
id={
|
|
4
|
+
id={getId(label, 'content')}
|
|
5
5
|
aria-hidden={!active}
|
|
6
|
-
aria-labelledby={
|
|
6
|
+
aria-labelledby={getId(label, 'label')}
|
|
7
7
|
role="tabpanel"
|
|
8
8
|
tabindex={active ? 0 : -1}>
|
|
9
9
|
{#if $$slots.header}
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
<script >import { onMount, onDestroy, getContext } from 'svelte';
|
|
19
19
|
;
|
|
20
|
-
import {
|
|
20
|
+
import { getId } from './utils';
|
|
21
21
|
export let label;
|
|
22
22
|
const key = {};
|
|
23
23
|
let active = false;
|
|
@@ -43,7 +43,6 @@ onMount(() => {
|
|
|
43
43
|
onDestroy(() => {
|
|
44
44
|
tabsData.tabs.update(tabs => (tabs.filter(t => t.key !== key)));
|
|
45
45
|
});
|
|
46
|
-
$: controlLabel = genControlLabel(label);
|
|
47
46
|
</script>
|
|
48
47
|
|
|
49
48
|
<style>
|
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
{@const selected = index == activeTab}
|
|
6
6
|
<div class="tabs-label-header"
|
|
7
7
|
class:tabs-label-header--active={selected}
|
|
8
|
+
id={getId(label, 'label')}
|
|
8
9
|
aria-selected={selected}
|
|
9
|
-
aria-controls={
|
|
10
|
+
aria-controls={getId(label, 'content')}
|
|
10
11
|
role="tab"
|
|
11
12
|
tabindex={selected ? 0 : -1}
|
|
12
13
|
on:click={showContent.bind(null, index)}>
|
|
@@ -25,7 +26,7 @@
|
|
|
25
26
|
import { writable } from 'svelte/store';
|
|
26
27
|
;
|
|
27
28
|
;
|
|
28
|
-
import {
|
|
29
|
+
import { getId } from './utils';
|
|
29
30
|
export let activeTab = 0;
|
|
30
31
|
export let placement = 'spaces';
|
|
31
32
|
export let contentAlign = 'left';
|
package/components/Tabs/utils.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export function
|
|
2
|
-
return `paper-tab-${label}`;
|
|
1
|
+
export function getId(label, part) {
|
|
2
|
+
return `paper-tab-${label}-${part}`;
|
|
3
3
|
}
|
package/index.d.ts
CHANGED
|
@@ -18,4 +18,5 @@ import CloseButton from './components/CloseButton.svelte';
|
|
|
18
18
|
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
|
+
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, };
|
package/index.js
CHANGED
|
@@ -18,4 +18,5 @@ import CloseButton from './components/CloseButton.svelte';
|
|
|
18
18
|
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
|
+
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, };
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"papercss",
|
|
9
9
|
"components"
|
|
10
10
|
],
|
|
11
|
-
"version": "1.
|
|
11
|
+
"version": "1.1.1",
|
|
12
12
|
"repository": {
|
|
13
13
|
"type": "git",
|
|
14
14
|
"url": "git+https://github.com/Oli8/spaper.git"
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
"./components/Form/Switch.svelte": "./components/Form/Switch.svelte",
|
|
46
46
|
"./components/Form": "./components/Form/index.js",
|
|
47
47
|
"./components/Form/style.scss": "./components/Form/style.scss",
|
|
48
|
+
"./components/Hero.svelte": "./components/Hero.svelte",
|
|
48
49
|
"./components/Modal/Modal.svelte": "./components/Modal/Modal.svelte",
|
|
49
50
|
"./components/Modal": "./components/Modal/index.js",
|
|
50
51
|
"./components/Navbar.svelte": "./components/Navbar.svelte",
|