@clickhouse/click-ui 0.0.217 → 0.0.219

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.
@@ -10614,33 +10614,29 @@ const Title$3 = pt.div.withConfig({
10614
10614
  const ButtonGroup = ({
10615
10615
  options,
10616
10616
  selected,
10617
- fillWidth,
10617
+ fillWidth = false,
10618
10618
  onClick,
10619
- type,
10619
+ type = "default",
10620
10620
  ...props
10621
10621
  }) => {
10622
- const lastIndex = options.length - 1;
10623
- const btns = options.map(({
10622
+ const buttons = options.map(({
10624
10623
  value,
10625
10624
  label,
10626
10625
  ...props2
10627
- }, index2) => {
10628
- const position2 = index2 === 0 ? "left" : index2 === lastIndex ? "right" : "center";
10629
- return /* @__PURE__ */ jsx(Button$1, { $active: value === selected, $position: position2, $fillWidth: fillWidth, $type: type, onClick: () => onClick == null ? void 0 : onClick(value), role: "button", ...props2, children: label }, value);
10630
- });
10631
- return /* @__PURE__ */ jsx(ButtonGroupWrapper, { $fillWidth: fillWidth, $type: type, ...props, children: btns });
10626
+ }) => /* @__PURE__ */ jsx(Button$1, { $active: value === selected, $fillWidth: fillWidth, $type: type, onClick: () => onClick == null ? void 0 : onClick(value), role: "button", ...props2, children: label }, value));
10627
+ return /* @__PURE__ */ jsx(ButtonGroupWrapper, { $fillWidth: fillWidth, $type: type, ...props, children: buttons });
10632
10628
  };
10633
10629
  const ButtonGroupWrapper = pt.div.withConfig({
10634
10630
  componentId: "sc-ukgugp-0"
10635
10631
  })(["display:inline-flex;box-sizing:border-box;flex-direction:row;justify-content:center;align-items:center;padding:", ";gap:", ";border:", ";background:", ";border-radius:", ";width:", ";"], ({
10636
10632
  theme: theme2,
10637
- $type = "default"
10633
+ $type
10638
10634
  }) => `${theme2.click.button.group.space.panel[$type].x} ${theme2.click.button.group.space.panel[$type].y}`, ({
10639
10635
  theme: theme2,
10640
- $type = "default"
10636
+ $type
10641
10637
  }) => theme2.click.button.group.space.panel[$type].gap, ({
10642
10638
  theme: theme2,
10643
- $type = "default"
10639
+ $type
10644
10640
  }) => $type === "default" ? `1px solid ${theme2.click.button.group.color.panel.stroke[$type]}` : "none", ({
10645
10641
  theme: theme2
10646
10642
  }) => theme2.click.button.group.color.background.panel, ({
@@ -10661,12 +10657,12 @@ const Button$1 = pt.button.attrs((props) => ({
10661
10657
  theme: theme2
10662
10658
  }) => theme2.click.button.group.typography.label.default, ({
10663
10659
  theme: theme2,
10664
- $type = "default"
10660
+ $type
10665
10661
  }) => `${theme2.click.button.group.space.button[$type].y} ${theme2.click.button.group.space.button[$type].x}`, ({
10666
- $fillWidth = false
10662
+ $fillWidth
10667
10663
  }) => $fillWidth ? "flex: 1;" : "", ({
10668
10664
  theme: theme2,
10669
- $type = "default"
10665
+ $type
10670
10666
  }) => theme2.click.button.group.radii.button[$type].all, ({
10671
10667
  theme: theme2
10672
10668
  }) => theme2.click.button.group.color.background.hover, ({
@@ -35685,7 +35681,9 @@ const SelectValue = pt.div.withConfig({
35685
35681
  })(["text-align:left;flex:1;gap:inherit;color:inherit;font:inherit;overflow:hidden;"]);
35686
35682
  const StyledSelectTrigger = pt($cb5cc270b50c6fcd$export$41fb9f06171c75f4).withConfig({
35687
35683
  componentId: "sc-oudbwg-2"
35688
- })(["width:100%;display:flex;align-items:center;justify-content:space-between;align-items:center;cursor:pointer;span:first-of-type{max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}", " [data-hide-in-trigger]{display:none;}"], ({
35684
+ })(["width:100%;display:flex;align-items:center;justify-content:space-between;align-items:center;cursor:pointer;min-height:", ";span:first-of-type{max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}", " [data-hide-in-trigger]{display:none;}"], ({
35685
+ theme: theme2
35686
+ }) => theme2.click.genericMenu.panel.size.height, ({
35689
35687
  theme: theme2,
35690
35688
  $error
35691
35689
  }) => `
@@ -49950,6 +49948,9 @@ const click = {
49950
49948
  shadow: {
49951
49949
  "default": "0 4px 6px -1px lch(6.77 0 0 / 0.15), 0 2px 4px -1px lch(6.77 0 0 / 0.15)"
49952
49950
  },
49951
+ size: {
49952
+ height: "2rem"
49953
+ },
49953
49954
  color: {
49954
49955
  background: {
49955
49956
  "default": "#ffffff"
@@ -10630,33 +10630,29 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
10630
10630
  const ButtonGroup = ({
10631
10631
  options: options2,
10632
10632
  selected,
10633
- fillWidth,
10633
+ fillWidth = false,
10634
10634
  onClick,
10635
- type,
10635
+ type = "default",
10636
10636
  ...props
10637
10637
  }) => {
10638
- const lastIndex = options2.length - 1;
10639
- const btns = options2.map(({
10638
+ const buttons = options2.map(({
10640
10639
  value,
10641
10640
  label,
10642
10641
  ...props2
10643
- }, index2) => {
10644
- const position2 = index2 === 0 ? "left" : index2 === lastIndex ? "right" : "center";
10645
- return /* @__PURE__ */ jsxRuntime.jsx(Button$1, { $active: value === selected, $position: position2, $fillWidth: fillWidth, $type: type, onClick: () => onClick == null ? void 0 : onClick(value), role: "button", ...props2, children: label }, value);
10646
- });
10647
- return /* @__PURE__ */ jsxRuntime.jsx(ButtonGroupWrapper, { $fillWidth: fillWidth, $type: type, ...props, children: btns });
10642
+ }) => /* @__PURE__ */ jsxRuntime.jsx(Button$1, { $active: value === selected, $fillWidth: fillWidth, $type: type, onClick: () => onClick == null ? void 0 : onClick(value), role: "button", ...props2, children: label }, value));
10643
+ return /* @__PURE__ */ jsxRuntime.jsx(ButtonGroupWrapper, { $fillWidth: fillWidth, $type: type, ...props, children: buttons });
10648
10644
  };
10649
10645
  const ButtonGroupWrapper = pt.div.withConfig({
10650
10646
  componentId: "sc-ukgugp-0"
10651
10647
  })(["display:inline-flex;box-sizing:border-box;flex-direction:row;justify-content:center;align-items:center;padding:", ";gap:", ";border:", ";background:", ";border-radius:", ";width:", ";"], ({
10652
10648
  theme: theme2,
10653
- $type = "default"
10649
+ $type
10654
10650
  }) => `${theme2.click.button.group.space.panel[$type].x} ${theme2.click.button.group.space.panel[$type].y}`, ({
10655
10651
  theme: theme2,
10656
- $type = "default"
10652
+ $type
10657
10653
  }) => theme2.click.button.group.space.panel[$type].gap, ({
10658
10654
  theme: theme2,
10659
- $type = "default"
10655
+ $type
10660
10656
  }) => $type === "default" ? `1px solid ${theme2.click.button.group.color.panel.stroke[$type]}` : "none", ({
10661
10657
  theme: theme2
10662
10658
  }) => theme2.click.button.group.color.background.panel, ({
@@ -10677,12 +10673,12 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
10677
10673
  theme: theme2
10678
10674
  }) => theme2.click.button.group.typography.label.default, ({
10679
10675
  theme: theme2,
10680
- $type = "default"
10676
+ $type
10681
10677
  }) => `${theme2.click.button.group.space.button[$type].y} ${theme2.click.button.group.space.button[$type].x}`, ({
10682
- $fillWidth = false
10678
+ $fillWidth
10683
10679
  }) => $fillWidth ? "flex: 1;" : "", ({
10684
10680
  theme: theme2,
10685
- $type = "default"
10681
+ $type
10686
10682
  }) => theme2.click.button.group.radii.button[$type].all, ({
10687
10683
  theme: theme2
10688
10684
  }) => theme2.click.button.group.color.background.hover, ({
@@ -35701,7 +35697,9 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
35701
35697
  })(["text-align:left;flex:1;gap:inherit;color:inherit;font:inherit;overflow:hidden;"]);
35702
35698
  const StyledSelectTrigger = pt($cb5cc270b50c6fcd$export$41fb9f06171c75f4).withConfig({
35703
35699
  componentId: "sc-oudbwg-2"
35704
- })(["width:100%;display:flex;align-items:center;justify-content:space-between;align-items:center;cursor:pointer;span:first-of-type{max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}", " [data-hide-in-trigger]{display:none;}"], ({
35700
+ })(["width:100%;display:flex;align-items:center;justify-content:space-between;align-items:center;cursor:pointer;min-height:", ";span:first-of-type{max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}", " [data-hide-in-trigger]{display:none;}"], ({
35701
+ theme: theme2
35702
+ }) => theme2.click.genericMenu.panel.size.height, ({
35705
35703
  theme: theme2,
35706
35704
  $error
35707
35705
  }) => `
@@ -49966,6 +49964,9 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
49966
49964
  shadow: {
49967
49965
  "default": "0 4px 6px -1px lch(6.77 0 0 / 0.15), 0 2px 4px -1px lch(6.77 0 0 / 0.15)"
49968
49966
  },
49967
+ size: {
49968
+ height: "2rem"
49969
+ },
49969
49970
  color: {
49970
49971
  background: {
49971
49972
  "default": "#ffffff"
@@ -9418,33 +9418,29 @@ const Title$3 = styled.div.withConfig({
9418
9418
  const ButtonGroup = ({
9419
9419
  options,
9420
9420
  selected,
9421
- fillWidth,
9421
+ fillWidth = false,
9422
9422
  onClick,
9423
- type,
9423
+ type = "default",
9424
9424
  ...props
9425
9425
  }) => {
9426
- const lastIndex = options.length - 1;
9427
- const btns = options.map(({
9426
+ const buttons = options.map(({
9428
9427
  value,
9429
9428
  label,
9430
9429
  ...props2
9431
- }, index2) => {
9432
- const position = index2 === 0 ? "left" : index2 === lastIndex ? "right" : "center";
9433
- return /* @__PURE__ */ jsx(Button$1, { $active: value === selected, $position: position, $fillWidth: fillWidth, $type: type, onClick: () => onClick == null ? void 0 : onClick(value), role: "button", ...props2, children: label }, value);
9434
- });
9435
- return /* @__PURE__ */ jsx(ButtonGroupWrapper, { $fillWidth: fillWidth, $type: type, ...props, children: btns });
9430
+ }) => /* @__PURE__ */ jsx(Button$1, { $active: value === selected, $fillWidth: fillWidth, $type: type, onClick: () => onClick == null ? void 0 : onClick(value), role: "button", ...props2, children: label }, value));
9431
+ return /* @__PURE__ */ jsx(ButtonGroupWrapper, { $fillWidth: fillWidth, $type: type, ...props, children: buttons });
9436
9432
  };
9437
9433
  const ButtonGroupWrapper = styled.div.withConfig({
9438
9434
  componentId: "sc-ukgugp-0"
9439
9435
  })(["display:inline-flex;box-sizing:border-box;flex-direction:row;justify-content:center;align-items:center;padding:", ";gap:", ";border:", ";background:", ";border-radius:", ";width:", ";"], ({
9440
9436
  theme: theme2,
9441
- $type = "default"
9437
+ $type
9442
9438
  }) => `${theme2.click.button.group.space.panel[$type].x} ${theme2.click.button.group.space.panel[$type].y}`, ({
9443
9439
  theme: theme2,
9444
- $type = "default"
9440
+ $type
9445
9441
  }) => theme2.click.button.group.space.panel[$type].gap, ({
9446
9442
  theme: theme2,
9447
- $type = "default"
9443
+ $type
9448
9444
  }) => $type === "default" ? `1px solid ${theme2.click.button.group.color.panel.stroke[$type]}` : "none", ({
9449
9445
  theme: theme2
9450
9446
  }) => theme2.click.button.group.color.background.panel, ({
@@ -9465,12 +9461,12 @@ const Button$1 = styled.button.attrs((props) => ({
9465
9461
  theme: theme2
9466
9462
  }) => theme2.click.button.group.typography.label.default, ({
9467
9463
  theme: theme2,
9468
- $type = "default"
9464
+ $type
9469
9465
  }) => `${theme2.click.button.group.space.button[$type].y} ${theme2.click.button.group.space.button[$type].x}`, ({
9470
- $fillWidth = false
9466
+ $fillWidth
9471
9467
  }) => $fillWidth ? "flex: 1;" : "", ({
9472
9468
  theme: theme2,
9473
- $type = "default"
9469
+ $type
9474
9470
  }) => theme2.click.button.group.radii.button[$type].all, ({
9475
9471
  theme: theme2
9476
9472
  }) => theme2.click.button.group.color.background.hover, ({
@@ -34517,7 +34513,9 @@ const SelectValue = styled.div.withConfig({
34517
34513
  })(["text-align:left;flex:1;gap:inherit;color:inherit;font:inherit;overflow:hidden;"]);
34518
34514
  const StyledSelectTrigger = styled($cb5cc270b50c6fcd$export$41fb9f06171c75f4).withConfig({
34519
34515
  componentId: "sc-oudbwg-2"
34520
- })(["width:100%;display:flex;align-items:center;justify-content:space-between;align-items:center;cursor:pointer;span:first-of-type{max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}", " [data-hide-in-trigger]{display:none;}"], ({
34516
+ })(["width:100%;display:flex;align-items:center;justify-content:space-between;align-items:center;cursor:pointer;min-height:", ";span:first-of-type{max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}", " [data-hide-in-trigger]{display:none;}"], ({
34517
+ theme: theme2
34518
+ }) => theme2.click.genericMenu.panel.size.height, ({
34521
34519
  theme: theme2,
34522
34520
  $error
34523
34521
  }) => `
@@ -48782,6 +48780,9 @@ const click = {
48782
48780
  shadow: {
48783
48781
  "default": "0 4px 6px -1px lch(6.77 0 0 / 0.15), 0 2px 4px -1px lch(6.77 0 0 / 0.15)"
48784
48782
  },
48783
+ size: {
48784
+ height: "2rem"
48785
+ },
48785
48786
  color: {
48786
48787
  background: {
48787
48788
  "default": "#ffffff"
@@ -9433,33 +9433,29 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
9433
9433
  const ButtonGroup = ({
9434
9434
  options: options2,
9435
9435
  selected,
9436
- fillWidth,
9436
+ fillWidth = false,
9437
9437
  onClick,
9438
- type,
9438
+ type = "default",
9439
9439
  ...props
9440
9440
  }) => {
9441
- const lastIndex = options2.length - 1;
9442
- const btns = options2.map(({
9441
+ const buttons = options2.map(({
9443
9442
  value,
9444
9443
  label,
9445
9444
  ...props2
9446
- }, index2) => {
9447
- const position = index2 === 0 ? "left" : index2 === lastIndex ? "right" : "center";
9448
- return /* @__PURE__ */ jsxRuntime.jsx(Button$1, { $active: value === selected, $position: position, $fillWidth: fillWidth, $type: type, onClick: () => onClick == null ? void 0 : onClick(value), role: "button", ...props2, children: label }, value);
9449
- });
9450
- return /* @__PURE__ */ jsxRuntime.jsx(ButtonGroupWrapper, { $fillWidth: fillWidth, $type: type, ...props, children: btns });
9445
+ }) => /* @__PURE__ */ jsxRuntime.jsx(Button$1, { $active: value === selected, $fillWidth: fillWidth, $type: type, onClick: () => onClick == null ? void 0 : onClick(value), role: "button", ...props2, children: label }, value));
9446
+ return /* @__PURE__ */ jsxRuntime.jsx(ButtonGroupWrapper, { $fillWidth: fillWidth, $type: type, ...props, children: buttons });
9451
9447
  };
9452
9448
  const ButtonGroupWrapper = styled.styled.div.withConfig({
9453
9449
  componentId: "sc-ukgugp-0"
9454
9450
  })(["display:inline-flex;box-sizing:border-box;flex-direction:row;justify-content:center;align-items:center;padding:", ";gap:", ";border:", ";background:", ";border-radius:", ";width:", ";"], ({
9455
9451
  theme: theme2,
9456
- $type = "default"
9452
+ $type
9457
9453
  }) => `${theme2.click.button.group.space.panel[$type].x} ${theme2.click.button.group.space.panel[$type].y}`, ({
9458
9454
  theme: theme2,
9459
- $type = "default"
9455
+ $type
9460
9456
  }) => theme2.click.button.group.space.panel[$type].gap, ({
9461
9457
  theme: theme2,
9462
- $type = "default"
9458
+ $type
9463
9459
  }) => $type === "default" ? `1px solid ${theme2.click.button.group.color.panel.stroke[$type]}` : "none", ({
9464
9460
  theme: theme2
9465
9461
  }) => theme2.click.button.group.color.background.panel, ({
@@ -9480,12 +9476,12 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
9480
9476
  theme: theme2
9481
9477
  }) => theme2.click.button.group.typography.label.default, ({
9482
9478
  theme: theme2,
9483
- $type = "default"
9479
+ $type
9484
9480
  }) => `${theme2.click.button.group.space.button[$type].y} ${theme2.click.button.group.space.button[$type].x}`, ({
9485
- $fillWidth = false
9481
+ $fillWidth
9486
9482
  }) => $fillWidth ? "flex: 1;" : "", ({
9487
9483
  theme: theme2,
9488
- $type = "default"
9484
+ $type
9489
9485
  }) => theme2.click.button.group.radii.button[$type].all, ({
9490
9486
  theme: theme2
9491
9487
  }) => theme2.click.button.group.color.background.hover, ({
@@ -34532,7 +34528,9 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
34532
34528
  })(["text-align:left;flex:1;gap:inherit;color:inherit;font:inherit;overflow:hidden;"]);
34533
34529
  const StyledSelectTrigger = styled.styled($cb5cc270b50c6fcd$export$41fb9f06171c75f4).withConfig({
34534
34530
  componentId: "sc-oudbwg-2"
34535
- })(["width:100%;display:flex;align-items:center;justify-content:space-between;align-items:center;cursor:pointer;span:first-of-type{max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}", " [data-hide-in-trigger]{display:none;}"], ({
34531
+ })(["width:100%;display:flex;align-items:center;justify-content:space-between;align-items:center;cursor:pointer;min-height:", ";span:first-of-type{max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}", " [data-hide-in-trigger]{display:none;}"], ({
34532
+ theme: theme2
34533
+ }) => theme2.click.genericMenu.panel.size.height, ({
34536
34534
  theme: theme2,
34537
34535
  $error
34538
34536
  }) => `
@@ -48797,6 +48795,9 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
48797
48795
  shadow: {
48798
48796
  "default": "0 4px 6px -1px lch(6.77 0 0 / 0.15), 0 2px 4px -1px lch(6.77 0 0 / 0.15)"
48799
48797
  },
48798
+ size: {
48799
+ height: "2rem"
48800
+ },
48800
48801
  color: {
48801
48802
  background: {
48802
48803
  "default": "#ffffff"
@@ -1943,6 +1943,9 @@ export interface Theme {
1943
1943
  "shadow": {
1944
1944
  "default": string;
1945
1945
  };
1946
+ "size": {
1947
+ "height": string;
1948
+ };
1946
1949
  "color": {
1947
1950
  "background": {
1948
1951
  "default": string;
@@ -1943,6 +1943,9 @@ declare const _default: {
1943
1943
  "shadow": {
1944
1944
  "default": "0 4px 6px -1px lch(6.77 0 0 / 0.15), 0 2px 4px -1px lch(6.77 0 0 / 0.15)"
1945
1945
  },
1946
+ "size": {
1947
+ "height": "2rem"
1948
+ },
1946
1949
  "color": {
1947
1950
  "background": {
1948
1951
  "default": "#ffffff"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clickhouse/click-ui",
3
- "version": "0.0.217",
3
+ "version": "0.0.219",
4
4
  "description": "Official ClickHouse design system react library",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",