@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
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
<script>import IconBurger from "./IconBurger.svelte";
|
|
2
|
+
import IconIrocoLogo from "./IconIrocoLogo.svelte";
|
|
3
|
+
import IrocoLogo from "./IrocoLogo.svelte";
|
|
4
|
+
import NavBar from "./NavBar.svelte";
|
|
5
|
+
export let navigationItems;
|
|
6
|
+
export let type = "topbar";
|
|
7
|
+
export let title = null;
|
|
8
|
+
let showMenu = false;
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<div class="navigation--mobile">
|
|
12
|
+
<div class="navigation--mobile__title-container">
|
|
13
|
+
{#if title == null}
|
|
14
|
+
<IrocoLogo width="10em" height="10em" />
|
|
15
|
+
{:else}
|
|
16
|
+
<IconIrocoLogo width="3em" height="3em" />
|
|
17
|
+
<h1>{title}</h1>
|
|
18
|
+
{/if}
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
<button on:click={() => (showMenu = true)} class="navigation--mobile__button">
|
|
22
|
+
<IconBurger width="3em" height="3em" />
|
|
23
|
+
</button>
|
|
24
|
+
|
|
25
|
+
{#if showMenu}
|
|
26
|
+
<NavBar
|
|
27
|
+
on:click_link={() => (showMenu = false)}
|
|
28
|
+
on:click={() => (showMenu = false)}
|
|
29
|
+
{type}
|
|
30
|
+
{navigationItems}
|
|
31
|
+
/>
|
|
32
|
+
{/if}
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<div class="navigation">
|
|
36
|
+
<div class="navigation__title-container">
|
|
37
|
+
{#if title == null}
|
|
38
|
+
<IrocoLogo width="10em" height="10em" />
|
|
39
|
+
{:else}
|
|
40
|
+
<IconIrocoLogo width="3em" height="3em" />
|
|
41
|
+
<h1>{title}</h1>
|
|
42
|
+
{/if}
|
|
43
|
+
</div>
|
|
44
|
+
<NavBar {navigationItems} {type} />
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
<style>.font-color-blue {
|
|
48
|
+
color: #00b9ff;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.font-color-darkBlue {
|
|
52
|
+
color: #211d28;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.font-color-nightBlue {
|
|
56
|
+
color: #18151e;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.font-color-green {
|
|
60
|
+
color: #00d692;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.font-color-red {
|
|
64
|
+
color: #ff504d;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.font-color-yellow {
|
|
68
|
+
color: #ffe032;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.font-color-beige {
|
|
72
|
+
color: #f2ebe3;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.font-color-darkBeige {
|
|
76
|
+
color: #a9a29e;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.font-color-mediumGrey {
|
|
80
|
+
color: #464452;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.font-color-darkGrey {
|
|
84
|
+
color: #33323a;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.font-color-lightGrey {
|
|
88
|
+
color: #f5f5f5;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.container-wide {
|
|
92
|
+
width: calc(100% - 20px);
|
|
93
|
+
max-width: 2360px;
|
|
94
|
+
margin-left: auto;
|
|
95
|
+
margin-right: auto;
|
|
96
|
+
transition: max-width ease-out 200ms;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
@media all and (max-width: 2560px) {
|
|
100
|
+
.container-wide {
|
|
101
|
+
max-width: 1620px;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
@media all and (max-width: 1800px) {
|
|
106
|
+
.container-wide {
|
|
107
|
+
max-width: 1280px;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
@media all and (max-width: 1440px) {
|
|
112
|
+
.container-wide {
|
|
113
|
+
max-width: 884px;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
@media all and (max-width: 1024px) {
|
|
118
|
+
.container-wide {
|
|
119
|
+
max-width: 648px;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
@media all and (max-width: 768px) {
|
|
124
|
+
.container-wide {
|
|
125
|
+
max-width: 496px;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
@media all and (max-width: 596px) {
|
|
130
|
+
.container-wide {
|
|
131
|
+
max-width: 365px;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
@media all and (max-width: 425px) {
|
|
136
|
+
.container-wide {
|
|
137
|
+
max-width: calc(100% - 60px);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
@media all and (max-width: 375px) {
|
|
142
|
+
.container-wide {
|
|
143
|
+
max-width: calc(100% - 40px);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
@media all and (max-width: 320px) {
|
|
148
|
+
.container-wide {
|
|
149
|
+
max-width: calc(100% - 20px);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.container-large {
|
|
154
|
+
width: calc(100% - 20px);
|
|
155
|
+
max-width: 1280px;
|
|
156
|
+
margin-left: auto;
|
|
157
|
+
margin-right: auto;
|
|
158
|
+
transition: max-width ease-out 200ms;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
@media all and (max-width: 1440px) {
|
|
162
|
+
.container-large {
|
|
163
|
+
max-width: 884px;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
@media all and (max-width: 1024px) {
|
|
168
|
+
.container-large {
|
|
169
|
+
max-width: 648px;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
@media all and (max-width: 768px) {
|
|
174
|
+
.container-large {
|
|
175
|
+
max-width: 496px;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
@media all and (max-width: 596px) {
|
|
180
|
+
.container-large {
|
|
181
|
+
max-width: 365px;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
@media all and (max-width: 425px) {
|
|
186
|
+
.container-large {
|
|
187
|
+
max-width: calc(100% - 60px);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
@media all and (max-width: 375px) {
|
|
192
|
+
.container-large {
|
|
193
|
+
max-width: calc(100% - 40px);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
@media all and (max-width: 320px) {
|
|
198
|
+
.container-large {
|
|
199
|
+
max-width: calc(100% - 20px);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.container-medium {
|
|
204
|
+
width: calc(100% - 20px);
|
|
205
|
+
max-width: 884px;
|
|
206
|
+
margin-left: auto;
|
|
207
|
+
margin-right: auto;
|
|
208
|
+
transition: max-width ease-out 200ms;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
@media all and (max-width: 1024px) {
|
|
212
|
+
.container-medium {
|
|
213
|
+
max-width: 648px;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
@media all and (max-width: 768px) {
|
|
218
|
+
.container-medium {
|
|
219
|
+
max-width: 496px;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
@media all and (max-width: 596px) {
|
|
224
|
+
.container-medium {
|
|
225
|
+
max-width: 365px;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
@media all and (max-width: 425px) {
|
|
230
|
+
.container-medium {
|
|
231
|
+
max-width: calc(100% - 60px);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
@media all and (max-width: 375px) {
|
|
236
|
+
.container-medium {
|
|
237
|
+
max-width: calc(100% - 40px);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
@media all and (max-width: 320px) {
|
|
242
|
+
.container-medium {
|
|
243
|
+
max-width: calc(100% - 20px);
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.container-small {
|
|
248
|
+
width: calc(100% - 20px);
|
|
249
|
+
max-width: 496px;
|
|
250
|
+
margin-left: auto;
|
|
251
|
+
margin-right: auto;
|
|
252
|
+
transition: max-width ease-out 200ms;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
@media all and (max-width: 425px) {
|
|
256
|
+
.container-small {
|
|
257
|
+
max-width: calc(100% - 60px);
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
@media all and (max-width: 375px) {
|
|
262
|
+
.container-small {
|
|
263
|
+
max-width: calc(100% - 40px);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
@media all and (max-width: 320px) {
|
|
268
|
+
.container-small {
|
|
269
|
+
max-width: calc(100% - 20px);
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
.navigation {
|
|
274
|
+
display: flex;
|
|
275
|
+
flex-direction: row;
|
|
276
|
+
justify-content: space-between;
|
|
277
|
+
align-items: center;
|
|
278
|
+
width: 100%;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.navigation--mobile {
|
|
282
|
+
display: none;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.navigation__title-container {
|
|
286
|
+
display: flex;
|
|
287
|
+
align-items: center;
|
|
288
|
+
padding-left: 1em;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.navigation__title-container h1 {
|
|
292
|
+
padding-left: 1em;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
@media all and (max-width: 768px) {
|
|
296
|
+
.navigation {
|
|
297
|
+
display: none;
|
|
298
|
+
color: #f2ebe3;
|
|
299
|
+
}
|
|
300
|
+
.navigation--mobile {
|
|
301
|
+
display: flex;
|
|
302
|
+
padding: 0 1em;
|
|
303
|
+
justify-content: space-between;
|
|
304
|
+
position: fixed;
|
|
305
|
+
top: 0;
|
|
306
|
+
z-index: 1;
|
|
307
|
+
width: 100%;
|
|
308
|
+
border-bottom: 1px solid #464452;
|
|
309
|
+
}
|
|
310
|
+
.navigation--mobile h1 {
|
|
311
|
+
font-size: 2em;
|
|
312
|
+
}
|
|
313
|
+
.navigation--mobile__button {
|
|
314
|
+
background-color: transparent;
|
|
315
|
+
border: none;
|
|
316
|
+
color: #464452;
|
|
317
|
+
}
|
|
318
|
+
.navigation--mobile__title-container {
|
|
319
|
+
display: flex;
|
|
320
|
+
align-items: center;
|
|
321
|
+
}
|
|
322
|
+
.navigation--mobile__title-container h1 {
|
|
323
|
+
padding-left: 0.5em;
|
|
324
|
+
}
|
|
325
|
+
}</style>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import type { NavigationItem } from './definition';
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
navigationItems: Array<NavigationItem>;
|
|
6
|
+
type?: "sidebar" | "topbar" | undefined;
|
|
7
|
+
title?: string | null | undefined;
|
|
8
|
+
};
|
|
9
|
+
events: {
|
|
10
|
+
[evt: string]: CustomEvent<any>;
|
|
11
|
+
};
|
|
12
|
+
slots: {};
|
|
13
|
+
};
|
|
14
|
+
export type NavigationProps = typeof __propDef.props;
|
|
15
|
+
export type NavigationEvents = typeof __propDef.events;
|
|
16
|
+
export type NavigationSlots = typeof __propDef.slots;
|
|
17
|
+
export default class Navigation extends SvelteComponentTyped<NavigationProps, NavigationEvents, NavigationSlots> {
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
<script>export let id;
|
|
2
|
+
export let label;
|
|
3
|
+
export let placeholder;
|
|
4
|
+
export let error = null;
|
|
5
|
+
export let value = null;
|
|
6
|
+
export let min;
|
|
7
|
+
export let max;
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<div class="iroco-ui-input">
|
|
11
|
+
{#if label}
|
|
12
|
+
<label class="iroco-ui-label" for={id}>{label}</label>
|
|
13
|
+
{/if}
|
|
14
|
+
<input on:change bind:value {id} type="number" {placeholder} {min} {max} {...$$restProps} />
|
|
15
|
+
{#if error}
|
|
16
|
+
<p data-testid="error" class="error">{error}</p>
|
|
17
|
+
{/if}
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
<style>.font-color-blue {
|
|
21
|
+
color: #00b9ff;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.font-color-darkBlue {
|
|
25
|
+
color: #211d28;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.font-color-nightBlue {
|
|
29
|
+
color: #18151e;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.font-color-green {
|
|
33
|
+
color: #00d692;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.font-color-red {
|
|
37
|
+
color: #ff504d;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.font-color-yellow {
|
|
41
|
+
color: #ffe032;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.font-color-beige {
|
|
45
|
+
color: #f2ebe3;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.font-color-darkBeige {
|
|
49
|
+
color: #a9a29e;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.font-color-mediumGrey {
|
|
53
|
+
color: #464452;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.font-color-darkGrey {
|
|
57
|
+
color: #33323a;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.font-color-lightGrey {
|
|
61
|
+
color: #f5f5f5;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.iroco-ui-form input,
|
|
65
|
+
.iroco-ui-form textarea {
|
|
66
|
+
outline: none;
|
|
67
|
+
text-decoration: none;
|
|
68
|
+
font-size: 14px;
|
|
69
|
+
}
|
|
70
|
+
.iroco-ui-form input:focus,
|
|
71
|
+
.iroco-ui-form textarea:focus {
|
|
72
|
+
outline: none;
|
|
73
|
+
text-decoration: none;
|
|
74
|
+
font-size: 14px;
|
|
75
|
+
}
|
|
76
|
+
.iroco-ui-form .iroco-ui-input {
|
|
77
|
+
display: flex;
|
|
78
|
+
flex-direction: column;
|
|
79
|
+
}
|
|
80
|
+
.iroco-ui-form .iroco-ui-input > input {
|
|
81
|
+
color: #f2ebe3;
|
|
82
|
+
background: #211d28;
|
|
83
|
+
border: 1px solid #211d28;
|
|
84
|
+
padding: 1em 1.5em;
|
|
85
|
+
text-overflow: ellipsis;
|
|
86
|
+
white-space: nowrap;
|
|
87
|
+
overflow: hidden;
|
|
88
|
+
border-radius: 0.5em;
|
|
89
|
+
}
|
|
90
|
+
.iroco-ui-form .iroco-ui-input > input::placeholder {
|
|
91
|
+
color: rgba(242, 235, 227, 0.5);
|
|
92
|
+
}
|
|
93
|
+
.iroco-ui-form .iroco-ui-input > input.error {
|
|
94
|
+
border-color: #ff504d;
|
|
95
|
+
}
|
|
96
|
+
.iroco-ui-form .iroco-ui-input > input.readonlyInput {
|
|
97
|
+
cursor: not-allowed;
|
|
98
|
+
}
|
|
99
|
+
.iroco-ui-form .iroco-ui-label {
|
|
100
|
+
color: rgba(242, 235, 227, 0.6);
|
|
101
|
+
font-weight: bold;
|
|
102
|
+
padding-bottom: 10px;
|
|
103
|
+
display: inline-block;
|
|
104
|
+
}
|
|
105
|
+
.iroco-ui-form .field {
|
|
106
|
+
margin-top: 20px;
|
|
107
|
+
}
|
|
108
|
+
.iroco-ui-form .field:first-child {
|
|
109
|
+
margin: 0;
|
|
110
|
+
}
|
|
111
|
+
.iroco-ui-form > .submit {
|
|
112
|
+
margin-top: 40px;
|
|
113
|
+
}
|
|
114
|
+
.iroco-ui-form p.error {
|
|
115
|
+
margin: 0;
|
|
116
|
+
color: #ff504d;
|
|
117
|
+
}</style>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
[x: string]: any;
|
|
5
|
+
id: string;
|
|
6
|
+
label: string | '';
|
|
7
|
+
placeholder: string | '';
|
|
8
|
+
error?: string | null | undefined;
|
|
9
|
+
value?: number | null | undefined;
|
|
10
|
+
min: number | undefined;
|
|
11
|
+
max: number | undefined;
|
|
12
|
+
};
|
|
13
|
+
events: {
|
|
14
|
+
change: Event;
|
|
15
|
+
} & {
|
|
16
|
+
[evt: string]: CustomEvent<any>;
|
|
17
|
+
};
|
|
18
|
+
slots: {};
|
|
19
|
+
};
|
|
20
|
+
export type NumberInputProps = typeof __propDef.props;
|
|
21
|
+
export type NumberInputEvents = typeof __propDef.events;
|
|
22
|
+
export type NumberInputSlots = typeof __propDef.slots;
|
|
23
|
+
export default class NumberInput extends SvelteComponentTyped<NumberInputProps, NumberInputEvents, NumberInputSlots> {
|
|
24
|
+
}
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: Record<string, never>;
|
|
4
|
+
events: {
|
|
5
|
+
[evt: string]: CustomEvent<any>;
|
|
6
|
+
};
|
|
7
|
+
slots: {};
|
|
8
|
+
};
|
|
9
|
+
export type NumberInputSizedProps = typeof __propDef.props;
|
|
10
|
+
export type NumberInputSizedEvents = typeof __propDef.events;
|
|
11
|
+
export type NumberInputSizedSlots = typeof __propDef.slots;
|
|
12
|
+
export default class NumberInputSized extends SvelteComponentTyped<NumberInputSizedProps, NumberInputSizedEvents, NumberInputSizedSlots> {
|
|
13
|
+
}
|
|
14
|
+
export {};
|
package/README.md
CHANGED
|
@@ -1,48 +1,38 @@
|
|
|
1
|
-
#
|
|
1
|
+
# create-svelte
|
|
2
2
|
|
|
3
|
-
[
|
|
3
|
+
Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte).
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Creating a project
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
If you're seeing this, you've probably already done this step. Congrats!
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
```bash
|
|
10
|
+
# create a new project in the current directory
|
|
11
|
+
npm create svelte@latest
|
|
10
12
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
```shell
|
|
14
|
-
~/src/iroco-ui$ npm ci
|
|
13
|
+
# create a new project in my-app
|
|
14
|
+
npm create svelte@latest my-app
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
```shell
|
|
20
|
-
~/src/iroco-ui$ npm run build
|
|
21
|
-
```
|
|
17
|
+
## Developing
|
|
22
18
|
|
|
23
|
-
|
|
19
|
+
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
|
|
24
20
|
|
|
25
|
-
|
|
21
|
+
```bash
|
|
22
|
+
npm run dev
|
|
26
23
|
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
# or start the server and open the app in a new browser tab
|
|
25
|
+
npm run dev -- --open
|
|
29
26
|
```
|
|
30
27
|
|
|
31
|
-
|
|
28
|
+
## Building
|
|
32
29
|
|
|
33
|
-
|
|
30
|
+
To create a production version of your app:
|
|
34
31
|
|
|
35
|
-
```
|
|
36
|
-
|
|
32
|
+
```bash
|
|
33
|
+
npm run build
|
|
37
34
|
```
|
|
38
|
-
And in the same time launch the dev server for docs :
|
|
39
35
|
|
|
40
|
-
|
|
41
|
-
~/src/iroco-ui/docs$ npm run dev
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
To build the documentation (in docs) :
|
|
36
|
+
You can preview the production build with `npm run preview`.
|
|
45
37
|
|
|
46
|
-
|
|
47
|
-
~/src/iroco-ui/docs$ npm run build
|
|
48
|
-
```
|
|
38
|
+
> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
<script>export const label = "";
|
|
2
|
+
export let value;
|
|
3
|
+
export let group = null;
|
|
4
|
+
export let name;
|
|
5
|
+
export let checked;
|
|
6
|
+
function onChange(event) {
|
|
7
|
+
group = event.target.value;
|
|
8
|
+
}
|
|
9
|
+
$:
|
|
10
|
+
checked = group === value;
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<label class="iroco-ui-radio">
|
|
14
|
+
<input type="radio" bind:group {value} {name} on:change={onChange} {checked} />
|
|
15
|
+
<span class="radio-button-color" />
|
|
16
|
+
<slot />
|
|
17
|
+
</label>
|
|
18
|
+
|
|
19
|
+
<style>.font-color-blue {
|
|
20
|
+
color: #00b9ff;
|
|
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;
|
|
65
|
+
position: relative;
|
|
66
|
+
margin-top: 0.5em;
|
|
67
|
+
padding-left: 1.5em;
|
|
68
|
+
cursor: pointer;
|
|
69
|
+
-webkit-user-select: none;
|
|
70
|
+
-moz-user-select: none;
|
|
71
|
+
-ms-user-select: none;
|
|
72
|
+
user-select: none;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.iroco-ui-radio input {
|
|
76
|
+
position: absolute;
|
|
77
|
+
opacity: 0;
|
|
78
|
+
cursor: pointer;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.radio-button-color {
|
|
82
|
+
position: absolute;
|
|
83
|
+
top: 0;
|
|
84
|
+
left: 0;
|
|
85
|
+
height: 1em;
|
|
86
|
+
width: 1em;
|
|
87
|
+
background-color: #f2ebe3;
|
|
88
|
+
border-radius: 50%;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.iroco-ui-radio input:checked ~ .radio-button-color {
|
|
92
|
+
background-color: #00d692;
|
|
93
|
+
}</style>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
label?: "" | undefined;
|
|
5
|
+
value: string | null;
|
|
6
|
+
group?: string | null | undefined;
|
|
7
|
+
name: string | null;
|
|
8
|
+
checked: boolean;
|
|
9
|
+
};
|
|
10
|
+
events: {
|
|
11
|
+
[evt: string]: CustomEvent<any>;
|
|
12
|
+
};
|
|
13
|
+
slots: {
|
|
14
|
+
default: {};
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export type RadioButtonProps = typeof __propDef.props;
|
|
18
|
+
export type RadioButtonEvents = typeof __propDef.events;
|
|
19
|
+
export type RadioButtonSlots = typeof __propDef.slots;
|
|
20
|
+
export default class RadioButton extends SvelteComponentTyped<RadioButtonProps, RadioButtonEvents, RadioButtonSlots> {
|
|
21
|
+
get label(): "";
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<svelte:options accessors={true} />
|
|
2
|
+
|
|
3
|
+
<script>import RadioButton from "./RadioButton.svelte";
|
|
4
|
+
export let group = "";
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<form>
|
|
8
|
+
<RadioButton bind:group value="first" name="name" checked>First</RadioButton>
|
|
9
|
+
<RadioButton bind:group value="second" name="name">Second</RadioButton>
|
|
10
|
+
</form>
|