@kakadu/components 6.10.1 → 6.11.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/build/components/button.js +1 -1
- package/build/components/button.mjs +59 -59
- package/build/components/code.d.ts +8 -0
- package/build/components/code.js +6 -0
- package/build/components/code.mjs +7836 -0
- package/build/components/combobox.js +1 -1
- package/build/components/combobox.mjs +89 -78
- package/build/components/icon-button.js +1 -1
- package/build/components/icon-button.mjs +1 -1
- package/build/components/text.js +1 -1
- package/build/components/text.mjs +1 -1
- package/build/components.css +1 -1
- package/build/index.d.ts +2 -0
- package/build/index.js +1 -1
- package/build/index.mjs +242 -239
- package/package.json +3 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../jsx-runtime-CZa898vN.js"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../jsx-runtime-CZa898vN.js"),f=require("react"),a=require("@kuma-ui/core"),v=require("../theme.js"),$=require("../icons/icon.js"),F=require("./spinner.js"),O=require("./moving-gradients.js"),P=require("./moving-stars.js"),H=require("./theme-setter.js"),J=require("./click-ripples.js"),S=require("./hover-gradient.js"),K=require("./button-tooltip.js"),Q=require("./aria-text.js"),U=require("./atom.js"),X=require("./skeleton.js");function q({isLoading:t,size:r,className:s}){return e.jsxRuntimeExports.jsx("div",{className:a.cx("kakadu-components-2832510379",t&&"kakadu-components-4114685569",s),children:e.jsxRuntimeExports.jsx("div",{className:"kakadu-components-920467642",children:e.jsxRuntimeExports.jsx(F.RevealSpinner,{isVisible:t,size:r})})})}const Y=["primary","secondary","warning","danger"];function h({icon:t,variant:r="primary",className:s,...u}){return e.jsxRuntimeExports.jsx("div",{...u,className:a.cx("kakadu-components-2658660333",r==="secondary"&&"kakadu-components-3469662110",s),children:typeof t=="string"?e.jsxRuntimeExports.jsx($.default,{width:14,height:14,type:t}):t})}const g="kakadu-components-2550769169",Z="kakadu-components-1998774084",N="kakadu-components-2945752235",_="kakadu-components-1546692192",x="kakadu-components-1063233215";function L({ref:t,type:r,variant:s="primary",href:u,target:B,rel:w,disabled:T,className:D,children:n,label:I,tooltip:i,tooltipPosition:M,iconLeft:m,iconRight:l,isLoading:p,isSkeleton:c,isSkeletonAnimated:G=!0,hasMovingGradients:V=!1,movingGradientsCount:k=4,hasMovingStars:z=!1,movingStarsCount:j=10,...A}){const y=f.useId(),R=f.useRef(null),C=H.useIsDarkTheme(R),W=r??"button",b=V&&k>0,E=z&&j>0,o=u!==void 0&&!c,d=!!T||!!p||!!c;return e.jsxRuntimeExports.jsxs("div",{className:"kakadu-components-3559664923",children:[e.jsxRuntimeExports.jsxs(U.default,{...A,reference:t,as:o?"a":"button",type:o?void 0:W,href:o?u:void 0,target:o?B:void 0,rel:o?w:void 0,"aria-describedby":i?y:void 0,disabled:o?void 0:d,inert:o?d:void 0,className:a.cx(v.effectStyles,v.overlayEffectStyles,"kakadu-components-2514848457",!!m&&"kakadu-components-2735110382",!n&&"kakadu-components-3621693630",s==="secondary"&&g,s==="warning"&&N,s==="danger"&&_,c&&"kakadu-components-2662775151",D),children:[m?e.jsxRuntimeExports.jsx(h,{variant:s,icon:m,className:a.cx(x,n?"kakadu-components-136489413":void 0)}):null,n?e.jsxRuntimeExports.jsx("div",{ref:R,className:a.cx(x,"kakadu-components-2406806443"),children:n}):e.jsxRuntimeExports.jsx(Q.default,{children:I}),l?e.jsxRuntimeExports.jsx(h,{variant:s,icon:l,className:a.cx(x,n?"kakadu-components-3631501803":void 0)}):null,e.jsxRuntimeExports.jsx(q,{isLoading:p}),b||E?e.jsxRuntimeExports.jsxs("div",{className:"kakadu-components-2836016662",children:[b&&e.jsxRuntimeExports.jsx(O.default,{opacity:C?.5:.4,maximumGradientsCount:k,className:a.cx("kakadu-components-1191635212",s==="secondary"&&"kakadu-components-3653612936")}),E&&e.jsxRuntimeExports.jsx(P.default,{maximumStarsCount:j,className:"kakadu-components-2551727666"})]}):null,d?null:e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(J.default,{size:n?void 0:50}),e.jsxRuntimeExports.jsx(S.default,{size:n?void 0:50,className:s==="secondary"?S.normalBlendStyles:void 0})]}),i?e.jsxRuntimeExports.jsx(K.default,{id:y,label:i,position:M}):null]}),c?e.jsxRuntimeExports.jsx("div",{className:"kakadu-components-3422055155",children:e.jsxRuntimeExports.jsx(X.SkeletonInstance,{width:"100%",height:"100%",isAnimated:G})}):null]})}exports.ButtonLoader=q;exports.buttonDangerStyles=_;exports.buttonSecondaryStyles=g;exports.buttonSuccessStyles=Z;exports.buttonVariants=Y;exports.buttonWarningStyles=N;exports.default=L;
|
|
@@ -1,85 +1,85 @@
|
|
|
1
1
|
import { j as o } from "../jsx-runtime-z6PQ6F3d.mjs";
|
|
2
2
|
import { useId as R, useRef as z } from "react";
|
|
3
|
-
import { cx as
|
|
4
|
-
import { effectStyles as
|
|
5
|
-
import
|
|
6
|
-
import { RevealSpinner as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { useIsDarkTheme as
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import { SkeletonInstance as
|
|
16
|
-
function
|
|
3
|
+
import { cx as a } from "@kuma-ui/core";
|
|
4
|
+
import { effectStyles as E, overlayEffectStyles as V } from "../theme.mjs";
|
|
5
|
+
import F from "../icons/icon.mjs";
|
|
6
|
+
import { RevealSpinner as H } from "./spinner.mjs";
|
|
7
|
+
import W from "./moving-gradients.mjs";
|
|
8
|
+
import q from "./moving-stars.mjs";
|
|
9
|
+
import { useIsDarkTheme as J } from "./theme-setter.mjs";
|
|
10
|
+
import K from "./click-ripples.mjs";
|
|
11
|
+
import O, { normalBlendStyles as P } from "./hover-gradient.mjs";
|
|
12
|
+
import Q from "./button-tooltip.mjs";
|
|
13
|
+
import U from "./aria-text.mjs";
|
|
14
|
+
import X from "./atom.mjs";
|
|
15
|
+
import { SkeletonInstance as Y } from "./skeleton.mjs";
|
|
16
|
+
function Z({
|
|
17
17
|
isLoading: n,
|
|
18
|
-
size:
|
|
18
|
+
size: r,
|
|
19
19
|
className: s
|
|
20
20
|
}) {
|
|
21
|
-
return /* @__PURE__ */ o.jsx("div", { className:
|
|
21
|
+
return /* @__PURE__ */ o.jsx("div", { className: a("kakadu-components-2832510379", n && "kakadu-components-4114685569", s), children: /* @__PURE__ */ o.jsx("div", { className: "kakadu-components-920467642", children: /* @__PURE__ */ o.jsx(H, { isVisible: n, size: r }) }) });
|
|
22
22
|
}
|
|
23
|
-
const
|
|
24
|
-
function
|
|
23
|
+
const xo = ["primary", "secondary", "warning", "danger"];
|
|
24
|
+
function h({
|
|
25
25
|
icon: n,
|
|
26
|
-
variant:
|
|
26
|
+
variant: r = "primary",
|
|
27
27
|
className: s,
|
|
28
|
-
...
|
|
28
|
+
...m
|
|
29
29
|
}) {
|
|
30
|
-
return /* @__PURE__ */ o.jsx("div", { ...
|
|
30
|
+
return /* @__PURE__ */ o.jsx("div", { ...m, className: a("kakadu-components-2658660333", r === "secondary" && "kakadu-components-3469662110", s), children: typeof n == "string" ? /* @__PURE__ */ o.jsx(F, { width: 14, height: 14, type: n }) : n });
|
|
31
31
|
}
|
|
32
|
-
const
|
|
33
|
-
function
|
|
32
|
+
const _ = "kakadu-components-2550769169", yo = "kakadu-components-1998774084", $ = "kakadu-components-2945752235", L = "kakadu-components-1546692192", l = "kakadu-components-1063233215";
|
|
33
|
+
function jo({
|
|
34
34
|
ref: n,
|
|
35
|
-
type:
|
|
35
|
+
type: r,
|
|
36
36
|
variant: s = "primary",
|
|
37
|
-
href:
|
|
38
|
-
target:
|
|
39
|
-
rel:
|
|
37
|
+
href: m,
|
|
38
|
+
target: N,
|
|
39
|
+
rel: S,
|
|
40
40
|
disabled: g,
|
|
41
|
-
className:
|
|
41
|
+
className: B,
|
|
42
42
|
children: e,
|
|
43
|
-
label:
|
|
43
|
+
label: w,
|
|
44
44
|
tooltip: d,
|
|
45
|
-
tooltipPosition:
|
|
45
|
+
tooltipPosition: I,
|
|
46
46
|
iconLeft: i,
|
|
47
|
-
iconRight:
|
|
48
|
-
isLoading:
|
|
49
|
-
isSkeleton:
|
|
50
|
-
isSkeletonAnimated:
|
|
51
|
-
hasMovingGradients:
|
|
52
|
-
movingGradientsCount:
|
|
53
|
-
hasMovingStars:
|
|
54
|
-
movingStarsCount:
|
|
55
|
-
...
|
|
47
|
+
iconRight: p,
|
|
48
|
+
isLoading: k,
|
|
49
|
+
isSkeleton: c,
|
|
50
|
+
isSkeletonAnimated: T = !0,
|
|
51
|
+
hasMovingGradients: A = !1,
|
|
52
|
+
movingGradientsCount: f = 4,
|
|
53
|
+
hasMovingStars: D = !1,
|
|
54
|
+
movingStarsCount: x = 10,
|
|
55
|
+
...M
|
|
56
56
|
}) {
|
|
57
|
-
const
|
|
57
|
+
const y = R(), j = z(null), C = J(j), G = r ?? "button", v = A && f > 0, b = D && x > 0, t = m !== void 0 && !c, u = !!g || !!k || !!c;
|
|
58
58
|
return /* @__PURE__ */ o.jsxs("div", { className: "kakadu-components-3559664923", children: [
|
|
59
|
-
/* @__PURE__ */ o.jsxs(
|
|
60
|
-
i ? /* @__PURE__ */ o.jsx(
|
|
61
|
-
e ? /* @__PURE__ */ o.jsx("div", { ref:
|
|
62
|
-
|
|
63
|
-
/* @__PURE__ */ o.jsx(
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
59
|
+
/* @__PURE__ */ o.jsxs(X, { ...M, reference: n, as: t ? "a" : "button", type: t ? void 0 : G, href: t ? m : void 0, target: t ? N : void 0, rel: t ? S : void 0, "aria-describedby": d ? y : void 0, disabled: t ? void 0 : u, inert: t ? u : void 0, className: a(E, V, "kakadu-components-2514848457", !!i && "kakadu-components-2735110382", !e && "kakadu-components-3621693630", s === "secondary" && _, s === "warning" && $, s === "danger" && L, c && "kakadu-components-2662775151", B), children: [
|
|
60
|
+
i ? /* @__PURE__ */ o.jsx(h, { variant: s, icon: i, className: a(l, e ? "kakadu-components-136489413" : void 0) }) : null,
|
|
61
|
+
e ? /* @__PURE__ */ o.jsx("div", { ref: j, className: a(l, "kakadu-components-2406806443"), children: e }) : /* @__PURE__ */ o.jsx(U, { children: w }),
|
|
62
|
+
p ? /* @__PURE__ */ o.jsx(h, { variant: s, icon: p, className: a(l, e ? "kakadu-components-3631501803" : void 0) }) : null,
|
|
63
|
+
/* @__PURE__ */ o.jsx(Z, { isLoading: k }),
|
|
64
|
+
v || b ? /* @__PURE__ */ o.jsxs("div", { className: "kakadu-components-2836016662", children: [
|
|
65
|
+
v && /* @__PURE__ */ o.jsx(W, { opacity: C ? 0.5 : 0.4, maximumGradientsCount: f, className: a("kakadu-components-1191635212", s === "secondary" && "kakadu-components-3653612936") }),
|
|
66
|
+
b && /* @__PURE__ */ o.jsx(q, { maximumStarsCount: x, className: "kakadu-components-2551727666" })
|
|
67
67
|
] }) : null,
|
|
68
68
|
u ? null : /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
69
|
-
/* @__PURE__ */ o.jsx(
|
|
70
|
-
/* @__PURE__ */ o.jsx(
|
|
69
|
+
/* @__PURE__ */ o.jsx(K, { size: e ? void 0 : 50 }),
|
|
70
|
+
/* @__PURE__ */ o.jsx(O, { size: e ? void 0 : 50, className: s === "secondary" ? P : void 0 })
|
|
71
71
|
] }),
|
|
72
|
-
d ? /* @__PURE__ */ o.jsx(
|
|
72
|
+
d ? /* @__PURE__ */ o.jsx(Q, { id: y, label: d, position: I }) : null
|
|
73
73
|
] }),
|
|
74
|
-
|
|
74
|
+
c ? /* @__PURE__ */ o.jsx("div", { className: "kakadu-components-3422055155", children: /* @__PURE__ */ o.jsx(Y, { width: "100%", height: "100%", isAnimated: T }) }) : null
|
|
75
75
|
] });
|
|
76
76
|
}
|
|
77
77
|
export {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
78
|
+
Z as ButtonLoader,
|
|
79
|
+
L as buttonDangerStyles,
|
|
80
|
+
_ as buttonSecondaryStyles,
|
|
81
|
+
yo as buttonSuccessStyles,
|
|
82
|
+
xo as buttonVariants,
|
|
83
|
+
$ as buttonWarningStyles,
|
|
84
|
+
jo as default
|
|
85
85
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React, { type HTMLAttributes } from 'react';
|
|
2
|
+
export declare function formatCode(code: string): string;
|
|
3
|
+
export default function Code({ isBlock, children, language, className, innerClassName, ...properties }: {
|
|
4
|
+
readonly isBlock?: boolean;
|
|
5
|
+
readonly language?: string;
|
|
6
|
+
readonly children: string;
|
|
7
|
+
readonly innerClassName?: string;
|
|
8
|
+
} & Omit<HTMLAttributes<HTMLElement>, 'children'>): React.JSX.Element;
|