@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
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
|
-
|
|
3
|
-
@use 'partials/variables' as variables;
|
|
4
|
-
@use '../../../../../node_modules/@vonage/vivid-tokens/dist/sass/themes/consts' as theme-consts;
|
|
5
|
-
@use '../../../../shared/src/lib/sass/mixins/typography' as typography;
|
|
6
|
-
@use '../../../../shared/src/lib/sass/mixins/scrim' as scrim-mixins;
|
|
7
|
-
|
|
8
|
-
$z-index-default: 6;
|
|
9
|
-
$padding-default: 16px;
|
|
10
|
-
$inline-size: var(#{variables.$side-drawer-inline-size}, 280px);
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
:host {
|
|
14
|
-
display: flex;
|
|
15
|
-
block-size: 100vh;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
:host([position='end']) {
|
|
19
|
-
flex-direction: row-reverse;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.control {
|
|
23
|
-
position: fixed;
|
|
24
|
-
z-index: var(#{variables.$side-drawer-z-index}, #{$z-index-default});
|
|
25
|
-
top: auto;
|
|
26
|
-
bottom: 0;
|
|
27
|
-
display: flex;
|
|
28
|
-
overflow: auto;
|
|
29
|
-
flex-direction: column;
|
|
30
|
-
flex-shrink: 0;
|
|
31
|
-
background-color: var(#{variables.$side-drawer-background-color}, var(#{theme-consts.$vvd-color-canvas}));
|
|
32
|
-
block-size: inherit;
|
|
33
|
-
color: var(#{variables.$side-drawer-color}, var(#{theme-consts.$vvd-color-on-canvas}));
|
|
34
|
-
inline-size: #{$inline-size};
|
|
35
|
-
|
|
36
|
-
&.alternate {
|
|
37
|
-
background-color: var(#{theme-consts.$vvd-color-canvas});
|
|
38
|
-
}
|
|
39
|
-
&:not(.open) {
|
|
40
|
-
&.end {
|
|
41
|
-
transform: translateX(100%);
|
|
42
|
-
}
|
|
43
|
-
&:not(.end) {
|
|
44
|
-
transform: translateX(-100%);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
&.control.open:not(.modal) {
|
|
49
|
-
+ .side-drawer-app-content {
|
|
50
|
-
@include typography.typography-cat-shorthand(body-1);
|
|
51
|
-
|
|
52
|
-
margin-inline-start: #{$inline-size};
|
|
53
|
-
::slotted(vwc-top-app-bar),
|
|
54
|
-
::slotted(vwc-top-app-bar-fixed) {
|
|
55
|
-
--mdc-top-app-bar-width: calc(100% - #{$inline-size});
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
&.end {
|
|
59
|
-
+ .side-drawer-app-content {
|
|
60
|
-
margin-inline-end: var(--side-drawer-inline-size, 280px);
|
|
61
|
-
margin-inline-start: 0;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
@media (prefers-reduced-motion: no-preference) {
|
|
66
|
-
transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.side-drawer-top-bar {
|
|
71
|
-
@include typography.typography-cat-shorthand(subtitle-1);
|
|
72
|
-
|
|
73
|
-
$gutter: var(#{variables.$side-drawer-padding-top-bar}, #{$padding-default});
|
|
74
|
-
|
|
75
|
-
display: flex;
|
|
76
|
-
flex-shrink: 0;
|
|
77
|
-
align-items: center;
|
|
78
|
-
padding-inline-end: #{$gutter};
|
|
79
|
-
padding-inline-start: #{$gutter};
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.side-drawer-content {
|
|
83
|
-
$gutter: var(#{variables.$side-drawer-padding-body}, #{$padding-default});
|
|
84
|
-
|
|
85
|
-
background-color: inherit;
|
|
86
|
-
overflow-y: auto;
|
|
87
|
-
padding-inline-end: #{$gutter};
|
|
88
|
-
padding-inline-start: #{$gutter};
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.modal {
|
|
92
|
-
&:not(.end) {
|
|
93
|
-
inset-inline-start: 0;
|
|
94
|
-
}
|
|
95
|
-
&.end {
|
|
96
|
-
inset-inline-end: 0;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.scrim {
|
|
101
|
-
@include scrim-mixins.scrim-variables;
|
|
102
|
-
|
|
103
|
-
position: fixed;
|
|
104
|
-
z-index: calc(#{$z-index-default} - 1);
|
|
105
|
-
top: 0;
|
|
106
|
-
right: 0;
|
|
107
|
-
bottom: 0;
|
|
108
|
-
left: 0;
|
|
109
|
-
}
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import { elementUpdated, fixture, getControlElement } from '@vivid-nx/shared';
|
|
2
|
-
import { SideDrawer } from './side-drawer';
|
|
3
|
-
import '.';
|
|
4
|
-
|
|
5
|
-
const COMPONENT_TAG = 'vwc-side-drawer';
|
|
6
|
-
|
|
7
|
-
describe('vwc-side-drawer', () => {
|
|
8
|
-
let element: SideDrawer;
|
|
9
|
-
|
|
10
|
-
beforeEach(async () => {
|
|
11
|
-
element = await fixture(`<${COMPONENT_TAG}>
|
|
12
|
-
</${COMPONENT_TAG}>`) as SideDrawer;
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
describe('basic', () => {
|
|
16
|
-
it('initializes as a vwc-side-drawer', async () => {
|
|
17
|
-
expect(element).toBeInstanceOf(SideDrawer);
|
|
18
|
-
expect(element.open).toBeFalsy();
|
|
19
|
-
expect(element.alternate).toBeFalsy();
|
|
20
|
-
expect(element.position).toBeUndefined();
|
|
21
|
-
expect(element.modal).toBeFalsy();
|
|
22
|
-
});
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
describe('show', () => {
|
|
26
|
-
it('should set "open" to true and add "open" class', async () => {
|
|
27
|
-
const control = getControlElement(element);
|
|
28
|
-
const hasClassOpenBeforeShow = control.classList.contains('open');
|
|
29
|
-
|
|
30
|
-
element.open = true;
|
|
31
|
-
await elementUpdated(element);
|
|
32
|
-
const hasClassOpenAfterShow = control.classList.contains('open');
|
|
33
|
-
|
|
34
|
-
expect(element.open).toEqual(true);
|
|
35
|
-
expect(hasClassOpenBeforeShow).toEqual(false);
|
|
36
|
-
expect(hasClassOpenAfterShow).toEqual(true);
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
describe('hide', () => {
|
|
41
|
-
it('should set "open" to false and remove "open" class', async () => {
|
|
42
|
-
element.open = true;
|
|
43
|
-
await elementUpdated(element);
|
|
44
|
-
const control = getControlElement(element);
|
|
45
|
-
const hasClassOpenBeforeHide = control.classList.contains('open');
|
|
46
|
-
|
|
47
|
-
element.open = false;
|
|
48
|
-
await elementUpdated(element);
|
|
49
|
-
const hasClassOpenAfterHide = control.classList.contains('open');
|
|
50
|
-
|
|
51
|
-
expect(hasClassOpenBeforeHide).toEqual(true);
|
|
52
|
-
expect(hasClassOpenAfterHide).toEqual(false);
|
|
53
|
-
});
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
describe('modal', () => {
|
|
57
|
-
it('should set "modal" to true and add "modal" class', async () => {
|
|
58
|
-
const control = getControlElement(element);
|
|
59
|
-
let hasClassModal = control.classList.contains('modal');
|
|
60
|
-
element.modal = true;
|
|
61
|
-
await elementUpdated(element);
|
|
62
|
-
expect(hasClassModal).toEqual(false);
|
|
63
|
-
|
|
64
|
-
hasClassModal = control.classList.contains('modal');
|
|
65
|
-
expect(hasClassModal).toEqual(true);
|
|
66
|
-
});
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
describe('alternate', () => {
|
|
70
|
-
it('should set "alternate" to true and add "alternate" class', async () => {
|
|
71
|
-
const control = getControlElement(element);
|
|
72
|
-
let hasClassAlternate = control.classList.contains('alternate');
|
|
73
|
-
element.alternate = true;
|
|
74
|
-
await elementUpdated(element);
|
|
75
|
-
expect(hasClassAlternate).toEqual(false);
|
|
76
|
-
|
|
77
|
-
hasClassAlternate = control.classList.contains('alternate');
|
|
78
|
-
expect(hasClassAlternate).toEqual(true);
|
|
79
|
-
});
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
describe('position', () => {
|
|
83
|
-
it('should set "position" to "end" and add "position" class', async () => {
|
|
84
|
-
const control = getControlElement(element);
|
|
85
|
-
let hasClassPosition = control.classList.contains('end');
|
|
86
|
-
element.position = 'end';
|
|
87
|
-
await elementUpdated(element);
|
|
88
|
-
expect(hasClassPosition).toEqual(false);
|
|
89
|
-
|
|
90
|
-
hasClassPosition = control.classList.contains('end');
|
|
91
|
-
expect(hasClassPosition).toEqual(true);
|
|
92
|
-
});
|
|
93
|
-
});
|
|
94
|
-
|
|
95
|
-
describe('scrim', () => {
|
|
96
|
-
it('should close after clicking on scrim', async () => {
|
|
97
|
-
element.modal = true;
|
|
98
|
-
element.open = true;
|
|
99
|
-
await elementUpdated(element);
|
|
100
|
-
const scrim: any = element.shadowRoot?.querySelector('.scrim');
|
|
101
|
-
scrim?.click();
|
|
102
|
-
await elementUpdated(element);
|
|
103
|
-
expect(element.open).toEqual(false);
|
|
104
|
-
});
|
|
105
|
-
});
|
|
106
|
-
|
|
107
|
-
describe('escape', () => {
|
|
108
|
-
it('should close after keydown on Escape', async () => {
|
|
109
|
-
element.modal = true;
|
|
110
|
-
element.open = true;
|
|
111
|
-
await elementUpdated(element);
|
|
112
|
-
const aside: any = element.shadowRoot?.querySelector('aside');
|
|
113
|
-
aside?.dispatchEvent(new KeyboardEvent('keydown', { 'key': 'Escape' }));
|
|
114
|
-
await elementUpdated(element);
|
|
115
|
-
expect(element.open).toEqual(false);
|
|
116
|
-
});
|
|
117
|
-
});
|
|
118
|
-
});
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { html, slotted, when } from '@microsoft/fast-element';
|
|
2
|
-
import { classNames } from '@microsoft/fast-web-utilities';
|
|
3
|
-
import type { ViewTemplate } from '@microsoft/fast-element';
|
|
4
|
-
import type {
|
|
5
|
-
FoundationElementTemplate,
|
|
6
|
-
} from '@microsoft/fast-foundation';
|
|
7
|
-
import type { SideDrawer } from './side-drawer';
|
|
8
|
-
|
|
9
|
-
const getClasses = ({
|
|
10
|
-
alternate, modal, open, position
|
|
11
|
-
}: SideDrawer) => classNames(
|
|
12
|
-
'control',
|
|
13
|
-
['alternate', alternate],
|
|
14
|
-
['modal', modal],
|
|
15
|
-
['open', open],
|
|
16
|
-
['end', position === 'end'],
|
|
17
|
-
);
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* The template for the {@link @vonage/vivid#side-drawer} component.
|
|
21
|
-
*
|
|
22
|
-
* @param context
|
|
23
|
-
* @param definition
|
|
24
|
-
* @returns {ViewTemplate<side-drawer>} A template capable of creating HTMLView instances or rendering directly to DOM.
|
|
25
|
-
* @public
|
|
26
|
-
*/
|
|
27
|
-
export const sideDrawerTemplate: FoundationElementTemplate<ViewTemplate<SideDrawer>> = () => html`
|
|
28
|
-
<aside class="${getClasses}" part="${(x) => x.alternate ? 'vvd-theme-alternate' : ''}"
|
|
29
|
-
@keydown="${(x, c) => handleKeydown(x, c.event as KeyboardEvent)}">
|
|
30
|
-
|
|
31
|
-
<header class="side-drawer-top-bar" part="side-drawer-top-bar">
|
|
32
|
-
<slot name="top-bar" ${slotted('hasTopBar')}></slot>
|
|
33
|
-
</header>
|
|
34
|
-
|
|
35
|
-
<div class="side-drawer-content">
|
|
36
|
-
<slot></slot>
|
|
37
|
-
</div>
|
|
38
|
-
</aside>
|
|
39
|
-
|
|
40
|
-
<div class="side-drawer-app-content">
|
|
41
|
-
<slot name="app-content"></slot>
|
|
42
|
-
</div>
|
|
43
|
-
|
|
44
|
-
${when(x => (x.modal && x.open), html`<div class="scrim" @click="${x => (x.open = false)}" @keydown="${x => (x.open = false)}"></div>`)}
|
|
45
|
-
`;
|
|
46
|
-
|
|
47
|
-
const handleKeydown = (x: any, { key }: KeyboardEvent) => {
|
|
48
|
-
if (key === 'Escape') {
|
|
49
|
-
x.open = false;
|
|
50
|
-
}
|
|
51
|
-
};
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { attr } from '@microsoft/fast-element';
|
|
2
|
-
import { FoundationElement } from '@microsoft/fast-foundation';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Base class for side-drawer
|
|
6
|
-
*
|
|
7
|
-
* @cssprop [side-drawer-background-color=Current theme's canvas (background) color] - Controls the background of the side drawer
|
|
8
|
-
* @cssprop [side-drawer-color=Current theme's on-canvas (text) color] - Controls the color of the side drawer
|
|
9
|
-
* @cssprop [side-drawer-inline-size=280px] - Controls the inline size of the side drawer
|
|
10
|
-
* @cssprop [side-drawer-padding-top-bar=16px] - Controls the padding of the side drawer's top bar
|
|
11
|
-
* @cssprop [side-drawer-padding-body=16px] - Controls the padding of the side drawer's body
|
|
12
|
-
* @cssprop [side-drawer-z-index=6] - Controls the z-index of the side drawer
|
|
13
|
-
* @public
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
export class SideDrawer extends FoundationElement {
|
|
17
|
-
/**
|
|
18
|
-
* applies scheme alternate region
|
|
19
|
-
*
|
|
20
|
-
* @public
|
|
21
|
-
*/
|
|
22
|
-
@attr({
|
|
23
|
-
mode: 'boolean',
|
|
24
|
-
}) alternate = false;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* sets the side drawer's type to modal
|
|
28
|
-
*
|
|
29
|
-
* @public
|
|
30
|
-
*/
|
|
31
|
-
@attr({
|
|
32
|
-
mode: 'boolean',
|
|
33
|
-
}) modal = false;
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* indicates whether the side drawer is open
|
|
37
|
-
*
|
|
38
|
-
* @public
|
|
39
|
-
*/
|
|
40
|
-
@attr({
|
|
41
|
-
mode: 'boolean',
|
|
42
|
-
}) open = false;
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* sets the side of the side drawer
|
|
46
|
-
*
|
|
47
|
-
* @public
|
|
48
|
-
*/
|
|
49
|
-
@attr position?: 'start' | 'end';
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
*
|
|
53
|
-
* adds top bar to the side drawer
|
|
54
|
-
*
|
|
55
|
-
* @public
|
|
56
|
-
*/
|
|
57
|
-
hasTopBar: HTMLElement[] | undefined;
|
|
58
|
-
}
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { expect, test } from '@playwright/test';
|
|
2
|
-
import type { Page } from '@playwright/test';
|
|
3
|
-
import {
|
|
4
|
-
loadComponents,
|
|
5
|
-
loadTemplate
|
|
6
|
-
} from '../../visual-tests/visual-tests-utils.ts';
|
|
7
|
-
|
|
8
|
-
const components = ['side-drawer', 'text', 'button', 'sidenav-item'];
|
|
9
|
-
test('should show the component', async ({ page }: { page: Page }) => {
|
|
10
|
-
const template = `<style>
|
|
11
|
-
vwc-side-drawer#sideDrawer{
|
|
12
|
-
--side-drawer-background-color: var(--vvd-color-neutral-10);
|
|
13
|
-
--side-drawer-inline-size: 200px;
|
|
14
|
-
}
|
|
15
|
-
</style>
|
|
16
|
-
<vwc-side-drawer id="sideDrawer" open>
|
|
17
|
-
<div slot="top-bar">
|
|
18
|
-
<vwc-text font-face="subtitle-1">VIVID</vwc-text>
|
|
19
|
-
</div>
|
|
20
|
-
<div>
|
|
21
|
-
<vwc-sidenav-item href="#" text="1st level item" icon="home-line"></vwc-sidenav-item>
|
|
22
|
-
<p><vwc-text font-face="body-2-bold">SECTION TITLE</vwc-text></p>
|
|
23
|
-
<vwc-sidenav-item href="#" text="1st level item" icon="chat-line"></vwc-sidenav-item>
|
|
24
|
-
<vwc-sidenav-item href="#" text="1st level item" icon="chat-line"></vwc-sidenav-item>
|
|
25
|
-
</div>
|
|
26
|
-
<div slot="app-content">
|
|
27
|
-
<vwc-button id="button" shape="pill" icon='menu-solid'></vwc-button>
|
|
28
|
-
<vwc-text font-face="body-1">
|
|
29
|
-
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's
|
|
30
|
-
standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make
|
|
31
|
-
a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting,
|
|
32
|
-
remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing
|
|
33
|
-
Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions
|
|
34
|
-
of Lorem Ipsum.
|
|
35
|
-
</vwc-text>
|
|
36
|
-
</div>
|
|
37
|
-
</vwc-side-drawer>`;
|
|
38
|
-
|
|
39
|
-
await loadComponents({
|
|
40
|
-
page,
|
|
41
|
-
components,
|
|
42
|
-
});
|
|
43
|
-
await loadTemplate({
|
|
44
|
-
page,
|
|
45
|
-
template,
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
const testWrapper = await page.$('#wrapper');
|
|
49
|
-
|
|
50
|
-
await page.waitForLoadState('networkidle');
|
|
51
|
-
|
|
52
|
-
expect(await testWrapper?.screenshot())
|
|
53
|
-
.toMatchSnapshot(
|
|
54
|
-
'./snapshots/side-drawer.png',
|
|
55
|
-
);
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
test('should show the component 2', async ({ page }: { page: Page }) => {
|
|
59
|
-
const template = `<style>
|
|
60
|
-
vwc-side-drawer#sideDrawer{
|
|
61
|
-
--side-drawer-background-color: var(--vvd-color-neutral-10);
|
|
62
|
-
--side-drawer-inline-size: 200px;
|
|
63
|
-
}
|
|
64
|
-
</style>
|
|
65
|
-
<vwc-side-drawer id="sideDrawer" open position="end" alternate modal>
|
|
66
|
-
<div>
|
|
67
|
-
<vwc-sidenav-item href="#" text="1st level item" icon="home-line"></vwc-sidenav-item>
|
|
68
|
-
<p><vwc-text font-face="body-2-bold">SECTION TITLE</vwc-text></p>
|
|
69
|
-
<vwc-sidenav-item href="#" text="1st level item" icon="chat-line"></vwc-sidenav-item>
|
|
70
|
-
<vwc-sidenav-item href="#" text="1st level item" icon="chat-line"></vwc-sidenav-item>
|
|
71
|
-
</div>
|
|
72
|
-
<div slot="app-content">
|
|
73
|
-
<vwc-button id="button" shape="pill" icon='menu-solid'></vwc-button>
|
|
74
|
-
<vwc-text font-face="body-1">
|
|
75
|
-
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's
|
|
76
|
-
standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make
|
|
77
|
-
a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting,
|
|
78
|
-
remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing
|
|
79
|
-
Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions
|
|
80
|
-
of Lorem Ipsum.
|
|
81
|
-
</vwc-text>
|
|
82
|
-
</div>
|
|
83
|
-
</vwc-side-drawer>`;
|
|
84
|
-
|
|
85
|
-
await loadComponents({
|
|
86
|
-
page,
|
|
87
|
-
components,
|
|
88
|
-
});
|
|
89
|
-
await loadTemplate({
|
|
90
|
-
page,
|
|
91
|
-
template,
|
|
92
|
-
});
|
|
93
|
-
|
|
94
|
-
const testWrapper = await page.$('#wrapper');
|
|
95
|
-
|
|
96
|
-
await page.waitForLoadState('networkidle');
|
|
97
|
-
|
|
98
|
-
expect(await testWrapper?.screenshot())
|
|
99
|
-
.toMatchSnapshot(
|
|
100
|
-
'./snapshots/side-drawer-modal.png',
|
|
101
|
-
);
|
|
102
|
-
});
|
package/src/lib/side-drawer/ui.test.ts-snapshots/snapshots-side-drawer-Chrome-Stable-darwin.png
DELETED
|
Binary file
|
package/src/lib/side-drawer/ui.test.ts-snapshots/snapshots-side-drawer-Chrome-Stable-linux.png
DELETED
|
Binary file
|
package/src/lib/side-drawer/ui.test.ts-snapshots/snapshots-side-drawer-Desktop-Firefox-darwin.png
DELETED
|
Binary file
|
package/src/lib/side-drawer/ui.test.ts-snapshots/snapshots-side-drawer-Desktop-Firefox-linux.png
DELETED
|
Binary file
|
package/src/lib/side-drawer/ui.test.ts-snapshots/snapshots-side-drawer-Desktop-Safari-darwin.png
DELETED
|
Binary file
|
package/src/lib/side-drawer/ui.test.ts-snapshots/snapshots-side-drawer-Desktop-Safari-linux.png
DELETED
|
Binary file
|
|
Binary file
|
package/src/lib/side-drawer/ui.test.ts-snapshots/snapshots-side-drawer-modal-Chrome-Stable-linux.png
DELETED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
# sidenav-item
|
|
2
|
-
|
|
3
|
-
This element's attributes include the [anchor element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a) attributes.
|
|
4
|
-
|
|
5
|
-
```js
|
|
6
|
-
<script type="module">import '@vonage/vivid/sidenav-item';</script>
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
## Text
|
|
10
|
-
|
|
11
|
-
- Type: `String`
|
|
12
|
-
- Default: `''`
|
|
13
|
-
|
|
14
|
-
Add a `text` attribute to add text to the sidenav item.
|
|
15
|
-
|
|
16
|
-
```html preview
|
|
17
|
-
<vwc-sidenav-item href="#" text="Profile"></vwc-sidenav-item>
|
|
18
|
-
<vwc-sidenav-item href="#" text="GitHub"></vwc-sidenav-item>
|
|
19
|
-
<vwc-sidenav-item href="#" text="lorem ipsum"></vwc-sidenav-item>
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## Icon
|
|
23
|
-
|
|
24
|
-
Sidenav item text can be prefixed by a decorative icon.
|
|
25
|
-
Use the `icon` attribute to add an icon.
|
|
26
|
-
|
|
27
|
-
```html preview
|
|
28
|
-
<vwc-sidenav-item href="#" text="Profile" icon="profile"></vwc-sidenav-item>
|
|
29
|
-
<vwc-sidenav-item href="#" text="GitHub" icon="github-mono"></vwc-sidenav-item>
|
|
30
|
-
<vwc-sidenav-item href="#" text="lorem ipsum" icon="delete-line"></vwc-sidenav-item>
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
## Icon Only
|
|
34
|
-
|
|
35
|
-
If text is not applied...
|
|
36
|
-
|
|
37
|
-
```html preview
|
|
38
|
-
<vwc-sidenav-item href="#" icon="profile"></vwc-sidenav-item>
|
|
39
|
-
<vwc-sidenav-item href="#" icon="github-mono"></vwc-sidenav-item>
|
|
40
|
-
<vwc-sidenav-item href="#" icon="delete-line"></vwc-sidenav-item>
|
|
41
|
-
```
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import '../icon';
|
|
2
|
-
|
|
3
|
-
import type { FoundationElementDefinition } from '@microsoft/fast-foundation';
|
|
4
|
-
import { designSystem } from '../../shared/design-system';
|
|
5
|
-
import styles from './sidenav-item.scss';
|
|
6
|
-
|
|
7
|
-
import { SidenavItem } from './sidenav-item';
|
|
8
|
-
import { SidenavItemTemplate as template } from './sidenav-item.template';
|
|
9
|
-
|
|
10
|
-
export const vividSidenavItem =
|
|
11
|
-
SidenavItem.compose<FoundationElementDefinition>({
|
|
12
|
-
baseName: 'sidenav-item',
|
|
13
|
-
template: template as any,
|
|
14
|
-
styles,
|
|
15
|
-
shadowOptions: {
|
|
16
|
-
delegatesFocus: true,
|
|
17
|
-
},
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
designSystem.register(vividSidenavItem());
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
@use '../../../../shared/src/lib/sass/mixins/typography' as typography;
|
|
2
|
-
@use '../../../../../node_modules/@vonage/vivid-tokens/dist/sass/themes/consts' as theme-consts;
|
|
3
|
-
|
|
4
|
-
.control {
|
|
5
|
-
$min-block-size: 40px;
|
|
6
|
-
$gap: 8px;
|
|
7
|
-
@include typography.typography-cat-shorthand('body-2');
|
|
8
|
-
|
|
9
|
-
position: relative;
|
|
10
|
-
display: inline-flex;
|
|
11
|
-
box-sizing: border-box;
|
|
12
|
-
align-items: center;
|
|
13
|
-
background-color: transparent;
|
|
14
|
-
border-radius: 6px;
|
|
15
|
-
color: var(#{theme-consts.$vvd-color-on-canvas});
|
|
16
|
-
gap: $gap;
|
|
17
|
-
hyphens: auto;
|
|
18
|
-
inline-size: 100%;
|
|
19
|
-
min-block-size: $min-block-size;
|
|
20
|
-
outline: 0 none;
|
|
21
|
-
padding-block: 10px;
|
|
22
|
-
padding-inline: $gap;
|
|
23
|
-
text-decoration: none;
|
|
24
|
-
vertical-align: middle;
|
|
25
|
-
word-break: break-word;
|
|
26
|
-
|
|
27
|
-
@at-root :host,
|
|
28
|
-
& {
|
|
29
|
-
outline: 0 none;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
&.icon-only {
|
|
33
|
-
display: flex;
|
|
34
|
-
block-size: $min-block-size;
|
|
35
|
-
inline-size: $min-block-size;
|
|
36
|
-
place-content: center;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.control:focus {
|
|
42
|
-
background-color: var(#{theme-consts.$vvd-color-neutral-20});
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.control:focus-visible {
|
|
46
|
-
box-shadow: inset 0 0 0 1px darkorange;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.icon {
|
|
50
|
-
font-size: 20px;
|
|
51
|
-
}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { elementUpdated, fixture } from '@vivid-nx/shared';
|
|
2
|
-
import { Icon } from '../icon/icon';
|
|
3
|
-
import { SidenavItem } from './sidenav-item';
|
|
4
|
-
import '.';
|
|
5
|
-
|
|
6
|
-
const COMPONENT_TAG = 'vwc-sidenav-item';
|
|
7
|
-
const ICON_SELECTOR = 'vwc-icon';
|
|
8
|
-
|
|
9
|
-
describe('vwc-sidenav-item', () => {
|
|
10
|
-
let element: SidenavItem;
|
|
11
|
-
|
|
12
|
-
beforeEach(async () => {
|
|
13
|
-
element = (await fixture(
|
|
14
|
-
`<${COMPONENT_TAG}></${COMPONENT_TAG}>`
|
|
15
|
-
)) as SidenavItem;
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
describe('basic', () => {
|
|
19
|
-
it('should be initialized as a vwc-sidenav-item', async () => {
|
|
20
|
-
expect(element).toBeInstanceOf(SidenavItem);
|
|
21
|
-
expect(element.text).toEqual('');
|
|
22
|
-
expect(element.icon).toBeUndefined();
|
|
23
|
-
});
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
describe('icon', () => {
|
|
27
|
-
it('should add an icon to the sidenav item', async () => {
|
|
28
|
-
element.icon = 'home';
|
|
29
|
-
await elementUpdated(element);
|
|
30
|
-
|
|
31
|
-
const icon = element.shadowRoot?.querySelector(ICON_SELECTOR) as Icon;
|
|
32
|
-
expect(icon)
|
|
33
|
-
.toBeInstanceOf(Icon);
|
|
34
|
-
expect(icon?.type)
|
|
35
|
-
.toEqual('home');
|
|
36
|
-
});
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
describe('icon-only', () => {
|
|
40
|
-
it('should set correct internal icon-only style', async () => {
|
|
41
|
-
const getControlIconOnly = () => element.shadowRoot?.querySelector('.control.icon-only');
|
|
42
|
-
const controlIconOnlyBefore = getControlIconOnly();
|
|
43
|
-
|
|
44
|
-
element.icon = 'home';
|
|
45
|
-
await elementUpdated(element);
|
|
46
|
-
|
|
47
|
-
const controlIconOnlyAfter = getControlIconOnly();
|
|
48
|
-
expect(controlIconOnlyBefore).toBeNull();
|
|
49
|
-
expect(controlIconOnlyAfter).toBeInstanceOf(Element);
|
|
50
|
-
});
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
describe('text', () => {
|
|
54
|
-
it('should set text property value as text content', async () => {
|
|
55
|
-
const text = 'lorem';
|
|
56
|
-
element.text = text;
|
|
57
|
-
await elementUpdated(element);
|
|
58
|
-
|
|
59
|
-
const control = element.shadowRoot?.querySelector('.control');
|
|
60
|
-
expect(control?.textContent?.trim())
|
|
61
|
-
.toEqual(text);
|
|
62
|
-
});
|
|
63
|
-
});
|
|
64
|
-
});
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { html } from '@microsoft/fast-element';
|
|
2
|
-
import type { ViewTemplate } from '@microsoft/fast-element';
|
|
3
|
-
import type {
|
|
4
|
-
ElementDefinitionContext,
|
|
5
|
-
FoundationElementDefinition,
|
|
6
|
-
} from '@microsoft/fast-foundation';
|
|
7
|
-
import { textAnchorTemplate } from '../text-anchor/text-anchor.template';
|
|
8
|
-
import type { SidenavItem } from './sidenav-item';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* The template for the {@link @microsoft/fast-foundation#SidenavItem} component.
|
|
12
|
-
*
|
|
13
|
-
* @param context
|
|
14
|
-
* @param definition
|
|
15
|
-
* @public
|
|
16
|
-
*/
|
|
17
|
-
export const SidenavItemTemplate: (
|
|
18
|
-
context: ElementDefinitionContext,
|
|
19
|
-
definition: FoundationElementDefinition
|
|
20
|
-
) => ViewTemplate<SidenavItem> = (
|
|
21
|
-
context: ElementDefinitionContext,
|
|
22
|
-
definition: FoundationElementDefinition
|
|
23
|
-
) => html<SidenavItem>`
|
|
24
|
-
${textAnchorTemplate(context, definition)}
|
|
25
|
-
`;
|