@clickhouse/click-ui 0.0.152 → 0.0.153
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/click-ui.es.js
CHANGED
|
@@ -10097,9 +10097,11 @@ const Button = ({
|
|
|
10097
10097
|
showLabelWithLoading = false,
|
|
10098
10098
|
...delegated
|
|
10099
10099
|
}) => /* @__PURE__ */ jsxRuntimeExports.jsxs(StyledButton, { $styleType: type, $align: align, $fillWidth: fillWidth, disabled: disabled || loading, role: "button", ...delegated, children: [
|
|
10100
|
-
|
|
10101
|
-
|
|
10102
|
-
|
|
10100
|
+
!loading && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
10101
|
+
iconLeft && /* @__PURE__ */ jsxRuntimeExports.jsx(ButtonIcon, { name: iconLeft, "aria-hidden": true, size: "sm" }),
|
|
10102
|
+
label ?? children,
|
|
10103
|
+
iconRight && /* @__PURE__ */ jsxRuntimeExports.jsx(ButtonIcon, { name: iconRight, "aria-hidden": true, size: "sm" })
|
|
10104
|
+
] }),
|
|
10103
10105
|
loading && /* @__PURE__ */ jsxRuntimeExports.jsxs(LoadingIconWrapper, { "data-testid": "click-ui-loading-icon-wrapper", children: [
|
|
10104
10106
|
/* @__PURE__ */ jsxRuntimeExports.jsx(SvgImage, { name: "loading-animated", "data-testid": "click-ui-loading-icon", "aria-label": "loading" }),
|
|
10105
10107
|
showLabelWithLoading ? label ?? children : ""
|
|
@@ -10107,7 +10109,7 @@ const Button = ({
|
|
|
10107
10109
|
] });
|
|
10108
10110
|
const LoadingIconWrapper = styled.div.withConfig({
|
|
10109
10111
|
componentId: "sc-1k4tz4c-0"
|
|
10110
|
-
})(["
|
|
10112
|
+
})(["background-color:inherit;top:0;left:0;bottom:0;right:0;display:flex;align-content:center;justify-content:center;align-items:center;gap:0.5rem;"]);
|
|
10111
10113
|
const StyledButton = styled(BaseButton).withConfig({
|
|
10112
10114
|
componentId: "sc-1k4tz4c-1"
|
|
10113
10115
|
})(["width:", ";color:", ";background-color:", ";border:", " solid ", ";font:", ";position:relative;display:flex;align-items:center;justify-content:", ";white-space:nowrap;&:hover{background-color:", ";border:", " solid ", ";transition:", ";font:", ";}&:active,&:focus{background-color:", ";border:1px solid ", ";font:", ";}&:disabled,&:disabled:hover,&:disabled:active{background-color:", ";color:", ";border:", " solid ", ";font:", ";}"], ({
|
|
@@ -10248,10 +10250,12 @@ const CustomIcon = styled.img.withConfig({
|
|
|
10248
10250
|
}) => theme2.click.image.lg.size.width);
|
|
10249
10251
|
const InfoLink = styled.a.withConfig({
|
|
10250
10252
|
componentId: "sc-1drx130-4"
|
|
10251
|
-
})(["display:flex;align-items:center;color:", ";text-decoration:none;"], ({
|
|
10253
|
+
})(["display:flex;align-items:center;color:", ";gap:", ";text-decoration:none;"], ({
|
|
10254
|
+
theme: theme2
|
|
10255
|
+
}) => theme2.click.card.secondary.color.link.default, ({
|
|
10252
10256
|
theme: theme2
|
|
10253
|
-
}) => theme2.click.card.secondary.
|
|
10254
|
-
const
|
|
10257
|
+
}) => theme2.click.card.secondary.space.link.gap);
|
|
10258
|
+
const LinkIconContainer = styled(SvgImage).withConfig({
|
|
10255
10259
|
componentId: "sc-1drx130-5"
|
|
10256
10260
|
})(["color:", ";height:", ";width:", ";"], ({
|
|
10257
10261
|
theme: theme2
|
|
@@ -10263,7 +10267,7 @@ const ArrowContainer = styled(SvgImage).withConfig({
|
|
|
10263
10267
|
const LinkText = styled(Text).withConfig({
|
|
10264
10268
|
componentId: "sc-1drx130-6"
|
|
10265
10269
|
})([""]);
|
|
10266
|
-
const
|
|
10270
|
+
const LinkIcon = styled(LinkIconContainer).withConfig({
|
|
10267
10271
|
componentId: "sc-1drx130-7"
|
|
10268
10272
|
})([""]);
|
|
10269
10273
|
const Wrapper$a = styled.div.withConfig({
|
|
@@ -10283,7 +10287,7 @@ const Wrapper$a = styled.div.withConfig({
|
|
|
10283
10287
|
theme: theme2
|
|
10284
10288
|
}) => $hasShadow ? theme2.shadow[1] : "none", ({
|
|
10285
10289
|
theme: theme2
|
|
10286
|
-
}) => theme2.click.card.secondary.color.background.hover, LinkText,
|
|
10290
|
+
}) => theme2.click.card.secondary.color.background.hover, LinkText, LinkIcon, ({
|
|
10287
10291
|
theme: theme2
|
|
10288
10292
|
}) => theme2.click.card.secondary.color.link.hover, ({
|
|
10289
10293
|
theme: theme2
|
|
@@ -10294,7 +10298,7 @@ const Wrapper$a = styled.div.withConfig({
|
|
|
10294
10298
|
cursor: not-allowed;
|
|
10295
10299
|
|
|
10296
10300
|
${LinkText},
|
|
10297
|
-
${
|
|
10301
|
+
${LinkIcon} {
|
|
10298
10302
|
color: ${theme2.click.card.secondary.color.link.disabled};
|
|
10299
10303
|
}
|
|
10300
10304
|
`);
|
|
@@ -10309,6 +10313,8 @@ const CardSecondary = ({
|
|
|
10309
10313
|
description,
|
|
10310
10314
|
infoUrl,
|
|
10311
10315
|
infoText,
|
|
10316
|
+
infoIcon = "chevron-right",
|
|
10317
|
+
infoIconSize = "md",
|
|
10312
10318
|
...props
|
|
10313
10319
|
}) => {
|
|
10314
10320
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Wrapper$a, { "aria-disabled": disabled, tabIndex: 0, $hasShadow: hasShadow, ...props, children: [
|
|
@@ -10322,7 +10328,7 @@ const CardSecondary = ({
|
|
|
10322
10328
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Content$3, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { color: "muted", children: description }) }),
|
|
10323
10329
|
(infoUrl || infoText) && /* @__PURE__ */ jsxRuntimeExports.jsxs(InfoLink, { href: disabled ? void 0 : infoUrl, as: disabled || !infoUrl || infoUrl.length === 0 ? "div" : "a", children: [
|
|
10324
10330
|
/* @__PURE__ */ jsxRuntimeExports.jsx(LinkText, { children: infoText }),
|
|
10325
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10331
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(LinkIcon, { size: infoIconSize, name: infoIcon })
|
|
10326
10332
|
] })
|
|
10327
10333
|
] });
|
|
10328
10334
|
};
|
|
@@ -45600,7 +45606,10 @@ const click = {
|
|
|
45600
45606
|
secondary: {
|
|
45601
45607
|
space: {
|
|
45602
45608
|
all: "1rem",
|
|
45603
|
-
gap: "1rem"
|
|
45609
|
+
gap: "1rem",
|
|
45610
|
+
link: {
|
|
45611
|
+
gap: "0.5rem"
|
|
45612
|
+
}
|
|
45604
45613
|
},
|
|
45605
45614
|
radii: {
|
|
45606
45615
|
all: "0.25rem"
|
package/dist/click-ui.umd.js
CHANGED
|
@@ -10114,9 +10114,11 @@ var __publicField = (obj, key, value) => {
|
|
|
10114
10114
|
showLabelWithLoading = false,
|
|
10115
10115
|
...delegated
|
|
10116
10116
|
}) => /* @__PURE__ */ jsxRuntimeExports.jsxs(StyledButton, { $styleType: type, $align: align, $fillWidth: fillWidth, disabled: disabled || loading, role: "button", ...delegated, children: [
|
|
10117
|
-
|
|
10118
|
-
|
|
10119
|
-
|
|
10117
|
+
!loading && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
10118
|
+
iconLeft && /* @__PURE__ */ jsxRuntimeExports.jsx(ButtonIcon, { name: iconLeft, "aria-hidden": true, size: "sm" }),
|
|
10119
|
+
label ?? children,
|
|
10120
|
+
iconRight && /* @__PURE__ */ jsxRuntimeExports.jsx(ButtonIcon, { name: iconRight, "aria-hidden": true, size: "sm" })
|
|
10121
|
+
] }),
|
|
10120
10122
|
loading && /* @__PURE__ */ jsxRuntimeExports.jsxs(LoadingIconWrapper, { "data-testid": "click-ui-loading-icon-wrapper", children: [
|
|
10121
10123
|
/* @__PURE__ */ jsxRuntimeExports.jsx(SvgImage, { name: "loading-animated", "data-testid": "click-ui-loading-icon", "aria-label": "loading" }),
|
|
10122
10124
|
showLabelWithLoading ? label ?? children : ""
|
|
@@ -10124,7 +10126,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10124
10126
|
] });
|
|
10125
10127
|
const LoadingIconWrapper = styled.div.withConfig({
|
|
10126
10128
|
componentId: "sc-1k4tz4c-0"
|
|
10127
|
-
})(["
|
|
10129
|
+
})(["background-color:inherit;top:0;left:0;bottom:0;right:0;display:flex;align-content:center;justify-content:center;align-items:center;gap:0.5rem;"]);
|
|
10128
10130
|
const StyledButton = styled(BaseButton).withConfig({
|
|
10129
10131
|
componentId: "sc-1k4tz4c-1"
|
|
10130
10132
|
})(["width:", ";color:", ";background-color:", ";border:", " solid ", ";font:", ";position:relative;display:flex;align-items:center;justify-content:", ";white-space:nowrap;&:hover{background-color:", ";border:", " solid ", ";transition:", ";font:", ";}&:active,&:focus{background-color:", ";border:1px solid ", ";font:", ";}&:disabled,&:disabled:hover,&:disabled:active{background-color:", ";color:", ";border:", " solid ", ";font:", ";}"], ({
|
|
@@ -10265,10 +10267,12 @@ var __publicField = (obj, key, value) => {
|
|
|
10265
10267
|
}) => theme2.click.image.lg.size.width);
|
|
10266
10268
|
const InfoLink = styled.a.withConfig({
|
|
10267
10269
|
componentId: "sc-1drx130-4"
|
|
10268
|
-
})(["display:flex;align-items:center;color:", ";text-decoration:none;"], ({
|
|
10270
|
+
})(["display:flex;align-items:center;color:", ";gap:", ";text-decoration:none;"], ({
|
|
10271
|
+
theme: theme2
|
|
10272
|
+
}) => theme2.click.card.secondary.color.link.default, ({
|
|
10269
10273
|
theme: theme2
|
|
10270
|
-
}) => theme2.click.card.secondary.
|
|
10271
|
-
const
|
|
10274
|
+
}) => theme2.click.card.secondary.space.link.gap);
|
|
10275
|
+
const LinkIconContainer = styled(SvgImage).withConfig({
|
|
10272
10276
|
componentId: "sc-1drx130-5"
|
|
10273
10277
|
})(["color:", ";height:", ";width:", ";"], ({
|
|
10274
10278
|
theme: theme2
|
|
@@ -10280,7 +10284,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10280
10284
|
const LinkText = styled(Text).withConfig({
|
|
10281
10285
|
componentId: "sc-1drx130-6"
|
|
10282
10286
|
})([""]);
|
|
10283
|
-
const
|
|
10287
|
+
const LinkIcon = styled(LinkIconContainer).withConfig({
|
|
10284
10288
|
componentId: "sc-1drx130-7"
|
|
10285
10289
|
})([""]);
|
|
10286
10290
|
const Wrapper$a = styled.div.withConfig({
|
|
@@ -10300,7 +10304,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10300
10304
|
theme: theme2
|
|
10301
10305
|
}) => $hasShadow ? theme2.shadow[1] : "none", ({
|
|
10302
10306
|
theme: theme2
|
|
10303
|
-
}) => theme2.click.card.secondary.color.background.hover, LinkText,
|
|
10307
|
+
}) => theme2.click.card.secondary.color.background.hover, LinkText, LinkIcon, ({
|
|
10304
10308
|
theme: theme2
|
|
10305
10309
|
}) => theme2.click.card.secondary.color.link.hover, ({
|
|
10306
10310
|
theme: theme2
|
|
@@ -10311,7 +10315,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10311
10315
|
cursor: not-allowed;
|
|
10312
10316
|
|
|
10313
10317
|
${LinkText},
|
|
10314
|
-
${
|
|
10318
|
+
${LinkIcon} {
|
|
10315
10319
|
color: ${theme2.click.card.secondary.color.link.disabled};
|
|
10316
10320
|
}
|
|
10317
10321
|
`);
|
|
@@ -10326,6 +10330,8 @@ var __publicField = (obj, key, value) => {
|
|
|
10326
10330
|
description,
|
|
10327
10331
|
infoUrl,
|
|
10328
10332
|
infoText,
|
|
10333
|
+
infoIcon = "chevron-right",
|
|
10334
|
+
infoIconSize = "md",
|
|
10329
10335
|
...props
|
|
10330
10336
|
}) => {
|
|
10331
10337
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Wrapper$a, { "aria-disabled": disabled, tabIndex: 0, $hasShadow: hasShadow, ...props, children: [
|
|
@@ -10339,7 +10345,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10339
10345
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Content$3, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { color: "muted", children: description }) }),
|
|
10340
10346
|
(infoUrl || infoText) && /* @__PURE__ */ jsxRuntimeExports.jsxs(InfoLink, { href: disabled ? void 0 : infoUrl, as: disabled || !infoUrl || infoUrl.length === 0 ? "div" : "a", children: [
|
|
10341
10347
|
/* @__PURE__ */ jsxRuntimeExports.jsx(LinkText, { children: infoText }),
|
|
10342
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10348
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(LinkIcon, { size: infoIconSize, name: infoIcon })
|
|
10343
10349
|
] })
|
|
10344
10350
|
] });
|
|
10345
10351
|
};
|
|
@@ -45617,7 +45623,10 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
|
|
|
45617
45623
|
secondary: {
|
|
45618
45624
|
space: {
|
|
45619
45625
|
all: "1rem",
|
|
45620
|
-
gap: "1rem"
|
|
45626
|
+
gap: "1rem",
|
|
45627
|
+
link: {
|
|
45628
|
+
gap: "0.5rem"
|
|
45629
|
+
}
|
|
45621
45630
|
},
|
|
45622
45631
|
radii: {
|
|
45623
45632
|
all: "0.25rem"
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { IconName } from '..';
|
|
2
|
+
import { IconSize } from '../Icon/types';
|
|
2
3
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
3
4
|
|
|
4
5
|
export type BadgeState = "default" | "success" | "neutral" | "danger" | "disabled" | "warning" | "info";
|
|
@@ -13,5 +14,7 @@ export interface CardSecondaryProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
13
14
|
description: ReactNode;
|
|
14
15
|
infoUrl?: string;
|
|
15
16
|
infoText?: string;
|
|
17
|
+
infoIcon?: IconName;
|
|
18
|
+
infoIconSize?: IconSize;
|
|
16
19
|
}
|
|
17
|
-
export declare const CardSecondary: ({ title, icon, iconUrl, badgeState, badgeText, hasShadow, disabled, description, infoUrl, infoText, ...props }: CardSecondaryProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare const CardSecondary: ({ title, icon, iconUrl, badgeState, badgeText, hasShadow, disabled, description, infoUrl, infoText, infoIcon, infoIconSize, ...props }: CardSecondaryProps) => import("react/jsx-runtime").JSX.Element;
|
package/dist/styles/types.d.ts
CHANGED