@iroco/ui 1.0.0-4 → 1.0.0-5
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 +9 -14
- package/dist/Alert.stories.svelte +5 -4
- package/dist/Alert.svelte +1 -98
- package/dist/Button.stories.svelte +2 -2
- package/dist/Button.svelte +1 -98
- package/dist/DataTable.stories.svelte +13 -15
- package/dist/DataTable.svelte +1 -98
- package/dist/IconBurger.stories.svelte +3 -5
- package/dist/IconClose.stories.svelte +2 -4
- package/dist/IconFloppyDisk.stories.svelte +4 -7
- package/dist/IconInfo.stories.svelte +2 -5
- package/dist/IconIrocoLogo.stories.svelte +2 -5
- package/dist/IconMoreSign.stories.svelte +2 -5
- package/dist/IconTrashCan.stories.svelte +2 -5
- package/dist/IrocoLogo.stories.svelte +2 -8
- package/dist/Loader.stories.svelte +3 -7
- package/dist/NavBar.stories.svelte +13 -14
- package/dist/NavBar.svelte +1 -278
- package/dist/Navigation.stories.svelte +14 -15
- package/dist/Navigation.svelte +9 -139
- package/dist/NumberInput.stories.svelte +3 -6
- package/dist/NumberInput.svelte +1 -98
- package/dist/RadioButton.stories.svelte +4 -18
- package/dist/RadioButton.svelte +1 -98
- package/dist/TextInput.stories.svelte +11 -9
- package/dist/TextInput.svelte +1 -98
- package/dist/scss/button.scss +1 -1
- package/dist/scss/colors.scss +2 -60
- package/dist/scss/fields/_checkbox.scss +3 -3
- package/dist/scss/fields/_input.scss +7 -7
- package/dist/scss/forms.scss +1 -1
- package/dist/scss/style.scss +1 -1
- package/package.json +2 -1
|
@@ -19,8 +19,7 @@
|
|
|
19
19
|
color: {
|
|
20
20
|
control: { type: 'color' }
|
|
21
21
|
}
|
|
22
|
-
|
|
23
|
-
},
|
|
22
|
+
}
|
|
24
23
|
};
|
|
25
24
|
</script>
|
|
26
25
|
|
|
@@ -29,21 +28,21 @@
|
|
|
29
28
|
</script>
|
|
30
29
|
|
|
31
30
|
<Template let:args>
|
|
32
|
-
<Navigation
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
31
|
+
<Navigation
|
|
32
|
+
{...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
|
+
/>
|
|
43
42
|
</Template>
|
|
44
43
|
|
|
45
44
|
<Story name="Default" />
|
|
46
45
|
<Story name="Sidebar" args={{ type: 'sidebar' }} />
|
|
47
46
|
|
|
48
|
-
<Story name="Title" args={{ title: 'Alternative title' }}
|
|
49
|
-
<Story name="Color" args={{ color: '#ABCDEF' }}
|
|
47
|
+
<Story name="Title" args={{ title: 'Alternative title' }} />
|
|
48
|
+
<Story name="Color" args={{ color: '#ABCDEF' }} />
|
package/dist/Navigation.svelte
CHANGED
|
@@ -15,12 +15,12 @@ let showMenu = false;
|
|
|
15
15
|
|
|
16
16
|
<div class="navigation--mobile">
|
|
17
17
|
<div class="navigation--mobile__title-container">
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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}
|
|
24
24
|
</div>
|
|
25
25
|
|
|
26
26
|
<button title="Menu button" on:click={() => (showMenu = true)} class="navigation--mobile__button">
|
|
@@ -50,165 +50,58 @@ let showMenu = false;
|
|
|
50
50
|
<NavBar {navigationItems} {type} {version} />
|
|
51
51
|
</div>
|
|
52
52
|
|
|
53
|
-
<style>.
|
|
54
|
-
color: #00b9ff;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.font-color-darkBlue {
|
|
58
|
-
color: #211d28;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.font-color-nightBlue {
|
|
62
|
-
color: #18151e;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.font-color-green {
|
|
66
|
-
color: #00d692;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.font-color-red {
|
|
70
|
-
color: #ff504d;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.font-color-yellow {
|
|
74
|
-
color: #ffe032;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.font-color-beige {
|
|
78
|
-
color: #f2ebe3;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.font-color-darkBeige {
|
|
82
|
-
color: #a9a29e;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.font-color-mediumGrey {
|
|
86
|
-
color: #464452;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.font-color-darkGrey {
|
|
90
|
-
color: #33323a;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.font-color-lightGrey {
|
|
94
|
-
color: #f5f5f5;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
:root {
|
|
98
|
-
--color-white-op-20: rgba(255, 255, 255, 0.2);
|
|
99
|
-
--color-white-op-30: rgba(255, 255, 255, 0.3);
|
|
100
|
-
--color-black-op-20: rgba(0, 0, 0, 0.2);
|
|
101
|
-
--color-black-op-40: rgba(0, 0, 0, 0.4);
|
|
102
|
-
--color-black-op-60: rgba(0, 0, 0, 0.6);
|
|
103
|
-
--color-dark-blue-op-30: #211d284d;
|
|
104
|
-
/* semantic colors */
|
|
105
|
-
--color-primary-light: #82eec7;
|
|
106
|
-
--color-primary: #00d692;
|
|
107
|
-
--color-primary-bg: #00d69280;
|
|
108
|
-
--color-primary-dark: #00a873;
|
|
109
|
-
--color-secondary-light: #ffffff;
|
|
110
|
-
--color-secondary: #f2ebe3;
|
|
111
|
-
--color-secondary-dark: #a9a29e;
|
|
112
|
-
/* feedback */
|
|
113
|
-
--color-success: #00d692;
|
|
114
|
-
--color-success-bg: #00d69280;
|
|
115
|
-
--color-danger: #ff504d;
|
|
116
|
-
--color-danger-bg: #ff504d80;
|
|
117
|
-
--color-warning: #ffe032;
|
|
118
|
-
--color-warning-bg: #ffe03280;
|
|
119
|
-
/* typography */
|
|
120
|
-
--color-text-light: #ffffff;
|
|
121
|
-
--color-text: #f2ebe3;
|
|
122
|
-
--color-text-op-50: #f2ebe380;
|
|
123
|
-
--color-text-op-60: #f2ebe399;
|
|
124
|
-
--color-text-dark: #464452;
|
|
125
|
-
/* border */
|
|
126
|
-
--color-border: #464452;
|
|
127
|
-
/* body */
|
|
128
|
-
--color-body: #211d28;
|
|
129
|
-
/* forms */
|
|
130
|
-
--form-element-border: var(--color-border);
|
|
131
|
-
--form-element-bg: #f2ebe3;
|
|
132
|
-
--form-text-placeholder: #a9a29e;
|
|
133
|
-
/* buttons */
|
|
134
|
-
--btn-primary-bg: #f2ebe3;
|
|
135
|
-
--btn-primary-border: #18151e;
|
|
136
|
-
--btn-primary-label: #f2ebe3;
|
|
137
|
-
--dark-btn-primary-label: #f2ebe3;
|
|
138
|
-
--dark-btn-primary-bg: #18151e;
|
|
139
|
-
--btn-basic-label: #18151e;
|
|
140
|
-
--btn-basic-bg: #f2ebe3;
|
|
141
|
-
--btn-basic-border: #18151e;
|
|
142
|
-
--btn-disabled-label: var(--color-black-op-60);
|
|
143
|
-
--btn-disabled-bg: #a9a29e;
|
|
144
|
-
--btn-disabled-border: var(--color-black-op-60);
|
|
145
|
-
/* icons */
|
|
146
|
-
--color-icon-primary: #a9a29e;
|
|
147
|
-
--color-icon-secondary: inherit;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.container-wide {
|
|
53
|
+
<style>.container-wide {
|
|
151
54
|
width: calc(100% - 20px);
|
|
152
55
|
max-width: 2360px;
|
|
153
56
|
margin-left: auto;
|
|
154
57
|
margin-right: auto;
|
|
155
58
|
transition: max-width ease-out 200ms;
|
|
156
59
|
}
|
|
157
|
-
|
|
158
60
|
@media all and (max-width: 2560px) {
|
|
159
61
|
.container-wide {
|
|
160
62
|
max-width: 1620px;
|
|
161
63
|
}
|
|
162
64
|
}
|
|
163
|
-
|
|
164
65
|
@media all and (max-width: 1800px) {
|
|
165
66
|
.container-wide {
|
|
166
67
|
max-width: 1280px;
|
|
167
68
|
}
|
|
168
69
|
}
|
|
169
|
-
|
|
170
70
|
@media all and (max-width: 1440px) {
|
|
171
71
|
.container-wide {
|
|
172
72
|
max-width: 884px;
|
|
173
73
|
}
|
|
174
74
|
}
|
|
175
|
-
|
|
176
75
|
@media all and (max-width: 1024px) {
|
|
177
76
|
.container-wide {
|
|
178
77
|
max-width: 648px;
|
|
179
78
|
}
|
|
180
79
|
}
|
|
181
|
-
|
|
182
80
|
@media all and (max-width: 768px) {
|
|
183
81
|
.container-wide {
|
|
184
82
|
max-width: 496px;
|
|
185
83
|
}
|
|
186
84
|
}
|
|
187
|
-
|
|
188
85
|
@media all and (max-width: 596px) {
|
|
189
86
|
.container-wide {
|
|
190
87
|
max-width: 365px;
|
|
191
88
|
}
|
|
192
89
|
}
|
|
193
|
-
|
|
194
90
|
@media all and (max-width: 425px) {
|
|
195
91
|
.container-wide {
|
|
196
92
|
max-width: calc(100% - 60px);
|
|
197
93
|
}
|
|
198
94
|
}
|
|
199
|
-
|
|
200
95
|
@media all and (max-width: 375px) {
|
|
201
96
|
.container-wide {
|
|
202
97
|
max-width: calc(100% - 40px);
|
|
203
98
|
}
|
|
204
99
|
}
|
|
205
|
-
|
|
206
100
|
@media all and (max-width: 320px) {
|
|
207
101
|
.container-wide {
|
|
208
102
|
max-width: calc(100% - 20px);
|
|
209
103
|
}
|
|
210
104
|
}
|
|
211
|
-
|
|
212
105
|
.container-large {
|
|
213
106
|
width: calc(100% - 20px);
|
|
214
107
|
max-width: 1280px;
|
|
@@ -216,49 +109,41 @@ let showMenu = false;
|
|
|
216
109
|
margin-right: auto;
|
|
217
110
|
transition: max-width ease-out 200ms;
|
|
218
111
|
}
|
|
219
|
-
|
|
220
112
|
@media all and (max-width: 1440px) {
|
|
221
113
|
.container-large {
|
|
222
114
|
max-width: 884px;
|
|
223
115
|
}
|
|
224
116
|
}
|
|
225
|
-
|
|
226
117
|
@media all and (max-width: 1024px) {
|
|
227
118
|
.container-large {
|
|
228
119
|
max-width: 648px;
|
|
229
120
|
}
|
|
230
121
|
}
|
|
231
|
-
|
|
232
122
|
@media all and (max-width: 768px) {
|
|
233
123
|
.container-large {
|
|
234
124
|
max-width: 496px;
|
|
235
125
|
}
|
|
236
126
|
}
|
|
237
|
-
|
|
238
127
|
@media all and (max-width: 596px) {
|
|
239
128
|
.container-large {
|
|
240
129
|
max-width: 365px;
|
|
241
130
|
}
|
|
242
131
|
}
|
|
243
|
-
|
|
244
132
|
@media all and (max-width: 425px) {
|
|
245
133
|
.container-large {
|
|
246
134
|
max-width: calc(100% - 60px);
|
|
247
135
|
}
|
|
248
136
|
}
|
|
249
|
-
|
|
250
137
|
@media all and (max-width: 375px) {
|
|
251
138
|
.container-large {
|
|
252
139
|
max-width: calc(100% - 40px);
|
|
253
140
|
}
|
|
254
141
|
}
|
|
255
|
-
|
|
256
142
|
@media all and (max-width: 320px) {
|
|
257
143
|
.container-large {
|
|
258
144
|
max-width: calc(100% - 20px);
|
|
259
145
|
}
|
|
260
146
|
}
|
|
261
|
-
|
|
262
147
|
.container-medium {
|
|
263
148
|
width: calc(100% - 20px);
|
|
264
149
|
max-width: 884px;
|
|
@@ -266,43 +151,36 @@ let showMenu = false;
|
|
|
266
151
|
margin-right: auto;
|
|
267
152
|
transition: max-width ease-out 200ms;
|
|
268
153
|
}
|
|
269
|
-
|
|
270
154
|
@media all and (max-width: 1024px) {
|
|
271
155
|
.container-medium {
|
|
272
156
|
max-width: 648px;
|
|
273
157
|
}
|
|
274
158
|
}
|
|
275
|
-
|
|
276
159
|
@media all and (max-width: 768px) {
|
|
277
160
|
.container-medium {
|
|
278
161
|
max-width: 496px;
|
|
279
162
|
}
|
|
280
163
|
}
|
|
281
|
-
|
|
282
164
|
@media all and (max-width: 596px) {
|
|
283
165
|
.container-medium {
|
|
284
166
|
max-width: 365px;
|
|
285
167
|
}
|
|
286
168
|
}
|
|
287
|
-
|
|
288
169
|
@media all and (max-width: 425px) {
|
|
289
170
|
.container-medium {
|
|
290
171
|
max-width: calc(100% - 60px);
|
|
291
172
|
}
|
|
292
173
|
}
|
|
293
|
-
|
|
294
174
|
@media all and (max-width: 375px) {
|
|
295
175
|
.container-medium {
|
|
296
176
|
max-width: calc(100% - 40px);
|
|
297
177
|
}
|
|
298
178
|
}
|
|
299
|
-
|
|
300
179
|
@media all and (max-width: 320px) {
|
|
301
180
|
.container-medium {
|
|
302
181
|
max-width: calc(100% - 20px);
|
|
303
182
|
}
|
|
304
183
|
}
|
|
305
|
-
|
|
306
184
|
.container-small {
|
|
307
185
|
width: calc(100% - 20px);
|
|
308
186
|
max-width: 496px;
|
|
@@ -310,25 +188,21 @@ let showMenu = false;
|
|
|
310
188
|
margin-right: auto;
|
|
311
189
|
transition: max-width ease-out 200ms;
|
|
312
190
|
}
|
|
313
|
-
|
|
314
191
|
@media all and (max-width: 425px) {
|
|
315
192
|
.container-small {
|
|
316
193
|
max-width: calc(100% - 60px);
|
|
317
194
|
}
|
|
318
195
|
}
|
|
319
|
-
|
|
320
196
|
@media all and (max-width: 375px) {
|
|
321
197
|
.container-small {
|
|
322
198
|
max-width: calc(100% - 40px);
|
|
323
199
|
}
|
|
324
200
|
}
|
|
325
|
-
|
|
326
201
|
@media all and (max-width: 320px) {
|
|
327
202
|
.container-small {
|
|
328
203
|
max-width: calc(100% - 20px);
|
|
329
204
|
}
|
|
330
205
|
}
|
|
331
|
-
|
|
332
206
|
.navigation {
|
|
333
207
|
display: flex;
|
|
334
208
|
flex-direction: row;
|
|
@@ -336,21 +210,17 @@ let showMenu = false;
|
|
|
336
210
|
align-items: center;
|
|
337
211
|
width: 100%;
|
|
338
212
|
}
|
|
339
|
-
|
|
340
213
|
.navigation--mobile {
|
|
341
214
|
display: none;
|
|
342
215
|
}
|
|
343
|
-
|
|
344
216
|
.navigation__title-container {
|
|
345
217
|
display: flex;
|
|
346
218
|
align-items: center;
|
|
347
219
|
padding-left: 1em;
|
|
348
220
|
}
|
|
349
|
-
|
|
350
221
|
.navigation__title-container h1 {
|
|
351
222
|
padding-left: 1em;
|
|
352
223
|
}
|
|
353
|
-
|
|
354
224
|
@media all and (max-width: 768px) {
|
|
355
225
|
.navigation {
|
|
356
226
|
display: none;
|
|
@@ -382,7 +252,7 @@ let showMenu = false;
|
|
|
382
252
|
padding-left: 0.5em;
|
|
383
253
|
}
|
|
384
254
|
}
|
|
385
|
-
|
|
386
|
-
.
|
|
255
|
+
.navigation__title-link,
|
|
256
|
+
.navigation-mobile__title-link {
|
|
387
257
|
color: var(--color-text-light);
|
|
388
258
|
}</style>
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
<script context="module">
|
|
2
|
-
|
|
3
2
|
import { NumberInput } from './index';
|
|
4
3
|
|
|
5
4
|
export const meta = {
|
|
@@ -27,7 +26,6 @@
|
|
|
27
26
|
max: {
|
|
28
27
|
control: { type: 'number' }
|
|
29
28
|
}
|
|
30
|
-
|
|
31
29
|
}
|
|
32
30
|
};
|
|
33
31
|
</script>
|
|
@@ -38,13 +36,12 @@
|
|
|
38
36
|
|
|
39
37
|
<Template let:args>
|
|
40
38
|
<form class="iroco-ui-form">
|
|
41
|
-
<NumberInput {...args}
|
|
42
|
-
</NumberInput>
|
|
39
|
+
<NumberInput {...args} />
|
|
43
40
|
</form>
|
|
44
41
|
</Template>
|
|
45
42
|
|
|
46
|
-
<Story name="Default"
|
|
43
|
+
<Story name="Default" />
|
|
47
44
|
<Story name="Label" args={{ label: 'Label' }} />
|
|
48
45
|
<Story name="Error" args={{ error: 'An error message' }} />
|
|
49
46
|
<Story name="Placeholder" args={{ placeholder: 'A placeholder' }} />
|
|
50
|
-
<Story name="Min / Max" args={{ min: 0,max:10,value: 5 }} />
|
|
47
|
+
<Story name="Min / Max" args={{ min: 0, max: 10, value: 5 }} />
|
package/dist/NumberInput.svelte
CHANGED
|
@@ -17,104 +17,7 @@ export let max;
|
|
|
17
17
|
{/if}
|
|
18
18
|
</div>
|
|
19
19
|
|
|
20
|
-
<style>.
|
|
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
|
-
:root {
|
|
65
|
-
--color-white-op-20: rgba(255, 255, 255, 0.2);
|
|
66
|
-
--color-white-op-30: rgba(255, 255, 255, 0.3);
|
|
67
|
-
--color-black-op-20: rgba(0, 0, 0, 0.2);
|
|
68
|
-
--color-black-op-40: rgba(0, 0, 0, 0.4);
|
|
69
|
-
--color-black-op-60: rgba(0, 0, 0, 0.6);
|
|
70
|
-
--color-dark-blue-op-30: #211d284d;
|
|
71
|
-
/* semantic colors */
|
|
72
|
-
--color-primary-light: #82eec7;
|
|
73
|
-
--color-primary: #00d692;
|
|
74
|
-
--color-primary-bg: #00d69280;
|
|
75
|
-
--color-primary-dark: #00a873;
|
|
76
|
-
--color-secondary-light: #ffffff;
|
|
77
|
-
--color-secondary: #f2ebe3;
|
|
78
|
-
--color-secondary-dark: #a9a29e;
|
|
79
|
-
/* feedback */
|
|
80
|
-
--color-success: #00d692;
|
|
81
|
-
--color-success-bg: #00d69280;
|
|
82
|
-
--color-danger: #ff504d;
|
|
83
|
-
--color-danger-bg: #ff504d80;
|
|
84
|
-
--color-warning: #ffe032;
|
|
85
|
-
--color-warning-bg: #ffe03280;
|
|
86
|
-
/* typography */
|
|
87
|
-
--color-text-light: #ffffff;
|
|
88
|
-
--color-text: #f2ebe3;
|
|
89
|
-
--color-text-op-50: #f2ebe380;
|
|
90
|
-
--color-text-op-60: #f2ebe399;
|
|
91
|
-
--color-text-dark: #464452;
|
|
92
|
-
/* border */
|
|
93
|
-
--color-border: #464452;
|
|
94
|
-
/* body */
|
|
95
|
-
--color-body: #211d28;
|
|
96
|
-
/* forms */
|
|
97
|
-
--form-element-border: var(--color-border);
|
|
98
|
-
--form-element-bg: #f2ebe3;
|
|
99
|
-
--form-text-placeholder: #a9a29e;
|
|
100
|
-
/* buttons */
|
|
101
|
-
--btn-primary-bg: #f2ebe3;
|
|
102
|
-
--btn-primary-border: #18151e;
|
|
103
|
-
--btn-primary-label: #f2ebe3;
|
|
104
|
-
--dark-btn-primary-label: #f2ebe3;
|
|
105
|
-
--dark-btn-primary-bg: #18151e;
|
|
106
|
-
--btn-basic-label: #18151e;
|
|
107
|
-
--btn-basic-bg: #f2ebe3;
|
|
108
|
-
--btn-basic-border: #18151e;
|
|
109
|
-
--btn-disabled-label: var(--color-black-op-60);
|
|
110
|
-
--btn-disabled-bg: #a9a29e;
|
|
111
|
-
--btn-disabled-border: var(--color-black-op-60);
|
|
112
|
-
/* icons */
|
|
113
|
-
--color-icon-primary: #a9a29e;
|
|
114
|
-
--color-icon-secondary: inherit;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.iroco-ui-form input,
|
|
20
|
+
<style>.iroco-ui-form input,
|
|
118
21
|
.iroco-ui-form textarea {
|
|
119
22
|
outline: none;
|
|
120
23
|
text-decoration: none;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
<script context="module">
|
|
2
|
-
|
|
3
2
|
import { RadioButton } from './index';
|
|
4
3
|
|
|
5
4
|
export const meta = {
|
|
@@ -18,7 +17,6 @@
|
|
|
18
17
|
checked: {
|
|
19
18
|
control: { type: 'boolean' }
|
|
20
19
|
}
|
|
21
|
-
|
|
22
20
|
}
|
|
23
21
|
};
|
|
24
22
|
</script>
|
|
@@ -31,23 +29,11 @@
|
|
|
31
29
|
|
|
32
30
|
<Template let:args>
|
|
33
31
|
<form class="iroco-ui-form">
|
|
34
|
-
<RadioButton bind:group={
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
Hello
|
|
38
|
-
</RadioButton>
|
|
39
|
-
<RadioButton bind:group={group}
|
|
40
|
-
name="name-foo"
|
|
41
|
-
value="foo" >
|
|
42
|
-
Foo
|
|
43
|
-
</RadioButton>
|
|
44
|
-
<RadioButton bind:group={group}
|
|
45
|
-
name="name-bar"
|
|
46
|
-
value="bar" >
|
|
47
|
-
Bar
|
|
48
|
-
</RadioButton>
|
|
32
|
+
<RadioButton bind:group name="name-hello" value="hello" {...args}>Hello</RadioButton>
|
|
33
|
+
<RadioButton bind:group name="name-foo" value="foo">Foo</RadioButton>
|
|
34
|
+
<RadioButton bind:group name="name-bar" value="bar">Bar</RadioButton>
|
|
49
35
|
</form>
|
|
50
36
|
Selected group : {group}
|
|
51
37
|
</Template>
|
|
52
38
|
|
|
53
|
-
<Story name="Default"
|
|
39
|
+
<Story name="Default" />
|
package/dist/RadioButton.svelte
CHANGED
|
@@ -15,104 +15,7 @@ $:
|
|
|
15
15
|
<slot />
|
|
16
16
|
</label>
|
|
17
17
|
|
|
18
|
-
<style>.
|
|
19
|
-
color: #00b9ff;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.font-color-darkBlue {
|
|
23
|
-
color: #211d28;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.font-color-nightBlue {
|
|
27
|
-
color: #18151e;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.font-color-green {
|
|
31
|
-
color: #00d692;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.font-color-red {
|
|
35
|
-
color: #ff504d;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.font-color-yellow {
|
|
39
|
-
color: #ffe032;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.font-color-beige {
|
|
43
|
-
color: #f2ebe3;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.font-color-darkBeige {
|
|
47
|
-
color: #a9a29e;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.font-color-mediumGrey {
|
|
51
|
-
color: #464452;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.font-color-darkGrey {
|
|
55
|
-
color: #33323a;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.font-color-lightGrey {
|
|
59
|
-
color: #f5f5f5;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
:root {
|
|
63
|
-
--color-white-op-20: rgba(255, 255, 255, 0.2);
|
|
64
|
-
--color-white-op-30: rgba(255, 255, 255, 0.3);
|
|
65
|
-
--color-black-op-20: rgba(0, 0, 0, 0.2);
|
|
66
|
-
--color-black-op-40: rgba(0, 0, 0, 0.4);
|
|
67
|
-
--color-black-op-60: rgba(0, 0, 0, 0.6);
|
|
68
|
-
--color-dark-blue-op-30: #211d284d;
|
|
69
|
-
/* semantic colors */
|
|
70
|
-
--color-primary-light: #82eec7;
|
|
71
|
-
--color-primary: #00d692;
|
|
72
|
-
--color-primary-bg: #00d69280;
|
|
73
|
-
--color-primary-dark: #00a873;
|
|
74
|
-
--color-secondary-light: #ffffff;
|
|
75
|
-
--color-secondary: #f2ebe3;
|
|
76
|
-
--color-secondary-dark: #a9a29e;
|
|
77
|
-
/* feedback */
|
|
78
|
-
--color-success: #00d692;
|
|
79
|
-
--color-success-bg: #00d69280;
|
|
80
|
-
--color-danger: #ff504d;
|
|
81
|
-
--color-danger-bg: #ff504d80;
|
|
82
|
-
--color-warning: #ffe032;
|
|
83
|
-
--color-warning-bg: #ffe03280;
|
|
84
|
-
/* typography */
|
|
85
|
-
--color-text-light: #ffffff;
|
|
86
|
-
--color-text: #f2ebe3;
|
|
87
|
-
--color-text-op-50: #f2ebe380;
|
|
88
|
-
--color-text-op-60: #f2ebe399;
|
|
89
|
-
--color-text-dark: #464452;
|
|
90
|
-
/* border */
|
|
91
|
-
--color-border: #464452;
|
|
92
|
-
/* body */
|
|
93
|
-
--color-body: #211d28;
|
|
94
|
-
/* forms */
|
|
95
|
-
--form-element-border: var(--color-border);
|
|
96
|
-
--form-element-bg: #f2ebe3;
|
|
97
|
-
--form-text-placeholder: #a9a29e;
|
|
98
|
-
/* buttons */
|
|
99
|
-
--btn-primary-bg: #f2ebe3;
|
|
100
|
-
--btn-primary-border: #18151e;
|
|
101
|
-
--btn-primary-label: #f2ebe3;
|
|
102
|
-
--dark-btn-primary-label: #f2ebe3;
|
|
103
|
-
--dark-btn-primary-bg: #18151e;
|
|
104
|
-
--btn-basic-label: #18151e;
|
|
105
|
-
--btn-basic-bg: #f2ebe3;
|
|
106
|
-
--btn-basic-border: #18151e;
|
|
107
|
-
--btn-disabled-label: var(--color-black-op-60);
|
|
108
|
-
--btn-disabled-bg: #a9a29e;
|
|
109
|
-
--btn-disabled-border: var(--color-black-op-60);
|
|
110
|
-
/* icons */
|
|
111
|
-
--color-icon-primary: #a9a29e;
|
|
112
|
-
--color-icon-secondary: inherit;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
.iroco-ui-radio {
|
|
18
|
+
<style>.iroco-ui-radio {
|
|
116
19
|
color: var(--color-text);
|
|
117
20
|
position: relative;
|
|
118
21
|
margin-top: 0.5em;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
<script context="module">
|
|
2
|
-
|
|
3
|
-
|
|
4
2
|
import { TextInput } from './index';
|
|
5
3
|
|
|
6
4
|
export const meta = {
|
|
@@ -50,17 +48,15 @@
|
|
|
50
48
|
|
|
51
49
|
<script>
|
|
52
50
|
import { Story, Template } from '@storybook/addon-svelte-csf';
|
|
53
|
-
|
|
54
|
-
let group = 'bar';
|
|
55
51
|
</script>
|
|
56
52
|
|
|
57
53
|
<Template let:args>
|
|
58
54
|
<form class="iroco-ui-form">
|
|
59
|
-
<TextInput {...args}
|
|
55
|
+
<TextInput {...args} />
|
|
60
56
|
</form>
|
|
61
57
|
</Template>
|
|
62
58
|
|
|
63
|
-
<Story name="Default"
|
|
59
|
+
<Story name="Default" />
|
|
64
60
|
<Story name="Text" args={{ type: 'text' }} />
|
|
65
61
|
<Story name="Email" args={{ type: 'email' }} />
|
|
66
62
|
<Story name="Password" args={{ type: 'password' }} />
|
|
@@ -68,8 +64,14 @@
|
|
|
68
64
|
<Story name="Error" args={{ error: 'An error message' }} />
|
|
69
65
|
<Story name="Placeholder" args={{ placeholder: 'A placeholder' }} />
|
|
70
66
|
<Story name="Border" args={{ placeholder: 'A placeholder' }} />
|
|
71
|
-
<Story
|
|
67
|
+
<Story
|
|
68
|
+
name="Html Error"
|
|
69
|
+
args={{
|
|
70
|
+
error: `<details>
|
|
72
71
|
<summary>HTML error</summary>
|
|
73
72
|
<p>Foo bar</p>
|
|
74
|
-
</details>`,
|
|
75
|
-
|
|
73
|
+
</details>`,
|
|
74
|
+
htmlError: true
|
|
75
|
+
}}
|
|
76
|
+
/>
|
|
77
|
+
<Story name="Autocomplete" args={{ type: 'text', autocomplete: 'name' }} />
|