@clickhouse/click-ui 0.0.124 → 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.
package/dist/click-ui.es.js
CHANGED
|
@@ -32164,8 +32164,23 @@ const InputElement = styled.input.withConfig({
|
|
|
32164
32164
|
color: ${theme2.click.field.color.placeholder.default};
|
|
32165
32165
|
}
|
|
32166
32166
|
`);
|
|
32167
|
-
const
|
|
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-
|
|
32194
|
+
componentId: "sc-1pvd2nj-4"
|
|
32180
32195
|
})(["resize:vertical;overflow:auto;color:red;"]);
|
|
32181
32196
|
const IconButton = styled.button.withConfig({
|
|
32182
|
-
componentId: "sc-1pvd2nj-
|
|
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-
|
|
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(
|
|
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)
|
package/dist/click-ui.umd.js
CHANGED
|
@@ -32181,8 +32181,23 @@ var __publicField = (obj, key, value) => {
|
|
|
32181
32181
|
color: ${theme2.click.field.color.placeholder.default};
|
|
32182
32182
|
}
|
|
32183
32183
|
`);
|
|
32184
|
-
const
|
|
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-
|
|
32211
|
+
componentId: "sc-1pvd2nj-4"
|
|
32197
32212
|
})(["resize:vertical;overflow:auto;color:red;"]);
|
|
32198
32213
|
const IconButton = styled.button.withConfig({
|
|
32199
|
-
componentId: "sc-1pvd2nj-
|
|
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-
|
|
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(
|
|
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)
|
|
@@ -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>>;
|