@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,173 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Shadow styles for `und-command-palette`, on top of the dialog styles: a
|
|
5
|
+
* search row, the command list, an empty state and footer hints.
|
|
6
|
+
*/
|
|
7
|
+
export const commandPaletteStyles = css`
|
|
8
|
+
@layer und.components {
|
|
9
|
+
:host {
|
|
10
|
+
--und-dialog-width: var(--und-command-palette-width, 36rem);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.dialog {
|
|
14
|
+
margin-block: min(15dvh, 6rem) auto;
|
|
15
|
+
max-block-size: min(32rem, calc(100dvh - 2rem));
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.visually-hidden {
|
|
19
|
+
position: absolute;
|
|
20
|
+
inline-size: 1px;
|
|
21
|
+
block-size: 1px;
|
|
22
|
+
margin: -1px;
|
|
23
|
+
padding: 0;
|
|
24
|
+
overflow: hidden;
|
|
25
|
+
border: 0;
|
|
26
|
+
clip-path: inset(50%);
|
|
27
|
+
white-space: nowrap;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.search {
|
|
31
|
+
display: flex;
|
|
32
|
+
gap: var(--und-space-3, 0.75rem);
|
|
33
|
+
align-items: center;
|
|
34
|
+
padding-block: var(--und-space-3, 0.75rem);
|
|
35
|
+
padding-inline: var(--und-space-4, 1rem);
|
|
36
|
+
border-block-end: var(--und-border-width, 1px) solid var(--und-border-subtle, #d9dbe3);
|
|
37
|
+
color: var(--und-fg-muted, #4b5060);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.search svg {
|
|
41
|
+
flex: none;
|
|
42
|
+
inline-size: 1.25rem;
|
|
43
|
+
block-size: 1.25rem;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.input {
|
|
47
|
+
flex: 1 1 auto;
|
|
48
|
+
min-inline-size: 0;
|
|
49
|
+
padding: var(--und-space-1, 0.25rem);
|
|
50
|
+
border: 0;
|
|
51
|
+
background: transparent;
|
|
52
|
+
color: var(--und-fg-default, #1b1d26);
|
|
53
|
+
font: inherit;
|
|
54
|
+
font-size: 1rem;
|
|
55
|
+
outline: none;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.input::placeholder {
|
|
59
|
+
color: var(--und-fg-muted, #4b5060);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.search:focus-within {
|
|
63
|
+
outline: var(--und-focus-ring-width, 2px) solid var(--und-focus-ring-color, #1f4fd1);
|
|
64
|
+
outline-offset: calc(-1 * var(--und-focus-ring-width, 2px));
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.list {
|
|
68
|
+
flex: 1 1 auto;
|
|
69
|
+
min-block-size: 0;
|
|
70
|
+
padding: var(--und-space-2, 0.5rem);
|
|
71
|
+
overflow: auto;
|
|
72
|
+
overscroll-behavior: contain;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.group-label {
|
|
76
|
+
padding-block: var(--und-space-2, 0.5rem) var(--und-space-1, 0.25rem);
|
|
77
|
+
padding-inline: var(--und-space-2, 0.5rem);
|
|
78
|
+
color: var(--und-fg-muted, #4b5060);
|
|
79
|
+
font-size: 0.75rem;
|
|
80
|
+
font-weight: var(--und-font-weight-semibold, 600);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.option {
|
|
84
|
+
box-sizing: border-box;
|
|
85
|
+
display: flex;
|
|
86
|
+
gap: var(--und-space-3, 0.75rem);
|
|
87
|
+
align-items: center;
|
|
88
|
+
min-block-size: max(2.5rem, var(--und-target-min, 24px));
|
|
89
|
+
padding-block: var(--und-space-1, 0.25rem);
|
|
90
|
+
padding-inline: var(--und-space-3, 0.75rem);
|
|
91
|
+
border-radius: var(--und-radius-control, 0.375rem);
|
|
92
|
+
cursor: pointer;
|
|
93
|
+
user-select: none;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.option[data-active] {
|
|
97
|
+
background: var(--und-bg-muted-hover, #e4e6ee);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.option[aria-disabled='true'] {
|
|
101
|
+
color: var(--und-fg-disabled, #8b90a0);
|
|
102
|
+
cursor: default;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.label {
|
|
106
|
+
flex: 1 1 auto;
|
|
107
|
+
min-inline-size: 0;
|
|
108
|
+
overflow-wrap: anywhere;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.shortcut {
|
|
112
|
+
flex: none;
|
|
113
|
+
color: var(--und-fg-muted, #4b5060);
|
|
114
|
+
font-family: inherit;
|
|
115
|
+
font-size: 0.8125rem;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.empty {
|
|
119
|
+
padding-block: var(--und-space-6, 1.5rem);
|
|
120
|
+
padding-inline: var(--und-space-4, 1rem);
|
|
121
|
+
color: var(--und-fg-muted, #4b5060);
|
|
122
|
+
text-align: center;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.hints {
|
|
126
|
+
display: flex;
|
|
127
|
+
flex-wrap: wrap;
|
|
128
|
+
gap: var(--und-space-2, 0.5rem) var(--und-space-4, 1rem);
|
|
129
|
+
padding-block: var(--und-space-2, 0.5rem);
|
|
130
|
+
padding-inline: var(--und-space-4, 1rem);
|
|
131
|
+
border-block-start: var(--und-border-width, 1px) solid var(--und-border-subtle, #d9dbe3);
|
|
132
|
+
color: var(--und-fg-muted, #4b5060);
|
|
133
|
+
font-size: 0.8125rem;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.hints kbd {
|
|
137
|
+
padding-inline: var(--und-space-1, 0.25rem);
|
|
138
|
+
border: var(--und-border-width, 1px) solid var(--und-border-subtle, #d9dbe3);
|
|
139
|
+
border-radius: var(--und-radius-sm, 0.25rem);
|
|
140
|
+
font-family: inherit;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
[hidden] {
|
|
144
|
+
display: none;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
@media (pointer: coarse) {
|
|
148
|
+
.option {
|
|
149
|
+
min-block-size: var(--und-target-min-coarse, 44px);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.hints {
|
|
153
|
+
display: none;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
@media (forced-colors: active) {
|
|
158
|
+
.option[data-active] {
|
|
159
|
+
background: Highlight;
|
|
160
|
+
color: HighlightText;
|
|
161
|
+
forced-color-adjust: none;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.option[aria-disabled='true'] {
|
|
165
|
+
color: GrayText;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.search:focus-within {
|
|
169
|
+
outline-color: Highlight;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
`;
|
|
@@ -0,0 +1,486 @@
|
|
|
1
|
+
import { html, nothing, type PropertyValues, type TemplateResult } from 'lit';
|
|
2
|
+
import { LocaleDirController } from '../../controllers/locale-dir.js';
|
|
3
|
+
import { isModalOpen } from '../../internal/overlay.js';
|
|
4
|
+
import { isServer } from '../../utils/ssr-safe.js';
|
|
5
|
+
import { UndDialog } from '../dialog/dialog.js';
|
|
6
|
+
import { dialogStyles } from '../dialog/dialog.styles.js';
|
|
7
|
+
import {
|
|
8
|
+
edgeEnabled,
|
|
9
|
+
indexFromEvent,
|
|
10
|
+
jumpEnabled,
|
|
11
|
+
nextEnabled,
|
|
12
|
+
optionId,
|
|
13
|
+
} from '../listbox/listbox.js';
|
|
14
|
+
import { commandPaletteStyles } from './command-palette.styles.js';
|
|
15
|
+
|
|
16
|
+
/** One command in the palette. */
|
|
17
|
+
export interface PaletteCommand {
|
|
18
|
+
/** Reported by `und-select`. */
|
|
19
|
+
value: string;
|
|
20
|
+
/** The visible name; also searched. */
|
|
21
|
+
label: string;
|
|
22
|
+
/** Heading the command is listed under (consecutive commands share one group). */
|
|
23
|
+
group?: string;
|
|
24
|
+
/** Extra words that find the command ("create" for "New file"). */
|
|
25
|
+
keywords?: string;
|
|
26
|
+
/** Shortcut text shown at the end of the row ("Ctrl+N"). Display only. */
|
|
27
|
+
shortcut?: string;
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Decides whether a command matches the typed text. `collator` compares text
|
|
33
|
+
* for the palette's locale, ignoring case and accents.
|
|
34
|
+
*/
|
|
35
|
+
export type PaletteFilter = (
|
|
36
|
+
command: PaletteCommand,
|
|
37
|
+
query: string,
|
|
38
|
+
collator: Intl.Collator,
|
|
39
|
+
) => boolean;
|
|
40
|
+
|
|
41
|
+
/** Strings the palette shows besides your commands. Replace any of them to translate. */
|
|
42
|
+
export interface PaletteHints {
|
|
43
|
+
navigate: string;
|
|
44
|
+
run: string;
|
|
45
|
+
close: string;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const PAGE_JUMP = 6;
|
|
49
|
+
/** Extra code units a search window may span to absorb ignorable combining marks. */
|
|
50
|
+
const MARK_SLACK = 3;
|
|
51
|
+
|
|
52
|
+
/** True when `text` contains `part`, compared with `collator` (case, accents and punctuation per locale). */
|
|
53
|
+
function containsLoose(text: string, part: string, collator: Intl.Collator): boolean {
|
|
54
|
+
const needle = part.normalize('NFC');
|
|
55
|
+
const haystack = text.normalize('NFC');
|
|
56
|
+
if (!needle) return true;
|
|
57
|
+
// A window may be a little longer than the query: the collator ignores
|
|
58
|
+
// marks such as a nukta or an accent, which add code units.
|
|
59
|
+
for (let start = 0; start < haystack.length; start += 1) {
|
|
60
|
+
for (let extra = 0; extra <= MARK_SLACK; extra += 1) {
|
|
61
|
+
const end = start + needle.length + extra;
|
|
62
|
+
if (end > haystack.length) break;
|
|
63
|
+
if (collator.compare(haystack.slice(start, end), needle) === 0) return true;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* The default filter: every whitespace-separated word of the query must occur
|
|
71
|
+
* in the label or keywords, compared with an `Intl.Collator` (case and accent
|
|
72
|
+
* insensitive, locale aware, so Devanagari and other scripts work).
|
|
73
|
+
*/
|
|
74
|
+
export const defaultPaletteFilter: PaletteFilter = (command, query, collator) => {
|
|
75
|
+
const text = `${command.label} ${command.keywords ?? ''}`;
|
|
76
|
+
return query
|
|
77
|
+
.split(/\s+/)
|
|
78
|
+
.filter(Boolean)
|
|
79
|
+
.every((word) => containsLoose(text, word, collator));
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
/** True when the key event is the combination `combo` ("mod+k", "ctrl+shift+p", "alt+/"). */
|
|
83
|
+
export function matchesCombo(event: KeyboardEvent, combo: string): boolean {
|
|
84
|
+
const parts = combo.toLowerCase().split('+');
|
|
85
|
+
const key = parts.pop();
|
|
86
|
+
if (!key) return false;
|
|
87
|
+
const has = (...names: string[]): boolean => names.some((name) => parts.includes(name));
|
|
88
|
+
const modifier = has('mod')
|
|
89
|
+
? event.ctrlKey || event.metaKey
|
|
90
|
+
: event.ctrlKey === has('ctrl', 'control') && event.metaKey === has('meta', 'cmd');
|
|
91
|
+
return (
|
|
92
|
+
modifier &&
|
|
93
|
+
event.altKey === has('alt', 'option') &&
|
|
94
|
+
event.shiftKey === has('shift') &&
|
|
95
|
+
event.key.toLowerCase() === key
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* A command palette: a modal dialog with a search field and a filtered list of
|
|
101
|
+
* commands, built on `und-dialog` (so it traps focus, locks scrolling and
|
|
102
|
+
* returns focus to what opened it). It follows the WAI-ARIA combobox with a
|
|
103
|
+
* listbox popup: focus stays in the search field, the Up and Down Arrow keys
|
|
104
|
+
* move the active command, Enter runs it and Escape closes the palette.
|
|
105
|
+
*
|
|
106
|
+
* Declare commands as native `<option>` (and `<optgroup>`) children, or set
|
|
107
|
+
* the `commands` property. `<option data-shortcut="Ctrl+N" data-keywords="create">`
|
|
108
|
+
* carries a shortcut hint and search words. Choosing a command fires
|
|
109
|
+
* `und-select` and closes the palette; the app does the work.
|
|
110
|
+
*
|
|
111
|
+
* Opening it from the keyboard is opt-in: add `hotkey` to open it with
|
|
112
|
+
* Ctrl+K or Cmd+K (change the combination with `hotkey-combo`). Typing is
|
|
113
|
+
* filtered by `filter`, which defaults to a locale-aware collator comparison.
|
|
114
|
+
*
|
|
115
|
+
* @summary A searchable list of commands in a modal dialog.
|
|
116
|
+
* @tag und-command-palette
|
|
117
|
+
*
|
|
118
|
+
* @slot - `<option>` and `<optgroup>` elements that declare the commands.
|
|
119
|
+
* @slot footer - Replaces the keyboard hints at the bottom.
|
|
120
|
+
*
|
|
121
|
+
* @csspart dialog - The native `<dialog>` element.
|
|
122
|
+
* @csspart search - The search row.
|
|
123
|
+
* @csspart input - The search field.
|
|
124
|
+
* @csspart list - The scrolling list of commands.
|
|
125
|
+
* @csspart option - A command.
|
|
126
|
+
* @csspart group-label - A group heading.
|
|
127
|
+
* @csspart shortcut - A command's shortcut hint.
|
|
128
|
+
* @csspart empty - The "no results" message.
|
|
129
|
+
* @csspart hints - The default footer hints.
|
|
130
|
+
*
|
|
131
|
+
* @cssprop [--und-command-palette-width] - Preferred inline size.
|
|
132
|
+
*
|
|
133
|
+
* @cssstate open - The palette is open.
|
|
134
|
+
*
|
|
135
|
+
* @fires {CustomEvent<{ value: string; label: string }>} und-select - A command was chosen. Cancelable: `preventDefault()` keeps the palette open.
|
|
136
|
+
* @fires {CustomEvent<{ query: string }>} und-query-change - The search text changed.
|
|
137
|
+
* @fires {CustomEvent<{ open: boolean; reason: string }>} und-open-change - The user asked to open or close the palette. Cancelable.
|
|
138
|
+
*/
|
|
139
|
+
export class UndCommandPalette extends UndDialog {
|
|
140
|
+
static override tagName = 'und-command-palette';
|
|
141
|
+
static override styles = [dialogStyles, commandPaletteStyles];
|
|
142
|
+
|
|
143
|
+
static override properties = {
|
|
144
|
+
...UndDialog.properties,
|
|
145
|
+
commands: { attribute: false },
|
|
146
|
+
filter: { attribute: false },
|
|
147
|
+
hints: { attribute: false },
|
|
148
|
+
resultCountLabel: { attribute: false },
|
|
149
|
+
placeholder: {},
|
|
150
|
+
searchLabel: { attribute: 'search-label' },
|
|
151
|
+
emptyLabel: { attribute: 'empty-label' },
|
|
152
|
+
hotkey: { type: Boolean },
|
|
153
|
+
hotkeyCombo: { attribute: 'hotkey-combo' },
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* The commands, instead of `<option>` children.
|
|
158
|
+
*/
|
|
159
|
+
declare commands: PaletteCommand[] | undefined;
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Decides which commands match the typed text. Defaults to
|
|
163
|
+
* {@link defaultPaletteFilter}.
|
|
164
|
+
*/
|
|
165
|
+
declare filter: PaletteFilter;
|
|
166
|
+
|
|
167
|
+
/** Texts of the footer hints. */
|
|
168
|
+
declare hints: PaletteHints;
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Builds the spoken result count ("3 results"), announced as the search
|
|
172
|
+
* text changes.
|
|
173
|
+
*/
|
|
174
|
+
declare resultCountLabel: (count: number) => string;
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Placeholder of the search field.
|
|
178
|
+
* @attr placeholder
|
|
179
|
+
*/
|
|
180
|
+
declare placeholder: string;
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Accessible name of the search field.
|
|
184
|
+
* @attr search-label
|
|
185
|
+
*/
|
|
186
|
+
declare searchLabel: string;
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Text shown (and announced) when nothing matches.
|
|
190
|
+
* @attr empty-label
|
|
191
|
+
*/
|
|
192
|
+
declare emptyLabel: string;
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Opens and closes the palette with a keyboard shortcut anywhere on the page.
|
|
196
|
+
* Off unless set.
|
|
197
|
+
* @attr hotkey
|
|
198
|
+
*/
|
|
199
|
+
declare hotkey: boolean;
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* The shortcut used when `hotkey` is set. `mod` is Ctrl or Cmd.
|
|
203
|
+
* @attr hotkey-combo
|
|
204
|
+
*/
|
|
205
|
+
declare hotkeyCombo: string;
|
|
206
|
+
|
|
207
|
+
#locale = new LocaleDirController(this);
|
|
208
|
+
#declared: PaletteCommand[] = [];
|
|
209
|
+
#shown: PaletteCommand[] = [];
|
|
210
|
+
#observer: MutationObserver | undefined;
|
|
211
|
+
#scrolledTo = -1;
|
|
212
|
+
#query = '';
|
|
213
|
+
#active = -1;
|
|
214
|
+
|
|
215
|
+
constructor() {
|
|
216
|
+
super();
|
|
217
|
+
this.label = 'Command palette';
|
|
218
|
+
this.commands = undefined;
|
|
219
|
+
this.filter = defaultPaletteFilter;
|
|
220
|
+
this.hints = { navigate: 'to navigate', run: 'to run', close: 'to close' };
|
|
221
|
+
this.resultCountLabel = (count) => (count === 1 ? '1 result' : `${count} results`);
|
|
222
|
+
this.placeholder = 'Type a command or search…';
|
|
223
|
+
this.searchLabel = 'Search commands';
|
|
224
|
+
this.emptyLabel = 'No results found';
|
|
225
|
+
this.hotkey = false;
|
|
226
|
+
this.hotkeyCombo = 'mod+k';
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
override connectedCallback(): void {
|
|
230
|
+
super.connectedCallback();
|
|
231
|
+
if (isServer) return;
|
|
232
|
+
this.#readDeclared();
|
|
233
|
+
this.#observer = new MutationObserver(() => {
|
|
234
|
+
this.#readDeclared();
|
|
235
|
+
this.requestUpdate();
|
|
236
|
+
});
|
|
237
|
+
this.#observer.observe(this, {
|
|
238
|
+
childList: true,
|
|
239
|
+
subtree: true,
|
|
240
|
+
characterData: true,
|
|
241
|
+
attributes: true,
|
|
242
|
+
attributeFilter: ['value', 'label', 'disabled', 'data-keywords', 'data-shortcut'],
|
|
243
|
+
});
|
|
244
|
+
document.addEventListener('keydown', this.#onHotkey);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
override disconnectedCallback(): void {
|
|
248
|
+
super.disconnectedCallback();
|
|
249
|
+
this.#observer?.disconnect();
|
|
250
|
+
document.removeEventListener('keydown', this.#onHotkey);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
#readDeclared(): void {
|
|
254
|
+
this.#declared = [...this.querySelectorAll('option')].map((option) => {
|
|
255
|
+
const group =
|
|
256
|
+
option.parentElement instanceof HTMLOptGroupElement ? option.parentElement : null;
|
|
257
|
+
return {
|
|
258
|
+
value: option.value,
|
|
259
|
+
label: option.label || option.value,
|
|
260
|
+
disabled: option.disabled || (group?.disabled ?? false),
|
|
261
|
+
...(group ? { group: group.label } : {}),
|
|
262
|
+
...(option.dataset['keywords'] ? { keywords: option.dataset['keywords'] } : {}),
|
|
263
|
+
...(option.dataset['shortcut'] ? { shortcut: option.dataset['shortcut'] } : {}),
|
|
264
|
+
};
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
#onHotkey = (event: KeyboardEvent): void => {
|
|
269
|
+
if (!this.hotkey || event.defaultPrevented || event.isComposing || event.repeat) return;
|
|
270
|
+
if (!matchesCombo(event, this.hotkeyCombo)) return;
|
|
271
|
+
// Another modal dialog owns the keyboard right now.
|
|
272
|
+
if (!this.open && isModalOpen()) return;
|
|
273
|
+
event.preventDefault();
|
|
274
|
+
this.requestOpen(!this.open, 'command');
|
|
275
|
+
};
|
|
276
|
+
|
|
277
|
+
protected override willUpdate(changed: PropertyValues<this>): void {
|
|
278
|
+
super.willUpdate(changed);
|
|
279
|
+
if (changed.has('open') && this.open) {
|
|
280
|
+
this.#query = '';
|
|
281
|
+
this.#active = -1;
|
|
282
|
+
}
|
|
283
|
+
this.#compute();
|
|
284
|
+
// Keep an active command, or start on the first one that can run.
|
|
285
|
+
if (this.#shown[this.#active]?.disabled !== false) {
|
|
286
|
+
this.#active = edgeEnabled(this.#shown, 1);
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
protected override updated(changed: PropertyValues<this>): void {
|
|
291
|
+
super.updated(changed);
|
|
292
|
+
if (this.#active !== this.#scrolledTo && this.#active >= 0) {
|
|
293
|
+
this.#scrolledTo = this.#active;
|
|
294
|
+
this.renderRoot
|
|
295
|
+
.querySelector<HTMLElement>(`#${optionId(this.#active)}`)
|
|
296
|
+
?.scrollIntoView({ block: 'nearest' });
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
#compute(): void {
|
|
301
|
+
const all = this.commands ?? this.#declared;
|
|
302
|
+
const query = this.#query.trim();
|
|
303
|
+
if (!query) {
|
|
304
|
+
this.#shown = all;
|
|
305
|
+
return;
|
|
306
|
+
}
|
|
307
|
+
const collator = new Intl.Collator(this.#locale.lang || undefined, {
|
|
308
|
+
usage: 'search',
|
|
309
|
+
sensitivity: 'base',
|
|
310
|
+
ignorePunctuation: true,
|
|
311
|
+
});
|
|
312
|
+
this.#shown = all.filter((command) => this.filter(command, query, collator));
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
#move(step: 1 | -1): void {
|
|
316
|
+
const next = nextEnabled(this.#shown, this.#active, step);
|
|
317
|
+
this.#active = next === -1 ? edgeEnabled(this.#shown, step === 1 ? 1 : -1) : next;
|
|
318
|
+
this.requestUpdate();
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
#choose(index: number): void {
|
|
322
|
+
const command = this.#shown[index];
|
|
323
|
+
if (!command || command.disabled) return;
|
|
324
|
+
const proceed = this.emit(
|
|
325
|
+
'und-select',
|
|
326
|
+
{ value: command.value, label: command.label },
|
|
327
|
+
{ cancelable: true },
|
|
328
|
+
);
|
|
329
|
+
if (proceed) this.requestOpen(false, 'select');
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
#onInput = (event: Event): void => {
|
|
333
|
+
this.#query = (event.target as HTMLInputElement).value;
|
|
334
|
+
this.requestUpdate();
|
|
335
|
+
this.emit('und-query-change', { query: this.#query });
|
|
336
|
+
};
|
|
337
|
+
|
|
338
|
+
#onKeydown = (event: KeyboardEvent): void => {
|
|
339
|
+
if (event.isComposing || event.altKey || event.ctrlKey || event.metaKey) return;
|
|
340
|
+
if (event.key === 'ArrowDown' || event.key === 'ArrowUp') {
|
|
341
|
+
event.preventDefault();
|
|
342
|
+
this.#move(event.key === 'ArrowDown' ? 1 : -1);
|
|
343
|
+
} else if (event.key === 'PageDown' || event.key === 'PageUp') {
|
|
344
|
+
event.preventDefault();
|
|
345
|
+
this.#active = jumpEnabled(
|
|
346
|
+
this.#shown,
|
|
347
|
+
this.#active,
|
|
348
|
+
event.key === 'PageDown' ? PAGE_JUMP : -PAGE_JUMP,
|
|
349
|
+
);
|
|
350
|
+
this.requestUpdate();
|
|
351
|
+
} else if (event.key === 'Enter') {
|
|
352
|
+
event.preventDefault();
|
|
353
|
+
this.#choose(this.#active);
|
|
354
|
+
}
|
|
355
|
+
};
|
|
356
|
+
|
|
357
|
+
#onPointerMove = (event: PointerEvent): void => {
|
|
358
|
+
if (event.pointerType === 'touch') return;
|
|
359
|
+
const index = indexFromEvent(event);
|
|
360
|
+
if (index >= 0 && index !== this.#active && !this.#shown[index]?.disabled) {
|
|
361
|
+
this.#active = index;
|
|
362
|
+
this.requestUpdate();
|
|
363
|
+
}
|
|
364
|
+
};
|
|
365
|
+
|
|
366
|
+
#onListClick = (event: MouseEvent): void => {
|
|
367
|
+
const index = indexFromEvent(event);
|
|
368
|
+
if (index >= 0) this.#choose(index);
|
|
369
|
+
};
|
|
370
|
+
|
|
371
|
+
/** Clicking a command must not take focus away from the search field. */
|
|
372
|
+
#keepFocus = (event: Event): void => event.preventDefault();
|
|
373
|
+
|
|
374
|
+
#renderOption(command: PaletteCommand, index: number): TemplateResult {
|
|
375
|
+
return html`<div
|
|
376
|
+
id=${optionId(index)}
|
|
377
|
+
part="option"
|
|
378
|
+
class="option"
|
|
379
|
+
role="option"
|
|
380
|
+
data-index=${index}
|
|
381
|
+
aria-selected=${index === this.#active ? 'true' : 'false'}
|
|
382
|
+
aria-disabled=${command.disabled ? 'true' : nothing}
|
|
383
|
+
?data-active=${index === this.#active}
|
|
384
|
+
>
|
|
385
|
+
<span class="label">${command.label}</span>
|
|
386
|
+
${
|
|
387
|
+
command.shortcut
|
|
388
|
+
? html`<span part="shortcut" class="shortcut">${command.shortcut}</span>`
|
|
389
|
+
: nothing
|
|
390
|
+
}
|
|
391
|
+
</div>`;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
#renderList(): TemplateResult[] {
|
|
395
|
+
const out: TemplateResult[] = [];
|
|
396
|
+
let position = 0;
|
|
397
|
+
while (position < this.#shown.length) {
|
|
398
|
+
const group = this.#shown[position]?.group;
|
|
399
|
+
const start = position;
|
|
400
|
+
const items: TemplateResult[] = [];
|
|
401
|
+
while (position < this.#shown.length && this.#shown[position]?.group === group) {
|
|
402
|
+
items.push(this.#renderOption(this.#shown[position] as PaletteCommand, position));
|
|
403
|
+
position += 1;
|
|
404
|
+
}
|
|
405
|
+
out.push(
|
|
406
|
+
group === undefined
|
|
407
|
+
? html`${items}`
|
|
408
|
+
: html`<div role="group" aria-labelledby="group-${start}">
|
|
409
|
+
<div id="group-${start}" part="group-label" class="group-label">${group}</div>
|
|
410
|
+
${items}
|
|
411
|
+
</div>`,
|
|
412
|
+
);
|
|
413
|
+
}
|
|
414
|
+
return out;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
protected override renderContent(): TemplateResult {
|
|
418
|
+
const count = this.#shown.length;
|
|
419
|
+
const empty = count === 0;
|
|
420
|
+
const status = this.#query.trim()
|
|
421
|
+
? empty
|
|
422
|
+
? this.emptyLabel
|
|
423
|
+
: this.resultCountLabel(count)
|
|
424
|
+
: '';
|
|
425
|
+
const active = this.#active >= 0 ? optionId(this.#active) : undefined;
|
|
426
|
+
return html`<h2 id="title" class="visually-hidden" tabindex="-1">${this.label}</h2>
|
|
427
|
+
<div part="search" class="search">
|
|
428
|
+
<svg viewBox="0 0 20 20" fill="none" aria-hidden="true">
|
|
429
|
+
<circle cx="9" cy="9" r="5.5" stroke="currentColor" stroke-width="1.75" />
|
|
430
|
+
<path
|
|
431
|
+
d="M13.5 13.5L17 17"
|
|
432
|
+
stroke="currentColor"
|
|
433
|
+
stroke-width="1.75"
|
|
434
|
+
stroke-linecap="round"
|
|
435
|
+
/>
|
|
436
|
+
</svg>
|
|
437
|
+
<input
|
|
438
|
+
part="input"
|
|
439
|
+
class="input"
|
|
440
|
+
type="text"
|
|
441
|
+
role="combobox"
|
|
442
|
+
aria-autocomplete="list"
|
|
443
|
+
aria-expanded=${empty ? 'false' : 'true'}
|
|
444
|
+
aria-controls="list"
|
|
445
|
+
aria-activedescendant=${active ?? nothing}
|
|
446
|
+
aria-label=${this.searchLabel}
|
|
447
|
+
placeholder=${this.placeholder}
|
|
448
|
+
autocomplete="off"
|
|
449
|
+
autocapitalize="off"
|
|
450
|
+
spellcheck="false"
|
|
451
|
+
enterkeyhint="go"
|
|
452
|
+
.value=${this.#query}
|
|
453
|
+
@input=${this.#onInput}
|
|
454
|
+
@keydown=${this.#onKeydown}
|
|
455
|
+
/>
|
|
456
|
+
</div>
|
|
457
|
+
<div
|
|
458
|
+
id="list"
|
|
459
|
+
part="list"
|
|
460
|
+
class="list"
|
|
461
|
+
role="listbox"
|
|
462
|
+
aria-label=${this.label ?? nothing}
|
|
463
|
+
?hidden=${empty}
|
|
464
|
+
@pointermove=${this.#onPointerMove}
|
|
465
|
+
@pointerdown=${this.#keepFocus}
|
|
466
|
+
@click=${this.#onListClick}
|
|
467
|
+
>
|
|
468
|
+
${this.#renderList()}
|
|
469
|
+
</div>
|
|
470
|
+
<p part="empty" class="empty" aria-hidden="true" ?hidden=${!empty}>${this.emptyLabel}</p>
|
|
471
|
+
<div class="visually-hidden" role="status">${status}</div>
|
|
472
|
+
<slot name="footer"
|
|
473
|
+
><div part="hints" class="hints" aria-hidden="true">
|
|
474
|
+
<span><kbd>↑</kbd> <kbd>↓</kbd> ${this.hints.navigate}</span>
|
|
475
|
+
<span><kbd>Enter</kbd> ${this.hints.run}</span>
|
|
476
|
+
<span><kbd>Esc</kbd> ${this.hints.close}</span>
|
|
477
|
+
</div></slot
|
|
478
|
+
>`;
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
declare global {
|
|
483
|
+
interface HTMLElementTagNameMap {
|
|
484
|
+
'und-command-palette': UndCommandPalette;
|
|
485
|
+
}
|
|
486
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
|
|
3
|
+
/** Shadow styles for `und-context-menu`: no box of its own, plus the virtual anchor. */
|
|
4
|
+
export const contextMenuStyles = css`
|
|
5
|
+
@layer und.components {
|
|
6
|
+
:host {
|
|
7
|
+
display: contents;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.anchor {
|
|
11
|
+
position: fixed;
|
|
12
|
+
inset: 0 auto auto 0;
|
|
13
|
+
inline-size: 0;
|
|
14
|
+
block-size: 0;
|
|
15
|
+
pointer-events: none;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
`;
|