@clickhouse/click-ui 0.0.231 → 0.0.233
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.bundled.es.js +31 -14
- package/dist/click-ui.bundled.es.js.map +1 -1
- package/dist/click-ui.bundled.umd.js +31 -14
- package/dist/click-ui.bundled.umd.js.map +1 -1
- package/dist/click-ui.es.js +31 -14
- package/dist/click-ui.es.js.map +1 -1
- package/dist/click-ui.umd.js +31 -14
- package/dist/click-ui.umd.js.map +1 -1
- package/dist/components/BigStat/BigStat.d.ts +2 -1
- package/dist/components/Select/common/InternalSelect.d.ts +1 -1
- package/dist/components/Select/common/SelectStyled.d.ts +3 -1
- package/dist/components/Select/common/types.d.ts +18 -17
- package/dist/styles/types.d.ts +2 -0
- package/dist/styles/variables.dark.json.d.ts +4 -2
- package/dist/styles/variables.json.d.ts +4 -2
- package/dist/styles/variables.light.json.d.ts +4 -2
- package/package.json +1 -1
package/dist/click-ui.es.js
CHANGED
|
@@ -9377,9 +9377,10 @@ const BigStat = ({
|
|
|
9377
9377
|
spacing = "sm",
|
|
9378
9378
|
state = "default",
|
|
9379
9379
|
title = "Title",
|
|
9380
|
+
error: error2 = false,
|
|
9380
9381
|
...props
|
|
9381
|
-
}) => /* @__PURE__ */ jsxs(Wrapper$a, { $height: height, $order: order, $size: size2, $spacing: spacing, $state: state, $fillWidth: fillWidth, $maxWidth: maxWidth, ...props, children: [
|
|
9382
|
-
/* @__PURE__ */ jsx(Label, { $state: state, $size: size2, children: label }),
|
|
9382
|
+
}) => /* @__PURE__ */ jsxs(Wrapper$a, { $height: height, $order: order, $size: size2, $spacing: spacing, $state: state, $fillWidth: fillWidth, $maxWidth: maxWidth, $error: error2, ...props, children: [
|
|
9383
|
+
/* @__PURE__ */ jsx(Label, { $state: state, $size: size2, $error: error2, children: label }),
|
|
9383
9384
|
/* @__PURE__ */ jsx(Title$3, { $state: state, $size: size2, children: title })
|
|
9384
9385
|
] });
|
|
9385
9386
|
const Wrapper$a = styled.div.withConfig({
|
|
@@ -9392,13 +9393,14 @@ const Wrapper$a = styled.div.withConfig({
|
|
|
9392
9393
|
$height = "fixed",
|
|
9393
9394
|
$order,
|
|
9394
9395
|
$spacing = "sm",
|
|
9396
|
+
$error = false,
|
|
9395
9397
|
theme: theme2
|
|
9396
9398
|
}) => `
|
|
9397
9399
|
background-color: ${theme2.click.bigStat.color.background[$state]};
|
|
9398
9400
|
color: ${theme2.click.bigStat.color.label[$state]};
|
|
9399
9401
|
font: ${theme2.click.bigStat.typography[$size].label[$state]};
|
|
9400
9402
|
border-radius: ${theme2.click.bigStat.radii.all};
|
|
9401
|
-
border: ${theme2.click.bigStat.stroke} solid ${theme2.click.bigStat.color.stroke[$state]};
|
|
9403
|
+
border: ${theme2.click.bigStat.stroke} solid ${$error ? theme2.click.bigStat.color.stroke.danger : theme2.click.bigStat.color.stroke[$state]};
|
|
9402
9404
|
gap: ${theme2.click.bigStat.space[$spacing].gap};
|
|
9403
9405
|
padding: ${theme2.click.bigStat.space.all};
|
|
9404
9406
|
min-height: ${$height !== void 0 ? `${$height}` : "auto"};
|
|
@@ -9411,9 +9413,10 @@ const Label = styled.div.withConfig({
|
|
|
9411
9413
|
})(["", ""], ({
|
|
9412
9414
|
$state = "default",
|
|
9413
9415
|
$size = "lg",
|
|
9416
|
+
$error = false,
|
|
9414
9417
|
theme: theme2
|
|
9415
9418
|
}) => `
|
|
9416
|
-
color: ${theme2.click.bigStat.color.label[$state]};
|
|
9419
|
+
color: ${$error ? theme2.click.bigStat.color.label.danger : theme2.click.bigStat.color.label[$state]};
|
|
9417
9420
|
font: ${theme2.click.bigStat.typography[$size].label[$state]};
|
|
9418
9421
|
`);
|
|
9419
9422
|
const Title$3 = styled.div.withConfig({
|
|
@@ -35220,7 +35223,11 @@ const SelectList = styled.div.withConfig({
|
|
|
35220
35223
|
})(["display:flex;flex-direction:column;width:inherit;max-height:calc(var(--radix-popover-content-available-height) - 1rem);"]);
|
|
35221
35224
|
const SelectListContent = styled.div.withConfig({
|
|
35222
35225
|
componentId: "sc-oudbwg-8"
|
|
35223
|
-
})(["width:inherit;overflow:auto;flex:1;"]
|
|
35226
|
+
})(["width:inherit;overflow:auto;flex:1;", ""], ({
|
|
35227
|
+
$maxHeight
|
|
35228
|
+
}) => $maxHeight && `
|
|
35229
|
+
max-height: ${$maxHeight};
|
|
35230
|
+
`);
|
|
35224
35231
|
const HiddenSelectElement = styled.select.withConfig({
|
|
35225
35232
|
componentId: "sc-oudbwg-9"
|
|
35226
35233
|
})(["visibility:hidden;position:absolute;z-index:-1;height:0;"]);
|
|
@@ -38658,6 +38665,7 @@ const InternalSelect = ({
|
|
|
38658
38665
|
options,
|
|
38659
38666
|
sortable = false,
|
|
38660
38667
|
placeholder = "Select an option",
|
|
38668
|
+
maxHeight,
|
|
38661
38669
|
multiple,
|
|
38662
38670
|
checkbox,
|
|
38663
38671
|
selectLabel,
|
|
@@ -38846,7 +38854,7 @@ const InternalSelect = ({
|
|
|
38846
38854
|
/* @__PURE__ */ jsx(SearchBar, { ref: inputRef, value: search, onChange: (e) => onUpdateSearch(e.target.value), "data-testid": "select-search-input", onKeyDown, $showSearch: showSearch }),
|
|
38847
38855
|
/* @__PURE__ */ jsx(SearchClose, { as: IconButton$1, icon: "cross", onClick: clearSearch, "data-testid": "select-search-close", $showClose: search.length > 0, size: "xs" })
|
|
38848
38856
|
] }),
|
|
38849
|
-
/* @__PURE__ */ jsx(SelectListContent, { children: /* @__PURE__ */ jsx(OptionContext.Provider, { value: optionContextValue, children: options && options.length > 0 ? options.map((props2, index2) => {
|
|
38857
|
+
/* @__PURE__ */ jsx(SelectListContent, { $maxHeight: maxHeight, children: /* @__PURE__ */ jsx(OptionContext.Provider, { value: optionContextValue, children: options && options.length > 0 ? options.map((props2, index2) => {
|
|
38850
38858
|
if ("options" in props2) {
|
|
38851
38859
|
const {
|
|
38852
38860
|
options: itemList = [],
|
|
@@ -40221,7 +40229,9 @@ const StyledHeader = styled.th.withConfig({
|
|
|
40221
40229
|
`);
|
|
40222
40230
|
const HeaderContentWrapper = styled.div.withConfig({
|
|
40223
40231
|
componentId: "sc-1q458rb-1"
|
|
40224
|
-
})(["display:flex;align-items:center;justify-content:start;gap:inherit;"]
|
|
40232
|
+
})(["display:flex;align-items:center;justify-content:start;gap:inherit;", ""], ({
|
|
40233
|
+
$interactive
|
|
40234
|
+
}) => $interactive && "cursor: pointer;");
|
|
40225
40235
|
const SortIcon = styled(SvgImage).withConfig({
|
|
40226
40236
|
componentId: "sc-1q458rb-2"
|
|
40227
40237
|
})(["transition:all 200ms;transform:rotate(", ");"], ({
|
|
@@ -40238,6 +40248,7 @@ const TableHeader = ({
|
|
|
40238
40248
|
...delegated
|
|
40239
40249
|
}) => {
|
|
40240
40250
|
const isSorted = typeof sortDir === "string";
|
|
40251
|
+
const isInteractive = Boolean(typeof onClick === "function" || isSortable && typeof onSort === "function");
|
|
40241
40252
|
const onHeaderClick = (e) => {
|
|
40242
40253
|
if (typeof onClick === "function") {
|
|
40243
40254
|
onClick(e);
|
|
@@ -40246,7 +40257,7 @@ const TableHeader = ({
|
|
|
40246
40257
|
onSort();
|
|
40247
40258
|
}
|
|
40248
40259
|
};
|
|
40249
|
-
return /* @__PURE__ */ jsx(StyledHeader, { $size: size2, ...delegated, children: /* @__PURE__ */ jsxs(HeaderContentWrapper, { onClick: onHeaderClick, children: [
|
|
40260
|
+
return /* @__PURE__ */ jsx(StyledHeader, { $size: size2, ...delegated, children: /* @__PURE__ */ jsxs(HeaderContentWrapper, { onClick: onHeaderClick, $interactive: isInteractive, children: [
|
|
40250
40261
|
isSorted && isSortable && sortPosition == "start" && /* @__PURE__ */ jsx(SortIcon, { $sortDir: sortDir, name: "arrow-down", size: "sm" }),
|
|
40251
40262
|
label,
|
|
40252
40263
|
isSorted && isSortable && sortPosition == "end" && /* @__PURE__ */ jsx(SortIcon, { $sortDir: sortDir, name: "arrow-down", size: "sm" })
|
|
@@ -44042,7 +44053,8 @@ const click$2 = {
|
|
|
44042
44053
|
color: {
|
|
44043
44054
|
stroke: {
|
|
44044
44055
|
"default": "#323232",
|
|
44045
|
-
muted: "#323232"
|
|
44056
|
+
muted: "#323232",
|
|
44057
|
+
danger: "#ffbaba"
|
|
44046
44058
|
},
|
|
44047
44059
|
background: {
|
|
44048
44060
|
"default": "#1F1F1C",
|
|
@@ -44050,7 +44062,8 @@ const click$2 = {
|
|
|
44050
44062
|
},
|
|
44051
44063
|
label: {
|
|
44052
44064
|
"default": "#b3b6bd",
|
|
44053
|
-
muted: "#b3b6bd"
|
|
44065
|
+
muted: "#b3b6bd",
|
|
44066
|
+
danger: "#ffbaba"
|
|
44054
44067
|
},
|
|
44055
44068
|
title: {
|
|
44056
44069
|
"default": "rgb(97.5% 97.5% 97.5%)",
|
|
@@ -45918,7 +45931,8 @@ const click$1 = {
|
|
|
45918
45931
|
color: {
|
|
45919
45932
|
stroke: {
|
|
45920
45933
|
"default": "#e6e7e9",
|
|
45921
|
-
muted: "#e6e7e9"
|
|
45934
|
+
muted: "#e6e7e9",
|
|
45935
|
+
danger: "#c10000"
|
|
45922
45936
|
},
|
|
45923
45937
|
background: {
|
|
45924
45938
|
"default": "#ffffff",
|
|
@@ -45926,7 +45940,8 @@ const click$1 = {
|
|
|
45926
45940
|
},
|
|
45927
45941
|
label: {
|
|
45928
45942
|
"default": "#696e79",
|
|
45929
|
-
muted: "#696e79"
|
|
45943
|
+
muted: "#696e79",
|
|
45944
|
+
danger: "#c10000"
|
|
45930
45945
|
},
|
|
45931
45946
|
title: {
|
|
45932
45947
|
"default": "lch(11.1 1.37 305)",
|
|
@@ -47977,7 +47992,8 @@ const click = {
|
|
|
47977
47992
|
color: {
|
|
47978
47993
|
stroke: {
|
|
47979
47994
|
"default": "#e6e7e9",
|
|
47980
|
-
muted: "#e6e7e9"
|
|
47995
|
+
muted: "#e6e7e9",
|
|
47996
|
+
danger: "#c10000"
|
|
47981
47997
|
},
|
|
47982
47998
|
background: {
|
|
47983
47999
|
"default": "#ffffff",
|
|
@@ -47985,7 +48001,8 @@ const click = {
|
|
|
47985
48001
|
},
|
|
47986
48002
|
label: {
|
|
47987
48003
|
"default": "#696e79",
|
|
47988
|
-
muted: "#696e79"
|
|
48004
|
+
muted: "#696e79",
|
|
48005
|
+
danger: "#c10000"
|
|
47989
48006
|
},
|
|
47990
48007
|
title: {
|
|
47991
48008
|
"default": "lch(11.1 1.37 305)",
|