@iroco/ui 1.6.18 → 1.7.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.
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<script module lang="ts">
|
|
2
|
+
import { Highlight } from './index';
|
|
3
|
+
import { defineMeta, setTemplate } from '@storybook/addon-svelte-csf';
|
|
4
|
+
|
|
5
|
+
const { Story } = defineMeta({
|
|
6
|
+
title: 'Iroco-UI/Atoms/Highlight',
|
|
7
|
+
component: Highlight
|
|
8
|
+
});
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<script lang="ts">
|
|
12
|
+
setTemplate(template);
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
{#snippet template({ ...args })}
|
|
16
|
+
<Highlight {...args}>
|
|
17
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc eros lacus, commodo eu tristique
|
|
18
|
+
non, ultricies eu tellus. Nulla facilisi. Integer a tincidunt purus. Proin vulputate tristique
|
|
19
|
+
magna. Aliquam id eros id ante malesuada interdum. Phasellus tristique ac leo at fringilla. Cras
|
|
20
|
+
a viverra nibh, vitae rutrum ante. Sed pharetra nibh ac velit dignissim ornare sed accumsan
|
|
21
|
+
lacus. Vestibulum tincidunt purus sapien, ac dapibus sem semper a. Nullam venenatis vestibulum
|
|
22
|
+
risus id molestie. Aliquam facilisis nunc at nunc aliquam hendrerit. Etiam sodales sodales
|
|
23
|
+
lectus, ut suscipit lacus vehicula nec. Proin vel magna sed orci condimentum ornare in a odio.
|
|
24
|
+
In varius eu augue eget tincidunt. Ut quis porttitor nulla. Nulla leo nunc, efficitur non ipsum
|
|
25
|
+
vel, tincidunt auctor lectus.
|
|
26
|
+
</Highlight>
|
|
27
|
+
{/snippet}
|
|
28
|
+
|
|
29
|
+
<Story name="Default" />
|
|
30
|
+
<Story name="Secondary" args={{ kind: 'secondary' }} />
|
|
31
|
+
<Story name="Danger" args={{ kind: 'danger' }} />
|
|
32
|
+
<Story name="Flash" args={{ kind: 'flash' }} />
|
|
33
|
+
<Story name="Success" args={{ kind: 'success' }} />
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Highlight } from './index';
|
|
2
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
3
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
4
|
+
$$bindings?: Bindings;
|
|
5
|
+
} & Exports;
|
|
6
|
+
(internal: unknown, props: {
|
|
7
|
+
$$events?: Events;
|
|
8
|
+
$$slots?: Slots;
|
|
9
|
+
}): Exports & {
|
|
10
|
+
$set?: any;
|
|
11
|
+
$on?: any;
|
|
12
|
+
};
|
|
13
|
+
z_$$bindings?: Bindings;
|
|
14
|
+
}
|
|
15
|
+
declare const Highlight: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
16
|
+
[evt: string]: CustomEvent<any>;
|
|
17
|
+
}, {}, {}, string>;
|
|
18
|
+
type Highlight = InstanceType<typeof Highlight>;
|
|
19
|
+
export default Highlight;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
interface Props {
|
|
3
|
+
kind: 'secondary' | 'primary' | 'danger' | 'warning';
|
|
4
|
+
children;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
let { kind = 'primary', children }: Props = $props();
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<div class={`boo boo--${kind}`}>
|
|
11
|
+
{@render children?.()}
|
|
12
|
+
</div>
|
|
13
|
+
|
|
14
|
+
<style>
|
|
15
|
+
.boo {
|
|
16
|
+
border-style: solid;
|
|
17
|
+
border-width: 1px;
|
|
18
|
+
border-radius: 5px;
|
|
19
|
+
padding: 1rem;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.boo--primary {
|
|
23
|
+
border-color: var(--color-primary);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.boo--secondary {
|
|
27
|
+
border-color: var(--color-secondary);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.boo--danger {
|
|
31
|
+
border-color: var(--color-danger);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.boo--warning {
|
|
35
|
+
border-color: var(--color-warning);
|
|
36
|
+
}
|
|
37
|
+
</style>
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import './scss/style.scss';
|
|
2
2
|
export { default as Alert } from './Alert.svelte';
|
|
3
3
|
export { default as Button } from './Button.svelte';
|
|
4
|
+
export { default as Highlight } from './Highlight.svelte';
|
|
4
5
|
export { default as DataTable } from './DataTable.svelte';
|
|
5
6
|
export { default as IconBurger } from './IconBurger.svelte';
|
|
6
7
|
export { default as IconClose } from './IconClose.svelte';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import './scss/style.scss';
|
|
2
2
|
export { default as Alert } from './Alert.svelte';
|
|
3
3
|
export { default as Button } from './Button.svelte';
|
|
4
|
+
export { default as Highlight } from './Highlight.svelte';
|
|
4
5
|
export { default as DataTable } from './DataTable.svelte';
|
|
5
6
|
export { default as IconBurger } from './IconBurger.svelte';
|
|
6
7
|
export { default as IconClose } from './IconClose.svelte';
|