@purpur/library 9.0.10 → 9.1.1

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 (181) hide show
  1. package/CHANGELOG.json +57 -0
  2. package/CHANGELOG.md +26 -1
  3. package/dist/LICENSE.txt +45 -24
  4. package/dist/{autocomplete-Dy8YL7Mo.js → autocomplete-B421J7CS.js} +2 -2
  5. package/dist/{autocomplete-Dy8YL7Mo.js.map → autocomplete-B421J7CS.js.map} +1 -1
  6. package/dist/{autocomplete-Dn503hFM.mjs → autocomplete-B8L-dTmF.mjs} +3 -3
  7. package/dist/{autocomplete-Dn503hFM.mjs.map → autocomplete-B8L-dTmF.mjs.map} +1 -1
  8. package/dist/autocomplete.cjs.js +1 -1
  9. package/dist/autocomplete.es.js +1 -1
  10. package/dist/{calendar-C-F-pVCe.js → calendar-CoP1dGpQ.js} +2 -2
  11. package/dist/{calendar-C-F-pVCe.js.map → calendar-CoP1dGpQ.js.map} +1 -1
  12. package/dist/{calendar-DWpnuylk.mjs → calendar-D_sZrR92.mjs} +151 -140
  13. package/dist/{calendar-DWpnuylk.mjs.map → calendar-D_sZrR92.mjs.map} +1 -1
  14. package/dist/calendar.cjs.js +1 -1
  15. package/dist/calendar.es.js +1 -1
  16. package/dist/chat-field-CxOqk0-9.js +2 -0
  17. package/dist/chat-field-CxOqk0-9.js.map +1 -0
  18. package/dist/chat-field-yK-TwW0D.mjs +149 -0
  19. package/dist/chat-field-yK-TwW0D.mjs.map +1 -0
  20. package/dist/chat-field.cjs.js +2 -0
  21. package/dist/chat-field.cjs.js.map +1 -0
  22. package/dist/chat-field.es.js +5 -0
  23. package/dist/chat-field.es.js.map +1 -0
  24. package/dist/components/autocomplete/src/autocomplete.d.ts.map +1 -1
  25. package/dist/components/calendar/src/calendar.d.ts.map +1 -1
  26. package/dist/components/chat-field/src/chat-field.d.ts +71 -0
  27. package/dist/components/chat-field/src/chat-field.d.ts.map +1 -0
  28. package/dist/components/dismissable-chip-group/src/dismissable-chip-group-item.d.ts.map +1 -1
  29. package/dist/components/dismissable-chip-group/src/dismissable-chip-group.d.ts +6 -1
  30. package/dist/components/dismissable-chip-group/src/dismissable-chip-group.d.ts.map +1 -1
  31. package/dist/components/dropdown/src/dropdown-combobox.d.ts +34 -0
  32. package/dist/components/dropdown/src/dropdown-combobox.d.ts.map +1 -0
  33. package/dist/components/dropdown/src/dropdown-select.d.ts +34 -0
  34. package/dist/components/dropdown/src/dropdown-select.d.ts.map +1 -0
  35. package/dist/components/dropdown/src/dropdown-shared.d.ts +51 -0
  36. package/dist/components/dropdown/src/dropdown-shared.d.ts.map +1 -0
  37. package/dist/components/dropdown/src/dropdown.d.ts +6 -0
  38. package/dist/components/dropdown/src/dropdown.d.ts.map +1 -0
  39. package/dist/components/dropdown/src/dropdown.types.d.ts +94 -0
  40. package/dist/components/dropdown/src/dropdown.types.d.ts.map +1 -0
  41. package/dist/components/dropdown/src/useDropdown.d.ts +38 -0
  42. package/dist/components/dropdown/src/useDropdown.d.ts.map +1 -0
  43. package/dist/components/dropdown/src/useDropdownFilter.d.ts +9 -0
  44. package/dist/components/dropdown/src/useDropdownFilter.d.ts.map +1 -0
  45. package/dist/components/dropdown/src/useDropdownHighlight.d.ts +19 -0
  46. package/dist/components/dropdown/src/useDropdownHighlight.d.ts.map +1 -0
  47. package/dist/components/dropdown/src/useDropdownInput.d.ts +12 -0
  48. package/dist/components/dropdown/src/useDropdownInput.d.ts.map +1 -0
  49. package/dist/components/dropdown/src/useOnClickOutside.d.ts +2 -0
  50. package/dist/components/dropdown/src/useOnClickOutside.d.ts.map +1 -0
  51. package/dist/components/listbox/src/listbox-item.d.ts +2 -0
  52. package/dist/components/listbox/src/listbox-item.d.ts.map +1 -1
  53. package/dist/components/quantity-selector/src/quantity-selector-button.d.ts +2 -1
  54. package/dist/components/quantity-selector/src/quantity-selector-button.d.ts.map +1 -1
  55. package/dist/components/quantity-selector/src/quantity-selector.d.ts.map +1 -1
  56. package/dist/components/search-field/src/search-field-autocomplete.d.ts +73 -0
  57. package/dist/components/search-field/src/search-field-autocomplete.d.ts.map +1 -0
  58. package/dist/components/search-field/src/search-field-base.d.ts +97 -0
  59. package/dist/components/search-field/src/search-field-base.d.ts.map +1 -0
  60. package/dist/components/search-field/src/search-field.d.ts +123 -41
  61. package/dist/components/search-field/src/search-field.d.ts.map +1 -1
  62. package/dist/components/table/src/cell-types/button-group-cell.d.ts +6 -2
  63. package/dist/components/table/src/cell-types/button-group-cell.d.ts.map +1 -1
  64. package/dist/components/text-field/src/text-field-ai.d.ts +669 -0
  65. package/dist/components/text-field/src/text-field-ai.d.ts.map +1 -0
  66. package/dist/components/text-field/src/text-field-base.d.ts +671 -0
  67. package/dist/components/text-field/src/text-field-base.d.ts.map +1 -0
  68. package/dist/components/text-field/src/text-field.d.ts +42 -4
  69. package/dist/components/text-field/src/text-field.d.ts.map +1 -1
  70. package/dist/components/tooltip/src/tooltip.d.ts.map +1 -1
  71. package/dist/components-metadata.js +29 -1
  72. package/dist/{date-field-DACXrowI.mjs → date-field-4tYMPw89.mjs} +2 -2
  73. package/dist/{date-field-DACXrowI.mjs.map → date-field-4tYMPw89.mjs.map} +1 -1
  74. package/dist/{date-field-Z3LKO4b7.js → date-field-B7ipm5sH.js} +2 -2
  75. package/dist/{date-field-Z3LKO4b7.js.map → date-field-B7ipm5sH.js.map} +1 -1
  76. package/dist/date-field.cjs.js +1 -1
  77. package/dist/date-field.es.js +1 -1
  78. package/dist/{date-picker-5Gr_cEqA.js → date-picker-BWW4xzyc.js} +2 -2
  79. package/dist/{date-picker-5Gr_cEqA.js.map → date-picker-BWW4xzyc.js.map} +1 -1
  80. package/dist/{date-picker-CdVUA8NC.mjs → date-picker-D7EisjDG.mjs} +3 -3
  81. package/dist/{date-picker-CdVUA8NC.mjs.map → date-picker-D7EisjDG.mjs.map} +1 -1
  82. package/dist/date-picker.cjs.js +1 -1
  83. package/dist/date-picker.es.js +1 -1
  84. package/dist/dismissable-chip-group-Cd23yjBa.js +2 -0
  85. package/dist/dismissable-chip-group-Cd23yjBa.js.map +1 -0
  86. package/dist/dismissable-chip-group-D-gD93ON.mjs +89 -0
  87. package/dist/dismissable-chip-group-D-gD93ON.mjs.map +1 -0
  88. package/dist/dismissable-chip-group.cjs.js +1 -1
  89. package/dist/dismissable-chip-group.es.js +5 -2
  90. package/dist/dropdown-BC6evqyq.js +2 -0
  91. package/dist/dropdown-BC6evqyq.js.map +1 -0
  92. package/dist/dropdown-C-Ze4gvG.mjs +771 -0
  93. package/dist/dropdown-C-Ze4gvG.mjs.map +1 -0
  94. package/dist/dropdown.cjs.js +2 -0
  95. package/dist/dropdown.cjs.js.map +1 -0
  96. package/dist/dropdown.es.js +6 -0
  97. package/dist/dropdown.es.js.map +1 -0
  98. package/dist/libraries/library/src/chat-field.d.ts +6 -0
  99. package/dist/libraries/library/src/chat-field.d.ts.map +1 -0
  100. package/dist/libraries/library/src/dropdown.d.ts +6 -0
  101. package/dist/libraries/library/src/dropdown.d.ts.map +1 -0
  102. package/dist/libraries/library/src/library.d.ts +2 -0
  103. package/dist/libraries/library/src/library.d.ts.map +1 -1
  104. package/dist/library.cjs.js +1 -1
  105. package/dist/library.es.js +602 -592
  106. package/dist/library.es.js.map +1 -1
  107. package/dist/listbox-COBHLRtB.js +2 -0
  108. package/dist/listbox-COBHLRtB.js.map +1 -0
  109. package/dist/listbox-DG4KmQP_.mjs +66 -0
  110. package/dist/listbox-DG4KmQP_.mjs.map +1 -0
  111. package/dist/listbox.cjs.js +1 -1
  112. package/dist/listbox.es.js +1 -1
  113. package/dist/purpur.css +1 -1
  114. package/dist/quantity-selector-BV7QwVlT.js +2 -0
  115. package/dist/quantity-selector-BV7QwVlT.js.map +1 -0
  116. package/dist/{quantity-selector-w10wKMmT.mjs → quantity-selector-CGhJ2DjO.mjs} +60 -58
  117. package/dist/quantity-selector-CGhJ2DjO.mjs.map +1 -0
  118. package/dist/quantity-selector.cjs.js +1 -1
  119. package/dist/quantity-selector.es.js +1 -1
  120. package/dist/search-field-Caj2dKLn.mjs +151 -0
  121. package/dist/search-field-Caj2dKLn.mjs.map +1 -0
  122. package/dist/search-field-DAktzYb0.js +2 -0
  123. package/dist/search-field-DAktzYb0.js.map +1 -0
  124. package/dist/search-field.cjs.js +1 -1
  125. package/dist/search-field.es.js +3 -2
  126. package/dist/stepper-ClLQuoXr.js +2 -0
  127. package/dist/stepper-ClLQuoXr.js.map +1 -0
  128. package/dist/{stepper-B351hexi.mjs → stepper-k0bX9m4t.mjs} +4 -4
  129. package/dist/stepper-k0bX9m4t.mjs.map +1 -0
  130. package/dist/stepper.cjs.js +1 -1
  131. package/dist/stepper.es.js +1 -1
  132. package/dist/{table-YR-bpfU0.mjs → table-D_XW4smf.mjs} +3 -3
  133. package/dist/{table-YR-bpfU0.mjs.map → table-D_XW4smf.mjs.map} +1 -1
  134. package/dist/{table-CJijBJsy.js → table-Ddv6BKo9.js} +2 -2
  135. package/dist/{table-CJijBJsy.js.map → table-Ddv6BKo9.js.map} +1 -1
  136. package/dist/table.cjs.js +1 -1
  137. package/dist/table.es.js +1 -1
  138. package/dist/text-field-BQYzwIrG.mjs +322 -0
  139. package/dist/text-field-BQYzwIrG.mjs.map +1 -0
  140. package/dist/text-field-BwxGMWds.js +2 -0
  141. package/dist/text-field-BwxGMWds.js.map +1 -0
  142. package/dist/text-field.cjs.js +1 -1
  143. package/dist/text-field.es.js +4 -3
  144. package/dist/{tooltip-B_qTqtcF.js → tooltip-BatXMflw.js} +2 -2
  145. package/dist/{tooltip-B_qTqtcF.js.map → tooltip-BatXMflw.js.map} +1 -1
  146. package/dist/{tooltip-BHsVKFJ3.mjs → tooltip-CZzwHkea.mjs} +132 -132
  147. package/dist/{tooltip-BHsVKFJ3.mjs.map → tooltip-CZzwHkea.mjs.map} +1 -1
  148. package/dist/tooltip.cjs.js +1 -1
  149. package/dist/tooltip.es.js +1 -1
  150. package/dist/use-autocomplete.es-BHDgQLae.js +2 -0
  151. package/dist/use-autocomplete.es-BHDgQLae.js.map +1 -0
  152. package/dist/use-autocomplete.es-CVv3z8t6.mjs +142 -0
  153. package/dist/use-autocomplete.es-CVv3z8t6.mjs.map +1 -0
  154. package/package.json +18 -16
  155. package/src/aliases.ts +8 -0
  156. package/src/chat-field.ts +6 -0
  157. package/src/dropdown.ts +6 -0
  158. package/src/entries.js +2 -0
  159. package/src/library.ts +4 -0
  160. package/dist/dismissable-chip-group-CnziecOt.js +0 -2
  161. package/dist/dismissable-chip-group-CnziecOt.js.map +0 -1
  162. package/dist/dismissable-chip-group-ZCYOt1sB.mjs +0 -79
  163. package/dist/dismissable-chip-group-ZCYOt1sB.mjs.map +0 -1
  164. package/dist/listbox-BmjBtIv8.js +0 -2
  165. package/dist/listbox-BmjBtIv8.js.map +0 -1
  166. package/dist/listbox-oDeP8FvH.mjs +0 -65
  167. package/dist/listbox-oDeP8FvH.mjs.map +0 -1
  168. package/dist/quantity-selector-D28He6R8.js +0 -2
  169. package/dist/quantity-selector-D28He6R8.js.map +0 -1
  170. package/dist/quantity-selector-w10wKMmT.mjs.map +0 -1
  171. package/dist/search-field-CNpJp3Tg.js +0 -2
  172. package/dist/search-field-CNpJp3Tg.js.map +0 -1
  173. package/dist/search-field-CWqLnqdo.mjs +0 -91
  174. package/dist/search-field-CWqLnqdo.mjs.map +0 -1
  175. package/dist/stepper-B351hexi.mjs.map +0 -1
  176. package/dist/stepper-Cb4_9D2h.js +0 -2
  177. package/dist/stepper-Cb4_9D2h.js.map +0 -1
  178. package/dist/text-field-BMDf8j-K.mjs +0 -185
  179. package/dist/text-field-BMDf8j-K.mjs.map +0 -1
  180. package/dist/text-field-CiLEj0Fq.js +0 -2
  181. package/dist/text-field-CiLEj0Fq.js.map +0 -1
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./calendar-C-F-pVCe.js"),e=require("./zh-TW-CAp7WWVq.js"),a=require("./format-CFKKBdIQ.js");exports.Calendar=r.Calendar;exports.af=e.af;exports.ar=e.ar;exports.arDZ=e.arDZ;exports.arEG=e.arEG;exports.arMA=e.arMA;exports.arSA=e.arSA;exports.arTN=e.arTN;exports.az=e.az;exports.be=e.be;exports.beTarask=e.beTarask;exports.bg=e.bg;exports.bn=e.bn;exports.bs=e.bs;exports.ca=e.ca;exports.ckb=e.ckb;exports.cs=e.cs;exports.cy=e.cy;exports.da=e.da;exports.de=e.de;exports.deAT=e.deAT;exports.el=e.el;exports.enAU=e.enAU;exports.enCA=e.enCA;exports.enGB=e.enGB;exports.enIE=e.enIE;exports.enIN=e.enIN;exports.enNZ=e.enNZ;exports.enZA=e.enZA;exports.eo=e.eo;exports.es=e.es;exports.et=e.et;exports.eu=e.eu;exports.faIR=e.faIR;exports.fi=e.fi;exports.fr=e.fr;exports.frCA=e.frCA;exports.frCH=e.frCH;exports.fy=e.fy;exports.gd=e.gd;exports.gl=e.gl;exports.gu=e.gu;exports.he=e.he;exports.hi=e.hi;exports.hr=e.hr;exports.ht=e.ht;exports.hu=e.hu;exports.hy=e.hy;exports.id=e.id;exports.is=e.is;exports.it=e.it;exports.itCH=e.itCH;exports.ja=e.ja;exports.jaHira=e.jaHira;exports.ka=e.ka;exports.kk=e.kk;exports.km=e.km;exports.kn=e.kn;exports.ko=e.ko;exports.lb=e.lb;exports.lt=e.lt;exports.lv=e.lv;exports.mk=e.mk;exports.mn=e.mn;exports.ms=e.ms;exports.mt=e.mt;exports.nb=e.nb;exports.nl=e.nl;exports.nlBE=e.nlBE;exports.nn=e.nn;exports.oc=e.oc;exports.pl=e.pl;exports.pt=e.pt;exports.ptBR=e.ptBR;exports.ro=e.ro;exports.ru=e.ru;exports.se=e.se;exports.sk=e.sk;exports.sl=e.sl;exports.sq=e.sq;exports.sr=e.sr;exports.srLatn=e.srLatn;exports.sv=e.sv;exports.ta=e.ta;exports.te=e.te;exports.th=e.th;exports.tr=e.tr;exports.ug=e.ug;exports.uk=e.uk;exports.uz=e.uz;exports.uzCyrl=e.uzCyrl;exports.vi=e.vi;exports.zhCN=e.zhCN;exports.zhHK=e.zhHK;exports.zhTW=e.zhTW;exports.enUS=a.enUS;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./calendar-CoP1dGpQ.js"),e=require("./zh-TW-CAp7WWVq.js"),a=require("./format-CFKKBdIQ.js");exports.Calendar=r.Calendar;exports.af=e.af;exports.ar=e.ar;exports.arDZ=e.arDZ;exports.arEG=e.arEG;exports.arMA=e.arMA;exports.arSA=e.arSA;exports.arTN=e.arTN;exports.az=e.az;exports.be=e.be;exports.beTarask=e.beTarask;exports.bg=e.bg;exports.bn=e.bn;exports.bs=e.bs;exports.ca=e.ca;exports.ckb=e.ckb;exports.cs=e.cs;exports.cy=e.cy;exports.da=e.da;exports.de=e.de;exports.deAT=e.deAT;exports.el=e.el;exports.enAU=e.enAU;exports.enCA=e.enCA;exports.enGB=e.enGB;exports.enIE=e.enIE;exports.enIN=e.enIN;exports.enNZ=e.enNZ;exports.enZA=e.enZA;exports.eo=e.eo;exports.es=e.es;exports.et=e.et;exports.eu=e.eu;exports.faIR=e.faIR;exports.fi=e.fi;exports.fr=e.fr;exports.frCA=e.frCA;exports.frCH=e.frCH;exports.fy=e.fy;exports.gd=e.gd;exports.gl=e.gl;exports.gu=e.gu;exports.he=e.he;exports.hi=e.hi;exports.hr=e.hr;exports.ht=e.ht;exports.hu=e.hu;exports.hy=e.hy;exports.id=e.id;exports.is=e.is;exports.it=e.it;exports.itCH=e.itCH;exports.ja=e.ja;exports.jaHira=e.jaHira;exports.ka=e.ka;exports.kk=e.kk;exports.km=e.km;exports.kn=e.kn;exports.ko=e.ko;exports.lb=e.lb;exports.lt=e.lt;exports.lv=e.lv;exports.mk=e.mk;exports.mn=e.mn;exports.ms=e.ms;exports.mt=e.mt;exports.nb=e.nb;exports.nl=e.nl;exports.nlBE=e.nlBE;exports.nn=e.nn;exports.oc=e.oc;exports.pl=e.pl;exports.pt=e.pt;exports.ptBR=e.ptBR;exports.ro=e.ro;exports.ru=e.ru;exports.se=e.se;exports.sk=e.sk;exports.sl=e.sl;exports.sq=e.sq;exports.sr=e.sr;exports.srLatn=e.srLatn;exports.sv=e.sv;exports.ta=e.ta;exports.te=e.te;exports.th=e.th;exports.tr=e.tr;exports.ug=e.ug;exports.uk=e.uk;exports.uz=e.uz;exports.uzCyrl=e.uzCyrl;exports.vi=e.vi;exports.zhCN=e.zhCN;exports.zhHK=e.zhHK;exports.zhTW=e.zhTW;exports.enUS=a.enUS;
2
2
  //# sourceMappingURL=calendar.cjs.js.map
@@ -1,4 +1,4 @@
1
- import { C as e } from "./calendar-DWpnuylk.mjs";
1
+ import { C as e } from "./calendar-D_sZrR92.mjs";
2
2
  import { a as n, b as t, c as k, d as l, e as f, f as h, g as o, h as b, i, j as m, k as u, l as C, m as A, n as d, o as p, p as z, q as c, r as g, s as y, t as v, u as x, v as B, w as H, x as N, y as T, z as j, A as E, B as I, C as Z, D as q, E as D, F as G, G as R, H as S, I as U, J as w, K, L, M, N as W, O as F, P as J, Q as O, R as P, S as Q, T as V, U as X, V as Y, W as _, X as $, Y as aa, Z as sa, _ as ea, $ as ra, a0 as na, a1 as ta, a2 as ka, a3 as la, a4 as fa, a5 as ha, a6 as oa, a7 as ba, a8 as ia, a9 as ma, aa as ua, ab as Ca, ac as Aa, ad as da, ae as pa, af as za, ag as ca, ah as ga, ai as ya, aj as va, ak as xa, al as Ba, am as Ha, an as Na, ao as Ta, ap as ja, aq as Ea, ar as Ia, as as Za, at as qa, au as Da, av as Ga, aw as Ra, ax as Sa, ay as Ua, az as wa, aA as Ka, aB as La, aC as Ma, aD as Wa } from "./zh-TW-oiRD71xW.mjs";
3
3
  import { e as Ja } from "./format-DpkYPs7O.mjs";
4
4
  export {
@@ -0,0 +1,2 @@
1
+ "use strict";const l=require("react/jsx-runtime"),s=require("react"),Q=require("./button-Dqxdc3nC.js"),j=require("./icon.es-j3eRib6d.js"),W=require("./bind-DeUYJ6m9.js"),X={name:"send",svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M1.54 2.149a.9.9 0 0 1 .97-.131l19.514 9.212a.9.9 0 0 1 0 1.628L2.51 22.071A.9.9 0 0 1 1.263 21l2.664-8.957-2.664-8.956a.9.9 0 0 1 .277-.94Zm3.997 10.795-1.974 6.64 14.062-6.64H5.537Zm12.088-1.8H5.537L3.563 4.505l14.062 6.64Z" clip-rule="evenodd"/></svg>',keywords:["send"],category:"action"},T={name:"tv-stop",svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M19 19H5V5h14v14Z"/><path fill-rule="evenodd" d="M19.9 19a.9.9 0 0 1-.9.9H5a.9.9 0 0 1-.9-.9V5a.9.9 0 0 1 .9-.9h14a.9.9 0 0 1 .9.9v14Zm-1.8-.9V5.9H5.9v12.2h12.2Z" clip-rule="evenodd"/></svg>',keywords:["tv-stop"],category:"action"},I={"purpur-chat-field":"_purpur-chat-field_16tq2_1","purpur-chat-field--negative":"_purpur-chat-field--negative_16tq2_13","purpur-chat-field__frame":"_purpur-chat-field__frame_16tq2_16","purpur-chat-field__frame--negative":"_purpur-chat-field__frame--negative_16tq2_20","purpur-chat-field--filled":"_purpur-chat-field--filled_16tq2_34","purpur-chat-field__textarea":"_purpur-chat-field__textarea_16tq2_34","purpur-chat-field__textarea--negative":"_purpur-chat-field__textarea--negative_16tq2_37","purpur-chat-field__action":"_purpur-chat-field__action_16tq2_80"},f=W.c.bind(I),ee=(...a)=>{const i=a.filter(Boolean);return i.length<=1?i[0]||null:o=>{for(const n of i)typeof n=="function"?n(o):n&&(n.current=o)}},t="purpur-chat-field",k=s.forwardRef(({["data-testid"]:a,value:i,placeholder:o,textareaAriaLabel:n,generating:u=!1,negative:c=!1,sendAriaLabel:V,sendIcon:R,stopAriaLabel:A,rows:p=1,maxRows:x=4,onChange:B,onSend:m,onStopClick:F,actionButtonType:h="button",textareaProps:L,className:N},Z)=>{const _=s.useRef(null),{["aria-label"]:D,["aria-labelledby"]:b,defaultValue:g,...S}=L??{},[z,E]=s.useState(()=>typeof g=="string"||typeof g=="number"?String(g):""),v=i??z,d=!!v.length,K=D??(b?void 0:n??o),y=s.useCallback(()=>{const e=_.current;if(!e)return;e.style.height="auto",e.style.overflowY="hidden";const r=getComputedStyle(e),w=parseFloat(r.lineHeight)||20,C=parseFloat(r.paddingTop)||0,H=parseFloat(r.paddingBottom)||0,J=w*p+C+H,$=w*x+C+H;e.scrollHeight>$?(e.style.height=`${$}px`,e.style.overflowY="auto"):e.scrollHeight>J&&(e.style.height=`${e.scrollHeight}px`)},[p,x]);s.useEffect(()=>{y()},[v,y]);const q=s.useCallback(e=>{if(d){if(h==="submit"){const r=_.current?.form;if(e==="keyboard"&&r){r.requestSubmit();return}if(e==="button"&&r)return}m()}},[h,d,m]),M=e=>{i===void 0&&E(e.target.value),B(e)},P=e=>{e.key==="Enter"&&!e.shiftKey&&!e.nativeEvent.isComposing&&(e.preventDefault(),q("keyboard"))},Y=()=>{if(u){F();return}q("button")},O=u||!d?"button":h,U=f([N,t,{[`${t}--filled`]:d,[`${t}--negative`]:c}]),G=u?l.jsx(j.b,{size:"xs",svg:T}):R??l.jsx(j.b,{size:"xs",svg:X});return l.jsxs("div",{className:U,"data-testid":a,children:[l.jsx("textarea",{...S,ref:ee(Z,_),className:f(`${t}__textarea`,{[`${t}__textarea--negative`]:c}),"aria-label":K,"aria-labelledby":b,"data-testid":a?`${a}-textarea`:void 0,onChange:M,onKeyDown:P,placeholder:o,rows:p,value:v}),l.jsx("div",{className:f(`${t}__action`),children:l.jsx(Q.Button,{"aria-label":u?A:V,"data-testid":a?`${a}-action`:void 0,iconOnly:!0,negative:c,size:"xs",type:O,variant:"primary",onClick:Y,children:G})}),l.jsx("span",{className:f(`${t}__frame`,{[`${t}__frame--negative`]:c}),"aria-hidden":"true"})]})});k.displayName="ChatField";exports.ChatField=k;
2
+ //# sourceMappingURL=chat-field-CxOqk0-9.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat-field-CxOqk0-9.js","sources":["../../../components/icon/dist/assets/send.es.js","../../../components/icon/dist/assets/tv-stop.es.js","../../../components/chat-field/src/chat-field.tsx"],"sourcesContent":["const e = {\n name: \"send\",\n svg: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path fill-rule=\"evenodd\" d=\"M1.54 2.149a.9.9 0 0 1 .97-.131l19.514 9.212a.9.9 0 0 1 0 1.628L2.51 22.071A.9.9 0 0 1 1.263 21l2.664-8.957-2.664-8.956a.9.9 0 0 1 .277-.94Zm3.997 10.795-1.974 6.64 14.062-6.64H5.537Zm12.088-1.8H5.537L3.563 4.505l14.062 6.64Z\" clip-rule=\"evenodd\"/></svg>',\n keywords: [\"send\"],\n category: \"action\"\n};\nexport {\n e as send\n};\n//# sourceMappingURL=send.es.js.map\n","const t = {\n name: \"tv-stop\",\n svg: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M19 19H5V5h14v14Z\"/><path fill-rule=\"evenodd\" d=\"M19.9 19a.9.9 0 0 1-.9.9H5a.9.9 0 0 1-.9-.9V5a.9.9 0 0 1 .9-.9h14a.9.9 0 0 1 .9.9v14Zm-1.8-.9V5.9H5.9v12.2h12.2Z\" clip-rule=\"evenodd\"/></svg>',\n keywords: [\"tv-stop\"],\n category: \"action\"\n};\nexport {\n t as tvStop\n};\n//# sourceMappingURL=tv-stop.es.js.map\n","import React, {\n type ChangeEvent,\n forwardRef,\n type KeyboardEvent,\n type ReactNode,\n type Ref,\n type TextareaHTMLAttributes,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from \"react\";\nimport { Button } from \"@purpur/button\";\nimport { Icon } from \"@purpur/icon\";\nimport { send } from \"@purpur/icon/assets/send\";\nimport { tvStop } from \"@purpur/icon/assets/tv-stop\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./chat-field.module.scss\";\nconst cx = c.bind(styles);\n\nconst mergeRefs = <T,>(...inputRefs: (Ref<T> | undefined)[]): Ref<T> | React.RefCallback<T> => {\n const filteredInputRefs = inputRefs.filter(Boolean);\n\n if (filteredInputRefs.length <= 1) {\n return filteredInputRefs[0] || null;\n }\n\n return (ref: T | null) => {\n for (const inputRef of filteredInputRefs) {\n if (typeof inputRef === \"function\") {\n inputRef(ref);\n } else if (inputRef) {\n (inputRef as React.RefObject<T | null>).current = ref;\n }\n }\n };\n};\n\nexport type ChatFieldProps = {\n [\"data-testid\"]?: string;\n /**\n * Current value of the textarea in controlled mode.\n * When omitted, the component handles textarea state internally.\n * */\n value?: string;\n /**\n * Placeholder text shown when the textarea is empty.\n * */\n placeholder: string;\n /**\n * Accessible label for the textarea when no aria-label/aria-labelledby\n * is provided via `textareaProps`.\n * */\n textareaAriaLabel?: string;\n /**\n * Changes the action icon from send to stop.\n * */\n generating?: boolean;\n /**\n * Renders the field with negative appearance.\n * */\n negative?: boolean;\n /**\n * Accessible label for the send action icon.\n * */\n sendAriaLabel: string;\n /**\n * Custom icon for the default action button state.\n * Falls back to the standard send icon when omitted.\n * */\n sendIcon?: ReactNode;\n /**\n * Accessible label for the stop action icon.\n * */\n stopAriaLabel: string;\n /**\n * Number of visible text rows. Defaults to 1.\n * */\n rows?: number;\n /**\n * Maximum number of rows before the textarea scrolls. Defaults to 4.\n * */\n maxRows?: number;\n /**\n * Callback for textarea value changes.\n * */\n onChange: (event: ChangeEvent<HTMLTextAreaElement>) => void;\n /**\n * Callback fired when the send action is triggered (Enter key or send button click).\n * */\n onSend: () => void;\n /**\n * Callback fired when the stop button is clicked during generating state.\n * */\n onStopClick: () => void;\n /**\n * HTML type attribute for the action button. Use `\"submit\"` when ChatField\n * is placed inside a `<form>`. Defaults to `\"button\"`.\n * */\n actionButtonType?: \"button\" | \"submit\";\n /**\n * Additional props forwarded to the textarea element.\n * */\n textareaProps?: Omit<\n TextareaHTMLAttributes<HTMLTextAreaElement>,\n \"className\" | \"value\" | \"placeholder\" | \"disabled\" | \"onChange\" | \"rows\"\n >;\n className?: string;\n};\n\nconst rootClassName = \"purpur-chat-field\";\n\nexport const ChatField = forwardRef<HTMLTextAreaElement, ChatFieldProps>(\n (\n {\n [\"data-testid\"]: dataTestId,\n value,\n placeholder,\n textareaAriaLabel: textareaAriaLabelProp,\n generating = false,\n negative = false,\n sendAriaLabel,\n sendIcon,\n stopAriaLabel,\n rows = 1,\n maxRows = 4,\n onChange,\n onSend,\n onStopClick,\n actionButtonType = \"button\",\n textareaProps,\n className,\n },\n ref\n ) => {\n const internalRef = useRef<HTMLTextAreaElement>(null);\n const {\n [\"aria-label\"]: textareaPropsAriaLabel,\n [\"aria-labelledby\"]: textareaPropsAriaLabelledBy,\n defaultValue: textareaDefaultValue,\n ...textareaRestProps\n } = textareaProps ?? {};\n\n const [uncontrolledValue, setUncontrolledValue] = useState(() => {\n if (typeof textareaDefaultValue === \"string\" || typeof textareaDefaultValue === \"number\") {\n return String(textareaDefaultValue);\n }\n return \"\";\n });\n\n const textareaValue = value ?? uncontrolledValue;\n const hasValue = Boolean(textareaValue.length);\n\n const resolvedTextareaAriaLabel =\n textareaPropsAriaLabel ??\n (textareaPropsAriaLabelledBy ? undefined : textareaAriaLabelProp ?? placeholder);\n\n const adjustTextareaHeight = useCallback(() => {\n const textarea = internalRef.current;\n if (!textarea) return;\n\n textarea.style.height = \"auto\";\n textarea.style.overflowY = \"hidden\";\n\n const computed = getComputedStyle(textarea);\n const lineHeight = parseFloat(computed.lineHeight) || 20;\n const paddingTop = parseFloat(computed.paddingTop) || 0;\n const paddingBottom = parseFloat(computed.paddingBottom) || 0;\n const naturalHeight = lineHeight * rows + paddingTop + paddingBottom;\n const maxHeight = lineHeight * maxRows + paddingTop + paddingBottom;\n\n if (textarea.scrollHeight > maxHeight) {\n textarea.style.height = `${maxHeight}px`;\n textarea.style.overflowY = \"auto\";\n } else if (textarea.scrollHeight > naturalHeight) {\n textarea.style.height = `${textarea.scrollHeight}px`;\n }\n }, [rows, maxRows]);\n\n useEffect(() => {\n adjustTextareaHeight();\n }, [textareaValue, adjustTextareaHeight]);\n\n const triggerSend = useCallback(\n (source: \"button\" | \"keyboard\") => {\n if (!hasValue) return;\n\n if (actionButtonType === \"submit\") {\n const parentForm = internalRef.current?.form;\n\n if (source === \"keyboard\" && parentForm) {\n parentForm.requestSubmit();\n return;\n }\n\n if (source === \"button\" && parentForm) {\n return;\n }\n }\n\n onSend();\n },\n [actionButtonType, hasValue, onSend]\n );\n\n const handleChange = (event: ChangeEvent<HTMLTextAreaElement>) => {\n if (value === undefined) {\n setUncontrolledValue(event.target.value);\n }\n\n onChange(event);\n };\n\n const handleKeyDown = (event: KeyboardEvent<HTMLTextAreaElement>) => {\n if (event.key === \"Enter\" && !event.shiftKey && !event.nativeEvent.isComposing) {\n event.preventDefault();\n triggerSend(\"keyboard\");\n }\n };\n\n const handleActionClick = () => {\n if (generating) {\n onStopClick();\n return;\n }\n\n triggerSend(\"button\");\n };\n\n const resolvedActionButtonType: \"button\" | \"submit\" =\n generating || !hasValue ? \"button\" : actionButtonType;\n\n const classes = cx([\n className,\n rootClassName,\n {\n [`${rootClassName}--filled`]: hasValue,\n [`${rootClassName}--negative`]: negative,\n },\n ]);\n\n const actionIcon = generating ? (\n <Icon size=\"xs\" svg={tvStop} />\n ) : (\n sendIcon ?? <Icon size=\"xs\" svg={send} />\n );\n\n return (\n <div className={classes} data-testid={dataTestId}>\n <textarea\n {...textareaRestProps}\n ref={mergeRefs(ref, internalRef)}\n className={cx(`${rootClassName}__textarea`, {\n [`${rootClassName}__textarea--negative`]: negative,\n })}\n aria-label={resolvedTextareaAriaLabel}\n aria-labelledby={textareaPropsAriaLabelledBy}\n data-testid={dataTestId ? `${dataTestId}-textarea` : undefined}\n onChange={handleChange}\n onKeyDown={handleKeyDown}\n placeholder={placeholder}\n rows={rows}\n value={textareaValue}\n />\n <div className={cx(`${rootClassName}__action`)}>\n <Button\n aria-label={generating ? stopAriaLabel : sendAriaLabel}\n data-testid={dataTestId ? `${dataTestId}-action` : undefined}\n iconOnly\n negative={negative}\n size=\"xs\"\n type={resolvedActionButtonType}\n variant=\"primary\"\n onClick={handleActionClick}\n >\n {actionIcon}\n </Button>\n </div>\n <span\n className={cx(`${rootClassName}__frame`, {\n [`${rootClassName}__frame--negative`]: negative,\n })}\n aria-hidden=\"true\"\n />\n </div>\n );\n }\n);\n\nChatField.displayName = \"ChatField\";\n"],"names":["e","t","cx","c","styles","mergeRefs","inputRefs","filteredInputRefs","ref","inputRef","rootClassName","ChatField","forwardRef","dataTestId","value","placeholder","textareaAriaLabelProp","generating","negative","sendAriaLabel","sendIcon","stopAriaLabel","rows","maxRows","onChange","onSend","onStopClick","actionButtonType","textareaProps","className","internalRef","useRef","textareaPropsAriaLabel","textareaPropsAriaLabelledBy","textareaDefaultValue","textareaRestProps","uncontrolledValue","setUncontrolledValue","useState","textareaValue","hasValue","resolvedTextareaAriaLabel","adjustTextareaHeight","useCallback","textarea","computed","lineHeight","paddingTop","paddingBottom","naturalHeight","maxHeight","useEffect","triggerSend","source","parentForm","handleChange","event","handleKeyDown","handleActionClick","resolvedActionButtonType","classes","actionIcon","jsx","Icon","tvStop","send","jsxs","Button"],"mappings":"0KAAMA,EAAI,CACR,KAAM,OACN,IAAK,8WACL,SAAU,CAAC,MAAM,EACjB,SAAU,QACZ,ECLMC,EAAI,CACR,KAAM,UACN,IAAK,0RACL,SAAU,CAAC,SAAS,EACpB,SAAU,QACZ,qjBCcMC,EAAKC,EAAAA,EAAE,KAAKC,CAAM,EAElBC,GAAY,IAAQC,IAAqE,CAC7F,MAAMC,EAAoBD,EAAU,OAAO,OAAO,EAElD,OAAIC,EAAkB,QAAU,EACvBA,EAAkB,CAAC,GAAK,KAGzBC,GAAkB,CACxB,UAAWC,KAAYF,EACjB,OAAOE,GAAa,WACtBA,EAASD,CAAG,EACHC,IACRA,EAAuC,QAAUD,EAGxD,CACF,EA0EME,EAAgB,o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AAGA,CAAa,sBAAsB,EAAGQ,CAAA,CAC3C,EACD,aAAYuB,EACZ,kBAAiBR,EACjB,cAAapB,EAAa,GAAGA,CAAU,YAAc,OACrD,SAAU0C,EACV,UAAWE,EACX,YAAA1C,EACA,KAAAO,EACA,MAAOiB,CAAA,CAAA,QAER,MAAA,CAAI,UAAWrC,EAAG,GAAGQ,CAAa,UAAU,EAC3C,SAAAoD,EAAAA,IAACK,EAAAA,OAAA,CACC,aAAYlD,EAAaI,EAAgBF,EACzC,cAAaN,EAAa,GAAGA,CAAU,UAAY,OACnD,SAAQ,GACR,SAAAK,EACA,KAAK,KACL,KAAMyC,EACN,QAAQ,UACR,QAASD,EAER,SAAAG,CAAA,CAAA,EAEL,EACAC,EAAAA,IAAC,OAAA,CACC,UAAW5D,EAAG,GAAGQ,CAAa,UAAW,CACvC,CAAC,GAAGA,CAAa,mBAAmB,EAAGQ,CAAA,CACxC,EACD,cAAY,MAAA,CAAA,CACd,EACF,CAEJ,CACF,EAEAP,EAAU,YAAc"}
@@ -0,0 +1,149 @@
1
+ import { jsxs as J, jsx as o } from "react/jsx-runtime";
2
+ import { forwardRef as Q, useRef as W, useState as X, useCallback as q, useEffect as T } from "react";
3
+ import { b as I } from "./button-Cv7NlYbv.mjs";
4
+ import { b as V } from "./icon.es-CZcKxTaM.mjs";
5
+ import { c as ee } from "./bind-CU-R61T-.mjs";
6
+ const te = {
7
+ name: "send",
8
+ svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M1.54 2.149a.9.9 0 0 1 .97-.131l19.514 9.212a.9.9 0 0 1 0 1.628L2.51 22.071A.9.9 0 0 1 1.263 21l2.664-8.957-2.664-8.956a.9.9 0 0 1 .277-.94Zm3.997 10.795-1.974 6.64 14.062-6.64H5.537Zm12.088-1.8H5.537L3.563 4.505l14.062 6.64Z" clip-rule="evenodd"/></svg>',
9
+ keywords: ["send"],
10
+ category: "action"
11
+ }, ae = {
12
+ name: "tv-stop",
13
+ svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M19 19H5V5h14v14Z"/><path fill-rule="evenodd" d="M19.9 19a.9.9 0 0 1-.9.9H5a.9.9 0 0 1-.9-.9V5a.9.9 0 0 1 .9-.9h14a.9.9 0 0 1 .9.9v14Zm-1.8-.9V5.9H5.9v12.2h12.2Z" clip-rule="evenodd"/></svg>',
14
+ keywords: ["tv-stop"],
15
+ category: "action"
16
+ }, re = {
17
+ "purpur-chat-field": "_purpur-chat-field_16tq2_1",
18
+ "purpur-chat-field--negative": "_purpur-chat-field--negative_16tq2_13",
19
+ "purpur-chat-field__frame": "_purpur-chat-field__frame_16tq2_16",
20
+ "purpur-chat-field__frame--negative": "_purpur-chat-field__frame--negative_16tq2_20",
21
+ "purpur-chat-field--filled": "_purpur-chat-field--filled_16tq2_34",
22
+ "purpur-chat-field__textarea": "_purpur-chat-field__textarea_16tq2_34",
23
+ "purpur-chat-field__textarea--negative": "_purpur-chat-field__textarea--negative_16tq2_37",
24
+ "purpur-chat-field__action": "_purpur-chat-field__action_16tq2_80"
25
+ }, d = ee.bind(re), le = (...a) => {
26
+ const l = a.filter(Boolean);
27
+ return l.length <= 1 ? l[0] || null : (n) => {
28
+ for (const i of l)
29
+ typeof i == "function" ? i(n) : i && (i.current = n);
30
+ };
31
+ }, t = "purpur-chat-field", ie = Q(
32
+ ({
33
+ ["data-testid"]: a,
34
+ value: l,
35
+ placeholder: n,
36
+ textareaAriaLabel: i,
37
+ generating: s = !1,
38
+ negative: u = !1,
39
+ sendAriaLabel: k,
40
+ sendIcon: A,
41
+ stopAriaLabel: B,
42
+ rows: f = 1,
43
+ maxRows: m = 4,
44
+ onChange: F,
45
+ onSend: v,
46
+ onStopClick: L,
47
+ actionButtonType: p = "button",
48
+ textareaProps: N,
49
+ className: R
50
+ }, Z) => {
51
+ const h = W(null), {
52
+ ["aria-label"]: D,
53
+ ["aria-labelledby"]: x,
54
+ defaultValue: _,
55
+ ...S
56
+ } = N ?? {}, [j, z] = X(() => typeof _ == "string" || typeof _ == "number" ? String(_) : ""), g = l ?? j, c = !!g.length, E = D ?? (x ? void 0 : i ?? n), y = q(() => {
57
+ const e = h.current;
58
+ if (!e) return;
59
+ e.style.height = "auto", e.style.overflowY = "hidden";
60
+ const r = getComputedStyle(e), w = parseFloat(r.lineHeight) || 20, C = parseFloat(r.paddingTop) || 0, H = parseFloat(r.paddingBottom) || 0, G = w * f + C + H, $ = w * m + C + H;
61
+ e.scrollHeight > $ ? (e.style.height = `${$}px`, e.style.overflowY = "auto") : e.scrollHeight > G && (e.style.height = `${e.scrollHeight}px`);
62
+ }, [f, m]);
63
+ T(() => {
64
+ y();
65
+ }, [g, y]);
66
+ const b = q(
67
+ (e) => {
68
+ if (c) {
69
+ if (p === "submit") {
70
+ const r = h.current?.form;
71
+ if (e === "keyboard" && r) {
72
+ r.requestSubmit();
73
+ return;
74
+ }
75
+ if (e === "button" && r)
76
+ return;
77
+ }
78
+ v();
79
+ }
80
+ },
81
+ [p, c, v]
82
+ ), K = (e) => {
83
+ l === void 0 && z(e.target.value), F(e);
84
+ }, M = (e) => {
85
+ e.key === "Enter" && !e.shiftKey && !e.nativeEvent.isComposing && (e.preventDefault(), b("keyboard"));
86
+ }, P = () => {
87
+ if (s) {
88
+ L();
89
+ return;
90
+ }
91
+ b("button");
92
+ }, Y = s || !c ? "button" : p, O = d([
93
+ R,
94
+ t,
95
+ {
96
+ [`${t}--filled`]: c,
97
+ [`${t}--negative`]: u
98
+ }
99
+ ]), U = s ? /* @__PURE__ */ o(V, { size: "xs", svg: ae }) : A ?? /* @__PURE__ */ o(V, { size: "xs", svg: te });
100
+ return /* @__PURE__ */ J("div", { className: O, "data-testid": a, children: [
101
+ /* @__PURE__ */ o(
102
+ "textarea",
103
+ {
104
+ ...S,
105
+ ref: le(Z, h),
106
+ className: d(`${t}__textarea`, {
107
+ [`${t}__textarea--negative`]: u
108
+ }),
109
+ "aria-label": E,
110
+ "aria-labelledby": x,
111
+ "data-testid": a ? `${a}-textarea` : void 0,
112
+ onChange: K,
113
+ onKeyDown: M,
114
+ placeholder: n,
115
+ rows: f,
116
+ value: g
117
+ }
118
+ ),
119
+ /* @__PURE__ */ o("div", { className: d(`${t}__action`), children: /* @__PURE__ */ o(
120
+ I,
121
+ {
122
+ "aria-label": s ? B : k,
123
+ "data-testid": a ? `${a}-action` : void 0,
124
+ iconOnly: !0,
125
+ negative: u,
126
+ size: "xs",
127
+ type: Y,
128
+ variant: "primary",
129
+ onClick: P,
130
+ children: U
131
+ }
132
+ ) }),
133
+ /* @__PURE__ */ o(
134
+ "span",
135
+ {
136
+ className: d(`${t}__frame`, {
137
+ [`${t}__frame--negative`]: u
138
+ }),
139
+ "aria-hidden": "true"
140
+ }
141
+ )
142
+ ] });
143
+ }
144
+ );
145
+ ie.displayName = "ChatField";
146
+ export {
147
+ ie as C
148
+ };
149
+ //# sourceMappingURL=chat-field-yK-TwW0D.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat-field-yK-TwW0D.mjs","sources":["../../../components/icon/dist/assets/send.es.js","../../../components/icon/dist/assets/tv-stop.es.js","../../../components/chat-field/src/chat-field.tsx"],"sourcesContent":["const e = {\n name: \"send\",\n svg: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path fill-rule=\"evenodd\" d=\"M1.54 2.149a.9.9 0 0 1 .97-.131l19.514 9.212a.9.9 0 0 1 0 1.628L2.51 22.071A.9.9 0 0 1 1.263 21l2.664-8.957-2.664-8.956a.9.9 0 0 1 .277-.94Zm3.997 10.795-1.974 6.64 14.062-6.64H5.537Zm12.088-1.8H5.537L3.563 4.505l14.062 6.64Z\" clip-rule=\"evenodd\"/></svg>',\n keywords: [\"send\"],\n category: \"action\"\n};\nexport {\n e as send\n};\n//# sourceMappingURL=send.es.js.map\n","const t = {\n name: \"tv-stop\",\n svg: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M19 19H5V5h14v14Z\"/><path fill-rule=\"evenodd\" d=\"M19.9 19a.9.9 0 0 1-.9.9H5a.9.9 0 0 1-.9-.9V5a.9.9 0 0 1 .9-.9h14a.9.9 0 0 1 .9.9v14Zm-1.8-.9V5.9H5.9v12.2h12.2Z\" clip-rule=\"evenodd\"/></svg>',\n keywords: [\"tv-stop\"],\n category: \"action\"\n};\nexport {\n t as tvStop\n};\n//# sourceMappingURL=tv-stop.es.js.map\n","import React, {\n type ChangeEvent,\n forwardRef,\n type KeyboardEvent,\n type ReactNode,\n type Ref,\n type TextareaHTMLAttributes,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from \"react\";\nimport { Button } from \"@purpur/button\";\nimport { Icon } from \"@purpur/icon\";\nimport { send } from \"@purpur/icon/assets/send\";\nimport { tvStop } from \"@purpur/icon/assets/tv-stop\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./chat-field.module.scss\";\nconst cx = c.bind(styles);\n\nconst mergeRefs = <T,>(...inputRefs: (Ref<T> | undefined)[]): Ref<T> | React.RefCallback<T> => {\n const filteredInputRefs = inputRefs.filter(Boolean);\n\n if (filteredInputRefs.length <= 1) {\n return filteredInputRefs[0] || null;\n }\n\n return (ref: T | null) => {\n for (const inputRef of filteredInputRefs) {\n if (typeof inputRef === \"function\") {\n inputRef(ref);\n } else if (inputRef) {\n (inputRef as React.RefObject<T | null>).current = ref;\n }\n }\n };\n};\n\nexport type ChatFieldProps = {\n [\"data-testid\"]?: string;\n /**\n * Current value of the textarea in controlled mode.\n * When omitted, the component handles textarea state internally.\n * */\n value?: string;\n /**\n * Placeholder text shown when the textarea is empty.\n * */\n placeholder: string;\n /**\n * Accessible label for the textarea when no aria-label/aria-labelledby\n * is provided via `textareaProps`.\n * */\n textareaAriaLabel?: string;\n /**\n * Changes the action icon from send to stop.\n * */\n generating?: boolean;\n /**\n * Renders the field with negative appearance.\n * */\n negative?: boolean;\n /**\n * Accessible label for the send action icon.\n * */\n sendAriaLabel: string;\n /**\n * Custom icon for the default action button state.\n * Falls back to the standard send icon when omitted.\n * */\n sendIcon?: ReactNode;\n /**\n * Accessible label for the stop action icon.\n * */\n stopAriaLabel: string;\n /**\n * Number of visible text rows. Defaults to 1.\n * */\n rows?: number;\n /**\n * Maximum number of rows before the textarea scrolls. Defaults to 4.\n * */\n maxRows?: number;\n /**\n * Callback for textarea value changes.\n * */\n onChange: (event: ChangeEvent<HTMLTextAreaElement>) => void;\n /**\n * Callback fired when the send action is triggered (Enter key or send button click).\n * */\n onSend: () => void;\n /**\n * Callback fired when the stop button is clicked during generating state.\n * */\n onStopClick: () => void;\n /**\n * HTML type attribute for the action button. Use `\"submit\"` when ChatField\n * is placed inside a `<form>`. Defaults to `\"button\"`.\n * */\n actionButtonType?: \"button\" | \"submit\";\n /**\n * Additional props forwarded to the textarea element.\n * */\n textareaProps?: Omit<\n TextareaHTMLAttributes<HTMLTextAreaElement>,\n \"className\" | \"value\" | \"placeholder\" | \"disabled\" | \"onChange\" | \"rows\"\n >;\n className?: string;\n};\n\nconst rootClassName = \"purpur-chat-field\";\n\nexport const ChatField = forwardRef<HTMLTextAreaElement, ChatFieldProps>(\n (\n {\n [\"data-testid\"]: dataTestId,\n value,\n placeholder,\n textareaAriaLabel: textareaAriaLabelProp,\n generating = false,\n negative = false,\n sendAriaLabel,\n sendIcon,\n stopAriaLabel,\n rows = 1,\n maxRows = 4,\n onChange,\n onSend,\n onStopClick,\n actionButtonType = \"button\",\n textareaProps,\n className,\n },\n ref\n ) => {\n const internalRef = useRef<HTMLTextAreaElement>(null);\n const {\n [\"aria-label\"]: textareaPropsAriaLabel,\n [\"aria-labelledby\"]: textareaPropsAriaLabelledBy,\n defaultValue: textareaDefaultValue,\n ...textareaRestProps\n } = textareaProps ?? {};\n\n const [uncontrolledValue, setUncontrolledValue] = useState(() => {\n if (typeof textareaDefaultValue === \"string\" || typeof textareaDefaultValue === \"number\") {\n return String(textareaDefaultValue);\n }\n return \"\";\n });\n\n const textareaValue = value ?? uncontrolledValue;\n const hasValue = Boolean(textareaValue.length);\n\n const resolvedTextareaAriaLabel =\n textareaPropsAriaLabel ??\n (textareaPropsAriaLabelledBy ? undefined : textareaAriaLabelProp ?? placeholder);\n\n const adjustTextareaHeight = useCallback(() => {\n const textarea = internalRef.current;\n if (!textarea) return;\n\n textarea.style.height = \"auto\";\n textarea.style.overflowY = \"hidden\";\n\n const computed = getComputedStyle(textarea);\n const lineHeight = parseFloat(computed.lineHeight) || 20;\n const paddingTop = parseFloat(computed.paddingTop) || 0;\n const paddingBottom = parseFloat(computed.paddingBottom) || 0;\n const naturalHeight = lineHeight * rows + paddingTop + paddingBottom;\n const maxHeight = lineHeight * maxRows + paddingTop + paddingBottom;\n\n if (textarea.scrollHeight > maxHeight) {\n textarea.style.height = `${maxHeight}px`;\n textarea.style.overflowY = \"auto\";\n } else if (textarea.scrollHeight > naturalHeight) {\n textarea.style.height = `${textarea.scrollHeight}px`;\n }\n }, [rows, maxRows]);\n\n useEffect(() => {\n adjustTextareaHeight();\n }, [textareaValue, adjustTextareaHeight]);\n\n const triggerSend = useCallback(\n (source: \"button\" | \"keyboard\") => {\n if (!hasValue) return;\n\n if (actionButtonType === \"submit\") {\n const parentForm = internalRef.current?.form;\n\n if (source === \"keyboard\" && parentForm) {\n parentForm.requestSubmit();\n return;\n }\n\n if (source === \"button\" && parentForm) {\n return;\n }\n }\n\n onSend();\n },\n [actionButtonType, hasValue, onSend]\n );\n\n const handleChange = (event: ChangeEvent<HTMLTextAreaElement>) => {\n if (value === undefined) {\n setUncontrolledValue(event.target.value);\n }\n\n onChange(event);\n };\n\n const handleKeyDown = (event: KeyboardEvent<HTMLTextAreaElement>) => {\n if (event.key === \"Enter\" && !event.shiftKey && !event.nativeEvent.isComposing) {\n event.preventDefault();\n triggerSend(\"keyboard\");\n }\n };\n\n const handleActionClick = () => {\n if (generating) {\n onStopClick();\n return;\n }\n\n triggerSend(\"button\");\n };\n\n const resolvedActionButtonType: \"button\" | \"submit\" =\n generating || !hasValue ? \"button\" : actionButtonType;\n\n const classes = cx([\n className,\n rootClassName,\n {\n [`${rootClassName}--filled`]: hasValue,\n [`${rootClassName}--negative`]: negative,\n },\n ]);\n\n const actionIcon = generating ? (\n <Icon size=\"xs\" svg={tvStop} />\n ) : (\n sendIcon ?? <Icon size=\"xs\" svg={send} />\n );\n\n return (\n <div className={classes} data-testid={dataTestId}>\n <textarea\n {...textareaRestProps}\n ref={mergeRefs(ref, internalRef)}\n className={cx(`${rootClassName}__textarea`, {\n [`${rootClassName}__textarea--negative`]: negative,\n })}\n aria-label={resolvedTextareaAriaLabel}\n aria-labelledby={textareaPropsAriaLabelledBy}\n data-testid={dataTestId ? `${dataTestId}-textarea` : undefined}\n onChange={handleChange}\n onKeyDown={handleKeyDown}\n placeholder={placeholder}\n rows={rows}\n value={textareaValue}\n />\n <div className={cx(`${rootClassName}__action`)}>\n <Button\n aria-label={generating ? stopAriaLabel : sendAriaLabel}\n data-testid={dataTestId ? `${dataTestId}-action` : undefined}\n iconOnly\n negative={negative}\n size=\"xs\"\n type={resolvedActionButtonType}\n variant=\"primary\"\n onClick={handleActionClick}\n >\n {actionIcon}\n </Button>\n </div>\n <span\n className={cx(`${rootClassName}__frame`, {\n [`${rootClassName}__frame--negative`]: negative,\n })}\n aria-hidden=\"true\"\n />\n </div>\n );\n }\n);\n\nChatField.displayName = \"ChatField\";\n"],"names":["e","t","cx","c","styles","mergeRefs","inputRefs","filteredInputRefs","ref","inputRef","rootClassName","ChatField","forwardRef","dataTestId","value","placeholder","textareaAriaLabelProp","generating","negative","sendAriaLabel","sendIcon","stopAriaLabel","rows","maxRows","onChange","onSend","onStopClick","actionButtonType","textareaProps","className","internalRef","useRef","textareaPropsAriaLabel","textareaPropsAriaLabelledBy","textareaDefaultValue","textareaRestProps","uncontrolledValue","setUncontrolledValue","useState","textareaValue","hasValue","resolvedTextareaAriaLabel","adjustTextareaHeight","useCallback","textarea","computed","lineHeight","paddingTop","paddingBottom","naturalHeight","maxHeight","useEffect","triggerSend","source","parentForm","handleChange","event","handleKeyDown","handleActionClick","resolvedActionButtonType","classes","actionIcon","jsx","Icon","tvStop","send","jsxs","Button"],"mappings":";;;;;AAAA,MAAMA,KAAI;AAAA,EACR,MAAM;AAAA,EACN,KAAK;AAAA,EACL,UAAU,CAAC,MAAM;AAAA,EACjB,UAAU;AACZ,GCLMC,KAAI;AAAA,EACR,MAAM;AAAA,EACN,KAAK;AAAA,EACL,UAAU,CAAC,SAAS;AAAA,EACpB,UAAU;AACZ;;;;;;;;;GCcMC,IAAKC,GAAE,KAAKC,EAAM,GAElBC,KAAY,IAAQC,MAAqE;AAC7F,QAAMC,IAAoBD,EAAU,OAAO,OAAO;AAElD,SAAIC,EAAkB,UAAU,IACvBA,EAAkB,CAAC,KAAK,OAG1B,CAACC,MAAkB;AACxB,eAAWC,KAAYF;AACrB,MAAI,OAAOE,KAAa,aACtBA,EAASD,CAAG,IACHC,MACRA,EAAuC,UAAUD;AAAA,EAGxD;AACF,GA0EME,IAAgB,qBAETC,KAAYC;AAAA,EACvB,CACE;AAAA,IACE,CAAC,gBAAgBC;AAAA,IACjB,OAAAC;AAAA,IACA,aAAAC;AAAA,IACA,mBAAmBC;AAAA,IACnB,YAAAC,IAAa;AAAA,IACb,UAAAC,IAAW;AAAA,IACX,eAAAC;AAAA,IACA,UAAAC;AAAA,IACA,eAAAC;AAAA,IACA,MAAAC,IAAO;AAAA,IACP,SAAAC,IAAU;AAAA,IACV,UAAAC;AAAA,IACA,QAAAC;AAAA,IACA,aAAAC;AAAA,IACA,kBAAAC,IAAmB;AAAA,IACnB,eAAAC;AAAA,IACA,WAAAC;AAAA,EAAA,GAEFrB,MACG;AACH,UAAMsB,IAAcC,EAA4B,IAAI,GAC9C;AAAA,MACJ,CAAC,YAAY,GAAGC;AAAA,MAChB,CAAC,iBAAiB,GAAGC;AAAA,MACrB,cAAcC;AAAA,MACd,GAAGC;AA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,UACA,OAAOiB;AAAA,QAAA;AAAA,MAAA;AAAA,wBAER,OAAA,EAAI,WAAWrC,EAAG,GAAGQ,CAAa,UAAU,GAC3C,UAAA,gBAAAoD;AAAA,QAACK;AAAA,QAAA;AAAA,UACC,cAAYlD,IAAaI,IAAgBF;AAAA,UACzC,eAAaN,IAAa,GAAGA,CAAU,YAAY;AAAA,UACnD,UAAQ;AAAA,UACR,UAAAK;AAAA,UACA,MAAK;AAAA,UACL,MAAMyC;AAAA,UACN,SAAQ;AAAA,UACR,SAASD;AAAA,UAER,UAAAG;AAAA,QAAA;AAAA,MAAA,GAEL;AAAA,MACA,gBAAAC;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,WAAW5D,EAAG,GAAGQ,CAAa,WAAW;AAAA,YACvC,CAAC,GAAGA,CAAa,mBAAmB,GAAGQ;AAAA,UAAA,CACxC;AAAA,UACD,eAAY;AAAA,QAAA;AAAA,MAAA;AAAA,IACd,GACF;AAAA,EAEJ;AACF;AAEAP,GAAU,cAAc;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chat-field-CxOqk0-9.js");exports.ChatField=e.ChatField;
2
+ //# sourceMappingURL=chat-field.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat-field.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import { C as o } from "./chat-field-yK-TwW0D.mjs";
2
+ export {
3
+ o as ChatField
4
+ };
5
+ //# sourceMappingURL=chat-field.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat-field.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1 +1 @@
1
- {"version":3,"file":"autocomplete.d.ts","sourceRoot":"","sources":["../../../../../../components/autocomplete/src/autocomplete.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAgB,SAAS,EAAE,MAAM,OAAO,CAAC;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,aAAa;;CAoE5C,CAAC"}
1
+ {"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../../../../../../components/calendar/src/calendar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AACnD,OAAO,EACL,KAAK,SAAS,EAEd,KAAK,cAAc,EAEpB,MAAM,kBAAkB,CAAC;AAK1B,cAAc,yBAAyB,CAAC;AAExC,OAAO,4BAA4B,CAAC;AACpC,OAAO,uBAAuB,CAAC;AAC/B,OAAO,qBAAqB,CAAC;AAG7B,KAAK,iBAAiB,GAClB;IACE,IAAI,EAAE,QAAQ,CAAC;IACf,QAAQ,EAAE,IAAI,GAAG,SAAS,CAAC;IAC3B,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,SAAS,KAAK,IAAI,CAAC;CAC5C,GACD;IACE,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,SAAS,GAAG,SAAS,CAAC;IAChC,QAAQ,EAAE,CAAC,SAAS,EAAE,SAAS,GAAG,SAAS,KAAK,IAAI,CAAC;CACtD,CAAC;AAEN,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,cAAc,EAAE,MAAM,GAAG,UAAU,GAAG,UAAU,CAAC,GAChF,iBAAiB,GAAG;IAClB,CAAC,aAAa,CAAC,CAAC,EAAE,MAAM,CAAC;IACzB;;;SAGK;IACL,eAAe,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;CAChD,CAAC;AAEJ;;;;;;;GAOG;AACH,eAAO,MAAM,QAAQ;YAAW,aAAa;;CA2E5C,CAAC"}
@@ -0,0 +1,71 @@
1
+ import { default as React, ChangeEvent, ReactNode, TextareaHTMLAttributes } from 'react';
2
+ export type ChatFieldProps = {
3
+ ["data-testid"]?: string;
4
+ /**
5
+ * Current value of the textarea in controlled mode.
6
+ * When omitted, the component handles textarea state internally.
7
+ * */
8
+ value?: string;
9
+ /**
10
+ * Placeholder text shown when the textarea is empty.
11
+ * */
12
+ placeholder: string;
13
+ /**
14
+ * Accessible label for the textarea when no aria-label/aria-labelledby
15
+ * is provided via `textareaProps`.
16
+ * */
17
+ textareaAriaLabel?: string;
18
+ /**
19
+ * Changes the action icon from send to stop.
20
+ * */
21
+ generating?: boolean;
22
+ /**
23
+ * Renders the field with negative appearance.
24
+ * */
25
+ negative?: boolean;
26
+ /**
27
+ * Accessible label for the send action icon.
28
+ * */
29
+ sendAriaLabel: string;
30
+ /**
31
+ * Custom icon for the default action button state.
32
+ * Falls back to the standard send icon when omitted.
33
+ * */
34
+ sendIcon?: ReactNode;
35
+ /**
36
+ * Accessible label for the stop action icon.
37
+ * */
38
+ stopAriaLabel: string;
39
+ /**
40
+ * Number of visible text rows. Defaults to 1.
41
+ * */
42
+ rows?: number;
43
+ /**
44
+ * Maximum number of rows before the textarea scrolls. Defaults to 4.
45
+ * */
46
+ maxRows?: number;
47
+ /**
48
+ * Callback for textarea value changes.
49
+ * */
50
+ onChange: (event: ChangeEvent<HTMLTextAreaElement>) => void;
51
+ /**
52
+ * Callback fired when the send action is triggered (Enter key or send button click).
53
+ * */
54
+ onSend: () => void;
55
+ /**
56
+ * Callback fired when the stop button is clicked during generating state.
57
+ * */
58
+ onStopClick: () => void;
59
+ /**
60
+ * HTML type attribute for the action button. Use `"submit"` when ChatField
61
+ * is placed inside a `<form>`. Defaults to `"button"`.
62
+ * */
63
+ actionButtonType?: "button" | "submit";
64
+ /**
65
+ * Additional props forwarded to the textarea element.
66
+ * */
67
+ textareaProps?: Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, "className" | "value" | "placeholder" | "disabled" | "onChange" | "rows">;
68
+ className?: string;
69
+ };
70
+ export declare const ChatField: React.ForwardRefExoticComponent<ChatFieldProps & React.RefAttributes<HTMLTextAreaElement>>;
71
+ //# sourceMappingURL=chat-field.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat-field.d.ts","sourceRoot":"","sources":["../../../../../../components/chat-field/src/chat-field.tsx"],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sourceRoot":"","sources":["../../../../../../components/dismissable-chip-group/src/dismissable-chip-group-item.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAmB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC/D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAQtD,MAAM,MAAM,6BAA6B,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC,GAAG;IACjG,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC,CAAC;AAIF,eAAO,MAAM,wBAAwB;sDAMlC,6BAA6B;;CA0B/B,CAAC"}
1
+ {"version":3,"file":"dismissable-chip-group-item.d.ts","sourceRoot":"","sources":["../../../../../../components/dismissable-chip-group/src/dismissable-chip-group-item.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAmB,KAAK,SAAS,EAAc,MAAM,OAAO,CAAC;AAC3E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAStD,MAAM,MAAM,6BAA6B,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC,GAAG;IACjG,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC,CAAC;AAIF,eAAO,MAAM,wBAAwB;sDAMlC,6BAA6B;;CA6B/B,CAAC"}
@@ -1,14 +1,19 @@
1
1
  import { default as React, ReactNode } from 'react';
2
2
  import { BaseProps } from '../../../libraries/common-types/src/common-types';
3
3
  import { HeadingTagType } from '../../heading/src/heading';
4
+ export declare const sizes: readonly ["sm", "md"];
5
+ export declare const DEFAULT_SIZE: "md";
6
+ export type Size = (typeof sizes)[number];
4
7
  export type DismissableChipGroupProps = Omit<BaseProps, "children"> & {
5
8
  children: ReactNode;
6
9
  fullWidth?: boolean;
10
+ size?: Size;
7
11
  title?: string;
8
12
  titleTag?: HeadingTagType;
9
13
  };
14
+ export declare const SizeContext: React.Context<"sm" | "md">;
10
15
  export declare const DismissableChipGroup: {
11
- ({ children, className, fullWidth, title, titleTag, ...props }: DismissableChipGroupProps): React.JSX.Element;
16
+ ({ children, className, fullWidth, size, title, titleTag, ...props }: DismissableChipGroupProps): React.JSX.Element;
12
17
  Item: {
13
18
  ({ children, id, onDismiss, disabled, ...props }: import('./dismissable-chip-group-item').DismissableChipGroupItemProps): React.JSX.Element;
14
19
  displayName: string;
@@ -1 +1 @@
1
- {"version":3,"file":"dismissable-chip-group.d.ts","sourceRoot":"","sources":["../../../../../../components/dismissable-chip-group/src/dismissable-chip-group.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,SAAS,EAAS,MAAM,OAAO,CAAC;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAQ/D,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,GAAG;IACpE,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,cAAc,CAAC;CAC3B,CAAC;AAIF,eAAO,MAAM,oBAAoB;oEAO9B,yBAAyB;;;;;;CA4B3B,CAAC"}
1
+ {"version":3,"file":"dismissable-chip-group.d.ts","sourceRoot":"","sources":["../../../../../../components/dismissable-chip-group/src/dismissable-chip-group.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAiB,KAAK,SAAS,EAAS,MAAM,OAAO,CAAC;AACpE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAQ/D,eAAO,MAAM,KAAK,uBAAwB,CAAC;AAC3C,eAAO,MAAM,YAAY,EAAG,IAAa,CAAC;AAE1C,MAAM,MAAM,IAAI,GAAG,CAAC,OAAO,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1C,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,GAAG;IACpE,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,cAAc,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,WAAW,4BAAoC,CAAC;AAI7D,eAAO,MAAM,oBAAoB;0EAQ9B,yBAAyB;;;;;;CA6B3B,CAAC"}
@@ -0,0 +1,34 @@
1
+ import { default as React } from 'react';
2
+ import { DropdownOption } from './dropdown.types';
3
+ export declare const DropdownCombobox: React.ForwardRefExoticComponent<{
4
+ id?: string;
5
+ label?: string;
6
+ listboxLabel?: string;
7
+ placeholder?: string;
8
+ helperText?: string;
9
+ errorText?: string;
10
+ valid?: boolean;
11
+ loading?: boolean;
12
+ negative?: boolean;
13
+ required?: boolean;
14
+ disabled?: boolean;
15
+ readOnly?: boolean;
16
+ className?: string;
17
+ "data-testid"?: string;
18
+ } & {
19
+ combobox: true;
20
+ options: DropdownOption[];
21
+ multiple?: boolean;
22
+ selectedOption?: DropdownOption;
23
+ selectedOptions?: DropdownOption[];
24
+ onSelect?: (option: DropdownOption | undefined, selectedOptions: DropdownOption[]) => void;
25
+ filterOption?: (inputValue: string | undefined, option: DropdownOption) => boolean;
26
+ inputValue?: string;
27
+ defaultInputValue?: string;
28
+ onInputChange?: (value: string) => void;
29
+ noOptionsText?: React.ReactNode;
30
+ highlightFirstOption?: boolean;
31
+ openOnFocus?: boolean;
32
+ listboxMaxHeight?: string | number;
33
+ } & React.RefAttributes<HTMLDivElement>>;
34
+ //# sourceMappingURL=dropdown-combobox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dropdown-combobox.d.ts","sourceRoot":"","sources":["../../../../../../components/dropdown/src/dropdown-combobox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAIjD,OAAO,KAAK,EAAiB,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAatE,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCA4N3B,CAAC"}
@@ -0,0 +1,34 @@
1
+ import { default as React } from 'react';
2
+ import { DropdownOption } from './dropdown.types';
3
+ export declare const DropdownSelect: React.ForwardRefExoticComponent<{
4
+ id?: string;
5
+ label?: string;
6
+ listboxLabel?: string;
7
+ placeholder?: string;
8
+ helperText?: string;
9
+ errorText?: string;
10
+ valid?: boolean;
11
+ loading?: boolean;
12
+ negative?: boolean;
13
+ required?: boolean;
14
+ disabled?: boolean;
15
+ readOnly?: boolean;
16
+ className?: string;
17
+ "data-testid"?: string;
18
+ } & {
19
+ combobox?: false;
20
+ options: DropdownOption[];
21
+ multiple?: boolean;
22
+ selectedOption?: DropdownOption;
23
+ selectedOptions?: DropdownOption[];
24
+ onSelect?: (option: DropdownOption | undefined, selectedOptions: DropdownOption[]) => void;
25
+ openOnFocus?: boolean;
26
+ listboxMaxHeight?: string | number;
27
+ filterOption?: never;
28
+ onInputChange?: never;
29
+ inputValue?: never;
30
+ defaultInputValue?: never;
31
+ noOptionsText?: never;
32
+ highlightFirstOption?: never;
33
+ } & React.RefAttributes<HTMLDivElement>>;
34
+ //# sourceMappingURL=dropdown-select.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dropdown-select.d.ts","sourceRoot":"","sources":["../../../../../../components/dropdown/src/dropdown-select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAGjD,OAAO,KAAK,EAAE,cAAc,EAAe,MAAM,kBAAkB,CAAC;AAYpE,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAmKzB,CAAC"}
@@ -0,0 +1,51 @@
1
+ import { default as React } from 'react';
2
+ import { DropdownOption } from './dropdown.types';
3
+ declare const cx: (...args: import('classnames').ArgumentArray) => string;
4
+ export declare const rootClassName = "purpur-dropdown";
5
+ type GetTestId = (name: string) => string | undefined;
6
+ type DropdownLabelProps = {
7
+ fieldId: string;
8
+ htmlForSuffix?: string;
9
+ label?: string;
10
+ getTestId: GetTestId;
11
+ disabled: boolean;
12
+ negative: boolean;
13
+ required: boolean;
14
+ };
15
+ export declare const DropdownLabel: ({ fieldId, htmlForSuffix, label, getTestId, disabled, negative, required, }: DropdownLabelProps) => React.JSX.Element | null;
16
+ type DropdownEndAdornmentsProps = {
17
+ getTestId: GetTestId;
18
+ loading?: boolean;
19
+ disabled: boolean;
20
+ negative: boolean;
21
+ isValid: boolean;
22
+ isOpen?: boolean;
23
+ readOnly?: boolean;
24
+ showChevronOpen: boolean;
25
+ };
26
+ export declare const DropdownEndAdornments: ({ getTestId, loading, disabled, negative, isValid, isOpen, readOnly, showChevronOpen, }: DropdownEndAdornmentsProps) => React.JSX.Element;
27
+ type DropdownTagsProps = {
28
+ selectedItems: DropdownOption[];
29
+ getTestId: GetTestId;
30
+ disabled: boolean;
31
+ onRemove: (option: DropdownOption) => void;
32
+ isSelect?: boolean;
33
+ };
34
+ export declare const DropdownTags: ({ selectedItems, getTestId, disabled, onRemove, isSelect, }: DropdownTagsProps) => React.JSX.Element | null;
35
+ type DropdownFooterProps = {
36
+ errorText?: string;
37
+ helperText?: string;
38
+ helperTextId: string;
39
+ negative: boolean;
40
+ };
41
+ export declare const DropdownFooter: ({ errorText, helperText, helperTextId, negative, }: DropdownFooterProps) => React.JSX.Element;
42
+ type DropdownListboxItemsProps = {
43
+ optionsToShow: DropdownOption[];
44
+ getListboxItemProps: (option: DropdownOption, index: number) => Record<string, unknown>;
45
+ multiple?: boolean;
46
+ fieldId: string;
47
+ noOptionsText?: React.ReactNode;
48
+ };
49
+ export declare const DropdownListboxItems: ({ optionsToShow, getListboxItemProps, multiple, fieldId, noOptionsText, }: DropdownListboxItemsProps) => React.JSX.Element | React.JSX.Element[];
50
+ export { cx };
51
+ //# sourceMappingURL=dropdown-shared.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dropdown-shared.d.ts","sourceRoot":"","sources":["../../../../../../components/dropdown/src/dropdown-shared.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAa1B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,QAAA,MAAM,EAAE,yDAAiB,CAAC;AAC1B,eAAO,MAAM,aAAa,oBAAoB,CAAC;AAE/C,KAAK,SAAS,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;AAEtD,KAAK,kBAAkB,GAAG;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,SAAS,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,6EAQ3B,kBAAkB,6BAepB,CAAC;AAEF,KAAK,0BAA0B,GAAG;IAChC,SAAS,EAAE,SAAS,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,yFASnC,0BAA0B,sBA+B5B,CAAC;AAEF,KAAK,iBAAiB,GAAG;IACvB,aAAa,EAAE,cAAc,EAAE,CAAC;IAChC,SAAS,EAAE,SAAS,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,IAAI,CAAC;IAC3C,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,6DAM1B,iBAAiB,6BA2BnB,CAAC;AAEF,KAAK,mBAAmB,GAAG;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,oDAK5B,mBAAmB,sBASrB,CAAC;AAEF,KAAK,yBAAyB,GAAG;IAC/B,aAAa,EAAE,cAAc,EAAE,CAAC;IAChC,mBAAmB,EAAE,CAAC,MAAM,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACxF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACjC,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,2EAMlC,yBAAyB,4CA+B3B,CAAC;AAEF,OAAO,EAAE,EAAE,EAAE,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ import { DropdownProps } from './dropdown.types';
3
+ export declare const Dropdown: React.ForwardRefExoticComponent<DropdownProps & React.RefAttributes<HTMLDivElement>>;
4
+ export type { ComboboxProps, DropdownOption, DropdownProps, SelectProps } from './dropdown.types';
5
+ export { useDropdown } from './useDropdown';
6
+ //# sourceMappingURL=dropdown.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dropdown.d.ts","sourceRoot":"","sources":["../../../../../../components/dropdown/src/dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,OAAO,KAAK,EAAiB,aAAa,EAAe,MAAM,kBAAkB,CAAC;AAIlF,eAAO,MAAM,QAAQ,sFAMnB,CAAC;AAIH,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAClG,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}