@invopop/popui 0.1.14 → 0.1.16
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/BaseButton.svelte +25 -103
- package/dist/BaseCard.svelte +35 -30
- package/dist/BaseCounter.svelte +11 -8
- package/dist/BaseDropdown.svelte +3 -3
- package/dist/BaseTable.svelte +8 -12
- package/dist/BaseTableActions.svelte +4 -6
- package/dist/BaseTableCellContent.svelte +4 -6
- package/dist/BaseTableCheckbox.svelte +8 -10
- package/dist/BaseTableHeaderContent.svelte +4 -4
- package/dist/BaseTableRow.svelte +12 -10
- package/dist/Breadcrumb.svelte +40 -0
- package/dist/Breadcrumb.svelte.d.ts +4 -0
- package/dist/Breadcrumbs.svelte +5 -30
- package/dist/ButtonFile.svelte +35 -30
- package/dist/ButtonUuidCopy.svelte +3 -2
- package/dist/CardCheckbox.svelte +25 -21
- package/dist/CardRelation.svelte +12 -16
- package/dist/CompanySelector.svelte +35 -7
- package/dist/DataListItem.svelte +14 -10
- package/dist/DatePicker.svelte +14 -12
- package/dist/DrawerContext.svelte +111 -8
- package/dist/DrawerContextItem.svelte +18 -30
- package/dist/DrawerContextSeparator.svelte +1 -1
- package/dist/DrawerContextWorkspace.svelte +7 -7
- package/dist/DropdownSelect.svelte +38 -16
- package/dist/EmptyState.svelte +42 -0
- package/dist/EmptyState.svelte.d.ts +4 -0
- package/dist/EmptyStateIllustration.svelte.d.ts +0 -1
- package/dist/FeedEvents.svelte +9 -5
- package/dist/FeedIconEvent.svelte +1 -1
- package/dist/FeedIconStatus.svelte +1 -1
- package/dist/FeedItem.svelte +8 -8
- package/dist/FeedItemDetail.svelte +15 -6
- package/dist/GlobalSearch.svelte +13 -12
- package/dist/InputCheckbox.svelte +2 -5
- package/dist/InputError.svelte +4 -9
- package/dist/InputLabel.svelte +3 -1
- package/dist/InputRadio.svelte +26 -11
- package/dist/InputSearch.svelte +8 -8
- package/dist/InputSelect.svelte +32 -31
- package/dist/InputText.svelte +32 -24
- package/dist/InputTextarea.svelte +25 -19
- package/dist/InputToggle.svelte +24 -18
- package/dist/MenuItem.svelte +9 -8
- package/dist/MenuItemCollapsible.svelte +4 -4
- package/dist/Notification.svelte +59 -24
- package/dist/ProfileAvatar.svelte +43 -14
- package/dist/SeparatorHorizontal.svelte +2 -2
- package/dist/ShortcutWrapper.svelte +14 -5
- package/dist/StatusLabel.svelte +4 -5
- package/dist/StepIconList.svelte +11 -9
- package/dist/TagBeta.svelte +26 -14
- package/dist/TagStatus.svelte +37 -49
- package/dist/TitleMain.svelte +1 -1
- package/dist/TitleSection.svelte +1 -1
- package/dist/UuidCopy.svelte +4 -4
- package/dist/alert-dialog/alert-dialog-action.svelte +5 -3
- package/dist/alert-dialog/alert-dialog-cancel.svelte +4 -2
- package/dist/alert-dialog/alert-dialog-content.svelte +1 -1
- package/dist/alert-dialog/alert-dialog-description.svelte +1 -1
- package/dist/alert-dialog/alert-dialog-footer.svelte +1 -1
- package/dist/alert-dialog/alert-dialog-header.svelte +1 -1
- package/dist/alert-dialog/alert-dialog-title.svelte +1 -1
- package/dist/button/button.svelte +198 -24
- package/dist/button/button.svelte.d.ts +48 -26
- package/dist/index.d.ts +5 -10
- package/dist/index.js +3 -13
- package/dist/range-calendar/range-calendar-cell.svelte +1 -1
- package/dist/range-calendar/range-calendar-day.svelte +10 -8
- package/dist/range-calendar/range-calendar-head-cell.svelte +1 -1
- package/dist/range-calendar/range-calendar-next-button.svelte +3 -3
- package/dist/range-calendar/range-calendar-prev-button.svelte +3 -3
- package/dist/range-calendar/range-calendar.svelte +1 -1
- package/dist/sonner/sonner.svelte +7 -9
- package/dist/svg/CheckBadge.svelte +18 -0
- package/dist/svg/CheckBadge.svelte.d.ts +26 -0
- package/dist/svg/IconEmpty.svelte +78 -106
- package/dist/table/table-body.svelte +1 -1
- package/dist/table/table-cell.svelte +1 -1
- package/dist/table/table-footer.svelte +1 -1
- package/dist/table/table-head.svelte +1 -1
- package/dist/table/table-header.svelte +1 -1
- package/dist/table/table-row.svelte +1 -1
- package/dist/tabs/tabs-list.svelte +8 -2
- package/dist/tabs/tabs-list.svelte.d.ts +4 -1
- package/dist/tabs/tabs-trigger.svelte +5 -3
- package/dist/tabs/tabs-trigger.svelte.d.ts +4 -1
- package/dist/tailwind.theme.css +981 -0
- package/dist/tooltip/tooltip-content.svelte +2 -2
- package/dist/types.d.ts +36 -42
- package/package.json +2 -2
- package/dist/CounterWorkflow.svelte +0 -19
- package/dist/CounterWorkflow.svelte.d.ts +0 -4
- package/dist/EmptyStateIcon.svelte +0 -52
- package/dist/EmptyStateIcon.svelte.d.ts +0 -4
- package/dist/FormLayoutModal.svelte +0 -14
- package/dist/FormLayoutModal.svelte.d.ts +0 -4
- package/dist/ProfileSelector.svelte +0 -41
- package/dist/ProfileSelector.svelte.d.ts +0 -4
- package/dist/SectionLayout.svelte +0 -13
- package/dist/SectionLayout.svelte.d.ts +0 -4
- package/dist/tw.theme.d.ts +0 -171
- package/dist/tw.theme.js +0 -188
package/dist/InputText.svelte
CHANGED
|
@@ -32,13 +32,19 @@
|
|
|
32
32
|
|
|
33
33
|
let inputStyles = $derived(
|
|
34
34
|
clsx(
|
|
35
|
-
|
|
35
|
+
'h-8 w-full rounded-lg border px-2 py-1 text-base tracking-tight bg-background-default-default backdrop-blur-[2px] caret-foreground-accent',
|
|
36
|
+
'placeholder:text-foreground-default-tertiary',
|
|
37
|
+
'outline-none focus:ring-0',
|
|
36
38
|
{
|
|
37
|
-
'
|
|
39
|
+
'pointer-events-none bg-background-default-secondary border-border-default-default':
|
|
40
|
+
disabled
|
|
38
41
|
},
|
|
39
42
|
{
|
|
40
|
-
'
|
|
41
|
-
|
|
43
|
+
'text-foreground-critical border-border-critical-bold caret-foreground-critical': errorText
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
'text-foreground border-border-default-secondary hover:border-border-default-secondary-hover focus:border-border-selected-bold focus:shadow-active':
|
|
47
|
+
!errorText && !disabled
|
|
42
48
|
}
|
|
43
49
|
)
|
|
44
50
|
)
|
|
@@ -59,23 +65,25 @@
|
|
|
59
65
|
})
|
|
60
66
|
</script>
|
|
61
67
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
{
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
{
|
|
68
|
+
<div class="flex flex-col gap-2">
|
|
69
|
+
{#if label}
|
|
70
|
+
<InputLabel {id} {label} />
|
|
71
|
+
{/if}
|
|
72
|
+
<input
|
|
73
|
+
{id}
|
|
74
|
+
bind:this={inputEl}
|
|
75
|
+
bind:value
|
|
76
|
+
type="text"
|
|
77
|
+
class={inputStyles}
|
|
78
|
+
{placeholder}
|
|
79
|
+
readonly={disabled}
|
|
80
|
+
{...rest}
|
|
81
|
+
oninput={handleInput}
|
|
82
|
+
{onfocus}
|
|
83
|
+
{onblur}
|
|
84
|
+
{onkeydown}
|
|
85
|
+
/>
|
|
86
|
+
{#if errorText}
|
|
87
|
+
<InputError {errorText} />
|
|
88
|
+
{/if}
|
|
89
|
+
</div>
|
|
@@ -18,13 +18,16 @@
|
|
|
18
18
|
|
|
19
19
|
let inputStyles = $derived(
|
|
20
20
|
clsx(
|
|
21
|
-
|
|
21
|
+
'w-full rounded-lg border px-2 py-1.5 text-base tracking-tight bg-background backdrop-blur-[2px] placeholder:text-foreground-default-tertiary outline-none focus:ring-0 caret-foreground-accent',
|
|
22
22
|
{
|
|
23
|
-
'
|
|
23
|
+
'pointer-events-none bg-background-default-secondary border-border': disabled
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
|
-
'
|
|
27
|
-
|
|
26
|
+
'text-foreground-critical border-border-critical-bold caret-foreground-critical': errorText
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
'text-foreground border-border hover:border-border-default-secondary-hover focus:border-border-selected-bold focus:shadow-active':
|
|
30
|
+
!errorText && !disabled
|
|
28
31
|
}
|
|
29
32
|
)
|
|
30
33
|
)
|
|
@@ -35,18 +38,21 @@
|
|
|
35
38
|
}
|
|
36
39
|
</script>
|
|
37
40
|
|
|
38
|
-
<
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
{
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
{
|
|
51
|
-
|
|
52
|
-
{
|
|
41
|
+
<div class="flex flex-col gap-2">
|
|
42
|
+
{#if label}
|
|
43
|
+
<InputLabel {id} {label} />
|
|
44
|
+
{/if}
|
|
45
|
+
<textarea
|
|
46
|
+
{id}
|
|
47
|
+
{placeholder}
|
|
48
|
+
{value}
|
|
49
|
+
class={inputStyles}
|
|
50
|
+
{disabled}
|
|
51
|
+
{rows}
|
|
52
|
+
{...rest}
|
|
53
|
+
oninput={handleInput}
|
|
54
|
+
></textarea>
|
|
55
|
+
{#if errorText}
|
|
56
|
+
<InputError {errorText} />
|
|
57
|
+
{/if}
|
|
58
|
+
</div>
|
package/dist/InputToggle.svelte
CHANGED
|
@@ -15,8 +15,24 @@
|
|
|
15
15
|
$sw.checked = checked
|
|
16
16
|
})
|
|
17
17
|
|
|
18
|
-
let
|
|
19
|
-
clsx(
|
|
18
|
+
let toggleStyles = $derived(
|
|
19
|
+
clsx(
|
|
20
|
+
'relative inline-flex h-5 w-[30px] shrink-0 cursor-pointer items-center rounded-md transition-colors duration-200 ease-in-out focus:outline-none focus:ring-0',
|
|
21
|
+
{
|
|
22
|
+
'bg-background-default-tertiary': !$sw.checked,
|
|
23
|
+
'bg-background-accent': $sw.checked
|
|
24
|
+
}
|
|
25
|
+
)
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
let circleStyles = $derived(
|
|
29
|
+
clsx(
|
|
30
|
+
'pointer-events-none inline-block size-4 transform rounded bg-icon-inverse-bold transition duration-200 ease-in-out',
|
|
31
|
+
{
|
|
32
|
+
'translate-x-[2px]': !$sw.checked,
|
|
33
|
+
'translate-x-[12px]': $sw.checked
|
|
34
|
+
}
|
|
35
|
+
)
|
|
20
36
|
)
|
|
21
37
|
|
|
22
38
|
function handleChange() {
|
|
@@ -25,22 +41,12 @@
|
|
|
25
41
|
}
|
|
26
42
|
</script>
|
|
27
43
|
|
|
28
|
-
<label for={id} class="flex
|
|
29
|
-
{
|
|
30
|
-
<span class="text-base text-neutral-500">{label}</span>
|
|
31
|
-
{/if}
|
|
32
|
-
<button
|
|
33
|
-
{id}
|
|
34
|
-
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"
|
|
35
|
-
use:sw.toggle
|
|
36
|
-
onclick={handleChange}
|
|
37
|
-
>
|
|
44
|
+
<label for={id} class="inline-flex items-center gap-2 cursor-pointer">
|
|
45
|
+
<button {id} class={toggleStyles} use:sw.toggle onclick={handleChange}>
|
|
38
46
|
<span class="sr-only">Use setting</span>
|
|
39
|
-
<span
|
|
40
|
-
aria-hidden="true"
|
|
41
|
-
class="{$sw.checked
|
|
42
|
-
? 'translate-x-3'
|
|
43
|
-
: '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"
|
|
44
|
-
></span>
|
|
47
|
+
<span aria-hidden="true" class={circleStyles}></span>
|
|
45
48
|
</button>
|
|
49
|
+
{#if label}
|
|
50
|
+
<span class="text-base text-foreground">{label}</span>
|
|
51
|
+
{/if}
|
|
46
52
|
</label>
|
package/dist/MenuItem.svelte
CHANGED
|
@@ -36,15 +36,16 @@
|
|
|
36
36
|
let leaveHoverTimeout: ReturnType<typeof setTimeout> | null = null
|
|
37
37
|
let itemStyles = $derived(
|
|
38
38
|
clsx(
|
|
39
|
-
{ 'text-
|
|
40
|
-
{ 'text-
|
|
41
|
-
{
|
|
42
|
-
|
|
39
|
+
{ 'text-foreground-inverse font-medium': !isFolderItem },
|
|
40
|
+
{ 'text-foreground-inverse-secondary': isFolderItem && !active },
|
|
41
|
+
{
|
|
42
|
+
'border border-transparent hover:bg-background-selected-inverse group p-2': collapsedSidebar
|
|
43
|
+
},
|
|
43
44
|
{ 'w-full px-2 py-1.5': !collapsedSidebar },
|
|
44
45
|
{
|
|
45
|
-
'bg-
|
|
46
|
+
'bg-background-selected-inverse text-white': active
|
|
46
47
|
},
|
|
47
|
-
{ 'hover:bg-
|
|
48
|
+
{ 'hover:bg-background-selected-inverse': !active }
|
|
48
49
|
)
|
|
49
50
|
)
|
|
50
51
|
let iconStyles = $derived(clsx({ 'group-hover:text-white': collapsedSidebar }))
|
|
@@ -106,9 +107,9 @@
|
|
|
106
107
|
onmouseleave={handleBlur}
|
|
107
108
|
onclick={handleClick}
|
|
108
109
|
title={label}
|
|
109
|
-
class="cursor-pointer {itemStyles} text-base border border-transparent flex items-center justify-between hover:text-white focus:text-white rounded-
|
|
110
|
+
class="cursor-pointer {itemStyles} text-base border border-transparent flex items-center justify-between hover:text-white focus:text-white rounded-lg h-8"
|
|
110
111
|
>
|
|
111
|
-
<span class="flex items-center space-x-
|
|
112
|
+
<span class="flex items-center space-x-1.5">
|
|
112
113
|
{#if resolvedIcon}
|
|
113
114
|
<Icon src={resolvedIcon} theme={iconTheme} class="{iconStyles} h-4 w-4 text-white-70" />
|
|
114
115
|
{/if}
|
|
@@ -17,16 +17,16 @@
|
|
|
17
17
|
clsx(
|
|
18
18
|
{ 'p-1': collapsed },
|
|
19
19
|
{ 'space-x-2 w-full p-[7px]': !collapsed },
|
|
20
|
-
{ '
|
|
21
|
-
{ '
|
|
22
|
-
{ 'font-
|
|
20
|
+
{ 'bg-selected-inverse': active },
|
|
21
|
+
{ 'hover:bg-background-selected-inverse': !active },
|
|
22
|
+
{ 'font-medium': bold }
|
|
23
23
|
)
|
|
24
24
|
)
|
|
25
25
|
</script>
|
|
26
26
|
|
|
27
27
|
<span
|
|
28
28
|
{title}
|
|
29
|
-
class="{styles} text-
|
|
29
|
+
class="{styles} text-foreground-inverse text-base flex items-center justify-between rounded-lg h-8"
|
|
30
30
|
>
|
|
31
31
|
<span class:space-x-2={!collapsed} class="flex items-center">
|
|
32
32
|
{@render children?.()}
|
package/dist/Notification.svelte
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import clsx from 'clsx'
|
|
3
|
-
import { Warning, Failure, Success } from '@invopop/ui-icons'
|
|
3
|
+
import { Warning, Failure, Success, InfoBold } from '@invopop/ui-icons'
|
|
4
4
|
import { Icon } from '@steeze-ui/svelte-icon'
|
|
5
|
-
import type { NotificationProps
|
|
5
|
+
import type { NotificationProps } from './types'
|
|
6
6
|
|
|
7
|
-
let {
|
|
7
|
+
let { title = '', description = '', type = 'neutral', children }: NotificationProps = $props()
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
let icon = $derived.by(() => {
|
|
10
10
|
switch (type) {
|
|
11
11
|
case 'success':
|
|
12
12
|
return Success
|
|
@@ -14,31 +14,66 @@
|
|
|
14
14
|
return Failure
|
|
15
15
|
case 'warning':
|
|
16
16
|
return Warning
|
|
17
|
+
case 'info':
|
|
18
|
+
return InfoBold
|
|
19
|
+
case 'neutral':
|
|
20
|
+
return InfoBold
|
|
17
21
|
default:
|
|
18
|
-
return
|
|
22
|
+
return InfoBold
|
|
19
23
|
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
let
|
|
23
|
-
clsx(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
let containerStyles = $derived(
|
|
27
|
+
clsx('flex items-center gap-1.5 pl-3 rounded-xl', {
|
|
28
|
+
'py-1.5': children,
|
|
29
|
+
'py-2': !children,
|
|
30
|
+
'bg-background border border-border shadow-sm': type === 'neutral',
|
|
31
|
+
'bg-background-info': type === 'info',
|
|
32
|
+
'bg-background-success': type === 'success',
|
|
33
|
+
'bg-background-warning': type === 'warning',
|
|
34
|
+
'bg-background-critical': type === 'error',
|
|
35
|
+
'pr-3': description,
|
|
36
|
+
'min-h-9 rounded-[10px] pl-3 py-1.5 pr-1.5': !description
|
|
37
|
+
})
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
let titleStyles = $derived(
|
|
41
|
+
clsx('text-base font-medium leading-5 tracking-tight', {
|
|
42
|
+
'text-foreground': type === 'neutral',
|
|
43
|
+
'text-foreground-info': type === 'info',
|
|
44
|
+
'text-foreground-success': type === 'success',
|
|
45
|
+
'text-foreground-warning': type === 'warning',
|
|
46
|
+
'text-foreground-critical': type === 'error'
|
|
47
|
+
})
|
|
28
48
|
)
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
49
|
+
|
|
50
|
+
let iconStyles = $derived(
|
|
51
|
+
clsx('size-4', {
|
|
52
|
+
'mt-0.5': description,
|
|
53
|
+
'text-icon': type === 'neutral',
|
|
54
|
+
'text-icon-info': type === 'info',
|
|
55
|
+
'text-icon-success': type === 'success',
|
|
56
|
+
'text-icon-warning': type === 'warning',
|
|
57
|
+
'text-icon-critical': type === 'error'
|
|
58
|
+
})
|
|
35
59
|
)
|
|
36
60
|
</script>
|
|
37
61
|
|
|
38
|
-
<div class=
|
|
39
|
-
{
|
|
40
|
-
<
|
|
41
|
-
|
|
42
|
-
|
|
62
|
+
<div class={containerStyles}>
|
|
63
|
+
<div class:items-start={description} class:items-center={!description} class="flex self-stretch">
|
|
64
|
+
<div class="relative size-4 shrink-0">
|
|
65
|
+
{#if icon}
|
|
66
|
+
<Icon src={icon} class={iconStyles} />
|
|
67
|
+
{/if}
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
<div class="flex flex-col gap-0.5 grow justify-center min-w-0">
|
|
71
|
+
<p class={titleStyles}>{title}</p>
|
|
72
|
+
{#if description}
|
|
73
|
+
<p class="text-sm text-foreground-default-secondary leading-5 tracking-tight">
|
|
74
|
+
{description}
|
|
75
|
+
</p>
|
|
76
|
+
{/if}
|
|
77
|
+
</div>
|
|
43
78
|
{@render children?.()}
|
|
44
79
|
</div>
|
|
@@ -1,43 +1,72 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import clsx from 'clsx'
|
|
3
3
|
import BaseFlag from './BaseFlag.svelte'
|
|
4
|
+
import { Icon } from '@steeze-ui/svelte-icon'
|
|
4
5
|
import type { ProfileAvatarProps } from './types'
|
|
5
6
|
|
|
6
7
|
let {
|
|
7
8
|
name = '',
|
|
8
|
-
|
|
9
|
-
large = false,
|
|
9
|
+
variant = 'sm',
|
|
10
10
|
dark = false,
|
|
11
11
|
picture = $bindable(''),
|
|
12
|
-
country = ''
|
|
12
|
+
country = '',
|
|
13
|
+
icon
|
|
13
14
|
}: ProfileAvatarProps = $props()
|
|
14
15
|
|
|
15
|
-
let
|
|
16
|
+
let containerStyles = $derived(
|
|
16
17
|
clsx(
|
|
17
|
-
|
|
18
|
-
{ '
|
|
19
|
-
{ '
|
|
20
|
-
{ '
|
|
21
|
-
{ '
|
|
22
|
-
{ '
|
|
23
|
-
{
|
|
18
|
+
'overflow-clip relative flex items-center justify-center after:content-[""] after:absolute after:inset-0 after:pointer-events-none after:rounded-[inherit]',
|
|
19
|
+
{ 'size-4 rounded': variant === 'xs' },
|
|
20
|
+
{ 'size-5 rounded-md': variant === 'sm' },
|
|
21
|
+
{ 'size-7 rounded-md': variant === 'md' },
|
|
22
|
+
{ 'size-8 rounded-lg': variant === 'lg' },
|
|
23
|
+
{ 'size-10 rounded-lg': variant === 'xl' },
|
|
24
|
+
{
|
|
25
|
+
'bg-background after:shadow-avatar': !dark
|
|
26
|
+
},
|
|
27
|
+
{ 'border-border-inverse after:shadow-avatar-inverse': dark }
|
|
28
|
+
)
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
let textStyles = $derived(
|
|
32
|
+
clsx(
|
|
33
|
+
'font-sans font-medium tracking-tight',
|
|
34
|
+
{ 'text-sm leading-4': variant === 'xs' || variant === 'sm' },
|
|
35
|
+
{ 'text-base leading-5': variant === 'md' },
|
|
36
|
+
{ 'text-lg leading-6': variant === 'lg' },
|
|
37
|
+
{ 'text-xl leading-7': variant === 'xl' },
|
|
38
|
+
{ 'text-foreground-default-secondary': !dark },
|
|
39
|
+
{ 'text-foreground-inverse-secondary': dark }
|
|
40
|
+
)
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
let iconStyles = $derived(
|
|
44
|
+
clsx(
|
|
45
|
+
{ 'size-3': variant === 'xs' || variant === 'sm' },
|
|
46
|
+
{ 'size-4': variant === 'md' },
|
|
47
|
+
{ 'size-[25px]': variant === 'lg' || variant === 'xl' },
|
|
48
|
+
{ 'text-icon-default-default': !dark },
|
|
49
|
+
{ 'text-icon-inverse-default': dark }
|
|
24
50
|
)
|
|
25
51
|
)
|
|
26
52
|
</script>
|
|
27
53
|
|
|
28
|
-
<div class=
|
|
54
|
+
<div class={containerStyles}>
|
|
29
55
|
{#if picture}
|
|
30
56
|
<img
|
|
31
|
-
class="h-full w-full rounded object-cover"
|
|
32
57
|
src={picture}
|
|
33
58
|
alt={name}
|
|
59
|
+
class="absolute inset-0 size-full object-cover bg-background-default-bold"
|
|
34
60
|
onerror={() => {
|
|
35
61
|
picture = ''
|
|
36
62
|
}}
|
|
37
63
|
/>
|
|
64
|
+
{:else if icon}
|
|
65
|
+
<Icon src={icon} class={iconStyles} />
|
|
38
66
|
{:else}
|
|
39
|
-
<span>{name?.charAt(0)}</span>
|
|
67
|
+
<span class={textStyles}>{name?.charAt(0)?.toUpperCase()}</span>
|
|
40
68
|
{/if}
|
|
69
|
+
|
|
41
70
|
{#if country}
|
|
42
71
|
<div class="absolute -bottom-0.5 -right-0.5">
|
|
43
72
|
<BaseFlag {country} />
|
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { ShortcutWrapperProps } from './types'
|
|
3
|
+
import clsx from 'clsx'
|
|
3
4
|
|
|
4
|
-
let { children }: ShortcutWrapperProps = $props()
|
|
5
|
+
let { size = 'sm', theme = 'light', children }: ShortcutWrapperProps = $props()
|
|
6
|
+
|
|
7
|
+
const styles = $derived(
|
|
8
|
+
clsx('inline-flex items-center justify-center border', {
|
|
9
|
+
'size-4 rounded': size === 'sm',
|
|
10
|
+
'size-5 rounded-md': size === 'md',
|
|
11
|
+
'bg-background-default-secondary border-border-default-secondary shadow-[0px_1px_0px_#DFE0E6] text-foreground-default-secondary':
|
|
12
|
+
theme === 'light',
|
|
13
|
+
'bg-background-inverse-secondary border-border-inverse-secondary shadow-[0px_1px_0px_rgba(255,255,255,0.20)] text-foreground-inverse-secondary':
|
|
14
|
+
theme === 'navigation'
|
|
15
|
+
})
|
|
16
|
+
)
|
|
5
17
|
</script>
|
|
6
18
|
|
|
7
|
-
<div
|
|
8
|
-
class="h-4 w-4 bg-white-5 rounded border border-white-20 inline-flex items-center justify-center"
|
|
9
|
-
style="box-shadow: 0px 1px 0px rgba(255, 255, 255, 0.25);"
|
|
10
|
-
>
|
|
19
|
+
<div class={styles}>
|
|
11
20
|
{@render children?.()}
|
|
12
21
|
</div>
|
package/dist/StatusLabel.svelte
CHANGED
|
@@ -7,11 +7,10 @@
|
|
|
7
7
|
|
|
8
8
|
let styles = $derived(
|
|
9
9
|
clsx({
|
|
10
|
-
'text-
|
|
11
|
-
'text-
|
|
12
|
-
'text-
|
|
13
|
-
'text-
|
|
14
|
-
'text-yellow-500': status === 'run'
|
|
10
|
+
'text-foreground-success': status === 'success',
|
|
11
|
+
'text-foreground-critical': status === 'failure',
|
|
12
|
+
'text-foreground-attention': ['run', 'alert'].includes(status),
|
|
13
|
+
'text-foreground-default-secondary': status === 'queued'
|
|
15
14
|
})
|
|
16
15
|
)
|
|
17
16
|
</script>
|
package/dist/StepIconList.svelte
CHANGED
|
@@ -9,31 +9,33 @@
|
|
|
9
9
|
let restIcons = $derived(icons.slice(maxItems, icons.length))
|
|
10
10
|
</script>
|
|
11
11
|
|
|
12
|
+
{#snippet separator()}
|
|
13
|
+
<div class="hidden sm:block h-px w-3 bg-border shrink-0"></div>
|
|
14
|
+
{/snippet}
|
|
15
|
+
|
|
12
16
|
<TooltipProvider>
|
|
13
17
|
<div class="flex flex-col space-y-2 sm:flex-row sm:space-y-0 items-center">
|
|
14
18
|
{#each mainIcons as icon, i (i)}
|
|
15
19
|
<Tooltip>
|
|
16
|
-
<TooltipTrigger class="
|
|
20
|
+
<TooltipTrigger class="shrink-0">
|
|
17
21
|
<div
|
|
18
|
-
class="p-1.5
|
|
22
|
+
class="p-1.5 rounded-md border border-border flex items-center space-x-1 bg-background text-icon"
|
|
19
23
|
>
|
|
20
|
-
<img src={icon.url} alt={icon.name} class="
|
|
24
|
+
<img src={icon.url} alt={icon.name} class="size-4" />
|
|
21
25
|
</div>
|
|
22
26
|
</TooltipTrigger>
|
|
23
27
|
<TooltipContent>{icon.name}</TooltipContent>
|
|
24
28
|
</Tooltip>
|
|
25
29
|
|
|
26
30
|
{#if i < mainIcons.length - 1}
|
|
27
|
-
|
|
31
|
+
{@render separator()}
|
|
28
32
|
{/if}
|
|
29
33
|
{/each}
|
|
30
34
|
{#if restIcons.length}
|
|
31
|
-
|
|
35
|
+
{@render separator()}
|
|
32
36
|
<Tooltip>
|
|
33
|
-
<TooltipTrigger class="
|
|
34
|
-
<div
|
|
35
|
-
class="flex items-center justify-center text-neutral-500 font-medium text-base h-7 w-7"
|
|
36
|
-
>
|
|
37
|
+
<TooltipTrigger class="shrink-0">
|
|
38
|
+
<div class="flex items-center justify-center text-icon font-medium text-base size-7">
|
|
37
39
|
+{restIcons.length}
|
|
38
40
|
</div>
|
|
39
41
|
</TooltipTrigger>
|
package/dist/TagBeta.svelte
CHANGED
|
@@ -1,23 +1,35 @@
|
|
|
1
|
-
<div class="
|
|
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>
|
|
1
|
+
<div class="flex gap-2 items-start">
|
|
11
2
|
<div
|
|
12
|
-
class="
|
|
13
|
-
style="border: 0.5px solid var(--white-60, rgba(255, 255, 255, 0.60));"
|
|
3
|
+
class="beta-tag flex flex-col gap-2 items-start overflow-hidden p-px rounded relative shrink-0"
|
|
14
4
|
>
|
|
15
|
-
|
|
5
|
+
<div class="border-[0.5px] border-white-60 rounded-[3px] relative shrink-0">
|
|
6
|
+
<div class="flex gap-2 items-start overflow-hidden px-1 py-px rounded-[inherit]">
|
|
7
|
+
<span class="font-medium text-xs leading-4 text-white whitespace-nowrap">Beta</span>
|
|
8
|
+
</div>
|
|
9
|
+
</div>
|
|
10
|
+
<div class="absolute h-5 left-0 right-0 top-0 pointer-events-none">
|
|
11
|
+
<svg
|
|
12
|
+
viewBox="0 0 37 20"
|
|
13
|
+
fill="none"
|
|
14
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
15
|
+
class="block max-w-none size-full"
|
|
16
|
+
>
|
|
17
|
+
<path
|
|
18
|
+
fill-rule="evenodd"
|
|
19
|
+
clip-rule="evenodd"
|
|
20
|
+
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"
|
|
21
|
+
fill="white"
|
|
22
|
+
fill-opacity="0.05"
|
|
23
|
+
/>
|
|
24
|
+
</svg>
|
|
25
|
+
</div>
|
|
16
26
|
</div>
|
|
17
27
|
</div>
|
|
18
28
|
|
|
19
29
|
<style>
|
|
20
30
|
.beta-tag {
|
|
21
|
-
background:
|
|
31
|
+
background-image:
|
|
32
|
+
linear-gradient(rgb(0, 114, 245) 0%, rgba(0, 77, 164, 0.4) 100%),
|
|
33
|
+
linear-gradient(90deg, rgb(0, 114, 245) 0%, rgb(0, 114, 245) 100%);
|
|
22
34
|
}
|
|
23
35
|
</style>
|