@flamingo-stack/openframe-frontend-core 0.0.659-2347.6820.1 → 0.0.659

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.
Files changed (116) hide show
  1. package/dist/{chunk-D4Z7TYWU.js → chunk-2DLM3NXE.js} +4 -4
  2. package/dist/{chunk-NIKCNKD2.js → chunk-6DVSTVUU.js} +6 -6
  3. package/dist/{chunk-VAXW73AH.js → chunk-6KR74SOJ.js} +2 -2
  4. package/dist/{chunk-VZLPXDYN.cjs → chunk-AOOORZI5.cjs} +3 -3
  5. package/dist/{chunk-VZLPXDYN.cjs.map → chunk-AOOORZI5.cjs.map} +1 -1
  6. package/dist/{chunk-DMJ636H5.js → chunk-APWQTZCR.js} +2 -2
  7. package/dist/chunk-BXWXBBAC.js +228 -0
  8. package/dist/chunk-BXWXBBAC.js.map +1 -0
  9. package/dist/{chunk-JBL365GX.js → chunk-E7C3F2SK.js} +237 -223
  10. package/dist/chunk-E7C3F2SK.js.map +1 -0
  11. package/dist/{chunk-VXTTNIRO.cjs → chunk-EOGXNLZC.cjs} +17 -17
  12. package/dist/{chunk-VXTTNIRO.cjs.map → chunk-EOGXNLZC.cjs.map} +1 -1
  13. package/dist/{chunk-BOZSCBHS.cjs → chunk-GDHV5W5C.cjs} +33 -33
  14. package/dist/{chunk-BOZSCBHS.cjs.map → chunk-GDHV5W5C.cjs.map} +1 -1
  15. package/dist/{chunk-FLWYFXNK.cjs → chunk-ITVLOEGF.cjs} +55 -55
  16. package/dist/{chunk-FLWYFXNK.cjs.map → chunk-ITVLOEGF.cjs.map} +1 -1
  17. package/dist/{chunk-K5HPBVUH.cjs → chunk-K4W3II7M.cjs} +3 -3
  18. package/dist/{chunk-K5HPBVUH.cjs.map → chunk-K4W3II7M.cjs.map} +1 -1
  19. package/dist/{chunk-J7OY7QBA.js → chunk-KP4K6I5O.js} +3 -3
  20. package/dist/{chunk-XBPTM4IT.cjs → chunk-L4YJU3AG.cjs} +16 -16
  21. package/dist/{chunk-XBPTM4IT.cjs.map → chunk-L4YJU3AG.cjs.map} +1 -1
  22. package/dist/{chunk-FXUFGHVU.js → chunk-MEFCA6VD.js} +2 -2
  23. package/dist/{chunk-S5OQILYF.js → chunk-MW7LEMFG.js} +2 -2
  24. package/dist/{chunk-PDLHEQ6C.cjs → chunk-NXAXZPEO.cjs} +10 -10
  25. package/dist/{chunk-PDLHEQ6C.cjs.map → chunk-NXAXZPEO.cjs.map} +1 -1
  26. package/dist/{chunk-I6Q5RA5M.js → chunk-P2ROGTMF.js} +2 -2
  27. package/dist/{chunk-ZUOXB5YX.cjs → chunk-PUE4XMZK.cjs} +279 -265
  28. package/dist/chunk-PUE4XMZK.cjs.map +1 -0
  29. package/dist/chunk-QVSVRG7I.cjs +228 -0
  30. package/dist/chunk-QVSVRG7I.cjs.map +1 -0
  31. package/dist/{chunk-XNR7DJP3.js → chunk-QVZD2LLU.js} +4 -4
  32. package/dist/{chunk-3CTLV2BR.cjs → chunk-RRGTBH3L.cjs} +3 -3
  33. package/dist/{chunk-3CTLV2BR.cjs.map → chunk-RRGTBH3L.cjs.map} +1 -1
  34. package/dist/{chunk-7Q4UWN5X.js → chunk-T6LNAX4R.js} +3 -3
  35. package/dist/{chunk-TUXQWRF7.cjs → chunk-UIAXQJPV.cjs} +24 -24
  36. package/dist/{chunk-TUXQWRF7.cjs.map → chunk-UIAXQJPV.cjs.map} +1 -1
  37. package/dist/{chunk-ALMCR73J.js → chunk-VFGBRGFB.js} +3 -3
  38. package/dist/{chunk-5IXTYDUH.cjs → chunk-VJMPYY5O.cjs} +18 -18
  39. package/dist/{chunk-5IXTYDUH.cjs.map → chunk-VJMPYY5O.cjs.map} +1 -1
  40. package/dist/{chunk-XGJUNSUY.js → chunk-VVOI2OC3.js} +2 -2
  41. package/dist/{chunk-MCGLT2GN.cjs → chunk-VW7NXM2O.cjs} +36 -36
  42. package/dist/{chunk-MCGLT2GN.cjs.map → chunk-VW7NXM2O.cjs.map} +1 -1
  43. package/dist/{chunk-WK4464NX.cjs → chunk-VWGFJJD6.cjs} +4 -4
  44. package/dist/{chunk-WK4464NX.cjs.map → chunk-VWGFJJD6.cjs.map} +1 -1
  45. package/dist/{chunk-NP2XVKA6.cjs → chunk-WMIB6JSA.cjs} +4 -4
  46. package/dist/{chunk-NP2XVKA6.cjs.map → chunk-WMIB6JSA.cjs.map} +1 -1
  47. package/dist/{chunk-OTDNJTDJ.js → chunk-WWEQT2WX.js} +5 -5
  48. package/dist/{chunk-XRD5FFHK.cjs → chunk-Z7NI2TQD.cjs} +3 -3
  49. package/dist/{chunk-XRD5FFHK.cjs.map → chunk-Z7NI2TQD.cjs.map} +1 -1
  50. package/dist/{chunk-CCGP4PRB.js → chunk-ZT3CZCDS.js} +2 -2
  51. package/dist/components/case-studies/index.cjs +12 -12
  52. package/dist/components/case-studies/index.js +3 -3
  53. package/dist/components/contact/index.cjs +4 -4
  54. package/dist/components/contact/index.js +3 -3
  55. package/dist/components/docs/index.cjs +7 -7
  56. package/dist/components/docs/index.js +6 -6
  57. package/dist/components/embeds/index.cjs +4 -4
  58. package/dist/components/embeds/index.js +3 -3
  59. package/dist/components/faq/index.cjs +4 -4
  60. package/dist/components/faq/index.js +3 -3
  61. package/dist/components/features/index.cjs +3 -3
  62. package/dist/components/features/index.js +2 -2
  63. package/dist/components/help-center-pages/index.cjs +23 -23
  64. package/dist/components/help-center-pages/index.js +14 -14
  65. package/dist/components/index.cjs +33 -33
  66. package/dist/components/index.js +13 -13
  67. package/dist/components/meeting-scheduler/index.cjs +27 -27
  68. package/dist/components/meeting-scheduler/index.js +2 -2
  69. package/dist/components/navigation/index.cjs +6 -6
  70. package/dist/components/navigation/index.js +5 -5
  71. package/dist/components/onboarding-guides/index.cjs +6 -6
  72. package/dist/components/onboarding-guides/index.js +5 -5
  73. package/dist/components/tickets/index.cjs +7 -7
  74. package/dist/components/tickets/index.js +6 -6
  75. package/dist/components/ui/autocomplete.d.ts.map +1 -1
  76. package/dist/components/ui/date-picker.d.ts +2 -2
  77. package/dist/components/ui/date-picker.d.ts.map +1 -1
  78. package/dist/components/ui/field-wrapper.d.ts +15 -1
  79. package/dist/components/ui/field-wrapper.d.ts.map +1 -1
  80. package/dist/components/ui/file-manager/index.cjs +4 -4
  81. package/dist/components/ui/file-manager/index.js +1 -1
  82. package/dist/components/ui/index.cjs +3 -3
  83. package/dist/components/ui/index.js +2 -2
  84. package/dist/components/ui/input.d.ts.map +1 -1
  85. package/dist/components/ui/select.d.ts.map +1 -1
  86. package/dist/components/ui/textarea.d.ts.map +1 -1
  87. package/dist/index.cjs +7 -7
  88. package/dist/index.js +6 -6
  89. package/package.json +1 -1
  90. package/src/components/ui/__tests__/field-wrapper-error-slot.test.tsx +82 -0
  91. package/src/components/ui/autocomplete.tsx +7 -1
  92. package/src/components/ui/date-picker.tsx +40 -38
  93. package/src/components/ui/field-wrapper.tsx +27 -3
  94. package/src/components/ui/input.tsx +131 -121
  95. package/src/components/ui/select.tsx +5 -2
  96. package/src/components/ui/textarea.tsx +173 -175
  97. package/dist/chunk-IWISVG4P.js +0 -198
  98. package/dist/chunk-IWISVG4P.js.map +0 -1
  99. package/dist/chunk-JBL365GX.js.map +0 -1
  100. package/dist/chunk-YWUZL3RT.cjs +0 -198
  101. package/dist/chunk-YWUZL3RT.cjs.map +0 -1
  102. package/dist/chunk-ZUOXB5YX.cjs.map +0 -1
  103. /package/dist/{chunk-D4Z7TYWU.js.map → chunk-2DLM3NXE.js.map} +0 -0
  104. /package/dist/{chunk-NIKCNKD2.js.map → chunk-6DVSTVUU.js.map} +0 -0
  105. /package/dist/{chunk-VAXW73AH.js.map → chunk-6KR74SOJ.js.map} +0 -0
  106. /package/dist/{chunk-DMJ636H5.js.map → chunk-APWQTZCR.js.map} +0 -0
  107. /package/dist/{chunk-J7OY7QBA.js.map → chunk-KP4K6I5O.js.map} +0 -0
  108. /package/dist/{chunk-FXUFGHVU.js.map → chunk-MEFCA6VD.js.map} +0 -0
  109. /package/dist/{chunk-S5OQILYF.js.map → chunk-MW7LEMFG.js.map} +0 -0
  110. /package/dist/{chunk-I6Q5RA5M.js.map → chunk-P2ROGTMF.js.map} +0 -0
  111. /package/dist/{chunk-XNR7DJP3.js.map → chunk-QVZD2LLU.js.map} +0 -0
  112. /package/dist/{chunk-7Q4UWN5X.js.map → chunk-T6LNAX4R.js.map} +0 -0
  113. /package/dist/{chunk-ALMCR73J.js.map → chunk-VFGBRGFB.js.map} +0 -0
  114. /package/dist/{chunk-XGJUNSUY.js.map → chunk-VVOI2OC3.js.map} +0 -0
  115. /package/dist/{chunk-OTDNJTDJ.js.map → chunk-WWEQT2WX.js.map} +0 -0
  116. /package/dist/{chunk-CCGP4PRB.js.map → chunk-ZT3CZCDS.js.map} +0 -0
@@ -31,7 +31,7 @@ import {
31
31
  FieldWrapper,
32
32
  Input,
33
33
  RequiredMark
34
- } from "./chunk-IWISVG4P.js";
34
+ } from "./chunk-BXWXBBAC.js";
35
35
  import {
36
36
  APPROVAL_STATUS,
37
37
  ActionsMenuDropdown,
@@ -1114,53 +1114,63 @@ function AutocompleteInner(props, ref) {
1114
1114
  }
1115
1115
  )
1116
1116
  ] });
1117
- return /* @__PURE__ */ jsx7(FieldWrapper, { label, labelVariant, error, className, children: /* @__PURE__ */ jsxs4("div", { className: "relative", ref: containerRef, children: [
1118
- popover,
1119
- multiple && showHiddenTags && hiddenTagsCount > 0 && /* @__PURE__ */ jsx7(
1120
- HiddenTagsPopup,
1121
- {
1122
- ref: hiddenTagsPopupRef,
1123
- items: hiddenTags,
1124
- disabled,
1125
- className: "left-auto right-0 max-w-full",
1126
- onRemove: (value) => {
1127
- const newValue = valueArray.filter((v) => v !== value);
1128
- props.onChange(newValue);
1129
- if (typeof limitTagsProp === "number" && newValue.length <= limitTagsProp) setShowHiddenTags(false);
1130
- }
1131
- }
1132
- ),
1133
- multiple && /* @__PURE__ */ jsxs4(Fragment, { children: [
1134
- /* @__PURE__ */ jsx7(
1135
- "span",
1136
- {
1137
- ref: textMeasureRef,
1138
- "aria-hidden": "true",
1139
- className: "pointer-events-none invisible absolute left-0 top-0 -z-10 whitespace-nowrap text-h4",
1140
- children: inputPlaceholder
1141
- }
1142
- ),
1143
- /* @__PURE__ */ jsx7(
1144
- "div",
1145
- {
1146
- ref: measureRef,
1147
- "aria-hidden": "true",
1148
- className: "pointer-events-none invisible absolute left-0 top-0 -z-10 flex gap-2",
1149
- children: selectedOptions.map((option) => /* @__PURE__ */ jsx7(
1150
- Tag,
1117
+ return /* @__PURE__ */ jsx7(
1118
+ FieldWrapper,
1119
+ {
1120
+ label,
1121
+ labelVariant,
1122
+ error,
1123
+ errorSlot: "error" in props,
1124
+ className,
1125
+ children: /* @__PURE__ */ jsxs4("div", { className: "relative", ref: containerRef, children: [
1126
+ popover,
1127
+ multiple && showHiddenTags && hiddenTagsCount > 0 && /* @__PURE__ */ jsx7(
1128
+ HiddenTagsPopup,
1129
+ {
1130
+ ref: hiddenTagsPopupRef,
1131
+ items: hiddenTags,
1132
+ disabled,
1133
+ className: "left-auto right-0 max-w-full",
1134
+ onRemove: (value) => {
1135
+ const newValue = valueArray.filter((v) => v !== value);
1136
+ props.onChange(newValue);
1137
+ if (typeof limitTagsProp === "number" && newValue.length <= limitTagsProp) setShowHiddenTags(false);
1138
+ }
1139
+ }
1140
+ ),
1141
+ multiple && /* @__PURE__ */ jsxs4(Fragment, { children: [
1142
+ /* @__PURE__ */ jsx7(
1143
+ "span",
1151
1144
  {
1152
- variant: "outline",
1153
- labelClassName: "max-w-[90px] truncate",
1154
- label: renderTag ? renderTag(option) : option.label,
1155
- onClose: () => {
1156
- }
1157
- },
1158
- `m-${String(option.value)}`
1159
- ))
1160
- }
1161
- )
1162
- ] })
1163
- ] }) });
1145
+ ref: textMeasureRef,
1146
+ "aria-hidden": "true",
1147
+ className: "pointer-events-none invisible absolute left-0 top-0 -z-10 whitespace-nowrap text-h4",
1148
+ children: inputPlaceholder
1149
+ }
1150
+ ),
1151
+ /* @__PURE__ */ jsx7(
1152
+ "div",
1153
+ {
1154
+ ref: measureRef,
1155
+ "aria-hidden": "true",
1156
+ className: "pointer-events-none invisible absolute left-0 top-0 -z-10 flex gap-2",
1157
+ children: selectedOptions.map((option) => /* @__PURE__ */ jsx7(
1158
+ Tag,
1159
+ {
1160
+ variant: "outline",
1161
+ labelClassName: "max-w-[90px] truncate",
1162
+ label: renderTag ? renderTag(option) : option.label,
1163
+ onClose: () => {
1164
+ }
1165
+ },
1166
+ `m-${String(option.value)}`
1167
+ ))
1168
+ }
1169
+ )
1170
+ ] })
1171
+ ] })
1172
+ }
1173
+ );
1164
1174
  }
1165
1175
  var Autocomplete = forwardRef3(AutocompleteInner);
1166
1176
 
@@ -1336,7 +1346,9 @@ import { jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
1336
1346
  var Select = SelectPrimitive.Root;
1337
1347
  var SelectGroup = SelectPrimitive.Group;
1338
1348
  var SelectValue = SelectPrimitive.Value;
1339
- var SelectTrigger = forwardRef6(({ className, children, invalid, label, labelVariant, error, ...props }, ref) => {
1349
+ var SelectTrigger = forwardRef6((allProps, ref) => {
1350
+ const { className, children, invalid, label, labelVariant, error, ...props } = allProps;
1351
+ const errorSlot = "error" in allProps;
1340
1352
  const isInvalid = invalid || !!error;
1341
1353
  const trigger = /* @__PURE__ */ jsxs7(
1342
1354
  SelectPrimitive.Trigger,
@@ -1385,7 +1397,7 @@ var SelectTrigger = forwardRef6(({ className, children, invalid, label, labelVar
1385
1397
  ]
1386
1398
  }
1387
1399
  );
1388
- return /* @__PURE__ */ jsx10(FieldWrapper, { label, labelVariant, error, children: trigger });
1400
+ return /* @__PURE__ */ jsx10(FieldWrapper, { label, labelVariant, error, errorSlot, children: trigger });
1389
1401
  });
1390
1402
  SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
1391
1403
  var SelectScrollUpButton = forwardRef6(({ className, ...props }, ref) => /* @__PURE__ */ jsx10(
@@ -1950,7 +1962,7 @@ function DatePicker(props) {
1950
1962
  }
1951
1963
  ) })
1952
1964
  ] });
1953
- return /* @__PURE__ */ jsx11(FieldWrapper, { label, error, children: picker });
1965
+ return /* @__PURE__ */ jsx11(FieldWrapper, { label, error, errorSlot: "error" in props, children: picker });
1954
1966
  }
1955
1967
  var generateHourOptions = (use24Hour) => {
1956
1968
  if (use24Hour) {
@@ -1961,23 +1973,24 @@ var generateHourOptions = (use24Hour) => {
1961
1973
  var generateMinuteOptions = () => {
1962
1974
  return Array.from({ length: 60 }, (_, i) => i.toString().padStart(2, "0"));
1963
1975
  };
1964
- function DatePickerInput({
1965
- placeholder = "Select date",
1966
- formatDate: formatDate2 = defaultFormatDate,
1967
- disabled = false,
1968
- className,
1969
- numberOfMonths = 1,
1970
- fromDate,
1971
- toDate,
1972
- locale,
1973
- value,
1974
- onChange,
1975
- showTime = false,
1976
- use24HourFormat = false,
1977
- label,
1978
- error,
1979
- invalid = false
1980
- }) {
1976
+ function DatePickerInput(props) {
1977
+ const {
1978
+ placeholder = "Select date",
1979
+ formatDate: formatDate2 = defaultFormatDate,
1980
+ disabled = false,
1981
+ className,
1982
+ numberOfMonths = 1,
1983
+ fromDate,
1984
+ toDate,
1985
+ locale,
1986
+ value,
1987
+ onChange,
1988
+ showTime = false,
1989
+ use24HourFormat = false,
1990
+ label,
1991
+ error,
1992
+ invalid = false
1993
+ } = props;
1981
1994
  const [open, setOpen] = useState4(false);
1982
1995
  const isInvalid = invalid || !!error;
1983
1996
  const displayValue = value ? formatDate2(value) : "";
@@ -2116,7 +2129,7 @@ function DatePickerInput({
2116
2129
  ] })
2117
2130
  ] })
2118
2131
  ] });
2119
- return /* @__PURE__ */ jsx11(FieldWrapper, { label, error, className, children: content });
2132
+ return /* @__PURE__ */ jsx11(FieldWrapper, { label, error, errorSlot: "error" in props, className, children: content });
2120
2133
  }
2121
2134
  var generateTimeOptions = (intervalMinutes, use24Hour) => {
2122
2135
  const options = [];
@@ -2137,24 +2150,25 @@ var generateTimeOptions = (intervalMinutes, use24Hour) => {
2137
2150
  }
2138
2151
  return options;
2139
2152
  };
2140
- function DatePickerInputSimple({
2141
- placeholder = "Select date",
2142
- formatDate: formatDate2 = defaultFormatDate,
2143
- disabled = false,
2144
- className,
2145
- numberOfMonths = 1,
2146
- fromDate,
2147
- toDate,
2148
- locale,
2149
- value,
2150
- onChange,
2151
- showTime = false,
2152
- timeInterval = 30,
2153
- use24HourFormat = false,
2154
- label,
2155
- error,
2156
- invalid = false
2157
- }) {
2153
+ function DatePickerInputSimple(props) {
2154
+ const {
2155
+ placeholder = "Select date",
2156
+ formatDate: formatDate2 = defaultFormatDate,
2157
+ disabled = false,
2158
+ className,
2159
+ numberOfMonths = 1,
2160
+ fromDate,
2161
+ toDate,
2162
+ locale,
2163
+ value,
2164
+ onChange,
2165
+ showTime = false,
2166
+ timeInterval = 30,
2167
+ use24HourFormat = false,
2168
+ label,
2169
+ error,
2170
+ invalid = false
2171
+ } = props;
2158
2172
  const [open, setOpen] = useState4(false);
2159
2173
  const isInvalid = invalid || !!error;
2160
2174
  const displayValue = value ? formatDate2(value) : "";
@@ -2257,7 +2271,7 @@ function DatePickerInputSimple({
2257
2271
  /* @__PURE__ */ jsx11(SelectContent, { children: timeOptions.map((option) => /* @__PURE__ */ jsx11(SelectItem, { value: option.value, children: option.label }, option.value)) })
2258
2272
  ] })
2259
2273
  ] });
2260
- return /* @__PURE__ */ jsx11(FieldWrapper, { label, error, className, children: content });
2274
+ return /* @__PURE__ */ jsx11(FieldWrapper, { label, error, errorSlot: "error" in props, className, children: content });
2261
2275
  }
2262
2276
  function DateFilterPanel({
2263
2277
  mode = "range",
@@ -4378,8 +4392,8 @@ function TagsManager({
4378
4392
  // src/components/ui/textarea.tsx
4379
4393
  import { forwardRef as forwardRef11, useId as useId3 } from "react";
4380
4394
  import { jsx as jsx36, jsxs as jsxs28 } from "react/jsx-runtime";
4381
- var Textarea = forwardRef11(
4382
- ({
4395
+ var Textarea = forwardRef11((allProps, ref) => {
4396
+ const {
4383
4397
  className,
4384
4398
  invalid = false,
4385
4399
  label,
@@ -4391,144 +4405,144 @@ var Textarea = forwardRef11(
4391
4405
  startIcon,
4392
4406
  hideBorder = false,
4393
4407
  ...props
4394
- }, ref) => {
4395
- const isInvalid = invalid || !!error;
4396
- const hasAdornment = !!endIcon || !!startIcon;
4397
- const reactId = useId3();
4398
- const fieldId = props.id ?? reactId;
4399
- if (!hasAdornment) {
4400
- return /* @__PURE__ */ jsx36(FieldWrapper, { label, labelVariant, error, children: /* @__PURE__ */ jsx36(
4401
- "textarea",
4402
- {
4403
- className: cn(
4404
- "flex min-h-[96px] w-full rounded-[6px] border p-3",
4405
- "text-h4",
4406
- "focus:border-ods-accent focus-visible:outline-none",
4407
- "touch-manipulation transition-colors duration-200",
4408
- "border-ods-border bg-ods-card text-ods-text-primary placeholder:text-ods-text-secondary",
4409
- !props.disabled && "hover:border-ods-border-hover hover:bg-ods-bg-hover active:border-ods-border-active active:bg-ods-bg-active",
4410
- props.disabled && "!cursor-not-allowed bg-ods-bg disabled:placeholder:text-ods-border",
4411
- "relative z-10 cursor-text",
4412
- "resize-y",
4413
- isInvalid && "border-ods-error hover:border-ods-error focus:border-ods-error",
4414
- className
4415
- ),
4416
- ref,
4417
- ...props
4418
- }
4419
- ) });
4420
- }
4421
- const accentBorder = startIcon ? "has-[textarea:focus]:border-ods-accent" : "has-[:focus]:border-ods-accent";
4422
- const accentBorderError = startIcon ? "has-[textarea:focus]:border-ods-error" : "has-[:focus]:border-ods-error";
4423
- const adornmentAccent = startIcon ? "group-has-[textarea:focus]:text-ods-accent" : "group-has-[:focus]:text-ods-accent";
4424
- const content = /* @__PURE__ */ jsxs28(
4425
- "label",
4408
+ } = allProps;
4409
+ const errorSlot = "error" in allProps;
4410
+ const isInvalid = invalid || !!error;
4411
+ const hasAdornment = !!endIcon || !!startIcon;
4412
+ const reactId = useId3();
4413
+ const fieldId = props.id ?? reactId;
4414
+ if (!hasAdornment) {
4415
+ return /* @__PURE__ */ jsx36(FieldWrapper, { label, labelVariant, error, errorSlot, children: /* @__PURE__ */ jsx36(
4416
+ "textarea",
4426
4417
  {
4427
- htmlFor: fieldId,
4428
- "data-invalid": isInvalid || void 0,
4429
4418
  className: cn(
4430
- // Wrapper mirrors `Input`, but uses `items-end` so the icon sticks
4431
- // to the bottom-right when the textarea grows multi-line. Vertical
4432
- // padding lives here (not on the textarea) so both children share
4433
- // the same bottom baseline at any height.
4434
- //
4435
- // Padding is sized so the single-line height matches `Input` exactly
4436
- // (44px mobile / 48px desktop): line `leading-6` (24px) + 2× padding
4437
- // + 1px border top/bottom. `min-h-11 md:min-h-12` is the matching
4438
- // floor; with symmetric padding the single line stays centered.
4439
- "flex min-h-11 w-full cursor-text items-end gap-2 px-3 py-[9px] md:min-h-12 md:py-[11px]",
4440
- "has-[:focus-visible]:outline-none",
4441
- "group",
4442
- "transition-colors duration-200",
4443
- // Card chrome (border / bg / radius / hover / focus). Suppressed when
4444
- // `hideBorder` — an outer container owns it instead.
4445
- !hideBorder && cn("rounded-[6px] border border-ods-border bg-ods-card", accentBorder),
4446
- !hideBorder && !props.disabled && "hover:border-ods-border-hover hover:bg-ods-bg-hover active:border-ods-border-active active:bg-ods-bg-active",
4447
- !hideBorder && props.disabled && "!cursor-not-allowed bg-ods-bg",
4448
- // Start / end icons carry their own colour — grey them with the value
4449
- // so a disabled field reads as one flat colour. Scoped to the DIRECT
4450
- // span children (the two icon wrappers): the nodes inside them are
4451
- // rendered verbatim so callers can pass an interactive trigger and own
4452
- // its styling, and a descendant rule would overwrite exactly that.
4453
- "has-[:disabled]:[&>span]:text-ods-text-disabled has-[:disabled]:[&_svg]:text-ods-text-disabled",
4454
- !hideBorder && isInvalid && cn("border-ods-error hover:border-ods-error", accentBorderError),
4455
- hideBorder && "bg-transparent"
4419
+ "flex min-h-[96px] w-full rounded-[6px] border p-3",
4420
+ "text-h4",
4421
+ "focus:border-ods-accent focus-visible:outline-none",
4422
+ "touch-manipulation transition-colors duration-200",
4423
+ "border-ods-border bg-ods-card text-ods-text-primary placeholder:text-ods-text-secondary",
4424
+ !props.disabled && "hover:border-ods-border-hover hover:bg-ods-bg-hover active:border-ods-border-active active:bg-ods-bg-active",
4425
+ props.disabled && "!cursor-not-allowed bg-ods-bg disabled:placeholder:text-ods-border",
4426
+ "relative z-10 cursor-text",
4427
+ "resize-y",
4428
+ isInvalid && "border-ods-error hover:border-ods-error focus:border-ods-error",
4429
+ className
4456
4430
  ),
4457
- children: [
4458
- startIcon && // Start adornment (e.g. the composer `+`). `items-end` + `h-6`
4459
- // co-centers it with the first text line, matching `endIcon`. The
4460
- // node is rendered verbatim so callers can pass an interactive
4461
- // button / menu trigger and own its styling + active color.
4462
- /* @__PURE__ */ jsx36("span", { className: "flex h-6 shrink-0 items-center", children: startIcon }),
4463
- /* @__PURE__ */ jsx36(
4464
- "textarea",
4465
- {
4466
- ref,
4467
- rows: 1,
4468
- id: fieldId,
4469
- className: cn(
4470
- "m-0 box-border min-w-0 flex-1 resize-none border-none bg-transparent p-0 outline-none",
4471
- // Native CSS auto-grow (Chrome 123+, FF 124+, Safari 16.4+) — no
4472
- // JS needed to size to content. Falls back to `rows={1}` natural
4473
- // height on older browsers.
4474
- "[field-sizing:content]",
4475
- // `!leading-6` (not plain `leading-6`): on mobile `text-h4` sets a
4476
- // 20px line-height of its own that otherwise overrides the leading,
4477
- // leaving the 20px text box short of the 24px icon box and dropping
4478
- // the text below center under `items-end`. Forcing 24px keeps text
4479
- // and icon co-centered and the single-line height at 44px.
4480
- "!leading-6 text-ods-text-primary text-h4 placeholder:text-ods-text-secondary",
4481
- // Hard cap on growth: beyond `max-h` the textarea scrolls
4482
- // internally instead of pushing the icon out of frame.
4483
- "max-h-[160px] overflow-y-auto",
4484
- "scrollbar-thin scrollbar-track-transparent scrollbar-thumb-ods-border/30 hover:scrollbar-thumb-ods-text-secondary/30",
4485
- // Disabled - match Input exactly (value greys out, placeholder dims further)
4486
- "disabled:cursor-not-allowed disabled:text-ods-text-disabled disabled:placeholder:text-ods-border",
4487
- className
4488
- ),
4489
- ...props
4490
- }
4491
- ),
4492
- endIconAsButton ? /* @__PURE__ */ jsx36(
4493
- "button",
4494
- {
4495
- type: "button",
4496
- "aria-label": endIconButtonProps?.["aria-label"] ?? "Submit",
4497
- ...endIconButtonProps,
4498
- className: cn(
4499
- // `h-6` matches the textarea's `leading-6` line box so the icon's
4500
- // visual center lines up with the text on the first line. Without
4501
- // it, `items-end` bottom-aligns the smaller mobile icon (size-4)
4502
- // against the 24px text line and drops it below the text center.
4503
- "flex h-6 shrink-0 items-center text-ods-text-secondary transition-colors duration-200",
4504
- adornmentAccent,
4505
- "group-data-[invalid]:text-ods-error",
4506
- "[&_svg]:size-4 md:[&_svg]:size-6",
4507
- "cursor-pointer hover:text-ods-text-primary",
4508
- "focus-visible:text-ods-accent focus-visible:outline-none",
4509
- "disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:text-ods-text-secondary",
4510
- endIconButtonProps?.className
4511
- ),
4512
- children: endIcon
4513
- }
4514
- ) : /* @__PURE__ */ jsx36(
4515
- "span",
4516
- {
4517
- className: cn(
4518
- "flex h-6 shrink-0 items-center text-ods-text-secondary transition-colors duration-200",
4519
- adornmentAccent,
4520
- "group-data-[invalid]:text-ods-error",
4521
- "[&_svg]:size-4 md:[&_svg]:size-6"
4522
- ),
4523
- children: endIcon
4524
- }
4525
- )
4526
- ]
4431
+ ref,
4432
+ ...props
4527
4433
  }
4528
- );
4529
- return /* @__PURE__ */ jsx36(FieldWrapper, { label, labelVariant, error, children: content });
4434
+ ) });
4530
4435
  }
4531
- );
4436
+ const accentBorder = startIcon ? "has-[textarea:focus]:border-ods-accent" : "has-[:focus]:border-ods-accent";
4437
+ const accentBorderError = startIcon ? "has-[textarea:focus]:border-ods-error" : "has-[:focus]:border-ods-error";
4438
+ const adornmentAccent = startIcon ? "group-has-[textarea:focus]:text-ods-accent" : "group-has-[:focus]:text-ods-accent";
4439
+ const content = /* @__PURE__ */ jsxs28(
4440
+ "label",
4441
+ {
4442
+ htmlFor: fieldId,
4443
+ "data-invalid": isInvalid || void 0,
4444
+ className: cn(
4445
+ // Wrapper mirrors `Input`, but uses `items-end` so the icon sticks
4446
+ // to the bottom-right when the textarea grows multi-line. Vertical
4447
+ // padding lives here (not on the textarea) so both children share
4448
+ // the same bottom baseline at any height.
4449
+ //
4450
+ // Padding is sized so the single-line height matches `Input` exactly
4451
+ // (44px mobile / 48px desktop): line `leading-6` (24px) + 2× padding
4452
+ // + 1px border top/bottom. `min-h-11 md:min-h-12` is the matching
4453
+ // floor; with symmetric padding the single line stays centered.
4454
+ "flex min-h-11 w-full cursor-text items-end gap-2 px-3 py-[9px] md:min-h-12 md:py-[11px]",
4455
+ "has-[:focus-visible]:outline-none",
4456
+ "group",
4457
+ "transition-colors duration-200",
4458
+ // Card chrome (border / bg / radius / hover / focus). Suppressed when
4459
+ // `hideBorder` — an outer container owns it instead.
4460
+ !hideBorder && cn("rounded-[6px] border border-ods-border bg-ods-card", accentBorder),
4461
+ !hideBorder && !props.disabled && "hover:border-ods-border-hover hover:bg-ods-bg-hover active:border-ods-border-active active:bg-ods-bg-active",
4462
+ !hideBorder && props.disabled && "!cursor-not-allowed bg-ods-bg",
4463
+ // Start / end icons carry their own colour — grey them with the value
4464
+ // so a disabled field reads as one flat colour. Scoped to the DIRECT
4465
+ // span children (the two icon wrappers): the nodes inside them are
4466
+ // rendered verbatim so callers can pass an interactive trigger and own
4467
+ // its styling, and a descendant rule would overwrite exactly that.
4468
+ "has-[:disabled]:[&>span]:text-ods-text-disabled has-[:disabled]:[&_svg]:text-ods-text-disabled",
4469
+ !hideBorder && isInvalid && cn("border-ods-error hover:border-ods-error", accentBorderError),
4470
+ hideBorder && "bg-transparent"
4471
+ ),
4472
+ children: [
4473
+ startIcon && // Start adornment (e.g. the composer `+`). `items-end` + `h-6`
4474
+ // co-centers it with the first text line, matching `endIcon`. The
4475
+ // node is rendered verbatim so callers can pass an interactive
4476
+ // button / menu trigger and own its styling + active color.
4477
+ /* @__PURE__ */ jsx36("span", { className: "flex h-6 shrink-0 items-center", children: startIcon }),
4478
+ /* @__PURE__ */ jsx36(
4479
+ "textarea",
4480
+ {
4481
+ ref,
4482
+ rows: 1,
4483
+ id: fieldId,
4484
+ className: cn(
4485
+ "m-0 box-border min-w-0 flex-1 resize-none border-none bg-transparent p-0 outline-none",
4486
+ // Native CSS auto-grow (Chrome 123+, FF 124+, Safari 16.4+) — no
4487
+ // JS needed to size to content. Falls back to `rows={1}` natural
4488
+ // height on older browsers.
4489
+ "[field-sizing:content]",
4490
+ // `!leading-6` (not plain `leading-6`): on mobile `text-h4` sets a
4491
+ // 20px line-height of its own that otherwise overrides the leading,
4492
+ // leaving the 20px text box short of the 24px icon box and dropping
4493
+ // the text below center under `items-end`. Forcing 24px keeps text
4494
+ // and icon co-centered and the single-line height at 44px.
4495
+ "!leading-6 text-ods-text-primary text-h4 placeholder:text-ods-text-secondary",
4496
+ // Hard cap on growth: beyond `max-h` the textarea scrolls
4497
+ // internally instead of pushing the icon out of frame.
4498
+ "max-h-[160px] overflow-y-auto",
4499
+ "scrollbar-thin scrollbar-track-transparent scrollbar-thumb-ods-border/30 hover:scrollbar-thumb-ods-text-secondary/30",
4500
+ // Disabled - match Input exactly (value greys out, placeholder dims further)
4501
+ "disabled:cursor-not-allowed disabled:text-ods-text-disabled disabled:placeholder:text-ods-border",
4502
+ className
4503
+ ),
4504
+ ...props
4505
+ }
4506
+ ),
4507
+ endIconAsButton ? /* @__PURE__ */ jsx36(
4508
+ "button",
4509
+ {
4510
+ type: "button",
4511
+ "aria-label": endIconButtonProps?.["aria-label"] ?? "Submit",
4512
+ ...endIconButtonProps,
4513
+ className: cn(
4514
+ // `h-6` matches the textarea's `leading-6` line box so the icon's
4515
+ // visual center lines up with the text on the first line. Without
4516
+ // it, `items-end` bottom-aligns the smaller mobile icon (size-4)
4517
+ // against the 24px text line and drops it below the text center.
4518
+ "flex h-6 shrink-0 items-center text-ods-text-secondary transition-colors duration-200",
4519
+ adornmentAccent,
4520
+ "group-data-[invalid]:text-ods-error",
4521
+ "[&_svg]:size-4 md:[&_svg]:size-6",
4522
+ "cursor-pointer hover:text-ods-text-primary",
4523
+ "focus-visible:text-ods-accent focus-visible:outline-none",
4524
+ "disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:text-ods-text-secondary",
4525
+ endIconButtonProps?.className
4526
+ ),
4527
+ children: endIcon
4528
+ }
4529
+ ) : /* @__PURE__ */ jsx36(
4530
+ "span",
4531
+ {
4532
+ className: cn(
4533
+ "flex h-6 shrink-0 items-center text-ods-text-secondary transition-colors duration-200",
4534
+ adornmentAccent,
4535
+ "group-data-[invalid]:text-ods-error",
4536
+ "[&_svg]:size-4 md:[&_svg]:size-6"
4537
+ ),
4538
+ children: endIcon
4539
+ }
4540
+ )
4541
+ ]
4542
+ }
4543
+ );
4544
+ return /* @__PURE__ */ jsx36(FieldWrapper, { label, labelVariant, error, errorSlot, children: content });
4545
+ });
4532
4546
  Textarea.displayName = "Textarea";
4533
4547
 
4534
4548
  // src/components/ui/alert-dialog.tsx
@@ -31353,4 +31367,4 @@ export {
31353
31367
  LazyMount,
31354
31368
  IconTile
31355
31369
  };
31356
- //# sourceMappingURL=chunk-JBL365GX.js.map
31370
+ //# sourceMappingURL=chunk-E7C3F2SK.js.map