@invopop/popui 0.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 (141) hide show
  1. package/README.md +146 -0
  2. package/dist/BaseButton.svelte +107 -0
  3. package/dist/BaseButton.svelte.d.ts +33 -0
  4. package/dist/BaseCard.svelte +50 -0
  5. package/dist/BaseCard.svelte.d.ts +25 -0
  6. package/dist/BaseCounter.svelte +16 -0
  7. package/dist/BaseCounter.svelte.d.ts +17 -0
  8. package/dist/BaseDropdown.svelte +46 -0
  9. package/dist/BaseDropdown.svelte.d.ts +24 -0
  10. package/dist/BaseFlag.svelte +14 -0
  11. package/dist/BaseFlag.svelte.d.ts +17 -0
  12. package/dist/BaseTable.svelte +148 -0
  13. package/dist/BaseTable.svelte.d.ts +33 -0
  14. package/dist/BaseTableActions.svelte +31 -0
  15. package/dist/BaseTableActions.svelte.d.ts +21 -0
  16. package/dist/BaseTableCell.svelte +90 -0
  17. package/dist/BaseTableCell.svelte.d.ts +26 -0
  18. package/dist/BaseTableHeader.svelte +75 -0
  19. package/dist/BaseTableHeader.svelte.d.ts +23 -0
  20. package/dist/BaseTableHeaderSortBy.svelte +22 -0
  21. package/dist/BaseTableHeaderSortBy.svelte.d.ts +20 -0
  22. package/dist/BaseTableRow.svelte +48 -0
  23. package/dist/BaseTableRow.svelte.d.ts +25 -0
  24. package/dist/ButtonFile.svelte +51 -0
  25. package/dist/ButtonFile.svelte.d.ts +25 -0
  26. package/dist/CardRelation.svelte +29 -0
  27. package/dist/CardRelation.svelte.d.ts +22 -0
  28. package/dist/CompanySelector.svelte +74 -0
  29. package/dist/CompanySelector.svelte.d.ts +23 -0
  30. package/dist/CounterWorkflow.svelte +15 -0
  31. package/dist/CounterWorkflow.svelte.d.ts +17 -0
  32. package/dist/DataListItem.svelte +22 -0
  33. package/dist/DataListItem.svelte.d.ts +22 -0
  34. package/dist/DatePicker.svelte +431 -0
  35. package/dist/DatePicker.svelte.d.ts +22 -0
  36. package/dist/DrawerContext.svelte +48 -0
  37. package/dist/DrawerContext.svelte.d.ts +23 -0
  38. package/dist/DrawerContextItem.svelte +93 -0
  39. package/dist/DrawerContextItem.svelte.d.ts +23 -0
  40. package/dist/DrawerContextWorkspace.svelte +40 -0
  41. package/dist/DrawerContextWorkspace.svelte.d.ts +20 -0
  42. package/dist/DropdownSelect.svelte +78 -0
  43. package/dist/DropdownSelect.svelte.d.ts +26 -0
  44. package/dist/EmptyStateIcon.svelte +46 -0
  45. package/dist/EmptyStateIcon.svelte.d.ts +22 -0
  46. package/dist/EmptyStateIllustration.svelte +58 -0
  47. package/dist/EmptyStateIllustration.svelte.d.ts +21 -0
  48. package/dist/FeedEvents.svelte +26 -0
  49. package/dist/FeedEvents.svelte.d.ts +17 -0
  50. package/dist/FeedIconEvent.svelte +10 -0
  51. package/dist/FeedIconEvent.svelte.d.ts +19 -0
  52. package/dist/FeedIconStatus.svelte +26 -0
  53. package/dist/FeedIconStatus.svelte.d.ts +17 -0
  54. package/dist/FeedItem.svelte +87 -0
  55. package/dist/FeedItem.svelte.d.ts +30 -0
  56. package/dist/FeedItemDetail.svelte +56 -0
  57. package/dist/FeedItemDetail.svelte.d.ts +23 -0
  58. package/dist/FeedViewer.svelte +19 -0
  59. package/dist/FeedViewer.svelte.d.ts +21 -0
  60. package/dist/FormLayoutModal.svelte +8 -0
  61. package/dist/FormLayoutModal.svelte.d.ts +29 -0
  62. package/dist/GlobalSearch.svelte +47 -0
  63. package/dist/GlobalSearch.svelte.d.ts +18 -0
  64. package/dist/InputCheckbox.svelte +20 -0
  65. package/dist/InputCheckbox.svelte.d.ts +18 -0
  66. package/dist/InputError.svelte +14 -0
  67. package/dist/InputError.svelte.d.ts +16 -0
  68. package/dist/InputLabel.svelte +5 -0
  69. package/dist/InputLabel.svelte.d.ts +17 -0
  70. package/dist/InputRadio.svelte +27 -0
  71. package/dist/InputRadio.svelte.d.ts +19 -0
  72. package/dist/InputSearch.svelte +69 -0
  73. package/dist/InputSearch.svelte.d.ts +32 -0
  74. package/dist/InputSelect.svelte +75 -0
  75. package/dist/InputSelect.svelte.d.ts +30 -0
  76. package/dist/InputText.svelte +63 -0
  77. package/dist/InputText.svelte.d.ts +26 -0
  78. package/dist/InputTextarea.svelte +42 -0
  79. package/dist/InputTextarea.svelte.d.ts +24 -0
  80. package/dist/InputToggle.svelte +33 -0
  81. package/dist/InputToggle.svelte.d.ts +18 -0
  82. package/dist/MenuItem.svelte +141 -0
  83. package/dist/MenuItem.svelte.d.ts +29 -0
  84. package/dist/ProfileAvatar.svelte +39 -0
  85. package/dist/ProfileAvatar.svelte.d.ts +21 -0
  86. package/dist/ProfileSelector.svelte +20 -0
  87. package/dist/ProfileSelector.svelte.d.ts +20 -0
  88. package/dist/SectionLayout.svelte +10 -0
  89. package/dist/SectionLayout.svelte.d.ts +18 -0
  90. package/dist/SeparatorHorizontal.svelte +14 -0
  91. package/dist/SeparatorHorizontal.svelte.d.ts +23 -0
  92. package/dist/ShortcutWrapper.svelte +6 -0
  93. package/dist/ShortcutWrapper.svelte.d.ts +27 -0
  94. package/dist/StatusLabel.svelte +20 -0
  95. package/dist/StatusLabel.svelte.d.ts +18 -0
  96. package/dist/Tabs.svelte +41 -0
  97. package/dist/Tabs.svelte.d.ts +20 -0
  98. package/dist/TagBeta.svelte +23 -0
  99. package/dist/TagBeta.svelte.d.ts +23 -0
  100. package/dist/TagSearch.svelte +46 -0
  101. package/dist/TagSearch.svelte.d.ts +22 -0
  102. package/dist/TagStatus.svelte +46 -0
  103. package/dist/TagStatus.svelte.d.ts +19 -0
  104. package/dist/TitleMain.svelte +6 -0
  105. package/dist/TitleMain.svelte.d.ts +18 -0
  106. package/dist/TitleSection.svelte +6 -0
  107. package/dist/TitleSection.svelte.d.ts +18 -0
  108. package/dist/UuidCopy.svelte +55 -0
  109. package/dist/UuidCopy.svelte.d.ts +26 -0
  110. package/dist/clickOutside.d.ts +4 -0
  111. package/dist/clickOutside.js +18 -0
  112. package/dist/constants.d.ts +1 -0
  113. package/dist/constants.js +1 -0
  114. package/dist/helpers.d.ts +6 -0
  115. package/dist/helpers.js +35 -0
  116. package/dist/index.d.ts +51 -0
  117. package/dist/index.js +101 -0
  118. package/dist/popui.css +1 -0
  119. package/dist/svg/BgPattern.svelte +20 -0
  120. package/dist/svg/BgPattern.svelte.d.ts +23 -0
  121. package/dist/svg/IconContact.svelte +114 -0
  122. package/dist/svg/IconContact.svelte.d.ts +16 -0
  123. package/dist/svg/IconEmpty.svelte +138 -0
  124. package/dist/svg/IconEmpty.svelte.d.ts +23 -0
  125. package/dist/svg/IconFile.svelte +91 -0
  126. package/dist/svg/IconFile.svelte.d.ts +16 -0
  127. package/dist/svg/IconInvoice.svelte +97 -0
  128. package/dist/svg/IconInvoice.svelte.d.ts +16 -0
  129. package/dist/svg/IconNoResults.svelte +83 -0
  130. package/dist/svg/IconNoResults.svelte.d.ts +16 -0
  131. package/dist/svg/IconPdf.svelte +93 -0
  132. package/dist/svg/IconPdf.svelte.d.ts +16 -0
  133. package/dist/svg/IconProduct.svelte +105 -0
  134. package/dist/svg/IconProduct.svelte.d.ts +16 -0
  135. package/dist/tw.theme.d.ts +135 -0
  136. package/dist/tw.theme.js +152 -0
  137. package/dist/types.d.ts +128 -0
  138. package/dist/types.js +1 -0
  139. package/dist/wcdispatch.d.ts +1 -0
  140. package/dist/wcdispatch.js +9 -0
  141. package/package.json +102 -0
@@ -0,0 +1,23 @@
1
+ import { SvelteComponent } from "svelte";
2
+ import type { DrawerOption } from './types.ts';
3
+ declare const __propDef: {
4
+ props: {
5
+ multiple?: boolean | undefined;
6
+ item: DrawerOption;
7
+ scrollIfSelected?: boolean | undefined;
8
+ workspace?: boolean | undefined;
9
+ };
10
+ events: {
11
+ change: CustomEvent<any>;
12
+ click: CustomEvent<any>;
13
+ } & {
14
+ [evt: string]: CustomEvent<any>;
15
+ };
16
+ slots: {};
17
+ };
18
+ export type DrawerContextItemProps = typeof __propDef.props;
19
+ export type DrawerContextItemEvents = typeof __propDef.events;
20
+ export type DrawerContextItemSlots = typeof __propDef.slots;
21
+ export default class DrawerContextItem extends SvelteComponent<DrawerContextItemProps, DrawerContextItemEvents, DrawerContextItemSlots> {
22
+ }
23
+ export {};
@@ -0,0 +1,40 @@
1
+ <script>import DrawerContextItem from "./DrawerContextItem.svelte";
2
+ import { Icon } from "@steeze-ui/svelte-icon";
3
+ import { AddCircle, Settings } from "@invopop/ui-icons";
4
+ import { createEventDispatcher } from "svelte";
5
+ export let items = [];
6
+ export let multiple = false;
7
+ const dispatch = createEventDispatcher();
8
+ </script>
9
+
10
+ <div class="w-[300px] border border-neutral-100 pt-1 rounded shadow-lg space-y-0.5 bg-white">
11
+ <ul class="px-1 pb-0.5 space-y-1 max-h-[60vh] overflow-y-auto">
12
+ {#each items as item}
13
+ <DrawerContextItem {item} {multiple} workspace on:click />
14
+ {/each}
15
+ </ul>
16
+ <ul class="px-1 space-y-1 bg-neutral-50 rounded-b border-t border-neutral-100 p-1 space-y-1">
17
+ <li class="pl-1.5 py-1.5 pr-2 hover:bg-neutral-100 rounded-sm">
18
+ <button
19
+ class="flex items-center space-x-2 w-full"
20
+ on:click={() => {
21
+ dispatch('click', 'add')
22
+ }}
23
+ >
24
+ <Icon src={AddCircle} class="w-4 h-4 text-neutral-500 flex-shrink-0" />
25
+ <span class="text-neutral-800 tracking-tight text-base">Create workspace</span>
26
+ </button>
27
+ </li>
28
+ <li class="pl-1.5 py-1.5 pr-2 hover:bg-neutral-100 rounded-sm">
29
+ <button
30
+ class="flex items-center space-x-2 w-full"
31
+ on:click={() => {
32
+ dispatch('click', 'settings')
33
+ }}
34
+ >
35
+ <Icon src={Settings} class="w-4 h-4 text-neutral-500" />
36
+ <span class="text-neutral-800 tracking-tight text-base">Settings</span>
37
+ </button>
38
+ </li>
39
+ </ul>
40
+ </div>
@@ -0,0 +1,20 @@
1
+ import { SvelteComponent } from "svelte";
2
+ import type { DrawerOption } from './types.ts';
3
+ declare const __propDef: {
4
+ props: {
5
+ items?: DrawerOption[] | undefined;
6
+ multiple?: boolean | undefined;
7
+ };
8
+ events: {
9
+ click: CustomEvent<any>;
10
+ } & {
11
+ [evt: string]: CustomEvent<any>;
12
+ };
13
+ slots: {};
14
+ };
15
+ export type DrawerContextWorkspaceProps = typeof __propDef.props;
16
+ export type DrawerContextWorkspaceEvents = typeof __propDef.events;
17
+ export type DrawerContextWorkspaceSlots = typeof __propDef.slots;
18
+ export default class DrawerContextWorkspace extends SvelteComponent<DrawerContextWorkspaceProps, DrawerContextWorkspaceEvents, DrawerContextWorkspaceSlots> {
19
+ }
20
+ export {};
@@ -0,0 +1,78 @@
1
+ <script>import isEqual from "lodash/isEqual.js";
2
+ import { Icon } from "@steeze-ui/svelte-icon";
3
+ import { createEventDispatcher } from "svelte";
4
+ import { resolveIcon } from "./helpers.js";
5
+ import BaseDropdown from "./BaseDropdown.svelte";
6
+ import DrawerContext from "./DrawerContext.svelte";
7
+ import clsx from "clsx";
8
+ import TagStatus from "./TagStatus.svelte";
9
+ const dispatch = createEventDispatcher();
10
+ export let value = "";
11
+ export let icon = void 0;
12
+ export let iconTheme = "default";
13
+ export let options = [];
14
+ export let placeholder = "";
15
+ export let multiple = false;
16
+ export let fullWidth = false;
17
+ let selectDropdown;
18
+ let resolvedIcon;
19
+ let isOpen = false;
20
+ $: {
21
+ resolveIcon(icon).then((icon2) => {
22
+ resolvedIcon = icon2;
23
+ });
24
+ }
25
+ $:
26
+ items = options.map((o) => ({
27
+ ...o,
28
+ selected: multiple ? Boolean(value.find((v) => v.value === o.value)) : o.value === value
29
+ }));
30
+ $:
31
+ selectedColor = !multiple && items.find((i) => i.selected)?.color;
32
+ $:
33
+ selectedLabel = !multiple && items.find((i) => i.selected)?.label || placeholder;
34
+ $:
35
+ styles = clsx({
36
+ "shadow-active border-workspace-accent hover:border-workspace-accent": isOpen
37
+ });
38
+ function handleClick(e) {
39
+ value = e.detail;
40
+ dispatch("selected", value);
41
+ if (multiple)
42
+ return;
43
+ selectDropdown.toggle();
44
+ }
45
+ function handleSelected(e) {
46
+ if (!multiple)
47
+ return;
48
+ if (isEqual(value, e.detail))
49
+ return;
50
+ value = e.detail;
51
+ }
52
+ </script>
53
+
54
+ <BaseDropdown bind:isOpen placement="bottom-start" {fullWidth} bind:this={selectDropdown}>
55
+ <div
56
+ class="{styles} dropdown-select flex items-center border hover:border-neutral-300 rounded-md py-1.25 pl-2 gap-1 bg-white"
57
+ slot="trigger"
58
+ >
59
+ {#if resolvedIcon && !selectedColor}
60
+ <Icon src={resolvedIcon} {iconTheme} class="h-4 w-4 text-neutral-500 flex-shrink-0" />
61
+ {/if}
62
+ {#if selectedColor}
63
+ <TagStatus dot status={selectedColor} />
64
+ {/if}
65
+ <span class="w-full pr-8 text-neutral-800 placeholder-neutral-800 text-base">
66
+ {selectedLabel}
67
+ </span>
68
+ </div>
69
+ <DrawerContext {multiple} {items} on:click={handleClick} on:selected={handleSelected} />
70
+ </BaseDropdown>
71
+
72
+ <style>
73
+ .dropdown-select {
74
+ background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgeD0iMiIgeT0iMiIgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiByeD0iNCIgZmlsbD0iI0YzRjRGNiIvPgo8cGF0aCBkPSJNNi41IDguMjUwMDRMMTAgMTEuNzVMMTMuNSA4LjI1IiBzdHJva2U9IiMwMzA3MTIiIHN0cm9rZS13aWR0aD0iMS4xIi8+Cjwvc3ZnPg==');
75
+ background-repeat: no-repeat;
76
+ background-position: center right 8px;
77
+ }
78
+ </style>
@@ -0,0 +1,26 @@
1
+ import { SvelteComponent } from "svelte";
2
+ import type { AnyProp, DrawerOption, IconTheme } from './types.ts';
3
+ import { type IconSource } from '@steeze-ui/svelte-icon';
4
+ declare const __propDef: {
5
+ props: {
6
+ value?: AnyProp | undefined;
7
+ icon?: IconSource | string | undefined;
8
+ iconTheme?: IconTheme | undefined;
9
+ options?: DrawerOption[] | undefined;
10
+ placeholder?: string | undefined;
11
+ multiple?: boolean | undefined;
12
+ fullWidth?: boolean | undefined;
13
+ };
14
+ events: {
15
+ selected: CustomEvent<any>;
16
+ } & {
17
+ [evt: string]: CustomEvent<any>;
18
+ };
19
+ slots: {};
20
+ };
21
+ export type DropdownSelectProps = typeof __propDef.props;
22
+ export type DropdownSelectEvents = typeof __propDef.events;
23
+ export type DropdownSelectSlots = typeof __propDef.slots;
24
+ export default class DropdownSelect extends SvelteComponent<DropdownSelectProps, DropdownSelectEvents, DropdownSelectSlots> {
25
+ }
26
+ export {};
@@ -0,0 +1,46 @@
1
+ <script>import IconEmpty from "./svg/IconEmpty.svelte";
2
+ import { Icon } from "@steeze-ui/svelte-icon";
3
+ export let icon = void 0;
4
+ export let title = "";
5
+ export let description = "";
6
+ export let check = false;
7
+ </script>
8
+
9
+ <div
10
+ class="flex flex-col text-center items-center justify-center h-full font-sans gap-1"
11
+ aria-label={title}
12
+ >
13
+ {#if icon}
14
+ <div class="relative h-[120px] w-[352px] max-w-sm">
15
+ <IconEmpty />
16
+ <div class="absolute left-[50%] translate-x-[-50%] top-[50%] translate-y-[-50%]">
17
+ <Icon src={icon} class="h-12 w-12 text-workspace-accent" />
18
+ {#if check}
19
+ <svg
20
+ width="26"
21
+ height="26"
22
+ viewBox="0 0 26 26"
23
+ fill="none"
24
+ xmlns="http://www.w3.org/2000/svg"
25
+ class="absolute top-[-16px] right-[-16px]"
26
+ >
27
+ <path
28
+ d="M13 1C6.3835 1 1 6.3835 1 13C1 19.6165 6.3835 25 13 25C19.6165 25 25 19.6165 25 13C25 6.3835 19.6165 1 13 1Z"
29
+ fill="#169958"
30
+ />
31
+ <circle cx="13" cy="13" r="10" stroke="white" stroke-opacity="0.4" stroke-width="0.6" />
32
+ <path
33
+ d="M18.1078 9.82205C15.7021 11.6837 13.6627 14.2538 12.0477 17.4584C11.8808 17.7912 11.5495 17.9999 11.1884 17.9999C10.83 18.004 10.4922 17.7885 10.3253 17.4517C9.58119 15.9471 8.7491 14.7239 7.78243 13.7123C7.40457 13.3176 7.40586 12.6764 7.78632 12.2831C8.16418 11.8898 8.78016 11.8898 9.15932 12.2871C9.90083 13.063 10.5699 13.9413 11.182 14.9435C12.7853 12.1888 14.7199 9.92443 16.9509 8.19887C17.3805 7.8675 17.9888 7.9591 18.3084 8.40766C18.628 8.85488 18.5387 9.48934 18.1078 9.82205Z"
34
+ fill="white"
35
+ />
36
+ </svg>
37
+ {/if}
38
+ </div>
39
+ </div>
40
+ {/if}
41
+ <div class="space-y-0.5">
42
+ <h4 class="font-medium text-base text-neutral-800 text-base tracking-tight">{title}</h4>
43
+ <p class="max-w-xs text-base text-neutral-500 tracking-normal">{description}</p>
44
+ <p><slot /></p>
45
+ </div>
46
+ </div>
@@ -0,0 +1,22 @@
1
+ import { SvelteComponent } from "svelte";
2
+ import { type IconSource } from '@steeze-ui/svelte-icon';
3
+ declare const __propDef: {
4
+ props: {
5
+ icon?: IconSource | undefined;
6
+ title?: string | undefined;
7
+ description?: string | undefined;
8
+ check?: boolean | undefined;
9
+ };
10
+ events: {
11
+ [evt: string]: CustomEvent<any>;
12
+ };
13
+ slots: {
14
+ default: {};
15
+ };
16
+ };
17
+ export type EmptyStateIconProps = typeof __propDef.props;
18
+ export type EmptyStateIconEvents = typeof __propDef.events;
19
+ export type EmptyStateIconSlots = typeof __propDef.slots;
20
+ export default class EmptyStateIcon extends SvelteComponent<EmptyStateIconProps, EmptyStateIconEvents, EmptyStateIconSlots> {
21
+ }
22
+ export {};
@@ -0,0 +1,58 @@
1
+ <script>import BgPattern from "./svg/BgPattern.svelte";
2
+ import IconContact from "./svg/IconContact.svelte";
3
+ import IconInvoice from "./svg/IconInvoice.svelte";
4
+ import IconProduct from "./svg/IconProduct.svelte";
5
+ import IconFile from "./svg/IconFile.svelte";
6
+ import IconPdf from "./svg/IconPdf.svelte";
7
+ import IconNoResults from "./svg/IconNoResults.svelte";
8
+ export let icon = void 0;
9
+ export let title = "";
10
+ export let description = "";
11
+ $:
12
+ iconComponent = getComponent(icon);
13
+ function getComponent(icon2) {
14
+ if (!icon2)
15
+ return void 0;
16
+ const icons = {
17
+ invoices: IconInvoice,
18
+ contacts: IconContact,
19
+ products: IconProduct,
20
+ file: IconFile,
21
+ pdf: IconPdf,
22
+ "no-results": IconNoResults
23
+ };
24
+ return icons[icon2];
25
+ }
26
+ </script>
27
+
28
+ <div
29
+ class="flex flex-col text-center items-center justify-center h-full font-sans gap-1"
30
+ aria-label={title}
31
+ >
32
+ {#if iconComponent}
33
+ <div class="relative h-[120px] w-full max-w-sm">
34
+ <div class="absolute top-0 left-0">
35
+ <BgPattern />
36
+ </div>
37
+ <svelte:component
38
+ this={iconComponent}
39
+ classes="text-neutral-400/40 absolute left-[50%] translate-x-[-50%] top-[50%] translate-y-[-50%] -ml-[40px] rotate-[-8deg] mt-0.5 z-20 w-[86px] h-[104px]"
40
+ />
41
+ <svelte:component
42
+ this={iconComponent}
43
+ classes="{icon === 'no-results'
44
+ ? 'text-neutral-400'
45
+ : 'text-workspace-accent'} absolute left-[50%] translate-x-[-50%] top-[50%] translate-y-[-50%] z-30 w-[97px] h-[117px]"
46
+ />
47
+ <svelte:component
48
+ this={iconComponent}
49
+ classes="text-neutral-400/40 absolute left-[50%] translate-x-[-50%] top-[50%] translate-y-[-50%] ml-[40px] rotate-[8deg] mt-0.5 z-20 w-[86px] h-[104px]"
50
+ />
51
+ </div>
52
+ {/if}
53
+ <div class="space-y-0.5">
54
+ <h4 class="font-medium text-base text-neutral-800 text-base tracking-tight">{title}</h4>
55
+ <p class="max-w-xs text-base text-neutral-500 tracking-normal">{description}</p>
56
+ <p><slot /></p>
57
+ </div>
58
+ </div>
@@ -0,0 +1,21 @@
1
+ import { SvelteComponent } from "svelte";
2
+ import type { EmptyStateIcon } from './types.js';
3
+ declare const __propDef: {
4
+ props: {
5
+ icon?: EmptyStateIcon | undefined;
6
+ title?: string | undefined;
7
+ description?: string | undefined;
8
+ };
9
+ events: {
10
+ [evt: string]: CustomEvent<any>;
11
+ };
12
+ slots: {
13
+ default: {};
14
+ };
15
+ };
16
+ export type EmptyStateIllustrationProps = typeof __propDef.props;
17
+ export type EmptyStateIllustrationEvents = typeof __propDef.events;
18
+ export type EmptyStateIllustrationSlots = typeof __propDef.slots;
19
+ export default class EmptyStateIllustration extends SvelteComponent<EmptyStateIllustrationProps, EmptyStateIllustrationEvents, EmptyStateIllustrationSlots> {
20
+ }
21
+ export {};
@@ -0,0 +1,26 @@
1
+ <script>import TagStatus from "./TagStatus.svelte";
2
+ export let events = [];
3
+ </script>
4
+
5
+ <div class="border border-neutral-100 bg-neutral-50 rounded">
6
+ {#each events as event, i (i)}
7
+ <div class:border-t={i > 0} class="border-neutral-100 py-2 px-3">
8
+ <div class="flex items-center justify-between">
9
+ <div class="flex items-center space-x-2">
10
+ <TagStatus status={event.status.type} label={event.status.label} />
11
+ {#if event.code}
12
+ <p class="text-sm text-neutral-500 font-mono tracking-wide">
13
+ {event.code}
14
+ </p>
15
+ {/if}
16
+ </div>
17
+ <p class="text-sm text-neutral-500 font-mono tracking-wide">
18
+ {event.date.toISOString()}
19
+ </p>
20
+ </div>
21
+ {#if event.message}
22
+ <p class="text-neutral-800 text-sm pt-2 tracking-normal">{event.message}</p>
23
+ {/if}
24
+ </div>
25
+ {/each}
26
+ </div>
@@ -0,0 +1,17 @@
1
+ import { SvelteComponent } from "svelte";
2
+ import type { FeedEvent } from './types.js';
3
+ declare const __propDef: {
4
+ props: {
5
+ events?: FeedEvent[] | undefined;
6
+ };
7
+ events: {
8
+ [evt: string]: CustomEvent<any>;
9
+ };
10
+ slots: {};
11
+ };
12
+ export type FeedEventsProps = typeof __propDef.props;
13
+ export type FeedEventsEvents = typeof __propDef.events;
14
+ export type FeedEventsSlots = typeof __propDef.slots;
15
+ export default class FeedEvents extends SvelteComponent<FeedEventsProps, FeedEventsEvents, FeedEventsSlots> {
16
+ }
17
+ export {};
@@ -0,0 +1,10 @@
1
+ <script>import { Icon } from "@steeze-ui/svelte-icon";
2
+ export let icon = void 0;
3
+ export let iconTheme = "default";
4
+ </script>
5
+
6
+ <div class="relative py-0.5 mt-2">
7
+ {#if icon}
8
+ <Icon src={icon} theme={iconTheme} class="h-4 w-4 text-neutral-500" />
9
+ {/if}
10
+ </div>
@@ -0,0 +1,19 @@
1
+ import { SvelteComponent } from "svelte";
2
+ import { type IconSource } from '@steeze-ui/svelte-icon';
3
+ import type { IconTheme } from './types.js';
4
+ declare const __propDef: {
5
+ props: {
6
+ icon?: IconSource | undefined;
7
+ iconTheme?: IconTheme | undefined;
8
+ };
9
+ events: {
10
+ [evt: string]: CustomEvent<any>;
11
+ };
12
+ slots: {};
13
+ };
14
+ export type FeedIconEventProps = typeof __propDef.props;
15
+ export type FeedIconEventEvents = typeof __propDef.events;
16
+ export type FeedIconEventSlots = typeof __propDef.slots;
17
+ export default class FeedIconEvent extends SvelteComponent<FeedIconEventProps, FeedIconEventEvents, FeedIconEventSlots> {
18
+ }
19
+ export {};
@@ -0,0 +1,26 @@
1
+ <script>import { Icon } from "@steeze-ui/svelte-icon";
2
+ import { Alert, Failure, Queue, Running, Success, CheckBadge, Skip } from "@invopop/ui-icons";
3
+ export let status;
4
+ $:
5
+ iconStatus = getIconStatus(status);
6
+ function getIconStatus(status2) {
7
+ const icons = {
8
+ failure: Failure,
9
+ success: Success,
10
+ run: Running,
11
+ queued: Queue,
12
+ alert: Alert,
13
+ skip: Skip,
14
+ signed: CheckBadge
15
+ };
16
+ return icons[status2];
17
+ }
18
+ </script>
19
+
20
+ {#if iconStatus}
21
+ <div title={status}>
22
+ <Icon src={iconStatus} class="h-4 w-4 flex-shrink-0" />
23
+ </div>
24
+ {:else}
25
+ <div class="w-4 h-4 flex-shrink-0 bg-neutral-200 rounded-full" />
26
+ {/if}
@@ -0,0 +1,17 @@
1
+ import { SvelteComponent } from "svelte";
2
+ import type { FeedItemStatus } from './types.ts';
3
+ declare const __propDef: {
4
+ props: {
5
+ status: FeedItemStatus;
6
+ };
7
+ events: {
8
+ [evt: string]: CustomEvent<any>;
9
+ };
10
+ slots: {};
11
+ };
12
+ export type FeedIconStatusProps = typeof __propDef.props;
13
+ export type FeedIconStatusEvents = typeof __propDef.events;
14
+ export type FeedIconStatusSlots = typeof __propDef.slots;
15
+ export default class FeedIconStatus extends SvelteComponent<FeedIconStatusProps, FeedIconStatusEvents, FeedIconStatusSlots> {
16
+ }
17
+ export {};
@@ -0,0 +1,87 @@
1
+ <script>import FeedIconEvent from "./FeedIconEvent.svelte";
2
+ import FeedIconStatus from "./FeedIconStatus.svelte";
3
+ import { createEventDispatcher } from "svelte";
4
+ import BaseButton from "./BaseButton.svelte";
5
+ import ProfileAvatar from "./ProfileAvatar.svelte";
6
+ const dispatch = createEventDispatcher();
7
+ export let status = void 0;
8
+ export let icon = void 0;
9
+ export let title = "";
10
+ export let date = void 0;
11
+ export let hasNext = false;
12
+ export let slug = "";
13
+ export let viewable = false;
14
+ export let viewableText = "View";
15
+ export let user = void 0;
16
+ export let type = "";
17
+ export let extraText = "";
18
+ const dateOptions = {
19
+ year: "numeric",
20
+ month: "short",
21
+ day: "numeric",
22
+ hour: "2-digit",
23
+ minute: "2-digit",
24
+ hour12: false
25
+ };
26
+ </script>
27
+
28
+ <div id={`feed-item-${slug}`} class="relative text-left w-full min-w-[344px]">
29
+ {#if hasNext && icon}
30
+ <span class="absolute bottom-[-20px] left-2 border-l border-neutral-100 w-px h-[58px]" />
31
+ {/if}
32
+ <div class="flex items-start justify-between space-x-2 py-3">
33
+ <div class="relative">
34
+ {#if icon}
35
+ <FeedIconEvent {icon} />
36
+ {/if}
37
+ </div>
38
+ <div
39
+ class="flex-1 items-center justify-start pl-2.5 py-2 pr-2 rounded-lg border border-neutral-100"
40
+ >
41
+ <div
42
+ class="text-base text-neutral-800 whitespace-nowrap tracking-normal font-medium flex items-center gap-1 {viewable
43
+ ? 'max-w-[260px]'
44
+ : 'max-w-[320px]'}"
45
+ >
46
+ {#if user}
47
+ <div class="mr-0.5">
48
+ <ProfileAvatar small {...user} />
49
+ </div>
50
+ {/if}
51
+ <p class="truncate" {title}>{title}</p>
52
+
53
+ {#if status}
54
+ <FeedIconStatus {status} />
55
+ {/if}
56
+ </div>
57
+ <p
58
+ class="mt-0.5 flex items-center space-x-2 text-sm text-neutral-500 whitespace-nowrap tabular-nums slashed-zero lining-nums tracking-normal"
59
+ >
60
+ {#if date}
61
+ <span>
62
+ {date.toLocaleDateString('en-us', dateOptions)}
63
+ </span>
64
+ {/if}
65
+ {#if date && extraText}
66
+ <span>·</span>
67
+ {/if}
68
+ {#if extraText}
69
+ <span>{extraText}</span>
70
+ {/if}
71
+ </p>
72
+ </div>
73
+ </div>
74
+ {#if viewable}
75
+ <span class="absolute top-5 right-2">
76
+ <BaseButton
77
+ small
78
+ variant="secondary"
79
+ on:click={() => {
80
+ dispatch('view', type)
81
+ }}
82
+ >
83
+ {viewableText}
84
+ </BaseButton>
85
+ </span>
86
+ {/if}
87
+ </div>
@@ -0,0 +1,30 @@
1
+ import { SvelteComponent } from "svelte";
2
+ import type { IconSource } from '@steeze-ui/svelte-icon';
3
+ import type { FeedItemStatus, FeedItemUser } from './types.ts';
4
+ declare const __propDef: {
5
+ props: {
6
+ status?: FeedItemStatus | undefined;
7
+ icon?: IconSource | undefined;
8
+ title?: string | undefined;
9
+ date?: Date | undefined;
10
+ hasNext?: boolean | undefined;
11
+ slug?: string | undefined;
12
+ viewable?: boolean | undefined;
13
+ viewableText?: string | undefined;
14
+ user?: FeedItemUser | undefined;
15
+ type?: string | undefined;
16
+ extraText?: string | undefined;
17
+ };
18
+ events: {
19
+ view: CustomEvent<any>;
20
+ } & {
21
+ [evt: string]: CustomEvent<any>;
22
+ };
23
+ slots: {};
24
+ };
25
+ export type FeedItemProps = typeof __propDef.props;
26
+ export type FeedItemEvents = typeof __propDef.events;
27
+ export type FeedItemSlots = typeof __propDef.slots;
28
+ export default class FeedItem extends SvelteComponent<FeedItemProps, FeedItemEvents, FeedItemSlots> {
29
+ }
30
+ export {};
@@ -0,0 +1,56 @@
1
+ <script>import FeedIconStatus from "./FeedIconStatus.svelte";
2
+ import UuidCopy from "./UuidCopy.svelte";
3
+ import FeedEvents from "./FeedEvents.svelte";
4
+ import { slide } from "svelte/transition";
5
+ import SeparatorHorizontal from "./SeparatorHorizontal.svelte";
6
+ export let status = void 0;
7
+ export let title = "";
8
+ export let uuid = "";
9
+ export let events = [];
10
+ export let idLabel = "ID:";
11
+ let open = false;
12
+ </script>
13
+
14
+ <div class="w-full rounded-lg border border-neutral-100">
15
+ <div class="px-3 py-2.5 flex items-center space-x-1.5">
16
+ {#if status}
17
+ <FeedIconStatus {status} />
18
+ {/if}
19
+ <span class="truncate font-medium text-neutral-800 text-base">{title}</span>
20
+ </div>
21
+ <SeparatorHorizontal />
22
+ <div class="pl-3 py-1 pr-2.5 flex items-center space-x-0.5">
23
+ <span class="text-sm text-neutral-500 whitespace-nowrap">{idLabel}</span>
24
+ {#if uuid}
25
+ <UuidCopy {uuid} full small on:copied />
26
+ {/if}
27
+ </div>
28
+ {#if events.length}
29
+ <SeparatorHorizontal />
30
+ <div class="px-3 py-2 text-sm text-neutral-500 flex items-center justify-between">
31
+ <span>Logs</span>
32
+ <button
33
+ on:click={() => {
34
+ open = !open
35
+ }}
36
+ >
37
+ <svg
38
+ class:rotate-180={open}
39
+ width="20"
40
+ height="20"
41
+ viewBox="0 0 20 20"
42
+ fill="none"
43
+ xmlns="http://www.w3.org/2000/svg"
44
+ >
45
+ <rect x="2" y="2" width="16" height="16" rx="4" fill="#F3F4F6" />
46
+ <path d="M6.5 8.25004L10 11.75L13.5 8.25" stroke="#030712" stroke-width="1.1" />
47
+ </svg>
48
+ </button>
49
+ </div>
50
+ {#if open}
51
+ <div transition:slide class="px-3 pb-3">
52
+ <FeedEvents {events} />
53
+ </div>
54
+ {/if}
55
+ {/if}
56
+ </div>
@@ -0,0 +1,23 @@
1
+ import { SvelteComponent } from "svelte";
2
+ import type { FeedEvent, FeedItemStatus } from './types.ts';
3
+ declare const __propDef: {
4
+ props: {
5
+ status?: FeedItemStatus | undefined;
6
+ title?: string | undefined;
7
+ uuid?: string | undefined;
8
+ events?: FeedEvent[] | undefined;
9
+ idLabel?: string | undefined;
10
+ };
11
+ events: {
12
+ copied: CustomEvent<any>;
13
+ } & {
14
+ [evt: string]: CustomEvent<any>;
15
+ };
16
+ slots: {};
17
+ };
18
+ export type FeedItemDetailProps = typeof __propDef.props;
19
+ export type FeedItemDetailEvents = typeof __propDef.events;
20
+ export type FeedItemDetailSlots = typeof __propDef.slots;
21
+ export default class FeedItemDetail extends SvelteComponent<FeedItemDetailProps, FeedItemDetailEvents, FeedItemDetailSlots> {
22
+ }
23
+ export {};