spaper 1.2.0 → 1.4.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 +1 -0
- package/components/Form/Form.svelte +13 -1
- package/components/Form/Form.svelte.d.ts +1 -0
- package/components/Form/NumberInput/DecrementButton.svelte +9 -0
- package/components/Form/NumberInput/DecrementButton.svelte.d.ts +19 -0
- package/components/Form/NumberInput/IncrementButton.svelte +9 -0
- package/components/Form/NumberInput/IncrementButton.svelte.d.ts +19 -0
- package/components/Form/NumberInput/NumberInput.svelte +129 -0
- package/components/Form/NumberInput/NumberInput.svelte.d.ts +36 -0
- package/components/Form/NumberInput/index.d.ts +3 -0
- package/components/Form/NumberInput/index.js +3 -0
- package/components/Form/index.d.ts +2 -1
- package/components/Form/index.js +2 -1
- package/components/Layout/Col.svelte +11 -7
- package/components/Layout/Col.svelte.d.ts +1 -0
- package/components/Layout/Row.svelte +15 -11
- package/components/Layout/Row.svelte.d.ts +1 -0
- package/components/Popover.svelte +10 -5
- package/components/Skeleton.svelte +1 -1
- package/components/Tabs/Tabs.svelte +2 -1
- package/components/Tabs/Tabs.svelte.d.ts +1 -0
- package/index.d.ts +2 -2
- package/index.js +2 -2
- package/package.json +7 -2
- package/types.d.ts +14 -24
- package/types.js +1 -0
package/README.md
CHANGED
|
@@ -5,6 +5,18 @@
|
|
|
5
5
|
on:keydown
|
|
6
6
|
on:mouseover
|
|
7
7
|
on:mouseenter
|
|
8
|
-
on:mouseleave
|
|
8
|
+
on:mouseleave
|
|
9
|
+
on:focus>
|
|
9
10
|
<slot />
|
|
10
11
|
</form>
|
|
12
|
+
|
|
13
|
+
<style >form {
|
|
14
|
+
/* NOTE: set back PaperCSS margins for our structure
|
|
15
|
+
<label> being parent of <input> instead of a sibling */
|
|
16
|
+
}
|
|
17
|
+
form :global(label) {
|
|
18
|
+
margin-block-end: 0;
|
|
19
|
+
}
|
|
20
|
+
form :global(input) {
|
|
21
|
+
margin-block-start: 0.5rem;
|
|
22
|
+
}</style>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import type { PaperType } from '../../../types';
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
[x: string]: any;
|
|
6
|
+
clickHandler: (e: MouseEvent) => any;
|
|
7
|
+
type: PaperType;
|
|
8
|
+
};
|
|
9
|
+
events: {
|
|
10
|
+
[evt: string]: CustomEvent<any>;
|
|
11
|
+
};
|
|
12
|
+
slots: {};
|
|
13
|
+
};
|
|
14
|
+
export declare type DecrementButtonProps = typeof __propDef.props;
|
|
15
|
+
export declare type DecrementButtonEvents = typeof __propDef.events;
|
|
16
|
+
export declare type DecrementButtonSlots = typeof __propDef.slots;
|
|
17
|
+
export default class DecrementButton extends SvelteComponentTyped<DecrementButtonProps, DecrementButtonEvents, DecrementButtonSlots> {
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import type { PaperType } from '../../../types';
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
[x: string]: any;
|
|
6
|
+
clickHandler: (e: MouseEvent) => any;
|
|
7
|
+
type: PaperType;
|
|
8
|
+
};
|
|
9
|
+
events: {
|
|
10
|
+
[evt: string]: CustomEvent<any>;
|
|
11
|
+
};
|
|
12
|
+
slots: {};
|
|
13
|
+
};
|
|
14
|
+
export declare type IncrementButtonProps = typeof __propDef.props;
|
|
15
|
+
export declare type IncrementButtonEvents = typeof __propDef.events;
|
|
16
|
+
export declare type IncrementButtonSlots = typeof __propDef.slots;
|
|
17
|
+
export default class IncrementButton extends SvelteComponentTyped<IncrementButtonProps, IncrementButtonEvents, IncrementButtonSlots> {
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
{#if label}
|
|
2
|
+
<div class="number-input-wrapper">
|
|
3
|
+
{#if controls}
|
|
4
|
+
<DecrementButton
|
|
5
|
+
clickHandler={() => value -= step}
|
|
6
|
+
type={controlsType}
|
|
7
|
+
disabled={!canDecrement}
|
|
8
|
+
/>
|
|
9
|
+
{/if}
|
|
10
|
+
<label>
|
|
11
|
+
{label}
|
|
12
|
+
<input {...attr}
|
|
13
|
+
inputmode="numeric"
|
|
14
|
+
bind:value={formattedValue}
|
|
15
|
+
class:border-danger={!isValid && value}
|
|
16
|
+
class:border-success={isValid && value && valid}
|
|
17
|
+
aria-valuemin={min}
|
|
18
|
+
aria-valuemax={max}
|
|
19
|
+
aria-valuenow={value}
|
|
20
|
+
on:input={onInput}
|
|
21
|
+
on:focus
|
|
22
|
+
on:blur
|
|
23
|
+
on:change />
|
|
24
|
+
</label>
|
|
25
|
+
{#if controls}
|
|
26
|
+
<IncrementButton
|
|
27
|
+
clickHandler={() => value += step}
|
|
28
|
+
type={controlsType}
|
|
29
|
+
disabled={!canIncrement}
|
|
30
|
+
/>
|
|
31
|
+
{/if}
|
|
32
|
+
</div>
|
|
33
|
+
{:else}
|
|
34
|
+
<div class="number-input-wrapper">
|
|
35
|
+
{#if controls}
|
|
36
|
+
<DecrementButton
|
|
37
|
+
clickHandler={() => value -= step}
|
|
38
|
+
type={controlsType}
|
|
39
|
+
disabled={!canDecrement}
|
|
40
|
+
/>
|
|
41
|
+
{/if}
|
|
42
|
+
<input {...attr}
|
|
43
|
+
inputmode="numeric"
|
|
44
|
+
bind:value={formattedValue}
|
|
45
|
+
class:border-danger={!isValid && value}
|
|
46
|
+
class:border-success={isValid && value && valid}
|
|
47
|
+
aria-valuemin={min}
|
|
48
|
+
aria-valuemax={max}
|
|
49
|
+
aria-valuenow={value}
|
|
50
|
+
on:input={onInput}
|
|
51
|
+
on:focus
|
|
52
|
+
on:blur
|
|
53
|
+
on:change />
|
|
54
|
+
{#if controls}
|
|
55
|
+
<IncrementButton
|
|
56
|
+
clickHandler={() => value += step}
|
|
57
|
+
type={controlsType}
|
|
58
|
+
disabled={!canIncrement}
|
|
59
|
+
/>
|
|
60
|
+
{/if}
|
|
61
|
+
</div>
|
|
62
|
+
{/if}
|
|
63
|
+
|
|
64
|
+
<script >var _a;
|
|
65
|
+
import { createEventDispatcher } from 'svelte';
|
|
66
|
+
import { DecrementButton, IncrementButton } from './';
|
|
67
|
+
import { computeClasses, getDomAttributes } from '../../../utils';
|
|
68
|
+
;
|
|
69
|
+
export let label = '';
|
|
70
|
+
export let value = null;
|
|
71
|
+
export let step = 1;
|
|
72
|
+
export let min = null;
|
|
73
|
+
export let max = null;
|
|
74
|
+
export let disabled = false;
|
|
75
|
+
export let controls = true;
|
|
76
|
+
export let controlsType = 'secondary';
|
|
77
|
+
export let block = false;
|
|
78
|
+
export let valid = null;
|
|
79
|
+
export let prefix = '';
|
|
80
|
+
export let suffix = '';
|
|
81
|
+
export let format = null;
|
|
82
|
+
export let formatOptions = undefined;
|
|
83
|
+
const dispatch = createEventDispatcher();
|
|
84
|
+
function onInput({ target }) {
|
|
85
|
+
dispatch('input', target.value);
|
|
86
|
+
}
|
|
87
|
+
let isValid = true;
|
|
88
|
+
$: if (valid) {
|
|
89
|
+
isValid = valid(value);
|
|
90
|
+
}
|
|
91
|
+
let attr;
|
|
92
|
+
$: {
|
|
93
|
+
attr = getDomAttributes({
|
|
94
|
+
props: $$props,
|
|
95
|
+
classes,
|
|
96
|
+
toOmit: ['block', 'value', 'valid', 'noResize', 'min', 'max']
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
let classes;
|
|
100
|
+
$: classes = `${(_a = $$restProps.class) !== null && _a !== void 0 ? _a : ''} ${computeClasses('input', { block })}`;
|
|
101
|
+
$: canDecrement = !disabled && (min !== null ? value - step >= min : true);
|
|
102
|
+
$: canIncrement = !disabled && (max !== null ? value + step <= max : true);
|
|
103
|
+
let formattedValue = '';
|
|
104
|
+
$: if (value !== null) {
|
|
105
|
+
formattedValue = String(value);
|
|
106
|
+
if (format) {
|
|
107
|
+
if (typeof format === 'string') {
|
|
108
|
+
formattedValue = new Intl.NumberFormat(format === 'locale' ? undefined : format, formatOptions).format(value);
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
formattedValue = format(value);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
formattedValue = [
|
|
115
|
+
prefix,
|
|
116
|
+
formattedValue,
|
|
117
|
+
suffix,
|
|
118
|
+
].join(' ').trim();
|
|
119
|
+
}
|
|
120
|
+
</script>
|
|
121
|
+
|
|
122
|
+
<style >:global(.number-input-wrapper) {
|
|
123
|
+
display: flex;
|
|
124
|
+
gap: 0.25rem;
|
|
125
|
+
}
|
|
126
|
+
:global(.number-input-wrapper) :global(.paper-btn) {
|
|
127
|
+
align-self: flex-end;
|
|
128
|
+
padding: 0.5rem;
|
|
129
|
+
}</style>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import type { PaperType } from '../../../types';
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
[x: string]: any;
|
|
6
|
+
label?: string;
|
|
7
|
+
value?: number | null;
|
|
8
|
+
step?: number;
|
|
9
|
+
min?: number | null;
|
|
10
|
+
max?: number | null;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
controls?: boolean;
|
|
13
|
+
controlsType?: PaperType;
|
|
14
|
+
block?: boolean;
|
|
15
|
+
valid?: (val: number | null) => boolean;
|
|
16
|
+
prefix?: string;
|
|
17
|
+
suffix?: string;
|
|
18
|
+
format?: string | ((val: number | null) => string);
|
|
19
|
+
formatOptions?: Intl.NumberFormatOptions | undefined;
|
|
20
|
+
};
|
|
21
|
+
events: {
|
|
22
|
+
focus: FocusEvent;
|
|
23
|
+
blur: FocusEvent;
|
|
24
|
+
change: Event;
|
|
25
|
+
input: CustomEvent<any>;
|
|
26
|
+
} & {
|
|
27
|
+
[evt: string]: CustomEvent<any>;
|
|
28
|
+
};
|
|
29
|
+
slots: {};
|
|
30
|
+
};
|
|
31
|
+
export declare type NumberInputProps = typeof __propDef.props;
|
|
32
|
+
export declare type NumberInputEvents = typeof __propDef.events;
|
|
33
|
+
export declare type NumberInputSlots = typeof __propDef.slots;
|
|
34
|
+
export default class NumberInput extends SvelteComponentTyped<NumberInputProps, NumberInputEvents, NumberInputSlots> {
|
|
35
|
+
}
|
|
36
|
+
export {};
|
|
@@ -5,5 +5,6 @@ import Checkbox from './Checkbox.svelte';
|
|
|
5
5
|
import Switch from './Switch.svelte';
|
|
6
6
|
import Slider from './Slider.svelte';
|
|
7
7
|
import Form from './Form.svelte';
|
|
8
|
+
import { NumberInput } from './NumberInput';
|
|
8
9
|
export declare type InputType = 'text' | 'email' | 'number' | 'password' | 'search' | 'tel' | 'url' | 'time' | 'date' | 'month' | 'week' | 'datetime-local' | 'color' | 'textarea';
|
|
9
|
-
export { Input, Select, Radio, Checkbox, Switch, Slider, Form, };
|
|
10
|
+
export { Input, Select, Radio, Checkbox, Switch, Slider, Form, NumberInput, };
|
package/components/Form/index.js
CHANGED
|
@@ -5,4 +5,5 @@ import Checkbox from './Checkbox.svelte';
|
|
|
5
5
|
import Switch from './Switch.svelte';
|
|
6
6
|
import Slider from './Slider.svelte';
|
|
7
7
|
import Form from './Form.svelte';
|
|
8
|
-
|
|
8
|
+
import { NumberInput } from './NumberInput';
|
|
9
|
+
export { Input, Select, Radio, Checkbox, Switch, Slider, Form, NumberInput, };
|
|
@@ -1,14 +1,18 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
<svelte:element
|
|
2
|
+
this={as}
|
|
3
|
+
{...$$restProps}
|
|
4
|
+
class={classes}
|
|
5
|
+
class:col-fill={fill}
|
|
6
|
+
class:align-top={top}
|
|
7
|
+
class:align-middle={middle}
|
|
8
|
+
class:align-bottom={bottom}
|
|
9
|
+
>
|
|
7
10
|
<slot />
|
|
8
|
-
</
|
|
11
|
+
</svelte:element>
|
|
9
12
|
|
|
10
13
|
<script >var _a;
|
|
11
14
|
import { computeClasses } from '../../utils';
|
|
15
|
+
export let as = 'div';
|
|
12
16
|
export let col = null;
|
|
13
17
|
export let sm = null;
|
|
14
18
|
export let md = null;
|
|
@@ -1,16 +1,20 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
<svelte:element
|
|
2
|
+
this={as}
|
|
3
|
+
{...$$restProps}
|
|
4
|
+
class="{$$restProps.class ?? ''} row"
|
|
5
|
+
class:flex-right={right}
|
|
6
|
+
class:flex-center={center}
|
|
7
|
+
class:flex-edges={edges}
|
|
8
|
+
class:flex-spaces={spaces}
|
|
9
|
+
class:flex-top={top}
|
|
10
|
+
class:flex-middle={middle}
|
|
11
|
+
class:flex-bottom={bottom}
|
|
12
|
+
>
|
|
10
13
|
<slot />
|
|
11
|
-
</
|
|
14
|
+
</svelte:element>
|
|
12
15
|
|
|
13
|
-
<script >export let
|
|
16
|
+
<script >export let as = 'div';
|
|
17
|
+
export let right = false;
|
|
14
18
|
export let center = false;
|
|
15
19
|
export let edges = false;
|
|
16
20
|
export let spaces = false;
|
|
@@ -24,27 +24,32 @@ function bgClass(color) {
|
|
|
24
24
|
|
|
25
25
|
[popover-top].popover-primary::after, [popover-right].popover-primary::after,
|
|
26
26
|
[popover-bottom].popover-primary::after, [popover-left].popover-primary::after {
|
|
27
|
-
background-color: var(--primary);
|
|
27
|
+
background-color: var(--primary-light);
|
|
28
|
+
color: var(--muted-dark);
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
[popover-top].popover-secondary::after, [popover-right].popover-secondary::after,
|
|
31
32
|
[popover-bottom].popover-secondary::after, [popover-left].popover-secondary::after {
|
|
32
|
-
background-color: var(--secondary);
|
|
33
|
+
background-color: var(--secondary-light);
|
|
34
|
+
color: var(--muted-dark);
|
|
33
35
|
}
|
|
34
36
|
|
|
35
37
|
[popover-top].popover-success::after, [popover-right].popover-success::after,
|
|
36
38
|
[popover-bottom].popover-success::after, [popover-left].popover-success::after {
|
|
37
|
-
background-color: var(--success);
|
|
39
|
+
background-color: var(--success-light);
|
|
40
|
+
color: var(--muted-dark);
|
|
38
41
|
}
|
|
39
42
|
|
|
40
43
|
[popover-top].popover-warning::after, [popover-right].popover-warning::after,
|
|
41
44
|
[popover-bottom].popover-warning::after, [popover-left].popover-warning::after {
|
|
42
|
-
background-color: var(--warning);
|
|
45
|
+
background-color: var(--warning-light);
|
|
46
|
+
color: var(--muted-dark);
|
|
43
47
|
}
|
|
44
48
|
|
|
45
49
|
[popover-top].popover-danger::after, [popover-right].popover-danger::after,
|
|
46
50
|
[popover-bottom].popover-danger::after, [popover-left].popover-danger::after {
|
|
47
|
-
background-color: var(--danger);
|
|
51
|
+
background-color: var(--danger-light);
|
|
52
|
+
color: var(--muted-dark);
|
|
48
53
|
}
|
|
49
54
|
|
|
50
55
|
[popover-top], [popover-right],
|
package/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import Breadcrumb from './components/Breadcrumb.svelte';
|
|
|
5
5
|
import Navbar from './components/Navbar.svelte';
|
|
6
6
|
import Modal from './components/Modal';
|
|
7
7
|
import { Tabs, Tab } from './components/Tabs';
|
|
8
|
-
import { Input, Select, Radio, Checkbox, Switch, Slider, Form } from './components/Form';
|
|
8
|
+
import { Input, Select, Radio, Checkbox, Switch, Slider, Form, NumberInput } from './components/Form';
|
|
9
9
|
import Article from './components/Article.svelte';
|
|
10
10
|
import Card from './components/Card.svelte';
|
|
11
11
|
import Collapsible from './components/Collapsible.svelte';
|
|
@@ -20,4 +20,4 @@ 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, };
|
|
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, NumberInput, };
|
package/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import Breadcrumb from './components/Breadcrumb.svelte';
|
|
|
5
5
|
import Navbar from './components/Navbar.svelte';
|
|
6
6
|
import Modal from './components/Modal';
|
|
7
7
|
import { Tabs, Tab } from './components/Tabs';
|
|
8
|
-
import { Input, Select, Radio, Checkbox, Switch, Slider, Form } from './components/Form';
|
|
8
|
+
import { Input, Select, Radio, Checkbox, Switch, Slider, Form, NumberInput, } from './components/Form';
|
|
9
9
|
import Article from './components/Article.svelte';
|
|
10
10
|
import Card from './components/Card.svelte';
|
|
11
11
|
import Collapsible from './components/Collapsible.svelte';
|
|
@@ -20,4 +20,4 @@ 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, };
|
|
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, NumberInput, };
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"papercss",
|
|
9
9
|
"components"
|
|
10
10
|
],
|
|
11
|
-
"version": "1.
|
|
11
|
+
"version": "1.4.0",
|
|
12
12
|
"repository": {
|
|
13
13
|
"type": "git",
|
|
14
14
|
"url": "git+https://github.com/Oli8/spaper.git"
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
},
|
|
19
19
|
"homepage": "https://github.com/Oli8/spaper#readme",
|
|
20
20
|
"peerDependencies": {
|
|
21
|
-
"papercss": "^1.
|
|
21
|
+
"papercss": "^1.9.2"
|
|
22
22
|
},
|
|
23
23
|
"type": "module",
|
|
24
24
|
"exports": {
|
|
@@ -39,6 +39,10 @@
|
|
|
39
39
|
"./components/Form/Checkbox.svelte": "./components/Form/Checkbox.svelte",
|
|
40
40
|
"./components/Form/Form.svelte": "./components/Form/Form.svelte",
|
|
41
41
|
"./components/Form/Input.svelte": "./components/Form/Input.svelte",
|
|
42
|
+
"./components/Form/NumberInput/DecrementButton.svelte": "./components/Form/NumberInput/DecrementButton.svelte",
|
|
43
|
+
"./components/Form/NumberInput/IncrementButton.svelte": "./components/Form/NumberInput/IncrementButton.svelte",
|
|
44
|
+
"./components/Form/NumberInput/NumberInput.svelte": "./components/Form/NumberInput/NumberInput.svelte",
|
|
45
|
+
"./components/Form/NumberInput": "./components/Form/NumberInput/index.js",
|
|
42
46
|
"./components/Form/Radio.svelte": "./components/Form/Radio.svelte",
|
|
43
47
|
"./components/Form/Select.svelte": "./components/Form/Select.svelte",
|
|
44
48
|
"./components/Form/Slider.svelte": "./components/Form/Slider.svelte",
|
|
@@ -70,6 +74,7 @@
|
|
|
70
74
|
"./components/Toast": "./components/Toast/index.js",
|
|
71
75
|
"./components/style.scss": "./components/style.scss",
|
|
72
76
|
".": "./index.js",
|
|
77
|
+
"./types": "./types.js",
|
|
73
78
|
"./utils": "./utils.js"
|
|
74
79
|
},
|
|
75
80
|
"svelte": "./index.js"
|
package/types.d.ts
CHANGED
|
@@ -1,26 +1,16 @@
|
|
|
1
|
-
export type PaperSize = 'small' | 'default' | 'large';
|
|
2
|
-
|
|
3
|
-
export type
|
|
4
|
-
|
|
5
|
-
export type
|
|
6
|
-
|
|
7
|
-
export type
|
|
8
|
-
|
|
9
|
-
export type Attributes = Record<string, string|boolean>;
|
|
10
|
-
|
|
11
|
-
export type PositionY = 'top' | 'bottom';
|
|
12
|
-
export type PositionX = 'left' | 'right';
|
|
13
|
-
export type Position = PositionX | PositionY;
|
|
14
|
-
|
|
1
|
+
export declare type PaperSize = 'small' | 'default' | 'large';
|
|
2
|
+
export declare type PaperType = 'primary' | 'secondary' | 'success' | 'warning' | 'danger';
|
|
3
|
+
export declare type PaperFlexPlacement = 'spaces' | 'edges' | 'right' | 'center' | 'left';
|
|
4
|
+
export declare type PaperAlign = 'left' | 'center' | 'right';
|
|
5
|
+
export declare type Attributes = Record<string, string | boolean>;
|
|
6
|
+
export declare type PositionY = 'top' | 'bottom';
|
|
7
|
+
export declare type PositionX = 'left' | 'right';
|
|
8
|
+
export declare type Position = PositionX | PositionY;
|
|
15
9
|
export interface TableColumnObj {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
10
|
+
field: string;
|
|
11
|
+
label?: string;
|
|
12
|
+
content?: (val?: any) => string;
|
|
13
|
+
html?: boolean;
|
|
20
14
|
}
|
|
21
|
-
|
|
22
|
-
export type
|
|
23
|
-
|
|
24
|
-
export type Transition = 'blur'
|
|
25
|
-
| 'fade' | 'fly' | 'slide'
|
|
26
|
-
| 'scale' | 'draw' | 'crossfade';
|
|
15
|
+
export declare type TableColumn = TableColumnObj | string;
|
|
16
|
+
export declare type Transition = 'blur' | 'fade' | 'fly' | 'slide' | 'scale' | 'draw' | 'crossfade';
|
package/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|