@stacksjs/components 0.2.343 → 0.2.345

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 (171) hide show
  1. package/dist/{Accordion-8tv78bh9.stx → Accordion-kescmd4y.stx} +24 -4
  2. package/dist/{AccordionItem-7bd3ga36.stx → AccordionItem-1q9k2qyc.stx} +1 -1
  3. package/dist/{Audio-y0sgq50z.stx → Audio-tnjd6anm.stx} +7 -7
  4. package/dist/{Avatar-e43x17z1.stx → Avatar-7vegrsg6.stx} +3 -3
  5. package/dist/Badge-439n5p0a.stx +74 -0
  6. package/dist/{Breadcrumb-csf164sd.stx → Breadcrumb-7hwnfyyw.stx} +21 -6
  7. package/dist/Button-tcjt3m8s.stx +193 -0
  8. package/dist/{Calendar-gjjhhfnt.stx → Calendar-ppqdw19s.stx} +7 -7
  9. package/dist/{Card-7byck6ep.stx → Card-r55zpjqh.stx} +6 -6
  10. package/dist/{Checkbox-2s2a7n4h.stx → Checkbox-e7gn3w06.stx} +10 -10
  11. package/dist/{ComboboxInput-z1293bbh.stx → ComboboxInput-9q87fb22.stx} +2 -2
  12. package/dist/{ComboboxOption-6yh7xk7q.stx → ComboboxOption-qm38e8e9.stx} +2 -2
  13. package/dist/{ComboboxOptions-sq5360ae.stx → ComboboxOptions-nbndbrxz.stx} +1 -1
  14. package/dist/{CommandPalette-fzfv1pme.stx → CommandPalette-mkqqep2s.stx} +4 -4
  15. package/dist/{DefaultPaymentMethod-6qrem3sg.stx → DefaultPaymentMethod-v11254p4.stx} +8 -8
  16. package/dist/Dialog-d1020hj6.stx +268 -0
  17. package/dist/DialogBackdrop-de5m5m4w.stx +12 -0
  18. package/dist/DialogPanel-vhdqymc2.stx +19 -0
  19. package/dist/{DialogTitle-x0r6k8x9.stx → DialogTitle-0jjdk5ra.stx} +1 -1
  20. package/dist/{Drawer-9jx39xef.stx → Drawer-rymajw9v.stx} +86 -21
  21. package/dist/{DropdownButton-wcz67dxy.stx → DropdownButton-n6gsmcte.stx} +2 -2
  22. package/dist/{DropdownItem-d8ht2bp5.stx → DropdownItem-qs772agw.stx} +1 -1
  23. package/dist/{DropdownItems-1sxnd5qn.stx → DropdownItems-yf25hdh1.stx} +1 -1
  24. package/dist/{EmailInput-vak3kkmk.stx → EmailInput-agb8kqae.stx} +4 -4
  25. package/dist/{FilterChip-h896vrxm.stx → FilterChip-00ja5jhz.stx} +27 -3
  26. package/dist/{Image-4ezne2xj.stx → Image-79xyzb5j.stx} +3 -3
  27. package/dist/{ListRow-v45ymhcn.stx → ListRow-8d3e1yxh.stx} +2 -2
  28. package/dist/{Listbox-0cyysv0f.stx → Listbox-e5jreb0a.stx} +1 -1
  29. package/dist/{ListboxButton-keb8gm0q.stx → ListboxButton-w3vfvte7.stx} +2 -2
  30. package/dist/{RadioGroupLabel-7mymt1b8.stx → ListboxLabel-ka0hfm7b.stx} +1 -1
  31. package/dist/{ListboxOption-4j070101.stx → ListboxOption-ea0j02a8.stx} +2 -2
  32. package/dist/{ListboxOptions-ejkatcfg.stx → ListboxOptions-qxrkrb8z.stx} +1 -1
  33. package/dist/{Login-2cp65d41.stx → Login-nmmkt5yd.stx} +14 -14
  34. package/dist/{NavBar-wcb6f2d3.stx → NavBar-qqrrhdnk.stx} +24 -0
  35. package/dist/{Navigator-smpa7my4.stx → Navigator-7rspzjys.stx} +4 -4
  36. package/dist/{Notification-03vfh3k6.stx → Notification-7wgk0sw6.stx} +6 -6
  37. package/dist/{NumberInput-j9p5bm5y.stx → NumberInput-54d23rq0.stx} +21 -11
  38. package/dist/{Pagination-ff7nzp7d.stx → Pagination-bvk2ss15.stx} +4 -4
  39. package/dist/{PasswordInput-4qykq1dz.stx → PasswordInput-3snyppj4.stx} +24 -14
  40. package/dist/{PaymentMethods-2xy66bwk.stx → PaymentMethods-tttjpa1m.stx} +10 -10
  41. package/dist/{PopoverButton-mffzc9pr.stx → PopoverButton-panmcysh.stx} +2 -2
  42. package/dist/{PopoverPanel-054yh38h.stx → PopoverPanel-7771yf35.stx} +2 -2
  43. package/dist/{Portal-yghnqdj8.stx → Portal-m73vz879.stx} +1 -1
  44. package/dist/{Progress-twhhzsd9.stx → Progress-cj0z83rx.stx} +47 -18
  45. package/dist/{Radio-ccm07b2m.stx → Radio-nr8rbb6g.stx} +9 -9
  46. package/dist/{RadioGroup-82ytfqdb.stx → RadioGroup-jg9s4ttg.stx} +1 -1
  47. package/dist/{ListboxLabel-7mymt1b8.stx → RadioGroupLabel-ka0hfm7b.stx} +1 -1
  48. package/dist/{RadioGroupOption-7pq7rw84.stx → RadioGroupOption-zvp0y9sn.stx} +2 -2
  49. package/dist/{SearchInput-pdx7agn0.stx → SearchInput-psbjk2ye.stx} +3 -3
  50. package/dist/{SectionCard-r73hvvbc.stx → SectionCard-8ctdacjr.stx} +28 -1
  51. package/dist/{Select-zt72gg1e.stx → Select-pj584jza.stx} +19 -9
  52. package/dist/{Sidebar-f1tff5p3.stx → Sidebar-ve2asgf3.stx} +6 -6
  53. package/dist/{SidebarHeader-3dppxxjh.stx → SidebarHeader-esvby82n.stx} +3 -3
  54. package/dist/{SidebarItem-5v8atp7p.stx → SidebarItem-r4f2pref.stx} +4 -4
  55. package/dist/{SidebarSection-sqz49ary.stx → SidebarSection-5sqza2j6.stx} +2 -2
  56. package/dist/{SidebarSpace-nmbvgrky.stx → SidebarSpace-bwv98azf.stx} +3 -3
  57. package/dist/{SidebarSpaceSwitcher-v5e472j0.stx → SidebarSpaceSwitcher-1mycft2g.stx} +1 -1
  58. package/dist/{SidebarSpaces-6v3p9htw.stx → SidebarSpaces-mdtrynr2.stx} +2 -2
  59. package/dist/{Signup-cbncrtvd.stx → Signup-wa31mdyc.stx} +11 -11
  60. package/dist/{Skeleton-y9tycz2h.stx → Skeleton-me2hwqrc.stx} +4 -4
  61. package/dist/{Spinner-reb6rse4.stx → Spinner-grahbp9a.stx} +9 -9
  62. package/dist/{StepperStep-3ahq4d9m.stx → StepperStep-xw55xjh0.stx} +9 -4
  63. package/dist/{SubscriptionCheckout-7fdkwf04.stx → SubscriptionCheckout-5c1cy7az.stx} +13 -13
  64. package/dist/{Switch-cgy7hy0s.stx → Switch-fxbw7s16.stx} +7 -4
  65. package/dist/{TabBarItem-hd2r2ayy.stx → TabBarItem-cnxhgy92.stx} +25 -1
  66. package/dist/{Table-0mc3fdek.stx → Table-akbk3t5q.stx} +1 -1
  67. package/dist/{TableHeader-sxc77b4d.stx → TableHeader-qsc3e208.stx} +1 -1
  68. package/dist/{TableRow-xd542nvb.stx → TableRow-ytr6b5by.stx} +1 -1
  69. package/dist/{Tabs-b4xsba1w.stx → Tabs-esrn6j8p.stx} +29 -9
  70. package/dist/{Teleport-3gnjtsjf.stx → Teleport-c8nn3757.stx} +2 -2
  71. package/dist/{TextInput-hbe2ynzj.stx → TextInput-9wqzeeg1.stx} +23 -13
  72. package/dist/{Textarea-xcdym703.stx → Textarea-xwkdg8se.stx} +11 -11
  73. package/dist/{Tooltip-y0kzkwh4.stx → Tooltip-g2j17eg9.stx} +13 -10
  74. package/dist/{Transition-7smenaz8.stx → Transition-yrvqbhjy.stx} +1 -1
  75. package/dist/{TwoFactorChallenge-y7n4yrk9.stx → TwoFactorChallenge-0200pjc0.stx} +5 -5
  76. package/dist/{Video-a0aeyexv.stx → Video-rhy7dskw.stx} +6 -6
  77. package/dist/{VirtualTable-jvm1784g.stx → VirtualTable-jhdnq8xe.stx} +5 -5
  78. package/dist/composables/index.js +2 -2
  79. package/dist/index.js +13 -13
  80. package/dist/utils/highlighter.d.ts +1 -0
  81. package/dist/utils/highlighter.js +1 -1
  82. package/package.json +3 -3
  83. package/src/components/CodeBlock.stx +7 -1
  84. package/src/components/Footer.stx +1 -1
  85. package/src/components/Hero.stx +2 -2
  86. package/src/components/Installation.stx +4 -4
  87. package/src/ui/accordion/Accordion.stx +24 -4
  88. package/src/ui/accordion/AccordionItem.stx +1 -1
  89. package/src/ui/audio/Audio.stx +7 -7
  90. package/src/ui/auth/Login.stx +14 -14
  91. package/src/ui/auth/Signup.stx +11 -11
  92. package/src/ui/auth/TwoFactorChallenge.stx +5 -5
  93. package/src/ui/avatar/Avatar.stx +3 -3
  94. package/src/ui/badge/Badge.stx +31 -19
  95. package/src/ui/breadcrumb/Breadcrumb.stx +21 -6
  96. package/src/ui/button/Button.stx +149 -30
  97. package/src/ui/calendar/Calendar.stx +7 -7
  98. package/src/ui/card/Card.stx +6 -6
  99. package/src/ui/checkbox/Checkbox.stx +10 -10
  100. package/src/ui/combobox/ComboboxInput.stx +2 -2
  101. package/src/ui/combobox/ComboboxOption.stx +2 -2
  102. package/src/ui/combobox/ComboboxOptions.stx +1 -1
  103. package/src/ui/command-palette/CommandPalette.stx +4 -4
  104. package/src/ui/dialog/Dialog.stx +231 -4
  105. package/src/ui/dialog/DialogBackdrop.stx +5 -2
  106. package/src/ui/dialog/DialogPanel.stx +5 -2
  107. package/src/ui/dialog/DialogTitle.stx +1 -1
  108. package/src/ui/dialog/README.md +15 -4
  109. package/src/ui/drawer/Drawer.stx +86 -21
  110. package/src/ui/dropdown/DropdownButton.stx +2 -2
  111. package/src/ui/dropdown/DropdownItem.stx +1 -1
  112. package/src/ui/dropdown/DropdownItems.stx +1 -1
  113. package/src/ui/heatmap/Heatmap.stx +1 -1
  114. package/src/ui/image/Image.stx +3 -3
  115. package/src/ui/input/EmailInput.stx +4 -4
  116. package/src/ui/input/NumberInput.stx +21 -11
  117. package/src/ui/input/PasswordInput.stx +24 -14
  118. package/src/ui/input/SearchInput.stx +3 -3
  119. package/src/ui/input/TextInput.stx +23 -13
  120. package/src/ui/listbox/Listbox.stx +1 -1
  121. package/src/ui/listbox/ListboxButton.stx +2 -2
  122. package/src/ui/listbox/ListboxLabel.stx +1 -1
  123. package/src/ui/listbox/ListboxOption.stx +2 -2
  124. package/src/ui/listbox/ListboxOptions.stx +1 -1
  125. package/src/ui/mobile/FilterChip.stx +27 -3
  126. package/src/ui/mobile/ListRow.stx +2 -2
  127. package/src/ui/mobile/NavBar.stx +24 -0
  128. package/src/ui/mobile/SectionCard.stx +28 -1
  129. package/src/ui/mobile/TabBarItem.stx +25 -1
  130. package/src/ui/navigator/Navigator.stx +4 -4
  131. package/src/ui/notification/Notification.stx +6 -6
  132. package/src/ui/pagination/Pagination.stx +4 -4
  133. package/src/ui/payment/DefaultPaymentMethod.stx +8 -8
  134. package/src/ui/payment/PaymentMethods.stx +10 -10
  135. package/src/ui/payment/SubscriptionCheckout.stx +13 -13
  136. package/src/ui/popover/PopoverButton.stx +2 -2
  137. package/src/ui/popover/PopoverPanel.stx +2 -2
  138. package/src/ui/portal/Portal.stx +1 -1
  139. package/src/ui/progress/Progress.stx +47 -18
  140. package/src/ui/radio/Radio.stx +9 -9
  141. package/src/ui/radio-group/RadioGroup.stx +1 -1
  142. package/src/ui/radio-group/RadioGroupLabel.stx +1 -1
  143. package/src/ui/radio-group/RadioGroupOption.stx +2 -2
  144. package/src/ui/select/Select.stx +19 -9
  145. package/src/ui/sidebar/Sidebar.stx +6 -6
  146. package/src/ui/sidebar/SidebarHeader.stx +3 -3
  147. package/src/ui/sidebar/SidebarItem.stx +4 -4
  148. package/src/ui/sidebar/SidebarSection.stx +2 -2
  149. package/src/ui/sidebar/SidebarSpace.stx +3 -3
  150. package/src/ui/sidebar/SidebarSpaceSwitcher.stx +1 -1
  151. package/src/ui/sidebar/SidebarSpaces.stx +2 -2
  152. package/src/ui/skeleton/Skeleton.stx +4 -4
  153. package/src/ui/spinner/Spinner.stx +9 -9
  154. package/src/ui/stepper/StepperStep.stx +9 -4
  155. package/src/ui/switch/Switch.stx +7 -4
  156. package/src/ui/table/Table.stx +1 -1
  157. package/src/ui/table/TableHeader.stx +1 -1
  158. package/src/ui/table/TableRow.stx +1 -1
  159. package/src/ui/tabs/Tabs.stx +29 -9
  160. package/src/ui/teleport/Teleport.stx +2 -2
  161. package/src/ui/textarea/Textarea.stx +11 -11
  162. package/src/ui/tooltip/Tooltip.stx +13 -10
  163. package/src/ui/transition/Transition.stx +1 -1
  164. package/src/ui/video/Video.stx +6 -6
  165. package/src/ui/virtual-table/VirtualTable.stx +5 -5
  166. package/src/utils/highlighter.ts +65 -4
  167. package/dist/Badge-xwjeq24d.stx +0 -62
  168. package/dist/Button-h2mk4wfw.stx +0 -74
  169. package/dist/Dialog-y5rz2vrq.stx +0 -41
  170. package/dist/DialogBackdrop-rxax3sec.stx +0 -9
  171. package/dist/DialogPanel-44d8jeqy.stx +0 -16
@@ -1,5 +1,10 @@
1
1
  <script server>
2
- export const stepNumber = $props.stepNumber
2
+ // Defaulted, and not only for tidiness: this value is spliced into the client
3
+ // script below as `const stepNumber = {{ stepNumber }}`. An undefined server
4
+ // value leaves the mustache in the JavaScript, which is a SyntaxError that
5
+ // takes the whole scoped script down -- onClick included. `??` rather than
6
+ // `||` so an explicit 0 (the first step) survives.
7
+ export const stepNumber = $props.stepNumber ?? 0
3
8
  export const currentStep = $props.currentStep || 0
4
9
  export const label = $props.label || ''
5
10
  export const description = $props.description || ''
@@ -27,9 +32,9 @@ function onClick() {
27
32
  <button
28
33
  type="button"
29
34
  @click="onClick()"
30
- class="flex items-center gap-3 focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 rounded-lg p-2"
35
+ class="flex items-center gap-3 focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 rounded-panel p-2"
31
36
  >
32
- <div class="{{ isComplete ? 'bg-info-solid' : isCurrent ? 'bg-info-solid ring-4 ring-blue-200 dark:ring-blue-800' : 'bg-neutral-300 dark:bg-neutral-600' }} w-10 h-10 rounded-full flex items-center justify-center text-white font-semibold transition-all">
37
+ <div class="{{ isComplete ? 'bg-accent-solid' : isCurrent ? 'bg-accent-solid ring-4 ring-blue-200 dark:ring-blue-800' : 'bg-neutral-300 dark:bg-neutral-600' }} w-10 h-10 rounded-full flex items-center justify-center text-white font-semibold transition-all">
33
38
  @if(isComplete)
34
39
  <svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
35
40
  <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" />
@@ -41,7 +46,7 @@ function onClick() {
41
46
 
42
47
  @if(label)
43
48
  <div class="text-left">
44
- <div class="text-sm font-medium {{ isCurrent ? 'text-info' : 'text-neutral-900 dark:text-white' }}">
49
+ <div class="text-sm font-medium {{ isCurrent ? 'text-accent' : 'text-fg' }}">
45
50
  {{ label }}
46
51
  </div>
47
52
  @if(description)
@@ -2,7 +2,7 @@
2
2
  export const products = $props.products || []
3
3
  export const stripePublicKey = $props.stripePublicKey || ''
4
4
  export const apiUrl = $props.apiUrl || ''
5
- export const showRemoveProduct = $props.showRemoveProduct ?? true
5
+ export const showRemoveProduct = $bool($props.showRemoveProduct, true)
6
6
  export const shipping = $props.shipping || 0
7
7
  export const taxes = $props.taxes || 0
8
8
  export const className = $props.className || ''
@@ -10,7 +10,7 @@ export const className = $props.className || ''
10
10
  export const subtotal = products.reduce((sum, product) => sum + (product.price * (product.quantity || 1)), 0)
11
11
  export const total = subtotal + shipping + taxes
12
12
 
13
- export const containerClasses = `bg-gray-50 dark:bg-blue-gray-900 ${className}`.trim()
13
+ export const containerClasses = `bg-neutral-50 dark:bg-neutral-900 ${className}`.trim()
14
14
  </script>
15
15
 
16
16
  <script client>
@@ -130,7 +130,7 @@ onMount(() => initializeStripe())
130
130
  name="email-address"
131
131
  autocomplete="email"
132
132
  required
133
- class="block w-full border border-line-strong rounded-md p-2 shadow-sm bg-white dark:bg-blue-gray-700 text-fg focus:border-indigo-500 dark:focus:border-indigo-400 sm:text-sm focus:ring-indigo-500 dark:focus:ring-indigo-400"
133
+ class="block w-full border border-line-strong rounded-control p-2 shadow-sm bg-field text-fg focus:border-indigo-500 dark:focus:border-indigo-400 sm:text-sm focus:ring-indigo-500 dark:focus:ring-indigo-400"
134
134
  />
135
135
  </div>
136
136
  </div>
@@ -154,14 +154,14 @@ onMount(() => initializeStripe())
154
154
  name="card-name"
155
155
  autocomplete="cc-name"
156
156
  required
157
- class="block w-full border border-line-strong rounded-md p-2 shadow-sm bg-white dark:bg-blue-gray-700 text-fg focus:border-indigo-500 sm:text-sm focus:ring-indigo-500"
157
+ class="block w-full border border-line-strong rounded-control p-2 shadow-sm bg-field text-fg focus:border-indigo-500 sm:text-sm focus:ring-indigo-500"
158
158
  />
159
159
  </div>
160
160
  </div>
161
161
 
162
162
  <!-- Stripe Element Mount Point -->
163
163
  <div class="sm:col-span-2">
164
- <div id="payment-element" class="mt-2 border border-line-strong rounded-md bg-white dark:bg-blue-gray-700 p-3"></div>
164
+ <div id="payment-element" class="mt-2 border border-line-strong rounded-control bg-field p-3"></div>
165
165
  </div>
166
166
  </div>
167
167
  </div>
@@ -198,7 +198,7 @@ onMount(() => initializeStripe())
198
198
  Order summary
199
199
  </h2>
200
200
 
201
- <div class="mt-4 border border-line rounded-lg bg-white dark:bg-blue-gray-800 shadow-sm">
201
+ <div class="mt-4 border border-line rounded-panel bg-panel shadow-sm">
202
202
  <h3 class="sr-only">Items in your cart</h3>
203
203
 
204
204
  <!-- Product List -->
@@ -207,10 +207,10 @@ onMount(() => initializeStripe())
207
207
  <li class="flex px-4 py-6 sm:px-6">
208
208
  <div class="flex-shrink-0">
209
209
  @if(product.images)
210
- <img src="{{ product.images }}" alt="{{ product.name }}" class="w-20 rounded-md" />
210
+ <img src="{{ product.images }}" alt="{{ product.name }}" class="w-20 rounded-control" />
211
211
  @else
212
- <div class="w-20 h-20 bg-surface-sunken rounded-md flex items-center justify-center">
213
- <svg class="h-8 w-8 text-gray-400" fill="none" viewBox="0 0 24 24" stroke="currentColor">
212
+ <div class="w-20 h-20 bg-surface-sunken rounded-control flex items-center justify-center">
213
+ <svg class="h-8 w-8 text-neutral-400" fill="none" viewBox="0 0 24 24" stroke="currentColor">
214
214
  <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z" />
215
215
  </svg>
216
216
  </div>
@@ -222,7 +222,7 @@ onMount(() => initializeStripe())
222
222
  <div class="min-w-0 flex-1">
223
223
  <h4 class="text-sm">
224
224
  @if(product.href)
225
- <StxLink to="{{ product.href }}" class="text-fg-strong font-medium hover:text-gray-800 dark:hover:text-gray-200">
225
+ <StxLink to="{{ product.href }}" class="text-fg-strong font-medium hover:text-neutral-800 dark:hover:text-neutral-200">
226
226
  {{ product.name }}
227
227
  </StxLink>
228
228
  @else
@@ -237,7 +237,7 @@ onMount(() => initializeStripe())
237
237
  <div class="ml-4 flow-root flex-shrink-0">
238
238
  <button
239
239
  type="button"
240
- class="flex items-center justify-center bg-white dark:bg-blue-gray-700 p-2.5 text-fg-subtle -m-2.5 hover:text-fg-soft"
240
+ class="flex items-center justify-center bg-field p-2.5 text-fg-subtle -m-2.5 hover:text-fg-soft"
241
241
  @click="onRemoveProduct('{{ product.id }}')"
242
242
  title="Remove"
243
243
  >
@@ -260,7 +260,7 @@ onMount(() => initializeStripe())
260
260
  <select
261
261
  id="quantity-{{ product.id }}"
262
262
  name="quantity"
263
- class="border border-line-strong rounded-md text-left text-base text-fg-strong font-medium shadow-sm bg-white dark:bg-blue-gray-700 focus:border-indigo-500 sm:text-sm focus:outline-none focus:ring-1 focus:ring-indigo-500"
263
+ class="border border-line-strong rounded-control text-left text-base text-fg-strong font-medium shadow-sm bg-field focus:border-indigo-500 sm:text-sm focus:outline-none focus:ring-1 focus:ring-indigo-500"
264
264
  >
265
265
  <option value="1" {{ (product.quantity || 1) === 1 ? 'selected' : '' }}>1</option>
266
266
  <option value="2" {{ (product.quantity || 1) === 2 ? 'selected' : '' }}>2</option>
@@ -317,7 +317,7 @@ onMount(() => initializeStripe())
317
317
  <div class="border-t border-line px-4 py-6 sm:px-6">
318
318
  <button
319
319
  type="submit"
320
- class="w-full border border-transparent rounded-md bg-accent-solid px-4 py-3 text-base text-white font-medium shadow-sm hover:bg-indigo-700 dark:hover:bg-indigo-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 focus:ring-offset-gray-50 dark:focus:ring-offset-gray-900"
320
+ class="w-full border border-transparent rounded-control bg-accent-solid px-4 py-3 text-base text-accent-ink font-medium shadow-sm hover:bg-accent-solid-hover focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 focus:ring-offset-surface"
321
321
  >
322
322
  Confirm order
323
323
  </button>
@@ -1,6 +1,6 @@
1
1
  <script server>
2
- export const checked = $props.checked || false
3
- export const disabled = $props.disabled || false
2
+ export const checked = $bool($props.checked)
3
+ export const disabled = $bool($props.disabled)
4
4
  export const size = $props.size || 'md'
5
5
  export const className = $props.className || ''
6
6
  export const label = $props.label || ''
@@ -11,7 +11,10 @@ const sizeConfig = {
11
11
  lg: { track: 'h-12 w-24', thumb: 'h-11 w-11', translate: 'translate-x-12' },
12
12
  }
13
13
 
14
- export const config = sizeConfig[size]
14
+ // Falls back rather than indexing to undefined: `size="huge"` is a typo, and
15
+ // without this it became `const config = {{ config }}` in the client script --
16
+ // a SyntaxError that killed the whole component rather than mis-sizing it.
17
+ export const config = sizeConfig[size] || sizeConfig.md
15
18
 
16
19
  export const trackBaseClasses = 'relative inline-flex shrink-0 cursor-pointer border-2 border-transparent rounded-full transition-colors duration-200 ease-in-out focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-offset-2 focus-visible:ring-offset-neutral-300 dark:focus-visible:ring-offset-neutral-700'
17
20
  export const trackDisabledClasses = disabled ? 'opacity-50 cursor-not-allowed pointer-events-none' : ''
@@ -37,7 +40,7 @@ function toggle() {
37
40
 
38
41
  function trackClasses() {
39
42
  const stateClass = isChecked()
40
- ? 'bg-blue-500 dark:bg-blue-600'
43
+ ? 'bg-accent-solid'
41
44
  : 'bg-neutral-400 dark:bg-neutral-600'
42
45
  return `${trackBase} ${stateClass} ${trackDisabled} ${config.track} ${extraClass}`.trim()
43
46
  }
@@ -9,12 +9,33 @@
9
9
  export const label = $props.label || ''
10
10
  export const href = $props.href || '#'
11
11
  export const icon = $props.icon || ''
12
- export const active = $props.active || false
12
+ export const active = $bool($props.active)
13
13
  /** A count, or any short string. Zero and empty are not rendered. */
14
14
  export const badge = $props.badge || ''
15
15
 
16
16
  export const hasBadge = badge !== '' && badge !== 0 && badge !== '0'
17
17
 
18
+ /*
19
+ * Whether the router should own this link.
20
+ *
21
+ * The SPA router intercepts `[data-stx-link]` and nothing else, so a plain
22
+ * `<a href>` here was a full document load: the runtime rebooted, every signal
23
+ * and store was discarded, and the screen flashed white. On a phone this is
24
+ * the primary navigation control, so the app's main interaction was its worst
25
+ * one - the single largest reason a wrapped build feels like a browser rather
26
+ * than an app. stacksjs/stx#1988
27
+ *
28
+ * An absolute URL, a scheme (mailto:, tel:), a protocol-relative URL and a
29
+ * bare fragment are left to the browser: the router does not handle those, and
30
+ * claiming them would break a tab that points off-site.
31
+ */
32
+ function routerOwns(url) {
33
+ if (!url || url === '#') return false
34
+ return !/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i.test(url)
35
+ }
36
+
37
+ export const routerOwned = routerOwns(href)
38
+
18
39
  /*
19
40
  * The active state is a filled pill behind the item rather than a colour
20
41
  * change alone. Colour alone is the one distinction that disappears for the
@@ -32,6 +53,9 @@ export const itemClasses = `
32
53
  href="{{ href }}"
33
54
  class="{{ itemClasses }}"
34
55
  data-stx-tab-bar-item
56
+ @if (routerOwned)
57
+ data-stx-link
58
+ @endif
35
59
  @if (active)
36
60
  aria-current="page"
37
61
  @endif
@@ -1,6 +1,6 @@
1
1
  <script server>
2
2
  export const className = $props.className || ''
3
- export const striped = $props.striped || false
3
+ export const striped = $bool($props.striped)
4
4
  export const hoverable = $props.hoverable !== false
5
5
 
6
6
  const baseClasses = 'min-w-full divide-y divide-line'
@@ -1,6 +1,6 @@
1
1
  <script server>
2
2
  export const className = $props.className || ''
3
- export const sortable = $props.sortable || false
3
+ export const sortable = $bool($props.sortable)
4
4
 
5
5
  const baseClasses = 'px-6 py-3 text-left text-xs font-medium text-fg-soft uppercase tracking-wider'
6
6
  const sortableClasses = sortable ? 'cursor-pointer hover:text-fg-strong' : ''
@@ -2,7 +2,7 @@
2
2
  export const className = $props.className || ''
3
3
  export const hoverable = $props.hoverable !== false
4
4
 
5
- const hoverClasses = hoverable ? 'hover:bg-surface' : ''
5
+ const hoverClasses = hoverable ? 'hover:bg-surface-hover' : ''
6
6
  const rowClasses = `${hoverClasses} ${className}`.trim()
7
7
  </script>
8
8
 
@@ -25,12 +25,12 @@ const tabListOrientationClasses = {
25
25
 
26
26
  const variantClasses = {
27
27
  line: 'border-line',
28
- pills: 'gap-2 border-0 bg-surface-raised p-1 rounded-lg',
28
+ pills: 'gap-2 border-0 bg-surface-raised p-1 rounded-panel',
29
29
  enclosed: 'border-line',
30
30
  }
31
31
 
32
- export const containerClasses = `flex ${orientationClasses[orientation]} ${className}`.trim()
33
- export const tabListClasses = `flex ${tabListOrientationClasses[orientation]} ${variantClasses[variant]}`.trim()
32
+ export const containerClasses = `flex ${orientationClasses[orientation] || orientationClasses.horizontal} ${className}`.trim()
33
+ export const tabListClasses = `flex ${tabListOrientationClasses[orientation] || tabListOrientationClasses.horizontal} ${variantClasses[variant] || variantClasses.line}`.trim()
34
34
  export const tabPanelClasses = `p-4 focus:outline-none`.trim()
35
35
  // True when the parent passes a non-empty `tabs` array — switches to the
36
36
  // legacy render path so existing snapshots stay byte-identical.
@@ -43,12 +43,30 @@ const tabs = {{ tabs }}
43
43
  const variant = {{ variant }}
44
44
  const orientation = {{ orientation }}
45
45
  const hasPropTabs = {{ hasPropTabs }}
46
- const containerRef = useRef()
46
+ // useRef takes the NAME the x-ref attribute uses. Called with no
47
+ // argument it read $refs[undefined], which nothing ever fills, so
48
+ // containerRef.value was null forever - the mount hook found no panels,
49
+ // the list stayed empty, and the component rendered nothing.
50
+ // stacksjs/stx#1979
51
+ const containerRef = useRef('containerRef')
47
52
  // In slot mode, `discoveredTabs` is populated from child <TabPanel> data
48
53
  // attributes on mount. In prop mode, it mirrors the `tabs` prop so the
49
54
  // rendering loop works the same in both modes.
50
55
  const discoveredTabs = state(hasPropTabs ? tabs : [])
51
56
  const activeTab = state({{ defaultTab }})
57
+ /*
58
+ * Whether the mount hook has run.
59
+ *
60
+ * The effect below reaches into the DOM through containerRef, and an effect's
61
+ * first run happens while the setup function is still executing - before
62
+ * hydration has wired x-ref, so containerRef.value is null and the query can
63
+ * only come back empty. Nothing else it reads ever changed afterwards, so it
64
+ * never ran again and the DOM was never touched: every panel kept the hidden
65
+ * attribute it was served with, forever. Reading this makes the effect re-run
66
+ * once the DOM is actually reachable. stacksjs/stx#1979
67
+ */
68
+ const mounted = state(false)
69
+
52
70
 
53
71
  // Walk only direct descendants of THIS container (not nested Tabs').
54
72
  function findOwnPanels() {
@@ -68,12 +86,14 @@ onMount(() => {
68
86
  icon: p.dataset.icon || '',
69
87
  }))
70
88
  discoveredTabs.set(list)
89
+ mounted.set(true)
71
90
  })
72
91
 
73
92
  // In slot mode, toggle each panel's `hidden` attribute as activeTab changes.
74
93
  // Prop mode is handled inline by the @foreach loop's :show binding below.
75
94
  effect(() => {
76
95
  if (hasPropTabs) return
96
+ if (!mounted()) return
77
97
  const panels = findOwnPanels()
78
98
  const idx = activeTab()
79
99
  panels.forEach((p, i) => {
@@ -94,17 +114,17 @@ function isActive(index) {
94
114
 
95
115
  function getTabClasses(index) {
96
116
  const isActiveTab = isActive(index)
97
- const base = 'px-4 py-2 font-medium text-sm transition-colors duration-150 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 dark:focus:ring-offset-gray-900'
117
+ const base = 'px-4 py-2 font-medium text-sm transition-colors duration-150 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 focus:ring-offset-panel'
98
118
  if (variant === 'line') {
99
119
  const border = orientation === 'horizontal' ? 'border-b-2' : 'border-r-2'
100
- return `${base} ${border} ${isActiveTab ? 'border-blue-500 text-info' : 'border-transparent text-fg-muted hover:text-fg hover:border-line-strong'}`
120
+ return `${base} ${border} ${isActiveTab ? 'border-blue-500 text-accent' : 'border-transparent text-fg-muted hover:text-fg hover:border-line-strong'}`
101
121
  }
102
122
  if (variant === 'pills') {
103
- return `${base} rounded-md ${isActiveTab ? 'bg-white dark:bg-gray-700 text-fg shadow-sm' : 'text-fg-muted hover:text-fg'}`
123
+ return `${base} rounded-control ${isActiveTab ? 'bg-field text-fg shadow-sm' : 'text-fg-muted hover:text-fg'}`
104
124
  }
105
125
  if (variant === 'enclosed') {
106
- const borders = orientation === 'horizontal' ? 'border-t border-l border-r rounded-t-md' : 'border-t border-l border-b rounded-l-md'
107
- return `${base} ${borders} ${isActiveTab ? 'bg-white dark:bg-gray-800 border-line -mb-px' : 'bg-surface border-transparent hover:border-line'}`
126
+ const borders = orientation === 'horizontal' ? 'border-t border-l border-r rounded-t-control' : 'border-t border-l border-b rounded-l-control'
127
+ return `${base} ${borders} ${isActiveTab ? 'bg-panel border-line -mb-px' : 'bg-surface border-transparent hover:border-line'}`
108
128
  }
109
129
  return base
110
130
  }
@@ -1,7 +1,7 @@
1
1
  <script server>
2
2
  export const to = $props.to || 'body'
3
- export const disabled = $props.disabled || false
4
- export const defer = $props.defer || false
3
+ export const disabled = $bool($props.disabled)
4
+ export const defer = $bool($props.defer)
5
5
 
6
6
  export const teleportId = $uid
7
7
  </script>
@@ -1,39 +1,49 @@
1
1
  <script server>
2
2
  export const value = $props.value || ''
3
3
  export const placeholder = $props.placeholder || ''
4
- export const disabled = $props.disabled || false
5
- export const readonly = $props.readonly || false
4
+ export const disabled = $bool($props.disabled)
5
+ export const readonly = $bool($props.readonly)
6
6
  export const size = $props.size || 'md'
7
- export const error = $props.error || false
7
+ export const error = $bool($props.error)
8
8
  export const label = $props.label || ''
9
9
  export const helperText = $props.helperText || ''
10
- export const required = $props.required || false
10
+ export const required = $bool($props.required)
11
11
  export const leftIcon = $props.leftIcon || ''
12
12
  export const rightIcon = $props.rightIcon || ''
13
- export const clearable = $props.clearable || false
13
+ export const clearable = $bool($props.clearable)
14
14
  export const maxLength = $props.maxLength
15
- export const showCount = $props.showCount || false
15
+ export const showCount = $bool($props.showCount)
16
16
  export const className = $props.className || ''
17
17
  export const inputClassName = $props.inputClassName || ''
18
18
 
19
- const sizeClasses = { sm: 'px-3 py-1.5 text-sm h-8', md: 'px-4 py-2 text-base h-10', lg: 'px-5 py-3 text-lg h-12' }
19
+ /*
20
+ * Padding decides the height here too, with no `h-*` to override it: an app
21
+ * passing its own `py-1.5` got the padding it asked for and the height it did
22
+ * not, and `className` cannot beat `h-10` at equal specificity
23
+ * (stacksjs/stx#1993).
24
+ *
25
+ * `lg` also needed a padding step adjusted - py-3 around a 1.75rem line-height
26
+ * is 3.25rem of content inside a declared 3rem box - so py-2.5 lands on the
27
+ * 3rem it always claimed. sm and md were already exact.
28
+ */
29
+ const sizeClasses = { sm: 'px-3 py-1.5 text-sm', md: 'px-4 py-2 text-base', lg: 'px-5 py-2.5 text-lg' }
20
30
  const iconSizeClasses = { sm: 'h-4 w-4', md: 'h-5 w-5', lg: 'h-6 w-6' }
21
31
 
22
- const baseClasses = 'block w-full border-0 rounded-md shadow-sm ring-1 ring-inset transition-colors duration-200 focus:ring-2 focus:ring-inset dark:bg-blue-gray-700 dark:text-gray-100'
32
+ const baseClasses = 'block w-full border-0 rounded-control shadow-sm ring-1 ring-inset transition-colors duration-200 focus:ring-2 focus:ring-inset dark:bg-neutral-700 dark:text-neutral-100'
23
33
  const stateClasses = error
24
- ? 'ring-red-300 dark:ring-red-600 text-red-900 dark:text-red-300 placeholder-red-300 dark:placeholder-red-500 focus:ring-red-500 dark:focus:ring-red-400'
34
+ ? 'ring-danger-line text-danger-fg placeholder-danger-fg-subtle focus:ring-danger-focus'
25
35
  : 'ring-line-strong text-fg placeholder-fg-subtle focus:ring-accent'
26
36
  const disabledClasses = disabled
27
37
  ? 'opacity-50 cursor-not-allowed bg-surface'
28
38
  : readonly
29
39
  ? 'bg-surface cursor-default'
30
- : 'bg-white dark:bg-blue-gray-700'
40
+ : 'bg-field'
31
41
  const paddingClasses = leftIcon ? 'pl-10' : rightIcon || clearable ? 'pr-10' : ''
32
42
 
33
- export const inputClasses = `${baseClasses} ${sizeClasses[size]} ${stateClasses} ${disabledClasses} ${paddingClasses} ${inputClassName}`.trim()
43
+ export const inputClasses = `${baseClasses} ${sizeClasses[size] || sizeClasses.md} ${stateClasses} ${disabledClasses} ${paddingClasses} ${inputClassName}`.trim()
34
44
  export const labelClasses = `block text-sm font-medium leading-6 mb-2 ${error ? 'text-danger' : 'text-fg'}`.trim()
35
45
  export const helperClasses = `mt-2 text-sm ${error ? 'text-danger' : 'text-fg-soft'}`.trim()
36
- export const iconClasses = iconSizeClasses[size]
46
+ export const iconClasses = iconSizeClasses[size] || iconSizeClasses.md
37
47
  export const inputId = `input-${label}`
38
48
  </script>
39
49
 
@@ -69,7 +79,7 @@ defineExpose({ value: inputValue, clear: onClear })
69
79
  <label for="{{ inputId }}" class="{{ labelClasses }}">
70
80
  {{ label }}
71
81
  @if(required)
72
- <span class="text-red-500 ml-1">*</span>
82
+ <span class="text-danger ml-1">*</span>
73
83
  @endif
74
84
  </label>
75
85
  @endif
@@ -1,32 +1,32 @@
1
1
  <script server>
2
2
  export const value = $props.value || ''
3
3
  export const placeholder = $props.placeholder || ''
4
- export const disabled = $props.disabled || false
5
- export const readonly = $props.readonly || false
4
+ export const disabled = $bool($props.disabled)
5
+ export const readonly = $bool($props.readonly)
6
6
  export const rows = $props.rows || 4
7
- export const autoResize = $props.autoResize || false
7
+ export const autoResize = $bool($props.autoResize)
8
8
  export const maxRows = $props.maxRows || 10
9
- export const error = $props.error || false
9
+ export const error = $bool($props.error)
10
10
  export const label = $props.label || ''
11
11
  export const helperText = $props.helperText || ''
12
- export const required = $props.required || false
12
+ export const required = $bool($props.required)
13
13
  export const maxLength = $props.maxLength
14
- export const showCount = $props.showCount || false
14
+ export const showCount = $bool($props.showCount)
15
15
  export const resize = $props.resize || 'vertical'
16
16
  export const className = $props.className || ''
17
17
 
18
18
  const resizeClasses = { none: 'resize-none', vertical: 'resize-y', horizontal: 'resize-x', both: 'resize' }
19
- const baseClasses = 'block w-full border-0 rounded-md shadow-sm ring-1 ring-inset transition-colors duration-200 focus:ring-2 focus:ring-inset px-4 py-2 text-base dark:bg-blue-gray-700 dark:text-gray-100'
19
+ const baseClasses = 'block w-full border-0 rounded-control shadow-sm ring-1 ring-inset transition-colors duration-200 focus:ring-2 focus:ring-inset px-4 py-2 text-base dark:bg-neutral-700 dark:text-neutral-100'
20
20
  const stateClasses = error
21
- ? 'ring-red-300 dark:ring-red-600 text-red-900 dark:text-red-300 placeholder-red-300 dark:placeholder-red-500 focus:ring-red-500 dark:focus:ring-red-400'
21
+ ? 'ring-danger-line text-danger-fg placeholder-danger-fg-subtle focus:ring-danger-focus'
22
22
  : 'ring-line-strong text-fg placeholder-fg-subtle focus:ring-accent'
23
23
  const disabledClasses = disabled
24
24
  ? 'opacity-50 cursor-not-allowed bg-surface'
25
25
  : readonly
26
26
  ? 'bg-surface cursor-default'
27
- : 'bg-white dark:bg-blue-gray-700'
27
+ : 'bg-field'
28
28
 
29
- export const textareaClasses = `${baseClasses} ${stateClasses} ${disabledClasses} ${resizeClasses[resize]} ${className}`.trim()
29
+ export const textareaClasses = `${baseClasses} ${stateClasses} ${disabledClasses} ${resizeClasses[resize] || resizeClasses.vertical} ${className}`.trim()
30
30
  export const labelClasses = `block text-sm font-medium leading-6 mb-2 ${error ? 'text-danger' : 'text-fg'}`.trim()
31
31
  export const helperClasses = `mt-2 text-sm ${error ? 'text-danger' : 'text-fg-soft'}`.trim()
32
32
  </script>
@@ -71,7 +71,7 @@ defineExpose({ value: inputValue })
71
71
  <label for="textarea-input" class="{{ labelClasses }}">
72
72
  {{ label }}
73
73
  @if(required)
74
- <span class="text-red-500 ml-1">*</span>
74
+ <span class="text-danger ml-1">*</span>
75
75
  @endif
76
76
  </label>
77
77
  @endif
@@ -3,8 +3,8 @@ export const content = $props.content || ''
3
3
  export const position = $props.position || 'top'
4
4
  export const delay = $props.delay || 0
5
5
  export const className = $props.className || ''
6
- export const show = $props.show || false
7
- export const disabled = $props.disabled || false
6
+ export const show = $bool($props.show)
7
+ export const disabled = $bool($props.disabled)
8
8
 
9
9
  const positionClasses = {
10
10
  top: 'bottom-full left-1/2 -translate-x-1/2 mb-2',
@@ -14,25 +14,28 @@ const positionClasses = {
14
14
  }
15
15
 
16
16
  const arrowClasses = {
17
- top: 'top-full left-1/2 -translate-x-1/2 border-t-gray-900 dark:border-t-gray-700',
18
- bottom: 'bottom-full left-1/2 -translate-x-1/2 border-b-gray-900 dark:border-b-gray-700',
19
- left: 'left-full top-1/2 -translate-y-1/2 border-l-gray-900 dark:border-l-gray-700',
20
- right: 'right-full top-1/2 -translate-y-1/2 border-r-gray-900 dark:border-r-gray-700',
17
+ top: 'top-full left-1/2 -translate-x-1/2 border-t-inverse',
18
+ bottom: 'bottom-full left-1/2 -translate-x-1/2 border-b-inverse',
19
+ left: 'left-full top-1/2 -translate-y-1/2 border-l-inverse',
20
+ right: 'right-full top-1/2 -translate-y-1/2 border-r-inverse',
21
21
  }
22
22
 
23
- export const tooltipClasses = `absolute z-50 px-3 py-2 text-sm font-medium text-white bg-gray-900 dark:bg-gray-700 rounded-lg shadow-lg whitespace-nowrap pointer-events-none transition-opacity duration-200 ${positionClasses[position]} ${className}`.trim()
24
- export const arrowClass = `absolute w-0 h-0 border-4 border-transparent ${arrowClasses[position]}`.trim()
23
+ export const tooltipClasses = `absolute z-50 px-3 py-2 text-sm font-medium text-inverse-ink bg-inverse rounded-panel shadow-lg whitespace-nowrap pointer-events-none transition-opacity duration-200 ${positionClasses[position] || positionClasses.top} ${className}`.trim()
24
+ export const arrowClass = `absolute w-0 h-0 border-4 border-transparent ${arrowClasses[position] || arrowClasses.top}`.trim()
25
25
  </script>
26
26
 
27
27
  <script client>
28
28
  const delay = {{ delay }}
29
- const isDisabled = {{ disabled }}
29
+ // A live prop: a tooltip is commonly suppressed by state the page only learns
30
+ // about later — while a field is being edited, or once a hint has been read —
31
+ // and frozen it could only ever reflect the state the page was built in.
32
+ const isDisabled = useReactiveProp('disabled', {{ disabled }})
30
33
  // Reactive prop binding — parent can drive `show` via signals. See #1704.
31
34
  const isVisible = useReactiveProp('show', {{ show }})
32
35
  let timeoutId = null
33
36
 
34
37
  function showTooltip() {
35
- if (isDisabled) return
38
+ if (isDisabled()) return
36
39
  if (delay > 0) {
37
40
  timeoutId = setTimeout(() => isVisible.set(true), delay)
38
41
  }
@@ -6,7 +6,7 @@ export const enterTo = $props.enterTo || 'opacity-100'
6
6
  export const leave = $props.leave || 'transition-opacity duration-200'
7
7
  export const leaveFrom = $props.leaveFrom || 'opacity-100'
8
8
  export const leaveTo = $props.leaveTo || 'opacity-0'
9
- export const appear = $props.appear || false
9
+ export const appear = $bool($props.appear)
10
10
  export const duration = $props.duration || 300
11
11
  export const delay = $props.delay || 0
12
12
  export const preset = $props.preset || ''
@@ -3,10 +3,10 @@ export const headingText = $props.headingText || 'Two Factor Authentication'
3
3
  export const labelText = $props.labelText || 'Authentication code'
4
4
  export const instructionText = $props.instructionText || 'Open your Symantec 2FA app to view your authentication code.'
5
5
  export const codeLength = $props.codeLength || 6
6
- export const showRecoveryCode = $props.showRecoveryCode ?? true
6
+ export const showRecoveryCode = $bool($props.showRecoveryCode, true)
7
7
  export const className = $props.className || ''
8
8
 
9
- export const containerClasses = `py-32 dark:bg-blue-gray-900 ${className}`.trim()
9
+ export const containerClasses = `py-32 dark:bg-neutral-900 ${className}`.trim()
10
10
  </script>
11
11
 
12
12
  <script client>
@@ -53,7 +53,7 @@ function onRecoveryCode(event) {
53
53
  </script>
54
54
 
55
55
  <div class="{{ containerClasses }}">
56
- <div class="mx-auto max-w-sm rounded-md px-8 py-4 shadow-md bg-white dark:bg-blue-gray-800">
56
+ <div class="mx-auto max-w-sm rounded-control px-8 py-4 shadow-md bg-panel">
57
57
  <div class="card-body">
58
58
  <div>
59
59
  <h3 class="text-center text-sm text-fg font-semibold">
@@ -63,7 +63,7 @@ function onRecoveryCode(event) {
63
63
  {{ labelText }}
64
64
  </label>
65
65
  <form @submit="onSubmit($event)">
66
- <div class="mt-2 flex rounded-md shadow-sm space-x-2">
66
+ <div class="mt-2 flex rounded-control shadow-sm space-x-2">
67
67
  @for(i in Array(codeLength).keys())
68
68
  <input
69
69
  id="code-{{ i }}"
@@ -71,7 +71,7 @@ function onRecoveryCode(event) {
71
71
  maxlength="1"
72
72
  name="code-{{ i }}"
73
73
  placeholder="-"
74
- class="block w-full border-0 rounded-md px-2 py-2 text-center text-fg ring-1 ring-line-strong ring-inset sm:text-sm placeholder:text-fg-subtle sm:leading-6 focus:ring-2 focus:ring-indigo-600 focus:ring-inset dark:bg-blue-gray-700"
74
+ class="block w-full border-0 rounded-control px-2 py-2 text-center text-fg ring-1 ring-line-strong ring-inset sm:text-sm placeholder:text-fg-subtle sm:leading-6 focus:ring-2 focus:ring-indigo-600 focus:ring-inset dark:bg-neutral-700"
75
75
  @input="onCodeInput($event, {{ i }})"
76
76
  @keydown="onKeyDown($event, {{ i }})"
77
77
  />
@@ -1,10 +1,10 @@
1
1
  <script server>
2
2
  export const src = $props.src || ''
3
3
  export const poster = $props.poster || ''
4
- export const autoplay = $props.autoplay || false
5
- export const loop = $props.loop || false
6
- export const muted = $props.muted || false
7
- export const controls = $props.controls ?? true
4
+ export const autoplay = $bool($props.autoplay)
5
+ export const loop = $bool($props.loop)
6
+ export const muted = $bool($props.muted)
7
+ export const controls = $bool($props.controls, true)
8
8
  export const preload = $props.preload || 'metadata'
9
9
  export const width = $props.width
10
10
  export const height = $props.height
@@ -12,8 +12,8 @@ export const aspectRatio = $props.aspectRatio || '16/9'
12
12
  export const className = $props.className || ''
13
13
  export const title = $props.title || ''
14
14
 
15
- export const containerClasses = `relative w-full overflow-hidden rounded-lg ${className}`.trim()
16
- export const videoClasses = 'w-full h-full object-cover bg-gray-900 dark:bg-gray-950'
15
+ export const containerClasses = `relative w-full overflow-hidden rounded-panel ${className}`.trim()
16
+ export const videoClasses = 'w-full h-full object-cover bg-neutral-900 dark:bg-neutral-950'
17
17
  export const aspectRatioClass = aspectRatio === '16/9' ? 'aspect-video' : aspectRatio === '4/3' ? 'aspect-[4/3]' : aspectRatio === '1/1' ? 'aspect-square' : ''
18
18
  </script>
19
19
 
@@ -5,16 +5,16 @@ export const rowHeight = $props.rowHeight || 48
5
5
  export const height = $props.height || 600
6
6
  export const headerHeight = $props.headerHeight || 56
7
7
  export const overscan = $props.overscan || 5
8
- export const striped = $props.striped || false
9
- export const hoverable = $props.hoverable ?? true
8
+ export const striped = $bool($props.striped)
9
+ export const hoverable = $bool($props.hoverable, true)
10
10
  export const className = $props.className || ''
11
11
 
12
12
  export const totalHeight = data.length * rowHeight
13
- export const containerClasses = `border border-line rounded-lg overflow-hidden ${className}`.trim()
13
+ export const containerClasses = `border border-line rounded-panel overflow-hidden ${className}`.trim()
14
14
  export const headerClasses = `bg-surface border-b border-line flex`.trim()
15
15
  export const headerCellClasses = `px-6 py-3 text-left text-xs font-medium text-fg-soft uppercase tracking-wider`.trim()
16
- export const bodyClasses = `overflow-auto bg-white dark:bg-gray-900`.trim()
17
- export const rowClasses = `absolute left-0 right-0 flex border-b border-line ${hoverable ? 'hover:bg-surface' : ''}`.trim()
16
+ export const bodyClasses = `overflow-auto bg-white dark:bg-neutral-900`.trim()
17
+ export const rowClasses = `absolute left-0 right-0 flex border-b border-line ${hoverable ? 'hover:bg-surface-hover' : ''}`.trim()
18
18
  export const cellClasses = `px-6 py-4 text-sm text-fg`.trim()
19
19
  </script>
20
20