@stacksjs/components 0.2.344 → 0.2.346
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Accordion-ccye7erw.stx → Accordion-py9ntmst.stx} +1 -1
- package/dist/{AccordionItem-7bd3ga36.stx → AccordionItem-asmsqxz9.stx} +1 -1
- package/dist/{Audio-tnjd6anm.stx → Audio-byv8kkvt.stx} +1 -1
- package/dist/{Avatar-7vegrsg6.stx → Avatar-axrzqsdk.stx} +5 -5
- package/dist/{Badge-439n5p0a.stx → Badge-4jxqhkv9.stx} +1 -1
- package/dist/{Breadcrumb-7hwnfyyw.stx → Breadcrumb-pach6f1f.stx} +2 -2
- package/dist/{Button-y8fnx29x.stx → Button-tcjt3m8s.stx} +2 -2
- package/dist/{Calendar-8q76ees6.stx → Calendar-ppqdw19s.stx} +4 -4
- package/dist/{Checkbox-xnm8ax5q.stx → Checkbox-e7gn3w06.stx} +1 -1
- package/dist/{ComboboxInput-9q87fb22.stx → ComboboxInput-4jcpvw7e.stx} +1 -1
- package/dist/{ComboboxOption-qm38e8e9.stx → ComboboxOption-vnb67p8d.stx} +1 -1
- package/dist/{CommandPalette-mkqqep2s.stx → CommandPalette-6rjcgske.stx} +1 -1
- package/dist/{CommandPaletteItem-chdw0070.stx → CommandPaletteItem-6rp133ta.stx} +1 -1
- package/dist/{DefaultPaymentMethod-v11254p4.stx → DefaultPaymentMethod-r0hcjajr.stx} +1 -1
- package/dist/{Drawer-rymajw9v.stx → Drawer-jcdj3qk2.stx} +1 -1
- package/dist/{DropdownButton-n6gsmcte.stx → DropdownButton-tx9hb2de.stx} +1 -1
- package/dist/{DropdownItem-qs772agw.stx → DropdownItem-wht1vcm5.stx} +1 -1
- package/dist/{DropdownItems-yf25hdh1.stx → DropdownItems-v12h6zpf.stx} +1 -1
- package/dist/{FilterChip-ww5nkepm.stx → FilterChip-00ja5jhz.stx} +1 -1
- package/dist/{ListboxButton-w3vfvte7.stx → ListboxButton-t43pp03e.stx} +1 -1
- package/dist/{ListboxOption-ea0j02a8.stx → ListboxOption-9c9jpz1n.stx} +1 -1
- package/dist/{Login-hh53d6tw.stx → Login-j3pc04ka.stx} +9 -9
- package/dist/{Navigator-55wpcpx1.stx → Navigator-1yk1c3pp.stx} +4 -4
- package/dist/{NumberInput-54d23rq0.stx → NumberInput-awn66hfs.stx} +5 -5
- package/dist/{Pagination-0ra20dja.stx → Pagination-z9jxnaeq.stx} +3 -3
- package/dist/{PasswordInput-3snyppj4.stx → PasswordInput-hradj0xd.stx} +4 -4
- package/dist/{PaymentMethods-zwa7c6kh.stx → PaymentMethods-z4hhr0kv.stx} +3 -3
- package/dist/{PopoverButton-panmcysh.stx → PopoverButton-70th24xc.stx} +1 -1
- package/dist/{Progress-cj0z83rx.stx → Progress-bv65bwh8.stx} +2 -2
- package/dist/{Radio-m2wz5ny6.stx → Radio-nr8rbb6g.stx} +1 -1
- package/dist/{RadioGroup-jg9s4ttg.stx → RadioGroup-hzz4xep9.stx} +1 -1
- package/dist/{RadioGroupOption-zvp0y9sn.stx → RadioGroupOption-7fcgfsah.stx} +1 -1
- package/dist/{Select-pj584jza.stx → Select-sbr8dqzn.stx} +3 -3
- package/dist/{Signup-egdrk3rh.stx → Signup-77y9ea7t.stx} +8 -8
- package/dist/{Spinner-grahbp9a.stx → Spinner-vhnc3y03.stx} +3 -3
- package/dist/{StepperStep-xw55xjh0.stx → StepperStep-34kwv0t0.stx} +2 -2
- package/dist/{SubscriptionCheckout-wj4s182k.stx → SubscriptionCheckout-pggq5a4k.stx} +7 -7
- package/dist/{TabBarItem-cnxhgy92.stx → TabBarItem-wv2r8496.stx} +1 -1
- package/dist/{TableBody-drxyz5jh.stx → TableBody-y49bqb1p.stx} +1 -1
- package/dist/{TableRow-xd542nvb.stx → TableRow-ytr6b5by.stx} +1 -1
- package/dist/{Tabs-2cjt68my.stx → Tabs-51vr631j.stx} +2 -2
- package/dist/{TextInput-9wqzeeg1.stx → TextInput-48ghmccm.stx} +6 -6
- package/dist/{Textarea-xwkdg8se.stx → Textarea-dndmk6ah.stx} +3 -3
- package/dist/{Tooltip-14gt4f1w.stx → Tooltip-g2j17eg9.stx} +5 -5
- package/dist/{TwoFactorChallenge-0200pjc0.stx → TwoFactorChallenge-n8fcm5ct.stx} +4 -4
- package/dist/{VirtualTable-jvje0ybn.stx → VirtualTable-kp7b3wyv.stx} +2 -2
- package/dist/index.js +2 -2
- package/package.json +3 -3
- package/src/components/Footer.stx +8 -8
- package/src/components/Hero.stx +2 -2
- package/src/ui/accordion/Accordion.stx +1 -1
- package/src/ui/accordion/AccordionItem.stx +1 -1
- package/src/ui/audio/Audio.stx +1 -1
- package/src/ui/auth/Login.stx +9 -9
- package/src/ui/auth/Signup.stx +8 -8
- package/src/ui/auth/TwoFactorChallenge.stx +4 -4
- package/src/ui/avatar/Avatar.stx +5 -5
- package/src/ui/badge/Badge.stx +1 -1
- package/src/ui/breadcrumb/Breadcrumb.stx +2 -2
- package/src/ui/button/Button.stx +2 -2
- package/src/ui/calendar/Calendar.stx +4 -4
- package/src/ui/checkbox/Checkbox.stx +1 -1
- package/src/ui/combobox/ComboboxInput.stx +1 -1
- package/src/ui/combobox/ComboboxOption.stx +1 -1
- package/src/ui/command-palette/CommandPalette.stx +1 -1
- package/src/ui/command-palette/CommandPaletteItem.stx +1 -1
- package/src/ui/drawer/Drawer.stx +1 -1
- package/src/ui/dropdown/DropdownButton.stx +1 -1
- package/src/ui/dropdown/DropdownItem.stx +1 -1
- package/src/ui/dropdown/DropdownItems.stx +1 -1
- package/src/ui/input/NumberInput.stx +5 -5
- package/src/ui/input/PasswordInput.stx +4 -4
- package/src/ui/input/TextInput.stx +6 -6
- package/src/ui/listbox/ListboxButton.stx +1 -1
- package/src/ui/listbox/ListboxOption.stx +1 -1
- package/src/ui/mobile/FilterChip.stx +1 -1
- package/src/ui/mobile/TabBarItem.stx +1 -1
- package/src/ui/navigator/Navigator.stx +4 -4
- package/src/ui/pagination/Pagination.stx +3 -3
- package/src/ui/payment/DefaultPaymentMethod.stx +1 -1
- package/src/ui/payment/PaymentMethods.stx +3 -3
- package/src/ui/payment/SubscriptionCheckout.stx +7 -7
- package/src/ui/popover/PopoverButton.stx +1 -1
- package/src/ui/progress/Progress.stx +2 -2
- package/src/ui/radio/Radio.stx +1 -1
- package/src/ui/radio-group/RadioGroup.stx +1 -1
- package/src/ui/radio-group/RadioGroupOption.stx +1 -1
- package/src/ui/select/Select.stx +3 -3
- package/src/ui/spinner/Spinner.stx +3 -3
- package/src/ui/stepper/StepperStep.stx +2 -2
- package/src/ui/table/TableBody.stx +1 -1
- package/src/ui/table/TableRow.stx +1 -1
- package/src/ui/tabs/Tabs.stx +2 -2
- package/src/ui/textarea/Textarea.stx +3 -3
- package/src/ui/tooltip/Tooltip.stx +5 -5
- package/src/ui/virtual-table/VirtualTable.stx +2 -2
|
@@ -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 transition-colors duration-150 focus:outline-none focus:ring-2 focus:ring-
|
|
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 transition-colors duration-150 focus:outline-none focus:ring-2 focus:ring-
|
|
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>
|
|
@@ -28,17 +28,17 @@ const statusSizeClasses = {
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
const statusColorClasses = {
|
|
31
|
-
online: 'bg-
|
|
32
|
-
offline: 'bg-
|
|
33
|
-
away: 'bg-
|
|
34
|
-
busy: 'bg-
|
|
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-
|
|
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-
|
|
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-
|
|
40
|
-
export const collapsedClasses = `text-fg-
|
|
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">
|
|
@@ -48,9 +48,9 @@ export const className = $props.className || ''
|
|
|
48
48
|
*/
|
|
49
49
|
const variantClasses = {
|
|
50
50
|
primary: 'bg-accent-solid hover:bg-accent-solid-hover text-accent-ink shadow-md hover:shadow-lg',
|
|
51
|
-
secondary: 'bg-surface-sunken hover:bg-
|
|
51
|
+
secondary: 'bg-surface-sunken hover:bg-surface-sunken-hover text-fg',
|
|
52
52
|
outline: 'border-2 border-accent text-accent hover:bg-accent-soft',
|
|
53
|
-
ghost: 'hover:bg-surface-
|
|
53
|
+
ghost: 'hover:bg-surface-hover text-fg-strong',
|
|
54
54
|
danger: 'bg-danger-solid hover:bg-danger-solid-hover text-danger-ink shadow-md hover:shadow-lg',
|
|
55
55
|
}
|
|
56
56
|
|
|
@@ -13,7 +13,7 @@ const baseClasses = 'bg-panel rounded-panel shadow-lg p-4 w-full max-w-sm'
|
|
|
13
13
|
export const calendarClasses = `${baseClasses} ${className}`.trim()
|
|
14
14
|
export const headerClasses = 'flex items-center justify-between mb-4'
|
|
15
15
|
export const monthYearClasses = 'text-lg font-semibold text-fg'
|
|
16
|
-
export const buttonClasses = 'p-2 hover:bg-surface-
|
|
16
|
+
export const buttonClasses = 'p-2 hover:bg-surface-hover rounded-control transition-colors'
|
|
17
17
|
export const weekdaysClasses = 'grid grid-cols-7 gap-1 mb-2'
|
|
18
18
|
export const weekdayClasses = 'text-center text-xs font-medium text-fg-muted py-2'
|
|
19
19
|
export const daysGridClasses = 'grid grid-cols-7 gap-1'
|
|
@@ -122,8 +122,8 @@ function dayClasses(day) {
|
|
|
122
122
|
const disabled = isDisabled(day.date)
|
|
123
123
|
let cls = base
|
|
124
124
|
cls += day.isCurrentMonth ? 'text-fg' : 'text-fg-subtle'
|
|
125
|
-
cls += disabled ? ' opacity-50 cursor-not-allowed' : 'cursor-pointer hover:bg-surface-
|
|
126
|
-
if (isSelected) cls += 'bg-accent-solid text-
|
|
125
|
+
cls += disabled ? ' opacity-50 cursor-not-allowed' : 'cursor-pointer hover:bg-surface-hover'
|
|
126
|
+
if (isSelected) cls += 'bg-accent-solid text-accent-ink hover:bg-accent-solid-hover'
|
|
127
127
|
if (isTodayDate && highlightToday && !isSelected) cls += 'border-2 border-accent'
|
|
128
128
|
return cls
|
|
129
129
|
}
|
|
@@ -179,7 +179,7 @@ defineExpose({ selectedDate, currentMonth, selectDate })
|
|
|
179
179
|
<div class="mt-4 flex justify-center">
|
|
180
180
|
<button
|
|
181
181
|
type="button"
|
|
182
|
-
class="px-4 py-2 text-sm font-medium text-accent hover:bg-
|
|
182
|
+
class="px-4 py-2 text-sm font-medium text-accent hover:bg-surface-hover rounded-control transition-colors"
|
|
183
183
|
@click="goToToday()"
|
|
184
184
|
>
|
|
185
185
|
Today
|
|
@@ -12,7 +12,7 @@ export const name = $props.name || ''
|
|
|
12
12
|
export const className = $props.className || ''
|
|
13
13
|
|
|
14
14
|
const sizeClasses = { sm: 'h-4 w-4', md: 'h-5 w-5', lg: 'h-6 w-6' }
|
|
15
|
-
const baseClasses = 'rounded border-line-strong text-accent focus:ring-accent focus:ring-2 focus:ring-offset-2
|
|
15
|
+
const baseClasses = 'rounded border-line-strong text-accent focus:ring-accent focus:ring-2 focus:ring-offset-2 focus:ring-offset-panel transition-colors'
|
|
16
16
|
const stateClasses = error ? 'border-danger-line text-danger focus:ring-danger-focus' : ''
|
|
17
17
|
const disabledClasses = disabled ? 'opacity-50 cursor-not-allowed' : 'cursor-pointer'
|
|
18
18
|
|
|
@@ -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-
|
|
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-
|
|
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-
|
|
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-
|
|
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
|
|
|
@@ -39,7 +39,7 @@ export const containerClasses = `mt-16 w-2/3 bg-panel px-8 py-6 shadow ring-1 ri
|
|
|
39
39
|
<div>
|
|
40
40
|
<h2 class="text-sm text-fg-muted">
|
|
41
41
|
{{ paymentMethod.brand }} •••• {{ paymentMethod.last_four }}
|
|
42
|
-
<span class="ml-4 inline-flex items-center rounded-control bg-
|
|
42
|
+
<span class="ml-4 inline-flex items-center rounded-control bg-accent-soft px-2 py-1 text-xs text-accent-soft-ink font-medium ring-1 ring-accent-soft-ink/20 ring-inset">Default</span>
|
|
43
43
|
<br>
|
|
44
44
|
<span class="text-xs text-fg-soft italic">Expires {{ paymentMethod.exp_month }} / {{ paymentMethod.exp_year }}</span>
|
|
45
45
|
</h2>
|
|
@@ -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-
|
|
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-
|
|
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-
|
|
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-
|
|
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
|
|
|
@@ -20,7 +20,7 @@ export const chipClasses = `
|
|
|
20
20
|
text-sm font-medium transition-colors
|
|
21
21
|
${active
|
|
22
22
|
? 'border-transparent bg-fg text-surface'
|
|
23
|
-
: 'border-line bg-surface-raised text-fg hover:bg-surface-
|
|
23
|
+
: 'border-line bg-surface-raised text-fg hover:bg-surface-raised-hover'}
|
|
24
24
|
`.replace(/\s+/g, ' ').trim()
|
|
25
25
|
|
|
26
26
|
/*
|
|
@@ -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-
|
|
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-
|
|
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)
|
|
@@ -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
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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>
|
|
@@ -140,7 +140,7 @@ function onSubmit(event) {
|
|
|
140
140
|
<button
|
|
141
141
|
type="button"
|
|
142
142
|
@click="onSocial('google')"
|
|
143
|
-
class="w-full flex items-center justify-center gap-3 rounded-control bg-field px-3 py-2 text-sm text-fg font-semibold shadow-sm ring-1 ring-line-strong ring-inset hover:bg-
|
|
143
|
+
class="w-full flex items-center justify-center gap-3 rounded-control bg-field px-3 py-2 text-sm text-fg font-semibold shadow-sm ring-1 ring-line-strong ring-inset hover:bg-field-hover focus-visible:ring-transparent"
|
|
144
144
|
>
|
|
145
145
|
<svg class="h-5 w-5" viewBox="0 0 24 24" aria-hidden="true">
|
|
146
146
|
<path d="M12.0003 4.75C13.7703 4.75 15.3553 5.36002 16.6053 6.54998L20.0303 3.125C17.9502 1.19 15.2353 0 12.0003 0C7.31028 0 3.25527 2.69 1.28027 6.60998L5.27028 9.70498C6.21525 6.86002 8.87028 4.75 12.0003 4.75Z" fill="#EA4335" />
|
|
@@ -154,7 +154,7 @@ function onSubmit(event) {
|
|
|
154
154
|
<button
|
|
155
155
|
type="button"
|
|
156
156
|
@click="onSocial('github')"
|
|
157
|
-
class="w-full flex items-center justify-center gap-3 rounded-control bg-field px-3 py-2 text-sm text-fg font-semibold shadow-sm ring-1 ring-line-strong ring-inset hover:bg-
|
|
157
|
+
class="w-full flex items-center justify-center gap-3 rounded-control bg-field px-3 py-2 text-sm text-fg font-semibold shadow-sm ring-1 ring-line-strong ring-inset hover:bg-field-hover focus-visible:ring-transparent"
|
|
158
158
|
>
|
|
159
159
|
<svg class="h-5 w-5 fill-[#24292F]" fill="currentColor" viewBox="0 0 20 20" aria-hidden="true">
|
|
160
160
|
<path fill-rule="evenodd" d="M10 0C4.477 0 0 4.484 0 10.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0110 4.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.942.359.31.678.921.678 1.856 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0020 10.017C20 4.484 15.522 0 10 0z" clip-rule="evenodd" />
|
|
@@ -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-
|
|
172
|
+
<StxLink to="{{ signupHref }}" class="text-accent font-semibold leading-6 hover:text-accent">
|
|
173
173
|
{{ signupText }}
|
|
174
174
|
</StxLink>
|
|
175
175
|
</p>
|
|
@@ -40,8 +40,8 @@ function getItemClasses(item) {
|
|
|
40
40
|
}
|
|
41
41
|
else if (variant === 'pills') {
|
|
42
42
|
cls += isActiveItem
|
|
43
|
-
? ' bg-
|
|
44
|
-
: 'text-fg-strong hover:bg-surface-
|
|
43
|
+
? ' bg-accent-solid text-accent-ink font-medium rounded-full'
|
|
44
|
+
: 'text-fg-strong hover:bg-surface-hover rounded-full'
|
|
45
45
|
}
|
|
46
46
|
else if (variant === 'underline') {
|
|
47
47
|
cls += isActiveItem
|
|
@@ -50,8 +50,8 @@ function getItemClasses(item) {
|
|
|
50
50
|
}
|
|
51
51
|
else if (variant === 'sidebar') {
|
|
52
52
|
cls += isActiveItem
|
|
53
|
-
? 'bg-
|
|
54
|
-
: 'text-fg-strong hover:bg-surface-
|
|
53
|
+
? 'bg-accent-soft text-accent-soft-ink font-medium border-l-4 border-accent'
|
|
54
|
+
: 'text-fg-strong hover:bg-surface-hover border-l-4 border-transparent'
|
|
55
55
|
}
|
|
56
56
|
cls += ' transition-all duration-200 cursor-pointer flex items-center gap-2'
|
|
57
57
|
if (item.disabled) cls += ' opacity-50 cursor-not-allowed pointer-events-none'
|
|
@@ -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
|
|
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
|
|
32
|
-
: 'ring-line-strong text-fg placeholder-fg-
|
|
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-
|
|
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-
|
|
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">
|
|
@@ -7,9 +7,9 @@ export const showPrevNext = $bool($props.showPrevNext, true)
|
|
|
7
7
|
export const className = $props.className || ''
|
|
8
8
|
|
|
9
9
|
export const paginationClasses = `flex items-center gap-1 ${className}`.trim()
|
|
10
|
-
export const buttonClasses = `px-3 py-2 text-sm font-medium text-fg-strong bg-panel border border-line-strong rounded-control hover:bg-surface focus:outline-none focus:ring-2 focus:ring-
|
|
11
|
-
export const activeButtonClasses = `px-3 py-2 text-sm font-medium text-
|
|
12
|
-
export const ellipsisClasses = `px-3 py-2 text-sm font-medium text-fg-
|
|
10
|
+
export const buttonClasses = `px-3 py-2 text-sm font-medium text-fg-strong bg-panel border border-line-strong rounded-control hover:bg-surface-hover focus:outline-none focus:ring-2 focus:ring-accent-solid focus:ring-offset-2 focus:ring-offset-panel disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-panel transition-colors duration-150`.trim()
|
|
11
|
+
export const activeButtonClasses = `px-3 py-2 text-sm font-medium text-accent-ink bg-accent-solid border border-accent rounded-control focus:outline-none focus:ring-2 focus:ring-accent-solid focus:ring-offset-2 focus:ring-offset-panel`.trim()
|
|
12
|
+
export const ellipsisClasses = `px-3 py-2 text-sm font-medium text-fg-soft`.trim()
|
|
13
13
|
export const iconClasses = `w-5 h-5`.trim()
|
|
14
14
|
</script>
|
|
15
15
|
|
|
@@ -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
|
|
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
|
|
31
|
-
: 'ring-line-strong text-fg placeholder-fg-
|
|
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-
|
|
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">
|
|
@@ -61,7 +61,7 @@ function onDelete(methodId) {
|
|
|
61
61
|
@if(showMakeDefault)
|
|
62
62
|
<button
|
|
63
63
|
type="button"
|
|
64
|
-
class="border border-line-strong rounded-control bg-field px-2 py-1 text-sm text-fg-strong font-semibold shadow-sm hover:bg-
|
|
64
|
+
class="border border-line-strong rounded-control bg-field px-2 py-1 text-sm text-fg-strong font-semibold shadow-sm hover:bg-field-hover focus-visible:outline-2 focus-visible:outline-accent focus-visible:outline-offset-2 disabled:opacity-50 disabled:cursor-not-allowed"
|
|
65
65
|
@click="onMakeDefault('{{ method.id }}')"
|
|
66
66
|
title="Make default"
|
|
67
67
|
>
|
|
@@ -74,7 +74,7 @@ function onDelete(methodId) {
|
|
|
74
74
|
@if(showDelete)
|
|
75
75
|
<button
|
|
76
76
|
type="button"
|
|
77
|
-
class="border border-line-strong rounded-control bg-field px-2 py-1 text-sm text-danger font-semibold shadow-sm hover:bg-
|
|
77
|
+
class="border border-line-strong rounded-control bg-field px-2 py-1 text-sm text-danger font-semibold shadow-sm hover:bg-danger-soft focus-visible:outline-2 focus-visible:outline-danger focus-visible:outline-offset-2 disabled:opacity-50 disabled:cursor-not-allowed"
|
|
78
78
|
@click="onDelete('{{ method.id }}')"
|
|
79
79
|
title="Delete payment method"
|
|
80
80
|
>
|
|
@@ -91,7 +91,7 @@ function onDelete(methodId) {
|
|
|
91
91
|
</ul>
|
|
92
92
|
@else
|
|
93
93
|
<div class="text-center py-12 bg-panel rounded-panel border border-line">
|
|
94
|
-
<svg class="mx-auto h-12 w-12 text-fg-
|
|
94
|
+
<svg class="mx-auto h-12 w-12 text-fg-soft" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
95
95
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z" />
|
|
96
96
|
</svg>
|
|
97
97
|
<h3 class="mt-2 text-sm text-fg font-medium">No payment methods</h3>
|
|
@@ -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 items-center gap-2 focus:outline-none focus-visible:ring-2 focus-visible:ring-
|
|
6
|
+
const baseClasses = 'inline-flex items-center gap-2 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
|
|
|
@@ -16,7 +16,7 @@ const colorClasses = {
|
|
|
16
16
|
success: 'bg-success-solid',
|
|
17
17
|
warning: 'bg-warning-solid',
|
|
18
18
|
danger: 'bg-danger-solid',
|
|
19
|
-
info: 'bg-
|
|
19
|
+
info: 'bg-info-solid',
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
export const circularSize = size === 'sm' ? 48 : size === 'md' ? 64 : 96
|
|
@@ -38,7 +38,7 @@ export const circularBarColor = color === 'primary' ? 'stroke-accent'
|
|
|
38
38
|
: color === 'success' ? 'stroke-success'
|
|
39
39
|
: color === 'warning' ? 'stroke-warning-solid'
|
|
40
40
|
: color === 'danger' ? 'stroke-danger'
|
|
41
|
-
: 'stroke-
|
|
41
|
+
: 'stroke-info-solid'
|
|
42
42
|
</script>
|
|
43
43
|
|
|
44
44
|
<script client>
|
|
@@ -11,7 +11,7 @@ export const name = $props.name || ''
|
|
|
11
11
|
export const className = $props.className || ''
|
|
12
12
|
|
|
13
13
|
const sizeClasses = { sm: 'h-4 w-4', md: 'h-5 w-5', lg: 'h-6 w-6' }
|
|
14
|
-
const baseClasses = 'border-line-strong text-accent focus:ring-accent focus:ring-2 focus:ring-offset-2
|
|
14
|
+
const baseClasses = 'border-line-strong text-accent focus:ring-accent focus:ring-2 focus:ring-offset-2 focus:ring-offset-panel transition-colors'
|
|
15
15
|
const stateClasses = error ? 'border-danger-line text-danger focus:ring-danger-focus' : ''
|
|
16
16
|
const disabledClasses = disabled ? 'opacity-50 cursor-not-allowed' : 'cursor-pointer'
|
|
17
17
|
|
|
@@ -23,7 +23,7 @@ export const as = $props.as || 'div'
|
|
|
23
23
|
export const options = Array.isArray($props.options) ? $props.options : []
|
|
24
24
|
export const hasPropOptions = options.length > 0
|
|
25
25
|
|
|
26
|
-
const optionBaseClasses = 'relative flex cursor-pointer rounded-panel px-5 py-4 shadow-md focus:outline-none transition-all bg-panel text-fg focus-visible:ring-2 focus-visible:ring-
|
|
26
|
+
const optionBaseClasses = 'relative flex cursor-pointer rounded-panel px-5 py-4 shadow-md focus:outline-none transition-all bg-panel text-fg focus-visible:ring-2 focus-visible:ring-accent-solid focus-visible:ring-offset-2 focus-visible:ring-offset-panel'
|
|
27
27
|
export const optionClasses = optionBaseClasses
|
|
28
28
|
export const optionDisabledClasses = `${optionBaseClasses} opacity-50 cursor-not-allowed`
|
|
29
29
|
|
|
@@ -4,7 +4,7 @@ export const disabled = $bool($props.disabled)
|
|
|
4
4
|
export const className = $props.className || ''
|
|
5
5
|
export const as = $props.as || 'div'
|
|
6
6
|
|
|
7
|
-
const baseClasses = 'relative flex cursor-pointer rounded-panel px-5 py-4 shadow-md focus:outline-none transition-all bg-panel text-fg focus-visible:ring-2 focus-visible:ring-
|
|
7
|
+
const baseClasses = 'relative flex cursor-pointer rounded-panel px-5 py-4 shadow-md focus:outline-none transition-all bg-panel text-fg focus-visible:ring-2 focus-visible:ring-accent-solid focus-visible:ring-offset-2 focus-visible:ring-offset-panel'
|
|
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)
|
|
@@ -21,10 +21,10 @@ export const className = $props.className || ''
|
|
|
21
21
|
* 3rem it always claimed. sm and md were already exact.
|
|
22
22
|
*/
|
|
23
23
|
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' }
|
|
24
|
-
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
|
|
24
|
+
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'
|
|
25
25
|
const stateClasses = error
|
|
26
|
-
? 'ring-danger-line text-danger-fg placeholder-danger
|
|
27
|
-
: 'ring-line-strong text-fg placeholder-fg-
|
|
26
|
+
? 'ring-danger-line text-danger-fg placeholder-danger focus:ring-danger-focus'
|
|
27
|
+
: 'ring-line-strong text-fg placeholder-fg-soft focus:ring-accent'
|
|
28
28
|
const disabledClasses = disabled
|
|
29
29
|
? 'opacity-50 cursor-not-allowed bg-surface'
|
|
30
30
|
: 'bg-field cursor-pointer hover:ring-neutral-400 dark:hover:ring-neutral-500'
|