@ledgerhq/lumen-ui-react 0.1.16 → 0.1.18

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 (219) hide show
  1. package/ai-rules/RULES.md +7 -1
  2. package/dist/index.js +148 -142
  3. package/dist/lib/Components/AddressInput/AddressInput.d.ts +1 -4
  4. package/dist/lib/Components/AddressInput/AddressInput.d.ts.map +1 -1
  5. package/dist/lib/Components/AddressInput/AddressInput.js +21 -21
  6. package/dist/lib/Components/AmountDisplay/AmountDisplay.d.ts +1 -4
  7. package/dist/lib/Components/AmountDisplay/AmountDisplay.d.ts.map +1 -1
  8. package/dist/lib/Components/AmountDisplay/AmountDisplay.js +32 -29
  9. package/dist/lib/Components/AmountInput/AmountInput.d.ts +1 -4
  10. package/dist/lib/Components/AmountInput/AmountInput.d.ts.map +1 -1
  11. package/dist/lib/Components/AmountInput/AmountInput.js +13 -14
  12. package/dist/lib/Components/Avatar/Avatar.d.ts +1 -4
  13. package/dist/lib/Components/Avatar/Avatar.d.ts.map +1 -1
  14. package/dist/lib/Components/Avatar/Avatar.js +8 -9
  15. package/dist/lib/Components/BaseInput/BaseInput.d.ts +1 -4
  16. package/dist/lib/Components/BaseInput/BaseInput.d.ts.map +1 -1
  17. package/dist/lib/Components/BaseInput/BaseInput.js +66 -73
  18. package/dist/lib/Components/Button/BaseButton.d.ts +1 -4
  19. package/dist/lib/Components/Button/BaseButton.d.ts.map +1 -1
  20. package/dist/lib/Components/Button/BaseButton.js +14 -15
  21. package/dist/lib/Components/Button/Button.d.ts +1 -4
  22. package/dist/lib/Components/Button/Button.d.ts.map +1 -1
  23. package/dist/lib/Components/Button/Button.js +6 -7
  24. package/dist/lib/Components/Card/Card.d.ts +10 -40
  25. package/dist/lib/Components/Card/Card.d.ts.map +1 -1
  26. package/dist/lib/Components/Card/Card.js +115 -134
  27. package/dist/lib/Components/CardButton/CardButton.d.ts +1 -4
  28. package/dist/lib/Components/CardButton/CardButton.d.ts.map +1 -1
  29. package/dist/lib/Components/CardButton/CardButton.js +10 -11
  30. package/dist/lib/Components/Checkbox/Checkbox.d.ts +1 -4
  31. package/dist/lib/Components/Checkbox/Checkbox.d.ts.map +1 -1
  32. package/dist/lib/Components/Checkbox/Checkbox.js +2 -3
  33. package/dist/lib/Components/ContentBanner/ContentBanner.d.ts +4 -16
  34. package/dist/lib/Components/ContentBanner/ContentBanner.d.ts.map +1 -1
  35. package/dist/lib/Components/ContentBanner/ContentBanner.js +48 -54
  36. package/dist/lib/Components/DataTable/DataTable.d.ts +3 -12
  37. package/dist/lib/Components/DataTable/DataTable.d.ts.map +1 -1
  38. package/dist/lib/Components/DataTable/DataTable.js +84 -97
  39. package/dist/lib/Components/Dialog/Dialog.d.ts +3 -12
  40. package/dist/lib/Components/Dialog/Dialog.d.ts.map +1 -1
  41. package/dist/lib/Components/Dialog/Dialog.js +44 -50
  42. package/dist/lib/Components/Dialog/DialogHeader/DialogHeader.d.ts +1 -4
  43. package/dist/lib/Components/Dialog/DialogHeader/DialogHeader.d.ts.map +1 -1
  44. package/dist/lib/Components/Dialog/DialogHeader/DialogHeader.js +31 -34
  45. package/dist/lib/Components/Divider/Divider.d.ts +1 -4
  46. package/dist/lib/Components/Divider/Divider.d.ts.map +1 -1
  47. package/dist/lib/Components/Divider/Divider.js +10 -11
  48. package/dist/lib/Components/Icon/Icon.d.ts +1 -4
  49. package/dist/lib/Components/Icon/Icon.d.ts.map +1 -1
  50. package/dist/lib/Components/Icon/Icon.js +6 -7
  51. package/dist/lib/Components/IconButton/IconButton.d.ts +1 -4
  52. package/dist/lib/Components/IconButton/IconButton.d.ts.map +1 -1
  53. package/dist/lib/Components/IconButton/IconButton.js +5 -6
  54. package/dist/lib/Components/InteractiveIcon/InteractiveIcon.d.ts +3 -11
  55. package/dist/lib/Components/InteractiveIcon/InteractiveIcon.d.ts.map +1 -1
  56. package/dist/lib/Components/InteractiveIcon/InteractiveIcon.js +24 -22
  57. package/dist/lib/Components/InteractiveIcon/types.d.ts +14 -9
  58. package/dist/lib/Components/InteractiveIcon/types.d.ts.map +1 -1
  59. package/dist/lib/Components/Link/Link.d.ts +1 -4
  60. package/dist/lib/Components/Link/Link.d.ts.map +1 -1
  61. package/dist/lib/Components/Link/Link.js +13 -14
  62. package/dist/lib/Components/ListItem/ListItem.d.ts +7 -28
  63. package/dist/lib/Components/ListItem/ListItem.d.ts.map +1 -1
  64. package/dist/lib/Components/ListItem/ListItem.js +60 -63
  65. package/dist/lib/Components/MediaBanner/MediaBanner.d.ts +3 -12
  66. package/dist/lib/Components/MediaBanner/MediaBanner.d.ts.map +1 -1
  67. package/dist/lib/Components/MediaBanner/MediaBanner.js +39 -43
  68. package/dist/lib/Components/MediaCard/MediaCard.d.ts +2 -8
  69. package/dist/lib/Components/MediaCard/MediaCard.d.ts.map +1 -1
  70. package/dist/lib/Components/MediaCard/MediaCard.js +38 -40
  71. package/dist/lib/Components/MediaImage/MediaImage.d.ts +16 -0
  72. package/dist/lib/Components/MediaImage/MediaImage.d.ts.map +1 -0
  73. package/dist/lib/Components/MediaImage/MediaImage.js +74 -0
  74. package/dist/lib/Components/MediaImage/index.d.ts +3 -0
  75. package/dist/lib/Components/MediaImage/index.d.ts.map +1 -0
  76. package/dist/lib/Components/MediaImage/types.d.ts +38 -0
  77. package/dist/lib/Components/MediaImage/types.d.ts.map +1 -0
  78. package/dist/lib/Components/Menu/Menu.d.ts +11 -38
  79. package/dist/lib/Components/Menu/Menu.d.ts.map +1 -1
  80. package/dist/lib/Components/Menu/Menu.js +100 -116
  81. package/dist/lib/Components/NavBar/CoinCapsule.d.ts +1 -4
  82. package/dist/lib/Components/NavBar/CoinCapsule.d.ts.map +1 -1
  83. package/dist/lib/Components/NavBar/CoinCapsule.js +8 -9
  84. package/dist/lib/Components/NavBar/NavBar.d.ts +7 -22
  85. package/dist/lib/Components/NavBar/NavBar.d.ts.map +1 -1
  86. package/dist/lib/Components/NavBar/NavBar.js +25 -34
  87. package/dist/lib/Components/PageIndicator/PageIndicator.d.ts +1 -4
  88. package/dist/lib/Components/PageIndicator/PageIndicator.d.ts.map +1 -1
  89. package/dist/lib/Components/PageIndicator/PageIndicator.js +15 -16
  90. package/dist/lib/Components/Popover/Popover.d.ts +1 -4
  91. package/dist/lib/Components/Popover/Popover.d.ts.map +1 -1
  92. package/dist/lib/Components/Popover/Popover.js +5 -7
  93. package/dist/lib/Components/SearchInput/SearchInput.d.ts +1 -4
  94. package/dist/lib/Components/SearchInput/SearchInput.d.ts.map +1 -1
  95. package/dist/lib/Components/SearchInput/SearchInput.js +23 -20
  96. package/dist/lib/Components/SearchInput/types.d.ts +1 -1
  97. package/dist/lib/Components/SearchInput/types.d.ts.map +1 -1
  98. package/dist/lib/Components/SegmentedControl/SegmentedControl.d.ts +0 -6
  99. package/dist/lib/Components/SegmentedControl/SegmentedControl.d.ts.map +1 -1
  100. package/dist/lib/Components/SegmentedControl/SegmentedControl.js +19 -21
  101. package/dist/lib/Components/Select/Select.d.ts +13 -28
  102. package/dist/lib/Components/Select/Select.d.ts.map +1 -1
  103. package/dist/lib/Components/Select/Select.js +339 -207
  104. package/dist/lib/Components/Select/SelectContext.d.ts +3 -1
  105. package/dist/lib/Components/Select/SelectContext.d.ts.map +1 -1
  106. package/dist/lib/Components/Select/index.d.ts +1 -1
  107. package/dist/lib/Components/Select/index.d.ts.map +1 -1
  108. package/dist/lib/Components/Select/types.d.ts +171 -140
  109. package/dist/lib/Components/Select/types.d.ts.map +1 -1
  110. package/dist/lib/Components/Select/useSelectItems/index.d.ts +2 -0
  111. package/dist/lib/Components/Select/useSelectItems/index.d.ts.map +1 -0
  112. package/dist/lib/Components/Select/useSelectItems/useSelectItems.d.ts +30 -0
  113. package/dist/lib/Components/Select/useSelectItems/useSelectItems.d.ts.map +1 -0
  114. package/dist/lib/Components/Select/useSelectItems/useSelectItems.js +42 -0
  115. package/dist/lib/Components/Select/utils/groupItems.d.ts +13 -0
  116. package/dist/lib/Components/Select/utils/groupItems.d.ts.map +1 -0
  117. package/dist/lib/Components/Select/utils/groupItems.js +16 -0
  118. package/dist/lib/Components/Select/utils/index.d.ts +2 -0
  119. package/dist/lib/Components/Select/utils/index.d.ts.map +1 -0
  120. package/dist/lib/Components/SideBar/SideBar.d.ts +5 -20
  121. package/dist/lib/Components/SideBar/SideBar.d.ts.map +1 -1
  122. package/dist/lib/Components/SideBar/SideBar.js +44 -53
  123. package/dist/lib/Components/Skeleton/Skeleton.d.ts +1 -4
  124. package/dist/lib/Components/Skeleton/Skeleton.d.ts.map +1 -1
  125. package/dist/lib/Components/Skeleton/Skeleton.js +15 -22
  126. package/dist/lib/Components/Spot/Spot.d.ts +1 -4
  127. package/dist/lib/Components/Spot/Spot.d.ts.map +1 -1
  128. package/dist/lib/Components/Spot/Spot.js +11 -12
  129. package/dist/lib/Components/Stepper/Stepper.d.ts +1 -4
  130. package/dist/lib/Components/Stepper/Stepper.d.ts.map +1 -1
  131. package/dist/lib/Components/Stepper/Stepper.js +10 -11
  132. package/dist/lib/Components/Subheader/Subheader.d.ts +1 -4
  133. package/dist/lib/Components/Subheader/Subheader.d.ts.map +1 -1
  134. package/dist/lib/Components/Subheader/Subheader.js +14 -15
  135. package/dist/lib/Components/Subheader/types.d.ts +1 -1
  136. package/dist/lib/Components/Subheader/types.d.ts.map +1 -1
  137. package/dist/lib/Components/Switch/Switch.d.ts +1 -4
  138. package/dist/lib/Components/Switch/Switch.d.ts.map +1 -1
  139. package/dist/lib/Components/Switch/Switch.js +2 -3
  140. package/dist/lib/Components/Table/Table.d.ts +16 -64
  141. package/dist/lib/Components/Table/Table.d.ts.map +1 -1
  142. package/dist/lib/Components/Table/Table.js +146 -176
  143. package/dist/lib/Components/Tag/Tag.d.ts +1 -4
  144. package/dist/lib/Components/Tag/Tag.d.ts.map +1 -1
  145. package/dist/lib/Components/Tag/Tag.js +10 -11
  146. package/dist/lib/Components/TextInput/TextInput.d.ts +1 -4
  147. package/dist/lib/Components/TextInput/TextInput.d.ts.map +1 -1
  148. package/dist/lib/Components/TextInput/TextInput.js +4 -5
  149. package/dist/lib/Components/Tile/Tile.d.ts +6 -24
  150. package/dist/lib/Components/Tile/Tile.d.ts.map +1 -1
  151. package/dist/lib/Components/Tile/Tile.js +58 -71
  152. package/dist/lib/Components/TileButton/TileButton.d.ts +1 -4
  153. package/dist/lib/Components/TileButton/TileButton.d.ts.map +1 -1
  154. package/dist/lib/Components/TileButton/TileButton.js +12 -13
  155. package/dist/lib/Components/TriggerButton/TriggerButton.d.ts +1 -4
  156. package/dist/lib/Components/TriggerButton/TriggerButton.d.ts.map +1 -1
  157. package/dist/lib/Components/TriggerButton/TriggerButton.js +11 -12
  158. package/dist/lib/Components/index.d.ts +1 -0
  159. package/dist/lib/Components/index.d.ts.map +1 -1
  160. package/dist/libs/utils-shared/dist/index.js +151 -124
  161. package/dist/node_modules/@base-ui/react/esm/combobox/chips/ComboboxChipsContext.js +10 -0
  162. package/dist/node_modules/@base-ui/react/esm/combobox/collection/ComboboxCollection.js +17 -0
  163. package/dist/node_modules/@base-ui/react/esm/combobox/collection/GroupCollectionContext.js +23 -0
  164. package/dist/node_modules/@base-ui/react/esm/combobox/empty/ComboboxEmpty.js +26 -0
  165. package/dist/node_modules/@base-ui/react/esm/combobox/group/ComboboxGroup.js +34 -0
  166. package/dist/node_modules/@base-ui/react/esm/combobox/group/ComboboxGroupContext.js +14 -0
  167. package/dist/node_modules/@base-ui/react/esm/combobox/group-label/ComboboxGroupLabel.js +27 -0
  168. package/dist/node_modules/@base-ui/react/esm/combobox/input/ComboboxInput.js +221 -0
  169. package/dist/node_modules/@base-ui/react/esm/combobox/item/ComboboxItem.js +113 -0
  170. package/dist/node_modules/@base-ui/react/esm/combobox/item/ComboboxItemContext.js +14 -0
  171. package/dist/node_modules/@base-ui/react/esm/combobox/item-indicator/ComboboxItemIndicator.js +52 -0
  172. package/dist/node_modules/@base-ui/react/esm/combobox/list/ComboboxList.js +65 -0
  173. package/dist/node_modules/@base-ui/react/esm/combobox/popup/ComboboxPopup.js +76 -0
  174. package/dist/node_modules/@base-ui/react/esm/combobox/portal/ComboboxPortal.js +24 -0
  175. package/dist/node_modules/@base-ui/react/esm/combobox/portal/ComboboxPortalContext.js +14 -0
  176. package/dist/node_modules/@base-ui/react/esm/combobox/positioner/ComboboxPositioner.js +102 -0
  177. package/dist/node_modules/@base-ui/react/esm/combobox/positioner/ComboboxPositionerContext.js +14 -0
  178. package/dist/node_modules/@base-ui/react/esm/combobox/root/AriaCombobox.js +596 -0
  179. package/dist/node_modules/@base-ui/react/esm/combobox/root/ComboboxRoot.js +23 -0
  180. package/dist/node_modules/@base-ui/react/esm/combobox/root/ComboboxRootContext.js +41 -0
  181. package/dist/node_modules/@base-ui/react/esm/combobox/root/utils/constants.js +8 -0
  182. package/dist/node_modules/@base-ui/react/esm/combobox/root/utils/index.js +23 -0
  183. package/dist/node_modules/@base-ui/react/esm/combobox/root/utils/useFilter.js +43 -0
  184. package/dist/node_modules/@base-ui/react/esm/combobox/row/ComboboxRowContext.js +10 -0
  185. package/dist/node_modules/@base-ui/react/esm/combobox/store.js +74 -0
  186. package/dist/node_modules/@base-ui/react/esm/combobox/trigger/ComboboxTrigger.js +135 -0
  187. package/dist/node_modules/@base-ui/react/esm/combobox/utils/ComboboxInternalDismissButton.js +32 -0
  188. package/dist/node_modules/@base-ui/react/esm/combobox/utils/stateAttributesMapping.js +15 -0
  189. package/dist/node_modules/@base-ui/react/esm/combobox/value/ComboboxValue.js +19 -0
  190. package/dist/node_modules/@base-ui/react/esm/composite/list/CompositeList.js +81 -0
  191. package/dist/node_modules/@base-ui/react/esm/composite/list/CompositeListContext.js +23 -0
  192. package/dist/node_modules/@base-ui/react/esm/composite/list/useCompositeListItem.js +55 -0
  193. package/dist/node_modules/@base-ui/react/esm/field/control/FieldControlDataAttributes.js +6 -0
  194. package/dist/node_modules/@base-ui/react/esm/field/root/FieldRootContext.js +53 -0
  195. package/dist/node_modules/@base-ui/react/esm/field/useField.js +51 -0
  196. package/dist/node_modules/@base-ui/react/esm/field/utils/constants.js +37 -0
  197. package/dist/node_modules/@base-ui/react/esm/field/utils/getCombinedFieldValidityData.js +12 -0
  198. package/dist/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useListNavigation.js +287 -0
  199. package/dist/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useTypeahead.js +71 -0
  200. package/dist/node_modules/@base-ui/react/esm/floating-ui-react/utils/composite.js +218 -4
  201. package/dist/node_modules/@base-ui/react/esm/floating-ui-react/utils/constants.js +7 -3
  202. package/dist/node_modules/@base-ui/react/esm/floating-ui-react/utils/element.js +3 -3
  203. package/dist/node_modules/@base-ui/react/esm/form/FormContext.js +23 -0
  204. package/dist/node_modules/@base-ui/react/esm/labelable-provider/LabelableContext.js +19 -0
  205. package/dist/node_modules/@base-ui/react/esm/labelable-provider/useLabelableId.js +44 -0
  206. package/dist/node_modules/@base-ui/react/esm/utils/constants.js +11 -8
  207. package/dist/node_modules/@base-ui/react/esm/utils/createBaseUIEventDetails.js +22 -13
  208. package/dist/node_modules/@base-ui/react/esm/utils/getPseudoElementBounds.js +18 -0
  209. package/dist/node_modules/@base-ui/react/esm/utils/itemEquality.js +20 -0
  210. package/dist/node_modules/@base-ui/react/esm/utils/reason-parts.js +13 -6
  211. package/dist/node_modules/@base-ui/react/esm/utils/resolveAriaLabelledBy.js +6 -0
  212. package/dist/node_modules/@base-ui/react/esm/utils/resolveValueLabel.js +73 -0
  213. package/dist/node_modules/@base-ui/react/esm/utils/serializeValue.js +14 -0
  214. package/dist/node_modules/@base-ui/utils/esm/detectBrowser.js +8 -7
  215. package/dist/node_modules/@base-ui/utils/esm/empty.js +3 -2
  216. package/dist/node_modules/@base-ui/utils/esm/useControlled.js +31 -0
  217. package/dist/node_modules/@base-ui/utils/esm/visuallyHidden.js +5 -1
  218. package/dist/package.json +1 -2
  219. package/package.json +1 -2
@@ -0,0 +1,44 @@
1
+ import * as i from "react";
2
+ import { useIsoLayoutEffect as b } from "../../../utils/esm/useIsoLayoutEffect.js";
3
+ import { useStableCallback as R } from "../../../utils/esm/useStableCallback.js";
4
+ import { useRefWithInit as E } from "../../../utils/esm/useRefWithInit.js";
5
+ import { isElement as x } from "../../../../@floating-ui/utils/dist/floating-ui.utils.dom.js";
6
+ import { useBaseUiId as C } from "../utils/useBaseUiId.js";
7
+ import { useLabelableContext as g } from "./LabelableContext.js";
8
+ import { NOOP as p } from "../../../utils/esm/empty.js";
9
+ function F(I = {}) {
10
+ const {
11
+ id: e,
12
+ implicit: l = !1,
13
+ controlRef: s
14
+ } = I, {
15
+ controlId: c,
16
+ registerControlId: t
17
+ } = g(), o = C(e), d = l ? c : void 0, u = E(() => /* @__PURE__ */ Symbol("labelable-control")), f = i.useRef(!1), a = i.useRef(e != null), n = R(() => {
18
+ !f.current || t === p || (f.current = !1, t(u.current, void 0));
19
+ });
20
+ return b(() => {
21
+ if (t === p)
22
+ return;
23
+ let r;
24
+ if (l) {
25
+ const m = s?.current;
26
+ x(m) && m.closest("label") != null ? r = e ?? null : r = d ?? o;
27
+ } else if (e != null)
28
+ a.current = !0, r = e;
29
+ else if (a.current)
30
+ r = o;
31
+ else {
32
+ n();
33
+ return;
34
+ }
35
+ if (r === void 0) {
36
+ n();
37
+ return;
38
+ }
39
+ f.current = !0, t(u.current, r);
40
+ }, [e, s, d, t, l, o, u, n]), i.useEffect(() => n, [n]), c ?? o;
41
+ }
42
+ export {
43
+ F as useLabelableId
44
+ };
@@ -1,19 +1,22 @@
1
- const t = 500, i = {
1
+ const n = 500, t = {
2
2
  style: {
3
3
  transition: "none"
4
4
  }
5
- }, n = "data-base-ui-click-trigger", I = {
6
- fallbackAxisSide: "end"
5
+ }, i = "data-base-ui-click-trigger", I = {
6
+ fallbackAxisSide: "none"
7
7
  }, e = {
8
+ fallbackAxisSide: "end"
9
+ }, o = {
8
10
  clipPath: "inset(50%)",
9
11
  position: "fixed",
10
12
  top: 0,
11
13
  left: 0
12
14
  };
13
15
  export {
14
- n as CLICK_TRIGGER_IDENTIFIER,
15
- i as DISABLED_TRANSITIONS_STYLE,
16
- t as PATIENT_CLICK_THRESHOLD,
17
- I as POPUP_COLLISION_AVOIDANCE,
18
- e as ownerVisuallyHidden
16
+ i as CLICK_TRIGGER_IDENTIFIER,
17
+ t as DISABLED_TRANSITIONS_STYLE,
18
+ I as DROPDOWN_COLLISION_AVOIDANCE,
19
+ n as PATIENT_CLICK_THRESHOLD,
20
+ e as POPUP_COLLISION_AVOIDANCE,
21
+ o as ownerVisuallyHidden
19
22
  };
@@ -1,26 +1,35 @@
1
- import { EMPTY_OBJECT as l } from "../../../utils/esm/empty.js";
2
- function u(a, n, o, s) {
3
- let e = !1, t = !1;
4
- const r = l;
1
+ import { EMPTY_OBJECT as s } from "../../../utils/esm/empty.js";
2
+ function u(e, t, n, o) {
3
+ let a = !1, r = !1;
4
+ const l = s;
5
5
  return {
6
- reason: a,
7
- event: n ?? new Event("base-ui"),
6
+ reason: e,
7
+ event: t ?? new Event("base-ui"),
8
8
  cancel() {
9
- e = !0;
9
+ a = !0;
10
10
  },
11
11
  allowPropagation() {
12
- t = !0;
12
+ r = !0;
13
13
  },
14
14
  get isCanceled() {
15
- return e;
15
+ return a;
16
16
  },
17
17
  get isPropagationAllowed() {
18
- return t;
18
+ return r;
19
19
  },
20
- trigger: o,
21
- ...r
20
+ trigger: n,
21
+ ...l
22
+ };
23
+ }
24
+ function d(e, t, n) {
25
+ const o = n ?? s;
26
+ return {
27
+ reason: e,
28
+ event: t ?? new Event("base-ui"),
29
+ ...o
22
30
  };
23
31
  }
24
32
  export {
25
- u as createChangeEventDetails
33
+ u as createChangeEventDetails,
34
+ d as createGenericEventDetails
26
35
  };
@@ -0,0 +1,18 @@
1
+ function l(e) {
2
+ const t = e.getBoundingClientRect();
3
+ if (process.env.NODE_ENV !== "production")
4
+ return t;
5
+ const o = window.getComputedStyle(e, "::before"), n = window.getComputedStyle(e, "::after");
6
+ if (!(o.content !== "none" || n.content !== "none"))
7
+ return t;
8
+ const h = parseFloat(o.width) || 0, r = parseFloat(o.height) || 0, a = parseFloat(n.width) || 0, c = parseFloat(n.height) || 0, d = Math.max(t.width, h, a), f = Math.max(t.height, r, c), i = d - t.width, s = f - t.height;
9
+ return {
10
+ left: t.left - i / 2,
11
+ right: t.right + i / 2,
12
+ top: t.top - s / 2,
13
+ bottom: t.bottom + s / 2
14
+ };
15
+ }
16
+ export {
17
+ l as getPseudoElementBounds
18
+ };
@@ -0,0 +1,20 @@
1
+ const i = (n, r) => Object.is(n, r);
2
+ function u(n, r, t) {
3
+ return n == null || r == null ? Object.is(n, r) : t(n, r);
4
+ }
5
+ function e(n, r, t) {
6
+ return !n || n.length === 0 ? !1 : n.some((f) => f === void 0 ? !1 : u(r, f, t));
7
+ }
8
+ function o(n, r, t) {
9
+ return !n || n.length === 0 ? -1 : n.findIndex((f) => f === void 0 ? !1 : u(f, r, t));
10
+ }
11
+ function I(n, r, t) {
12
+ return n.filter((f) => !u(r, f, t));
13
+ }
14
+ export {
15
+ u as compareItemEquality,
16
+ i as defaultItemEquality,
17
+ o as findItemIndex,
18
+ I as removeItem,
19
+ e as selectedValueIncludes
20
+ };
@@ -1,9 +1,16 @@
1
- const e = "trigger-press", s = "trigger-hover", t = "outside-press", r = "focus-out", o = "escape-key", c = "imperative-action";
1
+ const s = "none", e = "trigger-press", t = "trigger-hover", n = "outside-press", o = "item-press", i = "close-press", r = "input-change", c = "input-clear", p = "input-press", a = "focus-out", g = "escape-key", u = "list-navigation", l = "imperative-action";
2
2
  export {
3
- o as escapeKey,
4
- r as focusOut,
5
- c as imperativeAction,
6
- t as outsidePress,
7
- s as triggerHover,
3
+ i as closePress,
4
+ g as escapeKey,
5
+ a as focusOut,
6
+ l as imperativeAction,
7
+ r as inputChange,
8
+ c as inputClear,
9
+ p as inputPress,
10
+ o as itemPress,
11
+ u as listNavigation,
12
+ s as none,
13
+ n as outsidePress,
14
+ t as triggerHover,
8
15
  e as triggerPress
9
16
  };
@@ -0,0 +1,6 @@
1
+ function l(e, r) {
2
+ return e ?? r;
3
+ }
4
+ export {
5
+ l as resolveAriaLabelledBy
6
+ };
@@ -0,0 +1,73 @@
1
+ import * as s from "react";
2
+ import { serializeValue as a } from "./serializeValue.js";
3
+ import { jsx as i } from "react/jsx-runtime";
4
+ function c(r) {
5
+ return r != null && r.length > 0 && typeof r[0] == "object" && r[0] != null && "items" in r[0];
6
+ }
7
+ function h(r) {
8
+ if (!Array.isArray(r))
9
+ return r != null && "null" in r;
10
+ const l = r;
11
+ if (c(l)) {
12
+ for (const n of l)
13
+ for (const u of n.items)
14
+ if (u && u.value == null && u.label != null)
15
+ return !0;
16
+ return !1;
17
+ }
18
+ for (const n of l)
19
+ if (n && n.value == null && n.label != null)
20
+ return !0;
21
+ return !1;
22
+ }
23
+ function b(r, l) {
24
+ if (l && r != null)
25
+ return l(r) ?? "";
26
+ if (r && typeof r == "object") {
27
+ if ("label" in r && r.label != null)
28
+ return String(r.label);
29
+ if ("value" in r)
30
+ return String(r.value);
31
+ }
32
+ return a(r);
33
+ }
34
+ function j(r, l) {
35
+ return l && r != null ? l(r) ?? "" : r && typeof r == "object" && "value" in r && "label" in r ? a(r.value) : a(r);
36
+ }
37
+ function p(r, l, n) {
38
+ function u() {
39
+ return b(r, n);
40
+ }
41
+ if (n && r != null)
42
+ return n(r);
43
+ if (r && typeof r == "object" && "label" in r && r.label != null)
44
+ return r.label;
45
+ if (l && !Array.isArray(l))
46
+ return l[r] ?? u();
47
+ if (Array.isArray(l)) {
48
+ const e = l, t = c(e) ? e.flatMap((f) => f.items) : e;
49
+ if (r == null || typeof r != "object") {
50
+ const f = t.find((o) => o.value === r);
51
+ return f && f.label != null ? f.label : u();
52
+ }
53
+ if ("value" in r) {
54
+ const f = t.find((o) => o && o.value === r.value);
55
+ if (f && f.label != null)
56
+ return f.label;
57
+ }
58
+ }
59
+ return u();
60
+ }
61
+ function d(r, l, n) {
62
+ return r.reduce((u, e, t) => (t > 0 && u.push(", "), u.push(/* @__PURE__ */ i(s.Fragment, {
63
+ children: p(e, l, n)
64
+ }, t)), u), []);
65
+ }
66
+ export {
67
+ h as hasNullItemLabel,
68
+ c as isGroupedItems,
69
+ d as resolveMultipleLabels,
70
+ p as resolveSelectedLabel,
71
+ b as stringifyAsLabel,
72
+ j as stringifyAsValue
73
+ };
@@ -0,0 +1,14 @@
1
+ function t(r) {
2
+ if (r == null)
3
+ return "";
4
+ if (typeof r == "string")
5
+ return r;
6
+ try {
7
+ return JSON.stringify(r);
8
+ } catch {
9
+ return String(r);
10
+ }
11
+ }
12
+ export {
13
+ t as serializeValue
14
+ };
@@ -1,9 +1,9 @@
1
- const a = typeof navigator < "u", o = s(), r = f(), n = u(), c = typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter:none"), m = (
1
+ const a = typeof navigator < "u", o = s(), n = f(), r = u(), c = typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter:none"), m = (
2
2
  // iPads can claim to be MacIntel
3
3
  o.platform === "MacIntel" && o.maxTouchPoints > 1 ? !0 : /iP(hone|ad|od)|iOS/.test(o.platform)
4
- ), p = a && /apple/i.test(navigator.vendor), g = a && /android/i.test(r) || /android/i.test(n);
5
- a && r.toLowerCase().startsWith("mac") && navigator.maxTouchPoints;
6
- const d = n.includes("jsdom/");
4
+ ), p = a && /firefox/i.test(r), g = a && /apple/i.test(navigator.vendor), d = a && /android/i.test(n) || /android/i.test(r);
5
+ a && n.toLowerCase().startsWith("mac") && navigator.maxTouchPoints;
6
+ const l = r.includes("jsdom/");
7
7
  function s() {
8
8
  if (!a)
9
9
  return {
@@ -35,9 +35,10 @@ function f() {
35
35
  return t?.platform ? t.platform : navigator.platform ?? "";
36
36
  }
37
37
  export {
38
- g as isAndroid,
38
+ d as isAndroid,
39
+ p as isFirefox,
39
40
  m as isIOS,
40
- d as isJSDOM,
41
- p as isSafari,
41
+ l as isJSDOM,
42
+ g as isSafari,
42
43
  c as isWebKit
43
44
  };
@@ -1,7 +1,8 @@
1
1
  function e() {
2
2
  }
3
- const t = Object.freeze({});
3
+ const t = Object.freeze([]), c = Object.freeze({});
4
4
  export {
5
- t as EMPTY_OBJECT,
5
+ t as EMPTY_ARRAY,
6
+ c as EMPTY_OBJECT,
6
7
  e as NOOP
7
8
  };
@@ -0,0 +1,31 @@
1
+ import * as n from "react";
2
+ function d({
3
+ controlled: o,
4
+ default: s,
5
+ name: t,
6
+ state: i = "value"
7
+ }) {
8
+ const {
9
+ current: e
10
+ } = n.useRef(o !== void 0), [l, c] = n.useState(s), u = e ? o : l;
11
+ if (process.env.NODE_ENV !== "production") {
12
+ n.useEffect(() => {
13
+ e !== (o !== void 0) && console.error([`Base UI: A component is changing the ${e ? "" : "un"}controlled ${i} state of ${t} to be ${e ? "un" : ""}controlled.`, "Elements should not switch from uncontrolled to controlled (or vice versa).", `Decide between using a controlled or uncontrolled ${t} element for the lifetime of the component.`, "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", "More info: https://fb.me/react-controlled-components"].join(`
14
+ `));
15
+ }, [i, t, o]);
16
+ const {
17
+ current: r
18
+ } = n.useRef(s);
19
+ n.useEffect(() => {
20
+ !e && JSON.stringify(r) !== JSON.stringify(s) && console.error([`Base UI: A component is changing the default ${i} state of an uncontrolled ${t} after being initialized. To suppress this warning opt to use a controlled ${t}.`].join(`
21
+ `));
22
+ }, [JSON.stringify(s)]);
23
+ }
24
+ const f = n.useCallback((r) => {
25
+ e || c(r);
26
+ }, []);
27
+ return [u, f];
28
+ }
29
+ export {
30
+ d as useControlled
31
+ };
@@ -12,7 +12,11 @@ const i = {
12
12
  position: "fixed",
13
13
  top: 0,
14
14
  left: 0
15
+ }, t = {
16
+ ...i,
17
+ position: "absolute"
15
18
  };
16
19
  export {
17
- e as visuallyHidden
20
+ e as visuallyHidden,
21
+ t as visuallyHiddenInput
18
22
  };
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ledgerhq/lumen-ui-react",
3
- "version": "0.1.15",
3
+ "version": "0.1.17",
4
4
  "license": "Apache-2.0",
5
5
  "sideEffects": false,
6
6
  "keywords": [
@@ -50,7 +50,6 @@
50
50
  "@radix-ui/react-checkbox": "^1.3.2",
51
51
  "@radix-ui/react-dialog": "^1.1.15",
52
52
  "@radix-ui/react-dropdown-menu": "^2.1.2",
53
- "@radix-ui/react-select": "^2.2.6",
54
53
  "@radix-ui/react-slot": "^1.2.3",
55
54
  "@radix-ui/react-switch": "^1.2.6",
56
55
  "@radix-ui/react-tooltip": "^1.2.8",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ledgerhq/lumen-ui-react",
3
- "version": "0.1.16",
3
+ "version": "0.1.18",
4
4
  "license": "Apache-2.0",
5
5
  "sideEffects": false,
6
6
  "keywords": [
@@ -50,7 +50,6 @@
50
50
  "@radix-ui/react-checkbox": "^1.3.2",
51
51
  "@radix-ui/react-dialog": "^1.1.15",
52
52
  "@radix-ui/react-dropdown-menu": "^2.1.2",
53
- "@radix-ui/react-select": "^2.2.6",
54
53
  "@radix-ui/react-slot": "^1.2.3",
55
54
  "@radix-ui/react-switch": "^1.2.6",
56
55
  "@radix-ui/react-tooltip": "^1.2.8",