@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.
@@ -10573,9 +10573,10 @@ const BigStat = ({
10573
10573
  spacing = "sm",
10574
10574
  state = "default",
10575
10575
  title = "Title",
10576
+ error: error2 = false,
10576
10577
  ...props
10577
- }) => /* @__PURE__ */ jsxs(Wrapper$a, { $height: height, $order: order, $size: size2, $spacing: spacing, $state: state, $fillWidth: fillWidth, $maxWidth: maxWidth, ...props, children: [
10578
- /* @__PURE__ */ jsx(Label, { $state: state, $size: size2, children: label }),
10578
+ }) => /* @__PURE__ */ jsxs(Wrapper$a, { $height: height, $order: order, $size: size2, $spacing: spacing, $state: state, $fillWidth: fillWidth, $maxWidth: maxWidth, $error: error2, ...props, children: [
10579
+ /* @__PURE__ */ jsx(Label, { $state: state, $size: size2, $error: error2, children: label }),
10579
10580
  /* @__PURE__ */ jsx(Title$3, { $state: state, $size: size2, children: title })
10580
10581
  ] });
10581
10582
  const Wrapper$a = pt.div.withConfig({
@@ -10588,13 +10589,14 @@ const Wrapper$a = pt.div.withConfig({
10588
10589
  $height = "fixed",
10589
10590
  $order,
10590
10591
  $spacing = "sm",
10592
+ $error = false,
10591
10593
  theme: theme2
10592
10594
  }) => `
10593
10595
  background-color: ${theme2.click.bigStat.color.background[$state]};
10594
10596
  color: ${theme2.click.bigStat.color.label[$state]};
10595
10597
  font: ${theme2.click.bigStat.typography[$size].label[$state]};
10596
10598
  border-radius: ${theme2.click.bigStat.radii.all};
10597
- border: ${theme2.click.bigStat.stroke} solid ${theme2.click.bigStat.color.stroke[$state]};
10599
+ border: ${theme2.click.bigStat.stroke} solid ${$error ? theme2.click.bigStat.color.stroke.danger : theme2.click.bigStat.color.stroke[$state]};
10598
10600
  gap: ${theme2.click.bigStat.space[$spacing].gap};
10599
10601
  padding: ${theme2.click.bigStat.space.all};
10600
10602
  min-height: ${$height !== void 0 ? `${$height}` : "auto"};
@@ -10607,9 +10609,10 @@ const Label = pt.div.withConfig({
10607
10609
  })(["", ""], ({
10608
10610
  $state = "default",
10609
10611
  $size = "lg",
10612
+ $error = false,
10610
10613
  theme: theme2
10611
10614
  }) => `
10612
- color: ${theme2.click.bigStat.color.label[$state]};
10615
+ color: ${$error ? theme2.click.bigStat.color.label.danger : theme2.click.bigStat.color.label[$state]};
10613
10616
  font: ${theme2.click.bigStat.typography[$size].label[$state]};
10614
10617
  `);
10615
10618
  const Title$3 = pt.div.withConfig({
@@ -36388,7 +36391,11 @@ const SelectList = pt.div.withConfig({
36388
36391
  })(["display:flex;flex-direction:column;width:inherit;max-height:calc(var(--radix-popover-content-available-height) - 1rem);"]);
36389
36392
  const SelectListContent = pt.div.withConfig({
36390
36393
  componentId: "sc-oudbwg-8"
36391
- })(["width:inherit;overflow:auto;flex:1;"]);
36394
+ })(["width:inherit;overflow:auto;flex:1;", ""], ({
36395
+ $maxHeight
36396
+ }) => $maxHeight && `
36397
+ max-height: ${$maxHeight};
36398
+ `);
36392
36399
  const HiddenSelectElement = pt.select.withConfig({
36393
36400
  componentId: "sc-oudbwg-9"
36394
36401
  })(["visibility:hidden;position:absolute;z-index:-1;height:0;"]);
@@ -39826,6 +39833,7 @@ const InternalSelect = ({
39826
39833
  options,
39827
39834
  sortable = false,
39828
39835
  placeholder = "Select an option",
39836
+ maxHeight,
39829
39837
  multiple,
39830
39838
  checkbox,
39831
39839
  selectLabel,
@@ -40014,7 +40022,7 @@ const InternalSelect = ({
40014
40022
  /* @__PURE__ */ jsx(SearchBar, { ref: inputRef, value: search, onChange: (e) => onUpdateSearch(e.target.value), "data-testid": "select-search-input", onKeyDown, $showSearch: showSearch }),
40015
40023
  /* @__PURE__ */ jsx(SearchClose, { as: IconButton$1, icon: "cross", onClick: clearSearch, "data-testid": "select-search-close", $showClose: search.length > 0, size: "xs" })
40016
40024
  ] }),
40017
- /* @__PURE__ */ jsx(SelectListContent, { children: /* @__PURE__ */ jsx(OptionContext.Provider, { value: optionContextValue, children: options && options.length > 0 ? options.map((props2, index2) => {
40025
+ /* @__PURE__ */ jsx(SelectListContent, { $maxHeight: maxHeight, children: /* @__PURE__ */ jsx(OptionContext.Provider, { value: optionContextValue, children: options && options.length > 0 ? options.map((props2, index2) => {
40018
40026
  if ("options" in props2) {
40019
40027
  const {
40020
40028
  options: itemList = [],
@@ -41389,7 +41397,9 @@ const StyledHeader = pt.th.withConfig({
41389
41397
  `);
41390
41398
  const HeaderContentWrapper = pt.div.withConfig({
41391
41399
  componentId: "sc-1q458rb-1"
41392
- })(["display:flex;align-items:center;justify-content:start;gap:inherit;"]);
41400
+ })(["display:flex;align-items:center;justify-content:start;gap:inherit;", ""], ({
41401
+ $interactive
41402
+ }) => $interactive && "cursor: pointer;");
41393
41403
  const SortIcon = pt(SvgImage).withConfig({
41394
41404
  componentId: "sc-1q458rb-2"
41395
41405
  })(["transition:all 200ms;transform:rotate(", ");"], ({
@@ -41406,6 +41416,7 @@ const TableHeader = ({
41406
41416
  ...delegated
41407
41417
  }) => {
41408
41418
  const isSorted = typeof sortDir === "string";
41419
+ const isInteractive = Boolean(typeof onClick === "function" || isSortable && typeof onSort === "function");
41409
41420
  const onHeaderClick = (e) => {
41410
41421
  if (typeof onClick === "function") {
41411
41422
  onClick(e);
@@ -41414,7 +41425,7 @@ const TableHeader = ({
41414
41425
  onSort();
41415
41426
  }
41416
41427
  };
41417
- return /* @__PURE__ */ jsx(StyledHeader, { $size: size2, ...delegated, children: /* @__PURE__ */ jsxs(HeaderContentWrapper, { onClick: onHeaderClick, children: [
41428
+ return /* @__PURE__ */ jsx(StyledHeader, { $size: size2, ...delegated, children: /* @__PURE__ */ jsxs(HeaderContentWrapper, { onClick: onHeaderClick, $interactive: isInteractive, children: [
41418
41429
  isSorted && isSortable && sortPosition == "start" && /* @__PURE__ */ jsx(SortIcon, { $sortDir: sortDir, name: "arrow-down", size: "sm" }),
41419
41430
  label,
41420
41431
  isSorted && isSortable && sortPosition == "end" && /* @__PURE__ */ jsx(SortIcon, { $sortDir: sortDir, name: "arrow-down", size: "sm" })
@@ -45210,7 +45221,8 @@ const click$2 = {
45210
45221
  color: {
45211
45222
  stroke: {
45212
45223
  "default": "#323232",
45213
- muted: "#323232"
45224
+ muted: "#323232",
45225
+ danger: "#ffbaba"
45214
45226
  },
45215
45227
  background: {
45216
45228
  "default": "#1F1F1C",
@@ -45218,7 +45230,8 @@ const click$2 = {
45218
45230
  },
45219
45231
  label: {
45220
45232
  "default": "#b3b6bd",
45221
- muted: "#b3b6bd"
45233
+ muted: "#b3b6bd",
45234
+ danger: "#ffbaba"
45222
45235
  },
45223
45236
  title: {
45224
45237
  "default": "rgb(97.5% 97.5% 97.5%)",
@@ -47086,7 +47099,8 @@ const click$1 = {
47086
47099
  color: {
47087
47100
  stroke: {
47088
47101
  "default": "#e6e7e9",
47089
- muted: "#e6e7e9"
47102
+ muted: "#e6e7e9",
47103
+ danger: "#c10000"
47090
47104
  },
47091
47105
  background: {
47092
47106
  "default": "#ffffff",
@@ -47094,7 +47108,8 @@ const click$1 = {
47094
47108
  },
47095
47109
  label: {
47096
47110
  "default": "#696e79",
47097
- muted: "#696e79"
47111
+ muted: "#696e79",
47112
+ danger: "#c10000"
47098
47113
  },
47099
47114
  title: {
47100
47115
  "default": "lch(11.1 1.37 305)",
@@ -49145,7 +49160,8 @@ const click = {
49145
49160
  color: {
49146
49161
  stroke: {
49147
49162
  "default": "#e6e7e9",
49148
- muted: "#e6e7e9"
49163
+ muted: "#e6e7e9",
49164
+ danger: "#c10000"
49149
49165
  },
49150
49166
  background: {
49151
49167
  "default": "#ffffff",
@@ -49153,7 +49169,8 @@ const click = {
49153
49169
  },
49154
49170
  label: {
49155
49171
  "default": "#696e79",
49156
- muted: "#696e79"
49172
+ muted: "#696e79",
49173
+ danger: "#c10000"
49157
49174
  },
49158
49175
  title: {
49159
49176
  "default": "lch(11.1 1.37 305)",