@clickhouse/click-ui 0.0.206 → 0.0.208
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.bundled.es.js +100 -54
- package/dist/click-ui.bundled.umd.js +100 -54
- package/dist/click-ui.es.js +100 -54
- package/dist/click-ui.umd.js +100 -54
- package/dist/components/Icon/IconCommon.d.ts +5 -0
- package/dist/components/Icon/types.d.ts +1 -1
- package/dist/components/Input/InputWrapper.d.ts +11 -6
- package/dist/components/Input/SearchField.d.ts +2 -9
- package/dist/components/Input/TextField.d.ts +9 -1
- package/dist/components/icons/Bold.d.ts +4 -0
- package/dist/components/icons/Italic.d.ts +4 -0
- package/dist/components/icons/ListBulleted.d.ts +4 -0
- package/dist/components/icons/ListNumbered.d.ts +4 -0
- package/dist/components/icons/Underline.d.ts +4 -0
- package/dist/utils/test-utils.d.ts +56 -1
- package/package.json +1 -1
package/dist/click-ui.es.js
CHANGED
|
@@ -75,6 +75,7 @@ const Blog = (props) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/
|
|
|
75
75
|
/* @__PURE__ */ jsx("path", { stroke: "#161517", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "M21 7v10a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V7a4 4 0 0 1 4-4h10a4 4 0 0 1 4 4Z", clipRule: "evenodd" }),
|
|
76
76
|
/* @__PURE__ */ jsx("path", { stroke: "#161517", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "m13.75 10.25-6 6" })
|
|
77
77
|
] });
|
|
78
|
+
const Bold = (props) => /* @__PURE__ */ jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: /* @__PURE__ */ jsx("path", { d: "M6.75 12H13.75C15.683 12 17.25 13.567 17.25 15.5V15.5C17.25 17.433 15.683 19 13.75 19H6.75V5H12.583C14.516 5 16.083 6.567 16.083 8.5V8.5C16.083 10.433 14.516 12 12.583 12", stroke: "#161517", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }) });
|
|
78
79
|
const Book = (props) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", ...props, children: [
|
|
79
80
|
/* @__PURE__ */ jsx("path", { stroke: "#161517", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "M12 16.37a6.368 6.368 0 0 0-7.495-1.12c-.684.364-1.509-.085-1.509-.86V5.295c0-.637.294-1.249.812-1.618A6.367 6.367 0 0 1 12 4.364a6.367 6.367 0 0 1 8.191-.687c.518.37.813.981.813 1.618v9.095c0 .775-.826 1.225-1.509.86A6.368 6.368 0 0 0 12 16.37Z", clipRule: "evenodd" }),
|
|
80
81
|
/* @__PURE__ */ jsx("path", { stroke: "#161517", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "M4.505 19.387A6.368 6.368 0 0 1 12 20.507a6.368 6.368 0 0 1 7.495-1.12M12 16.37V4.363" })
|
|
@@ -442,6 +443,7 @@ const Integrations = (props) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www
|
|
|
442
443
|
/* @__PURE__ */ jsx("path", { stroke: "#161517", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "M10 9.056C9.094 7.818 7.652 7 6 7v0a5 5 0 0 0-5 5v0a5 5 0 0 0 5 5v0a5.299 5.299 0 0 0 4.543-2.572L12 12l1.457-2.428A5.299 5.299 0 0 1 18 7v0a5 5 0 0 1 5 5v0a5 5 0 0 1-5 5v0c-1.652 0-3.094-.818-4-2.056" }),
|
|
443
444
|
/* @__PURE__ */ jsx("path", { stroke: "#161517", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "m9.93 6.028.521 2.954-2.954.52" })
|
|
444
445
|
] });
|
|
446
|
+
const Italic = (props) => /* @__PURE__ */ jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: /* @__PURE__ */ jsx("path", { d: "M14.1821 18H5.45508H9.43508L14.5651 6H18.5451H9.81808", stroke: "#161517", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }) });
|
|
445
447
|
const Key = (props) => /* @__PURE__ */ jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: [
|
|
446
448
|
/* @__PURE__ */ jsx("path", { d: "M15.0312 9.34226C15.0312 9.13526 14.8633 8.96826 14.6562 8.96826C14.4492 8.96926 14.2812 9.13726 14.2812 9.34426C14.2812 9.55126 14.4492 9.71926 14.6562 9.71826C14.8633 9.71826 15.0312 9.55026 15.0312 9.34326", stroke: "#161517", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
447
449
|
/* @__PURE__ */ jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12.499 14.7852L11.469 15.8172H9.637V17.2862H8.172V19.1222L6.798 20.5002H3.5V17.1952L9.223 11.4592C8.417 9.36524 8.849 6.90324 10.534 5.21424C12.814 2.92924 16.511 2.92924 18.791 5.21424C21.071 7.49924 21.071 11.2042 18.791 13.4902C17.089 15.1942 14.601 15.6242 12.499 14.7852Z", stroke: "#161517", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
@@ -486,6 +488,22 @@ const LineInCircle = (props) => {
|
|
|
486
488
|
/* @__PURE__ */ jsx("path", { d: "M8 16L16 8", stroke: "white", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
487
489
|
] });
|
|
488
490
|
};
|
|
491
|
+
const ListBulleted = (props) => /* @__PURE__ */ jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: [
|
|
492
|
+
/* @__PURE__ */ jsx("path", { d: "M8.99902 6.43673H20.0036", stroke: "#161517", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }),
|
|
493
|
+
/* @__PURE__ */ jsx("path", { d: "M20.0036 12.0002H8.99902", stroke: "#161517", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }),
|
|
494
|
+
/* @__PURE__ */ jsx("path", { d: "M8.99902 17.5632H20.0036", stroke: "#161517", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }),
|
|
495
|
+
/* @__PURE__ */ jsx("path", { d: "M4.49728 5.93652C4.22102 5.93652 3.99707 6.16047 3.99707 6.43673C3.99707 6.71299 4.22102 6.93694 4.49728 6.93694C4.77354 6.93694 4.99749 6.71299 4.99749 6.43673C4.99749 6.16047 4.77354 5.93652 4.49728 5.93652", stroke: "#161517", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }),
|
|
496
|
+
/* @__PURE__ */ jsx("path", { d: "M4.49728 11.5C4.22102 11.5 3.99707 11.724 3.99707 12.0002C3.99707 12.2765 4.22102 12.5004 4.49728 12.5004C4.77354 12.5004 4.99749 12.2765 4.99749 12.0002C4.99749 11.724 4.77354 11.5 4.49728 11.5", stroke: "#161517", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }),
|
|
497
|
+
/* @__PURE__ */ jsx("path", { d: "M4.49728 17.063C4.22102 17.063 3.99707 17.2869 3.99707 17.5632C3.99707 17.8395 4.22102 18.0634 4.49728 18.0634C4.77354 18.0634 4.99749 17.8395 4.99749 17.5632C4.99749 17.2869 4.77354 17.063 4.49728 17.063", stroke: "#161517", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" })
|
|
498
|
+
] });
|
|
499
|
+
const ListNumbered = (props) => /* @__PURE__ */ jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: [
|
|
500
|
+
/* @__PURE__ */ jsx("path", { d: "M11 4H20", stroke: "#161517", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }),
|
|
501
|
+
/* @__PURE__ */ jsx("path", { d: "M11.1504 9H20.0004", stroke: "#161517", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }),
|
|
502
|
+
/* @__PURE__ */ jsx("path", { d: "M6.5 9H4H5.25V4L4 5.25", stroke: "#161517", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }),
|
|
503
|
+
/* @__PURE__ */ jsx("path", { d: "M11 15H20", stroke: "#161517", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }),
|
|
504
|
+
/* @__PURE__ */ jsx("path", { d: "M11.1504 20H20.0004", stroke: "#161517", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }),
|
|
505
|
+
/* @__PURE__ */ jsx("path", { d: "M4 15H6.5V17L4 18.5V20H6.75", stroke: "#161517", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" })
|
|
506
|
+
] });
|
|
489
507
|
const Loading = (props) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", ...props, children: [
|
|
490
508
|
/* @__PURE__ */ jsx("path", { stroke: "#161517", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.25, d: "M7.625 8.875H4.5V5.75" }),
|
|
491
509
|
/* @__PURE__ */ jsx("path", { stroke: "#161517", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "M19.5 12A7.495 7.495 0 0 0 5.188 8.875" }),
|
|
@@ -704,6 +722,10 @@ const TreeStructure = (props) => /* @__PURE__ */ jsxs("svg", { width: "24", heig
|
|
|
704
722
|
] }),
|
|
705
723
|
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: "clip0_7969_2214", children: /* @__PURE__ */ jsx("rect", { width: "24", height: "24", fill: "white" }) }) })
|
|
706
724
|
] });
|
|
725
|
+
const Underline = (props) => /* @__PURE__ */ jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: [
|
|
726
|
+
/* @__PURE__ */ jsx("path", { d: "M6 20H18", stroke: "#161517", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }),
|
|
727
|
+
/* @__PURE__ */ jsx("path", { d: "M17 4V11C17 13.761 14.761 16 12 16C9.239 16 7 13.761 7 11V4", stroke: "#161517", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" })
|
|
728
|
+
] });
|
|
707
729
|
const Upgrade = (props) => /* @__PURE__ */ jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: [
|
|
708
730
|
/* @__PURE__ */ jsx("mask", { id: "path-1-inside-1_10418_503", fill: "white", children: /* @__PURE__ */ jsx("path", { d: "M16.1664 17.8179H7.83984V18.8864H16.1664V17.8179Z" }) }),
|
|
709
731
|
/* @__PURE__ */ jsx("path", { d: "M7.83984 17.8179V16.5322H6.55413V17.8179H7.83984ZM16.1664 17.8179H17.4521V16.5322H16.1664V17.8179ZM16.1664 18.8864V20.1721H17.4521V18.8864H16.1664ZM7.83984 18.8864H6.55413V20.1721H7.83984V18.8864ZM7.83984 19.1036H16.1664V16.5322H7.83984V19.1036ZM14.8807 17.8179V18.8864H17.4521V17.8179H14.8807ZM16.1664 17.6007H7.83984V20.1721H16.1664V17.6007ZM9.12556 18.8864V17.8179H6.55413V18.8864H9.12556Z", fill: "white", mask: "url(#path-1-inside-1_10418_503)" }),
|
|
@@ -743,6 +765,7 @@ const ICONS_MAP = {
|
|
|
743
765
|
bell: Bell,
|
|
744
766
|
beta: Beta,
|
|
745
767
|
blog: Blog,
|
|
768
|
+
bold: Bold,
|
|
746
769
|
book: Book,
|
|
747
770
|
brackets: Brackets,
|
|
748
771
|
briefcase: Briefcase,
|
|
@@ -817,6 +840,7 @@ const ICONS_MAP = {
|
|
|
817
840
|
information: InformationIcon,
|
|
818
841
|
"insert-row": InsertRowIcon,
|
|
819
842
|
integrations: Integrations,
|
|
843
|
+
italic: Italic,
|
|
820
844
|
key: Key,
|
|
821
845
|
keys: Keys,
|
|
822
846
|
lifebuoy: Lifebuoy,
|
|
@@ -824,6 +848,8 @@ const ICONS_MAP = {
|
|
|
824
848
|
"light-bulb-on": LightBulbOn,
|
|
825
849
|
lightening: Lightening,
|
|
826
850
|
"line-in-circle": LineInCircle,
|
|
851
|
+
"list-bulleted": ListBulleted,
|
|
852
|
+
"list-numbered": ListNumbered,
|
|
827
853
|
loading: LoadingFlipped,
|
|
828
854
|
"loading-animated": LoadingAnimated,
|
|
829
855
|
lock: Lock,
|
|
@@ -871,6 +897,7 @@ const ICONS_MAP = {
|
|
|
871
897
|
taxi: Taxi,
|
|
872
898
|
trash: Trash,
|
|
873
899
|
"tree-structure": TreeStructure,
|
|
900
|
+
underline: Underline,
|
|
874
901
|
upgrade: Upgrade,
|
|
875
902
|
upload: Upload,
|
|
876
903
|
url: Url,
|
|
@@ -15832,7 +15859,6 @@ const Wrapper$3 = styled.div.withConfig({
|
|
|
15832
15859
|
resize: ${$resize};
|
|
15833
15860
|
overflow: auto;
|
|
15834
15861
|
`}
|
|
15835
|
-
padding: 0 ${theme2.click.field.space.x};
|
|
15836
15862
|
${$error ? `
|
|
15837
15863
|
font: ${theme2.click.field.typography.fieldText.error};
|
|
15838
15864
|
border: 1px solid ${theme2.click.field.color.stroke.error};
|
|
@@ -15916,9 +15942,13 @@ const InputWrapper = ({
|
|
|
15916
15942
|
const InputElement = styled.input.withConfig({
|
|
15917
15943
|
componentId: "sc-1pvd2nj-2"
|
|
15918
15944
|
})(["background:transparent;border:none;outline:none;width:100%;color:inherit;font:inherit;", ""], ({
|
|
15919
|
-
theme: theme2
|
|
15945
|
+
theme: theme2,
|
|
15946
|
+
$hasStartContent,
|
|
15947
|
+
$hasEndContent
|
|
15920
15948
|
}) => `
|
|
15921
15949
|
padding: ${theme2.click.field.space.y} 0;
|
|
15950
|
+
padding-left: ${$hasStartContent ? "0" : theme2.click.field.space.x};
|
|
15951
|
+
padding-right: ${$hasEndContent ? "0" : theme2.click.field.space.x};
|
|
15922
15952
|
&::placeholder {
|
|
15923
15953
|
color: ${theme2.click.field.color.placeholder.default};
|
|
15924
15954
|
}
|
|
@@ -15948,26 +15978,21 @@ const TextAreaElement = styled.textarea.withConfig({
|
|
|
15948
15978
|
})(["background:transparent;border:none;outline:none;width:100%;color:inherit;font:inherit;resize:none;", ""], ({
|
|
15949
15979
|
theme: theme2
|
|
15950
15980
|
}) => `
|
|
15951
|
-
padding: ${theme2.click.field.space.y}
|
|
15981
|
+
padding: ${theme2.click.field.space.y} ${theme2.click.field.space.x};
|
|
15952
15982
|
align-self: stretch;
|
|
15953
15983
|
&::placeholder {
|
|
15954
15984
|
color: ${theme2.click.field.color.placeholder.default};
|
|
15955
15985
|
}
|
|
15956
15986
|
`);
|
|
15957
|
-
styled(InputWrapper).withConfig({
|
|
15958
|
-
componentId: "sc-1pvd2nj-5"
|
|
15959
|
-
})(["resize:vertical;overflow:auto;color:red;"]);
|
|
15960
15987
|
const IconButton = styled.button.withConfig({
|
|
15961
|
-
componentId: "sc-1pvd2nj-
|
|
15988
|
+
componentId: "sc-1pvd2nj-5"
|
|
15962
15989
|
})(["background:transparent;color:inherit;border:none;padding:0;outline:none;&:not(:disabled){cursor:pointer;}", ""], ({
|
|
15963
|
-
theme: theme2
|
|
15964
|
-
$show
|
|
15990
|
+
theme: theme2
|
|
15965
15991
|
}) => `
|
|
15966
15992
|
padding: ${theme2.click.field.space.y} 0;
|
|
15967
|
-
visibility: ${$show ? "visible" : "hidden"};
|
|
15968
15993
|
`);
|
|
15969
15994
|
styled.svg.withConfig({
|
|
15970
|
-
componentId: "sc-1pvd2nj-
|
|
15995
|
+
componentId: "sc-1pvd2nj-6"
|
|
15971
15996
|
})(["", ""], ({
|
|
15972
15997
|
theme: theme2
|
|
15973
15998
|
}) => `
|
|
@@ -15978,6 +16003,29 @@ styled.svg.withConfig({
|
|
|
15978
16003
|
padding-right: ${theme2.click.field.space.x};
|
|
15979
16004
|
}
|
|
15980
16005
|
`);
|
|
16006
|
+
const InputStartContent = styled.div.withConfig({
|
|
16007
|
+
componentId: "sc-1pvd2nj-7"
|
|
16008
|
+
})(["", ""], ({
|
|
16009
|
+
theme: theme2
|
|
16010
|
+
}) => `
|
|
16011
|
+
padding-left: ${theme2.click.field.space.x};
|
|
16012
|
+
cursor: text;
|
|
16013
|
+
gap: ${theme2.click.field.space.gap};
|
|
16014
|
+
display: flex;
|
|
16015
|
+
align-self: stretch;
|
|
16016
|
+
align-items: center;
|
|
16017
|
+
`);
|
|
16018
|
+
const InputEndContent = styled.div.withConfig({
|
|
16019
|
+
componentId: "sc-1pvd2nj-8"
|
|
16020
|
+
})(["", ""], ({
|
|
16021
|
+
theme: theme2
|
|
16022
|
+
}) => `
|
|
16023
|
+
padding-right: ${theme2.click.field.space.x};
|
|
16024
|
+
gap: ${theme2.click.field.space.gap};
|
|
16025
|
+
display: flex;
|
|
16026
|
+
align-self: stretch;
|
|
16027
|
+
align-items: center;
|
|
16028
|
+
`);
|
|
15981
16029
|
const locale = "en-US";
|
|
15982
16030
|
const selectedDateFormatter = new Intl.DateTimeFormat(locale, {
|
|
15983
16031
|
day: "2-digit",
|
|
@@ -16003,8 +16051,8 @@ const DatePickerInput = ({
|
|
|
16003
16051
|
const defaultId = useId();
|
|
16004
16052
|
const formattedSelectedDate = selectedDate instanceof Date ? selectedDateFormatter.format(selectedDate) : "";
|
|
16005
16053
|
return /* @__PURE__ */ jsxs(HighlightedInputWrapper, { $isActive: isActive, disabled, id: id ?? defaultId, children: [
|
|
16006
|
-
/* @__PURE__ */ jsx(SvgImage, { name: "calendar" }),
|
|
16007
|
-
/* @__PURE__ */ jsx(InputElement, { "data-testid": "datepicker-input", placeholder, readOnly: true, value: formattedSelectedDate })
|
|
16054
|
+
/* @__PURE__ */ jsx(InputStartContent, { children: /* @__PURE__ */ jsx(SvgImage, { name: "calendar" }) }),
|
|
16055
|
+
/* @__PURE__ */ jsx(InputElement, { $hasStartContent: true, "data-testid": "datepicker-input", placeholder, readOnly: true, value: formattedSelectedDate })
|
|
16008
16056
|
] });
|
|
16009
16057
|
};
|
|
16010
16058
|
const weekdayFormatter = new Intl.DateTimeFormat(locale, {
|
|
@@ -33924,9 +33972,10 @@ const PasswordField = forwardRef(({
|
|
|
33924
33972
|
const onChange = (e) => {
|
|
33925
33973
|
onChangeProp(e.target.value, e);
|
|
33926
33974
|
};
|
|
33975
|
+
const hasEndContent = value.length > 0;
|
|
33927
33976
|
return /* @__PURE__ */ jsxs(InputWrapper, { disabled, id: id ?? defaultId, label, error: error2, orientation, dir, children: [
|
|
33928
|
-
/* @__PURE__ */ jsx(InputElement, { ref, type: viewPassword ? "text" : "password", id: id ?? defaultId, disabled, value, onChange, ...props }),
|
|
33929
|
-
/* @__PURE__ */ jsx(IconButton, { disabled, onClick: togglePasswordViewer,
|
|
33977
|
+
/* @__PURE__ */ jsx(InputElement, { $hasStartContent: false, $hasEndContent: hasEndContent, ref, type: viewPassword ? "text" : "password", id: id ?? defaultId, disabled, value, onChange, ...props }),
|
|
33978
|
+
hasEndContent && /* @__PURE__ */ jsx(InputEndContent, { children: /* @__PURE__ */ jsx(IconButton, { disabled, onClick: togglePasswordViewer, children: /* @__PURE__ */ jsx(SvgImage, { name: viewPassword ? "eye-closed" : "eye", size: "md" }) }) })
|
|
33930
33979
|
] });
|
|
33931
33980
|
});
|
|
33932
33981
|
const CustomSelect = styled.div.withConfig({
|
|
@@ -34085,7 +34134,7 @@ const ProgressContainer = styled.div.withConfig({
|
|
|
34085
34134
|
$progress,
|
|
34086
34135
|
$type
|
|
34087
34136
|
}) => `
|
|
34088
|
-
background: ${$completed ? theme2.click.field.color.background.default : `linear-gradient(to right, ${theme2.global.color.accent.default} 0%, ${theme2.global.color.accent.default} ${$progress}%, ${theme2.click.field.color.background.default} ${$progress}%, ${theme2.click.field.color.background.default} 100%)`};
|
|
34137
|
+
background: ${$completed && $type === "default" ? theme2.click.field.color.background.default : `linear-gradient(to right, ${theme2.global.color.accent.default} 0%, ${theme2.global.color.accent.default} ${$progress}%, ${theme2.click.field.color.background.default} ${$progress}%, ${theme2.click.field.color.background.default} 100%)`};
|
|
34089
34138
|
background-size: calc(100% + 2px);
|
|
34090
34139
|
background-position: center;
|
|
34091
34140
|
gap: ${theme2.click.field.space.gap};
|
|
@@ -34442,38 +34491,16 @@ const RadioGroupIndicator = styled($f99a8c78507165f7$export$adb584737d712b70).wi
|
|
|
34442
34491
|
}
|
|
34443
34492
|
`);
|
|
34444
34493
|
const SearchField = forwardRef(({
|
|
34445
|
-
disabled,
|
|
34446
|
-
label,
|
|
34447
|
-
error: error2,
|
|
34448
|
-
id,
|
|
34449
|
-
loading,
|
|
34450
|
-
clear = true,
|
|
34451
|
-
value = "",
|
|
34452
|
-
onChange: onChangeProp,
|
|
34453
|
-
orientation,
|
|
34454
|
-
dir,
|
|
34455
34494
|
isFilter = false,
|
|
34495
|
+
clear = true,
|
|
34456
34496
|
...props
|
|
34457
34497
|
}, ref) => {
|
|
34458
|
-
|
|
34459
|
-
const defaultId = useId();
|
|
34460
|
-
const onChange = (e) => {
|
|
34461
|
-
onChangeProp(e.target.value, e);
|
|
34462
|
-
};
|
|
34463
|
-
const clearInput = () => {
|
|
34464
|
-
onChangeProp("");
|
|
34465
|
-
};
|
|
34466
|
-
return /* @__PURE__ */ jsxs(InputWrapper, { disabled, id: id ?? defaultId, label, error: error2, orientation, dir, children: [
|
|
34467
|
-
/* @__PURE__ */ jsx(SvgImage, { name: isFilter ? "filter" : "search", size: "sm" }),
|
|
34468
|
-
/* @__PURE__ */ jsx(InputElement, { ref: mergeRefs([inputRef, ref]), type: "text", id: id ?? defaultId, disabled, value, onChange, ...props }),
|
|
34469
|
-
clear && /* @__PURE__ */ jsx(IconButton, { disabled, onClick: clearInput, $show: value.length > 0, "aria-label": "clear input", "data-testid": "search-close", children: /* @__PURE__ */ jsx(SvgImage, { name: "cross", size: "sm" }) }),
|
|
34470
|
-
loading && /* @__PURE__ */ jsx(SvgImage, { name: "loading-animated", size: "sm" })
|
|
34471
|
-
] });
|
|
34498
|
+
return /* @__PURE__ */ jsx(TextField, { startContent: /* @__PURE__ */ jsx(SvgImage, { name: isFilter ? "filter" : "search", size: "sm" }), clear, ref, ...props });
|
|
34472
34499
|
});
|
|
34473
34500
|
const useUpdateEffect = (effect, deps) => {
|
|
34474
34501
|
const isFirstMount = useRef(true);
|
|
34475
34502
|
useEffect(() => {
|
|
34476
|
-
if (isFirstMount) {
|
|
34503
|
+
if (isFirstMount.current) {
|
|
34477
34504
|
isFirstMount.current = false;
|
|
34478
34505
|
return;
|
|
34479
34506
|
}
|
|
@@ -38299,15 +38326,24 @@ const MultiSelectCheckboxItem = forwardRef(({
|
|
|
38299
38326
|
selectedValues,
|
|
38300
38327
|
onSelect
|
|
38301
38328
|
} = useOption();
|
|
38302
|
-
const
|
|
38329
|
+
const handleSelect = (evt) => {
|
|
38303
38330
|
if (!disabled) {
|
|
38304
38331
|
onSelect(value, void 0, evt);
|
|
38305
|
-
if (typeof onSelectProp
|
|
38332
|
+
if (typeof onSelectProp === "function") {
|
|
38306
38333
|
onSelectProp(value, void 0, evt);
|
|
38307
38334
|
}
|
|
38308
38335
|
}
|
|
38309
38336
|
};
|
|
38310
|
-
const
|
|
38337
|
+
const handleMenuItemClick = (evt) => {
|
|
38338
|
+
if (evt.target !== evt.currentTarget) {
|
|
38339
|
+
return;
|
|
38340
|
+
}
|
|
38341
|
+
handleSelect(evt);
|
|
38342
|
+
};
|
|
38343
|
+
const handleCheckboxClick = (evt) => {
|
|
38344
|
+
handleSelect(evt);
|
|
38345
|
+
};
|
|
38346
|
+
const handleMenuItemMouseOver = (e) => {
|
|
38311
38347
|
if (onMouseOverProp) {
|
|
38312
38348
|
onMouseOverProp(e);
|
|
38313
38349
|
}
|
|
@@ -38319,11 +38355,8 @@ const MultiSelectCheckboxItem = forwardRef(({
|
|
|
38319
38355
|
return null;
|
|
38320
38356
|
}
|
|
38321
38357
|
const isChecked = selectedValues.includes(value);
|
|
38322
|
-
const onChange = () => {
|
|
38323
|
-
onSelect(value);
|
|
38324
|
-
};
|
|
38325
38358
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
38326
|
-
/* @__PURE__ */ jsxs(GenericMenuItem, { ...props, "data-value": value, onClick:
|
|
38359
|
+
/* @__PURE__ */ jsxs(GenericMenuItem, { ...props, "data-value": value, onClick: handleMenuItemClick, onMouseOver: handleMenuItemMouseOver, ref: forwardedRef, "data-disabled": disabled ? true : void 0, "data-highlighted": highlighted == value ? "true" : void 0, "data-testid": `multi-select-checkbox-${value}`, "cui-select-item": "", children: [
|
|
38327
38360
|
icon && iconDir === "start" && /* @__PURE__ */ jsx(Checkbox, { checked: isChecked, "data-testid": "multi-select-checkbox", disabled, label: label ? /* @__PURE__ */ jsxs("div", { style: {
|
|
38328
38361
|
display: "flex",
|
|
38329
38362
|
justifyContent: "center"
|
|
@@ -38336,9 +38369,9 @@ const MultiSelectCheckboxItem = forwardRef(({
|
|
|
38336
38369
|
}, children: [
|
|
38337
38370
|
/* @__PURE__ */ jsx(SvgImage, { name: icon, size: "sm" }),
|
|
38338
38371
|
children
|
|
38339
|
-
] }), onClick:
|
|
38340
|
-
icon && iconDir === "end" && /* @__PURE__ */ jsx(IconWrapper$3, { icon, iconDir: "end", children: /* @__PURE__ */ jsx(Checkbox, { checked: isChecked, "data-testid": "multi-select-checkbox", disabled, label: label ?? children, onClick:
|
|
38341
|
-
!icon && /* @__PURE__ */ jsx(Checkbox, { checked: isChecked, "data-testid": "multi-select-checkbox", disabled, label: label ?? children, onClick:
|
|
38372
|
+
] }), onClick: handleCheckboxClick, variant: variant ?? "default" }),
|
|
38373
|
+
icon && iconDir === "end" && /* @__PURE__ */ jsx(IconWrapper$3, { icon, iconDir: "end", children: /* @__PURE__ */ jsx(Checkbox, { checked: isChecked, "data-testid": "multi-select-checkbox", disabled, label: label ?? children, onClick: handleCheckboxClick, variant: variant ?? "default" }) }),
|
|
38374
|
+
!icon && /* @__PURE__ */ jsx(Checkbox, { checked: isChecked, "data-testid": "multi-select-checkbox", disabled, label: label ?? children, onClick: handleCheckboxClick, variant: variant ?? "default" })
|
|
38342
38375
|
] }),
|
|
38343
38376
|
separator && /* @__PURE__ */ jsx(Separator, { size: "sm" })
|
|
38344
38377
|
] });
|
|
@@ -39899,6 +39932,8 @@ const TextField = forwardRef(({
|
|
|
39899
39932
|
onChange: onChangeProp,
|
|
39900
39933
|
orientation,
|
|
39901
39934
|
dir,
|
|
39935
|
+
startContent,
|
|
39936
|
+
endContent,
|
|
39902
39937
|
...props
|
|
39903
39938
|
}, ref) => {
|
|
39904
39939
|
const inputRef = useRef(null);
|
|
@@ -39909,10 +39944,21 @@ const TextField = forwardRef(({
|
|
|
39909
39944
|
const clearInput = () => {
|
|
39910
39945
|
onChangeProp("");
|
|
39911
39946
|
};
|
|
39947
|
+
const handleStartContentClick = () => {
|
|
39948
|
+
var _a;
|
|
39949
|
+
(_a = inputRef.current) == null ? void 0 : _a.focus();
|
|
39950
|
+
};
|
|
39951
|
+
const hasStartContent = Boolean(startContent);
|
|
39952
|
+
const hasClear = clear && value.length > 0;
|
|
39953
|
+
const hasEndContent = Boolean(hasClear || loading || endContent);
|
|
39912
39954
|
return /* @__PURE__ */ jsxs(InputWrapper, { disabled, id: id ?? defaultId, label, labelColor, error: error2, orientation, dir, children: [
|
|
39913
|
-
/* @__PURE__ */ jsx(
|
|
39914
|
-
|
|
39915
|
-
|
|
39955
|
+
startContent && /* @__PURE__ */ jsx(InputStartContent, { onClick: handleStartContentClick, children: startContent }),
|
|
39956
|
+
/* @__PURE__ */ jsx(InputElement, { $hasStartContent: hasStartContent, $hasEndContent: hasEndContent, ref: mergeRefs([inputRef, ref]), type, id: id ?? defaultId, disabled, value, onChange, ...props }),
|
|
39957
|
+
hasEndContent && /* @__PURE__ */ jsxs(InputEndContent, { children: [
|
|
39958
|
+
endContent ? endContent : null,
|
|
39959
|
+
hasClear && /* @__PURE__ */ jsx(IconButton, { disabled, onClick: clearInput, "aria-label": "clear input", "data-testid": "textfield-clear", children: /* @__PURE__ */ jsx(SvgImage, { name: "cross", size: "sm" }) }),
|
|
39960
|
+
loading && /* @__PURE__ */ jsx(SvgImage, { name: "loading-animated", size: "sm" })
|
|
39961
|
+
] })
|
|
39916
39962
|
] });
|
|
39917
39963
|
});
|
|
39918
39964
|
const $ea1ef594cf570d83$export$439d29a4e110a164 = /* @__PURE__ */ forwardRef((props, forwardedRef) => {
|