@iroco/ui 1.0.0-9 → 1.0.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/README.md +7 -5
- package/dist/Alert.stories.svelte +19 -20
- package/dist/Alert.stories.svelte.d.ts +17 -35
- package/dist/Alert.svelte +12 -5
- package/dist/Alert.svelte.d.ts +7 -18
- package/dist/Button.stories.svelte +16 -12
- package/dist/Button.stories.svelte.d.ts +17 -43
- package/dist/Button.svelte +41 -12
- package/dist/Button.svelte.d.ts +20 -38
- package/dist/DataTable.stories.svelte +24 -19
- package/dist/DataTable.stories.svelte.d.ts +17 -27
- package/dist/DataTable.svelte +40 -25
- package/dist/DataTable.svelte.d.ts +17 -24
- package/dist/IconBurger.stories.svelte +8 -12
- package/dist/IconBurger.stories.svelte.d.ts +17 -46
- package/dist/IconBurger.svelte +7 -2
- package/dist/IconBurger.svelte.d.ts +6 -16
- package/dist/IconClose.stories.svelte +6 -12
- package/dist/IconClose.stories.svelte.d.ts +17 -46
- package/dist/IconClose.svelte +7 -2
- package/dist/IconClose.svelte.d.ts +6 -16
- package/dist/IconFloppyDisk.stories.svelte +4 -11
- package/dist/IconFloppyDisk.stories.svelte.d.ts +17 -53
- package/dist/IconFloppyDisk.svelte +8 -3
- package/dist/IconFloppyDisk.svelte.d.ts +7 -17
- package/dist/IconInfo.stories.svelte +8 -11
- package/dist/IconInfo.stories.svelte.d.ts +17 -48
- package/dist/IconInfo.svelte +7 -2
- package/dist/IconInfo.svelte.d.ts +6 -16
- package/dist/IconIrocoLogo.stories.svelte +8 -8
- package/dist/IconIrocoLogo.stories.svelte.d.ts +17 -55
- package/dist/IconIrocoLogo.svelte +16 -6
- package/dist/IconIrocoLogo.svelte.d.ts +9 -19
- package/dist/IconMoreSign.stories.svelte +7 -14
- package/dist/IconMoreSign.stories.svelte.d.ts +17 -48
- package/dist/IconMoreSign.svelte +7 -2
- package/dist/IconMoreSign.svelte.d.ts +6 -16
- package/dist/IconTrashCan.stories.svelte +6 -12
- package/dist/IconTrashCan.stories.svelte.d.ts +17 -48
- package/dist/IconTrashCan.svelte +8 -3
- package/dist/IconTrashCan.svelte.d.ts +7 -17
- package/dist/ImageArticle.stories.svelte +11 -8
- package/dist/ImageArticle.stories.svelte.d.ts +17 -64
- package/dist/ImageArticle.svelte +37 -165
- package/dist/ImageArticle.svelte.d.ts +11 -21
- package/dist/IrocoLogo.stories.svelte +12 -7
- package/dist/IrocoLogo.stories.svelte.d.ts +17 -48
- package/dist/IrocoLogo.svelte +13 -4
- package/dist/IrocoLogo.svelte.d.ts +8 -18
- package/dist/Loader.stories.svelte +11 -8
- package/dist/Loader.stories.svelte.d.ts +17 -27
- package/dist/Loader.svelte +19 -18
- package/dist/Loader.svelte.d.ts +16 -12
- package/dist/NavBar.stories.svelte +29 -20
- package/dist/NavBar.stories.svelte.d.ts +17 -35
- package/dist/NavBar.svelte +51 -183
- package/dist/NavBar.svelte.d.ts +31 -20
- package/dist/Navigation.stories.svelte +30 -28
- package/dist/Navigation.stories.svelte.d.ts +17 -57
- package/dist/Navigation.svelte +32 -14
- package/dist/Navigation.svelte.d.ts +18 -20
- package/dist/NumberInput.stories.svelte +12 -7
- package/dist/NumberInput.stories.svelte.d.ts +17 -75
- package/dist/NumberInput.svelte +26 -8
- package/dist/NumberInput.svelte.d.ts +13 -24
- package/dist/RadioButton.stories.svelte +17 -30
- package/dist/RadioButton.stories.svelte.d.ts +17 -54
- package/dist/RadioButton.svelte +25 -11
- package/dist/RadioButton.svelte.d.ts +10 -20
- package/dist/SlottedComponentWrapper.svelte +4 -4
- package/dist/SlottedComponentWrapper.svelte.d.ts +4 -22
- package/dist/TextInput.stories.svelte +24 -47
- package/dist/TextInput.stories.svelte.d.ts +17 -109
- package/dist/TextInput.svelte +46 -25
- package/dist/TextInput.svelte.d.ts +19 -30
- package/dist/definition.d.ts +0 -5
- package/dist/definition.js +0 -11
- package/dist/index.d.ts +14 -10
- package/dist/index.js +14 -10
- package/dist/scss/button.scss +7 -3
- package/dist/scss/colors.scss +21 -11
- package/dist/scss/fields/_input.scss +1 -1
- package/dist/scss/fields/_style.scss +2 -2
- package/package.json +49 -48
- package/dist/RadioButtonTest.svelte +0 -10
- package/dist/RadioButtonTest.svelte.d.ts +0 -19
package/dist/ImageArticle.svelte
CHANGED
|
@@ -1,12 +1,27 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { ButtonModel } from './definition';
|
|
3
|
+
import { Icon } from 'svelte-awesome';
|
|
4
|
+
import chevronRight from 'svelte-awesome/icons/chevronRight';
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
imgSrc: string;
|
|
8
|
+
figureCaption?: string | undefined;
|
|
9
|
+
alt: string;
|
|
10
|
+
articleTitle: string;
|
|
11
|
+
articleContent: string;
|
|
12
|
+
buttonList?: ButtonModel[];
|
|
13
|
+
reversed?: boolean;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
let {
|
|
17
|
+
imgSrc,
|
|
18
|
+
figureCaption = undefined,
|
|
19
|
+
alt,
|
|
20
|
+
articleTitle,
|
|
21
|
+
articleContent,
|
|
22
|
+
buttonList = [],
|
|
23
|
+
reversed = false
|
|
24
|
+
}: Props = $props();
|
|
10
25
|
</script>
|
|
11
26
|
|
|
12
27
|
<div class="imagearticle" class:reversed>
|
|
@@ -89,6 +104,7 @@ export let reversed = false;
|
|
|
89
104
|
max-width: calc(100% - 20px);
|
|
90
105
|
}
|
|
91
106
|
}
|
|
107
|
+
|
|
92
108
|
.container-large {
|
|
93
109
|
width: calc(100% - 20px);
|
|
94
110
|
max-width: 1280px;
|
|
@@ -131,6 +147,7 @@ export let reversed = false;
|
|
|
131
147
|
max-width: calc(100% - 20px);
|
|
132
148
|
}
|
|
133
149
|
}
|
|
150
|
+
|
|
134
151
|
.container-medium {
|
|
135
152
|
width: calc(100% - 20px);
|
|
136
153
|
max-width: 884px;
|
|
@@ -168,6 +185,7 @@ export let reversed = false;
|
|
|
168
185
|
max-width: calc(100% - 20px);
|
|
169
186
|
}
|
|
170
187
|
}
|
|
188
|
+
|
|
171
189
|
.container-small {
|
|
172
190
|
width: calc(100% - 20px);
|
|
173
191
|
max-width: 496px;
|
|
@@ -190,159 +208,7 @@ export let reversed = false;
|
|
|
190
208
|
max-width: calc(100% - 20px);
|
|
191
209
|
}
|
|
192
210
|
}
|
|
193
|
-
|
|
194
|
-
width: calc(100% - 20px);
|
|
195
|
-
max-width: 2360px;
|
|
196
|
-
margin-left: auto;
|
|
197
|
-
margin-right: auto;
|
|
198
|
-
transition: max-width ease-out 200ms;
|
|
199
|
-
}
|
|
200
|
-
@media all and (max-width: 2560px) {
|
|
201
|
-
.container-wide {
|
|
202
|
-
max-width: 1620px;
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
@media all and (max-width: 1800px) {
|
|
206
|
-
.container-wide {
|
|
207
|
-
max-width: 1280px;
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
@media all and (max-width: 1440px) {
|
|
211
|
-
.container-wide {
|
|
212
|
-
max-width: 884px;
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
@media all and (max-width: 1024px) {
|
|
216
|
-
.container-wide {
|
|
217
|
-
max-width: 648px;
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
@media all and (max-width: 768px) {
|
|
221
|
-
.container-wide {
|
|
222
|
-
max-width: 496px;
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
@media all and (max-width: 596px) {
|
|
226
|
-
.container-wide {
|
|
227
|
-
max-width: 365px;
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
@media all and (max-width: 425px) {
|
|
231
|
-
.container-wide {
|
|
232
|
-
max-width: calc(100% - 60px);
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
@media all and (max-width: 375px) {
|
|
236
|
-
.container-wide {
|
|
237
|
-
max-width: calc(100% - 40px);
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
@media all and (max-width: 320px) {
|
|
241
|
-
.container-wide {
|
|
242
|
-
max-width: calc(100% - 20px);
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
.container-large {
|
|
246
|
-
width: calc(100% - 20px);
|
|
247
|
-
max-width: 1280px;
|
|
248
|
-
margin-left: auto;
|
|
249
|
-
margin-right: auto;
|
|
250
|
-
transition: max-width ease-out 200ms;
|
|
251
|
-
}
|
|
252
|
-
@media all and (max-width: 1440px) {
|
|
253
|
-
.container-large {
|
|
254
|
-
max-width: 884px;
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
@media all and (max-width: 1024px) {
|
|
258
|
-
.container-large {
|
|
259
|
-
max-width: 648px;
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
@media all and (max-width: 768px) {
|
|
263
|
-
.container-large {
|
|
264
|
-
max-width: 496px;
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
@media all and (max-width: 596px) {
|
|
268
|
-
.container-large {
|
|
269
|
-
max-width: 365px;
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
@media all and (max-width: 425px) {
|
|
273
|
-
.container-large {
|
|
274
|
-
max-width: calc(100% - 60px);
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
@media all and (max-width: 375px) {
|
|
278
|
-
.container-large {
|
|
279
|
-
max-width: calc(100% - 40px);
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
@media all and (max-width: 320px) {
|
|
283
|
-
.container-large {
|
|
284
|
-
max-width: calc(100% - 20px);
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
.container-medium {
|
|
288
|
-
width: calc(100% - 20px);
|
|
289
|
-
max-width: 884px;
|
|
290
|
-
margin-left: auto;
|
|
291
|
-
margin-right: auto;
|
|
292
|
-
transition: max-width ease-out 200ms;
|
|
293
|
-
}
|
|
294
|
-
@media all and (max-width: 1024px) {
|
|
295
|
-
.container-medium {
|
|
296
|
-
max-width: 648px;
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
@media all and (max-width: 768px) {
|
|
300
|
-
.container-medium {
|
|
301
|
-
max-width: 496px;
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
@media all and (max-width: 596px) {
|
|
305
|
-
.container-medium {
|
|
306
|
-
max-width: 365px;
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
@media all and (max-width: 425px) {
|
|
310
|
-
.container-medium {
|
|
311
|
-
max-width: calc(100% - 60px);
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
@media all and (max-width: 375px) {
|
|
315
|
-
.container-medium {
|
|
316
|
-
max-width: calc(100% - 40px);
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
@media all and (max-width: 320px) {
|
|
320
|
-
.container-medium {
|
|
321
|
-
max-width: calc(100% - 20px);
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
.container-small {
|
|
325
|
-
width: calc(100% - 20px);
|
|
326
|
-
max-width: 496px;
|
|
327
|
-
margin-left: auto;
|
|
328
|
-
margin-right: auto;
|
|
329
|
-
transition: max-width ease-out 200ms;
|
|
330
|
-
}
|
|
331
|
-
@media all and (max-width: 425px) {
|
|
332
|
-
.container-small {
|
|
333
|
-
max-width: calc(100% - 60px);
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
@media all and (max-width: 375px) {
|
|
337
|
-
.container-small {
|
|
338
|
-
max-width: calc(100% - 40px);
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
@media all and (max-width: 320px) {
|
|
342
|
-
.container-small {
|
|
343
|
-
max-width: calc(100% - 20px);
|
|
344
|
-
}
|
|
345
|
-
}
|
|
211
|
+
|
|
346
212
|
.iroco-ui-button {
|
|
347
213
|
cursor: pointer;
|
|
348
214
|
-webkit-touch-callout: none;
|
|
@@ -358,9 +224,9 @@ export let reversed = false;
|
|
|
358
224
|
border-radius: 0.3em;
|
|
359
225
|
}
|
|
360
226
|
.iroco-ui-button--basic {
|
|
361
|
-
color: var(--btn-
|
|
362
|
-
background: var(--btn-
|
|
363
|
-
border: 1px solid var(--btn-
|
|
227
|
+
color: var(--btn-secondary-label);
|
|
228
|
+
background: var(--btn-secondary-bg);
|
|
229
|
+
border: 1px solid var(--btn-secondary-border);
|
|
364
230
|
}
|
|
365
231
|
.iroco-ui-button--dark {
|
|
366
232
|
background: var(--dark-btn-primary-bg);
|
|
@@ -397,6 +263,10 @@ export let reversed = false;
|
|
|
397
263
|
.iroco-ui-button.disabled:hover, .iroco-ui-button:disabled:hover {
|
|
398
264
|
box-shadow: none;
|
|
399
265
|
}
|
|
266
|
+
.iroco-ui-button--full-width {
|
|
267
|
+
width: 100%;
|
|
268
|
+
}
|
|
269
|
+
|
|
400
270
|
.iroco-ui-link {
|
|
401
271
|
background: none;
|
|
402
272
|
border: none;
|
|
@@ -404,6 +274,7 @@ export let reversed = false;
|
|
|
404
274
|
color: var(--color-text);
|
|
405
275
|
cursor: pointer;
|
|
406
276
|
}
|
|
277
|
+
|
|
407
278
|
.imagearticle {
|
|
408
279
|
display: flex;
|
|
409
280
|
justify-content: space-around;
|
|
@@ -436,6 +307,7 @@ export let reversed = false;
|
|
|
436
307
|
.imagearticle.reversed {
|
|
437
308
|
flex-direction: row-reverse;
|
|
438
309
|
}
|
|
310
|
+
|
|
439
311
|
@media all and (max-width: 768px) {
|
|
440
312
|
.imagearticle {
|
|
441
313
|
display: block;
|
|
@@ -1,23 +1,13 @@
|
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
|
2
1
|
import type { ButtonModel } from './definition';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
reversed?: boolean | undefined;
|
|
12
|
-
};
|
|
13
|
-
events: {
|
|
14
|
-
[evt: string]: CustomEvent<any>;
|
|
15
|
-
};
|
|
16
|
-
slots: {};
|
|
17
|
-
};
|
|
18
|
-
export type ImageArticleProps = typeof __propDef.props;
|
|
19
|
-
export type ImageArticleEvents = typeof __propDef.events;
|
|
20
|
-
export type ImageArticleSlots = typeof __propDef.slots;
|
|
21
|
-
export default class ImageArticle extends SvelteComponent<ImageArticleProps, ImageArticleEvents, ImageArticleSlots> {
|
|
2
|
+
interface Props {
|
|
3
|
+
imgSrc: string;
|
|
4
|
+
figureCaption?: string | undefined;
|
|
5
|
+
alt: string;
|
|
6
|
+
articleTitle: string;
|
|
7
|
+
articleContent: string;
|
|
8
|
+
buttonList?: ButtonModel[];
|
|
9
|
+
reversed?: boolean;
|
|
22
10
|
}
|
|
23
|
-
|
|
11
|
+
declare const ImageArticle: import("svelte").Component<Props, {}, "">;
|
|
12
|
+
type ImageArticle = ReturnType<typeof ImageArticle>;
|
|
13
|
+
export default ImageArticle;
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
<script
|
|
1
|
+
<script module lang="ts">
|
|
2
2
|
import { IrocoLogo } from './index';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
import {defineMeta,setTemplate} from '@storybook/addon-svelte-csf'
|
|
5
|
+
|
|
6
|
+
const {Story} = defineMeta({
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
5
10
|
title: 'Iroco-UI/Iroco/IrocoLogo',
|
|
6
11
|
type: 'Icons',
|
|
7
12
|
component: IrocoLogo,
|
|
@@ -17,15 +22,15 @@
|
|
|
17
22
|
max: 512
|
|
18
23
|
}
|
|
19
24
|
}
|
|
20
|
-
}
|
|
25
|
+
})
|
|
21
26
|
</script>
|
|
22
27
|
|
|
23
|
-
<script>
|
|
24
|
-
|
|
28
|
+
<script lang="ts">
|
|
29
|
+
setTemplate(template);
|
|
25
30
|
</script>
|
|
26
31
|
|
|
27
|
-
|
|
32
|
+
{#snippet template({ ...args })}
|
|
28
33
|
<IrocoLogo {...args} />
|
|
29
|
-
|
|
34
|
+
{/snippet}
|
|
30
35
|
|
|
31
36
|
<Story name="Default" />
|
|
@@ -1,50 +1,19 @@
|
|
|
1
|
-
export namespace meta {
|
|
2
|
-
export let title: string;
|
|
3
|
-
export let type: string;
|
|
4
|
-
export { IrocoLogo as component };
|
|
5
|
-
export namespace argTypes {
|
|
6
|
-
namespace width {
|
|
7
|
-
namespace control {
|
|
8
|
-
let type_1: string;
|
|
9
|
-
export { type_1 as type };
|
|
10
|
-
}
|
|
11
|
-
let min: number;
|
|
12
|
-
let max: number;
|
|
13
|
-
}
|
|
14
|
-
namespace height {
|
|
15
|
-
export namespace control_1 {
|
|
16
|
-
let type_2: string;
|
|
17
|
-
export { type_2 as type };
|
|
18
|
-
}
|
|
19
|
-
export { control_1 as control };
|
|
20
|
-
let min_1: number;
|
|
21
|
-
export { min_1 as min };
|
|
22
|
-
let max_1: number;
|
|
23
|
-
export { max_1 as max };
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
/** @typedef {typeof __propDef.props} IrocoLogoProps */
|
|
28
|
-
/** @typedef {typeof __propDef.events} IrocoLogoEvents */
|
|
29
|
-
/** @typedef {typeof __propDef.slots} IrocoLogoSlots */
|
|
30
|
-
export default class IrocoLogo extends SvelteComponent<{
|
|
31
|
-
[x: string]: never;
|
|
32
|
-
}, {
|
|
33
|
-
[evt: string]: CustomEvent<any>;
|
|
34
|
-
}, {}> {
|
|
35
|
-
}
|
|
36
|
-
export type IrocoLogoProps = typeof __propDef.props;
|
|
37
|
-
export type IrocoLogoEvents = typeof __propDef.events;
|
|
38
|
-
export type IrocoLogoSlots = typeof __propDef.slots;
|
|
39
1
|
import { IrocoLogo } from './index';
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
2
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
3
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
4
|
+
$$bindings?: Bindings;
|
|
5
|
+
} & Exports;
|
|
6
|
+
(internal: unknown, props: {
|
|
7
|
+
$$events?: Events;
|
|
8
|
+
$$slots?: Slots;
|
|
9
|
+
}): Exports & {
|
|
10
|
+
$set?: any;
|
|
11
|
+
$on?: any;
|
|
44
12
|
};
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
|
|
13
|
+
z_$$bindings?: Bindings;
|
|
14
|
+
}
|
|
15
|
+
declare const IrocoLogo: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
16
|
+
[evt: string]: CustomEvent<any>;
|
|
17
|
+
}, {}, {}, string>;
|
|
18
|
+
type IrocoLogo = InstanceType<typeof IrocoLogo>;
|
|
19
|
+
export default IrocoLogo;
|
package/dist/IrocoLogo.svelte
CHANGED
|
@@ -1,7 +1,16 @@
|
|
|
1
|
-
<script
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
|
|
3
|
+
let {
|
|
4
|
+
href = `/`,
|
|
5
|
+
ariaLabel = 'go to Iroco home',
|
|
6
|
+
width = '10rem',
|
|
7
|
+
height = '10rem'
|
|
8
|
+
}: {
|
|
9
|
+
href?: string;
|
|
10
|
+
ariaLabel?: string;
|
|
11
|
+
width?: string;
|
|
12
|
+
height?: string;
|
|
13
|
+
} = $props();
|
|
5
14
|
</script>
|
|
6
15
|
|
|
7
16
|
<a class="iroco-logo" {href} aria-label={ariaLabel}>
|
|
@@ -1,19 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
width?: string | undefined;
|
|
7
|
-
height?: string | undefined;
|
|
8
|
-
};
|
|
9
|
-
events: {
|
|
10
|
-
[evt: string]: CustomEvent<any>;
|
|
11
|
-
};
|
|
12
|
-
slots: {};
|
|
1
|
+
type $$ComponentProps = {
|
|
2
|
+
href?: string;
|
|
3
|
+
ariaLabel?: string;
|
|
4
|
+
width?: string;
|
|
5
|
+
height?: string;
|
|
13
6
|
};
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
export
|
|
17
|
-
export default class IrocoLogo extends SvelteComponent<IrocoLogoProps, IrocoLogoEvents, IrocoLogoSlots> {
|
|
18
|
-
}
|
|
19
|
-
export {};
|
|
7
|
+
declare const IrocoLogo: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
8
|
+
type IrocoLogo = ReturnType<typeof IrocoLogo>;
|
|
9
|
+
export default IrocoLogo;
|
|
@@ -1,19 +1,22 @@
|
|
|
1
|
-
<script
|
|
1
|
+
<script module lang="ts">
|
|
2
2
|
import { Loader } from './index';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
import { defineMeta, setTemplate } from '@storybook/addon-svelte-csf';
|
|
5
|
+
|
|
6
|
+
const { Story } = defineMeta({
|
|
7
|
+
|
|
8
|
+
|
|
5
9
|
title: 'Iroco-UI/Atoms/Loader',
|
|
6
10
|
component: Loader,
|
|
7
11
|
argTypes: {}
|
|
8
|
-
};
|
|
12
|
+
});
|
|
9
13
|
</script>
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
import { Story, Template } from '@storybook/addon-svelte-csf';
|
|
14
|
+
<script lang="ts">
|
|
15
|
+
setTemplate(template);
|
|
13
16
|
</script>
|
|
14
17
|
|
|
15
|
-
|
|
18
|
+
{#snippet template({ ...args })}
|
|
16
19
|
<Loader {...args} />
|
|
17
|
-
|
|
20
|
+
{/snippet}
|
|
18
21
|
|
|
19
22
|
<Story name="Default" />
|
|
@@ -1,29 +1,19 @@
|
|
|
1
|
-
export namespace meta {
|
|
2
|
-
export let title: string;
|
|
3
|
-
export { Loader as component };
|
|
4
|
-
export let argTypes: {};
|
|
5
|
-
}
|
|
6
|
-
/** @typedef {typeof __propDef.props} LoaderProps */
|
|
7
|
-
/** @typedef {typeof __propDef.events} LoaderEvents */
|
|
8
|
-
/** @typedef {typeof __propDef.slots} LoaderSlots */
|
|
9
|
-
export default class Loader extends SvelteComponent<{
|
|
10
|
-
[x: string]: never;
|
|
11
|
-
}, {
|
|
12
|
-
[evt: string]: CustomEvent<any>;
|
|
13
|
-
}, {}> {
|
|
14
|
-
}
|
|
15
|
-
export type LoaderProps = typeof __propDef.props;
|
|
16
|
-
export type LoaderEvents = typeof __propDef.events;
|
|
17
|
-
export type LoaderSlots = typeof __propDef.slots;
|
|
18
1
|
import { Loader } from './index';
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
2
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
3
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
4
|
+
$$bindings?: Bindings;
|
|
5
|
+
} & Exports;
|
|
6
|
+
(internal: unknown, props: {
|
|
7
|
+
$$events?: Events;
|
|
8
|
+
$$slots?: Slots;
|
|
9
|
+
}): Exports & {
|
|
10
|
+
$set?: any;
|
|
11
|
+
$on?: any;
|
|
23
12
|
};
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
|
|
13
|
+
z_$$bindings?: Bindings;
|
|
14
|
+
}
|
|
15
|
+
declare const Loader: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
16
|
+
[evt: string]: CustomEvent<any>;
|
|
17
|
+
}, {}, {}, string>;
|
|
18
|
+
type Loader = InstanceType<typeof Loader>;
|
|
19
|
+
export default Loader;
|
package/dist/Loader.svelte
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
<script
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { IconIrocoLogo } from './index';
|
|
2
3
|
</script>
|
|
3
4
|
|
|
4
5
|
<div class="rotate linear infinite">
|
|
@@ -6,24 +7,24 @@
|
|
|
6
7
|
</div>
|
|
7
8
|
|
|
8
9
|
<style>
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
.rotate {
|
|
11
|
+
animation: rotation 2s;
|
|
12
|
+
}
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
.linear {
|
|
15
|
+
animation-timing-function: linear;
|
|
16
|
+
}
|
|
16
17
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
.infinite {
|
|
19
|
+
animation-iteration-count: infinite;
|
|
20
|
+
}
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
22
|
+
@keyframes rotation {
|
|
23
|
+
from {
|
|
24
|
+
transform: rotate(0deg);
|
|
25
|
+
}
|
|
26
|
+
to {
|
|
27
|
+
transform: rotate(359deg);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
29
30
|
</style>
|
package/dist/Loader.svelte.d.ts
CHANGED
|
@@ -1,14 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
+
$$bindings?: Bindings;
|
|
4
|
+
} & Exports;
|
|
5
|
+
(internal: unknown, props: {
|
|
6
|
+
$$events?: Events;
|
|
7
|
+
$$slots?: Slots;
|
|
8
|
+
}): Exports & {
|
|
9
|
+
$set?: any;
|
|
10
|
+
$on?: any;
|
|
6
11
|
};
|
|
7
|
-
|
|
8
|
-
};
|
|
9
|
-
export type LoaderProps = typeof __propDef.props;
|
|
10
|
-
export type LoaderEvents = typeof __propDef.events;
|
|
11
|
-
export type LoaderSlots = typeof __propDef.slots;
|
|
12
|
-
export default class Loader extends SvelteComponent<LoaderProps, LoaderEvents, LoaderSlots> {
|
|
12
|
+
z_$$bindings?: Bindings;
|
|
13
13
|
}
|
|
14
|
-
|
|
14
|
+
declare const Loader: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
15
|
+
[evt: string]: CustomEvent<any>;
|
|
16
|
+
}, {}, {}, string>;
|
|
17
|
+
type Loader = InstanceType<typeof Loader>;
|
|
18
|
+
export default Loader;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
<script
|
|
1
|
+
<script module lang="ts">
|
|
2
2
|
import { NavigationItem, NavigationItemType } from './definition';
|
|
3
3
|
import { NavBar } from './index';
|
|
4
|
+
import { defineMeta, setTemplate } from '@storybook/addon-svelte-csf';
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
const { Story } = defineMeta({
|
|
6
7
|
title: 'NavBar',
|
|
7
8
|
component: NavBar,
|
|
8
9
|
argTypes: {
|
|
@@ -10,28 +11,36 @@
|
|
|
10
11
|
control: { type: 'select' },
|
|
11
12
|
options: ['sidebar', 'topbar']
|
|
12
13
|
}
|
|
14
|
+
},
|
|
15
|
+
args: {
|
|
16
|
+
navigationItems: [
|
|
17
|
+
new NavigationItem('About', `/about`),
|
|
18
|
+
new NavigationItem('Foo', `/foo`),
|
|
19
|
+
new NavigationItem('Bar', `/bar`),
|
|
20
|
+
new NavigationItem('Button', `/button`, NavigationItemType.BUTTON),
|
|
21
|
+
new NavigationItem('Anchor', `/anchor`, NavigationItemType.ANCHOR),
|
|
22
|
+
new NavigationItem('Form', `/form`, NavigationItemType.FORM)
|
|
23
|
+
]
|
|
13
24
|
}
|
|
14
|
-
};
|
|
15
|
-
</script>
|
|
16
25
|
|
|
17
|
-
|
|
18
|
-
|
|
26
|
+
});
|
|
27
|
+
</script>
|
|
28
|
+
<script lang="ts">
|
|
29
|
+
setTemplate(template);
|
|
19
30
|
</script>
|
|
20
31
|
|
|
21
|
-
|
|
22
|
-
<NavBar
|
|
23
|
-
|
|
24
|
-
navigationItems={[
|
|
25
|
-
new NavigationItem('About', `/about`),
|
|
26
|
-
new NavigationItem('Foo', `/foo`),
|
|
27
|
-
new NavigationItem('Bar', `/bar`),
|
|
28
|
-
new NavigationItem('Button', `/bar`, NavigationItemType.BUTTON),
|
|
29
|
-
new NavigationItem('Anchor', `/bar`, NavigationItemType.ANCHOR),
|
|
30
|
-
new NavigationItem('Form', `/bar`, NavigationItemType.FORM)
|
|
31
|
-
]}
|
|
32
|
-
/>
|
|
33
|
-
</Template>
|
|
32
|
+
{#snippet template({ ...args })}
|
|
33
|
+
<NavBar {...args} />
|
|
34
|
+
{/snippet}
|
|
34
35
|
|
|
35
36
|
<Story name="Default" />
|
|
36
37
|
<Story name="Sidebar" args={{ type: 'sidebar' }} />
|
|
37
|
-
<Story name="
|
|
38
|
+
<Story name="Topbar" args={{ type: 'topbar' }} />
|
|
39
|
+
<Story name="Active" args={{
|
|
40
|
+
navigating:{to:{url:{pathname:"/bar"}}},
|
|
41
|
+
navigationItems: [
|
|
42
|
+
new NavigationItem('About', `/about`),
|
|
43
|
+
new NavigationItem('Foo', `/foo`),
|
|
44
|
+
new NavigationItem('Bar', `/bar`),
|
|
45
|
+
]
|
|
46
|
+
}} />
|