@iroco/ui 1.0.0-9 → 1.0.1

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.
Files changed (86) hide show
  1. package/README.md +7 -5
  2. package/dist/Alert.stories.svelte +19 -20
  3. package/dist/Alert.stories.svelte.d.ts +17 -35
  4. package/dist/Alert.svelte +12 -5
  5. package/dist/Alert.svelte.d.ts +7 -18
  6. package/dist/Button.stories.svelte +16 -12
  7. package/dist/Button.stories.svelte.d.ts +17 -43
  8. package/dist/Button.svelte +33 -12
  9. package/dist/Button.svelte.d.ts +13 -38
  10. package/dist/DataTable.stories.svelte +24 -19
  11. package/dist/DataTable.stories.svelte.d.ts +17 -27
  12. package/dist/DataTable.svelte +45 -25
  13. package/dist/DataTable.svelte.d.ts +16 -23
  14. package/dist/IconBurger.stories.svelte +8 -12
  15. package/dist/IconBurger.stories.svelte.d.ts +17 -46
  16. package/dist/IconBurger.svelte +7 -2
  17. package/dist/IconBurger.svelte.d.ts +6 -16
  18. package/dist/IconClose.stories.svelte +6 -12
  19. package/dist/IconClose.stories.svelte.d.ts +17 -46
  20. package/dist/IconClose.svelte +7 -2
  21. package/dist/IconClose.svelte.d.ts +6 -16
  22. package/dist/IconFloppyDisk.stories.svelte +4 -11
  23. package/dist/IconFloppyDisk.stories.svelte.d.ts +17 -53
  24. package/dist/IconFloppyDisk.svelte +8 -3
  25. package/dist/IconFloppyDisk.svelte.d.ts +7 -17
  26. package/dist/IconInfo.stories.svelte +8 -11
  27. package/dist/IconInfo.stories.svelte.d.ts +17 -48
  28. package/dist/IconInfo.svelte +7 -2
  29. package/dist/IconInfo.svelte.d.ts +6 -16
  30. package/dist/IconIrocoLogo.stories.svelte +8 -8
  31. package/dist/IconIrocoLogo.stories.svelte.d.ts +17 -55
  32. package/dist/IconIrocoLogo.svelte +18 -6
  33. package/dist/IconIrocoLogo.svelte.d.ts +9 -19
  34. package/dist/IconMoreSign.stories.svelte +7 -14
  35. package/dist/IconMoreSign.stories.svelte.d.ts +17 -48
  36. package/dist/IconMoreSign.svelte +7 -2
  37. package/dist/IconMoreSign.svelte.d.ts +6 -16
  38. package/dist/IconTrashCan.stories.svelte +6 -12
  39. package/dist/IconTrashCan.stories.svelte.d.ts +17 -48
  40. package/dist/IconTrashCan.svelte +8 -3
  41. package/dist/IconTrashCan.svelte.d.ts +7 -17
  42. package/dist/ImageArticle.stories.svelte +11 -8
  43. package/dist/ImageArticle.stories.svelte.d.ts +17 -64
  44. package/dist/ImageArticle.svelte +37 -165
  45. package/dist/ImageArticle.svelte.d.ts +11 -21
  46. package/dist/IrocoLogo.stories.svelte +12 -7
  47. package/dist/IrocoLogo.stories.svelte.d.ts +17 -48
  48. package/dist/IrocoLogo.svelte +15 -4
  49. package/dist/IrocoLogo.svelte.d.ts +8 -18
  50. package/dist/Loader.stories.svelte +11 -8
  51. package/dist/Loader.stories.svelte.d.ts +17 -27
  52. package/dist/Loader.svelte +19 -18
  53. package/dist/Loader.svelte.d.ts +16 -12
  54. package/dist/NavBar.stories.svelte +29 -20
  55. package/dist/NavBar.stories.svelte.d.ts +17 -35
  56. package/dist/NavBar.svelte +49 -183
  57. package/dist/NavBar.svelte.d.ts +33 -20
  58. package/dist/Navigation.stories.svelte +30 -28
  59. package/dist/Navigation.stories.svelte.d.ts +17 -57
  60. package/dist/Navigation.svelte +35 -14
  61. package/dist/Navigation.svelte.d.ts +18 -20
  62. package/dist/NumberInput.stories.svelte +12 -7
  63. package/dist/NumberInput.stories.svelte.d.ts +17 -75
  64. package/dist/NumberInput.svelte +26 -8
  65. package/dist/NumberInput.svelte.d.ts +13 -24
  66. package/dist/RadioButton.stories.svelte +17 -30
  67. package/dist/RadioButton.stories.svelte.d.ts +17 -54
  68. package/dist/RadioButton.svelte +26 -12
  69. package/dist/RadioButton.svelte.d.ts +10 -20
  70. package/dist/SlottedComponentWrapper.svelte +4 -4
  71. package/dist/SlottedComponentWrapper.svelte.d.ts +4 -22
  72. package/dist/TextInput.stories.svelte +24 -47
  73. package/dist/TextInput.stories.svelte.d.ts +17 -109
  74. package/dist/TextInput.svelte +45 -25
  75. package/dist/TextInput.svelte.d.ts +19 -30
  76. package/dist/definition.d.ts +0 -5
  77. package/dist/definition.js +0 -11
  78. package/dist/index.d.ts +14 -10
  79. package/dist/index.js +14 -10
  80. package/dist/scss/button.scss +7 -3
  81. package/dist/scss/colors.scss +21 -11
  82. package/dist/scss/fields/_input.scss +1 -1
  83. package/dist/scss/fields/_style.scss +2 -2
  84. package/package.json +49 -48
  85. package/dist/RadioButtonTest.svelte +0 -10
  86. package/dist/RadioButtonTest.svelte.d.ts +0 -19
@@ -1,9 +1,21 @@
1
- <script>import { Color } from "./definition";
2
- export let href = "/";
3
- export let ariaLabel = "go to Iroco home";
4
- export let width = "5rem";
5
- export let height = "5rem";
6
- export let color = Color.green;
1
+ <script lang="ts">
2
+ import { Color } from './definition';
3
+
4
+ interface Props {
5
+ href?: string;
6
+ ariaLabel?: string;
7
+ width?: string;
8
+ height?: string;
9
+ color?: Color | string;
10
+ }
11
+
12
+ let {
13
+ href = '/',
14
+ ariaLabel = 'go to Iroco home',
15
+ width = '5rem',
16
+ height = '5rem',
17
+ color = Color.green
18
+ }: Props = $props();
7
19
  </script>
8
20
 
9
21
  <a class="iroco-logo" {href} aria-label={ariaLabel}>
@@ -1,21 +1,11 @@
1
- import { SvelteComponent } from "svelte";
2
1
  import { Color } from './definition';
3
- declare const __propDef: {
4
- props: {
5
- href?: string | undefined;
6
- ariaLabel?: string | undefined;
7
- width?: string | undefined;
8
- height?: string | undefined;
9
- color?: Color | undefined;
10
- };
11
- events: {
12
- [evt: string]: CustomEvent<any>;
13
- };
14
- slots: {};
15
- };
16
- export type IconIrocoLogoProps = typeof __propDef.props;
17
- export type IconIrocoLogoEvents = typeof __propDef.events;
18
- export type IconIrocoLogoSlots = typeof __propDef.slots;
19
- export default class IconIrocoLogo extends SvelteComponent<IconIrocoLogoProps, IconIrocoLogoEvents, IconIrocoLogoSlots> {
2
+ interface Props {
3
+ href?: string;
4
+ ariaLabel?: string;
5
+ width?: string;
6
+ height?: string;
7
+ color?: Color | string;
20
8
  }
21
- export {};
9
+ declare const IconIrocoLogo: import("svelte").Component<Props, {}, "">;
10
+ type IconIrocoLogo = ReturnType<typeof IconIrocoLogo>;
11
+ export default IconIrocoLogo;
@@ -1,9 +1,10 @@
1
- <script context="module">
2
- import IconMoreSign from './IconMoreSign.svelte';
1
+ <script module lang="ts">
2
+ import { IconMoreSign } from './index';
3
3
 
4
- export const meta = {
4
+ import { defineMeta } from '@storybook/addon-svelte-csf';
5
+
6
+ const { Story } = defineMeta({
5
7
  title: 'Iroco-UI/Icons/IconMoreSign',
6
- type: 'Icons',
7
8
  component: IconMoreSign,
8
9
  argTypes: {
9
10
  width: {
@@ -17,15 +18,7 @@
17
18
  max: 512
18
19
  }
19
20
  }
20
- };
21
- </script>
22
-
23
- <script>
24
- import { Story, Template } from '@storybook/addon-svelte-csf';
21
+ });
25
22
  </script>
26
23
 
27
- <Template let:args>
28
- <IconMoreSign {...args} />
29
- </Template>
30
-
31
- <Story name="Default" />
24
+ <Story name="Default" />
@@ -1,50 +1,19 @@
1
- export namespace meta {
2
- export let title: string;
3
- export let type: string;
4
- export { IconMoreSign 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
- }
1
+ import { IconMoreSign } from './index';
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;
12
+ };
13
+ z_$$bindings?: Bindings;
26
14
  }
27
- /** @typedef {typeof __propDef.props} IconMoreSignProps */
28
- /** @typedef {typeof __propDef.events} IconMoreSignEvents */
29
- /** @typedef {typeof __propDef.slots} IconMoreSignSlots */
30
- export default class IconMoreSign extends SvelteComponent<{
31
- [x: string]: never;
32
- }, {
15
+ declare const IconMoreSign: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
33
16
  [evt: string]: CustomEvent<any>;
34
- }, {}> {
35
- }
36
- export type IconMoreSignProps = typeof __propDef.props;
37
- export type IconMoreSignEvents = typeof __propDef.events;
38
- export type IconMoreSignSlots = typeof __propDef.slots;
39
- import IconMoreSign from './IconMoreSign.svelte';
40
- import { SvelteComponent } from "svelte";
41
- declare const __propDef: {
42
- props: {
43
- [x: string]: never;
44
- };
45
- events: {
46
- [evt: string]: CustomEvent<any>;
47
- };
48
- slots: {};
49
- };
50
- export {};
17
+ }, {}, {}, string>;
18
+ type IconMoreSign = InstanceType<typeof IconMoreSign>;
19
+ export default IconMoreSign;
@@ -1,5 +1,10 @@
1
- <script>export let width = "3rem";
2
- export let height = "3rem";
1
+ <script lang="ts">
2
+ interface Props {
3
+ width?: string;
4
+ height?: string;
5
+ }
6
+
7
+ let { width = '3rem', height = '3rem' }: Props = $props();
3
8
  </script>
4
9
 
5
10
  <svg
@@ -1,17 +1,7 @@
1
- import { SvelteComponent } from "svelte";
2
- declare const __propDef: {
3
- props: {
4
- width?: string | undefined;
5
- height?: string | undefined;
6
- };
7
- events: {
8
- [evt: string]: CustomEvent<any>;
9
- };
10
- slots: {};
11
- };
12
- export type IconMoreSignProps = typeof __propDef.props;
13
- export type IconMoreSignEvents = typeof __propDef.events;
14
- export type IconMoreSignSlots = typeof __propDef.slots;
15
- export default class IconMoreSign extends SvelteComponent<IconMoreSignProps, IconMoreSignEvents, IconMoreSignSlots> {
1
+ interface Props {
2
+ width?: string;
3
+ height?: string;
16
4
  }
17
- export {};
5
+ declare const IconMoreSign: import("svelte").Component<Props, {}, "">;
6
+ type IconMoreSign = ReturnType<typeof IconMoreSign>;
7
+ export default IconMoreSign;
@@ -1,9 +1,11 @@
1
- <script context="module">
1
+ <script module lang="ts">
2
2
  import { IconTrashCan } from './index';
3
3
 
4
- export const meta = {
4
+ import {defineMeta} from '@storybook/addon-svelte-csf'
5
+
6
+ const {Story} = defineMeta({
7
+
5
8
  title: 'Iroco-UI/Icons/IconTrashCan',
6
- type: 'Icons',
7
9
  component: IconTrashCan,
8
10
  argTypes: {
9
11
  width: {
@@ -17,15 +19,7 @@
17
19
  max: 512
18
20
  }
19
21
  }
20
- };
22
+ })
21
23
  </script>
22
24
 
23
- <script>
24
- import { Story, Template } from '@storybook/addon-svelte-csf';
25
- </script>
26
-
27
- <Template let:args>
28
- <IconTrashCan {...args} />
29
- </Template>
30
-
31
25
  <Story name="Default" />
@@ -1,50 +1,19 @@
1
- export namespace meta {
2
- export let title: string;
3
- export let type: string;
4
- export { IconTrashCan 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} IconTrashCanProps */
28
- /** @typedef {typeof __propDef.events} IconTrashCanEvents */
29
- /** @typedef {typeof __propDef.slots} IconTrashCanSlots */
30
- export default class IconTrashCan extends SvelteComponent<{
31
- [x: string]: never;
32
- }, {
33
- [evt: string]: CustomEvent<any>;
34
- }, {}> {
35
- }
36
- export type IconTrashCanProps = typeof __propDef.props;
37
- export type IconTrashCanEvents = typeof __propDef.events;
38
- export type IconTrashCanSlots = typeof __propDef.slots;
39
1
  import { IconTrashCan } from './index';
40
- import { SvelteComponent } from "svelte";
41
- declare const __propDef: {
42
- props: {
43
- [x: string]: never;
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
- events: {
46
- [evt: string]: CustomEvent<any>;
47
- };
48
- slots: {};
49
- };
50
- export {};
13
+ z_$$bindings?: Bindings;
14
+ }
15
+ declare const IconTrashCan: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
16
+ [evt: string]: CustomEvent<any>;
17
+ }, {}, {}, string>;
18
+ type IconTrashCan = InstanceType<typeof IconTrashCan>;
19
+ export default IconTrashCan;
@@ -1,6 +1,11 @@
1
- <script>export let width = "5rem";
2
- export let height = "5rem";
3
- export let stroke = "currentColor";
1
+ <script lang="ts">
2
+ interface Props {
3
+ width?: string;
4
+ height?: string;
5
+ stroke?: string;
6
+ }
7
+
8
+ let { width = '5rem', height = '5rem', stroke = 'currentColor' }: Props = $props();
4
9
  </script>
5
10
 
6
11
  <svg {width} {height} fill="none" {stroke} viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"
@@ -1,18 +1,8 @@
1
- import { SvelteComponent } from "svelte";
2
- declare const __propDef: {
3
- props: {
4
- width?: string | undefined;
5
- height?: string | undefined;
6
- stroke?: string | undefined;
7
- };
8
- events: {
9
- [evt: string]: CustomEvent<any>;
10
- };
11
- slots: {};
12
- };
13
- export type IconTrashCanProps = typeof __propDef.props;
14
- export type IconTrashCanEvents = typeof __propDef.events;
15
- export type IconTrashCanSlots = typeof __propDef.slots;
16
- export default class IconTrashCan extends SvelteComponent<IconTrashCanProps, IconTrashCanEvents, IconTrashCanSlots> {
1
+ interface Props {
2
+ width?: string;
3
+ height?: string;
4
+ stroke?: string;
17
5
  }
18
- export {};
6
+ declare const IconTrashCan: import("svelte").Component<Props, {}, "">;
7
+ type IconTrashCan = ReturnType<typeof IconTrashCan>;
8
+ export default IconTrashCan;
@@ -1,11 +1,14 @@
1
- <script context="module">
2
- import ImageArticle from './ImageArticle.svelte';
1
+ <script module lang="ts">
2
+ import { ImageArticle } from './index';
3
3
  import accessibilityImageFile from '../stories/assets/accessibility.svg';
4
4
  import discordImageFile from '../stories/assets/discord.svg';
5
5
  import youtubeImageFile from '../stories/assets/youtube.svg';
6
6
  import tutorialsImageFile from '../stories/assets/tutorials.svg';
7
7
 
8
- export const meta = {
8
+ import { defineMeta, setTemplate } from '@storybook/addon-svelte-csf';
9
+
10
+ const { Story } = defineMeta({
11
+
9
12
  title: 'ImageArticle',
10
13
  component: ImageArticle,
11
14
  argTypes: {
@@ -38,16 +41,16 @@
38
41
  ],
39
42
  reversed: false
40
43
  }
41
- };
44
+ });
42
45
  </script>
43
46
 
44
- <script>
45
- import { Story, Template } from '@storybook/addon-svelte-csf';
47
+ <script lang="ts">
48
+ setTemplate(template);
46
49
  </script>
47
50
 
48
- <Template let:args>
51
+ {#snippet template({ ...args })}
49
52
  <ImageArticle {...args}></ImageArticle>
50
- </Template>
53
+ {/snippet}
51
54
 
52
55
  <Story name="Default" />
53
56
  <Story name="Reversed" args={{ reversed: true }} />
@@ -1,66 +1,19 @@
1
- export namespace meta {
2
- export let title: string;
3
- export { ImageArticle as component };
4
- export namespace argTypes {
5
- namespace reversed {
6
- namespace control {
7
- let type: string;
8
- }
9
- }
10
- namespace figureCaption {
11
- export namespace control_1 {
12
- let type_1: string;
13
- export { type_1 as type };
14
- }
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 };
23
- export let options: any[];
24
- }
25
- let buttonList: {};
26
- }
27
- export namespace args {
28
- export let alt: string;
29
- export { accessibilityImageFile as imgSrc };
30
- let figureCaption_1: undefined;
31
- export { figureCaption_1 as figureCaption };
32
- export let articleTitle: string;
33
- export let articleContent: string;
34
- let buttonList_1: {
35
- href: string;
36
- label: string;
37
- }[];
38
- export { buttonList_1 as buttonList };
39
- let reversed_1: boolean;
40
- export { reversed_1 as reversed };
41
- }
1
+ import { ImageArticle } from './index';
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;
12
+ };
13
+ z_$$bindings?: Bindings;
42
14
  }
43
- /** @typedef {typeof __propDef.props} ImageArticleProps */
44
- /** @typedef {typeof __propDef.events} ImageArticleEvents */
45
- /** @typedef {typeof __propDef.slots} ImageArticleSlots */
46
- export default class ImageArticle extends SvelteComponent<{
47
- [x: string]: never;
48
- }, {
15
+ declare const ImageArticle: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
49
16
  [evt: string]: CustomEvent<any>;
50
- }, {}> {
51
- }
52
- export type ImageArticleProps = typeof __propDef.props;
53
- export type ImageArticleEvents = typeof __propDef.events;
54
- export type ImageArticleSlots = typeof __propDef.slots;
55
- import ImageArticle from './ImageArticle.svelte';
56
- import { SvelteComponent } from "svelte";
57
- declare const __propDef: {
58
- props: {
59
- [x: string]: never;
60
- };
61
- events: {
62
- [evt: string]: CustomEvent<any>;
63
- };
64
- slots: {};
65
- };
66
- export {};
17
+ }, {}, {}, string>;
18
+ type ImageArticle = InstanceType<typeof ImageArticle>;
19
+ export default ImageArticle;