fomantic-ui 2.9.4-beta.7 → 2.9.4-beta.70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.all-contributorsrc +20 -1
- package/.eslintrc.js +17 -0
- package/.github/FUNDING.yml +1 -1
- package/.github/workflows/ci.yml +5 -5
- package/.github/workflows/depsreview.yml +14 -0
- package/.github/workflows/nightly.yml +1 -1
- package/.github/workflows/release.yml +1 -1
- package/CONTRIBUTORS.md +2 -0
- package/README.md +2 -12
- package/dist/components/accordion.css +1 -1
- package/dist/components/accordion.js +4 -2
- package/dist/components/accordion.min.css +1 -1
- package/dist/components/accordion.min.js +2 -2
- package/dist/components/ad.css +1 -1
- package/dist/components/ad.min.css +1 -1
- package/dist/components/api.js +7 -3
- package/dist/components/api.min.js +2 -2
- package/dist/components/breadcrumb.css +1 -1
- package/dist/components/breadcrumb.min.css +1 -1
- package/dist/components/button.css +21 -3
- package/dist/components/button.min.css +2 -2
- package/dist/components/calendar.css +1 -1
- package/dist/components/calendar.js +15 -3
- package/dist/components/calendar.min.css +1 -1
- package/dist/components/calendar.min.js +3 -3
- package/dist/components/card.css +1 -1
- package/dist/components/card.min.css +1 -1
- package/dist/components/checkbox.css +1 -1
- package/dist/components/checkbox.js +10 -4
- package/dist/components/checkbox.min.css +1 -1
- package/dist/components/checkbox.min.js +3 -3
- package/dist/components/comment.css +1 -1
- package/dist/components/comment.min.css +1 -1
- package/dist/components/container.css +1 -1
- package/dist/components/container.min.css +1 -1
- package/dist/components/dimmer.css +7 -3
- package/dist/components/dimmer.js +4 -2
- package/dist/components/dimmer.min.css +2 -2
- package/dist/components/dimmer.min.js +2 -2
- package/dist/components/divider.css +1 -1
- package/dist/components/divider.min.css +1 -1
- package/dist/components/dropdown.css +46 -38
- package/dist/components/dropdown.js +104 -33
- package/dist/components/dropdown.min.css +2 -2
- package/dist/components/dropdown.min.js +3 -3
- package/dist/components/embed.css +1 -1
- package/dist/components/embed.js +17 -7
- package/dist/components/embed.min.css +1 -1
- package/dist/components/embed.min.js +3 -3
- package/dist/components/emoji.css +1 -1
- package/dist/components/emoji.min.css +1 -1
- package/dist/components/feed.css +12 -1
- package/dist/components/feed.min.css +2 -2
- package/dist/components/flag.css +1 -1
- package/dist/components/flag.min.css +1 -1
- package/dist/components/flyout.css +1 -1
- package/dist/components/flyout.js +4 -2
- package/dist/components/flyout.min.css +1 -1
- package/dist/components/flyout.min.js +2 -2
- package/dist/components/form.css +15 -3
- package/dist/components/form.js +66 -23
- package/dist/components/form.min.css +2 -2
- package/dist/components/form.min.js +3 -3
- package/dist/components/grid.css +5 -5
- package/dist/components/grid.min.css +2 -2
- package/dist/components/header.css +1 -1
- package/dist/components/header.min.css +1 -1
- package/dist/components/icon.css +1 -1
- package/dist/components/icon.min.css +1 -1
- package/dist/components/image.css +1 -1
- package/dist/components/image.min.css +1 -1
- package/dist/components/input.css +1 -1
- package/dist/components/input.min.css +1 -1
- package/dist/components/item.css +1 -1
- package/dist/components/item.min.css +1 -1
- package/dist/components/label.css +1 -1
- package/dist/components/label.min.css +1 -1
- package/dist/components/list.css +1 -1
- package/dist/components/list.min.css +1 -1
- package/dist/components/loader.css +1 -1
- package/dist/components/loader.min.css +1 -1
- package/dist/components/menu.css +1 -1
- package/dist/components/menu.min.css +1 -1
- package/dist/components/message.css +2 -1
- package/dist/components/message.min.css +2 -2
- package/dist/components/modal.css +1 -1
- package/dist/components/modal.js +7 -3
- package/dist/components/modal.min.css +1 -1
- package/dist/components/modal.min.js +2 -2
- package/dist/components/nag.css +1 -1
- package/dist/components/nag.js +11 -5
- package/dist/components/nag.min.css +1 -1
- package/dist/components/nag.min.js +3 -3
- package/dist/components/placeholder.css +1 -1
- package/dist/components/placeholder.min.css +1 -1
- package/dist/components/popup.css +1 -1
- package/dist/components/popup.js +10 -4
- package/dist/components/popup.min.css +1 -1
- package/dist/components/popup.min.js +2 -2
- package/dist/components/progress.css +15 -6
- package/dist/components/progress.js +4 -2
- package/dist/components/progress.min.css +2 -2
- package/dist/components/progress.min.js +2 -2
- package/dist/components/rail.css +1 -1
- package/dist/components/rail.min.css +1 -1
- package/dist/components/rating.css +1 -1
- package/dist/components/rating.js +4 -2
- package/dist/components/rating.min.css +1 -1
- package/dist/components/rating.min.js +2 -2
- package/dist/components/reset.css +1 -1
- package/dist/components/reset.min.css +1 -1
- package/dist/components/reveal.css +1 -1
- package/dist/components/reveal.min.css +1 -1
- package/dist/components/search.css +1 -1
- package/dist/components/search.js +67 -14
- package/dist/components/search.min.css +1 -1
- package/dist/components/search.min.js +3 -3
- package/dist/components/segment.css +1 -1
- package/dist/components/segment.min.css +1 -1
- package/dist/components/shape.css +1 -1
- package/dist/components/shape.js +7 -5
- package/dist/components/shape.min.css +1 -1
- package/dist/components/shape.min.js +3 -3
- package/dist/components/sidebar.css +1 -1
- package/dist/components/sidebar.js +4 -2
- package/dist/components/sidebar.min.css +1 -1
- package/dist/components/sidebar.min.js +2 -2
- package/dist/components/site.css +14 -6
- package/dist/components/site.js +4 -2
- package/dist/components/site.min.css +2 -2
- package/dist/components/site.min.js +2 -2
- package/dist/components/slider.css +1 -1
- package/dist/components/slider.js +4 -2
- package/dist/components/slider.min.css +1 -1
- package/dist/components/slider.min.js +2 -2
- package/dist/components/state.js +4 -2
- package/dist/components/state.min.js +2 -2
- package/dist/components/statistic.css +1 -1
- package/dist/components/statistic.min.css +1 -1
- package/dist/components/step.css +1 -1
- package/dist/components/step.min.css +1 -1
- package/dist/components/sticky.css +1 -1
- package/dist/components/sticky.js +4 -2
- package/dist/components/sticky.min.css +1 -1
- package/dist/components/sticky.min.js +2 -2
- package/dist/components/tab.css +1 -1
- package/dist/components/tab.js +4 -2
- package/dist/components/tab.min.css +1 -1
- package/dist/components/tab.min.js +2 -2
- package/dist/components/table.css +32 -21
- package/dist/components/table.min.css +2 -2
- package/dist/components/text.css +1 -1
- package/dist/components/text.min.css +1 -1
- package/dist/components/toast.css +1 -1
- package/dist/components/toast.js +7 -3
- package/dist/components/toast.min.css +1 -1
- package/dist/components/toast.min.js +3 -3
- package/dist/components/transition.css +1 -1
- package/dist/components/transition.js +7 -3
- package/dist/components/transition.min.css +1 -1
- package/dist/components/transition.min.js +2 -2
- package/dist/components/visibility.js +4 -2
- package/dist/components/visibility.min.js +2 -2
- package/dist/semantic.css +234 -132
- package/dist/semantic.js +385 -136
- package/dist/semantic.min.css +3 -3
- package/dist/semantic.min.js +3 -3
- package/dist/themes/basic/assets/fonts/LICENSE.txt +91 -0
- package/dist/themes/default/assets/fonts/LICENSE_Lato.txt +94 -0
- package/dist/themes/default/assets/fonts/LICENSE_icons.txt +165 -0
- package/dist/themes/github/assets/fonts/LICENSE.txt +94 -0
- package/dist/themes/material/assets/fonts/LICENSE.txt +202 -0
- package/package.json +14 -14
- package/src/definitions/behaviors/api.js +6 -2
- package/src/definitions/behaviors/form.js +65 -22
- package/src/definitions/behaviors/state.js +3 -1
- package/src/definitions/behaviors/visibility.js +3 -1
- package/src/definitions/collections/form.less +9 -2
- package/src/definitions/collections/grid.less +4 -4
- package/src/definitions/collections/message.less +1 -0
- package/src/definitions/collections/table.less +69 -54
- package/src/definitions/elements/button.less +27 -3
- package/src/definitions/globals/site.js +3 -1
- package/src/definitions/globals/site.less +17 -12
- package/src/definitions/modules/accordion.js +3 -1
- package/src/definitions/modules/calendar.js +14 -2
- package/src/definitions/modules/checkbox.js +9 -3
- package/src/definitions/modules/dimmer.js +3 -1
- package/src/definitions/modules/dimmer.less +8 -5
- package/src/definitions/modules/dropdown.js +103 -32
- package/src/definitions/modules/dropdown.less +43 -29
- package/src/definitions/modules/embed.js +16 -6
- package/src/definitions/modules/flyout.js +3 -1
- package/src/definitions/modules/modal.js +6 -2
- package/src/definitions/modules/nag.js +10 -4
- package/src/definitions/modules/popup.js +9 -3
- package/src/definitions/modules/progress.js +3 -1
- package/src/definitions/modules/progress.less +17 -5
- package/src/definitions/modules/rating.js +3 -1
- package/src/definitions/modules/search.js +66 -13
- package/src/definitions/modules/search.less +9 -2
- package/src/definitions/modules/shape.js +6 -4
- package/src/definitions/modules/sidebar.js +3 -1
- package/src/definitions/modules/slider.js +3 -1
- package/src/definitions/modules/sticky.js +3 -1
- package/src/definitions/modules/tab.js +3 -1
- package/src/definitions/modules/toast.js +6 -2
- package/src/definitions/modules/transition.js +6 -2
- package/src/definitions/views/feed.less +11 -0
- package/src/themes/basic/assets/fonts/LICENSE.txt +91 -0
- package/src/themes/default/assets/fonts/LICENSE_Lato.txt +94 -0
- package/src/themes/default/assets/fonts/LICENSE_icons.txt +165 -0
- package/src/themes/default/elements/button.variables +3 -0
- package/src/themes/default/globals/site.variables +3 -0
- package/src/themes/default/globals/variation.variables +3 -0
- package/src/themes/default/modules/dropdown.variables +3 -0
- package/src/themes/default/modules/progress.variables +1 -1
- package/src/themes/default/modules/search.variables +3 -0
- package/src/themes/default/views/feed.variables +3 -0
- package/src/themes/github/assets/fonts/LICENSE.txt +94 -0
- package/src/themes/material/assets/fonts/LICENSE.txt +202 -0
- package/tasks/admin/components/create.js +4 -4
- package/tasks/admin/components/init.js +2 -2
- package/tasks/admin/components/update.js +3 -3
- package/tasks/admin/distributions/create.js +3 -3
- package/tasks/admin/distributions/init.js +2 -2
- package/tasks/admin/distributions/update.js +4 -4
- package/tasks/build/assets.js +1 -1
- package/tasks/build/css.js +19 -10
- package/tasks/build/javascript.js +12 -5
- package/tasks/check-install.js +1 -1
- package/tasks/config/defaults.js +2 -0
- package/tasks/config/tasks.js +1 -1
- package/tasks/docs/build.js +3 -3
- package/tasks/docs/metadata.js +1 -1
- package/tasks/docs/serve.js +3 -1
- package/tasks/install.js +2 -2
- package/tasks/watch.js +1 -1
- package/types/fomantic-ui-accordion.d.ts +1 -1
- package/types/fomantic-ui-api.d.ts +9 -3
- package/types/fomantic-ui-calendar.d.ts +110 -9
- package/types/fomantic-ui-checkbox.d.ts +14 -4
- package/types/fomantic-ui-dimmer.d.ts +1 -1
- package/types/fomantic-ui-dropdown.d.ts +76 -44
- package/types/fomantic-ui-embed.d.ts +19 -2
- package/types/fomantic-ui-flyout.d.ts +25 -11
- package/types/fomantic-ui-form.d.ts +123 -15
- package/types/fomantic-ui-modal.d.ts +101 -5
- package/types/fomantic-ui-nag.d.ts +4 -4
- package/types/fomantic-ui-popup.d.ts +38 -12
- package/types/fomantic-ui-progress.d.ts +12 -6
- package/types/fomantic-ui-rating.d.ts +1 -1
- package/types/fomantic-ui-search.d.ts +138 -22
- package/types/fomantic-ui-shape.d.ts +2 -2
- package/types/fomantic-ui-sidebar.d.ts +4 -4
- package/types/fomantic-ui-slider.d.ts +2 -2
- package/types/fomantic-ui-sticky.d.ts +1 -1
- package/types/fomantic-ui-tab.d.ts +6 -6
- package/types/fomantic-ui-toast.d.ts +14 -2
- package/types/fomantic-ui-transition.d.ts +41 -7
- package/types/fomantic-ui-visibility.d.ts +3 -3
- package/types/index.d.ts +25 -25
- package/types/tests.ts +188 -0
- package/types/tsconfig.json +1 -1
- package/types/fomantic-ui-tests.ts +0 -25
@@ -468,10 +468,10 @@ select.ui.dropdown {
|
|
468
468
|
|
469
469
|
@media only screen and (max-width: @largestMobileScreen) {
|
470
470
|
& when (@variationDropdownShort) {
|
471
|
-
.ui.selection.dropdown.short .menu {
|
471
|
+
.ui.ui.selection.dropdown.short .menu {
|
472
472
|
max-height: @selectionMobileMaxMenuHeight * 0.75;
|
473
473
|
}
|
474
|
-
.ui.selection.dropdown[class*="very short"] .menu {
|
474
|
+
.ui.ui.selection.dropdown[class*="very short"] .menu {
|
475
475
|
max-height: @selectionMobileMaxMenuHeight * 0.5;
|
476
476
|
}
|
477
477
|
}
|
@@ -479,20 +479,20 @@ select.ui.dropdown {
|
|
479
479
|
max-height: @selectionMobileMaxMenuHeight;
|
480
480
|
}
|
481
481
|
& when (@variationDropdownLong) {
|
482
|
-
.ui.selection.dropdown.long .menu {
|
482
|
+
.ui.ui.selection.dropdown.long .menu {
|
483
483
|
max-height: @selectionMobileMaxMenuHeight * 2;
|
484
484
|
}
|
485
|
-
.ui.selection.dropdown[class*="very long"] .menu {
|
485
|
+
.ui.ui.selection.dropdown[class*="very long"] .menu {
|
486
486
|
max-height: @selectionMobileMaxMenuHeight * 3;
|
487
487
|
}
|
488
488
|
}
|
489
489
|
}
|
490
490
|
@media only screen and (min-width: @tabletBreakpoint) {
|
491
491
|
& when (@variationDropdownShort) {
|
492
|
-
.ui.selection.dropdown.short .menu {
|
492
|
+
.ui.ui.selection.dropdown.short .menu {
|
493
493
|
max-height: @selectionTabletMaxMenuHeight * 0.75;
|
494
494
|
}
|
495
|
-
.ui.selection.dropdown[class*="very short"] .menu {
|
495
|
+
.ui.ui.selection.dropdown[class*="very short"] .menu {
|
496
496
|
max-height: @selectionTabletMaxMenuHeight * 0.5;
|
497
497
|
}
|
498
498
|
}
|
@@ -500,20 +500,20 @@ select.ui.dropdown {
|
|
500
500
|
max-height: @selectionTabletMaxMenuHeight;
|
501
501
|
}
|
502
502
|
& when (@variationDropdownLong) {
|
503
|
-
.ui.selection.dropdown.long .menu {
|
503
|
+
.ui.ui.selection.dropdown.long .menu {
|
504
504
|
max-height: @selectionTabletMaxMenuHeight * 2;
|
505
505
|
}
|
506
|
-
.ui.selection.dropdown[class*="very long"] .menu {
|
506
|
+
.ui.ui.selection.dropdown[class*="very long"] .menu {
|
507
507
|
max-height: @selectionTabletMaxMenuHeight * 3;
|
508
508
|
}
|
509
509
|
}
|
510
510
|
}
|
511
511
|
@media only screen and (min-width: @computerBreakpoint) {
|
512
512
|
& when (@variationDropdownShort) {
|
513
|
-
.ui.selection.dropdown.short .menu {
|
513
|
+
.ui.ui.selection.dropdown.short .menu {
|
514
514
|
max-height: @selectionComputerMaxMenuHeight * 0.75;
|
515
515
|
}
|
516
|
-
.ui.selection.dropdown[class*="very short"] .menu {
|
516
|
+
.ui.ui.selection.dropdown[class*="very short"] .menu {
|
517
517
|
max-height: @selectionComputerMaxMenuHeight * 0.5;
|
518
518
|
}
|
519
519
|
}
|
@@ -521,20 +521,20 @@ select.ui.dropdown {
|
|
521
521
|
max-height: @selectionComputerMaxMenuHeight;
|
522
522
|
}
|
523
523
|
& when (@variationDropdownLong) {
|
524
|
-
.ui.selection.dropdown.long .menu {
|
524
|
+
.ui.ui.selection.dropdown.long .menu {
|
525
525
|
max-height: @selectionComputerMaxMenuHeight * 2;
|
526
526
|
}
|
527
|
-
.ui.selection.dropdown[class*="very long"] .menu {
|
527
|
+
.ui.ui.selection.dropdown[class*="very long"] .menu {
|
528
528
|
max-height: @selectionComputerMaxMenuHeight * 3;
|
529
529
|
}
|
530
530
|
}
|
531
531
|
}
|
532
532
|
@media only screen and (min-width: @widescreenMonitorBreakpoint) {
|
533
533
|
& when (@variationDropdownShort) {
|
534
|
-
.ui.selection.dropdown.short .menu {
|
534
|
+
.ui.ui.selection.dropdown.short .menu {
|
535
535
|
max-height: @selectionWidescreenMaxMenuHeight * 0.75;
|
536
536
|
}
|
537
|
-
.ui.selection.dropdown[class*="very short"] .menu {
|
537
|
+
.ui.ui.selection.dropdown[class*="very short"] .menu {
|
538
538
|
max-height: @selectionWidescreenMaxMenuHeight * 0.5;
|
539
539
|
}
|
540
540
|
}
|
@@ -542,10 +542,10 @@ select.ui.dropdown {
|
|
542
542
|
max-height: @selectionWidescreenMaxMenuHeight;
|
543
543
|
}
|
544
544
|
& when (@variationDropdownLong) {
|
545
|
-
.ui.selection.dropdown.long .menu {
|
545
|
+
.ui.ui.selection.dropdown.long .menu {
|
546
546
|
max-height: @selectionWidescreenMaxMenuHeight * 2;
|
547
547
|
}
|
548
|
-
.ui.selection.dropdown[class*="very long"] .menu {
|
548
|
+
.ui.ui.selection.dropdown[class*="very long"] .menu {
|
549
549
|
max-height: @selectionWidescreenMaxMenuHeight * 3;
|
550
550
|
}
|
551
551
|
}
|
@@ -751,7 +751,7 @@ select.ui.dropdown {
|
|
751
751
|
opacity: @selectionTextUnderlayIconOpacity;
|
752
752
|
}
|
753
753
|
.ui.active.search.dropdown input.search:focus + .text {
|
754
|
-
color: @selectionTextUnderlayColor
|
754
|
+
color: @selectionTextUnderlayColor;
|
755
755
|
}
|
756
756
|
|
757
757
|
.ui.search.dropdown.button > span.sizer {
|
@@ -811,14 +811,14 @@ select.ui.dropdown {
|
|
811
811
|
}
|
812
812
|
}
|
813
813
|
|
814
|
-
.ui.clearable.dropdown .text,
|
815
|
-
.ui.clearable.dropdown
|
814
|
+
.ui.clearable.dropdown .text:not(.default),
|
815
|
+
.ui.clearable.dropdown:not(.search) > .ui.label:last-of-type {
|
816
816
|
margin-right: @clearableTextMargin;
|
817
817
|
}
|
818
818
|
|
819
819
|
.ui.dropdown select.noselection ~ .remove.icon,
|
820
820
|
.ui.dropdown input[value=""] ~ .remove.icon,
|
821
|
-
.ui.dropdown input:not([value]) ~ .remove.icon,
|
821
|
+
.ui.dropdown input:not([value]):not(.search) ~ .remove.icon,
|
822
822
|
.ui.dropdown.loading > .remove.icon {
|
823
823
|
display: none;
|
824
824
|
}
|
@@ -922,6 +922,9 @@ select.ui.dropdown {
|
|
922
922
|
padding: inherit;
|
923
923
|
margin: @multipleSelectionChildMargin;
|
924
924
|
line-height: @multipleSelectionChildLineHeight;
|
925
|
+
&.default {
|
926
|
+
z-index: -1;
|
927
|
+
}
|
925
928
|
}
|
926
929
|
|
927
930
|
.ui.multiple.search.dropdown > .label ~ .text {
|
@@ -1853,13 +1856,20 @@ select.ui.dropdown {
|
|
1853
1856
|
& when not (@variationDropdownSizes = false) {
|
1854
1857
|
each(@variationDropdownSizes, {
|
1855
1858
|
@s: @@value;
|
1856
|
-
.ui.@{value}.dropdown,
|
1857
|
-
.ui.@{value}.dropdown .menu > .item {
|
1859
|
+
.ui.ui.@{value}.dropdown,
|
1860
|
+
.ui.ui.@{value}.dropdown .menu > .item {
|
1858
1861
|
font-size: @s;
|
1859
1862
|
}
|
1860
1863
|
});
|
1861
1864
|
}
|
1862
1865
|
|
1866
|
+
& when (@variationDropdownHighlightMatches) {
|
1867
|
+
.ui.dropdown .menu > .item mark {
|
1868
|
+
background: @highlightMatchesBackground;
|
1869
|
+
color: @highlightMatchesColor;
|
1870
|
+
}
|
1871
|
+
}
|
1872
|
+
|
1863
1873
|
& when (@variationDropdownInverted) {
|
1864
1874
|
/* --------------
|
1865
1875
|
Inverted
|
@@ -1969,7 +1979,7 @@ select.ui.dropdown {
|
|
1969
1979
|
opacity: @invertedSelectionTextUnderlayIconOpacity;
|
1970
1980
|
}
|
1971
1981
|
.ui.inverted.active.search.dropdown input.search:focus + .text {
|
1972
|
-
color: @invertedSelectionTextUnderlayColor
|
1982
|
+
color: @invertedSelectionTextUnderlayColor;
|
1973
1983
|
}
|
1974
1984
|
|
1975
1985
|
.ui.dropdown .inverted.menu > .message:not(.ui),
|
@@ -2035,18 +2045,22 @@ select.ui.dropdown {
|
|
2035
2045
|
.ui.inverted.dropdown .menu::-webkit-scrollbar-thumb:hover {
|
2036
2046
|
background: @thumbInvertedHoverBackground;
|
2037
2047
|
}
|
2038
|
-
|
2039
|
-
|
2040
|
-
|
2048
|
+
& when (@supportIE) {
|
2049
|
+
.ui.dropdown .inverted.menu,
|
2050
|
+
.ui.inverted.dropdown .menu {
|
2041
2051
|
/* IE11 */
|
2042
2052
|
scrollbar-face-color: @thumbInvertedBackgroundHex;
|
2043
2053
|
scrollbar-shadow-color: @thumbInvertedBackgroundHex;
|
2044
2054
|
scrollbar-track-color: @trackInvertedBackgroundHex;
|
2045
2055
|
scrollbar-arrow-color: @trackInvertedBackgroundHex;
|
2046
2056
|
}
|
2047
|
-
|
2048
|
-
|
2049
|
-
|
2057
|
+
}
|
2058
|
+
@supports (-moz-appearance: none) {
|
2059
|
+
.ui.dropdown .inverted.menu,
|
2060
|
+
.ui.inverted.dropdown .menu {
|
2061
|
+
/* firefox: first color thumb, second track */
|
2062
|
+
scrollbar-color: @thumbInvertedBackground @trackInvertedBackground;
|
2063
|
+
}
|
2050
2064
|
}
|
2051
2065
|
}
|
2052
2066
|
& when (@variationDropdownPointing) {
|
@@ -119,11 +119,12 @@
|
|
119
119
|
|
120
120
|
createPlaceholder: function (placeholder) {
|
121
121
|
var
|
122
|
-
icon = module.get.icon()
|
122
|
+
icon = module.get.icon(),
|
123
|
+
alt = module.get.alt()
|
123
124
|
;
|
124
125
|
placeholder = placeholder || module.get.placeholder();
|
125
|
-
$module.html(templates.placeholder(placeholder, icon));
|
126
|
-
module.debug('Creating placeholder for embed', placeholder, icon);
|
126
|
+
$module.html(templates.placeholder(placeholder, icon, alt));
|
127
|
+
module.debug('Creating placeholder for embed', placeholder, icon, alt);
|
127
128
|
},
|
128
129
|
|
129
130
|
createEmbed: function (url) {
|
@@ -203,6 +204,9 @@
|
|
203
204
|
placeholder: function () {
|
204
205
|
return settings.placeholder || $module.data(metadata.placeholder);
|
205
206
|
},
|
207
|
+
alt: function () {
|
208
|
+
return settings.alt || $module.data(metadata.alt);
|
209
|
+
},
|
206
210
|
icon: function () {
|
207
211
|
return settings.icon || ($module.data(metadata.icon) !== undefined
|
208
212
|
? $module.data(metadata.icon)
|
@@ -288,6 +292,7 @@
|
|
288
292
|
.removeData(metadata.id)
|
289
293
|
.removeData(metadata.icon)
|
290
294
|
.removeData(metadata.placeholder)
|
295
|
+
.removeData(metadata.alt)
|
291
296
|
.removeData(metadata.source)
|
292
297
|
.removeData(metadata.url)
|
293
298
|
;
|
@@ -440,7 +445,9 @@
|
|
440
445
|
});
|
441
446
|
}
|
442
447
|
clearTimeout(module.performance.timer);
|
443
|
-
module.performance.timer = setTimeout(function () {
|
448
|
+
module.performance.timer = setTimeout(function () {
|
449
|
+
module.performance.display();
|
450
|
+
}, 500);
|
444
451
|
},
|
445
452
|
display: function () {
|
446
453
|
var
|
@@ -555,6 +562,8 @@
|
|
555
562
|
source: false,
|
556
563
|
url: false,
|
557
564
|
id: false,
|
565
|
+
placeholder: false,
|
566
|
+
alt: false,
|
558
567
|
|
559
568
|
// standard video settings
|
560
569
|
autoplay: 'auto',
|
@@ -577,6 +586,7 @@
|
|
577
586
|
id: 'id',
|
578
587
|
icon: 'icon',
|
579
588
|
placeholder: 'placeholder',
|
589
|
+
alt: 'alt',
|
580
590
|
source: 'source',
|
581
591
|
url: 'url',
|
582
592
|
},
|
@@ -652,7 +662,7 @@
|
|
652
662
|
+ ' width="100%" height="100%"'
|
653
663
|
+ ' msallowFullScreen allowFullScreen></iframe>';
|
654
664
|
},
|
655
|
-
placeholder: function (image, icon) {
|
665
|
+
placeholder: function (image, icon, alt) {
|
656
666
|
var
|
657
667
|
html = '',
|
658
668
|
deQuote = $.fn.embed.settings.templates.deQuote
|
@@ -661,7 +671,7 @@
|
|
661
671
|
html += '<i class="' + deQuote(icon) + ' icon"></i>';
|
662
672
|
}
|
663
673
|
if (image) {
|
664
|
-
html += '<img class="placeholder" src="' + deQuote(image) + '">';
|
674
|
+
html += '<img class="placeholder" src="' + deQuote(image) + (alt ? '" alt="' + deQuote(alt) : '') + '">';
|
665
675
|
}
|
666
676
|
|
667
677
|
return html;
|
@@ -1219,7 +1219,9 @@
|
|
1219
1219
|
});
|
1220
1220
|
}
|
1221
1221
|
clearTimeout(module.performance.timer);
|
1222
|
-
module.performance.timer = setTimeout(function () {
|
1222
|
+
module.performance.timer = setTimeout(function () {
|
1223
|
+
module.performance.display();
|
1224
|
+
}, 500);
|
1223
1225
|
},
|
1224
1226
|
display: function () {
|
1225
1227
|
var
|
@@ -527,7 +527,9 @@
|
|
527
527
|
},
|
528
528
|
debounce: function (method, delay) {
|
529
529
|
clearTimeout(module.timer);
|
530
|
-
module.timer = setTimeout(function () {
|
530
|
+
module.timer = setTimeout(function () {
|
531
|
+
method();
|
532
|
+
}, delay);
|
531
533
|
},
|
532
534
|
keyboard: function (event) {
|
533
535
|
var
|
@@ -1273,7 +1275,9 @@
|
|
1273
1275
|
});
|
1274
1276
|
}
|
1275
1277
|
clearTimeout(module.performance.timer);
|
1276
|
-
module.performance.timer = setTimeout(function () {
|
1278
|
+
module.performance.timer = setTimeout(function () {
|
1279
|
+
module.performance.display();
|
1280
|
+
}, 500);
|
1277
1281
|
},
|
1278
1282
|
display: function () {
|
1279
1283
|
var
|
@@ -88,7 +88,9 @@
|
|
88
88
|
}
|
89
89
|
|
90
90
|
if (settings.displayTime > 0) {
|
91
|
-
setTimeout(function () {
|
91
|
+
setTimeout(function () {
|
92
|
+
module.hide();
|
93
|
+
}, settings.displayTime);
|
92
94
|
}
|
93
95
|
module.show();
|
94
96
|
},
|
@@ -144,8 +146,10 @@
|
|
144
146
|
module.debug('Dismissing nag', settings.storageMethod, settings.key, settings.value, settings.expires);
|
145
147
|
module.storage.set(settings.key, settings.value);
|
146
148
|
}
|
147
|
-
event
|
148
|
-
|
149
|
+
if (event) {
|
150
|
+
event.stopImmediatePropagation();
|
151
|
+
event.preventDefault();
|
152
|
+
}
|
149
153
|
},
|
150
154
|
|
151
155
|
should: {
|
@@ -377,7 +381,9 @@
|
|
377
381
|
});
|
378
382
|
}
|
379
383
|
clearTimeout(module.performance.timer);
|
380
|
-
module.performance.timer = setTimeout(function () {
|
384
|
+
module.performance.timer = setTimeout(function () {
|
385
|
+
module.performance.display();
|
386
|
+
}, 500);
|
381
387
|
},
|
382
388
|
display: function () {
|
383
389
|
var
|
@@ -194,7 +194,9 @@
|
|
194
194
|
;
|
195
195
|
clearTimeout(module.hideTimer);
|
196
196
|
if (!openedWithTouch || (openedWithTouch && settings.addTouchEvents)) {
|
197
|
-
module.showTimer = setTimeout(function () {
|
197
|
+
module.showTimer = setTimeout(function () {
|
198
|
+
module.show();
|
199
|
+
}, delay);
|
198
200
|
}
|
199
201
|
},
|
200
202
|
end: function () {
|
@@ -204,7 +206,9 @@
|
|
204
206
|
: settings.delay
|
205
207
|
;
|
206
208
|
clearTimeout(module.showTimer);
|
207
|
-
module.hideTimer = setTimeout(function () {
|
209
|
+
module.hideTimer = setTimeout(function () {
|
210
|
+
module.hide();
|
211
|
+
}, delay);
|
208
212
|
},
|
209
213
|
touchstart: function (event) {
|
210
214
|
openedWithTouch = true;
|
@@ -1244,7 +1248,9 @@
|
|
1244
1248
|
});
|
1245
1249
|
}
|
1246
1250
|
clearTimeout(module.performance.timer);
|
1247
|
-
module.performance.timer = setTimeout(function () {
|
1251
|
+
module.performance.timer = setTimeout(function () {
|
1252
|
+
module.performance.display();
|
1253
|
+
}, 500);
|
1248
1254
|
},
|
1249
1255
|
display: function () {
|
1250
1256
|
var
|
@@ -791,7 +791,9 @@
|
|
791
791
|
});
|
792
792
|
}
|
793
793
|
clearTimeout(module.performance.timer);
|
794
|
-
module.performance.timer = setTimeout(function () {
|
794
|
+
module.performance.timer = setTimeout(function () {
|
795
|
+
module.performance.display();
|
796
|
+
}, 500);
|
795
797
|
},
|
796
798
|
display: function () {
|
797
799
|
var
|
@@ -33,6 +33,14 @@
|
|
33
33
|
border-radius: @borderRadius;
|
34
34
|
}
|
35
35
|
|
36
|
+
& when (@variationProgressBasic) {
|
37
|
+
.ui.basic.progress {
|
38
|
+
background: transparent;
|
39
|
+
border: none;
|
40
|
+
box-shadow: none;
|
41
|
+
}
|
42
|
+
}
|
43
|
+
|
36
44
|
.ui.progress:first-child {
|
37
45
|
margin: @firstMargin;
|
38
46
|
}
|
@@ -50,14 +58,16 @@
|
|
50
58
|
line-height: 1;
|
51
59
|
position: @barPosition;
|
52
60
|
width: @barInitialWidth;
|
53
|
-
min-width: @barMinWidth;
|
54
61
|
background: @barBackground;
|
55
62
|
border-radius: @barBorderRadius;
|
56
63
|
transition: @barTransition;
|
57
64
|
overflow: hidden;
|
65
|
+
&:not(:empty) {
|
66
|
+
min-width: @barMinWidth;
|
67
|
+
}
|
58
68
|
}
|
59
|
-
.ui.ui.ui.progress:not([data-percent]):not(.indeterminate) .bar,
|
60
|
-
.ui.ui.ui.progress[data-percent="0"]:not(.indeterminate) .bar {
|
69
|
+
.ui.ui.ui.progress:not([data-percent]):not(.indeterminate) .bar:not(:empty),
|
70
|
+
.ui.ui.ui.progress[data-percent="0"]:not(.indeterminate) .bar:not(:empty) {
|
61
71
|
background: transparent;
|
62
72
|
}
|
63
73
|
.ui.progress[data-percent="0"] .bar .progress {
|
@@ -328,7 +338,9 @@
|
|
328
338
|
|
329
339
|
.ui.active.progress .bar {
|
330
340
|
position: relative;
|
331
|
-
|
341
|
+
&:not(:empty) {
|
342
|
+
min-width: @activeMinWidth;
|
343
|
+
}
|
332
344
|
}
|
333
345
|
.ui.active.progress .bar::after {
|
334
346
|
content: "";
|
@@ -384,7 +396,7 @@
|
|
384
396
|
Inverted
|
385
397
|
--------------- */
|
386
398
|
|
387
|
-
.ui.inverted.progress {
|
399
|
+
.ui.inverted.progress:not(.basic) {
|
388
400
|
background: @invertedBackground;
|
389
401
|
border: @invertedBorder;
|
390
402
|
}
|
@@ -368,7 +368,9 @@
|
|
368
368
|
});
|
369
369
|
}
|
370
370
|
clearTimeout(module.performance.timer);
|
371
|
-
module.performance.timer = setTimeout(function () {
|
371
|
+
module.performance.timer = setTimeout(function () {
|
372
|
+
module.performance.display();
|
373
|
+
}, 500);
|
372
374
|
},
|
373
375
|
display: function () {
|
374
376
|
var
|
@@ -135,7 +135,10 @@
|
|
135
135
|
// this makes sure $.extend does not add specified search fields to default fields
|
136
136
|
// this is the only setting which should not extend defaults
|
137
137
|
if (parameters && parameters.searchFields !== undefined) {
|
138
|
-
settings.searchFields = parameters.searchFields
|
138
|
+
settings.searchFields = Array.isArray(parameters.searchFields)
|
139
|
+
? parameters.searchFields
|
140
|
+
: [parameters.searchFields]
|
141
|
+
;
|
139
142
|
}
|
140
143
|
},
|
141
144
|
},
|
@@ -169,7 +172,9 @@
|
|
169
172
|
callback = function () {
|
170
173
|
module.cancel.query();
|
171
174
|
module.remove.focus();
|
172
|
-
module.timer = setTimeout(function () {
|
175
|
+
module.timer = setTimeout(function () {
|
176
|
+
module.hideResults();
|
177
|
+
}, settings.hideDelay);
|
173
178
|
}
|
174
179
|
;
|
175
180
|
if (pageLostFocus) {
|
@@ -629,7 +634,7 @@
|
|
629
634
|
exactResults = [],
|
630
635
|
fuzzyResults = [],
|
631
636
|
searchExp = searchTerm.replace(regExp.escape, '\\$&'),
|
632
|
-
matchRegExp
|
637
|
+
matchRegExp = new RegExp(regExp.beginsWith + searchExp, settings.ignoreSearchCase ? 'i' : ''),
|
633
638
|
|
634
639
|
// avoid duplicates when pushing results
|
635
640
|
addResult = function (array, result) {
|
@@ -665,13 +670,14 @@
|
|
665
670
|
var concatenatedContent = [];
|
666
671
|
$.each(searchFields, function (index, field) {
|
667
672
|
var
|
668
|
-
fieldExists =
|
673
|
+
fieldExists = typeof content[field] === 'string' || typeof content[field] === 'number'
|
669
674
|
;
|
670
675
|
if (fieldExists) {
|
671
676
|
var text;
|
672
677
|
text = typeof content[field] === 'string'
|
673
678
|
? module.remove.diacritics(content[field])
|
674
679
|
: content[field].toString();
|
680
|
+
text = $('<div/>', { html: text }).text().trim();
|
675
681
|
if (settings.fullTextSearch === 'all') {
|
676
682
|
concatenatedContent.push(text);
|
677
683
|
if (index < lastSearchFieldIndex) {
|
@@ -702,8 +708,10 @@
|
|
702
708
|
},
|
703
709
|
},
|
704
710
|
exactSearch: function (query, term) {
|
705
|
-
|
706
|
-
|
711
|
+
if (settings.ignoreSearchCase) {
|
712
|
+
query = query.toLowerCase();
|
713
|
+
term = term.toLowerCase();
|
714
|
+
}
|
707
715
|
|
708
716
|
return term.indexOf(query) > -1;
|
709
717
|
},
|
@@ -730,8 +738,10 @@
|
|
730
738
|
if (typeof query !== 'string') {
|
731
739
|
return false;
|
732
740
|
}
|
733
|
-
|
734
|
-
|
741
|
+
if (settings.ignoreSearchCase) {
|
742
|
+
query = query.toLowerCase();
|
743
|
+
term = term.toLowerCase();
|
744
|
+
}
|
735
745
|
if (queryLength > termLength) {
|
736
746
|
return false;
|
737
747
|
}
|
@@ -1086,6 +1096,39 @@
|
|
1086
1096
|
response[fields.results] = response[fields.results].slice(0, settings.maxResults);
|
1087
1097
|
}
|
1088
1098
|
}
|
1099
|
+
if (settings.highlightMatches) {
|
1100
|
+
var results = response[fields.results],
|
1101
|
+
regExpIgnore = settings.ignoreSearchCase ? 'i' : '',
|
1102
|
+
querySplit = module.get.value().split(''),
|
1103
|
+
diacriticReg = settings.ignoreDiacritics ? '[\u0300-\u036F]?' : '',
|
1104
|
+
htmlReg = '(?![^<]*>)',
|
1105
|
+
markedRegExp = new RegExp(htmlReg + '(' + querySplit.join(diacriticReg + ')(.*?)' + htmlReg + '(') + diacriticReg + ')', regExpIgnore),
|
1106
|
+
markedReplacer = function () {
|
1107
|
+
var args = [].slice.call(arguments, 1, querySplit.length * 2).map(function (x, i) {
|
1108
|
+
return i & 1 ? x : '<mark>' + x + '</mark>'; // eslint-disable-line no-bitwise
|
1109
|
+
});
|
1110
|
+
|
1111
|
+
return args.join('');
|
1112
|
+
}
|
1113
|
+
;
|
1114
|
+
$.each(results, function (label, content) {
|
1115
|
+
$.each(settings.searchFields, function (index, field) {
|
1116
|
+
var
|
1117
|
+
fieldExists = typeof content[field] === 'string' || typeof content[field] === 'number'
|
1118
|
+
;
|
1119
|
+
if (fieldExists) {
|
1120
|
+
var markedHTML = typeof content[field] === 'string'
|
1121
|
+
? content[field]
|
1122
|
+
: content[field].toString();
|
1123
|
+
if (settings.ignoreDiacritics) {
|
1124
|
+
markedHTML = markedHTML.normalize('NFD');
|
1125
|
+
}
|
1126
|
+
markedHTML = markedHTML.replace(/<\/?mark>/g, '');
|
1127
|
+
response[fields.results][label][field] = markedHTML.replace(markedRegExp, markedReplacer);
|
1128
|
+
}
|
1129
|
+
});
|
1130
|
+
});
|
1131
|
+
}
|
1089
1132
|
if (isFunction(template)) {
|
1090
1133
|
html = template(response, fields, settings.preserveHTML);
|
1091
1134
|
} else {
|
@@ -1171,7 +1214,9 @@
|
|
1171
1214
|
});
|
1172
1215
|
}
|
1173
1216
|
clearTimeout(module.performance.timer);
|
1174
|
-
module.performance.timer = setTimeout(function () {
|
1217
|
+
module.performance.timer = setTimeout(function () {
|
1218
|
+
module.performance.display();
|
1219
|
+
}, 500);
|
1175
1220
|
},
|
1176
1221
|
display: function () {
|
1177
1222
|
var
|
@@ -1312,9 +1357,15 @@
|
|
1312
1357
|
// search anywhere in value (set to 'exact' to require exact matches
|
1313
1358
|
fullTextSearch: 'exact',
|
1314
1359
|
|
1360
|
+
// Whether search result should highlight matching strings
|
1361
|
+
highlightMatches: false,
|
1362
|
+
|
1315
1363
|
// match results also if they contain diacritics of the same base character (for example searching for "a" will also match "á" or "â" or "à", etc...)
|
1316
1364
|
ignoreDiacritics: false,
|
1317
1365
|
|
1366
|
+
// whether to consider case sensitivity on local searching
|
1367
|
+
ignoreSearchCase: true,
|
1368
|
+
|
1318
1369
|
// whether to add events to prompt automatically
|
1319
1370
|
automatic: true,
|
1320
1371
|
|
@@ -1393,6 +1444,7 @@
|
|
1393
1444
|
categoryResults: 'results', // array of results (category view)
|
1394
1445
|
description: 'description', // result description
|
1395
1446
|
image: 'image', // result image
|
1447
|
+
alt: 'alt', // result alt text for image
|
1396
1448
|
price: 'price', // result price
|
1397
1449
|
results: 'results', // array of results (standard)
|
1398
1450
|
title: 'title', // result title
|
@@ -1432,8 +1484,9 @@
|
|
1432
1484
|
};
|
1433
1485
|
if (shouldEscape.test(string)) {
|
1434
1486
|
string = string.replace(/&(?![\d#a-z]{1,12};)/gi, '&');
|
1435
|
-
|
1436
|
-
|
1487
|
+
string = string.replace(badChars, escapedChar);
|
1488
|
+
// FUI controlled HTML is still allowed
|
1489
|
+
string = string.replace(/<(\/)*mark>/g, '<$1mark>');
|
1437
1490
|
}
|
1438
1491
|
|
1439
1492
|
return string;
|
@@ -1479,7 +1532,7 @@
|
|
1479
1532
|
if (result[fields.image] !== undefined) {
|
1480
1533
|
html += ''
|
1481
1534
|
+ '<div class="image">'
|
1482
|
-
+ ' <img src="' + result[fields.image].replace(/"/g, '') + '">'
|
1535
|
+
+ ' <img src="' + result[fields.image].replace(/"/g, '') + (result[fields.alt] ? '" alt="' + result[fields.alt].replace(/"/g, '') : '') + '">'
|
1483
1536
|
+ '</div>';
|
1484
1537
|
}
|
1485
1538
|
html += '<div class="content">';
|
@@ -1532,7 +1585,7 @@
|
|
1532
1585
|
if (result[fields.image] !== undefined) {
|
1533
1586
|
html += ''
|
1534
1587
|
+ '<div class="image">'
|
1535
|
-
+ ' <img src="' + result[fields.image].replace(/"/g, '') + '">'
|
1588
|
+
+ ' <img src="' + result[fields.image].replace(/"/g, '') + (result[fields.alt] ? '" alt="' + result[fields.alt].replace(/"/g, '') : '') + '">'
|
1536
1589
|
+ '</div>';
|
1537
1590
|
}
|
1538
1591
|
html += '<div class="content">';
|
@@ -565,8 +565,8 @@
|
|
565
565
|
.ui.search {
|
566
566
|
font-size: @relativeMedium;
|
567
567
|
}
|
568
|
-
& when not (@
|
569
|
-
each(@
|
568
|
+
& when not (@variationSearchSizes = false) {
|
569
|
+
each(@variationSearchSizes, {
|
570
570
|
@s: @{value}SearchSize;
|
571
571
|
.ui.@{value}.search {
|
572
572
|
font-size: @@s;
|
@@ -574,6 +574,13 @@
|
|
574
574
|
});
|
575
575
|
}
|
576
576
|
|
577
|
+
& when (@variationSearchHighlightMatches) {
|
578
|
+
.ui.search > .results mark {
|
579
|
+
background: @highlightMatchesBackground;
|
580
|
+
color: @highlightMatchesColor;
|
581
|
+
}
|
582
|
+
}
|
583
|
+
|
577
584
|
/* --------------
|
578
585
|
Mobile
|
579
586
|
--------------- */
|