@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,142 +0,0 @@
|
|
|
1
|
-
@use '../../../../shared/src/lib/sass/mixins/typography' as typography;
|
|
2
|
-
@use 'partials/variables' as variables;
|
|
3
|
-
@use '../focus/partials/variables' as focus-variables;
|
|
4
|
-
|
|
5
|
-
@use '../../../../shared/src/lib/sass/mixins/connotation/config' with (
|
|
6
|
-
$subset: primary cta success alert,
|
|
7
|
-
$shades: contrast fierce strong soft pale,
|
|
8
|
-
$default: primary,
|
|
9
|
-
);
|
|
10
|
-
@use '../../../../shared/src/lib/sass/mixins/connotation' as connotation;
|
|
11
|
-
|
|
12
|
-
@use '../../../../shared/src/lib/sass/mixins/appearance/config' as appearance-config with (
|
|
13
|
-
$appearances: filled outlined ghost,
|
|
14
|
-
$states: idle hover disabled active,
|
|
15
|
-
$default: ghost,
|
|
16
|
-
);
|
|
17
|
-
@use '../../../../shared/src/lib/sass/mixins/appearance' as appearance;
|
|
18
|
-
|
|
19
|
-
:host {
|
|
20
|
-
outline: 0 none;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.control {
|
|
24
|
-
@include connotation.connotation;
|
|
25
|
-
@include appearance.appearance;
|
|
26
|
-
|
|
27
|
-
position: relative;
|
|
28
|
-
display: inline-flex;
|
|
29
|
-
box-sizing: border-box;
|
|
30
|
-
align-items: center;
|
|
31
|
-
border: 0 none;
|
|
32
|
-
background-color: var(#{appearance.get-variable(fill)});
|
|
33
|
-
block-size: var(#{variables.$block-size});
|
|
34
|
-
box-shadow: inset 0 0 0 1px var(#{appearance.get-variable(outline)});
|
|
35
|
-
color: var(#{appearance.get-variable(text)});
|
|
36
|
-
cursor: pointer;
|
|
37
|
-
outline: 0 none;
|
|
38
|
-
vertical-align: middle;
|
|
39
|
-
|
|
40
|
-
&.icon-only {
|
|
41
|
-
padding-inline: 0;
|
|
42
|
-
place-content: center;
|
|
43
|
-
@supports (aspect-ratio: 1) {
|
|
44
|
-
aspect-ratio: 1;
|
|
45
|
-
}
|
|
46
|
-
@supports not (aspect-ratio: 1) {
|
|
47
|
-
inline-size: var(#{variables.$block-size});
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/* Size */
|
|
54
|
-
|
|
55
|
-
.control.size-base-small {
|
|
56
|
-
#{variables.$block-size}: 32px;
|
|
57
|
-
@include typography.typography-cat-shorthand('caption-bold');
|
|
58
|
-
|
|
59
|
-
&:not(.icon-only) {
|
|
60
|
-
#{variables.$icon-gap}: 8px;
|
|
61
|
-
|
|
62
|
-
padding-inline: 12px;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.icon {
|
|
66
|
-
font-size: 16px;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.control.size-base-large {
|
|
71
|
-
#{variables.$block-size}: 48px;
|
|
72
|
-
@include typography.typography-cat-shorthand('body-1-bold');
|
|
73
|
-
|
|
74
|
-
&:not(.icon-only) {
|
|
75
|
-
#{variables.$icon-gap}: 10px;
|
|
76
|
-
|
|
77
|
-
padding-inline: 20px;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.icon {
|
|
81
|
-
font-size: 24px;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.control:not(.size-base-small):not(.size-base-large) {
|
|
86
|
-
#{variables.$block-size}: 40px;
|
|
87
|
-
@include typography.typography-cat-shorthand('button');
|
|
88
|
-
|
|
89
|
-
&:not(.icon-only) {
|
|
90
|
-
#{variables.$icon-gap}: 8px;
|
|
91
|
-
|
|
92
|
-
padding-inline: 16px;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.icon {
|
|
96
|
-
font-size: 20px;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
/* Shape */
|
|
101
|
-
|
|
102
|
-
// stylelint-disable-next-line no-descending-specificity
|
|
103
|
-
.control:not(.shape-pill) {
|
|
104
|
-
border-radius: 6px;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.control.shape-pill {
|
|
108
|
-
&:not(.icon-only) {
|
|
109
|
-
border-radius: 24px;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
&.icon-only {
|
|
113
|
-
border-radius: 50%;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
/* Icon */
|
|
118
|
-
|
|
119
|
-
// stylelint-disable-next-line no-descending-specificity
|
|
120
|
-
.icon {
|
|
121
|
-
// stylelint-disable-next-line no-descending-specificity
|
|
122
|
-
:not(.icon-trailing) & {
|
|
123
|
-
margin-inline-end: var(#{variables.$icon-gap});
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
// stylelint-disable-next-line no-descending-specificity
|
|
127
|
-
.icon-trailing & {
|
|
128
|
-
order: 1;
|
|
129
|
-
margin-inline-start: var(#{variables.$icon-gap});
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
.focus-indicator {
|
|
134
|
-
:not(:focus) & {
|
|
135
|
-
display: none;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
.appearance-outlined &,
|
|
139
|
-
.appearance-ghost & {
|
|
140
|
-
#{focus-variables.$focus-stroke-gap-color}: transparent;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
import { elementUpdated, fixture } from '@vivid-nx/shared';
|
|
2
|
-
import type { Icon } from '../icon/icon';
|
|
3
|
-
import { Button } from './button';
|
|
4
|
-
import '.';
|
|
5
|
-
|
|
6
|
-
const COMPONENT_TAG = 'vwc-button';
|
|
7
|
-
const ICON_SELECTOR = 'vwc-icon';
|
|
8
|
-
|
|
9
|
-
describe('vwc-button', () => {
|
|
10
|
-
let element: Button;
|
|
11
|
-
|
|
12
|
-
beforeEach(async () => {
|
|
13
|
-
element = await fixture(`<${COMPONENT_TAG}></${COMPONENT_TAG}>`) as Button;
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
describe('basic', () => {
|
|
17
|
-
it('initializes as a vwc-button', async () => {
|
|
18
|
-
expect(element).toBeInstanceOf(Button);
|
|
19
|
-
expect(element.label).toEqual('');
|
|
20
|
-
expect(element.icon).toBeUndefined();
|
|
21
|
-
expect(element.iconTrailing).toBeFalsy();
|
|
22
|
-
expect(element.connotation).toBeUndefined();
|
|
23
|
-
expect(element.shape).toBeUndefined();
|
|
24
|
-
expect(element.appearance).toBeUndefined();
|
|
25
|
-
expect(element.size).toBeUndefined();
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
describe('icon', () => {
|
|
30
|
-
it('adds an icon to the button', async () => {
|
|
31
|
-
element.icon = 'home';
|
|
32
|
-
await elementUpdated(element);
|
|
33
|
-
|
|
34
|
-
const icon = element.shadowRoot?.querySelector(ICON_SELECTOR) as Icon;
|
|
35
|
-
expect(icon).toBeInstanceOf(HTMLElement);
|
|
36
|
-
expect(icon.type).toEqual('home');
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
it('setting `iconTrailing` set the order of element', async () => {
|
|
40
|
-
element.icon = 'home';
|
|
41
|
-
element.iconTrailing = true;
|
|
42
|
-
await elementUpdated(element);
|
|
43
|
-
|
|
44
|
-
const trailingIcon = element.shadowRoot?.querySelector(
|
|
45
|
-
`.icon-trailing ${ICON_SELECTOR}`,
|
|
46
|
-
);
|
|
47
|
-
expect(trailingIcon).toBeInstanceOf(HTMLElement);
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
describe('label', () => {
|
|
52
|
-
it('set label property to node', async () => {
|
|
53
|
-
const label = 'lorem';
|
|
54
|
-
element.label = label;
|
|
55
|
-
await elementUpdated(element);
|
|
56
|
-
|
|
57
|
-
const control = element.shadowRoot?.querySelector('.control');
|
|
58
|
-
expect(control?.textContent?.trim()).toEqual(label);
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
describe('connotation', () => {
|
|
63
|
-
it('sets correct internal connotation style', async () => {
|
|
64
|
-
const connotation = 'cta';
|
|
65
|
-
(element as any).connotation = connotation;
|
|
66
|
-
await elementUpdated(element);
|
|
67
|
-
|
|
68
|
-
const control = element.shadowRoot?.querySelector(`.control.connotation-${connotation}`);
|
|
69
|
-
expect(control).toBeInstanceOf(Element);
|
|
70
|
-
});
|
|
71
|
-
});
|
|
72
|
-
|
|
73
|
-
describe('shape', () => {
|
|
74
|
-
it('sets correct internal shape style', async () => {
|
|
75
|
-
const shape = 'pill';
|
|
76
|
-
(element as any).shape = shape;
|
|
77
|
-
await elementUpdated(element);
|
|
78
|
-
|
|
79
|
-
const control = element.shadowRoot?.querySelector(`.control.shape-${shape}`);
|
|
80
|
-
expect(control).toBeInstanceOf(Element);
|
|
81
|
-
});
|
|
82
|
-
});
|
|
83
|
-
|
|
84
|
-
describe('appearance', () => {
|
|
85
|
-
it('sets correct internal appearance style', async () => {
|
|
86
|
-
const appearance = 'filled';
|
|
87
|
-
(element as any).appearance = appearance;
|
|
88
|
-
await elementUpdated(element);
|
|
89
|
-
|
|
90
|
-
const control = element.shadowRoot?.querySelector(`.control.appearance-${appearance}`);
|
|
91
|
-
expect(control).toBeInstanceOf(Element);
|
|
92
|
-
});
|
|
93
|
-
});
|
|
94
|
-
|
|
95
|
-
describe('size', () => {
|
|
96
|
-
it('sets correct internal size style', async () => {
|
|
97
|
-
const size = 'small';
|
|
98
|
-
(element as any).size = size;
|
|
99
|
-
await elementUpdated(element);
|
|
100
|
-
|
|
101
|
-
const control = element.shadowRoot?.querySelector(`.control.size-${size}`);
|
|
102
|
-
expect(control).toBeInstanceOf(Element);
|
|
103
|
-
});
|
|
104
|
-
});
|
|
105
|
-
|
|
106
|
-
describe('icon-only', () => {
|
|
107
|
-
it('sets correct internal icon-only style', async () => {
|
|
108
|
-
const getControlIconOnly = () => element.shadowRoot?.querySelector('.control.icon-only');
|
|
109
|
-
const controlIconOnlyBefore = getControlIconOnly();
|
|
110
|
-
|
|
111
|
-
element.icon = 'home';
|
|
112
|
-
await elementUpdated(element);
|
|
113
|
-
|
|
114
|
-
const controlIconOnlyAfter = getControlIconOnly();
|
|
115
|
-
expect(controlIconOnlyBefore).toBeNull();
|
|
116
|
-
expect(controlIconOnlyAfter).toBeInstanceOf(Element);
|
|
117
|
-
});
|
|
118
|
-
});
|
|
119
|
-
|
|
120
|
-
describe('disabled', function () {
|
|
121
|
-
it('should set disabled class when disabled is true', async () => {
|
|
122
|
-
const appearance = 'filled';
|
|
123
|
-
(element as any).appearance = appearance;
|
|
124
|
-
element.toggleAttribute('disabled', true);
|
|
125
|
-
await elementUpdated(element);
|
|
126
|
-
|
|
127
|
-
const control = element.shadowRoot?.querySelector(`.control.appearance-${appearance}.disabled`);
|
|
128
|
-
expect(control).toBeInstanceOf(Element);
|
|
129
|
-
});
|
|
130
|
-
});
|
|
131
|
-
});
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import type { ViewTemplate } from '@microsoft/fast-element';
|
|
2
|
-
import { html, ref } from '@microsoft/fast-element';
|
|
3
|
-
import type { ElementDefinitionContext, FoundationElementDefinition } from '@microsoft/fast-foundation';
|
|
4
|
-
import { classNames } from '@microsoft/fast-web-utilities';
|
|
5
|
-
import { Focus } from '../focus/focus';
|
|
6
|
-
import { affixIconTemplateFactory } from '../../shared/patterns/affix';
|
|
7
|
-
import type { Button, ButtonAppearance } from './button';
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const getAppearanceClassName = (appearance: ButtonAppearance, disabled: boolean) => {
|
|
11
|
-
let className = `appearance-${appearance}`;
|
|
12
|
-
disabled && (className += ' disabled');
|
|
13
|
-
return className;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
const getClasses = ({
|
|
17
|
-
connotation, appearance, shape, size, icon, label, disabled, iconTrailing
|
|
18
|
-
}: Button) => classNames(
|
|
19
|
-
'control',
|
|
20
|
-
[`connotation-${connotation}`, Boolean(connotation)],
|
|
21
|
-
[getAppearanceClassName(appearance as ButtonAppearance, disabled), Boolean(appearance)],
|
|
22
|
-
[`shape-${shape}`, Boolean(shape)],
|
|
23
|
-
[`size-${size}`, Boolean(size)],
|
|
24
|
-
['icon-only', !label && !!icon],
|
|
25
|
-
['icon-trailing', iconTrailing],
|
|
26
|
-
);
|
|
27
|
-
|
|
28
|
-
const focusTemplate = (context: ElementDefinitionContext) => {
|
|
29
|
-
const focusTag = context.tagFor(Focus);
|
|
30
|
-
|
|
31
|
-
return html`<${focusTag} class="focus-indicator"></${focusTag}>`;
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* The template for the {@link @microsoft/fast-foundation#(Button:class)} component.
|
|
36
|
-
*
|
|
37
|
-
* @param context
|
|
38
|
-
* @param definition
|
|
39
|
-
* @public
|
|
40
|
-
*/
|
|
41
|
-
export const buttonTemplate: (
|
|
42
|
-
context: ElementDefinitionContext,
|
|
43
|
-
definition: FoundationElementDefinition
|
|
44
|
-
) => ViewTemplate<Button> = (context: ElementDefinitionContext) => {
|
|
45
|
-
const affixIconTemplate = affixIconTemplateFactory(context);
|
|
46
|
-
|
|
47
|
-
return html`
|
|
48
|
-
<button
|
|
49
|
-
class="${getClasses}"
|
|
50
|
-
?autofocus="${(x) => x.autofocus}"
|
|
51
|
-
?disabled="${(x) => x.disabled}"
|
|
52
|
-
form="${(x) => x.formId}"
|
|
53
|
-
formaction="${(x) => x.formaction}"
|
|
54
|
-
formenctype="${(x) => x.formenctype}"
|
|
55
|
-
formmethod="${(x) => x.formmethod}"
|
|
56
|
-
formnovalidate="${(x) => x.formnovalidate}"
|
|
57
|
-
formtarget="${(x) => x.formtarget}"
|
|
58
|
-
name="${(x) => x.name}"
|
|
59
|
-
type="${(x) => x.type}"
|
|
60
|
-
value="${(x) => x.value}"
|
|
61
|
-
aria-atomic="${(x) => x.ariaAtomic}"
|
|
62
|
-
aria-busy="${(x) => x.ariaBusy}"
|
|
63
|
-
aria-controls="${(x) => x.ariaControls}"
|
|
64
|
-
aria-current="${(x) => x.ariaCurrent}"
|
|
65
|
-
aria-describedby="${(x) => x.ariaDescribedby}"
|
|
66
|
-
aria-details="${(x) => x.ariaDetails}"
|
|
67
|
-
aria-disabled="${(x) => x.ariaDisabled}"
|
|
68
|
-
aria-errormessage="${(x) => x.ariaErrormessage}"
|
|
69
|
-
aria-expanded="${(x) => x.ariaExpanded}"
|
|
70
|
-
aria-flowto="${(x) => x.ariaFlowto}"
|
|
71
|
-
aria-haspopup="${(x) => x.ariaHaspopup}"
|
|
72
|
-
aria-hidden="${(x) => x.ariaHidden}"
|
|
73
|
-
aria-invalid="${(x) => x.ariaInvalid}"
|
|
74
|
-
aria-keyshortcuts="${(x) => x.ariaKeyshortcuts}"
|
|
75
|
-
aria-label="${(x) => x.ariaLabel}"
|
|
76
|
-
aria-labelledby="${(x) => x.ariaLabelledby}"
|
|
77
|
-
aria-live="${(x) => x.ariaLive}"
|
|
78
|
-
aria-owns="${(x) => x.ariaOwns}"
|
|
79
|
-
aria-pressed="${(x) => x.ariaPressed}"
|
|
80
|
-
aria-relevant="${(x) => x.ariaRelevant}"
|
|
81
|
-
aria-roledescription="${(x) => x.ariaRoledescription}"
|
|
82
|
-
${ref('control')}
|
|
83
|
-
>
|
|
84
|
-
${() => focusTemplate(context)}
|
|
85
|
-
${x => affixIconTemplate(x.icon)}
|
|
86
|
-
${(x) => x.label}
|
|
87
|
-
</button>
|
|
88
|
-
`;
|
|
89
|
-
};
|
package/src/lib/button/button.ts
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import { applyMixins, Button as FoundationButton } from '@microsoft/fast-foundation';
|
|
2
|
-
import { attr } from '@microsoft/fast-element';
|
|
3
|
-
|
|
4
|
-
import type {
|
|
5
|
-
Appearance, Connotation, Shape, Size,
|
|
6
|
-
} from '../enums.js';
|
|
7
|
-
import { AffixIconWithTrailing } from '../../shared/patterns/affix';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Types of button connotation.
|
|
11
|
-
*
|
|
12
|
-
* @public
|
|
13
|
-
*/
|
|
14
|
-
type ButtonConnotation = Extract<Connotation,
|
|
15
|
-
| Connotation.Primary
|
|
16
|
-
| Connotation.CTA
|
|
17
|
-
| Connotation.Success
|
|
18
|
-
| Connotation.Alert>;
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Types of button appearance.
|
|
22
|
-
*
|
|
23
|
-
* @public
|
|
24
|
-
*/
|
|
25
|
-
export type ButtonAppearance = Extract<Appearance,
|
|
26
|
-
Appearance.Filled | Appearance.Outlined | Appearance.Ghost>;
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Types of button shape.
|
|
30
|
-
*
|
|
31
|
-
* @public
|
|
32
|
-
*/
|
|
33
|
-
type ButtonShape = Extract<Shape, Shape.Rounded | Shape.Pill>;
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Types of button size.
|
|
37
|
-
*
|
|
38
|
-
* @public
|
|
39
|
-
*/
|
|
40
|
-
type ButtonSize = Extract<Size, Size.BaseSmall | Size.Base | Size.BaseLarge>;
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Base class for button
|
|
44
|
-
*
|
|
45
|
-
* @public
|
|
46
|
-
*/
|
|
47
|
-
export class Button extends FoundationButton {
|
|
48
|
-
/**
|
|
49
|
-
* The connotation the button should have.
|
|
50
|
-
*
|
|
51
|
-
* @public
|
|
52
|
-
* @remarks
|
|
53
|
-
* HTML Attribute: connotation
|
|
54
|
-
*/
|
|
55
|
-
@attr connotation?: ButtonConnotation;
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* The shape the button should have.
|
|
59
|
-
*
|
|
60
|
-
* @public
|
|
61
|
-
* @remarks
|
|
62
|
-
* HTML Attribute: shape
|
|
63
|
-
*/
|
|
64
|
-
@attr shape?: ButtonShape;
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* The appearance the button should have.
|
|
68
|
-
*
|
|
69
|
-
* @public
|
|
70
|
-
* @remarks
|
|
71
|
-
* HTML Attribute: appearance
|
|
72
|
-
*/
|
|
73
|
-
@attr appearance?: ButtonAppearance;
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* The size the button should have.
|
|
77
|
-
*
|
|
78
|
-
* @public
|
|
79
|
-
* @remarks
|
|
80
|
-
* HTML Attribute: size
|
|
81
|
-
*/
|
|
82
|
-
@attr size?: ButtonSize;
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Indicates the button's label.
|
|
86
|
-
*
|
|
87
|
-
* @public
|
|
88
|
-
* @remarks
|
|
89
|
-
* HTML Attribute: label
|
|
90
|
-
*/
|
|
91
|
-
@attr({ mode: 'fromView' }) label = '';
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
export interface Button extends AffixIconWithTrailing {}
|
|
95
|
-
applyMixins(Button, AffixIconWithTrailing);
|
package/src/lib/button/index.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import '../icon';
|
|
2
|
-
import '../focus';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { Button as FastButton } from '@microsoft/fast-foundation';
|
|
6
|
-
import { designSystem } from '../../shared/design-system';
|
|
7
|
-
import { Button } from './button';
|
|
8
|
-
import styles from './button.scss';
|
|
9
|
-
import { buttonTemplate as template } from './button.template';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Represents a button custom element.
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
export const vividButton = Button.compose({
|
|
16
|
-
baseName: 'button',
|
|
17
|
-
baseClass: FastButton,
|
|
18
|
-
template: template as any,
|
|
19
|
-
styles,
|
|
20
|
-
shadowOptions: {
|
|
21
|
-
delegatesFocus: true,
|
|
22
|
-
},
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
designSystem.register(vividButton());
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import * as path from 'path';
|
|
2
|
-
import { expect, test } from '@playwright/test';
|
|
3
|
-
import type { Page } from '@playwright/test';
|
|
4
|
-
import {
|
|
5
|
-
extractHTMLBlocksFromReadme,
|
|
6
|
-
loadComponents,
|
|
7
|
-
loadTemplate
|
|
8
|
-
} from '../../visual-tests/visual-tests-utils.ts';
|
|
9
|
-
|
|
10
|
-
const components = ['button'];
|
|
11
|
-
test('should show the component', async ({ page }: { page: Page }) => {
|
|
12
|
-
const template = extractHTMLBlocksFromReadme(path.join(new URL('.', import.meta.url).pathname, 'README.md'))
|
|
13
|
-
.reduce((htmlString: string, block: string) => `${htmlString} <div style="margin: 5px;">${block}</div>`, '');
|
|
14
|
-
|
|
15
|
-
await loadComponents({
|
|
16
|
-
page,
|
|
17
|
-
components,
|
|
18
|
-
});
|
|
19
|
-
await loadTemplate({
|
|
20
|
-
page,
|
|
21
|
-
template,
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
const testWrapper = await page.$('#wrapper');
|
|
25
|
-
|
|
26
|
-
await page.waitForLoadState('networkidle');
|
|
27
|
-
|
|
28
|
-
expect(await testWrapper?.screenshot())
|
|
29
|
-
.toMatchSnapshot(
|
|
30
|
-
'./snapshots/button.png',
|
|
31
|
-
);
|
|
32
|
-
});
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
# calendar
|
|
2
|
-
|
|
3
|
-
Represents a calendar custom element.
|
|
4
|
-
|
|
5
|
-
```js
|
|
6
|
-
<script type="module">
|
|
7
|
-
import '@vonage/vivid/calendar';
|
|
8
|
-
</script>
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
```html preview
|
|
12
|
-
<vwc-calendar></vwc-calendar>
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Datetime
|
|
16
|
-
|
|
17
|
-
Use the `datetime` attribute to set date within a week of choice.
|
|
18
|
-
|
|
19
|
-
- Type: any [`Date()` constructor acceptable parameter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/Date#parameters)
|
|
20
|
-
- Default: `undefined` (will use the current date)
|
|
21
|
-
|
|
22
|
-
```html preview
|
|
23
|
-
<vwc-calendar datetime="2022-01-01"></vwc-calendar>
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
## Start Day
|
|
27
|
-
|
|
28
|
-
Use the `start-day` attribute (or `startDay` property) to set the first day of the week (e.g. work week starts on Monday).
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
- Type: `'sunday'` | `'monday'`
|
|
32
|
-
- Default: `undefined` (programmatically defaults to `'monday'` if not specified)
|
|
33
|
-
|
|
34
|
-
```html preview
|
|
35
|
-
<vwc-calendar start-day="sunday"></vwc-calendar>
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
## Locales
|
|
39
|
-
|
|
40
|
-
Use `locales` to set a locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the [Intl.Collator object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator) for details. e.g. `en-US` | `en-US, he-IL`
|
|
41
|
-
|
|
42
|
-
- Type: `String` | `String[]`
|
|
43
|
-
- Default: `undefined` (will use the current locale)
|
|
44
|
-
|
|
45
|
-
```html preview
|
|
46
|
-
<vwc-calendar locales="he-IL" start-day="sunday" style="direction: rtl"></vwc-calendar>
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
## Hour 12
|
|
50
|
-
|
|
51
|
-
`hour12` sets the convention of displayed time in which the day runs from midnight to midnight and is divided into 24 or 12 hours.
|
|
52
|
-
Unless provided, choice will be set according to local time preference (e.g. US = 12, IL = 24).
|
|
53
|
-
|
|
54
|
-
- Type: `Boolean`
|
|
55
|
-
- Default: `false`
|
|
56
|
-
|
|
57
|
-
```html preview
|
|
58
|
-
<vwc-calendar hour12></vwc-calendar>
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
## Methods
|
|
62
|
-
|
|
63
|
-
### Event Context
|
|
64
|
-
|
|
65
|
-
- Type: function
|
|
66
|
-
- Returns: `{ day: number, hour: number }` | `null`
|
|
67
|
-
|
|
68
|
-
Accepts event reference and returns an object containing _day_ & _hour_ if applicable.
|
|
69
|
-
|
|
70
|
-
|