@clickhouse/click-ui 0.0.123 → 0.0.125

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.
@@ -32164,8 +32164,23 @@ const InputElement = styled.input.withConfig({
32164
32164
  color: ${theme2.click.field.color.placeholder.default};
32165
32165
  }
32166
32166
  `);
32167
- const TextAreaElement = styled.textarea.withConfig({
32167
+ const NumberInputElement = styled(InputElement).withConfig({
32168
32168
  componentId: "sc-1pvd2nj-2"
32169
+ })(["", ""], ({
32170
+ $hideControls
32171
+ }) => `
32172
+ ${$hideControls ? `
32173
+ &::-webkit-outer-spin-button,
32174
+ &::-webkit-inner-spin-button {
32175
+ -webkit-appearance: none;
32176
+ margin: 0;
32177
+ }
32178
+
32179
+ -moz-appearance: textfield;
32180
+ ` : ""}
32181
+ `);
32182
+ const TextAreaElement = styled.textarea.withConfig({
32183
+ componentId: "sc-1pvd2nj-3"
32169
32184
  })(["background:transparent;border:none;outline:none;width:100%;color:inherit;font:inherit;resize:none;", ""], ({
32170
32185
  theme: theme2
32171
32186
  }) => `
@@ -32176,10 +32191,10 @@ const TextAreaElement = styled.textarea.withConfig({
32176
32191
  }
32177
32192
  `);
32178
32193
  styled(InputWrapper).withConfig({
32179
- componentId: "sc-1pvd2nj-3"
32194
+ componentId: "sc-1pvd2nj-4"
32180
32195
  })(["resize:vertical;overflow:auto;color:red;"]);
32181
32196
  const IconButton = styled.button.withConfig({
32182
- componentId: "sc-1pvd2nj-4"
32197
+ componentId: "sc-1pvd2nj-5"
32183
32198
  })(["background:transparent;color:inherit;border:none;padding:0;outline:none;&:not(:disabled){cursor:pointer;}", ""], ({
32184
32199
  theme: theme2,
32185
32200
  $show
@@ -32188,7 +32203,7 @@ const IconButton = styled.button.withConfig({
32188
32203
  visibility: ${$show ? "visible" : "hidden"};
32189
32204
  `);
32190
32205
  styled.svg.withConfig({
32191
- componentId: "sc-1pvd2nj-5"
32206
+ componentId: "sc-1pvd2nj-6"
32192
32207
  })(["", ""], ({
32193
32208
  theme: theme2
32194
32209
  }) => `
@@ -32208,6 +32223,7 @@ const NumberField = forwardRef(({
32208
32223
  onChange: onChangeProp,
32209
32224
  orientation,
32210
32225
  dir,
32226
+ hideControls,
32211
32227
  ...props
32212
32228
  }, ref) => {
32213
32229
  const defaultId = useId();
@@ -32215,7 +32231,7 @@ const NumberField = forwardRef(({
32215
32231
  onChangeProp(e.target.value, e);
32216
32232
  };
32217
32233
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(InputWrapper, { disabled, id: id ?? defaultId, label, error: error2, orientation, dir, children: [
32218
- /* @__PURE__ */ jsxRuntimeExports.jsx(InputElement, { ref, type: "number", id: id ?? defaultId, disabled, onChange, ...props }),
32234
+ /* @__PURE__ */ jsxRuntimeExports.jsx(NumberInputElement, { ref, type: "number", id: id ?? defaultId, disabled, onChange, $hideControls: hideControls, ...props }),
32219
32235
  loading && /* @__PURE__ */ jsxRuntimeExports.jsx(SvgImage, { name: "loading-animated", size: "sm" })
32220
32236
  ] });
32221
32237
  });
@@ -32366,7 +32382,7 @@ const Pagination = ({
32366
32382
  ] }),
32367
32383
  /* @__PURE__ */ jsxRuntimeExports.jsxs(Container, { gap: "xxs", fillWidth: false, children: [
32368
32384
  /* @__PURE__ */ jsxRuntimeExports.jsx(IconButton$1, { icon: "chevron-left", type: "ghost", disabled: currentPage === 1, onClick: onPrevClick, "data-testid": "prev-btn" }),
32369
- /* @__PURE__ */ jsxRuntimeExports.jsx(Container, { maxWidth: "50px", fillWidth: false, children: /* @__PURE__ */ jsxRuntimeExports.jsx(NumberField, { onChange, value: currentPage, loading: false, onKeyDown, min: 1, max: totalPages, onFocus: onPageNumberFocus, onBlur: onPageNumberBlur }) }),
32385
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Container, { maxWidth: "50px", fillWidth: false, children: /* @__PURE__ */ jsxRuntimeExports.jsx(NumberField, { onChange, value: currentPage, loading: false, onKeyDown, min: 1, max: totalPages, onFocus: onPageNumberFocus, hideControls: true, onBlur: onPageNumberBlur }) }),
32370
32386
  !!totalPages && /* @__PURE__ */ jsxRuntimeExports.jsxs(Text, { component: "div", color: "muted", size: "sm", children: [
32371
32387
  "of ",
32372
32388
  formatNumber(totalPages)
@@ -36918,6 +36934,9 @@ const NavContext = createContext({
36918
36934
  open: false,
36919
36935
  onOpenChange: () => null
36920
36936
  });
36937
+ const CollapsibleContainer = styled.div.withConfig({
36938
+ componentId: "sc-guwmyz-0"
36939
+ })(["width:100%;"]);
36921
36940
  const Collapsible = ({
36922
36941
  open: openProp,
36923
36942
  onOpenChange: onOpenChangeProp,
@@ -36940,10 +36959,10 @@ const Collapsible = ({
36940
36959
  open: openProp ?? open2,
36941
36960
  onOpenChange
36942
36961
  };
36943
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Container, { isResponsive: false, ...props, children: /* @__PURE__ */ jsxRuntimeExports.jsx(NavContext.Provider, { value, children }) });
36962
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(CollapsibleContainer, { ...props, children: /* @__PURE__ */ jsxRuntimeExports.jsx(NavContext.Provider, { value, children }) });
36944
36963
  };
36945
36964
  const CollapsipleHeaderContainer = styled.div.withConfig({
36946
- componentId: "sc-guwmyz-0"
36965
+ componentId: "sc-guwmyz-1"
36947
36966
  })(["margin-left:", ";user-select:none;"], ({
36948
36967
  theme: theme2,
36949
36968
  $indicatorDir
@@ -36976,7 +36995,7 @@ const CollapsipleHeader = forwardRef(({
36976
36995
  CollapsipleHeader.displayName = "CollapsibleHeader";
36977
36996
  Collapsible.Header = CollapsipleHeader;
36978
36997
  const CollapsipleTriggerButton = styled(EmptyButton$1).withConfig({
36979
- componentId: "sc-guwmyz-1"
36998
+ componentId: "sc-guwmyz-2"
36980
36999
  })(['display:flex;align-items:center;font:inherit;color:inherit;cursor:inherit;[data-trigger-icon]{visibility:hidden;transition:transform 150ms cubic-bezier(0.87,0,0.13,1);&[data-open="true"]{transform:rotate(90deg);}}&:hover{[data-trigger-icon]{visibility:visible;}}']);
36981
37000
  const CollapsipleTrigger = ({
36982
37001
  onClick: onClickProp,
@@ -37007,7 +37026,7 @@ const CollapsipleTrigger = ({
37007
37026
  CollapsipleTrigger.displayName = "CollapsibleTrigger";
37008
37027
  Collapsible.Trigger = CollapsipleTrigger;
37009
37028
  const CollapsibleContentWrapper = styled.div.withConfig({
37010
- componentId: "sc-guwmyz-2"
37029
+ componentId: "sc-guwmyz-3"
37011
37030
  })(["", ""], ({
37012
37031
  theme: theme2,
37013
37032
  $indicatorDir
@@ -32181,8 +32181,23 @@ var __publicField = (obj, key, value) => {
32181
32181
  color: ${theme2.click.field.color.placeholder.default};
32182
32182
  }
32183
32183
  `);
32184
- const TextAreaElement = styled.textarea.withConfig({
32184
+ const NumberInputElement = styled(InputElement).withConfig({
32185
32185
  componentId: "sc-1pvd2nj-2"
32186
+ })(["", ""], ({
32187
+ $hideControls
32188
+ }) => `
32189
+ ${$hideControls ? `
32190
+ &::-webkit-outer-spin-button,
32191
+ &::-webkit-inner-spin-button {
32192
+ -webkit-appearance: none;
32193
+ margin: 0;
32194
+ }
32195
+
32196
+ -moz-appearance: textfield;
32197
+ ` : ""}
32198
+ `);
32199
+ const TextAreaElement = styled.textarea.withConfig({
32200
+ componentId: "sc-1pvd2nj-3"
32186
32201
  })(["background:transparent;border:none;outline:none;width:100%;color:inherit;font:inherit;resize:none;", ""], ({
32187
32202
  theme: theme2
32188
32203
  }) => `
@@ -32193,10 +32208,10 @@ var __publicField = (obj, key, value) => {
32193
32208
  }
32194
32209
  `);
32195
32210
  styled(InputWrapper).withConfig({
32196
- componentId: "sc-1pvd2nj-3"
32211
+ componentId: "sc-1pvd2nj-4"
32197
32212
  })(["resize:vertical;overflow:auto;color:red;"]);
32198
32213
  const IconButton = styled.button.withConfig({
32199
- componentId: "sc-1pvd2nj-4"
32214
+ componentId: "sc-1pvd2nj-5"
32200
32215
  })(["background:transparent;color:inherit;border:none;padding:0;outline:none;&:not(:disabled){cursor:pointer;}", ""], ({
32201
32216
  theme: theme2,
32202
32217
  $show
@@ -32205,7 +32220,7 @@ var __publicField = (obj, key, value) => {
32205
32220
  visibility: ${$show ? "visible" : "hidden"};
32206
32221
  `);
32207
32222
  styled.svg.withConfig({
32208
- componentId: "sc-1pvd2nj-5"
32223
+ componentId: "sc-1pvd2nj-6"
32209
32224
  })(["", ""], ({
32210
32225
  theme: theme2
32211
32226
  }) => `
@@ -32225,6 +32240,7 @@ var __publicField = (obj, key, value) => {
32225
32240
  onChange: onChangeProp,
32226
32241
  orientation,
32227
32242
  dir,
32243
+ hideControls,
32228
32244
  ...props
32229
32245
  }, ref) => {
32230
32246
  const defaultId = React.useId();
@@ -32232,7 +32248,7 @@ var __publicField = (obj, key, value) => {
32232
32248
  onChangeProp(e.target.value, e);
32233
32249
  };
32234
32250
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(InputWrapper, { disabled, id: id ?? defaultId, label, error: error2, orientation, dir, children: [
32235
- /* @__PURE__ */ jsxRuntimeExports.jsx(InputElement, { ref, type: "number", id: id ?? defaultId, disabled, onChange, ...props }),
32251
+ /* @__PURE__ */ jsxRuntimeExports.jsx(NumberInputElement, { ref, type: "number", id: id ?? defaultId, disabled, onChange, $hideControls: hideControls, ...props }),
32236
32252
  loading && /* @__PURE__ */ jsxRuntimeExports.jsx(SvgImage, { name: "loading-animated", size: "sm" })
32237
32253
  ] });
32238
32254
  });
@@ -32383,7 +32399,7 @@ var __publicField = (obj, key, value) => {
32383
32399
  ] }),
32384
32400
  /* @__PURE__ */ jsxRuntimeExports.jsxs(Container, { gap: "xxs", fillWidth: false, children: [
32385
32401
  /* @__PURE__ */ jsxRuntimeExports.jsx(IconButton$1, { icon: "chevron-left", type: "ghost", disabled: currentPage === 1, onClick: onPrevClick, "data-testid": "prev-btn" }),
32386
- /* @__PURE__ */ jsxRuntimeExports.jsx(Container, { maxWidth: "50px", fillWidth: false, children: /* @__PURE__ */ jsxRuntimeExports.jsx(NumberField, { onChange, value: currentPage, loading: false, onKeyDown, min: 1, max: totalPages, onFocus: onPageNumberFocus, onBlur: onPageNumberBlur }) }),
32402
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Container, { maxWidth: "50px", fillWidth: false, children: /* @__PURE__ */ jsxRuntimeExports.jsx(NumberField, { onChange, value: currentPage, loading: false, onKeyDown, min: 1, max: totalPages, onFocus: onPageNumberFocus, hideControls: true, onBlur: onPageNumberBlur }) }),
32387
32403
  !!totalPages && /* @__PURE__ */ jsxRuntimeExports.jsxs(Text, { component: "div", color: "muted", size: "sm", children: [
32388
32404
  "of ",
32389
32405
  formatNumber(totalPages)
@@ -36935,6 +36951,9 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
36935
36951
  open: false,
36936
36952
  onOpenChange: () => null
36937
36953
  });
36954
+ const CollapsibleContainer = styled.div.withConfig({
36955
+ componentId: "sc-guwmyz-0"
36956
+ })(["width:100%;"]);
36938
36957
  const Collapsible = ({
36939
36958
  open: openProp,
36940
36959
  onOpenChange: onOpenChangeProp,
@@ -36957,10 +36976,10 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
36957
36976
  open: openProp ?? open2,
36958
36977
  onOpenChange
36959
36978
  };
36960
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Container, { isResponsive: false, ...props, children: /* @__PURE__ */ jsxRuntimeExports.jsx(NavContext.Provider, { value, children }) });
36979
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(CollapsibleContainer, { ...props, children: /* @__PURE__ */ jsxRuntimeExports.jsx(NavContext.Provider, { value, children }) });
36961
36980
  };
36962
36981
  const CollapsipleHeaderContainer = styled.div.withConfig({
36963
- componentId: "sc-guwmyz-0"
36982
+ componentId: "sc-guwmyz-1"
36964
36983
  })(["margin-left:", ";user-select:none;"], ({
36965
36984
  theme: theme2,
36966
36985
  $indicatorDir
@@ -36993,7 +37012,7 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
36993
37012
  CollapsipleHeader.displayName = "CollapsibleHeader";
36994
37013
  Collapsible.Header = CollapsipleHeader;
36995
37014
  const CollapsipleTriggerButton = styled(EmptyButton$1).withConfig({
36996
- componentId: "sc-guwmyz-1"
37015
+ componentId: "sc-guwmyz-2"
36997
37016
  })(['display:flex;align-items:center;font:inherit;color:inherit;cursor:inherit;[data-trigger-icon]{visibility:hidden;transition:transform 150ms cubic-bezier(0.87,0,0.13,1);&[data-open="true"]{transform:rotate(90deg);}}&:hover{[data-trigger-icon]{visibility:visible;}}']);
36998
37017
  const CollapsipleTrigger = ({
36999
37018
  onClick: onClickProp,
@@ -37024,7 +37043,7 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
37024
37043
  CollapsipleTrigger.displayName = "CollapsibleTrigger";
37025
37044
  Collapsible.Trigger = CollapsipleTrigger;
37026
37045
  const CollapsibleContentWrapper = styled.div.withConfig({
37027
- componentId: "sc-guwmyz-2"
37046
+ componentId: "sc-guwmyz-3"
37028
37047
  })(["", ""], ({
37029
37048
  theme: theme2,
37030
37049
  $indicatorDir
@@ -1,6 +1,6 @@
1
1
  import { HTMLAttributes } from "react";
2
- import { HorizontalDirection, IconName, ContainerProps } from '../../components';
3
- export interface CollapsibleProps extends ContainerProps {
2
+ import { HorizontalDirection, IconName } from '../../components';
3
+ export interface CollapsibleProps extends HTMLAttributes<HTMLDivElement> {
4
4
  open?: boolean;
5
5
  onOpenChange?: (value: boolean) => void;
6
6
  }
@@ -11,6 +11,9 @@ export interface WrapperProps {
11
11
  }
12
12
  export declare const InputWrapper: ({ id, label, error, disabled, children, orientation, dir, resize, }: WrapperProps) => import("react/jsx-runtime").JSX.Element;
13
13
  export declare const InputElement: import("styled-components").StyledComponent<"input", import("styled-components").DefaultTheme, {}, never>;
14
+ export declare const NumberInputElement: import("styled-components").StyledComponent<"input", import("styled-components").DefaultTheme, {
15
+ $hideControls?: boolean | undefined;
16
+ }, never>;
14
17
  export declare const TextAreaElement: import("styled-components").StyledComponent<"textarea", import("styled-components").DefaultTheme, {}, never>;
15
18
  export declare const TextAreaWrapper: import("styled-components").StyledComponent<({ id, label, error, disabled, children, orientation, dir, resize, }: WrapperProps) => import("react/jsx-runtime").JSX.Element, import("styled-components").DefaultTheme, {}, never>;
16
19
  export declare const IconButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
@@ -6,5 +6,6 @@ export interface NumberFieldProps extends Omit<WrapperProps, "id" | "children">,
6
6
  onChange: (inputValue: string, e?: ChangeEvent<HTMLInputElement>) => void;
7
7
  orientation?: "vertical" | "horizontal";
8
8
  dir?: "start" | "end";
9
+ hideControls?: boolean;
9
10
  }
10
11
  export declare const NumberField: import("react").ForwardRefExoticComponent<NumberFieldProps & import("react").RefAttributes<HTMLInputElement>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clickhouse/click-ui",
3
- "version": "0.0.123",
3
+ "version": "0.0.125",
4
4
  "description": "Official ClickHouse design system react library",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",