@und-ui/core 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/custom-elements.json +45231 -9574
- package/dist/alert-dialog.d.ts +9 -0
- package/dist/alert-dialog.d.ts.map +1 -0
- package/dist/alert-dialog.js +9 -0
- package/dist/alert-dialog.js.map +1 -0
- package/dist/all.d.ts +69 -0
- package/dist/all.d.ts.map +1 -1
- package/dist/all.js +70 -0
- package/dist/all.js.map +1 -1
- package/dist/app-shell.d.ts +2 -0
- package/dist/app-shell.d.ts.map +1 -0
- package/dist/app-shell.js +8 -0
- package/dist/app-shell.js.map +1 -0
- package/dist/aspect-ratio.d.ts +2 -0
- package/dist/aspect-ratio.d.ts.map +1 -0
- package/dist/aspect-ratio.js +8 -0
- package/dist/aspect-ratio.js.map +1 -0
- package/dist/autoloader.d.ts +9 -0
- package/dist/autoloader.js +135 -0
- package/dist/banner.d.ts +2 -0
- package/dist/banner.d.ts.map +1 -0
- package/dist/banner.js +8 -0
- package/dist/banner.js.map +1 -0
- package/dist/blockquote.d.ts +2 -0
- package/dist/blockquote.d.ts.map +1 -0
- package/dist/blockquote.js +8 -0
- package/dist/blockquote.js.map +1 -0
- package/dist/bottom-sheet.d.ts +2 -0
- package/dist/bottom-sheet.d.ts.map +1 -0
- package/dist/bottom-sheet.js +8 -0
- package/dist/bottom-sheet.js.map +1 -0
- package/dist/button-group.d.ts +2 -0
- package/dist/button-group.d.ts.map +1 -0
- package/dist/button-group.js +8 -0
- package/dist/button-group.js.map +1 -0
- package/dist/calendar.d.ts +2 -0
- package/dist/calendar.d.ts.map +1 -0
- package/dist/calendar.js +8 -0
- package/dist/calendar.js.map +1 -0
- package/dist/carousel.d.ts +2 -0
- package/dist/carousel.d.ts.map +1 -0
- package/dist/carousel.js +8 -0
- package/dist/carousel.js.map +1 -0
- package/dist/cdn/accordion.js +1 -0
- package/dist/cdn/alert.js +177 -0
- package/dist/cdn/all.js +12500 -0
- package/dist/cdn/app-shell.js +170 -0
- package/dist/cdn/aspect-ratio.js +62 -0
- package/dist/cdn/autoloader.js +1 -0
- package/dist/cdn/avatar-group.js +76 -0
- package/dist/cdn/avatar.js +1 -0
- package/dist/cdn/badge.js +139 -0
- package/dist/cdn/banner.js +197 -0
- package/dist/cdn/blockquote.js +51 -0
- package/dist/cdn/bottom-sheet.js +92 -0
- package/dist/cdn/breadcrumb-item.js +1 -0
- package/dist/cdn/breadcrumb.js +1 -0
- package/dist/cdn/button-group.js +1 -0
- package/dist/cdn/button.js +1 -0
- package/dist/cdn/calendar.js +1 -0
- package/dist/cdn/card.js +1 -0
- package/dist/cdn/carousel.js +227 -0
- package/dist/cdn/center.js +38 -0
- package/dist/cdn/chat-composer.js +235 -0
- package/dist/cdn/chat-layout.js +146 -0
- package/dist/cdn/chat-message.js +304 -0
- package/dist/cdn/checkbox-list.js +118 -0
- package/dist/cdn/checkbox.js +1 -0
- package/dist/cdn/chunks/2GOGJDSU.js +47 -0
- package/dist/cdn/chunks/2ILG5UCH.js +320 -0
- package/dist/cdn/chunks/2JGSCE32.js +1 -0
- package/dist/cdn/chunks/2NKWY2MD.js +1 -0
- package/dist/cdn/chunks/2POJ73H3.js +127 -0
- package/dist/cdn/chunks/2ZNYEI2K.js +153 -0
- package/dist/cdn/chunks/4V5OZW5S.js +138 -0
- package/dist/cdn/chunks/53R7LH57.js +1 -0
- package/dist/cdn/chunks/5RXWAJYI.js +209 -0
- package/dist/cdn/chunks/6PVRHMKB.js +136 -0
- package/dist/cdn/chunks/7FX3ODJD.js +1 -0
- package/dist/cdn/chunks/7Q37LUBP.js +1 -0
- package/dist/cdn/chunks/7ZRZJJTR.js +1 -0
- package/dist/cdn/chunks/AFVQZOYK.js +1 -0
- package/dist/cdn/chunks/AH74TYPT.js +1 -0
- package/dist/cdn/chunks/ASRBZKJQ.js +110 -0
- package/dist/cdn/chunks/BC5GCW6V.js +70 -0
- package/dist/cdn/chunks/BZSCKO2L.js +498 -0
- package/dist/cdn/chunks/CQAYRYSN.js +183 -0
- package/dist/cdn/chunks/DDMOITKE.js +1 -0
- package/dist/cdn/chunks/DLMHPPVT.js +9 -0
- package/dist/cdn/chunks/E4ULE3CZ.js +28 -0
- package/dist/cdn/chunks/ERZVCCWG.js +1 -0
- package/dist/cdn/chunks/EXHS4XM7.js +75 -0
- package/dist/cdn/chunks/F4UDAUDP.js +95 -0
- package/dist/cdn/chunks/FQ5Z2ADE.js +1 -0
- package/dist/cdn/chunks/FRDRK7S4.js +192 -0
- package/dist/cdn/chunks/FVWYLBE6.js +1 -0
- package/dist/cdn/chunks/G2MFKC6X.js +1 -0
- package/dist/cdn/chunks/GBWHWWM7.js +1 -0
- package/dist/cdn/chunks/GVFRCF4L.js +1 -0
- package/dist/cdn/chunks/H3EXQADC.js +1 -0
- package/dist/cdn/chunks/HJLUTHQ4.js +28 -0
- package/dist/cdn/chunks/HQG5G3NW.js +294 -0
- package/dist/cdn/chunks/IRDJ2SED.js +227 -0
- package/dist/cdn/chunks/ITULBQXQ.js +77 -0
- package/dist/cdn/chunks/IYPIGVNK.js +1 -0
- package/dist/cdn/chunks/JFRG4OYS.js +174 -0
- package/dist/cdn/chunks/JIAFHSB3.js +1 -0
- package/dist/cdn/chunks/JSGBG32L.js +1 -0
- package/dist/cdn/chunks/JTCY7VA6.js +16 -0
- package/dist/cdn/chunks/KJKMJ4CJ.js +1 -0
- package/dist/cdn/chunks/LAHY3QCY.js +1 -0
- package/dist/cdn/chunks/LILDP4YG.js +228 -0
- package/dist/cdn/chunks/LUMZDQSN.js +1 -0
- package/dist/cdn/chunks/MCMKNHE4.js +243 -0
- package/dist/cdn/chunks/MQR6SWE3.js +1 -0
- package/dist/cdn/chunks/NBCCLQGT.js +2 -0
- package/dist/cdn/chunks/NOAT4MJU.js +1 -0
- package/dist/cdn/chunks/NSGFRI4V.js +1 -0
- package/dist/cdn/chunks/PFTG732C.js +120 -0
- package/dist/cdn/chunks/PYS73CGQ.js +1 -0
- package/dist/cdn/chunks/QFHEFAZM.js +228 -0
- package/dist/cdn/chunks/QSGNQDXL.js +83 -0
- package/dist/cdn/chunks/QXFKH4UN.js +80 -0
- package/dist/cdn/chunks/R7XE3NCT.js +104 -0
- package/dist/cdn/chunks/RBKCBV34.js +10 -0
- package/dist/cdn/chunks/RDI7SHXP.js +161 -0
- package/dist/cdn/chunks/U7MPBIQK.js +15 -0
- package/dist/cdn/chunks/VJW5CINE.js +289 -0
- package/dist/cdn/chunks/VWGB35YM.js +1 -0
- package/dist/cdn/chunks/W3C5YK34.js +25 -0
- package/dist/cdn/chunks/WPLY7F3R.js +1 -0
- package/dist/cdn/chunks/XDXEEO2D.js +189 -0
- package/dist/cdn/chunks/YCLUSLYF.js +155 -0
- package/dist/cdn/chunks/YTJ6WTZW.js +253 -0
- package/dist/cdn/chunks/YUWOEVYA.js +19 -0
- package/dist/cdn/chunks/YYIQMFRC.js +168 -0
- package/dist/cdn/chunks/Z5CQ6NOH.js +1 -0
- package/dist/cdn/citation.js +98 -0
- package/dist/cdn/clickable-card.js +31 -0
- package/dist/cdn/code-block.js +231 -0
- package/dist/cdn/code.js +28 -0
- package/dist/cdn/collapsible.js +11 -0
- package/dist/cdn/combobox.js +1 -0
- package/dist/cdn/command-palette.js +234 -0
- package/dist/cdn/context-menu.js +15 -0
- package/dist/cdn/date-input.js +1 -0
- package/dist/cdn/date-range-input.js +1 -0
- package/dist/cdn/date-time-input.js +9 -0
- package/dist/cdn/dialog.js +1 -0
- package/dist/cdn/divider.js +74 -0
- package/dist/cdn/drawer.js +1 -0
- package/dist/cdn/empty-state.js +99 -0
- package/dist/cdn/file-input.js +190 -0
- package/dist/cdn/form-field.js +13 -0
- package/dist/cdn/form-layout.js +66 -0
- package/dist/cdn/grid-item.js +1 -0
- package/dist/cdn/grid.js +62 -0
- package/dist/cdn/heading.js +57 -0
- package/dist/cdn/hover-card.js +7 -0
- package/dist/cdn/icon-button.js +37 -0
- package/dist/cdn/icon.js +52 -0
- package/dist/cdn/info-tip.js +94 -0
- package/dist/cdn/input-group.js +64 -0
- package/dist/cdn/kbd.js +36 -0
- package/dist/cdn/lightbox.js +259 -0
- package/dist/cdn/link.js +160 -0
- package/dist/cdn/list-item.js +1 -0
- package/dist/cdn/list.js +1 -0
- package/dist/cdn/markdown.js +1 -0
- package/dist/cdn/menu-group.js +1 -0
- package/dist/cdn/menu-item.js +1 -0
- package/dist/cdn/menu-separator.js +1 -0
- package/dist/cdn/menu.js +1 -0
- package/dist/cdn/metadata-item.js +1 -0
- package/dist/cdn/metadata-list.js +1 -0
- package/dist/cdn/mobile-nav.js +88 -0
- package/dist/cdn/more-menu.js +58 -0
- package/dist/cdn/multi-select.js +70 -0
- package/dist/cdn/number-input.js +103 -0
- package/dist/cdn/outline.js +100 -0
- package/dist/cdn/overflow-list.js +124 -0
- package/dist/cdn/pagination.js +181 -0
- package/dist/cdn/popover.js +1 -0
- package/dist/cdn/progress.js +180 -0
- package/dist/cdn/radio-group.js +1 -0
- package/dist/cdn/radio-list.js +76 -0
- package/dist/cdn/radio.js +1 -0
- package/dist/cdn/resize-handle.js +73 -0
- package/dist/cdn/scroll-area.js +79 -0
- package/dist/cdn/section.js +36 -0
- package/dist/cdn/segmented-control-item.js +1 -0
- package/dist/cdn/segmented-control.js +1 -0
- package/dist/cdn/select.js +43 -0
- package/dist/cdn/selectable-card.js +161 -0
- package/dist/cdn/side-nav-heading.js +1 -0
- package/dist/cdn/side-nav-item.js +1 -0
- package/dist/cdn/side-nav-section.js +1 -0
- package/dist/cdn/side-nav.js +1 -0
- package/dist/cdn/skeleton.js +80 -0
- package/dist/cdn/slider.js +182 -0
- package/dist/cdn/spinner.js +65 -0
- package/dist/cdn/stack.js +72 -0
- package/dist/cdn/status-dot.js +66 -0
- package/dist/cdn/step.js +1 -0
- package/dist/cdn/stepper.js +1 -0
- package/dist/cdn/switch.js +178 -0
- package/dist/cdn/tab-menu.js +121 -0
- package/dist/cdn/tab-panel.js +1 -0
- package/dist/cdn/tab.js +1 -0
- package/dist/cdn/table.js +365 -0
- package/dist/cdn/tabs.js +1 -0
- package/dist/cdn/text-field.js +1 -0
- package/dist/cdn/text.js +102 -0
- package/dist/cdn/textarea.js +102 -0
- package/dist/cdn/thumbnail.js +92 -0
- package/dist/cdn/time-input.js +1 -0
- package/dist/cdn/timer.js +33 -0
- package/dist/cdn/timestamp.js +16 -0
- package/dist/cdn/toast.js +1 -0
- package/dist/cdn/toaster.js +1 -0
- package/dist/cdn/toggle-button-group.js +1 -0
- package/dist/cdn/token.js +1 -0
- package/dist/cdn/tokenizer.js +181 -0
- package/dist/cdn/toolbar.js +37 -0
- package/dist/cdn/tooltip.js +50 -0
- package/dist/cdn/top-nav-item.js +1 -0
- package/dist/cdn/top-nav-menu.js +1 -0
- package/dist/cdn/top-nav.js +1 -0
- package/dist/cdn/tree-item.js +1 -0
- package/dist/cdn/tree-list.js +1 -0
- package/dist/cdn/typeahead.js +1 -0
- package/dist/cdn/visually-hidden.js +18 -0
- package/dist/center.d.ts +2 -0
- package/dist/center.d.ts.map +1 -0
- package/dist/center.js +8 -0
- package/dist/center.js.map +1 -0
- package/dist/chat-composer.d.ts +2 -0
- package/dist/chat-composer.d.ts.map +1 -0
- package/dist/chat-composer.js +8 -0
- package/dist/chat-composer.js.map +1 -0
- package/dist/chat-layout.d.ts +2 -0
- package/dist/chat-layout.d.ts.map +1 -0
- package/dist/chat-layout.js +8 -0
- package/dist/chat-layout.js.map +1 -0
- package/dist/chat-message.d.ts +2 -0
- package/dist/chat-message.d.ts.map +1 -0
- package/dist/chat-message.js +11 -0
- package/dist/chat-message.js.map +1 -0
- package/dist/checkbox-list.d.ts +3 -0
- package/dist/checkbox-list.d.ts.map +1 -0
- package/dist/checkbox-list.js +11 -0
- package/dist/checkbox-list.js.map +1 -0
- package/dist/citation.d.ts +2 -0
- package/dist/citation.d.ts.map +1 -0
- package/dist/citation.js +8 -0
- package/dist/citation.js.map +1 -0
- package/dist/clickable-card.d.ts +2 -0
- package/dist/clickable-card.d.ts.map +1 -0
- package/dist/clickable-card.js +8 -0
- package/dist/clickable-card.js.map +1 -0
- package/dist/code-block.d.ts +2 -0
- package/dist/code-block.d.ts.map +1 -0
- package/dist/code-block.js +8 -0
- package/dist/code-block.js.map +1 -0
- package/dist/code.d.ts +2 -0
- package/dist/code.d.ts.map +1 -0
- package/dist/code.js +8 -0
- package/dist/code.js.map +1 -0
- package/dist/collapsible.d.ts +2 -0
- package/dist/collapsible.d.ts.map +1 -0
- package/dist/collapsible.js +8 -0
- package/dist/collapsible.js.map +1 -0
- package/dist/command-palette.d.ts +2 -0
- package/dist/command-palette.d.ts.map +1 -0
- package/dist/command-palette.js +8 -0
- package/dist/command-palette.js.map +1 -0
- package/dist/components/alert-dialog/alert-dialog.d.ts +26 -0
- package/dist/components/alert-dialog/alert-dialog.d.ts.map +1 -0
- package/dist/components/alert-dialog/alert-dialog.js +79 -0
- package/dist/components/alert-dialog/alert-dialog.js.map +1 -0
- package/dist/components/app-shell/app-shell.d.ts +102 -0
- package/dist/components/app-shell/app-shell.d.ts.map +1 -0
- package/dist/components/app-shell/app-shell.js +285 -0
- package/dist/components/app-shell/app-shell.js.map +1 -0
- package/dist/components/aspect-ratio/aspect-ratio.d.ts +45 -0
- package/dist/components/aspect-ratio/aspect-ratio.d.ts.map +1 -0
- package/dist/components/aspect-ratio/aspect-ratio.js +105 -0
- package/dist/components/aspect-ratio/aspect-ratio.js.map +1 -0
- package/dist/components/banner/banner.d.ts +111 -0
- package/dist/components/banner/banner.d.ts.map +1 -0
- package/dist/components/banner/banner.js +287 -0
- package/dist/components/banner/banner.js.map +1 -0
- package/dist/components/blockquote/blockquote.d.ts +42 -0
- package/dist/components/blockquote/blockquote.d.ts.map +1 -0
- package/dist/components/blockquote/blockquote.js +90 -0
- package/dist/components/blockquote/blockquote.js.map +1 -0
- package/dist/components/bottom-sheet/bottom-sheet.d.ts +128 -0
- package/dist/components/bottom-sheet/bottom-sheet.d.ts.map +1 -0
- package/dist/components/bottom-sheet/bottom-sheet.js +279 -0
- package/dist/components/bottom-sheet/bottom-sheet.js.map +1 -0
- package/dist/components/bottom-sheet/bottom-sheet.styles.d.ts +7 -0
- package/dist/components/bottom-sheet/bottom-sheet.styles.d.ts.map +1 -0
- package/dist/components/bottom-sheet/bottom-sheet.styles.js +83 -0
- package/dist/components/bottom-sheet/bottom-sheet.styles.js.map +1 -0
- package/dist/components/button-group/button-group.d.ts +60 -0
- package/dist/components/button-group/button-group.d.ts.map +1 -0
- package/dist/components/button-group/button-group.js +126 -0
- package/dist/components/button-group/button-group.js.map +1 -0
- package/dist/components/calendar/calendar.d.ts +163 -0
- package/dist/components/calendar/calendar.d.ts.map +1 -0
- package/dist/components/calendar/calendar.js +411 -0
- package/dist/components/calendar/calendar.js.map +1 -0
- package/dist/components/calendar/calendar.styles.d.ts +3 -0
- package/dist/components/calendar/calendar.styles.d.ts.map +1 -0
- package/dist/components/calendar/calendar.styles.js +219 -0
- package/dist/components/calendar/calendar.styles.js.map +1 -0
- package/dist/components/card/card.d.ts +6 -2
- package/dist/components/card/card.d.ts.map +1 -1
- package/dist/components/card/card.js +19 -11
- package/dist/components/card/card.js.map +1 -1
- package/dist/components/carousel/carousel.d.ts +171 -0
- package/dist/components/carousel/carousel.d.ts.map +1 -0
- package/dist/components/carousel/carousel.js +340 -0
- package/dist/components/carousel/carousel.js.map +1 -0
- package/dist/components/carousel/carousel.styles.d.ts +3 -0
- package/dist/components/carousel/carousel.styles.d.ts.map +1 -0
- package/dist/components/carousel/carousel.styles.js +171 -0
- package/dist/components/carousel/carousel.styles.js.map +1 -0
- package/dist/components/center/center.d.ts +50 -0
- package/dist/components/center/center.d.ts.map +1 -0
- package/dist/components/center/center.js +69 -0
- package/dist/components/center/center.js.map +1 -0
- package/dist/components/chat/chat-composer.d.ts +172 -0
- package/dist/components/chat/chat-composer.d.ts.map +1 -0
- package/dist/components/chat/chat-composer.js +252 -0
- package/dist/components/chat/chat-composer.js.map +1 -0
- package/dist/components/chat/chat-composer.styles.d.ts +5 -0
- package/dist/components/chat/chat-composer.styles.d.ts.map +1 -0
- package/dist/components/chat/chat-composer.styles.js +206 -0
- package/dist/components/chat/chat-composer.styles.js.map +1 -0
- package/dist/components/chat/chat-layout.d.ts +112 -0
- package/dist/components/chat/chat-layout.d.ts.map +1 -0
- package/dist/components/chat/chat-layout.js +204 -0
- package/dist/components/chat/chat-layout.js.map +1 -0
- package/dist/components/chat/chat-layout.styles.d.ts +3 -0
- package/dist/components/chat/chat-layout.styles.d.ts.map +1 -0
- package/dist/components/chat/chat-layout.styles.js +114 -0
- package/dist/components/chat/chat-layout.styles.js.map +1 -0
- package/dist/components/chat/chat-message.d.ts +164 -0
- package/dist/components/chat/chat-message.d.ts.map +1 -0
- package/dist/components/chat/chat-message.js +257 -0
- package/dist/components/chat/chat-message.js.map +1 -0
- package/dist/components/chat/chat-message.styles.d.ts +3 -0
- package/dist/components/chat/chat-message.styles.d.ts.map +1 -0
- package/dist/components/chat/chat-message.styles.js +249 -0
- package/dist/components/chat/chat-message.styles.js.map +1 -0
- package/dist/components/checkbox-list/checkbox-list.d.ts +109 -0
- package/dist/components/checkbox-list/checkbox-list.d.ts.map +1 -0
- package/dist/components/checkbox-list/checkbox-list.js +230 -0
- package/dist/components/checkbox-list/checkbox-list.js.map +1 -0
- package/dist/components/checkbox-list/checkbox-list.styles.d.ts +3 -0
- package/dist/components/checkbox-list/checkbox-list.styles.d.ts.map +1 -0
- package/dist/components/checkbox-list/checkbox-list.styles.js +104 -0
- package/dist/components/checkbox-list/checkbox-list.styles.js.map +1 -0
- package/dist/components/citation/citation.d.ts +81 -0
- package/dist/components/citation/citation.d.ts.map +1 -0
- package/dist/components/citation/citation.js +173 -0
- package/dist/components/citation/citation.js.map +1 -0
- package/dist/components/clickable-card/clickable-card.d.ts +61 -0
- package/dist/components/clickable-card/clickable-card.d.ts.map +1 -0
- package/dist/components/clickable-card/clickable-card.js +84 -0
- package/dist/components/clickable-card/clickable-card.js.map +1 -0
- package/dist/components/code/code.d.ts +28 -0
- package/dist/components/code/code.d.ts.map +1 -0
- package/dist/components/code/code.js +52 -0
- package/dist/components/code/code.js.map +1 -0
- package/dist/components/code-block/code-block.d.ts +183 -0
- package/dist/components/code-block/code-block.d.ts.map +1 -0
- package/dist/components/code-block/code-block.js +237 -0
- package/dist/components/code-block/code-block.js.map +1 -0
- package/dist/components/code-block/code-block.styles.d.ts +11 -0
- package/dist/components/code-block/code-block.styles.d.ts.map +1 -0
- package/dist/components/code-block/code-block.styles.js +194 -0
- package/dist/components/code-block/code-block.styles.js.map +1 -0
- package/dist/components/collapsible/collapsible.d.ts +57 -0
- package/dist/components/collapsible/collapsible.d.ts.map +1 -0
- package/dist/components/collapsible/collapsible.js +95 -0
- package/dist/components/collapsible/collapsible.js.map +1 -0
- package/dist/components/collapsible/collapsible.styles.d.ts +10 -0
- package/dist/components/collapsible/collapsible.styles.d.ts.map +1 -0
- package/dist/components/collapsible/collapsible.styles.js +22 -0
- package/dist/components/collapsible/collapsible.styles.js.map +1 -0
- package/dist/components/command-palette/command-palette.d.ts +188 -0
- package/dist/components/command-palette/command-palette.d.ts.map +1 -0
- package/dist/components/command-palette/command-palette.js +367 -0
- package/dist/components/command-palette/command-palette.js.map +1 -0
- package/dist/components/command-palette/command-palette.styles.d.ts +6 -0
- package/dist/components/command-palette/command-palette.styles.d.ts.map +1 -0
- package/dist/components/command-palette/command-palette.styles.js +173 -0
- package/dist/components/command-palette/command-palette.styles.js.map +1 -0
- package/dist/components/context-menu/context-menu.d.ts +79 -0
- package/dist/components/context-menu/context-menu.d.ts.map +1 -0
- package/dist/components/context-menu/context-menu.js +144 -0
- package/dist/components/context-menu/context-menu.js.map +1 -0
- package/dist/components/context-menu/context-menu.styles.d.ts +3 -0
- package/dist/components/context-menu/context-menu.styles.d.ts.map +1 -0
- package/dist/components/context-menu/context-menu.styles.js +18 -0
- package/dist/components/context-menu/context-menu.styles.js.map +1 -0
- package/dist/components/date-input/date-input.d.ts +150 -0
- package/dist/components/date-input/date-input.d.ts.map +1 -0
- package/dist/components/date-input/date-input.js +273 -0
- package/dist/components/date-input/date-input.js.map +1 -0
- package/dist/components/date-range-input/date-range-input.d.ts +158 -0
- package/dist/components/date-range-input/date-range-input.d.ts.map +1 -0
- package/dist/components/date-range-input/date-range-input.js +387 -0
- package/dist/components/date-range-input/date-range-input.js.map +1 -0
- package/dist/components/date-time-input/date-time-input.d.ts +178 -0
- package/dist/components/date-time-input/date-time-input.d.ts.map +1 -0
- package/dist/components/date-time-input/date-time-input.js +276 -0
- package/dist/components/date-time-input/date-time-input.js.map +1 -0
- package/dist/components/dialog/dialog.d.ts +13 -1
- package/dist/components/dialog/dialog.d.ts.map +1 -1
- package/dist/components/dialog/dialog.js +36 -24
- package/dist/components/dialog/dialog.js.map +1 -1
- package/dist/components/empty-state/empty-state.d.ts +57 -0
- package/dist/components/empty-state/empty-state.d.ts.map +1 -0
- package/dist/components/empty-state/empty-state.js +162 -0
- package/dist/components/empty-state/empty-state.js.map +1 -0
- package/dist/components/file-input/file-input.d.ts +122 -0
- package/dist/components/file-input/file-input.d.ts.map +1 -0
- package/dist/components/file-input/file-input.js +364 -0
- package/dist/components/file-input/file-input.js.map +1 -0
- package/dist/components/file-input/file-input.styles.d.ts +3 -0
- package/dist/components/file-input/file-input.styles.d.ts.map +1 -0
- package/dist/components/file-input/file-input.styles.js +195 -0
- package/dist/components/file-input/file-input.styles.js.map +1 -0
- package/dist/components/form-layout/form-layout.d.ts +40 -0
- package/dist/components/form-layout/form-layout.d.ts.map +1 -0
- package/dist/components/form-layout/form-layout.js +41 -0
- package/dist/components/form-layout/form-layout.js.map +1 -0
- package/dist/components/form-layout/form-layout.styles.d.ts +3 -0
- package/dist/components/form-layout/form-layout.styles.d.ts.map +1 -0
- package/dist/components/form-layout/form-layout.styles.js +71 -0
- package/dist/components/form-layout/form-layout.styles.js.map +1 -0
- package/dist/components/grid/grid-item.d.ts +36 -0
- package/dist/components/grid/grid-item.d.ts.map +1 -0
- package/dist/components/grid/grid-item.js +42 -0
- package/dist/components/grid/grid-item.js.map +1 -0
- package/dist/components/grid/grid.d.ts +69 -0
- package/dist/components/grid/grid.d.ts.map +1 -0
- package/dist/components/grid/grid.js +97 -0
- package/dist/components/grid/grid.js.map +1 -0
- package/dist/components/heading/heading.d.ts +61 -0
- package/dist/components/heading/heading.d.ts.map +1 -0
- package/dist/components/heading/heading.js +50 -0
- package/dist/components/heading/heading.js.map +1 -0
- package/dist/components/heading/heading.styles.d.ts +6 -0
- package/dist/components/heading/heading.styles.d.ts.map +1 -0
- package/dist/components/heading/heading.styles.js +64 -0
- package/dist/components/heading/heading.styles.js.map +1 -0
- package/dist/components/hover-card/hover-card.d.ts +116 -0
- package/dist/components/hover-card/hover-card.d.ts.map +1 -0
- package/dist/components/hover-card/hover-card.js +291 -0
- package/dist/components/hover-card/hover-card.js.map +1 -0
- package/dist/components/icon/icon-registry.d.ts +60 -0
- package/dist/components/icon/icon-registry.d.ts.map +1 -0
- package/dist/components/icon/icon-registry.js +136 -0
- package/dist/components/icon/icon-registry.js.map +1 -0
- package/dist/components/icon/icon.d.ts +84 -0
- package/dist/components/icon/icon.d.ts.map +1 -0
- package/dist/components/icon/icon.js +126 -0
- package/dist/components/icon/icon.js.map +1 -0
- package/dist/components/info-tip/info-tip.d.ts +73 -0
- package/dist/components/info-tip/info-tip.d.ts.map +1 -0
- package/dist/components/info-tip/info-tip.js +184 -0
- package/dist/components/info-tip/info-tip.js.map +1 -0
- package/dist/components/input-group/input-group.d.ts +41 -0
- package/dist/components/input-group/input-group.d.ts.map +1 -0
- package/dist/components/input-group/input-group.js +79 -0
- package/dist/components/input-group/input-group.js.map +1 -0
- package/dist/components/input-group/input-group.styles.d.ts +3 -0
- package/dist/components/input-group/input-group.styles.d.ts.map +1 -0
- package/dist/components/input-group/input-group.styles.js +69 -0
- package/dist/components/input-group/input-group.styles.js.map +1 -0
- package/dist/components/kbd/kbd.d.ts +31 -0
- package/dist/components/kbd/kbd.d.ts.map +1 -0
- package/dist/components/kbd/kbd.js +63 -0
- package/dist/components/kbd/kbd.js.map +1 -0
- package/dist/components/lightbox/lightbox.d.ts +167 -0
- package/dist/components/lightbox/lightbox.d.ts.map +1 -0
- package/dist/components/lightbox/lightbox.js +272 -0
- package/dist/components/lightbox/lightbox.js.map +1 -0
- package/dist/components/lightbox/lightbox.styles.d.ts +7 -0
- package/dist/components/lightbox/lightbox.styles.d.ts.map +1 -0
- package/dist/components/lightbox/lightbox.styles.js +188 -0
- package/dist/components/lightbox/lightbox.styles.js.map +1 -0
- package/dist/components/list/list-item.d.ts +52 -0
- package/dist/components/list/list-item.d.ts.map +1 -0
- package/dist/components/list/list-item.js +131 -0
- package/dist/components/list/list-item.js.map +1 -0
- package/dist/components/list/list.d.ts +53 -0
- package/dist/components/list/list.d.ts.map +1 -0
- package/dist/components/list/list.js +77 -0
- package/dist/components/list/list.js.map +1 -0
- package/dist/components/markdown/markdown.d.ts +103 -0
- package/dist/components/markdown/markdown.d.ts.map +1 -0
- package/dist/components/markdown/markdown.js +111 -0
- package/dist/components/markdown/markdown.js.map +1 -0
- package/dist/components/markdown/markdown.styles.d.ts +6 -0
- package/dist/components/markdown/markdown.styles.d.ts.map +1 -0
- package/dist/components/markdown/markdown.styles.js +178 -0
- package/dist/components/markdown/markdown.styles.js.map +1 -0
- package/dist/components/markdown/parser.d.ts +67 -0
- package/dist/components/markdown/parser.d.ts.map +1 -0
- package/dist/components/markdown/parser.js +511 -0
- package/dist/components/markdown/parser.js.map +1 -0
- package/dist/components/markdown/render.d.ts +15 -0
- package/dist/components/markdown/render.d.ts.map +1 -0
- package/dist/components/markdown/render.js +170 -0
- package/dist/components/markdown/render.js.map +1 -0
- package/dist/components/menu/menu.d.ts +21 -2
- package/dist/components/menu/menu.d.ts.map +1 -1
- package/dist/components/menu/menu.js +83 -15
- package/dist/components/menu/menu.js.map +1 -1
- package/dist/components/metadata-list/metadata-item.d.ts +35 -0
- package/dist/components/metadata-list/metadata-item.d.ts.map +1 -0
- package/dist/components/metadata-list/metadata-item.js +39 -0
- package/dist/components/metadata-list/metadata-item.js.map +1 -0
- package/dist/components/metadata-list/metadata-list.d.ts +65 -0
- package/dist/components/metadata-list/metadata-list.d.ts.map +1 -0
- package/dist/components/metadata-list/metadata-list.js +151 -0
- package/dist/components/metadata-list/metadata-list.js.map +1 -0
- package/dist/components/mobile-nav/mobile-nav.d.ts +91 -0
- package/dist/components/mobile-nav/mobile-nav.d.ts.map +1 -0
- package/dist/components/mobile-nav/mobile-nav.js +138 -0
- package/dist/components/mobile-nav/mobile-nav.js.map +1 -0
- package/dist/components/mobile-nav/mobile-nav.styles.d.ts +3 -0
- package/dist/components/mobile-nav/mobile-nav.styles.d.ts.map +1 -0
- package/dist/components/mobile-nav/mobile-nav.styles.js +57 -0
- package/dist/components/mobile-nav/mobile-nav.styles.js.map +1 -0
- package/dist/components/more-menu/more-menu.d.ts +57 -0
- package/dist/components/more-menu/more-menu.d.ts.map +1 -0
- package/dist/components/more-menu/more-menu.js +59 -0
- package/dist/components/more-menu/more-menu.js.map +1 -0
- package/dist/components/more-menu/more-menu.styles.d.ts +3 -0
- package/dist/components/more-menu/more-menu.styles.d.ts.map +1 -0
- package/dist/components/more-menu/more-menu.styles.js +50 -0
- package/dist/components/more-menu/more-menu.styles.js.map +1 -0
- package/dist/components/multi-select/multi-select.d.ts +211 -0
- package/dist/components/multi-select/multi-select.d.ts.map +1 -0
- package/dist/components/multi-select/multi-select.js +562 -0
- package/dist/components/multi-select/multi-select.js.map +1 -0
- package/dist/components/multi-select/multi-select.styles.d.ts +6 -0
- package/dist/components/multi-select/multi-select.styles.d.ts.map +1 -0
- package/dist/components/multi-select/multi-select.styles.js +27 -0
- package/dist/components/multi-select/multi-select.styles.js.map +1 -0
- package/dist/components/number-input/number-format.d.ts +38 -0
- package/dist/components/number-input/number-format.d.ts.map +1 -0
- package/dist/components/number-input/number-format.js +114 -0
- package/dist/components/number-input/number-format.js.map +1 -0
- package/dist/components/number-input/number-input.d.ts +204 -0
- package/dist/components/number-input/number-input.d.ts.map +1 -0
- package/dist/components/number-input/number-input.js +470 -0
- package/dist/components/number-input/number-input.js.map +1 -0
- package/dist/components/number-input/number-input.styles.d.ts +3 -0
- package/dist/components/number-input/number-input.styles.d.ts.map +1 -0
- package/dist/components/number-input/number-input.styles.js +108 -0
- package/dist/components/number-input/number-input.styles.js.map +1 -0
- package/dist/components/outline/outline.d.ts +117 -0
- package/dist/components/outline/outline.d.ts.map +1 -0
- package/dist/components/outline/outline.js +283 -0
- package/dist/components/outline/outline.js.map +1 -0
- package/dist/components/outline/outline.styles.d.ts +7 -0
- package/dist/components/outline/outline.styles.d.ts.map +1 -0
- package/dist/components/outline/outline.styles.js +92 -0
- package/dist/components/outline/outline.styles.js.map +1 -0
- package/dist/components/overflow-list/overflow-list.d.ts +78 -0
- package/dist/components/overflow-list/overflow-list.d.ts.map +1 -0
- package/dist/components/overflow-list/overflow-list.js +211 -0
- package/dist/components/overflow-list/overflow-list.js.map +1 -0
- package/dist/components/overflow-list/overflow-list.styles.d.ts +3 -0
- package/dist/components/overflow-list/overflow-list.styles.d.ts.map +1 -0
- package/dist/components/overflow-list/overflow-list.styles.js +112 -0
- package/dist/components/overflow-list/overflow-list.styles.js.map +1 -0
- package/dist/components/pagination/pagination.d.ts +1 -1
- package/dist/components/pagination/pagination.js +2 -2
- package/dist/components/radio-group/radio-group.d.ts +6 -2
- package/dist/components/radio-group/radio-group.d.ts.map +1 -1
- package/dist/components/radio-group/radio-group.js +8 -2
- package/dist/components/radio-group/radio-group.js.map +1 -1
- package/dist/components/radio-group/radio.d.ts +6 -2
- package/dist/components/radio-group/radio.d.ts.map +1 -1
- package/dist/components/radio-group/radio.js +14 -6
- package/dist/components/radio-group/radio.js.map +1 -1
- package/dist/components/radio-list/radio-list.d.ts +33 -0
- package/dist/components/radio-list/radio-list.d.ts.map +1 -0
- package/dist/components/radio-list/radio-list.js +32 -0
- package/dist/components/radio-list/radio-list.js.map +1 -0
- package/dist/components/radio-list/radio-list.styles.d.ts +3 -0
- package/dist/components/radio-list/radio-list.styles.d.ts.map +1 -0
- package/dist/components/radio-list/radio-list.styles.js +81 -0
- package/dist/components/radio-list/radio-list.styles.js.map +1 -0
- package/dist/components/resize-handle/resize-handle.d.ts +130 -0
- package/dist/components/resize-handle/resize-handle.d.ts.map +1 -0
- package/dist/components/resize-handle/resize-handle.js +343 -0
- package/dist/components/resize-handle/resize-handle.js.map +1 -0
- package/dist/components/scroll-area/scroll-area.d.ts +63 -0
- package/dist/components/scroll-area/scroll-area.d.ts.map +1 -0
- package/dist/components/scroll-area/scroll-area.js +186 -0
- package/dist/components/scroll-area/scroll-area.js.map +1 -0
- package/dist/components/section/section.d.ts +62 -0
- package/dist/components/section/section.d.ts.map +1 -0
- package/dist/components/section/section.js +88 -0
- package/dist/components/section/section.js.map +1 -0
- package/dist/components/segmented-control/segmented-control.d.ts +69 -0
- package/dist/components/segmented-control/segmented-control.d.ts.map +1 -0
- package/dist/components/segmented-control/segmented-control.js +206 -0
- package/dist/components/segmented-control/segmented-control.js.map +1 -0
- package/dist/components/segmented-control/segmented-control.styles.d.ts +3 -0
- package/dist/components/segmented-control/segmented-control.styles.d.ts.map +1 -0
- package/dist/components/segmented-control/segmented-control.styles.js +149 -0
- package/dist/components/segmented-control/segmented-control.styles.js.map +1 -0
- package/dist/components/selectable-card/selectable-card.d.ts +55 -0
- package/dist/components/selectable-card/selectable-card.d.ts.map +1 -0
- package/dist/components/selectable-card/selectable-card.js +122 -0
- package/dist/components/selectable-card/selectable-card.js.map +1 -0
- package/dist/components/selectable-card/selectable-card.styles.d.ts +3 -0
- package/dist/components/selectable-card/selectable-card.styles.d.ts.map +1 -0
- package/dist/components/selectable-card/selectable-card.styles.js +166 -0
- package/dist/components/selectable-card/selectable-card.styles.js.map +1 -0
- package/dist/components/shared/calendar-picker.d.ts +47 -0
- package/dist/components/shared/calendar-picker.d.ts.map +1 -0
- package/dist/components/shared/calendar-picker.js +154 -0
- package/dist/components/shared/calendar-picker.js.map +1 -0
- package/dist/components/shared/date-check.d.ts +18 -0
- package/dist/components/shared/date-check.d.ts.map +1 -0
- package/dist/components/shared/date-check.js +44 -0
- package/dist/components/shared/date-check.js.map +1 -0
- package/dist/components/shared/date-field.styles.d.ts +3 -0
- package/dist/components/shared/date-field.styles.d.ts.map +1 -0
- package/dist/components/shared/date-field.styles.js +158 -0
- package/dist/components/shared/date-field.styles.js.map +1 -0
- package/dist/components/shared/date-strings.d.ts +51 -0
- package/dist/components/shared/date-strings.d.ts.map +1 -0
- package/dist/components/shared/date-strings.js +44 -0
- package/dist/components/shared/date-strings.js.map +1 -0
- package/dist/components/shared/date-utils.d.ts +90 -0
- package/dist/components/shared/date-utils.d.ts.map +1 -0
- package/dist/components/shared/date-utils.js +305 -0
- package/dist/components/shared/date-utils.js.map +1 -0
- package/dist/components/shared/heading-tag.d.ts +10 -0
- package/dist/components/shared/heading-tag.d.ts.map +1 -0
- package/dist/components/shared/heading-tag.js +27 -0
- package/dist/components/shared/heading-tag.js.map +1 -0
- package/dist/components/shared/host-aria.d.ts +15 -0
- package/dist/components/shared/host-aria.d.ts.map +1 -0
- package/dist/components/shared/host-aria.js +48 -0
- package/dist/components/shared/host-aria.js.map +1 -0
- package/dist/components/shared/indic.d.ts +15 -0
- package/dist/components/shared/indic.d.ts.map +1 -0
- package/dist/components/shared/indic.js +33 -0
- package/dist/components/shared/indic.js.map +1 -0
- package/dist/components/shared/layout.d.ts +8 -0
- package/dist/components/shared/layout.d.ts.map +1 -0
- package/dist/components/shared/layout.js +36 -0
- package/dist/components/shared/layout.js.map +1 -0
- package/dist/components/shared/status-icons.d.ts +8 -0
- package/dist/components/shared/status-icons.d.ts.map +1 -0
- package/dist/components/shared/status-icons.js +24 -0
- package/dist/components/shared/status-icons.js.map +1 -0
- package/dist/components/shared/strings.d.ts +17 -0
- package/dist/components/shared/strings.d.ts.map +1 -0
- package/dist/components/shared/strings.js +21 -0
- package/dist/components/shared/strings.js.map +1 -0
- package/dist/components/side-nav/side-nav.d.ts +255 -0
- package/dist/components/side-nav/side-nav.d.ts.map +1 -0
- package/dist/components/side-nav/side-nav.js +335 -0
- package/dist/components/side-nav/side-nav.js.map +1 -0
- package/dist/components/side-nav/side-nav.styles.d.ts +11 -0
- package/dist/components/side-nav/side-nav.styles.d.ts.map +1 -0
- package/dist/components/side-nav/side-nav.styles.js +443 -0
- package/dist/components/side-nav/side-nav.styles.js.map +1 -0
- package/dist/components/stack/stack.d.ts +78 -0
- package/dist/components/stack/stack.d.ts.map +1 -0
- package/dist/components/stack/stack.js +108 -0
- package/dist/components/stack/stack.js.map +1 -0
- package/dist/components/status-dot/status-dot.d.ts +53 -0
- package/dist/components/status-dot/status-dot.d.ts.map +1 -0
- package/dist/components/status-dot/status-dot.js +126 -0
- package/dist/components/status-dot/status-dot.js.map +1 -0
- package/dist/components/stepper/stepper.d.ts +185 -0
- package/dist/components/stepper/stepper.d.ts.map +1 -0
- package/dist/components/stepper/stepper.js +203 -0
- package/dist/components/stepper/stepper.js.map +1 -0
- package/dist/components/stepper/stepper.styles.d.ts +7 -0
- package/dist/components/stepper/stepper.styles.d.ts.map +1 -0
- package/dist/components/stepper/stepper.styles.js +220 -0
- package/dist/components/stepper/stepper.styles.js.map +1 -0
- package/dist/components/tab-menu/tab-menu.d.ts +61 -0
- package/dist/components/tab-menu/tab-menu.d.ts.map +1 -0
- package/dist/components/tab-menu/tab-menu.js +52 -0
- package/dist/components/tab-menu/tab-menu.js.map +1 -0
- package/dist/components/tab-menu/tab-menu.styles.d.ts +8 -0
- package/dist/components/tab-menu/tab-menu.styles.d.ts.map +1 -0
- package/dist/components/tab-menu/tab-menu.styles.js +127 -0
- package/dist/components/tab-menu/tab-menu.styles.js.map +1 -0
- package/dist/components/table/sort.d.ts +22 -0
- package/dist/components/table/sort.d.ts.map +1 -0
- package/dist/components/table/sort.js +36 -0
- package/dist/components/table/sort.js.map +1 -0
- package/dist/components/table/table.d.ts +92 -1
- package/dist/components/table/table.d.ts.map +1 -1
- package/dist/components/table/table.js +359 -23
- package/dist/components/table/table.js.map +1 -1
- package/dist/components/table/table.styles.d.ts.map +1 -1
- package/dist/components/table/table.styles.js +202 -0
- package/dist/components/table/table.styles.js.map +1 -1
- package/dist/components/text/text.d.ts +81 -0
- package/dist/components/text/text.d.ts.map +1 -0
- package/dist/components/text/text.js +59 -0
- package/dist/components/text/text.js.map +1 -0
- package/dist/components/text/text.styles.d.ts +6 -0
- package/dist/components/text/text.styles.d.ts.map +1 -0
- package/dist/components/text/text.styles.js +107 -0
- package/dist/components/text/text.styles.js.map +1 -0
- package/dist/components/thumbnail/thumbnail.d.ts +79 -0
- package/dist/components/thumbnail/thumbnail.d.ts.map +1 -0
- package/dist/components/thumbnail/thumbnail.js +186 -0
- package/dist/components/thumbnail/thumbnail.js.map +1 -0
- package/dist/components/time-input/time-input.d.ts +128 -0
- package/dist/components/time-input/time-input.d.ts.map +1 -0
- package/dist/components/time-input/time-input.js +261 -0
- package/dist/components/time-input/time-input.js.map +1 -0
- package/dist/components/timer/timer.d.ts +113 -0
- package/dist/components/timer/timer.d.ts.map +1 -0
- package/dist/components/timer/timer.js +187 -0
- package/dist/components/timer/timer.js.map +1 -0
- package/dist/components/timer/timer.styles.d.ts +3 -0
- package/dist/components/timer/timer.styles.d.ts.map +1 -0
- package/dist/components/timer/timer.styles.js +34 -0
- package/dist/components/timer/timer.styles.js.map +1 -0
- package/dist/components/timestamp/timestamp.d.ts +112 -0
- package/dist/components/timestamp/timestamp.d.ts.map +1 -0
- package/dist/components/timestamp/timestamp.js +191 -0
- package/dist/components/timestamp/timestamp.js.map +1 -0
- package/dist/components/toggle-button-group/toggle-button-group.d.ts +123 -0
- package/dist/components/toggle-button-group/toggle-button-group.d.ts.map +1 -0
- package/dist/components/toggle-button-group/toggle-button-group.js +201 -0
- package/dist/components/toggle-button-group/toggle-button-group.js.map +1 -0
- package/dist/components/token/token.d.ts +82 -0
- package/dist/components/token/token.d.ts.map +1 -0
- package/dist/components/token/token.js +86 -0
- package/dist/components/token/token.js.map +1 -0
- package/dist/components/token/token.styles.d.ts +6 -0
- package/dist/components/token/token.styles.d.ts.map +1 -0
- package/dist/components/token/token.styles.js +117 -0
- package/dist/components/token/token.styles.js.map +1 -0
- package/dist/components/tokenizer/tokenizer.d.ts +252 -0
- package/dist/components/tokenizer/tokenizer.d.ts.map +1 -0
- package/dist/components/tokenizer/tokenizer.js +637 -0
- package/dist/components/tokenizer/tokenizer.js.map +1 -0
- package/dist/components/tokenizer/tokenizer.styles.d.ts +7 -0
- package/dist/components/tokenizer/tokenizer.styles.d.ts.map +1 -0
- package/dist/components/tokenizer/tokenizer.styles.js +122 -0
- package/dist/components/tokenizer/tokenizer.styles.js.map +1 -0
- package/dist/components/toolbar/toolbar.d.ts +57 -0
- package/dist/components/toolbar/toolbar.d.ts.map +1 -0
- package/dist/components/toolbar/toolbar.js +145 -0
- package/dist/components/toolbar/toolbar.js.map +1 -0
- package/dist/components/top-nav/top-nav.d.ts +155 -0
- package/dist/components/top-nav/top-nav.d.ts.map +1 -0
- package/dist/components/top-nav/top-nav.js +236 -0
- package/dist/components/top-nav/top-nav.js.map +1 -0
- package/dist/components/top-nav/top-nav.styles.d.ts +9 -0
- package/dist/components/top-nav/top-nav.styles.d.ts.map +1 -0
- package/dist/components/top-nav/top-nav.styles.js +267 -0
- package/dist/components/top-nav/top-nav.styles.js.map +1 -0
- package/dist/components/tree-list/tree-list.d.ts +194 -0
- package/dist/components/tree-list/tree-list.d.ts.map +1 -0
- package/dist/components/tree-list/tree-list.js +501 -0
- package/dist/components/tree-list/tree-list.js.map +1 -0
- package/dist/components/tree-list/tree-list.styles.d.ts +8 -0
- package/dist/components/tree-list/tree-list.styles.d.ts.map +1 -0
- package/dist/components/tree-list/tree-list.styles.js +171 -0
- package/dist/components/tree-list/tree-list.styles.js.map +1 -0
- package/dist/components/typeahead/typeahead.d.ts +102 -0
- package/dist/components/typeahead/typeahead.d.ts.map +1 -0
- package/dist/components/typeahead/typeahead.js +69 -0
- package/dist/components/typeahead/typeahead.js.map +1 -0
- package/dist/context-menu.d.ts +3 -0
- package/dist/context-menu.d.ts.map +1 -0
- package/dist/context-menu.js +9 -0
- package/dist/context-menu.js.map +1 -0
- package/dist/date-input.d.ts +2 -0
- package/dist/date-input.d.ts.map +1 -0
- package/dist/date-input.js +8 -0
- package/dist/date-input.js.map +1 -0
- package/dist/date-range-input.d.ts +2 -0
- package/dist/date-range-input.d.ts.map +1 -0
- package/dist/date-range-input.js +8 -0
- package/dist/date-range-input.js.map +1 -0
- package/dist/date-time-input.d.ts +2 -0
- package/dist/date-time-input.d.ts.map +1 -0
- package/dist/date-time-input.js +8 -0
- package/dist/date-time-input.js.map +1 -0
- package/dist/empty-state.d.ts +2 -0
- package/dist/empty-state.d.ts.map +1 -0
- package/dist/empty-state.js +8 -0
- package/dist/empty-state.js.map +1 -0
- package/dist/file-input.d.ts +2 -0
- package/dist/file-input.d.ts.map +1 -0
- package/dist/file-input.js +8 -0
- package/dist/file-input.js.map +1 -0
- package/dist/form-layout.d.ts +2 -0
- package/dist/form-layout.d.ts.map +1 -0
- package/dist/form-layout.js +8 -0
- package/dist/form-layout.js.map +1 -0
- package/dist/grid-item.d.ts +2 -0
- package/dist/grid-item.d.ts.map +1 -0
- package/dist/grid-item.js +8 -0
- package/dist/grid-item.js.map +1 -0
- package/dist/grid.d.ts +3 -0
- package/dist/grid.d.ts.map +1 -0
- package/dist/grid.js +11 -0
- package/dist/grid.js.map +1 -0
- package/dist/heading.d.ts +2 -0
- package/dist/heading.d.ts.map +1 -0
- package/dist/heading.js +8 -0
- package/dist/heading.js.map +1 -0
- package/dist/hover-card.d.ts +2 -0
- package/dist/hover-card.d.ts.map +1 -0
- package/dist/hover-card.js +8 -0
- package/dist/hover-card.js.map +1 -0
- package/dist/icon.d.ts +3 -0
- package/dist/icon.d.ts.map +1 -0
- package/dist/icon.js +9 -0
- package/dist/icon.js.map +1 -0
- package/dist/index.d.ts +72 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +73 -0
- package/dist/index.js.map +1 -1
- package/dist/info-tip.d.ts +2 -0
- package/dist/info-tip.d.ts.map +1 -0
- package/dist/info-tip.js +8 -0
- package/dist/info-tip.js.map +1 -0
- package/dist/input-group.d.ts +2 -0
- package/dist/input-group.d.ts.map +1 -0
- package/dist/input-group.js +8 -0
- package/dist/input-group.js.map +1 -0
- package/dist/internal/autoload.d.ts +27 -0
- package/dist/internal/autoload.d.ts.map +1 -0
- package/dist/internal/autoload.js +72 -0
- package/dist/internal/autoload.js.map +1 -0
- package/dist/kbd.d.ts +2 -0
- package/dist/kbd.d.ts.map +1 -0
- package/dist/kbd.js +8 -0
- package/dist/kbd.js.map +1 -0
- package/dist/lightbox.d.ts +2 -0
- package/dist/lightbox.d.ts.map +1 -0
- package/dist/lightbox.js +8 -0
- package/dist/lightbox.js.map +1 -0
- package/dist/list-item.d.ts +6 -0
- package/dist/list-item.d.ts.map +1 -0
- package/dist/list-item.js +6 -0
- package/dist/list-item.js.map +1 -0
- package/dist/list.d.ts +3 -0
- package/dist/list.d.ts.map +1 -0
- package/dist/list.js +11 -0
- package/dist/list.js.map +1 -0
- package/dist/markdown.d.ts +2 -0
- package/dist/markdown.d.ts.map +1 -0
- package/dist/markdown.js +8 -0
- package/dist/markdown.js.map +1 -0
- package/dist/metadata-item.d.ts +6 -0
- package/dist/metadata-item.d.ts.map +1 -0
- package/dist/metadata-item.js +6 -0
- package/dist/metadata-item.js.map +1 -0
- package/dist/metadata-list.d.ts +3 -0
- package/dist/metadata-list.d.ts.map +1 -0
- package/dist/metadata-list.js +11 -0
- package/dist/metadata-list.js.map +1 -0
- package/dist/mobile-nav.d.ts +2 -0
- package/dist/mobile-nav.d.ts.map +1 -0
- package/dist/mobile-nav.js +10 -0
- package/dist/mobile-nav.js.map +1 -0
- package/dist/more-menu.d.ts +3 -0
- package/dist/more-menu.d.ts.map +1 -0
- package/dist/more-menu.js +9 -0
- package/dist/more-menu.js.map +1 -0
- package/dist/multi-select.d.ts +7 -0
- package/dist/multi-select.d.ts.map +1 -0
- package/dist/multi-select.js +9 -0
- package/dist/multi-select.js.map +1 -0
- package/dist/number-input.d.ts +2 -0
- package/dist/number-input.d.ts.map +1 -0
- package/dist/number-input.js +8 -0
- package/dist/number-input.js.map +1 -0
- package/dist/outline.d.ts +2 -0
- package/dist/outline.d.ts.map +1 -0
- package/dist/outline.js +8 -0
- package/dist/outline.js.map +1 -0
- package/dist/overflow-list.d.ts +2 -0
- package/dist/overflow-list.d.ts.map +1 -0
- package/dist/overflow-list.js +8 -0
- package/dist/overflow-list.js.map +1 -0
- package/dist/radio-list.d.ts +3 -0
- package/dist/radio-list.d.ts.map +1 -0
- package/dist/radio-list.js +11 -0
- package/dist/radio-list.js.map +1 -0
- package/dist/resize-handle.d.ts +2 -0
- package/dist/resize-handle.d.ts.map +1 -0
- package/dist/resize-handle.js +8 -0
- package/dist/resize-handle.js.map +1 -0
- package/dist/scroll-area.d.ts +2 -0
- package/dist/scroll-area.d.ts.map +1 -0
- package/dist/scroll-area.js +8 -0
- package/dist/scroll-area.js.map +1 -0
- package/dist/section.d.ts +2 -0
- package/dist/section.d.ts.map +1 -0
- package/dist/section.js +8 -0
- package/dist/section.js.map +1 -0
- package/dist/segmented-control-item.d.ts +6 -0
- package/dist/segmented-control-item.d.ts.map +1 -0
- package/dist/segmented-control-item.js +6 -0
- package/dist/segmented-control-item.js.map +1 -0
- package/dist/segmented-control.d.ts +2 -0
- package/dist/segmented-control.d.ts.map +1 -0
- package/dist/segmented-control.js +9 -0
- package/dist/segmented-control.js.map +1 -0
- package/dist/selectable-card.d.ts +2 -0
- package/dist/selectable-card.d.ts.map +1 -0
- package/dist/selectable-card.js +8 -0
- package/dist/selectable-card.js.map +1 -0
- package/dist/side-nav-heading.d.ts +6 -0
- package/dist/side-nav-heading.d.ts.map +1 -0
- package/dist/side-nav-heading.js +6 -0
- package/dist/side-nav-heading.js.map +1 -0
- package/dist/side-nav-item.d.ts +6 -0
- package/dist/side-nav-item.d.ts.map +1 -0
- package/dist/side-nav-item.js +6 -0
- package/dist/side-nav-item.js.map +1 -0
- package/dist/side-nav-section.d.ts +6 -0
- package/dist/side-nav-section.d.ts.map +1 -0
- package/dist/side-nav-section.js +6 -0
- package/dist/side-nav-section.js.map +1 -0
- package/dist/side-nav.d.ts +2 -0
- package/dist/side-nav.d.ts.map +1 -0
- package/dist/side-nav.js +12 -0
- package/dist/side-nav.js.map +1 -0
- package/dist/stack.d.ts +2 -0
- package/dist/stack.d.ts.map +1 -0
- package/dist/stack.js +8 -0
- package/dist/stack.js.map +1 -0
- package/dist/status-dot.d.ts +2 -0
- package/dist/status-dot.d.ts.map +1 -0
- package/dist/status-dot.js +8 -0
- package/dist/status-dot.js.map +1 -0
- package/dist/step.d.ts +6 -0
- package/dist/step.d.ts.map +1 -0
- package/dist/step.js +6 -0
- package/dist/step.js.map +1 -0
- package/dist/stepper.d.ts +2 -0
- package/dist/stepper.d.ts.map +1 -0
- package/dist/stepper.js +9 -0
- package/dist/stepper.js.map +1 -0
- package/dist/tab-menu.d.ts +2 -0
- package/dist/tab-menu.d.ts.map +1 -0
- package/dist/tab-menu.js +8 -0
- package/dist/tab-menu.js.map +1 -0
- package/dist/text.d.ts +2 -0
- package/dist/text.d.ts.map +1 -0
- package/dist/text.js +8 -0
- package/dist/text.js.map +1 -0
- package/dist/thumbnail.d.ts +2 -0
- package/dist/thumbnail.d.ts.map +1 -0
- package/dist/thumbnail.js +8 -0
- package/dist/thumbnail.js.map +1 -0
- package/dist/time-input.d.ts +2 -0
- package/dist/time-input.d.ts.map +1 -0
- package/dist/time-input.js +8 -0
- package/dist/time-input.js.map +1 -0
- package/dist/timer.d.ts +2 -0
- package/dist/timer.d.ts.map +1 -0
- package/dist/timer.js +8 -0
- package/dist/timer.js.map +1 -0
- package/dist/timestamp.d.ts +2 -0
- package/dist/timestamp.d.ts.map +1 -0
- package/dist/timestamp.js +8 -0
- package/dist/timestamp.js.map +1 -0
- package/dist/toggle-button-group.d.ts +2 -0
- package/dist/toggle-button-group.d.ts.map +1 -0
- package/dist/toggle-button-group.js +8 -0
- package/dist/toggle-button-group.js.map +1 -0
- package/dist/token.d.ts +2 -0
- package/dist/token.d.ts.map +1 -0
- package/dist/token.js +8 -0
- package/dist/token.js.map +1 -0
- package/dist/tokenizer.d.ts +7 -0
- package/dist/tokenizer.d.ts.map +1 -0
- package/dist/tokenizer.js +9 -0
- package/dist/tokenizer.js.map +1 -0
- package/dist/toolbar.d.ts +2 -0
- package/dist/toolbar.d.ts.map +1 -0
- package/dist/toolbar.js +8 -0
- package/dist/toolbar.js.map +1 -0
- package/dist/top-nav-item.d.ts +6 -0
- package/dist/top-nav-item.d.ts.map +1 -0
- package/dist/top-nav-item.js +6 -0
- package/dist/top-nav-item.js.map +1 -0
- package/dist/top-nav-menu.d.ts +6 -0
- package/dist/top-nav-menu.d.ts.map +1 -0
- package/dist/top-nav-menu.js +6 -0
- package/dist/top-nav-menu.js.map +1 -0
- package/dist/top-nav.d.ts +2 -0
- package/dist/top-nav.d.ts.map +1 -0
- package/dist/top-nav.js +10 -0
- package/dist/top-nav.js.map +1 -0
- package/dist/tree-item.d.ts +6 -0
- package/dist/tree-item.d.ts.map +1 -0
- package/dist/tree-item.js +6 -0
- package/dist/tree-item.js.map +1 -0
- package/dist/tree-list.d.ts +2 -0
- package/dist/tree-list.d.ts.map +1 -0
- package/dist/tree-list.js +9 -0
- package/dist/tree-list.js.map +1 -0
- package/dist/typeahead.d.ts +2 -0
- package/dist/typeahead.d.ts.map +1 -0
- package/dist/typeahead.js +8 -0
- package/dist/typeahead.js.map +1 -0
- package/package.json +402 -4
- package/src/alert-dialog.ts +9 -0
- package/src/all.ts +70 -0
- package/src/app-shell.ts +9 -0
- package/src/aspect-ratio.ts +9 -0
- package/src/banner.ts +9 -0
- package/src/blockquote.ts +9 -0
- package/src/bottom-sheet.ts +9 -0
- package/src/button-group.ts +9 -0
- package/src/calendar.ts +9 -0
- package/src/carousel.ts +9 -0
- package/src/center.ts +9 -0
- package/src/chat-composer.ts +9 -0
- package/src/chat-layout.ts +9 -0
- package/src/chat-message.ts +12 -0
- package/src/checkbox-list.ts +12 -0
- package/src/citation.ts +9 -0
- package/src/clickable-card.ts +9 -0
- package/src/code-block.ts +9 -0
- package/src/code.ts +9 -0
- package/src/collapsible.ts +9 -0
- package/src/command-palette.ts +9 -0
- package/src/components/alert-dialog/alert-dialog.ts +108 -0
- package/src/components/app-shell/app-shell.ts +328 -0
- package/src/components/aspect-ratio/aspect-ratio.ts +121 -0
- package/src/components/banner/banner.ts +351 -0
- package/src/components/blockquote/blockquote.ts +108 -0
- package/src/components/bottom-sheet/bottom-sheet.styles.ts +83 -0
- package/src/components/bottom-sheet/bottom-sheet.ts +328 -0
- package/src/components/button-group/button-group.ts +158 -0
- package/src/components/calendar/calendar.styles.ts +219 -0
- package/src/components/calendar/calendar.ts +559 -0
- package/src/components/card/card.ts +23 -15
- package/src/components/carousel/carousel.styles.ts +171 -0
- package/src/components/carousel/carousel.ts +441 -0
- package/src/components/center/center.ts +93 -0
- package/src/components/chat/chat-composer.styles.ts +207 -0
- package/src/components/chat/chat-composer.ts +346 -0
- package/src/components/chat/chat-layout.styles.ts +114 -0
- package/src/components/chat/chat-layout.ts +246 -0
- package/src/components/chat/chat-message.styles.ts +249 -0
- package/src/components/chat/chat-message.ts +381 -0
- package/src/components/checkbox-list/checkbox-list.styles.ts +104 -0
- package/src/components/checkbox-list/checkbox-list.ts +287 -0
- package/src/components/citation/citation.ts +222 -0
- package/src/components/clickable-card/clickable-card.ts +103 -0
- package/src/components/code/code.ts +60 -0
- package/src/components/code-block/code-block.styles.ts +194 -0
- package/src/components/code-block/code-block.ts +348 -0
- package/src/components/collapsible/collapsible.styles.ts +25 -0
- package/src/components/collapsible/collapsible.ts +119 -0
- package/src/components/command-palette/command-palette.styles.ts +173 -0
- package/src/components/command-palette/command-palette.ts +486 -0
- package/src/components/context-menu/context-menu.styles.ts +18 -0
- package/src/components/context-menu/context-menu.ts +172 -0
- package/src/components/date-input/date-input.ts +375 -0
- package/src/components/date-range-input/date-range-input.ts +488 -0
- package/src/components/date-time-input/date-time-input.ts +387 -0
- package/src/components/dialog/dialog.ts +38 -25
- package/src/components/empty-state/empty-state.ts +196 -0
- package/src/components/file-input/file-input.styles.ts +195 -0
- package/src/components/file-input/file-input.ts +418 -0
- package/src/components/form-layout/form-layout.styles.ts +71 -0
- package/src/components/form-layout/form-layout.ts +53 -0
- package/src/components/grid/grid-item.ts +65 -0
- package/src/components/grid/grid.ts +138 -0
- package/src/components/heading/heading.styles.ts +64 -0
- package/src/components/heading/heading.ts +82 -0
- package/src/components/hover-card/hover-card.ts +361 -0
- package/src/components/icon/icon-registry.ts +168 -0
- package/src/components/icon/icon.ts +180 -0
- package/src/components/info-tip/info-tip.ts +217 -0
- package/src/components/input-group/input-group.styles.ts +69 -0
- package/src/components/input-group/input-group.ts +95 -0
- package/src/components/kbd/kbd.ts +71 -0
- package/src/components/lightbox/lightbox.styles.ts +188 -0
- package/src/components/lightbox/lightbox.ts +350 -0
- package/src/components/list/list-item.ts +163 -0
- package/src/components/list/list.ts +106 -0
- package/src/components/markdown/markdown.styles.ts +178 -0
- package/src/components/markdown/markdown.ts +170 -0
- package/src/components/markdown/parser.ts +549 -0
- package/src/components/markdown/render.ts +199 -0
- package/src/components/menu/menu.ts +88 -18
- package/src/components/metadata-list/metadata-item.ts +55 -0
- package/src/components/metadata-list/metadata-list.ts +186 -0
- package/src/components/mobile-nav/mobile-nav.styles.ts +57 -0
- package/src/components/mobile-nav/mobile-nav.ts +190 -0
- package/src/components/more-menu/more-menu.styles.ts +50 -0
- package/src/components/more-menu/more-menu.ts +75 -0
- package/src/components/multi-select/multi-select.styles.ts +27 -0
- package/src/components/multi-select/multi-select.ts +702 -0
- package/src/components/number-input/number-format.ts +129 -0
- package/src/components/number-input/number-input.styles.ts +108 -0
- package/src/components/number-input/number-input.ts +583 -0
- package/src/components/outline/outline.styles.ts +92 -0
- package/src/components/outline/outline.ts +356 -0
- package/src/components/overflow-list/overflow-list.styles.ts +112 -0
- package/src/components/overflow-list/overflow-list.ts +243 -0
- package/src/components/pagination/pagination.ts +2 -2
- package/src/components/radio-group/radio-group.ts +11 -3
- package/src/components/radio-group/radio.ts +18 -7
- package/src/components/radio-list/radio-list.styles.ts +81 -0
- package/src/components/radio-list/radio-list.ts +38 -0
- package/src/components/resize-handle/resize-handle.ts +405 -0
- package/src/components/scroll-area/scroll-area.ts +214 -0
- package/src/components/section/section.ts +115 -0
- package/src/components/segmented-control/segmented-control.styles.ts +149 -0
- package/src/components/segmented-control/segmented-control.ts +225 -0
- package/src/components/selectable-card/selectable-card.styles.ts +166 -0
- package/src/components/selectable-card/selectable-card.ts +144 -0
- package/src/components/shared/calendar-picker.ts +192 -0
- package/src/components/shared/date-check.ts +61 -0
- package/src/components/shared/date-field.styles.ts +158 -0
- package/src/components/shared/date-strings.ts +90 -0
- package/src/components/shared/date-utils.ts +376 -0
- package/src/components/shared/heading-tag.ts +35 -0
- package/src/components/shared/host-aria.ts +59 -0
- package/src/components/shared/indic.ts +35 -0
- package/src/components/shared/layout.ts +45 -0
- package/src/components/shared/status-icons.ts +29 -0
- package/src/components/shared/strings.ts +35 -0
- package/src/components/side-nav/side-nav.styles.ts +446 -0
- package/src/components/side-nav/side-nav.ts +472 -0
- package/src/components/stack/stack.ts +152 -0
- package/src/components/status-dot/status-dot.ts +158 -0
- package/src/components/stepper/stepper.styles.ts +221 -0
- package/src/components/stepper/stepper.ts +300 -0
- package/src/components/tab-menu/tab-menu.styles.ts +127 -0
- package/src/components/tab-menu/tab-menu.ts +75 -0
- package/src/components/table/sort.ts +45 -0
- package/src/components/table/table.styles.ts +202 -0
- package/src/components/table/table.ts +405 -23
- package/src/components/text/text.styles.ts +107 -0
- package/src/components/text/text.ts +103 -0
- package/src/components/thumbnail/thumbnail.ts +234 -0
- package/src/components/time-input/time-input.ts +347 -0
- package/src/components/timer/timer.styles.ts +34 -0
- package/src/components/timer/timer.ts +255 -0
- package/src/components/timestamp/timestamp.ts +262 -0
- package/src/components/toggle-button-group/toggle-button-group.ts +263 -0
- package/src/components/token/token.styles.ts +117 -0
- package/src/components/token/token.ts +131 -0
- package/src/components/tokenizer/tokenizer.styles.ts +122 -0
- package/src/components/tokenizer/tokenizer.ts +817 -0
- package/src/components/toolbar/toolbar.ts +176 -0
- package/src/components/top-nav/top-nav.styles.ts +271 -0
- package/src/components/top-nav/top-nav.ts +296 -0
- package/src/components/tree-list/tree-list.styles.ts +172 -0
- package/src/components/tree-list/tree-list.ts +580 -0
- package/src/components/typeahead/typeahead.ts +95 -0
- package/src/context-menu.ts +10 -0
- package/src/date-input.ts +9 -0
- package/src/date-range-input.ts +9 -0
- package/src/date-time-input.ts +9 -0
- package/src/empty-state.ts +9 -0
- package/src/file-input.ts +9 -0
- package/src/form-layout.ts +9 -0
- package/src/grid-item.ts +9 -0
- package/src/grid.ts +12 -0
- package/src/heading.ts +9 -0
- package/src/hover-card.ts +9 -0
- package/src/icon.ts +10 -0
- package/src/index.ts +77 -0
- package/src/info-tip.ts +9 -0
- package/src/input-group.ts +9 -0
- package/src/internal/autoload.ts +93 -0
- package/src/kbd.ts +9 -0
- package/src/lightbox.ts +9 -0
- package/src/list-item.ts +5 -0
- package/src/list.ts +12 -0
- package/src/markdown.ts +9 -0
- package/src/metadata-item.ts +5 -0
- package/src/metadata-list.ts +12 -0
- package/src/mobile-nav.ts +11 -0
- package/src/more-menu.ts +10 -0
- package/src/multi-select.ts +10 -0
- package/src/number-input.ts +9 -0
- package/src/outline.ts +9 -0
- package/src/overflow-list.ts +9 -0
- package/src/radio-list.ts +12 -0
- package/src/resize-handle.ts +9 -0
- package/src/scroll-area.ts +9 -0
- package/src/section.ts +9 -0
- package/src/segmented-control-item.ts +5 -0
- package/src/segmented-control.ts +13 -0
- package/src/selectable-card.ts +9 -0
- package/src/side-nav-heading.ts +5 -0
- package/src/side-nav-item.ts +5 -0
- package/src/side-nav-section.ts +5 -0
- package/src/side-nav.ts +18 -0
- package/src/stack.ts +9 -0
- package/src/status-dot.ts +9 -0
- package/src/step.ts +5 -0
- package/src/stepper.ts +10 -0
- package/src/tab-menu.ts +9 -0
- package/src/text.ts +9 -0
- package/src/thumbnail.ts +9 -0
- package/src/time-input.ts +9 -0
- package/src/timer.ts +9 -0
- package/src/timestamp.ts +9 -0
- package/src/toggle-button-group.ts +9 -0
- package/src/token.ts +9 -0
- package/src/tokenizer.ts +10 -0
- package/src/toolbar.ts +9 -0
- package/src/top-nav-item.ts +5 -0
- package/src/top-nav-menu.ts +5 -0
- package/src/top-nav.ts +11 -0
- package/src/tree-item.ts +5 -0
- package/src/tree-list.ts +10 -0
- package/src/typeahead.ts +9 -0
|
@@ -0,0 +1,559 @@
|
|
|
1
|
+
import { html, nothing, svg, type PropertyValues, type TemplateResult } from 'lit';
|
|
2
|
+
import { classMap } from 'lit/directives/class-map.js';
|
|
3
|
+
import { UndElement } from '../../base/UndElement.js';
|
|
4
|
+
import { LocaleDirController } from '../../controllers/locale-dir.js';
|
|
5
|
+
import { getDateStrings } from '../shared/date-strings.js';
|
|
6
|
+
import {
|
|
7
|
+
addDays,
|
|
8
|
+
addMonths,
|
|
9
|
+
clampDate,
|
|
10
|
+
compareDates,
|
|
11
|
+
daysInMonth,
|
|
12
|
+
firstDayOfWeek,
|
|
13
|
+
formatDayNumber,
|
|
14
|
+
formatFullDate,
|
|
15
|
+
formatMonthYear,
|
|
16
|
+
parseIso,
|
|
17
|
+
resolveLocale,
|
|
18
|
+
sameDate,
|
|
19
|
+
today as localToday,
|
|
20
|
+
toIso,
|
|
21
|
+
weekday,
|
|
22
|
+
weekdayName,
|
|
23
|
+
type YMD,
|
|
24
|
+
} from '../shared/date-utils.js';
|
|
25
|
+
import { calendarStyles } from './calendar.styles.js';
|
|
26
|
+
|
|
27
|
+
export type CalendarMode = 'single' | 'range';
|
|
28
|
+
|
|
29
|
+
export interface CalendarChangeDetail {
|
|
30
|
+
/** Selected date (`YYYY-MM-DD`) in single mode, otherwise empty. */
|
|
31
|
+
value: string;
|
|
32
|
+
/** Range start in range mode, otherwise empty. */
|
|
33
|
+
start: string;
|
|
34
|
+
/** Range end in range mode; empty while only the start is chosen. */
|
|
35
|
+
end: string;
|
|
36
|
+
/** In range mode: both ends are chosen. Always true in single mode. */
|
|
37
|
+
complete: boolean;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
interface RenderContext {
|
|
41
|
+
locale: string;
|
|
42
|
+
today: YMD;
|
|
43
|
+
single: YMD | null;
|
|
44
|
+
from: YMD | null;
|
|
45
|
+
to: YMD | null;
|
|
46
|
+
/** The end is the pointer or focus position, not a chosen date. */
|
|
47
|
+
preview: boolean;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const monthIndex = (ymd: YMD): number => ymd.y * 12 + ymd.m;
|
|
51
|
+
const firstOfMonth = (ymd: YMD): YMD => ({ y: ymd.y, m: ymd.m, d: 1 });
|
|
52
|
+
|
|
53
|
+
const chevron = (direction: 'previous' | 'next'): TemplateResult =>
|
|
54
|
+
svg`<svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="${direction === 'previous' ? 'm15 18-6-6 6-6' : 'm9 18 6-6-6-6'}"/></svg>`;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* A month grid for choosing a date or a date range, following the WAI-ARIA
|
|
58
|
+
* date picker grid pattern: a `grid` of day buttons with one tab stop and a
|
|
59
|
+
* roving focus. Arrow keys move by day and week, Home and End jump to the
|
|
60
|
+
* start and end of the week, Page Up and Page Down move by month (with Shift,
|
|
61
|
+
* by year), and Enter or Space selects. Day and month names and the first day
|
|
62
|
+
* of the week come from `Intl` for the current locale, and right-to-left
|
|
63
|
+
* layouts mirror the arrow keys.
|
|
64
|
+
*
|
|
65
|
+
* Dates are `YYYY-MM-DD` strings and are never converted between time zones.
|
|
66
|
+
*
|
|
67
|
+
* @summary A month grid for choosing a date or a date range.
|
|
68
|
+
* @tag und-calendar
|
|
69
|
+
*
|
|
70
|
+
* @fires {CustomEvent<CalendarChangeDetail>} und-change - A date was chosen. In range mode it fires after each of the two clicks.
|
|
71
|
+
* @fires {CustomEvent<{ year: number; month: number }>} und-view-change - The first visible month changed.
|
|
72
|
+
*
|
|
73
|
+
* @cssprop [--und-calendar-day-size] - Width and height of a day (at least 44px on coarse pointers).
|
|
74
|
+
*
|
|
75
|
+
* @csspart none - The calendar is styled with custom properties.
|
|
76
|
+
*/
|
|
77
|
+
export class UndCalendar extends UndElement {
|
|
78
|
+
static override tagName = 'und-calendar';
|
|
79
|
+
static override styles = calendarStyles;
|
|
80
|
+
|
|
81
|
+
static override properties = {
|
|
82
|
+
mode: { reflect: true },
|
|
83
|
+
value: { reflect: true },
|
|
84
|
+
start: { reflect: true },
|
|
85
|
+
end: { reflect: true },
|
|
86
|
+
min: { reflect: true },
|
|
87
|
+
max: { reflect: true },
|
|
88
|
+
months: { type: Number, reflect: true },
|
|
89
|
+
locale: { reflect: true },
|
|
90
|
+
weekStart: { type: Number, attribute: 'week-start' },
|
|
91
|
+
hideOutsideDays: { type: Boolean, attribute: 'hide-outside-days', reflect: true },
|
|
92
|
+
today: {},
|
|
93
|
+
isDateDisabled: { attribute: false },
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* `single` selects one date, `range` selects a start and an end.
|
|
98
|
+
* @attr mode
|
|
99
|
+
*/
|
|
100
|
+
declare mode: CalendarMode;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Selected date in single mode, `YYYY-MM-DD`.
|
|
104
|
+
* @attr value
|
|
105
|
+
*/
|
|
106
|
+
declare value: string;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Range start in range mode, `YYYY-MM-DD`.
|
|
110
|
+
* @attr start
|
|
111
|
+
*/
|
|
112
|
+
declare start: string;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Range end in range mode, `YYYY-MM-DD`.
|
|
116
|
+
* @attr end
|
|
117
|
+
*/
|
|
118
|
+
declare end: string;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Earliest selectable date, `YYYY-MM-DD`.
|
|
122
|
+
* @attr min
|
|
123
|
+
*/
|
|
124
|
+
declare min: string | undefined;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Latest selectable date, `YYYY-MM-DD`.
|
|
128
|
+
* @attr max
|
|
129
|
+
*/
|
|
130
|
+
declare max: string | undefined;
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Number of months shown side by side (1 to 3).
|
|
134
|
+
* @attr months
|
|
135
|
+
*/
|
|
136
|
+
declare months: number;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* BCP 47 tag for names and week data. Defaults to the language of the page.
|
|
140
|
+
* @attr locale
|
|
141
|
+
*/
|
|
142
|
+
declare locale: string | undefined;
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* First day of the week, 0 (Sunday) to 6 (Saturday). Defaults to the locale's.
|
|
146
|
+
* @attr week-start
|
|
147
|
+
*/
|
|
148
|
+
declare weekStart: number | undefined;
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Hides the days of neighbouring months (always hidden with more than one month).
|
|
152
|
+
* @attr hide-outside-days
|
|
153
|
+
*/
|
|
154
|
+
declare hideOutsideDays: boolean;
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Overrides "today" (`YYYY-MM-DD`), for tests and server rendering.
|
|
158
|
+
* @attr today
|
|
159
|
+
*/
|
|
160
|
+
declare today: string | undefined;
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Return `true` for a date that cannot be chosen. Receives `YYYY-MM-DD`.
|
|
164
|
+
* Disabled days stay reachable by keyboard and are exposed as `aria-disabled`.
|
|
165
|
+
*/
|
|
166
|
+
declare isDateDisabled: ((date: string) => boolean) | undefined;
|
|
167
|
+
|
|
168
|
+
// Internal view state. Plain fields with a re-render on write, so that they stay
|
|
169
|
+
// out of the public attribute list of the Custom Elements Manifest.
|
|
170
|
+
#view: YMD = firstOfMonth(localToday());
|
|
171
|
+
#focus: YMD = localToday();
|
|
172
|
+
#hover = '';
|
|
173
|
+
#viewShown: YMD | undefined;
|
|
174
|
+
|
|
175
|
+
/** @internal */
|
|
176
|
+
protected get _view(): YMD {
|
|
177
|
+
return this.#view;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
protected set _view(value: YMD) {
|
|
181
|
+
this.#view = value;
|
|
182
|
+
this.requestUpdate();
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/** @internal */
|
|
186
|
+
protected get _focus(): YMD {
|
|
187
|
+
return this.#focus;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
protected set _focus(value: YMD) {
|
|
191
|
+
this.#focus = value;
|
|
192
|
+
this.requestUpdate();
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/** @internal */
|
|
196
|
+
protected get _hover(): string {
|
|
197
|
+
return this.#hover;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
protected set _hover(value: string) {
|
|
201
|
+
this.#hover = value;
|
|
202
|
+
this.requestUpdate();
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
#locale = new LocaleDirController(this);
|
|
206
|
+
#ready = false;
|
|
207
|
+
|
|
208
|
+
constructor() {
|
|
209
|
+
super();
|
|
210
|
+
this.mode = 'single';
|
|
211
|
+
this.value = '';
|
|
212
|
+
this.start = '';
|
|
213
|
+
this.end = '';
|
|
214
|
+
this.months = 1;
|
|
215
|
+
this.hideOutsideDays = false;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/** Moves focus to the focused day, or to the first selectable one in view. */
|
|
219
|
+
async focusDay(): Promise<void> {
|
|
220
|
+
await this.updateComplete;
|
|
221
|
+
this.renderRoot.querySelector<HTMLElement>('.day[tabindex="0"]')?.focus();
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/** Shows the selected date (or today) and makes it the focused day. */
|
|
225
|
+
resetView(): void {
|
|
226
|
+
const selected = parseIso(this.mode === 'range' ? this.start : this.value);
|
|
227
|
+
const [min, max] = this.#bounds();
|
|
228
|
+
this._focus = clampDate(selected ?? this.#today(), min, max);
|
|
229
|
+
this._view = firstOfMonth(this._focus);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
#loc(): string {
|
|
233
|
+
return resolveLocale(this.locale || this.#locale.lang);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
#today(): YMD {
|
|
237
|
+
return parseIso(this.today) ?? localToday();
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
#bounds(): [YMD | null, YMD | null] {
|
|
241
|
+
return [parseIso(this.min), parseIso(this.max)];
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
#count(): number {
|
|
245
|
+
return Math.min(3, Math.max(1, Math.round(this.months) || 1));
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
#disabled(ymd: YMD): boolean {
|
|
249
|
+
const [min, max] = this.#bounds();
|
|
250
|
+
if ((min && compareDates(ymd, min) < 0) || (max && compareDates(ymd, max) > 0)) return true;
|
|
251
|
+
try {
|
|
252
|
+
return Boolean(this.isDateDisabled?.(toIso(ymd)));
|
|
253
|
+
} catch {
|
|
254
|
+
return false;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
protected override willUpdate(changed: PropertyValues<this>): void {
|
|
259
|
+
if (!this.#ready) {
|
|
260
|
+
this.resetView();
|
|
261
|
+
this.#ready = true;
|
|
262
|
+
} else if (changed.has('value') || changed.has('start')) {
|
|
263
|
+
if (parseIso(this.mode === 'range' ? this.start : this.value)) this.resetView();
|
|
264
|
+
} else if (changed.has('min') || changed.has('max')) {
|
|
265
|
+
const [min, max] = this.#bounds();
|
|
266
|
+
this._focus = clampDate(this._focus, min, max);
|
|
267
|
+
}
|
|
268
|
+
if (changed.has('months') || changed.has('mode')) this.#showFocus();
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
protected override updated(): void {
|
|
272
|
+
const shown = this.#viewShown;
|
|
273
|
+
this.#viewShown = this.#view;
|
|
274
|
+
if (shown && monthIndex(shown) !== monthIndex(this.#view)) {
|
|
275
|
+
this.emit('und-view-change', { year: this.#view.y, month: this.#view.m });
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
/** Scrolls the visible months so that the focused date is in view. */
|
|
280
|
+
#showFocus(): void {
|
|
281
|
+
const count = this.#count();
|
|
282
|
+
const first = monthIndex(this._view);
|
|
283
|
+
const at = monthIndex(this._focus);
|
|
284
|
+
if (at < first) this._view = firstOfMonth(this._focus);
|
|
285
|
+
else if (at > first + count - 1) this._view = firstOfMonth(addMonths(this._focus, 1 - count));
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
#moveFocus(target: YMD): void {
|
|
289
|
+
const [min, max] = this.#bounds();
|
|
290
|
+
this._focus = clampDate(target, min, max);
|
|
291
|
+
this.#showFocus();
|
|
292
|
+
if (this.mode === 'range' && this.start && !this.end) this._hover = toIso(this._focus);
|
|
293
|
+
void this.focusDay();
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
#step(delta: number): void {
|
|
297
|
+
const view = addMonths(this._view, delta);
|
|
298
|
+
const [min, max] = this.#bounds();
|
|
299
|
+
if (
|
|
300
|
+
(delta < 0 && min && monthIndex(view) < monthIndex(min)) ||
|
|
301
|
+
(delta > 0 && max && monthIndex(addMonths(view, this.#count() - 1)) > monthIndex(max))
|
|
302
|
+
) {
|
|
303
|
+
return;
|
|
304
|
+
}
|
|
305
|
+
this._view = view;
|
|
306
|
+
const first = monthIndex(view);
|
|
307
|
+
const at = monthIndex(this._focus);
|
|
308
|
+
if (at < first || at > first + this.#count() - 1) {
|
|
309
|
+
this._focus = clampDate(addMonths(this._focus, delta), min, max);
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
#select(ymd: YMD): void {
|
|
314
|
+
if (this.#disabled(ymd)) return;
|
|
315
|
+
this._focus = ymd;
|
|
316
|
+
const iso = toIso(ymd);
|
|
317
|
+
if (this.mode === 'range') {
|
|
318
|
+
const first = parseIso(this.start);
|
|
319
|
+
if (!first || this.end) {
|
|
320
|
+
this.start = iso;
|
|
321
|
+
this.end = '';
|
|
322
|
+
} else if (compareDates(ymd, first) < 0) {
|
|
323
|
+
this.end = this.start;
|
|
324
|
+
this.start = iso;
|
|
325
|
+
} else {
|
|
326
|
+
this.end = iso;
|
|
327
|
+
}
|
|
328
|
+
this._hover = '';
|
|
329
|
+
this.#showFocus();
|
|
330
|
+
this.emit<CalendarChangeDetail>('und-change', {
|
|
331
|
+
value: '',
|
|
332
|
+
start: this.start,
|
|
333
|
+
end: this.end,
|
|
334
|
+
complete: Boolean(this.end),
|
|
335
|
+
});
|
|
336
|
+
return;
|
|
337
|
+
}
|
|
338
|
+
this.value = iso;
|
|
339
|
+
this.#showFocus();
|
|
340
|
+
this.emit<CalendarChangeDetail>('und-change', {
|
|
341
|
+
value: iso,
|
|
342
|
+
start: '',
|
|
343
|
+
end: '',
|
|
344
|
+
complete: true,
|
|
345
|
+
});
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
#dayOf(event: Event): YMD | null {
|
|
349
|
+
const button = event
|
|
350
|
+
.composedPath()
|
|
351
|
+
.find(
|
|
352
|
+
(node): node is HTMLElement =>
|
|
353
|
+
node instanceof HTMLElement && node.dataset.date !== undefined,
|
|
354
|
+
);
|
|
355
|
+
return parseIso(button?.dataset.date);
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
#onClick = (event: Event): void => {
|
|
359
|
+
const day = this.#dayOf(event);
|
|
360
|
+
if (day) this.#select(day);
|
|
361
|
+
};
|
|
362
|
+
|
|
363
|
+
#onPointerOver = (event: Event): void => {
|
|
364
|
+
if (this.mode !== 'range' || !this.start || this.end) return;
|
|
365
|
+
const day = this.#dayOf(event);
|
|
366
|
+
if (day) this._hover = toIso(day);
|
|
367
|
+
};
|
|
368
|
+
|
|
369
|
+
#onKeydown = (event: KeyboardEvent): void => {
|
|
370
|
+
if (event.altKey || event.ctrlKey || event.metaKey) return;
|
|
371
|
+
const from = this.#dayOf(event);
|
|
372
|
+
if (!from) return;
|
|
373
|
+
const rtl = this.#locale.isRtl;
|
|
374
|
+
const firstDay = this.weekStart ?? firstDayOfWeek(this.#loc());
|
|
375
|
+
const offset = (weekday(from) - firstDay + 7) % 7;
|
|
376
|
+
let target: YMD | undefined;
|
|
377
|
+
switch (event.key) {
|
|
378
|
+
case 'ArrowLeft':
|
|
379
|
+
target = addDays(from, rtl ? 1 : -1);
|
|
380
|
+
break;
|
|
381
|
+
case 'ArrowRight':
|
|
382
|
+
target = addDays(from, rtl ? -1 : 1);
|
|
383
|
+
break;
|
|
384
|
+
case 'ArrowUp':
|
|
385
|
+
target = addDays(from, -7);
|
|
386
|
+
break;
|
|
387
|
+
case 'ArrowDown':
|
|
388
|
+
target = addDays(from, 7);
|
|
389
|
+
break;
|
|
390
|
+
case 'Home':
|
|
391
|
+
target = addDays(from, -offset);
|
|
392
|
+
break;
|
|
393
|
+
case 'End':
|
|
394
|
+
target = addDays(from, 6 - offset);
|
|
395
|
+
break;
|
|
396
|
+
case 'PageUp':
|
|
397
|
+
target = addMonths(from, event.shiftKey ? -12 : -1);
|
|
398
|
+
break;
|
|
399
|
+
case 'PageDown':
|
|
400
|
+
target = addMonths(from, event.shiftKey ? 12 : 1);
|
|
401
|
+
break;
|
|
402
|
+
default:
|
|
403
|
+
return;
|
|
404
|
+
}
|
|
405
|
+
event.preventDefault();
|
|
406
|
+
this.#moveFocus(target);
|
|
407
|
+
};
|
|
408
|
+
|
|
409
|
+
protected override render(): TemplateResult {
|
|
410
|
+
const locale = this.#loc();
|
|
411
|
+
const count = this.#count();
|
|
412
|
+
const strings = getDateStrings();
|
|
413
|
+
const [min, max] = this.#bounds();
|
|
414
|
+
const view = this._view;
|
|
415
|
+
const last = addMonths(view, count - 1);
|
|
416
|
+
const previousDisabled = Boolean(min && monthIndex(view) <= monthIndex(min));
|
|
417
|
+
const nextDisabled = Boolean(max && monthIndex(last) >= monthIndex(max));
|
|
418
|
+
const context = this.#context(locale);
|
|
419
|
+
const previous = html`<button
|
|
420
|
+
type="button"
|
|
421
|
+
class="nav"
|
|
422
|
+
aria-label=${strings.previousMonth}
|
|
423
|
+
aria-disabled=${previousDisabled ? 'true' : 'false'}
|
|
424
|
+
@click=${() => this.#step(-1)}
|
|
425
|
+
>
|
|
426
|
+
${chevron('previous')}
|
|
427
|
+
</button>`;
|
|
428
|
+
const next = html`<button
|
|
429
|
+
type="button"
|
|
430
|
+
class="nav"
|
|
431
|
+
aria-label=${strings.nextMonth}
|
|
432
|
+
aria-disabled=${nextDisabled ? 'true' : 'false'}
|
|
433
|
+
@click=${() => this.#step(1)}
|
|
434
|
+
>
|
|
435
|
+
${chevron('next')}
|
|
436
|
+
</button>`;
|
|
437
|
+
const spacer = html`<span class="spacer"></span>`;
|
|
438
|
+
const months = Array.from({ length: count }, (_, index) => {
|
|
439
|
+
const month = addMonths(view, index);
|
|
440
|
+
return html`<div class="month">
|
|
441
|
+
<div class="head">
|
|
442
|
+
${index === 0 ? previous : spacer}
|
|
443
|
+
<h2 class="heading" id="h${index}" aria-live="polite" aria-atomic="true">
|
|
444
|
+
${formatMonthYear(locale, month.y, month.m)}
|
|
445
|
+
</h2>
|
|
446
|
+
${index === count - 1 ? next : spacer}
|
|
447
|
+
</div>
|
|
448
|
+
${this.#renderGrid(month, index, context, count > 1)}
|
|
449
|
+
</div>`;
|
|
450
|
+
});
|
|
451
|
+
return html`<div
|
|
452
|
+
class=${classMap({ months: true, rtl: this.#locale.isRtl })}
|
|
453
|
+
@click=${this.#onClick}
|
|
454
|
+
@keydown=${this.#onKeydown}
|
|
455
|
+
@pointerover=${this.#onPointerOver}
|
|
456
|
+
>
|
|
457
|
+
${months}
|
|
458
|
+
</div>`;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
#context(locale: string): RenderContext {
|
|
462
|
+
let from = parseIso(this.start);
|
|
463
|
+
let to = parseIso(this.end);
|
|
464
|
+
let preview = false;
|
|
465
|
+
if (this.mode === 'range' && from && !to) {
|
|
466
|
+
to = parseIso(this._hover);
|
|
467
|
+
preview = Boolean(to);
|
|
468
|
+
}
|
|
469
|
+
if (from && to && compareDates(from, to) > 0) [from, to] = [to, from];
|
|
470
|
+
return {
|
|
471
|
+
locale,
|
|
472
|
+
today: this.#today(),
|
|
473
|
+
single: parseIso(this.value),
|
|
474
|
+
from: this.mode === 'range' ? from : null,
|
|
475
|
+
to: this.mode === 'range' ? to : null,
|
|
476
|
+
preview,
|
|
477
|
+
};
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
#renderGrid(
|
|
481
|
+
month: YMD,
|
|
482
|
+
index: number,
|
|
483
|
+
context: RenderContext,
|
|
484
|
+
multiple: boolean,
|
|
485
|
+
): TemplateResult {
|
|
486
|
+
const { locale } = context;
|
|
487
|
+
const firstDay = this.weekStart ?? firstDayOfWeek(locale);
|
|
488
|
+
const hideOutside = this.hideOutsideDays || multiple;
|
|
489
|
+
const offset = (weekday(month) - firstDay + 7) % 7;
|
|
490
|
+
const rows = hideOutside ? Math.ceil((offset + daysInMonth(month.y, month.m)) / 7) : 6;
|
|
491
|
+
const first = addDays(month, -offset);
|
|
492
|
+
const names = Array.from({ length: 7 }, (_, i) => (firstDay + i) % 7);
|
|
493
|
+
return html`<table role="grid" aria-labelledby="h${index}">
|
|
494
|
+
<thead>
|
|
495
|
+
<tr>
|
|
496
|
+
${names.map(
|
|
497
|
+
(dow) =>
|
|
498
|
+
html`<th scope="col" abbr=${weekdayName(locale, dow, 'long')}>
|
|
499
|
+
${weekdayName(locale, dow, 'short')}
|
|
500
|
+
</th>`,
|
|
501
|
+
)}
|
|
502
|
+
</tr>
|
|
503
|
+
</thead>
|
|
504
|
+
<tbody>
|
|
505
|
+
${Array.from({ length: rows }, (_, row) => {
|
|
506
|
+
const cells = Array.from({ length: 7 }, (_, column) => {
|
|
507
|
+
const day = addDays(first, row * 7 + column);
|
|
508
|
+
const outside = day.m !== month.m;
|
|
509
|
+
if (outside && hideOutside) return html`<td role="gridcell" aria-hidden="true"></td>`;
|
|
510
|
+
return this.#renderDay(day, outside, context);
|
|
511
|
+
});
|
|
512
|
+
return html`<tr>
|
|
513
|
+
${cells}
|
|
514
|
+
</tr>`;
|
|
515
|
+
})}
|
|
516
|
+
</tbody>
|
|
517
|
+
</table>`;
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
#renderDay(day: YMD, outside: boolean, context: RenderContext): TemplateResult {
|
|
521
|
+
const { from, to, preview } = context;
|
|
522
|
+
const isEdge =
|
|
523
|
+
this.mode === 'range'
|
|
524
|
+
? sameDate(day, from) || (!preview && sameDate(day, to))
|
|
525
|
+
: sameDate(day, context.single);
|
|
526
|
+
const between = Boolean(from && to && compareDates(day, from) > 0 && compareDates(day, to) < 0);
|
|
527
|
+
const previewEnd = preview && sameDate(day, to) && !sameDate(day, from);
|
|
528
|
+
const disabled = this.#disabled(day);
|
|
529
|
+
const isToday = sameDate(day, context.today);
|
|
530
|
+
const tabStop = !outside && sameDate(day, this._focus);
|
|
531
|
+
const selected = isEdge || (between && !preview);
|
|
532
|
+
return html`<td role="gridcell" aria-selected=${selected ? 'true' : 'false'}>
|
|
533
|
+
<button
|
|
534
|
+
type="button"
|
|
535
|
+
class=${classMap({
|
|
536
|
+
day: true,
|
|
537
|
+
outside,
|
|
538
|
+
today: isToday,
|
|
539
|
+
selected: isEdge && !previewEnd,
|
|
540
|
+
'in-range': between || previewEnd,
|
|
541
|
+
disabled,
|
|
542
|
+
})}
|
|
543
|
+
data-date=${toIso(day)}
|
|
544
|
+
tabindex=${tabStop ? '0' : '-1'}
|
|
545
|
+
aria-label=${formatFullDate(context.locale, day)}
|
|
546
|
+
aria-current=${isToday ? 'date' : nothing}
|
|
547
|
+
aria-disabled=${disabled ? 'true' : nothing}
|
|
548
|
+
>
|
|
549
|
+
${formatDayNumber(context.locale, day.d)}
|
|
550
|
+
</button>
|
|
551
|
+
</td>`;
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
declare global {
|
|
556
|
+
interface HTMLElementTagNameMap {
|
|
557
|
+
'und-calendar': UndCalendar;
|
|
558
|
+
}
|
|
559
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { css, html, nothing, type TemplateResult } from 'lit';
|
|
1
|
+
import { css, html, nothing, type CSSResultGroup, type TemplateResult } from 'lit';
|
|
2
2
|
import { UndElement } from '../../base/UndElement.js';
|
|
3
3
|
import { linkRel, safeHref } from '../../utils/safe-url.js';
|
|
4
4
|
|
|
@@ -44,7 +44,7 @@ export class UndCard extends UndElement {
|
|
|
44
44
|
rel: {},
|
|
45
45
|
};
|
|
46
46
|
|
|
47
|
-
static override styles = css`
|
|
47
|
+
static override styles: CSSResultGroup = css`
|
|
48
48
|
@layer und.components {
|
|
49
49
|
:host {
|
|
50
50
|
display: block;
|
|
@@ -258,11 +258,30 @@ export class UndCard extends UndElement {
|
|
|
258
258
|
return this.#slots.split(' ').includes(name);
|
|
259
259
|
}
|
|
260
260
|
|
|
261
|
+
/** Whether the card acts as one control (subclasses add a button mode). */
|
|
262
|
+
protected isInteractive(href: string | undefined): boolean {
|
|
263
|
+
return href !== undefined;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/** Wraps the heading in the card's one real control (a link with `href`). */
|
|
267
|
+
protected renderControl(href: string | undefined, heading: TemplateResult): TemplateResult {
|
|
268
|
+
return href !== undefined
|
|
269
|
+
? html`<a
|
|
270
|
+
part="link"
|
|
271
|
+
class="link"
|
|
272
|
+
href=${href}
|
|
273
|
+
target=${this.target || nothing}
|
|
274
|
+
rel=${linkRel(this.target, this.rel) ?? nothing}
|
|
275
|
+
>${heading}</a
|
|
276
|
+
>`
|
|
277
|
+
: heading;
|
|
278
|
+
}
|
|
279
|
+
|
|
261
280
|
protected override render(): TemplateResult {
|
|
262
281
|
const level = Math.min(Math.max(Math.round(this.headingLevel) || 3, 1), 6);
|
|
263
282
|
const href = safeHref(this.href);
|
|
264
283
|
const heading = html`<slot name="heading" @slotchange=${this.#onSlotChange}></slot>`;
|
|
265
|
-
return html`<div part="base" class="card ${href
|
|
284
|
+
return html`<div part="base" class="card ${this.isInteractive(href) ? 'interactive' : ''}">
|
|
266
285
|
<div part="media" class="media ${this.#has('media') ? '' : 'empty'}">
|
|
267
286
|
<slot name="media" @slotchange=${this.#onSlotChange}></slot>
|
|
268
287
|
</div>
|
|
@@ -273,18 +292,7 @@ export class UndCard extends UndElement {
|
|
|
273
292
|
role=${this.#nativeHeading ? nothing : 'heading'}
|
|
274
293
|
aria-level=${this.#nativeHeading ? nothing : level}
|
|
275
294
|
>
|
|
276
|
-
${
|
|
277
|
-
href !== undefined
|
|
278
|
-
? html`<a
|
|
279
|
-
part="link"
|
|
280
|
-
class="link"
|
|
281
|
-
href=${href}
|
|
282
|
-
target=${this.target || nothing}
|
|
283
|
-
rel=${linkRel(this.target, this.rel) ?? nothing}
|
|
284
|
-
>${heading}</a
|
|
285
|
-
>`
|
|
286
|
-
: heading
|
|
287
|
-
}
|
|
295
|
+
${this.renderControl(href, heading)}
|
|
288
296
|
</div>
|
|
289
297
|
</div>
|
|
290
298
|
<div part="body" class="body ${this.#has('body') ? '' : 'empty'}">
|