tera-system-ui 0.2.4 → 0.2.6

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.
@@ -1114,10 +1114,19 @@ function handleBackdropClick(e) {
1114
1114
  * check reads the state as it was when the key was pressed.
1115
1115
  */
1116
1116
  function handleKeydown(e) {
1117
- if (e.key === 'Escape' && isVisible && overlayStack.isTopmost(id)) {
1117
+ if (e.key !== 'Escape' || !isVisible || !overlayStack.isTopmost(id))
1118
+ return;
1119
+ // dragToClose=false locks the sheet against user dismissal: if a drag can't close it,
1120
+ // Escape shouldn't either. Still swallow the key (preventDefault + stopPropagation) so a
1121
+ // locked topmost sheet ABSORBS Escape instead of letting it fall through and close an
1122
+ // overlay beneath it — the sheet on top owns the keypress.
1123
+ if (!dragToClose) {
1118
1124
  e.preventDefault();
1119
- doClose();
1125
+ e.stopPropagation();
1126
+ return;
1120
1127
  }
1128
+ e.preventDefault();
1129
+ doClose();
1121
1130
  }
1122
1131
  // Svelte action for touch events
1123
1132
  function touchEvents(node) {
@@ -1141,6 +1150,7 @@ function touchEvents(node) {
1141
1150
  <!-- svelte-ignore a11y_no_static_element_interactions -->
1142
1151
  <div
1143
1152
  bind:this={backdropRef}
1153
+ data-bottom-sheet-backdrop
1144
1154
  class={r.backdrop()}
1145
1155
  style:z-index={zIndex}
1146
1156
  onpointerdown={handleBackdropPointerDown}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tera-system-ui",
3
- "version": "0.2.4",
3
+ "version": "0.2.6",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "npm run customPrepublish && npm run generate-index && npm run generate-registry && npm run generate-llms && vite build && npm run package && npm run copy-docs && npm run copy-llms && npm run postpublish",