@punica/components 0.0.0-stage → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +48 -0
- package/LICENSE +21 -0
- package/README.md +139 -2
- package/bin/punica-components.mjs +138 -0
- package/custom-elements.json +38745 -0
- package/dist/ai/index.d.ts +39 -0
- package/dist/ai/index.mjs +615 -0
- package/dist/ai/node.d.ts +5 -0
- package/dist/ai/node.mjs +625 -0
- package/dist/esm/chunks/chunk-25RFU6B5.js +25 -0
- package/dist/esm/chunks/chunk-2EK3PZFT.js +179 -0
- package/dist/esm/chunks/chunk-2KBDCVUH.js +20 -0
- package/dist/esm/chunks/chunk-2NCRRDPI.js +151 -0
- package/dist/esm/chunks/chunk-33GO7Z32.js +40 -0
- package/dist/esm/chunks/chunk-36BKRO3B.js +281 -0
- package/dist/esm/chunks/chunk-3DWJAU5S.js +607 -0
- package/dist/esm/chunks/chunk-3GOFXBR7.js +61 -0
- package/dist/esm/chunks/chunk-3H5QEUFO.js +21 -0
- package/dist/esm/chunks/chunk-3NHCLXYC.js +6 -0
- package/dist/esm/chunks/chunk-3NQ2RVWE.js +36 -0
- package/dist/esm/chunks/chunk-3SYFLID6.js +20 -0
- package/dist/esm/chunks/chunk-3TK5BG5K.js +322 -0
- package/dist/esm/chunks/chunk-3WLKVJO4.js +36 -0
- package/dist/esm/chunks/chunk-427DCAZS.js +49 -0
- package/dist/esm/chunks/chunk-4446KGJH.js +67 -0
- package/dist/esm/chunks/chunk-45UR4HAQ.js +128 -0
- package/dist/esm/chunks/chunk-46P3CPXM.js +81 -0
- package/dist/esm/chunks/chunk-4C3AUANN.js +271 -0
- package/dist/esm/chunks/chunk-4RURT4SK.js +142 -0
- package/dist/esm/chunks/chunk-4XJKCJQG.js +166 -0
- package/dist/esm/chunks/chunk-5PKJV3JP.js +61 -0
- package/dist/esm/chunks/chunk-5SSKNOUZ.js +141 -0
- package/dist/esm/chunks/chunk-5XB5CUJU.js +18 -0
- package/dist/esm/chunks/chunk-5XQX7D2B.js +27 -0
- package/dist/esm/chunks/chunk-6A5Q3TR2.js +73 -0
- package/dist/esm/chunks/chunk-6HE2DQS5.js +29 -0
- package/dist/esm/chunks/chunk-6IWDX7AR.js +32 -0
- package/dist/esm/chunks/chunk-6LO2ITXI.js +138 -0
- package/dist/esm/chunks/chunk-6NSNMUZE.js +36 -0
- package/dist/esm/chunks/chunk-6UQOC4YG.js +61 -0
- package/dist/esm/chunks/chunk-72ANEBJJ.js +138 -0
- package/dist/esm/chunks/chunk-7JTOYPC7.js +24 -0
- package/dist/esm/chunks/chunk-7O3D52ZO.js +27 -0
- package/dist/esm/chunks/chunk-7UN7TAOI.js +39 -0
- package/dist/esm/chunks/chunk-7WEISIJL.js +123 -0
- package/dist/esm/chunks/chunk-7YAUHJR2.js +225 -0
- package/dist/esm/chunks/chunk-7ZT7WUEL.js +35 -0
- package/dist/esm/chunks/chunk-ALU2KZWS.js +177 -0
- package/dist/esm/chunks/chunk-AMVMOCUW.js +81 -0
- package/dist/esm/chunks/chunk-APPQS53K.js +81 -0
- package/dist/esm/chunks/chunk-AVTATVAG.js +410 -0
- package/dist/esm/chunks/chunk-AZMUP33Z.js +56 -0
- package/dist/esm/chunks/chunk-B32J3O2V.js +21 -0
- package/dist/esm/chunks/chunk-B7YCX5VB.js +38 -0
- package/dist/esm/chunks/chunk-BBSDD7DS.js +55 -0
- package/dist/esm/chunks/chunk-BC657356.js +93 -0
- package/dist/esm/chunks/chunk-BFRWXGP4.js +44 -0
- package/dist/esm/chunks/chunk-BYZADSVQ.js +49 -0
- package/dist/esm/chunks/chunk-CDXX27FL.js +28 -0
- package/dist/esm/chunks/chunk-CKI34FQL.js +166 -0
- package/dist/esm/chunks/chunk-CNT47W5N.js +60 -0
- package/dist/esm/chunks/chunk-CU3RW3AS.js +515 -0
- package/dist/esm/chunks/chunk-CZ3R7GRW.js +73 -0
- package/dist/esm/chunks/chunk-DLEJ74RA.js +18 -0
- package/dist/esm/chunks/chunk-DPOPZQ7A.js +150 -0
- package/dist/esm/chunks/chunk-DYXHKPQU.js +18 -0
- package/dist/esm/chunks/chunk-E3XOZZSK.js +77 -0
- package/dist/esm/chunks/chunk-EJLQD3FS.js +89 -0
- package/dist/esm/chunks/chunk-ELY5HYAI.js +45 -0
- package/dist/esm/chunks/chunk-ELY5NJBV.js +152 -0
- package/dist/esm/chunks/chunk-EWIF3VBH.js +45 -0
- package/dist/esm/chunks/chunk-F2OASWR4.js +79 -0
- package/dist/esm/chunks/chunk-F4ODKLNS.js +62 -0
- package/dist/esm/chunks/chunk-F5HKSUTX.js +127 -0
- package/dist/esm/chunks/chunk-FFH6CIAJ.js +208 -0
- package/dist/esm/chunks/chunk-FFLBSXWE.js +21 -0
- package/dist/esm/chunks/chunk-FNTBMCUQ.js +184 -0
- package/dist/esm/chunks/chunk-FYSNICNC.js +71 -0
- package/dist/esm/chunks/chunk-G2QRQLP5.js +18 -0
- package/dist/esm/chunks/chunk-G36PG2LK.js +27 -0
- package/dist/esm/chunks/chunk-G5LARXMF.js +73 -0
- package/dist/esm/chunks/chunk-GQLNLUQX.js +42 -0
- package/dist/esm/chunks/chunk-GRWYCZQZ.js +73 -0
- package/dist/esm/chunks/chunk-GSXWSHYU.js +304 -0
- package/dist/esm/chunks/chunk-GVH32USX.js +48 -0
- package/dist/esm/chunks/chunk-GW3IYQNO.js +271 -0
- package/dist/esm/chunks/chunk-H4Q2HHZA.js +151 -0
- package/dist/esm/chunks/chunk-HDHVTBGS.js +330 -0
- package/dist/esm/chunks/chunk-HK6DEJO3.js +74 -0
- package/dist/esm/chunks/chunk-HUMTZKOD.js +114 -0
- package/dist/esm/chunks/chunk-HW2CN2JV.js +118 -0
- package/dist/esm/chunks/chunk-I6WGYC6M.js +50 -0
- package/dist/esm/chunks/chunk-ICGI6UOP.js +28 -0
- package/dist/esm/chunks/chunk-IYZKVVEX.js +285 -0
- package/dist/esm/chunks/chunk-J4HTWL4Q.js +34 -0
- package/dist/esm/chunks/chunk-J6FXZP6E.js +99 -0
- package/dist/esm/chunks/chunk-JTIBDZBU.js +392 -0
- package/dist/esm/chunks/chunk-K2OIQJ36.js +23 -0
- package/dist/esm/chunks/chunk-K5D5UHVI.js +99 -0
- package/dist/esm/chunks/chunk-K753LIJX.js +157 -0
- package/dist/esm/chunks/chunk-KV4Y5ZP5.js +105 -0
- package/dist/esm/chunks/chunk-KVWZQINH.js +44 -0
- package/dist/esm/chunks/chunk-LKKKFYM4.js +106 -0
- package/dist/esm/chunks/chunk-LKPOFLSP.js +337 -0
- package/dist/esm/chunks/chunk-LSDTMST7.js +6 -0
- package/dist/esm/chunks/chunk-LUASZ5NH.js +271 -0
- package/dist/esm/chunks/chunk-LUPYODQN.js +54 -0
- package/dist/esm/chunks/chunk-M3HQENQG.js +93 -0
- package/dist/esm/chunks/chunk-MCHPBSW4.js +155 -0
- package/dist/esm/chunks/chunk-MDEV5WIN.js +25 -0
- package/dist/esm/chunks/chunk-MF2ASALV.js +194 -0
- package/dist/esm/chunks/chunk-MIUSZNAX.js +62 -0
- package/dist/esm/chunks/chunk-NINGLTB2.js +194 -0
- package/dist/esm/chunks/chunk-NLFUTVKG.js +158 -0
- package/dist/esm/chunks/chunk-NNCGUKTM.js +44 -0
- package/dist/esm/chunks/chunk-NSCGX5GB.js +408 -0
- package/dist/esm/chunks/chunk-NTIMVMDT.js +51 -0
- package/dist/esm/chunks/chunk-OBUW2HDW.js +99 -0
- package/dist/esm/chunks/chunk-OKRRNW3E.js +202 -0
- package/dist/esm/chunks/chunk-PGWADMK3.js +198 -0
- package/dist/esm/chunks/chunk-PMGKVE2V.js +30 -0
- package/dist/esm/chunks/chunk-PMLVGWVZ.js +80 -0
- package/dist/esm/chunks/chunk-PXECURYJ.js +78 -0
- package/dist/esm/chunks/chunk-Q2766HFS.js +34 -0
- package/dist/esm/chunks/chunk-Q62K7757.js +22 -0
- package/dist/esm/chunks/chunk-Q7JNV3UN.js +192 -0
- package/dist/esm/chunks/chunk-QRJKBLYH.js +43 -0
- package/dist/esm/chunks/chunk-QRZWLIUQ.js +551 -0
- package/dist/esm/chunks/chunk-RKF3ZNBC.js +25 -0
- package/dist/esm/chunks/chunk-RMJM6NWT.js +58 -0
- package/dist/esm/chunks/chunk-ROTG34TD.js +81 -0
- package/dist/esm/chunks/chunk-RQ2NYS2W.js +51 -0
- package/dist/esm/chunks/chunk-RX5HOB7L.js +187 -0
- package/dist/esm/chunks/chunk-RYOY6CGB.js +174 -0
- package/dist/esm/chunks/chunk-S2P6I4PF.js +191 -0
- package/dist/esm/chunks/chunk-SCSGRIQM.js +27 -0
- package/dist/esm/chunks/chunk-SENDWPHS.js +115 -0
- package/dist/esm/chunks/chunk-SFY6NIVM.js +106 -0
- package/dist/esm/chunks/chunk-SHEACXCO.js +67 -0
- package/dist/esm/chunks/chunk-SII4GAN2.js +302 -0
- package/dist/esm/chunks/chunk-SIUUXS2M.js +172 -0
- package/dist/esm/chunks/chunk-SLXOGLX4.js +39 -0
- package/dist/esm/chunks/chunk-ST7UASSS.js +43 -0
- package/dist/esm/chunks/chunk-SUNHM3W2.js +211 -0
- package/dist/esm/chunks/chunk-SWTIN4AS.js +43 -0
- package/dist/esm/chunks/chunk-T2FH4DTZ.js +163 -0
- package/dist/esm/chunks/chunk-TK5H2DLW.js +157 -0
- package/dist/esm/chunks/chunk-U3SSEG6P.js +31 -0
- package/dist/esm/chunks/chunk-UNQEQ3F2.js +118 -0
- package/dist/esm/chunks/chunk-UP3ZQ5S6.js +155 -0
- package/dist/esm/chunks/chunk-UQFS4FAE.js +80 -0
- package/dist/esm/chunks/chunk-UZXXUKV6.js +124 -0
- package/dist/esm/chunks/chunk-VF4NHXZG.js +33 -0
- package/dist/esm/chunks/chunk-VIGFMBQW.js +337 -0
- package/dist/esm/chunks/chunk-VJBXT6L2.js +86 -0
- package/dist/esm/chunks/chunk-VM4IKZDR.js +211 -0
- package/dist/esm/chunks/chunk-VPCWI2SH.js +18 -0
- package/dist/esm/chunks/chunk-VR225VA6.js +29 -0
- package/dist/esm/chunks/chunk-WEGQW4SS.js +285 -0
- package/dist/esm/chunks/chunk-WHXEETCS.js +80 -0
- package/dist/esm/chunks/chunk-X2XT4SYI.js +71 -0
- package/dist/esm/chunks/chunk-X6Y3S66P.js +91 -0
- package/dist/esm/chunks/chunk-XBFOPEHZ.js +86 -0
- package/dist/esm/chunks/chunk-XE74KQOC.js +18 -0
- package/dist/esm/chunks/chunk-XNMQ4SC7.js +95 -0
- package/dist/esm/chunks/chunk-XWPDELI6.js +53 -0
- package/dist/esm/chunks/chunk-XWZPKK2I.js +6 -0
- package/dist/esm/chunks/chunk-XZSAOJUV.js +83 -0
- package/dist/esm/chunks/chunk-Y5BQXWLM.js +58 -0
- package/dist/esm/chunks/chunk-Y5HOTHVK.js +22 -0
- package/dist/esm/chunks/chunk-Y7B65FYJ.js +336 -0
- package/dist/esm/chunks/chunk-YIAEOUGS.js +46 -0
- package/dist/esm/chunks/chunk-YKL6MAIV.js +208 -0
- package/dist/esm/chunks/chunk-YPH3G6P7.js +125 -0
- package/dist/esm/chunks/chunk-YSGWORUD.js +36 -0
- package/dist/esm/chunks/chunk-ZB7DQSJK.js +204 -0
- package/dist/esm/chunks/chunk-ZC7JPIL7.js +182 -0
- package/dist/esm/chunks/chunk-ZGBBW7U4.js +35 -0
- package/dist/esm/chunks/chunk-ZIQREEEI.js +210 -0
- package/dist/esm/chunks/chunk-ZJ3UIJ46.js +30 -0
- package/dist/esm/chunks/chunk-ZK6JTE6K.js +826 -0
- package/dist/esm/chunks/chunk-ZPIJWNFB.js +150 -0
- package/dist/esm/chunks/chunk-ZQVI42RW.js +136 -0
- package/dist/esm/chunks/chunk-ZWP6KATC.js +25 -0
- package/dist/esm/chunks/chunk-ZY5YHMTQ.js +88 -0
- package/dist/esm/components/accordion/accordion.js +8 -0
- package/dist/esm/components/accordion/accordionGroup.js +7 -0
- package/dist/esm/components/agenda/agenda.js +9 -0
- package/dist/esm/components/alert/alert.js +8 -0
- package/dist/esm/components/alertDialog/alertDialog.js +14 -0
- package/dist/esm/components/appBar/appBar.js +7 -0
- package/dist/esm/components/appShell/appShell.js +11 -0
- package/dist/esm/components/aspectRatio/aspectRatio.js +7 -0
- package/dist/esm/components/autocomplete/autocomplete.js +14 -0
- package/dist/esm/components/avatar/avatar.js +7 -0
- package/dist/esm/components/avatarGroup/avatarGroup.js +11 -0
- package/dist/esm/components/badge/badge.js +7 -0
- package/dist/esm/components/banner/banner.js +9 -0
- package/dist/esm/components/blockquote/blockquote.js +7 -0
- package/dist/esm/components/bottomSheet/bottomSheet.js +9 -0
- package/dist/esm/components/box/box.js +7 -0
- package/dist/esm/components/breadcrumbs/breadcrumbItem.js +8 -0
- package/dist/esm/components/breadcrumbs/breadcrumbs.js +11 -0
- package/dist/esm/components/button/button.js +8 -0
- package/dist/esm/components/buttonGroup/buttonGroup.js +7 -0
- package/dist/esm/components/calendar/calendar.js +12 -0
- package/dist/esm/components/calendar/dates.js +44 -0
- package/dist/esm/components/card/card.js +7 -0
- package/dist/esm/components/card/cardActions.js +7 -0
- package/dist/esm/components/card/cardContent.js +7 -0
- package/dist/esm/components/card/cardHeader.js +7 -0
- package/dist/esm/components/card/cardMedia.js +7 -0
- package/dist/esm/components/carousel/carousel.js +9 -0
- package/dist/esm/components/carousel/carouselItem.js +7 -0
- package/dist/esm/components/center/center.js +7 -0
- package/dist/esm/components/chat/chatComposer.js +9 -0
- package/dist/esm/components/chat/chatDictationButton.js +8 -0
- package/dist/esm/components/chat/chatLayout.js +9 -0
- package/dist/esm/components/chat/chatMessage.js +9 -0
- package/dist/esm/components/chat/chatMessageBubble.js +7 -0
- package/dist/esm/components/chat/chatMessageList.js +8 -0
- package/dist/esm/components/chat/chatMessageMetadata.js +7 -0
- package/dist/esm/components/chat/chatSystemMessage.js +7 -0
- package/dist/esm/components/chat/chatToolCall.js +9 -0
- package/dist/esm/components/chat/chatToolCalls.js +8 -0
- package/dist/esm/components/chat/slots.js +6 -0
- package/dist/esm/components/checkbox/checkbox.js +9 -0
- package/dist/esm/components/checkboxGroup/checkboxGroup.js +10 -0
- package/dist/esm/components/chip/chip.js +8 -0
- package/dist/esm/components/citation/citation.js +11 -0
- package/dist/esm/components/code/code.js +7 -0
- package/dist/esm/components/codeBlock/codeBlock.js +8 -0
- package/dist/esm/components/collapsible/collapsible.js +7 -0
- package/dist/esm/components/commandPalette/commandGroup.js +7 -0
- package/dist/esm/components/commandPalette/commandItem.js +7 -0
- package/dist/esm/components/commandPalette/commandPalette.js +10 -0
- package/dist/esm/components/complexSelector/complexOption.js +9 -0
- package/dist/esm/components/complexSelector/complexSelector.js +16 -0
- package/dist/esm/components/complexSelector/optionGroup.js +7 -0
- package/dist/esm/components/container/container.js +7 -0
- package/dist/esm/components/contextMenu/contextMenu.js +12 -0
- package/dist/esm/components/datePicker/datePicker.js +15 -0
- package/dist/esm/components/dateRangeInput/dateRangeInput.js +15 -0
- package/dist/esm/components/dateTimeInput/dateTimeInput.js +18 -0
- package/dist/esm/components/dialog/dialog.js +11 -0
- package/dist/esm/components/dialog/dialogContent.js +7 -0
- package/dist/esm/components/dialog/dialogFooter.js +7 -0
- package/dist/esm/components/dialog/dialogHeader.js +7 -0
- package/dist/esm/components/dialog/modalSurface.js +8 -0
- package/dist/esm/components/divider/divider.js +7 -0
- package/dist/esm/components/drawer/drawer.js +10 -0
- package/dist/esm/components/emptyState/emptyState.js +7 -0
- package/dist/esm/components/field/field.js +7 -0
- package/dist/esm/components/fileInput/fileInput.js +9 -0
- package/dist/esm/components/formLayout/formLayout.js +7 -0
- package/dist/esm/components/grid/col.js +7 -0
- package/dist/esm/components/grid/row.js +7 -0
- package/dist/esm/components/heading/heading.js +7 -0
- package/dist/esm/components/hidden/hidden.js +7 -0
- package/dist/esm/components/hoverCard/hoverCard.js +9 -0
- package/dist/esm/components/icon/icon.js +8 -0
- package/dist/esm/components/iconButton/iconButton.js +8 -0
- package/dist/esm/components/infoTip/infoTip.js +10 -0
- package/dist/esm/components/input/input.js +9 -0
- package/dist/esm/components/inputGroup/inputGroup.js +9 -0
- package/dist/esm/components/inputGroup/inputGroupText.js +7 -0
- package/dist/esm/components/kbd/kbd.js +7 -0
- package/dist/esm/components/lightbox/lightbox.js +10 -0
- package/dist/esm/components/link/link.js +8 -0
- package/dist/esm/components/listView/list.js +7 -0
- package/dist/esm/components/listView/listItem.js +7 -0
- package/dist/esm/components/listbox/listbox.js +9 -0
- package/dist/esm/components/listbox/listboxItem.js +8 -0
- package/dist/esm/components/markdown/markdown.js +9 -0
- package/dist/esm/components/markdown/parser.js +9 -0
- package/dist/esm/components/markdown/url.js +6 -0
- package/dist/esm/components/menu/menu.js +11 -0
- package/dist/esm/components/menu/menuCheckboxItem.js +9 -0
- package/dist/esm/components/menu/menuDivider.js +7 -0
- package/dist/esm/components/menu/menuGroup.js +7 -0
- package/dist/esm/components/menu/menuItem.js +8 -0
- package/dist/esm/components/menu/menuRadioGroup.js +7 -0
- package/dist/esm/components/menu/menuRadioItem.js +9 -0
- package/dist/esm/components/metadataList/metadataList.js +9 -0
- package/dist/esm/components/metadataList/metadataListItem.js +8 -0
- package/dist/esm/components/mobileNav/mobileNav.js +10 -0
- package/dist/esm/components/numberInput/numberInput.js +9 -0
- package/dist/esm/components/outline/outline.js +8 -0
- package/dist/esm/components/overflowList/overflowList.js +11 -0
- package/dist/esm/components/pagination/pagination.js +8 -0
- package/dist/esm/components/paper/paper.js +7 -0
- package/dist/esm/components/popover/popover.js +9 -0
- package/dist/esm/components/powerSearch/powerSearch.js +14 -0
- package/dist/esm/components/progressBar/progressBar.js +7 -0
- package/dist/esm/components/qrCode/qrCode.js +9 -0
- package/dist/esm/components/radio/radio.js +7 -0
- package/dist/esm/components/radio/radioGroup.js +10 -0
- package/dist/esm/components/scrollArea/scrollArea.js +8 -0
- package/dist/esm/components/section/section.js +8 -0
- package/dist/esm/components/segmentedControl/segmentedControl.js +12 -0
- package/dist/esm/components/segmentedControl/segmentedControlItem.js +7 -0
- package/dist/esm/components/select/field.js +18 -0
- package/dist/esm/components/select/option.js +8 -0
- package/dist/esm/components/select/select.js +14 -0
- package/dist/esm/components/selectableCard/selectableCard.js +9 -0
- package/dist/esm/components/selectableCard/selectableCardGroup.js +13 -0
- package/dist/esm/components/sideNav/sideNav.js +9 -0
- package/dist/esm/components/sideNav/sideNavItem.js +9 -0
- package/dist/esm/components/sideNav/sideNavSection.js +8 -0
- package/dist/esm/components/skeleton/skeleton.js +7 -0
- package/dist/esm/components/slider/slider.js +9 -0
- package/dist/esm/components/spinner/spinner.js +7 -0
- package/dist/esm/components/split/split.js +8 -0
- package/dist/esm/components/splitButton/splitButton.js +12 -0
- package/dist/esm/components/stack/stack.js +7 -0
- package/dist/esm/components/statusDot/statusDot.js +7 -0
- package/dist/esm/components/stepper/step.js +8 -0
- package/dist/esm/components/stepper/stepper.js +7 -0
- package/dist/esm/components/switch/switch.js +8 -0
- package/dist/esm/components/tab/tab.js +7 -0
- package/dist/esm/components/tab/tabPanel.js +7 -0
- package/dist/esm/components/tab/tabs.js +8 -0
- package/dist/esm/components/table/table.js +7 -0
- package/dist/esm/components/table/tableBody.js +7 -0
- package/dist/esm/components/table/tableCell.js +7 -0
- package/dist/esm/components/table/tableFooter.js +7 -0
- package/dist/esm/components/table/tableHeader.js +7 -0
- package/dist/esm/components/table/tableHeaderCell.js +8 -0
- package/dist/esm/components/table/tableRow.js +7 -0
- package/dist/esm/components/table/tableSelectionToolbar.js +8 -0
- package/dist/esm/components/text/text.js +7 -0
- package/dist/esm/components/textarea/textarea.js +8 -0
- package/dist/esm/components/thumbnail/thumbnail.js +8 -0
- package/dist/esm/components/timePicker/timePicker.js +15 -0
- package/dist/esm/components/timer/timer.js +7 -0
- package/dist/esm/components/timestamp/timestamp.js +7 -0
- package/dist/esm/components/toast/toast.js +8 -0
- package/dist/esm/components/toast/toaster.js +12 -0
- package/dist/esm/components/toggleButton/toggleButton.js +8 -0
- package/dist/esm/components/toggleButtonGroup/toggleButtonGroup.js +10 -0
- package/dist/esm/components/tokenizer/tokenizer.js +14 -0
- package/dist/esm/components/toolbar/toolbar.js +8 -0
- package/dist/esm/components/tooltip/tooltip.js +9 -0
- package/dist/esm/components/topNav/topNav.js +11 -0
- package/dist/esm/components/topNav/topNavItem.js +11 -0
- package/dist/esm/components/topNav/topNavMegaMenu.js +7 -0
- package/dist/esm/components/topNav/topNavMegaMenuCard.js +8 -0
- package/dist/esm/components/topNav/topNavMegaMenuGroup.js +7 -0
- package/dist/esm/components/topNav/topNavMegaMenuItem.js +7 -0
- package/dist/esm/components/tree/tree.js +8 -0
- package/dist/esm/components/tree/treeItem.js +8 -0
- package/dist/esm/components/virtualList/virtualList.js +7 -0
- package/dist/esm/components/virtualTable/virtualTable.js +9 -0
- package/dist/esm/components/visuallyHidden/visuallyHidden.js +7 -0
- package/dist/esm/core/a11y.js +22 -0
- package/dist/esm/core/element.js +14 -0
- package/dist/esm/core/form.js +6 -0
- package/dist/esm/core/overlay.js +8 -0
- package/dist/esm/index.js +779 -0
- package/dist/llms-full.txt +8903 -0
- package/dist/llms.txt +288 -0
- package/dist/punica-components.min.js +14283 -0
- package/dist/tokens.css +158 -0
- package/dist/types/index.d.ts +6762 -0
- package/dist/types/react.d.ts +1914 -0
- package/dist/vscode.css-custom-data.json +3892 -0
- package/dist/vscode.html-custom-data.json +6912 -0
- package/dist/web-types.json +12404 -0
- package/docs/MIGRATION-2.0.md +112 -0
- package/docs/contract.md +130 -0
- package/docs/migration/chat.md +309 -0
- package/docs/migration/content.md +806 -0
- package/docs/migration/data.md +140 -0
- package/docs/migration/display.md +625 -0
- package/docs/migration/form-basic.md +262 -0
- package/docs/migration/navigation.md +368 -0
- package/docs/migration/overlays.md +261 -0
- package/docs/migration/pickers.md +194 -0
- package/package.json +135 -4
- package/scripts/codemod-2.0.mjs +50 -0
- package/scripts/codemod-rules.mjs +102 -0
- package/skills/punica-components/SKILL.md +48 -0
|
@@ -0,0 +1,806 @@
|
|
|
1
|
+
# New in 2.0: navigation, table and content elements
|
|
2
|
+
|
|
3
|
+
None of these existed in 1.x, so there is nothing to migrate from. Each
|
|
4
|
+
table below is the element's whole public API. Every element extends
|
|
5
|
+
`PunicaElement`; every string a person reads or hears is an attribute with
|
|
6
|
+
an English default.
|
|
7
|
+
|
|
8
|
+
Folders: `sideNav/`, `topNav/`, `table/`, `code/`, `codeBlock/`,
|
|
9
|
+
`timestamp/`, `timer/`, `appShell/`, `mobileNav/`, `section/`, `outline/`. Each file defines one element; import the ones you
|
|
10
|
+
use.
|
|
11
|
+
|
|
12
|
+
## `punica-side-nav`
|
|
13
|
+
|
|
14
|
+
App navigation down the side: a native `<nav>` that collapses to a rail.
|
|
15
|
+
|
|
16
|
+
| | Name | Notes |
|
|
17
|
+
|---|---|---|
|
|
18
|
+
| Attribute | `label` | Accessible name of the landmark |
|
|
19
|
+
| Attribute | `collapsed` | Boolean; rail mode, icons only |
|
|
20
|
+
| Attribute | `label-collapse` | Name of the collapse button while expanded; `Collapse navigation` |
|
|
21
|
+
| Attribute | `label-expand` | Name of the collapse button while collapsed; `Expand navigation` |
|
|
22
|
+
| Event | `punica-toggle` | `{ open }`, when the user collapses or expands. Items and sections fire the same event for their own disclosure, so check `event.target` |
|
|
23
|
+
| Slot | default | Items and sections |
|
|
24
|
+
| Slot | `header` | Above the items |
|
|
25
|
+
| Slot | `footer` | Under the items |
|
|
26
|
+
| Part | `base`, `header`, `collapse-button`, `items`, `footer` | |
|
|
27
|
+
| Custom property | `--punica-side-nav-width` | Inline size expanded, `16rem` |
|
|
28
|
+
| Custom property | `--punica-side-nav-rail-width` | Inline size collapsed |
|
|
29
|
+
| Custom property | `--punica-side-nav-background`, `--punica-side-nav-padding` | |
|
|
30
|
+
| Keyboard | Arrow Up / Down, Home, End | Move between the items that are showing, in every slot; Tab works as usual |
|
|
31
|
+
|
|
32
|
+
## `punica-side-nav-section`
|
|
33
|
+
|
|
34
|
+
A named group of items.
|
|
35
|
+
|
|
36
|
+
| | Name | Notes |
|
|
37
|
+
|---|---|---|
|
|
38
|
+
| Attribute | `label` | Heading and accessible name of the group |
|
|
39
|
+
| Attribute | `collapsible` | Boolean; the heading is a button |
|
|
40
|
+
| Attribute | `collapsed` | Boolean; items hidden. Only with `collapsible`, and ignored in a rail |
|
|
41
|
+
| Event | `punica-toggle` | `{ open }` |
|
|
42
|
+
| Slot | default | `punica-side-nav-item` elements |
|
|
43
|
+
| Part | `base`, `heading`, `toggle`, `items` | |
|
|
44
|
+
| Custom property | `--punica-side-nav-section-gap`, `--punica-side-nav-section-color` | |
|
|
45
|
+
| State | `rail` | The navigation around it is collapsed |
|
|
46
|
+
|
|
47
|
+
## `punica-side-nav-item`
|
|
48
|
+
|
|
49
|
+
A native `<a>` with `href`, a native `<button>` without.
|
|
50
|
+
|
|
51
|
+
| | Name | Notes |
|
|
52
|
+
|---|---|---|
|
|
53
|
+
| Attribute | `href`, `target`, `rel` | Make and configure the link |
|
|
54
|
+
| Attribute | `current` | Boolean; `aria-current="page"` |
|
|
55
|
+
| Attribute | `disabled` | Boolean; no focus, no activation |
|
|
56
|
+
| Attribute | `open` | Boolean; nested items are showing |
|
|
57
|
+
| Attribute | `label-toggle` | Start of the name of a link item's expand button; `Toggle`, followed by the item's text |
|
|
58
|
+
| Property | `text` | Read-only; the label as text |
|
|
59
|
+
| Event | `punica-toggle` | `{ open }`, when the user expands or collapses nested items |
|
|
60
|
+
| Slot | default | The label |
|
|
61
|
+
| Slot | `start` | An icon; the only content showing in a rail |
|
|
62
|
+
| Slot | `end` | A badge |
|
|
63
|
+
| Slot | `children` | Nested items. A button item becomes the disclosure itself (`aria-expanded`); a link item gets a separate expand button |
|
|
64
|
+
| Part | `base`, `control`, `label`, `chevron`, `toggle`, `children`, `tooltip` | |
|
|
65
|
+
| Custom property | `--punica-side-nav-item-height`, `-radius`, `-padding`, `-indent`, `-current-background`, `-current-color` | |
|
|
66
|
+
| State | `rail`, `has-children` | |
|
|
67
|
+
|
|
68
|
+
In a rail the label stays the control's accessible name and opens beside the
|
|
69
|
+
item, in the top layer, on hover and on keyboard focus; Escape closes it.
|
|
70
|
+
Nested items are not shown in a rail.
|
|
71
|
+
|
|
72
|
+
## `punica-top-nav`
|
|
73
|
+
|
|
74
|
+
App navigation across the top. Items that do not fit move, last first, into
|
|
75
|
+
a menu behind a "more" button; the element measures with a `ResizeObserver`
|
|
76
|
+
and a `MutationObserver`, both stopped while it is out of the document.
|
|
77
|
+
|
|
78
|
+
| | Name | Notes |
|
|
79
|
+
|---|---|---|
|
|
80
|
+
| Attribute | `label` | Accessible name of the landmark |
|
|
81
|
+
| Attribute | `label-more` | Name of the overflow button; `More` |
|
|
82
|
+
| Property | `overflowing` | Read-only; the items in the overflow menu now |
|
|
83
|
+
| Event | `punica-open` | The overflow menu, or an item's own menu, opened |
|
|
84
|
+
| Event | `punica-close` | `{ reason }`: `escape`, `outside` or `api` |
|
|
85
|
+
| Slot | default | `punica-top-nav-item` elements |
|
|
86
|
+
| Slot | `start` | The brand |
|
|
87
|
+
| Slot | `end` | Actions |
|
|
88
|
+
| Part | `base`, `start`, `items`, `more-button`, `more-popover`, `more-menu`, `end` | |
|
|
89
|
+
| Custom property | `--punica-top-nav-height`, `-background`, `-padding`, `-gap` | |
|
|
90
|
+
| Keyboard | Arrow Down on the more button | Opens the menu and focuses its first item |
|
|
91
|
+
| Keyboard | Arrow Up / Down, Home, End, Escape in the menu | Move between items; Escape closes and returns focus to the button |
|
|
92
|
+
|
|
93
|
+
The shadow root uses manual slot assignment, so only element children are
|
|
94
|
+
placed (a bare text node directly inside the element is not shown), and the
|
|
95
|
+
element never writes an attribute on an item.
|
|
96
|
+
|
|
97
|
+
## `punica-top-nav-item`
|
|
98
|
+
|
|
99
|
+
A native `<a>` with `href`, a native `<button>` without, a disclosure button
|
|
100
|
+
when the `menu` slot has content.
|
|
101
|
+
|
|
102
|
+
| | Name | Notes |
|
|
103
|
+
|---|---|---|
|
|
104
|
+
| Attribute | `href`, `target`, `rel` | Make and configure the link; `href` is ignored while there is a menu |
|
|
105
|
+
| Attribute | `current` | Boolean; `aria-current="page"` |
|
|
106
|
+
| Attribute | `disabled` | Boolean |
|
|
107
|
+
| Attribute | `open` | Boolean; the menu is showing |
|
|
108
|
+
| Property | `text` | Read-only; the label as text |
|
|
109
|
+
| Event | `punica-open` | The menu opened |
|
|
110
|
+
| Event | `punica-close` | `{ reason }`: `escape`, `outside` or `api` |
|
|
111
|
+
| Slot | default | The label |
|
|
112
|
+
| Slot | `start`, `end` | An icon, a badge |
|
|
113
|
+
| Slot | `menu` | Dropdown content: links, buttons or further items, or one `punica-top-nav-mega-menu`, opened in a `punica-popover` |
|
|
114
|
+
| Part | `control`, `label`, `chevron`, `popover`, `menu` | |
|
|
115
|
+
| Custom property | `--punica-top-nav-item-height`, `-radius`, `-padding`, `-current-background`, `-current-color` | |
|
|
116
|
+
| State | `has-menu` | |
|
|
117
|
+
| State | `mega` | The menu is a `punica-top-nav-mega-menu`; the panel may be as wide as the viewport |
|
|
118
|
+
| Keyboard | Enter / Space, Arrow Down on the button | Open the menu; focus goes to its first entry |
|
|
119
|
+
| Keyboard | Arrow Up / Down, Home, End, Escape in the menu | Move between entries (mega menu items and a featured card's link included); Escape closes this menu only and returns focus |
|
|
120
|
+
|
|
121
|
+
## `punica-top-nav-mega-menu`
|
|
122
|
+
|
|
123
|
+
A wide panel of link columns for a `punica-top-nav-item`'s `menu` slot. The
|
|
124
|
+
item opens, closes and works it with the keyboard as it does any menu. A
|
|
125
|
+
container query on the panel puts the featured card under the columns
|
|
126
|
+
below 40rem. In `topNav/`.
|
|
127
|
+
|
|
128
|
+
| | Name | Notes |
|
|
129
|
+
|---|---|---|
|
|
130
|
+
| Slot | default | `punica-top-nav-mega-menu-group` elements, the columns |
|
|
131
|
+
| Slot | `featured` | A promotional card beside the columns: a `punica-top-nav-mega-menu-card` |
|
|
132
|
+
| Part | `base`, `groups`, `featured` | |
|
|
133
|
+
| Custom property | `--punica-top-nav-mega-menu-width` | Inline size, capped at the viewport; `56rem` |
|
|
134
|
+
| Custom property | `--punica-top-nav-mega-menu-column-width` | Narrowest a column gets before the columns wrap; `13rem` |
|
|
135
|
+
| Custom property | `--punica-top-nav-mega-menu-featured-width`, `-gap` | |
|
|
136
|
+
|
|
137
|
+
## `punica-top-nav-mega-menu-group`
|
|
138
|
+
|
|
139
|
+
One column: a heading over items. A `group` (through `ElementInternals`)
|
|
140
|
+
named by the heading; the visible heading is hidden from assistive
|
|
141
|
+
technology so it is not read twice.
|
|
142
|
+
|
|
143
|
+
| | Name | Notes |
|
|
144
|
+
|---|---|---|
|
|
145
|
+
| Attribute | `heading` | The column's title and the group's name |
|
|
146
|
+
| Slot | default | `punica-top-nav-mega-menu-item` elements |
|
|
147
|
+
| Part | `heading`, `items` | |
|
|
148
|
+
| Custom property | `--punica-top-nav-mega-menu-group-heading-color` | |
|
|
149
|
+
|
|
150
|
+
## `punica-top-nav-mega-menu-item`
|
|
151
|
+
|
|
152
|
+
A native `<a>` with `href`, a native `<button>` without; a title, a line
|
|
153
|
+
under it and an icon tile. Its accessible name is its visible text.
|
|
154
|
+
|
|
155
|
+
| | Name | Notes |
|
|
156
|
+
|---|---|---|
|
|
157
|
+
| Attribute | `href`, `target`, `rel` | Make and configure the link |
|
|
158
|
+
| Attribute | `description` | The line under the title |
|
|
159
|
+
| Attribute | `current` | Boolean; `aria-current="page"` |
|
|
160
|
+
| Attribute | `disabled` | Boolean; no focus, no activation, skipped by the arrow keys |
|
|
161
|
+
| Slot | default | The title |
|
|
162
|
+
| Slot | `start` | An icon |
|
|
163
|
+
| Slot | `description` | In place of the attribute |
|
|
164
|
+
| Part | `control`, `icon`, `label`, `description` | |
|
|
165
|
+
| Custom property | `--punica-top-nav-mega-menu-item-radius`, `-padding`, `-icon-background`, `-icon-color` | |
|
|
166
|
+
|
|
167
|
+
## `punica-top-nav-mega-menu-card`
|
|
168
|
+
|
|
169
|
+
A promotional card for the `featured` slot.
|
|
170
|
+
|
|
171
|
+
| | Name | Notes |
|
|
172
|
+
|---|---|---|
|
|
173
|
+
| Attribute | `heading` | The title |
|
|
174
|
+
| Attribute | `image`, `image-alt` | An image over the title; decorative (`alt=""`) unless `image-alt` says what it shows |
|
|
175
|
+
| Attribute | `href`, `link-label` | The card's link and its text; the text is the title by default |
|
|
176
|
+
| Slot | default | The text under the title |
|
|
177
|
+
| Part | `base`, `image`, `body`, `heading`, `link` | |
|
|
178
|
+
| Custom property | `--punica-top-nav-mega-menu-card-background`, `-radius`, `-image-ratio` | |
|
|
179
|
+
|
|
180
|
+
## `punica-table`
|
|
181
|
+
|
|
182
|
+
A table whose rows and cells are elements the author writes. Roles are set
|
|
183
|
+
through `ElementInternals` (`table`, `rowgroup`, `row`, `columnheader`,
|
|
184
|
+
`cell`) and the layout is CSS `display: table*`. The table sorts and filters
|
|
185
|
+
nothing.
|
|
186
|
+
|
|
187
|
+
| | Name | Notes |
|
|
188
|
+
|---|---|---|
|
|
189
|
+
| Attribute | `label` | Accessible name |
|
|
190
|
+
| Attribute | `caption` | Visible caption; the accessible name unless `label` is set |
|
|
191
|
+
| Attribute | `dense`, `striped`, `dividers` | Booleans |
|
|
192
|
+
| Attribute | `sticky-header` | Boolean; the header sticks inside the nearest scroll container |
|
|
193
|
+
| Attribute | `selectable` | `single` \| `multiple`: every body row draws a checkbox cell; `multiple` adds select-all to the header row |
|
|
194
|
+
| Attribute | `label-select-row` | Name of a row's checkbox; `Select row` |
|
|
195
|
+
| Attribute | `label-select-all` | Name of the header checkbox; `Select all rows` |
|
|
196
|
+
| Property | `rows` | Read-only; the body rows |
|
|
197
|
+
| Property | `selectedValues` | Read-only; `value` of every selected row |
|
|
198
|
+
| Method | `refresh()` | Re-reads the rows; sections and rows call it, an app has no need to |
|
|
199
|
+
| Event | `punica-select` | `{ value, item }`: the selected rows' values and the row toggled (`null` for select-all) |
|
|
200
|
+
| Slot | default | `punica-table-header`, `punica-table-body`, `punica-table-footer` |
|
|
201
|
+
| Slot | `empty` | Shown while the body has no row |
|
|
202
|
+
| Part | `caption`, `empty` | |
|
|
203
|
+
| Custom property | `--punica-table-cell-padding`, `-border-color`, `-header-background`, `-header-color`, `-stripe-background`, `-selected-background`, `-font-size` | Set on the table; the cells read them |
|
|
204
|
+
|
|
205
|
+
Not supported: column or row spans (CSS table layout has none for custom
|
|
206
|
+
elements).
|
|
207
|
+
|
|
208
|
+
## `punica-table-header`, `punica-table-body`, `punica-table-footer`
|
|
209
|
+
|
|
210
|
+
Row groups (`role="rowgroup"`). No attributes, events, parts or custom
|
|
211
|
+
properties; the default slot takes `punica-table-row` elements.
|
|
212
|
+
|
|
213
|
+
## `punica-table-row`
|
|
214
|
+
|
|
215
|
+
| | Name | Notes |
|
|
216
|
+
|---|---|---|
|
|
217
|
+
| Attribute | `value` | What the row contributes to the table's selection |
|
|
218
|
+
| Attribute | `selected` | Boolean |
|
|
219
|
+
| Attribute | `label` | Name of this row's checkbox; the table's `label-select-row` otherwise |
|
|
220
|
+
| Slot | default | Cells |
|
|
221
|
+
| Part | `select-cell`, `checkbox` | The cell and native checkbox the row draws in a selectable table |
|
|
222
|
+
| State | `header` | The row is in a `punica-table-header` |
|
|
223
|
+
|
|
224
|
+
Setting `selected` from code fires nothing; the header checkbox follows.
|
|
225
|
+
|
|
226
|
+
## `punica-table-header-cell`
|
|
227
|
+
|
|
228
|
+
| | Name | Notes |
|
|
229
|
+
|---|---|---|
|
|
230
|
+
| Attribute | `sortable` | Boolean; the content becomes a native button |
|
|
231
|
+
| Attribute | `sort` | `ascending` \| `descending` \| `none`; reflected to `aria-sort` on a sortable header |
|
|
232
|
+
| Attribute | `column` | Key sent with `punica-sort`; the header's position in its row otherwise |
|
|
233
|
+
| Attribute | `align` | `start` \| `center` \| `end` |
|
|
234
|
+
| Event | `punica-sort` | `{ column, direction }`, cancelable. Unprevented, `sort` takes the direction here and is cleared on the row's other headers; the app reorders the rows |
|
|
235
|
+
| Slot | default | The header text |
|
|
236
|
+
| Part | `button`, `sort-icon` | |
|
|
237
|
+
|
|
238
|
+
## `punica-table-cell`
|
|
239
|
+
|
|
240
|
+
| | Name | Notes |
|
|
241
|
+
|---|---|---|
|
|
242
|
+
| Attribute | `align` | `start` \| `center` \| `end` |
|
|
243
|
+
| Slot | default | The content |
|
|
244
|
+
|
|
245
|
+
## `punica-code`
|
|
246
|
+
|
|
247
|
+
Inline code: a native `<code>` around the default slot.
|
|
248
|
+
|
|
249
|
+
| | Name | Notes |
|
|
250
|
+
|---|---|---|
|
|
251
|
+
| Slot | default | The code |
|
|
252
|
+
| Part | `base` | The `<code>` |
|
|
253
|
+
| Custom property | `--punica-code-background`, `-color`, `-radius`, `-padding`, `-font-size` | |
|
|
254
|
+
|
|
255
|
+
## `punica-code-block`
|
|
256
|
+
|
|
257
|
+
`<pre><code>` with a copy button. The code is the element's text content
|
|
258
|
+
(first line break, trailing space and shared indentation removed) or the
|
|
259
|
+
`code` property, and is always written with `textContent`.
|
|
260
|
+
|
|
261
|
+
| | Name | Notes |
|
|
262
|
+
|---|---|---|
|
|
263
|
+
| Attribute | `language` | Shown as a label and passed to `highlight` |
|
|
264
|
+
| Attribute | `label` | Accessible name of the code region |
|
|
265
|
+
| Attribute | `line-numbers` | Boolean |
|
|
266
|
+
| Attribute | `wrap` | Boolean; wrap long lines instead of scrolling |
|
|
267
|
+
| Attribute | `max-lines` | Number; show this many lines and an expand button |
|
|
268
|
+
| Attribute | `open` | Boolean; every line shows although `max-lines` is set |
|
|
269
|
+
| Attribute | `label-copy` | Name of the copy button; `Copy` |
|
|
270
|
+
| Attribute | `label-copied` | Announced in a polite live region after a copy; `Copied` |
|
|
271
|
+
| Attribute | `label-expand`, `label-collapse` | Text of the expand button; `Show more`, `Show less` |
|
|
272
|
+
| Property | `code` | String or null; wins over the text content |
|
|
273
|
+
| Property | `highlight` | `(text, language) => DocumentFragment \| null`; the block draws the fragment line by line, or plain text for null. No highlighter ships with the library |
|
|
274
|
+
| Property | `text` | Read-only; the code as shown and copied |
|
|
275
|
+
| Method | `copy()` | Copies with `navigator.clipboard`; resolves `true` when the clipboard took it |
|
|
276
|
+
| Event | `punica-toggle` | `{ open }`, when the user expands or cuts the block |
|
|
277
|
+
| Part | `base`, `header`, `language`, `copy-button`, `pre`, `code`, `line`, `expand-button`, `status` | |
|
|
278
|
+
| Custom property | `--punica-code-block-background`, `-color`, `-radius`, `-padding`, `-font-size`, `-line-number-color` | |
|
|
279
|
+
| State | `copied` | For two seconds after a copy |
|
|
280
|
+
|
|
281
|
+
## `punica-timestamp`
|
|
282
|
+
|
|
283
|
+
A native `<time datetime>` written through `Intl`.
|
|
284
|
+
|
|
285
|
+
| | Name | Notes |
|
|
286
|
+
|---|---|---|
|
|
287
|
+
| Attribute | `value` | ISO 8601 string or epoch milliseconds (the property also takes a number) |
|
|
288
|
+
| Attribute | `format` | `relative` \| `date` \| `time` \| `datetime`; `datetime` by default |
|
|
289
|
+
| Attribute | `date-style`, `time-style` | `Intl.DateTimeFormat` styles; `medium` and `short` |
|
|
290
|
+
| Attribute | `locale` | The nearest `lang`, then `navigator.language`, otherwise |
|
|
291
|
+
| Property | `date` | Read-only `Date`, or null while `value` names none |
|
|
292
|
+
| Part | `base` | The `<time>`; its `title` is the full date and time |
|
|
293
|
+
| Custom property | `--punica-timestamp-color` | |
|
|
294
|
+
|
|
295
|
+
`relative` uses `Intl.RelativeTimeFormat` and one timer armed for the moment
|
|
296
|
+
the wording next changes; the timer is cleared on disconnect and armed again
|
|
297
|
+
on connect.
|
|
298
|
+
|
|
299
|
+
## `punica-timer`
|
|
300
|
+
|
|
301
|
+
A countdown or a stopwatch on `performance.now()`. `role="timer"` with
|
|
302
|
+
`aria-live="off"`; a separate polite live region speaks at `announce-every`.
|
|
303
|
+
|
|
304
|
+
| | Name | Notes |
|
|
305
|
+
|---|---|---|
|
|
306
|
+
| Attribute | `label` | Accessible name |
|
|
307
|
+
| Attribute | `mode` | `countdown` \| `stopwatch`; `countdown` by default |
|
|
308
|
+
| Attribute | `duration` | Seconds a countdown starts from |
|
|
309
|
+
| Attribute | `until` | ISO 8601 moment a countdown ends at; wins over `duration` |
|
|
310
|
+
| Attribute | `running` | Boolean |
|
|
311
|
+
| Attribute | `format` | `Intl.DurationFormat` style: `digital` \| `long` \| `short` \| `narrow`; zero-padded `mm:ss` / `h:mm:ss` where the browser has no `Intl.DurationFormat` |
|
|
312
|
+
| Attribute | `announce-every` | Seconds between announcements; none by default |
|
|
313
|
+
| Attribute | `locale` | As on `punica-timestamp` |
|
|
314
|
+
| Property | `elapsed` | Read-only; milliseconds counted |
|
|
315
|
+
| Property | `remaining` | Read-only; milliseconds left, null for a stopwatch |
|
|
316
|
+
| Method | `start()` | Starts or resumes; a finished countdown starts over |
|
|
317
|
+
| Method | `pause()` | Stops where it is |
|
|
318
|
+
| Method | `reset()` | Back to the beginning; a running clock keeps running |
|
|
319
|
+
| Event | `punica-complete` | `{}`, once, when a countdown reaches zero; `running` turns false |
|
|
320
|
+
| Part | `base`, `status` | The `<time>` with the written duration; the live region |
|
|
321
|
+
| Custom property | `--punica-timer-color`, `--punica-timer-font-family` | |
|
|
322
|
+
| State | `running`, `complete` | |
|
|
323
|
+
|
|
324
|
+
With `until`, a pause freezes the display only: the end moment does not
|
|
325
|
+
move. No timer is held while the element is out of the document, and the
|
|
326
|
+
display catches up on reconnect.
|
|
327
|
+
|
|
328
|
+
## `punica-table-selection-toolbar`
|
|
329
|
+
|
|
330
|
+
The actions for the selected rows of a `punica-table` (or a
|
|
331
|
+
`punica-virtual-table`): the count, a clear button and the author's action
|
|
332
|
+
buttons. In `table/`. Hidden, and out of the tab order, while nothing is
|
|
333
|
+
selected; `role="toolbar"` with one tab stop otherwise.
|
|
334
|
+
|
|
335
|
+
| | Name | Notes |
|
|
336
|
+
|---|---|---|
|
|
337
|
+
| Attribute | `for` | Id of the table in the same document or shadow root; the enclosing table by default |
|
|
338
|
+
| Attribute | `label` | Accessible name of the toolbar; `Bulk actions` |
|
|
339
|
+
| Attribute | `label-selected` | Count text, `{count}` replaced by the number formatted with `Intl` in the element's language; `{count} selected` |
|
|
340
|
+
| Attribute | `label-clear` | Text of the clear button; `Clear selection` |
|
|
341
|
+
| Property | `count` | Read-only; number of selected rows |
|
|
342
|
+
| Property | `table` | Read-only; the table it reads, or null |
|
|
343
|
+
| Slot | default | Action controls |
|
|
344
|
+
| Part | `base`, `count`, `actions`, `clear-button` | The bar, the count text, the slot wrapper, the native clear button |
|
|
345
|
+
| Custom property | `--punica-table-selection-toolbar-background`, `-color`, `-radius`, `-padding`, `-gap` | |
|
|
346
|
+
| State | `empty` | Nothing selected; the bar is not drawn |
|
|
347
|
+
| Keyboard | Arrow Left / Right, Home, End | Move between the actions and the clear button; mirrored right-to-left |
|
|
348
|
+
|
|
349
|
+
The clear button makes the table fire its own `punica-select` (`{ value: [],
|
|
350
|
+
item: null }` on `punica-table`, `{ value: null, item: null }` on
|
|
351
|
+
`punica-virtual-table`), as a person's change; the toolbar fires nothing of
|
|
352
|
+
its own. A count change is spoken through a polite status region that is
|
|
353
|
+
never hidden, so the first selection is heard. After a clear, focus moves to
|
|
354
|
+
the table's select-all checkbox, or its first row checkbox.
|
|
355
|
+
|
|
356
|
+
Added to the tables for it:
|
|
357
|
+
|
|
358
|
+
| Element | | Name | Notes |
|
|
359
|
+
|---|---|---|---|
|
|
360
|
+
| `punica-table` | Method | `clearSelection()` | Clears every row; fires nothing |
|
|
361
|
+
| `punica-table` | Slot | `toolbar` | Drawn above the rows across the table's width (a table caption) |
|
|
362
|
+
| `punica-table` | Part | `toolbar` | Wrapper of the `toolbar` slot |
|
|
363
|
+
| `punica-virtual-table` | Property | `selectedValues` | Read-only; `[value]` or `[]`. The virtual table selects one row at most, so its toolbar counts 0 or 1 |
|
|
364
|
+
| `punica-virtual-table` | Method | `clearSelection()` | Sets `value` to null; fires nothing |
|
|
365
|
+
|
|
366
|
+
## `punica-chat-dictation-button`
|
|
367
|
+
|
|
368
|
+
A microphone toggle for `punica-chat-composer` over the Web Speech API
|
|
369
|
+
(`SpeechRecognition` / `webkitSpeechRecognition`). In `chat/`.
|
|
370
|
+
|
|
371
|
+
| | Name | Notes |
|
|
372
|
+
|---|---|---|
|
|
373
|
+
| Attribute | `label` | Accessible name while idle; `Start dictation` |
|
|
374
|
+
| Attribute | `label-stop` | Accessible name while listening; `Stop dictation` |
|
|
375
|
+
| Attribute | `locale` | Language recognised; the closest `lang`, then `navigator.language` |
|
|
376
|
+
| Attribute | `disabled` | Boolean; also disabled while its composer is |
|
|
377
|
+
| Property | `listening`, `supported` | Read-only booleans |
|
|
378
|
+
| Method | `start()`, `stop()` | `stop()` lets a phrase being heard settle first |
|
|
379
|
+
| Event | `punica-input` | `{ value, final: false }`, words not settled yet; cancelable |
|
|
380
|
+
| Event | `punica-change` | `{ value, final: true }`, a settled phrase; cancelable |
|
|
381
|
+
| Event | `punica-error` | `{ error }`: `not-allowed`, `no-speech`, `audio-capture`, `network`, `service-not-allowed`, `language-not-supported`, `start-failed` |
|
|
382
|
+
| Part | `base`, `icon`, `indicator` | The native button (`aria-pressed`), the microphone glyph, the pulsing ring |
|
|
383
|
+
| Custom property | `--punica-chat-dictation-button-size`, `-color`, `-active-color`, `-active-background` | |
|
|
384
|
+
| State | `listening` | Recognition is running |
|
|
385
|
+
| State | `unsupported` | No recognition in this browser; the host is `display: none` |
|
|
386
|
+
|
|
387
|
+
It stops on a second press, Escape anywhere, the window losing focus or the
|
|
388
|
+
page being hidden, an error, and disconnect (the recognition is aborted).
|
|
389
|
+
In the composer's `start` or `end` slot, unless the event is prevented, the
|
|
390
|
+
words go into the composer through its new method:
|
|
391
|
+
|
|
392
|
+
| Element | | Name | Notes |
|
|
393
|
+
|---|---|---|---|
|
|
394
|
+
| `punica-chat-composer` | Method | `insertText(text, { provisional })` | Inserts at the caret in place of the selection, spaced from neighbouring words, and fires the composer's `punica-input`; provisional text is replaced by the next insertion and forgotten once the person types |
|
|
395
|
+
|
|
396
|
+
A listener for `punica-input` on the composer hears both the button's event
|
|
397
|
+
(the words) and the composer's (the whole text), in that order: check
|
|
398
|
+
`event.target`.
|
|
399
|
+
|
|
400
|
+
## `punica-app-shell`
|
|
401
|
+
|
|
402
|
+
The frame of an app's page: header, side navigation, main content, a
|
|
403
|
+
secondary panel and a footer, as a CSS grid with named areas. In
|
|
404
|
+
`appShell/`.
|
|
405
|
+
|
|
406
|
+
The breakpoint is an attribute, not a custom property, because a custom
|
|
407
|
+
property cannot be read in a container query: `collapse-below` names one of
|
|
408
|
+
the library's widths (600, 900, 1200 px) and the shell compares its own
|
|
409
|
+
inline size, measured with a `ResizeObserver`, so a shell in a pane
|
|
410
|
+
collapses with the pane. Collapsed, the `nav` slot is moved into a
|
|
411
|
+
`punica-mobile-nav` in the shell's shadow root (one slot, never two copies
|
|
412
|
+
of the navigation), a menu button appears at the start of the header and
|
|
413
|
+
the `aside` region goes under the main content.
|
|
414
|
+
|
|
415
|
+
| | Name | Notes |
|
|
416
|
+
|---|---|---|
|
|
417
|
+
| Attribute | `fixed` | Boolean; the shell is `--punica-app-shell-height` tall and each region scrolls on its own; collapsed, everything under the header scrolls as one |
|
|
418
|
+
| Attribute | `collapse-below` | `small` \| `medium` \| `large` \| `none`: 600, 900, 1200 px, or never; `medium` |
|
|
419
|
+
| Attribute | `embedded` | Boolean; the shell is part of a page with its own `<main>`, so the content area is a `<div>`, not a second main landmark |
|
|
420
|
+
| Attribute | `nav-open` | Boolean; the navigation drawer is showing. Only while collapsed: it is cleared when the shell grows past the breakpoint |
|
|
421
|
+
| Attribute | `label-menu` | Name of the menu button; `Menu` |
|
|
422
|
+
| Attribute | `label-nav` | Name of the drawer; `Navigation` |
|
|
423
|
+
| Attribute | `label-skip` | Text of the skip button; `Skip to content` |
|
|
424
|
+
| Attribute | `label-close` | Name of the drawer's close button; `Close` |
|
|
425
|
+
| Property | `collapsed` | Read-only boolean |
|
|
426
|
+
| Event | `punica-open` | The drawer opened |
|
|
427
|
+
| Event | `punica-close` | `{ reason, returnValue }`: `escape`, `backdrop`, `close-button`, `navigate`, `resize` or `api` |
|
|
428
|
+
| Slot | default | The main content, in a native `<main>` |
|
|
429
|
+
| Slot | `header`, `nav`, `aside`, `footer` | |
|
|
430
|
+
| Part | `base`, `skip-link`, `header`, `menu-button`, `nav`, `main`, `aside`, `footer`, `drawer` | |
|
|
431
|
+
| Custom property | `--punica-app-shell-height` | Block size while `fixed`; `100dvh` |
|
|
432
|
+
| Custom property | `--punica-app-shell-nav-width`, `-aside-width`, `-background`, `-padding` | |
|
|
433
|
+
| State | `collapsed`, `has-nav` | |
|
|
434
|
+
|
|
435
|
+
Not fixed, the header sticks to the top of the scroll container and the
|
|
436
|
+
navigation and panel stick under it; the header's height is measured for
|
|
437
|
+
that, and `<main>` gets the same scroll margin. A visually hidden "skip to
|
|
438
|
+
content" button is the first tab stop and moves focus to `<main>`.
|
|
439
|
+
|
|
440
|
+
## `punica-mobile-nav`
|
|
441
|
+
|
|
442
|
+
The navigation of an app on a narrow screen: a native `<dialog>` opened with
|
|
443
|
+
`showModal()`, sliding from the inline-start edge, built on the same
|
|
444
|
+
`ModalSurface` as `punica-dialog` and `punica-drawer` (focus kept inside,
|
|
445
|
+
Escape, scroll lock, focus back to the opener). In `mobileNav/`.
|
|
446
|
+
|
|
447
|
+
| | Name | Notes |
|
|
448
|
+
|---|---|---|
|
|
449
|
+
| Attribute | `label` | Name of the dialog; `Navigation` |
|
|
450
|
+
| Attribute | `open` | Boolean |
|
|
451
|
+
| Attribute | `side` | `inline-start` \| `inline-end`; `inline-start` |
|
|
452
|
+
| Attribute | `no-light-dismiss`, `no-close-button` | Booleans |
|
|
453
|
+
| Attribute | `keep-open` | Boolean; activating a link inside does not close it |
|
|
454
|
+
| Attribute | `label-close` | Name of the close button; `Close` |
|
|
455
|
+
| Property | `returnValue` | Read-only |
|
|
456
|
+
| Method | `show()`, `hide(returnValue)`, `requestClose(reason, returnValue)` | |
|
|
457
|
+
| Event | `punica-open` | |
|
|
458
|
+
| Event | `punica-request-close` | `{ reason }`, cancelable |
|
|
459
|
+
| Event | `punica-close` | `{ reason, returnValue }`: `escape`, `backdrop`, `close-button`, `navigate` or `api` |
|
|
460
|
+
| Slot | default | The navigation |
|
|
461
|
+
| Slot | `header` | Beside the close button |
|
|
462
|
+
| Slot | `trigger` | The button that opens it; given `aria-haspopup="dialog"` and `aria-expanded` |
|
|
463
|
+
| Part | `dialog`, `header`, `body`, `close-button` | |
|
|
464
|
+
| Custom property | `--punica-mobile-nav-width` | `320px`, capped at 85vw |
|
|
465
|
+
| Custom property | `--punica-mobile-nav-padding`, `-background`, `-backdrop`, `-shadow` | |
|
|
466
|
+
|
|
467
|
+
A click on any `<a href>` inside, through shadow roots (a
|
|
468
|
+
`punica-side-nav-item` with `href` counts), asks to close with reason
|
|
469
|
+
`navigate`, so a single-page app is left with the new view.
|
|
470
|
+
|
|
471
|
+
## `punica-section`
|
|
472
|
+
|
|
473
|
+
A titled region of a page. A native `<section>` in the shadow root,
|
|
474
|
+
`aria-labelledby` its heading in the same root, so it is a `region`
|
|
475
|
+
landmark with the heading's name; the description slot is its
|
|
476
|
+
`aria-describedby`. In `section/`.
|
|
477
|
+
|
|
478
|
+
| | Name | Notes |
|
|
479
|
+
|---|---|---|
|
|
480
|
+
| Attribute | `heading` | The heading text; the `heading` slot wins |
|
|
481
|
+
| Attribute | `level` | 1–6, a real `<h1>`–`<h6>`; `2`, and anything else is 2 |
|
|
482
|
+
| Attribute | `label` | Name of the region when it should differ from the heading |
|
|
483
|
+
| Attribute | `divider` | Boolean; a line under the header row |
|
|
484
|
+
| Attribute | `collapsible` | Boolean; the heading holds a disclosure button (`aria-expanded`, `aria-controls`) |
|
|
485
|
+
| Attribute | `open` | Boolean; the body is showing. Read only while `collapsible`, so a collapsible section starts closed unless `open` is set |
|
|
486
|
+
| Method | `show()`, `hide()`, `toggle()` | Fire nothing |
|
|
487
|
+
| Event | `punica-toggle` | `{ open }`, when the user flips a collapsible section |
|
|
488
|
+
| Slot | default | The body |
|
|
489
|
+
| Slot | `heading`, `description`, `actions` | The actions sit at the end of the header row |
|
|
490
|
+
| Part | `base`, `header`, `heading`, `toggle`, `chevron`, `description`, `actions`, `body` | |
|
|
491
|
+
| Custom property | `--punica-section-gap`, `-padding`, `-heading-size`, `-divider-color` | |
|
|
492
|
+
| State | `open` | A collapsible section's body is showing |
|
|
493
|
+
|
|
494
|
+
## `punica-outline`
|
|
495
|
+
|
|
496
|
+
"On this page": a native `<nav>` of links to the headings inside a target,
|
|
497
|
+
nested by level. In `outline/`.
|
|
498
|
+
|
|
499
|
+
| | Name | Notes |
|
|
500
|
+
|---|---|---|
|
|
501
|
+
| Attribute | `for` | Id of the target, in the same tree |
|
|
502
|
+
| Attribute | `levels` | Heading tags, separated by spaces or commas; `h2 h3`. Anything that is not `h1`–`h6` is dropped |
|
|
503
|
+
| Attribute | `label` | Name of the landmark; `On this page` |
|
|
504
|
+
| Property | `target` | The target element; wins over `for` |
|
|
505
|
+
| Property | `active`, `headings` | Read-only: the id of the heading being read, the headings listed |
|
|
506
|
+
| Method | `refresh()` | Reads the headings again |
|
|
507
|
+
| Event | `punica-select` | `{ value, item }`: the heading's id and the heading, when a link is activated. Cancelable: preventing it stops the move |
|
|
508
|
+
| Part | `base`, `list`, `item`, `link`, `current` | |
|
|
509
|
+
| Custom property | `--punica-outline-indent`, `-track-color`, `-active-color` | |
|
|
510
|
+
| Custom property | `--punica-outline-offset` | Height of a fixed header over the content |
|
|
511
|
+
| State | `empty` | |
|
|
512
|
+
|
|
513
|
+
A heading with no id is given one from its text, made unique in its tree.
|
|
514
|
+
The section being read (`aria-current="location"`) comes from an
|
|
515
|
+
`IntersectionObserver` rooted at the scroll container the target is in
|
|
516
|
+
(found through slots and shadow roots): the first heading in the top 45% of
|
|
517
|
+
it, or else the last one scrolled past. A `MutationObserver` on the target
|
|
518
|
+
rebuilds the list in the next frame when headings change. Both observers are
|
|
519
|
+
disconnected while the element is out of the document. A heading in the
|
|
520
|
+
document is reached by the link itself; one inside a shadow root, which a
|
|
521
|
+
fragment cannot reach, is scrolled into view.
|
|
522
|
+
|
|
523
|
+
## `punica-alert-dialog`
|
|
524
|
+
|
|
525
|
+
A confirmation before a destructive or irreversible action. In
|
|
526
|
+
`alertDialog/`, built on the dialog's `ModalSurface` and its stylesheet.
|
|
527
|
+
|
|
528
|
+
| | Name | Notes |
|
|
529
|
+
|---|---|---|
|
|
530
|
+
| Attribute | `heading` | The question; a level-2 heading that names the dialog |
|
|
531
|
+
| Attribute | `label` | Accessible name in place of `heading` |
|
|
532
|
+
| Attribute | `open` | Boolean |
|
|
533
|
+
| Attribute | `confirm-label`, `cancel-label` | Button text; `Confirm`, `Cancel` |
|
|
534
|
+
| Attribute | `color` | Of the confirm button; `error` for a destructive action |
|
|
535
|
+
| Attribute | `loading` | Boolean; the confirm button shows a spinner and ignores clicks |
|
|
536
|
+
| Property | `returnValue` | Read-only: `confirm`, `cancel` or empty |
|
|
537
|
+
| Method | `ask()` | Opens it; resolves `true` on confirm, `false` on any other close |
|
|
538
|
+
| Method | `show()`, `hide(value)`, `requestClose(reason, value)` | From `ModalSurface` |
|
|
539
|
+
| Function | `confirm({ heading, message, confirmLabel, cancelLabel, color, container })` | Module export: makes one in `<body>` (or `container`), asks, removes it; resolves like `ask()` |
|
|
540
|
+
| Event | `punica-open` | |
|
|
541
|
+
| Event | `punica-request-close` | `{ reason }`, cancelable: preventing a `confirm` keeps it open while the work runs |
|
|
542
|
+
| Event | `punica-close` | `{ reason, returnValue }`; `reason` is `confirm`, `cancel`, `escape` or `api` |
|
|
543
|
+
| Slot | default | The description; the dialog's `aria-describedby` |
|
|
544
|
+
| Part | `dialog`, `panel`, `heading`, `description`, `actions`, `cancel-button`, `confirm-button` | |
|
|
545
|
+
| Custom property | `--punica-alert-dialog-width` | `400px`; the `--punica-dialog-*` properties also apply |
|
|
546
|
+
|
|
547
|
+
`role=alertdialog` on a native modal `<dialog>`. Focus goes to the cancel
|
|
548
|
+
button. Escape cancels (`reason: 'escape'`); the backdrop does nothing. Under
|
|
549
|
+
600 px of viewport the buttons stack full width, confirm above cancel.
|
|
550
|
+
|
|
551
|
+
## `punica-info-tip`
|
|
552
|
+
|
|
553
|
+
A small "i" button that shows a short explanation (a toggletip). In
|
|
554
|
+
`infoTip/`.
|
|
555
|
+
|
|
556
|
+
| | Name | Notes |
|
|
557
|
+
|---|---|---|
|
|
558
|
+
| Attribute | `label` | Name of the button; `More information` |
|
|
559
|
+
| Attribute | `open` | Boolean |
|
|
560
|
+
| Attribute | `side`, `align` | `block-start`, `center` by default |
|
|
561
|
+
| Attribute | `size` | `small` 14 px, `medium` 16 px, `large` 20 px icon; the target is at least 24 px |
|
|
562
|
+
| Attribute | `delay` | Hover preview delay, 300 ms |
|
|
563
|
+
| Method | `show()`, `hide(reason)`, `focus()` | |
|
|
564
|
+
| Event | `punica-open`, `punica-close` | close: `{ reason }`: `button`, `escape`, `outside`, `blur`, `pointer`, `api` |
|
|
565
|
+
| Slot | default | The explanation |
|
|
566
|
+
| Part | `button`, `icon`, `panel` | |
|
|
567
|
+
| Custom property | `--punica-info-tip-color`, `-size`, `-radius`, `-padding`, `-background`, `-shadow`, `-max-width` | |
|
|
568
|
+
| State | `pinned` | Opened by a press |
|
|
569
|
+
|
|
570
|
+
Click, tap, Enter or Space pins it (`aria-expanded="true"`); hovering
|
|
571
|
+
previews it. The explanation is the button's accessible description at all
|
|
572
|
+
times.
|
|
573
|
+
|
|
574
|
+
## `punica-avatar-group`
|
|
575
|
+
|
|
576
|
+
Overlapping `punica-avatar` children. In `avatarGroup/`.
|
|
577
|
+
|
|
578
|
+
| | Name | Notes |
|
|
579
|
+
|---|---|---|
|
|
580
|
+
| Attribute | `label` | Name of the group (`role=group`) |
|
|
581
|
+
| Attribute | `max` | Most avatars shown; the rest collapse into "+N" |
|
|
582
|
+
| Attribute | `overflow` | `list` (default: "+N" is a button opening a popover of the hidden names) or `count` (plain text, `role=img`) |
|
|
583
|
+
| Attribute | `size` | `small`, `medium`, `large`; wins over each avatar's own size |
|
|
584
|
+
| Attribute | `label-overflow` | Name of "+N"; `{count} more` |
|
|
585
|
+
| Property | `hiddenAvatars` | Read-only: the collapsed avatars |
|
|
586
|
+
| Event | `punica-open`, `punica-close` | The list of hidden names; close `{ reason }` |
|
|
587
|
+
| Slot | default | `punica-avatar` elements |
|
|
588
|
+
| Part | `base`, `overflow`, `panel`, `list`, `item` | |
|
|
589
|
+
| Custom property | `--punica-avatar-group-size`, `-overlap`, `-ring-width`, `-ring-color` | |
|
|
590
|
+
| State | `overflowing` | |
|
|
591
|
+
|
|
592
|
+
Manual slot assignment: hidden avatars stay in the light DOM, untouched, and
|
|
593
|
+
are not rendered. A `MutationObserver` (disconnected on disconnect) follows
|
|
594
|
+
children and their names.
|
|
595
|
+
|
|
596
|
+
## `punica-blockquote`
|
|
597
|
+
|
|
598
|
+
A quotation: native `<blockquote>` in a `<figure>`. In `blockquote/`.
|
|
599
|
+
|
|
600
|
+
| | Name | Notes |
|
|
601
|
+
|---|---|---|
|
|
602
|
+
| Attribute | `cite` | Address of the source; the blockquote's `cite` |
|
|
603
|
+
| Attribute | `variant` | `default`, `emphasis` (larger, accent rule) |
|
|
604
|
+
| Slot | default | The quotation |
|
|
605
|
+
| Slot | `attribution` | In a `<figcaption>`, hidden while empty |
|
|
606
|
+
| Part | `base`, `quote`, `attribution` | |
|
|
607
|
+
| Custom property | `--punica-blockquote-rule-width`, `-rule-color`, `-padding`, `-color`, `-font-size` | |
|
|
608
|
+
| State | `attributed` | |
|
|
609
|
+
|
|
610
|
+
## `punica-metadata-list`, `punica-metadata-list-item`
|
|
611
|
+
|
|
612
|
+
Label and value pairs. In `metadataList/`.
|
|
613
|
+
|
|
614
|
+
| | Name | Notes |
|
|
615
|
+
|---|---|---|
|
|
616
|
+
| Attribute (list) | `label` | Name of the list |
|
|
617
|
+
| Attribute (list) | `layout` | `inline` (default), `stacked`, `columns` |
|
|
618
|
+
| Attribute (list) | `columns` | 1–12, `2`; one column under 480 px of the list's width |
|
|
619
|
+
| Attribute (list) | `dividers`, `dense` | Booleans |
|
|
620
|
+
| Part (list) | `base` | |
|
|
621
|
+
| Custom property (list) | `--punica-metadata-list-gap`, `-label-width`, `-label-color`, `-divider-color` | |
|
|
622
|
+
| Attribute (item) | `label` | The key; or the `label` slot |
|
|
623
|
+
| Attribute (item) | `copyable` | Boolean; a copy button beside the value |
|
|
624
|
+
| Attribute (item) | `copy-value` | Text copied in place of the value's text |
|
|
625
|
+
| Attribute (item) | `label-copy`, `label-copied` | `Copy`, `Copied` |
|
|
626
|
+
| Method (item) | `copy()` | Resolves whether the clipboard took it |
|
|
627
|
+
| Slot (item) | default, `label` | |
|
|
628
|
+
| Part (item) | `label`, `value`, `copy-button`, `status` | |
|
|
629
|
+
| State (item) | `copied` | Two seconds |
|
|
630
|
+
|
|
631
|
+
Semantics: the list is `role=list` and each item `role=listitem` (through
|
|
632
|
+
`ElementInternals`); inside each item the label is `role=term` and the value
|
|
633
|
+
`role=definition`. That is the tree Chromium builds for a native `<dl>`,
|
|
634
|
+
plus the list item level ARIA requires. A native `<dl>` cannot be used: the
|
|
635
|
+
list's shadow root cannot slot an item's children into its `<dt>`/`<dd>`. The
|
|
636
|
+
copy button is named by `label-copy` and described by the item's label. The
|
|
637
|
+
`inline` layout aligns every label in one column through `subgrid`.
|
|
638
|
+
|
|
639
|
+
## `punica-thumbnail`
|
|
640
|
+
|
|
641
|
+
A fixed-ratio image preview. In `thumbnail/`.
|
|
642
|
+
|
|
643
|
+
| | Name | Notes |
|
|
644
|
+
|---|---|---|
|
|
645
|
+
| Attribute | `src`, `srcset`, `sizes` | As on `<img>` |
|
|
646
|
+
| Attribute | `alt` | Text alternative; empty or missing is decorative |
|
|
647
|
+
| Attribute | `ratio` | `4/3` or one number; `1/1` for anything else |
|
|
648
|
+
| Attribute | `fit` | `cover` (default), `contain` |
|
|
649
|
+
| Attribute | `size` | `small` 48, `medium` 96 (default), `large` 160 px |
|
|
650
|
+
| Attribute | `radius` | `none`, `small`, `medium` (default), `large`, `full` |
|
|
651
|
+
| Attribute | `loading` | `lazy` (default), `eager` |
|
|
652
|
+
| Attribute | `href`, `target` | Makes it a link |
|
|
653
|
+
| Attribute | `label` | Name of the link when `alt` does not name it |
|
|
654
|
+
| Event | `punica-load`, `punica-error` | `{ src }` |
|
|
655
|
+
| Slot | `fallback` | In place of the placeholder glyph |
|
|
656
|
+
| Part | `base`, `image`, `skeleton`, `fallback` | |
|
|
657
|
+
| Custom property | `--punica-thumbnail-size`, `-radius`, `-background` | |
|
|
658
|
+
| State | `loading`, `loaded`, `error` | `error` also with no `src` |
|
|
659
|
+
|
|
660
|
+
While loading, a `punica-skeleton` shimmers; on error or with no picture the
|
|
661
|
+
fallback shows and carries `alt` as `role=img`.
|
|
662
|
+
|
|
663
|
+
## `punica-checkbox-group`
|
|
664
|
+
|
|
665
|
+
A set of `punica-checkbox`es under one name; the group is the form control.
|
|
666
|
+
In `checkboxGroup/`.
|
|
667
|
+
|
|
668
|
+
| | Name | Notes |
|
|
669
|
+
|---|---|---|
|
|
670
|
+
| Attribute | `value` | Default value: the ticked values, space-separated. Without it, the boxes ticked in the markup |
|
|
671
|
+
| Property | `value` | `string[]`, the ticked values in document order |
|
|
672
|
+
| Attribute | `name` | One FormData entry per ticked value |
|
|
673
|
+
| Attribute | `label` | Accessible name (`role=group`) and the visible legend |
|
|
674
|
+
| Attribute | `label-hidden` | Boolean; no legend drawn. Implied inside a `punica-field` |
|
|
675
|
+
| Attribute | `orientation` | `vertical` (default), `horizontal` |
|
|
676
|
+
| Attribute | `disabled`, `required` | `required`: at least one ticked; the browser's message |
|
|
677
|
+
| Attribute | `min`, `max` | Ticked count limits (`rangeUnderflow` / `rangeOverflow`); `min` applies once any is ticked |
|
|
678
|
+
| Attribute | `label-too-few`, `label-too-many` | `Choose at least {min}.`, `Choose no more than {max}.` |
|
|
679
|
+
| Event | `punica-change` | `{ value }`; the box's own event stops at the group |
|
|
680
|
+
| Slot | default, `label` | |
|
|
681
|
+
| Part | `label`, `items` | |
|
|
682
|
+
| Custom property | `--punica-checkbox-group-gap`, `-label-color` | |
|
|
683
|
+
| State | `valid`, `invalid`, `disabled` | |
|
|
684
|
+
|
|
685
|
+
The boxes carry no `name`: the group owns it, and a box with its own name
|
|
686
|
+
would submit itself as well. `disabled` on the group disables the boxes it
|
|
687
|
+
finds enabled and gives back exactly those when it is enabled again.
|
|
688
|
+
|
|
689
|
+
## `punica-input-group`, `punica-input-group-text`
|
|
690
|
+
|
|
691
|
+
A control and its addons in one box. Layout only: it submits nothing and
|
|
692
|
+
never writes an attribute on a child. In `inputGroup/`.
|
|
693
|
+
|
|
694
|
+
| | Name | Notes |
|
|
695
|
+
|---|---|---|
|
|
696
|
+
| Attribute | `size` | `small`, `medium`, `large`; given to the children through their `--punica-*-height` / `-radius` custom properties. Without it each child keeps its own |
|
|
697
|
+
| Attribute | `label` | Makes it a `group` named by it |
|
|
698
|
+
| Attribute | `disabled` | Dims it and makes the row `inert`; the controls still submit |
|
|
699
|
+
| Attribute | `full-width` | |
|
|
700
|
+
| Slot | default | `punica-input`, `-select`, `-number-input`, `-autocomplete`, `-tokenizer`, date and time pickers, `punica-button`, `punica-icon-button`, `punica-input-group-text` |
|
|
701
|
+
| Part | `base` | The row; the focus ring is drawn on it |
|
|
702
|
+
| Custom property | `--punica-input-group-radius` | Outer corners |
|
|
703
|
+
| State | `focus-visible`, `focus-within` | |
|
|
704
|
+
| Text: slot / part | default / `base` | |
|
|
705
|
+
| Text: custom property | `--punica-input-group-text-height`, `-padding`, `-radius`, `-background`, `-color` | |
|
|
706
|
+
|
|
707
|
+
Only the outer corners round, mirrored right-to-left; the borders overlap by
|
|
708
|
+
one width. One ring goes around the group while any part has keyboard focus
|
|
709
|
+
(the fields' own rings are switched off; a focused button keeps an inset
|
|
710
|
+
ring). The addon text keeps its own character order (`unicode-bidi:
|
|
711
|
+
plaintext`).
|
|
712
|
+
|
|
713
|
+
## `punica-form-layout`
|
|
714
|
+
|
|
715
|
+
Lays out the fields of a form. Layout only. In `formLayout/`.
|
|
716
|
+
|
|
717
|
+
| | Name | Notes |
|
|
718
|
+
|---|---|---|
|
|
719
|
+
| Attribute | `columns` | 1 to 4, `1` by default |
|
|
720
|
+
| Attribute | `label-position` | `top` (default), `start`: labels beside the fields in one aligned column (`subgrid`) |
|
|
721
|
+
| Attribute | `gap` | `small`, `medium` (default), `large`: row gap |
|
|
722
|
+
| Child attribute | `span` | `2`, `3`, `4`, `full`; capped at the column count |
|
|
723
|
+
| Slot | default, `actions` | `actions` lines up with the fields |
|
|
724
|
+
| Part | `base`, `actions` | |
|
|
725
|
+
| Custom property | `--punica-form-layout-gap`, `-column-gap`, `-label-max-width` | |
|
|
726
|
+
| State | `has-actions` | |
|
|
727
|
+
|
|
728
|
+
In a container narrower than 480 px it is one column with labels above (a
|
|
729
|
+
container query on itself). With `label-position="start"`, a `punica-field`'s help
|
|
730
|
+
and error text need `punica-field` to place them in its last grid column;
|
|
731
|
+
until it does they fall under the label.
|
|
732
|
+
|
|
733
|
+
## `punica-selectable-card`, `punica-selectable-card-group`
|
|
734
|
+
|
|
735
|
+
A card that is a choice. In `selectableCard/`.
|
|
736
|
+
|
|
737
|
+
| | Name | Notes |
|
|
738
|
+
|---|---|---|
|
|
739
|
+
| Attribute | `type` | `checkbox` outside a group, `radio` inside, by default |
|
|
740
|
+
| Attribute | `value`, `checked`, `name` | A checkbox card submits `value` (`on`) while checked |
|
|
741
|
+
| Attribute | `label` | Name in place of the title |
|
|
742
|
+
| Attribute | `disabled`, `required` | |
|
|
743
|
+
| Event | `punica-change` | Checkbox card: `{ checked, value }` |
|
|
744
|
+
| Slot | default, `media`, `title`, `description` | Title names the card, description describes it |
|
|
745
|
+
| Part | `base`, `media`, `title`, `description`, `indicator` | |
|
|
746
|
+
| Custom property | `--punica-selectable-card-padding`, `-radius`, `-background`, `-border-color`, `-checked-color`, `-checked-background` | |
|
|
747
|
+
| State | `checked`, `radio`, `disabled`, `valid`, `invalid` | |
|
|
748
|
+
| Group | everything `punica-radio-group` has | It extends it; `orientation` is `horizontal` (a wrapping grid) by default |
|
|
749
|
+
| Group custom property | `--punica-selectable-card-group-gap`, `-min-width` | |
|
|
750
|
+
|
|
751
|
+
Role `checkbox` or `radio` through `ElementInternals`; Space and Enter
|
|
752
|
+
toggle a checkbox card, the group's arrows, Home and End move and choose.
|
|
753
|
+
A click on a link or button inside a checkbox card is its own.
|
|
754
|
+
|
|
755
|
+
## `punica-complex-selector`, `punica-complex-option`, `punica-option-group`
|
|
756
|
+
|
|
757
|
+
A select for rich choices: a trigger, and a panel with a search combobox
|
|
758
|
+
over grouped rows. In `complexSelector/`.
|
|
759
|
+
|
|
760
|
+
| | Name | Notes |
|
|
761
|
+
|---|---|---|
|
|
762
|
+
| Attribute | `value`, `multiple`, `name`, `placeholder`, `clearable`, `label`, `open`, `size`, `full-width`, `disabled`, `required` | As on `punica-select` |
|
|
763
|
+
| Attribute | `label-search`, `label-no-results`, `label-select-all`, `label-clear` | `Search`, `No results`, `Select all`, `Clear` |
|
|
764
|
+
| Property | `value`, `options`, `selectedOptions` | |
|
|
765
|
+
| Method | `show()`, `hide()`, `focus()` | |
|
|
766
|
+
| Event | `punica-change` `{ value }`, `punica-open`, `punica-close` `{ reason }` | |
|
|
767
|
+
| Slot | default, `start` | Rows and groups; an icon |
|
|
768
|
+
| Part | `field`, `trigger`, `value`, `chip`, `clear`, `caret`, `panel`, `search`, `listbox`, `group-header`, `empty` | |
|
|
769
|
+
| Custom property | `--punica-complex-selector-radius`, `-height`, `-padding`, `-border-color`, `-background`, `-min-width`, `-panel-width`, `-listbox-max-height`, `-chip-background` | |
|
|
770
|
+
| State | `open`, `placeholder`, `disabled`, `user-invalid` | |
|
|
771
|
+
| Option | `punica-complex-option` | A `punica-option` with `description` (attribute or slot) and a `start` slot for an icon or avatar; the search matches both lines |
|
|
772
|
+
| Group | `punica-option-group` | `label`; a `group` named by it |
|
|
773
|
+
|
|
774
|
+
The trigger is a `combobox` with `aria-haspopup=dialog`; the panel is a
|
|
775
|
+
`dialog` whose search field is a `combobox` over the `listbox`, keeping
|
|
776
|
+
focus while the arrows move (`aria-activedescendant`). The shadow root
|
|
777
|
+
uses manual slot assignment so each group's heading, which with `multiple`
|
|
778
|
+
is the row that selects the group's rows the search leaves showing, lives
|
|
779
|
+
beside the group in the selector's own tree.
|
|
780
|
+
|
|
781
|
+
## `punica-power-search`
|
|
782
|
+
|
|
783
|
+
A search field that builds structured filters. In `powerSearch/`.
|
|
784
|
+
|
|
785
|
+
| | Name | Notes |
|
|
786
|
+
|---|---|---|
|
|
787
|
+
| Property | `filters` | `[{ key, label, type: 'text' \| 'select' \| 'date', options?, operators? }]` |
|
|
788
|
+
| Property | `value` | `{ query, filters: [{ key, operator, value }] }` |
|
|
789
|
+
| Attribute | `value` | Default, as that JSON |
|
|
790
|
+
| Attribute | `name` | Submitted as one JSON string |
|
|
791
|
+
| Attribute | `label`, `placeholder`, `open`, `disabled`, `readonly`, `required`, `size`, `full-width` | `required`: a query or a filter |
|
|
792
|
+
| Attribute | `label-value`, `label-remove` | `Value`, `Remove` |
|
|
793
|
+
| Event | `punica-input` | `{ value }` while the query is typed |
|
|
794
|
+
| Event | `punica-change` | `{ value }` a filter added or removed, the query committed |
|
|
795
|
+
| Event | `punica-search` | `{ value }` on Enter; cancelable, and cancelled it does not submit the form |
|
|
796
|
+
| Event | `punica-open`, `punica-close` | |
|
|
797
|
+
| Slot | `start` | In place of the search glyph |
|
|
798
|
+
| Part | `field`, `icon`, `tokens`, `token`, `token-label`, `remove`, `pending`, `input`, `date`, `listbox`, `option` | |
|
|
799
|
+
| Custom property | `--punica-power-search-radius`, `-height`, `-padding`, `-border-color`, `-background`, `-min-width`, `-token-background`, `-listbox-max-height` | |
|
|
800
|
+
| State | `open`, `pending`, `disabled`, `user-invalid` | |
|
|
801
|
+
|
|
802
|
+
Default operators: `contains` (text), `is` (select), `on` (date); a field
|
|
803
|
+
with several `operators` asks for one before the value. A token reads
|
|
804
|
+
`Status: Open`, or `Owner is not dana` with another operator. A date value
|
|
805
|
+
is `YYYY-MM-DD`, shown through `Intl` in the element's language. A typed
|
|
806
|
+
or dated value is kept when focus leaves; a half-built filter is not.
|