@sekiui/elements 0.0.88 → 0.1.1

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 (211) hide show
  1. package/dist/cdn/p-C9-yH6MD.js +33 -0
  2. package/dist/cdn/p-CQQRfw1L.js +18 -0
  3. package/dist/cdn/seki-carousel-dots.js +7 -3
  4. package/dist/cdn/seki-carousel-next.js +8 -6
  5. package/dist/cdn/seki-carousel-previous.js +8 -6
  6. package/dist/cdn/seki-carousel.js +15 -1
  7. package/dist/cdn/seki-date-picker.js +71 -36
  8. package/dist/cdn/seki-drawer.js +76 -32
  9. package/dist/cdn/seki-hover-card-content.js +2 -2
  10. package/dist/cdn/seki-hover-card-trigger.js +3 -3
  11. package/dist/cdn/seki-hover-card.js +59 -4
  12. package/dist/cdn/seki-resizable-handle.js +11 -2
  13. package/dist/cdn/seki-resizable-panel-group.js +9 -3
  14. package/dist/cdn/seki-resizable-panel.js +42 -20
  15. package/dist/cdn/seki-select-content.js +21 -13
  16. package/dist/cdn/seki-select-group.js +3 -4
  17. package/dist/cdn/seki-select-option.js +33 -15
  18. package/dist/cdn/seki-select-trigger.js +6 -4
  19. package/dist/cdn/seki-select.js +2 -2
  20. package/dist/cdn/seki-sheet.js +71 -30
  21. package/dist/cdn/seki-sidebar-footer.js +3 -1
  22. package/dist/cdn/seki-sidebar-header.js +3 -1
  23. package/dist/cdn/seki-sidebar-menu-button.js +3 -1
  24. package/dist/cdn/seki-sidebar-rail.js +3 -1
  25. package/dist/cdn/seki-sidebar-trigger.js +6 -1
  26. package/dist/cdn/seki-sidebar.js +5 -2
  27. package/dist/cdn/seki-tooltip.js +47 -2
  28. package/dist/cjs/loader.cjs.js +1 -1
  29. package/dist/cjs/option-id-wIa73qWK.js +20 -0
  30. package/dist/cjs/seki-carousel-dots.cjs.entry.js +7 -3
  31. package/dist/cjs/seki-carousel-next.cjs.entry.js +8 -6
  32. package/dist/cjs/seki-carousel-previous.cjs.entry.js +8 -6
  33. package/dist/cjs/seki-carousel.cjs.entry.js +15 -1
  34. package/dist/cjs/seki-date-picker.cjs.entry.js +64 -32
  35. package/dist/cjs/seki-drawer.cjs.entry.js +67 -27
  36. package/dist/cjs/seki-hover-card-content.cjs.entry.js +2 -2
  37. package/dist/cjs/seki-hover-card-trigger.cjs.entry.js +3 -3
  38. package/dist/cjs/seki-hover-card.cjs.entry.js +53 -3
  39. package/dist/cjs/seki-resizable-handle.cjs.entry.js +11 -2
  40. package/dist/cjs/seki-resizable-panel-group.cjs.entry.js +9 -3
  41. package/dist/cjs/seki-resizable-panel.cjs.entry.js +42 -20
  42. package/dist/cjs/seki-select-content.cjs.entry.js +20 -11
  43. package/dist/cjs/seki-select-group.cjs.entry.js +2 -2
  44. package/dist/cjs/seki-select-option.cjs.entry.js +32 -13
  45. package/dist/cjs/seki-select-trigger.cjs.entry.js +5 -2
  46. package/dist/cjs/seki-select.cjs.entry.js +2 -2
  47. package/dist/cjs/seki-sheet.cjs.entry.js +62 -25
  48. package/dist/cjs/seki-sidebar-footer.cjs.entry.js +3 -1
  49. package/dist/cjs/seki-sidebar-header.cjs.entry.js +3 -1
  50. package/dist/cjs/seki-sidebar-menu-button.cjs.entry.js +3 -1
  51. package/dist/cjs/seki-sidebar-rail.cjs.entry.js +3 -1
  52. package/dist/cjs/seki-sidebar-trigger.cjs.entry.js +6 -1
  53. package/dist/cjs/seki-sidebar.cjs.entry.js +5 -2
  54. package/dist/cjs/seki-tooltip.cjs.entry.js +43 -2
  55. package/dist/cjs/sekiui.cjs.js +1 -1
  56. package/dist/cjs/when-defined-B2Lkz6uR.js +36 -0
  57. package/dist/collection/components/carousel/seki-carousel-dots.js +7 -3
  58. package/dist/collection/components/carousel/seki-carousel-next.js +8 -6
  59. package/dist/collection/components/carousel/seki-carousel-previous.js +8 -6
  60. package/dist/collection/components/carousel/seki-carousel.js +15 -1
  61. package/dist/collection/components/date-picker/seki-date-picker.js +124 -36
  62. package/dist/collection/components/drawer/seki-drawer.js +132 -31
  63. package/dist/collection/components/hover-card/seki-hover-card-content.js +2 -2
  64. package/dist/collection/components/hover-card/seki-hover-card-trigger.js +3 -3
  65. package/dist/collection/components/hover-card/seki-hover-card.js +142 -6
  66. package/dist/collection/components/resizable/seki-resizable-handle.js +11 -2
  67. package/dist/collection/components/resizable/seki-resizable-panel-group.js +23 -3
  68. package/dist/collection/components/resizable/seki-resizable-panel.js +42 -20
  69. package/dist/collection/components/select/seki-select.js +6 -12
  70. package/dist/collection/components/select-content/seki-select-content.css +8 -0
  71. package/dist/collection/components/select-content/seki-select-content.js +20 -11
  72. package/dist/collection/components/select-group/seki-select-group.js +2 -2
  73. package/dist/collection/components/select-option/seki-select-option.js +32 -13
  74. package/dist/collection/components/select-trigger/seki-select-trigger.js +5 -2
  75. package/dist/collection/components/sheet/seki-sheet.js +127 -29
  76. package/dist/collection/components/sidebar/seki-sidebar-footer.js +3 -1
  77. package/dist/collection/components/sidebar/seki-sidebar-header.js +3 -1
  78. package/dist/collection/components/sidebar/seki-sidebar-menu-button.js +3 -1
  79. package/dist/collection/components/sidebar/seki-sidebar-rail.js +3 -1
  80. package/dist/collection/components/sidebar/seki-sidebar-trigger.js +6 -1
  81. package/dist/collection/components/sidebar/seki-sidebar.js +5 -2
  82. package/dist/collection/components/tooltip/seki-tooltip.js +92 -2
  83. package/dist/collection/utils/select/index.js +1 -0
  84. package/dist/collection/utils/select/option-id.js +16 -0
  85. package/dist/collection/utils/when-defined.js +31 -0
  86. package/dist/components/p-C9-yH6MD.js +33 -0
  87. package/dist/components/p-CQQRfw1L.js +18 -0
  88. package/dist/components/seki-carousel-dots.js +7 -3
  89. package/dist/components/seki-carousel-next.js +8 -6
  90. package/dist/components/seki-carousel-previous.js +8 -6
  91. package/dist/components/seki-carousel.js +15 -1
  92. package/dist/components/seki-date-picker.js +71 -36
  93. package/dist/components/seki-drawer.js +76 -32
  94. package/dist/components/seki-hover-card-content.js +2 -2
  95. package/dist/components/seki-hover-card-trigger.js +3 -3
  96. package/dist/components/seki-hover-card.js +59 -4
  97. package/dist/components/seki-resizable-handle.js +11 -2
  98. package/dist/components/seki-resizable-panel-group.js +9 -3
  99. package/dist/components/seki-resizable-panel.js +42 -20
  100. package/dist/components/seki-select-content.js +21 -13
  101. package/dist/components/seki-select-group.js +3 -4
  102. package/dist/components/seki-select-option.js +33 -15
  103. package/dist/components/seki-select-trigger.js +6 -4
  104. package/dist/components/seki-select.js +2 -2
  105. package/dist/components/seki-sheet.js +71 -30
  106. package/dist/components/seki-sidebar-footer.js +3 -1
  107. package/dist/components/seki-sidebar-header.js +3 -1
  108. package/dist/components/seki-sidebar-menu-button.js +3 -1
  109. package/dist/components/seki-sidebar-rail.js +3 -1
  110. package/dist/components/seki-sidebar-trigger.js +6 -1
  111. package/dist/components/seki-sidebar.js +5 -2
  112. package/dist/components/seki-tooltip.js +47 -2
  113. package/dist/esm/loader.js +1 -1
  114. package/dist/esm/option-id-CQQRfw1L.js +18 -0
  115. package/dist/esm/seki-carousel-dots.entry.js +7 -3
  116. package/dist/esm/seki-carousel-next.entry.js +8 -6
  117. package/dist/esm/seki-carousel-previous.entry.js +8 -6
  118. package/dist/esm/seki-carousel.entry.js +15 -1
  119. package/dist/esm/seki-date-picker.entry.js +64 -32
  120. package/dist/esm/seki-drawer.entry.js +67 -27
  121. package/dist/esm/seki-hover-card-content.entry.js +2 -2
  122. package/dist/esm/seki-hover-card-trigger.entry.js +3 -3
  123. package/dist/esm/seki-hover-card.entry.js +53 -3
  124. package/dist/esm/seki-resizable-handle.entry.js +11 -2
  125. package/dist/esm/seki-resizable-panel-group.entry.js +9 -3
  126. package/dist/esm/seki-resizable-panel.entry.js +42 -20
  127. package/dist/esm/seki-select-content.entry.js +20 -11
  128. package/dist/esm/seki-select-group.entry.js +2 -2
  129. package/dist/esm/seki-select-option.entry.js +32 -13
  130. package/dist/esm/seki-select-trigger.entry.js +5 -2
  131. package/dist/esm/seki-select.entry.js +2 -2
  132. package/dist/esm/seki-sheet.entry.js +62 -25
  133. package/dist/esm/seki-sidebar-footer.entry.js +3 -1
  134. package/dist/esm/seki-sidebar-header.entry.js +3 -1
  135. package/dist/esm/seki-sidebar-menu-button.entry.js +3 -1
  136. package/dist/esm/seki-sidebar-rail.entry.js +3 -1
  137. package/dist/esm/seki-sidebar-trigger.entry.js +6 -1
  138. package/dist/esm/seki-sidebar.entry.js +5 -2
  139. package/dist/esm/seki-tooltip.entry.js +43 -2
  140. package/dist/esm/sekiui.js +1 -1
  141. package/dist/esm/when-defined-C9-yH6MD.js +33 -0
  142. package/dist/sekiui/p-02f1728e.entry.js +1 -0
  143. package/dist/sekiui/p-05b33a61.entry.js +1 -0
  144. package/dist/sekiui/p-12e36a4f.entry.js +1 -0
  145. package/dist/sekiui/p-1cd6b3e6.entry.js +1 -0
  146. package/dist/sekiui/p-1e24698b.entry.js +1 -0
  147. package/dist/sekiui/p-26bb17cb.entry.js +1 -0
  148. package/dist/sekiui/p-26d433ff.entry.js +1 -0
  149. package/dist/sekiui/p-26f96e2d.entry.js +1 -0
  150. package/dist/sekiui/p-29b22c0f.entry.js +1 -0
  151. package/dist/sekiui/p-30fafcc6.entry.js +1 -0
  152. package/dist/sekiui/p-3de5878b.entry.js +1 -0
  153. package/dist/sekiui/p-649dbdf0.entry.js +1 -0
  154. package/dist/sekiui/p-71656184.entry.js +1 -0
  155. package/dist/sekiui/p-7926c04a.entry.js +1 -0
  156. package/dist/sekiui/p-9f4149b9.entry.js +1 -0
  157. package/dist/sekiui/p-C9-yH6MD.js +1 -0
  158. package/dist/sekiui/p-CQQRfw1L.js +1 -0
  159. package/dist/sekiui/p-ae87ca35.entry.js +1 -0
  160. package/dist/sekiui/p-b82c2267.entry.js +1 -0
  161. package/dist/sekiui/p-bf151423.entry.js +1 -0
  162. package/dist/sekiui/{p-219c8350.entry.js → p-c0f21b6a.entry.js} +1 -1
  163. package/dist/sekiui/p-c3ef507f.entry.js +1 -0
  164. package/dist/sekiui/p-d10a186d.entry.js +1 -0
  165. package/dist/sekiui/p-d1c72c91.entry.js +1 -0
  166. package/dist/sekiui/p-d1d3ae40.entry.js +1 -0
  167. package/dist/sekiui/p-fba3fa73.entry.js +1 -0
  168. package/dist/sekiui/p-fe3e661d.entry.js +1 -0
  169. package/dist/sekiui/sekiui.esm.js +1 -1
  170. package/dist/types/components/carousel/seki-carousel.d.ts +1 -0
  171. package/dist/types/components/date-picker/seki-date-picker.d.ts +21 -5
  172. package/dist/types/components/drawer/seki-drawer.d.ts +22 -6
  173. package/dist/types/components/hover-card/seki-hover-card.d.ts +24 -4
  174. package/dist/types/components/resizable/seki-resizable-handle.d.ts +1 -0
  175. package/dist/types/components/resizable/seki-resizable-panel-group.d.ts +6 -0
  176. package/dist/types/components/resizable/seki-resizable-panel.d.ts +9 -0
  177. package/dist/types/components/select/seki-select.d.ts +3 -3
  178. package/dist/types/components/select-content/seki-select-content.d.ts +8 -5
  179. package/dist/types/components/select-option/seki-select-option.d.ts +6 -4
  180. package/dist/types/components/sheet/seki-sheet.d.ts +22 -6
  181. package/dist/types/components/tooltip/seki-tooltip.d.ts +13 -0
  182. package/dist/types/components.d.ts +145 -17
  183. package/dist/types/utils/select/index.d.ts +1 -0
  184. package/dist/types/utils/select/option-id.d.ts +14 -0
  185. package/dist/types/utils/select/types.d.ts +0 -7
  186. package/dist/types/utils/when-defined.d.ts +19 -0
  187. package/package.json +3 -1
  188. package/dist/sekiui/p-01f26bec.entry.js +0 -1
  189. package/dist/sekiui/p-117b6f5a.entry.js +0 -1
  190. package/dist/sekiui/p-1250cad1.entry.js +0 -1
  191. package/dist/sekiui/p-1866201e.entry.js +0 -1
  192. package/dist/sekiui/p-2e18933c.entry.js +0 -1
  193. package/dist/sekiui/p-2e2e7d0b.entry.js +0 -1
  194. package/dist/sekiui/p-346cc18f.entry.js +0 -1
  195. package/dist/sekiui/p-6311a4d8.entry.js +0 -1
  196. package/dist/sekiui/p-69843ed8.entry.js +0 -1
  197. package/dist/sekiui/p-779764c0.entry.js +0 -1
  198. package/dist/sekiui/p-786c153b.entry.js +0 -1
  199. package/dist/sekiui/p-87bcbb66.entry.js +0 -1
  200. package/dist/sekiui/p-88dd3e1f.entry.js +0 -1
  201. package/dist/sekiui/p-944c70a1.entry.js +0 -1
  202. package/dist/sekiui/p-9820cd16.entry.js +0 -1
  203. package/dist/sekiui/p-9abfa3a5.entry.js +0 -1
  204. package/dist/sekiui/p-ac7bd611.entry.js +0 -1
  205. package/dist/sekiui/p-b45e11d8.entry.js +0 -1
  206. package/dist/sekiui/p-c62c4ad7.entry.js +0 -1
  207. package/dist/sekiui/p-caa51bdf.entry.js +0 -1
  208. package/dist/sekiui/p-ce986fde.entry.js +0 -1
  209. package/dist/sekiui/p-e45e6992.entry.js +0 -1
  210. package/dist/sekiui/p-ede4bb0c.entry.js +0 -1
  211. package/dist/sekiui/p-f4abd9a2.entry.js +0 -1
@@ -54,6 +54,17 @@ export class SekiHoverCard {
54
54
  * @default false
55
55
  */
56
56
  this.disabled = false;
57
+ /**
58
+ * Controlled open state. Reflects to the `open` attribute, so
59
+ * `<seki-hover-card open>` renders open with no script involved.
60
+ * @default false
61
+ */
62
+ this.open = false;
63
+ /**
64
+ * Initial open state for uncontrolled usage
65
+ * @default false
66
+ */
67
+ this.defaultOpen = false;
57
68
  /**
58
69
  * Internal open state
59
70
  */
@@ -114,6 +125,20 @@ export class SekiHoverCard {
114
125
  }
115
126
  };
116
127
  }
128
+ componentWillLoad() {
129
+ // `disabled` wins over a requested initial open state.
130
+ this._isOpen = (this.open || this.defaultOpen) && !this.disabled;
131
+ this.open = this._isOpen;
132
+ }
133
+ openChanged(newValue) {
134
+ // An outside assignment (`card.open = true`) has to win after first render;
135
+ // `open` is only read once in componentWillLoad otherwise.
136
+ if (newValue === this._isOpen)
137
+ return;
138
+ this.cancelOpen();
139
+ this.cancelClose();
140
+ this.setOpen(newValue);
141
+ }
117
142
  disabledChanged(newValue) {
118
143
  if (newValue && this._isOpen) {
119
144
  this.setOpen(false);
@@ -123,11 +148,19 @@ export class SekiHoverCard {
123
148
  * Set the open state and emit change event
124
149
  */
125
150
  setOpen(open) {
126
- if (this._isOpen === open)
151
+ if (open && this.disabled) {
152
+ // Keep the reflected prop honest when an open request is refused.
153
+ this.open = false;
127
154
  return;
155
+ }
156
+ if (this._isOpen === open) {
157
+ this.open = open;
158
+ return;
159
+ }
128
160
  this._isOpen = open;
161
+ this.open = open;
129
162
  this.updateContext();
130
- this.sekiOpenChange.emit({ open });
163
+ this.sekiOpenChange.emit(open);
131
164
  if (open) {
132
165
  this.setupScrollListener();
133
166
  }
@@ -135,6 +168,22 @@ export class SekiHoverCard {
135
168
  this.removeScrollListener();
136
169
  }
137
170
  }
171
+ /**
172
+ * Open the hover card immediately, skipping `openDelay`
173
+ */
174
+ async openHoverCard() {
175
+ this.cancelOpen();
176
+ this.cancelClose();
177
+ this.setOpen(true);
178
+ }
179
+ /**
180
+ * Close the hover card immediately, skipping `closeDelay`
181
+ */
182
+ async closeHoverCard() {
183
+ this.cancelOpen();
184
+ this.cancelClose();
185
+ this.setOpen(false);
186
+ }
138
187
  /**
139
188
  * Close the hover card immediately and focus the trigger
140
189
  */
@@ -233,7 +282,7 @@ export class SekiHoverCard {
233
282
  this.removeScrollListener();
234
283
  }
235
284
  render() {
236
- return (h(Host, { key: '228ce747491865bdc97fdef9b6da751f5833c588', "data-state": this._isOpen ? 'open' : 'closed' }, h("div", { key: '777dade24e948b0e8ed21ebfa9595beb33fdf7a9', class: "hover-card" }, h("slot", { key: 'e5db3d1887de0241a95a7529aa3c5cb8d9c79ed2' }))));
285
+ return (h(Host, { key: '23c73aa997f26586621e616361279663c7d6f52a', "data-state": this._isOpen ? 'open' : 'closed' }, h("div", { key: 'beb5e0101353f32b2e706edd6b2caa8c9526c35f', class: "hover-card" }, h("slot", { key: 'e61dfec60b816e957d30e9d6504fb2f905cfb9e3' }))));
237
286
  }
238
287
  static get is() { return "seki-hover-card"; }
239
288
  static get encapsulation() { return "shadow"; }
@@ -375,6 +424,52 @@ export class SekiHoverCard {
375
424
  "reflect": false,
376
425
  "attribute": "disabled",
377
426
  "defaultValue": "false"
427
+ },
428
+ "open": {
429
+ "type": "boolean",
430
+ "mutable": true,
431
+ "complexType": {
432
+ "original": "boolean",
433
+ "resolved": "boolean",
434
+ "references": {}
435
+ },
436
+ "required": false,
437
+ "optional": false,
438
+ "docs": {
439
+ "tags": [{
440
+ "name": "default",
441
+ "text": "false"
442
+ }],
443
+ "text": "Controlled open state. Reflects to the `open` attribute, so\n`<seki-hover-card open>` renders open with no script involved."
444
+ },
445
+ "getter": false,
446
+ "setter": false,
447
+ "reflect": true,
448
+ "attribute": "open",
449
+ "defaultValue": "false"
450
+ },
451
+ "defaultOpen": {
452
+ "type": "boolean",
453
+ "mutable": false,
454
+ "complexType": {
455
+ "original": "boolean",
456
+ "resolved": "boolean",
457
+ "references": {}
458
+ },
459
+ "required": false,
460
+ "optional": false,
461
+ "docs": {
462
+ "tags": [{
463
+ "name": "default",
464
+ "text": "false"
465
+ }],
466
+ "text": "Initial open state for uncontrolled usage"
467
+ },
468
+ "getter": false,
469
+ "setter": false,
470
+ "reflect": false,
471
+ "attribute": "default-open",
472
+ "defaultValue": "false"
378
473
  }
379
474
  };
380
475
  }
@@ -392,18 +487,59 @@ export class SekiHoverCard {
392
487
  "composed": true,
393
488
  "docs": {
394
489
  "tags": [],
395
- "text": "Emitted when open state changes"
490
+ "text": "Emitted when open state changes. `detail` is the new open state as a\nbare boolean, matching every other `sekiOpenChange` in the library."
396
491
  },
397
492
  "complexType": {
398
- "original": "{ open: boolean }",
399
- "resolved": "{ open: boolean; }",
493
+ "original": "boolean",
494
+ "resolved": "boolean",
400
495
  "references": {}
401
496
  }
402
497
  }];
403
498
  }
499
+ static get methods() {
500
+ return {
501
+ "openHoverCard": {
502
+ "complexType": {
503
+ "signature": "() => Promise<void>",
504
+ "parameters": [],
505
+ "references": {
506
+ "Promise": {
507
+ "location": "global",
508
+ "id": "global::Promise"
509
+ }
510
+ },
511
+ "return": "Promise<void>"
512
+ },
513
+ "docs": {
514
+ "text": "Open the hover card immediately, skipping `openDelay`",
515
+ "tags": []
516
+ }
517
+ },
518
+ "closeHoverCard": {
519
+ "complexType": {
520
+ "signature": "() => Promise<void>",
521
+ "parameters": [],
522
+ "references": {
523
+ "Promise": {
524
+ "location": "global",
525
+ "id": "global::Promise"
526
+ }
527
+ },
528
+ "return": "Promise<void>"
529
+ },
530
+ "docs": {
531
+ "text": "Close the hover card immediately, skipping `closeDelay`",
532
+ "tags": []
533
+ }
534
+ }
535
+ };
536
+ }
404
537
  static get elementRef() { return "el"; }
405
538
  static get watchers() {
406
539
  return [{
540
+ "propName": "open",
541
+ "methodName": "openChanged"
542
+ }, {
407
543
  "propName": "disabled",
408
544
  "methodName": "disabledChanged"
409
545
  }];
@@ -1,6 +1,7 @@
1
1
  // src/components/resizable/seki-resizable-handle.tsx
2
2
  import { h, Host } from "@stencil/core";
3
3
  import { syncTheme } from "../../utils/theme-sync";
4
+ import { subscribeToContextChange } from "../../utils/context-bridge";
4
5
  /**
5
6
  * Resizable handle - draggable divider between panels
6
7
  *
@@ -21,6 +22,7 @@ export class SekiResizableHandle {
21
22
  this._direction = 'horizontal';
22
23
  this.startPosition = 0;
23
24
  this.groupElement = null;
25
+ this.contextSubscription = null;
24
26
  this.handleDirectionChange = () => {
25
27
  const context = this.getContext();
26
28
  if (context) {
@@ -82,14 +84,21 @@ export class SekiResizableHandle {
82
84
  this.groupElement = group;
83
85
  group.addEventListener('sekiDirectionChange', this.handleDirectionChange);
84
86
  }
87
+ // Pick up the direction once the group publishes its context, which may be
88
+ // after this handle loaded in the per-tag custom-elements build.
89
+ this.contextSubscription = subscribeToContextChange(this.el, 'seki-resizable-panel-group', this.handleDirectionChange);
90
+ this.handleDirectionChange();
85
91
  }
86
92
  connectedCallback() {
87
93
  syncTheme(this.el);
88
94
  }
89
95
  disconnectedCallback() {
96
+ var _a;
90
97
  if (this.groupElement) {
91
98
  this.groupElement.removeEventListener('sekiDirectionChange', this.handleDirectionChange);
92
99
  }
100
+ (_a = this.contextSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
101
+ this.contextSubscription = null;
93
102
  }
94
103
  handleKeyDown(event) {
95
104
  if (this.disabled)
@@ -157,13 +166,13 @@ export class SekiResizableHandle {
157
166
  }
158
167
  render() {
159
168
  const isHorizontal = this._direction === 'horizontal';
160
- return (h(Host, { key: 'f57bd8dbeadc3b60bfe1b949e5b0eaa64cabf8e3' }, h("div", { key: '7e753102f4e9f175e23aa2539d2bd61a44e7a0e0', part: "handle", role: "separator", tabindex: this.disabled ? -1 : 0, "aria-valuenow": this.getAriaValue(), "aria-valuemin": 0, "aria-valuemax": 100, "aria-orientation": isHorizontal ? 'vertical' : 'horizontal', "aria-label": "Resize handle", class: {
169
+ return (h(Host, { key: '567e976a7d1d4b1fedf048ff9a7596c2f91c1872' }, h("div", { key: 'ec73f064616fd898f17cbf01b99af34788c7530f', part: "handle", role: "separator", tabindex: this.disabled ? -1 : 0, "aria-valuenow": this.getAriaValue(), "aria-valuemin": 0, "aria-valuemax": 100, "aria-orientation": isHorizontal ? 'vertical' : 'horizontal', "aria-label": "Resize handle", class: {
161
170
  'resizable-handle': true,
162
171
  'resizable-handle--horizontal': isHorizontal,
163
172
  'resizable-handle--vertical': !isHorizontal,
164
173
  'resizable-handle--disabled': this.disabled,
165
174
  'resizable-handle--dragging': this._isDragging,
166
- }, onPointerDown: this.handlePointerDown, onPointerMove: this.handlePointerMove, onPointerUp: this.handlePointerUp }, this.withHandle && (h("div", { key: 'b2481ae202d7c569c94b4ebbadb2e970f00350fc', part: "grip", class: "resizable-handle__grip" }, h("svg", { key: '88d2b6c7169b11809053b63c1983245ca268fc27', class: "resizable-handle__grip-icon", viewBox: "0 0 6 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("circle", { key: '7af4ef76e00f3b7ebf3b0f8ec25c1949254ce4b3', cx: "1.5", cy: "2", r: "1", fill: "currentColor" }), h("circle", { key: 'a52a1f74aba04567eca82dd84a1d289d093b960e', cx: "4.5", cy: "2", r: "1", fill: "currentColor" }), h("circle", { key: 'a5db8c4c9f72a9f3ce1940e3c336f36bedc503c2', cx: "1.5", cy: "6", r: "1", fill: "currentColor" }), h("circle", { key: '34e4356b00d9aec99f4d5da29036352e5e43f013', cx: "4.5", cy: "6", r: "1", fill: "currentColor" }), h("circle", { key: '17ce1db6add8788fead03b9c97113a262b725c17', cx: "1.5", cy: "10", r: "1", fill: "currentColor" }), h("circle", { key: 'edccbc8dad1a053a55cba85cf8a0b939d319a6b8', cx: "4.5", cy: "10", r: "1", fill: "currentColor" }), h("circle", { key: '5d95d8b187d2992bc9d55a08fe3dd034fda9474a', cx: "1.5", cy: "14", r: "1", fill: "currentColor" }), h("circle", { key: '149ff3d7f9ba53b1715ec4867b72ad4d941a3972', cx: "4.5", cy: "14", r: "1", fill: "currentColor" })))))));
175
+ }, onPointerDown: this.handlePointerDown, onPointerMove: this.handlePointerMove, onPointerUp: this.handlePointerUp }, this.withHandle && (h("div", { key: 'e3054a34cbc71079c006864adb10fce7fa338507', part: "grip", class: "resizable-handle__grip" }, h("svg", { key: 'de3899676f375377fb558dea1bb645f0d0e70388', class: "resizable-handle__grip-icon", viewBox: "0 0 6 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("circle", { key: 'e9c55beb3bc0039c9cd6562aa8e936d4dcfafdb2', cx: "1.5", cy: "2", r: "1", fill: "currentColor" }), h("circle", { key: 'f7ebf6269df4d7e88b2c903ec922666a06a594d7', cx: "4.5", cy: "2", r: "1", fill: "currentColor" }), h("circle", { key: 'beedd6149812012e9d5b32f3dd77f120aa0e0859', cx: "1.5", cy: "6", r: "1", fill: "currentColor" }), h("circle", { key: '9b42b8fb2e0e502e8195b520a08a760dc27a9eaa', cx: "4.5", cy: "6", r: "1", fill: "currentColor" }), h("circle", { key: '12d0dd2597037340c94792be04f82e5745ba20de', cx: "1.5", cy: "10", r: "1", fill: "currentColor" }), h("circle", { key: '12227cd7aed5dd71c26133e57e4dd9bb72efb88b', cx: "4.5", cy: "10", r: "1", fill: "currentColor" }), h("circle", { key: 'f0951f2f445e06af2419f6f4d56d008aed9c5316', cx: "1.5", cy: "14", r: "1", fill: "currentColor" }), h("circle", { key: '57e3b554bab80ce435e77722957fae11e4c29192', cx: "4.5", cy: "14", r: "1", fill: "currentColor" })))))));
167
176
  }
168
177
  static get is() { return "seki-resizable-handle"; }
169
178
  static get encapsulation() { return "shadow"; }
@@ -1,6 +1,7 @@
1
1
  // src/components/resizable/seki-resizable-panel-group.tsx
2
2
  import { h, Host } from "@stencil/core";
3
3
  import { syncTheme } from "../../utils/theme-sync";
4
+ import { publishContext } from "../../utils/context-bridge";
4
5
  const STORAGE_KEY_PREFIX = 'seki-resizable:';
5
6
  function clamp(value, min, max) {
6
7
  return Math.min(Math.max(value, min), max);
@@ -247,7 +248,7 @@ export class SekiResizablePanelGroup {
247
248
  this.restoreLayout();
248
249
  }
249
250
  updateContext() {
250
- this._resizableContext = {
251
+ const context = {
251
252
  direction: this.direction,
252
253
  disabled: this.disabled,
253
254
  registerPanel: this.registerPanel,
@@ -260,6 +261,10 @@ export class SekiResizablePanelGroup {
260
261
  isCollapsed: this.isCollapsed,
261
262
  getHandleIndex: this.getHandleIndex,
262
263
  };
264
+ this._resizableContext = context;
265
+ // Publish on the host so children reach it via closest() in every build,
266
+ // and notify any child that mounted before this group was defined.
267
+ publishContext(this.el, '_resizableContext', context, this.contextChange);
263
268
  }
264
269
  emitLayoutChange() {
265
270
  const sizes = this._panelOrder.map((id) => { var _a, _b; return (_b = (_a = this._panels.get(id)) === null || _a === void 0 ? void 0 : _a.size) !== null && _b !== void 0 ? _b : 0; });
@@ -311,11 +316,11 @@ export class SekiResizablePanelGroup {
311
316
  syncTheme(this.el);
312
317
  }
313
318
  render() {
314
- return (h(Host, { key: '1d6170c745798c0608abae51b7d2bbbf51b10f99' }, h("div", { key: '517e36739e6857b55d9719f191f4cb0695ca5aaa', part: "group", role: "group", "aria-label": "Resizable panel group", class: {
319
+ return (h(Host, { key: '4050d03c828d3bd09ddd73ab9009b81ffcb2a2cd' }, h("div", { key: '148dba7f6173a023c861cfdd49e626773e317c23', part: "group", role: "group", "aria-label": "Resizable panel group", class: {
315
320
  'resizable-panel-group': true,
316
321
  'resizable-panel-group--horizontal': this.direction === 'horizontal',
317
322
  'resizable-panel-group--vertical': this.direction === 'vertical',
318
- } }, h("slot", { key: '66621ac830e9e164ad833b58124504df9812c930' }))));
323
+ } }, h("slot", { key: '076d2200fad74c84d01970985d443a8cdd7d00ff' }))));
319
324
  }
320
325
  static get is() { return "seki-resizable-panel-group"; }
321
326
  static get encapsulation() { return "shadow"; }
@@ -429,6 +434,21 @@ export class SekiResizablePanelGroup {
429
434
  "resolved": "\"horizontal\" | \"vertical\"",
430
435
  "references": {}
431
436
  }
437
+ }, {
438
+ "method": "contextChange",
439
+ "name": "sekiContextChange",
440
+ "bubbles": true,
441
+ "cancelable": true,
442
+ "composed": true,
443
+ "docs": {
444
+ "tags": [],
445
+ "text": "Internal: fired whenever `_resizableContext` is (re)published so panels and\nhandles that mounted before this group was defined can register late.\nSee utils/context-bridge.ts \u2014 no payload by design."
446
+ },
447
+ "complexType": {
448
+ "original": "void",
449
+ "resolved": "void",
450
+ "references": {}
451
+ }
432
452
  }];
433
453
  }
434
454
  static get elementRef() { return "el"; }
@@ -1,6 +1,7 @@
1
1
  // src/components/resizable/seki-resizable-panel.tsx
2
2
  import { h, Host } from "@stencil/core";
3
3
  import { syncTheme } from "../../utils/theme-sync";
4
+ import { subscribeToContextChange } from "../../utils/context-bridge";
4
5
  let panelIdCounter = 0;
5
6
  /**
6
7
  * Resizable panel - individual content panel with size constraints
@@ -31,9 +32,35 @@ export class SekiResizablePanel {
31
32
  this.collapsedSize = 0;
32
33
  this._size = 0;
33
34
  this._isCollapsed = false;
35
+ this.hasRegistered = false;
36
+ this.contextSubscription = null;
34
37
  this.handleLayoutChange = () => {
35
38
  this.updateSize();
36
39
  };
40
+ /**
41
+ * The group publishes its context when *it* loads, which in the per-tag
42
+ * custom-elements build can be after this panel's componentWillLoad. Register
43
+ * whenever the context is (re)published; the group ignores duplicates.
44
+ */
45
+ this.handleParentContextChange = () => {
46
+ this.registerWithGroup();
47
+ this.updateSize();
48
+ };
49
+ }
50
+ registerWithGroup() {
51
+ if (this.hasRegistered)
52
+ return;
53
+ const context = this.getContext();
54
+ if (!context)
55
+ return;
56
+ context.registerPanel(this.panelId, {
57
+ defaultSize: this.defaultSize,
58
+ minSize: this.minSize,
59
+ maxSize: this.maxSize,
60
+ collapsible: this.collapsible,
61
+ collapsedSize: this.collapsedSize,
62
+ });
63
+ this.hasRegistered = true;
37
64
  }
38
65
  getContext() {
39
66
  const group = this.el.closest('seki-resizable-panel-group');
@@ -42,16 +69,7 @@ export class SekiResizablePanel {
42
69
  }
43
70
  componentWillLoad() {
44
71
  this.panelId = `panel-${++panelIdCounter}`;
45
- const context = this.getContext();
46
- if (context) {
47
- context.registerPanel(this.panelId, {
48
- defaultSize: this.defaultSize,
49
- minSize: this.minSize,
50
- maxSize: this.maxSize,
51
- collapsible: this.collapsible,
52
- collapsedSize: this.collapsedSize,
53
- });
54
- }
72
+ this.registerWithGroup();
55
73
  }
56
74
  componentDidLoad() {
57
75
  const group = this.el.closest('seki-resizable-panel-group');
@@ -59,34 +77,38 @@ export class SekiResizablePanel {
59
77
  this.groupElement = group;
60
78
  group.addEventListener('sekiLayoutChange', this.handleLayoutChange);
61
79
  }
80
+ this.contextSubscription = subscribeToContextChange(this.el, 'seki-resizable-panel-group', this.handleParentContextChange);
81
+ this.registerWithGroup();
62
82
  this.updateSize();
63
83
  }
64
84
  connectedCallback() {
65
85
  syncTheme(this.el);
86
+ // Re-register after a DOM move; componentWillLoad only fires once.
87
+ if (this.panelId)
88
+ this.registerWithGroup();
66
89
  }
67
90
  disconnectedCallback() {
91
+ var _a;
68
92
  // Remove event listener to prevent memory leak
69
93
  if (this.groupElement) {
70
94
  this.groupElement.removeEventListener('sekiLayoutChange', this.handleLayoutChange);
71
95
  }
96
+ (_a = this.contextSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
97
+ this.contextSubscription = null;
72
98
  // Unregister panel from group
73
99
  const context = this.getContext();
74
100
  if (context) {
75
101
  context.unregisterPanel(this.panelId);
76
102
  }
103
+ this.hasRegistered = false;
77
104
  }
78
105
  handleConstraintChange() {
79
106
  const context = this.getContext();
80
107
  if (context) {
81
108
  // Re-register with new constraints
82
109
  context.unregisterPanel(this.panelId);
83
- context.registerPanel(this.panelId, {
84
- defaultSize: this.defaultSize,
85
- minSize: this.minSize,
86
- maxSize: this.maxSize,
87
- collapsible: this.collapsible,
88
- collapsedSize: this.collapsedSize,
89
- });
110
+ this.hasRegistered = false;
111
+ this.registerWithGroup();
90
112
  }
91
113
  }
92
114
  updateSize() {
@@ -144,14 +166,14 @@ export class SekiResizablePanel {
144
166
  return this.panelId;
145
167
  }
146
168
  render() {
147
- return (h(Host, { key: '6b53e0ef0f75bbde83bb9e318a55ab8261498737', style: {
169
+ return (h(Host, { key: '69f32198c8537b16e91222dcfcbb23c18dc37782', style: {
148
170
  flexBasis: `${this._size}%`,
149
171
  flexGrow: '0',
150
172
  flexShrink: '0',
151
- } }, h("div", { key: 'dd9e5c4165ed0e65aa5949373871240fdacd3e44', part: "panel", role: "region", class: {
173
+ } }, h("div", { key: 'f45c47381a87eca45473a2da2a035bbff4c1b745', part: "panel", role: "region", class: {
152
174
  'resizable-panel': true,
153
175
  'resizable-panel--collapsed': this._isCollapsed,
154
- } }, h("slot", { key: '230de96b3ac24f7f0bbd470bf92d91e43a56f374' }))));
176
+ } }, h("slot", { key: '1f9f46fd08e315a79cc806b72c56a450c75c7ed5' }))));
155
177
  }
156
178
  static get is() { return "seki-resizable-panel"; }
157
179
  static get encapsulation() { return "shadow"; }
@@ -86,7 +86,7 @@ export class SekiSelect {
86
86
  this.hasBeenActivated = true;
87
87
  }
88
88
  // Emit event
89
- this.sekiOpenChange.emit({ open });
89
+ this.sekiOpenChange.emit(open);
90
90
  // Validate on close if required
91
91
  if (!open && this.required && this.hasBeenActivated) {
92
92
  this.validateRequired();
@@ -396,7 +396,7 @@ export class SekiSelect {
396
396
  // Render
397
397
  // ===========================
398
398
  render() {
399
- return (h(Host, { key: '4a9f13dc6746a13b0b99bf03b8092d48ab475677' }, h("slot", { key: '9c49228973bc8e62ec2129c5c3f72fadf608081f' })));
399
+ return (h(Host, { key: 'd89c2754151f8faf545b616b5dce64b4dbbfd1a4' }, h("slot", { key: 'b5bf2a24deed68b33849b9fbcb6b091297885367' })));
400
400
  }
401
401
  static get is() { return "seki-select"; }
402
402
  static get encapsulation() { return "shadow"; }
@@ -767,18 +767,12 @@ export class SekiSelect {
767
767
  "composed": true,
768
768
  "docs": {
769
769
  "tags": [],
770
- "text": "Emitted when dropdown open state changes"
770
+ "text": "Emitted when dropdown open state changes; `detail` is the new open state as a bare boolean"
771
771
  },
772
772
  "complexType": {
773
- "original": "SelectOpenChangeEventDetail",
774
- "resolved": "SelectOpenChangeEventDetail",
775
- "references": {
776
- "SelectOpenChangeEventDetail": {
777
- "location": "import",
778
- "path": "../../utils/select",
779
- "id": "src/utils/select/index.ts::SelectOpenChangeEventDetail"
780
- }
781
- }
773
+ "original": "boolean",
774
+ "resolved": "boolean",
775
+ "references": {}
782
776
  }
783
777
  }, {
784
778
  "method": "sekiValidate",
@@ -816,6 +816,14 @@
816
816
  min-width: 100%;
817
817
  }
818
818
 
819
+ /* Hides the listbox (and, since it's no longer un-slotted, every option
820
+ inside it) while closed. See the comment on render()'s Host class in
821
+ seki-select-content.tsx for why this replaced a conditional `return null`.
822
+ Mirrors seki-combobox-content.css's identical :host(.hidden) rule. */
823
+ :host(.hidden) {
824
+ display: none;
825
+ }
826
+
819
827
  .content-container {
820
828
  background: var(--seki-select-content-bg);
821
829
  border: var(--seki-select-content-border);
@@ -52,11 +52,14 @@ export class SekiSelectContent {
52
52
  /**
53
53
  * Accessible name for the listbox.
54
54
  *
55
- * It cannot borrow the trigger's name via aria-labelledby: the trigger's
56
- * combobox and this listbox live in separate shadow roots, and IDREFs do not
57
- * resolve across tree scopes. So the name is mirrored down as a literal
58
- * string instead. An aria-labelledby on the <seki-select> host *can* be
59
- * resolved here, because the host and its label sit in the same tree.
55
+ * As of #300, seki-select-trigger and this listbox render in the same real
56
+ * DOM tree scope (scoped, non-shadow mode), so an aria-labelledby pointing
57
+ * back at the trigger's combobox would technically resolve now. Kept as a
58
+ * mirrored literal string anyway — simpler and more robust than a live
59
+ * cross-component id reference, and it avoids coupling this component's
60
+ * accessible name to the trigger's specific DOM shape. An aria-labelledby
61
+ * on the <seki-select> host *can* still be resolved here, because the host
62
+ * and its label sit in the same tree (unchanged).
60
63
  */
61
64
  getAccessibleName(selectContext) {
62
65
  var _a, _b, _c;
@@ -81,16 +84,22 @@ export class SekiSelectContent {
81
84
  return null;
82
85
  }
83
86
  const isOpen = selectContext.open;
84
- // Lazy rendering - only render when open
85
- if (!isOpen) {
86
- return null;
87
- }
88
87
  const parent = this.el.closest('seki-select');
89
88
  const maxHeight = (parent === null || parent === void 0 ? void 0 : parent.maxHeight) || '12.5rem';
90
- return (h(Host, null, h("div", { class: "content-container", role: "listbox", id: selectContext.contentId, "aria-label": this.getAccessibleName(selectContext), "aria-multiselectable": selectContext.multiple ? 'true' : undefined }, h("div", { ref: (el) => (this.scrollContainerRef = el), class: "content-scroll", style: { maxHeight } }, h("slot", null)))));
89
+ // Always render, hiding via CSS instead of `return null` when closed (the
90
+ // seki-combobox-content pattern this mirrors). Under shadow DOM this used
91
+ // to conditionally return null and rely on the browser's own behavior of
92
+ // never rendering un-slotted light-DOM children — with no <slot> to
93
+ // assign them to, the options were simply invisible. Scoped (non-shadow)
94
+ // mode has no such mechanism: each seki-select-option still renders its
95
+ // own role="option" div regardless of whether a parent slot exists for
96
+ // it, so returning null here left every option fully visible — and
97
+ // interactable — even while "closed" (#300 e2e regression). See
98
+ // :host(.hidden) in seki-select-content.css.
99
+ return (h(Host, { class: { hidden: !isOpen } }, h("div", { class: "content-container", role: "listbox", id: selectContext.contentId, "aria-label": this.getAccessibleName(selectContext), "aria-multiselectable": selectContext.multiple ? 'true' : undefined }, h("div", { ref: (el) => (this.scrollContainerRef = el), class: "content-scroll", style: { maxHeight } }, h("slot", null)))));
91
100
  }
92
101
  static get is() { return "seki-select-content"; }
93
- static get encapsulation() { return "shadow"; }
102
+ static get encapsulation() { return "scoped"; }
94
103
  static get originalStyleUrls() {
95
104
  return {
96
105
  "$": ["seki-select-content.css"]
@@ -15,10 +15,10 @@ export class SekiSelectGroup {
15
15
  syncTheme(this.el);
16
16
  }
17
17
  render() {
18
- return (h(Host, { key: 'e221fca22d8e6fdf3addd112fb08afe46cf888ce' }, h("div", { key: '365fe2f5ed8990ebb80d41904a2cc79534567f9f', class: "group", role: "group", "aria-labelledby": this.groupLabelId }, h("div", { key: 'd2c7e82bf5cb0c3cd108d8428e44c8d1654f77a4', class: "group-separator", "aria-hidden": "true" }), h("div", { key: '0a6737c20344303ce09bab49d0c1fe913f29a216', class: "group-label", id: this.groupLabelId, role: "presentation" }, h("slot", { key: 'a492f1b53627832fdb1b801b4115f2d4954f30f0', name: "label" }, this.label)), h("div", { key: 'eef01caf57f171ab6ce6ac66840c1cb4fc995a79', class: "group-options" }, h("slot", { key: 'fdb252d3a0e2e75e863104a66469cff17730e0ce' })))));
18
+ return (h(Host, { key: 'e1cb8d09575a3851c93f823623cd9331be3e96cc' }, h("div", { key: 'ddb385f0668bb61461f9e5121be9b8394218b629', class: "group", role: "group", "aria-labelledby": this.groupLabelId }, h("div", { key: 'de153ac27303e514ab3f6c85547809523b41584a', class: "group-separator", "aria-hidden": "true" }), h("div", { key: 'f8e67ce663167d38ff6432b704abec5631c5d52c', class: "group-label", id: this.groupLabelId, role: "presentation" }, h("slot", { key: '622315b7efb3aafc12b93f0b0bbf32a22292c95b', name: "label" }, this.label)), h("div", { key: 'beb13a0aeac5543fb9dcde5da98caf81d92a23e2', class: "group-options" }, h("slot", { key: '8919337fddfeb602538eaca3914a1e4bb36c65ee' })))));
19
19
  }
20
20
  static get is() { return "seki-select-group"; }
21
- static get encapsulation() { return "shadow"; }
21
+ static get encapsulation() { return "scoped"; }
22
22
  static get originalStyleUrls() {
23
23
  return {
24
24
  "$": ["seki-select-group.css"]