@clickhouse/click-ui 0.0.161 → 0.0.162
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
|
@@ -32547,9 +32547,17 @@ const Wrapper$3 = styled.div.withConfig({
|
|
|
32547
32547
|
}
|
|
32548
32548
|
}
|
|
32549
32549
|
`);
|
|
32550
|
+
const StyledLabel = styled(Label$1).withConfig({
|
|
32551
|
+
componentId: "sc-1pvd2nj-1"
|
|
32552
|
+
})(["", ""], ({
|
|
32553
|
+
$labelColor
|
|
32554
|
+
}) => `
|
|
32555
|
+
${$labelColor ? `color: ${$labelColor};` : ""}
|
|
32556
|
+
`);
|
|
32550
32557
|
const InputWrapper = ({
|
|
32551
32558
|
id,
|
|
32552
32559
|
label = "",
|
|
32560
|
+
labelColor,
|
|
32553
32561
|
error: error2,
|
|
32554
32562
|
disabled,
|
|
32555
32563
|
children,
|
|
@@ -32562,11 +32570,11 @@ const InputWrapper = ({
|
|
|
32562
32570
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Wrapper$3, { $error: !!error2, $resize: resize, "data-resize": resize, className: disabled ? "disabled" : "", children }),
|
|
32563
32571
|
!!error2 && error2 !== true && /* @__PURE__ */ jsxRuntimeExports.jsx(Error$1, { children: error2 })
|
|
32564
32572
|
] }),
|
|
32565
|
-
label && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
32573
|
+
label && /* @__PURE__ */ jsxRuntimeExports.jsx(StyledLabel, { htmlFor: id, disabled, error: !!error2, $labelColor: labelColor, children: label })
|
|
32566
32574
|
] });
|
|
32567
32575
|
};
|
|
32568
32576
|
const InputElement = styled.input.withConfig({
|
|
32569
|
-
componentId: "sc-1pvd2nj-
|
|
32577
|
+
componentId: "sc-1pvd2nj-2"
|
|
32570
32578
|
})(["background:transparent;border:none;outline:none;width:100%;color:inherit;font:inherit;", ""], ({
|
|
32571
32579
|
theme: theme2
|
|
32572
32580
|
}) => `
|
|
@@ -32581,7 +32589,7 @@ const InputElement = styled.input.withConfig({
|
|
|
32581
32589
|
}
|
|
32582
32590
|
`);
|
|
32583
32591
|
const NumberInputElement = styled(InputElement).withConfig({
|
|
32584
|
-
componentId: "sc-1pvd2nj-
|
|
32592
|
+
componentId: "sc-1pvd2nj-3"
|
|
32585
32593
|
})(["", ""], ({
|
|
32586
32594
|
$hideControls
|
|
32587
32595
|
}) => `
|
|
@@ -32596,7 +32604,7 @@ const NumberInputElement = styled(InputElement).withConfig({
|
|
|
32596
32604
|
` : ""}
|
|
32597
32605
|
`);
|
|
32598
32606
|
const TextAreaElement = styled.textarea.withConfig({
|
|
32599
|
-
componentId: "sc-1pvd2nj-
|
|
32607
|
+
componentId: "sc-1pvd2nj-4"
|
|
32600
32608
|
})(["background:transparent;border:none;outline:none;width:100%;color:inherit;font:inherit;resize:none;", ""], ({
|
|
32601
32609
|
theme: theme2
|
|
32602
32610
|
}) => `
|
|
@@ -32607,10 +32615,10 @@ const TextAreaElement = styled.textarea.withConfig({
|
|
|
32607
32615
|
}
|
|
32608
32616
|
`);
|
|
32609
32617
|
styled(InputWrapper).withConfig({
|
|
32610
|
-
componentId: "sc-1pvd2nj-
|
|
32618
|
+
componentId: "sc-1pvd2nj-5"
|
|
32611
32619
|
})(["resize:vertical;overflow:auto;color:red;"]);
|
|
32612
32620
|
const IconButton = styled.button.withConfig({
|
|
32613
|
-
componentId: "sc-1pvd2nj-
|
|
32621
|
+
componentId: "sc-1pvd2nj-6"
|
|
32614
32622
|
})(["background:transparent;color:inherit;border:none;padding:0;outline:none;&:not(:disabled){cursor:pointer;}", ""], ({
|
|
32615
32623
|
theme: theme2,
|
|
32616
32624
|
$show
|
|
@@ -32619,7 +32627,7 @@ const IconButton = styled.button.withConfig({
|
|
|
32619
32627
|
visibility: ${$show ? "visible" : "hidden"};
|
|
32620
32628
|
`);
|
|
32621
32629
|
styled.svg.withConfig({
|
|
32622
|
-
componentId: "sc-1pvd2nj-
|
|
32630
|
+
componentId: "sc-1pvd2nj-7"
|
|
32623
32631
|
})(["", ""], ({
|
|
32624
32632
|
theme: theme2
|
|
32625
32633
|
}) => `
|
|
@@ -38785,6 +38793,7 @@ const TextField = forwardRef(({
|
|
|
38785
38793
|
type,
|
|
38786
38794
|
disabled,
|
|
38787
38795
|
label,
|
|
38796
|
+
labelColor,
|
|
38788
38797
|
error: error2,
|
|
38789
38798
|
id,
|
|
38790
38799
|
loading,
|
|
@@ -38802,7 +38811,7 @@ const TextField = forwardRef(({
|
|
|
38802
38811
|
const clearInput = () => {
|
|
38803
38812
|
onChangeProp("");
|
|
38804
38813
|
};
|
|
38805
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(InputWrapper, { disabled, id: id ?? defaultId, label, error: error2, orientation, dir, children: [
|
|
38814
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(InputWrapper, { disabled, id: id ?? defaultId, label, labelColor, error: error2, orientation, dir, children: [
|
|
38806
38815
|
/* @__PURE__ */ jsxRuntimeExports.jsx(InputElement, { ref: mergeRefs([inputRef, ref]), type, id: id ?? defaultId, disabled, value, onChange, ...props }),
|
|
38807
38816
|
clear && /* @__PURE__ */ jsxRuntimeExports.jsx(IconButton, { disabled, onClick: clearInput, $show: value.length > 0, "aria-label": "clear input", children: /* @__PURE__ */ jsxRuntimeExports.jsx(SvgImage, { name: "cross", size: "sm" }) }),
|
|
38808
38817
|
loading && /* @__PURE__ */ jsxRuntimeExports.jsx(SvgImage, { name: "loading-animated", size: "sm" })
|
package/dist/click-ui.umd.js
CHANGED
|
@@ -32564,9 +32564,17 @@ var __publicField = (obj, key, value) => {
|
|
|
32564
32564
|
}
|
|
32565
32565
|
}
|
|
32566
32566
|
`);
|
|
32567
|
+
const StyledLabel = styled(Label$1).withConfig({
|
|
32568
|
+
componentId: "sc-1pvd2nj-1"
|
|
32569
|
+
})(["", ""], ({
|
|
32570
|
+
$labelColor
|
|
32571
|
+
}) => `
|
|
32572
|
+
${$labelColor ? `color: ${$labelColor};` : ""}
|
|
32573
|
+
`);
|
|
32567
32574
|
const InputWrapper = ({
|
|
32568
32575
|
id,
|
|
32569
32576
|
label = "",
|
|
32577
|
+
labelColor,
|
|
32570
32578
|
error: error2,
|
|
32571
32579
|
disabled,
|
|
32572
32580
|
children,
|
|
@@ -32579,11 +32587,11 @@ var __publicField = (obj, key, value) => {
|
|
|
32579
32587
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Wrapper$3, { $error: !!error2, $resize: resize, "data-resize": resize, className: disabled ? "disabled" : "", children }),
|
|
32580
32588
|
!!error2 && error2 !== true && /* @__PURE__ */ jsxRuntimeExports.jsx(Error$1, { children: error2 })
|
|
32581
32589
|
] }),
|
|
32582
|
-
label && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
32590
|
+
label && /* @__PURE__ */ jsxRuntimeExports.jsx(StyledLabel, { htmlFor: id, disabled, error: !!error2, $labelColor: labelColor, children: label })
|
|
32583
32591
|
] });
|
|
32584
32592
|
};
|
|
32585
32593
|
const InputElement = styled.input.withConfig({
|
|
32586
|
-
componentId: "sc-1pvd2nj-
|
|
32594
|
+
componentId: "sc-1pvd2nj-2"
|
|
32587
32595
|
})(["background:transparent;border:none;outline:none;width:100%;color:inherit;font:inherit;", ""], ({
|
|
32588
32596
|
theme: theme2
|
|
32589
32597
|
}) => `
|
|
@@ -32598,7 +32606,7 @@ var __publicField = (obj, key, value) => {
|
|
|
32598
32606
|
}
|
|
32599
32607
|
`);
|
|
32600
32608
|
const NumberInputElement = styled(InputElement).withConfig({
|
|
32601
|
-
componentId: "sc-1pvd2nj-
|
|
32609
|
+
componentId: "sc-1pvd2nj-3"
|
|
32602
32610
|
})(["", ""], ({
|
|
32603
32611
|
$hideControls
|
|
32604
32612
|
}) => `
|
|
@@ -32613,7 +32621,7 @@ var __publicField = (obj, key, value) => {
|
|
|
32613
32621
|
` : ""}
|
|
32614
32622
|
`);
|
|
32615
32623
|
const TextAreaElement = styled.textarea.withConfig({
|
|
32616
|
-
componentId: "sc-1pvd2nj-
|
|
32624
|
+
componentId: "sc-1pvd2nj-4"
|
|
32617
32625
|
})(["background:transparent;border:none;outline:none;width:100%;color:inherit;font:inherit;resize:none;", ""], ({
|
|
32618
32626
|
theme: theme2
|
|
32619
32627
|
}) => `
|
|
@@ -32624,10 +32632,10 @@ var __publicField = (obj, key, value) => {
|
|
|
32624
32632
|
}
|
|
32625
32633
|
`);
|
|
32626
32634
|
styled(InputWrapper).withConfig({
|
|
32627
|
-
componentId: "sc-1pvd2nj-
|
|
32635
|
+
componentId: "sc-1pvd2nj-5"
|
|
32628
32636
|
})(["resize:vertical;overflow:auto;color:red;"]);
|
|
32629
32637
|
const IconButton = styled.button.withConfig({
|
|
32630
|
-
componentId: "sc-1pvd2nj-
|
|
32638
|
+
componentId: "sc-1pvd2nj-6"
|
|
32631
32639
|
})(["background:transparent;color:inherit;border:none;padding:0;outline:none;&:not(:disabled){cursor:pointer;}", ""], ({
|
|
32632
32640
|
theme: theme2,
|
|
32633
32641
|
$show
|
|
@@ -32636,7 +32644,7 @@ var __publicField = (obj, key, value) => {
|
|
|
32636
32644
|
visibility: ${$show ? "visible" : "hidden"};
|
|
32637
32645
|
`);
|
|
32638
32646
|
styled.svg.withConfig({
|
|
32639
|
-
componentId: "sc-1pvd2nj-
|
|
32647
|
+
componentId: "sc-1pvd2nj-7"
|
|
32640
32648
|
})(["", ""], ({
|
|
32641
32649
|
theme: theme2
|
|
32642
32650
|
}) => `
|
|
@@ -38802,6 +38810,7 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
|
|
|
38802
38810
|
type,
|
|
38803
38811
|
disabled,
|
|
38804
38812
|
label,
|
|
38813
|
+
labelColor,
|
|
38805
38814
|
error: error2,
|
|
38806
38815
|
id,
|
|
38807
38816
|
loading,
|
|
@@ -38819,7 +38828,7 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
|
|
|
38819
38828
|
const clearInput = () => {
|
|
38820
38829
|
onChangeProp("");
|
|
38821
38830
|
};
|
|
38822
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(InputWrapper, { disabled, id: id ?? defaultId, label, error: error2, orientation, dir, children: [
|
|
38831
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(InputWrapper, { disabled, id: id ?? defaultId, label, labelColor, error: error2, orientation, dir, children: [
|
|
38823
38832
|
/* @__PURE__ */ jsxRuntimeExports.jsx(InputElement, { ref: mergeRefs([inputRef, ref]), type, id: id ?? defaultId, disabled, value, onChange, ...props }),
|
|
38824
38833
|
clear && /* @__PURE__ */ jsxRuntimeExports.jsx(IconButton, { disabled, onClick: clearInput, $show: value.length > 0, "aria-label": "clear input", children: /* @__PURE__ */ jsxRuntimeExports.jsx(SvgImage, { name: "cross", size: "sm" }) }),
|
|
38825
38834
|
loading && /* @__PURE__ */ jsxRuntimeExports.jsx(SvgImage, { name: "loading-animated", size: "sm" })
|
|
@@ -3,6 +3,7 @@ import { ReactNode } from 'react';
|
|
|
3
3
|
export interface WrapperProps {
|
|
4
4
|
id: string;
|
|
5
5
|
label?: ReactNode;
|
|
6
|
+
labelColor?: string;
|
|
6
7
|
error?: ReactNode;
|
|
7
8
|
disabled?: boolean;
|
|
8
9
|
children: ReactNode;
|
|
@@ -10,7 +11,7 @@ export interface WrapperProps {
|
|
|
10
11
|
dir?: "start" | "end";
|
|
11
12
|
resize?: "none" | "vertical" | "horizontal" | "both";
|
|
12
13
|
}
|
|
13
|
-
export declare const InputWrapper: ({ id, label, error, disabled, children, orientation, dir, resize, }: WrapperProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare const InputWrapper: ({ id, label, labelColor, error, disabled, children, orientation, dir, resize, }: WrapperProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
15
|
export declare const InputElement: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, never>> & string;
|
|
15
16
|
export declare const NumberInputElement: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<Omit<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, never>, "ref"> & {
|
|
16
17
|
ref?: ((instance: HTMLInputElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import('react').RefObject<HTMLInputElement> | null | undefined;
|
|
@@ -18,7 +19,7 @@ export declare const NumberInputElement: import('styled-components/dist/types').
|
|
|
18
19
|
$hideControls?: boolean;
|
|
19
20
|
}>> & string;
|
|
20
21
|
export declare const TextAreaElement: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, never>> & string;
|
|
21
|
-
export declare const TextAreaWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<WrapperProps, never>> & string & Omit<({ id, label, error, disabled, children, orientation, dir, resize, }: WrapperProps) => import("react/jsx-runtime").JSX.Element, keyof import('react').Component<any, {}, any>>;
|
|
22
|
+
export declare const TextAreaWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<WrapperProps, never>> & string & Omit<({ id, label, labelColor, error, disabled, children, orientation, dir, resize, }: WrapperProps) => import("react/jsx-runtime").JSX.Element, keyof import('react').Component<any, {}, any>>;
|
|
22
23
|
export declare const IconButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
|
|
23
24
|
$show?: boolean;
|
|
24
25
|
}>> & string;
|
|
@@ -4,6 +4,7 @@ import { WrapperProps } from './InputWrapper';
|
|
|
4
4
|
export interface TextFieldProps extends Omit<WrapperProps, "id" | "children">, Omit<InputHTMLAttributes<HTMLInputElement>, "children" | "type" | "value" | "onChange" | "dir"> {
|
|
5
5
|
type?: "text" | "email" | "tel" | "url";
|
|
6
6
|
loading?: boolean;
|
|
7
|
+
labelColor?: string;
|
|
7
8
|
value?: string;
|
|
8
9
|
clear?: boolean;
|
|
9
10
|
onChange: (inputValue: string, e?: ChangeEvent<HTMLInputElement>) => void;
|