@stacksjs/components 0.2.668 → 0.2.670

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 (33) hide show
  1. package/dist/{Button-j7gjvpxz.stx → Button-gmct2gvq.stx} +10 -7
  2. package/dist/{Checkbox-0grmgne5.stx → Checkbox-80myyzzm.stx} +1 -1
  3. package/dist/{Dialog-9rt34k7b.stx → Dialog-7q0a67ge.stx} +4 -1
  4. package/dist/{DialogPanel-efae92wv.stx → DialogPanel-gky13gdt.stx} +5 -1
  5. package/dist/{Drawer-r5c5tt9d.stx → Drawer-nywb36q5.stx} +5 -2
  6. package/dist/{FilterChip-00ja5jhz.stx → FilterChip-bynt5maa.stx} +1 -0
  7. package/dist/{FilterChips-7pnzycfd.stx → FilterChips-mpmev5v5.stx} +1 -1
  8. package/dist/{NavBar-qqrrhdnk.stx → NavBar-ky8tedjb.stx} +2 -1
  9. package/dist/{SegmentedControl-z9gk2fpn.stx → SegmentedControl-9b1vh960.stx} +17 -0
  10. package/dist/{Switch-nay7zdee.stx → Switch-zfjdd6dw.stx} +1 -1
  11. package/dist/{TabBar-8143650x.stx → TabBar-6m1ajm1d.stx} +1 -1
  12. package/dist/{TextInput-vy4qpncz.stx → TextInput-1kvx4pte.stx} +6 -7
  13. package/dist/index.js +1 -1
  14. package/dist/ui/button/Button.d.ts +15 -20
  15. package/dist/ui/dialog/Dialog.d.ts +4 -1
  16. package/dist/ui/dialog/index.d.ts +2 -0
  17. package/dist/ui/drawer/Drawer.d.ts +3 -1
  18. package/dist/ui/drawer/index.d.ts +2 -0
  19. package/package.json +3 -3
  20. package/src/ui/button/Button.stx +10 -7
  21. package/src/ui/checkbox/Checkbox.stx +1 -1
  22. package/src/ui/dialog/Dialog.stx +4 -1
  23. package/src/ui/dialog/DialogPanel.stx +5 -1
  24. package/src/ui/dialog/index.ts +3 -0
  25. package/src/ui/drawer/Drawer.stx +5 -2
  26. package/src/ui/drawer/index.ts +3 -0
  27. package/src/ui/input/TextInput.stx +6 -7
  28. package/src/ui/mobile/FilterChip.stx +1 -0
  29. package/src/ui/mobile/FilterChips.stx +1 -1
  30. package/src/ui/mobile/NavBar.stx +2 -1
  31. package/src/ui/mobile/TabBar.stx +1 -1
  32. package/src/ui/segmented-control/SegmentedControl.stx +17 -0
  33. package/src/ui/switch/Switch.stx +1 -1
@@ -118,11 +118,11 @@ export const spinnerClasses = `animate-spin ${iconClasses}`.trim()
118
118
  * pressed, and `disabled:` dims it while it is off.
119
119
  */
120
120
  const nativeVariants = {
121
- primary: { box: 'bg-[#007aff] dark:bg-[#0a84ff]', text: 'text-white' },
122
- secondary: { box: 'bg-[#767680]/12 dark:bg-[#767680]/24', text: 'text-[#007aff] dark:text-[#0a84ff]' },
123
- outline: { box: 'border border-[#007aff] dark:border-[#0a84ff]', text: 'text-[#007aff] dark:text-[#0a84ff]' },
124
- ghost: { box: '', text: 'text-[#007aff] dark:text-[#0a84ff]' },
125
- danger: { box: 'bg-[#ff3b30] dark:bg-[#ff453a]', text: 'text-white' },
121
+ primary: { box: 'bg-accent-solid', text: 'text-accent-ink' },
122
+ secondary: { box: 'bg-[#767680]/12 dark:bg-[#767680]/24', text: 'text-accent' },
123
+ outline: { box: 'border border-accent', text: 'text-accent' },
124
+ ghost: { box: '', text: 'text-accent' },
125
+ danger: { box: 'bg-danger-solid', text: 'text-danger-ink' },
126
126
  }
127
127
  const nativeSizes = {
128
128
  xs: { box: 'h-7 px-2.5 gap-1 rounded-[7px]', text: 'text-[13px]' },
@@ -135,11 +135,14 @@ const nativeVariant = nativeVariants[variant] || nativeVariants.primary
135
135
  const nativeSize = nativeSizes[size] || nativeSizes.md
136
136
  export const nativeButtonClasses = `flex-row items-center justify-center ${nativeSize.box} ${nativeVariant.box} disabled:opacity-50 ${fullWidth ? 'w-full' : ''} ${className}`.replace(/\s+/g, ' ').trim()
137
137
  export const nativeTextClasses = `font-semibold ${nativeSize.text} ${nativeVariant.text}`
138
- export const nativeTint = nativeVariant.text === 'text-white' ? '#ffffff' : '#007aff'
138
+ export const legacyNativeTint = variant === 'primary' || variant === 'danger' ? '#ffffff' : '#007aff'
139
+ export const nativeTintClass = nativeVariant.text
139
140
  </script>
140
141
 
141
142
  <script client>
142
143
  const emit = defineEmits()
144
+ const platformControls = typeof craft !== 'undefined' && craft.capabilities.nativePlatformControls === true
145
+ const legacyNativeTint = {{ $native ? legacyNativeTint : '' }}
143
146
 
144
147
  /*
145
148
  * `disabled` and `loading` are read as live props, not as a server snapshot.
@@ -197,7 +200,7 @@ function onClick(event) {
197
200
  @if(ariaLabel)aria-label="{{ ariaLabel }}"@endif
198
201
  @click="onClick($event)"
199
202
  >
200
- <div data-native="ActivityIndicator" :show="isLoading()" color="{{ nativeTint }}" role="status"></div>
203
+ <div data-native="ActivityIndicator" :show="isLoading()" class="{{ nativeTintClass }}" :color="platformControls ? null : legacyNativeTint" role="status"></div>
201
204
  @if(leftIcon)
202
205
  <span :show="!isLoading()" class="{{ iconClasses }} {{ nativeTextClasses }}">{!! leftIcon !!}</span>
203
206
  @endif
@@ -30,7 +30,7 @@ const disabledClasses = disabled ? 'opacity-50 cursor-not-allowed' : 'cursor-poi
30
30
  * On a native host ($native) the box is the platform's own control, tinted
31
31
  * system blue (red while invalid), beside a label at the 17pt body size.
32
32
  */
33
- const nativeTint = error ? 'text-[#ff3b30] dark:text-[#ff453a]' : 'text-[#007aff] dark:text-[#0a84ff]'
33
+ const nativeTint = error ? 'text-danger' : 'text-accent'
34
34
  export const checkboxClasses = $native
35
35
  ? `h-[22px] w-[22px] ${nativeTint} disabled:opacity-50`
36
36
  : switchAppearance
@@ -38,6 +38,9 @@ export const dialogInstanceId = $uid
38
38
  * `animationType="fade"` keeps an alert-like centred card from sliding.
39
39
  */
40
40
  export const nativeAnimation = $props.animationType || 'slide'
41
+ export const nativePresentation = $props.presentationStyle || (nativeAnimation === 'fade' ? 'overFullScreen' : 'pageSheet')
42
+ export const nativeDetents = $props.sheetDetents || ['medium', 'large']
43
+ export const nativeSelectedDetent = $props.selectedDetent || ''
41
44
  </script>
42
45
 
43
46
  <script client>
@@ -191,7 +194,7 @@ defineExpose({
191
194
 
192
195
  <div
193
196
  data-native="Modal"
194
- @if($native)animationType="{{ nativeAnimation }}"@endif
197
+ @if($native)animationType="{{ nativeAnimation }}" presentationStyle="{{ nativePresentation }}" :sheetDetents="{{ nativeDetents }}" @if(nativeSelectedDetent)selectedDetent="{{ nativeSelectedDetent }}"@endif@endif
195
198
  x-ref="rootRef"
196
199
  :show="isOpen()"
197
200
  :data-state="isOpen() ? 'open' : 'closed'"
@@ -46,11 +46,15 @@ export const nativePanelClasses = nativeSheet
46
46
  export const nativeGrabberClasses = `self-center h-[5px] w-9 shrink-0 rounded-full bg-[#c6c6c8] dark:bg-[#48484a] ${flush ? 'mt-1.5 mb-1.5' : 'mb-4'}`
47
47
  </script>
48
48
 
49
+ <script client>
50
+ const systemSheet = typeof craft !== 'undefined' && craft.platform === 'ios' && craft.capabilities.nativePlatformControls === true
51
+ </script>
52
+
49
53
  @if($native)
50
54
  <div class="{{ nativeWrapperClasses }}">
51
55
  <div class="{{ nativePanelClasses }}" data-stx-dialog-panel tabindex="-1">
52
56
  @if(nativeSheet)
53
- <div aria-hidden="true" class="{{ nativeGrabberClasses }}"></div>
57
+ <div :show="!systemSheet" aria-hidden="true" class="{{ nativeGrabberClasses }}"></div>
54
58
  @endif
55
59
  <slot />
56
60
  </div>
@@ -1,5 +1,7 @@
1
1
  <script server>
2
2
  export const open = $bool($props.open)
3
+ export const nativeDetents = $props.sheetDetents || ['medium', 'large']
4
+ export const nativeSelectedDetent = $props.selectedDetent || ''
3
5
  export const position = $props.position || 'right'
4
6
  export const title = $props.title || ''
5
7
  /** Set `closeOnEscape="false"` for a drawer that must be answered, not dismissed. */
@@ -122,6 +124,7 @@ export const drawerInstanceId = $uid
122
124
  // A nested overlay's close belongs to that overlay, never this drawer.
123
125
  const emit = defineEmits(['close'])
124
126
  const drawerInstanceId = {{ drawerInstanceId }}
127
+ const systemSheet = typeof craft !== 'undefined' && craft.platform === 'ios' && craft.capabilities.nativePlatformControls === true
125
128
  // useReactiveProp lets the parent drive `open` via signals
126
129
  // (`:open="drawerOpen()"`) instead of the prop being captured once.
127
130
  // See stacksjs/stx#1704.
@@ -186,7 +189,7 @@ defineExpose({
186
189
  {{-- On a native host a drawer is the phone's sheet: it slides up from the
187
190
  bottom edge whichever edge it is given, under a title bar with the close
188
191
  button where iOS puts it. --}}
189
- <div x-ref="rootRef" data-native="Modal" animationType="slide" data-stx-drawer="{{ drawerInstanceId }}" :show="isOpen()">
192
+ <div x-ref="rootRef" data-native="Modal" animationType="slide" presentationStyle="pageSheet" :sheetDetents="{{ nativeDetents }}" @if(nativeSelectedDetent)selectedDetent="{{ nativeSelectedDetent }}"@endif data-stx-drawer="{{ drawerInstanceId }}" :show="isOpen()">
190
193
  <div class="absolute inset-0 bg-[#000000]/40" aria-hidden="true" @click="onBackdropClick()"></div>
191
194
  <div class="absolute inset-0 justify-end pt-12">
192
195
  <div
@@ -198,7 +201,7 @@ defineExpose({
198
201
  aria-label="{{ title }}"
199
202
  tabindex="-1"
200
203
  >
201
- <div aria-hidden="true" class="self-center mt-1.5 h-[5px] w-9 rounded-full bg-[#c6c6c8] dark:bg-[#48484a]"></div>
204
+ <div :show="!systemSheet" aria-hidden="true" class="self-center mt-1.5 h-[5px] w-9 rounded-full bg-[#c6c6c8] dark:bg-[#48484a]"></div>
202
205
  <div class="flex-row items-center min-h-[44px] px-4">
203
206
  <h2 class="flex-1 text-[17px] font-semibold text-[#000000] dark:text-[#ffffff]">{{ title }}</h2>
204
207
  <button type="button" @click="close()" aria-label="Close panel" class="h-[30px] w-[30px] items-center justify-center rounded-full bg-[#767680]/12 dark:bg-[#767680]/24">
@@ -49,6 +49,7 @@ export const routerOwned = routerOwns(href)
49
49
  href="{{ href }}"
50
50
  class="{{ chipClasses }}"
51
51
  data-stx-filter-chip
52
+ @if($native)role="button" aria-pressed="{{ active ? 'true' : 'false' }}"@endif
52
53
  @if (routerOwned)
53
54
  data-stx-link
54
55
  @endif
@@ -28,7 +28,7 @@ export const rowClasses = `
28
28
  `.replace(/\s+/g, ' ').trim()
29
29
  </script>
30
30
 
31
- <div class="{{ rowClasses }}" data-stx-filter-chips role="group" aria-label="Filters">
31
+ <div @if($native)data-native="ScrollView" horizontal showsHorizontalScrollIndicator="false"@endif class="{{ rowClasses }}" data-stx-filter-chips role="group" aria-label="Filters">
32
32
  @foreach (chips as chip)
33
33
  <FilterChip
34
34
  :label="chip.label"
@@ -53,12 +53,13 @@ export const backRouterOwned = routerOwns(backHref)
53
53
 
54
54
  <header class="px-4 {{ className }}" style="{{ headerStyle }}" data-stx-nav-bar>
55
55
  @if (hasControls)
56
- <div class="flex h-11 items-center gap-2">
56
+ <div class="flex h-11 items-center gap-2" data-native-chrome="bar">
57
57
  @if (backHref)
58
58
  <a
59
59
  href="{{ backHref }}"
60
60
  class="flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-surface-raised text-fg"
61
61
  aria-label="Back"
62
+ data-native-chrome
62
63
  @if (backRouterOwned)
63
64
  data-stx-link
64
65
  @endif
@@ -81,6 +81,7 @@ const isDisabled = useReactiveProp('disabled', {{ disabled }})
81
81
  const segmentBase = {{ segmentBase }}
82
82
  const textSize = {{ sizing.text }}
83
83
  const groupID = {{ testID }}
84
+ const nativeSegments = typeof craft !== 'undefined' && craft.capabilities.nativePlatformControls === true
84
85
  const segmentOn = {{ segmentOn }}
85
86
  const segmentOff = {{ segmentOff }}
86
87
  const labelOn = {{ labelOn }}
@@ -119,6 +120,12 @@ function choose(segment) {
119
120
  emit('change', segment.value)
120
121
  }
121
122
 
123
+ function onNativeChange(event) {
124
+ const value = event.value ?? event.nativeEvent?.value
125
+ const segment = segments().find(choice => choice.value === value)
126
+ if (segment) choose(segment)
127
+ }
128
+
122
129
  function segmentClasses(segment) {
123
130
  const state = isOn(segment) ? segmentOn : 'bg-transparent'
124
131
  return `${segmentBase} ${state} ${isOff(segment) ? segmentOff : 'cursor-pointer'}`
@@ -135,7 +142,17 @@ function segmentID(segment) {
135
142
  defineExpose({ selected })
136
143
  </script>
137
144
 
145
+ @if($native)
146
+ <div :if="nativeSegments" data-native="SegmentedControl" data-stx-native-host-root data-stx-segmented-control
147
+ @if(testID)testID="{{ testID }}"@endif
148
+ :items="segments()" :value="selected()" :disabled="isDisabled()"
149
+ :aria-label="groupLabel() || null"
150
+ class="min-h-[32px] text-fg {{ stretch ? '' : 'self-start' }} {{ className }}"
151
+ @change="onNativeChange($event)"
152
+ ></div>
153
+ @endif
138
154
  <div
155
+ @if($native):if="!nativeSegments"@endif
139
156
  role="group"
140
157
  @if(label)aria-label="{{ label }}"@endif
141
158
  :aria-label="groupLabel() || null"
@@ -111,7 +111,7 @@ defineExpose({ isChecked, toggle })
111
111
  @if(disabled)disabled@endif
112
112
  :disabled="isDisabled()"
113
113
  :aria-disabled="isDisabled() ? 'true' : 'false'"
114
- class="disabled:opacity-50"
114
+ class="text-accent disabled:opacity-50"
115
115
  @change="onNativeChange($event)"
116
116
  ></div>
117
117
  </label>
@@ -40,7 +40,7 @@ export const barClasses = `
40
40
  application and a screen reader landing on an unlabelled group of five links
41
41
  has no way to know that.
42
42
  --}}
43
- <nav class="{{ barClasses }}" style="{{ barStyle }}" aria-label="Primary" data-stx-tab-bar>
43
+ <nav class="{{ barClasses }}" style="{{ barStyle }}" aria-label="Primary" data-stx-tab-bar data-native-chrome="tabs">
44
44
  @foreach (items as item)
45
45
  <TabBarItem
46
46
  :label="item.label"
@@ -163,6 +163,7 @@ export const nativeHelperClasses = `mt-1.5 px-4 text-[13px] ${error ? 'text-[#ff
163
163
  const emit = defineEmits(['input', 'clear', 'focus', 'blur', 'submit', 'submit-editing'])
164
164
  // Validity is live, for the same reason `disabled` is: a form posted with
165
165
  // fetch learns it after the submit, and nothing re-renders (#2047).
166
+ const nativeClear = typeof craft !== 'undefined' && craft.capabilities.nativePlatformControls === true
166
167
  const isError = useReactiveProp('error', {{ error }})
167
168
  // Keep the physical control and its affordances live on both web and native.
168
169
  const isDisabled = useReactiveProp('disabled', {{ disabled }})
@@ -225,6 +226,7 @@ function onNativeEndEditing(event) {
225
226
  }
226
227
 
227
228
  function onInput(event) {
229
+ if (event.clear === true || event.nativeEvent?.clear === true) { onClear(); return }
228
230
  if (isDisabled() || isReadonly()) {
229
231
  event.target.value = inputValue()
230
232
  return
@@ -294,15 +296,12 @@ defineExpose({ value: inputValue, clear: onClear })
294
296
  aria-invalid="{{ error ? 'true' : 'false' }}"
295
297
  :aria-invalid="isError() ? 'true' : 'false'"
296
298
  :class="{ 'border border-[#ff3b30] dark:border-[#ff453a]': isError(), 'opacity-50': isDisabled() }"
297
- @if(clearable)style="padding-right: 40px"@endif
299
+ @if(clearable):clearButtonMode="nativeClear ? 'while-editing' : 'never'" :style="nativeClear ? null : { paddingRight: 40 }"@endif
298
300
  />
301
+
299
302
  @if(clearable)
300
- <button
301
- type="button"
302
- :show="hasValue() && !isDisabled() && !isReadonly()"
303
- @click="onClear()"
304
- class="absolute top-0 right-0 h-12 w-10 items-center justify-center"
305
- aria-label="Clear input"
303
+ <button :if="!nativeClear" type="button" :show="hasValue() && !isDisabled() && !isReadonly()"
304
+ @click="onClear()" class="absolute top-0 right-0 h-12 w-10 items-center justify-center" aria-label="Clear input"
306
305
  ><i class="i-lucide-circle-x h-[17px] w-[17px] text-[#c4c4c7] dark:text-[#5b5b5f]"></i></button>
307
306
  @endif
308
307
  </div>
package/dist/index.js CHANGED
@@ -8,7 +8,7 @@ var Xe={__stx:!0,src:"./components/CodeBlock.stx"};var Qe={__stx:!0,src:"./compo
8
8
  Documentation: ${s.docsUrl}`;else if(e)o+=`
9
9
  Documentation: https://stacksjs.com/components/${e.toLowerCase()}`;return o}toJSON(){return{name:this.name,message:this.message,component:this.component,context:this.context,stack:this.stack}}}var J={invalidProp(e,t,s,o){return new M(e,`Invalid prop value for "${t}"`,{prop:t,received:s,expected:o,details:Array.isArray(o)?`The "${t}" prop must be one of the allowed values`:`The "${t}" prop does not match the expected type`})},requiredProp(e,t){return new M(e,`Required prop "${t}" is missing`,{prop:t,details:`The "${t}" prop is required for ${e} to function correctly`})},invalidType(e,t,s,o){return new M(e,`Invalid type for prop "${t}"`,{prop:t,received:typeof s,expected:o,details:`Expected "${t}" to be of type ${o}, but received ${typeof s}`})},componentNotFound(e){return new M("ComponentLoader",`Component "${e}" not found`,{component:e,details:"Make sure the component is properly imported and registered"})},invalidChildren(e,t,s){return new M(e,"Invalid children",{received:typeof t,expected:s,details:`${e} expects ${s} as children`})},stateUpdate(e,t,s){return new M(e,`Failed to update state "${t}"`,{details:s.message})},eventHandler(e,t,s){return new M(e,`Error in "${t}" event handler`,{details:s.message})},render(e,t){return new M(e,"Failed to render component",{details:t.message})}},oe=null;function Ri(e){oe=e}function Mi(){oe=null}function ae(e,t={}){let{throwError:s=!0,logError:o=!0}=t;if(o){if(console.error("Component Error:",e),e instanceof M)console.group("Error Details"),console.log("Component:",e.component),console.log("Context:",e.context),console.groupEnd()}if(oe)try{oe(e)}catch(a){console.error("Error in error handler:",a)}if(s)throw e}function Le(e,t,s){return(...o)=>{try{let a=e(...o);if(a instanceof Promise)return a.catch((n)=>{let r=J.eventHandler(t,s,n);throw ae(r,{throwError:!1}),r});return a}catch(a){let n=J.eventHandler(t,s,a);throw ae(n,{throwError:!1}),n}}}function Ct(e,t){if(!e)throw t}function $t(e,t,s={}){let o=M.formatMessage(e,t,s);console.warn(`\u26A0\uFE0F ${o}`)}function zi(e,t){Ct(e,t)}function ji(e){let t=typeof process<"u"&&process.env.DEBUG==="true";return{log(...s){if(t)console.log(`[${e}]`,...s)},warn(s,o){$t(e,s,o)},error(s,o){let a=new M(e,s,o);ae(a,{throwError:!1})}}}function Hi(e,t,s){try{return t()}catch(o){let a=J.render(e,o);return ae(a,{throwError:!1}),s}}class O{validate;message;isRequired;constructor(e,t,s=!1){this.validate=e;this.message=t;this.isRequired=s}get required(){return new O(this.validate,this.message,!0)}}var l={string:new O((e)=>typeof e==="string",(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`string\`.`),number:new O((e)=>typeof e==="number"&&!Number.isNaN(e),(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`number\`.`),boolean:new O((e)=>typeof e==="boolean",(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`boolean\`.`),func:new O((e)=>typeof e==="function",(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`function\`.`),object:new O((e)=>typeof e==="object"&&e!==null&&!Array.isArray(e),(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`object\`.`),array:new O((e)=>Array.isArray(e),(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`array\`.`),any:new O(()=>!0,()=>""),oneOf(e){return new O((t)=>e.includes(t),(t,s,o)=>`Invalid prop \`${s}\` of value \`${t}\` supplied to \`${o}\`, expected one of [${e.map((a)=>JSON.stringify(a)).join(", ")}].`)},oneOfType(e){return new O((t,s,o)=>e.some((a)=>a.validate(t,s,o)),(t,s,o)=>`Invalid prop \`${s}\` supplied to \`${o}\`, expected one of the specified types.`)},arrayOf(e){return new O((t,s,o)=>{if(!Array.isArray(t))return!1;return t.every((a,n)=>e.validate(a,`${s}[${n}]`,o))},(t,s,o)=>`Invalid prop \`${s}\` supplied to \`${o}\`, expected array of specified type.`)},shape(e){return new O((t,s,o)=>{if(typeof t!=="object"||t===null||Array.isArray(t))return!1;for(let[a,n]of Object.entries(e)){if(n.isRequired&&!(a in t))return!1;if(a in t&&!n.validate(t[a],`${s}.${a}`,o))return!1}return!0},(t,s,o)=>`Invalid prop \`${s}\` supplied to \`${o}\`, expected object matching specified shape.`)},instanceOf(e){return new O((t)=>t instanceof e,(t,s,o)=>`Invalid prop \`${s}\` supplied to \`${o}\`, expected instance of \`${e.name}\`.`)},custom(e,t){return new O(e,typeof t==="string"?()=>t:t)},min(e){return new O((t)=>typeof t==="number"&&t>=e,(t,s,o)=>`Invalid prop \`${s}\` of value \`${t}\` supplied to \`${o}\`, expected value >= ${e}.`)},max(e){return new O((t)=>typeof t==="number"&&t<=e,(t,s,o)=>`Invalid prop \`${s}\` of value \`${t}\` supplied to \`${o}\`, expected value <= ${e}.`)},range(e,t){return new O((s)=>typeof s==="number"&&s>=e&&s<=t,(s,o,a)=>`Invalid prop \`${o}\` of value \`${s}\` supplied to \`${a}\`, expected value between ${e} and ${t}.`)},pattern(e){return new O((t)=>typeof t==="string"&&e.test(t),(t,s,o)=>`Invalid prop \`${s}\` of value \`${t}\` supplied to \`${o}\`, expected value matching pattern ${e}.`)},email:new O((e)=>typeof e==="string"&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),(e,t,s)=>`Invalid prop \`${t}\` of value \`${e}\` supplied to \`${s}\`, expected valid email address.`),url:new O((e)=>{if(typeof e!=="string")return!1;try{let t=new URL(e);return!0}catch{return!1}},(e,t,s)=>`Invalid prop \`${t}\` of value \`${e}\` supplied to \`${s}\`, expected valid URL.`)};function St(e,t,s,o={}){let{throwOnError:a=!1,logWarnings:n=!0}=o,r=[];for(let[i,c]of Object.entries(s)){let p=t[i],u=p===void 0;if(c.isRequired&&u){let d=`Required prop \`${i}\` was not specified in \`${e}\`.`;r.push(d);continue}if(u)continue;if(!c.validate(p,i,e)){let d=c.message(p,i,e);r.push(d)}}if(r.length>0){if(n)console.group(`\u26A0\uFE0F Prop validation failed for \`${e}\``),r.forEach((i)=>console.warn(i)),console.groupEnd();if(a)throw Error(`Prop validation failed for \`${e}\`:
10
10
  ${r.join(`
11
- `)}`)}return{valid:r.length===0,errors:r}}function H(e,t,s){return(o)=>St(e,o,t,s)}function Vi(e,t,s="value"){if(!t.validate(e,s,"assertion"))throw Error(t.message(e,s,"assertion"))}function Bi(e,t,s="value"){if(!t.validate(e,s,"warning"))console.warn(t.message(e,s,"warning"))}var Et="./Button-j7gjvpxz.stx";var It={variant:l.oneOf(["primary","secondary","outline","ghost","danger"]),size:l.oneOf(["xs","sm","md","lg","xl"]),disabled:l.boolean,loading:l.boolean,type:l.oneOf(["button","submit","reset"]),fullWidth:l.boolean,label:l.string,text:l.string,leftIcon:l.string,rightIcon:l.string,className:l.string,onClick:l.func},Ui=H("Button",It);function Gi(e){return Le(e,"Button","onClick")}function Ji(e){if(e&&!["primary","secondary","outline","ghost","danger"].includes(e))throw J.invalidProp("Button","variant",e,["primary","secondary","outline","ghost","danger"])}function Yi(e){if(e&&!["xs","sm","md","lg","xl"].includes(e))throw J.invalidProp("Button","size",e,["xs","sm","md","lg","xl"])}var Pt="./Calendar-5vs6x7gj.stx";var Lt="./DateRangePicker-4zmf34e4.stx";var Dt="./EmptyState-snj7gbsn.stx";var Mt="./ErrorState-qb7af5zb.stx";var jt="./ThemeToggle-4wm9zare.stx";var Ft="./Card-r55zpjqh.stx";var Bt="./Checkbox-0grmgne5.stx";var Wt="./ChoiceChips-8dcf172n.stx";var _t="./Combobox-9n04ec5w.stx";var Gt="./ComboboxButton-4r6a45s1.stx";var Yt="./ComboboxInput-1gyfpnca.stx";var Qt="./ComboboxOption-wkw70js7.stx";var es="./ComboboxOptions-zhr9b6rx.stx";var ss="./CommandPalette-qqjdbcyg.stx";var as="./CommandPaletteItem-7290ce1z.stx";var rs="./Dialog-9rt34k7b.stx";var ls="./DialogBackdrop-de5m5m4w.stx";var ds="./DialogDescription-yd2jgt2m.stx";var us="./DialogPanel-efae92wv.stx";var fs="./DialogTitle-nw0pw114.stx";var gs="./Drawer-r5c5tt9d.stx";var xs="./Dropdown-hb8ks69x.stx";var ws="./DropdownButton-wxc25hsy.stx";var ks="./DropdownItem-af0vzc8a.stx";var $s="./DropdownItems-bkz7jkyz.stx";var Ts="./Form-cybgg9ym.stx";var Es={action:l.string,method:l.oneOf(["GET","POST","PUT","DELETE","PATCH"]),validationSchema:l.object,initialValues:l.object,validateOnChange:l.boolean,validateOnBlur:l.boolean,onSubmit:l.func,onError:l.func,className:l.string},dc=H("Form",Es);var As="./GroupedList-j3sxv5pb.stx";var Os="./GroupedListRow-v52zmzpk.stx";var Ns="./Image-nwxax17j.stx";var Rs="./EmailInput-sf9jfrgz.stx";var zs="./NumberInput-pq4k2k4k.stx";var Hs="./PasswordInput-r51qzgc0.stx";var Vs="./SearchInput-w15r5t95.stx";var qs="./TextInput-vy4qpncz.stx";var Ws={value:l.string,onChange:l.func,placeholder:l.string,disabled:l.boolean,readonly:l.boolean,size:l.oneOf(["sm","md","lg"]),error:l.boolean,label:l.string,helperText:l.string,required:l.boolean,className:l.string,inputClassName:l.string},Ks={value:l.string,onChange:l.func,placeholder:l.string,disabled:l.boolean,readonly:l.boolean,size:l.oneOf(["sm","md","lg"]),error:l.boolean,label:l.string,helperText:l.string,required:l.boolean,className:l.string,inputClassName:l.string,leftIcon:l.string,rightIcon:l.string,clearable:l.boolean,maxLength:l.number,showCount:l.boolean,type:l.oneOf(["text","date","time","datetime-local","month","week","url","tel","color","search","email","number","password"]),pattern:l.string,list:l.string,minLength:l.number,htmlSize:l.number,autofocus:l.boolean},_s={value:l.string,onChange:l.func,placeholder:l.string,disabled:l.boolean,readonly:l.boolean,size:l.oneOf(["sm","md","lg"]),error:l.boolean,label:l.string,helperText:l.string,required:l.boolean,className:l.string,inputClassName:l.string,min:l.number,max:l.number,step:l.number,showControls:l.boolean},Us={value:l.string,onChange:l.func,placeholder:l.string,disabled:l.boolean,readonly:l.boolean,size:l.oneOf(["sm","md","lg"]),error:l.boolean,label:l.string,helperText:l.string,required:l.boolean,className:l.string,inputClassName:l.string,showStrength:l.boolean},Gs={value:l.string,onChange:l.func,placeholder:l.string,disabled:l.boolean,readonly:l.boolean,size:l.oneOf(["sm","md","lg"]),error:l.boolean,label:l.string,helperText:l.string,required:l.boolean,className:l.string,inputClassName:l.string,onSearch:l.func,loading:l.boolean},Ec=H("TextInput",Ks),Ic=H("EmailInput",Ws),Ac=H("PasswordInput",Us),Pc=H("NumberInput",_s),Oc=H("SearchInput",Gs);var Ys="./Listbox-83j2q4x6.stx";var Qs="./ListboxButton-gan8e3nw.stx";var eo="./ListboxLabel-ka0hfm7b.stx";var so="./ListboxOption-gpaqvk3s.stx";var ao="./ListboxOptions-2928864k.stx";var ro="./FilterChip-00ja5jhz.stx";var lo="./FilterChips-7pnzycfd.stx";var po="./ListRow-nvyg2fwb.stx";var ho="./NavBar-qqrrhdnk.stx";var mo="./SectionCard-8b5fyrjd.stx";var bo="./TabBar-8143650x.stx";var vo="./TabBarItem-kddfnhk3.stx";var yo="./Navigator-1yk1c3pp.stx";var Co="./Notification-b3cz24f0.stx";var So="./Pager-kh6s65t2.stx";var Eo="./PagerDots-076w890y.stx";var Ao="./Pagination-8bhbkpcp.stx";var Oo="./Checkout-crbegxyv.stx";var No="./DefaultPaymentMethod-ss3x61tr.stx";var Ro="./PaymentMethods-z4hhr0kv.stx";var zo="./SubscriptionCheckout-rdcv32n1.stx";var Ho="./Popover-jjt7p7sn.stx";var Vo="./PopoverButton-ks3cttd9.stx";var qo="./PopoverPanel-ddgj4gz3.stx";var Ko="./Portal-m73vz879.stx";var Uo="./Progress-2qzb77kc.stx";var Jo="./Radio-8153x74w.stx";var Xo="./RadioGroup-smqcqgds.stx";var Zo="./RadioGroupDescription-z34r9avr.stx";var ta="./RadioGroupLabel-ka0hfm7b.stx";var oa="./RadioGroupOption-twcw1b2a.stx";var na="./SegmentedControl-z9gk2fpn.stx";var ia="./Select-1cnqbcmg.stx";var ca="./Sidebar-8dygywjv.stx";var pa="./SidebarFooter-s7skj92y.stx";var ha="./SidebarHeader-x7jdhmyr.stx";var ma="./SidebarItem-r4f2pref.stx";var ba="./SidebarPinned-48kyk193.stx";var va="./SidebarSection-5sqza2j6.stx";var ya="./SidebarSpace-bwv98azf.stx";var Ca="./SidebarSpaces-mdtrynr2.stx";var Sa="./SidebarSpaceSwitcher-1mycft2g.stx";var ne={blue:"#0088ff",red:"#ff383c",pink:"#ff2d55",orange:"#ff8d28",yellow:"#ffcc00",green:"#34c759",teal:"#00c3d0",cyan:"#00c0e8",indigo:"#6155f5",purple:"#cb30e0",brown:"#ac7f5e",gray:"#8e8e93"},_={pane:["bg-[#f2f2f4]/90 dark:bg-[#1c1c1e]/88","backdrop-blur-[50px] backdrop-saturate-[180%]","text-black dark:text-white","select-none"].join(" "),selection:"accent",layers:{shimmerRim:!0},scrollArea:"flex-1 overflow-y-auto overflow-x-hidden px-[10px] pb-[10px]",sectionHeader:["group/section flex w-full items-center","pl-[8px] pr-[6px] pt-[16px] pb-[5px]","text-[11px] font-semibold leading-[13px]","text-[#3c3c43]/60 dark:text-[#ebebf5]/60"].join(" "),sectionChevron:["i-f7-chevron-down h-[11px] w-[11px] ml-auto","text-[#3c3c43]/45 dark:text-[#ebebf5]/45","opacity-0 group-hover/section:opacity-100 transition-opacity duration-150","transition-transform duration-200"].join(" "),sectionGroup:"flex flex-col",item:{base:["flex w-full items-center","h-[32px] rounded-[8px] pl-[4px] pr-[8px]","text-[13px] leading-[16px] font-normal","text-black dark:text-white","transition-colors duration-150 ease-out","cursor-default"].join(" "),hover:"hover:bg-black/4 dark:hover:bg-white/6",active:"",pressed:"active:bg-black/10 dark:active:bg-white/18",disabled:"opacity-40 pointer-events-none",disclosure:"flex h-[16px] w-[18px] shrink-0 items-center justify-center",chevron:["i-f7-chevron-right h-[11px] w-[11px]","text-[#3c3c43]/55 dark:text-[#ebebf5]/55","transition-transform duration-200 ease-out"].join(" "),iconSlot:"flex h-[20px] w-[22px] shrink-0 items-center justify-center mr-[7px]",icon:"h-[17px] w-[17px]",image:"h-[20px] w-[20px] rounded-[4px] object-cover shadow-sm",label:"flex-1 truncate text-left",count:["ml-[8px] shrink-0 tabular-nums","text-[13px] leading-[16px]","text-[#3c3c43]/60 dark:text-[#ebebf5]/60"].join(" "),indentPerLevel:16}},Ta={selection:"classes",pane:"bg-[#f4f4f3] dark:bg-neutral-950 text-zinc-950 dark:text-white select-none",layers:{},scrollArea:"flex-1 overflow-y-auto overflow-x-hidden px-5 py-5",sectionHeader:"group/section flex w-full items-center gap-2.5 px-4 pb-2 pt-5 text-[13px] font-semibold uppercase tracking-[0.12em] text-zinc-400 dark:text-zinc-500",sectionChevron:"i-f7-chevron-down h-3 w-3 ml-auto opacity-0 group-hover/section:opacity-100 transition-opacity duration-150 transition-transform duration-200",sectionGroup:"flex flex-col space-y-1",item:{base:"flex w-full items-center gap-3 rounded-[16px] px-3.5 py-2 text-[14px] leading-tight transition-colors duration-150",hover:"hover:bg-[#ececea] hover:text-zinc-950 dark:hover:bg-white/10",active:"bg-[#e7e7e5] text-zinc-950 dark:bg-white/12 dark:text-white",pressed:"active:bg-[#e2e2e0] dark:active:bg-white/15",disabled:"opacity-50 pointer-events-none",disclosure:"flex h-4 w-4 shrink-0 items-center justify-center",chevron:"i-f7-chevron-right h-3 w-3 opacity-50 transition-transform duration-200",iconSlot:"flex h-5 w-5 shrink-0 items-center justify-center",icon:"h-[18px] w-[18px] text-zinc-500 dark:text-zinc-500",image:"h-5 w-5 rounded object-cover",label:"flex-1 truncate text-left text-zinc-700 dark:text-zinc-300",count:"ml-auto grid h-5 min-w-5 place-items-center rounded-full bg-white/70 px-1.5 text-[11px] font-medium text-zinc-500 shadow-sm dark:bg-white/10 dark:text-zinc-400",indentPerLevel:12}},Ea={selection:"classes",pane:"bg-[#f3f3f1]/48 dark:bg-neutral-950/32 backdrop-blur-3xl backdrop-saturate-150 text-zinc-950 dark:text-white select-none",layers:{tint:"bg-[linear-gradient(112deg,rgba(255,255,255,0.20)_0%,rgba(255,255,255,0.04)_45%,rgba(226,226,222,0.16)_100%)] dark:bg-[linear-gradient(112deg,rgba(255,255,255,0.08)_0%,rgba(255,255,255,0.02)_46%,rgba(255,255,255,0.06)_100%)]"},scrollArea:"flex-1 overflow-y-auto overflow-x-hidden px-5 py-2",sectionHeader:"group/section flex w-full items-center gap-2.5 px-3 pb-1.5 pt-3 rounded-[14px] text-[12px] font-semibold uppercase tracking-[0.10em] text-zinc-500/80 dark:text-zinc-400/80",sectionChevron:"i-f7-chevron-down h-3 w-3 ml-auto opacity-0 group-hover/section:opacity-100 transition-opacity duration-150 transition-transform duration-200",sectionGroup:"flex flex-col space-y-1",item:{base:"flex w-full items-center gap-3 rounded-[14px] px-3 py-1.5 text-[13.5px] leading-tight transition-colors duration-150",hover:"hover:bg-white/38 hover:text-zinc-950 dark:hover:bg-white/10",active:"bg-[#e8e8e6]/90 text-zinc-950 dark:bg-white/12 dark:text-white",pressed:"active:bg-white/50 dark:active:bg-white/15",disabled:"opacity-50 pointer-events-none",disclosure:"flex h-4 w-4 shrink-0 items-center justify-center",chevron:"i-f7-chevron-right h-3 w-3 opacity-50 transition-transform duration-200",iconSlot:"flex h-5 w-5 shrink-0 items-center justify-center",icon:"h-[18px] w-[18px] text-zinc-600 dark:text-zinc-400",image:"h-5 w-5 rounded object-cover",label:"flex-1 truncate text-left text-zinc-700 dark:text-zinc-300",count:"ml-auto grid h-5 min-w-5 place-items-center rounded-full bg-white/72 px-1.5 text-[11px] font-medium text-zinc-500 shadow-sm dark:bg-white/10 dark:text-zinc-400",indentPerLevel:12}},Ia={selection:"classes",pane:["bg-[#f7f5f1]/92 dark:bg-[#1a1a1c]/92","backdrop-blur-[40px] backdrop-saturate-[160%]","text-[#2c2a28] dark:text-[#ededf0]","select-none"].join(" "),layers:{tint:["bg-[linear-gradient(180deg,var(--stx-sidebar-tint,rgba(255,251,242,0.55))_0%,rgba(255,255,255,0)_38%)]","dark:bg-[linear-gradient(180deg,var(--stx-sidebar-tint,rgba(255,255,255,0.05))_0%,rgba(255,255,255,0)_42%)]"].join(" ")},scrollArea:"flex-1 overflow-y-auto overflow-x-hidden px-[16px] pb-[8px]",sectionHeader:["group/section flex w-full items-center","px-[8px] pt-[14px] pb-[4px]","text-[11px] font-medium leading-[13px]","opacity-55"].join(" "),sectionChevron:["i-f7-chevron-down h-[10px] w-[10px] ml-auto","opacity-0 group-hover/section:opacity-100 transition-opacity duration-150","transition-transform duration-200"].join(" "),sectionGroup:"flex flex-col space-y-[2px]",item:{base:["flex w-full items-center","h-[30px] rounded-[8px] pl-[6px] pr-[8px]","text-[13px] leading-[16px] font-normal","text-current","transition-[background-color,box-shadow,color] duration-150 ease-out","cursor-default"].join(" "),hover:"hover:bg-white/55 dark:hover:bg-white/8",active:["bg-white dark:bg-white/14","font-medium","shadow-[0_1px_2px_rgba(0,0,0,0.08)] dark:shadow-[0_1px_2px_rgba(0,0,0,0.35)]","ring-1 ring-black/5 dark:ring-white/8"].join(" "),pressed:"active:bg-white/80 dark:active:bg-white/18",disabled:"opacity-40 pointer-events-none",disclosure:"flex h-[16px] w-[16px] shrink-0 items-center justify-center",chevron:["i-f7-chevron-right h-[10px] w-[10px] opacity-45","transition-transform duration-200 ease-out"].join(" "),iconSlot:"flex h-[18px] w-[18px] shrink-0 items-center justify-center mr-[8px]",icon:"h-[16px] w-[16px]",image:"h-[18px] w-[18px] rounded-[5px] object-cover shadow-sm",label:"flex-1 truncate text-left",count:["ml-[8px] shrink-0 tabular-nums","text-[12px] leading-[16px] opacity-45"].join(" "),indentPerLevel:14}},Aa={..._,pane:"bg-stone-100 dark:bg-neutral-900 text-black dark:text-white select-none",layers:{}},Pa={..._,pane:"bg-transparent text-black dark:text-white select-none",layers:{}},Oa={..._,pane:"bg-white/50 dark:bg-black/40 backdrop-blur-3xl backdrop-saturate-200 text-black dark:text-white select-none",layers:{}},Ne={macos:_,tahoe:_,"macos-tahoe":_,"macos-latest":_,arc:Ia,workspace:Ta,desktop:Ea,solid:Aa,transparent:Pa,vibrancy:Oa};function vp(e){return Ne[e||"macos"]||Ne.macos}function wp(e){if(!e)return;return ne[e]||e}var La=ne.gray;function q(e,t,s){return`color-mix(in oklab, ${e} ${t}%, ${s})`}function De(e){return{light:{from:q(e,35,"#ffffff"),to:q(e,12.5,"#ffffff"),ink:q(e,22,"#17171b"),accent:q(e,88,"#2a2a30")},dark:{from:q(e,27,"#101014"),to:q(e,10,"#08080b"),ink:q(e,12,"#f4f4f7"),accent:q(e,74,"#ffffff")}}}function Cp(e,t){return`linear-gradient(180deg, ${e} 0%, ${t} 100%)`}function Na(e){if(!e)return De(La);if(typeof e!=="string")return e;return De(ne[e]||e)}function Da(e){return[`--stx-space-light-from: ${e.light.from}`,`--stx-space-light-to: ${e.light.to}`,`--stx-space-light-ink: ${e.light.ink}`,`--stx-space-light-accent: ${e.light.accent}`,`--stx-space-dark-from: ${e.dark.from}`,`--stx-space-dark-to: ${e.dark.to}`,`--stx-space-dark-ink: ${e.dark.ink}`,`--stx-space-dark-accent: ${e.dark.accent}`].join("; ")}function Re(e,t,s,o){if(!e||!e.label)return null;return{id:e.id||`${t}-${s}`,label:e.label,icon:e.icon||o}}function Ra(e){let t=Na(e.tint);return{id:e.id,label:e.label||"",icon:e.icon||"",pinned:e.pinned||[],sections:e.sections||[],action:Re(e.action,e.id,"action","i-f7-plus"),clear:Re(e.clear,e.id,"clear","i-f7-arrow-down"),tint:t,style:Da(t),deferred:e.deferred===!0,showTitle:e.showTitle??!0}}function $p(e){return(e||[]).map(Ra)}function Sp(e,t){if(!t)return 0;let s=e.findIndex((o)=>o.id===t);return s===-1?0:s}function Tp(e){return e.map((t)=>t.tint)}var za="./Skeleton-m4p66zcs.stx";var Ha="./Spinner-vhnc3y03.stx";var Va="./Stepper-68gxcmej.stx";var qa="./StepperStep-zf4pq1s0.stx";class re{storage;namespace;watchers=new Map;encryptionKey="stx-storage-key";constructor(e="local",t=""){if(this.storage=e==="local"?globalThis.localStorage:globalThis.sessionStorage,this.namespace=t,typeof window<"u")window.addEventListener("storage",this.handleStorageEvent.bind(this))}handleStorageEvent(e){if(!e.key)return;let t=this.namespace&&e.key.startsWith(`${this.namespace}:`)?e.key.slice(this.namespace.length+1):e.key,s=this.watchers.get(t);if(s){let o=e.oldValue?JSON.parse(e.oldValue).value:null,a=e.newValue?JSON.parse(e.newValue).value:null;s.forEach((n)=>n(a,o,t))}}encrypt(e){let t="";for(let s=0;s<e.length;s++)t+=String.fromCharCode(e.charCodeAt(s)^this.encryptionKey.charCodeAt(s%this.encryptionKey.length));return btoa(t)}decrypt(e){try{let t=atob(e),s="";for(let o=0;o<t.length;o++)s+=String.fromCharCode(t.charCodeAt(o)^this.encryptionKey.charCodeAt(o%this.encryptionKey.length));return s}catch{return e}}compress(e){if(e.length<100)return e;let t={},s=256,o=[],a="";for(let n=0;n<e.length;n++){let r=e.charAt(n),i=a+r;if(t[i]!==void 0)a=i;else o.push(a.length>1?t[a]:a.charCodeAt(0)),t[i]=s++,a=r}if(a!=="")o.push(a.length>1?t[a]:a.charCodeAt(0));return JSON.stringify(o)}decompress(e){try{let t=JSON.parse(e);if(!Array.isArray(t))return e;let s={},o=256,a=String.fromCharCode(t[0]),n=a;for(let r=1;r<t.length;r++){let i=t[r],c;if(s[i]!==void 0)c=s[i];else if(i===o)c=a+a.charAt(0);else return e;n+=c,s[o++]=a+c.charAt(0),a=c}return n}catch{return e}}getKey(e){return this.namespace?`${this.namespace}:${e}`:e}set(e,t,s){let o=this.getKey(e),a=this.get(e),n={value:t,timestamp:Date.now(),expire:s?.expire,encrypted:s?.encrypt||!1,compressed:s?.compress||!1};try{let r=JSON.stringify(n);if(s?.compress)r=this.compress(r);if(s?.encrypt)r=this.encrypt(r);this.storage.setItem(o,r),this.notifyWatchers(e,t,a)}catch(r){console.error("Storage set error:",r)}}get(e){let t=this.getKey(e);try{let s=this.storage.getItem(t);if(!s)return null;if(s.match(/^[A-Z0-9+/]+=*$/i))try{s=this.decrypt(s)}catch{}if(s.startsWith("["))try{s=this.decompress(s)}catch{}let o=JSON.parse(s);if(o.expire&&Date.now()-o.timestamp>o.expire)return this.remove(e),null;return o.value}catch(s){return console.error("Storage get error:",s),null}}watch(e,t){if(!this.watchers.has(e))this.watchers.set(e,new Set);return this.watchers.get(e).add(t),()=>{let s=this.watchers.get(e);if(s){if(s.delete(t),s.size===0)this.watchers.delete(e)}}}notifyWatchers(e,t,s){let o=this.watchers.get(e);if(o)o.forEach((a)=>a(t,s,e))}remove(e){let t=this.getKey(e),s=this.get(e);this.storage.removeItem(t),this.notifyWatchers(e,null,s)}clear(){if(this.namespace)this.keys().forEach((t)=>this.remove(t));else this.storage.clear()}has(e){return this.get(e)!==null}keys(){let e=Object.keys(this.storage);if(this.namespace){let t=`${this.namespace}:`;return e.filter((s)=>s.startsWith(t)).map((s)=>s.slice(t.length))}return e}size(){return this.keys().length}getQuota(){if("storage"in navigator&&"estimate"in navigator.storage)return null;try{let e=0;for(let s=0;s<this.storage.length;s++){let o=this.storage.key(s);if(o){let a=this.storage.getItem(o)||"";e+=o.length+a.length}}let t=5242880;return{usage:e*2,quota:t,percentage:e*2/t*100}}catch{return null}}setMany(e,t){Object.entries(e).forEach(([s,o])=>{this.set(s,o,t)})}getMany(e){let t={};return e.forEach((s)=>{t[s]=this.get(s)}),t}removeMany(e){e.forEach((t)=>this.remove(t))}}var Qp={local:new re("local"),session:new re("session")};function Zp(e="local",t){return new re(e,t)}var Ka="./Switch-nay7zdee.stx";var Ua="./Table-0a4y46vd.stx";var Ja="./TableBody-y49bqb1p.stx";var Xa="./TableCell-jhvsxw8b.stx";var Za="./TableHead-e9xvjx2j.stx";var tn="./TableHeader-krzcx4sv.stx";var on="./TableRow-dt8e11aj.stx";var nn="./Tab-j9f4t166.stx";var ln="./TabList-r1pc87xs.stx";var dn="./TabPanel-5htevsq6.stx";var un="./Tabs-psm5wj7c.stx";var fn="./Teleport-vqs75x36.stx";var gn="./Textarea-9xmhjqp8.stx";var xn="./Tooltip-pev702hb.stx";var wn="./Transition-7m0mk45s.stx";var kn="./Video-vxkeg384.stx";var $n="./VirtualList-fa7v5a3h.stx";var Tn="./VirtualTable-kp7b3wyv.stx";var En=0;function Me(e="a11y"){return`${e}-${++En}-${Date.now()}`}function Uu(e,t,s={}){let{visible:o=!1,id:a=Me("label")}=s,n=document.createElement(o?"label":"span");if(n.id=a,n.textContent=e,!o)Object.assign(n.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"});if(t)if(t.setAttribute("aria-labelledby",a),t.parentElement)t.parentElement.insertBefore(n,t);else document.body.appendChild(n);return a}function Gu(e,t){let s=Me("desc"),o=document.createElement("span");if(o.id=s,o.textContent=e,Object.assign(o.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}),t)if(t.setAttribute("aria-describedby",s),t.parentElement)t.parentElement.insertBefore(o,t);else document.body.appendChild(o);return s}function Ju(e,t="polite"){let s=document.createElement("div");s.setAttribute("role","status"),s.setAttribute("aria-live",t),s.setAttribute("aria-atomic","true"),Object.assign(s.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}),document.body.appendChild(s),setTimeout(()=>{s.textContent=e},100),setTimeout(()=>{s.parentNode?.removeChild(s)},1000)}function ve(e){let t=["a[href]","area[href]",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","button:not([disabled])","iframe","object","embed","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(",");return Array.from(e.querySelectorAll(t)).filter((s)=>s.offsetParent!==null)}function Yu(e,t={}){let{initialFocus:s,returnFocus:o,escapeDeactivates:a=!0,clickOutsideDeactivates:n=!0,allowOutsideClick:r=!1,onActivate:i,onDeactivate:c}=t,p=!1,u=!1,d=null,g=(v)=>{if(u)return;if(a&&v.key==="Escape"){v.preventDefault(),C();return}if(v.key==="Tab"){let E=ve(e);if(E.length===0){v.preventDefault();return}let A=E[0],S=E[E.length-1];if(v.shiftKey){if(document.activeElement===A)v.preventDefault(),S.focus()}else if(document.activeElement===S)v.preventDefault(),A.focus()}},m=(v)=>{if(u)return;if(!e.contains(v.target)){if(typeof r==="function"){if(!r(v)&&n)C()}else if(!r&&n)C()}};function k(){if(p)return;p=!0,d=document.activeElement;let v=s||ve(e)[0];if(v&&typeof v.focus==="function")v.focus();document.addEventListener("keydown",g),document.addEventListener("click",m),i?.()}function C(){if(!p)return;p=!1;let v=o||d;if(v&&typeof v.focus==="function")v.focus();document.removeEventListener("keydown",g),document.removeEventListener("click",m),c?.()}function y(){u=!0}function b(){u=!1}return{activate:k,deactivate:C,pause:y,unpause:b}}function Xu(e,t={}){let{selector:s='[role="option"], [role="menuitem"], [role="tab"], button',initialIndex:o=0,orientation:a="both",loop:n=!0,onFocusChange:r}=t,i=o,c=()=>Array.from(e.querySelectorAll(s)),p=(d)=>{let g=c();if(d<0||d>=g.length)return;g.forEach((m,k)=>{if(k===d){if(m.setAttribute("tabindex","0"),typeof m.focus==="function")m.focus()}else m.setAttribute("tabindex","-1")}),i=d,r?.(d,g[d])},u=(d)=>{let m=c().length-1,k=!1,C=i;switch(d.key){case"ArrowRight":if(a==="horizontal"||a==="both"){if(C=i+1,C>m)C=n?0:m;k=!0}break;case"ArrowLeft":if(a==="horizontal"||a==="both"){if(C=i-1,C<0)C=n?m:0;k=!0}break;case"ArrowDown":if(a==="vertical"||a==="both"){if(C=i+1,C>m)C=n?0:m;k=!0}break;case"ArrowUp":if(a==="vertical"||a==="both"){if(C=i-1,C<0)C=n?m:0;k=!0}break;case"Home":C=0,k=!0;break;case"End":C=m,k=!0;break}if(k)d.preventDefault(),p(C)};return p(o),e.addEventListener("keydown",u),()=>{e.removeEventListener("keydown",u)}}var Qu={Enter:"Enter",Space:" ",Escape:"Escape",ArrowUp:"ArrowUp",ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight",Tab:"Tab",Home:"Home",End:"End",PageUp:"PageUp",PageDown:"PageDown"};function Zu(e){return document.activeElement===e}function eh(e,t){let s=t||document.activeElement,o=ve(document.body),a=o.indexOf(s);if(a===-1)return;let n=e==="next"?a+1:a-1,r=o[n];if(r)r.focus()}function th(e){if(e.getAttribute("aria-hidden")==="true")return!1;let t=window.getComputedStyle(e);if(t.display==="none"||t.visibility==="hidden")return!1;return!0}var sh={setExpanded(e,t){e.setAttribute("aria-expanded",String(t))},setSelected(e,t){e.setAttribute("aria-selected",String(t))},setChecked(e,t){e.setAttribute("aria-checked",String(t))},setDisabled(e,t){if(e.setAttribute("aria-disabled",String(t)),t)e.setAttribute("tabindex","-1");else e.removeAttribute("tabindex")},setHidden(e,t){if(t)e.setAttribute("aria-hidden","true");else e.removeAttribute("aria-hidden")},setPressed(e,t){e.setAttribute("aria-pressed",String(t))},setInvalid(e,t){e.setAttribute("aria-invalid",String(t))},setRequired(e,t){e.setAttribute("aria-required",String(t))},setLive(e,t){e.setAttribute("aria-live",t)},setBusy(e,t){e.setAttribute("aria-busy",String(t))}};function oh(e){let t=document.createElement("span");return t.textContent=e,t.className="sr-only",Object.assign(t.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}),t}function ah(){if(typeof window.matchMedia==="function")return window.matchMedia("(prefers-reduced-motion: reduce)").matches;return!1}function nh(){if(typeof window.matchMedia==="function")return window.matchMedia("(prefers-contrast: high)").matches;return!1}function rh(){if(typeof window.matchMedia==="function"){if(window.matchMedia("(prefers-color-scheme: dark)").matches)return"dark";if(window.matchMedia("(prefers-color-scheme: light)").matches)return"light"}return null}function ih(e,t="Skip to main content"){let s=document.createElement("a");return s.href=`#${e}`,s.textContent=t,s.className="skip-link",Object.assign(s.style,{position:"absolute",top:"-40px",left:"0",background:"#000",color:"#fff",padding:"8px",textDecoration:"none",zIndex:"100"}),s.addEventListener("focus",()=>{s.style.top="0"}),s.addEventListener("blur",()=>{s.style.top="-40px"}),s}function lh(e){let t=[],s=(o)=>{let a=e.getAttribute(o);if(a){let n=a.split(" ");for(let r of n)if(!document.getElementById(r))t.push(`${o} references non-existent ID: ${r}`)}};return s("aria-labelledby"),s("aria-describedby"),s("aria-controls"),s("aria-owns"),s("aria-activedescendant"),t}var In=(e,t,s,o)=>s*e/o+t,An=(e,t,s,o)=>(e/=o,s*e*e+t),Pn=(e,t,s,o)=>(e/=o,-s*e*(e-2)+t),On=(e,t,s,o)=>{if(e/=o/2,e<1)return s/2*e*e+t;return e--,-s/2*(e*(e-2)-1)+t},Ln=(e,t,s,o)=>(e/=o,s*e*e*e+t),Nn=(e,t,s,o)=>(e/=o,e--,s*(e*e*e+1)+t),Dn=(e,t,s,o)=>{if(e/=o/2,e<1)return s/2*e*e*e+t;return e-=2,s/2*(e*e*e+2)+t},Rn=(e,t,s,o)=>(e/=o,s*e*e*e*e+t),Mn=(e,t,s,o)=>(e/=o,e--,-s*(e*e*e*e-1)+t),zn=(e,t,s,o)=>{if(e/=o/2,e<1)return s/2*e*e*e*e+t;return e-=2,-s/2*(e*e*e*e-2)+t},jn=(e,t,s,o)=>(e/=o,s*e*e*e*e*e+t),Hn=(e,t,s,o)=>(e/=o,e--,s*(e*e*e*e*e+1)+t),Fn=(e,t,s,o)=>{if(e/=o/2,e<1)return s/2*e*e*e*e*e+t;return e-=2,s/2*(e*e*e*e*e+2)+t},Vn=(e,t,s,o)=>-s*Math.cos(e/o*(Math.PI/2))+s+t,Bn=(e,t,s,o)=>s*Math.sin(e/o*(Math.PI/2))+t,qn=(e,t,s,o)=>-s/2*(Math.cos(Math.PI*e/o)-1)+t,Wn=(e,t,s,o)=>e===0?t:s*2**(10*(e/o-1))+t,Kn=(e,t,s,o)=>e===o?t+s:s*(-(2**(-10*e/o))+1)+t,_n=(e,t,s,o)=>{if(e===0)return t;if(e===o)return t+s;if(e/=o/2,e<1)return s/2*2**(10*(e-1))+t;return e--,s/2*(-(2**(-10*e))+2)+t},Un=(e,t,s,o)=>(e/=o,-s*(Math.sqrt(1-e*e)-1)+t),Gn=(e,t,s,o)=>(e/=o,e--,s*Math.sqrt(1-e*e)+t),Jn=(e,t,s,o)=>{if(e/=o/2,e<1)return-s/2*(Math.sqrt(1-e*e)-1)+t;return e-=2,s/2*(Math.sqrt(1-e*e)+1)+t},Yn=(e,t,s,o)=>{let a=1.70158,n=0,r=s;if(e===0)return t;if(e/=o,e===1)return t+s;if(!n)n=o*0.3;if(r<Math.abs(s))r=s,a=n/4;else a=n/(2*Math.PI)*Math.asin(s/r);return e-=1,-(r*2**(10*e)*Math.sin((e*o-a)*(2*Math.PI)/n))+t},Xn=(e,t,s,o)=>{let a=1.70158,n=0,r=s;if(e===0)return t;if(e/=o,e===1)return t+s;if(!n)n=o*0.3;if(r<Math.abs(s))r=s,a=n/4;else a=n/(2*Math.PI)*Math.asin(s/r);return r*2**(-10*e)*Math.sin((e*o-a)*(2*Math.PI)/n)+s+t},Qn=(e,t,s,o)=>{let a=1.70158,n=0,r=s;if(e===0)return t;if(e/=o/2,e===2)return t+s;if(!n)n=o*0.44999999999999996;if(r<Math.abs(s))r=s,a=n/4;else a=n/(2*Math.PI)*Math.asin(s/r);if(e<1)return e-=1,-0.5*(r*2**(10*e)*Math.sin((e*o-a)*(2*Math.PI)/n))+t;return e-=1,r*2**(-10*e)*Math.sin((e*o-a)*(2*Math.PI)/n)*0.5+s+t},Zn=(e,t,s,o)=>(e/=o,s*e*e*(2.70158*e-1.70158)+t),er=(e,t,s,o)=>(e/=o,e--,s*(e*e*(2.70158*e+1.70158)+1)+t),tr=(e,t,s,o)=>{let a=1.70158;if(e/=o/2,e<1)return a*=1.525,s/2*(e*e*((a+1)*e-a))+t;return e-=2,a*=1.525,s/2*(e*e*((a+1)*e+a)+2)+t},we=(e,t,s,o)=>{if(e/=o,e<0.36363636363636365)return s*(7.5625*e*e)+t;else if(e<0.7272727272727273)return e-=0.5454545454545454,s*(7.5625*e*e+0.75)+t;else if(e<0.9090909090909091)return e-=0.8181818181818182,s*(7.5625*e*e+0.9375)+t;else return e-=0.9545454545454546,s*(7.5625*e*e+0.984375)+t},ze=(e,t,s,o)=>s-we(o-e,0,s,o)+t,sr=(e,t,s,o)=>{if(e<o/2)return ze(e*2,0,s,o)*0.5+t;return we(e*2-o,0,s,o)*0.5+s*0.5+t},dh={linear:In,easeInQuad:An,easeOutQuad:Pn,easeInOutQuad:On,easeInCubic:Ln,easeOutCubic:Nn,easeInOutCubic:Dn,easeInQuart:Rn,easeOutQuart:Mn,easeInOutQuart:zn,easeInQuint:jn,easeOutQuint:Hn,easeInOutQuint:Fn,easeInSine:Vn,easeOutSine:Bn,easeInOutSine:qn,easeInExpo:Wn,easeOutExpo:Kn,easeInOutExpo:_n,easeInCirc:Un,easeOutCirc:Gn,easeInOutCirc:Jn,easeInElastic:Yn,easeOutElastic:Xn,easeInOutElastic:Qn,easeInBack:Zn,easeOutBack:er,easeInOutBack:tr,easeInBounce:ze,easeOutBounce:we,easeInOutBounce:sr};function or(e,t={}){let{duration:s="1s",timing:o="ease",delay:a="0s",iteration:n="1",direction:r="normal",fill:i="both",playState:c="running"}=t;return`${e} ${s} ${o} ${a} ${n} ${r} ${i} ${c}`}function je(e,t,s={}){e.style.animation=or(t,s)}function uh(e){e.style.animation=""}function ar(e){return new Promise((t)=>{let s=()=>{e.removeEventListener("animationend",s),t()};e.addEventListener("animationend",s)})}function hh(e,t,s={}){let{stagger:o=100,...a}=s;e.forEach((n,r)=>{let i=`${r*o}ms`;je(n,t,{...a,delay:i})})}async function fh(e,t){for(let s of t)je(e,s.name,s.options),await ar(e)}var mh={fadeIn:"animate-fade-in",fadeOut:"animate-fade-out",slideInUp:"animate-slide-in-up",slideInDown:"animate-slide-in-down",slideInLeft:"animate-slide-in-left",slideInRight:"animate-slide-in-right",zoomIn:"animate-zoom-in",zoomOut:"animate-zoom-out",bounce:"animate-bounce",spin:"animate-spin",ping:"animate-ping",pulse:"animate-pulse"};function gh(e,t,s=1000){return new Promise((o)=>{e.classList.add(t),setTimeout(()=>{e.classList.remove(t),o()},s)})}function bh(e,t){let s=`
11
+ `)}`)}return{valid:r.length===0,errors:r}}function H(e,t,s){return(o)=>St(e,o,t,s)}function Vi(e,t,s="value"){if(!t.validate(e,s,"assertion"))throw Error(t.message(e,s,"assertion"))}function Bi(e,t,s="value"){if(!t.validate(e,s,"warning"))console.warn(t.message(e,s,"warning"))}var Et="./Button-gmct2gvq.stx";var It={variant:l.oneOf(["primary","secondary","outline","ghost","danger"]),size:l.oneOf(["xs","sm","md","lg","xl"]),disabled:l.boolean,loading:l.boolean,type:l.oneOf(["button","submit","reset"]),fullWidth:l.boolean,label:l.string,text:l.string,leftIcon:l.string,rightIcon:l.string,className:l.string,onClick:l.func},Ui=H("Button",It);function Gi(e){return Le(e,"Button","onClick")}function Ji(e){if(e&&!["primary","secondary","outline","ghost","danger"].includes(e))throw J.invalidProp("Button","variant",e,["primary","secondary","outline","ghost","danger"])}function Yi(e){if(e&&!["xs","sm","md","lg","xl"].includes(e))throw J.invalidProp("Button","size",e,["xs","sm","md","lg","xl"])}var Pt="./Calendar-5vs6x7gj.stx";var Lt="./DateRangePicker-4zmf34e4.stx";var Dt="./EmptyState-snj7gbsn.stx";var Mt="./ErrorState-qb7af5zb.stx";var jt="./ThemeToggle-4wm9zare.stx";var Ft="./Card-r55zpjqh.stx";var Bt="./Checkbox-80myyzzm.stx";var Wt="./ChoiceChips-8dcf172n.stx";var _t="./Combobox-9n04ec5w.stx";var Gt="./ComboboxButton-4r6a45s1.stx";var Yt="./ComboboxInput-1gyfpnca.stx";var Qt="./ComboboxOption-wkw70js7.stx";var es="./ComboboxOptions-zhr9b6rx.stx";var ss="./CommandPalette-qqjdbcyg.stx";var as="./CommandPaletteItem-7290ce1z.stx";var rs="./Dialog-7q0a67ge.stx";var ls="./DialogBackdrop-de5m5m4w.stx";var ds="./DialogDescription-yd2jgt2m.stx";var us="./DialogPanel-gky13gdt.stx";var fs="./DialogTitle-nw0pw114.stx";var gs="./Drawer-nywb36q5.stx";var xs="./Dropdown-hb8ks69x.stx";var ws="./DropdownButton-wxc25hsy.stx";var ks="./DropdownItem-af0vzc8a.stx";var $s="./DropdownItems-bkz7jkyz.stx";var Ts="./Form-cybgg9ym.stx";var Es={action:l.string,method:l.oneOf(["GET","POST","PUT","DELETE","PATCH"]),validationSchema:l.object,initialValues:l.object,validateOnChange:l.boolean,validateOnBlur:l.boolean,onSubmit:l.func,onError:l.func,className:l.string},dc=H("Form",Es);var As="./GroupedList-j3sxv5pb.stx";var Os="./GroupedListRow-v52zmzpk.stx";var Ns="./Image-nwxax17j.stx";var Rs="./EmailInput-sf9jfrgz.stx";var zs="./NumberInput-pq4k2k4k.stx";var Hs="./PasswordInput-r51qzgc0.stx";var Vs="./SearchInput-w15r5t95.stx";var qs="./TextInput-1kvx4pte.stx";var Ws={value:l.string,onChange:l.func,placeholder:l.string,disabled:l.boolean,readonly:l.boolean,size:l.oneOf(["sm","md","lg"]),error:l.boolean,label:l.string,helperText:l.string,required:l.boolean,className:l.string,inputClassName:l.string},Ks={value:l.string,onChange:l.func,placeholder:l.string,disabled:l.boolean,readonly:l.boolean,size:l.oneOf(["sm","md","lg"]),error:l.boolean,label:l.string,helperText:l.string,required:l.boolean,className:l.string,inputClassName:l.string,leftIcon:l.string,rightIcon:l.string,clearable:l.boolean,maxLength:l.number,showCount:l.boolean,type:l.oneOf(["text","date","time","datetime-local","month","week","url","tel","color","search","email","number","password"]),pattern:l.string,list:l.string,minLength:l.number,htmlSize:l.number,autofocus:l.boolean},_s={value:l.string,onChange:l.func,placeholder:l.string,disabled:l.boolean,readonly:l.boolean,size:l.oneOf(["sm","md","lg"]),error:l.boolean,label:l.string,helperText:l.string,required:l.boolean,className:l.string,inputClassName:l.string,min:l.number,max:l.number,step:l.number,showControls:l.boolean},Us={value:l.string,onChange:l.func,placeholder:l.string,disabled:l.boolean,readonly:l.boolean,size:l.oneOf(["sm","md","lg"]),error:l.boolean,label:l.string,helperText:l.string,required:l.boolean,className:l.string,inputClassName:l.string,showStrength:l.boolean},Gs={value:l.string,onChange:l.func,placeholder:l.string,disabled:l.boolean,readonly:l.boolean,size:l.oneOf(["sm","md","lg"]),error:l.boolean,label:l.string,helperText:l.string,required:l.boolean,className:l.string,inputClassName:l.string,onSearch:l.func,loading:l.boolean},Ec=H("TextInput",Ks),Ic=H("EmailInput",Ws),Ac=H("PasswordInput",Us),Pc=H("NumberInput",_s),Oc=H("SearchInput",Gs);var Ys="./Listbox-83j2q4x6.stx";var Qs="./ListboxButton-gan8e3nw.stx";var eo="./ListboxLabel-ka0hfm7b.stx";var so="./ListboxOption-gpaqvk3s.stx";var ao="./ListboxOptions-2928864k.stx";var ro="./FilterChip-bynt5maa.stx";var lo="./FilterChips-mpmev5v5.stx";var po="./ListRow-nvyg2fwb.stx";var ho="./NavBar-ky8tedjb.stx";var mo="./SectionCard-8b5fyrjd.stx";var bo="./TabBar-6m1ajm1d.stx";var vo="./TabBarItem-kddfnhk3.stx";var yo="./Navigator-1yk1c3pp.stx";var Co="./Notification-b3cz24f0.stx";var So="./Pager-kh6s65t2.stx";var Eo="./PagerDots-076w890y.stx";var Ao="./Pagination-8bhbkpcp.stx";var Oo="./Checkout-crbegxyv.stx";var No="./DefaultPaymentMethod-ss3x61tr.stx";var Ro="./PaymentMethods-z4hhr0kv.stx";var zo="./SubscriptionCheckout-rdcv32n1.stx";var Ho="./Popover-jjt7p7sn.stx";var Vo="./PopoverButton-ks3cttd9.stx";var qo="./PopoverPanel-ddgj4gz3.stx";var Ko="./Portal-m73vz879.stx";var Uo="./Progress-2qzb77kc.stx";var Jo="./Radio-8153x74w.stx";var Xo="./RadioGroup-smqcqgds.stx";var Zo="./RadioGroupDescription-z34r9avr.stx";var ta="./RadioGroupLabel-ka0hfm7b.stx";var oa="./RadioGroupOption-twcw1b2a.stx";var na="./SegmentedControl-9b1vh960.stx";var ia="./Select-1cnqbcmg.stx";var ca="./Sidebar-8dygywjv.stx";var pa="./SidebarFooter-s7skj92y.stx";var ha="./SidebarHeader-x7jdhmyr.stx";var ma="./SidebarItem-r4f2pref.stx";var ba="./SidebarPinned-48kyk193.stx";var va="./SidebarSection-5sqza2j6.stx";var ya="./SidebarSpace-bwv98azf.stx";var Ca="./SidebarSpaces-mdtrynr2.stx";var Sa="./SidebarSpaceSwitcher-1mycft2g.stx";var ne={blue:"#0088ff",red:"#ff383c",pink:"#ff2d55",orange:"#ff8d28",yellow:"#ffcc00",green:"#34c759",teal:"#00c3d0",cyan:"#00c0e8",indigo:"#6155f5",purple:"#cb30e0",brown:"#ac7f5e",gray:"#8e8e93"},_={pane:["bg-[#f2f2f4]/90 dark:bg-[#1c1c1e]/88","backdrop-blur-[50px] backdrop-saturate-[180%]","text-black dark:text-white","select-none"].join(" "),selection:"accent",layers:{shimmerRim:!0},scrollArea:"flex-1 overflow-y-auto overflow-x-hidden px-[10px] pb-[10px]",sectionHeader:["group/section flex w-full items-center","pl-[8px] pr-[6px] pt-[16px] pb-[5px]","text-[11px] font-semibold leading-[13px]","text-[#3c3c43]/60 dark:text-[#ebebf5]/60"].join(" "),sectionChevron:["i-f7-chevron-down h-[11px] w-[11px] ml-auto","text-[#3c3c43]/45 dark:text-[#ebebf5]/45","opacity-0 group-hover/section:opacity-100 transition-opacity duration-150","transition-transform duration-200"].join(" "),sectionGroup:"flex flex-col",item:{base:["flex w-full items-center","h-[32px] rounded-[8px] pl-[4px] pr-[8px]","text-[13px] leading-[16px] font-normal","text-black dark:text-white","transition-colors duration-150 ease-out","cursor-default"].join(" "),hover:"hover:bg-black/4 dark:hover:bg-white/6",active:"",pressed:"active:bg-black/10 dark:active:bg-white/18",disabled:"opacity-40 pointer-events-none",disclosure:"flex h-[16px] w-[18px] shrink-0 items-center justify-center",chevron:["i-f7-chevron-right h-[11px] w-[11px]","text-[#3c3c43]/55 dark:text-[#ebebf5]/55","transition-transform duration-200 ease-out"].join(" "),iconSlot:"flex h-[20px] w-[22px] shrink-0 items-center justify-center mr-[7px]",icon:"h-[17px] w-[17px]",image:"h-[20px] w-[20px] rounded-[4px] object-cover shadow-sm",label:"flex-1 truncate text-left",count:["ml-[8px] shrink-0 tabular-nums","text-[13px] leading-[16px]","text-[#3c3c43]/60 dark:text-[#ebebf5]/60"].join(" "),indentPerLevel:16}},Ta={selection:"classes",pane:"bg-[#f4f4f3] dark:bg-neutral-950 text-zinc-950 dark:text-white select-none",layers:{},scrollArea:"flex-1 overflow-y-auto overflow-x-hidden px-5 py-5",sectionHeader:"group/section flex w-full items-center gap-2.5 px-4 pb-2 pt-5 text-[13px] font-semibold uppercase tracking-[0.12em] text-zinc-400 dark:text-zinc-500",sectionChevron:"i-f7-chevron-down h-3 w-3 ml-auto opacity-0 group-hover/section:opacity-100 transition-opacity duration-150 transition-transform duration-200",sectionGroup:"flex flex-col space-y-1",item:{base:"flex w-full items-center gap-3 rounded-[16px] px-3.5 py-2 text-[14px] leading-tight transition-colors duration-150",hover:"hover:bg-[#ececea] hover:text-zinc-950 dark:hover:bg-white/10",active:"bg-[#e7e7e5] text-zinc-950 dark:bg-white/12 dark:text-white",pressed:"active:bg-[#e2e2e0] dark:active:bg-white/15",disabled:"opacity-50 pointer-events-none",disclosure:"flex h-4 w-4 shrink-0 items-center justify-center",chevron:"i-f7-chevron-right h-3 w-3 opacity-50 transition-transform duration-200",iconSlot:"flex h-5 w-5 shrink-0 items-center justify-center",icon:"h-[18px] w-[18px] text-zinc-500 dark:text-zinc-500",image:"h-5 w-5 rounded object-cover",label:"flex-1 truncate text-left text-zinc-700 dark:text-zinc-300",count:"ml-auto grid h-5 min-w-5 place-items-center rounded-full bg-white/70 px-1.5 text-[11px] font-medium text-zinc-500 shadow-sm dark:bg-white/10 dark:text-zinc-400",indentPerLevel:12}},Ea={selection:"classes",pane:"bg-[#f3f3f1]/48 dark:bg-neutral-950/32 backdrop-blur-3xl backdrop-saturate-150 text-zinc-950 dark:text-white select-none",layers:{tint:"bg-[linear-gradient(112deg,rgba(255,255,255,0.20)_0%,rgba(255,255,255,0.04)_45%,rgba(226,226,222,0.16)_100%)] dark:bg-[linear-gradient(112deg,rgba(255,255,255,0.08)_0%,rgba(255,255,255,0.02)_46%,rgba(255,255,255,0.06)_100%)]"},scrollArea:"flex-1 overflow-y-auto overflow-x-hidden px-5 py-2",sectionHeader:"group/section flex w-full items-center gap-2.5 px-3 pb-1.5 pt-3 rounded-[14px] text-[12px] font-semibold uppercase tracking-[0.10em] text-zinc-500/80 dark:text-zinc-400/80",sectionChevron:"i-f7-chevron-down h-3 w-3 ml-auto opacity-0 group-hover/section:opacity-100 transition-opacity duration-150 transition-transform duration-200",sectionGroup:"flex flex-col space-y-1",item:{base:"flex w-full items-center gap-3 rounded-[14px] px-3 py-1.5 text-[13.5px] leading-tight transition-colors duration-150",hover:"hover:bg-white/38 hover:text-zinc-950 dark:hover:bg-white/10",active:"bg-[#e8e8e6]/90 text-zinc-950 dark:bg-white/12 dark:text-white",pressed:"active:bg-white/50 dark:active:bg-white/15",disabled:"opacity-50 pointer-events-none",disclosure:"flex h-4 w-4 shrink-0 items-center justify-center",chevron:"i-f7-chevron-right h-3 w-3 opacity-50 transition-transform duration-200",iconSlot:"flex h-5 w-5 shrink-0 items-center justify-center",icon:"h-[18px] w-[18px] text-zinc-600 dark:text-zinc-400",image:"h-5 w-5 rounded object-cover",label:"flex-1 truncate text-left text-zinc-700 dark:text-zinc-300",count:"ml-auto grid h-5 min-w-5 place-items-center rounded-full bg-white/72 px-1.5 text-[11px] font-medium text-zinc-500 shadow-sm dark:bg-white/10 dark:text-zinc-400",indentPerLevel:12}},Ia={selection:"classes",pane:["bg-[#f7f5f1]/92 dark:bg-[#1a1a1c]/92","backdrop-blur-[40px] backdrop-saturate-[160%]","text-[#2c2a28] dark:text-[#ededf0]","select-none"].join(" "),layers:{tint:["bg-[linear-gradient(180deg,var(--stx-sidebar-tint,rgba(255,251,242,0.55))_0%,rgba(255,255,255,0)_38%)]","dark:bg-[linear-gradient(180deg,var(--stx-sidebar-tint,rgba(255,255,255,0.05))_0%,rgba(255,255,255,0)_42%)]"].join(" ")},scrollArea:"flex-1 overflow-y-auto overflow-x-hidden px-[16px] pb-[8px]",sectionHeader:["group/section flex w-full items-center","px-[8px] pt-[14px] pb-[4px]","text-[11px] font-medium leading-[13px]","opacity-55"].join(" "),sectionChevron:["i-f7-chevron-down h-[10px] w-[10px] ml-auto","opacity-0 group-hover/section:opacity-100 transition-opacity duration-150","transition-transform duration-200"].join(" "),sectionGroup:"flex flex-col space-y-[2px]",item:{base:["flex w-full items-center","h-[30px] rounded-[8px] pl-[6px] pr-[8px]","text-[13px] leading-[16px] font-normal","text-current","transition-[background-color,box-shadow,color] duration-150 ease-out","cursor-default"].join(" "),hover:"hover:bg-white/55 dark:hover:bg-white/8",active:["bg-white dark:bg-white/14","font-medium","shadow-[0_1px_2px_rgba(0,0,0,0.08)] dark:shadow-[0_1px_2px_rgba(0,0,0,0.35)]","ring-1 ring-black/5 dark:ring-white/8"].join(" "),pressed:"active:bg-white/80 dark:active:bg-white/18",disabled:"opacity-40 pointer-events-none",disclosure:"flex h-[16px] w-[16px] shrink-0 items-center justify-center",chevron:["i-f7-chevron-right h-[10px] w-[10px] opacity-45","transition-transform duration-200 ease-out"].join(" "),iconSlot:"flex h-[18px] w-[18px] shrink-0 items-center justify-center mr-[8px]",icon:"h-[16px] w-[16px]",image:"h-[18px] w-[18px] rounded-[5px] object-cover shadow-sm",label:"flex-1 truncate text-left",count:["ml-[8px] shrink-0 tabular-nums","text-[12px] leading-[16px] opacity-45"].join(" "),indentPerLevel:14}},Aa={..._,pane:"bg-stone-100 dark:bg-neutral-900 text-black dark:text-white select-none",layers:{}},Pa={..._,pane:"bg-transparent text-black dark:text-white select-none",layers:{}},Oa={..._,pane:"bg-white/50 dark:bg-black/40 backdrop-blur-3xl backdrop-saturate-200 text-black dark:text-white select-none",layers:{}},Ne={macos:_,tahoe:_,"macos-tahoe":_,"macos-latest":_,arc:Ia,workspace:Ta,desktop:Ea,solid:Aa,transparent:Pa,vibrancy:Oa};function vp(e){return Ne[e||"macos"]||Ne.macos}function wp(e){if(!e)return;return ne[e]||e}var La=ne.gray;function q(e,t,s){return`color-mix(in oklab, ${e} ${t}%, ${s})`}function De(e){return{light:{from:q(e,35,"#ffffff"),to:q(e,12.5,"#ffffff"),ink:q(e,22,"#17171b"),accent:q(e,88,"#2a2a30")},dark:{from:q(e,27,"#101014"),to:q(e,10,"#08080b"),ink:q(e,12,"#f4f4f7"),accent:q(e,74,"#ffffff")}}}function Cp(e,t){return`linear-gradient(180deg, ${e} 0%, ${t} 100%)`}function Na(e){if(!e)return De(La);if(typeof e!=="string")return e;return De(ne[e]||e)}function Da(e){return[`--stx-space-light-from: ${e.light.from}`,`--stx-space-light-to: ${e.light.to}`,`--stx-space-light-ink: ${e.light.ink}`,`--stx-space-light-accent: ${e.light.accent}`,`--stx-space-dark-from: ${e.dark.from}`,`--stx-space-dark-to: ${e.dark.to}`,`--stx-space-dark-ink: ${e.dark.ink}`,`--stx-space-dark-accent: ${e.dark.accent}`].join("; ")}function Re(e,t,s,o){if(!e||!e.label)return null;return{id:e.id||`${t}-${s}`,label:e.label,icon:e.icon||o}}function Ra(e){let t=Na(e.tint);return{id:e.id,label:e.label||"",icon:e.icon||"",pinned:e.pinned||[],sections:e.sections||[],action:Re(e.action,e.id,"action","i-f7-plus"),clear:Re(e.clear,e.id,"clear","i-f7-arrow-down"),tint:t,style:Da(t),deferred:e.deferred===!0,showTitle:e.showTitle??!0}}function $p(e){return(e||[]).map(Ra)}function Sp(e,t){if(!t)return 0;let s=e.findIndex((o)=>o.id===t);return s===-1?0:s}function Tp(e){return e.map((t)=>t.tint)}var za="./Skeleton-m4p66zcs.stx";var Ha="./Spinner-vhnc3y03.stx";var Va="./Stepper-68gxcmej.stx";var qa="./StepperStep-zf4pq1s0.stx";class re{storage;namespace;watchers=new Map;encryptionKey="stx-storage-key";constructor(e="local",t=""){if(this.storage=e==="local"?globalThis.localStorage:globalThis.sessionStorage,this.namespace=t,typeof window<"u")window.addEventListener("storage",this.handleStorageEvent.bind(this))}handleStorageEvent(e){if(!e.key)return;let t=this.namespace&&e.key.startsWith(`${this.namespace}:`)?e.key.slice(this.namespace.length+1):e.key,s=this.watchers.get(t);if(s){let o=e.oldValue?JSON.parse(e.oldValue).value:null,a=e.newValue?JSON.parse(e.newValue).value:null;s.forEach((n)=>n(a,o,t))}}encrypt(e){let t="";for(let s=0;s<e.length;s++)t+=String.fromCharCode(e.charCodeAt(s)^this.encryptionKey.charCodeAt(s%this.encryptionKey.length));return btoa(t)}decrypt(e){try{let t=atob(e),s="";for(let o=0;o<t.length;o++)s+=String.fromCharCode(t.charCodeAt(o)^this.encryptionKey.charCodeAt(o%this.encryptionKey.length));return s}catch{return e}}compress(e){if(e.length<100)return e;let t={},s=256,o=[],a="";for(let n=0;n<e.length;n++){let r=e.charAt(n),i=a+r;if(t[i]!==void 0)a=i;else o.push(a.length>1?t[a]:a.charCodeAt(0)),t[i]=s++,a=r}if(a!=="")o.push(a.length>1?t[a]:a.charCodeAt(0));return JSON.stringify(o)}decompress(e){try{let t=JSON.parse(e);if(!Array.isArray(t))return e;let s={},o=256,a=String.fromCharCode(t[0]),n=a;for(let r=1;r<t.length;r++){let i=t[r],c;if(s[i]!==void 0)c=s[i];else if(i===o)c=a+a.charAt(0);else return e;n+=c,s[o++]=a+c.charAt(0),a=c}return n}catch{return e}}getKey(e){return this.namespace?`${this.namespace}:${e}`:e}set(e,t,s){let o=this.getKey(e),a=this.get(e),n={value:t,timestamp:Date.now(),expire:s?.expire,encrypted:s?.encrypt||!1,compressed:s?.compress||!1};try{let r=JSON.stringify(n);if(s?.compress)r=this.compress(r);if(s?.encrypt)r=this.encrypt(r);this.storage.setItem(o,r),this.notifyWatchers(e,t,a)}catch(r){console.error("Storage set error:",r)}}get(e){let t=this.getKey(e);try{let s=this.storage.getItem(t);if(!s)return null;if(s.match(/^[A-Z0-9+/]+=*$/i))try{s=this.decrypt(s)}catch{}if(s.startsWith("["))try{s=this.decompress(s)}catch{}let o=JSON.parse(s);if(o.expire&&Date.now()-o.timestamp>o.expire)return this.remove(e),null;return o.value}catch(s){return console.error("Storage get error:",s),null}}watch(e,t){if(!this.watchers.has(e))this.watchers.set(e,new Set);return this.watchers.get(e).add(t),()=>{let s=this.watchers.get(e);if(s){if(s.delete(t),s.size===0)this.watchers.delete(e)}}}notifyWatchers(e,t,s){let o=this.watchers.get(e);if(o)o.forEach((a)=>a(t,s,e))}remove(e){let t=this.getKey(e),s=this.get(e);this.storage.removeItem(t),this.notifyWatchers(e,null,s)}clear(){if(this.namespace)this.keys().forEach((t)=>this.remove(t));else this.storage.clear()}has(e){return this.get(e)!==null}keys(){let e=Object.keys(this.storage);if(this.namespace){let t=`${this.namespace}:`;return e.filter((s)=>s.startsWith(t)).map((s)=>s.slice(t.length))}return e}size(){return this.keys().length}getQuota(){if("storage"in navigator&&"estimate"in navigator.storage)return null;try{let e=0;for(let s=0;s<this.storage.length;s++){let o=this.storage.key(s);if(o){let a=this.storage.getItem(o)||"";e+=o.length+a.length}}let t=5242880;return{usage:e*2,quota:t,percentage:e*2/t*100}}catch{return null}}setMany(e,t){Object.entries(e).forEach(([s,o])=>{this.set(s,o,t)})}getMany(e){let t={};return e.forEach((s)=>{t[s]=this.get(s)}),t}removeMany(e){e.forEach((t)=>this.remove(t))}}var Qp={local:new re("local"),session:new re("session")};function Zp(e="local",t){return new re(e,t)}var Ka="./Switch-zfjdd6dw.stx";var Ua="./Table-0a4y46vd.stx";var Ja="./TableBody-y49bqb1p.stx";var Xa="./TableCell-jhvsxw8b.stx";var Za="./TableHead-e9xvjx2j.stx";var tn="./TableHeader-krzcx4sv.stx";var on="./TableRow-dt8e11aj.stx";var nn="./Tab-j9f4t166.stx";var ln="./TabList-r1pc87xs.stx";var dn="./TabPanel-5htevsq6.stx";var un="./Tabs-psm5wj7c.stx";var fn="./Teleport-vqs75x36.stx";var gn="./Textarea-9xmhjqp8.stx";var xn="./Tooltip-pev702hb.stx";var wn="./Transition-7m0mk45s.stx";var kn="./Video-vxkeg384.stx";var $n="./VirtualList-fa7v5a3h.stx";var Tn="./VirtualTable-kp7b3wyv.stx";var En=0;function Me(e="a11y"){return`${e}-${++En}-${Date.now()}`}function Uu(e,t,s={}){let{visible:o=!1,id:a=Me("label")}=s,n=document.createElement(o?"label":"span");if(n.id=a,n.textContent=e,!o)Object.assign(n.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"});if(t)if(t.setAttribute("aria-labelledby",a),t.parentElement)t.parentElement.insertBefore(n,t);else document.body.appendChild(n);return a}function Gu(e,t){let s=Me("desc"),o=document.createElement("span");if(o.id=s,o.textContent=e,Object.assign(o.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}),t)if(t.setAttribute("aria-describedby",s),t.parentElement)t.parentElement.insertBefore(o,t);else document.body.appendChild(o);return s}function Ju(e,t="polite"){let s=document.createElement("div");s.setAttribute("role","status"),s.setAttribute("aria-live",t),s.setAttribute("aria-atomic","true"),Object.assign(s.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}),document.body.appendChild(s),setTimeout(()=>{s.textContent=e},100),setTimeout(()=>{s.parentNode?.removeChild(s)},1000)}function ve(e){let t=["a[href]","area[href]",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","button:not([disabled])","iframe","object","embed","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(",");return Array.from(e.querySelectorAll(t)).filter((s)=>s.offsetParent!==null)}function Yu(e,t={}){let{initialFocus:s,returnFocus:o,escapeDeactivates:a=!0,clickOutsideDeactivates:n=!0,allowOutsideClick:r=!1,onActivate:i,onDeactivate:c}=t,p=!1,u=!1,d=null,g=(v)=>{if(u)return;if(a&&v.key==="Escape"){v.preventDefault(),C();return}if(v.key==="Tab"){let E=ve(e);if(E.length===0){v.preventDefault();return}let A=E[0],S=E[E.length-1];if(v.shiftKey){if(document.activeElement===A)v.preventDefault(),S.focus()}else if(document.activeElement===S)v.preventDefault(),A.focus()}},m=(v)=>{if(u)return;if(!e.contains(v.target)){if(typeof r==="function"){if(!r(v)&&n)C()}else if(!r&&n)C()}};function k(){if(p)return;p=!0,d=document.activeElement;let v=s||ve(e)[0];if(v&&typeof v.focus==="function")v.focus();document.addEventListener("keydown",g),document.addEventListener("click",m),i?.()}function C(){if(!p)return;p=!1;let v=o||d;if(v&&typeof v.focus==="function")v.focus();document.removeEventListener("keydown",g),document.removeEventListener("click",m),c?.()}function y(){u=!0}function b(){u=!1}return{activate:k,deactivate:C,pause:y,unpause:b}}function Xu(e,t={}){let{selector:s='[role="option"], [role="menuitem"], [role="tab"], button',initialIndex:o=0,orientation:a="both",loop:n=!0,onFocusChange:r}=t,i=o,c=()=>Array.from(e.querySelectorAll(s)),p=(d)=>{let g=c();if(d<0||d>=g.length)return;g.forEach((m,k)=>{if(k===d){if(m.setAttribute("tabindex","0"),typeof m.focus==="function")m.focus()}else m.setAttribute("tabindex","-1")}),i=d,r?.(d,g[d])},u=(d)=>{let m=c().length-1,k=!1,C=i;switch(d.key){case"ArrowRight":if(a==="horizontal"||a==="both"){if(C=i+1,C>m)C=n?0:m;k=!0}break;case"ArrowLeft":if(a==="horizontal"||a==="both"){if(C=i-1,C<0)C=n?m:0;k=!0}break;case"ArrowDown":if(a==="vertical"||a==="both"){if(C=i+1,C>m)C=n?0:m;k=!0}break;case"ArrowUp":if(a==="vertical"||a==="both"){if(C=i-1,C<0)C=n?m:0;k=!0}break;case"Home":C=0,k=!0;break;case"End":C=m,k=!0;break}if(k)d.preventDefault(),p(C)};return p(o),e.addEventListener("keydown",u),()=>{e.removeEventListener("keydown",u)}}var Qu={Enter:"Enter",Space:" ",Escape:"Escape",ArrowUp:"ArrowUp",ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight",Tab:"Tab",Home:"Home",End:"End",PageUp:"PageUp",PageDown:"PageDown"};function Zu(e){return document.activeElement===e}function eh(e,t){let s=t||document.activeElement,o=ve(document.body),a=o.indexOf(s);if(a===-1)return;let n=e==="next"?a+1:a-1,r=o[n];if(r)r.focus()}function th(e){if(e.getAttribute("aria-hidden")==="true")return!1;let t=window.getComputedStyle(e);if(t.display==="none"||t.visibility==="hidden")return!1;return!0}var sh={setExpanded(e,t){e.setAttribute("aria-expanded",String(t))},setSelected(e,t){e.setAttribute("aria-selected",String(t))},setChecked(e,t){e.setAttribute("aria-checked",String(t))},setDisabled(e,t){if(e.setAttribute("aria-disabled",String(t)),t)e.setAttribute("tabindex","-1");else e.removeAttribute("tabindex")},setHidden(e,t){if(t)e.setAttribute("aria-hidden","true");else e.removeAttribute("aria-hidden")},setPressed(e,t){e.setAttribute("aria-pressed",String(t))},setInvalid(e,t){e.setAttribute("aria-invalid",String(t))},setRequired(e,t){e.setAttribute("aria-required",String(t))},setLive(e,t){e.setAttribute("aria-live",t)},setBusy(e,t){e.setAttribute("aria-busy",String(t))}};function oh(e){let t=document.createElement("span");return t.textContent=e,t.className="sr-only",Object.assign(t.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}),t}function ah(){if(typeof window.matchMedia==="function")return window.matchMedia("(prefers-reduced-motion: reduce)").matches;return!1}function nh(){if(typeof window.matchMedia==="function")return window.matchMedia("(prefers-contrast: high)").matches;return!1}function rh(){if(typeof window.matchMedia==="function"){if(window.matchMedia("(prefers-color-scheme: dark)").matches)return"dark";if(window.matchMedia("(prefers-color-scheme: light)").matches)return"light"}return null}function ih(e,t="Skip to main content"){let s=document.createElement("a");return s.href=`#${e}`,s.textContent=t,s.className="skip-link",Object.assign(s.style,{position:"absolute",top:"-40px",left:"0",background:"#000",color:"#fff",padding:"8px",textDecoration:"none",zIndex:"100"}),s.addEventListener("focus",()=>{s.style.top="0"}),s.addEventListener("blur",()=>{s.style.top="-40px"}),s}function lh(e){let t=[],s=(o)=>{let a=e.getAttribute(o);if(a){let n=a.split(" ");for(let r of n)if(!document.getElementById(r))t.push(`${o} references non-existent ID: ${r}`)}};return s("aria-labelledby"),s("aria-describedby"),s("aria-controls"),s("aria-owns"),s("aria-activedescendant"),t}var In=(e,t,s,o)=>s*e/o+t,An=(e,t,s,o)=>(e/=o,s*e*e+t),Pn=(e,t,s,o)=>(e/=o,-s*e*(e-2)+t),On=(e,t,s,o)=>{if(e/=o/2,e<1)return s/2*e*e+t;return e--,-s/2*(e*(e-2)-1)+t},Ln=(e,t,s,o)=>(e/=o,s*e*e*e+t),Nn=(e,t,s,o)=>(e/=o,e--,s*(e*e*e+1)+t),Dn=(e,t,s,o)=>{if(e/=o/2,e<1)return s/2*e*e*e+t;return e-=2,s/2*(e*e*e+2)+t},Rn=(e,t,s,o)=>(e/=o,s*e*e*e*e+t),Mn=(e,t,s,o)=>(e/=o,e--,-s*(e*e*e*e-1)+t),zn=(e,t,s,o)=>{if(e/=o/2,e<1)return s/2*e*e*e*e+t;return e-=2,-s/2*(e*e*e*e-2)+t},jn=(e,t,s,o)=>(e/=o,s*e*e*e*e*e+t),Hn=(e,t,s,o)=>(e/=o,e--,s*(e*e*e*e*e+1)+t),Fn=(e,t,s,o)=>{if(e/=o/2,e<1)return s/2*e*e*e*e*e+t;return e-=2,s/2*(e*e*e*e*e+2)+t},Vn=(e,t,s,o)=>-s*Math.cos(e/o*(Math.PI/2))+s+t,Bn=(e,t,s,o)=>s*Math.sin(e/o*(Math.PI/2))+t,qn=(e,t,s,o)=>-s/2*(Math.cos(Math.PI*e/o)-1)+t,Wn=(e,t,s,o)=>e===0?t:s*2**(10*(e/o-1))+t,Kn=(e,t,s,o)=>e===o?t+s:s*(-(2**(-10*e/o))+1)+t,_n=(e,t,s,o)=>{if(e===0)return t;if(e===o)return t+s;if(e/=o/2,e<1)return s/2*2**(10*(e-1))+t;return e--,s/2*(-(2**(-10*e))+2)+t},Un=(e,t,s,o)=>(e/=o,-s*(Math.sqrt(1-e*e)-1)+t),Gn=(e,t,s,o)=>(e/=o,e--,s*Math.sqrt(1-e*e)+t),Jn=(e,t,s,o)=>{if(e/=o/2,e<1)return-s/2*(Math.sqrt(1-e*e)-1)+t;return e-=2,s/2*(Math.sqrt(1-e*e)+1)+t},Yn=(e,t,s,o)=>{let a=1.70158,n=0,r=s;if(e===0)return t;if(e/=o,e===1)return t+s;if(!n)n=o*0.3;if(r<Math.abs(s))r=s,a=n/4;else a=n/(2*Math.PI)*Math.asin(s/r);return e-=1,-(r*2**(10*e)*Math.sin((e*o-a)*(2*Math.PI)/n))+t},Xn=(e,t,s,o)=>{let a=1.70158,n=0,r=s;if(e===0)return t;if(e/=o,e===1)return t+s;if(!n)n=o*0.3;if(r<Math.abs(s))r=s,a=n/4;else a=n/(2*Math.PI)*Math.asin(s/r);return r*2**(-10*e)*Math.sin((e*o-a)*(2*Math.PI)/n)+s+t},Qn=(e,t,s,o)=>{let a=1.70158,n=0,r=s;if(e===0)return t;if(e/=o/2,e===2)return t+s;if(!n)n=o*0.44999999999999996;if(r<Math.abs(s))r=s,a=n/4;else a=n/(2*Math.PI)*Math.asin(s/r);if(e<1)return e-=1,-0.5*(r*2**(10*e)*Math.sin((e*o-a)*(2*Math.PI)/n))+t;return e-=1,r*2**(-10*e)*Math.sin((e*o-a)*(2*Math.PI)/n)*0.5+s+t},Zn=(e,t,s,o)=>(e/=o,s*e*e*(2.70158*e-1.70158)+t),er=(e,t,s,o)=>(e/=o,e--,s*(e*e*(2.70158*e+1.70158)+1)+t),tr=(e,t,s,o)=>{let a=1.70158;if(e/=o/2,e<1)return a*=1.525,s/2*(e*e*((a+1)*e-a))+t;return e-=2,a*=1.525,s/2*(e*e*((a+1)*e+a)+2)+t},we=(e,t,s,o)=>{if(e/=o,e<0.36363636363636365)return s*(7.5625*e*e)+t;else if(e<0.7272727272727273)return e-=0.5454545454545454,s*(7.5625*e*e+0.75)+t;else if(e<0.9090909090909091)return e-=0.8181818181818182,s*(7.5625*e*e+0.9375)+t;else return e-=0.9545454545454546,s*(7.5625*e*e+0.984375)+t},ze=(e,t,s,o)=>s-we(o-e,0,s,o)+t,sr=(e,t,s,o)=>{if(e<o/2)return ze(e*2,0,s,o)*0.5+t;return we(e*2-o,0,s,o)*0.5+s*0.5+t},dh={linear:In,easeInQuad:An,easeOutQuad:Pn,easeInOutQuad:On,easeInCubic:Ln,easeOutCubic:Nn,easeInOutCubic:Dn,easeInQuart:Rn,easeOutQuart:Mn,easeInOutQuart:zn,easeInQuint:jn,easeOutQuint:Hn,easeInOutQuint:Fn,easeInSine:Vn,easeOutSine:Bn,easeInOutSine:qn,easeInExpo:Wn,easeOutExpo:Kn,easeInOutExpo:_n,easeInCirc:Un,easeOutCirc:Gn,easeInOutCirc:Jn,easeInElastic:Yn,easeOutElastic:Xn,easeInOutElastic:Qn,easeInBack:Zn,easeOutBack:er,easeInOutBack:tr,easeInBounce:ze,easeOutBounce:we,easeInOutBounce:sr};function or(e,t={}){let{duration:s="1s",timing:o="ease",delay:a="0s",iteration:n="1",direction:r="normal",fill:i="both",playState:c="running"}=t;return`${e} ${s} ${o} ${a} ${n} ${r} ${i} ${c}`}function je(e,t,s={}){e.style.animation=or(t,s)}function uh(e){e.style.animation=""}function ar(e){return new Promise((t)=>{let s=()=>{e.removeEventListener("animationend",s),t()};e.addEventListener("animationend",s)})}function hh(e,t,s={}){let{stagger:o=100,...a}=s;e.forEach((n,r)=>{let i=`${r*o}ms`;je(n,t,{...a,delay:i})})}async function fh(e,t){for(let s of t)je(e,s.name,s.options),await ar(e)}var mh={fadeIn:"animate-fade-in",fadeOut:"animate-fade-out",slideInUp:"animate-slide-in-up",slideInDown:"animate-slide-in-down",slideInLeft:"animate-slide-in-left",slideInRight:"animate-slide-in-right",zoomIn:"animate-zoom-in",zoomOut:"animate-zoom-out",bounce:"animate-bounce",spin:"animate-spin",ping:"animate-ping",pulse:"animate-pulse"};function gh(e,t,s=1000){return new Promise((o)=>{e.classList.add(t),setTimeout(()=>{e.classList.remove(t),o()},s)})}function bh(e,t){let s=`
12
12
  @keyframes ${e} {
13
13
  ${Object.entries(t).map(([a,n])=>{let r=Object.entries(n).map(([i,c])=>`${i}: ${c};`).join(" ");return`${a} { ${r} }`}).join(`
14
14
  `)}
@@ -110,55 +110,50 @@ export declare const spinnerClasses: unknown;
110
110
  * @defaultValue
111
111
  * ```ts
112
112
  * {
113
- * primary: { box: 'bg-[#007aff] dark:bg-[#0a84ff]', text: 'text-white' },
114
- * secondary: {
115
- * box: 'bg-[#767680]/12 dark:bg-[#767680]/24',
116
- * text: 'text-[#007aff] dark:text-[#0a84ff]'
117
- * },
118
- * outline: {
119
- * box: 'border border-[#007aff] dark:border-[#0a84ff]',
120
- * text: 'text-[#007aff] dark:text-[#0a84ff]'
121
- * },
122
- * ghost: { box: '', text: 'text-[#007aff] dark:text-[#0a84ff]' },
123
- * danger: { box: 'bg-[#ff3b30] dark:bg-[#ff453a]', text: 'text-white' }
113
+ * primary: { box: 'bg-accent-solid', text: 'text-accent-ink' },
114
+ * secondary: { box: 'bg-[#767680]/12 dark:bg-[#767680]/24', text: 'text-accent' },
115
+ * outline: { box: 'border border-accent', text: 'text-accent' },
116
+ * ghost: { box: '', text: 'text-accent' },
117
+ * danger: { box: 'bg-danger-solid', text: 'text-danger-ink' }
124
118
  * }
125
119
  * ```
126
120
  */
127
121
  declare const nativeVariants: {
128
122
  primary: {
129
- /** @defaultValue 'bg-[#007aff] dark:bg-[#0a84ff]' */
123
+ /** @defaultValue 'bg-accent-solid' */
130
124
  box: string;
131
- /** @defaultValue 'text-white' */
125
+ /** @defaultValue 'text-accent-ink' */
132
126
  text: string
133
127
  };
134
128
  secondary: {
135
129
  /** @defaultValue 'bg-[#767680]/12 dark:bg-[#767680]/24' */
136
130
  box: string;
137
- /** @defaultValue 'text-[#007aff] dark:text-[#0a84ff]' */
131
+ /** @defaultValue 'text-accent' */
138
132
  text: string
139
133
  };
140
134
  outline: {
141
- /** @defaultValue 'border border-[#007aff] dark:border-[#0a84ff]' */
135
+ /** @defaultValue 'border border-accent' */
142
136
  box: string;
143
- /** @defaultValue 'text-[#007aff] dark:text-[#0a84ff]' */
137
+ /** @defaultValue 'text-accent' */
144
138
  text: string
145
139
  };
146
140
  ghost: {
147
141
  /** @defaultValue '' */
148
142
  box: string;
149
- /** @defaultValue 'text-[#007aff] dark:text-[#0a84ff]' */
143
+ /** @defaultValue 'text-accent' */
150
144
  text: string
151
145
  };
152
146
  danger: {
153
- /** @defaultValue 'bg-[#ff3b30] dark:bg-[#ff453a]' */
147
+ /** @defaultValue 'bg-danger-solid' */
154
148
  box: string;
155
- /** @defaultValue 'text-white' */
149
+ /** @defaultValue 'text-danger-ink' */
156
150
  text: string
157
151
  }
158
152
  };
159
153
  declare const nativeVariant: unknown;
160
154
  export declare const nativeButtonClasses: unknown;
161
155
  export declare const nativeTextClasses: string;
162
- export declare const nativeTint: boolean;
156
+ export declare const legacyNativeTint: boolean;
157
+ export declare const nativeTintClass: unknown;
163
158
  declare type __DtsxStxComponentType = DefineComponent<{ variant?: string, size?: string, disabled?: unknown, loading?: unknown, type?: string, fullWidth?: unknown, label?: string, ariaLabel?: unknown, "aria-label"?: string, leftIcon?: string, rightIcon?: string, className?: string }>;
164
159
  export default __dtsx_component__;
@@ -34,5 +34,8 @@ export declare const dialogInstanceId: unknown;
34
34
  * `animationType="fade"` keeps an alert-like centred card from sliding.
35
35
  */
36
36
  export declare const nativeAnimation: unknown;
37
- declare type __DtsxStxComponentType = DefineComponent<{ open?: unknown, className?: string, title?: string, closeOnEscape?: unknown, closeOnBackdrop?: unknown, animationType?: string }> & { readonly __stxEmits?: ["close"] }
37
+ export declare const nativePresentation: unknown;
38
+ export declare const nativeDetents: unknown;
39
+ export declare const nativeSelectedDetent: unknown;
40
+ declare type __DtsxStxComponentType = DefineComponent<{ open?: unknown, className?: string, title?: string, closeOnEscape?: unknown, closeOnBackdrop?: unknown, animationType?: string, presentationStyle?: unknown, sheetDetents?: unknown[], selectedDetent?: string }> & { readonly __stxEmits?: ["close"] }
38
41
  export default __dtsx_component__;
@@ -1,4 +1,6 @@
1
1
  export declare interface DialogProps {
2
+ sheetDetents?: Array<'medium' | 'large'>
3
+ selectedDetent?: 'medium' | 'large'
2
4
  open?: boolean
3
5
  onClose?: (value: boolean) => void
4
6
  className?: string
@@ -2,6 +2,8 @@ import type { DefineComponent } from '@stacksjs/stx';
2
2
  declare function close(): void;
3
3
  declare const __dtsx_component__: __DtsxStxComponentType;
4
4
  export declare const open: ReturnType<typeof $bool>;
5
+ export declare const nativeDetents: unknown;
6
+ export declare const nativeSelectedDetent: unknown;
5
7
  export declare const position: unknown;
6
8
  export declare const title: unknown;
7
9
  /** Set `closeOnEscape="false"` for a drawer that must be answered, not dismissed. */
@@ -87,5 +89,5 @@ export declare const slideAnimation: unknown;
87
89
  * spent its ten frames failing. Same idiom as Dropdown and Popover.
88
90
  */
89
91
  export declare const drawerInstanceId: unknown;
90
- declare type __DtsxStxComponentType = DefineComponent<{ open?: unknown, position?: string, title?: string, closeOnEscape?: unknown, closeOnBackdrop?: unknown, className?: string, panelClass?: string, panelStyle?: string, backdropClass?: string, size?: string }> & { readonly __stxEmits?: ["close"] }
92
+ declare type __DtsxStxComponentType = DefineComponent<{ open?: unknown, sheetDetents?: unknown[], selectedDetent?: string, position?: string, title?: string, closeOnEscape?: unknown, closeOnBackdrop?: unknown, className?: string, panelClass?: string, panelStyle?: string, backdropClass?: string, size?: string }> & { readonly __stxEmits?: ["close"] }
91
93
  export default __dtsx_component__;
@@ -1,4 +1,6 @@
1
1
  export declare interface DrawerProps {
2
+ sheetDetents?: Array<'medium' | 'large'>
3
+ selectedDetent?: 'medium' | 'large'
2
4
  open?: boolean
3
5
  onClose?: () => void
4
6
  position?: 'right' | 'left' | 'top' | 'bottom'
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/components",
3
3
  "type": "module",
4
- "version": "0.2.668",
4
+ "version": "0.2.670",
5
5
  "description": "A modern component library built with STX, featuring headwind utility classes and TypeScript syntax highlighting.",
6
6
  "author": "Chris Breuer <chris@stacksjs.org>",
7
7
  "license": "MIT",
@@ -77,8 +77,8 @@
77
77
  "dependencies": {
78
78
  "@iconify-json/f7": "^1.2.2",
79
79
  "@stacksjs/ts-css": "^0.3.11",
80
- "@stacksjs/stx": "0.2.668",
81
- "bun-plugin-stx": "0.2.668",
80
+ "@stacksjs/stx": "0.2.670",
81
+ "bun-plugin-stx": "0.2.670",
82
82
  "ts-syntax-highlighter": "^0.2.17",
83
83
  "ts-video-player": "^0.1.9"
84
84
  },
@@ -118,11 +118,11 @@ export const spinnerClasses = `animate-spin ${iconClasses}`.trim()
118
118
  * pressed, and `disabled:` dims it while it is off.
119
119
  */
120
120
  const nativeVariants = {
121
- primary: { box: 'bg-[#007aff] dark:bg-[#0a84ff]', text: 'text-white' },
122
- secondary: { box: 'bg-[#767680]/12 dark:bg-[#767680]/24', text: 'text-[#007aff] dark:text-[#0a84ff]' },
123
- outline: { box: 'border border-[#007aff] dark:border-[#0a84ff]', text: 'text-[#007aff] dark:text-[#0a84ff]' },
124
- ghost: { box: '', text: 'text-[#007aff] dark:text-[#0a84ff]' },
125
- danger: { box: 'bg-[#ff3b30] dark:bg-[#ff453a]', text: 'text-white' },
121
+ primary: { box: 'bg-accent-solid', text: 'text-accent-ink' },
122
+ secondary: { box: 'bg-[#767680]/12 dark:bg-[#767680]/24', text: 'text-accent' },
123
+ outline: { box: 'border border-accent', text: 'text-accent' },
124
+ ghost: { box: '', text: 'text-accent' },
125
+ danger: { box: 'bg-danger-solid', text: 'text-danger-ink' },
126
126
  }
127
127
  const nativeSizes = {
128
128
  xs: { box: 'h-7 px-2.5 gap-1 rounded-[7px]', text: 'text-[13px]' },
@@ -135,11 +135,14 @@ const nativeVariant = nativeVariants[variant] || nativeVariants.primary
135
135
  const nativeSize = nativeSizes[size] || nativeSizes.md
136
136
  export const nativeButtonClasses = `flex-row items-center justify-center ${nativeSize.box} ${nativeVariant.box} disabled:opacity-50 ${fullWidth ? 'w-full' : ''} ${className}`.replace(/\s+/g, ' ').trim()
137
137
  export const nativeTextClasses = `font-semibold ${nativeSize.text} ${nativeVariant.text}`
138
- export const nativeTint = nativeVariant.text === 'text-white' ? '#ffffff' : '#007aff'
138
+ export const legacyNativeTint = variant === 'primary' || variant === 'danger' ? '#ffffff' : '#007aff'
139
+ export const nativeTintClass = nativeVariant.text
139
140
  </script>
140
141
 
141
142
  <script client>
142
143
  const emit = defineEmits()
144
+ const platformControls = typeof craft !== 'undefined' && craft.capabilities.nativePlatformControls === true
145
+ const legacyNativeTint = {{ $native ? legacyNativeTint : '' }}
143
146
 
144
147
  /*
145
148
  * `disabled` and `loading` are read as live props, not as a server snapshot.
@@ -197,7 +200,7 @@ function onClick(event) {
197
200
  @if(ariaLabel)aria-label="{{ ariaLabel }}"@endif
198
201
  @click="onClick($event)"
199
202
  >
200
- <div data-native="ActivityIndicator" :show="isLoading()" color="{{ nativeTint }}" role="status"></div>
203
+ <div data-native="ActivityIndicator" :show="isLoading()" class="{{ nativeTintClass }}" :color="platformControls ? null : legacyNativeTint" role="status"></div>
201
204
  @if(leftIcon)
202
205
  <span :show="!isLoading()" class="{{ iconClasses }} {{ nativeTextClasses }}">{!! leftIcon !!}</span>
203
206
  @endif
@@ -30,7 +30,7 @@ const disabledClasses = disabled ? 'opacity-50 cursor-not-allowed' : 'cursor-poi
30
30
  * On a native host ($native) the box is the platform's own control, tinted
31
31
  * system blue (red while invalid), beside a label at the 17pt body size.
32
32
  */
33
- const nativeTint = error ? 'text-[#ff3b30] dark:text-[#ff453a]' : 'text-[#007aff] dark:text-[#0a84ff]'
33
+ const nativeTint = error ? 'text-danger' : 'text-accent'
34
34
  export const checkboxClasses = $native
35
35
  ? `h-[22px] w-[22px] ${nativeTint} disabled:opacity-50`
36
36
  : switchAppearance
@@ -38,6 +38,9 @@ export const dialogInstanceId = $uid
38
38
  * `animationType="fade"` keeps an alert-like centred card from sliding.
39
39
  */
40
40
  export const nativeAnimation = $props.animationType || 'slide'
41
+ export const nativePresentation = $props.presentationStyle || (nativeAnimation === 'fade' ? 'overFullScreen' : 'pageSheet')
42
+ export const nativeDetents = $props.sheetDetents || ['medium', 'large']
43
+ export const nativeSelectedDetent = $props.selectedDetent || ''
41
44
  </script>
42
45
 
43
46
  <script client>
@@ -191,7 +194,7 @@ defineExpose({
191
194
 
192
195
  <div
193
196
  data-native="Modal"
194
- @if($native)animationType="{{ nativeAnimation }}"@endif
197
+ @if($native)animationType="{{ nativeAnimation }}" presentationStyle="{{ nativePresentation }}" :sheetDetents="{{ nativeDetents }}" @if(nativeSelectedDetent)selectedDetent="{{ nativeSelectedDetent }}"@endif@endif
195
198
  x-ref="rootRef"
196
199
  :show="isOpen()"
197
200
  :data-state="isOpen() ? 'open' : 'closed'"
@@ -46,11 +46,15 @@ export const nativePanelClasses = nativeSheet
46
46
  export const nativeGrabberClasses = `self-center h-[5px] w-9 shrink-0 rounded-full bg-[#c6c6c8] dark:bg-[#48484a] ${flush ? 'mt-1.5 mb-1.5' : 'mb-4'}`
47
47
  </script>
48
48
 
49
+ <script client>
50
+ const systemSheet = typeof craft !== 'undefined' && craft.platform === 'ios' && craft.capabilities.nativePlatformControls === true
51
+ </script>
52
+
49
53
  @if($native)
50
54
  <div class="{{ nativeWrapperClasses }}">
51
55
  <div class="{{ nativePanelClasses }}" data-stx-dialog-panel tabindex="-1">
52
56
  @if(nativeSheet)
53
- <div aria-hidden="true" class="{{ nativeGrabberClasses }}"></div>
57
+ <div :show="!systemSheet" aria-hidden="true" class="{{ nativeGrabberClasses }}"></div>
54
58
  @endif
55
59
  <slot />
56
60
  </div>
@@ -5,6 +5,9 @@ export { default as DialogPanel } from './DialogPanel.stx'
5
5
  export { default as DialogTitle } from './DialogTitle.stx'
6
6
 
7
7
  export interface DialogProps {
8
+ /** Native sheet resting sizes; the website retains its existing layout. */
9
+ sheetDetents?: Array<'medium' | 'large'>
10
+ selectedDetent?: 'medium' | 'large'
8
11
  open?: boolean
9
12
  onClose?: (value: boolean) => void
10
13
  className?: string
@@ -1,5 +1,7 @@
1
1
  <script server>
2
2
  export const open = $bool($props.open)
3
+ export const nativeDetents = $props.sheetDetents || ['medium', 'large']
4
+ export const nativeSelectedDetent = $props.selectedDetent || ''
3
5
  export const position = $props.position || 'right'
4
6
  export const title = $props.title || ''
5
7
  /** Set `closeOnEscape="false"` for a drawer that must be answered, not dismissed. */
@@ -122,6 +124,7 @@ export const drawerInstanceId = $uid
122
124
  // A nested overlay's close belongs to that overlay, never this drawer.
123
125
  const emit = defineEmits(['close'])
124
126
  const drawerInstanceId = {{ drawerInstanceId }}
127
+ const systemSheet = typeof craft !== 'undefined' && craft.platform === 'ios' && craft.capabilities.nativePlatformControls === true
125
128
  // useReactiveProp lets the parent drive `open` via signals
126
129
  // (`:open="drawerOpen()"`) instead of the prop being captured once.
127
130
  // See stacksjs/stx#1704.
@@ -186,7 +189,7 @@ defineExpose({
186
189
  {{-- On a native host a drawer is the phone's sheet: it slides up from the
187
190
  bottom edge whichever edge it is given, under a title bar with the close
188
191
  button where iOS puts it. --}}
189
- <div x-ref="rootRef" data-native="Modal" animationType="slide" data-stx-drawer="{{ drawerInstanceId }}" :show="isOpen()">
192
+ <div x-ref="rootRef" data-native="Modal" animationType="slide" presentationStyle="pageSheet" :sheetDetents="{{ nativeDetents }}" @if(nativeSelectedDetent)selectedDetent="{{ nativeSelectedDetent }}"@endif data-stx-drawer="{{ drawerInstanceId }}" :show="isOpen()">
190
193
  <div class="absolute inset-0 bg-[#000000]/40" aria-hidden="true" @click="onBackdropClick()"></div>
191
194
  <div class="absolute inset-0 justify-end pt-12">
192
195
  <div
@@ -198,7 +201,7 @@ defineExpose({
198
201
  aria-label="{{ title }}"
199
202
  tabindex="-1"
200
203
  >
201
- <div aria-hidden="true" class="self-center mt-1.5 h-[5px] w-9 rounded-full bg-[#c6c6c8] dark:bg-[#48484a]"></div>
204
+ <div :show="!systemSheet" aria-hidden="true" class="self-center mt-1.5 h-[5px] w-9 rounded-full bg-[#c6c6c8] dark:bg-[#48484a]"></div>
202
205
  <div class="flex-row items-center min-h-[44px] px-4">
203
206
  <h2 class="flex-1 text-[17px] font-semibold text-[#000000] dark:text-[#ffffff]">{{ title }}</h2>
204
207
  <button type="button" @click="close()" aria-label="Close panel" class="h-[30px] w-[30px] items-center justify-center rounded-full bg-[#767680]/12 dark:bg-[#767680]/24">
@@ -1,6 +1,9 @@
1
1
  export { default as Drawer } from './Drawer.stx'
2
2
 
3
3
  export interface DrawerProps {
4
+ /** Native sheet resting sizes; the website retains its existing layout. */
5
+ sheetDetents?: Array<'medium' | 'large'>
6
+ selectedDetent?: 'medium' | 'large'
4
7
  open?: boolean
5
8
  onClose?: () => void
6
9
  position?: 'right' | 'left' | 'top' | 'bottom'
@@ -163,6 +163,7 @@ export const nativeHelperClasses = `mt-1.5 px-4 text-[13px] ${error ? 'text-[#ff
163
163
  const emit = defineEmits(['input', 'clear', 'focus', 'blur', 'submit', 'submit-editing'])
164
164
  // Validity is live, for the same reason `disabled` is: a form posted with
165
165
  // fetch learns it after the submit, and nothing re-renders (#2047).
166
+ const nativeClear = typeof craft !== 'undefined' && craft.capabilities.nativePlatformControls === true
166
167
  const isError = useReactiveProp('error', {{ error }})
167
168
  // Keep the physical control and its affordances live on both web and native.
168
169
  const isDisabled = useReactiveProp('disabled', {{ disabled }})
@@ -225,6 +226,7 @@ function onNativeEndEditing(event) {
225
226
  }
226
227
 
227
228
  function onInput(event) {
229
+ if (event.clear === true || event.nativeEvent?.clear === true) { onClear(); return }
228
230
  if (isDisabled() || isReadonly()) {
229
231
  event.target.value = inputValue()
230
232
  return
@@ -294,15 +296,12 @@ defineExpose({ value: inputValue, clear: onClear })
294
296
  aria-invalid="{{ error ? 'true' : 'false' }}"
295
297
  :aria-invalid="isError() ? 'true' : 'false'"
296
298
  :class="{ 'border border-[#ff3b30] dark:border-[#ff453a]': isError(), 'opacity-50': isDisabled() }"
297
- @if(clearable)style="padding-right: 40px"@endif
299
+ @if(clearable):clearButtonMode="nativeClear ? 'while-editing' : 'never'" :style="nativeClear ? null : { paddingRight: 40 }"@endif
298
300
  />
301
+
299
302
  @if(clearable)
300
- <button
301
- type="button"
302
- :show="hasValue() && !isDisabled() && !isReadonly()"
303
- @click="onClear()"
304
- class="absolute top-0 right-0 h-12 w-10 items-center justify-center"
305
- aria-label="Clear input"
303
+ <button :if="!nativeClear" type="button" :show="hasValue() && !isDisabled() && !isReadonly()"
304
+ @click="onClear()" class="absolute top-0 right-0 h-12 w-10 items-center justify-center" aria-label="Clear input"
306
305
  ><i class="i-lucide-circle-x h-[17px] w-[17px] text-[#c4c4c7] dark:text-[#5b5b5f]"></i></button>
307
306
  @endif
308
307
  </div>
@@ -49,6 +49,7 @@ export const routerOwned = routerOwns(href)
49
49
  href="{{ href }}"
50
50
  class="{{ chipClasses }}"
51
51
  data-stx-filter-chip
52
+ @if($native)role="button" aria-pressed="{{ active ? 'true' : 'false' }}"@endif
52
53
  @if (routerOwned)
53
54
  data-stx-link
54
55
  @endif
@@ -28,7 +28,7 @@ export const rowClasses = `
28
28
  `.replace(/\s+/g, ' ').trim()
29
29
  </script>
30
30
 
31
- <div class="{{ rowClasses }}" data-stx-filter-chips role="group" aria-label="Filters">
31
+ <div @if($native)data-native="ScrollView" horizontal showsHorizontalScrollIndicator="false"@endif class="{{ rowClasses }}" data-stx-filter-chips role="group" aria-label="Filters">
32
32
  @foreach (chips as chip)
33
33
  <FilterChip
34
34
  :label="chip.label"
@@ -53,12 +53,13 @@ export const backRouterOwned = routerOwns(backHref)
53
53
 
54
54
  <header class="px-4 {{ className }}" style="{{ headerStyle }}" data-stx-nav-bar>
55
55
  @if (hasControls)
56
- <div class="flex h-11 items-center gap-2">
56
+ <div class="flex h-11 items-center gap-2" data-native-chrome="bar">
57
57
  @if (backHref)
58
58
  <a
59
59
  href="{{ backHref }}"
60
60
  class="flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-surface-raised text-fg"
61
61
  aria-label="Back"
62
+ data-native-chrome
62
63
  @if (backRouterOwned)
63
64
  data-stx-link
64
65
  @endif
@@ -40,7 +40,7 @@ export const barClasses = `
40
40
  application and a screen reader landing on an unlabelled group of five links
41
41
  has no way to know that.
42
42
  --}}
43
- <nav class="{{ barClasses }}" style="{{ barStyle }}" aria-label="Primary" data-stx-tab-bar>
43
+ <nav class="{{ barClasses }}" style="{{ barStyle }}" aria-label="Primary" data-stx-tab-bar data-native-chrome="tabs">
44
44
  @foreach (items as item)
45
45
  <TabBarItem
46
46
  :label="item.label"
@@ -81,6 +81,7 @@ const isDisabled = useReactiveProp('disabled', {{ disabled }})
81
81
  const segmentBase = {{ segmentBase }}
82
82
  const textSize = {{ sizing.text }}
83
83
  const groupID = {{ testID }}
84
+ const nativeSegments = typeof craft !== 'undefined' && craft.capabilities.nativePlatformControls === true
84
85
  const segmentOn = {{ segmentOn }}
85
86
  const segmentOff = {{ segmentOff }}
86
87
  const labelOn = {{ labelOn }}
@@ -119,6 +120,12 @@ function choose(segment) {
119
120
  emit('change', segment.value)
120
121
  }
121
122
 
123
+ function onNativeChange(event) {
124
+ const value = event.value ?? event.nativeEvent?.value
125
+ const segment = segments().find(choice => choice.value === value)
126
+ if (segment) choose(segment)
127
+ }
128
+
122
129
  function segmentClasses(segment) {
123
130
  const state = isOn(segment) ? segmentOn : 'bg-transparent'
124
131
  return `${segmentBase} ${state} ${isOff(segment) ? segmentOff : 'cursor-pointer'}`
@@ -135,7 +142,17 @@ function segmentID(segment) {
135
142
  defineExpose({ selected })
136
143
  </script>
137
144
 
145
+ @if($native)
146
+ <div :if="nativeSegments" data-native="SegmentedControl" data-stx-native-host-root data-stx-segmented-control
147
+ @if(testID)testID="{{ testID }}"@endif
148
+ :items="segments()" :value="selected()" :disabled="isDisabled()"
149
+ :aria-label="groupLabel() || null"
150
+ class="min-h-[32px] text-fg {{ stretch ? '' : 'self-start' }} {{ className }}"
151
+ @change="onNativeChange($event)"
152
+ ></div>
153
+ @endif
138
154
  <div
155
+ @if($native):if="!nativeSegments"@endif
139
156
  role="group"
140
157
  @if(label)aria-label="{{ label }}"@endif
141
158
  :aria-label="groupLabel() || null"
@@ -111,7 +111,7 @@ defineExpose({ isChecked, toggle })
111
111
  @if(disabled)disabled@endif
112
112
  :disabled="isDisabled()"
113
113
  :aria-disabled="isDisabled() ? 'true' : 'false'"
114
- class="disabled:opacity-50"
114
+ class="text-accent disabled:opacity-50"
115
115
  @change="onNativeChange($event)"
116
116
  ></div>
117
117
  </label>