@0001-labs/design-system-1 0.0.0-stage → 0.3.0-alpha.13
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/control.ts +99 -0
- package/DS1/0-face/define.ts +5 -0
- package/DS1/0-face/device.ts +414 -0
- package/DS1/0-face/grid-fit.ts +63 -0
- package/DS1/0-face/grid.ts +144 -0
- package/DS1/0-face/i18n.ts +1023 -0
- package/DS1/0-face/language-routing.ts +135 -0
- package/DS1/0-face/language-validator.ts +46 -0
- package/DS1/0-face/languages.ts +242 -0
- package/DS1/0-face/layout-inspector.ts +184 -0
- package/DS1/0-face/preferences.ts +39 -0
- package/DS1/0-face/pricing.ts +57 -0
- package/DS1/0-face/scaling.ts +25 -0
- package/DS1/0-face/shared-words.ts +45 -0
- package/DS1/0-face/theme.ts +58 -0
- package/DS1/0-face/tooltips.ts +82 -0
- package/DS1/0-face/translations/da.json +63 -0
- package/DS1/0-face/translations/de.json +63 -0
- package/DS1/0-face/translations/en.json +63 -0
- package/DS1/0-face/translations/es.json +63 -0
- package/DS1/0-face/translations/fi.json +63 -0
- package/DS1/0-face/translations/fr.json +63 -0
- package/DS1/0-face/translations/is.json +56 -0
- package/DS1/0-face/translations/it.json +63 -0
- package/DS1/0-face/translations/ja.json +63 -0
- package/DS1/0-face/translations/ko.json +63 -0
- package/DS1/0-face/translations/nb.json +63 -0
- package/DS1/0-face/translations/pt-BR.json +63 -0
- package/DS1/0-face/translations/pt.json +63 -0
- package/DS1/0-face/translations/sv.json +63 -0
- package/DS1/0-face/translations/zh.json +63 -0
- package/DS1/0-face/translations-format.ts +216 -0
- package/DS1/1-root/component-appearance.css +32 -0
- package/DS1/1-root/component-metrics.css +21 -0
- package/DS1/1-root/component-tokens.css +90 -0
- package/DS1/1-root/controls.css +261 -0
- package/DS1/1-root/fonts/GT-America-Compressed-Regular.woff2 +0 -0
- package/DS1/1-root/fonts/GT-America-Standard-Medium.woff2 +0 -0
- package/DS1/1-root/fonts/GT-America-Standard-Regular.woff2 +0 -0
- package/DS1/1-root/fonts/GT-Canon-M-Standard-Medium-Trial.woff2 +0 -0
- package/DS1/1-root/fonts/Inter-Arrows.woff2 +0 -0
- package/DS1/1-root/fonts/Inter-LICENSE.md +7 -0
- package/DS1/1-root/fonts/Iosevka-LICENSE.md +7 -0
- package/DS1/1-root/fonts/Iosevka-Regular.woff2 +0 -0
- package/DS1/1-root/grid.css +31 -0
- package/DS1/1-root/one.css +602 -0
- package/DS1/1-root/one.semantic.css +683 -0
- package/DS1/1-root/palette.ts +91 -0
- package/DS1/2-core/ds-avatar.ts +130 -0
- package/DS1/2-core/ds-badge.ts +77 -0
- package/DS1/2-core/ds-banner.ts +122 -0
- package/DS1/2-core/ds-button.ts +163 -0
- package/DS1/2-core/ds-card.ts +137 -0
- package/DS1/2-core/ds-checkbox.ts +14 -0
- package/DS1/2-core/ds-color.ts +32 -0
- package/DS1/2-core/ds-composer.ts +182 -0
- package/DS1/2-core/ds-cycle.ts +628 -0
- package/DS1/2-core/ds-date.ts +24 -0
- package/DS1/2-core/ds-file-picker.ts +83 -0
- package/DS1/2-core/ds-gap.ts +34 -0
- package/DS1/2-core/ds-icon.ts +161 -0
- package/DS1/2-core/ds-input.ts +518 -0
- package/DS1/2-core/ds-language.ts +94 -0
- package/DS1/2-core/ds-pagedots.ts +52 -0
- package/DS1/2-core/ds-radio.ts +25 -0
- package/DS1/2-core/ds-select.ts +44 -0
- package/DS1/2-core/ds-split.ts +122 -0
- package/DS1/2-core/ds-swatch.ts +20 -0
- package/DS1/2-core/ds-switch.ts +13 -0
- package/DS1/2-core/ds-text.ts +190 -0
- package/DS1/2-core/ds-textarea.ts +136 -0
- package/DS1/2-core/ds-token.ts +40 -0
- package/DS1/2-core/ds-tooltip.ts +115 -0
- package/DS1/2-core/generated/ds-icon-map.ts +583 -0
- package/DS1/2-core/generated/icons-extra.ts +243 -0
- package/DS1/2-core/generated/icons-immediate.ts +49 -0
- package/DS1/2-core/styles/ds-avatar.css +125 -0
- package/DS1/2-core/styles/ds-badge.css +26 -0
- package/DS1/2-core/styles/ds-banner.css +77 -0
- package/DS1/2-core/styles/ds-button-host.css +214 -0
- package/DS1/2-core/styles/ds-button.css +131 -0
- package/DS1/2-core/styles/ds-checkbox.css +48 -0
- package/DS1/2-core/styles/ds-color.css +24 -0
- package/DS1/2-core/styles/ds-composer-frame.css +11 -0
- package/DS1/2-core/styles/ds-composer.css +55 -0
- package/DS1/2-core/styles/ds-cycle.css +18 -0
- package/DS1/2-core/styles/ds-date.css +9 -0
- package/DS1/2-core/styles/ds-file-picker.css +66 -0
- package/DS1/2-core/styles/ds-gap.css +71 -0
- package/DS1/2-core/styles/ds-icon.css +44 -0
- package/DS1/2-core/styles/ds-input.css +233 -0
- package/DS1/2-core/styles/ds-language.css +78 -0
- package/DS1/2-core/styles/ds-pagedots.css +31 -0
- package/DS1/2-core/styles/ds-radio.css +83 -0
- package/DS1/2-core/styles/ds-select.css +95 -0
- package/DS1/2-core/styles/ds-split.css +62 -0
- package/DS1/2-core/styles/ds-switch.css +50 -0
- package/DS1/2-core/styles/ds-text.css +87 -0
- package/DS1/2-core/styles/ds-textarea.css +27 -0
- package/DS1/2-core/styles/ds-token.css +9 -0
- package/DS1/2-core/styles/ds-tooltip.css +37 -0
- package/DS1/3-unit/context-trigger.ts +104 -0
- package/DS1/3-unit/ds-accordion.ts +120 -0
- package/DS1/3-unit/ds-avatar-group.ts +99 -0
- package/DS1/3-unit/ds-form.ts +304 -0
- package/DS1/3-unit/ds-list.ts +36 -0
- package/DS1/3-unit/ds-menu.ts +482 -0
- package/DS1/3-unit/ds-row.ts +48 -0
- package/DS1/3-unit/ds-table.ts +68 -0
- package/DS1/3-unit/ds-tabs.ts +77 -0
- package/DS1/3-unit/ds-token-field.ts +127 -0
- package/DS1/3-unit/styles/context-trigger.css +6 -0
- package/DS1/3-unit/styles/ds-accordion.css +64 -0
- package/DS1/3-unit/styles/ds-avatar-group.css +51 -0
- package/DS1/3-unit/styles/ds-list.css +26 -0
- package/DS1/3-unit/styles/ds-menu.css +97 -0
- package/DS1/3-unit/styles/ds-row.css +37 -0
- package/DS1/3-unit/styles/ds-table.css +80 -0
- package/DS1/3-unit/styles/ds-tabs.css +44 -0
- package/DS1/3-unit/styles/ds-token-field.css +11 -0
- package/DS1/4-page/ds-container.ts +28 -0
- package/DS1/4-page/ds-dialog.ts +331 -0
- package/DS1/4-page/ds-grid.ts +74 -0
- package/DS1/4-page/ds-layout.ts +949 -0
- package/DS1/4-page/ds-panel.ts +38 -0
- package/DS1/4-page/email.ts +170 -0
- package/DS1/4-page/styles/ds-container.css +35 -0
- package/DS1/4-page/styles/ds-dialog.css +94 -0
- package/DS1/4-page/styles/ds-grid.css +95 -0
- package/DS1/4-page/styles/ds-layout.css +246 -0
- package/DS1/4-page/styles/ds-panel.css +31 -0
- package/DS1/components.ts +13 -0
- package/DS1/index.ts +86 -0
- package/DS1/react/accordion.ts +33 -0
- package/DS1/react/avatar-group.ts +11 -0
- package/DS1/react/avatar.ts +42 -0
- package/DS1/react/badge.ts +7 -0
- package/DS1/react/button.ts +63 -0
- package/DS1/react/choice.ts +64 -0
- package/DS1/react/composer.ts +18 -0
- package/DS1/react/context-menu.ts +167 -0
- package/DS1/react/dialog.ts +102 -0
- package/DS1/react/file-picker.ts +34 -0
- package/DS1/react/input.ts +184 -0
- package/DS1/react/menu.ts +28 -0
- package/DS1/react/split.ts +42 -0
- package/DS1/react/token-field.ts +32 -0
- package/DS1/vite-env.d.ts +13 -0
- package/DS1/x-icon/1x.svg +4 -0
- package/DS1/x-icon/1xdots.svg +11 -0
- package/DS1/x-icon/1xgrid.svg +8 -0
- package/DS1/x-icon/1xlines.svg +5 -0
- package/DS1/x-icon/2x.svg +4 -0
- package/DS1/x-icon/2xdots.svg +18 -0
- package/DS1/x-icon/2xgrid-alt-2.svg +9 -0
- package/DS1/x-icon/2xgrid-alt-3.svg +8 -0
- package/DS1/x-icon/2xgrid-alt.svg +15 -0
- package/DS1/x-icon/2xgrid.svg +6 -0
- package/DS1/x-icon/2xlines.svg +6 -0
- package/DS1/x-icon/4x4.svg +18 -0
- package/DS1/x-icon/app.svg +4 -0
- package/DS1/x-icon/apple.svg +3 -0
- package/DS1/x-icon/archive-alt.svg +4 -0
- package/DS1/x-icon/archive.svg +4 -0
- package/DS1/x-icon/arrange-archive.svg +1 -0
- package/DS1/x-icon/arrange-check.svg +1 -0
- package/DS1/x-icon/arrange-chevron.svg +1 -0
- package/DS1/x-icon/arrange-connect.svg +1 -0
- package/DS1/x-icon/arrange-draft.svg +1 -0
- package/DS1/x-icon/arrange-dropdown.svg +1 -0
- package/DS1/x-icon/arrange-home.svg +1 -0
- package/DS1/x-icon/arrange-link.svg +1 -0
- package/DS1/x-icon/arrange-menu.svg +1 -0
- package/DS1/x-icon/arrange-more.svg +1 -0
- package/DS1/x-icon/arrange-page.svg +1 -0
- package/DS1/x-icon/arrange-plus.svg +1 -0
- package/DS1/x-icon/arrange-site.svg +1 -0
- package/DS1/x-icon/avatar.svg +4 -0
- package/DS1/x-icon/badge-bands-3d.svg +1 -0
- package/DS1/x-icon/badge-bands.svg +1 -0
- package/DS1/x-icon/badge-blue-fan-3d.svg +1 -0
- package/DS1/x-icon/badge-blue-fan.svg +1 -0
- package/DS1/x-icon/badge-bricks-3d.svg +1 -0
- package/DS1/x-icon/badge-bricks.svg +1 -0
- package/DS1/x-icon/badge-broken-stripes-3d.svg +1 -0
- package/DS1/x-icon/badge-broken-stripes.svg +1 -0
- package/DS1/x-icon/badge-checker-3d.svg +1 -0
- package/DS1/x-icon/badge-checker.svg +1 -0
- package/DS1/x-icon/badge-diamond-3d.svg +1 -0
- package/DS1/x-icon/badge-diamond.svg +1 -0
- package/DS1/x-icon/badge-fan-3d.svg +1 -0
- package/DS1/x-icon/badge-fan-dark-3d.svg +1 -0
- package/DS1/x-icon/badge-fan-dark.svg +1 -0
- package/DS1/x-icon/badge-fan.svg +1 -0
- package/DS1/x-icon/badge-halves-3d.svg +1 -0
- package/DS1/x-icon/badge-halves-green-3d.svg +1 -0
- package/DS1/x-icon/badge-halves-green.svg +1 -0
- package/DS1/x-icon/badge-halves.svg +1 -0
- package/DS1/x-icon/badge-red-3d.svg +1 -0
- package/DS1/x-icon/badge-red-blue-bricks-3d.svg +1 -0
- package/DS1/x-icon/badge-red-blue-bricks.svg +1 -0
- package/DS1/x-icon/badge-red.svg +1 -0
- package/DS1/x-icon/badge-round-fan-3d.svg +1 -0
- package/DS1/x-icon/badge-round-fan.svg +1 -0
- package/DS1/x-icon/badge-shard-3d.svg +1 -0
- package/DS1/x-icon/badge-shard.svg +1 -0
- package/DS1/x-icon/badge-split-circle-3d.svg +1 -0
- package/DS1/x-icon/badge-split-circle.svg +1 -0
- package/DS1/x-icon/badge-tall-bricks-3d.svg +1 -0
- package/DS1/x-icon/badge-tall-bricks.svg +1 -0
- package/DS1/x-icon/badge-weave-3d.svg +1 -0
- package/DS1/x-icon/badge-weave.svg +1 -0
- package/DS1/x-icon/bag.svg +4 -0
- package/DS1/x-icon/block-accordion.svg +1 -0
- package/DS1/x-icon/block-banner.svg +1 -0
- package/DS1/x-icon/block-breadcrumbs.svg +1 -0
- package/DS1/x-icon/block-button.svg +1 -0
- package/DS1/x-icon/block-divider.svg +1 -0
- package/DS1/x-icon/block-forms.svg +1 -0
- package/DS1/x-icon/block-group.svg +1 -0
- package/DS1/x-icon/block-heading.svg +1 -0
- package/DS1/x-icon/block-image.svg +1 -0
- package/DS1/x-icon/block-logo-marquee.svg +1 -0
- package/DS1/x-icon/block-page-progress.svg +1 -0
- package/DS1/x-icon/block-section.svg +1 -0
- package/DS1/x-icon/block-table.svg +1 -0
- package/DS1/x-icon/block-tabs.svg +1 -0
- package/DS1/x-icon/block-text.svg +1 -0
- package/DS1/x-icon/bold.svg +3 -0
- package/DS1/x-icon/bullet.svg +5 -0
- package/DS1/x-icon/calendar.svg +6 -0
- package/DS1/x-icon/callout.svg +5 -0
- package/DS1/x-icon/camera.svg +5 -0
- package/DS1/x-icon/categories.svg +12 -0
- package/DS1/x-icon/check-alt.svg +3 -0
- package/DS1/x-icon/check.svg +3 -0
- package/DS1/x-icon/close.svg +3 -0
- package/DS1/x-icon/code-block.svg +4 -0
- package/DS1/x-icon/code.svg +3 -0
- package/DS1/x-icon/collapse.svg +3 -0
- package/DS1/x-icon/color.svg +4 -0
- package/DS1/x-icon/column.svg +3 -0
- package/DS1/x-icon/comment.svg +3 -0
- package/DS1/x-icon/compose.svg +4 -0
- package/DS1/x-icon/connect.svg +5 -0
- package/DS1/x-icon/content.svg +6 -0
- package/DS1/x-icon/default.svg +4 -0
- package/DS1/x-icon/delete.svg +5 -0
- package/DS1/x-icon/dictate.svg +6 -0
- package/DS1/x-icon/divider.svg +3 -0
- package/DS1/x-icon/down.svg +3 -0
- package/DS1/x-icon/duplicate.svg +8 -0
- package/DS1/x-icon/email.svg +3 -0
- package/DS1/x-icon/equation.svg +3 -0
- package/DS1/x-icon/exercise.svg +3 -0
- package/DS1/x-icon/expand.svg +3 -0
- package/DS1/x-icon/ezo-accordion-chevron.svg +11 -0
- package/DS1/x-icon/ezo-account-close.svg +1 -0
- package/DS1/x-icon/ezo-android-screen-archive.svg +4 -0
- package/DS1/x-icon/ezo-android-screen-calendar.svg +6 -0
- package/DS1/x-icon/ezo-android-screen-camera.svg +5 -0
- package/DS1/x-icon/ezo-android-screen-check.svg +3 -0
- package/DS1/x-icon/ezo-android-screen-compose.svg +4 -0
- package/DS1/x-icon/ezo-android-screen-globe.svg +1 -0
- package/DS1/x-icon/ezo-android-screen-lists.svg +3 -0
- package/DS1/x-icon/ezo-android-screen-shared.svg +5 -0
- package/DS1/x-icon/ezo-android-screen-stats.svg +3 -0
- package/DS1/x-icon/ezo-android-screen-store.svg +4 -0
- package/DS1/x-icon/ezo-android-screen-views.svg +4 -0
- package/DS1/x-icon/ezo-android-screen-work.svg +3 -0
- package/DS1/x-icon/ezo-arrow-cursor.svg +8 -0
- package/DS1/x-icon/ezo-block-accordion.svg +1 -0
- package/DS1/x-icon/ezo-block-divider.svg +1 -0
- package/DS1/x-icon/ezo-block-group.svg +1 -0
- package/DS1/x-icon/ezo-block-image.svg +1 -0
- package/DS1/x-icon/ezo-block-section.svg +1 -0
- package/DS1/x-icon/ezo-block-table.svg +1 -0
- package/DS1/x-icon/ezo-code.svg +14 -0
- package/DS1/x-icon/ezo-down.svg +3 -0
- package/DS1/x-icon/ezo-figma-premium-star.svg +5 -0
- package/DS1/x-icon/ezo-item-button-complete.svg +4 -0
- package/DS1/x-icon/ezo-item-button-header.svg +3 -0
- package/DS1/x-icon/ezo-item-button-open.svg +3 -0
- package/DS1/x-icon/ezo-item-button-reopen.svg +3 -0
- package/DS1/x-icon/ezo-item-button-star.svg +3 -0
- package/DS1/x-icon/ezo-item-button-start.svg +3 -0
- package/DS1/x-icon/ezo-item-button-unheader.svg +7 -0
- package/DS1/x-icon/ezo-item-button-unstar.svg +5 -0
- package/DS1/x-icon/ezo-item-star.svg +5 -0
- package/DS1/x-icon/ezo-left.svg +3 -0
- package/DS1/x-icon/ezo-logo.svg +1 -0
- package/DS1/x-icon/ezo-mic.svg +8 -0
- package/DS1/x-icon/ezo-move-column.svg +14 -0
- package/DS1/x-icon/ezo-move-row.svg +18 -0
- package/DS1/x-icon/ezo-navigation-check.svg +1 -0
- package/DS1/x-icon/ezo-note-back.svg +5 -0
- package/DS1/x-icon/ezo-note-menu-complete.svg +11 -0
- package/DS1/x-icon/ezo-note-menu-delete.svg +4 -0
- package/DS1/x-icon/ezo-note-menu-duplicate.svg +8 -0
- package/DS1/x-icon/ezo-note-menu-note.svg +5 -0
- package/DS1/x-icon/ezo-note-menu-page.svg +3 -0
- package/DS1/x-icon/ezo-note-menu-star.svg +5 -0
- package/DS1/x-icon/ezo-note-menu-start.svg +6 -0
- package/DS1/x-icon/ezo-note-menu-stop.svg +6 -0
- package/DS1/x-icon/ezo-note-more.svg +7 -0
- package/DS1/x-icon/ezo-note-star.svg +5 -0
- package/DS1/x-icon/ezo-password-visibility-see.svg +6 -0
- package/DS1/x-icon/ezo-password-visibility-unsee.svg +9 -0
- package/DS1/x-icon/ezo-pattern-call-to-action.svg +1 -0
- package/DS1/x-icon/ezo-play.svg +5 -0
- package/DS1/x-icon/ezo-premium-star.svg +5 -0
- package/DS1/x-icon/ezo-setting-1xdots.svg +13 -0
- package/DS1/x-icon/ezo-setting-1xgrid.svg +10 -0
- package/DS1/x-icon/ezo-setting-1xlines.svg +7 -0
- package/DS1/x-icon/ezo-setting-2xdots.svg +8 -0
- package/DS1/x-icon/ezo-setting-2xgrid.svg +8 -0
- package/DS1/x-icon/ezo-setting-2xlines.svg +6 -0
- package/DS1/x-icon/ezo-setting-blank.svg +5 -0
- package/DS1/x-icon/ezo-store-chevron.svg +1 -0
- package/DS1/x-icon/ezo-upgrade-close.svg +5 -0
- package/DS1/x-icon/folder.svg +3 -0
- package/DS1/x-icon/form.svg +5 -0
- package/DS1/x-icon/gallery.svg +3 -0
- package/DS1/x-icon/globe.svg +1 -0
- package/DS1/x-icon/google.svg +6 -0
- package/DS1/x-icon/group-alt-2.svg +3 -0
- package/DS1/x-icon/group-alt.svg +7 -0
- package/DS1/x-icon/group.svg +3 -0
- package/DS1/x-icon/h1.svg +3 -0
- package/DS1/x-icon/h2.svg +3 -0
- package/DS1/x-icon/h3.svg +3 -0
- package/DS1/x-icon/handle.svg +8 -0
- package/DS1/x-icon/head.svg +3 -0
- package/DS1/x-icon/help-alt.svg +3 -0
- package/DS1/x-icon/help.svg +5 -0
- package/DS1/x-icon/home.svg +3 -0
- package/DS1/x-icon/icon.svg +4 -0
- package/DS1/x-icon/image.svg +5 -0
- package/DS1/x-icon/in.svg +4 -0
- package/DS1/x-icon/indent.svg +4 -0
- package/DS1/x-icon/italic.svg +3 -0
- package/DS1/x-icon/item.svg +3 -0
- package/DS1/x-icon/left.svg +4 -0
- package/DS1/x-icon/life.svg +8 -0
- package/DS1/x-icon/link.svg +3 -0
- package/DS1/x-icon/list-line.svg +3 -0
- package/DS1/x-icon/lists.svg +3 -0
- package/DS1/x-icon/lock-filled.svg +3 -0
- package/DS1/x-icon/lock.svg +3 -0
- package/DS1/x-icon/logo-marquee.svg +5 -0
- package/DS1/x-icon/loop.svg +6 -0
- package/DS1/x-icon/mention.svg +4 -0
- package/DS1/x-icon/menu.svg +3 -0
- package/DS1/x-icon/mic.svg +5 -0
- package/DS1/x-icon/minimize-alt.svg +4 -0
- package/DS1/x-icon/minimize.svg +4 -0
- package/DS1/x-icon/money.svg +6 -0
- package/DS1/x-icon/more.svg +5 -0
- package/DS1/x-icon/navigation-check.svg +1 -0
- package/DS1/x-icon/note-alt-2.svg +6 -0
- package/DS1/x-icon/note-alt.svg +4 -0
- package/DS1/x-icon/note-lines.svg +6 -0
- package/DS1/x-icon/note.svg +4 -0
- package/DS1/x-icon/notifications.svg +3 -0
- package/DS1/x-icon/numbered.svg +4 -0
- package/DS1/x-icon/open-alt.svg +3 -0
- package/DS1/x-icon/open-source.svg +3 -0
- package/DS1/x-icon/open.svg +3 -0
- package/DS1/x-icon/outdent.svg +4 -0
- package/DS1/x-icon/pad.svg +8 -0
- package/DS1/x-icon/page-18.svg +3 -0
- package/DS1/x-icon/page-alt.svg +3 -0
- package/DS1/x-icon/page-note.svg +1 -0
- package/DS1/x-icon/page.svg +3 -0
- package/DS1/x-icon/panel.svg +4 -0
- package/DS1/x-icon/pattern-call-to-action.svg +1 -0
- package/DS1/x-icon/pattern-card.svg +1 -0
- package/DS1/x-icon/pattern-feature.svg +1 -0
- package/DS1/x-icon/pattern-hero.svg +1 -0
- package/DS1/x-icon/pen.svg +4 -0
- package/DS1/x-icon/play-alt.svg +3 -0
- package/DS1/x-icon/plus.svg +3 -0
- package/DS1/x-icon/product-sources.json +2557 -0
- package/DS1/x-icon/quote.svg +3 -0
- package/DS1/x-icon/redo.svg +3 -0
- package/DS1/x-icon/relationships.svg +3 -0
- package/DS1/x-icon/rewind-30-alt.svg +4 -0
- package/DS1/x-icon/rewind-30.svg +5 -0
- package/DS1/x-icon/rewind.svg +5 -0
- package/DS1/x-icon/right.svg +3 -0
- package/DS1/x-icon/row.svg +3 -0
- package/DS1/x-icon/school.svg +4 -0
- package/DS1/x-icon/sdown.svg +3 -0
- package/DS1/x-icon/search-30.svg +4 -0
- package/DS1/x-icon/search.svg +3 -0
- package/DS1/x-icon/see-30.svg +4 -0
- package/DS1/x-icon/see.svg +4 -0
- package/DS1/x-icon/settings.svg +8 -0
- package/DS1/x-icon/shared.svg +5 -0
- package/DS1/x-icon/slash.svg +3 -0
- package/DS1/x-icon/star-alt-2.svg +3 -0
- package/DS1/x-icon/star-alt.svg +3 -0
- package/DS1/x-icon/star.svg +3 -0
- package/DS1/x-icon/stats.svg +3 -0
- package/DS1/x-icon/status-alt.svg +11 -0
- package/DS1/x-icon/status-filled.svg +26 -0
- package/DS1/x-icon/status.svg +10 -0
- package/DS1/x-icon/store.svg +4 -0
- package/DS1/x-icon/strike.svg +3 -0
- package/DS1/x-icon/sup.svg +3 -0
- package/DS1/x-icon/table.svg +4 -0
- package/DS1/x-icon/template.svg +4 -0
- package/DS1/x-icon/templates.svg +4 -0
- package/DS1/x-icon/text.svg +3 -0
- package/DS1/x-icon/title.svg +3 -0
- package/DS1/x-icon/titlestyle.svg +11 -0
- package/DS1/x-icon/todo.svg +5 -0
- package/DS1/x-icon/toggle.svg +4 -0
- package/DS1/x-icon/triangle.svg +3 -0
- package/DS1/x-icon/underline.svg +3 -0
- package/DS1/x-icon/undo.svg +3 -0
- package/DS1/x-icon/ungroup.svg +4 -0
- package/DS1/x-icon/unhead.svg +7 -0
- package/DS1/x-icon/unicon.svg +6 -0
- package/DS1/x-icon/unlock.svg +3 -0
- package/DS1/x-icon/unmic.svg +6 -0
- package/DS1/x-icon/unsee.svg +5 -0
- package/DS1/x-icon/unstar.svg +5 -0
- package/DS1/x-icon/untitle.svg +7 -0
- package/DS1/x-icon/up-right.svg +3 -0
- package/DS1/x-icon/up.svg +3 -0
- package/DS1/x-icon/views.svg +4 -0
- package/DS1/x-icon/warning.svg +3 -0
- package/DS1/x-icon/work.svg +3 -0
- package/LICENSE +21 -0
- package/README.md +240 -2
- package/dist/0-face/control.d.ts +24 -0
- package/dist/0-face/control.d.ts.map +1 -0
- package/dist/0-face/control.js +117 -0
- package/dist/0-face/define.d.ts +3 -0
- package/dist/0-face/define.d.ts.map +1 -0
- package/dist/0-face/define.js +7 -0
- package/dist/0-face/device.d.ts +71 -0
- package/dist/0-face/device.d.ts.map +1 -0
- package/dist/0-face/device.js +318 -0
- package/dist/0-face/grid-fit.d.ts +3 -0
- package/dist/0-face/grid-fit.d.ts.map +1 -0
- package/dist/0-face/grid-fit.js +73 -0
- package/dist/0-face/grid.d.ts +3 -0
- package/dist/0-face/grid.d.ts.map +1 -0
- package/dist/0-face/grid.js +144 -0
- package/dist/0-face/i18n.d.ts +138 -0
- package/dist/0-face/i18n.d.ts.map +1 -0
- package/dist/0-face/i18n.js +725 -0
- package/dist/0-face/language-routing.d.ts +47 -0
- package/dist/0-face/language-routing.d.ts.map +1 -0
- package/dist/0-face/language-routing.js +91 -0
- package/dist/0-face/language-validator.d.ts +11 -0
- package/dist/0-face/language-validator.d.ts.map +1 -0
- package/dist/0-face/language-validator.js +31 -0
- package/dist/0-face/languages.d.ts +53 -0
- package/dist/0-face/languages.d.ts.map +1 -0
- package/dist/0-face/languages.js +192 -0
- package/dist/0-face/layout-inspector.d.ts +6 -0
- package/dist/0-face/layout-inspector.d.ts.map +1 -0
- package/dist/0-face/layout-inspector.js +197 -0
- package/dist/0-face/preferences.d.ts +20 -0
- package/dist/0-face/preferences.d.ts.map +1 -0
- package/dist/0-face/preferences.js +19 -0
- package/dist/0-face/pricing.d.ts +15 -0
- package/dist/0-face/pricing.d.ts.map +1 -0
- package/dist/0-face/pricing.js +46 -0
- package/dist/0-face/scaling.d.ts +10 -0
- package/dist/0-face/scaling.d.ts.map +1 -0
- package/dist/0-face/scaling.js +14 -0
- package/dist/0-face/shared-words.d.ts +14 -0
- package/dist/0-face/shared-words.d.ts.map +1 -0
- package/dist/0-face/shared-words.js +32 -0
- package/dist/0-face/theme.d.ts +4 -0
- package/dist/0-face/theme.d.ts.map +1 -0
- package/dist/0-face/theme.js +48 -0
- package/dist/0-face/tooltips.d.ts +8 -0
- package/dist/0-face/tooltips.d.ts.map +1 -0
- package/dist/0-face/tooltips.js +90 -0
- package/dist/0-face/translations/da.json +63 -0
- package/dist/0-face/translations/de.json +63 -0
- package/dist/0-face/translations/en.json +63 -0
- package/dist/0-face/translations/es.json +63 -0
- package/dist/0-face/translations/fi.json +63 -0
- package/dist/0-face/translations/fr.json +63 -0
- package/dist/0-face/translations/is.json +56 -0
- package/dist/0-face/translations/it.json +63 -0
- package/dist/0-face/translations/ja.json +63 -0
- package/dist/0-face/translations/ko.json +63 -0
- package/dist/0-face/translations/nb.json +63 -0
- package/dist/0-face/translations/pt-BR.json +63 -0
- package/dist/0-face/translations/pt.json +63 -0
- package/dist/0-face/translations/sv.json +63 -0
- package/dist/0-face/translations/zh.json +63 -0
- package/dist/0-face/translations-format.d.ts +62 -0
- package/dist/0-face/translations-format.d.ts.map +1 -0
- package/dist/0-face/translations-format.js +159 -0
- package/dist/1-root/palette.d.ts +31 -0
- package/dist/1-root/palette.d.ts.map +1 -0
- package/dist/1-root/palette.js +83 -0
- package/dist/2-core/ds-avatar.d.ts +82 -0
- package/dist/2-core/ds-avatar.d.ts.map +1 -0
- package/dist/2-core/ds-avatar.js +102 -0
- package/dist/2-core/ds-badge.d.ts +33 -0
- package/dist/2-core/ds-badge.d.ts.map +1 -0
- package/dist/2-core/ds-badge.js +77 -0
- package/dist/2-core/ds-banner.d.ts +68 -0
- package/dist/2-core/ds-banner.d.ts.map +1 -0
- package/dist/2-core/ds-banner.js +98 -0
- package/dist/2-core/ds-button.d.ts +102 -0
- package/dist/2-core/ds-button.d.ts.map +1 -0
- package/dist/2-core/ds-button.js +133 -0
- package/dist/2-core/ds-card.d.ts +39 -0
- package/dist/2-core/ds-card.d.ts.map +1 -0
- package/dist/2-core/ds-card.js +119 -0
- package/dist/2-core/ds-checkbox.d.ts +13 -0
- package/dist/2-core/ds-checkbox.d.ts.map +1 -0
- package/dist/2-core/ds-checkbox.js +11 -0
- package/dist/2-core/ds-color.d.ts +15 -0
- package/dist/2-core/ds-color.d.ts.map +1 -0
- package/dist/2-core/ds-color.js +30 -0
- package/dist/2-core/ds-composer.d.ts +69 -0
- package/dist/2-core/ds-composer.d.ts.map +1 -0
- package/dist/2-core/ds-composer.js +183 -0
- package/dist/2-core/ds-cycle.d.ts +85 -0
- package/dist/2-core/ds-cycle.d.ts.map +1 -0
- package/dist/2-core/ds-cycle.js +497 -0
- package/dist/2-core/ds-date.d.ts +16 -0
- package/dist/2-core/ds-date.d.ts.map +1 -0
- package/dist/2-core/ds-date.js +15 -0
- package/dist/2-core/ds-file-picker.d.ts +65 -0
- package/dist/2-core/ds-file-picker.d.ts.map +1 -0
- package/dist/2-core/ds-file-picker.js +80 -0
- package/dist/2-core/ds-gap.d.ts +27 -0
- package/dist/2-core/ds-gap.d.ts.map +1 -0
- package/dist/2-core/ds-gap.js +22 -0
- package/dist/2-core/ds-icon.d.ts +58 -0
- package/dist/2-core/ds-icon.d.ts.map +1 -0
- package/dist/2-core/ds-icon.js +128 -0
- package/dist/2-core/ds-input.d.ts +97 -0
- package/dist/2-core/ds-input.d.ts.map +1 -0
- package/dist/2-core/ds-input.js +429 -0
- package/dist/2-core/ds-language.d.ts +75 -0
- package/dist/2-core/ds-language.d.ts.map +1 -0
- package/dist/2-core/ds-language.js +74 -0
- package/dist/2-core/ds-pagedots.d.ts +32 -0
- package/dist/2-core/ds-pagedots.d.ts.map +1 -0
- package/dist/2-core/ds-pagedots.js +36 -0
- package/dist/2-core/ds-radio.d.ts +35 -0
- package/dist/2-core/ds-radio.d.ts.map +1 -0
- package/dist/2-core/ds-radio.js +19 -0
- package/dist/2-core/ds-select.d.ts +30 -0
- package/dist/2-core/ds-select.d.ts.map +1 -0
- package/dist/2-core/ds-select.js +45 -0
- package/dist/2-core/ds-split.d.ts +75 -0
- package/dist/2-core/ds-split.d.ts.map +1 -0
- package/dist/2-core/ds-split.js +101 -0
- package/dist/2-core/ds-swatch.d.ts +24 -0
- package/dist/2-core/ds-swatch.d.ts.map +1 -0
- package/dist/2-core/ds-swatch.js +16 -0
- package/dist/2-core/ds-switch.d.ts +13 -0
- package/dist/2-core/ds-switch.d.ts.map +1 -0
- package/dist/2-core/ds-switch.js +10 -0
- package/dist/2-core/ds-text.d.ts +75 -0
- package/dist/2-core/ds-text.d.ts.map +1 -0
- package/dist/2-core/ds-text.js +142 -0
- package/dist/2-core/ds-textarea.d.ts +46 -0
- package/dist/2-core/ds-textarea.d.ts.map +1 -0
- package/dist/2-core/ds-textarea.js +121 -0
- package/dist/2-core/ds-token.d.ts +48 -0
- package/dist/2-core/ds-token.d.ts.map +1 -0
- package/dist/2-core/ds-token.js +44 -0
- package/dist/2-core/ds-tooltip.d.ts +48 -0
- package/dist/2-core/ds-tooltip.d.ts.map +1 -0
- package/dist/2-core/ds-tooltip.js +99 -0
- package/dist/2-core/generated/ds-icon-map.d.ts +295 -0
- package/dist/2-core/generated/ds-icon-map.d.ts.map +1 -0
- package/dist/2-core/generated/ds-icon-map.js +579 -0
- package/dist/2-core/generated/icons-extra.d.ts +2 -0
- package/dist/2-core/generated/icons-extra.d.ts.map +1 -0
- package/dist/2-core/generated/icons-extra.js +243 -0
- package/dist/2-core/generated/icons-immediate.d.ts +3 -0
- package/dist/2-core/generated/icons-immediate.d.ts.map +1 -0
- package/dist/2-core/generated/icons-immediate.js +49 -0
- package/dist/3-unit/context-trigger.d.ts +22 -0
- package/dist/3-unit/context-trigger.d.ts.map +1 -0
- package/dist/3-unit/context-trigger.js +130 -0
- package/dist/3-unit/ds-accordion.d.ts +55 -0
- package/dist/3-unit/ds-accordion.d.ts.map +1 -0
- package/dist/3-unit/ds-accordion.js +105 -0
- package/dist/3-unit/ds-avatar-group.d.ts +40 -0
- package/dist/3-unit/ds-avatar-group.d.ts.map +1 -0
- package/dist/3-unit/ds-avatar-group.js +84 -0
- package/dist/3-unit/ds-form.d.ts +70 -0
- package/dist/3-unit/ds-form.d.ts.map +1 -0
- package/dist/3-unit/ds-form.js +232 -0
- package/dist/3-unit/ds-list.d.ts +25 -0
- package/dist/3-unit/ds-list.d.ts.map +1 -0
- package/dist/3-unit/ds-list.js +25 -0
- package/dist/3-unit/ds-menu.d.ts +162 -0
- package/dist/3-unit/ds-menu.d.ts.map +1 -0
- package/dist/3-unit/ds-menu.js +607 -0
- package/dist/3-unit/ds-row.d.ts +43 -0
- package/dist/3-unit/ds-row.d.ts.map +1 -0
- package/dist/3-unit/ds-row.js +32 -0
- package/dist/3-unit/ds-table.d.ts +33 -0
- package/dist/3-unit/ds-table.d.ts.map +1 -0
- package/dist/3-unit/ds-table.js +43 -0
- package/dist/3-unit/ds-tabs.d.ts +50 -0
- package/dist/3-unit/ds-tabs.d.ts.map +1 -0
- package/dist/3-unit/ds-tabs.js +64 -0
- package/dist/3-unit/ds-token-field.d.ts +64 -0
- package/dist/3-unit/ds-token-field.d.ts.map +1 -0
- package/dist/3-unit/ds-token-field.js +184 -0
- package/dist/4-page/ds-container.d.ts +17 -0
- package/dist/4-page/ds-container.d.ts.map +1 -0
- package/dist/4-page/ds-container.js +11 -0
- package/dist/4-page/ds-dialog.d.ts +105 -0
- package/dist/4-page/ds-dialog.d.ts.map +1 -0
- package/dist/4-page/ds-dialog.js +358 -0
- package/dist/4-page/ds-grid.d.ts +28 -0
- package/dist/4-page/ds-grid.d.ts.map +1 -0
- package/dist/4-page/ds-grid.js +49 -0
- package/dist/4-page/ds-layout.d.ts +31 -0
- package/dist/4-page/ds-layout.d.ts.map +1 -0
- package/dist/4-page/ds-layout.js +930 -0
- package/dist/4-page/ds-panel.d.ts +26 -0
- package/dist/4-page/ds-panel.d.ts.map +1 -0
- package/dist/4-page/ds-panel.js +29 -0
- package/dist/4-page/email.d.ts +49 -0
- package/dist/4-page/email.d.ts.map +1 -0
- package/dist/4-page/email.js +134 -0
- package/dist/components.d.ts +14 -0
- package/dist/components.d.ts.map +1 -0
- package/dist/components.js +13 -0
- package/dist/design-system-1.bundle.js +9115 -0
- package/dist/design-system-1.bundle.js.map +1 -0
- package/dist/design-system-1.bundle.min.js +6879 -0
- package/dist/design-system-1.bundle.min.js.map +1 -0
- package/dist/design-system-1.css +2 -0
- package/dist/icons-extra-BoAACA4X.js +944 -0
- package/dist/icons-extra-BoAACA4X.js.map +1 -0
- package/dist/icons-extra-DlxTo_Y4.js +247 -0
- package/dist/icons-extra-DlxTo_Y4.js.map +1 -0
- package/dist/index.d.ts +57 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +73 -0
- package/dist/react/accordion.d.ts +21 -0
- package/dist/react/accordion.d.ts.map +1 -0
- package/dist/react/accordion.js +30 -0
- package/dist/react/avatar-group.d.ts +6 -0
- package/dist/react/avatar-group.d.ts.map +1 -0
- package/dist/react/avatar-group.js +5 -0
- package/dist/react/avatar.d.ts +13 -0
- package/dist/react/avatar.d.ts.map +1 -0
- package/dist/react/avatar.js +18 -0
- package/dist/react/badge.d.ts +11 -0
- package/dist/react/badge.d.ts.map +1 -0
- package/dist/react/badge.js +4 -0
- package/dist/react/button.d.ts +13 -0
- package/dist/react/button.d.ts.map +1 -0
- package/dist/react/button.js +37 -0
- package/dist/react/choice.d.ts +43 -0
- package/dist/react/choice.d.ts.map +1 -0
- package/dist/react/choice.js +32 -0
- package/dist/react/composer.d.ts +17 -0
- package/dist/react/composer.d.ts.map +1 -0
- package/dist/react/composer.js +8 -0
- package/dist/react/context-menu.d.ts +657 -0
- package/dist/react/context-menu.d.ts.map +1 -0
- package/dist/react/context-menu.js +133 -0
- package/dist/react/dialog.d.ts +1173 -0
- package/dist/react/dialog.d.ts.map +1 -0
- package/dist/react/dialog.js +79 -0
- package/dist/react/file-picker.d.ts +29 -0
- package/dist/react/file-picker.d.ts.map +1 -0
- package/dist/react/file-picker.js +17 -0
- package/dist/react/input.d.ts +35 -0
- package/dist/react/input.d.ts.map +1 -0
- package/dist/react/input.js +128 -0
- package/dist/react/menu.d.ts +37 -0
- package/dist/react/menu.d.ts.map +1 -0
- package/dist/react/menu.js +31 -0
- package/dist/react/split.d.ts +15 -0
- package/dist/react/split.d.ts.map +1 -0
- package/dist/react/split.js +32 -0
- package/dist/react/token-field.d.ts +36 -0
- package/dist/react/token-field.d.ts.map +1 -0
- package/dist/react/token-field.js +33 -0
- package/dist/shared-words-Cg6Phtx0.js +915 -0
- package/dist/shared-words-Cg6Phtx0.js.map +1 -0
- package/dist/shared-words-Ddz0yUEF.js +933 -0
- package/dist/shared-words-Ddz0yUEF.js.map +1 -0
- package/package.json +149 -3
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
import "./styles/ds-composer-frame.css";
|
|
3
|
+
export type TextHighlight = {
|
|
4
|
+
start: number;
|
|
5
|
+
end: number;
|
|
6
|
+
color?: string;
|
|
7
|
+
};
|
|
8
|
+
/** A native writing field with metric-preserving highlights. Products own the
|
|
9
|
+
* text and mention data; DS1 owns its face, growth and synchronized overlay.
|
|
10
|
+
* Keeping the textarea in light DOM preserves native forms and ARIA ID refs.
|
|
11
|
+
*/
|
|
12
|
+
export declare class Composer extends LitElement {
|
|
13
|
+
static properties: {
|
|
14
|
+
highlights: {
|
|
15
|
+
attribute: boolean;
|
|
16
|
+
};
|
|
17
|
+
autoGrow: {
|
|
18
|
+
type: BooleanConstructor;
|
|
19
|
+
attribute: string;
|
|
20
|
+
reflect: boolean;
|
|
21
|
+
};
|
|
22
|
+
maxRows: {
|
|
23
|
+
type: NumberConstructor;
|
|
24
|
+
attribute: string;
|
|
25
|
+
};
|
|
26
|
+
variant: {
|
|
27
|
+
type: StringConstructor;
|
|
28
|
+
reflect: boolean;
|
|
29
|
+
};
|
|
30
|
+
text: {
|
|
31
|
+
state: boolean;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
static styles: import("lit").CSSResult;
|
|
35
|
+
highlights: TextHighlight[];
|
|
36
|
+
autoGrow: boolean;
|
|
37
|
+
maxRows: number;
|
|
38
|
+
variant: "field" | "plain";
|
|
39
|
+
private text;
|
|
40
|
+
private control;
|
|
41
|
+
private form;
|
|
42
|
+
private frame;
|
|
43
|
+
private width;
|
|
44
|
+
private observer?;
|
|
45
|
+
private mutations;
|
|
46
|
+
private readonly edited;
|
|
47
|
+
private readonly scrolled;
|
|
48
|
+
private readonly reset;
|
|
49
|
+
private readonly fontLoaded;
|
|
50
|
+
constructor();
|
|
51
|
+
connectedCallback(): void;
|
|
52
|
+
firstUpdated(): void;
|
|
53
|
+
disconnectedCallback(): void;
|
|
54
|
+
private releaseControl;
|
|
55
|
+
private bindControl;
|
|
56
|
+
/** Call after programmatic native-value changes. React's adapter does this. */
|
|
57
|
+
refresh(): void;
|
|
58
|
+
updated(): void;
|
|
59
|
+
private syncScroll;
|
|
60
|
+
private validHighlights;
|
|
61
|
+
focus(options?: FocusOptions): void;
|
|
62
|
+
render(): import("lit").TemplateResult<1>;
|
|
63
|
+
}
|
|
64
|
+
declare global {
|
|
65
|
+
interface HTMLElementTagNameMap {
|
|
66
|
+
"ds-composer": Composer;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=ds-composer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ds-composer.d.ts","sourceRoot":"","sources":["../../DS1/2-core/ds-composer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAmB,MAAM,KAAK,CAAC;AAIlD,OAAO,gCAAgC,CAAC;AAYxC,MAAM,MAAM,aAAa,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAE3E;;;GAGG;AACH,qBAAa,QAAS,SAAQ,UAAU;IACtC,MAAM,CAAC,UAAU;;;;;;;;;;;;;;;;;;;;MAMf;IACF,MAAM,CAAC,MAAM,0BAAqB;IAC1B,UAAU,EAAE,aAAa,EAAE,CAAC;IAC5B,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC;IACnC,QAAgB,IAAI,CAAS;IAC7B,OAAO,CAAC,OAAO,CAAoC;IACnD,OAAO,CAAC,IAAI,CAAgC;IAC5C,OAAO,CAAC,KAAK,CAAK;IAClB,OAAO,CAAC,KAAK,CAAK;IAClB,OAAO,CAAC,QAAQ,CAAC,CAAiB;IAClC,OAAO,CAAC,SAAS,CAA8C;IAC/D,OAAO,CAAC,QAAQ,CAAC,MAAM,CAIrB;IACF,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA2B;IACpD,OAAO,CAAC,QAAQ,CAAC,KAAK,CAA8C;IACpE,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAwB;;IAWnD,iBAAiB;IAMjB,YAAY;IACZ,oBAAoB;IAMpB,OAAO,CAAC,cAAc;IAStB,OAAO,CAAC,WAAW;IAuBnB,+EAA+E;IAC/E,OAAO;IAaP,OAAO;IA6BP,OAAO,CAAC,UAAU;IAclB,OAAO,CAAC,eAAe;IAOvB,KAAK,CAAC,OAAO,CAAC,EAAE,YAAY;IAC5B,MAAM;CASP;AAED,OAAO,CAAC,MAAM,CAAC;IAAE,UAAU,qBAAqB;QAAG,aAAa,EAAE,QAAQ,CAAA;KAAE;CAAE"}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import { LitElement, html, unsafeCSS } from "lit";
|
|
2
|
+
import { styleMap } from "lit/directives/style-map.js";
|
|
3
|
+
import { define } from "../0-face/define";
|
|
4
|
+
import styles from "./styles/ds-composer.css?inline";
|
|
5
|
+
import "./styles/ds-composer-frame.css";
|
|
6
|
+
import frameStyles from "./styles/ds-composer-frame.css?inline";
|
|
7
|
+
const styledRoots = new WeakSet();
|
|
8
|
+
function styleRoot(root) {
|
|
9
|
+
if (!(root instanceof ShadowRoot) || styledRoots.has(root))
|
|
10
|
+
return;
|
|
11
|
+
const sheet = new CSSStyleSheet();
|
|
12
|
+
sheet.replaceSync(frameStyles);
|
|
13
|
+
root.adoptedStyleSheets = [...root.adoptedStyleSheets, sheet];
|
|
14
|
+
styledRoots.add(root);
|
|
15
|
+
}
|
|
16
|
+
/** A native writing field with metric-preserving highlights. Products own the
|
|
17
|
+
* text and mention data; DS1 owns its face, growth and synchronized overlay.
|
|
18
|
+
* Keeping the textarea in light DOM preserves native forms and ARIA ID refs.
|
|
19
|
+
*/
|
|
20
|
+
export class Composer extends LitElement {
|
|
21
|
+
constructor() {
|
|
22
|
+
super();
|
|
23
|
+
this.control = null;
|
|
24
|
+
this.form = null;
|
|
25
|
+
this.frame = 0;
|
|
26
|
+
this.width = 0;
|
|
27
|
+
this.mutations = new MutationObserver(() => this.refresh());
|
|
28
|
+
this.edited = () => {
|
|
29
|
+
this.refresh();
|
|
30
|
+
// Controlled frameworks can restore a declined edit after input bubbles.
|
|
31
|
+
queueMicrotask(() => { if (this.isConnected)
|
|
32
|
+
this.refresh(); });
|
|
33
|
+
};
|
|
34
|
+
this.scrolled = () => this.syncScroll();
|
|
35
|
+
this.reset = () => queueMicrotask(() => this.refresh());
|
|
36
|
+
this.fontLoaded = () => this.refresh();
|
|
37
|
+
this.highlights = [];
|
|
38
|
+
this.autoGrow = false;
|
|
39
|
+
this.maxRows = 12;
|
|
40
|
+
this.variant = "field";
|
|
41
|
+
this.text = "";
|
|
42
|
+
}
|
|
43
|
+
connectedCallback() {
|
|
44
|
+
super.connectedCallback();
|
|
45
|
+
styleRoot(this.getRootNode());
|
|
46
|
+
document.fonts?.addEventListener("loadingdone", this.fontLoaded);
|
|
47
|
+
this.bindControl();
|
|
48
|
+
}
|
|
49
|
+
firstUpdated() { this.bindControl(); }
|
|
50
|
+
disconnectedCallback() {
|
|
51
|
+
this.releaseControl();
|
|
52
|
+
document.fonts?.removeEventListener("loadingdone", this.fontLoaded);
|
|
53
|
+
cancelAnimationFrame(this.frame);
|
|
54
|
+
super.disconnectedCallback();
|
|
55
|
+
}
|
|
56
|
+
releaseControl() {
|
|
57
|
+
this.control?.removeEventListener("input", this.edited);
|
|
58
|
+
this.control?.removeEventListener("change", this.edited);
|
|
59
|
+
this.control?.removeEventListener("scroll", this.scrolled);
|
|
60
|
+
this.form?.removeEventListener("reset", this.reset);
|
|
61
|
+
this.form = null;
|
|
62
|
+
this.observer?.disconnect();
|
|
63
|
+
this.mutations.disconnect();
|
|
64
|
+
}
|
|
65
|
+
bindControl() {
|
|
66
|
+
this.releaseControl();
|
|
67
|
+
this.control = Array.from(this.children).find(child => child.localName === "textarea") ?? null;
|
|
68
|
+
const control = this.control;
|
|
69
|
+
if (!control) {
|
|
70
|
+
this.text = "";
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
control.addEventListener("input", this.edited);
|
|
74
|
+
control.addEventListener("change", this.edited);
|
|
75
|
+
control.addEventListener("scroll", this.scrolled);
|
|
76
|
+
this.mutations.observe(control, { attributes: true, attributeFilter: ["rows", "wrap", "dir", "form"], childList: true, characterData: true, subtree: true });
|
|
77
|
+
if (typeof ResizeObserver !== "undefined") {
|
|
78
|
+
this.observer = new ResizeObserver(entries => {
|
|
79
|
+
this.syncScroll();
|
|
80
|
+
if (control.clientWidth !== this.width || entries.some(entry => entry.target !== control)) {
|
|
81
|
+
this.width = control.clientWidth;
|
|
82
|
+
this.refresh();
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
this.observer.observe(control);
|
|
86
|
+
const metric = this.shadowRoot?.querySelector(".row-metric");
|
|
87
|
+
if (metric)
|
|
88
|
+
this.observer.observe(metric);
|
|
89
|
+
}
|
|
90
|
+
this.refresh();
|
|
91
|
+
}
|
|
92
|
+
/** Call after programmatic native-value changes. React's adapter does this. */
|
|
93
|
+
refresh() {
|
|
94
|
+
const control = this.control;
|
|
95
|
+
if (!control)
|
|
96
|
+
return;
|
|
97
|
+
if (this.form !== control.form) {
|
|
98
|
+
this.form?.removeEventListener("reset", this.reset);
|
|
99
|
+
this.form = control.form;
|
|
100
|
+
this.form?.addEventListener("reset", this.reset);
|
|
101
|
+
}
|
|
102
|
+
this.text = control.value;
|
|
103
|
+
this.style.setProperty("--composer-rows", String(Math.max(1, control.rows || 1)));
|
|
104
|
+
this.toggleAttribute("data-nowrap", control.wrap === "off");
|
|
105
|
+
this.requestUpdate();
|
|
106
|
+
}
|
|
107
|
+
updated() {
|
|
108
|
+
this.toggleAttribute("data-highlighted", this.validHighlights().length > 0);
|
|
109
|
+
cancelAnimationFrame(this.frame);
|
|
110
|
+
this.frame = requestAnimationFrame(() => {
|
|
111
|
+
const control = this.control;
|
|
112
|
+
if (!this.isConnected || !control)
|
|
113
|
+
return;
|
|
114
|
+
// Browsers may run microtasks between native and framework listeners.
|
|
115
|
+
// Read the settled native value before painting a controlled edit.
|
|
116
|
+
if (this.text !== control.value) {
|
|
117
|
+
this.text = control.value;
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
if (this.autoGrow) {
|
|
121
|
+
const row = this.shadowRoot.querySelector(".row-metric").getBoundingClientRect().height || 20;
|
|
122
|
+
const minimum = Math.max(1, control.rows || 1) * row;
|
|
123
|
+
const maximum = Math.max(minimum, Math.floor(this.maxRows || 1) * row);
|
|
124
|
+
const scrollTop = control.scrollTop;
|
|
125
|
+
this.style.setProperty("--composer-height", "0px");
|
|
126
|
+
const css = getComputedStyle(control);
|
|
127
|
+
const border = parseFloat(css.borderTopWidth) + parseFloat(css.borderBottomWidth);
|
|
128
|
+
const needed = Math.ceil((control.scrollHeight + border) / row) * row;
|
|
129
|
+
this.style.setProperty("--composer-height", `${Math.max(minimum, Math.min(maximum, needed))}px`);
|
|
130
|
+
this.style.setProperty("--composer-overflow", needed > maximum ? "auto" : "hidden");
|
|
131
|
+
control.scrollTop = scrollTop;
|
|
132
|
+
}
|
|
133
|
+
else {
|
|
134
|
+
this.style.removeProperty("--composer-height");
|
|
135
|
+
this.style.removeProperty("--composer-overflow");
|
|
136
|
+
}
|
|
137
|
+
this.syncScroll();
|
|
138
|
+
});
|
|
139
|
+
this.syncScroll();
|
|
140
|
+
}
|
|
141
|
+
syncScroll() {
|
|
142
|
+
const mirror = this.shadowRoot?.querySelector(".mirror");
|
|
143
|
+
const control = this.control;
|
|
144
|
+
if (!mirror || !control)
|
|
145
|
+
return;
|
|
146
|
+
// clientWidth excludes the scrollbar, so both layers wrap at the same x.
|
|
147
|
+
const css = getComputedStyle(control);
|
|
148
|
+
mirror.style.width = `${control.clientWidth + parseFloat(css.borderLeftWidth) + parseFloat(css.borderRightWidth)}px`;
|
|
149
|
+
mirror.style.height = `${control.offsetHeight}px`;
|
|
150
|
+
mirror.style.left = `${control.offsetLeft}px`;
|
|
151
|
+
mirror.style.top = `${control.offsetTop}px`;
|
|
152
|
+
mirror.dir = control.dir;
|
|
153
|
+
mirror.scrollTop = control.scrollTop;
|
|
154
|
+
mirror.scrollLeft = control.scrollLeft;
|
|
155
|
+
}
|
|
156
|
+
validHighlights() {
|
|
157
|
+
let end = 0;
|
|
158
|
+
return [...(this.highlights ?? [])]
|
|
159
|
+
.filter(range => Number.isInteger(range.start) && Number.isInteger(range.end) && range.start >= 0 && range.end > range.start && range.end <= this.text.length)
|
|
160
|
+
.sort((a, b) => a.start - b.start || b.end - a.end)
|
|
161
|
+
.filter(range => { if (range.start < end)
|
|
162
|
+
return false; end = range.end; return true; });
|
|
163
|
+
}
|
|
164
|
+
focus(options) { this.control?.focus(options); }
|
|
165
|
+
render() {
|
|
166
|
+
let cursor = 0;
|
|
167
|
+
const parts = this.validHighlights().map(range => {
|
|
168
|
+
const before = this.text.slice(cursor, range.start);
|
|
169
|
+
cursor = range.end;
|
|
170
|
+
return html `${before}<mark style=${styleMap({ "--composer-highlight-color": range.color || undefined })}>${this.text.slice(range.start, range.end)}</mark>`;
|
|
171
|
+
});
|
|
172
|
+
return html `<span class="row-metric" aria-hidden="true"></span><slot @slotchange=${this.bindControl}></slot><div class="mirror" aria-hidden="true">${parts}${this.text.slice(cursor)}${"\n"}</div>`;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
Composer.properties = {
|
|
176
|
+
highlights: { attribute: false },
|
|
177
|
+
autoGrow: { type: Boolean, attribute: "auto-grow", reflect: true },
|
|
178
|
+
maxRows: { type: Number, attribute: "max-rows" },
|
|
179
|
+
variant: { type: String, reflect: true },
|
|
180
|
+
text: { state: true },
|
|
181
|
+
};
|
|
182
|
+
Composer.styles = unsafeCSS(styles);
|
|
183
|
+
define("ds-composer", Composer);
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
import "./ds-button";
|
|
3
|
+
import "./ds-icon";
|
|
4
|
+
import "./ds-text";
|
|
5
|
+
export declare class Cycle extends LitElement {
|
|
6
|
+
static formAssociated: boolean;
|
|
7
|
+
static get properties(): {
|
|
8
|
+
type: {
|
|
9
|
+
type: StringConstructor;
|
|
10
|
+
};
|
|
11
|
+
values: {
|
|
12
|
+
type: ArrayConstructor;
|
|
13
|
+
};
|
|
14
|
+
currentValue: {
|
|
15
|
+
type: StringConstructor;
|
|
16
|
+
state: boolean;
|
|
17
|
+
};
|
|
18
|
+
translationsReady: {
|
|
19
|
+
type: BooleanConstructor;
|
|
20
|
+
state: boolean;
|
|
21
|
+
};
|
|
22
|
+
disabled: {
|
|
23
|
+
type: BooleanConstructor;
|
|
24
|
+
reflect: boolean;
|
|
25
|
+
};
|
|
26
|
+
_fieldsetDisabled: {
|
|
27
|
+
state: boolean;
|
|
28
|
+
};
|
|
29
|
+
variant: {
|
|
30
|
+
type: StringConstructor;
|
|
31
|
+
};
|
|
32
|
+
primary: {
|
|
33
|
+
type: BooleanConstructor;
|
|
34
|
+
reflect: boolean;
|
|
35
|
+
};
|
|
36
|
+
secondary: {
|
|
37
|
+
type: BooleanConstructor;
|
|
38
|
+
reflect: boolean;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
static styles: import("lit").CSSResult;
|
|
42
|
+
type: string;
|
|
43
|
+
values: string[];
|
|
44
|
+
currentValue: string;
|
|
45
|
+
translationsReady: boolean;
|
|
46
|
+
disabled: boolean;
|
|
47
|
+
protected _fieldsetDisabled: boolean;
|
|
48
|
+
variant: string;
|
|
49
|
+
primary: boolean;
|
|
50
|
+
secondary: boolean;
|
|
51
|
+
private boundHandlers;
|
|
52
|
+
constructor();
|
|
53
|
+
formDisabledCallback(disabled: boolean): void;
|
|
54
|
+
focus(options?: FocusOptions): void;
|
|
55
|
+
connectedCallback(): void;
|
|
56
|
+
initializeValues(): Promise<void>;
|
|
57
|
+
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
|
58
|
+
setupInitialValue(): Promise<void>;
|
|
59
|
+
handleSettingsChanges(): void;
|
|
60
|
+
disconnectedCallback(): void;
|
|
61
|
+
handleButtonClick(e: Event): void;
|
|
62
|
+
getValueDisplay(value: string): string | any;
|
|
63
|
+
getColorKey(colorVar: string): string;
|
|
64
|
+
getColorName(colorVar: string): string;
|
|
65
|
+
getNotesStyleIcon(style: string): import("lit").TemplateResult<1>;
|
|
66
|
+
/**
|
|
67
|
+
* A cycle without a stated look takes the one its type has always had: the
|
|
68
|
+
* language and theme cycles are grey chips, every other one, the accent
|
|
69
|
+
* colour's included, is in the accent. Written onto the host before the
|
|
70
|
+
* first paint, so the inner button and any page sheet see the same word.
|
|
71
|
+
*/
|
|
72
|
+
willUpdate(changed: Map<PropertyKey, unknown>): void;
|
|
73
|
+
render(): import("lit").TemplateResult<1>;
|
|
74
|
+
private handleTranslationsLoaded;
|
|
75
|
+
private handleLanguageChanged;
|
|
76
|
+
private handleThemeChanged;
|
|
77
|
+
private handleAccentColorChanged;
|
|
78
|
+
private handleNoteBehaviorChanged;
|
|
79
|
+
}
|
|
80
|
+
declare global {
|
|
81
|
+
interface HTMLElementTagNameMap {
|
|
82
|
+
"ds-cycle": Cycle;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=ds-cycle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ds-cycle.d.ts","sourceRoot":"","sources":["../../DS1/2-core/ds-cycle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAmB,MAAM,KAAK,CAAC;AAalD,OAAO,aAAa,CAAC;AACrB,OAAO,WAAW,CAAC;AACnB,OAAO,WAAW,CAAC;AAsCnB,qBAAa,KAAM,SAAQ,UAAU;IACnC,MAAM,CAAC,cAAc,UAAQ;IAE7B,MAAM,KAAK,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAepB;IAED,MAAM,CAAC,MAAM,0BAAqB;IAI1B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,QAAQ,EAAE,OAAO,CAAC;IAC1B,UAAkB,iBAAiB,EAAE,OAAO,CAAC;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;IAG3B,OAAO,CAAC,aAAa,CAOnB;;IA4BF,oBAAoB,CAAC,QAAQ,EAAE,OAAO;IAEtC,KAAK,CAAC,OAAO,CAAC,EAAE,YAAY;IAE5B,iBAAiB;IA6BX,gBAAgB;IA8DtB,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;IASnE,iBAAiB;IAqCvB,qBAAqB;IAKrB,oBAAoB;IA0BpB,iBAAiB,CAAC,CAAC,EAAE,KAAK;IA2I1B,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,GAAG;IA+C5C,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM;IAgBrC,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM;IAyBtC,iBAAiB,CAAC,KAAK,EAAE,MAAM;IAe/B;;;;;OAKG;IACH,UAAU,CAAC,OAAO,EAAE,GAAG,CAAC,WAAW,EAAE,OAAO,CAAC;IAW7C,MAAM;IAsCN,OAAO,CAAC,wBAAwB;IAYhC,OAAO,CAAC,qBAAqB;IAI7B,OAAO,CAAC,kBAAkB;IAI1B,OAAO,CAAC,wBAAwB;IAIhC,OAAO,CAAC,yBAAyB;CAGlC;AAID,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,UAAU,EAAE,KAAK,CAAC;KACnB;CACF"}
|