eidos-ui 3.6.3 → 3.8.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 +11 -0
- package/dist/{Avatar.types-BY-C09Ke.d.cts → Avatar.types-DkRznn-7.d.cts} +6 -1
- package/dist/{Avatar.types-BY-C09Ke.d.ts → Avatar.types-DkRznn-7.d.ts} +6 -1
- package/dist/{Breadcrumb.types-DaykU-C8.d.cts → Breadcrumb.types-C3uADbKU.d.cts} +4 -1
- package/dist/{Breadcrumb.types-DaykU-C8.d.ts → Breadcrumb.types-C3uADbKU.d.ts} +4 -1
- package/dist/Button.types-BCIK8Qlk.d.ts +59 -0
- package/dist/Button.types-DkgWjFsk.d.cts +59 -0
- package/dist/Chip.types-BM-UZOCv.d.ts +33 -0
- package/dist/Chip.types-_1bhyKz4.d.cts +33 -0
- package/dist/{Header.types-Ce5Cj301.d.cts → Header.types-a6p0-ZHx.d.cts} +24 -8
- package/dist/{Header.types-0XovUp0T.d.ts → Header.types-zbhURbg7.d.ts} +24 -8
- package/dist/{Input.types-D7-sWq-q.d.cts → Input.types--K0t_3L2.d.cts} +1 -1
- package/dist/{Input.types-CSDMaZNe.d.ts → Input.types--UjucBDd.d.ts} +1 -1
- package/dist/{Menu.types-CTnUijv5.d.cts → Menu.types-D6VoK9T9.d.cts} +1 -1
- package/dist/{Menu.types-BN4g1-3A.d.ts → Menu.types-tUEhXn52.d.ts} +1 -1
- package/dist/{Navigation.types-By5HfPTi.d.ts → Navigation.types-CJRzo9Zo.d.ts} +1 -1
- package/dist/{Navigation.types-_MrYqqUI.d.cts → Navigation.types-D95oHZEJ.d.cts} +1 -1
- package/dist/{SegmentedControl.types-cjLwwBAm.d.ts → SegmentedControl.types-CHtjABQM.d.ts} +1 -1
- package/dist/{SegmentedControl.types-BofrEYyd.d.cts → SegmentedControl.types-D_gHYL9X.d.cts} +1 -1
- package/dist/{Select.types-ok-03rLo.d.cts → Select.types-8CGZBgT-.d.cts} +2 -2
- package/dist/{Select.types-C2tGy1vj.d.ts → Select.types-CAVh9Gvd.d.ts} +2 -2
- package/dist/{Table.types-D8pmgxKA.d.ts → Table.types-BFDE-hhF.d.ts} +2 -2
- package/dist/{Table.types-D-9tC0kJ.d.cts → Table.types-Tai7_MTz.d.cts} +2 -2
- package/dist/{Toolbar.types-CKnQC_TW.d.ts → Toolbar.types-BqBrPVww.d.ts} +8 -6
- package/dist/{Toolbar.types-DUz2mxct.d.cts → Toolbar.types-GCUgzuKW.d.cts} +8 -6
- package/dist/alert/index.cjs +8 -5
- package/dist/alert/index.cjs.map +1 -1
- package/dist/alert/index.d.cts +1 -1
- package/dist/alert/index.d.ts +1 -1
- package/dist/alert/index.js +7 -4
- package/dist/avatar/index.d.cts +2 -2
- package/dist/avatar/index.d.ts +2 -2
- package/dist/breadcrumb/index.cjs +4 -2
- package/dist/breadcrumb/index.cjs.map +1 -1
- package/dist/breadcrumb/index.d.cts +2 -2
- package/dist/breadcrumb/index.d.ts +2 -2
- package/dist/breadcrumb/index.js +3 -1
- package/dist/button/index.cjs +7 -4
- package/dist/button/index.cjs.map +1 -1
- package/dist/button/index.d.cts +5 -5
- package/dist/button/index.d.ts +5 -5
- package/dist/button/index.js +6 -3
- package/dist/button-group/index.d.cts +2 -2
- package/dist/button-group/index.d.ts +2 -2
- package/dist/chip/index.cjs +7 -4
- package/dist/chip/index.cjs.map +1 -1
- package/dist/chip/index.d.cts +5 -23
- package/dist/chip/index.d.ts +5 -23
- package/dist/chip/index.js +6 -3
- package/dist/{chunk-DRXPTACG.js → chunk-26PRBZA6.js} +6 -2
- package/dist/chunk-26PRBZA6.js.map +1 -0
- package/dist/chunk-2IXCEKLI.js +82 -0
- package/dist/chunk-2IXCEKLI.js.map +1 -0
- package/dist/{chunk-GWHZFX2H.js → chunk-2TIMJD4K.js} +29 -6
- package/dist/chunk-2TIMJD4K.js.map +1 -0
- package/dist/{chunk-RHFD2Z5V.js → chunk-3TF2GZSG.js} +7 -7
- package/dist/{chunk-TC5IC6OP.cjs → chunk-3VXUOAIJ.cjs} +3 -3
- package/dist/{chunk-TC5IC6OP.cjs.map → chunk-3VXUOAIJ.cjs.map} +1 -1
- package/dist/{chunk-JHX6JK3M.js → chunk-3X6QVHTD.js} +2 -2
- package/dist/{chunk-7VJCGKVP.cjs → chunk-4HZIXRAJ.cjs} +11 -11
- package/dist/{chunk-7VJCGKVP.cjs.map → chunk-4HZIXRAJ.cjs.map} +1 -1
- package/dist/{chunk-MQAOXZD4.js → chunk-4S57PE43.js} +4 -4
- package/dist/{chunk-JT4KVXJK.js → chunk-4V2XYUQL.js} +2 -2
- package/dist/{chunk-PMSENLOA.cjs → chunk-544RAXWO.cjs} +19 -19
- package/dist/{chunk-PMSENLOA.cjs.map → chunk-544RAXWO.cjs.map} +1 -1
- package/dist/{chunk-4JSTBA4F.cjs → chunk-6CW5QSYV.cjs} +7 -7
- package/dist/{chunk-4JSTBA4F.cjs.map → chunk-6CW5QSYV.cjs.map} +1 -1
- package/dist/{chunk-AR2ZOO6L.js → chunk-6FXFKMJ5.js} +3 -3
- package/dist/{chunk-KREHT4AQ.cjs → chunk-6IB27I5K.cjs} +8 -8
- package/dist/{chunk-KREHT4AQ.cjs.map → chunk-6IB27I5K.cjs.map} +1 -1
- package/dist/{chunk-LGDODZHI.js → chunk-6LTZV6HN.js} +4 -4
- package/dist/{chunk-YP4HUBKN.js → chunk-6NAOAKII.js} +2 -2
- package/dist/chunk-75Q5OS7L.cjs +10 -0
- package/dist/chunk-75Q5OS7L.cjs.map +1 -0
- package/dist/{chunk-LQXFXXMJ.cjs → chunk-7FV2X62W.cjs} +7 -7
- package/dist/{chunk-LQXFXXMJ.cjs.map → chunk-7FV2X62W.cjs.map} +1 -1
- package/dist/{chunk-2T7ZMMH5.cjs → chunk-7NUVLVSL.cjs} +5 -5
- package/dist/{chunk-2T7ZMMH5.cjs.map → chunk-7NUVLVSL.cjs.map} +1 -1
- package/dist/chunk-ACH7SYQ2.js +47 -0
- package/dist/chunk-ACH7SYQ2.js.map +1 -0
- package/dist/{chunk-HNGFRRVZ.cjs → chunk-AUNDBUHM.cjs} +3 -3
- package/dist/{chunk-HNGFRRVZ.cjs.map → chunk-AUNDBUHM.cjs.map} +1 -1
- package/dist/{chunk-XZLSHEHE.cjs → chunk-B2OHBIAL.cjs} +10 -10
- package/dist/{chunk-XZLSHEHE.cjs.map → chunk-B2OHBIAL.cjs.map} +1 -1
- package/dist/chunk-BDH2MXJW.js +46 -0
- package/dist/chunk-BDH2MXJW.js.map +1 -0
- package/dist/{chunk-D7SQ7LHJ.js → chunk-BO3KK3ZQ.js} +2 -2
- package/dist/{chunk-NOQF7UQ5.cjs → chunk-CFVUUMQA.cjs} +6 -6
- package/dist/{chunk-NOQF7UQ5.cjs.map → chunk-CFVUUMQA.cjs.map} +1 -1
- package/dist/chunk-CJT7L764.cjs +21 -0
- package/dist/chunk-CJT7L764.cjs.map +1 -0
- package/dist/{chunk-5XH2PHT2.js → chunk-CNTG7OOO.js} +14 -14
- package/dist/{chunk-I6M6CVI2.cjs → chunk-DG3O5NV4.cjs} +3 -3
- package/dist/{chunk-I6M6CVI2.cjs.map → chunk-DG3O5NV4.cjs.map} +1 -1
- package/dist/{chunk-WNDDS367.js → chunk-DPTTDHZ5.js} +3 -3
- package/dist/{chunk-35LGEPLP.cjs → chunk-ENMDOQQO.cjs} +29 -14
- package/dist/chunk-ENMDOQQO.cjs.map +1 -0
- package/dist/{chunk-V4BZWBZT.cjs → chunk-F5IRMMZ2.cjs} +7 -7
- package/dist/{chunk-V4BZWBZT.cjs.map → chunk-F5IRMMZ2.cjs.map} +1 -1
- package/dist/{chunk-WE2SBWZ6.js → chunk-FE7S4RSK.js} +10 -10
- package/dist/chunk-FE7S4RSK.js.map +1 -0
- package/dist/{chunk-BFKPJ627.js → chunk-FHOD3FUN.js} +4 -4
- package/dist/{chunk-SNRRF64M.js → chunk-GDRLVX2A.js} +31 -10
- package/dist/chunk-GDRLVX2A.js.map +1 -0
- package/dist/{chunk-5O73AALP.cjs → chunk-GP6EEZH5.cjs} +7 -3
- package/dist/chunk-GP6EEZH5.cjs.map +1 -0
- package/dist/{chunk-SDUGYJGW.js → chunk-H3C6YECZ.js} +6 -6
- package/dist/{chunk-RJVHR45I.cjs → chunk-H46ZLPNJ.cjs} +7 -7
- package/dist/{chunk-RJVHR45I.cjs.map → chunk-H46ZLPNJ.cjs.map} +1 -1
- package/dist/{chunk-66UQTF57.cjs → chunk-HLI4SOH3.cjs} +45 -45
- package/dist/{chunk-66UQTF57.cjs.map → chunk-HLI4SOH3.cjs.map} +1 -1
- package/dist/{chunk-ZMRINZIO.cjs → chunk-HR5MWA3B.cjs} +5 -5
- package/dist/{chunk-ZMRINZIO.cjs.map → chunk-HR5MWA3B.cjs.map} +1 -1
- package/dist/{chunk-MPIVBAMY.js → chunk-HYRLK462.js} +2 -2
- package/dist/{chunk-FIVMMCGM.js → chunk-IHPSRTVW.js} +4 -4
- package/dist/{chunk-THCTUBX6.js → chunk-IKXXXVUO.js} +3 -3
- package/dist/{chunk-JPYJQ4TF.cjs → chunk-JFV56ISS.cjs} +6 -6
- package/dist/{chunk-JPYJQ4TF.cjs.map → chunk-JFV56ISS.cjs.map} +1 -1
- package/dist/{chunk-75GFIQRU.js → chunk-JY77VJAZ.js} +30 -15
- package/dist/chunk-JY77VJAZ.js.map +1 -0
- package/dist/chunk-KXDGW6LJ.cjs +46 -0
- package/dist/chunk-KXDGW6LJ.cjs.map +1 -0
- package/dist/{chunk-24HKKSKX.js → chunk-L6ERHCQ2.js} +3 -3
- package/dist/{chunk-4LNTZPSQ.js → chunk-L6YJ6QTZ.js} +2 -2
- package/dist/{chunk-KBQD4JLK.cjs → chunk-LUDK44NZ.cjs} +3 -3
- package/dist/{chunk-KBQD4JLK.cjs.map → chunk-LUDK44NZ.cjs.map} +1 -1
- package/dist/chunk-LWCFT5SP.cjs +82 -0
- package/dist/chunk-LWCFT5SP.cjs.map +1 -0
- package/dist/{chunk-JNY7TUDS.js → chunk-MCPGI6EI.js} +2 -2
- package/dist/{chunk-DU5JKTHK.cjs → chunk-MKC6V3SY.cjs} +6 -6
- package/dist/{chunk-DU5JKTHK.cjs.map → chunk-MKC6V3SY.cjs.map} +1 -1
- package/dist/{chunk-J76JHN7J.cjs → chunk-N5NXKVFJ.cjs} +10 -10
- package/dist/{chunk-J76JHN7J.cjs.map → chunk-N5NXKVFJ.cjs.map} +1 -1
- package/dist/{chunk-XERBOFYZ.cjs → chunk-NERASTO2.cjs} +3 -3
- package/dist/{chunk-XERBOFYZ.cjs.map → chunk-NERASTO2.cjs.map} +1 -1
- package/dist/{chunk-3KBBJZHK.cjs → chunk-NFD7MPX4.cjs} +16 -14
- package/dist/chunk-NFD7MPX4.cjs.map +1 -0
- package/dist/{chunk-3ZRFOKDM.cjs → chunk-NNAEQR3Y.cjs} +30 -30
- package/dist/{chunk-3ZRFOKDM.cjs.map → chunk-NNAEQR3Y.cjs.map} +1 -1
- package/dist/{chunk-36JFXFM2.cjs → chunk-OGGZIFTI.cjs} +38 -38
- package/dist/chunk-OGGZIFTI.cjs.map +1 -0
- package/dist/{chunk-2PCCGQOH.js → chunk-P6OJQ2RN.js} +6 -6
- package/dist/{chunk-3RWZC6OW.cjs → chunk-PE2SLXUS.cjs} +5 -5
- package/dist/{chunk-3RWZC6OW.cjs.map → chunk-PE2SLXUS.cjs.map} +1 -1
- package/dist/chunk-QD32IMMH.js +13 -0
- package/dist/chunk-QD32IMMH.js.map +1 -0
- package/dist/{chunk-HEXAY6DE.cjs → chunk-QUSO4GFA.cjs} +7 -7
- package/dist/{chunk-HEXAY6DE.cjs.map → chunk-QUSO4GFA.cjs.map} +1 -1
- package/dist/{chunk-OOCCSMWM.js → chunk-RHWZX7PB.js} +9 -7
- package/dist/chunk-RHWZX7PB.js.map +1 -0
- package/dist/{chunk-YXRKBKFB.js → chunk-S5CMZFX6.js} +3 -3
- package/dist/{chunk-4AO5RKV5.cjs → chunk-SLHIVEFW.cjs} +7 -7
- package/dist/{chunk-4AO5RKV5.cjs.map → chunk-SLHIVEFW.cjs.map} +1 -1
- package/dist/{chunk-HEX4IMLO.js → chunk-TJQNGJHP.js} +4 -4
- package/dist/{chunk-JCKGAAPZ.cjs → chunk-TNQ2ZZ7W.cjs} +9 -9
- package/dist/{chunk-JCKGAAPZ.cjs.map → chunk-TNQ2ZZ7W.cjs.map} +1 -1
- package/dist/chunk-U32K2H3N.js +10 -0
- package/dist/chunk-U32K2H3N.js.map +1 -0
- package/dist/{chunk-RHHZRTWM.js → chunk-U34INRFO.js} +28 -13
- package/dist/chunk-U34INRFO.js.map +1 -0
- package/dist/{chunk-SFFKQQ5Z.js → chunk-U4SVBE2M.js} +5 -5
- package/dist/{chunk-O3QM3BFE.js → chunk-UC4NYF6T.js} +2 -2
- package/dist/{chunk-6JHVXWDV.cjs → chunk-ULKWUKD2.cjs} +22 -22
- package/dist/{chunk-6JHVXWDV.cjs.map → chunk-ULKWUKD2.cjs.map} +1 -1
- package/dist/{chunk-BEOECPVJ.cjs → chunk-UTYY35QX.cjs} +3 -3
- package/dist/{chunk-BEOECPVJ.cjs.map → chunk-UTYY35QX.cjs.map} +1 -1
- package/dist/{chunk-7BFODYNL.cjs → chunk-UUT2VEN5.cjs} +7 -7
- package/dist/{chunk-7BFODYNL.cjs.map → chunk-UUT2VEN5.cjs.map} +1 -1
- package/dist/chunk-V3T7RO4F.js +21 -0
- package/dist/chunk-V3T7RO4F.js.map +1 -0
- package/dist/{chunk-GIEDIAPD.js → chunk-V5CM5TH3.js} +3 -3
- package/dist/{chunk-L65MHFMD.js → chunk-V64DICJK.js} +3 -3
- package/dist/{chunk-KIZVY57H.cjs → chunk-VXC7Z7XB.cjs} +5 -5
- package/dist/{chunk-KIZVY57H.cjs.map → chunk-VXC7Z7XB.cjs.map} +1 -1
- package/dist/chunk-VYF7WV4K.cjs +47 -0
- package/dist/chunk-VYF7WV4K.cjs.map +1 -0
- package/dist/{chunk-P4XZH3OR.js → chunk-WHQGJHMD.js} +4 -4
- package/dist/{chunk-TTLFY76J.cjs → chunk-WR77IZUU.cjs} +32 -9
- package/dist/chunk-WR77IZUU.cjs.map +1 -0
- package/dist/{chunk-O2BECFXJ.cjs → chunk-WTFEMOV5.cjs} +43 -22
- package/dist/chunk-WTFEMOV5.cjs.map +1 -0
- package/dist/{chunk-YAKTVIVK.js → chunk-XIUZT4TO.js} +3 -3
- package/dist/chunk-XPG56DLQ.cjs +103 -0
- package/dist/chunk-XPG56DLQ.cjs.map +1 -0
- package/dist/{chunk-GPVGGBIR.js → chunk-XWMXEJVZ.js} +2 -2
- package/dist/chunk-XZILHRKG.cjs +13 -0
- package/dist/chunk-XZILHRKG.cjs.map +1 -0
- package/dist/{chunk-VQGLVBPL.cjs → chunk-YIOHKQ6Y.cjs} +11 -4
- package/dist/chunk-YIOHKQ6Y.cjs.map +1 -0
- package/dist/{chunk-A3LMUPG3.js → chunk-Z3IJWYUD.js} +2 -2
- package/dist/{chunk-4J25XZDI.js → chunk-ZJWQPZ7E.js} +9 -2
- package/dist/chunk-ZJWQPZ7E.js.map +1 -0
- package/dist/color-picker/index.cjs +5 -4
- package/dist/color-picker/index.cjs.map +1 -1
- package/dist/color-picker/index.js +4 -3
- package/dist/combobox/index.cjs +7 -6
- package/dist/combobox/index.cjs.map +1 -1
- package/dist/combobox/index.js +6 -5
- package/dist/command-palette/index.cjs +4 -3
- package/dist/command-palette/index.cjs.map +1 -1
- package/dist/command-palette/index.js +3 -2
- package/dist/context-menu/index.cjs +7 -6
- package/dist/context-menu/index.cjs.map +1 -1
- package/dist/context-menu/index.d.cts +2 -2
- package/dist/context-menu/index.d.ts +2 -2
- package/dist/context-menu/index.js +6 -5
- package/dist/conversation/index.cjs +11 -8
- package/dist/conversation/index.cjs.map +1 -1
- package/dist/conversation/index.d.cts +3 -3
- package/dist/conversation/index.d.ts +3 -3
- package/dist/conversation/index.js +10 -7
- package/dist/data-grid/index.cjs +18 -15
- package/dist/data-grid/index.cjs.map +1 -1
- package/dist/data-grid/index.d.cts +8 -8
- package/dist/data-grid/index.d.ts +8 -8
- package/dist/data-grid/index.js +17 -14
- package/dist/date-picker/index.cjs +11 -8
- package/dist/date-picker/index.cjs.map +1 -1
- package/dist/date-picker/index.d.cts +2 -2
- package/dist/date-picker/index.d.ts +2 -2
- package/dist/date-picker/index.js +10 -7
- package/dist/drawer/index.cjs +8 -5
- package/dist/drawer/index.cjs.map +1 -1
- package/dist/drawer/index.d.cts +5 -4
- package/dist/drawer/index.d.ts +5 -4
- package/dist/drawer/index.js +7 -4
- package/dist/dropdown/index.cjs +4 -3
- package/dist/dropdown/index.cjs.map +1 -1
- package/dist/dropdown/index.js +3 -2
- package/dist/header/index.cjs +9 -6
- package/dist/header/index.cjs.map +1 -1
- package/dist/header/index.d.cts +10 -10
- package/dist/header/index.d.ts +10 -10
- package/dist/header/index.js +8 -5
- package/dist/index.cjs +59 -42
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +107 -34
- package/dist/index.d.cts +16 -13
- package/dist/index.d.ts +16 -13
- package/dist/index.js +65 -48
- package/dist/inline-edit/index.cjs +6 -5
- package/dist/inline-edit/index.cjs.map +1 -1
- package/dist/inline-edit/index.js +5 -4
- package/dist/input/index.cjs +5 -4
- package/dist/input/index.cjs.map +1 -1
- package/dist/input/index.d.cts +3 -3
- package/dist/input/index.d.ts +3 -3
- package/dist/input/index.js +4 -3
- package/dist/link-provider/index.cjs +12 -0
- package/dist/link-provider/index.cjs.map +1 -0
- package/dist/link-provider/index.d.cts +43 -0
- package/dist/link-provider/index.d.ts +43 -0
- package/dist/link-provider/index.js +12 -0
- package/dist/link-provider/index.js.map +1 -0
- package/dist/lucide-icons/index.cjs +9 -0
- package/dist/lucide-icons/index.cjs.map +1 -0
- package/dist/lucide-icons/index.d.cts +2 -0
- package/dist/lucide-icons/index.d.ts +2 -0
- package/dist/lucide-icons/index.js +9 -0
- package/dist/lucide-icons/index.js.map +1 -0
- package/dist/menu/index.cjs +6 -5
- package/dist/menu/index.cjs.map +1 -1
- package/dist/menu/index.d.cts +3 -3
- package/dist/menu/index.d.ts +3 -3
- package/dist/menu/index.js +5 -4
- package/dist/modal/index.cjs +8 -5
- package/dist/modal/index.cjs.map +1 -1
- package/dist/modal/index.d.cts +2 -2
- package/dist/modal/index.d.ts +2 -2
- package/dist/modal/index.js +7 -4
- package/dist/navigation/index.cjs +8 -5
- package/dist/navigation/index.cjs.map +1 -1
- package/dist/navigation/index.d.cts +3 -3
- package/dist/navigation/index.d.ts +3 -3
- package/dist/navigation/index.js +7 -4
- package/dist/number-input/index.cjs +4 -3
- package/dist/number-input/index.cjs.map +1 -1
- package/dist/number-input/index.js +3 -2
- package/dist/page-layout/index.cjs +16 -13
- package/dist/page-layout/index.cjs.map +1 -1
- package/dist/page-layout/index.d.cts +8 -8
- package/dist/page-layout/index.d.ts +8 -8
- package/dist/page-layout/index.js +15 -12
- package/dist/pagination/index.cjs +11 -8
- package/dist/pagination/index.cjs.map +1 -1
- package/dist/pagination/index.js +10 -7
- package/dist/popover/index.cjs +4 -3
- package/dist/popover/index.cjs.map +1 -1
- package/dist/popover/index.d.cts +1 -1
- package/dist/popover/index.d.ts +1 -1
- package/dist/popover/index.js +3 -2
- package/dist/renderIcon-BW3PUtg8.d.cts +50 -0
- package/dist/renderIcon-BW3PUtg8.d.ts +50 -0
- package/dist/segmented-control/index.cjs +5 -4
- package/dist/segmented-control/index.cjs.map +1 -1
- package/dist/segmented-control/index.d.cts +3 -3
- package/dist/segmented-control/index.d.ts +3 -3
- package/dist/segmented-control/index.js +4 -3
- package/dist/select/index.cjs +7 -6
- package/dist/select/index.cjs.map +1 -1
- package/dist/select/index.d.cts +4 -4
- package/dist/select/index.d.ts +4 -4
- package/dist/select/index.js +6 -5
- package/dist/snackbar/index.cjs +8 -5
- package/dist/snackbar/index.cjs.map +1 -1
- package/dist/snackbar/index.js +7 -4
- package/dist/split-button/index.cjs +7 -6
- package/dist/split-button/index.cjs.map +1 -1
- package/dist/split-button/index.d.cts +2 -2
- package/dist/split-button/index.d.ts +2 -2
- package/dist/split-button/index.js +6 -5
- package/dist/split-chip/index.cjs +14 -0
- package/dist/split-chip/index.cjs.map +1 -0
- package/dist/split-chip/index.d.cts +67 -0
- package/dist/split-chip/index.d.ts +67 -0
- package/dist/split-chip/index.js +14 -0
- package/dist/split-chip/index.js.map +1 -0
- package/dist/table/index.cjs +16 -13
- package/dist/table/index.cjs.map +1 -1
- package/dist/table/index.d.cts +4 -4
- package/dist/table/index.d.ts +4 -4
- package/dist/table/index.js +15 -12
- package/dist/tabs/index.cjs +4 -3
- package/dist/tabs/index.cjs.map +1 -1
- package/dist/tabs/index.d.cts +1 -1
- package/dist/tabs/index.d.ts +1 -1
- package/dist/tabs/index.js +3 -2
- package/dist/tag-input/index.cjs +9 -6
- package/dist/tag-input/index.cjs.map +1 -1
- package/dist/tag-input/index.js +8 -5
- package/dist/textarea/index.cjs +5 -4
- package/dist/textarea/index.cjs.map +1 -1
- package/dist/textarea/index.d.cts +1 -1
- package/dist/textarea/index.d.ts +1 -1
- package/dist/textarea/index.js +4 -3
- package/dist/theme-editor/index.cjs +14 -11
- package/dist/theme-editor/index.cjs.map +1 -1
- package/dist/theme-editor/index.js +13 -10
- package/dist/theme-provider/index.cjs +4 -3
- package/dist/theme-provider/index.cjs.map +1 -1
- package/dist/theme-provider/index.js +3 -2
- package/dist/timeline/index.cjs +2 -2
- package/dist/timeline/index.d.cts +18 -3
- package/dist/timeline/index.d.ts +18 -3
- package/dist/timeline/index.js +1 -1
- package/dist/toolbar/index.cjs +12 -9
- package/dist/toolbar/index.cjs.map +1 -1
- package/dist/toolbar/index.d.cts +7 -7
- package/dist/toolbar/index.d.ts +7 -7
- package/dist/toolbar/index.js +11 -8
- package/dist/tooltip/index.cjs +4 -3
- package/dist/tooltip/index.cjs.map +1 -1
- package/dist/tooltip/index.js +3 -2
- package/package.json +4 -2
- package/dist/Button.types-BH0CPyPx.d.ts +0 -33
- package/dist/Button.types-DZRCVqyN.d.cts +0 -33
- package/dist/chunk-35LGEPLP.cjs.map +0 -1
- package/dist/chunk-36JFXFM2.cjs.map +0 -1
- package/dist/chunk-3KBBJZHK.cjs.map +0 -1
- package/dist/chunk-4J25XZDI.js.map +0 -1
- package/dist/chunk-5O73AALP.cjs.map +0 -1
- package/dist/chunk-75GFIQRU.js.map +0 -1
- package/dist/chunk-DA375AI6.cjs +0 -88
- package/dist/chunk-DA375AI6.cjs.map +0 -1
- package/dist/chunk-DRXPTACG.js.map +0 -1
- package/dist/chunk-GWHZFX2H.js.map +0 -1
- package/dist/chunk-NEQXEVHM.js +0 -34
- package/dist/chunk-NEQXEVHM.js.map +0 -1
- package/dist/chunk-O2BECFXJ.cjs.map +0 -1
- package/dist/chunk-OOCCSMWM.js.map +0 -1
- package/dist/chunk-RHHZRTWM.js.map +0 -1
- package/dist/chunk-SNRRF64M.js.map +0 -1
- package/dist/chunk-TTLFY76J.cjs.map +0 -1
- package/dist/chunk-VQGLVBPL.cjs.map +0 -1
- package/dist/chunk-WE2SBWZ6.js.map +0 -1
- package/dist/chunk-ZMDZGL5A.cjs +0 -34
- package/dist/chunk-ZMDZGL5A.cjs.map +0 -1
- package/dist/renderIcon-C2lEMMzb.d.cts +0 -30
- package/dist/renderIcon-C2lEMMzb.d.ts +0 -30
- /package/dist/{chunk-RHFD2Z5V.js.map → chunk-3TF2GZSG.js.map} +0 -0
- /package/dist/{chunk-JHX6JK3M.js.map → chunk-3X6QVHTD.js.map} +0 -0
- /package/dist/{chunk-MQAOXZD4.js.map → chunk-4S57PE43.js.map} +0 -0
- /package/dist/{chunk-JT4KVXJK.js.map → chunk-4V2XYUQL.js.map} +0 -0
- /package/dist/{chunk-AR2ZOO6L.js.map → chunk-6FXFKMJ5.js.map} +0 -0
- /package/dist/{chunk-LGDODZHI.js.map → chunk-6LTZV6HN.js.map} +0 -0
- /package/dist/{chunk-YP4HUBKN.js.map → chunk-6NAOAKII.js.map} +0 -0
- /package/dist/{chunk-D7SQ7LHJ.js.map → chunk-BO3KK3ZQ.js.map} +0 -0
- /package/dist/{chunk-5XH2PHT2.js.map → chunk-CNTG7OOO.js.map} +0 -0
- /package/dist/{chunk-WNDDS367.js.map → chunk-DPTTDHZ5.js.map} +0 -0
- /package/dist/{chunk-BFKPJ627.js.map → chunk-FHOD3FUN.js.map} +0 -0
- /package/dist/{chunk-SDUGYJGW.js.map → chunk-H3C6YECZ.js.map} +0 -0
- /package/dist/{chunk-MPIVBAMY.js.map → chunk-HYRLK462.js.map} +0 -0
- /package/dist/{chunk-FIVMMCGM.js.map → chunk-IHPSRTVW.js.map} +0 -0
- /package/dist/{chunk-THCTUBX6.js.map → chunk-IKXXXVUO.js.map} +0 -0
- /package/dist/{chunk-24HKKSKX.js.map → chunk-L6ERHCQ2.js.map} +0 -0
- /package/dist/{chunk-4LNTZPSQ.js.map → chunk-L6YJ6QTZ.js.map} +0 -0
- /package/dist/{chunk-JNY7TUDS.js.map → chunk-MCPGI6EI.js.map} +0 -0
- /package/dist/{chunk-2PCCGQOH.js.map → chunk-P6OJQ2RN.js.map} +0 -0
- /package/dist/{chunk-YXRKBKFB.js.map → chunk-S5CMZFX6.js.map} +0 -0
- /package/dist/{chunk-HEX4IMLO.js.map → chunk-TJQNGJHP.js.map} +0 -0
- /package/dist/{chunk-SFFKQQ5Z.js.map → chunk-U4SVBE2M.js.map} +0 -0
- /package/dist/{chunk-O3QM3BFE.js.map → chunk-UC4NYF6T.js.map} +0 -0
- /package/dist/{chunk-GIEDIAPD.js.map → chunk-V5CM5TH3.js.map} +0 -0
- /package/dist/{chunk-L65MHFMD.js.map → chunk-V64DICJK.js.map} +0 -0
- /package/dist/{chunk-P4XZH3OR.js.map → chunk-WHQGJHMD.js.map} +0 -0
- /package/dist/{chunk-YAKTVIVK.js.map → chunk-XIUZT4TO.js.map} +0 -0
- /package/dist/{chunk-GPVGGBIR.js.map → chunk-XWMXEJVZ.js.map} +0 -0
- /package/dist/{chunk-A3LMUPG3.js.map → chunk-Z3IJWYUD.js.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/eidos-ui/eidos-ui/dist/chunk-OGGZIFTI.cjs","../src/components/ThemeEditor/ThemeEditor.component.tsx"],"names":["ratio","grade"],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACA;ACvCA,8BAAqF;AACrF,2CAAuE;AAgQjE,+CAAA;AAhON,IAAM,aAAA,EAAe,gCAAA;AAGrB,IAAM,eAAA,EAAiB,GAAA;AAEvB,IAAM,aAAA,EAA8C;AAAA,EAClD,OAAA,EAAS,SAAA;AAAA,EACT,SAAA,EAAW,WAAA;AAAA,EACX,OAAA,EAAS,SAAA;AAAA,EACT,MAAA,EAAQ,QAAA;AAAA,EACR,OAAA,EAAS,SAAA;AAAA,EACT,IAAA,EAAM,MAAA;AAAA,EACN,SAAA,EAAW;AACb,CAAA;AAGA,IAAM,OAAA,EAAS,CAAC,GAAA,EAAA,GAAgC,IAAA,IAAQ,WAAA;AAmBxD,IAAM,YAAA,EAAiC;AAAA;AAAA;AAAA;AAAA;AAAA,EAKrC,EAAE,KAAA,EAAO,mCAAA,EAAqC,KAAA,EAAO,8BAAA,CAAa,UAAA,CAAW,WAAY,CAAA;AAAA,EACzF,EAAE,KAAA,EAAO,WAAA,EAAa,KAAA,EAAO,mDAAmD,CAAA;AAAA,EAChF,EAAE,KAAA,EAAO,mBAAA,EAAqB,KAAA,EAAO,+BAA+B,CAAA;AAAA,EACpE,EAAE,KAAA,EAAO,SAAA,EAAW,KAAA,EAAO,oCAAoC,CAAA;AAAA,EAC/D,EAAE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AAA;AACS,UAAA;AACoB,UAAA;AACnB,UAAA;AACD,UAAA;AAEa,QAAA;AAAA,MAAA;AACvB,IAAA;AAEJ,EAAA;AAIR;AAEA;AD7KA;AACA;AACA;AACA","file":"/home/runner/work/eidos-ui/eidos-ui/dist/chunk-OGGZIFTI.cjs","sourcesContent":[null,"import React, { useCallback, useEffect, useMemo, useReducer, useRef, useState } from 'react';\nimport { CircleCheck, CircleX, RotateCcw, TriangleAlert, Upload } from 'lucide-react';\nimport { Alert } from '../Alert';\nimport { Button, IconButton } from '../Button';\nimport { Card } from '../Card';\nimport { ColorPicker } from '../ColorPicker';\nimport { Select } from '../Select';\nimport { Slider } from '../Slider';\nimport { Tooltip } from '../Tooltip';\nimport { useTheme } from '../ThemeProvider';\nimport type { ThemeColorKey, ThemeFontOption } from '../ThemeProvider';\nimport {\n THEME_COLOR_KEYS,\n FONT_SCALE_MAX,\n FONT_SCALE_MIN,\n defaultTheme,\n} from '../ThemeProvider/ThemeProvider.tokens';\nimport {\n CONTRAST_DARK,\n CONTRAST_LIGHT,\n contrastRatio,\n pickContrast,\n} from '../ThemeProvider/ThemeProvider.color';\nimport {\n FONT_ACCEPT,\n isFontStackAvailable,\n registerFontFile,\n subscribeToFontLoads,\n toFontStack,\n} from '../ThemeProvider/ThemeProvider.fonts';\nimport type { ThemeEditorProps } from './ThemeEditor.types';\n\n/** The page surface every diagnostic is measured against - `--white`. */\nconst PAGE_SURFACE = CONTRAST_LIGHT;\n\n/** Below this, a fill is effectively invisible against the page behind it. */\nconst EDGE_MIN_RATIO = 1.5;\n\nconst COLOR_LABELS: Record<ThemeColorKey, string> = {\n primary: 'Primary',\n secondary: 'Secondary',\n success: 'Success',\n danger: 'Danger',\n warning: 'Warning',\n info: 'Info',\n hyperlink: 'Hyperlink',\n};\n\n/** `hyperlink` is only ever text on a surface, so it is graded differently. */\nconst isFill = (key: ThemeColorKey): boolean => key !== 'hyperlink';\n\n/**\n * Built-in stacks, deliberately limited to fonts that can be relied on.\n *\n * A dropdown implies its entries are available, but a font stack is only a list\n * of *names* - nothing here can install a font. So the list is restricted to\n * generic families (guaranteed by CSS), `system-ui` (whatever the OS provides),\n * and the handful of genuinely web-safe faces. Fonts like Inter, which are not\n * installed anywhere by default, were removed: offering one is offering a\n * choice that silently does nothing on most machines.\n *\n * The preset is included because it is the shipped default and therefore has to\n * be representable - and note that `eidos-ui` does not ship the Plus Jakarta\n * Sans file either, so it renders only where the consumer provides it. That is\n * exactly why unavailable options are labelled as such.\n *\n * Anything beyond this belongs to the consuming app, via `fontOptions`.\n */\nconst FONT_STACKS: ThemeFontOption[] = [\n // Taken from the preset rather than retyped, so the shipped default always\n // matches an option exactly. A hand-copied shorter stack did not match, and\n // the row fell back to showing a synthetic \"custom\" entry instead of the\n // name of the font actually in use.\n { label: 'Plus Jakarta Sans (theme default)', value: defaultTheme.typography.fontFamily! },\n { label: 'System UI', value: \"system-ui, -apple-system, 'Segoe UI', sans-serif\" },\n { label: 'Helvetica / Arial', value: 'Helvetica, Arial, sans-serif' },\n { label: 'Georgia', value: \"Georgia, 'Times New Roman', serif\" },\n { label: 'Sans-serif (generic)', value: 'sans-serif' },\n { label: 'Serif (generic)', value: 'serif' },\n];\n\nconst MONO_STACKS: ThemeFontOption[] = [\n { label: 'JetBrains Mono (theme default)', value: defaultTheme.typography.monoFamily! },\n { label: 'Menlo / Consolas', value: 'Menlo, Consolas, monospace' },\n { label: 'Courier New', value: \"'Courier New', Courier, monospace\" },\n { label: 'Monospace (generic)', value: 'monospace' },\n];\n\ntype Grade = 'aa' | 'aa-large' | 'fail';\n\nconst gradeFor = (ratio: number): Grade => (ratio >= 4.5 ? 'aa' : ratio >= 3 ? 'aa-large' : 'fail');\n\n/** Spelled out for the middle grade, which is the one that misleads. */\nconst GRADE_CAVEAT: Partial<Record<Grade, string>> = {\n 'aa-large':\n ' WCAG AA needs 4.5:1 for normal text and allows 3:1 only at 24px or larger - button and label text here is around 12px, so this does not pass.',\n fail: ' Below 3:1, which fails WCAG AA at every text size.',\n};\n\n/**\n * Severity is carried by an icon and the label text, not by colour.\n *\n * These badges cannot use `Pill`, or any themed `--x-color`: the theme being\n * edited also styles this editor, so a washed-out `success` colour would render\n * the \"passes AA\" badge illegible at precisely the moment it is reporting that\n * a colour is illegible. The badge styling comes from the gray ramp, which is\n * deliberately not themeable.\n *\n * Not relying on colour alone also satisfies WCAG 1.4.1 (Use of Colour).\n */\nconst GRADE_BADGE: Record<\n Grade,\n { label: string; icon: React.ComponentType<{ className?: string }> }\n> = {\n aa: { label: 'AA', icon: CircleCheck },\n // Named for what it means in practice, not just for the threshold it clears.\n // WCAG's relaxed 3:1 tier applies only to text at 24px (or 18.7px bold) and\n // above, and nothing in this library is that large - `--font-size-sm` is\n // ~12.25px at the default root size. A bare \"AA large only\" reads as a pass\n // when for every component here it is a fail.\n 'aa-large': { label: 'Too low for body text', icon: TriangleAlert },\n fail: { label: 'Fails AA', icon: CircleX },\n};\n\ninterface Diagnostic {\n grade: Grade;\n ratio: number;\n /** What the ratio describes, for the tooltip. */\n detail: string;\n /** Set when the fill is too close to the page surface to be seen. */\n edgeWarning?: string;\n}\n\nconst diagnose = (key: ThemeColorKey, base: string, explicitContrast?: string): Diagnostic => {\n if (!isFill(key)) {\n // Link text sits on the page, so the page is what it must contrast with.\n const ratio = contrastRatio(base, PAGE_SURFACE);\n const grade = gradeFor(ratio);\n return {\n grade,\n ratio,\n detail: `Link text on the page background: ${ratio.toFixed(2)}:1 against white.${GRADE_CAVEAT[grade] ?? ''}`,\n };\n }\n\n const foreground = explicitContrast ?? pickContrast(base);\n const ratio = contrastRatio(base, foreground);\n const name = foreground.toLowerCase() === CONTRAST_DARK ? 'dark' : 'white';\n const edge = contrastRatio(base, PAGE_SURFACE);\n\n const grade = gradeFor(ratio);\n\n return {\n grade,\n ratio,\n detail: `${name === 'white' ? 'White' : 'Near-black'} text on this fill is ${ratio.toFixed(2)}:1.${\n explicitContrast ? ' Foreground pinned via the theme.' : ''\n }${GRADE_CAVEAT[grade] ?? ''}`,\n edgeWarning:\n edge < EDGE_MIN_RATIO\n ? `Only ${edge.toFixed(2)}:1 against the page background - this fill is barely distinguishable from the page it sits on.`\n : undefined,\n };\n};\n\ninterface FontRowProps {\n label: string;\n /** Stack currently applied, used to pick the matching option. */\n value: string;\n options: ThemeFontOption[];\n mono: boolean;\n allowUpload: boolean;\n onChange: (stack: string) => void;\n onUploaded: (option: ThemeFontOption, file: File, family: string) => void;\n}\n\n/** Pulls the first family out of a stack, unquoted. */\nconst firstFamily = (stack: string): string =>\n stack\n .split(',')[0]\n ?.trim()\n .replace(/^['\"]|['\"]$/g, '') || 'Custom';\n\n/**\n * One font row: a `Select` over the known stacks, an optional upload, and an\n * availability warning.\n *\n * Uses `Select` rather than `Combobox` deliberately. `Combobox` filters its\n * options against the text in the field, and the field holds a full font stack\n * (`'Plus Jakarta Sans', -apple-system, …`) which matches no option label - so\n * the list read \"No results found\" until the text was cleared by hand. A font\n * is a choice from a known set, not a search.\n */\nconst FontRow: React.FC<FontRowProps> = ({\n label,\n value,\n options,\n mono,\n allowUpload,\n onChange,\n onUploaded,\n}) => {\n const inputRef = useRef<HTMLInputElement>(null);\n const [error, setError] = useState<string | null>(null);\n\n // Web fonts load asynchronously, so the first render always sees them as\n // unavailable. Without re-checking once they arrive, the row would sit on a\n // stale \"not installed\" warning for a font that is rendering perfectly.\n // The reducer exists only to schedule that re-render; its value is unused.\n const [, onFontsLoaded] = useReducer((count: number) => count + 1, 0);\n useEffect(() => subscribeToFontLoads(onFontsLoaded), [onFontsLoaded]);\n\n const baseOptions = useMemo(() => {\n // A stack the theme carries but that isn't in the list (loaded by the host\n // app, or set programmatically) still needs to be selectable, labelled with\n // its own first family so the row names the font actually in use.\n const known = options.some((o) => o.value === value);\n return known ? options : [...options, { label: `${firstFamily(value)} (custom)`, value }];\n }, [options, value]);\n\n // Probed on every render rather than memoised: availability changes over time\n // as fonts load, so a cached answer is a wrong answer. Four canvas\n // measurements are far cheaper than getting this wrong.\n //\n // Availability is annotated per option rather than filtered or disabled. A\n // theme is shared across machines, so a font present here may be absent for\n // the next user - and vice versa, which would mean hiding a font someone\n // legitimately wants. Annotating keeps every choice selectable while making\n // the list stop implying that a name is a guarantee.\n const selectOptions = baseOptions.map((option) => ({\n id: option.value,\n label: isFontStackAvailable(option.value) ? option.label : `${option.label} - not installed`,\n value: option.value,\n }));\n\n const handleFile = useCallback(\n async (file: File | undefined) => {\n if (!file) return;\n setError(null);\n try {\n const family = await registerFontFile(file);\n const stack = toFontStack(family, mono);\n onUploaded({ label: `${family} (this session)`, value: stack }, file, family);\n onChange(stack);\n } catch (cause) {\n setError(\n cause instanceof Error ? cause.message : 'That file could not be loaded as a font.',\n );\n }\n },\n [mono, onChange, onUploaded],\n );\n\n const unavailable = !isFontStackAvailable(value);\n\n return (\n <div className=\"eidos-theme-editor-row eidos-theme-editor-row--wide\">\n <span className=\"eidos-theme-editor-row__label\">{label}</span>\n\n <div className=\"eidos-theme-editor-row__control\">\n <Select\n options={selectOptions}\n value={value}\n onChange={(next) => onChange(Array.isArray(next) ? next[0] : next)}\n fullWidth\n // The row's visible label is a `<span>`, not a `<label htmlFor>`,\n // so nothing associates it with the control. Naming the input\n // directly keeps the two in step without restructuring the row.\n inputProps={{ 'aria-label': label }}\n />\n </div>\n\n {/* Occasional - lives before the action so it can never displace it. */}\n <div className=\"eidos-theme-editor-row__diagnostics\">\n {unavailable && (\n <Tooltip\n message={`${firstFamily(value)} isn't available here, so the browser is rendering the next family in the stack instead. Upload the file, or have your app serve it, to use it.`}\n >\n <span className=\"eidos-theme-editor-badge eidos-theme-editor-badge--aa-large\">\n <TriangleAlert className=\"eidos-theme-editor-badge__icon\" />\n Not installed\n </span>\n </Tooltip>\n )}\n {error && (\n <Tooltip message={error}>\n <span className=\"eidos-theme-editor-badge eidos-theme-editor-badge--fail\">\n <CircleX className=\"eidos-theme-editor-badge__icon\" />\n Upload failed\n </span>\n </Tooltip>\n )}\n </div>\n\n {allowUpload && (\n <div className=\"eidos-theme-editor-row__actions\">\n <Button\n variant=\"text\"\n color=\"secondary\"\n size=\"sm\"\n preIcon={Upload}\n onClick={() => inputRef.current?.click()}\n tooltip=\"Load a font file to use it right away. Not saved - see onFontUpload to persist it.\"\n >\n Upload\n </Button>\n {/* Plain input rather than FileUpload: this is a single inline\n action in a dense row, not a drop zone. */}\n <input\n ref={inputRef}\n type=\"file\"\n accept={FONT_ACCEPT}\n // Same proxy pattern as `MessageComposer` - see the note there.\n className=\"eidos-theme-editor-file\"\n tabIndex={-1}\n aria-hidden=\"true\"\n onChange={(event) => {\n void handleFile(event.target.files?.[0]);\n // Allow re-picking the same file after a failure.\n event.target.value = '';\n }}\n />\n </div>\n )}\n </div>\n );\n};\n\n/**\n * Live editor for the active `ThemeProvider` theme.\n *\n * Renders no preview of its own: the provider writes tokens to\n * `document.documentElement`, so the surrounding page is the preview.\n *\n * Contrast readouts are diagnostics only - a colour that fails is still\n * applied. Automatically \"correcting\" a chosen colour would mean silently\n * rendering something other than what was picked.\n */\nexport const ThemeEditor: React.FC<ThemeEditorProps> = ({\n colors = THEME_COLOR_KEYS as ThemeColorKey[],\n fontOptions = FONT_STACKS,\n monoFontOptions = MONO_STACKS,\n allowFontUpload = true,\n onFontUpload,\n hideTypography = false,\n hideReset = false,\n hideCssExport = false,\n className,\n}) => {\n const { theme, resolvedTheme, setTheme, updateTheme, resetTheme, isDefault, toCss } = useTheme();\n const [copied, setCopied] = useState(false);\n\n // Fonts registered through the upload control this session. Kept local\n // because font *data* cannot live in a ThemeConfig - see the .mdx.\n const [uploaded, setUploaded] = useState<ThemeFontOption[]>([]);\n const [monoUploaded, setMonoUploaded] = useState<ThemeFontOption[]>([]);\n\n const setColor = useCallback(\n (key: ThemeColorKey, hex: string) => {\n const current = theme.colors?.[key];\n // Only the base is written here. A `contrast` pinned in the theme is\n // preserved rather than dropped, since the editor never sets one.\n const pinned = typeof current === 'object' ? current.contrast : undefined;\n updateTheme({ colors: { [key]: pinned ? { base: hex, contrast: pinned } : hex } });\n },\n [theme.colors, updateTheme],\n );\n\n const resetColor = useCallback(\n (key: ThemeColorKey) => {\n // Must go through setTheme, not updateTheme: updateTheme merges, so a key\n // left out of the patch keeps its existing value instead of being removed.\n // Removal is what restores the preset, since resolveTheme fills gaps.\n const nextColors = { ...theme.colors };\n delete nextColors[key];\n setTheme({ ...theme, colors: nextColors });\n },\n [theme, setTheme],\n );\n\n const diagnostics = useMemo(\n () =>\n colors.map((key) => {\n const { base, contrast } = resolvedTheme.colors[key];\n return { key, base, ...diagnose(key, base, contrast) };\n }),\n [colors, resolvedTheme],\n );\n\n const failing = diagnostics.filter((d) => d.grade === 'fail');\n const invisible = diagnostics.filter((d) => d.edgeWarning);\n\n const copyCss = useCallback(() => {\n const css = toCss();\n const done = () => {\n setCopied(true);\n setTimeout(() => setCopied(false), 1600);\n };\n if (navigator.clipboard?.writeText) {\n navigator.clipboard.writeText(css).then(done, done);\n return;\n }\n done();\n }, [toCss]);\n\n return (\n <div className={['eidos-theme-editor', className].filter(Boolean).join(' ')}>\n {(failing.length > 0 || invisible.length > 0) && (\n <Alert variant=\"warning\" title=\"Contrast issues\">\n {failing.length > 0 && (\n <p>\n Cannot reach WCAG AA (4.5:1) with either foreground:{' '}\n {failing.map((d) => COLOR_LABELS[d.key]).join(', ')}.\n </p>\n )}\n {invisible.length > 0 && (\n <p>\n Too close to the page background to read as a filled surface:{' '}\n {invisible.map((d) => COLOR_LABELS[d.key]).join(', ')}.\n </p>\n )}\n </Alert>\n )}\n\n <Card variant=\"outlined\" padding=\"lg\" className=\"eidos-theme-editor-section\">\n <div className=\"eidos-theme-editor-section__header\">\n <span className=\"eidos-theme-editor-section__title\">Colours</span>\n <span className=\"eidos-theme-editor-section__hint\">\n Shades, tints and foregrounds are derived from each base colour.\n </span>\n </div>\n\n <div className=\"eidos-theme-editor-rows\">\n {diagnostics.map(({ key, base, grade, ratio, detail, edgeWarning }) => {\n const badge = GRADE_BADGE[grade];\n const overridden = theme.colors?.[key] !== undefined;\n return (\n <div className=\"eidos-theme-editor-row\" key={key}>\n <span className=\"eidos-theme-editor-row__label\">{COLOR_LABELS[key]}</span>\n\n {/* `md` rather than `sm`: the size drives the panel's\n saturation/brightness canvas, and 120px is cramped for\n picking a lightness precisely. */}\n <ColorPicker\n value={base}\n onChange={(hex) => setColor(key, hex)}\n size=\"md\"\n // The row draws its own visible label, so the picker must\n // not draw a second one - but without a name of its own\n // every picker here announced as \"Open colour picker\" and\n // they were indistinguishable.\n ariaLabel={COLOR_LABELS[key]}\n />\n\n <div className=\"eidos-theme-editor-row__diagnostics\">\n <Tooltip message={detail}>\n <span className={`eidos-theme-editor-badge eidos-theme-editor-badge--${grade}`}>\n <badge.icon className=\"eidos-theme-editor-badge__icon\" />\n {`${ratio.toFixed(2)}:1 ${badge.label}`}\n </span>\n </Tooltip>\n {edgeWarning && (\n <Tooltip message={edgeWarning}>\n <span className=\"eidos-theme-editor-badge eidos-theme-editor-badge--fail\">\n <CircleX className=\"eidos-theme-editor-badge__icon\" />\n Invisible on page\n </span>\n </Tooltip>\n )}\n </div>\n\n <div className=\"eidos-theme-editor-row__actions\">\n <IconButton\n icon={RotateCcw}\n variant=\"text\"\n color=\"secondary\"\n size=\"sm\"\n disabled={!overridden}\n onClick={() => resetColor(key)}\n tooltip={overridden ? `Reset ${COLOR_LABELS[key]} to the preset` : 'Unchanged'}\n aria-label={`Reset ${COLOR_LABELS[key]}`}\n />\n </div>\n </div>\n );\n })}\n </div>\n </Card>\n\n {!hideTypography && (\n <Card variant=\"outlined\" padding=\"lg\" className=\"eidos-theme-editor-section\">\n <div className=\"eidos-theme-editor-section__header\">\n <span className=\"eidos-theme-editor-section__title\">Typography</span>\n <span className=\"eidos-theme-editor-section__hint\">\n A stack only names a font - upload the file to use one the browser doesn't\n already have. Spacing is declared in <code>em</code>, so the scale moves padding with\n the text.\n </span>\n </div>\n\n <div className=\"eidos-theme-editor-rows\">\n <FontRow\n label=\"Body font\"\n value={resolvedTheme.typography.fontFamily}\n options={[...fontOptions, ...uploaded]}\n mono={false}\n allowUpload={allowFontUpload}\n onChange={(fontFamily) => updateTheme({ typography: { fontFamily } })}\n onUploaded={(option, file, family) => {\n setUploaded((prev) => [...prev, option]);\n onFontUpload?.(file, family, false);\n }}\n />\n\n <FontRow\n label=\"Mono font\"\n value={resolvedTheme.typography.monoFamily}\n options={[...monoFontOptions, ...monoUploaded]}\n mono\n allowUpload={allowFontUpload}\n onChange={(monoFamily) => updateTheme({ typography: { monoFamily } })}\n onUploaded={(option, file, family) => {\n setMonoUploaded((prev) => [...prev, option]);\n onFontUpload?.(file, family, true);\n }}\n />\n\n <div className=\"eidos-theme-editor-row eidos-theme-editor-row--wide\">\n <span className=\"eidos-theme-editor-row__label\">Scale</span>\n <div className=\"eidos-theme-editor-row__control\">\n <Slider\n value={resolvedTheme.typography.fontScale}\n min={FONT_SCALE_MIN}\n max={FONT_SCALE_MAX}\n step={0.025}\n showValue\n showMinMax\n unit=\"×\"\n onChange={(value) => updateTheme({ typography: { fontScale: value } })}\n />\n </div>\n </div>\n </div>\n </Card>\n )}\n\n {(!hideReset || !hideCssExport) && (\n <div className=\"eidos-theme-editor-actions\">\n {!hideReset && (\n <Button variant=\"outlined\" color=\"secondary\" disabled={isDefault} onClick={resetTheme}>\n Reset all\n </Button>\n )}\n {!hideCssExport && (\n <Button\n variant=\"outlined\"\n preIcon={copied ? 'Check' : 'Clipboard'}\n onClick={copyCss}\n tooltip=\"Copy the resolved tokens as a :root block you can paste into your own stylesheet\"\n >\n {copied ? 'Copied' : 'Copy as CSS'}\n </Button>\n )}\n </div>\n )}\n </div>\n );\n};\n\nThemeEditor.displayName = 'ThemeEditor';\n"]}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Select
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-4S57PE43.js";
|
|
4
4
|
import {
|
|
5
5
|
Input
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-XIUZT4TO.js";
|
|
7
7
|
import {
|
|
8
8
|
Dropdown
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-3X6QVHTD.js";
|
|
10
10
|
import {
|
|
11
11
|
Button
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-JY77VJAZ.js";
|
|
13
13
|
import {
|
|
14
14
|
devWarn,
|
|
15
15
|
fullWidthModifier,
|
|
16
16
|
useDialogFocus
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-U34INRFO.js";
|
|
18
18
|
import {
|
|
19
19
|
__commonJS,
|
|
20
20
|
__toESM
|
|
@@ -1389,4 +1389,4 @@ export {
|
|
|
1389
1389
|
TimeInput,
|
|
1390
1390
|
DatePicker
|
|
1391
1391
|
};
|
|
1392
|
-
//# sourceMappingURL=chunk-
|
|
1392
|
+
//# sourceMappingURL=chunk-P6OJQ2RN.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkXPG56DLQcjs = require('./chunk-XPG56DLQ.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkENMDOQQOcjs = require('./chunk-ENMDOQQO.cjs');
|
|
7
7
|
|
|
8
8
|
// src/components/Alert/Alert.component.tsx
|
|
9
9
|
var _lucidereact = require('lucide-react');
|
|
@@ -40,7 +40,7 @@ var Alert = ({
|
|
|
40
40
|
const DefaultIcon = DEFAULT_ICONS[variant];
|
|
41
41
|
iconNode = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DefaultIcon, { className: "eidos-alert-icon", "aria-hidden": "true" });
|
|
42
42
|
} else if (isIconType(icon)) {
|
|
43
|
-
iconNode =
|
|
43
|
+
iconNode = _chunkENMDOQQOcjs.renderIcon.call(void 0, icon, "eidos-alert-icon");
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
const buttonColor = VARIANT_TO_BUTTON_COLOR[variant];
|
|
@@ -50,7 +50,7 @@ var Alert = ({
|
|
|
50
50
|
title && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "eidos-alert-title", children: title }),
|
|
51
51
|
children && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "eidos-alert-content", children }),
|
|
52
52
|
action && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "eidos-alert-action", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
53
|
-
|
|
53
|
+
_chunkXPG56DLQcjs.Button,
|
|
54
54
|
{
|
|
55
55
|
variant: action.variant === "filled" ? "filled" : "text",
|
|
56
56
|
size: "sm",
|
|
@@ -76,4 +76,4 @@ var Alert = ({
|
|
|
76
76
|
|
|
77
77
|
|
|
78
78
|
exports.Alert = Alert;
|
|
79
|
-
//# sourceMappingURL=chunk-
|
|
79
|
+
//# sourceMappingURL=chunk-PE2SLXUS.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/eidos-ui/eidos-ui/dist/chunk-
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/eidos-ui/eidos-ui/dist/chunk-PE2SLXUS.cjs","../src/components/Alert/Alert.component.tsx"],"names":[],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACA;ACNA,2CAA6D;AA6D5C,+CAAA;AAhDjB,IAAM,cAAA,EAA8E;AAAA,EAClF,IAAA,EAAM,iBAAA;AAAA,EACN,OAAA,EAAS,wBAAA;AAAA,EACT,OAAA,EAAS,0BAAA;AAAA,EACT,MAAA,EAAQ;AACV,CAAA;AAMA,IAAM,wBAAA,EAA6E;AAAA,EACjF,IAAA,EAAM,SAAA;AAAA,EACN,OAAA,EAAS,SAAA;AAAA,EACT,OAAA,EAAS,SAAA;AAAA,EACT,MAAA,EAAQ;AACV,CAAA;AAMA,SAAS,UAAA,CAAW,KAAA,EAA8C;AAChE,EAAA,OAAO,OAAO,MAAA,IAAU,SAAA;AAC1B;AAMO,IAAM,MAAA,EAA8B,CAAC;AAAA,EAC1C,QAAA,EAAU,MAAA;AAAA,EACV,KAAA;AAAA,EACA,QAAA;AAAA,EACA,IAAA;AAAA,EACA,SAAA;AAAA,EACA,MAAA;AAAA,EACA,UAAA,EAAY;AACd,CAAA,EAAA,GAAM;AACJ,EAAA,MAAM,QAAA,EAAU,CAAC,aAAA,EAAe,CAAA,aAAA,EAAgB,OAAO,CAAA,CAAA;AAG7B,EAAA;AACM,EAAA;AAElB,EAAA;AAC6B,IAAA;AACE,MAAA;AACjB,MAAA;AACG,IAAA;AACmB,MAAA;AAChD,IAAA;AACF,EAAA;AAEmD,EAAA;AAGjC,EAAA;AACe,IAAA;AAEd,oBAAA;AACU,MAAA;AACK,MAAA;AAEX,MAAA;AACZ,QAAA;AAAA,QAAA;AACwC,UAAA;AAClC,UAAA;AACE,UAAA;AACS,UAAA;AAER,UAAA;AAAA,QAAA;AAEZ,MAAA;AAEJ,IAAA;AAGE,IAAA;AAAC,MAAA;AAAA,MAAA;AACW,QAAA;AACD,QAAA;AACJ,QAAA;AACM,QAAA;AAEI,QAAA;AAAO,MAAA;AACxB,IAAA;AAEJ,EAAA;AAEJ;AD7B0D;AACA;AACA;AACA","file":"/home/runner/work/eidos-ui/eidos-ui/dist/chunk-PE2SLXUS.cjs","sourcesContent":[null,"import React from 'react';\nimport { Info, CircleCheck, TriangleAlert, CircleX, X } from 'lucide-react';\nimport type { AlertProps } from './Alert.types';\nimport type { IconType } from '../../utils';\nimport { renderIcon } from '../../utils';\nimport { Button } from '../Button/Button.component';\nimport './Alert.scss';\n\n// ============================================================================\n// Constants\n// ============================================================================\n\ntype Variant = NonNullable<AlertProps['variant']>;\n\nconst DEFAULT_ICONS: Record<Variant, React.ComponentType<{ className?: string }>> = {\n info: Info,\n success: CircleCheck,\n warning: TriangleAlert,\n danger: CircleX,\n};\n\n/**\n * Button only ships primary | secondary | success | danger.\n * Warning maps to primary (closest neutral-positive colour available).\n */\nconst VARIANT_TO_BUTTON_COLOR: Record<Variant, 'primary' | 'success' | 'danger'> = {\n info: 'primary',\n success: 'success',\n warning: 'primary',\n danger: 'danger',\n};\n\n// ============================================================================\n// Type guard\n// ============================================================================\n\nfunction isIconType(value: boolean | IconType): value is IconType {\n return typeof value !== 'boolean';\n}\n\n// ============================================================================\n// Component\n// ============================================================================\n\nexport const Alert: React.FC<AlertProps> = ({\n variant = 'info',\n title,\n children,\n icon,\n onDismiss,\n action,\n className = '',\n}) => {\n const classes = ['eidos-alert', `eidos-alert--${variant}`, className].filter(Boolean).join(' ');\n\n // Determine icon rendering\n const showIcon = icon !== false;\n let iconNode: React.ReactNode = null;\n\n if (showIcon) {\n if (icon === true || icon === undefined) {\n const DefaultIcon = DEFAULT_ICONS[variant];\n iconNode = <DefaultIcon className=\"eidos-alert-icon\" aria-hidden=\"true\" />;\n } else if (isIconType(icon)) {\n iconNode = renderIcon(icon, 'eidos-alert-icon');\n }\n }\n\n const buttonColor = VARIANT_TO_BUTTON_COLOR[variant];\n\n return (\n <div className={classes} role=\"alert\">\n {showIcon && <span className=\"eidos-alert-icon-wrapper\">{iconNode}</span>}\n\n <div className=\"eidos-alert-body\">\n {title && <p className=\"eidos-alert-title\">{title}</p>}\n {children && <div className=\"eidos-alert-content\">{children}</div>}\n {action && (\n <div className=\"eidos-alert-action\">\n <Button\n variant={action.variant === 'filled' ? 'filled' : 'text'}\n size=\"sm\"\n color={buttonColor}\n onClick={action.onClick}\n >\n {action.label}\n </Button>\n </div>\n )}\n </div>\n\n {onDismiss && (\n <button\n className=\"eidos-alert-dismiss\"\n onClick={onDismiss}\n type=\"button\"\n aria-label=\"Dismiss\"\n >\n <X aria-hidden=\"true\" />\n </button>\n )}\n </div>\n );\n};\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
LinkContext
|
|
3
|
+
} from "./chunk-U32K2H3N.js";
|
|
4
|
+
|
|
5
|
+
// src/components/LinkProvider/LinkProvider.component.tsx
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
var LinkProvider = ({ component, children }) => /* @__PURE__ */ jsx(LinkContext.Provider, { value: component, children });
|
|
8
|
+
LinkProvider.displayName = "LinkProvider";
|
|
9
|
+
|
|
10
|
+
export {
|
|
11
|
+
LinkProvider
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=chunk-QD32IMMH.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/LinkProvider/LinkProvider.component.tsx"],"sourcesContent":["import React from 'react';\nimport { LinkContext } from './LinkProvider.context';\nimport type { LinkProviderProps } from './LinkProvider.types';\n\n/**\n * Sets the component every library link renders with.\n *\n * A context rather than a per-component prop because the router is app-wide:\n * one provider at the root reaches every `Button`, `Chip`, `Header` and\n * `Toolbar` action and `Breadcrumb` crumb, including ones built from config\n * objects where there is nowhere to pass a component. Unlike `ThemeProvider`\n * it writes nothing global, so nesting is fine - the nearest one wins.\n */\nexport const LinkProvider: React.FC<LinkProviderProps> = ({ component, children }) => (\n <LinkContext.Provider value={component}>{children}</LinkContext.Provider>\n);\n\nLinkProvider.displayName = 'LinkProvider';\n"],"mappings":";;;;;AAcE;AADK,IAAM,eAA4C,CAAC,EAAE,WAAW,SAAS,MAC9E,oBAAC,YAAY,UAAZ,EAAqB,OAAO,WAAY,UAAS;AAGpD,aAAa,cAAc;","names":[]}
|
|
@@ -1,12 +1,12 @@
|
|
|
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 _chunkTNQ2ZZ7Wcjs = require('./chunk-TNQ2ZZ7W.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkNFD7MPX4cjs = require('./chunk-NFD7MPX4.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkF5IRMMZ2cjs = require('./chunk-F5IRMMZ2.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
var _chunkPTBBY4ZXcjs = require('./chunk-PTBBY4ZX.cjs');
|
|
@@ -66,16 +66,16 @@ var PageLayout = ({
|
|
|
66
66
|
const setContentRef = useScrollRestoration(scrollRestorationKey, contentRef);
|
|
67
67
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: classes, ...rest, children: [
|
|
68
68
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
69
|
-
|
|
69
|
+
_chunkTNQ2ZZ7Wcjs.Toolbar,
|
|
70
70
|
{
|
|
71
71
|
...toolbar,
|
|
72
72
|
className: ["eidos-pagelayout__toolbar", _optionalChain([toolbar, 'optionalAccess', _ => _.className])].filter(Boolean).join(" ")
|
|
73
73
|
}
|
|
74
74
|
),
|
|
75
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "eidos-pagelayout__navigation", children: navigation && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
75
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "eidos-pagelayout__navigation", children: navigation && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkF5IRMMZ2cjs.Navigation, { ...navigation }) }),
|
|
76
76
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "main", { ref: setContentRef, tabIndex: 0, className: "eidos-pagelayout__content", children: [
|
|
77
77
|
header && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
78
|
-
|
|
78
|
+
_chunkNFD7MPX4cjs.Header,
|
|
79
79
|
{
|
|
80
80
|
...header,
|
|
81
81
|
className: ["eidos-pagelayout__header", header.className].filter(Boolean).join(" ")
|
|
@@ -96,4 +96,4 @@ var PageLayout = ({
|
|
|
96
96
|
|
|
97
97
|
|
|
98
98
|
exports.PageLayout = PageLayout;
|
|
99
|
-
//# sourceMappingURL=chunk-
|
|
99
|
+
//# sourceMappingURL=chunk-QUSO4GFA.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/eidos-ui/eidos-ui/dist/chunk-HEXAY6DE.cjs","../src/components/PageLayout/useScrollRestoration.ts","../src/components/PageLayout/PageLayout.component.tsx"],"names":[],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACA;ACbA,8BAAgE;AAgBzD,IAAM,qBAAA,EAAuB,CAClC,GAAA,EACA,SAAA,EAAA,GACyC;AACzC,EAAA,MAAM,KAAA,EAAO,2BAAA,IAA+B,CAAA;AAC5C,EAAA,MAAM,QAAA,EAAU,2BAAA,gBAAO,IAAI,GAAA,CAA6B,CAAC,CAAA;AACzD,EAAA,MAAM,WAAA,EAAa,2BAAA,GAAU,CAAA;AAM7B,EAAA,MAAM,UAAA,EAAY,2BAAA,SAAgB,CAAA;AAClC,EAAA,8BAAA,CAAU,EAAA,GAAM;AACd,IAAA,SAAA,CAAU,QAAA,EAAU,SAAA;AAAA,EACtB,CAAA,EAAG,CAAC,SAAS,CAAC,CAAA;AAEd,EAAA,MAAM,QAAA,EAAU,gCAAA,CAAa,OAAA,EAAA,GAAgC;AAC3D,IAAA,IAAA,CAAK,QAAA,EAAU,OAAA;AACf,IAAA,MAAM,IAAA,EAAM,SAAA,CAA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,OAAA,mBACC,6BAAA;AAAA,QAAC,wBAAA;AAAA,QAAA;AAAA,UACE,GAAG,MAAA;AAAA,UACJ,SAAA,EAAW,CAAC,0BAAA,EAA4B,MAAA,CAAO,SAAS,CAAA,CAAE,MAAA,CAAO,OAAO,CAAA,CAAE,IAAA,CAAK,GAAG;AAAA,QAAA;AAAA,MACpF,CAAA;AAAA,sBAEF,6BAAA,KAAC,EAAA,EAAI,SAAA,EAAU,wBAAA,EAA0B,SAAA,CAAS,CAAA;AAAA,sBAClD,6BAAA;AAAA,QAAC,wBAAA;AAAA,QAAA;AAAA,UACE,oBAAI,MAAA,UAAU,eAAA;AAAA,UACf,SAAA,EAAW,CAAC,0BAAA,kBAA4B,MAAA,6BAAQ,WAAS,CAAA,CAAE,MAAA,CAAO,OAAO,CAAA,CAAE,IAAA,CAAK,GAAG;AAAA,QAAA;AAAA,MACrF;AAAA,IAAA,EAAA,CACF;AAAA,EAAA,EAAA,CACF,CAAA;AAEJ,CAAA;AFgCA;AACA;AACE;AACF,gCAAC","file":"/home/runner/work/eidos-ui/eidos-ui/dist/chunk-HEXAY6DE.cjs","sourcesContent":[null,"import { useCallback, useEffect, useLayoutEffect, useRef } from 'react';\n\n/**\n * Remembers the content region's scroll offset per key, and applies the\n * stored offset whenever the key changes.\n *\n * The key is supplied by the consumer rather than derived here, because only\n * they know what counts as a navigation - this library has no router opinion.\n * That also decides the semantics, exactly as React Router's `getKey` does:\n * a per-path key gives \"this path always reopens where you left it\", while a\n * per-history-entry key gives the browser's own behaviour, where Back\n * restores but a fresh link to the same URL starts at the top.\n *\n * Returns a ref callback for the scroll container, which also forwards the\n * node to the caller's own `contentRef`.\n */\nexport const useScrollRestoration = (\n key: string | number | undefined,\n forwardTo: React.Ref<HTMLElement> | undefined,\n): ((node: HTMLElement | null) => void) => {\n const node = useRef<HTMLElement | null>(null);\n const offsets = useRef(new Map<string | number, number>());\n const appliedKey = useRef(key);\n\n // Held in a ref so the ref callback below can keep a stable identity. A\n // callback ref that changes identity is invoked with `null` and then the\n // node again on every render that changes it, which would detach and\n // reattach the caller's ref for no reason.\n const forwarded = useRef(forwardTo);\n useEffect(() => {\n forwarded.current = forwardTo;\n }, [forwardTo]);\n\n const setNode = useCallback((element: HTMLElement | null) => {\n node.current = element;\n const ref = forwarded.current;\n if (typeof ref === 'function') ref(element);\n else if (ref) (ref as React.RefObject<HTMLElement | null>).current = element;\n }, []);\n\n // Recorded as it happens rather than when the key changes: by the time a\n // navigation commits, the new page's content is already in the DOM and the\n // browser has clamped `scrollTop` to the new, possibly shorter, height. The\n // outgoing offset is no longer readable at that point.\n //\n // **The key is read from a ref, and the listener is registered once.** Both\n // halves matter. A listener re-subscribed per key closes over the key it was\n // created with, and restoring the incoming page's offset sets `scrollTop`,\n // which makes the browser dispatch a `scroll` event - so the two race:\n //\n // 1. the layout effect below sets `scrollTop` for the incoming key\n // 2. passive effects swap the listener from the outgoing key to it\n // 3. the browser dispatches the scroll event from step 1\n //\n // React flushes passive effects through the scheduler and the browser\n // dispatches `scroll` at its own rendering opportunity, so nothing orders 2\n // before 3. When 3 won, the still-attached *outgoing* listener recorded the\n // incoming page's offset under the outgoing page's key - overwriting a real\n // offset with 0 and losing the position it exists to keep. It passed locally\n // and failed in CI, which is what a race of this shape looks like.\n //\n // Reading `appliedKey` instead means whichever order those steps take, the\n // offset is filed under the key that is actually on screen: the layout effect\n // updates the ref before it touches `scrollTop`.\n useEffect(() => {\n const element = node.current;\n if (!element) return;\n\n const record = () => {\n const current = appliedKey.current;\n if (current !== undefined) offsets.current.set(current, element.scrollTop);\n };\n\n element.addEventListener('scroll', record, { passive: true });\n return () => element.removeEventListener('scroll', record);\n // Registered once, for the same reason: re-subscribing is what created the\n // window where a stale key could be recorded.\n }, []);\n\n // Layout effect so the offset is applied before paint - in a passive effect\n // the new page is visible at the previous page's offset for a frame first.\n // It does not run on the server, which is correct here: there is no scroll\n // position to restore in static markup, and the client applies it on mount.\n useLayoutEffect(() => {\n const element = node.current;\n if (!element || key === undefined || appliedKey.current === key) return;\n\n appliedKey.current = key;\n element.scrollTop = offsets.current.get(key) ?? 0;\n }, [key]);\n\n return setNode;\n};\n","import React from 'react';\nimport type { PageLayoutProps } from './PageLayout.types';\nimport './PageLayout.scss';\nimport { Toolbar } from '../Toolbar';\nimport { Header } from '../Header';\nimport { Footer } from '../Footer';\nimport type { FooterProps } from '../Footer';\nimport { Navigation } from '../Navigation';\nimport { useScrollRestoration } from './useScrollRestoration';\n\nconst defaultFooter: FooterProps = { copyright: `© ${new Date().getFullYear()} Eidos UI` };\n\nexport const PageLayout: React.FC<PageLayoutProps> = ({\n toolbar,\n navigation,\n header,\n footer,\n children,\n className = '',\n // Destructured so they cannot fall into `...rest` and land on the root\n // element, which is not the scroll container.\n contentRef,\n scrollRestorationKey,\n ...rest\n}) => {\n const classes = ['eidos-pagelayout', className].filter(Boolean).join(' ');\n const setContentRef = useScrollRestoration(scrollRestorationKey, contentRef);\n\n return (\n <div className={classes} {...rest}>\n {/* Spread rather than forwarded field by field, so a prop added to\n `Toolbar` reaches `PageLayout` consumers without a second edit\n here - the previous per-field list silently dropped anything it\n didn't know about. `className` is merged last so the layout's own\n grid-area class can't be overwritten by the caller's. */}\n <Toolbar\n {...toolbar}\n className={['eidos-pagelayout__toolbar', toolbar?.className].filter(Boolean).join(' ')}\n />\n <div className=\"eidos-pagelayout__navigation\">\n {navigation && <Navigation {...navigation} />}\n </div>\n {/* A scrollable region containing nothing focusable cannot be scrolled\n by keyboard at all, and a page body is often pure content - a\n report, an article. `tabIndex={0}` makes the region itself focusable\n so arrow keys and Page Up/Down reach it (SC 2.1.1), matching\n `VirtualList` and `Chat`. */}\n <main ref={setContentRef} tabIndex={0} className=\"eidos-pagelayout__content\">\n {header && (\n <Header\n {...header}\n className={['eidos-pagelayout__header', header.className].filter(Boolean).join(' ')}\n />\n )}\n <div className=\"eidos-pagelayout__body\">{children}</div>\n <Footer\n {...(footer ?? defaultFooter)}\n className={['eidos-pagelayout__footer', footer?.className].filter(Boolean).join(' ')}\n />\n </main>\n </div>\n );\n};\n"]}
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/eidos-ui/eidos-ui/dist/chunk-QUSO4GFA.cjs","../src/components/PageLayout/useScrollRestoration.ts","../src/components/PageLayout/PageLayout.component.tsx"],"names":[],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACA;ACbA,8BAAgE;AAgBzD,IAAM,qBAAA,EAAuB,CAClC,GAAA,EACA,SAAA,EAAA,GACyC;AACzC,EAAA,MAAM,KAAA,EAAO,2BAAA,IAA+B,CAAA;AAC5C,EAAA,MAAM,QAAA,EAAU,2BAAA,gBAAO,IAAI,GAAA,CAA6B,CAAC,CAAA;AACzD,EAAA,MAAM,WAAA,EAAa,2BAAA,GAAU,CAAA;AAM7B,EAAA,MAAM,UAAA,EAAY,2BAAA,SAAgB,CAAA;AAClC,EAAA,8BAAA,CAAU,EAAA,GAAM;AACd,IAAA,SAAA,CAAU,QAAA,EAAU,SAAA;AAAA,EACtB,CAAA,EAAG,CAAC,SAAS,CAAC,CAAA;AAEd,EAAA,MAAM,QAAA,EAAU,gCAAA,CAAa,OAAA,EAAA,GAAgC;AAC3D,IAAA,IAAA,CAAK,QAAA,EAAU,OAAA;AACf,IAAA,MAAM,IAAA,EAAM,SAAA,CAAU,OAAA;AACtB,IAAA,GAAA,CAAI,OAAO,IAAA,IAAQ,UAAA,EAAY,GAAA,CAAI,OAAO,CAAA;AAAA,IAAA,KAAA,GAAA,CACjC,GAAA,EAAM,GAAA,CAA4C,QAAA,EAAU,OAAA;AAAA,EACvE,CAAA,EAAG,CAAC,CAAC,CAAA;AA0BL,EAAA,8BAAA,CAAU,EAAA,GAAM;AACd,IAAA,MAAM,QAAA,EAAU,IAAA,CAAK,OAAA;AACrB,IAAA,GAAA,CAAI,CAAC,OAAA,EAAS,MAAA;AAEd,IAAA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A;AAAA,QAAA;AAAA,UACE,oBAAI,MAAA,UAAU,eAAA;AAAA,UACf,SAAA,EAAW,CAAC,0BAAA,kBAA4B,MAAA,6BAAQ,WAAS,CAAA,CAAE,MAAA,CAAO,OAAO,CAAA,CAAE,IAAA,CAAK,GAAG;AAAA,QAAA;AAAA,MACrF;AAAA,IAAA,EAAA,CACF;AAAA,EAAA,EAAA,CACF,CAAA;AAEJ,CAAA;AFgCA;AACA;AACE;AACF,gCAAC","file":"/home/runner/work/eidos-ui/eidos-ui/dist/chunk-QUSO4GFA.cjs","sourcesContent":[null,"import { useCallback, useEffect, useLayoutEffect, useRef } from 'react';\n\n/**\n * Remembers the content region's scroll offset per key, and applies the\n * stored offset whenever the key changes.\n *\n * The key is supplied by the consumer rather than derived here, because only\n * they know what counts as a navigation - this library has no router opinion.\n * That also decides the semantics, exactly as React Router's `getKey` does:\n * a per-path key gives \"this path always reopens where you left it\", while a\n * per-history-entry key gives the browser's own behaviour, where Back\n * restores but a fresh link to the same URL starts at the top.\n *\n * Returns a ref callback for the scroll container, which also forwards the\n * node to the caller's own `contentRef`.\n */\nexport const useScrollRestoration = (\n key: string | number | undefined,\n forwardTo: React.Ref<HTMLElement> | undefined,\n): ((node: HTMLElement | null) => void) => {\n const node = useRef<HTMLElement | null>(null);\n const offsets = useRef(new Map<string | number, number>());\n const appliedKey = useRef(key);\n\n // Held in a ref so the ref callback below can keep a stable identity. A\n // callback ref that changes identity is invoked with `null` and then the\n // node again on every render that changes it, which would detach and\n // reattach the caller's ref for no reason.\n const forwarded = useRef(forwardTo);\n useEffect(() => {\n forwarded.current = forwardTo;\n }, [forwardTo]);\n\n const setNode = useCallback((element: HTMLElement | null) => {\n node.current = element;\n const ref = forwarded.current;\n if (typeof ref === 'function') ref(element);\n else if (ref) (ref as React.RefObject<HTMLElement | null>).current = element;\n }, []);\n\n // Recorded as it happens rather than when the key changes: by the time a\n // navigation commits, the new page's content is already in the DOM and the\n // browser has clamped `scrollTop` to the new, possibly shorter, height. The\n // outgoing offset is no longer readable at that point.\n //\n // **The key is read from a ref, and the listener is registered once.** Both\n // halves matter. A listener re-subscribed per key closes over the key it was\n // created with, and restoring the incoming page's offset sets `scrollTop`,\n // which makes the browser dispatch a `scroll` event - so the two race:\n //\n // 1. the layout effect below sets `scrollTop` for the incoming key\n // 2. passive effects swap the listener from the outgoing key to it\n // 3. the browser dispatches the scroll event from step 1\n //\n // React flushes passive effects through the scheduler and the browser\n // dispatches `scroll` at its own rendering opportunity, so nothing orders 2\n // before 3. When 3 won, the still-attached *outgoing* listener recorded the\n // incoming page's offset under the outgoing page's key - overwriting a real\n // offset with 0 and losing the position it exists to keep. It passed locally\n // and failed in CI, which is what a race of this shape looks like.\n //\n // Reading `appliedKey` instead means whichever order those steps take, the\n // offset is filed under the key that is actually on screen: the layout effect\n // updates the ref before it touches `scrollTop`.\n useEffect(() => {\n const element = node.current;\n if (!element) return;\n\n const record = () => {\n const current = appliedKey.current;\n if (current !== undefined) offsets.current.set(current, element.scrollTop);\n };\n\n element.addEventListener('scroll', record, { passive: true });\n return () => element.removeEventListener('scroll', record);\n // Registered once, for the same reason: re-subscribing is what created the\n // window where a stale key could be recorded.\n }, []);\n\n // Layout effect so the offset is applied before paint - in a passive effect\n // the new page is visible at the previous page's offset for a frame first.\n // It does not run on the server, which is correct here: there is no scroll\n // position to restore in static markup, and the client applies it on mount.\n useLayoutEffect(() => {\n const element = node.current;\n if (!element || key === undefined || appliedKey.current === key) return;\n\n appliedKey.current = key;\n element.scrollTop = offsets.current.get(key) ?? 0;\n }, [key]);\n\n return setNode;\n};\n","import React from 'react';\nimport type { PageLayoutProps } from './PageLayout.types';\nimport './PageLayout.scss';\nimport { Toolbar } from '../Toolbar';\nimport { Header } from '../Header';\nimport { Footer } from '../Footer';\nimport type { FooterProps } from '../Footer';\nimport { Navigation } from '../Navigation';\nimport { useScrollRestoration } from './useScrollRestoration';\n\nconst defaultFooter: FooterProps = { copyright: `© ${new Date().getFullYear()} Eidos UI` };\n\nexport const PageLayout: React.FC<PageLayoutProps> = ({\n toolbar,\n navigation,\n header,\n footer,\n children,\n className = '',\n // Destructured so they cannot fall into `...rest` and land on the root\n // element, which is not the scroll container.\n contentRef,\n scrollRestorationKey,\n ...rest\n}) => {\n const classes = ['eidos-pagelayout', className].filter(Boolean).join(' ');\n const setContentRef = useScrollRestoration(scrollRestorationKey, contentRef);\n\n return (\n <div className={classes} {...rest}>\n {/* Spread rather than forwarded field by field, so a prop added to\n `Toolbar` reaches `PageLayout` consumers without a second edit\n here - the previous per-field list silently dropped anything it\n didn't know about. `className` is merged last so the layout's own\n grid-area class can't be overwritten by the caller's. */}\n <Toolbar\n {...toolbar}\n className={['eidos-pagelayout__toolbar', toolbar?.className].filter(Boolean).join(' ')}\n />\n <div className=\"eidos-pagelayout__navigation\">\n {navigation && <Navigation {...navigation} />}\n </div>\n {/* A scrollable region containing nothing focusable cannot be scrolled\n by keyboard at all, and a page body is often pure content - a\n report, an article. `tabIndex={0}` makes the region itself focusable\n so arrow keys and Page Up/Down reach it (SC 2.1.1), matching\n `VirtualList` and `Chat`. */}\n <main ref={setContentRef} tabIndex={0} className=\"eidos-pagelayout__content\">\n {header && (\n <Header\n {...header}\n className={['eidos-pagelayout__header', header.className].filter(Boolean).join(' ')}\n />\n )}\n <div className=\"eidos-pagelayout__body\">{children}</div>\n <Footer\n {...(footer ?? defaultFooter)}\n className={['eidos-pagelayout__footer', footer?.className].filter(Boolean).join(' ')}\n />\n </main>\n </div>\n );\n};\n"]}
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Popover
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ZJWQPZ7E.js";
|
|
4
4
|
import {
|
|
5
5
|
Avatar
|
|
6
6
|
} from "./chunk-XJBWFDDE.js";
|
|
7
7
|
import {
|
|
8
8
|
Button
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-JY77VJAZ.js";
|
|
10
10
|
import {
|
|
11
11
|
devWarn,
|
|
12
12
|
renderIcon
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-U34INRFO.js";
|
|
14
14
|
|
|
15
15
|
// src/components/Header/Header.component.tsx
|
|
16
16
|
import { useCallback, useEffect, useLayoutEffect, useRef, useState } from "react";
|
|
17
|
+
import { Ellipsis } from "lucide-react";
|
|
17
18
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
18
19
|
var Header = ({
|
|
19
20
|
title,
|
|
@@ -21,6 +22,7 @@ var Header = ({
|
|
|
21
22
|
media,
|
|
22
23
|
meta,
|
|
23
24
|
variant = "default",
|
|
25
|
+
titleAs: TitleElement = "h1",
|
|
24
26
|
actions,
|
|
25
27
|
collapseActionsBelow = 640,
|
|
26
28
|
actionsVisibleWhenCollapsed = 1,
|
|
@@ -67,7 +69,7 @@ var Header = ({
|
|
|
67
69
|
return /* @__PURE__ */ jsx(Button, { ...action, size: "md", onClick: handleClick }, index);
|
|
68
70
|
};
|
|
69
71
|
const titles = /* @__PURE__ */ jsxs("div", { className: "eidos-header__titles", children: [
|
|
70
|
-
/* @__PURE__ */ jsx(
|
|
72
|
+
/* @__PURE__ */ jsx(TitleElement, { className: "eidos-header__title", children: title }),
|
|
71
73
|
subtitle && /* @__PURE__ */ jsx("span", { className: "eidos-header__subtitle", children: subtitle }),
|
|
72
74
|
!!meta?.length && /* @__PURE__ */ jsx("div", { className: "eidos-header__meta", children: meta.map((item, index) => /* @__PURE__ */ jsxs("span", { className: "eidos-header__meta-item", children: [
|
|
73
75
|
item.icon && renderIcon(item.icon, "eidos-header__meta-icon"),
|
|
@@ -84,7 +86,7 @@ var Header = ({
|
|
|
84
86
|
overflowActions.length > 0 && /* @__PURE__ */ jsx(
|
|
85
87
|
Popover,
|
|
86
88
|
{
|
|
87
|
-
|
|
89
|
+
open: overflowOpen,
|
|
88
90
|
onOpenChange: setOverflowOpen,
|
|
89
91
|
placement: "bottom",
|
|
90
92
|
maxWidth: 260,
|
|
@@ -95,7 +97,7 @@ var Header = ({
|
|
|
95
97
|
/* @__PURE__ */ jsx(
|
|
96
98
|
Button,
|
|
97
99
|
{
|
|
98
|
-
icon:
|
|
100
|
+
icon: Ellipsis,
|
|
99
101
|
size: "md",
|
|
100
102
|
variant: "outlined",
|
|
101
103
|
color: "secondary",
|
|
@@ -142,4 +144,4 @@ export {
|
|
|
142
144
|
Header,
|
|
143
145
|
IdentityHeader
|
|
144
146
|
};
|
|
145
|
-
//# sourceMappingURL=chunk-
|
|
147
|
+
//# sourceMappingURL=chunk-RHWZX7PB.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/Header/Header.component.tsx","../src/components/Header/IdentityHeader.component.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react';\nimport type { HeaderActionProps, HeaderProps } from './Header.types';\nimport './Header.scss';\nimport { Button } from '../Button';\nimport { Popover } from '../Popover';\nimport { renderIcon } from '../../utils';\nimport { Ellipsis } from 'lucide-react';\n\nexport const Header: React.FC<HeaderProps> = ({\n title,\n subtitle,\n media,\n meta,\n variant = 'default',\n titleAs: TitleElement = 'h1',\n actions,\n collapseActionsBelow = 640,\n actionsVisibleWhenCollapsed = 1,\n className = '',\n}) => {\n const classes = ['eidos-header', `eidos-header--${variant}`, className].filter(Boolean).join(' ');\n\n const rootRef = useRef<HTMLDivElement>(null);\n const [isNarrow, setIsNarrow] = useState(false);\n const [overflowOpen, setOverflowOpen] = useState(false);\n\n // Measures the header's own box rather than the viewport, so the collapse\n // point matches the container queries in Header.scss - a viewport query\n // would disagree with them by the width of PageLayout's navigation rail,\n // which is itself collapsible. The 1px hero border makes this border-box\n // reading differ from the container query's content-box one by 2px; that is\n // far below any threshold worth caring about, and using one measurement for\n // both the initial pass and the observer keeps it to a single code path.\n const measure = useCallback(() => {\n const element = rootRef.current;\n if (!element) return;\n setIsNarrow(element.getBoundingClientRect().width <= collapseActionsBelow);\n }, [collapseActionsBelow]);\n\n // `useLayoutEffect` for the first measurement specifically: ResizeObserver\n // delivers its initial callback asynchronously, so relying on it alone\n // would paint the full action row for a frame before collapsing it. Reading\n // the box synchronously here collapses before paint instead. Nothing runs\n // during SSR, so the server renders the uncollapsed row and hydration\n // matches - the same client-only posture Navigation's `collapseBelow` has.\n useLayoutEffect(() => {\n if (!collapseActionsBelow) {\n setIsNarrow(false);\n return;\n }\n\n measure();\n\n const element = rootRef.current;\n if (!element || typeof ResizeObserver === 'undefined') return;\n\n const observer = new ResizeObserver(measure);\n observer.observe(element);\n return () => observer.disconnect();\n }, [collapseActionsBelow, measure]);\n\n const allActions = actions ?? [];\n const keptCount = Math.max(0, actionsVisibleWhenCollapsed);\n const isCollapsed = isNarrow && !!collapseActionsBelow && allActions.length > keptCount;\n\n // The *last* actions stay inline: a primary call to action is conventionally\n // rightmost, which is also how Header's own stories order them.\n const overflowActions = isCollapsed ? allActions.slice(0, allActions.length - keptCount) : [];\n const inlineActions = isCollapsed ? allActions.slice(allActions.length - keptCount) : allActions;\n\n // A portalled popover would otherwise stay on screen after the header grows\n // back past the threshold and its trigger stops being rendered.\n useEffect(() => {\n if (!isCollapsed && overflowOpen) setOverflowOpen(false);\n }, [isCollapsed, overflowOpen]);\n\n const renderOverflowAction = (action: HeaderActionProps, index: number) => {\n // Typed on `HTMLElement` so it satisfies both the button and the link\n // form's handler; the action's own handler is one or the other, and is\n // only ever called with the element it was attached to.\n const handleClick = (event: React.MouseEvent<HTMLElement>) => {\n (action.onClick as React.MouseEventHandler<HTMLElement> | undefined)?.(event);\n setOverflowOpen(false);\n };\n\n // An icon-only action has no visible label, which is fine in a horizontal\n // row of small buttons and useless in a vertical list. Its tooltip is\n // already the label, so promote it rather than showing a bare glyph.\n if (action.icon && !action.children && action.tooltip) {\n const { icon, tooltip, ...rest } = action;\n return (\n <Button key={index} {...rest} size=\"md\" preIcon={icon} onClick={handleClick}>\n {tooltip}\n </Button>\n );\n }\n\n return <Button key={index} {...action} size=\"md\" onClick={handleClick} />;\n };\n\n const titles = (\n <div className=\"eidos-header__titles\">\n <TitleElement className=\"eidos-header__title\">{title}</TitleElement>\n {subtitle && <span className=\"eidos-header__subtitle\">{subtitle}</span>}\n {!!meta?.length && (\n <div className=\"eidos-header__meta\">\n {meta.map((item, index) => (\n <span key={index} className=\"eidos-header__meta-item\">\n {item.icon && renderIcon(item.icon, 'eidos-header__meta-icon')}\n {item.label && <span className=\"eidos-header__meta-label\">{item.label}</span>}\n <span className=\"eidos-header__meta-value\">{item.value}</span>\n </span>\n ))}\n </div>\n )}\n </div>\n );\n\n return (\n <div className={classes} ref={rootRef}>\n <div className=\"eidos-header__content\">\n {/* The `__lead` wrapper only exists when there is media to group with\n the titles. Media and titles need a tighter gap than titles and\n actions do, and a flex container has a single gap - but rendering\n the wrapper unconditionally would change the markup for every\n existing consumer, and the `eidos-*` class names are documented as\n targetable. */}\n {media ? (\n <div className=\"eidos-header__lead\">\n <div className=\"eidos-header__media\">{media}</div>\n {titles}\n </div>\n ) : (\n titles\n )}\n <div className=\"eidos-header__actions\">\n {overflowActions.length > 0 && (\n <Popover\n open={overflowOpen}\n onOpenChange={setOverflowOpen}\n placement=\"bottom\"\n maxWidth={260}\n // Popover puts `className` on its trigger wrapper, which is the\n // element that actually becomes a flex item of `__actions`.\n className=\"eidos-header__overflow-trigger\"\n trigger={\n // No `aria-haspopup`/`aria-expanded` here: Popover already\n // sets both on the wrapper it renders around this button.\n <Button\n icon={Ellipsis}\n size=\"md\"\n variant=\"outlined\"\n color=\"secondary\"\n aria-label={`${overflowActions.length} more actions`}\n />\n }\n >\n <div className=\"eidos-header__overflow-actions\">\n {overflowActions.map(renderOverflowAction)}\n </div>\n </Popover>\n )}\n {inlineActions.map((action, index) => (\n <Button key={index} size=\"md\" {...action} />\n ))}\n </div>\n </div>\n </div>\n );\n};\n","import React from 'react';\nimport type { IdentityHeaderProps } from './IdentityHeader.types';\nimport { Header } from './Header.component';\nimport { Avatar } from '../Avatar';\nimport { devWarn } from '../../utils';\n\n/**\n * `Header` preconfigured for the \"this page is about one person or entity\"\n * shape - an avatar beside the name, supporting facts below it, actions on\n * the end - which account and profile pages share. Settings-style pages want\n * a plain `Header` instead; they have no identity to lead with.\n *\n * Deliberately thin: it pins `variant=\"hero\"`, types the avatar so consumers\n * don't have to import `Avatar` to fill the slot, and gives the shape a name\n * worth discovering. Everything else is `Header`.\n */\nexport const IdentityHeader: React.FC<IdentityHeaderProps> = ({\n avatar,\n media,\n variant = 'hero',\n className = '',\n ...rest\n}) => {\n if (avatar && media) {\n devWarn(\n 'identity-header-avatar-and-media',\n 'IdentityHeader received both `avatar` and `media`. `media` takes precedence - drop `avatar` to silence this.',\n );\n }\n\n const resolvedMedia = media ?? (avatar ? <Avatar size=\"lg\" {...avatar} /> : undefined);\n\n return (\n <Header\n {...rest}\n variant={variant}\n media={resolvedMedia}\n className={['eidos-identity-header', className].filter(Boolean).join(' ')}\n />\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;AAAA,SAAgB,aAAa,WAAW,iBAAiB,QAAQ,gBAAgB;AAMjF,SAAS,gBAAgB;AAqFjB,cAgBI,YAhBJ;AAnFD,IAAM,SAAgC,CAAC;AAAA,EAC5C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV,SAAS,eAAe;AAAA,EACxB;AAAA,EACA,uBAAuB;AAAA,EACvB,8BAA8B;AAAA,EAC9B,YAAY;AACd,MAAM;AACJ,QAAM,UAAU,CAAC,gBAAgB,iBAAiB,OAAO,IAAI,SAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAEhG,QAAM,UAAU,OAAuB,IAAI;AAC3C,QAAM,CAAC,UAAU,WAAW,IAAI,SAAS,KAAK;AAC9C,QAAM,CAAC,cAAc,eAAe,IAAI,SAAS,KAAK;AAStD,QAAM,UAAU,YAAY,MAAM;AAChC,UAAM,UAAU,QAAQ;AACxB,QAAI,CAAC,QAAS;AACd,gBAAY,QAAQ,sBAAsB,E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AAA,EACA,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,GAAG;AACL,MAAM;AACJ,MAAI,UAAU,OAAO;AACnB;AAAA,MACE;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAEA,QAAM,gBAAgB,UAAU,SAAS,gBAAAA,KAAC,UAAO,MAAK,MAAM,GAAG,QAAQ,IAAK;AAE5E,SACE,gBAAAA;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ;AAAA,MACA,OAAO;AAAA,MACP,WAAW,CAAC,yBAAyB,SAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAAA;AAAA,EAC1E;AAEJ;","names":["jsx"]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Tooltip
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-MCPGI6EI.js";
|
|
4
4
|
import {
|
|
5
5
|
fullWidthModifier,
|
|
6
6
|
renderIcon
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-U34INRFO.js";
|
|
8
8
|
|
|
9
9
|
// src/components/Textarea/Textarea.component.tsx
|
|
10
10
|
import { forwardRef, useState, useId } from "react";
|
|
@@ -127,4 +127,4 @@ Textarea.displayName = "Textarea";
|
|
|
127
127
|
export {
|
|
128
128
|
Textarea
|
|
129
129
|
};
|
|
130
|
-
//# sourceMappingURL=chunk-
|
|
130
|
+
//# sourceMappingURL=chunk-S5CMZFX6.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
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 _chunk4HZIXRAJcjs = require('./chunk-4HZIXRAJ.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkVXC7Z7XBcjs = require('./chunk-VXC7Z7XB.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkENMDOQQOcjs = require('./chunk-ENMDOQQO.cjs');
|
|
10
10
|
|
|
11
11
|
// src/components/Combobox/Combobox.component.tsx
|
|
12
12
|
var _react = require('react');
|
|
@@ -364,7 +364,7 @@ var Combobox = ({
|
|
|
364
364
|
const posIconClick = hasClearableValue ? handleClearClick : handleChevronClick;
|
|
365
365
|
const containerClasses = [
|
|
366
366
|
"eidos-combobox",
|
|
367
|
-
fullWidth &&
|
|
367
|
+
fullWidth && _chunkENMDOQQOcjs.fullWidthModifier.call(void 0, "eidos-combobox"),
|
|
368
368
|
error && "eidos-combobox--error",
|
|
369
369
|
disabled && "eidos-combobox--disabled",
|
|
370
370
|
className
|
|
@@ -379,7 +379,7 @@ var Combobox = ({
|
|
|
379
379
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { ref: containerRef, className: containerClasses, children: [
|
|
380
380
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { ref: comboboxTriggerRef, className: "eidos-combobox-trigger", children: [
|
|
381
381
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
382
|
-
|
|
382
|
+
_chunk4HZIXRAJcjs.Input,
|
|
383
383
|
{
|
|
384
384
|
ref: inputRef,
|
|
385
385
|
value: inputValue,
|
|
@@ -408,7 +408,7 @@ var Combobox = ({
|
|
|
408
408
|
}
|
|
409
409
|
),
|
|
410
410
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
411
|
-
|
|
411
|
+
_chunkVXC7Z7XBcjs.Dropdown,
|
|
412
412
|
{
|
|
413
413
|
open: isOpen,
|
|
414
414
|
onOpenChange: setIsOpen,
|
|
@@ -445,4 +445,4 @@ Combobox.displayName = "Combobox";
|
|
|
445
445
|
|
|
446
446
|
|
|
447
447
|
exports.Combobox = Combobox;
|
|
448
|
-
//# sourceMappingURL=chunk-
|
|
448
|
+
//# sourceMappingURL=chunk-SLHIVEFW.cjs.map
|