eidos-ui 3.3.0 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -5
- package/dist/{Input.types-XrJTI0JC.d.ts → Input.types-CSDMaZNe.d.ts} +10 -0
- package/dist/{Input.types-DFZNyJGF.d.cts → Input.types-D7-sWq-q.d.cts} +10 -0
- package/dist/{Select.types-CAkT2ACt.d.cts → Select.types-2p-mpaBL.d.cts} +1 -1
- package/dist/{Select.types-B4kDpkGB.d.ts → Select.types-BqaD7bmB.d.ts} +1 -1
- package/dist/alert/index.cjs +5 -5
- package/dist/alert/index.js +4 -4
- package/dist/button/index.cjs +4 -4
- package/dist/button/index.js +3 -3
- package/dist/checkbox/index.cjs +2 -2
- package/dist/checkbox/index.js +1 -1
- package/dist/chip/index.cjs +4 -4
- package/dist/chip/index.js +3 -3
- package/dist/{chunk-RYOQYYDO.js → chunk-22EKNTWJ.js} +9 -5
- package/dist/chunk-22EKNTWJ.js.map +1 -0
- package/dist/{chunk-3E7TKBQI.cjs → chunk-27UANGPW.cjs} +14 -6
- package/dist/chunk-27UANGPW.cjs.map +1 -0
- package/dist/{chunk-CJGFRPAS.cjs → chunk-3QQKWXMV.cjs} +4 -4
- package/dist/chunk-3QQKWXMV.cjs.map +1 -0
- package/dist/{chunk-Q5KQVBQP.cjs → chunk-3S33BIN2.cjs} +18 -16
- package/dist/chunk-3S33BIN2.cjs.map +1 -0
- package/dist/{chunk-ZPDETHQ7.js → chunk-3WV6RTXX.js} +3 -3
- package/dist/{chunk-ZPDETHQ7.js.map → chunk-3WV6RTXX.js.map} +1 -1
- package/dist/chunk-44T4HMFU.js +88 -0
- package/dist/chunk-44T4HMFU.js.map +1 -0
- package/dist/{chunk-3EPND5M2.cjs → chunk-4LET2PEX.cjs} +12 -12
- package/dist/chunk-4LET2PEX.cjs.map +1 -0
- package/dist/{chunk-R4M6SNUU.cjs → chunk-5E4DYTZ3.cjs} +48 -37
- package/dist/chunk-5E4DYTZ3.cjs.map +1 -0
- package/dist/{chunk-I5XR2V4A.cjs → chunk-5V7DXZWT.cjs} +79 -76
- package/dist/chunk-5V7DXZWT.cjs.map +1 -0
- package/dist/{chunk-6CPCNQKV.js → chunk-67EXHO4T.js} +2 -2
- package/dist/{chunk-K7T25Y3A.cjs → chunk-6LCYO2HG.cjs} +10 -9
- package/dist/chunk-6LCYO2HG.cjs.map +1 -0
- package/dist/{chunk-ZNWIHUHZ.cjs → chunk-7KVXXHFX.cjs} +9 -3
- package/dist/chunk-7KVXXHFX.cjs.map +1 -0
- package/dist/{chunk-55J4LEKT.cjs → chunk-AHVDTWVM.cjs} +11 -8
- package/dist/chunk-AHVDTWVM.cjs.map +1 -0
- package/dist/{chunk-OAPOGYA5.cjs → chunk-AXPEJ5IG.cjs} +7 -4
- package/dist/chunk-AXPEJ5IG.cjs.map +1 -0
- package/dist/{chunk-GDQWSCJQ.js → chunk-BBU7QG7L.js} +4 -4
- package/dist/{chunk-T2KB3DJJ.js → chunk-BGBAZMFE.js} +9 -3
- package/dist/chunk-BGBAZMFE.js.map +1 -0
- package/dist/{chunk-EH42ND5Q.cjs → chunk-BIANFFJL.cjs} +5 -5
- package/dist/{chunk-EH42ND5Q.cjs.map → chunk-BIANFFJL.cjs.map} +1 -1
- package/dist/{chunk-O2AACVSF.js → chunk-BO4LTIJI.js} +3 -3
- package/dist/{chunk-G5N3C6AU.cjs → chunk-CBT3TTQR.cjs} +36 -36
- package/dist/{chunk-G5N3C6AU.cjs.map → chunk-CBT3TTQR.cjs.map} +1 -1
- package/dist/{chunk-JRLUZDKA.js → chunk-CEC3GO4R.js} +20 -7
- package/dist/chunk-CEC3GO4R.js.map +1 -0
- package/dist/{chunk-BNVQ34FD.js → chunk-CP335H4Q.js} +4 -4
- package/dist/{chunk-H6CWTMAH.js → chunk-DGXHR6FV.js} +5 -2
- package/dist/chunk-DGXHR6FV.js.map +1 -0
- package/dist/{chunk-OU7DCYIA.js → chunk-DMOZURHV.js} +2 -2
- package/dist/{chunk-L5W2XC6M.js → chunk-EWTMX4DK.js} +8 -8
- package/dist/{chunk-SXGCRHBZ.js → chunk-FDMYDIGI.js} +8 -6
- package/dist/chunk-FDMYDIGI.js.map +1 -0
- package/dist/{chunk-AOGNTG3W.cjs → chunk-FODRHCRP.cjs} +5 -4
- package/dist/chunk-FODRHCRP.cjs.map +1 -0
- package/dist/{chunk-E7FGY7BJ.js → chunk-FPLX5FIK.js} +4 -4
- package/dist/{chunk-NEYLNRVG.cjs → chunk-FXMRDNR6.cjs} +21 -16
- package/dist/chunk-FXMRDNR6.cjs.map +1 -0
- package/dist/{chunk-VXO2MYYH.cjs → chunk-G74DHVHV.cjs} +9 -9
- package/dist/{chunk-VXO2MYYH.cjs.map → chunk-G74DHVHV.cjs.map} +1 -1
- package/dist/{chunk-O3LG7B2J.cjs → chunk-GMDVW76A.cjs} +13 -5
- package/dist/chunk-GMDVW76A.cjs.map +1 -0
- package/dist/{chunk-NQ4L6PYW.js → chunk-GOF6A4M4.js} +2 -2
- package/dist/{chunk-NQ4L6PYW.js.map → chunk-GOF6A4M4.js.map} +1 -1
- package/dist/{chunk-TQGO5WK6.js → chunk-GPK2THIG.js} +7 -6
- package/dist/chunk-GPK2THIG.js.map +1 -0
- package/dist/{chunk-HYDNZXPU.js → chunk-H2RS6Z6Q.js} +41 -25
- package/dist/{chunk-HYDNZXPU.js.map → chunk-H2RS6Z6Q.js.map} +1 -1
- package/dist/{chunk-OJDYTCMO.cjs → chunk-H5D3ZFBM.cjs} +68 -61
- package/dist/chunk-H5D3ZFBM.cjs.map +1 -0
- package/dist/{chunk-MHZIBV2C.js → chunk-IXVM2XNS.js} +7 -6
- package/dist/chunk-IXVM2XNS.js.map +1 -0
- package/dist/{chunk-MCWTQT3M.cjs → chunk-JKBBHAIC.cjs} +21 -20
- package/dist/chunk-JKBBHAIC.cjs.map +1 -0
- package/dist/{chunk-QQIALSTX.cjs → chunk-KPMIIGHH.cjs} +27 -17
- package/dist/chunk-KPMIIGHH.cjs.map +1 -0
- package/dist/{chunk-QJRKXT54.cjs → chunk-KWDOOMHR.cjs} +7 -7
- package/dist/{chunk-QJRKXT54.cjs.map → chunk-KWDOOMHR.cjs.map} +1 -1
- package/dist/{chunk-HALVTKW7.js → chunk-LH5A2SIX.js} +78 -75
- package/dist/{chunk-HALVTKW7.js.map → chunk-LH5A2SIX.js.map} +1 -1
- package/dist/{chunk-27ZWUEPE.js → chunk-LIKSLFX6.js} +20 -9
- package/dist/chunk-LIKSLFX6.js.map +1 -0
- package/dist/{chunk-Z5U4NJTW.cjs → chunk-MLUHM3VG.cjs} +48 -19
- package/dist/chunk-MLUHM3VG.cjs.map +1 -0
- package/dist/{chunk-M7PF4FKQ.js → chunk-MP7LN5CW.js} +6 -3
- package/dist/chunk-MP7LN5CW.js.map +1 -0
- package/dist/{chunk-ACNTH2OQ.cjs → chunk-MW4YZVP5.cjs} +96 -97
- package/dist/chunk-MW4YZVP5.cjs.map +1 -0
- package/dist/{chunk-ZXJU3TQD.cjs → chunk-N5ZWQJTM.cjs} +11 -10
- package/dist/chunk-N5ZWQJTM.cjs.map +1 -0
- package/dist/{chunk-OGC44JFZ.cjs → chunk-N77VOYCK.cjs} +7 -7
- package/dist/{chunk-OGC44JFZ.cjs.map → chunk-N77VOYCK.cjs.map} +1 -1
- package/dist/{chunk-OAK7HFOJ.js → chunk-NACA72XI.js} +21 -16
- package/dist/chunk-NACA72XI.js.map +1 -0
- package/dist/{chunk-TEVZHN5I.cjs → chunk-NCZUQFKL.cjs} +28 -15
- package/dist/chunk-NCZUQFKL.cjs.map +1 -0
- package/dist/{chunk-NZO2I5AL.cjs → chunk-NF55JG2V.cjs} +7 -7
- package/dist/{chunk-NZO2I5AL.cjs.map → chunk-NF55JG2V.cjs.map} +1 -1
- package/dist/{chunk-ZWAFL2B3.cjs → chunk-O46UJUZM.cjs} +21 -19
- package/dist/chunk-O46UJUZM.cjs.map +1 -0
- package/dist/{chunk-25PSIDPC.js → chunk-OIXPYXR6.js} +79 -21
- package/dist/chunk-OIXPYXR6.js.map +1 -0
- package/dist/chunk-OWWPHXAF.cjs +88 -0
- package/dist/chunk-OWWPHXAF.cjs.map +1 -0
- package/dist/{chunk-65PC3YDT.cjs → chunk-OZQKWDFH.cjs} +7 -7
- package/dist/{chunk-65PC3YDT.cjs.map → chunk-OZQKWDFH.cjs.map} +1 -1
- package/dist/{chunk-P2JM22BF.cjs → chunk-P7J6WZTO.cjs} +3 -3
- package/dist/{chunk-P2JM22BF.cjs.map → chunk-P7J6WZTO.cjs.map} +1 -1
- package/dist/{chunk-KQJ3IAFT.js → chunk-PG2EII6U.js} +2 -2
- package/dist/{chunk-E6SE552P.cjs → chunk-RUDXHT76.cjs} +41 -25
- package/dist/chunk-RUDXHT76.cjs.map +1 -0
- package/dist/{chunk-S4S4LB63.js → chunk-SCLFJHN2.js} +11 -3
- package/dist/chunk-SCLFJHN2.js.map +1 -0
- package/dist/{chunk-WKDT2XFQ.js → chunk-SFRILDXY.js} +4 -4
- package/dist/{chunk-J5RMLZ4P.cjs → chunk-SKBKTNEQ.cjs} +80 -22
- package/dist/chunk-SKBKTNEQ.cjs.map +1 -0
- package/dist/{chunk-YW65NAKH.cjs → chunk-SKLMBE3Z.cjs} +7 -7
- package/dist/{chunk-YW65NAKH.cjs.map → chunk-SKLMBE3Z.cjs.map} +1 -1
- package/dist/{chunk-PY2376XI.js → chunk-SVCWSW2F.js} +8 -8
- package/dist/chunk-SVCWSW2F.js.map +1 -0
- package/dist/{chunk-2RXQMQYW.js → chunk-SXL4DMZ7.js} +27 -17
- package/dist/{chunk-2RXQMQYW.js.map → chunk-SXL4DMZ7.js.map} +1 -1
- package/dist/{chunk-7SVDYEKM.js → chunk-TLECMA3B.js} +5 -4
- package/dist/{chunk-7SVDYEKM.js.map → chunk-TLECMA3B.js.map} +1 -1
- package/dist/{chunk-FXZJL2AM.cjs → chunk-TWXZKUCG.cjs} +9 -5
- package/dist/chunk-TWXZKUCG.cjs.map +1 -0
- package/dist/{chunk-GG5YGESX.js → chunk-TYGVKSL6.js} +4 -3
- package/dist/chunk-TYGVKSL6.js.map +1 -0
- package/dist/{chunk-TTO7JXDB.cjs → chunk-TYSNOPMQ.cjs} +3 -3
- package/dist/{chunk-TTO7JXDB.cjs.map → chunk-TYSNOPMQ.cjs.map} +1 -1
- package/dist/{chunk-ZZSPQFMX.js → chunk-U233KQZX.js} +2 -1
- package/dist/{chunk-ZZSPQFMX.js.map → chunk-U233KQZX.js.map} +1 -1
- package/dist/{chunk-5HUZYY54.js → chunk-UDRAM6JU.js} +13 -5
- package/dist/chunk-UDRAM6JU.js.map +1 -0
- package/dist/{chunk-3EUTXQDB.js → chunk-UGTKZ7HP.js} +30 -23
- package/dist/chunk-UGTKZ7HP.js.map +1 -0
- package/dist/{chunk-FKXKBJUI.cjs → chunk-VHO6JPRR.cjs} +2 -1
- package/dist/chunk-VHO6JPRR.cjs.map +1 -0
- package/dist/chunk-VHSTB7GB.cjs +123 -0
- package/dist/chunk-VHSTB7GB.cjs.map +1 -0
- package/dist/{chunk-VPRUHE35.js → chunk-VRNCXYEP.js} +4 -4
- package/dist/{chunk-ITXDSQT2.js → chunk-WGCGSM5P.js} +96 -97
- package/dist/chunk-WGCGSM5P.js.map +1 -0
- package/dist/chunk-WT4WBHBR.js +123 -0
- package/dist/chunk-WT4WBHBR.js.map +1 -0
- package/dist/{chunk-L23WWO3D.js → chunk-X6UKU3C3.js} +2 -2
- package/dist/{chunk-5WH3JMR5.js → chunk-XK5USBHB.js} +7 -4
- package/dist/chunk-XK5USBHB.js.map +1 -0
- package/dist/{chunk-ND526PMG.cjs → chunk-XMXL6NVJ.cjs} +11 -11
- package/dist/{chunk-ND526PMG.cjs.map → chunk-XMXL6NVJ.cjs.map} +1 -1
- package/dist/{chunk-YV57RSPD.js → chunk-XO7WTE6O.js} +47 -18
- package/dist/chunk-XO7WTE6O.js.map +1 -0
- package/dist/{chunk-3CXULV4G.cjs → chunk-XRVRGRC3.cjs} +2 -2
- package/dist/{chunk-3CXULV4G.cjs.map → chunk-XRVRGRC3.cjs.map} +1 -1
- package/dist/{chunk-GPRJYPIG.js → chunk-Y7VSWZWM.js} +6 -4
- package/dist/chunk-Y7VSWZWM.js.map +1 -0
- package/dist/{chunk-2QEKSRVX.js → chunk-YIBPOLNN.js} +4 -4
- package/dist/{chunk-IJ4DXG7D.cjs → chunk-YJNQLH2L.cjs} +5 -2
- package/dist/chunk-YJNQLH2L.cjs.map +1 -0
- package/dist/{chunk-6CSUUQ5M.cjs → chunk-YUH56CJI.cjs} +6 -6
- package/dist/{chunk-6CSUUQ5M.cjs.map → chunk-YUH56CJI.cjs.map} +1 -1
- package/dist/color-picker/index.cjs +4 -4
- package/dist/color-picker/index.d.cts +8 -0
- package/dist/color-picker/index.d.ts +8 -0
- package/dist/color-picker/index.js +3 -3
- package/dist/combobox/index.cjs +6 -6
- package/dist/combobox/index.js +5 -5
- package/dist/command-palette/index.cjs +3 -2
- package/dist/command-palette/index.cjs.map +1 -1
- package/dist/command-palette/index.js +2 -1
- package/dist/context-menu/index.cjs +6 -6
- package/dist/context-menu/index.js +5 -5
- package/dist/conversation/index.cjs +8 -8
- package/dist/conversation/index.js +7 -7
- package/dist/data-grid/index.cjs +16 -16
- package/dist/data-grid/index.d.cts +2 -2
- package/dist/data-grid/index.d.ts +2 -2
- package/dist/data-grid/index.js +15 -15
- package/dist/date-picker/index.cjs +8 -8
- package/dist/date-picker/index.d.cts +1 -1
- package/dist/date-picker/index.d.ts +1 -1
- package/dist/date-picker/index.js +7 -7
- package/dist/drawer/index.cjs +5 -5
- package/dist/drawer/index.js +4 -4
- package/dist/dropdown/index.cjs +3 -3
- package/dist/dropdown/index.js +2 -2
- package/dist/file-upload/index.cjs +2 -2
- package/dist/file-upload/index.js +1 -1
- package/dist/header/index.cjs +6 -6
- package/dist/header/index.js +5 -5
- package/dist/index.cjs +42 -42
- package/dist/index.css +93 -38
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +41 -41
- package/dist/inline-edit/index.cjs +5 -5
- package/dist/inline-edit/index.js +4 -4
- package/dist/input/index.cjs +4 -4
- package/dist/input/index.d.cts +2 -2
- package/dist/input/index.d.ts +2 -2
- package/dist/input/index.js +3 -3
- package/dist/menu/index.cjs +5 -5
- package/dist/menu/index.js +4 -4
- package/dist/modal/index.cjs +5 -5
- package/dist/modal/index.js +4 -4
- package/dist/navigation/index.cjs +5 -5
- package/dist/navigation/index.js +4 -4
- package/dist/number-input/index.cjs +3 -3
- package/dist/number-input/index.js +2 -2
- package/dist/o-t-p-input/index.cjs +2 -2
- package/dist/o-t-p-input/index.js +1 -1
- package/dist/page-layout/index.cjs +12 -12
- package/dist/page-layout/index.js +11 -11
- package/dist/pagination/index.cjs +8 -8
- package/dist/pagination/index.js +7 -7
- package/dist/popover/index.cjs +3 -2
- package/dist/popover/index.cjs.map +1 -1
- package/dist/popover/index.js +2 -1
- package/dist/radio/index.cjs +2 -2
- package/dist/radio/index.js +1 -1
- package/dist/segmented-control/index.cjs +4 -4
- package/dist/segmented-control/index.js +3 -3
- package/dist/select/index.cjs +6 -6
- package/dist/select/index.d.cts +3 -3
- package/dist/select/index.d.ts +3 -3
- package/dist/select/index.js +5 -5
- package/dist/snackbar/index.cjs +5 -5
- package/dist/snackbar/index.d.cts +4 -0
- package/dist/snackbar/index.d.ts +4 -0
- package/dist/snackbar/index.js +4 -4
- package/dist/split-button/index.cjs +6 -6
- package/dist/split-button/index.js +5 -5
- package/dist/table/index.cjs +14 -14
- package/dist/table/index.js +13 -13
- package/dist/tabs/index.cjs +3 -3
- package/dist/tabs/index.js +2 -2
- package/dist/tag-input/index.cjs +6 -6
- package/dist/tag-input/index.js +5 -5
- package/dist/textarea/index.cjs +4 -4
- package/dist/textarea/index.js +3 -3
- package/dist/theme-editor/index.cjs +11 -11
- package/dist/theme-editor/index.js +10 -10
- package/dist/theme-provider/index.cjs +3 -3
- package/dist/theme-provider/index.js +2 -2
- package/dist/toolbar/index.cjs +8 -8
- package/dist/toolbar/index.js +7 -7
- package/dist/tooltip/index.cjs +3 -2
- package/dist/tooltip/index.cjs.map +1 -1
- package/dist/tooltip/index.js +2 -1
- package/dist/virtual-list/index.cjs +2 -2
- package/dist/virtual-list/index.js +1 -1
- package/package.json +7 -2
- package/dist/chunk-25PSIDPC.js.map +0 -1
- package/dist/chunk-27ZWUEPE.js.map +0 -1
- package/dist/chunk-3E7TKBQI.cjs.map +0 -1
- package/dist/chunk-3EPND5M2.cjs.map +0 -1
- package/dist/chunk-3EUTXQDB.js.map +0 -1
- package/dist/chunk-55J4LEKT.cjs.map +0 -1
- package/dist/chunk-5HUZYY54.js.map +0 -1
- package/dist/chunk-5WH3JMR5.js.map +0 -1
- package/dist/chunk-ACNTH2OQ.cjs.map +0 -1
- package/dist/chunk-AOGNTG3W.cjs.map +0 -1
- package/dist/chunk-CJGFRPAS.cjs.map +0 -1
- package/dist/chunk-CUJBNRJJ.cjs +0 -38
- package/dist/chunk-CUJBNRJJ.cjs.map +0 -1
- package/dist/chunk-E6SE552P.cjs.map +0 -1
- package/dist/chunk-EAJHEYZM.js +0 -38
- package/dist/chunk-EAJHEYZM.js.map +0 -1
- package/dist/chunk-FKXKBJUI.cjs.map +0 -1
- package/dist/chunk-FXZJL2AM.cjs.map +0 -1
- package/dist/chunk-GG5YGESX.js.map +0 -1
- package/dist/chunk-GPRJYPIG.js.map +0 -1
- package/dist/chunk-H6CWTMAH.js.map +0 -1
- package/dist/chunk-I5XR2V4A.cjs.map +0 -1
- package/dist/chunk-IJ4DXG7D.cjs.map +0 -1
- package/dist/chunk-ITXDSQT2.js.map +0 -1
- package/dist/chunk-J5RMLZ4P.cjs.map +0 -1
- package/dist/chunk-JRLUZDKA.js.map +0 -1
- package/dist/chunk-K7T25Y3A.cjs.map +0 -1
- package/dist/chunk-L5Q6UDY3.js +0 -69
- package/dist/chunk-L5Q6UDY3.js.map +0 -1
- package/dist/chunk-M7PF4FKQ.js.map +0 -1
- package/dist/chunk-MCWTQT3M.cjs.map +0 -1
- package/dist/chunk-MHZIBV2C.js.map +0 -1
- package/dist/chunk-NEYLNRVG.cjs.map +0 -1
- package/dist/chunk-O3LG7B2J.cjs.map +0 -1
- package/dist/chunk-OAK7HFOJ.js.map +0 -1
- package/dist/chunk-OAPOGYA5.cjs.map +0 -1
- package/dist/chunk-OJDYTCMO.cjs.map +0 -1
- package/dist/chunk-PY2376XI.js.map +0 -1
- package/dist/chunk-Q5KQVBQP.cjs.map +0 -1
- package/dist/chunk-QQIALSTX.cjs.map +0 -1
- package/dist/chunk-R4M6SNUU.cjs.map +0 -1
- package/dist/chunk-RYOQYYDO.js.map +0 -1
- package/dist/chunk-S4S4LB63.js.map +0 -1
- package/dist/chunk-SXGCRHBZ.js.map +0 -1
- package/dist/chunk-T2KB3DJJ.js.map +0 -1
- package/dist/chunk-TEVZHN5I.cjs.map +0 -1
- package/dist/chunk-TQGO5WK6.js.map +0 -1
- package/dist/chunk-WWYJNWJY.cjs +0 -69
- package/dist/chunk-WWYJNWJY.cjs.map +0 -1
- package/dist/chunk-YV57RSPD.js.map +0 -1
- package/dist/chunk-Z5U4NJTW.cjs.map +0 -1
- package/dist/chunk-ZNWIHUHZ.cjs.map +0 -1
- package/dist/chunk-ZWAFL2B3.cjs.map +0 -1
- package/dist/chunk-ZXJU3TQD.cjs.map +0 -1
- /package/dist/{chunk-6CPCNQKV.js.map → chunk-67EXHO4T.js.map} +0 -0
- /package/dist/{chunk-GDQWSCJQ.js.map → chunk-BBU7QG7L.js.map} +0 -0
- /package/dist/{chunk-O2AACVSF.js.map → chunk-BO4LTIJI.js.map} +0 -0
- /package/dist/{chunk-BNVQ34FD.js.map → chunk-CP335H4Q.js.map} +0 -0
- /package/dist/{chunk-OU7DCYIA.js.map → chunk-DMOZURHV.js.map} +0 -0
- /package/dist/{chunk-L5W2XC6M.js.map → chunk-EWTMX4DK.js.map} +0 -0
- /package/dist/{chunk-E7FGY7BJ.js.map → chunk-FPLX5FIK.js.map} +0 -0
- /package/dist/{chunk-KQJ3IAFT.js.map → chunk-PG2EII6U.js.map} +0 -0
- /package/dist/{chunk-WKDT2XFQ.js.map → chunk-SFRILDXY.js.map} +0 -0
- /package/dist/{chunk-VPRUHE35.js.map → chunk-VRNCXYEP.js.map} +0 -0
- /package/dist/{chunk-L23WWO3D.js.map → chunk-X6UKU3C3.js.map} +0 -0
- /package/dist/{chunk-2QEKSRVX.js.map → chunk-YIBPOLNN.js.map} +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CommandPalette
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SVCWSW2F.js";
|
|
4
4
|
import {
|
|
5
5
|
Menu
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-CP335H4Q.js";
|
|
7
7
|
import {
|
|
8
8
|
Avatar
|
|
9
9
|
} from "./chunk-XJBWFDDE.js";
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
} from "./chunk-DRXPTACG.js";
|
|
13
13
|
import {
|
|
14
14
|
IconButton
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-44T4HMFU.js";
|
|
16
16
|
|
|
17
17
|
// src/components/Toolbar/Toolbar.component.tsx
|
|
18
18
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -42,4 +42,4 @@ var Toolbar = ({
|
|
|
42
42
|
export {
|
|
43
43
|
Toolbar
|
|
44
44
|
};
|
|
45
|
-
//# sourceMappingURL=chunk-
|
|
45
|
+
//# sourceMappingURL=chunk-VRNCXYEP.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Chip
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NACA72XI.js";
|
|
4
4
|
import {
|
|
5
5
|
Dropdown
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-67EXHO4T.js";
|
|
7
7
|
|
|
8
8
|
// src/components/TagInput/TagInput.component.tsx
|
|
9
9
|
import { useState, useId, useRef, useCallback, useMemo, useEffect } from "react";
|
|
@@ -195,100 +195,99 @@ var TagInput = ({
|
|
|
195
195
|
disabled && "eidos-tag-input-field--disabled"
|
|
196
196
|
].filter(Boolean).join(" ");
|
|
197
197
|
const uid = generatedId;
|
|
198
|
-
return
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
"
|
|
204
|
-
"
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
}
|
|
198
|
+
return (
|
|
199
|
+
// No ARIA on this wrapper - it has no role, so `aria-expanded` and
|
|
200
|
+
// `aria-haspopup` were invalid here. Same fix as `Combobox`: they belong
|
|
201
|
+
// on the input, which is the combobox.
|
|
202
|
+
/* @__PURE__ */ jsxs("div", { className: containerClasses, ref: containerRef, children: [
|
|
203
|
+
label && /* @__PURE__ */ jsx("label", { htmlFor: inputId, className: "eidos-tag-input-label", children: label }),
|
|
204
|
+
/* @__PURE__ */ jsxs("div", { className: fieldClasses, onClick: handleFieldClick, ref: fieldRef, children: [
|
|
205
|
+
tags.map((tag, index) => /* @__PURE__ */ jsx(
|
|
206
|
+
Chip,
|
|
207
|
+
{
|
|
208
|
+
variant: "filled",
|
|
209
|
+
color: "primary",
|
|
210
|
+
size,
|
|
211
|
+
onRemove: disabled ? void 0 : () => removeTag(index),
|
|
212
|
+
children: tag
|
|
213
|
+
},
|
|
214
|
+
`${tag}-${index}`
|
|
215
|
+
)),
|
|
216
|
+
/* @__PURE__ */ jsx(
|
|
217
|
+
"input",
|
|
218
|
+
{
|
|
219
|
+
ref: inputRef,
|
|
220
|
+
id: inputId,
|
|
221
|
+
className: "eidos-tag-input-input",
|
|
222
|
+
type: "text",
|
|
223
|
+
value: inputValue,
|
|
224
|
+
placeholder: tags.length === 0 ? placeholder : void 0,
|
|
225
|
+
disabled,
|
|
226
|
+
onKeyDown: handleKeyDown,
|
|
227
|
+
onChange: handleInputChange,
|
|
228
|
+
onFocus: handleInputFocus,
|
|
229
|
+
onBlur: () => setIsFocused(false),
|
|
230
|
+
"aria-label": label ? void 0 : "Tag input",
|
|
231
|
+
"aria-invalid": hasError ? true : void 0,
|
|
232
|
+
"aria-describedby": hasError ? errorId : hint ? hintId : void 0,
|
|
233
|
+
role: hasSuggestions ? "combobox" : void 0,
|
|
234
|
+
"aria-expanded": hasSuggestions ? isSuggestionsOpen : void 0,
|
|
235
|
+
"aria-autocomplete": hasSuggestions ? "list" : void 0,
|
|
236
|
+
"aria-controls": hasSuggestions && isSuggestionsOpen ? `${uid}-tag-suggestions` : void 0,
|
|
237
|
+
"aria-activedescendant": hasSuggestions && focusedSuggestionIndex >= 0 ? `${uid}-tag-suggestion-${focusedSuggestionIndex}` : void 0
|
|
238
|
+
}
|
|
239
|
+
),
|
|
240
|
+
hasSuggestions && /* @__PURE__ */ jsx(
|
|
241
|
+
Dropdown,
|
|
242
|
+
{
|
|
243
|
+
trigger: /* @__PURE__ */ jsx(
|
|
244
|
+
"span",
|
|
245
|
+
{
|
|
246
|
+
ref: dropdownSpanRef,
|
|
247
|
+
className: "eidos-tag-input-dropdown-anchor",
|
|
248
|
+
"aria-hidden": "true"
|
|
249
|
+
}
|
|
250
|
+
),
|
|
251
|
+
content: /* @__PURE__ */ jsx(
|
|
252
|
+
"div",
|
|
253
|
+
{
|
|
254
|
+
id: `${uid}-tag-suggestions`,
|
|
255
|
+
className: "eidos-tag-input-suggestions",
|
|
256
|
+
role: "listbox",
|
|
257
|
+
"aria-label": label ?? "Suggestions",
|
|
258
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
259
|
+
children: filteredSuggestions.length === 0 ? /* @__PURE__ */ jsx("div", { className: "eidos-tag-input-suggestions-empty", children: suggestionsEmptyText }) : filteredSuggestions.map((suggestion, index) => /* @__PURE__ */ jsx(
|
|
260
|
+
"div",
|
|
261
|
+
{
|
|
262
|
+
id: `${uid}-tag-suggestion-${index}`,
|
|
263
|
+
className: [
|
|
264
|
+
"eidos-tag-input-suggestion",
|
|
265
|
+
index === focusedSuggestionIndex && "eidos-tag-input-suggestion--focused"
|
|
266
|
+
].filter(Boolean).join(" "),
|
|
267
|
+
role: "option",
|
|
268
|
+
"aria-selected": index === focusedSuggestionIndex,
|
|
269
|
+
onClick: () => selectSuggestion(suggestion),
|
|
270
|
+
onMouseEnter: () => setFocusedSuggestionIndex(index),
|
|
271
|
+
children: suggestion
|
|
272
|
+
},
|
|
273
|
+
suggestion
|
|
274
|
+
))
|
|
275
|
+
}
|
|
276
|
+
),
|
|
277
|
+
triggerRef: fieldRef,
|
|
278
|
+
autoWidth: true,
|
|
279
|
+
closeOnClickOutside: false,
|
|
280
|
+
closeOnEscape: false
|
|
281
|
+
},
|
|
282
|
+
suggestionsMenuKey
|
|
283
|
+
)
|
|
284
|
+
] }),
|
|
285
|
+
hint && !hasError && /* @__PURE__ */ jsx("p", { className: "eidos-tag-input-hint", id: hintId, children: hint }),
|
|
286
|
+
hasError && /* @__PURE__ */ jsxs("p", { className: "eidos-tag-input-error-message", id: errorId, role: "alert", children: [
|
|
287
|
+
/* @__PURE__ */ jsx(CircleAlert, {}),
|
|
288
|
+
displayError
|
|
289
|
+
] })
|
|
290
|
+
] })
|
|
292
291
|
);
|
|
293
292
|
};
|
|
294
293
|
TagInput.displayName = "TagInput";
|
|
@@ -296,4 +295,4 @@ TagInput.displayName = "TagInput";
|
|
|
296
295
|
export {
|
|
297
296
|
TagInput
|
|
298
297
|
};
|
|
299
|
-
//# sourceMappingURL=chunk-
|
|
298
|
+
//# sourceMappingURL=chunk-WGCGSM5P.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/TagInput/TagInput.component.tsx"],"sourcesContent":["import React, { useState, useId, useRef, useCallback, useMemo, useEffect } from 'react';\nimport { CircleAlert } from 'lucide-react';\nimport { Chip } from '../Chip/Chip.component';\nimport { Dropdown } from '../Dropdown/Dropdown.component';\nimport type { TagInputProps } from './TagInput.types';\nimport './TagInput.scss';\n\nexport const TagInput: React.FC<TagInputProps> = ({\n value,\n defaultValue = [],\n onChange,\n placeholder = 'Add tag…',\n size = 'md',\n disabled = false,\n label,\n error,\n hint,\n allowDuplicates = false,\n maxTags,\n separators = ['Enter', ',', 'Tab'],\n validate,\n className = '',\n fullWidth = false,\n suggestions,\n onSearch,\n suggestionsEmptyText = 'No matches',\n}) => {\n const generatedId = useId();\n const inputId = `tag-input-${generatedId}`;\n const inputRef = useRef<HTMLInputElement>(null);\n\n /** Entire component wrapper - used for click-outside detection on the suggestions dropdown */\n const containerRef = useRef<HTMLDivElement>(null);\n\n /** The field wrapper - passed to Dropdown as externalTriggerRef for width/anchoring */\n const fieldRef = useRef<HTMLDivElement>(null);\n\n /** The 0-height span that IS the Dropdown trigger element - programmatically clicked to open */\n const dropdownSpanRef = useRef<HTMLSpanElement>(null);\n\n const hasSuggestions = suggestions !== undefined;\n const isSuggestionsOpenRef = useRef(false);\n const [isSuggestionsOpen, setIsSuggestionsOpen] = useState(false);\n const [suggestionsMenuKey, setSuggestionsMenuKey] = useState(0);\n const [focusedSuggestionIndex, setFocusedSuggestionIndex] = useState(-1);\n\n const isControlled = value !== undefined;\n\n const [internalTags, setInternalTags] = useState<string[]>(defaultValue);\n const [inputValue, setInputValue] = useState('');\n const [isFocused, setIsFocused] = useState(false);\n const [validationError, setValidationError] = useState<string | null>(null);\n\n const tags = isControlled ? (value as string[]) : internalTags;\n\n const updateTags = useCallback(\n (newTags: string[]) => {\n if (!isControlled) {\n setInternalTags(newTags);\n }\n onChange?.(newTags);\n },\n [isControlled, onChange],\n );\n\n const addTag = useCallback(\n (rawTag: string) => {\n const tag = rawTag.trim();\n\n if (!tag) return;\n\n if (!allowDuplicates && tags.includes(tag)) return;\n\n if (maxTags !== undefined && tags.length >= maxTags) return;\n\n if (validate) {\n const result = validate(tag);\n if (result === false) return;\n if (typeof result === 'string') {\n setValidationError(result);\n return;\n }\n // result === true → valid, fall through\n }\n\n setValidationError(null);\n updateTags([...tags, tag]);\n setInputValue('');\n },\n [tags, allowDuplicates, maxTags, validate, updateTags],\n );\n\n const removeTag = useCallback(\n (index: number) => {\n updateTags(tags.filter((_, i) => i !== index));\n },\n [tags, updateTags],\n );\n\n // ─── Suggestions dropdown (autocomplete) ───────────────────────────────────\n\n const filteredSuggestions = useMemo<string[]>(() => {\n if (!suggestions) return [];\n const query = inputValue.trim().toLowerCase();\n return suggestions.filter((suggestion) => {\n if (!allowDuplicates && tags.includes(suggestion)) return false;\n if (!query) return true;\n return suggestion.toLowerCase().includes(query);\n });\n }, [suggestions, inputValue, tags, allowDuplicates]);\n\n useEffect(() => {\n setFocusedSuggestionIndex(-1);\n }, [filteredSuggestions]);\n\n const openSuggestions = useCallback(() => {\n if (isSuggestionsOpenRef.current || disabled || !hasSuggestions) return;\n dropdownSpanRef.current?.click(); // opens the Dropdown (bubbles to trigger)\n isSuggestionsOpenRef.current = true;\n setIsSuggestionsOpen(true);\n }, [disabled, hasSuggestions]);\n\n const closeSuggestions = useCallback(() => {\n isSuggestionsOpenRef.current = false;\n setIsSuggestionsOpen(false);\n setFocusedSuggestionIndex(-1);\n setSuggestionsMenuKey((prev) => prev + 1);\n }, []);\n\n const selectSuggestion = useCallback(\n (suggestion: string) => {\n addTag(suggestion);\n closeSuggestions();\n inputRef.current?.focus();\n },\n [addTag, closeSuggestions],\n );\n\n // Click-outside detection for the suggestions dropdown.\n useEffect(() => {\n if (!hasSuggestions) return;\n\n const handleMouseDown = (e: MouseEvent) => {\n if (!isSuggestionsOpenRef.current) return;\n if (e.defaultPrevented) return; // click inside the portal-rendered listbox\n if (containerRef.current?.contains(e.target as Node)) return;\n closeSuggestions();\n };\n\n document.addEventListener('mousedown', handleMouseDown);\n return () => document.removeEventListener('mousedown', handleMouseDown);\n }, [hasSuggestions, closeSuggestions]);\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {\n if (hasSuggestions && isSuggestionsOpenRef.current && filteredSuggestions.length > 0) {\n if (e.key === 'ArrowDown') {\n e.preventDefault();\n setFocusedSuggestionIndex((prev) => (prev + 1 < filteredSuggestions.length ? prev + 1 : 0));\n return;\n }\n if (e.key === 'ArrowUp') {\n e.preventDefault();\n setFocusedSuggestionIndex((prev) => (prev > 0 ? prev - 1 : filteredSuggestions.length - 1));\n return;\n }\n if (e.key === 'Enter' && focusedSuggestionIndex >= 0) {\n e.preventDefault();\n selectSuggestion(filteredSuggestions[focusedSuggestionIndex]);\n return;\n }\n if (e.key === 'Escape') {\n e.preventDefault();\n closeSuggestions();\n return;\n }\n }\n\n if (separators.includes(e.key)) {\n e.preventDefault();\n addTag(inputValue);\n return;\n }\n\n if (e.key === 'Backspace' && inputValue === '' && tags.length > 0) {\n e.preventDefault();\n removeTag(tags.length - 1);\n }\n };\n\n const handleInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n const query = e.target.value;\n setInputValue(query);\n if (validationError) {\n setValidationError(null);\n }\n onSearch?.(query);\n if (hasSuggestions && !isSuggestionsOpenRef.current) openSuggestions();\n };\n\n const handleInputFocus = () => {\n setIsFocused(true);\n if (hasSuggestions) openSuggestions();\n };\n\n const handleFieldClick = (e: React.MouseEvent<HTMLDivElement>) => {\n // Don't steal focus from interactive child elements\n if ((e.target as HTMLElement).closest('button, input')) return;\n if (!disabled) {\n inputRef.current?.focus();\n }\n };\n\n const displayError = validationError ?? error;\n const hasError = !!displayError;\n const errorId = `${inputId}-error`;\n const hintId = `${inputId}-hint`;\n\n const containerClasses = [\n 'eidos-tag-input',\n hasError && 'eidos-tag-input--error',\n disabled && 'eidos-tag-input--disabled',\n fullWidth && 'eidos-tag-input--full-width',\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n const fieldClasses = [\n 'eidos-tag-input-field',\n `eidos-tag-input-field--${size}`,\n isFocused && 'eidos-tag-input-field--focused',\n hasError && 'eidos-tag-input-field--error',\n disabled && 'eidos-tag-input-field--disabled',\n ]\n .filter(Boolean)\n .join(' ');\n\n const uid = generatedId;\n\n return (\n // No ARIA on this wrapper - it has no role, so `aria-expanded` and\n // `aria-haspopup` were invalid here. Same fix as `Combobox`: they belong\n // on the input, which is the combobox.\n <div className={containerClasses} ref={containerRef}>\n {label && (\n <label htmlFor={inputId} className=\"eidos-tag-input-label\">\n {label}\n </label>\n )}\n\n <div className={fieldClasses} onClick={handleFieldClick} ref={fieldRef}>\n {tags.map((tag, index) => (\n <Chip\n key={`${tag}-${index}`}\n variant=\"filled\"\n color=\"primary\"\n size={size}\n onRemove={disabled ? undefined : () => removeTag(index)}\n >\n {tag}\n </Chip>\n ))}\n\n <input\n ref={inputRef}\n id={inputId}\n className=\"eidos-tag-input-input\"\n type=\"text\"\n value={inputValue}\n placeholder={tags.length === 0 ? placeholder : undefined}\n disabled={disabled}\n onKeyDown={handleKeyDown}\n onChange={handleInputChange}\n onFocus={handleInputFocus}\n onBlur={() => setIsFocused(false)}\n aria-label={label ? undefined : 'Tag input'}\n aria-invalid={hasError ? true : undefined}\n // The ternary is deliberate, not a bug: the hint is unmounted when\n // an error shows (see the render below), so describing the field\n // with it would point at an element that is not there.\n aria-describedby={hasError ? errorId : hint ? hintId : undefined}\n role={hasSuggestions ? 'combobox' : undefined}\n aria-expanded={hasSuggestions ? isSuggestionsOpen : undefined}\n aria-autocomplete={hasSuggestions ? 'list' : undefined}\n // Only while the list is actually rendered - `aria-controls` must\n // name an element that exists.\n aria-controls={hasSuggestions && isSuggestionsOpen ? `${uid}-tag-suggestions` : undefined}\n aria-activedescendant={\n hasSuggestions && focusedSuggestionIndex >= 0\n ? `${uid}-tag-suggestion-${focusedSuggestionIndex}`\n : undefined\n }\n />\n\n {hasSuggestions && (\n <Dropdown\n key={suggestionsMenuKey}\n trigger={\n <span\n ref={dropdownSpanRef}\n className=\"eidos-tag-input-dropdown-anchor\"\n aria-hidden=\"true\"\n />\n }\n content={\n <div\n id={`${uid}-tag-suggestions`}\n className=\"eidos-tag-input-suggestions\"\n role=\"listbox\"\n aria-label={label ?? 'Suggestions'}\n onMouseDown={(e) => e.preventDefault()}\n >\n {filteredSuggestions.length === 0 ? (\n <div className=\"eidos-tag-input-suggestions-empty\">{suggestionsEmptyText}</div>\n ) : (\n filteredSuggestions.map((suggestion, index) => (\n <div\n key={suggestion}\n id={`${uid}-tag-suggestion-${index}`}\n className={[\n 'eidos-tag-input-suggestion',\n index === focusedSuggestionIndex && 'eidos-tag-input-suggestion--focused',\n ]\n .filter(Boolean)\n .join(' ')}\n role=\"option\"\n aria-selected={index === focusedSuggestionIndex}\n onClick={() => selectSuggestion(suggestion)}\n onMouseEnter={() => setFocusedSuggestionIndex(index)}\n >\n {suggestion}\n </div>\n ))\n )}\n </div>\n }\n triggerRef={fieldRef as React.RefObject<HTMLElement | null>}\n autoWidth\n closeOnClickOutside={false}\n closeOnEscape={false}\n />\n )}\n </div>\n\n {hint && !hasError && (\n <p className=\"eidos-tag-input-hint\" id={hintId}>\n {hint}\n </p>\n )}\n\n {hasError && (\n <p className=\"eidos-tag-input-error-message\" id={errorId} role=\"alert\">\n <CircleAlert />\n {displayError}\n </p>\n )}\n </div>\n );\n};\n\nTagInput.displayName = 'TagInput';\n"],"mappings":";;;;;;;;AAAA,SAAgB,UAAU,OAAO,QAAQ,aAAa,SAAS,iBAAiB;AAChF,SAAS,mBAAmB;AAoPpB,cAKF,YALE;AA9OD,IAAM,WAAoC,CAAC;AAAA,EAChD;AAAA,EACA,eAAe,CAAC;AAAA,EAChB;AAAA,EACA,cAAc;AAAA,EACd,OAAO;AAAA,EACP,WAAW;AAAA,EACX;AAAA,EACA;AAAA,EACA;AAAA,EACA,kBAAkB;AAAA,EAClB;AAAA,EACA,aAAa,CAAC,SAAS,KAAK,KAAK;AAAA,EACjC;AAAA,EACA,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ;AAAA,EACA;AAAA,EACA,uBAAuB;AACzB,MAAM;AACJ,QAAM,cAAc,MAAM;AAC1B,QAAM,UAAU,aAAa,WAAW;AACxC,QAAM,WAAW,OAAyB,IAAI;AAG9C,QAAM,eAAe,OAAuB,IAAI;AAGhD,QAAM,WAAW,OAAuB,IAAI;AAG5C,QAAM,kBAAkB,OAAwB,IAAI;AAEpD,QAAM,iBAAiB,gBAAgB;AACvC,QAAM,uBAAuB,OAAO,KAAK;AACzC,QAAM,CAAC,mBAAmB,oBAAoB,IAAI,SAAS,KAAK;AAChE,QA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AAI,QACrC,gBACH;AAAA,MAGD,YACC,qBAAC,OAAE,WAAU,iCAAgC,IAAI,SAAS,MAAK,SAC7D;AAAA,4BAAC,eAAY;AAAA,QACZ;AAAA,SACH;AAAA,OAEJ;AAAA;AAEJ;AAEA,SAAS,cAAc;","names":[]}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
// src/utils/renderIcon.tsx
|
|
2
|
+
import { icons } from "lucide-react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
var renderIcon = (icon, className) => {
|
|
5
|
+
if (!icon) return null;
|
|
6
|
+
if (typeof icon === "string") {
|
|
7
|
+
const iconName = icon.split("-").map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join("");
|
|
8
|
+
const LucideIcon = icons[iconName];
|
|
9
|
+
if (LucideIcon) {
|
|
10
|
+
return /* @__PURE__ */ jsx(LucideIcon, { className, "aria-hidden": "true" });
|
|
11
|
+
}
|
|
12
|
+
return /* @__PURE__ */ jsx("i", { className: `${icon} ${className || ""}`, "aria-hidden": "true" });
|
|
13
|
+
}
|
|
14
|
+
const IconComponent = icon;
|
|
15
|
+
return /* @__PURE__ */ jsx(IconComponent, { className, "aria-hidden": "true" });
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
// src/utils/devWarn.ts
|
|
19
|
+
var warned = /* @__PURE__ */ new Set();
|
|
20
|
+
function devWarn(key, message) {
|
|
21
|
+
const nodeEnv = globalThis.process?.env?.NODE_ENV;
|
|
22
|
+
if (nodeEnv === "production") return;
|
|
23
|
+
if (warned.has(key)) return;
|
|
24
|
+
warned.add(key);
|
|
25
|
+
console.warn(`[eidos-ui] ${message}`);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// src/utils/dualModifier.ts
|
|
29
|
+
var dualModifier = (block, canonical, legacy) => `${block}--${canonical} ${block}--${legacy}`;
|
|
30
|
+
var fullWidthModifier = (block) => dualModifier(block, "full-width", "fullWidth");
|
|
31
|
+
|
|
32
|
+
// src/utils/useDialogFocus.ts
|
|
33
|
+
import { useEffect } from "react";
|
|
34
|
+
var FOCUSABLE_SELECTOR = [
|
|
35
|
+
"a[href]",
|
|
36
|
+
"area[href]",
|
|
37
|
+
"button:not([disabled])",
|
|
38
|
+
'input:not([disabled]):not([type="hidden"])',
|
|
39
|
+
"select:not([disabled])",
|
|
40
|
+
"textarea:not([disabled])",
|
|
41
|
+
"details > summary:first-of-type",
|
|
42
|
+
"iframe",
|
|
43
|
+
"audio[controls]",
|
|
44
|
+
"video[controls]",
|
|
45
|
+
'[contenteditable]:not([contenteditable="false"])',
|
|
46
|
+
'[tabindex]:not([tabindex^="-"])'
|
|
47
|
+
].join(",");
|
|
48
|
+
var isVisible = (element) => element.getClientRects().length > 0 && getComputedStyle(element).visibility !== "hidden";
|
|
49
|
+
var getFocusable = (container) => Array.from(container.querySelectorAll(FOCUSABLE_SELECTOR)).filter(
|
|
50
|
+
(element) => isVisible(element) && element.closest('[aria-hidden="true"]') === null
|
|
51
|
+
);
|
|
52
|
+
var trapStack = [];
|
|
53
|
+
var useDialogFocus = (active, containerRef, { initialFocus, restoreFocus = true, trapTab = true } = {}) => {
|
|
54
|
+
useEffect(() => {
|
|
55
|
+
const container = containerRef.current;
|
|
56
|
+
if (!active || !container) return;
|
|
57
|
+
const previouslyFocused = document.activeElement;
|
|
58
|
+
trapStack.push(container);
|
|
59
|
+
const MAX_FRAMES = 10;
|
|
60
|
+
let frame = 0;
|
|
61
|
+
let attempts = 0;
|
|
62
|
+
const tryFocus = () => {
|
|
63
|
+
const target = initialFocus?.current ?? getFocusable(container)[0];
|
|
64
|
+
if (target) {
|
|
65
|
+
target.focus();
|
|
66
|
+
} else {
|
|
67
|
+
if (!container.hasAttribute("tabindex")) container.setAttribute("tabindex", "-1");
|
|
68
|
+
container.focus();
|
|
69
|
+
}
|
|
70
|
+
if (!container.contains(document.activeElement) && attempts < MAX_FRAMES) {
|
|
71
|
+
attempts += 1;
|
|
72
|
+
frame = requestAnimationFrame(tryFocus);
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
tryFocus();
|
|
76
|
+
const onKeyDown = (event) => {
|
|
77
|
+
if (event.key !== "Tab") return;
|
|
78
|
+
if (trapStack[trapStack.length - 1] !== container) return;
|
|
79
|
+
const focusable = getFocusable(container);
|
|
80
|
+
if (focusable.length === 0) {
|
|
81
|
+
event.preventDefault();
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
const first = focusable[0];
|
|
85
|
+
const last = focusable[focusable.length - 1];
|
|
86
|
+
const activeElement = document.activeElement;
|
|
87
|
+
if (!activeElement || !container.contains(activeElement)) {
|
|
88
|
+
event.preventDefault();
|
|
89
|
+
(event.shiftKey ? last : first).focus();
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
if (event.shiftKey && activeElement === first) {
|
|
93
|
+
event.preventDefault();
|
|
94
|
+
last.focus();
|
|
95
|
+
} else if (!event.shiftKey && activeElement === last) {
|
|
96
|
+
event.preventDefault();
|
|
97
|
+
first.focus();
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
if (trapTab) document.addEventListener("keydown", onKeyDown, true);
|
|
101
|
+
return () => {
|
|
102
|
+
cancelAnimationFrame(frame);
|
|
103
|
+
document.removeEventListener("keydown", onKeyDown, true);
|
|
104
|
+
const index = trapStack.lastIndexOf(container);
|
|
105
|
+
if (index !== -1) trapStack.splice(index, 1);
|
|
106
|
+
const active2 = document.activeElement;
|
|
107
|
+
const focusIsOurs = container.contains(active2) || active2 === document.body || active2 === null;
|
|
108
|
+
if (restoreFocus && focusIsOurs && previouslyFocused?.isConnected) {
|
|
109
|
+
previouslyFocused.focus();
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
}, [active, containerRef, initialFocus, restoreFocus, trapTab]);
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
export {
|
|
116
|
+
renderIcon,
|
|
117
|
+
devWarn,
|
|
118
|
+
dualModifier,
|
|
119
|
+
fullWidthModifier,
|
|
120
|
+
FOCUSABLE_SELECTOR,
|
|
121
|
+
useDialogFocus
|
|
122
|
+
};
|
|
123
|
+
//# sourceMappingURL=chunk-WT4WBHBR.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/utils/renderIcon.tsx","../src/utils/devWarn.ts","../src/utils/dualModifier.ts","../src/utils/useDialogFocus.ts"],"sourcesContent":["import React from 'react';\nimport { icons } from 'lucide-react';\n\nexport type IconType = React.ComponentType<{ className?: string }> | string;\n\n/**\n * Helper function to render icons dynamically\n * Supports both React components (Lucide, MUI, etc.) and string-based icon names\n *\n * @param icon - Icon component or string name (e.g., \"heart\" or \"arrow-right\")\n * @param className - Optional CSS class name to apply to the icon\n * @returns React node representing the icon, or null if no icon provided\n *\n * @example\n * // Component-based icon\n * import { Heart } from 'lucide-react';\n * renderIcon(Heart, 'my-icon-class');\n *\n * @example\n * // String-based Lucide icon (kebab-case converted to PascalCase)\n * renderIcon('heart', 'my-icon-class');\n * renderIcon('arrow-right', 'my-icon-class');\n *\n * @example\n * // String-based CSS class (for Font Awesome, Remixicon, etc.)\n * renderIcon('fas fa-heart', 'my-icon-class');\n */\nexport const renderIcon = (icon: IconType | undefined, className?: string): React.ReactNode => {\n if (!icon) return null;\n\n if (typeof icon === 'string') {\n // Convert kebab-case to PascalCase for Lucide icons\n const iconName = icon\n .split('-')\n .map((part) => part.charAt(0).toUpperCase() + part.slice(1))\n .join('');\n\n // Try to find the icon in lucide-react\n const LucideIcon = icons[iconName as keyof typeof icons] as\n React.ComponentType<{ className?: string }> | undefined;\n\n if (LucideIcon) {\n return <LucideIcon className={className} aria-hidden=\"true\" />;\n }\n\n // Fallback: render as a CSS class (for Font Awesome, Remixicon, etc.)\n return <i className={`${icon} ${className || ''}`} aria-hidden=\"true\" />;\n }\n\n // It's a React component\n const IconComponent = icon;\n return <IconComponent className={className} aria-hidden=\"true\" />;\n};\n","/**\n * Logs a misconfiguration warning, once per `key`, and never in production.\n *\n * Deliberately reads `process.env.NODE_ENV` off `globalThis` behind a cast\n * rather than referencing `process` directly: this is a browser library, and\n * a bare `process` reference fails the `tsup` dts build (its worker resolves\n * without node types, so `npm run typecheck` passing is not enough) as well\n * as throwing at runtime anywhere a bundler hasn't substituted it. The\n * optional chaining covers every case - no `process`, no `env`, no value.\n *\n * Because the check is dynamic rather than a statically replaceable\n * `process.env.NODE_ENV` expression, the message text stays in production\n * bundles; only the logging is skipped. That is the trade for not shipping a\n * `process` reference at all, and these strings are small.\n */\nconst warned = new Set<string>();\n\nexport function devWarn(key: string, message: string): void {\n const nodeEnv = (globalThis as { process?: { env?: { NODE_ENV?: string } } }).process?.env\n ?.NODE_ENV;\n if (nodeEnv === 'production') return;\n if (warned.has(key)) return;\n warned.add(key);\n console.warn(`[eidos-ui] ${message}`);\n}\n","/**\n * Emits a BEM modifier in both its canonical kebab-case spelling and a legacy\n * camelCase one.\n *\n * The library shipped two conventions for the same idea: eight components\n * used `--fullWidth` while four used `--full-width`, and `Tabs` had\n * `--hideScrollbar`. Kebab-case is the canonical form - every block name\n * (`eidos-date-picker-trigger`) and every design token (`--font-size-sm`) is\n * already kebab, so a camelCase modifier was inconsistent with the very\n * selector it hung off.\n *\n * Renaming outright would be a **breaking** change: `README.md` presents the\n * `eidos-*` class names as things consumers may target, so a stylesheet out\n * there is matching the old spelling. Emitting both keeps every existing\n * selector working while new code has one spelling to learn.\n *\n * Deliberately a helper rather than a duplicated string literal at each call\n * site: two near-identical classes in a `className` read as a copy-paste slip\n * and invite exactly the \"tidy up\" that would silently break those consumer\n * stylesheets. It also makes dropping the aliases at the next major a change\n * to this one file rather than an edit in every component.\n *\n * Internal only - deliberately not re-exported from `src/index.ts`.\n *\n * @example\n * dualModifier('eidos-input', 'full-width', 'fullWidth');\n * // 'eidos-input--full-width eidos-input--fullWidth'\n */\nexport const dualModifier = (block: string, canonical: string, legacy: string): string =>\n `${block}--${canonical} ${block}--${legacy}`;\n\n/** `dualModifier` preset for the library's most widespread split modifier. */\nexport const fullWidthModifier = (block: string): string =>\n dualModifier(block, 'full-width', 'fullWidth');\n","import { useEffect, type RefObject } from 'react';\n\n/**\n * Focus management for a dialog: move focus in on open, optionally trap Tab\n * inside it, and restore focus to the opener on close.\n *\n * Named for the job rather than the mechanism because the trap is optional.\n * `Popover` declares `aria-modal=\"false\"` - an honest non-modal dialog - so\n * trapping Tab in it would be wrong, but it still needs the other two: its\n * panel is portaled to `document.body`, so without moving focus in, Tab from\n * the trigger goes to whatever follows it in the page and the panel's own\n * controls are unreachable by keyboard entirely.\n *\n * ## Why this exists\n *\n * `Modal`, `Drawer` and `CommandPalette` all rendered\n * `role=\"dialog\" aria-modal=\"true\"` with no focus management whatsoever. That\n * attribute is a **promise to assistive technology that the rest of the page\n * is inert**, and it was false: measured in a browser, focus never entered the\n * dialog, and Tab moved to the page behind the scrim on the first press\n * (Drawer on the second). Drawer additionally dropped focus onto `<body>` when\n * it closed, so a keyboard user was returned to the top of the document.\n *\n * That is WCAG 2.4.3 Focus Order (Level A), and it is invisible to axe - a\n * static snapshot of the DOM looks perfectly correct.\n *\n * ## Nesting\n *\n * Traps register on a module-level stack and only the innermost one acts, so a\n * dialog opened from a dialog behaves correctly. Without this, both listeners\n * fire for the same Tab and fight over where focus lands.\n *\n * ## What this does *not* do\n *\n * It does not mark the background `inert`. A trap plus `aria-modal` is the\n * widely-supported approach and is what screen readers act on; `inert` on\n * every sibling of the portal root would be stronger, but it needs the\n * component to know about DOM it does not own. Worth revisiting if a\n * consumer reports a screen reader escaping the dialog in browse mode.\n */\n\n/**\n * Deliberately not `[tabindex]` in general - that would match `tabindex=\"-1\"`,\n * which is programmatically focusable but explicitly removed from the Tab\n * sequence, so including it would make Tab stop somewhere the user cannot\n * reach by tabbing in the first place.\n */\nexport const FOCUSABLE_SELECTOR = [\n 'a[href]',\n 'area[href]',\n 'button:not([disabled])',\n 'input:not([disabled]):not([type=\"hidden\"])',\n 'select:not([disabled])',\n 'textarea:not([disabled])',\n 'details > summary:first-of-type',\n 'iframe',\n 'audio[controls]',\n 'video[controls]',\n '[contenteditable]:not([contenteditable=\"false\"])',\n '[tabindex]:not([tabindex^=\"-\"])',\n].join(',');\n\n/**\n * `offsetParent === null` is the usual visibility check and is wrong here: it\n * is also null for `position: fixed` elements, which is exactly what a modal\n * is. `getClientRects()` is empty only when the element genuinely does not\n * render.\n */\nconst isVisible = (element: HTMLElement): boolean =>\n element.getClientRects().length > 0 && getComputedStyle(element).visibility !== 'hidden';\n\nconst getFocusable = (container: HTMLElement): HTMLElement[] =>\n Array.from(container.querySelectorAll<HTMLElement>(FOCUSABLE_SELECTOR)).filter(\n (element) => isVisible(element) && element.closest('[aria-hidden=\"true\"]') === null,\n );\n\n/** Innermost trap last. Only the last entry responds to Tab. */\nconst trapStack: HTMLElement[] = [];\n\nexport interface UseDialogFocusOptions {\n /** Focused when the trap activates. Defaults to the first focusable child. */\n initialFocus?: RefObject<HTMLElement | null>;\n /**\n * Whether to return focus to whatever had it when the trap activated.\n * Defaults to `true`; pass `false` when the caller restores focus itself.\n */\n restoreFocus?: boolean;\n /**\n * Whether Tab is confined to the container. Defaults to `true`.\n *\n * Set `false` for a non-modal dialog (`aria-modal=\"false\"`), where the rest\n * of the page stays available and trapping would strand the user.\n */\n trapTab?: boolean;\n}\n\nexport const useDialogFocus = (\n active: boolean,\n containerRef: RefObject<HTMLElement | null>,\n { initialFocus, restoreFocus = true, trapTab = true }: UseDialogFocusOptions = {},\n): void => {\n useEffect(() => {\n const container = containerRef.current;\n if (!active || !container) return;\n\n // Captured before focus moves. The caller must only flip `active` to true\n // once the container is in the DOM - for the animated overlays that means\n // `isOpen && isMounted`, since `isMounted` is set in an effect one render\n // later and the container does not exist before it.\n const previouslyFocused = document.activeElement as HTMLElement | null;\n\n trapStack.push(container);\n\n // Moving focus in is retried across a few frames rather than attempted\n // once.\n //\n // These overlays animate open, and `.focus()` on an element that is still\n // `visibility: hidden` is a silent no-op - it does not throw, it just\n // leaves focus where it was. `Modal` sets its `--is-open` class two\n // animation frames after mounting, and the computed style has not caught\n // up at the moment the effect runs, so a single attempt focused nothing\n // and the trap looked broken.\n //\n // Retrying is better than keying off any particular animation: the hook\n // stays ignorant of each component's transition duration, and simply\n // stops as soon as focus has actually landed inside.\n const MAX_FRAMES = 10;\n let frame = 0;\n let attempts = 0;\n\n const tryFocus = () => {\n const target = initialFocus?.current ?? getFocusable(container)[0];\n if (target) {\n target.focus();\n } else {\n // A dialog with nothing focusable in it still must not leave focus on\n // the page behind, so the container takes it. `tabindex=\"-1\"` keeps\n // it out of the Tab sequence while allowing `.focus()`.\n if (!container.hasAttribute('tabindex')) container.setAttribute('tabindex', '-1');\n container.focus();\n }\n\n if (!container.contains(document.activeElement) && attempts < MAX_FRAMES) {\n attempts += 1;\n frame = requestAnimationFrame(tryFocus);\n }\n };\n\n tryFocus();\n\n const onKeyDown = (event: KeyboardEvent) => {\n if (event.key !== 'Tab') return;\n // Only the innermost trap acts.\n if (trapStack[trapStack.length - 1] !== container) return;\n\n // Re-queried on every Tab rather than cached: dialog contents change\n // (a disabled Confirm button becoming enabled, a list filtering down),\n // and a stale list sends focus to an element that is no longer there.\n const focusable = getFocusable(container);\n if (focusable.length === 0) {\n event.preventDefault();\n return;\n }\n\n const first = focusable[0];\n const last = focusable[focusable.length - 1];\n const activeElement = document.activeElement as HTMLElement | null;\n\n // Focus outside the container - e.g. a click landed on the backdrop.\n // Pull it back in rather than letting Tab continue through the page.\n if (!activeElement || !container.contains(activeElement)) {\n event.preventDefault();\n (event.shiftKey ? last : first).focus();\n return;\n }\n\n if (event.shiftKey && activeElement === first) {\n event.preventDefault();\n last.focus();\n } else if (!event.shiftKey && activeElement === last) {\n event.preventDefault();\n first.focus();\n }\n };\n\n if (trapTab) document.addEventListener('keydown', onKeyDown, true);\n\n return () => {\n cancelAnimationFrame(frame);\n document.removeEventListener('keydown', onKeyDown, true);\n\n const index = trapStack.lastIndexOf(container);\n if (index !== -1) trapStack.splice(index, 1);\n\n // Restore only if focus still belongs to the closing dialog.\n //\n // Two cases count as \"belongs\":\n //\n // 1. Focus is still inside the container.\n // 2. Focus has been lost to `<body>`. When the overlay hides, the\n // browser blurs whatever was focused inside it, so by the time this\n // cleanup runs `activeElement` is often already `<body>` - checking\n // only case 1 meant `CommandPalette` never restored at all.\n //\n // Anything else means something took focus deliberately - a confirm\n // action moving to a new region, say - and stealing it back would be\n // worse than doing nothing.\n const active = document.activeElement;\n const focusIsOurs = container.contains(active) || active === document.body || active === null;\n\n if (restoreFocus && focusIsOurs && previouslyFocused?.isConnected) {\n previouslyFocused.focus();\n }\n };\n }, [active, containerRef, initialFocus, restoreFocus, trapTab]);\n};\n"],"mappings":";AACA,SAAS,aAAa;AAyCT;AAfN,IAAM,aAAa,CAAC,MAA4B,cAAwC;AAC7F,MAAI,CAAC,KAAM,QAAO;AAElB,MAAI,OAAO,SAAS,UAAU;AAE5B,UAAM,WAAW,KACd,MAAM,GAAG,EACT,IAAI,CAAC,SAAS,KAAK,OAAO,CAAC,EAAE,YAAY,IAAI,KAAK,MAAM,CAAC,CAAC,EAC1D,KAAK,EAAE;AAGV,UAAM,aAAa,MAAM,QAA8B;AAGvD,QAAI,YAAY;AACd,aAAO,oBAAC,cAAW,WAAsB,eAAY,QAAO;AAAA,IAC9D;AAGA,WAAO,oBAAC,OAAE,WAAW,GAAG,IAAI,IAAI,aAAa,EAAE,IAAI,eAAY,QAAO;AAAA,EACxE;AAGA,QAAM,gBAAgB;AACtB,SAAO,oBAAC,iBAAc,WAAsB,eAAY,QAAO;AACjE;;;ACrCA,IAAM,SAAS,oBAAI,IAAY;AAExB,SAAS,QAAQ,KAAa,SAAuB;AAC1D,QAAM,UAAW,WAA6D,SAAS,KACnF;AACJ,MAAI,YAAY,aAAc;AAC9B,MAAI,OAAO,IAAI,GAAG,EAAG;AACrB,SAAO,IAAI,GAAG;AACd,UAAQ,KAAK,cAAc,OAAO,EAAE;AACtC;;;ACIO,IAAM,eAAe,CAAC,OAAe,WAAmB,WAC7D,GA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4WBHBR.js";
|
|
6
6
|
|
|
7
7
|
// src/components/Tabs/Tabs.component.tsx
|
|
8
8
|
import React, { useState, useRef, useContext, useEffect, useLayoutEffect } from "react";
|
|
@@ -251,4 +251,4 @@ export {
|
|
|
251
251
|
TabPanel,
|
|
252
252
|
Tabs
|
|
253
253
|
};
|
|
254
|
-
//# sourceMappingURL=chunk-
|
|
254
|
+
//# sourceMappingURL=chunk-X6UKU3C3.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Tooltip
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-XO7WTE6O.js";
|
|
4
4
|
import {
|
|
5
5
|
fullWidthModifier,
|
|
6
6
|
renderIcon
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-WT4WBHBR.js";
|
|
8
8
|
|
|
9
9
|
// src/components/Textarea/Textarea.component.tsx
|
|
10
10
|
import { forwardRef, useState, useId } from "react";
|
|
@@ -33,6 +33,7 @@ var Textarea = forwardRef(
|
|
|
33
33
|
}, ref) => {
|
|
34
34
|
const generatedId = useId();
|
|
35
35
|
const textareaId = id || `textarea-${generatedId}`;
|
|
36
|
+
const errorId = `${textareaId}-error`;
|
|
36
37
|
const { defaultValue, ...restTextareaProps } = textareaProps;
|
|
37
38
|
const isControlled = restTextareaProps.value !== void 0;
|
|
38
39
|
const [localValue, setLocalValue] = useState(defaultValue != null ? String(defaultValue) : "");
|
|
@@ -90,6 +91,8 @@ var Textarea = forwardRef(
|
|
|
90
91
|
ref,
|
|
91
92
|
id: textareaId,
|
|
92
93
|
className: textareaClasses,
|
|
94
|
+
"aria-invalid": error ? true : void 0,
|
|
95
|
+
"aria-describedby": error ? errorId : void 0,
|
|
93
96
|
rows,
|
|
94
97
|
maxLength,
|
|
95
98
|
disabled: disabled || loading,
|
|
@@ -112,7 +115,7 @@ var Textarea = forwardRef(
|
|
|
112
115
|
maxLength
|
|
113
116
|
] })
|
|
114
117
|
] }),
|
|
115
|
-
error && /* @__PURE__ */ jsxs("div", { className: "eidos-textarea-error-message", children: [
|
|
118
|
+
error && /* @__PURE__ */ jsxs("div", { id: errorId, className: "eidos-textarea-error-message", children: [
|
|
116
119
|
/* @__PURE__ */ jsx(CircleAlert, { className: "eidos-textarea-error-icon" }),
|
|
117
120
|
/* @__PURE__ */ jsx("span", { children: error })
|
|
118
121
|
] })
|
|
@@ -124,4 +127,4 @@ Textarea.displayName = "Textarea";
|
|
|
124
127
|
export {
|
|
125
128
|
Textarea
|
|
126
129
|
};
|
|
127
|
-
//# sourceMappingURL=chunk-
|
|
130
|
+
//# sourceMappingURL=chunk-XK5USBHB.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/Textarea/Textarea.component.tsx"],"sourcesContent":["import React, { forwardRef, useState, useId } from 'react';\nimport { CircleAlert } from 'lucide-react';\nimport { renderIcon, fullWidthModifier } from '../../utils';\nimport type { TextareaProps } from './Textarea.types';\nimport { Tooltip } from '../Tooltip/Tooltip.component';\n\nexport const Textarea = forwardRef<HTMLTextAreaElement, TextareaProps>(\n (\n {\n variant = 'filled',\n color = 'primary',\n size = 'md',\n disabled = false,\n loading = false,\n className = '',\n fullWidth = false,\n label,\n error,\n disclaimerIcon,\n disclaimerContent,\n required,\n rows = 4,\n resize = 'vertical',\n showCount = false,\n maxLength,\n id,\n ...textareaProps\n },\n ref,\n ) => {\n const generatedId = useId();\n const textareaId = id || `textarea-${generatedId}`;\n // Associates the visible error with the control. Without it the message\n // is just a red line of text sitting near the field - obvious to look\n // at, absent from the accessibility tree (SC 3.3.1). See the fuller\n // note in `Input`.\n const errorId = `${textareaId}-error`;\n\n // Extract defaultValue so it never reaches the native <textarea> alongside `value`.\n // Same reasoning as Input: we always set value={currentValue}, so having defaultValue\n // in the spread as well triggers React's controlled/uncontrolled warning.\n const { defaultValue, ...restTextareaProps } = textareaProps;\n\n // Determine if using controlled or uncontrolled mode\n const isControlled = restTextareaProps.value !== undefined;\n const [localValue, setLocalValue] = useState(defaultValue != null ? String(defaultValue) : '');\n const [isFocused, setIsFocused] = useState(false);\n\n const currentValue = isControlled ? restTextareaProps.value : localValue;\n\n // Label floats when the field has content (same logic as Input)\n const shouldFloatLabel = Boolean(currentValue) || Boolean(defaultValue);\n\n const isRequired =\n required || Boolean('required' in restTextareaProps && restTextareaProps.required);\n\n const handleChange = (e: React.ChangeEvent<HTMLTextAreaElement>) => {\n if (!isControlled) {\n setLocalValue(e.target.value);\n }\n restTextareaProps.onChange?.(e);\n };\n\n // ── Class lists ──────────────────────────────────────────────────────────\n\n const containerClasses = [\n 'eidos-textarea-container',\n fullWidth && fullWidthModifier('eidos-textarea-container'),\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n const wrapperClasses = [\n 'eidos-textarea-wrapper',\n `eidos-textarea-wrapper--${variant}`,\n `eidos-textarea-wrapper--${color}`,\n `eidos-textarea-wrapper--${size}`,\n fullWidth && fullWidthModifier('eidos-textarea-wrapper'),\n loading && 'eidos-textarea-wrapper--loading',\n isFocused && 'eidos-textarea-wrapper--focused',\n error && 'eidos-textarea-wrapper--error',\n ]\n .filter(Boolean)\n .join(' ');\n\n const textareaClasses = [\n 'eidos-textarea',\n `eidos-textarea--${variant}`,\n `eidos-textarea--${color}`,\n `eidos-textarea--${size}`,\n `eidos-textarea--resize-${resize}`,\n fullWidth && fullWidthModifier('eidos-textarea'),\n loading && 'eidos-textarea--loading',\n error && 'eidos-textarea--error',\n ]\n .filter(Boolean)\n .join(' ');\n\n const labelClasses = [\n 'eidos-textarea-label',\n shouldFloatLabel && 'eidos-textarea-label--floating',\n disclaimerIcon && 'eidos-textarea-label--with-icon',\n error && 'eidos-textarea-label--error',\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <div className={containerClasses}>\n {label && (\n <label htmlFor={textareaId} className={labelClasses}>\n <span className=\"eidos-textarea-label-text\">{label}</span>\n {isRequired && <span className=\"eidos-textarea-required-asterisk\">*</span>}\n {disclaimerIcon &&\n (disclaimerContent ? (\n <Tooltip message={disclaimerContent}>\n <span className=\"eidos-textarea-disclaimer-icon\">\n {renderIcon(disclaimerIcon, 'eidos-textarea-disclaimer-icon-svg')}\n </span>\n </Tooltip>\n ) : (\n <span className=\"eidos-textarea-disclaimer-icon\">\n {renderIcon(disclaimerIcon, 'eidos-textarea-disclaimer-icon-svg')}\n </span>\n ))}\n </label>\n )}\n\n <div className={wrapperClasses}>\n <textarea\n ref={ref}\n id={textareaId}\n className={textareaClasses}\n aria-invalid={error ? true : undefined}\n aria-describedby={error ? errorId : undefined}\n rows={rows}\n maxLength={maxLength}\n disabled={disabled || loading}\n {...restTextareaProps}\n value={currentValue}\n onFocus={(e) => {\n setIsFocused(true);\n restTextareaProps.onFocus?.(e);\n }}\n onBlur={(e) => {\n setIsFocused(false);\n restTextareaProps.onBlur?.(e);\n }}\n onChange={handleChange}\n />\n\n {showCount && maxLength && (\n <span className=\"eidos-textarea-count\">\n {String(currentValue ?? '').length}/{maxLength}\n </span>\n )}\n </div>\n\n {error && (\n <div id={errorId} className=\"eidos-textarea-error-message\">\n <CircleAlert className=\"eidos-textarea-error-icon\" />\n <span>{error}</span>\n </div>\n )}\n </div>\n );\n },\n);\n\nTextarea.displayName = 'Textarea';\n"],"mappings":";;;;;;;;;AAAA,SAAgB,YAAY,UAAU,aAAa;AACnD,SAAS,mBAAmB;AA8GlB,SACE,KADF;AAzGH,IAAM,WAAW;AAAA,EACtB,CACE;AAAA,IACE,UAAU;AAAA,IACV,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,WAAW;AAAA,IACX,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP,SAAS;AAAA,IACT,YAAY;AAAA,IACZ;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,GACA,QACG;AACH,UAAM,cAAc,MAAM;AAC1B,UAAM,aAAa,MAAM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16 +1,16 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk27UANGPWcjs = require('./chunk-27UANGPW.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkQ3GNKF74cjs = require('./chunk-Q3GNKF74.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkOWWPHXAFcjs = require('./chunk-OWWPHXAF.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunkVHSTB7GBcjs = require('./chunk-VHSTB7GB.cjs');
|
|
14
14
|
|
|
15
15
|
// src/components/Header/Header.component.tsx
|
|
16
16
|
var _react = require('react');
|
|
@@ -62,15 +62,15 @@ var Header = ({
|
|
|
62
62
|
};
|
|
63
63
|
if (action.icon && !action.children && action.tooltip) {
|
|
64
64
|
const { icon, tooltip, ...rest } = action;
|
|
65
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
65
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkOWWPHXAFcjs.Button, { ...rest, size: "md", preIcon: icon, onClick: handleClick, children: tooltip }, index);
|
|
66
66
|
}
|
|
67
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
67
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkOWWPHXAFcjs.Button, { ...action, size: "md", onClick: handleClick }, index);
|
|
68
68
|
};
|
|
69
69
|
const titles = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "eidos-header__titles", children: [
|
|
70
70
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h1", { className: "eidos-header__title", children: title }),
|
|
71
71
|
subtitle && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "eidos-header__subtitle", children: subtitle }),
|
|
72
72
|
!!_optionalChain([meta, 'optionalAccess', _3 => _3.length]) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "eidos-header__meta", children: meta.map((item, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "eidos-header__meta-item", children: [
|
|
73
|
-
item.icon &&
|
|
73
|
+
item.icon && _chunkVHSTB7GBcjs.renderIcon.call(void 0, item.icon, "eidos-header__meta-icon"),
|
|
74
74
|
item.label && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "eidos-header__meta-label", children: item.label }),
|
|
75
75
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "eidos-header__meta-value", children: item.value })
|
|
76
76
|
] }, index)) })
|
|
@@ -82,7 +82,7 @@ var Header = ({
|
|
|
82
82
|
] }) : titles,
|
|
83
83
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "eidos-header__actions", children: [
|
|
84
84
|
overflowActions.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
85
|
-
|
|
85
|
+
_chunk27UANGPWcjs.Popover,
|
|
86
86
|
{
|
|
87
87
|
isOpen: overflowOpen,
|
|
88
88
|
onOpenChange: setOverflowOpen,
|
|
@@ -93,7 +93,7 @@ var Header = ({
|
|
|
93
93
|
// No `aria-haspopup`/`aria-expanded` here: Popover already
|
|
94
94
|
// sets both on the wrapper it renders around this button.
|
|
95
95
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
96
|
-
|
|
96
|
+
_chunkOWWPHXAFcjs.Button,
|
|
97
97
|
{
|
|
98
98
|
icon: "ellipsis",
|
|
99
99
|
size: "md",
|
|
@@ -106,7 +106,7 @@ var Header = ({
|
|
|
106
106
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "eidos-header__overflow-actions", children: overflowActions.map(renderOverflowAction) })
|
|
107
107
|
}
|
|
108
108
|
),
|
|
109
|
-
inlineActions.map((action, index) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
109
|
+
inlineActions.map((action, index) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkOWWPHXAFcjs.Button, { size: "md", ...action }, index))
|
|
110
110
|
] })
|
|
111
111
|
] }) });
|
|
112
112
|
};
|
|
@@ -121,7 +121,7 @@ var IdentityHeader = ({
|
|
|
121
121
|
...rest
|
|
122
122
|
}) => {
|
|
123
123
|
if (avatar && media) {
|
|
124
|
-
|
|
124
|
+
_chunkVHSTB7GBcjs.devWarn.call(void 0,
|
|
125
125
|
"identity-header-avatar-and-media",
|
|
126
126
|
"IdentityHeader received both `avatar` and `media`. `media` takes precedence - drop `avatar` to silence this."
|
|
127
127
|
);
|
|
@@ -142,4 +142,4 @@ var IdentityHeader = ({
|
|
|
142
142
|
|
|
143
143
|
|
|
144
144
|
exports.Header = Header; exports.IdentityHeader = IdentityHeader;
|
|
145
|
-
//# sourceMappingURL=chunk-
|
|
145
|
+
//# sourceMappingURL=chunk-XMXL6NVJ.cjs.map
|