@krizaka/ui 4.7.0 → 4.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 +1 -0
- package/dist/{RotatingWord-D3tpDLE4.d.ts → RotatingWord-CkDcPH9x.d.ts} +2 -2
- package/dist/account-menu.js +2 -2
- package/dist/account-menu.js.map +1 -1
- package/dist/account-settings.d.ts +9 -9
- package/dist/account-settings.js +4 -4
- package/dist/account-settings.js.map +1 -1
- package/dist/achievement.d.ts +3 -3
- package/dist/achievement.js +1 -1
- package/dist/achievement.js.map +1 -1
- package/dist/action-bar.d.ts +1 -1
- package/dist/action-bar.js +5 -5
- package/dist/action-bar.js.map +1 -1
- package/dist/activity-feed.d.ts +2 -2
- package/dist/activity-feed.js +1 -1
- package/dist/activity-feed.js.map +1 -1
- package/dist/alert.d.ts +1 -1
- package/dist/alert.js.map +1 -1
- package/dist/analysis-report.d.ts +1 -1
- package/dist/analysis-report.js +4 -4
- package/dist/analysis-report.js.map +1 -1
- package/dist/anatomy-plate.d.ts +1 -1
- package/dist/anatomy-plate.js +1 -1
- package/dist/anatomy-plate.js.map +1 -1
- package/dist/app-header/search.d.ts +1 -1
- package/dist/app-header/search.js +2 -2
- package/dist/app-header/search.js.map +1 -1
- package/dist/app-header.d.ts +2 -2
- package/dist/app-header.js.map +1 -1
- package/dist/app-shell.d.ts +8 -8
- package/dist/app-shell.js +4 -4
- package/dist/app-shell.js.map +1 -1
- package/dist/architecture-diagram.d.ts +1 -1
- package/dist/architecture-diagram.js.map +1 -1
- package/dist/argument-card.d.ts +2 -2
- package/dist/argument-card.js +6 -6
- package/dist/argument-card.js.map +1 -1
- package/dist/auth-layout.d.ts +1 -1
- package/dist/auth-layout.js.map +1 -1
- package/dist/avatar.d.ts +2 -2
- package/dist/avatar.js.map +1 -1
- package/dist/badge.d.ts +1 -1
- package/dist/badge.js +1 -1
- package/dist/bird-plate.d.ts +1 -1
- package/dist/bird-plate.js +2 -2
- package/dist/bird-plate.js.map +1 -1
- package/dist/button/text-link.d.ts +8 -0
- package/dist/button/text-link.js +6 -0
- package/dist/button/text-link.js.map +1 -0
- package/dist/button.d.ts +2 -2
- package/dist/button.js +3 -3
- package/dist/captcha.d.ts +2 -2
- package/dist/captcha.js +3 -3
- package/dist/captcha.js.map +1 -1
- package/dist/card-grid.d.ts +1 -1
- package/dist/card-grid.js +1 -1
- package/dist/card-grid.js.map +1 -1
- package/dist/card.d.ts +9 -9
- package/dist/card.js +1 -1
- package/dist/card.js.map +1 -1
- package/dist/catalogue-page.d.ts +2 -2
- package/dist/catalogue-page.js.map +1 -1
- package/dist/changelog-page.d.ts +1 -1
- package/dist/changelog-page.js +2 -2
- package/dist/changelog-page.js.map +1 -1
- package/dist/chapter.d.ts +3 -3
- package/dist/chapter.js +2 -2
- package/dist/chapter.js.map +1 -1
- package/dist/chat.d.ts +3 -3
- package/dist/chat.js +1 -1
- package/dist/chat.js.map +1 -1
- package/dist/checkbox.d.ts +1 -1
- package/dist/checkbox.js.map +1 -1
- package/dist/chip-link.d.ts +1 -1
- package/dist/chip-link.js +1 -1
- package/dist/chip-row.d.ts +2 -2
- package/dist/chip-row.js +1 -1
- package/dist/chip-row.js.map +1 -1
- package/dist/chip.d.ts +4 -5
- package/dist/chip.js +2 -2
- package/dist/choice-grid.d.ts +1 -1
- package/dist/choice-grid.js +2 -2
- package/dist/choice-grid.js.map +1 -1
- package/dist/{chunk-S6NYGOJT.js → chunk-22IORLB5.js} +1 -1
- package/dist/chunk-22IORLB5.js.map +1 -0
- package/dist/{chunk-QA3WETWT.js → chunk-2P7Y3LNN.js} +1 -1
- package/dist/chunk-2P7Y3LNN.js.map +1 -0
- package/dist/{chunk-OGWB76BR.js → chunk-3CEMOJBL.js} +2 -2
- package/dist/chunk-3CEMOJBL.js.map +1 -0
- package/dist/{chunk-WC3SO4CE.js → chunk-3SWWUJJL.js} +2 -2
- package/dist/chunk-3SWWUJJL.js.map +1 -0
- package/dist/{chunk-S2O4NSN5.js → chunk-3TCHVNNB.js} +1 -1
- package/dist/chunk-3TCHVNNB.js.map +1 -0
- package/dist/{chunk-7P7I5OQV.js → chunk-5KBYZLU4.js} +2 -2
- package/dist/chunk-5KBYZLU4.js.map +1 -0
- package/dist/{chunk-WKQ5CB3I.js → chunk-6ARAO3TR.js} +1 -1
- package/dist/{chunk-WKQ5CB3I.js.map → chunk-6ARAO3TR.js.map} +1 -1
- package/dist/{chunk-QHVV2JGF.js → chunk-6LF6IZZM.js} +2 -2
- package/dist/chunk-6LF6IZZM.js.map +1 -0
- package/dist/{chunk-HP7BDMVK.js → chunk-7B5Q76JR.js} +2 -2
- package/dist/chunk-7B5Q76JR.js.map +1 -0
- package/dist/{chunk-F2UZ2WWL.js → chunk-7KIIAOQH.js} +1 -1
- package/dist/{chunk-F2UZ2WWL.js.map → chunk-7KIIAOQH.js.map} +1 -1
- package/dist/{chunk-ADRUEPYC.js → chunk-7MA3UODW.js} +2 -2
- package/dist/{chunk-ADRUEPYC.js.map → chunk-7MA3UODW.js.map} +1 -1
- package/dist/{chunk-KH3JOEPY.js → chunk-7PVLEALV.js} +1 -1
- package/dist/chunk-7PVLEALV.js.map +1 -0
- package/dist/{chunk-QVHSV6RA.js → chunk-7UBLUGNW.js} +1 -1
- package/dist/chunk-7UBLUGNW.js.map +1 -0
- package/dist/{chunk-YTYNKMNS.js → chunk-BKMHN4UA.js} +5 -5
- package/dist/chunk-BKMHN4UA.js.map +1 -0
- package/dist/{chunk-4QH6CP2Y.js → chunk-BRYRZWLV.js} +1 -1
- package/dist/{chunk-4QH6CP2Y.js.map → chunk-BRYRZWLV.js.map} +1 -1
- package/dist/{chunk-43PTCDTL.js → chunk-BVN7JFOP.js} +1 -1
- package/dist/chunk-BVN7JFOP.js.map +1 -0
- package/dist/{chunk-5RWHDX5J.js → chunk-BYKA3FHX.js} +2 -2
- package/dist/chunk-BYKA3FHX.js.map +1 -0
- package/dist/{chunk-5PFCELGW.js → chunk-DIOAQOR5.js} +1 -1
- package/dist/chunk-DIOAQOR5.js.map +1 -0
- package/dist/{chunk-HJFRHYCI.js → chunk-DTGRZXYO.js} +2 -2
- package/dist/{chunk-P7AFIKWG.js → chunk-DVC4YQI2.js} +2 -2
- package/dist/chunk-DVC4YQI2.js.map +1 -0
- package/dist/{chunk-V5RO6JYI.js → chunk-E3LFHTUV.js} +2 -2
- package/dist/chunk-E3LFHTUV.js.map +1 -0
- package/dist/{chunk-WEVYKZIF.js → chunk-EAXIDRMB.js} +1 -1
- package/dist/chunk-EAXIDRMB.js.map +1 -0
- package/dist/{chunk-WU4VLSEA.js → chunk-EYMS6VRF.js} +1 -1
- package/dist/chunk-EYMS6VRF.js.map +1 -0
- package/dist/{chunk-LH5J3VLZ.js → chunk-F7EJZV53.js} +1 -1
- package/dist/chunk-F7EJZV53.js.map +1 -0
- package/dist/{chunk-VPO27AFS.js → chunk-G3L7AKZJ.js} +1 -1
- package/dist/chunk-G3L7AKZJ.js.map +1 -0
- package/dist/{chunk-EB45EVPJ.js → chunk-G5NROYGK.js} +3 -3
- package/dist/chunk-G5NROYGK.js.map +1 -0
- package/dist/{chunk-HKEAYSFS.js → chunk-GQMINKT3.js} +1 -1
- package/dist/{chunk-ENOS6ETI.js.map → chunk-GQMINKT3.js.map} +1 -1
- package/dist/{chunk-3X3OF4TI.js → chunk-H4NXYAL7.js} +1 -1
- package/dist/{chunk-3X3OF4TI.js.map → chunk-H4NXYAL7.js.map} +1 -1
- package/dist/{chunk-KR2W4ONJ.js → chunk-H7I6YLI6.js} +1 -1
- package/dist/chunk-H7I6YLI6.js.map +1 -0
- package/dist/{chunk-PJNR4NTS.js → chunk-HC2TY45B.js} +4 -4
- package/dist/{chunk-NSLXEDIS.js → chunk-HHBTM4AU.js} +1 -1
- package/dist/chunk-HHBTM4AU.js.map +1 -0
- package/dist/{chunk-XVRKKYWU.js → chunk-HVUR3UNK.js} +2 -2
- package/dist/{chunk-XVRKKYWU.js.map → chunk-HVUR3UNK.js.map} +1 -1
- package/dist/{chunk-V7W4RLRW.js → chunk-HWIDTLLO.js} +3 -3
- package/dist/chunk-HWIDTLLO.js.map +1 -0
- package/dist/{chunk-W675RFOA.js → chunk-ISC2QBXJ.js} +1 -1
- package/dist/chunk-ISC2QBXJ.js.map +1 -0
- package/dist/{chunk-7DYZTEE3.js → chunk-IWPB6SSW.js} +1 -1
- package/dist/chunk-IWPB6SSW.js.map +1 -0
- package/dist/{chunk-TVLRE7S3.js → chunk-JDVWUF5W.js} +2 -2
- package/dist/{chunk-TVLRE7S3.js.map → chunk-JDVWUF5W.js.map} +1 -1
- package/dist/{chunk-757ZTGU5.js → chunk-JE2NY4XE.js} +4 -4
- package/dist/chunk-JE2NY4XE.js.map +1 -0
- package/dist/{chunk-HLEBSAGC.js → chunk-KBSZ6JRF.js} +2 -2
- package/dist/chunk-KBSZ6JRF.js.map +1 -0
- package/dist/{chunk-Y3P5B4XS.js → chunk-KCU45KQ3.js} +3 -3
- package/dist/chunk-KCU45KQ3.js.map +1 -0
- package/dist/{chunk-ST5P5HNI.js → chunk-L4YBG5US.js} +4 -4
- package/dist/{chunk-ST5P5HNI.js.map → chunk-L4YBG5US.js.map} +1 -1
- package/dist/{chunk-NG6G6V5E.js → chunk-LFH3LEWR.js} +1 -1
- package/dist/chunk-LFH3LEWR.js.map +1 -0
- package/dist/{chunk-YATTFMDV.js → chunk-LSQQSJ6J.js} +2 -2
- package/dist/{chunk-YATTFMDV.js.map → chunk-LSQQSJ6J.js.map} +1 -1
- package/dist/{chunk-LNAAWT4Y.js → chunk-MJWOZ3JI.js} +1 -1
- package/dist/chunk-MJWOZ3JI.js.map +1 -0
- package/dist/{chunk-KID32IRJ.js → chunk-MXHJMTZ5.js} +1 -1
- package/dist/{chunk-KID32IRJ.js.map → chunk-MXHJMTZ5.js.map} +1 -1
- package/dist/{chunk-GHAN7OOE.js → chunk-N6LAWI4F.js} +2 -2
- package/dist/chunk-N6LAWI4F.js.map +1 -0
- package/dist/{chunk-5VZ37TY3.js → chunk-NFJWD5BT.js} +2 -2
- package/dist/chunk-NFJWD5BT.js.map +1 -0
- package/dist/{chunk-ZPOVOEO3.js → chunk-NJLIHGU4.js} +2 -2
- package/dist/chunk-NJLIHGU4.js.map +1 -0
- package/dist/{chunk-PRD7JRQX.js → chunk-ONCQWOTH.js} +4 -4
- package/dist/{chunk-PRD7JRQX.js.map → chunk-ONCQWOTH.js.map} +1 -1
- package/dist/{chunk-ENOS6ETI.js → chunk-OZC6CDZF.js} +1 -1
- package/dist/{chunk-HKEAYSFS.js.map → chunk-OZC6CDZF.js.map} +1 -1
- package/dist/{chunk-TXFX4PMN.js → chunk-OZY4C4W5.js} +1 -1
- package/dist/{chunk-TXFX4PMN.js.map → chunk-OZY4C4W5.js.map} +1 -1
- package/dist/{chunk-NPMGYLJV.js → chunk-PIRYDEX2.js} +3 -3
- package/dist/chunk-PIRYDEX2.js.map +1 -0
- package/dist/{chunk-C57KK5VB.js → chunk-PM23USOC.js} +1 -1
- package/dist/chunk-PM23USOC.js.map +1 -0
- package/dist/{chunk-PGBF3UBX.js → chunk-QKL5TECH.js} +1 -1
- package/dist/chunk-QKL5TECH.js.map +1 -0
- package/dist/{chunk-Z47KIPCT.js → chunk-QY5JEUJT.js} +1 -1
- package/dist/chunk-QY5JEUJT.js.map +1 -0
- package/dist/{chunk-FVGFPB73.js → chunk-RPVKF4RR.js} +1 -1
- package/dist/{chunk-FVGFPB73.js.map → chunk-RPVKF4RR.js.map} +1 -1
- package/dist/{chunk-NM2DEHFZ.js → chunk-RXYKJIC4.js} +1 -1
- package/dist/chunk-RXYKJIC4.js.map +1 -0
- package/dist/{chunk-W64RAX4N.js → chunk-TKYNYIJS.js} +5 -5
- package/dist/chunk-TKYNYIJS.js.map +1 -0
- package/dist/{chunk-S4TLZRGZ.js → chunk-UMXWOA3I.js} +1 -1
- package/dist/chunk-UMXWOA3I.js.map +1 -0
- package/dist/{chunk-VA4NPCUQ.js → chunk-VD7QFUAP.js} +3 -3
- package/dist/chunk-VD7QFUAP.js.map +1 -0
- package/dist/{chunk-MDSP7DJR.js → chunk-VQELCPQJ.js} +5 -5
- package/dist/chunk-VQELCPQJ.js.map +1 -0
- package/dist/{chunk-2FCQCWIK.js → chunk-VXNBXW3P.js} +5 -5
- package/dist/chunk-VXNBXW3P.js.map +1 -0
- package/dist/{chunk-B47WSPMP.js → chunk-WPUDPH2Q.js} +1 -1
- package/dist/chunk-WPUDPH2Q.js.map +1 -0
- package/dist/{chunk-SG2RKUVJ.js → chunk-WTZUMVJI.js} +5 -5
- package/dist/chunk-WTZUMVJI.js.map +1 -0
- package/dist/{chunk-EDQLPCM4.js → chunk-WVZF6WK3.js} +2 -2
- package/dist/chunk-WVZF6WK3.js.map +1 -0
- package/dist/{chunk-5D7NMUF6.js → chunk-XDAETKWM.js} +2 -2
- package/dist/chunk-XDAETKWM.js.map +1 -0
- package/dist/{chunk-QD6SNXF5.js → chunk-XDWSGNL4.js} +3 -3
- package/dist/chunk-XDWSGNL4.js.map +1 -0
- package/dist/{chunk-SB5WSVPI.js → chunk-ZFH2BYXW.js} +2 -2
- package/dist/chunk-ZFH2BYXW.js.map +1 -0
- package/dist/{chunk-XVLWVTQA.js → chunk-ZI7K742O.js} +1 -1
- package/dist/{chunk-XVLWVTQA.js.map → chunk-ZI7K742O.js.map} +1 -1
- package/dist/{chunk-NQENOT6L.js → chunk-ZRRWSKV3.js} +8 -8
- package/dist/chunk-ZRRWSKV3.js.map +1 -0
- package/dist/cn.js +1 -1
- package/dist/code-block.d.ts +2 -2
- package/dist/code-block.js +2 -2
- package/dist/code-block.js.map +1 -1
- package/dist/collection-switcher.d.ts +1 -1
- package/dist/collection-switcher.js +1 -1
- package/dist/collection-switcher.js.map +1 -1
- package/dist/columns.d.ts +2 -2
- package/dist/columns.js.map +1 -1
- package/dist/combobox.js +4 -4
- package/dist/command.d.ts +10 -10
- package/dist/command.js +4 -4
- package/dist/command.js.map +1 -1
- package/dist/comparison-table.d.ts +1 -1
- package/dist/comparison-table.js +1 -1
- package/dist/comparison-table.js.map +1 -1
- package/dist/component-page.d.ts +1 -1
- package/dist/component-page.js.map +1 -1
- package/dist/confirm-button.d.ts +1 -1
- package/dist/confirm-button.js +4 -4
- package/dist/contact-page.d.ts +1 -1
- package/dist/contact-page.js.map +1 -1
- package/dist/continue-prompt.d.ts +1 -1
- package/dist/continue-prompt.js +1 -1
- package/dist/continue-prompt.js.map +1 -1
- package/dist/copy-button.d.ts +1 -1
- package/dist/copy-button.js +4 -4
- package/dist/copy-button.js.map +1 -1
- package/dist/countdown.d.ts +1 -1
- package/dist/countdown.js.map +1 -1
- package/dist/cover-hero.d.ts +1 -1
- package/dist/cover-hero.js +5 -5
- package/dist/cover-hero.js.map +1 -1
- package/dist/cta-panel.d.ts +1 -1
- package/dist/cta-panel.js +1 -1
- package/dist/cta-panel.js.map +1 -1
- package/dist/dashboard-layout.d.ts +2 -2
- package/dist/dashboard-layout.js.map +1 -1
- package/dist/data-table.d.ts +5 -5
- package/dist/data-table.js +9 -9
- package/dist/date-picker.d.ts +11 -11
- package/dist/date-picker.js +5 -5
- package/dist/date-picker.js.map +1 -1
- package/dist/decision-list.d.ts +1 -1
- package/dist/decision-list.js +2 -2
- package/dist/decision-list.js.map +1 -1
- package/dist/description-list.d.ts +2 -2
- package/dist/description-list.js.map +1 -1
- package/dist/detail-layout.d.ts +5 -5
- package/dist/detail-layout.js +1 -1
- package/dist/detail-layout.js.map +1 -1
- package/dist/{dialog-DpUwec2g.d.ts → dialog-CFnxFGyn.d.ts} +7 -7
- package/dist/dialog.d.ts +2 -2
- package/dist/dialog.js +4 -4
- package/dist/dialog.js.map +1 -1
- package/dist/docs-article-page.d.ts +1 -1
- package/dist/docs-article-page.js.map +1 -1
- package/dist/docs-hub-page.d.ts +1 -1
- package/dist/docs-hub-page.js.map +1 -1
- package/dist/docs-layout.d.ts +1 -1
- package/dist/docs-layout.js +1 -1
- package/dist/docs-layout.js.map +1 -1
- package/dist/docs-nav.d.ts +1 -1
- package/dist/docs-nav.js +1 -1
- package/dist/docs-nav.js.map +1 -1
- package/dist/document-viewer.d.ts +2 -2
- package/dist/document-viewer.js +3 -3
- package/dist/document-viewer.js.map +1 -1
- package/dist/doodle.d.ts +1 -1
- package/dist/doodle.js +1 -1
- package/dist/doodle.js.map +1 -1
- package/dist/drop-overlay.d.ts +1 -1
- package/dist/drop-overlay.js +1 -1
- package/dist/drop-overlay.js.map +1 -1
- package/dist/dropdown-menu.d.ts +8 -8
- package/dist/dropdown-menu.js +2 -2
- package/dist/embed-facade.js +1 -1
- package/dist/empty-state.d.ts +1 -1
- package/dist/empty-state.js.map +1 -1
- package/dist/engine-flow.d.ts +1 -1
- package/dist/engine-flow.js +1 -1
- package/dist/engine-flow.js.map +1 -1
- package/dist/entity-header.d.ts +1 -1
- package/dist/entity-header.js +1 -1
- package/dist/entity-header.js.map +1 -1
- package/dist/environment-notice.d.ts +1 -1
- package/dist/environment-notice.js.map +1 -1
- package/dist/error-page.d.ts +1 -1
- package/dist/error-page.js +1 -1
- package/dist/error-page.js.map +1 -1
- package/dist/field.d.ts +3 -3
- package/dist/field.js +1 -1
- package/dist/field.js.map +1 -1
- package/dist/file-upload.d.ts +1 -1
- package/dist/file-upload.js +1 -1
- package/dist/file-upload.js.map +1 -1
- package/dist/filter-bar.d.ts +2 -2
- package/dist/filter-bar.js +4 -4
- package/dist/flock.d.ts +1 -1
- package/dist/flock.js +2 -2
- package/dist/flock.js.map +1 -1
- package/dist/footnote.d.ts +3 -3
- package/dist/footnote.js +1 -1
- package/dist/footnote.js.map +1 -1
- package/dist/force-update-screen.d.ts +1 -1
- package/dist/force-update-screen.js +3 -3
- package/dist/force-update-screen.js.map +1 -1
- package/dist/form/server.js.map +1 -1
- package/dist/form.d.ts +12 -12
- package/dist/form.js +4 -4
- package/dist/form.js.map +1 -1
- package/dist/{frame-CmDztC_y.d.ts → frame-D5HU_cG8.d.ts} +2 -2
- package/dist/gallery-page.d.ts +1 -1
- package/dist/gallery-page.js +1 -1
- package/dist/gallery-page.js.map +1 -1
- package/dist/genui.d.ts +2 -2
- package/dist/genui.js +9 -9
- package/dist/genui.js.map +1 -1
- package/dist/glossary-term.js +2 -2
- package/dist/glow-card.d.ts +1 -1
- package/dist/glow-card.js +1 -1
- package/dist/glow-card.js.map +1 -1
- package/dist/goal-gauge.d.ts +1 -1
- package/dist/goal-gauge.js +1 -1
- package/dist/goal-gauge.js.map +1 -1
- package/dist/grade-stamp.d.ts +1 -1
- package/dist/grade-stamp.js +2 -2
- package/dist/grade-stamp.js.map +1 -1
- package/dist/identity-card.d.ts +1 -1
- package/dist/identity-card.js +5 -5
- package/dist/identity-card.js.map +1 -1
- package/dist/image-cropper.d.ts +1 -1
- package/dist/image-cropper.js +3 -3
- package/dist/image-cropper.js.map +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/kanban.d.ts +1 -1
- package/dist/kanban.js.map +1 -1
- package/dist/kbd.d.ts +1 -1
- package/dist/kbd.js.map +1 -1
- package/dist/kind-config-editor.js +8 -8
- package/dist/kind-config-editor.js.map +1 -1
- package/dist/kpi-explained.js +1 -1
- package/dist/kpi-explained.js.map +1 -1
- package/dist/landing-page.d.ts +1 -1
- package/dist/landing-page.js.map +1 -1
- package/dist/landscape.d.ts +1 -1
- package/dist/landscape.js +2 -2
- package/dist/landscape.js.map +1 -1
- package/dist/language-switch.d.ts +10 -10
- package/dist/language-switch.js +1 -1
- package/dist/legal-page.d.ts +1 -1
- package/dist/legal-page.js.map +1 -1
- package/dist/{lightbox-MRB2YZEP.js → lightbox-JLWASIJC.js} +4 -4
- package/dist/link-card.d.ts +1 -1
- package/dist/link-card.js +4 -4
- package/dist/list.d.ts +1 -1
- package/dist/list.js +2 -2
- package/dist/list.js.map +1 -1
- package/dist/loader.d.ts +2 -2
- package/dist/loader.js +1 -1
- package/dist/loader.js.map +1 -1
- package/dist/longform-page.d.ts +1 -1
- package/dist/longform-page.js +1 -1
- package/dist/longform-page.js.map +1 -1
- package/dist/maintenance-screen.d.ts +1 -1
- package/dist/maintenance-screen.js +3 -3
- package/dist/maintenance-screen.js.map +1 -1
- package/dist/map/cards.d.ts +2 -2
- package/dist/map/cards.js +1 -1
- package/dist/map/cards.js.map +1 -1
- package/dist/map/pin.js +1 -1
- package/dist/map/sheet.d.ts +1 -1
- package/dist/map/sheet.js +1 -1
- package/dist/map/sheet.js.map +1 -1
- package/dist/map.d.ts +11 -11
- package/dist/map.js +4 -4
- package/dist/map.js.map +1 -1
- package/dist/margin-layout.d.ts +2 -2
- package/dist/margin-layout.js.map +1 -1
- package/dist/markdown.d.ts +1 -1
- package/dist/markdown.js.map +1 -1
- package/dist/marketing-layout.d.ts +1 -1
- package/dist/marketing-layout.js.map +1 -1
- package/dist/mascot-quote.d.ts +1 -1
- package/dist/mascot-quote.js +2 -2
- package/dist/mascot-quote.js.map +1 -1
- package/dist/mascot-state.d.ts +5 -5
- package/dist/mascot-state.js +1 -1
- package/dist/mascot-state.js.map +1 -1
- package/dist/mascots.d.ts +2 -2
- package/dist/mascots.js +2 -2
- package/dist/mascots.js.map +1 -1
- package/dist/match-dialog.d.ts +1 -1
- package/dist/match-dialog.js +4 -4
- package/dist/match-dialog.js.map +1 -1
- package/dist/media-capture.d.ts +1 -1
- package/dist/media-capture.js +1 -1
- package/dist/media-capture.js.map +1 -1
- package/dist/media-carousel.js +5 -5
- package/dist/media-carousel.js.map +1 -1
- package/dist/media-gallery.d.ts +1 -1
- package/dist/media-gallery.js +1 -1
- package/dist/media-gallery.js.map +1 -1
- package/dist/media-player.d.ts +1 -1
- package/dist/media-player.js +4 -4
- package/dist/meter.d.ts +2 -2
- package/dist/meter.js +1 -1
- package/dist/money-input.d.ts +1 -1
- package/dist/money-input.js +3 -3
- package/dist/motion.d.ts +1 -1
- package/dist/motion.js +1 -1
- package/dist/native/form.d.ts +12 -12
- package/dist/native/form.js +4 -4
- package/dist/native/form.js.map +1 -1
- package/dist/native/list.d.ts +1 -1
- package/dist/native/list.js.map +1 -1
- package/dist/native/map.d.ts +4 -4
- package/dist/native/map.js +2 -2
- package/dist/native/map.js.map +1 -1
- package/dist/native/markdown.js.map +1 -1
- package/dist/native/media-capture.d.ts +1 -1
- package/dist/native/media-capture.js.map +1 -1
- package/dist/native/media-picker.d.ts +1 -1
- package/dist/native/media-picker.js.map +1 -1
- package/dist/native/vertical-video.d.ts +2 -2
- package/dist/native/vertical-video.js.map +1 -1
- package/dist/native/video-player.d.ts +1 -1
- package/dist/native/video-player.js.map +1 -1
- package/dist/native.d.ts +95 -95
- package/dist/native.js +13 -13
- package/dist/native.js.map +1 -1
- package/dist/nav-bar.d.ts +13 -13
- package/dist/nav-bar.js +5 -5
- package/dist/nav-bar.js.map +1 -1
- package/dist/notification-preferences.js +3 -3
- package/dist/number-ticker.d.ts +1 -1
- package/dist/number-ticker.js +1 -1
- package/dist/number-ticker.js.map +1 -1
- package/dist/opening-hours.d.ts +1 -1
- package/dist/opening-hours.js +1 -1
- package/dist/opening-hours.js.map +1 -1
- package/dist/{page-DPHDmDAQ.d.ts → page-Ufnb5TrQ.d.ts} +5 -5
- package/dist/page-header.d.ts +1 -1
- package/dist/page-header.js.map +1 -1
- package/dist/page-hero.d.ts +1 -1
- package/dist/page-hero.js +5 -5
- package/dist/page-hero.js.map +1 -1
- package/dist/page-index.d.ts +1 -1
- package/dist/page-index.js +2 -2
- package/dist/page-index.js.map +1 -1
- package/dist/page.d.ts +1 -1
- package/dist/page.js +3 -3
- package/dist/pagination.d.ts +1 -1
- package/dist/pagination.js +1 -1
- package/dist/pagination.js.map +1 -1
- package/dist/pausable-loop.js +2 -2
- package/dist/platform-bar.d.ts +102 -0
- package/dist/platform-bar.js +42 -0
- package/dist/platform-bar.js.map +1 -0
- package/dist/{player-lightbox-BYQ57OXT.js → player-lightbox-SJR3GB7U.js} +5 -5
- package/dist/player-lightbox-SJR3GB7U.js.map +1 -0
- package/dist/pointer-light.d.ts +1 -1
- package/dist/pointer-light.js.map +1 -1
- package/dist/popover.d.ts +1 -1
- package/dist/popover.js +1 -1
- package/dist/popover.js.map +1 -1
- package/dist/price-catalogue-editor.js +8 -8
- package/dist/price-catalogue-editor.js.map +1 -1
- package/dist/pricing-page.d.ts +1 -1
- package/dist/pricing-page.js +1 -1
- package/dist/pricing-page.js.map +1 -1
- package/dist/product-page.d.ts +1 -1
- package/dist/product-page.js +1 -1
- package/dist/product-page.js.map +1 -1
- package/dist/profile-card.d.ts +3 -3
- package/dist/profile-card.js +1 -1
- package/dist/profile-card.js.map +1 -1
- package/dist/progress.d.ts +1 -1
- package/dist/progress.js.map +1 -1
- package/dist/promise-card.d.ts +1 -1
- package/dist/promise-card.js +1 -1
- package/dist/promise-card.js.map +1 -1
- package/dist/promo-code-field.js +4 -4
- package/dist/proposal.js +5 -5
- package/dist/qr-code.js +6 -6
- package/dist/qr-code.js.map +1 -1
- package/dist/quota-meter.d.ts +1 -1
- package/dist/quota-meter.js +1 -1
- package/dist/quota-meter.js.map +1 -1
- package/dist/radio-group.d.ts +5 -5
- package/dist/radio-group.js +3 -3
- package/dist/radio-group.js.map +1 -1
- package/dist/rail-nav.d.ts +4 -4
- package/dist/rail-nav.js +3 -3
- package/dist/rail-nav.js.map +1 -1
- package/dist/recipes.js +1 -1
- package/dist/recipes.js.map +1 -1
- package/dist/retro-tv-playlist.d.ts +1 -1
- package/dist/retro-tv-playlist.js.map +1 -1
- package/dist/retro-tv.js +6 -6
- package/dist/retro-tv.js.map +1 -1
- package/dist/reviews.js +3 -3
- package/dist/{schema-Dkn0uX72.d.ts → schema-Dd05m48Q.d.ts} +1 -1
- package/dist/schema-form.js +7 -7
- package/dist/schema-form.js.map +1 -1
- package/dist/scroll-stage.d.ts +2 -2
- package/dist/scroll-stage.js +2 -2
- package/dist/scroll-stage.js.map +1 -1
- package/dist/search-field.d.ts +1 -1
- package/dist/search-field.js +2 -2
- package/dist/section-backdrop.d.ts +1 -1
- package/dist/section-backdrop.js +1 -1
- package/dist/separator.d.ts +1 -1
- package/dist/separator.js.map +1 -1
- package/dist/service-card.d.ts +1 -1
- package/dist/service-card.js +6 -6
- package/dist/service-card.js.map +1 -1
- package/dist/settings-layout.d.ts +3 -3
- package/dist/settings-layout.js +2 -2
- package/dist/shop/booking.d.ts +1 -1
- package/dist/shop/booking.js +4 -4
- package/dist/shop/booking.js.map +1 -1
- package/dist/shop/bulletin.d.ts +1 -1
- package/dist/shop/bulletin.js +2 -2
- package/dist/shop/bulletin.js.map +1 -1
- package/dist/shop/faq.d.ts +1 -1
- package/dist/shop/faq.js +3 -3
- package/dist/shop/faq.js.map +1 -1
- package/dist/shop/gallery.d.ts +1 -1
- package/dist/shop/gallery.js +3 -3
- package/dist/shop/gallery.js.map +1 -1
- package/dist/shop/hero.d.ts +1 -1
- package/dist/shop/hero.js +2 -2
- package/dist/shop/hero.js.map +1 -1
- package/dist/shop/policies.d.ts +1 -1
- package/dist/shop/policies.js +2 -2
- package/dist/shop/policies.js.map +1 -1
- package/dist/shop/reviews.d.ts +1 -1
- package/dist/shop/reviews.js +2 -2
- package/dist/shop/reviews.js.map +1 -1
- package/dist/shop/services.d.ts +1 -1
- package/dist/shop/services.js +4 -4
- package/dist/shop/services.js.map +1 -1
- package/dist/shop/social.d.ts +1 -1
- package/dist/shop/social.js +2 -2
- package/dist/shop/social.js.map +1 -1
- package/dist/shop/story.d.ts +1 -1
- package/dist/shop/story.js +2 -2
- package/dist/shop/story.js.map +1 -1
- package/dist/shop/team.d.ts +1 -1
- package/dist/shop/team.js +2 -2
- package/dist/shop/team.js.map +1 -1
- package/dist/shop/video.d.ts +1 -1
- package/dist/shop/video.js +2 -2
- package/dist/shop/video.js.map +1 -1
- package/dist/shop/visit.d.ts +1 -1
- package/dist/shop/visit.js +2 -2
- package/dist/shop/visit.js.map +1 -1
- package/dist/shop-composer.js +2 -2
- package/dist/shop-composer.js.map +1 -1
- package/dist/shop-gallery.d.ts +1 -1
- package/dist/shop-gallery.js +2 -2
- package/dist/shop-gallery.js.map +1 -1
- package/dist/shop.d.ts +3 -3
- package/dist/shop.js +2 -2
- package/dist/showcase.d.ts +1 -1
- package/dist/showcase.js +6 -6
- package/dist/showcase.js.map +1 -1
- package/dist/signature.d.ts +1 -1
- package/dist/signature.js +2 -2
- package/dist/signature.js.map +1 -1
- package/dist/site-cahier.d.ts +8 -5
- package/dist/site-cahier.js +24 -10
- package/dist/site-cahier.js.map +1 -1
- package/dist/site-footer.d.ts +21 -6
- package/dist/site-footer.js +15 -1
- package/dist/site-footer.js.map +1 -1
- package/dist/skeleton.d.ts +3 -3
- package/dist/skeleton.js.map +1 -1
- package/dist/skip-link.d.ts +1 -1
- package/dist/skip-link.js +1 -1
- package/dist/slider.d.ts +1 -1
- package/dist/slider.js +2 -2
- package/dist/slider.js.map +1 -1
- package/dist/slot-picker.d.ts +1 -1
- package/dist/slot-picker.js +1 -1
- package/dist/slot-picker.js.map +1 -1
- package/dist/specimen-tag.d.ts +2 -2
- package/dist/specimen-tag.js +2 -2
- package/dist/speed-lines.d.ts +1 -1
- package/dist/speed-lines.js +1 -1
- package/dist/speed-lines.js.map +1 -1
- package/dist/spinner.d.ts +2 -2
- package/dist/spinner.js +1 -1
- package/dist/spinner.js.map +1 -1
- package/dist/split-view.d.ts +1 -1
- package/dist/split-view.js.map +1 -1
- package/dist/stage-banner.d.ts +1 -1
- package/dist/stage-banner.js +1 -1
- package/dist/stage-banner.js.map +1 -1
- package/dist/stat.d.ts +2 -2
- package/dist/stat.js +1 -1
- package/dist/status-chip.js +4 -4
- package/dist/status-chip.js.map +1 -1
- package/dist/status-page.d.ts +1 -1
- package/dist/status-page.js.map +1 -1
- package/dist/step-progress.d.ts +1 -1
- package/dist/step-progress.js.map +1 -1
- package/dist/step-showcase.d.ts +2 -2
- package/dist/step-showcase.js +3 -3
- package/dist/step-showcase.js.map +1 -1
- package/dist/stepper.d.ts +1 -1
- package/dist/stepper.js +1 -1
- package/dist/stepper.js.map +1 -1
- package/dist/sticky-action.d.ts +1 -1
- package/dist/sticky-action.js.map +1 -1
- package/dist/stuck.d.ts +1 -1
- package/dist/stuck.js +1 -1
- package/dist/stuck.js.map +1 -1
- package/dist/swipe-deck.d.ts +2 -2
- package/dist/swipe-deck.js.map +1 -1
- package/dist/switch.d.ts +1 -1
- package/dist/switch.js +1 -1
- package/dist/tabs.d.ts +6 -6
- package/dist/tabs.js +1 -1
- package/dist/tabs.js.map +1 -1
- package/dist/tag-input.d.ts +1 -1
- package/dist/tag-input.js +4 -4
- package/dist/tag-input.js.map +1 -1
- package/dist/tag-selector.d.ts +1 -1
- package/dist/tag-selector.js +3 -3
- package/dist/tag-selector.js.map +1 -1
- package/dist/taped-photo.d.ts +1 -1
- package/dist/taped-photo.js +2 -2
- package/dist/terminal-replay.d.ts +1 -1
- package/dist/terminal-replay.js +3 -3
- package/dist/terminal-replay.js.map +1 -1
- package/dist/text-style/server.d.ts +1 -1
- package/dist/text-style/server.js.map +1 -1
- package/dist/text-style.d.ts +2 -2
- package/dist/text-style.js.map +1 -1
- package/dist/theme.d.ts +3 -3
- package/dist/theme.js +3 -3
- package/dist/theme.js.map +1 -1
- package/dist/toast.d.ts +1 -1
- package/dist/toast.js +2 -2
- package/dist/toast.js.map +1 -1
- package/dist/toc.d.ts +2 -2
- package/dist/toc.js +1 -1
- package/dist/toc.js.map +1 -1
- package/dist/tooltip.d.ts +1 -1
- package/dist/tooltip.js +2 -2
- package/dist/tree-view.d.ts +1 -1
- package/dist/tree-view.js +2 -2
- package/dist/tree-view.js.map +1 -1
- package/dist/update-prompt.d.ts +1 -1
- package/dist/update-prompt.js +3 -3
- package/dist/update-prompt.js.map +1 -1
- package/dist/upload-queue.d.ts +2 -2
- package/dist/upload-queue.js +1 -1
- package/dist/upload-queue.js.map +1 -1
- package/dist/usage.d.ts +4 -4
- package/dist/usage.js +3 -3
- package/dist/usage.js.map +1 -1
- package/dist/verified-badge.d.ts +1 -1
- package/dist/verified-badge.js.map +1 -1
- package/dist/versus-card.d.ts +1 -1
- package/dist/versus-card.js +2 -2
- package/dist/versus-card.js.map +1 -1
- package/dist/vertical-video.d.ts +2 -2
- package/dist/vertical-video.js +6 -6
- package/dist/vertical-video.js.map +1 -1
- package/dist/video-player.d.ts +1 -1
- package/dist/video-player.js +5 -5
- package/dist/video-trimmer.d.ts +1 -1
- package/dist/video-trimmer.js.map +1 -1
- package/dist/virtual.d.ts +2 -2
- package/dist/virtual.js +1 -1
- package/dist/wall.js +2 -2
- package/dist/wall.js.map +1 -1
- package/dist/waveform.d.ts +1 -1
- package/dist/waveform.js.map +1 -1
- package/package.json +28 -8
- package/registry/account-menu.json +1 -1
- package/registry/account-settings.json +18 -18
- package/registry/achievement.json +2 -2
- package/registry/action-bar.json +4 -4
- package/registry/activity-feed.json +3 -3
- package/registry/agenda.json +1 -1
- package/registry/alert.json +2 -2
- package/registry/analysis-report.json +2 -2
- package/registry/anatomy-plate.json +2 -2
- package/registry/app-frame.json +7 -7
- package/registry/app-header.json +5 -5
- package/registry/app-shell.json +3 -3
- package/registry/architecture-diagram.json +2 -2
- package/registry/argument-card.json +4 -4
- package/registry/auth-layout.json +2 -2
- package/registry/avatar.json +4 -4
- package/registry/badge.json +2 -2
- package/registry/bird-plate.json +2 -2
- package/registry/button.json +6 -2
- package/registry/captcha.json +2 -2
- package/registry/card-grid.json +2 -2
- package/registry/card.json +2 -2
- package/registry/catalogue-page.json +2 -2
- package/registry/changelog-page.json +3 -3
- package/registry/chapter.json +3 -3
- package/registry/chat.json +2 -2
- package/registry/checkbox.json +2 -2
- package/registry/chip-link.json +2 -2
- package/registry/chip-row.json +2 -2
- package/registry/chip.json +3 -3
- package/registry/choice-grid.json +3 -3
- package/registry/cn.json +1 -1
- package/registry/code-block.json +3 -3
- package/registry/collection-switcher.json +3 -3
- package/registry/columns.json +2 -2
- package/registry/combobox.json +3 -3
- package/registry/command.json +2 -2
- package/registry/comparison-table.json +2 -2
- package/registry/component-page.json +2 -2
- package/registry/confirm-button.json +2 -2
- package/registry/contact-page.json +2 -2
- package/registry/continue-prompt.json +2 -2
- package/registry/copy-button.json +3 -3
- package/registry/countdown.json +2 -2
- package/registry/cover-hero.json +4 -4
- package/registry/cta-panel.json +2 -2
- package/registry/dashboard-layout.json +3 -3
- package/registry/data-table.json +5 -5
- package/registry/date-picker.json +9 -9
- package/registry/decision-list.json +3 -3
- package/registry/description-list.json +2 -2
- package/registry/desktop-window.json +1 -1
- package/registry/detail-layout.json +2 -2
- package/registry/dialog.json +3 -3
- package/registry/docs-article-page.json +2 -2
- package/registry/docs-hub-page.json +2 -2
- package/registry/docs-layout.json +3 -3
- package/registry/docs-nav.json +2 -2
- package/registry/document-viewer.json +3 -3
- package/registry/doodle.json +2 -2
- package/registry/drop-overlay.json +2 -2
- package/registry/dropdown-menu.json +2 -2
- package/registry/elephant.json +1 -1
- package/registry/embed-facade.json +1 -1
- package/registry/empty-state.json +2 -2
- package/registry/engine-flow.json +2 -2
- package/registry/entity-header.json +3 -3
- package/registry/environment-notice.json +2 -2
- package/registry/error-page.json +2 -2
- package/registry/examples/platform-bar/demo.d.ts +4 -0
- package/registry/examples/platform-bar/demo.js +24 -0
- package/registry/examples/platform-bar/demo.tsx +20 -0
- package/registry/examples/platform-bar/live.d.ts +4 -0
- package/registry/examples/platform-bar/live.js +22 -0
- package/registry/examples/platform-bar/live.tsx +22 -0
- package/registry/examples/site-footer/hosted.d.ts +4 -0
- package/registry/examples/site-footer/hosted.js +25 -0
- package/registry/examples/site-footer/hosted.tsx +23 -0
- package/registry/field.json +2 -2
- package/registry/file-upload.json +3 -3
- package/registry/filter-bar.json +5 -5
- package/registry/flock.json +2 -2
- package/registry/footnote.json +2 -2
- package/registry/force-update-screen.json +2 -2
- package/registry/form.json +65 -65
- package/registry/gallery-page.json +2 -2
- package/registry/genui.json +3 -3
- package/registry/glossary-term.json +1 -1
- package/registry/glossary.json +1 -1
- package/registry/glow-card.json +2 -2
- package/registry/goal-gauge.json +2 -2
- package/registry/grade-stamp.json +2 -2
- package/registry/identity-card.json +2 -2
- package/registry/image-cropper.json +2 -2
- package/registry/index.json +40 -9
- package/registry/kanban.json +2 -2
- package/registry/kbd.json +2 -2
- package/registry/kind-config-editor.json +3 -3
- package/registry/kpi-explained.json +2 -2
- package/registry/landing-page.json +2 -2
- package/registry/landscape.json +2 -2
- package/registry/language-switch.json +2 -2
- package/registry/legal-page.json +2 -2
- package/registry/link-card.json +4 -4
- package/registry/list.json +3 -3
- package/registry/loader.json +2 -2
- package/registry/longform-page.json +2 -2
- package/registry/maintenance-screen.json +2 -2
- package/registry/map.json +8 -8
- package/registry/margin-layout.json +2 -2
- package/registry/markdown.json +2 -2
- package/registry/marketing-layout.json +2 -2
- package/registry/mascot-quote.json +2 -2
- package/registry/mascot-state.json +3 -3
- package/registry/mascots.json +4 -4
- package/registry/match-dialog.json +2 -2
- package/registry/media-capture.json +3 -3
- package/registry/media-gallery.json +5 -5
- package/registry/meter.json +2 -2
- package/registry/money-input.json +2 -2
- package/registry/nav-bar.json +9 -9
- package/registry/next-actions.json +1 -1
- package/registry/notification-preferences.json +1 -1
- package/registry/number-ticker.json +2 -2
- package/registry/opening-hours.json +3 -3
- package/registry/page-header.json +2 -2
- package/registry/page-hero.json +4 -4
- package/registry/page-index.json +3 -3
- package/registry/page.json +2 -2
- package/registry/pagination.json +3 -3
- package/registry/platform-bar.json +179 -0
- package/registry/pointer-light.json +2 -2
- package/registry/popover.json +2 -2
- package/registry/price-catalogue-editor.json +2 -2
- package/registry/pricing-page.json +3 -3
- package/registry/product-page.json +2 -2
- package/registry/profile-card.json +4 -4
- package/registry/progress.json +2 -2
- package/registry/promise-card.json +2 -2
- package/registry/promo-code-field.json +1 -1
- package/registry/proposal.json +1 -1
- package/registry/qr-code.json +3 -3
- package/registry/quota-meter.json +2 -2
- package/registry/radio-group.json +15 -15
- package/registry/rail-nav.json +9 -9
- package/registry/recipes.json +2 -2
- package/registry/retro-tv.json +4 -4
- package/registry/reviews.json +1 -1
- package/registry/router.json +1 -1
- package/registry/schema-form.json +2 -2
- package/registry/scroll-stage.json +2 -2
- package/registry/search-field.json +3 -3
- package/registry/section-backdrop.json +2 -2
- package/registry/separator.json +2 -2
- package/registry/service-card.json +4 -4
- package/registry/settings-layout.json +2 -2
- package/registry/shop-composer.json +4 -4
- package/registry/shop-gallery.json +2 -2
- package/registry/shop.json +18 -18
- package/registry/showcase.json +2 -2
- package/registry/signature.json +2 -2
- package/registry/site-cahier.json +3 -3
- package/registry/site-footer.json +57 -20
- package/registry/sites.json +1 -1
- package/registry/skeleton.json +2 -2
- package/registry/skip-link.json +2 -2
- package/registry/slider.json +2 -2
- package/registry/slot-picker.json +3 -3
- package/registry/slot.json +1 -1
- package/registry/specimen-tag.json +2 -2
- package/registry/speed-lines.json +2 -2
- package/registry/spinner.json +3 -3
- package/registry/split-view.json +2 -2
- package/registry/stage-banner.json +2 -2
- package/registry/stat.json +2 -2
- package/registry/status-chip.json +3 -3
- package/registry/status-page.json +2 -2
- package/registry/step-progress.json +2 -2
- package/registry/step-showcase.json +3 -3
- package/registry/stepper.json +2 -2
- package/registry/sticky-action.json +2 -2
- package/registry/stuck.json +2 -2
- package/registry/swipe-deck.json +2 -2
- package/registry/switch.json +2 -2
- package/registry/tabs.json +2 -2
- package/registry/tag-input.json +2 -2
- package/registry/tag-selector.json +2 -2
- package/registry/taped-photo.json +2 -2
- package/registry/terminal-replay.json +3 -3
- package/registry/text-style.json +9 -9
- package/registry/theme.json +2 -2
- package/registry/toast.json +2 -2
- package/registry/toc.json +2 -2
- package/registry/tooltip.json +2 -2
- package/registry/tree-view.json +3 -3
- package/registry/update-prompt.json +2 -2
- package/registry/upload-queue.json +2 -2
- package/registry/usage.json +3 -3
- package/registry/verified-badge.json +2 -2
- package/registry/versus-card.json +2 -2
- package/registry/vertical-video.json +3 -3
- package/registry/video-player.json +3 -3
- package/registry/video-trimmer.json +2 -2
- package/registry/virtual.json +4 -4
- package/registry/wall.json +2 -2
- package/registry/waveform.json +2 -2
- package/dist/chunk-2FCQCWIK.js.map +0 -1
- package/dist/chunk-43PTCDTL.js.map +0 -1
- package/dist/chunk-5D7NMUF6.js.map +0 -1
- package/dist/chunk-5PFCELGW.js.map +0 -1
- package/dist/chunk-5RWHDX5J.js.map +0 -1
- package/dist/chunk-5VZ37TY3.js.map +0 -1
- package/dist/chunk-757ZTGU5.js.map +0 -1
- package/dist/chunk-7DYZTEE3.js.map +0 -1
- package/dist/chunk-7P7I5OQV.js.map +0 -1
- package/dist/chunk-B47WSPMP.js.map +0 -1
- package/dist/chunk-C57KK5VB.js.map +0 -1
- package/dist/chunk-EB45EVPJ.js.map +0 -1
- package/dist/chunk-EDQLPCM4.js.map +0 -1
- package/dist/chunk-GHAN7OOE.js.map +0 -1
- package/dist/chunk-HLEBSAGC.js.map +0 -1
- package/dist/chunk-HP7BDMVK.js.map +0 -1
- package/dist/chunk-KH3JOEPY.js.map +0 -1
- package/dist/chunk-KR2W4ONJ.js.map +0 -1
- package/dist/chunk-LH5J3VLZ.js.map +0 -1
- package/dist/chunk-LNAAWT4Y.js.map +0 -1
- package/dist/chunk-MDSP7DJR.js.map +0 -1
- package/dist/chunk-NG6G6V5E.js.map +0 -1
- package/dist/chunk-NM2DEHFZ.js.map +0 -1
- package/dist/chunk-NPMGYLJV.js.map +0 -1
- package/dist/chunk-NQENOT6L.js.map +0 -1
- package/dist/chunk-NSLXEDIS.js.map +0 -1
- package/dist/chunk-OGWB76BR.js.map +0 -1
- package/dist/chunk-P7AFIKWG.js.map +0 -1
- package/dist/chunk-PGBF3UBX.js.map +0 -1
- package/dist/chunk-QA3WETWT.js.map +0 -1
- package/dist/chunk-QD6SNXF5.js.map +0 -1
- package/dist/chunk-QHVV2JGF.js.map +0 -1
- package/dist/chunk-QVHSV6RA.js.map +0 -1
- package/dist/chunk-S2O4NSN5.js.map +0 -1
- package/dist/chunk-S4TLZRGZ.js.map +0 -1
- package/dist/chunk-S6NYGOJT.js.map +0 -1
- package/dist/chunk-SB5WSVPI.js.map +0 -1
- package/dist/chunk-SG2RKUVJ.js.map +0 -1
- package/dist/chunk-V5RO6JYI.js.map +0 -1
- package/dist/chunk-V7W4RLRW.js.map +0 -1
- package/dist/chunk-VA4NPCUQ.js.map +0 -1
- package/dist/chunk-VPO27AFS.js.map +0 -1
- package/dist/chunk-W64RAX4N.js.map +0 -1
- package/dist/chunk-W675RFOA.js.map +0 -1
- package/dist/chunk-WC3SO4CE.js.map +0 -1
- package/dist/chunk-WEVYKZIF.js.map +0 -1
- package/dist/chunk-WU4VLSEA.js.map +0 -1
- package/dist/chunk-Y3P5B4XS.js.map +0 -1
- package/dist/chunk-YTYNKMNS.js.map +0 -1
- package/dist/chunk-Z47KIPCT.js.map +0 -1
- package/dist/chunk-ZPOVOEO3.js.map +0 -1
- package/dist/player-lightbox-BYQ57OXT.js.map +0 -1
- /package/dist/{chunk-HJFRHYCI.js.map → chunk-DTGRZXYO.js.map} +0 -0
- /package/dist/{chunk-PJNR4NTS.js.map → chunk-HC2TY45B.js.map} +0 -0
- /package/dist/{lightbox-MRB2YZEP.js.map → lightbox-JLWASIJC.js.map} +0 -0
package/dist/decision-list.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ type DecisionListProps = React.HTMLAttributes<HTMLOListElement> & {
|
|
|
29
29
|
reveal?: boolean;
|
|
30
30
|
};
|
|
31
31
|
/** Numbered decisions: chose, then refused · because · what it costs, side by side. */
|
|
32
|
-
declare function DecisionList({ decisions, labels, reveal, className, ...props }: DecisionListProps): React.JSX.Element;
|
|
32
|
+
declare function DecisionList({ decisions, labels, reveal, className, ...props }: Readonly<DecisionListProps>): React.JSX.Element;
|
|
33
33
|
|
|
34
34
|
export { DecisionList };
|
|
35
35
|
export type { Decision, DecisionListProps };
|
package/dist/decision-list.js
CHANGED
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
CheckGlyph,
|
|
4
4
|
CloseGlyph,
|
|
5
5
|
WarningGlyph
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-PM23USOC.js";
|
|
7
7
|
import {
|
|
8
8
|
cn
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ISC2QBXJ.js";
|
|
10
10
|
|
|
11
11
|
// src/decision-list/decision-list.tsx
|
|
12
12
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/decision-list/decision-list.tsx"],"sourcesContent":["// Server-safe. The decisions behind a product, numbered (blocks.css): what was chosen, large, first; then side by side\n// what was refused, why, and what it costs the reader — each with its mark (✓ ✕ → !) and its colour, so the eye\n// compares decisions at a glance. Every word arrives as a prop.\nimport type * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { ArrowGlyph, CheckGlyph, CloseGlyph, WarningGlyph } from \"../glyphs\";\n\nexport interface Decision {\n /** A stable key (the decision's id); the `chose` text otherwise. */\n id?: string;\n /** What was chosen. */\n chose: React.ReactNode;\n /** What was refused. */\n refused: React.ReactNode;\n /** Why. */\n because: React.ReactNode;\n /** What it costs the reader — said honestly. */\n cost: React.ReactNode;\n}\n\nexport type DecisionListProps = React.HTMLAttributes<HTMLOListElement> & {\n /** The decisions, in order. */\n decisions: readonly Decision[];\n /** The four labels: `{ chose: \"We chose\", refused: \"We refused\", because: \"Because\", cost: \"What it costs you\" }`. */\n labels: { chose: React.ReactNode; refused: React.ReactNode; because: React.ReactNode; cost: React.ReactNode };\n /**\n * Each decision rises once into place, staggered (`[data-reveal]`).\n * @default true\n */\n reveal?: boolean;\n};\n\nconst ICON = \"h-3.5 w-3.5\";\n\n/** Numbered decisions: chose, then refused · because · what it costs, side by side. */\nexport function DecisionList({ decisions, labels, reveal = true, className, ...props }: DecisionListProps) {\n return (\n <ol className={cn(\"kz-decisions\", className)} {...props}>\n {decisions.map((d, i) => (\n <li\n key={d.id ?? (typeof d.chose === \"string\" ? d.chose : i)}\n className=\"kz-decision\"\n data-reveal={reveal ? \"soft\" : undefined}\n style={reveal && i ? ({ \"--kz-delay\": `${Math.min(i, 5) * 70}ms` } as React.CSSProperties) : undefined}\n >\n <span className=\"kz-decision-n\" aria-hidden>\n {String(i + 1).padStart(2, \"0\")}\n </span>\n <div className=\"kz-decision-body\">\n <div className=\"kz-decision-part\" data-part=\"chose\">\n <p className=\"kz-label\">\n <CheckGlyph className={ICON} /> {labels.chose}\n </p>\n <p>{d.chose}</p>\n </div>\n <div className=\"kz-decision-grid\">\n <div className=\"kz-decision-part\" data-part=\"refused\">\n <p className=\"kz-label\">\n <CloseGlyph className={ICON} /> {labels.refused}\n </p>\n <p>{d.refused}</p>\n </div>\n <div className=\"kz-decision-part\" data-part=\"because\">\n <p className=\"kz-label\">\n <ArrowGlyph className={ICON} /> {labels.because}\n </p>\n <p>{d.because}</p>\n </div>\n <div className=\"kz-decision-part\" data-part=\"cost\">\n <p className=\"kz-label\">\n <WarningGlyph className={ICON} /> {labels.cost}\n </p>\n <p>{d.cost}</p>\n </div>\n </div>\n </div>\n </li>\n ))}\n </ol>\n );\n}\n"],"mappings":";;;;;;;;;;;AA8CU,cAKI,YALJ;AAbV,IAAM,OAAO;AAGN,SAAS,aAAa,EAAE,WAAW,QAAQ,SAAS,MAAM,WAAW,GAAG,MAAM,
|
|
1
|
+
{"version":3,"sources":["../src/decision-list/decision-list.tsx"],"sourcesContent":["// Server-safe. The decisions behind a product, numbered (blocks.css): what was chosen, large, first; then side by side\n// what was refused, why, and what it costs the reader — each with its mark (✓ ✕ → !) and its colour, so the eye\n// compares decisions at a glance. Every word arrives as a prop.\nimport type * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { ArrowGlyph, CheckGlyph, CloseGlyph, WarningGlyph } from \"../glyphs\";\n\nexport interface Decision {\n /** A stable key (the decision's id); the `chose` text otherwise. */\n id?: string;\n /** What was chosen. */\n chose: React.ReactNode;\n /** What was refused. */\n refused: React.ReactNode;\n /** Why. */\n because: React.ReactNode;\n /** What it costs the reader — said honestly. */\n cost: React.ReactNode;\n}\n\nexport type DecisionListProps = React.HTMLAttributes<HTMLOListElement> & {\n /** The decisions, in order. */\n decisions: readonly Decision[];\n /** The four labels: `{ chose: \"We chose\", refused: \"We refused\", because: \"Because\", cost: \"What it costs you\" }`. */\n labels: { chose: React.ReactNode; refused: React.ReactNode; because: React.ReactNode; cost: React.ReactNode };\n /**\n * Each decision rises once into place, staggered (`[data-reveal]`).\n * @default true\n */\n reveal?: boolean;\n};\n\nconst ICON = \"h-3.5 w-3.5\";\n\n/** Numbered decisions: chose, then refused · because · what it costs, side by side. */\nexport function DecisionList({ decisions, labels, reveal = true, className, ...props }: Readonly<DecisionListProps>) {\n return (\n <ol className={cn(\"kz-decisions\", className)} {...props}>\n {decisions.map((d, i) => (\n <li\n key={d.id ?? (typeof d.chose === \"string\" ? d.chose : i)}\n className=\"kz-decision\"\n data-reveal={reveal ? \"soft\" : undefined}\n style={reveal && i ? ({ \"--kz-delay\": `${Math.min(i, 5) * 70}ms` } as React.CSSProperties) : undefined}\n >\n <span className=\"kz-decision-n\" aria-hidden>\n {String(i + 1).padStart(2, \"0\")}\n </span>\n <div className=\"kz-decision-body\">\n <div className=\"kz-decision-part\" data-part=\"chose\">\n <p className=\"kz-label\">\n <CheckGlyph className={ICON} /> {labels.chose}\n </p>\n <p>{d.chose}</p>\n </div>\n <div className=\"kz-decision-grid\">\n <div className=\"kz-decision-part\" data-part=\"refused\">\n <p className=\"kz-label\">\n <CloseGlyph className={ICON} /> {labels.refused}\n </p>\n <p>{d.refused}</p>\n </div>\n <div className=\"kz-decision-part\" data-part=\"because\">\n <p className=\"kz-label\">\n <ArrowGlyph className={ICON} /> {labels.because}\n </p>\n <p>{d.because}</p>\n </div>\n <div className=\"kz-decision-part\" data-part=\"cost\">\n <p className=\"kz-label\">\n <WarningGlyph className={ICON} /> {labels.cost}\n </p>\n <p>{d.cost}</p>\n </div>\n </div>\n </div>\n </li>\n ))}\n </ol>\n );\n}\n"],"mappings":";;;;;;;;;;;AA8CU,cAKI,YALJ;AAbV,IAAM,OAAO;AAGN,SAAS,aAAa,EAAE,WAAW,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AA,gBAAE,OAAO;AAAA,iBAC5C;AAAA,cACA,oBAAC,OAAG,YAAE,MAAK;AAAA,eACb;AAAA,aACF;AAAA,WACF;AAAA;AAAA;AAAA,IAnCK,EAAE,OAAO,OAAO,EAAE,UAAU,WAAW,EAAE,QAAQ;AAAA,EAoCxD,CACD,GACH;AAEJ;","names":[]}
|
|
@@ -94,13 +94,13 @@ type DescriptionListProps = Omit<React.ComponentProps<"dl">, "children"> & {
|
|
|
94
94
|
layout?: "stacked" | "inline" | "grid";
|
|
95
95
|
};
|
|
96
96
|
/** Term and value pairs — a job's details, a payout's breakdown — stacked, inline like a receipt, or as cards. */
|
|
97
|
-
declare function DescriptionList({ items, layout, className, ...props }: DescriptionListProps): React.JSX.Element;
|
|
97
|
+
declare function DescriptionList({ items, layout, className, ...props }: Readonly<DescriptionListProps>): React.JSX.Element;
|
|
98
98
|
type KeyValueGridProps = Omit<DescriptionListProps, "layout"> & {
|
|
99
99
|
/** The narrowest a card may be before the grid wraps, in rem. Default 10. */
|
|
100
100
|
minWidth?: number;
|
|
101
101
|
};
|
|
102
102
|
/** Key figures as a grid of cards that wraps with the width: a job's numbers, an account's limits. */
|
|
103
|
-
declare function KeyValueGrid({ minWidth, style, ...props }: KeyValueGridProps): React.JSX.Element;
|
|
103
|
+
declare function KeyValueGrid({ minWidth, style, ...props }: Readonly<KeyValueGridProps>): React.JSX.Element;
|
|
104
104
|
|
|
105
105
|
export { DescriptionList, KeyValueGrid, descriptionList };
|
|
106
106
|
export type { DescriptionItem, DescriptionListProps, KeyValueGridProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/description-list/description-list.tsx"],"sourcesContent":["// Server-safe. Facts about one thing, as term and value: a job's details, a payout's breakdown, a profile. A real\n// `<dl>` (each pair in a `<div>`, as HTML allows): stacked, inline (term beside its value) or a grid of cards\n// (`KeyValueGrid`). Every word is a prop.\nimport type * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nexport const descriptionList = tv({\n slots: {\n root: \"m-0 w-full\",\n pair: \"min-w-0\",\n term: \"text-xs font-semibold text-fg-secondary\",\n details: \"m-0 min-w-0 break-words text-sm text-fg\",\n hint: \"mt-0.5 block text-xs text-fg-secondary\",\n },\n variants: {\n layout: {\n stacked: { root: \"flex flex-col gap-4\", details: \"mt-1\" },\n inline: {\n root: \"divide-y divide-border-subtle\",\n pair: \"flex flex-wrap items-baseline justify-between gap-x-6 gap-y-1 py-2.5 first:pt-0 last:pb-0\",\n term: \"text-sm font-normal\",\n details: \"text-right font-medium tabular-nums\",\n },\n grid: {\n root: \"grid grid-cols-[repeat(auto-fill,minmax(var(--kz-kv-min,10rem),1fr))] gap-3\",\n pair: \"rounded-xl border border-border-default bg-surface-1 px-4 py-3\",\n term: \"\",\n details: \"mt-1 font-display text-lg font-bold tabular-nums\",\n },\n },\n },\n defaultVariants: { layout: \"stacked\" },\n});\n\nexport type DescriptionItem = {\n /** The term (“Status”, “Credits”) — passed translated. */\n term: React.ReactNode;\n /** The value: text, a `Badge`, a link. */\n details: React.ReactNode;\n /** A line under the value (a date, a unit). */\n hint?: React.ReactNode;\n /** A stable key, when the terms are not unique strings. */\n id?: string;\n};\n\nexport type DescriptionListProps = Omit<React.ComponentProps<\"dl\">, \"children\"> & {\n /** The pairs, in reading order. */\n items: readonly DescriptionItem[];\n /** stacked (default: a details panel) · inline (term left, value right: a receipt, a summary) · grid (cards). */\n layout?: \"stacked\" | \"inline\" | \"grid\";\n};\n\n/** Term and value pairs — a job's details, a payout's breakdown — stacked, inline like a receipt, or as cards. */\nexport function DescriptionList({ items, layout, className, ...props }: DescriptionListProps) {\n const s = descriptionList({ layout });\n return (\n <dl className={s.root({ className })} {...props}>\n {items.map((item, i) => (\n <div key={item.id ?? (typeof item.term === \"string\" ? item.term : i)} className={s.pair()}>\n <dt className={s.term()}>{item.term}</dt>\n <dd className={s.details()}>\n {item.details}\n {item.hint ? <span className={s.hint()}>{item.hint}</span> : null}\n </dd>\n </div>\n ))}\n </dl>\n );\n}\n\nexport type KeyValueGridProps = Omit<DescriptionListProps, \"layout\"> & {\n /** The narrowest a card may be before the grid wraps, in rem. Default 10. */\n minWidth?: number;\n};\n\n/** Key figures as a grid of cards that wraps with the width: a job's numbers, an account's limits. */\nexport function KeyValueGrid({ minWidth = 10, style, ...props }: KeyValueGridProps) {\n return <DescriptionList layout=\"grid\" style={{ ...style, [\"--kz-kv-min\" as string]: `${minWidth}rem` }} {...props} />;\n}\n"],"mappings":";AAIA,SAAS,UAAU;AAuDT,cACA,YADA;AArDH,IAAM,kBAAkB,GAAG;AAAA,EAChC,OAAO;AAAA,IACL,MAAM;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,IACT,MAAM;AAAA,EACR;AAAA,EACA,UAAU;AAAA,IACR,QAAQ;AAAA,MACN,SAAS,EAAE,MAAM,uBAAuB,SAAS,OAAO;AAAA,MACxD,QAAQ;AAAA,QACN,MAAM;AAAA,QACN,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,MACX;AAAA,MACA,MAAM;AAAA,QACJ,MAAM;AAAA,QACN,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,MACX;AAAA,IACF;AAAA,EACF;AAAA,EACA,iBAAiB,EAAE,QAAQ,UAAU;AACvC,CAAC;AAqBM,SAAS,gBAAgB,EAAE,OAAO,QAAQ,WAAW,GAAG,MAAM,
|
|
1
|
+
{"version":3,"sources":["../src/description-list/description-list.tsx"],"sourcesContent":["// Server-safe. Facts about one thing, as term and value: a job's details, a payout's breakdown, a profile. A real\n// `<dl>` (each pair in a `<div>`, as HTML allows): stacked, inline (term beside its value) or a grid of cards\n// (`KeyValueGrid`). Every word is a prop.\nimport type * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nexport const descriptionList = tv({\n slots: {\n root: \"m-0 w-full\",\n pair: \"min-w-0\",\n term: \"text-xs font-semibold text-fg-secondary\",\n details: \"m-0 min-w-0 break-words text-sm text-fg\",\n hint: \"mt-0.5 block text-xs text-fg-secondary\",\n },\n variants: {\n layout: {\n stacked: { root: \"flex flex-col gap-4\", details: \"mt-1\" },\n inline: {\n root: \"divide-y divide-border-subtle\",\n pair: \"flex flex-wrap items-baseline justify-between gap-x-6 gap-y-1 py-2.5 first:pt-0 last:pb-0\",\n term: \"text-sm font-normal\",\n details: \"text-right font-medium tabular-nums\",\n },\n grid: {\n root: \"grid grid-cols-[repeat(auto-fill,minmax(var(--kz-kv-min,10rem),1fr))] gap-3\",\n pair: \"rounded-xl border border-border-default bg-surface-1 px-4 py-3\",\n term: \"\",\n details: \"mt-1 font-display text-lg font-bold tabular-nums\",\n },\n },\n },\n defaultVariants: { layout: \"stacked\" },\n});\n\nexport type DescriptionItem = {\n /** The term (“Status”, “Credits”) — passed translated. */\n term: React.ReactNode;\n /** The value: text, a `Badge`, a link. */\n details: React.ReactNode;\n /** A line under the value (a date, a unit). */\n hint?: React.ReactNode;\n /** A stable key, when the terms are not unique strings. */\n id?: string;\n};\n\nexport type DescriptionListProps = Omit<React.ComponentProps<\"dl\">, \"children\"> & {\n /** The pairs, in reading order. */\n items: readonly DescriptionItem[];\n /** stacked (default: a details panel) · inline (term left, value right: a receipt, a summary) · grid (cards). */\n layout?: \"stacked\" | \"inline\" | \"grid\";\n};\n\n/** Term and value pairs — a job's details, a payout's breakdown — stacked, inline like a receipt, or as cards. */\nexport function DescriptionList({ items, layout, className, ...props }: Readonly<DescriptionListProps>) {\n const s = descriptionList({ layout });\n return (\n <dl className={s.root({ className })} {...props}>\n {items.map((item, i) => (\n <div key={item.id ?? (typeof item.term === \"string\" ? item.term : i)} className={s.pair()}>\n <dt className={s.term()}>{item.term}</dt>\n <dd className={s.details()}>\n {item.details}\n {item.hint ? <span className={s.hint()}>{item.hint}</span> : null}\n </dd>\n </div>\n ))}\n </dl>\n );\n}\n\nexport type KeyValueGridProps = Omit<DescriptionListProps, \"layout\"> & {\n /** The narrowest a card may be before the grid wraps, in rem. Default 10. */\n minWidth?: number;\n};\n\n/** Key figures as a grid of cards that wraps with the width: a job's numbers, an account's limits. */\nexport function KeyValueGrid({ minWidth = 10, style, ...props }: Readonly<KeyValueGridProps>) {\n return <DescriptionList layout=\"grid\" style={{ ...style, [\"--kz-kv-min\" as string]: `${minWidth}rem` }} {...props} />;\n}\n"],"mappings":";AAIA,SAAS,UAAU;AAuDT,cACA,YADA;AArDH,IAAM,kBAAkB,GAAG;AAAA,EAChC,OAAO;AAAA,IACL,MAAM;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,IACT,MAAM;AAAA,EACR;AAAA,EACA,UAAU;AAAA,IACR,QAAQ;AAAA,MACN,SAAS,EAAE,MAAM,uBAAuB,SAAS,OAAO;AAAA,MACxD,QAAQ;AAAA,QACN,MAAM;AAAA,QACN,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,MACX;AAAA,MACA,MAAM;AAAA,QACJ,MAAM;AAAA,QACN,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,MACX;AAAA,IACF;AAAA,EACF;AAAA,EACA,iBAAiB,EAAE,QAAQ,UAAU;AACvC,CAAC;AAqBM,SAAS,gBAAgB,EAAE,OAAO,QAAQ,WAAW,GAAG,MAAM,GAAmC;AACtG,QAAM,IAAI,gBAAgB,EAAE,OAAO,CAAC;AACpC,SACE,oBAAC,QAAG,WAAW,EAAE,KAAK,EAAE,UAAU,CAAC,GAAI,GAAG,OACvC,gBAAM,IAAI,CAAC,MAAM,MAChB,qBAAC,SAAqE,WAAW,EAAE,KAAK,GACtF;AAAA,wBAAC,QAAG,WAAW,EAAE,KAAK,GAAI,eAAK,MAAK;AAAA,IACpC,qBAAC,QAAG,WAAW,EAAE,QAAQ,GACtB;AAAA,WAAK;AAAA,MACL,KAAK,OAAO,oBAAC,UAAK,WAAW,EAAE,KAAK,GAAI,eAAK,MAAK,IAAU;AAAA,OAC/D;AAAA,OALQ,KAAK,OAAO,OAAO,KAAK,SAAS,WAAW,KAAK,OAAO,EAMlE,CACD,GACH;AAEJ;AAQO,SAAS,aAAa,EAAE,WAAW,IAAI,OAAO,GAAG,MAAM,GAAgC;AAC5F,SAAO,oBAAC,mBAAgB,QAAO,QAAO,OAAO,EAAE,GAAG,OAAO,CAAC,aAAuB,GAAG,GAAG,QAAQ,MAAM,GAAI,GAAG,OAAO;AACrH;","names":[]}
|
package/dist/detail-layout.d.ts
CHANGED
|
@@ -224,7 +224,7 @@ type DetailLayoutProps = Omit<React.ComponentProps<"div">, "title"> & {
|
|
|
224
224
|
children: React.ReactNode;
|
|
225
225
|
};
|
|
226
226
|
/** One object's page: header (back, media, name, status, facts, actions), tabs, content and a side panel. */
|
|
227
|
-
declare function DetailLayout({ back, media, cover, eyebrow, title, status, meta, actions, tabs, aside, notes, className, children, ...props }: DetailLayoutProps): React.JSX.Element;
|
|
227
|
+
declare function DetailLayout({ back, media, cover, eyebrow, title, status, meta, actions, tabs, aside, notes, className, children, ...props }: Readonly<DetailLayoutProps>): React.JSX.Element;
|
|
228
228
|
type DetailSectionProps = Omit<React.ComponentProps<"section">, "title"> & {
|
|
229
229
|
/** The binder tab: names the section (`Invoices`). */
|
|
230
230
|
title: React.ReactNode;
|
|
@@ -234,7 +234,7 @@ type DetailSectionProps = Omit<React.ComponentProps<"section">, "title"> & {
|
|
|
234
234
|
level?: 2 | 3;
|
|
235
235
|
};
|
|
236
236
|
/** A binder section of the main column: a titled region on a card, its name on a tab at the top-left corner. */
|
|
237
|
-
declare function DetailSection({ title, action, level, className, children, id, ...props }: DetailSectionProps): React.JSX.Element;
|
|
237
|
+
declare function DetailSection({ title, action, level, className, children, id, ...props }: Readonly<DetailSectionProps>): React.JSX.Element;
|
|
238
238
|
type DetailNote = {
|
|
239
239
|
id: string;
|
|
240
240
|
body: React.ReactNode; /** Who and when (`Eric · Oct 19`). */
|
|
@@ -251,7 +251,7 @@ type DetailNotesProps = Omit<React.ComponentProps<"section">, "title"> & {
|
|
|
251
251
|
add?: React.ReactNode;
|
|
252
252
|
};
|
|
253
253
|
/** The notes column of a person's or an object's page: numbered notes and an add field. */
|
|
254
|
-
declare function DetailNotes({ title, notes, emptyLabel, add, className, ...props }: DetailNotesProps): React.JSX.Element;
|
|
254
|
+
declare function DetailNotes({ title, notes, emptyLabel, add, className, ...props }: Readonly<DetailNotesProps>): React.JSX.Element;
|
|
255
255
|
type FormStepData = {
|
|
256
256
|
id: string;
|
|
257
257
|
title: React.ReactNode;
|
|
@@ -262,9 +262,9 @@ type FormStepsProps = Omit<React.ComponentProps<"ol">, "children"> & {
|
|
|
262
262
|
steps: readonly FormStepData[];
|
|
263
263
|
};
|
|
264
264
|
/** The numbered steps of a long form (a new invoice: client, lines, terms): an ordered list, each step a named region. */
|
|
265
|
-
declare function FormSteps({ steps, className, ...props }: FormStepsProps): React.JSX.Element;
|
|
265
|
+
declare function FormSteps({ steps, className, ...props }: Readonly<FormStepsProps>): React.JSX.Element;
|
|
266
266
|
/** The totals card of a form's side panel (`aside`): sticky with the panel on a desktop, under the steps on a phone. Plain primary at `lg` inside. */
|
|
267
|
-
declare function FormTotals({ className, ...props }: React.ComponentProps<"div"
|
|
267
|
+
declare function FormTotals({ className, ...props }: Readonly<React.ComponentProps<"div">>): React.JSX.Element;
|
|
268
268
|
|
|
269
269
|
export { DetailLayout, DetailNotes, DetailSection, FormSteps, FormTotals, detailLayout };
|
|
270
270
|
export type { DetailLayoutProps, DetailNote, DetailNotesProps, DetailSectionProps, FormStepData, FormStepsProps };
|
package/dist/detail-layout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/detail-layout/detail-layout.tsx","../src/profile-card/banner.tsx","../src/story-variant.ts"],"sourcesContent":["// Server-safe. The page of one object, read from the products' detail screens (a video, a job, an account, a pack):\n// its header — the way back, a media or an avatar, the name, its facts and status, the actions — then its tabs, the\n// content, and a side panel (details, related, activity) that goes under the content on a phone.\nimport * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { ProfileBanner } from \"../profile-card/banner\";\n\nexport const detailLayout = tv({\n slots: {\n root: \"flex w-full flex-col gap-6\",\n back: \"inline-flex w-fit items-center gap-1.5 rounded-md text-sm font-medium text-fg-secondary no-underline hover:text-fg focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring\",\n header: \"flex flex-col gap-4 border-b border-border-subtle pb-5 sm:flex-row sm:items-start\",\n banner: \"border-b border-border-subtle pb-5\",\n media: \"shrink-0 overflow-hidden rounded-xl [&>img]:block [&>img]:h-full [&>img]:w-full [&>img]:object-cover\",\n text: \"flex min-w-0 flex-1 flex-col gap-2\",\n eyebrow: \"font-mono text-[11px] font-semibold text-fg-accent\",\n titleRow: \"flex flex-wrap items-center gap-2\",\n title: \"min-w-0 font-display text-2xl font-extrabold tracking-tight text-fg break-words\",\n meta: \"flex flex-wrap items-center gap-x-3 gap-y-1 text-sm text-fg-secondary\",\n actions: \"flex shrink-0 flex-wrap items-center gap-2\",\n columns: \"grid grid-cols-1 gap-6 lg:grid-cols-[minmax(0,1fr)_20rem] lg:gap-8\",\n main: \"flex min-w-0 flex-col gap-5\",\n aside: \"flex min-w-0 flex-col gap-4 lg:sticky lg:top-20 lg:self-start\",\n section: \"flex min-w-0 flex-col gap-3 rounded-xl rounded-tl-none border border-border-default bg-surface-1 p-4 sm:p-5\",\n sectionTab: \"-mb-3 -mt-4 w-fit rounded-t-md border border-b-0 border-border-default bg-surface-2 px-3 py-1 text-xs font-bold text-fg-secondary sm:-mt-5\",\n sectionHead: \"flex items-center justify-between gap-3\",\n sectionTitle: \"m-0 text-sm font-semibold text-fg\",\n notes: \"m-0 flex list-none flex-col gap-3 p-0 [counter-reset:note]\",\n note: \"flex gap-3 text-sm text-fg [counter-increment:note]\",\n noteNum: \"mt-0.5 grid size-6 shrink-0 place-items-center rounded-full bg-surface-3 text-xs font-bold tabular-nums text-fg-secondary\",\n noteBody: \"flex min-w-0 flex-col gap-0.5\",\n noteMeta: \"text-xs text-fg-secondary\",\n steps: \"m-0 flex list-none flex-col gap-8 p-0\",\n step: \"flex min-w-0 flex-col gap-3\",\n stepHead: \"flex items-center gap-3\",\n stepNum: \"grid size-8 shrink-0 place-items-center rounded-full bg-accent text-sm font-extrabold tabular-nums text-on-accent\",\n stepTitle: \"m-0 text-base font-semibold text-fg\",\n totals: \"flex flex-col gap-4 rounded-xl border border-border-default bg-surface-1 p-4\",\n },\n});\nconst s = detailLayout();\n\nexport type DetailLayoutProps = Omit<React.ComponentProps<\"div\">, \"title\"> & {\n /** The way back to the list: your router's link (`<Link href=\"/videos\">Videos</Link>`), drawn with its arrow. */\n back?: React.ReactNode;\n /** A thumbnail, a cover or an avatar beside the name; with `cover`, the avatar overlapping the cover. */\n media?: React.ReactNode;\n /**\n * A person's or a place's page (a client, a shop, a creator): the header becomes a `ProfileBanner` — this cover (an\n * `<img alt=\"\">`, or `true` for a tint of the brand's accent), `media` as the avatar overlapping it, then the name and the actions.\n */\n cover?: React.ReactNode;\n /** A mono line above the name (the object's kind, its id). */\n eyebrow?: React.ReactNode;\n /** The object's name: the `h1`. */\n title: React.ReactNode;\n /** Beside the name: its status (a Badge). */\n status?: React.ReactNode;\n /** Under the name: its facts (the author, a date, a count — `Facts` or plain text). */\n meta?: React.ReactNode;\n /** The object's actions (edit, publish, a DropdownMenu). */\n actions?: React.ReactNode;\n /** Under the header: the object's tabs (`Tabs.List` of @krizaka/ui/tabs, inside your `Tabs.Root` around the layout). */\n tabs?: React.ReactNode;\n /** The side panel: details, related objects, activity (under the content on a phone). */\n aside?: React.ReactNode;\n /** A notes column (`DetailNotes`) at the top of the side panel, before `aside`. */\n notes?: React.ReactNode;\n /** The content (the current tab). */\n children: React.ReactNode;\n};\n\n/** One object's page: header (back, media, name, status, facts, actions), tabs, content and a side panel. */\nexport function DetailLayout({ back, media, cover, eyebrow, title, status, meta, actions, tabs, aside, notes, className, children, ...props }: DetailLayoutProps) {\n const side = notes || aside;\n return (\n <div className={s.root({ className })} {...props}>\n {back && <div className={s.back()}>{back}</div>}\n {cover ? (\n <ProfileBanner className={s.banner()} banner={cover === true ? undefined : cover} avatar={media} eyebrow={eyebrow} title={title} status={status} meta={meta} actions={actions} />\n ) : (\n <div className={s.header()}>\n {media && <div className={s.media()}>{media}</div>}\n <div className={s.text()}>\n {eyebrow && <p className={s.eyebrow()}>{eyebrow}</p>}\n <div className={s.titleRow()}>\n <h1 className={s.title()}>{title}</h1>\n {status}\n </div>\n {meta && <div className={s.meta()}>{meta}</div>}\n </div>\n {actions && <div className={s.actions()}>{actions}</div>}\n </div>\n )}\n {tabs}\n <div className={side ? s.columns() : undefined}>\n <div className={s.main()}>{children}</div>\n {side && (\n <aside className={s.aside()}>\n {notes}\n {aside}\n </aside>\n )}\n </div>\n </div>\n );\n}\n\nexport type DetailSectionProps = Omit<React.ComponentProps<\"section\">, \"title\"> & {\n /** The binder tab: names the section (`Invoices`). */\n title: React.ReactNode;\n /** On the right of the title: one action (`See all`). */\n action?: React.ReactNode;\n /** The title's level. @default 2 */\n level?: 2 | 3;\n};\n\n/** A binder section of the main column: a titled region on a card, its name on a tab at the top-left corner. */\nexport function DetailSection({ title, action, level = 2, className, children, id, ...props }: DetailSectionProps) {\n const H = level === 2 ? \"h2\" : \"h3\";\n const auto = React.useId();\n const titleId = `${id ?? auto}-title`;\n return (\n <section id={id} aria-labelledby={titleId} className={s.section({ className })} {...props}>\n <div className={s.sectionHead()}>\n <H id={titleId} className={s.sectionTitle()}>\n {title}\n </H>\n {action}\n </div>\n {children}\n </section>\n );\n}\n\nexport type DetailNote = { id: string; body: React.ReactNode; /** Who and when (`Eric · Oct 19`). */ meta?: React.ReactNode };\n\nexport type DetailNotesProps = Omit<React.ComponentProps<\"section\">, \"title\"> & {\n /** The column's name (`Notes`). */\n title: React.ReactNode;\n /** The notes, oldest first. */\n notes: readonly DetailNote[];\n /** Said when there is none. */\n emptyLabel: string;\n /** Under the list: the add field (a `Field` and a `Button`, a small form). */\n add?: React.ReactNode;\n};\n\n/** The notes column of a person's or an object's page: numbered notes and an add field. */\nexport function DetailNotes({ title, notes, emptyLabel, add, className, ...props }: DetailNotesProps) {\n const id = React.useId();\n return (\n <section aria-labelledby={id} className={s.section({ className })} {...props}>\n <h2 id={id} className={s.sectionTitle()}>\n {title}\n </h2>\n {notes.length === 0 ? (\n <p className={s.noteMeta()}>{emptyLabel}</p>\n ) : (\n <ol className={s.notes()}>\n {notes.map((n, i) => (\n <li key={n.id} className={s.note()}>\n <span className={s.noteNum()} aria-hidden=\"true\">\n {i + 1}\n </span>\n <span className={s.noteBody()}>\n <span>{n.body}</span>\n {n.meta && <span className={s.noteMeta()}>{n.meta}</span>}\n </span>\n </li>\n ))}\n </ol>\n )}\n {add}\n </section>\n );\n}\n\nexport type FormStepData = { id: string; title: React.ReactNode; children: React.ReactNode };\n\nexport type FormStepsProps = Omit<React.ComponentProps<\"ol\">, \"children\"> & {\n /** The steps in order: an id, a title and their fields. */\n steps: readonly FormStepData[];\n};\n\n/** The numbered steps of a long form (a new invoice: client, lines, terms): an ordered list, each step a named region. */\nexport function FormSteps({ steps, className, ...props }: FormStepsProps) {\n const base = React.useId();\n return (\n <ol className={s.steps({ className })} {...props}>\n {steps.map((st, i) => (\n <li key={st.id} className={s.step()}>\n <div className={s.stepHead()}>\n <span className={s.stepNum()} aria-hidden=\"true\">\n {i + 1}\n </span>\n <h2 id={`${base}-${st.id}`} className={s.stepTitle()}>\n <span className=\"sr-only\">{i + 1}. </span>\n {st.title}\n </h2>\n </div>\n <div role=\"group\" aria-labelledby={`${base}-${st.id}`} className=\"flex min-w-0 flex-col gap-4\">\n {st.children}\n </div>\n </li>\n ))}\n </ol>\n );\n}\n\n/** The totals card of a form's side panel (`aside`): sticky with the panel on a desktop, under the steps on a phone. Plain primary at `lg` inside. */\nexport function FormTotals({ className, ...props }: React.ComponentProps<\"div\">) {\n return <div className={s.totals({ className })} {...props} />;\n}\n","// Server-safe: no hook. The top of a page about one person or place — a client, a shop, a creator, a building\n// (extracted from a product's ProfileHero, #650, #515): a slim cover, the avatar overlapping its lower edge, then the\n// eyebrow, the name (the page's h1), its facts and the actions. No text ever sits on the cover: the words are under it,\n// so a photo never costs their contrast (a scrim fades the photo's foot into the page all the same).\nimport type * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { cn } from \"../cn\";\nimport { brandClass } from \"../story-variant\";\n\nexport const profileBanner = tv({\n slots: {\n root: \"relative flex w-full min-w-0 flex-col\",\n // The brand's accent, as a calm tint, when there is no picture; a picture fills it (`object-cover`).\n cover:\n \"relative h-28 w-full overflow-hidden rounded-xl bg-accent-soft bg-linear-to-br from-accent/30 via-accent-soft to-surface-2 sm:h-44 \" +\n \"[&>img]:block [&>img]:h-full [&>img]:w-full [&>img]:object-cover\",\n scrim: \"pointer-events-none absolute inset-0 bg-linear-to-t from-surface-0/70 via-transparent to-transparent\",\n body: \"relative flex min-w-0 flex-col gap-3 px-1 sm:flex-row sm:items-end sm:justify-between sm:px-2\",\n identity: \"flex min-w-0 items-end gap-4\",\n // The avatar overlaps the cover's lower edge by the same share at every width; the ring is the page's colour.\n avatar:\n \"relative -mt-10 h-20 w-20 shrink-0 overflow-hidden rounded-2xl bg-surface-3 ring-4 ring-surface-0 sm:-mt-14 sm:h-28 sm:w-28 \" +\n \"[&>*]:h-full! [&>*]:w-full! [&_img]:h-full [&_img]:w-full [&_img]:object-cover\",\n text: \"flex min-w-0 flex-1 flex-col gap-1 pb-1\",\n eyebrow: \"font-mono text-[11px] font-semibold text-fg-accent\",\n titleRow: \"flex min-w-0 flex-wrap items-center gap-2\",\n title: \"min-w-0 font-display text-xl font-extrabold tracking-tight break-words text-fg sm:text-3xl\",\n meta: \"flex flex-wrap items-center gap-x-3 gap-y-1 text-sm text-fg-secondary\",\n actions: \"flex shrink-0 flex-wrap items-center gap-2 sm:justify-end sm:pb-1\",\n },\n});\nconst s = profileBanner();\n\nexport type ProfileBannerProps = Omit<React.ComponentProps<\"section\">, \"title\"> & {\n /** The cover: an `<img alt=\"\">` (decorative) or your framework's image. Absent: a tint of the brand's accent. */\n banner?: React.ReactNode;\n /** The avatar overlapping the cover: `Avatar` with the family's default (`defaultAvatar: { brand, seed }`, #598) when there is no photo. */\n avatar: React.ReactNode;\n /** A mono line above the name: what it is (« Client », « Shop »), an id. */\n eyebrow?: React.ReactNode;\n /** The name: the page's heading. */\n title: React.ReactNode;\n /**\n * The level of the name.\n * @default \"h1\"\n */\n titleAs?: \"h1\" | \"h2\";\n /** Beside the name: a status (`Badge`), a verified mark. */\n status?: React.ReactNode;\n /** Under the name: its facts (a handle, a city, « client since 2024 »). */\n meta?: React.ReactNode;\n /** The actions (message, book, edit): at the right from `sm`, under the name on a phone. */\n actions?: React.ReactNode;\n /** A brand scope (`folioviv` → `.brand-folioviv`): the default cover takes that brand's accent. */\n brand?: string;\n};\n\n/** A person's or a place's banner: cover, overlapping avatar, eyebrow, name (h1), facts and actions — the words never on the cover. */\nexport function ProfileBanner({ banner, avatar, eyebrow, title, titleAs: Title = \"h1\", status, meta, actions, brand, className, ...props }: ProfileBannerProps) {\n return (\n <section className={s.root({ className: cn(brandClass(brand), className) })} {...props}>\n <div data-cover=\"\" className={s.cover()}>\n {banner}\n {banner ? <span aria-hidden className={s.scrim()} /> : null}\n </div>\n <div className={s.body()}>\n <div className={s.identity()}>\n <div data-avatar=\"\" className={s.avatar()}>\n {avatar}\n </div>\n <div className={s.text()}>\n {eyebrow && <p className={s.eyebrow()}>{eyebrow}</p>}\n <div className={s.titleRow()}>\n <Title className={s.title()}>{title}</Title>\n {status}\n </div>\n {meta && <div className={s.meta()}>{meta}</div>}\n </div>\n </div>\n {actions && <div className={s.actions()}>{actions}</div>}\n </div>\n </section>\n );\n}\n","// The two looks of the storytelling kit (story.css), shared by its entries. Server-safe.\n\n/** The look of the storytelling kit: `default` (sober, for any app) or `arcade` (the opt-in cabinet flavour). */\nexport type StoryVariant = \"default\" | \"arcade\";\n\n/** The class a storytelling component adds for its look (`kzs-arcade` for the arcade flavour). */\nexport const storyVariantClass = (variant: StoryVariant | undefined) => (variant === \"arcade\" ? \"kzs-arcade\" : undefined);\n\n/** The class of a brand scope (`brand-verikora`): the accent and the gradient become that brand's. */\nexport const brandClass = (brand: string | undefined) => (brand ? `brand-${brand}` : undefined);\n"],"mappings":";;;;;AAGA,YAAY,WAAW;AACvB,SAAS,MAAAA,WAAU;;;ACCnB,SAAS,UAAU;;;ACIZ,IAAM,aAAa,CAAC,UAA+B,QAAQ,SAAS,KAAK,KAAK;;;ADqD/E,SAEY,KAFZ;AApDC,IAAM,gBAAgB,GAAG;AAAA,EAC9B,OAAO;AAAA,IACL,MAAM;AAAA;AAAA,IAEN,OACE;AAAA,IAEF,OAAO;AAAA,IACP,MAAM;AAAA,IACN,UAAU;AAAA;AAAA,IAEV,QACE;AAAA,IAEF,MAAM;AAAA,IACN,SAAS;AAAA,IACT,UAAU;AAAA,IACV,OAAO;AAAA,IACP,MAAM;AAAA,IACN,SAAS;AAAA,EACX;AACF,CAAC;AACD,IAAM,IAAI,cAAc;AA2BjB,SAAS,cAAc,EAAE,QAAQ,QAAQ,SAAS,OAAO,SAAS,QAAQ,MAAM,QAAQ,MAAM,SAAS,OAAO,WAAW,GAAG,MAAM,GAAuB;AAC9J,SACE,qBAAC,aAAQ,WAAW,EAAE,KAAK,EAAE,WAAW,GAAG,WAAW,KAAK,GAAG,SAAS,EAAE,CAAC,GAAI,GAAG,OAC/E;AAAA,yBAAC,SAAI,cAAW,IAAG,WAAW,EAAE,MAAM,GACnC;AAAA;AAAA,MACA,SAAS,oBAAC,UAAK,eAAW,MAAC,WAAW,EAAE,MAAM,GAAG,IAAK;AAAA,OACzD;AAAA,IACA,qBAAC,SAAI,WAAW,EAAE,KAAK,GACrB;AAAA,2BAAC,SAAI,WAAW,EAAE,SAAS,GACzB;AAAA,4BAAC,SAAI,eAAY,IAAG,WAAW,EAAE,OAAO,GACrC,kBACH;AAAA,QACA,qBAAC,SAAI,WAAW,EAAE,KAAK,GACpB;AAAA,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AI,MACd,gBAAAF,MAAC,QAAe,WAAWE,GAAE,KAAK,GAChC;AAAA,oBAAAF,MAAC,SAAI,WAAWE,GAAE,SAAS,GACzB;AAAA,sBAAAH,KAAC,UAAK,WAAWG,GAAE,QAAQ,GAAG,eAAY,QACvC,cAAI,GACP;AAAA,MACA,gBAAAF,MAAC,QAAG,IAAI,GAAG,IAAI,IAAI,GAAG,EAAE,IAAI,WAAWE,GAAE,UAAU,GACjD;AAAA,wBAAAF,MAAC,UAAK,WAAU,WAAW;AAAA,cAAI;AAAA,UAAE;AAAA,WAAE;AAAA,QAClC,GAAG;AAAA,SACN;AAAA,OACF;AAAA,IACA,gBAAAD,KAAC,SAAI,MAAK,SAAQ,mBAAiB,GAAG,IAAI,IAAI,GAAG,EAAE,IAAI,WAAU,+BAC9D,aAAG,UACN;AAAA,OAZO,GAAG,EAaZ,CACD,GACH;AAEJ;AAGO,SAAS,WAAW,EAAE,WAAW,GAAG,MAAM,GAAgC;AAC/E,SAAO,gBAAAA,KAAC,SAAI,WAAWG,GAAE,OAAO,EAAE,UAAU,CAAC,GAAI,GAAG,OAAO;AAC7D;","names":["tv","jsx","jsxs","tv","s"]}
|
|
1
|
+
{"version":3,"sources":["../src/detail-layout/detail-layout.tsx","../src/profile-card/banner.tsx","../src/story-variant.ts"],"sourcesContent":["// Server-safe. The page of one object, read from the products' detail screens (a video, a job, an account, a pack):\n// its header — the way back, a media or an avatar, the name, its facts and status, the actions — then its tabs, the\n// content, and a side panel (details, related, activity) that goes under the content on a phone.\nimport * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { ProfileBanner } from \"../profile-card/banner\";\n\nexport const detailLayout = tv({\n slots: {\n root: \"flex w-full flex-col gap-6\",\n back: \"inline-flex w-fit items-center gap-1.5 rounded-md text-sm font-medium text-fg-secondary no-underline hover:text-fg focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring\",\n header: \"flex flex-col gap-4 border-b border-border-subtle pb-5 sm:flex-row sm:items-start\",\n banner: \"border-b border-border-subtle pb-5\",\n media: \"shrink-0 overflow-hidden rounded-xl [&>img]:block [&>img]:h-full [&>img]:w-full [&>img]:object-cover\",\n text: \"flex min-w-0 flex-1 flex-col gap-2\",\n eyebrow: \"font-mono text-[11px] font-semibold text-fg-accent\",\n titleRow: \"flex flex-wrap items-center gap-2\",\n title: \"min-w-0 font-display text-2xl font-extrabold tracking-tight text-fg break-words\",\n meta: \"flex flex-wrap items-center gap-x-3 gap-y-1 text-sm text-fg-secondary\",\n actions: \"flex shrink-0 flex-wrap items-center gap-2\",\n columns: \"grid grid-cols-1 gap-6 lg:grid-cols-[minmax(0,1fr)_20rem] lg:gap-8\",\n main: \"flex min-w-0 flex-col gap-5\",\n aside: \"flex min-w-0 flex-col gap-4 lg:sticky lg:top-20 lg:self-start\",\n section: \"flex min-w-0 flex-col gap-3 rounded-xl rounded-tl-none border border-border-default bg-surface-1 p-4 sm:p-5\",\n sectionTab: \"-mb-3 -mt-4 w-fit rounded-t-md border border-b-0 border-border-default bg-surface-2 px-3 py-1 text-xs font-bold text-fg-secondary sm:-mt-5\",\n sectionHead: \"flex items-center justify-between gap-3\",\n sectionTitle: \"m-0 text-sm font-semibold text-fg\",\n notes: \"m-0 flex list-none flex-col gap-3 p-0 [counter-reset:note]\",\n note: \"flex gap-3 text-sm text-fg [counter-increment:note]\",\n noteNum: \"mt-0.5 grid size-6 shrink-0 place-items-center rounded-full bg-surface-3 text-xs font-bold tabular-nums text-fg-secondary\",\n noteBody: \"flex min-w-0 flex-col gap-0.5\",\n noteMeta: \"text-xs text-fg-secondary\",\n steps: \"m-0 flex list-none flex-col gap-8 p-0\",\n step: \"flex min-w-0 flex-col gap-3\",\n stepHead: \"flex items-center gap-3\",\n stepNum: \"grid size-8 shrink-0 place-items-center rounded-full bg-accent text-sm font-extrabold tabular-nums text-on-accent\",\n stepTitle: \"m-0 text-base font-semibold text-fg\",\n totals: \"flex flex-col gap-4 rounded-xl border border-border-default bg-surface-1 p-4\",\n },\n});\nconst s = detailLayout();\n\nexport type DetailLayoutProps = Omit<React.ComponentProps<\"div\">, \"title\"> & {\n /** The way back to the list: your router's link (`<Link href=\"/videos\">Videos</Link>`), drawn with its arrow. */\n back?: React.ReactNode;\n /** A thumbnail, a cover or an avatar beside the name; with `cover`, the avatar overlapping the cover. */\n media?: React.ReactNode;\n /**\n * A person's or a place's page (a client, a shop, a creator): the header becomes a `ProfileBanner` — this cover (an\n * `<img alt=\"\">`, or `true` for a tint of the brand's accent), `media` as the avatar overlapping it, then the name and the actions.\n */\n cover?: React.ReactNode;\n /** A mono line above the name (the object's kind, its id). */\n eyebrow?: React.ReactNode;\n /** The object's name: the `h1`. */\n title: React.ReactNode;\n /** Beside the name: its status (a Badge). */\n status?: React.ReactNode;\n /** Under the name: its facts (the author, a date, a count — `Facts` or plain text). */\n meta?: React.ReactNode;\n /** The object's actions (edit, publish, a DropdownMenu). */\n actions?: React.ReactNode;\n /** Under the header: the object's tabs (`Tabs.List` of @krizaka/ui/tabs, inside your `Tabs.Root` around the layout). */\n tabs?: React.ReactNode;\n /** The side panel: details, related objects, activity (under the content on a phone). */\n aside?: React.ReactNode;\n /** A notes column (`DetailNotes`) at the top of the side panel, before `aside`. */\n notes?: React.ReactNode;\n /** The content (the current tab). */\n children: React.ReactNode;\n};\n\n/** One object's page: header (back, media, name, status, facts, actions), tabs, content and a side panel. */\nexport function DetailLayout({ back, media, cover, eyebrow, title, status, meta, actions, tabs, aside, notes, className, children, ...props }: Readonly<DetailLayoutProps>) {\n const side = notes || aside;\n return (\n <div className={s.root({ className })} {...props}>\n {back && <div className={s.back()}>{back}</div>}\n {cover ? (\n <ProfileBanner className={s.banner()} banner={cover === true ? undefined : cover} avatar={media} eyebrow={eyebrow} title={title} status={status} meta={meta} actions={actions} />\n ) : (\n <div className={s.header()}>\n {media && <div className={s.media()}>{media}</div>}\n <div className={s.text()}>\n {eyebrow && <p className={s.eyebrow()}>{eyebrow}</p>}\n <div className={s.titleRow()}>\n <h1 className={s.title()}>{title}</h1>\n {status}\n </div>\n {meta && <div className={s.meta()}>{meta}</div>}\n </div>\n {actions && <div className={s.actions()}>{actions}</div>}\n </div>\n )}\n {tabs}\n <div className={side ? s.columns() : undefined}>\n <div className={s.main()}>{children}</div>\n {side && (\n <aside className={s.aside()}>\n {notes}\n {aside}\n </aside>\n )}\n </div>\n </div>\n );\n}\n\nexport type DetailSectionProps = Omit<React.ComponentProps<\"section\">, \"title\"> & {\n /** The binder tab: names the section (`Invoices`). */\n title: React.ReactNode;\n /** On the right of the title: one action (`See all`). */\n action?: React.ReactNode;\n /** The title's level. @default 2 */\n level?: 2 | 3;\n};\n\n/** A binder section of the main column: a titled region on a card, its name on a tab at the top-left corner. */\nexport function DetailSection({ title, action, level = 2, className, children, id, ...props }: Readonly<DetailSectionProps>) {\n const H = level === 2 ? \"h2\" : \"h3\";\n const auto = React.useId();\n const titleId = `${id ?? auto}-title`;\n return (\n <section id={id} aria-labelledby={titleId} className={s.section({ className })} {...props}>\n <div className={s.sectionHead()}>\n <H id={titleId} className={s.sectionTitle()}>\n {title}\n </H>\n {action}\n </div>\n {children}\n </section>\n );\n}\n\nexport type DetailNote = { id: string; body: React.ReactNode; /** Who and when (`Eric · Oct 19`). */ meta?: React.ReactNode };\n\nexport type DetailNotesProps = Omit<React.ComponentProps<\"section\">, \"title\"> & {\n /** The column's name (`Notes`). */\n title: React.ReactNode;\n /** The notes, oldest first. */\n notes: readonly DetailNote[];\n /** Said when there is none. */\n emptyLabel: string;\n /** Under the list: the add field (a `Field` and a `Button`, a small form). */\n add?: React.ReactNode;\n};\n\n/** The notes column of a person's or an object's page: numbered notes and an add field. */\nexport function DetailNotes({ title, notes, emptyLabel, add, className, ...props }: Readonly<DetailNotesProps>) {\n const id = React.useId();\n return (\n <section aria-labelledby={id} className={s.section({ className })} {...props}>\n <h2 id={id} className={s.sectionTitle()}>\n {title}\n </h2>\n {notes.length === 0 ? (\n <p className={s.noteMeta()}>{emptyLabel}</p>\n ) : (\n <ol className={s.notes()}>\n {notes.map((n, i) => (\n <li key={n.id} className={s.note()}>\n <span className={s.noteNum()} aria-hidden=\"true\">\n {i + 1}\n </span>\n <span className={s.noteBody()}>\n <span>{n.body}</span>\n {n.meta && <span className={s.noteMeta()}>{n.meta}</span>}\n </span>\n </li>\n ))}\n </ol>\n )}\n {add}\n </section>\n );\n}\n\nexport type FormStepData = { id: string; title: React.ReactNode; children: React.ReactNode };\n\nexport type FormStepsProps = Omit<React.ComponentProps<\"ol\">, \"children\"> & {\n /** The steps in order: an id, a title and their fields. */\n steps: readonly FormStepData[];\n};\n\n/** The numbered steps of a long form (a new invoice: client, lines, terms): an ordered list, each step a named region. */\nexport function FormSteps({ steps, className, ...props }: Readonly<FormStepsProps>) {\n const base = React.useId();\n return (\n <ol className={s.steps({ className })} {...props}>\n {steps.map((st, i) => (\n <li key={st.id} className={s.step()}>\n <div className={s.stepHead()}>\n <span className={s.stepNum()} aria-hidden=\"true\">\n {i + 1}\n </span>\n <h2 id={`${base}-${st.id}`} className={s.stepTitle()}>\n <span className=\"sr-only\">{i + 1}. </span>\n {st.title}\n </h2>\n </div>\n <div role=\"group\" aria-labelledby={`${base}-${st.id}`} className=\"flex min-w-0 flex-col gap-4\">\n {st.children}\n </div>\n </li>\n ))}\n </ol>\n );\n}\n\n/** The totals card of a form's side panel (`aside`): sticky with the panel on a desktop, under the steps on a phone. Plain primary at `lg` inside. */\nexport function FormTotals({ className, ...props }: Readonly<React.ComponentProps<\"div\">>) {\n return <div className={s.totals({ className })} {...props} />;\n}\n","// Server-safe: no hook. The top of a page about one person or place — a client, a shop, a creator, a building\n// (extracted from a product's ProfileHero, #650, #515): a slim cover, the avatar overlapping its lower edge, then the\n// eyebrow, the name (the page's h1), its facts and the actions. No text ever sits on the cover: the words are under it,\n// so a photo never costs their contrast (a scrim fades the photo's foot into the page all the same).\nimport type * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { cn } from \"../cn\";\nimport { brandClass } from \"../story-variant\";\n\nexport const profileBanner = tv({\n slots: {\n root: \"relative flex w-full min-w-0 flex-col\",\n // The brand's accent, as a calm tint, when there is no picture; a picture fills it (`object-cover`).\n cover:\n \"relative h-28 w-full overflow-hidden rounded-xl bg-accent-soft bg-linear-to-br from-accent/30 via-accent-soft to-surface-2 sm:h-44 \" +\n \"[&>img]:block [&>img]:h-full [&>img]:w-full [&>img]:object-cover\",\n scrim: \"pointer-events-none absolute inset-0 bg-linear-to-t from-surface-0/70 via-transparent to-transparent\",\n body: \"relative flex min-w-0 flex-col gap-3 px-1 sm:flex-row sm:items-end sm:justify-between sm:px-2\",\n identity: \"flex min-w-0 items-end gap-4\",\n // The avatar overlaps the cover's lower edge by the same share at every width; the ring is the page's colour.\n avatar:\n \"relative -mt-10 h-20 w-20 shrink-0 overflow-hidden rounded-2xl bg-surface-3 ring-4 ring-surface-0 sm:-mt-14 sm:h-28 sm:w-28 \" +\n \"[&>*]:h-full! [&>*]:w-full! [&_img]:h-full [&_img]:w-full [&_img]:object-cover\",\n text: \"flex min-w-0 flex-1 flex-col gap-1 pb-1\",\n eyebrow: \"font-mono text-[11px] font-semibold text-fg-accent\",\n titleRow: \"flex min-w-0 flex-wrap items-center gap-2\",\n title: \"min-w-0 font-display text-xl font-extrabold tracking-tight break-words text-fg sm:text-3xl\",\n meta: \"flex flex-wrap items-center gap-x-3 gap-y-1 text-sm text-fg-secondary\",\n actions: \"flex shrink-0 flex-wrap items-center gap-2 sm:justify-end sm:pb-1\",\n },\n});\nconst s = profileBanner();\n\nexport type ProfileBannerProps = Omit<React.ComponentProps<\"section\">, \"title\"> & {\n /** The cover: an `<img alt=\"\">` (decorative) or your framework's image. Absent: a tint of the brand's accent. */\n banner?: React.ReactNode;\n /** The avatar overlapping the cover: `Avatar` with the family's default (`defaultAvatar: { brand, seed }`, #598) when there is no photo. */\n avatar: React.ReactNode;\n /** A mono line above the name: what it is (« Client », « Shop »), an id. */\n eyebrow?: React.ReactNode;\n /** The name: the page's heading. */\n title: React.ReactNode;\n /**\n * The level of the name.\n * @default \"h1\"\n */\n titleAs?: \"h1\" | \"h2\";\n /** Beside the name: a status (`Badge`), a verified mark. */\n status?: React.ReactNode;\n /** Under the name: its facts (a handle, a city, « client since 2024 »). */\n meta?: React.ReactNode;\n /** The actions (message, book, edit): at the right from `sm`, under the name on a phone. */\n actions?: React.ReactNode;\n /** A brand scope (`folioviv` → `.brand-folioviv`): the default cover takes that brand's accent. */\n brand?: string;\n};\n\n/** A person's or a place's banner: cover, overlapping avatar, eyebrow, name (h1), facts and actions — the words never on the cover. */\nexport function ProfileBanner({ banner, avatar, eyebrow, title, titleAs: Title = \"h1\", status, meta, actions, brand, className, ...props }: Readonly<ProfileBannerProps>) {\n return (\n <section className={s.root({ className: cn(brandClass(brand), className) })} {...props}>\n <div data-cover=\"\" className={s.cover()}>\n {banner}\n {banner ? <span aria-hidden className={s.scrim()} /> : null}\n </div>\n <div className={s.body()}>\n <div className={s.identity()}>\n <div data-avatar=\"\" className={s.avatar()}>\n {avatar}\n </div>\n <div className={s.text()}>\n {eyebrow && <p className={s.eyebrow()}>{eyebrow}</p>}\n <div className={s.titleRow()}>\n <Title className={s.title()}>{title}</Title>\n {status}\n </div>\n {meta && <div className={s.meta()}>{meta}</div>}\n </div>\n </div>\n {actions && <div className={s.actions()}>{actions}</div>}\n </div>\n </section>\n );\n}\n","// The two looks of the storytelling kit (story.css), shared by its entries. Server-safe.\n\n/** The look of the storytelling kit: `default` (sober, for any app) or `arcade` (the opt-in cabinet flavour). */\nexport type StoryVariant = \"default\" | \"arcade\";\n\n/** The class a storytelling component adds for its look (`kzs-arcade` for the arcade flavour). */\nexport const storyVariantClass = (variant: StoryVariant | undefined) => (variant === \"arcade\" ? \"kzs-arcade\" : undefined);\n\n/** The class of a brand scope (`brand-verikora`): the accent and the gradient become that brand's. */\nexport const brandClass = (brand: string | undefined) => (brand ? `brand-${brand}` : undefined);\n"],"mappings":";;;;;AAGA,YAAY,WAAW;AACvB,SAAS,MAA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AAI,GAAG,IAAI,IAAI,GAAG,EAAE,IAAI,WAAWE,GAAE,UAAU,GACjD;AAAA,wBAAAF,MAAC,UAAK,WAAU,WAAW;AAAA,cAAI;AAAA,UAAE;AAAA,WAAE;AAAA,QAClC,GAAG;AAAA,SACN;AAAA,OACF;AAAA,IACA,gBAAAD,KAAC,SAAI,MAAK,SAAQ,mBAAiB,GAAG,IAAI,IAAI,GAAG,EAAE,IAAI,WAAU,+BAC9D,aAAG,UACN;AAAA,OAZO,GAAG,EAaZ,CACD,GACH;AAEJ;AAGO,SAAS,WAAW,EAAE,WAAW,GAAG,MAAM,GAA0C;AACzF,SAAO,gBAAAA,KAAC,SAAI,WAAWG,GAAE,OAAO,EAAE,UAAU,CAAC,GAAI,GAAG,OAAO;AAC7D;","names":["tv","jsx","jsxs","tv","s"]}
|
|
@@ -140,12 +140,12 @@ type DialogContentProps = React.ComponentProps<typeof Dialog$1.Content> & Dialog
|
|
|
140
140
|
container?: HTMLElement | null;
|
|
141
141
|
};
|
|
142
142
|
/** The dialog itself, portalled over a dimmed overlay, with a close button. Give it a `Dialog.Title`. */
|
|
143
|
-
declare function DialogContent({ placement, size, closeLabel, hideClose, dismissible, container, className, children, onEscapeKeyDown, onPointerDownOutside, onInteractOutside, ...props }: DialogContentProps): React.JSX.Element;
|
|
144
|
-
declare function DialogHeader({ className, ...props }: React.ComponentProps<"div"
|
|
145
|
-
declare function DialogTitle({ className, ...props }: React.ComponentProps<typeof Dialog$1.Title
|
|
146
|
-
declare function DialogDescription({ className, ...props }: React.ComponentProps<typeof Dialog$1.Description
|
|
147
|
-
declare function DialogBody({ className, ...props }: React.ComponentProps<"div"
|
|
148
|
-
declare function DialogFooter({ className, ...props }: React.ComponentProps<"div"
|
|
143
|
+
declare function DialogContent({ placement, size, closeLabel, hideClose, dismissible, container, className, children, onEscapeKeyDown, onPointerDownOutside, onInteractOutside, ...props }: Readonly<DialogContentProps>): React.JSX.Element;
|
|
144
|
+
declare function DialogHeader({ className, ...props }: Readonly<React.ComponentProps<"div">>): React.JSX.Element;
|
|
145
|
+
declare function DialogTitle({ className, ...props }: Readonly<React.ComponentProps<typeof Dialog$1.Title>>): React.JSX.Element;
|
|
146
|
+
declare function DialogDescription({ className, ...props }: Readonly<React.ComponentProps<typeof Dialog$1.Description>>): React.JSX.Element;
|
|
147
|
+
declare function DialogBody({ className, ...props }: Readonly<React.ComponentProps<"div">>): React.JSX.Element;
|
|
148
|
+
declare function DialogFooter({ className, ...props }: Readonly<React.ComponentProps<"div">>): React.JSX.Element;
|
|
149
149
|
/** `Dialog.Root/Trigger/Content/Header/Title/Description/Body/Footer/Close`. `open`/`defaultOpen` + `onOpenChange`. */
|
|
150
150
|
declare const Dialog: {
|
|
151
151
|
Root: React.FC<Dialog$1.DialogProps>;
|
|
@@ -162,7 +162,7 @@ declare const Dialog: {
|
|
|
162
162
|
type DistributiveOmit<T, K extends PropertyKey> = T extends unknown ? Omit<T, K> : never;
|
|
163
163
|
type SheetProps = DistributiveOmit<DialogContentProps, "placement">;
|
|
164
164
|
/** A sheet is a dialog anchored at the bottom (centred from `sm` up): `Dialog.Content placement="bottom"`. */
|
|
165
|
-
declare function Sheet(props: SheetProps): React.JSX.Element;
|
|
165
|
+
declare function Sheet(props: Readonly<SheetProps>): React.JSX.Element;
|
|
166
166
|
|
|
167
167
|
export { Sheet as S, Dialog as a, DialogBody as b, DialogContent as c, DialogDescription as d, DialogFooter as e, DialogHeader as f, DialogTitle as g, dialog as j };
|
|
168
168
|
export type { DialogContentProps as D, DialogVariants as h, SheetProps as i };
|
package/dist/dialog.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
export { a as Dialog, b as DialogBody, c as DialogContent, D as DialogContentProps, d as DialogDescription, e as DialogFooter, f as DialogHeader, g as DialogTitle, h as DialogVariants, S as Sheet, i as SheetProps, j as dialog } from './dialog-
|
|
2
|
+
export { a as Dialog, b as DialogBody, c as DialogContent, D as DialogContentProps, d as DialogDescription, e as DialogFooter, f as DialogHeader, g as DialogTitle, h as DialogVariants, S as Sheet, i as SheetProps, j as dialog } from './dialog-CFnxFGyn.js';
|
|
3
3
|
import 'tailwind-variants';
|
|
4
4
|
import 'radix-ui';
|
|
5
5
|
|
|
@@ -31,7 +31,7 @@ type AlertDialogProps = {
|
|
|
31
31
|
/** Classes of the dialog's content, merged last. */
|
|
32
32
|
className?: string;
|
|
33
33
|
};
|
|
34
|
-
declare function AlertDialog({ open: openProp, defaultOpen, onOpenChange, trigger, title, description, children, confirmLabel, cancelLabel, tone, onConfirm, container, className, }: AlertDialogProps): React.JSX.Element;
|
|
34
|
+
declare function AlertDialog({ open: openProp, defaultOpen, onOpenChange, trigger, title, description, children, confirmLabel, cancelLabel, tone, onConfirm, container, className, }: Readonly<AlertDialogProps>): React.JSX.Element;
|
|
35
35
|
|
|
36
36
|
export { AlertDialog };
|
|
37
37
|
export type { AlertDialogProps };
|
package/dist/dialog.js
CHANGED
|
@@ -10,13 +10,13 @@ import {
|
|
|
10
10
|
Sheet,
|
|
11
11
|
dialog,
|
|
12
12
|
useReturnFocus
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-N6LAWI4F.js";
|
|
14
14
|
import {
|
|
15
15
|
Button
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-HWIDTLLO.js";
|
|
17
17
|
import "./chunk-D3T54RSL.js";
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-EAXIDRMB.js";
|
|
19
|
+
import "./chunk-HHBTM4AU.js";
|
|
20
20
|
|
|
21
21
|
// src/dialog/alert-dialog.tsx
|
|
22
22
|
import { AlertDialog as AlertDialogPrimitive } from "radix-ui";
|
package/dist/dialog.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/dialog/alert-dialog.tsx"],"sourcesContent":["// Client. A confirmation that interrupts: Radix AlertDialog (role=\"alertdialog\", no outside click, focus on Cancel).\n// `onConfirm` may be async: the dialog stays open with the confirm button loading until it settles, closes when it\n// resolves, and stays open when it rejects (the product shows the error).\nimport { AlertDialog as AlertDialogPrimitive } from \"radix-ui\";\nimport * as React from \"react\";\n\nimport { Button } from \"../button/button\";\nimport { dialog } from \"./dialog\";\nimport { useReturnFocus } from \"./return-focus\";\n\nconst s = dialog({ placement: \"center\", size: \"sm\" });\n\n/** Radix's content, mounted only while open: it remembers the opener then and gives focus back on close (WCAG 2.4.3). */\nfunction ReturnFocusContent({ onCloseAutoFocus, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Content
|
|
1
|
+
{"version":3,"sources":["../src/dialog/alert-dialog.tsx"],"sourcesContent":["// Client. A confirmation that interrupts: Radix AlertDialog (role=\"alertdialog\", no outside click, focus on Cancel).\n// `onConfirm` may be async: the dialog stays open with the confirm button loading until it settles, closes when it\n// resolves, and stays open when it rejects (the product shows the error).\nimport { AlertDialog as AlertDialogPrimitive } from \"radix-ui\";\nimport * as React from \"react\";\n\nimport { Button } from \"../button/button\";\nimport { dialog } from \"./dialog\";\nimport { useReturnFocus } from \"./return-focus\";\n\nconst s = dialog({ placement: \"center\", size: \"sm\" });\n\n/** Radix's content, mounted only while open: it remembers the opener then and gives focus back on close (WCAG 2.4.3). */\nfunction ReturnFocusContent({ onCloseAutoFocus, ...props }: Readonly<React.ComponentProps<typeof AlertDialogPrimitive.Content>>) {\n return <AlertDialogPrimitive.Content onCloseAutoFocus={useReturnFocus(onCloseAutoFocus)} {...props} />;\n}\n\nexport type AlertDialogProps = {\n /** Open or closed (controlled), with `onOpenChange`. */\n open?: boolean;\n /** Open at first, uncontrolled. */\n defaultOpen?: boolean;\n /** Called when it opens or closes (never while `onConfirm` is pending). */\n onOpenChange?: (open: boolean) => void;\n /** The element that opens the dialog (rendered as is, `asChild`): a Button, an IconButton. */\n trigger?: React.ReactNode;\n /** The question asked (\"Delete this video?\"): the dialog's accessible name. */\n title: React.ReactNode;\n /** What the action does and what it costs: the dialog's description. */\n description?: React.ReactNode;\n /** More content between the description and the actions. */\n children?: React.ReactNode;\n /** The words of the confirm button — passed translated. */\n confirmLabel: string;\n /** The words of the cancel button (it takes the focus at open) — passed translated. */\n cancelLabel: string;\n /** `danger` for a destructive action (delete, leave, cancel a payment). */\n tone?: \"danger\" | \"primary\";\n /** Runs on confirm. A promise keeps the dialog open and the button loading until it settles. */\n onConfirm: () => void | Promise<unknown>;\n /** The element the portal renders into (default: document.body). */\n container?: HTMLElement | null;\n /** Classes of the dialog's content, merged last. */\n className?: string;\n};\n\nexport function AlertDialog({\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n trigger,\n title,\n description,\n children,\n confirmLabel,\n cancelLabel,\n tone = \"primary\",\n onConfirm,\n container,\n className,\n}: Readonly<AlertDialogProps>) {\n const [openState, setOpenState] = React.useState(defaultOpen);\n const [pending, setPending] = React.useState(false);\n const open = openProp ?? openState;\n\n const setOpen = (next: boolean) => {\n if (openProp === undefined) setOpenState(next);\n onOpenChange?.(next);\n };\n\n const confirm = async () => {\n setPending(true);\n try {\n await onConfirm();\n setOpen(false);\n } catch {\n // Stays open: the product reports the failure (a toast, an inline error) and the person may retry.\n } finally {\n setPending(false);\n }\n };\n\n return (\n <AlertDialogPrimitive.Root open={open} onOpenChange={(next) => (pending ? undefined : setOpen(next))}>\n {trigger && <AlertDialogPrimitive.Trigger asChild>{trigger}</AlertDialogPrimitive.Trigger>}\n <AlertDialogPrimitive.Portal container={container}>\n <AlertDialogPrimitive.Overlay className={s.overlay()} />\n <ReturnFocusContent\n data-tone={tone}\n aria-busy={pending || undefined}\n className={s.content({ className })}\n onEscapeKeyDown={(event) => pending && event.preventDefault()}\n >\n <div className={s.header({ className: \"pr-5\" })}>\n <AlertDialogPrimitive.Title className={s.title()}>{title}</AlertDialogPrimitive.Title>\n {description && <AlertDialogPrimitive.Description className={s.description()}>{description}</AlertDialogPrimitive.Description>}\n </div>\n {children && <div className={s.body()}>{children}</div>}\n <div className={s.footer()}>\n <AlertDialogPrimitive.Cancel asChild>\n <Button variant=\"ghost\" disabled={pending}>\n {cancelLabel}\n </Button>\n </AlertDialogPrimitive.Cancel>\n <Button variant={tone === \"danger\" ? \"danger\" : \"primary\"} loading={pending} onClick={confirm}>\n {confirmLabel}\n </Button>\n </div>\n </ReturnFocusContent>\n </AlertDialogPrimitive.Portal>\n </AlertDialogPrimitive.Root>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAGA,SAAS,eAAe,4BAA4B;AACpD,YAAY,WAAW;AAUd,cA+EC,YA/ED;AAJT,IAAM,IAAI,OAAO,EAAE,WAAW,UAAU,MAAM,KAAK,CAAC;AAGpD,SAAS,mBAAmB,EAAE,kBAAkB,GAAG,MAAM,GAAwE;AAC/H,SAAO,oBAAC,qBAAqB,SAArB,EAA6B,kBAAkB,eAAe,gBAAgB,GAAI,GAAG,OAAO;AACtG;AA+BO,SAAS,YAAY;AAAA,EAC1B,MAAM;AAAA,EACN,cAAc;AAAA,EACd;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACA;AACF,GAA+B;AAC7B,QAAM,CAAC,WAAW,YAAY,IAAU,eAAS,WAAW;AAC5D,QAAM,CAAC,SAAS,UAAU,IAAU,eAAS,KAAK;AAClD,QAAM,OAAO,YAAY;AAEzB,QAAM,UAAU,CAAC,SAAkB;AACjC,QAAI,aAAa,OAAW,cAAa,IAAI;AAC7C,mBAAe,IAAI;AAAA,EACrB;AAEA,QAAM,UAAU,YAAY;AAC1B,eAAW,IAAI;AACf,QAAI;AACF,YAAM,UAAU;AAChB,cAAQ,KAAK;AAAA,IACf,QAAQ;AAAA,IAER,UAAE;AACA,iBAAW,KAAK;AAAA,IAClB;AAAA,EACF;AAEA,SACE,qBAAC,qBAAqB,MAArB,EAA0B,MAAY,cAAc,CAAC,SAAU,UAAU,SAAY,QAAQ,IAAI,GAC/F;AAAA,eAAW,oBAAC,qBAAqB,SAArB,EAA6B,SAAO,MAAE,mBAAQ;AAAA,IAC3D,qBAAC,qBAAqB,QAArB,EAA4B,WAC3B;AAAA,0BAAC,qBAAqB,SAArB,EAA6B,WAAW,EAAE,QAAQ,GAAG;AAAA,MACtD;AAAA,QAAC;AAAA;AAAA,UACC,aAAW;AAAA,UACX,aAAW,WAAW;AAAA,UACtB,WAAW,EAAE,QAAQ,EAAE,UAAU,CAAC;AAAA,UAClC,iBAAiB,CAAC,UAAU,WAAW,MAAM,eAAe;AAAA,UAE5D;AAAA,iCAAC,SAAI,WAAW,EAAE,OAAO,EAAE,WAAW,OAAO,CAAC,GAC5C;AAAA,kCAAC,qBAAqB,OAArB,EAA2B,WAAW,EAAE,MAAM,GAAI,iBAAM;AAAA,cACxD,eAAe,oBAAC,qBAAqB,aAArB,EAAiC,WAAW,EAAE,YAAY,GAAI,uBAAY;AAAA,eAC7F;AAAA,YACC,YAAY,oBAAC,SAAI,WAAW,EAAE,KAAK,GAAI,UAAS;AAAA,YACjD,qBAAC,SAAI,WAAW,EAAE,OAAO,GACvB;AAAA,kCAAC,qBAAqB,QAArB,EAA4B,SAAO,MAClC,8BAAC,UAAO,SAAQ,SAAQ,UAAU,SAC/B,uBACH,GACF;AAAA,cACA,oBAAC,UAAO,SAAS,SAAS,WAAW,WAAW,WAAW,SAAS,SAAS,SAAS,SACnF,wBACH;AAAA,eACF;AAAA;AAAA;AAAA,MACF;AAAA,OACF;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -49,7 +49,7 @@ type DocsArticlePageProps = Omit<React.HTMLAttributes<HTMLElement>, "title"> & {
|
|
|
49
49
|
linkAs?: LinkComponent;
|
|
50
50
|
};
|
|
51
51
|
/** A documentation article: pages · breadcrumb, title, lead, facts, the reading column · contents; previous and next. */
|
|
52
|
-
declare function DocsArticlePage({ sidebar, sidebarLabel, breadcrumb, breadcrumbLabel, title, lead, facts, toc, pager, linkAs, children, ...props }: DocsArticlePageProps): React.JSX.Element;
|
|
52
|
+
declare function DocsArticlePage({ sidebar, sidebarLabel, breadcrumb, breadcrumbLabel, title, lead, facts, toc, pager, linkAs, children, ...props }: Readonly<DocsArticlePageProps>): React.JSX.Element;
|
|
53
53
|
|
|
54
54
|
export { DocsArticlePage };
|
|
55
55
|
export type { DocsArticlePageProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/docs-article-page/docs-article-page.tsx"],"sourcesContent":["// Server-safe. A documentation article in the docs frame (DocsLayout): the pages on the left, the breadcrumb, the\n// title, its lead and facts (updated, reading time), the reading column, the contents on the right, the previous and\n// next pages at the foot. On a phone the pages fold above the article and the contents become chips.\nimport { DocsLayout } from \"@krizaka/ui/docs-layout\";\nimport { type Fact, Facts } from \"@krizaka/ui/page\";\nimport type { LinkComponent } from \"@krizaka/ui/page-hero\";\nimport { Toc } from \"@krizaka/ui/toc\";\nimport type * as React from \"react\";\n\nexport type DocsArticlePageProps = Omit<React.HTMLAttributes<HTMLElement>, \"title\"> & {\n /** The documentation's pages (a nav of links). */\n sidebar: React.ReactNode;\n /** On a phone, the words that open the pages. */\n sidebarLabel: string;\n /** Where the page sits: `{ href, label }` from the hub down. */\n breadcrumb?: readonly { href: string; label: string }[];\n /** The breadcrumb's accessible name (`Breadcrumb`). */\n breadcrumbLabel?: string;\n /** The page's `h1`. */\n title: React.ReactNode;\n /** One or two sentences under it. */\n lead?: React.ReactNode;\n /** Facts under the lead: updated on, reading time, the version it documents. */\n facts?: readonly Fact[];\n /** The contents (its `h2`s): `{ id, label }`, and its label (`On this page`). */\n toc?: { label: string; items: readonly { id: string; label: string }[] };\n /** The previous and next pages, and their labels. */\n pager?: { previous?: { href: string; title: string }; next?: { href: string; title: string }; labels: { previous: string; next: string } };\n /** The article's body (prose, code blocks, diagrams). */\n children: React.ReactNode;\n /** The app's link component (Next's `Link`). */\n linkAs?: LinkComponent;\n};\n\n/** A documentation article: pages · breadcrumb, title, lead, facts, the reading column · contents; previous and next. */\nexport function DocsArticlePage({ sidebar, sidebarLabel, breadcrumb, breadcrumbLabel = \"Breadcrumb\", title, lead, facts, toc, pager, linkAs, children, ...props }: DocsArticlePageProps) {\n const L = (linkAs ?? \"a\") as React.ElementType;\n return (\n <DocsLayout sidebar={sidebar} sidebarLabel={sidebarLabel} toc={toc && <Toc label={toc.label} items={toc.items} />} {...props}>\n {breadcrumb && breadcrumb.length > 0 && (\n <nav aria-label={breadcrumbLabel}>\n <ol className=\"kz-tpl-crumbs\">\n {breadcrumb.map((c) => (\n <li key={c.href}>\n <L href={c.href}>{c.label}</L>\n </li>\n ))}\n </ol>\n </nav>\n )}\n <h1 className=\"kz-tpl-article-title\">{title}</h1>\n {lead && <p className=\"kz-tpl-article-lead\">{lead}</p>}\n {facts && facts.length > 0 && <Facts className=\"kz-tpl-article-meta\" items={facts} />}\n <div className=\"kz-tpl-prose\">{children}</div>\n {pager && (pager.previous || pager.next) && (\n <nav className=\"kz-tpl-pager\" aria-label={`${pager.labels.previous} · ${pager.labels.next}`}>\n {pager.previous && (\n <L href={pager.previous.href} rel=\"prev\">\n <small>{pager.labels.previous}</small>\n {pager.previous.title}\n </L>\n )}\n {pager.next && (\n <L href={pager.next.href} rel=\"next\">\n <small>{pager.labels.next}</small>\n {pager.next.title}\n </L>\n )}\n </nav>\n )}\n </DocsLayout>\n );\n}\n"],"mappings":";AAGA,SAAS,kBAAkB;AAC3B,SAAoB,aAAa;AAEjC,SAAS,WAAW;AAgCsD,cAmB9D,YAnB8D;AAHnE,SAAS,gBAAgB,EAAE,SAAS,cAAc,YAAY,kBAAkB,cAAc,OAAO,MAAM,OAAO,KAAK,OAAO,QAAQ,UAAU,GAAG,MAAM,
|
|
1
|
+
{"version":3,"sources":["../src/docs-article-page/docs-article-page.tsx"],"sourcesContent":["// Server-safe. A documentation article in the docs frame (DocsLayout): the pages on the left, the breadcrumb, the\n// title, its lead and facts (updated, reading time), the reading column, the contents on the right, the previous and\n// next pages at the foot. On a phone the pages fold above the article and the contents become chips.\nimport { DocsLayout } from \"@krizaka/ui/docs-layout\";\nimport { type Fact, Facts } from \"@krizaka/ui/page\";\nimport type { LinkComponent } from \"@krizaka/ui/page-hero\";\nimport { Toc } from \"@krizaka/ui/toc\";\nimport type * as React from \"react\";\n\nexport type DocsArticlePageProps = Omit<React.HTMLAttributes<HTMLElement>, \"title\"> & {\n /** The documentation's pages (a nav of links). */\n sidebar: React.ReactNode;\n /** On a phone, the words that open the pages. */\n sidebarLabel: string;\n /** Where the page sits: `{ href, label }` from the hub down. */\n breadcrumb?: readonly { href: string; label: string }[];\n /** The breadcrumb's accessible name (`Breadcrumb`). */\n breadcrumbLabel?: string;\n /** The page's `h1`. */\n title: React.ReactNode;\n /** One or two sentences under it. */\n lead?: React.ReactNode;\n /** Facts under the lead: updated on, reading time, the version it documents. */\n facts?: readonly Fact[];\n /** The contents (its `h2`s): `{ id, label }`, and its label (`On this page`). */\n toc?: { label: string; items: readonly { id: string; label: string }[] };\n /** The previous and next pages, and their labels. */\n pager?: { previous?: { href: string; title: string }; next?: { href: string; title: string }; labels: { previous: string; next: string } };\n /** The article's body (prose, code blocks, diagrams). */\n children: React.ReactNode;\n /** The app's link component (Next's `Link`). */\n linkAs?: LinkComponent;\n};\n\n/** A documentation article: pages · breadcrumb, title, lead, facts, the reading column · contents; previous and next. */\nexport function DocsArticlePage({ sidebar, sidebarLabel, breadcrumb, breadcrumbLabel = \"Breadcrumb\", title, lead, facts, toc, pager, linkAs, children, ...props }: Readonly<DocsArticlePageProps>) {\n const L = (linkAs ?? \"a\") as React.ElementType;\n return (\n <DocsLayout sidebar={sidebar} sidebarLabel={sidebarLabel} toc={toc && <Toc label={toc.label} items={toc.items} />} {...props}>\n {breadcrumb && breadcrumb.length > 0 && (\n <nav aria-label={breadcrumbLabel}>\n <ol className=\"kz-tpl-crumbs\">\n {breadcrumb.map((c) => (\n <li key={c.href}>\n <L href={c.href}>{c.label}</L>\n </li>\n ))}\n </ol>\n </nav>\n )}\n <h1 className=\"kz-tpl-article-title\">{title}</h1>\n {lead && <p className=\"kz-tpl-article-lead\">{lead}</p>}\n {facts && facts.length > 0 && <Facts className=\"kz-tpl-article-meta\" items={facts} />}\n <div className=\"kz-tpl-prose\">{children}</div>\n {pager && (pager.previous || pager.next) && (\n <nav className=\"kz-tpl-pager\" aria-label={`${pager.labels.previous} · ${pager.labels.next}`}>\n {pager.previous && (\n <L href={pager.previous.href} rel=\"prev\">\n <small>{pager.labels.previous}</small>\n {pager.previous.title}\n </L>\n )}\n {pager.next && (\n <L href={pager.next.href} rel=\"next\">\n <small>{pager.labels.next}</small>\n {pager.next.title}\n </L>\n )}\n </nav>\n )}\n </DocsLayout>\n );\n}\n"],"mappings":";AAGA,SAAS,kBAAkB;AAC3B,SAAoB,aAAa;AAEjC,SAAS,WAAW;AAgCsD,cAmB9D,YAnB8D;AAHnE,SAAS,gBAAgB,EAAE,SAAS,cAAc,YAAY,kBAAkB,cAAc,OAAO,MAAM,OAAO,KAAK,OAAO,QAAQ,UAAU,GAAG,MAAM,GAAmC;AACjM,QAAM,IAAK,UAAU;AACrB,SACE,qBAAC,cAAW,SAAkB,cAA4B,KAAK,OAAO,oBAAC,OAAI,OAAO,IAAI,OAAO,OAAO,IAAI,OAAO,GAAK,GAAG,OACpH;AAAA,kBAAc,WAAW,SAAS,KACjC,oBAAC,SAAI,cAAY,iBACf,8BAAC,QAAG,WAAU,iBACX,qBAAW,IAAI,CAAC,MACf,oBAAC,QACC,8BAAC,KAAE,MAAM,EAAE,MAAO,YAAE,OAAM,KADnB,EAAE,IAEX,CACD,GACH,GACF;AAAA,IAEF,oBAAC,QAAG,WAAU,wBAAwB,iBAAM;AAAA,IAC3C,QAAQ,oBAAC,OAAE,WAAU,uBAAuB,gBAAK;AAAA,IACjD,SAAS,MAAM,SAAS,KAAK,oBAAC,SAAM,WAAU,uBAAsB,OAAO,OAAO;AAAA,IACnF,oBAAC,SAAI,WAAU,gBAAgB,UAAS;AAAA,IACvC,UAAU,MAAM,YAAY,MAAM,SACjC,qBAAC,SAAI,WAAU,gBAAe,cAAY,GAAG,MAAM,OAAO,QAAQ,SAAM,MAAM,OAAO,IAAI,IACtF;AAAA,YAAM,YACL,qBAAC,KAAE,MAAM,MAAM,SAAS,MAAM,KAAI,QAChC;AAAA,4BAAC,WAAO,gBAAM,OAAO,UAAS;AAAA,QAC7B,MAAM,SAAS;AAAA,SAClB;AAAA,MAED,MAAM,QACL,qBAAC,KAAE,MAAM,MAAM,KAAK,MAAM,KAAI,QAC5B;AAAA,4BAAC,WAAO,gBAAM,OAAO,MAAK;AAAA,QACzB,MAAM,KAAK;AAAA,SACd;AAAA,OAEJ;AAAA,KAEJ;AAEJ;","names":[]}
|
package/dist/docs-hub-page.d.ts
CHANGED
|
@@ -73,7 +73,7 @@ type DocsHubPageProps = Omit<React.HTMLAttributes<HTMLElement>, "title"> & {
|
|
|
73
73
|
linksLayout?: "wrap" | "stack";
|
|
74
74
|
};
|
|
75
75
|
/** A documentation hub: search first, the collections in their brand, quick starts, popular and new pages. */
|
|
76
|
-
declare function DocsHubPage({ eyebrow, title, lead, search, searchHints, collectionsTitle, collections, quickstarts, popular, whatsNew, promise, linkAs, linksLayout, ...props }: DocsHubPageProps): React.JSX.Element;
|
|
76
|
+
declare function DocsHubPage({ eyebrow, title, lead, search, searchHints, collectionsTitle, collections, quickstarts, popular, whatsNew, promise, linkAs, linksLayout, ...props }: Readonly<DocsHubPageProps>): React.JSX.Element;
|
|
77
77
|
|
|
78
78
|
export { DocsHubPage };
|
|
79
79
|
export type { DocsCollection, DocsHubLink, DocsHubPageProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/docs-hub-page/docs-hub-page.tsx"],"sourcesContent":["// Server-safe. The entry of a documentation (blocks.css `.kz-tpl-hub-*`, `.kz-tpl-collections`): the search in the\n// middle of the hero, the collections each in its product's brand with its quick links, the quick starts beside the\n// most read pages, what is new from the registries, and the owl's promise. One column on a phone, the search first.\nimport { MascotQuote } from \"@krizaka/ui/mascot-quote\";\nimport { Section } from \"@krizaka/ui/page\";\nimport type { LinkComponent } from \"@krizaka/ui/page-hero\";\nimport { PageHero } from \"@krizaka/ui/page-hero\";\nimport * as React from \"react\";\n\nexport interface DocsCollection {\n /** A stable key. */\n id: string;\n /** The product's brand (`sovkora`…): the panel wears `.brand-<id>`. */\n brand?: string;\n /** The product's mark. */\n mark?: React.ReactNode;\n /** The collection's name: a link to its home. */\n title: string;\n /** Where it starts. */\n href: string;\n /** What it covers, in one sentence. */\n description?: React.ReactNode;\n /** Its most useful pages (three or four). */\n links?: readonly { href: string; label: string }[];\n}\n\nexport interface DocsHubLink {\n /** Where it leads. */\n href: string;\n /** The page's title. */\n title: React.ReactNode;\n /** On the right, in mono: a collection, a version, a date. */\n meta?: React.ReactNode;\n}\n\nexport type DocsHubPageProps = Omit<React.HTMLAttributes<HTMLElement>, \"title\"> & {\n /** A mono line above the title. */\n eyebrow?: React.ReactNode;\n /** The page's `h1`. */\n title: React.ReactNode;\n /** One sentence under it. */\n lead?: React.ReactNode;\n /** The search, front and centre (a SearchField, a button that opens the command palette). */\n search?: React.ReactNode;\n /** Under the search: what people look for (a few links or keys). */\n searchHints?: React.ReactNode;\n /** The collections' heading. */\n collectionsTitle: React.ReactNode;\n /** The collections, each in its brand. */\n collections: readonly DocsCollection[];\n /** The quick starts: a title and their samples (CodeBlocks, CodeTabs). */\n quickstarts?: { title: React.ReactNode; children: React.ReactNode };\n /** The most read pages. */\n popular?: { title: React.ReactNode; items: readonly DocsHubLink[] };\n /** What is new (releases from the registries, published pages). */\n whatsNew?: { title: React.ReactNode; items: readonly DocsHubLink[] };\n /** The owl's promise at the foot: what this documentation guarantees. */\n promise?: { label: React.ReactNode; text: React.ReactNode };\n /** The app's link component (Next's `Link`) for internal addresses. */\n linkAs?: LinkComponent;\n /**\n * How a collection's quick links sit: `wrap` (pills in a row that wraps) or `stack` (one pill per line, so the first\n * link of every card starts at the same height).\n * @default \"wrap\"\n */\n linksLayout?: \"wrap\" | \"stack\";\n};\n\nfunction List({ items, linkAs: Link = \"a\" }: { items: readonly DocsHubLink[]; linkAs?: LinkComponent }) {\n const L = Link as React.ElementType;\n return (\n <ul className=\"kz-tpl-links\">\n {items.map((item, i) => (\n <li key={`${i}:${item.href}`}>\n <L href={item.href}>\n <strong>{item.title}</strong>\n {item.meta && <small>{item.meta}</small>}\n </L>\n </li>\n ))}\n </ul>\n );\n}\n\n/** A documentation hub: search first, the collections in their brand, quick starts, popular and new pages. */\nexport function DocsHubPage({ eyebrow, title, lead, search, searchHints, collectionsTitle, collections, quickstarts, popular, whatsNew, promise, linkAs, linksLayout = \"wrap\", ...props }: DocsHubPageProps) {\n const L = (linkAs ?? \"a\") as React.ElementType;\n return (\n <div {...props}>\n <PageHero eyebrow={eyebrow} title={title} lead={lead} align=\"center\" backdrop=\"grid\">\n {(search || searchHints) && (\n <div className=\"kz-tpl-hub-search\">\n {search}\n {searchHints && <div className=\"kz-tpl-hub-hints\">{searchHints}</div>}\n </div>\n )}\n </PageHero>\n <Section id=\"collections\" title={collectionsTitle} headingSize=\"sm\" spacing=\"sm\">\n <ul className=\"kz-tpl-collections\">\n {collections.map((c) => (\n <li key={c.id} className={c.brand ? \"brand-\" + c.brand : undefined}>\n <div className=\"kz-tpl-collection\" data-links={linksLayout}>\n <div className=\"kz-tpl-collection-head\">\n {c.mark && <span aria-hidden>{c.mark}</span>}\n <L href={c.href}>{c.title}</L>\n </div>\n {c.description && <p>{c.description}</p>}\n {c.links && c.links.length > 0 && (\n <ul aria-label={c.title}>\n {c.links.map((l) => (\n <li key={l.href}>\n <L href={l.href}>{l.label}</L>\n </li>\n ))}\n </ul>\n )}\n </div>\n </li>\n ))}\n </ul>\n </Section>\n {(quickstarts || popular) && (\n <Section spacing=\"sm\" divider aria-label={typeof quickstarts?.title === \"string\" ? quickstarts.title : undefined}>\n <div className=\"kz-tpl-two\">\n {quickstarts && (\n <div className=\"kz-tpl-stack\">\n <h2 className=\"kz-heading-title kz-tpl-h2\">{quickstarts.title}</h2>\n {quickstarts.children}\n </div>\n )}\n {popular && (\n <div className=\"kz-tpl-stack\">\n <h2 className=\"kz-heading-title kz-tpl-h2\">{popular.title}</h2>\n <List items={popular.items} linkAs={linkAs} />\n </div>\n )}\n </div>\n </Section>\n )}\n {whatsNew && (\n <Section id=\"whats-new\" title={whatsNew.title} headingSize=\"sm\" spacing=\"sm\" divider>\n <List items={whatsNew.items} linkAs={linkAs} />\n </Section>\n )}\n {promise && (\n <Section spacing=\"sm\" aria-label={typeof promise.label === \"string\" ? promise.label : undefined}>\n <MascotQuote variant=\"callout\" bird=\"owl\" mood=\"welcome\" label={promise.label}>\n {promise.text}\n </MascotQuote>\n </Section>\n )}\n </div>\n );\n}\n"],"mappings":";AAGA,SAAS,mBAAmB;AAC5B,SAAS,eAAe;AAExB,SAAS,gBAAgB;AAoEf,SACE,KADF;AANV,SAAS,KAAK,EAAE,OAAO,QAAQ,OAAO,IAAI,
|
|
1
|
+
{"version":3,"sources":["../src/docs-hub-page/docs-hub-page.tsx"],"sourcesContent":["// Server-safe. The entry of a documentation (blocks.css `.kz-tpl-hub-*`, `.kz-tpl-collections`): the search in the\n// middle of the hero, the collections each in its product's brand with its quick links, the quick starts beside the\n// most read pages, what is new from the registries, and the owl's promise. One column on a phone, the search first.\nimport { MascotQuote } from \"@krizaka/ui/mascot-quote\";\nimport { Section } from \"@krizaka/ui/page\";\nimport type { LinkComponent } from \"@krizaka/ui/page-hero\";\nimport { PageHero } from \"@krizaka/ui/page-hero\";\nimport * as React from \"react\";\n\nexport interface DocsCollection {\n /** A stable key. */\n id: string;\n /** The product's brand (`sovkora`…): the panel wears `.brand-<id>`. */\n brand?: string;\n /** The product's mark. */\n mark?: React.ReactNode;\n /** The collection's name: a link to its home. */\n title: string;\n /** Where it starts. */\n href: string;\n /** What it covers, in one sentence. */\n description?: React.ReactNode;\n /** Its most useful pages (three or four). */\n links?: readonly { href: string; label: string }[];\n}\n\nexport interface DocsHubLink {\n /** Where it leads. */\n href: string;\n /** The page's title. */\n title: React.ReactNode;\n /** On the right, in mono: a collection, a version, a date. */\n meta?: React.ReactNode;\n}\n\nexport type DocsHubPageProps = Omit<React.HTMLAttributes<HTMLElement>, \"title\"> & {\n /** A mono line above the title. */\n eyebrow?: React.ReactNode;\n /** The page's `h1`. */\n title: React.ReactNode;\n /** One sentence under it. */\n lead?: React.ReactNode;\n /** The search, front and centre (a SearchField, a button that opens the command palette). */\n search?: React.ReactNode;\n /** Under the search: what people look for (a few links or keys). */\n searchHints?: React.ReactNode;\n /** The collections' heading. */\n collectionsTitle: React.ReactNode;\n /** The collections, each in its brand. */\n collections: readonly DocsCollection[];\n /** The quick starts: a title and their samples (CodeBlocks, CodeTabs). */\n quickstarts?: { title: React.ReactNode; children: React.ReactNode };\n /** The most read pages. */\n popular?: { title: React.ReactNode; items: readonly DocsHubLink[] };\n /** What is new (releases from the registries, published pages). */\n whatsNew?: { title: React.ReactNode; items: readonly DocsHubLink[] };\n /** The owl's promise at the foot: what this documentation guarantees. */\n promise?: { label: React.ReactNode; text: React.ReactNode };\n /** The app's link component (Next's `Link`) for internal addresses. */\n linkAs?: LinkComponent;\n /**\n * How a collection's quick links sit: `wrap` (pills in a row that wraps) or `stack` (one pill per line, so the first\n * link of every card starts at the same height).\n * @default \"wrap\"\n */\n linksLayout?: \"wrap\" | \"stack\";\n};\n\nfunction List({ items, linkAs: Link = \"a\" }: Readonly<{ items: readonly DocsHubLink[]; linkAs?: LinkComponent }>) {\n const L = Link as React.ElementType;\n return (\n <ul className=\"kz-tpl-links\">\n {items.map((item, i) => (\n <li key={`${i}:${item.href}`}>\n <L href={item.href}>\n <strong>{item.title}</strong>\n {item.meta && <small>{item.meta}</small>}\n </L>\n </li>\n ))}\n </ul>\n );\n}\n\n/** A documentation hub: search first, the collections in their brand, quick starts, popular and new pages. */\nexport function DocsHubPage({ eyebrow, title, lead, search, searchHints, collectionsTitle, collections, quickstarts, popular, whatsNew, promise, linkAs, linksLayout = \"wrap\", ...props }: Readonly<DocsHubPageProps>) {\n const L = (linkAs ?? \"a\") as React.ElementType;\n return (\n <div {...props}>\n <PageHero eyebrow={eyebrow} title={title} lead={lead} align=\"center\" backdrop=\"grid\">\n {(search || searchHints) && (\n <div className=\"kz-tpl-hub-search\">\n {search}\n {searchHints && <div className=\"kz-tpl-hub-hints\">{searchHints}</div>}\n </div>\n )}\n </PageHero>\n <Section id=\"collections\" title={collectionsTitle} headingSize=\"sm\" spacing=\"sm\">\n <ul className=\"kz-tpl-collections\">\n {collections.map((c) => (\n <li key={c.id} className={c.brand ? \"brand-\" + c.brand : undefined}>\n <div className=\"kz-tpl-collection\" data-links={linksLayout}>\n <div className=\"kz-tpl-collection-head\">\n {c.mark && <span aria-hidden>{c.mark}</span>}\n <L href={c.href}>{c.title}</L>\n </div>\n {c.description && <p>{c.description}</p>}\n {c.links && c.links.length > 0 && (\n <ul aria-label={c.title}>\n {c.links.map((l) => (\n <li key={l.href}>\n <L href={l.href}>{l.label}</L>\n </li>\n ))}\n </ul>\n )}\n </div>\n </li>\n ))}\n </ul>\n </Section>\n {(quickstarts || popular) && (\n <Section spacing=\"sm\" divider aria-label={typeof quickstarts?.title === \"string\" ? quickstarts.title : undefined}>\n <div className=\"kz-tpl-two\">\n {quickstarts && (\n <div className=\"kz-tpl-stack\">\n <h2 className=\"kz-heading-title kz-tpl-h2\">{quickstarts.title}</h2>\n {quickstarts.children}\n </div>\n )}\n {popular && (\n <div className=\"kz-tpl-stack\">\n <h2 className=\"kz-heading-title kz-tpl-h2\">{popular.title}</h2>\n <List items={popular.items} linkAs={linkAs} />\n </div>\n )}\n </div>\n </Section>\n )}\n {whatsNew && (\n <Section id=\"whats-new\" title={whatsNew.title} headingSize=\"sm\" spacing=\"sm\" divider>\n <List items={whatsNew.items} linkAs={linkAs} />\n </Section>\n )}\n {promise && (\n <Section spacing=\"sm\" aria-label={typeof promise.label === \"string\" ? promise.label : undefined}>\n <MascotQuote variant=\"callout\" b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
|
/** A documentation page: pages · article · contents, in the site's frame. */
|
|
76
|
-
declare function DocsLayout({ sidebar, sidebarLabel, toc, className, children, ...props }: DocsLayoutProps): React.JSX.Element;
|
|
76
|
+
declare function DocsLayout({ sidebar, sidebarLabel, toc, className, children, ...props }: Readonly<DocsLayoutProps>): React.JSX.Element;
|
|
77
77
|
|
|
78
78
|
export { DocsLayout, docsLayout };
|
|
79
79
|
export type { DocsLayoutProps };
|
package/dist/docs-layout.js
CHANGED
package/dist/docs-layout.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/docs-layout/docs-layout.tsx"],"sourcesContent":["// Server-safe. A documentation page in the site's frame (--kz-page-max-docs): the sidebar of pages, the article, the\n// table of contents — the three columns of the frame on a wide screen, the sidebar folded into a disclosure above the\n// article on a phone, the contents under the title as chips (a `Toc`). Its edges are the bar's: no column runs to the\n// window's edge.\nimport type * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { ChevronGlyph } from \"../glyphs\";\n\nexport const docsLayout = tv({\n slots: {\n root:\n \"mx-auto grid w-full max-w-[calc(var(--kz-page-max-docs,88rem)+2*var(--kz-page-gutter,24px))] grid-cols-1 gap-8 px-(--kz-page-gutter,16px) \" +\n \"pt-(--kz-hero-top,6rem) pb-16 lg:grid-cols-[15rem_minmax(0,1fr)] xl:grid-cols-[15rem_minmax(0,1fr)_13rem]\",\n sidebar: \"hidden lg:block lg:sticky lg:top-24 lg:max-h-[calc(100dvh-7rem)] lg:self-start lg:overflow-y-auto\",\n mobileNav: \"rounded-xl border border-border-default bg-surface-1 lg:hidden\",\n mobileSummary:\n \"flex min-h-11 cursor-pointer list-none items-center justify-between gap-2 px-4 text-sm font-semibold text-fg [&::-webkit-details-marker]:hidden \" +\n \"rounded-xl focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring [[open]>&>svg]:rotate-180\",\n mobileBody: \"border-t border-border-subtle px-2 py-2\",\n article: \"min-w-0 max-w-3xl\",\n toc: \"hidden xl:block xl:sticky xl:top-24 xl:self-start\",\n },\n});\nconst s = docsLayout();\n\nexport type DocsLayoutProps = React.ComponentProps<\"div\"> & {\n /** The pages of the documentation (a nav of links, grouped). */\n sidebar: React.ReactNode;\n /** On a phone the sidebar is folded: the words that open it (`Pages of the documentation`). */\n sidebarLabel: string;\n /** The page's table of contents (a `Toc` of @krizaka/ui/toc): beside the article from `xl`. */\n toc?: React.ReactNode;\n /** The article: its title, its body. */\n children: React.ReactNode;\n};\n\n/** A documentation page: pages · article · contents, in the site's frame. */\nexport function DocsLayout({ sidebar, sidebarLabel, toc, className, children, ...props }: DocsLayoutProps) {\n return (\n <div className={s.root({ className })} {...props}>\n <div className={s.sidebar()}>{sidebar}</div>\n <div className=\"flex min-w-0 flex-col gap-6\">\n <details className={s.mobileNav()}>\n <summary className={s.mobileSummary()}>\n {sidebarLabel} <ChevronGlyph className=\"h-4 w-4 transition-transform motion-reduce:transition-none\" />\n </summary>\n <div className={s.mobileBody()}>{sidebar}</div>\n </details>\n <article className={s.article()}>{children}</article>\n </div>\n {toc && <div className={s.toc()}>{toc}</div>}\n </div>\n );\n}\n"],"mappings":";;;;;AAKA,SAAS,UAAU;AAoCb,cAGI,YAHJ;AAhCC,IAAM,aAAa,GAAG;AAAA,EAC3B,OAAO;AAAA,IACL,MACE;AAAA,IAEF,SAAS;AAAA,IACT,WAAW;AAAA,IACX,eACE;AAAA,IAEF,YAAY;AAAA,IACZ,SAAS;AAAA,IACT,KAAK;AAAA,EACP;AACF,CAAC;AACD,IAAM,IAAI,WAAW;AAcd,SAAS,WAAW,EAAE,SAAS,cAAc,KAAK,WAAW,UAAU,GAAG,MAAM,
|
|
1
|
+
{"version":3,"sources":["../src/docs-layout/docs-layout.tsx"],"sourcesContent":["// Server-safe. A documentation page in the site's frame (--kz-page-max-docs): the sidebar of pages, the article, the\n// table of contents — the three columns of the frame on a wide screen, the sidebar folded into a disclosure above the\n// article on a phone, the contents under the title as chips (a `Toc`). Its edges are the bar's: no column runs to the\n// window's edge.\nimport type * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { ChevronGlyph } from \"../glyphs\";\n\nexport const docsLayout = tv({\n slots: {\n root:\n \"mx-auto grid w-full max-w-[calc(var(--kz-page-max-docs,88rem)+2*var(--kz-page-gutter,24px))] grid-cols-1 gap-8 px-(--kz-page-gutter,16px) \" +\n \"pt-(--kz-hero-top,6rem) pb-16 lg:grid-cols-[15rem_minmax(0,1fr)] xl:grid-cols-[15rem_minmax(0,1fr)_13rem]\",\n sidebar: \"hidden lg:block lg:sticky lg:top-24 lg:max-h-[calc(100dvh-7rem)] lg:self-start lg:overflow-y-auto\",\n mobileNav: \"rounded-xl border border-border-default bg-surface-1 lg:hidden\",\n mobileSummary:\n \"flex min-h-11 cursor-pointer list-none items-center justify-between gap-2 px-4 text-sm font-semibold text-fg [&::-webkit-details-marker]:hidden \" +\n \"rounded-xl focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring [[open]>&>svg]:rotate-180\",\n mobileBody: \"border-t border-border-subtle px-2 py-2\",\n article: \"min-w-0 max-w-3xl\",\n toc: \"hidden xl:block xl:sticky xl:top-24 xl:self-start\",\n },\n});\nconst s = docsLayout();\n\nexport type DocsLayoutProps = React.ComponentProps<\"div\"> & {\n /** The pages of the documentation (a nav of links, grouped). */\n sidebar: React.ReactNode;\n /** On a phone the sidebar is folded: the words that open it (`Pages of the documentation`). */\n sidebarLabel: string;\n /** The page's table of contents (a `Toc` of @krizaka/ui/toc): beside the article from `xl`. */\n toc?: React.ReactNode;\n /** The article: its title, its body. */\n children: React.ReactNode;\n};\n\n/** A documentation page: pages · article · contents, in the site's frame. */\nexport function DocsLayout({ sidebar, sidebarLabel, toc, className, children, ...props }: Readonly<DocsLayoutProps>) {\n return (\n <div className={s.root({ className })} {...props}>\n <div className={s.sidebar()}>{sidebar}</div>\n <div className=\"flex min-w-0 flex-col gap-6\">\n <details className={s.mobileNav()}>\n <summary className={s.mobileSummary()}>\n {sidebarLabel} <ChevronGlyph className=\"h-4 w-4 transition-transform motion-reduce:transition-none\" />\n </summary>\n <div className={s.mobileBody()}>{sidebar}</div>\n </details>\n <article className={s.article()}>{children}</article>\n </div>\n {toc && <div className={s.toc()}>{toc}</div>}\n </div>\n );\n}\n"],"mappings":";;;;;AAKA,SAAS,UAAU;AAoCb,cAGI,YAHJ;AAhCC,IAAM,aAAa,GAAG;AAAA,EAC3B,OAAO;AAAA,IACL,MACE;AAAA,IAEF,SAAS;AAAA,IACT,WAAW;AAAA,IACX,eACE;AAAA,IAEF,YAAY;AAAA,IACZ,SAAS;AAAA,IACT,KAAK;AAAA,EACP;AACF,CAAC;AACD,IAAM,IAAI,WAAW;AAcd,SAAS,WAAW,EAAE,SAAS,cAAc,KAAK,WAAW,UAAU,GAAG,MAAM,GAA8B;AACnH,SACE,qBAAC,SAAI,WAAW,EAAE,KAAK,EAAE,UAAU,CAAC,GAAI,GAAG,OACzC;AAAA,wBAAC,SAAI,WAAW,EAAE,QAAQ,GAAI,mBAAQ;AAAA,IACtC,qBAAC,SAAI,WAAU,+BACb;AAAA,2BAAC,aAAQ,WAAW,EAAE,UAAU,GAC9B;AAAA,6BAAC,aAAQ,WAAW,EAAE,cAAc,GACjC;AAAA;AAAA,UAAa;AAAA,UAAC,oBAAC,gBAAa,WAAU,8DAA6D;AAAA,WACtG;AAAA,QACA,oBAAC,SAAI,WAAW,EAAE,WAAW,GAAI,mBAAQ;AAAA,SAC3C;AAAA,MACA,oBAAC,aAAQ,WAAW,EAAE,QAAQ,GAAI,UAAS;AAAA,OAC7C;AAAA,IACC,OAAO,oBAAC,SAAI,WAAW,EAAE,IAAI,GAAI,eAAI;AAAA,KACxC;AAEJ;","names":[]}
|
package/dist/docs-nav.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ type DocsNavProps = Omit<React.HTMLAttributes<HTMLElement>, "children"> & {
|
|
|
23
23
|
linkAs?: LinkComponent;
|
|
24
24
|
};
|
|
25
25
|
/** The pages of the documentation in groups; the group of the current page is open, the others fold. */
|
|
26
|
-
declare function DocsNav({ label, groups, current, linkAs, className, ...props }: DocsNavProps): React.JSX.Element;
|
|
26
|
+
declare function DocsNav({ label, groups, current, linkAs, className, ...props }: Readonly<DocsNavProps>): React.JSX.Element;
|
|
27
27
|
|
|
28
28
|
export { DocsNav };
|
|
29
29
|
export type { DocsNavGroup, DocsNavProps };
|
package/dist/docs-nav.js
CHANGED
package/dist/docs-nav.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/docs-nav/docs-nav.tsx"],"sourcesContent":["// Server-safe. The pages of a documentation, grouped: a quiet list of links, each group a native `details` (open when it\n// holds the current page), only the current page marked. No state: the app tells which page is current.\nimport * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport type { LinkComponent } from \"../page-hero\";\n\nexport type DocsNavGroup = {\n /** A stable key. */\n id: string;\n /** The group's name — one word or two. */\n title: React.ReactNode;\n /** Its pages: a short, one-line title each. */\n items: readonly { href: string; label: React.ReactNode }[];\n};\n\nexport type DocsNavProps = Omit<React.HTMLAttributes<HTMLElement>, \"children\"> & {\n /** The navigation's accessible name (`Documentation`). */\n label: string;\n /** The groups, in order. */\n groups: readonly DocsNavGroup[];\n /** The `href` of the page being read. */\n current?: string;\n /** The app's link component (Next's `Link`). */\n linkAs?: LinkComponent;\n};\n\n/** The pages of the documentation in groups; the group of the current page is open, the others fold. */\nexport function DocsNav({ label, groups, current, linkAs, className, ...props }: DocsNavProps) {\n const L = linkAs ?? \"a\";\n return (\n <nav aria-label={label} className={cn(\"flex flex-col gap-1 text-sm\", className)} {...props}>\n {groups.map((g) => {\n const open = g.items.some((i) => i.href === current) || !current;\n return (\n <details key={g.id} open={open} className=\"group py-1\">\n <summary className=\"flex cursor-pointer list-none items-center justify-between rounded-md px-3 py-1.5 text-xs font-semibold text-fg-muted marker:content-none hover:text-fg focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring [&::-webkit-details-marker]:hidden\">\n {g.title}\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\" className=\"h-3.5 w-3.5 fill-none stroke-current stroke-2 transition-transform group-open:rotate-180 motion-reduce:transition-none\">\n <path d=\"m6 9 6 6 6-6\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n </summary>\n <ul className=\"mt-1 flex flex-col gap-0.5 border-l border-border-subtle\">\n {g.items.map((i) => (\n <li key={i.href}>\n <L\n href={i.href}\n aria-current={i.href === current ? \"page\" : undefined}\n className=\"-ml-px block truncate border-l border-transparent px-3 py-1.5 text-fg-secondary no-underline transition-colors hover:text-fg focus-visible:outline-2 focus-visible:outline-ring aria-[current=page]:border-accent aria-[current=page]:font-semibold aria-[current=page]:text-fg\"\n >\n {i.label}\n </L>\n </li>\n ))}\n </ul>\n </details>\n );\n })}\n </nav>\n );\n}\n"],"mappings":";;;;;AAoCY,SAGI,KAHJ;AARL,SAAS,QAAQ,EAAE,OAAO,QAAQ,SAAS,QAAQ,WAAW,GAAG,MAAM,
|
|
1
|
+
{"version":3,"sources":["../src/docs-nav/docs-nav.tsx"],"sourcesContent":["// Server-safe. The pages of a documentation, grouped: a quiet list of links, each group a native `details` (open when it\n// holds the current page), only the current page marked. No state: the app tells which page is current.\nimport * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport type { LinkComponent } from \"../page-hero\";\n\nexport type DocsNavGroup = {\n /** A stable key. */\n id: string;\n /** The group's name — one word or two. */\n title: React.ReactNode;\n /** Its pages: a short, one-line title each. */\n items: readonly { href: string; label: React.ReactNode }[];\n};\n\nexport type DocsNavProps = Omit<React.HTMLAttributes<HTMLElement>, \"children\"> & {\n /** The navigation's accessible name (`Documentation`). */\n label: string;\n /** The groups, in order. */\n groups: readonly DocsNavGroup[];\n /** The `href` of the page being read. */\n current?: string;\n /** The app's link component (Next's `Link`). */\n linkAs?: LinkComponent;\n};\n\n/** The pages of the documentation in groups; the group of the current page is open, the others fold. */\nexport function DocsNav({ label, groups, current, linkAs, className, ...props }: Readonly<DocsNavProps>) {\n const L = linkAs ?? \"a\";\n return (\n <nav aria-label={label} className={cn(\"flex flex-col gap-1 text-sm\", className)} {...props}>\n {groups.map((g) => {\n const open = g.items.some((i) => i.href === current) || !current;\n return (\n <details key={g.id} open={open} className=\"group py-1\">\n <summary className=\"flex cursor-pointer list-none items-center justify-between rounded-md px-3 py-1.5 text-xs font-semibold text-fg-muted marker:content-none hover:text-fg focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring [&::-webkit-details-marker]:hidden\">\n {g.title}\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\" className=\"h-3.5 w-3.5 fill-none stroke-current stroke-2 transition-transform group-open:rotate-180 motion-reduce:transition-none\">\n <path d=\"m6 9 6 6 6-6\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n </summary>\n <ul className=\"mt-1 flex flex-col gap-0.5 border-l border-border-subtle\">\n {g.items.map((i) => (\n <li key={i.href}>\n <L\n href={i.href}\n aria-current={i.href === current ? \"page\" : undefined}\n className=\"-ml-px block truncate border-l border-transparent px-3 py-1.5 text-fg-secondary no-underline transition-colors hover:text-fg focus-visible:outline-2 focus-visible:outline-ring aria-[current=page]:border-accent aria-[current=page]:font-semibold aria-[current=page]:text-fg\"\n >\n {i.label}\n </L>\n </li>\n ))}\n </ul>\n </details>\n );\n })}\n </nav>\n );\n}\n"],"mappings":";;;;;AAoCY,SAGI,KAHJ;AARL,SAAS,QAAQ,EAAE,OAAO,QAAQ,SAAS,QAAQ,WAAW,GAAG,MAAM,GAA2B;AACvG,QAAM,IAAI,UAAU;AACpB,SACE,oBAAC,SAAI,cAAY,OAAO,WAAW,GAAG,+BAA+B,SAAS,GAAI,GAAG,OAClF,iBAAO,IAAI,CAAC,MAAM;AACjB,UAAM,OAAO,EAAE,MAAM,KAAK,CAAC,MAAM,EAAE,SAAS,OAAO,KAAK,CAAC;AACzD,WACE,qBAAC,aAAmB,MAAY,WAAU,cACxC;AAAA,2BAAC,aAAQ,WAAU,gRAChB;AAAA,UAAE;AAAA,QACH,oBAAC,SAAI,SAAQ,aAAY,eAAY,QAAO,WAAU,SAAQ,WAAU,0HACtE,8BAAC,UAAK,GAAE,gBAAe,eAAc,SAAQ,gBAAe,SAAQ,GACtE;AAAA,SACF;AAAA,MACA,oBAAC,QAAG,WAAU,4DACX,YAAE,MAAM,IAAI,CAAC,MACZ,oBAAC,QACC;AAAA,QAAC;AAAA;AAAA,UACC,MAAM,EAAE;AAAA,UACR,gBAAc,EAAE,SAAS,UAAU,SAAS;AAAA,UAC5C,WAAU;AAAA,UAET,YAAE;AAAA;AAAA,MACL,KAPO,EAAE,IAQX,CACD,GACH;AAAA,SAnBY,EAAE,EAoBhB;AAAA,EAEJ,CAAC,GACH;AAEJ;","names":[]}
|
|
@@ -145,7 +145,7 @@ type DocumentHighlight = {
|
|
|
145
145
|
page?: number;
|
|
146
146
|
label?: string;
|
|
147
147
|
};
|
|
148
|
-
|
|
148
|
+
/** What the viewer found for a passage. */
|
|
149
149
|
/** The members of pdf.js the viewer uses (`pdfjs-dist` ≥ 5), typed here so the package does not depend on it. */
|
|
150
150
|
type PdfjsModule = {
|
|
151
151
|
GlobalWorkerOptions: {
|
|
@@ -212,7 +212,7 @@ type DocumentViewerProps = Omit<React.ComponentProps<"div">, "children" | "onCha
|
|
|
212
212
|
labels?: Partial<DocumentViewerLabels>;
|
|
213
213
|
};
|
|
214
214
|
/** A PDF with its passages lit — see the file's header. Client. */
|
|
215
|
-
declare function DocumentViewer({ src, loadPdfjs, workerSrc, highlights, activeId, onActiveChange, onLocate, onLoad, labels, className, ...props }: DocumentViewerProps): React.JSX.Element;
|
|
215
|
+
declare function DocumentViewer({ src, loadPdfjs, workerSrc, highlights, activeId, onActiveChange, onLocate, onLoad, labels, className, ...props }: Readonly<DocumentViewerProps>): React.JSX.Element;
|
|
216
216
|
|
|
217
217
|
export { DocumentViewer, documentViewer, documentViewerLabels, fold, locateQuote, locateRegion, resolveHighlight };
|
|
218
218
|
export type { Box, DocumentHighlight, DocumentViewerLabels, DocumentViewerProps, Located, PageText, PdfDocument, PdfPage, PdfjsModule, Region, TextItem };
|
package/dist/document-viewer.js
CHANGED
|
@@ -67,7 +67,7 @@ function boxesOf(page, index, from, to) {
|
|
|
67
67
|
}
|
|
68
68
|
const merged = [];
|
|
69
69
|
for (const b of raw) {
|
|
70
|
-
const last = merged
|
|
70
|
+
const last = merged.at(-1);
|
|
71
71
|
const sameLine = last && Math.abs(last.y - b.y) < last.height * 0.5 && b.x - (last.x + last.width) < last.height * 1.5 && b.x >= last.x - 1e-9;
|
|
72
72
|
if (last && sameLine) {
|
|
73
73
|
const right = Math.max(last.x + last.width, b.x + b.width);
|
|
@@ -134,7 +134,7 @@ var documentViewerLabels = {
|
|
|
134
134
|
notFound: "This passage is not in the document's text layer:"
|
|
135
135
|
};
|
|
136
136
|
var regionKey = (r) => r ? [r.page, r.x, r.y, r.width, r.height].join(",") : "";
|
|
137
|
-
var fill = (template, vars) => template.
|
|
137
|
+
var fill = (template, vars) => template.replaceAll(/\{(\w+)\}/g, (m, k) => k in vars ? String(vars[k]) : m);
|
|
138
138
|
var isItem = (x) => typeof x === "object" && x !== null && typeof x.str === "string" && Array.isArray(x.transform);
|
|
139
139
|
function PageCanvas({ page, doc, caption, onReady, className }) {
|
|
140
140
|
const ref = React.useRef(null);
|
|
@@ -185,7 +185,7 @@ function DocumentViewer({ src, loadPdfjs, workerSrc, highlights = [], activeId =
|
|
|
185
185
|
const [loaded, setPhase] = React.useState({ state: "loading" });
|
|
186
186
|
const callbacks = useLatest({ onLoad, onLocate });
|
|
187
187
|
const containerRef = React.useRef(null);
|
|
188
|
-
const bytes = typeof src === "string" ? src : src.byteLength + ":" + src[0] + ":" + src
|
|
188
|
+
const bytes = typeof src === "string" ? src : src.byteLength + ":" + src[0] + ":" + src.at(-1);
|
|
189
189
|
const phase = loaded.state !== "loading" && loaded.key !== bytes ? { state: "loading" } : loaded;
|
|
190
190
|
React.useEffect(() => {
|
|
191
191
|
let cancelled = false;
|