@stacksjs/defaults 0.70.358 → 0.70.363
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/ai/skills/stacks-browse/SKILL.md +7 -5
- package/ai/skills/stacks-browse/scripts/browse.ts +68 -9
- package/ai/skills/stacks-dashboard/SKILL.md +4 -0
- package/app/Actions/AI/AskAction.ts +12 -17
- package/app/Actions/AI/SummaryAction.ts +12 -17
- package/app/Actions/Dashboard/Models/ModelShowAction.ts +4 -1
- package/app/Actions/Dashboard/Models/model-write.ts +5 -0
- package/app/Actions/LogAction.ts +11 -11
- package/ide/vscode/package.json +1 -1
- package/package.json +1 -1
- package/resources/components/Buttons/Counter.stx +1 -1
- package/resources/components/Buttons/ToggleDark.stx +1 -1
- package/resources/components/Dashboard/App/RequestDetailsDialog.stx +42 -0
- package/resources/components/Dashboard/App/RequestsOverview.stx +1 -21
- package/resources/components/Dashboard/Auth/AccessTokenCreateDialog.stx +155 -0
- package/resources/components/Dashboard/Auth/AccessTokens.stx +41 -129
- package/resources/components/Dashboard/Ci/CiDashboard.stx +1 -157
- package/resources/components/Dashboard/Ci/CiRunHistoryDrawer.stx +127 -0
- package/resources/components/Dashboard/Commerce/CommerceCategoryDeleteDialog.stx +10 -8
- package/resources/components/Dashboard/Commerce/CommerceCategoryDetailsDialog.stx +22 -17
- package/resources/components/Dashboard/Commerce/CommerceCategoryDialog.stx +14 -13
- package/resources/components/Dashboard/Commerce/CommerceCouponDeleteDialog.stx +10 -7
- package/resources/components/Dashboard/Commerce/CommerceCouponDetailsDialog.stx +25 -19
- package/resources/components/Dashboard/Commerce/CommerceCouponDialog.stx +14 -11
- package/resources/components/Dashboard/Commerce/CommerceCustomerDeleteDialog.stx +10 -8
- package/resources/components/Dashboard/Commerce/CommerceCustomerDetailsDialog.stx +24 -16
- package/resources/components/Dashboard/Commerce/CommerceCustomerDialog.stx +14 -13
- package/resources/components/Dashboard/Commerce/CommerceGiftCardDeleteDialog.stx +10 -8
- package/resources/components/Dashboard/Commerce/CommerceGiftCardDetailsDialog.stx +16 -14
- package/resources/components/Dashboard/Commerce/CommerceGiftCardDialog.stx +17 -16
- package/resources/components/Dashboard/Commerce/CommerceManufacturerDeleteDialog.stx +14 -16
- package/resources/components/Dashboard/Commerce/CommerceManufacturerDialog.stx +17 -16
- package/resources/components/Dashboard/Commerce/CommerceOrderDeleteDialog.stx +10 -8
- package/resources/components/Dashboard/Commerce/CommerceOrderDetailsDialog.stx +15 -10
- package/resources/components/Dashboard/Commerce/CommerceOrderDialog.stx +14 -13
- package/resources/components/Dashboard/Commerce/CommercePosCheckoutDialog.stx +30 -25
- package/resources/components/Dashboard/Commerce/CommercePosReceiptDialog.stx +27 -20
- package/resources/components/Dashboard/Commerce/CommerceProductDeleteDialog.stx +14 -14
- package/resources/components/Dashboard/Commerce/CommerceProductDialog.stx +14 -13
- package/resources/components/Dashboard/Commerce/CommerceReviewDeleteDialog.stx +10 -18
- package/resources/components/Dashboard/Commerce/CommerceReviewEditDialog.stx +17 -16
- package/resources/components/Dashboard/Commerce/CommerceTaxDeleteDialog.stx +14 -14
- package/resources/components/Dashboard/Commerce/CommerceTaxDialog.stx +17 -16
- package/resources/components/Dashboard/Commerce/CommerceTaxesTable.stx +1 -1
- package/resources/components/Dashboard/Commerce/CommerceUnitDeleteDialog.stx +14 -17
- package/resources/components/Dashboard/Commerce/CommerceUnitDialog.stx +17 -16
- package/resources/components/Dashboard/Commerce/CommerceVariantDeleteDialog.stx +10 -8
- package/resources/components/Dashboard/Commerce/CommerceVariantDialog.stx +17 -16
- package/resources/components/Dashboard/Commerce/Delivery/DeliveryRouteDeleteDialog.stx +11 -15
- package/resources/components/Dashboard/Commerce/Delivery/DeliveryRouteDialog.stx +17 -16
- package/resources/components/Dashboard/Commerce/Delivery/DigitalDeliveryDeleteDialog.stx +11 -15
- package/resources/components/Dashboard/Commerce/Delivery/DigitalDeliveryDialog.stx +17 -16
- package/resources/components/Dashboard/Commerce/Delivery/DriverDeleteDialog.stx +11 -15
- package/resources/components/Dashboard/Commerce/Delivery/DriverDialog.stx +17 -16
- package/resources/components/Dashboard/Commerce/Delivery/LicenseKeyDeleteDialog.stx +11 -15
- package/resources/components/Dashboard/Commerce/Delivery/LicenseKeyDialog.stx +17 -16
- package/resources/components/Dashboard/Commerce/Delivery/ShippingMethodDeleteDialog.stx +11 -15
- package/resources/components/Dashboard/Commerce/Delivery/ShippingMethodDialog.stx +17 -16
- package/resources/components/Dashboard/Commerce/Delivery/ShippingRateDeleteDialog.stx +11 -15
- package/resources/components/Dashboard/Commerce/Delivery/ShippingRateDialog.stx +17 -16
- package/resources/components/Dashboard/Commerce/Delivery/ShippingZoneDeleteDialog.stx +11 -15
- package/resources/components/Dashboard/Commerce/Delivery/ShippingZoneDialog.stx +17 -16
- package/resources/components/Dashboard/Commerce/PaymentDetailsDialog.stx +16 -15
- package/resources/components/Dashboard/Commerce/PaymentRefundDialog.stx +16 -15
- package/resources/components/Dashboard/Commerce/PrintDeviceDeleteDialog.stx +10 -11
- package/resources/components/Dashboard/Commerce/PrintDeviceDetailsDialog.stx +16 -14
- package/resources/components/Dashboard/Commerce/PrintDeviceDialog.stx +17 -16
- package/resources/components/Dashboard/Commerce/PrintLogDeleteDialog.stx +10 -7
- package/resources/components/Dashboard/Commerce/PrintLogDetailsDialog.stx +13 -10
- package/resources/components/Dashboard/Commerce/ProductWaitlistDeleteDialog.stx +10 -18
- package/resources/components/Dashboard/Commerce/ProductWaitlistEntryDialog.stx +96 -105
- package/resources/components/Dashboard/Commerce/RestaurantWaitlistDeleteDialog.stx +10 -18
- package/resources/components/Dashboard/Commerce/RestaurantWaitlistEntryDialog.stx +92 -95
- package/resources/components/Dashboard/Content/AuthorEditorDialog.stx +94 -0
- package/resources/components/Dashboard/Content/AuthorsDashboard.stx +39 -31
- package/resources/components/Dashboard/Content/BlogDashboard.stx +87 -176
- package/resources/components/Dashboard/Content/BlogPostEditorDialog.stx +195 -0
- package/resources/components/Dashboard/Content/CommentsDashboard.stx +14 -4
- package/resources/components/Dashboard/Content/ContentTaxonomyDashboard.stx +40 -55
- package/resources/components/Dashboard/Content/CreateFolderDialog.stx +45 -0
- package/resources/components/Dashboard/Content/FileDetailsDrawer.stx +31 -0
- package/resources/components/Dashboard/Content/FileManagerDashboard.stx +47 -107
- package/resources/components/Dashboard/Content/FileUploadDialog.stx +89 -0
- package/resources/components/Dashboard/Content/PageEditorDialog.stx +93 -0
- package/resources/components/Dashboard/Content/PagesDashboard.stx +36 -26
- package/resources/components/Dashboard/Content/PostEditorDialog.stx +176 -0
- package/resources/components/Dashboard/Content/PostsDashboard.stx +40 -64
- package/resources/components/Dashboard/Content/SeoDashboard.stx +18 -84
- package/resources/components/Dashboard/Content/SeoEditorDialog.stx +108 -0
- package/resources/components/Dashboard/Content/TaxonomyEditorDialog.stx +106 -0
- package/resources/components/Dashboard/CreateRecordModal.stx +72 -83
- package/resources/components/Dashboard/Email/InboxMessageList.stx +1 -1
- package/resources/components/Dashboard/GlobalSearch.stx +3 -9
- package/resources/components/Dashboard/Infrastructure/CloudDetailsDialog.stx +2 -16
- package/resources/components/Dashboard/Infrastructure/DnsRecordDialog.stx +4 -16
- package/resources/components/Dashboard/Infrastructure/LogDetailsDialog.stx +4 -19
- package/resources/components/Dashboard/Infrastructure/MailboxDetailsDialog.stx +6 -16
- package/resources/components/Dashboard/Infrastructure/ServerInspectorDialog.stx +105 -0
- package/resources/components/Dashboard/Infrastructure/ServersDashboard.stx +5 -59
- package/resources/components/Dashboard/Jobs/JobHistory.stx +1 -11
- package/resources/components/Dashboard/Library/ComponentsDashboard.stx +11 -60
- package/resources/components/Dashboard/Library/FunctionsDashboard.stx +11 -15
- package/resources/components/Dashboard/Library/SourceScaffoldDialog.stx +95 -0
- package/resources/components/Dashboard/Management/AssignmentDrawer.stx +93 -0
- package/resources/components/Dashboard/Management/PermissionsDashboard.stx +47 -129
- package/resources/components/Dashboard/Marketing/CampaignDeleteDialog.stx +11 -12
- package/resources/components/Dashboard/Marketing/CampaignDeliveryDialog.stx +5 -8
- package/resources/components/Dashboard/Marketing/CampaignDialog.stx +17 -17
- package/resources/components/Dashboard/Marketing/MarketingListDeleteDialog.stx +15 -15
- package/resources/components/Dashboard/Marketing/MarketingListDialog.stx +17 -17
- package/resources/components/Dashboard/Marketing/MarketingListsTable.stx +1 -1
- package/resources/components/Dashboard/Marketing/SocialPostDeleteDialog.stx +11 -12
- package/resources/components/Dashboard/Marketing/SocialPostDialog.stx +17 -16
- package/resources/components/Dashboard/Models/EditRecordModal.stx +81 -0
- package/resources/components/Dashboard/Models/ModelRecordActions.stx +30 -0
- package/resources/components/Dashboard/Models/ModelRecordsDashboard.stx +42 -94
- package/resources/components/Dashboard/Navbar.stx +5 -5
- package/resources/components/Dashboard/Notifications/NotificationDeliveryDialog.stx +40 -60
- package/resources/components/Dashboard/UI/Button.stx +4 -0
- package/resources/components/Dashboard/UI/ConfirmDialog.stx +55 -53
- package/resources/components/Dashboard/UI/Drawer.stx +114 -0
- package/resources/components/Dashboard/UI/Modal.stx +32 -21
- package/resources/components/Docs/Demo/ComboboxDemo.stx +4 -5
- package/resources/components/Docs/Demo/DropdownDemo.stx +12 -5
- package/resources/components/Docs/Demo/ListboxDemo.stx +14 -6
- package/resources/components/Docs/Demo/PopoverDemo.stx +10 -5
- package/resources/components/Docs/Demo/RadioGroupDemo.stx +14 -6
- package/resources/components/Docs/Demo/StepperDemo.stx +4 -5
- package/resources/components/Docs/TeamMember.stx +16 -9
- package/resources/components/Forum/ForumReplyForm.stx +7 -7
- package/resources/components/Forum/ForumSidebar.stx +10 -6
- package/resources/components/Marketing/Faqs.stx +5 -5
- package/resources/components/Marketing/Feature.stx +11 -6
- package/resources/components/Marketing/Layout.stx +12 -8
- package/resources/components/Marketing/Pricing.stx +11 -5
- package/resources/components/Marketing/PrimaryFeatures.stx +4 -5
- package/resources/components/Marketing/PrimaryFeatures2.stx +6 -5
- package/resources/components/Marketing/SecondaryFeatures.stx +10 -5
- package/resources/components/Marketing/Testimonials.stx +8 -5
- package/resources/views/index.stx +4 -4
- package/views/system-tray/index.stx +1 -1
|
@@ -8,6 +8,9 @@ const confirmLabel = useReactiveProp('confirmLabel', 'Delete')
|
|
|
8
8
|
const cancelLabel = useReactiveProp('cancelLabel', 'Cancel')
|
|
9
9
|
const variant = useReactiveProp('variant', 'danger' as ConfirmVariant)
|
|
10
10
|
const busy = useReactiveProp('busy', false)
|
|
11
|
+
const disabled = useReactiveProp('disabled', false)
|
|
12
|
+
const warning = useReactiveProp('warning', '')
|
|
13
|
+
const error = useReactiveProp('error', '')
|
|
11
14
|
const emit = defineEmits()
|
|
12
15
|
|
|
13
16
|
function close(): void {
|
|
@@ -16,7 +19,7 @@ function close(): void {
|
|
|
16
19
|
}
|
|
17
20
|
|
|
18
21
|
function confirm(): void {
|
|
19
|
-
if (!busy())
|
|
22
|
+
if (!busy() && !disabled())
|
|
20
23
|
emit('confirm')
|
|
21
24
|
}
|
|
22
25
|
|
|
@@ -32,57 +35,56 @@ function iconName(): string {
|
|
|
32
35
|
|
|
33
36
|
</script>
|
|
34
37
|
|
|
35
|
-
<
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
</div>
|
|
50
|
-
<div class="flex-1 min-w-0">
|
|
51
|
-
<h3 class="font-semibold text-lg text-neutral-900 dark:text-white">
|
|
52
|
-
{{ title() }}
|
|
53
|
-
</h3>
|
|
54
|
-
<p class="mt-1 text-neutral-500 text-sm dark:text-neutral-400">
|
|
55
|
-
{{ description() }}
|
|
56
|
-
</p>
|
|
57
|
-
</div>
|
|
58
|
-
</div>
|
|
38
|
+
<Modal
|
|
39
|
+
:isOpen="open()"
|
|
40
|
+
:title="title()"
|
|
41
|
+
:description="description()"
|
|
42
|
+
:closable="!busy()"
|
|
43
|
+
role="alertdialog"
|
|
44
|
+
size="sm"
|
|
45
|
+
@close="close"
|
|
46
|
+
>
|
|
47
|
+
<template #header-leading>
|
|
48
|
+
<div class="shrink-0 p-2.5 rounded-lg" :class="iconClass()">
|
|
49
|
+
<span class="block h-5 w-5" :class="iconName()"></span>
|
|
50
|
+
</div>
|
|
51
|
+
</template>
|
|
59
52
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
</
|
|
85
|
-
|
|
53
|
+
<template #footer>
|
|
54
|
+
<div class="w-full">
|
|
55
|
+
<div :if="warning()" role="note" class="mb-4 p-3 text-amber-800 text-sm dark:text-amber-200 bg-amber-50 dark:bg-amber-950/30 border border-amber-200 rounded-lg dark:border-amber-900">
|
|
56
|
+
{{ warning() }}
|
|
57
|
+
</div>
|
|
58
|
+
<div :if="error()" role="alert" class="mb-4 p-3 text-red-700 text-sm dark:text-red-300 bg-red-50 dark:bg-red-950/30 border border-red-200 rounded-lg dark:border-red-900">
|
|
59
|
+
{{ error() }}
|
|
60
|
+
</div>
|
|
61
|
+
<div class="flex gap-2 items-center justify-end">
|
|
62
|
+
<Button
|
|
63
|
+
variant="secondary"
|
|
64
|
+
:disabled="busy()"
|
|
65
|
+
@click="close"
|
|
66
|
+
>
|
|
67
|
+
{{ cancelLabel() }}
|
|
68
|
+
</Button>
|
|
69
|
+
<Button
|
|
70
|
+
:if="variant() === 'warning'"
|
|
71
|
+
variant="warning"
|
|
72
|
+
:loading="busy()"
|
|
73
|
+
:disabled="disabled()"
|
|
74
|
+
@click="confirm"
|
|
75
|
+
>
|
|
76
|
+
{{ confirmLabel() }}
|
|
77
|
+
</Button>
|
|
78
|
+
<Button
|
|
79
|
+
:if="variant() !== 'warning'"
|
|
80
|
+
variant="danger"
|
|
81
|
+
:loading="busy()"
|
|
82
|
+
:disabled="disabled()"
|
|
83
|
+
@click="confirm"
|
|
84
|
+
>
|
|
85
|
+
{{ confirmLabel() }}
|
|
86
|
+
</Button>
|
|
87
|
+
</div>
|
|
86
88
|
</div>
|
|
87
|
-
</
|
|
88
|
-
</
|
|
89
|
+
</template>
|
|
90
|
+
</Modal>
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
<script server>
|
|
2
|
+
interface DrawerProps {
|
|
3
|
+
isOpen?: boolean
|
|
4
|
+
title?: string
|
|
5
|
+
description?: string
|
|
6
|
+
size?: 'sm' | 'md' | 'lg'
|
|
7
|
+
closable?: boolean
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const { isOpen = false, title = '', description = '', size = 'md', closable = true } = defineProps<DrawerProps>()
|
|
11
|
+
|
|
12
|
+
const sizeClasses = {
|
|
13
|
+
sm: 'max-w-sm',
|
|
14
|
+
md: 'max-w-lg',
|
|
15
|
+
lg: 'max-w-2xl',
|
|
16
|
+
}
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<script client>
|
|
20
|
+
const open = useReactiveProp('isOpen', false)
|
|
21
|
+
const liveClosable = useReactiveProp('closable', true)
|
|
22
|
+
const liveTitle = useReactiveProp('title', '')
|
|
23
|
+
const liveDescription = useReactiveProp('description', '')
|
|
24
|
+
const dialog = useRef<HTMLDialogElement>('dashboardDrawerDialog')
|
|
25
|
+
const activeElement = useActiveElement()
|
|
26
|
+
const scrollLocked = useScrollLock()
|
|
27
|
+
const emit = defineEmits()
|
|
28
|
+
let restoreFocus: HTMLElement | null = null
|
|
29
|
+
|
|
30
|
+
function close(): void {
|
|
31
|
+
if (liveClosable())
|
|
32
|
+
emit('close')
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function handleCancel(event: Event): void {
|
|
36
|
+
event.preventDefault()
|
|
37
|
+
close()
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function handleBackdropClick(event: MouseEvent): void {
|
|
41
|
+
if (event.target === event.currentTarget)
|
|
42
|
+
close()
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
effect(() => {
|
|
46
|
+
const isOpen = open()
|
|
47
|
+
scrollLocked.value = isOpen
|
|
48
|
+
|
|
49
|
+
if (isOpen) {
|
|
50
|
+
const focused = peek(() => activeElement.value)
|
|
51
|
+
if (focused instanceof HTMLElement)
|
|
52
|
+
restoreFocus = focused
|
|
53
|
+
void nextTick(() => {
|
|
54
|
+
const element = dialog.current
|
|
55
|
+
if (!element)
|
|
56
|
+
return
|
|
57
|
+
if (!element.open)
|
|
58
|
+
element.showModal()
|
|
59
|
+
element.focus()
|
|
60
|
+
})
|
|
61
|
+
return
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
if (dialog.current?.open)
|
|
65
|
+
dialog.current.close()
|
|
66
|
+
const target = restoreFocus
|
|
67
|
+
restoreFocus = null
|
|
68
|
+
if (target)
|
|
69
|
+
void nextTick(() => target.focus())
|
|
70
|
+
})
|
|
71
|
+
</script>
|
|
72
|
+
|
|
73
|
+
<dialog
|
|
74
|
+
:if="open()"
|
|
75
|
+
ref="dashboardDrawerDialog"
|
|
76
|
+
role="dialog"
|
|
77
|
+
aria-modal="true"
|
|
78
|
+
:aria-label="liveTitle() || 'Drawer'"
|
|
79
|
+
class="fixed inset-0 z-[55] m-0 p-0 h-dvh max-h-none max-w-none w-screen bg-transparent dashboard-drawer-dialog dashboard-modal-layer"
|
|
80
|
+
@cancel="handleCancel"
|
|
81
|
+
>
|
|
82
|
+
<div class="flex justify-end min-h-full" @click="handleBackdropClick">
|
|
83
|
+
<section class="flex relative flex-col h-dvh w-full bg-white dark:bg-neutral-950 border-neutral-200 border-l dark:border-neutral-800 shadow-2xl {{ sizeClasses[size] }}" @click.stop>
|
|
84
|
+
<header class="flex gap-4 items-start px-5 py-4 border-b border-neutral-200 dark:border-neutral-800">
|
|
85
|
+
<slot name="header-leading" />
|
|
86
|
+
<div class="flex-1 min-w-0">
|
|
87
|
+
<h2 :if="liveTitle()" class="font-semibold text-lg text-neutral-900 truncate dark:text-white">{{ liveTitle() }}</h2>
|
|
88
|
+
<p :if="liveDescription()" class="mt-1 text-neutral-500 text-sm dark:text-neutral-400">{{ liveDescription() }}</p>
|
|
89
|
+
</div>
|
|
90
|
+
<slot name="header-trailing" />
|
|
91
|
+
<Button :if="liveClosable()" variant="ghost" size="sm" iconOnly ariaLabel="Close drawer" @click="close">
|
|
92
|
+
<span aria-hidden="true" class="h-5 w-5 i-hugeicons-cancel-01"></span>
|
|
93
|
+
</Button>
|
|
94
|
+
</header>
|
|
95
|
+
|
|
96
|
+
<div class="overflow-y-auto flex-1 min-h-0">
|
|
97
|
+
<slot />
|
|
98
|
+
</div>
|
|
99
|
+
|
|
100
|
+
@if($slots.footer)
|
|
101
|
+
<footer class="px-5 py-4 border-neutral-200 border-t dark:border-neutral-800">
|
|
102
|
+
<slot name="footer" />
|
|
103
|
+
</footer>
|
|
104
|
+
@endif
|
|
105
|
+
</section>
|
|
106
|
+
</div>
|
|
107
|
+
</dialog>
|
|
108
|
+
|
|
109
|
+
<style>
|
|
110
|
+
.dashboard-drawer-dialog::backdrop {
|
|
111
|
+
background: rgb(0 0 0 / 45%);
|
|
112
|
+
backdrop-filter: blur(2px);
|
|
113
|
+
}
|
|
114
|
+
</style>
|
|
@@ -5,9 +5,10 @@ interface ModalProps {
|
|
|
5
5
|
description?: string
|
|
6
6
|
size?: 'sm' | 'md' | 'lg' | 'xl' | 'full'
|
|
7
7
|
closable?: boolean
|
|
8
|
+
role?: 'dialog' | 'alertdialog'
|
|
8
9
|
}
|
|
9
10
|
|
|
10
|
-
const { isOpen = false, title = '', description = '', size = 'md', closable = true } = defineProps<ModalProps>()
|
|
11
|
+
const { isOpen = false, title = '', description = '', size = 'md', closable = true, role = 'dialog' } = defineProps<ModalProps>()
|
|
11
12
|
|
|
12
13
|
const sizeClasses = {
|
|
13
14
|
sm: 'max-w-sm',
|
|
@@ -22,6 +23,7 @@ const open = useReactiveProp('isOpen', false)
|
|
|
22
23
|
const liveClosable = useReactiveProp('closable', true)
|
|
23
24
|
const liveTitle = useReactiveProp('title', '')
|
|
24
25
|
const liveDescription = useReactiveProp('description', '')
|
|
26
|
+
const liveRole = useReactiveProp('role', 'dialog')
|
|
25
27
|
const dialog = useRef<HTMLDialogElement>('dashboardModalDialog')
|
|
26
28
|
const activeElement = useActiveElement()
|
|
27
29
|
const scrollLocked = useScrollLock()
|
|
@@ -56,7 +58,11 @@ effect(() => {
|
|
|
56
58
|
if (!element) return
|
|
57
59
|
if (!element.open)
|
|
58
60
|
element.showModal()
|
|
59
|
-
element.
|
|
61
|
+
const autofocusTarget = element.querySelector<HTMLElement>('[autofocus]:not([disabled])')
|
|
62
|
+
if (autofocusTarget)
|
|
63
|
+
autofocusTarget.focus()
|
|
64
|
+
else
|
|
65
|
+
element.focus()
|
|
60
66
|
})
|
|
61
67
|
return
|
|
62
68
|
}
|
|
@@ -72,10 +78,10 @@ effect(() => {
|
|
|
72
78
|
<dialog
|
|
73
79
|
:if="open()"
|
|
74
80
|
ref="dashboardModalDialog"
|
|
75
|
-
role="
|
|
81
|
+
:role="liveRole()"
|
|
76
82
|
aria-modal="true"
|
|
77
83
|
:aria-label="liveTitle() || 'Dialog'"
|
|
78
|
-
class="fixed inset-0 m-0 p-0 h-dvh max-h-none
|
|
84
|
+
class="fixed inset-0 overflow-y-auto z-[55] m-0 p-0 h-dvh max-h-none max-w-none w-screen bg-transparent dashboard-modal-dialog dashboard-modal-layer"
|
|
79
85
|
@cancel="handleCancel"
|
|
80
86
|
>
|
|
81
87
|
<!-- Modal container -->
|
|
@@ -84,8 +90,9 @@ effect(() => {
|
|
|
84
90
|
class="relative w-full rounded-xl bg-white dark:bg-neutral-900 shadow-2xl {{ sizeClasses[size] }}"
|
|
85
91
|
>
|
|
86
92
|
<!-- Header -->
|
|
87
|
-
|
|
88
|
-
<div class="flex gap-
|
|
93
|
+
<div :if="liveTitle() || liveClosable()" class="flex gap-4 items-start justify-between p-6 border-b border-neutral-200 dark:border-neutral-700">
|
|
94
|
+
<div class="flex gap-3 items-start min-w-0">
|
|
95
|
+
<slot name="header-leading" />
|
|
89
96
|
<div class="min-w-0">
|
|
90
97
|
<h3 :if="liveTitle()" class="font-semibold text-lg text-neutral-900 dark:text-white">
|
|
91
98
|
{{ liveTitle() }}
|
|
@@ -94,25 +101,29 @@ effect(() => {
|
|
|
94
101
|
{{ liveDescription() }}
|
|
95
102
|
</p>
|
|
96
103
|
</div>
|
|
104
|
+
</div>
|
|
97
105
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
106
|
+
<div class="flex flex-shrink-0 gap-2 items-center">
|
|
107
|
+
<slot name="header-trailing" />
|
|
108
|
+
<Button
|
|
109
|
+
:if="liveClosable()"
|
|
110
|
+
variant="ghost"
|
|
111
|
+
size="sm"
|
|
112
|
+
iconOnly
|
|
113
|
+
ariaLabel="Close modal"
|
|
114
|
+
@click="closeModal"
|
|
115
|
+
>
|
|
116
|
+
<div class="h-5 w-5 i-hugeicons-cancel-01"></div>
|
|
117
|
+
</Button>
|
|
109
118
|
</div>
|
|
110
|
-
|
|
119
|
+
</div>
|
|
111
120
|
|
|
112
121
|
<!-- Body -->
|
|
113
|
-
|
|
114
|
-
<
|
|
115
|
-
|
|
122
|
+
@if($slots.default)
|
|
123
|
+
<div class="p-6">
|
|
124
|
+
<slot />
|
|
125
|
+
</div>
|
|
126
|
+
@endif
|
|
116
127
|
|
|
117
128
|
@if($slots.footer)
|
|
118
129
|
<div class="flex items-center justify-end px-6 py-4 border-neutral-200 border-t dark:border-neutral-700">
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
interface ComboboxDemoProps {
|
|
3
|
-
listItems?: string
|
|
3
|
+
listItems?: Array<{ id: number, name: string }>
|
|
4
4
|
selected?: any
|
|
5
5
|
query?: string
|
|
6
6
|
isOpen?: boolean
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
const { listItems = [
|
|
10
|
-
|
|
11
|
-
{ id: 1, name: 'Chris Breuer' },
|
|
9
|
+
const { listItems = [
|
|
10
|
+
{ id: 1, name: 'Chris Breuer' },
|
|
12
11
|
{ id: 2, name: 'Avery Hill' },
|
|
13
12
|
{ id: 3, name: 'Glenn Michael' },
|
|
14
13
|
{ id: 4, name: 'Michael Vincent' },
|
|
15
14
|
{ id: 5, name: 'Blake Ayer' },
|
|
16
|
-
]
|
|
15
|
+
], selected = null, query = '', isOpen = false } = defineProps<ComboboxDemoProps>()
|
|
17
16
|
function filterItems(items, query) {
|
|
18
17
|
if (query === '') return items
|
|
19
18
|
return items.filter(item => item.name.toLowerCase().includes(query.toLowerCase()))
|
|
@@ -1,19 +1,26 @@
|
|
|
1
1
|
<script>
|
|
2
|
+
interface DropdownMenuItem {
|
|
3
|
+
icon?: string
|
|
4
|
+
label?: string
|
|
5
|
+
variant?: string
|
|
6
|
+
/** A separator rather than a real entry — getMenuSections splits on these. */
|
|
7
|
+
divider?: boolean
|
|
8
|
+
}
|
|
9
|
+
|
|
2
10
|
interface DropdownDemoProps {
|
|
3
|
-
menuItems?:
|
|
11
|
+
menuItems?: DropdownMenuItem[]
|
|
4
12
|
isOpen?: boolean
|
|
5
13
|
}
|
|
6
14
|
|
|
7
|
-
const { menuItems = [
|
|
8
|
-
|
|
9
|
-
{ icon: 'i-hugeicons-pencil-20-solid', label: 'Edit' },
|
|
15
|
+
const { menuItems = [
|
|
16
|
+
{ icon: 'i-hugeicons-pencil-20-solid', label: 'Edit' },
|
|
10
17
|
{ icon: 'i-hugeicons-document-duplicate-20-solid', label: 'Duplicate' },
|
|
11
18
|
{ divider: true },
|
|
12
19
|
{ icon: 'i-hugeicons-archive-box-20-solid', label: 'Archive' },
|
|
13
20
|
{ icon: 'i-hugeicons-arrow-path-20-solid', label: 'Move' },
|
|
14
21
|
{ divider: true },
|
|
15
22
|
{ icon: 'i-hugeicons-trash-20-solid', label: 'Delete', variant: 'danger' },
|
|
16
|
-
]
|
|
23
|
+
], isOpen = false } = defineProps<DropdownDemoProps>()
|
|
17
24
|
function getMenuSections(items) {
|
|
18
25
|
const sections = []
|
|
19
26
|
let currentSection = []
|
|
@@ -1,18 +1,26 @@
|
|
|
1
1
|
<script>
|
|
2
|
+
interface Person {
|
|
3
|
+
id: number
|
|
4
|
+
name: string
|
|
5
|
+
unavailable: boolean
|
|
6
|
+
}
|
|
7
|
+
|
|
2
8
|
interface ListboxDemoProps {
|
|
3
|
-
people?:
|
|
4
|
-
selectedPerson?:
|
|
9
|
+
people?: Person[]
|
|
10
|
+
selectedPerson?: Person
|
|
5
11
|
isOpen?: boolean
|
|
6
12
|
}
|
|
7
13
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
14
|
+
// `selectedPerson` defaults off `people`, which is legal here because
|
|
15
|
+
// destructuring binds left to right — `people` is in scope by the time the
|
|
16
|
+
// default for `selectedPerson` is evaluated.
|
|
17
|
+
const { people = [
|
|
18
|
+
{ id: 1, name: 'Chris Breuer', unavailable: false },
|
|
11
19
|
{ id: 2, name: 'Avery Hill', unavailable: false },
|
|
12
20
|
{ id: 3, name: 'Glenn Michael', unavailable: false },
|
|
13
21
|
{ id: 4, name: 'Michael Vincent', unavailable: true },
|
|
14
22
|
{ id: 5, name: 'Blake Ayer', unavailable: false },
|
|
15
|
-
]
|
|
23
|
+
], selectedPerson = people[0], isOpen = false } = defineProps<ListboxDemoProps>()
|
|
16
24
|
</script>
|
|
17
25
|
<div class="max-w-4xl">
|
|
18
26
|
<DocsPlayground>
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
interface PopoverDemoProps {
|
|
3
|
-
solutions?:
|
|
3
|
+
solutions?: Array<{
|
|
4
|
+
name: string
|
|
5
|
+
description: string
|
|
6
|
+
href: string
|
|
7
|
+
iconBg: string
|
|
8
|
+
iconStroke: string
|
|
9
|
+
}>
|
|
4
10
|
isOpen?: boolean
|
|
5
11
|
}
|
|
6
12
|
|
|
7
|
-
const { solutions = [
|
|
8
|
-
|
|
9
|
-
{
|
|
13
|
+
const { solutions = [
|
|
14
|
+
{
|
|
10
15
|
name: 'Insights',
|
|
11
16
|
description: 'Measure actions your users take',
|
|
12
17
|
href: '##',
|
|
@@ -27,7 +32,7 @@ const { solutions = [, isOpen = false } = defineProps<PopoverDemoProps>()
|
|
|
27
32
|
iconBg: '#FFEDD5',
|
|
28
33
|
iconStroke: '#FB923C',
|
|
29
34
|
},
|
|
30
|
-
]
|
|
35
|
+
], isOpen = false } = defineProps<PopoverDemoProps>()
|
|
31
36
|
</script>
|
|
32
37
|
<div class="max-w-4xl">
|
|
33
38
|
<DocsPlayground>
|
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
interface
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
interface Plan {
|
|
3
|
+
name: string
|
|
4
|
+
ram: string
|
|
5
|
+
cpus: string
|
|
6
|
+
disk: string
|
|
5
7
|
}
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
interface RadioGroupDemoProps {
|
|
10
|
+
plans?: Plan[]
|
|
11
|
+
selected?: Plan
|
|
12
|
+
}
|
|
8
13
|
|
|
9
|
-
|
|
14
|
+
// `selected` defaults off `plans`; destructuring binds left to right, so `plans`
|
|
15
|
+
// is already in scope when this default is evaluated.
|
|
16
|
+
const { plans = [
|
|
17
|
+
{ name: 'Startup', ram: '12GB', cpus: '6 CPUs', disk: '160 GB SSD disk' },
|
|
10
18
|
{ name: 'Business', ram: '16GB', cpus: '8 CPUs', disk: '512 GB SSD disk' },
|
|
11
19
|
{ name: 'Enterprise', ram: '32GB', cpus: '12 CPUs', disk: '1024 GB SSD disk' },
|
|
12
|
-
]
|
|
20
|
+
], selected = plans[0] } = defineProps<RadioGroupDemoProps>()
|
|
13
21
|
</script>
|
|
14
22
|
<div class="max-w-4xl">
|
|
15
23
|
<DocsPlayground>
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
interface StepperDemoProps {
|
|
3
3
|
currentStep?: number
|
|
4
|
-
steps?: string
|
|
4
|
+
steps?: Array<{ title: string, description: string, icon: string }>
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
const { currentStep = 0, steps = [
|
|
8
|
-
|
|
9
|
-
{ title: 'Step 1', description: 'First step', icon: 'i-heroicons-check' },
|
|
7
|
+
const { currentStep = 0, steps = [
|
|
8
|
+
{ title: 'Step 1', description: 'First step', icon: 'i-heroicons-check' },
|
|
10
9
|
{ title: 'Step 2', description: 'Second step', icon: 'i-heroicons-check' },
|
|
11
10
|
{ title: 'Step 3', description: 'Third step', icon: 'i-heroicons-check' },
|
|
12
|
-
]
|
|
11
|
+
] } = defineProps<StepperDemoProps>()
|
|
13
12
|
|
|
14
13
|
function getStepContent(step) {
|
|
15
14
|
switch (step) {
|
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
interface TeamMemberProps {
|
|
3
|
-
data?:
|
|
3
|
+
data?: {
|
|
4
|
+
name: string
|
|
5
|
+
avatar: string
|
|
6
|
+
description: string
|
|
7
|
+
github: string
|
|
8
|
+
sponsors: boolean
|
|
9
|
+
functions: string[]
|
|
10
|
+
packages: string[]
|
|
11
|
+
}
|
|
4
12
|
}
|
|
5
13
|
|
|
6
|
-
const { data = {
|
|
7
|
-
|
|
8
|
-
name: '',
|
|
14
|
+
const { data = {
|
|
15
|
+
name: '',
|
|
9
16
|
avatar: '',
|
|
10
17
|
description: '',
|
|
11
18
|
github: '',
|
|
12
19
|
sponsors: false,
|
|
13
20
|
functions: [],
|
|
14
|
-
packages: []
|
|
15
|
-
}
|
|
21
|
+
packages: [],
|
|
22
|
+
} } = defineProps<TeamMemberProps>()
|
|
16
23
|
</script>
|
|
17
24
|
<div class="text-center">
|
|
18
25
|
<img
|
|
@@ -45,7 +52,7 @@ name: '',
|
|
|
45
52
|
href="https://github.com/sponsors/{{ data.github }}"
|
|
46
53
|
target="_blank"
|
|
47
54
|
rel="noopener noreferrer"
|
|
48
|
-
title="Sponsor {{ data.name }}"
|
|
55
|
+
x-tooltip="Sponsor {{ data.name }}" title="Sponsor {{ data.name }}"
|
|
49
56
|
aria-label="Sponsor {{ data.name }}"
|
|
50
57
|
></a>
|
|
51
58
|
@endif
|
|
@@ -54,7 +61,7 @@ name: '',
|
|
|
54
61
|
@if(data.functions.length > 0 || data.packages.length > 0)
|
|
55
62
|
<div class="grid gap-x-1 gap-y-2 grid-cols-[20px_1fr] items-start mb-2 mx-auto p-3 w-5/6 bg-gray-100 rounded">
|
|
56
63
|
@if(data.functions.length > 0)
|
|
57
|
-
<div class="ma op50 i-carbon:function-math" title="Functions"></div>
|
|
64
|
+
<div class="ma op50 i-carbon:function-math" x-tooltip="Functions" title="Functions"></div>
|
|
58
65
|
<div class="flex flex-row flex-wrap gap-2 text-left text-sm">
|
|
59
66
|
@foreach(data.functions as func)
|
|
60
67
|
<a href="/{{ func }}" target="_blank">
|
|
@@ -65,7 +72,7 @@ name: '',
|
|
|
65
72
|
@endif
|
|
66
73
|
|
|
67
74
|
@if(data.packages.length > 0)
|
|
68
|
-
<div class="i-carbon-cube ma op50" title="Packages"></div>
|
|
75
|
+
<div class="i-carbon-cube ma op50" x-tooltip="Packages" title="Packages"></div>
|
|
69
76
|
<div class="flex flex-row flex-wrap gap-2 text-left text-sm">
|
|
70
77
|
@foreach(data.packages as pkg)
|
|
71
78
|
<a href="/add-ons">
|
|
@@ -18,21 +18,21 @@ function canSubmit(content) {
|
|
|
18
18
|
<div class="p-4">
|
|
19
19
|
<div class="mb-4">
|
|
20
20
|
<div class="flex gap-2 mb-2">
|
|
21
|
-
<button class="px-2 py-1 text-sm hover:bg-gray-100 border rounded" title="Bold" data-action="format" data-format="bold">B</button>
|
|
22
|
-
<button class="px-2 py-1 text-sm hover:bg-gray-100 border rounded" title="Italic" data-action="format" data-format="italic">I</button>
|
|
23
|
-
<button class="px-2 py-1 text-sm hover:bg-gray-100 border rounded" title="Link" data-action="format" data-format="link">
|
|
21
|
+
<button class="px-2 py-1 text-sm hover:bg-gray-100 border rounded" x-tooltip="Bold" title="Bold" data-action="format" data-format="bold">B</button>
|
|
22
|
+
<button class="px-2 py-1 text-sm hover:bg-gray-100 border rounded" x-tooltip="Italic" title="Italic" data-action="format" data-format="italic">I</button>
|
|
23
|
+
<button class="px-2 py-1 text-sm hover:bg-gray-100 border rounded" x-tooltip="Link" title="Link" data-action="format" data-format="link">
|
|
24
24
|
<span class="i-hugeicons-link"></span>
|
|
25
25
|
</button>
|
|
26
|
-
<button class="px-2 py-1 text-sm hover:bg-gray-100 border rounded" title="Code" data-action="format" data-format="code">
|
|
26
|
+
<button class="px-2 py-1 text-sm hover:bg-gray-100 border rounded" x-tooltip="Code" title="Code" data-action="format" data-format="code">
|
|
27
27
|
<span class="i-hugeicons-code"></span>
|
|
28
28
|
</button>
|
|
29
|
-
<button class="px-2 py-1 text-sm hover:bg-gray-100 border rounded" title="Image" data-action="format" data-format="image">
|
|
29
|
+
<button class="px-2 py-1 text-sm hover:bg-gray-100 border rounded" x-tooltip="Image" title="Image" data-action="format" data-format="image">
|
|
30
30
|
<span class="i-hugeicons-image"></span>
|
|
31
31
|
</button>
|
|
32
|
-
<button class="px-2 py-1 text-sm hover:bg-gray-100 border rounded" title="Quote" data-action="format" data-format="quote">
|
|
32
|
+
<button class="px-2 py-1 text-sm hover:bg-gray-100 border rounded" x-tooltip="Quote" title="Quote" data-action="format" data-format="quote">
|
|
33
33
|
<span class="i-hugeicons-quote"></span>
|
|
34
34
|
</button>
|
|
35
|
-
<button class="px-2 py-1 text-sm hover:bg-gray-100 border rounded" title="List" data-action="format" data-format="list">
|
|
35
|
+
<button class="px-2 py-1 text-sm hover:bg-gray-100 border rounded" x-tooltip="List" title="List" data-action="format" data-format="list">
|
|
36
36
|
<span class="i-hugeicons-list"></span>
|
|
37
37
|
</button>
|
|
38
38
|
</div>
|
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
interface ForumSidebarProps {
|
|
3
|
-
stats?:
|
|
3
|
+
stats?: {
|
|
4
|
+
topics: number
|
|
5
|
+
posts: number
|
|
6
|
+
members: number
|
|
7
|
+
newestMember: string
|
|
8
|
+
}
|
|
4
9
|
popularTopics?: any[]
|
|
5
10
|
onlineUsers?: any[]
|
|
6
11
|
}
|
|
7
12
|
|
|
8
|
-
const { stats = {
|
|
9
|
-
|
|
10
|
-
topics: 0,
|
|
13
|
+
const { stats = {
|
|
14
|
+
topics: 0,
|
|
11
15
|
posts: 0,
|
|
12
16
|
members: 0,
|
|
13
|
-
newestMember: ''
|
|
14
|
-
}
|
|
17
|
+
newestMember: '',
|
|
18
|
+
}, popularTopics = [], onlineUsers = [] } = defineProps<ForumSidebarProps>()
|
|
15
19
|
</script>
|
|
16
20
|
<div class="space-y-6">
|
|
17
21
|
<!-- Search -->
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
interface FaqsProps {
|
|
3
3
|
backgroundImage?: string
|
|
4
|
-
|
|
4
|
+
/** One inner array per rendered column. */
|
|
5
|
+
faqs?: Array<Array<{ question: string, answer: string }>>
|
|
5
6
|
}
|
|
6
7
|
|
|
7
|
-
const { backgroundImage = '/images/background-faqs.jpg', faqs = [
|
|
8
|
-
|
|
9
|
-
[
|
|
8
|
+
const { backgroundImage = '/images/background-faqs.jpg', faqs = [
|
|
9
|
+
[
|
|
10
10
|
{
|
|
11
11
|
question: 'What is the goal of the Stacks framework?',
|
|
12
12
|
answer: 'The goal of the Stacks framework is to help you create and maintain frontends, backends, and clouds—without having to worry about the boilerplate. It is a rapid development framework, meeting all your full stack needs.',
|
|
@@ -48,7 +48,7 @@ const { backgroundImage = '/images/background-faqs.jpg', faqs = [ } = defineProp
|
|
|
48
48
|
answer: 'The roadmap for Stacks includes first-party supported stacks like Table, Calendar, Command Palette, Date Picker, File Manager, Image, Video, Audio, Identity, Digital Ownership, Payments, and Governance. More information can be found in the detailed roadmap.',
|
|
49
49
|
},
|
|
50
50
|
],
|
|
51
|
-
]
|
|
51
|
+
] } = defineProps<FaqsProps>()
|
|
52
52
|
</script>
|
|
53
53
|
<section
|
|
54
54
|
id="faq"
|