@0001-labs/design-system-1 0.3.0-alpha.13 → 0.3.0-alpha.14
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/DS1/0-face/calendar.ts +194 -0
- package/DS1/0-face/carousel.ts +623 -0
- package/DS1/0-face/component-visibility.ts +13 -0
- package/DS1/0-face/copy-text.ts +96 -0
- package/DS1/0-face/device.ts +8 -58
- package/DS1/0-face/dialog-swipe.ts +249 -0
- package/DS1/0-face/dialogs.ts +208 -0
- package/DS1/0-face/drawer.ts +258 -0
- package/DS1/0-face/feedback-words.ts +36 -0
- package/DS1/0-face/feedback.ts +40 -0
- package/DS1/0-face/format.ts +700 -0
- package/DS1/0-face/generated/toast-assets.ts +18 -0
- package/DS1/0-face/grid-fit.ts +1 -1
- package/DS1/0-face/grid.ts +3 -2
- package/DS1/0-face/header.ts +78 -0
- package/DS1/0-face/i18n.ts +93 -18
- package/DS1/0-face/keys.ts +276 -0
- package/DS1/0-face/languages.ts +4 -4
- package/DS1/0-face/layout-inspector.ts +6 -6
- package/DS1/0-face/library-styles.ts +33 -0
- package/DS1/0-face/load-toaster.ts +7 -0
- package/DS1/0-face/preference-options.ts +29 -0
- package/DS1/0-face/preferences.ts +3 -11
- package/DS1/0-face/pricing.ts +98 -43
- package/DS1/0-face/scaling.ts +160 -4
- package/DS1/0-face/shared-words.ts +9 -4
- package/DS1/0-face/sidebar.ts +201 -0
- package/DS1/0-face/theme-bootstrap.js +184 -0
- package/DS1/0-face/theme.ts +89 -47
- package/DS1/0-face/toast-queue.ts +157 -0
- package/DS1/0-face/toaster.ts +384 -0
- package/DS1/0-face/tooltips.ts +157 -15
- package/DS1/0-face/translations/da.json +60 -1
- package/DS1/0-face/translations/de.json +60 -1
- package/DS1/0-face/translations/en.json +60 -1
- package/DS1/0-face/translations/es.json +60 -1
- package/DS1/0-face/translations/fi.json +60 -1
- package/DS1/0-face/translations/fr.json +60 -1
- package/DS1/0-face/translations/is.json +60 -1
- package/DS1/0-face/translations/it.json +60 -1
- package/DS1/0-face/translations/ja.json +60 -1
- package/DS1/0-face/translations/ko.json +60 -1
- package/DS1/0-face/translations/nb.json +60 -1
- package/DS1/0-face/translations/pt-BR.json +60 -1
- package/DS1/0-face/translations/pt.json +60 -1
- package/DS1/0-face/translations/sv.json +60 -1
- package/DS1/0-face/translations/zh.json +60 -1
- package/DS1/0-face/translations-format.ts +3 -4
- package/DS1/1-root/card.css +192 -0
- package/DS1/1-root/carousel.css +136 -0
- package/DS1/1-root/cjk.css +23 -0
- package/DS1/1-root/component-metrics.css +1 -0
- package/DS1/1-root/component-tokens.css +51 -8
- package/DS1/1-root/controls.css +887 -14
- package/DS1/1-root/dialog-placement.css +191 -0
- package/DS1/1-root/document.css +183 -0
- package/DS1/1-root/drawer.css +83 -0
- package/DS1/1-root/empty.css +83 -0
- package/DS1/1-root/figures.css +141 -0
- package/DS1/1-root/fonts/Iosevka-LICENSE.md +3 -1
- package/DS1/1-root/fonts/Iosevka-Regular.woff2 +0 -0
- package/DS1/1-root/fonts.css +69 -0
- package/DS1/1-root/footer.css +186 -0
- package/DS1/1-root/header.css +165 -0
- package/DS1/1-root/kbd.css +46 -0
- package/DS1/1-root/library-tokens.ts +91 -0
- package/DS1/1-root/measures.ts +53 -0
- package/DS1/1-root/notice.css +165 -0
- package/DS1/1-root/one.css +14 -84
- package/DS1/1-root/one.semantic.css +200 -148
- package/DS1/1-root/palette.css +58 -0
- package/DS1/1-root/palette.ts +19 -0
- package/DS1/1-root/progress.css +356 -0
- package/DS1/1-root/prose.css +202 -0
- package/DS1/1-root/row.css +297 -0
- package/DS1/1-root/table.css +111 -0
- package/DS1/1-root/text.css +70 -0
- package/DS1/2-core/button-split.ts +55 -0
- package/DS1/2-core/chart/chart.css +169 -0
- package/DS1/2-core/chart/grid-chart.ts +554 -0
- package/DS1/2-core/ds-avatar.ts +25 -6
- package/DS1/2-core/ds-badge.ts +10 -10
- package/DS1/2-core/ds-button.ts +111 -26
- package/DS1/2-core/ds-card.ts +135 -105
- package/DS1/2-core/ds-chart.ts +327 -0
- package/DS1/2-core/ds-composer.ts +8 -2
- package/DS1/2-core/ds-cycle.ts +97 -21
- package/DS1/2-core/ds-empty.ts +120 -0
- package/DS1/2-core/ds-icon.ts +11 -2
- package/DS1/2-core/ds-input.ts +165 -6
- package/DS1/2-core/ds-kbd.ts +78 -0
- package/DS1/2-core/ds-loading.ts +72 -0
- package/DS1/2-core/ds-notice.ts +180 -0
- package/DS1/2-core/ds-progress.ts +380 -0
- package/DS1/2-core/ds-spacing-handle.ts +22 -0
- package/DS1/2-core/ds-stat.ts +174 -0
- package/DS1/2-core/ds-switch.ts +1 -0
- package/DS1/2-core/ds-text.ts +15 -2
- package/DS1/2-core/ds-toast.ts +354 -0
- package/DS1/2-core/figures.ts +105 -0
- package/DS1/2-core/generated/ds-icon-map.ts +234 -128
- package/DS1/2-core/generated/icon-avatar.ts +2 -0
- package/DS1/2-core/generated/icons-extra.ts +118 -65
- package/DS1/2-core/generated/icons-immediate.ts +1 -1
- package/DS1/2-core/spacing-handle.ts +95 -0
- package/DS1/2-core/styles/ds-avatar.css +9 -8
- package/DS1/2-core/styles/ds-button-host.css +26 -3
- package/DS1/2-core/styles/ds-button-split.css +67 -0
- package/DS1/2-core/styles/ds-button.css +49 -15
- package/DS1/2-core/styles/ds-card.css +34 -0
- package/DS1/2-core/styles/ds-composer.css +13 -0
- package/DS1/2-core/styles/ds-cycle.css +69 -0
- package/DS1/2-core/styles/ds-empty.css +18 -0
- package/DS1/2-core/styles/ds-gap.css +1 -0
- package/DS1/2-core/styles/ds-icon.css +1 -0
- package/DS1/2-core/styles/ds-input.css +59 -6
- package/DS1/2-core/styles/ds-kbd.css +12 -0
- package/DS1/2-core/styles/ds-loading.css +13 -0
- package/DS1/2-core/styles/ds-notice.css +30 -0
- package/DS1/2-core/styles/ds-progress.css +25 -0
- package/DS1/2-core/styles/ds-select.css +2 -2
- package/DS1/2-core/styles/ds-spacing-handle.css +8 -0
- package/DS1/2-core/styles/ds-split.css +2 -62
- package/DS1/2-core/styles/ds-stat.css +34 -0
- package/DS1/2-core/styles/ds-switch.css +16 -1
- package/DS1/2-core/styles/ds-text.css +43 -12
- package/DS1/2-core/styles/ds-toast.css +182 -0
- package/DS1/2-core/styles/ds-tooltip.css +1 -0
- package/DS1/3-unit/calendar-base.ts +263 -0
- package/DS1/3-unit/ds-accordion.ts +9 -1
- package/DS1/3-unit/ds-avatar-group.ts +1 -0
- package/DS1/3-unit/ds-calendar-large.ts +349 -0
- package/DS1/3-unit/ds-calendar.ts +344 -0
- package/DS1/3-unit/ds-carousel.ts +368 -0
- package/DS1/3-unit/ds-date-picker.ts +540 -0
- package/DS1/3-unit/ds-form.ts +45 -37
- package/DS1/3-unit/ds-list.ts +48 -1
- package/DS1/3-unit/ds-matrix.ts +318 -0
- package/DS1/3-unit/ds-menu.ts +8 -4
- package/DS1/3-unit/ds-row.ts +84 -1
- package/DS1/3-unit/ds-sidebar.ts +280 -0
- package/DS1/3-unit/ds-table.ts +75 -34
- package/DS1/3-unit/styles/ds-accordion.css +1 -0
- package/DS1/3-unit/styles/ds-avatar-group.css +2 -4
- package/DS1/3-unit/styles/ds-calendar-large.css +165 -0
- package/DS1/3-unit/styles/ds-calendar.css +238 -0
- package/DS1/3-unit/styles/ds-carousel.css +30 -0
- package/DS1/3-unit/styles/ds-date-picker.css +124 -0
- package/DS1/3-unit/styles/ds-list.css +1 -0
- package/DS1/3-unit/styles/ds-matrix.css +203 -0
- package/DS1/3-unit/styles/ds-menu.css +31 -6
- package/DS1/3-unit/styles/ds-row.css +84 -2
- package/DS1/3-unit/styles/ds-sidebar.css +117 -0
- package/DS1/3-unit/styles/ds-table.css +3 -74
- package/DS1/4-page/ds-dialog.ts +40 -4
- package/DS1/4-page/ds-document.ts +240 -0
- package/DS1/4-page/ds-footer.ts +165 -0
- package/DS1/4-page/ds-grid.ts +39 -59
- package/DS1/4-page/ds-header.ts +171 -0
- package/DS1/4-page/ds-page.ts +184 -0
- package/DS1/4-page/email.ts +2 -3
- package/DS1/4-page/styles/ds-container.css +1 -0
- package/DS1/4-page/styles/ds-document.css +18 -0
- package/DS1/4-page/styles/ds-footer.css +29 -0
- package/DS1/4-page/styles/ds-grid.css +31 -85
- package/DS1/4-page/styles/ds-header.css +57 -0
- package/DS1/4-page/styles/ds-page.css +214 -0
- package/DS1/components.ts +7 -1
- package/DS1/index.ts +26 -6
- package/DS1/react/avatar.ts +4 -5
- package/DS1/react/button-split.ts +29 -0
- package/DS1/react/button.ts +32 -13
- package/DS1/react/carousel.ts +76 -0
- package/DS1/react/dialog.ts +36 -5
- package/DS1/react/document.ts +14 -0
- package/DS1/react/empty.ts +32 -0
- package/DS1/react/footer.ts +17 -0
- package/DS1/react/header.ts +15 -0
- package/DS1/react/input.ts +28 -17
- package/DS1/react/kbd.ts +21 -0
- package/DS1/react/loading.ts +18 -0
- package/DS1/react/notice.ts +59 -0
- package/DS1/react/page.ts +13 -0
- package/DS1/react/progress.ts +99 -0
- package/DS1/react/sidebar.ts +60 -0
- package/DS1/react/spacing-handle.ts +21 -0
- package/DS1/react/stat.ts +73 -0
- package/DS1/react/toast.ts +82 -0
- package/DS1/x-icon/Tabler-LICENSE.md +27 -0
- package/DS1/x-icon/airtable.svg +5 -0
- package/DS1/x-icon/attach.svg +3 -0
- package/DS1/x-icon/audio.svg +3 -0
- package/DS1/x-icon/bag-alt.svg +3 -0
- package/DS1/x-icon/bank.svg +3 -0
- package/DS1/x-icon/banknote.svg +3 -0
- package/DS1/x-icon/bolt.svg +3 -0
- package/DS1/x-icon/book-alt.svg +3 -0
- package/DS1/x-icon/book.svg +4 -0
- package/DS1/x-icon/box.svg +3 -0
- package/DS1/x-icon/briefcase.svg +3 -0
- package/DS1/x-icon/building.svg +4 -0
- package/DS1/x-icon/car.svg +3 -0
- package/DS1/x-icon/card.svg +3 -0
- package/DS1/x-icon/cart.svg +3 -0
- package/DS1/x-icon/{ezo-item-button-start.svg → chevron-left.svg} +1 -1
- package/DS1/x-icon/{ezo-android-screen-stats.svg → chevron-right.svg} +1 -1
- package/DS1/x-icon/cloud.svg +3 -0
- package/DS1/x-icon/coffee.svg +3 -0
- package/DS1/x-icon/coins.svg +3 -0
- package/DS1/x-icon/cursor.svg +3 -0
- package/DS1/x-icon/curve.svg +7 -0
- package/DS1/x-icon/dislike.svg +4 -0
- package/DS1/x-icon/dot-bank.svg +3 -0
- package/DS1/x-icon/dot-banknote.svg +3 -0
- package/DS1/x-icon/dot-banknotes.svg +3 -0
- package/DS1/x-icon/dot-card.svg +3 -0
- package/DS1/x-icon/dot-coin.svg +3 -0
- package/DS1/x-icon/dot-coins.svg +3 -0
- package/DS1/x-icon/dot-receipt.svg +3 -0
- package/DS1/x-icon/dot-safe.svg +3 -0
- package/DS1/x-icon/dot-transfer.svg +3 -0
- package/DS1/x-icon/dot-wallet.svg +3 -0
- package/DS1/x-icon/download.svg +4 -0
- package/DS1/x-icon/drive.svg +5 -0
- package/DS1/x-icon/drop.svg +3 -0
- package/DS1/x-icon/dropbox.svg +3 -0
- package/DS1/x-icon/dumbbell.svg +3 -0
- package/DS1/x-icon/eye-off.svg +3 -0
- package/DS1/x-icon/eye.svg +3 -0
- package/DS1/x-icon/facebook.svg +3 -0
- package/DS1/x-icon/figma.svg +5 -0
- package/DS1/x-icon/flame.svg +3 -0
- package/DS1/x-icon/flip.svg +5 -0
- package/DS1/x-icon/food.svg +3 -0
- package/DS1/x-icon/fuel.svg +3 -0
- package/DS1/x-icon/game.svg +3 -0
- package/DS1/x-icon/gift.svg +3 -0
- package/DS1/x-icon/github.svg +3 -0
- package/DS1/x-icon/heart.svg +3 -0
- package/DS1/x-icon/history.svg +3 -0
- package/DS1/x-icon/home-alt.svg +3 -0
- package/DS1/x-icon/income.svg +3 -0
- package/DS1/x-icon/info.svg +5 -0
- package/DS1/x-icon/instagram.svg +5 -0
- package/DS1/x-icon/jpbank.svg +3 -0
- package/DS1/x-icon/key.svg +4 -0
- package/DS1/x-icon/keyboard.svg +3 -0
- package/DS1/x-icon/like.svg +4 -0
- package/DS1/x-icon/linkedin.svg +7 -0
- package/DS1/x-icon/loom.svg +6 -0
- package/DS1/x-icon/map.svg +4 -0
- package/DS1/x-icon/medical.svg +3 -0
- package/DS1/x-icon/{ezo-android-screen-lists.svg → minus.svg} +1 -1
- package/DS1/x-icon/moon.svg +3 -0
- package/DS1/x-icon/move.svg +3 -0
- package/DS1/x-icon/music-alt.svg +3 -0
- package/DS1/x-icon/music.svg +5 -0
- package/DS1/x-icon/notion.svg +6 -0
- package/DS1/x-icon/offline.svg +3 -0
- package/DS1/x-icon/pause.svg +4 -0
- package/DS1/x-icon/paw.svg +3 -0
- package/DS1/x-icon/pdf.svg +3 -0
- package/DS1/x-icon/people.svg +5 -0
- package/DS1/x-icon/percent.svg +3 -0
- package/DS1/x-icon/phone.svg +3 -0
- package/DS1/x-icon/pill.svg +3 -0
- package/DS1/x-icon/plane.svg +3 -0
- package/DS1/x-icon/postal.svg +3 -0
- package/DS1/x-icon/present.svg +4 -0
- package/DS1/x-icon/reaction.svg +5 -0
- package/DS1/x-icon/receipt.svg +3 -0
- package/DS1/x-icon/refresh.svg +3 -0
- package/DS1/x-icon/refund.svg +3 -0
- package/DS1/x-icon/repeat.svg +3 -0
- package/DS1/x-icon/rotate.svg +4 -0
- package/DS1/x-icon/safe.svg +3 -0
- package/DS1/x-icon/school-alt.svg +3 -0
- package/DS1/x-icon/shield-alt.svg +3 -0
- package/DS1/x-icon/shield.svg +4 -0
- package/DS1/x-icon/shirt.svg +3 -0
- package/DS1/x-icon/shop.svg +3 -0
- package/DS1/x-icon/sign-in.svg +3 -0
- package/DS1/x-icon/sign-out.svg +3 -0
- package/DS1/x-icon/slack.svg +6 -0
- package/DS1/x-icon/sparkle.svg +3 -0
- package/DS1/x-icon/start.svg +4 -0
- package/DS1/x-icon/{ezo-item-button-reopen.svg → stop.svg} +1 -1
- package/DS1/x-icon/sun.svg +3 -0
- package/DS1/x-icon/system.svg +4 -0
- package/DS1/x-icon/tag.svg +3 -0
- package/DS1/x-icon/ticket.svg +3 -0
- package/DS1/x-icon/title-struck.svg +4 -0
- package/DS1/x-icon/train.svg +3 -0
- package/DS1/x-icon/transfer.svg +3 -0
- package/DS1/x-icon/tv.svg +3 -0
- package/DS1/x-icon/upload.svg +4 -0
- package/DS1/x-icon/video.svg +4 -0
- package/DS1/x-icon/vimeo.svg +3 -0
- package/DS1/x-icon/wallet.svg +3 -0
- package/DS1/x-icon/wifi.svg +3 -0
- package/DS1/x-icon/window.svg +4 -0
- package/DS1/x-icon/wrench.svg +3 -0
- package/DS1/x-icon/x-brand.svg +4 -0
- package/DS1/x-icon/youtube.svg +4 -0
- package/README.md +3 -3
- package/dist/0-face/calendar.d.ts +75 -0
- package/dist/0-face/calendar.d.ts.map +1 -0
- package/dist/0-face/calendar.js +149 -0
- package/dist/0-face/carousel.d.ts +174 -0
- package/dist/0-face/carousel.d.ts.map +1 -0
- package/dist/0-face/carousel.js +583 -0
- package/dist/0-face/component-visibility.d.ts +7 -0
- package/dist/0-face/component-visibility.d.ts.map +1 -0
- package/dist/0-face/component-visibility.js +10 -0
- package/dist/0-face/copy-text.d.ts +11 -0
- package/dist/0-face/copy-text.d.ts.map +1 -0
- package/dist/0-face/copy-text.js +97 -0
- package/dist/0-face/device.d.ts +3 -7
- package/dist/0-face/device.d.ts.map +1 -1
- package/dist/0-face/device.js +7 -41
- package/dist/0-face/dialog-swipe.d.ts +49 -0
- package/dist/0-face/dialog-swipe.d.ts.map +1 -0
- package/dist/0-face/dialog-swipe.js +239 -0
- package/dist/0-face/dialogs.d.ts +33 -0
- package/dist/0-face/dialogs.d.ts.map +1 -0
- package/dist/0-face/dialogs.js +173 -0
- package/dist/0-face/drawer.d.ts +64 -0
- package/dist/0-face/drawer.d.ts.map +1 -0
- package/dist/0-face/drawer.js +256 -0
- package/dist/0-face/feedback-words.d.ts +21 -0
- package/dist/0-face/feedback-words.d.ts.map +1 -0
- package/dist/0-face/feedback-words.js +30 -0
- package/dist/0-face/feedback.d.ts +41 -0
- package/dist/0-face/feedback.d.ts.map +1 -0
- package/dist/0-face/feedback.js +35 -0
- package/dist/0-face/format.d.ts +166 -0
- package/dist/0-face/format.d.ts.map +1 -0
- package/dist/0-face/format.js +445 -0
- package/dist/0-face/generated/toast-assets.d.ts +11 -0
- package/dist/0-face/generated/toast-assets.d.ts.map +1 -0
- package/dist/0-face/generated/toast-assets.js +14 -0
- package/dist/0-face/grid-fit.js +1 -1
- package/dist/0-face/grid.d.ts.map +1 -1
- package/dist/0-face/grid.js +2 -1
- package/dist/0-face/header.d.ts +38 -0
- package/dist/0-face/header.d.ts.map +1 -0
- package/dist/0-face/header.js +80 -0
- package/dist/0-face/i18n.d.ts +32 -2
- package/dist/0-face/i18n.d.ts.map +1 -1
- package/dist/0-face/i18n.js +65 -19
- package/dist/0-face/keys.d.ts +104 -0
- package/dist/0-face/keys.d.ts.map +1 -0
- package/dist/0-face/keys.js +253 -0
- package/dist/0-face/languages.d.ts +2 -2
- package/dist/0-face/languages.js +3 -3
- package/dist/0-face/layout-inspector.js +6 -6
- package/dist/0-face/library-styles.d.ts +7 -0
- package/dist/0-face/library-styles.d.ts.map +1 -0
- package/dist/0-face/library-styles.js +29 -0
- package/dist/0-face/load-toaster.d.ts +8 -0
- package/dist/0-face/load-toaster.d.ts.map +1 -0
- package/dist/0-face/load-toaster.js +7 -0
- package/dist/0-face/preference-options.d.ts +34 -0
- package/dist/0-face/preference-options.d.ts.map +1 -0
- package/dist/0-face/preference-options.js +1 -0
- package/dist/0-face/preferences.d.ts +3 -12
- package/dist/0-face/preferences.d.ts.map +1 -1
- package/dist/0-face/pricing.d.ts +19 -9
- package/dist/0-face/pricing.d.ts.map +1 -1
- package/dist/0-face/pricing.js +81 -40
- package/dist/0-face/scaling.d.ts +71 -1
- package/dist/0-face/scaling.d.ts.map +1 -1
- package/dist/0-face/scaling.js +108 -3
- package/dist/0-face/shared-words.d.ts +9 -4
- package/dist/0-face/shared-words.d.ts.map +1 -1
- package/dist/0-face/sidebar.d.ts +69 -0
- package/dist/0-face/sidebar.d.ts.map +1 -0
- package/dist/0-face/sidebar.js +191 -0
- package/dist/0-face/theme-bootstrap.d.ts +1 -0
- package/dist/0-face/theme-bootstrap.d.ts.map +1 -0
- package/dist/0-face/theme-bootstrap.js +214 -0
- package/dist/0-face/theme.d.ts +32 -0
- package/dist/0-face/theme.d.ts.map +1 -1
- package/dist/0-face/theme.js +69 -43
- package/dist/0-face/toast-queue.d.ts +110 -0
- package/dist/0-face/toast-queue.d.ts.map +1 -0
- package/dist/0-face/toast-queue.js +98 -0
- package/dist/0-face/toaster.d.ts +27 -0
- package/dist/0-face/toaster.d.ts.map +1 -0
- package/dist/0-face/toaster.js +373 -0
- package/dist/0-face/tooltips.d.ts +24 -1
- package/dist/0-face/tooltips.d.ts.map +1 -1
- package/dist/0-face/tooltips.js +155 -16
- package/dist/0-face/translations/da.json +60 -1
- package/dist/0-face/translations/de.json +60 -1
- package/dist/0-face/translations/en.json +60 -1
- package/dist/0-face/translations/es.json +60 -1
- package/dist/0-face/translations/fi.json +60 -1
- package/dist/0-face/translations/fr.json +60 -1
- package/dist/0-face/translations/is.json +60 -1
- package/dist/0-face/translations/it.json +60 -1
- package/dist/0-face/translations/ja.json +60 -1
- package/dist/0-face/translations/ko.json +60 -1
- package/dist/0-face/translations/nb.json +60 -1
- package/dist/0-face/translations/pt-BR.json +60 -1
- package/dist/0-face/translations/pt.json +60 -1
- package/dist/0-face/translations/sv.json +60 -1
- package/dist/0-face/translations/zh.json +60 -1
- package/dist/0-face/translations-format.d.ts.map +1 -1
- package/dist/0-face/translations-format.js +3 -4
- package/dist/0-face/tree.d.ts +69 -0
- package/dist/0-face/tree.d.ts.map +1 -0
- package/dist/0-face/tree.js +191 -0
- package/dist/1-root/library-tokens.d.ts +31 -0
- package/dist/1-root/library-tokens.d.ts.map +1 -0
- package/dist/1-root/library-tokens.js +84 -0
- package/dist/1-root/measures.d.ts +52 -0
- package/dist/1-root/measures.d.ts.map +1 -0
- package/dist/1-root/measures.js +49 -0
- package/dist/1-root/palette.d.ts +5 -0
- package/dist/1-root/palette.d.ts.map +1 -1
- package/dist/1-root/palette.js +18 -0
- package/dist/2-core/button-split.d.ts +21 -0
- package/dist/2-core/button-split.d.ts.map +1 -0
- package/dist/2-core/button-split.js +48 -0
- package/dist/2-core/chart/grid-chart.d.ts +113 -0
- package/dist/2-core/chart/grid-chart.d.ts.map +1 -0
- package/dist/2-core/chart/grid-chart.js +466 -0
- package/dist/2-core/ds-avatar.d.ts +20 -3
- package/dist/2-core/ds-avatar.d.ts.map +1 -1
- package/dist/2-core/ds-avatar.js +19 -5
- package/dist/2-core/ds-badge.js +10 -13
- package/dist/2-core/ds-banner.d.ts +23 -7
- package/dist/2-core/ds-banner.d.ts.map +1 -1
- package/dist/2-core/ds-banner.js +48 -12
- package/dist/2-core/ds-button.d.ts +76 -0
- package/dist/2-core/ds-button.d.ts.map +1 -1
- package/dist/2-core/ds-button.js +101 -26
- package/dist/2-core/ds-card.d.ts +76 -11
- package/dist/2-core/ds-card.d.ts.map +1 -1
- package/dist/2-core/ds-card.js +129 -105
- package/dist/2-core/ds-chart.d.ts +105 -0
- package/dist/2-core/ds-chart.d.ts.map +1 -0
- package/dist/2-core/ds-chart.js +390 -0
- package/dist/2-core/ds-composer.d.ts +7 -0
- package/dist/2-core/ds-composer.d.ts.map +1 -1
- package/dist/2-core/ds-composer.js +1 -1
- package/dist/2-core/ds-cycle.d.ts +36 -2
- package/dist/2-core/ds-cycle.d.ts.map +1 -1
- package/dist/2-core/ds-cycle.js +95 -18
- package/dist/2-core/ds-empty.d.ts +74 -0
- package/dist/2-core/ds-empty.d.ts.map +1 -0
- package/dist/2-core/ds-empty.js +96 -0
- package/dist/2-core/ds-icon.d.ts +6 -0
- package/dist/2-core/ds-icon.d.ts.map +1 -1
- package/dist/2-core/ds-icon.js +12 -2
- package/dist/2-core/ds-input.d.ts +39 -1
- package/dist/2-core/ds-input.d.ts.map +1 -1
- package/dist/2-core/ds-input.js +150 -6
- package/dist/2-core/ds-kbd.d.ts +48 -0
- package/dist/2-core/ds-kbd.d.ts.map +1 -0
- package/dist/2-core/ds-kbd.js +65 -0
- package/dist/2-core/ds-language.d.ts +8 -1
- package/dist/2-core/ds-language.d.ts.map +1 -1
- package/dist/2-core/ds-language.js +2 -2
- package/dist/2-core/ds-loading.d.ts +40 -0
- package/dist/2-core/ds-loading.d.ts.map +1 -0
- package/dist/2-core/ds-loading.js +63 -0
- package/dist/2-core/ds-meter.d.ts +103 -0
- package/dist/2-core/ds-meter.d.ts.map +1 -0
- package/dist/2-core/ds-meter.js +124 -0
- package/dist/2-core/ds-notice.d.ts +103 -0
- package/dist/2-core/ds-notice.d.ts.map +1 -0
- package/dist/2-core/ds-notice.js +152 -0
- package/dist/2-core/ds-pagedots.d.ts +64 -7
- package/dist/2-core/ds-pagedots.d.ts.map +1 -1
- package/dist/2-core/ds-pagedots.js +124 -18
- package/dist/2-core/ds-progress.d.ts +200 -0
- package/dist/2-core/ds-progress.d.ts.map +1 -0
- package/dist/2-core/ds-progress.js +319 -0
- package/dist/2-core/ds-spacing-handle.d.ts +25 -0
- package/dist/2-core/ds-spacing-handle.d.ts.map +1 -0
- package/dist/2-core/ds-spacing-handle.js +25 -0
- package/dist/2-core/ds-split.d.ts +4 -67
- package/dist/2-core/ds-split.d.ts.map +1 -1
- package/dist/2-core/ds-split.js +4 -98
- package/dist/2-core/ds-stat.d.ts +126 -0
- package/dist/2-core/ds-stat.d.ts.map +1 -0
- package/dist/2-core/ds-stat.js +137 -0
- package/dist/2-core/ds-steps.d.ts +72 -0
- package/dist/2-core/ds-steps.d.ts.map +1 -0
- package/dist/2-core/ds-steps.js +114 -0
- package/dist/2-core/ds-switch.d.ts +1 -0
- package/dist/2-core/ds-switch.d.ts.map +1 -1
- package/dist/2-core/ds-switch.js +1 -0
- package/dist/2-core/ds-text.d.ts +15 -2
- package/dist/2-core/ds-text.d.ts.map +1 -1
- package/dist/2-core/ds-text.js +13 -0
- package/dist/2-core/ds-textarea.d.ts.map +1 -1
- package/dist/2-core/ds-textarea.js +1 -0
- package/dist/2-core/ds-toast.d.ts +139 -0
- package/dist/2-core/ds-toast.d.ts.map +1 -0
- package/dist/2-core/ds-toast.js +329 -0
- package/dist/2-core/ds-toggle.d.ts +11 -0
- package/dist/2-core/ds-toggle.d.ts.map +1 -0
- package/dist/2-core/ds-toggle.js +10 -0
- package/dist/2-core/figures.d.ts +56 -0
- package/dist/2-core/figures.d.ts.map +1 -0
- package/dist/2-core/figures.js +70 -0
- package/dist/2-core/generated/ds-icon-map.d.ts +118 -65
- package/dist/2-core/generated/ds-icon-map.d.ts.map +1 -1
- package/dist/2-core/generated/ds-icon-map.js +234 -128
- package/dist/2-core/generated/icon-avatar.d.ts +2 -0
- package/dist/2-core/generated/icon-avatar.d.ts.map +1 -0
- package/dist/2-core/generated/icon-avatar.js +2 -0
- package/dist/2-core/generated/icons-extra.d.ts.map +1 -1
- package/dist/2-core/generated/icons-extra.js +118 -65
- package/dist/2-core/generated/icons-immediate.d.ts +1 -1
- package/dist/2-core/generated/icons-immediate.d.ts.map +1 -1
- package/dist/2-core/generated/icons-immediate.js +1 -1
- package/dist/2-core/spacing-handle.d.ts +28 -0
- package/dist/2-core/spacing-handle.d.ts.map +1 -0
- package/dist/2-core/spacing-handle.js +146 -0
- package/dist/3-unit/calendar-base.d.ts +149 -0
- package/dist/3-unit/calendar-base.d.ts.map +1 -0
- package/dist/3-unit/calendar-base.js +172 -0
- package/dist/3-unit/ds-accordion.d.ts +9 -0
- package/dist/3-unit/ds-accordion.d.ts.map +1 -1
- package/dist/3-unit/ds-accordion.js +7 -1
- package/dist/3-unit/ds-avatar-group.d.ts +1 -0
- package/dist/3-unit/ds-avatar-group.d.ts.map +1 -1
- package/dist/3-unit/ds-calendar-large.d.ts +138 -0
- package/dist/3-unit/ds-calendar-large.d.ts.map +1 -0
- package/dist/3-unit/ds-calendar-large.js +305 -0
- package/dist/3-unit/ds-calendar.d.ts +175 -0
- package/dist/3-unit/ds-calendar.d.ts.map +1 -0
- package/dist/3-unit/ds-calendar.js +303 -0
- package/dist/3-unit/ds-carousel.d.ts +182 -0
- package/dist/3-unit/ds-carousel.d.ts.map +1 -0
- package/dist/3-unit/ds-carousel.js +327 -0
- package/dist/3-unit/ds-date-picker.d.ts +203 -0
- package/dist/3-unit/ds-date-picker.d.ts.map +1 -0
- package/dist/3-unit/ds-date-picker.js +499 -0
- package/dist/3-unit/ds-form.d.ts.map +1 -1
- package/dist/3-unit/ds-form.js +38 -28
- package/dist/3-unit/ds-list.d.ts +12 -0
- package/dist/3-unit/ds-list.d.ts.map +1 -1
- package/dist/3-unit/ds-list.js +52 -1
- package/dist/3-unit/ds-matrix.d.ts +146 -0
- package/dist/3-unit/ds-matrix.d.ts.map +1 -0
- package/dist/3-unit/ds-matrix.js +248 -0
- package/dist/3-unit/ds-menu.d.ts +1 -1
- package/dist/3-unit/ds-menu.d.ts.map +1 -1
- package/dist/3-unit/ds-menu.js +7 -4
- package/dist/3-unit/ds-row.d.ts +66 -0
- package/dist/3-unit/ds-row.d.ts.map +1 -1
- package/dist/3-unit/ds-row.js +80 -1
- package/dist/3-unit/ds-sidebar.d.ts +108 -0
- package/dist/3-unit/ds-sidebar.d.ts.map +1 -0
- package/dist/3-unit/ds-sidebar.js +268 -0
- package/dist/3-unit/ds-table.d.ts +28 -10
- package/dist/3-unit/ds-table.d.ts.map +1 -1
- package/dist/3-unit/ds-table.js +53 -25
- package/dist/3-unit/ds-tree.d.ts +69 -0
- package/dist/3-unit/ds-tree.d.ts.map +1 -0
- package/dist/3-unit/ds-tree.js +136 -0
- package/dist/4-page/ds-dialog.d.ts +16 -1
- package/dist/4-page/ds-dialog.d.ts.map +1 -1
- package/dist/4-page/ds-dialog.js +39 -3
- package/dist/4-page/ds-document.d.ts +98 -0
- package/dist/4-page/ds-document.d.ts.map +1 -0
- package/dist/4-page/ds-document.js +213 -0
- package/dist/4-page/ds-footer.d.ts +100 -0
- package/dist/4-page/ds-footer.d.ts.map +1 -0
- package/dist/4-page/ds-footer.js +119 -0
- package/dist/4-page/ds-grid.d.ts +32 -12
- package/dist/4-page/ds-grid.d.ts.map +1 -1
- package/dist/4-page/ds-grid.js +30 -39
- package/dist/4-page/ds-header.d.ts +84 -0
- package/dist/4-page/ds-header.d.ts.map +1 -0
- package/dist/4-page/ds-header.js +143 -0
- package/dist/4-page/ds-layout.d.ts +1 -0
- package/dist/4-page/ds-layout.d.ts.map +1 -1
- package/dist/4-page/ds-layout.js +1 -1
- package/dist/4-page/ds-page.d.ts +110 -0
- package/dist/4-page/ds-page.d.ts.map +1 -0
- package/dist/4-page/ds-page.js +155 -0
- package/dist/4-page/email.d.ts +2 -3
- package/dist/4-page/email.d.ts.map +1 -1
- package/dist/4-page/email.js +2 -3
- package/dist/components.d.ts +4 -1
- package/dist/components.d.ts.map +1 -1
- package/dist/components.js +4 -1
- package/dist/design-system-1.bundle.js +11304 -4322
- package/dist/design-system-1.bundle.js.map +1 -1
- package/dist/design-system-1.bundle.min.js +8867 -4132
- package/dist/design-system-1.bundle.min.js.map +1 -1
- package/dist/design-system-1.css +1 -1
- package/dist/feedback.js +541 -0
- package/dist/feedback.js.map +1 -0
- package/dist/icons-extra-B4Iotc7s.js +298 -0
- package/dist/icons-extra-B4Iotc7s.js.map +1 -0
- package/dist/icons-extra-C4sCgoUj.js +185 -0
- package/dist/icons-extra-C4sCgoUj.js.map +1 -0
- package/dist/icons-extra-DSav6uTU.js +300 -0
- package/dist/icons-extra-DSav6uTU.js.map +1 -0
- package/dist/icons-extra-Dc_yVWIz.js +1024 -0
- package/dist/icons-extra-Dc_yVWIz.js.map +1 -0
- package/dist/icons-extra-cfzoudMf.js +1030 -0
- package/dist/icons-extra-cfzoudMf.js.map +1 -0
- package/dist/icons-extra-g_xpwZhZ.js +631 -0
- package/dist/icons-extra-g_xpwZhZ.js.map +1 -0
- package/dist/index.d.ts +23 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +23 -6
- package/dist/react/avatar.d.ts +5 -9
- package/dist/react/avatar.d.ts.map +1 -1
- package/dist/react/avatar.js +2 -2
- package/dist/react/button-split.d.ts +19 -0
- package/dist/react/button-split.d.ts.map +1 -0
- package/dist/react/button-split.js +35 -0
- package/dist/react/button.d.ts +18 -7
- package/dist/react/button.d.ts.map +1 -1
- package/dist/react/button.js +13 -4
- package/dist/react/carousel.d.ts +63 -0
- package/dist/react/carousel.d.ts.map +1 -0
- package/dist/react/carousel.js +47 -0
- package/dist/react/choice.d.ts +1 -1
- package/dist/react/context-menu.d.ts +337 -337
- package/dist/react/dialog.d.ts +684 -678
- package/dist/react/dialog.d.ts.map +1 -1
- package/dist/react/dialog.js +29 -3
- package/dist/react/document.d.ts +11 -0
- package/dist/react/document.d.ts.map +1 -0
- package/dist/react/document.js +10 -0
- package/dist/react/empty.d.ts +34 -0
- package/dist/react/empty.d.ts.map +1 -0
- package/dist/react/empty.js +8 -0
- package/dist/react/file-picker.d.ts +1 -1
- package/dist/react/footer.d.ts +13 -0
- package/dist/react/footer.d.ts.map +1 -0
- package/dist/react/footer.js +12 -0
- package/dist/react/header.d.ts +12 -0
- package/dist/react/header.d.ts.map +1 -0
- package/dist/react/header.js +11 -0
- package/dist/react/input.d.ts +31 -9
- package/dist/react/input.d.ts.map +1 -1
- package/dist/react/input.js +94 -94
- package/dist/react/kbd.d.ts +26 -0
- package/dist/react/kbd.d.ts.map +1 -0
- package/dist/react/kbd.js +8 -0
- package/dist/react/loading.d.ts +14 -0
- package/dist/react/loading.d.ts.map +1 -0
- package/dist/react/loading.js +14 -0
- package/dist/react/meter.d.ts +64 -0
- package/dist/react/meter.d.ts.map +1 -0
- package/dist/react/meter.js +15 -0
- package/dist/react/notice.d.ts +45 -0
- package/dist/react/notice.d.ts.map +1 -0
- package/dist/react/notice.js +34 -0
- package/dist/react/page.d.ts +10 -0
- package/dist/react/page.d.ts.map +1 -0
- package/dist/react/page.js +9 -0
- package/dist/react/progress.d.ts +107 -0
- package/dist/react/progress.d.ts.map +1 -0
- package/dist/react/progress.js +47 -0
- package/dist/react/sidebar.d.ts +44 -0
- package/dist/react/sidebar.d.ts.map +1 -0
- package/dist/react/sidebar.js +41 -0
- package/dist/react/spacing-handle.d.ts +13 -0
- package/dist/react/spacing-handle.d.ts.map +1 -0
- package/dist/react/spacing-handle.js +18 -0
- package/dist/react/split.d.ts +6 -14
- package/dist/react/split.d.ts.map +1 -1
- package/dist/react/split.js +5 -31
- package/dist/react/stat.d.ts +78 -0
- package/dist/react/stat.d.ts.map +1 -0
- package/dist/react/stat.js +25 -0
- package/dist/react/steps.d.ts +36 -0
- package/dist/react/steps.d.ts.map +1 -0
- package/dist/react/steps.js +10 -0
- package/dist/react/toast.d.ts +37 -0
- package/dist/react/toast.d.ts.map +1 -0
- package/dist/react/toast.js +55 -0
- package/dist/react/tree.d.ts +31 -0
- package/dist/react/tree.d.ts.map +1 -0
- package/dist/react/tree.js +37 -0
- package/dist/shared-words-BfnT24Fe.js +1635 -0
- package/dist/shared-words-BfnT24Fe.js.map +1 -0
- package/dist/shared-words-CyZYc_De.js +1818 -0
- package/dist/shared-words-CyZYc_De.js.map +1 -0
- package/dist/shared-words-DAVSET4Z.js +1800 -0
- package/dist/shared-words-DAVSET4Z.js.map +1 -0
- package/dist/shared-words-UCvnkctb.js +1653 -0
- package/dist/shared-words-UCvnkctb.js.map +1 -0
- package/package.json +16 -5
- package/DS1/2-core/ds-banner.ts +0 -122
- package/DS1/2-core/ds-date.ts +0 -24
- package/DS1/2-core/ds-language.ts +0 -94
- package/DS1/2-core/ds-pagedots.ts +0 -52
- package/DS1/2-core/ds-split.ts +0 -122
- package/DS1/2-core/ds-textarea.ts +0 -136
- package/DS1/2-core/styles/ds-banner.css +0 -77
- package/DS1/2-core/styles/ds-date.css +0 -9
- package/DS1/2-core/styles/ds-language.css +0 -78
- package/DS1/2-core/styles/ds-pagedots.css +0 -31
- package/DS1/2-core/styles/ds-textarea.css +0 -27
- package/DS1/4-page/ds-layout.ts +0 -949
- package/DS1/4-page/styles/ds-layout.css +0 -246
- package/DS1/react/split.ts +0 -42
- package/DS1/x-icon/ezo-accordion-chevron.svg +0 -11
- package/DS1/x-icon/ezo-account-close.svg +0 -1
- package/DS1/x-icon/ezo-android-screen-archive.svg +0 -4
- package/DS1/x-icon/ezo-android-screen-calendar.svg +0 -6
- package/DS1/x-icon/ezo-android-screen-camera.svg +0 -5
- package/DS1/x-icon/ezo-android-screen-check.svg +0 -3
- package/DS1/x-icon/ezo-android-screen-compose.svg +0 -4
- package/DS1/x-icon/ezo-android-screen-globe.svg +0 -1
- package/DS1/x-icon/ezo-android-screen-shared.svg +0 -5
- package/DS1/x-icon/ezo-android-screen-store.svg +0 -4
- package/DS1/x-icon/ezo-android-screen-views.svg +0 -4
- package/DS1/x-icon/ezo-android-screen-work.svg +0 -3
- package/DS1/x-icon/ezo-arrow-cursor.svg +0 -8
- package/DS1/x-icon/ezo-block-accordion.svg +0 -1
- package/DS1/x-icon/ezo-block-divider.svg +0 -1
- package/DS1/x-icon/ezo-block-group.svg +0 -1
- package/DS1/x-icon/ezo-block-image.svg +0 -1
- package/DS1/x-icon/ezo-block-section.svg +0 -1
- package/DS1/x-icon/ezo-block-table.svg +0 -1
- package/DS1/x-icon/ezo-code.svg +0 -14
- package/DS1/x-icon/ezo-down.svg +0 -3
- package/DS1/x-icon/ezo-figma-premium-star.svg +0 -5
- package/DS1/x-icon/ezo-item-button-complete.svg +0 -4
- package/DS1/x-icon/ezo-item-button-header.svg +0 -3
- package/DS1/x-icon/ezo-item-button-open.svg +0 -3
- package/DS1/x-icon/ezo-item-button-star.svg +0 -3
- package/DS1/x-icon/ezo-item-button-unheader.svg +0 -7
- package/DS1/x-icon/ezo-item-button-unstar.svg +0 -5
- package/DS1/x-icon/ezo-item-star.svg +0 -5
- package/DS1/x-icon/ezo-left.svg +0 -3
- package/DS1/x-icon/ezo-logo.svg +0 -1
- package/DS1/x-icon/ezo-mic.svg +0 -8
- package/DS1/x-icon/ezo-move-column.svg +0 -14
- package/DS1/x-icon/ezo-move-row.svg +0 -18
- package/DS1/x-icon/ezo-navigation-check.svg +0 -1
- package/DS1/x-icon/ezo-note-back.svg +0 -5
- package/DS1/x-icon/ezo-note-menu-complete.svg +0 -11
- package/DS1/x-icon/ezo-note-menu-delete.svg +0 -4
- package/DS1/x-icon/ezo-note-menu-duplicate.svg +0 -8
- package/DS1/x-icon/ezo-note-menu-note.svg +0 -5
- package/DS1/x-icon/ezo-note-menu-page.svg +0 -3
- package/DS1/x-icon/ezo-note-menu-star.svg +0 -5
- package/DS1/x-icon/ezo-note-menu-start.svg +0 -6
- package/DS1/x-icon/ezo-note-menu-stop.svg +0 -6
- package/DS1/x-icon/ezo-note-more.svg +0 -7
- package/DS1/x-icon/ezo-note-star.svg +0 -5
- package/DS1/x-icon/ezo-pattern-call-to-action.svg +0 -1
- package/DS1/x-icon/ezo-play.svg +0 -5
- package/DS1/x-icon/ezo-premium-star.svg +0 -5
- package/DS1/x-icon/ezo-setting-1xdots.svg +0 -13
- package/DS1/x-icon/ezo-setting-1xgrid.svg +0 -10
- package/DS1/x-icon/ezo-setting-1xlines.svg +0 -7
- package/DS1/x-icon/ezo-setting-2xdots.svg +0 -8
- package/DS1/x-icon/ezo-setting-2xgrid.svg +0 -8
- package/DS1/x-icon/ezo-setting-2xlines.svg +0 -6
- package/DS1/x-icon/ezo-setting-blank.svg +0 -5
- package/DS1/x-icon/ezo-store-chevron.svg +0 -1
- package/DS1/x-icon/ezo-upgrade-close.svg +0 -5
- package/DS1/x-icon/product-sources.json +0 -2557
- /package/DS1/x-icon/{ezo-password-visibility-see.svg → password-see.svg} +0 -0
- /package/DS1/x-icon/{ezo-password-visibility-unsee.svg → password-unsee.svg} +0 -0
package/dist/2-core/ds-cycle.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { LitElement, html, unsafeCSS } from "lit";
|
|
2
2
|
import { define } from "../0-face/define";
|
|
3
3
|
import { translate, currentLanguage, getAvailableLanguagesSync, getLanguageDisplayName, setLanguage, } from "../0-face/i18n";
|
|
4
|
-
import {
|
|
4
|
+
import { LANGUAGE_METADATA, isLanguage, normalizeLanguage } from "../0-face/languages";
|
|
5
|
+
import { currentThemeMode, setThemeMode, THEME_MODES } from "../0-face/theme";
|
|
5
6
|
import { savePreferences } from "../0-face/preferences";
|
|
6
7
|
import "./ds-button";
|
|
7
8
|
import "./ds-icon";
|
|
@@ -33,13 +34,34 @@ const getPageStyle = () => {
|
|
|
33
34
|
return localStorage.getItem("pageStyle") || "note"; // Default to note
|
|
34
35
|
};
|
|
35
36
|
// App width utilities removed
|
|
37
|
+
// The settings a cycle knows by name. Any other cycle steps through its own
|
|
38
|
+
// `values` and reports each step as a `change` event.
|
|
39
|
+
/**
|
|
40
|
+
* A language's name in the language itself (`Dansk`, `日本語`): from the
|
|
41
|
+
* language list, else from the browser, else the code.
|
|
42
|
+
*/
|
|
43
|
+
export function nativeLanguageName(code) {
|
|
44
|
+
if (!code)
|
|
45
|
+
return "";
|
|
46
|
+
if (isLanguage(code))
|
|
47
|
+
return LANGUAGE_METADATA[code].nativeLabel;
|
|
48
|
+
const member = normalizeLanguage(code, null);
|
|
49
|
+
if (member)
|
|
50
|
+
return LANGUAGE_METADATA[member].nativeLabel;
|
|
51
|
+
return getLanguageDisplayName(code, { locale: code });
|
|
52
|
+
}
|
|
53
|
+
const SETTINGS = new Set(["language", "theme", "accent-color", "notes-style-medium", "page-style", "icon-only"]);
|
|
36
54
|
// Use a regular class with proper TypeScript type declarations and JSDoc comments
|
|
37
55
|
export class Cycle extends LitElement {
|
|
38
56
|
// Define reactive properties using Lit's property system
|
|
39
57
|
static get properties() {
|
|
40
58
|
return {
|
|
41
|
-
type: { type: String },
|
|
59
|
+
type: { type: String, reflect: true },
|
|
60
|
+
// The language picker as a chip, the cycle's button, instead of an item.
|
|
61
|
+
chip: { type: Boolean, reflect: true },
|
|
42
62
|
values: { type: Array },
|
|
63
|
+
value: { type: String },
|
|
64
|
+
label: { type: String, reflect: true },
|
|
43
65
|
currentValue: { type: String, state: true }, // Make this a private state property
|
|
44
66
|
translationsReady: { type: Boolean, state: true }, // Track if translations are loaded
|
|
45
67
|
disabled: { type: Boolean, reflect: true },
|
|
@@ -60,7 +82,10 @@ export class Cycle extends LitElement {
|
|
|
60
82
|
this.variant = "";
|
|
61
83
|
// Initialize properties with default values
|
|
62
84
|
this.type = "";
|
|
85
|
+
this.chip = false;
|
|
63
86
|
this.values = [];
|
|
87
|
+
this.value = "";
|
|
88
|
+
this.label = "";
|
|
64
89
|
this.currentValue = "";
|
|
65
90
|
this.translationsReady = false;
|
|
66
91
|
this.disabled = false;
|
|
@@ -89,7 +114,8 @@ export class Cycle extends LitElement {
|
|
|
89
114
|
// Initialize the component
|
|
90
115
|
this.initializeValues();
|
|
91
116
|
}
|
|
92
|
-
|
|
117
|
+
// Synchronous: nothing here waits, and a thrown error should surface where it happens.
|
|
118
|
+
initializeValues() {
|
|
93
119
|
if (this.type === "language") {
|
|
94
120
|
// Dynamically get available languages from translation data
|
|
95
121
|
const availableLanguages = getAvailableLanguagesSync();
|
|
@@ -97,11 +123,9 @@ export class Cycle extends LitElement {
|
|
|
97
123
|
this.currentValue = currentLanguage.value;
|
|
98
124
|
}
|
|
99
125
|
else if (this.type === "theme") {
|
|
100
|
-
//
|
|
101
|
-
this.values = [
|
|
102
|
-
|
|
103
|
-
const currentThemeValue = currentTheme.get();
|
|
104
|
-
this.currentValue = currentThemeValue;
|
|
126
|
+
// Light, dark and the system's, the stored choice
|
|
127
|
+
this.values = [...THEME_MODES];
|
|
128
|
+
this.currentValue = currentThemeMode.get();
|
|
105
129
|
}
|
|
106
130
|
else if (this.type === "accent-color") {
|
|
107
131
|
// Set up accent color cycling
|
|
@@ -154,16 +178,15 @@ export class Cycle extends LitElement {
|
|
|
154
178
|
this.initializeValues();
|
|
155
179
|
}
|
|
156
180
|
}
|
|
157
|
-
|
|
181
|
+
setupInitialValue() {
|
|
158
182
|
if (this.type === "language") {
|
|
159
183
|
// Get current language
|
|
160
184
|
const currentLang = currentLanguage.value;
|
|
161
185
|
this.currentValue = currentLang;
|
|
162
186
|
}
|
|
163
187
|
else if (this.type === "theme") {
|
|
164
|
-
//
|
|
165
|
-
|
|
166
|
-
this.currentValue = currentThemeValue;
|
|
188
|
+
// The stored choice, which may be the system's
|
|
189
|
+
this.currentValue = currentThemeMode.get();
|
|
167
190
|
}
|
|
168
191
|
else if (this.type === "accent-color") {
|
|
169
192
|
// Get current accent color
|
|
@@ -238,8 +261,8 @@ export class Cycle extends LitElement {
|
|
|
238
261
|
const newTheme = this.values[nextIndex];
|
|
239
262
|
// Update current value
|
|
240
263
|
this.currentValue = newTheme;
|
|
241
|
-
// Set the new
|
|
242
|
-
|
|
264
|
+
// Set the new choice using the shared helper
|
|
265
|
+
setThemeMode(newTheme);
|
|
243
266
|
// Save preferences
|
|
244
267
|
savePreferences({ theme: newTheme });
|
|
245
268
|
// Theme helper already emits the change event, so no manual dispatch here
|
|
@@ -310,14 +333,17 @@ export class Cycle extends LitElement {
|
|
|
310
333
|
detail: { behavior: newIconOnlyValue },
|
|
311
334
|
}));
|
|
312
335
|
}
|
|
336
|
+
else if (!SETTINGS.has(this.type)) {
|
|
337
|
+
const next = this.values[(this.values.indexOf(this.currentValue) + 1) % this.values.length];
|
|
338
|
+
this.currentValue = this.value = next;
|
|
339
|
+
this.dispatchEvent(new CustomEvent("change", { detail: { value: next }, bubbles: true, composed: true }));
|
|
340
|
+
}
|
|
313
341
|
// Request update to re-render
|
|
314
342
|
this.requestUpdate();
|
|
315
343
|
}
|
|
316
344
|
getValueDisplay(value) {
|
|
317
345
|
if (this.type === "language") {
|
|
318
|
-
return
|
|
319
|
-
locale: currentLanguage.value,
|
|
320
|
-
});
|
|
346
|
+
return nativeLanguageName(value);
|
|
321
347
|
}
|
|
322
348
|
else if (this.type === "theme") {
|
|
323
349
|
// Try to get translated theme name
|
|
@@ -422,6 +448,14 @@ export class Cycle extends LitElement {
|
|
|
422
448
|
* first paint, so the inner button and any page sheet see the same word.
|
|
423
449
|
*/
|
|
424
450
|
willUpdate(changed) {
|
|
451
|
+
// A cycle through its own values shows `value` when it is one of them,
|
|
452
|
+
// and otherwise the first.
|
|
453
|
+
if (!SETTINGS.has(this.type) && this.values.length) {
|
|
454
|
+
if (changed.has("value") && this.values.includes(this.value))
|
|
455
|
+
this.currentValue = this.value;
|
|
456
|
+
else if (!this.values.includes(this.currentValue))
|
|
457
|
+
this.currentValue = this.values.includes(this.value) ? this.value : this.values[0];
|
|
458
|
+
}
|
|
425
459
|
if (changed.has("variant") && this.variant) {
|
|
426
460
|
this.primary = this.variant === "primary";
|
|
427
461
|
this.secondary = this.variant === "secondary";
|
|
@@ -433,10 +467,53 @@ export class Cycle extends LitElement {
|
|
|
433
467
|
this.primary = true;
|
|
434
468
|
}
|
|
435
469
|
}
|
|
470
|
+
/** The words the face shows for the current value, for the accessible name. */
|
|
471
|
+
valueText() {
|
|
472
|
+
const value = this.currentValue;
|
|
473
|
+
if (this.type === "language")
|
|
474
|
+
return nativeLanguageName(value);
|
|
475
|
+
if (this.type === "theme")
|
|
476
|
+
return translate(value === "light" ? "Light" : value === "dark" ? "Dark" : "System");
|
|
477
|
+
if (this.type === "accent-color")
|
|
478
|
+
return translate(this.getColorKey(value));
|
|
479
|
+
if (this.type === "page-style" || this.type === "icon-only")
|
|
480
|
+
return translate(value === "note" ? "Note" : "Page");
|
|
481
|
+
return value;
|
|
482
|
+
}
|
|
483
|
+
/** "Size: 40" when the cycle has a label, so the control is named while its face shows the value alone. */
|
|
484
|
+
accessibleLabel() {
|
|
485
|
+
if (this.label)
|
|
486
|
+
return `${translate(this.label)}: ${this.valueText()}`;
|
|
487
|
+
// The language picker is always named: "Language: Dansk".
|
|
488
|
+
return this.type === "language" ? `${translate("Language")}: ${this.valueText()}` : "";
|
|
489
|
+
}
|
|
490
|
+
/**
|
|
491
|
+
* The language picker: a native button carrying the language's code as
|
|
492
|
+
* `lang`, so each name is set in its own typeface. An item on its own, eight
|
|
493
|
+
* squares wide (four with `compact`); with `chip`, the cycle's button around it.
|
|
494
|
+
*/
|
|
495
|
+
renderLanguagePicker() {
|
|
496
|
+
const code = this.currentValue || currentLanguage.value;
|
|
497
|
+
const button = html `<button
|
|
498
|
+
type="button"
|
|
499
|
+
lang=${code}
|
|
500
|
+
aria-label=${this.accessibleLabel()}
|
|
501
|
+
?disabled=${this.disabled || this._fieldsetDisabled}
|
|
502
|
+
@click=${this.handleButtonClick}
|
|
503
|
+
>
|
|
504
|
+
${nativeLanguageName(code)}
|
|
505
|
+
</button>`;
|
|
506
|
+
return this.chip ? html `<ds-button fit control="slotted"
|
|
507
|
+
?primary=${this.primary && !this.secondary} ?secondary=${this.secondary}
|
|
508
|
+
?disabled=${this.disabled || this._fieldsetDisabled}>${button}</ds-button>` : button;
|
|
509
|
+
}
|
|
436
510
|
render() {
|
|
511
|
+
if (this.type === "language")
|
|
512
|
+
return this.renderLanguagePicker();
|
|
437
513
|
return html `
|
|
438
514
|
<div class="cycle">
|
|
439
515
|
<ds-button fit
|
|
516
|
+
.label=${this.accessibleLabel()}
|
|
440
517
|
?primary=${this.primary && !this.secondary}
|
|
441
518
|
?secondary=${this.secondary}
|
|
442
519
|
?disabled=${this.disabled || this._fieldsetDisabled}
|
|
@@ -453,7 +530,7 @@ export class Cycle extends LitElement {
|
|
|
453
530
|
></ds-text>`
|
|
454
531
|
: this.type === "theme"
|
|
455
532
|
? html `<ds-text
|
|
456
|
-
text=${this.currentValue === "light" ? "Light" : "Dark"}
|
|
533
|
+
text=${this.currentValue === "light" ? "Light" : this.currentValue === "dark" ? "Dark" : "System"}
|
|
457
534
|
></ds-text>`
|
|
458
535
|
: this.type === "accent-color"
|
|
459
536
|
? html `<ds-text
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
import "./ds-icon";
|
|
3
|
+
/** The shared words' title for an empty place, in the current language. */
|
|
4
|
+
export declare const EMPTY_HEADING = "Nothing here yet";
|
|
5
|
+
/**
|
|
6
|
+
* @element ds-empty
|
|
7
|
+
* @prop {string} heading - The title: a translation key, or the words as they
|
|
8
|
+
* stand with `literal`. Unset, the shared words' "Nothing here yet".
|
|
9
|
+
* @prop {string} text - The line under it: a translation key, or literal words.
|
|
10
|
+
* @prop {boolean} literal - Show `heading` and `text` as written, never looked up.
|
|
11
|
+
* @prop {string} icon - An icon from the library on the square above the title.
|
|
12
|
+
* @prop {boolean} centered - Centre the words in the space the element stands in.
|
|
13
|
+
* @prop {number} level - Make the title a heading of this level (1–6).
|
|
14
|
+
*
|
|
15
|
+
* @slot - The text, when it needs more than words: a link, a strong word.
|
|
16
|
+
* @slot heading - The title, as inline content.
|
|
17
|
+
* @slot icon - An icon of the page's own, in place of `icon`.
|
|
18
|
+
* @slot actions - The buttons or links that fill the place, on one row.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* <ds-empty icon="search" heading="No results" text="Try another word.">
|
|
22
|
+
* <ds-button slot="actions" secondary>Clear the search</ds-button>
|
|
23
|
+
* </ds-empty>
|
|
24
|
+
*/
|
|
25
|
+
export declare class Empty extends LitElement {
|
|
26
|
+
static properties: {
|
|
27
|
+
heading: {
|
|
28
|
+
type: StringConstructor;
|
|
29
|
+
};
|
|
30
|
+
text: {
|
|
31
|
+
type: StringConstructor;
|
|
32
|
+
};
|
|
33
|
+
literal: {
|
|
34
|
+
type: BooleanConstructor;
|
|
35
|
+
reflect: boolean;
|
|
36
|
+
};
|
|
37
|
+
icon: {
|
|
38
|
+
type: StringConstructor;
|
|
39
|
+
};
|
|
40
|
+
centered: {
|
|
41
|
+
type: BooleanConstructor;
|
|
42
|
+
reflect: boolean;
|
|
43
|
+
};
|
|
44
|
+
level: {
|
|
45
|
+
type: NumberConstructor;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
static styles: import("lit").CSSResult[];
|
|
49
|
+
heading: string | undefined;
|
|
50
|
+
text: string | undefined;
|
|
51
|
+
literal: boolean;
|
|
52
|
+
icon: string | undefined;
|
|
53
|
+
centered: boolean;
|
|
54
|
+
level: number | undefined;
|
|
55
|
+
private readonly relabel;
|
|
56
|
+
constructor();
|
|
57
|
+
connectedCallback(): void;
|
|
58
|
+
disconnectedCallback(): void;
|
|
59
|
+
private words;
|
|
60
|
+
/**
|
|
61
|
+
* Whether light-DOM content fills a slot: elements, or text that is not
|
|
62
|
+
* blank. The blank text between slotted children still counts as assigned
|
|
63
|
+
* to the default slot and hides its fallback, so `text` is drawn beside the
|
|
64
|
+
* slot rather than inside it.
|
|
65
|
+
*/
|
|
66
|
+
private slotted;
|
|
67
|
+
render(): import("lit").TemplateResult<1>;
|
|
68
|
+
}
|
|
69
|
+
declare global {
|
|
70
|
+
interface HTMLElementTagNameMap {
|
|
71
|
+
"ds-empty": Empty;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=ds-empty.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ds-empty.d.ts","sourceRoot":"","sources":["../../DS1/2-core/ds-empty.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAA4B,MAAM,KAAK,CAAC;AAG3D,OAAO,WAAW,CAAC;AAKnB,2EAA2E;AAC3E,eAAO,MAAM,aAAa,qBAAqB,CAAC;AAEhD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,KAAM,SAAQ,UAAU;IACnC,MAAM,CAAC,UAAU;;;;;;;;;;;;;;;;;;;;;MAOf;IAEF,MAAM,CAAC,MAAM,4BAA6D;IAElE,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAElC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA8B;;IAQtD,iBAAiB;IAMjB,oBAAoB;IAMpB,OAAO,CAAC,KAAK;IAKb;;;;;OAKG;IACH,OAAO,CAAC,OAAO;IAMf,MAAM;CAoBP;AAID,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,UAAU,EAAE,KAAK,CAAC;KACnB;CACF"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
// ds-empty.ts
|
|
2
|
+
// An empty state: a place with nothing in it yet, and what to do about it.
|
|
3
|
+
// Drawn by 1-root/empty.css, the same classes a page without scripts writes.
|
|
4
|
+
import { LitElement, html, nothing, unsafeCSS } from "lit";
|
|
5
|
+
import { getText } from "../0-face/i18n";
|
|
6
|
+
import { define } from "../0-face/define";
|
|
7
|
+
import "./ds-icon";
|
|
8
|
+
import metrics from "../1-root/component-metrics.css?inline";
|
|
9
|
+
import empty from "../1-root/empty.css?inline";
|
|
10
|
+
import styles from "./styles/ds-empty.css?inline";
|
|
11
|
+
/** The shared words' title for an empty place, in the current language. */
|
|
12
|
+
export const EMPTY_HEADING = "Nothing here yet";
|
|
13
|
+
/**
|
|
14
|
+
* @element ds-empty
|
|
15
|
+
* @prop {string} heading - The title: a translation key, or the words as they
|
|
16
|
+
* stand with `literal`. Unset, the shared words' "Nothing here yet".
|
|
17
|
+
* @prop {string} text - The line under it: a translation key, or literal words.
|
|
18
|
+
* @prop {boolean} literal - Show `heading` and `text` as written, never looked up.
|
|
19
|
+
* @prop {string} icon - An icon from the library on the square above the title.
|
|
20
|
+
* @prop {boolean} centered - Centre the words in the space the element stands in.
|
|
21
|
+
* @prop {number} level - Make the title a heading of this level (1–6).
|
|
22
|
+
*
|
|
23
|
+
* @slot - The text, when it needs more than words: a link, a strong word.
|
|
24
|
+
* @slot heading - The title, as inline content.
|
|
25
|
+
* @slot icon - An icon of the page's own, in place of `icon`.
|
|
26
|
+
* @slot actions - The buttons or links that fill the place, on one row.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* <ds-empty icon="search" heading="No results" text="Try another word.">
|
|
30
|
+
* <ds-button slot="actions" secondary>Clear the search</ds-button>
|
|
31
|
+
* </ds-empty>
|
|
32
|
+
*/
|
|
33
|
+
export class Empty extends LitElement {
|
|
34
|
+
constructor() {
|
|
35
|
+
super();
|
|
36
|
+
this.relabel = () => this.requestUpdate();
|
|
37
|
+
this.literal = false;
|
|
38
|
+
this.centered = false;
|
|
39
|
+
}
|
|
40
|
+
connectedCallback() {
|
|
41
|
+
super.connectedCallback();
|
|
42
|
+
window.addEventListener("language-changed", this.relabel);
|
|
43
|
+
window.addEventListener("translations-loaded", this.relabel);
|
|
44
|
+
}
|
|
45
|
+
disconnectedCallback() {
|
|
46
|
+
window.removeEventListener("language-changed", this.relabel);
|
|
47
|
+
window.removeEventListener("translations-loaded", this.relabel);
|
|
48
|
+
super.disconnectedCallback();
|
|
49
|
+
}
|
|
50
|
+
words(value) {
|
|
51
|
+
if (!value)
|
|
52
|
+
return "";
|
|
53
|
+
return this.literal ? value : getText(value) || value;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Whether light-DOM content fills a slot: elements, or text that is not
|
|
57
|
+
* blank. The blank text between slotted children still counts as assigned
|
|
58
|
+
* to the default slot and hides its fallback, so `text` is drawn beside the
|
|
59
|
+
* slot rather than inside it.
|
|
60
|
+
*/
|
|
61
|
+
slotted(name) {
|
|
62
|
+
return [...this.childNodes].some(node => name
|
|
63
|
+
? node instanceof Element && node.getAttribute("slot") === name
|
|
64
|
+
: node instanceof Element ? !node.hasAttribute("slot") : node.nodeType === Node.TEXT_NODE && Boolean(node.textContent?.trim()));
|
|
65
|
+
}
|
|
66
|
+
render() {
|
|
67
|
+
const heading = this.heading ? this.words(this.heading) : getText(EMPTY_HEADING) || EMPTY_HEADING;
|
|
68
|
+
const text = this.words(this.text);
|
|
69
|
+
const hasIcon = Boolean(this.icon) || this.slotted("icon");
|
|
70
|
+
const slottedText = this.slotted("");
|
|
71
|
+
const hasText = Boolean(text) || slottedText;
|
|
72
|
+
const hasActions = this.slotted("actions");
|
|
73
|
+
const level = this.level && this.level >= 1 && this.level <= 6 ? Math.round(this.level) : undefined;
|
|
74
|
+
const changed = () => this.requestUpdate();
|
|
75
|
+
return html `<div class="ds-empty${this.centered ? " ds-empty--centered" : ""}" part="empty">
|
|
76
|
+
<div class="ds-empty__icon" part="icon" aria-hidden="true" ?hidden=${!hasIcon}>
|
|
77
|
+
<slot name="icon" @slotchange=${changed}>${this.icon ? html `<ds-icon size="large" .type=${this.icon}></ds-icon>` : nothing}</slot>
|
|
78
|
+
</div>
|
|
79
|
+
<div class="ds-empty__title" part="title" role=${level ? "heading" : nothing} aria-level=${level ?? nothing}>
|
|
80
|
+
<slot name="heading" @slotchange=${changed}>${heading}</slot>
|
|
81
|
+
</div>
|
|
82
|
+
<div class="ds-empty__text" part="text" ?hidden=${!hasText}><slot @slotchange=${changed}></slot>${slottedText ? nothing : text}</div>
|
|
83
|
+
<div class="ds-empty__actions" part="actions" ?hidden=${!hasActions}><slot name="actions" @slotchange=${changed}></slot></div>
|
|
84
|
+
</div>`;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
Empty.properties = {
|
|
88
|
+
heading: { type: String },
|
|
89
|
+
text: { type: String },
|
|
90
|
+
literal: { type: Boolean, reflect: true },
|
|
91
|
+
icon: { type: String },
|
|
92
|
+
centered: { type: Boolean, reflect: true },
|
|
93
|
+
level: { type: Number },
|
|
94
|
+
};
|
|
95
|
+
Empty.styles = [unsafeCSS(metrics), unsafeCSS(empty), unsafeCSS(styles)];
|
|
96
|
+
define("ds-empty", Empty);
|
package/dist/2-core/ds-icon.d.ts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
2
|
import type { IconName } from "./generated/ds-icon-map";
|
|
3
|
+
/**
|
|
4
|
+
* Make library drawings available at once, outside the immediate set: a
|
|
5
|
+
* component that always draws one icon (ds-avatar's person) ships that
|
|
6
|
+
* drawing with itself, so it never waits for the deferred chunk.
|
|
7
|
+
*/
|
|
8
|
+
export declare function provideIcons(icons: Readonly<Record<string, string>>): void;
|
|
3
9
|
export declare function themeIconSvg(svg: string): string;
|
|
4
10
|
export type IconVariant = "glyph" | "primary" | "secondary";
|
|
5
11
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ds-icon.d.ts","sourceRoot":"","sources":["../../DS1/2-core/ds-icon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAmB,MAAM,KAAK,CAAC;AAGlD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"ds-icon.d.ts","sourceRoot":"","sources":["../../DS1/2-core/ds-icon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAmB,MAAM,KAAK,CAAC;AAGlD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAOxD;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAAG,IAAI,CAE1E;AA2CD,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAMhD;AAED,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,SAAS,GAAG,WAAW,CAAC;AAE5D;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,IAAK,SAAQ,UAAU;IAClC,MAAM,CAAC,UAAU;;;;;;;;;;;;;MAIf;IAEF,OAAO,CAAC,KAAK,CAAqB;IAClC,OAAO,CAAC,WAAW,CAA4B;IAC/C,OAAO,CAAC,WAAW,CAAqB;IAChC,OAAO,EAAE,WAAW,CAAC;IACrB,IAAI,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS,CAAC;;IAO5C,IAAI,IAAI,IAAI,QAAQ,GAAG,EAAE,CAExB;IAED,IAAI,IAAI,CAAC,GAAG,EAAE,QAAQ,GAAG,EAAE,EAI1B;IAED,8EAA8E;cAC9D,iBAAiB,IAAI,OAAO,CAAC,OAAO,CAAC;IAMrD,MAAM,CAAC,MAAM,0BAAqB;IAElC,MAAM;CAiCP;AAID,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,SAAS,EAAE,IAAI,CAAC;KACjB;CACF;AAED,YAAY,EAAE,QAAQ,EAAE,CAAC"}
|
package/dist/2-core/ds-icon.js
CHANGED
|
@@ -5,6 +5,16 @@ import { icons as immediateIcons, deferredIconNames } from "./generated/icons-im
|
|
|
5
5
|
import { define } from "../0-face/define";
|
|
6
6
|
const iconNameToSvgMap = { ...immediateIcons };
|
|
7
7
|
const deferred = new Set(deferredIconNames);
|
|
8
|
+
/**
|
|
9
|
+
* Make library drawings available at once, outside the immediate set: a
|
|
10
|
+
* component that always draws one icon (ds-avatar's person) ships that
|
|
11
|
+
* drawing with itself, so it never waits for the deferred chunk.
|
|
12
|
+
*/
|
|
13
|
+
export function provideIcons(icons) {
|
|
14
|
+
var _a;
|
|
15
|
+
for (const [name, svg] of Object.entries(icons))
|
|
16
|
+
iconNameToSvgMap[_a = name.toLowerCase()] ?? (iconNameToSvgMap[_a] = svg);
|
|
17
|
+
}
|
|
8
18
|
let extraReady = false;
|
|
9
19
|
let extraLoading;
|
|
10
20
|
function loadExtraIcons() {
|
|
@@ -26,8 +36,8 @@ function loadExtraIcons() {
|
|
|
26
36
|
* one-colour icon is turned over to `currentColor` here, where the component
|
|
27
37
|
* puts it on the page, so it takes the colour of the text around it.
|
|
28
38
|
*
|
|
29
|
-
* An icon with colours of its own is left exactly as drawn.
|
|
30
|
-
*
|
|
39
|
+
* An icon with colours of its own is left exactly as drawn. The block and
|
|
40
|
+
* pattern tiles set dark ink on a coloured ground, and a brand mark keeps
|
|
31
41
|
* the colours that make it that brand. `white` never counts as a colour: in
|
|
32
42
|
* this set it is the rectangle inside a `<clipPath>`.
|
|
33
43
|
*/
|
|
@@ -6,8 +6,30 @@ export declare class Input extends LitElement {
|
|
|
6
6
|
private internals;
|
|
7
7
|
private initialValue;
|
|
8
8
|
static properties: PropertyDeclarations;
|
|
9
|
-
type: "text" | "password" | "email" | "number" | "tel" | "url" | "search" | "date" | "time" | "datetime-local";
|
|
9
|
+
type: "text" | "password" | "email" | "number" | "tel" | "url" | "search" | "date" | "month" | "week" | "time" | "datetime-local";
|
|
10
|
+
multiline: boolean;
|
|
11
|
+
rows: number;
|
|
12
|
+
maxRows: number;
|
|
13
|
+
autoGrow: boolean;
|
|
14
|
+
wrap: "soft" | "hard" | "off";
|
|
15
|
+
private resizeFrame;
|
|
16
|
+
private measuredWidth;
|
|
17
|
+
private resizeObserver?;
|
|
18
|
+
private readonly fontsChanged;
|
|
10
19
|
inputMode: string;
|
|
20
|
+
/** The return key's label on a touch keyboard: enter, done, go, next, previous, search or send. */
|
|
21
|
+
enterKeyHint: string;
|
|
22
|
+
/**
|
|
23
|
+
* The id of a `<datalist>` beside the field. A shadow root keeps the inner
|
|
24
|
+
* input from reaching it, so its options are mirrored inside, and kept in step.
|
|
25
|
+
*/
|
|
26
|
+
list: string;
|
|
27
|
+
/** Suggestions offered while typing, as a datalist would. Wins over `list`. */
|
|
28
|
+
suggestions: readonly (string | {
|
|
29
|
+
value: string;
|
|
30
|
+
label?: string;
|
|
31
|
+
})[];
|
|
32
|
+
private listObserver?;
|
|
11
33
|
ariaLabel: string;
|
|
12
34
|
ariaLabelledBy: string;
|
|
13
35
|
ariaDescribedBy: string;
|
|
@@ -46,7 +68,19 @@ export declare class Input extends LitElement {
|
|
|
46
68
|
connectedCallback(): void;
|
|
47
69
|
disconnectedCallback(): void;
|
|
48
70
|
firstUpdated(): void;
|
|
71
|
+
willUpdate(changed: Map<string, unknown>): void;
|
|
49
72
|
updated(changedProperties: Map<string, unknown>): void;
|
|
73
|
+
private listSource;
|
|
74
|
+
private observeList;
|
|
75
|
+
/** The options the field offers, from `suggestions` or the named datalist. */
|
|
76
|
+
protected suggestionOptions(): {
|
|
77
|
+
value: string;
|
|
78
|
+
label?: string;
|
|
79
|
+
}[];
|
|
80
|
+
protected renderSuggestions(options: {
|
|
81
|
+
value: string;
|
|
82
|
+
label?: string;
|
|
83
|
+
}[]): import("lit").TemplateResult<1> | null;
|
|
50
84
|
protected get input(): HTMLInputElement | HTMLTextAreaElement | null;
|
|
51
85
|
protected get isMultiline(): boolean;
|
|
52
86
|
get selectionStart(): number | null;
|
|
@@ -86,6 +120,10 @@ export declare class Input extends LitElement {
|
|
|
86
120
|
* Select all text in the input
|
|
87
121
|
*/
|
|
88
122
|
select(): void;
|
|
123
|
+
/** Grow on the row grid, bounded by maxRows; the remainder scrolls. */
|
|
124
|
+
private resizeToContent;
|
|
125
|
+
/** The multiline field: a native textarea across whole rows. */
|
|
126
|
+
protected renderMultiline(hasError: boolean, description: string): import("lit").TemplateResult<1>;
|
|
89
127
|
protected renderControl(hasError: boolean, description: string): import("lit").TemplateResult<1>;
|
|
90
128
|
render(): import("lit").TemplateResult<1>;
|
|
91
129
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ds-input.d.ts","sourceRoot":"","sources":["../../DS1/2-core/ds-input.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAmB,KAAK,cAAc,EAAE,KAAK,oBAAoB,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"ds-input.d.ts","sourceRoot":"","sources":["../../DS1/2-core/ds-input.ts"],"names":[],"mappings":"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"}
|