@clickhouse/click-ui 0.0.181 → 0.0.182
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
|
@@ -9959,7 +9959,7 @@ const Card = ({
|
|
|
9959
9959
|
const CardPrimary = withTopBadge(Card);
|
|
9960
9960
|
const Header$2 = styled.div.withConfig({
|
|
9961
9961
|
componentId: "sc-1qnbjoa-0"
|
|
9962
|
-
})(["
|
|
9962
|
+
})(["max-width:100%;gap:inherit;"]);
|
|
9963
9963
|
const Description = styled.div.withConfig({
|
|
9964
9964
|
componentId: "sc-1qnbjoa-1"
|
|
9965
9965
|
})(["display:flex;flex-direction:column;align-self:start;gap:", ";flex:1;width:100%;"], ({
|
|
@@ -10043,12 +10043,19 @@ const CardHorizontal = ({
|
|
|
10043
10043
|
isSelected,
|
|
10044
10044
|
children,
|
|
10045
10045
|
color = "default",
|
|
10046
|
+
badgeText,
|
|
10047
|
+
badgeState,
|
|
10048
|
+
badgeIcon,
|
|
10049
|
+
badgeIconDir,
|
|
10046
10050
|
...props
|
|
10047
10051
|
}) => {
|
|
10048
10052
|
return /* @__PURE__ */ jsxs(Wrapper$7, { $disabled: disabled, $isSelected: isSelected, $color: color, tabIndex: 0, ...props, children: [
|
|
10049
10053
|
icon && /* @__PURE__ */ jsx(CardIcon$1, { name: icon, "aria-hidden": true }),
|
|
10050
10054
|
/* @__PURE__ */ jsxs(ContentWrapper, { children: [
|
|
10051
|
-
title && /* @__PURE__ */
|
|
10055
|
+
title && /* @__PURE__ */ jsxs(Header$2, { as: Container, isResponsive: false, gap: "xs", justifyContent: "space-between", fillWidth: true, children: [
|
|
10056
|
+
/* @__PURE__ */ jsx(Container, { orientation: "horizontal", gap: "xs", isResponsive: false, fillWidth: false, grow: "1", children: title }),
|
|
10057
|
+
badgeText && /* @__PURE__ */ jsx(Container, { isResponsive: false, justifyContent: "end", fillWidth: false, "data-testid": "horizontal-card-badge", children: /* @__PURE__ */ jsx(Badge, { text: badgeText, size: "md", state: badgeState, icon: badgeIcon, iconDir: badgeIconDir }) })
|
|
10058
|
+
] }),
|
|
10052
10059
|
description && /* @__PURE__ */ jsx(Description, { children: description }),
|
|
10053
10060
|
children && /* @__PURE__ */ jsx(Description, { children })
|
|
10054
10061
|
] })
|
package/dist/click-ui.umd.js
CHANGED
|
@@ -9975,7 +9975,7 @@ var __publicField = (obj, key, value) => {
|
|
|
9975
9975
|
const CardPrimary = withTopBadge(Card);
|
|
9976
9976
|
const Header$2 = styledComponents.styled.div.withConfig({
|
|
9977
9977
|
componentId: "sc-1qnbjoa-0"
|
|
9978
|
-
})(["
|
|
9978
|
+
})(["max-width:100%;gap:inherit;"]);
|
|
9979
9979
|
const Description = styledComponents.styled.div.withConfig({
|
|
9980
9980
|
componentId: "sc-1qnbjoa-1"
|
|
9981
9981
|
})(["display:flex;flex-direction:column;align-self:start;gap:", ";flex:1;width:100%;"], ({
|
|
@@ -10059,12 +10059,19 @@ var __publicField = (obj, key, value) => {
|
|
|
10059
10059
|
isSelected,
|
|
10060
10060
|
children,
|
|
10061
10061
|
color = "default",
|
|
10062
|
+
badgeText,
|
|
10063
|
+
badgeState,
|
|
10064
|
+
badgeIcon,
|
|
10065
|
+
badgeIconDir,
|
|
10062
10066
|
...props
|
|
10063
10067
|
}) => {
|
|
10064
10068
|
return /* @__PURE__ */ jsxRuntime.jsxs(Wrapper$7, { $disabled: disabled, $isSelected: isSelected, $color: color, tabIndex: 0, ...props, children: [
|
|
10065
10069
|
icon && /* @__PURE__ */ jsxRuntime.jsx(CardIcon$1, { name: icon, "aria-hidden": true }),
|
|
10066
10070
|
/* @__PURE__ */ jsxRuntime.jsxs(ContentWrapper, { children: [
|
|
10067
|
-
title && /* @__PURE__ */ jsxRuntime.
|
|
10071
|
+
title && /* @__PURE__ */ jsxRuntime.jsxs(Header$2, { as: Container, isResponsive: false, gap: "xs", justifyContent: "space-between", fillWidth: true, children: [
|
|
10072
|
+
/* @__PURE__ */ jsxRuntime.jsx(Container, { orientation: "horizontal", gap: "xs", isResponsive: false, fillWidth: false, grow: "1", children: title }),
|
|
10073
|
+
badgeText && /* @__PURE__ */ jsxRuntime.jsx(Container, { isResponsive: false, justifyContent: "end", fillWidth: false, "data-testid": "horizontal-card-badge", children: /* @__PURE__ */ jsxRuntime.jsx(Badge, { text: badgeText, size: "md", state: badgeState, icon: badgeIcon, iconDir: badgeIconDir }) })
|
|
10074
|
+
] }),
|
|
10068
10075
|
description && /* @__PURE__ */ jsxRuntime.jsx(Description, { children: description }),
|
|
10069
10076
|
children && /* @__PURE__ */ jsxRuntime.jsx(Description, { children })
|
|
10070
10077
|
] })
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
import { IconName } from '..';
|
|
2
|
+
import { BadgeState, HorizontalDirection, IconName } from '..';
|
|
3
3
|
|
|
4
4
|
type CardColor = "default" | "muted";
|
|
5
5
|
export interface CardHorizontalProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
|
|
@@ -10,6 +10,10 @@ export interface CardHorizontalProps extends Omit<HTMLAttributes<HTMLDivElement>
|
|
|
10
10
|
isSelected?: boolean;
|
|
11
11
|
children?: ReactNode;
|
|
12
12
|
color?: CardColor;
|
|
13
|
+
badgeText?: string;
|
|
14
|
+
badgeState?: BadgeState;
|
|
15
|
+
badgeIcon?: IconName;
|
|
16
|
+
badgeIconDir?: HorizontalDirection;
|
|
13
17
|
}
|
|
14
|
-
export declare const CardHorizontal: ({ title, icon, description, disabled, isSelected, children, color, ...props }: CardHorizontalProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare const CardHorizontal: ({ title, icon, description, disabled, isSelected, children, color, badgeText, badgeState, badgeIcon, badgeIconDir, ...props }: CardHorizontalProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
19
|
export {};
|