@invopop/popui 0.0.38 → 0.0.39
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/CardCheckbox.svelte +30 -0
- package/dist/CardCheckbox.svelte.d.ts +23 -0
- package/dist/CompanySelector.svelte +2 -1
- package/dist/DrawerContextWorkspace.svelte +85 -8
- package/dist/EmptyStateIcon.svelte +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -0
- package/dist/types.d.ts +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script>import InputRadio from "./InputRadio.svelte";
|
|
2
|
+
export let id;
|
|
3
|
+
export let title = "";
|
|
4
|
+
export let description = "";
|
|
5
|
+
export let checked = false;
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<label
|
|
9
|
+
for={id}
|
|
10
|
+
class="{checked
|
|
11
|
+
? 'border-workspace-accent shadow-active'
|
|
12
|
+
: 'border-neutral-200'} border rounded-lg w-full text-left cursor-pointer block"
|
|
13
|
+
>
|
|
14
|
+
<div class="py-2 pr-2 pl-3 flex items-start justify-between">
|
|
15
|
+
<div class="flex flex-col space-y-0.5">
|
|
16
|
+
<span class="text-base text-neutral-800 font-medium">{title}</span>
|
|
17
|
+
{#if description}
|
|
18
|
+
<span class="text-sm text-neutral-500">{description}</span>
|
|
19
|
+
{:else}
|
|
20
|
+
<span class="text-sm text-neutral-300">No description</span>
|
|
21
|
+
{/if}
|
|
22
|
+
</div>
|
|
23
|
+
<InputRadio {id} {checked} on:change />
|
|
24
|
+
</div>
|
|
25
|
+
{#if !!$$slots.footer}
|
|
26
|
+
<div class="bg-neutral-50 rounded-b-lg px-3 py-2.5 border-t border-neutral-100">
|
|
27
|
+
<slot name="footer" />
|
|
28
|
+
</div>
|
|
29
|
+
{/if}
|
|
30
|
+
</label>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
id: any;
|
|
5
|
+
title?: string | undefined;
|
|
6
|
+
description?: string | undefined;
|
|
7
|
+
checked?: boolean | undefined;
|
|
8
|
+
};
|
|
9
|
+
events: {
|
|
10
|
+
change: CustomEvent<any>;
|
|
11
|
+
} & {
|
|
12
|
+
[evt: string]: CustomEvent<any>;
|
|
13
|
+
};
|
|
14
|
+
slots: {
|
|
15
|
+
footer: {};
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export type CardCheckboxProps = typeof __propDef.props;
|
|
19
|
+
export type CardCheckboxEvents = typeof __propDef.events;
|
|
20
|
+
export type CardCheckboxSlots = typeof __propDef.slots;
|
|
21
|
+
export default class CardCheckbox extends SvelteComponent<CardCheckboxProps, CardCheckboxEvents, CardCheckboxSlots> {
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
@@ -1,19 +1,96 @@
|
|
|
1
1
|
<script>import DrawerContextItem from "./DrawerContextItem.svelte";
|
|
2
2
|
import { Icon } from "@steeze-ui/svelte-icon";
|
|
3
|
-
import { AddCircle, Settings } from "@invopop/ui-icons";
|
|
3
|
+
import { AddCircle, ChevronDown, ChevronRight, Settings, Sidebar } from "@invopop/ui-icons";
|
|
4
4
|
import { createEventDispatcher } from "svelte";
|
|
5
|
+
import BaseCounter from "./BaseCounter.svelte";
|
|
6
|
+
import EmptyStateIcon from "./EmptyStateIcon.svelte";
|
|
5
7
|
export let items = [];
|
|
6
8
|
export let multiple = false;
|
|
7
9
|
const dispatch = createEventDispatcher();
|
|
10
|
+
let liveOpen = false;
|
|
11
|
+
let sandboxOpen = false;
|
|
12
|
+
$:
|
|
13
|
+
liveItems = items.filter((i) => !i.sandbox);
|
|
14
|
+
$:
|
|
15
|
+
sandboxItems = items.filter((i) => i.sandbox);
|
|
16
|
+
$:
|
|
17
|
+
selectedItem = items.find((i) => i.selected);
|
|
18
|
+
$:
|
|
19
|
+
if (selectedItem) {
|
|
20
|
+
if (selectedItem.sandbox) {
|
|
21
|
+
sandboxOpen = true;
|
|
22
|
+
} else {
|
|
23
|
+
liveOpen = true;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
8
26
|
</script>
|
|
9
27
|
|
|
10
|
-
<div class="w-[300px] border border-neutral-
|
|
11
|
-
<
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
28
|
+
<div class="w-[300px] border border-neutral-200 rounded-sm shadow-lg bg-white">
|
|
29
|
+
<div class="max-h-[60vh] overflow-y-auto rounded-sm">
|
|
30
|
+
<button
|
|
31
|
+
class="flex items-center justify-between bg-neutral-50 border-b border-neutral-200 rounded-t-sm h-8 py-1.5 pl-1.5 pr-2 text-base font-medium text-neutral-800 w-full"
|
|
32
|
+
on:click={() => {
|
|
33
|
+
liveOpen = !liveOpen
|
|
34
|
+
}}
|
|
35
|
+
>
|
|
36
|
+
<div class="flex items-center space-x-1.5">
|
|
37
|
+
<Icon src={liveOpen ? ChevronDown : ChevronRight} class="h-4 w-4 text-neutral-800" />
|
|
38
|
+
<span>Live</span>
|
|
39
|
+
</div>
|
|
40
|
+
{#if liveItems.length}
|
|
41
|
+
<BaseCounter content={liveItems.length} />
|
|
42
|
+
{/if}
|
|
43
|
+
</button>
|
|
44
|
+
{#if liveOpen}
|
|
45
|
+
{#if !liveItems.length}
|
|
46
|
+
<div class="h-[182px]">
|
|
47
|
+
<EmptyStateIcon
|
|
48
|
+
icon={Sidebar}
|
|
49
|
+
title="No workspaces here"
|
|
50
|
+
description="Create a workspace to start"
|
|
51
|
+
/>
|
|
52
|
+
</div>
|
|
53
|
+
{/if}
|
|
54
|
+
<ul class="p-1 pb-0.5 space-y-1">
|
|
55
|
+
{#each liveItems as item}
|
|
56
|
+
<DrawerContextItem {item} {multiple} workspace on:click />
|
|
57
|
+
{/each}
|
|
58
|
+
</ul>
|
|
59
|
+
{/if}
|
|
60
|
+
<button
|
|
61
|
+
class="flex items-center justify-between bg-neutral-50 border-b border-neutral-200 h-8 py-1.5 pl-1.5 pr-2 text-base font-medium text-neutral-800 w-full"
|
|
62
|
+
class:border-t={liveOpen}
|
|
63
|
+
on:click={() => {
|
|
64
|
+
sandboxOpen = !sandboxOpen
|
|
65
|
+
}}
|
|
66
|
+
>
|
|
67
|
+
<div class="flex items-center space-x-1.5">
|
|
68
|
+
<Icon src={sandboxOpen ? ChevronDown : ChevronRight} class="h-4 w-4 text-neutral-800" />
|
|
69
|
+
<span>Sandbox</span>
|
|
70
|
+
</div>
|
|
71
|
+
{#if sandboxItems.length}
|
|
72
|
+
<BaseCounter content={sandboxItems.length} />
|
|
73
|
+
{/if}
|
|
74
|
+
</button>
|
|
75
|
+
{#if sandboxOpen}
|
|
76
|
+
{#if !sandboxItems.length}
|
|
77
|
+
<div class="h-[182px]">
|
|
78
|
+
<EmptyStateIcon
|
|
79
|
+
icon={Sidebar}
|
|
80
|
+
title="No workspaces here"
|
|
81
|
+
description="Create a workspace to start"
|
|
82
|
+
/>
|
|
83
|
+
</div>
|
|
84
|
+
{/if}
|
|
85
|
+
<ul class="p-1 pb-0.5 space-y-1">
|
|
86
|
+
{#each sandboxItems as item}
|
|
87
|
+
<DrawerContextItem {item} {multiple} workspace on:click />
|
|
88
|
+
{/each}
|
|
89
|
+
</ul>
|
|
90
|
+
{/if}
|
|
91
|
+
</div>
|
|
92
|
+
|
|
93
|
+
<ul class="px-1 space-y-1 bg-neutral-50 rounded-b border-t border-neutral-100">
|
|
17
94
|
<li class="pl-1.5 py-1.5 pr-2 hover:bg-neutral-100 rounded-sm">
|
|
18
95
|
<button
|
|
19
96
|
class="flex items-center space-x-2 w-full"
|
|
@@ -39,7 +39,7 @@ export let check = false;
|
|
|
39
39
|
</div>
|
|
40
40
|
{/if}
|
|
41
41
|
<div class="space-y-0.5">
|
|
42
|
-
<h4 class="font-medium text-base text-neutral-800
|
|
42
|
+
<h4 class="font-medium text-base text-neutral-800 tracking-tight">{title}</h4>
|
|
43
43
|
<p class="max-w-xs text-base text-neutral-500 tracking-normal">{description}</p>
|
|
44
44
|
<p><slot /></p>
|
|
45
45
|
</div>
|
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import BaseDropdown from './BaseDropdown.svelte';
|
|
|
5
5
|
import BaseFlag from './BaseFlag.svelte';
|
|
6
6
|
import BaseTable from './BaseTable.svelte';
|
|
7
7
|
import ButtonFile from './ButtonFile.svelte';
|
|
8
|
+
import CardCheckbox from './CardCheckbox.svelte';
|
|
8
9
|
import CardRelation from './CardRelation.svelte';
|
|
9
10
|
import CompanySelector from './CompanySelector.svelte';
|
|
10
11
|
import CounterWorkflow from './CounterWorkflow.svelte';
|
|
@@ -48,4 +49,4 @@ import twTheme from './tw.theme.js';
|
|
|
48
49
|
import { resolveIcon } from './helpers.js';
|
|
49
50
|
import { getCountryName } from './helpers.js';
|
|
50
51
|
import { getStatusType } from './helpers.js';
|
|
51
|
-
export { BaseButton, BaseCard, BaseCounter, BaseDropdown, BaseFlag, BaseTable, ButtonFile, CardRelation, CompanySelector, CounterWorkflow, DataListItem, DatePicker, DrawerContext, DropdownSelect, EmptyStateIcon, EmptyStateIllustration, FeedEvents, FeedIconEvent, FeedIconStatus, FeedItem, FeedItemDetail, FeedViewer, GlobalSearch, InputCheckbox, InputError, InputLabel, InputRadio, InputSearch, InputSelect, InputText, InputTextarea, InputToggle, MenuItem, ProfileAvatar, ProfileSelector, SectionLayout, SeparatorHorizontal, ShortcutWrapper, StatusLabel, Tabs, TagBeta, TagSearch, TagStatus, TitleMain, TitleSection, UuidCopy, twTheme, resolveIcon, getCountryName, getStatusType };
|
|
52
|
+
export { BaseButton, BaseCard, BaseCounter, BaseDropdown, BaseFlag, BaseTable, ButtonFile, CardCheckbox, CardRelation, CompanySelector, CounterWorkflow, DataListItem, DatePicker, DrawerContext, DropdownSelect, EmptyStateIcon, EmptyStateIllustration, FeedEvents, FeedIconEvent, FeedIconStatus, FeedItem, FeedItemDetail, FeedViewer, GlobalSearch, InputCheckbox, InputError, InputLabel, InputRadio, InputSearch, InputSelect, InputText, InputTextarea, InputToggle, MenuItem, ProfileAvatar, ProfileSelector, SectionLayout, SeparatorHorizontal, ShortcutWrapper, StatusLabel, Tabs, TagBeta, TagSearch, TagStatus, TitleMain, TitleSection, UuidCopy, twTheme, resolveIcon, getCountryName, getStatusType };
|
package/dist/index.js
CHANGED
|
@@ -5,6 +5,7 @@ import BaseDropdown from './BaseDropdown.svelte'
|
|
|
5
5
|
import BaseFlag from './BaseFlag.svelte'
|
|
6
6
|
import BaseTable from './BaseTable.svelte'
|
|
7
7
|
import ButtonFile from './ButtonFile.svelte'
|
|
8
|
+
import CardCheckbox from './CardCheckbox.svelte'
|
|
8
9
|
import CardRelation from './CardRelation.svelte'
|
|
9
10
|
import CompanySelector from './CompanySelector.svelte'
|
|
10
11
|
import CounterWorkflow from './CounterWorkflow.svelte'
|
|
@@ -55,6 +56,7 @@ export {
|
|
|
55
56
|
BaseFlag,
|
|
56
57
|
BaseTable,
|
|
57
58
|
ButtonFile,
|
|
59
|
+
CardCheckbox,
|
|
58
60
|
CardRelation,
|
|
59
61
|
CompanySelector,
|
|
60
62
|
CounterWorkflow,
|
package/dist/types.d.ts
CHANGED
|
@@ -24,6 +24,7 @@ export type DrawerOption = SelectOption & {
|
|
|
24
24
|
country?: string;
|
|
25
25
|
color?: StatusType;
|
|
26
26
|
picture?: string;
|
|
27
|
+
sandbox?: boolean;
|
|
27
28
|
};
|
|
28
29
|
export type Company = {
|
|
29
30
|
id: string;
|
|
@@ -31,6 +32,7 @@ export type Company = {
|
|
|
31
32
|
name: string;
|
|
32
33
|
country?: string;
|
|
33
34
|
logo_url?: string;
|
|
35
|
+
sandbox?: boolean;
|
|
34
36
|
};
|
|
35
37
|
export type FeedEvent = {
|
|
36
38
|
status: {
|