@womp/kookie-ui 0.26.3 → 0.27.0

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 (160) hide show
  1. package/components.css +138 -0
  2. package/dist/cjs/components/_internal/pane-chrome.d.ts +7 -1
  3. package/dist/cjs/components/_internal/pane-chrome.d.ts.map +1 -1
  4. package/dist/cjs/components/_internal/pane-chrome.js +1 -1
  5. package/dist/cjs/components/_internal/pane-chrome.js.map +4 -4
  6. package/dist/cjs/components/_internal/shell-page-scroll.d.ts +15 -0
  7. package/dist/cjs/components/_internal/shell-page-scroll.d.ts.map +1 -0
  8. package/dist/cjs/components/_internal/shell-page-scroll.js +3 -0
  9. package/dist/cjs/components/_internal/shell-page-scroll.js.map +7 -0
  10. package/dist/cjs/components/_internal/shell-sidebar.js +1 -1
  11. package/dist/cjs/components/_internal/shell-sidebar.js.map +4 -4
  12. package/dist/cjs/components/index.js +2 -2
  13. package/dist/cjs/components/index.js.map +4 -4
  14. package/dist/cjs/components/schemas/index.js +1 -1
  15. package/dist/cjs/components/schemas/index.js.map +2 -2
  16. package/dist/cjs/components/schemas/shell.schema.d.ts +1 -0
  17. package/dist/cjs/components/schemas/shell.schema.d.ts.map +1 -1
  18. package/dist/cjs/components/schemas/shell.schema.js +1 -1
  19. package/dist/cjs/components/schemas/shell.schema.js.map +2 -2
  20. package/dist/cjs/components/shell.d.ts +11 -0
  21. package/dist/cjs/components/shell.d.ts.map +1 -1
  22. package/dist/cjs/components/shell.js +1 -1
  23. package/dist/cjs/components/shell.js.map +4 -4
  24. package/dist/cjs/components/sidebar.js +1 -1
  25. package/dist/cjs/components/sidebar.js.map +4 -4
  26. package/dist/cjs/components/toolbar.js +1 -1
  27. package/dist/cjs/components/toolbar.js.map +4 -4
  28. package/dist/cjs/index.js +4 -4
  29. package/dist/cjs/index.js.map +4 -4
  30. package/dist/esm/{chunk-FK434VPA.js → chunk-25ZRMILM.js} +2 -2
  31. package/dist/esm/{chunk-GMWCTK5G.js → chunk-2E57H3NH.js} +2 -2
  32. package/dist/esm/{chunk-W3ES2XSB.js → chunk-2S7HPQVX.js} +2 -2
  33. package/dist/esm/{chunk-27XQ5PN5.js → chunk-2ZKEQS76.js} +2 -2
  34. package/dist/esm/{chunk-Q2TLWILH.js → chunk-3MFSQ6PN.js} +2 -2
  35. package/dist/esm/{chunk-WYKNBNM5.js → chunk-5BX2YZV6.js} +2 -2
  36. package/dist/esm/{chunk-VPP5IDW7.js → chunk-67UEMB4K.js} +2 -2
  37. package/dist/esm/chunk-6HEORZNJ.js +3 -0
  38. package/dist/esm/chunk-6HEORZNJ.js.map +7 -0
  39. package/dist/esm/{chunk-MPCCYR7L.js → chunk-6YWHNLSC.js} +2 -2
  40. package/dist/esm/{chunk-6C6EK2B5.js → chunk-7V6M3MIR.js} +2 -2
  41. package/dist/esm/{chunk-T2DZDW5Y.js → chunk-AQKSO3SW.js} +2 -2
  42. package/dist/esm/{chunk-IDEDEPBM.js → chunk-B6OFKABP.js} +2 -2
  43. package/dist/esm/chunk-CZ24FOFS.js +3 -0
  44. package/dist/esm/chunk-CZ24FOFS.js.map +7 -0
  45. package/dist/esm/{chunk-RP5ORPPH.js → chunk-DP7MPGR7.js} +2 -2
  46. package/dist/esm/{chunk-UMR4AF35.js → chunk-FMVOB367.js} +2 -2
  47. package/dist/esm/{chunk-YOZXIUZY.js → chunk-FVRVBB6O.js} +2 -2
  48. package/dist/esm/{chunk-6JGF6PQH.js → chunk-H2J25HXP.js} +2 -2
  49. package/dist/esm/{chunk-ACMANOVD.js → chunk-H73AMXCH.js} +2 -2
  50. package/dist/esm/{chunk-E2LSWNWZ.js → chunk-HBO7W7SS.js} +2 -2
  51. package/dist/esm/{chunk-2R7WQPXX.js → chunk-HR2VHGJ5.js} +2 -2
  52. package/dist/esm/{chunk-3UIODOPE.js → chunk-J54GYD7A.js} +2 -2
  53. package/dist/esm/{chunk-DSM5SUH3.js → chunk-JKQN6QCP.js} +2 -2
  54. package/dist/esm/{chunk-R7YHDIFM.js → chunk-K3GDM26A.js} +2 -2
  55. package/dist/esm/{chunk-CGFLZ3DC.js → chunk-KJZSXLIX.js} +2 -2
  56. package/dist/esm/{chunk-KLYI5E6F.js → chunk-LABMK6Q7.js} +2 -2
  57. package/dist/esm/{chunk-OLWUS7PC.js → chunk-MJKVVGGV.js} +2 -2
  58. package/dist/esm/{chunk-Z5W4ACO2.js → chunk-MMDZBPSX.js} +2 -2
  59. package/dist/esm/chunk-QEDKL23P.js +3 -0
  60. package/dist/esm/chunk-QEDKL23P.js.map +7 -0
  61. package/dist/esm/{chunk-ZIAA2C4H.js → chunk-REORAMUH.js} +2 -2
  62. package/dist/esm/{chunk-MCHK36NI.js → chunk-SUQJ7DD4.js} +2 -2
  63. package/dist/esm/chunk-TSWHVZ47.js +3 -0
  64. package/dist/esm/chunk-TSWHVZ47.js.map +7 -0
  65. package/dist/esm/{chunk-OUOP6Q3Z.js → chunk-VQDCHBZR.js} +2 -2
  66. package/dist/esm/{chunk-2NWHEGKZ.js → chunk-WAXRIARV.js} +2 -2
  67. package/dist/esm/{chunk-4CIQRUYW.js → chunk-ZOUIIO4C.js} +2 -2
  68. package/dist/esm/components/_internal/base-button.js +1 -1
  69. package/dist/esm/components/_internal/pane-chrome.d.ts +7 -1
  70. package/dist/esm/components/_internal/pane-chrome.d.ts.map +1 -1
  71. package/dist/esm/components/_internal/pane-chrome.js +1 -1
  72. package/dist/esm/components/_internal/portal-theme.js +1 -1
  73. package/dist/esm/components/_internal/shell-page-scroll.d.ts +15 -0
  74. package/dist/esm/components/_internal/shell-page-scroll.d.ts.map +1 -0
  75. package/dist/esm/components/_internal/shell-page-scroll.js +3 -0
  76. package/dist/esm/components/_internal/shell-page-scroll.js.map +7 -0
  77. package/dist/esm/components/_internal/shell-sidebar.js +1 -1
  78. package/dist/esm/components/accordion.js +1 -1
  79. package/dist/esm/components/alert-dialog.js +1 -1
  80. package/dist/esm/components/avatar.js +1 -1
  81. package/dist/esm/components/button.js +1 -1
  82. package/dist/esm/components/chatbar.js +1 -1
  83. package/dist/esm/components/checkbox-group.js +1 -1
  84. package/dist/esm/components/checkbox.js +1 -1
  85. package/dist/esm/components/chip.js +1 -1
  86. package/dist/esm/components/combobox.js +1 -1
  87. package/dist/esm/components/context-menu.js +1 -1
  88. package/dist/esm/components/dialog.js +1 -1
  89. package/dist/esm/components/dropdown-menu.js +1 -1
  90. package/dist/esm/components/index.js +1 -1
  91. package/dist/esm/components/message-scroller.js +1 -1
  92. package/dist/esm/components/notice.js +1 -1
  93. package/dist/esm/components/popover.js +1 -1
  94. package/dist/esm/components/radio-group.js +1 -1
  95. package/dist/esm/components/radio.js +1 -1
  96. package/dist/esm/components/schemas/index.js +1 -1
  97. package/dist/esm/components/schemas/shell.schema.d.ts +1 -0
  98. package/dist/esm/components/schemas/shell.schema.d.ts.map +1 -1
  99. package/dist/esm/components/schemas/shell.schema.js +1 -1
  100. package/dist/esm/components/select.js +1 -1
  101. package/dist/esm/components/sheet.js +1 -1
  102. package/dist/esm/components/shell.d.ts +11 -0
  103. package/dist/esm/components/shell.d.ts.map +1 -1
  104. package/dist/esm/components/shell.js +1 -1
  105. package/dist/esm/components/sidebar.js +1 -1
  106. package/dist/esm/components/slider.js +1 -1
  107. package/dist/esm/components/switch.js +1 -1
  108. package/dist/esm/components/tabs.js +1 -1
  109. package/dist/esm/components/text-area.js +1 -1
  110. package/dist/esm/components/text-field.js +1 -1
  111. package/dist/esm/components/theme.js +1 -1
  112. package/dist/esm/components/toggle.js +1 -1
  113. package/dist/esm/components/toolbar.js +1 -1
  114. package/dist/esm/components/tooltip.js +1 -1
  115. package/dist/esm/index.js +1 -1
  116. package/package.json +1 -1
  117. package/schemas/index.json +6 -1
  118. package/schemas/shell-root.json +6 -1
  119. package/src/components/_internal/pane-chrome.tsx +15 -2
  120. package/src/components/_internal/shell-page-scroll.ts +49 -0
  121. package/src/components/schemas/shell.schema.ts +4 -1
  122. package/src/components/shell.css +201 -0
  123. package/src/components/shell.tsx +128 -22
  124. package/styles.css +138 -0
  125. package/dist/esm/chunk-OLTRWCQK.js +0 -3
  126. package/dist/esm/chunk-OLTRWCQK.js.map +0 -7
  127. package/dist/esm/chunk-SCIFT27R.js +0 -3
  128. package/dist/esm/chunk-SCIFT27R.js.map +0 -7
  129. package/dist/esm/chunk-XGES2VBG.js +0 -3
  130. package/dist/esm/chunk-XGES2VBG.js.map +0 -7
  131. /package/dist/esm/{chunk-FK434VPA.js.map → chunk-25ZRMILM.js.map} +0 -0
  132. /package/dist/esm/{chunk-GMWCTK5G.js.map → chunk-2E57H3NH.js.map} +0 -0
  133. /package/dist/esm/{chunk-W3ES2XSB.js.map → chunk-2S7HPQVX.js.map} +0 -0
  134. /package/dist/esm/{chunk-27XQ5PN5.js.map → chunk-2ZKEQS76.js.map} +0 -0
  135. /package/dist/esm/{chunk-Q2TLWILH.js.map → chunk-3MFSQ6PN.js.map} +0 -0
  136. /package/dist/esm/{chunk-WYKNBNM5.js.map → chunk-5BX2YZV6.js.map} +0 -0
  137. /package/dist/esm/{chunk-VPP5IDW7.js.map → chunk-67UEMB4K.js.map} +0 -0
  138. /package/dist/esm/{chunk-MPCCYR7L.js.map → chunk-6YWHNLSC.js.map} +0 -0
  139. /package/dist/esm/{chunk-6C6EK2B5.js.map → chunk-7V6M3MIR.js.map} +0 -0
  140. /package/dist/esm/{chunk-T2DZDW5Y.js.map → chunk-AQKSO3SW.js.map} +0 -0
  141. /package/dist/esm/{chunk-IDEDEPBM.js.map → chunk-B6OFKABP.js.map} +0 -0
  142. /package/dist/esm/{chunk-RP5ORPPH.js.map → chunk-DP7MPGR7.js.map} +0 -0
  143. /package/dist/esm/{chunk-UMR4AF35.js.map → chunk-FMVOB367.js.map} +0 -0
  144. /package/dist/esm/{chunk-YOZXIUZY.js.map → chunk-FVRVBB6O.js.map} +0 -0
  145. /package/dist/esm/{chunk-6JGF6PQH.js.map → chunk-H2J25HXP.js.map} +0 -0
  146. /package/dist/esm/{chunk-ACMANOVD.js.map → chunk-H73AMXCH.js.map} +0 -0
  147. /package/dist/esm/{chunk-E2LSWNWZ.js.map → chunk-HBO7W7SS.js.map} +0 -0
  148. /package/dist/esm/{chunk-2R7WQPXX.js.map → chunk-HR2VHGJ5.js.map} +0 -0
  149. /package/dist/esm/{chunk-3UIODOPE.js.map → chunk-J54GYD7A.js.map} +0 -0
  150. /package/dist/esm/{chunk-DSM5SUH3.js.map → chunk-JKQN6QCP.js.map} +0 -0
  151. /package/dist/esm/{chunk-R7YHDIFM.js.map → chunk-K3GDM26A.js.map} +0 -0
  152. /package/dist/esm/{chunk-CGFLZ3DC.js.map → chunk-KJZSXLIX.js.map} +0 -0
  153. /package/dist/esm/{chunk-KLYI5E6F.js.map → chunk-LABMK6Q7.js.map} +0 -0
  154. /package/dist/esm/{chunk-OLWUS7PC.js.map → chunk-MJKVVGGV.js.map} +0 -0
  155. /package/dist/esm/{chunk-Z5W4ACO2.js.map → chunk-MMDZBPSX.js.map} +0 -0
  156. /package/dist/esm/{chunk-ZIAA2C4H.js.map → chunk-REORAMUH.js.map} +0 -0
  157. /package/dist/esm/{chunk-MCHK36NI.js.map → chunk-SUQJ7DD4.js.map} +0 -0
  158. /package/dist/esm/{chunk-OUOP6Q3Z.js.map → chunk-VQDCHBZR.js.map} +0 -0
  159. /package/dist/esm/{chunk-2NWHEGKZ.js.map → chunk-WAXRIARV.js.map} +0 -0
  160. /package/dist/esm/{chunk-4CIQRUYW.js.map → chunk-ZOUIIO4C.js.map} +0 -0
package/components.css CHANGED
@@ -11612,6 +11612,7 @@
11612
11612
  .kui-ShellRoot {
11613
11613
  --shell-inset-gap: var(--space-3);
11614
11614
  --shell-rail-offset: 0px;
11615
+ --kui-shell-page-top: 0px;
11615
11616
  display: grid;
11616
11617
  grid-template-areas: 'header header header header header' 'rail panel sidebar content inspector' 'bottom bottom bottom bottom bottom';
11617
11618
  grid-template-columns: auto auto auto minmax(0, 1fr) auto;
@@ -11629,6 +11630,9 @@
11629
11630
  height: 100dvh;
11630
11631
  }
11631
11632
  }
11633
+ .kui-ShellRoot[data-contained] {
11634
+ height: 100%;
11635
+ }
11632
11636
  :root[data-kui-shell-lock] {
11633
11637
  overflow: hidden;
11634
11638
  }
@@ -11669,6 +11673,8 @@
11669
11673
  --kui-pane-band-end: initial;
11670
11674
  --kui-shell-position: initial;
11671
11675
  --kui-shell-z: initial;
11676
+ --kui-shell-pin: initial;
11677
+ --kui-shell-pin-top: initial;
11672
11678
  --kui-shell-row: initial;
11673
11679
  --kui-shell-col: initial;
11674
11680
  --kui-shell-surface: initial;
@@ -11970,6 +11976,8 @@
11970
11976
  .kui-ShellRail[data-presentation='overlay'] ~ .kui-ShellPanel[data-presentation-follows] {
11971
11977
  --kui-shell-position: absolute;
11972
11978
  --kui-shell-z: 6;
11979
+ --kui-shell-pin: fixed;
11980
+ --kui-shell-pin-top: 0px;
11973
11981
  --kui-shell-row: 1 / -1;
11974
11982
  --kui-shell-col: 1 / -1;
11975
11983
  --kui-shell-surface: var(--color-surface);
@@ -11983,6 +11991,8 @@
11983
11991
  .kui-ShellRail[data-presentation='stacked'] ~ .kui-ShellPanel[data-presentation-follows] {
11984
11992
  --kui-shell-position: absolute;
11985
11993
  --kui-shell-z: 3;
11994
+ --kui-shell-pin: fixed;
11995
+ --kui-shell-pin-top: initial;
11986
11996
  --kui-shell-row: 2 / 3;
11987
11997
  --kui-shell-col: 1 / -1;
11988
11998
  --kui-shell-surface: var(--color-surface);
@@ -11999,6 +12009,8 @@
11999
12009
  .kui-ShellRail[data-presentation-initial='fixed'] ~ .kui-ShellPanel[data-presentation-follows] {
12000
12010
  --kui-shell-position: initial;
12001
12011
  --kui-shell-z: initial;
12012
+ --kui-shell-pin: initial;
12013
+ --kui-shell-pin-top: initial;
12002
12014
  --kui-shell-row: initial;
12003
12015
  --kui-shell-col: initial;
12004
12016
  --kui-shell-surface: initial;
@@ -12012,6 +12024,8 @@
12012
12024
  .kui-ShellRail[data-presentation-initial='overlay'] ~ .kui-ShellPanel[data-presentation-follows] {
12013
12025
  --kui-shell-position: absolute;
12014
12026
  --kui-shell-z: 6;
12027
+ --kui-shell-pin: fixed;
12028
+ --kui-shell-pin-top: 0px;
12015
12029
  --kui-shell-row: 1 / -1;
12016
12030
  --kui-shell-col: 1 / -1;
12017
12031
  --kui-shell-surface: var(--color-surface);
@@ -12025,6 +12039,8 @@
12025
12039
  .kui-ShellRail[data-presentation-initial='stacked'] ~ .kui-ShellPanel[data-presentation-follows] {
12026
12040
  --kui-shell-position: absolute;
12027
12041
  --kui-shell-z: 3;
12042
+ --kui-shell-pin: fixed;
12043
+ --kui-shell-pin-top: initial;
12028
12044
  --kui-shell-row: 2 / 3;
12029
12045
  --kui-shell-col: 1 / -1;
12030
12046
  --kui-shell-surface: var(--color-surface);
@@ -12050,6 +12066,8 @@
12050
12066
  .kui-ShellRail[data-presentation-xs='fixed'] ~ .kui-ShellPanel[data-presentation-follows] {
12051
12067
  --kui-shell-position: initial;
12052
12068
  --kui-shell-z: initial;
12069
+ --kui-shell-pin: initial;
12070
+ --kui-shell-pin-top: initial;
12053
12071
  --kui-shell-row: initial;
12054
12072
  --kui-shell-col: initial;
12055
12073
  --kui-shell-surface: initial;
@@ -12063,6 +12081,8 @@
12063
12081
  .kui-ShellRail[data-presentation-xs='overlay'] ~ .kui-ShellPanel[data-presentation-follows] {
12064
12082
  --kui-shell-position: absolute;
12065
12083
  --kui-shell-z: 6;
12084
+ --kui-shell-pin: fixed;
12085
+ --kui-shell-pin-top: 0px;
12066
12086
  --kui-shell-row: 1 / -1;
12067
12087
  --kui-shell-col: 1 / -1;
12068
12088
  --kui-shell-surface: var(--color-surface);
@@ -12076,6 +12096,8 @@
12076
12096
  .kui-ShellRail[data-presentation-xs='stacked'] ~ .kui-ShellPanel[data-presentation-follows] {
12077
12097
  --kui-shell-position: absolute;
12078
12098
  --kui-shell-z: 3;
12099
+ --kui-shell-pin: fixed;
12100
+ --kui-shell-pin-top: initial;
12079
12101
  --kui-shell-row: 2 / 3;
12080
12102
  --kui-shell-col: 1 / -1;
12081
12103
  --kui-shell-surface: var(--color-surface);
@@ -12102,6 +12124,8 @@
12102
12124
  .kui-ShellRail[data-presentation-sm='fixed'] ~ .kui-ShellPanel[data-presentation-follows] {
12103
12125
  --kui-shell-position: initial;
12104
12126
  --kui-shell-z: initial;
12127
+ --kui-shell-pin: initial;
12128
+ --kui-shell-pin-top: initial;
12105
12129
  --kui-shell-row: initial;
12106
12130
  --kui-shell-col: initial;
12107
12131
  --kui-shell-surface: initial;
@@ -12115,6 +12139,8 @@
12115
12139
  .kui-ShellRail[data-presentation-sm='overlay'] ~ .kui-ShellPanel[data-presentation-follows] {
12116
12140
  --kui-shell-position: absolute;
12117
12141
  --kui-shell-z: 6;
12142
+ --kui-shell-pin: fixed;
12143
+ --kui-shell-pin-top: 0px;
12118
12144
  --kui-shell-row: 1 / -1;
12119
12145
  --kui-shell-col: 1 / -1;
12120
12146
  --kui-shell-surface: var(--color-surface);
@@ -12128,6 +12154,8 @@
12128
12154
  .kui-ShellRail[data-presentation-sm='stacked'] ~ .kui-ShellPanel[data-presentation-follows] {
12129
12155
  --kui-shell-position: absolute;
12130
12156
  --kui-shell-z: 3;
12157
+ --kui-shell-pin: fixed;
12158
+ --kui-shell-pin-top: initial;
12131
12159
  --kui-shell-row: 2 / 3;
12132
12160
  --kui-shell-col: 1 / -1;
12133
12161
  --kui-shell-surface: var(--color-surface);
@@ -12154,6 +12182,8 @@
12154
12182
  .kui-ShellRail[data-presentation-md='fixed'] ~ .kui-ShellPanel[data-presentation-follows] {
12155
12183
  --kui-shell-position: initial;
12156
12184
  --kui-shell-z: initial;
12185
+ --kui-shell-pin: initial;
12186
+ --kui-shell-pin-top: initial;
12157
12187
  --kui-shell-row: initial;
12158
12188
  --kui-shell-col: initial;
12159
12189
  --kui-shell-surface: initial;
@@ -12167,6 +12197,8 @@
12167
12197
  .kui-ShellRail[data-presentation-md='overlay'] ~ .kui-ShellPanel[data-presentation-follows] {
12168
12198
  --kui-shell-position: absolute;
12169
12199
  --kui-shell-z: 6;
12200
+ --kui-shell-pin: fixed;
12201
+ --kui-shell-pin-top: 0px;
12170
12202
  --kui-shell-row: 1 / -1;
12171
12203
  --kui-shell-col: 1 / -1;
12172
12204
  --kui-shell-surface: var(--color-surface);
@@ -12180,6 +12212,8 @@
12180
12212
  .kui-ShellRail[data-presentation-md='stacked'] ~ .kui-ShellPanel[data-presentation-follows] {
12181
12213
  --kui-shell-position: absolute;
12182
12214
  --kui-shell-z: 3;
12215
+ --kui-shell-pin: fixed;
12216
+ --kui-shell-pin-top: initial;
12183
12217
  --kui-shell-row: 2 / 3;
12184
12218
  --kui-shell-col: 1 / -1;
12185
12219
  --kui-shell-surface: var(--color-surface);
@@ -12206,6 +12240,8 @@
12206
12240
  .kui-ShellRail[data-presentation-lg='fixed'] ~ .kui-ShellPanel[data-presentation-follows] {
12207
12241
  --kui-shell-position: initial;
12208
12242
  --kui-shell-z: initial;
12243
+ --kui-shell-pin: initial;
12244
+ --kui-shell-pin-top: initial;
12209
12245
  --kui-shell-row: initial;
12210
12246
  --kui-shell-col: initial;
12211
12247
  --kui-shell-surface: initial;
@@ -12219,6 +12255,8 @@
12219
12255
  .kui-ShellRail[data-presentation-lg='overlay'] ~ .kui-ShellPanel[data-presentation-follows] {
12220
12256
  --kui-shell-position: absolute;
12221
12257
  --kui-shell-z: 6;
12258
+ --kui-shell-pin: fixed;
12259
+ --kui-shell-pin-top: 0px;
12222
12260
  --kui-shell-row: 1 / -1;
12223
12261
  --kui-shell-col: 1 / -1;
12224
12262
  --kui-shell-surface: var(--color-surface);
@@ -12232,6 +12270,8 @@
12232
12270
  .kui-ShellRail[data-presentation-lg='stacked'] ~ .kui-ShellPanel[data-presentation-follows] {
12233
12271
  --kui-shell-position: absolute;
12234
12272
  --kui-shell-z: 3;
12273
+ --kui-shell-pin: fixed;
12274
+ --kui-shell-pin-top: initial;
12235
12275
  --kui-shell-row: 2 / 3;
12236
12276
  --kui-shell-col: 1 / -1;
12237
12277
  --kui-shell-surface: var(--color-surface);
@@ -12258,6 +12298,8 @@
12258
12298
  .kui-ShellRail[data-presentation-xl='fixed'] ~ .kui-ShellPanel[data-presentation-follows] {
12259
12299
  --kui-shell-position: initial;
12260
12300
  --kui-shell-z: initial;
12301
+ --kui-shell-pin: initial;
12302
+ --kui-shell-pin-top: initial;
12261
12303
  --kui-shell-row: initial;
12262
12304
  --kui-shell-col: initial;
12263
12305
  --kui-shell-surface: initial;
@@ -12271,6 +12313,8 @@
12271
12313
  .kui-ShellRail[data-presentation-xl='overlay'] ~ .kui-ShellPanel[data-presentation-follows] {
12272
12314
  --kui-shell-position: absolute;
12273
12315
  --kui-shell-z: 6;
12316
+ --kui-shell-pin: fixed;
12317
+ --kui-shell-pin-top: 0px;
12274
12318
  --kui-shell-row: 1 / -1;
12275
12319
  --kui-shell-col: 1 / -1;
12276
12320
  --kui-shell-surface: var(--color-surface);
@@ -12284,6 +12328,8 @@
12284
12328
  .kui-ShellRail[data-presentation-xl='stacked'] ~ .kui-ShellPanel[data-presentation-follows] {
12285
12329
  --kui-shell-position: absolute;
12286
12330
  --kui-shell-z: 3;
12331
+ --kui-shell-pin: fixed;
12332
+ --kui-shell-pin-top: initial;
12287
12333
  --kui-shell-row: 2 / 3;
12288
12334
  --kui-shell-col: 1 / -1;
12289
12335
  --kui-shell-surface: var(--color-surface);
@@ -12309,6 +12355,8 @@
12309
12355
  .kui-ShellRail ~ .kui-ShellPanel[data-presentation-follows][data-peek][data-state] {
12310
12356
  --kui-shell-position: absolute;
12311
12357
  --kui-shell-z: 4;
12358
+ --kui-shell-pin: fixed;
12359
+ --kui-shell-pin-top: initial;
12312
12360
  --kui-shell-row: 2 / 3;
12313
12361
  --kui-shell-col: 1 / -1;
12314
12362
  --kui-shell-surface: var(--color-surface);
@@ -12382,6 +12430,96 @@
12382
12430
  -webkit-margin-before: 0;
12383
12431
  margin-block-start: 0;
12384
12432
  }
12433
+ @media (max-width: 767.98px) and (pointer: coarse) {
12434
+ .kui-ShellRoot[data-window] {
12435
+ height: auto;
12436
+ min-height: 100vh;
12437
+ overflow: clip;
12438
+ }
12439
+ @supports (height: 100dvh) {
12440
+ .kui-ShellRoot[data-window] {
12441
+ min-height: 100dvh;
12442
+ }
12443
+ }
12444
+ .kui-ShellRoot[data-window]:has(> .kui-ShellHeader) {
12445
+ --kui-shell-page-top: var(--kui-shell-header-h, 64px);
12446
+ }
12447
+ .kui-ShellRoot[data-window] > .kui-ShellHeader {
12448
+ position: sticky;
12449
+ top: 0;
12450
+ }
12451
+ .kui-ShellRoot[data-window] > .kui-ShellContent {
12452
+ overflow: clip;
12453
+ isolation: isolate;
12454
+ }
12455
+ .kui-ShellRoot[data-window] > .kui-ShellContent :where(*) {
12456
+ scroll-margin-block: calc(var(--kui-shell-page-top) + var(--kui-content-float-start, 0px)) var(--kui-content-float-end, 0px);
12457
+ }
12458
+ .kui-ShellRoot[data-window] > .kui-ShellContent:has(> .kui-ShellPaneHeader[data-float]) {
12459
+ --kui-content-float-start: calc(max(var(--kui-pane-row-start), var(--kui-pane-band-start, 0px)) + 2 * var(--kui-pane-pad-start));
12460
+ }
12461
+ .kui-ShellRoot[data-window] > .kui-ShellContent:has(> .kui-ShellPaneFooter[data-float]) {
12462
+ --kui-content-float-end: calc(max(var(--kui-pane-row-end), var(--kui-pane-band-end, 0px)) + 2 * var(--kui-pane-pad-end));
12463
+ }
12464
+ .kui-ShellRoot[data-window] > .kui-ShellContent > .kui-ShellScroll {
12465
+ -webkit-box-flex: 0;
12466
+ -ms-flex: none;
12467
+ flex: none;
12468
+ height: auto;
12469
+ overflow: clip;
12470
+ }
12471
+ .kui-ShellRoot[data-window] > .kui-ShellContent > .kui-ShellScroll > .kui-ScrollAreaViewport {
12472
+ height: auto;
12473
+ overflow: visible !important;
12474
+ -webkit-mask-image: none;
12475
+ mask-image: none;
12476
+ }
12477
+ .kui-ShellRoot[data-window] > .kui-ShellContent > .kui-ShellScroll > .kui-ScrollAreaScrollbar {
12478
+ display: none;
12479
+ }
12480
+ .kui-ShellRoot[data-window] > .kui-ShellContent:has(> .kui-ShellScroll) > .kui-ShellPaneHeader[data-float] {
12481
+ position: sticky;
12482
+ top: var(--kui-shell-page-top);
12483
+ -webkit-box-ordinal-group: 0;
12484
+ -ms-flex-order: -1;
12485
+ order: -1;
12486
+ margin-bottom: calc(-1 * var(--kui-content-float-start, 0px));
12487
+ }
12488
+ .kui-ShellRoot[data-window] > .kui-ShellContent:has(> .kui-ShellScroll) > .kui-ShellPaneFooter[data-float] {
12489
+ position: sticky;
12490
+ bottom: 0;
12491
+ -webkit-box-ordinal-group: 2;
12492
+ -ms-flex-order: 1;
12493
+ order: 1;
12494
+ margin-top: calc(-1 * var(--kui-content-float-end, 0px));
12495
+ }
12496
+ .kui-ShellRoot[data-window] > .kui-ShellContent > :not(.kui-ShellScroll, [data-float]):has(~ .kui-ShellScroll) {
12497
+ position: sticky;
12498
+ top: var(--kui-shell-page-top);
12499
+ z-index: 1;
12500
+ }
12501
+ .kui-ShellRoot[data-window] > .kui-ShellContent > .kui-ShellScroll ~ :not([data-float]) {
12502
+ position: sticky;
12503
+ bottom: 0;
12504
+ z-index: 1;
12505
+ }
12506
+ .kui-ShellRoot[data-window] > :is(.kui-ShellRail, .kui-ShellPanel, .kui-ShellSidebar, .kui-ShellInspector) {
12507
+ position: var(--kui-shell-pin, sticky);
12508
+ top: var(--kui-shell-pin-top, var(--kui-shell-page-top));
12509
+ block-size: calc(100vh - var(--kui-shell-pin-top, var(--kui-shell-page-top)));
12510
+ }
12511
+ @supports (height: 100dvh) {
12512
+ .kui-ShellRoot[data-window] > :is(.kui-ShellRail, .kui-ShellPanel, .kui-ShellSidebar, .kui-ShellInspector) {
12513
+ block-size: calc(100dvh - var(--kui-shell-pin-top, var(--kui-shell-page-top)));
12514
+ }
12515
+ }
12516
+ .kui-ShellRoot[data-window] > .kui-ShellBottom {
12517
+ position: var(--kui-shell-pin, sticky);
12518
+ }
12519
+ .kui-ShellRoot[data-window] > .kui-ShellScrim {
12520
+ position: fixed;
12521
+ }
12522
+ }
12385
12523
  .kui-ShellResizer {
12386
12524
  position: absolute;
12387
12525
  z-index: 1;
@@ -26,6 +26,12 @@ declare const ShellSizeContext: React.Context<PaneSize>;
26
26
  * page, not a menu, so it takes none of the menu's padding, gap or layering.
27
27
  */
28
28
  declare const ShellContentContext: React.Context<boolean>;
29
+ /**
30
+ * True inside a window Shell: one with no `contained` and no `height`, which lets the page scroll
31
+ * on a narrow touch screen. Each `Shell.Root` sets its own, so a Shell nested in another answers
32
+ * for itself.
33
+ */
34
+ declare const ShellWindowContext: React.Context<boolean>;
29
35
  /**
30
36
  * Gives a Shell pane's children the Shell's index, so Sidebar parts size themselves. In a Rail
31
37
  * the rows are `thin`: icon tiles with a small label, sub-menus as dropdowns.
@@ -82,6 +88,6 @@ interface ScrollProps extends React.ComponentPropsWithoutRef<'div'> {
82
88
  * already a navigation landmark, so it needs no role of its own.
83
89
  */
84
90
  declare const Scroll: React.ForwardRefExoticComponent<ScrollProps & React.RefAttributes<HTMLDivElement>>;
85
- export { SidebarVisualContext, useSidebarVisual, ShellSizeContext, ShellContentContext, PaneChromeScope, PaneHeader, PaneFooter, Scroll, BAND_STEP, usePaneBandSize };
91
+ export { SidebarVisualContext, useSidebarVisual, ShellSizeContext, ShellContentContext, ShellWindowContext, PaneChromeScope, PaneHeader, PaneFooter, Scroll, BAND_STEP, usePaneBandSize };
86
92
  export type { SidebarVisualContextValue, PaneSize, BandSize, PaneHeaderProps, PaneFooterProps, ScrollProps };
87
93
  //# sourceMappingURL=pane-chrome.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pane-chrome.d.ts","sourceRoot":"","sources":["../../../../src/components/_internal/pane-chrome.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAuB,KAAK,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAE5E,KAAK,QAAQ,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AAEhC,KAAK,yBAAyB,GAAG;IAC/B,IAAI,EAAE,QAAQ,CAAC;IACf,WAAW,EAAE,OAAO,GAAG,MAAM,CAAC;IAC9B,YAAY,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,2FAA2F;AAC3F,QAAA,MAAM,oBAAoB,iDAA8D,CAAC;AAEzF,iBAAS,gBAAgB,qCAExB;AAED,mFAAmF;AACnF,QAAA,MAAM,gBAAgB,yBAAqC,CAAC;AAE5D;;;;GAIG;AACH,QAAA,MAAM,mBAAmB,wBAA6B,CAAC;AAEvD;;;GAGG;AACH,iBAAS,eAAe,CAAC,EAAE,QAAQ,EAAE,YAAY,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,qBAIxG;AAWD;;;GAGG;AACH,QAAA,MAAM,SAAS;;;;;CAA2F,CAAC;AAQ3G;;;;;;;GAOG;AACH,iBAAS,eAAe,IAAI,QAAQ,GAAG,IAAI,CAM1C;AAED,UAAU,eAAgB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC;IACrE;;;;;OAKG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,8DAA8D;AAC9D,QAAA,MAAM,UAAU,wFAad,CAAC;AAGH,UAAU,eAAgB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC;IACrE,0GAA0G;IAC1G,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,8DAA8D;AAC9D,QAAA,MAAM,UAAU,wFAad,CAAC;AAGH,UAAU,WAAY,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC;IACjE,kGAAkG;IAClG,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED;;;;;;GAMG;AACH,QAAA,MAAM,MAAM,oFAyBV,CAAC;AAGH,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,eAAe,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC;AACtK,YAAY,EAAE,yBAAyB,EAAE,QAAQ,EAAE,QAAQ,EAAE,eAAe,EAAE,eAAe,EAAE,WAAW,EAAE,CAAC"}
1
+ {"version":3,"file":"pane-chrome.d.ts","sourceRoot":"","sources":["../../../../src/components/_internal/pane-chrome.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAuB,KAAK,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAG5E,KAAK,QAAQ,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AAEhC,KAAK,yBAAyB,GAAG;IAC/B,IAAI,EAAE,QAAQ,CAAC;IACf,WAAW,EAAE,OAAO,GAAG,MAAM,CAAC;IAC9B,YAAY,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,2FAA2F;AAC3F,QAAA,MAAM,oBAAoB,iDAA8D,CAAC;AAEzF,iBAAS,gBAAgB,qCAExB;AAED,mFAAmF;AACnF,QAAA,MAAM,gBAAgB,yBAAqC,CAAC;AAE5D;;;;GAIG;AACH,QAAA,MAAM,mBAAmB,wBAA6B,CAAC;AAEvD;;;;GAIG;AACH,QAAA,MAAM,kBAAkB,wBAA6B,CAAC;AAEtD;;;GAGG;AACH,iBAAS,eAAe,CAAC,EAAE,QAAQ,EAAE,YAAY,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,qBAIxG;AAWD;;;GAGG;AACH,QAAA,MAAM,SAAS;;;;;CAA2F,CAAC;AAQ3G;;;;;;;GAOG;AACH,iBAAS,eAAe,IAAI,QAAQ,GAAG,IAAI,CAM1C;AAED,UAAU,eAAgB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC;IACrE;;;;;OAKG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,8DAA8D;AAC9D,QAAA,MAAM,UAAU,wFAad,CAAC;AAGH,UAAU,eAAgB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC;IACrE,0GAA0G;IAC1G,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,8DAA8D;AAC9D,QAAA,MAAM,UAAU,wFAad,CAAC;AAGH,UAAU,WAAY,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC;IACjE,kGAAkG;IAClG,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED;;;;;;GAMG;AACH,QAAA,MAAM,MAAM,oFA8BV,CAAC;AAGH,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,eAAe,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC;AAC1L,YAAY,EAAE,yBAAyB,EAAE,QAAQ,EAAE,QAAQ,EAAE,eAAe,EAAE,eAAe,EAAE,WAAW,EAAE,CAAC"}
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- "use strict";"use client";var Pe=Object.create;var R=Object.defineProperty;var Se=Object.getOwnPropertyDescriptor;var ge=Object.getOwnPropertyNames;var he=Object.getPrototypeOf,ve=Object.prototype.hasOwnProperty;var Re=(t,e)=>{for(var r in e)R(t,r,{get:e[r],enumerable:!0})},W=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of ge(e))!ve.call(t,s)&&s!==r&&R(t,s,{get:()=>e[s],enumerable:!(n=Se(e,s))||n.enumerable});return t};var m=(t,e,r)=>(r=t!=null?Pe(he(t)):{},W(e||!t||!t.__esModule?R(r,"default",{value:t,enumerable:!0}):r,t)),be=t=>W(R({},"__esModule",{value:!0}),t);var Le={};Re(Le,{BAND_STEP:()=>se,PaneChromeScope:()=>He,PaneFooter:()=>ae,PaneHeader:()=>ie,Scroll:()=>le,ShellContentContext:()=>oe,ShellSizeContext:()=>w,SidebarVisualContext:()=>B,usePaneBandSize:()=>We,useSidebarVisual:()=>k});module.exports=be(Le);var c=m(require("react")),v=m(require("classnames"));var d=m(require("react")),Q=m(require("classnames")),P=require("radix-ui"),Z=require("radix-ui/internal");var L={asChild:{type:"boolean"}};var xe=["none","small","medium","large","full"],$={radius:{type:"enum",values:xe,default:void 0}};var De=["vertical","horizontal","both"],b={...L,...$,scrollbars:{type:"enum",values:De,default:"both"},fade:{type:"boolean",default:!1}};var x=m(require("react"));function V(t){let e=getComputedStyle(t);return{x:e.overflowX==="hidden"?0:Math.max(0,t.scrollWidth-t.clientWidth),y:e.overflowY==="hidden"?0:Math.max(0,t.scrollHeight-t.clientHeight)}}function j(t){let[e,r]=x.useState(null);return x.useEffect(()=>{if(!t||!e)return;let n=0,s=()=>{n=0;let l=V(e),a=Math.max(0,e.scrollTop),u=Math.max(0,l.y-e.scrollTop);e.style.setProperty("--scroll-overflow-start",`${a}px`),e.style.setProperty("--scroll-overflow-end",`${u}px`);let f=Math.abs(e.scrollLeft),y=Math.max(0,l.x-f);e.style.setProperty("--scroll-overflow-x-start",`${f}px`),e.style.setProperty("--scroll-overflow-x-end",`${y}px`)},i=()=>{n||(n=requestAnimationFrame(s))};s(),e.addEventListener("scroll",i,{passive:!0});let o=typeof ResizeObserver>"u"?null:new ResizeObserver(i);o?.observe(e);for(let l of Array.from(e.children))o?.observe(l);let p=typeof MutationObserver>"u"?null:new MutationObserver(i);return p?.observe(e,{childList:!0}),()=>{n&&cancelAnimationFrame(n),e.removeEventListener("scroll",i),o?.disconnect(),p?.disconnect(),e.style.removeProperty("--scroll-overflow-start"),e.style.removeProperty("--scroll-overflow-end"),e.style.removeProperty("--scroll-overflow-x-start"),e.style.removeProperty("--scroll-overflow-x-end")}},[t,e]),r}var D=m(require("react"));function F(){let[t,e]=D.useState(null);return D.useEffect(()=>{let r=t?.parentElement;if(!t||!r)return;let n=0,s=()=>{n=0;for(let o of r.querySelectorAll(":scope > .kui-ScrollAreaScrollbar > .kui-ScrollAreaThumb")){let p=o.parentElement,l=getComputedStyle(p);if(p.dataset.orientation==="horizontal"){let a=p.clientWidth-parseFloat(l.paddingLeft)-parseFloat(l.paddingRight),u=I(t.scrollLeft,t.scrollWidth-t.offsetWidth,a-o.offsetWidth);o.style.transform=`translate3d(${u}px, 0, 0)`}else{let a=p.clientHeight-parseFloat(l.paddingTop)-parseFloat(l.paddingBottom),u=I(t.scrollTop,t.scrollHeight-t.offsetHeight,a-o.offsetHeight);o.style.transform=`translate3d(0, ${u}px, 0)`}}},i=()=>{n||(n=requestAnimationFrame(s))};return t.addEventListener("scroll",i,{passive:!0}),()=>{n&&cancelAnimationFrame(n),t.removeEventListener("scroll",i)}},[t]),e}function I(t,e,r){return e<=0||r<=0?0:Math.min(Math.max(t,-e),e)/e*r}var T=m(require("react"));function G(t,e){let{asChild:r,children:n}=t;if(!r)return typeof e=="function"?e(n):e;let s=T.Children.only(n);return T.cloneElement(s,{children:typeof e=="function"?e(s.props.children):e})}var U=m(require("classnames"));var Te=[],Ce=new Set;function Ne(t){let e=Object.assign({},...t),r=[],n=[],s=new Set;for(let i in e){let o=e[i],p=o.values??Te,l={key:i,type:o.type,default:o.default,hasDefault:o.default!==void 0,responsive:"responsive"in o,className:o.className,customProperties:o.customProperties,parseValue:o.parseValue,values:p,valueSet:p.length>0?new Set(p):Ce,enumValueSet:o.type==="enum"?new Set([o.default,...p]):void 0};o.className?(r.push(l),s.add(i)):(l.hasDefault||o.type==="enum")&&n.push(l)}return{styling:r,passthrough:n,stylingKeys:s}}var ke={children:new WeakMap};function K(t){let e=ke;for(let r=0;r<t.length;r++){let n=t[r],s=e.children.get(n);s===void 0&&(s={children:new WeakMap},e.children.set(n,s)),e=s}return e.compiled??(e.compiled=Ne(t))}var we=["initial","xs","sm","md","lg","xl"],E=new Set(we);function A(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var Ve=new Set(["initial","xs","sm","md","lg","xl"]);function S(t){if(typeof t!="object"||t===null)return!1;for(let e in t)if(Ve.has(e))return!0;return!1}function C(t,e,r){return e!==void 0?e.has(r):t.includes(r)}function q({className:t,customProperties:e,...r}){let n=z({allowArbitraryValues:!0,className:t,...r}),s=Ee({customProperties:e,...r});return[n,s]}function z({allowArbitraryValues:t,value:e,className:r,propValues:n,propValueSet:s,parseValue:i=o=>o}){if(e){if(typeof e=="string")return C(n,s,e)?_(r,e,i):t?r:void 0;if(S(e)){let o=e,p=[];for(let l in o){if(!A(o,l)||!E.has(l))continue;let a=o[l];if(a!==void 0){if(C(n,s,a)){let u=_(r,a,i),f=l==="initial"?u:`${l}:${u}`;p.push(f)}else if(t){let u=l==="initial"?r:`${l}:${r}`;p.push(u)}}}return p.length>0?p.join(" "):""}if(t)return r}}function _(t,e,r){let n=t?"-":"",s=r(e),i=s?.startsWith("-"),o=i?"-":"",p=i?s?.substring(1):s;return`${o}${t}${n}${p}`}function Ee({customProperties:t,value:e,propValues:r,propValueSet:n,parseValue:s=i=>i}){if(!e||typeof e=="string"&&C(r,n,e))return;let i;if(typeof e=="string"){let o=s(e);i={};for(let p of t)i[p]=o;return i}if(S(e)){let o=e;for(let p in o){if(!A(o,p)||!E.has(p))continue;let l=o[p];if(l===void 0||C(r,n,l))continue;let a=s(l);i??(i={});for(let u of t){let f=p==="initial"?u:`${u}-${p}`;i[f]=a}}}return i??{}}function O(...t){let e;for(let r of t)r&&(e===void 0&&(e={}),Object.assign(e,r));return e}function Ae(t,e){let r=t.initial,n=!1;return e.hasDefault&&r===void 0&&(r=e.default,n=!0),e.enumValueSet!==void 0&&!e.enumValueSet.has(r)&&(r=e.default,n=!0),n?{...t,initial:r}:t}function Y(t,...e){let{styling:r,passthrough:n,stylingKeys:s}=K(e),i={};for(let l in t)s.has(l)||(i[l]=t[l]);for(let l=0;l<n.length;l++){let a=n[l],u=i[a.key];if(u===void 0){a.hasDefault&&(i[a.key]=a.default);continue}a.enumValueSet!==void 0&&!a.enumValueSet.has(u)&&!S(u)&&(i[a.key]=a.default)}let o,p=[];for(let l=0;l<r.length;l++){let a=r[l],u=t[a.key];if(u===void 0&&a.hasDefault&&(u=a.default),a.enumValueSet!==void 0&&!a.enumValueSet.has(u)&&!S(u)&&(u=a.default),!!u){if(S(u)){if(!a.responsive)continue;u=Ae(u,a)}if(a.type==="enum"){let f=z({allowArbitraryValues:!1,value:u,className:a.className,propValues:a.values,propValueSet:a.valueSet,parseValue:a.parseValue});f&&p.push(f);continue}if(a.type==="string"||a.type==="enum | string"){let[f,y]=q({className:a.className,customProperties:a.customProperties,propValues:a.type==="string"?[]:a.values,propValueSet:a.type==="string"?void 0:a.valueSet,parseValue:a.parseValue,value:u});y&&(o=O(o,y)),f&&p.push(f);continue}if(a.type==="boolean"){p.push(a.className);continue}}}return i.className=(0,U.default)(p.length>0?p.join(" "):void 0,t.className),i.style=O(o,t.style),i}var X={width:{type:"string",className:"kui-r-w",customProperties:["--width"],responsive:!0},minWidth:{type:"string",className:"kui-r-min-w",customProperties:["--min-width"],responsive:!0},maxWidth:{type:"string",className:"kui-r-max-w",customProperties:["--max-width"],responsive:!0}};var J={height:{type:"string",className:"kui-r-h",customProperties:["--height"],responsive:!0},minHeight:{type:"string",className:"kui-r-min-h",customProperties:["--min-height"],responsive:!0},maxHeight:{type:"string",className:"kui-r-max-h",customProperties:["--max-height"],responsive:!0}};var ze='[role="menu"], [role="listbox"]';function Oe(t,e){d.useEffect(()=>{if(!e||!t||t.closest(ze))return;let r=0,n=()=>{r=0;let o=V(t);o.x>0||o.y>0?t.setAttribute("tabindex","0"):t.removeAttribute("tabindex")},s=()=>{r||(r=requestAnimationFrame(n))};n();let i=typeof ResizeObserver>"u"?null:new ResizeObserver(s);i?.observe(t);for(let o of Array.from(t.children))i?.observe(o);return()=>{r&&cancelAnimationFrame(r),i?.disconnect()}},[t,e])}var N=d.forwardRef((t,e)=>{let{asChild:r,children:n,className:s,style:i,type:o,scrollHideDelay:p=o!=="scroll"?0:void 0,dir:l,radius:a=b.radius.default,scrollbars:u=b.scrollbars.default,fade:f=b.fade.default,...y}=Y(t,X,J),[pe,ue]=d.useState(null),ce=j(f),de=F(),fe=(0,Z.useComposedRefs)(e,ce,de,ue);Oe(pe,y.tabIndex===void 0);let me=y["aria-label"]!==void 0||y["aria-labelledby"]!==void 0;return d.createElement(P.ScrollArea.Root,{type:o,scrollHideDelay:p,dir:l,className:(0,Q.default)("kui-ScrollAreaRoot",s),"data-fade":f?"":void 0,style:i,asChild:r},G({asChild:r,children:n},ye=>d.createElement(d.Fragment,null,d.createElement(P.ScrollArea.Viewport,{role:me?"region":void 0,...y,ref:fe,className:"kui-ScrollAreaViewport"},ye),d.createElement("div",{className:"kui-ScrollAreaViewportFocusRing"}),u!=="vertical"?d.createElement(P.ScrollArea.Scrollbar,{"data-radius":a,orientation:"horizontal",className:"kui-ScrollAreaScrollbar"},d.createElement(P.ScrollArea.Thumb,{className:"kui-ScrollAreaThumb"})):null,u!=="horizontal"?d.createElement(P.ScrollArea.Scrollbar,{"data-radius":a,orientation:"vertical",className:"kui-ScrollAreaScrollbar"},d.createElement(P.ScrollArea.Thumb,{className:"kui-ScrollAreaThumb"})):null,u==="both"?d.createElement(P.ScrollArea.Corner,{className:"kui-ScrollAreaCorner"}):null)))});N.displayName="ScrollArea";var g=m(require("react")),Be=require("radix-ui/internal");var ee=["initial","xs","sm","md","lg","xl"];function te(t){return typeof t=="object"&&t!==null}function Me(t,e){let r={},n=null;for(let s of ee){if(t!==void 0&&!te(t)){r[s]=t;continue}let i=te(t)?t[s]:void 0;i!==void 0&&(n={value:i}),r[s]=n?n.value:e(s)}return r}var Rt=Me("fixed",()=>"fixed");var re=g.createContext(null);var bt=g.createContext(null);var ne=m(require("react")),h=ne.createContext(void 0);var B=c.createContext(null);function k(){return c.useContext(B)}var w=c.createContext("2"),oe=c.createContext(!1);function He({children:t,presentation:e}){let r=c.useContext(w),n=c.useMemo(()=>({size:r,menuVariant:"soft",presentation:e}),[r,e]);return c.createElement(B.Provider,{value:n},t)}function M(){let t=k(),e=c.useContext(w),r=t?.size??e,n=t?.menuVariant??"soft";return["kui-ShellPaneChrome",`kui-r-size-${r}`,`kui-menu-variant-${n}`]}var se={1:"2",2:"3",3:"4",4:"4"};function H(){let t=k(),e=c.useContext(w);return se[t?.size??e]}function We(){let t=c.useContext(h),e=c.useContext(re)!==null,r=H();return t!==void 0?t:e?r:null}var ie=c.forwardRef(({className:t,float:e,children:r,...n},s)=>{let i=M(),o=H();return c.createElement("div",{...n,ref:s,"data-float":e||void 0,className:(0,v.default)("kui-ShellPaneHeader","kui-SidebarHeader","kui-SidebarHeader--container",...i,t)},c.createElement(h.Provider,{value:o},r))});ie.displayName="Shell.PaneHeader";var ae=c.forwardRef(({className:t,float:e,children:r,...n},s)=>{let i=M(),o=H();return c.createElement("div",{...n,ref:s,"data-float":e||void 0,className:(0,v.default)("kui-ShellPaneFooter","kui-SidebarFooter","kui-SidebarFooter--container",...i,t)},c.createElement(h.Provider,{value:o},r))});ae.displayName="Shell.PaneFooter";var le=c.forwardRef(({className:t,style:e,dir:r,children:n,fade:s=!1,...i},o)=>{let p=M(),l=c.useContext(oe),a=k();return l&&a===null?c.createElement(N,{...i,ref:o,type:"hover",fade:s,className:"kui-ShellScroll"},c.createElement("div",{style:e,dir:r,className:(0,v.default)("kui-ShellScrollContent",t)},n)):c.createElement(N,{...i,ref:o,type:"hover",fade:s,className:"kui-ShellScroll"},c.createElement("div",{style:e,dir:r,className:(0,v.default)("kui-BaseMenuContent","kui-SidebarContent",...p,t)},c.createElement(h.Provider,{value:null},c.createElement("div",{className:"kui-BaseMenuViewport"},n))))});le.displayName="Shell.Scroll";
2
+ "use strict";"use client";var xe=Object.create;var x=Object.defineProperty;var Re=Object.getOwnPropertyDescriptor;var be=Object.getOwnPropertyNames;var De=Object.getPrototypeOf,Ce=Object.prototype.hasOwnProperty;var Te=(t,e)=>{for(var n in e)x(t,n,{get:e[n],enumerable:!0})},W=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of be(e))!Ce.call(t,i)&&i!==n&&x(t,i,{get:()=>e[i],enumerable:!(r=Re(e,i))||r.enumerable});return t};var y=(t,e,n)=>(n=t!=null?xe(De(t)):{},W(e||!t||!t.__esModule?x(n,"default",{value:t,enumerable:!0}):n,t)),Ne=t=>W(x({},"__esModule",{value:!0}),t);var Ue={};Te(Ue,{BAND_STEP:()=>ue,PaneChromeScope:()=>Ke,PaneFooter:()=>fe,PaneHeader:()=>de,Scroll:()=>me,ShellContentContext:()=>pe,ShellSizeContext:()=>k,ShellWindowContext:()=>ce,SidebarVisualContext:()=>B,usePaneBandSize:()=>_e,useSidebarVisual:()=>w});module.exports=Ne(Ue);var u=y(require("react")),v=y(require("classnames"));var d=y(require("react")),Z=y(require("classnames")),P=require("radix-ui"),ee=require("radix-ui/internal");var I={asChild:{type:"boolean"}};var we=["none","small","medium","large","full"],$={radius:{type:"enum",values:we,default:void 0}};var ke=["vertical","horizontal","both"],R={...I,...$,scrollbars:{type:"enum",values:ke,default:"both"},fade:{type:"boolean",default:!1}};var b=y(require("react"));function E(t){let e=getComputedStyle(t);return{x:e.overflowX==="hidden"?0:Math.max(0,t.scrollWidth-t.clientWidth),y:e.overflowY==="hidden"?0:Math.max(0,t.scrollHeight-t.clientHeight)}}function j(t){let[e,n]=b.useState(null);return b.useEffect(()=>{if(!t||!e)return;let r=0,i=()=>{r=0;let l=E(e),a=Math.max(0,e.scrollTop),c=Math.max(0,l.y-e.scrollTop);e.style.setProperty("--scroll-overflow-start",`${a}px`),e.style.setProperty("--scroll-overflow-end",`${c}px`);let f=Math.abs(e.scrollLeft),m=Math.max(0,l.x-f);e.style.setProperty("--scroll-overflow-x-start",`${f}px`),e.style.setProperty("--scroll-overflow-x-end",`${m}px`)},s=()=>{r||(r=requestAnimationFrame(i))};i(),e.addEventListener("scroll",s,{passive:!0});let o=typeof ResizeObserver>"u"?null:new ResizeObserver(s);o?.observe(e);for(let l of Array.from(e.children))o?.observe(l);let p=typeof MutationObserver>"u"?null:new MutationObserver(s);return p?.observe(e,{childList:!0}),()=>{r&&cancelAnimationFrame(r),e.removeEventListener("scroll",s),o?.disconnect(),p?.disconnect(),e.style.removeProperty("--scroll-overflow-start"),e.style.removeProperty("--scroll-overflow-end"),e.style.removeProperty("--scroll-overflow-x-start"),e.style.removeProperty("--scroll-overflow-x-end")}},[t,e]),n}var D=y(require("react"));function G(){let[t,e]=D.useState(null);return D.useEffect(()=>{let n=t?.parentElement;if(!t||!n)return;let r=0,i=()=>{r=0;for(let o of n.querySelectorAll(":scope > .kui-ScrollAreaScrollbar > .kui-ScrollAreaThumb")){let p=o.parentElement,l=getComputedStyle(p);if(p.dataset.orientation==="horizontal"){let a=p.clientWidth-parseFloat(l.paddingLeft)-parseFloat(l.paddingRight),c=F(t.scrollLeft,t.scrollWidth-t.offsetWidth,a-o.offsetWidth);o.style.transform=`translate3d(${c}px, 0, 0)`}else{let a=p.clientHeight-parseFloat(l.paddingTop)-parseFloat(l.paddingBottom),c=F(t.scrollTop,t.scrollHeight-t.offsetHeight,a-o.offsetHeight);o.style.transform=`translate3d(0, ${c}px, 0)`}}},s=()=>{r||(r=requestAnimationFrame(i))};return t.addEventListener("scroll",s,{passive:!0}),()=>{r&&cancelAnimationFrame(r),t.removeEventListener("scroll",s)}},[t]),e}function F(t,e,n){return e<=0||n<=0?0:Math.min(Math.max(t,-e),e)/e*n}var C=y(require("react"));function K(t,e){let{asChild:n,children:r}=t;if(!n)return typeof e=="function"?e(r):e;let i=C.Children.only(r);return C.cloneElement(i,{children:typeof e=="function"?e(i.props.children):e})}var Y=y(require("classnames"));var Ve=[],Ee=new Set;function Ae(t){let e=Object.assign({},...t),n=[],r=[],i=new Set;for(let s in e){let o=e[s],p=o.values??Ve,l={key:s,type:o.type,default:o.default,hasDefault:o.default!==void 0,responsive:"responsive"in o,className:o.className,customProperties:o.customProperties,parseValue:o.parseValue,values:p,valueSet:p.length>0?new Set(p):Ee,enumValueSet:o.type==="enum"?new Set([o.default,...p]):void 0};o.className?(n.push(l),i.add(s)):(l.hasDefault||o.type==="enum")&&r.push(l)}return{styling:n,passthrough:r,stylingKeys:i}}var ze={children:new WeakMap};function _(t){let e=ze;for(let n=0;n<t.length;n++){let r=t[n],i=e.children.get(r);i===void 0&&(i={children:new WeakMap},e.children.set(r,i)),e=i}return e.compiled??(e.compiled=Ae(t))}var Me=["initial","xs","sm","md","lg","xl"],A=new Set(Me);function z(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var Oe=new Set(["initial","xs","sm","md","lg","xl"]);function S(t){if(typeof t!="object"||t===null)return!1;for(let e in t)if(Oe.has(e))return!0;return!1}function T(t,e,n){return e!==void 0?e.has(n):t.includes(n)}function q({className:t,customProperties:e,...n}){let r=M({allowArbitraryValues:!0,className:t,...n}),i=Be({customProperties:e,...n});return[r,i]}function M({allowArbitraryValues:t,value:e,className:n,propValues:r,propValueSet:i,parseValue:s=o=>o}){if(e){if(typeof e=="string")return T(r,i,e)?U(n,e,s):t?n:void 0;if(S(e)){let o=e,p=[];for(let l in o){if(!z(o,l)||!A.has(l))continue;let a=o[l];if(a!==void 0){if(T(r,i,a)){let c=U(n,a,s),f=l==="initial"?c:`${l}:${c}`;p.push(f)}else if(t){let c=l==="initial"?n:`${l}:${n}`;p.push(c)}}}return p.length>0?p.join(" "):""}if(t)return n}}function U(t,e,n){let r=t?"-":"",i=n(e),s=i?.startsWith("-"),o=s?"-":"",p=s?i?.substring(1):i;return`${o}${t}${r}${p}`}function Be({customProperties:t,value:e,propValues:n,propValueSet:r,parseValue:i=s=>s}){if(!e||typeof e=="string"&&T(n,r,e))return;let s;if(typeof e=="string"){let o=i(e);s={};for(let p of t)s[p]=o;return s}if(S(e)){let o=e;for(let p in o){if(!z(o,p)||!A.has(p))continue;let l=o[p];if(l===void 0||T(n,r,l))continue;let a=i(l);s??(s={});for(let c of t){let f=p==="initial"?c:`${c}-${p}`;s[f]=a}}}return s??{}}function O(...t){let e;for(let n of t)n&&(e===void 0&&(e={}),Object.assign(e,n));return e}function He(t,e){let n=t.initial,r=!1;return e.hasDefault&&n===void 0&&(n=e.default,r=!0),e.enumValueSet!==void 0&&!e.enumValueSet.has(n)&&(n=e.default,r=!0),r?{...t,initial:n}:t}function Q(t,...e){let{styling:n,passthrough:r,stylingKeys:i}=_(e),s={};for(let l in t)i.has(l)||(s[l]=t[l]);for(let l=0;l<r.length;l++){let a=r[l],c=s[a.key];if(c===void 0){a.hasDefault&&(s[a.key]=a.default);continue}a.enumValueSet!==void 0&&!a.enumValueSet.has(c)&&!S(c)&&(s[a.key]=a.default)}let o,p=[];for(let l=0;l<n.length;l++){let a=n[l],c=t[a.key];if(c===void 0&&a.hasDefault&&(c=a.default),a.enumValueSet!==void 0&&!a.enumValueSet.has(c)&&!S(c)&&(c=a.default),!!c){if(S(c)){if(!a.responsive)continue;c=He(c,a)}if(a.type==="enum"){let f=M({allowArbitraryValues:!1,value:c,className:a.className,propValues:a.values,propValueSet:a.valueSet,parseValue:a.parseValue});f&&p.push(f);continue}if(a.type==="string"||a.type==="enum | string"){let[f,m]=q({className:a.className,customProperties:a.customProperties,propValues:a.type==="string"?[]:a.values,propValueSet:a.type==="string"?void 0:a.valueSet,parseValue:a.parseValue,value:c});m&&(o=O(o,m)),f&&p.push(f);continue}if(a.type==="boolean"){p.push(a.className);continue}}}return s.className=(0,Y.default)(p.length>0?p.join(" "):void 0,t.className),s.style=O(o,t.style),s}var X={width:{type:"string",className:"kui-r-w",customProperties:["--width"],responsive:!0},minWidth:{type:"string",className:"kui-r-min-w",customProperties:["--min-width"],responsive:!0},maxWidth:{type:"string",className:"kui-r-max-w",customProperties:["--max-width"],responsive:!0}};var J={height:{type:"string",className:"kui-r-h",customProperties:["--height"],responsive:!0},minHeight:{type:"string",className:"kui-r-min-h",customProperties:["--min-height"],responsive:!0},maxHeight:{type:"string",className:"kui-r-max-h",customProperties:["--max-height"],responsive:!0}};var Le='[role="menu"], [role="listbox"]';function We(t,e){d.useEffect(()=>{if(!e||!t||t.closest(Le))return;let n=0,r=()=>{n=0;let o=E(t);o.x>0||o.y>0?t.setAttribute("tabindex","0"):t.removeAttribute("tabindex")},i=()=>{n||(n=requestAnimationFrame(r))};r();let s=typeof ResizeObserver>"u"?null:new ResizeObserver(i);s?.observe(t);for(let o of Array.from(t.children))s?.observe(o);return()=>{n&&cancelAnimationFrame(n),s?.disconnect()}},[t,e])}var N=d.forwardRef((t,e)=>{let{asChild:n,children:r,className:i,style:s,type:o,scrollHideDelay:p=o!=="scroll"?0:void 0,dir:l,radius:a=R.radius.default,scrollbars:c=R.scrollbars.default,fade:f=R.fade.default,...m}=Q(t,X,J),[V,ye]=d.useState(null),Pe=j(f),Se=G(),ge=(0,ee.useComposedRefs)(e,Pe,Se,ye);We(V,m.tabIndex===void 0);let he=m["aria-label"]!==void 0||m["aria-labelledby"]!==void 0;return d.createElement(P.ScrollArea.Root,{type:o,scrollHideDelay:p,dir:l,className:(0,Z.default)("kui-ScrollAreaRoot",i),"data-fade":f?"":void 0,style:s,asChild:n},K({asChild:n,children:r},ve=>d.createElement(d.Fragment,null,d.createElement(P.ScrollArea.Viewport,{role:he?"region":void 0,...m,ref:ge,className:"kui-ScrollAreaViewport"},ve),d.createElement("div",{className:"kui-ScrollAreaViewportFocusRing"}),c!=="vertical"?d.createElement(P.ScrollArea.Scrollbar,{"data-radius":a,orientation:"horizontal",className:"kui-ScrollAreaScrollbar"},d.createElement(P.ScrollArea.Thumb,{className:"kui-ScrollAreaThumb"})):null,c!=="horizontal"?d.createElement(P.ScrollArea.Scrollbar,{"data-radius":a,orientation:"vertical",className:"kui-ScrollAreaScrollbar"},d.createElement(P.ScrollArea.Thumb,{className:"kui-ScrollAreaThumb"})):null,c==="both"?d.createElement(P.ScrollArea.Corner,{className:"kui-ScrollAreaCorner"}):null)))});N.displayName="ScrollArea";var g=y(require("react")),Ie=require("radix-ui/internal");var te=["initial","xs","sm","md","lg","xl"];function ne(t){return typeof t=="object"&&t!==null}function $e(t,e){let n={},r=null;for(let i of te){if(t!==void 0&&!ne(t)){n[i]=t;continue}let s=ne(t)?t[i]:void 0;s!==void 0&&(r={value:s}),n[i]=r?r.value:e(i)}return n}var kt=$e("fixed",()=>"fixed");var re=g.createContext(null);var Vt=g.createContext(null);var oe=y(require("react")),h=oe.createContext(void 0);var ie=y(require("react")),je="(max-width: 767.98px) and (pointer: coarse)",se,ae=()=>se??(se=window.matchMedia(je));function Fe(t,e){return typeof t.addEventListener=="function"?(t.addEventListener("change",e),()=>t.removeEventListener("change",e)):(t.addListener?.(e),()=>t.removeListener?.(e))}function Ge(t){return Fe(ae(),t)}function le(){return ie.useSyncExternalStore(Ge,()=>ae().matches,()=>!1)}var B=u.createContext(null);function w(){return u.useContext(B)}var k=u.createContext("2"),pe=u.createContext(!1),ce=u.createContext(!1);function Ke({children:t,presentation:e}){let n=u.useContext(k),r=u.useMemo(()=>({size:n,menuVariant:"soft",presentation:e}),[n,e]);return u.createElement(B.Provider,{value:r},t)}function H(){let t=w(),e=u.useContext(k),n=t?.size??e,r=t?.menuVariant??"soft";return["kui-ShellPaneChrome",`kui-r-size-${n}`,`kui-menu-variant-${r}`]}var ue={1:"2",2:"3",3:"4",4:"4"};function L(){let t=w(),e=u.useContext(k);return ue[t?.size??e]}function _e(){let t=u.useContext(h),e=u.useContext(re)!==null,n=L();return t!==void 0?t:e?n:null}var de=u.forwardRef(({className:t,float:e,children:n,...r},i)=>{let s=H(),o=L();return u.createElement("div",{...r,ref:i,"data-float":e||void 0,className:(0,v.default)("kui-ShellPaneHeader","kui-SidebarHeader","kui-SidebarHeader--container",...s,t)},u.createElement(h.Provider,{value:o},n))});de.displayName="Shell.PaneHeader";var fe=u.forwardRef(({className:t,float:e,children:n,...r},i)=>{let s=H(),o=L();return u.createElement("div",{...r,ref:i,"data-float":e||void 0,className:(0,v.default)("kui-ShellPaneFooter","kui-SidebarFooter","kui-SidebarFooter--container",...s,t)},u.createElement(h.Provider,{value:o},n))});fe.displayName="Shell.PaneFooter";var me=u.forwardRef(({className:t,style:e,dir:n,children:r,fade:i=!1,...s},o)=>{let p=H(),l=u.useContext(pe),a=w(),c=l&&a===null,f=u.useContext(ce),m=le();if(c){let V=s.tabIndex??(f&&m?-1:void 0);return u.createElement(N,{...s,tabIndex:V,ref:o,type:"hover",fade:i,className:"kui-ShellScroll"},u.createElement("div",{style:e,dir:n,className:(0,v.default)("kui-ShellScrollContent",t)},r))}return u.createElement(N,{...s,ref:o,type:"hover",fade:i,className:"kui-ShellScroll"},u.createElement("div",{style:e,dir:n,className:(0,v.default)("kui-BaseMenuContent","kui-SidebarContent",...p,t)},u.createElement(h.Provider,{value:null},u.createElement("div",{className:"kui-BaseMenuViewport"},r))))});me.displayName="Shell.Scroll";
3
3
  //# sourceMappingURL=pane-chrome.js.map