@iroco/ui 0.21.0 → 0.50.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/Alert.svelte +72 -0
- package/Alert.svelte.d.ts +18 -0
- package/{lib/iroco.css → Button.svelte} +69 -88
- package/Button.svelte.d.ts +43 -0
- package/DataTable.svelte +94 -0
- package/DataTable.svelte.d.ts +27 -0
- package/{src/IconBurger.svelte → IconBurger.svelte} +2 -3
- package/IconBurger.svelte.d.ts +17 -0
- package/{src/IconClose.svelte → IconClose.svelte} +2 -3
- package/IconClose.svelte.d.ts +17 -0
- package/{src/IconFloppyDisk.svelte → IconFloppyDisk.svelte} +3 -4
- package/IconFloppyDisk.svelte.d.ts +18 -0
- package/{src/IconInfo.svelte → IconInfo.svelte} +2 -3
- package/IconInfo.svelte.d.ts +17 -0
- package/{src/IconIrocoLogo.svelte → IconIrocoLogo.svelte} +2 -3
- package/IconIrocoLogo.svelte.d.ts +17 -0
- package/IconMastodon.svelte +19 -0
- package/IconMastodon.svelte.d.ts +18 -0
- package/{src/IconMoreSign.svelte → IconMoreSign.svelte} +2 -3
- package/IconMoreSign.svelte.d.ts +17 -0
- package/{src/IconTrashCan.svelte → IconTrashCan.svelte} +4 -11
- package/IconTrashCan.svelte.d.ts +18 -0
- package/IrocoLogo.svelte +49 -0
- package/IrocoLogo.svelte.d.ts +19 -0
- package/{src/Loader.svelte → Loader.svelte} +1 -2
- package/Loader.svelte.d.ts +14 -0
- package/NavBar.svelte +669 -0
- package/NavBar.svelte.d.ts +21 -0
- package/Navigation.svelte +325 -0
- package/Navigation.svelte.d.ts +19 -0
- package/NumberInput.svelte +117 -0
- package/NumberInput.svelte.d.ts +25 -0
- package/NumberInputSized.svelte +4 -0
- package/NumberInputSized.svelte.d.ts +14 -0
- package/README.md +21 -31
- package/RadioButton.svelte +93 -0
- package/RadioButton.svelte.d.ts +23 -0
- package/RadioButtonTest.svelte +10 -0
- package/RadioButtonTest.svelte.d.ts +19 -0
- package/SlottedComponentWrapper.svelte +7 -0
- package/SlottedComponentWrapper.svelte.d.ts +23 -0
- package/TextInput.svelte +148 -0
- package/TextInput.svelte.d.ts +30 -0
- package/{src/TopBar.svelte → TopBar.svelte} +0 -0
- package/TopBar.svelte.d.ts +23 -0
- package/definition.d.ts +28 -0
- package/definition.js +35 -0
- package/index.d.ts +18 -0
- package/index.js +18 -0
- package/package.json +71 -113
- package/scss/button.scss +57 -55
- package/scss/check.scss +45 -46
- package/scss/colors.scss +39 -17
- package/scss/constants.scss +1 -1
- package/scss/containers.scss +126 -130
- package/scss/fields/_checkbox.scss +37 -42
- package/scss/fields/_input.scss +160 -169
- package/scss/fonts.scss +7 -7
- package/scss/forms.scss +53 -55
- package/scss/iroco.scss +22 -22
- package/scss/layouts.scss +21 -7
- package/scss/loader.scss +18 -16
- package/scss/style.scss +5 -5
- package/lib/button.scss +0 -61
- package/lib/check.scss +0 -48
- package/lib/colors.scss +0 -23
- package/lib/constants.scss +0 -1
- package/lib/containers.scss +0 -226
- package/lib/fields/_checkbox.scss +0 -44
- package/lib/fields/_input.scss +0 -171
- package/lib/fields/_style.scss +0 -2
- package/lib/fonts.scss +0 -11
- package/lib/forms.scss +0 -67
- package/lib/index.js +0 -5816
- package/lib/index.min.js +0 -330
- package/lib/index.mjs +0 -5789
- package/lib/iroco.css.map +0 -1
- package/lib/iroco.scss +0 -37
- package/lib/layouts.scss +0 -7
- package/lib/loader.scss +0 -20
- package/lib/style.scss +0 -5
- package/src/Alert.svelte +0 -34
- package/src/Button.svelte +0 -24
- package/src/DataTable.svelte +0 -72
- package/src/Icon.svelte +0 -29
- package/src/IconMastodon.svelte +0 -13
- package/src/IrocoLogo.svelte +0 -45
- package/src/NavBar.svelte +0 -154
- package/src/Navigation.svelte +0 -107
- package/src/NumberInput.svelte +0 -23
- package/src/RadioButton.svelte +0 -56
- package/src/TextInput.svelte +0 -121
- package/src/definition.ts +0 -30
- package/src/index.ts +0 -21
package/lib/iroco.css.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../scss/colors.scss","../scss/containers.scss","../scss/forms.scss","../scss/iroco.scss","../scss/fonts.scss"],"names":[],"mappings":"AAYA;EAAkB,OAZX;;;AAaP;EAAsB,OAZX;;;AAaX;EAAuB,OAZX;;;AAaZ;EAAmB,OAZX;;;AAaR;EAAiB,OAZX;;;AAaN;EAAoB,OAZX;;;AAaT;EAAmB,OAZX;;;AAaR;EAAuB,OAZX;;;AAaZ;EAAwB,OAZV;;;AAad;EAAsB,OAZX;;;AAaX;EAAuB,OAZX;;;ACyMZ;EAvIE,OAzDe;EA0Df,WAnEM;EAoEN;EACA;EACA;;AA1DA;EA6LF;IAhII,WAxEO;;;AAiBT;EAuLF;IA5HI,WA3EY;;;AAsBd;EAiLF;IAxHI,WA9Ea;;;AA2Bf;EA2KF;IApHI,WAjFW;;;AAgCb;EAqKF;IAhHI,WApFW;;;AAqCb;EA+JF;IA5GI,WAvFa;;;AA0Cf;EAyJF;IAxGI,WA1Fa;;;AA+Cf;EAmJF;IApGI,WA7Fa;;;AAoDf;EA6IF;IAhGI,WAhGa;;;;AAoMjB;EA9FE,OAtGe;EAuGf,WA9Gc;EA+Gd;EACA;EACA;;AA3FA;EAqLF;IAvFI,WAnHa;;;AA2Bf;EA+KF;IAnFI,WAtHW;;;AAgCb;EAyKF;IA/EI,WAzHW;;;AAqCb;EAmKF;IA3EI,WA5Ha;;;AA0Cf;EA6JF;IAvEI,WA/Ha;;;AA+Cf;EAuJF;IAnEI,WAlIa;;;AAoDf;EAiJF;IA/DI,WArIa;;;;AAwMjB;EA7DE,OA3Ie;EA4If,WAlJe;EAmJf;EACA;EACA;;AA1HA;EAmLF;IAtDI,WAvJW;;;AAgCb;EA6KF;IAlDI,WA1JW;;;AAqCb;EAuKF;IA9CI,WA7Ja;;;AA0Cf;EAiKF;IA1CI,WAhKa;;;AA+Cf;EA2JF;IAtCI,WAnKa;;;AAoDf;EAqJF;IAlCI,WAtKa;;;;AA4MjB;EAhCE,OA5Ke;EA6Kf,WAjLa;EAkLb;EACA;EACA;;AAzIA;EAqKF;IAzBI,WArLa;;;AA+Cf;EA+JF;IArBI,WAxLa;;;AAoDf;EAyJF;IAjBI,WA3La;;;;AChBf;EACE;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAIJ;EACE;EACA;;AACA;EACE,OFbE;EEcF,YFnBK;EEoBL;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAEF;EACE,cF5BF;;AE8BA;EACE;;AAKN;EACE;EACA;EACA;EACA;;AAGF;EACE;;AAEA;EACE;;AAIJ;EACE;;AAGF;EACE;EACA,OFzDE;;;AGAN;AAAA;AAAA;EAGE;EACA;;;AAGF;AAAA;AAAA;AAAA;EAIE;EACA;EACA;EACA,OHZM;;;AGeR;EACE;EACA;;AAEA;ECtBA;EACA,WDsBuB;ECrBvB,aAH+C;EAI/C,ODoB6B;ECnB7B;EACA;EACA;EDkBE;EACA;EACA;EACA;EACA;EACA;EACA;EACA,YHjCO","file":"iroco.css"}
|
package/lib/iroco.scss
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
@use "colors";
|
|
2
|
-
@use "fonts";
|
|
3
|
-
@use "style";
|
|
4
|
-
|
|
5
|
-
*,
|
|
6
|
-
*::before,
|
|
7
|
-
*::after {
|
|
8
|
-
-webkit-box-sizing: border-box;
|
|
9
|
-
box-sizing: border-box;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
a,
|
|
13
|
-
a:visited,
|
|
14
|
-
a:active,
|
|
15
|
-
button {
|
|
16
|
-
outline: none;
|
|
17
|
-
text-decoration: none;
|
|
18
|
-
font-size: 14px;
|
|
19
|
-
color: colors.$beige;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
html {
|
|
23
|
-
margin: 0;
|
|
24
|
-
padding: 0;
|
|
25
|
-
|
|
26
|
-
> body {
|
|
27
|
-
@include fonts.Arial(14px, white);
|
|
28
|
-
margin: 0;
|
|
29
|
-
padding: 0;
|
|
30
|
-
cursor: default;
|
|
31
|
-
text-rendering: optimizeLegibility;
|
|
32
|
-
-webkit-font-smoothing: antialiased;
|
|
33
|
-
-moz-osx-font-smoothing: grayscale;
|
|
34
|
-
font-kerning: normal;
|
|
35
|
-
background: colors.$darkBlue;
|
|
36
|
-
}
|
|
37
|
-
}
|
package/lib/layouts.scss
DELETED
package/lib/loader.scss
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
.ui-loader {
|
|
2
|
-
display: inline-block;
|
|
3
|
-
position: relative;
|
|
4
|
-
|
|
5
|
-
@keyframes spin {
|
|
6
|
-
0% { transform: rotate(0deg); }
|
|
7
|
-
100% { transform: rotate(360deg); }
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
>div {
|
|
11
|
-
position: absolute;
|
|
12
|
-
width: 100%;
|
|
13
|
-
height: 100%;
|
|
14
|
-
border-style: solid;
|
|
15
|
-
border-radius: 50%;
|
|
16
|
-
animation: spin 1s linear infinite;
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
}
|
package/lib/style.scss
DELETED
package/src/Alert.svelte
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
export let type: 'success' | 'danger' = 'success';
|
|
3
|
-
export let content: string;
|
|
4
|
-
export let callback: (e: Event) => void;
|
|
5
|
-
|
|
6
|
-
</script>
|
|
7
|
-
|
|
8
|
-
<div class={`alert alert--${type}`} on:click={callback} >
|
|
9
|
-
{content}
|
|
10
|
-
</div>
|
|
11
|
-
|
|
12
|
-
<style lang="scss">
|
|
13
|
-
@use '../scss/colors';
|
|
14
|
-
@use '../scss/constants';
|
|
15
|
-
.alert {
|
|
16
|
-
min-height: 2em;
|
|
17
|
-
display: inline-flex;
|
|
18
|
-
align-items: center;
|
|
19
|
-
border-radius: constants.$border-radius;
|
|
20
|
-
padding: 0 1em 0 1em;
|
|
21
|
-
font-size: 1.2em;
|
|
22
|
-
justify-content: center;
|
|
23
|
-
margin-bottom: 1em;
|
|
24
|
-
cursor: pointer;
|
|
25
|
-
&--danger {
|
|
26
|
-
background-color: rgba(colors.$red, 0.5);
|
|
27
|
-
border: 1px solid colors.$red;
|
|
28
|
-
}
|
|
29
|
-
&--success {
|
|
30
|
-
background-color: rgba(colors.$green, 0.5);
|
|
31
|
-
border: 1px solid colors.$green;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
</style>
|
package/src/Button.svelte
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
export let type = 'button';
|
|
3
|
-
export let disabled = false;
|
|
4
|
-
export let kind: 'danger' | 'success' | 'dark' | 'basic' = 'basic';
|
|
5
|
-
export let size: 'small' | 'regular' = 'regular';
|
|
6
|
-
export let id:string ;
|
|
7
|
-
export let node: HTMLElement ;
|
|
8
|
-
</script>
|
|
9
|
-
|
|
10
|
-
<button
|
|
11
|
-
{id}
|
|
12
|
-
class={`iroco-ui-button iroco-ui-button--${size} iroco-ui-button--${kind}`}
|
|
13
|
-
class:disabled
|
|
14
|
-
{type}
|
|
15
|
-
{disabled}
|
|
16
|
-
on:click
|
|
17
|
-
bind:this={ node }
|
|
18
|
-
>
|
|
19
|
-
<slot />
|
|
20
|
-
</button>
|
|
21
|
-
|
|
22
|
-
<style lang="scss">
|
|
23
|
-
@use '../scss/button';
|
|
24
|
-
</style>
|
package/src/DataTable.svelte
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
<script type="module" lang="ts">
|
|
2
|
-
import type { SvelteComponent } from 'svelte';
|
|
3
|
-
type TableCollumn = {
|
|
4
|
-
key: string;
|
|
5
|
-
title: string;
|
|
6
|
-
renderComponent?: {
|
|
7
|
-
component: SvelteComponent;
|
|
8
|
-
props?: any;
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
type TableRow = {
|
|
13
|
-
[key: string]: string | number;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export let rows: Array<TableRow>;
|
|
17
|
-
|
|
18
|
-
export let collumns: Array<TableCollumn>;
|
|
19
|
-
</script>
|
|
20
|
-
|
|
21
|
-
<table class="data-table">
|
|
22
|
-
<thead class="data-table__header">
|
|
23
|
-
<tr>
|
|
24
|
-
{#each collumns as collumn}
|
|
25
|
-
<th class="data-table__header__cell">
|
|
26
|
-
{collumn.title}
|
|
27
|
-
</th>
|
|
28
|
-
{/each}
|
|
29
|
-
</tr>
|
|
30
|
-
</thead>
|
|
31
|
-
|
|
32
|
-
<tbody class="data-table__body">
|
|
33
|
-
{#each rows as row}
|
|
34
|
-
<tr class="data-table__body__row">
|
|
35
|
-
{#each collumns as { key, renderComponent }}
|
|
36
|
-
<td class="data-table__body__cell">
|
|
37
|
-
{#if renderComponent}
|
|
38
|
-
<svelte:component
|
|
39
|
-
this={renderComponent.component}
|
|
40
|
-
on:click={() => renderComponent.props.onclick(row)}
|
|
41
|
-
/>
|
|
42
|
-
{:else}
|
|
43
|
-
{row[key]}
|
|
44
|
-
{/if}
|
|
45
|
-
</td>
|
|
46
|
-
{/each}
|
|
47
|
-
</tr>
|
|
48
|
-
{/each}
|
|
49
|
-
</tbody>
|
|
50
|
-
</table>
|
|
51
|
-
|
|
52
|
-
<style lang="scss">
|
|
53
|
-
@use '../scss/colors';
|
|
54
|
-
.data-table {
|
|
55
|
-
border: 1px solid colors.$mediumGrey;
|
|
56
|
-
width: 100%;
|
|
57
|
-
&__header {
|
|
58
|
-
font-size: 1.5em;
|
|
59
|
-
height: 4rem;
|
|
60
|
-
|
|
61
|
-
&__cell {
|
|
62
|
-
border-bottom: 1px solid colors.$mediumGrey;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
&__body {
|
|
66
|
-
&__cell {
|
|
67
|
-
text-align: center;
|
|
68
|
-
vertical-align: middle;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
</style>
|
package/src/Icon.svelte
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
// from https://github.com/the-pudding/svelte-starter/blob/master/src/components/helpers/Icon.svelte
|
|
3
|
-
import feather from "feather-icons"
|
|
4
|
-
export let name: string
|
|
5
|
-
export let stroke: string
|
|
6
|
-
export let strokeWidth: string
|
|
7
|
-
export let width = "1em"
|
|
8
|
-
export let height = "1em"
|
|
9
|
-
export let color = "white"
|
|
10
|
-
const icon = feather.icons[name]
|
|
11
|
-
$: if (icon) {
|
|
12
|
-
if (stroke) icon.attrs["stroke"] = stroke
|
|
13
|
-
if (strokeWidth) icon.attrs["stroke-width"] = strokeWidth
|
|
14
|
-
}
|
|
15
|
-
</script>
|
|
16
|
-
|
|
17
|
-
{#if icon}
|
|
18
|
-
<svg {...icon.attrs} style="width: {width}; height: {height}; color: {color};">
|
|
19
|
-
<g>
|
|
20
|
-
{@html icon.contents}
|
|
21
|
-
</g>
|
|
22
|
-
</svg>
|
|
23
|
-
{/if}
|
|
24
|
-
|
|
25
|
-
<style>
|
|
26
|
-
svg {
|
|
27
|
-
overflow: visible;
|
|
28
|
-
}
|
|
29
|
-
</style>
|
package/src/IconMastodon.svelte
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
export let width = '5em'
|
|
3
|
-
export let height = '5em'
|
|
4
|
-
export let fill = 'currentColor'
|
|
5
|
-
</script>
|
|
6
|
-
|
|
7
|
-
<svg {width} {height} role="img" viewBox="0 0 24 24" class="icon-mastodon" xmlns="http://www.w3.org/2000/svg">
|
|
8
|
-
<title>Mastodon</title>
|
|
9
|
-
<path
|
|
10
|
-
d="M23.193 7.88c0-5.207-3.411-6.733-3.411-6.733C18.062.357 15.108.025 12.041 0h-.076c-3.069.025-6.02.357-7.74 1.147 0 0-3.412 1.526-3.412 6.732 0 1.193-.023 2.619.015 4.13.124 5.092.934 10.11 5.641 11.355 2.17.574 4.034.695 5.536.612 2.722-.15 4.25-.972 4.25-.972l-.09-1.975s-1.945.613-4.13.54c-2.165-.075-4.449-.234-4.799-2.892a5.5 5.5 0 0 1-.048-.745s2.125.52 4.818.643c1.646.075 3.19-.097 4.758-.283 3.007-.359 5.625-2.212 5.954-3.905.517-2.665.475-6.508.475-6.508zm-4.024 6.709h-2.497v-6.12c0-1.29-.543-1.944-1.628-1.944-1.2 0-1.802.776-1.802 2.313v3.349h-2.484v-3.35c0-1.537-.602-2.313-1.802-2.313-1.085 0-1.628.655-1.628 1.945v6.119H4.831V8.285c0-1.29.328-2.314.987-3.07.68-.759 1.57-1.147 2.674-1.147 1.278 0 2.246.491 2.886 1.474L12 6.585l.622-1.043c.64-.983 1.608-1.474 2.886-1.474 1.104 0 1.994.388 2.674 1.146.658.757.986 1.781.986 3.07v6.305z"
|
|
11
|
-
{ fill }
|
|
12
|
-
/>
|
|
13
|
-
</svg>
|
package/src/IrocoLogo.svelte
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
export let width = '10rem';
|
|
3
|
-
export let height = '10rem';
|
|
4
|
-
</script>
|
|
5
|
-
|
|
6
|
-
<a class='iroco-logo' href="/">
|
|
7
|
-
<svg viewBox="0 0 832.33 249.52" width={width} height={height}>
|
|
8
|
-
<title>Iroco</title>
|
|
9
|
-
<path
|
|
10
|
-
fill="white"
|
|
11
|
-
d="M412,81.41c-7.34,0-12.07-5.19-12.07-12.37S404.77,56.66,412,56.66,424.17,61.85,424.17,69,419.13,81.41,412,81.41Zm10.7,118.4H401V103.54h21.7Z"
|
|
12
|
-
transform="translate(-0.44 -0.49)"
|
|
13
|
-
/>
|
|
14
|
-
<path
|
|
15
|
-
fill="white"
|
|
16
|
-
d="M505.77,123.71h-6.72c-18,0-27.2,8.26-27.2,28.43v47.67h-21.7V103.54h21.7v14.21h.3c5.5-9.32,15.44-15.28,28.43-15.28h5.19Z"
|
|
17
|
-
transform="translate(-0.44 -0.49)"
|
|
18
|
-
/>
|
|
19
|
-
<path
|
|
20
|
-
fill="white"
|
|
21
|
-
d="M566.44,201.34c-33,0-49.21-21.54-49.21-49.66S533.43,102,566.44,102s49.35,21.39,49.35,49.66C615.79,179.64,599.29,201.34,566.44,201.34Zm0-80.22c-19.26,0-27.51,12.68-27.51,30.56,0,17.72,8.4,30.56,27.66,30.56s27.5-12.68,27.5-30.56S585.69,121.12,566.44,121.12Z"
|
|
22
|
-
transform="translate(-0.44 -0.49)"
|
|
23
|
-
/>
|
|
24
|
-
<path
|
|
25
|
-
fill="white"
|
|
26
|
-
d="M721.23,186.52c-11.77,10.7-24.45,14.82-39.12,14.82-33.62,0-49.51-21.54-49.51-48.9,0-28.11,17.88-50.42,49.81-50.42,15.9,0,28,4.27,38.51,14.21L706.1,131.05c-6.88-6.72-14.21-9.93-23.53-9.93-18.8.15-28.27,13.9-28.27,31.32,0,16.66,8.1,29.8,28,29.8,9.17,0,16.35-2.9,24.3-10.54Z"
|
|
27
|
-
transform="translate(-0.44 -0.49)"
|
|
28
|
-
/>
|
|
29
|
-
<path
|
|
30
|
-
fill="white"
|
|
31
|
-
d="M783.42,201.34c-33,0-49.21-21.54-49.21-49.66S750.41,102,783.42,102s49.35,21.39,49.35,49.66C832.77,179.64,816.27,201.34,783.42,201.34Zm0-80.22c-19.26,0-27.51,12.68-27.51,30.56,0,17.72,8.41,30.56,27.66,30.56s27.5-12.68,27.5-30.56S802.67,121.12,783.42,121.12Z"
|
|
32
|
-
transform="translate(-0.44 -0.49)"
|
|
33
|
-
/>
|
|
34
|
-
<path
|
|
35
|
-
fill="white"
|
|
36
|
-
d="M122.8,144.26a30.6,30.6,0,0,0-8.07,1.23,5.53,5.53,0,0,0-3.46,3.53,28,28,0,0,0-.92,8.46v76.24a28,28,0,0,0,.92,8.46,5.53,5.53,0,0,0,3.46,3.53,30.18,30.18,0,0,0,8.07,1.23V250q-7.06-.45-19.52-.46-13.22,0-19.67.46v-3.07a30.33,30.33,0,0,0,8.07-1.23,5.49,5.49,0,0,0,3.45-3.53,27.59,27.59,0,0,0,.93-8.46V157.48a27.59,27.59,0,0,0-.93-8.46,5.49,5.49,0,0,0-3.45-3.53,30.75,30.75,0,0,0-8.07-1.23v-3.08q6.45.47,19.67.47,12.3,0,19.52-.47Z"
|
|
37
|
-
transform="translate(-0.44 -0.49)"
|
|
38
|
-
/>
|
|
39
|
-
<path
|
|
40
|
-
fill="#00D692"
|
|
41
|
-
d="M64.64,198.52a102.78,102.78,0,1,1,77.13,0l-7.41-18.29a83,83,0,1,0-62.31,0Z"
|
|
42
|
-
transform="translate(-0.44 -0.49)"
|
|
43
|
-
/>
|
|
44
|
-
</svg>
|
|
45
|
-
</a>
|
package/src/NavBar.svelte
DELETED
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import IconClose from './IconClose.svelte';
|
|
3
|
-
import type { NavigationItem } from 'definition';
|
|
4
|
-
import { createEventDispatcher } from 'svelte';
|
|
5
|
-
|
|
6
|
-
export let navigationItems: Array<NavigationItem>;
|
|
7
|
-
export let type: 'sidebar' | 'topbar';
|
|
8
|
-
|
|
9
|
-
let active: string;
|
|
10
|
-
const dispatch = createEventDispatcher();
|
|
11
|
-
|
|
12
|
-
const handleClickLink = (menuItem: NavigationItem) => {
|
|
13
|
-
active = menuItem.name;
|
|
14
|
-
if (typeof menuItem.hrefOrCallback === 'function') {
|
|
15
|
-
menuItem.hrefOrCallback();
|
|
16
|
-
return false; // to avoid calling href
|
|
17
|
-
}
|
|
18
|
-
dispatch('click_link');
|
|
19
|
-
};
|
|
20
|
-
</script>
|
|
21
|
-
|
|
22
|
-
<nav data-testid={type} class="nav__{type}">
|
|
23
|
-
<button on:click class="nav__{type}__close">
|
|
24
|
-
<IconClose width="3em" height="3em" />
|
|
25
|
-
</button>
|
|
26
|
-
|
|
27
|
-
<ul class="nav__{type}__item-container">
|
|
28
|
-
{#each navigationItems as item}
|
|
29
|
-
<li class="nav__{type}__item" class:active={active === item.name}>
|
|
30
|
-
<a
|
|
31
|
-
on:click={() => handleClickLink(item)}
|
|
32
|
-
href={typeof item.hrefOrCallback === 'string' ? item.hrefOrCallback : '#'}
|
|
33
|
-
class:iroco-ui-button={item.button}
|
|
34
|
-
class:iroco-ui-button--small={item.button}
|
|
35
|
-
class:iroco-ui-button--success={item.button}
|
|
36
|
-
>
|
|
37
|
-
{item.name}
|
|
38
|
-
</a>
|
|
39
|
-
</li>
|
|
40
|
-
{/each}
|
|
41
|
-
</ul>
|
|
42
|
-
</nav>
|
|
43
|
-
|
|
44
|
-
<style lang="scss">
|
|
45
|
-
@use '../scss/colors';
|
|
46
|
-
@use '../scss/constants';
|
|
47
|
-
@import '../scss/containers';
|
|
48
|
-
@import '../scss/button';
|
|
49
|
-
|
|
50
|
-
.nav {
|
|
51
|
-
&__sidebar,
|
|
52
|
-
&__topbar {
|
|
53
|
-
&__item {
|
|
54
|
-
text-decoration: none;
|
|
55
|
-
display: block;
|
|
56
|
-
font-size: 1em;
|
|
57
|
-
}
|
|
58
|
-
&__close {
|
|
59
|
-
display: none;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
&__sidebar {
|
|
64
|
-
height: 100%;
|
|
65
|
-
width: 300px;
|
|
66
|
-
position: absolute;
|
|
67
|
-
top: 4.45em;
|
|
68
|
-
left: 0;
|
|
69
|
-
overflow-x: hidden;
|
|
70
|
-
&__item-container {
|
|
71
|
-
margin: 0;
|
|
72
|
-
padding: 0;
|
|
73
|
-
width: 100%;
|
|
74
|
-
height: 100%;
|
|
75
|
-
}
|
|
76
|
-
&__item {
|
|
77
|
-
padding: 2em;
|
|
78
|
-
border-top: 1px solid colors.$mediumGrey;
|
|
79
|
-
}
|
|
80
|
-
&__item:first-child {
|
|
81
|
-
border-top: none;
|
|
82
|
-
}
|
|
83
|
-
.active {
|
|
84
|
-
border-top: 1px solid colors.$green;
|
|
85
|
-
border-bottom: 1px solid colors.$green;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
&__topbar {
|
|
90
|
-
flex-grow: 1;
|
|
91
|
-
display: flex;
|
|
92
|
-
justify-content: flex-end;
|
|
93
|
-
ul,
|
|
94
|
-
li {
|
|
95
|
-
display: inline;
|
|
96
|
-
}
|
|
97
|
-
ul {
|
|
98
|
-
display: flex;
|
|
99
|
-
flex-grow: 1;
|
|
100
|
-
justify-content: space-around;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
@include screen-tablet {
|
|
106
|
-
.nav {
|
|
107
|
-
&__sidebar,
|
|
108
|
-
&__topbar {
|
|
109
|
-
position: fixed;
|
|
110
|
-
background-color: colors.$darkBlue;
|
|
111
|
-
top: 0;
|
|
112
|
-
right: 0;
|
|
113
|
-
width: 100%;
|
|
114
|
-
padding: 0;
|
|
115
|
-
padding-top: 2em;
|
|
116
|
-
margin: 0;
|
|
117
|
-
border-right: none;
|
|
118
|
-
&__item-container {
|
|
119
|
-
padding: 0em;
|
|
120
|
-
margin-top: 2rem;
|
|
121
|
-
}
|
|
122
|
-
ul,
|
|
123
|
-
li {
|
|
124
|
-
display: block;
|
|
125
|
-
}
|
|
126
|
-
&__close {
|
|
127
|
-
display: block;
|
|
128
|
-
position: absolute;
|
|
129
|
-
right: 0;
|
|
130
|
-
top: 0;
|
|
131
|
-
background-color: transparent;
|
|
132
|
-
border: none;
|
|
133
|
-
color: colors.$darkBeige;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
&__sidebar {
|
|
138
|
-
top: 0;
|
|
139
|
-
left: 0;
|
|
140
|
-
&__item:first-child {
|
|
141
|
-
border-top: 1px solid colors.$mediumGrey;
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
&__topbar {
|
|
146
|
-
height: 100%;
|
|
147
|
-
&__item {
|
|
148
|
-
padding: 2em;
|
|
149
|
-
border-top: 1px solid colors.$mediumGrey;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
</style>
|
package/src/Navigation.svelte
DELETED
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type { NavigationItem } from './definition';
|
|
3
|
-
import IconBurger from './IconBurger.svelte';
|
|
4
|
-
import IconIrocoLogo from './IconIrocoLogo.svelte';
|
|
5
|
-
import IrocoLogo from './IrocoLogo.svelte';
|
|
6
|
-
import NavBar from './NavBar.svelte';
|
|
7
|
-
|
|
8
|
-
export let navigationItems: Array<NavigationItem>;
|
|
9
|
-
export let type: 'sidebar' | 'topbar' = "topbar";
|
|
10
|
-
export let title: string | null = null;
|
|
11
|
-
|
|
12
|
-
let showMenu = false;
|
|
13
|
-
|
|
14
|
-
</script>
|
|
15
|
-
|
|
16
|
-
<div class="navigation--mobile">
|
|
17
|
-
<div class="navigation--mobile__title-container">
|
|
18
|
-
{#if title == null}
|
|
19
|
-
<IrocoLogo width="10em" height="10em"/>
|
|
20
|
-
{:else}
|
|
21
|
-
<IconIrocoLogo width="3em" height="3em" />
|
|
22
|
-
<h1>{title}</h1>
|
|
23
|
-
{/if}
|
|
24
|
-
</div>
|
|
25
|
-
|
|
26
|
-
<button on:click={() => (showMenu = true)} class="navigation--mobile__button">
|
|
27
|
-
<IconBurger width="3em" height="3em" />
|
|
28
|
-
</button>
|
|
29
|
-
|
|
30
|
-
{#if showMenu}
|
|
31
|
-
<NavBar
|
|
32
|
-
on:click_link={() => (showMenu = false)}
|
|
33
|
-
on:click={() => (showMenu = false)}
|
|
34
|
-
{ type }
|
|
35
|
-
{ navigationItems }
|
|
36
|
-
/>
|
|
37
|
-
{/if}
|
|
38
|
-
</div>
|
|
39
|
-
|
|
40
|
-
<div class="navigation">
|
|
41
|
-
<div class="navigation__title-container">
|
|
42
|
-
{#if title == null}
|
|
43
|
-
<IrocoLogo width="10em" height="10em"/>
|
|
44
|
-
{:else}
|
|
45
|
-
<IconIrocoLogo width="3em" height="3em" />
|
|
46
|
-
<h1>{title}</h1>
|
|
47
|
-
{/if}
|
|
48
|
-
</div>
|
|
49
|
-
<NavBar {navigationItems} { type } />
|
|
50
|
-
</div>
|
|
51
|
-
|
|
52
|
-
<style lang="scss">
|
|
53
|
-
@use '../scss/colors';
|
|
54
|
-
@import '../scss/containers';
|
|
55
|
-
.navigation {
|
|
56
|
-
display: flex;
|
|
57
|
-
flex-direction: row;
|
|
58
|
-
justify-content: space-between;
|
|
59
|
-
align-items: center;
|
|
60
|
-
width: 100%;
|
|
61
|
-
&--mobile {
|
|
62
|
-
display: none;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
&__title-container {
|
|
66
|
-
display: flex;
|
|
67
|
-
align-items: center;
|
|
68
|
-
padding-left: 1em;
|
|
69
|
-
h1 {
|
|
70
|
-
padding-left: 1em;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
@include screen-tablet {
|
|
76
|
-
.navigation {
|
|
77
|
-
display: none;
|
|
78
|
-
color: colors.$beige;
|
|
79
|
-
&--mobile {
|
|
80
|
-
display: flex;
|
|
81
|
-
padding: 0 1em;
|
|
82
|
-
justify-content: space-between;
|
|
83
|
-
position: fixed;
|
|
84
|
-
top: 0;
|
|
85
|
-
z-index: 1;
|
|
86
|
-
width: 100%;
|
|
87
|
-
border-bottom: 1px solid colors.$mediumGrey;
|
|
88
|
-
|
|
89
|
-
h1 {
|
|
90
|
-
font-size: 2em;
|
|
91
|
-
}
|
|
92
|
-
&__button {
|
|
93
|
-
background-color: transparent;
|
|
94
|
-
border: none;
|
|
95
|
-
color: colors.$mediumGrey;
|
|
96
|
-
}
|
|
97
|
-
&__title-container {
|
|
98
|
-
display: flex;
|
|
99
|
-
align-items: center;
|
|
100
|
-
h1 {
|
|
101
|
-
padding-left: 0.5em;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
</style>
|
package/src/NumberInput.svelte
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
export let id: string;
|
|
3
|
-
export let label: string | ''
|
|
4
|
-
export let placeholder: string | ''
|
|
5
|
-
export let error: string | null = null;
|
|
6
|
-
export let value: number | null = null;
|
|
7
|
-
export let min: number | undefined
|
|
8
|
-
export let max: number | undefined
|
|
9
|
-
</script>
|
|
10
|
-
|
|
11
|
-
<div class="iroco-ui-input">
|
|
12
|
-
{#if label}
|
|
13
|
-
<label class="iroco-ui-label" for={id}>{label}</label>
|
|
14
|
-
{/if}
|
|
15
|
-
<input on:change bind:value id={id} type="number" {placeholder} {min} {max} {...$$restProps}/>
|
|
16
|
-
{#if error}
|
|
17
|
-
<p data-testid="error" class="error">{error}</p>
|
|
18
|
-
{/if}
|
|
19
|
-
</div>
|
|
20
|
-
|
|
21
|
-
<style lang="scss">
|
|
22
|
-
@use "../scss/forms";
|
|
23
|
-
</style>
|
package/src/RadioButton.svelte
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
export const label = '';
|
|
3
|
-
export let value: string | null;
|
|
4
|
-
export let group: string | null = null;
|
|
5
|
-
export let name: string | null;
|
|
6
|
-
export let checked: boolean;
|
|
7
|
-
|
|
8
|
-
function onChange(event: Event) {
|
|
9
|
-
group = (<HTMLInputElement>event.target).value;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
$: checked = (group === value)
|
|
13
|
-
|
|
14
|
-
</script>
|
|
15
|
-
|
|
16
|
-
<label class="iroco-ui-radio">
|
|
17
|
-
<input type="radio" bind:group={ group } value={ value } name={ name } on:change="{ onChange }" { checked }/>
|
|
18
|
-
<span class="radio-button-color"></span>
|
|
19
|
-
<slot/>
|
|
20
|
-
</label>
|
|
21
|
-
|
|
22
|
-
<style lang="scss">
|
|
23
|
-
@use "../scss/colors";
|
|
24
|
-
|
|
25
|
-
.iroco-ui-radio {
|
|
26
|
-
color: colors.$beige;
|
|
27
|
-
position: relative;
|
|
28
|
-
margin-top: 0.5em;
|
|
29
|
-
padding-left: 1.5em;
|
|
30
|
-
cursor: pointer;
|
|
31
|
-
-webkit-user-select: none;
|
|
32
|
-
-moz-user-select: none;
|
|
33
|
-
-ms-user-select: none;
|
|
34
|
-
user-select: none;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.iroco-ui-radio input {
|
|
38
|
-
position: absolute;
|
|
39
|
-
opacity: 0;
|
|
40
|
-
cursor: pointer;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.radio-button-color {
|
|
44
|
-
position: absolute;
|
|
45
|
-
top: 0;
|
|
46
|
-
left: 0;
|
|
47
|
-
height: 1em;
|
|
48
|
-
width: 1em;
|
|
49
|
-
background-color: colors.$beige;
|
|
50
|
-
border-radius: 50%;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.iroco-ui-radio input:checked ~ .radio-button-color {
|
|
54
|
-
background-color: colors.$green;
|
|
55
|
-
}
|
|
56
|
-
</style>
|