@vonage/vivid 3.0.0-next.7 → 3.0.0-test.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accordion/index.js +61 -0
- package/accordion-item/index.js +125 -0
- package/badge/index.js +64 -0
- package/banner/index.js +212 -0
- package/breadcrumb/index.js +100 -0
- package/breadcrumb-item/index.js +55 -0
- package/button/index.js +761 -0
- package/calendar/index.js +1521 -0
- package/elevation/index.js +31 -0
- package/focus/index.js +3 -0
- package/icon/index.js +34 -0
- package/{src/index.ts → index.d.ts} +2 -2
- package/index.js +32 -0
- package/layout/index.js +53 -0
- package/lib/accordion/accordion.d.ts +9 -0
- package/lib/accordion/accordion.template.d.ts +4 -0
- package/lib/accordion/index.d.ts +2 -0
- package/lib/accordion-item/accordion-item.d.ts +13 -0
- package/lib/accordion-item/accordion-item.template.d.ts +4 -0
- package/lib/accordion-item/index.d.ts +3 -0
- package/lib/badge/badge.d.ts +17 -0
- package/lib/badge/badge.template.d.ts +4 -0
- package/lib/badge/index.d.ts +3 -0
- package/lib/banner/banner.d.ts +20 -0
- package/lib/banner/banner.template.d.ts +6 -0
- package/lib/banner/index.d.ts +2 -0
- package/lib/breadcrumb/breadcrumb.d.ts +3 -0
- package/lib/breadcrumb/index.d.ts +2 -0
- package/lib/breadcrumb-item/breadcrumb-item.d.ts +5 -0
- package/lib/breadcrumb-item/breadcrumb-item.template.d.ts +4 -0
- package/lib/breadcrumb-item/index.d.ts +3 -0
- package/lib/button/button.d.ts +17 -0
- package/lib/button/button.template.d.ts +4 -0
- package/lib/button/index.d.ts +21 -0
- package/lib/calendar/calendar.d.ts +11 -0
- package/lib/calendar/calendar.template.d.ts +4 -0
- package/lib/calendar/helpers/calendar.date-functions.d.ts +2 -0
- package/lib/calendar/helpers/calendar.event-context.d.ts +6 -0
- package/lib/calendar/helpers/calendar.keyboard-interactions.d.ts +9 -0
- package/lib/calendar/index.d.ts +3 -0
- package/{src/lib/components.ts → lib/components.d.ts} +16 -16
- package/lib/elevation/elevation.d.ts +4 -0
- package/lib/elevation/elevation.template.d.ts +4 -0
- package/lib/elevation/index.d.ts +2 -0
- package/lib/enums.d.ts +45 -0
- package/lib/focus/focus.d.ts +3 -0
- package/lib/focus/focus.template.d.ts +4 -0
- package/lib/focus/index.d.ts +2 -0
- package/lib/icon/icon.d.ts +11 -0
- package/lib/icon/icon.placeholder.d.ts +1 -0
- package/lib/icon/icon.template.d.ts +4 -0
- package/lib/icon/index.d.ts +2 -0
- package/lib/layout/index.d.ts +2 -0
- package/lib/layout/layout.d.ts +16 -0
- package/lib/layout/layout.template.d.ts +4 -0
- package/lib/popup/index.d.ts +4 -0
- package/lib/popup/popup.d.ts +17 -0
- package/lib/popup/popup.template.d.ts +4 -0
- package/lib/progress/index.d.ts +2 -0
- package/lib/progress/progress.d.ts +9 -0
- package/lib/progress/progress.template.d.ts +5 -0
- package/lib/progress-ring/index.d.ts +2 -0
- package/lib/progress-ring/progress-ring.d.ts +6 -0
- package/lib/progress-ring/progress-ring.template.d.ts +4 -0
- package/lib/side-drawer/index.d.ts +2 -0
- package/lib/side-drawer/side-drawer.d.ts +8 -0
- package/lib/side-drawer/side-drawer.template.d.ts +4 -0
- package/lib/sidenav-item/index.d.ts +3 -0
- package/lib/sidenav-item/sidenav-item.d.ts +6 -0
- package/lib/sidenav-item/sidenav-item.template.d.ts +4 -0
- package/lib/text/index.d.ts +2 -0
- package/lib/text/text.d.ts +10 -0
- package/lib/text/text.template.d.ts +4 -0
- package/lib/text-anchor/index.d.ts +2 -0
- package/lib/text-anchor/text-anchor.d.ts +7 -0
- package/lib/text-anchor/text-anchor.template.d.ts +4 -0
- package/lib/tooltip/index.d.ts +3 -0
- package/lib/tooltip/tooltip.d.ts +8 -0
- package/lib/tooltip/tooltip.template.d.ts +4 -0
- package/package.json +13 -3
- package/popup/index.js +2065 -0
- package/progress/index.js +98 -0
- package/progress-ring/index.js +76 -0
- package/shared/_has.js +58 -0
- package/shared/affix.js +29 -0
- package/shared/anchor.js +78 -0
- package/shared/apply-mixins.js +22 -0
- package/shared/aria-global.js +156 -0
- package/shared/base-progress.js +65 -0
- package/shared/breadcrumb-item.js +25 -0
- package/shared/class-names.js +15 -0
- package/shared/design-system/index.d.ts +3 -0
- package/shared/es.object.assign.js +68 -0
- package/shared/icon.js +1393 -0
- package/shared/index.js +4998 -0
- package/shared/index2.js +21 -0
- package/shared/patterns/affix.d.ts +9 -0
- package/{src/shared/patterns/index.ts → shared/patterns/index.d.ts} +1 -1
- package/shared/slotted.js +119 -0
- package/shared/style-inject.es.js +28 -0
- package/shared/text-anchor.js +21 -0
- package/shared/text-anchor.template.js +54 -0
- package/shared/web.dom-collections.iterator.js +1479 -0
- package/shared/when.js +15 -0
- package/side-drawer/index.js +81 -0
- package/sidenav-item/index.js +38 -0
- package/styles/fonts/spezia.css +23 -0
- package/styles/themes/dark.css +205 -0
- package/styles/themes/light.css +205 -0
- package/text/index.js +45 -0
- package/text-anchor/index.js +19 -0
- package/tooltip/index.js +65 -0
- package/.babelrc +0 -3
- package/.eslintrc.json +0 -70
- package/.stylelintrc.json +0 -8
- package/CHANGELOG.json +0 -343
- package/CHANGELOG.md +0 -45
- package/jest.config.cjs +0 -20
- package/playwright.config.dev.ts +0 -21
- package/playwright.config.ts +0 -34
- package/project.json +0 -122
- package/rollup.config.prod.ts +0 -50
- package/setupJestTests.js +0 -17
- package/src/lib/accordion/README.md +0 -55
- package/src/lib/accordion/accordion.scss +0 -10
- package/src/lib/accordion/accordion.spec.ts +0 -91
- package/src/lib/accordion/accordion.template.ts +0 -23
- package/src/lib/accordion/accordion.ts +0 -49
- package/src/lib/accordion/index.ts +0 -14
- package/src/lib/accordion/ui.test.ts +0 -37
- package/src/lib/accordion/ui.test.ts-snapshots/snapshots-accordion-Chrome-Stable-darwin.png +0 -0
- package/src/lib/accordion/ui.test.ts-snapshots/snapshots-accordion-Chrome-Stable-linux.png +0 -0
- package/src/lib/accordion/ui.test.ts-snapshots/snapshots-accordion-Desktop-Firefox-darwin.png +0 -0
- package/src/lib/accordion/ui.test.ts-snapshots/snapshots-accordion-Desktop-Firefox-linux.png +0 -0
- package/src/lib/accordion/ui.test.ts-snapshots/snapshots-accordion-Desktop-Safari-darwin.png +0 -0
- package/src/lib/accordion/ui.test.ts-snapshots/snapshots-accordion-Desktop-Safari-linux.png +0 -0
- package/src/lib/accordion-item/README.md +0 -113
- package/src/lib/accordion-item/accordion-item.scss +0 -91
- package/src/lib/accordion-item/accordion-item.spec.ts +0 -103
- package/src/lib/accordion-item/accordion-item.template.ts +0 -62
- package/src/lib/accordion-item/accordion-item.ts +0 -67
- package/src/lib/accordion-item/index.ts +0 -14
- package/src/lib/accordion-item/partials/variables.scss +0 -1
- package/src/lib/accordion-item/ui.test.ts +0 -37
- package/src/lib/accordion-item/ui.test.ts-snapshots/snapshots-accordion-item-Chrome-Stable-darwin.png +0 -0
- package/src/lib/accordion-item/ui.test.ts-snapshots/snapshots-accordion-item-Chrome-Stable-linux.png +0 -0
- package/src/lib/accordion-item/ui.test.ts-snapshots/snapshots-accordion-item-Desktop-Firefox-darwin.png +0 -0
- package/src/lib/accordion-item/ui.test.ts-snapshots/snapshots-accordion-item-Desktop-Firefox-linux.png +0 -0
- package/src/lib/accordion-item/ui.test.ts-snapshots/snapshots-accordion-item-Desktop-Safari-darwin.png +0 -0
- package/src/lib/accordion-item/ui.test.ts-snapshots/snapshots-accordion-item-Desktop-Safari-linux.png +0 -0
- package/src/lib/badge/README.md +0 -112
- package/src/lib/badge/badge.scss +0 -64
- package/src/lib/badge/badge.spec.ts +0 -114
- package/src/lib/badge/badge.template.ts +0 -36
- package/src/lib/badge/badge.ts +0 -97
- package/src/lib/badge/index.ts +0 -23
- package/src/lib/badge/ui.test.ts +0 -28
- package/src/lib/badge/ui.test.ts-snapshots/snapshots-badge-Chrome-Stable-darwin.png +0 -0
- package/src/lib/badge/ui.test.ts-snapshots/snapshots-badge-Chrome-Stable-linux.png +0 -0
- package/src/lib/badge/ui.test.ts-snapshots/snapshots-badge-Desktop-Firefox-darwin.png +0 -0
- package/src/lib/badge/ui.test.ts-snapshots/snapshots-badge-Desktop-Firefox-linux.png +0 -0
- package/src/lib/badge/ui.test.ts-snapshots/snapshots-badge-Desktop-Safari-darwin.png +0 -0
- package/src/lib/badge/ui.test.ts-snapshots/snapshots-badge-Desktop-Safari-linux.png +0 -0
- package/src/lib/banner/README.md +0 -117
- package/src/lib/banner/banner.scss +0 -71
- package/src/lib/banner/banner.spec.ts +0 -355
- package/src/lib/banner/banner.template.ts +0 -61
- package/src/lib/banner/banner.ts +0 -77
- package/src/lib/banner/index.ts +0 -14
- package/src/lib/banner/ui.test.ts +0 -64
- package/src/lib/banner/ui.test.ts-snapshots/snapshots-banner-Chrome-Stable-darwin.png +0 -0
- package/src/lib/banner/ui.test.ts-snapshots/snapshots-banner-Chrome-Stable-linux.png +0 -0
- package/src/lib/banner/ui.test.ts-snapshots/snapshots-banner-Desktop-Firefox-darwin.png +0 -0
- package/src/lib/banner/ui.test.ts-snapshots/snapshots-banner-Desktop-Firefox-linux.png +0 -0
- package/src/lib/banner/ui.test.ts-snapshots/snapshots-banner-Desktop-Safari-darwin.png +0 -0
- package/src/lib/banner/ui.test.ts-snapshots/snapshots-banner-Desktop-Safari-linux.png +0 -0
- package/src/lib/breadcrumb/README.md +0 -25
- package/src/lib/breadcrumb/breadcrumb.scss +0 -3
- package/src/lib/breadcrumb/breadcrumb.spec.ts +0 -78
- package/src/lib/breadcrumb/breadcrumb.ts +0 -10
- package/src/lib/breadcrumb/index.ts +0 -13
- package/src/lib/breadcrumb/ui.test.ts +0 -36
- package/src/lib/breadcrumb/ui.test.ts-snapshots/snapshots-breadcrumb-Chrome-Stable-darwin.png +0 -0
- package/src/lib/breadcrumb/ui.test.ts-snapshots/snapshots-breadcrumb-Chrome-Stable-linux.png +0 -0
- package/src/lib/breadcrumb/ui.test.ts-snapshots/snapshots-breadcrumb-Desktop-Firefox-darwin.png +0 -0
- package/src/lib/breadcrumb/ui.test.ts-snapshots/snapshots-breadcrumb-Desktop-Firefox-linux.png +0 -0
- package/src/lib/breadcrumb/ui.test.ts-snapshots/snapshots-breadcrumb-Desktop-Safari-darwin.png +0 -0
- package/src/lib/breadcrumb/ui.test.ts-snapshots/snapshots-breadcrumb-Desktop-Safari-linux.png +0 -0
- package/src/lib/breadcrumb-item/README.md +0 -40
- package/src/lib/breadcrumb-item/breadcrumb-item.scss +0 -28
- package/src/lib/breadcrumb-item/breadcrumb-item.spec.ts +0 -192
- package/src/lib/breadcrumb-item/breadcrumb-item.template.ts +0 -37
- package/src/lib/breadcrumb-item/breadcrumb-item.ts +0 -15
- package/src/lib/breadcrumb-item/index.ts +0 -16
- package/src/lib/breadcrumb-item/ui.test.ts +0 -38
- package/src/lib/breadcrumb-item/ui.test.ts-snapshots/snapshots-breadcrumb-item-Chrome-Stable-darwin.png +0 -0
- package/src/lib/breadcrumb-item/ui.test.ts-snapshots/snapshots-breadcrumb-item-Chrome-Stable-linux.png +0 -0
- package/src/lib/breadcrumb-item/ui.test.ts-snapshots/snapshots-breadcrumb-item-Desktop-Firefox-darwin.png +0 -0
- package/src/lib/breadcrumb-item/ui.test.ts-snapshots/snapshots-breadcrumb-item-Desktop-Firefox-linux.png +0 -0
- package/src/lib/breadcrumb-item/ui.test.ts-snapshots/snapshots-breadcrumb-item-Desktop-Safari-darwin.png +0 -0
- package/src/lib/breadcrumb-item/ui.test.ts-snapshots/snapshots-breadcrumb-item-Desktop-Safari-linux.png +0 -0
- package/src/lib/button/README.md +0 -120
- package/src/lib/button/button.scss +0 -142
- package/src/lib/button/button.spec.ts +0 -131
- package/src/lib/button/button.template.ts +0 -89
- package/src/lib/button/button.ts +0 -95
- package/src/lib/button/index.ts +0 -25
- package/src/lib/button/partials/variables.scss +0 -2
- package/src/lib/button/ui.test.ts +0 -32
- package/src/lib/button/ui.test.ts-snapshots/snapshots-button-Chrome-Stable-darwin.png +0 -0
- package/src/lib/button/ui.test.ts-snapshots/snapshots-button-Chrome-Stable-linux.png +0 -0
- package/src/lib/button/ui.test.ts-snapshots/snapshots-button-Desktop-Firefox-darwin.png +0 -0
- package/src/lib/button/ui.test.ts-snapshots/snapshots-button-Desktop-Firefox-linux.png +0 -0
- package/src/lib/button/ui.test.ts-snapshots/snapshots-button-Desktop-Safari-darwin.png +0 -0
- package/src/lib/button/ui.test.ts-snapshots/snapshots-button-Desktop-Safari-linux.png +0 -0
- package/src/lib/calendar/README.md +0 -70
- package/src/lib/calendar/calendar.scss +0 -176
- package/src/lib/calendar/calendar.spec.ts +0 -341
- package/src/lib/calendar/calendar.template.ts +0 -93
- package/src/lib/calendar/calendar.ts +0 -139
- package/src/lib/calendar/helpers/calendar.date-functions.ts +0 -31
- package/src/lib/calendar/helpers/calendar.event-context.ts +0 -72
- package/src/lib/calendar/helpers/calendar.keyboard-interactions.ts +0 -65
- package/src/lib/calendar/index.ts +0 -16
- package/src/lib/calendar/partials/_variables.scss +0 -15
- package/src/lib/calendar/ui.test.ts +0 -32
- package/src/lib/calendar/ui.test.ts-snapshots/snapshots-calendar-Chrome-Stable-darwin.png +0 -0
- package/src/lib/calendar/ui.test.ts-snapshots/snapshots-calendar-Chrome-Stable-linux.png +0 -0
- package/src/lib/calendar/ui.test.ts-snapshots/snapshots-calendar-Desktop-Firefox-darwin.png +0 -0
- package/src/lib/calendar/ui.test.ts-snapshots/snapshots-calendar-Desktop-Firefox-linux.png +0 -0
- package/src/lib/calendar/ui.test.ts-snapshots/snapshots-calendar-Desktop-Safari-darwin.png +0 -0
- package/src/lib/calendar/ui.test.ts-snapshots/snapshots-calendar-Desktop-Safari-linux.png +0 -0
- package/src/lib/components.spec.ts +0 -7
- package/src/lib/elevation/README.md +0 -99
- package/src/lib/elevation/elevation.scss +0 -15
- package/src/lib/elevation/elevation.spec.ts +0 -55
- package/src/lib/elevation/elevation.template.ts +0 -26
- package/src/lib/elevation/elevation.ts +0 -17
- package/src/lib/elevation/index.ts +0 -17
- package/src/lib/elevation/partials/_elevation.mixin.scss +0 -4
- package/src/lib/elevation/ui.test.ts +0 -32
- package/src/lib/elevation/ui.test.ts-snapshots/snapshots-elevation-Chrome-Stable-darwin.png +0 -0
- package/src/lib/elevation/ui.test.ts-snapshots/snapshots-elevation-Chrome-Stable-linux.png +0 -0
- package/src/lib/elevation/ui.test.ts-snapshots/snapshots-elevation-Desktop-Firefox-darwin.png +0 -0
- package/src/lib/elevation/ui.test.ts-snapshots/snapshots-elevation-Desktop-Firefox-linux.png +0 -0
- package/src/lib/elevation/ui.test.ts-snapshots/snapshots-elevation-Desktop-Safari-darwin.png +0 -0
- package/src/lib/elevation/ui.test.ts-snapshots/snapshots-elevation-Desktop-Safari-linux.png +0 -0
- package/src/lib/enums.ts +0 -55
- package/src/lib/focus/README.md +0 -1
- package/src/lib/focus/focus.scss +0 -17
- package/src/lib/focus/focus.template.ts +0 -16
- package/src/lib/focus/focus.ts +0 -10
- package/src/lib/focus/index.ts +0 -21
- package/src/lib/focus/partials/variables.scss +0 -2
- package/src/lib/icon/README.md +0 -70
- package/src/lib/icon/__snapshots__/icon.spec.ts.snap +0 -16
- package/src/lib/icon/icon.placeholder.ts +0 -12
- package/src/lib/icon/icon.scss +0 -52
- package/src/lib/icon/icon.spec.ts +0 -106
- package/src/lib/icon/icon.template.ts +0 -23
- package/src/lib/icon/icon.ts +0 -93
- package/src/lib/icon/index.ts +0 -14
- package/src/lib/layout/README.md +0 -154
- package/src/lib/layout/index.ts +0 -18
- package/src/lib/layout/layout.scss +0 -40
- package/src/lib/layout/layout.spec.ts +0 -73
- package/src/lib/layout/layout.template.ts +0 -29
- package/src/lib/layout/layout.ts +0 -46
- package/src/lib/layout/partials/_functions.scss +0 -15
- package/src/lib/layout/partials/_mixins.scss +0 -5
- package/src/lib/layout/partials/_variables.scss +0 -23
- package/src/lib/layout/ui.test.ts +0 -32
- package/src/lib/layout/ui.test.ts-snapshots/snapshots-layout-Chrome-Stable-darwin.png +0 -0
- package/src/lib/layout/ui.test.ts-snapshots/snapshots-layout-Chrome-Stable-linux.png +0 -0
- package/src/lib/layout/ui.test.ts-snapshots/snapshots-layout-Desktop-Firefox-darwin.png +0 -0
- package/src/lib/layout/ui.test.ts-snapshots/snapshots-layout-Desktop-Firefox-linux.png +0 -0
- package/src/lib/layout/ui.test.ts-snapshots/snapshots-layout-Desktop-Safari-darwin.png +0 -0
- package/src/lib/layout/ui.test.ts-snapshots/snapshots-layout-Desktop-Safari-linux.png +0 -0
- package/src/lib/popup/README.md +0 -261
- package/src/lib/popup/index.ts +0 -21
- package/src/lib/popup/popup.scss +0 -43
- package/src/lib/popup/popup.spec.ts +0 -265
- package/src/lib/popup/popup.template.ts +0 -41
- package/src/lib/popup/popup.ts +0 -158
- package/src/lib/popup/ui.test.ts +0 -111
- package/src/lib/popup/ui.test.ts-snapshots/snapshots-popup-Chrome-Stable-darwin.png +0 -0
- package/src/lib/popup/ui.test.ts-snapshots/snapshots-popup-Chrome-Stable-linux.png +0 -0
- package/src/lib/popup/ui.test.ts-snapshots/snapshots-popup-Desktop-Firefox-darwin.png +0 -0
- package/src/lib/popup/ui.test.ts-snapshots/snapshots-popup-Desktop-Firefox-linux.png +0 -0
- package/src/lib/popup/ui.test.ts-snapshots/snapshots-popup-Desktop-Safari-darwin.png +0 -0
- package/src/lib/popup/ui.test.ts-snapshots/snapshots-popup-Desktop-Safari-linux.png +0 -0
- package/src/lib/progress/README.md +0 -107
- package/src/lib/progress/index.ts +0 -14
- package/src/lib/progress/progress.scss +0 -133
- package/src/lib/progress/progress.spec.ts +0 -173
- package/src/lib/progress/progress.template.ts +0 -62
- package/src/lib/progress/progress.ts +0 -25
- package/src/lib/progress/ui.test.ts +0 -70
- package/src/lib/progress/ui.test.ts-snapshots/snapshots-progress-Chrome-Stable-darwin.png +0 -0
- package/src/lib/progress/ui.test.ts-snapshots/snapshots-progress-Chrome-Stable-linux.png +0 -0
- package/src/lib/progress/ui.test.ts-snapshots/snapshots-progress-Desktop-Firefox-darwin.png +0 -0
- package/src/lib/progress/ui.test.ts-snapshots/snapshots-progress-Desktop-Firefox-linux.png +0 -0
- package/src/lib/progress/ui.test.ts-snapshots/snapshots-progress-Desktop-Safari-darwin.png +0 -0
- package/src/lib/progress/ui.test.ts-snapshots/snapshots-progress-Desktop-Safari-linux.png +0 -0
- package/src/lib/progress-ring/README.md +0 -90
- package/src/lib/progress-ring/index.ts +0 -15
- package/src/lib/progress-ring/progress-ring.scss +0 -75
- package/src/lib/progress-ring/progress-ring.spec.ts +0 -139
- package/src/lib/progress-ring/progress-ring.template.ts +0 -82
- package/src/lib/progress-ring/progress-ring.ts +0 -18
- package/src/lib/progress-ring/ui.test.ts +0 -35
- package/src/lib/progress-ring/ui.test.ts-snapshots/snapshots-progress-ring-Chrome-Stable-darwin.png +0 -0
- package/src/lib/progress-ring/ui.test.ts-snapshots/snapshots-progress-ring-Chrome-Stable-linux.png +0 -0
- package/src/lib/progress-ring/ui.test.ts-snapshots/snapshots-progress-ring-Desktop-Firefox-darwin.png +0 -0
- package/src/lib/progress-ring/ui.test.ts-snapshots/snapshots-progress-ring-Desktop-Firefox-linux.png +0 -0
- package/src/lib/progress-ring/ui.test.ts-snapshots/snapshots-progress-ring-Desktop-Safari-darwin.png +0 -0
- package/src/lib/progress-ring/ui.test.ts-snapshots/snapshots-progress-ring-Desktop-Safari-linux.png +0 -0
- package/src/lib/side-drawer/README.md +0 -304
- package/src/lib/side-drawer/index.ts +0 -16
- package/src/lib/side-drawer/partials/variables.scss +0 -6
- package/src/lib/side-drawer/side-drawer.scss +0 -109
- package/src/lib/side-drawer/side-drawer.spec.ts +0 -118
- package/src/lib/side-drawer/side-drawer.template.ts +0 -51
- package/src/lib/side-drawer/side-drawer.ts +0 -58
- package/src/lib/side-drawer/ui.test.ts +0 -102
- package/src/lib/side-drawer/ui.test.ts-snapshots/snapshots-side-drawer-Chrome-Stable-darwin.png +0 -0
- package/src/lib/side-drawer/ui.test.ts-snapshots/snapshots-side-drawer-Chrome-Stable-linux.png +0 -0
- package/src/lib/side-drawer/ui.test.ts-snapshots/snapshots-side-drawer-Desktop-Firefox-darwin.png +0 -0
- package/src/lib/side-drawer/ui.test.ts-snapshots/snapshots-side-drawer-Desktop-Firefox-linux.png +0 -0
- package/src/lib/side-drawer/ui.test.ts-snapshots/snapshots-side-drawer-Desktop-Safari-darwin.png +0 -0
- package/src/lib/side-drawer/ui.test.ts-snapshots/snapshots-side-drawer-Desktop-Safari-linux.png +0 -0
- package/src/lib/side-drawer/ui.test.ts-snapshots/snapshots-side-drawer-modal-Chrome-Stable-darwin.png +0 -0
- package/src/lib/side-drawer/ui.test.ts-snapshots/snapshots-side-drawer-modal-Chrome-Stable-linux.png +0 -0
- package/src/lib/side-drawer/ui.test.ts-snapshots/snapshots-side-drawer-modal-Desktop-Firefox-darwin.png +0 -0
- package/src/lib/side-drawer/ui.test.ts-snapshots/snapshots-side-drawer-modal-Desktop-Firefox-linux.png +0 -0
- package/src/lib/side-drawer/ui.test.ts-snapshots/snapshots-side-drawer-modal-Desktop-Safari-darwin.png +0 -0
- package/src/lib/side-drawer/ui.test.ts-snapshots/snapshots-side-drawer-modal-Desktop-Safari-linux.png +0 -0
- package/src/lib/sidenav-item/README.md +0 -41
- package/src/lib/sidenav-item/index.ts +0 -20
- package/src/lib/sidenav-item/sidenav-item.scss +0 -51
- package/src/lib/sidenav-item/sidenav-item.spec.ts +0 -64
- package/src/lib/sidenav-item/sidenav-item.template.ts +0 -25
- package/src/lib/sidenav-item/sidenav-item.ts +0 -15
- package/src/lib/sidenav-item/ui.test.ts +0 -32
- package/src/lib/sidenav-item/ui.test.ts-snapshots/snapshots-sidenav-item-Chrome-Stable-darwin.png +0 -0
- package/src/lib/sidenav-item/ui.test.ts-snapshots/snapshots-sidenav-item-Chrome-Stable-linux.png +0 -0
- package/src/lib/sidenav-item/ui.test.ts-snapshots/snapshots-sidenav-item-Desktop-Firefox-darwin.png +0 -0
- package/src/lib/sidenav-item/ui.test.ts-snapshots/snapshots-sidenav-item-Desktop-Firefox-linux.png +0 -0
- package/src/lib/sidenav-item/ui.test.ts-snapshots/snapshots-sidenav-item-Desktop-Safari-darwin.png +0 -0
- package/src/lib/sidenav-item/ui.test.ts-snapshots/snapshots-sidenav-item-Desktop-Safari-linux.png +0 -0
- package/src/lib/text/README.md +0 -119
- package/src/lib/text/index.ts +0 -14
- package/src/lib/text/text.scss +0 -92
- package/src/lib/text/text.spec.ts +0 -54
- package/src/lib/text/text.template.ts +0 -28
- package/src/lib/text/text.ts +0 -55
- package/src/lib/text/ui.test.ts +0 -39
- package/src/lib/text/ui.test.ts-snapshots/snapshots-text-Chrome-Stable-darwin.png +0 -0
- package/src/lib/text/ui.test.ts-snapshots/snapshots-text-Chrome-Stable-linux.png +0 -0
- package/src/lib/text/ui.test.ts-snapshots/snapshots-text-Desktop-Firefox-darwin.png +0 -0
- package/src/lib/text/ui.test.ts-snapshots/snapshots-text-Desktop-Firefox-linux.png +0 -0
- package/src/lib/text/ui.test.ts-snapshots/snapshots-text-Desktop-Safari-darwin.png +0 -0
- package/src/lib/text/ui.test.ts-snapshots/snapshots-text-Desktop-Safari-linux.png +0 -0
- package/src/lib/text-anchor/README.md +0 -5
- package/src/lib/text-anchor/index.ts +0 -12
- package/src/lib/text-anchor/text-anchor.spec.ts +0 -153
- package/src/lib/text-anchor/text-anchor.template.ts +0 -66
- package/src/lib/text-anchor/text-anchor.ts +0 -22
- package/src/lib/tooltip/README.md +0 -132
- package/src/lib/tooltip/index.ts +0 -16
- package/src/lib/tooltip/partials/variables.scss +0 -1
- package/src/lib/tooltip/tooltip.scss +0 -18
- package/src/lib/tooltip/tooltip.spec.ts +0 -70
- package/src/lib/tooltip/tooltip.template.ts +0 -30
- package/src/lib/tooltip/tooltip.ts +0 -44
- package/src/lib/tooltip/ui.test.ts +0 -53
- package/src/lib/tooltip/ui.test.ts-snapshots/snapshots-tooltip-Chrome-Stable-darwin.png +0 -0
- package/src/lib/tooltip/ui.test.ts-snapshots/snapshots-tooltip-Chrome-Stable-linux.png +0 -0
- package/src/lib/tooltip/ui.test.ts-snapshots/snapshots-tooltip-Desktop-Firefox-darwin.png +0 -0
- package/src/lib/tooltip/ui.test.ts-snapshots/snapshots-tooltip-Desktop-Firefox-linux.png +0 -0
- package/src/lib/tooltip/ui.test.ts-snapshots/snapshots-tooltip-Desktop-Safari-darwin.png +0 -0
- package/src/lib/tooltip/ui.test.ts-snapshots/snapshots-tooltip-Desktop-Safari-linux.png +0 -0
- package/src/shared/design-system/index.ts +0 -12
- package/src/shared/patterns/affix.ts +0 -56
- package/src/types/extract-gfm.d.ts +0 -5
- package/src/types/style.d.ts +0 -4
- package/src/visual-tests/visual-tests-utils.ts +0 -76
- package/tsconfig.json +0 -36
- package/tsconfig.lib.json +0 -11
- package/tsconfig.spec.json +0 -16
package/src/lib/layout/index.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { FoundationElementDefinition } from '@microsoft/fast-foundation';
|
|
2
|
-
import { designSystem } from '../../shared/design-system';
|
|
3
|
-
import { Layout } from './layout';
|
|
4
|
-
import styles from './layout.scss';
|
|
5
|
-
import { layoutTemplate as template } from './layout.template';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Represents a layout custom element.
|
|
10
|
-
* layout is...
|
|
11
|
-
*/
|
|
12
|
-
export const VIVIDLayout = Layout.compose<FoundationElementDefinition>({
|
|
13
|
-
baseName: 'layout',
|
|
14
|
-
template: template as any,
|
|
15
|
-
styles,
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
designSystem.register(VIVIDLayout());
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
|
-
|
|
3
|
-
@use 'partials/variables' as variables;
|
|
4
|
-
@use 'partials/mixins' as mixins;
|
|
5
|
-
@use 'partials/functions' as functions;
|
|
6
|
-
|
|
7
|
-
.control {
|
|
8
|
-
display: grid;
|
|
9
|
-
grid-auto-rows: min-content;
|
|
10
|
-
|
|
11
|
-
@include mixins.measurement(map.keys(variables.$bases)...) using ($basis) {
|
|
12
|
-
#{functions.get-selector-with-default(".column-basis", $basis, 'base', map.keys(variables.$bases))} {
|
|
13
|
-
grid-template-columns: var(
|
|
14
|
-
#{variables.$layout-grid-template-columns},
|
|
15
|
-
repeat(
|
|
16
|
-
var(#{variables.$auto-sizing}),
|
|
17
|
-
minmax(map.get(variables.$bases, $basis), 1fr)
|
|
18
|
-
)
|
|
19
|
-
);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
@include mixins.measurement(map.keys(variables.$spaces)...) using ($space) {
|
|
24
|
-
#{functions.get-selector-with-default(".column-spacing", $space, 'base', map.keys(variables.$spaces))} {
|
|
25
|
-
gap: map.get(variables.$spaces, $space);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
@include mixins.measurement(map.keys(variables.$spaces)...) using ($space) {
|
|
30
|
-
&.gutters-#{$space} {
|
|
31
|
-
margin: map.get(variables.$spaces, $space);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
@include mixins.measurement(map.keys(variables.$auto-sizes)...) using ($size) {
|
|
36
|
-
#{functions.get-selector-with-default(".auto-sizing", $size, fit, map.keys(variables.$auto-sizes))} {
|
|
37
|
-
#{variables.$auto-sizing}: map.get(variables.$auto-sizes, $size);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { elementUpdated, fixture, getControlElement } from '@vivid-nx/shared';
|
|
2
|
-
import { Size } from '../enums';
|
|
3
|
-
import { AUTO_SIZING, Layout } from './layout';
|
|
4
|
-
import '.';
|
|
5
|
-
|
|
6
|
-
const COMPONENT_TAG = 'vwc-layout';
|
|
7
|
-
|
|
8
|
-
describe('vwc-layout', () => {
|
|
9
|
-
let element: Layout;
|
|
10
|
-
|
|
11
|
-
beforeEach(async () => {
|
|
12
|
-
element = await fixture(`<${COMPONENT_TAG}>
|
|
13
|
-
<div style="border: 1px solid">test</div>
|
|
14
|
-
<div style="border: 1px solid">test</div>
|
|
15
|
-
</${COMPONENT_TAG}>`) as Layout;
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
describe('basic', () => {
|
|
19
|
-
it('initializes as a vwc-layout', async () => {
|
|
20
|
-
expect(element).toBeInstanceOf(Layout);
|
|
21
|
-
expect(element.gutters).toBeUndefined();
|
|
22
|
-
expect(element.columnBasis).toBeUndefined();
|
|
23
|
-
expect(element.columnSpacing).toBeUndefined();
|
|
24
|
-
expect(element.autoSizing).toBeUndefined();
|
|
25
|
-
});
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
describe('gutters', () => {
|
|
29
|
-
it('should set correct internal gutters class', async () => {
|
|
30
|
-
const gutters = Size.BaseLarge;
|
|
31
|
-
|
|
32
|
-
expect(getControlElement(element).classList.toString()).toEqual('control');
|
|
33
|
-
element.gutters = gutters;
|
|
34
|
-
await elementUpdated(element);
|
|
35
|
-
expect(getControlElement(element).classList.toString()).toEqual(`control gutters-${gutters}`);
|
|
36
|
-
});
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
describe('column-basis', () => {
|
|
41
|
-
it('should set correct internal column-basis style', async () => {
|
|
42
|
-
const columnBasis = Size.BaseLarge;
|
|
43
|
-
|
|
44
|
-
expect(getControlElement(element).classList.toString()).toEqual('control');
|
|
45
|
-
element.columnBasis = columnBasis;
|
|
46
|
-
await elementUpdated(element);
|
|
47
|
-
expect(getControlElement(element).classList.toString()).toEqual(`control column-basis-${columnBasis}`);
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
describe('column-spacing', () => {
|
|
52
|
-
it('should set correct internal column-spacing style', async () => {
|
|
53
|
-
const columnSpacing = Size.BaseLarge;
|
|
54
|
-
|
|
55
|
-
expect(getControlElement(element).classList.toString()).toEqual('control');
|
|
56
|
-
element.columnSpacing = columnSpacing;
|
|
57
|
-
await elementUpdated(element);
|
|
58
|
-
expect(getControlElement(element).classList.toString()).toEqual(`control column-spacing-${columnSpacing}`);
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
describe('auto-sizing', () => {
|
|
64
|
-
it('should set correct internal auto-sizing style', async () => {
|
|
65
|
-
const autoSizing = AUTO_SIZING.Fill;
|
|
66
|
-
|
|
67
|
-
expect(getControlElement(element).classList.toString()).toEqual('control');
|
|
68
|
-
element.autoSizing = autoSizing;
|
|
69
|
-
await elementUpdated(element);
|
|
70
|
-
expect(getControlElement(element).classList.toString()).toEqual(`control auto-sizing-${autoSizing}`);
|
|
71
|
-
});
|
|
72
|
-
});
|
|
73
|
-
});
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { html } from '@microsoft/fast-element';
|
|
2
|
-
import { classNames } from '@microsoft/fast-web-utilities';
|
|
3
|
-
import type { ViewTemplate } from '@microsoft/fast-element';
|
|
4
|
-
import type { ElementDefinitionContext, FoundationElementDefinition } from '@microsoft/fast-foundation';
|
|
5
|
-
import type { Layout } from './layout';
|
|
6
|
-
|
|
7
|
-
const getClasses = ({
|
|
8
|
-
columnBasis, gutters, columnSpacing, autoSizing
|
|
9
|
-
}: Layout) => classNames(
|
|
10
|
-
'control',
|
|
11
|
-
[`column-basis-${columnBasis}`, Boolean(columnBasis)],
|
|
12
|
-
[`gutters-${gutters}`, Boolean(gutters)],
|
|
13
|
-
[`column-spacing-${columnSpacing}`, Boolean(columnSpacing)],
|
|
14
|
-
[`auto-sizing-${autoSizing}`, Boolean(autoSizing)],
|
|
15
|
-
);
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* The template for the {@link @vonage/vivid#Layout} component.
|
|
19
|
-
*
|
|
20
|
-
* @returns {ViewTemplate<Layout>} A template capable of creating HTMLView instances or rendering directly to DOM.
|
|
21
|
-
* @public
|
|
22
|
-
*/
|
|
23
|
-
export const layoutTemplate: (
|
|
24
|
-
context: ElementDefinitionContext,
|
|
25
|
-
definition: FoundationElementDefinition
|
|
26
|
-
) => ViewTemplate<Layout> = () => html`
|
|
27
|
-
<div class="${getClasses}">
|
|
28
|
-
<slot></slot>
|
|
29
|
-
</div>`;
|
package/src/lib/layout/layout.ts
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { attr } from '@microsoft/fast-element';
|
|
2
|
-
import { FoundationElement } from '@microsoft/fast-foundation';
|
|
3
|
-
import type { Size } from '../enums.js';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export enum AUTO_SIZING { Fit = 'fit', Fill = 'fill' }
|
|
7
|
-
type Gutters = Extract<Size, Size.BaseSmall | Size.Base | Size.BaseLarge>;
|
|
8
|
-
type ColumnSpacing = Extract<Size, Size.BaseSmall | Size.Base | Size.BaseLarge>;
|
|
9
|
-
type ColumnBasis = Extract<Size, Size.BaseSmall | Size.Base | Size.BaseLarge> | 'block';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Base class for layout
|
|
13
|
-
*
|
|
14
|
-
* @cssprop [--layout-grid-template-columns=repeat([the `auto-sizing` mapped value],
|
|
15
|
-
* minmax([the `column-basis` mapped value], 1fr))] - Controls the `grid-template-columns` of the layout.
|
|
16
|
-
* @public
|
|
17
|
-
*/
|
|
18
|
-
export class Layout extends FoundationElement {
|
|
19
|
-
/**
|
|
20
|
-
* sets the initial preferred margin from predefined available options
|
|
21
|
-
*
|
|
22
|
-
* @public
|
|
23
|
-
*/
|
|
24
|
-
@attr gutters?: Gutters;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* sets the initial preferred measure of a column from predefined available options
|
|
28
|
-
*
|
|
29
|
-
* @public
|
|
30
|
-
*/
|
|
31
|
-
@attr({ attribute: 'column-basis' }) columnBasis?: ColumnBasis;
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* sets the initial preferred spacing of a column from predefined available options
|
|
35
|
-
*
|
|
36
|
-
* @public
|
|
37
|
-
*/
|
|
38
|
-
@attr({ attribute: 'column-spacing' }) columnSpacing?: ColumnSpacing;
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* sets the initial preferred auto-sizing from predefined available options
|
|
42
|
-
*
|
|
43
|
-
* @public
|
|
44
|
-
*/
|
|
45
|
-
@attr({ attribute: 'auto-sizing' }) autoSizing?: AUTO_SIZING;
|
|
46
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
@function get-default-selector($list, $prefix) {
|
|
2
|
-
$selector: '';
|
|
3
|
-
@each $item in $list {
|
|
4
|
-
$selector: $selector + ':not(#{$prefix}-#{$item})';
|
|
5
|
-
}
|
|
6
|
-
@return $selector;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
@function get-selector-with-default($prefix, $key, $default-key, $all-keys) {
|
|
10
|
-
$selector: '&#{$prefix}-#{$key}';
|
|
11
|
-
@if $key == $default-key {
|
|
12
|
-
$selector: '&#{get-default-selector($all-keys, $prefix)}', $selector;
|
|
13
|
-
}
|
|
14
|
-
@return $selector;
|
|
15
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
$auto-sizing: --_auto-sizing; // interior. not API
|
|
2
|
-
$layout-grid-template-columns: --layout-grid-template-columns;
|
|
3
|
-
|
|
4
|
-
/* #region SIZEs */
|
|
5
|
-
$auto-sizes: (
|
|
6
|
-
fill: auto-fill,
|
|
7
|
-
fit: auto-fit,
|
|
8
|
-
);
|
|
9
|
-
|
|
10
|
-
/* #region BASES */
|
|
11
|
-
$bases: (
|
|
12
|
-
base-small: 10rem,
|
|
13
|
-
base: 20rem,
|
|
14
|
-
base-large: 30rem,
|
|
15
|
-
block: 1fr
|
|
16
|
-
);
|
|
17
|
-
|
|
18
|
-
/* #region SPACES */
|
|
19
|
-
$spaces: (
|
|
20
|
-
base-small: 16px,
|
|
21
|
-
base: 24px,
|
|
22
|
-
base-large: 32px,
|
|
23
|
-
);
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import * as path from 'path';
|
|
2
|
-
import { expect, test } from '@playwright/test';
|
|
3
|
-
import type { Page } from '@playwright/test';
|
|
4
|
-
import {
|
|
5
|
-
extractHTMLBlocksFromReadme,
|
|
6
|
-
loadComponents,
|
|
7
|
-
loadTemplate
|
|
8
|
-
} from '../../visual-tests/visual-tests-utils.ts';
|
|
9
|
-
|
|
10
|
-
const components = ['layout'];
|
|
11
|
-
test('should show the component', async ({ page }: { page: Page }) => {
|
|
12
|
-
const template = extractHTMLBlocksFromReadme(path.join(new URL('.', import.meta.url).pathname, 'README.md'))
|
|
13
|
-
.reduce((htmlString: string, block: string) => `${htmlString} <div style="margin: 5px;">${block}</div>`, '');
|
|
14
|
-
|
|
15
|
-
await loadComponents({
|
|
16
|
-
page,
|
|
17
|
-
components,
|
|
18
|
-
});
|
|
19
|
-
await loadTemplate({
|
|
20
|
-
page,
|
|
21
|
-
template,
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
const testWrapper = await page.$('#wrapper');
|
|
25
|
-
|
|
26
|
-
await page.waitForLoadState('networkidle');
|
|
27
|
-
|
|
28
|
-
expect(await testWrapper?.screenshot())
|
|
29
|
-
.toMatchSnapshot(
|
|
30
|
-
'./snapshots/layout.png',
|
|
31
|
-
);
|
|
32
|
-
});
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/src/lib/popup/README.md
DELETED
|
@@ -1,261 +0,0 @@
|
|
|
1
|
-
# popup
|
|
2
|
-
|
|
3
|
-
Popup are used to display a message or notification to the user and are displayed on top of all other web page elements.
|
|
4
|
-
Popup's goal is to provide additional, helpful content. To trigger the Popup, it should be paired with an anchor (e.g., a button).
|
|
5
|
-
|
|
6
|
-
```js
|
|
7
|
-
<script type='module'>
|
|
8
|
-
import '@vonage/vivid/popup';
|
|
9
|
-
</script>
|
|
10
|
-
```
|
|
11
|
-
## Anchor
|
|
12
|
-
|
|
13
|
-
Use the `anchor` attribute to reference the ID to element in the popup’s owner document.
|
|
14
|
-
|
|
15
|
-
The popup is positioned absolutely to its anchor. It is recommended to wrap it with a div element and set its position `relative`.
|
|
16
|
-
|
|
17
|
-
- Type: `string`
|
|
18
|
-
- Default: `''`
|
|
19
|
-
|
|
20
|
-
```js
|
|
21
|
-
<div class="wrapper" style="position:relative;">
|
|
22
|
-
<vwc-button id="anchor"></vwc-button>
|
|
23
|
-
<vwc-popup anchor="anchor"></vwc-popup>
|
|
24
|
-
</div>
|
|
25
|
-
```
|
|
26
|
-
## Open
|
|
27
|
-
Use the `open` attribute to indicate whether the popup is open.
|
|
28
|
-
|
|
29
|
-
- Type: `boolean`
|
|
30
|
-
- Default: `false`
|
|
31
|
-
|
|
32
|
-
```html preview
|
|
33
|
-
<style>
|
|
34
|
-
.content {
|
|
35
|
-
width: 200px;
|
|
36
|
-
padding: 1rem;
|
|
37
|
-
}
|
|
38
|
-
.wrapper{
|
|
39
|
-
width: 100%;
|
|
40
|
-
height: 120px;
|
|
41
|
-
display: flex;
|
|
42
|
-
align-items: center;
|
|
43
|
-
justify-content: center;
|
|
44
|
-
}
|
|
45
|
-
</style>
|
|
46
|
-
<div class="wrapper">
|
|
47
|
-
<vwc-button id="anchor1" appearance='outlined' label='Click on me!'></vwc-button>
|
|
48
|
-
<vwc-popup id="popup" anchor="anchor1" open>
|
|
49
|
-
<div class="content">
|
|
50
|
-
<vwc-text tight font-face="body-2">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</vwc-text>
|
|
51
|
-
</div>
|
|
52
|
-
</vwc-popup>
|
|
53
|
-
</div>
|
|
54
|
-
<script>
|
|
55
|
-
anchor1.addEventListener('click', toggleOpen);
|
|
56
|
-
function toggleOpen() {
|
|
57
|
-
popup.open = !popup.open;
|
|
58
|
-
}
|
|
59
|
-
</script>
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
## Dismissible
|
|
63
|
-
|
|
64
|
-
Add the `dismissible` attribute to add a close button to the popup.
|
|
65
|
-
|
|
66
|
-
- Type: `boolean`
|
|
67
|
-
- Default: `false`
|
|
68
|
-
|
|
69
|
-
```html preview
|
|
70
|
-
<style>
|
|
71
|
-
.content {
|
|
72
|
-
width: 120px;
|
|
73
|
-
padding: 1rem;
|
|
74
|
-
}
|
|
75
|
-
.wrapper{
|
|
76
|
-
width: 100%;
|
|
77
|
-
height: 120px;
|
|
78
|
-
display: flex;
|
|
79
|
-
align-items: center;
|
|
80
|
-
justify-content: center;
|
|
81
|
-
}
|
|
82
|
-
</style>
|
|
83
|
-
<div class="wrapper">
|
|
84
|
-
<vwc-button id="anchor2" appearance='outlined' label='Click on me!'></vwc-button>
|
|
85
|
-
<vwc-popup id="popup" anchor="anchor2" open dismissible>
|
|
86
|
-
<div class="content">
|
|
87
|
-
<vwc-text tight font-face="body-2">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</vwc-text>
|
|
88
|
-
</div>
|
|
89
|
-
</vwc-popup>
|
|
90
|
-
</div>
|
|
91
|
-
<script>
|
|
92
|
-
anchor2.addEventListener('click', toggleOpen);
|
|
93
|
-
function toggleOpen() {
|
|
94
|
-
popup.open = !popup.open;
|
|
95
|
-
}
|
|
96
|
-
</script>
|
|
97
|
-
```
|
|
98
|
-
## Arrow
|
|
99
|
-
Add the `arrow` attribute to add a small triangle to indicate the trigger element.
|
|
100
|
-
|
|
101
|
-
- Type: `boolean`
|
|
102
|
-
- Default: `false`
|
|
103
|
-
|
|
104
|
-
```html preview
|
|
105
|
-
<style>
|
|
106
|
-
.content {
|
|
107
|
-
width: 200px;
|
|
108
|
-
padding: 1rem;
|
|
109
|
-
}
|
|
110
|
-
.wrapper{
|
|
111
|
-
width: 100%;
|
|
112
|
-
height: 120px;
|
|
113
|
-
display: flex;
|
|
114
|
-
align-items: center;
|
|
115
|
-
justify-content: center;
|
|
116
|
-
}
|
|
117
|
-
</style>
|
|
118
|
-
<div class="wrapper">
|
|
119
|
-
<vwc-icon id="anchor3" type='info-line'></vwc-icon>
|
|
120
|
-
<vwc-popup anchor="anchor3" open arrow>
|
|
121
|
-
<div class="content">
|
|
122
|
-
<vwc-text tight font-face="body-2">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</vwc-text>
|
|
123
|
-
</div>
|
|
124
|
-
</vwc-popup>
|
|
125
|
-
</div>
|
|
126
|
-
```
|
|
127
|
-
## Alternate
|
|
128
|
-
Add the `alternate` attribute to set the color-scheme to dark or light (depending on current user's system settings).
|
|
129
|
-
|
|
130
|
-
- Type: `boolean`
|
|
131
|
-
- Default: `false`
|
|
132
|
-
|
|
133
|
-
```html preview
|
|
134
|
-
<style>
|
|
135
|
-
.content {
|
|
136
|
-
width: 200px;
|
|
137
|
-
padding: 1rem;
|
|
138
|
-
}
|
|
139
|
-
.wrapper{
|
|
140
|
-
width: 100%;
|
|
141
|
-
height: 120px;
|
|
142
|
-
display: flex;
|
|
143
|
-
align-items: center;
|
|
144
|
-
justify-content: center;
|
|
145
|
-
}
|
|
146
|
-
</style>
|
|
147
|
-
<div class="wrapper">
|
|
148
|
-
<vwc-icon id="anchor4" type='info-line'></vwc-icon>
|
|
149
|
-
<vwc-popup anchor="anchor4" open alternate>
|
|
150
|
-
<div class="content">
|
|
151
|
-
<vwc-text tight font-face="body-2">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</vwc-text>
|
|
152
|
-
</div>
|
|
153
|
-
</vwc-popup>
|
|
154
|
-
</div>
|
|
155
|
-
```
|
|
156
|
-
## Corner
|
|
157
|
-
|
|
158
|
-
Use the `corner` attribute to set the placement of the popup around the anchor.
|
|
159
|
-
|
|
160
|
-
- Type: `'top'` | `'top-start'` | `'top-end'` | `'right'` | `'right-start'` | `'right-end'` | `'bottom'` | `'bottom-start'` | `'bottom-end'`| `'left'` | `'left-start'`| `'left-end'`
|
|
161
|
-
- Default: `'left'`
|
|
162
|
-
|
|
163
|
-
```html preview
|
|
164
|
-
<style>
|
|
165
|
-
.contentWrapper{
|
|
166
|
-
width: 70px;
|
|
167
|
-
padding: 0.25rem;
|
|
168
|
-
}
|
|
169
|
-
.square {
|
|
170
|
-
height: 150px;
|
|
171
|
-
width: 300px;
|
|
172
|
-
background-color: var(--vvd-color-neutral-10);;
|
|
173
|
-
}
|
|
174
|
-
.wrapper{
|
|
175
|
-
width: 100%;
|
|
176
|
-
height: 250px;
|
|
177
|
-
display: flex;
|
|
178
|
-
align-items: center;
|
|
179
|
-
justify-content: center;
|
|
180
|
-
}
|
|
181
|
-
</style>
|
|
182
|
-
<div class="wrapper">
|
|
183
|
-
<div id="anchor5" class="square"></div>
|
|
184
|
-
<vwc-popup id="popup" anchor="anchor5" open corner="right-end">
|
|
185
|
-
<div class="contentWrapper">
|
|
186
|
-
<vwc-text tight font-face="body-2">right-end</vwc-text>
|
|
187
|
-
</div>
|
|
188
|
-
</vwc-popup>
|
|
189
|
-
<vwc-popup id="popup" anchor="anchor5" open corner="right">
|
|
190
|
-
<div class="contentWrapper">
|
|
191
|
-
<vwc-text tight font-face="body-2">right</vwc-text>
|
|
192
|
-
</div>
|
|
193
|
-
</vwc-popup>
|
|
194
|
-
<vwc-popup id="popup" anchor="anchor5" open corner="right-start">
|
|
195
|
-
<div class="contentWrapper">
|
|
196
|
-
<vwc-text tight font-face="body-2">right-start</vwc-text>
|
|
197
|
-
</div>
|
|
198
|
-
</vwc-popup>
|
|
199
|
-
<vwc-popup id="popup" anchor="anchor5" open corner="left-end">
|
|
200
|
-
<div class="contentWrapper">
|
|
201
|
-
<vwc-text tight font-face="body-2">left-end</vwc-text>
|
|
202
|
-
</div>
|
|
203
|
-
</vwc-popup>
|
|
204
|
-
<vwc-popup id="popup" anchor="anchor5" open corner="left">
|
|
205
|
-
<div class="contentWrapper">
|
|
206
|
-
<vwc-text tight font-face="body-2">left</vwc-text>
|
|
207
|
-
</div>
|
|
208
|
-
</vwc-popup>
|
|
209
|
-
<vwc-popup id="popup" anchor="anchor5" open corner="left-start">
|
|
210
|
-
<div class="contentWrapper">
|
|
211
|
-
<vwc-text tight font-face="body-2">left-start</vwc-text>
|
|
212
|
-
</div>
|
|
213
|
-
</vwc-popup>
|
|
214
|
-
<vwc-popup id="popup" anchor="anchor5" open corner="top-end">
|
|
215
|
-
<div class="contentWrapper">
|
|
216
|
-
<vwc-text tight font-face="body-2">top-end</vwc-text>
|
|
217
|
-
</div>
|
|
218
|
-
</vwc-popup>
|
|
219
|
-
<vwc-popup id="popup" anchor="anchor5" open corner="top">
|
|
220
|
-
<div class="contentWrapper">
|
|
221
|
-
<vwc-text tight font-face="body-2">top</vwc-text>
|
|
222
|
-
</div>
|
|
223
|
-
</vwc-popup>
|
|
224
|
-
<vwc-popup id="popup" anchor="anchor5" open corner="top-start">
|
|
225
|
-
<div class="contentWrapper">
|
|
226
|
-
<vwc-text tight font-face="body-2">top-start</vwc-text>
|
|
227
|
-
</div>
|
|
228
|
-
</vwc-popup>
|
|
229
|
-
<vwc-popup id="popup" anchor="anchor5" open corner="bottom-end">
|
|
230
|
-
<div class="contentWrapper">
|
|
231
|
-
<vwc-text tight font-face="body-2">bottom-end</vwc-text>
|
|
232
|
-
</div>
|
|
233
|
-
</vwc-popup>
|
|
234
|
-
<vwc-popup id="popup" anchor="anchor5" open corner="bottom">
|
|
235
|
-
<div class="contentWrapper">
|
|
236
|
-
<vwc-text tight font-face="body-2">bottom</vwc-text>
|
|
237
|
-
</div>
|
|
238
|
-
</vwc-popup>
|
|
239
|
-
<vwc-popup id="popup" anchor="anchor5" open corner="bottom-start">
|
|
240
|
-
<div class="contentWrapper">
|
|
241
|
-
<vwc-text tight font-face="body-2">bottom-start</vwc-text>
|
|
242
|
-
</div>
|
|
243
|
-
</vwc-popup>
|
|
244
|
-
</div>
|
|
245
|
-
```
|
|
246
|
-
## Caveat
|
|
247
|
-
|
|
248
|
-
Document elements display precedence is formed by the imaginary z-axis [stacking context](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Positioning/Understanding_z_index/The_stacking_context), commonly by order of which elements are rendered and special properties (e.g. _z-index_).
|
|
249
|
-
Popup component is a low level element, unaware of its document context, but in most cases required to overlay on top of all elements.
|
|
250
|
-
|
|
251
|
-
A common practice used in apps / frameworks to promote a popup component to top other elements z-axis, is to utilise a service that dynamically appends a popup component to the end of the body element, when called for.
|
|
252
|
-
|
|
253
|
-
This helps ensure elements don't render over top a popup undesirebly.
|
|
254
|
-
|
|
255
|
-
## Methods
|
|
256
|
-
### updatePosition()
|
|
257
|
-
|
|
258
|
-
- Type: function
|
|
259
|
-
- Returns: void
|
|
260
|
-
|
|
261
|
-
Updates popup's position.
|
package/src/lib/popup/index.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import '../elevation';
|
|
2
|
-
import '../button';
|
|
3
|
-
|
|
4
|
-
import type { FoundationElementDefinition } from '@microsoft/fast-foundation';
|
|
5
|
-
import { designSystem } from '../../shared/design-system';
|
|
6
|
-
import { Popup } from './popup';
|
|
7
|
-
import styles from './popup.scss';
|
|
8
|
-
import { popupTemplate as template } from './popup.template';
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Represents a popup custom element.
|
|
13
|
-
* popup is...
|
|
14
|
-
*/
|
|
15
|
-
export const VIVIDPopup = Popup.compose<FoundationElementDefinition>({
|
|
16
|
-
baseName: 'popup',
|
|
17
|
-
template: template as any,
|
|
18
|
-
styles,
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
designSystem.register(VIVIDPopup());
|
package/src/lib/popup/popup.scss
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
$popup-bg: --vvd-color-surface-4dp;
|
|
2
|
-
|
|
3
|
-
.control {
|
|
4
|
-
width: min-content;
|
|
5
|
-
background-color: var(#{$popup-bg});
|
|
6
|
-
border-radius: inherit;
|
|
7
|
-
contain: layout;
|
|
8
|
-
|
|
9
|
-
&:not(.open) {
|
|
10
|
-
display: none;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.popup-wrapper {
|
|
15
|
-
position: fixed;
|
|
16
|
-
border-radius: 6px;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.popup-content {
|
|
20
|
-
display: grid;
|
|
21
|
-
color: var(--vvd-color-on-canvas);
|
|
22
|
-
|
|
23
|
-
.dismissible & {
|
|
24
|
-
align-content: start;
|
|
25
|
-
grid-template-columns: 1fr auto;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.arrow {
|
|
30
|
-
position: absolute;
|
|
31
|
-
z-index: -1;
|
|
32
|
-
width: 8px;
|
|
33
|
-
height: 8px;
|
|
34
|
-
background-color: var(#{$popup-bg});
|
|
35
|
-
transform: rotate(45deg);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.dismissible {
|
|
39
|
-
align-self: flex-start;
|
|
40
|
-
margin-block-start: 0.25rem;
|
|
41
|
-
margin-inline-end: 0.25rem;
|
|
42
|
-
}
|
|
43
|
-
|