@iroco/ui 1.0.0-1 → 1.0.0-10
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 +49 -1
- package/dist/Alert.stories.svelte +32 -0
- package/dist/Alert.stories.svelte.d.ts +37 -0
- package/dist/Alert.svelte +8 -52
- package/dist/Button.stories.svelte +5 -7
- package/dist/Button.stories.svelte.d.ts +6 -3
- package/dist/Button.svelte +18 -62
- package/dist/Button.svelte.d.ts +0 -4
- package/dist/DataTable.stories.svelte +31 -0
- package/dist/DataTable.stories.svelte.d.ts +29 -0
- package/dist/DataTable.svelte +3 -47
- package/dist/IconBurger.stories.svelte +30 -0
- package/dist/IconBurger.stories.svelte.d.ts +48 -0
- package/dist/IconClose.stories.svelte +30 -0
- package/dist/IconClose.stories.svelte.d.ts +48 -0
- package/dist/IconFloppyDisk.stories.svelte +33 -0
- package/dist/IconFloppyDisk.stories.svelte.d.ts +55 -0
- package/dist/IconInfo.stories.svelte +31 -0
- package/dist/IconInfo.stories.svelte.d.ts +50 -0
- package/dist/IconIrocoLogo.stories.svelte +34 -0
- package/dist/IconIrocoLogo.stories.svelte.d.ts +57 -0
- package/dist/IconIrocoLogo.svelte +14 -10
- package/dist/IconIrocoLogo.svelte.d.ts +2 -0
- package/dist/IconMoreSign.stories.svelte +31 -0
- package/dist/IconMoreSign.stories.svelte.d.ts +50 -0
- package/dist/IconTrashCan.stories.svelte +31 -0
- package/dist/IconTrashCan.stories.svelte.d.ts +50 -0
- package/dist/ImageArticle.stories.svelte +61 -0
- package/dist/ImageArticle.stories.svelte.d.ts +66 -0
- package/dist/ImageArticle.svelte +454 -0
- package/dist/ImageArticle.svelte.d.ts +23 -0
- package/dist/IrocoLogo.stories.svelte +31 -0
- package/dist/IrocoLogo.stories.svelte.d.ts +50 -0
- package/dist/IrocoLogo.svelte +3 -7
- package/dist/IrocoLogo.svelte.d.ts +2 -2
- package/dist/Loader.stories.svelte +19 -0
- package/dist/Loader.stories.svelte.d.ts +29 -0
- package/dist/NavBar.stories.svelte +37 -0
- package/dist/NavBar.stories.svelte.d.ts +37 -0
- package/dist/NavBar.svelte +27 -196
- package/dist/Navigation.stories.svelte +48 -0
- package/dist/Navigation.stories.svelte.d.ts +59 -0
- package/dist/Navigation.svelte +16 -87
- package/dist/Navigation.svelte.d.ts +1 -0
- package/dist/NumberInput.stories.svelte +47 -0
- package/dist/NumberInput.stories.svelte.d.ts +77 -0
- package/dist/NumberInput.svelte +11 -55
- package/dist/NumberInput.svelte.d.ts +4 -4
- package/dist/RadioButton.stories.svelte +39 -0
- package/dist/RadioButton.stories.svelte.d.ts +56 -0
- package/dist/RadioButton.svelte +5 -50
- package/dist/RadioButton.svelte.d.ts +0 -2
- package/dist/TextInput.stories.svelte +78 -0
- package/dist/TextInput.stories.svelte.d.ts +111 -0
- package/dist/TextInput.svelte +18 -61
- package/dist/TextInput.svelte.d.ts +8 -8
- package/dist/definition.d.ts +5 -0
- package/dist/definition.js +8 -0
- package/dist/scss/button.scss +25 -15
- package/dist/scss/colors.scss +68 -44
- package/dist/scss/fields/_checkbox.scss +3 -3
- package/dist/scss/fields/_input.scss +11 -15
- package/dist/scss/forms.scss +8 -8
- package/dist/scss/style.scss +1 -1
- package/package.json +6 -4
- package/dist/NumberInputSized.svelte +0 -4
- package/dist/NumberInputSized.svelte.d.ts +0 -14
- package/dist/TopBar.svelte +0 -0
- package/dist/TopBar.svelte.d.ts +0 -23
- package/dist/scss/check.scss +0 -47
- package/dist/scss/iroco.scss +0 -36
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export namespace meta {
|
|
2
|
+
export let title: string;
|
|
3
|
+
export { RadioButton as component };
|
|
4
|
+
export namespace argTypes {
|
|
5
|
+
namespace value {
|
|
6
|
+
namespace control {
|
|
7
|
+
let type: string;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
namespace group {
|
|
11
|
+
export namespace control_1 {
|
|
12
|
+
let type_1: string;
|
|
13
|
+
export { type_1 as type };
|
|
14
|
+
}
|
|
15
|
+
export { control_1 as control };
|
|
16
|
+
}
|
|
17
|
+
namespace name {
|
|
18
|
+
export namespace control_2 {
|
|
19
|
+
let type_2: string;
|
|
20
|
+
export { type_2 as type };
|
|
21
|
+
}
|
|
22
|
+
export { control_2 as control };
|
|
23
|
+
}
|
|
24
|
+
namespace checked {
|
|
25
|
+
export namespace control_3 {
|
|
26
|
+
let type_3: string;
|
|
27
|
+
export { type_3 as type };
|
|
28
|
+
}
|
|
29
|
+
export { control_3 as control };
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
/** @typedef {typeof __propDef.props} RadioButtonProps */
|
|
34
|
+
/** @typedef {typeof __propDef.events} RadioButtonEvents */
|
|
35
|
+
/** @typedef {typeof __propDef.slots} RadioButtonSlots */
|
|
36
|
+
export default class RadioButton extends SvelteComponent<{
|
|
37
|
+
[x: string]: never;
|
|
38
|
+
}, {
|
|
39
|
+
[evt: string]: CustomEvent<any>;
|
|
40
|
+
}, {}> {
|
|
41
|
+
}
|
|
42
|
+
export type RadioButtonProps = typeof __propDef.props;
|
|
43
|
+
export type RadioButtonEvents = typeof __propDef.events;
|
|
44
|
+
export type RadioButtonSlots = typeof __propDef.slots;
|
|
45
|
+
import { RadioButton } from './index';
|
|
46
|
+
import { SvelteComponent } from "svelte";
|
|
47
|
+
declare const __propDef: {
|
|
48
|
+
props: {
|
|
49
|
+
[x: string]: never;
|
|
50
|
+
};
|
|
51
|
+
events: {
|
|
52
|
+
[evt: string]: CustomEvent<any>;
|
|
53
|
+
};
|
|
54
|
+
slots: {};
|
|
55
|
+
};
|
|
56
|
+
export {};
|
package/dist/RadioButton.svelte
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
<script>export
|
|
2
|
-
export let value;
|
|
1
|
+
<script>export let value;
|
|
3
2
|
export let group = null;
|
|
4
3
|
export let name;
|
|
5
4
|
export let checked;
|
|
@@ -16,52 +15,8 @@ $:
|
|
|
16
15
|
<slot />
|
|
17
16
|
</label>
|
|
18
17
|
|
|
19
|
-
<style>.
|
|
20
|
-
color:
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.font-color-darkBlue {
|
|
24
|
-
color: #211d28;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.font-color-nightBlue {
|
|
28
|
-
color: #18151e;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.font-color-green {
|
|
32
|
-
color: #00d692;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.font-color-red {
|
|
36
|
-
color: #ff504d;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.font-color-yellow {
|
|
40
|
-
color: #ffe032;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.font-color-beige {
|
|
44
|
-
color: #f2ebe3;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.font-color-darkBeige {
|
|
48
|
-
color: #a9a29e;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.font-color-mediumGrey {
|
|
52
|
-
color: #464452;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.font-color-darkGrey {
|
|
56
|
-
color: #33323a;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.font-color-lightGrey {
|
|
60
|
-
color: #f5f5f5;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.iroco-ui-radio {
|
|
64
|
-
color: #f2ebe3;
|
|
18
|
+
<style>.iroco-ui-radio {
|
|
19
|
+
color: var(--color-text);
|
|
65
20
|
position: relative;
|
|
66
21
|
margin-top: 0.5em;
|
|
67
22
|
padding-left: 1.5em;
|
|
@@ -84,10 +39,10 @@ $:
|
|
|
84
39
|
left: 0;
|
|
85
40
|
height: 1em;
|
|
86
41
|
width: 1em;
|
|
87
|
-
background-color:
|
|
42
|
+
background-color: var(--form-element-bg);
|
|
88
43
|
border-radius: 50%;
|
|
89
44
|
}
|
|
90
45
|
|
|
91
46
|
.iroco-ui-radio input:checked ~ .radio-button-color {
|
|
92
|
-
background-color:
|
|
47
|
+
background-color: var(--color-primary);
|
|
93
48
|
}</style>
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
2
|
declare const __propDef: {
|
|
3
3
|
props: {
|
|
4
|
-
label?: "" | undefined;
|
|
5
4
|
value: string | null;
|
|
6
5
|
group?: string | null | undefined;
|
|
7
6
|
name: string | null;
|
|
@@ -18,6 +17,5 @@ export type RadioButtonProps = typeof __propDef.props;
|
|
|
18
17
|
export type RadioButtonEvents = typeof __propDef.events;
|
|
19
18
|
export type RadioButtonSlots = typeof __propDef.slots;
|
|
20
19
|
export default class RadioButton extends SvelteComponent<RadioButtonProps, RadioButtonEvents, RadioButtonSlots> {
|
|
21
|
-
get label(): "";
|
|
22
20
|
}
|
|
23
21
|
export {};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
<script context="module">
|
|
2
|
+
import { TextInput } from './index';
|
|
3
|
+
|
|
4
|
+
export const meta = {
|
|
5
|
+
title: 'Iroco-UI/Form/TextInput',
|
|
6
|
+
component: TextInput,
|
|
7
|
+
argTypes: {
|
|
8
|
+
id: {
|
|
9
|
+
control: { type: 'text' }
|
|
10
|
+
},
|
|
11
|
+
type: {
|
|
12
|
+
control: { type: 'select' },
|
|
13
|
+
options: ['text', 'email', 'password']
|
|
14
|
+
},
|
|
15
|
+
name: {
|
|
16
|
+
control: { type: 'text' }
|
|
17
|
+
},
|
|
18
|
+
label: {
|
|
19
|
+
control: { type: 'text' }
|
|
20
|
+
},
|
|
21
|
+
placeholder: {
|
|
22
|
+
control: { type: 'text' }
|
|
23
|
+
},
|
|
24
|
+
error: {
|
|
25
|
+
control: { type: 'text' }
|
|
26
|
+
},
|
|
27
|
+
htmlError: {
|
|
28
|
+
control: { type: 'text' }
|
|
29
|
+
},
|
|
30
|
+
value: {
|
|
31
|
+
control: { type: 'number' }
|
|
32
|
+
},
|
|
33
|
+
readonly: {
|
|
34
|
+
control: { type: 'boolean' }
|
|
35
|
+
},
|
|
36
|
+
border: {
|
|
37
|
+
control: { type: 'boolean' }
|
|
38
|
+
},
|
|
39
|
+
autocomplete: {
|
|
40
|
+
control: { type: 'text' }
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
args: {
|
|
44
|
+
type: 'text'
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
</script>
|
|
48
|
+
|
|
49
|
+
<script>
|
|
50
|
+
import { Story, Template } from '@storybook/addon-svelte-csf';
|
|
51
|
+
</script>
|
|
52
|
+
|
|
53
|
+
<Template let:args>
|
|
54
|
+
<form class="iroco-ui-form">
|
|
55
|
+
<TextInput {...args} />
|
|
56
|
+
</form>
|
|
57
|
+
|
|
58
|
+
</Template>
|
|
59
|
+
|
|
60
|
+
<Story name="Default" />
|
|
61
|
+
<Story name="Text" args={{ type: 'text' }} />
|
|
62
|
+
<Story name="Email" args={{ type: 'email' }} />
|
|
63
|
+
<Story name="Password" args={{ type: 'password' }} />
|
|
64
|
+
<Story name="Label" args={{ label: 'Label' }} />
|
|
65
|
+
<Story name="Error" args={{ error: 'An error message' }} />
|
|
66
|
+
<Story name="Placeholder" args={{ placeholder: 'A placeholder' }} />
|
|
67
|
+
<Story name="Border" args={{ placeholder: 'A placeholder' }} />
|
|
68
|
+
<Story
|
|
69
|
+
name="Html Error"
|
|
70
|
+
args={{
|
|
71
|
+
error: `<details>
|
|
72
|
+
<summary>HTML error</summary>
|
|
73
|
+
<p>Foo bar</p>
|
|
74
|
+
</details>`,
|
|
75
|
+
htmlError: true
|
|
76
|
+
}}
|
|
77
|
+
/>
|
|
78
|
+
<Story name="Autocomplete" args={{ type: 'text', autocomplete: 'name' }} />
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
export namespace meta {
|
|
2
|
+
export let title: string;
|
|
3
|
+
export { TextInput as component };
|
|
4
|
+
export namespace argTypes {
|
|
5
|
+
export namespace id {
|
|
6
|
+
namespace control {
|
|
7
|
+
let type: string;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export namespace type_1 {
|
|
11
|
+
export namespace control_1 {
|
|
12
|
+
let type_2: string;
|
|
13
|
+
export { type_2 as type };
|
|
14
|
+
}
|
|
15
|
+
export { control_1 as control };
|
|
16
|
+
export let options: string[];
|
|
17
|
+
}
|
|
18
|
+
export { type_1 as type };
|
|
19
|
+
export namespace name {
|
|
20
|
+
export namespace control_2 {
|
|
21
|
+
let type_3: string;
|
|
22
|
+
export { type_3 as type };
|
|
23
|
+
}
|
|
24
|
+
export { control_2 as control };
|
|
25
|
+
}
|
|
26
|
+
export namespace label {
|
|
27
|
+
export namespace control_3 {
|
|
28
|
+
let type_4: string;
|
|
29
|
+
export { type_4 as type };
|
|
30
|
+
}
|
|
31
|
+
export { control_3 as control };
|
|
32
|
+
}
|
|
33
|
+
export namespace placeholder {
|
|
34
|
+
export namespace control_4 {
|
|
35
|
+
let type_5: string;
|
|
36
|
+
export { type_5 as type };
|
|
37
|
+
}
|
|
38
|
+
export { control_4 as control };
|
|
39
|
+
}
|
|
40
|
+
export namespace error {
|
|
41
|
+
export namespace control_5 {
|
|
42
|
+
let type_6: string;
|
|
43
|
+
export { type_6 as type };
|
|
44
|
+
}
|
|
45
|
+
export { control_5 as control };
|
|
46
|
+
}
|
|
47
|
+
export namespace htmlError {
|
|
48
|
+
export namespace control_6 {
|
|
49
|
+
let type_7: string;
|
|
50
|
+
export { type_7 as type };
|
|
51
|
+
}
|
|
52
|
+
export { control_6 as control };
|
|
53
|
+
}
|
|
54
|
+
export namespace value {
|
|
55
|
+
export namespace control_7 {
|
|
56
|
+
let type_8: string;
|
|
57
|
+
export { type_8 as type };
|
|
58
|
+
}
|
|
59
|
+
export { control_7 as control };
|
|
60
|
+
}
|
|
61
|
+
export namespace readonly {
|
|
62
|
+
export namespace control_8 {
|
|
63
|
+
let type_9: string;
|
|
64
|
+
export { type_9 as type };
|
|
65
|
+
}
|
|
66
|
+
export { control_8 as control };
|
|
67
|
+
}
|
|
68
|
+
export namespace border {
|
|
69
|
+
export namespace control_9 {
|
|
70
|
+
let type_10: string;
|
|
71
|
+
export { type_10 as type };
|
|
72
|
+
}
|
|
73
|
+
export { control_9 as control };
|
|
74
|
+
}
|
|
75
|
+
export namespace autocomplete {
|
|
76
|
+
export namespace control_10 {
|
|
77
|
+
let type_11: string;
|
|
78
|
+
export { type_11 as type };
|
|
79
|
+
}
|
|
80
|
+
export { control_10 as control };
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
export namespace args {
|
|
84
|
+
let type_12: string;
|
|
85
|
+
export { type_12 as type };
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
/** @typedef {typeof __propDef.props} TextInputProps */
|
|
89
|
+
/** @typedef {typeof __propDef.events} TextInputEvents */
|
|
90
|
+
/** @typedef {typeof __propDef.slots} TextInputSlots */
|
|
91
|
+
export default class TextInput extends SvelteComponent<{
|
|
92
|
+
[x: string]: never;
|
|
93
|
+
}, {
|
|
94
|
+
[evt: string]: CustomEvent<any>;
|
|
95
|
+
}, {}> {
|
|
96
|
+
}
|
|
97
|
+
export type TextInputProps = typeof __propDef.props;
|
|
98
|
+
export type TextInputEvents = typeof __propDef.events;
|
|
99
|
+
export type TextInputSlots = typeof __propDef.slots;
|
|
100
|
+
import { TextInput } from './index';
|
|
101
|
+
import { SvelteComponent } from "svelte";
|
|
102
|
+
declare const __propDef: {
|
|
103
|
+
props: {
|
|
104
|
+
[x: string]: never;
|
|
105
|
+
};
|
|
106
|
+
events: {
|
|
107
|
+
[evt: string]: CustomEvent<any>;
|
|
108
|
+
};
|
|
109
|
+
slots: {};
|
|
110
|
+
};
|
|
111
|
+
export {};
|
package/dist/TextInput.svelte
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
export let
|
|
1
|
+
<script>import {} from "./definition";
|
|
2
|
+
export let id;
|
|
3
|
+
export let type = TextInputType.text;
|
|
3
4
|
export let name;
|
|
4
|
-
export let label =
|
|
5
|
-
export let placeholder;
|
|
6
|
-
export let error =
|
|
5
|
+
export let label = void 0;
|
|
6
|
+
export let placeholder = void 0;
|
|
7
|
+
export let error = void 0;
|
|
7
8
|
export let htmlError = false;
|
|
8
|
-
export let value =
|
|
9
|
-
export let onFocus;
|
|
10
|
-
export let onBlur;
|
|
9
|
+
export let value = void 0;
|
|
10
|
+
export let onFocus = void 0;
|
|
11
|
+
export let onBlur = void 0;
|
|
11
12
|
export let readonly = false;
|
|
12
13
|
export let border = false;
|
|
13
14
|
export let autocomplete = "on";
|
|
@@ -47,51 +48,7 @@ function typeAction(node) {
|
|
|
47
48
|
{/if}
|
|
48
49
|
</div>
|
|
49
50
|
|
|
50
|
-
<style
|
|
51
|
-
color: #00b9ff;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.font-color-darkBlue {
|
|
55
|
-
color: #211d28;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.font-color-nightBlue {
|
|
59
|
-
color: #18151e;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.font-color-green {
|
|
63
|
-
color: #00d692;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.font-color-red {
|
|
67
|
-
color: #ff504d;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.font-color-yellow {
|
|
71
|
-
color: #ffe032;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.font-color-beige {
|
|
75
|
-
color: #f2ebe3;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.font-color-darkBeige {
|
|
79
|
-
color: #a9a29e;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.font-color-mediumGrey {
|
|
83
|
-
color: #464452;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.font-color-darkGrey {
|
|
87
|
-
color: #33323a;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.font-color-lightGrey {
|
|
91
|
-
color: #f5f5f5;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
input,
|
|
51
|
+
<style>input,
|
|
95
52
|
textarea {
|
|
96
53
|
outline: none;
|
|
97
54
|
text-decoration: none;
|
|
@@ -109,9 +66,9 @@ textarea:focus {
|
|
|
109
66
|
flex-direction: column;
|
|
110
67
|
}
|
|
111
68
|
.iroco-ui-input > input {
|
|
112
|
-
color:
|
|
113
|
-
background:
|
|
114
|
-
border: 1px solid
|
|
69
|
+
color: var(--color-text);
|
|
70
|
+
background: var(--color-body);
|
|
71
|
+
border: 1px solid var(--color-border);
|
|
115
72
|
padding: 1em 1.5em;
|
|
116
73
|
text-overflow: ellipsis;
|
|
117
74
|
white-space: nowrap;
|
|
@@ -119,23 +76,23 @@ textarea:focus {
|
|
|
119
76
|
border-radius: 0.3em;
|
|
120
77
|
}
|
|
121
78
|
.iroco-ui-input > input.border {
|
|
122
|
-
border: 1px solid
|
|
79
|
+
border: 1px solid var(--form-element-border);
|
|
123
80
|
}
|
|
124
81
|
.iroco-ui-input > input::placeholder {
|
|
125
|
-
color:
|
|
82
|
+
color: var(--color-text-op-50);
|
|
126
83
|
}
|
|
127
84
|
.iroco-ui-input > input.error {
|
|
128
|
-
border-color:
|
|
85
|
+
border-color: var(--color-danger);
|
|
129
86
|
}
|
|
130
87
|
.iroco-ui-input > input.readonlyInput {
|
|
131
88
|
cursor: not-allowed;
|
|
132
89
|
}
|
|
133
90
|
.iroco-ui-input .error {
|
|
134
|
-
color:
|
|
91
|
+
color: var(--color-danger);
|
|
135
92
|
}
|
|
136
93
|
|
|
137
94
|
.iroco-ui-label {
|
|
138
|
-
color:
|
|
95
|
+
color: var(--color-text-op-60);
|
|
139
96
|
font-weight: bold;
|
|
140
97
|
padding-bottom: 10px;
|
|
141
98
|
display: inline-block;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
|
-
import type
|
|
2
|
+
import { type TextInputType } from './definition';
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
5
|
id: string;
|
|
6
|
-
type
|
|
6
|
+
type?: TextInputType | undefined;
|
|
7
7
|
name: string;
|
|
8
|
-
label?: string |
|
|
9
|
-
placeholder
|
|
10
|
-
error?: string |
|
|
8
|
+
label?: string | undefined;
|
|
9
|
+
placeholder?: string | undefined;
|
|
10
|
+
error?: string | undefined;
|
|
11
11
|
htmlError?: boolean | undefined;
|
|
12
|
-
value?: string |
|
|
13
|
-
onFocus
|
|
14
|
-
onBlur
|
|
12
|
+
value?: string | undefined;
|
|
13
|
+
onFocus?: ((e: FocusEvent) => void) | undefined;
|
|
14
|
+
onBlur?: ((e: Event) => void) | undefined;
|
|
15
15
|
readonly?: boolean | undefined;
|
|
16
16
|
border?: boolean | undefined;
|
|
17
17
|
autocomplete?: string | undefined;
|
package/dist/definition.d.ts
CHANGED
package/dist/definition.js
CHANGED
package/dist/scss/button.scss
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
//@use './colors';
|
|
2
2
|
@use './fonts';
|
|
3
3
|
@use './containers';
|
|
4
4
|
@use './constants';
|
|
@@ -7,35 +7,40 @@
|
|
|
7
7
|
cursor: pointer;
|
|
8
8
|
-webkit-touch-callout: none;
|
|
9
9
|
-webkit-user-select: none;
|
|
10
|
-
-khtml-user-select: none;
|
|
11
10
|
-moz-user-select: none;
|
|
12
11
|
-ms-user-select: none;
|
|
13
12
|
user-select: none;
|
|
14
13
|
border: none;
|
|
15
14
|
flex-shrink: 0;
|
|
16
|
-
margin: 1em
|
|
15
|
+
margin: 1em 0;
|
|
17
16
|
position: relative;
|
|
18
17
|
text-transform: uppercase;
|
|
19
18
|
border-radius: constants.$border-radius;
|
|
20
19
|
|
|
21
20
|
&--basic {
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
color: var(--btn-basic-label);
|
|
22
|
+
background: var(--btn-basic-bg);
|
|
23
|
+
border: 1px solid var(--btn-basic-border);
|
|
24
24
|
}
|
|
25
|
+
|
|
25
26
|
&--dark {
|
|
26
|
-
background:
|
|
27
|
-
color:
|
|
27
|
+
background: var(--dark-btn-primary-bg);
|
|
28
|
+
color: var(--dark-btn-primary-label);
|
|
28
29
|
}
|
|
30
|
+
|
|
29
31
|
&--success {
|
|
30
|
-
background:
|
|
31
|
-
color:
|
|
32
|
+
background: var(--color-success);
|
|
33
|
+
color: var(--btn-secondary-label);
|
|
32
34
|
}
|
|
35
|
+
|
|
33
36
|
&--danger {
|
|
34
|
-
background:
|
|
37
|
+
background: var(--color-danger);
|
|
35
38
|
}
|
|
39
|
+
|
|
36
40
|
&--regular {
|
|
37
41
|
padding: 1em 2em;
|
|
38
42
|
}
|
|
43
|
+
|
|
39
44
|
&--small {
|
|
40
45
|
padding: 0.5em 1em;
|
|
41
46
|
}
|
|
@@ -43,19 +48,24 @@
|
|
|
43
48
|
&--basic:hover,
|
|
44
49
|
&--success:hover,
|
|
45
50
|
&--danger:hover {
|
|
46
|
-
box-shadow: inset 0 0 0 10em
|
|
51
|
+
box-shadow: inset 0 0 0 10em var(--color-black-op-20);
|
|
47
52
|
}
|
|
53
|
+
|
|
48
54
|
&--dark:hover {
|
|
49
|
-
box-shadow: inset 0 0 0 10em
|
|
55
|
+
box-shadow: inset 0 0 0 10em var(--color-white-op-20);
|
|
50
56
|
}
|
|
51
57
|
|
|
52
58
|
&:active {
|
|
53
59
|
box-shadow: none;
|
|
54
60
|
}
|
|
55
61
|
|
|
56
|
-
&.disabled
|
|
57
|
-
|
|
62
|
+
&.disabled,
|
|
63
|
+
&:disabled {
|
|
64
|
+
background-color: var(--btn-disabled-bg);
|
|
65
|
+
color: var(--btn-disabled-label);
|
|
66
|
+
border-color: var(--btn-disabled-border);
|
|
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:
|
|
79
|
+
color: var(--color-text);
|
|
70
80
|
cursor: pointer;
|
|
71
81
|
}
|