@onsvisual/svelte-components 1.1.9 → 1.1.11
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.
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
export let small = false;
|
|
38
38
|
/**
|
|
39
39
|
* Icon on button, eg. "arrow", "search"
|
|
40
|
-
* @type {"arrow"|"carret"|"chevron"|"code"|"cog"|"cross"|"download"|"expand"|"external"|"pin"|"print"|"search"|"shrink"|"signout"|"tick"|null}
|
|
40
|
+
* @type {"arrow"|"carret"|"chevron"|"code"|"cog"|"copy"|"cross"|"download"|"expand"|"external"|"pin"|"print"|"search"|"shrink"|"signout"|"tick"|null}
|
|
41
41
|
*/
|
|
42
42
|
export let icon = null;
|
|
43
43
|
/**
|
|
@@ -9,7 +9,7 @@ export default class Button extends SvelteComponentTyped<{
|
|
|
9
9
|
type?: "button" | "reset" | "submit" | undefined;
|
|
10
10
|
variant?: "primary" | "secondary" | "ghost" | undefined;
|
|
11
11
|
noScroll?: boolean | undefined;
|
|
12
|
-
icon?: "code" | "search" | "arrow" | "carret" | "chevron" | "cog" | "cross" | "download" | "expand" | "external" | "pin" | "print" | "shrink" | "signout" | "tick" | null | undefined;
|
|
12
|
+
icon?: "code" | "search" | "copy" | "arrow" | "carret" | "chevron" | "cog" | "cross" | "download" | "expand" | "external" | "pin" | "print" | "shrink" | "signout" | "tick" | null | undefined;
|
|
13
13
|
iconPosition?: "before" | "after" | undefined;
|
|
14
14
|
iconRotation?: number | undefined;
|
|
15
15
|
disabled?: boolean | undefined;
|
|
@@ -38,7 +38,7 @@ declare const __propDef: {
|
|
|
38
38
|
type?: "button" | "reset" | "submit" | undefined;
|
|
39
39
|
variant?: "primary" | "secondary" | "ghost" | undefined;
|
|
40
40
|
noScroll?: boolean | undefined;
|
|
41
|
-
icon?: "code" | "search" | "arrow" | "carret" | "chevron" | "cog" | "cross" | "download" | "expand" | "external" | "pin" | "print" | "shrink" | "signout" | "tick" | null | undefined;
|
|
41
|
+
icon?: "code" | "search" | "copy" | "arrow" | "carret" | "chevron" | "cog" | "cross" | "download" | "expand" | "external" | "pin" | "print" | "shrink" | "signout" | "tick" | null | undefined;
|
|
42
42
|
iconPosition?: "before" | "after" | undefined;
|
|
43
43
|
iconRotation?: number | undefined;
|
|
44
44
|
disabled?: boolean | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
/**
|
|
3
3
|
* Set the type of icon
|
|
4
|
-
* @type {"arrow"|"carret"|"chevron"|"code"|"cog"|"cross"|"download"|"expand"|"external"|"pin"|"print"|"search"|"shrink"|"signout"|"tick"}
|
|
4
|
+
* @type {"arrow"|"carret"|"chevron"|"code"|"cog"|"copy"|"cross"|"download"|"expand"|"external"|"pin"|"print"|"search"|"shrink"|"signout"|"tick"}
|
|
5
5
|
*/
|
|
6
6
|
export let type = "arrow";
|
|
7
7
|
/**
|
|
@@ -56,6 +56,10 @@
|
|
|
56
56
|
d: "M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6z",
|
|
57
57
|
viewBox: "2 2 20 20"
|
|
58
58
|
},
|
|
59
|
+
copy: {
|
|
60
|
+
d: "M15 20H5V7c0-.55-.45-1-1-1s-1 .45-1 1v13c0 1.1.9 2 2 2h10c.55 0 1-.45 1-1s-.45-1-1-1m5-4V4c0-1.1-.9-2-2-2H9c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h9c1.1 0 2-.9 2-2m-2 0H9V4h9z",
|
|
61
|
+
viewBox: "2 2 20 20"
|
|
62
|
+
},
|
|
59
63
|
cross: {
|
|
60
64
|
d: "M12 1.2086L10.7914 0L6 4.79155L1.20857 0L0 1.2086L4.79143 6.00015L0 10.7917L1.20857 12.0003L6 7.20875L10.7914 12.0003L12 10.7917L7.20857 6.00015L12 1.2086Z",
|
|
61
65
|
viewBox: "0 0 12 12"
|
|
@@ -74,11 +78,11 @@
|
|
|
74
78
|
},
|
|
75
79
|
pin: {
|
|
76
80
|
d: "M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7m0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5Z",
|
|
77
|
-
viewBox: "
|
|
81
|
+
viewBox: "4 4 16 16"
|
|
78
82
|
},
|
|
79
83
|
print: {
|
|
80
84
|
d: "M17 4H3C1.3 4 0 5.2 0 6.8v5.5h4V16h12v-3.7h4V6.8C20 5.2 18.7 4 17 4zm-3 10H6V9h8v5zm3-6a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm-1-8H4v3h12V0z",
|
|
81
|
-
viewBox: "4
|
|
85
|
+
viewBox: "4 0 16 16"
|
|
82
86
|
},
|
|
83
87
|
search: {
|
|
84
88
|
d: "M11.86 10.23 8.62 6.99a4.63 4.63 0 1 0-6.34 1.64 4.55 4.55 0 0 0 2.36.64 4.65 4.65 0 0 0 2.33-.65l3.24 3.23a.46.46 0 0 0 .65 0l1-1a.48.48 0 0 0 0-.62Zm-5-3.32a3.28 3.28 0 0 1-2.31.93 3.22 3.22 0 1 1 2.35-.93Z",
|
|
@@ -113,3 +117,9 @@
|
|
|
113
117
|
<path d={svgPath || paths[type].d}></path>
|
|
114
118
|
</svg>
|
|
115
119
|
{/if}
|
|
120
|
+
|
|
121
|
+
<style>
|
|
122
|
+
.ons-icon {
|
|
123
|
+
overflow: visible;
|
|
124
|
+
}
|
|
125
|
+
</style>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/** @typedef {typeof __propDef.events} IconEvents */
|
|
3
3
|
/** @typedef {typeof __propDef.slots} IconSlots */
|
|
4
4
|
export default class Icon extends SvelteComponentTyped<{
|
|
5
|
-
type?: "code" | "search" | "arrow" | "carret" | "chevron" | "cog" | "cross" | "download" | "expand" | "external" | "pin" | "print" | "shrink" | "signout" | "tick" | undefined;
|
|
5
|
+
type?: "code" | "search" | "copy" | "arrow" | "carret" | "chevron" | "cog" | "cross" | "download" | "expand" | "external" | "pin" | "print" | "shrink" | "signout" | "tick" | undefined;
|
|
6
6
|
size?: "s" | "m" | "l" | "xl" | "2xl" | "3xl" | null | undefined;
|
|
7
7
|
rotation?: number | undefined;
|
|
8
8
|
svgPath?: string | null | undefined;
|
|
@@ -19,7 +19,7 @@ export type IconSlots = typeof __propDef.slots;
|
|
|
19
19
|
import { SvelteComponentTyped } from "svelte";
|
|
20
20
|
declare const __propDef: {
|
|
21
21
|
props: {
|
|
22
|
-
type?: "code" | "search" | "arrow" | "carret" | "chevron" | "cog" | "cross" | "download" | "expand" | "external" | "pin" | "print" | "shrink" | "signout" | "tick" | undefined;
|
|
22
|
+
type?: "code" | "search" | "copy" | "arrow" | "carret" | "chevron" | "cog" | "cross" | "download" | "expand" | "external" | "pin" | "print" | "shrink" | "signout" | "tick" | undefined;
|
|
23
23
|
size?: "s" | "m" | "l" | "xl" | "2xl" | "3xl" | null | undefined;
|
|
24
24
|
rotation?: number | undefined;
|
|
25
25
|
svgPath?: string | null | undefined;
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
* A label for the page contents nav
|
|
23
23
|
* @type {string}
|
|
24
24
|
*/
|
|
25
|
-
export let contentsLabel = "
|
|
25
|
+
export let contentsLabel = "Contents";
|
|
26
26
|
/**
|
|
27
27
|
* Don't include table of contents (allows for custom uses of nav panel)
|
|
28
28
|
* @type {boolean}
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
{#if !noContents}
|
|
109
109
|
<nav class="ons-table-of-contents" aria-label="Sections in this page">
|
|
110
110
|
{#if contentsLabel}
|
|
111
|
-
<h2 class="ons-table-of-contents__title ons-u-fs-r--b ons-u-mb-s">
|
|
111
|
+
<h2 class="ons-table-of-contents__title ons-u-fs-r--b ons-u-mb-s">{contentsLabel}</h2>
|
|
112
112
|
{/if}
|
|
113
113
|
<ol class="ons-list ons-u-mb-l ons-list--dashed">
|
|
114
114
|
{#each formatSections($sections) as section}
|