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 CHANGED
@@ -1,15 +1,19 @@
1
- import Button from "./lib/form/Button.svelte";
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
  };
@@ -1,5 +1,5 @@
1
1
  <script>
2
- import Button from "./Button.svelte";
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
- <div class="form-row">
52
- <div>
53
- <label for="{input.props.name}" class="mandatory">{input.props.label}</label>
54
-
55
- <svelte:component this={input.component} {...input.props} bind:value={input.value} />
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
- </div>
58
+ {/if}
58
59
  {/each}
59
60
 
60
- <Button button={button} clickEvent={handleSubmit} ></Button>
61
+ <FormButton button={button} clickEvent={handleSubmit} ></FormButton>
61
62
 
62
63
  </form>
63
64
 
@@ -26,6 +26,7 @@ button {
26
26
  border: none;
27
27
  cursor: pointer;
28
28
  padding: 0px 20px;
29
+ margin-top: 12px;
29
30
  }
30
31
  button:hover {
31
32
  background-color: var(--theme-main-color-hover);
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iconograph-ui",
3
- "version": "1.2.0",
3
+ "version": "1.2.2",
4
4
  "description": "A Svelte Kit components library",
5
5
  "main": "./index.js",
6
6
  "svelte": "./index.js",
package/lib/Button.svelte DELETED
@@ -1,15 +0,0 @@
1
- <script>
2
- export let label = "Click me";
3
- </script>
4
-
5
- <button>{label}</button>
6
-
7
- <style>
8
- button {
9
- padding: 0.5rem 1rem;
10
- border-radius: 0.5rem;
11
- background: #4cafef;
12
- color: white;
13
- border: none;
14
- }
15
- </style>