@iroco/ui 1.0.0-1 → 1.0.0-3
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/README.md +53 -0
- package/dist/Alert.svelte +1 -1
- package/dist/Button.stories.svelte +2 -5
- package/dist/Button.svelte +4 -1
- package/dist/IconIrocoLogo.svelte +14 -10
- package/dist/IconIrocoLogo.svelte.d.ts +2 -0
- package/dist/IrocoLogo.svelte +3 -7
- package/dist/IrocoLogo.svelte.d.ts +2 -2
- package/dist/NavBar.svelte +4 -1
- package/dist/Navigation.stories.svelte +49 -0
- package/dist/Navigation.stories.svelte.d.ts +59 -0
- package/dist/Navigation.svelte +16 -10
- package/dist/Navigation.svelte.d.ts +1 -0
- package/dist/NumberInput.svelte +1 -1
- package/dist/TextInput.svelte +1 -1
- package/dist/scss/button.scss +18 -8
- package/dist/scss/check.scss +1 -0
- package/dist/scss/colors.scss +47 -0
- package/dist/scss/fields/_input.scss +10 -13
- package/dist/scss/forms.scss +2 -2
- package/dist/scss/iroco.scss +3 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -6,6 +6,59 @@ Design system for Iroco [based on SvelteKit](https://kit.svelte.dev/docs/packagi
|
|
|
6
6
|
|
|
7
7
|
See the [Documentation](https://iroco-co.github.io/iroco-ui/) (not in sync anymore : to be restored with storybook)
|
|
8
8
|
|
|
9
|
+
# Install in your svelte application
|
|
10
|
+
|
|
11
|
+
Prerequisites:
|
|
12
|
+
|
|
13
|
+
- @sveltejs/kit: ^2.5.0
|
|
14
|
+
- svelte: ^4.2.10
|
|
15
|
+
|
|
16
|
+
```sh
|
|
17
|
+
# latest
|
|
18
|
+
npm install @iroco/ui
|
|
19
|
+
# next
|
|
20
|
+
npm install @iroco/ui@next
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Minimal scaffolding
|
|
24
|
+
|
|
25
|
+
`src/app.scss`
|
|
26
|
+
|
|
27
|
+
```scss
|
|
28
|
+
@use 'node_modules/@iroco/ui/dist/scss/colors';
|
|
29
|
+
@use 'node_modules/@iroco/ui/dist/scss/fonts';
|
|
30
|
+
@use 'node_modules/@iroco/ui/dist/scss/style';
|
|
31
|
+
@use 'node_modules/@iroco/ui/dist/scss/constants';
|
|
32
|
+
@import 'node_modules/@iroco/ui/dist/scss/containers';
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Example of layout with navigation
|
|
36
|
+
|
|
37
|
+
`src/routes/+layout.svelte`
|
|
38
|
+
|
|
39
|
+
```svelte
|
|
40
|
+
<script>
|
|
41
|
+
import '../app.scss';
|
|
42
|
+
import { Navigation, NavigationItem } from '@iroco/ui';
|
|
43
|
+
</script>
|
|
44
|
+
|
|
45
|
+
<Navigation
|
|
46
|
+
navigationItems={[new NavigationItem("About", "/about"),]}
|
|
47
|
+
type="topbar"
|
|
48
|
+
/>
|
|
49
|
+
<main class="main">
|
|
50
|
+
<slot />
|
|
51
|
+
</main>
|
|
52
|
+
|
|
53
|
+
<style lang="scss">
|
|
54
|
+
@use "node_modules/@iroco/ui/dist/scss/colors.scss";
|
|
55
|
+
@use "node_modules/@iroco/ui/dist/scss/constants.scss";
|
|
56
|
+
@import "node_modules/@iroco/ui/dist/scss/containers.scss";
|
|
57
|
+
@import "node_modules/@iroco/ui/dist/scss/button.scss";
|
|
58
|
+
</style>
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
|
|
9
62
|
# develop
|
|
10
63
|
|
|
11
64
|
To install dependencies :
|
package/dist/Alert.svelte
CHANGED
|
@@ -34,9 +34,6 @@
|
|
|
34
34
|
</Button>
|
|
35
35
|
</Template>
|
|
36
36
|
|
|
37
|
+
<Story name="Default"></Story>
|
|
38
|
+
<Story name="Success" args={{ kind: 'success' }} />
|
|
37
39
|
<Story name="Danger" args={{ kind: 'danger' }} />
|
|
38
|
-
|
|
39
|
-
<!-- Dynamic snippet should be disabled for this story -->
|
|
40
|
-
<Story name="Button No Args">
|
|
41
|
-
<Button>Label</Button>
|
|
42
|
-
</Story>
|
package/dist/Button.svelte
CHANGED
|
@@ -237,6 +237,7 @@ export let node;
|
|
|
237
237
|
border-radius: 0.3em;
|
|
238
238
|
}
|
|
239
239
|
.iroco-ui-button--basic {
|
|
240
|
+
color: #18151e;
|
|
240
241
|
background: #f2ebe3;
|
|
241
242
|
border: 1px solid #18151e;
|
|
242
243
|
}
|
|
@@ -267,7 +268,9 @@ export let node;
|
|
|
267
268
|
box-shadow: none;
|
|
268
269
|
}
|
|
269
270
|
.iroco-ui-button.disabled {
|
|
270
|
-
background-color: #
|
|
271
|
+
background-color: #a9a29e;
|
|
272
|
+
color: #33323a;
|
|
273
|
+
border-color: #464452;
|
|
271
274
|
cursor: default;
|
|
272
275
|
}
|
|
273
276
|
.iroco-ui-button.disabled:hover {
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
<script>import { Color } from "./definition";
|
|
2
|
+
export let href = "/";
|
|
3
|
+
export let ariaLabel = "go to Iroco home";
|
|
2
4
|
export let width = "5rem";
|
|
3
5
|
export let height = "5rem";
|
|
4
6
|
export let color = Color.green;
|
|
5
7
|
</script>
|
|
6
8
|
|
|
7
|
-
<
|
|
8
|
-
<
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
<a class="iroco-logo" {href} aria-label={ariaLabel}>
|
|
10
|
+
<svg {width} {height} viewBox="0 0 54 53" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
11
|
+
<path
|
|
12
|
+
d="M30.009 29.9999C29.3241 30.0677 28.7761 30.1355 28.4336 30.2033C28.0912 30.3389 27.8857 30.5423 27.7487 30.8812C27.6117 31.2202 27.5432 31.7626 27.5432 32.5084V47.1524C27.5432 47.8982 27.6117 48.4406 27.7487 48.7795C27.8857 49.1185 28.0912 49.3219 28.4336 49.4575C28.7761 49.5931 29.2556 49.6609 30.009 49.6609V50.2711C29.1186 50.2033 27.8172 50.2033 26.2419 50.2033C24.5295 50.2033 23.2282 50.2033 22.4062 50.2711V49.7965C23.0912 49.7287 23.6391 49.6609 23.9816 49.5931C24.3241 49.4575 24.5295 49.2541 24.6665 48.9151C24.8035 48.5762 24.872 48.0338 24.872 47.288V32.5762C24.872 31.8304 24.8035 31.288 24.6665 30.949C24.5295 30.6101 24.3241 30.4067 23.9816 30.2711C23.6391 30.1355 23.1597 30.0677 22.4062 30.0677V29.4575C23.2282 29.5253 24.5295 29.5253 26.2419 29.5253C27.8172 29.5253 29.1186 29.5253 30.009 29.4575V29.9999Z"
|
|
13
|
+
fill="white"
|
|
14
|
+
/>
|
|
15
|
+
<path
|
|
16
|
+
d="M18.7079 40.4406C11.1737 37.3897 6.24219 30.2033 6.24219 22.1355C6.24219 11.2202 15.2148 2.33887 26.2422 2.33887C37.2696 2.33887 46.2422 11.2202 46.2422 22.1355C46.2422 30.2033 41.3107 37.4575 33.7764 40.4406L32.2696 36.9151C38.3655 34.4745 42.3381 28.6439 42.3381 22.0677C42.3381 13.2541 35.0778 6.06768 26.1737 6.06768C17.2696 6.06768 10.0093 13.2541 10.0093 22.0677C10.0093 28.5762 13.9819 34.4067 20.0778 36.9151L18.7079 40.4406Z"
|
|
17
|
+
fill={color}
|
|
18
|
+
/>
|
|
19
|
+
</svg>
|
|
20
|
+
</a>
|
|
@@ -2,6 +2,8 @@ import { SvelteComponent } from "svelte";
|
|
|
2
2
|
import { Color } from './definition';
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
|
+
href?: string | undefined;
|
|
6
|
+
ariaLabel?: string | undefined;
|
|
5
7
|
width?: string | undefined;
|
|
6
8
|
height?: string | undefined;
|
|
7
9
|
color?: Color | undefined;
|
package/dist/IrocoLogo.svelte
CHANGED
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
|
|
1
|
+
<script>export let href = `/`;
|
|
2
|
+
export let ariaLabel = "go to Iroco home";
|
|
3
3
|
export let width = "10rem";
|
|
4
4
|
export let height = "10rem";
|
|
5
|
-
const dispatch = createEventDispatcher();
|
|
6
|
-
function clickOnLogo() {
|
|
7
|
-
dispatch("click_logo");
|
|
8
|
-
}
|
|
9
5
|
</script>
|
|
10
6
|
|
|
11
|
-
<a class="iroco-logo" href
|
|
7
|
+
<a class="iroco-logo" {href} aria-label={ariaLabel}>
|
|
12
8
|
<svg viewBox="0 0 832.33 249.52" role="img" {width} {height}>
|
|
13
9
|
<title>Iroco Logo</title>
|
|
14
10
|
<path
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
2
|
declare const __propDef: {
|
|
3
3
|
props: {
|
|
4
|
+
href?: string | undefined;
|
|
5
|
+
ariaLabel?: string | undefined;
|
|
4
6
|
width?: string | undefined;
|
|
5
7
|
height?: string | undefined;
|
|
6
8
|
};
|
|
7
9
|
events: {
|
|
8
|
-
click_logo: CustomEvent<any>;
|
|
9
|
-
} & {
|
|
10
10
|
[evt: string]: CustomEvent<any>;
|
|
11
11
|
};
|
|
12
12
|
slots: {};
|
package/dist/NavBar.svelte
CHANGED
|
@@ -523,6 +523,7 @@ $:
|
|
|
523
523
|
}
|
|
524
524
|
|
|
525
525
|
.iroco-ui-button--basic {
|
|
526
|
+
color: #18151e;
|
|
526
527
|
background: #f2ebe3;
|
|
527
528
|
border: 1px solid #18151e;
|
|
528
529
|
}
|
|
@@ -562,7 +563,9 @@ $:
|
|
|
562
563
|
}
|
|
563
564
|
|
|
564
565
|
.iroco-ui-button.disabled {
|
|
565
|
-
background-color: #
|
|
566
|
+
background-color: #a9a29e;
|
|
567
|
+
color: #33323a;
|
|
568
|
+
border-color: #464452;
|
|
566
569
|
cursor: default;
|
|
567
570
|
}
|
|
568
571
|
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<script context="module">
|
|
2
|
+
import Navigation from './Navigation.svelte';
|
|
3
|
+
import { NavigationItem, NavigationItemType } from './definition';
|
|
4
|
+
|
|
5
|
+
export const meta = {
|
|
6
|
+
title: 'Navigation',
|
|
7
|
+
component: Navigation,
|
|
8
|
+
argTypes: {
|
|
9
|
+
type: {
|
|
10
|
+
control: { type: 'select' },
|
|
11
|
+
options: ['sidebar', 'topbar']
|
|
12
|
+
},
|
|
13
|
+
title: {
|
|
14
|
+
control: { type: 'text' }
|
|
15
|
+
},
|
|
16
|
+
version: {
|
|
17
|
+
control: { type: 'text' }
|
|
18
|
+
},
|
|
19
|
+
color: {
|
|
20
|
+
control: { type: 'color' }
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<script>
|
|
28
|
+
import { Story, Template } from '@storybook/addon-svelte-csf';
|
|
29
|
+
</script>
|
|
30
|
+
|
|
31
|
+
<Template let:args>
|
|
32
|
+
<Navigation {...args}
|
|
33
|
+
navigationItems={[
|
|
34
|
+
new NavigationItem('About', `/about`),
|
|
35
|
+
new NavigationItem('Foo', `/foo`),
|
|
36
|
+
new NavigationItem('Bar', `/bar`),
|
|
37
|
+
new NavigationItem('Button', `/bar`, NavigationItemType.BUTTON),
|
|
38
|
+
new NavigationItem('Anchor', `/bar`, NavigationItemType.ANCHOR),
|
|
39
|
+
new NavigationItem('Form', `/bar`, NavigationItemType.FORM)
|
|
40
|
+
]}>
|
|
41
|
+
|
|
42
|
+
</Navigation>
|
|
43
|
+
</Template>
|
|
44
|
+
|
|
45
|
+
<Story name="Default" />
|
|
46
|
+
<Story name="Sidebar" args={{ type: 'sidebar' }} />
|
|
47
|
+
|
|
48
|
+
<Story name="Title" args={{ title: 'Alternative title' }}></Story>
|
|
49
|
+
<Story name="Color" args={{ color: '#ABCDEF' }}></Story>
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
export namespace meta {
|
|
2
|
+
export let title: string;
|
|
3
|
+
export { Navigation as component };
|
|
4
|
+
export namespace argTypes {
|
|
5
|
+
export namespace type {
|
|
6
|
+
namespace control {
|
|
7
|
+
let type_1: string;
|
|
8
|
+
export { type_1 as type };
|
|
9
|
+
}
|
|
10
|
+
let options: string[];
|
|
11
|
+
}
|
|
12
|
+
export namespace title_1 {
|
|
13
|
+
export namespace control_1 {
|
|
14
|
+
let type_2: string;
|
|
15
|
+
export { type_2 as type };
|
|
16
|
+
}
|
|
17
|
+
export { control_1 as control };
|
|
18
|
+
}
|
|
19
|
+
export { title_1 as title };
|
|
20
|
+
export namespace version {
|
|
21
|
+
export namespace control_2 {
|
|
22
|
+
let type_3: string;
|
|
23
|
+
export { type_3 as type };
|
|
24
|
+
}
|
|
25
|
+
export { control_2 as control };
|
|
26
|
+
}
|
|
27
|
+
export namespace color {
|
|
28
|
+
export namespace control_3 {
|
|
29
|
+
let type_4: string;
|
|
30
|
+
export { type_4 as type };
|
|
31
|
+
}
|
|
32
|
+
export { control_3 as control };
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
/** @typedef {typeof __propDef.props} NavigationProps */
|
|
37
|
+
/** @typedef {typeof __propDef.events} NavigationEvents */
|
|
38
|
+
/** @typedef {typeof __propDef.slots} NavigationSlots */
|
|
39
|
+
export default class Navigation extends SvelteComponent<{
|
|
40
|
+
[x: string]: never;
|
|
41
|
+
}, {
|
|
42
|
+
[evt: string]: CustomEvent<any>;
|
|
43
|
+
}, {}> {
|
|
44
|
+
}
|
|
45
|
+
export type NavigationProps = typeof __propDef.props;
|
|
46
|
+
export type NavigationEvents = typeof __propDef.events;
|
|
47
|
+
export type NavigationSlots = typeof __propDef.slots;
|
|
48
|
+
import Navigation from './Navigation.svelte';
|
|
49
|
+
import { SvelteComponent } from "svelte";
|
|
50
|
+
declare const __propDef: {
|
|
51
|
+
props: {
|
|
52
|
+
[x: string]: never;
|
|
53
|
+
};
|
|
54
|
+
events: {
|
|
55
|
+
[evt: string]: CustomEvent<any>;
|
|
56
|
+
};
|
|
57
|
+
slots: {};
|
|
58
|
+
};
|
|
59
|
+
export {};
|
package/dist/Navigation.svelte
CHANGED
|
@@ -3,6 +3,8 @@ import IconIrocoLogo from "./IconIrocoLogo.svelte";
|
|
|
3
3
|
import IrocoLogo from "./IrocoLogo.svelte";
|
|
4
4
|
import NavBar from "./NavBar.svelte";
|
|
5
5
|
import { Color } from "./definition";
|
|
6
|
+
import { base } from "$app/paths";
|
|
7
|
+
export let href = `${base}/`;
|
|
6
8
|
export let navigationItems;
|
|
7
9
|
export let type = "topbar";
|
|
8
10
|
export let title = null;
|
|
@@ -13,12 +15,12 @@ let showMenu = false;
|
|
|
13
15
|
|
|
14
16
|
<div class="navigation--mobile">
|
|
15
17
|
<div class="navigation--mobile__title-container">
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
{#if title == null}
|
|
19
|
+
<IrocoLogo {href} width="10em" height="10em" />
|
|
20
|
+
{:else}
|
|
21
|
+
<IconIrocoLogo {href} width="3em" height="3em" {color} />
|
|
22
|
+
<h1><a {href} class="navigation-mobile__title-link">{title}</a></h1>
|
|
23
|
+
{/if}
|
|
22
24
|
</div>
|
|
23
25
|
|
|
24
26
|
<button title="Menu button" on:click={() => (showMenu = true)} class="navigation--mobile__button">
|
|
@@ -39,10 +41,10 @@ let showMenu = false;
|
|
|
39
41
|
<div class="navigation">
|
|
40
42
|
<div class="navigation__title-container">
|
|
41
43
|
{#if title == null}
|
|
42
|
-
<IrocoLogo width="10em" height="10em" />
|
|
44
|
+
<IrocoLogo {href} width="10em" height="10em" />
|
|
43
45
|
{:else}
|
|
44
|
-
<IconIrocoLogo width="3em" height="3em" />
|
|
45
|
-
<h1>{title}</h1>
|
|
46
|
+
<IconIrocoLogo {href} width="3em" height="3em" />
|
|
47
|
+
<h1><a class="navigation__title-link" {href}>{title}</a></h1>
|
|
46
48
|
{/if}
|
|
47
49
|
</div>
|
|
48
50
|
<NavBar {navigationItems} {type} {version} />
|
|
@@ -317,7 +319,7 @@ let showMenu = false;
|
|
|
317
319
|
.navigation--mobile__button {
|
|
318
320
|
background-color: transparent;
|
|
319
321
|
border: none;
|
|
320
|
-
color: #
|
|
322
|
+
color: #a9a29e;
|
|
321
323
|
}
|
|
322
324
|
.navigation--mobile__title-container {
|
|
323
325
|
display: flex;
|
|
@@ -326,4 +328,8 @@ let showMenu = false;
|
|
|
326
328
|
.navigation--mobile__title-container h1 {
|
|
327
329
|
padding-left: 0.5em;
|
|
328
330
|
}
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
.navigation__title-link, .navigation-mobile__title-link {
|
|
334
|
+
color: #ffffff;
|
|
329
335
|
}</style>
|
|
@@ -3,6 +3,7 @@ import type { NavigationItem } from './definition';
|
|
|
3
3
|
import { Color } from './definition';
|
|
4
4
|
declare const __propDef: {
|
|
5
5
|
props: {
|
|
6
|
+
href?: string | undefined;
|
|
6
7
|
navigationItems: Array<NavigationItem>;
|
|
7
8
|
type?: "sidebar" | "topbar" | undefined;
|
|
8
9
|
title?: string | null | undefined;
|
package/dist/NumberInput.svelte
CHANGED
package/dist/TextInput.svelte
CHANGED
package/dist/scss/button.scss
CHANGED
|
@@ -19,23 +19,29 @@
|
|
|
19
19
|
border-radius: constants.$border-radius;
|
|
20
20
|
|
|
21
21
|
&--basic {
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
color: colors.$buttonSecondaryLabel;
|
|
23
|
+
background: colors.$buttonSecondaryBackground;
|
|
24
|
+
border: 1px solid colors.$buttonSecondaryBorder;
|
|
24
25
|
}
|
|
26
|
+
|
|
25
27
|
&--dark {
|
|
26
|
-
background: colors.$
|
|
27
|
-
color: colors.$
|
|
28
|
+
background: colors.$buttonPrimaryBackgroundDark;
|
|
29
|
+
color: colors.$buttonPrimaryLabelDark;
|
|
28
30
|
}
|
|
31
|
+
|
|
29
32
|
&--success {
|
|
30
|
-
background: colors.$
|
|
33
|
+
background: colors.$success;
|
|
31
34
|
color: colors.$nightBlue;
|
|
32
35
|
}
|
|
36
|
+
|
|
33
37
|
&--danger {
|
|
34
|
-
background: colors.$
|
|
38
|
+
background: colors.$danger;
|
|
35
39
|
}
|
|
40
|
+
|
|
36
41
|
&--regular {
|
|
37
42
|
padding: 1em 2em;
|
|
38
43
|
}
|
|
44
|
+
|
|
39
45
|
&--small {
|
|
40
46
|
padding: 0.5em 1em;
|
|
41
47
|
}
|
|
@@ -45,6 +51,7 @@
|
|
|
45
51
|
&--danger:hover {
|
|
46
52
|
box-shadow: inset 0 0 0 10em rgba(0, 0, 0, 0.2);
|
|
47
53
|
}
|
|
54
|
+
|
|
48
55
|
&--dark:hover {
|
|
49
56
|
box-shadow: inset 0 0 0 10em rgba(255, 255, 255, 0.2);
|
|
50
57
|
}
|
|
@@ -54,8 +61,11 @@
|
|
|
54
61
|
}
|
|
55
62
|
|
|
56
63
|
&.disabled {
|
|
57
|
-
background-color: colors.$
|
|
64
|
+
background-color: colors.$buttonDisabledBackground;
|
|
65
|
+
color: colors.$buttonDisabledLabel;
|
|
66
|
+
border-color: colors.$buttonDisabledBorder;
|
|
58
67
|
cursor: default;
|
|
68
|
+
|
|
59
69
|
&:hover {
|
|
60
70
|
box-shadow: none;
|
|
61
71
|
}
|
|
@@ -66,6 +76,6 @@
|
|
|
66
76
|
background: none;
|
|
67
77
|
border: none;
|
|
68
78
|
font-family: fonts.$arial;
|
|
69
|
-
color: colors.$
|
|
79
|
+
color: colors.$text;
|
|
70
80
|
cursor: pointer;
|
|
71
81
|
}
|
package/dist/scss/check.scss
CHANGED
package/dist/scss/colors.scss
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
// Declarative colors
|
|
2
|
+
|
|
1
3
|
$blue: #00b9ff;
|
|
2
4
|
$darkBlue: #211d28;
|
|
3
5
|
$nightBlue: #18151e;
|
|
4
6
|
$green: #00d692;
|
|
5
7
|
$red: #ff504d;
|
|
6
8
|
$yellow: #ffe032;
|
|
9
|
+
$white: #ffffff;
|
|
7
10
|
$beige: #f2ebe3;
|
|
8
11
|
$darkBeige: #a9a29e;
|
|
9
12
|
$mediumGrey: #464452;
|
|
@@ -13,33 +16,77 @@ $lightGrey: #f5f5f5;
|
|
|
13
16
|
.font-color-blue {
|
|
14
17
|
color: $blue;
|
|
15
18
|
}
|
|
19
|
+
|
|
16
20
|
.font-color-darkBlue {
|
|
17
21
|
color: $darkBlue;
|
|
18
22
|
}
|
|
23
|
+
|
|
19
24
|
.font-color-nightBlue {
|
|
20
25
|
color: $nightBlue;
|
|
21
26
|
}
|
|
27
|
+
|
|
22
28
|
.font-color-green {
|
|
23
29
|
color: $green;
|
|
24
30
|
}
|
|
31
|
+
|
|
25
32
|
.font-color-red {
|
|
26
33
|
color: $red;
|
|
27
34
|
}
|
|
35
|
+
|
|
28
36
|
.font-color-yellow {
|
|
29
37
|
color: $yellow;
|
|
30
38
|
}
|
|
39
|
+
|
|
31
40
|
.font-color-beige {
|
|
32
41
|
color: $beige;
|
|
33
42
|
}
|
|
43
|
+
|
|
34
44
|
.font-color-darkBeige {
|
|
35
45
|
color: $darkBeige;
|
|
36
46
|
}
|
|
47
|
+
|
|
37
48
|
.font-color-mediumGrey {
|
|
38
49
|
color: $mediumGrey;
|
|
39
50
|
}
|
|
51
|
+
|
|
40
52
|
.font-color-darkGrey {
|
|
41
53
|
color: $darkGrey;
|
|
42
54
|
}
|
|
55
|
+
|
|
43
56
|
.font-color-lightGrey {
|
|
44
57
|
color: $lightGrey;
|
|
45
58
|
}
|
|
59
|
+
|
|
60
|
+
// Semantic colors
|
|
61
|
+
|
|
62
|
+
$primary: $green;
|
|
63
|
+
|
|
64
|
+
$success: $green;
|
|
65
|
+
$danger: $red;
|
|
66
|
+
$warning: $yellow;
|
|
67
|
+
|
|
68
|
+
$background: $darkBlue;
|
|
69
|
+
$text: $beige;
|
|
70
|
+
$textLight: $white;
|
|
71
|
+
|
|
72
|
+
$iconPrimary: $darkBeige;
|
|
73
|
+
$border: $mediumGrey;
|
|
74
|
+
|
|
75
|
+
$formElementBackground: $beige;
|
|
76
|
+
$formElementBorder: $beige;
|
|
77
|
+
$formTextPlaceholder: $beige;
|
|
78
|
+
|
|
79
|
+
$buttonPrimaryLabel: $beige;
|
|
80
|
+
$buttonPrimaryBackground: $primary;
|
|
81
|
+
$buttonPrimaryBorder: $nightBlue;
|
|
82
|
+
|
|
83
|
+
$buttonPrimaryBackgroundDark: $nightBlue;
|
|
84
|
+
$buttonPrimaryLabelDark: $beige;
|
|
85
|
+
|
|
86
|
+
$buttonSecondaryLabel: $nightBlue;
|
|
87
|
+
$buttonSecondaryBackground: $beige;
|
|
88
|
+
$buttonSecondaryBorder: $nightBlue;
|
|
89
|
+
|
|
90
|
+
$buttonDisabledLabel: $darkGrey;
|
|
91
|
+
$buttonDisabledBackground: $darkBeige;
|
|
92
|
+
$buttonDisabledBorder: $mediumGrey;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
@use './../colors';
|
|
1
2
|
.ui-fields-input {
|
|
2
3
|
width: 100%;
|
|
3
4
|
transition: width linear 100ms;
|
|
@@ -36,7 +37,7 @@
|
|
|
36
37
|
left: 0;
|
|
37
38
|
width: 0;
|
|
38
39
|
height: 3px;
|
|
39
|
-
background:
|
|
40
|
+
background: colors.$green;
|
|
40
41
|
transition: all 400ms cubic-bezier(0.215, 0.61, 0.355, 1);
|
|
41
42
|
}
|
|
42
43
|
|
|
@@ -45,7 +46,7 @@
|
|
|
45
46
|
}
|
|
46
47
|
|
|
47
48
|
> input {
|
|
48
|
-
@include Arial(1em,
|
|
49
|
+
@include Arial(1em, colors.$darkBlue);
|
|
49
50
|
flex: 1;
|
|
50
51
|
padding: 10px 15px;
|
|
51
52
|
text-overflow: ellipsis;
|
|
@@ -53,7 +54,7 @@
|
|
|
53
54
|
overflow: hidden;
|
|
54
55
|
|
|
55
56
|
&::placeholder {
|
|
56
|
-
color: rgba(
|
|
57
|
+
color: rgba(colors.$darkBlue, 0.3);
|
|
57
58
|
font-style: italic;
|
|
58
59
|
}
|
|
59
60
|
}
|
|
@@ -82,7 +83,7 @@
|
|
|
82
83
|
-ms-user-select: none;
|
|
83
84
|
user-select: none;
|
|
84
85
|
flex-shrink: 0;
|
|
85
|
-
border-top: solid
|
|
86
|
+
border-top: solid colors.$beige 1px;
|
|
86
87
|
background: white;
|
|
87
88
|
transition: background linear 100ms;
|
|
88
89
|
|
|
@@ -92,14 +93,14 @@
|
|
|
92
93
|
|
|
93
94
|
&:hover,
|
|
94
95
|
&.selected {
|
|
95
|
-
background:
|
|
96
|
+
background: colors.$lightGrey;
|
|
96
97
|
}
|
|
97
98
|
}
|
|
98
99
|
}
|
|
99
100
|
}
|
|
100
101
|
|
|
101
102
|
> .instructions {
|
|
102
|
-
@include Arial(1em,
|
|
103
|
+
@include Arial(1em, colors.$darkBeige);
|
|
103
104
|
margin-top: 10px;
|
|
104
105
|
}
|
|
105
106
|
|
|
@@ -111,14 +112,14 @@
|
|
|
111
112
|
margin-top: 15px;
|
|
112
113
|
|
|
113
114
|
> span {
|
|
114
|
-
@include Arial(0.9em,
|
|
115
|
+
@include Arial(0.9em, colors.$red);
|
|
115
116
|
margin-left: 10px;
|
|
116
117
|
}
|
|
117
118
|
}
|
|
118
119
|
|
|
119
120
|
> .warning {
|
|
120
121
|
> span {
|
|
121
|
-
color:
|
|
122
|
+
color: colors.$blue;
|
|
122
123
|
}
|
|
123
124
|
}
|
|
124
125
|
|
|
@@ -137,11 +138,7 @@
|
|
|
137
138
|
|
|
138
139
|
&.dark {
|
|
139
140
|
> .container {
|
|
140
|
-
background:
|
|
141
|
-
|
|
142
|
-
&:after {
|
|
143
|
-
//background: $blue;
|
|
144
|
-
}
|
|
141
|
+
background: colors.$background;
|
|
145
142
|
|
|
146
143
|
> input {
|
|
147
144
|
padding: 15px 20px;
|
package/dist/scss/forms.scss
CHANGED
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
flex-direction: column;
|
|
14
14
|
> input {
|
|
15
15
|
color: colors.$beige;
|
|
16
|
-
background: colors.$
|
|
17
|
-
border: 1px solid colors.$
|
|
16
|
+
background: colors.$background;
|
|
17
|
+
border: 1px solid colors.$border;
|
|
18
18
|
padding: 1em 1.5em;
|
|
19
19
|
text-overflow: ellipsis;
|
|
20
20
|
white-space: nowrap;
|
package/dist/scss/iroco.scss
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
@use 'fonts';
|
|
3
3
|
@use 'style';
|
|
4
4
|
|
|
5
|
+
/** @deprectated : does not seem to be used anywhere */
|
|
6
|
+
|
|
5
7
|
*,
|
|
6
8
|
*::before,
|
|
7
9
|
*::after {
|
|
@@ -31,6 +33,6 @@ html {
|
|
|
31
33
|
-webkit-font-smoothing: antialiased;
|
|
32
34
|
-moz-osx-font-smoothing: grayscale;
|
|
33
35
|
font-kerning: normal;
|
|
34
|
-
background: colors.$
|
|
36
|
+
background: colors.$background;
|
|
35
37
|
}
|
|
36
38
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iroco/ui",
|
|
3
|
-
"version": "1.0.0-
|
|
3
|
+
"version": "1.0.0-3",
|
|
4
4
|
"description": "Iroco design system based on Svelte",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"format": "prettier --plugin-search-dir . --write .",
|
|
15
15
|
"clean": "rm -rf dist && npm cache clean --force",
|
|
16
16
|
"release": "npm run format && npm run build && release-it --only-version",
|
|
17
|
-
"storybook": "storybook dev -p
|
|
17
|
+
"storybook": "storybook dev -p 5175",
|
|
18
18
|
"build-storybook": "storybook build"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|