@hyvor/design 0.0.46 → 0.0.48
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/ActionList/ActionListItem.svelte +2 -4
- package/dist/components/Button/Button.svelte +16 -0
- package/dist/components/Callout/Callout.svelte +1 -1
- package/dist/components/CodeBlock/CodeBlock.svelte.d.ts +1 -1
- package/dist/components/CodeBlock/getCode.js +2 -0
- package/dist/components/Dropdown/Dropdown.svelte +1 -1
- package/dist/components/Modal/Modal.svelte +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +2 -0
- package/dist/marketing/Docs/Content/DocsImage.svelte +78 -0
- package/dist/marketing/Docs/Content/DocsImage.svelte.d.ts +20 -0
- package/dist/marketing/index.d.ts +1 -0
- package/dist/marketing/index.js +1 -0
- package/package.json +1 -1
- /package/dist/{directives → components/directives}/clickOutside.d.ts +0 -0
- /package/dist/{directives → components/directives}/clickOutside.js +0 -0
|
@@ -120,15 +120,13 @@ function handleClick() {
|
|
|
120
120
|
color: var(--text-light);
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
+
/*styles for disabled state*/
|
|
123
124
|
div.action-list-item.disabled {
|
|
124
|
-
|
|
125
|
+
color: var(--text-light);
|
|
125
126
|
cursor: not-allowed;
|
|
126
|
-
pointer-events: none;
|
|
127
127
|
}
|
|
128
|
-
|
|
129
128
|
div.action-list-item.disabled:hover {
|
|
130
129
|
background-color: transparent;
|
|
131
|
-
pointer-events: none;
|
|
132
130
|
}
|
|
133
131
|
|
|
134
132
|
</style>
|
|
@@ -364,15 +364,31 @@ export let button = {};
|
|
|
364
364
|
background-color: transparent;
|
|
365
365
|
color: var(--text);
|
|
366
366
|
transition: 0.2s background-color;
|
|
367
|
+
/*styles for disabled state*/
|
|
367
368
|
}
|
|
368
369
|
.button.invisible:hover {
|
|
369
370
|
background-color: var(--accent-light);
|
|
370
371
|
box-shadow: none !important;
|
|
371
372
|
}
|
|
373
|
+
.button.invisible[disabled] {
|
|
374
|
+
background-color: transparent;
|
|
375
|
+
color: var(--text);
|
|
376
|
+
box-shadow: none !important;
|
|
377
|
+
cursor: not-allowed;
|
|
378
|
+
opacity: 0.2;
|
|
379
|
+
}
|
|
380
|
+
.button.invisible[disabled]:hover {
|
|
381
|
+
background-color: transparent;
|
|
382
|
+
box-shadow: none !important;
|
|
383
|
+
color: var(--text);
|
|
384
|
+
}
|
|
372
385
|
|
|
373
386
|
/*Styles for button disabled state*/
|
|
374
387
|
.button[disabled] {
|
|
375
388
|
cursor: not-allowed;
|
|
376
389
|
opacity: 0.2;
|
|
377
390
|
box-shadow: none !important;
|
|
391
|
+
}
|
|
392
|
+
.button[disabled]:hover {
|
|
393
|
+
box-shadow: none !important;
|
|
378
394
|
}</style>
|
|
@@ -3,7 +3,7 @@ import './hljs.scss';
|
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
5
|
code: string;
|
|
6
|
-
language?: ("css" | "ts" | "html" | "js" | "svelte" | "jsx") | undefined;
|
|
6
|
+
language?: ("css" | "ts" | "yaml" | "html" | "js" | "svelte" | "jsx") | undefined;
|
|
7
7
|
};
|
|
8
8
|
events: {
|
|
9
9
|
[evt: string]: CustomEvent<any>;
|
|
@@ -3,10 +3,12 @@ import javascript from 'highlight.js/lib/languages/javascript';
|
|
|
3
3
|
import xml from 'highlight.js/lib/languages/xml';
|
|
4
4
|
import css from 'highlight.js/lib/languages/css';
|
|
5
5
|
import ts from 'highlight.js/lib/languages/typescript';
|
|
6
|
+
import yaml from 'highlight.js/lib/languages/yaml';
|
|
6
7
|
hljs.registerLanguage('javascript', javascript);
|
|
7
8
|
hljs.registerLanguage('xml', xml);
|
|
8
9
|
hljs.registerLanguage('css', css);
|
|
9
10
|
hljs.registerLanguage('ts', ts);
|
|
11
|
+
hljs.registerLanguage('yaml', yaml);
|
|
10
12
|
export default function getCode(code, language) {
|
|
11
13
|
let ret = code;
|
|
12
14
|
// remove the first empty line
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script>import ModalFooter from "./ModalFooter.svelte";
|
|
2
|
-
import { clickOutside } from "
|
|
2
|
+
import { clickOutside } from "../directives/clickOutside.js";
|
|
3
3
|
import { IconX } from "@hyvor/icons";
|
|
4
4
|
import IconButton from "./../IconButton/IconButton.svelte";
|
|
5
5
|
import { fade, scale } from "svelte/transition";
|
|
@@ -40,3 +40,4 @@ export { default as TextInput } from './TextInput/TextInput.svelte';
|
|
|
40
40
|
export { default as toast } from './Toast/toast.js';
|
|
41
41
|
export { default as Tooltip } from './Tooltip/Tooltip.svelte';
|
|
42
42
|
export { default as IconMessage } from './IconMessage/IconMessage.svelte';
|
|
43
|
+
export { clickOutside } from './directives/clickOutside.js';
|
package/dist/components/index.js
CHANGED
|
@@ -40,3 +40,5 @@ export { default as TextInput } from './TextInput/TextInput.svelte';
|
|
|
40
40
|
export { default as toast } from './Toast/toast.js';
|
|
41
41
|
export { default as Tooltip } from './Tooltip/Tooltip.svelte';
|
|
42
42
|
export { default as IconMessage } from './IconMessage/IconMessage.svelte';
|
|
43
|
+
// directives
|
|
44
|
+
export { clickOutside } from './directives/clickOutside.js';
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
<script>import { scale } from "svelte/transition";
|
|
2
|
+
import { clickOutside } from "../../../components/index.js";
|
|
3
|
+
export let src;
|
|
4
|
+
export let alt;
|
|
5
|
+
export let width = void 0;
|
|
6
|
+
export let modalImageProps = {};
|
|
7
|
+
let open = false;
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<div class="wrap">
|
|
11
|
+
<img
|
|
12
|
+
{src}
|
|
13
|
+
{alt}
|
|
14
|
+
{...$$restProps}
|
|
15
|
+
{width}
|
|
16
|
+
on:click={() => open = true}
|
|
17
|
+
class="preview"
|
|
18
|
+
/>
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
{#if open}
|
|
22
|
+
<div
|
|
23
|
+
class="modal"
|
|
24
|
+
>
|
|
25
|
+
<img
|
|
26
|
+
{src}
|
|
27
|
+
{alt}
|
|
28
|
+
{...modalImageProps}
|
|
29
|
+
use:clickOutside={{
|
|
30
|
+
callback: () => open = false
|
|
31
|
+
}}
|
|
32
|
+
transition:scale={{ duration: 100, opacity: 0.5, start: 0.95 }}
|
|
33
|
+
/>
|
|
34
|
+
</div>
|
|
35
|
+
{/if}
|
|
36
|
+
|
|
37
|
+
<style>
|
|
38
|
+
img.preview {
|
|
39
|
+
display: block;
|
|
40
|
+
max-width: 100%;
|
|
41
|
+
max-height: 100%;
|
|
42
|
+
margin: 0 auto;
|
|
43
|
+
border-radius: 5px;
|
|
44
|
+
box-shadow: 0 0 10px rgba(0,0,0,0.2);
|
|
45
|
+
cursor: pointer;
|
|
46
|
+
transition: .1s box-shadow;
|
|
47
|
+
}
|
|
48
|
+
img.preview:hover {
|
|
49
|
+
box-shadow: 0 0 15px rgba(0,0,0,0.3);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.modal {
|
|
53
|
+
position: fixed;
|
|
54
|
+
z-index: 1000000;
|
|
55
|
+
left: 0;
|
|
56
|
+
top: 0;
|
|
57
|
+
width: 100%;
|
|
58
|
+
height: 100%;
|
|
59
|
+
background-color: rgba(0,0,0,0.5);
|
|
60
|
+
display: flex;
|
|
61
|
+
align-items: center;
|
|
62
|
+
justify-content: center;
|
|
63
|
+
padding: 40px;
|
|
64
|
+
overflow: hidden;
|
|
65
|
+
}
|
|
66
|
+
.modal-content {
|
|
67
|
+
min-height: 0;
|
|
68
|
+
}
|
|
69
|
+
.modal img {
|
|
70
|
+
max-width: 100%;
|
|
71
|
+
max-height: 100%;
|
|
72
|
+
border-radius: 5px;
|
|
73
|
+
}
|
|
74
|
+
.wrap {
|
|
75
|
+
padding: 25px 0;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
</style>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
[x: string]: any;
|
|
5
|
+
src: string;
|
|
6
|
+
alt: string;
|
|
7
|
+
width?: undefined | number;
|
|
8
|
+
modalImageProps?: any;
|
|
9
|
+
};
|
|
10
|
+
events: {
|
|
11
|
+
[evt: string]: CustomEvent<any>;
|
|
12
|
+
};
|
|
13
|
+
slots: {};
|
|
14
|
+
};
|
|
15
|
+
export type DocsImageProps = typeof __propDef.props;
|
|
16
|
+
export type DocsImageEvents = typeof __propDef.events;
|
|
17
|
+
export type DocsImageSlots = typeof __propDef.slots;
|
|
18
|
+
export default class DocsImage extends SvelteComponent<DocsImageProps, DocsImageEvents, DocsImageSlots> {
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
@@ -5,5 +5,6 @@ export { default as DocsNav } from './Docs/Nav/Nav.svelte';
|
|
|
5
5
|
export { default as DocsNavItem } from './Docs/Nav/NavItem.svelte';
|
|
6
6
|
export { default as DocsNavCategory } from './Docs/Nav/NavCategory.svelte';
|
|
7
7
|
export { default as DocsContent } from './Docs/Content/Content.svelte';
|
|
8
|
+
export { default as DocsImage } from './Docs/Content/DocsImage.svelte';
|
|
8
9
|
export { default as Footer } from './Footer/Footer.svelte';
|
|
9
10
|
export { default as FooterLinkList } from './Footer/FooterLinkList.svelte';
|
package/dist/marketing/index.js
CHANGED
|
@@ -5,5 +5,6 @@ export { default as DocsNav } from './Docs/Nav/Nav.svelte';
|
|
|
5
5
|
export { default as DocsNavItem } from './Docs/Nav/NavItem.svelte';
|
|
6
6
|
export { default as DocsNavCategory } from './Docs/Nav/NavCategory.svelte';
|
|
7
7
|
export { default as DocsContent } from './Docs/Content/Content.svelte';
|
|
8
|
+
export { default as DocsImage } from './Docs/Content/DocsImage.svelte';
|
|
8
9
|
export { default as Footer } from './Footer/Footer.svelte';
|
|
9
10
|
export { default as FooterLinkList } from './Footer/FooterLinkList.svelte';
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|