@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,103 @@
|
|
|
1
|
+
import { html, type PropertyValues, type TemplateResult } from 'lit';
|
|
2
|
+
import { UndElement } from '../../base/UndElement.js';
|
|
3
|
+
import { textStyles } from './text.styles.js';
|
|
4
|
+
|
|
5
|
+
export type TextSize = 'inherit' | 'xs' | 'sm' | 'md' | 'lg';
|
|
6
|
+
export type TextWeight = 'regular' | 'medium' | 'semibold' | 'bold';
|
|
7
|
+
export type TextTone = 'default' | 'muted' | 'subtle' | 'accent' | 'success' | 'warning' | 'danger';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Body text with a size, weight and tone from the type scale, and optional
|
|
11
|
+
* line clamping (`lines`). Truncation is visual only: the whole text stays in
|
|
12
|
+
* the DOM and in the accessibility tree, and there is no `title` tooltip
|
|
13
|
+
* (tooltips do not work on touch or for keyboard users; show the full text
|
|
14
|
+
* somewhere reachable instead). Line height grows for Indic scripts so vowel
|
|
15
|
+
* signs are never clipped, also when clamped.
|
|
16
|
+
*
|
|
17
|
+
* @summary Text with size, weight, tone and optional line clamping.
|
|
18
|
+
* @tag und-text
|
|
19
|
+
*
|
|
20
|
+
* @slot - The text.
|
|
21
|
+
*
|
|
22
|
+
* @csspart base - The text wrapper.
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
export class UndText extends UndElement {
|
|
26
|
+
static override tagName = 'und-text';
|
|
27
|
+
static override styles = textStyles;
|
|
28
|
+
|
|
29
|
+
static override properties = {
|
|
30
|
+
size: { reflect: true },
|
|
31
|
+
weight: { reflect: true },
|
|
32
|
+
tone: { reflect: true },
|
|
33
|
+
lines: { type: Number, reflect: true },
|
|
34
|
+
block: { type: Boolean, reflect: true },
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Type scale step. `inherit` keeps the surrounding font size and line height.
|
|
39
|
+
* @attr size
|
|
40
|
+
*/
|
|
41
|
+
declare size: TextSize;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Font weight. Unset keeps the weight of the size.
|
|
45
|
+
* @attr weight
|
|
46
|
+
*/
|
|
47
|
+
declare weight: TextWeight | undefined;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Color intent.
|
|
51
|
+
* @attr tone
|
|
52
|
+
*/
|
|
53
|
+
declare tone: TextTone;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Clamps the text to this many lines and ends it with an ellipsis (visual
|
|
57
|
+
* only; the full text stays available to assistive technology). Unset or 0
|
|
58
|
+
* shows all of it. A clamped text is block level.
|
|
59
|
+
* @attr lines
|
|
60
|
+
*/
|
|
61
|
+
declare lines: number | undefined;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Lays the text out as a block instead of inline.
|
|
65
|
+
* @attr block
|
|
66
|
+
*/
|
|
67
|
+
declare block: boolean;
|
|
68
|
+
|
|
69
|
+
constructor() {
|
|
70
|
+
super();
|
|
71
|
+
this.size = 'md';
|
|
72
|
+
this.tone = 'default';
|
|
73
|
+
this.block = false;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/** The valid clamp, or 0. */
|
|
77
|
+
#clamp(): number {
|
|
78
|
+
const n = Math.trunc(Number(this.lines));
|
|
79
|
+
return n >= 1 ? n : 0;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
protected override updated(changed: PropertyValues<this>): void {
|
|
83
|
+
if (!changed.has('lines')) return;
|
|
84
|
+
const base = this.renderRoot.querySelector<HTMLElement>('.text');
|
|
85
|
+
// CSSOM write: a style attribute binding would fail under a strict CSP.
|
|
86
|
+
if (this.#clamp()) base?.style.setProperty('--_lines', String(this.#clamp()));
|
|
87
|
+
else base?.style.removeProperty('--_lines');
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
protected override render(): TemplateResult {
|
|
91
|
+
const weight = this.weight ? ` weight-${this.weight}` : '';
|
|
92
|
+
const clamp = this.#clamp() ? ' clamp' : '';
|
|
93
|
+
return html`<span part="base" class="text size-${this.size} tone-${this.tone}${weight}${clamp}"
|
|
94
|
+
><slot></slot
|
|
95
|
+
></span>`;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
declare global {
|
|
100
|
+
interface HTMLElementTagNameMap {
|
|
101
|
+
'und-text': UndText;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
import { css, html, nothing, svg, type PropertyValues, type TemplateResult } from 'lit';
|
|
2
|
+
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
3
|
+
import { UndElement, warnOnce } from '../../base/UndElement.js';
|
|
4
|
+
import { safeImageSrc } from '../../utils/safe-url.js';
|
|
5
|
+
|
|
6
|
+
export type ThumbnailFit = 'cover' | 'contain';
|
|
7
|
+
|
|
8
|
+
/** `16/9`, `16:9`, `1.5`: two positive numbers or one. */
|
|
9
|
+
const RATIO = /^(\d+(?:\.\d+)?)\s*(?:[/:]\s*(\d+(?:\.\d+)?))?$/;
|
|
10
|
+
|
|
11
|
+
/** The CSS `aspect-ratio` for a `ratio` value, or `undefined` when it is junk. */
|
|
12
|
+
export function toAspectRatio(value: string | undefined): string | undefined {
|
|
13
|
+
const match = RATIO.exec((value ?? '').trim());
|
|
14
|
+
if (!match) return undefined;
|
|
15
|
+
const w = Number(match[1]);
|
|
16
|
+
const h = Number(match[2] ?? 1);
|
|
17
|
+
return w > 0 && h > 0 ? `${w} / ${h}` : undefined;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const PLACEHOLDER = svg`<rect x="3" y="4" width="18" height="16" rx="2"/><circle cx="9" cy="10" r="1.5"/><path d="m21 16-5-5-9 9"/>`;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* An image in a box with a fixed aspect ratio (so the page does not jump
|
|
24
|
+
* while it loads) and a fallback when there is no `src` or it fails. The
|
|
25
|
+
* source goes through the URL allowlist (`http(s)`, `blob:`, `data:image/`
|
|
26
|
+
* and relative URLs). `alt` is required: use `alt=""` only when a caption
|
|
27
|
+
* next to the image already says what it shows. The fallback slot (or a
|
|
28
|
+
* default picture icon) takes the image's place and keeps its name.
|
|
29
|
+
*
|
|
30
|
+
* @summary An image with an aspect ratio and a fallback.
|
|
31
|
+
* @tag und-thumbnail
|
|
32
|
+
*
|
|
33
|
+
* @slot fallback - Shown when the image is missing or fails (default: a picture icon).
|
|
34
|
+
*
|
|
35
|
+
* @csspart base - The box.
|
|
36
|
+
* @csspart image - The `img` element.
|
|
37
|
+
* @csspart fallback - Wrapper of the fallback.
|
|
38
|
+
*
|
|
39
|
+
* @cssprop [--und-thumbnail-width] - Inline size of the box.
|
|
40
|
+
* @cssprop [--und-thumbnail-radius] - Corner radius.
|
|
41
|
+
* @cssprop [--und-thumbnail-bg] - Background behind the image and the fallback.
|
|
42
|
+
*
|
|
43
|
+
* @fires {CustomEvent<undefined>} und-load - The image loaded.
|
|
44
|
+
* @fires {CustomEvent<undefined>} und-error - The image failed; the fallback is shown.
|
|
45
|
+
*/
|
|
46
|
+
export class UndThumbnail extends UndElement {
|
|
47
|
+
static override tagName = 'und-thumbnail';
|
|
48
|
+
|
|
49
|
+
static override properties = {
|
|
50
|
+
src: {},
|
|
51
|
+
alt: {},
|
|
52
|
+
ratio: {},
|
|
53
|
+
fit: { reflect: true },
|
|
54
|
+
loading: {},
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
static override styles = css`
|
|
58
|
+
@layer und.components {
|
|
59
|
+
:host {
|
|
60
|
+
display: block;
|
|
61
|
+
inline-size: var(--und-thumbnail-width, 100%);
|
|
62
|
+
max-inline-size: 100%;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
:host([hidden]) {
|
|
66
|
+
display: none;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.base {
|
|
70
|
+
position: relative;
|
|
71
|
+
display: grid;
|
|
72
|
+
place-items: center;
|
|
73
|
+
box-sizing: border-box;
|
|
74
|
+
inline-size: 100%;
|
|
75
|
+
aspect-ratio: var(--_ratio, 1 / 1);
|
|
76
|
+
overflow: hidden;
|
|
77
|
+
border-radius: var(--und-thumbnail-radius, var(--und-radius-md, 0.5rem));
|
|
78
|
+
background-color: var(--und-thumbnail-bg, var(--und-bg-muted, #f1f2f6));
|
|
79
|
+
color: var(--und-fg-subtle, #62646e);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.image {
|
|
83
|
+
grid-area: 1 / 1;
|
|
84
|
+
inline-size: 100%;
|
|
85
|
+
block-size: 100%;
|
|
86
|
+
object-fit: cover;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
:host([fit='contain']) .image {
|
|
90
|
+
object-fit: contain;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.fallback {
|
|
94
|
+
grid-area: 1 / 1;
|
|
95
|
+
display: grid;
|
|
96
|
+
place-items: center;
|
|
97
|
+
inline-size: 100%;
|
|
98
|
+
block-size: 100%;
|
|
99
|
+
font-size: 2rem;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.fallback svg {
|
|
103
|
+
inline-size: 1em;
|
|
104
|
+
block-size: 1em;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
@media (forced-colors: active) {
|
|
108
|
+
.base {
|
|
109
|
+
border: 1px solid CanvasText;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.fallback {
|
|
113
|
+
color: CanvasText;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
`;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Image URL. Only http(s), blob, `data:image/...` and relative URLs load.
|
|
121
|
+
* @attr src
|
|
122
|
+
*/
|
|
123
|
+
declare src: string | undefined;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Text alternative. Required; `""` marks the image decorative.
|
|
127
|
+
* @attr alt
|
|
128
|
+
*/
|
|
129
|
+
declare alt: string | undefined;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Aspect ratio as `16/9`, `4:3` or a number (width over height). Default 1.
|
|
133
|
+
* @attr ratio
|
|
134
|
+
*/
|
|
135
|
+
declare ratio: string | undefined;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* How the image fills the box.
|
|
139
|
+
* @attr fit
|
|
140
|
+
*/
|
|
141
|
+
declare fit: ThumbnailFit;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Image loading strategy.
|
|
145
|
+
* @attr loading
|
|
146
|
+
*/
|
|
147
|
+
declare loading: 'lazy' | 'eager';
|
|
148
|
+
|
|
149
|
+
#failed = false;
|
|
150
|
+
|
|
151
|
+
constructor() {
|
|
152
|
+
super();
|
|
153
|
+
this.fit = 'cover';
|
|
154
|
+
this.loading = 'lazy';
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
protected override willUpdate(changed: PropertyValues<this>): void {
|
|
158
|
+
// A new source gets a fresh chance to load.
|
|
159
|
+
if (changed.has('src')) this.#failed = false;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
protected override updated(changed: PropertyValues<this>): void {
|
|
163
|
+
if (!changed.has('ratio')) return;
|
|
164
|
+
const base = this.renderRoot.querySelector<HTMLElement>('.base');
|
|
165
|
+
const ratio = toAspectRatio(this.ratio);
|
|
166
|
+
// CSSOM write: a style attribute binding would fail under a strict CSP.
|
|
167
|
+
if (ratio) base?.style.setProperty('--_ratio', ratio);
|
|
168
|
+
else base?.style.removeProperty('--_ratio');
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
protected override firstUpdated(): void {
|
|
172
|
+
if (this.alt === undefined) {
|
|
173
|
+
warnOnce('thumbnail-alt', '<und-thumbnail> needs `alt` (use alt="" for a decorative image).');
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
#onLoad = (): void => {
|
|
178
|
+
this.emit('und-load');
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
#onError = (): void => {
|
|
182
|
+
this.#failed = true;
|
|
183
|
+
this.requestUpdate();
|
|
184
|
+
this.emit('und-error');
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
protected override render(): TemplateResult {
|
|
188
|
+
const src = safeImageSrc(this.src);
|
|
189
|
+
const showImage = Boolean(src) && !this.#failed;
|
|
190
|
+
const name = this.alt ?? '';
|
|
191
|
+
return html`<div part="base" class="base">
|
|
192
|
+
${
|
|
193
|
+
showImage
|
|
194
|
+
? html`<img
|
|
195
|
+
part="image"
|
|
196
|
+
class="image"
|
|
197
|
+
src=${ifDefined(src)}
|
|
198
|
+
alt=${name}
|
|
199
|
+
loading=${this.loading}
|
|
200
|
+
decoding="async"
|
|
201
|
+
@load=${this.#onLoad}
|
|
202
|
+
@error=${this.#onError}
|
|
203
|
+
/>`
|
|
204
|
+
: html`<div
|
|
205
|
+
part="fallback"
|
|
206
|
+
class="fallback"
|
|
207
|
+
role=${name ? 'img' : nothing}
|
|
208
|
+
aria-label=${name || nothing}
|
|
209
|
+
>
|
|
210
|
+
<slot name="fallback"
|
|
211
|
+
><svg
|
|
212
|
+
viewBox="0 0 24 24"
|
|
213
|
+
fill="none"
|
|
214
|
+
stroke="currentColor"
|
|
215
|
+
stroke-width="2"
|
|
216
|
+
stroke-linecap="round"
|
|
217
|
+
stroke-linejoin="round"
|
|
218
|
+
aria-hidden="true"
|
|
219
|
+
focusable="false"
|
|
220
|
+
>
|
|
221
|
+
${PLACEHOLDER}
|
|
222
|
+
</svg></slot
|
|
223
|
+
>
|
|
224
|
+
</div>`
|
|
225
|
+
}
|
|
226
|
+
</div>`;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
declare global {
|
|
231
|
+
interface HTMLElementTagNameMap {
|
|
232
|
+
'und-thumbnail': UndThumbnail;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
import type { PropertyValues } from 'lit';
|
|
2
|
+
import { LocaleDirController } from '../../controllers/locale-dir.js';
|
|
3
|
+
import { UndFieldElement, type FieldParts, type NativeControl } from '../form-field/field-base.js';
|
|
4
|
+
import { createPart, idList, PART_ATTRIBUTE } from '../form-field/field-helpers.js';
|
|
5
|
+
import { errorSummaryStyles } from '../form-field/error-summary.styles.js';
|
|
6
|
+
import { fieldStyles } from '../form-field/form-field.styles.js';
|
|
7
|
+
import { textFieldStyles } from '../text-field/text-field.styles.js';
|
|
8
|
+
import { dateFieldStyles } from '../shared/date-field.styles.js';
|
|
9
|
+
import { fillMessage, getDateStrings } from '../shared/date-strings.js';
|
|
10
|
+
import { HOST_ARIA_ATTRIBUTES, HostAria } from '../shared/host-aria.js';
|
|
11
|
+
import {
|
|
12
|
+
minutesToTime,
|
|
13
|
+
parseTimeIso,
|
|
14
|
+
resolveLocale,
|
|
15
|
+
timeTextFormat,
|
|
16
|
+
timeToMinutes,
|
|
17
|
+
toTimeIso,
|
|
18
|
+
type HourCycle,
|
|
19
|
+
type TimeTextFormat,
|
|
20
|
+
} from '../shared/date-utils.js';
|
|
21
|
+
|
|
22
|
+
export type { HourCycle };
|
|
23
|
+
export type TimeInputSize = 'sm' | 'md' | 'lg';
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* A time field: one real text input that shows and parses the time the way the
|
|
27
|
+
* locale writes it (`14:30` on a 24-hour clock, `2:30 pm` on a 12-hour one) and
|
|
28
|
+
* accepts short forms such as `930`, `9.30` and `2 pm`. The value is a 24-hour
|
|
29
|
+
* `HH:MM` string, and that string is what a form submits.
|
|
30
|
+
*
|
|
31
|
+
* It is a single masked-free text input rather than separate spinbutton
|
|
32
|
+
* segments: autofill, IME, screen readers, copy and paste and `label for` work
|
|
33
|
+
* as on any text field, and the format is the same on every engine. Up and
|
|
34
|
+
* Down Arrow step the time by `step` minutes, and Page Up and Page Down by an
|
|
35
|
+
* hour. No time zone is applied.
|
|
36
|
+
*
|
|
37
|
+
* @summary A text time field with a locale-aware 12 or 24-hour format.
|
|
38
|
+
* @tag und-time-input
|
|
39
|
+
*
|
|
40
|
+
* @fires {CustomEvent<{ value: string }>} und-change - The time was committed (blur, Enter, or a key step). `value` is `HH:MM`, or empty.
|
|
41
|
+
* @fires {Event} input - Native input event of the text input.
|
|
42
|
+
* @fires {Event} change - Native change event of the text input.
|
|
43
|
+
*/
|
|
44
|
+
export class UndTimeInput extends UndFieldElement {
|
|
45
|
+
static override tagName = 'und-time-input';
|
|
46
|
+
static override lightStyles = [fieldStyles, errorSummaryStyles, textFieldStyles, dateFieldStyles];
|
|
47
|
+
|
|
48
|
+
static override properties = {
|
|
49
|
+
value: { reflect: true },
|
|
50
|
+
defaultValue: { attribute: 'default-value' },
|
|
51
|
+
min: {},
|
|
52
|
+
max: {},
|
|
53
|
+
step: { type: Number },
|
|
54
|
+
locale: {},
|
|
55
|
+
hourCycle: { attribute: 'hour-cycle', reflect: true },
|
|
56
|
+
size: { reflect: true },
|
|
57
|
+
readOnly: { type: Boolean, attribute: 'readonly', reflect: true },
|
|
58
|
+
placeholder: {},
|
|
59
|
+
autocomplete: {},
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* The time, `HH:MM` (24-hour), or empty.
|
|
64
|
+
* @attr value
|
|
65
|
+
*/
|
|
66
|
+
declare value: string;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Value restored on form reset (defaults to the initial `value`).
|
|
70
|
+
* @attr default-value
|
|
71
|
+
*/
|
|
72
|
+
declare defaultValue: string | undefined;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Earliest allowed time, `HH:MM`.
|
|
76
|
+
* @attr min
|
|
77
|
+
*/
|
|
78
|
+
declare min: string | undefined;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Latest allowed time, `HH:MM`.
|
|
82
|
+
* @attr max
|
|
83
|
+
*/
|
|
84
|
+
declare max: string | undefined;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Minutes added or removed by the Up and Down Arrow keys.
|
|
88
|
+
* @attr step
|
|
89
|
+
*/
|
|
90
|
+
declare step: number;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* BCP 47 tag for the format. Defaults to the page language.
|
|
94
|
+
* @attr locale
|
|
95
|
+
*/
|
|
96
|
+
declare locale: string | undefined;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* `auto` follows the locale (`en-IN` is 12-hour, `de` is 24-hour); `12` and `24` force it.
|
|
100
|
+
* @attr hour-cycle
|
|
101
|
+
*/
|
|
102
|
+
declare hourCycle: HourCycle;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Size of the field.
|
|
106
|
+
* @attr size
|
|
107
|
+
*/
|
|
108
|
+
declare size: TimeInputSize;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Makes the value read-only.
|
|
112
|
+
* @attr readonly
|
|
113
|
+
*/
|
|
114
|
+
declare readOnly: boolean;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Placeholder. Defaults to the format pattern, such as `hh:mm am`.
|
|
118
|
+
* @attr placeholder
|
|
119
|
+
*/
|
|
120
|
+
declare placeholder: string | undefined;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Autofill hint. Off by default.
|
|
124
|
+
* @attr autocomplete
|
|
125
|
+
*/
|
|
126
|
+
declare autocomplete: string | undefined;
|
|
127
|
+
|
|
128
|
+
static override get observedAttributes(): string[] {
|
|
129
|
+
return [...super.observedAttributes, ...HOST_ARIA_ATTRIBUTES];
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
#locale = new LocaleDirController(this);
|
|
133
|
+
#hostAria = new HostAria();
|
|
134
|
+
#box: HTMLElement | undefined;
|
|
135
|
+
#hidden: HTMLInputElement | undefined;
|
|
136
|
+
#hint: HTMLElement | undefined;
|
|
137
|
+
#fromText: string | undefined;
|
|
138
|
+
#shape = '';
|
|
139
|
+
#committed = '';
|
|
140
|
+
|
|
141
|
+
constructor() {
|
|
142
|
+
super();
|
|
143
|
+
this.value = '';
|
|
144
|
+
this.step = 1;
|
|
145
|
+
this.hourCycle = 'auto';
|
|
146
|
+
this.size = 'md';
|
|
147
|
+
this.readOnly = false;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/** The text input. */
|
|
151
|
+
get input(): HTMLInputElement | undefined {
|
|
152
|
+
return this.control as HTMLInputElement | undefined;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
#lang(): string {
|
|
156
|
+
return resolveLocale(this.locale || this.#locale.lang);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
#textFormat(): TimeTextFormat {
|
|
160
|
+
const cycle = this.hourCycle === '12' || this.hourCycle === '24' ? this.hourCycle : 'auto';
|
|
161
|
+
return timeTextFormat(this.#lang(), cycle);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
protected override findProvidedControl(): NativeControl | null {
|
|
165
|
+
return this.querySelector<HTMLInputElement>(`:scope > input:not([${PART_ATTRIBUTE}])`);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
protected override createControl(): NativeControl {
|
|
169
|
+
const input = createPart('input', 'und-text-field__input', 'control');
|
|
170
|
+
input.type = 'text';
|
|
171
|
+
return input;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
protected override assemble(parts: FieldParts): void {
|
|
175
|
+
const input = parts.control as HTMLInputElement;
|
|
176
|
+
input.classList.add('und-text-field__input');
|
|
177
|
+
input.type = 'text';
|
|
178
|
+
const typed = input.value ? this.#textFormat().parse(input.value) : null;
|
|
179
|
+
if (!this.value && typed) this.value = toTimeIso(typed);
|
|
180
|
+
this.defaultValue ??= this.value;
|
|
181
|
+
this.#committed = this.value;
|
|
182
|
+
const field = createPart('div', 'und-field', 'field');
|
|
183
|
+
const box = createPart('div', 'und-text-field', 'box');
|
|
184
|
+
this.#box = box;
|
|
185
|
+
box.append(input);
|
|
186
|
+
const hidden = createPart('input', 'und-date-field__value', 'value');
|
|
187
|
+
hidden.type = 'hidden';
|
|
188
|
+
this.#hidden = hidden;
|
|
189
|
+
const hint = createPart('span', 'und-date-field__sr', 'format-hint');
|
|
190
|
+
hint.id = `${this.baseId}-format`;
|
|
191
|
+
this.#hint = hint;
|
|
192
|
+
field.append(parts.label, parts.description, box, hint, hidden, parts.error);
|
|
193
|
+
this.prepend(field);
|
|
194
|
+
box.addEventListener('click', (event) => {
|
|
195
|
+
if (event.target === box) input.focus();
|
|
196
|
+
});
|
|
197
|
+
input.addEventListener('input', () => this.#readText());
|
|
198
|
+
input.addEventListener('change', () => this.#commit());
|
|
199
|
+
input.addEventListener('keydown', (event) => this.#onKeydown(event));
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
#onKeydown(event: KeyboardEvent): void {
|
|
203
|
+
const input = this.input;
|
|
204
|
+
if (!input || this.readOnly || event.altKey || event.ctrlKey || event.metaKey) return;
|
|
205
|
+
const keys = ['ArrowUp', 'ArrowDown', 'PageUp', 'PageDown'];
|
|
206
|
+
if (!keys.includes(event.key)) return;
|
|
207
|
+
event.preventDefault();
|
|
208
|
+
const up = event.key === 'ArrowUp' || event.key === 'PageUp';
|
|
209
|
+
const min = parseTimeIso(this.min);
|
|
210
|
+
const max = parseTimeIso(this.max);
|
|
211
|
+
const current = this.#textFormat().parse(input.value);
|
|
212
|
+
let minutes: number;
|
|
213
|
+
if (!current) {
|
|
214
|
+
minutes = min ? timeToMinutes(min) : 0;
|
|
215
|
+
} else {
|
|
216
|
+
const now = timeToMinutes(current);
|
|
217
|
+
if (event.key.startsWith('Page')) {
|
|
218
|
+
minutes = now + (up ? 60 : -60);
|
|
219
|
+
} else {
|
|
220
|
+
const step = Math.max(1, Math.round(this.step) || 1);
|
|
221
|
+
minutes = up ? (Math.floor(now / step) + 1) * step : (Math.ceil(now / step) - 1) * step;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
const low = min ? timeToMinutes(min) : 0;
|
|
225
|
+
const high = max ? timeToMinutes(max) : 24 * 60 - 1;
|
|
226
|
+
minutes = Math.min(Math.max(minutes, low), Math.max(low, high));
|
|
227
|
+
input.value = this.#textFormat().format(minutesToTime(minutes));
|
|
228
|
+
input.dispatchEvent(new Event('input', { bubbles: true }));
|
|
229
|
+
input.dispatchEvent(new Event('change', { bubbles: true }));
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
#check(text: string): { iso: string; message: string } {
|
|
233
|
+
const strings = getDateStrings();
|
|
234
|
+
const format = this.#textFormat();
|
|
235
|
+
const value = text.trim();
|
|
236
|
+
if (!value) return { iso: '', message: '' };
|
|
237
|
+
const time = format.parse(value);
|
|
238
|
+
if (!time) {
|
|
239
|
+
const example = format.format({ h: 14, m: 30 });
|
|
240
|
+
return { iso: '', message: fillMessage(strings.invalidTime, { pattern: example }) };
|
|
241
|
+
}
|
|
242
|
+
const min = parseTimeIso(this.min);
|
|
243
|
+
const max = parseTimeIso(this.max);
|
|
244
|
+
let message = '';
|
|
245
|
+
if (min && timeToMinutes(time) < timeToMinutes(min)) {
|
|
246
|
+
message = fillMessage(strings.timeBeforeMin, { time: format.format(min) });
|
|
247
|
+
} else if (max && timeToMinutes(time) > timeToMinutes(max)) {
|
|
248
|
+
message = fillMessage(strings.timeAfterMax, { time: format.format(max) });
|
|
249
|
+
}
|
|
250
|
+
return { iso: toTimeIso(time), message };
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
#readText(): void {
|
|
254
|
+
const input = this.input;
|
|
255
|
+
if (!input) return;
|
|
256
|
+
const { iso } = this.#check(input.value);
|
|
257
|
+
this.#fromText = iso;
|
|
258
|
+
this.value = iso;
|
|
259
|
+
if (this.#hidden) this.#hidden.value = iso;
|
|
260
|
+
this.#validate();
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
#commit(): void {
|
|
264
|
+
const input = this.input;
|
|
265
|
+
if (!input) return;
|
|
266
|
+
const time = parseTimeIso(this.value);
|
|
267
|
+
if (time) input.value = this.#textFormat().format(time);
|
|
268
|
+
if (this.value !== this.#committed) {
|
|
269
|
+
this.#committed = this.value;
|
|
270
|
+
this.emit('und-change', { value: this.value });
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
#validate(): void {
|
|
275
|
+
const input = this.input;
|
|
276
|
+
if (!input || this.error) return;
|
|
277
|
+
input.setCustomValidity(this.#check(input.value).message);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
protected override resetControl(): void {
|
|
281
|
+
const input = this.input;
|
|
282
|
+
if (!input) return;
|
|
283
|
+
const iso = this.defaultValue ?? '';
|
|
284
|
+
const time = parseTimeIso(iso);
|
|
285
|
+
input.value = time ? this.#textFormat().format(time) : '';
|
|
286
|
+
this.#fromText = iso;
|
|
287
|
+
this.value = iso;
|
|
288
|
+
this.#committed = iso;
|
|
289
|
+
if (this.#hidden) this.#hidden.value = iso;
|
|
290
|
+
this.#validate();
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
override attributeChangedCallback(name: string, old: string | null, value: string | null): void {
|
|
294
|
+
super.attributeChangedCallback(name, old, value);
|
|
295
|
+
if (value !== null && name.startsWith('aria-')) this.requestUpdate();
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
protected override updated(changed: PropertyValues<this>): void {
|
|
299
|
+
this.#hostAria.absorb(this);
|
|
300
|
+
if (this.input) {
|
|
301
|
+
HostAria.fallbackName(this, this.input, getDateStrings().time, Boolean(this.label));
|
|
302
|
+
}
|
|
303
|
+
super.updated(changed);
|
|
304
|
+
const input = this.input;
|
|
305
|
+
if (!input) return;
|
|
306
|
+
const format = this.#textFormat();
|
|
307
|
+
const shape = `${this.#lang()}|${this.hourCycle}`;
|
|
308
|
+
const time = parseTimeIso(this.value);
|
|
309
|
+
if (this.value !== this.#fromText) {
|
|
310
|
+
input.value = time ? format.format(time) : '';
|
|
311
|
+
this.#fromText = this.value;
|
|
312
|
+
} else if (shape !== this.#shape && time) {
|
|
313
|
+
input.value = format.format(time);
|
|
314
|
+
}
|
|
315
|
+
this.#shape = shape;
|
|
316
|
+
input.type = 'text';
|
|
317
|
+
input.readOnly = this.readOnly;
|
|
318
|
+
input.removeAttribute('name');
|
|
319
|
+
input.setAttribute('autocomplete', this.autocomplete ?? 'off');
|
|
320
|
+
const strings = getDateStrings();
|
|
321
|
+
const pattern = format.hour12 ? `${strings.hourMinute} ${format.am}` : strings.hourMinute;
|
|
322
|
+
input.placeholder = this.placeholder ?? pattern;
|
|
323
|
+
if (this.#hint) {
|
|
324
|
+
this.#hint.textContent = fillMessage(strings.formatHint, { pattern });
|
|
325
|
+
input.setAttribute(
|
|
326
|
+
'aria-describedby',
|
|
327
|
+
idList(input.getAttribute('aria-describedby'), this.#hint.id),
|
|
328
|
+
);
|
|
329
|
+
}
|
|
330
|
+
this.#hostAria.applyTo(input);
|
|
331
|
+
if (this.#hidden) {
|
|
332
|
+
if (this.name) this.#hidden.name = this.name;
|
|
333
|
+
else this.#hidden.removeAttribute('name');
|
|
334
|
+
this.#hidden.value = this.value;
|
|
335
|
+
this.#hidden.disabled = this.disabled;
|
|
336
|
+
}
|
|
337
|
+
this.#validate();
|
|
338
|
+
this.#box?.classList.toggle('und-text-field--sm', this.size === 'sm');
|
|
339
|
+
this.#box?.classList.toggle('und-text-field--lg', this.size === 'lg');
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
declare global {
|
|
344
|
+
interface HTMLElementTagNameMap {
|
|
345
|
+
'und-time-input': UndTimeInput;
|
|
346
|
+
}
|
|
347
|
+
}
|