@lazar-ui/kit 0.5.2 → 0.6.1
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/CHANGELOG.md +24 -0
- package/dist/Actions-Cii4AnwJ.mjs +12 -0
- package/dist/Actions.css +1 -0
- package/dist/ActiveFilters-BJojmc-d.mjs +29 -0
- package/dist/ActiveFilters.css +1 -0
- package/dist/Button-BN85EtaZ.mjs +52 -0
- package/dist/Button.css +1 -1
- package/dist/Cell-BPBvEyeL.mjs +21 -0
- package/dist/Cell.css +1 -0
- package/dist/Content-1kg0isb_.mjs +12 -0
- package/dist/Content.css +1 -0
- package/dist/Context-BjkJbHVo.mjs +6 -0
- package/dist/Group-DyDpeqOP.mjs +16 -0
- package/dist/Group.css +1 -0
- package/dist/Header-Clhgyr0J.mjs +29 -0
- package/dist/Header.css +1 -0
- package/dist/Heading-CL47Fqe7.mjs +30 -0
- package/dist/Heading.css +1 -0
- package/dist/InputBase-BHZWQT9-.mjs +46 -0
- package/dist/Item-CBYGbEHN.mjs +47 -0
- package/dist/Item.css +1 -0
- package/dist/Panel-B-LZtrGB.mjs +11 -0
- package/dist/Row-BfI8268z.mjs +15 -0
- package/dist/Row.css +1 -0
- package/dist/Separator-FETQ3gHZ.mjs +9 -0
- package/dist/Separator.css +1 -0
- package/dist/Tab-BfpR10OT.mjs +38 -0
- package/dist/Tab.css +1 -0
- package/dist/Text-DQPy-DZ5.mjs +46 -0
- package/dist/Text.css +1 -0
- package/dist/Title-xHMuJWGl.mjs +12 -0
- package/dist/Title.css +1 -0
- package/dist/Toolbar-BJQy4qFI.mjs +11 -0
- package/dist/Toolbar.css +1 -0
- package/dist/Trigger-C_4De6l1.mjs +11 -0
- package/dist/accordion.css +1 -1
- package/dist/accordion.js +23 -62
- package/dist/actions.d.ts +13 -0
- package/dist/actions.js +4 -0
- package/dist/active-filters.d.ts +35 -0
- package/dist/active-filters.js +4 -0
- package/dist/button.js +1 -1
- package/dist/cell.d.ts +20 -0
- package/dist/cell.js +4 -0
- package/dist/content.d.ts +8 -0
- package/dist/content.js +4 -0
- package/dist/context.d.ts +17 -0
- package/dist/context.js +5 -0
- package/dist/dialog.css +1 -1
- package/dist/dialog.js +44 -62
- package/dist/drawer.css +1 -1
- package/dist/drawer.js +72 -93
- package/dist/enums-BnuDYTua.mjs +4 -0
- package/dist/enums-DUZMBQDd.mjs +7 -0
- package/dist/enums-DfSzOa3x.mjs +4 -0
- package/dist/enums-OoI2Qgqq.mjs +14 -0
- package/dist/getDecorationStyle-BCBONKEl.mjs +7 -0
- package/dist/group.d.ts +12 -0
- package/dist/group.js +4 -0
- package/dist/header.d.ts +21 -0
- package/dist/header.js +4 -0
- package/dist/heading.d.ts +55 -0
- package/dist/heading.js +7 -0
- package/dist/input-base.d.ts +29 -0
- package/dist/input-base.js +4 -0
- package/dist/input.js +86 -124
- package/dist/item.d.ts +42 -0
- package/dist/item.js +4 -0
- package/dist/menu.css +1 -1
- package/dist/menu.js +63 -81
- package/dist/panel.d.ts +9 -0
- package/dist/panel.js +4 -0
- package/dist/row.d.ts +12 -0
- package/dist/row.js +4 -0
- package/dist/separator.d.ts +1 -21
- package/dist/separator.js +2 -22
- package/dist/tab.d.ts +30 -0
- package/dist/tab.js +4 -0
- package/dist/table.css +1 -1
- package/dist/table.js +25 -74
- package/dist/tabs.css +1 -1
- package/dist/tabs.js +34 -73
- package/dist/text.d.ts +74 -0
- package/dist/text.js +8 -0
- package/dist/title.d.ts +8 -0
- package/dist/title.js +4 -0
- package/dist/toolbar.d.ts +20 -0
- package/dist/toolbar.js +4 -0
- package/dist/trigger.d.ts +8 -0
- package/dist/trigger.js +4 -0
- package/dist/typography.d.ts +90 -40
- package/dist/typography.js +4 -38
- package/dist/utils.d.ts +20 -0
- package/dist/utils.js +9 -7
- package/package.json +1 -1
- package/dist/Button-jq8mFP6t.mjs +0 -52
- package/dist/separator.css +0 -1
- package/dist/typography.css +0 -1
- /package/dist/{input.css → InputBase.css} +0 -0
package/dist/group.d.ts
ADDED
package/dist/group.js
ADDED
package/dist/header.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { default as default_2 } from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Drawer Header sub-component.
|
|
5
|
+
*
|
|
6
|
+
* Renders the title and a close button.
|
|
7
|
+
* Must be used within a Drawer component.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* <Drawer.Header>
|
|
12
|
+
* Drawer Title
|
|
13
|
+
* </Drawer.Header>
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
export declare const Header: default_2.FC<IHeaderProps>;
|
|
17
|
+
|
|
18
|
+
export declare interface IHeaderProps extends default_2.PropsWithChildren {
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export { }
|
package/dist/header.js
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { default as default_2 } from 'react';
|
|
2
|
+
|
|
3
|
+
export declare enum EHeadingColor {
|
|
4
|
+
PRIMARY = "primary",
|
|
5
|
+
SECONDARY = "secondary",
|
|
6
|
+
TERTIARY = "tertiary",
|
|
7
|
+
DISABLED = "disabled",
|
|
8
|
+
BRAND = "brand"
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export declare enum EHeadingSize {
|
|
12
|
+
XS = "xs",
|
|
13
|
+
SM = "sm",
|
|
14
|
+
MD = "md",
|
|
15
|
+
LG = "lg"
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Heading component. Renders a semantic HTML heading (`h1`–`h6`) with preset
|
|
20
|
+
* font-size, font-weight, line-height, and optional letter-spacing.
|
|
21
|
+
*
|
|
22
|
+
* Each size maps to a predefined set of CSS tokens for consistent typography across the UI.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```tsx
|
|
26
|
+
* <Heading as="h1" size="lg">Page title</Heading>
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```tsx
|
|
31
|
+
* <Heading size="xs" color="secondary">Subtitle</Heading>
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
export declare const Heading: default_2.FC<IHeadingProps>;
|
|
35
|
+
|
|
36
|
+
export declare interface IHeadingProps extends default_2.PropsWithChildren {
|
|
37
|
+
/** HTML tag to render. Default: `h2`. */
|
|
38
|
+
as?: THeadingTag;
|
|
39
|
+
/** Heading size. Default: `sm`. */
|
|
40
|
+
size?: THeadingSize;
|
|
41
|
+
/** Text color token. */
|
|
42
|
+
color?: THeadingColor;
|
|
43
|
+
/** Truncate text with ellipsis (single-line). */
|
|
44
|
+
truncate?: boolean;
|
|
45
|
+
/** Ref to the root heading element. */
|
|
46
|
+
ref?: default_2.Ref<HTMLHeadingElement>;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export declare type THeadingColor = `${EHeadingColor}`;
|
|
50
|
+
|
|
51
|
+
export declare type THeadingSize = `${EHeadingSize}`;
|
|
52
|
+
|
|
53
|
+
export declare type THeadingTag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
54
|
+
|
|
55
|
+
export { }
|
package/dist/heading.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { H as D } from "./Heading-CL47Fqe7.mjs";
|
|
2
|
+
var t = /* @__PURE__ */ ((r) => (r.XS = "xs", r.SM = "sm", r.MD = "md", r.LG = "lg", r))(t || {}), R = /* @__PURE__ */ ((r) => (r.PRIMARY = "primary", r.SECONDARY = "secondary", r.TERTIARY = "tertiary", r.DISABLED = "disabled", r.BRAND = "brand", r))(R || {});
|
|
3
|
+
export {
|
|
4
|
+
R as EHeadingColor,
|
|
5
|
+
t as EHeadingSize,
|
|
6
|
+
D as Heading
|
|
7
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { default as default_2 } from 'react';
|
|
2
|
+
|
|
3
|
+
export declare interface IInputProps extends Omit<default_2.InputHTMLAttributes<HTMLInputElement>, 'prefix' | 'suffix' | 'size' | 'onChange' | 'onBlur' | 'onFocus'> {
|
|
4
|
+
ref?: default_2.Ref<HTMLInputElement>;
|
|
5
|
+
invalid?: boolean;
|
|
6
|
+
size?: TInputSize;
|
|
7
|
+
before?: default_2.ReactNode;
|
|
8
|
+
after?: default_2.ReactNode;
|
|
9
|
+
onChange?: (value: string) => void;
|
|
10
|
+
onBlur?: (e: default_2.FocusEvent<HTMLInputElement>) => void;
|
|
11
|
+
onFocus?: (e: default_2.FocusEvent<HTMLInputElement>) => void;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Base Input component. Renders a native `<input>` with support for `before`/`after` slots, sizing, and invalid/disabled states.
|
|
16
|
+
* All native `<input>` attributes are passed through automatically.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```tsx
|
|
20
|
+
* <Input placeholder="Enter text" />
|
|
21
|
+
* <Input size="lg" invalid placeholder="Error" />
|
|
22
|
+
* <Input before={<SearchIcon />} placeholder="Search" />
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
export declare const Input: default_2.FC<IInputProps>;
|
|
26
|
+
|
|
27
|
+
declare type TInputSize = 'sm' | 'md' | 'lg';
|
|
28
|
+
|
|
29
|
+
export { }
|
package/dist/input.js
CHANGED
|
@@ -1,59 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import { useState as
|
|
4
|
-
import { g as S } from "./getVariantClassName-DoCNtwBw.mjs";
|
|
1
|
+
import { I as f, D as m, s as S } from "./InputBase-BHZWQT9-.mjs";
|
|
2
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
3
|
+
import { useState as I, useCallback as d } from "react";
|
|
5
4
|
import { I as Y } from "./Icon-DUCBChX2.mjs";
|
|
6
|
-
import { u as
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
INPUT_NUMBER: "InputNumber",
|
|
12
|
-
INPUT_PASSWORD: "InputPassword",
|
|
13
|
-
INPUT_PHONE: "InputPhone"
|
|
14
|
-
}, E = "_root_8a405_17", U = "_invalid_8a405_36", C = "_disabled_8a405_42", B = "_sizeSm_8a405_56", L = "_sizeMd_8a405_60", k = "_sizeLg_8a405_64", x = "_control_8a405_68", O = "_before_8a405_100", $ = "_after_8a405_101", H = "_togglePassword_8a405_109", p = {
|
|
15
|
-
root: E,
|
|
16
|
-
invalid: U,
|
|
17
|
-
disabled: C,
|
|
18
|
-
sizeSm: B,
|
|
19
|
-
sizeMd: L,
|
|
20
|
-
sizeLg: k,
|
|
21
|
-
control: x,
|
|
22
|
-
before: O,
|
|
23
|
-
after: $,
|
|
24
|
-
togglePassword: H
|
|
25
|
-
}, f = (s) => {
|
|
26
|
-
const { ref: e, invalid: t = !1, size: o = "md", before: r, after: n, className: a, onChange: l, onBlur: c, onFocus: u, ...d } = s, g = z(
|
|
27
|
-
p.root,
|
|
28
|
-
S("size", o, p),
|
|
29
|
-
{
|
|
30
|
-
[p.disabled]: d.disabled === !0,
|
|
31
|
-
[p.invalid]: t
|
|
32
|
-
},
|
|
33
|
-
a
|
|
34
|
-
), I = (h) => {
|
|
35
|
-
l?.(h.target.value);
|
|
36
|
-
};
|
|
37
|
-
return /* @__PURE__ */ v("div", { className: g, children: [
|
|
38
|
-
r && /* @__PURE__ */ i("span", { className: p.before, children: r }),
|
|
39
|
-
/* @__PURE__ */ i("input", { ref: e, className: p.control, onChange: I, onBlur: c, onFocus: u, ...d }),
|
|
40
|
-
n && /* @__PURE__ */ i("span", { className: p.after, children: n })
|
|
41
|
-
] });
|
|
42
|
-
};
|
|
43
|
-
f.displayName = m.INPUT;
|
|
44
|
-
const R = 8;
|
|
45
|
-
function j(s, e) {
|
|
46
|
-
const t = s.replace(/\D/g, "").slice(0, R);
|
|
47
|
-
if (!t)
|
|
5
|
+
import { u as B } from "./useLocale-CJh-krrY.mjs";
|
|
6
|
+
const _ = 8;
|
|
7
|
+
function k(t, e) {
|
|
8
|
+
const s = t.replace(/\D/g, "").slice(0, _);
|
|
9
|
+
if (!s)
|
|
48
10
|
return "";
|
|
49
|
-
const o = e.replace(/[A-Z]/g, "").charAt(0),
|
|
11
|
+
const o = e.replace(/[A-Z]/g, "").charAt(0), a = v(e);
|
|
50
12
|
let n = "";
|
|
51
|
-
for (let
|
|
52
|
-
|
|
13
|
+
for (let r = 0; r < s.length; r++)
|
|
14
|
+
a.has(r) && (n += o), n += s[r];
|
|
53
15
|
return n;
|
|
54
16
|
}
|
|
55
|
-
function
|
|
56
|
-
switch (
|
|
17
|
+
function v(t) {
|
|
18
|
+
switch (t) {
|
|
57
19
|
case "DD/MM/YYYY":
|
|
58
20
|
case "MM/DD/YYYY":
|
|
59
21
|
case "DD.MM.YYYY":
|
|
@@ -65,147 +27,147 @@ function F(s) {
|
|
|
65
27
|
return /* @__PURE__ */ new Set([2, 4]);
|
|
66
28
|
}
|
|
67
29
|
}
|
|
68
|
-
function
|
|
69
|
-
const e =
|
|
30
|
+
function E(t) {
|
|
31
|
+
const e = t.replace(/\D/g, "").slice(0, 11);
|
|
70
32
|
if (!e)
|
|
71
33
|
return "";
|
|
72
|
-
let
|
|
73
|
-
return e.length > 1 && (
|
|
34
|
+
let s = "+7";
|
|
35
|
+
return e.length > 1 && (s += ` (${e.slice(1, 4)}`), e.length >= 4 && (s += `) ${e.slice(4, 7)}`), e.length >= 7 && (s += `-${e.slice(7, 9)}`), e.length >= 9 && (s += `-${e.slice(9, 11)}`), s;
|
|
74
36
|
}
|
|
75
|
-
const
|
|
76
|
-
function
|
|
37
|
+
const T = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
38
|
+
function C(t, e) {
|
|
77
39
|
const o = e.replace(/[A-Z]/g, "").charAt(0);
|
|
78
40
|
if (!o)
|
|
79
41
|
return !1;
|
|
80
|
-
const
|
|
81
|
-
if (
|
|
42
|
+
const a = t.split(o);
|
|
43
|
+
if (a.length !== 3)
|
|
82
44
|
return !1;
|
|
83
|
-
const [n,
|
|
84
|
-
if (!n || !
|
|
45
|
+
const [n, r, l] = a;
|
|
46
|
+
if (!n || !r || !l)
|
|
85
47
|
return !1;
|
|
86
|
-
let
|
|
48
|
+
let i = 0, c = 0, p = 0;
|
|
87
49
|
switch (e) {
|
|
88
50
|
case "DD/MM/YYYY":
|
|
89
51
|
case "DD.MM.YYYY":
|
|
90
|
-
|
|
52
|
+
i = parseInt(n, 10), c = parseInt(r, 10), p = parseInt(l, 10);
|
|
91
53
|
break;
|
|
92
54
|
case "MM/DD/YYYY":
|
|
93
55
|
case "MM.DD.YYYY":
|
|
94
|
-
|
|
56
|
+
c = parseInt(n, 10), i = parseInt(r, 10), p = parseInt(l, 10);
|
|
95
57
|
break;
|
|
96
58
|
case "YYYY-MM-DD":
|
|
97
|
-
|
|
59
|
+
i = parseInt(l, 10), c = parseInt(r, 10), p = parseInt(n, 10);
|
|
98
60
|
break;
|
|
99
61
|
default:
|
|
100
62
|
return !1;
|
|
101
63
|
}
|
|
102
|
-
if (
|
|
64
|
+
if (c < 1 || c > 12 || p < 1)
|
|
103
65
|
return !1;
|
|
104
|
-
const
|
|
105
|
-
return
|
|
66
|
+
const D = c === 2 && x(p) ? 29 : T[c] ?? 0;
|
|
67
|
+
return i >= 1 && i <= D;
|
|
106
68
|
}
|
|
107
|
-
function
|
|
108
|
-
return
|
|
69
|
+
function x(t) {
|
|
70
|
+
return t % 4 === 0 && t % 100 !== 0 || t % 400 === 0;
|
|
109
71
|
}
|
|
110
|
-
function
|
|
111
|
-
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(
|
|
72
|
+
function L(t) {
|
|
73
|
+
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t);
|
|
112
74
|
}
|
|
113
|
-
const
|
|
114
|
-
const { ref: e, format:
|
|
115
|
-
(
|
|
116
|
-
const
|
|
117
|
-
n?.(
|
|
75
|
+
const g = (t) => {
|
|
76
|
+
const { ref: e, format: s, before: o, value: a, onChange: n, onBlur: r, invalid: l, ...i } = t, [c, p] = I(!1), M = d(
|
|
77
|
+
(h) => {
|
|
78
|
+
const A = k(h, s);
|
|
79
|
+
n?.(A);
|
|
118
80
|
},
|
|
119
|
-
[
|
|
120
|
-
),
|
|
121
|
-
(
|
|
122
|
-
|
|
81
|
+
[s, n]
|
|
82
|
+
), D = d(
|
|
83
|
+
(h) => {
|
|
84
|
+
p(!0), r?.(h);
|
|
123
85
|
},
|
|
124
|
-
[
|
|
125
|
-
),
|
|
126
|
-
return /* @__PURE__ */
|
|
86
|
+
[r]
|
|
87
|
+
), P = l || c && typeof a == "string" && a.length > 0 && !C(a, s);
|
|
88
|
+
return /* @__PURE__ */ u(
|
|
127
89
|
f,
|
|
128
90
|
{
|
|
129
91
|
ref: e,
|
|
130
92
|
type: "text",
|
|
131
93
|
inputMode: "numeric",
|
|
132
|
-
before: o ?? /* @__PURE__ */
|
|
94
|
+
before: o ?? /* @__PURE__ */ u(Y, { name: "calendar", size: 16 }),
|
|
133
95
|
maxLength: 10,
|
|
134
|
-
value:
|
|
135
|
-
onChange:
|
|
136
|
-
onBlur:
|
|
137
|
-
invalid:
|
|
138
|
-
...
|
|
96
|
+
value: a,
|
|
97
|
+
onChange: M,
|
|
98
|
+
onBlur: D,
|
|
99
|
+
invalid: P,
|
|
100
|
+
...i
|
|
139
101
|
}
|
|
140
102
|
);
|
|
141
103
|
};
|
|
142
|
-
|
|
143
|
-
const b = (
|
|
144
|
-
const { ref: e, before:
|
|
145
|
-
(
|
|
146
|
-
l(!0), o?.(
|
|
104
|
+
g.displayName = m.INPUT_DATE;
|
|
105
|
+
const b = (t) => {
|
|
106
|
+
const { ref: e, before: s, onBlur: o, invalid: a, ...n } = t, [r, l] = I(!1), i = d(
|
|
107
|
+
(p) => {
|
|
108
|
+
l(!0), o?.(p);
|
|
147
109
|
},
|
|
148
110
|
[o]
|
|
149
|
-
),
|
|
150
|
-
return /* @__PURE__ */
|
|
111
|
+
), c = a || r && n.value != null && !L(n.value);
|
|
112
|
+
return /* @__PURE__ */ u(
|
|
151
113
|
f,
|
|
152
114
|
{
|
|
153
115
|
ref: e,
|
|
154
116
|
type: "email",
|
|
155
|
-
before:
|
|
156
|
-
invalid:
|
|
157
|
-
onBlur:
|
|
117
|
+
before: s ?? /* @__PURE__ */ u(Y, { name: "mail", size: 16 }),
|
|
118
|
+
invalid: c,
|
|
119
|
+
onBlur: i,
|
|
158
120
|
...n
|
|
159
121
|
}
|
|
160
122
|
);
|
|
161
123
|
};
|
|
162
124
|
b.displayName = m.INPUT_EMAIL;
|
|
163
|
-
const
|
|
164
|
-
const { ref: e, ...
|
|
165
|
-
return /* @__PURE__ */
|
|
125
|
+
const w = (t) => {
|
|
126
|
+
const { ref: e, ...s } = t;
|
|
127
|
+
return /* @__PURE__ */ u(f, { ref: e, type: "number", inputMode: "numeric", ...s });
|
|
166
128
|
};
|
|
167
|
-
|
|
168
|
-
const
|
|
169
|
-
const { ref: e, after:
|
|
170
|
-
return /* @__PURE__ */
|
|
129
|
+
w.displayName = m.INPUT_NUMBER;
|
|
130
|
+
const y = (t) => {
|
|
131
|
+
const { ref: e, after: s, ...o } = t, a = B(), [n, r] = I(!1), l = d(() => r((i) => !i), []);
|
|
132
|
+
return /* @__PURE__ */ u(
|
|
171
133
|
f,
|
|
172
134
|
{
|
|
173
135
|
ref: e,
|
|
174
136
|
type: n ? "text" : "password",
|
|
175
|
-
after:
|
|
137
|
+
after: s ?? /* @__PURE__ */ u(
|
|
176
138
|
"button",
|
|
177
139
|
{
|
|
178
140
|
type: "button",
|
|
179
|
-
className:
|
|
141
|
+
className: S.togglePassword,
|
|
180
142
|
onClick: l,
|
|
181
143
|
tabIndex: -1,
|
|
182
|
-
"aria-label": n ?
|
|
183
|
-
children: n ? /* @__PURE__ */
|
|
144
|
+
"aria-label": n ? a.Input.Password.passwordHide : a.Input.Password.passwordShow,
|
|
145
|
+
children: n ? /* @__PURE__ */ u(Y, { name: "eye-off", size: 16 }) : /* @__PURE__ */ u(Y, { name: "eye", size: 16 })
|
|
184
146
|
}
|
|
185
147
|
),
|
|
186
148
|
...o
|
|
187
149
|
}
|
|
188
150
|
);
|
|
189
151
|
};
|
|
190
|
-
|
|
191
|
-
const
|
|
192
|
-
const { ref: e, before:
|
|
193
|
-
(
|
|
194
|
-
const l =
|
|
152
|
+
y.displayName = m.INPUT_PASSWORD;
|
|
153
|
+
const N = (t) => {
|
|
154
|
+
const { ref: e, before: s, onChange: o, ...a } = t, n = d(
|
|
155
|
+
(r) => {
|
|
156
|
+
const l = E(r);
|
|
195
157
|
o?.(l);
|
|
196
158
|
},
|
|
197
159
|
[o]
|
|
198
160
|
);
|
|
199
|
-
return /* @__PURE__ */
|
|
161
|
+
return /* @__PURE__ */ u(f, { ref: e, type: "tel", before: s ?? /* @__PURE__ */ u(Y, { name: "phone", size: 16 }), onChange: n, ...a });
|
|
200
162
|
};
|
|
201
|
-
|
|
202
|
-
const
|
|
203
|
-
Date:
|
|
163
|
+
N.displayName = m.INPUT_PHONE;
|
|
164
|
+
const j = Object.assign(f, {
|
|
165
|
+
Date: g,
|
|
204
166
|
Email: b,
|
|
205
|
-
Number:
|
|
206
|
-
Password:
|
|
207
|
-
Phone:
|
|
167
|
+
Number: w,
|
|
168
|
+
Password: y,
|
|
169
|
+
Phone: N
|
|
208
170
|
});
|
|
209
171
|
export {
|
|
210
|
-
|
|
172
|
+
j as Input
|
|
211
173
|
};
|
package/dist/item.d.ts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { default as default_2 } from 'react';
|
|
2
|
+
import { IconName } from 'lucide-react/dynamic';
|
|
3
|
+
|
|
4
|
+
export declare interface IItemProps extends default_2.PropsWithChildren {
|
|
5
|
+
/** Unique value for accordion control mode. */
|
|
6
|
+
value?: string;
|
|
7
|
+
/** Icon name displayed before the title. */
|
|
8
|
+
icon?: IconName;
|
|
9
|
+
/** Controlled open state. */
|
|
10
|
+
open?: boolean;
|
|
11
|
+
/** Callback when open state changes. */
|
|
12
|
+
onOpenChange?: (isOpen: boolean) => void;
|
|
13
|
+
/** Item title text. */
|
|
14
|
+
title: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Accordion item. Must be a direct child of `<Accordion>`.
|
|
19
|
+
*
|
|
20
|
+
* Can be used standalone without a `value` prop (multi-select, each item manages
|
|
21
|
+
* its own open state independently) or with a `value` prop for single-select mode
|
|
22
|
+
* controlled by the parent Accordion via `defaultValue` or `value` + `onValueChange`.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* // Standalone without `value` (multi-select)
|
|
26
|
+
* ```tsx
|
|
27
|
+
* <Accordion.Item title="Settings" icon="settings">
|
|
28
|
+
* Settings content
|
|
29
|
+
* </Accordion.Item>
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* // With `value` for single-select
|
|
34
|
+
* ```tsx
|
|
35
|
+
* <Accordion.Item value="settings" title="Settings">
|
|
36
|
+
* Settings content
|
|
37
|
+
* </Accordion.Item>
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
export declare const Item: default_2.FC<IItemProps>;
|
|
41
|
+
|
|
42
|
+
export { }
|
package/dist/item.js
ADDED
package/dist/menu.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._root_15rud_1{align-items:center;border-radius:var(--dropdown-item-radius);cursor:pointer;display:flex;font-size:var(--dropdown-item-font-size);gap:var(--dropdown-item-gap);outline:none;padding:var(--dropdown-item-padding-y) var(--dropdown-item-padding-x);transition:background-color .1s ease;-webkit-user-select:none;user-select:none}._root_15rud_1:hover{background:var(--lui-color-background-secondary)}._root_15rud_1:focus-visible{background:var(--lui-color-background-secondary)}._root_15rud_1._disabled_15rud_19{color:var(--lui-color-text-disabled);cursor:not-allowed}._root_15rud_1._disabled_15rud_19:hover{background:transparent}._checkbox_15rud_27{align-items:center;border:1.5px solid var(--lui-color-border-primary);border-radius:var(--lui-radius-1);display:inline-flex;flex-shrink:0;height:16px;justify-content:center;transition:all .1s ease;width:16px}._checkbox_15rud_27._checked_15rud_38{background:var(--lui-color-background-brand);border-color:var(--lui-color-background-brand);color:var(--lui-color-text-on-brand)}._label_15rud_44{flex:1;overflow:hidden;text-overflow:ellipsis}:root{--dropdown-min-width: 160px;--dropdown-item-padding-x: var(--lui-space-3);--dropdown-item-padding-y: var(--lui-space-2);--dropdown-item-gap: var(--lui-space-2);--dropdown-item-radius: var(--lui-radius-1);--dropdown-item-font-size: var(--lui-font-size-sm);--dropdown-item-icon-size: 16px;--dropdown-separator-margin: var(--lui-space-1) var(--lui-space-2);--dropdown-group-label-padding: var(--lui-space-2) var(--lui-space-3);--dropdown-group-label-font-size: var(--lui-font-size-xs)}._root_1h0xj_14{min-width:var(--dropdown-min-width);padding:var(--lui-space-1)}.
|
|
1
|
+
._root_15rud_1{align-items:center;border-radius:var(--dropdown-item-radius);cursor:pointer;display:flex;font-size:var(--dropdown-item-font-size);gap:var(--dropdown-item-gap);outline:none;padding:var(--dropdown-item-padding-y) var(--dropdown-item-padding-x);transition:background-color .1s ease;-webkit-user-select:none;user-select:none}._root_15rud_1:hover{background:var(--lui-color-background-secondary)}._root_15rud_1:focus-visible{background:var(--lui-color-background-secondary)}._root_15rud_1._disabled_15rud_19{color:var(--lui-color-text-disabled);cursor:not-allowed}._root_15rud_1._disabled_15rud_19:hover{background:transparent}._checkbox_15rud_27{align-items:center;border:1.5px solid var(--lui-color-border-primary);border-radius:var(--lui-radius-1);display:inline-flex;flex-shrink:0;height:16px;justify-content:center;transition:all .1s ease;width:16px}._checkbox_15rud_27._checked_15rud_38{background:var(--lui-color-background-brand);border-color:var(--lui-color-background-brand);color:var(--lui-color-text-on-brand)}._label_15rud_44{flex:1;overflow:hidden;text-overflow:ellipsis}:root{--dropdown-min-width: 160px;--dropdown-item-padding-x: var(--lui-space-3);--dropdown-item-padding-y: var(--lui-space-2);--dropdown-item-gap: var(--lui-space-2);--dropdown-item-radius: var(--lui-radius-1);--dropdown-item-font-size: var(--lui-font-size-sm);--dropdown-item-icon-size: 16px;--dropdown-separator-margin: var(--lui-space-1) var(--lui-space-2);--dropdown-group-label-padding: var(--lui-space-2) var(--lui-space-3);--dropdown-group-label-font-size: var(--lui-font-size-xs)}._root_1h0xj_14{min-width:var(--dropdown-min-width);padding:var(--lui-space-1)}._root_5s7ps_1{align-items:center;border-radius:var(--dropdown-item-radius);cursor:pointer;display:flex;font-size:var(--dropdown-item-font-size);gap:var(--dropdown-item-gap);outline:none;padding:var(--dropdown-item-padding-y) var(--dropdown-item-padding-x);transition:background-color .1s ease;-webkit-user-select:none;user-select:none}._root_5s7ps_1:hover{background:var(--lui-color-background-secondary)}._root_5s7ps_1:focus-visible{background:var(--lui-color-background-secondary)}._root_5s7ps_1._disabled_5s7ps_19{color:var(--lui-color-text-disabled);cursor:not-allowed}._root_5s7ps_1._disabled_5s7ps_19:hover{background:transparent}._root_5s7ps_1._danger_5s7ps_26{color:var(--lui-color-background-error)}._root_5s7ps_1._danger_5s7ps_26:hover{background:color-mix(in sRGB,var(--lui-color-background-error) 8%,transparent)}._icon_5s7ps_33{align-items:center;color:var(--lui-color-text-tertiary);display:inline-flex;flex-shrink:0;height:var(--dropdown-item-icon-size);justify-content:center;width:var(--dropdown-item-icon-size)}._label_5s7ps_43{flex:1;overflow:hidden;text-overflow:ellipsis}
|