@iroco/ui 1.0.0-6 → 1.0.0-7
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/dist/ImageArticle.stories.svelte +13 -1
- package/dist/ImageArticle.stories.svelte.d.ts +10 -1
- package/dist/ImageArticle.svelte +19 -3
- package/dist/ImageArticle.svelte.d.ts +1 -0
- package/dist/TextInput.stories.svelte +1 -0
- package/dist/TextInput.svelte +6 -5
- package/dist/TextInput.svelte.d.ts +5 -5
- package/package.json +2 -3
|
@@ -12,6 +12,9 @@
|
|
|
12
12
|
reversed: {
|
|
13
13
|
control: { type: 'boolean' }
|
|
14
14
|
},
|
|
15
|
+
figureCaption: {
|
|
16
|
+
control: { type: 'text' }
|
|
17
|
+
},
|
|
15
18
|
imgSrc: {
|
|
16
19
|
control: { type: 'select' },
|
|
17
20
|
options: [
|
|
@@ -24,8 +27,9 @@
|
|
|
24
27
|
buttonList: {}
|
|
25
28
|
},
|
|
26
29
|
args: {
|
|
27
|
-
alt: 'Accessibility
|
|
30
|
+
alt: 'Accessibility alternative text',
|
|
28
31
|
imgSrc: accessibilityImageFile,
|
|
32
|
+
figureCaption: undefined,
|
|
29
33
|
articleTitle: 'Accessibility',
|
|
30
34
|
articleContent: 'Accessibility is incredibly important, yet often overlooked in traditional digital design and development education. Because of this, The A11Y Project strives to be a living example of how to create beautiful, accessible, and inclusive digital experiences.',
|
|
31
35
|
buttonList: [
|
|
@@ -47,3 +51,11 @@
|
|
|
47
51
|
|
|
48
52
|
<Story name="Default" />
|
|
49
53
|
<Story name="Reversed" args={{ reversed: true }} />
|
|
54
|
+
<Story name="Figure caption" args={{ figureCaption: "An optional caption for the figure" ,
|
|
55
|
+
buttonList:[
|
|
56
|
+
{
|
|
57
|
+
href:"https://developer.mozilla.org/en-US/docs/Glossary/Accessible_description",
|
|
58
|
+
label:"Learn about accessible description"
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
}} />
|
|
@@ -7,12 +7,19 @@ export namespace meta {
|
|
|
7
7
|
let type: string;
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
|
-
namespace
|
|
10
|
+
namespace figureCaption {
|
|
11
11
|
export namespace control_1 {
|
|
12
12
|
let type_1: string;
|
|
13
13
|
export { type_1 as type };
|
|
14
14
|
}
|
|
15
15
|
export { control_1 as control };
|
|
16
|
+
}
|
|
17
|
+
namespace imgSrc {
|
|
18
|
+
export namespace control_2 {
|
|
19
|
+
let type_2: string;
|
|
20
|
+
export { type_2 as type };
|
|
21
|
+
}
|
|
22
|
+
export { control_2 as control };
|
|
16
23
|
export let options: any[];
|
|
17
24
|
}
|
|
18
25
|
let buttonList: {};
|
|
@@ -20,6 +27,8 @@ export namespace meta {
|
|
|
20
27
|
export namespace args {
|
|
21
28
|
export let alt: string;
|
|
22
29
|
export { accessibilityImageFile as imgSrc };
|
|
30
|
+
let figureCaption_1: undefined;
|
|
31
|
+
export { figureCaption_1 as figureCaption };
|
|
23
32
|
export let articleTitle: string;
|
|
24
33
|
export let articleContent: string;
|
|
25
34
|
let buttonList_1: {
|
package/dist/ImageArticle.svelte
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script>import { Icon } from "svelte-awesome";
|
|
2
2
|
import chevronRight from "svelte-awesome/icons/chevronRight";
|
|
3
3
|
export let imgSrc;
|
|
4
|
+
export let figureCaption = void 0;
|
|
4
5
|
export let alt;
|
|
5
6
|
export let articleTitle;
|
|
6
7
|
export let articleContent;
|
|
@@ -9,7 +10,15 @@ export let reversed = false;
|
|
|
9
10
|
</script>
|
|
10
11
|
|
|
11
12
|
<div class="imagearticle" class:reversed>
|
|
12
|
-
<
|
|
13
|
+
<figure class="imagearticle__figure">
|
|
14
|
+
<img class="imagearticle__figure__image"
|
|
15
|
+
src={imgSrc}
|
|
16
|
+
{alt} />
|
|
17
|
+
{#if figureCaption}
|
|
18
|
+
<figcaption>{ figureCaption }</figcaption>
|
|
19
|
+
{/if}
|
|
20
|
+
</figure>
|
|
21
|
+
|
|
13
22
|
<article class="imagearticle__article">
|
|
14
23
|
<h1>{articleTitle}</h1>
|
|
15
24
|
<p>{articleContent}</p>
|
|
@@ -400,11 +409,15 @@ export let reversed = false;
|
|
|
400
409
|
justify-content: space-around;
|
|
401
410
|
align-items: center;
|
|
402
411
|
}
|
|
403
|
-
.
|
|
412
|
+
.imagearticle__figure {
|
|
404
413
|
width: 40%;
|
|
405
414
|
display: block;
|
|
406
415
|
object-fit: cover;
|
|
407
416
|
margin: 0 auto;
|
|
417
|
+
text-align: center;
|
|
418
|
+
}
|
|
419
|
+
.imagearticle__figure__image {
|
|
420
|
+
width: 100%;
|
|
408
421
|
}
|
|
409
422
|
.imagearticle__article {
|
|
410
423
|
width: 50%;
|
|
@@ -429,7 +442,10 @@ export let reversed = false;
|
|
|
429
442
|
width: 80%;
|
|
430
443
|
text-align: center;
|
|
431
444
|
}
|
|
432
|
-
.
|
|
445
|
+
.imagearticle__figure {
|
|
446
|
+
width: 100%;
|
|
447
|
+
}
|
|
448
|
+
.imagearticle__figure__image {
|
|
433
449
|
width: 100%;
|
|
434
450
|
}
|
|
435
451
|
.imagearticle__article {
|
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
5
|
export let label = null;
|
|
5
|
-
export let placeholder;
|
|
6
|
+
export let placeholder = null;
|
|
6
7
|
export let error = null;
|
|
7
8
|
export let htmlError = false;
|
|
8
9
|
export let value = null;
|
|
9
|
-
export let onFocus;
|
|
10
|
-
export let onBlur;
|
|
10
|
+
export let onFocus = null;
|
|
11
|
+
export let onBlur = null;
|
|
11
12
|
export let readonly = false;
|
|
12
13
|
export let border = false;
|
|
13
14
|
export let autocomplete = "on";
|
|
@@ -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
8
|
label?: string | null | undefined;
|
|
9
|
-
placeholder
|
|
9
|
+
placeholder?: string | null | undefined;
|
|
10
10
|
error?: string | null | undefined;
|
|
11
11
|
htmlError?: boolean | undefined;
|
|
12
12
|
value?: string | null | undefined;
|
|
13
|
-
onFocus
|
|
14
|
-
onBlur
|
|
13
|
+
onFocus?: ((e: FocusEvent) => void | null) | undefined;
|
|
14
|
+
onBlur?: ((e: Event) => void | null) | undefined;
|
|
15
15
|
readonly?: boolean | undefined;
|
|
16
16
|
border?: boolean | undefined;
|
|
17
17
|
autocomplete?: string | undefined;
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iroco/ui",
|
|
3
|
-
"version": "1.0.0-
|
|
3
|
+
"version": "1.0.0-7",
|
|
4
4
|
"description": "Iroco design system based on Svelte",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"dev": "
|
|
7
|
+
"dev": "storybook dev -p 5175",
|
|
8
8
|
"build": "svelte-kit sync && svelte-package",
|
|
9
9
|
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
|
10
10
|
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
"format": "prettier --plugin-search-dir . --write .",
|
|
15
15
|
"clean": "rm -rf dist && npm cache clean --force",
|
|
16
16
|
"release": "npm run format && npm run build && release-it --only-version",
|
|
17
|
-
"storybook": "storybook dev -p 5175",
|
|
18
17
|
"build-storybook": "storybook build"
|
|
19
18
|
},
|
|
20
19
|
"devDependencies": {
|