@invopop/popui 0.0.104 → 0.1.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/dist/AlertDialog.svelte +84 -59
- package/dist/AlertDialog.svelte.d.ts +5 -29
- package/dist/BaseButton.svelte +106 -101
- package/dist/BaseButton.svelte.d.ts +4 -34
- package/dist/BaseCard.svelte +20 -12
- package/dist/BaseCard.svelte.d.ts +4 -26
- package/dist/BaseCounter.svelte +13 -9
- package/dist/BaseCounter.svelte.d.ts +4 -17
- package/dist/BaseDropdown.svelte +54 -38
- package/dist/BaseDropdown.svelte.d.ts +6 -26
- package/dist/BaseFlag.svelte +6 -4
- package/dist/BaseFlag.svelte.d.ts +4 -17
- package/dist/BaseTable.svelte +226 -188
- package/dist/BaseTable.svelte.d.ts +4 -39
- package/dist/BaseTableActions.svelte +43 -33
- package/dist/BaseTableActions.svelte.d.ts +6 -21
- package/dist/BaseTableCellContent.svelte +19 -13
- package/dist/BaseTableCellContent.svelte.d.ts +4 -24
- package/dist/BaseTableCheckbox.svelte +19 -12
- package/dist/BaseTableCheckbox.svelte.d.ts +4 -21
- package/dist/BaseTableHeaderContent.svelte +30 -22
- package/dist/BaseTableHeaderContent.svelte.d.ts +4 -21
- package/dist/BaseTableHeaderOrderBy.svelte +24 -0
- package/dist/BaseTableHeaderOrderBy.svelte.d.ts +4 -0
- package/dist/BaseTableRow.svelte +78 -60
- package/dist/BaseTableRow.svelte.d.ts +4 -32
- package/dist/Breadcrumbs.svelte +14 -10
- package/dist/Breadcrumbs.svelte.d.ts +4 -19
- package/dist/ButtonFile.svelte +40 -29
- package/dist/ButtonFile.svelte.d.ts +4 -26
- package/dist/ButtonUuidCopy.svelte +27 -20
- package/dist/ButtonUuidCopy.svelte.d.ts +4 -22
- package/dist/CardCheckbox.svelte +28 -19
- package/dist/CardCheckbox.svelte.d.ts +4 -28
- package/dist/CardRelation.svelte +9 -8
- package/dist/CardRelation.svelte.d.ts +4 -22
- package/dist/CompanySelector.svelte +49 -43
- package/dist/CompanySelector.svelte.d.ts +4 -22
- package/dist/CounterWorkflow.svelte +12 -8
- package/dist/CounterWorkflow.svelte.d.ts +4 -17
- package/dist/DataListItem.svelte +24 -14
- package/dist/DataListItem.svelte.d.ts +4 -22
- package/dist/DatePicker.svelte +186 -386
- package/dist/DatePicker.svelte.d.ts +4 -22
- package/dist/DrawerContext.svelte +33 -22
- package/dist/DrawerContext.svelte.d.ts +4 -24
- package/dist/DrawerContextItem.svelte +70 -57
- package/dist/DrawerContextItem.svelte.d.ts +4 -23
- package/dist/DrawerContextSeparator.svelte +1 -1
- package/dist/DrawerContextSeparator.svelte.d.ts +22 -19
- package/dist/DrawerContextWorkspace.svelte +31 -32
- package/dist/DrawerContextWorkspace.svelte.d.ts +4 -20
- package/dist/DropdownSelect.svelte +93 -81
- package/dist/DropdownSelect.svelte.d.ts +4 -27
- package/dist/EmptyStateIcon.svelte +13 -7
- package/dist/EmptyStateIcon.svelte.d.ts +4 -22
- package/dist/EmptyStateIllustration.svelte +41 -33
- package/dist/EmptyStateIllustration.svelte.d.ts +4 -21
- package/dist/FeedEvents.svelte +5 -2
- package/dist/FeedEvents.svelte.d.ts +4 -17
- package/dist/FeedIconEvent.svelte +5 -3
- package/dist/FeedIconEvent.svelte.d.ts +4 -19
- package/dist/FeedIconStatus.svelte +23 -18
- package/dist/FeedIconStatus.svelte.d.ts +4 -17
- package/dist/FeedItem.svelte +33 -28
- package/dist/FeedItem.svelte.d.ts +4 -30
- package/dist/FeedItemDetail.svelte +21 -13
- package/dist/FeedItemDetail.svelte.d.ts +4 -23
- package/dist/FeedViewer.svelte +6 -13
- package/dist/FeedViewer.svelte.d.ts +4 -21
- package/dist/FormLayoutModal.svelte +9 -3
- package/dist/FormLayoutModal.svelte.d.ts +4 -29
- package/dist/GlobalSearch.svelte +38 -31
- package/dist/GlobalSearch.svelte.d.ts +4 -18
- package/dist/InputCheckbox.svelte +23 -14
- package/dist/InputCheckbox.svelte.d.ts +4 -23
- package/dist/InputError.svelte +4 -1
- package/dist/InputError.svelte.d.ts +4 -16
- package/dist/InputLabel.svelte +5 -3
- package/dist/InputLabel.svelte.d.ts +4 -18
- package/dist/InputRadio.svelte +25 -19
- package/dist/InputRadio.svelte.d.ts +4 -21
- package/dist/InputSearch.svelte +66 -46
- package/dist/InputSearch.svelte.d.ts +9 -33
- package/dist/InputSelect.svelte +36 -33
- package/dist/InputSelect.svelte.d.ts +4 -31
- package/dist/InputText.svelte +64 -48
- package/dist/InputText.svelte.d.ts +4 -28
- package/dist/InputTextarea.svelte +38 -29
- package/dist/InputTextarea.svelte.d.ts +4 -25
- package/dist/InputToggle.svelte +29 -22
- package/dist/InputToggle.svelte.d.ts +4 -20
- package/dist/MenuItem.svelte +99 -87
- package/dist/MenuItem.svelte.d.ts +5 -29
- package/dist/MenuItemCollapsible.svelte +26 -18
- package/dist/MenuItemCollapsible.svelte.d.ts +4 -24
- package/dist/Notification.svelte +35 -31
- package/dist/Notification.svelte.d.ts +4 -20
- package/dist/ProfileAvatar.svelte +26 -19
- package/dist/ProfileAvatar.svelte.d.ts +4 -21
- package/dist/ProfileSelector.svelte +25 -17
- package/dist/ProfileSelector.svelte.d.ts +4 -22
- package/dist/SectionLayout.svelte +6 -3
- package/dist/SectionLayout.svelte.d.ts +4 -18
- package/dist/SeparatorHorizontal.svelte +1 -1
- package/dist/SeparatorHorizontal.svelte.d.ts +22 -19
- package/dist/ShortcutWrapper.svelte +7 -1
- package/dist/ShortcutWrapper.svelte.d.ts +4 -27
- package/dist/StatusLabel.svelte +16 -12
- package/dist/StatusLabel.svelte.d.ts +4 -18
- package/dist/StepIconList.svelte +44 -41
- package/dist/StepIconList.svelte.d.ts +4 -17
- package/dist/TagBeta.svelte.d.ts +22 -19
- package/dist/TagSearch.svelte +19 -20
- package/dist/TagSearch.svelte.d.ts +4 -22
- package/dist/TagStatus.svelte +42 -37
- package/dist/TagStatus.svelte.d.ts +4 -19
- package/dist/TitleMain.svelte +9 -2
- package/dist/TitleMain.svelte.d.ts +4 -18
- package/dist/TitleSection.svelte +9 -2
- package/dist/TitleSection.svelte.d.ts +4 -18
- package/dist/UuidCopy.svelte +61 -48
- package/dist/UuidCopy.svelte.d.ts +4 -26
- package/dist/alert-dialog/alert-dialog-action.svelte +15 -15
- package/dist/alert-dialog/alert-dialog-action.svelte.d.ts +5 -26
- package/dist/alert-dialog/alert-dialog-cancel.svelte +13 -10
- package/dist/alert-dialog/alert-dialog-cancel.svelte.d.ts +3 -22
- package/dist/alert-dialog/alert-dialog-content.svelte +19 -15
- package/dist/alert-dialog/alert-dialog-content.svelte.d.ts +6 -15
- package/dist/alert-dialog/alert-dialog-description.svelte +11 -6
- package/dist/alert-dialog/alert-dialog-description.svelte.d.ts +3 -16
- package/dist/alert-dialog/alert-dialog-footer.svelte +11 -5
- package/dist/alert-dialog/alert-dialog-footer.svelte.d.ts +4 -16
- package/dist/alert-dialog/alert-dialog-header.svelte +14 -5
- package/dist/alert-dialog/alert-dialog-header.svelte.d.ts +4 -16
- package/dist/alert-dialog/alert-dialog-overlay.svelte +10 -13
- package/dist/alert-dialog/alert-dialog-overlay.svelte.d.ts +3 -14
- package/dist/alert-dialog/alert-dialog-title.svelte +11 -8
- package/dist/alert-dialog/alert-dialog-title.svelte.d.ts +3 -16
- package/dist/alert-dialog/alert-dialog-trigger.svelte +6 -0
- package/dist/alert-dialog/alert-dialog-trigger.svelte.d.ts +4 -0
- package/dist/alert-dialog/index.d.ts +3 -4
- package/dist/alert-dialog/index.js +2 -2
- package/dist/button/button.svelte +76 -18
- package/dist/button/button.svelte.d.ts +62 -14
- package/dist/button/index.d.ts +2 -60
- package/dist/button/index.js +1 -26
- package/dist/helpers.d.ts +4 -1
- package/dist/helpers.js +35 -0
- package/dist/index.d.ts +1 -3
- package/dist/index.js +0 -4
- package/dist/range-calendar/index.d.ts +20 -0
- package/dist/range-calendar/index.js +22 -0
- package/dist/range-calendar/range-calendar-caption.svelte +71 -0
- package/dist/range-calendar/range-calendar-caption.svelte.d.ts +19 -0
- package/dist/range-calendar/range-calendar-cell.svelte +18 -0
- package/dist/range-calendar/range-calendar-cell.svelte.d.ts +4 -0
- package/dist/range-calendar/range-calendar-day.svelte +41 -0
- package/dist/range-calendar/range-calendar-day.svelte.d.ts +4 -0
- package/dist/range-calendar/range-calendar-grid-row.svelte +11 -0
- package/dist/range-calendar/range-calendar-grid-row.svelte.d.ts +4 -0
- package/dist/range-calendar/range-calendar-grid.svelte +15 -0
- package/dist/range-calendar/range-calendar-grid.svelte.d.ts +4 -0
- package/dist/range-calendar/range-calendar-head-cell.svelte +18 -0
- package/dist/range-calendar/range-calendar-head-cell.svelte.d.ts +4 -0
- package/dist/range-calendar/range-calendar-header.svelte +18 -0
- package/dist/range-calendar/range-calendar-header.svelte.d.ts +4 -0
- package/dist/range-calendar/range-calendar-heading.svelte +15 -0
- package/dist/range-calendar/range-calendar-heading.svelte.d.ts +4 -0
- package/dist/range-calendar/range-calendar-month-select.svelte +44 -0
- package/dist/range-calendar/range-calendar-month-select.svelte.d.ts +4 -0
- package/dist/range-calendar/range-calendar-month.svelte +14 -0
- package/dist/range-calendar/range-calendar-month.svelte.d.ts +5 -0
- package/dist/range-calendar/range-calendar-months.svelte +18 -0
- package/dist/range-calendar/range-calendar-months.svelte.d.ts +5 -0
- package/dist/range-calendar/range-calendar-nav.svelte +18 -0
- package/dist/range-calendar/range-calendar-nav.svelte.d.ts +5 -0
- package/dist/range-calendar/range-calendar-next-button.svelte +30 -0
- package/dist/range-calendar/range-calendar-next-button.svelte.d.ts +8 -0
- package/dist/range-calendar/range-calendar-prev-button.svelte +30 -0
- package/dist/range-calendar/range-calendar-prev-button.svelte.d.ts +8 -0
- package/dist/range-calendar/range-calendar-year-select.svelte +43 -0
- package/dist/range-calendar/range-calendar-year-select.svelte.d.ts +4 -0
- package/dist/range-calendar/range-calendar.svelte +109 -0
- package/dist/range-calendar/range-calendar.svelte.d.ts +21 -0
- package/dist/svg/BgPattern.svelte.d.ts +22 -19
- package/dist/svg/IconContact.svelte +6 -1
- package/dist/svg/IconContact.svelte.d.ts +5 -15
- package/dist/svg/IconEmpty.svelte.d.ts +22 -19
- package/dist/svg/IconFile.svelte +6 -1
- package/dist/svg/IconFile.svelte.d.ts +5 -15
- package/dist/svg/IconInvoice.svelte +6 -1
- package/dist/svg/IconInvoice.svelte.d.ts +5 -15
- package/dist/svg/IconNoResults.svelte +6 -1
- package/dist/svg/IconNoResults.svelte.d.ts +5 -15
- package/dist/svg/IconPdf.svelte +6 -1
- package/dist/svg/IconPdf.svelte.d.ts +5 -15
- package/dist/svg/IconProduct.svelte +6 -1
- package/dist/svg/IconProduct.svelte.d.ts +5 -15
- package/dist/table/table-body.svelte +10 -5
- package/dist/table/table-body.svelte.d.ts +4 -16
- package/dist/table/table-caption.svelte +14 -5
- package/dist/table/table-caption.svelte.d.ts +4 -16
- package/dist/table/table-cell.svelte +16 -7
- package/dist/table/table-cell.svelte.d.ts +4 -19
- package/dist/table/table-footer.svelte +14 -5
- package/dist/table/table-footer.svelte.d.ts +4 -16
- package/dist/table/table-head.svelte +11 -5
- package/dist/table/table-head.svelte.d.ts +4 -16
- package/dist/table/table-header.svelte +17 -8
- package/dist/table/table-header.svelte.d.ts +4 -19
- package/dist/table/table-row.svelte +22 -8
- package/dist/table/table-row.svelte.d.ts +4 -22
- package/dist/table/table.svelte +11 -6
- package/dist/table/table.svelte.d.ts +4 -16
- package/dist/tabs/tabs-content.svelte +13 -8
- package/dist/tabs/tabs-content.svelte.d.ts +3 -16
- package/dist/tabs/tabs-list.svelte +7 -6
- package/dist/tabs/tabs-list.svelte.d.ts +3 -16
- package/dist/tabs/tabs-trigger.svelte +13 -9
- package/dist/tabs/tabs-trigger.svelte.d.ts +3 -14
- package/dist/tabs/tabs.svelte +12 -7
- package/dist/tabs/tabs.svelte.d.ts +3 -16
- package/dist/tooltip/index.d.ts +5 -3
- package/dist/tooltip/index.js +5 -3
- package/dist/tooltip/tooltip-content.svelte +42 -23
- package/dist/tooltip/tooltip-content.svelte.d.ts +5 -15
- package/dist/tooltip/tooltip-trigger.svelte +8 -0
- package/dist/tooltip/tooltip-trigger.svelte.d.ts +4 -0
- package/dist/tw.theme.d.ts +2 -9
- package/dist/tw.theme.js +0 -5
- package/dist/types.d.ts +484 -25
- package/dist/utils.d.ts +10 -1
- package/package.json +30 -39
- package/README.md +0 -234
- package/dist/BaseTableHeaderSortBy.svelte +0 -22
- package/dist/BaseTableHeaderSortBy.svelte.d.ts +0 -20
- package/dist/ComboBox.svelte +0 -12
- package/dist/ComboBox.svelte.d.ts +0 -21
- package/dist/ComboBoxContent.svelte +0 -33
- package/dist/ComboBoxContent.svelte.d.ts +0 -20
- package/dist/ProgressBar.svelte +0 -6
- package/dist/ProgressBar.svelte.d.ts +0 -16
- package/dist/alert-dialog/alert-dialog-portal.svelte +0 -6
- package/dist/alert-dialog/alert-dialog-portal.svelte.d.ts +0 -17
- package/dist/popui.css +0 -1
- package/dist/wcdispatch.d.ts +0 -1
- package/dist/wcdispatch.js +0 -9
|
@@ -1,26 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
props: {
|
|
6
|
-
[x: string]: any;
|
|
7
|
-
icon?: IconSource | undefined;
|
|
8
|
-
name?: string | undefined;
|
|
9
|
-
disabled?: boolean | undefined;
|
|
10
|
-
date?: string | undefined;
|
|
11
|
-
iconColor?: StatusType | undefined;
|
|
12
|
-
};
|
|
13
|
-
events: {
|
|
14
|
-
preview: CustomEvent<any>;
|
|
15
|
-
download: CustomEvent<any>;
|
|
16
|
-
} & {
|
|
17
|
-
[evt: string]: CustomEvent<any>;
|
|
18
|
-
};
|
|
19
|
-
slots: {};
|
|
20
|
-
};
|
|
21
|
-
export type ButtonFileProps = typeof __propDef.props;
|
|
22
|
-
export type ButtonFileEvents = typeof __propDef.events;
|
|
23
|
-
export type ButtonFileSlots = typeof __propDef.slots;
|
|
24
|
-
export default class ButtonFile extends SvelteComponent<ButtonFileProps, ButtonFileEvents, ButtonFileSlots> {
|
|
25
|
-
}
|
|
26
|
-
export {};
|
|
1
|
+
import type { ButtonFileProps } from './types.js';
|
|
2
|
+
declare const ButtonFile: import("svelte").Component<ButtonFileProps, {}, "">;
|
|
3
|
+
type ButtonFile = ReturnType<typeof ButtonFile>;
|
|
4
|
+
export default ButtonFile;
|
|
@@ -1,22 +1,29 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import {
|
|
3
|
-
import BaseButton from
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Duplicate } from '@invopop/ui-icons'
|
|
3
|
+
import BaseButton from './BaseButton.svelte'
|
|
4
|
+
import type { ButtonUuidCopyProps } from './types'
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
uuid = '',
|
|
8
|
+
prefixLength = 4,
|
|
9
|
+
suffixLength = 4,
|
|
10
|
+
full = false,
|
|
11
|
+
disabled = false,
|
|
12
|
+
oncopied
|
|
13
|
+
}: ButtonUuidCopyProps = $props()
|
|
14
|
+
|
|
15
|
+
function shortenString(inputString: string, prefixLength: number, suffixLength: number) {
|
|
16
|
+
if (inputString.length <= prefixLength + suffixLength) {
|
|
17
|
+
return inputString // Return the whole string if it's too short
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const prefix = inputString.substring(0, prefixLength)
|
|
21
|
+
const suffix = inputString.substring(inputString.length - suffixLength)
|
|
22
|
+
|
|
23
|
+
return prefix + '...' + suffix
|
|
13
24
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
return prefix + "..." + suffix;
|
|
17
|
-
}
|
|
18
|
-
$:
|
|
19
|
-
formattedUuid = full ? uuid : shortenString(uuid, prefixLength, suffixLength);
|
|
25
|
+
|
|
26
|
+
let formattedUuid = $derived(full ? uuid : shortenString(uuid, prefixLength, suffixLength))
|
|
20
27
|
</script>
|
|
21
28
|
|
|
22
29
|
<BaseButton
|
|
@@ -24,9 +31,9 @@ $:
|
|
|
24
31
|
big
|
|
25
32
|
icon={Duplicate}
|
|
26
33
|
iconPosition="right"
|
|
27
|
-
|
|
34
|
+
onclick={async () => {
|
|
28
35
|
await navigator.clipboard.writeText(uuid)
|
|
29
|
-
|
|
36
|
+
oncopied?.(uuid)
|
|
30
37
|
}}
|
|
31
38
|
>
|
|
32
39
|
<span class="font-mono text-neutral-500">{formattedUuid}</span>
|
|
@@ -1,22 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
prefixLength?: number | undefined;
|
|
6
|
-
suffixLength?: number | undefined;
|
|
7
|
-
full?: boolean | undefined;
|
|
8
|
-
disabled?: boolean | undefined;
|
|
9
|
-
};
|
|
10
|
-
events: {
|
|
11
|
-
copied: CustomEvent<any>;
|
|
12
|
-
} & {
|
|
13
|
-
[evt: string]: CustomEvent<any>;
|
|
14
|
-
};
|
|
15
|
-
slots: {};
|
|
16
|
-
};
|
|
17
|
-
export type ButtonUuidCopyProps = typeof __propDef.props;
|
|
18
|
-
export type ButtonUuidCopyEvents = typeof __propDef.events;
|
|
19
|
-
export type ButtonUuidCopySlots = typeof __propDef.slots;
|
|
20
|
-
export default class ButtonUuidCopy extends SvelteComponent<ButtonUuidCopyProps, ButtonUuidCopyEvents, ButtonUuidCopySlots> {
|
|
21
|
-
}
|
|
22
|
-
export {};
|
|
1
|
+
import type { ButtonUuidCopyProps } from './types';
|
|
2
|
+
declare const ButtonUuidCopy: import("svelte").Component<ButtonUuidCopyProps, {}, "">;
|
|
3
|
+
type ButtonUuidCopy = ReturnType<typeof ButtonUuidCopy>;
|
|
4
|
+
export default ButtonUuidCopy;
|
package/dist/CardCheckbox.svelte
CHANGED
|
@@ -1,19 +1,28 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import clsx from 'clsx'
|
|
3
|
+
import { Icon } from '@steeze-ui/svelte-icon'
|
|
4
|
+
import InputRadio from './InputRadio.svelte'
|
|
5
|
+
import type { CardCheckboxProps } from './types'
|
|
6
|
+
|
|
7
|
+
let {
|
|
8
|
+
id = Math.random().toString(36).slice(2, 7),
|
|
9
|
+
name = '',
|
|
10
|
+
title = '',
|
|
11
|
+
description = '',
|
|
12
|
+
accentText = '',
|
|
13
|
+
checked = false,
|
|
14
|
+
icon = undefined,
|
|
15
|
+
hideRadio = false,
|
|
16
|
+
footer,
|
|
17
|
+
onchange
|
|
18
|
+
}: CardCheckboxProps = $props()
|
|
19
|
+
|
|
20
|
+
let styles = $derived(
|
|
21
|
+
clsx(
|
|
22
|
+
{ 'border-workspace-accent shadow-active': checked },
|
|
23
|
+
{ 'border-neutral-200 hover:border-neutral-300': !checked }
|
|
24
|
+
)
|
|
25
|
+
)
|
|
17
26
|
</script>
|
|
18
27
|
|
|
19
28
|
<label for={id} class="{styles} border rounded-lg w-full text-left cursor-pointer block">
|
|
@@ -38,12 +47,12 @@ $:
|
|
|
38
47
|
</div>
|
|
39
48
|
|
|
40
49
|
<div class:hidden={hideRadio}>
|
|
41
|
-
<InputRadio {id} {name} {checked}
|
|
50
|
+
<InputRadio {id} {name} {checked} {onchange} />
|
|
42
51
|
</div>
|
|
43
52
|
</div>
|
|
44
|
-
{#if
|
|
53
|
+
{#if footer}
|
|
45
54
|
<div class="bg-neutral-50 rounded-b-lg px-3 py-2.5 border-t border-neutral-100">
|
|
46
|
-
|
|
55
|
+
{@render footer?.()}
|
|
47
56
|
</div>
|
|
48
57
|
{/if}
|
|
49
58
|
</label>
|
|
@@ -1,28 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
id?: string | undefined;
|
|
6
|
-
name?: string | undefined;
|
|
7
|
-
title?: string | undefined;
|
|
8
|
-
description?: string | undefined;
|
|
9
|
-
accentText?: string | undefined;
|
|
10
|
-
checked?: boolean | undefined;
|
|
11
|
-
icon?: IconSource | undefined;
|
|
12
|
-
hideRadio?: boolean | undefined;
|
|
13
|
-
};
|
|
14
|
-
events: {
|
|
15
|
-
change: CustomEvent<any>;
|
|
16
|
-
} & {
|
|
17
|
-
[evt: string]: CustomEvent<any>;
|
|
18
|
-
};
|
|
19
|
-
slots: {
|
|
20
|
-
footer: {};
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
export type CardCheckboxProps = typeof __propDef.props;
|
|
24
|
-
export type CardCheckboxEvents = typeof __propDef.events;
|
|
25
|
-
export type CardCheckboxSlots = typeof __propDef.slots;
|
|
26
|
-
export default class CardCheckbox extends SvelteComponent<CardCheckboxProps, CardCheckboxEvents, CardCheckboxSlots> {
|
|
27
|
-
}
|
|
28
|
-
export {};
|
|
1
|
+
import type { CardCheckboxProps } from './types';
|
|
2
|
+
declare const CardCheckbox: import("svelte").Component<CardCheckboxProps, {}, "">;
|
|
3
|
+
type CardCheckbox = ReturnType<typeof CardCheckbox>;
|
|
4
|
+
export default CardCheckbox;
|
package/dist/CardRelation.svelte
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Icon } from '@steeze-ui/svelte-icon'
|
|
3
|
+
import type { CardRelationProps } from './types.js'
|
|
4
|
+
import { ChevronRight } from '@invopop/ui-icons'
|
|
5
|
+
import SeparatorHorizontal from './SeparatorHorizontal.svelte'
|
|
6
|
+
|
|
7
|
+
let { title = '', icon = undefined, items = [], onclick }: CardRelationProps = $props()
|
|
7
8
|
</script>
|
|
8
9
|
|
|
9
|
-
<div class="border rounded-lg">
|
|
10
|
-
<button class="pl-3 py-2 pr-2 flex items-center justify-between space-x-3 w-full"
|
|
10
|
+
<div class="border border-neutral-100 rounded-lg">
|
|
11
|
+
<button class="pl-3 py-2 pr-2 flex items-center justify-between space-x-3 w-full" {onclick}>
|
|
11
12
|
<div class="flex items-center space-x-1.5">
|
|
12
13
|
{#if icon}
|
|
13
14
|
<Icon src={icon} class="h-4 w-4 text-neutral-500" />
|
|
@@ -1,22 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
props: {
|
|
6
|
-
title?: string | undefined;
|
|
7
|
-
icon?: IconSource | undefined;
|
|
8
|
-
items?: DataListItem[] | undefined;
|
|
9
|
-
};
|
|
10
|
-
events: {
|
|
11
|
-
click: MouseEvent;
|
|
12
|
-
} & {
|
|
13
|
-
[evt: string]: CustomEvent<any>;
|
|
14
|
-
};
|
|
15
|
-
slots: {};
|
|
16
|
-
};
|
|
17
|
-
export type CardRelationProps = typeof __propDef.props;
|
|
18
|
-
export type CardRelationEvents = typeof __propDef.events;
|
|
19
|
-
export type CardRelationSlots = typeof __propDef.slots;
|
|
20
|
-
export default class CardRelation extends SvelteComponent<CardRelationProps, CardRelationEvents, CardRelationSlots> {
|
|
21
|
-
}
|
|
22
|
-
export {};
|
|
1
|
+
import type { CardRelationProps } from './types.js';
|
|
2
|
+
declare const CardRelation: import("svelte").Component<CardRelationProps, {}, "">;
|
|
3
|
+
type CardRelation = ReturnType<typeof CardRelation>;
|
|
4
|
+
export default CardRelation;
|
|
@@ -1,25 +1,27 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
let
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import ProfileAvatar from './ProfileAvatar.svelte'
|
|
3
|
+
import type { AnyProp, CompanySelectorProps, DrawerOption } from './types.js'
|
|
4
|
+
import BaseDropdown from './BaseDropdown.svelte'
|
|
5
|
+
import DrawerContextWorkspace from './DrawerContextWorkspace.svelte'
|
|
6
|
+
import { DoubleArrow } from '@invopop/ui-icons'
|
|
7
|
+
import MenuItemCollapsible from './MenuItemCollapsible.svelte'
|
|
8
|
+
|
|
9
|
+
let companyDropdown: BaseDropdown | undefined = $state()
|
|
10
|
+
let isOpen = $state(false)
|
|
11
|
+
|
|
12
|
+
let {
|
|
13
|
+
companies = [],
|
|
14
|
+
selectedCompany = $bindable(null),
|
|
15
|
+
collapsed = false,
|
|
16
|
+
onAdd,
|
|
17
|
+
onSelect
|
|
18
|
+
}: CompanySelectorProps = $props()
|
|
19
|
+
|
|
20
|
+
let name = $derived(selectedCompany?.name || '')
|
|
21
|
+
let country = $derived(selectedCompany?.country || '')
|
|
22
|
+
let picture = $derived(selectedCompany?.logo_url || '')
|
|
23
|
+
let isSandbox = $derived(selectedCompany?.sandbox)
|
|
24
|
+
let items = $derived([
|
|
23
25
|
...companies.map((c) => ({
|
|
24
26
|
value: c.id,
|
|
25
27
|
label: c.name,
|
|
@@ -28,16 +30,19 @@ $:
|
|
|
28
30
|
picture: c.logo_url,
|
|
29
31
|
sandbox: c.sandbox
|
|
30
32
|
}))
|
|
31
|
-
]
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
] as DrawerOption[])
|
|
34
|
+
|
|
35
|
+
function selectCompany(value: AnyProp) {
|
|
36
|
+
companyDropdown?.toggle()
|
|
37
|
+
|
|
38
|
+
if (value === 'add') {
|
|
39
|
+
onAdd?.()
|
|
40
|
+
return
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
selectedCompany = companies.find((c) => c.id === value) || null
|
|
44
|
+
onSelect?.(selectedCompany)
|
|
37
45
|
}
|
|
38
|
-
selectedCompany = companies.find((c) => c.id === event.detail) || null;
|
|
39
|
-
dispatch("select", selectedCompany);
|
|
40
|
-
}
|
|
41
46
|
</script>
|
|
42
47
|
|
|
43
48
|
<BaseDropdown
|
|
@@ -46,16 +51,17 @@ function selectCompany(event) {
|
|
|
46
51
|
placement="bottom-start"
|
|
47
52
|
fullWidth={!collapsed}
|
|
48
53
|
>
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
54
|
+
{#snippet trigger()}
|
|
55
|
+
<MenuItemCollapsible
|
|
56
|
+
{collapsed}
|
|
57
|
+
title={name}
|
|
58
|
+
subtitle={isSandbox ? 'Sandbox' : ''}
|
|
59
|
+
icon={collapsed ? undefined : DoubleArrow}
|
|
60
|
+
active={isOpen}
|
|
61
|
+
bold
|
|
62
|
+
>
|
|
63
|
+
<ProfileAvatar {name} {picture} {country} dark large />
|
|
64
|
+
</MenuItemCollapsible>
|
|
65
|
+
{/snippet}
|
|
66
|
+
<DrawerContextWorkspace {items} onclick={selectCompany} />
|
|
61
67
|
</BaseDropdown>
|
|
@@ -1,22 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
companies?: Company[] | undefined;
|
|
6
|
-
selectedCompany?: Company | null | undefined;
|
|
7
|
-
collapsed?: boolean | undefined;
|
|
8
|
-
};
|
|
9
|
-
events: {
|
|
10
|
-
add: CustomEvent<any>;
|
|
11
|
-
select: CustomEvent<any>;
|
|
12
|
-
} & {
|
|
13
|
-
[evt: string]: CustomEvent<any>;
|
|
14
|
-
};
|
|
15
|
-
slots: {};
|
|
16
|
-
};
|
|
17
|
-
export type CompanySelectorProps = typeof __propDef.props;
|
|
18
|
-
export type CompanySelectorEvents = typeof __propDef.events;
|
|
19
|
-
export type CompanySelectorSlots = typeof __propDef.slots;
|
|
20
|
-
export default class CompanySelector extends SvelteComponent<CompanySelectorProps, CompanySelectorEvents, CompanySelectorSlots> {
|
|
21
|
-
}
|
|
22
|
-
export {};
|
|
1
|
+
import type { CompanySelectorProps } from './types.js';
|
|
2
|
+
declare const CompanySelector: import("svelte").Component<CompanySelectorProps, {}, "selectedCompany">;
|
|
3
|
+
type CompanySelector = ReturnType<typeof CompanySelector>;
|
|
4
|
+
export default CompanySelector;
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
<script
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import clsx from 'clsx'
|
|
3
|
+
import type { CounterWorkflowProps } from './types'
|
|
4
|
+
|
|
5
|
+
let { content, variant = 'default' }: CounterWorkflowProps = $props()
|
|
6
|
+
|
|
7
|
+
let styles = $derived(
|
|
8
|
+
clsx({
|
|
9
|
+
'bg-white rounded-md': variant === 'default',
|
|
10
|
+
rounded: variant === 'transparent'
|
|
11
|
+
})
|
|
12
|
+
)
|
|
9
13
|
</script>
|
|
10
14
|
|
|
11
15
|
<div
|
|
@@ -1,17 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
variant?: "default" | "transparent" | undefined;
|
|
6
|
-
};
|
|
7
|
-
events: {
|
|
8
|
-
[evt: string]: CustomEvent<any>;
|
|
9
|
-
};
|
|
10
|
-
slots: {};
|
|
11
|
-
};
|
|
12
|
-
export type CounterWorkflowProps = typeof __propDef.props;
|
|
13
|
-
export type CounterWorkflowEvents = typeof __propDef.events;
|
|
14
|
-
export type CounterWorkflowSlots = typeof __propDef.slots;
|
|
15
|
-
export default class CounterWorkflow extends SvelteComponent<CounterWorkflowProps, CounterWorkflowEvents, CounterWorkflowSlots> {
|
|
16
|
-
}
|
|
17
|
-
export {};
|
|
1
|
+
import type { CounterWorkflowProps } from './types';
|
|
2
|
+
declare const CounterWorkflow: import("svelte").Component<CounterWorkflowProps, {}, "">;
|
|
3
|
+
type CounterWorkflow = ReturnType<typeof CounterWorkflow>;
|
|
4
|
+
export default CounterWorkflow;
|
package/dist/DataListItem.svelte
CHANGED
|
@@ -1,22 +1,32 @@
|
|
|
1
|
-
<script
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
})
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import clsx from 'clsx'
|
|
3
|
+
import type { DataListItemProps } from './types'
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
label = '',
|
|
7
|
+
value = '',
|
|
8
|
+
monospaced = false,
|
|
9
|
+
monospacedNums = false,
|
|
10
|
+
fullWidth = false,
|
|
11
|
+
children
|
|
12
|
+
}: DataListItemProps = $props()
|
|
13
|
+
|
|
14
|
+
let styles = $derived(
|
|
15
|
+
clsx({
|
|
16
|
+
'font-mono': monospaced,
|
|
17
|
+
'slashed-zero tabular-nums lining-nums': monospacedNums,
|
|
18
|
+
'w-full': fullWidth
|
|
19
|
+
})
|
|
20
|
+
)
|
|
13
21
|
</script>
|
|
14
22
|
|
|
15
23
|
<div class="flex space-x-4 text-base items-center">
|
|
16
24
|
<div class="text-neutral-500 min-w-[125px]">{label}</div>
|
|
17
25
|
<div class="{styles} text-neutral-800 font-medium">
|
|
18
|
-
|
|
26
|
+
{#if children}
|
|
27
|
+
{@render children()}
|
|
28
|
+
{:else}
|
|
19
29
|
{value}
|
|
20
|
-
|
|
30
|
+
{/if}
|
|
21
31
|
</div>
|
|
22
32
|
</div>
|
|
@@ -1,22 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
value?: string | undefined;
|
|
6
|
-
monospaced?: boolean | undefined;
|
|
7
|
-
monospacedNums?: boolean | undefined;
|
|
8
|
-
fullWidth?: boolean | undefined;
|
|
9
|
-
};
|
|
10
|
-
events: {
|
|
11
|
-
[evt: string]: CustomEvent<any>;
|
|
12
|
-
};
|
|
13
|
-
slots: {
|
|
14
|
-
default: {};
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
export type DataListItemProps = typeof __propDef.props;
|
|
18
|
-
export type DataListItemEvents = typeof __propDef.events;
|
|
19
|
-
export type DataListItemSlots = typeof __propDef.slots;
|
|
20
|
-
export default class DataListItem extends SvelteComponent<DataListItemProps, DataListItemEvents, DataListItemSlots> {
|
|
21
|
-
}
|
|
22
|
-
export {};
|
|
1
|
+
import type { DataListItemProps } from './types';
|
|
2
|
+
declare const DataListItem: import("svelte").Component<DataListItemProps, {}, "">;
|
|
3
|
+
type DataListItem = ReturnType<typeof DataListItem>;
|
|
4
|
+
export default DataListItem;
|