@ledgerhq/lumen-ui-react 0.0.63 → 0.0.65
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/dist/i18n/locales/de.json.d.ts +23 -2
- package/dist/i18n/locales/de.json.js +4 -4
- package/dist/i18n/locales/en.json.d.ts +5 -1
- package/dist/i18n/locales/en.json.js +1 -1
- package/dist/i18n/locales/es.json.d.ts +23 -2
- package/dist/i18n/locales/es.json.js +4 -4
- package/dist/i18n/locales/fr.json.d.ts +6 -2
- package/dist/i18n/locales/fr.json.js +1 -1
- package/dist/i18n/locales/ja.json.d.ts +23 -2
- package/dist/i18n/locales/ja.json.js +4 -4
- package/dist/i18n/locales/ko.json.d.ts +23 -2
- package/dist/i18n/locales/ko.json.js +4 -4
- package/dist/i18n/locales/pt.json.d.ts +23 -2
- package/dist/i18n/locales/pt.json.js +4 -4
- package/dist/i18n/locales/ru.json.d.ts +23 -2
- package/dist/i18n/locales/ru.json.js +4 -4
- package/dist/i18n/locales/th.json.d.ts +23 -2
- package/dist/i18n/locales/th.json.js +4 -4
- package/dist/i18n/locales/tr.json.d.ts +23 -2
- package/dist/i18n/locales/tr.json.js +4 -4
- package/dist/i18n/locales/zh.json.d.ts +23 -2
- package/dist/i18n/locales/zh.json.js +4 -4
- package/dist/lib/Components/AddressInput/AddressInput.js +2 -2
- package/dist/lib/Components/AmountInput/AmountInput.js +2 -2
- package/dist/lib/Components/BaseInput/BaseInput.d.ts +1 -0
- package/dist/lib/Components/BaseInput/BaseInput.d.ts.map +1 -1
- package/dist/lib/Components/BaseInput/BaseInput.js +66 -65
- package/dist/lib/Components/BaseInput/types.d.ts +5 -1
- package/dist/lib/Components/BaseInput/types.d.ts.map +1 -1
- package/dist/lib/Components/Button/BaseButton.d.ts.map +1 -1
- package/dist/lib/Components/Button/BaseButton.js +1 -1
- package/dist/lib/Components/CardButton/CardButton.js +1 -1
- package/dist/lib/Components/Checkbox/Checkbox.js +7 -7
- package/dist/lib/Components/Dialog/Dialog.js +4 -4
- package/dist/lib/Components/Dialog/DialogHeader/DialogHeader.js +3 -3
- package/dist/lib/Components/InteractiveIcon/InteractiveIcon.js +7 -7
- package/dist/lib/Components/ListItem/ListItem.js +1 -1
- package/dist/lib/Components/Menu/Menu.js +5 -5
- package/dist/lib/Components/SearchInput/SearchInput.d.ts +3 -2
- package/dist/lib/Components/SearchInput/SearchInput.d.ts.map +1 -1
- package/dist/lib/Components/SearchInput/SearchInput.js +45 -13
- package/dist/lib/Components/SearchInput/types.d.ts +7 -1
- package/dist/lib/Components/SearchInput/types.d.ts.map +1 -1
- package/dist/lib/Components/Select/Select.js +64 -64
- package/dist/lib/Components/Subheader/Subheader.js +1 -1
- package/dist/lib/Components/Switch/Switch.js +3 -3
- package/dist/lib/Components/Tile/Tile.d.ts +15 -9
- package/dist/lib/Components/Tile/Tile.d.ts.map +1 -1
- package/dist/lib/Components/Tile/Tile.js +131 -133
- package/dist/lib/Components/Tooltip/Tooltip.js +2 -2
- package/dist/package.json +1 -1
- package/package.json +1 -1
|
@@ -1,68 +1,69 @@
|
|
|
1
|
-
import { jsxs as h, jsx as
|
|
2
|
-
import { cn as
|
|
3
|
-
import
|
|
4
|
-
import { useCommonTranslation as
|
|
5
|
-
import { InteractiveIcon as
|
|
1
|
+
import { jsxs as h, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { cn as a } from "../../../libs/utils-shared/dist/index.js";
|
|
3
|
+
import l from "react";
|
|
4
|
+
import { useCommonTranslation as _ } from "../../../i18n/useCommonTranslation.js";
|
|
5
|
+
import { InteractiveIcon as $ } from "../InteractiveIcon/InteractiveIcon.js";
|
|
6
6
|
import { DeleteCircleFill as I } from "../../Symbols/Icons/DeleteCircleFill.js";
|
|
7
|
-
const
|
|
7
|
+
const q = a(
|
|
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
|
-
"has-
|
|
11
|
-
"has-
|
|
10
|
+
"has-disabled:cursor-not-allowed has-disabled:bg-disabled has-disabled:text-disabled",
|
|
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
|
-
),
|
|
14
|
-
"peer w-full flex-1 bg-muted text-base caret-active outline-
|
|
13
|
+
), H = a(
|
|
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
|
-
"group-has-
|
|
17
|
-
"placeholder:text-muted group-has-
|
|
16
|
+
"group-has-disabled:cursor-not-allowed group-has-disabled:bg-disabled group-has-disabled:text-disabled",
|
|
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
|
-
),
|
|
21
|
-
"pointer-events-none absolute left-16
|
|
20
|
+
), U = a(
|
|
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
|
-
"group-has-
|
|
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
|
-
),
|
|
26
|
+
), G = l.forwardRef(
|
|
27
27
|
({
|
|
28
28
|
className: N,
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
containerClassName: R,
|
|
30
|
+
inputClassName: S,
|
|
31
|
+
labelClassName: k,
|
|
31
32
|
label: u,
|
|
32
|
-
id:
|
|
33
|
+
id: z,
|
|
33
34
|
disabled: f,
|
|
34
|
-
errorMessage:
|
|
35
|
-
suffix:
|
|
36
|
-
prefix:
|
|
35
|
+
errorMessage: i,
|
|
36
|
+
suffix: E,
|
|
37
|
+
prefix: j,
|
|
37
38
|
onClear: p,
|
|
38
|
-
hideClearButton:
|
|
39
|
+
hideClearButton: B = !1,
|
|
39
40
|
"aria-invalid": m,
|
|
40
|
-
onChange:
|
|
41
|
+
onChange: d,
|
|
41
42
|
...o
|
|
42
|
-
},
|
|
43
|
+
}, C) => {
|
|
43
44
|
var x;
|
|
44
|
-
const { t:
|
|
45
|
+
const { t: D } = _(), r = l.useRef(null), F = l.useId(), b = z || `input-${F}`, L = m || (i ? !0 : void 0), c = o.value !== void 0, [T, v] = l.useState(
|
|
45
46
|
((x = o.defaultValue) == null ? void 0 : x.toString()) || ""
|
|
46
|
-
),
|
|
47
|
+
), V = l.useCallback(
|
|
47
48
|
(t) => {
|
|
48
|
-
|
|
49
|
+
c || v(t.target.value), d == null || d(t);
|
|
49
50
|
},
|
|
50
|
-
[
|
|
51
|
-
), g = (
|
|
51
|
+
[c, d]
|
|
52
|
+
), g = (c ? !!o.value && o.value.toString().length > 0 : T.length > 0) && !f && !B, w = `${b}-error`, A = () => {
|
|
52
53
|
var e;
|
|
53
|
-
if (!
|
|
54
|
+
if (!r.current) return;
|
|
54
55
|
const t = (e = Object.getOwnPropertyDescriptor(
|
|
55
56
|
window.HTMLInputElement.prototype,
|
|
56
57
|
"value"
|
|
57
58
|
)) == null ? void 0 : e.set;
|
|
58
|
-
t == null || t.call(
|
|
59
|
-
const
|
|
60
|
-
|
|
59
|
+
t == null || t.call(r.current, ""), c || v("");
|
|
60
|
+
const s = new Event("input", { bubbles: !0 });
|
|
61
|
+
r.current.dispatchEvent(s), r.current.focus(), p == null || p();
|
|
61
62
|
};
|
|
62
|
-
function
|
|
63
|
-
return (
|
|
63
|
+
function O(...t) {
|
|
64
|
+
return (s) => {
|
|
64
65
|
t.forEach((e) => {
|
|
65
|
-
e && (typeof e == "function" ? e(
|
|
66
|
+
e && (typeof e == "function" ? e(s) : e.current = s);
|
|
66
67
|
});
|
|
67
68
|
};
|
|
68
69
|
}
|
|
@@ -70,10 +71,10 @@ const $ = l(
|
|
|
70
71
|
/* @__PURE__ */ h(
|
|
71
72
|
"div",
|
|
72
73
|
{
|
|
73
|
-
className:
|
|
74
|
+
className: a(q, R),
|
|
74
75
|
onPointerDown: (t) => {
|
|
75
76
|
if (t.target.closest("input, button, a")) return;
|
|
76
|
-
const e =
|
|
77
|
+
const e = r.current;
|
|
77
78
|
if (!e) return;
|
|
78
79
|
const y = e.value.length > 0 ? e.value.length : 0;
|
|
79
80
|
window.requestAnimationFrame(() => {
|
|
@@ -85,66 +86,66 @@ const $ = l(
|
|
|
85
86
|
});
|
|
86
87
|
},
|
|
87
88
|
children: [
|
|
88
|
-
|
|
89
|
-
/* @__PURE__ */
|
|
89
|
+
j,
|
|
90
|
+
/* @__PURE__ */ n(
|
|
90
91
|
"input",
|
|
91
92
|
{
|
|
92
|
-
ref:
|
|
93
|
+
ref: O(C, r),
|
|
93
94
|
id: b,
|
|
94
95
|
disabled: f,
|
|
95
96
|
placeholder: " ",
|
|
96
|
-
"aria-invalid":
|
|
97
|
-
"aria-describedby":
|
|
98
|
-
className:
|
|
99
|
-
|
|
97
|
+
"aria-invalid": L,
|
|
98
|
+
"aria-describedby": i ? w : void 0,
|
|
99
|
+
className: a(
|
|
100
|
+
H,
|
|
100
101
|
u && "pt-12 body-2",
|
|
101
|
-
|
|
102
|
+
S
|
|
102
103
|
),
|
|
103
|
-
onChange:
|
|
104
|
+
onChange: V,
|
|
104
105
|
...o
|
|
105
106
|
}
|
|
106
107
|
),
|
|
107
|
-
u && /* @__PURE__ */
|
|
108
|
+
u && /* @__PURE__ */ n(
|
|
108
109
|
"label",
|
|
109
110
|
{
|
|
110
111
|
htmlFor: b,
|
|
111
|
-
className:
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
112
|
+
className: a(
|
|
113
|
+
U,
|
|
114
|
+
i && "text-error",
|
|
115
|
+
k
|
|
115
116
|
),
|
|
116
117
|
children: u
|
|
117
118
|
}
|
|
118
119
|
),
|
|
119
|
-
g && /* @__PURE__ */
|
|
120
|
-
|
|
120
|
+
g && /* @__PURE__ */ n(
|
|
121
|
+
$,
|
|
121
122
|
{
|
|
122
123
|
iconType: "filled",
|
|
123
|
-
onClick:
|
|
124
|
-
"aria-label":
|
|
125
|
-
children: /* @__PURE__ */
|
|
124
|
+
onClick: A,
|
|
125
|
+
"aria-label": D("components.baseInput.clearInputAriaLabel"),
|
|
126
|
+
children: /* @__PURE__ */ n(I, { size: 20 })
|
|
126
127
|
}
|
|
127
128
|
),
|
|
128
|
-
!g &&
|
|
129
|
+
!g && E
|
|
129
130
|
]
|
|
130
131
|
}
|
|
131
132
|
),
|
|
132
|
-
|
|
133
|
+
i && /* @__PURE__ */ h(
|
|
133
134
|
"div",
|
|
134
135
|
{
|
|
135
136
|
id: w,
|
|
136
|
-
className: "mt-8 flex items-center gap-2 text-error
|
|
137
|
+
className: "mt-8 flex items-center gap-2 body-3 text-error",
|
|
137
138
|
role: "alert",
|
|
138
139
|
children: [
|
|
139
|
-
/* @__PURE__ */
|
|
140
|
-
/* @__PURE__ */
|
|
140
|
+
/* @__PURE__ */ n(I, { size: 16, className: "shrink-0 text-error" }),
|
|
141
|
+
/* @__PURE__ */ n("span", { children: i })
|
|
141
142
|
]
|
|
142
143
|
}
|
|
143
144
|
)
|
|
144
145
|
] });
|
|
145
146
|
}
|
|
146
147
|
);
|
|
147
|
-
|
|
148
|
+
G.displayName = "BaseInput";
|
|
148
149
|
export {
|
|
149
|
-
|
|
150
|
+
G as BaseInput
|
|
150
151
|
};
|
|
@@ -32,9 +32,13 @@ export type BaseInputProps = {
|
|
|
32
32
|
*/
|
|
33
33
|
hideClearButton?: boolean;
|
|
34
34
|
/**
|
|
35
|
-
* Additional class names to apply to the
|
|
35
|
+
* Additional class names to apply to the outer wrapper element
|
|
36
36
|
*/
|
|
37
37
|
className?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Additional class names to apply to the inner container element
|
|
40
|
+
*/
|
|
41
|
+
containerClassName?: string;
|
|
38
42
|
/**
|
|
39
43
|
* Additional class names to apply to the input element
|
|
40
44
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/BaseInput/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;OAGG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB;;;OAGG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,GAAG,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/BaseInput/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;OAGG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB;;;OAGG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,GAAG,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseButton.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Button/BaseButton.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAqDzC,eAAO,MAAM,UAAU;;;;;;;;;YAxCf,
|
|
1
|
+
{"version":3,"file":"BaseButton.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Button/BaseButton.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAqDzC,eAAO,MAAM,UAAU;;;;;;;;;YAxCf,CAAF;iBACI,CAAH;;;2FAkHN,CAAC"}
|
|
@@ -5,7 +5,7 @@ import { cva as l } from "class-variance-authority";
|
|
|
5
5
|
import y, { useCallback as B } from "react";
|
|
6
6
|
import { Spinner as N } from "../Spinner/Spinner.js";
|
|
7
7
|
const j = l(
|
|
8
|
-
'inline-flex size-fit cursor-pointer items-center justify-center rounded-full transition-colors duration-200
|
|
8
|
+
'inline-flex size-fit cursor-pointer items-center justify-center rounded-full body-1-semi-bold transition-colors duration-200 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus data-[disabled="true"]:bg-disabled data-[disabled="true"]:text-disabled',
|
|
9
9
|
{
|
|
10
10
|
variants: {
|
|
11
11
|
appearance: {
|
|
@@ -9,7 +9,7 @@ const p = c(
|
|
|
9
9
|
variants: {
|
|
10
10
|
appearance: {
|
|
11
11
|
base: "bg-muted text-base hover:bg-muted-hover active:bg-muted-pressed disabled:bg-disabled",
|
|
12
|
-
outline: "bg-base-transparent text-base outline-dashed outline-1 outline-muted-subtle hover:bg-base-transparent-hover hover:outline-muted-subtle-hover focus-visible:outline-
|
|
12
|
+
outline: "bg-base-transparent text-base outline-dashed outline-1 outline-muted-subtle hover:bg-base-transparent-hover hover:outline-muted-subtle-hover focus-visible:outline-hidden focus-visible:outline-offset-0 active:bg-base-transparent-pressed active:outline-muted-subtle-pressed disabled:bg-base-transparent disabled:outline-disabled"
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
defaultVariants: {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { cn as
|
|
2
|
+
import { cn as a } from "../../../libs/utils-shared/dist/index.js";
|
|
3
3
|
import * as t from "@radix-ui/react-checkbox";
|
|
4
4
|
import i from "react";
|
|
5
5
|
import { Check as o } from "../../Symbols/Icons/Check.js";
|
|
6
|
-
const r =
|
|
7
|
-
"
|
|
8
|
-
"focus-visible:
|
|
6
|
+
const r = a(
|
|
7
|
+
"size-20 shrink-0 cursor-pointer rounded-xs transition-colors",
|
|
8
|
+
"focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-offset-2 focus-visible:outline-hidden",
|
|
9
9
|
"data-[state=unchecked]:border data-[state=unchecked]:border-muted data-[state=unchecked]:bg-base",
|
|
10
10
|
"data-[state=unchecked]:hover:bg-base-hover",
|
|
11
11
|
"data-[state=unchecked]:active:bg-base-pressed",
|
|
@@ -14,12 +14,12 @@ const r = [
|
|
|
14
14
|
"data-[state=checked]:hover:bg-active-hover",
|
|
15
15
|
"data-[state=checked]:active:bg-active-pressed",
|
|
16
16
|
"data-[state=checked]:disabled:bg-disabled data-[state=checked]:disabled:text-disabled"
|
|
17
|
-
|
|
17
|
+
), b = i.forwardRef(({ className: s, ...d }, c) => /* @__PURE__ */ e(
|
|
18
18
|
t.Root,
|
|
19
19
|
{
|
|
20
20
|
ref: c,
|
|
21
|
-
className:
|
|
22
|
-
...
|
|
21
|
+
className: a(r, s),
|
|
22
|
+
...d,
|
|
23
23
|
children: /* @__PURE__ */ e(t.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ e(o, { size: 16 }) })
|
|
24
24
|
}
|
|
25
25
|
));
|
|
@@ -3,10 +3,10 @@ import { createSafeContext as u, cn as l } from "../../../libs/utils-shared/dist
|
|
|
3
3
|
import * as r from "@radix-ui/react-dialog";
|
|
4
4
|
import { cva as h } from "class-variance-authority";
|
|
5
5
|
import * as n from "react";
|
|
6
|
-
const [
|
|
6
|
+
const [p, s] = u("Dialog"), x = h(
|
|
7
7
|
[
|
|
8
8
|
"flex w-400 max-w-[calc(100%-2rem)] flex-col overflow-hidden rounded-2xl bg-canvas-sheet pb-24",
|
|
9
|
-
"fixed
|
|
9
|
+
"fixed top-[50%] left-[50%] z-dialog-content translate-[-50%]",
|
|
10
10
|
"data-[state=closed]:animate-content-hide data-[state=open]:animate-content-show"
|
|
11
11
|
],
|
|
12
12
|
{
|
|
@@ -22,7 +22,7 @@ const [x, s] = u("Dialog"), p = h(
|
|
|
22
22
|
}
|
|
23
23
|
);
|
|
24
24
|
function C({ height: a = "hug", ...t }) {
|
|
25
|
-
return /* @__PURE__ */ o(
|
|
25
|
+
return /* @__PURE__ */ o(p, { value: { height: a }, children: /* @__PURE__ */ o(r.Root, { "data-slot": "dialog", ...t }) });
|
|
26
26
|
}
|
|
27
27
|
function R({ ...a }) {
|
|
28
28
|
return /* @__PURE__ */ o(r.Trigger, { "data-slot": "dialog-trigger", ...a });
|
|
@@ -62,7 +62,7 @@ function O({
|
|
|
62
62
|
r.Content,
|
|
63
63
|
{
|
|
64
64
|
"data-slot": "dialog-content",
|
|
65
|
-
className: l(
|
|
65
|
+
className: l(x({ height: i }), a),
|
|
66
66
|
...e,
|
|
67
67
|
children: t
|
|
68
68
|
}
|
|
@@ -79,8 +79,8 @@ const y = b("flex px-24 text-base", {
|
|
|
79
79
|
"pl-40": !i
|
|
80
80
|
}),
|
|
81
81
|
children: [
|
|
82
|
-
o && /* @__PURE__ */ e("div", { className: "heading-5-semi-bold
|
|
83
|
-
l && /* @__PURE__ */ e("div", { className: "truncate text-center text-muted
|
|
82
|
+
o && /* @__PURE__ */ e("div", { className: "truncate text-center heading-5-semi-bold", children: o }),
|
|
83
|
+
l && /* @__PURE__ */ e("div", { className: "truncate text-center body-2 text-muted", children: l })
|
|
84
84
|
]
|
|
85
85
|
}
|
|
86
86
|
),
|
|
@@ -93,7 +93,7 @@ const y = b("flex px-24 text-base", {
|
|
|
93
93
|
] }),
|
|
94
94
|
(o || l) && /* @__PURE__ */ t("div", { className: "flex flex-col gap-4", children: [
|
|
95
95
|
o && /* @__PURE__ */ e("div", { className: "heading-3-semi-bold", children: o }),
|
|
96
|
-
l && /* @__PURE__ */ e("div", { className: "text-muted
|
|
96
|
+
l && /* @__PURE__ */ e("div", { className: "body-2 text-muted", children: l })
|
|
97
97
|
] })
|
|
98
98
|
] })
|
|
99
99
|
]
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { cn as
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { cn as i } from "../../../libs/utils-shared/dist/index.js";
|
|
3
3
|
import { cva as a } from "class-variance-authority";
|
|
4
4
|
import n from "react";
|
|
5
5
|
const c = a(
|
|
6
|
-
"inline-flex size-fit items-center justify-center rounded-full text-muted transition-colors hover:text-muted-hover focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus active:text-muted-pressed disabled:text-disabled",
|
|
6
|
+
"inline-flex size-fit cursor-pointer items-center justify-center rounded-full text-muted transition-colors hover:text-muted-hover focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus active:text-muted-pressed disabled:text-disabled",
|
|
7
7
|
{
|
|
8
8
|
variants: {
|
|
9
9
|
iconType: {
|
|
@@ -12,12 +12,12 @@ const c = a(
|
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
-
), d = n.forwardRef(({ className: e, iconType: t, ...
|
|
15
|
+
), d = n.forwardRef(({ className: e, iconType: t, ...r }, s) => /* @__PURE__ */ o(
|
|
16
16
|
"button",
|
|
17
17
|
{
|
|
18
|
-
ref:
|
|
19
|
-
className:
|
|
20
|
-
...
|
|
18
|
+
ref: s,
|
|
19
|
+
className: i(e, c({ iconType: t })),
|
|
20
|
+
...r
|
|
21
21
|
}
|
|
22
22
|
));
|
|
23
23
|
d.displayName = "InteractiveIcon";
|
|
@@ -76,7 +76,7 @@ const N = n.forwardRef(({ children: e, className: t }, s) => {
|
|
|
76
76
|
{
|
|
77
77
|
ref: s,
|
|
78
78
|
className: a(
|
|
79
|
-
"w-full items-center truncate text-muted
|
|
79
|
+
"w-full items-center truncate body-3 text-muted",
|
|
80
80
|
o ? "justify-end text-end" : "justify-start text-start",
|
|
81
81
|
r && "text-disabled",
|
|
82
82
|
t
|
|
@@ -11,14 +11,14 @@ const c = o(
|
|
|
11
11
|
"data-[state=open]:animate-fade-in",
|
|
12
12
|
"data-[state=closed]:animate-fade-out"
|
|
13
13
|
), d = o(
|
|
14
|
-
"relative flex cursor-default
|
|
15
|
-
"h-44 rounded-sm px-8 outline-
|
|
16
|
-
"
|
|
14
|
+
"relative flex cursor-default items-center gap-12 select-none",
|
|
15
|
+
"h-44 rounded-sm px-8 outline-hidden",
|
|
16
|
+
"body-2-semi-bold text-base",
|
|
17
17
|
"transition-colors",
|
|
18
18
|
"focus:bg-base-transparent-hover",
|
|
19
19
|
"active:bg-base-transparent-pressed",
|
|
20
|
-
"data-
|
|
21
|
-
), b = o("px-8 py-4
|
|
20
|
+
"data-disabled:pointer-events-none data-disabled:text-disabled"
|
|
21
|
+
), b = o("px-8 py-4 body-3-semi-bold text-muted"), N = o(
|
|
22
22
|
d,
|
|
23
23
|
"data-[state=open]:bg-base-transparent-hover"
|
|
24
24
|
);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { SearchInputProps } from './types';
|
|
3
2
|
/**
|
|
4
3
|
* A customizable search input component with built-in search icon, automatic clear button, error states, and focus/hover effects.
|
|
5
4
|
*
|
|
@@ -54,5 +53,7 @@ import { SearchInputProps } from './types';
|
|
|
54
53
|
* }}
|
|
55
54
|
* />
|
|
56
55
|
*/
|
|
57
|
-
export declare const SearchInput: React.ForwardRefExoticComponent<
|
|
56
|
+
export declare const SearchInput: React.ForwardRefExoticComponent<Omit<import('..').BaseInputProps, "label" | "prefix" | "containerClassName" | "labelClassName"> & {
|
|
57
|
+
appearance?: "plain" | "transparent";
|
|
58
|
+
} & React.RefAttributes<HTMLInputElement>>;
|
|
58
59
|
//# sourceMappingURL=SearchInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchInput.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/SearchInput/SearchInput.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SearchInput.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/SearchInput/SearchInput.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AA+B1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,eAAO,MAAM,WAAW;;0CAuBvB,CAAC"}
|
|
@@ -1,18 +1,50 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { cn as i } from "../../../libs/utils-shared/dist/index.js";
|
|
3
|
+
import { cva as t } from "class-variance-authority";
|
|
4
|
+
import o from "react";
|
|
5
|
+
import { BaseInput as d } from "../BaseInput/BaseInput.js";
|
|
6
|
+
import { Search as c } from "../../Symbols/Icons/Search.js";
|
|
7
|
+
const m = t("", {
|
|
8
|
+
variants: {
|
|
9
|
+
appearance: {
|
|
10
|
+
plain: "",
|
|
11
|
+
transparent: "bg-muted-transparent hover:bg-muted-transparent-hover has-disabled:bg-muted-transparent-disabled"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
defaultVariants: {
|
|
15
|
+
appearance: "plain"
|
|
16
|
+
}
|
|
17
|
+
}), l = t("", {
|
|
18
|
+
variants: {
|
|
19
|
+
appearance: {
|
|
20
|
+
plain: "",
|
|
21
|
+
transparent: "bg-transparent group-hover:bg-transparent-hover group-has-disabled:bg-transparent-disabled"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
defaultVariants: {
|
|
25
|
+
appearance: "plain"
|
|
26
|
+
}
|
|
27
|
+
}), u = o.forwardRef(
|
|
28
|
+
({ appearance: a = "plain", className: e, inputClassName: n, ...s }, p) => /* @__PURE__ */ r(
|
|
29
|
+
d,
|
|
8
30
|
{
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
31
|
+
ref: p,
|
|
32
|
+
prefix: /* @__PURE__ */ r(
|
|
33
|
+
c,
|
|
34
|
+
{
|
|
35
|
+
size: 20,
|
|
36
|
+
className: "text-muted group-has-disabled:text-disabled",
|
|
37
|
+
"aria-hidden": "true"
|
|
38
|
+
}
|
|
39
|
+
),
|
|
40
|
+
className: e,
|
|
41
|
+
containerClassName: m({ appearance: a }),
|
|
42
|
+
inputClassName: i(l({ appearance: a }), n),
|
|
43
|
+
...s
|
|
12
44
|
}
|
|
13
|
-
)
|
|
45
|
+
)
|
|
14
46
|
);
|
|
15
|
-
|
|
47
|
+
u.displayName = "SearchInput";
|
|
16
48
|
export {
|
|
17
|
-
|
|
49
|
+
u as SearchInput
|
|
18
50
|
};
|
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
import { BaseInputProps } from '../BaseInput/types';
|
|
2
|
-
export type SearchInputProps = Omit<BaseInputProps, 'prefix' | 'label' | 'labelClassName' | '
|
|
2
|
+
export type SearchInputProps = Omit<BaseInputProps, 'prefix' | 'label' | 'labelClassName' | 'containerClassName'> & {
|
|
3
|
+
/**
|
|
4
|
+
* The visual appearance of the search input
|
|
5
|
+
* @default 'plain'
|
|
6
|
+
*/
|
|
7
|
+
appearance?: 'plain' | 'transparent';
|
|
8
|
+
};
|
|
3
9
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/SearchInput/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,MAAM,MAAM,gBAAgB,GAAG,IAAI,CACjC,cAAc,EACd,QAAQ,GAAG,OAAO,GAAG,gBAAgB,GAAG,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/SearchInput/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,MAAM,MAAM,gBAAgB,GAAG,IAAI,CACjC,cAAc,EACd,QAAQ,GAAG,OAAO,GAAG,gBAAgB,GAAG,oBAAoB,CAC7D,GAAG;IACF;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,GAAG,aAAa,CAAC;CACtC,CAAC"}
|