@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.
@@ -1271,6 +1271,7 @@ const Blog = (props) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/
1271
1271
  /* @__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" }),
1272
1272
  /* @__PURE__ */ jsx("path", { stroke: "#161517", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "m13.75 10.25-6 6" })
1273
1273
  ] });
1274
+ 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" }) });
1274
1275
  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: [
1275
1276
  /* @__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" }),
1276
1277
  /* @__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" })
@@ -1638,6 +1639,7 @@ const Integrations = (props) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www
1638
1639
  /* @__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" }),
1639
1640
  /* @__PURE__ */ jsx("path", { stroke: "#161517", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "m9.93 6.028.521 2.954-2.954.52" })
1640
1641
  ] });
1642
+ 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" }) });
1641
1643
  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: [
1642
1644
  /* @__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" }),
1643
1645
  /* @__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" })
@@ -1682,6 +1684,22 @@ const LineInCircle = (props) => {
1682
1684
  /* @__PURE__ */ jsx("path", { d: "M8 16L16 8", stroke: "white", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
1683
1685
  ] });
1684
1686
  };
1687
+ 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: [
1688
+ /* @__PURE__ */ jsx("path", { d: "M8.99902 6.43673H20.0036", stroke: "#161517", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }),
1689
+ /* @__PURE__ */ jsx("path", { d: "M20.0036 12.0002H8.99902", stroke: "#161517", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }),
1690
+ /* @__PURE__ */ jsx("path", { d: "M8.99902 17.5632H20.0036", stroke: "#161517", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }),
1691
+ /* @__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" }),
1692
+ /* @__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" }),
1693
+ /* @__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" })
1694
+ ] });
1695
+ 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: [
1696
+ /* @__PURE__ */ jsx("path", { d: "M11 4H20", stroke: "#161517", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }),
1697
+ /* @__PURE__ */ jsx("path", { d: "M11.1504 9H20.0004", stroke: "#161517", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }),
1698
+ /* @__PURE__ */ jsx("path", { d: "M6.5 9H4H5.25V4L4 5.25", stroke: "#161517", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }),
1699
+ /* @__PURE__ */ jsx("path", { d: "M11 15H20", stroke: "#161517", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }),
1700
+ /* @__PURE__ */ jsx("path", { d: "M11.1504 20H20.0004", stroke: "#161517", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }),
1701
+ /* @__PURE__ */ jsx("path", { d: "M4 15H6.5V17L4 18.5V20H6.75", stroke: "#161517", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" })
1702
+ ] });
1685
1703
  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: [
1686
1704
  /* @__PURE__ */ jsx("path", { stroke: "#161517", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.25, d: "M7.625 8.875H4.5V5.75" }),
1687
1705
  /* @__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" }),
@@ -1900,6 +1918,10 @@ const TreeStructure = (props) => /* @__PURE__ */ jsxs("svg", { width: "24", heig
1900
1918
  ] }),
1901
1919
  /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: "clip0_7969_2214", children: /* @__PURE__ */ jsx("rect", { width: "24", height: "24", fill: "white" }) }) })
1902
1920
  ] });
1921
+ 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: [
1922
+ /* @__PURE__ */ jsx("path", { d: "M6 20H18", stroke: "#161517", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }),
1923
+ /* @__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" })
1924
+ ] });
1903
1925
  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: [
1904
1926
  /* @__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" }) }),
1905
1927
  /* @__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)" }),
@@ -1939,6 +1961,7 @@ const ICONS_MAP = {
1939
1961
  bell: Bell,
1940
1962
  beta: Beta,
1941
1963
  blog: Blog,
1964
+ bold: Bold,
1942
1965
  book: Book,
1943
1966
  brackets: Brackets,
1944
1967
  briefcase: Briefcase,
@@ -2013,6 +2036,7 @@ const ICONS_MAP = {
2013
2036
  information: InformationIcon,
2014
2037
  "insert-row": InsertRowIcon,
2015
2038
  integrations: Integrations,
2039
+ italic: Italic,
2016
2040
  key: Key,
2017
2041
  keys: Keys,
2018
2042
  lifebuoy: Lifebuoy,
@@ -2020,6 +2044,8 @@ const ICONS_MAP = {
2020
2044
  "light-bulb-on": LightBulbOn,
2021
2045
  lightening: Lightening,
2022
2046
  "line-in-circle": LineInCircle,
2047
+ "list-bulleted": ListBulleted,
2048
+ "list-numbered": ListNumbered,
2023
2049
  loading: LoadingFlipped,
2024
2050
  "loading-animated": LoadingAnimated,
2025
2051
  lock: Lock,
@@ -2067,6 +2093,7 @@ const ICONS_MAP = {
2067
2093
  taxi: Taxi,
2068
2094
  trash: Trash,
2069
2095
  "tree-structure": TreeStructure,
2096
+ underline: Underline,
2070
2097
  upgrade: Upgrade,
2071
2098
  upload: Upload,
2072
2099
  url: Url,
@@ -17000,7 +17027,6 @@ const Wrapper$3 = pt.div.withConfig({
17000
17027
  resize: ${$resize};
17001
17028
  overflow: auto;
17002
17029
  `}
17003
- padding: 0 ${theme2.click.field.space.x};
17004
17030
  ${$error ? `
17005
17031
  font: ${theme2.click.field.typography.fieldText.error};
17006
17032
  border: 1px solid ${theme2.click.field.color.stroke.error};
@@ -17084,9 +17110,13 @@ const InputWrapper = ({
17084
17110
  const InputElement = pt.input.withConfig({
17085
17111
  componentId: "sc-1pvd2nj-2"
17086
17112
  })(["background:transparent;border:none;outline:none;width:100%;color:inherit;font:inherit;", ""], ({
17087
- theme: theme2
17113
+ theme: theme2,
17114
+ $hasStartContent,
17115
+ $hasEndContent
17088
17116
  }) => `
17089
17117
  padding: ${theme2.click.field.space.y} 0;
17118
+ padding-left: ${$hasStartContent ? "0" : theme2.click.field.space.x};
17119
+ padding-right: ${$hasEndContent ? "0" : theme2.click.field.space.x};
17090
17120
  &::placeholder {
17091
17121
  color: ${theme2.click.field.color.placeholder.default};
17092
17122
  }
@@ -17116,26 +17146,21 @@ const TextAreaElement = pt.textarea.withConfig({
17116
17146
  })(["background:transparent;border:none;outline:none;width:100%;color:inherit;font:inherit;resize:none;", ""], ({
17117
17147
  theme: theme2
17118
17148
  }) => `
17119
- padding: ${theme2.click.field.space.y} 0;
17149
+ padding: ${theme2.click.field.space.y} ${theme2.click.field.space.x};
17120
17150
  align-self: stretch;
17121
17151
  &::placeholder {
17122
17152
  color: ${theme2.click.field.color.placeholder.default};
17123
17153
  }
17124
17154
  `);
17125
- pt(InputWrapper).withConfig({
17126
- componentId: "sc-1pvd2nj-5"
17127
- })(["resize:vertical;overflow:auto;color:red;"]);
17128
17155
  const IconButton = pt.button.withConfig({
17129
- componentId: "sc-1pvd2nj-6"
17156
+ componentId: "sc-1pvd2nj-5"
17130
17157
  })(["background:transparent;color:inherit;border:none;padding:0;outline:none;&:not(:disabled){cursor:pointer;}", ""], ({
17131
- theme: theme2,
17132
- $show
17158
+ theme: theme2
17133
17159
  }) => `
17134
17160
  padding: ${theme2.click.field.space.y} 0;
17135
- visibility: ${$show ? "visible" : "hidden"};
17136
17161
  `);
17137
17162
  pt.svg.withConfig({
17138
- componentId: "sc-1pvd2nj-7"
17163
+ componentId: "sc-1pvd2nj-6"
17139
17164
  })(["", ""], ({
17140
17165
  theme: theme2
17141
17166
  }) => `
@@ -17146,6 +17171,29 @@ pt.svg.withConfig({
17146
17171
  padding-right: ${theme2.click.field.space.x};
17147
17172
  }
17148
17173
  `);
17174
+ const InputStartContent = pt.div.withConfig({
17175
+ componentId: "sc-1pvd2nj-7"
17176
+ })(["", ""], ({
17177
+ theme: theme2
17178
+ }) => `
17179
+ padding-left: ${theme2.click.field.space.x};
17180
+ cursor: text;
17181
+ gap: ${theme2.click.field.space.gap};
17182
+ display: flex;
17183
+ align-self: stretch;
17184
+ align-items: center;
17185
+ `);
17186
+ const InputEndContent = pt.div.withConfig({
17187
+ componentId: "sc-1pvd2nj-8"
17188
+ })(["", ""], ({
17189
+ theme: theme2
17190
+ }) => `
17191
+ padding-right: ${theme2.click.field.space.x};
17192
+ gap: ${theme2.click.field.space.gap};
17193
+ display: flex;
17194
+ align-self: stretch;
17195
+ align-items: center;
17196
+ `);
17149
17197
  const locale = "en-US";
17150
17198
  const selectedDateFormatter = new Intl.DateTimeFormat(locale, {
17151
17199
  day: "2-digit",
@@ -17171,8 +17219,8 @@ const DatePickerInput = ({
17171
17219
  const defaultId = useId();
17172
17220
  const formattedSelectedDate = selectedDate instanceof Date ? selectedDateFormatter.format(selectedDate) : "";
17173
17221
  return /* @__PURE__ */ jsxs(HighlightedInputWrapper, { $isActive: isActive, disabled, id: id ?? defaultId, children: [
17174
- /* @__PURE__ */ jsx(SvgImage, { name: "calendar" }),
17175
- /* @__PURE__ */ jsx(InputElement, { "data-testid": "datepicker-input", placeholder, readOnly: true, value: formattedSelectedDate })
17222
+ /* @__PURE__ */ jsx(InputStartContent, { children: /* @__PURE__ */ jsx(SvgImage, { name: "calendar" }) }),
17223
+ /* @__PURE__ */ jsx(InputElement, { $hasStartContent: true, "data-testid": "datepicker-input", placeholder, readOnly: true, value: formattedSelectedDate })
17176
17224
  ] });
17177
17225
  };
17178
17226
  const weekdayFormatter = new Intl.DateTimeFormat(locale, {
@@ -35092,9 +35140,10 @@ const PasswordField = forwardRef(({
35092
35140
  const onChange = (e) => {
35093
35141
  onChangeProp(e.target.value, e);
35094
35142
  };
35143
+ const hasEndContent = value.length > 0;
35095
35144
  return /* @__PURE__ */ jsxs(InputWrapper, { disabled, id: id ?? defaultId, label, error: error2, orientation, dir, children: [
35096
- /* @__PURE__ */ jsx(InputElement, { ref, type: viewPassword ? "text" : "password", id: id ?? defaultId, disabled, value, onChange, ...props }),
35097
- /* @__PURE__ */ jsx(IconButton, { disabled, onClick: togglePasswordViewer, $show: value.length > 0, children: /* @__PURE__ */ jsx(SvgImage, { name: viewPassword ? "eye-closed" : "eye", size: "md" }) })
35145
+ /* @__PURE__ */ jsx(InputElement, { $hasStartContent: false, $hasEndContent: hasEndContent, ref, type: viewPassword ? "text" : "password", id: id ?? defaultId, disabled, value, onChange, ...props }),
35146
+ hasEndContent && /* @__PURE__ */ jsx(InputEndContent, { children: /* @__PURE__ */ jsx(IconButton, { disabled, onClick: togglePasswordViewer, children: /* @__PURE__ */ jsx(SvgImage, { name: viewPassword ? "eye-closed" : "eye", size: "md" }) }) })
35098
35147
  ] });
35099
35148
  });
35100
35149
  const CustomSelect = pt.div.withConfig({
@@ -35253,7 +35302,7 @@ const ProgressContainer = pt.div.withConfig({
35253
35302
  $progress,
35254
35303
  $type
35255
35304
  }) => `
35256
- 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%)`};
35305
+ 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%)`};
35257
35306
  background-size: calc(100% + 2px);
35258
35307
  background-position: center;
35259
35308
  gap: ${theme2.click.field.space.gap};
@@ -35610,38 +35659,16 @@ const RadioGroupIndicator = pt($f99a8c78507165f7$export$adb584737d712b70).withCo
35610
35659
  }
35611
35660
  `);
35612
35661
  const SearchField = forwardRef(({
35613
- disabled,
35614
- label,
35615
- error: error2,
35616
- id,
35617
- loading,
35618
- clear = true,
35619
- value = "",
35620
- onChange: onChangeProp,
35621
- orientation,
35622
- dir,
35623
35662
  isFilter = false,
35663
+ clear = true,
35624
35664
  ...props
35625
35665
  }, ref) => {
35626
- const inputRef = useRef(null);
35627
- const defaultId = useId();
35628
- const onChange = (e) => {
35629
- onChangeProp(e.target.value, e);
35630
- };
35631
- const clearInput = () => {
35632
- onChangeProp("");
35633
- };
35634
- return /* @__PURE__ */ jsxs(InputWrapper, { disabled, id: id ?? defaultId, label, error: error2, orientation, dir, children: [
35635
- /* @__PURE__ */ jsx(SvgImage, { name: isFilter ? "filter" : "search", size: "sm" }),
35636
- /* @__PURE__ */ jsx(InputElement, { ref: mergeRefs([inputRef, ref]), type: "text", id: id ?? defaultId, disabled, value, onChange, ...props }),
35637
- 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" }) }),
35638
- loading && /* @__PURE__ */ jsx(SvgImage, { name: "loading-animated", size: "sm" })
35639
- ] });
35666
+ return /* @__PURE__ */ jsx(TextField, { startContent: /* @__PURE__ */ jsx(SvgImage, { name: isFilter ? "filter" : "search", size: "sm" }), clear, ref, ...props });
35640
35667
  });
35641
35668
  const useUpdateEffect = (effect, deps) => {
35642
35669
  const isFirstMount = useRef(true);
35643
35670
  useEffect(() => {
35644
- if (isFirstMount) {
35671
+ if (isFirstMount.current) {
35645
35672
  isFirstMount.current = false;
35646
35673
  return;
35647
35674
  }
@@ -39467,15 +39494,24 @@ const MultiSelectCheckboxItem = forwardRef(({
39467
39494
  selectedValues,
39468
39495
  onSelect
39469
39496
  } = useOption();
39470
- const onSelectValue = (evt) => {
39497
+ const handleSelect = (evt) => {
39471
39498
  if (!disabled) {
39472
39499
  onSelect(value, void 0, evt);
39473
- if (typeof onSelectProp == "function") {
39500
+ if (typeof onSelectProp === "function") {
39474
39501
  onSelectProp(value, void 0, evt);
39475
39502
  }
39476
39503
  }
39477
39504
  };
39478
- const onMouseOver = (e) => {
39505
+ const handleMenuItemClick = (evt) => {
39506
+ if (evt.target !== evt.currentTarget) {
39507
+ return;
39508
+ }
39509
+ handleSelect(evt);
39510
+ };
39511
+ const handleCheckboxClick = (evt) => {
39512
+ handleSelect(evt);
39513
+ };
39514
+ const handleMenuItemMouseOver = (e) => {
39479
39515
  if (onMouseOverProp) {
39480
39516
  onMouseOverProp(e);
39481
39517
  }
@@ -39487,11 +39523,8 @@ const MultiSelectCheckboxItem = forwardRef(({
39487
39523
  return null;
39488
39524
  }
39489
39525
  const isChecked = selectedValues.includes(value);
39490
- const onChange = () => {
39491
- onSelect(value);
39492
- };
39493
39526
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [
39494
- /* @__PURE__ */ 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: [
39527
+ /* @__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: [
39495
39528
  icon && iconDir === "start" && /* @__PURE__ */ jsx(Checkbox, { checked: isChecked, "data-testid": "multi-select-checkbox", disabled, label: label ? /* @__PURE__ */ jsxs("div", { style: {
39496
39529
  display: "flex",
39497
39530
  justifyContent: "center"
@@ -39504,9 +39537,9 @@ const MultiSelectCheckboxItem = forwardRef(({
39504
39537
  }, children: [
39505
39538
  /* @__PURE__ */ jsx(SvgImage, { name: icon, size: "sm" }),
39506
39539
  children
39507
- ] }), onClick: onChange, variant: variant ?? "default" }),
39508
- 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: onChange, variant: variant ?? "default" }) }),
39509
- !icon && /* @__PURE__ */ jsx(Checkbox, { checked: isChecked, "data-testid": "multi-select-checkbox", disabled, label: label ?? children, onClick: onChange, variant: variant ?? "default" })
39540
+ ] }), onClick: handleCheckboxClick, variant: variant ?? "default" }),
39541
+ 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" }) }),
39542
+ !icon && /* @__PURE__ */ jsx(Checkbox, { checked: isChecked, "data-testid": "multi-select-checkbox", disabled, label: label ?? children, onClick: handleCheckboxClick, variant: variant ?? "default" })
39510
39543
  ] }),
39511
39544
  separator && /* @__PURE__ */ jsx(Separator, { size: "sm" })
39512
39545
  ] });
@@ -41067,6 +41100,8 @@ const TextField = forwardRef(({
41067
41100
  onChange: onChangeProp,
41068
41101
  orientation,
41069
41102
  dir,
41103
+ startContent,
41104
+ endContent,
41070
41105
  ...props
41071
41106
  }, ref) => {
41072
41107
  const inputRef = useRef(null);
@@ -41077,10 +41112,21 @@ const TextField = forwardRef(({
41077
41112
  const clearInput = () => {
41078
41113
  onChangeProp("");
41079
41114
  };
41115
+ const handleStartContentClick = () => {
41116
+ var _a;
41117
+ (_a = inputRef.current) == null ? void 0 : _a.focus();
41118
+ };
41119
+ const hasStartContent = Boolean(startContent);
41120
+ const hasClear = clear && value.length > 0;
41121
+ const hasEndContent = Boolean(hasClear || loading || endContent);
41080
41122
  return /* @__PURE__ */ jsxs(InputWrapper, { disabled, id: id ?? defaultId, label, labelColor, error: error2, orientation, dir, children: [
41081
- /* @__PURE__ */ jsx(InputElement, { ref: mergeRefs([inputRef, ref]), type, id: id ?? defaultId, disabled, value, onChange, ...props }),
41082
- clear && /* @__PURE__ */ jsx(IconButton, { disabled, onClick: clearInput, $show: value.length > 0, "aria-label": "clear input", children: /* @__PURE__ */ jsx(SvgImage, { name: "cross", size: "sm" }) }),
41083
- loading && /* @__PURE__ */ jsx(SvgImage, { name: "loading-animated", size: "sm" })
41123
+ startContent && /* @__PURE__ */ jsx(InputStartContent, { onClick: handleStartContentClick, children: startContent }),
41124
+ /* @__PURE__ */ jsx(InputElement, { $hasStartContent: hasStartContent, $hasEndContent: hasEndContent, ref: mergeRefs([inputRef, ref]), type, id: id ?? defaultId, disabled, value, onChange, ...props }),
41125
+ hasEndContent && /* @__PURE__ */ jsxs(InputEndContent, { children: [
41126
+ endContent ? endContent : null,
41127
+ hasClear && /* @__PURE__ */ jsx(IconButton, { disabled, onClick: clearInput, "aria-label": "clear input", "data-testid": "textfield-clear", children: /* @__PURE__ */ jsx(SvgImage, { name: "cross", size: "sm" }) }),
41128
+ loading && /* @__PURE__ */ jsx(SvgImage, { name: "loading-animated", size: "sm" })
41129
+ ] })
41084
41130
  ] });
41085
41131
  });
41086
41132
  const $ea1ef594cf570d83$export$439d29a4e110a164 = /* @__PURE__ */ forwardRef((props, forwardedRef) => {