@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,184 @@
|
|
|
1
|
+
// src/core/overlay.js
|
|
2
|
+
var supportsAnchor = () => typeof CSS !== "undefined" && CSS.supports("anchor-name: --a") && CSS.supports("position-area: block-end");
|
|
3
|
+
var supportsPopover = () => typeof HTMLElement !== "undefined" && "showPopover" in HTMLElement.prototype;
|
|
4
|
+
var anchorCounter = 0;
|
|
5
|
+
function physicalArea(side, align, rtl) {
|
|
6
|
+
const startEdge = rtl ? "right" : "left";
|
|
7
|
+
const endEdge = rtl ? "left" : "right";
|
|
8
|
+
if (side === "block-end" || side === "block-start") {
|
|
9
|
+
const edge2 = side === "block-end" ? "bottom" : "top";
|
|
10
|
+
if (align === "center") return edge2;
|
|
11
|
+
return `${edge2} span-${align === "start" ? endEdge : startEdge}`;
|
|
12
|
+
}
|
|
13
|
+
const edge = side === "inline-end" ? endEdge : startEdge;
|
|
14
|
+
if (align === "center") return edge;
|
|
15
|
+
return `${edge} span-${align === "start" ? "bottom" : "top"}`;
|
|
16
|
+
}
|
|
17
|
+
var Overlay = class {
|
|
18
|
+
/** @type {HTMLElement} */
|
|
19
|
+
#panel;
|
|
20
|
+
/** @type {Element | null} */
|
|
21
|
+
#anchor = null;
|
|
22
|
+
/** @type {OverlayOptions} */
|
|
23
|
+
#options = {};
|
|
24
|
+
/** @type {AbortController | null} */
|
|
25
|
+
#abort = null;
|
|
26
|
+
#frame = 0;
|
|
27
|
+
#css = false;
|
|
28
|
+
/**
|
|
29
|
+
* @param {HTMLElement} panel an element with a `popover` attribute
|
|
30
|
+
*/
|
|
31
|
+
constructor(panel) {
|
|
32
|
+
this.#panel = panel;
|
|
33
|
+
}
|
|
34
|
+
get open() {
|
|
35
|
+
try {
|
|
36
|
+
return this.#panel.matches(":popover-open");
|
|
37
|
+
} catch {
|
|
38
|
+
return this.#panel.hasAttribute("data-open");
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* @param {Element | null} anchor
|
|
43
|
+
* @param {OverlayOptions} [options]
|
|
44
|
+
*/
|
|
45
|
+
show(anchor, options = {}) {
|
|
46
|
+
this.#anchor = anchor;
|
|
47
|
+
this.#options = options;
|
|
48
|
+
const panel = this.#panel;
|
|
49
|
+
if (!this.open) {
|
|
50
|
+
if (supportsPopover()) panel.showPopover();
|
|
51
|
+
else panel.setAttribute("data-open", "");
|
|
52
|
+
}
|
|
53
|
+
panel.style.margin = "0";
|
|
54
|
+
this.#css = !options.point && !!anchor && supportsAnchor() && anchor.getRootNode() === panel.getRootNode() && anchor instanceof HTMLElement;
|
|
55
|
+
if (this.#css) this.#placeWithCss();
|
|
56
|
+
else this.#track();
|
|
57
|
+
}
|
|
58
|
+
hide() {
|
|
59
|
+
this.#abort?.abort();
|
|
60
|
+
this.#abort = null;
|
|
61
|
+
cancelAnimationFrame(this.#frame);
|
|
62
|
+
const panel = this.#panel;
|
|
63
|
+
if (this.open) {
|
|
64
|
+
if (supportsPopover()) panel.hidePopover();
|
|
65
|
+
else panel.removeAttribute("data-open");
|
|
66
|
+
}
|
|
67
|
+
if (this.#css && this.#anchor instanceof HTMLElement) {
|
|
68
|
+
this.#anchor.style.removeProperty("anchor-name");
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
/** Re-measure; call after the panel's content changed size. */
|
|
72
|
+
reposition() {
|
|
73
|
+
if (this.open && !this.#css) this.#measure();
|
|
74
|
+
}
|
|
75
|
+
#placeWithCss() {
|
|
76
|
+
const { side = "block-end", align = "start", offset = 4, matchWidth } = this.#options;
|
|
77
|
+
const anchor = (
|
|
78
|
+
/** @type {HTMLElement} */
|
|
79
|
+
this.#anchor
|
|
80
|
+
);
|
|
81
|
+
const name = `--punica-anchor-${++anchorCounter}`;
|
|
82
|
+
anchor.style.setProperty("anchor-name", name);
|
|
83
|
+
const s = this.#panel.style;
|
|
84
|
+
s.position = "fixed";
|
|
85
|
+
s.inset = "auto";
|
|
86
|
+
s.setProperty("position-anchor", name);
|
|
87
|
+
const rtl = getComputedStyle(anchor).direction === "rtl";
|
|
88
|
+
s.setProperty("position-area", physicalArea(side, align, rtl));
|
|
89
|
+
s.setProperty("position-try-fallbacks", "flip-block, flip-inline, flip-block flip-inline");
|
|
90
|
+
s.margin = side.startsWith("block") ? `${offset}px 0` : `0 ${offset}px`;
|
|
91
|
+
s.minInlineSize = matchWidth ? "anchor-size(inline)" : "";
|
|
92
|
+
}
|
|
93
|
+
#track() {
|
|
94
|
+
this.#abort?.abort();
|
|
95
|
+
this.#abort = new AbortController();
|
|
96
|
+
const signal = this.#abort.signal;
|
|
97
|
+
const schedule = () => {
|
|
98
|
+
cancelAnimationFrame(this.#frame);
|
|
99
|
+
this.#frame = requestAnimationFrame(() => this.#measure());
|
|
100
|
+
};
|
|
101
|
+
addEventListener("scroll", schedule, { capture: true, passive: true, signal });
|
|
102
|
+
addEventListener("resize", schedule, { passive: true, signal });
|
|
103
|
+
this.#measure();
|
|
104
|
+
}
|
|
105
|
+
#measure() {
|
|
106
|
+
const panel = this.#panel;
|
|
107
|
+
const { side = "block-end", align = "start", offset = 4, matchWidth, point } = this.#options;
|
|
108
|
+
const s = panel.style;
|
|
109
|
+
s.position = "fixed";
|
|
110
|
+
s.inset = "auto";
|
|
111
|
+
const vw = document.documentElement.clientWidth;
|
|
112
|
+
const vh = document.documentElement.clientHeight;
|
|
113
|
+
const a = point ? { left: point.x, right: point.x, top: point.y, bottom: point.y, width: 0, height: 0 } : this.#anchor?.getBoundingClientRect();
|
|
114
|
+
if (!a) return;
|
|
115
|
+
if (matchWidth) s.minWidth = `${a.width}px`;
|
|
116
|
+
const p = panel.getBoundingClientRect();
|
|
117
|
+
const rtl = getComputedStyle(panel).direction === "rtl";
|
|
118
|
+
const pad = 4;
|
|
119
|
+
let physical = side === "block-end" ? "bottom" : side === "block-start" ? "top" : side === "inline-end" !== rtl ? "right" : "left";
|
|
120
|
+
const room = {
|
|
121
|
+
bottom: vh - a.bottom,
|
|
122
|
+
top: a.top,
|
|
123
|
+
right: vw - a.right,
|
|
124
|
+
left: a.left
|
|
125
|
+
};
|
|
126
|
+
const need = physical === "top" || physical === "bottom" ? p.height : p.width;
|
|
127
|
+
const opposite = { bottom: "top", top: "bottom", left: "right", right: "left" }[physical];
|
|
128
|
+
if (room[physical] < need + offset && room[opposite] > room[physical]) {
|
|
129
|
+
physical = opposite;
|
|
130
|
+
}
|
|
131
|
+
if ((physical === "left" || physical === "right") && room[physical] < p.width + offset) {
|
|
132
|
+
physical = room.bottom >= p.height + offset || room.bottom >= room.top ? "bottom" : "top";
|
|
133
|
+
}
|
|
134
|
+
let x;
|
|
135
|
+
let y;
|
|
136
|
+
const startIsLeft = !rtl;
|
|
137
|
+
if (physical === "bottom" || physical === "top") {
|
|
138
|
+
y = physical === "bottom" ? a.bottom + offset : a.top - p.height - offset;
|
|
139
|
+
if (align === "center") x = a.left + a.width / 2 - p.width / 2;
|
|
140
|
+
else if (align === "start" === startIsLeft) x = a.left;
|
|
141
|
+
else x = a.right - p.width;
|
|
142
|
+
} else {
|
|
143
|
+
x = physical === "right" ? a.right + offset : a.left - p.width - offset;
|
|
144
|
+
if (align === "center") y = a.top + a.height / 2 - p.height / 2;
|
|
145
|
+
else if (align === "start") y = a.top;
|
|
146
|
+
else y = a.bottom - p.height;
|
|
147
|
+
}
|
|
148
|
+
const anchorVisible = a.bottom > 0 && a.top < vh && a.right > 0 && a.left < vw;
|
|
149
|
+
const clampX = (v) => Math.max(pad, Math.min(v, vw - p.width - pad));
|
|
150
|
+
const clampY = (v) => Math.max(pad, Math.min(v, vh - p.height - pad));
|
|
151
|
+
if (physical === "bottom" || physical === "top") {
|
|
152
|
+
x = clampX(x);
|
|
153
|
+
if (anchorVisible) y = clampY(y);
|
|
154
|
+
} else {
|
|
155
|
+
y = clampY(y);
|
|
156
|
+
if (anchorVisible) x = clampX(x);
|
|
157
|
+
}
|
|
158
|
+
s.left = `${Math.round(x)}px`;
|
|
159
|
+
s.top = `${Math.round(y)}px`;
|
|
160
|
+
s.maxHeight = `${vh - pad * 2}px`;
|
|
161
|
+
panel.dataset.side = physical;
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
var overlayCss = `
|
|
165
|
+
[popover] {
|
|
166
|
+
position: fixed;
|
|
167
|
+
inset: auto;
|
|
168
|
+
margin: 0;
|
|
169
|
+
border: 0;
|
|
170
|
+
padding: 0;
|
|
171
|
+
overflow: visible;
|
|
172
|
+
background: none;
|
|
173
|
+
color: inherit;
|
|
174
|
+
}
|
|
175
|
+
@supports not selector(:popover-open) {
|
|
176
|
+
[popover]:not([data-open]) { display: none; }
|
|
177
|
+
[popover][data-open] { display: block; z-index: 2147483647; }
|
|
178
|
+
}
|
|
179
|
+
`;
|
|
180
|
+
|
|
181
|
+
export {
|
|
182
|
+
Overlay,
|
|
183
|
+
overlayCss
|
|
184
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import {
|
|
2
|
+
PunicaElement,
|
|
3
|
+
define
|
|
4
|
+
} from "./chunk-Y7B65FYJ.js";
|
|
5
|
+
|
|
6
|
+
// src/components/paper/paper.css
|
|
7
|
+
var paper_default = ":host {\n --punica-paper-background: var(--punica-color-surface);\n --punica-paper-radius: var(--punica-radius);\n --punica-paper-padding: var(--punica-padding);\n --punica-paper-shadow: none;\n --_padding: var(--punica-paper-padding);\n\n display: block;\n padding: var(--_padding);\n border-radius: var(--punica-paper-radius);\n background: var(--punica-paper-background);\n color: var(--punica-color-text);\n box-shadow: var(--punica-paper-shadow);\n}\n\n:host([elevation='1']) {\n --punica-paper-shadow: var(--punica-shadow-xs);\n}\n:host([elevation='2']) {\n --punica-paper-shadow: var(--punica-shadow-sm);\n}\n:host([elevation='3']) {\n --punica-paper-shadow: var(--punica-shadow-md);\n}\n:host([elevation='4']) {\n --punica-paper-shadow: var(--punica-shadow-lg);\n}\n:host([elevation='5']) {\n --punica-paper-shadow: var(--punica-shadow-xl);\n}\n\n/* A raised paper is on the raised surface, which only differs in dark mode,\n where a shadow alone does not show. */\n:host([elevation]:not([elevation='0']):not([variant='outlined'])) {\n --punica-paper-background: var(--punica-color-surface-raised);\n}\n\n:host([variant='outlined']) {\n --punica-paper-background: var(--punica-color-surface);\n --punica-paper-shadow: none;\n border: var(--punica-border-width) solid var(--punica-color-border);\n}\n\n:host([radius='none']) {\n --punica-paper-radius: 0;\n}\n:host([radius='small']) {\n --punica-paper-radius: var(--punica-radius-sm);\n}\n:host([radius='large']) {\n --punica-paper-radius: var(--punica-radius-lg);\n}\n:host([radius='full']) {\n --punica-paper-radius: var(--punica-radius-full);\n}\n\n@media (forced-colors: active) {\n :host {\n border: var(--punica-border-width) solid CanvasText;\n }\n}\n";
|
|
8
|
+
|
|
9
|
+
// src/components/paper/paper.js
|
|
10
|
+
var SPACE = /* @__PURE__ */ new Set([
|
|
11
|
+
0,
|
|
12
|
+
2,
|
|
13
|
+
4,
|
|
14
|
+
6,
|
|
15
|
+
8,
|
|
16
|
+
10,
|
|
17
|
+
12,
|
|
18
|
+
14,
|
|
19
|
+
16,
|
|
20
|
+
18,
|
|
21
|
+
20,
|
|
22
|
+
22,
|
|
23
|
+
24,
|
|
24
|
+
26,
|
|
25
|
+
28,
|
|
26
|
+
32,
|
|
27
|
+
36,
|
|
28
|
+
40,
|
|
29
|
+
44,
|
|
30
|
+
48,
|
|
31
|
+
56,
|
|
32
|
+
64,
|
|
33
|
+
80,
|
|
34
|
+
96,
|
|
35
|
+
112,
|
|
36
|
+
128,
|
|
37
|
+
144,
|
|
38
|
+
160
|
|
39
|
+
]);
|
|
40
|
+
function instanceStyle(root) {
|
|
41
|
+
const own = new CSSStyleSheet();
|
|
42
|
+
own.replaceSync(":host{}");
|
|
43
|
+
root.adoptedStyleSheets = [...root.adoptedStyleSheets, own];
|
|
44
|
+
return (
|
|
45
|
+
/** @type {CSSStyleRule} */
|
|
46
|
+
own.cssRules[0].style
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
var PunicaPaper = class extends PunicaElement {
|
|
50
|
+
static properties = {
|
|
51
|
+
variant: {},
|
|
52
|
+
elevation: { type: Number },
|
|
53
|
+
radius: {},
|
|
54
|
+
padding: { type: Number }
|
|
55
|
+
};
|
|
56
|
+
static styles = paper_default;
|
|
57
|
+
static template = `<slot></slot>`;
|
|
58
|
+
#style = instanceStyle(this.shadowRoot);
|
|
59
|
+
update() {
|
|
60
|
+
if (this.padding != null && SPACE.has(this.padding)) {
|
|
61
|
+
this.#style.setProperty("--_padding", `var(--punica-space-${this.padding})`);
|
|
62
|
+
} else {
|
|
63
|
+
this.#style.removeProperty("--_padding");
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
define("punica-paper", PunicaPaper);
|
|
68
|
+
|
|
69
|
+
export {
|
|
70
|
+
PunicaPaper
|
|
71
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
PunicaElement,
|
|
3
|
+
define
|
|
4
|
+
} from "./chunk-Y7B65FYJ.js";
|
|
5
|
+
|
|
6
|
+
// src/components/code/code.css
|
|
7
|
+
var code_default = ":host {\n --punica-code-background: var(--punica-color-neutral-light);\n --punica-code-color: var(--punica-color-text);\n --punica-code-radius: var(--punica-radius-sm);\n --punica-code-padding: var(--punica-space-2) var(--punica-space-4);\n --punica-code-font-size: 0.9em;\n\n display: inline;\n}\n\ncode {\n padding: var(--punica-code-padding);\n border: var(--punica-border-width) solid transparent;\n border-radius: var(--punica-code-radius);\n background: var(--punica-code-background);\n color: var(--punica-code-color);\n font-family: var(--punica-font-family-mono);\n font-size: var(--punica-code-font-size);\n overflow-wrap: anywhere;\n box-decoration-break: clone;\n -webkit-box-decoration-break: clone;\n}\n\n@media (forced-colors: active) {\n code {\n border-color: CanvasText;\n }\n}\n";
|
|
8
|
+
|
|
9
|
+
// src/components/code/code.js
|
|
10
|
+
var PunicaCode = class extends PunicaElement {
|
|
11
|
+
static styles = code_default;
|
|
12
|
+
static template = `<code part="base"><slot></slot></code>`;
|
|
13
|
+
};
|
|
14
|
+
define("punica-code", PunicaCode);
|
|
15
|
+
|
|
16
|
+
export {
|
|
17
|
+
PunicaCode
|
|
18
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import {
|
|
2
|
+
PunicaElement,
|
|
3
|
+
define
|
|
4
|
+
} from "./chunk-Y7B65FYJ.js";
|
|
5
|
+
|
|
6
|
+
// src/components/table/tableFooter.css
|
|
7
|
+
var tableFooter_default = ":host {\n display: table-footer-group;\n}\n";
|
|
8
|
+
|
|
9
|
+
// src/components/table/tableFooter.js
|
|
10
|
+
var PunicaTableFooter = class extends PunicaElement {
|
|
11
|
+
static styles = tableFooter_default;
|
|
12
|
+
static template = `<slot></slot>`;
|
|
13
|
+
constructor() {
|
|
14
|
+
super();
|
|
15
|
+
this.internals.role = "rowgroup";
|
|
16
|
+
this.shadowRoot.addEventListener("slotchange", () => this.#table?.refresh?.());
|
|
17
|
+
}
|
|
18
|
+
/** @returns {any} */
|
|
19
|
+
get #table() {
|
|
20
|
+
return this.closest("punica-table");
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
define("punica-table-footer", PunicaTableFooter);
|
|
24
|
+
|
|
25
|
+
export {
|
|
26
|
+
PunicaTableFooter
|
|
27
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import {
|
|
2
|
+
PunicaElement,
|
|
3
|
+
define
|
|
4
|
+
} from "./chunk-Y7B65FYJ.js";
|
|
5
|
+
|
|
6
|
+
// src/components/stack/stack.css
|
|
7
|
+
var stack_default = ":host {\n --punica-stack-gap: var(--punica-space-8);\n --punica-stack-divider-color: var(--punica-color-border);\n --_gap: var(--punica-stack-gap);\n\n display: flex;\n flex-direction: column;\n gap: var(--_gap);\n}\n\n:host([direction='horizontal']) {\n flex-direction: row;\n}\n\n:host([align='start']) {\n align-items: flex-start;\n}\n:host([align='center']) {\n align-items: center;\n}\n:host([align='end']) {\n align-items: flex-end;\n}\n:host([align='stretch']) {\n align-items: stretch;\n}\n:host([align='baseline']) {\n align-items: baseline;\n}\n\n:host([justify='start']) {\n justify-content: flex-start;\n}\n:host([justify='center']) {\n justify-content: center;\n}\n:host([justify='end']) {\n justify-content: flex-end;\n}\n:host([justify='between']) {\n justify-content: space-between;\n}\n:host([justify='around']) {\n justify-content: space-around;\n}\n:host([justify='evenly']) {\n justify-content: space-evenly;\n}\n\n:host([wrap]) {\n flex-wrap: wrap;\n}\n\n:host([divider]) ::slotted(:not(:first-child)) {\n border-block-start: var(--punica-border-width) solid var(--punica-stack-divider-color);\n padding-block-start: var(--_gap);\n}\n:host([divider][direction='horizontal']) ::slotted(:not(:first-child)) {\n border-block-start: 0;\n padding-block-start: 0;\n border-inline-start: var(--punica-border-width) solid var(--punica-stack-divider-color);\n padding-inline-start: var(--_gap);\n}\n\n@media (forced-colors: active) {\n :host([divider]) ::slotted(:not(:first-child)) {\n border-color: CanvasText;\n }\n}\n\n/* The browser maps an `align` attribute to text-align; here it means\n alignment of the children, so the text keeps what it inherits. */\n:host([align]) {\n text-align: inherit;\n}\n";
|
|
8
|
+
|
|
9
|
+
// src/components/stack/stack.js
|
|
10
|
+
var SPACE = /* @__PURE__ */ new Set([
|
|
11
|
+
0,
|
|
12
|
+
2,
|
|
13
|
+
4,
|
|
14
|
+
6,
|
|
15
|
+
8,
|
|
16
|
+
10,
|
|
17
|
+
12,
|
|
18
|
+
14,
|
|
19
|
+
16,
|
|
20
|
+
18,
|
|
21
|
+
20,
|
|
22
|
+
22,
|
|
23
|
+
24,
|
|
24
|
+
26,
|
|
25
|
+
28,
|
|
26
|
+
32,
|
|
27
|
+
36,
|
|
28
|
+
40,
|
|
29
|
+
44,
|
|
30
|
+
48,
|
|
31
|
+
56,
|
|
32
|
+
64,
|
|
33
|
+
80,
|
|
34
|
+
96,
|
|
35
|
+
112,
|
|
36
|
+
128,
|
|
37
|
+
144,
|
|
38
|
+
160
|
|
39
|
+
]);
|
|
40
|
+
function instanceStyle(root) {
|
|
41
|
+
const own = new CSSStyleSheet();
|
|
42
|
+
own.replaceSync(":host{}");
|
|
43
|
+
root.adoptedStyleSheets = [...root.adoptedStyleSheets, own];
|
|
44
|
+
return (
|
|
45
|
+
/** @type {CSSStyleRule} */
|
|
46
|
+
own.cssRules[0].style
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
var PunicaStack = class extends PunicaElement {
|
|
50
|
+
static properties = {
|
|
51
|
+
direction: {},
|
|
52
|
+
gap: { type: Number },
|
|
53
|
+
align: {},
|
|
54
|
+
justify: {},
|
|
55
|
+
wrap: { type: Boolean },
|
|
56
|
+
divider: { type: Boolean }
|
|
57
|
+
};
|
|
58
|
+
static styles = stack_default;
|
|
59
|
+
static template = `<slot></slot>`;
|
|
60
|
+
#style = instanceStyle(this.shadowRoot);
|
|
61
|
+
update() {
|
|
62
|
+
if (this.gap != null && SPACE.has(this.gap)) {
|
|
63
|
+
this.#style.setProperty("--_gap", `var(--punica-space-${this.gap})`);
|
|
64
|
+
} else {
|
|
65
|
+
this.#style.removeProperty("--_gap");
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
define("punica-stack", PunicaStack);
|
|
70
|
+
|
|
71
|
+
export {
|
|
72
|
+
PunicaStack
|
|
73
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import {
|
|
2
|
+
PunicaElement,
|
|
3
|
+
define
|
|
4
|
+
} from "./chunk-Y7B65FYJ.js";
|
|
5
|
+
|
|
6
|
+
// src/components/metadataList/metadataList.css
|
|
7
|
+
var metadataList_default = ":host {\n --punica-metadata-list-gap: var(--punica-space-12);\n --punica-metadata-list-label-width: 40%;\n --punica-metadata-list-label-color: var(--punica-color-text-muted);\n --punica-metadata-list-divider-color: var(--punica-color-border);\n /* Read by the items. */\n --_metadata-label-color: var(--punica-metadata-list-label-color);\n --_metadata-font-size: var(--punica-font-size-sm);\n\n display: block;\n container-type: inline-size;\n}\n\n:host([dense]) {\n --punica-metadata-list-gap: var(--punica-space-6);\n --_metadata-font-size: var(--punica-font-size-xs);\n}\n\n.base {\n display: grid;\n grid-template-columns: fit-content(var(--punica-metadata-list-label-width)) minmax(0, 1fr);\n column-gap: var(--punica-space-16);\n row-gap: var(--punica-metadata-list-gap);\n font-family: var(--punica-font-family);\n}\n\n/* inline, the default: one column of labels, one of values. */\n::slotted(*) {\n grid-column: 1 / -1;\n grid-template-columns: subgrid;\n align-items: baseline;\n}\n\n:host([layout='stacked']) .base {\n grid-template-columns: minmax(0, 1fr);\n}\n:host([layout='stacked']) ::slotted(*),\n:host([layout='columns']) ::slotted(*) {\n grid-column: auto;\n grid-template-columns: minmax(0, 1fr);\n}\n\n:host([layout='columns']) .base {\n grid-template-columns: repeat(var(--_columns, 2), minmax(0, 1fr));\n}\n@container (max-width: 480px) {\n :host([layout='columns']) .base {\n grid-template-columns: minmax(0, 1fr);\n }\n}\n\n:host([dividers]) .base {\n row-gap: 0;\n}\n:host([dividers]) ::slotted(*) {\n padding-block: calc(var(--punica-metadata-list-gap) / 2 + var(--punica-space-2));\n}\n:host([dividers]:not([layout='columns'])) ::slotted(:not(:first-child)) {\n border-block-start: var(--punica-border-width) solid var(--punica-metadata-list-divider-color);\n}\n:host([dividers][layout='columns']) ::slotted(*) {\n border-block-end: var(--punica-border-width) solid var(--punica-metadata-list-divider-color);\n}\n\n@media (forced-colors: active) {\n :host([dividers]) ::slotted(*) {\n border-color: CanvasText;\n }\n}\n";
|
|
8
|
+
|
|
9
|
+
// src/components/metadataList/metadataList.js
|
|
10
|
+
function instanceStyle(root) {
|
|
11
|
+
const own = new CSSStyleSheet();
|
|
12
|
+
own.replaceSync(":host{}");
|
|
13
|
+
root.adoptedStyleSheets = [...root.adoptedStyleSheets, own];
|
|
14
|
+
return (
|
|
15
|
+
/** @type {CSSStyleRule} */
|
|
16
|
+
own.cssRules[0].style
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
var PunicaMetadataList = class extends PunicaElement {
|
|
20
|
+
static properties = {
|
|
21
|
+
label: {},
|
|
22
|
+
layout: {},
|
|
23
|
+
columns: { type: Number, default: 2 },
|
|
24
|
+
dividers: { type: Boolean },
|
|
25
|
+
dense: { type: Boolean }
|
|
26
|
+
};
|
|
27
|
+
static styles = metadataList_default;
|
|
28
|
+
static template = `<div part="base" class="base"><slot></slot></div>`;
|
|
29
|
+
#style = instanceStyle(this.shadowRoot);
|
|
30
|
+
update() {
|
|
31
|
+
this.internals.role = "list";
|
|
32
|
+
this.internals.ariaLabel = this.label || null;
|
|
33
|
+
const n = this.columns;
|
|
34
|
+
if (Number.isInteger(n) && n >= 1 && n <= 12) this.#style.setProperty("--_columns", String(n));
|
|
35
|
+
else this.#style.removeProperty("--_columns");
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
define("punica-metadata-list", PunicaMetadataList);
|
|
39
|
+
|
|
40
|
+
export {
|
|
41
|
+
PunicaMetadataList
|
|
42
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import {
|
|
2
|
+
PunicaRadioGroup
|
|
3
|
+
} from "./chunk-TK5H2DLW.js";
|
|
4
|
+
import {
|
|
5
|
+
isRtl,
|
|
6
|
+
onDirectionChange
|
|
7
|
+
} from "./chunk-4RURT4SK.js";
|
|
8
|
+
import {
|
|
9
|
+
define
|
|
10
|
+
} from "./chunk-Y7B65FYJ.js";
|
|
11
|
+
|
|
12
|
+
// src/components/segmentedControl/segmentedControl.css
|
|
13
|
+
var segmentedControl_default = ":host {\n --punica-segmented-control-height: var(--punica-size-md);\n --punica-segmented-control-radius: var(--punica-radius);\n --punica-segmented-control-background: var(--punica-color-neutral-light);\n --punica-segmented-control-indicator-color: var(--punica-color-surface-raised);\n\n display: inline-flex;\n vertical-align: middle;\n}\n\n:host([size='small']) {\n --punica-segmented-control-height: var(--punica-size-sm);\n}\n:host([size='large']) {\n --punica-segmented-control-height: var(--punica-size-lg);\n}\n:host([full-width]) {\n display: flex;\n inline-size: 100%;\n}\n\n.base {\n position: relative;\n display: flex;\n flex: 1;\n align-items: stretch;\n min-block-size: var(--punica-segmented-control-height);\n padding: var(--punica-space-2);\n border-radius: var(--punica-segmented-control-radius);\n background: var(--punica-segmented-control-background);\n}\n\n.indicator {\n position: absolute;\n inset-block: var(--punica-space-2);\n inset-inline-start: var(--_start, 0);\n inline-size: var(--_size, 0);\n border-radius: calc(var(--punica-segmented-control-radius) - var(--punica-space-2));\n background: var(--punica-segmented-control-indicator-color);\n /* The edge keeps the chosen segment visible in dark mode, where the\n raised surface is only a shade lighter than the bar. */\n box-shadow: var(--punica-shadow-xs), inset 0 0 0 var(--punica-border-width) var(--punica-color-border);\n transition: inset-inline-start var(--punica-duration) var(--punica-ease),\n inline-size var(--punica-duration) var(--punica-ease);\n}\n.indicator[hidden] {\n display: none;\n}\n\n:host([disabled]) .indicator,\n:host(:state(disabled)) .indicator {\n box-shadow: none;\n}\n\n@media (forced-colors: active) {\n .base {\n border: var(--punica-border-width) solid ButtonText;\n }\n .indicator {\n display: none;\n }\n}\n";
|
|
14
|
+
|
|
15
|
+
// src/components/segmentedControl/segmentedControl.js
|
|
16
|
+
var PunicaSegmentedControl = class extends PunicaRadioGroup {
|
|
17
|
+
static properties = {
|
|
18
|
+
orientation: { default: "horizontal" },
|
|
19
|
+
size: {},
|
|
20
|
+
fullWidth: { type: Boolean }
|
|
21
|
+
};
|
|
22
|
+
static styles = segmentedControl_default;
|
|
23
|
+
static template = `
|
|
24
|
+
<div part="base" class="base">
|
|
25
|
+
<div part="indicator" class="indicator" hidden></div>
|
|
26
|
+
<slot></slot>
|
|
27
|
+
</div>
|
|
28
|
+
`;
|
|
29
|
+
static itemTag = "punica-segmented-control-item";
|
|
30
|
+
static itemFlag = "selected";
|
|
31
|
+
/** @type {ResizeObserver | null} */
|
|
32
|
+
#observer = null;
|
|
33
|
+
/** @type {HTMLElement | null} */
|
|
34
|
+
#chosen = null;
|
|
35
|
+
connected() {
|
|
36
|
+
this.#observer = new ResizeObserver(() => this.#place());
|
|
37
|
+
this.#observer.observe(this);
|
|
38
|
+
onDirectionChange(() => this.#place(), this.signal);
|
|
39
|
+
}
|
|
40
|
+
disconnected() {
|
|
41
|
+
this.#observer?.disconnect();
|
|
42
|
+
this.#observer = null;
|
|
43
|
+
}
|
|
44
|
+
selectionChanged(item) {
|
|
45
|
+
this.#chosen = item;
|
|
46
|
+
if (this.#observer) {
|
|
47
|
+
this.#observer.disconnect();
|
|
48
|
+
this.#observer.observe(this);
|
|
49
|
+
for (const each of this.items) this.#observer.observe(each);
|
|
50
|
+
}
|
|
51
|
+
this.#place();
|
|
52
|
+
}
|
|
53
|
+
/** Puts the indicator behind the chosen segment. */
|
|
54
|
+
#place() {
|
|
55
|
+
const indicator = this.$(".indicator");
|
|
56
|
+
const item = this.#chosen;
|
|
57
|
+
if (!item || !item.isConnected) {
|
|
58
|
+
indicator.hidden = true;
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
const base = this.$(".base").getBoundingClientRect();
|
|
62
|
+
const box = item.getBoundingClientRect();
|
|
63
|
+
const start = isRtl(this) ? base.right - box.right : box.left - base.left;
|
|
64
|
+
indicator.style.setProperty("--_start", `${start}px`);
|
|
65
|
+
indicator.style.setProperty("--_size", `${box.width}px`);
|
|
66
|
+
indicator.hidden = false;
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
define("punica-segmented-control", PunicaSegmentedControl);
|
|
70
|
+
|
|
71
|
+
export {
|
|
72
|
+
PunicaSegmentedControl
|
|
73
|
+
};
|