@vonage/vivid 3.0.0-next.4 → 3.0.0-next.7
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/.babelrc +3 -0
- package/.eslintrc.json +70 -0
- package/.stylelintrc.json +8 -0
- package/CHANGELOG.json +343 -0
- package/CHANGELOG.md +45 -0
- package/jest.config.cjs +20 -0
- package/package.json +7 -12
- package/playwright.config.dev.ts +21 -0
- package/playwright.config.ts +34 -0
- package/project.json +122 -0
- package/rollup.config.prod.ts +50 -0
- package/setupJestTests.js +17 -0
- package/{index.d.ts → src/index.ts} +2 -2
- package/src/lib/accordion/README.md +55 -0
- package/src/lib/accordion/accordion.scss +10 -0
- package/src/lib/accordion/accordion.spec.ts +91 -0
- package/src/lib/accordion/accordion.template.ts +23 -0
- package/src/lib/accordion/accordion.ts +49 -0
- package/src/lib/accordion/index.ts +14 -0
- package/src/lib/accordion/ui.test.ts +37 -0
- 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 +113 -0
- package/src/lib/accordion-item/accordion-item.scss +91 -0
- package/src/lib/accordion-item/accordion-item.spec.ts +103 -0
- package/src/lib/accordion-item/accordion-item.template.ts +62 -0
- package/src/lib/accordion-item/accordion-item.ts +67 -0
- package/src/lib/accordion-item/index.ts +14 -0
- package/src/lib/accordion-item/partials/variables.scss +1 -0
- package/src/lib/accordion-item/ui.test.ts +37 -0
- 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 +112 -0
- package/src/lib/badge/badge.scss +64 -0
- package/src/lib/badge/badge.spec.ts +114 -0
- package/src/lib/badge/badge.template.ts +36 -0
- package/src/lib/badge/badge.ts +97 -0
- package/src/lib/badge/index.ts +23 -0
- package/src/lib/badge/ui.test.ts +28 -0
- 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 +117 -0
- package/src/lib/banner/banner.scss +71 -0
- package/src/lib/banner/banner.spec.ts +355 -0
- package/src/lib/banner/banner.template.ts +61 -0
- package/src/lib/banner/banner.ts +77 -0
- package/src/lib/banner/index.ts +14 -0
- package/src/lib/banner/ui.test.ts +64 -0
- 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 +25 -0
- package/src/lib/breadcrumb/breadcrumb.scss +3 -0
- package/src/lib/breadcrumb/breadcrumb.spec.ts +78 -0
- package/src/lib/breadcrumb/breadcrumb.ts +10 -0
- package/src/lib/breadcrumb/index.ts +13 -0
- package/src/lib/breadcrumb/ui.test.ts +36 -0
- 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 +40 -0
- package/src/lib/breadcrumb-item/breadcrumb-item.scss +28 -0
- package/src/lib/breadcrumb-item/breadcrumb-item.spec.ts +192 -0
- package/src/lib/breadcrumb-item/breadcrumb-item.template.ts +37 -0
- package/src/lib/breadcrumb-item/breadcrumb-item.ts +15 -0
- package/src/lib/breadcrumb-item/index.ts +16 -0
- package/src/lib/breadcrumb-item/ui.test.ts +38 -0
- 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 +120 -0
- package/src/lib/button/button.scss +142 -0
- package/src/lib/button/button.spec.ts +131 -0
- package/src/lib/button/button.template.ts +89 -0
- package/src/lib/button/button.ts +95 -0
- package/src/lib/button/index.ts +25 -0
- package/src/lib/button/partials/variables.scss +2 -0
- package/src/lib/button/ui.test.ts +32 -0
- 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 +70 -0
- package/src/lib/calendar/calendar.scss +176 -0
- package/src/lib/calendar/calendar.spec.ts +341 -0
- package/src/lib/calendar/calendar.template.ts +93 -0
- package/src/lib/calendar/calendar.ts +139 -0
- package/src/lib/calendar/helpers/calendar.date-functions.ts +31 -0
- package/src/lib/calendar/helpers/calendar.event-context.ts +72 -0
- package/src/lib/calendar/helpers/calendar.keyboard-interactions.ts +65 -0
- package/src/lib/calendar/index.ts +16 -0
- package/src/lib/calendar/partials/_variables.scss +15 -0
- package/src/lib/calendar/ui.test.ts +32 -0
- 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 +7 -0
- package/{lib/components.d.ts → src/lib/components.ts} +16 -16
- package/src/lib/elevation/README.md +99 -0
- package/src/lib/elevation/elevation.scss +15 -0
- package/src/lib/elevation/elevation.spec.ts +55 -0
- package/src/lib/elevation/elevation.template.ts +26 -0
- package/src/lib/elevation/elevation.ts +17 -0
- package/src/lib/elevation/index.ts +17 -0
- package/src/lib/elevation/partials/_elevation.mixin.scss +4 -0
- package/src/lib/elevation/ui.test.ts +32 -0
- 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 +55 -0
- package/src/lib/focus/README.md +1 -0
- package/src/lib/focus/focus.scss +17 -0
- package/src/lib/focus/focus.template.ts +16 -0
- package/src/lib/focus/focus.ts +10 -0
- package/src/lib/focus/index.ts +21 -0
- package/src/lib/focus/partials/variables.scss +2 -0
- package/src/lib/icon/README.md +70 -0
- package/src/lib/icon/__snapshots__/icon.spec.ts.snap +16 -0
- package/src/lib/icon/icon.placeholder.ts +12 -0
- package/src/lib/icon/icon.scss +52 -0
- package/src/lib/icon/icon.spec.ts +106 -0
- package/src/lib/icon/icon.template.ts +23 -0
- package/src/lib/icon/icon.ts +93 -0
- package/src/lib/icon/index.ts +14 -0
- package/src/lib/layout/README.md +154 -0
- package/src/lib/layout/index.ts +18 -0
- package/src/lib/layout/layout.scss +40 -0
- package/src/lib/layout/layout.spec.ts +73 -0
- package/src/lib/layout/layout.template.ts +29 -0
- package/src/lib/layout/layout.ts +46 -0
- package/src/lib/layout/partials/_functions.scss +15 -0
- package/src/lib/layout/partials/_mixins.scss +5 -0
- package/src/lib/layout/partials/_variables.scss +23 -0
- package/src/lib/layout/ui.test.ts +32 -0
- 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 +261 -0
- package/src/lib/popup/index.ts +21 -0
- package/src/lib/popup/popup.scss +43 -0
- package/src/lib/popup/popup.spec.ts +265 -0
- package/src/lib/popup/popup.template.ts +41 -0
- package/src/lib/popup/popup.ts +158 -0
- package/src/lib/popup/ui.test.ts +111 -0
- 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 +107 -0
- package/src/lib/progress/index.ts +14 -0
- package/src/lib/progress/progress.scss +133 -0
- package/src/lib/progress/progress.spec.ts +173 -0
- package/src/lib/progress/progress.template.ts +62 -0
- package/src/lib/progress/progress.ts +25 -0
- package/src/lib/progress/ui.test.ts +70 -0
- 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 +90 -0
- package/src/lib/progress-ring/index.ts +15 -0
- package/src/lib/progress-ring/progress-ring.scss +75 -0
- package/src/lib/progress-ring/progress-ring.spec.ts +139 -0
- package/src/lib/progress-ring/progress-ring.template.ts +82 -0
- package/src/lib/progress-ring/progress-ring.ts +18 -0
- package/src/lib/progress-ring/ui.test.ts +35 -0
- 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 +304 -0
- package/src/lib/side-drawer/index.ts +16 -0
- package/src/lib/side-drawer/partials/variables.scss +6 -0
- package/src/lib/side-drawer/side-drawer.scss +109 -0
- package/src/lib/side-drawer/side-drawer.spec.ts +118 -0
- package/src/lib/side-drawer/side-drawer.template.ts +51 -0
- package/src/lib/side-drawer/side-drawer.ts +58 -0
- package/src/lib/side-drawer/ui.test.ts +102 -0
- 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 +41 -0
- package/src/lib/sidenav-item/index.ts +20 -0
- package/src/lib/sidenav-item/sidenav-item.scss +51 -0
- package/src/lib/sidenav-item/sidenav-item.spec.ts +64 -0
- package/src/lib/sidenav-item/sidenav-item.template.ts +25 -0
- package/src/lib/sidenav-item/sidenav-item.ts +15 -0
- package/src/lib/sidenav-item/ui.test.ts +32 -0
- 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 +119 -0
- package/src/lib/text/index.ts +14 -0
- package/src/lib/text/text.scss +92 -0
- package/src/lib/text/text.spec.ts +54 -0
- package/src/lib/text/text.template.ts +28 -0
- package/src/lib/text/text.ts +55 -0
- package/src/lib/text/ui.test.ts +39 -0
- 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 +5 -0
- package/src/lib/text-anchor/index.ts +12 -0
- package/src/lib/text-anchor/text-anchor.spec.ts +153 -0
- package/src/lib/text-anchor/text-anchor.template.ts +66 -0
- package/src/lib/text-anchor/text-anchor.ts +22 -0
- package/src/lib/tooltip/README.md +132 -0
- package/src/lib/tooltip/index.ts +16 -0
- package/src/lib/tooltip/partials/variables.scss +1 -0
- package/src/lib/tooltip/tooltip.scss +18 -0
- package/src/lib/tooltip/tooltip.spec.ts +70 -0
- package/src/lib/tooltip/tooltip.template.ts +30 -0
- package/src/lib/tooltip/tooltip.ts +44 -0
- package/src/lib/tooltip/ui.test.ts +53 -0
- 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 +12 -0
- package/src/shared/patterns/affix.ts +56 -0
- package/{shared/patterns/index.d.ts → src/shared/patterns/index.ts} +1 -1
- package/src/types/extract-gfm.d.ts +5 -0
- package/src/types/style.d.ts +4 -0
- package/src/visual-tests/visual-tests-utils.ts +76 -0
- package/tsconfig.json +36 -0
- package/tsconfig.lib.json +11 -0
- package/tsconfig.spec.json +16 -0
- package/accordion/index.js +0 -61
- package/accordion-item/index.js +0 -125
- package/badge/index.js +0 -64
- package/banner/index.js +0 -212
- package/breadcrumb/index.js +0 -100
- package/breadcrumb-item/index.js +0 -55
- package/button/index.js +0 -761
- package/calendar/index.js +0 -1521
- package/elevation/index.js +0 -31
- package/focus/index.js +0 -3
- package/icon/index.js +0 -34
- package/index.js +0 -32
- package/layout/index.js +0 -53
- package/lib/accordion/accordion.d.ts +0 -9
- package/lib/accordion/accordion.template.d.ts +0 -4
- package/lib/accordion/index.d.ts +0 -2
- package/lib/accordion-item/accordion-item.d.ts +0 -13
- package/lib/accordion-item/accordion-item.template.d.ts +0 -4
- package/lib/accordion-item/index.d.ts +0 -3
- package/lib/badge/badge.d.ts +0 -17
- package/lib/badge/badge.template.d.ts +0 -4
- package/lib/badge/index.d.ts +0 -3
- package/lib/banner/banner.d.ts +0 -20
- package/lib/banner/banner.template.d.ts +0 -6
- package/lib/banner/index.d.ts +0 -2
- package/lib/breadcrumb/breadcrumb.d.ts +0 -3
- package/lib/breadcrumb/index.d.ts +0 -2
- package/lib/breadcrumb-item/breadcrumb-item.d.ts +0 -5
- package/lib/breadcrumb-item/breadcrumb-item.template.d.ts +0 -4
- package/lib/breadcrumb-item/index.d.ts +0 -3
- package/lib/button/button.d.ts +0 -17
- package/lib/button/button.template.d.ts +0 -4
- package/lib/button/index.d.ts +0 -21
- package/lib/calendar/calendar.d.ts +0 -11
- package/lib/calendar/calendar.template.d.ts +0 -4
- package/lib/calendar/helpers/calendar.date-functions.d.ts +0 -2
- package/lib/calendar/helpers/calendar.event-context.d.ts +0 -6
- package/lib/calendar/helpers/calendar.keyboard-interactions.d.ts +0 -9
- package/lib/calendar/index.d.ts +0 -3
- package/lib/elevation/elevation.d.ts +0 -4
- package/lib/elevation/elevation.template.d.ts +0 -4
- package/lib/elevation/index.d.ts +0 -2
- package/lib/enums.d.ts +0 -45
- package/lib/focus/focus.d.ts +0 -3
- package/lib/focus/focus.template.d.ts +0 -4
- package/lib/focus/index.d.ts +0 -2
- package/lib/icon/icon.d.ts +0 -11
- package/lib/icon/icon.placeholder.d.ts +0 -1
- package/lib/icon/icon.template.d.ts +0 -4
- package/lib/icon/index.d.ts +0 -2
- package/lib/layout/index.d.ts +0 -2
- package/lib/layout/layout.d.ts +0 -16
- package/lib/layout/layout.template.d.ts +0 -4
- package/lib/popup/index.d.ts +0 -4
- package/lib/popup/popup.d.ts +0 -29
- package/lib/popup/popup.template.d.ts +0 -4
- package/lib/progress/index.d.ts +0 -2
- package/lib/progress/progress.d.ts +0 -9
- package/lib/progress/progress.template.d.ts +0 -5
- package/lib/side-drawer/index.d.ts +0 -2
- package/lib/side-drawer/side-drawer.d.ts +0 -12
- package/lib/side-drawer/side-drawer.template.d.ts +0 -4
- package/lib/sidenav-item/index.d.ts +0 -3
- package/lib/sidenav-item/sidenav-item.d.ts +0 -6
- package/lib/sidenav-item/sidenav-item.template.d.ts +0 -4
- package/lib/text/index.d.ts +0 -2
- package/lib/text/text.d.ts +0 -10
- package/lib/text/text.template.d.ts +0 -4
- package/lib/text-anchor/index.d.ts +0 -2
- package/lib/text-anchor/text-anchor.d.ts +0 -7
- package/lib/text-anchor/text-anchor.template.d.ts +0 -4
- package/lib/tooltip/index.d.ts +0 -3
- package/lib/tooltip/tooltip.d.ts +0 -10
- package/lib/tooltip/tooltip.template.d.ts +0 -4
- package/popup/index.js +0 -2087
- package/progress/index.js +0 -159
- package/shared/_has.js +0 -58
- package/shared/affix.js +0 -29
- package/shared/anchor.js +0 -78
- package/shared/apply-mixins.js +0 -22
- package/shared/aria-global.js +0 -156
- package/shared/breadcrumb-item.js +0 -25
- package/shared/class-names.js +0 -15
- package/shared/design-system/index.d.ts +0 -3
- package/shared/es.object.assign.js +0 -68
- package/shared/icon.js +0 -1393
- package/shared/index.js +0 -4991
- package/shared/index2.js +0 -21
- package/shared/patterns/affix.d.ts +0 -9
- package/shared/slotted.js +0 -119
- package/shared/style-inject.es.js +0 -28
- package/shared/text-anchor.js +0 -21
- package/shared/text-anchor.template.js +0 -54
- package/shared/web.dom-collections.iterator.js +0 -1479
- package/shared/when.js +0 -15
- package/side-drawer/index.js +0 -103
- package/sidenav-item/index.js +0 -38
- package/styles/fonts/spezia.css +0 -23
- package/styles/themes/dark.css +0 -193
- package/styles/themes/light.css +0 -193
- package/text/index.js +0 -45
- package/text-anchor/index.js +0 -19
- package/tooltip/index.js +0 -73
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
# layout
|
|
2
|
+
|
|
3
|
+
Using layout, elements can be arranged easily in a variety of sizes and spaces that suit vivid design.
|
|
4
|
+
|
|
5
|
+
```js
|
|
6
|
+
<script type='module'>
|
|
7
|
+
import '@vonage/vivid/layout';
|
|
8
|
+
</script>
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
```html preview
|
|
12
|
+
<vwc-layout>
|
|
13
|
+
<img src="https://picsum.photos/id/1015/300/200">
|
|
14
|
+
<img src="https://picsum.photos/id/1016/300/200">
|
|
15
|
+
<img src="https://picsum.photos/id/1018/300/200">
|
|
16
|
+
<img src="https://picsum.photos/id/1019/300/200">
|
|
17
|
+
<img src="https://picsum.photos/id/1055/300/200">
|
|
18
|
+
<img src="https://picsum.photos/id/1050/300/200">
|
|
19
|
+
</vwc-layout>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Auto-sizing
|
|
23
|
+
|
|
24
|
+
Use the `auto-sizing` attribute to set the initial preferred auto-sizing.
|
|
25
|
+
|
|
26
|
+
- Type: `'fit'` | `'fill'`
|
|
27
|
+
- Default: `'fit'`
|
|
28
|
+
|
|
29
|
+
### fit
|
|
30
|
+
|
|
31
|
+
```html preview
|
|
32
|
+
<vwc-layout auto-sizing="fit">
|
|
33
|
+
<div style="border: 1px solid">fit</div>
|
|
34
|
+
<div style="border: 1px solid">fit</div>
|
|
35
|
+
</vwc-layout>
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### fill
|
|
39
|
+
|
|
40
|
+
```html preview
|
|
41
|
+
<vwc-layout auto-sizing="fill">
|
|
42
|
+
<div style="border: 1px solid">fill</div>
|
|
43
|
+
<div style="border: 1px solid">fill</div>
|
|
44
|
+
</vwc-layout>
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Gutters
|
|
48
|
+
|
|
49
|
+
Use the `gutters` attribute to set the initial preferred margin.
|
|
50
|
+
|
|
51
|
+
- Type: `'base-small'` | `'base'` | `'base-large'`
|
|
52
|
+
- Default: `''`
|
|
53
|
+
|
|
54
|
+
```html preview
|
|
55
|
+
<vwc-layout>
|
|
56
|
+
<div style="border: 1px solid">default</div>
|
|
57
|
+
<div style="border: 1px solid">default</div>
|
|
58
|
+
</vwc-layout>
|
|
59
|
+
<vwc-layout gutters="base-small">
|
|
60
|
+
<div style="border: 1px solid">base-small</div>
|
|
61
|
+
<div style="border: 1px solid">base-small</div>
|
|
62
|
+
</vwc-layout>
|
|
63
|
+
<vwc-layout gutters="base">
|
|
64
|
+
<div style="border: 1px solid">base</div>
|
|
65
|
+
<div style="border: 1px solid">base</div>
|
|
66
|
+
</vwc-layout>
|
|
67
|
+
<vwc-layout gutters="base-large">
|
|
68
|
+
<div style="border: 1px solid">base-large</div>
|
|
69
|
+
<div style="border: 1px solid">base-large</div>
|
|
70
|
+
</vwc-layout>
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Column-spacing
|
|
74
|
+
|
|
75
|
+
Use the `column-spacing` attribute to set the initial preferred spacing of a column.
|
|
76
|
+
|
|
77
|
+
- Type: `'base-small'` | `'base'` | `'base-large'`
|
|
78
|
+
- Default: `'base'`
|
|
79
|
+
|
|
80
|
+
```html preview
|
|
81
|
+
<vwc-layout column-spacing="base-small">
|
|
82
|
+
<div style="border: 1px solid">base-small</div>
|
|
83
|
+
<div style="border: 1px solid">base-small</div>
|
|
84
|
+
</vwc-layout>
|
|
85
|
+
<vwc-layout column-spacing="base">
|
|
86
|
+
<div style="border: 1px solid">base</div>
|
|
87
|
+
<div style="border: 1px solid">base</div>
|
|
88
|
+
</vwc-layout>
|
|
89
|
+
<vwc-layout column-spacing="base-large">
|
|
90
|
+
<div style="border: 1px solid">base-large</div>
|
|
91
|
+
<div style="border: 1px solid">base-large</div>
|
|
92
|
+
</vwc-layout>
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Column-basis
|
|
96
|
+
|
|
97
|
+
Use the `column-basis` attribute to set the initial preferred measure of a column.
|
|
98
|
+
|
|
99
|
+
- Type: `'base-small'` | `'base'` | `'base-large'`
|
|
100
|
+
- Default: `'base'`
|
|
101
|
+
|
|
102
|
+
### base-small
|
|
103
|
+
|
|
104
|
+
```html preview
|
|
105
|
+
<vwc-layout column-basis="base-small">
|
|
106
|
+
<div style="border: 1px solid">base-small</div>
|
|
107
|
+
<div style="border: 1px solid">base-small</div>
|
|
108
|
+
<div style="border: 1px solid">base-small</div>
|
|
109
|
+
<div style="border: 1px solid">base-small</div>
|
|
110
|
+
<div style="border: 1px solid">base-small</div>
|
|
111
|
+
</vwc-layout>
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### base
|
|
115
|
+
|
|
116
|
+
```html preview
|
|
117
|
+
<vwc-layout column-basis="base">
|
|
118
|
+
<div style="border: 1px solid">base</div>
|
|
119
|
+
<div style="border: 1px solid">base</div>
|
|
120
|
+
<div style="border: 1px solid">base</div>
|
|
121
|
+
<div style="border: 1px solid">base</div>
|
|
122
|
+
<div style="border: 1px solid">base</div>
|
|
123
|
+
</vwc-layout>
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### base-large
|
|
127
|
+
|
|
128
|
+
```html preview
|
|
129
|
+
<vwc-layout column-basis="base-large">
|
|
130
|
+
<div style="border: 1px solid">base-large</div>
|
|
131
|
+
<div style="border: 1px solid">base-large</div>
|
|
132
|
+
<div style="border: 1px solid">base-large</div>
|
|
133
|
+
<div style="border: 1px solid">base-large</div>
|
|
134
|
+
<div style="border: 1px solid">base-large</div>
|
|
135
|
+
</vwc-layout>
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### block
|
|
139
|
+
|
|
140
|
+
```html preview
|
|
141
|
+
<vwc-layout column-basis="block">
|
|
142
|
+
<div style="border: 1px solid">block</div>
|
|
143
|
+
<div style="border: 1px solid">block</div>
|
|
144
|
+
<div style="border: 1px solid">block</div>
|
|
145
|
+
<div style="border: 1px solid">block</div>
|
|
146
|
+
<div style="border: 1px solid">block</div>
|
|
147
|
+
</vwc-layout>
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
## CSS Custom Properties
|
|
151
|
+
|
|
152
|
+
| Name | Description | Usage |
|
|
153
|
+
| ---------------------------- | ------------------------------------------------ | -------------------------------------------------- |
|
|
154
|
+
| --layout-grid-template-columns | controls the grid-template-columns of the layout | repeat(`auto-sizing`, minmax(`column-basis`, 1fr)) |
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { FoundationElementDefinition } from '@microsoft/fast-foundation';
|
|
2
|
+
import { designSystem } from '../../shared/design-system';
|
|
3
|
+
import { Layout } from './layout';
|
|
4
|
+
import styles from './layout.scss';
|
|
5
|
+
import { layoutTemplate as template } from './layout.template';
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Represents a layout custom element.
|
|
10
|
+
* layout is...
|
|
11
|
+
*/
|
|
12
|
+
export const VIVIDLayout = Layout.compose<FoundationElementDefinition>({
|
|
13
|
+
baseName: 'layout',
|
|
14
|
+
template: template as any,
|
|
15
|
+
styles,
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
designSystem.register(VIVIDLayout());
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
|
|
3
|
+
@use 'partials/variables' as variables;
|
|
4
|
+
@use 'partials/mixins' as mixins;
|
|
5
|
+
@use 'partials/functions' as functions;
|
|
6
|
+
|
|
7
|
+
.control {
|
|
8
|
+
display: grid;
|
|
9
|
+
grid-auto-rows: min-content;
|
|
10
|
+
|
|
11
|
+
@include mixins.measurement(map.keys(variables.$bases)...) using ($basis) {
|
|
12
|
+
#{functions.get-selector-with-default(".column-basis", $basis, 'base', map.keys(variables.$bases))} {
|
|
13
|
+
grid-template-columns: var(
|
|
14
|
+
#{variables.$layout-grid-template-columns},
|
|
15
|
+
repeat(
|
|
16
|
+
var(#{variables.$auto-sizing}),
|
|
17
|
+
minmax(map.get(variables.$bases, $basis), 1fr)
|
|
18
|
+
)
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@include mixins.measurement(map.keys(variables.$spaces)...) using ($space) {
|
|
24
|
+
#{functions.get-selector-with-default(".column-spacing", $space, 'base', map.keys(variables.$spaces))} {
|
|
25
|
+
gap: map.get(variables.$spaces, $space);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@include mixins.measurement(map.keys(variables.$spaces)...) using ($space) {
|
|
30
|
+
&.gutters-#{$space} {
|
|
31
|
+
margin: map.get(variables.$spaces, $space);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@include mixins.measurement(map.keys(variables.$auto-sizes)...) using ($size) {
|
|
36
|
+
#{functions.get-selector-with-default(".auto-sizing", $size, fit, map.keys(variables.$auto-sizes))} {
|
|
37
|
+
#{variables.$auto-sizing}: map.get(variables.$auto-sizes, $size);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { elementUpdated, fixture, getControlElement } from '@vivid-nx/shared';
|
|
2
|
+
import { Size } from '../enums';
|
|
3
|
+
import { AUTO_SIZING, Layout } from './layout';
|
|
4
|
+
import '.';
|
|
5
|
+
|
|
6
|
+
const COMPONENT_TAG = 'vwc-layout';
|
|
7
|
+
|
|
8
|
+
describe('vwc-layout', () => {
|
|
9
|
+
let element: Layout;
|
|
10
|
+
|
|
11
|
+
beforeEach(async () => {
|
|
12
|
+
element = await fixture(`<${COMPONENT_TAG}>
|
|
13
|
+
<div style="border: 1px solid">test</div>
|
|
14
|
+
<div style="border: 1px solid">test</div>
|
|
15
|
+
</${COMPONENT_TAG}>`) as Layout;
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
describe('basic', () => {
|
|
19
|
+
it('initializes as a vwc-layout', async () => {
|
|
20
|
+
expect(element).toBeInstanceOf(Layout);
|
|
21
|
+
expect(element.gutters).toBeUndefined();
|
|
22
|
+
expect(element.columnBasis).toBeUndefined();
|
|
23
|
+
expect(element.columnSpacing).toBeUndefined();
|
|
24
|
+
expect(element.autoSizing).toBeUndefined();
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
describe('gutters', () => {
|
|
29
|
+
it('should set correct internal gutters class', async () => {
|
|
30
|
+
const gutters = Size.BaseLarge;
|
|
31
|
+
|
|
32
|
+
expect(getControlElement(element).classList.toString()).toEqual('control');
|
|
33
|
+
element.gutters = gutters;
|
|
34
|
+
await elementUpdated(element);
|
|
35
|
+
expect(getControlElement(element).classList.toString()).toEqual(`control gutters-${gutters}`);
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
describe('column-basis', () => {
|
|
41
|
+
it('should set correct internal column-basis style', async () => {
|
|
42
|
+
const columnBasis = Size.BaseLarge;
|
|
43
|
+
|
|
44
|
+
expect(getControlElement(element).classList.toString()).toEqual('control');
|
|
45
|
+
element.columnBasis = columnBasis;
|
|
46
|
+
await elementUpdated(element);
|
|
47
|
+
expect(getControlElement(element).classList.toString()).toEqual(`control column-basis-${columnBasis}`);
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
describe('column-spacing', () => {
|
|
52
|
+
it('should set correct internal column-spacing style', async () => {
|
|
53
|
+
const columnSpacing = Size.BaseLarge;
|
|
54
|
+
|
|
55
|
+
expect(getControlElement(element).classList.toString()).toEqual('control');
|
|
56
|
+
element.columnSpacing = columnSpacing;
|
|
57
|
+
await elementUpdated(element);
|
|
58
|
+
expect(getControlElement(element).classList.toString()).toEqual(`control column-spacing-${columnSpacing}`);
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
describe('auto-sizing', () => {
|
|
64
|
+
it('should set correct internal auto-sizing style', async () => {
|
|
65
|
+
const autoSizing = AUTO_SIZING.Fill;
|
|
66
|
+
|
|
67
|
+
expect(getControlElement(element).classList.toString()).toEqual('control');
|
|
68
|
+
element.autoSizing = autoSizing;
|
|
69
|
+
await elementUpdated(element);
|
|
70
|
+
expect(getControlElement(element).classList.toString()).toEqual(`control auto-sizing-${autoSizing}`);
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { html } from '@microsoft/fast-element';
|
|
2
|
+
import { classNames } from '@microsoft/fast-web-utilities';
|
|
3
|
+
import type { ViewTemplate } from '@microsoft/fast-element';
|
|
4
|
+
import type { ElementDefinitionContext, FoundationElementDefinition } from '@microsoft/fast-foundation';
|
|
5
|
+
import type { Layout } from './layout';
|
|
6
|
+
|
|
7
|
+
const getClasses = ({
|
|
8
|
+
columnBasis, gutters, columnSpacing, autoSizing
|
|
9
|
+
}: Layout) => classNames(
|
|
10
|
+
'control',
|
|
11
|
+
[`column-basis-${columnBasis}`, Boolean(columnBasis)],
|
|
12
|
+
[`gutters-${gutters}`, Boolean(gutters)],
|
|
13
|
+
[`column-spacing-${columnSpacing}`, Boolean(columnSpacing)],
|
|
14
|
+
[`auto-sizing-${autoSizing}`, Boolean(autoSizing)],
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The template for the {@link @vonage/vivid#Layout} component.
|
|
19
|
+
*
|
|
20
|
+
* @returns {ViewTemplate<Layout>} A template capable of creating HTMLView instances or rendering directly to DOM.
|
|
21
|
+
* @public
|
|
22
|
+
*/
|
|
23
|
+
export const layoutTemplate: (
|
|
24
|
+
context: ElementDefinitionContext,
|
|
25
|
+
definition: FoundationElementDefinition
|
|
26
|
+
) => ViewTemplate<Layout> = () => html`
|
|
27
|
+
<div class="${getClasses}">
|
|
28
|
+
<slot></slot>
|
|
29
|
+
</div>`;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { attr } from '@microsoft/fast-element';
|
|
2
|
+
import { FoundationElement } from '@microsoft/fast-foundation';
|
|
3
|
+
import type { Size } from '../enums.js';
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
export enum AUTO_SIZING { Fit = 'fit', Fill = 'fill' }
|
|
7
|
+
type Gutters = Extract<Size, Size.BaseSmall | Size.Base | Size.BaseLarge>;
|
|
8
|
+
type ColumnSpacing = Extract<Size, Size.BaseSmall | Size.Base | Size.BaseLarge>;
|
|
9
|
+
type ColumnBasis = Extract<Size, Size.BaseSmall | Size.Base | Size.BaseLarge> | 'block';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Base class for layout
|
|
13
|
+
*
|
|
14
|
+
* @cssprop [--layout-grid-template-columns=repeat([the `auto-sizing` mapped value],
|
|
15
|
+
* minmax([the `column-basis` mapped value], 1fr))] - Controls the `grid-template-columns` of the layout.
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
18
|
+
export class Layout extends FoundationElement {
|
|
19
|
+
/**
|
|
20
|
+
* sets the initial preferred margin from predefined available options
|
|
21
|
+
*
|
|
22
|
+
* @public
|
|
23
|
+
*/
|
|
24
|
+
@attr gutters?: Gutters;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* sets the initial preferred measure of a column from predefined available options
|
|
28
|
+
*
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
31
|
+
@attr({ attribute: 'column-basis' }) columnBasis?: ColumnBasis;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* sets the initial preferred spacing of a column from predefined available options
|
|
35
|
+
*
|
|
36
|
+
* @public
|
|
37
|
+
*/
|
|
38
|
+
@attr({ attribute: 'column-spacing' }) columnSpacing?: ColumnSpacing;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* sets the initial preferred auto-sizing from predefined available options
|
|
42
|
+
*
|
|
43
|
+
* @public
|
|
44
|
+
*/
|
|
45
|
+
@attr({ attribute: 'auto-sizing' }) autoSizing?: AUTO_SIZING;
|
|
46
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
@function get-default-selector($list, $prefix) {
|
|
2
|
+
$selector: '';
|
|
3
|
+
@each $item in $list {
|
|
4
|
+
$selector: $selector + ':not(#{$prefix}-#{$item})';
|
|
5
|
+
}
|
|
6
|
+
@return $selector;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
@function get-selector-with-default($prefix, $key, $default-key, $all-keys) {
|
|
10
|
+
$selector: '&#{$prefix}-#{$key}';
|
|
11
|
+
@if $key == $default-key {
|
|
12
|
+
$selector: '&#{get-default-selector($all-keys, $prefix)}', $selector;
|
|
13
|
+
}
|
|
14
|
+
@return $selector;
|
|
15
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
$auto-sizing: --_auto-sizing; // interior. not API
|
|
2
|
+
$layout-grid-template-columns: --layout-grid-template-columns;
|
|
3
|
+
|
|
4
|
+
/* #region SIZEs */
|
|
5
|
+
$auto-sizes: (
|
|
6
|
+
fill: auto-fill,
|
|
7
|
+
fit: auto-fit,
|
|
8
|
+
);
|
|
9
|
+
|
|
10
|
+
/* #region BASES */
|
|
11
|
+
$bases: (
|
|
12
|
+
base-small: 10rem,
|
|
13
|
+
base: 20rem,
|
|
14
|
+
base-large: 30rem,
|
|
15
|
+
block: 1fr
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
/* #region SPACES */
|
|
19
|
+
$spaces: (
|
|
20
|
+
base-small: 16px,
|
|
21
|
+
base: 24px,
|
|
22
|
+
base-large: 32px,
|
|
23
|
+
);
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as path from 'path';
|
|
2
|
+
import { expect, test } from '@playwright/test';
|
|
3
|
+
import type { Page } from '@playwright/test';
|
|
4
|
+
import {
|
|
5
|
+
extractHTMLBlocksFromReadme,
|
|
6
|
+
loadComponents,
|
|
7
|
+
loadTemplate
|
|
8
|
+
} from '../../visual-tests/visual-tests-utils.ts';
|
|
9
|
+
|
|
10
|
+
const components = ['layout'];
|
|
11
|
+
test('should show the component', async ({ page }: { page: Page }) => {
|
|
12
|
+
const template = extractHTMLBlocksFromReadme(path.join(new URL('.', import.meta.url).pathname, 'README.md'))
|
|
13
|
+
.reduce((htmlString: string, block: string) => `${htmlString} <div style="margin: 5px;">${block}</div>`, '');
|
|
14
|
+
|
|
15
|
+
await loadComponents({
|
|
16
|
+
page,
|
|
17
|
+
components,
|
|
18
|
+
});
|
|
19
|
+
await loadTemplate({
|
|
20
|
+
page,
|
|
21
|
+
template,
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
const testWrapper = await page.$('#wrapper');
|
|
25
|
+
|
|
26
|
+
await page.waitForLoadState('networkidle');
|
|
27
|
+
|
|
28
|
+
expect(await testWrapper?.screenshot())
|
|
29
|
+
.toMatchSnapshot(
|
|
30
|
+
'./snapshots/layout.png',
|
|
31
|
+
);
|
|
32
|
+
});
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|