@stacksjs/components 0.2.345 → 0.2.347

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 (85) hide show
  1. package/dist/{Accordion-kescmd4y.stx → Accordion-py9ntmst.stx} +1 -1
  2. package/dist/{AccordionItem-1q9k2qyc.stx → AccordionItem-asmsqxz9.stx} +1 -1
  3. package/dist/{Audio-tnjd6anm.stx → Audio-byv8kkvt.stx} +1 -1
  4. package/dist/{Avatar-7vegrsg6.stx → Avatar-axrzqsdk.stx} +5 -5
  5. package/dist/{Badge-439n5p0a.stx → Badge-4jxqhkv9.stx} +1 -1
  6. package/dist/{Breadcrumb-7hwnfyyw.stx → Breadcrumb-pach6f1f.stx} +2 -2
  7. package/dist/{ComboboxInput-9q87fb22.stx → ComboboxInput-4jcpvw7e.stx} +1 -1
  8. package/dist/{ComboboxOption-qm38e8e9.stx → ComboboxOption-vnb67p8d.stx} +1 -1
  9. package/dist/{CommandPalette-mkqqep2s.stx → CommandPalette-6rjcgske.stx} +1 -1
  10. package/dist/{CommandPaletteItem-chdw0070.stx → CommandPaletteItem-6rp133ta.stx} +1 -1
  11. package/dist/{DefaultPaymentMethod-v11254p4.stx → DefaultPaymentMethod-r0hcjajr.stx} +1 -1
  12. package/dist/{Drawer-rymajw9v.stx → Drawer-jcdj3qk2.stx} +1 -1
  13. package/dist/{DropdownButton-n6gsmcte.stx → DropdownButton-tx9hb2de.stx} +1 -1
  14. package/dist/{DropdownItem-qs772agw.stx → DropdownItem-wht1vcm5.stx} +1 -1
  15. package/dist/{DropdownItems-yf25hdh1.stx → DropdownItems-v12h6zpf.stx} +1 -1
  16. package/dist/{ListboxButton-w3vfvte7.stx → ListboxButton-t43pp03e.stx} +1 -1
  17. package/dist/{ListboxOption-ea0j02a8.stx → ListboxOption-9c9jpz1n.stx} +1 -1
  18. package/dist/{Login-nmmkt5yd.stx → Login-j3pc04ka.stx} +7 -7
  19. package/dist/{Navigator-7rspzjys.stx → Navigator-1yk1c3pp.stx} +2 -2
  20. package/dist/{NumberInput-54d23rq0.stx → NumberInput-awn66hfs.stx} +5 -5
  21. package/dist/{Pagination-bvk2ss15.stx → Pagination-z9jxnaeq.stx} +3 -3
  22. package/dist/{PasswordInput-3snyppj4.stx → PasswordInput-hradj0xd.stx} +4 -4
  23. package/dist/{PaymentMethods-tttjpa1m.stx → PaymentMethods-z4hhr0kv.stx} +3 -3
  24. package/dist/{PopoverButton-panmcysh.stx → PopoverButton-70th24xc.stx} +1 -1
  25. package/dist/{Progress-cj0z83rx.stx → Progress-bv65bwh8.stx} +2 -2
  26. package/dist/{RadioGroup-jg9s4ttg.stx → RadioGroup-hzz4xep9.stx} +1 -1
  27. package/dist/{RadioGroupOption-zvp0y9sn.stx → RadioGroupOption-7fcgfsah.stx} +1 -1
  28. package/dist/{Select-pj584jza.stx → Select-sbr8dqzn.stx} +3 -3
  29. package/dist/{Signup-wa31mdyc.stx → Signup-77y9ea7t.stx} +6 -6
  30. package/dist/{Spinner-grahbp9a.stx → Spinner-vhnc3y03.stx} +3 -3
  31. package/dist/{StepperStep-xw55xjh0.stx → StepperStep-34kwv0t0.stx} +2 -2
  32. package/dist/{SubscriptionCheckout-5c1cy7az.stx → SubscriptionCheckout-pggq5a4k.stx} +7 -7
  33. package/dist/{TabBarItem-cnxhgy92.stx → TabBarItem-wv2r8496.stx} +1 -1
  34. package/dist/{TableBody-drxyz5jh.stx → TableBody-y49bqb1p.stx} +1 -1
  35. package/dist/{Tabs-esrn6j8p.stx → Tabs-51vr631j.stx} +2 -2
  36. package/dist/{TextInput-9wqzeeg1.stx → TextInput-48ghmccm.stx} +6 -6
  37. package/dist/{Textarea-xwkdg8se.stx → Textarea-dndmk6ah.stx} +3 -3
  38. package/dist/{TwoFactorChallenge-0200pjc0.stx → TwoFactorChallenge-n8fcm5ct.stx} +4 -4
  39. package/dist/{VirtualTable-jhdnq8xe.stx → VirtualTable-kp7b3wyv.stx} +1 -1
  40. package/dist/index.js +3 -3
  41. package/dist/utils/highlighter.js +1 -1
  42. package/package.json +3 -3
  43. package/src/components/CodeBlock.stx +53 -4
  44. package/src/components/Footer.stx +8 -8
  45. package/src/components/Hero.stx +2 -2
  46. package/src/ui/accordion/Accordion.stx +1 -1
  47. package/src/ui/accordion/AccordionItem.stx +1 -1
  48. package/src/ui/audio/Audio.stx +1 -1
  49. package/src/ui/auth/Login.stx +7 -7
  50. package/src/ui/auth/Signup.stx +6 -6
  51. package/src/ui/auth/TwoFactorChallenge.stx +4 -4
  52. package/src/ui/avatar/Avatar.stx +5 -5
  53. package/src/ui/badge/Badge.stx +1 -1
  54. package/src/ui/breadcrumb/Breadcrumb.stx +2 -2
  55. package/src/ui/combobox/ComboboxInput.stx +1 -1
  56. package/src/ui/combobox/ComboboxOption.stx +1 -1
  57. package/src/ui/command-palette/CommandPalette.stx +1 -1
  58. package/src/ui/command-palette/CommandPaletteItem.stx +1 -1
  59. package/src/ui/drawer/Drawer.stx +1 -1
  60. package/src/ui/dropdown/DropdownButton.stx +1 -1
  61. package/src/ui/dropdown/DropdownItem.stx +1 -1
  62. package/src/ui/dropdown/DropdownItems.stx +1 -1
  63. package/src/ui/input/NumberInput.stx +5 -5
  64. package/src/ui/input/PasswordInput.stx +4 -4
  65. package/src/ui/input/TextInput.stx +6 -6
  66. package/src/ui/listbox/ListboxButton.stx +1 -1
  67. package/src/ui/listbox/ListboxOption.stx +1 -1
  68. package/src/ui/mobile/TabBarItem.stx +1 -1
  69. package/src/ui/navigator/Navigator.stx +2 -2
  70. package/src/ui/pagination/Pagination.stx +3 -3
  71. package/src/ui/payment/DefaultPaymentMethod.stx +1 -1
  72. package/src/ui/payment/PaymentMethods.stx +3 -3
  73. package/src/ui/payment/SubscriptionCheckout.stx +7 -7
  74. package/src/ui/popover/PopoverButton.stx +1 -1
  75. package/src/ui/progress/Progress.stx +2 -2
  76. package/src/ui/radio-group/RadioGroup.stx +1 -1
  77. package/src/ui/radio-group/RadioGroupOption.stx +1 -1
  78. package/src/ui/select/Select.stx +3 -3
  79. package/src/ui/spinner/Spinner.stx +3 -3
  80. package/src/ui/stepper/StepperStep.stx +2 -2
  81. package/src/ui/table/TableBody.stx +1 -1
  82. package/src/ui/tabs/Tabs.stx +2 -2
  83. package/src/ui/textarea/Textarea.stx +3 -3
  84. package/src/ui/virtual-table/VirtualTable.stx +1 -1
  85. package/src/utils/highlighter.ts +31 -7
@@ -4,8 +4,15 @@ import { applyHeadwindClasses, highlight } from '../utils/highlighter'
4
4
  export const code = $props.code || ''
5
5
  export const language = $props.language || 'typescript'
6
6
  export const theme = $props.theme || 'auto'
7
- export const lineNumbers = $props.lineNumbers !== false
8
- export const copyable = $props.copyable !== false
7
+ /*
8
+ * `$bool`, not `!== false`. A plain attribute arrives as a STRING, so
9
+ * `copyable="false"` was `'false' !== false` - true - and the copy button
10
+ * rendered anyway, which is half of why #2014 looked like a template-gating
11
+ * problem. Same shape as the 103 props in stacksjs/stx#2006; `!== false` is a
12
+ * third spelling of it that the library-wide sweep does not recognise.
13
+ */
14
+ export const lineNumbers = $bool($props.lineNumbers, true)
15
+ export const copyable = $bool($props.copyable, true)
9
16
  export const className = $props.className || ''
10
17
 
11
18
  const result = await highlight(code, { language, theme, lineNumbers })
@@ -16,10 +23,41 @@ export const highlightedCode = applyHeadwindClasses(result.html, className)
16
23
  // before interpolation runs, so emitting it here ships an empty tag. Until that
17
24
  // is fixed in stx, an app includes this itself (or sets its own token styles).
18
25
  export const highlightCss = result.css
26
+
27
+ /*
28
+ * The clipboard payload, decided on the SERVER.
29
+ *
30
+ * `{{ copyable ? code : '' }}` in the client script does not work:
31
+ * interpolateScriptExpressions resolves an identifier or a property path, not
32
+ * an arbitrary expression, so a ternary emits nothing at all (#1989) and the
33
+ * declaration came out as a bare `const code = `. A named export is a plain
34
+ * identifier, which is what the interpolator can resolve.
35
+ */
36
+ export const copyPayload = copyable ? code : ''
19
37
  </script>
20
38
 
21
39
  <script client>
22
- const code = {{ code }}
40
+ /*
41
+ * The code is shipped to the browser only when there is a copy button to need
42
+ * it (stacksjs/stx#2014).
43
+ *
44
+ * This was an unconditional `const code = {{ code }}`, while `copyable` gated
45
+ * only the button in the template - so `:copyable="false"` still emitted the
46
+ * full snippet as page JavaScript. An app whose blocks are install commands
47
+ * carrying a per-resource credential had no way to render one without that,
48
+ * which defeats an invariant it maintains deliberately: stx's own
49
+ * extractBridgeData skips `__` and `$` names, and `:code="__agentInstall.install"`
50
+ * routed straight around it. In the ordinary case it was dead weight - a block
51
+ * with no copy button shipping a duplicate of its own content.
52
+ *
53
+ * Reading the text out of the DOM at click time would drop the payload for
54
+ * everyone, which the report suggests and which I measured before rejecting:
55
+ * the highlighter renders line numbers as TEXT, so once `lineNumbers` is
56
+ * honoured (it is currently accepted and dropped) `textContent` copies
57
+ * "1const a = 1" rather than the code. Gating is the version that cannot
58
+ * silently corrupt what lands on the clipboard.
59
+ */
60
+ const code = {{ copyPayload }}
23
61
  const copied = state(false)
24
62
 
25
63
  async function copyToClipboard() {
@@ -40,7 +78,18 @@ async function copyToClipboard() {
40
78
  @if(copyable)
41
79
  <button
42
80
  @click="copyToClipboard()"
43
- class="absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity duration-200 px-3 py-1.5 bg-neutral-800 hover:bg-neutral-700 text-white text-xs rounded-panel font-medium"
81
+ {{-- Reachable without a mouse (#2014). It was `opacity-0
82
+ group-hover:opacity-100` with no focus variant, so a keyboard user
83
+ who tabbed to it saw nothing and on a touch device it never appeared
84
+ at all - the control was there, took focus, and was invisible.
85
+
86
+ `focus-visible:opacity-100` fixes the keyboard half. The touch half
87
+ cannot be done with a hover variant, and the engine has no
88
+ `@media (hover: none)` variant to hang it on, so the button is now
89
+ always present at 60% and comes to full opacity on hover or focus.
90
+ That is a visible change - the button no longer hides until pointed
91
+ at - and it is the only arrangement that is operable on a phone. --}}
92
+ class="absolute top-2 right-2 opacity-60 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity duration-200 px-3 py-1.5 bg-neutral-800 hover:bg-neutral-700 text-white text-xs rounded-panel font-medium"
44
93
  aria-label="Copy code"
45
94
  >
46
95
  <span :show="copied()" class="flex items-center gap-1.5">
@@ -14,11 +14,11 @@ export const currentYear = new Date().getFullYear()
14
14
  <div class="flex flex-col items-center justify-center">
15
15
  <p class="text-sm">
16
16
  With 💙 by
17
- <a href="{{ authorUrl }}" class="text-blue-500 hover:text-blue-600 dark:text-blue-400 dark:hover:text-blue-300 transition-colors">
17
+ <a href="{{ authorUrl }}" class="text-link hover:text-link-hover transition-colors">
18
18
  {{ author }}
19
19
  </a>
20
20
  &
21
- <a href="{{ projectUrl }}" class="text-blue-500 hover:text-blue-600 dark:text-blue-400 dark:hover:text-blue-300 transition-colors">
21
+ <a href="{{ projectUrl }}" class="text-link hover:text-link-hover transition-colors">
22
22
  {{ project }}
23
23
  </a>
24
24
  <span> © {{ currentYear }}</span>
@@ -26,11 +26,11 @@ export const currentYear = new Date().getFullYear()
26
26
 
27
27
  <div class="mt-2 flex flex-col items-center sm:flex-row space-x-1 space-y-2 sm:space-y-0">
28
28
  <div class="flex items-center space-x-1">
29
- <svg class="w-4 h-4 text-blue-500" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true">
29
+ <svg class="w-4 h-4 text-link" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true">
30
30
  <path d="M8.29 20.251c7.547 0 11.675-6.253 11.675-11.675 0-.178 0-.355-.012-.53A8.348 8.348 0 0022 5.92a8.19 8.19 0 01-2.357.646 4.118 4.118 0 001.804-2.27 8.224 8.224 0 01-2.605.996 4.107 4.107 0 00-6.993 3.743 11.65 11.65 0 01-8.457-4.287 4.106 4.106 0 001.27 5.477A4.072 4.072 0 012.8 9.713v.052a4.105 4.105 0 003.292 4.022 4.095 4.095 0 01-1.853.07 4.108 4.108 0 003.834 2.85A8.233 8.233 0 012 18.407a11.616 11.616 0 006.29 1.84" />
31
31
  </svg>
32
32
  <span class="text-sm">
33
- <a href="{{ twitterUrl }}" target="_blank" rel="noopener noreferrer" class="text-blue-500 hover:text-blue-600 dark:text-blue-400 dark:hover:text-blue-300 transition-colors">
33
+ <a href="{{ twitterUrl }}" target="_blank" rel="noopener noreferrer" class="text-link hover:text-link-hover transition-colors">
34
34
  Follow me on Twitter
35
35
  </a>
36
36
  </span>
@@ -39,11 +39,11 @@ export const currentYear = new Date().getFullYear()
39
39
  <span class="hidden px-2 text-neutral-400 sm:block">|</span>
40
40
 
41
41
  <div class="flex items-center space-x-1">
42
- <svg class="w-4 h-4 text-blue-500" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true">
42
+ <svg class="w-4 h-4 text-link" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true">
43
43
  <path d="M20.216 6.415l-.132-.666c-.119-.598-.388-1.163-1.001-1.379-.197-.069-.42-.098-.57-.241-.152-.143-.196-.366-.231-.572-.065-.378-.125-.756-.192-1.133-.057-.325-.102-.69-.25-.987-.195-.4-.597-.634-.996-.788a5.723 5.723 0 00-.626-.194c-1-.263-2.05-.36-3.077-.416a25.834 25.834 0 00-3.7.062c-.915.083-1.88.184-2.75.5-.318.116-.646.256-.888.501-.297.302-.393.77-.177 1.146.154.267.415.456.692.58.36.162.737.284 1.123.366 1.075.238 2.189.331 3.287.37 1.218.05 2.437.01 3.65-.118.299-.033.598-.073.896-.119.352-.054.578-.513.474-.834-.124-.383-.457-.531-.834-.473-.466.074-.96.108-1.382.146-1.177.08-2.358.082-3.536.006a22.228 22.228 0 01-1.157-.107c-.086-.01-.18-.025-.258-.036-.243-.036-.484-.08-.724-.13-.111-.027-.111-.185 0-.212h.005c.277-.06.557-.108.838-.147h.002c.131-.009.263-.032.394-.048a25.076 25.076 0 013.426-.12c.674.019 1.347.067 2.017.144l.228.031c.267.04.533.088.798.145.392.085.895.113 1.07.542.055.137.08.288.111.431l.319 1.484a.237.237 0 01-.199.284h-.003c-.037.006-.075.01-.112.015a36.704 36.704 0 01-4.743.295 37.059 37.059 0 01-4.699-.304c-.14-.017-.293-.042-.417-.06-.326-.048-.649-.108-.973-.161-.393-.065-.768-.032-1.123.161-.29.16-.527.404-.675.701-.154.316-.199.66-.267 1-.069.34-.176.707-.135 1.056.087.753.613 1.365 1.37 1.502a39.69 39.69 0 0011.343.376.483.483 0 01.535.53l-.071.697-1.018 9.907c-.041.41-.047.832-.125 1.237-.122.637-.553 1.028-1.182 1.171-.577.131-1.165.2-1.756.205-.656.004-1.31-.025-1.966-.022-.699.004-1.556-.06-2.095-.58-.475-.458-.54-1.174-.605-1.793l-.731-7.013-.322-3.094c-.037-.351-.286-.695-.678-.678-.336.015-.718.3-.678.679l.228 2.185.949 9.112c.147 1.344 1.174 2.068 2.446 2.272.742.12 1.503.144 2.257.156.966.016 1.942.053 2.892-.122 1.408-.258 2.465-1.198 2.616-2.657.34-3.332.683-6.663 1.024-9.995l.215-2.087a.484.484 0 01.39-.426c.402-.078.787-.212 1.074-.518.455-.488.546-1.124.385-1.766zm-1.478.772c-.145.137-.363.201-.578.233-2.416.359-4.866.54-7.308.46-1.748-.06-3.477-.254-5.207-.498-.17-.024-.353-.055-.47-.18-.22-.236-.111-.71-.054-.995.052-.26.152-.609.463-.646.484-.057 1.046.148 1.526.22.577.088 1.156.16 1.737.212 2.48.226 5.002.19 7.472-.14.45-.06.899-.13 1.345-.21.399-.072.84-.206 1.08.206.166.281.188.657.162.974a.544.544 0 01-.169.364zm-6.159 3.9c-.862.37-1.84.788-3.109.788a5.884 5.884 0 01-1.569-.217l.877 9.004c.065.78.717 1.38 1.5 1.38 0 0 1.243.065 1.658.065.447 0 1.786-.065 1.786-.065.783 0 1.434-.6 1.499-1.38l.94-9.95a3.996 3.996 0 00-1.322-.238c-.826 0-1.491.284-2.26.613z" />
44
44
  </svg>
45
45
  <span class="text-sm">
46
- <a href="{{ coffeeUrl }}" target="_blank" rel="noopener noreferrer" class="text-blue-500 hover:text-blue-600 dark:text-blue-400 dark:hover:text-blue-300 transition-colors">
46
+ <a href="{{ coffeeUrl }}" target="_blank" rel="noopener noreferrer" class="text-link hover:text-link-hover transition-colors">
47
47
  Buy me a coffee
48
48
  </a>
49
49
  </span>
@@ -52,11 +52,11 @@ export const currentYear = new Date().getFullYear()
52
52
  <span class="hidden px-2 text-neutral-400 sm:block">|</span>
53
53
 
54
54
  <div class="flex items-center space-x-1">
55
- <svg class="w-4 h-4 text-blue-500" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true">
55
+ <svg class="w-4 h-4 text-link" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true">
56
56
  <path d="m11.645 20.91-.007-.003-.022-.012a15.247 15.247 0 0 1-.383-.218 25.18 25.18 0 0 1-4.244-3.17C4.688 15.36 2.25 12.174 2.25 8.25 2.25 5.322 4.714 3 7.688 3A5.5 5.5 0 0 1 12 5.052 5.5 5.5 0 0 1 16.313 3c2.973 0 5.437 2.322 5.437 5.25 0 3.925-2.438 7.111-4.739 9.256a25.175 25.175 0 0 1-4.244 3.17 15.247 15.247 0 0 1-.383.219l-.022.012-.007.004-.003.001a.752.752 0 0 1-.704 0l-.003-.001Z" />
57
57
  </svg>
58
58
  <span class="text-sm">
59
- <a href="{{ sponsorUrl }}" target="_blank" rel="noopener noreferrer" class="text-blue-500 hover:text-blue-600 dark:text-blue-400 dark:hover:text-blue-300 transition-colors">
59
+ <a href="{{ sponsorUrl }}" target="_blank" rel="noopener noreferrer" class="text-link hover:text-link-hover transition-colors">
60
60
  Sponsor me on GitHub
61
61
  </a>
62
62
  </span>
@@ -5,7 +5,7 @@ export const githubUrl = $props.githubUrl || '#'
5
5
  </script>
6
6
 
7
7
  <div class="flex flex-col items-center gap-3">
8
- <h1 class="text-5xl font-bold mb-3 -mt-5 bg-gradient-to-r from-blue-500 to-purple-600 bg-clip-text text-transparent">
8
+ <h1 class="text-5xl font-bold mb-3 -mt-5 bg-gradient-to-r from-accent to-secondary bg-clip-text text-transparent">
9
9
  {{ title }}
10
10
  </h1>
11
11
  <p class="mb-3 mt-0 text-lg text-fg-muted">
@@ -17,7 +17,7 @@ export const githubUrl = $props.githubUrl || '#'
17
17
  href="{{ githubUrl }}"
18
18
  target="_blank"
19
19
  rel="noopener noreferrer"
20
- class="inline-flex items-center justify-center h-10 px-8 rounded-control text-sm font-semibold bg-gradient-to-b from-white to-neutral-100 dark:from-neutral-800 dark:to-neutral-900 text-fg shadow-md hover:shadow-lg transition-all duration-200"
20
+ class="inline-flex items-center justify-center h-10 px-8 rounded-control text-sm font-semibold bg-gradient-to-b from-panel to-neutral-100 dark:to-neutral-900 text-fg shadow-md hover:shadow-lg transition-all duration-200"
21
21
  >
22
22
  GitHub
23
23
  </a>
@@ -12,7 +12,7 @@ export const defaultOpen = $props.defaultOpen || []
12
12
  export const className = $props.className || ''
13
13
 
14
14
  export const accordionClasses = `divide-y divide-line border border-line rounded-panel ${className}`.trim()
15
- export const headerClasses = `w-full flex items-center justify-between px-4 py-3 text-left font-medium text-fg hover:bg-surface-hover transition-colors duration-150 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 focus:ring-offset-panel`.trim()
15
+ export const headerClasses = `w-full flex items-center justify-between px-4 py-3 text-left font-medium text-fg hover:bg-surface-hover transition-colors duration-150 focus:outline-none focus:ring-2 focus:ring-accent-solid focus:ring-offset-2 focus:ring-offset-panel`.trim()
16
16
  export const iconClasses = `w-5 h-5 text-fg-soft transition-transform duration-200`.trim()
17
17
  export const contentClasses = `px-4 py-3 text-fg-strong`.trim()
18
18
  export const hasPropItems = Array.isArray(items) && items.length > 0
@@ -7,7 +7,7 @@
7
7
  export const title = $props.title || ''
8
8
  export const className = $props.className || ''
9
9
 
10
- const headerClasses = 'w-full flex items-center justify-between px-4 py-3 text-left font-medium text-fg hover:bg-surface-hover transition-colors duration-150 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 focus:ring-offset-panel'
10
+ const headerClasses = 'w-full flex items-center justify-between px-4 py-3 text-left font-medium text-fg hover:bg-surface-hover transition-colors duration-150 focus:outline-none focus:ring-2 focus:ring-accent-solid focus:ring-offset-2 focus:ring-offset-panel'
11
11
  const iconClasses = 'w-5 h-5 text-fg-soft transition-transform duration-200'
12
12
  const contentClasses = 'px-4 py-3 text-fg-strong'
13
13
  </script>
@@ -42,7 +42,7 @@ export const audioClasses = 'w-full rounded-control bg-surface-raised'
42
42
  fill="none"
43
43
  stroke="currentColor"
44
44
  stroke-width="2"
45
- class="text-indigo-500 dark:text-indigo-400"
45
+ class="text-accent"
46
46
  />
47
47
  </svg>
48
48
  </div>
@@ -16,7 +16,7 @@ export const className = $props.className || ''
16
16
  export const forgotPasswordHref = $props.forgotPasswordHref || '/forgot-password'
17
17
  export const signupHref = $props.signupHref || '/register'
18
18
 
19
- export const containerClasses = `min-h-full flex flex-col justify-center py-12 lg:px-8 sm:px-6 dark:bg-neutral-900 ${className}`.trim()
19
+ export const containerClasses = `min-h-full flex flex-col justify-center py-12 lg:px-8 sm:px-6 bg-page ${className}`.trim()
20
20
  </script>
21
21
 
22
22
  <script client>
@@ -68,7 +68,7 @@ function onSubmit(event) {
68
68
  type="email"
69
69
  autocomplete="email"
70
70
  required
71
- class="block w-full border-0 rounded-control py-1.5 text-fg shadow-sm 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"
71
+ class="block w-full border-0 rounded-control py-1.5 text-fg shadow-sm ring-1 ring-line-strong ring-inset sm:text-sm placeholder:text-fg-soft sm:leading-6 focus:ring-2 focus:ring-accent focus:ring-inset bg-field"
72
72
  />
73
73
  </div>
74
74
  </div>
@@ -84,7 +84,7 @@ function onSubmit(event) {
84
84
  type="password"
85
85
  autocomplete="current-password"
86
86
  required
87
- class="block w-full border-0 rounded-control py-1.5 text-fg shadow-sm 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"
87
+ class="block w-full border-0 rounded-control py-1.5 text-fg shadow-sm ring-1 ring-line-strong ring-inset sm:text-sm placeholder:text-fg-soft sm:leading-6 focus:ring-2 focus:ring-accent focus:ring-inset bg-field"
88
88
  />
89
89
  </div>
90
90
  </div>
@@ -96,7 +96,7 @@ function onSubmit(event) {
96
96
  id="remember-me"
97
97
  name="remember-me"
98
98
  type="checkbox"
99
- class="h-4 w-4 border-line-strong rounded text-indigo-600 focus:ring-indigo-600 dark:bg-neutral-700"
99
+ class="h-4 w-4 border-line-strong rounded text-accent focus:ring-accent bg-field"
100
100
  />
101
101
  <label for="remember-me" class="ml-3 block text-sm text-fg leading-6">
102
102
  Remember me
@@ -106,7 +106,7 @@ function onSubmit(event) {
106
106
 
107
107
  @if(showForgotPassword)
108
108
  <div class="text-sm leading-6">
109
- <StxLink to="{{ forgotPasswordHref }}" class="text-accent font-semibold hover:text-indigo-500 dark:hover:text-indigo-300">
109
+ <StxLink to="{{ forgotPasswordHref }}" class="text-accent font-semibold hover:text-accent">
110
110
  Forgot password?
111
111
  </StxLink>
112
112
  </div>
@@ -116,7 +116,7 @@ function onSubmit(event) {
116
116
  <div>
117
117
  <button
118
118
  type="submit"
119
- class="w-full flex justify-center rounded-control bg-indigo-600 px-3 py-1.5 text-sm text-white font-semibold leading-6 shadow-sm hover:bg-indigo-500 focus-visible:outline-2 focus-visible:outline-indigo-600 focus-visible:outline-offset-2 focus-visible:outline"
119
+ class="w-full flex justify-center rounded-control bg-accent-solid px-3 py-1.5 text-sm text-accent-ink font-semibold leading-6 shadow-sm hover:bg-accent-solid-hover focus-visible:outline-2 focus-visible:outline-accent focus-visible:outline-offset-2 focus-visible:outline"
120
120
  >
121
121
  Sign in
122
122
  </button>
@@ -169,7 +169,7 @@ function onSubmit(event) {
169
169
  @if(showSignup)
170
170
  <p class="mt-10 text-center text-sm text-fg-soft">
171
171
  Not a member?
172
- <StxLink to="{{ signupHref }}" class="text-accent font-semibold leading-6 hover:text-indigo-500 dark:hover:text-indigo-300">
172
+ <StxLink to="{{ signupHref }}" class="text-accent font-semibold leading-6 hover:text-accent">
173
173
  {{ signupText }}
174
174
  </StxLink>
175
175
  </p>
@@ -3,7 +3,7 @@ export const headingText = $props.headingText || 'Sign up for Stacks'
3
3
  export const showSocialSignup = $bool($props.showSocialSignup, true)
4
4
  export const className = $props.className || ''
5
5
 
6
- export const containerClasses = `min-h-full flex flex-col justify-center py-12 lg:px-8 sm:px-6 dark:bg-neutral-900 ${className}`.trim()
6
+ export const containerClasses = `min-h-full flex flex-col justify-center py-12 lg:px-8 sm:px-6 bg-page ${className}`.trim()
7
7
  </script>
8
8
 
9
9
  <script client>
@@ -60,7 +60,7 @@ function onSubmit(event) {
60
60
  type="text"
61
61
  autocomplete="name"
62
62
  required
63
- class="block w-full border-0 rounded-control p-2 py-1.5 text-fg shadow-sm ring-1 ring-line-strong ring-inset sm:text-sm placeholder:text-fg-subtle sm:leading-6 focus:ring-2 focus:ring-teal-600 focus:ring-inset dark:bg-neutral-700"
63
+ class="block w-full border-0 rounded-control p-2 py-1.5 text-fg shadow-sm ring-1 ring-line-strong ring-inset sm:text-sm placeholder:text-fg-soft sm:leading-6 focus:ring-2 focus:ring-accent focus:ring-inset bg-field"
64
64
  />
65
65
  </div>
66
66
  </div>
@@ -76,7 +76,7 @@ function onSubmit(event) {
76
76
  type="email"
77
77
  autocomplete="email"
78
78
  required
79
- class="block w-full border-0 rounded-control p-2 py-1.5 text-fg shadow-sm ring-1 ring-line-strong ring-inset sm:text-sm placeholder:text-fg-subtle sm:leading-6 focus:ring-2 focus:ring-teal-600 focus:ring-inset dark:bg-neutral-700"
79
+ class="block w-full border-0 rounded-control p-2 py-1.5 text-fg shadow-sm ring-1 ring-line-strong ring-inset sm:text-sm placeholder:text-fg-soft sm:leading-6 focus:ring-2 focus:ring-accent focus:ring-inset bg-field"
80
80
  />
81
81
  </div>
82
82
  </div>
@@ -92,7 +92,7 @@ function onSubmit(event) {
92
92
  type="email"
93
93
  autocomplete="email"
94
94
  required
95
- class="block w-full border-0 rounded-control p-2 py-1.5 text-fg shadow-sm ring-1 ring-line-strong ring-inset sm:text-sm placeholder:text-fg-subtle sm:leading-6 focus:ring-2 focus:ring-teal-600 focus:ring-inset dark:bg-neutral-700"
95
+ class="block w-full border-0 rounded-control p-2 py-1.5 text-fg shadow-sm ring-1 ring-line-strong ring-inset sm:text-sm placeholder:text-fg-soft sm:leading-6 focus:ring-2 focus:ring-accent focus:ring-inset bg-field"
96
96
  />
97
97
  </div>
98
98
  </div>
@@ -108,7 +108,7 @@ function onSubmit(event) {
108
108
  type="password"
109
109
  autocomplete="new-password"
110
110
  required
111
- class="block w-full border-0 rounded-control p-2 py-1.5 text-fg shadow-sm ring-1 ring-line-strong ring-inset sm:text-sm placeholder:text-fg-subtle sm:leading-6 focus:ring-2 focus:ring-teal-600 focus:ring-inset dark:bg-neutral-700"
111
+ class="block w-full border-0 rounded-control p-2 py-1.5 text-fg shadow-sm ring-1 ring-line-strong ring-inset sm:text-sm placeholder:text-fg-soft sm:leading-6 focus:ring-2 focus:ring-accent focus:ring-inset bg-field"
112
112
  />
113
113
  </div>
114
114
  </div>
@@ -116,7 +116,7 @@ function onSubmit(event) {
116
116
  <div>
117
117
  <button
118
118
  type="submit"
119
- class="w-full flex justify-center rounded-control bg-teal-600 px-3 py-1.5 text-sm text-white font-semibold leading-6 shadow-sm hover:bg-teal-500 focus-visible:outline-2 focus-visible:outline-teal-600 focus-visible:outline-offset-2 focus-visible:outline"
119
+ class="w-full flex justify-center rounded-control bg-accent-solid px-3 py-1.5 text-sm text-accent-ink font-semibold leading-6 shadow-sm hover:bg-accent-solid-hover focus-visible:outline-2 focus-visible:outline-accent focus-visible:outline-offset-2 focus-visible:outline"
120
120
  >
121
121
  Sign up
122
122
  </button>
@@ -6,7 +6,7 @@ export const codeLength = $props.codeLength || 6
6
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-neutral-900 ${className}`.trim()
9
+ export const containerClasses = `py-32 bg-page ${className}`.trim()
10
10
  </script>
11
11
 
12
12
  <script client>
@@ -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-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"
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-soft sm:leading-6 focus:ring-2 focus:ring-accent focus:ring-inset bg-field"
75
75
  @input="onCodeInput($event, {{ i }})"
76
76
  @keydown="onKeyDown($event, {{ i }})"
77
77
  />
@@ -80,7 +80,7 @@ function onRecoveryCode(event) {
80
80
  <div class="py-4">
81
81
  <button
82
82
  type="submit"
83
- class="relative h-8 w-full flex items-center justify-center rounded-full bg-teal-600 px-4 text-white font-semibold hover:bg-teal-500 focus:outline-none focus:ring-2 focus:ring-teal-600 focus:ring-offset-2"
83
+ class="relative h-8 w-full flex items-center justify-center rounded-full bg-accent-solid px-4 text-accent-ink font-semibold hover:bg-accent-solid-hover focus:outline-none focus:ring-2 focus:ring-accent focus:ring-offset-2"
84
84
  >
85
85
  Verify
86
86
  </button>
@@ -99,7 +99,7 @@ function onRecoveryCode(event) {
99
99
  <button
100
100
  type="button"
101
101
  @click="onRecoveryCode($event)"
102
- class="text-xs text-blue-500 hover:underline"
102
+ class="text-xs text-link hover:underline"
103
103
  >
104
104
  Use recovery code instead
105
105
  </button>
@@ -28,17 +28,17 @@ const statusSizeClasses = {
28
28
  }
29
29
 
30
30
  const statusColorClasses = {
31
- online: 'bg-green-500 dark:bg-green-400',
32
- offline: 'bg-neutral-400 dark:bg-neutral-600',
33
- away: 'bg-yellow-500 dark:bg-yellow-400',
34
- busy: 'bg-red-500 dark:bg-red-400',
31
+ online: 'bg-success',
32
+ offline: 'bg-fg-subtle',
33
+ away: 'bg-warning',
34
+ busy: 'bg-danger',
35
35
  }
36
36
 
37
37
  export const containerClasses = `relative inline-block ${className}`.trim()
38
38
  export const avatarClasses = `flex items-center justify-center overflow-hidden bg-surface-sunken ${sizeClasses[size] || sizeClasses.md} ${shapeClasses[shape] || shapeClasses.circle}`.trim()
39
39
  export const imageClasses = `w-full h-full object-cover`.trim()
40
40
  export const initialsClasses = `font-medium text-fg-muted uppercase select-none`.trim()
41
- export const statusClasses = status ? `absolute bottom-0 right-0 ${statusSizeClasses[size] || statusSizeClasses.md} ${statusColorClasses[status] || statusColorClasses.offline} ${shapeClasses[shape] || shapeClasses.circle} border-white dark:border-neutral-900`.trim() : ''
41
+ export const statusClasses = status ? `absolute bottom-0 right-0 ${statusSizeClasses[size] || statusSizeClasses.md} ${statusColorClasses[status] || statusColorClasses.offline} ${shapeClasses[shape] || shapeClasses.circle} border-panel`.trim() : ''
42
42
  export const displayInitials = initials || (alt ? alt.split(' ').map(n => n[0]).join('').substring(0, 2) : '?')
43
43
  </script>
44
44
 
@@ -18,7 +18,7 @@ export const className = $props.className || ''
18
18
  * identically. A wrong colour is worse than an unthemeable one.
19
19
  */
20
20
  const variantClasses = {
21
- default: 'bg-surface-raised text-neutral-800 dark:text-neutral-300',
21
+ default: 'bg-surface-raised text-fg-strong',
22
22
  primary: 'bg-accent-soft text-accent-soft-ink',
23
23
  secondary: 'bg-secondary-soft text-secondary-soft-ink',
24
24
  success: 'bg-success-soft text-success-soft-ink',
@@ -36,8 +36,8 @@ const separatorElement = separator === '/' ? '/' :
36
36
  export const breadcrumbClasses = `flex items-center flex-wrap gap-2 text-sm ${className}`.trim()
37
37
  export const itemClasses = `text-fg-muted hover:text-fg transition-colors duration-150`.trim()
38
38
  export const activeItemClasses = `text-fg font-medium`.trim()
39
- export const separatorClasses = `text-fg-subtle select-none`.trim()
40
- export const collapsedClasses = `text-fg-subtle cursor-default`.trim()
39
+ export const separatorClasses = `text-fg-soft select-none`.trim()
40
+ export const collapsedClasses = `text-fg-soft cursor-default`.trim()
41
41
  </script>
42
42
 
43
43
  <nav class="{{ breadcrumbClasses }}" aria-label="Breadcrumb">
@@ -4,7 +4,7 @@ export const className = $props.className || ''
4
4
  export const placeholder = $props.placeholder || ''
5
5
  export const disabled = $bool($props.disabled)
6
6
 
7
- const baseClasses = 'w-full rounded-panel border-none bg-panel py-2 pl-3 pr-10 text-sm leading-5 text-fg focus:ring-0 focus:outline-none focus-visible:border-blue-500 focus-visible:ring-2 focus-visible:ring-white/75 focus-visible:ring-offset-2'
7
+ const baseClasses = 'w-full rounded-panel border-none bg-panel py-2 pl-3 pr-10 text-sm leading-5 text-fg focus:ring-0 focus:outline-none focus-visible:border-accent-solid focus-visible:ring-2 focus-visible:ring-accent-solid focus-visible:ring-offset-panel focus-visible:ring-offset-2'
8
8
  const disabledClasses = disabled ? 'opacity-50 cursor-not-allowed' : ''
9
9
  export const inputClasses = `${baseClasses} ${disabledClasses} ${className}`.trim()
10
10
  </script>
@@ -4,7 +4,7 @@ export const disabled = $bool($props.disabled)
4
4
  export const className = $props.className || ''
5
5
  export const as = $props.as || 'li'
6
6
 
7
- const baseClasses = 'relative cursor-pointer select-none py-2 pl-10 pr-4 text-fg hover:bg-blue-100 dark:hover:bg-blue-900'
7
+ const baseClasses = 'relative cursor-pointer select-none py-2 pl-10 pr-4 text-fg hover:bg-accent-soft'
8
8
  const disabledClasses = disabled ? 'opacity-50 cursor-not-allowed' : ''
9
9
  export const optionClasses = `${baseClasses} ${disabledClasses} ${className}`.trim()
10
10
  export const valueJson = JSON.stringify(value === undefined ? null : value)
@@ -60,7 +60,7 @@ defineExpose({ isOpen, query, show, close })
60
60
  >
61
61
  <div class="fixed inset-0 bg-neutral-500/25 dark:bg-neutral-500/50 transition-opacity" @click="close()"></div>
62
62
 
63
- <div class="mx-auto max-w-xl transform divide-y divide-line overflow-hidden rounded-xl bg-white dark:bg-neutral-900 shadow-2xl ring-1 ring-black/5 transition-all relative">
63
+ <div class="mx-auto max-w-xl transform divide-y divide-line overflow-hidden rounded-xl bg-panel shadow-2xl ring-1 ring-black/5 transition-all relative">
64
64
  <div class="relative">
65
65
  <svg class="pointer-events-none absolute top-3.5 left-4 h-5 w-5 text-neutral-400" viewBox="0 0 20 20" fill="currentColor">
66
66
  <path fill-rule="evenodd" d="M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z" clip-rule="evenodd" />
@@ -2,7 +2,7 @@
2
2
  export const className = $props.className || ''
3
3
  export const value = $props.value
4
4
 
5
- const baseClasses = 'flex cursor-pointer select-none items-center px-4 py-2 text-fg hover:bg-blue-600 hover:text-white'
5
+ const baseClasses = 'flex cursor-pointer select-none items-center px-4 py-2 text-fg hover:bg-accent-solid hover:text-accent-ink'
6
6
  export const itemClasses = `${baseClasses} ${className}`.trim()
7
7
  </script>
8
8
 
@@ -301,7 +301,7 @@ defineExpose({
301
301
  <div class="{{ closeButtonClasses }}">
302
302
  <button
303
303
  type="button"
304
- class="relative rounded-control text-neutral-300 dark:text-neutral-400 hover:text-white dark:hover:text-white focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"
304
+ class="relative rounded-control text-neutral-300 dark:text-neutral-400 hover:text-white dark:hover:text-white focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent"
305
305
  @click="close()"
306
306
  >
307
307
  <span class="absolute -inset-2.5"></span>
@@ -3,7 +3,7 @@ export const className = $props.className || ''
3
3
  export const as = $props.as || 'button'
4
4
  export const disabled = $bool($props.disabled)
5
5
 
6
- const baseClasses = 'inline-flex justify-center items-center rounded-control focus:outline-none focus-visible:ring-2 focus-visible:ring-white/75'
6
+ const baseClasses = 'inline-flex justify-center items-center rounded-control focus:outline-none focus-visible:ring-2 focus-visible:ring-accent-solid focus-visible:ring-offset-2 focus-visible:ring-offset-panel'
7
7
  export const buttonClasses = `${baseClasses} ${className}`.trim()
8
8
  </script>
9
9
 
@@ -4,7 +4,7 @@ export const as = $props.as || 'div'
4
4
  export const disabled = $bool($props.disabled)
5
5
  export const value = $props.value
6
6
 
7
- const baseClasses = 'group flex w-full items-center px-2 py-2 text-sm transition-colors text-fg hover:bg-blue-500 hover:text-white dark:hover:bg-blue-600'
7
+ const baseClasses = 'group flex w-full items-center px-2 py-2 text-sm transition-colors text-fg hover:bg-accent-solid hover:text-accent-ink'
8
8
  const disabledClasses = disabled ? 'opacity-50 cursor-not-allowed' : 'cursor-pointer'
9
9
  export const itemClasses = `${baseClasses} ${disabledClasses} ${className}`.trim()
10
10
  </script>
@@ -2,7 +2,7 @@
2
2
  export const className = $props.className || ''
3
3
  export const as = $props.as || 'div'
4
4
 
5
- const baseClasses = 'absolute z-10 mt-2 origin-top-right divide-y divide-neutral-100 rounded-panel bg-white shadow-lg ring-1 ring-black/5 focus:outline-none dark:bg-neutral-800 dark:divide-neutral-700 dark:ring-neutral-600'
5
+ const baseClasses = 'absolute z-10 mt-2 origin-top-right divide-y divide-line rounded-panel bg-panel shadow-lg ring-1 ring-black/5 focus:outline-none dark:ring-neutral-600'
6
6
  export const itemsClasses = `${baseClasses} ${className}`.trim()
7
7
  </script>
8
8
 
@@ -26,10 +26,10 @@ export const inputClassName = $props.inputClassName || ''
26
26
  * 3rem it always claimed. sm and md were already exact.
27
27
  */
28
28
  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' }
29
- 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'
29
+ 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 bg-field'
30
30
  const stateClasses = error
31
- ? 'ring-danger-line text-danger-fg placeholder-danger-fg-subtle focus:ring-danger-focus'
32
- : 'ring-line-strong text-fg placeholder-fg-subtle focus:ring-accent'
31
+ ? 'ring-danger-line text-danger-fg placeholder-danger focus:ring-danger-focus'
32
+ : 'ring-line-strong text-fg placeholder-fg-soft focus:ring-accent'
33
33
  const disabledClasses = disabled
34
34
  ? 'opacity-50 cursor-not-allowed bg-surface'
35
35
  : readonly
@@ -107,7 +107,7 @@ defineExpose({ value: inputValue, increment, decrement })
107
107
  <button
108
108
  type="button"
109
109
  @click="increment()"
110
- class="flex items-center justify-center w-8 h-1/2 text-fg-subtle hover:text-fg-muted focus:outline-none border-b border-line-strong"
110
+ class="flex items-center justify-center w-8 h-1/2 text-fg-soft hover:text-fg-strong focus:outline-none border-b border-line-strong"
111
111
  aria-label="Increment"
112
112
  >
113
113
  <svg class="h-3 w-3" fill="none" viewBox="0 0 24 24" stroke="currentColor">
@@ -117,7 +117,7 @@ defineExpose({ value: inputValue, increment, decrement })
117
117
  <button
118
118
  type="button"
119
119
  @click="decrement()"
120
- class="flex items-center justify-center w-8 h-1/2 text-fg-subtle hover:text-fg-muted focus:outline-none"
120
+ class="flex items-center justify-center w-8 h-1/2 text-fg-soft hover:text-fg-strong focus:outline-none"
121
121
  aria-label="Decrement"
122
122
  >
123
123
  <svg class="h-3 w-3" fill="none" viewBox="0 0 24 24" stroke="currentColor">
@@ -25,10 +25,10 @@ export const inputClassName = $props.inputClassName || ''
25
25
  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' }
26
26
  const iconSizeClasses = { sm: 'h-4 w-4', md: 'h-5 w-5', lg: 'h-6 w-6' }
27
27
 
28
- 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 pr-10'
28
+ 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 bg-field pr-10'
29
29
  const stateClasses = error
30
- ? 'ring-danger-line text-danger-fg placeholder-danger-fg-subtle focus:ring-danger-focus'
31
- : 'ring-line-strong text-fg placeholder-fg-subtle focus:ring-accent'
30
+ ? 'ring-danger-line text-danger-fg placeholder-danger focus:ring-danger-focus'
31
+ : 'ring-line-strong text-fg placeholder-fg-soft focus:ring-accent'
32
32
  const disabledClasses = disabled
33
33
  ? 'opacity-50 cursor-not-allowed bg-surface'
34
34
  : readonly
@@ -115,7 +115,7 @@ defineExpose({ value: inputValue })
115
115
  <button
116
116
  type="button"
117
117
  @click="toggleVisibility()"
118
- class="text-fg-subtle hover:text-fg-muted focus:outline-none"
118
+ class="text-fg-soft hover:text-fg-strong focus:outline-none"
119
119
  :aria-label="toggleAriaLabel()"
120
120
  >
121
121
  <svg :show="showPassword()" class="{{ iconClasses }}" fill="none" viewBox="0 0 24 24" stroke="currentColor">
@@ -29,10 +29,10 @@ export const inputClassName = $props.inputClassName || ''
29
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' }
30
30
  const iconSizeClasses = { sm: 'h-4 w-4', md: 'h-5 w-5', lg: 'h-6 w-6' }
31
31
 
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'
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 bg-field'
33
33
  const stateClasses = error
34
- ? 'ring-danger-line text-danger-fg placeholder-danger-fg-subtle focus:ring-danger-focus'
35
- : 'ring-line-strong text-fg placeholder-fg-subtle focus:ring-accent'
34
+ ? 'ring-danger-line text-danger-fg placeholder-danger focus:ring-danger-focus'
35
+ : 'ring-line-strong text-fg placeholder-fg-soft focus:ring-accent'
36
36
  const disabledClasses = disabled
37
37
  ? 'opacity-50 cursor-not-allowed bg-surface'
38
38
  : readonly
@@ -87,7 +87,7 @@ defineExpose({ value: inputValue, clear: onClear })
87
87
  <div class="relative">
88
88
  @if(leftIcon)
89
89
  <div class="pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3">
90
- <span class="{{ iconClasses }} text-fg-subtle">{!! leftIcon !!}</span>
90
+ <span class="{{ iconClasses }} text-fg-soft">{!! leftIcon !!}</span>
91
91
  </div>
92
92
  @endif
93
93
 
@@ -112,7 +112,7 @@ defineExpose({ value: inputValue, clear: onClear })
112
112
  <button
113
113
  type="button"
114
114
  @click="onClear()"
115
- class="text-fg-subtle hover:text-fg-muted focus:outline-none"
115
+ class="text-fg-soft hover:text-fg-strong focus:outline-none"
116
116
  aria-label="Clear input"
117
117
  >
118
118
  <svg class="{{ iconClasses }}" fill="none" viewBox="0 0 24 24" stroke="currentColor">
@@ -123,7 +123,7 @@ defineExpose({ value: inputValue, clear: onClear })
123
123
  @endif
124
124
  @if(rightIcon && !clearable)
125
125
  <div class="pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3">
126
- <span class="{{ iconClasses }} text-fg-subtle">{!! rightIcon !!}</span>
126
+ <span class="{{ iconClasses }} text-fg-soft">{!! rightIcon !!}</span>
127
127
  </div>
128
128
  @endif
129
129
  </div>
@@ -3,7 +3,7 @@ export const className = $props.className || ''
3
3
  export const as = $props.as || 'button'
4
4
  export const disabled = $bool($props.disabled)
5
5
 
6
- const baseClasses = 'relative w-full cursor-pointer rounded-panel bg-panel py-2 pl-3 pr-10 text-left shadow-md focus:outline-none focus-visible:border-blue-500 focus-visible:ring-2 focus-visible:ring-white/75 focus-visible:ring-offset-2 focus-visible:ring-offset-blue-300'
6
+ const baseClasses = 'relative w-full cursor-pointer rounded-panel bg-panel py-2 pl-3 pr-10 text-left shadow-md focus:outline-none focus-visible:border-accent-solid focus-visible:ring-2 focus-visible:ring-accent-solid focus-visible:ring-offset-2 focus-visible:ring-offset-panel'
7
7
  const disabledClasses = disabled ? 'opacity-50 cursor-not-allowed' : ''
8
8
  export const buttonClasses = `${baseClasses} ${disabledClasses} ${className}`.trim()
9
9
  </script>
@@ -4,7 +4,7 @@ export const disabled = $bool($props.disabled)
4
4
  export const className = $props.className || ''
5
5
  export const as = $props.as || 'li'
6
6
 
7
- const baseClasses = 'relative cursor-pointer select-none py-2 pl-10 pr-4 text-fg hover:bg-blue-100 dark:hover:bg-blue-900'
7
+ const baseClasses = 'relative cursor-pointer select-none py-2 pl-10 pr-4 text-fg hover:bg-accent-soft'
8
8
  const disabledClasses = disabled ? 'opacity-50 cursor-not-allowed' : ''
9
9
  export const optionClasses = `${baseClasses} ${disabledClasses} ${className}`.trim()
10
10
  export const valueJson = JSON.stringify(value === undefined ? null : value)
@@ -69,7 +69,7 @@ export const itemClasses = `
69
69
  survive the label being two words wide, and anchoring it to the glyph
70
70
  keeps every tab's badge in the same place.
71
71
  --}}
72
- <span class="absolute -right-2 -top-1 min-w-[16px] rounded-full bg-danger px-1 text-[10px] font-semibold leading-4 text-white">
72
+ <span class="absolute -right-2 -top-1 min-w-[16px] rounded-full bg-danger px-1 text-[10px] font-semibold leading-4 text-danger-ink">
73
73
  {{ badge }}
74
74
  </span>
75
75
  @endif