@punica/components 0.0.0-stage → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +40 -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 +8890 -0
- package/dist/llms.txt +275 -0
- package/dist/punica-components.min.js +14283 -0
- package/dist/tokens.css +158 -0
- package/dist/types/index.d.ts +6753 -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 +131 -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,36 @@
|
|
|
1
|
+
// src/components/markdown/url.js
|
|
2
|
+
var ALLOWED = /* @__PURE__ */ new Set(["http:", "https:", "mailto:"]);
|
|
3
|
+
var span = (from, to) => `${String.fromCharCode(from)}-${String.fromCharCode(to)}`;
|
|
4
|
+
var INVISIBLE = new RegExp(
|
|
5
|
+
`[${span(0, 32)}${span(127, 159)}${String.fromCharCode(173)}${span(8203, 8207)}${span(8232, 8239)}${String.fromCharCode(8288, 65279)}]`,
|
|
6
|
+
"g"
|
|
7
|
+
);
|
|
8
|
+
var SCHEME = /^([a-z][a-z0-9+.-]*):/i;
|
|
9
|
+
var BASE = "https://punica.invalid/";
|
|
10
|
+
function safeUrl(raw) {
|
|
11
|
+
if (typeof raw !== "string") return null;
|
|
12
|
+
const href = raw.trim();
|
|
13
|
+
if (!href) return null;
|
|
14
|
+
const scheme = SCHEME.exec(href.replace(INVISIBLE, ""));
|
|
15
|
+
if (scheme && !ALLOWED.has(scheme[1].toLowerCase() + ":")) return null;
|
|
16
|
+
let parsed;
|
|
17
|
+
try {
|
|
18
|
+
parsed = new URL(href, BASE);
|
|
19
|
+
} catch {
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
if (!ALLOWED.has(parsed.protocol)) return null;
|
|
23
|
+
let external = false;
|
|
24
|
+
if (parsed.protocol !== "mailto:" && typeof location !== "undefined") {
|
|
25
|
+
try {
|
|
26
|
+
external = new URL(href, document.baseURI).origin !== location.origin;
|
|
27
|
+
} catch {
|
|
28
|
+
external = true;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return { href, external };
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export {
|
|
35
|
+
safeUrl
|
|
36
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
PunicaAlert,
|
|
3
|
+
alert_default
|
|
4
|
+
} from "./chunk-I6WGYC6M.js";
|
|
5
|
+
import {
|
|
6
|
+
define
|
|
7
|
+
} from "./chunk-Y7B65FYJ.js";
|
|
8
|
+
|
|
9
|
+
// src/components/banner/banner.css
|
|
10
|
+
var banner_default = ":host {\n --punica-banner-padding: var(--punica-space-12) var(--punica-padding);\n --punica-banner-max-width: none;\n --punica-alert-padding: var(--punica-banner-padding);\n --punica-alert-radius: 0;\n\n inline-size: 100%;\n justify-content: center;\n border-inline-width: 0;\n border-block-start-width: 0;\n}\n\n.content {\n flex: 0 1 auto;\n max-inline-size: var(--punica-banner-max-width);\n}\n\n.actions {\n margin-inline-end: auto;\n}\n\n@media (forced-colors: active) {\n :host {\n border-block-end-color: CanvasText;\n }\n}\n";
|
|
11
|
+
|
|
12
|
+
// src/components/banner/banner.js
|
|
13
|
+
var PunicaBanner = class extends PunicaAlert {
|
|
14
|
+
static styles = [alert_default, banner_default];
|
|
15
|
+
};
|
|
16
|
+
define("punica-banner", PunicaBanner);
|
|
17
|
+
|
|
18
|
+
export {
|
|
19
|
+
PunicaBanner
|
|
20
|
+
};
|
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
import {
|
|
2
|
+
addDays,
|
|
3
|
+
addMonths,
|
|
4
|
+
clampDate,
|
|
5
|
+
compareDates,
|
|
6
|
+
daysInMonth,
|
|
7
|
+
firstDayOfWeekFor,
|
|
8
|
+
formatDate,
|
|
9
|
+
parseIsoDate,
|
|
10
|
+
toIsoDate,
|
|
11
|
+
todayDate,
|
|
12
|
+
weekdayOf
|
|
13
|
+
} from "./chunk-CKI34FQL.js";
|
|
14
|
+
import {
|
|
15
|
+
fieldLanguage,
|
|
16
|
+
setAttr
|
|
17
|
+
} from "./chunk-H4Q2HHZA.js";
|
|
18
|
+
import {
|
|
19
|
+
isRtl
|
|
20
|
+
} from "./chunk-4RURT4SK.js";
|
|
21
|
+
import {
|
|
22
|
+
icons
|
|
23
|
+
} from "./chunk-YSGWORUD.js";
|
|
24
|
+
import {
|
|
25
|
+
PunicaElement,
|
|
26
|
+
define
|
|
27
|
+
} from "./chunk-Y7B65FYJ.js";
|
|
28
|
+
|
|
29
|
+
// src/components/calendar/calendar.css
|
|
30
|
+
var calendar_default = ":host {\n --punica-calendar-day-size: var(--punica-space-36);\n --punica-calendar-gap: var(--punica-space-4);\n --punica-calendar-accent: var(--punica-color-primary);\n --punica-calendar-range-background: var(--punica-color-selected);\n\n display: inline-flex;\n flex-direction: column;\n gap: var(--punica-space-8);\n color: var(--punica-color-text);\n font-family: var(--punica-font-family);\n font-size: var(--punica-font-size-sm);\n}\n\n.header {\n display: flex;\n align-items: center;\n gap: var(--punica-space-4);\n}\n\n.title {\n flex: 1 1 auto;\n text-align: center;\n font-weight: var(--punica-font-weight-semi-bold);\n}\n\n.nav {\n all: unset;\n flex: none;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n inline-size: var(--punica-size-sm);\n block-size: var(--punica-size-sm);\n border-radius: var(--punica-radius-full);\n font-size: var(--punica-font-size);\n cursor: pointer;\n transition: background-color var(--punica-duration-fast) var(--punica-ease);\n}\n.nav:hover {\n background: var(--punica-color-hover);\n}\n.nav:focus-visible {\n outline: var(--punica-focus-ring);\n}\n.nav:disabled {\n opacity: var(--punica-disabled-opacity);\n cursor: default;\n}\n.nav:dir(rtl) .icon {\n scale: -1 1;\n}\n\ntable {\n border-collapse: separate;\n border-spacing: var(--punica-calendar-gap);\n margin: 0;\n}\n\nth {\n inline-size: var(--punica-calendar-day-size);\n padding-block: var(--punica-space-4) var(--punica-space-8);\n border-block-end: var(--punica-border-width) solid var(--punica-color-border);\n color: var(--punica-color-text-muted);\n font-size: var(--punica-font-size-xs);\n font-weight: var(--punica-font-weight-semi-bold);\n text-align: center;\n}\n\ntd {\n inline-size: var(--punica-calendar-day-size);\n block-size: var(--punica-calendar-day-size);\n padding: 0;\n border: var(--punica-border-width) solid transparent;\n border-radius: var(--punica-radius-full);\n text-align: center;\n cursor: pointer;\n user-select: none;\n transition: background-color var(--punica-duration-fast) var(--punica-ease);\n}\n\ntd:hover {\n background: var(--punica-color-hover);\n}\ntd:focus-visible {\n outline: var(--punica-focus-ring);\n outline-offset: var(--punica-focus-ring-offset);\n}\ntd.outside {\n color: var(--punica-color-text-muted);\n}\ntd.today {\n border-color: var(--punica-calendar-accent);\n}\ntd.in-range {\n background: var(--punica-calendar-range-background);\n}\ntd.selected {\n background: var(--punica-calendar-accent);\n border-color: var(--punica-calendar-accent);\n color: var(--punica-color-on-accent);\n}\ntd.disabled {\n background: none;\n color: var(--punica-color-text-muted);\n opacity: var(--punica-disabled-opacity);\n cursor: not-allowed;\n}\n\n@media (forced-colors: active) {\n td.today {\n border-color: CanvasText;\n }\n td.selected {\n background: Highlight;\n border-color: Highlight;\n color: HighlightText;\n forced-color-adjust: none;\n }\n td.in-range {\n border-color: Highlight;\n }\n td.disabled {\n color: GrayText;\n opacity: 1;\n }\n}\n";
|
|
31
|
+
|
|
32
|
+
// src/components/calendar/calendar.js
|
|
33
|
+
var DOUBLE = (d) => `<svg part="icon" class="icon" viewBox="0 0 24 24" width="1em" height="1em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="${d}"/></svg>`;
|
|
34
|
+
var PunicaCalendar = class extends PunicaElement {
|
|
35
|
+
static properties = {
|
|
36
|
+
value: { reflect: false },
|
|
37
|
+
min: {},
|
|
38
|
+
max: {},
|
|
39
|
+
locale: {},
|
|
40
|
+
firstDayOfWeek: { type: Number },
|
|
41
|
+
range: { type: Boolean },
|
|
42
|
+
valueStart: { reflect: false },
|
|
43
|
+
valueEnd: { reflect: false },
|
|
44
|
+
disabled: { type: Boolean },
|
|
45
|
+
label: {},
|
|
46
|
+
labelPreviousMonth: { default: "Previous month" },
|
|
47
|
+
labelNextMonth: { default: "Next month" },
|
|
48
|
+
labelPreviousYear: { default: "Previous year" },
|
|
49
|
+
labelNextYear: { default: "Next year" },
|
|
50
|
+
disabledDates: { type: Object, attribute: false }
|
|
51
|
+
};
|
|
52
|
+
static styles = calendar_default;
|
|
53
|
+
static template = `
|
|
54
|
+
<div part="header" class="header">
|
|
55
|
+
<button part="nav" class="nav" type="button" data-months="-12">${DOUBLE("m11 6-6 6 6 6M18 6l-6 6 6 6")}</button>
|
|
56
|
+
<button part="nav" class="nav" type="button" data-months="-1">${icons.chevronStart}</button>
|
|
57
|
+
<div part="title" class="title" id="title" aria-live="polite"></div>
|
|
58
|
+
<button part="nav" class="nav" type="button" data-months="1">${icons.chevronEnd}</button>
|
|
59
|
+
<button part="nav" class="nav" type="button" data-months="12">${DOUBLE("m13 6 6 6-6 6M6 6l6 6-6 6")}</button>
|
|
60
|
+
</div>
|
|
61
|
+
<table part="grid" role="grid" aria-labelledby="title">
|
|
62
|
+
<thead><tr></tr></thead>
|
|
63
|
+
<tbody></tbody>
|
|
64
|
+
</table>
|
|
65
|
+
`;
|
|
66
|
+
#title = this.$("#title");
|
|
67
|
+
#grid = this.$("table");
|
|
68
|
+
#head = this.$("thead tr");
|
|
69
|
+
#body = this.$("tbody");
|
|
70
|
+
/** @type {HTMLButtonElement[]} */
|
|
71
|
+
#navs = [...this.shadowRoot.querySelectorAll(".nav")];
|
|
72
|
+
/** @type {HTMLTableCellElement[]} */
|
|
73
|
+
#cells = [];
|
|
74
|
+
/** @type {HTMLTableCellElement[]} */
|
|
75
|
+
#heads = [];
|
|
76
|
+
/** The day the keyboard is on; its month is the one on show. @type {import('./dates.js').CalendarDate | null} */
|
|
77
|
+
#cursor = null;
|
|
78
|
+
/** @type {import('./dates.js').CalendarDate | null} */
|
|
79
|
+
#hover = null;
|
|
80
|
+
constructor() {
|
|
81
|
+
super();
|
|
82
|
+
for (let i = 0; i < 7; i++) {
|
|
83
|
+
const th = document.createElement("th");
|
|
84
|
+
th.scope = "col";
|
|
85
|
+
th.setAttribute("part", "weekday");
|
|
86
|
+
this.#heads.push(th);
|
|
87
|
+
this.#head.appendChild(th);
|
|
88
|
+
}
|
|
89
|
+
for (let week = 0; week < 6; week++) {
|
|
90
|
+
const row = document.createElement("tr");
|
|
91
|
+
for (let day = 0; day < 7; day++) {
|
|
92
|
+
const cell = document.createElement("td");
|
|
93
|
+
cell.setAttribute("role", "gridcell");
|
|
94
|
+
cell.tabIndex = -1;
|
|
95
|
+
this.#cells.push(cell);
|
|
96
|
+
row.appendChild(cell);
|
|
97
|
+
}
|
|
98
|
+
this.#body.appendChild(row);
|
|
99
|
+
}
|
|
100
|
+
for (const nav of this.#navs) {
|
|
101
|
+
nav.addEventListener("click", () => this.#shift(Number(nav.dataset.months)));
|
|
102
|
+
}
|
|
103
|
+
this.#body.addEventListener("click", (event) => {
|
|
104
|
+
const date = this.#dateFrom(event);
|
|
105
|
+
if (date) this.#select(date);
|
|
106
|
+
});
|
|
107
|
+
this.#body.addEventListener("keydown", (event) => this.#onKeydown(event));
|
|
108
|
+
this.#body.addEventListener("pointerover", (event) => this.#preview(this.#dateFrom(event)));
|
|
109
|
+
this.#body.addEventListener("pointerleave", () => this.#preview(null));
|
|
110
|
+
this.#body.addEventListener("focusin", (event) => {
|
|
111
|
+
const date = this.#dateFrom(event);
|
|
112
|
+
if (date && this.range) this.#preview(date);
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
/** The month on show, `yyyy-mm`. */
|
|
116
|
+
get month() {
|
|
117
|
+
const cursor = this.#cursor || this.#initialCursor();
|
|
118
|
+
return toIsoDate({ ...cursor, d: 1 }).slice(0, 7);
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Shows the month holding a date and puts the keyboard on that date.
|
|
122
|
+
* @param {string} date `yyyy-mm-dd`
|
|
123
|
+
*/
|
|
124
|
+
showDate(date) {
|
|
125
|
+
const parsed = parseIsoDate(date);
|
|
126
|
+
if (!parsed) return;
|
|
127
|
+
this.#cursor = clampDate(parsed, parseIsoDate(this.min), parseIsoDate(this.max));
|
|
128
|
+
if (this.isConnected) this.update(/* @__PURE__ */ new Map());
|
|
129
|
+
}
|
|
130
|
+
/** Moves focus to the day the keyboard is on. */
|
|
131
|
+
focus(options) {
|
|
132
|
+
(this.#cells.find((cell) => cell.tabIndex === 0) || this.#cells[0]).focus(options);
|
|
133
|
+
}
|
|
134
|
+
#language() {
|
|
135
|
+
return fieldLanguage(this);
|
|
136
|
+
}
|
|
137
|
+
#initialCursor() {
|
|
138
|
+
const picked = parseIsoDate(this.range ? this.valueStart : this.value);
|
|
139
|
+
return clampDate(picked || todayDate(), parseIsoDate(this.min), parseIsoDate(this.max));
|
|
140
|
+
}
|
|
141
|
+
#dateFrom(event) {
|
|
142
|
+
const cell = event.composedPath().find((node) => node instanceof HTMLTableCellElement && node.dataset.date);
|
|
143
|
+
return cell ? parseIsoDate(cell.dataset.date) : null;
|
|
144
|
+
}
|
|
145
|
+
/** @param {import('./dates.js').CalendarDate} date */
|
|
146
|
+
#unavailable(date) {
|
|
147
|
+
const min = parseIsoDate(this.min);
|
|
148
|
+
const max = parseIsoDate(this.max);
|
|
149
|
+
if (this.disabled) return true;
|
|
150
|
+
if (min && compareDates(date, min) < 0) return true;
|
|
151
|
+
if (max && compareDates(date, max) > 0) return true;
|
|
152
|
+
return typeof this.disabledDates === "function" && !!this.disabledDates(toIsoDate(date));
|
|
153
|
+
}
|
|
154
|
+
update(changed) {
|
|
155
|
+
const picked = this.range ? "valueStart" : "value";
|
|
156
|
+
if (!this.#cursor || changed.has(picked) && changed.get(picked) !== void 0 && parseIsoDate(this[picked])) {
|
|
157
|
+
this.#cursor = this.#initialCursor();
|
|
158
|
+
}
|
|
159
|
+
const language = this.#language();
|
|
160
|
+
const cursor = this.#cursor;
|
|
161
|
+
const first = { y: cursor.y, m: cursor.m, d: 1 };
|
|
162
|
+
const weekStart = Number.isInteger(this.firstDayOfWeek) ? (this.firstDayOfWeek % 7 + 7) % 7 : firstDayOfWeekFor(language);
|
|
163
|
+
this.#title.textContent = formatDate(language, first, { month: "long", year: "numeric" });
|
|
164
|
+
setAttr(this.#grid, "aria-label", this.label);
|
|
165
|
+
setAttr(this.#grid, "aria-labelledby", this.label ? null : "title");
|
|
166
|
+
setAttr(this.#grid, "aria-disabled", this.disabled ? "true" : null);
|
|
167
|
+
setAttr(this.#grid, "aria-multiselectable", this.range ? "true" : null);
|
|
168
|
+
const labels = [this.labelPreviousYear, this.labelPreviousMonth, this.labelNextMonth, this.labelNextYear];
|
|
169
|
+
this.#navs.forEach((nav, i) => {
|
|
170
|
+
setAttr(nav, "aria-label", labels[i]);
|
|
171
|
+
nav.disabled = this.disabled;
|
|
172
|
+
});
|
|
173
|
+
this.#heads.forEach((th, i) => {
|
|
174
|
+
const day = { y: 2023, m: 1, d: 1 + (weekStart + i) % 7 };
|
|
175
|
+
th.textContent = formatDate(language, day, { weekday: "short" });
|
|
176
|
+
th.abbr = formatDate(language, day, { weekday: "long" });
|
|
177
|
+
});
|
|
178
|
+
const focused = this.shadowRoot.activeElement instanceof HTMLTableCellElement;
|
|
179
|
+
const today = todayDate();
|
|
180
|
+
const value = this.range ? null : parseIsoDate(this.value);
|
|
181
|
+
const start = this.range ? parseIsoDate(this.valueStart) : null;
|
|
182
|
+
const end = this.range ? parseIsoDate(this.valueEnd) : null;
|
|
183
|
+
let from = start;
|
|
184
|
+
let to = end;
|
|
185
|
+
if (start && !end && this.#hover) {
|
|
186
|
+
[from, to] = compareDates(this.#hover, start) < 0 ? [this.#hover, start] : [start, this.#hover];
|
|
187
|
+
}
|
|
188
|
+
const offset = (weekdayOf(first) - weekStart + 7) % 7;
|
|
189
|
+
const dayNumber = new Intl.NumberFormat(language, { useGrouping: false });
|
|
190
|
+
this.#cells.forEach((cell, i) => {
|
|
191
|
+
const date = addDays(first, i - offset);
|
|
192
|
+
const iso = toIsoDate(date);
|
|
193
|
+
const same = (other) => !!other && compareDates(date, other) === 0;
|
|
194
|
+
const isStart = same(start);
|
|
195
|
+
const isEnd = same(end);
|
|
196
|
+
const selected = same(value) || isStart || isEnd;
|
|
197
|
+
const inRange = !!from && !!to && compareDates(date, from) >= 0 && compareDates(date, to) <= 0;
|
|
198
|
+
const unavailable = this.#unavailable(date);
|
|
199
|
+
const parts = ["day"];
|
|
200
|
+
if (same(today)) parts.push("today");
|
|
201
|
+
if (selected) parts.push("selected");
|
|
202
|
+
if (date.m !== first.m) parts.push("outside");
|
|
203
|
+
if (inRange) parts.push("in-range");
|
|
204
|
+
if (isStart) parts.push("range-start");
|
|
205
|
+
if (isEnd) parts.push("range-end");
|
|
206
|
+
if (unavailable) parts.push("disabled");
|
|
207
|
+
cell.dataset.date = iso;
|
|
208
|
+
cell.textContent = dayNumber.format(date.d);
|
|
209
|
+
cell.setAttribute("part", parts.join(" "));
|
|
210
|
+
cell.className = parts.join(" ");
|
|
211
|
+
cell.setAttribute("aria-label", formatDate(language, date, { dateStyle: "full" }));
|
|
212
|
+
setAttr(cell, "aria-selected", selected || !!end && inRange ? "true" : null);
|
|
213
|
+
setAttr(cell, "aria-disabled", unavailable ? "true" : null);
|
|
214
|
+
setAttr(cell, "aria-current", same(today) ? "date" : null);
|
|
215
|
+
cell.tabIndex = same(cursor) ? 0 : -1;
|
|
216
|
+
if (focused && same(cursor) && this.shadowRoot.activeElement !== cell) cell.focus();
|
|
217
|
+
});
|
|
218
|
+
[...this.#body.rows].forEach((row, week) => {
|
|
219
|
+
row.hidden = week * 7 - offset >= daysInMonth(first.y, first.m);
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
/** @param {import('./dates.js').CalendarDate | null} date */
|
|
223
|
+
#preview(date) {
|
|
224
|
+
if (!this.range || !this.valueStart || this.valueEnd) {
|
|
225
|
+
if (!this.#hover) return;
|
|
226
|
+
date = null;
|
|
227
|
+
}
|
|
228
|
+
if (date && this.#hover && compareDates(date, this.#hover) === 0) return;
|
|
229
|
+
this.#hover = date;
|
|
230
|
+
this.update(/* @__PURE__ */ new Map());
|
|
231
|
+
}
|
|
232
|
+
/** @param {number} months */
|
|
233
|
+
#shift(months) {
|
|
234
|
+
if (this.disabled) return;
|
|
235
|
+
const min = parseIsoDate(this.min);
|
|
236
|
+
const max = parseIsoDate(this.max);
|
|
237
|
+
this.#cursor = clampDate(addMonths(this.#cursor, months), min, max);
|
|
238
|
+
this.update(/* @__PURE__ */ new Map());
|
|
239
|
+
}
|
|
240
|
+
/** @param {import('./dates.js').CalendarDate} date */
|
|
241
|
+
#moveTo(date) {
|
|
242
|
+
this.#cursor = clampDate(date, parseIsoDate(this.min), parseIsoDate(this.max));
|
|
243
|
+
this.update(/* @__PURE__ */ new Map());
|
|
244
|
+
this.focus();
|
|
245
|
+
}
|
|
246
|
+
/** @param {import('./dates.js').CalendarDate} date */
|
|
247
|
+
#select(date) {
|
|
248
|
+
if (this.#unavailable(date)) return;
|
|
249
|
+
const iso = toIsoDate(date);
|
|
250
|
+
this.#cursor = date;
|
|
251
|
+
const item = this.#cells.find((cell) => cell.dataset.date === iso);
|
|
252
|
+
if (!this.range) {
|
|
253
|
+
const changed = iso !== this.value;
|
|
254
|
+
this.value = iso;
|
|
255
|
+
this.update(/* @__PURE__ */ new Map());
|
|
256
|
+
if (changed) this.emit("change", { value: iso });
|
|
257
|
+
} else if (!this.valueStart || this.valueEnd) {
|
|
258
|
+
this.valueStart = iso;
|
|
259
|
+
this.valueEnd = null;
|
|
260
|
+
this.#hover = null;
|
|
261
|
+
this.update(/* @__PURE__ */ new Map());
|
|
262
|
+
this.emit("input", { value: iso, valueStart: iso, valueEnd: null });
|
|
263
|
+
} else {
|
|
264
|
+
const [a, b] = [this.valueStart, iso].sort();
|
|
265
|
+
this.valueStart = a;
|
|
266
|
+
this.valueEnd = b;
|
|
267
|
+
this.#hover = null;
|
|
268
|
+
this.update(/* @__PURE__ */ new Map());
|
|
269
|
+
this.emit("change", { value: `${a}/${b}`, valueStart: a, valueEnd: b });
|
|
270
|
+
}
|
|
271
|
+
this.emit("select", { value: iso, item });
|
|
272
|
+
}
|
|
273
|
+
/** @param {KeyboardEvent} event */
|
|
274
|
+
#onKeydown(event) {
|
|
275
|
+
const cursor = this.#dateFrom(event) || this.#cursor;
|
|
276
|
+
if (!cursor || this.disabled) return;
|
|
277
|
+
const forward = isRtl(this) ? -1 : 1;
|
|
278
|
+
const weekStart = Number.isInteger(this.firstDayOfWeek) ? (this.firstDayOfWeek % 7 + 7) % 7 : firstDayOfWeekFor(this.#language());
|
|
279
|
+
const intoWeek = (weekdayOf(cursor) - weekStart + 7) % 7;
|
|
280
|
+
let next = null;
|
|
281
|
+
switch (event.key) {
|
|
282
|
+
case "ArrowRight":
|
|
283
|
+
next = addDays(cursor, forward);
|
|
284
|
+
break;
|
|
285
|
+
case "ArrowLeft":
|
|
286
|
+
next = addDays(cursor, -forward);
|
|
287
|
+
break;
|
|
288
|
+
case "ArrowDown":
|
|
289
|
+
next = addDays(cursor, 7);
|
|
290
|
+
break;
|
|
291
|
+
case "ArrowUp":
|
|
292
|
+
next = addDays(cursor, -7);
|
|
293
|
+
break;
|
|
294
|
+
case "Home":
|
|
295
|
+
next = addDays(cursor, -intoWeek);
|
|
296
|
+
break;
|
|
297
|
+
case "End":
|
|
298
|
+
next = addDays(cursor, 6 - intoWeek);
|
|
299
|
+
break;
|
|
300
|
+
case "PageDown":
|
|
301
|
+
next = addMonths(cursor, event.shiftKey ? 12 : 1);
|
|
302
|
+
break;
|
|
303
|
+
case "PageUp":
|
|
304
|
+
next = addMonths(cursor, event.shiftKey ? -12 : -1);
|
|
305
|
+
break;
|
|
306
|
+
case "Enter":
|
|
307
|
+
case " ":
|
|
308
|
+
event.preventDefault();
|
|
309
|
+
this.#select(cursor);
|
|
310
|
+
return;
|
|
311
|
+
default:
|
|
312
|
+
return;
|
|
313
|
+
}
|
|
314
|
+
event.preventDefault();
|
|
315
|
+
this.#moveTo(next);
|
|
316
|
+
}
|
|
317
|
+
};
|
|
318
|
+
define("punica-calendar", PunicaCalendar);
|
|
319
|
+
|
|
320
|
+
export {
|
|
321
|
+
PunicaCalendar
|
|
322
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import {
|
|
2
|
+
PunicaElement,
|
|
3
|
+
define
|
|
4
|
+
} from "./chunk-Y7B65FYJ.js";
|
|
5
|
+
|
|
6
|
+
// src/components/segmentedControl/segmentedControlItem.css
|
|
7
|
+
var segmentedControlItem_default = ":host {\n --punica-segmented-control-item-padding: var(--punica-space-12);\n\n position: relative;\n z-index: 1;\n display: inline-flex;\n flex: 1 0 auto;\n border-radius: calc(var(--punica-radius) - var(--punica-space-2));\n color: var(--punica-color-text);\n font-family: var(--punica-font-family);\n font-size: var(--punica-font-size-sm);\n font-weight: var(--punica-font-weight-medium);\n line-height: 1;\n white-space: nowrap;\n cursor: pointer;\n user-select: none;\n outline: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.base {\n display: inline-flex;\n flex: 1;\n align-items: center;\n justify-content: center;\n gap: var(--punica-space-6);\n padding-inline: var(--punica-segmented-control-item-padding);\n}\n\n:host(:hover:not(:state(selected), :state(disabled))) {\n background: var(--punica-color-hover);\n}\n\n:host(:state(selected)) {\n font-weight: var(--punica-font-weight-bold);\n}\n\n:host(:focus-visible) {\n outline: var(--punica-focus-ring);\n outline-offset: calc(-1 * var(--punica-focus-ring-width));\n}\n\n:host(:state(disabled)) {\n cursor: default;\n opacity: var(--punica-disabled-opacity);\n}\n\n@media (forced-colors: active) {\n :host(:state(selected)) {\n background: Highlight;\n color: HighlightText;\n forced-color-adjust: none;\n }\n :host(:state(disabled)) {\n opacity: 1;\n color: GrayText;\n }\n}\n";
|
|
8
|
+
|
|
9
|
+
// src/components/segmentedControl/segmentedControlItem.js
|
|
10
|
+
var PunicaSegmentedControlItem = class extends PunicaElement {
|
|
11
|
+
static properties = {
|
|
12
|
+
value: {},
|
|
13
|
+
selected: { type: Boolean },
|
|
14
|
+
disabled: { type: Boolean }
|
|
15
|
+
};
|
|
16
|
+
static styles = segmentedControlItem_default;
|
|
17
|
+
static template = `<span part="base" class="base"><slot name="start"></slot><slot></slot></span>`;
|
|
18
|
+
update() {
|
|
19
|
+
const control = (
|
|
20
|
+
/** @type {any} */
|
|
21
|
+
this.closest("punica-segmented-control")
|
|
22
|
+
);
|
|
23
|
+
const off = this.disabled || !!control?.isDisabled;
|
|
24
|
+
const internals = this.internals;
|
|
25
|
+
internals.role = "radio";
|
|
26
|
+
internals.ariaChecked = String(this.selected);
|
|
27
|
+
internals.ariaDisabled = off ? "true" : null;
|
|
28
|
+
this.toggleState("selected", this.selected);
|
|
29
|
+
this.toggleState("disabled", off);
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
define("punica-segmented-control-item", PunicaSegmentedControlItem);
|
|
33
|
+
|
|
34
|
+
export {
|
|
35
|
+
PunicaSegmentedControlItem
|
|
36
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import {
|
|
2
|
+
PunicaElement,
|
|
3
|
+
define
|
|
4
|
+
} from "./chunk-Y7B65FYJ.js";
|
|
5
|
+
|
|
6
|
+
// src/components/text/text.css
|
|
7
|
+
var text_default = ":host {\n --_size: var(--punica-font-size);\n --punica-text-font-size: var(--_size);\n --punica-text-line-height: var(--punica-line-height);\n\n display: inline;\n font-family: var(--punica-font-family);\n font-size: var(--punica-text-font-size);\n line-height: var(--punica-text-line-height);\n}\n\n:host([block]),\n:host([align]) {\n display: block;\n}\n\n:host([variant='caption']) {\n --_size: var(--punica-font-size-xs);\n}\n:host([variant='label']) {\n --_size: var(--punica-font-size-sm);\n font-weight: var(--punica-font-weight-medium);\n}\n:host([variant='overline']) {\n --_size: var(--punica-font-size-xs);\n font-weight: var(--punica-font-weight-semi-bold);\n letter-spacing: 0.08em;\n text-transform: uppercase;\n}\n:host([variant='code']) {\n --_size: 0.875em;\n padding-inline: var(--punica-space-4);\n border-radius: var(--punica-radius-sm);\n background: var(--punica-color-hover);\n font-family: var(--punica-font-family-mono);\n}\n\n:host([size='small']) {\n --_size: var(--punica-font-size-sm);\n}\n:host([size='medium']) {\n --_size: var(--punica-font-size);\n}\n:host([size='large']) {\n --_size: var(--punica-font-size-lg);\n}\n\n:host([weight='thin']) {\n font-weight: var(--punica-font-weight-thin);\n}\n:host([weight='light']) {\n font-weight: var(--punica-font-weight-light);\n}\n:host([weight='regular']) {\n font-weight: var(--punica-font-weight-regular);\n}\n:host([weight='medium']) {\n font-weight: var(--punica-font-weight-medium);\n}\n:host([weight='semi-bold']) {\n font-weight: var(--punica-font-weight-semi-bold);\n}\n:host([weight='bold']) {\n font-weight: var(--punica-font-weight-bold);\n}\n:host([weight='extra-bold']) {\n font-weight: var(--punica-font-weight-extra-bold);\n}\n\n:host([color='primary']) {\n color: var(--punica-color-primary);\n}\n:host([color='secondary']) {\n color: var(--punica-color-secondary);\n}\n:host([color='error']) {\n color: var(--punica-color-error);\n}\n:host([color='warning']) {\n color: var(--punica-color-warning);\n}\n:host([color='info']) {\n color: var(--punica-color-info);\n}\n:host([color='success']) {\n color: var(--punica-color-success);\n}\n:host([color='neutral']) {\n color: var(--punica-color-text);\n}\n:host([color='muted']) {\n color: var(--punica-color-text-muted);\n}\n\n:host([align='start']) {\n text-align: start;\n}\n:host([align='center']) {\n text-align: center;\n}\n:host([align='end']) {\n text-align: end;\n}\n:host([align='justify']) {\n text-align: justify;\n}\n\n:host(:state(truncated)) {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: var(--_lines, 1);\n line-clamp: var(--_lines, 1);\n overflow: hidden;\n overflow-wrap: anywhere;\n}\n";
|
|
8
|
+
|
|
9
|
+
// src/components/text/text.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
|
+
function lines(value) {
|
|
20
|
+
if (value == null) return 0;
|
|
21
|
+
if (value.trim() === "") return 1;
|
|
22
|
+
if (!/^\s*\d{1,2}\s*$/.test(value)) return 0;
|
|
23
|
+
return Number(value);
|
|
24
|
+
}
|
|
25
|
+
var PunicaText = class extends PunicaElement {
|
|
26
|
+
static properties = {
|
|
27
|
+
variant: {},
|
|
28
|
+
size: {},
|
|
29
|
+
weight: {},
|
|
30
|
+
color: {},
|
|
31
|
+
truncate: {},
|
|
32
|
+
align: {},
|
|
33
|
+
block: { type: Boolean }
|
|
34
|
+
};
|
|
35
|
+
static styles = text_default;
|
|
36
|
+
static template = `<slot></slot>`;
|
|
37
|
+
#style = instanceStyle(this.shadowRoot);
|
|
38
|
+
update() {
|
|
39
|
+
const count = lines(this.truncate);
|
|
40
|
+
this.toggleState("truncated", count > 0);
|
|
41
|
+
if (count > 0) this.#style.setProperty("--_lines", String(count));
|
|
42
|
+
else this.#style.removeProperty("--_lines");
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
define("punica-text", PunicaText);
|
|
46
|
+
|
|
47
|
+
export {
|
|
48
|
+
PunicaText
|
|
49
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import {
|
|
2
|
+
icons
|
|
3
|
+
} from "./chunk-YSGWORUD.js";
|
|
4
|
+
import {
|
|
5
|
+
PunicaElement,
|
|
6
|
+
define
|
|
7
|
+
} from "./chunk-Y7B65FYJ.js";
|
|
8
|
+
|
|
9
|
+
// src/components/topNav/topNavMegaMenuCard.css
|
|
10
|
+
var topNavMegaMenuCard_default = ":host {\n --punica-top-nav-mega-menu-card-background: var(--punica-color-bg);\n --punica-top-nav-mega-menu-card-radius: var(--punica-radius);\n --punica-top-nav-mega-menu-card-image-ratio: 16 / 9;\n\n display: block;\n font-family: var(--punica-font-family);\n}\n\n.base {\n display: flex;\n flex-direction: column;\n block-size: 100%;\n border-radius: var(--punica-top-nav-mega-menu-card-radius);\n background: var(--punica-top-nav-mega-menu-card-background);\n color: var(--punica-color-text);\n overflow: hidden;\n}\n\n.image {\n display: block;\n inline-size: 100%;\n aspect-ratio: var(--punica-top-nav-mega-menu-card-image-ratio);\n object-fit: cover;\n}\n\n.body {\n display: flex;\n flex-direction: column;\n gap: var(--punica-space-6);\n padding: var(--punica-space-16);\n}\n\n.heading {\n font-size: var(--punica-font-size);\n font-weight: var(--punica-font-weight-semi-bold);\n line-height: var(--punica-line-height-heading);\n}\n\n.text {\n color: var(--punica-color-text-muted);\n font-size: var(--punica-font-size-sm);\n line-height: var(--punica-line-height);\n}\n\n.link {\n display: inline-flex;\n align-items: center;\n gap: var(--punica-space-4);\n align-self: flex-start;\n margin-block-start: var(--punica-space-4);\n border-radius: var(--punica-radius-sm);\n color: var(--punica-color-primary);\n font-size: var(--punica-font-size-sm);\n font-weight: var(--punica-font-weight-semi-bold);\n text-decoration: none;\n}\n\n.link:hover {\n text-decoration: underline;\n}\n\n.link:focus-visible {\n outline: var(--punica-focus-ring);\n outline-offset: var(--punica-focus-ring-offset);\n}\n\n:host(:dir(rtl)) .link .icon {\n transform: scaleX(-1);\n}\n\n[hidden] {\n display: none !important;\n}\n\n@media (forced-colors: active) {\n .base {\n border: var(--punica-border-width) solid CanvasText;\n }\n}\n";
|
|
11
|
+
|
|
12
|
+
// src/components/topNav/topNavMegaMenuCard.js
|
|
13
|
+
var PunicaTopNavMegaMenuCard = class extends PunicaElement {
|
|
14
|
+
static properties = {
|
|
15
|
+
heading: {},
|
|
16
|
+
image: {},
|
|
17
|
+
imageAlt: {},
|
|
18
|
+
href: {},
|
|
19
|
+
linkLabel: {}
|
|
20
|
+
};
|
|
21
|
+
static styles = topNavMegaMenuCard_default;
|
|
22
|
+
static shadowOptions = { delegatesFocus: true };
|
|
23
|
+
static template = `
|
|
24
|
+
<div part="base" class="base">
|
|
25
|
+
<img part="image" class="image" alt="" hidden>
|
|
26
|
+
<div part="body" class="body">
|
|
27
|
+
<div part="heading" class="heading"></div>
|
|
28
|
+
<div class="text"><slot></slot></div>
|
|
29
|
+
<a part="link" class="link" hidden><span class="link-text"></span>${icons.chevronEnd}</a>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
`;
|
|
33
|
+
#image = (
|
|
34
|
+
/** @type {HTMLImageElement} */
|
|
35
|
+
this.$("img")
|
|
36
|
+
);
|
|
37
|
+
#heading = this.$(".heading");
|
|
38
|
+
#link = this.$("a");
|
|
39
|
+
#linkText = this.$(".link-text");
|
|
40
|
+
update() {
|
|
41
|
+
const image = this.#image;
|
|
42
|
+
if (this.image) {
|
|
43
|
+
image.src = this.image;
|
|
44
|
+
image.alt = this.imageAlt ?? "";
|
|
45
|
+
image.hidden = false;
|
|
46
|
+
} else {
|
|
47
|
+
image.removeAttribute("src");
|
|
48
|
+
image.hidden = true;
|
|
49
|
+
}
|
|
50
|
+
this.#heading.textContent = this.heading ?? "";
|
|
51
|
+
this.#heading.hidden = !this.heading;
|
|
52
|
+
const link = this.#link;
|
|
53
|
+
if (this.href) {
|
|
54
|
+
link.setAttribute("href", this.href);
|
|
55
|
+
link.hidden = false;
|
|
56
|
+
} else {
|
|
57
|
+
link.removeAttribute("href");
|
|
58
|
+
link.hidden = true;
|
|
59
|
+
}
|
|
60
|
+
this.#linkText.textContent = this.linkLabel || this.heading || "";
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
define("punica-top-nav-mega-menu-card", PunicaTopNavMegaMenuCard);
|
|
64
|
+
|
|
65
|
+
export {
|
|
66
|
+
PunicaTopNavMegaMenuCard
|
|
67
|
+
};
|