@financial-times/x-topic-search 6.8.0 → 8.0.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/dist/TopicSearch.cjs.js +11 -14
- package/dist/TopicSearch.es5.js +11 -14
- package/dist/TopicSearch.esm.js +11 -14
- package/package.json +19 -9
- package/storybook/index.jsx +3 -4
- package/.bowerrc +0 -8
- package/bower.json +0 -11
- package/bower_components/fontfaceobserver/LICENSE +0 -23
- package/bower_components/fontfaceobserver/README.md +0 -165
- package/bower_components/fontfaceobserver/externs.js +0 -15
- package/bower_components/fontfaceobserver/fontfaceobserver.js +0 -12
- package/bower_components/fontfaceobserver/fontfaceobserver.standalone.js +0 -8
- package/bower_components/fontfaceobserver/package.json +0 -57
- package/bower_components/fontfaceobserver/src/descriptors.js +0 -10
- package/bower_components/fontfaceobserver/src/observer.js +0 -348
- package/bower_components/fontfaceobserver/src/ruler.js +0 -130
- package/bower_components/fticons/.bower.json +0 -14
- package/bower_components/fticons/.github/CODEOWNERS +0 -7
- package/bower_components/fticons/.github/ISSUE_TEMPLATE.md +0 -37
- package/bower_components/fticons/.github/PULL_REQUEST_TEMPLATE.md +0 -25
- package/bower_components/fticons/.github/workflows/add-new-issues-and-pull-requests-to-origami-project-board.yml +0 -15
- package/bower_components/fticons/.github/workflows/apply-labels.yml +0 -13
- package/bower_components/fticons/.github/workflows/auto-approve.yml +0 -23
- package/bower_components/fticons/.github/workflows/automatic-tag-and-release.yml +0 -21
- package/bower_components/fticons/.github/workflows/publish.yml +0 -26
- package/bower_components/fticons/.github/workflows/sync-repo-labels.yml +0 -12
- package/bower_components/fticons/README.md +0 -89
- package/bower_components/fticons/bower.json +0 -3
- package/bower_components/fticons/contributing.md +0 -77
- package/bower_components/fticons/imageset.json +0 -542
- package/bower_components/fticons/origami.json +0 -12
- package/bower_components/fticons/package-lock.json +0 -5481
- package/bower_components/fticons/package.json +0 -17
- package/bower_components/fticons/svg/arrow-down.svg +0 -1
- package/bower_components/fticons/svg/arrow-left.svg +0 -1
- package/bower_components/fticons/svg/arrow-right.svg +0 -1
- package/bower_components/fticons/svg/arrow-up.svg +0 -1
- package/bower_components/fticons/svg/arrows-left-right.svg +0 -1
- package/bower_components/fticons/svg/arrows-up-down.svg +0 -1
- package/bower_components/fticons/svg/audio.svg +0 -1
- package/bower_components/fticons/svg/book.svg +0 -1
- package/bower_components/fticons/svg/bookmark-outline.svg +0 -1
- package/bower_components/fticons/svg/bookmark.svg +0 -1
- package/bower_components/fticons/svg/circle.svg +0 -1
- package/bower_components/fticons/svg/corporate.svg +0 -1
- package/bower_components/fticons/svg/cross.svg +0 -1
- package/bower_components/fticons/svg/data.svg +0 -1
- package/bower_components/fticons/svg/dollar.svg +0 -1
- package/bower_components/fticons/svg/download.svg +0 -1
- package/bower_components/fticons/svg/edit.svg +0 -1
- package/bower_components/fticons/svg/first.svg +0 -1
- package/bower_components/fticons/svg/gift.svg +0 -1
- package/bower_components/fticons/svg/grid.svg +0 -1
- package/bower_components/fticons/svg/hamburger.svg +0 -1
- package/bower_components/fticons/svg/info.svg +0 -1
- package/bower_components/fticons/svg/ipad.svg +0 -1
- package/bower_components/fticons/svg/label-outline.svg +0 -1
- package/bower_components/fticons/svg/label.svg +0 -1
- package/bower_components/fticons/svg/last.svg +0 -1
- package/bower_components/fticons/svg/link.svg +0 -1
- package/bower_components/fticons/svg/list.svg +0 -1
- package/bower_components/fticons/svg/lock.svg +0 -1
- package/bower_components/fticons/svg/mail.svg +0 -1
- package/bower_components/fticons/svg/minus.svg +0 -1
- package/bower_components/fticons/svg/more.svg +0 -1
- package/bower_components/fticons/svg/mute-notifications.svg +0 -1
- package/bower_components/fticons/svg/mute.svg +0 -1
- package/bower_components/fticons/svg/mute_notifications.svg +0 -1
- package/bower_components/fticons/svg/newspaper.svg +0 -1
- package/bower_components/fticons/svg/notifications.svg +0 -1
- package/bower_components/fticons/svg/outside-page.svg +0 -1
- package/bower_components/fticons/svg/pause.svg +0 -1
- package/bower_components/fticons/svg/phone.svg +0 -1
- package/bower_components/fticons/svg/pin.svg +0 -1
- package/bower_components/fticons/svg/play.svg +0 -1
- package/bower_components/fticons/svg/plus.svg +0 -1
- package/bower_components/fticons/svg/podcast.svg +0 -1
- package/bower_components/fticons/svg/print.svg +0 -1
- package/bower_components/fticons/svg/refresh.svg +0 -1
- package/bower_components/fticons/svg/restore.svg +0 -1
- package/bower_components/fticons/svg/scroll-to.svg +0 -1
- package/bower_components/fticons/svg/search.svg +0 -1
- package/bower_components/fticons/svg/series.svg +0 -1
- package/bower_components/fticons/svg/settings.svg +0 -1
- package/bower_components/fticons/svg/share.svg +0 -1
- package/bower_components/fticons/svg/skip-backward-30.svg +0 -1
- package/bower_components/fticons/svg/skip-forward-30.svg +0 -1
- package/bower_components/fticons/svg/speech-left.svg +0 -1
- package/bower_components/fticons/svg/speech-right.svg +0 -1
- package/bower_components/fticons/svg/speech.svg +0 -1
- package/bower_components/fticons/svg/stop.svg +0 -1
- package/bower_components/fticons/svg/tick.svg +0 -1
- package/bower_components/fticons/svg/trash.svg +0 -1
- package/bower_components/fticons/svg/upload.svg +0 -1
- package/bower_components/fticons/svg/user.svg +0 -1
- package/bower_components/fticons/svg/users.svg +0 -1
- package/bower_components/fticons/svg/video.svg +0 -1
- package/bower_components/fticons/svg/warning-alt.svg +0 -1
- package/bower_components/fticons/svg/warning.svg +0 -1
- package/bower_components/fticons/svg/written-text.svg +0 -1
- package/bower_components/mathsass/dist/_constants.scss +0 -5
- package/bower_components/mathsass/dist/_math.scss +0 -45
- package/bower_components/mathsass/dist/functions/_acos.scss +0 -12
- package/bower_components/mathsass/dist/functions/_asin.scss +0 -12
- package/bower_components/mathsass/dist/functions/_atan.scss +0 -28
- package/bower_components/mathsass/dist/functions/_atan2.scss +0 -37
- package/bower_components/mathsass/dist/functions/_cos.scss +0 -15
- package/bower_components/mathsass/dist/functions/_cot.scss +0 -9
- package/bower_components/mathsass/dist/functions/_csc.scss +0 -9
- package/bower_components/mathsass/dist/functions/_exp.scss +0 -8
- package/bower_components/mathsass/dist/functions/_fact.scss +0 -18
- package/bower_components/mathsass/dist/functions/_frexp.scss +0 -21
- package/bower_components/mathsass/dist/functions/_ldexp.scss +0 -17
- package/bower_components/mathsass/dist/functions/_log.scss +0 -36
- package/bower_components/mathsass/dist/functions/_pow.scss +0 -44
- package/bower_components/mathsass/dist/functions/_sec.scss +0 -9
- package/bower_components/mathsass/dist/functions/_sin.scss +0 -9
- package/bower_components/mathsass/dist/functions/_sqrt.scss +0 -16
- package/bower_components/mathsass/dist/functions/_tan.scss +0 -9
- package/bower_components/mathsass/dist/helpers/_deg-to-rad.scss +0 -4
- package/bower_components/mathsass/dist/helpers/_rad-to-deg.scss +0 -4
- package/bower_components/mathsass/dist/helpers/_strip-unit.scss +0 -8
- package/bower_components/mathsass/dist/helpers/_unitless-rad.scss +0 -13
- package/bower_components/mathsass/package.json +0 -58
- package/bower_components/o-assets/.bower.json +0 -23
- package/bower_components/o-assets/.eslintrc.js +0 -3
- package/bower_components/o-assets/.github/CODEOWNERS +0 -7
- package/bower_components/o-assets/.github/ISSUE_TEMPLATE.md +0 -37
- package/bower_components/o-assets/.github/dependabot.yml +0 -21
- package/bower_components/o-assets/.github/workflows/add-new-issues-and-pull-requests-to-origami-project-board.yml +0 -16
- package/bower_components/o-assets/.github/workflows/apply-labels.yml +0 -14
- package/bower_components/o-assets/.github/workflows/auto-approve.yml +0 -12
- package/bower_components/o-assets/.github/workflows/automatic-tag-and-release.yml +0 -21
- package/bower_components/o-assets/.github/workflows/automerge.yml +0 -40
- package/bower_components/o-assets/.github/workflows/release-origami-component.yml +0 -29
- package/bower_components/o-assets/.github/workflows/sync-repo-labels.yml +0 -13
- package/bower_components/o-assets/.github/workflows/test-origami-component.yml +0 -22
- package/bower_components/o-assets/.remarkrc.js +0 -1
- package/bower_components/o-assets/.stylelintrc.js +0 -3
- package/bower_components/o-assets/README.md +0 -118
- package/bower_components/o-assets/bower.json +0 -12
- package/bower_components/o-assets/main.js +0 -61
- package/bower_components/o-assets/main.scss +0 -59
- package/bower_components/o-assets/origami.json +0 -13
- package/bower_components/o-brand/.bower.json +0 -23
- package/bower_components/o-brand/README.md +0 -259
- package/bower_components/o-brand/bower.json +0 -12
- package/bower_components/o-brand/main.scss +0 -4
- package/bower_components/o-brand/origami.json +0 -13
- package/bower_components/o-brand/package-lock.json +0 -1810
- package/bower_components/o-brand/package.json +0 -10
- package/bower_components/o-brand/scss/_mixins.scss +0 -42
- package/bower_components/o-brand/scss/_private-functions.scss +0 -169
- package/bower_components/o-brand/scss/_public-functions.scss +0 -131
- package/bower_components/o-brand/scss/_variables.scss +0 -13
- package/bower_components/o-colors/.bower.json +0 -25
- package/bower_components/o-colors/.eslintrc.js +0 -3
- package/bower_components/o-colors/.github/CODEOWNERS +0 -7
- package/bower_components/o-colors/.github/ISSUE_TEMPLATE.md +0 -37
- package/bower_components/o-colors/.github/workflows/add-new-issues-and-pull-requests-to-origami-project-board.yml +0 -15
- package/bower_components/o-colors/.github/workflows/apply-labels.yml +0 -13
- package/bower_components/o-colors/.github/workflows/auto-approve.yml +0 -23
- package/bower_components/o-colors/.github/workflows/automatic-tag-and-release.yml +0 -21
- package/bower_components/o-colors/.github/workflows/percy.yml +0 -35
- package/bower_components/o-colors/.github/workflows/release-origami-component.yml +0 -29
- package/bower_components/o-colors/.github/workflows/sync-repo-labels.yml +0 -12
- package/bower_components/o-colors/.github/workflows/test-origami-component.yml +0 -22
- package/bower_components/o-colors/.remarkrc.js +0 -1
- package/bower_components/o-colors/.stylelintrc.js +0 -3
- package/bower_components/o-colors/MIGRATION.md +0 -373
- package/bower_components/o-colors/README.md +0 -352
- package/bower_components/o-colors/app.json +0 -12
- package/bower_components/o-colors/bower.json +0 -14
- package/bower_components/o-colors/demos/src/b2c-palette.mustache +0 -10
- package/bower_components/o-colors/demos/src/brand-palette.mustache +0 -10
- package/bower_components/o-colors/demos/src/color-mixer/color-mixer.js +0 -61
- package/bower_components/o-colors/demos/src/color-mixer/color-mixer.scss +0 -73
- package/bower_components/o-colors/demos/src/color-mixer/index.mustache +0 -88
- package/bower_components/o-colors/demos/src/color-mixer/select-options.mustache +0 -11
- package/bower_components/o-colors/demos/src/contrast-checker/contrast-checker.js +0 -88
- package/bower_components/o-colors/demos/src/contrast-checker/contrast-checker.scss +0 -223
- package/bower_components/o-colors/demos/src/contrast-checker/fieldsets/background.mustache +0 -28
- package/bower_components/o-colors/demos/src/contrast-checker/fieldsets/foreground.mustache +0 -28
- package/bower_components/o-colors/demos/src/contrast-checker/fieldsets/mixer.mustache +0 -78
- package/bower_components/o-colors/demos/src/contrast-checker/index.mustache +0 -51
- package/bower_components/o-colors/demos/src/demo.js +0 -58
- package/bower_components/o-colors/demos/src/demo.scss +0 -142
- package/bower_components/o-colors/demos/src/pa11y.mustache +0 -78
- package/bower_components/o-colors/demos/src/palettes/internal-palette.json +0 -37
- package/bower_components/o-colors/demos/src/palettes/master-palette.json +0 -55
- package/bower_components/o-colors/demos/src/palettes/whitelabel-palette.json +0 -25
- package/bower_components/o-colors/demos/src/partner-content-palette.mustache +0 -10
- package/bower_components/o-colors/demos/src/primary-palette.mustache +0 -10
- package/bower_components/o-colors/demos/src/secondary-palette.mustache +0 -10
- package/bower_components/o-colors/demos/src/shared/colors-mix.js +0 -39
- package/bower_components/o-colors/demos/src/shared/contrast-ratio.js +0 -76
- package/bower_components/o-colors/demos/src/tertiary-palette.mustache +0 -10
- package/bower_components/o-colors/demos/src/tones-mixes.mustache +0 -26
- package/bower_components/o-colors/main.scss +0 -104
- package/bower_components/o-colors/origami.json +0 -264
- package/bower_components/o-colors/package.json +0 -18
- package/bower_components/o-colors/src/scss/_functions.scss +0 -459
- package/bower_components/o-colors/src/scss/_mixins.scss +0 -216
- package/bower_components/o-colors/src/scss/_palette.scss +0 -113
- package/bower_components/o-colors/src/scss/_use-cases.scss +0 -96
- package/bower_components/o-colors/src/scss/_variables.scss +0 -66
- package/bower_components/o-editorial-typography/.bower.json +0 -31
- package/bower_components/o-editorial-typography/README.md +0 -213
- package/bower_components/o-editorial-typography/bower.json +0 -20
- package/bower_components/o-editorial-typography/demos/src/body.mustache +0 -1
- package/bower_components/o-editorial-typography/demos/src/byline.mustache +0 -4
- package/bower_components/o-editorial-typography/demos/src/caption.mustache +0 -6
- package/bower_components/o-editorial-typography/demos/src/demo.scss +0 -8
- package/bower_components/o-editorial-typography/demos/src/headings.mustache +0 -5
- package/bower_components/o-editorial-typography/demos/src/headline.mustache +0 -1
- package/bower_components/o-editorial-typography/demos/src/ordered-list.mustache +0 -5
- package/bower_components/o-editorial-typography/demos/src/pa11y.mustache +0 -33
- package/bower_components/o-editorial-typography/demos/src/standfirst.mustache +0 -3
- package/bower_components/o-editorial-typography/demos/src/topic-tag.mustache +0 -1
- package/bower_components/o-editorial-typography/demos/src/unordered-list.mustache +0 -5
- package/bower_components/o-editorial-typography/main.scss +0 -143
- package/bower_components/o-editorial-typography/origami.json +0 -86
- package/bower_components/o-editorial-typography/package-lock.json +0 -1743
- package/bower_components/o-editorial-typography/package.json +0 -8
- package/bower_components/o-editorial-typography/src/scss/_brand.scss +0 -12
- package/bower_components/o-editorial-typography/src/scss/_functions.scss +0 -0
- package/bower_components/o-editorial-typography/src/scss/_mixins.scss +0 -242
- package/bower_components/o-editorial-typography/src/scss/_variables.scss +0 -9
- package/bower_components/o-fonts/.bower.json +0 -23
- package/bower_components/o-fonts/.eslintrc.js +0 -3
- package/bower_components/o-fonts/.github/CODEOWNERS +0 -7
- package/bower_components/o-fonts/.github/ISSUE_TEMPLATE.md +0 -37
- package/bower_components/o-fonts/.github/dependabot.yml +0 -21
- package/bower_components/o-fonts/.github/workflows/add-new-issues-and-pull-requests-to-origami-project-board.yml +0 -15
- package/bower_components/o-fonts/.github/workflows/apply-labels.yml +0 -13
- package/bower_components/o-fonts/.github/workflows/auto-approve.yml +0 -23
- package/bower_components/o-fonts/.github/workflows/automatic-tag-and-release.yml +0 -21
- package/bower_components/o-fonts/.github/workflows/release-origami-component.yml +0 -29
- package/bower_components/o-fonts/.github/workflows/sync-repo-labels.yml +0 -12
- package/bower_components/o-fonts/.github/workflows/test-origami-component.yml +0 -22
- package/bower_components/o-fonts/.stylelintrc.js +0 -3
- package/bower_components/o-fonts/MIGRATION.md +0 -32
- package/bower_components/o-fonts/README.md +0 -234
- package/bower_components/o-fonts/app.json +0 -12
- package/bower_components/o-fonts/bower.json +0 -12
- package/bower_components/o-fonts/demos/src/demo.scss +0 -47
- package/bower_components/o-fonts/demos/src/family.mustache +0 -20
- package/bower_components/o-fonts/main.scss +0 -61
- package/bower_components/o-fonts/origami.json +0 -49
- package/bower_components/o-fonts/package-lock.json +0 -1870
- package/bower_components/o-fonts/package.json +0 -14
- package/bower_components/o-fonts/src/scss/_functions.scss +0 -166
- package/bower_components/o-fonts/src/scss/_mixins.scss +0 -169
- package/bower_components/o-fonts/src/scss/_variables.scss +0 -149
- package/bower_components/o-fonts/test/scss/_functions.test.scss +0 -92
- package/bower_components/o-fonts/test/scss/_mixins.test.scss +0 -201
- package/bower_components/o-fonts/test/scss/index.test.scss +0 -6
- package/bower_components/o-grid/.bower.json +0 -21
- package/bower_components/o-grid/.eslintignore +0 -1
- package/bower_components/o-grid/.eslintrc.js +0 -3
- package/bower_components/o-grid/.github/CODEOWNERS +0 -7
- package/bower_components/o-grid/.github/ISSUE_TEMPLATE.md +0 -37
- package/bower_components/o-grid/.github/workflows/add-new-issues-and-pull-requests-to-origami-project-board.yml +0 -15
- package/bower_components/o-grid/.github/workflows/apply-labels.yml +0 -13
- package/bower_components/o-grid/.github/workflows/auto-approve.yml +0 -23
- package/bower_components/o-grid/.github/workflows/automatic-tag-and-release.yml +0 -21
- package/bower_components/o-grid/.github/workflows/percy.yml +0 -35
- package/bower_components/o-grid/.github/workflows/release-origami-component.yml +0 -29
- package/bower_components/o-grid/.github/workflows/sync-repo-labels.yml +0 -12
- package/bower_components/o-grid/.github/workflows/test-origami-component.yml +0 -22
- package/bower_components/o-grid/.stylelintrc.js +0 -3
- package/bower_components/o-grid/MIGRATION.md +0 -49
- package/bower_components/o-grid/README.md +0 -746
- package/bower_components/o-grid/app.json +0 -12
- package/bower_components/o-grid/bookmarklet/bookmarklet.css +0 -116
- package/bower_components/o-grid/bookmarklet/bookmarklet.js +0 -185
- package/bower_components/o-grid/bower.json +0 -10
- package/bower_components/o-grid/demos/src/configurations.json +0 -6
- package/bower_components/o-grid/demos/src/js/almost-equal.js +0 -16
- package/bower_components/o-grid/demos/src/js/layout-change-events.js +0 -5
- package/bower_components/o-grid/demos/src/js/style-switcher.js +0 -239
- package/bower_components/o-grid/demos/src/layout.mustache +0 -234
- package/bower_components/o-grid/demos/src/scss/_common.scss +0 -8
- package/bower_components/o-grid/demos/src/scss/_demos.scss +0 -74
- package/bower_components/o-grid/demos/src/scss/always-fixed.scss +0 -8
- package/bower_components/o-grid/demos/src/scss/default.scss +0 -31
- package/bower_components/o-grid/demos/src/scss/resized.scss +0 -13
- package/bower_components/o-grid/demos/src/scss/snappy.scss +0 -7
- package/bower_components/o-grid/demos/src/test.mustache +0 -269
- package/bower_components/o-grid/img/grid-system.png +0 -0
- package/bower_components/o-grid/main.js +0 -132
- package/bower_components/o-grid/main.scss +0 -150
- package/bower_components/o-grid/origami.json +0 -62
- package/bower_components/o-grid/package-lock.json +0 -1848
- package/bower_components/o-grid/package.json +0 -15
- package/bower_components/o-grid/src/scss/_functions.scss +0 -90
- package/bower_components/o-grid/src/scss/_mixins.scss +0 -500
- package/bower_components/o-grid/src/scss/_variables.scss +0 -85
- package/bower_components/o-grid/test/scss/_base-grid.test.scss +0 -282
- package/bower_components/o-grid/test/scss/_fixed-grid.test.scss +0 -132
- package/bower_components/o-grid/test/scss/_fluid-grid.test.scss +0 -356
- package/bower_components/o-grid/test/scss/index.test.scss +0 -7
- package/bower_components/o-icons/.bower.json +0 -24
- package/bower_components/o-icons/.eslintrc.js +0 -3
- package/bower_components/o-icons/.github/CODEOWNERS +0 -7
- package/bower_components/o-icons/.github/ISSUE_TEMPLATE.md +0 -37
- package/bower_components/o-icons/.github/dependabot.yml +0 -21
- package/bower_components/o-icons/.github/workflows/add-new-issues-and-pull-requests-to-origami-project-board.yml +0 -15
- package/bower_components/o-icons/.github/workflows/apply-labels.yml +0 -13
- package/bower_components/o-icons/.github/workflows/auto-approve.yml +0 -23
- package/bower_components/o-icons/.github/workflows/automatic-tag-and-release.yml +0 -21
- package/bower_components/o-icons/.github/workflows/percy.yml +0 -35
- package/bower_components/o-icons/.github/workflows/release-origami-component.yml +0 -29
- package/bower_components/o-icons/.github/workflows/sync-repo-labels.yml +0 -12
- package/bower_components/o-icons/.github/workflows/test-origami-component.yml +0 -22
- package/bower_components/o-icons/.stylelintrc.js +0 -3
- package/bower_components/o-icons/MIGRATION.md +0 -82
- package/bower_components/o-icons/README.md +0 -141
- package/bower_components/o-icons/app.json +0 -12
- package/bower_components/o-icons/bower.json +0 -11
- package/bower_components/o-icons/demos/src/custom-icons.mustache +0 -14
- package/bower_components/o-icons/demos/src/data.json +0 -202
- package/bower_components/o-icons/demos/src/demo.scss +0 -37
- package/bower_components/o-icons/demos/src/icons.mustache +0 -8
- package/bower_components/o-icons/main.scss +0 -33
- package/bower_components/o-icons/origami.json +0 -37
- package/bower_components/o-icons/package-lock.json +0 -1832
- package/bower_components/o-icons/package.json +0 -14
- package/bower_components/o-icons/scripts/build-icon-list.js +0 -38
- package/bower_components/o-icons/src/scss/_icon-list.scss +0 -68
- package/bower_components/o-icons/src/scss/_mixins.scss +0 -71
- package/bower_components/o-icons/src/scss/_variables.scss +0 -8
- package/bower_components/o-icons/test/scss/_mixins.test.scss +0 -94
- package/bower_components/o-icons/test/scss/index.test.scss +0 -5
- package/bower_components/o-normalise/.bower.json +0 -28
- package/bower_components/o-normalise/MIGRATION.md +0 -35
- package/bower_components/o-normalise/README.md +0 -80
- package/bower_components/o-normalise/bower.json +0 -17
- package/bower_components/o-normalise/demos/src/demo.js +0 -9
- package/bower_components/o-normalise/demos/src/demo.scss +0 -30
- package/bower_components/o-normalise/demos/src/focus.mustache +0 -58
- package/bower_components/o-normalise/demos/src/pa11y.mustache +0 -3
- package/bower_components/o-normalise/main.scss +0 -78
- package/bower_components/o-normalise/origami.json +0 -39
- package/bower_components/o-normalise/package.json +0 -14
- package/bower_components/o-normalise/src/scss/_mixins.scss +0 -332
- package/bower_components/o-normalise/src/scss/_variables.scss +0 -5
- package/bower_components/o-spacing/.bower.json +0 -25
- package/bower_components/o-spacing/MIGRATION.md +0 -7
- package/bower_components/o-spacing/README.md +0 -146
- package/bower_components/o-spacing/bower.json +0 -14
- package/bower_components/o-spacing/demos/src/demo.scss +0 -100
- package/bower_components/o-spacing/demos/src/named-spaces.mustache +0 -51
- package/bower_components/o-spacing/demos/src/vertical-margin-utilities.mustache +0 -10
- package/bower_components/o-spacing/main.scss +0 -45
- package/bower_components/o-spacing/origami.json +0 -39
- package/bower_components/o-spacing/package-lock.json +0 -1753
- package/bower_components/o-spacing/package.json +0 -10
- package/bower_components/o-spacing/src/scss/_functions.scss +0 -26
- package/bower_components/o-spacing/src/scss/_variables.scss +0 -36
- package/bower_components/o-typography/.bower.json +0 -30
- package/bower_components/o-typography/.eslintrc.js +0 -3
- package/bower_components/o-typography/.github/CODEOWNERS +0 -7
- package/bower_components/o-typography/.github/ISSUE_TEMPLATE.md +0 -37
- package/bower_components/o-typography/.github/dependabot.yml +0 -21
- package/bower_components/o-typography/.github/workflows/add-new-issues-and-pull-requests-to-origami-project-board.yml +0 -15
- package/bower_components/o-typography/.github/workflows/apply-labels.yml +0 -13
- package/bower_components/o-typography/.github/workflows/auto-approve.yml +0 -23
- package/bower_components/o-typography/.github/workflows/automatic-tag-and-release.yml +0 -21
- package/bower_components/o-typography/.github/workflows/percy.yml +0 -35
- package/bower_components/o-typography/.github/workflows/release-origami-component.yml +0 -29
- package/bower_components/o-typography/.github/workflows/sync-repo-labels.yml +0 -12
- package/bower_components/o-typography/.github/workflows/test-origami-component.yml +0 -22
- package/bower_components/o-typography/.remarkrc.js +0 -1
- package/bower_components/o-typography/.stylelintrc.js +0 -3
- package/bower_components/o-typography/MIGRATION.md +0 -512
- package/bower_components/o-typography/README.md +0 -536
- package/bower_components/o-typography/app.json +0 -12
- package/bower_components/o-typography/bower.json +0 -19
- package/bower_components/o-typography/demos/src/body.mustache +0 -3
- package/bower_components/o-typography/demos/src/caption.mustache +0 -6
- package/bower_components/o-typography/demos/src/custom-font-scale.mustache +0 -10
- package/bower_components/o-typography/demos/src/demo.js +0 -26
- package/bower_components/o-typography/demos/src/demo.scss +0 -63
- package/bower_components/o-typography/demos/src/footer.mustache +0 -1
- package/bower_components/o-typography/demos/src/headings.mustache +0 -6
- package/bower_components/o-typography/demos/src/line-width.mustache +0 -24
- package/bower_components/o-typography/demos/src/links.mustache +0 -5
- package/bower_components/o-typography/demos/src/lists.mustache +0 -42
- package/bower_components/o-typography/demos/src/scale.mustache +0 -65
- package/bower_components/o-typography/demos/src/wrapper.mustache +0 -25
- package/bower_components/o-typography/main.js +0 -10
- package/bower_components/o-typography/main.scss +0 -170
- package/bower_components/o-typography/origami.json +0 -87
- package/bower_components/o-typography/package.json +0 -18
- package/bower_components/o-typography/src/js/typography.js +0 -157
- package/bower_components/o-typography/src/scss/_brand.scss +0 -235
- package/bower_components/o-typography/src/scss/_functions.scss +0 -113
- package/bower_components/o-typography/src/scss/_mixins.scss +0 -384
- package/bower_components/o-typography/src/scss/_variables.scss +0 -85
- package/bower_components/o-typography/src/scss/use-cases/_general.scss +0 -330
- package/bower_components/o-typography/src/scss/use-cases/_wrapper.scss +0 -81
- package/bower_components/o-typography/test/helpers/fixtures.js +0 -37
- package/bower_components/o-typography/test/origami.test.js +0 -46
- package/bower_components/o-typography/test/scss/_functions.test.scss +0 -7
- package/bower_components/o-typography/test/scss/_mixins.test.scss +0 -649
- package/bower_components/o-typography/test/scss/index.test.scss +0 -6
- package/bower_components/o-typography/test/typography.test.js +0 -239
- package/bower_components/sass-mq/LICENSE.md +0 -19
- package/bower_components/sass-mq/README.md +0 -348
- package/bower_components/sass-mq/_mq.scss +0 -360
- package/bower_components/sass-mq/package.json +0 -61
- package/dist/TopicSearch.css +0 -850
package/dist/TopicSearch.cjs.js
CHANGED
|
@@ -5,12 +5,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
6
6
|
|
|
7
7
|
var xEngine = require('@financial-times/x-engine');
|
|
8
|
-
var classNames = _interopDefault(require('classnames'));
|
|
9
8
|
var debounce = _interopDefault(require('debounce-promise'));
|
|
10
9
|
var xFollowButton = require('@financial-times/x-follow-button');
|
|
11
10
|
|
|
12
|
-
var styles = {"container":"TopicSearch_container__2VM2e","input-wrapper":"TopicSearch_input-wrapper__VeoLf","search-icon":"TopicSearch_search-icon__2proG","input":"TopicSearch_input__1Iq7K","o-typography--loading-sans":"TopicSearch_o-typography--loading-sans__1p8u2","result-container":"TopicSearch_result-container__34uXy","suggestions":"TopicSearch_suggestions__2dZFW","suggestion":"TopicSearch_suggestion__2z7vY","suggestion__name":"TopicSearch_suggestion__name__3rwG-","o-typography--loading-sans-bold":"TopicSearch_o-typography--loading-sans-bold__nv2r4","no-suggestions":"TopicSearch_no-suggestions__11pFv","no-suggestions__title":"TopicSearch_no-suggestions__title__3vCy7","no-suggestions__message":"TopicSearch_no-suggestions__message__1B9c9"};
|
|
13
|
-
|
|
14
11
|
const addQueryParamToUrl = (name, value, url, append = true) => {
|
|
15
12
|
const queryParam = `${name}=${value}`;
|
|
16
13
|
return append === true ? `${url}&${queryParam}` : `${url}?${queryParam}`;
|
|
@@ -46,17 +43,17 @@ var SuggestionList = (({
|
|
|
46
43
|
}) => {
|
|
47
44
|
renderFollowButton = typeof renderFollowButton === 'function' ? renderFollowButton : defaultFollowButtonRender;
|
|
48
45
|
return xEngine.h("ul", {
|
|
49
|
-
className:
|
|
46
|
+
className: "x-topic-search-suggestions",
|
|
50
47
|
"aria-live": "polite"
|
|
51
48
|
}, suggestions.map(suggestion => xEngine.h("li", {
|
|
52
|
-
className:
|
|
49
|
+
className: "x-topic-search-suggestions__suggestion",
|
|
53
50
|
key: suggestion.id,
|
|
54
51
|
"data-trackable": "myft-topic",
|
|
55
52
|
"data-concept-id": suggestion.id,
|
|
56
53
|
"data-trackable-meta": '{"search-term":"' + searchTerm + '"}'
|
|
57
54
|
}, xEngine.h("a", {
|
|
58
55
|
"data-trackable": "topic-link",
|
|
59
|
-
className:
|
|
56
|
+
className: "x-topic-search-suggestions__suggestion-name",
|
|
60
57
|
href: suggestion.url || `/stream/${suggestion.id}`
|
|
61
58
|
}, suggestion.prefLabel), renderFollowButton(suggestion, csrfToken, followedTopicIds))));
|
|
62
59
|
});
|
|
@@ -64,12 +61,12 @@ var SuggestionList = (({
|
|
|
64
61
|
var NoSuggestions = (({
|
|
65
62
|
searchTerm
|
|
66
63
|
}) => xEngine.h("div", {
|
|
67
|
-
className:
|
|
64
|
+
className: "x-topic-search-no-suggestions",
|
|
68
65
|
"aria-live": "polite"
|
|
69
66
|
}, xEngine.h("h2", {
|
|
70
|
-
className:
|
|
67
|
+
className: "x-topic-search-no-suggestions__title"
|
|
71
68
|
}, "No topics matching ", xEngine.h("b", null, searchTerm)), xEngine.h("p", null, "Suggestions:"), xEngine.h("ul", {
|
|
72
|
-
className:
|
|
69
|
+
className: "x-topic-search-no-suggestions__message"
|
|
73
70
|
}, xEngine.h("li", null, "Make sure that all words are spelled correctly."), xEngine.h("li", null, "Try different keywords."), xEngine.h("li", null, "Try more general keywords."), xEngine.h("li", null, "Try fewer keywords."))));
|
|
74
71
|
|
|
75
72
|
class TopicSearch extends xEngine.Component {
|
|
@@ -162,7 +159,7 @@ class TopicSearch extends xEngine.Component {
|
|
|
162
159
|
suggestions
|
|
163
160
|
} = this.state;
|
|
164
161
|
return xEngine.h("div", {
|
|
165
|
-
className:
|
|
162
|
+
className: "x-topic-search",
|
|
166
163
|
ref: el => this.rootEl = el
|
|
167
164
|
}, xEngine.h("h2", {
|
|
168
165
|
className: "o-normalise-visually-hidden"
|
|
@@ -170,21 +167,21 @@ class TopicSearch extends xEngine.Component {
|
|
|
170
167
|
className: "o-normalise-visually-hidden",
|
|
171
168
|
htmlFor: "topic-search-input"
|
|
172
169
|
}, "Search and add topics"), xEngine.h("div", {
|
|
173
|
-
className:
|
|
170
|
+
className: "x-topic-search__input-wrapper"
|
|
174
171
|
}, xEngine.h("i", {
|
|
175
|
-
className:
|
|
172
|
+
className: "x-topic-search__search-icon"
|
|
176
173
|
}), xEngine.h("input", {
|
|
177
174
|
type: "search",
|
|
178
175
|
id: "topic-search-input",
|
|
179
176
|
placeholder: "Search and add topics",
|
|
180
|
-
className:
|
|
177
|
+
className: "x-topic-search__input",
|
|
181
178
|
"data-trackable": "topic-search",
|
|
182
179
|
autoComplete: "off",
|
|
183
180
|
onInput: this.handleInputChange,
|
|
184
181
|
onClick: this.handleInputClick,
|
|
185
182
|
onFocus: this.handleInputFocus
|
|
186
183
|
})), showResult && searchTerm.length >= this.minSearchLength && xEngine.h("div", {
|
|
187
|
-
className:
|
|
184
|
+
className: "x-topic-search__result-container"
|
|
188
185
|
}, suggestions.length > 0 ? xEngine.h(SuggestionList, {
|
|
189
186
|
csrfToken: csrfToken,
|
|
190
187
|
followedTopicIds: followedTopicIds,
|
package/dist/TopicSearch.es5.js
CHANGED
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
6
6
|
|
|
7
7
|
var xEngine = require('@financial-times/x-engine');
|
|
8
|
-
var classNames = _interopDefault(require('classnames'));
|
|
9
8
|
var debounce = _interopDefault(require('debounce-promise'));
|
|
10
9
|
var xFollowButton = require('@financial-times/x-follow-button');
|
|
11
10
|
|
|
@@ -118,8 +117,6 @@ function _createSuper(Derived) {
|
|
|
118
117
|
};
|
|
119
118
|
}
|
|
120
119
|
|
|
121
|
-
var styles = {"container":"TopicSearch_container__2VM2e","input-wrapper":"TopicSearch_input-wrapper__VeoLf","search-icon":"TopicSearch_search-icon__2proG","input":"TopicSearch_input__1Iq7K","o-typography--loading-sans":"TopicSearch_o-typography--loading-sans__1p8u2","result-container":"TopicSearch_result-container__34uXy","suggestions":"TopicSearch_suggestions__2dZFW","suggestion":"TopicSearch_suggestion__2z7vY","suggestion__name":"TopicSearch_suggestion__name__3rwG-","o-typography--loading-sans-bold":"TopicSearch_o-typography--loading-sans-bold__nv2r4","no-suggestions":"TopicSearch_no-suggestions__11pFv","no-suggestions__title":"TopicSearch_no-suggestions__title__3vCy7","no-suggestions__message":"TopicSearch_no-suggestions__message__1B9c9"};
|
|
122
|
-
|
|
123
120
|
var addQueryParamToUrl = function addQueryParamToUrl(name, value, url) {
|
|
124
121
|
var append = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
|
|
125
122
|
var queryParam = "".concat(name, "=").concat(value);
|
|
@@ -160,18 +157,18 @@ var SuggestionList = (function (_ref) {
|
|
|
160
157
|
followedTopicIds = _ref$followedTopicIds === void 0 ? [] : _ref$followedTopicIds;
|
|
161
158
|
renderFollowButton = typeof renderFollowButton === 'function' ? renderFollowButton : defaultFollowButtonRender;
|
|
162
159
|
return xEngine.h("ul", {
|
|
163
|
-
className:
|
|
160
|
+
className: "x-topic-search-suggestions",
|
|
164
161
|
"aria-live": "polite"
|
|
165
162
|
}, suggestions.map(function (suggestion) {
|
|
166
163
|
return xEngine.h("li", {
|
|
167
|
-
className:
|
|
164
|
+
className: "x-topic-search-suggestions__suggestion",
|
|
168
165
|
key: suggestion.id,
|
|
169
166
|
"data-trackable": "myft-topic",
|
|
170
167
|
"data-concept-id": suggestion.id,
|
|
171
168
|
"data-trackable-meta": '{"search-term":"' + searchTerm + '"}'
|
|
172
169
|
}, xEngine.h("a", {
|
|
173
170
|
"data-trackable": "topic-link",
|
|
174
|
-
className:
|
|
171
|
+
className: "x-topic-search-suggestions__suggestion-name",
|
|
175
172
|
href: suggestion.url || "/stream/".concat(suggestion.id)
|
|
176
173
|
}, suggestion.prefLabel), renderFollowButton(suggestion, csrfToken, followedTopicIds));
|
|
177
174
|
}));
|
|
@@ -180,12 +177,12 @@ var SuggestionList = (function (_ref) {
|
|
|
180
177
|
var NoSuggestions = (function (_ref) {
|
|
181
178
|
var searchTerm = _ref.searchTerm;
|
|
182
179
|
return xEngine.h("div", {
|
|
183
|
-
className:
|
|
180
|
+
className: "x-topic-search-no-suggestions",
|
|
184
181
|
"aria-live": "polite"
|
|
185
182
|
}, xEngine.h("h2", {
|
|
186
|
-
className:
|
|
183
|
+
className: "x-topic-search-no-suggestions__title"
|
|
187
184
|
}, "No topics matching ", xEngine.h("b", null, searchTerm)), xEngine.h("p", null, "Suggestions:"), xEngine.h("ul", {
|
|
188
|
-
className:
|
|
185
|
+
className: "x-topic-search-no-suggestions__message"
|
|
189
186
|
}, xEngine.h("li", null, "Make sure that all words are spelled correctly."), xEngine.h("li", null, "Try different keywords."), xEngine.h("li", null, "Try more general keywords."), xEngine.h("li", null, "Try fewer keywords.")));
|
|
190
187
|
});
|
|
191
188
|
|
|
@@ -302,7 +299,7 @@ var TopicSearch = /*#__PURE__*/function (_Component) {
|
|
|
302
299
|
showResult = _this$state.showResult,
|
|
303
300
|
suggestions = _this$state.suggestions;
|
|
304
301
|
return xEngine.h("div", {
|
|
305
|
-
className:
|
|
302
|
+
className: "x-topic-search",
|
|
306
303
|
ref: function ref(el) {
|
|
307
304
|
return _this5.rootEl = el;
|
|
308
305
|
}
|
|
@@ -312,21 +309,21 @@ var TopicSearch = /*#__PURE__*/function (_Component) {
|
|
|
312
309
|
className: "o-normalise-visually-hidden",
|
|
313
310
|
htmlFor: "topic-search-input"
|
|
314
311
|
}, "Search and add topics"), xEngine.h("div", {
|
|
315
|
-
className:
|
|
312
|
+
className: "x-topic-search__input-wrapper"
|
|
316
313
|
}, xEngine.h("i", {
|
|
317
|
-
className:
|
|
314
|
+
className: "x-topic-search__search-icon"
|
|
318
315
|
}), xEngine.h("input", {
|
|
319
316
|
type: "search",
|
|
320
317
|
id: "topic-search-input",
|
|
321
318
|
placeholder: "Search and add topics",
|
|
322
|
-
className:
|
|
319
|
+
className: "x-topic-search__input",
|
|
323
320
|
"data-trackable": "topic-search",
|
|
324
321
|
autoComplete: "off",
|
|
325
322
|
onInput: this.handleInputChange,
|
|
326
323
|
onClick: this.handleInputClick,
|
|
327
324
|
onFocus: this.handleInputFocus
|
|
328
325
|
})), showResult && searchTerm.length >= this.minSearchLength && xEngine.h("div", {
|
|
329
|
-
className:
|
|
326
|
+
className: "x-topic-search__result-container"
|
|
330
327
|
}, suggestions.length > 0 ? xEngine.h(SuggestionList, {
|
|
331
328
|
csrfToken: csrfToken,
|
|
332
329
|
followedTopicIds: followedTopicIds,
|
package/dist/TopicSearch.esm.js
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { h, Component } from '@financial-times/x-engine';
|
|
2
|
-
import classNames from 'classnames';
|
|
3
2
|
import debounce from 'debounce-promise';
|
|
4
3
|
import { FollowButton } from '@financial-times/x-follow-button';
|
|
5
4
|
|
|
6
|
-
var styles = {"container":"TopicSearch_container__2VM2e","input-wrapper":"TopicSearch_input-wrapper__VeoLf","search-icon":"TopicSearch_search-icon__2proG","input":"TopicSearch_input__1Iq7K","o-typography--loading-sans":"TopicSearch_o-typography--loading-sans__1p8u2","result-container":"TopicSearch_result-container__34uXy","suggestions":"TopicSearch_suggestions__2dZFW","suggestion":"TopicSearch_suggestion__2z7vY","suggestion__name":"TopicSearch_suggestion__name__3rwG-","o-typography--loading-sans-bold":"TopicSearch_o-typography--loading-sans-bold__nv2r4","no-suggestions":"TopicSearch_no-suggestions__11pFv","no-suggestions__title":"TopicSearch_no-suggestions__title__3vCy7","no-suggestions__message":"TopicSearch_no-suggestions__message__1B9c9"};
|
|
7
|
-
|
|
8
5
|
const addQueryParamToUrl = (name, value, url, append = true) => {
|
|
9
6
|
const queryParam = `${name}=${value}`;
|
|
10
7
|
return append === true ? `${url}&${queryParam}` : `${url}?${queryParam}`;
|
|
@@ -40,17 +37,17 @@ var SuggestionList = (({
|
|
|
40
37
|
}) => {
|
|
41
38
|
renderFollowButton = typeof renderFollowButton === 'function' ? renderFollowButton : defaultFollowButtonRender;
|
|
42
39
|
return h("ul", {
|
|
43
|
-
className:
|
|
40
|
+
className: "x-topic-search-suggestions",
|
|
44
41
|
"aria-live": "polite"
|
|
45
42
|
}, suggestions.map(suggestion => h("li", {
|
|
46
|
-
className:
|
|
43
|
+
className: "x-topic-search-suggestions__suggestion",
|
|
47
44
|
key: suggestion.id,
|
|
48
45
|
"data-trackable": "myft-topic",
|
|
49
46
|
"data-concept-id": suggestion.id,
|
|
50
47
|
"data-trackable-meta": '{"search-term":"' + searchTerm + '"}'
|
|
51
48
|
}, h("a", {
|
|
52
49
|
"data-trackable": "topic-link",
|
|
53
|
-
className:
|
|
50
|
+
className: "x-topic-search-suggestions__suggestion-name",
|
|
54
51
|
href: suggestion.url || `/stream/${suggestion.id}`
|
|
55
52
|
}, suggestion.prefLabel), renderFollowButton(suggestion, csrfToken, followedTopicIds))));
|
|
56
53
|
});
|
|
@@ -58,12 +55,12 @@ var SuggestionList = (({
|
|
|
58
55
|
var NoSuggestions = (({
|
|
59
56
|
searchTerm
|
|
60
57
|
}) => h("div", {
|
|
61
|
-
className:
|
|
58
|
+
className: "x-topic-search-no-suggestions",
|
|
62
59
|
"aria-live": "polite"
|
|
63
60
|
}, h("h2", {
|
|
64
|
-
className:
|
|
61
|
+
className: "x-topic-search-no-suggestions__title"
|
|
65
62
|
}, "No topics matching ", h("b", null, searchTerm)), h("p", null, "Suggestions:"), h("ul", {
|
|
66
|
-
className:
|
|
63
|
+
className: "x-topic-search-no-suggestions__message"
|
|
67
64
|
}, h("li", null, "Make sure that all words are spelled correctly."), h("li", null, "Try different keywords."), h("li", null, "Try more general keywords."), h("li", null, "Try fewer keywords."))));
|
|
68
65
|
|
|
69
66
|
class TopicSearch extends Component {
|
|
@@ -156,7 +153,7 @@ class TopicSearch extends Component {
|
|
|
156
153
|
suggestions
|
|
157
154
|
} = this.state;
|
|
158
155
|
return h("div", {
|
|
159
|
-
className:
|
|
156
|
+
className: "x-topic-search",
|
|
160
157
|
ref: el => this.rootEl = el
|
|
161
158
|
}, h("h2", {
|
|
162
159
|
className: "o-normalise-visually-hidden"
|
|
@@ -164,21 +161,21 @@ class TopicSearch extends Component {
|
|
|
164
161
|
className: "o-normalise-visually-hidden",
|
|
165
162
|
htmlFor: "topic-search-input"
|
|
166
163
|
}, "Search and add topics"), h("div", {
|
|
167
|
-
className:
|
|
164
|
+
className: "x-topic-search__input-wrapper"
|
|
168
165
|
}, h("i", {
|
|
169
|
-
className:
|
|
166
|
+
className: "x-topic-search__search-icon"
|
|
170
167
|
}), h("input", {
|
|
171
168
|
type: "search",
|
|
172
169
|
id: "topic-search-input",
|
|
173
170
|
placeholder: "Search and add topics",
|
|
174
|
-
className:
|
|
171
|
+
className: "x-topic-search__input",
|
|
175
172
|
"data-trackable": "topic-search",
|
|
176
173
|
autoComplete: "off",
|
|
177
174
|
onInput: this.handleInputChange,
|
|
178
175
|
onClick: this.handleInputClick,
|
|
179
176
|
onFocus: this.handleInputFocus
|
|
180
177
|
})), showResult && searchTerm.length >= this.minSearchLength && h("div", {
|
|
181
|
-
className:
|
|
178
|
+
className: "x-topic-search__result-container"
|
|
182
179
|
}, suggestions.length > 0 ? h(SuggestionList, {
|
|
183
180
|
csrfToken: csrfToken,
|
|
184
181
|
followedTopicIds: followedTopicIds,
|
package/package.json
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@financial-times/x-topic-search",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/TopicSearch.cjs.js",
|
|
6
6
|
"module": "dist/TopicSearch.esm.js",
|
|
7
7
|
"browser": "dist/TopicSearch.es5.js",
|
|
8
|
-
"style": "
|
|
8
|
+
"style": "src/TopicSearch.scss",
|
|
9
9
|
"scripts": {
|
|
10
|
-
"prepare": "bower install",
|
|
11
10
|
"build": "node rollup.js",
|
|
12
11
|
"start": "node rollup.js --watch"
|
|
13
12
|
},
|
|
@@ -17,16 +16,18 @@
|
|
|
17
16
|
"author": "",
|
|
18
17
|
"license": "ISC",
|
|
19
18
|
"dependencies": {
|
|
20
|
-
"@financial-times/x-engine": "^
|
|
21
|
-
"@financial-times/x-follow-button": "^
|
|
22
|
-
"classnames": "^2.2.6",
|
|
19
|
+
"@financial-times/x-engine": "^8.0.0",
|
|
20
|
+
"@financial-times/x-follow-button": "^8.0.0",
|
|
23
21
|
"debounce-promise": "^3.1.0"
|
|
24
22
|
},
|
|
25
23
|
"devDependencies": {
|
|
24
|
+
"@financial-times/o-colors": "^6.4.2",
|
|
25
|
+
"@financial-times/o-editorial-typography": "^2.3.2",
|
|
26
|
+
"@financial-times/o-icons": "^7.2.1",
|
|
27
|
+
"@financial-times/o-typography": "^7.3.1",
|
|
26
28
|
"@financial-times/x-rollup": "file:../../packages/x-rollup",
|
|
27
29
|
"@financial-times/x-test-utils": "file:../../packages/x-test-utils",
|
|
28
|
-
"
|
|
29
|
-
"node-sass": "^4.9.2"
|
|
30
|
+
"sass": "^1.49.0"
|
|
30
31
|
},
|
|
31
32
|
"repository": {
|
|
32
33
|
"type": "git",
|
|
@@ -34,9 +35,18 @@
|
|
|
34
35
|
},
|
|
35
36
|
"homepage": "https://github.com/Financial-Times/x-dash/tree/master/components/x-topic-search",
|
|
36
37
|
"engines": {
|
|
37
|
-
"node": "
|
|
38
|
+
"node": "14.x || 16.x"
|
|
38
39
|
},
|
|
39
40
|
"publishConfig": {
|
|
40
41
|
"access": "public"
|
|
42
|
+
},
|
|
43
|
+
"volta": {
|
|
44
|
+
"extends": "../../package.json"
|
|
45
|
+
},
|
|
46
|
+
"peerDependencies": {
|
|
47
|
+
"@financial-times/o-colors": "^6.4.2",
|
|
48
|
+
"@financial-times/o-editorial-typography": "^2.3.2",
|
|
49
|
+
"@financial-times/o-icons": "^7.2.1",
|
|
50
|
+
"@financial-times/o-typography": "^7.3.1"
|
|
41
51
|
}
|
|
42
52
|
}
|
package/storybook/index.jsx
CHANGED
|
@@ -2,12 +2,11 @@ import React from 'react'
|
|
|
2
2
|
import { TopicSearch } from '../src/TopicSearch'
|
|
3
3
|
import BuildService from '../../../.storybook/build-service'
|
|
4
4
|
|
|
5
|
+
import '../src/TopicSearch.scss'
|
|
6
|
+
|
|
5
7
|
// Set up basic document styling using the Origami build service
|
|
6
8
|
const dependencies = {
|
|
7
|
-
'o-
|
|
8
|
-
'o-typography': '^6.0.0',
|
|
9
|
-
'o-colors': '^5.0.0',
|
|
10
|
-
'o-icons': '^6.0.0'
|
|
9
|
+
'o-fonts': '^5.3.0'
|
|
11
10
|
}
|
|
12
11
|
|
|
13
12
|
export default {
|
package/.bowerrc
DELETED
package/bower.json
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
Copyright (c) 2014 - Bram Stein
|
|
2
|
-
All rights reserved.
|
|
3
|
-
|
|
4
|
-
Redistribution and use in source and binary forms, with or without
|
|
5
|
-
modification, are permitted provided that the following conditions
|
|
6
|
-
are met:
|
|
7
|
-
|
|
8
|
-
1. Redistributions of source code must retain the above copyright
|
|
9
|
-
notice, this list of conditions and the following disclaimer.
|
|
10
|
-
2. Redistributions in binary form must reproduce the above copyright
|
|
11
|
-
notice, this list of conditions and the following disclaimer in the
|
|
12
|
-
documentation and/or other materials provided with the distribution.
|
|
13
|
-
|
|
14
|
-
THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
|
|
15
|
-
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
16
|
-
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
|
17
|
-
EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
|
18
|
-
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
19
|
-
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
20
|
-
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
|
21
|
-
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
22
|
-
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
|
23
|
-
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
# Font Face Observer [](https://travis-ci.org/bramstein/fontfaceobserver)
|
|
2
|
-
|
|
3
|
-
Font Face Observer is a small `@font-face` loader and monitor (3.5KB minified and 1.3KB gzipped) compatible with any webfont service. It will monitor when a webfont is loaded and notify you. It does not limit you in any way in where, when, or how you load your webfonts. Unlike the [Web Font Loader](https://github.com/typekit/webfontloader) Font Face Observer uses scroll events to detect font loads efficiently and with minimum overhead.
|
|
4
|
-
|
|
5
|
-
## How to use
|
|
6
|
-
|
|
7
|
-
Include your `@font-face` rules as usual. Fonts can be supplied by either a font service such as [Google Fonts](http://www.google.com/fonts), [Typekit](http://typekit.com), and [Webtype](http://webtype.com) or be self-hosted. You can set up monitoring for a single font family at a time:
|
|
8
|
-
|
|
9
|
-
```js
|
|
10
|
-
var font = new FontFaceObserver('My Family', {
|
|
11
|
-
weight: 400
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
font.load().then(function () {
|
|
15
|
-
console.log('Font is available');
|
|
16
|
-
}, function () {
|
|
17
|
-
console.log('Font is not available');
|
|
18
|
-
});
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
The `FontFaceObserver` constructor takes two arguments: the font-family name (required) and an object describing the variation (optional). The object can contain `weight`, `style`, and `stretch` properties. If a property is not present it will default to `normal`. To start loading the font, call the `load` method. It'll immediately return a new Promise that resolves when the font is loaded and rejected when the font fails to load.
|
|
22
|
-
|
|
23
|
-
If your font doesn't contain at least the latin "BESbwy" characters you must pass a custom test string to the `load` method.
|
|
24
|
-
|
|
25
|
-
```js
|
|
26
|
-
var font = new FontFaceObserver('My Family');
|
|
27
|
-
|
|
28
|
-
font.load('中国').then(function () {
|
|
29
|
-
console.log('Font is available');
|
|
30
|
-
}, function () {
|
|
31
|
-
console.log('Font is not available');
|
|
32
|
-
});
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
The default timeout for giving up on font loading is 3 seconds. You can increase or decrease this by passing a number of milliseconds as the second parameter to the `load` method.
|
|
36
|
-
|
|
37
|
-
```js
|
|
38
|
-
var font = new FontFaceObserver('My Family');
|
|
39
|
-
|
|
40
|
-
font.load(null, 5000).then(function () {
|
|
41
|
-
console.log('Font is available');
|
|
42
|
-
}, function () {
|
|
43
|
-
console.log('Font is not available after waiting 5 seconds');
|
|
44
|
-
});
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
Multiple fonts can be loaded by creating a `FontFaceObserver` instance for each.
|
|
48
|
-
|
|
49
|
-
```js
|
|
50
|
-
var fontA = new FontFaceObserver('Family A');
|
|
51
|
-
var fontB = new FontFaceObserver('Family B');
|
|
52
|
-
|
|
53
|
-
fontA.load().then(function () {
|
|
54
|
-
console.log('Family A is available');
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
fontB.load().then(function () {
|
|
58
|
-
console.log('Family B is available');
|
|
59
|
-
});
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
You may also load both at the same time, rather than loading each individually.
|
|
63
|
-
|
|
64
|
-
```js
|
|
65
|
-
var fontA = new FontFaceObserver('Family A');
|
|
66
|
-
var fontB = new FontFaceObserver('Family B');
|
|
67
|
-
|
|
68
|
-
Promise.all([fontA.load(), fontB.load()]).then(function () {
|
|
69
|
-
console.log('Family A & B have loaded');
|
|
70
|
-
});
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
If you are working with a large number of fonts, you may decide to create `FontFaceObserver` instances dynamically:
|
|
74
|
-
|
|
75
|
-
```js
|
|
76
|
-
// An example collection of font data with additional metadata,
|
|
77
|
-
// in this case “color.”
|
|
78
|
-
var exampleFontData = {
|
|
79
|
-
'Family A': { weight: 400, color: 'red' },
|
|
80
|
-
'Family B': { weight: 400, color: 'orange' },
|
|
81
|
-
'Family C': { weight: 900, color: 'yellow' },
|
|
82
|
-
// Etc.
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
var observers = [];
|
|
86
|
-
|
|
87
|
-
// Make one observer for each font,
|
|
88
|
-
// by iterating over the data we already have
|
|
89
|
-
Object.keys(exampleFontData).forEach(function(family) {
|
|
90
|
-
var data = exampleFontData[family];
|
|
91
|
-
var obs = new FontFaceObserver(family, data);
|
|
92
|
-
observers.push(obs.load());
|
|
93
|
-
});
|
|
94
|
-
|
|
95
|
-
Promise.all(observers)
|
|
96
|
-
.then(function(fonts) {
|
|
97
|
-
fonts.forEach(function(font) {
|
|
98
|
-
console.log(font.family + ' ' + font.weight + ' ' + 'loaded');
|
|
99
|
-
|
|
100
|
-
// Map the result of the Promise back to our existing data,
|
|
101
|
-
// to get the other properties we need.
|
|
102
|
-
console.log(exampleFontData[font.family].color);
|
|
103
|
-
});
|
|
104
|
-
})
|
|
105
|
-
.catch(function(err) {
|
|
106
|
-
console.warn('Some critical font are not available:', err);
|
|
107
|
-
});
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
The following example emulates FOUT with Font Face Observer for `My Family`.
|
|
111
|
-
|
|
112
|
-
```js
|
|
113
|
-
var font = new FontFaceObserver('My Family');
|
|
114
|
-
|
|
115
|
-
font.load().then(function () {
|
|
116
|
-
document.documentElement.className += " fonts-loaded";
|
|
117
|
-
});
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
```css
|
|
121
|
-
.fonts-loaded {
|
|
122
|
-
body {
|
|
123
|
-
font-family: My Family, sans-serif;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
## Installation
|
|
129
|
-
|
|
130
|
-
If you're using npm you can install Font Face Observer as a dependency:
|
|
131
|
-
|
|
132
|
-
```shell
|
|
133
|
-
$ npm install fontfaceobserver
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
You can then require `fontfaceobserver` as a CommonJS (Browserify) module:
|
|
137
|
-
|
|
138
|
-
```js
|
|
139
|
-
var FontFaceObserver = require('fontfaceobserver');
|
|
140
|
-
|
|
141
|
-
var font = new FontFaceObserver('My Family');
|
|
142
|
-
|
|
143
|
-
font.load().then(function () {
|
|
144
|
-
console.log('My Family has loaded');
|
|
145
|
-
});
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
If you're not using npm, grab `fontfaceobserver.js` or `fontfaceobserver.standalone.js` (see below) and include it in your project. It'll export a global `FontFaceObserver` that you can use to create new instances.
|
|
149
|
-
|
|
150
|
-
Font Face Observer uses Promises in its API, so for [browsers that do not support promises](http://caniuse.com/#search=promise) you'll need to include a polyfill. If you use your own Promise polyfill you just need to include `fontfaceobserver.standalone.js` in your project. If you do not have an existing Promise polyfill you should use `fontfaceobserver.js` which includes a small Promise polyfill. Using the Promise polyfill adds roughly 1.4KB (500 bytes gzipped) to the file size.
|
|
151
|
-
|
|
152
|
-
## Browser support
|
|
153
|
-
|
|
154
|
-
FontFaceObserver has been tested and works on the following browsers:
|
|
155
|
-
|
|
156
|
-
* Chrome (desktop & Android)
|
|
157
|
-
* Firefox
|
|
158
|
-
* Opera
|
|
159
|
-
* Safari (desktop & iOS)
|
|
160
|
-
* IE8+
|
|
161
|
-
* Android WebKit
|
|
162
|
-
|
|
163
|
-
## License
|
|
164
|
-
|
|
165
|
-
Font Face Observer is licensed under the BSD License. Copyright 2014-2017 Bram Stein. All rights reserved.
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @constructor
|
|
3
|
-
*
|
|
4
|
-
* @param {string} family
|
|
5
|
-
* @param {Object} descriptors
|
|
6
|
-
*/
|
|
7
|
-
var FontFaceObserver = function (family, descriptors) {};
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* @param {string=} opt_text
|
|
11
|
-
* @param {number=} opt_timeout
|
|
12
|
-
*
|
|
13
|
-
* @return {Promise.<FontFaceObserver>}
|
|
14
|
-
*/
|
|
15
|
-
FontFaceObserver.prototype.load = function (opt_text, opt_timeout) {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/* Font Face Observer v2.1.0 - © Bram Stein. License: BSD-3-Clause */(function(){'use strict';var f,g=[];function l(a){g.push(a);1==g.length&&f()}function m(){for(;g.length;)g[0](),g.shift()}f=function(){setTimeout(m)};function n(a){this.a=p;this.b=void 0;this.f=[];var b=this;try{a(function(a){q(b,a)},function(a){r(b,a)})}catch(c){r(b,c)}}var p=2;function t(a){return new n(function(b,c){c(a)})}function u(a){return new n(function(b){b(a)})}function q(a,b){if(a.a==p){if(b==a)throw new TypeError;var c=!1;try{var d=b&&b.then;if(null!=b&&"object"==typeof b&&"function"==typeof d){d.call(b,function(b){c||q(a,b);c=!0},function(b){c||r(a,b);c=!0});return}}catch(e){c||r(a,e);return}a.a=0;a.b=b;v(a)}}
|
|
2
|
-
function r(a,b){if(a.a==p){if(b==a)throw new TypeError;a.a=1;a.b=b;v(a)}}function v(a){l(function(){if(a.a!=p)for(;a.f.length;){var b=a.f.shift(),c=b[0],d=b[1],e=b[2],b=b[3];try{0==a.a?"function"==typeof c?e(c.call(void 0,a.b)):e(a.b):1==a.a&&("function"==typeof d?e(d.call(void 0,a.b)):b(a.b))}catch(h){b(h)}}})}n.prototype.g=function(a){return this.c(void 0,a)};n.prototype.c=function(a,b){var c=this;return new n(function(d,e){c.f.push([a,b,d,e]);v(c)})};
|
|
3
|
-
function w(a){return new n(function(b,c){function d(c){return function(d){h[c]=d;e+=1;e==a.length&&b(h)}}var e=0,h=[];0==a.length&&b(h);for(var k=0;k<a.length;k+=1)u(a[k]).c(d(k),c)})}function x(a){return new n(function(b,c){for(var d=0;d<a.length;d+=1)u(a[d]).c(b,c)})};window.Promise||(window.Promise=n,window.Promise.resolve=u,window.Promise.reject=t,window.Promise.race=x,window.Promise.all=w,window.Promise.prototype.then=n.prototype.c,window.Promise.prototype["catch"]=n.prototype.g);}());
|
|
4
|
-
|
|
5
|
-
(function(){function l(a,b){document.addEventListener?a.addEventListener("scroll",b,!1):a.attachEvent("scroll",b)}function m(a){document.body?a():document.addEventListener?document.addEventListener("DOMContentLoaded",function c(){document.removeEventListener("DOMContentLoaded",c);a()}):document.attachEvent("onreadystatechange",function k(){if("interactive"==document.readyState||"complete"==document.readyState)document.detachEvent("onreadystatechange",k),a()})};function t(a){this.a=document.createElement("div");this.a.setAttribute("aria-hidden","true");this.a.appendChild(document.createTextNode(a));this.b=document.createElement("span");this.c=document.createElement("span");this.h=document.createElement("span");this.f=document.createElement("span");this.g=-1;this.b.style.cssText="max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;";this.c.style.cssText="max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;";
|
|
6
|
-
this.f.style.cssText="max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;";this.h.style.cssText="display:inline-block;width:200%;height:200%;font-size:16px;max-width:none;";this.b.appendChild(this.h);this.c.appendChild(this.f);this.a.appendChild(this.b);this.a.appendChild(this.c)}
|
|
7
|
-
function u(a,b){a.a.style.cssText="max-width:none;min-width:20px;min-height:20px;display:inline-block;overflow:hidden;position:absolute;width:auto;margin:0;padding:0;top:-999px;white-space:nowrap;font-synthesis:none;font:"+b+";"}function z(a){var b=a.a.offsetWidth,c=b+100;a.f.style.width=c+"px";a.c.scrollLeft=c;a.b.scrollLeft=a.b.scrollWidth+100;return a.g!==b?(a.g=b,!0):!1}function A(a,b){function c(){var a=k;z(a)&&a.a.parentNode&&b(a.g)}var k=a;l(a.b,c);l(a.c,c);z(a)};function B(a,b){var c=b||{};this.family=a;this.style=c.style||"normal";this.weight=c.weight||"normal";this.stretch=c.stretch||"normal"}var C=null,D=null,E=null,F=null;function G(){if(null===D)if(J()&&/Apple/.test(window.navigator.vendor)){var a=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))(?:\.([0-9]+))/.exec(window.navigator.userAgent);D=!!a&&603>parseInt(a[1],10)}else D=!1;return D}function J(){null===F&&(F=!!document.fonts);return F}
|
|
8
|
-
function K(){if(null===E){var a=document.createElement("div");try{a.style.font="condensed 100px sans-serif"}catch(b){}E=""!==a.style.font}return E}function L(a,b){return[a.style,a.weight,K()?a.stretch:"","100px",b].join(" ")}
|
|
9
|
-
B.prototype.load=function(a,b){var c=this,k=a||"BESbswy",r=0,n=b||3E3,H=(new Date).getTime();return new Promise(function(a,b){if(J()&&!G()){var M=new Promise(function(a,b){function e(){(new Date).getTime()-H>=n?b(Error(""+n+"ms timeout exceeded")):document.fonts.load(L(c,'"'+c.family+'"'),k).then(function(c){1<=c.length?a():setTimeout(e,25)},b)}e()}),N=new Promise(function(a,c){r=setTimeout(function(){c(Error(""+n+"ms timeout exceeded"))},n)});Promise.race([N,M]).then(function(){clearTimeout(r);a(c)},
|
|
10
|
-
b)}else m(function(){function v(){var b;if(b=-1!=f&&-1!=g||-1!=f&&-1!=h||-1!=g&&-1!=h)(b=f!=g&&f!=h&&g!=h)||(null===C&&(b=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent),C=!!b&&(536>parseInt(b[1],10)||536===parseInt(b[1],10)&&11>=parseInt(b[2],10))),b=C&&(f==w&&g==w&&h==w||f==x&&g==x&&h==x||f==y&&g==y&&h==y)),b=!b;b&&(d.parentNode&&d.parentNode.removeChild(d),clearTimeout(r),a(c))}function I(){if((new Date).getTime()-H>=n)d.parentNode&&d.parentNode.removeChild(d),b(Error(""+
|
|
11
|
-
n+"ms timeout exceeded"));else{var a=document.hidden;if(!0===a||void 0===a)f=e.a.offsetWidth,g=p.a.offsetWidth,h=q.a.offsetWidth,v();r=setTimeout(I,50)}}var e=new t(k),p=new t(k),q=new t(k),f=-1,g=-1,h=-1,w=-1,x=-1,y=-1,d=document.createElement("div");d.dir="ltr";u(e,L(c,"sans-serif"));u(p,L(c,"serif"));u(q,L(c,"monospace"));d.appendChild(e.a);d.appendChild(p.a);d.appendChild(q.a);document.body.appendChild(d);w=e.a.offsetWidth;x=p.a.offsetWidth;y=q.a.offsetWidth;I();A(e,function(a){f=a;v()});u(e,
|
|
12
|
-
L(c,'"'+c.family+'",sans-serif'));A(p,function(a){g=a;v()});u(p,L(c,'"'+c.family+'",serif'));A(q,function(a){h=a;v()});u(q,L(c,'"'+c.family+'",monospace'))})})};"object"===typeof module?module.exports=B:(window.FontFaceObserver=B,window.FontFaceObserver.prototype.load=B.prototype.load);}());
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/* Font Face Observer v2.1.0 - © Bram Stein. License: BSD-3-Clause */(function(){function l(a,b){document.addEventListener?a.addEventListener("scroll",b,!1):a.attachEvent("scroll",b)}function m(a){document.body?a():document.addEventListener?document.addEventListener("DOMContentLoaded",function c(){document.removeEventListener("DOMContentLoaded",c);a()}):document.attachEvent("onreadystatechange",function k(){if("interactive"==document.readyState||"complete"==document.readyState)document.detachEvent("onreadystatechange",k),a()})};function t(a){this.a=document.createElement("div");this.a.setAttribute("aria-hidden","true");this.a.appendChild(document.createTextNode(a));this.b=document.createElement("span");this.c=document.createElement("span");this.h=document.createElement("span");this.f=document.createElement("span");this.g=-1;this.b.style.cssText="max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;";this.c.style.cssText="max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;";
|
|
2
|
-
this.f.style.cssText="max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;";this.h.style.cssText="display:inline-block;width:200%;height:200%;font-size:16px;max-width:none;";this.b.appendChild(this.h);this.c.appendChild(this.f);this.a.appendChild(this.b);this.a.appendChild(this.c)}
|
|
3
|
-
function u(a,b){a.a.style.cssText="max-width:none;min-width:20px;min-height:20px;display:inline-block;overflow:hidden;position:absolute;width:auto;margin:0;padding:0;top:-999px;white-space:nowrap;font-synthesis:none;font:"+b+";"}function z(a){var b=a.a.offsetWidth,c=b+100;a.f.style.width=c+"px";a.c.scrollLeft=c;a.b.scrollLeft=a.b.scrollWidth+100;return a.g!==b?(a.g=b,!0):!1}function A(a,b){function c(){var a=k;z(a)&&a.a.parentNode&&b(a.g)}var k=a;l(a.b,c);l(a.c,c);z(a)};function B(a,b){var c=b||{};this.family=a;this.style=c.style||"normal";this.weight=c.weight||"normal";this.stretch=c.stretch||"normal"}var C=null,D=null,E=null,F=null;function G(){if(null===D)if(J()&&/Apple/.test(window.navigator.vendor)){var a=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))(?:\.([0-9]+))/.exec(window.navigator.userAgent);D=!!a&&603>parseInt(a[1],10)}else D=!1;return D}function J(){null===F&&(F=!!document.fonts);return F}
|
|
4
|
-
function K(){if(null===E){var a=document.createElement("div");try{a.style.font="condensed 100px sans-serif"}catch(b){}E=""!==a.style.font}return E}function L(a,b){return[a.style,a.weight,K()?a.stretch:"","100px",b].join(" ")}
|
|
5
|
-
B.prototype.load=function(a,b){var c=this,k=a||"BESbswy",r=0,n=b||3E3,H=(new Date).getTime();return new Promise(function(a,b){if(J()&&!G()){var M=new Promise(function(a,b){function e(){(new Date).getTime()-H>=n?b(Error(""+n+"ms timeout exceeded")):document.fonts.load(L(c,'"'+c.family+'"'),k).then(function(c){1<=c.length?a():setTimeout(e,25)},b)}e()}),N=new Promise(function(a,c){r=setTimeout(function(){c(Error(""+n+"ms timeout exceeded"))},n)});Promise.race([N,M]).then(function(){clearTimeout(r);a(c)},
|
|
6
|
-
b)}else m(function(){function v(){var b;if(b=-1!=f&&-1!=g||-1!=f&&-1!=h||-1!=g&&-1!=h)(b=f!=g&&f!=h&&g!=h)||(null===C&&(b=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent),C=!!b&&(536>parseInt(b[1],10)||536===parseInt(b[1],10)&&11>=parseInt(b[2],10))),b=C&&(f==w&&g==w&&h==w||f==x&&g==x&&h==x||f==y&&g==y&&h==y)),b=!b;b&&(d.parentNode&&d.parentNode.removeChild(d),clearTimeout(r),a(c))}function I(){if((new Date).getTime()-H>=n)d.parentNode&&d.parentNode.removeChild(d),b(Error(""+
|
|
7
|
-
n+"ms timeout exceeded"));else{var a=document.hidden;if(!0===a||void 0===a)f=e.a.offsetWidth,g=p.a.offsetWidth,h=q.a.offsetWidth,v();r=setTimeout(I,50)}}var e=new t(k),p=new t(k),q=new t(k),f=-1,g=-1,h=-1,w=-1,x=-1,y=-1,d=document.createElement("div");d.dir="ltr";u(e,L(c,"sans-serif"));u(p,L(c,"serif"));u(q,L(c,"monospace"));d.appendChild(e.a);d.appendChild(p.a);d.appendChild(q.a);document.body.appendChild(d);w=e.a.offsetWidth;x=p.a.offsetWidth;y=q.a.offsetWidth;I();A(e,function(a){f=a;v()});u(e,
|
|
8
|
-
L(c,'"'+c.family+'",sans-serif'));A(p,function(a){g=a;v()});u(p,L(c,'"'+c.family+'",serif'));A(q,function(a){h=a;v()});u(q,L(c,'"'+c.family+'",monospace'))})})};"object"===typeof module?module.exports=B:(window.FontFaceObserver=B,window.FontFaceObserver.prototype.load=B.prototype.load);}());
|