iconograph-ui 1.2.0 → 1.2.2
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/index.js +8 -2
- package/lib/form/Form.svelte +9 -8
- package/lib/form/{Button.svelte → FormButton.svelte} +1 -0
- package/lib/form/Input.svelte +2 -2
- package/lib/form/SexeChoiceInput.svelte +44 -0
- package/lib/navigation/Button.svelte +42 -0
- package/package.json +1 -1
- package/lib/Button.svelte +0 -15
package/index.js
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
1
|
-
import
|
|
1
|
+
import FormButton from "./lib/form/FormButton.svelte";
|
|
2
2
|
import Form from "./lib/form/Form.svelte"
|
|
3
3
|
import Input from "./lib/form/Input.svelte"
|
|
4
4
|
import BodySection from "./lib/layout/BodySection.svelte"
|
|
5
5
|
import HeadSection from "./lib/layout/HeadSection.svelte"
|
|
6
6
|
import Card from "./lib/layout/Card.svelte"
|
|
7
7
|
import MainMenu from "./lib/navigation/MainMenu.svelte"
|
|
8
|
+
import Button from "./lib/navigation/Button.svelte"
|
|
8
9
|
import Notification from "./lib/notification/Notification.svelte";
|
|
9
10
|
import NotificationWrapper from "./lib/notification/NotificationWrapper.svelte";
|
|
11
|
+
import Table from "./lib/table/Table.svelte"
|
|
12
|
+
import CellLink from "./lib/table/CellLink.svelte"
|
|
10
13
|
|
|
11
14
|
export {
|
|
12
15
|
Button,
|
|
16
|
+
FormButton,
|
|
13
17
|
Form,
|
|
14
18
|
Input,
|
|
15
19
|
BodySection,
|
|
@@ -17,5 +21,7 @@ export {
|
|
|
17
21
|
Card,
|
|
18
22
|
MainMenu,
|
|
19
23
|
Notification,
|
|
20
|
-
NotificationWrapper
|
|
24
|
+
NotificationWrapper,
|
|
25
|
+
Table,
|
|
26
|
+
CellLink,
|
|
21
27
|
};
|
package/lib/form/Form.svelte
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import
|
|
2
|
+
import FormButton from "./FormButton.svelte";
|
|
3
3
|
import { addNotification } from "../notification/NotificationWrapper.svelte";
|
|
4
4
|
|
|
5
5
|
export let inputs = [];
|
|
@@ -48,16 +48,17 @@
|
|
|
48
48
|
<form>
|
|
49
49
|
|
|
50
50
|
{#each inputs as input}
|
|
51
|
-
|
|
52
|
-
<div>
|
|
53
|
-
<
|
|
54
|
-
|
|
55
|
-
|
|
51
|
+
{#if !input.disabled }
|
|
52
|
+
<div class="form-row">
|
|
53
|
+
<div>
|
|
54
|
+
<label for="{input.props.name}" class="mandatory">{input.props.label}</label>
|
|
55
|
+
<svelte:component this={input.component} {...input.props} bind:value={input.value} />
|
|
56
|
+
</div>
|
|
56
57
|
</div>
|
|
57
|
-
|
|
58
|
+
{/if}
|
|
58
59
|
{/each}
|
|
59
60
|
|
|
60
|
-
<
|
|
61
|
+
<FormButton button={button} clickEvent={handleSubmit} ></FormButton>
|
|
61
62
|
|
|
62
63
|
</form>
|
|
63
64
|
|
package/lib/form/Input.svelte
CHANGED
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
export let name;
|
|
3
3
|
export let type;
|
|
4
4
|
export let value;
|
|
5
|
+
export let required = false;
|
|
5
6
|
</script>
|
|
6
7
|
|
|
7
8
|
{#if type == "textarea"}
|
|
8
9
|
<textarea name="{name}" bind:value={value} ></textarea>
|
|
9
10
|
{:else}
|
|
10
|
-
<input type={type} name="{name}" bind:value={value} autocomplete="on" required />
|
|
11
|
+
<input type={type} name="{name}" bind:value={value} autocomplete="on" required={required} />
|
|
11
12
|
{/if}
|
|
12
13
|
|
|
13
|
-
|
|
14
14
|
<style>
|
|
15
15
|
|
|
16
16
|
input, textarea {
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
export let name;
|
|
3
|
+
export let value;
|
|
4
|
+
|
|
5
|
+
console.log(value);
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<div class="selector">
|
|
9
|
+
{#each ['Homme', 'Femme'] as sexe}
|
|
10
|
+
<div>
|
|
11
|
+
<input type="radio" name={name} value={sexe} bind:group={value} />
|
|
12
|
+
<label for={sexe}>{sexe}</label>
|
|
13
|
+
</div>
|
|
14
|
+
{/each}
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
<style>
|
|
18
|
+
.selector {
|
|
19
|
+
display: flex;
|
|
20
|
+
gap: 12px;
|
|
21
|
+
}
|
|
22
|
+
.selector > div {
|
|
23
|
+
padding: 6px 3px;
|
|
24
|
+
display: flex;
|
|
25
|
+
align-items: center;
|
|
26
|
+
gap: 6px;
|
|
27
|
+
}
|
|
28
|
+
input {
|
|
29
|
+
background-color: #f5f5fb;
|
|
30
|
+
border: none;
|
|
31
|
+
border-radius: 6px;
|
|
32
|
+
padding: 7px 14px;
|
|
33
|
+
font-size: 14px;
|
|
34
|
+
line-height: 14px;
|
|
35
|
+
font-weight: 500;
|
|
36
|
+
border: 1px solid #f3f3f3; /*#d1d9e0;*/
|
|
37
|
+
}
|
|
38
|
+
label {
|
|
39
|
+
font-size: 14px;
|
|
40
|
+
line-height: 14px;
|
|
41
|
+
font-weight: 500;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
</style>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
export let label;
|
|
3
|
+
export let uri;
|
|
4
|
+
</script>
|
|
5
|
+
|
|
6
|
+
<a href="{uri}" >
|
|
7
|
+
{label}
|
|
8
|
+
</a>
|
|
9
|
+
|
|
10
|
+
<style>
|
|
11
|
+
a {
|
|
12
|
+
min-width: 100px;
|
|
13
|
+
display: inline-block;
|
|
14
|
+
background-color: var(--theme-main-color);
|
|
15
|
+
color: #ffffff !important;
|
|
16
|
+
/*box-shadow: #000000a0 0px 1px 3px 0px !important;*/
|
|
17
|
+
border-radius: 8px;
|
|
18
|
+
height: 34px;
|
|
19
|
+
line-height: 34px !important;
|
|
20
|
+
font-size: 13px;
|
|
21
|
+
text-decoration: none;
|
|
22
|
+
text-align: center;
|
|
23
|
+
font-family: var(--theme-main-font);
|
|
24
|
+
font-weight: 700;
|
|
25
|
+
text-transform: uppercase;
|
|
26
|
+
border: none;
|
|
27
|
+
cursor: pointer;
|
|
28
|
+
padding: 0px 20px;
|
|
29
|
+
margin-top: 12px;
|
|
30
|
+
}
|
|
31
|
+
a:hover {
|
|
32
|
+
background-color: var(--theme-main-color-hover);
|
|
33
|
+
}
|
|
34
|
+
a:active {
|
|
35
|
+
background-color: var(--theme-main-color-hover);
|
|
36
|
+
position: relative;
|
|
37
|
+
top: 1px;
|
|
38
|
+
}
|
|
39
|
+
a:disabled {
|
|
40
|
+
background-color: var(--disabled-background-color) !important;
|
|
41
|
+
}
|
|
42
|
+
</style>
|
package/package.json
CHANGED
package/lib/Button.svelte
DELETED