govuk_publishing_components 30.3.0 → 30.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-event-tracker.js +63 -51
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-link-tracker.js +25 -11
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-page-views.js +11 -10
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/init-ga4.js +26 -0
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4.js +1 -3
- data/app/assets/stylesheets/component_guide/application.scss +4 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-footer.scss +7 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +60 -11
- data/app/assets/stylesheets/govuk_publishing_components/components/_organisation-logo.scss +2 -4
- data/app/views/govuk_publishing_components/component_guide/show.html.erb +31 -6
- data/app/views/govuk_publishing_components/components/_layout_super_navigation_header.html.erb +6 -2
- data/config/locales/en.yml +4 -0
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/node_modules/axe-core/README.md +83 -53
- data/node_modules/axe-core/axe.d.ts +403 -224
- data/node_modules/axe-core/axe.js +23281 -21919
- data/node_modules/axe-core/axe.min.js +3 -3
- data/node_modules/axe-core/locales/da.json +795 -780
- data/node_modules/axe-core/locales/de.json +932 -621
- data/node_modules/axe-core/locales/es.json +786 -771
- data/node_modules/axe-core/locales/eu.json +787 -0
- data/node_modules/axe-core/locales/fr.json +982 -840
- data/node_modules/axe-core/locales/ja.json +988 -880
- data/node_modules/axe-core/locales/ko.json +999 -775
- data/node_modules/axe-core/locales/nl.json +46 -34
- data/node_modules/axe-core/locales/pl.json +965 -0
- data/node_modules/axe-core/locales/pt_BR.json +966 -880
- data/node_modules/axe-core/package.json +189 -145
- data/node_modules/axe-core/sri-history.json +312 -192
- data/node_modules/govuk-frontend/govuk/all.js +64 -44
- data/node_modules/govuk-frontend/govuk/components/accordion/_index.scss +1 -1
- data/node_modules/govuk-frontend/govuk/components/accordion/accordion.js +3 -13
- data/node_modules/govuk-frontend/govuk/components/accordion/fixtures.json +12 -12
- data/node_modules/govuk-frontend/govuk/components/accordion/template.njk +5 -1
- data/node_modules/govuk-frontend/govuk/components/character-count/fixtures.json +1 -1
- data/node_modules/govuk-frontend/govuk/components/details/details.js +8 -20
- data/node_modules/govuk-frontend/govuk/components/details/macro-options.json +6 -0
- data/node_modules/govuk-frontend/govuk/components/details/template.njk +1 -1
- data/node_modules/govuk-frontend/govuk/components/error-message/fixtures.json +9 -0
- data/node_modules/govuk-frontend/govuk/components/error-summary/macro-options.json +6 -0
- data/node_modules/govuk-frontend/govuk/components/error-summary/template.njk +2 -2
- data/node_modules/govuk-frontend/govuk/components/footer/fixtures.json +59 -20
- data/node_modules/govuk-frontend/govuk/components/footer/macro-options.json +40 -0
- data/node_modules/govuk-frontend/govuk/components/footer/template.njk +17 -7
- data/node_modules/govuk-frontend/govuk/components/header/_index.scss +14 -21
- data/node_modules/govuk-frontend/govuk/components/header/fixtures.json +11 -11
- data/node_modules/govuk-frontend/govuk/components/header/header.js +53 -11
- data/node_modules/govuk-frontend/govuk/components/header/macro-options.json +2 -2
- data/node_modules/govuk-frontend/govuk/components/header/template.njk +1 -1
- data/node_modules/govuk-frontend/govuk/components/input/_index.scss +9 -10
- data/node_modules/govuk-frontend/govuk/components/inset-text/macro-options.json +6 -0
- data/node_modules/govuk-frontend/govuk/components/inset-text/template.njk +1 -1
- data/node_modules/govuk-frontend/govuk/components/notification-banner/macro-options.json +6 -0
- data/node_modules/govuk-frontend/govuk/components/notification-banner/template.njk +2 -2
- data/node_modules/govuk-frontend/govuk/components/panel/macro-options.json +6 -0
- data/node_modules/govuk-frontend/govuk/components/panel/template.njk +2 -2
- data/node_modules/govuk-frontend/govuk/components/select/_index.scss +6 -0
- data/node_modules/govuk-frontend/govuk/components/select/fixtures.json +15 -1
- data/node_modules/govuk-frontend/govuk/components/summary-list/_index.scss +37 -10
- data/node_modules/govuk-frontend/govuk/components/summary-list/fixtures.json +69 -4
- data/node_modules/govuk-frontend/govuk/components/summary-list/template.njk +3 -3
- data/node_modules/govuk-frontend/govuk/components/tabs/fixtures.json +13 -13
- data/node_modules/govuk-frontend/govuk/components/tabs/template.njk +5 -1
- data/node_modules/govuk-frontend/govuk/helpers/_typography.scss +14 -7
- data/node_modules/govuk-frontend/govuk/overrides/_spacing.scss +56 -12
- data/node_modules/govuk-frontend/govuk/settings/_spacing.scss +4 -8
- data/node_modules/govuk-frontend/govuk/template.njk +5 -5
- data/node_modules/govuk-frontend/govuk-esm/components/accordion/accordion.mjs +3 -13
- data/node_modules/govuk-frontend/govuk-esm/components/details/details.mjs +8 -20
- data/node_modules/govuk-frontend/govuk-esm/components/header/header.mjs +53 -11
- data/node_modules/govuk-frontend/package.json +1 -1
- data/node_modules/sortablejs/README.md +828 -815
- data/node_modules/sortablejs/Sortable.js +186 -113
- data/node_modules/sortablejs/Sortable.min.js +2 -2
- data/node_modules/sortablejs/modular/sortable.complete.esm.js +184 -111
- data/node_modules/sortablejs/modular/sortable.core.esm.js +184 -111
- data/node_modules/sortablejs/modular/sortable.esm.js +184 -111
- data/node_modules/sortablejs/package.json +3 -3
- metadata +6 -584
- data/node_modules/axe-core/CHANGELOG.md +0 -1053
- data/node_modules/axe-core/CONTRIBUTING.md +0 -187
- data/node_modules/axe-core/bower.json +0 -40
- data/node_modules/axe-core/doc/API.md +0 -889
- data/node_modules/axe-core/doc/accessibility-supported.md +0 -33
- data/node_modules/axe-core/doc/act-rules-format.md +0 -37
- data/node_modules/axe-core/doc/aria-supported.md +0 -13
- data/node_modules/axe-core/doc/backwards-compatibility-doc.md +0 -94
- data/node_modules/axe-core/doc/check-message-template.md +0 -124
- data/node_modules/axe-core/doc/code-submission-guidelines.md +0 -178
- data/node_modules/axe-core/doc/developer-guide.md +0 -514
- data/node_modules/axe-core/doc/examples/chrome-debugging-protocol/README.md +0 -13
- data/node_modules/axe-core/doc/examples/chrome-debugging-protocol/axe-cdp.js +0 -81
- data/node_modules/axe-core/doc/examples/chrome-debugging-protocol/package.json +0 -11
- data/node_modules/axe-core/doc/examples/html-handlebars.md +0 -164
- data/node_modules/axe-core/doc/examples/jasmine/README.md +0 -35
- data/node_modules/axe-core/doc/examples/jasmine/karma.conf.js +0 -29
- data/node_modules/axe-core/doc/examples/jasmine/package.json +0 -21
- data/node_modules/axe-core/doc/examples/jasmine/spec/a11y.js +0 -36
- data/node_modules/axe-core/doc/examples/jest_react/README.md +0 -41
- data/node_modules/axe-core/doc/examples/jest_react/link.js +0 -7
- data/node_modules/axe-core/doc/examples/jest_react/link.test.js +0 -24
- data/node_modules/axe-core/doc/examples/jest_react/package.json +0 -28
- data/node_modules/axe-core/doc/examples/jest_react/test-helpers.js +0 -21
- data/node_modules/axe-core/doc/examples/jsdom/package.json +0 -15
- data/node_modules/axe-core/doc/examples/mocha/README.md +0 -35
- data/node_modules/axe-core/doc/examples/mocha/karma.conf.js +0 -29
- data/node_modules/axe-core/doc/examples/mocha/package.json +0 -22
- data/node_modules/axe-core/doc/examples/phantomjs/README.md +0 -17
- data/node_modules/axe-core/doc/examples/phantomjs/axe-phantom.js +0 -53
- data/node_modules/axe-core/doc/examples/phantomjs/package.json +0 -19
- data/node_modules/axe-core/doc/examples/puppeteer/README.md +0 -12
- data/node_modules/axe-core/doc/examples/puppeteer/axe-puppeteer.js +0 -60
- data/node_modules/axe-core/doc/examples/puppeteer/package.json +0 -13
- data/node_modules/axe-core/doc/examples/qunit/README.md +0 -37
- data/node_modules/axe-core/doc/examples/qunit/package.json +0 -21
- data/node_modules/axe-core/doc/examples/test-examples.js +0 -32
- data/node_modules/axe-core/doc/plugins.md +0 -123
- data/node_modules/axe-core/doc/projects.md +0 -48
- data/node_modules/axe-core/doc/rule-descriptions.md +0 -129
- data/node_modules/axe-core/doc/rule-development.md +0 -123
- data/node_modules/axe-core/doc/rule-proposal.md +0 -106
- data/node_modules/axe-core/lib/checks/aria/abstractrole.js +0 -10
- data/node_modules/axe-core/lib/checks/aria/abstractrole.json +0 -14
- data/node_modules/axe-core/lib/checks/aria/allowed-attr.js +0 -39
- data/node_modules/axe-core/lib/checks/aria/allowed-attr.json +0 -14
- data/node_modules/axe-core/lib/checks/aria/aria-allowed-role.js +0 -28
- data/node_modules/axe-core/lib/checks/aria/aria-allowed-role.json +0 -22
- data/node_modules/axe-core/lib/checks/aria/aria-hidden-body.js +0 -1
- data/node_modules/axe-core/lib/checks/aria/aria-hidden-body.json +0 -11
- data/node_modules/axe-core/lib/checks/aria/aria-roledescription.js +0 -14
- data/node_modules/axe-core/lib/checks/aria/aria-roledescription.json +0 -23
- data/node_modules/axe-core/lib/checks/aria/errormessage.js +0 -33
- data/node_modules/axe-core/lib/checks/aria/errormessage.json +0 -14
- data/node_modules/axe-core/lib/checks/aria/fallbackrole.js +0 -1
- data/node_modules/axe-core/lib/checks/aria/fallbackrole.json +0 -11
- data/node_modules/axe-core/lib/checks/aria/has-widget-role.js +0 -6
- data/node_modules/axe-core/lib/checks/aria/has-widget-role.json +0 -12
- data/node_modules/axe-core/lib/checks/aria/implicit-role-fallback.js +0 -6
- data/node_modules/axe-core/lib/checks/aria/implicit-role-fallback.json +0 -12
- data/node_modules/axe-core/lib/checks/aria/invalidrole.js +0 -17
- data/node_modules/axe-core/lib/checks/aria/invalidrole.json +0 -14
- data/node_modules/axe-core/lib/checks/aria/no-implicit-explicit-label.js +0 -21
- data/node_modules/axe-core/lib/checks/aria/no-implicit-explicit-label.json +0 -11
- data/node_modules/axe-core/lib/checks/aria/required-attr.js +0 -53
- data/node_modules/axe-core/lib/checks/aria/required-attr.json +0 -14
- data/node_modules/axe-core/lib/checks/aria/required-children.js +0 -154
- data/node_modules/axe-core/lib/checks/aria/required-children.json +0 -32
- data/node_modules/axe-core/lib/checks/aria/required-parent.js +0 -87
- data/node_modules/axe-core/lib/checks/aria/required-parent.json +0 -14
- data/node_modules/axe-core/lib/checks/aria/unsupportedattr.js +0 -39
- data/node_modules/axe-core/lib/checks/aria/unsupportedattr.json +0 -11
- data/node_modules/axe-core/lib/checks/aria/unsupportedrole.js +0 -1
- data/node_modules/axe-core/lib/checks/aria/unsupportedrole.json +0 -11
- data/node_modules/axe-core/lib/checks/aria/valid-attr-value.js +0 -80
- data/node_modules/axe-core/lib/checks/aria/valid-attr-value.json +0 -19
- data/node_modules/axe-core/lib/checks/aria/valid-attr.js +0 -25
- data/node_modules/axe-core/lib/checks/aria/valid-attr.json +0 -15
- data/node_modules/axe-core/lib/checks/aria/valid-scrollable-semantics.js +0 -62
- data/node_modules/axe-core/lib/checks/aria/valid-scrollable-semantics.json +0 -12
- data/node_modules/axe-core/lib/checks/color/color-contrast.js +0 -86
- data/node_modules/axe-core/lib/checks/color/color-contrast.json +0 -30
- data/node_modules/axe-core/lib/checks/color/link-in-text-block.js +0 -85
- data/node_modules/axe-core/lib/checks/color/link-in-text-block.json +0 -19
- data/node_modules/axe-core/lib/checks/forms/autocomplete-appropriate.js +0 -67
- data/node_modules/axe-core/lib/checks/forms/autocomplete-appropriate.json +0 -11
- data/node_modules/axe-core/lib/checks/forms/autocomplete-valid.js +0 -2
- data/node_modules/axe-core/lib/checks/forms/autocomplete-valid.json +0 -11
- data/node_modules/axe-core/lib/checks/forms/fieldset-after.js +0 -25
- data/node_modules/axe-core/lib/checks/forms/fieldset.js +0 -109
- data/node_modules/axe-core/lib/checks/forms/fieldset.json +0 -20
- data/node_modules/axe-core/lib/checks/forms/group-labelledby-after.js +0 -16
- data/node_modules/axe-core/lib/checks/forms/group-labelledby.js +0 -66
- data/node_modules/axe-core/lib/checks/forms/group-labelledby.json +0 -17
- data/node_modules/axe-core/lib/checks/keyboard/accesskeys-after.js +0 -19
- data/node_modules/axe-core/lib/checks/keyboard/accesskeys.js +0 -5
- data/node_modules/axe-core/lib/checks/keyboard/accesskeys.json +0 -12
- data/node_modules/axe-core/lib/checks/keyboard/focusable-content.js +0 -16
- data/node_modules/axe-core/lib/checks/keyboard/focusable-content.json +0 -11
- data/node_modules/axe-core/lib/checks/keyboard/focusable-disabled.js +0 -30
- data/node_modules/axe-core/lib/checks/keyboard/focusable-disabled.json +0 -11
- data/node_modules/axe-core/lib/checks/keyboard/focusable-element.js +0 -12
- data/node_modules/axe-core/lib/checks/keyboard/focusable-element.json +0 -11
- data/node_modules/axe-core/lib/checks/keyboard/focusable-modal-open.js +0 -14
- data/node_modules/axe-core/lib/checks/keyboard/focusable-modal-open.json +0 -11
- data/node_modules/axe-core/lib/checks/keyboard/focusable-no-name.js +0 -6
- data/node_modules/axe-core/lib/checks/keyboard/focusable-no-name.json +0 -11
- data/node_modules/axe-core/lib/checks/keyboard/focusable-not-tabbable.js +0 -30
- data/node_modules/axe-core/lib/checks/keyboard/focusable-not-tabbable.json +0 -11
- data/node_modules/axe-core/lib/checks/keyboard/landmark-is-top-level.js +0 -18
- data/node_modules/axe-core/lib/checks/keyboard/landmark-is-top-level.json +0 -11
- data/node_modules/axe-core/lib/checks/keyboard/page-has-elm-after.js +0 -11
- data/node_modules/axe-core/lib/checks/keyboard/page-has-elm.js +0 -13
- data/node_modules/axe-core/lib/checks/keyboard/page-has-heading-one.json +0 -15
- data/node_modules/axe-core/lib/checks/keyboard/page-has-main.json +0 -15
- data/node_modules/axe-core/lib/checks/keyboard/page-no-duplicate-after.js +0 -2
- data/node_modules/axe-core/lib/checks/keyboard/page-no-duplicate-banner.json +0 -16
- data/node_modules/axe-core/lib/checks/keyboard/page-no-duplicate-contentinfo.json +0 -16
- data/node_modules/axe-core/lib/checks/keyboard/page-no-duplicate-main.json +0 -15
- data/node_modules/axe-core/lib/checks/keyboard/page-no-duplicate.js +0 -36
- data/node_modules/axe-core/lib/checks/keyboard/tabindex.js +0 -6
- data/node_modules/axe-core/lib/checks/keyboard/tabindex.json +0 -11
- data/node_modules/axe-core/lib/checks/label/alt-space-value.js +0 -3
- data/node_modules/axe-core/lib/checks/label/alt-space-value.json +0 -11
- data/node_modules/axe-core/lib/checks/label/duplicate-img-label.js +0 -22
- data/node_modules/axe-core/lib/checks/label/duplicate-img-label.json +0 -11
- data/node_modules/axe-core/lib/checks/label/explicit.js +0 -15
- data/node_modules/axe-core/lib/checks/label/explicit.json +0 -11
- data/node_modules/axe-core/lib/checks/label/help-same-as-label.js +0 -23
- data/node_modules/axe-core/lib/checks/label/help-same-as-label.json +0 -12
- data/node_modules/axe-core/lib/checks/label/hidden-explicit-label.js +0 -12
- data/node_modules/axe-core/lib/checks/label/hidden-explicit-label.json +0 -11
- data/node_modules/axe-core/lib/checks/label/implicit.js +0 -7
- data/node_modules/axe-core/lib/checks/label/implicit.json +0 -11
- data/node_modules/axe-core/lib/checks/label/label-content-name-mismatch.js +0 -59
- data/node_modules/axe-core/lib/checks/label/label-content-name-mismatch.json +0 -15
- data/node_modules/axe-core/lib/checks/label/multiple-label.js +0 -39
- data/node_modules/axe-core/lib/checks/label/multiple-label.json +0 -11
- data/node_modules/axe-core/lib/checks/label/title-only.js +0 -5
- data/node_modules/axe-core/lib/checks/label/title-only.json +0 -11
- data/node_modules/axe-core/lib/checks/landmarks/landmark-is-unique-after.js +0 -23
- data/node_modules/axe-core/lib/checks/landmarks/landmark-is-unique.js +0 -7
- data/node_modules/axe-core/lib/checks/landmarks/landmark-is-unique.json +0 -12
- data/node_modules/axe-core/lib/checks/language/has-lang.js +0 -20
- data/node_modules/axe-core/lib/checks/language/has-lang.json +0 -14
- data/node_modules/axe-core/lib/checks/language/valid-lang.js +0 -26
- data/node_modules/axe-core/lib/checks/language/valid-lang.json +0 -11
- data/node_modules/axe-core/lib/checks/language/xml-lang-mismatch.js +0 -5
- data/node_modules/axe-core/lib/checks/language/xml-lang-mismatch.json +0 -11
- data/node_modules/axe-core/lib/checks/lists/dlitem.js +0 -23
- data/node_modules/axe-core/lib/checks/lists/dlitem.json +0 -11
- data/node_modules/axe-core/lib/checks/lists/listitem.js +0 -21
- data/node_modules/axe-core/lib/checks/lists/listitem.json +0 -14
- data/node_modules/axe-core/lib/checks/lists/only-dlitems.js +0 -42
- data/node_modules/axe-core/lib/checks/lists/only-dlitems.json +0 -11
- data/node_modules/axe-core/lib/checks/lists/only-listitems.js +0 -58
- data/node_modules/axe-core/lib/checks/lists/only-listitems.json +0 -14
- data/node_modules/axe-core/lib/checks/lists/structured-dlitems.js +0 -22
- data/node_modules/axe-core/lib/checks/lists/structured-dlitems.json +0 -11
- data/node_modules/axe-core/lib/checks/media/caption.js +0 -8
- data/node_modules/axe-core/lib/checks/media/caption.json +0 -11
- data/node_modules/axe-core/lib/checks/media/description.js +0 -8
- data/node_modules/axe-core/lib/checks/media/description.json +0 -11
- data/node_modules/axe-core/lib/checks/media/frame-tested.js +0 -28
- data/node_modules/axe-core/lib/checks/media/frame-tested.json +0 -15
- data/node_modules/axe-core/lib/checks/media/no-autoplay-audio.js +0 -93
- data/node_modules/axe-core/lib/checks/media/no-autoplay-audio.json +0 -15
- data/node_modules/axe-core/lib/checks/mobile/css-orientation-lock.js +0 -251
- data/node_modules/axe-core/lib/checks/mobile/css-orientation-lock.json +0 -15
- data/node_modules/axe-core/lib/checks/mobile/meta-viewport-large.json +0 -15
- data/node_modules/axe-core/lib/checks/mobile/meta-viewport-scale.js +0 -55
- data/node_modules/axe-core/lib/checks/mobile/meta-viewport.json +0 -14
- data/node_modules/axe-core/lib/checks/navigation/header-present.js +0 -4
- data/node_modules/axe-core/lib/checks/navigation/header-present.json +0 -11
- data/node_modules/axe-core/lib/checks/navigation/heading-order-after.js +0 -14
- data/node_modules/axe-core/lib/checks/navigation/heading-order.js +0 -15
- data/node_modules/axe-core/lib/checks/navigation/heading-order.json +0 -12
- data/node_modules/axe-core/lib/checks/navigation/identical-links-same-purpose-after.js +0 -100
- data/node_modules/axe-core/lib/checks/navigation/identical-links-same-purpose.js +0 -31
- data/node_modules/axe-core/lib/checks/navigation/identical-links-same-purpose.json +0 -12
- data/node_modules/axe-core/lib/checks/navigation/internal-link-present.js +0 -4
- data/node_modules/axe-core/lib/checks/navigation/internal-link-present.json +0 -11
- data/node_modules/axe-core/lib/checks/navigation/landmark.js +0 -3
- data/node_modules/axe-core/lib/checks/navigation/landmark.json +0 -11
- data/node_modules/axe-core/lib/checks/navigation/meta-refresh.js +0 -4
- data/node_modules/axe-core/lib/checks/navigation/meta-refresh.json +0 -11
- data/node_modules/axe-core/lib/checks/navigation/p-as-heading.js +0 -93
- data/node_modules/axe-core/lib/checks/navigation/p-as-heading.json +0 -30
- data/node_modules/axe-core/lib/checks/navigation/region.js +0 -107
- data/node_modules/axe-core/lib/checks/navigation/region.json +0 -11
- data/node_modules/axe-core/lib/checks/navigation/skip-link.js +0 -5
- data/node_modules/axe-core/lib/checks/navigation/skip-link.json +0 -12
- data/node_modules/axe-core/lib/checks/navigation/unique-frame-title-after.js +0 -9
- data/node_modules/axe-core/lib/checks/navigation/unique-frame-title.js +0 -6
- data/node_modules/axe-core/lib/checks/navigation/unique-frame-title.json +0 -12
- data/node_modules/axe-core/lib/checks/parsing/duplicate-id-active.json +0 -12
- data/node_modules/axe-core/lib/checks/parsing/duplicate-id-after.js +0 -8
- data/node_modules/axe-core/lib/checks/parsing/duplicate-id-aria.json +0 -12
- data/node_modules/axe-core/lib/checks/parsing/duplicate-id.js +0 -17
- data/node_modules/axe-core/lib/checks/parsing/duplicate-id.json +0 -12
- data/node_modules/axe-core/lib/checks/shared/aria-label.js +0 -2
- data/node_modules/axe-core/lib/checks/shared/aria-label.json +0 -11
- data/node_modules/axe-core/lib/checks/shared/aria-labelledby.js +0 -2
- data/node_modules/axe-core/lib/checks/shared/aria-labelledby.json +0 -11
- data/node_modules/axe-core/lib/checks/shared/avoid-inline-spacing.js +0 -18
- data/node_modules/axe-core/lib/checks/shared/avoid-inline-spacing.json +0 -14
- data/node_modules/axe-core/lib/checks/shared/button-has-visible-text.js +0 -12
- data/node_modules/axe-core/lib/checks/shared/button-has-visible-text.json +0 -11
- data/node_modules/axe-core/lib/checks/shared/doc-has-title.js +0 -2
- data/node_modules/axe-core/lib/checks/shared/doc-has-title.json +0 -11
- data/node_modules/axe-core/lib/checks/shared/exists.js +0 -1
- data/node_modules/axe-core/lib/checks/shared/exists.json +0 -11
- data/node_modules/axe-core/lib/checks/shared/has-alt.js +0 -6
- data/node_modules/axe-core/lib/checks/shared/has-alt.json +0 -11
- data/node_modules/axe-core/lib/checks/shared/has-visible-text.js +0 -1
- data/node_modules/axe-core/lib/checks/shared/has-visible-text.json +0 -11
- data/node_modules/axe-core/lib/checks/shared/is-on-screen.js +0 -4
- data/node_modules/axe-core/lib/checks/shared/is-on-screen.json +0 -11
- data/node_modules/axe-core/lib/checks/shared/non-empty-alt.js +0 -2
- data/node_modules/axe-core/lib/checks/shared/non-empty-alt.json +0 -11
- data/node_modules/axe-core/lib/checks/shared/non-empty-if-present.js +0 -15
- data/node_modules/axe-core/lib/checks/shared/non-empty-if-present.json +0 -14
- data/node_modules/axe-core/lib/checks/shared/non-empty-title.js +0 -2
- data/node_modules/axe-core/lib/checks/shared/non-empty-title.json +0 -11
- data/node_modules/axe-core/lib/checks/shared/non-empty-value.js +0 -2
- data/node_modules/axe-core/lib/checks/shared/non-empty-value.json +0 -11
- data/node_modules/axe-core/lib/checks/shared/role-none.js +0 -1
- data/node_modules/axe-core/lib/checks/shared/role-none.json +0 -11
- data/node_modules/axe-core/lib/checks/shared/role-presentation.js +0 -1
- data/node_modules/axe-core/lib/checks/shared/role-presentation.json +0 -11
- data/node_modules/axe-core/lib/checks/shared/svg-non-empty-title.js +0 -4
- data/node_modules/axe-core/lib/checks/shared/svg-non-empty-title.json +0 -11
- data/node_modules/axe-core/lib/checks/tables/caption-faked.js +0 -10
- data/node_modules/axe-core/lib/checks/tables/caption-faked.json +0 -11
- data/node_modules/axe-core/lib/checks/tables/has-caption.js +0 -1
- data/node_modules/axe-core/lib/checks/tables/has-caption.json +0 -12
- data/node_modules/axe-core/lib/checks/tables/has-summary.js +0 -1
- data/node_modules/axe-core/lib/checks/tables/has-summary.json +0 -12
- data/node_modules/axe-core/lib/checks/tables/has-th.js +0 -31
- data/node_modules/axe-core/lib/checks/tables/has-th.json +0 -12
- data/node_modules/axe-core/lib/checks/tables/headers-visible-text.js +0 -30
- data/node_modules/axe-core/lib/checks/tables/html5-scope.js +0 -5
- data/node_modules/axe-core/lib/checks/tables/html5-scope.json +0 -11
- data/node_modules/axe-core/lib/checks/tables/same-caption-summary.js +0 -7
- data/node_modules/axe-core/lib/checks/tables/same-caption-summary.json +0 -11
- data/node_modules/axe-core/lib/checks/tables/scope-value.js +0 -5
- data/node_modules/axe-core/lib/checks/tables/scope-value.json +0 -11
- data/node_modules/axe-core/lib/checks/tables/td-has-header.js +0 -30
- data/node_modules/axe-core/lib/checks/tables/td-has-header.json +0 -11
- data/node_modules/axe-core/lib/checks/tables/td-headers-attr.js +0 -61
- data/node_modules/axe-core/lib/checks/tables/td-headers-attr.json +0 -12
- data/node_modules/axe-core/lib/checks/tables/th-has-data-cells.js +0 -76
- data/node_modules/axe-core/lib/checks/tables/th-has-data-cells.json +0 -12
- data/node_modules/axe-core/lib/checks/tables/th-single-row-column.js +0 -39
- data/node_modules/axe-core/lib/checks/visibility/hidden-content.js +0 -21
- data/node_modules/axe-core/lib/checks/visibility/hidden-content.json +0 -12
- data/node_modules/axe-core/lib/commons/aria/arialabel-text.js +0 -18
- data/node_modules/axe-core/lib/commons/aria/arialabelledby-text.js +0 -52
- data/node_modules/axe-core/lib/commons/aria/attributes.js +0 -45
- data/node_modules/axe-core/lib/commons/aria/get-element-unallowed-roles.js +0 -113
- data/node_modules/axe-core/lib/commons/aria/get-owned-virtual.js +0 -24
- data/node_modules/axe-core/lib/commons/aria/get-role.js +0 -44
- data/node_modules/axe-core/lib/commons/aria/index.js +0 -2424
- data/node_modules/axe-core/lib/commons/aria/is-accessible-ref.js +0 -59
- data/node_modules/axe-core/lib/commons/aria/is-aria-role-allowed-on-element.js +0 -41
- data/node_modules/axe-core/lib/commons/aria/is-unsupported-role.js +0 -14
- data/node_modules/axe-core/lib/commons/aria/label-virtual.js +0 -54
- data/node_modules/axe-core/lib/commons/aria/named-from-contents.js +0 -39
- data/node_modules/axe-core/lib/commons/aria/roles.js +0 -208
- data/node_modules/axe-core/lib/commons/aria/validate-attr-value.js +0 -62
- data/node_modules/axe-core/lib/commons/color/center-point-of-rect.js +0 -30
- data/node_modules/axe-core/lib/commons/color/contrast.js +0 -178
- data/node_modules/axe-core/lib/commons/color/element-has-image.js +0 -36
- data/node_modules/axe-core/lib/commons/color/element-is-distinct.js +0 -88
- data/node_modules/axe-core/lib/commons/color/get-background-color.js +0 -285
- data/node_modules/axe-core/lib/commons/color/get-foreground-color.js +0 -61
- data/node_modules/axe-core/lib/commons/color/get-own-background-color.js +0 -22
- data/node_modules/axe-core/lib/commons/color/incomplete-data.js +0 -50
- data/node_modules/axe-core/lib/commons/color/index.js +0 -8
- data/node_modules/axe-core/lib/commons/dom/elements-below-floating.js +0 -39
- data/node_modules/axe-core/lib/commons/dom/find-elms-in-context.js +0 -28
- data/node_modules/axe-core/lib/commons/dom/find-up.js +0 -63
- data/node_modules/axe-core/lib/commons/dom/get-composed-parent.js +0 -25
- data/node_modules/axe-core/lib/commons/dom/get-element-by-reference.js +0 -34
- data/node_modules/axe-core/lib/commons/dom/get-element-coordinates.js +0 -38
- data/node_modules/axe-core/lib/commons/dom/get-element-stack.js +0 -589
- data/node_modules/axe-core/lib/commons/dom/get-root-node.js +0 -12
- data/node_modules/axe-core/lib/commons/dom/get-scroll-offset.js +0 -33
- data/node_modules/axe-core/lib/commons/dom/get-tabbable-elements.js +0 -24
- data/node_modules/axe-core/lib/commons/dom/get-viewport-size.js +0 -37
- data/node_modules/axe-core/lib/commons/dom/has-content-virtual.js +0 -75
- data/node_modules/axe-core/lib/commons/dom/idrefs.js +0 -36
- data/node_modules/axe-core/lib/commons/dom/index.js +0 -9
- data/node_modules/axe-core/lib/commons/dom/is-focusable.js +0 -95
- data/node_modules/axe-core/lib/commons/dom/is-hidden-with-css.js +0 -73
- data/node_modules/axe-core/lib/commons/dom/is-html5.js +0 -17
- data/node_modules/axe-core/lib/commons/dom/is-in-text-block.js +0 -94
- data/node_modules/axe-core/lib/commons/dom/is-modal-open.js +0 -98
- data/node_modules/axe-core/lib/commons/dom/is-node.js +0 -13
- data/node_modules/axe-core/lib/commons/dom/is-offscreen.js +0 -62
- data/node_modules/axe-core/lib/commons/dom/is-skip-link.js +0 -45
- data/node_modules/axe-core/lib/commons/dom/is-visible.js +0 -176
- data/node_modules/axe-core/lib/commons/dom/is-visual-content.js +0 -49
- data/node_modules/axe-core/lib/commons/dom/shadow-elements-from-point.js +0 -42
- data/node_modules/axe-core/lib/commons/dom/url-props-from-attribute.js +0 -152
- data/node_modules/axe-core/lib/commons/dom/visually-contains.js +0 -111
- data/node_modules/axe-core/lib/commons/dom/visually-overlaps.js +0 -46
- data/node_modules/axe-core/lib/commons/forms/index.js +0 -8
- data/node_modules/axe-core/lib/commons/forms/is-aria-combobox.js +0 -13
- data/node_modules/axe-core/lib/commons/forms/is-aria-listbox.js +0 -13
- data/node_modules/axe-core/lib/commons/forms/is-aria-range.js +0 -14
- data/node_modules/axe-core/lib/commons/forms/is-aria-textbox.js +0 -13
- data/node_modules/axe-core/lib/commons/forms/is-native-select.js +0 -13
- data/node_modules/axe-core/lib/commons/forms/is-native-textbox.js +0 -28
- data/node_modules/axe-core/lib/commons/index.js +0 -11
- data/node_modules/axe-core/lib/commons/intro.stub +0 -1
- data/node_modules/axe-core/lib/commons/matches/attributes.js +0 -27
- data/node_modules/axe-core/lib/commons/matches/condition.js +0 -19
- data/node_modules/axe-core/lib/commons/matches/from-definition.js +0 -52
- data/node_modules/axe-core/lib/commons/matches/from-function.js +0 -38
- data/node_modules/axe-core/lib/commons/matches/from-primative.js +0 -30
- data/node_modules/axe-core/lib/commons/matches/index.js +0 -39
- data/node_modules/axe-core/lib/commons/matches/node-name.js +0 -24
- data/node_modules/axe-core/lib/commons/matches/properties.js +0 -28
- data/node_modules/axe-core/lib/commons/outro.stub +0 -2
- data/node_modules/axe-core/lib/commons/table/get-all-cells.js +0 -28
- data/node_modules/axe-core/lib/commons/table/get-cell-position.js +0 -28
- data/node_modules/axe-core/lib/commons/table/get-headers.js +0 -79
- data/node_modules/axe-core/lib/commons/table/get-scope.js +0 -54
- data/node_modules/axe-core/lib/commons/table/index.js +0 -9
- data/node_modules/axe-core/lib/commons/table/is-column-header.js +0 -13
- data/node_modules/axe-core/lib/commons/table/is-data-cell.js +0 -22
- data/node_modules/axe-core/lib/commons/table/is-data-table.js +0 -189
- data/node_modules/axe-core/lib/commons/table/is-header.js +0 -22
- data/node_modules/axe-core/lib/commons/table/is-row-header.js +0 -13
- data/node_modules/axe-core/lib/commons/table/to-grid.js +0 -38
- data/node_modules/axe-core/lib/commons/table/traverse.js +0 -78
- data/node_modules/axe-core/lib/commons/text/accessible-text-virtual.js +0 -152
- data/node_modules/axe-core/lib/commons/text/form-control-value.js +0 -192
- data/node_modules/axe-core/lib/commons/text/index.js +0 -8
- data/node_modules/axe-core/lib/commons/text/is-human-interpretable.js +0 -51
- data/node_modules/axe-core/lib/commons/text/is-icon-ligature.js +0 -210
- data/node_modules/axe-core/lib/commons/text/is-valid-autocomplete.js +0 -117
- data/node_modules/axe-core/lib/commons/text/label-text.js +0 -58
- data/node_modules/axe-core/lib/commons/text/label-virtual.js +0 -53
- data/node_modules/axe-core/lib/commons/text/native-element-types.js +0 -100
- data/node_modules/axe-core/lib/commons/text/native-text-alternative.js +0 -50
- data/node_modules/axe-core/lib/commons/text/native-text-methods.js +0 -122
- data/node_modules/axe-core/lib/commons/text/sanitize.js +0 -18
- data/node_modules/axe-core/lib/commons/text/subtree-text.js +0 -89
- data/node_modules/axe-core/lib/commons/text/title-text.js +0 -33
- data/node_modules/axe-core/lib/commons/text/unicode.js +0 -147
- data/node_modules/axe-core/lib/commons/text/unsupported.js +0 -5
- data/node_modules/axe-core/lib/commons/text/visible-text-nodes.js +0 -25
- data/node_modules/axe-core/lib/commons/text/visible-virtual.js +0 -46
- data/node_modules/axe-core/lib/commons/utils/index.js +0 -10
- data/node_modules/axe-core/lib/core/base/audit.js +0 -781
- data/node_modules/axe-core/lib/core/base/cache.js +0 -33
- data/node_modules/axe-core/lib/core/base/check-result.js +0 -33
- data/node_modules/axe-core/lib/core/base/check.js +0 -170
- data/node_modules/axe-core/lib/core/base/context.js +0 -274
- data/node_modules/axe-core/lib/core/base/rule-result.js +0 -39
- data/node_modules/axe-core/lib/core/base/rule.js +0 -560
- data/node_modules/axe-core/lib/core/base/virtual-node/abstract-virtual-node.js +0 -40
- data/node_modules/axe-core/lib/core/base/virtual-node/serial-virtual-node.js +0 -88
- data/node_modules/axe-core/lib/core/base/virtual-node/virtual-node.js +0 -136
- data/node_modules/axe-core/lib/core/constants.js +0 -76
- data/node_modules/axe-core/lib/core/imports/index.js +0 -51
- data/node_modules/axe-core/lib/core/index.js +0 -43
- data/node_modules/axe-core/lib/core/log.js +0 -12
- data/node_modules/axe-core/lib/core/public/cleanup-plugins.js +0 -53
- data/node_modules/axe-core/lib/core/public/configure.js +0 -110
- data/node_modules/axe-core/lib/core/public/get-rules.js +0 -29
- data/node_modules/axe-core/lib/core/public/load.js +0 -66
- data/node_modules/axe-core/lib/core/public/plugins.js +0 -47
- data/node_modules/axe-core/lib/core/public/reporter.js +0 -24
- data/node_modules/axe-core/lib/core/public/reset.js +0 -12
- data/node_modules/axe-core/lib/core/public/run-rules.js +0 -96
- data/node_modules/axe-core/lib/core/public/run-virtual-rule.js +0 -50
- data/node_modules/axe-core/lib/core/public/run.js +0 -159
- data/node_modules/axe-core/lib/core/reporters/helpers/failure-summary.js +0 -35
- data/node_modules/axe-core/lib/core/reporters/helpers/get-environment-data.js +0 -39
- data/node_modules/axe-core/lib/core/reporters/helpers/incomplete-fallback-msg.js +0 -13
- data/node_modules/axe-core/lib/core/reporters/helpers/index.js +0 -3
- data/node_modules/axe-core/lib/core/reporters/helpers/process-aggregate.js +0 -102
- data/node_modules/axe-core/lib/core/reporters/na.js +0 -24
- data/node_modules/axe-core/lib/core/reporters/no-passes.js +0 -18
- data/node_modules/axe-core/lib/core/reporters/raw-env.js +0 -12
- data/node_modules/axe-core/lib/core/reporters/raw.js +0 -32
- data/node_modules/axe-core/lib/core/reporters/v1.js +0 -29
- data/node_modules/axe-core/lib/core/reporters/v2.js +0 -22
- data/node_modules/axe-core/lib/core/utils/aggregate.js +0 -19
- data/node_modules/axe-core/lib/core/utils/aggregateChecks.js +0 -85
- data/node_modules/axe-core/lib/core/utils/aggregateNodeResults.js +0 -61
- data/node_modules/axe-core/lib/core/utils/aggregateResult.js +0 -37
- data/node_modules/axe-core/lib/core/utils/are-styles-set.js +0 -21
- data/node_modules/axe-core/lib/core/utils/assert.js +0 -12
- data/node_modules/axe-core/lib/core/utils/check-helper.js +0 -38
- data/node_modules/axe-core/lib/core/utils/clone.js +0 -27
- data/node_modules/axe-core/lib/core/utils/collect-results-from-frames.js +0 -127
- data/node_modules/axe-core/lib/core/utils/contains.js +0 -44
- data/node_modules/axe-core/lib/core/utils/css-parser.js +0 -7
- data/node_modules/axe-core/lib/core/utils/dq-element.js +0 -97
- data/node_modules/axe-core/lib/core/utils/element-matches.js +0 -43
- data/node_modules/axe-core/lib/core/utils/escape-selector.js +0 -78
- data/node_modules/axe-core/lib/core/utils/extend-meta-data.js +0 -17
- data/node_modules/axe-core/lib/core/utils/finalize-result.js +0 -11
- data/node_modules/axe-core/lib/core/utils/find-by.js +0 -14
- data/node_modules/axe-core/lib/core/utils/flattened-tree.js +0 -156
- data/node_modules/axe-core/lib/core/utils/get-all-checks.js +0 -12
- data/node_modules/axe-core/lib/core/utils/get-base-lang.js +0 -16
- data/node_modules/axe-core/lib/core/utils/get-check-message.js +0 -21
- data/node_modules/axe-core/lib/core/utils/get-check-option.js +0 -39
- data/node_modules/axe-core/lib/core/utils/get-friendly-uri-end.js +0 -144
- data/node_modules/axe-core/lib/core/utils/get-node-attributes.js +0 -21
- data/node_modules/axe-core/lib/core/utils/get-root-node.js +0 -17
- data/node_modules/axe-core/lib/core/utils/get-scroll.js +0 -39
- data/node_modules/axe-core/lib/core/utils/get-selector.js +0 -409
- data/node_modules/axe-core/lib/core/utils/get-stylesheet-factory.js +0 -51
- data/node_modules/axe-core/lib/core/utils/get-xpath.js +0 -83
- data/node_modules/axe-core/lib/core/utils/index.js +0 -10
- data/node_modules/axe-core/lib/core/utils/inject-style.js +0 -38
- data/node_modules/axe-core/lib/core/utils/is-hidden.js +0 -52
- data/node_modules/axe-core/lib/core/utils/is-html-element.js +0 -135
- data/node_modules/axe-core/lib/core/utils/is-shadow-root.js +0 -40
- data/node_modules/axe-core/lib/core/utils/is-xhtml.js +0 -14
- data/node_modules/axe-core/lib/core/utils/matches.js +0 -263
- data/node_modules/axe-core/lib/core/utils/memoize.js +0 -17
- data/node_modules/axe-core/lib/core/utils/merge-results.js +0 -116
- data/node_modules/axe-core/lib/core/utils/node-sorter.js +0 -21
- data/node_modules/axe-core/lib/core/utils/parse-crossorigin-stylesheet.js +0 -54
- data/node_modules/axe-core/lib/core/utils/parse-sameorigin-stylesheet.js +0 -96
- data/node_modules/axe-core/lib/core/utils/parse-stylesheet.js +0 -70
- data/node_modules/axe-core/lib/core/utils/performance-timer.js +0 -126
- data/node_modules/axe-core/lib/core/utils/pollyfills.js +0 -299
- data/node_modules/axe-core/lib/core/utils/preload-cssom.js +0 -253
- data/node_modules/axe-core/lib/core/utils/preload-media.js +0 -65
- data/node_modules/axe-core/lib/core/utils/preload.js +0 -144
- data/node_modules/axe-core/lib/core/utils/process-message.js +0 -72
- data/node_modules/axe-core/lib/core/utils/publish-metadata.js +0 -106
- data/node_modules/axe-core/lib/core/utils/qsa.js +0 -110
- data/node_modules/axe-core/lib/core/utils/queue.js +0 -138
- data/node_modules/axe-core/lib/core/utils/respondable.js +0 -261
- data/node_modules/axe-core/lib/core/utils/rule-should-run.js +0 -82
- data/node_modules/axe-core/lib/core/utils/scroll-state.js +0 -57
- data/node_modules/axe-core/lib/core/utils/select.js +0 -135
- data/node_modules/axe-core/lib/core/utils/to-array.js +0 -21
- data/node_modules/axe-core/lib/core/utils/token-list.js +0 -15
- data/node_modules/axe-core/lib/core/utils/uuid.js +0 -244
- data/node_modules/axe-core/lib/core/utils/valid-input-type.js +0 -35
- data/node_modules/axe-core/lib/core/utils/valid-langs.js +0 -8152
- data/node_modules/axe-core/lib/intro.stub +0 -15
- data/node_modules/axe-core/lib/misc/any-failure-summary.json +0 -6
- data/node_modules/axe-core/lib/misc/incomplete-fallback.json +0 -3
- data/node_modules/axe-core/lib/misc/none-failure-summary.json +0 -6
- data/node_modules/axe-core/lib/outro.stub +0 -2
- data/node_modules/axe-core/lib/rules/accesskeys.json +0 -13
- data/node_modules/axe-core/lib/rules/area-alt.json +0 -21
- data/node_modules/axe-core/lib/rules/aria-allowed-attr-matches.js +0 -11
- data/node_modules/axe-core/lib/rules/aria-allowed-attr.json +0 -12
- data/node_modules/axe-core/lib/rules/aria-allowed-role-matches.js +0 -7
- data/node_modules/axe-core/lib/rules/aria-allowed-role.json +0 -14
- data/node_modules/axe-core/lib/rules/aria-dpub-role-fallback-matches.js +0 -10
- data/node_modules/axe-core/lib/rules/aria-dpub-role-fallback.json +0 -14
- data/node_modules/axe-core/lib/rules/aria-form-field-name-matches.js +0 -50
- data/node_modules/axe-core/lib/rules/aria-has-attr-matches.js +0 -11
- data/node_modules/axe-core/lib/rules/aria-hidden-body.json +0 -13
- data/node_modules/axe-core/lib/rules/aria-hidden-focus-matches.js +0 -18
- data/node_modules/axe-core/lib/rules/aria-hidden-focus.json +0 -18
- data/node_modules/axe-core/lib/rules/aria-input-field-name.json +0 -13
- data/node_modules/axe-core/lib/rules/aria-required-attr.json +0 -12
- data/node_modules/axe-core/lib/rules/aria-required-children.json +0 -12
- data/node_modules/axe-core/lib/rules/aria-required-parent.json +0 -12
- data/node_modules/axe-core/lib/rules/aria-roledescription.json +0 -12
- data/node_modules/axe-core/lib/rules/aria-roles.json +0 -13
- data/node_modules/axe-core/lib/rules/aria-toggle-field-name.json +0 -18
- data/node_modules/axe-core/lib/rules/aria-valid-attr-value.json +0 -12
- data/node_modules/axe-core/lib/rules/aria-valid-attr.json +0 -12
- data/node_modules/axe-core/lib/rules/audio-caption.json +0 -20
- data/node_modules/axe-core/lib/rules/autocomplete-matches.js +0 -49
- data/node_modules/axe-core/lib/rules/autocomplete-valid.json +0 -12
- data/node_modules/axe-core/lib/rules/avoid-inline-spacing.json +0 -12
- data/node_modules/axe-core/lib/rules/blink.json +0 -19
- data/node_modules/axe-core/lib/rules/button-name.json +0 -25
- data/node_modules/axe-core/lib/rules/bypass-matches.js +0 -1
- data/node_modules/axe-core/lib/rules/bypass.json +0 -20
- data/node_modules/axe-core/lib/rules/checkboxgroup.json +0 -13
- data/node_modules/axe-core/lib/rules/color-contrast-matches.js +0 -161
- data/node_modules/axe-core/lib/rules/color-contrast.json +0 -13
- data/node_modules/axe-core/lib/rules/css-orientation-lock.json +0 -13
- data/node_modules/axe-core/lib/rules/data-table-large-matches.js +0 -11
- data/node_modules/axe-core/lib/rules/data-table-matches.js +0 -1
- data/node_modules/axe-core/lib/rules/definition-list.json +0 -13
- data/node_modules/axe-core/lib/rules/dlitem.json +0 -13
- data/node_modules/axe-core/lib/rules/document-title.json +0 -13
- data/node_modules/axe-core/lib/rules/duplicate-id-active-matches.js +0 -8
- data/node_modules/axe-core/lib/rules/duplicate-id-active.json +0 -14
- data/node_modules/axe-core/lib/rules/duplicate-id-aria-matches.js +0 -1
- data/node_modules/axe-core/lib/rules/duplicate-id-aria.json +0 -14
- data/node_modules/axe-core/lib/rules/duplicate-id-misc-matches.js +0 -11
- data/node_modules/axe-core/lib/rules/duplicate-id.json +0 -14
- data/node_modules/axe-core/lib/rules/empty-heading.json +0 -13
- data/node_modules/axe-core/lib/rules/focus-order-semantics.json +0 -13
- data/node_modules/axe-core/lib/rules/form-field-multiple-labels.json +0 -13
- data/node_modules/axe-core/lib/rules/frame-tested.json +0 -12
- data/node_modules/axe-core/lib/rules/frame-title-has-text.js +0 -2
- data/node_modules/axe-core/lib/rules/frame-title-unique.json +0 -13
- data/node_modules/axe-core/lib/rules/frame-title.json +0 -25
- data/node_modules/axe-core/lib/rules/heading-matches.js +0 -15
- data/node_modules/axe-core/lib/rules/heading-order.json +0 -13
- data/node_modules/axe-core/lib/rules/hidden-content.json +0 -13
- data/node_modules/axe-core/lib/rules/html-has-lang.json +0 -13
- data/node_modules/axe-core/lib/rules/html-lang-valid.json +0 -12
- data/node_modules/axe-core/lib/rules/html-namespace-matches.js +0 -1
- data/node_modules/axe-core/lib/rules/html-xml-lang-mismatch.json +0 -13
- data/node_modules/axe-core/lib/rules/identical-links-same-purpose-matches.js +0 -13
- data/node_modules/axe-core/lib/rules/identical-links-same-purpose.json +0 -14
- data/node_modules/axe-core/lib/rules/image-alt.json +0 -25
- data/node_modules/axe-core/lib/rules/img-redundant-alt.json +0 -12
- data/node_modules/axe-core/lib/rules/input-button-name.json +0 -26
- data/node_modules/axe-core/lib/rules/input-image-alt.json +0 -18
- data/node_modules/axe-core/lib/rules/inserted-into-focus-order-matches.js +0 -1
- data/node_modules/axe-core/lib/rules/label-content-name-mismatch-matches.js +0 -45
- data/node_modules/axe-core/lib/rules/label-content-name-mismatch.json +0 -12
- data/node_modules/axe-core/lib/rules/label-matches.js +0 -11
- data/node_modules/axe-core/lib/rules/label-title-only.json +0 -13
- data/node_modules/axe-core/lib/rules/label.json +0 -26
- data/node_modules/axe-core/lib/rules/landmark-banner-is-top-level.json +0 -13
- data/node_modules/axe-core/lib/rules/landmark-complementary-is-top-level.json +0 -12
- data/node_modules/axe-core/lib/rules/landmark-contentinfo-is-top-level.json +0 -13
- data/node_modules/axe-core/lib/rules/landmark-has-body-context.js +0 -8
- data/node_modules/axe-core/lib/rules/landmark-main-is-top-level.json +0 -12
- data/node_modules/axe-core/lib/rules/landmark-no-duplicate-banner.json +0 -12
- data/node_modules/axe-core/lib/rules/landmark-no-duplicate-contentinfo.json +0 -12
- data/node_modules/axe-core/lib/rules/landmark-no-duplicate-main.json +0 -12
- data/node_modules/axe-core/lib/rules/landmark-one-main.json +0 -12
- data/node_modules/axe-core/lib/rules/landmark-unique-matches.js +0 -41
- data/node_modules/axe-core/lib/rules/landmark-unique.json +0 -13
- data/node_modules/axe-core/lib/rules/layout-table-matches.js +0 -8
- data/node_modules/axe-core/lib/rules/layout-table.json +0 -14
- data/node_modules/axe-core/lib/rules/link-in-text-block-matches.js +0 -14
- data/node_modules/axe-core/lib/rules/link-in-text-block.json +0 -14
- data/node_modules/axe-core/lib/rules/link-name.json +0 -25
- data/node_modules/axe-core/lib/rules/list.json +0 -13
- data/node_modules/axe-core/lib/rules/listitem.json +0 -13
- data/node_modules/axe-core/lib/rules/marquee.json +0 -13
- data/node_modules/axe-core/lib/rules/meta-refresh.json +0 -20
- data/node_modules/axe-core/lib/rules/meta-viewport-large.json +0 -13
- data/node_modules/axe-core/lib/rules/meta-viewport.json +0 -13
- data/node_modules/axe-core/lib/rules/no-autoplay-audio-matches.js +0 -18
- data/node_modules/axe-core/lib/rules/no-autoplay-audio.json +0 -15
- data/node_modules/axe-core/lib/rules/no-empty-role-matches.js +0 -9
- data/node_modules/axe-core/lib/rules/no-role-matches.js +0 -1
- data/node_modules/axe-core/lib/rules/not-html-matches.js +0 -1
- data/node_modules/axe-core/lib/rules/object-alt.json +0 -25
- data/node_modules/axe-core/lib/rules/p-as-heading-matches.js +0 -17
- data/node_modules/axe-core/lib/rules/p-as-heading.json +0 -13
- data/node_modules/axe-core/lib/rules/page-has-heading-one.json +0 -12
- data/node_modules/axe-core/lib/rules/radiogroup.json +0 -13
- data/node_modules/axe-core/lib/rules/region.json +0 -12
- data/node_modules/axe-core/lib/rules/role-img-alt.json +0 -19
- data/node_modules/axe-core/lib/rules/scope-attr-valid.json +0 -12
- data/node_modules/axe-core/lib/rules/scrollable-region-focusable-matches.js +0 -30
- data/node_modules/axe-core/lib/rules/scrollable-region-focusable.json +0 -12
- data/node_modules/axe-core/lib/rules/server-side-image-map.json +0 -18
- data/node_modules/axe-core/lib/rules/skip-link-matches.js +0 -1
- data/node_modules/axe-core/lib/rules/skip-link.json +0 -13
- data/node_modules/axe-core/lib/rules/svg-img-alt.json +0 -24
- data/node_modules/axe-core/lib/rules/svg-namespace-matches.js +0 -1
- data/node_modules/axe-core/lib/rules/tabindex.json +0 -12
- data/node_modules/axe-core/lib/rules/table-duplicate-name.json +0 -12
- data/node_modules/axe-core/lib/rules/table-fake-caption.json +0 -20
- data/node_modules/axe-core/lib/rules/td-has-header.json +0 -20
- data/node_modules/axe-core/lib/rules/td-headers-attr.json +0 -12
- data/node_modules/axe-core/lib/rules/th-has-data-cells.json +0 -13
- data/node_modules/axe-core/lib/rules/valid-lang.json +0 -13
- data/node_modules/axe-core/lib/rules/video-caption.json +0 -19
- data/node_modules/axe-core/lib/rules/video-description.json +0 -21
- data/node_modules/axe-core/lib/rules/window-is-top.js +0 -3
- data/node_modules/axe-core/lib/rules/xml-lang-mismatch-matches.js +0 -12
- data/node_modules/axe-core/typings/axe-core/axe-core-tests.ts +0 -188
@@ -1,815 +1,828 @@
|
|
1
|
-
# Sortable [![Financial Contributors on Open Collective](https://opencollective.com/Sortable/all/badge.svg?label=financial+contributors)](https://opencollective.com/Sortable) [![CircleCI](https://circleci.com/gh/SortableJS/Sortable.svg?style=svg)](https://circleci.com/gh/SortableJS/Sortable) [![DeepScan grade](https://deepscan.io/api/teams/3901/projects/5666/branches/43977/badge/grade.svg)](https://deepscan.io/dashboard#view=project&tid=3901&pid=5666&bid=43977) [![](https://data.jsdelivr.com/v1/package/npm/sortablejs/badge)](https://www.jsdelivr.com/package/npm/sortablejs) [![npm](https://img.shields.io/npm/v/sortablejs.svg)](https://www.npmjs.com/package/sortablejs)
|
2
|
-
|
3
|
-
Sortable is a JavaScript library for reorderable drag-and-drop lists.
|
4
|
-
|
5
|
-
Demo: http://sortablejs.github.io/Sortable/
|
6
|
-
|
7
|
-
[<img width="250px" src="https://raw.githubusercontent.com/SortableJS/Sortable/HEAD/st/saucelabs.svg?sanitize=true">](https://saucelabs.com/)
|
8
|
-
|
9
|
-
## Features
|
10
|
-
|
11
|
-
* Supports touch devices and [modern](http://caniuse.com/#search=drag) browsers (including IE9)
|
12
|
-
* Can drag from one list to another or within the same list
|
13
|
-
* CSS animation when moving items
|
14
|
-
* Supports drag handles *and selectable text* (better than voidberg's html5sortable)
|
15
|
-
* Smart auto-scrolling
|
16
|
-
* Advanced swap detection
|
17
|
-
* Smooth animations
|
18
|
-
* [Multi-drag](https://github.com/SortableJS/Sortable/tree/master/plugins/MultiDrag) support
|
19
|
-
* Support for CSS transforms
|
20
|
-
* Built using native HTML5 drag and drop API
|
21
|
-
* Supports
|
22
|
-
* [Meteor](https://github.com/SortableJS/meteor-sortablejs)
|
23
|
-
* Angular
|
24
|
-
* [2.0+](https://github.com/SortableJS/angular-sortablejs)
|
25
|
-
* [1.*](https://github.com/SortableJS/angular-legacy-sortablejs)
|
26
|
-
* React
|
27
|
-
* [ES2015+](https://github.com/SortableJS/react-sortablejs)
|
28
|
-
* [Mixin](https://github.com/SortableJS/react-mixin-sortablejs)
|
29
|
-
* [Knockout](https://github.com/SortableJS/knockout-sortablejs)
|
30
|
-
* [Polymer](https://github.com/SortableJS/polymer-sortablejs)
|
31
|
-
* [Vue](https://github.com/SortableJS/Vue.Draggable)
|
32
|
-
* [Ember](https://github.com/SortableJS/ember-sortablejs)
|
33
|
-
* Supports any CSS library, e.g. [Bootstrap](#bs)
|
34
|
-
* Simple API
|
35
|
-
* Support for [plugins](#plugins)
|
36
|
-
* [CDN](#cdn)
|
37
|
-
* No jQuery required (but there is [support](https://github.com/SortableJS/jquery-sortablejs))
|
38
|
-
* Typescript definitions at `@types/sortablejs`
|
39
|
-
|
40
|
-
|
41
|
-
<br/>
|
42
|
-
|
43
|
-
|
44
|
-
### Articles
|
45
|
-
|
46
|
-
* [Dragging Multiple Items in Sortable](https://github.com/SortableJS/Sortable/wiki/Dragging-Multiple-Items-in-Sortable) (April 26, 2019)
|
47
|
-
* [Swap Thresholds and Direction](https://github.com/SortableJS/Sortable/wiki/Swap-Thresholds-and-Direction) (December 2, 2018)
|
48
|
-
* [Sortable v1.0 — New capabilities](https://github.com/SortableJS/Sortable/wiki/Sortable-v1.0-—-New-capabilities/) (December 22, 2014)
|
49
|
-
* [Sorting with the help of HTML5 Drag'n'Drop API](https://github.com/SortableJS/Sortable/wiki/Sorting-with-the-help-of-HTML5-Drag'n'Drop-API/) (December 23, 2013)
|
50
|
-
|
51
|
-
<br/>
|
52
|
-
|
53
|
-
### Getting Started
|
54
|
-
|
55
|
-
Install with NPM:
|
56
|
-
```bash
|
57
|
-
$ npm install sortablejs --save
|
58
|
-
```
|
59
|
-
|
60
|
-
Install with Bower:
|
61
|
-
```bash
|
62
|
-
$ bower install --save sortablejs
|
63
|
-
```
|
64
|
-
|
65
|
-
Import into your project:
|
66
|
-
```js
|
67
|
-
// Default SortableJS
|
68
|
-
import Sortable from 'sortablejs';
|
69
|
-
|
70
|
-
// Core SortableJS (without default plugins)
|
71
|
-
import Sortable from 'sortablejs/modular/sortable.core.esm.js';
|
72
|
-
|
73
|
-
// Complete SortableJS (with all plugins)
|
74
|
-
import Sortable from 'sortablejs/modular/sortable.complete.esm.js';
|
75
|
-
```
|
76
|
-
|
77
|
-
Cherrypick plugins:
|
78
|
-
```js
|
79
|
-
// Cherrypick extra plugins
|
80
|
-
import Sortable, { MultiDrag, Swap } from 'sortablejs';
|
81
|
-
|
82
|
-
Sortable.mount(new MultiDrag(), new Swap());
|
83
|
-
|
84
|
-
|
85
|
-
// Cherrypick default plugins
|
86
|
-
import Sortable, { AutoScroll } from 'sortablejs/modular/sortable.core.esm.js';
|
87
|
-
|
88
|
-
Sortable.mount(new AutoScroll());
|
89
|
-
```
|
90
|
-
|
91
|
-
|
92
|
-
---
|
93
|
-
|
94
|
-
|
95
|
-
### Usage
|
96
|
-
```html
|
97
|
-
<ul id="items">
|
98
|
-
<li>item 1</li>
|
99
|
-
<li>item 2</li>
|
100
|
-
<li>item 3</li>
|
101
|
-
</ul>
|
102
|
-
```
|
103
|
-
|
104
|
-
```js
|
105
|
-
var el = document.getElementById('items');
|
106
|
-
var sortable = Sortable.create(el);
|
107
|
-
```
|
108
|
-
|
109
|
-
You can use any element for the list and its elements, not just `ul`/`li`. Here is an [example with `div`s](https://jsbin.com/visimub/edit?html,js,output).
|
110
|
-
|
111
|
-
|
112
|
-
---
|
113
|
-
|
114
|
-
|
115
|
-
### Options
|
116
|
-
```js
|
117
|
-
var sortable = new Sortable(el, {
|
118
|
-
group: "name", // or { name: "...", pull: [true, false, 'clone', array], put: [true, false, array] }
|
119
|
-
sort: true, // sorting inside list
|
120
|
-
delay: 0, // time in milliseconds to define when the sorting should start
|
121
|
-
delayOnTouchOnly: false, // only delay if user is using touch
|
122
|
-
touchStartThreshold: 0, // px, how many pixels the point should move before cancelling a delayed drag event
|
123
|
-
disabled: false, // Disables the sortable if set to true.
|
124
|
-
store: null, // @see Store
|
125
|
-
animation: 150, // ms, animation speed moving items when sorting, `0` — without animation
|
126
|
-
easing: "cubic-bezier(1, 0, 0, 1)", // Easing for animation. Defaults to null. See https://easings.net/ for examples.
|
127
|
-
handle: ".my-handle", // Drag handle selector within list items
|
128
|
-
filter: ".ignore-elements", // Selectors that do not lead to dragging (String or Function)
|
129
|
-
preventOnFilter: true, // Call `event.preventDefault()` when triggered `filter`
|
130
|
-
draggable: ".item", // Specifies which items inside the element should be draggable
|
131
|
-
|
132
|
-
dataIdAttr: 'data-id',
|
133
|
-
|
134
|
-
ghostClass: "sortable-ghost", // Class name for the drop placeholder
|
135
|
-
chosenClass: "sortable-chosen", // Class name for the chosen item
|
136
|
-
dragClass: "sortable-drag", // Class name for the dragging item
|
137
|
-
|
138
|
-
swapThreshold: 1, // Threshold of the swap zone
|
139
|
-
invertSwap: false, // Will always use inverted swap zone if set to true
|
140
|
-
invertedSwapThreshold: 1, // Threshold of the inverted swap zone (will be set to swapThreshold value by default)
|
141
|
-
direction: 'horizontal', // Direction of Sortable (will be detected automatically if not given)
|
142
|
-
|
143
|
-
forceFallback: false, // ignore the HTML5 DnD behaviour and force the fallback to kick in
|
144
|
-
|
145
|
-
fallbackClass: "sortable-fallback", // Class name for the cloned DOM Element when using forceFallback
|
146
|
-
fallbackOnBody: false, // Appends the cloned DOM Element into the Document's Body
|
147
|
-
fallbackTolerance: 0, // Specify in pixels how far the mouse should move before it's considered as a drag.
|
148
|
-
|
149
|
-
dragoverBubble: false,
|
150
|
-
removeCloneOnHide: true, // Remove the clone element when it is not showing, rather than just hiding it
|
151
|
-
emptyInsertThreshold: 5, // px, distance mouse must be from empty sortable to insert drag element into it
|
152
|
-
|
153
|
-
|
154
|
-
setData: function (/** DataTransfer */dataTransfer, /** HTMLElement*/dragEl) {
|
155
|
-
dataTransfer.setData('Text', dragEl.textContent); // `dataTransfer` object of HTML5 DragEvent
|
156
|
-
},
|
157
|
-
|
158
|
-
// Element is chosen
|
159
|
-
onChoose: function (/**Event*/evt) {
|
160
|
-
evt.oldIndex; // element index within parent
|
161
|
-
},
|
162
|
-
|
163
|
-
// Element is unchosen
|
164
|
-
onUnchoose: function(/**Event*/evt) {
|
165
|
-
// same properties as onEnd
|
166
|
-
},
|
167
|
-
|
168
|
-
// Element dragging started
|
169
|
-
onStart: function (/**Event*/evt) {
|
170
|
-
evt.oldIndex; // element index within parent
|
171
|
-
},
|
172
|
-
|
173
|
-
// Element dragging ended
|
174
|
-
onEnd: function (/**Event*/evt) {
|
175
|
-
var itemEl = evt.item; // dragged HTMLElement
|
176
|
-
evt.to; // target list
|
177
|
-
evt.from; // previous list
|
178
|
-
evt.oldIndex; // element's old index within old parent
|
179
|
-
evt.newIndex; // element's new index within new parent
|
180
|
-
evt.oldDraggableIndex; // element's old index within old parent, only counting draggable elements
|
181
|
-
evt.newDraggableIndex; // element's new index within new parent, only counting draggable elements
|
182
|
-
evt.clone // the clone element
|
183
|
-
evt.pullMode; // when item is in another sortable: `"clone"` if cloning, `true` if moving
|
184
|
-
},
|
185
|
-
|
186
|
-
// Element is dropped into the list from another list
|
187
|
-
onAdd: function (/**Event*/evt) {
|
188
|
-
// same properties as onEnd
|
189
|
-
},
|
190
|
-
|
191
|
-
// Changed sorting within list
|
192
|
-
onUpdate: function (/**Event*/evt) {
|
193
|
-
// same properties as onEnd
|
194
|
-
},
|
195
|
-
|
196
|
-
// Called by any change to the list (add / update / remove)
|
197
|
-
onSort: function (/**Event*/evt) {
|
198
|
-
// same properties as onEnd
|
199
|
-
},
|
200
|
-
|
201
|
-
// Element is removed from the list into another list
|
202
|
-
onRemove: function (/**Event*/evt) {
|
203
|
-
// same properties as onEnd
|
204
|
-
},
|
205
|
-
|
206
|
-
// Attempt to drag a filtered element
|
207
|
-
onFilter: function (/**Event*/evt) {
|
208
|
-
var itemEl = evt.item; // HTMLElement receiving the `mousedown|tapstart` event.
|
209
|
-
},
|
210
|
-
|
211
|
-
// Event when you move an item in the list or between lists
|
212
|
-
onMove: function (/**Event*/evt, /**Event*/originalEvent) {
|
213
|
-
// Example: https://jsbin.com/nawahef/edit?js,output
|
214
|
-
evt.dragged; // dragged HTMLElement
|
215
|
-
evt.draggedRect; // DOMRect {left, top, right, bottom}
|
216
|
-
evt.related; // HTMLElement on which have guided
|
217
|
-
evt.relatedRect; // DOMRect
|
218
|
-
evt.willInsertAfter; // Boolean that is true if Sortable will insert drag element after target by default
|
219
|
-
originalEvent.clientY; // mouse position
|
220
|
-
// return false; — for cancel
|
221
|
-
// return -1; — insert before target
|
222
|
-
// return 1; — insert after target
|
223
|
-
// return true; — keep default insertion point based on the direction
|
224
|
-
// return void; — keep default insertion point based on the direction
|
225
|
-
},
|
226
|
-
|
227
|
-
// Called when creating a clone of element
|
228
|
-
onClone: function (/**Event*/evt) {
|
229
|
-
var origEl = evt.item;
|
230
|
-
var cloneEl = evt.clone;
|
231
|
-
},
|
232
|
-
|
233
|
-
// Called when dragging element changes position
|
234
|
-
onChange: function(/**Event*/evt) {
|
235
|
-
evt.newIndex // most likely why this event is used is to get the dragging element's current index
|
236
|
-
// same properties as onEnd
|
237
|
-
}
|
238
|
-
});
|
239
|
-
```
|
240
|
-
|
241
|
-
|
242
|
-
---
|
243
|
-
|
244
|
-
|
245
|
-
#### `group` option
|
246
|
-
To drag elements from one list into another, both lists must have the same `group` value.
|
247
|
-
You can also define whether lists can give away, give and keep a copy (`clone`), and receive elements.
|
248
|
-
|
249
|
-
* name: `String` — group name
|
250
|
-
* pull: `true|false|["foo", "bar"]|'clone'|function` — ability to move from the list. `clone` — copy the item, rather than move. Or an array of group names which the elements may be put in. Defaults to `true`.
|
251
|
-
* put: `true|false|["baz", "qux"]|function` — whether elements can be added from other lists, or an array of group names from which elements can be added.
|
252
|
-
* revertClone: `boolean` — revert cloned element to initial position after moving to a another list.
|
253
|
-
|
254
|
-
|
255
|
-
Demo:
|
256
|
-
- https://jsbin.com/hijetos/edit?js,output
|
257
|
-
- https://jsbin.com/nacoyah/edit?js,output — use of complex logic in the `pull` and` put`
|
258
|
-
- https://jsbin.com/bifuyab/edit?js,output — use `revertClone: true`
|
259
|
-
|
260
|
-
|
261
|
-
---
|
262
|
-
|
263
|
-
|
264
|
-
#### `sort` option
|
265
|
-
Allow sorting inside list.
|
266
|
-
|
267
|
-
Demo: https://jsbin.com/jayedig/edit?js,output
|
268
|
-
|
269
|
-
|
270
|
-
---
|
271
|
-
|
272
|
-
|
273
|
-
#### `delay` option
|
274
|
-
Time in milliseconds to define when the sorting should start.
|
275
|
-
Unfortunately, due to browser restrictions, delaying is not possible on IE or Edge with native drag & drop.
|
276
|
-
|
277
|
-
Demo: https://jsbin.com/zosiwah/edit?js,output
|
278
|
-
|
279
|
-
|
280
|
-
---
|
281
|
-
|
282
|
-
|
283
|
-
#### `delayOnTouchOnly` option
|
284
|
-
Whether or not the delay should be applied only if the user is using touch (eg. on a mobile device). No delay will be applied in any other case. Defaults to `false`.
|
285
|
-
|
286
|
-
|
287
|
-
---
|
288
|
-
|
289
|
-
|
290
|
-
#### `swapThreshold` option
|
291
|
-
Percentage of the target that the swap zone will take up, as a float between `0` and `1`.
|
292
|
-
|
293
|
-
[Read more](https://github.com/SortableJS/Sortable/wiki/Swap-Thresholds-and-Direction#swap-threshold)
|
294
|
-
|
295
|
-
Demo: http://sortablejs.github.io/Sortable#thresholds
|
296
|
-
|
297
|
-
|
298
|
-
---
|
299
|
-
|
300
|
-
|
301
|
-
#### `invertSwap` option
|
302
|
-
Set to `true` to set the swap zone to the sides of the target, for the effect of sorting "in between" items.
|
303
|
-
|
304
|
-
[Read more](https://github.com/SortableJS/Sortable/wiki/Swap-Thresholds-and-Direction#forcing-inverted-swap-zone)
|
305
|
-
|
306
|
-
Demo: http://sortablejs.github.io/Sortable#thresholds
|
307
|
-
|
308
|
-
|
309
|
-
---
|
310
|
-
|
311
|
-
|
312
|
-
#### `invertedSwapThreshold` option
|
313
|
-
Percentage of the target that the inverted swap zone will take up, as a float between `0` and `1`. If not given, will default to `swapThreshold`.
|
314
|
-
|
315
|
-
[Read more](https://github.com/SortableJS/Sortable/wiki/Swap-Thresholds-and-Direction#dealing-with-swap-glitching)
|
316
|
-
|
317
|
-
|
318
|
-
---
|
319
|
-
|
320
|
-
|
321
|
-
#### `direction` option
|
322
|
-
Direction that the Sortable should sort in. Can be set to `'vertical'`, `'horizontal'`, or a function, which will be called whenever a target is dragged over. Must return `'vertical'` or `'horizontal'`.
|
323
|
-
|
324
|
-
[Read more](https://github.com/SortableJS/Sortable/wiki/Swap-Thresholds-and-Direction#direction)
|
325
|
-
|
326
|
-
|
327
|
-
Example of direction detection for vertical list that includes full column and half column elements:
|
328
|
-
|
329
|
-
```js
|
330
|
-
Sortable.create(el, {
|
331
|
-
direction: function(evt, target, dragEl) {
|
332
|
-
if (target !== null && target.className.includes('half-column') && dragEl.className.includes('half-column')) {
|
333
|
-
return 'horizontal';
|
334
|
-
}
|
335
|
-
return 'vertical';
|
336
|
-
}
|
337
|
-
});
|
338
|
-
```
|
339
|
-
|
340
|
-
|
341
|
-
---
|
342
|
-
|
343
|
-
|
344
|
-
#### `touchStartThreshold` option
|
345
|
-
This option is similar to `fallbackTolerance` option.
|
346
|
-
|
347
|
-
When the `delay` option is set, some phones with very sensitive touch displays like the Samsung Galaxy S8 will fire
|
348
|
-
unwanted touchmove events even when your finger is not moving, resulting in the sort not triggering.
|
349
|
-
|
350
|
-
This option sets the minimum pointer movement that must occur before the delayed sorting is cancelled.
|
351
|
-
|
352
|
-
Values between 3 to 5 are good.
|
353
|
-
|
354
|
-
|
355
|
-
---
|
356
|
-
|
357
|
-
|
358
|
-
#### `disabled` options
|
359
|
-
Disables the sortable if set to `true`.
|
360
|
-
|
361
|
-
Demo: https://jsbin.com/sewokud/edit?js,output
|
362
|
-
|
363
|
-
```js
|
364
|
-
var sortable = Sortable.create(list);
|
365
|
-
|
366
|
-
document.getElementById("switcher").onclick = function () {
|
367
|
-
var state = sortable.option("disabled"); // get
|
368
|
-
|
369
|
-
sortable.option("disabled", !state); // set
|
370
|
-
};
|
371
|
-
```
|
372
|
-
|
373
|
-
|
374
|
-
---
|
375
|
-
|
376
|
-
|
377
|
-
#### `handle` option
|
378
|
-
To make list items draggable, Sortable disables text selection by the user.
|
379
|
-
That's not always desirable. To allow text selection, define a drag handler,
|
380
|
-
which is an area of every list element that allows it to be dragged around.
|
381
|
-
|
382
|
-
Demo: https://jsbin.com/numakuh/edit?html,js,output
|
383
|
-
|
384
|
-
```js
|
385
|
-
Sortable.create(el, {
|
386
|
-
handle: ".my-handle"
|
387
|
-
});
|
388
|
-
```
|
389
|
-
|
390
|
-
```html
|
391
|
-
<ul>
|
392
|
-
<li><span class="my-handle">::</span> list item text one
|
393
|
-
<li><span class="my-handle">::</span> list item text two
|
394
|
-
</ul>
|
395
|
-
```
|
396
|
-
|
397
|
-
```css
|
398
|
-
.my-handle {
|
399
|
-
cursor: move;
|
400
|
-
cursor: -webkit-grabbing;
|
401
|
-
}
|
402
|
-
```
|
403
|
-
|
404
|
-
|
405
|
-
---
|
406
|
-
|
407
|
-
|
408
|
-
#### `filter` option
|
409
|
-
|
410
|
-
|
411
|
-
```js
|
412
|
-
Sortable.create(list, {
|
413
|
-
filter: ".js-remove, .js-edit",
|
414
|
-
onFilter: function (evt) {
|
415
|
-
var item = evt.item,
|
416
|
-
ctrl = evt.target;
|
417
|
-
|
418
|
-
if (Sortable.utils.is(ctrl, ".js-remove")) { // Click on remove button
|
419
|
-
item.parentNode.removeChild(item); // remove sortable item
|
420
|
-
}
|
421
|
-
else if (Sortable.utils.is(ctrl, ".js-edit")) { // Click on edit link
|
422
|
-
// ...
|
423
|
-
}
|
424
|
-
}
|
425
|
-
})
|
426
|
-
```
|
427
|
-
|
428
|
-
|
429
|
-
---
|
430
|
-
|
431
|
-
|
432
|
-
#### `ghostClass` option
|
433
|
-
Class name for the drop placeholder (default `sortable-ghost`).
|
434
|
-
|
435
|
-
Demo: https://jsbin.com/henuyiw/edit?css,js,output
|
436
|
-
|
437
|
-
```css
|
438
|
-
.ghost {
|
439
|
-
opacity: 0.4;
|
440
|
-
}
|
441
|
-
```
|
442
|
-
|
443
|
-
```js
|
444
|
-
Sortable.create(list, {
|
445
|
-
ghostClass: "ghost"
|
446
|
-
});
|
447
|
-
```
|
448
|
-
|
449
|
-
|
450
|
-
---
|
451
|
-
|
452
|
-
|
453
|
-
#### `chosenClass` option
|
454
|
-
Class name for the chosen item (default `sortable-chosen`).
|
455
|
-
|
456
|
-
Demo: https://jsbin.com/hoqufox/edit?css,js,output
|
457
|
-
|
458
|
-
```css
|
459
|
-
.chosen {
|
460
|
-
color: #fff;
|
461
|
-
background-color: #c00;
|
462
|
-
}
|
463
|
-
```
|
464
|
-
|
465
|
-
```js
|
466
|
-
Sortable.create(list, {
|
467
|
-
delay: 500,
|
468
|
-
chosenClass: "chosen"
|
469
|
-
});
|
470
|
-
```
|
471
|
-
|
472
|
-
|
473
|
-
---
|
474
|
-
|
475
|
-
|
476
|
-
#### `forceFallback` option
|
477
|
-
If set to `true`, the Fallback for non HTML5 Browser will be used, even if we are using an HTML5 Browser.
|
478
|
-
This gives us the possibility to test the behaviour for older Browsers even in newer Browser, or make the Drag 'n Drop feel more consistent between Desktop , Mobile and old Browsers.
|
479
|
-
|
480
|
-
On top of that, the Fallback always generates a copy of that DOM Element and appends the class `fallbackClass` defined in the options. This behaviour controls the look of this 'dragged' Element.
|
481
|
-
|
482
|
-
Demo: https://jsbin.com/sibiput/edit?html,css,js,output
|
483
|
-
|
484
|
-
|
485
|
-
---
|
486
|
-
|
487
|
-
|
488
|
-
#### `fallbackTolerance` option
|
489
|
-
Emulates the native drag threshold. Specify in pixels how far the mouse should move before it's considered as a drag.
|
490
|
-
Useful if the items are also clickable like in a list of links.
|
491
|
-
|
492
|
-
When the user clicks inside a sortable element, it's not uncommon for your hand to move a little between the time you press and the time you release.
|
493
|
-
Dragging only starts if you move the pointer past a certain tolerance, so that you don't accidentally start dragging every time you click.
|
494
|
-
|
495
|
-
3 to 5 are probably good values.
|
496
|
-
|
497
|
-
|
498
|
-
---
|
499
|
-
|
500
|
-
|
501
|
-
#### `dragoverBubble` option
|
502
|
-
If set to `true`, the dragover event will bubble to parent sortables. Works on both fallback and native dragover event.
|
503
|
-
By default, it is false, but Sortable will only stop bubbling the event once the element has been inserted into a parent Sortable, or *can* be inserted into a parent Sortable, but isn't at that specific time (due to animation, etc).
|
504
|
-
|
505
|
-
Since 1.8.0, you will probably want to leave this option as false. Before 1.8.0, it may need to be `true` for nested sortables to work.
|
506
|
-
|
507
|
-
|
508
|
-
---
|
509
|
-
|
510
|
-
|
511
|
-
#### `removeCloneOnHide` option
|
512
|
-
If set to `false`, the clone is hidden by having it's CSS `display` property set to `none`.
|
513
|
-
By default, this option is `true`, meaning Sortable will remove the cloned element from the DOM when it is supposed to be hidden.
|
514
|
-
|
515
|
-
|
516
|
-
---
|
517
|
-
|
518
|
-
|
519
|
-
#### `emptyInsertThreshold` option
|
520
|
-
The distance (in pixels) the mouse must be from an empty sortable while dragging for the drag element to be inserted into that sortable. Defaults to `5`. Set to `0` to disable this feature.
|
521
|
-
|
522
|
-
Demo: https://jsbin.com/becavoj/edit?js,output
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
-
|
542
|
-
-
|
543
|
-
-
|
544
|
-
-
|
545
|
-
-
|
546
|
-
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
#####
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
#####
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
#####
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
|
735
|
-
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
---
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
|
750
|
-
|
751
|
-
|
752
|
-
|
753
|
-
|
754
|
-
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
|
772
|
-
|
773
|
-
|
774
|
-
|
775
|
-
|
776
|
-
|
777
|
-
|
778
|
-
|
779
|
-
|
780
|
-
|
781
|
-
|
782
|
-
|
783
|
-
|
784
|
-
|
785
|
-
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
|
790
|
-
|
791
|
-
|
792
|
-
|
793
|
-
<a href="https://opencollective.com/Sortable
|
794
|
-
|
795
|
-
|
796
|
-
|
797
|
-
|
798
|
-
|
799
|
-
a
|
800
|
-
"
|
801
|
-
|
802
|
-
|
803
|
-
|
804
|
-
|
805
|
-
|
806
|
-
|
807
|
-
|
808
|
-
|
809
|
-
|
810
|
-
|
811
|
-
|
812
|
-
|
813
|
-
|
814
|
-
|
815
|
-
|
1
|
+
# Sortable [![Financial Contributors on Open Collective](https://opencollective.com/Sortable/all/badge.svg?label=financial+contributors)](https://opencollective.com/Sortable) [![CircleCI](https://circleci.com/gh/SortableJS/Sortable.svg?style=svg)](https://circleci.com/gh/SortableJS/Sortable) [![DeepScan grade](https://deepscan.io/api/teams/3901/projects/5666/branches/43977/badge/grade.svg)](https://deepscan.io/dashboard#view=project&tid=3901&pid=5666&bid=43977) [![](https://data.jsdelivr.com/v1/package/npm/sortablejs/badge)](https://www.jsdelivr.com/package/npm/sortablejs) [![npm](https://img.shields.io/npm/v/sortablejs.svg)](https://www.npmjs.com/package/sortablejs)
|
2
|
+
|
3
|
+
Sortable is a JavaScript library for reorderable drag-and-drop lists.
|
4
|
+
|
5
|
+
Demo: http://sortablejs.github.io/Sortable/
|
6
|
+
|
7
|
+
[<img width="250px" src="https://raw.githubusercontent.com/SortableJS/Sortable/HEAD/st/saucelabs.svg?sanitize=true">](https://saucelabs.com/)
|
8
|
+
|
9
|
+
## Features
|
10
|
+
|
11
|
+
* Supports touch devices and [modern](http://caniuse.com/#search=drag) browsers (including IE9)
|
12
|
+
* Can drag from one list to another or within the same list
|
13
|
+
* CSS animation when moving items
|
14
|
+
* Supports drag handles *and selectable text* (better than voidberg's html5sortable)
|
15
|
+
* Smart auto-scrolling
|
16
|
+
* Advanced swap detection
|
17
|
+
* Smooth animations
|
18
|
+
* [Multi-drag](https://github.com/SortableJS/Sortable/tree/master/plugins/MultiDrag) support
|
19
|
+
* Support for CSS transforms
|
20
|
+
* Built using native HTML5 drag and drop API
|
21
|
+
* Supports
|
22
|
+
* [Meteor](https://github.com/SortableJS/meteor-sortablejs)
|
23
|
+
* Angular
|
24
|
+
* [2.0+](https://github.com/SortableJS/angular-sortablejs)
|
25
|
+
* [1.*](https://github.com/SortableJS/angular-legacy-sortablejs)
|
26
|
+
* React
|
27
|
+
* [ES2015+](https://github.com/SortableJS/react-sortablejs)
|
28
|
+
* [Mixin](https://github.com/SortableJS/react-mixin-sortablejs)
|
29
|
+
* [Knockout](https://github.com/SortableJS/knockout-sortablejs)
|
30
|
+
* [Polymer](https://github.com/SortableJS/polymer-sortablejs)
|
31
|
+
* [Vue](https://github.com/SortableJS/Vue.Draggable)
|
32
|
+
* [Ember](https://github.com/SortableJS/ember-sortablejs)
|
33
|
+
* Supports any CSS library, e.g. [Bootstrap](#bs)
|
34
|
+
* Simple API
|
35
|
+
* Support for [plugins](#plugins)
|
36
|
+
* [CDN](#cdn)
|
37
|
+
* No jQuery required (but there is [support](https://github.com/SortableJS/jquery-sortablejs))
|
38
|
+
* Typescript definitions at `@types/sortablejs`
|
39
|
+
|
40
|
+
|
41
|
+
<br/>
|
42
|
+
|
43
|
+
|
44
|
+
### Articles
|
45
|
+
|
46
|
+
* [Dragging Multiple Items in Sortable](https://github.com/SortableJS/Sortable/wiki/Dragging-Multiple-Items-in-Sortable) (April 26, 2019)
|
47
|
+
* [Swap Thresholds and Direction](https://github.com/SortableJS/Sortable/wiki/Swap-Thresholds-and-Direction) (December 2, 2018)
|
48
|
+
* [Sortable v1.0 — New capabilities](https://github.com/SortableJS/Sortable/wiki/Sortable-v1.0-—-New-capabilities/) (December 22, 2014)
|
49
|
+
* [Sorting with the help of HTML5 Drag'n'Drop API](https://github.com/SortableJS/Sortable/wiki/Sorting-with-the-help-of-HTML5-Drag'n'Drop-API/) (December 23, 2013)
|
50
|
+
|
51
|
+
<br/>
|
52
|
+
|
53
|
+
### Getting Started
|
54
|
+
|
55
|
+
Install with NPM:
|
56
|
+
```bash
|
57
|
+
$ npm install sortablejs --save
|
58
|
+
```
|
59
|
+
|
60
|
+
Install with Bower:
|
61
|
+
```bash
|
62
|
+
$ bower install --save sortablejs
|
63
|
+
```
|
64
|
+
|
65
|
+
Import into your project:
|
66
|
+
```js
|
67
|
+
// Default SortableJS
|
68
|
+
import Sortable from 'sortablejs';
|
69
|
+
|
70
|
+
// Core SortableJS (without default plugins)
|
71
|
+
import Sortable from 'sortablejs/modular/sortable.core.esm.js';
|
72
|
+
|
73
|
+
// Complete SortableJS (with all plugins)
|
74
|
+
import Sortable from 'sortablejs/modular/sortable.complete.esm.js';
|
75
|
+
```
|
76
|
+
|
77
|
+
Cherrypick plugins:
|
78
|
+
```js
|
79
|
+
// Cherrypick extra plugins
|
80
|
+
import Sortable, { MultiDrag, Swap } from 'sortablejs';
|
81
|
+
|
82
|
+
Sortable.mount(new MultiDrag(), new Swap());
|
83
|
+
|
84
|
+
|
85
|
+
// Cherrypick default plugins
|
86
|
+
import Sortable, { AutoScroll } from 'sortablejs/modular/sortable.core.esm.js';
|
87
|
+
|
88
|
+
Sortable.mount(new AutoScroll());
|
89
|
+
```
|
90
|
+
|
91
|
+
|
92
|
+
---
|
93
|
+
|
94
|
+
|
95
|
+
### Usage
|
96
|
+
```html
|
97
|
+
<ul id="items">
|
98
|
+
<li>item 1</li>
|
99
|
+
<li>item 2</li>
|
100
|
+
<li>item 3</li>
|
101
|
+
</ul>
|
102
|
+
```
|
103
|
+
|
104
|
+
```js
|
105
|
+
var el = document.getElementById('items');
|
106
|
+
var sortable = Sortable.create(el);
|
107
|
+
```
|
108
|
+
|
109
|
+
You can use any element for the list and its elements, not just `ul`/`li`. Here is an [example with `div`s](https://jsbin.com/visimub/edit?html,js,output).
|
110
|
+
|
111
|
+
|
112
|
+
---
|
113
|
+
|
114
|
+
|
115
|
+
### Options
|
116
|
+
```js
|
117
|
+
var sortable = new Sortable(el, {
|
118
|
+
group: "name", // or { name: "...", pull: [true, false, 'clone', array], put: [true, false, array] }
|
119
|
+
sort: true, // sorting inside list
|
120
|
+
delay: 0, // time in milliseconds to define when the sorting should start
|
121
|
+
delayOnTouchOnly: false, // only delay if user is using touch
|
122
|
+
touchStartThreshold: 0, // px, how many pixels the point should move before cancelling a delayed drag event
|
123
|
+
disabled: false, // Disables the sortable if set to true.
|
124
|
+
store: null, // @see Store
|
125
|
+
animation: 150, // ms, animation speed moving items when sorting, `0` — without animation
|
126
|
+
easing: "cubic-bezier(1, 0, 0, 1)", // Easing for animation. Defaults to null. See https://easings.net/ for examples.
|
127
|
+
handle: ".my-handle", // Drag handle selector within list items
|
128
|
+
filter: ".ignore-elements", // Selectors that do not lead to dragging (String or Function)
|
129
|
+
preventOnFilter: true, // Call `event.preventDefault()` when triggered `filter`
|
130
|
+
draggable: ".item", // Specifies which items inside the element should be draggable
|
131
|
+
|
132
|
+
dataIdAttr: 'data-id', // HTML attribute that is used by the `toArray()` method
|
133
|
+
|
134
|
+
ghostClass: "sortable-ghost", // Class name for the drop placeholder
|
135
|
+
chosenClass: "sortable-chosen", // Class name for the chosen item
|
136
|
+
dragClass: "sortable-drag", // Class name for the dragging item
|
137
|
+
|
138
|
+
swapThreshold: 1, // Threshold of the swap zone
|
139
|
+
invertSwap: false, // Will always use inverted swap zone if set to true
|
140
|
+
invertedSwapThreshold: 1, // Threshold of the inverted swap zone (will be set to swapThreshold value by default)
|
141
|
+
direction: 'horizontal', // Direction of Sortable (will be detected automatically if not given)
|
142
|
+
|
143
|
+
forceFallback: false, // ignore the HTML5 DnD behaviour and force the fallback to kick in
|
144
|
+
|
145
|
+
fallbackClass: "sortable-fallback", // Class name for the cloned DOM Element when using forceFallback
|
146
|
+
fallbackOnBody: false, // Appends the cloned DOM Element into the Document's Body
|
147
|
+
fallbackTolerance: 0, // Specify in pixels how far the mouse should move before it's considered as a drag.
|
148
|
+
|
149
|
+
dragoverBubble: false,
|
150
|
+
removeCloneOnHide: true, // Remove the clone element when it is not showing, rather than just hiding it
|
151
|
+
emptyInsertThreshold: 5, // px, distance mouse must be from empty sortable to insert drag element into it
|
152
|
+
|
153
|
+
|
154
|
+
setData: function (/** DataTransfer */dataTransfer, /** HTMLElement*/dragEl) {
|
155
|
+
dataTransfer.setData('Text', dragEl.textContent); // `dataTransfer` object of HTML5 DragEvent
|
156
|
+
},
|
157
|
+
|
158
|
+
// Element is chosen
|
159
|
+
onChoose: function (/**Event*/evt) {
|
160
|
+
evt.oldIndex; // element index within parent
|
161
|
+
},
|
162
|
+
|
163
|
+
// Element is unchosen
|
164
|
+
onUnchoose: function(/**Event*/evt) {
|
165
|
+
// same properties as onEnd
|
166
|
+
},
|
167
|
+
|
168
|
+
// Element dragging started
|
169
|
+
onStart: function (/**Event*/evt) {
|
170
|
+
evt.oldIndex; // element index within parent
|
171
|
+
},
|
172
|
+
|
173
|
+
// Element dragging ended
|
174
|
+
onEnd: function (/**Event*/evt) {
|
175
|
+
var itemEl = evt.item; // dragged HTMLElement
|
176
|
+
evt.to; // target list
|
177
|
+
evt.from; // previous list
|
178
|
+
evt.oldIndex; // element's old index within old parent
|
179
|
+
evt.newIndex; // element's new index within new parent
|
180
|
+
evt.oldDraggableIndex; // element's old index within old parent, only counting draggable elements
|
181
|
+
evt.newDraggableIndex; // element's new index within new parent, only counting draggable elements
|
182
|
+
evt.clone // the clone element
|
183
|
+
evt.pullMode; // when item is in another sortable: `"clone"` if cloning, `true` if moving
|
184
|
+
},
|
185
|
+
|
186
|
+
// Element is dropped into the list from another list
|
187
|
+
onAdd: function (/**Event*/evt) {
|
188
|
+
// same properties as onEnd
|
189
|
+
},
|
190
|
+
|
191
|
+
// Changed sorting within list
|
192
|
+
onUpdate: function (/**Event*/evt) {
|
193
|
+
// same properties as onEnd
|
194
|
+
},
|
195
|
+
|
196
|
+
// Called by any change to the list (add / update / remove)
|
197
|
+
onSort: function (/**Event*/evt) {
|
198
|
+
// same properties as onEnd
|
199
|
+
},
|
200
|
+
|
201
|
+
// Element is removed from the list into another list
|
202
|
+
onRemove: function (/**Event*/evt) {
|
203
|
+
// same properties as onEnd
|
204
|
+
},
|
205
|
+
|
206
|
+
// Attempt to drag a filtered element
|
207
|
+
onFilter: function (/**Event*/evt) {
|
208
|
+
var itemEl = evt.item; // HTMLElement receiving the `mousedown|tapstart` event.
|
209
|
+
},
|
210
|
+
|
211
|
+
// Event when you move an item in the list or between lists
|
212
|
+
onMove: function (/**Event*/evt, /**Event*/originalEvent) {
|
213
|
+
// Example: https://jsbin.com/nawahef/edit?js,output
|
214
|
+
evt.dragged; // dragged HTMLElement
|
215
|
+
evt.draggedRect; // DOMRect {left, top, right, bottom}
|
216
|
+
evt.related; // HTMLElement on which have guided
|
217
|
+
evt.relatedRect; // DOMRect
|
218
|
+
evt.willInsertAfter; // Boolean that is true if Sortable will insert drag element after target by default
|
219
|
+
originalEvent.clientY; // mouse position
|
220
|
+
// return false; — for cancel
|
221
|
+
// return -1; — insert before target
|
222
|
+
// return 1; — insert after target
|
223
|
+
// return true; — keep default insertion point based on the direction
|
224
|
+
// return void; — keep default insertion point based on the direction
|
225
|
+
},
|
226
|
+
|
227
|
+
// Called when creating a clone of element
|
228
|
+
onClone: function (/**Event*/evt) {
|
229
|
+
var origEl = evt.item;
|
230
|
+
var cloneEl = evt.clone;
|
231
|
+
},
|
232
|
+
|
233
|
+
// Called when dragging element changes position
|
234
|
+
onChange: function(/**Event*/evt) {
|
235
|
+
evt.newIndex // most likely why this event is used is to get the dragging element's current index
|
236
|
+
// same properties as onEnd
|
237
|
+
}
|
238
|
+
});
|
239
|
+
```
|
240
|
+
|
241
|
+
|
242
|
+
---
|
243
|
+
|
244
|
+
|
245
|
+
#### `group` option
|
246
|
+
To drag elements from one list into another, both lists must have the same `group` value.
|
247
|
+
You can also define whether lists can give away, give and keep a copy (`clone`), and receive elements.
|
248
|
+
|
249
|
+
* name: `String` — group name
|
250
|
+
* pull: `true|false|["foo", "bar"]|'clone'|function` — ability to move from the list. `clone` — copy the item, rather than move. Or an array of group names which the elements may be put in. Defaults to `true`.
|
251
|
+
* put: `true|false|["baz", "qux"]|function` — whether elements can be added from other lists, or an array of group names from which elements can be added.
|
252
|
+
* revertClone: `boolean` — revert cloned element to initial position after moving to a another list.
|
253
|
+
|
254
|
+
|
255
|
+
Demo:
|
256
|
+
- https://jsbin.com/hijetos/edit?js,output
|
257
|
+
- https://jsbin.com/nacoyah/edit?js,output — use of complex logic in the `pull` and` put`
|
258
|
+
- https://jsbin.com/bifuyab/edit?js,output — use `revertClone: true`
|
259
|
+
|
260
|
+
|
261
|
+
---
|
262
|
+
|
263
|
+
|
264
|
+
#### `sort` option
|
265
|
+
Allow sorting inside list.
|
266
|
+
|
267
|
+
Demo: https://jsbin.com/jayedig/edit?js,output
|
268
|
+
|
269
|
+
|
270
|
+
---
|
271
|
+
|
272
|
+
|
273
|
+
#### `delay` option
|
274
|
+
Time in milliseconds to define when the sorting should start.
|
275
|
+
Unfortunately, due to browser restrictions, delaying is not possible on IE or Edge with native drag & drop.
|
276
|
+
|
277
|
+
Demo: https://jsbin.com/zosiwah/edit?js,output
|
278
|
+
|
279
|
+
|
280
|
+
---
|
281
|
+
|
282
|
+
|
283
|
+
#### `delayOnTouchOnly` option
|
284
|
+
Whether or not the delay should be applied only if the user is using touch (eg. on a mobile device). No delay will be applied in any other case. Defaults to `false`.
|
285
|
+
|
286
|
+
|
287
|
+
---
|
288
|
+
|
289
|
+
|
290
|
+
#### `swapThreshold` option
|
291
|
+
Percentage of the target that the swap zone will take up, as a float between `0` and `1`.
|
292
|
+
|
293
|
+
[Read more](https://github.com/SortableJS/Sortable/wiki/Swap-Thresholds-and-Direction#swap-threshold)
|
294
|
+
|
295
|
+
Demo: http://sortablejs.github.io/Sortable#thresholds
|
296
|
+
|
297
|
+
|
298
|
+
---
|
299
|
+
|
300
|
+
|
301
|
+
#### `invertSwap` option
|
302
|
+
Set to `true` to set the swap zone to the sides of the target, for the effect of sorting "in between" items.
|
303
|
+
|
304
|
+
[Read more](https://github.com/SortableJS/Sortable/wiki/Swap-Thresholds-and-Direction#forcing-inverted-swap-zone)
|
305
|
+
|
306
|
+
Demo: http://sortablejs.github.io/Sortable#thresholds
|
307
|
+
|
308
|
+
|
309
|
+
---
|
310
|
+
|
311
|
+
|
312
|
+
#### `invertedSwapThreshold` option
|
313
|
+
Percentage of the target that the inverted swap zone will take up, as a float between `0` and `1`. If not given, will default to `swapThreshold`.
|
314
|
+
|
315
|
+
[Read more](https://github.com/SortableJS/Sortable/wiki/Swap-Thresholds-and-Direction#dealing-with-swap-glitching)
|
316
|
+
|
317
|
+
|
318
|
+
---
|
319
|
+
|
320
|
+
|
321
|
+
#### `direction` option
|
322
|
+
Direction that the Sortable should sort in. Can be set to `'vertical'`, `'horizontal'`, or a function, which will be called whenever a target is dragged over. Must return `'vertical'` or `'horizontal'`.
|
323
|
+
|
324
|
+
[Read more](https://github.com/SortableJS/Sortable/wiki/Swap-Thresholds-and-Direction#direction)
|
325
|
+
|
326
|
+
|
327
|
+
Example of direction detection for vertical list that includes full column and half column elements:
|
328
|
+
|
329
|
+
```js
|
330
|
+
Sortable.create(el, {
|
331
|
+
direction: function(evt, target, dragEl) {
|
332
|
+
if (target !== null && target.className.includes('half-column') && dragEl.className.includes('half-column')) {
|
333
|
+
return 'horizontal';
|
334
|
+
}
|
335
|
+
return 'vertical';
|
336
|
+
}
|
337
|
+
});
|
338
|
+
```
|
339
|
+
|
340
|
+
|
341
|
+
---
|
342
|
+
|
343
|
+
|
344
|
+
#### `touchStartThreshold` option
|
345
|
+
This option is similar to `fallbackTolerance` option.
|
346
|
+
|
347
|
+
When the `delay` option is set, some phones with very sensitive touch displays like the Samsung Galaxy S8 will fire
|
348
|
+
unwanted touchmove events even when your finger is not moving, resulting in the sort not triggering.
|
349
|
+
|
350
|
+
This option sets the minimum pointer movement that must occur before the delayed sorting is cancelled.
|
351
|
+
|
352
|
+
Values between 3 to 5 are good.
|
353
|
+
|
354
|
+
|
355
|
+
---
|
356
|
+
|
357
|
+
|
358
|
+
#### `disabled` options
|
359
|
+
Disables the sortable if set to `true`.
|
360
|
+
|
361
|
+
Demo: https://jsbin.com/sewokud/edit?js,output
|
362
|
+
|
363
|
+
```js
|
364
|
+
var sortable = Sortable.create(list);
|
365
|
+
|
366
|
+
document.getElementById("switcher").onclick = function () {
|
367
|
+
var state = sortable.option("disabled"); // get
|
368
|
+
|
369
|
+
sortable.option("disabled", !state); // set
|
370
|
+
};
|
371
|
+
```
|
372
|
+
|
373
|
+
|
374
|
+
---
|
375
|
+
|
376
|
+
|
377
|
+
#### `handle` option
|
378
|
+
To make list items draggable, Sortable disables text selection by the user.
|
379
|
+
That's not always desirable. To allow text selection, define a drag handler,
|
380
|
+
which is an area of every list element that allows it to be dragged around.
|
381
|
+
|
382
|
+
Demo: https://jsbin.com/numakuh/edit?html,js,output
|
383
|
+
|
384
|
+
```js
|
385
|
+
Sortable.create(el, {
|
386
|
+
handle: ".my-handle"
|
387
|
+
});
|
388
|
+
```
|
389
|
+
|
390
|
+
```html
|
391
|
+
<ul>
|
392
|
+
<li><span class="my-handle">::</span> list item text one
|
393
|
+
<li><span class="my-handle">::</span> list item text two
|
394
|
+
</ul>
|
395
|
+
```
|
396
|
+
|
397
|
+
```css
|
398
|
+
.my-handle {
|
399
|
+
cursor: move;
|
400
|
+
cursor: -webkit-grabbing;
|
401
|
+
}
|
402
|
+
```
|
403
|
+
|
404
|
+
|
405
|
+
---
|
406
|
+
|
407
|
+
|
408
|
+
#### `filter` option
|
409
|
+
|
410
|
+
|
411
|
+
```js
|
412
|
+
Sortable.create(list, {
|
413
|
+
filter: ".js-remove, .js-edit",
|
414
|
+
onFilter: function (evt) {
|
415
|
+
var item = evt.item,
|
416
|
+
ctrl = evt.target;
|
417
|
+
|
418
|
+
if (Sortable.utils.is(ctrl, ".js-remove")) { // Click on remove button
|
419
|
+
item.parentNode.removeChild(item); // remove sortable item
|
420
|
+
}
|
421
|
+
else if (Sortable.utils.is(ctrl, ".js-edit")) { // Click on edit link
|
422
|
+
// ...
|
423
|
+
}
|
424
|
+
}
|
425
|
+
})
|
426
|
+
```
|
427
|
+
|
428
|
+
|
429
|
+
---
|
430
|
+
|
431
|
+
|
432
|
+
#### `ghostClass` option
|
433
|
+
Class name for the drop placeholder (default `sortable-ghost`).
|
434
|
+
|
435
|
+
Demo: https://jsbin.com/henuyiw/edit?css,js,output
|
436
|
+
|
437
|
+
```css
|
438
|
+
.ghost {
|
439
|
+
opacity: 0.4;
|
440
|
+
}
|
441
|
+
```
|
442
|
+
|
443
|
+
```js
|
444
|
+
Sortable.create(list, {
|
445
|
+
ghostClass: "ghost"
|
446
|
+
});
|
447
|
+
```
|
448
|
+
|
449
|
+
|
450
|
+
---
|
451
|
+
|
452
|
+
|
453
|
+
#### `chosenClass` option
|
454
|
+
Class name for the chosen item (default `sortable-chosen`).
|
455
|
+
|
456
|
+
Demo: https://jsbin.com/hoqufox/edit?css,js,output
|
457
|
+
|
458
|
+
```css
|
459
|
+
.chosen {
|
460
|
+
color: #fff;
|
461
|
+
background-color: #c00;
|
462
|
+
}
|
463
|
+
```
|
464
|
+
|
465
|
+
```js
|
466
|
+
Sortable.create(list, {
|
467
|
+
delay: 500,
|
468
|
+
chosenClass: "chosen"
|
469
|
+
});
|
470
|
+
```
|
471
|
+
|
472
|
+
|
473
|
+
---
|
474
|
+
|
475
|
+
|
476
|
+
#### `forceFallback` option
|
477
|
+
If set to `true`, the Fallback for non HTML5 Browser will be used, even if we are using an HTML5 Browser.
|
478
|
+
This gives us the possibility to test the behaviour for older Browsers even in newer Browser, or make the Drag 'n Drop feel more consistent between Desktop , Mobile and old Browsers.
|
479
|
+
|
480
|
+
On top of that, the Fallback always generates a copy of that DOM Element and appends the class `fallbackClass` defined in the options. This behaviour controls the look of this 'dragged' Element.
|
481
|
+
|
482
|
+
Demo: https://jsbin.com/sibiput/edit?html,css,js,output
|
483
|
+
|
484
|
+
|
485
|
+
---
|
486
|
+
|
487
|
+
|
488
|
+
#### `fallbackTolerance` option
|
489
|
+
Emulates the native drag threshold. Specify in pixels how far the mouse should move before it's considered as a drag.
|
490
|
+
Useful if the items are also clickable like in a list of links.
|
491
|
+
|
492
|
+
When the user clicks inside a sortable element, it's not uncommon for your hand to move a little between the time you press and the time you release.
|
493
|
+
Dragging only starts if you move the pointer past a certain tolerance, so that you don't accidentally start dragging every time you click.
|
494
|
+
|
495
|
+
3 to 5 are probably good values.
|
496
|
+
|
497
|
+
|
498
|
+
---
|
499
|
+
|
500
|
+
|
501
|
+
#### `dragoverBubble` option
|
502
|
+
If set to `true`, the dragover event will bubble to parent sortables. Works on both fallback and native dragover event.
|
503
|
+
By default, it is false, but Sortable will only stop bubbling the event once the element has been inserted into a parent Sortable, or *can* be inserted into a parent Sortable, but isn't at that specific time (due to animation, etc).
|
504
|
+
|
505
|
+
Since 1.8.0, you will probably want to leave this option as false. Before 1.8.0, it may need to be `true` for nested sortables to work.
|
506
|
+
|
507
|
+
|
508
|
+
---
|
509
|
+
|
510
|
+
|
511
|
+
#### `removeCloneOnHide` option
|
512
|
+
If set to `false`, the clone is hidden by having it's CSS `display` property set to `none`.
|
513
|
+
By default, this option is `true`, meaning Sortable will remove the cloned element from the DOM when it is supposed to be hidden.
|
514
|
+
|
515
|
+
|
516
|
+
---
|
517
|
+
|
518
|
+
|
519
|
+
#### `emptyInsertThreshold` option
|
520
|
+
The distance (in pixels) the mouse must be from an empty sortable while dragging for the drag element to be inserted into that sortable. Defaults to `5`. Set to `0` to disable this feature.
|
521
|
+
|
522
|
+
Demo: https://jsbin.com/becavoj/edit?js,output
|
523
|
+
|
524
|
+
An alternative to this option would be to set a padding on your list when it is empty.
|
525
|
+
|
526
|
+
For example:
|
527
|
+
```css
|
528
|
+
ul:empty {
|
529
|
+
padding-bottom: 20px;
|
530
|
+
}
|
531
|
+
```
|
532
|
+
|
533
|
+
Warning: For `:empty` to work, it must have no node inside (even text one).
|
534
|
+
|
535
|
+
Demo:
|
536
|
+
https://jsbin.com/yunakeg/edit?html,css,js,output
|
537
|
+
|
538
|
+
---
|
539
|
+
### Event object ([demo](https://jsbin.com/fogujiv/edit?js,output))
|
540
|
+
|
541
|
+
- to:`HTMLElement` — list, in which moved element
|
542
|
+
- from:`HTMLElement` — previous list
|
543
|
+
- item:`HTMLElement` — dragged element
|
544
|
+
- clone:`HTMLElement`
|
545
|
+
- oldIndex:`Number|undefined` — old index within parent
|
546
|
+
- newIndex:`Number|undefined` — new index within parent
|
547
|
+
- oldDraggableIndex: `Number|undefined` — old index within parent, only counting draggable elements
|
548
|
+
- newDraggableIndex: `Number|undefined` — new index within parent, only counting draggable elements
|
549
|
+
- pullMode:`String|Boolean|undefined` — Pull mode if dragging into another sortable (`"clone"`, `true`, or `false`), otherwise undefined
|
550
|
+
|
551
|
+
|
552
|
+
#### `move` event object
|
553
|
+
- to:`HTMLElement`
|
554
|
+
- from:`HTMLElement`
|
555
|
+
- dragged:`HTMLElement`
|
556
|
+
- draggedRect:`DOMRect`
|
557
|
+
- related:`HTMLElement` — element on which have guided
|
558
|
+
- relatedRect:`DOMRect`
|
559
|
+
- willInsertAfter:`Boolean` — `true` if will element be inserted after target (or `false` if before)
|
560
|
+
|
561
|
+
|
562
|
+
---
|
563
|
+
|
564
|
+
|
565
|
+
### Methods
|
566
|
+
|
567
|
+
|
568
|
+
##### option(name:`String`[, value:`*`]):`*`
|
569
|
+
Get or set the option.
|
570
|
+
|
571
|
+
|
572
|
+
|
573
|
+
##### closest(el:`HTMLElement`[, selector:`String`]):`HTMLElement|null`
|
574
|
+
For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
|
575
|
+
|
576
|
+
|
577
|
+
##### toArray():`String[]`
|
578
|
+
Serializes the sortable's item `data-id`'s (`dataIdAttr` option) into an array of string.
|
579
|
+
|
580
|
+
|
581
|
+
##### sort(order:`String[]`, useAnimation:`Boolean`)
|
582
|
+
Sorts the elements according to the array.
|
583
|
+
|
584
|
+
```js
|
585
|
+
var order = sortable.toArray();
|
586
|
+
sortable.sort(order.reverse(), true); // apply
|
587
|
+
```
|
588
|
+
|
589
|
+
|
590
|
+
##### save()
|
591
|
+
Save the current sorting (see [store](#store))
|
592
|
+
|
593
|
+
|
594
|
+
##### destroy()
|
595
|
+
Removes the sortable functionality completely.
|
596
|
+
|
597
|
+
|
598
|
+
---
|
599
|
+
|
600
|
+
|
601
|
+
<a name="store"></a>
|
602
|
+
### Store
|
603
|
+
Saving and restoring of the sort.
|
604
|
+
|
605
|
+
```html
|
606
|
+
<ul>
|
607
|
+
<li data-id="1">order</li>
|
608
|
+
<li data-id="2">save</li>
|
609
|
+
<li data-id="3">restore</li>
|
610
|
+
</ul>
|
611
|
+
```
|
612
|
+
|
613
|
+
```js
|
614
|
+
Sortable.create(el, {
|
615
|
+
group: "localStorage-example",
|
616
|
+
store: {
|
617
|
+
/**
|
618
|
+
* Get the order of elements. Called once during initialization.
|
619
|
+
* @param {Sortable} sortable
|
620
|
+
* @returns {Array}
|
621
|
+
*/
|
622
|
+
get: function (sortable) {
|
623
|
+
var order = localStorage.getItem(sortable.options.group.name);
|
624
|
+
return order ? order.split('|') : [];
|
625
|
+
},
|
626
|
+
|
627
|
+
/**
|
628
|
+
* Save the order of elements. Called onEnd (when the item is dropped).
|
629
|
+
* @param {Sortable} sortable
|
630
|
+
*/
|
631
|
+
set: function (sortable) {
|
632
|
+
var order = sortable.toArray();
|
633
|
+
localStorage.setItem(sortable.options.group.name, order.join('|'));
|
634
|
+
}
|
635
|
+
}
|
636
|
+
})
|
637
|
+
```
|
638
|
+
|
639
|
+
|
640
|
+
---
|
641
|
+
|
642
|
+
|
643
|
+
<a name="bs"></a>
|
644
|
+
### Bootstrap
|
645
|
+
Demo: https://jsbin.com/visimub/edit?html,js,output
|
646
|
+
|
647
|
+
```html
|
648
|
+
<!-- Latest compiled and minified CSS -->
|
649
|
+
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css"/>
|
650
|
+
|
651
|
+
|
652
|
+
<!-- Latest Sortable -->
|
653
|
+
<script src="http://SortableJS.github.io/Sortable/Sortable.js"></script>
|
654
|
+
|
655
|
+
|
656
|
+
<!-- Simple List -->
|
657
|
+
<ul id="simpleList" class="list-group">
|
658
|
+
<li class="list-group-item">This is <a href="http://SortableJS.github.io/Sortable/">Sortable</a></li>
|
659
|
+
<li class="list-group-item">It works with Bootstrap...</li>
|
660
|
+
<li class="list-group-item">...out of the box.</li>
|
661
|
+
<li class="list-group-item">It has support for touch devices.</li>
|
662
|
+
<li class="list-group-item">Just drag some elements around.</li>
|
663
|
+
</ul>
|
664
|
+
|
665
|
+
<script>
|
666
|
+
// Simple list
|
667
|
+
Sortable.create(simpleList, { /* options */ });
|
668
|
+
</script>
|
669
|
+
```
|
670
|
+
|
671
|
+
|
672
|
+
---
|
673
|
+
|
674
|
+
|
675
|
+
### Static methods & properties
|
676
|
+
|
677
|
+
|
678
|
+
|
679
|
+
##### Sortable.create(el:`HTMLElement`[, options:`Object`]):`Sortable`
|
680
|
+
Create new instance.
|
681
|
+
|
682
|
+
|
683
|
+
---
|
684
|
+
|
685
|
+
|
686
|
+
##### Sortable.active:`Sortable`
|
687
|
+
The active Sortable instance.
|
688
|
+
|
689
|
+
|
690
|
+
---
|
691
|
+
|
692
|
+
|
693
|
+
##### Sortable.dragged:`HTMLElement`
|
694
|
+
The element being dragged.
|
695
|
+
|
696
|
+
|
697
|
+
---
|
698
|
+
|
699
|
+
|
700
|
+
##### Sortable.ghost:`HTMLElement`
|
701
|
+
The ghost element.
|
702
|
+
|
703
|
+
|
704
|
+
---
|
705
|
+
|
706
|
+
|
707
|
+
##### Sortable.clone:`HTMLElement`
|
708
|
+
The clone element.
|
709
|
+
|
710
|
+
|
711
|
+
---
|
712
|
+
|
713
|
+
|
714
|
+
##### Sortable.get(element:`HTMLElement`):`Sortable`
|
715
|
+
Get the Sortable instance on an element.
|
716
|
+
|
717
|
+
|
718
|
+
---
|
719
|
+
|
720
|
+
|
721
|
+
##### Sortable.mount(plugin:`...SortablePlugin|SortablePlugin[]`)
|
722
|
+
Mounts a plugin to Sortable.
|
723
|
+
|
724
|
+
|
725
|
+
---
|
726
|
+
|
727
|
+
|
728
|
+
##### Sortable.utils
|
729
|
+
* on(el`:HTMLElement`, event`:String`, fn`:Function`) — attach an event handler function
|
730
|
+
* off(el`:HTMLElement`, event`:String`, fn`:Function`) — remove an event handler
|
731
|
+
* css(el`:HTMLElement`)`:Object` — get the values of all the CSS properties
|
732
|
+
* css(el`:HTMLElement`, prop`:String`)`:Mixed` — get the value of style properties
|
733
|
+
* css(el`:HTMLElement`, prop`:String`, value`:String`) — set one CSS properties
|
734
|
+
* css(el`:HTMLElement`, props`:Object`) — set more CSS properties
|
735
|
+
* find(ctx`:HTMLElement`, tagName`:String`[, iterator`:Function`])`:Array` — get elements by tag name
|
736
|
+
* bind(ctx`:Mixed`, fn`:Function`)`:Function` — Takes a function and returns a new one that will always have a particular context
|
737
|
+
* is(el`:HTMLElement`, selector`:String`)`:Boolean` — check the current matched set of elements against a selector
|
738
|
+
* closest(el`:HTMLElement`, selector`:String`[, ctx`:HTMLElement`])`:HTMLElement|Null` — for each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree
|
739
|
+
* clone(el`:HTMLElement`)`:HTMLElement` — create a deep copy of the set of matched elements
|
740
|
+
* toggleClass(el`:HTMLElement`, name`:String`, state`:Boolean`) — add or remove one classes from each element
|
741
|
+
* detectDirection(el`:HTMLElement`)`:String` — automatically detect the [direction](https://github.com/SortableJS/Sortable/wiki/Swap-Thresholds-and-Direction#direction) of the element as either `'vertical'` or `'horizontal'`
|
742
|
+
|
743
|
+
|
744
|
+
---
|
745
|
+
|
746
|
+
|
747
|
+
### Plugins
|
748
|
+
#### Extra Plugins (included in complete versions)
|
749
|
+
- [MultiDrag](https://github.com/SortableJS/Sortable/tree/master/plugins/MultiDrag)
|
750
|
+
- [Swap](https://github.com/SortableJS/Sortable/tree/master/plugins/Swap)
|
751
|
+
|
752
|
+
#### Default Plugins (included in default versions)
|
753
|
+
- [AutoScroll](https://github.com/SortableJS/Sortable/tree/master/plugins/AutoScroll)
|
754
|
+
- [OnSpill](https://github.com/SortableJS/Sortable/tree/master/plugins/OnSpill)
|
755
|
+
|
756
|
+
|
757
|
+
---
|
758
|
+
|
759
|
+
|
760
|
+
<a name="cdn"></a>
|
761
|
+
### CDN
|
762
|
+
|
763
|
+
```html
|
764
|
+
<!-- jsDelivr :: Sortable :: Latest (https://www.jsdelivr.com/package/npm/sortablejs) -->
|
765
|
+
<script src="https://cdn.jsdelivr.net/npm/sortablejs@latest/Sortable.min.js"></script>
|
766
|
+
```
|
767
|
+
|
768
|
+
|
769
|
+
---
|
770
|
+
|
771
|
+
|
772
|
+
### Contributing (Issue/PR)
|
773
|
+
|
774
|
+
Please, [read this](CONTRIBUTING.md).
|
775
|
+
|
776
|
+
|
777
|
+
---
|
778
|
+
|
779
|
+
|
780
|
+
## Contributors
|
781
|
+
|
782
|
+
### Code Contributors
|
783
|
+
|
784
|
+
This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].
|
785
|
+
<a href="https://github.com/SortableJS/Sortable/graphs/contributors"><img src="https://opencollective.com/Sortable/contributors.svg?width=890&button=false" /></a>
|
786
|
+
|
787
|
+
### Financial Contributors
|
788
|
+
|
789
|
+
Become a financial contributor and help us sustain our community. [[Contribute](https://opencollective.com/Sortable/contribute)]
|
790
|
+
|
791
|
+
#### Individuals
|
792
|
+
|
793
|
+
<a href="https://opencollective.com/Sortable"><img src="https://opencollective.com/Sortable/individuals.svg?width=890"></a>
|
794
|
+
|
795
|
+
#### Organizations
|
796
|
+
|
797
|
+
Support this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/Sortable/contribute)]
|
798
|
+
|
799
|
+
<a href="https://opencollective.com/Sortable/organization/0/website"><img src="https://opencollective.com/Sortable/organization/0/avatar.svg"></a>
|
800
|
+
<a href="https://opencollective.com/Sortable/organization/1/website"><img src="https://opencollective.com/Sortable/organization/1/avatar.svg"></a>
|
801
|
+
<a href="https://opencollective.com/Sortable/organization/2/website"><img src="https://opencollective.com/Sortable/organization/2/avatar.svg"></a>
|
802
|
+
<a href="https://opencollective.com/Sortable/organization/3/website"><img src="https://opencollective.com/Sortable/organization/3/avatar.svg"></a>
|
803
|
+
<a href="https://opencollective.com/Sortable/organization/4/website"><img src="https://opencollective.com/Sortable/organization/4/avatar.svg"></a>
|
804
|
+
<a href="https://opencollective.com/Sortable/organization/5/website"><img src="https://opencollective.com/Sortable/organization/5/avatar.svg"></a>
|
805
|
+
<a href="https://opencollective.com/Sortable/organization/6/website"><img src="https://opencollective.com/Sortable/organization/6/avatar.svg"></a>
|
806
|
+
<a href="https://opencollective.com/Sortable/organization/7/website"><img src="https://opencollective.com/Sortable/organization/7/avatar.svg"></a>
|
807
|
+
<a href="https://opencollective.com/Sortable/organization/8/website"><img src="https://opencollective.com/Sortable/organization/8/avatar.svg"></a>
|
808
|
+
<a href="https://opencollective.com/Sortable/organization/9/website"><img src="https://opencollective.com/Sortable/organization/9/avatar.svg"></a>
|
809
|
+
|
810
|
+
## MIT LICENSE
|
811
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
812
|
+
a copy of this software and associated documentation files (the
|
813
|
+
"Software"), to deal in the Software without restriction, including
|
814
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
815
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
816
|
+
permit persons to whom the Software is furnished to do so, subject to
|
817
|
+
the following conditions:
|
818
|
+
|
819
|
+
The above copyright notice and this permission notice shall be
|
820
|
+
included in all copies or substantial portions of the Software.
|
821
|
+
|
822
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
823
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
824
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
825
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
826
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
827
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
828
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|