@iroco/ui 1.0.0-6 → 1.0.0-8

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.
@@ -5,7 +5,6 @@ export let disabled = false;
5
5
  export let kind = "basic";
6
6
  export let size = "regular";
7
7
  export let id;
8
- export let node;
9
8
  </script>
10
9
 
11
10
  <button
@@ -15,7 +14,6 @@ export let node;
15
14
  {type}
16
15
  {disabled}
17
16
  on:click
18
- bind:this={node}
19
17
  >
20
18
  <slot />
21
19
  </button>
@@ -6,7 +6,6 @@ declare const __propDef: {
6
6
  kind?: "success" | "danger" | "dark" | "basic" | undefined;
7
7
  size?: "small" | "regular" | undefined;
8
8
  id: string;
9
- node: HTMLElement;
10
9
  };
11
10
  events: {
12
11
  click: MouseEvent;
@@ -36,8 +35,5 @@ export default class Button extends SvelteComponent<ButtonProps, ButtonEvents, B
36
35
  get id(): string;
37
36
  /**accessor*/
38
37
  set id(_: string);
39
- get node(): HTMLElement;
40
- /**accessor*/
41
- set node(_: HTMLElement);
42
38
  }
43
39
  export {};
@@ -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 aleternative text',
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 imgSrc {
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: {
@@ -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
- <img class="imagearticle__image" src={imgSrc} {alt} />
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
- .imagearticle__image {
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
- .imagearticle__image {
445
+ .imagearticle__figure {
446
+ width: 100%;
447
+ }
448
+ .imagearticle__figure__image {
433
449
  width: 100%;
434
450
  }
435
451
  .imagearticle__article {
@@ -3,6 +3,7 @@ import type { ButtonModel } from './definition';
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  imgSrc: string;
6
+ figureCaption?: string | undefined;
6
7
  alt: string;
7
8
  articleTitle: string;
8
9
  articleContent: string;
@@ -1,6 +1,6 @@
1
1
  <script>export let id;
2
- export let label;
3
- export let placeholder;
2
+ export let label = "";
3
+ export let placeholder = "";
4
4
  export let error = null;
5
5
  export let value = null;
6
6
  export let min;
@@ -3,8 +3,8 @@ declare const __propDef: {
3
3
  props: {
4
4
  [x: string]: any;
5
5
  id: string;
6
- label: string | '';
7
- placeholder: string | '';
6
+ label?: string | undefined;
7
+ placeholder?: string | undefined;
8
8
  error?: string | null | undefined;
9
9
  value?: number | null | undefined;
10
10
  min: number | undefined;
@@ -54,6 +54,7 @@
54
54
  <form class="iroco-ui-form">
55
55
  <TextInput {...args} />
56
56
  </form>
57
+
57
58
  </Template>
58
59
 
59
60
  <Story name="Default" />
@@ -1,13 +1,14 @@
1
- <script>export let id;
2
- export let type;
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 { TextInputType } from './definition';
2
+ import { type TextInputType } from './definition';
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  id: string;
6
- type: TextInputType;
6
+ type?: TextInputType | undefined;
7
7
  name: string;
8
8
  label?: string | null | undefined;
9
- placeholder: string | undefined;
9
+ placeholder?: string | null | undefined;
10
10
  error?: string | null | undefined;
11
11
  htmlError?: boolean | undefined;
12
12
  value?: string | null | undefined;
13
- onFocus: (e: FocusEvent) => void | null;
14
- onBlur: (e: Event) => void | null;
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-6",
3
+ "version": "1.0.0-8",
4
4
  "description": "Iroco design system based on Svelte",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
7
- "dev": "vite 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": {