@stacksjs/defaults 0.75.612 → 0.75.614

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.
Files changed (132) hide show
  1. package/ai/skills/stacks-actions/SKILL.md +209 -1
  2. package/ai/skills/stacks-api/SKILL.md +1 -1
  3. package/ai/skills/stacks-buddy/SKILL.md +1 -1
  4. package/ai/skills/stacks-dashboard/SKILL.md +120 -9
  5. package/ai/skills/stacks-database/SKILL.md +4 -2
  6. package/ai/skills/stacks-email/SKILL.md +15 -0
  7. package/ai/skills/stacks-middleware/SKILL.md +4 -1
  8. package/ai/skills/stacks-native/CAPABILITIES.md +1 -1
  9. package/ai/skills/stacks-native/CATALOG.md +12 -12
  10. package/ai/skills/stacks-validation/SKILL.md +7 -0
  11. package/app/Actions/Dashboard/Models/ModelDestroyAction.ts +4 -47
  12. package/app/Actions/Dashboard/Models/ModelSaveAction.ts +257 -0
  13. package/app/Actions/Dashboard/Models/ModelStoreAction.ts +4 -31
  14. package/app/Actions/Dashboard/Models/ModelUpdateAction.ts +5 -61
  15. package/app/Actions/Dashboard/Models/model-related.ts +2 -3
  16. package/app/Actions/Dashboard/Models/model-row-writes.ts +188 -0
  17. package/app/Actions/Storefront/AddToCartAction.ts +12 -15
  18. package/app/Actions/Storefront/CheckoutContactAction.ts +18 -10
  19. package/app/Actions/Storefront/CheckoutShippingAction.ts +20 -10
  20. package/app/Actions/Storefront/PlaceOrderAction.ts +9 -12
  21. package/app/Actions/Storefront/UpdateCartItemAction.ts +11 -9
  22. package/app/Middleware/Abilities.ts +4 -3
  23. package/app/Middleware/Csrf.ts +10 -1
  24. package/app/Middleware/Throttle.ts +4 -4
  25. package/functions/dashboard-api.ts +9 -3
  26. package/functions/dashboard-model-bulk.ts +3 -3
  27. package/functions/dashboard-model-drafts.test.ts +122 -0
  28. package/functions/dashboard-model-drafts.ts +228 -0
  29. package/functions/dashboard-model-record.ts +1 -1
  30. package/ide/vscode/package.json +1 -1
  31. package/package.json +5 -5
  32. package/resources/components/Dashboard/Analytics/AnalyticsPageHeader.stx +3 -13
  33. package/resources/components/Dashboard/App/RequestsOverview.stx +3 -20
  34. package/resources/components/Dashboard/App/SourceInventory.stx +1 -5
  35. package/resources/components/Dashboard/Auth/AccessTokenCreateDialog.stx +11 -28
  36. package/resources/components/Dashboard/Commerce/CommerceCategoriesDashboard.stx +4 -8
  37. package/resources/components/Dashboard/Commerce/CommerceCategoryDialog.stx +9 -9
  38. package/resources/components/Dashboard/Commerce/CommerceCouponDialog.stx +14 -14
  39. package/resources/components/Dashboard/Commerce/CommerceCouponsDashboard.stx +5 -9
  40. package/resources/components/Dashboard/Commerce/CommerceCustomerDialog.stx +7 -7
  41. package/resources/components/Dashboard/Commerce/CommerceCustomersDashboard.stx +3 -7
  42. package/resources/components/Dashboard/Commerce/CommerceGiftCardDialog.stx +15 -15
  43. package/resources/components/Dashboard/Commerce/CommerceGiftCardsDashboard.stx +5 -9
  44. package/resources/components/Dashboard/Commerce/CommerceManufacturerDialog.stx +12 -15
  45. package/resources/components/Dashboard/Commerce/CommerceManufacturersDashboard.stx +4 -28
  46. package/resources/components/Dashboard/Commerce/CommerceOrderDialog.stx +15 -15
  47. package/resources/components/Dashboard/Commerce/CommerceOrdersDashboard.stx +4 -8
  48. package/resources/components/Dashboard/Commerce/CommerceOverviewDashboard.stx +3 -11
  49. package/resources/components/Dashboard/Commerce/CommercePaymentsDashboard.stx +8 -9
  50. package/resources/components/Dashboard/Commerce/CommercePosCatalog.stx +3 -20
  51. package/resources/components/Dashboard/Commerce/CommercePosCheckoutDialog.stx +4 -4
  52. package/resources/components/Dashboard/Commerce/CommerceProductDialog.stx +14 -14
  53. package/resources/components/Dashboard/Commerce/CommerceProductsDashboard.stx +4 -8
  54. package/resources/components/Dashboard/Commerce/CommerceReviewEditDialog.stx +14 -24
  55. package/resources/components/Dashboard/Commerce/CommerceReviewsDashboard.stx +5 -43
  56. package/resources/components/Dashboard/Commerce/CommerceTaxDialog.stx +22 -38
  57. package/resources/components/Dashboard/Commerce/CommerceTaxesDashboard.stx +5 -33
  58. package/resources/components/Dashboard/Commerce/CommerceUnitDialog.stx +16 -30
  59. package/resources/components/Dashboard/Commerce/CommerceUnitsDashboard.stx +4 -28
  60. package/resources/components/Dashboard/Commerce/CommerceVariantDialog.stx +15 -9
  61. package/resources/components/Dashboard/Commerce/CommerceVariantsDashboard.stx +8 -9
  62. package/resources/components/Dashboard/Commerce/Delivery/CourierDialog.stx +14 -12
  63. package/resources/components/Dashboard/Commerce/Delivery/DeliveryRouteDialog.stx +9 -11
  64. package/resources/components/Dashboard/Commerce/Delivery/DigitalDeliveryDialog.stx +15 -9
  65. package/resources/components/Dashboard/Commerce/Delivery/LicenseKeyDialog.stx +11 -7
  66. package/resources/components/Dashboard/Commerce/Delivery/ShippingMethodDialog.stx +14 -8
  67. package/resources/components/Dashboard/Commerce/Delivery/ShippingRateDialog.stx +11 -17
  68. package/resources/components/Dashboard/Commerce/Delivery/ShippingZoneDialog.stx +18 -12
  69. package/resources/components/Dashboard/Commerce/PaymentRefundDialog.stx +1 -1
  70. package/resources/components/Dashboard/Commerce/PrintDeviceDialog.stx +5 -5
  71. package/resources/components/Dashboard/Commerce/PrintDevicesDashboard.stx +4 -8
  72. package/resources/components/Dashboard/Commerce/PrintLogsDashboard.stx +5 -9
  73. package/resources/components/Dashboard/Commerce/ProductWaitlistDashboard.stx +2 -10
  74. package/resources/components/Dashboard/Commerce/ProductWaitlistEntryDialog.stx +14 -67
  75. package/resources/components/Dashboard/Commerce/RestaurantWaitlistDashboard.stx +3 -18
  76. package/resources/components/Dashboard/Commerce/RestaurantWaitlistEntryDialog.stx +23 -69
  77. package/resources/components/Dashboard/Content/AuthorEditorDialog.stx +4 -16
  78. package/resources/components/Dashboard/Content/BlogDashboard.stx +2 -19
  79. package/resources/components/Dashboard/Content/BlogPostEditorDialog.stx +31 -51
  80. package/resources/components/Dashboard/Content/CommentsDashboard.stx +1 -1
  81. package/resources/components/Dashboard/Content/ContentDashboard.stx +1 -11
  82. package/resources/components/Dashboard/Content/CreateFolderDialog.stx +1 -4
  83. package/resources/components/Dashboard/Content/FileManagerDashboard.stx +2 -2
  84. package/resources/components/Dashboard/Content/PageEditorDialog.stx +8 -17
  85. package/resources/components/Dashboard/Content/PostEditorDialog.stx +35 -45
  86. package/resources/components/Dashboard/Content/PostsDashboard.stx +1 -13
  87. package/resources/components/Dashboard/Content/SeoDashboard.stx +2 -20
  88. package/resources/components/Dashboard/Content/SeoEditorDialog.stx +4 -38
  89. package/resources/components/Dashboard/Content/TaxonomyEditorDialog.stx +8 -15
  90. package/resources/components/Dashboard/Data/ActivityLog.stx +1 -5
  91. package/resources/components/Dashboard/Deployments/DeploymentList.stx +2 -11
  92. package/resources/components/Dashboard/Email/InboxMessageList.stx +1 -5
  93. package/resources/components/Dashboard/Infrastructure/DnsDashboard.stx +2 -16
  94. package/resources/components/Dashboard/Infrastructure/LogsDashboard.stx +6 -10
  95. package/resources/components/Dashboard/Infrastructure/MailboxesDashboard.stx +1 -5
  96. package/resources/components/Dashboard/Infrastructure/ServersDashboard.stx +1 -5
  97. package/resources/components/Dashboard/Jobs/JobHistory.stx +3 -12
  98. package/resources/components/Dashboard/Kanban/KanbanCardDialog.stx +57 -51
  99. package/resources/components/Dashboard/Library/ComponentsDashboard.stx +4 -14
  100. package/resources/components/Dashboard/Library/DependenciesDashboard.stx +2 -15
  101. package/resources/components/Dashboard/Library/PackagesDashboard.stx +1 -8
  102. package/resources/components/Dashboard/Library/SourceScaffoldDialog.stx +1 -12
  103. package/resources/components/Dashboard/Management/PermissionsDashboard.stx +3 -3
  104. package/resources/components/Dashboard/Marketing/AbandonedCartsDashboard.stx +4 -4
  105. package/resources/components/Dashboard/Marketing/CampaignDeliveryDialog.stx +3 -5
  106. package/resources/components/Dashboard/Marketing/CampaignDialog.stx +59 -93
  107. package/resources/components/Dashboard/Marketing/CampaignsDashboard.stx +5 -5
  108. package/resources/components/Dashboard/Marketing/MarketingListDialog.stx +12 -26
  109. package/resources/components/Dashboard/Marketing/MarketingListsDashboard.stx +4 -4
  110. package/resources/components/Dashboard/Marketing/RecoveryCampaignDialog.stx +12 -43
  111. package/resources/components/Dashboard/Marketing/SocialPostDialog.stx +7 -41
  112. package/resources/components/Dashboard/Marketing/SocialPostsDashboard.stx +5 -5
  113. package/resources/components/Dashboard/Models/ModelRecordEdit.stx +240 -28
  114. package/resources/components/Dashboard/Models/ModelRecordsDashboard.stx +7 -23
  115. package/resources/components/Dashboard/Models/ModelsOverview.stx +2 -12
  116. package/resources/components/Dashboard/Notifications/NotificationDeliveries.stx +4 -27
  117. package/resources/components/Dashboard/Notifications/NotificationDeliveryHistory.stx +4 -36
  118. package/resources/components/Dashboard/Operations/RecoveryDestinationDialog.stx +18 -47
  119. package/resources/components/Dashboard/Operations/RecoveryPolicyDialog.stx +24 -78
  120. package/resources/components/Dashboard/Operations/RecoveryRestoreDialog.stx +8 -19
  121. package/resources/components/Dashboard/Queries/QueryDashboard.stx +3 -21
  122. package/resources/components/Dashboard/Releases/ReleaseDashboard.stx +2 -9
  123. package/resources/components/Dashboard/Settings/SettingsDashboard.stx +1 -11
  124. package/resources/components/Dashboard/UI/Input.stx +50 -1
  125. package/resources/components/Dashboard/UI/SearchFilter.stx +27 -17
  126. package/resources/components/Dashboard/UI/Select.stx +4 -1
  127. package/resources/components/Dashboard/UI/Textarea.stx +16 -1
  128. package/resources/views/cart.stx +14 -0
  129. package/resources/views/checkout/contact.stx +15 -1
  130. package/resources/views/checkout/payment.stx +7 -0
  131. package/resources/views/checkout/shipping.stx +39 -5
  132. package/routes/dashboard-api.ts +2 -0
@@ -258,28 +258,10 @@ void loadEntries()
258
258
 
259
259
  <div class="flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between">
260
260
  <div class="relative max-w-sm w-full">
261
- <label for="seo-search" class="sr-only">Search posts</label>
262
- <span class="absolute left-3 top-1/2 h-4 w-4 text-neutral-400 pointer-events-none -translate-y-1/2 i-hugeicons-search-01"></span>
263
- <input
264
- id="seo-search"
265
- type="search"
266
- placeholder="Search posts"
267
- x-model="searchQuery"
268
- class="block pl-9 pr-3 py-2 w-full text-neutral-900 text-sm dark:text-white placeholder:text-neutral-400 bg-white dark:bg-white/5 border border-black/10 rounded-lg dark:border-white/15 focus:border-blue-500/50 focus:outline-none focus:ring-2 focus:ring-blue-500/30"
269
- >
261
+ <SearchFilter v-model:searchValue="searchQuery" placeholder="Search posts" ariaLabel="Search posts" />
270
262
  </div>
271
263
  <div>
272
- <label for="seo-score-filter" class="sr-only">Filter by SEO score</label>
273
- <select
274
- id="seo-score-filter"
275
- x-model="scoreFilter"
276
- class="block px-3 py-2 text-neutral-900 text-sm dark:text-white bg-white dark:bg-white/5 border border-black/10 rounded-lg dark:border-white/15 focus:border-blue-500/50 focus:outline-none focus:ring-2 focus:ring-blue-500/30"
277
- >
278
- <option value="all">All scores</option>
279
- <option value="good">Good, 80 or higher</option>
280
- <option value="medium">Medium, 50 to 79</option>
281
- <option value="poor">Poor, below 50</option>
282
- </select>
264
+ <Select v-model:value="scoreFilter" id="seo-score-filter" ariaLabel="Filter by SEO score" placeholder="" :options="[{ value: 'all', label: 'All scores' }, { value: 'good', label: 'Good, 80 or higher' }, { value: 'medium', label: 'Medium, 50 to 79' }, { value: 'poor', label: 'Poor, below 50' }]" />
283
265
  </div>
284
266
  </div>
285
267
 
@@ -55,44 +55,10 @@ function submit(): void {
55
55
  :closable="!busy()"
56
56
  @close="close"
57
57
  >
58
- <form id="seo-editor-form" class="space-y-4" @submit.prevent="submit">
59
- <div>
60
- <label for="seo-focus-keyword" class="block font-medium text-neutral-700 text-sm dark:text-neutral-300">Focus keyword</label>
61
- <input
62
- id="seo-focus-keyword"
63
- name="focus_keyword"
64
- type="text"
65
- maxlength="100"
66
- x-model="focusKeyword"
67
- class="block mt-1.5 px-3 py-2 w-full text-neutral-900 text-sm dark:text-white bg-white dark:bg-white/5 border border-black/10 rounded-lg dark:border-white/15 focus:border-blue-500/50 focus:outline-none focus:ring-2 focus:ring-blue-500/30"
68
- >
69
- </div>
70
- <div>
71
- <div class="flex items-center justify-between">
72
- <label for="seo-meta-description" class="block font-medium text-neutral-700 text-sm dark:text-neutral-300">Meta description</label>
73
- <span class="tabular-nums text-neutral-500 text-xs dark:text-neutral-400">{{ metaDescription().length }}/160</span>
74
- </div>
75
- <textarea
76
- id="seo-meta-description"
77
- name="meta_description"
78
- rows="4"
79
- maxlength="160"
80
- x-model="metaDescription"
81
- class="block mt-1.5 px-3 py-2 w-full text-neutral-900 text-sm dark:text-white bg-white dark:bg-white/5 border border-black/10 rounded-lg dark:border-white/15 focus:border-blue-500/50 focus:outline-none focus:ring-2 focus:ring-blue-500/30"
82
- ></textarea>
83
- </div>
84
- <div>
85
- <label for="seo-canonical-url" class="block font-medium text-neutral-700 text-sm dark:text-neutral-300">Canonical URL</label>
86
- <input
87
- id="seo-canonical-url"
88
- name="canonical_url"
89
- type="url"
90
- inputmode="url"
91
- placeholder="https://example.com/post"
92
- x-model="canonicalUrl"
93
- class="block mt-1.5 px-3 py-2 w-full text-neutral-900 text-sm dark:text-white placeholder:text-neutral-400 bg-white dark:bg-white/5 border border-black/10 rounded-lg dark:border-white/15 focus:border-blue-500/50 focus:outline-none focus:ring-2 focus:ring-blue-500/30"
94
- >
95
- </div>
58
+ <form id="seo-editor-form" class="grid gap-4" @submit.prevent="submit">
59
+ <Input v-model:value="focusKeyword" id="seo-focus-keyword" name="focus_keyword" label="Focus keyword" :maxLength="100" />
60
+ <Textarea v-model:value="metaDescription" id="seo-meta-description" name="meta_description" label="Meta description" :rows="4" :maxLength="160" :showCount="true" />
61
+ <Input v-model:value="canonicalUrl" id="seo-canonical-url" name="canonical_url" label="Canonical URL" type="url" inputmode="url" placeholder="https://example.com/post" />
96
62
  </form>
97
63
 
98
64
  <div :if="error()" role="alert" class="mt-4 px-3 py-2 text-red-700 text-sm dark:text-red-300 bg-red-50 dark:bg-red-500/10 border border-red-200 rounded-lg dark:border-red-500/20">
@@ -11,7 +11,9 @@ const busy = useReactiveProp('busy', false)
11
11
  const error = useReactiveProp('error', '')
12
12
  const name = state('')
13
13
  const slug = state('')
14
- const description = state('')
14
+ // Not `description`: a field bound inside the Modal is first read as the Modal's own
15
+ // `description` prop (stacksjs/stacks#3310).
16
+ const descriptionText = state('')
15
17
  const slugTouched = state(false)
16
18
  const emit = defineEmits(['close', 'submit'])
17
19
  let wasOpen = false
@@ -32,7 +34,7 @@ effect(() => {
32
34
  if (isOpen && !wasOpen) {
33
35
  name.set('')
34
36
  slug.set('')
35
- description.set('')
37
+ descriptionText.set('')
36
38
  slugTouched.set(false)
37
39
  }
38
40
  wasOpen = isOpen
@@ -63,7 +65,7 @@ function submit(): void {
63
65
  const draft: TaxonomyDraft = {
64
66
  name: name().trim(),
65
67
  slug: slugify(slug()),
66
- description: description().trim(),
68
+ description: descriptionText().trim(),
67
69
  }
68
70
  emit('submit', draft)
69
71
  }
@@ -77,18 +79,9 @@ function submit(): void {
77
79
  @close="close"
78
80
  >
79
81
  <form id="taxonomy-editor-form" class="grid gap-4" @submit.prevent="submit">
80
- <label>
81
- <span class="font-medium text-gray-700 text-sm dark:text-neutral-200">Name</span>
82
- <input x-model="name" name="name" required maxlength="255" class="mt-1 px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-gray-300 rounded-md dark:border-neutral-700" />
83
- </label>
84
- <label>
85
- <span class="font-medium text-gray-700 text-sm dark:text-neutral-200">Slug</span>
86
- <input x-model="slug" name="slug" required maxlength="255" class="mt-1 px-3 py-2 w-full font-mono text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-gray-300 rounded-md dark:border-neutral-700" @input="markSlugTouched" @blur="normalizeSlug" />
87
- </label>
88
- <label>
89
- <span class="font-medium text-gray-700 text-sm dark:text-neutral-200">Description</span>
90
- <textarea x-model="description" name="description" rows="3" maxlength="1000" class="mt-1 px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-gray-300 rounded-md dark:border-neutral-700"></textarea>
91
- </label>
82
+ <Input v-model:value="name" name="name" label="Name" :required="true" :maxLength="255" />
83
+ <Input v-model:value="slug" name="slug" label="Slug" :required="true" :maxLength="255" :spellcheck="false" :monospace="true" @input="markSlugTouched" @blur="normalizeSlug" />
84
+ <Textarea v-model:value="descriptionText" name="description" label="Description" :rows="3" :maxLength="1000" />
92
85
  </form>
93
86
 
94
87
  <div :if="error()" role="alert" class="mt-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">
@@ -181,11 +181,7 @@ onMount(() => {
181
181
  <h2 class="font-semibold text-neutral-900 dark:text-white">Activity Log</h2>
182
182
  <p class="mt-1 text-neutral-500 text-xs dark:text-neutral-400">{{ countLabel() }}</p>
183
183
  </div>
184
- <label class="block relative w-full sm:w-72">
185
- <span class="sr-only">Search activity log</span>
186
- <span aria-hidden="true" class="absolute left-3 top-1/2 h-4 w-4 text-neutral-400 pointer-events-none -translate-y-1/2 i-hugeicons-search-01"></span>
187
- <input x-model="search" type="search" placeholder="Search activity log" class="block pl-9 pr-3 py-2 w-full text-neutral-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-neutral-300 rounded-lg dark:border-neutral-700 focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500/20">
188
- </label>
184
+ <div class="w-full sm:w-72"><SearchFilter v-model:searchValue="search" placeholder="Search activity log" ariaLabel="Search activity log" /></div>
189
185
  </div>
190
186
 
191
187
  <div :if="loading()" class="flex items-center justify-center py-16 text-neutral-500 text-sm dark:text-neutral-400">
@@ -246,17 +246,8 @@ onMount(() => {
246
246
  <p class="mt-1 text-gray-500 text-sm dark:text-neutral-400">No estimated totals or synthetic build activity.</p>
247
247
  </div>
248
248
  <div class="flex gap-2">
249
- <label class="sr-only" for="deployment-status">Status</label>
250
- <select id="deployment-status" x-model="status" class="px-3 py-2 text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-800 border border-gray-300 rounded-md dark:border-neutral-700">
251
- <option value="all">All statuses</option>
252
- <option value="success">Success</option>
253
- <option value="failed">Failed</option>
254
- <option value="running">Running</option>
255
- <option value="pending">Pending</option>
256
- <option value="cancelled">Cancelled</option>
257
- </select>
258
- <label class="sr-only" for="deployment-search">Search deployments</label>
259
- <input id="deployment-search" x-model="search" type="search" placeholder="Search deployments" class="px-3 py-2 w-56 text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-800 border border-gray-300 rounded-md dark:border-neutral-700" />
249
+ <Select v-model:value="status" id="deployment-status" ariaLabel="Status" placeholder="" :options="[{ value: 'all', label: 'All statuses' }, { value: 'success', label: 'Success' }, { value: 'failed', label: 'Failed' }, { value: 'running', label: 'Running' }, { value: 'pending', label: 'Pending' }, { value: 'cancelled', label: 'Cancelled' }]" />
250
+ <SearchFilter v-model:searchValue="search" placeholder="Search deployments" ariaLabel="Search deployments" class="w-56" />
260
251
  </div>
261
252
  </div>
262
253
  <DeploymentTable :deployments="rows()" :loading="isLoading" />
@@ -39,11 +39,7 @@ function listClass(): string {
39
39
 
40
40
  <section aria-label="Message list" :class="listClass()">
41
41
  <div class="px-4 py-2 bg-white dark:bg-neutral-700 border-b border-gray-200 dark:border-neutral-600">
42
- <label for="inbox-search" class="sr-only">Search messages</label>
43
- <div class="relative">
44
- <span aria-hidden="true" class="absolute left-3 top-1/2 h-4 w-4 text-gray-400 pointer-events-none -translate-y-1/2 i-hugeicons-search-01"></span>
45
- <input id="inbox-search" x-model="search" type="search" placeholder="Search messages" class="block placeholder-gray-500 dark:placeholder-gray-400 pl-10 pr-3 py-2 w-full text-gray-900 text-sm dark:text-neutral-100 bg-gray-50 dark:bg-neutral-600 border border-gray-300 rounded-md dark:border-neutral-600 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500" @input="emit('search', $event.target.value)" />
46
- </div>
42
+ <SearchFilter v-model:searchValue="search" placeholder="Search messages" ariaLabel="Search messages" @search="emit('search', $event)" />
47
43
  </div>
48
44
 
49
45
  <div class="overflow-y-auto flex-1">
@@ -229,22 +229,8 @@ onMount(() => {
229
229
  <p class="mt-1 text-neutral-500 text-sm dark:text-neutral-400">The records declared in config/dns.ts. Changes made directly at your DNS provider do not appear here.</p>
230
230
  </div>
231
231
  <div class="flex flex-col gap-2 sm:flex-row">
232
- <label class="block relative sm:w-72">
233
- <span class="sr-only">Search DNS records</span>
234
- <span class="absolute left-3 top-2.5 h-4 w-4 text-neutral-400 i-hugeicons-search-01"></span>
235
- <input x-model="search" type="search" placeholder="Search records" class="pl-9 pr-3 py-2 w-full text-neutral-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-neutral-300 rounded-lg dark:border-neutral-700 focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500/20" />
236
- </label>
237
- <label>
238
- <span class="sr-only">Filter DNS record type</span>
239
- <select x-model="typeFilter" class="px-3 py-2 h-10 w-full text-neutral-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-neutral-300 rounded-lg dark:border-neutral-700 focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500/20">
240
- <option value="all">All types</option>
241
- <option value="A">A (IPv4 address)</option>
242
- <option value="AAAA">AAAA (IPv6 address)</option>
243
- <option value="CNAME">CNAME (alias)</option>
244
- <option value="MX">MX (mail server)</option>
245
- <option value="TXT">TXT (text)</option>
246
- </select>
247
- </label>
232
+ <div class="sm:w-72"><SearchFilter v-model:searchValue="search" placeholder="Search records" ariaLabel="Search DNS records" /></div>
233
+ <Select v-model:value="typeFilter" ariaLabel="Filter DNS record type" placeholder="" :options="[{ value: 'all', label: 'All types' }, { value: 'A', label: 'A (IPv4 address)' }, { value: 'AAAA', label: 'AAAA (IPv6 address)' }, { value: 'CNAME', label: 'CNAME (alias)' }, { value: 'MX', label: 'MX (mail server)' }, { value: 'TXT', label: 'TXT (text)' }]" />
248
234
  </div>
249
235
  </div>
250
236
 
@@ -269,15 +269,11 @@ onDestroy(() => {
269
269
  <p :if="generatedAt()" class="text-neutral-500 text-xs dark:text-neutral-500">Snapshot {{ formatDate(generatedAt()) }}</p>
270
270
  </div>
271
271
  <div class="grid gap-3 sm:grid-cols-2 xl:grid-cols-3 mt-5">
272
- <label class="block relative sm:col-span-2 xl:col-span-1">
273
- <span class="sr-only">Search system logs</span>
274
- <span class="absolute left-3 top-2.5 h-4 w-4 text-neutral-400 i-hugeicons-search-01"></span>
275
- <input x-model="search" type="search" placeholder="Search logs" class="pl-9 pr-3 py-2 w-full text-neutral-900 text-sm dark:text-white bg-white dark:bg-neutral-950 border border-neutral-300 rounded-lg dark:border-neutral-700 focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500/20" @input="scheduleSearch" />
276
- </label>
277
- <label><span class="sr-only">Filter by type</span><select x-model="type" class="px-3 py-2 w-full text-neutral-900 text-sm dark:text-white bg-white dark:bg-neutral-950 border border-neutral-300 rounded-lg dark:border-neutral-700" @change="reloadFilters"><option value="">All types</option><option :for="entry in options().types" :value="entry">{{ entry }}</option></select></label>
278
- <label><span class="sr-only">Filter by source</span><select x-model="source" class="px-3 py-2 w-full text-neutral-900 text-sm dark:text-white bg-white dark:bg-neutral-950 border border-neutral-300 rounded-lg dark:border-neutral-700" @change="reloadFilters"><option value="">All sources</option><option :for="entry in options().sources" :value="entry">{{ entry }}</option></select></label>
279
- <label><span class="sr-only">Filter by project</span><select x-model="project" class="px-3 py-2 w-full text-neutral-900 text-sm dark:text-white bg-white dark:bg-neutral-950 border border-neutral-300 rounded-lg dark:border-neutral-700" @change="reloadFilters"><option value="">All projects</option><option :for="entry in options().projects" :value="entry">{{ entry }}</option></select></label>
280
- <label><span class="sr-only">Filter by time range</span><select x-model="range" class="px-3 py-2 w-full text-neutral-900 text-sm dark:text-white bg-white dark:bg-neutral-950 border border-neutral-300 rounded-lg dark:border-neutral-700" @change="reloadFilters"><option value="1">Last 24 hours</option><option value="7">Last 7 days</option><option value="30">Last 30 days</option><option value="90">Last 90 days</option><option value="all">All time</option></select></label>
272
+ <SearchFilter v-model:searchValue="search" placeholder="Search logs" ariaLabel="Search system logs" @search="scheduleSearch" />
273
+ <Select v-model:value="type" ariaLabel="Filter by type" placeholder="" :options="[{ value: '', label: 'All types' }, ...options().types.map(entry => ({ value: entry, label: entry }))]" @change="reloadFilters" />
274
+ <Select v-model:value="source" ariaLabel="Filter by source" placeholder="" :options="[{ value: '', label: 'All sources' }, ...options().sources.map(entry => ({ value: entry, label: entry }))]" @change="reloadFilters" />
275
+ <Select v-model:value="project" ariaLabel="Filter by project" placeholder="" :options="[{ value: '', label: 'All projects' }, ...options().projects.map(entry => ({ value: entry, label: entry }))]" @change="reloadFilters" />
276
+ <Select v-model:value="range" ariaLabel="Filter by time range" placeholder="" :options="[{ value: '1', label: 'Last 24 hours' }, { value: '7', label: 'Last 7 days' }, { value: '30', label: 'Last 30 days' }, { value: '90', label: 'Last 90 days' }, { value: 'all', label: 'All time' }]" @change="reloadFilters" />
281
277
  <Button :if="hasFilters()" variant="secondary" @click="resetFilters"><span class="h-4 w-4 i-hugeicons-cancel-01"></span>Reset filters</Button>
282
278
  </div>
283
279
  </div>
@@ -306,7 +302,7 @@ onDestroy(() => {
306
302
  <footer :if="logs().length > 0" class="flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between px-5 py-4 text-neutral-500 text-sm dark:text-neutral-400 bg-neutral-50 dark:bg-neutral-800/50 border-neutral-200 border-t dark:border-neutral-700">
307
303
  <p>Showing {{ pageStart() }} to {{ pageEnd() }} of {{ pagination().total }}</p>
308
304
  <div class="flex gap-2 items-center">
309
- <label><span class="sr-only">Logs per page</span><select x-model="perPage" class="px-2 py-1.5 text-neutral-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-neutral-300 rounded-lg dark:border-neutral-700" @change="reloadFilters"><option value="10">10 per page</option><option value="25">25 per page</option><option value="50">50 per page</option><option value="100">100 per page</option></select></label>
305
+ <Select v-model:value="perPage" ariaLabel="Logs per page" size="sm" placeholder="" :options="[{ value: '10', label: '10 per page' }, { value: '25', label: '25 per page' }, { value: '50', label: '50 per page' }, { value: '100', label: '100 per page' }]" @change="reloadFilters" />
310
306
  <Button variant="secondary" iconOnly :disabled="pagination().page <= 1" ariaLabel="Previous log page" @click="previousPage"><span class="block h-4 w-4 i-hugeicons-arrow-left-01"></span></Button>
311
307
  <span class="font-mono text-neutral-600 text-xs dark:text-neutral-300">{{ pagination().page }} / {{ pagination().totalPages }}</span>
312
308
  <Button variant="secondary" iconOnly :disabled="pagination().page >= pagination().totalPages" ariaLabel="Next log page" @click="nextPage"><span class="block h-4 w-4 i-hugeicons-arrow-right-01"></span></Button>
@@ -230,11 +230,7 @@ onMount(() => {
230
230
  <section>
231
231
  <div class="flex flex-col gap-3 sm:flex-row sm:items-end sm:justify-between">
232
232
  <div><h2 class="font-semibold text-neutral-900 dark:text-white">Configured mailboxes</h2><p class="mt-1 text-neutral-500 text-sm dark:text-neutral-400">Add or change addresses in config/email.ts.</p></div>
233
- <label class="block relative sm:w-72">
234
- <span class="sr-only">Search mailboxes</span>
235
- <span class="absolute left-3 top-2.5 h-4 w-4 text-neutral-400 i-hugeicons-search-01"></span>
236
- <input x-model="search" type="search" placeholder="Search mailboxes" class="pl-9 pr-3 py-2 w-full text-neutral-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-neutral-300 rounded-lg dark:border-neutral-700 focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500/20" />
237
- </label>
233
+ <div class="sm:w-72"><SearchFilter v-model:searchValue="search" placeholder="Search mailboxes" ariaLabel="Search mailboxes" /></div>
238
234
  </div>
239
235
 
240
236
  <div :if="loading()" class="flex items-center justify-center mt-4 py-16 text-neutral-500 text-sm dark:text-neutral-400 bg-white dark:bg-neutral-900 border border-neutral-200 rounded-xl dark:border-neutral-700">
@@ -294,11 +294,7 @@ onMount(() => {
294
294
  <h2 class="font-semibold text-neutral-900 dark:text-white">Compute inventory</h2>
295
295
  <p class="mt-1 text-neutral-500 text-sm dark:text-neutral-400">Configuration and deployment state remain separate so a declaration is never mistaken for a running server.</p>
296
296
  </div>
297
- <label class="block relative sm:w-72">
298
- <span class="sr-only">Search server inventory</span>
299
- <span class="absolute left-3 top-2.5 h-4 w-4 text-neutral-400 i-hugeicons-search-01"></span>
300
- <input x-model="search" type="search" placeholder="Search inventory" class="pl-9 pr-3 py-2 w-full text-neutral-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-neutral-300 rounded-lg dark:border-neutral-700 focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500/20" />
301
- </label>
297
+ <div class="sm:w-72"><SearchFilter v-model:searchValue="search" placeholder="Search inventory" ariaLabel="Search server inventory" /></div>
302
298
  </div>
303
299
 
304
300
  <div :if="loading()" class="flex items-center justify-center mt-4 py-16 text-neutral-500 text-sm dark:text-neutral-400 bg-white dark:bg-neutral-900 border border-neutral-200 rounded-xl dark:border-neutral-700">
@@ -87,19 +87,10 @@ onMount(() => {
87
87
 
88
88
  <div class="grid gap-3 grid-cols-1 md:grid-cols-[minmax(0,1fr)_12rem_12rem]">
89
89
  <div>
90
- <label for="job-search" class="sr-only">Search jobs</label>
91
- <input id="job-search" x-model="searchQuery" type="search" placeholder="Search job names" class="block px-3 py-2 w-full text-gray-900 text-sm dark:text-white dark:bg-neutral-800 border border-gray-300 rounded-md dark:border-neutral-700" />
90
+ <SearchFilter v-model:searchValue="searchQuery" placeholder="Search job names" ariaLabel="Search jobs" class="w-full" />
92
91
  </div>
93
- <select x-model="selectedQueue" aria-label="Queue" class="block px-3 py-2 text-gray-900 text-sm dark:text-white dark:bg-neutral-800 border border-gray-300 rounded-md dark:border-neutral-700">
94
- <option value="all">All queues</option>
95
- <option :for="queue in queues()" :value="queue">{{ queue }}</option>
96
- </select>
97
- <select x-model="selectedStatus" aria-label="Status" class="block px-3 py-2 text-gray-900 text-sm dark:text-white dark:bg-neutral-800 border border-gray-300 rounded-md dark:border-neutral-700">
98
- <option value="all">All statuses</option>
99
- <option value="queued">Queued</option>
100
- <option value="processing">Processing</option>
101
- <option value="failed">Failed</option>
102
- </select>
92
+ <Select v-model:value="selectedQueue" ariaLabel="Queue" placeholder="" :options="[{ value: 'all', label: 'All queues' }, ...queues().map(queue => ({ value: queue, label: queue }))]" />
93
+ <Select v-model:value="selectedStatus" ariaLabel="Status" placeholder="" :options="[{ value: 'all', label: 'All statuses' }, { value: 'queued', label: 'Queued' }, { value: 'processing', label: 'Processing' }, { value: 'failed', label: 'Failed' }]" />
103
94
  </div>
104
95
 
105
96
  <div :if="loadError()" class="p-4 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">{{ loadError() }}</div>
@@ -71,6 +71,52 @@ function close(): void {
71
71
  kanban.closeCardDetail()
72
72
  }
73
73
 
74
+ /*
75
+ * The shared fields hand over the key event itself, so each says here what
76
+ * its keys do, as the native fields' modifiers did.
77
+ */
78
+
79
+ /** Enter ends a title edit: the field loses focus, which saves it. */
80
+ function blurOnEnter(event: KeyboardEvent): void {
81
+ if (event.key !== 'Enter')
82
+ return
83
+ event.preventDefault()
84
+ ;(event.target as HTMLElement).blur()
85
+ }
86
+
87
+ /** Command+Enter, or Ctrl+Enter, sends the comment being written. */
88
+ function sendCommentOnCommandEnter(event: KeyboardEvent): void {
89
+ if (event.key !== 'Enter' || !(event.metaKey || event.ctrlKey))
90
+ return
91
+ event.preventDefault()
92
+ void submitComment()
93
+ }
94
+
95
+ /**
96
+ * Escape stops editing a comment without closing the card, and
97
+ * Command+Enter, or Ctrl+Enter, saves it.
98
+ */
99
+ function editCommentKey(commentId: number, event: KeyboardEvent): void {
100
+ if (event.key === 'Escape') {
101
+ event.preventDefault()
102
+ event.stopPropagation()
103
+ cancelCommentEditWithoutClosing()
104
+ return
105
+ }
106
+ if (event.key === 'Enter' && (event.metaKey || event.ctrlKey)) {
107
+ event.preventDefault()
108
+ void saveCommentEdit(commentId)
109
+ }
110
+ }
111
+
112
+ /** Enter creates the label being named. */
113
+ function createLabelOnEnter(event: KeyboardEvent): void {
114
+ if (event.key !== 'Enter')
115
+ return
116
+ event.preventDefault()
117
+ void submitNewLabel()
118
+ }
119
+
74
120
  async function commitTitle(): Promise<void> {
75
121
  const card = openCard()
76
122
  if (!card)
@@ -252,18 +298,7 @@ function formatTimestamp(iso: string | null | undefined): string {
252
298
  @close="close"
253
299
  >
254
300
  <div :if="openCard()" class="grid gap-6">
255
- <label class="grid gap-2">
256
- <span class="font-medium text-xs text-zinc-500 tracking-wide uppercase">Title</span>
257
- <input
258
- x-model="titleDraft"
259
- name="card_title"
260
- required
261
- autofocus
262
- @blur="commitTitle()"
263
- @keydown.enter.prevent="$event.currentTarget.blur()"
264
- class="px-3 py-2 font-semibold text-lg text-zinc-900 dark:text-zinc-100 bg-white dark:bg-zinc-950 border border-zinc-200 rounded-md dark:border-zinc-800 focus:border-violet-400 focus:outline-none dark:focus:border-violet-600"
265
- />
266
- </label>
301
+ <Input v-model:value="titleDraft" name="card_title" label="Title" :required="true" :autofocus="true" @blur="commitTitle" @keydown="blurOnEnter" />
267
302
 
268
303
  <div :if="loadingCard()" role="status" class="flex gap-2 items-center text-sm text-zinc-500">
269
304
  <span class="h-4 w-4 animate-spin i-hugeicons-loading-03"></span>
@@ -278,14 +313,7 @@ function formatTimestamp(iso: string | null | undefined): string {
278
313
  <div class="md:col-span-2 space-y-6">
279
314
  <section>
280
315
  <h4 class="mb-2 font-medium text-xs text-zinc-500 tracking-wide uppercase">Description</h4>
281
- <textarea
282
- x-model="descDraft"
283
- name="card_description"
284
- @blur="commitDescription()"
285
- rows="4"
286
- placeholder="Add a more detailed description"
287
- class="px-3 py-2 w-full text-sm text-zinc-800 dark:text-zinc-200 bg-white dark:bg-zinc-950 border border-zinc-200 rounded dark:border-zinc-800 focus:border-violet-400 focus:outline-none dark:focus:border-violet-600 resize-y"
288
- ></textarea>
316
+ <Textarea v-model:value="descDraft" name="card_description" ariaLabel="Description" :rows="4" placeholder="Add a more detailed description" @blur="commitDescription" />
289
317
  </section>
290
318
 
291
319
  <section :if="cardAttachments().length">
@@ -311,15 +339,7 @@ function formatTimestamp(iso: string | null | undefined): string {
311
339
  <section>
312
340
  <h4 class="mb-2 font-medium text-xs text-zinc-500 tracking-wide uppercase">Activity</h4>
313
341
  <div class="mb-4">
314
- <textarea
315
- x-model="commentDraft"
316
- name="card_comment"
317
- @keydown.meta.enter.prevent="submitComment()"
318
- @keydown.ctrl.enter.prevent="submitComment()"
319
- rows="2"
320
- placeholder="Add a comment, then press Command+Enter to send"
321
- class="px-3 py-2 w-full text-sm text-zinc-800 dark:text-zinc-200 bg-white dark:bg-zinc-950 border border-zinc-200 rounded dark:border-zinc-800 focus:border-violet-400 focus:outline-none dark:focus:border-violet-600 resize-none"
322
- ></textarea>
342
+ <Textarea v-model:value="commentDraft" name="card_comment" ariaLabel="Add a comment" :rows="2" resize="none" placeholder="Add a comment, then press Command+Enter to send" @keydown="sendCommentOnCommandEnter" />
323
343
  <div class="flex justify-end mt-2">
324
344
  <Button size="sm" :disabled="!commentDraft().trim()" @click="submitComment()">Comment</Button>
325
345
  </div>
@@ -340,16 +360,7 @@ function formatTimestamp(iso: string | null | undefined): string {
340
360
  </div>
341
361
  <p :if="editingCommentId() !== comment.id" class="mt-0.5 text-xs text-zinc-700 whitespace-pre-wrap dark:text-zinc-300" :text="comment.body"></p>
342
362
  <div :if="editingCommentId() === comment.id" class="mt-2">
343
- <textarea
344
- x-model="commentEditDraft"
345
- @keydown.escape.stop.prevent="cancelCommentEditWithoutClosing()"
346
- @keydown.meta.enter.prevent="saveCommentEdit(comment.id)"
347
- @keydown.ctrl.enter.prevent="saveCommentEdit(comment.id)"
348
- rows="3"
349
- maxlength="10000"
350
- :aria-label="'Edit comment by ' + (comment.authorName || comment.authorEmail || 'Unknown')"
351
- class="px-3 py-2 w-full text-sm text-zinc-800 dark:text-zinc-200 bg-white dark:bg-zinc-950 border border-zinc-200 rounded dark:border-zinc-800 focus:border-violet-400 focus:outline-none dark:focus:border-violet-600 resize-y"
352
- ></textarea>
363
+ <Textarea v-model:value="commentEditDraft" :rows="3" :maxLength="10000" :ariaLabel="'Edit comment by ' + (comment.authorName || comment.authorEmail || 'Unknown')" @keydown="editCommentKey(comment.id, $event)" />
353
364
  <div class="flex gap-2 justify-end mt-2">
354
365
  <Button variant="secondary" size="xs" :disabled="savingCommentId() === comment.id" @click="cancelCommentEdit()">Cancel</Button>
355
366
  <Button size="xs" :loading="savingCommentId() === comment.id" :disabled="!commentEditDraft().trim()" @click="saveCommentEdit(comment.id)">Save comment</Button>
@@ -388,7 +399,9 @@ function formatTimestamp(iso: string | null | undefined): string {
388
399
  </div>
389
400
 
390
401
  <div :if="showNewLabelComposer()" class="pt-2 space-y-2 border-t border-zinc-200 dark:border-zinc-800">
391
- <input x-model="newLabelName" name="label_name" @keydown.enter.prevent="submitNewLabel()" placeholder="Label name" class="px-2 py-1 w-full text-xs bg-white dark:bg-zinc-950 border border-zinc-300 rounded dark:border-zinc-700 focus:border-violet-500 focus:outline-none" />
402
+ <div>
403
+ <Input v-model:value="newLabelName" name="label_name" ariaLabel="Label name" size="sm" placeholder="Label name" @keydown="createLabelOnEnter" />
404
+ </div>
392
405
  <div class="flex gap-1 items-center" role="group" aria-label="Label color">
393
406
  <button :for="color in labelColors" type="button" @click="newLabelColor.set(color)" :class="`w-5 h-5 rounded ${labelChipClass(color)} ${newLabelColor() === color ? 'ring-2 ring-offset-1 ring-violet-500 dark:ring-offset-zinc-900' : ''}`" :aria-label="'Use ' + color + ' label color'" :aria-pressed="String(newLabelColor() === color)"></button>
394
407
  </div>
@@ -418,16 +431,9 @@ function formatTimestamp(iso: string | null | undefined): string {
418
431
  <span :if="cardAssignees().length === 0" class="italic text-xs text-zinc-500 dark:text-zinc-400">Unassigned</span>
419
432
  </div>
420
433
 
421
- <input
422
- :if="showAssigneePicker()"
423
- type="search"
424
- name="assignee_search"
425
- aria-label="Search users to assign"
426
- placeholder="Search by name or email"
427
- x-model="assigneeQuery"
428
- @input="searchAssigneesSoon()"
429
- class="mb-2 px-2 py-1 w-full text-xs text-zinc-800 dark:text-zinc-200 bg-white dark:bg-zinc-950 border border-zinc-200 rounded dark:border-zinc-800 focus:border-violet-400 focus:outline-none"
430
- />
434
+ <div :if="showAssigneePicker()" class="mb-2">
435
+ <Input v-model:value="assigneeQuery" type="search" name="assignee_search" ariaLabel="Search users to assign" size="sm" placeholder="Search by name or email" @input="searchAssigneesSoon" />
436
+ </div>
431
437
  <p :if="showAssigneePicker() && moreAssigneesLabel()" class="mb-2 text-[11px] text-zinc-500 dark:text-zinc-400" :text="moreAssigneesLabel()"></p>
432
438
  <div :if="showAssigneePicker()" class="overflow-y-auto space-y-1 max-h-48">
433
439
  <p :if="kanban.users().length === 0 && !kanban.userSearch()" class="italic text-xs text-zinc-500 dark:text-zinc-400">No users to assign.</p>
@@ -442,7 +448,7 @@ function formatTimestamp(iso: string | null | undefined): string {
442
448
 
443
449
  <section>
444
450
  <h4 class="mb-2 font-medium text-xs text-zinc-500 tracking-wide uppercase">Due date</h4>
445
- <input type="date" x-model="dueDateDraft" name="due_date" @change="commitDueDate()" class="px-2 py-1 w-full text-xs text-zinc-800 dark:text-zinc-200 bg-white dark:bg-zinc-950 border border-zinc-200 rounded dark:border-zinc-800 focus:border-violet-400 focus:outline-none" />
451
+ <Input v-model:value="dueDateDraft" type="date" name="due_date" ariaLabel="Due date" size="sm" @change="commitDueDate" />
446
452
  </section>
447
453
 
448
454
  <section class="pt-3 border-t border-zinc-200 dark:border-zinc-800">
@@ -184,20 +184,10 @@ onMount(() => {
184
184
  empty-description="Adjust the search or category filter."
185
185
  >
186
186
  <template #toolbar>
187
- <label>
188
- <span class="sr-only">Filter by category</span>
189
- {{-- `x-text` rather than `{{ category }}`: an interpolation inside
190
- slot content is preserved but never evaluated on the installed
191
- stx, while the attribute forms read the loop variable fine.
192
- See stacksjs/stx#2095. --}}
193
- <select
194
- x-model="selectedCategory"
195
- aria-label="Filter by category"
196
- class="px-2.5 py-1.5 text-sm bg-white dark:bg-neutral-800 border border-stone-300 rounded-lg dark:border-neutral-600"
197
- >
198
- <option :for="category in categories()" :value="category" x-text="category"></option>
199
- </select>
200
- </label>
187
+ {{-- The options are bound as an attribute: an interpolation inside slot
188
+ content is preserved but never evaluated on the installed stx.
189
+ See stacksjs/stx#2095. --}}
190
+ <Select v-model:value="selectedCategory" ariaLabel="Filter by category" placeholder="" :options="[...categories().map(category => ({ value: category, label: category }))]" />
201
191
  </template>
202
192
  </Table>
203
193
  </section>
@@ -125,21 +125,8 @@ onMount(() => { void loadDependencies() })
125
125
  empty-description="Adjust the dataset, scope, or search."
126
126
  >
127
127
  <template #toolbar>
128
- <label>
129
- <span class="sr-only">Choose dependency dataset</span>
130
- <select x-model="dataset" class="px-2.5 py-1.5 text-sm bg-white dark:bg-neutral-800 border border-stone-300 rounded-lg dark:border-neutral-600">
131
- <option value="declared">Declared</option>
132
- <option value="transitive">Transitive</option>
133
- </select>
134
- </label>
135
- <label>
136
- <span class="sr-only">Filter dependency scope</span>
137
- <select x-model="scope" :disabled="dataset() === 'transitive'" class="px-2.5 py-1.5 text-sm bg-white dark:bg-neutral-800 border border-stone-300 rounded-lg dark:border-neutral-600 disabled:opacity-50">
138
- <option value="all">All scopes</option>
139
- <option value="workspace">Workspace</option>
140
- <option value="third-party">Third-party</option>
141
- </select>
142
- </label>
128
+ <Select v-model:value="dataset" ariaLabel="Choose dependency dataset" placeholder="" :options="[{ value: 'declared', label: 'Declared' }, { value: 'transitive', label: 'Transitive' }]" />
129
+ <Select v-model:value="scope" ariaLabel="Filter dependency scope" placeholder="" :options="[{ value: 'all', label: 'All scopes' }, { value: 'workspace', label: 'Workspace' }, { value: 'third-party', label: 'Third-party' }]" :disabled="dataset() === 'transitive'" />
143
130
  </template>
144
131
  </Table>
145
132
  </section>
@@ -117,14 +117,7 @@ onMount(() => { void loadPackages() })
117
117
  empty-description="Adjust the search or visibility filter."
118
118
  >
119
119
  <template #toolbar>
120
- <label>
121
- <span class="sr-only">Filter package visibility</span>
122
- <select x-model="visibility" class="px-2.5 py-1.5 text-sm bg-white dark:bg-neutral-800 border border-stone-300 rounded-lg dark:border-neutral-600">
123
- <option value="all">All workspaces</option>
124
- <option value="public">Public</option>
125
- <option value="private">Private</option>
126
- </select>
127
- </label>
120
+ <Select v-model:value="visibility" ariaLabel="Filter package visibility" placeholder="" :options="[{ value: 'all', label: 'All workspaces' }, { value: 'public', label: 'Public' }, { value: 'private', label: 'Private' }]" />
128
121
  </template>
129
122
 
130
123
  <template #cell="{ row }">
@@ -66,18 +66,7 @@ function submit(): void {
66
66
  @close="close"
67
67
  >
68
68
  <form id="source-scaffold-form" @submit.prevent="submit">
69
- <label class="block">
70
- <span class="font-medium text-gray-700 text-sm dark:text-neutral-200">Name</span>
71
- <input
72
- x-model.trim="sourceName"
73
- name="name"
74
- required
75
- :pattern="pattern()"
76
- :placeholder="placeholder()"
77
- class="mt-1 px-3 py-2 w-full font-mono text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-gray-300 rounded-md dark:border-neutral-700"
78
- >
79
- <span class="block mt-1 text-gray-500 text-xs dark:text-neutral-400">{{ hint() }}</span>
80
- </label>
69
+ <Input v-model:value="sourceName" name="name" label="Name" :required="true" :pattern="pattern()" :placeholder="placeholder()" :hint="hint()" :spellcheck="false" :monospace="true" />
81
70
  </form>
82
71
 
83
72
  <div :if="error()" role="alert" class="mt-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">
@@ -376,7 +376,7 @@
376
376
  <div class="bg-white dark:bg-neutral-900 border border-zinc-200 rounded-lg dark:border-zinc-800">
377
377
  <div class="flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between px-5 py-3 border-b border-zinc-200 dark:border-zinc-800">
378
378
  <h2 class="font-medium text-sm text-zinc-700 dark:text-zinc-300">Roles (<span :text="roles().length"></span>)</h2>
379
- <input x-model="roleFilter" type="search" aria-label="Filter roles" placeholder="Filter roles…" class="block px-3 py-1 w-full sm:w-64 text-xs text-zinc-900 dark:text-zinc-100 dark:bg-neutral-800 border-0 ring-1 ring-zinc-300 rounded-md dark:ring-zinc-700 focus:ring-2 focus:ring-violet-500" />
379
+ <SearchFilter v-model:searchValue="roleFilter" placeholder="Filter roles…" ariaLabel="Filter roles" class="w-full sm:w-64" />
380
380
  </div>
381
381
  <div :if="filteredRoles().length === 0" class="px-5 py-8 text-center text-sm text-zinc-500" :text="roles().length === 0 ? 'No roles yet.' : 'No matching roles.'"></div>
382
382
  <div :if="filteredRoles().length > 0" class="overflow-x-auto">
@@ -424,7 +424,7 @@
424
424
  <div class="bg-white dark:bg-neutral-900 border border-zinc-200 rounded-lg dark:border-zinc-800">
425
425
  <div class="flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between px-5 py-3 border-b border-zinc-200 dark:border-zinc-800">
426
426
  <h2 class="font-medium text-sm text-zinc-700 dark:text-zinc-300">Permissions (<span :text="permissions().length"></span>)</h2>
427
- <input x-model="permissionFilter" type="search" aria-label="Filter permissions" placeholder="Filter permissions…" class="block px-3 py-1 w-full sm:w-64 text-xs text-zinc-900 dark:text-zinc-100 dark:bg-neutral-800 border-0 ring-1 ring-zinc-300 rounded-md dark:ring-zinc-700 focus:ring-2 focus:ring-violet-500" />
427
+ <SearchFilter v-model:searchValue="permissionFilter" placeholder="Filter permissions…" ariaLabel="Filter permissions" class="w-full sm:w-64" />
428
428
  </div>
429
429
  <div :if="filteredPermissions().length === 0" class="px-5 py-8 text-center text-sm text-zinc-500" :text="permissions().length === 0 ? 'No permissions yet.' : 'No matching permissions.'"></div>
430
430
  <div :if="filteredPermissions().length > 0" class="overflow-x-auto">
@@ -459,7 +459,7 @@
459
459
  <div class="bg-white dark:bg-neutral-900 border border-zinc-200 rounded-lg dark:border-zinc-800">
460
460
  <div class="flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between px-5 py-3 border-b border-zinc-200 dark:border-zinc-800">
461
461
  <h2 class="font-medium text-sm text-zinc-700 dark:text-zinc-300">Users (<span :text="users().length"></span>)</h2>
462
- <input x-model="userFilter" type="search" aria-label="Filter users" placeholder="Filter users…" class="block px-3 py-1 w-full sm:w-64 text-xs text-zinc-900 dark:text-zinc-100 dark:bg-neutral-800 border-0 ring-1 ring-zinc-300 rounded-md dark:ring-zinc-700 focus:ring-2 focus:ring-violet-500" />
462
+ <SearchFilter v-model:searchValue="userFilter" placeholder="Filter users…" ariaLabel="Filter users" class="w-full sm:w-64" />
463
463
  </div>
464
464
  <div :if="filteredUsers().length === 0" class="px-5 py-8 text-center text-sm text-zinc-500" :text="users().length === 0 ? 'No users found.' : 'No matching users.'"></div>
465
465
  <div :if="filteredUsers().length > 0" class="overflow-x-auto">