@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,262 @@
|
|
|
1
|
+
# Migrating the basic form controls from 1.x to 2.0
|
|
2
|
+
|
|
3
|
+
Seven elements were rewritten and seven are new. Tag names did not change;
|
|
4
|
+
attributes, events, slots and custom properties did. What holds for every
|
|
5
|
+
element below:
|
|
6
|
+
|
|
7
|
+
- **Events are `punica-*`.** Nothing fires a `CustomEvent` named `change`,
|
|
8
|
+
`input`, `focus`, `blur` or `keydown` any more. Listen for `punica-input`
|
|
9
|
+
and `punica-change`; the native `focus`, `blur`, `keydown` and `click`
|
|
10
|
+
reach the host on their own. A change made from script fires nothing.
|
|
11
|
+
- **Booleans follow HTML.** `disabled="false"` is disabled. Remove the
|
|
12
|
+
attribute, or set the property to `false`.
|
|
13
|
+
- **`null` removes.** `el.placeholder = null` removes the attribute; 1.x wrote
|
|
14
|
+
the string `"null"`.
|
|
15
|
+
- **Every control is a real form control**: it is in `new FormData(form)`, is
|
|
16
|
+
left out while disabled, goes back to its default on `form.reset()`, reports
|
|
17
|
+
validity (`required`, and the native constraints where there is a native
|
|
18
|
+
input), and is disabled by `<fieldset disabled>`. Each has `name`,
|
|
19
|
+
`disabled`, `required`, `form`, `validity`, `validationMessage`,
|
|
20
|
+
`checkValidity()`, `reportValidity()` and `setCustomValidity()`.
|
|
21
|
+
- **`label` is the accessible name**, never visible text. Visible text is the
|
|
22
|
+
default slot, or a `<punica-field label>` around the control.
|
|
23
|
+
- **Tokens** are `--punica-*` (see the token map in [`MIGRATION-2.0.md`](../MIGRATION-2.0.md#tokens)); each
|
|
24
|
+
element's own custom properties are `--punica-<element>-<property>`.
|
|
25
|
+
- **`fullwidth` is `full-width`**, and `rounded` is gone: controls have the
|
|
26
|
+
token radius by default; set the element's `--punica-<element>-radius` to
|
|
27
|
+
`0` for square corners.
|
|
28
|
+
|
|
29
|
+
## punica-icon-button
|
|
30
|
+
|
|
31
|
+
| | 1.x | 2.0 |
|
|
32
|
+
|---|---|---|
|
|
33
|
+
| Tag | `punica-icon-button` | `punica-icon-button` |
|
|
34
|
+
| Inside | The host with `role="button"`, not focusable | A native `<button>`; the host delegates focus |
|
|
35
|
+
| Accessible name | none | `label` (required) |
|
|
36
|
+
| `color` | `primary` … `success` | the same, plus `neutral` (the default: the text colour) |
|
|
37
|
+
| `size` | `xsmall` (24) · `small` (32) · `medium` (40) · `large` (48) | `small` (28) · `medium` (36) · `large` (44); **`xsmall` removed**, use `--punica-icon-button-size` |
|
|
38
|
+
| `variant` | — | `text` (default) · `outlined` · `filled` |
|
|
39
|
+
| `type` | — | `button` (default) · `submit` · `reset` |
|
|
40
|
+
| `name`, `value` | — | submitted when the button submits its form |
|
|
41
|
+
| `disabled`, `loading` | attributes; styled with inline styles on the host | attributes; `loading` shows a spinner and sets `aria-busy` |
|
|
42
|
+
| Events | none | none (native `click`) |
|
|
43
|
+
| Slots | default | default |
|
|
44
|
+
| Parts | — | `base`, `spinner` |
|
|
45
|
+
| Custom properties | — | `--punica-icon-button-size`, `--punica-icon-button-radius`, `--punica-icon-button-icon-size` |
|
|
46
|
+
| Methods | — | `focus()`, `click()` |
|
|
47
|
+
|
|
48
|
+
## punica-input
|
|
49
|
+
|
|
50
|
+
| | 1.x | 2.0 |
|
|
51
|
+
|---|---|---|
|
|
52
|
+
| Tag | `punica-input` | `punica-input` |
|
|
53
|
+
| `value` attribute | rewritten on every keystroke, so `form.reset()` went to the current value | the **default** value; never written by the element |
|
|
54
|
+
| `value` property | read from the attribute | the current value; `null` reads back as `''` |
|
|
55
|
+
| `type`, `placeholder`, `readonly`, `pattern`, `minlength`, `maxlength`, `autocomplete`, `inputmode`, `name`, `disabled`, `size` | attributes | the same; `readonly` is a boolean now (`readonly="false"` is read-only) |
|
|
56
|
+
| `required`, `min`, `max`, `step` | — | passed to the native input and validated |
|
|
57
|
+
| `label` | — | accessible name; a `<label for>` also names it |
|
|
58
|
+
| `clearable`, `label-clear` | — | a clear button, named `Clear` by default |
|
|
59
|
+
| `fullwidth` | attribute | `full-width` |
|
|
60
|
+
| `rounded` | attribute | removed (rounded by default; `--punica-input-radius`) |
|
|
61
|
+
| `error` | boolean attribute that painted the border red | removed. The border follows validity: `:state(user-invalid)`. For a server-side error call `setCustomValidity(message)`, or use `<punica-field error>` |
|
|
62
|
+
| `focus` attribute | written on the host while focused | removed; style `:focus-within` |
|
|
63
|
+
| `startadornment`, `endadornment` attributes | observed, unused | removed |
|
|
64
|
+
| `hidespinbutton` | attribute for `type="number"` | removed; use `<punica-number-input>` |
|
|
65
|
+
| `tabindex` property | hand-written accessor | removed; the native `tabindex` attribute works |
|
|
66
|
+
| Event `input` (`CustomEvent`, `{ value }`) | on every keystroke | `punica-input`, `{ value }` |
|
|
67
|
+
| — | no commit event | `punica-change`, `{ value }`, on blur or Enter after an edit |
|
|
68
|
+
| Events `focus`, `blur` (`CustomEvent`, `{ value }`) | synthetic | removed; the native `focus` / `blur` fire on the host. Read `event.target.value` |
|
|
69
|
+
| Event `keydown` (`CustomEvent`, `{ key }`) | synthetic; the native one was stopped | removed; the native `keydown` reaches the host with a real `key` |
|
|
70
|
+
| Enter | nothing | requests the submit of the owning form |
|
|
71
|
+
| Slots | `startAdornment`, `endAdornment` | `start`, `end` |
|
|
72
|
+
| Parts | — | `base`, `input`, `clear`, `icon` |
|
|
73
|
+
| Custom properties | `--input-border-radius`, `--input-border-color`, `--input-color` | `--punica-input-radius`, `--punica-input-border-color`, `--punica-input-color`, plus `--punica-input-height`, `--punica-input-padding`, `--punica-input-background` |
|
|
74
|
+
| States | — | `:state(valid)`, `:state(invalid)`, `:state(user-invalid)`, `:state(disabled)` |
|
|
75
|
+
| Methods | — | `focus()`, `select()`, `setSelectionRange()` |
|
|
76
|
+
| Validity | never reported | the native input's own, with its message |
|
|
77
|
+
| Heights | 32 / 40 / 48 | 28 / 36 / 44 (`--punica-size-*`) |
|
|
78
|
+
|
|
79
|
+
## punica-textarea
|
|
80
|
+
|
|
81
|
+
| | 1.x | 2.0 |
|
|
82
|
+
|---|---|---|
|
|
83
|
+
| Tag | `punica-textarea` | `punica-textarea` |
|
|
84
|
+
| Form | not form-associated | a form control |
|
|
85
|
+
| `value` | attribute and property were one | attribute is the default, property the current value |
|
|
86
|
+
| `placeholder`, `rows`, `minlength`, `maxlength`, `disabled` | attributes | the same; `rows` defaults to 3 |
|
|
87
|
+
| `readonly`, `required`, `name`, `autocomplete`, `inputmode`, `label` | — | new |
|
|
88
|
+
| `resize` | — (never resizable) | `none` (default) · `vertical` · `auto` (grows with the content; `rows` is the least height, `--punica-textarea-max-height` the most) |
|
|
89
|
+
| `fullwidth` | attribute | `full-width` |
|
|
90
|
+
| `rounded` | attribute | removed (rounded by default; `--punica-textarea-radius`) |
|
|
91
|
+
| `error`, `focus` attributes | as on the input | removed, as on the input |
|
|
92
|
+
| Event `change` (`CustomEvent`, `{ value }`) | on every keystroke | `punica-input`, `{ value }`, on every keystroke; `punica-change`, `{ value }`, on commit |
|
|
93
|
+
| Slots | none | none |
|
|
94
|
+
| Parts | — | `base`, `textarea` |
|
|
95
|
+
| Custom properties | `--textarea-border-radius`, `--textarea-border-color`, `--textarea-color` | `--punica-textarea-radius`, `--punica-textarea-border-color`, `--punica-textarea-color`, plus `--punica-textarea-padding`, `--punica-textarea-background`, `--punica-textarea-max-height` |
|
|
96
|
+
| States | — | `:state(valid)`, `:state(invalid)`, `:state(user-invalid)`, `:state(disabled)` |
|
|
97
|
+
| Methods | — | `focus()`, `select()`, `setSelectionRange()` |
|
|
98
|
+
|
|
99
|
+
## punica-checkbox
|
|
100
|
+
|
|
101
|
+
| | 1.x | 2.0 |
|
|
102
|
+
|---|---|---|
|
|
103
|
+
| Tag | `punica-checkbox` | `punica-checkbox` |
|
|
104
|
+
| Form | not form-associated | a form control; submits `value` while checked |
|
|
105
|
+
| Inside | a `display: none` input, unreachable by keyboard | a native checkbox laid over the drawn box: Tab reaches it, Space toggles |
|
|
106
|
+
| `checked` | attribute; drifted from the native state after a click | attribute and property follow the state both ways. `form.reset()` goes back to the state at first render |
|
|
107
|
+
| `indeterminate` | string attribute (`indeterminate="true"`) | boolean attribute; the next user toggle clears it |
|
|
108
|
+
| `label` | the visible text | the accessible name of a checkbox without text. **Visible text moves to the default slot**: `<punica-checkbox>Accept</punica-checkbox>` |
|
|
109
|
+
| `value`, `name`, `required`, `color` | — | new; `value` defaults to `on` |
|
|
110
|
+
| Event `change` (`{ value: checked }`, did not bubble) | | `punica-change`, `{ checked, value }`, bubbles and is composed |
|
|
111
|
+
| Slots | none | default (the label) |
|
|
112
|
+
| Parts | — | `base`, `input`, `control`, `icon`, `label` |
|
|
113
|
+
| Custom properties | `--checkbox-color` (the border) | `--punica-checkbox-border-color`, `--punica-checkbox-color` (the checked fill), `--punica-checkbox-size`, `--punica-checkbox-radius`, `--punica-checkbox-gap` |
|
|
114
|
+
| States | — | `:state(checked)`, `:state(indeterminate)`, `:state(valid)`, `:state(invalid)`, `:state(disabled)` |
|
|
115
|
+
| Methods | — | `focus()`, `click()` |
|
|
116
|
+
|
|
117
|
+
## punica-switch
|
|
118
|
+
|
|
119
|
+
| | 1.x | 2.0 |
|
|
120
|
+
|---|---|---|
|
|
121
|
+
| Tag | `punica-switch` | `punica-switch` |
|
|
122
|
+
| Form | not form-associated | a form control; submits `value` (default `on`) while checked |
|
|
123
|
+
| Inside | `role="switch"` on the host and on an inner label, an `aria-hidden` checkbox, a hard-coded `aria-label="regular switch"` | one native `<button role="switch" aria-checked>`, named by the default slot or `label` |
|
|
124
|
+
| `state` (`"true"` / `"false"` string) | attribute and property | **`checked`**, a boolean attribute and property |
|
|
125
|
+
| `initstate="true"` | clicked the switch on connect | removed; write `checked` |
|
|
126
|
+
| `on-label`, `off-label` | attributes (`onLabel` / `offLabel` properties) | **`label-on`**, **`label-off`** (`labelOn` / `labelOff`) |
|
|
127
|
+
| `elastic` | stretch animation of the handle | removed |
|
|
128
|
+
| `name` | attribute, unused | the form name |
|
|
129
|
+
| `value`, `required`, `label`, `color`, `size` | — | new |
|
|
130
|
+
| Keyboard | Space and Enter through `keyCode` | Space and Enter, natively |
|
|
131
|
+
| RTL | `dir` attribute selectors and a `--dirLTR` multiplier | logical properties; follows the inherited direction |
|
|
132
|
+
| Moving the element | broke it: internals were nulled on disconnect | works |
|
|
133
|
+
| Event `change` (`{ state }`) | | `punica-change`, `{ checked, value }` |
|
|
134
|
+
| Slots | none | default (the label) |
|
|
135
|
+
| Parts | — | `base`, `track`, `thumb`, `label-on`, `label-off`, `label` |
|
|
136
|
+
| Custom properties | `--switch-lever--background`, `--switch-lever_checked--background`, `--switch-lever--handle-background`, `--switch-lever_checked--handle-background`, `--switch--on-text-color`, `--switch--off-text-color`, `--switch_checked--on-text-color`, `--switch_checked--off-text-color`, `--switch_focus--background`, `--switch_focus--outline-color`, `--switch_disabled--on-text-color`, `--switch_disabled--off-text-color` | `--punica-switch-track-color`, `--punica-switch-track-color-checked`, `--punica-switch-thumb-color`, `--punica-switch-width`, `--punica-switch-height`, `--punica-switch-gap`. The text colour properties are removed: the side in effect is bold, style `::part(label-on)` / `::part(label-off)`. Focus is `--punica-focus-ring` |
|
|
137
|
+
| Size | 4em × 2em, scaled by font size | 40 × 22 px; `size` or `--punica-switch-width` / `-height` |
|
|
138
|
+
| States | — | `:state(checked)`, `:state(valid)`, `:state(invalid)`, `:state(disabled)` |
|
|
139
|
+
| Methods | — | `focus()`, `click()` |
|
|
140
|
+
|
|
141
|
+
## punica-toggle-button
|
|
142
|
+
|
|
143
|
+
| | 1.x | 2.0 |
|
|
144
|
+
|---|---|---|
|
|
145
|
+
| Tag | `punica-toggle-button` | `punica-toggle-button` |
|
|
146
|
+
| Inside | the host itself | a native `<button aria-pressed>` |
|
|
147
|
+
| `selected` | boolean attribute | **`pressed`** |
|
|
148
|
+
| `value` | default `on` | no attribute default; a lone pressed button still submits `on` |
|
|
149
|
+
| `mode` (`switch` \| `radio`) | a `radio` button could not be released by a click | removed; put the buttons in a `<punica-toggle-button-group>` |
|
|
150
|
+
| `color` | `primary` … `success`, `ghost`; coloured the button at rest | accent of the **pressed** state; at rest the button is outlined and neutral. `ghost` removed, `neutral` added |
|
|
151
|
+
| `size` | `small` · `medium` · `large` (32 / 40 / 48) | the same names (28 / 36 / 44) |
|
|
152
|
+
| `rounded` | attribute | removed (rounded by default) |
|
|
153
|
+
| `name`, `disabled` | attributes | the same |
|
|
154
|
+
| `required`, `label` | — | new |
|
|
155
|
+
| Event `change` (`{ value: selected, name }`) | | `punica-change`, `{ pressed, checked, value }`; `checked` equals `pressed`, `value` is the `value` attribute |
|
|
156
|
+
| Slots | `active`, `passive` (shown while selected / not) | default, `start`, `end`. **`active` / `passive` removed**: put both in the default slot and show one with `punica-toggle-button:state(pressed) .on { … }` in your own CSS |
|
|
157
|
+
| Parts | — | `base`, `label` |
|
|
158
|
+
| Custom properties | `--toggle-button-border-radius` | `--punica-toggle-button-radius` (and one per corner: `-radius-start-start`, `-start-end`, `-end-start`, `-end-end`), `--punica-toggle-button-height`, `--punica-toggle-button-padding`, `--punica-toggle-button-border-color` |
|
|
159
|
+
| States | — | `:state(pressed)`, `:state(valid)`, `:state(invalid)`, `:state(disabled)` |
|
|
160
|
+
| In a group | submitted on its own as well | submits nothing; the group owns the value |
|
|
161
|
+
|
|
162
|
+
## punica-toggle-button-group
|
|
163
|
+
|
|
164
|
+
| | 1.x | 2.0 |
|
|
165
|
+
|---|---|---|
|
|
166
|
+
| Tag | `punica-toggle-button-group` | `punica-toggle-button-group` |
|
|
167
|
+
| Form | not form-associated | a form control |
|
|
168
|
+
| `value` | attribute, rewritten on every click | attribute is the default, property the current value |
|
|
169
|
+
| `defaultvalue` | attribute | removed; that is what the `value` attribute is now. With no `value`, the buttons' own `pressed` gives the first value |
|
|
170
|
+
| `multiple` | — | several pressed buttons; `value` is their values separated by spaces (so a value cannot contain a space), `values` the same as a list, and each is its own form entry |
|
|
171
|
+
| `size`, `color` | copied onto every button | removed; set them on the buttons |
|
|
172
|
+
| `orientation` | `horizontal` · `vertical` | the same; also the arrow-key axis |
|
|
173
|
+
| `fullwidth` | attribute | `full-width` |
|
|
174
|
+
| `disabled` | attribute | the same; also from a fieldset |
|
|
175
|
+
| `name`, `required`, `label` | — | new |
|
|
176
|
+
| Keyboard | every button was a tab stop | one tab stop (roving tabindex); arrows, Home and End move focus, Space or Enter presses |
|
|
177
|
+
| Role | none | `toolbar`, through ElementInternals |
|
|
178
|
+
| Releasing the pressed button | not possible | a second click releases it and `value` is `''` (use `required` to demand a choice) |
|
|
179
|
+
| Event `change` (`{ value }`) | | `punica-change`, `{ value, values }`, fired by the group only; a button's own `punica-change` does not leave the group |
|
|
180
|
+
| Slots | default | default |
|
|
181
|
+
| Custom properties | none | none (the group sets the buttons' corner radii) |
|
|
182
|
+
| States | — | `:state(valid)`, `:state(invalid)`, `:state(disabled)` |
|
|
183
|
+
| Methods | — | `focus()` |
|
|
184
|
+
|
|
185
|
+
## New in 2.0
|
|
186
|
+
|
|
187
|
+
### punica-radio-group and punica-radio
|
|
188
|
+
|
|
189
|
+
| | |
|
|
190
|
+
|---|---|
|
|
191
|
+
| `punica-radio-group` attributes | `value` (default; the property is current), `name`, `label`, `orientation` (`vertical` default), `disabled`, `required` |
|
|
192
|
+
| `punica-radio` attributes | `value`, `checked` (set by the group), `disabled`, `color` |
|
|
193
|
+
| Events | `punica-change` on the group, `{ value }` |
|
|
194
|
+
| Slots | group: default (the radios); radio: default (the label) |
|
|
195
|
+
| Parts | radio: `control`, `label` |
|
|
196
|
+
| Custom properties | `--punica-radio-group-gap`; `--punica-radio-size`, `--punica-radio-border-color`, `--punica-radio-color`, `--punica-radio-gap` |
|
|
197
|
+
| States | group: `valid`, `invalid`, `disabled`; radio: `checked`, `disabled` |
|
|
198
|
+
| Keyboard | one tab stop; arrows, Home, End move and select; Space selects |
|
|
199
|
+
|
|
200
|
+
### punica-segmented-control and punica-segmented-control-item
|
|
201
|
+
|
|
202
|
+
| | |
|
|
203
|
+
|---|---|
|
|
204
|
+
| Control attributes | `value`, `name`, `label`, `disabled`, `required`, `size`, `full-width` |
|
|
205
|
+
| Item attributes | `value`, `selected` (set by the control), `disabled` |
|
|
206
|
+
| Events | `punica-change` on the control, `{ value }` |
|
|
207
|
+
| Slots | control: default (the items); item: default, `start` |
|
|
208
|
+
| Parts | control: `base`, `indicator`; item: `base` |
|
|
209
|
+
| Custom properties | `--punica-segmented-control-height`, `-radius`, `-background`, `-indicator-color`; `--punica-segmented-control-item-padding` |
|
|
210
|
+
| States | control: `valid`, `invalid`, `disabled`; item: `selected`, `disabled` |
|
|
211
|
+
| Keyboard | as the radio group |
|
|
212
|
+
|
|
213
|
+
### punica-slider
|
|
214
|
+
|
|
215
|
+
| | |
|
|
216
|
+
|---|---|
|
|
217
|
+
| Attributes | `value` (default; the property is the current number), `min` (0), `max` (100), `step` (1), `name`, `label`, `orientation`, `disabled`, `color` |
|
|
218
|
+
| Events | `punica-input` `{ value }` while dragging and on a key; `punica-change` `{ value }` on a key and at the end of a drag |
|
|
219
|
+
| Parts | `base`, `track`, `fill`, `thumb` |
|
|
220
|
+
| Custom properties | `--punica-slider-length`, `-track-size`, `-thumb-size`, `-track-color`, `-color` |
|
|
221
|
+
| States | `dragging`, `disabled` |
|
|
222
|
+
| Methods | `stepUp(n)`, `stepDown(n)` |
|
|
223
|
+
| Keyboard | arrows (mirrored in RTL), PageUp / PageDown, Home, End |
|
|
224
|
+
|
|
225
|
+
### punica-number-input
|
|
226
|
+
|
|
227
|
+
| | |
|
|
228
|
+
|---|---|
|
|
229
|
+
| Attributes | `value` (default; the property is a number or `null`), `min`, `max`, `step` (1), `name`, `label`, `placeholder`, `disabled`, `readonly`, `required`, `label-increment`, `label-decrement`, `size`, `full-width` |
|
|
230
|
+
| Properties | `formatOptions` (`Intl.NumberFormatOptions` for the unfocused display) |
|
|
231
|
+
| Events | `punica-input` `{ value }`, `punica-change` `{ value }` |
|
|
232
|
+
| Slots | `start`, `end` |
|
|
233
|
+
| Parts | `base`, `input`, `steppers`, `decrement`, `increment`, `icon` |
|
|
234
|
+
| Custom properties | `--punica-number-input-height`, `-padding`, `-radius`, `-border-color`, `-background`, `-color` |
|
|
235
|
+
| States | `valid`, `invalid`, `user-invalid`, `disabled` |
|
|
236
|
+
| Methods | `focus()`, `select()`, `stepUp(n)`, `stepDown(n)` |
|
|
237
|
+
| Replaces | `<punica-input type="number" hidespinbutton>` |
|
|
238
|
+
|
|
239
|
+
### punica-file-input
|
|
240
|
+
|
|
241
|
+
| | |
|
|
242
|
+
|---|---|
|
|
243
|
+
| Attributes | `accept`, `multiple`, `name`, `label`, `label-browse`, `label-drop`, `disabled`, `required` |
|
|
244
|
+
| Properties | `files` (`File[]`) |
|
|
245
|
+
| Events | `punica-change`, `{ files }` |
|
|
246
|
+
| Parts | `base`, `icon`, `button`, `hint`, `list`, `file` |
|
|
247
|
+
| Custom properties | `--punica-file-input-padding`, `-radius`, `-border-color`, `-background` |
|
|
248
|
+
| States | `dragover`, `filled`, `valid`, `invalid`, `disabled` |
|
|
249
|
+
| Methods | `focus()`, `showPicker()` |
|
|
250
|
+
|
|
251
|
+
### punica-field
|
|
252
|
+
|
|
253
|
+
| | |
|
|
254
|
+
|---|---|
|
|
255
|
+
| Attributes | `label`, `help`, `error`, `required` |
|
|
256
|
+
| Properties | `control` (read-only: the element in the default slot) |
|
|
257
|
+
| Events | none |
|
|
258
|
+
| Slots | default (one control), `label`, `help` |
|
|
259
|
+
| Parts | `label`, `required`, `help`, `error` |
|
|
260
|
+
| Custom properties | `--punica-field-gap`, `-label-color`, `-help-color`, `-error-color` |
|
|
261
|
+
| States | `invalid`, `required` |
|
|
262
|
+
| Replaces | the `error` attribute of the 1.x input and textarea, and the `label` text of the 1.x checkbox |
|
|
@@ -0,0 +1,368 @@
|
|
|
1
|
+
# Migrating selection and navigation from 1.x to 2.0
|
|
2
|
+
|
|
3
|
+
Eight 1.x families were rewritten (tabs, accordion, the two select lists, the
|
|
4
|
+
list view, pagination, the button group, the split) and seven are new
|
|
5
|
+
(collapsible, accordion group, breadcrumbs, stepper, tree, carousel, overflow
|
|
6
|
+
list). What holds for every element below:
|
|
7
|
+
|
|
8
|
+
- **Events are `punica-*`**, bubbling and composed, and fire for what the user
|
|
9
|
+
did. A change made from script (`el.value = …`, `el.open = true`, `next()`)
|
|
10
|
+
fires nothing. No element fires `change`, `changeExpanded` or `split-change`.
|
|
11
|
+
- **Parents find their children, children never call the parent.** 1.x items
|
|
12
|
+
called `parentElement.itemAdd(this)` and threw when the parent was not
|
|
13
|
+
defined yet. In 2.0 either may be defined, created or connected first.
|
|
14
|
+
- **Booleans follow HTML.** `disabled="false"` is disabled; remove the
|
|
15
|
+
attribute or set the property to `false`. `null` removes an attribute.
|
|
16
|
+
- **Multi-word attributes are kebab-case**: `fullwidth` → `full-width`,
|
|
17
|
+
`totalCount` → `total-count`, `enabledivider` → `dividers`.
|
|
18
|
+
- **Roles and ARIA state live on `ElementInternals`** (or on a native element
|
|
19
|
+
inside the shadow root), so they do not show as host attributes. The
|
|
20
|
+
exceptions are the id references between a tab and its panel, the
|
|
21
|
+
collapsible's trigger, and `tabindex` for a roving tab stop.
|
|
22
|
+
- **Every string a person hears is an attribute** with an English default
|
|
23
|
+
(`label-next="Next page"`); numbers go through `Intl.NumberFormat` in the
|
|
24
|
+
language of the closest `[lang]`.
|
|
25
|
+
- **Tokens** are `--punica-*` (see the token map in [`MIGRATION-2.0.md`](../MIGRATION-2.0.md#tokens)); each
|
|
26
|
+
element's own custom properties are `--punica-<element>-<property>`.
|
|
27
|
+
|
|
28
|
+
## punica-tabs (was punica-tab)
|
|
29
|
+
|
|
30
|
+
| | 1.x | 2.0 |
|
|
31
|
+
|---|---|---|
|
|
32
|
+
| Tag | `punica-tab` (the container) | `punica-tabs` |
|
|
33
|
+
| Children | `punica-tab-item`; panels lived anywhere and were told the value by hand | `punica-tab` and `punica-tab-panel` as direct children |
|
|
34
|
+
| `value` | value of the selected item | the same; the first enabled tab when absent |
|
|
35
|
+
| `orientation` | `horizontal` · `vertical` | the same, `horizontal` by default |
|
|
36
|
+
| `activation` | — | `auto` (arrows select, the default) · `manual` (Enter or Space selects) |
|
|
37
|
+
| `label` | — | accessible name of the tab list |
|
|
38
|
+
| `fullwidth` | boolean | `full-width` |
|
|
39
|
+
| `disabled` | boolean | the same |
|
|
40
|
+
| Properties | `value`, `orientation`, `fullwidth`, `disabled` | `value`, `orientation`, `activation`, `label`, `fullWidth`, `disabled`, plus read-only `tabs`, `panels`, `selectedTab` |
|
|
41
|
+
| Methods | `itemAdd(item)`, `itemRemove(item)` | **removed**; children are read from the slot |
|
|
42
|
+
| Event | `change` `{ value }` | `punica-change` `{ value }` |
|
|
43
|
+
| Slots | default (the items) | `tab` (the tabs; a tab places itself there), default (the panels) |
|
|
44
|
+
| Parts | — | `tablist`, `indicator`, `panels` |
|
|
45
|
+
| Custom properties | — | `--punica-tabs-indicator-color`, `--punica-tabs-indicator-size`, `--punica-tabs-border-color`, `--punica-tabs-gap` |
|
|
46
|
+
| Roles | none | `tablist` on the `tablist` part, with `aria-orientation` and `aria-label` |
|
|
47
|
+
| Keyboard | none | arrow keys by orientation (mirrored in RTL), Home, End, Enter and Space in `manual`; one tab stop |
|
|
48
|
+
| Selected mark | a border on the item | one indicator that slides under the selected tab |
|
|
49
|
+
|
|
50
|
+
## punica-tab (was punica-tab-item)
|
|
51
|
+
|
|
52
|
+
| | 1.x | 2.0 |
|
|
53
|
+
|---|---|---|
|
|
54
|
+
| Tag | `punica-tab-item` | `punica-tab` (1.x used this name for the container) |
|
|
55
|
+
| `value` | pairs with the panel | the same; the tab's position (`"0"`, `"1"`, …) when absent |
|
|
56
|
+
| `selected` | boolean, set by the parent | the same; set by `punica-tabs`, do not write it |
|
|
57
|
+
| `disabled` | — | the tab is skipped by keys and clicks |
|
|
58
|
+
| Events | click was listened to by the parent | none of its own |
|
|
59
|
+
| Slots | default | default, `start`, `end` |
|
|
60
|
+
| Parts | — | `base` |
|
|
61
|
+
| Custom properties | — | `--punica-tab-padding`, `--punica-tab-color`, `--punica-tab-selected-color`, `--punica-tab-hover-background` |
|
|
62
|
+
| State | — | `:state(selected)` |
|
|
63
|
+
| Role | none | `tab`, `aria-selected`, `aria-controls` (the panel's id, generated when missing) |
|
|
64
|
+
| Look | unselected tabs at 60 % opacity | full-contrast text; the selected tab takes the primary colour |
|
|
65
|
+
| Removed | `:host-context(punica-tab[orientation])` styling | the container styles its tabs |
|
|
66
|
+
|
|
67
|
+
## punica-tab-panel
|
|
68
|
+
|
|
69
|
+
| | 1.x | 2.0 |
|
|
70
|
+
|---|---|---|
|
|
71
|
+
| Tag | `punica-tab-panel` | `punica-tab-panel`, a direct child of `punica-tabs` |
|
|
72
|
+
| `value` | pairs with the tab | the same; its position when absent |
|
|
73
|
+
| `selectedvalue` | set by the page to show or hide the panel | **removed**; `punica-tabs` shows the matching panel |
|
|
74
|
+
| `active` | — | boolean set by `punica-tabs` |
|
|
75
|
+
| Showing | inline `display` on the host; the slot was created and removed | `:host(:not([active]))` is `display: none`; the content stays in the DOM |
|
|
76
|
+
| Slots | default (only while selected) | default |
|
|
77
|
+
| Parts | — | `base` |
|
|
78
|
+
| Custom properties | — | `--punica-tab-panel-padding` (16px; 1.x had none) |
|
|
79
|
+
| State | — | `:state(active)` |
|
|
80
|
+
| Role | none | `tabpanel`, `aria-labelledby` (the tab's id), `tabindex="0"` |
|
|
81
|
+
|
|
82
|
+
## punica-accordion
|
|
83
|
+
|
|
84
|
+
| | 1.x | 2.0 |
|
|
85
|
+
|---|---|---|
|
|
86
|
+
| Tag | `punica-accordion` with `punica-accordion-summary` and `punica-accordion-details` children | `punica-accordion` alone |
|
|
87
|
+
| `expanded` | boolean; also read as `expanded="true"` in CSS | `open` |
|
|
88
|
+
| `rounded` | boolean | the same |
|
|
89
|
+
| `disabled` | — | the summary takes no click and no focus |
|
|
90
|
+
| `heading-level` | — | 1 to 6: the summary is exposed as a heading of that level |
|
|
91
|
+
| Properties | `expanded`, `rounded` | `open`, `disabled`, `rounded`, `headingLevel` |
|
|
92
|
+
| Methods | `addSummary(summary)` | **removed**; `show()`, `hide()`, `toggle()`, `focus()` |
|
|
93
|
+
| Event | `changeExpanded` `{ expanded }` | `punica-toggle` `{ open }` |
|
|
94
|
+
| Summary | `<punica-accordion-summary>` with slots `icon`, `content`, `actions`, `expandIcon` | slots on the accordion: `start`, `summary`, `end`, `indicator` |
|
|
95
|
+
| Content | `<punica-accordion-details>` | the default slot |
|
|
96
|
+
| Parts | — | `header`, `summary`, `label`, `indicator`, `region`, `content` |
|
|
97
|
+
| Custom properties | `--accordion-border-radius`, `--accordion-summary-padding`, `--accordion-details-padding` | `--punica-accordion-radius`, `--punica-accordion-summary-padding`, `--punica-accordion-content-padding`, `--punica-accordion-background`, `--punica-accordion-duration` |
|
|
98
|
+
| State | — | `:state(open)` |
|
|
99
|
+
| Semantics | `aria-expanded` on the host, no button, no keyboard | a native `<button aria-expanded aria-controls>` in the shadow root and a `role="region"` labelled by it |
|
|
100
|
+
| Motion | none (display toggled) | the height animates; the duration token is 0 under reduced motion |
|
|
101
|
+
| Closed content | `display: none` | `visibility: hidden` at zero height: out of the tab order and the accessibility tree |
|
|
102
|
+
|
|
103
|
+
Before and after:
|
|
104
|
+
|
|
105
|
+
```html
|
|
106
|
+
<!-- 1.x -->
|
|
107
|
+
<punica-accordion expanded>
|
|
108
|
+
<punica-accordion-summary><span slot="content">Shipping</span></punica-accordion-summary>
|
|
109
|
+
<punica-accordion-details>Two days.</punica-accordion-details>
|
|
110
|
+
</punica-accordion>
|
|
111
|
+
|
|
112
|
+
<!-- 2.0 -->
|
|
113
|
+
<punica-accordion open>
|
|
114
|
+
<span slot="summary">Shipping</span>
|
|
115
|
+
Two days.
|
|
116
|
+
</punica-accordion>
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## punica-accordion-summary, punica-accordion-details
|
|
120
|
+
|
|
121
|
+
Removed. See the `summary`, `start`, `end` and `indicator` slots and the
|
|
122
|
+
default slot of `punica-accordion`.
|
|
123
|
+
|
|
124
|
+
| 1.x | 2.0 |
|
|
125
|
+
|---|---|
|
|
126
|
+
| `<punica-accordion-summary>` | gone |
|
|
127
|
+
| slot `content` | `slot="summary"` on the accordion |
|
|
128
|
+
| slot `icon` | `slot="start"` |
|
|
129
|
+
| slot `actions` | `slot="end"` (outside the button, so it may hold buttons) |
|
|
130
|
+
| slot `expandIcon` | `slot="indicator"` |
|
|
131
|
+
| `--accordion-summary-padding` | `--punica-accordion-summary-padding` |
|
|
132
|
+
| `<punica-accordion-details>` | gone; its content is the accordion's default slot |
|
|
133
|
+
| `--accordion-details-padding` | `--punica-accordion-content-padding` |
|
|
134
|
+
|
|
135
|
+
## punica-accordion-group (new)
|
|
136
|
+
|
|
137
|
+
| | 2.0 |
|
|
138
|
+
|---|---|
|
|
139
|
+
| Tag | `punica-accordion-group` |
|
|
140
|
+
| `multiple` | several sections may be open; when absent, opening one closes the others and only the first `open` section of the markup stays open |
|
|
141
|
+
| Properties | `multiple`, read-only `items` |
|
|
142
|
+
| Events | none of its own; it listens to its direct children's `punica-toggle` |
|
|
143
|
+
| Slots | default: `punica-accordion` elements |
|
|
144
|
+
| Custom properties | `--punica-accordion-group-gap`, `--punica-accordion-group-divider` |
|
|
145
|
+
|
|
146
|
+
## punica-collapsible (new)
|
|
147
|
+
|
|
148
|
+
| | 2.0 |
|
|
149
|
+
|---|---|
|
|
150
|
+
| Tag | `punica-collapsible` |
|
|
151
|
+
| `open` | the content is showing |
|
|
152
|
+
| `disabled` | the trigger does not toggle |
|
|
153
|
+
| Methods | `show()`, `hide()`, `toggle()` |
|
|
154
|
+
| Event | `punica-toggle` `{ open }` |
|
|
155
|
+
| Slots | `trigger` (a native `<button>`; it gets `aria-expanded` and `aria-controls`), default (the content) |
|
|
156
|
+
| Parts | `content` |
|
|
157
|
+
| Custom properties | `--punica-collapsible-duration` |
|
|
158
|
+
| State | `:state(open)` |
|
|
159
|
+
| Note | `aria-controls` names the host, which gets a generated `id` when it has none: the region is in the shadow root, out of reach of an id reference |
|
|
160
|
+
|
|
161
|
+
## punica-listbox (was punica-single-select-list and punica-multi-select-list)
|
|
162
|
+
|
|
163
|
+
| | 1.x | 2.0 |
|
|
164
|
+
|---|---|---|
|
|
165
|
+
| Tag | `punica-single-select-list`, `punica-multi-select-list` | `punica-listbox`, with `multiple` for the second |
|
|
166
|
+
| `value` attribute | the selection, kept in sync; comma-separated in the multi list | the **default** value (a form reset goes back to it); with `multiple` a JSON array or a comma-separated list |
|
|
167
|
+
| `value` property | a string in both lists | the current selection: a string or `null`; an **array** with `multiple` |
|
|
168
|
+
| `multiple` | a different element | boolean |
|
|
169
|
+
| `name`, `disabled`, `required` | — | form control attributes |
|
|
170
|
+
| `label` | — | accessible name |
|
|
171
|
+
| `orientation` | — | `vertical` (default) · `horizontal`: the direction the arrow keys follow |
|
|
172
|
+
| Properties | `value` | `value`, `defaultValue`, `multiple`, `name`, `disabled`, `required`, `label`, `orientation`, `form`, `labels`, `validity`, `validationMessage`, `willValidate`, read-only `items`, `selectedItems` |
|
|
173
|
+
| Methods | `itemAdded(item)`, `itemRemoved(item)` | **removed**; `focus()`, `checkValidity()`, `reportValidity()`, `setCustomValidity()` |
|
|
174
|
+
| Event | `change` `{ value }`, plus `selectedValues` in the multi list | `punica-change` `{ value }` (the array with `multiple`); **`selectedValues` removed** |
|
|
175
|
+
| Slots | default | default: `punica-listbox-item` elements |
|
|
176
|
+
| Custom properties | — | `--punica-listbox-background`, `--punica-listbox-padding`, `--punica-listbox-radius`, `--punica-listbox-max-height` |
|
|
177
|
+
| States | — | `:state(disabled)`, `:state(invalid)`, `:state(valid)` |
|
|
178
|
+
| Form | not a form control | in `FormData` (once per value with `multiple`), left out when disabled or inside `<fieldset disabled>`, restored by `form.reset()`, `required` |
|
|
179
|
+
| Role | none | `listbox`, `aria-multiselectable`, `aria-orientation`, `aria-required`, `aria-disabled` |
|
|
180
|
+
| Keyboard | none | Up/Down (or Left/Right, mirrored in RTL), Home, End, type-ahead; single: selection follows focus, Space or Enter selects; multiple: Space toggles, Shift+arrow extends, Ctrl+A selects all or none, Shift+click selects a range; one tab stop |
|
|
181
|
+
| `document.createElement` | threw in the single list (an attribute was set in the constructor) | works |
|
|
182
|
+
|
|
183
|
+
## punica-listbox-item (was punica-single-select-list-item and punica-multi-select-list-item)
|
|
184
|
+
|
|
185
|
+
| | 1.x | 2.0 |
|
|
186
|
+
|---|---|---|
|
|
187
|
+
| Tag | `punica-single-select-list-item`, `punica-multi-select-list-item` | `punica-listbox-item` |
|
|
188
|
+
| `value` | the item's value | the same; the item's text when absent |
|
|
189
|
+
| `selected` | set by the parent | in markup, a default selection (when the listbox has no `value` attribute); afterwards set by the listbox from its value |
|
|
190
|
+
| `disabled` | — | skipped by keys and clicks |
|
|
191
|
+
| Slots | default | default, `start`, `end` |
|
|
192
|
+
| Parts | — | `base`, `label`, `check` |
|
|
193
|
+
| Custom properties | — | `--punica-listbox-item-padding`, `--punica-listbox-item-hover-background`, `--punica-listbox-item-selected-background` |
|
|
194
|
+
| State | — | `:state(selected)` |
|
|
195
|
+
| Role | none | `option`, `aria-selected`, `aria-disabled` |
|
|
196
|
+
| Look | multi: selected and hovered rows on `--highlight` with white text | both: `--punica-color-hover` under the pointer, `--punica-color-selected` and a check mark when selected |
|
|
197
|
+
|
|
198
|
+
## punica-list (was punica-list-view)
|
|
199
|
+
|
|
200
|
+
| | 1.x | 2.0 |
|
|
201
|
+
|---|---|---|
|
|
202
|
+
| Tag | `punica-list-view` | `punica-list` |
|
|
203
|
+
| `enabledivider` | boolean; wrote `data-divider` on every child | `dividers`; a `::slotted` rule, nothing is written on the children |
|
|
204
|
+
| `spacing` | a number multiplied by 8px, passed to an inner `punica-row` | **removed**; set `--punica-list-gap` |
|
|
205
|
+
| `dense` | — | tighter rows |
|
|
206
|
+
| `label` | — | accessible name |
|
|
207
|
+
| Properties | `enabledivider`, `spacing` | `dividers`, `dense`, `label`, read-only `items` |
|
|
208
|
+
| Events | none | none (an interactive item fires `punica-select`, which bubbles) |
|
|
209
|
+
| Slots | default | default: `punica-list-item` elements |
|
|
210
|
+
| Custom properties | `--list-view-border-radius`, `--list-view-spacing`, `--divider` | `--punica-list-radius`, `--punica-list-gap`, `--punica-list-divider`, `--punica-list-padding` |
|
|
211
|
+
| Role | none | `list` |
|
|
212
|
+
| Reconnect | appended its template again on every connect | one shadow tree, cloned once |
|
|
213
|
+
| Removed | the inner `punica-row`; the inline `--list-view-spacing` on the host | |
|
|
214
|
+
|
|
215
|
+
## punica-list-item (was punica-list-view-item)
|
|
216
|
+
|
|
217
|
+
| | 1.x | 2.0 |
|
|
218
|
+
|---|---|---|
|
|
219
|
+
| Tag | `punica-list-view-item` | `punica-list-item` |
|
|
220
|
+
| `interactive` | — | the row holds a native `<button>`, or an `<a>` with `href` |
|
|
221
|
+
| `href`, `target`, `rel` | — | the link of an interactive row |
|
|
222
|
+
| `selected` | — | the current row: `aria-current="true"` on the control, a selected background |
|
|
223
|
+
| `disabled` | — | an interactive row that takes no click and no focus |
|
|
224
|
+
| `value` | — | carried in `punica-select` |
|
|
225
|
+
| Event | none | `punica-select` `{ value, item }` when an interactive row is activated |
|
|
226
|
+
| Slots | default | default, `start`, `end` (`end` is outside the button or link) |
|
|
227
|
+
| Parts | — | `row`, `base`, `content` |
|
|
228
|
+
| Custom properties | — | `--punica-list-item-padding`, `--punica-list-item-min-height`, `--punica-list-item-gap`, `--punica-list-item-hover-background`, `--punica-list-item-selected-background` |
|
|
229
|
+
| State | — | `:state(selected)` |
|
|
230
|
+
| Role | none | `listitem` |
|
|
231
|
+
| Look | a bare block with no padding | a 44px row with 8px/16px padding; set `--punica-list-item-padding: 0` and `--punica-list-item-min-height: 0` for the 1.x look |
|
|
232
|
+
|
|
233
|
+
## punica-pagination
|
|
234
|
+
|
|
235
|
+
| | 1.x | 2.0 |
|
|
236
|
+
|---|---|---|
|
|
237
|
+
| Tag | `punica-pagination` | the same |
|
|
238
|
+
| `page` | current page | the same, from 1; shown clamped to the pages there are |
|
|
239
|
+
| `totalCount` | observed in camelCase, so the attribute never fired | `total-count` (property `totalCount`) |
|
|
240
|
+
| `size` | records per page | `page-size` (property `pageSize`), 10 by default |
|
|
241
|
+
| `sibling-count` | — | pages on each side of the current one, 1 by default |
|
|
242
|
+
| `label` | — | name of the `<nav>`, `Pagination` by default |
|
|
243
|
+
| `label-previous`, `label-next` | — | names of the two arrow buttons |
|
|
244
|
+
| `label-page` | — | name of a page button, `Page {page}` by default |
|
|
245
|
+
| `disabled` | — | no button takes a click |
|
|
246
|
+
| Properties | `page`, `totalCount`, `size` | `page`, `totalCount`, `pageSize`, `siblingCount`, `label`, `labelPrevious`, `labelNext`, `labelPage`, `disabled`, read-only `pageCount`, `currentPage` |
|
|
247
|
+
| Methods | `paginate()`, `prevButtonClick()`, `nextButtonClick()`, `update()` as public API | **removed** |
|
|
248
|
+
| Event | none: a click wrote the `page` attribute | `punica-change` `{ page }` (also `{ value }`) |
|
|
249
|
+
| Slots | `prevPage`, `nextPage` | `previous`, `next` (a chevron by default) |
|
|
250
|
+
| Parts | — | `base`, `list`, `previous`, `next`, `page`, `current`, `ellipsis` |
|
|
251
|
+
| Custom properties | — | `--punica-pagination-gap`, `--punica-pagination-size`, `--punica-pagination-radius`, `--punica-pagination-current-background`, `--punica-pagination-current-color` |
|
|
252
|
+
| Inside | `punica-row`, `punica-col`, `punica-button`, `punica-typography`; the current page was a button at 30 % opacity | a `<nav>` holding a list of native buttons; the current page has `aria-current="page"` and the primary background |
|
|
253
|
+
| Numbers | raw | `Intl.NumberFormat` in the element's language |
|
|
254
|
+
| Listeners | added on every update, and the wrong one removed | one delegated listener, added once |
|
|
255
|
+
|
|
256
|
+
## punica-button-group
|
|
257
|
+
|
|
258
|
+
| | 1.x | 2.0 |
|
|
259
|
+
|---|---|---|
|
|
260
|
+
| Tag | `punica-button-group` | the same |
|
|
261
|
+
| `variant`, `size`, `color`, `disabled` | copied onto every child by attribute writes | **removed**; set them on each button |
|
|
262
|
+
| `fullwidth` | boolean | `full-width` |
|
|
263
|
+
| `orientation` | — | `horizontal` (default) · `vertical` |
|
|
264
|
+
| `label` | — | accessible name of the group |
|
|
265
|
+
| Properties | `size`, `variant`, `color`, `disabled`, `fullwidth` | `label`, `orientation`, `fullWidth` |
|
|
266
|
+
| Methods | `applyNewStyle()` | **removed** |
|
|
267
|
+
| Events | none | none |
|
|
268
|
+
| Slots | default: `punica-button` | default: `punica-button`, `punica-icon-button`, `punica-toggle-button` |
|
|
269
|
+
| Custom properties | — | `--punica-button-group-radius` |
|
|
270
|
+
| Role | none | `group` |
|
|
271
|
+
| Joining | `border-radius: 0 !important` on the child hosts | `::slotted` rules set each child's own `--punica-button-radius`, `--punica-icon-button-radius` or `--punica-toggle-button-radius`; mirrored in RTL, top to bottom when vertical |
|
|
272
|
+
| Between buttons | a light grey line after a filled button | outlined neighbours overlap by one border; others are parted by one border width |
|
|
273
|
+
|
|
274
|
+
## punica-split
|
|
275
|
+
|
|
276
|
+
| | 1.x | 2.0 |
|
|
277
|
+
|---|---|---|
|
|
278
|
+
| Tag | `punica-split` | the same |
|
|
279
|
+
| Panes | any number, in the default slot | **two**: `slot="start"` and `slot="end"`; nest a split in a pane for more |
|
|
280
|
+
| `sizes` | a list of percentages | **removed**; `position`, the percent of the start pane (50 by default) |
|
|
281
|
+
| `min` | smallest pane size in px | smallest `position` in percent (0 by default) |
|
|
282
|
+
| `max` | — | largest `position` in percent (100 by default) |
|
|
283
|
+
| `step` | keyboard step | the same, in percent (1 by default); Page Up and Page Down move ten steps |
|
|
284
|
+
| `orientation` | `horizontal` · `vertical` | the same |
|
|
285
|
+
| `label` | — | name of the divider, `Resize` by default |
|
|
286
|
+
| `disabled` | — | the divider cannot be moved |
|
|
287
|
+
| `no-transition` | boolean | **removed**; the panes do not animate |
|
|
288
|
+
| Properties | `orientation`, `sizes`, `min`, `step` | `orientation`, `position`, `min`, `max`, `step`, `label`, `disabled` |
|
|
289
|
+
| Methods | `setSizes(arr)`, `getSizes()`, `reset()` | **removed**; write `position` |
|
|
290
|
+
| Events | `split-change` `{ sizes, final }` | `punica-input` `{ position }` while dragging, `punica-change` `{ position }` at the end of a drag and on a key (both also carry `{ value }`) |
|
|
291
|
+
| Slots | default | `start`, `end` |
|
|
292
|
+
| Parts | — | `base`, `start`, `end`, `divider` |
|
|
293
|
+
| Custom properties | `--split-gutter-size`, `--split-gutter-hitbox`, `--split-gutter-color`, `--split-gutter-hover`, `--split-pane-bg`, `--split-transition` | `--punica-split-divider-size`, `--punica-split-divider-line`, `--punica-split-divider-color`, `--punica-split-divider-active-color`; **`--split-pane-bg` and `--split-transition` removed** (style the slotted panes) |
|
|
294
|
+
| State | class `dragging` on the gutter | `:state(dragging)` |
|
|
295
|
+
| Divider | a focusable gutter | `role="separator"` with `aria-valuenow`, `aria-valuemin`, `aria-valuemax`, `aria-orientation`, `aria-controls`, `tabindex="0"` |
|
|
296
|
+
| Keyboard | arrows | Left/Right (mirrored in RTL) or Up/Down by orientation, Home, End, Page Up, Page Down |
|
|
297
|
+
| Pointer | document-level move listeners, `user-select` class on the body | pointer capture on the divider; nothing outside the element |
|
|
298
|
+
| Reconnect | duplicated its shadow tree | one shadow tree |
|
|
299
|
+
|
|
300
|
+
## punica-breadcrumbs, punica-breadcrumb-item (new)
|
|
301
|
+
|
|
302
|
+
| | `punica-breadcrumbs` | `punica-breadcrumb-item` |
|
|
303
|
+
|---|---|---|
|
|
304
|
+
| Attributes | `label` (`Breadcrumb`), `max-items`, `label-more` (`Show more`) | `href`, `target`, `rel`, `current` |
|
|
305
|
+
| Properties | `label`, `maxItems`, `labelMore`, read-only `items` | `href`, `target`, `rel`, `current` |
|
|
306
|
+
| Events | none (the popover's `punica-open` / `punica-close` bubble) | none; the native `click` of the link |
|
|
307
|
+
| Slots | default | default, `start`, `separator` |
|
|
308
|
+
| Parts | `base`, `list`, `more-item`, `more`, `separator`, `menu` | `link`, `separator` |
|
|
309
|
+
| Custom properties | `--punica-breadcrumbs-gap` | `--punica-breadcrumb-item-color`, `--punica-breadcrumb-item-current-color`, `--punica-breadcrumb-item-gap`, `--punica-breadcrumb-item-separator-display` |
|
|
310
|
+
| Semantics | `<nav aria-label>` holding an `<ol>`; with `max-items` the middle items move into a `punica-popover` behind a named button | `listitem`; an `<a>` (no `href`: plain text), `aria-current="page"` with `current` |
|
|
311
|
+
|
|
312
|
+
## punica-stepper, punica-step (new)
|
|
313
|
+
|
|
314
|
+
| | `punica-stepper` | `punica-step` |
|
|
315
|
+
|---|---|---|
|
|
316
|
+
| Attributes | `value`, `orientation`, `linear`, `label` | `value`, `label`, `description`, `state` (`complete` · `error`), `disabled`, `label-complete` (`Completed`), `label-error` (`Error`); set by the stepper: `active`, `orientation` |
|
|
317
|
+
| Properties | the same, plus read-only `steps`, `activeIndex` | the same, plus `index` and `interactive` (set by the stepper) |
|
|
318
|
+
| Methods | `next()`, `previous()` | `focus()` |
|
|
319
|
+
| Events | `punica-change` `{ value }` | none |
|
|
320
|
+
| Slots | default | default (the title), `description` |
|
|
321
|
+
| Parts | — | `base`, `marker`, `label`, `description`, `connector` |
|
|
322
|
+
| Custom properties | `--punica-stepper-gap` | `--punica-step-marker-size`, `--punica-step-color`, `--punica-step-error-color`, `--punica-step-connector-color`, `--punica-step-gap`, `--punica-step-connector-display` |
|
|
323
|
+
| State | — | `:state(active)` |
|
|
324
|
+
| Semantics | `list` | `listitem`; a native `<button>` unless the stepper is `linear`; `aria-current="step"` on the active one |
|
|
325
|
+
|
|
326
|
+
## punica-tree, punica-tree-item (new)
|
|
327
|
+
|
|
328
|
+
| | `punica-tree` | `punica-tree-item` |
|
|
329
|
+
|---|---|---|
|
|
330
|
+
| Attributes | `selection` (`none` · `single` · `multiple`), `label` | `label`, `value`, `expanded`, `selected`, `disabled`, `lazy`; set by the item: `loading` |
|
|
331
|
+
| Properties | the same, plus read-only `items`, `selectedItems`, `visibleItems` | the same |
|
|
332
|
+
| Methods | `expandAll()`, `collapseAll()` | — |
|
|
333
|
+
| Events | `punica-select` `{ value, item }` | `punica-toggle` `{ open, item }`, `punica-load` `{ item }` (both bubble to the tree) |
|
|
334
|
+
| Slots | default | default (child items), `label`, `start`, `end` |
|
|
335
|
+
| Parts | — | `row`, `toggle`, `label`, `spinner`, `group` |
|
|
336
|
+
| Custom properties | `--punica-tree-indent` | `--punica-tree-item-indent`, `--punica-tree-item-padding`, `--punica-tree-item-hover-background`, `--punica-tree-item-selected-background` |
|
|
337
|
+
| State | — | `:state(branch)` |
|
|
338
|
+
| Semantics | `tree`, `aria-multiselectable` | `treeitem` with `aria-level`, `aria-setsize`, `aria-posinset`, `aria-expanded`, `aria-selected`, `aria-busy`; children in a `role="group"` |
|
|
339
|
+
| Keyboard | Up, Down, Home, End, Right (expand, then first child), Left (collapse, then parent), mirrored in RTL, `*` expands the siblings, type-ahead, Enter and Space select (Enter toggles when nothing is selectable); one tab stop | |
|
|
340
|
+
|
|
341
|
+
## punica-carousel, punica-carousel-item (new)
|
|
342
|
+
|
|
343
|
+
| | `punica-carousel` | `punica-carousel-item` |
|
|
344
|
+
|---|---|---|
|
|
345
|
+
| Attributes | `index`, `loop`, `autoplay`, `interval`, `label`, `label-previous`, `label-next`, `label-pause`, `label-play`, `label-slide` (`{index} of {total}`), `label-dots`, `roledescription`, `slide-roledescription` | `label`; set by the carousel: `active` |
|
|
346
|
+
| Properties | the same, plus read-only `items`, `currentIndex`, `playing` | the same, plus `positionLabel`, `roledescription` (set by the carousel) |
|
|
347
|
+
| Methods | `next()`, `previous()`, `pause()`, `play()` | — |
|
|
348
|
+
| Events | `punica-change` `{ index }` (also `{ value }`) | none |
|
|
349
|
+
| Slots | default | default |
|
|
350
|
+
| Parts | `base`, `track`, `controls`, `previous`, `next`, `pause`, `dots`, `dot`, `dot-active` | `base` |
|
|
351
|
+
| Custom properties | `--punica-carousel-gap`, `--punica-carousel-slide-size`, `--punica-carousel-dot-size`, `--punica-carousel-dot-color`, `--punica-carousel-dot-active-color` | — |
|
|
352
|
+
| State | `:state(playing)` | `:state(active)` |
|
|
353
|
+
| Semantics | `region` with `aria-roledescription`; dots are a `tablist` of `tab` buttons | `group` with `aria-roledescription` and an `aria-label` of its position; `inert` while not showing |
|
|
354
|
+
| Autoplay | stops while the pointer or focus is inside and when paused; starts paused under reduced motion; an automatic advance fires no event | |
|
|
355
|
+
|
|
356
|
+
## punica-overflow-list (new)
|
|
357
|
+
|
|
358
|
+
| | 2.0 |
|
|
359
|
+
|---|---|
|
|
360
|
+
| Tag | `punica-overflow-list` |
|
|
361
|
+
| `label-more` | name of the button that opens the overflowing children, `More` by default |
|
|
362
|
+
| Properties | `labelMore`, read-only `overflowCount` |
|
|
363
|
+
| Methods | `layout()` |
|
|
364
|
+
| Event | `punica-overflow` `{ count }` when the number of overflowing children changes |
|
|
365
|
+
| Slots | default |
|
|
366
|
+
| Parts | `base`, `items`, `more`, `menu` |
|
|
367
|
+
| Custom properties | `--punica-overflow-list-gap`, `--punica-overflow-list-menu-gap` |
|
|
368
|
+
| How | a `ResizeObserver` on the host and a `MutationObserver` on its children, both disconnected with the element; children are re-slotted, never moved in the DOM |
|