@clickhouse/click-ui 0.0.143 → 0.0.145
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
|
@@ -8932,21 +8932,26 @@ const Accordion = ({
|
|
|
8932
8932
|
children,
|
|
8933
8933
|
fillWidth = false,
|
|
8934
8934
|
...delegated
|
|
8935
|
-
}) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8935
|
+
}) => /* @__PURE__ */ jsxRuntimeExports.jsx(AccordionRoot, { type: "single", collapsible: true, $fillWidth: fillWidth, ...delegated, children: /* @__PURE__ */ jsxRuntimeExports.jsxs($1bf158f521e1b1b4$export$6d08773d2e66f8f2, { value: "item", children: [
|
|
8936
8936
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(AccordionTrigger, { $size: size2, color, $fillWidth: fillWidth, children: [
|
|
8937
8937
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(AccordionIconsWrapper, { children: [
|
|
8938
8938
|
/* @__PURE__ */ jsxRuntimeExports.jsx(AccordionIconWrapper, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(SvgImage, { name: "chevron-right", size: iconSize || size2, "aria-label": "accordion icon" }) }),
|
|
8939
8939
|
icon ? /* @__PURE__ */ jsxRuntimeExports.jsx(SvgImage, { name: icon, size: iconSize || size2 }) : null
|
|
8940
8940
|
] }),
|
|
8941
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Text, { component: "div", size: size2, children: title })
|
|
8941
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Text, { component: "div", size: size2, fillWidth, children: title })
|
|
8942
8942
|
] }),
|
|
8943
8943
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(AccordionContent, { children: [
|
|
8944
8944
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Spacer, { size: gap }),
|
|
8945
8945
|
children
|
|
8946
8946
|
] })
|
|
8947
8947
|
] }) });
|
|
8948
|
-
const
|
|
8948
|
+
const AccordionRoot = styled($1bf158f521e1b1b4$export$be92b6f5f03c0fe9).withConfig({
|
|
8949
8949
|
componentId: "sc-1ysh219-0"
|
|
8950
|
+
})(["", ";"], ({
|
|
8951
|
+
$fillWidth
|
|
8952
|
+
}) => $fillWidth && "width: 100%");
|
|
8953
|
+
const AccordionTrigger = styled($1bf158f521e1b1b4$export$41fb9f06171c75f4).withConfig({
|
|
8954
|
+
componentId: "sc-1ysh219-1"
|
|
8950
8955
|
})(["border:none;padding:0;background-color:transparent;display:flex;align-items:center;", " ", ";"], ({
|
|
8951
8956
|
theme: theme2,
|
|
8952
8957
|
$size = "md",
|
|
@@ -8970,21 +8975,21 @@ const AccordionTrigger = styled($1bf158f521e1b1b4$export$41fb9f06171c75f4).withC
|
|
|
8970
8975
|
$fillWidth
|
|
8971
8976
|
}) => $fillWidth && "width: 100%");
|
|
8972
8977
|
const AccordionIconWrapper = styled.div.withConfig({
|
|
8973
|
-
componentId: "sc-1ysh219-
|
|
8978
|
+
componentId: "sc-1ysh219-2"
|
|
8974
8979
|
})(["display:flex;align-items:center;justify-content:center;transition:transform 200ms cubic-bezier(0.87,0,0.13,1);", "[data-state='open'] &{transform:rotate(90deg);}"], AccordionTrigger);
|
|
8975
8980
|
const AccordionIconsWrapper = styled.div.withConfig({
|
|
8976
|
-
componentId: "sc-1ysh219-
|
|
8981
|
+
componentId: "sc-1ysh219-3"
|
|
8977
8982
|
})(["display:flex;align-items:center;justify-content:center;"]);
|
|
8978
8983
|
const AccordionContent = styled($1bf158f521e1b1b4$export$7c6e2c02157bb7d2).withConfig({
|
|
8979
|
-
componentId: "sc-1ysh219-
|
|
8984
|
+
componentId: "sc-1ysh219-4"
|
|
8980
8985
|
})([""]);
|
|
8981
8986
|
styled(Accordion).withConfig({
|
|
8982
|
-
componentId: "sc-1ysh219-
|
|
8987
|
+
componentId: "sc-1ysh219-5"
|
|
8983
8988
|
})(["", "{gap:", ";}p{margin:0;}", "{visibility:hidden;}&:hover ", "{visibility:revert;}&:active ", "{visibility:revert;}", "[data-state='open'] ", "{visibility:revert;}"], AccordionTrigger, ({
|
|
8984
8989
|
theme: theme2
|
|
8985
8990
|
}) => theme2.click.sidebar.navigation.item.default.space.gap, AccordionIconWrapper, AccordionIconWrapper, AccordionIconWrapper, AccordionTrigger, AccordionIconWrapper);
|
|
8986
8991
|
const AccordionToExport = styled(Accordion).withConfig({
|
|
8987
|
-
componentId: "sc-1ysh219-
|
|
8992
|
+
componentId: "sc-1ysh219-6"
|
|
8988
8993
|
})([""]);
|
|
8989
8994
|
const stateIconMap = {
|
|
8990
8995
|
neutral: "information",
|
|
@@ -10182,11 +10187,12 @@ const _Text = ({
|
|
|
10182
10187
|
className,
|
|
10183
10188
|
children,
|
|
10184
10189
|
component,
|
|
10190
|
+
fillWidth,
|
|
10185
10191
|
...props
|
|
10186
|
-
}, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(CuiText, { as: component ?? "p", ref, $align: align, $color: color, $size: size2, $weight: weight, className, ...props, children });
|
|
10192
|
+
}, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(CuiText, { as: component ?? "p", ref, $align: align, $color: color, $size: size2, $weight: weight, $fillWidth: fillWidth, className, ...props, children });
|
|
10187
10193
|
const CuiText = styled.p.withConfig({
|
|
10188
10194
|
componentId: "sc-6r74pj-0"
|
|
10189
|
-
})(["font:", ";color:", ";text-align:", ";margin:0;"], ({
|
|
10195
|
+
})(["font:", ";color:", ";text-align:", ";margin:0;", ";"], ({
|
|
10190
10196
|
$size = "md",
|
|
10191
10197
|
$weight = "normal",
|
|
10192
10198
|
theme: theme2
|
|
@@ -10195,7 +10201,9 @@ const CuiText = styled.p.withConfig({
|
|
|
10195
10201
|
theme: theme2
|
|
10196
10202
|
}) => theme2.click.global.color.text[$color], ({
|
|
10197
10203
|
$align = "left"
|
|
10198
|
-
}) => $align
|
|
10204
|
+
}) => $align, ({
|
|
10205
|
+
$fillWidth
|
|
10206
|
+
}) => $fillWidth && "width: 100%");
|
|
10199
10207
|
_Text.displayName = "Text";
|
|
10200
10208
|
const Text = forwardRef(_Text);
|
|
10201
10209
|
const Header$4 = styled.div.withConfig({
|
|
@@ -37414,7 +37422,7 @@ const NavContext = createContext({
|
|
|
37414
37422
|
});
|
|
37415
37423
|
const CollapsibleContainer = styled.div.withConfig({
|
|
37416
37424
|
componentId: "sc-guwmyz-0"
|
|
37417
|
-
})(['width:100%;[data-trigger-icon]{visibility:hidden;transition:transform 150ms cubic-bezier(0.87,0,0.13,1);&[data-open="true"]{transform:rotate(90deg);}}
|
|
37425
|
+
})(['width:100%;[data-trigger-icon]{visibility:hidden;transition:transform 150ms cubic-bezier(0.87,0,0.13,1);&[data-open="true"]{transform:rotate(90deg);}}[data-collapsible-header]:hover [data-trigger-icon]{visibility:visible;}']);
|
|
37418
37426
|
const Collapsible = ({
|
|
37419
37427
|
open: openProp,
|
|
37420
37428
|
onOpenChange: onOpenChangeProp,
|
|
@@ -37464,7 +37472,7 @@ const CollapsipleHeader = forwardRef(({
|
|
|
37464
37472
|
if (typeof onClickProp === "function") {
|
|
37465
37473
|
onClickProp(e);
|
|
37466
37474
|
}
|
|
37467
|
-
}, ...props, children: [
|
|
37475
|
+
}, "data-collapsible-header": true, ...props, children: [
|
|
37468
37476
|
indicatorDir === "start" && /* @__PURE__ */ jsxRuntimeExports.jsx(Collapsible.Trigger, {}),
|
|
37469
37477
|
children && /* @__PURE__ */ jsxRuntimeExports.jsx(IconWrapper, { icon, iconDir, children }),
|
|
37470
37478
|
indicatorDir === "end" && /* @__PURE__ */ jsxRuntimeExports.jsx(Collapsible.Trigger, {})
|
package/dist/click-ui.umd.js
CHANGED
|
@@ -8949,21 +8949,26 @@ var __publicField = (obj, key, value) => {
|
|
|
8949
8949
|
children,
|
|
8950
8950
|
fillWidth = false,
|
|
8951
8951
|
...delegated
|
|
8952
|
-
}) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8952
|
+
}) => /* @__PURE__ */ jsxRuntimeExports.jsx(AccordionRoot, { type: "single", collapsible: true, $fillWidth: fillWidth, ...delegated, children: /* @__PURE__ */ jsxRuntimeExports.jsxs($1bf158f521e1b1b4$export$6d08773d2e66f8f2, { value: "item", children: [
|
|
8953
8953
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(AccordionTrigger, { $size: size2, color, $fillWidth: fillWidth, children: [
|
|
8954
8954
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(AccordionIconsWrapper, { children: [
|
|
8955
8955
|
/* @__PURE__ */ jsxRuntimeExports.jsx(AccordionIconWrapper, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(SvgImage, { name: "chevron-right", size: iconSize || size2, "aria-label": "accordion icon" }) }),
|
|
8956
8956
|
icon ? /* @__PURE__ */ jsxRuntimeExports.jsx(SvgImage, { name: icon, size: iconSize || size2 }) : null
|
|
8957
8957
|
] }),
|
|
8958
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Text, { component: "div", size: size2, children: title })
|
|
8958
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Text, { component: "div", size: size2, fillWidth, children: title })
|
|
8959
8959
|
] }),
|
|
8960
8960
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(AccordionContent, { children: [
|
|
8961
8961
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Spacer, { size: gap }),
|
|
8962
8962
|
children
|
|
8963
8963
|
] })
|
|
8964
8964
|
] }) });
|
|
8965
|
-
const
|
|
8965
|
+
const AccordionRoot = styled($1bf158f521e1b1b4$export$be92b6f5f03c0fe9).withConfig({
|
|
8966
8966
|
componentId: "sc-1ysh219-0"
|
|
8967
|
+
})(["", ";"], ({
|
|
8968
|
+
$fillWidth
|
|
8969
|
+
}) => $fillWidth && "width: 100%");
|
|
8970
|
+
const AccordionTrigger = styled($1bf158f521e1b1b4$export$41fb9f06171c75f4).withConfig({
|
|
8971
|
+
componentId: "sc-1ysh219-1"
|
|
8967
8972
|
})(["border:none;padding:0;background-color:transparent;display:flex;align-items:center;", " ", ";"], ({
|
|
8968
8973
|
theme: theme2,
|
|
8969
8974
|
$size = "md",
|
|
@@ -8987,21 +8992,21 @@ var __publicField = (obj, key, value) => {
|
|
|
8987
8992
|
$fillWidth
|
|
8988
8993
|
}) => $fillWidth && "width: 100%");
|
|
8989
8994
|
const AccordionIconWrapper = styled.div.withConfig({
|
|
8990
|
-
componentId: "sc-1ysh219-
|
|
8995
|
+
componentId: "sc-1ysh219-2"
|
|
8991
8996
|
})(["display:flex;align-items:center;justify-content:center;transition:transform 200ms cubic-bezier(0.87,0,0.13,1);", "[data-state='open'] &{transform:rotate(90deg);}"], AccordionTrigger);
|
|
8992
8997
|
const AccordionIconsWrapper = styled.div.withConfig({
|
|
8993
|
-
componentId: "sc-1ysh219-
|
|
8998
|
+
componentId: "sc-1ysh219-3"
|
|
8994
8999
|
})(["display:flex;align-items:center;justify-content:center;"]);
|
|
8995
9000
|
const AccordionContent = styled($1bf158f521e1b1b4$export$7c6e2c02157bb7d2).withConfig({
|
|
8996
|
-
componentId: "sc-1ysh219-
|
|
9001
|
+
componentId: "sc-1ysh219-4"
|
|
8997
9002
|
})([""]);
|
|
8998
9003
|
styled(Accordion).withConfig({
|
|
8999
|
-
componentId: "sc-1ysh219-
|
|
9004
|
+
componentId: "sc-1ysh219-5"
|
|
9000
9005
|
})(["", "{gap:", ";}p{margin:0;}", "{visibility:hidden;}&:hover ", "{visibility:revert;}&:active ", "{visibility:revert;}", "[data-state='open'] ", "{visibility:revert;}"], AccordionTrigger, ({
|
|
9001
9006
|
theme: theme2
|
|
9002
9007
|
}) => theme2.click.sidebar.navigation.item.default.space.gap, AccordionIconWrapper, AccordionIconWrapper, AccordionIconWrapper, AccordionTrigger, AccordionIconWrapper);
|
|
9003
9008
|
const AccordionToExport = styled(Accordion).withConfig({
|
|
9004
|
-
componentId: "sc-1ysh219-
|
|
9009
|
+
componentId: "sc-1ysh219-6"
|
|
9005
9010
|
})([""]);
|
|
9006
9011
|
const stateIconMap = {
|
|
9007
9012
|
neutral: "information",
|
|
@@ -10199,11 +10204,12 @@ var __publicField = (obj, key, value) => {
|
|
|
10199
10204
|
className,
|
|
10200
10205
|
children,
|
|
10201
10206
|
component,
|
|
10207
|
+
fillWidth,
|
|
10202
10208
|
...props
|
|
10203
|
-
}, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(CuiText, { as: component ?? "p", ref, $align: align, $color: color, $size: size2, $weight: weight, className, ...props, children });
|
|
10209
|
+
}, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(CuiText, { as: component ?? "p", ref, $align: align, $color: color, $size: size2, $weight: weight, $fillWidth: fillWidth, className, ...props, children });
|
|
10204
10210
|
const CuiText = styled.p.withConfig({
|
|
10205
10211
|
componentId: "sc-6r74pj-0"
|
|
10206
|
-
})(["font:", ";color:", ";text-align:", ";margin:0;"], ({
|
|
10212
|
+
})(["font:", ";color:", ";text-align:", ";margin:0;", ";"], ({
|
|
10207
10213
|
$size = "md",
|
|
10208
10214
|
$weight = "normal",
|
|
10209
10215
|
theme: theme2
|
|
@@ -10212,7 +10218,9 @@ var __publicField = (obj, key, value) => {
|
|
|
10212
10218
|
theme: theme2
|
|
10213
10219
|
}) => theme2.click.global.color.text[$color], ({
|
|
10214
10220
|
$align = "left"
|
|
10215
|
-
}) => $align
|
|
10221
|
+
}) => $align, ({
|
|
10222
|
+
$fillWidth
|
|
10223
|
+
}) => $fillWidth && "width: 100%");
|
|
10216
10224
|
_Text.displayName = "Text";
|
|
10217
10225
|
const Text = React.forwardRef(_Text);
|
|
10218
10226
|
const Header$4 = styled.div.withConfig({
|
|
@@ -37431,7 +37439,7 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
|
|
|
37431
37439
|
});
|
|
37432
37440
|
const CollapsibleContainer = styled.div.withConfig({
|
|
37433
37441
|
componentId: "sc-guwmyz-0"
|
|
37434
|
-
})(['width:100%;[data-trigger-icon]{visibility:hidden;transition:transform 150ms cubic-bezier(0.87,0,0.13,1);&[data-open="true"]{transform:rotate(90deg);}}
|
|
37442
|
+
})(['width:100%;[data-trigger-icon]{visibility:hidden;transition:transform 150ms cubic-bezier(0.87,0,0.13,1);&[data-open="true"]{transform:rotate(90deg);}}[data-collapsible-header]:hover [data-trigger-icon]{visibility:visible;}']);
|
|
37435
37443
|
const Collapsible = ({
|
|
37436
37444
|
open: openProp,
|
|
37437
37445
|
onOpenChange: onOpenChangeProp,
|
|
@@ -37481,7 +37489,7 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
|
|
|
37481
37489
|
if (typeof onClickProp === "function") {
|
|
37482
37490
|
onClickProp(e);
|
|
37483
37491
|
}
|
|
37484
|
-
}, ...props, children: [
|
|
37492
|
+
}, "data-collapsible-header": true, ...props, children: [
|
|
37485
37493
|
indicatorDir === "start" && /* @__PURE__ */ jsxRuntimeExports.jsx(Collapsible.Trigger, {}),
|
|
37486
37494
|
children && /* @__PURE__ */ jsxRuntimeExports.jsx(IconWrapper, { icon, iconDir, children }),
|
|
37487
37495
|
indicatorDir === "end" && /* @__PURE__ */ jsxRuntimeExports.jsx(Collapsible.Trigger, {})
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { IconSize } from '../Icon/types';
|
|
2
2
|
import { IconName } from '..';
|
|
3
|
-
|
|
3
|
+
import { ReactNode } from 'react';
|
|
4
4
|
import * as RadixAccordion from "@radix-ui/react-accordion";
|
|
5
5
|
type Size = "sm" | "md" | "lg";
|
|
6
6
|
type Gap = "sm" | "md" | "lg";
|
|
7
7
|
type Color = "default" | "link";
|
|
8
|
-
export interface AccordionProps extends SizeProp, Omit<RadixAccordion.AccordionSingleProps, "type" | "collapsible"> {
|
|
9
|
-
title:
|
|
8
|
+
export interface AccordionProps extends SizeProp, Omit<RadixAccordion.AccordionSingleProps, "type" | "collapsible" | "title"> {
|
|
9
|
+
title: ReactNode;
|
|
10
10
|
color?: Color;
|
|
11
11
|
icon?: IconName;
|
|
12
12
|
iconSize?: IconSize;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HorizontalDirection } from '..';
|
|
2
2
|
import { HTMLAttributes, MouseEvent, ReactNode } from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { ImageName } from '../Icon/types';
|
|
4
4
|
|
|
5
5
|
export type BadgeState = "default" | "success" | "neutral" | "danger" | "disabled" | "warning" | "info";
|
|
6
6
|
export type BadgeSize = "sm" | "md";
|
|
@@ -8,7 +8,7 @@ export interface CommonBadgeProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
8
8
|
text: ReactNode;
|
|
9
9
|
state?: BadgeState;
|
|
10
10
|
size?: BadgeSize;
|
|
11
|
-
icon?:
|
|
11
|
+
icon?: ImageName;
|
|
12
12
|
iconDir?: HorizontalDirection;
|
|
13
13
|
}
|
|
14
14
|
export interface DismissibleBadge extends CommonBadgeProps {
|
|
@@ -12,6 +12,7 @@ export interface TextProps<T extends ElementType = "p"> {
|
|
|
12
12
|
weight?: TextWeight;
|
|
13
13
|
className?: string;
|
|
14
14
|
component?: T;
|
|
15
|
+
fillWidth?: boolean;
|
|
15
16
|
}
|
|
16
17
|
type TextPolymorphicComponent = <T extends ElementType = "p">(props: Omit<ComponentProps<T>, keyof T> & TextProps<T>) => ReactNode;
|
|
17
18
|
declare const Text: TextPolymorphicComponent;
|