neatkit 0.4.2 → 0.6.0
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/Alert-DQ5CCE0N.js +29 -0
- package/dist/Alert-LJDkNUqH.cjs +1 -0
- package/dist/Alert.cjs +1 -0
- package/dist/Alert.js +4 -0
- package/dist/Avatar.cjs +1 -0
- package/dist/Avatar.js +55 -0
- package/dist/Badge.cjs +1 -0
- package/dist/Badge.js +25 -0
- package/dist/Button-BAsLfA0D.js +99 -0
- package/dist/Button-D7JUO6Fs.cjs +1 -0
- package/dist/Button.cjs +1 -0
- package/dist/Button.js +5 -0
- package/dist/Card-CPq6dsut.js +34 -0
- package/dist/Card-CQ-8_1tO.cjs +1 -0
- package/dist/Card.cjs +1 -0
- package/dist/Card.js +4 -0
- package/dist/Checkbox-BvXM9VyY.js +68 -0
- package/dist/Checkbox-VQifZrZZ.cjs +1 -0
- package/dist/Checkbox.cjs +1 -0
- package/dist/Checkbox.js +5 -0
- package/dist/CheckboxGroup.cjs +1 -0
- package/dist/CheckboxGroup.js +144 -0
- package/dist/Code-BP2ZCmUf.js +7446 -0
- package/dist/Code-eispVOW3.cjs +6 -0
- package/dist/Code.cjs +1 -0
- package/dist/Code.js +5 -0
- package/dist/Content.cjs +1 -0
- package/dist/Content.js +144 -0
- package/dist/Divider-BE15WVDI.js +42 -0
- package/dist/Divider-CJYbFcSX.cjs +1 -0
- package/dist/Divider.cjs +1 -0
- package/dist/Divider.js +4 -0
- package/dist/Field.cjs +1 -0
- package/dist/Field.js +115 -0
- package/dist/Icon-D8IZceys.cjs +1 -0
- package/dist/Icon-uQmpr5P2.js +1139 -0
- package/dist/Icon.cjs +1 -0
- package/dist/Icon.js +37 -0
- package/dist/Input.cjs +1 -0
- package/dist/Input.js +146 -0
- package/dist/Markdown.cjs +31 -0
- package/dist/Markdown.js +18411 -0
- package/dist/Modal.cjs +1 -0
- package/dist/Modal.js +171 -0
- package/dist/PinInput.cjs +1 -0
- package/dist/PinInput.js +248 -0
- package/dist/Popover.cjs +1 -0
- package/dist/Popover.js +238 -0
- package/dist/Radio.cjs +1 -0
- package/dist/Radio.js +65 -0
- package/dist/RadioGroup.cjs +1 -0
- package/dist/RadioGroup.js +51 -0
- package/dist/RadioGroupContext-BX9KnDek.cjs +1 -0
- package/dist/RadioGroupContext-DbKM4zPZ.js +5 -0
- package/dist/Select.cjs +1 -0
- package/dist/Select.js +473 -0
- package/dist/Skeleton.cjs +1 -0
- package/dist/Skeleton.js +27 -0
- package/dist/Spinner-BXgw60UC.cjs +1 -0
- package/dist/Spinner-CVYvk6YK.js +25 -0
- package/dist/Spinner.cjs +1 -0
- package/dist/Spinner.js +4 -0
- package/dist/Surface-BttJYSDt.cjs +1 -0
- package/dist/Surface-vEFsZC12.js +17 -0
- package/dist/Switch.cjs +1 -0
- package/dist/Switch.js +39 -0
- package/dist/Table-83unQQOi.cjs +1 -0
- package/dist/Table-Cw8u-pEW.js +403 -0
- package/dist/Table.cjs +1 -0
- package/dist/Table.js +5 -0
- package/dist/Text-DWYlIcPj.cjs +1 -0
- package/dist/Text-rN6iDo0V.js +24 -0
- package/dist/Text.cjs +1 -0
- package/dist/Text.js +4 -0
- package/dist/TextArea.cjs +1 -0
- package/dist/TextArea.js +43 -0
- package/dist/Tooltip-BB82wNOE.cjs +1 -0
- package/dist/Tooltip-CqWK_GRD.js +236 -0
- package/dist/Tooltip.cjs +1 -0
- package/dist/Tooltip.js +6 -0
- package/dist/aria-DHnOMyYp.js +10 -0
- package/dist/aria-DKxpE8cA.cjs +1 -0
- package/dist/components/Alert/index.d.ts +1 -1
- package/dist/components/Avatar/index.d.ts +1 -1
- package/dist/components/Badge/index.d.ts +1 -1
- package/dist/components/Button/Button.d.ts +2 -2
- package/dist/components/Button/index.d.ts +1 -1
- package/dist/components/Card/index.d.ts +1 -1
- package/dist/components/Checkbox/index.d.ts +1 -1
- package/dist/components/CheckboxGroup/index.d.ts +1 -1
- package/dist/components/Code/Code.d.ts +47 -0
- package/dist/components/Code/index.d.ts +2 -0
- package/dist/components/Code/utils/highlight.d.ts +17 -0
- package/dist/components/Content/Content.d.ts +3 -3
- package/dist/components/Content/index.d.ts +2 -2
- package/dist/components/Divider/index.d.ts +1 -1
- package/dist/components/Field/index.d.ts +1 -1
- package/dist/components/Icon/index.d.ts +1 -1
- package/dist/components/Input/index.d.ts +1 -1
- package/dist/components/Markdown/Markdown.d.ts +66 -0
- package/dist/components/Markdown/index.d.ts +3 -0
- package/dist/components/Markdown/utils/language.d.ts +9 -0
- package/dist/components/Markdown/utils/renderers.d.ts +15 -0
- package/dist/components/Markdown/utils/security.d.ts +66 -0
- package/dist/components/Modal/index.d.ts +1 -1
- package/dist/components/PinInput/index.d.ts +1 -1
- package/dist/components/Popover/index.d.ts +1 -1
- package/dist/components/Radio/index.d.ts +1 -1
- package/dist/components/RadioGroup/index.d.ts +1 -1
- package/dist/components/Select/index.d.ts +1 -1
- package/dist/components/Skeleton/index.d.ts +1 -1
- package/dist/components/Spinner/index.d.ts +1 -1
- package/dist/components/Switch/index.d.ts +1 -1
- package/dist/components/Table/Table.d.ts +7 -11
- package/dist/components/Table/index.d.ts +1 -1
- package/dist/components/Text/index.d.ts +1 -1
- package/dist/components/TextArea/index.d.ts +1 -1
- package/dist/components/Tooltip/index.d.ts +1 -1
- package/dist/field-control-NfLwcPj6.cjs +1 -0
- package/dist/field-control-XAn_FKks.js +16 -0
- package/dist/focus-restoration-70WcQRr5.cjs +1 -0
- package/dist/focus-restoration-BvNZzrQA.js +16 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -26
- package/dist/index.js +6 -4409
- package/dist/reference-C2guRuR0.cjs +1 -0
- package/dist/reference-CXMr27nM.js +12 -0
- package/dist/style.css +1 -1
- package/dist/tokens.d.ts +1 -1
- package/dist/units-BmjPCccF.js +90 -0
- package/dist/units-PzuiQNnw.cjs +1 -0
- package/dist/useFloatingPosition-CxzhAvy8.js +73 -0
- package/dist/useFloatingPosition-D1FqYy0l.cjs +1 -0
- package/dist/useFocusTrap--cgjy78G.cjs +1 -0
- package/dist/useFocusTrap-Da4nEash.js +134 -0
- package/dist/usePresence-DSPt6aKi.js +210 -0
- package/dist/usePresence-qe92UTvK.cjs +1 -0
- package/package.json +155 -2
package/dist/Icon.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("./Icon-D8IZceys.cjs");exports.ArrowLeftIcon=o.ArrowLeftIcon;exports.ArrowRightIcon=o.ArrowRightIcon;exports.ArticlesIcon=o.ArticlesIcon;exports.AudioIcon=o.AudioIcon;exports.BurgerIcon=o.BurgerIcon;exports.CameraIcon=o.CameraIcon;exports.ChatIcon=o.ChatIcon;exports.CheckmarkIcon=o.CheckmarkIcon;exports.CrossIcon=o.CrossIcon;exports.DownloadIcon=o.DownloadIcon;exports.DuplicateIcon=o.DuplicateIcon;exports.ExitIcon=o.ExitIcon;exports.EyeIcon=o.EyeIcon;exports.EyeOffIcon=o.EyeOffIcon;exports.GithubIcon=o.GithubIcon;exports.GlobeIcon=o.GlobeIcon;exports.HardwareIcon=o.HardwareIcon;exports.InfoIcon=o.InfoIcon;exports.KeyIcon=o.KeyIcon;exports.LinkedInIcon=o.LinkedInIcon;exports.MailIcon=o.MailIcon;exports.MinusIcon=o.MinusIcon;exports.PencilIcon=o.PencilIcon;exports.PlusIcon=o.PlusIcon;exports.ProjectsIcon=o.ProjectsIcon;exports.QRCodeIcon=o.QRCodeIcon;exports.RedditIcon=o.RedditIcon;exports.RepositoryIcon=o.RepositoryIcon;exports.SaveIcon=o.SaveIcon;exports.SignalIcon=o.SignalIcon;exports.UserIcon=o.UserIcon;exports.WarningIcon=o.WarningIcon;exports.WindowIcon=o.WindowIcon;exports.default=o.Icon;
|
package/dist/Icon.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { A as n, a as s, b as c, c as I, B as e, C as r, d as i, e as t, f as d, D as l, g as f, E as u, h as C, i as g, G as h, j as w, H as A, I as R, K as k, L as m, M as p, k as y, P as E, l as P, m as b, Q as D, R as G, n as L, S as M, o as S, U as W, W as j, p as x, q as B } from "./Icon-uQmpr5P2.js";
|
|
2
|
+
export {
|
|
3
|
+
n as ArrowLeftIcon,
|
|
4
|
+
s as ArrowRightIcon,
|
|
5
|
+
c as ArticlesIcon,
|
|
6
|
+
I as AudioIcon,
|
|
7
|
+
e as BurgerIcon,
|
|
8
|
+
r as CameraIcon,
|
|
9
|
+
i as ChatIcon,
|
|
10
|
+
t as CheckmarkIcon,
|
|
11
|
+
d as CrossIcon,
|
|
12
|
+
l as DownloadIcon,
|
|
13
|
+
f as DuplicateIcon,
|
|
14
|
+
u as ExitIcon,
|
|
15
|
+
C as EyeIcon,
|
|
16
|
+
g as EyeOffIcon,
|
|
17
|
+
h as GithubIcon,
|
|
18
|
+
w as GlobeIcon,
|
|
19
|
+
A as HardwareIcon,
|
|
20
|
+
R as InfoIcon,
|
|
21
|
+
k as KeyIcon,
|
|
22
|
+
m as LinkedInIcon,
|
|
23
|
+
p as MailIcon,
|
|
24
|
+
y as MinusIcon,
|
|
25
|
+
E as PencilIcon,
|
|
26
|
+
P as PlusIcon,
|
|
27
|
+
b as ProjectsIcon,
|
|
28
|
+
D as QRCodeIcon,
|
|
29
|
+
G as RedditIcon,
|
|
30
|
+
L as RepositoryIcon,
|
|
31
|
+
M as SaveIcon,
|
|
32
|
+
S as SignalIcon,
|
|
33
|
+
W as UserIcon,
|
|
34
|
+
j as WarningIcon,
|
|
35
|
+
x as WindowIcon,
|
|
36
|
+
B as default
|
|
37
|
+
};
|
package/dist/Input.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),i=require("react"),N=require("./Button-D7JUO6Fs.cjs"),K=require("./Spinner-BXgw60UC.cjs"),m=require("./aria-DKxpE8cA.cjs");function v(a){return Array.isArray(a)?a.length>0:a!=null&&String(a).length>0}function Q(a,s,e){s.current=a,typeof e=="function"?e(a):e&&(e.current=a)}function A(a){return a!=null&&a!==!1&&a!==!0&&a!==""}function W(a){var e;const s=(e=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(a),"value"))==null?void 0:e.set;s?s.call(a,""):a.value=""}const X=i.forwardRef(function(s,e){const{"aria-busy":P,"aria-invalid":b,className:O,clearable:g=!1,defaultValue:h,disabled:q=!1,id:B,invalid:y=!1,leading:I,loading:l=!1,onChange:c,readOnly:p=!1,style:T,trailing:_,type:r="text",value:o,...R}=s,D=i.useId(),j=i.useRef(null),[E,H]=i.useState(v(h)),[u,k]=i.useState(!1);i.useEffect(()=>{r!=="password"&&k(!1)},[r]);const M=i.useCallback(n=>Q(n,j,e),[e]),f=B??`${D}-control`,d=q||l,U=y||m.hasInvalidState(b),z=o!==void 0?v(o):E,L=r==="password"&&u?"text":r,$=m.resolveAriaInvalid(y,b),x=g&&z&&!p&&!d,C=r==="password"&&!l,S=x||C,w=A(I),V=A(_)||S;function F(n){o===void 0&&H(v(n.currentTarget.value)),c==null||c(n)}function G(){const n=j.current;n&&(W(n),n.dispatchEvent(new Event("input",{bubbles:!0})),n.focus())}function J(){k(n=>!n)}return t.jsxs("div",{className:["nk-input",O].filter(Boolean).join(" "),"data-clearable":g||void 0,"data-disabled":d||void 0,"data-invalid":U||void 0,"data-leading":w||void 0,"data-loading":l||void 0,"data-read-only":p||void 0,"data-has-trailing-action":S||void 0,"data-trailing":V||void 0,style:T,children:[w?t.jsx("span",{className:"nk-input__leading",children:I}):null,t.jsx("input",{...R,ref:M,"aria-busy":l?!0:P,"aria-invalid":$,className:"nk-input__control",defaultValue:h,disabled:d,id:f,onChange:F,readOnly:p,type:L,value:o}),V?t.jsxs("span",{className:"nk-input__trailing",children:[_,x?t.jsx(N.Button,{"aria-controls":f,"aria-label":"Clear input",className:"nk-input__action",icon:"cross",onClick:G,shape:"rectangle",type:"button",variant:"ghost"}):null,C?t.jsx(N.Button,{"aria-controls":f,"aria-label":u?"Hide password":"Show password","aria-pressed":u,className:"nk-input__action",disabled:d,icon:u?"eye-off":"eye",onClick:J,shape:"rectangle",type:"button",variant:"ghost"}):null]}):null,l?t.jsx(K.Spinner,{"aria-hidden":"true","aria-label":void 0,className:"nk-input__spinner",role:void 0,size:14}):null]})});exports.default=X;
|
package/dist/Input.js
ADDED
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as A, jsx as l } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef as M, useId as Q, useRef as W, useState as S, useEffect as X, useCallback as Y } from "react";
|
|
4
|
+
import { B as x } from "./Button-BAsLfA0D.js";
|
|
5
|
+
import { S as Z } from "./Spinner-CVYvk6YK.js";
|
|
6
|
+
import { h as aa, r as na } from "./aria-DHnOMyYp.js";
|
|
7
|
+
function f(a) {
|
|
8
|
+
return Array.isArray(a) ? a.length > 0 : a != null && String(a).length > 0;
|
|
9
|
+
}
|
|
10
|
+
function ia(a, t, i) {
|
|
11
|
+
t.current = a, typeof i == "function" ? i(a) : i && (i.current = a);
|
|
12
|
+
}
|
|
13
|
+
function P(a) {
|
|
14
|
+
return a != null && a !== !1 && a !== !0 && a !== "";
|
|
15
|
+
}
|
|
16
|
+
function ta(a) {
|
|
17
|
+
var i;
|
|
18
|
+
const t = (i = Object.getOwnPropertyDescriptor(
|
|
19
|
+
Object.getPrototypeOf(a),
|
|
20
|
+
"value"
|
|
21
|
+
)) == null ? void 0 : i.set;
|
|
22
|
+
t ? t.call(a, "") : a.value = "";
|
|
23
|
+
}
|
|
24
|
+
const da = M(function(t, i) {
|
|
25
|
+
const {
|
|
26
|
+
"aria-busy": j,
|
|
27
|
+
"aria-invalid": v,
|
|
28
|
+
className: O,
|
|
29
|
+
clearable: b = !1,
|
|
30
|
+
defaultValue: g,
|
|
31
|
+
disabled: B = !1,
|
|
32
|
+
id: T,
|
|
33
|
+
invalid: h = !1,
|
|
34
|
+
leading: y,
|
|
35
|
+
loading: s = !1,
|
|
36
|
+
onChange: c,
|
|
37
|
+
readOnly: u = !1,
|
|
38
|
+
style: D,
|
|
39
|
+
trailing: m,
|
|
40
|
+
type: e = "text",
|
|
41
|
+
value: o,
|
|
42
|
+
...E
|
|
43
|
+
} = t, H = Q(), I = W(null), [R, U] = S(
|
|
44
|
+
f(g)
|
|
45
|
+
), [r, _] = S(!1);
|
|
46
|
+
X(() => {
|
|
47
|
+
e !== "password" && _(!1);
|
|
48
|
+
}, [e]);
|
|
49
|
+
const z = Y(
|
|
50
|
+
(n) => ia(
|
|
51
|
+
n,
|
|
52
|
+
I,
|
|
53
|
+
i
|
|
54
|
+
),
|
|
55
|
+
[i]
|
|
56
|
+
), p = T ?? `${H}-control`, d = B || s, L = h || aa(v), $ = o !== void 0 ? f(o) : R, q = e === "password" && r ? "text" : e, F = na(h, v), k = b && $ && !u && !d, C = e === "password" && !s, w = k || C, V = P(y), N = P(m) || w;
|
|
57
|
+
function G(n) {
|
|
58
|
+
o === void 0 && U(f(n.currentTarget.value)), c == null || c(n);
|
|
59
|
+
}
|
|
60
|
+
function J() {
|
|
61
|
+
const n = I.current;
|
|
62
|
+
n && (ta(n), n.dispatchEvent(new Event("input", { bubbles: !0 })), n.focus());
|
|
63
|
+
}
|
|
64
|
+
function K() {
|
|
65
|
+
_((n) => !n);
|
|
66
|
+
}
|
|
67
|
+
return /* @__PURE__ */ A(
|
|
68
|
+
"div",
|
|
69
|
+
{
|
|
70
|
+
className: ["nk-input", O].filter(Boolean).join(" "),
|
|
71
|
+
"data-clearable": b || void 0,
|
|
72
|
+
"data-disabled": d || void 0,
|
|
73
|
+
"data-invalid": L || void 0,
|
|
74
|
+
"data-leading": V || void 0,
|
|
75
|
+
"data-loading": s || void 0,
|
|
76
|
+
"data-read-only": u || void 0,
|
|
77
|
+
"data-has-trailing-action": w || void 0,
|
|
78
|
+
"data-trailing": N || void 0,
|
|
79
|
+
style: D,
|
|
80
|
+
children: [
|
|
81
|
+
V ? /* @__PURE__ */ l("span", { className: "nk-input__leading", children: y }) : null,
|
|
82
|
+
/* @__PURE__ */ l(
|
|
83
|
+
"input",
|
|
84
|
+
{
|
|
85
|
+
...E,
|
|
86
|
+
ref: z,
|
|
87
|
+
"aria-busy": s ? !0 : j,
|
|
88
|
+
"aria-invalid": F,
|
|
89
|
+
className: "nk-input__control",
|
|
90
|
+
defaultValue: g,
|
|
91
|
+
disabled: d,
|
|
92
|
+
id: p,
|
|
93
|
+
onChange: G,
|
|
94
|
+
readOnly: u,
|
|
95
|
+
type: q,
|
|
96
|
+
value: o
|
|
97
|
+
}
|
|
98
|
+
),
|
|
99
|
+
N ? /* @__PURE__ */ A("span", { className: "nk-input__trailing", children: [
|
|
100
|
+
m,
|
|
101
|
+
k ? /* @__PURE__ */ l(
|
|
102
|
+
x,
|
|
103
|
+
{
|
|
104
|
+
"aria-controls": p,
|
|
105
|
+
"aria-label": "Clear input",
|
|
106
|
+
className: "nk-input__action",
|
|
107
|
+
icon: "cross",
|
|
108
|
+
onClick: J,
|
|
109
|
+
shape: "rectangle",
|
|
110
|
+
type: "button",
|
|
111
|
+
variant: "ghost"
|
|
112
|
+
}
|
|
113
|
+
) : null,
|
|
114
|
+
C ? /* @__PURE__ */ l(
|
|
115
|
+
x,
|
|
116
|
+
{
|
|
117
|
+
"aria-controls": p,
|
|
118
|
+
"aria-label": r ? "Hide password" : "Show password",
|
|
119
|
+
"aria-pressed": r,
|
|
120
|
+
className: "nk-input__action",
|
|
121
|
+
disabled: d,
|
|
122
|
+
icon: r ? "eye-off" : "eye",
|
|
123
|
+
onClick: K,
|
|
124
|
+
shape: "rectangle",
|
|
125
|
+
type: "button",
|
|
126
|
+
variant: "ghost"
|
|
127
|
+
}
|
|
128
|
+
) : null
|
|
129
|
+
] }) : null,
|
|
130
|
+
s ? /* @__PURE__ */ l(
|
|
131
|
+
Z,
|
|
132
|
+
{
|
|
133
|
+
"aria-hidden": "true",
|
|
134
|
+
"aria-label": void 0,
|
|
135
|
+
className: "nk-input__spinner",
|
|
136
|
+
role: void 0,
|
|
137
|
+
size: 14
|
|
138
|
+
}
|
|
139
|
+
) : null
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
);
|
|
143
|
+
});
|
|
144
|
+
export {
|
|
145
|
+
da as default
|
|
146
|
+
};
|