@functionalcms/svelte-components 2.33.1 → 2.34.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/dist/components/Link.svelte +290 -290
- package/dist/components/agnostic/Alert/Alert.svelte +310 -0
- package/dist/components/agnostic/Alert/Alert.svelte.d.ts +31 -0
- package/dist/components/agnostic/Avatar/Avatar.svelte +123 -0
- package/dist/components/agnostic/Avatar/Avatar.svelte.d.ts +26 -0
- package/dist/components/agnostic/Avatar/AvatarGroup.svelte +106 -0
- package/dist/components/agnostic/Avatar/AvatarGroup.svelte.d.ts +29 -0
- package/dist/components/agnostic/Breadcrumb/Breadcrumb.svelte +56 -0
- package/dist/components/agnostic/Breadcrumb/Breadcrumb.svelte.d.ts +20 -0
- package/dist/components/agnostic/Breadcrumb/api.d.ts +4 -0
- package/dist/components/agnostic/Breadcrumb/api.js +1 -0
- package/dist/components/agnostic/Button/Button.svelte +345 -0
- package/dist/components/agnostic/Button/Button.svelte.d.ts +43 -0
- package/dist/components/agnostic/Button/ButtonGroup.svelte +20 -0
- package/dist/components/agnostic/Button/ButtonGroup.svelte.d.ts +23 -0
- package/dist/components/agnostic/Button/button-base.css +12 -0
- package/dist/components/agnostic/Button/button-core.css +237 -0
- package/dist/components/agnostic/Button/button-empty.css +31 -0
- package/dist/components/agnostic/Button/button-group.css +8 -0
- package/dist/components/agnostic/Card/Card.svelte +133 -0
- package/dist/components/agnostic/Card/Card.svelte.d.ts +31 -0
- package/dist/components/agnostic/ChoiceInput/ChoiceInput.svelte +337 -0
- package/dist/components/agnostic/ChoiceInput/ChoiceInput.svelte.d.ts +37 -0
- package/dist/components/agnostic/ChoiceInput/api.d.ts +7 -0
- package/dist/components/agnostic/ChoiceInput/api.js +1 -0
- package/dist/components/agnostic/Close/Close.svelte +120 -0
- package/dist/components/agnostic/Close/Close.svelte.d.ts +23 -0
- package/dist/components/agnostic/Close/api.d.ts +1 -0
- package/dist/components/agnostic/Close/api.js +1 -0
- package/dist/components/agnostic/Dialog/Dialog.svelte +265 -0
- package/dist/components/agnostic/Dialog/Dialog.svelte.d.ts +39 -0
- package/dist/components/agnostic/Disclose/Disclose.svelte +102 -0
- package/dist/components/agnostic/Disclose/Disclose.svelte.d.ts +23 -0
- package/dist/components/agnostic/Divider/Divider.svelte +139 -0
- package/dist/components/agnostic/Divider/Divider.svelte.d.ts +25 -0
- package/dist/components/agnostic/Divider/api.d.ts +3 -0
- package/dist/components/agnostic/Divider/api.js +1 -0
- package/dist/components/agnostic/Drawer/Drawer.svelte +30 -0
- package/dist/components/agnostic/Drawer/Drawer.svelte.d.ts +28 -0
- package/dist/components/agnostic/Drawer/api.d.ts +1 -0
- package/dist/components/agnostic/Drawer/api.js +1 -0
- package/dist/components/agnostic/EmptyState/EmptyState.svelte +46 -0
- package/dist/components/agnostic/EmptyState/EmptyState.svelte.d.ts +23 -0
- package/dist/components/agnostic/Header/Header.svelte +104 -0
- package/dist/components/agnostic/Header/Header.svelte.d.ts +26 -0
- package/dist/components/agnostic/Header/HeaderNav.svelte +28 -0
- package/dist/components/agnostic/Header/HeaderNav.svelte.d.ts +20 -0
- package/dist/components/agnostic/Header/HeaderNavItem.svelte +30 -0
- package/dist/components/agnostic/Header/HeaderNavItem.svelte.d.ts +20 -0
- package/dist/components/agnostic/Icon/Icon.svelte +180 -0
- package/dist/components/agnostic/Icon/Icon.svelte.d.ts +23 -0
- package/dist/components/agnostic/Icon/api.d.ts +2 -0
- package/dist/components/agnostic/Icon/api.js +1 -0
- package/dist/components/agnostic/Input/Input.svelte +415 -0
- package/dist/components/agnostic/Input/Input.svelte.d.ts +45 -0
- package/dist/components/agnostic/Input/InputAddonItem.svelte +42 -0
- package/dist/components/agnostic/Input/InputAddonItem.svelte.d.ts +33 -0
- package/dist/components/agnostic/Loader/Loader.svelte +113 -0
- package/dist/components/agnostic/Loader/Loader.svelte.d.ts +20 -0
- package/dist/components/agnostic/Menu/Menu.svelte +466 -0
- package/dist/components/agnostic/Menu/Menu.svelte.d.ts +31 -0
- package/dist/components/agnostic/Menu/MenuItem.svelte +117 -0
- package/dist/components/agnostic/Menu/MenuItem.svelte.d.ts +29 -0
- package/dist/components/agnostic/Progress/Progress.svelte +50 -0
- package/dist/components/agnostic/Progress/Progress.svelte.d.ts +20 -0
- package/dist/components/agnostic/Select/Select.svelte +141 -0
- package/dist/components/agnostic/Select/Select.svelte.d.ts +32 -0
- package/dist/components/agnostic/Spinner/Spinner.svelte +105 -0
- package/dist/components/agnostic/Spinner/Spinner.svelte.d.ts +19 -0
- package/dist/components/agnostic/Switch/Switch.svelte +275 -0
- package/dist/components/agnostic/Switch/Switch.svelte.d.ts +45 -0
- package/dist/components/agnostic/Table/Table.svelte +508 -0
- package/dist/components/agnostic/Table/Table.svelte.d.ts +36 -0
- package/dist/components/agnostic/Table/TableCustomRenderComponent.svelte +13 -0
- package/dist/components/agnostic/Table/TableCustomRenderComponent.svelte.d.ts +25 -0
- package/dist/components/agnostic/Tabs/TabButtonCustom.svelte +65 -0
- package/dist/components/agnostic/Tabs/TabButtonCustom.svelte.d.ts +35 -0
- package/dist/components/agnostic/Tabs/Tabs.svelte +330 -0
- package/dist/components/agnostic/Tabs/Tabs.svelte.d.ts +34 -0
- package/dist/components/agnostic/Tabs/api.d.ts +10 -0
- package/dist/components/agnostic/Tabs/api.js +1 -0
- package/dist/components/agnostic/Tag/Tag.svelte +74 -0
- package/dist/components/agnostic/Tag/Tag.svelte.d.ts +23 -0
- package/dist/components/agnostic/Tag/TagSlots.svelte +51 -0
- package/dist/components/agnostic/Tag/TagSlots.svelte.d.ts +16 -0
- package/dist/components/agnostic/Toasts/Toasts.svelte +46 -0
- package/dist/components/agnostic/Toasts/Toasts.svelte.d.ts +22 -0
- package/dist/components/agnostic/Tooltip/Tooltip.svelte +103 -0
- package/dist/components/agnostic/Tooltip/Tooltip.svelte.d.ts +23 -0
- package/dist/components/agnostic/Tooltip/TooltipSlots.svelte +81 -0
- package/dist/components/agnostic/Tooltip/TooltipSlots.svelte.d.ts +16 -0
- package/dist/components/agnostic/Tooltip/api.d.ts +1 -0
- package/dist/components/agnostic/Tooltip/api.js +1 -0
- package/dist/components/agnostic/animation.css +37 -0
- package/dist/components/files/utils.js +1 -1
- package/dist/index.d.ts +30 -1
- package/dist/index.js +30 -1
- package/package.json +1 -4
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<style>
|
|
2
|
+
.empty-base,
|
|
3
|
+
.empty {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-flow: column wrap;
|
|
6
|
+
align-items: center;
|
|
7
|
+
text-align: center;
|
|
8
|
+
width: 100%;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.empty {
|
|
12
|
+
padding: calc(2 * var(--functional-side-padding));
|
|
13
|
+
background: var(--functional-gray-extra-light);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.empty-bordered {
|
|
17
|
+
background: transparent;
|
|
18
|
+
border: 1px solid var(--functional-gray-light);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.empty-rounded {
|
|
22
|
+
border-radius: var(--functional-radius);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.empty-actions {
|
|
26
|
+
margin-block-start: var(--spacing-24);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
</style>
|
|
30
|
+
|
|
31
|
+
<script>export let isRounded = false;
|
|
32
|
+
export let isBordered = false;
|
|
33
|
+
const emptyClasses = [
|
|
34
|
+
"empty",
|
|
35
|
+
isRounded ? "empty-rounded" : "",
|
|
36
|
+
isBordered ? "empty-bordered" : ""
|
|
37
|
+
].filter((cl) => cl.length).join(" ");
|
|
38
|
+
</script>
|
|
39
|
+
|
|
40
|
+
<div class={emptyClasses}>
|
|
41
|
+
<slot name="header" />
|
|
42
|
+
<slot name="body" />
|
|
43
|
+
<div class="empty-actions">
|
|
44
|
+
<slot name="footer" />
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
isRounded?: boolean;
|
|
5
|
+
isBordered?: boolean;
|
|
6
|
+
};
|
|
7
|
+
events: {
|
|
8
|
+
[evt: string]: CustomEvent<any>;
|
|
9
|
+
};
|
|
10
|
+
slots: {
|
|
11
|
+
header: {};
|
|
12
|
+
body: {};
|
|
13
|
+
footer: {};
|
|
14
|
+
};
|
|
15
|
+
exports?: {} | undefined;
|
|
16
|
+
bindings?: string | undefined;
|
|
17
|
+
};
|
|
18
|
+
export type EmptyStateProps = typeof __propDef.props;
|
|
19
|
+
export type EmptyStateEvents = typeof __propDef.events;
|
|
20
|
+
export type EmptyStateSlots = typeof __propDef.slots;
|
|
21
|
+
export default class EmptyState extends SvelteComponent<EmptyStateProps, EmptyStateEvents, EmptyStateSlots> {
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
<style>
|
|
2
|
+
.header,
|
|
3
|
+
.header-base {
|
|
4
|
+
display: block;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.header-base :global(img),
|
|
8
|
+
.header :global(img) {
|
|
9
|
+
max-width: 100%;
|
|
10
|
+
height: auto;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.header,
|
|
14
|
+
.header-skin {
|
|
15
|
+
background-color: var(--functional-header-background-color, var(--functional-light));
|
|
16
|
+
box-shadow:
|
|
17
|
+
var(--functional-header-box-shadow-hor, 0) var(--functional-header-box-shadow-ver, 1px)
|
|
18
|
+
var(--functional-header-box-shadow-blur, 5px) var(--functional-header-box-shadow-spread, 2px)
|
|
19
|
+
var(--functional-header-box-shadow-color, rgb(0 0 0 / 10%));
|
|
20
|
+
font-family: var(--functional-header-font-family, var(--functional-font-family-body));
|
|
21
|
+
border-bottom: 1px solid var(--functional-header-border-color, var(--functional-gray-light));
|
|
22
|
+
padding-block-start: var(--functional-vertical-pad, 0.5rem);
|
|
23
|
+
padding-block-end: var(--functional-vertical-pad, 0.5rem);
|
|
24
|
+
padding-inline-start: var(--fluid-24);
|
|
25
|
+
padding-inline-end: var(--fluid-24);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.header-content {
|
|
29
|
+
width: var(--functional-header-content-width, 960px);
|
|
30
|
+
max-width: 100%;
|
|
31
|
+
margin: 0 auto;
|
|
32
|
+
display: flex;
|
|
33
|
+
justify-content: space-around;
|
|
34
|
+
align-items: center;
|
|
35
|
+
flex-flow: wrap column;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* If you make your header sticky, you should likely consider that jump links
|
|
40
|
+
* e.g. <h1 id="Jump-Here">... will tuck underneath the header! Here's a recommendation
|
|
41
|
+
* for how to circumnavigate this issue via scroll-margin-top:
|
|
42
|
+
h1[id],
|
|
43
|
+
h2[id],
|
|
44
|
+
h3[id],
|
|
45
|
+
h4[id],
|
|
46
|
+
h5[id],
|
|
47
|
+
h6[id] {
|
|
48
|
+
scroll-margin-top: 80px;
|
|
49
|
+
}
|
|
50
|
+
* In this case I have a 64px tall header so I've added 16px for clearance -- you'll need
|
|
51
|
+
* to curate your own use case, but scroll-margin-top is super useful for this use case.
|
|
52
|
+
*/
|
|
53
|
+
|
|
54
|
+
.header-sticky {
|
|
55
|
+
position: relative;
|
|
56
|
+
top: 0;
|
|
57
|
+
z-index: 10;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
@media (min-width: 960px) {
|
|
61
|
+
.header-sticky {
|
|
62
|
+
position: sticky;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.header-content {
|
|
66
|
+
flex-direction: row;
|
|
67
|
+
justify-content: space-between;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.header-content-start {
|
|
71
|
+
justify-content: flex-start;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.header-content-end {
|
|
75
|
+
justify-content: flex-end;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
</style>
|
|
80
|
+
|
|
81
|
+
<script>export let isSticky = false;
|
|
82
|
+
export let isSkinned = true;
|
|
83
|
+
export let isHeaderContentStart = false;
|
|
84
|
+
export let isHeaderContentEnd = false;
|
|
85
|
+
export let css = "";
|
|
86
|
+
const klasses = [
|
|
87
|
+
isSkinned ? "header" : "header-base",
|
|
88
|
+
isSticky ? "header-sticky" : "",
|
|
89
|
+
css ? `${css}` : ""
|
|
90
|
+
].filter((cl) => cl.length).join(" ");
|
|
91
|
+
const headerContentClasses = [
|
|
92
|
+
"header-content",
|
|
93
|
+
isHeaderContentStart ? "header-content-start" : "",
|
|
94
|
+
isHeaderContentEnd ? "header-content-end" : ""
|
|
95
|
+
].filter((cl) => cl.length).join(" ");
|
|
96
|
+
</script>
|
|
97
|
+
|
|
98
|
+
<nav class={klasses}>
|
|
99
|
+
<div class={headerContentClasses}>
|
|
100
|
+
<slot name="logoleft" />
|
|
101
|
+
<slot />
|
|
102
|
+
<slot name="logoright" />
|
|
103
|
+
</div>
|
|
104
|
+
</nav>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
isSticky?: boolean;
|
|
5
|
+
isSkinned?: boolean;
|
|
6
|
+
isHeaderContentStart?: boolean;
|
|
7
|
+
isHeaderContentEnd?: boolean;
|
|
8
|
+
css?: string;
|
|
9
|
+
};
|
|
10
|
+
events: {
|
|
11
|
+
[evt: string]: CustomEvent<any>;
|
|
12
|
+
};
|
|
13
|
+
slots: {
|
|
14
|
+
logoleft: {};
|
|
15
|
+
default: {};
|
|
16
|
+
logoright: {};
|
|
17
|
+
};
|
|
18
|
+
exports?: {} | undefined;
|
|
19
|
+
bindings?: string | undefined;
|
|
20
|
+
};
|
|
21
|
+
export type HeaderProps = typeof __propDef.props;
|
|
22
|
+
export type HeaderEvents = typeof __propDef.events;
|
|
23
|
+
export type HeaderSlots = typeof __propDef.slots;
|
|
24
|
+
export default class Header extends SvelteComponent<HeaderProps, HeaderEvents, HeaderSlots> {
|
|
25
|
+
}
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<style>
|
|
2
|
+
/* Goes on the <ul> */
|
|
3
|
+
.header-nav {
|
|
4
|
+
margin: 0;
|
|
5
|
+
padding: 0;
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
align-items: center;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@media (min-width: 960px) {
|
|
12
|
+
.header-nav {
|
|
13
|
+
flex-direction: row;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
</style>
|
|
18
|
+
|
|
19
|
+
<script>export let css = "";
|
|
20
|
+
const containerClasses = [css ? `${css}` : ""].filter((c) => c.length);
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<nav class={containerClasses}>
|
|
24
|
+
<ul class="header-nav">
|
|
25
|
+
<slot />
|
|
26
|
+
</ul>
|
|
27
|
+
</nav>
|
|
28
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
css?: string;
|
|
5
|
+
};
|
|
6
|
+
events: {
|
|
7
|
+
[evt: string]: CustomEvent<any>;
|
|
8
|
+
};
|
|
9
|
+
slots: {
|
|
10
|
+
default: {};
|
|
11
|
+
};
|
|
12
|
+
exports?: {} | undefined;
|
|
13
|
+
bindings?: string | undefined;
|
|
14
|
+
};
|
|
15
|
+
export type HeaderNavProps = typeof __propDef.props;
|
|
16
|
+
export type HeaderNavEvents = typeof __propDef.events;
|
|
17
|
+
export type HeaderNavSlots = typeof __propDef.slots;
|
|
18
|
+
export default class HeaderNav extends SvelteComponent<HeaderNavProps, HeaderNavEvents, HeaderNavSlots> {
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<style>
|
|
2
|
+
.header-nav-item {
|
|
3
|
+
display: inline-block;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.header-nav-item:not(:last-child) {
|
|
7
|
+
margin-inline-end: initial;
|
|
8
|
+
margin-block-end: var(--fluid-8);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.header-nav-item :global(a) {
|
|
12
|
+
color: var(--functional-header-color, var(--functional-font-color));
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@media (min-width: 960px) {
|
|
16
|
+
.header-nav-item:not(:last-child) {
|
|
17
|
+
margin-inline-end: var(--functional-header-nav-spacing, var(--fluid-32));
|
|
18
|
+
margin-block-end: initial;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
</style>
|
|
23
|
+
|
|
24
|
+
<script>export let css = "";
|
|
25
|
+
let klasses = ["header-nav-item", css ? `${css}` : ""].filter((cl) => cl && cl.length).join(" ");
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<li class={klasses}>
|
|
29
|
+
<slot />
|
|
30
|
+
</li>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
css?: string;
|
|
5
|
+
};
|
|
6
|
+
events: {
|
|
7
|
+
[evt: string]: CustomEvent<any>;
|
|
8
|
+
};
|
|
9
|
+
slots: {
|
|
10
|
+
default: {};
|
|
11
|
+
};
|
|
12
|
+
exports?: {} | undefined;
|
|
13
|
+
bindings?: string | undefined;
|
|
14
|
+
};
|
|
15
|
+
export type HeaderNavItemProps = typeof __propDef.props;
|
|
16
|
+
export type HeaderNavItemEvents = typeof __propDef.events;
|
|
17
|
+
export type HeaderNavItemSlots = typeof __propDef.slots;
|
|
18
|
+
export default class HeaderNavItem extends SvelteComponent<HeaderNavItemProps, HeaderNavItemEvents, HeaderNavItemSlots> {
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
<style>
|
|
2
|
+
.icon-base {
|
|
3
|
+
display: inline-flex;
|
|
4
|
+
text-align: center;
|
|
5
|
+
|
|
6
|
+
/* Ensures no "stretching" of icons to reach 100% of container's width */
|
|
7
|
+
max-width: 100%;
|
|
8
|
+
|
|
9
|
+
/* Ensure SVGs don't have click events -- typically we want enclosing button to handle */
|
|
10
|
+
pointer-events: none;
|
|
11
|
+
user-select: none;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/* We need to make both the span and svg same height (span .icon-svg) */
|
|
15
|
+
.icon,
|
|
16
|
+
.icon-skin {
|
|
17
|
+
width: var(--fluid-16);
|
|
18
|
+
height: var(--fluid-16);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.icon-14 {
|
|
22
|
+
width: var(--fluid-14);
|
|
23
|
+
height: var(--fluid-14);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.icon-16 {
|
|
27
|
+
width: var(--fluid-16);
|
|
28
|
+
height: var(--fluid-16);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.icon-18 {
|
|
32
|
+
width: var(--fluid-18);
|
|
33
|
+
height: var(--fluid-18);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.icon-20 {
|
|
37
|
+
width: var(--fluid-20);
|
|
38
|
+
height: var(--fluid-20);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.icon-24,
|
|
42
|
+
.icon-svg-24 {
|
|
43
|
+
width: var(--fluid-24);
|
|
44
|
+
height: var(--fluid-24);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.icon-32 {
|
|
48
|
+
width: var(--fluid-32);
|
|
49
|
+
height: var(--fluid-32);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.icon-36 {
|
|
53
|
+
width: var(--fluid-36);
|
|
54
|
+
height: var(--fluid-36);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.icon-40 {
|
|
58
|
+
width: var(--fluid-40);
|
|
59
|
+
height: var(--fluid-40);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.icon-48 {
|
|
63
|
+
width: var(--fluid-48);
|
|
64
|
+
height: var(--fluid-48);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.icon-56 {
|
|
68
|
+
width: var(--fluid-56);
|
|
69
|
+
height: var(--fluid-56);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.icon-64 {
|
|
73
|
+
width: var(--fluid-64);
|
|
74
|
+
height: var(--fluid-64);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
:global(.icon-svg) {
|
|
78
|
+
width: var(--fluid-16);
|
|
79
|
+
height: var(--fluid-16);
|
|
80
|
+
fill: currentColor;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
:global(.icon-svg-14) {
|
|
84
|
+
width: var(--fluid-14);
|
|
85
|
+
height: var(--fluid-14);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
:global(.icon-svg-16) {
|
|
89
|
+
width: var(--fluid-16);
|
|
90
|
+
height: var(--fluid-16);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
:global(.icon-svg-18) {
|
|
94
|
+
width: var(--fluid-18);
|
|
95
|
+
height: var(--fluid-18);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
:global(.icon-svg-20) {
|
|
99
|
+
width: var(--fluid-20);
|
|
100
|
+
height: var(--fluid-20);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
:global(.icon-svg-24) {
|
|
104
|
+
width: var(--fluid-24);
|
|
105
|
+
height: var(--fluid-24);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
:global(.icon-svg-32) {
|
|
109
|
+
width: var(--fluid-32);
|
|
110
|
+
height: var(--fluid-32);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
:global(.icon-svg-36) {
|
|
114
|
+
width: var(--fluid-36);
|
|
115
|
+
height: var(--fluid-36);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
:global(.icon-svg-40) {
|
|
119
|
+
width: var(--fluid-40);
|
|
120
|
+
height: var(--fluid-40);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
:global(.icon-svg-48) {
|
|
124
|
+
width: var(--fluid-48);
|
|
125
|
+
height: var(--fluid-48);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
:global(.icon-svg-56) {
|
|
129
|
+
width: var(--fluid-56);
|
|
130
|
+
height: var(--fluid-56);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
:global(.icon-svg-64) {
|
|
134
|
+
width: var(--fluid-64);
|
|
135
|
+
height: var(--fluid-64);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
:global(.icon-svg-info) {
|
|
139
|
+
color: var(--functional-primary);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
:global(.icon-svg-action),
|
|
143
|
+
:global(.icon-svg-success) {
|
|
144
|
+
color: var(--functional-action);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
:global(.icon-svg-warning) {
|
|
148
|
+
color: var(--functional-warning-border-accent);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
:global(.icon-svg-error) {
|
|
152
|
+
color: var(--functional-error);
|
|
153
|
+
}
|
|
154
|
+
</style>
|
|
155
|
+
|
|
156
|
+
<script>import { onMount } from "svelte";
|
|
157
|
+
export let type = "";
|
|
158
|
+
export let size = 14;
|
|
159
|
+
export let isSkinned = true;
|
|
160
|
+
let spanRef;
|
|
161
|
+
const iconClasses = [
|
|
162
|
+
"screenreader-only",
|
|
163
|
+
isSkinned ? "icon" : "icon-base",
|
|
164
|
+
type ? `icon-${type}` : "",
|
|
165
|
+
size ? `icon-${size}` : ""
|
|
166
|
+
].filter((cls) => cls).join(" ");
|
|
167
|
+
onMount(() => {
|
|
168
|
+
const svg = spanRef.querySelector("svg");
|
|
169
|
+
svg.classList.add("icon-svg");
|
|
170
|
+
if (svg) {
|
|
171
|
+
if (size) svg.classList.add(`icon-svg-${size}`);
|
|
172
|
+
if (type) svg.classList.add(`icon-svg-${type}`);
|
|
173
|
+
spanRef.classList.remove("screenreader-only");
|
|
174
|
+
}
|
|
175
|
+
});
|
|
176
|
+
</script>
|
|
177
|
+
|
|
178
|
+
<span bind:this={spanRef} class={iconClasses}>
|
|
179
|
+
<slot />
|
|
180
|
+
</span>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import type { IconSize, IconType } from './api';
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
type?: IconType;
|
|
6
|
+
size?: IconSize;
|
|
7
|
+
isSkinned?: boolean;
|
|
8
|
+
};
|
|
9
|
+
events: {
|
|
10
|
+
[evt: string]: CustomEvent<any>;
|
|
11
|
+
};
|
|
12
|
+
slots: {
|
|
13
|
+
default: {};
|
|
14
|
+
};
|
|
15
|
+
exports?: {} | undefined;
|
|
16
|
+
bindings?: string | undefined;
|
|
17
|
+
};
|
|
18
|
+
export type IconProps = typeof __propDef.props;
|
|
19
|
+
export type IconEvents = typeof __propDef.events;
|
|
20
|
+
export type IconSlots = typeof __propDef.slots;
|
|
21
|
+
export default class Icon extends SvelteComponent<IconProps, IconEvents, IconSlots> {
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|