@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,139 +0,0 @@
|
|
|
1
|
-
import {elementUpdated, fixture} from '@vivid-nx/shared';
|
|
2
|
-
import {Connotation} from '../enums';
|
|
3
|
-
import {ProgressRing} from './progress-ring';
|
|
4
|
-
import '.';
|
|
5
|
-
|
|
6
|
-
const COMPONENT_TAG = 'vwc-progress-ring';
|
|
7
|
-
|
|
8
|
-
describe('vwc-progress-ring', () => {
|
|
9
|
-
let element: ProgressRing;
|
|
10
|
-
|
|
11
|
-
beforeEach(async () => {
|
|
12
|
-
element = (await fixture(
|
|
13
|
-
`<${COMPONENT_TAG}></${COMPONENT_TAG}>`
|
|
14
|
-
)) as ProgressRing;
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
describe('basic', () => {
|
|
18
|
-
it('should be initialized as a vwc-progress-ring', async () => {
|
|
19
|
-
expect(element).toBeInstanceOf(ProgressRing);
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
it('should reflect min and max', async function () {
|
|
23
|
-
element.min = 10;
|
|
24
|
-
element.max = 90;
|
|
25
|
-
await elementUpdated(element);
|
|
26
|
-
expect(element.getAttribute('min'))
|
|
27
|
-
.toEqual(element.min.toString());
|
|
28
|
-
expect(element.getAttribute('max'))
|
|
29
|
-
.toEqual(element.max.toString());
|
|
30
|
-
});
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
describe('value', function () {
|
|
34
|
-
it('should reflect to host', async function () {
|
|
35
|
-
element.value = 50;
|
|
36
|
-
await elementUpdated(element);
|
|
37
|
-
expect(element.getAttribute('value'))
|
|
38
|
-
.toEqual('50');
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
it('should set percentComplete to percentage of the range', async function () {
|
|
42
|
-
element.min = 0;
|
|
43
|
-
element.max = 100;
|
|
44
|
-
element.value = 25;
|
|
45
|
-
await elementUpdated(element);
|
|
46
|
-
const percentWithBigRange = element.percentComplete;
|
|
47
|
-
|
|
48
|
-
element.min = 0;
|
|
49
|
-
element.max = 50;
|
|
50
|
-
element.value = 25;
|
|
51
|
-
await elementUpdated(element);
|
|
52
|
-
const percentWithSmallRange = element.percentComplete;
|
|
53
|
-
|
|
54
|
-
expect(percentWithBigRange)
|
|
55
|
-
.toEqual(25);
|
|
56
|
-
expect(percentWithSmallRange)
|
|
57
|
-
.toEqual(50);
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
it('should set the determinate div width to percentComplete', async function () {
|
|
61
|
-
element.min = 0;
|
|
62
|
-
element.max = 100;
|
|
63
|
-
element.value = 25;
|
|
64
|
-
const expectedValue = element.value * 44 / 100;
|
|
65
|
-
await elementUpdated(element);
|
|
66
|
-
const determinateDiv = element.shadowRoot?.querySelector('.determinate') as HTMLElement;
|
|
67
|
-
expect(determinateDiv?.style.strokeDasharray)
|
|
68
|
-
.toEqual(`${expectedValue}px 44px`);
|
|
69
|
-
});
|
|
70
|
-
});
|
|
71
|
-
|
|
72
|
-
describe('paused', function () {
|
|
73
|
-
it('should reflect to host', async function () {
|
|
74
|
-
const pausedAttributeExistsOnInit = element.hasAttribute('paused');
|
|
75
|
-
element.paused = true;
|
|
76
|
-
await elementUpdated(element);
|
|
77
|
-
const pausedAttributeExistsWhenTrue = element.hasAttribute('paused');
|
|
78
|
-
element.paused = false;
|
|
79
|
-
await elementUpdated(element);
|
|
80
|
-
const pausedAttributeExistsWhenFalse = element.hasAttribute('paused');
|
|
81
|
-
expect(pausedAttributeExistsOnInit)
|
|
82
|
-
.toEqual(false);
|
|
83
|
-
expect(pausedAttributeExistsWhenTrue)
|
|
84
|
-
.toEqual(true);
|
|
85
|
-
expect(pausedAttributeExistsWhenFalse)
|
|
86
|
-
.toEqual(false);
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
it('should set class paused on base element', async function () {
|
|
90
|
-
const baseDiv = element.shadowRoot?.querySelector('.base');
|
|
91
|
-
const pausedClassExistsBeforeChange = baseDiv?.classList.contains('paused');
|
|
92
|
-
element.paused = true;
|
|
93
|
-
await elementUpdated(element);
|
|
94
|
-
const pausedClassExistsAfterChange = baseDiv?.classList.contains('paused');
|
|
95
|
-
|
|
96
|
-
expect(pausedClassExistsBeforeChange)
|
|
97
|
-
.toEqual(false);
|
|
98
|
-
expect(pausedClassExistsAfterChange)
|
|
99
|
-
.toEqual(true);
|
|
100
|
-
});
|
|
101
|
-
});
|
|
102
|
-
|
|
103
|
-
describe('connotation', function () {
|
|
104
|
-
it('should be undefined by default', async function () {
|
|
105
|
-
expect(element.connotation)
|
|
106
|
-
.toEqual(undefined);
|
|
107
|
-
});
|
|
108
|
-
|
|
109
|
-
it('should reflect its value to host', async function () {
|
|
110
|
-
|
|
111
|
-
element.setAttribute('connotation', 'alert');
|
|
112
|
-
await elementUpdated(element);
|
|
113
|
-
const connotationPropertyAfterAttributeChange = element.connotation;
|
|
114
|
-
|
|
115
|
-
element.connotation = Connotation.Success;
|
|
116
|
-
await elementUpdated(element);
|
|
117
|
-
const connotationAttributeAfterPropertyChange = element.getAttribute('connotation');
|
|
118
|
-
|
|
119
|
-
expect(connotationPropertyAfterAttributeChange)
|
|
120
|
-
.toEqual(Connotation.Alert);
|
|
121
|
-
expect(connotationAttributeAfterPropertyChange)
|
|
122
|
-
.toEqual(Connotation.Success);
|
|
123
|
-
});
|
|
124
|
-
|
|
125
|
-
it('should set connotation on the base div', async function () {
|
|
126
|
-
const connotation = Connotation.CTA;
|
|
127
|
-
const baseDiv = element.shadowRoot?.querySelector('.base');
|
|
128
|
-
const connotationClassExistsBeforeChange = baseDiv?.classList.contains(`connotation-${connotation}`);
|
|
129
|
-
element.connotation = connotation;
|
|
130
|
-
await elementUpdated(element);
|
|
131
|
-
const connotationClassExistsAfterChange = baseDiv?.classList.contains(`connotation-${connotation}`);
|
|
132
|
-
|
|
133
|
-
expect(connotationClassExistsBeforeChange)
|
|
134
|
-
.toEqual(false);
|
|
135
|
-
expect(connotationClassExistsAfterChange)
|
|
136
|
-
.toEqual(true);
|
|
137
|
-
});
|
|
138
|
-
});
|
|
139
|
-
});
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import {html, when} 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 { classNames } from '@microsoft/fast-web-utilities';
|
|
8
|
-
import type { ProgressRing } from './progress-ring';
|
|
9
|
-
|
|
10
|
-
const getClasses = (_: ProgressRing) => classNames(
|
|
11
|
-
'base',
|
|
12
|
-
[`connotation-${_.connotation}`, !!_.connotation],
|
|
13
|
-
);
|
|
14
|
-
const progressSegments: number = 44;
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* The template for the {@link @microsoft/fast-foundation#ProgressRing} component.
|
|
18
|
-
*
|
|
19
|
-
* @param context
|
|
20
|
-
* @param _
|
|
21
|
-
* @param definition
|
|
22
|
-
* @public
|
|
23
|
-
*/
|
|
24
|
-
export const ProgressRingTemplate: (
|
|
25
|
-
context: ElementDefinitionContext,
|
|
26
|
-
definition: FoundationElementDefinition
|
|
27
|
-
) => ViewTemplate<ProgressRing> = (
|
|
28
|
-
_: ElementDefinitionContext
|
|
29
|
-
) => html`
|
|
30
|
-
<div
|
|
31
|
-
role="progressbar"
|
|
32
|
-
aria-valuenow="${x => x.value}"
|
|
33
|
-
aria-valuemin="${x => x.min}"
|
|
34
|
-
aria-valuemax="${x => x.max}"
|
|
35
|
-
class="${x => (x.paused ? 'paused' : '')} ${getClasses}"
|
|
36
|
-
>
|
|
37
|
-
${when(
|
|
38
|
-
x => typeof x.value === 'number',
|
|
39
|
-
html<ProgressRing>`
|
|
40
|
-
<svg
|
|
41
|
-
class="progress"
|
|
42
|
-
viewBox="0 0 16 16"
|
|
43
|
-
>
|
|
44
|
-
<circle
|
|
45
|
-
class="background"
|
|
46
|
-
cx="8px"
|
|
47
|
-
cy="8px"
|
|
48
|
-
r="7px"
|
|
49
|
-
></circle>
|
|
50
|
-
<circle
|
|
51
|
-
class="determinate"
|
|
52
|
-
style="stroke-dasharray: ${x =>
|
|
53
|
-
(progressSegments * x.percentComplete) /
|
|
54
|
-
100}px ${progressSegments}px"
|
|
55
|
-
cx="8px"
|
|
56
|
-
cy="8px"
|
|
57
|
-
r="7px"
|
|
58
|
-
></circle>
|
|
59
|
-
</svg>
|
|
60
|
-
`
|
|
61
|
-
)}
|
|
62
|
-
${when(
|
|
63
|
-
x => typeof x.value !== 'number', html<ProgressRing>`
|
|
64
|
-
<svg class="progress" viewBox="0 0 16 16">
|
|
65
|
-
<circle
|
|
66
|
-
class="background"
|
|
67
|
-
cx="8px"
|
|
68
|
-
cy="8px"
|
|
69
|
-
r="7px"
|
|
70
|
-
></circle>
|
|
71
|
-
<circle
|
|
72
|
-
class="indeterminate-indicator-1"
|
|
73
|
-
cx="8px"
|
|
74
|
-
cy="8px"
|
|
75
|
-
r="7px"
|
|
76
|
-
></circle>
|
|
77
|
-
</svg>
|
|
78
|
-
`
|
|
79
|
-
)}
|
|
80
|
-
</div>
|
|
81
|
-
`;
|
|
82
|
-
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import {BaseProgress} from '@microsoft/fast-foundation';
|
|
2
|
-
import {attr} from '@microsoft/fast-element';
|
|
3
|
-
import type {Connotation} from '../enums';
|
|
4
|
-
|
|
5
|
-
export type ProgressRingConnotation =
|
|
6
|
-
Connotation.Primary |
|
|
7
|
-
Connotation.Success |
|
|
8
|
-
Connotation.Alert |
|
|
9
|
-
Connotation.CTA;
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Base class for progress-ring
|
|
13
|
-
*
|
|
14
|
-
* @public
|
|
15
|
-
*/
|
|
16
|
-
export class ProgressRing extends BaseProgress {
|
|
17
|
-
@attr() connotation?: ProgressRingConnotation;
|
|
18
|
-
}
|
|
@@ -1,35 +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 = ['progress-ring'];
|
|
9
|
-
|
|
10
|
-
test('should show the component', async ({ page }: { page: Page }) => {
|
|
11
|
-
const template = `
|
|
12
|
-
<vwc-progress-ring min="0" max="100" value="50" connotation="primary"></vwc-progress-ring>
|
|
13
|
-
<vwc-progress-ring min="0" max="100" value="50" connotation="cta"></vwc-progress-ring>
|
|
14
|
-
<vwc-progress-ring min="0" max="100" value="33" connotation="alert"></vwc-progress-ring>
|
|
15
|
-
<vwc-progress-ring min="0" max="100" value="66" connotation="success"></vwc-progress-ring>
|
|
16
|
-
<vwc-progress-ring min="0" max="100" value="77" paused></vwc-progress-ring>
|
|
17
|
-
`;
|
|
18
|
-
|
|
19
|
-
await loadComponents({
|
|
20
|
-
page,
|
|
21
|
-
components,
|
|
22
|
-
});
|
|
23
|
-
await loadTemplate({
|
|
24
|
-
page,
|
|
25
|
-
template,
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
const testWrapper = await page.$('#wrapper');
|
|
29
|
-
|
|
30
|
-
await page.waitForLoadState('networkidle');
|
|
31
|
-
|
|
32
|
-
expect(await testWrapper?.screenshot()).toMatchSnapshot(
|
|
33
|
-
'./snapshots/progress-ring.png'
|
|
34
|
-
);
|
|
35
|
-
});
|
package/src/lib/progress-ring/ui.test.ts-snapshots/snapshots-progress-ring-Chrome-Stable-darwin.png
DELETED
|
Binary file
|
package/src/lib/progress-ring/ui.test.ts-snapshots/snapshots-progress-ring-Chrome-Stable-linux.png
DELETED
|
Binary file
|
|
Binary file
|
package/src/lib/progress-ring/ui.test.ts-snapshots/snapshots-progress-ring-Desktop-Firefox-linux.png
DELETED
|
Binary file
|
package/src/lib/progress-ring/ui.test.ts-snapshots/snapshots-progress-ring-Desktop-Safari-darwin.png
DELETED
|
Binary file
|
package/src/lib/progress-ring/ui.test.ts-snapshots/snapshots-progress-ring-Desktop-Safari-linux.png
DELETED
|
Binary file
|
|
@@ -1,304 +0,0 @@
|
|
|
1
|
-
# side-drawer
|
|
2
|
-
|
|
3
|
-
```js
|
|
4
|
-
<script type='module'>
|
|
5
|
-
import '@vonage/vivid/side-drawer';
|
|
6
|
-
</script>
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
## Open
|
|
10
|
-
Use the `open` attribute to indicate whether the side drawer is open.
|
|
11
|
-
You can also close the side drawer by pressing the `ESC` key.
|
|
12
|
-
|
|
13
|
-
- Type: `Boolean`
|
|
14
|
-
- Default: `false`
|
|
15
|
-
|
|
16
|
-
```html preview
|
|
17
|
-
<style>
|
|
18
|
-
vwc-side-drawer#sideDrawer{
|
|
19
|
-
--side-drawer-background-color: var(--vvd-color-neutral-10);
|
|
20
|
-
--side-drawer-inline-size: 200px;
|
|
21
|
-
}
|
|
22
|
-
</style>
|
|
23
|
-
<vwc-side-drawer id="sideDrawer" open>
|
|
24
|
-
<div>
|
|
25
|
-
<vwc-sidenav-item href="#" text="1st level item" icon="home-line"></vwc-sidenav-item>
|
|
26
|
-
<p><vwc-text font-face="body-2-bold">SECTION TITLE</vwc-text></p>
|
|
27
|
-
<vwc-sidenav-item href="#" text="1st level item" icon="chat-line"></vwc-sidenav-item>
|
|
28
|
-
<vwc-sidenav-item href="#" text="1st level item" icon="chat-line"></vwc-sidenav-item>
|
|
29
|
-
</div>
|
|
30
|
-
<div slot="app-content">
|
|
31
|
-
<vwc-button id="button" shape="pill" icon='menu-solid'></vwc-button>
|
|
32
|
-
<vwc-text font-face="body-1">
|
|
33
|
-
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's
|
|
34
|
-
standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make
|
|
35
|
-
a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting,
|
|
36
|
-
remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing
|
|
37
|
-
Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions
|
|
38
|
-
of Lorem Ipsum.
|
|
39
|
-
</vwc-text>
|
|
40
|
-
</div>
|
|
41
|
-
</vwc-side-drawer>
|
|
42
|
-
<script>
|
|
43
|
-
button.addEventListener('click', toggleOpen);
|
|
44
|
-
function toggleOpen() {
|
|
45
|
-
sideDrawer.open = !sideDrawer.open;
|
|
46
|
-
}
|
|
47
|
-
</script>
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
## Modal
|
|
51
|
-
|
|
52
|
-
Use the `modal` attribute to set the side drawer's type to modal.
|
|
53
|
-
Click on the `scrim` or the `ESC` key to close the modal side-drawer.
|
|
54
|
-
|
|
55
|
-
- Type: `Boolean`
|
|
56
|
-
- Default: `false`
|
|
57
|
-
|
|
58
|
-
```html preview
|
|
59
|
-
<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 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
|
-
<script>
|
|
85
|
-
button.addEventListener('click', toggleOpen);
|
|
86
|
-
function toggleOpen() {
|
|
87
|
-
sideDrawer.open = !sideDrawer.open;
|
|
88
|
-
}
|
|
89
|
-
</script>
|
|
90
|
-
```
|
|
91
|
-
## Alternate
|
|
92
|
-
|
|
93
|
-
Use the `alternate` attribute to apply scheme alternate region.
|
|
94
|
-
|
|
95
|
-
- Type: `Boolean`
|
|
96
|
-
- Default: `false`
|
|
97
|
-
|
|
98
|
-
```html preview
|
|
99
|
-
<style>
|
|
100
|
-
vwc-side-drawer#sideDrawer{
|
|
101
|
-
--side-drawer-background-color: var(--vvd-color-neutral-10);
|
|
102
|
-
--side-drawer-inline-size: 200px;
|
|
103
|
-
}
|
|
104
|
-
</style>
|
|
105
|
-
<vwc-side-drawer id="sideDrawer" open alternate>
|
|
106
|
-
<div>
|
|
107
|
-
<vwc-sidenav-item href="#" text="1st level item" icon="home-line"></vwc-sidenav-item>
|
|
108
|
-
<p><vwc-text font-face="body-2-bold">SECTION TITLE</vwc-text></p>
|
|
109
|
-
<vwc-sidenav-item href="#" text="1st level item" icon="chat-line"></vwc-sidenav-item>
|
|
110
|
-
<vwc-sidenav-item href="#" text="1st level item" icon="chat-line"></vwc-sidenav-item>
|
|
111
|
-
</div>
|
|
112
|
-
<div slot="app-content">
|
|
113
|
-
<vwc-button id="button" shape="pill" icon='menu-solid'></vwc-button>
|
|
114
|
-
<vwc-text font-face="body-1">
|
|
115
|
-
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's
|
|
116
|
-
standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make
|
|
117
|
-
a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting,
|
|
118
|
-
remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing
|
|
119
|
-
Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions
|
|
120
|
-
of Lorem Ipsum.
|
|
121
|
-
</vwc-text>
|
|
122
|
-
</div>
|
|
123
|
-
</vwc-side-drawer>
|
|
124
|
-
<script>
|
|
125
|
-
button.addEventListener('click', toggleOpen);
|
|
126
|
-
function toggleOpen() {
|
|
127
|
-
sideDrawer.open = !sideDrawer.open;
|
|
128
|
-
}
|
|
129
|
-
</script>
|
|
130
|
-
```
|
|
131
|
-
## Position
|
|
132
|
-
|
|
133
|
-
Use the `position` attribute to set the side of the side drawer.
|
|
134
|
-
|
|
135
|
-
- Type: `"start" | "end"`
|
|
136
|
-
- Default: `"start"`
|
|
137
|
-
|
|
138
|
-
```html preview
|
|
139
|
-
<style>
|
|
140
|
-
vwc-side-drawer#sideDrawer{
|
|
141
|
-
--side-drawer-background-color: var(--vvd-color-neutral-10);
|
|
142
|
-
--side-drawer-inline-size: 200px;
|
|
143
|
-
}
|
|
144
|
-
vwc-button#button{
|
|
145
|
-
margin-left: calc(100% - 40px);
|
|
146
|
-
}
|
|
147
|
-
</style>
|
|
148
|
-
<vwc-side-drawer id="sideDrawer" open position="end">
|
|
149
|
-
<div>
|
|
150
|
-
<vwc-sidenav-item href="#" text="1st level item" icon="home-line"></vwc-sidenav-item>
|
|
151
|
-
<p><vwc-text font-face="body-2-bold">SECTION TITLE</vwc-text></p>
|
|
152
|
-
<vwc-sidenav-item href="#" text="1st level item" icon="chat-line"></vwc-sidenav-item>
|
|
153
|
-
<vwc-sidenav-item href="#" text="1st level item" icon="chat-line"></vwc-sidenav-item>
|
|
154
|
-
</div>
|
|
155
|
-
<div slot="app-content">
|
|
156
|
-
<vwc-button id="button" shape="pill" icon='menu-solid'></vwc-button>
|
|
157
|
-
<vwc-text font-face="body-1">
|
|
158
|
-
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's
|
|
159
|
-
standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make
|
|
160
|
-
a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting,
|
|
161
|
-
remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing
|
|
162
|
-
Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions
|
|
163
|
-
of Lorem Ipsum.
|
|
164
|
-
</vwc-text>
|
|
165
|
-
</div>
|
|
166
|
-
</vwc-side-drawer>
|
|
167
|
-
<script>
|
|
168
|
-
button.addEventListener('click', toggleOpen);
|
|
169
|
-
function toggleOpen() {
|
|
170
|
-
sideDrawer.open = !sideDrawer.open;
|
|
171
|
-
}
|
|
172
|
-
</script>
|
|
173
|
-
```
|
|
174
|
-
## Slots
|
|
175
|
-
|
|
176
|
-
### Top Bar
|
|
177
|
-
|
|
178
|
-
To add a top bar to the side drawer, add a slot called `top-bar`.
|
|
179
|
-
|
|
180
|
-
```js
|
|
181
|
-
<div slot="top-bar">
|
|
182
|
-
<vwc-text>VIVID</vwc-text>
|
|
183
|
-
</div>
|
|
184
|
-
```
|
|
185
|
-
```html preview
|
|
186
|
-
<style>
|
|
187
|
-
vwc-side-drawer#sideDrawer{
|
|
188
|
-
--side-drawer-background-color: var(--vvd-color-neutral-10);
|
|
189
|
-
--side-drawer-inline-size: 200px;
|
|
190
|
-
}
|
|
191
|
-
</style>
|
|
192
|
-
<vwc-side-drawer id="sideDrawer" open>
|
|
193
|
-
<div slot="top-bar">
|
|
194
|
-
<vwc-text font-face="subtitle-1">VIVID</vwc-text>
|
|
195
|
-
</div>
|
|
196
|
-
<div>
|
|
197
|
-
<vwc-sidenav-item href="#" text="1st level item" icon="home-line"></vwc-sidenav-item>
|
|
198
|
-
<p><vwc-text font-face="body-2-bold">SECTION TITLE</vwc-text></p>
|
|
199
|
-
<vwc-sidenav-item href="#" text="1st level item" icon="chat-line"></vwc-sidenav-item>
|
|
200
|
-
<vwc-sidenav-item href="#" text="1st level item" icon="chat-line"></vwc-sidenav-item>
|
|
201
|
-
</div>
|
|
202
|
-
<div slot="app-content">
|
|
203
|
-
<vwc-button id="button" shape="pill" icon='menu-solid'></vwc-button>
|
|
204
|
-
<vwc-text font-face="body-1">
|
|
205
|
-
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's
|
|
206
|
-
standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make
|
|
207
|
-
a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting,
|
|
208
|
-
remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing
|
|
209
|
-
Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions
|
|
210
|
-
of Lorem Ipsum.
|
|
211
|
-
</vwc-text>
|
|
212
|
-
</div>
|
|
213
|
-
</vwc-side-drawer>
|
|
214
|
-
<script>
|
|
215
|
-
button.addEventListener('click', toggleOpen);
|
|
216
|
-
function toggleOpen() {
|
|
217
|
-
sideDrawer.open = !sideDrawer.open;
|
|
218
|
-
}
|
|
219
|
-
</script>
|
|
220
|
-
```
|
|
221
|
-
|
|
222
|
-
### App-content
|
|
223
|
-
|
|
224
|
-
To add content aside the side-drawer, add a slot called `app-content`.
|
|
225
|
-
|
|
226
|
-
```js
|
|
227
|
-
<div slot="app-content">
|
|
228
|
-
<vwc-text font-face="body-1">
|
|
229
|
-
This is the app-content slot!!!!
|
|
230
|
-
</vwc-text>
|
|
231
|
-
</div>
|
|
232
|
-
```
|
|
233
|
-
```html preview
|
|
234
|
-
<style>
|
|
235
|
-
vwc-side-drawer#sideDrawer{
|
|
236
|
-
--side-drawer-background-color: var(--vvd-color-neutral-10);
|
|
237
|
-
--side-drawer-inline-size: 200px;
|
|
238
|
-
}
|
|
239
|
-
</style>
|
|
240
|
-
<vwc-side-drawer id="sideDrawer" open>
|
|
241
|
-
<div>
|
|
242
|
-
<vwc-sidenav-item href="#" text="1st level item" icon="home-line"></vwc-sidenav-item>
|
|
243
|
-
<p><vwc-text font-face="body-2-bold">SECTION TITLE</vwc-text></p>
|
|
244
|
-
<vwc-sidenav-item href="#" text="1st level item" icon="chat-line"></vwc-sidenav-item>
|
|
245
|
-
<vwc-sidenav-item href="#" text="1st level item" icon="chat-line"></vwc-sidenav-item>
|
|
246
|
-
</div>
|
|
247
|
-
<div slot="app-content">
|
|
248
|
-
<vwc-button id="button" shape="pill" icon='menu-solid'></vwc-button>
|
|
249
|
-
<vwc-text font-face="body-1">
|
|
250
|
-
This is the app-content slot!!!!
|
|
251
|
-
</vwc-text>
|
|
252
|
-
</div>
|
|
253
|
-
</vwc-side-drawer>
|
|
254
|
-
<script>
|
|
255
|
-
button.addEventListener('click', toggleOpen);
|
|
256
|
-
function toggleOpen() {
|
|
257
|
-
sideDrawer.open = !sideDrawer.open;
|
|
258
|
-
}
|
|
259
|
-
</script>
|
|
260
|
-
```
|
|
261
|
-
|
|
262
|
-
## CSS Custom Properties
|
|
263
|
-
|
|
264
|
-
### Background-color
|
|
265
|
-
- `--side-drawer-background-color`
|
|
266
|
-
- Type: `String`
|
|
267
|
-
- Default: Current theme's canvas (background) color
|
|
268
|
-
|
|
269
|
-
Controls the background of the side drawer.
|
|
270
|
-
|
|
271
|
-
### Color
|
|
272
|
-
- `--side-drawer-color`
|
|
273
|
-
- Type: `String`
|
|
274
|
-
- Default: Current theme's on-canvas (text) color
|
|
275
|
-
|
|
276
|
-
Controls the color of the side drawer.
|
|
277
|
-
|
|
278
|
-
### Inline-size
|
|
279
|
-
- `--side-drawer-inline-size`
|
|
280
|
-
- Type: `Number`
|
|
281
|
-
- Default: `280px`
|
|
282
|
-
|
|
283
|
-
Controls the inline size of the side drawer.
|
|
284
|
-
|
|
285
|
-
### Padding-body
|
|
286
|
-
- `--side-drawer-padding-body`
|
|
287
|
-
- Type: `Number`
|
|
288
|
-
- Default: `16px`
|
|
289
|
-
|
|
290
|
-
Controls the padding of the side drawer's body.
|
|
291
|
-
|
|
292
|
-
### Padding-top-bar
|
|
293
|
-
- `--side-drawer-padding-top-bar`
|
|
294
|
-
- Type: `Number`
|
|
295
|
-
- Default: `16px`
|
|
296
|
-
|
|
297
|
-
Controls the padding of the side drawer's top bar.
|
|
298
|
-
|
|
299
|
-
### Z-index
|
|
300
|
-
- `--side-drawer-z-index`
|
|
301
|
-
- Type: `Number`
|
|
302
|
-
- Default: `6`
|
|
303
|
-
|
|
304
|
-
Controls the z-index of the side drawer.
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { FoundationElementDefinition } from '@microsoft/fast-foundation';
|
|
2
|
-
import { designSystem } from '../../shared/design-system';
|
|
3
|
-
import { SideDrawer } from './side-drawer';
|
|
4
|
-
import styles from './side-drawer.scss';
|
|
5
|
-
import { sideDrawerTemplate as template } from './side-drawer.template';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Represents a side-drawer custom element.
|
|
9
|
-
*/
|
|
10
|
-
export const VIVIDSideDrawer = SideDrawer.compose<FoundationElementDefinition>({
|
|
11
|
-
baseName: 'side-drawer',
|
|
12
|
-
template: template as any,
|
|
13
|
-
styles,
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
designSystem.register(VIVIDSideDrawer());
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
$side-drawer-padding-top-bar: --side-drawer-padding-top-bar;
|
|
2
|
-
$side-drawer-padding-body: --side-drawer-padding-body;
|
|
3
|
-
$side-drawer-inline-size: --side-drawer-inline-size;
|
|
4
|
-
$side-drawer-z-index: --side-drawer-z-index;
|
|
5
|
-
$side-drawer-background-color: --side-drawer-background-color;
|
|
6
|
-
$side-drawer-color: --side-drawer-color;
|