@ledgerhq/lumen-ui-react 0.1.35 → 0.1.36

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 (93) hide show
  1. package/dist/index.js +108 -109
  2. package/dist/lib/Components/AmountDisplay/AmountDisplay.d.ts +1 -1
  3. package/dist/lib/Components/AmountDisplay/AmountDisplay.d.ts.map +1 -1
  4. package/dist/lib/Components/AmountDisplay/AmountDisplay.js +117 -78
  5. package/dist/lib/Components/AmountDisplay/index.d.ts +1 -1
  6. package/dist/lib/Components/AmountDisplay/index.d.ts.map +1 -1
  7. package/dist/lib/Components/AmountDisplay/types.d.ts +16 -3
  8. package/dist/lib/Components/AmountDisplay/types.d.ts.map +1 -1
  9. package/dist/lib/Components/DotIcon/DotIcon.d.ts +1 -1
  10. package/dist/lib/Components/DotIcon/DotIcon.d.ts.map +1 -1
  11. package/dist/lib/Components/DotIcon/DotIcon.js +48 -37
  12. package/dist/lib/Components/DotIcon/types.d.ts +6 -0
  13. package/dist/lib/Components/DotIcon/types.d.ts.map +1 -1
  14. package/dist/lib/Components/DotSymbol/DotSymbol.d.ts +1 -1
  15. package/dist/lib/Components/DotSymbol/DotSymbol.d.ts.map +1 -1
  16. package/dist/lib/Components/DotSymbol/DotSymbol.js +42 -31
  17. package/dist/lib/Components/DotSymbol/types.d.ts +6 -0
  18. package/dist/lib/Components/DotSymbol/types.d.ts.map +1 -1
  19. package/dist/lib/Components/MediaButton/MediaButton.d.ts +3 -3
  20. package/dist/lib/Components/MediaButton/MediaButton.d.ts.map +1 -1
  21. package/dist/lib/Components/MediaButton/MediaButton.js +42 -40
  22. package/dist/lib/Components/MediaButton/types.d.ts +5 -5
  23. package/dist/lib/Components/MediaButton/types.d.ts.map +1 -1
  24. package/dist/lib/Components/MediaImage/MediaImage.d.ts +1 -1
  25. package/dist/lib/Components/MediaImage/MediaImage.d.ts.map +1 -1
  26. package/dist/lib/Components/MediaImage/MediaImage.js +40 -29
  27. package/dist/lib/Components/MediaImage/types.d.ts +6 -0
  28. package/dist/lib/Components/MediaImage/types.d.ts.map +1 -1
  29. package/dist/lib/Components/Menu/Menu.d.ts +11 -16
  30. package/dist/lib/Components/Menu/Menu.d.ts.map +1 -1
  31. package/dist/lib/Components/Menu/Menu.js +186 -125
  32. package/dist/lib/Components/Menu/types.d.ts +50 -145
  33. package/dist/lib/Components/Menu/types.d.ts.map +1 -1
  34. package/dist/lib/Components/NavBar/CoinCapsule.d.ts +2 -2
  35. package/dist/lib/Components/NavBar/CoinCapsule.d.ts.map +1 -1
  36. package/dist/lib/Components/NavBar/CoinCapsule.js +1 -1
  37. package/dist/lib/Components/NavBar/NavBar.d.ts +4 -4
  38. package/dist/lib/Components/NavBar/NavBar.d.ts.map +1 -1
  39. package/dist/lib/Components/NavBar/NavBar.js +10 -2
  40. package/dist/lib/Components/NavBar/types.d.ts +2 -2
  41. package/dist/lib/Components/NavBar/types.d.ts.map +1 -1
  42. package/dist/lib/Components/Popover/Popover.d.ts +2 -2
  43. package/dist/lib/Components/Popover/types.d.ts +6 -3
  44. package/dist/lib/Components/Popover/types.d.ts.map +1 -1
  45. package/dist/node_modules/@base-ui/react/esm/composite/item/CompositeItem.js +30 -0
  46. package/dist/node_modules/@base-ui/react/esm/composite/item/useCompositeItem.js +34 -0
  47. package/dist/node_modules/@base-ui/react/esm/context-menu/root/ContextMenuRootContext.js +14 -0
  48. package/dist/node_modules/@base-ui/react/esm/floating-ui-react/components/FloatingFocusManager.js +10 -10
  49. package/dist/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useFocus.js +97 -0
  50. package/dist/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useHoverFloatingInteraction.js +10 -10
  51. package/dist/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useHoverReferenceInteraction.js +2 -2
  52. package/dist/node_modules/@base-ui/react/esm/floating-ui-react/utils/element.js +31 -20
  53. package/dist/node_modules/@base-ui/react/esm/menu/checkbox-item/MenuCheckboxItem.js +78 -0
  54. package/dist/node_modules/@base-ui/react/esm/menu/checkbox-item/MenuCheckboxItemContext.js +14 -0
  55. package/dist/node_modules/@base-ui/react/esm/menu/checkbox-item/MenuCheckboxItemDataAttributes.js +6 -0
  56. package/dist/node_modules/@base-ui/react/esm/menu/checkbox-item-indicator/MenuCheckboxItemIndicator.js +44 -0
  57. package/dist/node_modules/@base-ui/react/esm/menu/group/MenuGroup.js +28 -0
  58. package/dist/node_modules/@base-ui/react/esm/menu/group/MenuGroupContext.js +14 -0
  59. package/dist/node_modules/@base-ui/react/esm/menu/group-label/MenuGroupLabel.js +29 -0
  60. package/dist/node_modules/@base-ui/react/esm/menu/item/MenuItem.js +47 -0
  61. package/dist/node_modules/@base-ui/react/esm/menu/item/useMenuItem.js +50 -0
  62. package/dist/node_modules/@base-ui/react/esm/menu/item/useMenuItemCommonProps.js +49 -0
  63. package/dist/node_modules/@base-ui/react/esm/menu/popup/MenuPopup.js +89 -0
  64. package/dist/node_modules/@base-ui/react/esm/menu/portal/MenuPortal.js +24 -0
  65. package/dist/node_modules/@base-ui/react/esm/menu/portal/MenuPortalContext.js +14 -0
  66. package/dist/node_modules/@base-ui/react/esm/menu/positioner/MenuPositioner.js +174 -0
  67. package/dist/node_modules/@base-ui/react/esm/menu/positioner/MenuPositionerContext.js +14 -0
  68. package/dist/node_modules/@base-ui/react/esm/menu/radio-group/MenuRadioGroup.js +45 -0
  69. package/dist/node_modules/@base-ui/react/esm/menu/radio-group/MenuRadioGroupContext.js +14 -0
  70. package/dist/node_modules/@base-ui/react/esm/menu/radio-item/MenuRadioItem.js +75 -0
  71. package/dist/node_modules/@base-ui/react/esm/menu/radio-item/MenuRadioItemContext.js +14 -0
  72. package/dist/node_modules/@base-ui/react/esm/menu/radio-item-indicator/MenuRadioItemIndicator.js +44 -0
  73. package/dist/node_modules/@base-ui/react/esm/menu/root/MenuRoot.js +271 -0
  74. package/dist/node_modules/@base-ui/react/esm/menu/root/MenuRootContext.js +14 -0
  75. package/dist/node_modules/@base-ui/react/esm/menu/store/MenuStore.js +109 -0
  76. package/dist/node_modules/@base-ui/react/esm/menu/submenu-root/MenuSubmenuRoot.js +21 -0
  77. package/dist/node_modules/@base-ui/react/esm/menu/submenu-root/MenuSubmenuRootContext.js +10 -0
  78. package/dist/node_modules/@base-ui/react/esm/menu/submenu-trigger/MenuSubmenuTrigger.js +101 -0
  79. package/dist/node_modules/@base-ui/react/esm/menu/trigger/MenuTrigger.js +207 -0
  80. package/dist/node_modules/@base-ui/react/esm/menu/utils/findRootOwnerId.js +10 -0
  81. package/dist/node_modules/@base-ui/react/esm/menu/utils/stateAttributesMapping.js +15 -0
  82. package/dist/node_modules/@base-ui/react/esm/menubar/MenubarContext.js +10 -0
  83. package/dist/node_modules/@base-ui/react/esm/popover/root/PopoverRoot.js +11 -11
  84. package/dist/node_modules/@base-ui/react/esm/popover/store/PopoverStore.js +7 -7
  85. package/dist/node_modules/@base-ui/react/esm/popover/trigger/PopoverTrigger.js +11 -11
  86. package/dist/node_modules/@base-ui/react/esm/utils/constants.js +11 -10
  87. package/dist/node_modules/@base-ui/react/esm/utils/reason-parts.js +11 -8
  88. package/dist/node_modules/@base-ui/react/esm/utils/useMixedToggleClickHandler.js +25 -0
  89. package/dist/node_modules/@base-ui/utils/esm/detectBrowser.js +7 -8
  90. package/dist/node_modules/@base-ui/utils/esm/fastHooks.js +43 -0
  91. package/dist/node_modules/@base-ui/utils/esm/store/useStore.js +54 -13
  92. package/dist/package.json +2 -3
  93. package/package.json +4 -5
@@ -1,10 +1,6 @@
1
+ import { Menu as MenuNamespace } from '@base-ui/react/menu';
1
2
  import { ComponentPropsWithRef, ComponentPropsWithoutRef, ReactNode } from 'react';
2
- type PointerDownOutsideEvent = CustomEvent<{
3
- originalEvent: PointerEvent;
4
- }>;
5
- type FocusOutsideEvent = CustomEvent<{
6
- originalEvent: FocusEvent;
7
- }>;
3
+ type MenuRootChangeEventDetails = MenuNamespace.Root.ChangeEventDetails;
8
4
  /**
9
5
  * Props for the Menu root component.
10
6
  *
@@ -29,32 +25,26 @@ export type MenuProps = {
29
25
  * Event handler called when the open state changes.
30
26
  *
31
27
  * @param open - The new open state
28
+ * @param eventDetails - Additional details about the event that caused the change
32
29
  */
33
- onOpenChange?: (open: boolean) => void;
34
- /**
35
- * The modality of the dropdown menu.
36
- * When set to `true`, interaction with outside elements will be disabled
37
- * and only menu content will be visible to screen readers.
38
- *
39
- * @default true
40
- */
41
- modal?: boolean;
30
+ onOpenChange?: (open: boolean, eventDetails: MenuRootChangeEventDetails) => void;
42
31
  };
43
32
  /**
44
33
  * Props for the Menu trigger component.
45
34
  *
46
- * The button that toggles the dropdown menu.
47
- * By default renders a button element.
35
+ * The element that toggles the dropdown menu.
36
+ * Requires the `render` prop to compose trigger behavior onto your component.
48
37
  */
49
38
  export type MenuTriggerProps = {
50
39
  /**
51
- * Change the default rendered element for the one passed as a child,
52
- * merging their props and behavior.
40
+ * Render prop that composes menu trigger behavior onto your component
41
+ * without an extra wrapper element.
53
42
  *
54
- * Use this when you need to trigger the menu from a custom component.
43
+ * @example render={<IconButton icon={MoreVertical} aria-label="Open Menu" />}
44
+ * @example render={(props) => <IconButton {...props} icon={MoreVertical} aria-label="Open Menu" />}
55
45
  */
56
- asChild?: boolean;
57
- } & ComponentPropsWithRef<'button'>;
46
+ render: MenuNamespace.Trigger.Props['render'];
47
+ } & Omit<ComponentPropsWithRef<'button'>, 'children'>;
58
48
  /**
59
49
  * Props for the Menu content component.
60
50
  *
@@ -62,48 +52,15 @@ export type MenuTriggerProps = {
62
52
  */
63
53
  export type MenuContentProps = {
64
54
  /**
65
- * Additional CSS class names to apply to the content.
55
+ * Additional CSS class names to apply to the popup.
66
56
  */
67
57
  className?: string;
68
58
  /**
69
- * Change the default rendered element for the one passed as a child,
70
- * merging their props and behavior.
71
- */
72
- asChild?: boolean;
73
- /**
74
- * When `true`, keyboard navigation will loop from last item to first, and vice versa.
75
- *
76
- * @default false
77
- */
78
- loop?: boolean;
79
- /**
80
- * Event handler called when focus moves back after closing.
81
- * Can be prevented by calling `event.preventDefault`.
82
- */
83
- onCloseAutoFocus?: (event: Event) => void;
84
- /**
85
- * Event handler called when the escape key is down.
86
- * Can be prevented by calling `event.preventDefault`.
87
- */
88
- onEscapeKeyDown?: (event: KeyboardEvent) => void;
89
- /**
90
- * Event handler called when a pointer event occurs outside the bounds of the component.
91
- * Can be prevented by calling `event.preventDefault`.
92
- */
93
- onPointerDownOutside?: (event: PointerDownOutsideEvent) => void;
94
- /**
95
- * Event handler called when focus moves outside the bounds of the component.
96
- * Can be prevented by calling `event.preventDefault`.
97
- */
98
- onFocusOutside?: (event: FocusOutsideEvent) => void;
99
- /**
100
- * Event handler called when an interaction (pointer or focus) happens outside the bounds of the component.
101
- * Can be prevented by calling `event.preventDefault`.
59
+ * The content to display inside the menu popup.
102
60
  */
103
- onInteractOutside?: (event: PointerDownOutsideEvent | FocusOutsideEvent) => void;
61
+ children?: ReactNode;
104
62
  /**
105
63
  * The preferred side of the trigger to render against when open.
106
- * Will be reversed when collisions occur and `avoidCollisions` is enabled.
107
64
  *
108
65
  * @default 'bottom'
109
66
  */
@@ -111,55 +68,28 @@ export type MenuContentProps = {
111
68
  /**
112
69
  * The distance in pixels from the trigger.
113
70
  *
114
- * @default 0
71
+ * @default 4
115
72
  */
116
73
  sideOffset?: number;
117
74
  /**
118
75
  * The preferred alignment against the trigger.
119
- * May change when collisions occur.
120
76
  *
121
77
  * @default 'start'
122
78
  */
123
79
  align?: 'start' | 'center' | 'end';
124
80
  /**
125
81
  * An offset in pixels from the "start" or "end" alignment options.
126
- *
127
82
  * @default 0
128
83
  */
129
84
  alignOffset?: number;
130
85
  /**
131
- * When `true`, overrides the side and align preferences to prevent collisions with boundary edges.
86
+ * Whether to maintain the popup in the viewport after the anchor element
87
+ * has been scrolled out of view.
132
88
  *
133
89
  * @default true
134
90
  */
135
- avoidCollisions?: boolean;
136
- /**
137
- * The element used as the collision boundary.
138
- *
139
- * @default []
140
- */
141
- collisionBoundary?: Element | null | (Element | null)[];
142
- /**
143
- * The distance in pixels from the boundary edges where collision detection should occur.
144
- *
145
- * @default 0
146
- */
147
- collisionPadding?: number | Partial<Record<'top' | 'right' | 'bottom' | 'left', number>>;
148
- /**
149
- * The sticky behavior on the align axis.
150
- * "partial" will keep the content in the boundary as long as the trigger is at least partially in the boundary,
151
- * whilst "always" will keep the content in the boundary regardless.
152
- *
153
- * @default 'partial'
154
- */
155
- sticky?: 'partial' | 'always';
156
- /**
157
- * Whether to hide the content when the trigger becomes fully occluded.
158
- *
159
- * @default false
160
- */
161
- hideWhenDetached?: boolean;
162
- } & ComponentPropsWithRef<'div'>;
91
+ sticky?: boolean;
92
+ };
163
93
  /**
164
94
  * Props for a Menu item component.
165
95
  *
@@ -170,32 +100,24 @@ export type MenuItemProps = {
170
100
  * Additional CSS class names to apply to the item.
171
101
  */
172
102
  className?: string;
173
- /**
174
- * When `true`, the item will have left padding for alignment with labeled items.
175
- */
176
- inset?: boolean;
177
- /**
178
- * Change the default rendered element for the one passed as a child,
179
- * merging their props and behavior.
180
- */
181
- asChild?: boolean;
182
103
  /**
183
104
  * When `true`, prevents the user from interacting with the item.
184
105
  *
185
106
  * @default false
186
107
  */
187
108
  disabled?: boolean;
188
- /**
189
- * Event handler called when the user selects an item (via mouse or keyboard).
190
- * Calling `event.preventDefault` in this handler will prevent the dropdown menu from closing when selecting that item.
191
- */
192
- onSelect?: (event: Event) => void;
193
109
  /**
194
110
  * Optional text used for typeahead purposes.
195
111
  * By default, the typeahead behavior will use the `.textContent` of the item.
196
112
  * Use this when the content is complex, or you have non-textual content inside.
197
113
  */
198
- textValue?: string;
114
+ label?: string;
115
+ /**
116
+ * Whether the menu closes when this item is clicked.
117
+ *
118
+ * @default true
119
+ */
120
+ closeOnClick?: boolean;
199
121
  } & ComponentPropsWithRef<'div'>;
200
122
  /**
201
123
  * Props for a Menu checkbox item component.
@@ -207,14 +129,27 @@ export type MenuCheckboxItemProps = {
207
129
  * The controlled checked state of the item.
208
130
  * Must be used in conjunction with `onCheckedChange`.
209
131
  */
210
- checked?: boolean | 'indeterminate';
132
+ checked?: boolean;
133
+ /**
134
+ * The checked state of the item when it is initially rendered.
135
+ * Use when you do not need to control its checked state.
136
+ *
137
+ * @default false
138
+ */
139
+ defaultChecked?: boolean;
211
140
  /**
212
141
  * Event handler called when the checked state changes.
213
142
  *
214
143
  * @param checked - The new checked state
215
144
  */
216
145
  onCheckedChange?: (checked: boolean) => void;
217
- } & Omit<MenuItemProps, 'onSelect'>;
146
+ /**
147
+ * Whether the menu closes when this item is clicked.
148
+ *
149
+ * @default false
150
+ */
151
+ closeOnClick?: boolean;
152
+ } & Omit<MenuItemProps, 'closeOnClick'>;
218
153
  /**
219
154
  * Props for a Menu radio item component.
220
155
  *
@@ -228,7 +163,7 @@ export type MenuRadioItemProps = {
228
163
  * @required
229
164
  */
230
165
  value: string;
231
- } & Omit<MenuItemProps, 'onSelect'>;
166
+ } & MenuItemProps;
232
167
  /**
233
168
  * Props for a Menu label component.
234
169
  *
@@ -240,15 +175,6 @@ export type MenuLabelProps = {
240
175
  * Additional CSS class names to apply to the label.
241
176
  */
242
177
  className?: string;
243
- /**
244
- * When `true`, the label will have left padding for alignment with items.
245
- */
246
- inset?: boolean;
247
- /**
248
- * Change the default rendered element for the one passed as a child,
249
- * merging their props and behavior.
250
- */
251
- asChild?: boolean;
252
178
  } & ComponentPropsWithRef<'div'>;
253
179
  /**
254
180
  * Props for a Menu separator component.
@@ -260,24 +186,13 @@ export type MenuSeparatorProps = {
260
186
  * Additional CSS class names to apply to the separator.
261
187
  */
262
188
  className?: string;
263
- /**
264
- * Change the default rendered element for the one passed as a child,
265
- * merging their props and behavior.
266
- */
267
- asChild?: boolean;
268
189
  } & ComponentPropsWithRef<'div'>;
269
190
  /**
270
191
  * Props for a Menu group component.
271
192
  *
272
193
  * Used to group multiple items together.
273
194
  */
274
- export type MenuGroupProps = {
275
- /**
276
- * Change the default rendered element for the one passed as a child,
277
- * merging their props and behavior.
278
- */
279
- asChild?: boolean;
280
- } & ComponentPropsWithoutRef<'div'>;
195
+ export type MenuGroupProps = ComponentPropsWithoutRef<'div'>;
281
196
  /**
282
197
  * Props for a Menu radio group component.
283
198
  *
@@ -295,11 +210,6 @@ export type MenuRadioGroupProps = {
295
210
  * @param value - The value of the radio item that was selected
296
211
  */
297
212
  onValueChange?: (value: string) => void;
298
- /**
299
- * Change the default rendered element for the one passed as a child,
300
- * merging their props and behavior.
301
- */
302
- asChild?: boolean;
303
213
  } & ComponentPropsWithoutRef<'div'>;
304
214
  /**
305
215
  * Props for a Menu sub component.
@@ -338,15 +248,6 @@ export type MenuSubTriggerProps = {
338
248
  * Additional CSS class names to apply to the sub trigger.
339
249
  */
340
250
  className?: string;
341
- /**
342
- * When `true`, the sub trigger will have left padding for alignment with labeled items.
343
- */
344
- inset?: boolean;
345
- /**
346
- * Change the default rendered element for the one passed as a child,
347
- * merging their props and behavior.
348
- */
349
- asChild?: boolean;
350
251
  /**
351
252
  * When `true`, prevents the user from interacting with the item.
352
253
  *
@@ -358,7 +259,7 @@ export type MenuSubTriggerProps = {
358
259
  * By default, the typeahead behavior will use the `.textContent` of the item.
359
260
  * Use this when the content is complex, or you have non-textual content inside.
360
261
  */
361
- textValue?: string;
262
+ label?: string;
362
263
  } & ComponentPropsWithRef<'div'>;
363
264
  /**
364
265
  * Props for a Menu sub content component.
@@ -371,6 +272,10 @@ export type MenuSubContentProps = {
371
272
  * Additional CSS class names to apply to the sub content.
372
273
  */
373
274
  className?: string;
374
- } & Omit<MenuContentProps, 'side' | 'sideOffset' | 'align' | 'onCloseAutoFocus' | 'onEscapeKeyDown' | 'onPointerDownOutside' | 'onFocusOutside' | 'onInteractOutside'>;
275
+ /**
276
+ * The content to display inside the submenu popup.
277
+ */
278
+ children?: ReactNode;
279
+ };
375
280
  export {};
376
281
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../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AAE,MAAM,KAAK,IAAI,CAAC;IAExC;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,GAAG,wBAAwB,CAAC,KAAK,CAAC,CAAC;AAEpC;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;;OAIG;IACH,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACxC,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC;AAEjC;;;;;GAKG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,IAAI,CACN,gBAAgB,EACd,MAAM,GACN,YAAY,GACZ,OAAO,GACP,kBAAkB,GAClB,iBAAiB,GACjB,sBAAsB,GACtB,gBAAgB,GAChB,mBAAmB,CACtB,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Menu/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,KAAK,EACV,qBAAqB,EACrB,wBAAwB,EACxB,SAAS,EACV,MAAM,OAAO,CAAC;A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AAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;;OAIG;IACH,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACxC,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC;AAEjC;;;;;GAKG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CAAC"}
@@ -1,9 +1,9 @@
1
1
  import { CoinCapsuleProps } from './types';
2
2
  /**
3
3
  * @internal
4
- * Internal component for displaying a cryptocurrency coin capsule with icon and ticker.
4
+ * Internal component for displaying a cryptocurrency coin capsule with leading content and ticker.
5
5
  * This component is not exported publicly. Use NavBarCoinCapsule instead for NavBar usage.
6
6
  * Kept as a separate component for potential future extraction as a standalone component.
7
7
  */
8
- export declare const CoinCapsule: ({ ref, ticker, icon, className, }: CoinCapsuleProps) => import("react/jsx-runtime").JSX.Element;
8
+ export declare const CoinCapsule: ({ ref, ticker, leadingContent, className, }: CoinCapsuleProps) => import("react/jsx-runtime").JSX.Element;
9
9
  //# sourceMappingURL=CoinCapsule.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CoinCapsule.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/NavBar/CoinCapsule.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD;;;;;GAKG;AACH,eAAO,MAAM,WAAW,GAAI,mCAKzB,gBAAgB,4CAgBlB,CAAC"}
1
+ {"version":3,"file":"CoinCapsule.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/NavBar/CoinCapsule.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD;;;;;GAKG;AACH,eAAO,MAAM,WAAW,GAAI,6CAKzB,gBAAgB,4CAgBlB,CAAC"}
@@ -3,7 +3,7 @@ import { cn as c } from "../../../libs/utils-shared/dist/index.js";
3
3
  const o = ({
4
4
  ref: s,
5
5
  ticker: t,
6
- icon: n,
6
+ leadingContent: n,
7
7
  className: r
8
8
  }) => /* @__PURE__ */ a(
9
9
  "div",
@@ -1,15 +1,15 @@
1
1
  import { NavBarBackButtonProps, NavBarCoinCapsuleProps, NavBarDescriptionProps, NavBarLeadingProps, NavBarProps, NavBarTitleProps, NavBarTrailingProps } from './types';
2
2
  /**
3
3
  * A coin capsule component for displaying cryptocurrency information within the NavBar.
4
- * Shows an icon and ticker symbol in a pill-shaped container.
4
+ * Shows leading content (e.g., an icon) and ticker symbol in a pill-shaped container.
5
5
  *
6
6
  * @example
7
7
  * import { NavBar, NavBarBackButton, NavBarCoinCapsule, NavBarTrailing } from '@ledgerhq/lumen-ui-react';
8
8
  * import { CryptoIcon } from '@ledgerhq/crypto-icons';
9
9
  *
10
- * <NavBarCoinCapsule ticker="BTC" icon={<CryptoIcon ledgerId="bitcoin" ticker="BTC" size={24} />} />
10
+ * <NavBarCoinCapsule ticker="BTC" leadingContent={<CryptoIcon ledgerId="bitcoin" ticker="BTC" size={24} />} />
11
11
  */
12
- export declare const NavBarCoinCapsule: ({ ref, ticker, icon, className, }: NavBarCoinCapsuleProps) => import("react/jsx-runtime").JSX.Element;
12
+ export declare const NavBarCoinCapsule: ({ ref, ticker, leadingContent, className, }: NavBarCoinCapsuleProps) => import("react/jsx-runtime").JSX.Element;
13
13
  /**
14
14
  * Back button component for the NavBar. Displays an arrow left icon button.
15
15
  *
@@ -84,7 +84,7 @@ export declare const NavBarTrailing: ({ ref, children, className, ...props }: Na
84
84
  *
85
85
  * <NavBar>
86
86
  * <NavBarBackButton onClick={handleBack} />
87
- * <NavBarCoinCapsule ticker="BTC" icon={<CryptoIcon ledgerId="bitcoin" ticker="BTC" size={24} />} />
87
+ * <NavBarCoinCapsule ticker="BTC" leadingContent={<CryptoIcon ledgerId="bitcoin" ticker="BTC" size={24} />} />
88
88
  * <NavBarTrailing>
89
89
  * <IconButton icon={MoreHorizontal} aria-label="More options" />
90
90
  * </NavBarTrailing>
@@ -1 +1 @@
1
- {"version":3,"file":"NavBar.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/NavBar/NavBar.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,qBAAqB,EACrB,sBAAsB,EACtB,sBAAsB,EACtB,kBAAkB,EAClB,WAAW,EACX,gBAAgB,EAChB,mBAAmB,EACpB,MAAM,SAAS,CAAC;AAEjB;;;;;;;;;GASG;AACH,eAAO,MAAM,iBAAiB,GAAI,mCAK/B,sBAAsB,4CAIxB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,GAAI,uDAK9B,qBAAqB,4CAevB,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW,GAAI,8CAKzB,gBAAgB,4CAclB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,GAAI,wCAK/B,sBAAsB,4CAUxB,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa,GAAI,wCAK3B,kBAAkB,4CAWpB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,GAAI,wCAK5B,mBAAmB,GAAG;IACvB,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;CACjC,4CAWA,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,MAAM,GAAI,wCAAwC,WAAW,4CAWzE,CAAC"}
1
+ {"version":3,"file":"NavBar.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/NavBar/NavBar.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,qBAAqB,EACrB,sBAAsB,EACtB,sBAAsB,EACtB,kBAAkB,EAClB,WAAW,EACX,gBAAgB,EAChB,mBAAmB,EACpB,MAAM,SAAS,CAAC;AAEjB;;;;;;;;;GASG;AACH,eAAO,MAAM,iBAAiB,GAAI,6CAK/B,sBAAsB,4CASxB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,GAAI,uDAK9B,qBAAqB,4CAevB,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW,GAAI,8CAKzB,gBAAgB,4CAclB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,GAAI,wCAK/B,sBAAsB,4CAUxB,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa,GAAI,wCAK3B,kBAAkB,4CAWpB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,GAAI,wCAK5B,mBAAmB,GAAG;IACvB,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;CACjC,4CAWA,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,MAAM,GAAI,wCAAwC,WAAW,4CAWzE,CAAC"}
@@ -7,9 +7,17 @@ import { ArrowLeft as m } from "../../Symbols/Icons/ArrowLeft.js";
7
7
  const N = ({
8
8
  ref: a,
9
9
  ticker: t,
10
- icon: r,
10
+ leadingContent: r,
11
11
  className: e
12
- }) => /* @__PURE__ */ n("div", { className: "flex flex-1 items-center", "data-slot": "navbar-coin-capsule", children: /* @__PURE__ */ n(i, { ref: a, ticker: t, icon: r, className: e }) }), B = ({
12
+ }) => /* @__PURE__ */ n("div", { className: "flex flex-1 items-center", "data-slot": "navbar-coin-capsule", children: /* @__PURE__ */ n(
13
+ i,
14
+ {
15
+ ref: a,
16
+ ticker: t,
17
+ leadingContent: r,
18
+ className: e
19
+ }
20
+ ) }), B = ({
13
21
  ref: a,
14
22
  onClick: t,
15
23
  "aria-label": r,
@@ -80,9 +80,9 @@ export type CoinCapsuleProps = {
80
80
  */
81
81
  ticker: string;
82
82
  /**
83
- * The icon element to display (typically a crypto coin icon).
83
+ * The leading content, typically a crypto coin icon.
84
84
  */
85
- icon: ReactNode;
85
+ leadingContent: ReactNode;
86
86
  /**
87
87
  * Additional custom CSS classes to apply.
88
88
  */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/NavBar/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9D,MAAM,MAAM,WAAW,GAAG;IACxB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,EAAE,UAAU,GAAG,WAAW,CAAC,CAAC;AAEjE,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,qBAAqB,CAAC,QAAQ,CAAC,CAAC;AAEpC,MAAM,MAAM,sBAAsB,GAAG;IACnC;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC;AAEjC,M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qBAAqB,CAAC,KAAK,CAAC,CAAC;AAEjC;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,gBAAgB,CAAC"}
@@ -22,8 +22,8 @@ import { PopoverProps, PopoverTriggerProps, PopoverContentProps } from './types'
22
22
  */
23
23
  declare const Popover: <Payload>({ open, defaultOpen, onOpenChange, overlay, handle, children, }: PopoverProps<Payload>) => import("react/jsx-runtime").JSX.Element;
24
24
  /**
25
- * A button that opens the popover.
26
- * Use the `render` prop to compose with a custom component.
25
+ * The element that toggles the popover.
26
+ * Requires the `render` prop to compose trigger behavior onto your component.
27
27
  *
28
28
  * @see {@link https://ldls.vercel.app/?path=/docs/components-popover-overview--docs Storybook}
29
29
  */
@@ -54,7 +54,9 @@ export type PopoverProps<Payload = unknown> = {
54
54
  };
55
55
  /**
56
56
  * Props for the PopoverTrigger component.
57
- * Use the `render` prop to compose with a custom component.
57
+ *
58
+ * The element that toggles the popover.
59
+ * Requires the `render` prop to compose trigger behavior onto your component.
58
60
  */
59
61
  export type PopoverTriggerProps<Payload = unknown> = {
60
62
  /**
@@ -68,12 +70,13 @@ export type PopoverTriggerProps<Payload = unknown> = {
68
70
  */
69
71
  payload?: Payload;
70
72
  /**
71
- * Render function that replaces the default button-style trigger.
73
+ * Render prop that composes popover trigger behavior onto your component
74
+ * without an extra wrapper element.
72
75
  *
73
76
  * @example render={<Button {...props} label="Label" />}
74
77
  * @example render={(props) => <Button {...props} label="Label" />}
75
78
  */
76
- render?: PopoverNamespace.Trigger.Props['render'];
79
+ render: PopoverNamespace.Trigger.Props['render'];
77
80
  } & Omit<ComponentPropsWithRef<'button'>, 'children'>;
78
81
  /**
79
82
  * Props for the PopoverContent component.
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Popover/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,6BAA6B,EAC7B,OAAO,IAAI,gBAAgB,EAC5B,MAAM,wBAAwB,CAAC;AAChC,O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CAAC;IAEnB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC"}
@@ -0,0 +1,30 @@
1
+ import { useRenderElement as c } from "../../utils/useRenderElement.js";
2
+ import { useCompositeItem as u } from "./useCompositeItem.js";
3
+ import { EMPTY_ARRAY as t, EMPTY_OBJECT as d } from "../../../../utils/esm/empty.js";
4
+ function M(e) {
5
+ const {
6
+ render: E,
7
+ className: R,
8
+ state: o = d,
9
+ props: r = t,
10
+ refs: s = t,
11
+ metadata: m,
12
+ stateAttributesMapping: p,
13
+ tag: i = "div",
14
+ ...a
15
+ } = e, {
16
+ compositeProps: n,
17
+ compositeRef: f
18
+ } = u({
19
+ metadata: m
20
+ });
21
+ return c(i, e, {
22
+ state: o,
23
+ ref: [...s, f],
24
+ props: [n, ...r, a],
25
+ stateAttributesMapping: p
26
+ });
27
+ }
28
+ export {
29
+ M as CompositeItem
30
+ };
@@ -0,0 +1,34 @@
1
+ import * as r from "react";
2
+ import { useMergedRefs as p } from "../../../../utils/esm/useMergedRefs.js";
3
+ import { useCompositeRootContext as h } from "../root/CompositeRootContext.js";
4
+ import { useCompositeListItem as g } from "../list/useCompositeListItem.js";
5
+ function I(m = {}) {
6
+ const {
7
+ highlightItemOnHover: s,
8
+ highlightedIndex: c,
9
+ onHighlightedIndexChange: i
10
+ } = h(), {
11
+ ref: u,
12
+ index: e
13
+ } = g(m), t = c === e, n = r.useRef(null), d = p(u, n);
14
+ return {
15
+ compositeProps: r.useMemo(() => ({
16
+ tabIndex: t ? 0 : -1,
17
+ onFocus() {
18
+ i(e);
19
+ },
20
+ onMouseMove() {
21
+ const o = n.current;
22
+ if (!s || !o)
23
+ return;
24
+ const f = o.hasAttribute("disabled") || o.ariaDisabled === "true";
25
+ !t && !f && o.focus();
26
+ }
27
+ }), [t, i, e, s]),
28
+ compositeRef: d,
29
+ index: e
30
+ };
31
+ }
32
+ export {
33
+ I as useCompositeItem
34
+ };
@@ -0,0 +1,14 @@
1
+ import r from "../../../../utils/esm/formatErrorMessage.js";
2
+ import * as e from "react";
3
+ const o = /* @__PURE__ */ e.createContext(void 0);
4
+ process.env.NODE_ENV !== "production" && (o.displayName = "ContextMenuRootContext");
5
+ function u(n = !0) {
6
+ const t = e.useContext(o);
7
+ if (t === void 0 && !n)
8
+ throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: ContextMenuRootContext is missing. ContextMenu parts must be placed within <ContextMenu.Root>." : r(25));
9
+ return t;
10
+ }
11
+ export {
12
+ o as ContextMenuRootContext,
13
+ u as useContextMenuRootContext
14
+ };