@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
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { _ as __decorate, a as attr, b as __metadata, h as html, d as designSystem } from '../shared/index.js';
|
|
2
|
+
import { s as styleInject } from '../shared/style-inject.es.js';
|
|
3
|
+
import { h as classofRaw, _ as _export, f as functionUncurryThis } from '../shared/web.dom-collections.iterator.js';
|
|
4
|
+
import { B as BaseProgress } from '../shared/base-progress.js';
|
|
5
|
+
import { w as when } from '../shared/when.js';
|
|
6
|
+
import { c as classNames } from '../shared/class-names.js';
|
|
7
|
+
|
|
8
|
+
var css_248z = ".base {\n height: 6px;\n align-items: center;\n margin: 0;\n outline: none;\n}\n.base.connotation-cta {\n --connotation: var(--vvd-color-cta);\n --on-connotation: var(--vvd-color-on-cta);\n}\n\n.base:not(.connotation-pacific):not(.connotation-cta):not(.connotation-alert):not(.connotation-success) {\n --connotation: var(--vvd-color-primary);\n --on-connotation: var(--vvd-color-on-primary);\n}\n\n.base.connotation-alert {\n --connotation: var(--vvd-color-alert);\n --on-connotation: var(--vvd-color-on-alert);\n}\n\n.base.connotation-success {\n --connotation: var(--vvd-color-success);\n --on-connotation: var(--vvd-color-on-success);\n}\n\n.base.connotation-pacific {\n --connotation: linear-gradient(to right, var(--vvd-color-info-30), var(--vvd-color-cta-70));\n}\n\n.indeterminate {\n display: flex;\n overflow: hidden;\n width: 100%;\n height: 100%;\n border-radius: 3px;\n}\n\n.progress {\n position: relative;\n display: flex;\n align-items: center;\n background-color: var(--vvd-color-neutral-20);\n block-size: 100%;\n inline-size: 100%;\n}\n.progress .indeterminate {\n background-color: var(--connotation);\n}\n\n.determinate {\n background-color: var(--connotation);\n block-size: 100%;\n border-radius: 3px;\n transition: all 0.2s ease-in-out;\n}\n.connotation-pacific .determinate {\n background-image: var(--connotation);\n}\n\n.indeterminate-indicator-1, .indeterminate-indicator-2 {\n position: absolute;\n animation: indeterminate-1 2s infinite;\n animation-timing-function: cubic-bezier(0.4, 0, 0.6, 1);\n background-color: var(--vvd-color-neutral-20);\n block-size: 100%;\n inline-size: 30%;\n opacity: 0;\n}\n\n.indeterminate-indicator-2 {\n animation: indeterminate-2 2s infinite;\n inline-size: 60%;\n}\n\n.connotation-pacific .indeterminate-indicator-1, .connotation-pacific .indeterminate-indicator-2 {\n background-image: var(--connotation);\n}\n\n.reverse .indeterminate-indicator-1, .reverse .indeterminate-indicator-2 {\n animation-direction: reverse;\n}\n.reverse .determinate {\n position: absolute;\n right: 0;\n}\n\n.base.shape-sharp .determinate, .base.shape-sharp .indeterminate {\n border-radius: 0;\n}\n\n.base.paused .indeterminate-indicator-1,\n.base.paused .indeterminate-indicator-2 {\n animation-play-state: paused;\n background-color: var(--connotation);\n}\n\n.base.paused .determinate {\n background-color: var(--vvd-color-neutral-40);\n}\n\n@keyframes indeterminate-1 {\n 0% {\n opacity: 1;\n transform: translateX(-100%);\n }\n 70% {\n opacity: 1;\n transform: translateX(300%);\n }\n 70.01% {\n opacity: 0;\n }\n 100% {\n opacity: 0;\n transform: translateX(300%);\n }\n}\n@keyframes indeterminate-2 {\n 0% {\n opacity: 0;\n transform: translateX(-150%);\n }\n 29.99% {\n opacity: 0;\n }\n 30% {\n opacity: 1;\n transform: translateX(-150%);\n }\n 100% {\n opacity: 1;\n transform: translateX(166.66%);\n }\n}";
|
|
9
|
+
styleInject(css_248z);
|
|
10
|
+
|
|
11
|
+
var classof = classofRaw;
|
|
12
|
+
|
|
13
|
+
// `IsArray` abstract operation
|
|
14
|
+
// https://tc39.es/ecma262/#sec-isarray
|
|
15
|
+
// eslint-disable-next-line es/no-array-isarray -- safe
|
|
16
|
+
var isArray$1 = Array.isArray || function isArray(argument) {
|
|
17
|
+
return classof(argument) == 'Array';
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
var $ = _export;
|
|
21
|
+
var uncurryThis = functionUncurryThis;
|
|
22
|
+
var isArray = isArray$1;
|
|
23
|
+
|
|
24
|
+
var un$Reverse = uncurryThis([].reverse);
|
|
25
|
+
var test = [1, 2];
|
|
26
|
+
|
|
27
|
+
// `Array.prototype.reverse` method
|
|
28
|
+
// https://tc39.es/ecma262/#sec-array.prototype.reverse
|
|
29
|
+
// fix for Safari 12.0 bug
|
|
30
|
+
// https://bugs.webkit.org/show_bug.cgi?id=188794
|
|
31
|
+
$({ target: 'Array', proto: true, forced: String(test) === String(test.reverse()) }, {
|
|
32
|
+
reverse: function reverse() {
|
|
33
|
+
// eslint-disable-next-line no-self-assign -- dirty hack
|
|
34
|
+
if (isArray(this)) this.length = this.length;
|
|
35
|
+
return un$Reverse(this);
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
class Progress extends BaseProgress {
|
|
40
|
+
constructor() {
|
|
41
|
+
super(...arguments);
|
|
42
|
+
this.reverse = false;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
__decorate([attr(), __metadata("design:type", String)], Progress.prototype, "shape", void 0);
|
|
48
|
+
|
|
49
|
+
__decorate([attr(), __metadata("design:type", String)], Progress.prototype, "connotation", void 0);
|
|
50
|
+
|
|
51
|
+
__decorate([attr({
|
|
52
|
+
mode: 'boolean'
|
|
53
|
+
}), __metadata("design:type", Object)], Progress.prototype, "reverse", void 0);
|
|
54
|
+
|
|
55
|
+
let _2 = t => t,
|
|
56
|
+
_t,
|
|
57
|
+
_t2,
|
|
58
|
+
_t3;
|
|
59
|
+
|
|
60
|
+
const getClasses = _ => classNames('base', [`connotation-${_.connotation}`, !!_.connotation], [`shape-${_.shape}`, !!_.shape], ['reverse', _.reverse]);
|
|
61
|
+
|
|
62
|
+
const ProgressTemplate = _ => {
|
|
63
|
+
return html(_t || (_t = _2`
|
|
64
|
+
<div
|
|
65
|
+
role="progressbar"
|
|
66
|
+
aria-valuenow="${0}"
|
|
67
|
+
aria-valuemin="${0}"
|
|
68
|
+
aria-valuemax="${0}"
|
|
69
|
+
class="${0} ${0}"
|
|
70
|
+
>
|
|
71
|
+
${0}
|
|
72
|
+
${0}
|
|
73
|
+
</div>
|
|
74
|
+
`), x => x.value, x => x.min, x => x.max, x => x.paused ? 'paused' : '', getClasses, when(x => typeof x.value === 'number', html(_t2 || (_t2 = _2`
|
|
75
|
+
<div class="progress">
|
|
76
|
+
<div
|
|
77
|
+
class="determinate"
|
|
78
|
+
style="width: ${0}%"
|
|
79
|
+
></div>
|
|
80
|
+
</div>
|
|
81
|
+
`), x => x.percentComplete)), when(x => typeof x.value !== 'number', html(_t3 || (_t3 = _2`
|
|
82
|
+
<div class="progress indeterminate">
|
|
83
|
+
<span class="indeterminate" name="indeterminate">
|
|
84
|
+
<span class="indeterminate-indicator-1"></span>
|
|
85
|
+
<span class="indeterminate-indicator-2"></span>
|
|
86
|
+
</span>
|
|
87
|
+
</div>
|
|
88
|
+
`))));
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
const vividProgress = Progress.compose({
|
|
92
|
+
baseName: 'progress',
|
|
93
|
+
template: ProgressTemplate,
|
|
94
|
+
styles: css_248z
|
|
95
|
+
});
|
|
96
|
+
designSystem.register(vividProgress());
|
|
97
|
+
|
|
98
|
+
export { vividProgress };
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { _ as __decorate, a as attr, b as __metadata, h as html, d as designSystem } from '../shared/index.js';
|
|
2
|
+
import { s as styleInject } from '../shared/style-inject.es.js';
|
|
3
|
+
import { B as BaseProgress } from '../shared/base-progress.js';
|
|
4
|
+
import { w as when } from '../shared/when.js';
|
|
5
|
+
import { c as classNames } from '../shared/class-names.js';
|
|
6
|
+
|
|
7
|
+
var css_248z = ".base {\n width: 36px;\n height: 36px;\n align-items: center;\n outline: none;\n}\n.base.connotation-cta {\n --connotation: var(--vvd-color-cta);\n --on-connotation: var(--vvd-color-on-cta);\n}\n\n.base:not(.connotation-cta):not(.connotation-alert):not(.connotation-success) {\n --connotation: var(--vvd-color-primary);\n --on-connotation: var(--vvd-color-on-primary);\n}\n\n.base.connotation-alert {\n --connotation: var(--vvd-color-alert);\n --on-connotation: var(--vvd-color-on-alert);\n}\n\n.base.connotation-success {\n --connotation: var(--vvd-color-success);\n --on-connotation: var(--vvd-color-on-success);\n}\n\n.base.base-large {\n width: 48px;\n height: 48px;\n}\n\n.base.base-small {\n width: 24px;\n height: 24px;\n}\n\n.progress {\n width: 100%;\n height: 100%;\n}\n\n.background {\n fill: none;\n stroke: transparent;\n stroke-width: 2px;\n}\n\n.determinate {\n fill: none;\n stroke: var(--connotation);\n stroke-linecap: round;\n stroke-width: 2px;\n transform: rotate(-90deg);\n transform-origin: 50% 50%;\n transition: all 0.2s ease-in-out;\n}\n\n.indeterminate-indicator-1 {\n animation: spin-infinite 2s linear infinite;\n fill: none;\n stroke: var(--connotation);\n stroke-linecap: round;\n stroke-width: 2px;\n transform: rotate(-90deg);\n transform-origin: 50% 50%;\n transition: all 0.2s ease-in-out;\n}\n\n.base.paused .indeterminate-indicator-1 {\n animation-play-state: paused;\n stroke: var(--vvd-color-neutral);\n}\n\n.base.paused .determinate {\n stroke: var(--vvd-color-neutral);\n}\n\n@keyframes spin-infinite {\n 0% {\n stroke-dasharray: 0.01px 43.97px;\n transform: rotate(0deg);\n }\n 50% {\n stroke-dasharray: 21.99px 21.99px;\n transform: rotate(450deg);\n }\n 100% {\n stroke-dasharray: 0.01px 43.97px;\n transform: rotate(1080deg);\n }\n}";
|
|
8
|
+
styleInject(css_248z);
|
|
9
|
+
|
|
10
|
+
class ProgressRing extends BaseProgress {}
|
|
11
|
+
|
|
12
|
+
__decorate([attr(), __metadata("design:type", String)], ProgressRing.prototype, "connotation", void 0);
|
|
13
|
+
|
|
14
|
+
let _2 = t => t,
|
|
15
|
+
_t,
|
|
16
|
+
_t2,
|
|
17
|
+
_t3;
|
|
18
|
+
|
|
19
|
+
const getClasses = _ => classNames('base', [`connotation-${_.connotation}`, !!_.connotation]);
|
|
20
|
+
|
|
21
|
+
const progressSegments = 44;
|
|
22
|
+
const ProgressRingTemplate = _ => html(_t || (_t = _2`
|
|
23
|
+
<div
|
|
24
|
+
role="progressbar"
|
|
25
|
+
aria-valuenow="${0}"
|
|
26
|
+
aria-valuemin="${0}"
|
|
27
|
+
aria-valuemax="${0}"
|
|
28
|
+
class="${0} ${0}"
|
|
29
|
+
>
|
|
30
|
+
${0}
|
|
31
|
+
${0}
|
|
32
|
+
</div>
|
|
33
|
+
`), x => x.value, x => x.min, x => x.max, x => x.paused ? 'paused' : '', getClasses, when(x => typeof x.value === 'number', html(_t2 || (_t2 = _2`
|
|
34
|
+
<svg
|
|
35
|
+
class="progress"
|
|
36
|
+
viewBox="0 0 16 16"
|
|
37
|
+
>
|
|
38
|
+
<circle
|
|
39
|
+
class="background"
|
|
40
|
+
cx="8px"
|
|
41
|
+
cy="8px"
|
|
42
|
+
r="7px"
|
|
43
|
+
></circle>
|
|
44
|
+
<circle
|
|
45
|
+
class="determinate"
|
|
46
|
+
style="stroke-dasharray: ${0}px ${0}px"
|
|
47
|
+
cx="8px"
|
|
48
|
+
cy="8px"
|
|
49
|
+
r="7px"
|
|
50
|
+
></circle>
|
|
51
|
+
</svg>
|
|
52
|
+
`), x => progressSegments * x.percentComplete / 100, progressSegments)), when(x => typeof x.value !== 'number', html(_t3 || (_t3 = _2`
|
|
53
|
+
<svg class="progress" viewBox="0 0 16 16">
|
|
54
|
+
<circle
|
|
55
|
+
class="background"
|
|
56
|
+
cx="8px"
|
|
57
|
+
cy="8px"
|
|
58
|
+
r="7px"
|
|
59
|
+
></circle>
|
|
60
|
+
<circle
|
|
61
|
+
class="indeterminate-indicator-1"
|
|
62
|
+
cx="8px"
|
|
63
|
+
cy="8px"
|
|
64
|
+
r="7px"
|
|
65
|
+
></circle>
|
|
66
|
+
</svg>
|
|
67
|
+
`))));
|
|
68
|
+
|
|
69
|
+
const vividProgressRing = ProgressRing.compose({
|
|
70
|
+
baseName: 'progress-ring',
|
|
71
|
+
template: ProgressRingTemplate,
|
|
72
|
+
styles: css_248z
|
|
73
|
+
});
|
|
74
|
+
designSystem.register(vividProgressRing());
|
|
75
|
+
|
|
76
|
+
export { vividProgressRing };
|
package/shared/_has.js
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
function _isPlaceholder(a) {
|
|
2
|
+
return a != null && typeof a === 'object' && a['@@functional/placeholder'] === true;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Optimized internal one-arity curry function.
|
|
7
|
+
*
|
|
8
|
+
* @private
|
|
9
|
+
* @category Function
|
|
10
|
+
* @param {Function} fn The function to curry.
|
|
11
|
+
* @return {Function} The curried function.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
function _curry1(fn) {
|
|
15
|
+
return function f1(a) {
|
|
16
|
+
if (arguments.length === 0 || _isPlaceholder(a)) {
|
|
17
|
+
return f1;
|
|
18
|
+
} else {
|
|
19
|
+
return fn.apply(this, arguments);
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Optimized internal two-arity curry function.
|
|
26
|
+
*
|
|
27
|
+
* @private
|
|
28
|
+
* @category Function
|
|
29
|
+
* @param {Function} fn The function to curry.
|
|
30
|
+
* @return {Function} The curried function.
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
function _curry2(fn) {
|
|
34
|
+
return function f2(a, b) {
|
|
35
|
+
switch (arguments.length) {
|
|
36
|
+
case 0:
|
|
37
|
+
return f2;
|
|
38
|
+
|
|
39
|
+
case 1:
|
|
40
|
+
return _isPlaceholder(a) ? f2 : _curry1(function (_b) {
|
|
41
|
+
return fn(a, _b);
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
default:
|
|
45
|
+
return _isPlaceholder(a) && _isPlaceholder(b) ? f2 : _isPlaceholder(a) ? _curry1(function (_a) {
|
|
46
|
+
return fn(_a, b);
|
|
47
|
+
}) : _isPlaceholder(b) ? _curry1(function (_b) {
|
|
48
|
+
return fn(a, _b);
|
|
49
|
+
}) : fn(a, b);
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function _has(prop, obj) {
|
|
55
|
+
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export { _curry1 as _, _curry2 as a, _has as b };
|
package/shared/affix.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import './web.dom-collections.iterator.js';
|
|
2
|
+
import { _ as __decorate, a as attr, b as __metadata, h as html } from './index.js';
|
|
3
|
+
import { I as Icon } from './icon.js';
|
|
4
|
+
|
|
5
|
+
let _ = t => t,
|
|
6
|
+
_t;
|
|
7
|
+
class AffixIcon {}
|
|
8
|
+
|
|
9
|
+
__decorate([attr, __metadata("design:type", String)], AffixIcon.prototype, "icon", void 0);
|
|
10
|
+
|
|
11
|
+
class AffixIconWithTrailing extends AffixIcon {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments);
|
|
14
|
+
this.iconTrailing = false;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
__decorate([attr({
|
|
20
|
+
mode: 'boolean',
|
|
21
|
+
attribute: 'icon-trailing'
|
|
22
|
+
}), __metadata("design:type", Object)], AffixIconWithTrailing.prototype, "iconTrailing", void 0);
|
|
23
|
+
|
|
24
|
+
const affixIconTemplateFactory = context => {
|
|
25
|
+
const iconTag = context.tagFor(Icon);
|
|
26
|
+
return icon => icon ? html(_t || (_t = _`<span class="icon"><${0} :type="${0}"></${0}></span>`), iconTag, () => icon, iconTag) : null;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export { AffixIconWithTrailing as A, affixIconTemplateFactory as a, AffixIcon as b };
|
package/shared/anchor.js
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { F as FoundationElement, _ as __decorate, a as attr, o as observable } from './index.js';
|
|
2
|
+
import { a as applyMixins } from './apply-mixins.js';
|
|
3
|
+
import { A as ARIAGlobalStatesAndProperties, S as StartEnd } from './aria-global.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* An Anchor Custom HTML Element.
|
|
7
|
+
* Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a | <a> element }.
|
|
8
|
+
*
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
class Anchor extends FoundationElement {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments);
|
|
14
|
+
/**
|
|
15
|
+
* Overrides the focus call for where delegatesFocus is unsupported.
|
|
16
|
+
* This check works for Chrome, Edge Chromium, FireFox, and Safari
|
|
17
|
+
* Relevant PR on the Firefox browser: https://phabricator.services.mozilla.com/D123858
|
|
18
|
+
*/
|
|
19
|
+
this.handleUnsupportedDelegatesFocus = () => {
|
|
20
|
+
var _a;
|
|
21
|
+
// Check to see if delegatesFocus is supported
|
|
22
|
+
if (window.ShadowRoot &&
|
|
23
|
+
!window.ShadowRoot.prototype.hasOwnProperty("delegatesFocus") && ((_a = this.$fastController.definition.shadowOptions) === null || _a === void 0 ? void 0 : _a.delegatesFocus)) {
|
|
24
|
+
this.focus = () => {
|
|
25
|
+
this.control.focus();
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* @internal
|
|
32
|
+
*/
|
|
33
|
+
connectedCallback() {
|
|
34
|
+
super.connectedCallback();
|
|
35
|
+
this.handleUnsupportedDelegatesFocus();
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
__decorate([
|
|
39
|
+
attr
|
|
40
|
+
], Anchor.prototype, "download", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
attr
|
|
43
|
+
], Anchor.prototype, "href", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
attr
|
|
46
|
+
], Anchor.prototype, "hreflang", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
attr
|
|
49
|
+
], Anchor.prototype, "ping", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
attr
|
|
52
|
+
], Anchor.prototype, "referrerpolicy", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
attr
|
|
55
|
+
], Anchor.prototype, "rel", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
attr
|
|
58
|
+
], Anchor.prototype, "target", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
attr
|
|
61
|
+
], Anchor.prototype, "type", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
observable
|
|
64
|
+
], Anchor.prototype, "defaultSlottedContent", void 0);
|
|
65
|
+
/**
|
|
66
|
+
* Includes ARIA states and properties relating to the ARIA link role
|
|
67
|
+
*
|
|
68
|
+
* @public
|
|
69
|
+
*/
|
|
70
|
+
class DelegatesARIALink {
|
|
71
|
+
}
|
|
72
|
+
__decorate([
|
|
73
|
+
attr({ attribute: "aria-expanded" })
|
|
74
|
+
], DelegatesARIALink.prototype, "ariaExpanded", void 0);
|
|
75
|
+
applyMixins(DelegatesARIALink, ARIAGlobalStatesAndProperties);
|
|
76
|
+
applyMixins(Anchor, StartEnd, DelegatesARIALink);
|
|
77
|
+
|
|
78
|
+
export { Anchor as A, DelegatesARIALink as D };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Apply mixins to a constructor.
|
|
3
|
+
* Sourced from {@link https://www.typescriptlang.org/docs/handbook/mixins.html | TypeScript Documentation }.
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
function applyMixins(derivedCtor, ...baseCtors) {
|
|
7
|
+
baseCtors.forEach(baseCtor => {
|
|
8
|
+
Object.getOwnPropertyNames(baseCtor.prototype).forEach(name => {
|
|
9
|
+
if (name !== "constructor") {
|
|
10
|
+
Object.defineProperty(derivedCtor.prototype, name,
|
|
11
|
+
/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */
|
|
12
|
+
Object.getOwnPropertyDescriptor(baseCtor.prototype, name));
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
if (baseCtor.attributes) {
|
|
16
|
+
const existing = derivedCtor.attributes || [];
|
|
17
|
+
derivedCtor.attributes = existing.concat(baseCtor.attributes);
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { applyMixins as a };
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { A as AttachedBehaviorHTMLDirective, h as html, _ as __decorate, a as attr } from './index.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The runtime behavior for template references.
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
class RefBehavior {
|
|
8
|
+
/**
|
|
9
|
+
* Creates an instance of RefBehavior.
|
|
10
|
+
* @param target - The element to reference.
|
|
11
|
+
* @param propertyName - The name of the property to assign the reference to.
|
|
12
|
+
*/
|
|
13
|
+
constructor(target, propertyName) {
|
|
14
|
+
this.target = target;
|
|
15
|
+
this.propertyName = propertyName;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Bind this behavior to the source.
|
|
19
|
+
* @param source - The source to bind to.
|
|
20
|
+
* @param context - The execution context that the binding is operating within.
|
|
21
|
+
*/
|
|
22
|
+
bind(source) {
|
|
23
|
+
source[this.propertyName] = this.target;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Unbinds this behavior from the source.
|
|
27
|
+
* @param source - The source to unbind from.
|
|
28
|
+
*/
|
|
29
|
+
/* eslint-disable-next-line @typescript-eslint/no-empty-function */
|
|
30
|
+
unbind() { }
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* A directive that observes the updates a property with a reference to the element.
|
|
34
|
+
* @param propertyName - The name of the property to assign the reference to.
|
|
35
|
+
* @public
|
|
36
|
+
*/
|
|
37
|
+
function ref(propertyName) {
|
|
38
|
+
return new AttachedBehaviorHTMLDirective("fast-ref", RefBehavior, propertyName);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* A mixin class implementing start and end elements.
|
|
43
|
+
* These are generally used to decorate text elements with icons or other visual indicators.
|
|
44
|
+
* @public
|
|
45
|
+
*/
|
|
46
|
+
class StartEnd {
|
|
47
|
+
handleStartContentChange() {
|
|
48
|
+
this.startContainer.classList.toggle("start", this.start.assignedNodes().length > 0);
|
|
49
|
+
}
|
|
50
|
+
handleEndContentChange() {
|
|
51
|
+
this.endContainer.classList.toggle("end", this.end.assignedNodes().length > 0);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* The template for the end element.
|
|
56
|
+
* For use with {@link StartEnd}
|
|
57
|
+
*
|
|
58
|
+
* @public
|
|
59
|
+
* @deprecated - use endSlotTemplate
|
|
60
|
+
*/
|
|
61
|
+
html `
|
|
62
|
+
<span part="end" ${ref("endContainer")}>
|
|
63
|
+
<slot
|
|
64
|
+
name="end"
|
|
65
|
+
${ref("end")}
|
|
66
|
+
@slotchange="${x => x.handleEndContentChange()}"
|
|
67
|
+
></slot>
|
|
68
|
+
</span>
|
|
69
|
+
`;
|
|
70
|
+
/**
|
|
71
|
+
* The template for the start element.
|
|
72
|
+
* For use with {@link StartEnd}
|
|
73
|
+
*
|
|
74
|
+
* @public
|
|
75
|
+
* @deprecated - use startSlotTemplate
|
|
76
|
+
*/
|
|
77
|
+
html `
|
|
78
|
+
<span part="start" ${ref("startContainer")}>
|
|
79
|
+
<slot
|
|
80
|
+
name="start"
|
|
81
|
+
${ref("start")}
|
|
82
|
+
@slotchange="${x => x.handleStartContentChange()}"
|
|
83
|
+
></slot>
|
|
84
|
+
</span>
|
|
85
|
+
`;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Some states and properties are applicable to all host language elements regardless of whether a role is applied.
|
|
89
|
+
* The following global states and properties are supported by all roles and by all base markup elements.
|
|
90
|
+
* {@link https://www.w3.org/TR/wai-aria-1.1/#global_states}
|
|
91
|
+
*
|
|
92
|
+
* This is intended to be used as a mixin. Be sure you extend FASTElement.
|
|
93
|
+
*
|
|
94
|
+
* @public
|
|
95
|
+
*/
|
|
96
|
+
class ARIAGlobalStatesAndProperties {
|
|
97
|
+
}
|
|
98
|
+
__decorate([
|
|
99
|
+
attr({ attribute: "aria-atomic" })
|
|
100
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaAtomic", void 0);
|
|
101
|
+
__decorate([
|
|
102
|
+
attr({ attribute: "aria-busy" })
|
|
103
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaBusy", void 0);
|
|
104
|
+
__decorate([
|
|
105
|
+
attr({ attribute: "aria-controls" })
|
|
106
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaControls", void 0);
|
|
107
|
+
__decorate([
|
|
108
|
+
attr({ attribute: "aria-current" })
|
|
109
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaCurrent", void 0);
|
|
110
|
+
__decorate([
|
|
111
|
+
attr({ attribute: "aria-describedby" })
|
|
112
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaDescribedby", void 0);
|
|
113
|
+
__decorate([
|
|
114
|
+
attr({ attribute: "aria-details" })
|
|
115
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaDetails", void 0);
|
|
116
|
+
__decorate([
|
|
117
|
+
attr({ attribute: "aria-disabled" })
|
|
118
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaDisabled", void 0);
|
|
119
|
+
__decorate([
|
|
120
|
+
attr({ attribute: "aria-errormessage" })
|
|
121
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaErrormessage", void 0);
|
|
122
|
+
__decorate([
|
|
123
|
+
attr({ attribute: "aria-flowto" })
|
|
124
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaFlowto", void 0);
|
|
125
|
+
__decorate([
|
|
126
|
+
attr({ attribute: "aria-haspopup" })
|
|
127
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaHaspopup", void 0);
|
|
128
|
+
__decorate([
|
|
129
|
+
attr({ attribute: "aria-hidden" })
|
|
130
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaHidden", void 0);
|
|
131
|
+
__decorate([
|
|
132
|
+
attr({ attribute: "aria-invalid" })
|
|
133
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaInvalid", void 0);
|
|
134
|
+
__decorate([
|
|
135
|
+
attr({ attribute: "aria-keyshortcuts" })
|
|
136
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaKeyshortcuts", void 0);
|
|
137
|
+
__decorate([
|
|
138
|
+
attr({ attribute: "aria-label" })
|
|
139
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaLabel", void 0);
|
|
140
|
+
__decorate([
|
|
141
|
+
attr({ attribute: "aria-labelledby" })
|
|
142
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaLabelledby", void 0);
|
|
143
|
+
__decorate([
|
|
144
|
+
attr({ attribute: "aria-live" })
|
|
145
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaLive", void 0);
|
|
146
|
+
__decorate([
|
|
147
|
+
attr({ attribute: "aria-owns" })
|
|
148
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaOwns", void 0);
|
|
149
|
+
__decorate([
|
|
150
|
+
attr({ attribute: "aria-relevant" })
|
|
151
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaRelevant", void 0);
|
|
152
|
+
__decorate([
|
|
153
|
+
attr({ attribute: "aria-roledescription" })
|
|
154
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaRoledescription", void 0);
|
|
155
|
+
|
|
156
|
+
export { ARIAGlobalStatesAndProperties as A, StartEnd as S, ref as r };
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { F as FoundationElement, _ as __decorate, a as attr, n as nullableNumberConverter, o as observable } from './index.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* An Progress HTML Element.
|
|
5
|
+
* Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#progressbar | ARIA progressbar }.
|
|
6
|
+
*
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
class BaseProgress extends FoundationElement {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
/**
|
|
13
|
+
* Indicates progress in %
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
|
+
this.percentComplete = 0;
|
|
17
|
+
}
|
|
18
|
+
valueChanged() {
|
|
19
|
+
if (this.$fastController.isConnected) {
|
|
20
|
+
this.updatePercentComplete();
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
minChanged() {
|
|
24
|
+
if (this.$fastController.isConnected) {
|
|
25
|
+
this.updatePercentComplete();
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
maxChanged() {
|
|
29
|
+
if (this.$fastController.isConnected) {
|
|
30
|
+
this.updatePercentComplete();
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* @internal
|
|
35
|
+
*/
|
|
36
|
+
connectedCallback() {
|
|
37
|
+
super.connectedCallback();
|
|
38
|
+
this.updatePercentComplete();
|
|
39
|
+
}
|
|
40
|
+
updatePercentComplete() {
|
|
41
|
+
const min = typeof this.min === "number" ? this.min : 0;
|
|
42
|
+
const max = typeof this.max === "number" ? this.max : 100;
|
|
43
|
+
const value = typeof this.value === "number" ? this.value : 0;
|
|
44
|
+
const range = max - min;
|
|
45
|
+
this.percentComplete =
|
|
46
|
+
range === 0 ? 0 : Math.fround(((value - min) / range) * 100);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
__decorate([
|
|
50
|
+
attr({ converter: nullableNumberConverter })
|
|
51
|
+
], BaseProgress.prototype, "value", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
attr({ converter: nullableNumberConverter })
|
|
54
|
+
], BaseProgress.prototype, "min", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
attr({ converter: nullableNumberConverter })
|
|
57
|
+
], BaseProgress.prototype, "max", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
attr({ mode: "boolean" })
|
|
60
|
+
], BaseProgress.prototype, "paused", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
observable
|
|
63
|
+
], BaseProgress.prototype, "percentComplete", void 0);
|
|
64
|
+
|
|
65
|
+
export { BaseProgress as B };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { _ as __decorate, o as observable } from './index.js';
|
|
2
|
+
import { A as Anchor, D as DelegatesARIALink } from './anchor.js';
|
|
3
|
+
import { a as applyMixins } from './apply-mixins.js';
|
|
4
|
+
import { S as StartEnd } from './aria-global.js';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A Breadcrumb Item Custom HTML Element.
|
|
8
|
+
*
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
class BreadcrumbItem extends Anchor {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments);
|
|
14
|
+
/**
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
this.separator = true;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
__decorate([
|
|
21
|
+
observable
|
|
22
|
+
], BreadcrumbItem.prototype, "separator", void 0);
|
|
23
|
+
applyMixins(BreadcrumbItem, StartEnd, DelegatesARIALink);
|
|
24
|
+
|
|
25
|
+
export { BreadcrumbItem as B };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
function classNames(...args) {
|
|
2
|
+
return args.reduce((accum, value) => {
|
|
3
|
+
const leadingChar = accum.length ? " " : "";
|
|
4
|
+
const normalizedValue = Array.isArray(value) && value[1]
|
|
5
|
+
? classNames.call(null, value[0])
|
|
6
|
+
: typeof value === "function"
|
|
7
|
+
? value()
|
|
8
|
+
: typeof value === "string"
|
|
9
|
+
? value
|
|
10
|
+
: "";
|
|
11
|
+
return !normalizedValue.length ? accum : accum + leadingChar + normalizedValue;
|
|
12
|
+
}, "");
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export { classNames as c };
|