@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.
@@ -1287,6 +1287,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
1287
1287
  /* @__PURE__ */ jsxRuntime.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" }),
1288
1288
  /* @__PURE__ */ jsxRuntime.jsx("path", { stroke: "#161517", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "m13.75 10.25-6 6" })
1289
1289
  ] });
1290
+ const Bold = (props) => /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: /* @__PURE__ */ jsxRuntime.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" }) });
1290
1291
  const Book = (props) => /* @__PURE__ */ jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", ...props, children: [
1291
1292
  /* @__PURE__ */ jsxRuntime.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" }),
1292
1293
  /* @__PURE__ */ jsxRuntime.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" })
@@ -1654,6 +1655,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
1654
1655
  /* @__PURE__ */ jsxRuntime.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" }),
1655
1656
  /* @__PURE__ */ jsxRuntime.jsx("path", { stroke: "#161517", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "m9.93 6.028.521 2.954-2.954.52" })
1656
1657
  ] });
1658
+ const Italic = (props) => /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M14.1821 18H5.45508H9.43508L14.5651 6H18.5451H9.81808", stroke: "#161517", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }) });
1657
1659
  const Key = (props) => /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: [
1658
1660
  /* @__PURE__ */ jsxRuntime.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" }),
1659
1661
  /* @__PURE__ */ jsxRuntime.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" })
@@ -1698,6 +1700,22 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
1698
1700
  /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M8 16L16 8", stroke: "white", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
1699
1701
  ] });
1700
1702
  };
1703
+ const ListBulleted = (props) => /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: [
1704
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M8.99902 6.43673H20.0036", stroke: "#161517", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }),
1705
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M20.0036 12.0002H8.99902", stroke: "#161517", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }),
1706
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M8.99902 17.5632H20.0036", stroke: "#161517", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }),
1707
+ /* @__PURE__ */ jsxRuntime.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" }),
1708
+ /* @__PURE__ */ jsxRuntime.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" }),
1709
+ /* @__PURE__ */ jsxRuntime.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" })
1710
+ ] });
1711
+ const ListNumbered = (props) => /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: [
1712
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M11 4H20", stroke: "#161517", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }),
1713
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M11.1504 9H20.0004", stroke: "#161517", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }),
1714
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M6.5 9H4H5.25V4L4 5.25", stroke: "#161517", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }),
1715
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M11 15H20", stroke: "#161517", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }),
1716
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M11.1504 20H20.0004", stroke: "#161517", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }),
1717
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M4 15H6.5V17L4 18.5V20H6.75", stroke: "#161517", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" })
1718
+ ] });
1701
1719
  const Loading = (props) => /* @__PURE__ */ jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", ...props, children: [
1702
1720
  /* @__PURE__ */ jsxRuntime.jsx("path", { stroke: "#161517", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.25, d: "M7.625 8.875H4.5V5.75" }),
1703
1721
  /* @__PURE__ */ jsxRuntime.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" }),
@@ -1916,6 +1934,10 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
1916
1934
  ] }),
1917
1935
  /* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsx("clipPath", { id: "clip0_7969_2214", children: /* @__PURE__ */ jsxRuntime.jsx("rect", { width: "24", height: "24", fill: "white" }) }) })
1918
1936
  ] });
1937
+ const Underline = (props) => /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: [
1938
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M6 20H18", stroke: "#161517", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }),
1939
+ /* @__PURE__ */ jsxRuntime.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" })
1940
+ ] });
1919
1941
  const Upgrade = (props) => /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: [
1920
1942
  /* @__PURE__ */ jsxRuntime.jsx("mask", { id: "path-1-inside-1_10418_503", fill: "white", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M16.1664 17.8179H7.83984V18.8864H16.1664V17.8179Z" }) }),
1921
1943
  /* @__PURE__ */ jsxRuntime.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)" }),
@@ -1955,6 +1977,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
1955
1977
  bell: Bell,
1956
1978
  beta: Beta,
1957
1979
  blog: Blog,
1980
+ bold: Bold,
1958
1981
  book: Book,
1959
1982
  brackets: Brackets,
1960
1983
  briefcase: Briefcase,
@@ -2029,6 +2052,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
2029
2052
  information: InformationIcon,
2030
2053
  "insert-row": InsertRowIcon,
2031
2054
  integrations: Integrations,
2055
+ italic: Italic,
2032
2056
  key: Key,
2033
2057
  keys: Keys,
2034
2058
  lifebuoy: Lifebuoy,
@@ -2036,6 +2060,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
2036
2060
  "light-bulb-on": LightBulbOn,
2037
2061
  lightening: Lightening,
2038
2062
  "line-in-circle": LineInCircle,
2063
+ "list-bulleted": ListBulleted,
2064
+ "list-numbered": ListNumbered,
2039
2065
  loading: LoadingFlipped,
2040
2066
  "loading-animated": LoadingAnimated,
2041
2067
  lock: Lock,
@@ -2083,6 +2109,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
2083
2109
  taxi: Taxi,
2084
2110
  trash: Trash,
2085
2111
  "tree-structure": TreeStructure,
2112
+ underline: Underline,
2086
2113
  upgrade: Upgrade,
2087
2114
  upload: Upload,
2088
2115
  url: Url,
@@ -17016,7 +17043,6 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
17016
17043
  resize: ${$resize};
17017
17044
  overflow: auto;
17018
17045
  `}
17019
- padding: 0 ${theme2.click.field.space.x};
17020
17046
  ${$error ? `
17021
17047
  font: ${theme2.click.field.typography.fieldText.error};
17022
17048
  border: 1px solid ${theme2.click.field.color.stroke.error};
@@ -17100,9 +17126,13 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
17100
17126
  const InputElement = pt.input.withConfig({
17101
17127
  componentId: "sc-1pvd2nj-2"
17102
17128
  })(["background:transparent;border:none;outline:none;width:100%;color:inherit;font:inherit;", ""], ({
17103
- theme: theme2
17129
+ theme: theme2,
17130
+ $hasStartContent,
17131
+ $hasEndContent
17104
17132
  }) => `
17105
17133
  padding: ${theme2.click.field.space.y} 0;
17134
+ padding-left: ${$hasStartContent ? "0" : theme2.click.field.space.x};
17135
+ padding-right: ${$hasEndContent ? "0" : theme2.click.field.space.x};
17106
17136
  &::placeholder {
17107
17137
  color: ${theme2.click.field.color.placeholder.default};
17108
17138
  }
@@ -17132,26 +17162,21 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
17132
17162
  })(["background:transparent;border:none;outline:none;width:100%;color:inherit;font:inherit;resize:none;", ""], ({
17133
17163
  theme: theme2
17134
17164
  }) => `
17135
- padding: ${theme2.click.field.space.y} 0;
17165
+ padding: ${theme2.click.field.space.y} ${theme2.click.field.space.x};
17136
17166
  align-self: stretch;
17137
17167
  &::placeholder {
17138
17168
  color: ${theme2.click.field.color.placeholder.default};
17139
17169
  }
17140
17170
  `);
17141
- pt(InputWrapper).withConfig({
17142
- componentId: "sc-1pvd2nj-5"
17143
- })(["resize:vertical;overflow:auto;color:red;"]);
17144
17171
  const IconButton = pt.button.withConfig({
17145
- componentId: "sc-1pvd2nj-6"
17172
+ componentId: "sc-1pvd2nj-5"
17146
17173
  })(["background:transparent;color:inherit;border:none;padding:0;outline:none;&:not(:disabled){cursor:pointer;}", ""], ({
17147
- theme: theme2,
17148
- $show
17174
+ theme: theme2
17149
17175
  }) => `
17150
17176
  padding: ${theme2.click.field.space.y} 0;
17151
- visibility: ${$show ? "visible" : "hidden"};
17152
17177
  `);
17153
17178
  pt.svg.withConfig({
17154
- componentId: "sc-1pvd2nj-7"
17179
+ componentId: "sc-1pvd2nj-6"
17155
17180
  })(["", ""], ({
17156
17181
  theme: theme2
17157
17182
  }) => `
@@ -17162,6 +17187,29 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
17162
17187
  padding-right: ${theme2.click.field.space.x};
17163
17188
  }
17164
17189
  `);
17190
+ const InputStartContent = pt.div.withConfig({
17191
+ componentId: "sc-1pvd2nj-7"
17192
+ })(["", ""], ({
17193
+ theme: theme2
17194
+ }) => `
17195
+ padding-left: ${theme2.click.field.space.x};
17196
+ cursor: text;
17197
+ gap: ${theme2.click.field.space.gap};
17198
+ display: flex;
17199
+ align-self: stretch;
17200
+ align-items: center;
17201
+ `);
17202
+ const InputEndContent = pt.div.withConfig({
17203
+ componentId: "sc-1pvd2nj-8"
17204
+ })(["", ""], ({
17205
+ theme: theme2
17206
+ }) => `
17207
+ padding-right: ${theme2.click.field.space.x};
17208
+ gap: ${theme2.click.field.space.gap};
17209
+ display: flex;
17210
+ align-self: stretch;
17211
+ align-items: center;
17212
+ `);
17165
17213
  const locale = "en-US";
17166
17214
  const selectedDateFormatter = new Intl.DateTimeFormat(locale, {
17167
17215
  day: "2-digit",
@@ -17187,8 +17235,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
17187
17235
  const defaultId = React.useId();
17188
17236
  const formattedSelectedDate = selectedDate instanceof Date ? selectedDateFormatter.format(selectedDate) : "";
17189
17237
  return /* @__PURE__ */ jsxRuntime.jsxs(HighlightedInputWrapper, { $isActive: isActive, disabled, id: id ?? defaultId, children: [
17190
- /* @__PURE__ */ jsxRuntime.jsx(SvgImage, { name: "calendar" }),
17191
- /* @__PURE__ */ jsxRuntime.jsx(InputElement, { "data-testid": "datepicker-input", placeholder, readOnly: true, value: formattedSelectedDate })
17238
+ /* @__PURE__ */ jsxRuntime.jsx(InputStartContent, { children: /* @__PURE__ */ jsxRuntime.jsx(SvgImage, { name: "calendar" }) }),
17239
+ /* @__PURE__ */ jsxRuntime.jsx(InputElement, { $hasStartContent: true, "data-testid": "datepicker-input", placeholder, readOnly: true, value: formattedSelectedDate })
17192
17240
  ] });
17193
17241
  };
17194
17242
  const weekdayFormatter = new Intl.DateTimeFormat(locale, {
@@ -35108,9 +35156,10 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
35108
35156
  const onChange = (e) => {
35109
35157
  onChangeProp(e.target.value, e);
35110
35158
  };
35159
+ const hasEndContent = value.length > 0;
35111
35160
  return /* @__PURE__ */ jsxRuntime.jsxs(InputWrapper, { disabled, id: id ?? defaultId, label, error: error2, orientation, dir, children: [
35112
- /* @__PURE__ */ jsxRuntime.jsx(InputElement, { ref, type: viewPassword ? "text" : "password", id: id ?? defaultId, disabled, value, onChange, ...props }),
35113
- /* @__PURE__ */ jsxRuntime.jsx(IconButton, { disabled, onClick: togglePasswordViewer, $show: value.length > 0, children: /* @__PURE__ */ jsxRuntime.jsx(SvgImage, { name: viewPassword ? "eye-closed" : "eye", size: "md" }) })
35161
+ /* @__PURE__ */ jsxRuntime.jsx(InputElement, { $hasStartContent: false, $hasEndContent: hasEndContent, ref, type: viewPassword ? "text" : "password", id: id ?? defaultId, disabled, value, onChange, ...props }),
35162
+ hasEndContent && /* @__PURE__ */ jsxRuntime.jsx(InputEndContent, { children: /* @__PURE__ */ jsxRuntime.jsx(IconButton, { disabled, onClick: togglePasswordViewer, children: /* @__PURE__ */ jsxRuntime.jsx(SvgImage, { name: viewPassword ? "eye-closed" : "eye", size: "md" }) }) })
35114
35163
  ] });
35115
35164
  });
35116
35165
  const CustomSelect = pt.div.withConfig({
@@ -35269,7 +35318,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
35269
35318
  $progress,
35270
35319
  $type
35271
35320
  }) => `
35272
- 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%)`};
35321
+ 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%)`};
35273
35322
  background-size: calc(100% + 2px);
35274
35323
  background-position: center;
35275
35324
  gap: ${theme2.click.field.space.gap};
@@ -35626,38 +35675,16 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
35626
35675
  }
35627
35676
  `);
35628
35677
  const SearchField = React.forwardRef(({
35629
- disabled,
35630
- label,
35631
- error: error2,
35632
- id,
35633
- loading,
35634
- clear = true,
35635
- value = "",
35636
- onChange: onChangeProp,
35637
- orientation,
35638
- dir,
35639
35678
  isFilter = false,
35679
+ clear = true,
35640
35680
  ...props
35641
35681
  }, ref) => {
35642
- const inputRef = React.useRef(null);
35643
- const defaultId = React.useId();
35644
- const onChange = (e) => {
35645
- onChangeProp(e.target.value, e);
35646
- };
35647
- const clearInput = () => {
35648
- onChangeProp("");
35649
- };
35650
- return /* @__PURE__ */ jsxRuntime.jsxs(InputWrapper, { disabled, id: id ?? defaultId, label, error: error2, orientation, dir, children: [
35651
- /* @__PURE__ */ jsxRuntime.jsx(SvgImage, { name: isFilter ? "filter" : "search", size: "sm" }),
35652
- /* @__PURE__ */ jsxRuntime.jsx(InputElement, { ref: mergeRefs([inputRef, ref]), type: "text", id: id ?? defaultId, disabled, value, onChange, ...props }),
35653
- clear && /* @__PURE__ */ jsxRuntime.jsx(IconButton, { disabled, onClick: clearInput, $show: value.length > 0, "aria-label": "clear input", "data-testid": "search-close", children: /* @__PURE__ */ jsxRuntime.jsx(SvgImage, { name: "cross", size: "sm" }) }),
35654
- loading && /* @__PURE__ */ jsxRuntime.jsx(SvgImage, { name: "loading-animated", size: "sm" })
35655
- ] });
35682
+ return /* @__PURE__ */ jsxRuntime.jsx(TextField, { startContent: /* @__PURE__ */ jsxRuntime.jsx(SvgImage, { name: isFilter ? "filter" : "search", size: "sm" }), clear, ref, ...props });
35656
35683
  });
35657
35684
  const useUpdateEffect = (effect, deps) => {
35658
35685
  const isFirstMount = React.useRef(true);
35659
35686
  React.useEffect(() => {
35660
- if (isFirstMount) {
35687
+ if (isFirstMount.current) {
35661
35688
  isFirstMount.current = false;
35662
35689
  return;
35663
35690
  }
@@ -39483,15 +39510,24 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
39483
39510
  selectedValues,
39484
39511
  onSelect
39485
39512
  } = useOption();
39486
- const onSelectValue = (evt) => {
39513
+ const handleSelect = (evt) => {
39487
39514
  if (!disabled) {
39488
39515
  onSelect(value, void 0, evt);
39489
- if (typeof onSelectProp == "function") {
39516
+ if (typeof onSelectProp === "function") {
39490
39517
  onSelectProp(value, void 0, evt);
39491
39518
  }
39492
39519
  }
39493
39520
  };
39494
- const onMouseOver = (e) => {
39521
+ const handleMenuItemClick = (evt) => {
39522
+ if (evt.target !== evt.currentTarget) {
39523
+ return;
39524
+ }
39525
+ handleSelect(evt);
39526
+ };
39527
+ const handleCheckboxClick = (evt) => {
39528
+ handleSelect(evt);
39529
+ };
39530
+ const handleMenuItemMouseOver = (e) => {
39495
39531
  if (onMouseOverProp) {
39496
39532
  onMouseOverProp(e);
39497
39533
  }
@@ -39503,11 +39539,8 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
39503
39539
  return null;
39504
39540
  }
39505
39541
  const isChecked = selectedValues.includes(value);
39506
- const onChange = () => {
39507
- onSelect(value);
39508
- };
39509
39542
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
39510
- /* @__PURE__ */ jsxRuntime.jsxs(GenericMenuItem, { ...props, "data-value": value, onClick: onSelectValue, onMouseOver, 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: [
39543
+ /* @__PURE__ */ jsxRuntime.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: [
39511
39544
  icon && iconDir === "start" && /* @__PURE__ */ jsxRuntime.jsx(Checkbox, { checked: isChecked, "data-testid": "multi-select-checkbox", disabled, label: label ? /* @__PURE__ */ jsxRuntime.jsxs("div", { style: {
39512
39545
  display: "flex",
39513
39546
  justifyContent: "center"
@@ -39520,9 +39553,9 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
39520
39553
  }, children: [
39521
39554
  /* @__PURE__ */ jsxRuntime.jsx(SvgImage, { name: icon, size: "sm" }),
39522
39555
  children
39523
- ] }), onClick: onChange, variant: variant ?? "default" }),
39524
- icon && iconDir === "end" && /* @__PURE__ */ jsxRuntime.jsx(IconWrapper$3, { icon, iconDir: "end", children: /* @__PURE__ */ jsxRuntime.jsx(Checkbox, { checked: isChecked, "data-testid": "multi-select-checkbox", disabled, label: label ?? children, onClick: onChange, variant: variant ?? "default" }) }),
39525
- !icon && /* @__PURE__ */ jsxRuntime.jsx(Checkbox, { checked: isChecked, "data-testid": "multi-select-checkbox", disabled, label: label ?? children, onClick: onChange, variant: variant ?? "default" })
39556
+ ] }), onClick: handleCheckboxClick, variant: variant ?? "default" }),
39557
+ icon && iconDir === "end" && /* @__PURE__ */ jsxRuntime.jsx(IconWrapper$3, { icon, iconDir: "end", children: /* @__PURE__ */ jsxRuntime.jsx(Checkbox, { checked: isChecked, "data-testid": "multi-select-checkbox", disabled, label: label ?? children, onClick: handleCheckboxClick, variant: variant ?? "default" }) }),
39558
+ !icon && /* @__PURE__ */ jsxRuntime.jsx(Checkbox, { checked: isChecked, "data-testid": "multi-select-checkbox", disabled, label: label ?? children, onClick: handleCheckboxClick, variant: variant ?? "default" })
39526
39559
  ] }),
39527
39560
  separator && /* @__PURE__ */ jsxRuntime.jsx(Separator, { size: "sm" })
39528
39561
  ] });
@@ -41083,6 +41116,8 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
41083
41116
  onChange: onChangeProp,
41084
41117
  orientation,
41085
41118
  dir,
41119
+ startContent,
41120
+ endContent,
41086
41121
  ...props
41087
41122
  }, ref) => {
41088
41123
  const inputRef = React.useRef(null);
@@ -41093,10 +41128,21 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
41093
41128
  const clearInput = () => {
41094
41129
  onChangeProp("");
41095
41130
  };
41131
+ const handleStartContentClick = () => {
41132
+ var _a;
41133
+ (_a = inputRef.current) == null ? void 0 : _a.focus();
41134
+ };
41135
+ const hasStartContent = Boolean(startContent);
41136
+ const hasClear = clear && value.length > 0;
41137
+ const hasEndContent = Boolean(hasClear || loading || endContent);
41096
41138
  return /* @__PURE__ */ jsxRuntime.jsxs(InputWrapper, { disabled, id: id ?? defaultId, label, labelColor, error: error2, orientation, dir, children: [
41097
- /* @__PURE__ */ jsxRuntime.jsx(InputElement, { ref: mergeRefs([inputRef, ref]), type, id: id ?? defaultId, disabled, value, onChange, ...props }),
41098
- clear && /* @__PURE__ */ jsxRuntime.jsx(IconButton, { disabled, onClick: clearInput, $show: value.length > 0, "aria-label": "clear input", children: /* @__PURE__ */ jsxRuntime.jsx(SvgImage, { name: "cross", size: "sm" }) }),
41099
- loading && /* @__PURE__ */ jsxRuntime.jsx(SvgImage, { name: "loading-animated", size: "sm" })
41139
+ startContent && /* @__PURE__ */ jsxRuntime.jsx(InputStartContent, { onClick: handleStartContentClick, children: startContent }),
41140
+ /* @__PURE__ */ jsxRuntime.jsx(InputElement, { $hasStartContent: hasStartContent, $hasEndContent: hasEndContent, ref: mergeRefs([inputRef, ref]), type, id: id ?? defaultId, disabled, value, onChange, ...props }),
41141
+ hasEndContent && /* @__PURE__ */ jsxRuntime.jsxs(InputEndContent, { children: [
41142
+ endContent ? endContent : null,
41143
+ hasClear && /* @__PURE__ */ jsxRuntime.jsx(IconButton, { disabled, onClick: clearInput, "aria-label": "clear input", "data-testid": "textfield-clear", children: /* @__PURE__ */ jsxRuntime.jsx(SvgImage, { name: "cross", size: "sm" }) }),
41144
+ loading && /* @__PURE__ */ jsxRuntime.jsx(SvgImage, { name: "loading-animated", size: "sm" })
41145
+ ] })
41100
41146
  ] });
41101
41147
  });
41102
41148
  const $ea1ef594cf570d83$export$439d29a4e110a164 = /* @__PURE__ */ React.forwardRef((props, forwardedRef) => {