@phillips/seldon 1.137.1 → 1.139.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 (235) hide show
  1. package/dist/assets/formatted/Account.d.ts +9 -0
  2. package/dist/assets/formatted/Account.js +36 -0
  3. package/dist/assets/formatted/AccountActive.d.ts +9 -0
  4. package/dist/assets/formatted/AccountActive.js +37 -0
  5. package/dist/assets/formatted/Add.d.ts +9 -0
  6. package/dist/assets/formatted/Add.js +29 -0
  7. package/dist/assets/formatted/AppleAppStoreBadge.d.ts +1 -1
  8. package/dist/assets/formatted/AppleAppStoreBadge.js +8 -8
  9. package/dist/assets/formatted/ArrowDown.d.ts +9 -0
  10. package/dist/assets/formatted/ArrowDown.js +29 -0
  11. package/dist/assets/formatted/ArrowLeft.d.ts +9 -0
  12. package/dist/assets/formatted/ArrowLeft.js +29 -0
  13. package/dist/assets/formatted/ArrowRight.d.ts +9 -0
  14. package/dist/assets/formatted/ArrowRight.js +29 -0
  15. package/dist/assets/formatted/ArrowUp.d.ts +9 -0
  16. package/dist/assets/formatted/ArrowUp.js +29 -0
  17. package/dist/assets/formatted/Bag.d.ts +9 -0
  18. package/dist/assets/formatted/Bag.js +37 -0
  19. package/dist/assets/formatted/Calendar.d.ts +1 -1
  20. package/dist/assets/formatted/Calendar.js +24 -16
  21. package/dist/assets/formatted/ChevronDown.d.ts +1 -1
  22. package/dist/assets/formatted/ChevronDown.js +9 -9
  23. package/dist/assets/formatted/ChevronLeft.d.ts +9 -0
  24. package/dist/assets/formatted/{ChevronNext.js → ChevronLeft.js} +6 -6
  25. package/dist/assets/formatted/ChevronRight.d.ts +1 -1
  26. package/dist/assets/formatted/ChevronRight.js +12 -12
  27. package/dist/assets/formatted/ChevronUp.d.ts +9 -0
  28. package/dist/assets/formatted/ChevronUp.js +37 -0
  29. package/dist/assets/formatted/Close (x).d.ts +9 -0
  30. package/dist/assets/formatted/CloseX.d.ts +9 -0
  31. package/dist/assets/formatted/CloseX.js +29 -0
  32. package/dist/assets/formatted/ConditionReport.d.ts +9 -0
  33. package/dist/assets/formatted/ConditionReport.js +37 -0
  34. package/dist/assets/formatted/Delete.d.ts +9 -0
  35. package/dist/assets/formatted/Delete.js +38 -0
  36. package/dist/assets/formatted/Download.d.ts +9 -0
  37. package/dist/assets/formatted/Download.js +30 -0
  38. package/dist/assets/formatted/Edit.d.ts +9 -0
  39. package/dist/assets/formatted/Edit.js +38 -0
  40. package/dist/assets/formatted/Email.d.ts +9 -0
  41. package/dist/assets/formatted/Email.js +37 -0
  42. package/dist/assets/formatted/Error.d.ts +9 -0
  43. package/dist/assets/formatted/Error.js +38 -0
  44. package/dist/assets/formatted/ExternalLink.d.ts +9 -0
  45. package/dist/assets/formatted/ExternalLink.js +30 -0
  46. package/dist/assets/formatted/Facebook.d.ts +9 -0
  47. package/dist/assets/formatted/Facebook.js +35 -0
  48. package/dist/assets/formatted/Favorite.d.ts +1 -1
  49. package/dist/assets/formatted/Favorite.js +18 -21
  50. package/dist/assets/formatted/FavoriteActive.d.ts +9 -0
  51. package/dist/assets/formatted/FavoriteActive.js +44 -0
  52. package/dist/assets/formatted/Filters.d.ts +9 -0
  53. package/dist/assets/formatted/Filters.js +37 -0
  54. package/dist/assets/formatted/Fullscreen.d.ts +9 -0
  55. package/dist/assets/formatted/Fullscreen.js +37 -0
  56. package/dist/assets/formatted/FullscreenExit.d.ts +9 -0
  57. package/dist/assets/formatted/FullscreenExit.js +29 -0
  58. package/dist/assets/formatted/Gavel.d.ts +9 -0
  59. package/dist/assets/formatted/Gavel.js +37 -0
  60. package/dist/assets/formatted/GavelActive.d.ts +9 -0
  61. package/dist/assets/formatted/GavelActive.js +37 -0
  62. package/dist/assets/formatted/Grid.d.ts +9 -0
  63. package/dist/assets/formatted/Grid.js +29 -0
  64. package/dist/assets/formatted/Hide.d.ts +9 -0
  65. package/dist/assets/formatted/Hide.js +44 -0
  66. package/dist/assets/formatted/Home.d.ts +9 -0
  67. package/dist/assets/formatted/Home.js +36 -0
  68. package/dist/assets/formatted/HomeActive.d.ts +9 -0
  69. package/dist/assets/formatted/HomeActive.js +39 -0
  70. package/dist/assets/formatted/Icon.d.ts +9 -0
  71. package/dist/assets/formatted/Icon.js +35 -0
  72. package/dist/assets/formatted/IconGreenCircle.d.ts +1 -1
  73. package/dist/assets/formatted/IconRedCircle.d.ts +1 -1
  74. package/dist/assets/formatted/Instagram.d.ts +1 -1
  75. package/dist/assets/formatted/Instagram.js +23 -38
  76. package/dist/assets/formatted/LinkedIn.d.ts +9 -0
  77. package/dist/assets/formatted/LinkedIn.js +35 -0
  78. package/dist/assets/formatted/List.d.ts +9 -0
  79. package/dist/assets/formatted/List.js +38 -0
  80. package/dist/assets/formatted/Lock.d.ts +1 -1
  81. package/dist/assets/formatted/Lock.js +13 -19
  82. package/dist/assets/formatted/MagnificentSeven.d.ts +1 -1
  83. package/dist/assets/formatted/Menu.d.ts +1 -1
  84. package/dist/assets/formatted/Mute.d.ts +9 -0
  85. package/dist/assets/formatted/Mute.js +51 -0
  86. package/dist/assets/formatted/Pause.d.ts +9 -0
  87. package/dist/assets/formatted/Pause.js +35 -0
  88. package/dist/assets/formatted/PhillipsAppIcon.d.ts +1 -1
  89. package/dist/assets/formatted/PhillipsLogo.d.ts +1 -1
  90. package/dist/assets/formatted/Play.d.ts +9 -0
  91. package/dist/assets/formatted/Play.js +35 -0
  92. package/dist/assets/formatted/Red.d.ts +9 -0
  93. package/dist/assets/formatted/Red.js +44 -0
  94. package/dist/assets/formatted/Refresh.d.ts +9 -0
  95. package/dist/assets/formatted/Refresh.js +35 -0
  96. package/dist/assets/formatted/Search.d.ts +1 -1
  97. package/dist/assets/formatted/Search.js +6 -6
  98. package/dist/assets/formatted/Sell.d.ts +9 -0
  99. package/dist/assets/formatted/Sell.js +38 -0
  100. package/dist/assets/formatted/SellActive.d.ts +9 -0
  101. package/dist/assets/formatted/SellActive.js +39 -0
  102. package/dist/assets/formatted/Share.d.ts +1 -1
  103. package/dist/assets/formatted/Share.js +15 -27
  104. package/dist/assets/formatted/Subtract.d.ts +9 -0
  105. package/dist/assets/formatted/Subtract.js +29 -0
  106. package/dist/assets/formatted/Success.d.ts +9 -0
  107. package/dist/assets/formatted/Success.js +29 -0
  108. package/dist/assets/formatted/Tooltip.d.ts +9 -0
  109. package/dist/assets/formatted/Tooltip.js +38 -0
  110. package/dist/assets/formatted/TwitterX.d.ts +9 -0
  111. package/dist/assets/formatted/TwitterX.js +35 -0
  112. package/dist/assets/formatted/Upload.d.ts +9 -0
  113. package/dist/assets/formatted/Upload.js +30 -0
  114. package/dist/assets/formatted/View.d.ts +9 -0
  115. package/dist/assets/formatted/View.js +37 -0
  116. package/dist/assets/formatted/VolumeMaximum.d.ts +9 -0
  117. package/dist/assets/formatted/VolumeMaximum.js +37 -0
  118. package/dist/assets/formatted/VolumeMid.d.ts +9 -0
  119. package/dist/assets/formatted/VolumeMid.js +44 -0
  120. package/dist/assets/formatted/VolumeMinimum.d.ts +9 -0
  121. package/dist/assets/formatted/VolumeMinimum.js +37 -0
  122. package/dist/assets/formatted/WeChat.d.ts +9 -0
  123. package/dist/assets/formatted/WeChat.js +35 -0
  124. package/dist/assets/formatted/index.d.ts +49 -20
  125. package/dist/assets/formatted/index.js +128 -70
  126. package/dist/components/Accordion/AccordionItem.js +36 -36
  127. package/dist/components/Breadcrumb/Breadcrumb.js +10 -10
  128. package/dist/components/Breadcrumb/BreadcrumbItem.js +21 -21
  129. package/dist/components/Carousel/CarouselArrows.js +11 -11
  130. package/dist/components/ContentPeek/ContentPeek.js +25 -25
  131. package/dist/components/Divider/Divider.js +17 -8
  132. package/dist/components/Drawer/Drawer.js +6 -6
  133. package/dist/components/Dropdown/Dropdown.js +8 -6
  134. package/dist/components/Filter/Filter.js +16 -16
  135. package/dist/components/Filter/FilterHeader.js +11 -11
  136. package/dist/components/Icon/Icon.d.ts +3 -2
  137. package/dist/components/Icon/Icon.js +9 -9
  138. package/dist/components/Modal/Modal.js +13 -13
  139. package/dist/components/Search/SearchButton.js +1 -1
  140. package/dist/components/Tags/Tags.js +29 -29
  141. package/dist/index.d.ts +42 -41
  142. package/dist/index.js +171 -169
  143. package/dist/node_modules/@radix-ui/react-collapsible/dist/index.js +1 -1
  144. package/dist/node_modules/@radix-ui/react-collection/dist/index.js +27 -27
  145. package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +24 -9
  146. package/dist/node_modules/@radix-ui/react-context/dist/index.js +50 -34
  147. package/dist/node_modules/@radix-ui/react-dialog/dist/index.js +45 -45
  148. package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +1 -1
  149. package/dist/node_modules/@radix-ui/react-id/dist/index.js +10 -10
  150. package/dist/node_modules/@radix-ui/react-popover/dist/index.js +239 -0
  151. package/dist/node_modules/@radix-ui/react-presence/dist/index.js +30 -25
  152. package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +13 -13
  153. package/dist/node_modules/@radix-ui/react-select/dist/index.js +364 -338
  154. package/dist/node_modules/@radix-ui/react-slot/dist/index.js +41 -40
  155. package/dist/node_modules/@radix-ui/react-tabs/dist/index.js +2 -2
  156. package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +3 -3
  157. package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.js +1 -1
  158. package/dist/patterns/FavoritesCollectionTile/FavoritesCollectionTile.d.ts +75 -0
  159. package/dist/patterns/FavoritesCollectionTile/FavoritesCollectionTile.js +131 -0
  160. package/dist/patterns/FavoritesCollectionTile/FavoritesCollectionTile.stories.d.ts +78 -0
  161. package/dist/patterns/FavoritesCollectionTile/FavoritesCollectionTile.test.d.ts +1 -0
  162. package/dist/patterns/FavoritesCollectionTile/index.d.ts +1 -0
  163. package/dist/patterns/UserManagement/UserManagement.js +13 -29
  164. package/dist/scss/_vars.scss +1 -0
  165. package/dist/scss/_vars.scss.js +1 -0
  166. package/dist/scss/componentStyles.scss +1 -0
  167. package/dist/scss/components/Breadcrumb/_breadcrumb.scss +4 -5
  168. package/dist/scss/components/Drawer/_drawer.scss +4 -0
  169. package/dist/scss/components/Filter/_filter.scss +0 -4
  170. package/dist/scss/components/IconButton/_iconButton.scss +9 -5
  171. package/dist/scss/components/Tags/_tags.scss +9 -13
  172. package/dist/scss/patterns/FavoritesCollectionTile/_favoritesCollectionTile.scss +159 -0
  173. package/dist/scss/patterns/Social/_social.scss +6 -17
  174. package/dist/scss/site-furniture/Footer/_footer.scss +0 -5
  175. package/dist/site-furniture/Footer/Footer.js +5 -5
  176. package/package.json +2 -1
  177. package/dist/assets/formatted/AccountCircle.d.ts +0 -9
  178. package/dist/assets/formatted/AccountCircle.js +0 -40
  179. package/dist/assets/formatted/ArrowPrev.d.ts +0 -9
  180. package/dist/assets/formatted/ArrowPrev.js +0 -37
  181. package/dist/assets/formatted/CalendarAlt.d.ts +0 -9
  182. package/dist/assets/formatted/CalendarAlt.js +0 -44
  183. package/dist/assets/formatted/CarouselArrowNext.d.ts +0 -9
  184. package/dist/assets/formatted/CarouselArrowNext.js +0 -29
  185. package/dist/assets/formatted/CarouselArrowPrev.d.ts +0 -9
  186. package/dist/assets/formatted/CarouselArrowPrev.js +0 -29
  187. package/dist/assets/formatted/Checkmark.d.ts +0 -9
  188. package/dist/assets/formatted/Checkmark.js +0 -37
  189. package/dist/assets/formatted/ChevronNext.d.ts +0 -9
  190. package/dist/assets/formatted/Close.d.ts +0 -9
  191. package/dist/assets/formatted/Close.js +0 -46
  192. package/dist/assets/formatted/FavoriteOutline.d.ts +0 -9
  193. package/dist/assets/formatted/FavoriteOutline.js +0 -38
  194. package/dist/assets/formatted/IconFooterFacebook.d.ts +0 -9
  195. package/dist/assets/formatted/IconFooterFacebook.js +0 -35
  196. package/dist/assets/formatted/IconFooterInstagram.d.ts +0 -9
  197. package/dist/assets/formatted/IconFooterInstagram.js +0 -31
  198. package/dist/assets/formatted/IconFooterLinkedin.d.ts +0 -9
  199. package/dist/assets/formatted/IconFooterLinkedin.js +0 -35
  200. package/dist/assets/formatted/IconFooterRed.d.ts +0 -9
  201. package/dist/assets/formatted/IconFooterRed.js +0 -42
  202. package/dist/assets/formatted/IconFooterWechat.d.ts +0 -9
  203. package/dist/assets/formatted/IconFooterWechat.js +0 -37
  204. package/dist/assets/formatted/Minus.d.ts +0 -9
  205. package/dist/assets/formatted/Minus.js +0 -46
  206. package/dist/assets/formatted/Plus.d.ts +0 -9
  207. package/dist/assets/formatted/Plus.js +0 -46
  208. package/dist/assets/formatted/React.d.ts +0 -9
  209. package/dist/assets/formatted/React.js +0 -36
  210. package/dist/assets/formatted/Spotify.d.ts +0 -9
  211. package/dist/assets/formatted/Spotify.js +0 -35
  212. package/dist/assets/formatted/Wechat.d.ts +0 -9
  213. package/dist/assets/formatted/Wechat.js +0 -42
  214. package/dist/assets/formatted/Youtube.d.ts +0 -9
  215. package/dist/assets/formatted/Youtube.js +0 -36
  216. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/primitive/dist/index.js +0 -9
  217. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-compose-refs/dist/index.js +0 -29
  218. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-context/dist/index.js +0 -68
  219. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +0 -127
  220. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-guards/dist/index.js +0 -17
  221. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-scope/dist/index.js +0 -136
  222. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-portal/dist/index.js +0 -15
  223. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-presence/dist/index.js +0 -70
  224. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-primitive/dist/index.js +0 -35
  225. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot/dist/index.js +0 -47
  226. package/dist/node_modules/@radix-ui/react-select/node_modules/react-remove-scroll/dist/es2015/Combination.js +0 -11
  227. package/dist/node_modules/@radix-ui/react-select/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +0 -112
  228. package/dist/node_modules/@radix-ui/react-select/node_modules/react-remove-scroll/dist/es2015/UI.js +0 -31
  229. package/dist/node_modules/@radix-ui/react-select/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +0 -16
  230. package/dist/node_modules/@radix-ui/react-select/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +0 -62
  231. package/dist/node_modules/@radix-ui/react-select/node_modules/react-remove-scroll/dist/es2015/medium.js +0 -5
  232. package/dist/node_modules/@radix-ui/react-select/node_modules/react-remove-scroll/dist/es2015/sidecar.js +0 -7
  233. package/dist/node_modules/@radix-ui/react-select/node_modules/tslib/tslib.es6.js +0 -27
  234. package/dist/node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-context/dist/index.js +0 -53
  235. package/dist/node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-presence/dist/index.js +0 -70
@@ -1,16 +0,0 @@
1
- var r = !1;
2
- if (typeof window < "u")
3
- try {
4
- var e = Object.defineProperty({}, "passive", {
5
- get: function() {
6
- return r = !0, !0;
7
- }
8
- });
9
- window.addEventListener("test", e, e), window.removeEventListener("test", e, e);
10
- } catch {
11
- r = !1;
12
- }
13
- var a = r ? { passive: !1 } : !1;
14
- export {
15
- a as nonPassive
16
- };
@@ -1,62 +0,0 @@
1
- var p = function(r) {
2
- return r.tagName === "TEXTAREA";
3
- }, w = function(r, e) {
4
- var o = window.getComputedStyle(r);
5
- return (
6
- // not-not-scrollable
7
- o[e] !== "hidden" && // contains scroll inside self
8
- !(o.overflowY === o.overflowX && !p(r) && o[e] === "visible")
9
- );
10
- }, y = function(r) {
11
- return w(r, "overflowY");
12
- }, H = function(r) {
13
- return w(r, "overflowX");
14
- }, R = function(r, e) {
15
- var o = e.ownerDocument, t = e;
16
- do {
17
- typeof ShadowRoot < "u" && t instanceof ShadowRoot && (t = t.host);
18
- var a = g(r, t);
19
- if (a) {
20
- var n = b(r, t), i = n[1], l = n[2];
21
- if (i > l)
22
- return !0;
23
- }
24
- t = t.parentNode;
25
- } while (t && t !== o.body);
26
- return !1;
27
- }, B = function(r) {
28
- var e = r.scrollTop, o = r.scrollHeight, t = r.clientHeight;
29
- return [
30
- e,
31
- o,
32
- t
33
- ];
34
- }, V = function(r) {
35
- var e = r.scrollLeft, o = r.scrollWidth, t = r.clientWidth;
36
- return [
37
- e,
38
- o,
39
- t
40
- ];
41
- }, g = function(r, e) {
42
- return r === "v" ? y(e) : H(e);
43
- }, b = function(r, e) {
44
- return r === "v" ? B(e) : V(e);
45
- }, D = function(r, e) {
46
- return r === "h" && e === "rtl" ? -1 : 1;
47
- }, W = function(r, e, o, t, a) {
48
- var n = D(r, window.getComputedStyle(e).direction), i = n * t, l = o.target, f = e.contains(l), c = !1, d = i > 0, s = 0, h = 0;
49
- do {
50
- var u = b(r, l), v = u[0], m = u[1], C = u[2], S = m - C - n * v;
51
- (v || S) && g(r, l) && (s += S, h += v), l instanceof ShadowRoot ? l = l.host : l = l.parentNode;
52
- } while (
53
- // portaled content
54
- !f && l !== document.body || // self content
55
- f && (e.contains(l) || e === l)
56
- );
57
- return (d && (Math.abs(s) < 1 || !a) || !d && (Math.abs(h) < 1 || !a)) && (c = !0), c;
58
- };
59
- export {
60
- W as handleScroll,
61
- R as locationCouldBeScrolled
62
- };
@@ -1,5 +0,0 @@
1
- import { createSidecarMedium as e } from "../../../../../../use-sidecar/dist/es2015/medium.js";
2
- var a = e();
3
- export {
4
- a as effectCar
5
- };
@@ -1,7 +0,0 @@
1
- import { RemoveScrollSideCar as r } from "./SideEffect.js";
2
- import { effectCar as o } from "./medium.js";
3
- import { exportSidecar as e } from "../../../../../../use-sidecar/dist/es2015/exports.js";
4
- const f = e(o, r);
5
- export {
6
- f as default
7
- };
@@ -1,27 +0,0 @@
1
- var p = function() {
2
- return p = Object.assign || function(e) {
3
- for (var n, r = 1, o = arguments.length; r < o; r++) {
4
- n = arguments[r];
5
- for (var a in n) Object.prototype.hasOwnProperty.call(n, a) && (e[a] = n[a]);
6
- }
7
- return e;
8
- }, p.apply(this, arguments);
9
- };
10
- function c(t, e) {
11
- var n = {};
12
- for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
13
- if (t != null && typeof Object.getOwnPropertySymbols == "function")
14
- for (var o = 0, r = Object.getOwnPropertySymbols(t); o < r.length; o++)
15
- e.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[o]) && (n[r[o]] = t[r[o]]);
16
- return n;
17
- }
18
- function l(t, e, n) {
19
- if (n || arguments.length === 2) for (var r = 0, o = e.length, a; r < o; r++)
20
- (a || !(r in e)) && (a || (a = Array.prototype.slice.call(e, 0, r)), a[r] = e[r]);
21
- return t.concat(a || Array.prototype.slice.call(e));
22
- }
23
- export {
24
- p as __assign,
25
- c as __rest,
26
- l as __spreadArray
27
- };
@@ -1,53 +0,0 @@
1
- import * as u from "react";
2
- import { jsx as _ } from "react/jsx-runtime";
3
- function P(e, p = []) {
4
- let n = [];
5
- function m(s, t) {
6
- const o = u.createContext(t), c = n.length;
7
- n = [...n, t];
8
- const a = (i) => {
9
- const { scope: f, children: C, ...x } = i, d = f?.[e]?.[c] || o, v = u.useMemo(() => x, Object.values(x));
10
- return /* @__PURE__ */ _(d.Provider, { value: v, children: C });
11
- };
12
- a.displayName = s + "Provider";
13
- function S(i, f) {
14
- const C = f?.[e]?.[c] || o, x = u.useContext(C);
15
- if (x) return x;
16
- if (t !== void 0) return t;
17
- throw new Error(`\`${i}\` must be used within \`${s}\``);
18
- }
19
- return [a, S];
20
- }
21
- const r = () => {
22
- const s = n.map((t) => u.createContext(t));
23
- return function(o) {
24
- const c = o?.[e] || s;
25
- return u.useMemo(
26
- () => ({ [`__scope${e}`]: { ...o, [e]: c } }),
27
- [o, c]
28
- );
29
- };
30
- };
31
- return r.scopeName = e, [m, h(r, ...p)];
32
- }
33
- function h(...e) {
34
- const p = e[0];
35
- if (e.length === 1) return p;
36
- const n = () => {
37
- const m = e.map((r) => ({
38
- useScope: r(),
39
- scopeName: r.scopeName
40
- }));
41
- return function(s) {
42
- const t = m.reduce((o, { useScope: c, scopeName: a }) => {
43
- const i = c(s)[`__scope${a}`];
44
- return { ...o, ...i };
45
- }, {});
46
- return u.useMemo(() => ({ [`__scope${p.scopeName}`]: t }), [t]);
47
- };
48
- };
49
- return n.scopeName = p.scopeName, n;
50
- }
51
- export {
52
- P as createContextScope
53
- };
@@ -1,70 +0,0 @@
1
- import * as i from "react";
2
- import { useComposedRefs as O } from "../../../../../react-compose-refs/dist/index.js";
3
- import { useLayoutEffect as A } from "../../../../../react-use-layout-effect/dist/index.js";
4
- function E(n, e) {
5
- return i.useReducer((t, r) => e[t][r] ?? t, n);
6
- }
7
- var T = (n) => {
8
- const { present: e, children: t } = n, r = R(e), a = typeof t == "function" ? t({ present: r.isPresent }) : i.Children.only(t), c = O(r.ref, v(a));
9
- return typeof t == "function" || r.isPresent ? i.cloneElement(a, { ref: c }) : null;
10
- };
11
- T.displayName = "Presence";
12
- function R(n) {
13
- const [e, t] = i.useState(), r = i.useRef({}), a = i.useRef(n), c = i.useRef("none"), p = n ? "mounted" : "unmounted", [N, s] = E(p, {
14
- mounted: {
15
- UNMOUNT: "unmounted",
16
- ANIMATION_OUT: "unmountSuspended"
17
- },
18
- unmountSuspended: {
19
- MOUNT: "mounted",
20
- ANIMATION_END: "unmounted"
21
- },
22
- unmounted: {
23
- MOUNT: "mounted"
24
- }
25
- });
26
- return i.useEffect(() => {
27
- const o = l(r.current);
28
- c.current = N === "mounted" ? o : "none";
29
- }, [N]), A(() => {
30
- const o = r.current, m = a.current;
31
- if (m !== n) {
32
- const f = c.current, u = l(o);
33
- n ? s("MOUNT") : u === "none" || o?.display === "none" ? s("UNMOUNT") : s(m && f !== u ? "ANIMATION_OUT" : "UNMOUNT"), a.current = n;
34
- }
35
- }, [n, s]), A(() => {
36
- if (e) {
37
- let o;
38
- const m = e.ownerDocument.defaultView ?? window, d = (u) => {
39
- const g = l(r.current).includes(u.animationName);
40
- if (u.target === e && g && (s("ANIMATION_END"), !a.current)) {
41
- const y = e.style.animationFillMode;
42
- e.style.animationFillMode = "forwards", o = m.setTimeout(() => {
43
- e.style.animationFillMode === "forwards" && (e.style.animationFillMode = y);
44
- });
45
- }
46
- }, f = (u) => {
47
- u.target === e && (c.current = l(r.current));
48
- };
49
- return e.addEventListener("animationstart", f), e.addEventListener("animationcancel", d), e.addEventListener("animationend", d), () => {
50
- m.clearTimeout(o), e.removeEventListener("animationstart", f), e.removeEventListener("animationcancel", d), e.removeEventListener("animationend", d);
51
- };
52
- } else
53
- s("ANIMATION_END");
54
- }, [e, s]), {
55
- isPresent: ["mounted", "unmountSuspended"].includes(N),
56
- ref: i.useCallback((o) => {
57
- o && (r.current = getComputedStyle(o)), t(o);
58
- }, [])
59
- };
60
- }
61
- function l(n) {
62
- return n?.animationName || "none";
63
- }
64
- function v(n) {
65
- let e = Object.getOwnPropertyDescriptor(n.props, "ref")?.get, t = e && "isReactWarning" in e && e.isReactWarning;
66
- return t ? n.ref : (e = Object.getOwnPropertyDescriptor(n, "ref")?.get, t = e && "isReactWarning" in e && e.isReactWarning, t ? n.props.ref : n.props.ref || n.ref);
67
- }
68
- export {
69
- T as Presence
70
- };