@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.
- package/ai-rules/RULES.md +7 -1
- package/dist/index.js +148 -142
- package/dist/lib/Components/AddressInput/AddressInput.d.ts +1 -4
- package/dist/lib/Components/AddressInput/AddressInput.d.ts.map +1 -1
- package/dist/lib/Components/AddressInput/AddressInput.js +21 -21
- package/dist/lib/Components/AmountDisplay/AmountDisplay.d.ts +1 -4
- package/dist/lib/Components/AmountDisplay/AmountDisplay.d.ts.map +1 -1
- package/dist/lib/Components/AmountDisplay/AmountDisplay.js +32 -29
- package/dist/lib/Components/AmountInput/AmountInput.d.ts +1 -4
- package/dist/lib/Components/AmountInput/AmountInput.d.ts.map +1 -1
- package/dist/lib/Components/AmountInput/AmountInput.js +13 -14
- package/dist/lib/Components/Avatar/Avatar.d.ts +1 -4
- package/dist/lib/Components/Avatar/Avatar.d.ts.map +1 -1
- package/dist/lib/Components/Avatar/Avatar.js +8 -9
- package/dist/lib/Components/BaseInput/BaseInput.d.ts +1 -4
- package/dist/lib/Components/BaseInput/BaseInput.d.ts.map +1 -1
- package/dist/lib/Components/BaseInput/BaseInput.js +66 -73
- package/dist/lib/Components/Button/BaseButton.d.ts +1 -4
- package/dist/lib/Components/Button/BaseButton.d.ts.map +1 -1
- package/dist/lib/Components/Button/BaseButton.js +14 -15
- package/dist/lib/Components/Button/Button.d.ts +1 -4
- package/dist/lib/Components/Button/Button.d.ts.map +1 -1
- package/dist/lib/Components/Button/Button.js +6 -7
- package/dist/lib/Components/Card/Card.d.ts +10 -40
- package/dist/lib/Components/Card/Card.d.ts.map +1 -1
- package/dist/lib/Components/Card/Card.js +115 -134
- package/dist/lib/Components/CardButton/CardButton.d.ts +1 -4
- package/dist/lib/Components/CardButton/CardButton.d.ts.map +1 -1
- package/dist/lib/Components/CardButton/CardButton.js +10 -11
- package/dist/lib/Components/Checkbox/Checkbox.d.ts +1 -4
- package/dist/lib/Components/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/lib/Components/Checkbox/Checkbox.js +2 -3
- package/dist/lib/Components/ContentBanner/ContentBanner.d.ts +4 -16
- package/dist/lib/Components/ContentBanner/ContentBanner.d.ts.map +1 -1
- package/dist/lib/Components/ContentBanner/ContentBanner.js +48 -54
- package/dist/lib/Components/DataTable/DataTable.d.ts +3 -12
- package/dist/lib/Components/DataTable/DataTable.d.ts.map +1 -1
- package/dist/lib/Components/DataTable/DataTable.js +84 -97
- package/dist/lib/Components/Dialog/Dialog.d.ts +3 -12
- package/dist/lib/Components/Dialog/Dialog.d.ts.map +1 -1
- package/dist/lib/Components/Dialog/Dialog.js +44 -50
- package/dist/lib/Components/Dialog/DialogHeader/DialogHeader.d.ts +1 -4
- package/dist/lib/Components/Dialog/DialogHeader/DialogHeader.d.ts.map +1 -1
- package/dist/lib/Components/Dialog/DialogHeader/DialogHeader.js +31 -34
- package/dist/lib/Components/Divider/Divider.d.ts +1 -4
- package/dist/lib/Components/Divider/Divider.d.ts.map +1 -1
- package/dist/lib/Components/Divider/Divider.js +10 -11
- package/dist/lib/Components/Icon/Icon.d.ts +1 -4
- package/dist/lib/Components/Icon/Icon.d.ts.map +1 -1
- package/dist/lib/Components/Icon/Icon.js +6 -7
- package/dist/lib/Components/IconButton/IconButton.d.ts +1 -4
- package/dist/lib/Components/IconButton/IconButton.d.ts.map +1 -1
- package/dist/lib/Components/IconButton/IconButton.js +5 -6
- package/dist/lib/Components/InteractiveIcon/InteractiveIcon.d.ts +3 -11
- package/dist/lib/Components/InteractiveIcon/InteractiveIcon.d.ts.map +1 -1
- package/dist/lib/Components/InteractiveIcon/InteractiveIcon.js +24 -22
- package/dist/lib/Components/InteractiveIcon/types.d.ts +14 -9
- package/dist/lib/Components/InteractiveIcon/types.d.ts.map +1 -1
- package/dist/lib/Components/Link/Link.d.ts +1 -4
- package/dist/lib/Components/Link/Link.d.ts.map +1 -1
- package/dist/lib/Components/Link/Link.js +13 -14
- package/dist/lib/Components/ListItem/ListItem.d.ts +7 -28
- package/dist/lib/Components/ListItem/ListItem.d.ts.map +1 -1
- package/dist/lib/Components/ListItem/ListItem.js +60 -63
- package/dist/lib/Components/MediaBanner/MediaBanner.d.ts +3 -12
- package/dist/lib/Components/MediaBanner/MediaBanner.d.ts.map +1 -1
- package/dist/lib/Components/MediaBanner/MediaBanner.js +39 -43
- package/dist/lib/Components/MediaCard/MediaCard.d.ts +2 -8
- package/dist/lib/Components/MediaCard/MediaCard.d.ts.map +1 -1
- package/dist/lib/Components/MediaCard/MediaCard.js +38 -40
- package/dist/lib/Components/MediaImage/MediaImage.d.ts +16 -0
- package/dist/lib/Components/MediaImage/MediaImage.d.ts.map +1 -0
- package/dist/lib/Components/MediaImage/MediaImage.js +74 -0
- package/dist/lib/Components/MediaImage/index.d.ts +3 -0
- package/dist/lib/Components/MediaImage/index.d.ts.map +1 -0
- package/dist/lib/Components/MediaImage/types.d.ts +38 -0
- package/dist/lib/Components/MediaImage/types.d.ts.map +1 -0
- package/dist/lib/Components/Menu/Menu.d.ts +11 -38
- package/dist/lib/Components/Menu/Menu.d.ts.map +1 -1
- package/dist/lib/Components/Menu/Menu.js +100 -116
- package/dist/lib/Components/NavBar/CoinCapsule.d.ts +1 -4
- package/dist/lib/Components/NavBar/CoinCapsule.d.ts.map +1 -1
- package/dist/lib/Components/NavBar/CoinCapsule.js +8 -9
- package/dist/lib/Components/NavBar/NavBar.d.ts +7 -22
- package/dist/lib/Components/NavBar/NavBar.d.ts.map +1 -1
- package/dist/lib/Components/NavBar/NavBar.js +25 -34
- package/dist/lib/Components/PageIndicator/PageIndicator.d.ts +1 -4
- package/dist/lib/Components/PageIndicator/PageIndicator.d.ts.map +1 -1
- package/dist/lib/Components/PageIndicator/PageIndicator.js +15 -16
- package/dist/lib/Components/Popover/Popover.d.ts +1 -4
- package/dist/lib/Components/Popover/Popover.d.ts.map +1 -1
- package/dist/lib/Components/Popover/Popover.js +5 -7
- package/dist/lib/Components/SearchInput/SearchInput.d.ts +1 -4
- package/dist/lib/Components/SearchInput/SearchInput.d.ts.map +1 -1
- package/dist/lib/Components/SearchInput/SearchInput.js +23 -20
- package/dist/lib/Components/SearchInput/types.d.ts +1 -1
- package/dist/lib/Components/SearchInput/types.d.ts.map +1 -1
- package/dist/lib/Components/SegmentedControl/SegmentedControl.d.ts +0 -6
- package/dist/lib/Components/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/dist/lib/Components/SegmentedControl/SegmentedControl.js +19 -21
- package/dist/lib/Components/Select/Select.d.ts +13 -28
- package/dist/lib/Components/Select/Select.d.ts.map +1 -1
- package/dist/lib/Components/Select/Select.js +339 -207
- package/dist/lib/Components/Select/SelectContext.d.ts +3 -1
- package/dist/lib/Components/Select/SelectContext.d.ts.map +1 -1
- package/dist/lib/Components/Select/index.d.ts +1 -1
- package/dist/lib/Components/Select/index.d.ts.map +1 -1
- package/dist/lib/Components/Select/types.d.ts +171 -140
- package/dist/lib/Components/Select/types.d.ts.map +1 -1
- package/dist/lib/Components/Select/useSelectItems/index.d.ts +2 -0
- package/dist/lib/Components/Select/useSelectItems/index.d.ts.map +1 -0
- package/dist/lib/Components/Select/useSelectItems/useSelectItems.d.ts +30 -0
- package/dist/lib/Components/Select/useSelectItems/useSelectItems.d.ts.map +1 -0
- package/dist/lib/Components/Select/useSelectItems/useSelectItems.js +42 -0
- package/dist/lib/Components/Select/utils/groupItems.d.ts +13 -0
- package/dist/lib/Components/Select/utils/groupItems.d.ts.map +1 -0
- package/dist/lib/Components/Select/utils/groupItems.js +16 -0
- package/dist/lib/Components/Select/utils/index.d.ts +2 -0
- package/dist/lib/Components/Select/utils/index.d.ts.map +1 -0
- package/dist/lib/Components/SideBar/SideBar.d.ts +5 -20
- package/dist/lib/Components/SideBar/SideBar.d.ts.map +1 -1
- package/dist/lib/Components/SideBar/SideBar.js +44 -53
- package/dist/lib/Components/Skeleton/Skeleton.d.ts +1 -4
- package/dist/lib/Components/Skeleton/Skeleton.d.ts.map +1 -1
- package/dist/lib/Components/Skeleton/Skeleton.js +15 -22
- package/dist/lib/Components/Spot/Spot.d.ts +1 -4
- package/dist/lib/Components/Spot/Spot.d.ts.map +1 -1
- package/dist/lib/Components/Spot/Spot.js +11 -12
- package/dist/lib/Components/Stepper/Stepper.d.ts +1 -4
- package/dist/lib/Components/Stepper/Stepper.d.ts.map +1 -1
- package/dist/lib/Components/Stepper/Stepper.js +10 -11
- package/dist/lib/Components/Subheader/Subheader.d.ts +1 -4
- package/dist/lib/Components/Subheader/Subheader.d.ts.map +1 -1
- package/dist/lib/Components/Subheader/Subheader.js +14 -15
- package/dist/lib/Components/Subheader/types.d.ts +1 -1
- package/dist/lib/Components/Subheader/types.d.ts.map +1 -1
- package/dist/lib/Components/Switch/Switch.d.ts +1 -4
- package/dist/lib/Components/Switch/Switch.d.ts.map +1 -1
- package/dist/lib/Components/Switch/Switch.js +2 -3
- package/dist/lib/Components/Table/Table.d.ts +16 -64
- package/dist/lib/Components/Table/Table.d.ts.map +1 -1
- package/dist/lib/Components/Table/Table.js +146 -176
- package/dist/lib/Components/Tag/Tag.d.ts +1 -4
- package/dist/lib/Components/Tag/Tag.d.ts.map +1 -1
- package/dist/lib/Components/Tag/Tag.js +10 -11
- package/dist/lib/Components/TextInput/TextInput.d.ts +1 -4
- package/dist/lib/Components/TextInput/TextInput.d.ts.map +1 -1
- package/dist/lib/Components/TextInput/TextInput.js +4 -5
- package/dist/lib/Components/Tile/Tile.d.ts +6 -24
- package/dist/lib/Components/Tile/Tile.d.ts.map +1 -1
- package/dist/lib/Components/Tile/Tile.js +58 -71
- package/dist/lib/Components/TileButton/TileButton.d.ts +1 -4
- package/dist/lib/Components/TileButton/TileButton.d.ts.map +1 -1
- package/dist/lib/Components/TileButton/TileButton.js +12 -13
- package/dist/lib/Components/TriggerButton/TriggerButton.d.ts +1 -4
- package/dist/lib/Components/TriggerButton/TriggerButton.d.ts.map +1 -1
- package/dist/lib/Components/TriggerButton/TriggerButton.js +11 -12
- package/dist/lib/Components/index.d.ts +1 -0
- package/dist/lib/Components/index.d.ts.map +1 -1
- package/dist/libs/utils-shared/dist/index.js +151 -124
- package/dist/node_modules/@base-ui/react/esm/combobox/chips/ComboboxChipsContext.js +10 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/collection/ComboboxCollection.js +17 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/collection/GroupCollectionContext.js +23 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/empty/ComboboxEmpty.js +26 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/group/ComboboxGroup.js +34 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/group/ComboboxGroupContext.js +14 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/group-label/ComboboxGroupLabel.js +27 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/input/ComboboxInput.js +221 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/item/ComboboxItem.js +113 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/item/ComboboxItemContext.js +14 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/item-indicator/ComboboxItemIndicator.js +52 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/list/ComboboxList.js +65 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/popup/ComboboxPopup.js +76 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/portal/ComboboxPortal.js +24 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/portal/ComboboxPortalContext.js +14 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/positioner/ComboboxPositioner.js +102 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/positioner/ComboboxPositionerContext.js +14 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/root/AriaCombobox.js +596 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/root/ComboboxRoot.js +23 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/root/ComboboxRootContext.js +41 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/root/utils/constants.js +8 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/root/utils/index.js +23 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/root/utils/useFilter.js +43 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/row/ComboboxRowContext.js +10 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/store.js +74 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/trigger/ComboboxTrigger.js +135 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/utils/ComboboxInternalDismissButton.js +32 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/utils/stateAttributesMapping.js +15 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/value/ComboboxValue.js +19 -0
- package/dist/node_modules/@base-ui/react/esm/composite/list/CompositeList.js +81 -0
- package/dist/node_modules/@base-ui/react/esm/composite/list/CompositeListContext.js +23 -0
- package/dist/node_modules/@base-ui/react/esm/composite/list/useCompositeListItem.js +55 -0
- package/dist/node_modules/@base-ui/react/esm/field/control/FieldControlDataAttributes.js +6 -0
- package/dist/node_modules/@base-ui/react/esm/field/root/FieldRootContext.js +53 -0
- package/dist/node_modules/@base-ui/react/esm/field/useField.js +51 -0
- package/dist/node_modules/@base-ui/react/esm/field/utils/constants.js +37 -0
- package/dist/node_modules/@base-ui/react/esm/field/utils/getCombinedFieldValidityData.js +12 -0
- package/dist/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useListNavigation.js +287 -0
- package/dist/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useTypeahead.js +71 -0
- package/dist/node_modules/@base-ui/react/esm/floating-ui-react/utils/composite.js +218 -4
- package/dist/node_modules/@base-ui/react/esm/floating-ui-react/utils/constants.js +7 -3
- package/dist/node_modules/@base-ui/react/esm/floating-ui-react/utils/element.js +3 -3
- package/dist/node_modules/@base-ui/react/esm/form/FormContext.js +23 -0
- package/dist/node_modules/@base-ui/react/esm/labelable-provider/LabelableContext.js +19 -0
- package/dist/node_modules/@base-ui/react/esm/labelable-provider/useLabelableId.js +44 -0
- package/dist/node_modules/@base-ui/react/esm/utils/constants.js +11 -8
- package/dist/node_modules/@base-ui/react/esm/utils/createBaseUIEventDetails.js +22 -13
- package/dist/node_modules/@base-ui/react/esm/utils/getPseudoElementBounds.js +18 -0
- package/dist/node_modules/@base-ui/react/esm/utils/itemEquality.js +20 -0
- package/dist/node_modules/@base-ui/react/esm/utils/reason-parts.js +13 -6
- package/dist/node_modules/@base-ui/react/esm/utils/resolveAriaLabelledBy.js +6 -0
- package/dist/node_modules/@base-ui/react/esm/utils/resolveValueLabel.js +73 -0
- package/dist/node_modules/@base-ui/react/esm/utils/serializeValue.js +14 -0
- package/dist/node_modules/@base-ui/utils/esm/detectBrowser.js +8 -7
- package/dist/node_modules/@base-ui/utils/esm/empty.js +3 -2
- package/dist/node_modules/@base-ui/utils/esm/useControlled.js +31 -0
- package/dist/node_modules/@base-ui/utils/esm/visuallyHidden.js +5 -1
- package/dist/package.json +1 -2
- package/package.json +1 -2
|
@@ -1,150 +1,148 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useDisabledContext as
|
|
3
|
-
const [b,
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useDisabledContext as l, DisabledProvider as m, cn as a, createSafeContext as u } from "../../../libs/utils-shared/dist/index.js";
|
|
3
|
+
const [b, d] = u("ListItemTrailing", {
|
|
4
4
|
isInTrailing: !1
|
|
5
|
-
}),
|
|
6
|
-
const { children: s, className: i, disabled:
|
|
5
|
+
}), I = ({ ref: e, ...t }) => {
|
|
6
|
+
const { children: s, className: i, disabled: n, ...o } = t, c = l({
|
|
7
7
|
consumerName: "ListItem",
|
|
8
|
-
mergeWith: { disabled:
|
|
8
|
+
mergeWith: { disabled: n }
|
|
9
9
|
});
|
|
10
|
-
return /* @__PURE__ */
|
|
10
|
+
return /* @__PURE__ */ r(m, { value: { disabled: c }, children: /* @__PURE__ */ r(
|
|
11
11
|
"button",
|
|
12
12
|
{
|
|
13
13
|
ref: e,
|
|
14
14
|
type: "button",
|
|
15
|
-
disabled:
|
|
16
|
-
className:
|
|
15
|
+
disabled: c,
|
|
16
|
+
className: a(
|
|
17
17
|
"flex h-64 w-full cursor-pointer items-center gap-16 rounded-md bg-base-transparent px-8 py-12 text-base transition-colors",
|
|
18
18
|
"hover:bg-base-transparent-hover focus-visible:outline-2 focus-visible:outline-focus active:bg-base-transparent-pressed",
|
|
19
19
|
"disabled:cursor-default disabled:bg-base-transparent disabled:text-disabled",
|
|
20
20
|
i
|
|
21
21
|
),
|
|
22
|
-
...
|
|
22
|
+
...o,
|
|
23
23
|
children: s
|
|
24
24
|
}
|
|
25
25
|
) });
|
|
26
|
-
}
|
|
27
|
-
x.displayName = "ListItem";
|
|
28
|
-
const p = ({
|
|
26
|
+
}, p = ({
|
|
29
27
|
ref: e,
|
|
30
28
|
children: t,
|
|
31
29
|
className: s,
|
|
32
30
|
...i
|
|
33
|
-
}) => /* @__PURE__ */
|
|
31
|
+
}) => /* @__PURE__ */ r(
|
|
34
32
|
"div",
|
|
35
33
|
{
|
|
36
34
|
ref: e,
|
|
37
|
-
className:
|
|
35
|
+
className: a("flex min-w-0 flex-1 items-center gap-12", s),
|
|
38
36
|
...i,
|
|
39
37
|
children: t
|
|
40
38
|
}
|
|
41
|
-
)
|
|
42
|
-
p.displayName = "ListItemLeading";
|
|
43
|
-
const I = ({
|
|
39
|
+
), g = ({
|
|
44
40
|
ref: e,
|
|
45
41
|
children: t,
|
|
46
42
|
className: s,
|
|
47
43
|
...i
|
|
48
|
-
}) => /* @__PURE__ */
|
|
44
|
+
}) => /* @__PURE__ */ r(
|
|
49
45
|
"div",
|
|
50
46
|
{
|
|
51
47
|
ref: e,
|
|
52
|
-
className:
|
|
48
|
+
className: a("flex min-w-0 flex-1 flex-col gap-4", s),
|
|
53
49
|
...i,
|
|
54
50
|
children: t
|
|
55
51
|
}
|
|
56
|
-
)
|
|
57
|
-
I.displayName = "ListItemContent";
|
|
58
|
-
const f = ({
|
|
52
|
+
), L = ({
|
|
59
53
|
ref: e,
|
|
60
54
|
children: t,
|
|
61
55
|
className: s,
|
|
62
56
|
...i
|
|
63
|
-
}) =>
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
57
|
+
}) => {
|
|
58
|
+
const { isInTrailing: n } = d({
|
|
59
|
+
consumerName: "ListItemContentRow",
|
|
60
|
+
contextRequired: !1
|
|
61
|
+
});
|
|
62
|
+
return /* @__PURE__ */ r(
|
|
63
|
+
"div",
|
|
64
|
+
{
|
|
65
|
+
ref: e,
|
|
66
|
+
className: a(
|
|
67
|
+
"flex min-w-0 items-center gap-8",
|
|
68
|
+
n && "justify-end",
|
|
69
|
+
s
|
|
70
|
+
),
|
|
71
|
+
...i,
|
|
72
|
+
children: t
|
|
73
|
+
}
|
|
74
|
+
);
|
|
75
|
+
}, v = ({
|
|
74
76
|
ref: e,
|
|
75
77
|
children: t,
|
|
76
78
|
className: s,
|
|
77
79
|
...i
|
|
78
80
|
}) => {
|
|
79
|
-
const
|
|
81
|
+
const n = l({
|
|
80
82
|
consumerName: "ListItemTitle",
|
|
81
83
|
contextRequired: !0
|
|
82
|
-
}), { isInTrailing:
|
|
84
|
+
}), { isInTrailing: o } = d({
|
|
83
85
|
consumerName: "ListItemTitle",
|
|
84
86
|
contextRequired: !1
|
|
85
87
|
});
|
|
86
|
-
return /* @__PURE__ */
|
|
88
|
+
return /* @__PURE__ */ r(
|
|
87
89
|
"div",
|
|
88
90
|
{
|
|
89
91
|
ref: e,
|
|
90
|
-
className:
|
|
92
|
+
className: a(
|
|
91
93
|
"min-w-0 flex-1 truncate body-2-semi-bold",
|
|
92
|
-
|
|
93
|
-
|
|
94
|
+
o ? "justify-end text-end" : "justify-start text-start",
|
|
95
|
+
n && "text-disabled",
|
|
94
96
|
s
|
|
95
97
|
),
|
|
96
98
|
...i,
|
|
97
99
|
children: t
|
|
98
100
|
}
|
|
99
101
|
);
|
|
100
|
-
}
|
|
101
|
-
L.displayName = "ListItemTitle";
|
|
102
|
-
const g = ({
|
|
102
|
+
}, N = ({
|
|
103
103
|
ref: e,
|
|
104
104
|
children: t,
|
|
105
105
|
className: s,
|
|
106
106
|
...i
|
|
107
107
|
}) => {
|
|
108
|
-
const
|
|
108
|
+
const n = l({
|
|
109
109
|
consumerName: "ListItemDescription",
|
|
110
110
|
contextRequired: !0
|
|
111
|
-
}), { isInTrailing:
|
|
111
|
+
}), { isInTrailing: o } = d({
|
|
112
112
|
consumerName: "ListItemDescription",
|
|
113
113
|
contextRequired: !1
|
|
114
114
|
});
|
|
115
|
-
return /* @__PURE__ */
|
|
115
|
+
return /* @__PURE__ */ r(
|
|
116
116
|
"div",
|
|
117
117
|
{
|
|
118
118
|
ref: e,
|
|
119
|
-
className:
|
|
119
|
+
className: a(
|
|
120
120
|
"min-w-0 flex-1 items-center truncate body-3 text-muted",
|
|
121
|
-
|
|
122
|
-
|
|
121
|
+
o ? "justify-end text-end" : "justify-start text-start",
|
|
122
|
+
n && "text-disabled",
|
|
123
123
|
s
|
|
124
124
|
),
|
|
125
125
|
...i,
|
|
126
126
|
children: t
|
|
127
127
|
}
|
|
128
128
|
);
|
|
129
|
-
}
|
|
130
|
-
g.displayName = "ListItemDescription";
|
|
131
|
-
const N = ({
|
|
129
|
+
}, T = ({
|
|
132
130
|
ref: e,
|
|
133
131
|
children: t,
|
|
134
132
|
className: s,
|
|
135
133
|
...i
|
|
136
134
|
}) => {
|
|
137
|
-
const
|
|
135
|
+
const n = l({
|
|
138
136
|
consumerName: "ListItemTrailing",
|
|
139
137
|
contextRequired: !0
|
|
140
138
|
});
|
|
141
|
-
return /* @__PURE__ */
|
|
139
|
+
return /* @__PURE__ */ r(b, { value: { isInTrailing: !0 }, children: /* @__PURE__ */ r(
|
|
142
140
|
"div",
|
|
143
141
|
{
|
|
144
142
|
ref: e,
|
|
145
|
-
className:
|
|
143
|
+
className: a(
|
|
146
144
|
"flex shrink-0 items-center",
|
|
147
|
-
|
|
145
|
+
n && "text-disabled",
|
|
148
146
|
s
|
|
149
147
|
),
|
|
150
148
|
...i,
|
|
@@ -152,13 +150,12 @@ const N = ({
|
|
|
152
150
|
}
|
|
153
151
|
) });
|
|
154
152
|
};
|
|
155
|
-
N.displayName = "ListItemTrailing";
|
|
156
153
|
export {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
154
|
+
I as ListItem,
|
|
155
|
+
g as ListItemContent,
|
|
156
|
+
L as ListItemContentRow,
|
|
157
|
+
N as ListItemDescription,
|
|
161
158
|
p as ListItemLeading,
|
|
162
|
-
|
|
163
|
-
|
|
159
|
+
v as ListItemTitle,
|
|
160
|
+
T as ListItemTrailing
|
|
164
161
|
};
|
|
@@ -4,22 +4,13 @@ import { MediaBannerDescriptionProps, MediaBannerProps, MediaBannerTitleProps }
|
|
|
4
4
|
*
|
|
5
5
|
* @see {@link https://ldls.vercel.app/?path=/docs/communication-mediabanner--docs Storybook}
|
|
6
6
|
*/
|
|
7
|
-
export declare const MediaBanner: {
|
|
8
|
-
({ ref, imageUrl, onClose, closeAriaLabel, children, className, ...props }: MediaBannerProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
displayName: string;
|
|
10
|
-
};
|
|
7
|
+
export declare const MediaBanner: ({ ref, imageUrl, onClose, closeAriaLabel, children, className, ...props }: MediaBannerProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
8
|
/**
|
|
12
9
|
* The title of the MediaBanner. Clamps at 1 line.
|
|
13
10
|
*/
|
|
14
|
-
export declare const MediaBannerTitle: {
|
|
15
|
-
({ ref, children, className, ...props }: MediaBannerTitleProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
-
displayName: string;
|
|
17
|
-
};
|
|
11
|
+
export declare const MediaBannerTitle: ({ ref, children, className, ...props }: MediaBannerTitleProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
12
|
/**
|
|
19
13
|
* The description of the MediaBanner. Clamps at 2 lines.
|
|
20
14
|
*/
|
|
21
|
-
export declare const MediaBannerDescription: {
|
|
22
|
-
({ ref, children, className, ...props }: MediaBannerDescriptionProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
-
displayName: string;
|
|
24
|
-
};
|
|
15
|
+
export declare const MediaBannerDescription: ({ ref, children, className, ...props }: MediaBannerDescriptionProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
16
|
//# sourceMappingURL=MediaBanner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MediaBanner.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/MediaBanner/MediaBanner.tsx"],"names":[],"mappings":"AAKA,OAAO,EACL,2BAA2B,EAC3B,gBAAgB,EAChB,qBAAqB,EACtB,MAAM,SAAS,CAAC;AAEjB;;;;GAIG;AACH,eAAO,MAAM,WAAW
|
|
1
|
+
{"version":3,"file":"MediaBanner.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/MediaBanner/MediaBanner.tsx"],"names":[],"mappings":"AAKA,OAAO,EACL,2BAA2B,EAC3B,gBAAgB,EAChB,qBAAqB,EACtB,MAAM,SAAS,CAAC;AAEjB;;;;GAIG;AACH,eAAO,MAAM,WAAW,GAAI,2EAQzB,gBAAgB,4CAmDlB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAAI,wCAK9B,qBAAqB,4CAUvB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sBAAsB,GAAI,wCAKpC,2BAA2B,4CAU7B,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { jsxs as n, jsx as
|
|
1
|
+
import { jsxs as n, jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { cn as s } from "../../../libs/utils-shared/dist/index.js";
|
|
3
3
|
import { useState as u, useEffect as v } from "react";
|
|
4
4
|
import { useCommonTranslation as x } from "../../../i18n/useCommonTranslation.js";
|
|
5
|
-
import { Close as
|
|
6
|
-
import { InteractiveIcon as
|
|
7
|
-
const
|
|
8
|
-
ref:
|
|
9
|
-
imageUrl:
|
|
10
|
-
onClose:
|
|
5
|
+
import { Close as h } from "../../Symbols/Icons/Close.js";
|
|
6
|
+
import { InteractiveIcon as N } from "../InteractiveIcon/InteractiveIcon.js";
|
|
7
|
+
const j = ({
|
|
8
|
+
ref: r,
|
|
9
|
+
imageUrl: e,
|
|
10
|
+
onClose: o,
|
|
11
11
|
closeAriaLabel: t,
|
|
12
12
|
children: l,
|
|
13
13
|
className: c,
|
|
@@ -16,83 +16,79 @@ const y = ({
|
|
|
16
16
|
const { t: d } = x(), [p, i] = u(!1);
|
|
17
17
|
v(() => {
|
|
18
18
|
i(!1);
|
|
19
|
-
}, [
|
|
20
|
-
const f =
|
|
19
|
+
}, [e]);
|
|
20
|
+
const f = e && !p;
|
|
21
21
|
return /* @__PURE__ */ n(
|
|
22
22
|
"div",
|
|
23
23
|
{
|
|
24
|
-
ref:
|
|
24
|
+
ref: r,
|
|
25
25
|
className: s(
|
|
26
26
|
"relative flex h-72 flex-row overflow-hidden rounded-md bg-surface",
|
|
27
27
|
c
|
|
28
28
|
),
|
|
29
29
|
...m,
|
|
30
30
|
children: [
|
|
31
|
-
/* @__PURE__ */
|
|
31
|
+
/* @__PURE__ */ a("div", { className: "flex flex-1 items-center px-12 py-2", children: /* @__PURE__ */ a("div", { className: "flex flex-col gap-4 py-12", children: l }) }),
|
|
32
32
|
/* @__PURE__ */ n("div", { className: "relative w-128", children: [
|
|
33
|
-
f && /* @__PURE__ */
|
|
33
|
+
f && /* @__PURE__ */ a(
|
|
34
34
|
"img",
|
|
35
35
|
{
|
|
36
|
-
src:
|
|
36
|
+
src: e,
|
|
37
37
|
alt: "",
|
|
38
38
|
"aria-hidden": !0,
|
|
39
39
|
className: "absolute inset-0 size-full object-cover",
|
|
40
40
|
onError: () => i(!0)
|
|
41
41
|
}
|
|
42
42
|
),
|
|
43
|
-
/* @__PURE__ */
|
|
43
|
+
/* @__PURE__ */ a("div", { className: "absolute inset-0 bg-linear-[45deg] from-black/0 from-67% to-black/80" })
|
|
44
44
|
] }),
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
o && /* @__PURE__ */ a(
|
|
46
|
+
N,
|
|
47
47
|
{
|
|
48
48
|
type: "button",
|
|
49
49
|
iconType: "stroked",
|
|
50
50
|
appearance: "white",
|
|
51
|
+
icon: h,
|
|
52
|
+
size: 16,
|
|
51
53
|
className: "absolute top-8 right-8",
|
|
52
54
|
onClick: (b) => {
|
|
53
|
-
b.stopPropagation(),
|
|
55
|
+
b.stopPropagation(), o();
|
|
54
56
|
},
|
|
55
|
-
"aria-label": t || d("components.banner.closeAriaLabel")
|
|
56
|
-
children: /* @__PURE__ */ e(N, { size: 16 })
|
|
57
|
+
"aria-label": t || d("components.banner.closeAriaLabel")
|
|
57
58
|
}
|
|
58
59
|
)
|
|
59
60
|
]
|
|
60
61
|
}
|
|
61
62
|
);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
children: a,
|
|
67
|
-
className: r,
|
|
63
|
+
}, B = ({
|
|
64
|
+
ref: r,
|
|
65
|
+
children: e,
|
|
66
|
+
className: o,
|
|
68
67
|
...t
|
|
69
|
-
}) => /* @__PURE__ */
|
|
68
|
+
}) => /* @__PURE__ */ a(
|
|
70
69
|
"div",
|
|
71
70
|
{
|
|
72
|
-
ref:
|
|
73
|
-
className: s("line-clamp-1 body-2-semi-bold text-base",
|
|
71
|
+
ref: r,
|
|
72
|
+
className: s("line-clamp-1 body-2-semi-bold text-base", o),
|
|
74
73
|
...t,
|
|
75
|
-
children:
|
|
74
|
+
children: e
|
|
76
75
|
}
|
|
77
|
-
)
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
children: a,
|
|
82
|
-
className: r,
|
|
76
|
+
), L = ({
|
|
77
|
+
ref: r,
|
|
78
|
+
children: e,
|
|
79
|
+
className: o,
|
|
83
80
|
...t
|
|
84
|
-
}) => /* @__PURE__ */
|
|
81
|
+
}) => /* @__PURE__ */ a(
|
|
85
82
|
"div",
|
|
86
83
|
{
|
|
87
|
-
ref:
|
|
88
|
-
className: s("line-clamp-2 body-3 text-muted",
|
|
84
|
+
ref: r,
|
|
85
|
+
className: s("line-clamp-2 body-3 text-muted", o),
|
|
89
86
|
...t,
|
|
90
|
-
children:
|
|
87
|
+
children: e
|
|
91
88
|
}
|
|
92
89
|
);
|
|
93
|
-
B.displayName = "MediaBannerDescription";
|
|
94
90
|
export {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
91
|
+
j as MediaBanner,
|
|
92
|
+
L as MediaBannerDescription,
|
|
93
|
+
B as MediaBannerTitle
|
|
98
94
|
};
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { MediaCardProps, MediaCardTitleProps } from './types';
|
|
2
|
-
export declare const MediaCardTitle: {
|
|
3
|
-
({ ref, className, children, ...props }: MediaCardTitleProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
displayName: string;
|
|
5
|
-
};
|
|
2
|
+
export declare const MediaCardTitle: ({ ref, className, children, ...props }: MediaCardTitleProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
3
|
/**
|
|
7
4
|
* A media card component for displaying a full-bleed background image with
|
|
8
5
|
* composable content and a close button, using gradient overlays to ensure
|
|
@@ -26,8 +23,5 @@ export declare const MediaCardTitle: {
|
|
|
26
23
|
* <MediaCardTitle>Card text</MediaCardTitle>
|
|
27
24
|
* </MediaCard>
|
|
28
25
|
*/
|
|
29
|
-
export declare const MediaCard: {
|
|
30
|
-
({ ref, imageUrl, children, onClick, onClose, closeAriaLabel, className, ...props }: MediaCardProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
-
displayName: string;
|
|
32
|
-
};
|
|
26
|
+
export declare const MediaCard: ({ ref, imageUrl, children, onClick, onClose, closeAriaLabel, className, ...props }: MediaCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
33
27
|
//# sourceMappingURL=MediaCard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MediaCard.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/MediaCard/MediaCard.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AA+C9D,eAAO,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"MediaCard.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/MediaCard/MediaCard.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AA+C9D,eAAO,MAAM,cAAc,GAAI,wCAK5B,mBAAmB,4CAUrB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,SAAS,GAAI,oFASvB,cAAc,4CAwDhB,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { cn as
|
|
3
|
-
import { cva as
|
|
1
|
+
import { jsxs as d, jsx as e, Fragment as h } from "react/jsx-runtime";
|
|
2
|
+
import { cn as m, getButtonA11yProps as y } from "../../../libs/utils-shared/dist/index.js";
|
|
3
|
+
import { cva as o } from "class-variance-authority";
|
|
4
4
|
import { useState as x, useEffect as N } from "react";
|
|
5
5
|
import { Close as w } from "../../Symbols/Icons/Close.js";
|
|
6
6
|
import { useCommonTranslation as z } from "../../../i18n/useCommonTranslation.js";
|
|
7
|
-
import { InteractiveIcon as
|
|
8
|
-
const
|
|
9
|
-
root:
|
|
7
|
+
import { InteractiveIcon as j } from "../InteractiveIcon/InteractiveIcon.js";
|
|
8
|
+
const r = {
|
|
9
|
+
root: o(
|
|
10
10
|
[
|
|
11
11
|
"group relative overflow-hidden rounded-md",
|
|
12
12
|
"flex h-[164px] w-full flex-col items-start justify-end p-12",
|
|
@@ -23,16 +23,16 @@ const o = {
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
),
|
|
26
|
-
image:
|
|
27
|
-
overlay:
|
|
26
|
+
image: o(["absolute inset-0", "size-full object-cover"]),
|
|
27
|
+
overlay: o([
|
|
28
28
|
"absolute inset-0 size-full",
|
|
29
29
|
"transition-colors",
|
|
30
30
|
"group-hover:bg-muted-transparent-hover",
|
|
31
31
|
"group-[:active:not(:has(button:active))]:bg-muted-transparent-pressed"
|
|
32
32
|
]),
|
|
33
|
-
content:
|
|
34
|
-
title:
|
|
35
|
-
},
|
|
33
|
+
content: o("isolate flex flex-col items-start gap-8"),
|
|
34
|
+
title: o("line-clamp-3 heading-3-semi-bold text-white")
|
|
35
|
+
}, C = () => /* @__PURE__ */ d(h, { children: [
|
|
36
36
|
/* @__PURE__ */ e(
|
|
37
37
|
"div",
|
|
38
38
|
{
|
|
@@ -47,65 +47,65 @@ const o = {
|
|
|
47
47
|
className: "pointer-events-none absolute inset-y-0 right-0 size-full bg-linear-[45deg] from-gradient-overlay-0 from-70% to-gradient-overlay-80"
|
|
48
48
|
}
|
|
49
49
|
)
|
|
50
|
-
] }),
|
|
50
|
+
] }), k = ({
|
|
51
51
|
ref: i,
|
|
52
52
|
className: t,
|
|
53
53
|
children: s,
|
|
54
|
-
...
|
|
54
|
+
...a
|
|
55
55
|
}) => /* @__PURE__ */ e(
|
|
56
56
|
"div",
|
|
57
57
|
{
|
|
58
58
|
ref: i,
|
|
59
|
-
className:
|
|
60
|
-
...
|
|
59
|
+
className: m(r.title(), t),
|
|
60
|
+
...a,
|
|
61
61
|
children: s
|
|
62
62
|
}
|
|
63
|
-
)
|
|
64
|
-
E.displayName = "MediaCardTitle";
|
|
65
|
-
const I = ({
|
|
63
|
+
), B = ({
|
|
66
64
|
ref: i,
|
|
67
65
|
imageUrl: t,
|
|
68
66
|
children: s,
|
|
69
|
-
onClick:
|
|
67
|
+
onClick: a,
|
|
70
68
|
onClose: l,
|
|
71
69
|
closeAriaLabel: u,
|
|
72
|
-
className:
|
|
73
|
-
...
|
|
70
|
+
className: f,
|
|
71
|
+
...p
|
|
74
72
|
}) => {
|
|
75
|
-
const { t: v } = z(), [g,
|
|
73
|
+
const { t: v } = z(), [g, c] = x(!1), b = t && !g;
|
|
76
74
|
return N(() => {
|
|
77
|
-
|
|
78
|
-
}, [t]), /* @__PURE__ */
|
|
75
|
+
c(!1);
|
|
76
|
+
}, [t]), /* @__PURE__ */ d(
|
|
79
77
|
"div",
|
|
80
78
|
{
|
|
81
|
-
...y({ onClick:
|
|
82
|
-
className:
|
|
83
|
-
|
|
84
|
-
|
|
79
|
+
...y({ onClick: a }),
|
|
80
|
+
className: m(
|
|
81
|
+
r.root({ interactive: !!a }),
|
|
82
|
+
f
|
|
85
83
|
),
|
|
86
84
|
ref: i,
|
|
87
|
-
...
|
|
85
|
+
...p,
|
|
88
86
|
children: [
|
|
89
87
|
b && /* @__PURE__ */ e(
|
|
90
88
|
"img",
|
|
91
89
|
{
|
|
92
90
|
src: t,
|
|
93
91
|
alt: "",
|
|
94
|
-
className:
|
|
92
|
+
className: r.image(),
|
|
95
93
|
"aria-hidden": "true",
|
|
96
94
|
loading: "lazy",
|
|
97
|
-
onError: () =>
|
|
95
|
+
onError: () => c(!0)
|
|
98
96
|
}
|
|
99
97
|
),
|
|
100
|
-
/* @__PURE__ */ e(
|
|
101
|
-
/* @__PURE__ */ e("div", { "aria-hidden": "true", className:
|
|
102
|
-
/* @__PURE__ */ e("div", { className:
|
|
98
|
+
/* @__PURE__ */ e(C, {}),
|
|
99
|
+
/* @__PURE__ */ e("div", { "aria-hidden": "true", className: r.overlay() }),
|
|
100
|
+
/* @__PURE__ */ e("div", { className: r.content(), children: s }),
|
|
103
101
|
l && /* @__PURE__ */ e(
|
|
104
|
-
|
|
102
|
+
j,
|
|
105
103
|
{
|
|
106
104
|
type: "button",
|
|
107
105
|
iconType: "stroked",
|
|
108
106
|
appearance: "white",
|
|
107
|
+
icon: w,
|
|
108
|
+
size: 20,
|
|
109
109
|
"aria-label": u || v("common.closeAriaLabel"),
|
|
110
110
|
className: "absolute top-12 right-12 z-10",
|
|
111
111
|
onClick: (n) => {
|
|
@@ -113,16 +113,14 @@ const I = ({
|
|
|
113
113
|
},
|
|
114
114
|
onKeyDown: (n) => {
|
|
115
115
|
n.stopPropagation();
|
|
116
|
-
}
|
|
117
|
-
children: /* @__PURE__ */ e(w, { size: 20 })
|
|
116
|
+
}
|
|
118
117
|
}
|
|
119
118
|
)
|
|
120
119
|
]
|
|
121
120
|
}
|
|
122
121
|
);
|
|
123
122
|
};
|
|
124
|
-
I.displayName = "MediaCard";
|
|
125
123
|
export {
|
|
126
|
-
|
|
127
|
-
|
|
124
|
+
B as MediaCard,
|
|
125
|
+
k as MediaCardTitle
|
|
128
126
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { MediaImageProps, MediaImageSize } from './types';
|
|
2
|
+
export declare const mediaImageDotSizeMap: Record<MediaImageSize, number>;
|
|
3
|
+
/**
|
|
4
|
+
* A generic media image component that displays an image with optional shape variants.
|
|
5
|
+
* Supports square and circular appearances with consistent sizing.
|
|
6
|
+
*
|
|
7
|
+
* When the image fails to load or no src is provided, displays a background placeholder
|
|
8
|
+
* or an optional text fallback.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* import { MediaImage } from '@ledgerhq/lumen-ui-react';
|
|
12
|
+
*
|
|
13
|
+
* <MediaImage src="https://example.com/icon.png" alt="Bitcoin" size={32} />
|
|
14
|
+
*/
|
|
15
|
+
export declare const MediaImage: ({ ref, className, src, alt, size, shape, imgLoading, ...props }: MediaImageProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
//# sourceMappingURL=MediaImage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MediaImage.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/MediaImage/MediaImage.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AA0B1D,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,cAAc,EAAE,MAAM,CAStD,CAAC;AAEX;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,UAAU,GAAI,iEASxB,eAAe,4CA8BjB,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { cn as c } from "../../../libs/utils-shared/dist/index.js";
|
|
3
|
+
import { cva as f } from "class-variance-authority";
|
|
4
|
+
import { useState as z, useEffect as g } from "react";
|
|
5
|
+
const p = {
|
|
6
|
+
root: f(
|
|
7
|
+
"relative inline-flex shrink-0 items-center justify-center overflow-hidden bg-muted-transparent",
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
size: {
|
|
11
|
+
12: "size-12 rounded-xs",
|
|
12
|
+
16: "size-16 rounded-xs",
|
|
13
|
+
20: "size-20 rounded-xs",
|
|
14
|
+
24: "size-24 rounded-sm",
|
|
15
|
+
32: "size-32 rounded-sm",
|
|
16
|
+
40: "size-40 rounded-md",
|
|
17
|
+
48: "size-48 rounded-md",
|
|
18
|
+
56: "size-56 rounded-lg"
|
|
19
|
+
},
|
|
20
|
+
shape: {
|
|
21
|
+
square: "",
|
|
22
|
+
circle: "rounded-full"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
)
|
|
27
|
+
}, j = {
|
|
28
|
+
12: 8,
|
|
29
|
+
16: 8,
|
|
30
|
+
20: 8,
|
|
31
|
+
24: 10,
|
|
32
|
+
32: 12,
|
|
33
|
+
40: 16,
|
|
34
|
+
48: 20,
|
|
35
|
+
56: 24
|
|
36
|
+
}, E = ({
|
|
37
|
+
ref: a,
|
|
38
|
+
className: o,
|
|
39
|
+
src: e,
|
|
40
|
+
alt: i,
|
|
41
|
+
size: t = 48,
|
|
42
|
+
shape: d = "square",
|
|
43
|
+
imgLoading: n = "eager",
|
|
44
|
+
...l
|
|
45
|
+
}) => {
|
|
46
|
+
const [m, s] = z(!1), u = !e || m;
|
|
47
|
+
return g(() => {
|
|
48
|
+
s(!1);
|
|
49
|
+
}, [e]), /* @__PURE__ */ r(
|
|
50
|
+
"div",
|
|
51
|
+
{
|
|
52
|
+
ref: a,
|
|
53
|
+
className: c(p.root({ size: t, shape: d }), o),
|
|
54
|
+
role: "img",
|
|
55
|
+
"aria-label": i,
|
|
56
|
+
...l,
|
|
57
|
+
children: u ? /* @__PURE__ */ r("span", { className: "text-muted select-none", "aria-hidden": "true" }) : /* @__PURE__ */ r(
|
|
58
|
+
"img",
|
|
59
|
+
{
|
|
60
|
+
src: e,
|
|
61
|
+
alt: "",
|
|
62
|
+
loading: n,
|
|
63
|
+
onError: () => s(!0),
|
|
64
|
+
className: "size-full object-cover",
|
|
65
|
+
"aria-hidden": "true"
|
|
66
|
+
}
|
|
67
|
+
)
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
};
|
|
71
|
+
export {
|
|
72
|
+
E as MediaImage,
|
|
73
|
+
j as mediaImageDotSizeMap
|
|
74
|
+
};
|