@ledgerhq/lumen-ui-react 0.1.15 → 0.1.17
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 +2 -2
- package/dist/i18n/i18n.d.ts.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +146 -142
- package/dist/lib/Components/AmountInput/AmountInput.d.ts.map +1 -1
- package/dist/lib/Components/Avatar/Avatar.js +24 -24
- package/dist/lib/Components/BaseInput/BaseInput.d.ts.map +1 -1
- package/dist/lib/Components/BaseInput/BaseInput.js +78 -85
- package/dist/lib/Components/CardButton/CardButton.js +10 -10
- package/dist/lib/Components/Dialog/Dialog.js +39 -39
- package/dist/lib/Components/Dialog/types.d.ts +3 -3
- package/dist/lib/Components/Icon/Icon.js +5 -5
- package/dist/lib/Components/Icon/createIcon.d.ts.map +1 -1
- package/dist/lib/Components/Link/Link.d.ts.map +1 -1
- package/dist/lib/Components/Link/Link.js +25 -32
- package/dist/lib/Components/ListItem/ListItem.d.ts +17 -28
- package/dist/lib/Components/ListItem/ListItem.d.ts.map +1 -1
- package/dist/lib/Components/ListItem/ListItem.js +81 -93
- package/dist/lib/Components/ListItem/types.d.ts +13 -32
- package/dist/lib/Components/ListItem/types.d.ts.map +1 -1
- package/dist/lib/Components/MediaImage/MediaImage.d.ts +19 -0
- package/dist/lib/Components/MediaImage/MediaImage.d.ts.map +1 -0
- package/dist/lib/Components/MediaImage/MediaImage.js +75 -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 +4 -4
- package/dist/lib/Components/Menu/Menu.d.ts.map +1 -1
- package/dist/lib/Components/NavBar/NavBar.d.ts +0 -1
- package/dist/lib/Components/NavBar/NavBar.d.ts.map +1 -1
- package/dist/lib/Components/Popover/Popover.js +7 -7
- package/dist/lib/Components/Popover/types.d.ts +3 -3
- package/dist/lib/Components/SearchInput/SearchInput.d.ts +1 -1
- package/dist/lib/Components/SearchInput/SearchInput.d.ts.map +1 -1
- package/dist/lib/Components/SearchInput/SearchInput.js +24 -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 +1 -1
- package/dist/lib/Components/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/dist/lib/Components/SegmentedControl/SegmentedControl.js +97 -81
- package/dist/lib/Components/SegmentedControl/SegmentedControlContext.d.ts +1 -0
- package/dist/lib/Components/SegmentedControl/SegmentedControlContext.d.ts.map +1 -1
- package/dist/lib/Components/SegmentedControl/types.d.ts +7 -0
- package/dist/lib/Components/SegmentedControl/types.d.ts.map +1 -1
- package/dist/lib/Components/SegmentedControl/usePillElementLayoutEffect.d.ts +5 -6
- package/dist/lib/Components/SegmentedControl/usePillElementLayoutEffect.d.ts.map +1 -1
- package/dist/lib/Components/SegmentedControl/usePillElementLayoutEffect.js +30 -25
- package/dist/lib/Components/Select/Select.d.ts +27 -12
- package/dist/lib/Components/Select/Select.d.ts.map +1 -1
- package/dist/lib/Components/Select/Select.js +356 -202
- 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 +1 -1
- package/dist/lib/Components/SideBar/SideBar.d.ts.map +1 -1
- package/dist/lib/Components/SideBar/SideBar.js +93 -89
- package/dist/lib/Components/SideBar/types.d.ts +7 -1
- package/dist/lib/Components/SideBar/types.d.ts.map +1 -1
- package/dist/lib/Components/Stepper/Stepper.d.ts +5 -6
- package/dist/lib/Components/Stepper/Stepper.d.ts.map +1 -1
- package/dist/lib/Components/Stepper/Stepper.js +100 -102
- package/dist/lib/Components/Stepper/types.d.ts +2 -2
- package/dist/lib/Components/Stepper/types.d.ts.map +1 -1
- package/dist/lib/Components/Tag/Tag.d.ts.map +1 -1
- package/dist/lib/Components/Tag/Tag.js +1 -1
- package/dist/lib/Components/Tooltip/Tooltip.d.ts +2 -2
- package/dist/lib/Components/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/lib/Components/TriggerButton/TriggerButton.js +8 -8
- 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/node_modules/i18next/dist/esm/i18next.js +45 -47
- package/dist/package.json +1 -2
- package/dist/utils/icon-template.d.ts.map +1 -1
- package/package.json +1 -2
- package/dist/lib/Patterns/index.d.ts +0 -3
- package/dist/lib/Patterns/index.d.ts.map +0 -1
|
@@ -1,150 +1,143 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useDisabledContext as
|
|
3
|
-
import
|
|
4
|
-
import { useCommonTranslation as
|
|
5
|
-
import { InteractiveIcon as
|
|
6
|
-
import { DeleteCircleFill as
|
|
7
|
-
const
|
|
1
|
+
import { jsxs as u, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { useDisabledContext as O, useMergedRef as $, cn as n } from "../../../libs/utils-shared/dist/index.js";
|
|
3
|
+
import { useRef as q, useId as H, useState as P, useCallback as U } from "react";
|
|
4
|
+
import { useCommonTranslation as W } from "../../../i18n/useCommonTranslation.js";
|
|
5
|
+
import { InteractiveIcon as G } from "../InteractiveIcon/InteractiveIcon.js";
|
|
6
|
+
import { DeleteCircleFill as w } from "../../Symbols/Icons/DeleteCircleFill.js";
|
|
7
|
+
const J = n(
|
|
8
8
|
"group relative flex h-48 w-full cursor-text items-center gap-8 rounded-sm bg-muted px-16 transition-colors",
|
|
9
9
|
"focus-within:ring-2 focus-within:ring-active hover:bg-muted-hover",
|
|
10
10
|
"has-disabled:cursor-not-allowed has-disabled:bg-disabled has-disabled:text-disabled",
|
|
11
11
|
"has-invalid:border-error has-invalid:ring-1 has-invalid:ring-error",
|
|
12
12
|
'has-[input[aria-invalid="true"]]:border-error has-[input[aria-invalid="true"]]:ring-1 has-[input[aria-invalid="true"]]:ring-error'
|
|
13
|
-
),
|
|
13
|
+
), K = n(
|
|
14
14
|
"peer w-full flex-1 bg-muted body-1 text-base caret-active outline-hidden transition-colors",
|
|
15
15
|
"group-hover:bg-muted-hover group-disabled:bg-disabled",
|
|
16
16
|
"group-has-disabled:cursor-not-allowed group-has-disabled:bg-disabled group-has-disabled:text-disabled",
|
|
17
17
|
"placeholder:text-muted group-has-disabled:placeholder:text-disabled",
|
|
18
18
|
"[&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",
|
|
19
19
|
"truncate"
|
|
20
|
-
),
|
|
20
|
+
), Q = n(
|
|
21
21
|
"pointer-events-none absolute top-6 left-16 origin-left body-4 text-muted transition-all duration-300",
|
|
22
22
|
"peer-placeholder-shown:top-1/2 peer-placeholder-shown:-translate-y-1/2 peer-placeholder-shown:scale-100 peer-placeholder-shown:body-2",
|
|
23
23
|
"group-has-disabled:text-disabled",
|
|
24
24
|
"peer-focus:top-6 peer-focus:translate-y-0 peer-focus:body-4",
|
|
25
25
|
"w-[calc(100%-var(--size-56))] truncate"
|
|
26
|
-
),
|
|
27
|
-
ref:
|
|
28
|
-
className:
|
|
29
|
-
containerClassName:
|
|
30
|
-
inputClassName:
|
|
31
|
-
labelClassName:
|
|
32
|
-
label:
|
|
33
|
-
id:
|
|
26
|
+
), X = ({
|
|
27
|
+
ref: x,
|
|
28
|
+
className: y,
|
|
29
|
+
containerClassName: I,
|
|
30
|
+
inputClassName: C,
|
|
31
|
+
labelClassName: S,
|
|
32
|
+
label: l,
|
|
33
|
+
id: N,
|
|
34
34
|
disabled: R,
|
|
35
|
-
errorMessage:
|
|
36
|
-
suffix:
|
|
37
|
-
prefix:
|
|
38
|
-
onClear:
|
|
35
|
+
errorMessage: r,
|
|
36
|
+
suffix: k,
|
|
37
|
+
prefix: B,
|
|
38
|
+
onClear: D,
|
|
39
39
|
hideClearButton: j = !1,
|
|
40
|
-
"aria-invalid":
|
|
41
|
-
onChange:
|
|
42
|
-
...
|
|
40
|
+
"aria-invalid": c,
|
|
41
|
+
onChange: p,
|
|
42
|
+
...a
|
|
43
43
|
}) => {
|
|
44
|
-
const
|
|
44
|
+
const b = O({
|
|
45
45
|
consumerName: "BaseInput",
|
|
46
46
|
mergeWith: { disabled: R }
|
|
47
|
-
}), { t: z } =
|
|
48
|
-
|
|
49
|
-
),
|
|
50
|
-
(
|
|
51
|
-
s ||
|
|
47
|
+
}), { t: z } = W(), e = q(null), E = H(), d = N || `input-${E}`, F = c || (r ? !0 : void 0), s = a.value !== void 0, [L, h] = P(
|
|
48
|
+
a.defaultValue?.toString() || ""
|
|
49
|
+
), T = U(
|
|
50
|
+
(o) => {
|
|
51
|
+
s || h(o.target.value), p?.(o);
|
|
52
52
|
},
|
|
53
|
-
[s,
|
|
54
|
-
),
|
|
55
|
-
if (!
|
|
53
|
+
[s, p]
|
|
54
|
+
), m = (s ? !!a.value && a.value.toString().length > 0 : L.length > 0) && !b && !j, v = `${d}-error`, V = () => {
|
|
55
|
+
if (!e.current) return;
|
|
56
56
|
Object.getOwnPropertyDescriptor(
|
|
57
57
|
window.HTMLInputElement.prototype,
|
|
58
58
|
"value"
|
|
59
|
-
)?.set?.call(
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
t.forEach((e) => {
|
|
66
|
-
e && (typeof e == "function" ? e(l) : e.current = l);
|
|
67
|
-
});
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
return /* @__PURE__ */ p("div", { className: I, children: [
|
|
71
|
-
/* @__PURE__ */ p(
|
|
59
|
+
)?.set?.call(e.current, ""), s || h("");
|
|
60
|
+
const g = new Event("input", { bubbles: !0 });
|
|
61
|
+
e.current.dispatchEvent(g), e.current.focus(), D?.();
|
|
62
|
+
}, A = $(x, e);
|
|
63
|
+
return /* @__PURE__ */ u("div", { className: y, children: [
|
|
64
|
+
/* @__PURE__ */ u(
|
|
72
65
|
"div",
|
|
73
66
|
{
|
|
74
|
-
className:
|
|
75
|
-
onPointerDown: (
|
|
76
|
-
if (
|
|
77
|
-
const
|
|
78
|
-
if (!
|
|
79
|
-
const
|
|
67
|
+
className: n(J, I),
|
|
68
|
+
onPointerDown: (o) => {
|
|
69
|
+
if (o.target.closest("input, button, a")) return;
|
|
70
|
+
const i = e.current;
|
|
71
|
+
if (!i) return;
|
|
72
|
+
const f = i.value.length > 0 ? i.value.length : 0;
|
|
80
73
|
window.requestAnimationFrame(() => {
|
|
81
74
|
try {
|
|
82
|
-
|
|
75
|
+
i.setSelectionRange(f, f);
|
|
83
76
|
} catch {
|
|
84
77
|
}
|
|
85
|
-
|
|
78
|
+
i.focus();
|
|
86
79
|
});
|
|
87
80
|
},
|
|
88
81
|
children: [
|
|
89
|
-
|
|
90
|
-
/* @__PURE__ */
|
|
82
|
+
B,
|
|
83
|
+
/* @__PURE__ */ t(
|
|
91
84
|
"input",
|
|
92
85
|
{
|
|
93
|
-
ref:
|
|
94
|
-
id:
|
|
95
|
-
disabled:
|
|
86
|
+
ref: A,
|
|
87
|
+
id: d,
|
|
88
|
+
disabled: b,
|
|
96
89
|
placeholder: " ",
|
|
97
|
-
"aria-invalid":
|
|
98
|
-
"aria-describedby":
|
|
99
|
-
className:
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
90
|
+
"aria-invalid": F,
|
|
91
|
+
"aria-describedby": r ? v : void 0,
|
|
92
|
+
className: n(
|
|
93
|
+
K,
|
|
94
|
+
l && "pt-12 body-2",
|
|
95
|
+
C
|
|
103
96
|
),
|
|
104
|
-
onChange:
|
|
105
|
-
...
|
|
97
|
+
onChange: T,
|
|
98
|
+
...a
|
|
106
99
|
}
|
|
107
100
|
),
|
|
108
|
-
|
|
101
|
+
l && /* @__PURE__ */ t(
|
|
109
102
|
"label",
|
|
110
103
|
{
|
|
111
|
-
htmlFor:
|
|
112
|
-
className:
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
104
|
+
htmlFor: d,
|
|
105
|
+
className: n(
|
|
106
|
+
Q,
|
|
107
|
+
r && "text-error",
|
|
108
|
+
S
|
|
116
109
|
),
|
|
117
|
-
children:
|
|
110
|
+
children: l
|
|
118
111
|
}
|
|
119
112
|
),
|
|
120
|
-
|
|
121
|
-
|
|
113
|
+
m && /* @__PURE__ */ t(
|
|
114
|
+
G,
|
|
122
115
|
{
|
|
123
116
|
iconType: "filled",
|
|
124
|
-
onClick:
|
|
117
|
+
onClick: V,
|
|
125
118
|
"aria-label": z("components.baseInput.clearInputAriaLabel"),
|
|
126
|
-
children: /* @__PURE__ */
|
|
119
|
+
children: /* @__PURE__ */ t(w, { size: 20 })
|
|
127
120
|
}
|
|
128
121
|
),
|
|
129
|
-
!
|
|
122
|
+
!m && k
|
|
130
123
|
]
|
|
131
124
|
}
|
|
132
125
|
),
|
|
133
|
-
|
|
126
|
+
r && /* @__PURE__ */ u(
|
|
134
127
|
"div",
|
|
135
128
|
{
|
|
136
|
-
id:
|
|
129
|
+
id: v,
|
|
137
130
|
className: "mt-8 flex items-center gap-2 body-3 text-error",
|
|
138
131
|
role: "alert",
|
|
139
132
|
children: [
|
|
140
|
-
/* @__PURE__ */
|
|
141
|
-
/* @__PURE__ */
|
|
133
|
+
/* @__PURE__ */ t(w, { size: 16, className: "text-error" }),
|
|
134
|
+
/* @__PURE__ */ t("span", { children: r })
|
|
142
135
|
]
|
|
143
136
|
}
|
|
144
137
|
)
|
|
145
138
|
] });
|
|
146
139
|
};
|
|
147
|
-
|
|
140
|
+
X.displayName = "BaseInput";
|
|
148
141
|
export {
|
|
149
|
-
|
|
142
|
+
X as BaseInput
|
|
150
143
|
};
|
|
@@ -18,10 +18,10 @@ const h = f(
|
|
|
18
18
|
), x = ({
|
|
19
19
|
ref: i,
|
|
20
20
|
className: d,
|
|
21
|
-
appearance:
|
|
22
|
-
icon:
|
|
23
|
-
title:
|
|
24
|
-
description:
|
|
21
|
+
appearance: o,
|
|
22
|
+
icon: l,
|
|
23
|
+
title: n,
|
|
24
|
+
description: t,
|
|
25
25
|
hideChevron: r,
|
|
26
26
|
disabled: u,
|
|
27
27
|
...b
|
|
@@ -29,7 +29,7 @@ const h = f(
|
|
|
29
29
|
const c = m({
|
|
30
30
|
consumerName: "CardButton",
|
|
31
31
|
mergeWith: { disabled: u }
|
|
32
|
-
}),
|
|
32
|
+
}), s = l;
|
|
33
33
|
return /* @__PURE__ */ a(
|
|
34
34
|
"button",
|
|
35
35
|
{
|
|
@@ -37,22 +37,22 @@ const h = f(
|
|
|
37
37
|
className: p(
|
|
38
38
|
d,
|
|
39
39
|
h({
|
|
40
|
-
appearance:
|
|
40
|
+
appearance: o
|
|
41
41
|
})
|
|
42
42
|
),
|
|
43
43
|
disabled: c,
|
|
44
44
|
...b,
|
|
45
45
|
children: [
|
|
46
|
-
|
|
46
|
+
s && /* @__PURE__ */ e(s, { size: 24 }),
|
|
47
47
|
/* @__PURE__ */ a("div", { className: "flex min-w-0 flex-1 flex-col gap-4 text-left", children: [
|
|
48
|
-
/* @__PURE__ */ e("div", { className: "min-w-0 truncate body-2-semi-bold", children:
|
|
49
|
-
|
|
48
|
+
/* @__PURE__ */ e("div", { className: "min-w-0 truncate body-2-semi-bold", children: n }),
|
|
49
|
+
t && /* @__PURE__ */ e("div", { className: "line-clamp-2 min-w-0 body-3 text-muted group-disabled:text-disabled", children: t })
|
|
50
50
|
] }),
|
|
51
51
|
!r && /* @__PURE__ */ e(
|
|
52
52
|
v,
|
|
53
53
|
{
|
|
54
54
|
size: 24,
|
|
55
|
-
className: "
|
|
55
|
+
className: "text-muted group-disabled:text-disabled"
|
|
56
56
|
}
|
|
57
57
|
)
|
|
58
58
|
]
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as o, jsxs as m } from "react/jsx-runtime";
|
|
2
|
-
import { createSafeContext as
|
|
2
|
+
import { createSafeContext as f, cn as l } from "../../../libs/utils-shared/dist/index.js";
|
|
3
3
|
import * as n from "@radix-ui/react-dialog";
|
|
4
|
-
import { cva as
|
|
5
|
-
const [y, r] =
|
|
4
|
+
import { cva as u } from "class-variance-authority";
|
|
5
|
+
const [y, r] = f("Dialog"), p = u(
|
|
6
6
|
[
|
|
7
7
|
"flex w-400 max-w-[calc(100%-2rem)] flex-col overflow-hidden rounded-2xl bg-canvas-sheet pb-24",
|
|
8
8
|
"fixed top-[50%] left-[50%] z-dialog-content translate-[-50%]",
|
|
@@ -11,33 +11,33 @@ const [y, r] = u("Dialog"), h = f(
|
|
|
11
11
|
{
|
|
12
12
|
variants: {
|
|
13
13
|
height: {
|
|
14
|
-
|
|
14
|
+
fit: "max-h-560",
|
|
15
15
|
fixed: "h-560"
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
18
|
defaultVariants: {
|
|
19
|
-
height: "
|
|
19
|
+
height: "fit"
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
);
|
|
23
|
-
function k({ height:
|
|
24
|
-
return /* @__PURE__ */ o(y, { value: { height:
|
|
23
|
+
function k({ height: t = "fit", ...a }) {
|
|
24
|
+
return /* @__PURE__ */ o(y, { value: { height: t }, children: /* @__PURE__ */ o(n.Root, { "data-slot": "dialog", ...a }) });
|
|
25
25
|
}
|
|
26
|
-
function w({ ...
|
|
27
|
-
return /* @__PURE__ */ o(n.Trigger, { "data-slot": "dialog-trigger", ...
|
|
26
|
+
function w({ ...t }) {
|
|
27
|
+
return /* @__PURE__ */ o(n.Trigger, { "data-slot": "dialog-trigger", ...t });
|
|
28
28
|
}
|
|
29
|
-
function
|
|
30
|
-
...
|
|
29
|
+
function x({
|
|
30
|
+
...t
|
|
31
31
|
}) {
|
|
32
|
-
return /* @__PURE__ */ o(n.Portal, { "data-slot": "dialog-portal", ...
|
|
32
|
+
return /* @__PURE__ */ o(n.Portal, { "data-slot": "dialog-portal", ...t });
|
|
33
33
|
}
|
|
34
|
-
const s = ({ ref:
|
|
34
|
+
const s = ({ ref: t, className: a, ...e }) => /* @__PURE__ */ o(
|
|
35
35
|
n.Overlay,
|
|
36
36
|
{
|
|
37
|
-
ref:
|
|
37
|
+
ref: t,
|
|
38
38
|
"data-slot": "dialog-overlay",
|
|
39
39
|
className: l(
|
|
40
|
-
|
|
40
|
+
a,
|
|
41
41
|
"fixed inset-0 z-dialog-overlay bg-canvas-overlay backdrop-blur-sm data-[state=closed]:animate-fade-out data-[state=open]:animate-fade-in"
|
|
42
42
|
),
|
|
43
43
|
...e
|
|
@@ -45,84 +45,84 @@ const s = ({ ref: a, className: t, ...e }) => /* @__PURE__ */ o(
|
|
|
45
45
|
);
|
|
46
46
|
s.displayName = "DialogOverlay";
|
|
47
47
|
function B({
|
|
48
|
-
className:
|
|
49
|
-
children:
|
|
48
|
+
className: t,
|
|
49
|
+
children: a,
|
|
50
50
|
...e
|
|
51
51
|
}) {
|
|
52
52
|
const { height: i } = r({
|
|
53
53
|
consumerName: "DialogContent",
|
|
54
54
|
contextRequired: !0
|
|
55
55
|
});
|
|
56
|
-
return /* @__PURE__ */ m(
|
|
56
|
+
return /* @__PURE__ */ m(x, { "data-slot": "dialog-portal", children: [
|
|
57
57
|
/* @__PURE__ */ o(s, {}),
|
|
58
58
|
/* @__PURE__ */ o(
|
|
59
59
|
n.Content,
|
|
60
60
|
{
|
|
61
61
|
"data-slot": "dialog-content",
|
|
62
|
-
className: l(
|
|
62
|
+
className: l(p({ height: i }), t),
|
|
63
63
|
...e,
|
|
64
|
-
children:
|
|
64
|
+
children: a
|
|
65
65
|
}
|
|
66
66
|
)
|
|
67
67
|
] });
|
|
68
68
|
}
|
|
69
|
-
const
|
|
70
|
-
ref:
|
|
71
|
-
className:
|
|
69
|
+
const h = ({
|
|
70
|
+
ref: t,
|
|
71
|
+
className: a,
|
|
72
72
|
children: e,
|
|
73
73
|
scrollbarWidth: i = "none",
|
|
74
74
|
style: d,
|
|
75
|
-
...
|
|
75
|
+
...c
|
|
76
76
|
}) => {
|
|
77
|
-
const { height:
|
|
77
|
+
const { height: g } = r({
|
|
78
78
|
consumerName: "DialogBody",
|
|
79
79
|
contextRequired: !0
|
|
80
80
|
});
|
|
81
81
|
return /* @__PURE__ */ o(
|
|
82
82
|
"div",
|
|
83
83
|
{
|
|
84
|
-
ref:
|
|
84
|
+
ref: t,
|
|
85
85
|
"data-slot": "dialog-body",
|
|
86
86
|
style: d,
|
|
87
87
|
className: l(
|
|
88
88
|
"-mb-24 flex min-h-0 grow flex-col overflow-y-auto px-24 pb-24",
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
g === "fit" ? "basis-auto" : "basis-0",
|
|
90
|
+
a,
|
|
91
91
|
i === "auto" ? "scrollbar-custom" : "scrollbar-none"
|
|
92
92
|
),
|
|
93
|
-
...
|
|
93
|
+
...c,
|
|
94
94
|
children: e
|
|
95
95
|
}
|
|
96
96
|
);
|
|
97
97
|
};
|
|
98
|
-
|
|
98
|
+
h.displayName = "DialogBody";
|
|
99
99
|
const v = ({
|
|
100
|
-
ref:
|
|
101
|
-
className:
|
|
100
|
+
ref: t,
|
|
101
|
+
className: a,
|
|
102
102
|
children: e,
|
|
103
103
|
...i
|
|
104
104
|
}) => /* @__PURE__ */ o(
|
|
105
105
|
"div",
|
|
106
106
|
{
|
|
107
|
-
ref:
|
|
107
|
+
ref: t,
|
|
108
108
|
"data-slot": "dialog-body-sticky-content",
|
|
109
|
-
className: l("sticky top-0 bg-canvas-sheet py-8",
|
|
109
|
+
className: l("sticky top-0 bg-canvas-sheet py-8", a),
|
|
110
110
|
...i,
|
|
111
111
|
children: e
|
|
112
112
|
}
|
|
113
113
|
);
|
|
114
114
|
v.displayName = "DialogBodyStickyContent";
|
|
115
115
|
const D = ({
|
|
116
|
-
ref:
|
|
117
|
-
className:
|
|
116
|
+
ref: t,
|
|
117
|
+
className: a,
|
|
118
118
|
children: e,
|
|
119
119
|
...i
|
|
120
120
|
}) => /* @__PURE__ */ o(
|
|
121
121
|
"div",
|
|
122
122
|
{
|
|
123
|
-
ref:
|
|
123
|
+
ref: t,
|
|
124
124
|
"data-slot": "dialog-footer",
|
|
125
|
-
className: l("flex shrink-0 justify-end gap-8 px-24 pt-24",
|
|
125
|
+
className: l("flex shrink-0 justify-end gap-8 px-24 pt-24", a),
|
|
126
126
|
...i,
|
|
127
127
|
children: e
|
|
128
128
|
}
|
|
@@ -130,7 +130,7 @@ const D = ({
|
|
|
130
130
|
D.displayName = "DialogFooter";
|
|
131
131
|
export {
|
|
132
132
|
k as Dialog,
|
|
133
|
-
|
|
133
|
+
h as DialogBody,
|
|
134
134
|
v as DialogBodyStickyContent,
|
|
135
135
|
B as DialogContent,
|
|
136
136
|
D as DialogFooter,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithRef, ReactNode } from 'react';
|
|
2
|
-
export type DialogHeight = '
|
|
2
|
+
export type DialogHeight = 'fit' | 'fixed';
|
|
3
3
|
export type DialogProps = {
|
|
4
4
|
/**
|
|
5
5
|
* The content to display inside the dialog.
|
|
@@ -22,9 +22,9 @@ export type DialogProps = {
|
|
|
22
22
|
defaultOpen?: boolean;
|
|
23
23
|
/**
|
|
24
24
|
* The height behavior of the dialog.
|
|
25
|
-
* - `
|
|
25
|
+
* - `fit`: Content-fit height up to max 560px (default)
|
|
26
26
|
* - `fixed`: Always exactly 560px height
|
|
27
|
-
* @default '
|
|
27
|
+
* @default 'fit'
|
|
28
28
|
*/
|
|
29
29
|
height?: DialogHeight;
|
|
30
30
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { cn as s } from "../../../libs/utils-shared/dist/index.js";
|
|
2
2
|
import { cva as a } from "class-variance-authority";
|
|
3
3
|
import { createElement as k } from "react";
|
|
4
|
-
const
|
|
4
|
+
const h = a("inline-block shrink-0", {
|
|
5
5
|
variants: {
|
|
6
6
|
size: {
|
|
7
7
|
12: "icon-w-12 icon-h-12 icon-stroke-12",
|
|
@@ -17,7 +17,7 @@ const l = a("inline-block", {
|
|
|
17
17
|
defaultVariants: {
|
|
18
18
|
size: 24
|
|
19
19
|
}
|
|
20
|
-
}),
|
|
20
|
+
}), l = ({
|
|
21
21
|
ref: o,
|
|
22
22
|
size: n = 24,
|
|
23
23
|
className: i = "",
|
|
@@ -33,12 +33,12 @@ const l = a("inline-block", {
|
|
|
33
33
|
"aria-hidden": "true",
|
|
34
34
|
xmlns: r,
|
|
35
35
|
viewBox: e,
|
|
36
|
-
className: s(i,
|
|
36
|
+
className: s(i, h({ size: n }), "inline-block"),
|
|
37
37
|
...t
|
|
38
38
|
},
|
|
39
39
|
c
|
|
40
40
|
);
|
|
41
|
-
|
|
41
|
+
l.displayName = "Icon";
|
|
42
42
|
export {
|
|
43
|
-
|
|
43
|
+
l as Icon
|
|
44
44
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createIcon.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Icon/createIcon.ts"],"names":[],"mappings":"AAKA,OAAO,EAAiB,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEhD,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC;;;;;;GAMG;AACH,QAAA,MAAM,UAAU,GACd,UAAU,MAAM,EAChB,SAAS,KAAK,CAAC,YAAY,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;6CAOjD,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC;;CAkB/B,CAAC;
|
|
1
|
+
{"version":3,"file":"createIcon.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Icon/createIcon.ts"],"names":[],"mappings":"AAKA,OAAO,EAAiB,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEhD,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC;;;;;;GAMG;AACH,QAAA,MAAM,UAAU,GACd,UAAU,MAAM,EAChB,SAAS,KAAK,CAAC,YAAY,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;6CAOjD,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC;;CAkB/B,CAAC;AAGF,eAAe,UAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Link/Link.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAmCpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,eAAO,MAAM,IAAI;6HAYd,SAAS;;
|
|
1
|
+
{"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Link/Link.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAmCpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,eAAO,MAAM,IAAI;6HAYd,SAAS;;CAgDX,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as e, jsxs as l, Fragment as c } from "react/jsx-runtime";
|
|
2
|
-
import { useDisabledContext as
|
|
2
|
+
import { useDisabledContext as x, cn as h } from "../../../libs/utils-shared/dist/index.js";
|
|
3
3
|
import { Slot as k } from "@radix-ui/react-slot";
|
|
4
|
-
import { cva as
|
|
5
|
-
import { ExternalLink as
|
|
6
|
-
const
|
|
4
|
+
import { cva as g } from "class-variance-authority";
|
|
5
|
+
import { ExternalLink as y } from "../../Symbols/Icons/ExternalLink.js";
|
|
6
|
+
const z = g(
|
|
7
7
|
"inline-flex w-fit max-w-full items-center justify-center transition-colors focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-focus",
|
|
8
8
|
{
|
|
9
9
|
variants: {
|
|
@@ -33,62 +33,55 @@ const y = N(
|
|
|
33
33
|
disabled: !1
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
),
|
|
36
|
+
), N = ({
|
|
37
37
|
ref: d,
|
|
38
38
|
className: m,
|
|
39
|
-
children:
|
|
39
|
+
children: a,
|
|
40
40
|
appearance: p,
|
|
41
|
-
size:
|
|
41
|
+
size: i = "inherit",
|
|
42
42
|
underline: f = !0,
|
|
43
43
|
icon: u,
|
|
44
44
|
isExternal: n = !1,
|
|
45
|
-
asChild:
|
|
45
|
+
asChild: t = !1,
|
|
46
46
|
disabled: b,
|
|
47
47
|
...v
|
|
48
48
|
}) => {
|
|
49
|
-
const
|
|
49
|
+
const s = x({
|
|
50
50
|
consumerName: "Link",
|
|
51
51
|
mergeWith: { disabled: b }
|
|
52
|
-
}), r =
|
|
52
|
+
}), r = i ? {
|
|
53
53
|
sm: 16,
|
|
54
54
|
md: 20
|
|
55
|
-
}[
|
|
55
|
+
}[i] : 20, o = u;
|
|
56
56
|
return /* @__PURE__ */ e(
|
|
57
|
-
|
|
57
|
+
t ? k : "a",
|
|
58
58
|
{
|
|
59
59
|
ref: d,
|
|
60
|
-
className:
|
|
60
|
+
className: h(
|
|
61
61
|
m,
|
|
62
|
-
|
|
62
|
+
z({
|
|
63
63
|
appearance: p,
|
|
64
|
-
size:
|
|
64
|
+
size: i,
|
|
65
65
|
underline: f,
|
|
66
|
-
disabled:
|
|
66
|
+
disabled: s
|
|
67
67
|
})
|
|
68
68
|
),
|
|
69
|
-
"aria-disabled":
|
|
70
|
-
target: n && !
|
|
71
|
-
rel: n && !
|
|
69
|
+
"aria-disabled": s || void 0,
|
|
70
|
+
target: n && !t ? "_blank" : void 0,
|
|
71
|
+
rel: n && !t ? "noopener noreferrer" : void 0,
|
|
72
72
|
...v,
|
|
73
|
-
children:
|
|
74
|
-
o && /* @__PURE__ */ e(o, { size: r
|
|
75
|
-
/* @__PURE__ */ e("span", { className: "min-w-0 truncate", children:
|
|
73
|
+
children: t ? a : /* @__PURE__ */ l(c, { children: [
|
|
74
|
+
o && /* @__PURE__ */ e(o, { size: r }),
|
|
75
|
+
/* @__PURE__ */ e("span", { className: "min-w-0 truncate", children: a }),
|
|
76
76
|
n && /* @__PURE__ */ l(c, { children: [
|
|
77
|
-
/* @__PURE__ */ e(
|
|
78
|
-
g,
|
|
79
|
-
{
|
|
80
|
-
size: r,
|
|
81
|
-
className: "shrink-0",
|
|
82
|
-
"aria-hidden": "true"
|
|
83
|
-
}
|
|
84
|
-
),
|
|
77
|
+
/* @__PURE__ */ e(y, { size: r, "aria-hidden": "true" }),
|
|
85
78
|
/* @__PURE__ */ e("span", { className: "sr-only", children: "(opens in a new tab)" })
|
|
86
79
|
] })
|
|
87
80
|
] })
|
|
88
81
|
}
|
|
89
82
|
);
|
|
90
83
|
};
|
|
91
|
-
|
|
84
|
+
N.displayName = "Link";
|
|
92
85
|
export {
|
|
93
|
-
|
|
86
|
+
N as Link
|
|
94
87
|
};
|