@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.
- package/README.md +146 -0
- package/dist/BaseButton.svelte +107 -0
- package/dist/BaseButton.svelte.d.ts +33 -0
- package/dist/BaseCard.svelte +50 -0
- package/dist/BaseCard.svelte.d.ts +25 -0
- package/dist/BaseCounter.svelte +16 -0
- package/dist/BaseCounter.svelte.d.ts +17 -0
- package/dist/BaseDropdown.svelte +46 -0
- package/dist/BaseDropdown.svelte.d.ts +24 -0
- package/dist/BaseFlag.svelte +14 -0
- package/dist/BaseFlag.svelte.d.ts +17 -0
- package/dist/BaseTable.svelte +148 -0
- package/dist/BaseTable.svelte.d.ts +33 -0
- package/dist/BaseTableActions.svelte +31 -0
- package/dist/BaseTableActions.svelte.d.ts +21 -0
- package/dist/BaseTableCell.svelte +90 -0
- package/dist/BaseTableCell.svelte.d.ts +26 -0
- package/dist/BaseTableHeader.svelte +75 -0
- package/dist/BaseTableHeader.svelte.d.ts +23 -0
- package/dist/BaseTableHeaderSortBy.svelte +22 -0
- package/dist/BaseTableHeaderSortBy.svelte.d.ts +20 -0
- package/dist/BaseTableRow.svelte +48 -0
- package/dist/BaseTableRow.svelte.d.ts +25 -0
- package/dist/ButtonFile.svelte +51 -0
- package/dist/ButtonFile.svelte.d.ts +25 -0
- package/dist/CardRelation.svelte +29 -0
- package/dist/CardRelation.svelte.d.ts +22 -0
- package/dist/CompanySelector.svelte +74 -0
- package/dist/CompanySelector.svelte.d.ts +23 -0
- package/dist/CounterWorkflow.svelte +15 -0
- package/dist/CounterWorkflow.svelte.d.ts +17 -0
- package/dist/DataListItem.svelte +22 -0
- package/dist/DataListItem.svelte.d.ts +22 -0
- package/dist/DatePicker.svelte +431 -0
- package/dist/DatePicker.svelte.d.ts +22 -0
- package/dist/DrawerContext.svelte +48 -0
- package/dist/DrawerContext.svelte.d.ts +23 -0
- package/dist/DrawerContextItem.svelte +93 -0
- package/dist/DrawerContextItem.svelte.d.ts +23 -0
- package/dist/DrawerContextWorkspace.svelte +40 -0
- package/dist/DrawerContextWorkspace.svelte.d.ts +20 -0
- package/dist/DropdownSelect.svelte +78 -0
- package/dist/DropdownSelect.svelte.d.ts +26 -0
- package/dist/EmptyStateIcon.svelte +46 -0
- package/dist/EmptyStateIcon.svelte.d.ts +22 -0
- package/dist/EmptyStateIllustration.svelte +58 -0
- package/dist/EmptyStateIllustration.svelte.d.ts +21 -0
- package/dist/FeedEvents.svelte +26 -0
- package/dist/FeedEvents.svelte.d.ts +17 -0
- package/dist/FeedIconEvent.svelte +10 -0
- package/dist/FeedIconEvent.svelte.d.ts +19 -0
- package/dist/FeedIconStatus.svelte +26 -0
- package/dist/FeedIconStatus.svelte.d.ts +17 -0
- package/dist/FeedItem.svelte +87 -0
- package/dist/FeedItem.svelte.d.ts +30 -0
- package/dist/FeedItemDetail.svelte +56 -0
- package/dist/FeedItemDetail.svelte.d.ts +23 -0
- package/dist/FeedViewer.svelte +19 -0
- package/dist/FeedViewer.svelte.d.ts +21 -0
- package/dist/FormLayoutModal.svelte +8 -0
- package/dist/FormLayoutModal.svelte.d.ts +29 -0
- package/dist/GlobalSearch.svelte +47 -0
- package/dist/GlobalSearch.svelte.d.ts +18 -0
- package/dist/InputCheckbox.svelte +20 -0
- package/dist/InputCheckbox.svelte.d.ts +18 -0
- package/dist/InputError.svelte +14 -0
- package/dist/InputError.svelte.d.ts +16 -0
- package/dist/InputLabel.svelte +5 -0
- package/dist/InputLabel.svelte.d.ts +17 -0
- package/dist/InputRadio.svelte +27 -0
- package/dist/InputRadio.svelte.d.ts +19 -0
- package/dist/InputSearch.svelte +69 -0
- package/dist/InputSearch.svelte.d.ts +32 -0
- package/dist/InputSelect.svelte +75 -0
- package/dist/InputSelect.svelte.d.ts +30 -0
- package/dist/InputText.svelte +63 -0
- package/dist/InputText.svelte.d.ts +26 -0
- package/dist/InputTextarea.svelte +42 -0
- package/dist/InputTextarea.svelte.d.ts +24 -0
- package/dist/InputToggle.svelte +33 -0
- package/dist/InputToggle.svelte.d.ts +18 -0
- package/dist/MenuItem.svelte +141 -0
- package/dist/MenuItem.svelte.d.ts +29 -0
- package/dist/ProfileAvatar.svelte +39 -0
- package/dist/ProfileAvatar.svelte.d.ts +21 -0
- package/dist/ProfileSelector.svelte +20 -0
- package/dist/ProfileSelector.svelte.d.ts +20 -0
- package/dist/SectionLayout.svelte +10 -0
- package/dist/SectionLayout.svelte.d.ts +18 -0
- package/dist/SeparatorHorizontal.svelte +14 -0
- package/dist/SeparatorHorizontal.svelte.d.ts +23 -0
- package/dist/ShortcutWrapper.svelte +6 -0
- package/dist/ShortcutWrapper.svelte.d.ts +27 -0
- package/dist/StatusLabel.svelte +20 -0
- package/dist/StatusLabel.svelte.d.ts +18 -0
- package/dist/Tabs.svelte +41 -0
- package/dist/Tabs.svelte.d.ts +20 -0
- package/dist/TagBeta.svelte +23 -0
- package/dist/TagBeta.svelte.d.ts +23 -0
- package/dist/TagSearch.svelte +46 -0
- package/dist/TagSearch.svelte.d.ts +22 -0
- package/dist/TagStatus.svelte +46 -0
- package/dist/TagStatus.svelte.d.ts +19 -0
- package/dist/TitleMain.svelte +6 -0
- package/dist/TitleMain.svelte.d.ts +18 -0
- package/dist/TitleSection.svelte +6 -0
- package/dist/TitleSection.svelte.d.ts +18 -0
- package/dist/UuidCopy.svelte +55 -0
- package/dist/UuidCopy.svelte.d.ts +26 -0
- package/dist/clickOutside.d.ts +4 -0
- package/dist/clickOutside.js +18 -0
- package/dist/constants.d.ts +1 -0
- package/dist/constants.js +1 -0
- package/dist/helpers.d.ts +6 -0
- package/dist/helpers.js +35 -0
- package/dist/index.d.ts +51 -0
- package/dist/index.js +101 -0
- package/dist/popui.css +1 -0
- package/dist/svg/BgPattern.svelte +20 -0
- package/dist/svg/BgPattern.svelte.d.ts +23 -0
- package/dist/svg/IconContact.svelte +114 -0
- package/dist/svg/IconContact.svelte.d.ts +16 -0
- package/dist/svg/IconEmpty.svelte +138 -0
- package/dist/svg/IconEmpty.svelte.d.ts +23 -0
- package/dist/svg/IconFile.svelte +91 -0
- package/dist/svg/IconFile.svelte.d.ts +16 -0
- package/dist/svg/IconInvoice.svelte +97 -0
- package/dist/svg/IconInvoice.svelte.d.ts +16 -0
- package/dist/svg/IconNoResults.svelte +83 -0
- package/dist/svg/IconNoResults.svelte.d.ts +16 -0
- package/dist/svg/IconPdf.svelte +93 -0
- package/dist/svg/IconPdf.svelte.d.ts +16 -0
- package/dist/svg/IconProduct.svelte +105 -0
- package/dist/svg/IconProduct.svelte.d.ts +16 -0
- package/dist/tw.theme.d.ts +135 -0
- package/dist/tw.theme.js +152 -0
- package/dist/types.d.ts +128 -0
- package/dist/types.js +1 -0
- package/dist/wcdispatch.d.ts +1 -0
- package/dist/wcdispatch.js +9 -0
- package/package.json +102 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<script>import clsx from "clsx";
|
|
2
|
+
import { createEventDispatcher } from "svelte";
|
|
3
|
+
import { createSwitch } from "svelte-headlessui";
|
|
4
|
+
import { dispatchWcEvent } from "./wcdispatch.js";
|
|
5
|
+
const dispatch = createEventDispatcher();
|
|
6
|
+
const sw = createSwitch({ label: "Set Preference" });
|
|
7
|
+
let rootEl;
|
|
8
|
+
export let checked = false;
|
|
9
|
+
$:
|
|
10
|
+
$sw.checked = checked;
|
|
11
|
+
$:
|
|
12
|
+
togleStyles = clsx({ "bg-gray-200": !$sw.checked }, { "bg-workspace-accent": $sw.checked });
|
|
13
|
+
function handleChange() {
|
|
14
|
+
dispatch("change", $sw.checked);
|
|
15
|
+
dispatchWcEvent(rootEl, "change", $sw.checked);
|
|
16
|
+
}
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<div bind:this={rootEl} class="flex w-full flex-col items-center justify-center">
|
|
20
|
+
<button
|
|
21
|
+
class="{togleStyles} relative inline-flex h-5 w-8 flex-shrink-0 cursor-pointer rounded-md border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-0 focus:ring-offset-0"
|
|
22
|
+
use:sw.toggle
|
|
23
|
+
on:click={handleChange}
|
|
24
|
+
>
|
|
25
|
+
<span class="sr-only">Use setting</span>
|
|
26
|
+
<span
|
|
27
|
+
aria-hidden="true"
|
|
28
|
+
class="{$sw.checked
|
|
29
|
+
? 'translate-x-3'
|
|
30
|
+
: 'translate-x-0'} pointer-events-none inline-block h-4 w-4 transform rounded bg-white shadow ring-0 transition duration-200 ease-in-out"
|
|
31
|
+
/>
|
|
32
|
+
</button>
|
|
33
|
+
</div>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
checked?: boolean | undefined;
|
|
5
|
+
};
|
|
6
|
+
events: {
|
|
7
|
+
change: CustomEvent<any>;
|
|
8
|
+
} & {
|
|
9
|
+
[evt: string]: CustomEvent<any>;
|
|
10
|
+
};
|
|
11
|
+
slots: {};
|
|
12
|
+
};
|
|
13
|
+
export type InputToggleProps = typeof __propDef.props;
|
|
14
|
+
export type InputToggleEvents = typeof __propDef.events;
|
|
15
|
+
export type InputToggleSlots = typeof __propDef.slots;
|
|
16
|
+
export default class InputToggle extends SvelteComponent<InputToggleProps, InputToggleEvents, InputToggleSlots> {
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
<script>import { flip, shift, offset } from "svelte-floating-ui/dom";
|
|
2
|
+
import { createFloatingActions } from "svelte-floating-ui";
|
|
3
|
+
import clsx from "clsx";
|
|
4
|
+
import { Icon } from "@steeze-ui/svelte-icon";
|
|
5
|
+
import { ChevronDown, ChevronRight } from "@invopop/ui-icons";
|
|
6
|
+
import { SubFolder } from "@invopop/ui-icons";
|
|
7
|
+
import { createEventDispatcher } from "svelte";
|
|
8
|
+
import { resolveIcon } from "./helpers.js";
|
|
9
|
+
import DrawerContext from "./DrawerContext.svelte";
|
|
10
|
+
const [floatingRef, floatingContent] = createFloatingActions({
|
|
11
|
+
strategy: "absolute",
|
|
12
|
+
placement: "bottom-start",
|
|
13
|
+
middleware: [offset(-4), flip(), shift()]
|
|
14
|
+
});
|
|
15
|
+
export let label = "";
|
|
16
|
+
export let url = "";
|
|
17
|
+
export let isFolderItem = false;
|
|
18
|
+
export let collapsable = false;
|
|
19
|
+
export let open = false;
|
|
20
|
+
export let active = false;
|
|
21
|
+
export let collapsedSidebar = false;
|
|
22
|
+
export let iconTheme = "default";
|
|
23
|
+
export let icon = void 0;
|
|
24
|
+
export let children = void 0;
|
|
25
|
+
let resolvedIcon;
|
|
26
|
+
let hovered = false;
|
|
27
|
+
let highlight = false;
|
|
28
|
+
let leaveHoverTimeout = null;
|
|
29
|
+
const dispatch = createEventDispatcher();
|
|
30
|
+
$: {
|
|
31
|
+
resolveIcon(icon).then((icon2) => {
|
|
32
|
+
resolvedIcon = icon2;
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
$:
|
|
36
|
+
itemStyles = clsx(
|
|
37
|
+
{ "text-white font-medium": !isFolderItem },
|
|
38
|
+
{ "text-white-40": isFolderItem && !active },
|
|
39
|
+
{ "bg-white-10": active },
|
|
40
|
+
{ "border border-transparent hover:border-white-5 group p-2": collapsedSidebar },
|
|
41
|
+
{ "w-full px-2 py-1.5": !collapsedSidebar },
|
|
42
|
+
{
|
|
43
|
+
"bg-white-10 border-white-5 text-white": active
|
|
44
|
+
},
|
|
45
|
+
{ "hover:bg-white-5 focus:bg-white-10": !active }
|
|
46
|
+
);
|
|
47
|
+
$:
|
|
48
|
+
iconStyles = clsx({ "group-hover:text-white": collapsedSidebar });
|
|
49
|
+
$:
|
|
50
|
+
wrapperStyles = clsx({
|
|
51
|
+
"ml-4 border-l border-white-10 pl-2 pt-0.5 relative": isFolderItem
|
|
52
|
+
});
|
|
53
|
+
$:
|
|
54
|
+
items = [
|
|
55
|
+
{ label, value: url, selected: active, icon: resolvedIcon },
|
|
56
|
+
...(children || []).map((c) => ({
|
|
57
|
+
label: c.label || "",
|
|
58
|
+
value: c.url || "",
|
|
59
|
+
selected: c.active,
|
|
60
|
+
icon: SubFolder
|
|
61
|
+
}))
|
|
62
|
+
];
|
|
63
|
+
function handleClick() {
|
|
64
|
+
if (!url && collapsable) {
|
|
65
|
+
open = !open;
|
|
66
|
+
}
|
|
67
|
+
dispatch("click", url);
|
|
68
|
+
}
|
|
69
|
+
function handleClickChild(event) {
|
|
70
|
+
hovered = false;
|
|
71
|
+
dispatch("click", event.detail);
|
|
72
|
+
}
|
|
73
|
+
function handleHover() {
|
|
74
|
+
highlight = true;
|
|
75
|
+
if (leaveHoverTimeout) {
|
|
76
|
+
clearTimeout(leaveHoverTimeout);
|
|
77
|
+
}
|
|
78
|
+
hovered = true;
|
|
79
|
+
}
|
|
80
|
+
function handleBlur() {
|
|
81
|
+
highlight = false;
|
|
82
|
+
leaveHoverTimeout = setTimeout(() => {
|
|
83
|
+
hovered = false;
|
|
84
|
+
}, 200);
|
|
85
|
+
}
|
|
86
|
+
</script>
|
|
87
|
+
|
|
88
|
+
<div class={wrapperStyles}>
|
|
89
|
+
{#if isFolderItem && (highlight || active)}
|
|
90
|
+
<div class="border-l border-white h-3 w-px absolute top-[14px] left-0 -m-px" />
|
|
91
|
+
{/if}
|
|
92
|
+
<button
|
|
93
|
+
use:floatingRef
|
|
94
|
+
on:mouseenter={handleHover}
|
|
95
|
+
on:mouseleave={handleBlur}
|
|
96
|
+
on:click={handleClick}
|
|
97
|
+
title={label}
|
|
98
|
+
class="{itemStyles} text-base border border-transparent flex items-center justify-between hover:text-white focus:text-white rounded-md"
|
|
99
|
+
>
|
|
100
|
+
<span class="flex items-center space-x-2">
|
|
101
|
+
{#if resolvedIcon}
|
|
102
|
+
<Icon src={resolvedIcon} theme={iconTheme} class="{iconStyles} h-4 w-4 text-white-70" />
|
|
103
|
+
{/if}
|
|
104
|
+
{#if !collapsedSidebar}
|
|
105
|
+
<span class="whitespace-nowrap tracking-normal">{label}</span>
|
|
106
|
+
{/if}
|
|
107
|
+
</span>
|
|
108
|
+
{#if collapsable && !collapsedSidebar}
|
|
109
|
+
<button
|
|
110
|
+
on:click|stopPropagation={() => {
|
|
111
|
+
open = !open
|
|
112
|
+
}}
|
|
113
|
+
>
|
|
114
|
+
<Icon src={open ? ChevronDown : ChevronRight} class="h-4 w-4 text-white-40" />
|
|
115
|
+
</button>
|
|
116
|
+
{/if}
|
|
117
|
+
</button>
|
|
118
|
+
{#if children?.length}
|
|
119
|
+
{#if collapsedSidebar}
|
|
120
|
+
{#if hovered}
|
|
121
|
+
<div
|
|
122
|
+
use:floatingContent
|
|
123
|
+
role="contentinfo"
|
|
124
|
+
on:mouseenter={handleHover}
|
|
125
|
+
on:mouseleave={handleBlur}
|
|
126
|
+
class="pt-4 z-30"
|
|
127
|
+
>
|
|
128
|
+
<DrawerContext on:click={handleClickChild} {items} />
|
|
129
|
+
</div>
|
|
130
|
+
{/if}
|
|
131
|
+
{:else if open || !collapsable}
|
|
132
|
+
<ul>
|
|
133
|
+
{#each children as child}
|
|
134
|
+
<li>
|
|
135
|
+
<svelte:self {...child} isFolderItem on:click />
|
|
136
|
+
</li>
|
|
137
|
+
{/each}
|
|
138
|
+
</ul>
|
|
139
|
+
{/if}
|
|
140
|
+
{/if}
|
|
141
|
+
</div>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import type { IconTheme, MenuItemProps } from './types.ts';
|
|
3
|
+
import { type IconSource } from '@steeze-ui/svelte-icon';
|
|
4
|
+
declare const __propDef: {
|
|
5
|
+
props: {
|
|
6
|
+
label?: string | undefined;
|
|
7
|
+
url?: string | undefined;
|
|
8
|
+
isFolderItem?: boolean | undefined;
|
|
9
|
+
collapsable?: boolean | undefined;
|
|
10
|
+
open?: boolean | undefined;
|
|
11
|
+
active?: boolean | undefined;
|
|
12
|
+
collapsedSidebar?: boolean | undefined;
|
|
13
|
+
iconTheme?: IconTheme | undefined;
|
|
14
|
+
icon?: IconSource | string | undefined;
|
|
15
|
+
children?: MenuItemProps[] | undefined;
|
|
16
|
+
};
|
|
17
|
+
events: {
|
|
18
|
+
click: CustomEvent<any>;
|
|
19
|
+
} & {
|
|
20
|
+
[evt: string]: CustomEvent<any>;
|
|
21
|
+
};
|
|
22
|
+
slots: {};
|
|
23
|
+
};
|
|
24
|
+
type MenuItemProps_ = typeof __propDef.props;
|
|
25
|
+
export { MenuItemProps_ as MenuItemProps };
|
|
26
|
+
export type MenuItemEvents = typeof __propDef.events;
|
|
27
|
+
export type MenuItemSlots = typeof __propDef.slots;
|
|
28
|
+
export default class MenuItem extends SvelteComponent<MenuItemProps, MenuItemEvents, MenuItemSlots> {
|
|
29
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<script>import clsx from "clsx";
|
|
2
|
+
import BaseFlag from "./BaseFlag.svelte";
|
|
3
|
+
export let name = "";
|
|
4
|
+
export let small = false;
|
|
5
|
+
export let large = false;
|
|
6
|
+
export let dark = false;
|
|
7
|
+
export let picture = "";
|
|
8
|
+
export let country = "";
|
|
9
|
+
$:
|
|
10
|
+
avatarStyles = clsx(
|
|
11
|
+
{ "text-sm": !large },
|
|
12
|
+
{ "h-4 w-4": small },
|
|
13
|
+
{ "h-5 w-5": !large && !small },
|
|
14
|
+
{ "h-8 w-8": large },
|
|
15
|
+
{ "bg-neutral-50 border-neutral-100 text-neutral-500": !dark },
|
|
16
|
+
{ "bg-white-5 border-white-10 text-white-70": dark },
|
|
17
|
+
{ border: !picture }
|
|
18
|
+
);
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<div class="{avatarStyles} rounded flex items-center justify-center font-semibold relative">
|
|
22
|
+
{#if picture}
|
|
23
|
+
<img
|
|
24
|
+
class="h-full w-full rounded object-cover"
|
|
25
|
+
src={picture}
|
|
26
|
+
alt={name}
|
|
27
|
+
on:error={() => {
|
|
28
|
+
picture = ''
|
|
29
|
+
}}
|
|
30
|
+
/>
|
|
31
|
+
{:else}
|
|
32
|
+
<span>{name?.charAt(0)}</span>
|
|
33
|
+
{/if}
|
|
34
|
+
{#if country}
|
|
35
|
+
<div class="absolute -bottom-0.5 -right-0.5">
|
|
36
|
+
<BaseFlag {country} />
|
|
37
|
+
</div>
|
|
38
|
+
{/if}
|
|
39
|
+
</div>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
name?: string | undefined;
|
|
5
|
+
small?: boolean | undefined;
|
|
6
|
+
large?: boolean | undefined;
|
|
7
|
+
dark?: boolean | undefined;
|
|
8
|
+
picture?: string | undefined;
|
|
9
|
+
country?: string | undefined;
|
|
10
|
+
};
|
|
11
|
+
events: {
|
|
12
|
+
[evt: string]: CustomEvent<any>;
|
|
13
|
+
};
|
|
14
|
+
slots: {};
|
|
15
|
+
};
|
|
16
|
+
export type ProfileAvatarProps = typeof __propDef.props;
|
|
17
|
+
export type ProfileAvatarEvents = typeof __propDef.events;
|
|
18
|
+
export type ProfileAvatarSlots = typeof __propDef.slots;
|
|
19
|
+
export default class ProfileAvatar extends SvelteComponent<ProfileAvatarProps, ProfileAvatarEvents, ProfileAvatarSlots> {
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script>import clsx from "clsx";
|
|
2
|
+
import ProfileAvatar from "./ProfileAvatar.svelte";
|
|
3
|
+
export let name = "";
|
|
4
|
+
export let picture = "";
|
|
5
|
+
export let collapsed = false;
|
|
6
|
+
$:
|
|
7
|
+
styles = clsx({ "p-[5px]": collapsed }, { "w-full pl-1.5 pr-2 py-[7px]": !collapsed });
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<button
|
|
11
|
+
class="{styles} text-white text-base font-medium flex items-center justify-between space-x-1 focus:border-white-10 active:border-white-10 hover:bg-white-5 rounded"
|
|
12
|
+
on:click
|
|
13
|
+
>
|
|
14
|
+
<span class="flex items-center space-x-2">
|
|
15
|
+
<ProfileAvatar {name} {picture} dark />
|
|
16
|
+
{#if !collapsed}
|
|
17
|
+
<span class="whitespace-nowrap tracking-normal">{name}</span>
|
|
18
|
+
{/if}
|
|
19
|
+
</span>
|
|
20
|
+
</button>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
name?: string | undefined;
|
|
5
|
+
picture?: string | undefined;
|
|
6
|
+
collapsed?: boolean | undefined;
|
|
7
|
+
};
|
|
8
|
+
events: {
|
|
9
|
+
click: MouseEvent;
|
|
10
|
+
} & {
|
|
11
|
+
[evt: string]: CustomEvent<any>;
|
|
12
|
+
};
|
|
13
|
+
slots: {};
|
|
14
|
+
};
|
|
15
|
+
export type ProfileSelectorProps = typeof __propDef.props;
|
|
16
|
+
export type ProfileSelectorEvents = typeof __propDef.events;
|
|
17
|
+
export type ProfileSelectorSlots = typeof __propDef.slots;
|
|
18
|
+
export default class ProfileSelector extends SvelteComponent<ProfileSelectorProps, ProfileSelectorEvents, ProfileSelectorSlots> {
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
title?: string | undefined;
|
|
5
|
+
};
|
|
6
|
+
events: {
|
|
7
|
+
[evt: string]: CustomEvent<any>;
|
|
8
|
+
};
|
|
9
|
+
slots: {
|
|
10
|
+
default: {};
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export type SectionLayoutProps = typeof __propDef.props;
|
|
14
|
+
export type SectionLayoutEvents = typeof __propDef.events;
|
|
15
|
+
export type SectionLayoutSlots = typeof __propDef.slots;
|
|
16
|
+
export default class SectionLayout extends SvelteComponent<SectionLayoutProps, SectionLayoutEvents, SectionLayoutSlots> {
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<div class="border-b border-transparent hr-separator" />
|
|
2
|
+
|
|
3
|
+
<style>
|
|
4
|
+
.hr-separator {
|
|
5
|
+
border-image: repeating-linear-gradient(
|
|
6
|
+
90deg,
|
|
7
|
+
rgba(229, 231, 235, 1),
|
|
8
|
+
rgba(229, 231, 235, 1) 3px,
|
|
9
|
+
transparent 3px,
|
|
10
|
+
transparent 7px
|
|
11
|
+
);
|
|
12
|
+
border-image-slice: 1;
|
|
13
|
+
}
|
|
14
|
+
</style>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** @typedef {typeof __propDef.props} SeparatorHorizontalProps */
|
|
2
|
+
/** @typedef {typeof __propDef.events} SeparatorHorizontalEvents */
|
|
3
|
+
/** @typedef {typeof __propDef.slots} SeparatorHorizontalSlots */
|
|
4
|
+
export default class SeparatorHorizontal extends SvelteComponent<{
|
|
5
|
+
[x: string]: never;
|
|
6
|
+
}, {
|
|
7
|
+
[evt: string]: CustomEvent<any>;
|
|
8
|
+
}, {}> {
|
|
9
|
+
}
|
|
10
|
+
export type SeparatorHorizontalProps = typeof __propDef.props;
|
|
11
|
+
export type SeparatorHorizontalEvents = typeof __propDef.events;
|
|
12
|
+
export type SeparatorHorizontalSlots = typeof __propDef.slots;
|
|
13
|
+
import { SvelteComponent } from "svelte";
|
|
14
|
+
declare const __propDef: {
|
|
15
|
+
props: {
|
|
16
|
+
[x: string]: never;
|
|
17
|
+
};
|
|
18
|
+
events: {
|
|
19
|
+
[evt: string]: CustomEvent<any>;
|
|
20
|
+
};
|
|
21
|
+
slots: {};
|
|
22
|
+
};
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/** @typedef {typeof __propDef.props} ShortcutWrapperProps */
|
|
2
|
+
/** @typedef {typeof __propDef.events} ShortcutWrapperEvents */
|
|
3
|
+
/** @typedef {typeof __propDef.slots} ShortcutWrapperSlots */
|
|
4
|
+
export default class ShortcutWrapper extends SvelteComponent<{
|
|
5
|
+
[x: string]: never;
|
|
6
|
+
}, {
|
|
7
|
+
[evt: string]: CustomEvent<any>;
|
|
8
|
+
}, {
|
|
9
|
+
default: {};
|
|
10
|
+
}> {
|
|
11
|
+
}
|
|
12
|
+
export type ShortcutWrapperProps = typeof __propDef.props;
|
|
13
|
+
export type ShortcutWrapperEvents = typeof __propDef.events;
|
|
14
|
+
export type ShortcutWrapperSlots = typeof __propDef.slots;
|
|
15
|
+
import { SvelteComponent } from "svelte";
|
|
16
|
+
declare const __propDef: {
|
|
17
|
+
props: {
|
|
18
|
+
[x: string]: never;
|
|
19
|
+
};
|
|
20
|
+
events: {
|
|
21
|
+
[evt: string]: CustomEvent<any>;
|
|
22
|
+
};
|
|
23
|
+
slots: {
|
|
24
|
+
default: {};
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script>import clsx from "clsx";
|
|
2
|
+
import FeedIconStatus from "./FeedIconStatus.svelte";
|
|
3
|
+
export let status;
|
|
4
|
+
export let label = "";
|
|
5
|
+
$:
|
|
6
|
+
styles = clsx({
|
|
7
|
+
"text-positive-500": status === "success",
|
|
8
|
+
"text-neutral-500": status === "queued",
|
|
9
|
+
"text-warning-500": status === "alert",
|
|
10
|
+
"text-danger-500": status === "failure",
|
|
11
|
+
"text-yellow-500": status === "run"
|
|
12
|
+
});
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<div class="flex items-center space-x-1">
|
|
16
|
+
<span class="{styles} text-base font-inter font-medium">{label}</span>
|
|
17
|
+
{#if status}
|
|
18
|
+
<FeedIconStatus {status} />
|
|
19
|
+
{/if}
|
|
20
|
+
</div>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import type { FeedItemStatus } from './types.js';
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
status: FeedItemStatus;
|
|
6
|
+
label?: string | undefined;
|
|
7
|
+
};
|
|
8
|
+
events: {
|
|
9
|
+
[evt: string]: CustomEvent<any>;
|
|
10
|
+
};
|
|
11
|
+
slots: {};
|
|
12
|
+
};
|
|
13
|
+
export type StatusLabelProps = typeof __propDef.props;
|
|
14
|
+
export type StatusLabelEvents = typeof __propDef.events;
|
|
15
|
+
export type StatusLabelSlots = typeof __propDef.slots;
|
|
16
|
+
export default class StatusLabel extends SvelteComponent<StatusLabelProps, StatusLabelEvents, StatusLabelSlots> {
|
|
17
|
+
}
|
|
18
|
+
export {};
|
package/dist/Tabs.svelte
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<script>import { createTabs } from "svelte-headlessui";
|
|
2
|
+
import BaseCounter from "./BaseCounter.svelte";
|
|
3
|
+
import { Icon } from "@steeze-ui/svelte-icon";
|
|
4
|
+
import { Alert, Success } from "@invopop/ui-icons";
|
|
5
|
+
import { createEventDispatcher } from "svelte";
|
|
6
|
+
const dispatch = createEventDispatcher();
|
|
7
|
+
export let items = [];
|
|
8
|
+
export let selected = "";
|
|
9
|
+
const tabs = createTabs({ selected: items.find((i) => i.slug === selected) || items[0] });
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<div
|
|
13
|
+
use:tabs.list
|
|
14
|
+
class="inline-flex space-x-0.5 rounded-md border p-0.5 border-neutral-200 bg-neutral-100 w-full"
|
|
15
|
+
>
|
|
16
|
+
{#each items as value}
|
|
17
|
+
<button
|
|
18
|
+
use:tabs.tab={{ value }}
|
|
19
|
+
class:bg-white={selected === value.slug}
|
|
20
|
+
class="flex items-center space-x-1 justify-center w-full whitespace-nowrap text-neutral-800 text-base font-medium focus:outline-none focus:ring-0 py-0.5 px-3 rounded"
|
|
21
|
+
on:click={() => {
|
|
22
|
+
selected = value.slug
|
|
23
|
+
dispatch('selected', selected)
|
|
24
|
+
}}
|
|
25
|
+
>
|
|
26
|
+
<span class="tracking-tighter">{value.label}</span>
|
|
27
|
+
{#if value.counter}
|
|
28
|
+
<BaseCounter
|
|
29
|
+
content={value.counter}
|
|
30
|
+
variant={selected === value.slug ? 'light' : 'default'}
|
|
31
|
+
/>
|
|
32
|
+
{/if}
|
|
33
|
+
{#if value.check}
|
|
34
|
+
<Icon src={Success} class="h-4 w-4" />
|
|
35
|
+
{/if}
|
|
36
|
+
{#if value.warning}
|
|
37
|
+
<Icon src={Alert} class="h-4 w-4" />
|
|
38
|
+
{/if}
|
|
39
|
+
</button>
|
|
40
|
+
{/each}
|
|
41
|
+
</div>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import type { TabItem } from './types.js';
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
items?: TabItem[] | undefined;
|
|
6
|
+
selected?: string | undefined;
|
|
7
|
+
};
|
|
8
|
+
events: {
|
|
9
|
+
selected: CustomEvent<any>;
|
|
10
|
+
} & {
|
|
11
|
+
[evt: string]: CustomEvent<any>;
|
|
12
|
+
};
|
|
13
|
+
slots: {};
|
|
14
|
+
};
|
|
15
|
+
export type TabsProps = typeof __propDef.props;
|
|
16
|
+
export type TabsEvents = typeof __propDef.events;
|
|
17
|
+
export type TabsSlots = typeof __propDef.slots;
|
|
18
|
+
export default class Tabs extends SvelteComponent<TabsProps, TabsEvents, TabsSlots> {
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<div class="rounded p-px beta-tag relative">
|
|
2
|
+
<svg viewBox="0 0 37 20" fill="none" xmlns="http://www.w3.org/2000/svg" class="absolute">
|
|
3
|
+
<path
|
|
4
|
+
fill-rule="evenodd"
|
|
5
|
+
clip-rule="evenodd"
|
|
6
|
+
d="M4 4L4 7.5H0V8H4L4 11.5H0V12H4V15.5H0V16H4V20H4.5V16H8V20H8.5V16H12V20H12.5V16H16V20H16.5V16H20V20H20.5V16H24V20H24.5V16H28V20H28.5V16H32V20H32.5V16H37V15.5H32.5V12H37V11.5H32.5V8H37V7.5H32.5V4H37V3.5H32.5V0H32V3.5H28.5V0H28V3.5H24.5V0H24V3.5H20.5V0H20V3.5H16.5V0H16V3.5H12.5V0H12V3.5H8.5V0H8V3.5H4.5V0H4L4 3.5H0V4H4ZM32 4H28.5V7.5H32V4ZM32 8H28.5V11.5H32V8ZM32 12H28.5V15.5H32V12ZM28 12V15.5H24.5V12H28ZM28 8V11.5H24.5V8H28ZM28 4V7.5H24.5V4H28ZM24 4H20.5V7.5H24V4ZM24 8H20.5V11.5H24V8ZM24 12H20.5V15.5H24V12ZM20 12V15.5H16.5V12H20ZM20 8V11.5H16.5V8H20ZM20 4V7.5H16.5V4H20ZM16 4H12.5V7.5H16V4ZM16 8H12.5L12.5 11.5H16L16 8ZM16 12H12.5V15.5H16V12ZM12 12V15.5H8.5V12H12ZM12 8L12 11.5H8.5L8.5 8H12ZM12 4V7.5H8.5V4H12ZM8 4H4.5V7.5H8L8 4ZM8 8H4.5L4.5 11.5H8V8ZM8 12H4.5V15.5H8L8 12Z"
|
|
7
|
+
fill="white"
|
|
8
|
+
fill-opacity="0.05"
|
|
9
|
+
/>
|
|
10
|
+
</svg>
|
|
11
|
+
<div
|
|
12
|
+
class="rounded-[3px] py-px px-1 text-white font-mono"
|
|
13
|
+
style="border: 0.5px solid var(--white-60, rgba(255, 255, 255, 0.60));"
|
|
14
|
+
>
|
|
15
|
+
Beta
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
<style>
|
|
20
|
+
.beta-tag {
|
|
21
|
+
background: linear-gradient(180deg, #0072f5 0%, rgba(0, 77, 164, 0.4) 100%), #0072f5;
|
|
22
|
+
}
|
|
23
|
+
</style>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** @typedef {typeof __propDef.props} TagBetaProps */
|
|
2
|
+
/** @typedef {typeof __propDef.events} TagBetaEvents */
|
|
3
|
+
/** @typedef {typeof __propDef.slots} TagBetaSlots */
|
|
4
|
+
export default class TagBeta extends SvelteComponent<{
|
|
5
|
+
[x: string]: never;
|
|
6
|
+
}, {
|
|
7
|
+
[evt: string]: CustomEvent<any>;
|
|
8
|
+
}, {}> {
|
|
9
|
+
}
|
|
10
|
+
export type TagBetaProps = typeof __propDef.props;
|
|
11
|
+
export type TagBetaEvents = typeof __propDef.events;
|
|
12
|
+
export type TagBetaSlots = typeof __propDef.slots;
|
|
13
|
+
import { SvelteComponent } from "svelte";
|
|
14
|
+
declare const __propDef: {
|
|
15
|
+
props: {
|
|
16
|
+
[x: string]: never;
|
|
17
|
+
};
|
|
18
|
+
events: {
|
|
19
|
+
[evt: string]: CustomEvent<any>;
|
|
20
|
+
};
|
|
21
|
+
slots: {};
|
|
22
|
+
};
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<script>import { Icon } from "@steeze-ui/svelte-icon";
|
|
2
|
+
import { createEventDispatcher } from "svelte";
|
|
3
|
+
import { dispatchWcEvent } from "./wcdispatch.js";
|
|
4
|
+
import { resolveIcon } from "./helpers.js";
|
|
5
|
+
const dispatch = createEventDispatcher();
|
|
6
|
+
export let label = "";
|
|
7
|
+
export let icon = void 0;
|
|
8
|
+
export let iconTheme = "default";
|
|
9
|
+
let resolvedIcon;
|
|
10
|
+
$: {
|
|
11
|
+
resolveIcon(icon).then((icon2) => {
|
|
12
|
+
resolvedIcon = icon2;
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
function handleClear(event) {
|
|
16
|
+
const target = event.target;
|
|
17
|
+
dispatch("clear");
|
|
18
|
+
dispatchWcEvent(target, "clear");
|
|
19
|
+
}
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<span
|
|
23
|
+
class:pl-2={icon}
|
|
24
|
+
class:pl-3={!icon}
|
|
25
|
+
class="border rounded pr-1.5 text-sm inline-flex items-center border-workspace-accent-100 bg-workspace-accent-50"
|
|
26
|
+
>
|
|
27
|
+
{#if resolvedIcon}
|
|
28
|
+
<Icon src={resolvedIcon} theme={iconTheme} class="h-4 w-4 mr-1 text-workspace-accent" />
|
|
29
|
+
{/if}
|
|
30
|
+
<span class="py-1 pr-2 text-workspace-accent tracking-normal">{label}</span>
|
|
31
|
+
<button
|
|
32
|
+
class="py-1 border-l border-workspace-accent-100 pl-1 text-neutral-500"
|
|
33
|
+
on:click={handleClear}
|
|
34
|
+
>
|
|
35
|
+
<svg
|
|
36
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
37
|
+
fill="none"
|
|
38
|
+
viewBox="0 0 24 24"
|
|
39
|
+
stroke-width="1.5"
|
|
40
|
+
stroke="currentColor"
|
|
41
|
+
class="w-5 h-5"
|
|
42
|
+
>
|
|
43
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" />
|
|
44
|
+
</svg>
|
|
45
|
+
</button>
|
|
46
|
+
</span>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import { type IconSource } from '@steeze-ui/svelte-icon';
|
|
3
|
+
import type { IconTheme } from './types.ts';
|
|
4
|
+
declare const __propDef: {
|
|
5
|
+
props: {
|
|
6
|
+
label?: string | undefined;
|
|
7
|
+
icon?: IconSource | string | undefined;
|
|
8
|
+
iconTheme?: IconTheme | undefined;
|
|
9
|
+
};
|
|
10
|
+
events: {
|
|
11
|
+
clear: CustomEvent<any>;
|
|
12
|
+
} & {
|
|
13
|
+
[evt: string]: CustomEvent<any>;
|
|
14
|
+
};
|
|
15
|
+
slots: {};
|
|
16
|
+
};
|
|
17
|
+
export type TagSearchProps = typeof __propDef.props;
|
|
18
|
+
export type TagSearchEvents = typeof __propDef.events;
|
|
19
|
+
export type TagSearchSlots = typeof __propDef.slots;
|
|
20
|
+
export default class TagSearch extends SvelteComponent<TagSearchProps, TagSearchEvents, TagSearchSlots> {
|
|
21
|
+
}
|
|
22
|
+
export {};
|