primereact 10.3.3 → 10.5.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 (276) hide show
  1. package/accordion/accordion.cjs.js +1 -1
  2. package/accordion/accordion.cjs.min.js +1 -1
  3. package/accordion/accordion.esm.js +1 -1
  4. package/accordion/accordion.esm.min.js +1 -1
  5. package/accordion/accordion.js +1 -1
  6. package/accordion/accordion.min.js +1 -1
  7. package/calendar/calendar.cjs.js +29 -14
  8. package/calendar/calendar.cjs.min.js +1 -1
  9. package/calendar/calendar.esm.js +29 -14
  10. package/calendar/calendar.esm.min.js +1 -1
  11. package/calendar/calendar.js +29 -14
  12. package/calendar/calendar.min.js +1 -1
  13. package/carousel/carousel.cjs.js +1 -0
  14. package/carousel/carousel.cjs.min.js +1 -1
  15. package/carousel/carousel.esm.js +1 -0
  16. package/carousel/carousel.esm.min.js +1 -1
  17. package/carousel/carousel.js +1 -0
  18. package/carousel/carousel.min.js +1 -1
  19. package/checkbox/checkbox.cjs.js +2 -0
  20. package/checkbox/checkbox.cjs.min.js +1 -1
  21. package/checkbox/checkbox.esm.js +2 -0
  22. package/checkbox/checkbox.esm.min.js +1 -1
  23. package/checkbox/checkbox.js +2 -0
  24. package/checkbox/checkbox.min.js +1 -1
  25. package/chips/chips.cjs.js +111 -21
  26. package/chips/chips.cjs.min.js +1 -1
  27. package/chips/chips.esm.js +111 -21
  28. package/chips/chips.esm.min.js +1 -1
  29. package/chips/chips.js +111 -21
  30. package/chips/chips.min.js +1 -1
  31. package/core/core.js +696 -505
  32. package/core/core.min.js +5 -5
  33. package/datatable/datatable.cjs.js +577 -153
  34. package/datatable/datatable.cjs.min.js +1 -1
  35. package/datatable/datatable.esm.js +573 -149
  36. package/datatable/datatable.esm.min.js +1 -1
  37. package/datatable/datatable.js +577 -153
  38. package/datatable/datatable.min.js +1 -1
  39. package/dataview/dataview.d.ts +2 -2
  40. package/divider/divider.cjs.js +2 -2
  41. package/divider/divider.cjs.min.js +1 -1
  42. package/divider/divider.esm.js +2 -2
  43. package/divider/divider.esm.min.js +1 -1
  44. package/divider/divider.js +2 -2
  45. package/divider/divider.min.js +1 -1
  46. package/dropdown/dropdown.cjs.js +327 -160
  47. package/dropdown/dropdown.cjs.min.js +1 -1
  48. package/dropdown/dropdown.d.ts +9 -0
  49. package/dropdown/dropdown.esm.js +327 -160
  50. package/dropdown/dropdown.esm.min.js +1 -1
  51. package/dropdown/dropdown.js +327 -160
  52. package/dropdown/dropdown.min.js +1 -1
  53. package/editor/editor.cjs.js +1 -1
  54. package/editor/editor.cjs.min.js +1 -1
  55. package/editor/editor.esm.js +1 -1
  56. package/editor/editor.esm.min.js +1 -1
  57. package/editor/editor.js +1 -1
  58. package/editor/editor.min.js +1 -1
  59. package/focustrap/focustrap.cjs.js +168 -0
  60. package/focustrap/focustrap.cjs.min.js +1 -0
  61. package/focustrap/focustrap.esm.js +159 -0
  62. package/focustrap/focustrap.esm.min.js +1 -0
  63. package/focustrap/focustrap.js +167 -0
  64. package/focustrap/focustrap.min.js +1 -0
  65. package/focustrap/package.json +7 -0
  66. package/galleria/galleria.cjs.js +26 -24
  67. package/galleria/galleria.cjs.min.js +1 -1
  68. package/galleria/galleria.esm.js +26 -24
  69. package/galleria/galleria.esm.min.js +1 -1
  70. package/galleria/galleria.js +26 -24
  71. package/galleria/galleria.min.js +1 -1
  72. package/hooks/hooks.d.ts +1 -1
  73. package/inputnumber/inputnumber.cjs.js +21 -17
  74. package/inputnumber/inputnumber.cjs.min.js +1 -1
  75. package/inputnumber/inputnumber.esm.js +21 -17
  76. package/inputnumber/inputnumber.esm.min.js +1 -1
  77. package/inputnumber/inputnumber.js +21 -17
  78. package/inputnumber/inputnumber.min.js +1 -1
  79. package/inputswitch/inputswitch.cjs.js +3 -1
  80. package/inputswitch/inputswitch.cjs.min.js +1 -1
  81. package/inputswitch/inputswitch.esm.js +3 -1
  82. package/inputswitch/inputswitch.esm.min.js +1 -1
  83. package/inputswitch/inputswitch.js +3 -1
  84. package/inputswitch/inputswitch.min.js +1 -1
  85. package/knob/knob.cjs.js +62 -0
  86. package/knob/knob.cjs.min.js +1 -1
  87. package/knob/knob.esm.js +62 -0
  88. package/knob/knob.esm.min.js +1 -1
  89. package/knob/knob.js +62 -0
  90. package/knob/knob.min.js +1 -1
  91. package/listbox/listbox.cjs.js +362 -92
  92. package/listbox/listbox.cjs.min.js +1 -1
  93. package/listbox/listbox.esm.js +363 -93
  94. package/listbox/listbox.esm.min.js +1 -1
  95. package/listbox/listbox.js +362 -92
  96. package/listbox/listbox.min.js +1 -1
  97. package/menu/menu.cjs.js +4 -2
  98. package/menu/menu.cjs.min.js +1 -1
  99. package/menu/menu.esm.js +4 -2
  100. package/menu/menu.esm.min.js +1 -1
  101. package/menu/menu.js +5 -4
  102. package/menu/menu.min.js +1 -1
  103. package/menubar/menubar.cjs.js +3 -0
  104. package/menubar/menubar.cjs.min.js +1 -1
  105. package/menubar/menubar.esm.js +3 -0
  106. package/menubar/menubar.esm.min.js +1 -1
  107. package/menubar/menubar.js +3 -0
  108. package/menubar/menubar.min.js +1 -1
  109. package/multiselect/multiselect.cjs.js +377 -107
  110. package/multiselect/multiselect.cjs.min.js +1 -1
  111. package/multiselect/multiselect.esm.js +377 -107
  112. package/multiselect/multiselect.esm.min.js +1 -1
  113. package/multiselect/multiselect.js +377 -107
  114. package/multiselect/multiselect.min.js +1 -1
  115. package/package.json +1 -1
  116. package/paginator/paginator.cjs.js +251 -251
  117. package/paginator/paginator.cjs.min.js +1 -1
  118. package/paginator/paginator.esm.js +258 -258
  119. package/paginator/paginator.esm.min.js +1 -1
  120. package/paginator/paginator.js +251 -251
  121. package/paginator/paginator.min.js +1 -1
  122. package/panelmenu/panelmenu.cjs.js +34 -22
  123. package/panelmenu/panelmenu.cjs.min.js +1 -1
  124. package/panelmenu/panelmenu.esm.js +34 -22
  125. package/panelmenu/panelmenu.esm.min.js +1 -1
  126. package/panelmenu/panelmenu.js +35 -24
  127. package/panelmenu/panelmenu.min.js +1 -1
  128. package/passthrough/tailwind/index.cjs.js +3 -2
  129. package/passthrough/tailwind/index.cjs.min.js +1 -1
  130. package/passthrough/tailwind/index.esm.js +3 -2
  131. package/passthrough/tailwind/index.esm.min.js +1 -1
  132. package/passthrough/tailwind/index.js +3 -2
  133. package/passthrough/tailwind/index.min.js +1 -1
  134. package/password/password.cjs.js +22 -20
  135. package/password/password.cjs.min.js +1 -1
  136. package/password/password.esm.js +22 -20
  137. package/password/password.esm.min.js +1 -1
  138. package/password/password.js +22 -20
  139. package/password/password.min.js +1 -1
  140. package/primereact.all.cjs.js +2199 -951
  141. package/primereact.all.cjs.min.js +1 -1
  142. package/primereact.all.esm.js +2199 -951
  143. package/primereact.all.esm.min.js +1 -1
  144. package/primereact.all.js +2199 -951
  145. package/primereact.all.min.js +1 -1
  146. package/radiobutton/radiobutton.cjs.js +1 -0
  147. package/radiobutton/radiobutton.cjs.min.js +1 -1
  148. package/radiobutton/radiobutton.esm.js +1 -0
  149. package/radiobutton/radiobutton.esm.min.js +1 -1
  150. package/radiobutton/radiobutton.js +1 -0
  151. package/radiobutton/radiobutton.min.js +1 -1
  152. package/rating/rating.cjs.js +103 -4
  153. package/rating/rating.cjs.min.js +1 -1
  154. package/rating/rating.esm.js +103 -4
  155. package/rating/rating.esm.min.js +1 -1
  156. package/rating/rating.js +103 -4
  157. package/rating/rating.min.js +1 -1
  158. package/resources/themes/arya-blue/theme.css +328 -67
  159. package/resources/themes/arya-green/theme.css +328 -67
  160. package/resources/themes/arya-orange/theme.css +328 -67
  161. package/resources/themes/arya-purple/theme.css +26 -6
  162. package/resources/themes/bootstrap4-dark-blue/theme.css +328 -67
  163. package/resources/themes/bootstrap4-dark-purple/theme.css +26 -6
  164. package/resources/themes/bootstrap4-light-blue/theme.css +328 -67
  165. package/resources/themes/bootstrap4-light-purple/theme.css +26 -6
  166. package/resources/themes/fluent-light/theme.css +327 -66
  167. package/resources/themes/lara-dark-amber/theme.css +328 -67
  168. package/resources/themes/lara-dark-blue/theme.css +328 -67
  169. package/resources/themes/lara-dark-cyan/theme.css +328 -67
  170. package/resources/themes/lara-dark-green/theme.css +328 -67
  171. package/resources/themes/lara-dark-indigo/theme.css +328 -67
  172. package/resources/themes/lara-dark-pink/theme.css +328 -67
  173. package/resources/themes/lara-dark-purple/theme.css +26 -6
  174. package/resources/themes/lara-dark-teal/theme.css +328 -67
  175. package/resources/themes/lara-light-amber/theme.css +328 -67
  176. package/resources/themes/lara-light-blue/theme.css +328 -67
  177. package/resources/themes/lara-light-cyan/theme.css +328 -67
  178. package/resources/themes/lara-light-green/theme.css +328 -67
  179. package/resources/themes/lara-light-indigo/theme.css +328 -67
  180. package/resources/themes/lara-light-pink/theme.css +328 -67
  181. package/resources/themes/lara-light-purple/theme.css +26 -6
  182. package/resources/themes/lara-light-teal/theme.css +328 -67
  183. package/resources/themes/luna-amber/theme.css +328 -67
  184. package/resources/themes/luna-blue/theme.css +328 -67
  185. package/resources/themes/luna-green/theme.css +328 -67
  186. package/resources/themes/luna-pink/theme.css +328 -67
  187. package/resources/themes/md-dark-deeppurple/theme.css +158 -138
  188. package/resources/themes/md-dark-indigo/theme.css +454 -193
  189. package/resources/themes/md-light-deeppurple/theme.css +26 -6
  190. package/resources/themes/md-light-indigo/theme.css +328 -67
  191. package/resources/themes/mdc-dark-deeppurple/theme.css +158 -138
  192. package/resources/themes/mdc-dark-indigo/theme.css +454 -193
  193. package/resources/themes/mdc-light-deeppurple/theme.css +26 -6
  194. package/resources/themes/mdc-light-indigo/theme.css +328 -67
  195. package/resources/themes/mira/theme.css +328 -67
  196. package/resources/themes/nano/theme.css +328 -67
  197. package/resources/themes/nova/theme.css +328 -67
  198. package/resources/themes/nova-accent/theme.css +328 -67
  199. package/resources/themes/nova-alt/theme.css +328 -67
  200. package/resources/themes/rhea/theme.css +328 -67
  201. package/resources/themes/saga-blue/theme.css +328 -67
  202. package/resources/themes/saga-green/theme.css +328 -67
  203. package/resources/themes/saga-orange/theme.css +328 -67
  204. package/resources/themes/saga-purple/theme.css +26 -6
  205. package/resources/themes/soho-dark/theme.css +353 -92
  206. package/resources/themes/soho-light/theme.css +328 -67
  207. package/resources/themes/tailwind-light/theme.css +329 -71
  208. package/resources/themes/vela-blue/theme.css +328 -67
  209. package/resources/themes/vela-green/theme.css +328 -67
  210. package/resources/themes/vela-orange/theme.css +328 -67
  211. package/resources/themes/vela-purple/theme.css +26 -6
  212. package/resources/themes/viva-dark/theme.css +328 -67
  213. package/resources/themes/viva-light/theme.css +328 -67
  214. package/selectbutton/selectbutton.cjs.js +96 -50
  215. package/selectbutton/selectbutton.cjs.min.js +1 -1
  216. package/selectbutton/selectbutton.esm.js +96 -50
  217. package/selectbutton/selectbutton.esm.min.js +1 -1
  218. package/selectbutton/selectbutton.js +96 -50
  219. package/selectbutton/selectbutton.min.js +1 -1
  220. package/sidebar/sidebar.cjs.js +18 -16
  221. package/sidebar/sidebar.cjs.min.js +1 -1
  222. package/sidebar/sidebar.esm.js +18 -16
  223. package/sidebar/sidebar.esm.min.js +1 -1
  224. package/sidebar/sidebar.js +18 -16
  225. package/sidebar/sidebar.min.js +1 -1
  226. package/slider/slider.cjs.js +25 -4
  227. package/slider/slider.cjs.min.js +1 -1
  228. package/slider/slider.esm.js +25 -4
  229. package/slider/slider.esm.min.js +1 -1
  230. package/slider/slider.js +25 -4
  231. package/slider/slider.min.js +1 -1
  232. package/splitbutton/splitbutton.cjs.js +4 -3
  233. package/splitbutton/splitbutton.cjs.min.js +1 -1
  234. package/splitbutton/splitbutton.esm.js +4 -3
  235. package/splitbutton/splitbutton.esm.min.js +1 -1
  236. package/splitbutton/splitbutton.js +4 -3
  237. package/splitbutton/splitbutton.min.js +1 -1
  238. package/splitter/splitter.cjs.js +71 -25
  239. package/splitter/splitter.cjs.min.js +1 -1
  240. package/splitter/splitter.d.ts +13 -1
  241. package/splitter/splitter.esm.js +73 -27
  242. package/splitter/splitter.esm.min.js +1 -1
  243. package/splitter/splitter.js +71 -25
  244. package/splitter/splitter.min.js +1 -1
  245. package/tabview/tabview.cjs.js +6 -5
  246. package/tabview/tabview.cjs.min.js +1 -1
  247. package/tabview/tabview.d.ts +39 -34
  248. package/tabview/tabview.esm.js +6 -5
  249. package/tabview/tabview.esm.min.js +1 -1
  250. package/tabview/tabview.js +6 -5
  251. package/tabview/tabview.min.js +1 -1
  252. package/tieredmenu/tieredmenu.cjs.js +4 -3
  253. package/tieredmenu/tieredmenu.cjs.min.js +1 -1
  254. package/tieredmenu/tieredmenu.esm.js +4 -3
  255. package/tieredmenu/tieredmenu.esm.min.js +1 -1
  256. package/tieredmenu/tieredmenu.js +4 -3
  257. package/tieredmenu/tieredmenu.min.js +1 -1
  258. package/togglebutton/togglebutton.cjs.js +15 -14
  259. package/togglebutton/togglebutton.cjs.min.js +1 -1
  260. package/togglebutton/togglebutton.esm.js +14 -13
  261. package/togglebutton/togglebutton.esm.min.js +1 -1
  262. package/togglebutton/togglebutton.js +15 -14
  263. package/togglebutton/togglebutton.min.js +1 -1
  264. package/tree/tree.cjs.js +33 -15
  265. package/tree/tree.cjs.min.js +1 -1
  266. package/tree/tree.esm.js +34 -16
  267. package/tree/tree.esm.min.js +1 -1
  268. package/tree/tree.js +33 -15
  269. package/tree/tree.min.js +1 -1
  270. package/tristatecheckbox/tristatecheckbox.cjs.js +3 -2
  271. package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
  272. package/tristatecheckbox/tristatecheckbox.esm.js +3 -2
  273. package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
  274. package/tristatecheckbox/tristatecheckbox.js +3 -2
  275. package/tristatecheckbox/tristatecheckbox.min.js +1 -1
  276. package/web-types.json +19 -1
@@ -68,6 +68,46 @@ this.primereact.selectbutton = (function (exports, React, api, hooks, tooltip, u
68
68
  return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
69
69
  }
70
70
 
71
+ function _arrayWithHoles(arr) {
72
+ if (Array.isArray(arr)) return arr;
73
+ }
74
+
75
+ function _iterableToArrayLimit(r, l) {
76
+ var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
77
+ if (null != t) {
78
+ var e,
79
+ n,
80
+ i,
81
+ u,
82
+ a = [],
83
+ f = !0,
84
+ o = !1;
85
+ try {
86
+ if (i = (t = t.call(r)).next, 0 === l) {
87
+ if (Object(t) !== t) return;
88
+ f = !1;
89
+ } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
90
+ } catch (r) {
91
+ o = !0, n = r;
92
+ } finally {
93
+ try {
94
+ if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
95
+ } finally {
96
+ if (o) throw n;
97
+ }
98
+ }
99
+ return a;
100
+ }
101
+ }
102
+
103
+ function _nonIterableRest() {
104
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
105
+ }
106
+
107
+ function _slicedToArray(arr, i) {
108
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
109
+ }
110
+
71
111
  var classes = {
72
112
  root: function root(_ref) {
73
113
  var props = _ref.props;
@@ -112,46 +152,6 @@ this.primereact.selectbutton = (function (exports, React, api, hooks, tooltip, u
112
152
  }
113
153
  });
114
154
 
115
- function _arrayWithHoles(arr) {
116
- if (Array.isArray(arr)) return arr;
117
- }
118
-
119
- function _iterableToArrayLimit(r, l) {
120
- var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
121
- if (null != t) {
122
- var e,
123
- n,
124
- i,
125
- u,
126
- a = [],
127
- f = !0,
128
- o = !1;
129
- try {
130
- if (i = (t = t.call(r)).next, 0 === l) {
131
- if (Object(t) !== t) return;
132
- f = !1;
133
- } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
134
- } catch (r) {
135
- o = !0, n = r;
136
- } finally {
137
- try {
138
- if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
139
- } finally {
140
- if (o) throw n;
141
- }
142
- }
143
- return a;
144
- }
145
- }
146
-
147
- function _nonIterableRest() {
148
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
149
- }
150
-
151
- function _slicedToArray(arr, i) {
152
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
153
- }
154
-
155
155
  var SelectButtonItem = /*#__PURE__*/React__namespace.memo(function (props) {
156
156
  var _React$useState = React__namespace.useState(false),
157
157
  _React$useState2 = _slicedToArray(_React$useState, 2),
@@ -170,7 +170,8 @@ this.primereact.selectbutton = (function (exports, React, api, hooks, tooltip, u
170
170
  }
171
171
  });
172
172
  };
173
- var onClick = function onClick(event) {
173
+ var _onClick = function onClick(event, index) {
174
+ props.setFocusedIndex(index);
174
175
  if (props.onClick) {
175
176
  props.onClick({
176
177
  originalEvent: event,
@@ -184,13 +185,46 @@ this.primereact.selectbutton = (function (exports, React, api, hooks, tooltip, u
184
185
  var onBlur = function onBlur() {
185
186
  setFocusedState(false);
186
187
  };
187
- var onKeyDown = function onKeyDown(event) {
188
- var keyCode = event.which;
189
- if (keyCode === 32) {
190
- onClick(event);
191
- event.preventDefault();
188
+ var _onKeyDown = function onKeyDown(event, index) {
189
+ switch (event.code) {
190
+ case 'Space':
191
+ {
192
+ _onClick(event, index);
193
+ event.preventDefault();
194
+ break;
195
+ }
196
+ case 'ArrowDown':
197
+ case 'ArrowRight':
198
+ {
199
+ changeTabIndexes(event, 'next');
200
+ event.preventDefault();
201
+ break;
202
+ }
203
+ case 'ArrowUp':
204
+ case 'ArrowLeft':
205
+ {
206
+ changeTabIndexes(event, 'prev');
207
+ event.preventDefault();
208
+ break;
209
+ }
192
210
  }
193
211
  };
212
+ var changeTabIndexes = function changeTabIndexes(event, direction) {
213
+ var firstTabableChild, index;
214
+ for (var i = 0; i <= props.elementRef.current.children.length - 1; i++) {
215
+ if (props.elementRef.current.children[i].getAttribute('tabindex') === '0') firstTabableChild = {
216
+ elem: props.elementRef.current.children[i],
217
+ index: i
218
+ };
219
+ }
220
+ if (direction === 'prev') {
221
+ if (firstTabableChild.index === 0) index = props.elementRef.current.children.length - 1;else index = firstTabableChild.index - 1;
222
+ } else {
223
+ if (firstTabableChild.index === props.elementRef.current.children.length - 1) index = 0;else index = firstTabableChild.index + 1;
224
+ }
225
+ props.setFocusedIndex(index);
226
+ props.elementRef.current.children[index].focus();
227
+ };
194
228
  var createContent = function createContent() {
195
229
  var labelProps = mergeProps({
196
230
  className: cx('label')
@@ -206,9 +240,14 @@ this.primereact.selectbutton = (function (exports, React, api, hooks, tooltip, u
206
240
  role: 'button',
207
241
  'aria-label': props.label,
208
242
  'aria-pressed': props.selected,
209
- onClick: onClick,
210
- onKeyDown: onKeyDown,
243
+ onClick: function onClick(event) {
244
+ return _onClick(event, props.index);
245
+ },
246
+ onKeyDown: function onKeyDown(event) {
247
+ return _onKeyDown(event, props.index);
248
+ },
211
249
  tabIndex: props.tabIndex,
250
+ 'aria-disabled': props.disabled,
212
251
  onFocus: onFocus,
213
252
  onBlur: onBlur
214
253
  }, getPTOptions('button'));
@@ -220,6 +259,10 @@ this.primereact.selectbutton = (function (exports, React, api, hooks, tooltip, u
220
259
  var mergeProps = hooks.useMergeProps();
221
260
  var context = React__namespace.useContext(api.PrimeReactContext);
222
261
  var props = SelectButtonBase.getProps(inProps, context);
262
+ var _React$useState = React__namespace.useState(0),
263
+ _React$useState2 = _slicedToArray(_React$useState, 2),
264
+ focusedIndex = _React$useState2[0],
265
+ setFocusedIndex = _React$useState2[1];
223
266
  var elementRef = React__namespace.useRef(null);
224
267
  var _SelectButtonBase$set = SelectButtonBase.setMetaData({
225
268
  props: props
@@ -292,7 +335,7 @@ this.primereact.selectbutton = (function (exports, React, api, hooks, tooltip, u
292
335
  return props.options.map(function (option, index) {
293
336
  var isDisabled = props.disabled || isOptionDisabled(option);
294
337
  var optionLabel = getOptionLabel(option);
295
- var tabIndex = isDisabled ? null : 0;
338
+ var tabIndex = index === focusedIndex ? '0' : '-1';
296
339
  var selected = isSelected(option);
297
340
  var key = optionLabel + '_' + index;
298
341
  return /*#__PURE__*/React__namespace.createElement(SelectButtonItem, {
@@ -301,13 +344,16 @@ this.primereact.selectbutton = (function (exports, React, api, hooks, tooltip, u
301
344
  label: optionLabel,
302
345
  className: option.className,
303
346
  option: option,
347
+ setFocusedIndex: setFocusedIndex,
304
348
  onClick: onOptionClick,
305
349
  template: props.itemTemplate,
306
350
  selected: selected,
307
351
  tabIndex: tabIndex,
352
+ index: index,
308
353
  disabled: isDisabled,
309
354
  ptm: ptm,
310
- cx: cx
355
+ cx: cx,
356
+ elementRef: elementRef
311
357
  });
312
358
  });
313
359
  }
@@ -1 +1 @@
1
- this.primereact=this.primereact||{},this.primereact.selectbutton=function(e,t,n,l,o,r,a,i){"use strict";function u(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var l=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,l.get?l:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var s=u(t);function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(e[l]=n[l])}return e},c.apply(this,arguments)}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,l=new Array(t);n<t;n++)l[n]=e[n];return l}function m(e){if(Array.isArray(e))return p(e)}function d(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function f(e,t){if(e){if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}function b(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function v(e){return m(e)||d(e)||f(e)||b()}var y=a.ComponentBase.extend({defaultProps:{__TYPE:"SelectButton",id:null,value:null,options:null,optionLabel:null,optionValue:null,optionDisabled:null,tabIndex:null,multiple:!1,unselectable:!0,allowEmpty:!0,disabled:!1,style:null,className:null,dataKey:null,tooltip:null,tooltipOptions:null,itemTemplate:null,onChange:null,children:void 0},css:{classes:{root:function(e){return r.classNames("p-selectbutton p-buttonset p-component",e.props.className)},button:function(e){var t=e.itemProps;return r.classNames("p-button p-component",{"p-highlight":t.selected,"p-disabled":t.disabled,"p-focus":e.focusedState})},label:"p-button-label p-c"}}});function g(e){if(Array.isArray(e))return e}function h(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var l,o,r,a,i=[],u=!0,s=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(l=r.call(n)).done)&&(i.push(l.value),i.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return i}}function O(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var j=s.memo((function(e){var t,n,o,a=s.useState(!1),u=(n=2,g(t=a)||h(t,n)||f(t,n)||O()),c=u[0],p=u[1],m=l.useMergeProps(),d=e.ptm,b=e.cx,v=function(t){return d(t,{hostName:e.hostName,context:{selected:e.selected,disabled:e.disabled,option:e.option}})},y=function(t){e.onClick&&e.onClick({originalEvent:t,option:e.option})},j=(o=m({className:b("label")},v("label")),e.template?r.ObjectUtils.getJSXElement(e.template,e.option):s.createElement("span",o,e.label)),E=m({className:r.classNames(e.className,b("button",{itemProps:e,focusedState:c})),role:"button","aria-label":e.label,"aria-pressed":e.selected,onClick:y,onKeyDown:function(e){32===e.which&&(y(e),e.preventDefault())},tabIndex:e.tabIndex,onFocus:function(){p(!0)},onBlur:function(){p(!1)}},v("button"));return s.createElement("div",E,j,!e.disabled&&s.createElement(i.Ripple,null))}));j.displayName="SelectButtonItem";var E=s.memo(s.forwardRef((function(e,t){var a=l.useMergeProps(),i=s.useContext(n.PrimeReactContext),u=y.getProps(e,i),p=s.useRef(null),m=y.setMetaData({props:u}),d=m.ptm,f=m.cx,b=function(e){if(!u.disabled&&!O(e.option)){var t=E(e.option);if(!t||u.unselectable&&u.allowEmpty){var n,l=h(e.option);if(u.multiple){var o=u.value?v(u.value):[];n=t?o.filter((function(e){return!r.ObjectUtils.equals(e,l,u.dataKey)})):[].concat(v(o),[l])}else n=t?null:l;u.onChange&&u.onChange({originalEvent:e.originalEvent,value:n,stopPropagation:function(){e.originalEvent.stopPropagation()},preventDefault:function(){e.originalEvent.preventDefault()},target:{name:u.name,id:u.id,value:n}})}}},g=function(e){return u.optionLabel?r.ObjectUtils.resolveFieldData(e,u.optionLabel):e&&void 0!==e.label?e.label:e},h=function(e){return u.optionValue?r.ObjectUtils.resolveFieldData(e,u.optionValue):e&&void 0!==e.value?e.value:e},O=function(e){return u.optionDisabled?r.ObjectUtils.isFunction(u.optionDisabled)?u.optionDisabled(e):r.ObjectUtils.resolveFieldData(e,u.optionDisabled):!(!e||void 0===e.disabled)&&e.disabled},E=function(e){var t=h(e);return u.multiple?!(!u.value||!u.value.length)&&u.value.some((function(e){return r.ObjectUtils.equals(e,t,u.dataKey)})):r.ObjectUtils.equals(u.value,t,u.dataKey)};s.useImperativeHandle(t,(function(){return{props:u,focus:function(){return r.DomHandler.focusFirstElement(p.current)},getElement:function(){return p.current}}}));var N=r.ObjectUtils.isNotEmpty(u.tooltip),S=u.options&&u.options.length?u.options.map((function(e,t){var n=u.disabled||O(e),l=g(e),o=n?null:0,r=E(e);return s.createElement(j,{hostName:"SelectButton",key:l+"_"+t,label:l,className:e.className,option:e,onClick:b,template:u.itemTemplate,selected:r,tabIndex:o,disabled:n,ptm:d,cx:f})})):null,D=a({ref:p,id:u.id,className:f("root"),style:u.style,role:"group"},y.getOtherProps(u),d("root"));return s.createElement(s.Fragment,null,s.createElement("div",D,S),N&&s.createElement(o.Tooltip,c({target:p,content:u.tooltip},u.tooltipOptions,{pt:d("tooltip")})))})));return E.displayName="SelectButton",e.SelectButton=E,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.api,primereact.hooks,primereact.tooltip,primereact.utils,primereact.componentbase,primereact.ripple);
1
+ this.primereact=this.primereact||{},this.primereact.selectbutton=function(e,t,n,r,l,o,a,i){"use strict";function u(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var c=u(t);function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function d(e){if(Array.isArray(e))return p(e)}function f(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function m(e,t){if(e){if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}function b(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function v(e){return d(e)||f(e)||m(e)||b()}function y(e){if(Array.isArray(e))return e}function h(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,l,o,a,i=[],u=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(i.push(r.value),i.length!==t);u=!0);}catch(e){c=!0,l=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw l}}return i}}function g(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function O(e,t){return y(e)||h(e,t)||m(e,t)||g()}var x=a.ComponentBase.extend({defaultProps:{__TYPE:"SelectButton",id:null,value:null,options:null,optionLabel:null,optionValue:null,optionDisabled:null,tabIndex:null,multiple:!1,unselectable:!0,allowEmpty:!0,disabled:!1,style:null,className:null,dataKey:null,tooltip:null,tooltipOptions:null,itemTemplate:null,onChange:null,children:void 0},css:{classes:{root:function(e){return o.classNames("p-selectbutton p-buttonset p-component",e.props.className)},button:function(e){var t=e.itemProps;return o.classNames("p-button p-component",{"p-highlight":t.selected,"p-disabled":t.disabled,"p-focus":e.focusedState})},label:"p-button-label p-c"}}}),j=c.memo((function(e){var t,n=O(c.useState(!1),2),l=n[0],a=n[1],u=r.useMergeProps(),s=e.ptm,p=e.cx,d=function(t){return s(t,{hostName:e.hostName,context:{selected:e.selected,disabled:e.disabled,option:e.option}})},f=function(t,n){e.setFocusedIndex(n),e.onClick&&e.onClick({originalEvent:t,option:e.option})},m=function(e,t){switch(e.code){case"Space":f(e,t),e.preventDefault();break;case"ArrowDown":case"ArrowRight":b(e,"next"),e.preventDefault();break;case"ArrowUp":case"ArrowLeft":b(e,"prev"),e.preventDefault()}},b=function(t,n){for(var r,l,o=0;o<=e.elementRef.current.children.length-1;o++)"0"===e.elementRef.current.children[o].getAttribute("tabindex")&&(r={elem:e.elementRef.current.children[o],index:o});e.setFocusedIndex(l="prev"===n?0===r.index?e.elementRef.current.children.length-1:r.index-1:r.index===e.elementRef.current.children.length-1?0:r.index+1),e.elementRef.current.children[l].focus()},v=(t=u({className:p("label")},d("label")),e.template?o.ObjectUtils.getJSXElement(e.template,e.option):c.createElement("span",t,e.label)),y=u({className:o.classNames(e.className,p("button",{itemProps:e,focusedState:l})),role:"button","aria-label":e.label,"aria-pressed":e.selected,onClick:function(t){return f(t,e.index)},onKeyDown:function(t){return m(t,e.index)},tabIndex:e.tabIndex,"aria-disabled":e.disabled,onFocus:function(){a(!0)},onBlur:function(){a(!1)}},d("button"));return c.createElement("div",y,v,!e.disabled&&c.createElement(i.Ripple,null))}));j.displayName="SelectButtonItem";var E=c.memo(c.forwardRef((function(e,t){var a=r.useMergeProps(),i=c.useContext(n.PrimeReactContext),u=x.getProps(e,i),p=O(c.useState(0),2),d=p[0],f=p[1],m=c.useRef(null),b=x.setMetaData({props:u}),y=b.ptm,h=b.cx,g=function(e){if(!u.disabled&&!w(e.option)){var t=D(e.option);if(!t||u.unselectable&&u.allowEmpty){var n,r=S(e.option);if(u.multiple){var l=u.value?v(u.value):[];n=t?l.filter((function(e){return!o.ObjectUtils.equals(e,r,u.dataKey)})):[].concat(v(l),[r])}else n=t?null:r;u.onChange&&u.onChange({originalEvent:e.originalEvent,value:n,stopPropagation:function(){e.originalEvent.stopPropagation()},preventDefault:function(){e.originalEvent.preventDefault()},target:{name:u.name,id:u.id,value:n}})}}},E=function(e){return u.optionLabel?o.ObjectUtils.resolveFieldData(e,u.optionLabel):e&&void 0!==e.label?e.label:e},S=function(e){return u.optionValue?o.ObjectUtils.resolveFieldData(e,u.optionValue):e&&void 0!==e.value?e.value:e},w=function(e){return u.optionDisabled?o.ObjectUtils.isFunction(u.optionDisabled)?u.optionDisabled(e):o.ObjectUtils.resolveFieldData(e,u.optionDisabled):!(!e||void 0===e.disabled)&&e.disabled},D=function(e){var t=S(e);return u.multiple?!(!u.value||!u.value.length)&&u.value.some((function(e){return o.ObjectUtils.equals(e,t,u.dataKey)})):o.ObjectUtils.equals(u.value,t,u.dataKey)};c.useImperativeHandle(t,(function(){return{props:u,focus:function(){return o.DomHandler.focusFirstElement(m.current)},getElement:function(){return m.current}}}));var N=o.ObjectUtils.isNotEmpty(u.tooltip),P=u.options&&u.options.length?u.options.map((function(e,t){var n=u.disabled||w(e),r=E(e),l=t===d?"0":"-1",o=D(e);return c.createElement(j,{hostName:"SelectButton",key:r+"_"+t,label:r,className:e.className,option:e,setFocusedIndex:f,onClick:g,template:u.itemTemplate,selected:o,tabIndex:l,index:t,disabled:n,ptm:y,cx:h,elementRef:m})})):null,A=a({ref:m,id:u.id,className:h("root"),style:u.style,role:"group"},x.getOtherProps(u),y("root"));return c.createElement(c.Fragment,null,c.createElement("div",A,P),N&&c.createElement(l.Tooltip,s({target:m,content:u.tooltip},u.tooltipOptions,{pt:y("tooltip")})))})));return E.displayName="SelectButton",e.SelectButton=E,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.api,primereact.hooks,primereact.tooltip,primereact.utils,primereact.componentbase,primereact.ripple);
@@ -201,28 +201,30 @@ var inlineStyles = {
201
201
  var SidebarBase = componentbase.ComponentBase.extend({
202
202
  defaultProps: {
203
203
  __TYPE: 'Sidebar',
204
- id: null,
205
- style: null,
206
- className: null,
207
- maskStyle: null,
208
- maskClassName: null,
209
- visible: false,
210
- position: 'left',
211
- fullScreen: false,
212
- blockScroll: false,
204
+ appendTo: null,
205
+ ariaCloseLabel: null,
213
206
  baseZIndex: 0,
214
- dismissable: true,
215
- showCloseIcon: true,
207
+ blockScroll: false,
208
+ children: undefined,
209
+ className: null,
216
210
  closeIcon: null,
217
- ariaCloseLabel: null,
218
211
  closeOnEscape: true,
212
+ content: null,
213
+ dismissable: true,
214
+ fullScreen: false,
215
+ header: null,
219
216
  icons: null,
217
+ id: null,
218
+ maskClassName: null,
219
+ maskStyle: null,
220
220
  modal: true,
221
- appendTo: null,
222
- transitionOptions: null,
223
- onShow: null,
224
221
  onHide: null,
225
- children: undefined
222
+ onShow: null,
223
+ position: 'left',
224
+ showCloseIcon: true,
225
+ style: null,
226
+ transitionOptions: null,
227
+ visible: false
226
228
  },
227
229
  css: {
228
230
  classes: classes,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),n=require("primereact/api"),t=require("primereact/componentbase"),r=require("primereact/csstransition"),i=require("primereact/hooks"),a=require("primereact/icons/times"),o=require("primereact/portal"),s=require("primereact/ripple"),l=require("primereact/utils");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function p(e){if(e&&e.__esModule)return e;var n=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}})),n.default=e,Object.freeze(n)}var d=p(e),b=c(n);function u(){return u=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},u.apply(this,arguments)}function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function m(e,n){if("object"!==f(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!==f(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}function h(e){var n=m(e,"string");return"symbol"===f(n)?n:String(n)}function y(e){if(Array.isArray(e))return e}function v(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,i,a,o,s=[],l=!0,c=!1;try{if(a=(t=t.call(e)).next,0===n){if(Object(t)!==t)return;l=!1}else for(;!(l=(r=a.call(t)).done)&&(s.push(r.value),s.length!==n);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=t.return&&(o=t.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}function g(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function x(e,n){if(e){if("string"==typeof e)return g(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?g(e,n):void 0}}function S(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function w(e,n){return y(e)||v(e,n)||x(e,n)||S()}var O=t.ComponentBase.extend({defaultProps:{__TYPE:"Sidebar",id:null,style:null,className:null,maskStyle:null,maskClassName:null,visible:!1,position:"left",fullScreen:!1,blockScroll:!1,baseZIndex:0,dismissable:!0,showCloseIcon:!0,closeIcon:null,ariaCloseLabel:null,closeOnEscape:!0,icons:null,modal:!0,appendTo:null,transitionOptions:null,onShow:null,onHide:null,children:void 0},css:{classes:{closeButton:"p-sidebar-close p-sidebar-icon p-link",closeIcon:"p-sidebar-close-icon",mask:function(e){var n=e.props,t=e.maskVisibleState,r=["left","right","top","bottom"].find((function(e){return e===n.position}));return l.classNames("p-sidebar-mask",r&&!n.fullScreen?"p-sidebar-".concat(r):"",{"p-component-overlay p-component-overlay-enter":n.modal,"p-sidebar-mask-scrollblocker":n.blockScroll,"p-sidebar-visible":t,"p-sidebar-full":n.fullScreen},n.maskClassName)},header:function(e){return l.classNames("p-sidebar-header",{"p-sidebar-custom-header":e.props.header})},content:"p-sidebar-content",icons:"p-sidebar-icons",root:function(e){var n=e.context;return l.classNames("p-sidebar p-component",e.props.className,{"p-input-filled":n&&"filled"===n.inputStyle||"filled"===b.default.inputStyle,"p-ripple-disabled":n&&!1===n.ripple||!1===b.default.ripple})},transition:"p-sidebar"},styles:"\n@layer primereact {\n .p-sidebar-mask {\n display: none;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n background-color: transparent;\n transition-property: background-color;\n }\n \n .p-sidebar-visible {\n display: flex;\n }\n \n .p-sidebar-mask.p-component-overlay {\n pointer-events: auto;\n }\n \n .p-sidebar {\n display: flex;\n flex-direction: column;\n pointer-events: auto;\n transform: translate3d(0px, 0px, 0px);\n position: relative;\n }\n \n .p-sidebar-content {\n overflow-y: auto;\n flex-grow: 1;\n }\n \n .p-sidebar-header {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n }\n \n .p-sidebar-custom-header {\n justify-content: space-between;\n }\n \n .p-sidebar-icons {\n display: flex;\n align-items: center;\n flex-shrink: 0;\n }\n \n .p-sidebar-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n }\n \n .p-sidebar-full .p-sidebar {\n transition: none;\n transform: none;\n width: 100vw;\n height: 100vh;\n max-height: 100%;\n top: 0px;\n left: 0px;\n }\n \n /* Animation */\n /* Top, Bottom, Left and Right */\n .p-sidebar-top .p-sidebar-enter,\n .p-sidebar-top .p-sidebar-exit-active {\n transform: translate3d(0px, -100%, 0px);\n }\n \n .p-sidebar-bottom .p-sidebar-enter,\n .p-sidebar-bottom .p-sidebar-exit-active {\n transform: translate3d(0px, 100%, 0px);\n }\n \n .p-sidebar-left .p-sidebar-enter,\n .p-sidebar-left .p-sidebar-exit-active {\n transform: translate3d(-100%, 0px, 0px);\n }\n \n .p-sidebar-right .p-sidebar-enter,\n .p-sidebar-right .p-sidebar-exit-active {\n transform: translate3d(100%, 0px, 0px);\n }\n \n .p-sidebar-top .p-sidebar-enter-active,\n .p-sidebar-bottom .p-sidebar-enter-active,\n .p-sidebar-left .p-sidebar-enter-active,\n .p-sidebar-right .p-sidebar-enter-active {\n transform: translate3d(0px, 0px, 0px);\n transition: all 0.3s;\n }\n \n .p-sidebar-top .p-sidebar-enter-done,\n .p-sidebar-bottom .p-sidebar-enter-done,\n .p-sidebar-left .p-sidebar-enter-done,\n .p-sidebar-right .p-sidebar-enter-done {\n transform: none;\n }\n \n .p-sidebar-top .p-sidebar-exit-active,\n .p-sidebar-bottom .p-sidebar-exit-active,\n .p-sidebar-left .p-sidebar-exit-active,\n .p-sidebar-right .p-sidebar-exit-active {\n transition: all 0.3s;\n }\n \n /* Full */\n .p-sidebar-full .p-sidebar-enter {\n opacity: 0;\n transform: scale(0.5);\n }\n \n .p-sidebar-full .p-sidebar-enter-active {\n opacity: 1;\n transform: scale(1);\n transition: all 0.15s cubic-bezier(0, 0, 0.2, 1);\n }\n \n .p-sidebar-full .p-sidebar-enter-done {\n transform: none;\n }\n \n .p-sidebar-full .p-sidebar-exit-active {\n opacity: 0;\n transform: scale(0.5);\n transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);\n }\n \n /* Size */\n .p-sidebar-left .p-sidebar {\n width: 20rem;\n height: 100%;\n }\n \n .p-sidebar-right .p-sidebar {\n width: 20rem;\n height: 100%;\n }\n \n .p-sidebar-top .p-sidebar {\n height: 10rem;\n width: 100%;\n }\n \n .p-sidebar-bottom .p-sidebar {\n height: 10rem;\n width: 100%;\n }\n \n .p-sidebar-left .p-sidebar-sm,\n .p-sidebar-right .p-sidebar-sm {\n width: 20rem;\n }\n \n .p-sidebar-left .p-sidebar-md,\n .p-sidebar-right .p-sidebar-md {\n width: 40rem;\n }\n \n .p-sidebar-left .p-sidebar-lg,\n .p-sidebar-right .p-sidebar-lg {\n width: 60rem;\n }\n \n .p-sidebar-top .p-sidebar-sm,\n .p-sidebar-bottom .p-sidebar-sm {\n height: 10rem;\n }\n \n .p-sidebar-top .p-sidebar-md,\n .p-sidebar-bottom .p-sidebar-md {\n height: 20rem;\n }\n \n .p-sidebar-top .p-sidebar-lg,\n .p-sidebar-bottom .p-sidebar-lg {\n height: 30rem;\n }\n \n .p-sidebar-left .p-sidebar-view,\n .p-sidebar-right .p-sidebar-view,\n .p-sidebar-top .p-sidebar-view,\n .p-sidebar-bottom .p-sidebar-view {\n width: 100%;\n height: 100%;\n }\n \n .p-sidebar-left .p-sidebar-content,\n .p-sidebar-right .p-sidebar-content,\n .p-sidebar-top .p-sidebar-content,\n .p-sidebar-bottom .p-sidebar-content {\n width: 100%;\n height: 100%;\n }\n \n @media screen and (max-width: 64em) {\n .p-sidebar-left .p-sidebar-lg,\n .p-sidebar-left .p-sidebar-md,\n .p-sidebar-right .p-sidebar-lg,\n .p-sidebar-right .p-sidebar-md {\n width: 20rem;\n }\n } \n}\n",inlineStyles:{mask:function(e){var n=e.props;return{position:"fixed",height:"100%",width:"100%",left:0,top:0,display:"flex",justifyContent:"left"===n.position?"flex-start":"right"===n.position?"flex-end":"center",alignItems:"top"===n.position?"flex-start":"bottom"===n.position?"flex-end":"center"}}}}});function E(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function j(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?E(Object(t),!0).forEach((function(n){var r,i,a;r=e,a=t[n],(i=h(i=n))in r?Object.defineProperty(r,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[i]=a})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):E(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var k=d.forwardRef((function(e,c){var p=i.useMergeProps(),f=d.useContext(n.PrimeReactContext),m=O.getProps(e,f),h=w(d.useState(!1),2),y=h[0],v=h[1],g=w(d.useState(!1),2),x=g[0],S=g[1],E=O.setMetaData({props:m,state:{containerVisible:y}}),k=E.ptm,I=E.cx,P=E.sx;t.useHandleStyle(O.css.styles,E.isUnstyled,{name:"sidebar"});var N=d.useRef(null),C=d.useRef(null),D=d.useRef(null),R=i.useDisplayOrder("sidebar",x);i.useGlobalOnEscapeKey({callback:function(e){_(e)},when:x&&m.closeOnEscape&&R,priority:[i.ESC_KEY_HANDLING_PRIORITIES.SIDEBAR,R]});var U=w(i.useEventListener({type:"click",listener:function(e){0===e.button&&A(e)&&_(e)}}),2),T=U[0],q=U[1],A=function(e){return N&&N.current&&!N.current.contains(e.target)},_=function(e){m.onHide(),e.preventDefault()},B=function(){m.dismissable&&!m.modal&&T(),m.blockScroll&&l.DomHandler.blockBodyScroll()},H=function(){q(),m.blockScroll&&l.DomHandler.unblockBodyScroll()};d.useImperativeHandle(c,(function(){return{props:m,getElement:function(){return N.current},gteMask:function(){return C.current},getCloseIcon:function(){return D.current}}})),i.useMountEffect((function(){m.visible&&v(!0)})),i.useUpdateEffect((function(){m.visible&&!y&&v(!0),m.visible!==x&&y&&S(m.visible)})),i.useUpdateEffect((function(){y&&(l.ZIndexUtils.set("modal",C.current,f&&f.autoZIndex||b.default.autoZIndex,m.baseZIndex||f&&f.zIndex.modal||b.default.zIndex.modal),S(!0))}),[y]),i.useUpdateEffect((function(){x&&(q(),m.dismissable&&!m.modal&&T())}),[m.dismissable,m.modal,x]),i.useUnmountEffect((function(){H(),C.current&&l.ZIndexUtils.clear(C.current)}));var M,Z,z,L,J,X=function(){var e=m.ariaCloseLabel||n.localeOption("close"),t=p({type:"button",ref:D,className:I("closeButton"),onClick:function(e){return _(e)},"aria-label":e},k("closeButton")),r=p({className:I("closeIcon")},k("closeIcon")),i=l.IconUtils.getJSXIcon(m.closeIcon||d.createElement(a.TimesIcon,r),j({},r),{props:m});return m.showCloseIcon?d.createElement("button",t,i,d.createElement(s.Ripple,null)):null},V=p({ref:C,style:P("mask"),className:I("mask",{maskVisibleState:y}),onMouseDown:function(e){return n=e,void(m.dismissable&&m.modal&&C.current===n.target&&_(n));var n}},k("mask")),G=p({id:m.id,className:I("root",{context:f}),style:m.style,role:"complementary"},O.getOtherProps(m),k("root")),K=p({className:I("header")},k("header")),Y=p({className:I("content")},k("content")),F=p({className:I("icons")},k("icons")),$={enter:m.fullScreen?150:300,exit:m.fullScreen?150:300},Q=p({classNames:I("transition"),in:x,timeout:$,options:m.transitionOptions,unmountOnExit:!0,onEntered:function(){var e;m.onShow&&m.onShow(),!((e=document.activeElement)&&N&&N.current.contains(e))&&m.showCloseIcon&&D.current&&D.current.focus(),B()},onExiting:function(){m.modal&&l.DomHandler.addClass(C.current,"p-component-overlay-leave")},onExited:function(){l.ZIndexUtils.clear(C.current),v(!1),H()}},k("transition"));return y&&(J=null!=e&&e.content?(L={closeIconRef:D,hide:_},d.createElement("div",V,d.createElement(r.CSSTransition,u({nodeRef:N},Q),d.createElement("div",u({ref:N},G),l.ObjectUtils.getJSXElement(e.content,L))))):(M=X(),Z=m.icons?l.ObjectUtils.getJSXElement(m.icons,m):null,z=m.header?l.ObjectUtils.getJSXElement(m.header,m):null,d.createElement("div",V,d.createElement(r.CSSTransition,u({nodeRef:N},Q),d.createElement("div",u({ref:N},G),d.createElement("div",K,z,d.createElement("div",F,Z,M)),d.createElement("div",Y,m.children))))),d.createElement(o.Portal,{element:J,appendTo:m.appendTo,visible:!0}))}));k.displayName="Sidebar",exports.Sidebar=k;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),n=require("primereact/api"),t=require("primereact/componentbase"),r=require("primereact/csstransition"),i=require("primereact/hooks"),a=require("primereact/icons/times"),o=require("primereact/portal"),s=require("primereact/ripple"),l=require("primereact/utils");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function p(e){if(e&&e.__esModule)return e;var n=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}})),n.default=e,Object.freeze(n)}var d=p(e),b=c(n);function u(){return u=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},u.apply(this,arguments)}function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function m(e,n){if("object"!==f(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!==f(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}function h(e){var n=m(e,"string");return"symbol"===f(n)?n:String(n)}function y(e){if(Array.isArray(e))return e}function v(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,i,a,o,s=[],l=!0,c=!1;try{if(a=(t=t.call(e)).next,0===n){if(Object(t)!==t)return;l=!1}else for(;!(l=(r=a.call(t)).done)&&(s.push(r.value),s.length!==n);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=t.return&&(o=t.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}function g(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function x(e,n){if(e){if("string"==typeof e)return g(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?g(e,n):void 0}}function S(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function w(e,n){return y(e)||v(e,n)||x(e,n)||S()}var O=t.ComponentBase.extend({defaultProps:{__TYPE:"Sidebar",appendTo:null,ariaCloseLabel:null,baseZIndex:0,blockScroll:!1,children:void 0,className:null,closeIcon:null,closeOnEscape:!0,content:null,dismissable:!0,fullScreen:!1,header:null,icons:null,id:null,maskClassName:null,maskStyle:null,modal:!0,onHide:null,onShow:null,position:"left",showCloseIcon:!0,style:null,transitionOptions:null,visible:!1},css:{classes:{closeButton:"p-sidebar-close p-sidebar-icon p-link",closeIcon:"p-sidebar-close-icon",mask:function(e){var n=e.props,t=e.maskVisibleState,r=["left","right","top","bottom"].find((function(e){return e===n.position}));return l.classNames("p-sidebar-mask",r&&!n.fullScreen?"p-sidebar-".concat(r):"",{"p-component-overlay p-component-overlay-enter":n.modal,"p-sidebar-mask-scrollblocker":n.blockScroll,"p-sidebar-visible":t,"p-sidebar-full":n.fullScreen},n.maskClassName)},header:function(e){return l.classNames("p-sidebar-header",{"p-sidebar-custom-header":e.props.header})},content:"p-sidebar-content",icons:"p-sidebar-icons",root:function(e){var n=e.context;return l.classNames("p-sidebar p-component",e.props.className,{"p-input-filled":n&&"filled"===n.inputStyle||"filled"===b.default.inputStyle,"p-ripple-disabled":n&&!1===n.ripple||!1===b.default.ripple})},transition:"p-sidebar"},styles:"\n@layer primereact {\n .p-sidebar-mask {\n display: none;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n background-color: transparent;\n transition-property: background-color;\n }\n \n .p-sidebar-visible {\n display: flex;\n }\n \n .p-sidebar-mask.p-component-overlay {\n pointer-events: auto;\n }\n \n .p-sidebar {\n display: flex;\n flex-direction: column;\n pointer-events: auto;\n transform: translate3d(0px, 0px, 0px);\n position: relative;\n }\n \n .p-sidebar-content {\n overflow-y: auto;\n flex-grow: 1;\n }\n \n .p-sidebar-header {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n }\n \n .p-sidebar-custom-header {\n justify-content: space-between;\n }\n \n .p-sidebar-icons {\n display: flex;\n align-items: center;\n flex-shrink: 0;\n }\n \n .p-sidebar-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n }\n \n .p-sidebar-full .p-sidebar {\n transition: none;\n transform: none;\n width: 100vw;\n height: 100vh;\n max-height: 100%;\n top: 0px;\n left: 0px;\n }\n \n /* Animation */\n /* Top, Bottom, Left and Right */\n .p-sidebar-top .p-sidebar-enter,\n .p-sidebar-top .p-sidebar-exit-active {\n transform: translate3d(0px, -100%, 0px);\n }\n \n .p-sidebar-bottom .p-sidebar-enter,\n .p-sidebar-bottom .p-sidebar-exit-active {\n transform: translate3d(0px, 100%, 0px);\n }\n \n .p-sidebar-left .p-sidebar-enter,\n .p-sidebar-left .p-sidebar-exit-active {\n transform: translate3d(-100%, 0px, 0px);\n }\n \n .p-sidebar-right .p-sidebar-enter,\n .p-sidebar-right .p-sidebar-exit-active {\n transform: translate3d(100%, 0px, 0px);\n }\n \n .p-sidebar-top .p-sidebar-enter-active,\n .p-sidebar-bottom .p-sidebar-enter-active,\n .p-sidebar-left .p-sidebar-enter-active,\n .p-sidebar-right .p-sidebar-enter-active {\n transform: translate3d(0px, 0px, 0px);\n transition: all 0.3s;\n }\n \n .p-sidebar-top .p-sidebar-enter-done,\n .p-sidebar-bottom .p-sidebar-enter-done,\n .p-sidebar-left .p-sidebar-enter-done,\n .p-sidebar-right .p-sidebar-enter-done {\n transform: none;\n }\n \n .p-sidebar-top .p-sidebar-exit-active,\n .p-sidebar-bottom .p-sidebar-exit-active,\n .p-sidebar-left .p-sidebar-exit-active,\n .p-sidebar-right .p-sidebar-exit-active {\n transition: all 0.3s;\n }\n \n /* Full */\n .p-sidebar-full .p-sidebar-enter {\n opacity: 0;\n transform: scale(0.5);\n }\n \n .p-sidebar-full .p-sidebar-enter-active {\n opacity: 1;\n transform: scale(1);\n transition: all 0.15s cubic-bezier(0, 0, 0.2, 1);\n }\n \n .p-sidebar-full .p-sidebar-enter-done {\n transform: none;\n }\n \n .p-sidebar-full .p-sidebar-exit-active {\n opacity: 0;\n transform: scale(0.5);\n transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);\n }\n \n /* Size */\n .p-sidebar-left .p-sidebar {\n width: 20rem;\n height: 100%;\n }\n \n .p-sidebar-right .p-sidebar {\n width: 20rem;\n height: 100%;\n }\n \n .p-sidebar-top .p-sidebar {\n height: 10rem;\n width: 100%;\n }\n \n .p-sidebar-bottom .p-sidebar {\n height: 10rem;\n width: 100%;\n }\n \n .p-sidebar-left .p-sidebar-sm,\n .p-sidebar-right .p-sidebar-sm {\n width: 20rem;\n }\n \n .p-sidebar-left .p-sidebar-md,\n .p-sidebar-right .p-sidebar-md {\n width: 40rem;\n }\n \n .p-sidebar-left .p-sidebar-lg,\n .p-sidebar-right .p-sidebar-lg {\n width: 60rem;\n }\n \n .p-sidebar-top .p-sidebar-sm,\n .p-sidebar-bottom .p-sidebar-sm {\n height: 10rem;\n }\n \n .p-sidebar-top .p-sidebar-md,\n .p-sidebar-bottom .p-sidebar-md {\n height: 20rem;\n }\n \n .p-sidebar-top .p-sidebar-lg,\n .p-sidebar-bottom .p-sidebar-lg {\n height: 30rem;\n }\n \n .p-sidebar-left .p-sidebar-view,\n .p-sidebar-right .p-sidebar-view,\n .p-sidebar-top .p-sidebar-view,\n .p-sidebar-bottom .p-sidebar-view {\n width: 100%;\n height: 100%;\n }\n \n .p-sidebar-left .p-sidebar-content,\n .p-sidebar-right .p-sidebar-content,\n .p-sidebar-top .p-sidebar-content,\n .p-sidebar-bottom .p-sidebar-content {\n width: 100%;\n height: 100%;\n }\n \n @media screen and (max-width: 64em) {\n .p-sidebar-left .p-sidebar-lg,\n .p-sidebar-left .p-sidebar-md,\n .p-sidebar-right .p-sidebar-lg,\n .p-sidebar-right .p-sidebar-md {\n width: 20rem;\n }\n } \n}\n",inlineStyles:{mask:function(e){var n=e.props;return{position:"fixed",height:"100%",width:"100%",left:0,top:0,display:"flex",justifyContent:"left"===n.position?"flex-start":"right"===n.position?"flex-end":"center",alignItems:"top"===n.position?"flex-start":"bottom"===n.position?"flex-end":"center"}}}}});function E(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function j(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?E(Object(t),!0).forEach((function(n){var r,i,a;r=e,a=t[n],(i=h(i=n))in r?Object.defineProperty(r,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[i]=a})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):E(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var k=d.forwardRef((function(e,c){var p=i.useMergeProps(),f=d.useContext(n.PrimeReactContext),m=O.getProps(e,f),h=w(d.useState(!1),2),y=h[0],v=h[1],g=w(d.useState(!1),2),x=g[0],S=g[1],E=O.setMetaData({props:m,state:{containerVisible:y}}),k=E.ptm,I=E.cx,P=E.sx;t.useHandleStyle(O.css.styles,E.isUnstyled,{name:"sidebar"});var N=d.useRef(null),C=d.useRef(null),D=d.useRef(null),R=i.useDisplayOrder("sidebar",x);i.useGlobalOnEscapeKey({callback:function(e){_(e)},when:x&&m.closeOnEscape&&R,priority:[i.ESC_KEY_HANDLING_PRIORITIES.SIDEBAR,R]});var U=w(i.useEventListener({type:"click",listener:function(e){0===e.button&&A(e)&&_(e)}}),2),T=U[0],q=U[1],A=function(e){return N&&N.current&&!N.current.contains(e.target)},_=function(e){m.onHide(),e.preventDefault()},B=function(){m.dismissable&&!m.modal&&T(),m.blockScroll&&l.DomHandler.blockBodyScroll()},H=function(){q(),m.blockScroll&&l.DomHandler.unblockBodyScroll()};d.useImperativeHandle(c,(function(){return{props:m,getElement:function(){return N.current},gteMask:function(){return C.current},getCloseIcon:function(){return D.current}}})),i.useMountEffect((function(){m.visible&&v(!0)})),i.useUpdateEffect((function(){m.visible&&!y&&v(!0),m.visible!==x&&y&&S(m.visible)})),i.useUpdateEffect((function(){y&&(l.ZIndexUtils.set("modal",C.current,f&&f.autoZIndex||b.default.autoZIndex,m.baseZIndex||f&&f.zIndex.modal||b.default.zIndex.modal),S(!0))}),[y]),i.useUpdateEffect((function(){x&&(q(),m.dismissable&&!m.modal&&T())}),[m.dismissable,m.modal,x]),i.useUnmountEffect((function(){H(),C.current&&l.ZIndexUtils.clear(C.current)}));var M,Z,z,L,J,X=function(){var e=m.ariaCloseLabel||n.localeOption("close"),t=p({type:"button",ref:D,className:I("closeButton"),onClick:function(e){return _(e)},"aria-label":e},k("closeButton")),r=p({className:I("closeIcon")},k("closeIcon")),i=l.IconUtils.getJSXIcon(m.closeIcon||d.createElement(a.TimesIcon,r),j({},r),{props:m});return m.showCloseIcon?d.createElement("button",t,i,d.createElement(s.Ripple,null)):null},V=p({ref:C,style:P("mask"),className:I("mask",{maskVisibleState:y}),onMouseDown:function(e){return n=e,void(m.dismissable&&m.modal&&C.current===n.target&&_(n));var n}},k("mask")),G=p({id:m.id,className:I("root",{context:f}),style:m.style,role:"complementary"},O.getOtherProps(m),k("root")),K=p({className:I("header")},k("header")),Y=p({className:I("content")},k("content")),F=p({className:I("icons")},k("icons")),$={enter:m.fullScreen?150:300,exit:m.fullScreen?150:300},Q=p({classNames:I("transition"),in:x,timeout:$,options:m.transitionOptions,unmountOnExit:!0,onEntered:function(){var e;m.onShow&&m.onShow(),!((e=document.activeElement)&&N&&N.current.contains(e))&&m.showCloseIcon&&D.current&&D.current.focus(),B()},onExiting:function(){m.modal&&l.DomHandler.addClass(C.current,"p-component-overlay-leave")},onExited:function(){l.ZIndexUtils.clear(C.current),v(!1),H()}},k("transition"));return y&&(J=null!=e&&e.content?(L={closeIconRef:D,hide:_},d.createElement("div",V,d.createElement(r.CSSTransition,u({nodeRef:N},Q),d.createElement("div",u({ref:N},G),l.ObjectUtils.getJSXElement(e.content,L))))):(M=X(),Z=m.icons?l.ObjectUtils.getJSXElement(m.icons,m):null,z=m.header?l.ObjectUtils.getJSXElement(m.header,m):null,d.createElement("div",V,d.createElement(r.CSSTransition,u({nodeRef:N},Q),d.createElement("div",u({ref:N},G),d.createElement("div",K,z,d.createElement("div",F,Z,M)),d.createElement("div",Y,m.children))))),d.createElement(o.Portal,{element:J,appendTo:m.appendTo,visible:!0}))}));k.displayName="Sidebar",exports.Sidebar=k;
@@ -174,28 +174,30 @@ var inlineStyles = {
174
174
  var SidebarBase = ComponentBase.extend({
175
175
  defaultProps: {
176
176
  __TYPE: 'Sidebar',
177
- id: null,
178
- style: null,
179
- className: null,
180
- maskStyle: null,
181
- maskClassName: null,
182
- visible: false,
183
- position: 'left',
184
- fullScreen: false,
185
- blockScroll: false,
177
+ appendTo: null,
178
+ ariaCloseLabel: null,
186
179
  baseZIndex: 0,
187
- dismissable: true,
188
- showCloseIcon: true,
180
+ blockScroll: false,
181
+ children: undefined,
182
+ className: null,
189
183
  closeIcon: null,
190
- ariaCloseLabel: null,
191
184
  closeOnEscape: true,
185
+ content: null,
186
+ dismissable: true,
187
+ fullScreen: false,
188
+ header: null,
192
189
  icons: null,
190
+ id: null,
191
+ maskClassName: null,
192
+ maskStyle: null,
193
193
  modal: true,
194
- appendTo: null,
195
- transitionOptions: null,
196
- onShow: null,
197
194
  onHide: null,
198
- children: undefined
195
+ onShow: null,
196
+ position: 'left',
197
+ showCloseIcon: true,
198
+ style: null,
199
+ transitionOptions: null,
200
+ visible: false
199
201
  },
200
202
  css: {
201
203
  classes: classes,
@@ -1 +1 @@
1
- import*as e from"react";import n,{PrimeReactContext as t,localeOption as r}from"primereact/api";import{ComponentBase as i,useHandleStyle as a}from"primereact/componentbase";import{CSSTransition as o}from"primereact/csstransition";import{useMergeProps as s,useDisplayOrder as l,useGlobalOnEscapeKey as p,ESC_KEY_HANDLING_PRIORITIES as c,useEventListener as d,useMountEffect as b,useUpdateEffect as u,useUnmountEffect as m}from"primereact/hooks";import{TimesIcon as f}from"primereact/icons/times";import{Portal as h}from"primereact/portal";import{Ripple as v}from"primereact/ripple";import{classNames as y,ZIndexUtils as g,DomHandler as x,ObjectUtils as w,IconUtils as S}from"primereact/utils";function O(){return O=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},O.apply(this,arguments)}function k(e){return k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},k(e)}function E(e,n){if("object"!==k(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!==k(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}function j(e){var n=E(e,"string");return"symbol"===k(n)?n:String(n)}function I(e){if(Array.isArray(e))return e}function P(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,i,a,o,s=[],l=!0,p=!1;try{if(a=(t=t.call(e)).next,0===n){if(Object(t)!==t)return;l=!1}else for(;!(l=(r=a.call(t)).done)&&(s.push(r.value),s.length!==n);l=!0);}catch(e){p=!0,i=e}finally{try{if(!l&&null!=t.return&&(o=t.return(),Object(o)!==o))return}finally{if(p)throw i}}return s}}function N(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function C(e,n){if(e){if("string"==typeof e)return N(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?N(e,n):void 0}}function R(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function A(e,n){return I(e)||P(e,n)||C(e,n)||R()}var D=i.extend({defaultProps:{__TYPE:"Sidebar",id:null,style:null,className:null,maskStyle:null,maskClassName:null,visible:!1,position:"left",fullScreen:!1,blockScroll:!1,baseZIndex:0,dismissable:!0,showCloseIcon:!0,closeIcon:null,ariaCloseLabel:null,closeOnEscape:!0,icons:null,modal:!0,appendTo:null,transitionOptions:null,onShow:null,onHide:null,children:void 0},css:{classes:{closeButton:"p-sidebar-close p-sidebar-icon p-link",closeIcon:"p-sidebar-close-icon",mask:function(e){var n=e.props,t=e.maskVisibleState,r=["left","right","top","bottom"].find((function(e){return e===n.position}));return y("p-sidebar-mask",r&&!n.fullScreen?"p-sidebar-".concat(r):"",{"p-component-overlay p-component-overlay-enter":n.modal,"p-sidebar-mask-scrollblocker":n.blockScroll,"p-sidebar-visible":t,"p-sidebar-full":n.fullScreen},n.maskClassName)},header:function(e){return y("p-sidebar-header",{"p-sidebar-custom-header":e.props.header})},content:"p-sidebar-content",icons:"p-sidebar-icons",root:function(e){var t=e.context;return y("p-sidebar p-component",e.props.className,{"p-input-filled":t&&"filled"===t.inputStyle||"filled"===n.inputStyle,"p-ripple-disabled":t&&!1===t.ripple||!1===n.ripple})},transition:"p-sidebar"},styles:"\n@layer primereact {\n .p-sidebar-mask {\n display: none;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n background-color: transparent;\n transition-property: background-color;\n }\n \n .p-sidebar-visible {\n display: flex;\n }\n \n .p-sidebar-mask.p-component-overlay {\n pointer-events: auto;\n }\n \n .p-sidebar {\n display: flex;\n flex-direction: column;\n pointer-events: auto;\n transform: translate3d(0px, 0px, 0px);\n position: relative;\n }\n \n .p-sidebar-content {\n overflow-y: auto;\n flex-grow: 1;\n }\n \n .p-sidebar-header {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n }\n \n .p-sidebar-custom-header {\n justify-content: space-between;\n }\n \n .p-sidebar-icons {\n display: flex;\n align-items: center;\n flex-shrink: 0;\n }\n \n .p-sidebar-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n }\n \n .p-sidebar-full .p-sidebar {\n transition: none;\n transform: none;\n width: 100vw;\n height: 100vh;\n max-height: 100%;\n top: 0px;\n left: 0px;\n }\n \n /* Animation */\n /* Top, Bottom, Left and Right */\n .p-sidebar-top .p-sidebar-enter,\n .p-sidebar-top .p-sidebar-exit-active {\n transform: translate3d(0px, -100%, 0px);\n }\n \n .p-sidebar-bottom .p-sidebar-enter,\n .p-sidebar-bottom .p-sidebar-exit-active {\n transform: translate3d(0px, 100%, 0px);\n }\n \n .p-sidebar-left .p-sidebar-enter,\n .p-sidebar-left .p-sidebar-exit-active {\n transform: translate3d(-100%, 0px, 0px);\n }\n \n .p-sidebar-right .p-sidebar-enter,\n .p-sidebar-right .p-sidebar-exit-active {\n transform: translate3d(100%, 0px, 0px);\n }\n \n .p-sidebar-top .p-sidebar-enter-active,\n .p-sidebar-bottom .p-sidebar-enter-active,\n .p-sidebar-left .p-sidebar-enter-active,\n .p-sidebar-right .p-sidebar-enter-active {\n transform: translate3d(0px, 0px, 0px);\n transition: all 0.3s;\n }\n \n .p-sidebar-top .p-sidebar-enter-done,\n .p-sidebar-bottom .p-sidebar-enter-done,\n .p-sidebar-left .p-sidebar-enter-done,\n .p-sidebar-right .p-sidebar-enter-done {\n transform: none;\n }\n \n .p-sidebar-top .p-sidebar-exit-active,\n .p-sidebar-bottom .p-sidebar-exit-active,\n .p-sidebar-left .p-sidebar-exit-active,\n .p-sidebar-right .p-sidebar-exit-active {\n transition: all 0.3s;\n }\n \n /* Full */\n .p-sidebar-full .p-sidebar-enter {\n opacity: 0;\n transform: scale(0.5);\n }\n \n .p-sidebar-full .p-sidebar-enter-active {\n opacity: 1;\n transform: scale(1);\n transition: all 0.15s cubic-bezier(0, 0, 0.2, 1);\n }\n \n .p-sidebar-full .p-sidebar-enter-done {\n transform: none;\n }\n \n .p-sidebar-full .p-sidebar-exit-active {\n opacity: 0;\n transform: scale(0.5);\n transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);\n }\n \n /* Size */\n .p-sidebar-left .p-sidebar {\n width: 20rem;\n height: 100%;\n }\n \n .p-sidebar-right .p-sidebar {\n width: 20rem;\n height: 100%;\n }\n \n .p-sidebar-top .p-sidebar {\n height: 10rem;\n width: 100%;\n }\n \n .p-sidebar-bottom .p-sidebar {\n height: 10rem;\n width: 100%;\n }\n \n .p-sidebar-left .p-sidebar-sm,\n .p-sidebar-right .p-sidebar-sm {\n width: 20rem;\n }\n \n .p-sidebar-left .p-sidebar-md,\n .p-sidebar-right .p-sidebar-md {\n width: 40rem;\n }\n \n .p-sidebar-left .p-sidebar-lg,\n .p-sidebar-right .p-sidebar-lg {\n width: 60rem;\n }\n \n .p-sidebar-top .p-sidebar-sm,\n .p-sidebar-bottom .p-sidebar-sm {\n height: 10rem;\n }\n \n .p-sidebar-top .p-sidebar-md,\n .p-sidebar-bottom .p-sidebar-md {\n height: 20rem;\n }\n \n .p-sidebar-top .p-sidebar-lg,\n .p-sidebar-bottom .p-sidebar-lg {\n height: 30rem;\n }\n \n .p-sidebar-left .p-sidebar-view,\n .p-sidebar-right .p-sidebar-view,\n .p-sidebar-top .p-sidebar-view,\n .p-sidebar-bottom .p-sidebar-view {\n width: 100%;\n height: 100%;\n }\n \n .p-sidebar-left .p-sidebar-content,\n .p-sidebar-right .p-sidebar-content,\n .p-sidebar-top .p-sidebar-content,\n .p-sidebar-bottom .p-sidebar-content {\n width: 100%;\n height: 100%;\n }\n \n @media screen and (max-width: 64em) {\n .p-sidebar-left .p-sidebar-lg,\n .p-sidebar-left .p-sidebar-md,\n .p-sidebar-right .p-sidebar-lg,\n .p-sidebar-right .p-sidebar-md {\n width: 20rem;\n }\n } \n}\n",inlineStyles:{mask:function(e){var n=e.props;return{position:"fixed",height:"100%",width:"100%",left:0,top:0,display:"flex",justifyContent:"left"===n.position?"flex-start":"right"===n.position?"flex-end":"center",alignItems:"top"===n.position?"flex-start":"bottom"===n.position?"flex-end":"center"}}}}});function B(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function T(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?B(Object(t),!0).forEach((function(n){var r,i,a;r=e,a=t[n],(i=j(i=n))in r?Object.defineProperty(r,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[i]=a})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):B(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var z=e.forwardRef((function(i,y){var k=s(),E=e.useContext(t),j=D.getProps(i,E),I=A(e.useState(!1),2),P=I[0],N=I[1],C=A(e.useState(!1),2),R=C[0],B=C[1],z=D.setMetaData({props:j,state:{containerVisible:P}}),J=z.ptm,M=z.cx,X=z.sx;a(D.css.styles,z.isUnstyled,{name:"sidebar"});var Z=e.useRef(null),H=e.useRef(null),L=e.useRef(null),V=l("sidebar",R);p({callback:function(e){$(e)},when:R&&j.closeOnEscape&&V,priority:[c.SIDEBAR,V]});var U=A(d({type:"click",listener:function(e){0===e.button&&Y(e)&&$(e)}}),2),_=U[0],F=U[1],Y=function(e){return Z&&Z.current&&!Z.current.contains(e.target)},$=function(e){j.onHide(),e.preventDefault()},q=function(){j.dismissable&&!j.modal&&_(),j.blockScroll&&x.blockBodyScroll()},G=function(){F(),j.blockScroll&&x.unblockBodyScroll()};e.useImperativeHandle(y,(function(){return{props:j,getElement:function(){return Z.current},gteMask:function(){return H.current},getCloseIcon:function(){return L.current}}})),b((function(){j.visible&&N(!0)})),u((function(){j.visible&&!P&&N(!0),j.visible!==R&&P&&B(j.visible)})),u((function(){P&&(g.set("modal",H.current,E&&E.autoZIndex||n.autoZIndex,j.baseZIndex||E&&E.zIndex.modal||n.zIndex.modal),B(!0))}),[P]),u((function(){R&&(F(),j.dismissable&&!j.modal&&_())}),[j.dismissable,j.modal,R]),m((function(){G(),H.current&&g.clear(H.current)}));var K,Q,W,ee,ne,te=function(){var n=j.ariaCloseLabel||r("close"),t=k({type:"button",ref:L,className:M("closeButton"),onClick:function(e){return $(e)},"aria-label":n},J("closeButton")),i=k({className:M("closeIcon")},J("closeIcon")),a=S.getJSXIcon(j.closeIcon||e.createElement(f,i),T({},i),{props:j});return j.showCloseIcon?e.createElement("button",t,a,e.createElement(v,null)):null},re=k({ref:H,style:X("mask"),className:M("mask",{maskVisibleState:P}),onMouseDown:function(e){return n=e,void(j.dismissable&&j.modal&&H.current===n.target&&$(n));var n}},J("mask")),ie=k({id:j.id,className:M("root",{context:E}),style:j.style,role:"complementary"},D.getOtherProps(j),J("root")),ae=k({className:M("header")},J("header")),oe=k({className:M("content")},J("content")),se=k({className:M("icons")},J("icons")),le={enter:j.fullScreen?150:300,exit:j.fullScreen?150:300},pe=k({classNames:M("transition"),in:R,timeout:le,options:j.transitionOptions,unmountOnExit:!0,onEntered:function(){var e;j.onShow&&j.onShow(),!((e=document.activeElement)&&Z&&Z.current.contains(e))&&j.showCloseIcon&&L.current&&L.current.focus(),q()},onExiting:function(){j.modal&&x.addClass(H.current,"p-component-overlay-leave")},onExited:function(){g.clear(H.current),N(!1),G()}},J("transition"));return P&&(ne=null!=i&&i.content?(ee={closeIconRef:L,hide:$},e.createElement("div",re,e.createElement(o,O({nodeRef:Z},pe),e.createElement("div",O({ref:Z},ie),w.getJSXElement(i.content,ee))))):(K=te(),Q=j.icons?w.getJSXElement(j.icons,j):null,W=j.header?w.getJSXElement(j.header,j):null,e.createElement("div",re,e.createElement(o,O({nodeRef:Z},pe),e.createElement("div",O({ref:Z},ie),e.createElement("div",ae,W,e.createElement("div",se,Q,K)),e.createElement("div",oe,j.children))))),e.createElement(h,{element:ne,appendTo:j.appendTo,visible:!0}))}));z.displayName="Sidebar";export{z as Sidebar};
1
+ import*as e from"react";import n,{PrimeReactContext as t,localeOption as r}from"primereact/api";import{ComponentBase as i,useHandleStyle as a}from"primereact/componentbase";import{CSSTransition as o}from"primereact/csstransition";import{useMergeProps as s,useDisplayOrder as l,useGlobalOnEscapeKey as p,ESC_KEY_HANDLING_PRIORITIES as c,useEventListener as d,useMountEffect as b,useUpdateEffect as u,useUnmountEffect as m}from"primereact/hooks";import{TimesIcon as f}from"primereact/icons/times";import{Portal as h}from"primereact/portal";import{Ripple as v}from"primereact/ripple";import{classNames as y,ZIndexUtils as g,DomHandler as x,ObjectUtils as w,IconUtils as S}from"primereact/utils";function O(){return O=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},O.apply(this,arguments)}function k(e){return k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},k(e)}function E(e,n){if("object"!==k(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!==k(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}function j(e){var n=E(e,"string");return"symbol"===k(n)?n:String(n)}function I(e){if(Array.isArray(e))return e}function P(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,i,a,o,s=[],l=!0,p=!1;try{if(a=(t=t.call(e)).next,0===n){if(Object(t)!==t)return;l=!1}else for(;!(l=(r=a.call(t)).done)&&(s.push(r.value),s.length!==n);l=!0);}catch(e){p=!0,i=e}finally{try{if(!l&&null!=t.return&&(o=t.return(),Object(o)!==o))return}finally{if(p)throw i}}return s}}function N(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function C(e,n){if(e){if("string"==typeof e)return N(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?N(e,n):void 0}}function R(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function A(e,n){return I(e)||P(e,n)||C(e,n)||R()}var D=i.extend({defaultProps:{__TYPE:"Sidebar",appendTo:null,ariaCloseLabel:null,baseZIndex:0,blockScroll:!1,children:void 0,className:null,closeIcon:null,closeOnEscape:!0,content:null,dismissable:!0,fullScreen:!1,header:null,icons:null,id:null,maskClassName:null,maskStyle:null,modal:!0,onHide:null,onShow:null,position:"left",showCloseIcon:!0,style:null,transitionOptions:null,visible:!1},css:{classes:{closeButton:"p-sidebar-close p-sidebar-icon p-link",closeIcon:"p-sidebar-close-icon",mask:function(e){var n=e.props,t=e.maskVisibleState,r=["left","right","top","bottom"].find((function(e){return e===n.position}));return y("p-sidebar-mask",r&&!n.fullScreen?"p-sidebar-".concat(r):"",{"p-component-overlay p-component-overlay-enter":n.modal,"p-sidebar-mask-scrollblocker":n.blockScroll,"p-sidebar-visible":t,"p-sidebar-full":n.fullScreen},n.maskClassName)},header:function(e){return y("p-sidebar-header",{"p-sidebar-custom-header":e.props.header})},content:"p-sidebar-content",icons:"p-sidebar-icons",root:function(e){var t=e.context;return y("p-sidebar p-component",e.props.className,{"p-input-filled":t&&"filled"===t.inputStyle||"filled"===n.inputStyle,"p-ripple-disabled":t&&!1===t.ripple||!1===n.ripple})},transition:"p-sidebar"},styles:"\n@layer primereact {\n .p-sidebar-mask {\n display: none;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n background-color: transparent;\n transition-property: background-color;\n }\n \n .p-sidebar-visible {\n display: flex;\n }\n \n .p-sidebar-mask.p-component-overlay {\n pointer-events: auto;\n }\n \n .p-sidebar {\n display: flex;\n flex-direction: column;\n pointer-events: auto;\n transform: translate3d(0px, 0px, 0px);\n position: relative;\n }\n \n .p-sidebar-content {\n overflow-y: auto;\n flex-grow: 1;\n }\n \n .p-sidebar-header {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n }\n \n .p-sidebar-custom-header {\n justify-content: space-between;\n }\n \n .p-sidebar-icons {\n display: flex;\n align-items: center;\n flex-shrink: 0;\n }\n \n .p-sidebar-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n }\n \n .p-sidebar-full .p-sidebar {\n transition: none;\n transform: none;\n width: 100vw;\n height: 100vh;\n max-height: 100%;\n top: 0px;\n left: 0px;\n }\n \n /* Animation */\n /* Top, Bottom, Left and Right */\n .p-sidebar-top .p-sidebar-enter,\n .p-sidebar-top .p-sidebar-exit-active {\n transform: translate3d(0px, -100%, 0px);\n }\n \n .p-sidebar-bottom .p-sidebar-enter,\n .p-sidebar-bottom .p-sidebar-exit-active {\n transform: translate3d(0px, 100%, 0px);\n }\n \n .p-sidebar-left .p-sidebar-enter,\n .p-sidebar-left .p-sidebar-exit-active {\n transform: translate3d(-100%, 0px, 0px);\n }\n \n .p-sidebar-right .p-sidebar-enter,\n .p-sidebar-right .p-sidebar-exit-active {\n transform: translate3d(100%, 0px, 0px);\n }\n \n .p-sidebar-top .p-sidebar-enter-active,\n .p-sidebar-bottom .p-sidebar-enter-active,\n .p-sidebar-left .p-sidebar-enter-active,\n .p-sidebar-right .p-sidebar-enter-active {\n transform: translate3d(0px, 0px, 0px);\n transition: all 0.3s;\n }\n \n .p-sidebar-top .p-sidebar-enter-done,\n .p-sidebar-bottom .p-sidebar-enter-done,\n .p-sidebar-left .p-sidebar-enter-done,\n .p-sidebar-right .p-sidebar-enter-done {\n transform: none;\n }\n \n .p-sidebar-top .p-sidebar-exit-active,\n .p-sidebar-bottom .p-sidebar-exit-active,\n .p-sidebar-left .p-sidebar-exit-active,\n .p-sidebar-right .p-sidebar-exit-active {\n transition: all 0.3s;\n }\n \n /* Full */\n .p-sidebar-full .p-sidebar-enter {\n opacity: 0;\n transform: scale(0.5);\n }\n \n .p-sidebar-full .p-sidebar-enter-active {\n opacity: 1;\n transform: scale(1);\n transition: all 0.15s cubic-bezier(0, 0, 0.2, 1);\n }\n \n .p-sidebar-full .p-sidebar-enter-done {\n transform: none;\n }\n \n .p-sidebar-full .p-sidebar-exit-active {\n opacity: 0;\n transform: scale(0.5);\n transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);\n }\n \n /* Size */\n .p-sidebar-left .p-sidebar {\n width: 20rem;\n height: 100%;\n }\n \n .p-sidebar-right .p-sidebar {\n width: 20rem;\n height: 100%;\n }\n \n .p-sidebar-top .p-sidebar {\n height: 10rem;\n width: 100%;\n }\n \n .p-sidebar-bottom .p-sidebar {\n height: 10rem;\n width: 100%;\n }\n \n .p-sidebar-left .p-sidebar-sm,\n .p-sidebar-right .p-sidebar-sm {\n width: 20rem;\n }\n \n .p-sidebar-left .p-sidebar-md,\n .p-sidebar-right .p-sidebar-md {\n width: 40rem;\n }\n \n .p-sidebar-left .p-sidebar-lg,\n .p-sidebar-right .p-sidebar-lg {\n width: 60rem;\n }\n \n .p-sidebar-top .p-sidebar-sm,\n .p-sidebar-bottom .p-sidebar-sm {\n height: 10rem;\n }\n \n .p-sidebar-top .p-sidebar-md,\n .p-sidebar-bottom .p-sidebar-md {\n height: 20rem;\n }\n \n .p-sidebar-top .p-sidebar-lg,\n .p-sidebar-bottom .p-sidebar-lg {\n height: 30rem;\n }\n \n .p-sidebar-left .p-sidebar-view,\n .p-sidebar-right .p-sidebar-view,\n .p-sidebar-top .p-sidebar-view,\n .p-sidebar-bottom .p-sidebar-view {\n width: 100%;\n height: 100%;\n }\n \n .p-sidebar-left .p-sidebar-content,\n .p-sidebar-right .p-sidebar-content,\n .p-sidebar-top .p-sidebar-content,\n .p-sidebar-bottom .p-sidebar-content {\n width: 100%;\n height: 100%;\n }\n \n @media screen and (max-width: 64em) {\n .p-sidebar-left .p-sidebar-lg,\n .p-sidebar-left .p-sidebar-md,\n .p-sidebar-right .p-sidebar-lg,\n .p-sidebar-right .p-sidebar-md {\n width: 20rem;\n }\n } \n}\n",inlineStyles:{mask:function(e){var n=e.props;return{position:"fixed",height:"100%",width:"100%",left:0,top:0,display:"flex",justifyContent:"left"===n.position?"flex-start":"right"===n.position?"flex-end":"center",alignItems:"top"===n.position?"flex-start":"bottom"===n.position?"flex-end":"center"}}}}});function B(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function T(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?B(Object(t),!0).forEach((function(n){var r,i,a;r=e,a=t[n],(i=j(i=n))in r?Object.defineProperty(r,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[i]=a})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):B(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var z=e.forwardRef((function(i,y){var k=s(),E=e.useContext(t),j=D.getProps(i,E),I=A(e.useState(!1),2),P=I[0],N=I[1],C=A(e.useState(!1),2),R=C[0],B=C[1],z=D.setMetaData({props:j,state:{containerVisible:P}}),J=z.ptm,M=z.cx,X=z.sx;a(D.css.styles,z.isUnstyled,{name:"sidebar"});var Z=e.useRef(null),H=e.useRef(null),L=e.useRef(null),V=l("sidebar",R);p({callback:function(e){$(e)},when:R&&j.closeOnEscape&&V,priority:[c.SIDEBAR,V]});var U=A(d({type:"click",listener:function(e){0===e.button&&Y(e)&&$(e)}}),2),_=U[0],F=U[1],Y=function(e){return Z&&Z.current&&!Z.current.contains(e.target)},$=function(e){j.onHide(),e.preventDefault()},q=function(){j.dismissable&&!j.modal&&_(),j.blockScroll&&x.blockBodyScroll()},G=function(){F(),j.blockScroll&&x.unblockBodyScroll()};e.useImperativeHandle(y,(function(){return{props:j,getElement:function(){return Z.current},gteMask:function(){return H.current},getCloseIcon:function(){return L.current}}})),b((function(){j.visible&&N(!0)})),u((function(){j.visible&&!P&&N(!0),j.visible!==R&&P&&B(j.visible)})),u((function(){P&&(g.set("modal",H.current,E&&E.autoZIndex||n.autoZIndex,j.baseZIndex||E&&E.zIndex.modal||n.zIndex.modal),B(!0))}),[P]),u((function(){R&&(F(),j.dismissable&&!j.modal&&_())}),[j.dismissable,j.modal,R]),m((function(){G(),H.current&&g.clear(H.current)}));var K,Q,W,ee,ne,te=function(){var n=j.ariaCloseLabel||r("close"),t=k({type:"button",ref:L,className:M("closeButton"),onClick:function(e){return $(e)},"aria-label":n},J("closeButton")),i=k({className:M("closeIcon")},J("closeIcon")),a=S.getJSXIcon(j.closeIcon||e.createElement(f,i),T({},i),{props:j});return j.showCloseIcon?e.createElement("button",t,a,e.createElement(v,null)):null},re=k({ref:H,style:X("mask"),className:M("mask",{maskVisibleState:P}),onMouseDown:function(e){return n=e,void(j.dismissable&&j.modal&&H.current===n.target&&$(n));var n}},J("mask")),ie=k({id:j.id,className:M("root",{context:E}),style:j.style,role:"complementary"},D.getOtherProps(j),J("root")),ae=k({className:M("header")},J("header")),oe=k({className:M("content")},J("content")),se=k({className:M("icons")},J("icons")),le={enter:j.fullScreen?150:300,exit:j.fullScreen?150:300},pe=k({classNames:M("transition"),in:R,timeout:le,options:j.transitionOptions,unmountOnExit:!0,onEntered:function(){var e;j.onShow&&j.onShow(),!((e=document.activeElement)&&Z&&Z.current.contains(e))&&j.showCloseIcon&&L.current&&L.current.focus(),q()},onExiting:function(){j.modal&&x.addClass(H.current,"p-component-overlay-leave")},onExited:function(){g.clear(H.current),N(!1),G()}},J("transition"));return P&&(ne=null!=i&&i.content?(ee={closeIconRef:L,hide:$},e.createElement("div",re,e.createElement(o,O({nodeRef:Z},pe),e.createElement("div",O({ref:Z},ie),w.getJSXElement(i.content,ee))))):(K=te(),Q=j.icons?w.getJSXElement(j.icons,j):null,W=j.header?w.getJSXElement(j.header,j):null,e.createElement("div",re,e.createElement(o,O({nodeRef:Z},pe),e.createElement("div",O({ref:Z},ie),e.createElement("div",ae,W,e.createElement("div",se,Q,K)),e.createElement("div",oe,j.children))))),e.createElement(h,{element:ne,appendTo:j.appendTo,visible:!0}))}));z.displayName="Sidebar";export{z as Sidebar};
@@ -190,28 +190,30 @@ this.primereact.sidebar = (function (exports, React, PrimeReact, componentbase,
190
190
  var SidebarBase = componentbase.ComponentBase.extend({
191
191
  defaultProps: {
192
192
  __TYPE: 'Sidebar',
193
- id: null,
194
- style: null,
195
- className: null,
196
- maskStyle: null,
197
- maskClassName: null,
198
- visible: false,
199
- position: 'left',
200
- fullScreen: false,
201
- blockScroll: false,
193
+ appendTo: null,
194
+ ariaCloseLabel: null,
202
195
  baseZIndex: 0,
203
- dismissable: true,
204
- showCloseIcon: true,
196
+ blockScroll: false,
197
+ children: undefined,
198
+ className: null,
205
199
  closeIcon: null,
206
- ariaCloseLabel: null,
207
200
  closeOnEscape: true,
201
+ content: null,
202
+ dismissable: true,
203
+ fullScreen: false,
204
+ header: null,
208
205
  icons: null,
206
+ id: null,
207
+ maskClassName: null,
208
+ maskStyle: null,
209
209
  modal: true,
210
- appendTo: null,
211
- transitionOptions: null,
212
- onShow: null,
213
210
  onHide: null,
214
- children: undefined
211
+ onShow: null,
212
+ position: 'left',
213
+ showCloseIcon: true,
214
+ style: null,
215
+ transitionOptions: null,
216
+ visible: false
215
217
  },
216
218
  css: {
217
219
  classes: classes,
@@ -1 +1 @@
1
- this.primereact=this.primereact||{},this.primereact.sidebar=function(e,n,t,r,i,a,o,s,l,c){"use strict";function p(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function d(e){if(e&&e.__esModule)return e;var n=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}})),n.default=e,Object.freeze(n)}var b=d(n),u=p(t);function f(){return f=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},f.apply(this,arguments)}function m(e){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m(e)}function h(e,n){if("object"!==m(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!==m(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}function y(e){var n=h(e,"string");return"symbol"===m(n)?n:String(n)}function v(e){if(Array.isArray(e))return e}function g(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,i,a,o,s=[],l=!0,c=!1;try{if(a=(t=t.call(e)).next,0===n){if(Object(t)!==t)return;l=!1}else for(;!(l=(r=a.call(t)).done)&&(s.push(r.value),s.length!==n);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=t.return&&(o=t.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}function x(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function S(e,n){if(e){if("string"==typeof e)return x(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?x(e,n):void 0}}function w(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function O(e,n){return v(e)||g(e,n)||S(e,n)||w()}var E=r.ComponentBase.extend({defaultProps:{__TYPE:"Sidebar",id:null,style:null,className:null,maskStyle:null,maskClassName:null,visible:!1,position:"left",fullScreen:!1,blockScroll:!1,baseZIndex:0,dismissable:!0,showCloseIcon:!0,closeIcon:null,ariaCloseLabel:null,closeOnEscape:!0,icons:null,modal:!0,appendTo:null,transitionOptions:null,onShow:null,onHide:null,children:void 0},css:{classes:{closeButton:"p-sidebar-close p-sidebar-icon p-link",closeIcon:"p-sidebar-close-icon",mask:function(e){var n=e.props,t=e.maskVisibleState,r=["left","right","top","bottom"].find((function(e){return e===n.position}));return c.classNames("p-sidebar-mask",r&&!n.fullScreen?"p-sidebar-".concat(r):"",{"p-component-overlay p-component-overlay-enter":n.modal,"p-sidebar-mask-scrollblocker":n.blockScroll,"p-sidebar-visible":t,"p-sidebar-full":n.fullScreen},n.maskClassName)},header:function(e){return c.classNames("p-sidebar-header",{"p-sidebar-custom-header":e.props.header})},content:"p-sidebar-content",icons:"p-sidebar-icons",root:function(e){var n=e.context;return c.classNames("p-sidebar p-component",e.props.className,{"p-input-filled":n&&"filled"===n.inputStyle||"filled"===u.default.inputStyle,"p-ripple-disabled":n&&!1===n.ripple||!1===u.default.ripple})},transition:"p-sidebar"},styles:"\n@layer primereact {\n .p-sidebar-mask {\n display: none;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n background-color: transparent;\n transition-property: background-color;\n }\n \n .p-sidebar-visible {\n display: flex;\n }\n \n .p-sidebar-mask.p-component-overlay {\n pointer-events: auto;\n }\n \n .p-sidebar {\n display: flex;\n flex-direction: column;\n pointer-events: auto;\n transform: translate3d(0px, 0px, 0px);\n position: relative;\n }\n \n .p-sidebar-content {\n overflow-y: auto;\n flex-grow: 1;\n }\n \n .p-sidebar-header {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n }\n \n .p-sidebar-custom-header {\n justify-content: space-between;\n }\n \n .p-sidebar-icons {\n display: flex;\n align-items: center;\n flex-shrink: 0;\n }\n \n .p-sidebar-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n }\n \n .p-sidebar-full .p-sidebar {\n transition: none;\n transform: none;\n width: 100vw;\n height: 100vh;\n max-height: 100%;\n top: 0px;\n left: 0px;\n }\n \n /* Animation */\n /* Top, Bottom, Left and Right */\n .p-sidebar-top .p-sidebar-enter,\n .p-sidebar-top .p-sidebar-exit-active {\n transform: translate3d(0px, -100%, 0px);\n }\n \n .p-sidebar-bottom .p-sidebar-enter,\n .p-sidebar-bottom .p-sidebar-exit-active {\n transform: translate3d(0px, 100%, 0px);\n }\n \n .p-sidebar-left .p-sidebar-enter,\n .p-sidebar-left .p-sidebar-exit-active {\n transform: translate3d(-100%, 0px, 0px);\n }\n \n .p-sidebar-right .p-sidebar-enter,\n .p-sidebar-right .p-sidebar-exit-active {\n transform: translate3d(100%, 0px, 0px);\n }\n \n .p-sidebar-top .p-sidebar-enter-active,\n .p-sidebar-bottom .p-sidebar-enter-active,\n .p-sidebar-left .p-sidebar-enter-active,\n .p-sidebar-right .p-sidebar-enter-active {\n transform: translate3d(0px, 0px, 0px);\n transition: all 0.3s;\n }\n \n .p-sidebar-top .p-sidebar-enter-done,\n .p-sidebar-bottom .p-sidebar-enter-done,\n .p-sidebar-left .p-sidebar-enter-done,\n .p-sidebar-right .p-sidebar-enter-done {\n transform: none;\n }\n \n .p-sidebar-top .p-sidebar-exit-active,\n .p-sidebar-bottom .p-sidebar-exit-active,\n .p-sidebar-left .p-sidebar-exit-active,\n .p-sidebar-right .p-sidebar-exit-active {\n transition: all 0.3s;\n }\n \n /* Full */\n .p-sidebar-full .p-sidebar-enter {\n opacity: 0;\n transform: scale(0.5);\n }\n \n .p-sidebar-full .p-sidebar-enter-active {\n opacity: 1;\n transform: scale(1);\n transition: all 0.15s cubic-bezier(0, 0, 0.2, 1);\n }\n \n .p-sidebar-full .p-sidebar-enter-done {\n transform: none;\n }\n \n .p-sidebar-full .p-sidebar-exit-active {\n opacity: 0;\n transform: scale(0.5);\n transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);\n }\n \n /* Size */\n .p-sidebar-left .p-sidebar {\n width: 20rem;\n height: 100%;\n }\n \n .p-sidebar-right .p-sidebar {\n width: 20rem;\n height: 100%;\n }\n \n .p-sidebar-top .p-sidebar {\n height: 10rem;\n width: 100%;\n }\n \n .p-sidebar-bottom .p-sidebar {\n height: 10rem;\n width: 100%;\n }\n \n .p-sidebar-left .p-sidebar-sm,\n .p-sidebar-right .p-sidebar-sm {\n width: 20rem;\n }\n \n .p-sidebar-left .p-sidebar-md,\n .p-sidebar-right .p-sidebar-md {\n width: 40rem;\n }\n \n .p-sidebar-left .p-sidebar-lg,\n .p-sidebar-right .p-sidebar-lg {\n width: 60rem;\n }\n \n .p-sidebar-top .p-sidebar-sm,\n .p-sidebar-bottom .p-sidebar-sm {\n height: 10rem;\n }\n \n .p-sidebar-top .p-sidebar-md,\n .p-sidebar-bottom .p-sidebar-md {\n height: 20rem;\n }\n \n .p-sidebar-top .p-sidebar-lg,\n .p-sidebar-bottom .p-sidebar-lg {\n height: 30rem;\n }\n \n .p-sidebar-left .p-sidebar-view,\n .p-sidebar-right .p-sidebar-view,\n .p-sidebar-top .p-sidebar-view,\n .p-sidebar-bottom .p-sidebar-view {\n width: 100%;\n height: 100%;\n }\n \n .p-sidebar-left .p-sidebar-content,\n .p-sidebar-right .p-sidebar-content,\n .p-sidebar-top .p-sidebar-content,\n .p-sidebar-bottom .p-sidebar-content {\n width: 100%;\n height: 100%;\n }\n \n @media screen and (max-width: 64em) {\n .p-sidebar-left .p-sidebar-lg,\n .p-sidebar-left .p-sidebar-md,\n .p-sidebar-right .p-sidebar-lg,\n .p-sidebar-right .p-sidebar-md {\n width: 20rem;\n }\n } \n}\n",inlineStyles:{mask:function(e){var n=e.props;return{position:"fixed",height:"100%",width:"100%",left:0,top:0,display:"flex",justifyContent:"left"===n.position?"flex-start":"right"===n.position?"flex-end":"center",alignItems:"top"===n.position?"flex-start":"bottom"===n.position?"flex-end":"center"}}}}});function j(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function k(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?j(Object(t),!0).forEach((function(n){var r,i,a;r=e,a=t[n],(i=y(i=n))in r?Object.defineProperty(r,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[i]=a})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):j(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var I=b.forwardRef((function(e,n){var p=a.useMergeProps(),d=b.useContext(t.PrimeReactContext),m=E.getProps(e,d),h=O(b.useState(!1),2),y=h[0],v=h[1],g=O(b.useState(!1),2),x=g[0],S=g[1],w=E.setMetaData({props:m,state:{containerVisible:y}}),j=w.ptm,I=w.cx,P=w.sx;r.useHandleStyle(E.css.styles,w.isUnstyled,{name:"sidebar"});var N=b.useRef(null),C=b.useRef(null),D=b.useRef(null),R=a.useDisplayOrder("sidebar",x);a.useGlobalOnEscapeKey({callback:function(e){B(e)},when:x&&m.closeOnEscape&&R,priority:[a.ESC_KEY_HANDLING_PRIORITIES.SIDEBAR,R]});var U=O(a.useEventListener({type:"click",listener:function(e){0===e.button&&_(e)&&B(e)}}),2),T=U[0],A=U[1],_=function(e){return N&&N.current&&!N.current.contains(e.target)},B=function(e){m.onHide(),e.preventDefault()},H=function(){m.dismissable&&!m.modal&&T(),m.blockScroll&&c.DomHandler.blockBodyScroll()},M=function(){A(),m.blockScroll&&c.DomHandler.unblockBodyScroll()};b.useImperativeHandle(n,(function(){return{props:m,getElement:function(){return N.current},gteMask:function(){return C.current},getCloseIcon:function(){return D.current}}})),a.useMountEffect((function(){m.visible&&v(!0)})),a.useUpdateEffect((function(){m.visible&&!y&&v(!0),m.visible!==x&&y&&S(m.visible)})),a.useUpdateEffect((function(){y&&(c.ZIndexUtils.set("modal",C.current,d&&d.autoZIndex||u.default.autoZIndex,m.baseZIndex||d&&d.zIndex.modal||u.default.zIndex.modal),S(!0))}),[y]),a.useUpdateEffect((function(){x&&(A(),m.dismissable&&!m.modal&&T())}),[m.dismissable,m.modal,x]),a.useUnmountEffect((function(){M(),C.current&&c.ZIndexUtils.clear(C.current)}));var Z,z,L,J,X,V=function(){var e=m.ariaCloseLabel||t.localeOption("close"),n=p({type:"button",ref:D,className:I("closeButton"),onClick:function(e){return B(e)},"aria-label":e},j("closeButton")),r=p({className:I("closeIcon")},j("closeIcon")),i=c.IconUtils.getJSXIcon(m.closeIcon||b.createElement(o.TimesIcon,r),k({},r),{props:m});return m.showCloseIcon?b.createElement("button",n,i,b.createElement(l.Ripple,null)):null},G=p({ref:C,style:P("mask"),className:I("mask",{maskVisibleState:y}),onMouseDown:function(e){return n=e,void(m.dismissable&&m.modal&&C.current===n.target&&B(n));var n}},j("mask")),K=p({id:m.id,className:I("root",{context:d}),style:m.style,role:"complementary"},E.getOtherProps(m),j("root")),Y=p({className:I("header")},j("header")),F=p({className:I("content")},j("content")),$=p({className:I("icons")},j("icons")),q={enter:m.fullScreen?150:300,exit:m.fullScreen?150:300},Q=p({classNames:I("transition"),in:x,timeout:q,options:m.transitionOptions,unmountOnExit:!0,onEntered:function(){var e;m.onShow&&m.onShow(),!((e=document.activeElement)&&N&&N.current.contains(e))&&m.showCloseIcon&&D.current&&D.current.focus(),H()},onExiting:function(){m.modal&&c.DomHandler.addClass(C.current,"p-component-overlay-leave")},onExited:function(){c.ZIndexUtils.clear(C.current),v(!1),M()}},j("transition"));return y&&(X=null!=e&&e.content?(J={closeIconRef:D,hide:B},b.createElement("div",G,b.createElement(i.CSSTransition,f({nodeRef:N},Q),b.createElement("div",f({ref:N},K),c.ObjectUtils.getJSXElement(e.content,J))))):(Z=V(),z=m.icons?c.ObjectUtils.getJSXElement(m.icons,m):null,L=m.header?c.ObjectUtils.getJSXElement(m.header,m):null,b.createElement("div",G,b.createElement(i.CSSTransition,f({nodeRef:N},Q),b.createElement("div",f({ref:N},K),b.createElement("div",Y,L,b.createElement("div",$,z,Z)),b.createElement("div",F,m.children))))),b.createElement(s.Portal,{element:X,appendTo:m.appendTo,visible:!0}))}));return I.displayName="Sidebar",e.Sidebar=I,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.api,primereact.componentbase,primereact.csstransition,primereact.hooks,primereact.icons.times,primereact.portal,primereact.ripple,primereact.utils);
1
+ this.primereact=this.primereact||{},this.primereact.sidebar=function(e,n,t,r,i,a,o,s,l,c){"use strict";function p(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function d(e){if(e&&e.__esModule)return e;var n=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}})),n.default=e,Object.freeze(n)}var b=d(n),u=p(t);function f(){return f=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},f.apply(this,arguments)}function m(e){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m(e)}function h(e,n){if("object"!==m(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!==m(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}function y(e){var n=h(e,"string");return"symbol"===m(n)?n:String(n)}function v(e){if(Array.isArray(e))return e}function g(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,i,a,o,s=[],l=!0,c=!1;try{if(a=(t=t.call(e)).next,0===n){if(Object(t)!==t)return;l=!1}else for(;!(l=(r=a.call(t)).done)&&(s.push(r.value),s.length!==n);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=t.return&&(o=t.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}function x(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function S(e,n){if(e){if("string"==typeof e)return x(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?x(e,n):void 0}}function w(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function O(e,n){return v(e)||g(e,n)||S(e,n)||w()}var E=r.ComponentBase.extend({defaultProps:{__TYPE:"Sidebar",appendTo:null,ariaCloseLabel:null,baseZIndex:0,blockScroll:!1,children:void 0,className:null,closeIcon:null,closeOnEscape:!0,content:null,dismissable:!0,fullScreen:!1,header:null,icons:null,id:null,maskClassName:null,maskStyle:null,modal:!0,onHide:null,onShow:null,position:"left",showCloseIcon:!0,style:null,transitionOptions:null,visible:!1},css:{classes:{closeButton:"p-sidebar-close p-sidebar-icon p-link",closeIcon:"p-sidebar-close-icon",mask:function(e){var n=e.props,t=e.maskVisibleState,r=["left","right","top","bottom"].find((function(e){return e===n.position}));return c.classNames("p-sidebar-mask",r&&!n.fullScreen?"p-sidebar-".concat(r):"",{"p-component-overlay p-component-overlay-enter":n.modal,"p-sidebar-mask-scrollblocker":n.blockScroll,"p-sidebar-visible":t,"p-sidebar-full":n.fullScreen},n.maskClassName)},header:function(e){return c.classNames("p-sidebar-header",{"p-sidebar-custom-header":e.props.header})},content:"p-sidebar-content",icons:"p-sidebar-icons",root:function(e){var n=e.context;return c.classNames("p-sidebar p-component",e.props.className,{"p-input-filled":n&&"filled"===n.inputStyle||"filled"===u.default.inputStyle,"p-ripple-disabled":n&&!1===n.ripple||!1===u.default.ripple})},transition:"p-sidebar"},styles:"\n@layer primereact {\n .p-sidebar-mask {\n display: none;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n background-color: transparent;\n transition-property: background-color;\n }\n \n .p-sidebar-visible {\n display: flex;\n }\n \n .p-sidebar-mask.p-component-overlay {\n pointer-events: auto;\n }\n \n .p-sidebar {\n display: flex;\n flex-direction: column;\n pointer-events: auto;\n transform: translate3d(0px, 0px, 0px);\n position: relative;\n }\n \n .p-sidebar-content {\n overflow-y: auto;\n flex-grow: 1;\n }\n \n .p-sidebar-header {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n }\n \n .p-sidebar-custom-header {\n justify-content: space-between;\n }\n \n .p-sidebar-icons {\n display: flex;\n align-items: center;\n flex-shrink: 0;\n }\n \n .p-sidebar-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n }\n \n .p-sidebar-full .p-sidebar {\n transition: none;\n transform: none;\n width: 100vw;\n height: 100vh;\n max-height: 100%;\n top: 0px;\n left: 0px;\n }\n \n /* Animation */\n /* Top, Bottom, Left and Right */\n .p-sidebar-top .p-sidebar-enter,\n .p-sidebar-top .p-sidebar-exit-active {\n transform: translate3d(0px, -100%, 0px);\n }\n \n .p-sidebar-bottom .p-sidebar-enter,\n .p-sidebar-bottom .p-sidebar-exit-active {\n transform: translate3d(0px, 100%, 0px);\n }\n \n .p-sidebar-left .p-sidebar-enter,\n .p-sidebar-left .p-sidebar-exit-active {\n transform: translate3d(-100%, 0px, 0px);\n }\n \n .p-sidebar-right .p-sidebar-enter,\n .p-sidebar-right .p-sidebar-exit-active {\n transform: translate3d(100%, 0px, 0px);\n }\n \n .p-sidebar-top .p-sidebar-enter-active,\n .p-sidebar-bottom .p-sidebar-enter-active,\n .p-sidebar-left .p-sidebar-enter-active,\n .p-sidebar-right .p-sidebar-enter-active {\n transform: translate3d(0px, 0px, 0px);\n transition: all 0.3s;\n }\n \n .p-sidebar-top .p-sidebar-enter-done,\n .p-sidebar-bottom .p-sidebar-enter-done,\n .p-sidebar-left .p-sidebar-enter-done,\n .p-sidebar-right .p-sidebar-enter-done {\n transform: none;\n }\n \n .p-sidebar-top .p-sidebar-exit-active,\n .p-sidebar-bottom .p-sidebar-exit-active,\n .p-sidebar-left .p-sidebar-exit-active,\n .p-sidebar-right .p-sidebar-exit-active {\n transition: all 0.3s;\n }\n \n /* Full */\n .p-sidebar-full .p-sidebar-enter {\n opacity: 0;\n transform: scale(0.5);\n }\n \n .p-sidebar-full .p-sidebar-enter-active {\n opacity: 1;\n transform: scale(1);\n transition: all 0.15s cubic-bezier(0, 0, 0.2, 1);\n }\n \n .p-sidebar-full .p-sidebar-enter-done {\n transform: none;\n }\n \n .p-sidebar-full .p-sidebar-exit-active {\n opacity: 0;\n transform: scale(0.5);\n transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);\n }\n \n /* Size */\n .p-sidebar-left .p-sidebar {\n width: 20rem;\n height: 100%;\n }\n \n .p-sidebar-right .p-sidebar {\n width: 20rem;\n height: 100%;\n }\n \n .p-sidebar-top .p-sidebar {\n height: 10rem;\n width: 100%;\n }\n \n .p-sidebar-bottom .p-sidebar {\n height: 10rem;\n width: 100%;\n }\n \n .p-sidebar-left .p-sidebar-sm,\n .p-sidebar-right .p-sidebar-sm {\n width: 20rem;\n }\n \n .p-sidebar-left .p-sidebar-md,\n .p-sidebar-right .p-sidebar-md {\n width: 40rem;\n }\n \n .p-sidebar-left .p-sidebar-lg,\n .p-sidebar-right .p-sidebar-lg {\n width: 60rem;\n }\n \n .p-sidebar-top .p-sidebar-sm,\n .p-sidebar-bottom .p-sidebar-sm {\n height: 10rem;\n }\n \n .p-sidebar-top .p-sidebar-md,\n .p-sidebar-bottom .p-sidebar-md {\n height: 20rem;\n }\n \n .p-sidebar-top .p-sidebar-lg,\n .p-sidebar-bottom .p-sidebar-lg {\n height: 30rem;\n }\n \n .p-sidebar-left .p-sidebar-view,\n .p-sidebar-right .p-sidebar-view,\n .p-sidebar-top .p-sidebar-view,\n .p-sidebar-bottom .p-sidebar-view {\n width: 100%;\n height: 100%;\n }\n \n .p-sidebar-left .p-sidebar-content,\n .p-sidebar-right .p-sidebar-content,\n .p-sidebar-top .p-sidebar-content,\n .p-sidebar-bottom .p-sidebar-content {\n width: 100%;\n height: 100%;\n }\n \n @media screen and (max-width: 64em) {\n .p-sidebar-left .p-sidebar-lg,\n .p-sidebar-left .p-sidebar-md,\n .p-sidebar-right .p-sidebar-lg,\n .p-sidebar-right .p-sidebar-md {\n width: 20rem;\n }\n } \n}\n",inlineStyles:{mask:function(e){var n=e.props;return{position:"fixed",height:"100%",width:"100%",left:0,top:0,display:"flex",justifyContent:"left"===n.position?"flex-start":"right"===n.position?"flex-end":"center",alignItems:"top"===n.position?"flex-start":"bottom"===n.position?"flex-end":"center"}}}}});function j(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function k(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?j(Object(t),!0).forEach((function(n){var r,i,a;r=e,a=t[n],(i=y(i=n))in r?Object.defineProperty(r,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[i]=a})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):j(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var I=b.forwardRef((function(e,n){var p=a.useMergeProps(),d=b.useContext(t.PrimeReactContext),m=E.getProps(e,d),h=O(b.useState(!1),2),y=h[0],v=h[1],g=O(b.useState(!1),2),x=g[0],S=g[1],w=E.setMetaData({props:m,state:{containerVisible:y}}),j=w.ptm,I=w.cx,P=w.sx;r.useHandleStyle(E.css.styles,w.isUnstyled,{name:"sidebar"});var N=b.useRef(null),C=b.useRef(null),D=b.useRef(null),R=a.useDisplayOrder("sidebar",x);a.useGlobalOnEscapeKey({callback:function(e){B(e)},when:x&&m.closeOnEscape&&R,priority:[a.ESC_KEY_HANDLING_PRIORITIES.SIDEBAR,R]});var U=O(a.useEventListener({type:"click",listener:function(e){0===e.button&&_(e)&&B(e)}}),2),T=U[0],A=U[1],_=function(e){return N&&N.current&&!N.current.contains(e.target)},B=function(e){m.onHide(),e.preventDefault()},H=function(){m.dismissable&&!m.modal&&T(),m.blockScroll&&c.DomHandler.blockBodyScroll()},M=function(){A(),m.blockScroll&&c.DomHandler.unblockBodyScroll()};b.useImperativeHandle(n,(function(){return{props:m,getElement:function(){return N.current},gteMask:function(){return C.current},getCloseIcon:function(){return D.current}}})),a.useMountEffect((function(){m.visible&&v(!0)})),a.useUpdateEffect((function(){m.visible&&!y&&v(!0),m.visible!==x&&y&&S(m.visible)})),a.useUpdateEffect((function(){y&&(c.ZIndexUtils.set("modal",C.current,d&&d.autoZIndex||u.default.autoZIndex,m.baseZIndex||d&&d.zIndex.modal||u.default.zIndex.modal),S(!0))}),[y]),a.useUpdateEffect((function(){x&&(A(),m.dismissable&&!m.modal&&T())}),[m.dismissable,m.modal,x]),a.useUnmountEffect((function(){M(),C.current&&c.ZIndexUtils.clear(C.current)}));var Z,z,L,J,X,V=function(){var e=m.ariaCloseLabel||t.localeOption("close"),n=p({type:"button",ref:D,className:I("closeButton"),onClick:function(e){return B(e)},"aria-label":e},j("closeButton")),r=p({className:I("closeIcon")},j("closeIcon")),i=c.IconUtils.getJSXIcon(m.closeIcon||b.createElement(o.TimesIcon,r),k({},r),{props:m});return m.showCloseIcon?b.createElement("button",n,i,b.createElement(l.Ripple,null)):null},G=p({ref:C,style:P("mask"),className:I("mask",{maskVisibleState:y}),onMouseDown:function(e){return n=e,void(m.dismissable&&m.modal&&C.current===n.target&&B(n));var n}},j("mask")),K=p({id:m.id,className:I("root",{context:d}),style:m.style,role:"complementary"},E.getOtherProps(m),j("root")),Y=p({className:I("header")},j("header")),F=p({className:I("content")},j("content")),$=p({className:I("icons")},j("icons")),q={enter:m.fullScreen?150:300,exit:m.fullScreen?150:300},Q=p({classNames:I("transition"),in:x,timeout:q,options:m.transitionOptions,unmountOnExit:!0,onEntered:function(){var e;m.onShow&&m.onShow(),!((e=document.activeElement)&&N&&N.current.contains(e))&&m.showCloseIcon&&D.current&&D.current.focus(),H()},onExiting:function(){m.modal&&c.DomHandler.addClass(C.current,"p-component-overlay-leave")},onExited:function(){c.ZIndexUtils.clear(C.current),v(!1),M()}},j("transition"));return y&&(X=null!=e&&e.content?(J={closeIconRef:D,hide:B},b.createElement("div",G,b.createElement(i.CSSTransition,f({nodeRef:N},Q),b.createElement("div",f({ref:N},K),c.ObjectUtils.getJSXElement(e.content,J))))):(Z=V(),z=m.icons?c.ObjectUtils.getJSXElement(m.icons,m):null,L=m.header?c.ObjectUtils.getJSXElement(m.header,m):null,b.createElement("div",G,b.createElement(i.CSSTransition,f({nodeRef:N},Q),b.createElement("div",f({ref:N},K),b.createElement("div",Y,L,b.createElement("div",$,z,Z)),b.createElement("div",F,m.children))))),b.createElement(s.Portal,{element:X,appendTo:m.appendTo,visible:!0}))}));return I.displayName="Sidebar",e.Sidebar=I,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.api,primereact.componentbase,primereact.csstransition,primereact.hooks,primereact.icons.times,primereact.portal,primereact.ripple,primereact.utils);
@@ -328,10 +328,31 @@ var Slider = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.f
328
328
  }
329
329
  handleIndex.current = index;
330
330
  var key = event.key;
331
- if (key === 'ArrowRight' || key === 'ArrowUp') {
332
- spin(event, 1);
333
- } else if (key === 'ArrowLeft' || key === 'ArrowDown') {
334
- spin(event, -1);
331
+ switch (key) {
332
+ case 'ArrowRight':
333
+ case 'ArrowUp':
334
+ spin(event, 1);
335
+ break;
336
+ case 'ArrowLeft':
337
+ case 'ArrowDown':
338
+ spin(event, -1);
339
+ break;
340
+ case 'PageUp':
341
+ spin(event, 10);
342
+ event.preventDefault();
343
+ break;
344
+ case 'PageDown':
345
+ spin(event, -10);
346
+ event.preventDefault();
347
+ break;
348
+ case 'Home':
349
+ spin(event, -value);
350
+ event.preventDefault();
351
+ break;
352
+ case 'End':
353
+ spin(event, props.max);
354
+ event.preventDefault();
355
+ break;
335
356
  }
336
357
  };
337
358
  var onBarClick = function onBarClick(event) {