fomantic-ui 2.9.1-beta.22 → 2.9.1-beta.24
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/.eslint/index.js +23 -0
- package/.eslint/no-extra-parens-rule.js +17 -0
- package/.eslint/package.json +11 -0
- package/.eslintrc.js +13 -70
- package/.stylelintrc.js +5 -7
- package/dist/components/accordion.css +1 -1
- package/dist/components/accordion.js +26 -26
- 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 +95 -94
- 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 +1 -1
- package/dist/components/button.min.css +1 -1
- package/dist/components/calendar.css +3 -3
- package/dist/components/calendar.js +181 -151
- package/dist/components/calendar.min.css +2 -2
- package/dist/components/calendar.min.js +2 -2
- 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 +14 -14
- package/dist/components/checkbox.min.css +1 -1
- package/dist/components/checkbox.min.js +2 -2
- 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 +1 -1
- package/dist/components/dimmer.js +23 -25
- package/dist/components/dimmer.min.css +1 -1
- 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 +1 -1
- package/dist/components/dropdown.js +252 -254
- package/dist/components/dropdown.min.css +1 -1
- package/dist/components/dropdown.min.js +2 -2
- package/dist/components/embed.css +1 -1
- package/dist/components/embed.js +27 -33
- package/dist/components/embed.min.css +1 -1
- package/dist/components/embed.min.js +2 -2
- package/dist/components/feed.css +1 -1
- package/dist/components/feed.min.css +1 -1
- package/dist/components/flag.css +1 -1
- package/dist/components/flag.min.css +1 -1
- package/dist/components/flyout.css +2 -2
- package/dist/components/flyout.js +50 -44
- package/dist/components/flyout.min.css +1 -1
- package/dist/components/flyout.min.js +2 -2
- package/dist/components/form.css +2 -2
- package/dist/components/form.js +187 -163
- package/dist/components/form.min.css +2 -2
- package/dist/components/form.min.js +2 -2
- package/dist/components/grid.css +1 -1
- package/dist/components/grid.min.css +1 -1
- 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/message.css +1 -1
- package/dist/components/message.min.css +1 -1
- package/dist/components/modal.css +1 -1
- package/dist/components/modal.js +49 -45
- 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 +22 -20
- package/dist/components/nag.min.css +1 -1
- package/dist/components/nag.min.js +2 -2
- 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 +71 -71
- package/dist/components/popup.min.css +1 -1
- package/dist/components/popup.min.js +2 -2
- package/dist/components/progress.css +1 -1
- package/dist/components/progress.js +46 -46
- package/dist/components/progress.min.css +1 -1
- 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 +15 -15
- 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 +69 -74
- package/dist/components/search.min.css +1 -1
- package/dist/components/search.min.js +2 -2
- 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 +39 -39
- package/dist/components/shape.min.css +1 -1
- package/dist/components/shape.min.js +2 -2
- package/dist/components/sidebar.css +1 -1
- package/dist/components/sidebar.js +39 -37
- package/dist/components/sidebar.min.css +1 -1
- package/dist/components/sidebar.min.js +2 -2
- package/dist/components/site.css +1 -1
- package/dist/components/site.js +22 -21
- package/dist/components/site.min.css +1 -1
- package/dist/components/site.min.js +2 -2
- package/dist/components/slider.js +69 -64
- package/dist/components/slider.min.js +2 -2
- package/dist/components/state.js +15 -15
- 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 +25 -25
- 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 +55 -57
- package/dist/components/tab.min.css +1 -1
- package/dist/components/tab.min.js +2 -2
- package/dist/components/table.css +1 -1
- package/dist/components/table.min.css +1 -1
- 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 +57 -30
- package/dist/components/toast.min.css +1 -1
- package/dist/components/toast.min.js +2 -2
- package/dist/components/transition.css +7 -7
- package/dist/components/transition.js +45 -39
- package/dist/components/transition.min.css +1 -1
- package/dist/components/transition.min.js +2 -2
- package/dist/components/visibility.js +25 -25
- package/dist/components/visibility.min.js +2 -2
- package/dist/semantic.css +60 -60
- package/dist/semantic.js +1518 -1427
- package/dist/semantic.min.css +2 -2
- package/dist/semantic.min.js +2 -2
- package/examples/responsive.html +1 -1
- package/gulpfile.js +1 -1
- package/package.json +2 -1
- package/scripts/nightly-version.js +6 -4
- package/src/definitions/behaviors/api.js +94 -93
- package/src/definitions/behaviors/form.js +186 -162
- package/src/definitions/behaviors/state.js +14 -14
- package/src/definitions/behaviors/visibility.js +24 -24
- package/src/definitions/collections/menu.less +2 -2
- package/src/definitions/elements/button.less +2 -2
- package/src/definitions/elements/loader.less +4 -4
- package/src/definitions/elements/step.less +1 -1
- package/src/definitions/globals/site.js +21 -20
- package/src/definitions/modules/accordion.js +25 -25
- package/src/definitions/modules/calendar.js +180 -150
- package/src/definitions/modules/calendar.less +2 -2
- package/src/definitions/modules/checkbox.js +13 -13
- package/src/definitions/modules/dimmer.js +22 -24
- package/src/definitions/modules/dimmer.less +10 -10
- package/src/definitions/modules/dropdown.js +251 -253
- package/src/definitions/modules/embed.js +26 -32
- package/src/definitions/modules/flyout.js +49 -43
- package/src/definitions/modules/flyout.less +1 -1
- package/src/definitions/modules/modal.js +48 -44
- package/src/definitions/modules/nag.js +21 -19
- package/src/definitions/modules/popup.js +70 -70
- package/src/definitions/modules/progress.js +45 -45
- package/src/definitions/modules/rating.js +14 -14
- package/src/definitions/modules/search.js +68 -73
- package/src/definitions/modules/shape.js +38 -38
- package/src/definitions/modules/sidebar.js +38 -36
- package/src/definitions/modules/slider.js +68 -63
- package/src/definitions/modules/sticky.js +24 -24
- package/src/definitions/modules/tab.js +54 -56
- package/src/definitions/modules/toast.js +56 -29
- package/src/definitions/modules/transition.js +44 -38
- package/src/themes/amazon/elements/button.overrides +7 -7
- package/src/themes/default/collections/form.variables +1 -1
- package/src/themes/default/elements/reveal.variables +1 -1
- package/src/themes/default/globals/site.variables +1 -1
- package/src/themes/default/modules/dimmer.variables +6 -6
- package/src/themes/default/modules/modal.variables +1 -1
- package/src/themes/default/modules/slider.variables +4 -4
- package/src/themes/default/modules/toast.variables +2 -2
- package/src/themes/default/modules/transition.overrides +12 -12
- package/src/themes/flat/collections/form.overrides +2 -2
- package/src/themes/flat/globals/site.variables +1 -1
- package/src/themes/github/collections/form.overrides +2 -2
- package/src/themes/github/collections/menu.variables +1 -1
- package/src/themes/github/collections/message.overrides +3 -3
- package/src/themes/github/elements/input.overrides +2 -2
- package/src/themes/timeline/views/feed.overrides +3 -3
- package/src/themes/twitter/elements/button.overrides +2 -2
- package/tasks/README.md +1 -3
- package/tasks/admin/components/create.js +9 -16
- package/tasks/admin/components/init.js +7 -7
- package/tasks/admin/components/update.js +10 -10
- package/tasks/admin/distributions/create.js +16 -18
- package/tasks/admin/distributions/init.js +7 -7
- package/tasks/admin/distributions/update.js +10 -10
- package/tasks/admin/publish.js +1 -3
- package/tasks/admin/register.js +6 -6
- package/tasks/admin/release.js +1 -3
- package/tasks/build/assets.js +2 -2
- package/tasks/build/css.js +8 -3
- package/tasks/build/javascript.js +3 -1
- package/tasks/build.js +1 -1
- package/tasks/check-install.js +1 -1
- package/tasks/clean.js +1 -1
- package/tasks/collections/README.md +3 -5
- package/tasks/collections/admin.js +1 -1
- package/tasks/collections/docs.js +1 -1
- package/tasks/collections/install.js +1 -1
- package/tasks/collections/rtl.js +1 -1
- package/tasks/collections/various.js +1 -1
- package/tasks/config/admin/github.js +6 -8
- package/tasks/config/admin/templates/css-package.js +1 -1
- package/tasks/config/admin/templates/less-package.js +1 -1
- package/tasks/config/npm/gulpfile.js +7 -7
- package/tasks/config/project/config.js +14 -19
- package/tasks/config/project/install.js +35 -34
- package/tasks/config/project/release.js +15 -16
- package/tasks/config/tasks.js +18 -20
- package/tasks/config/user.js +5 -3
- package/tasks/docs/build.js +5 -3
- package/tasks/docs/metadata.js +7 -8
- package/tasks/docs/serve.js +6 -3
- package/tasks/install.js +39 -39
- package/tasks/rtl/build.js +1 -3
- package/tasks/rtl/watch.js +1 -3
- package/tasks/version.js +1 -3
- package/tasks/watch.js +1 -1
- package/test/.eslintrc.js +0 -4
- package/test/meteor/assets.js +1 -1
- package/test/modules/module.spec.js +15 -15
- package/test/modules/popup.spec.js +1 -1
- package/test/modules/search.spec.js +1 -1
- package/test/modules/tab.spec.js +1 -1
- package/test/modules/transition.spec.js +1 -1
package/.eslint/index.js
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
module.exports = {
|
2
|
+
rules: {
|
3
|
+
'no-extra-parens': require('./no-extra-parens-rule'),
|
4
|
+
},
|
5
|
+
configs: {
|
6
|
+
recommended: {
|
7
|
+
plugins: [
|
8
|
+
'@internal/eslint-plugin',
|
9
|
+
],
|
10
|
+
rules: {
|
11
|
+
// https://github.com/eslint/eslint/issues/16626
|
12
|
+
// https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/errors.js#L66
|
13
|
+
'@internal/no-extra-parens': ['error', 'all', {
|
14
|
+
conditionalAssign: true,
|
15
|
+
enforceForArrowConditionals: false,
|
16
|
+
ignoreJSX: 'all',
|
17
|
+
nestedBinaryExpressions: false,
|
18
|
+
returnAssign: false,
|
19
|
+
}],
|
20
|
+
},
|
21
|
+
},
|
22
|
+
},
|
23
|
+
};
|
@@ -0,0 +1,17 @@
|
|
1
|
+
const eslint = require('eslint');
|
2
|
+
const ruleComposer = require('eslint-rule-composer');
|
3
|
+
|
4
|
+
const rule = new eslint.Linter().getRules().get('no-extra-parens');
|
5
|
+
|
6
|
+
module.exports = ruleComposer.filterReports(
|
7
|
+
rule,
|
8
|
+
(problem) => {
|
9
|
+
if (problem.node.type === 'ConditionalExpression'
|
10
|
+
&& (problem.node.parent.type === 'ConditionalExpression' || problem.node.parent.type === 'SpreadElement')
|
11
|
+
) {
|
12
|
+
return false;
|
13
|
+
}
|
14
|
+
|
15
|
+
return problem;
|
16
|
+
}
|
17
|
+
);
|
package/.eslintrc.js
CHANGED
@@ -6,6 +6,7 @@ module.exports = {
|
|
6
6
|
extends: [
|
7
7
|
'airbnb-base',
|
8
8
|
'plugin:unicorn/recommended',
|
9
|
+
'plugin:@internal/eslint-plugin/recommended',
|
9
10
|
],
|
10
11
|
parserOptions: {
|
11
12
|
ecmaVersion: '2020',
|
@@ -22,10 +23,10 @@ module.exports = {
|
|
22
23
|
'class-methods-use-this': 'off',
|
23
24
|
'comma-dangle': ['error', {
|
24
25
|
arrays: 'always-multiline',
|
25
|
-
|
26
|
+
exports: 'always-multiline',
|
26
27
|
functions: 'never',
|
27
28
|
imports: 'always-multiline',
|
28
|
-
|
29
|
+
objects: 'always-multiline',
|
29
30
|
}],
|
30
31
|
'consistent-return': 'off',
|
31
32
|
curly: ['error', 'all'],
|
@@ -56,20 +57,20 @@ module.exports = {
|
|
56
57
|
'object-shorthand': ['error', 'never'],
|
57
58
|
'padding-line-between-statements': ['error', {
|
58
59
|
blankLine: 'always',
|
59
|
-
prev: '*',
|
60
60
|
next: ['continue', 'break', 'export', 'return', 'throw'],
|
61
|
+
prev: '*',
|
61
62
|
}],
|
62
63
|
'prefer-destructuring': 'off',
|
63
64
|
'prefer-template': 'off',
|
64
65
|
'spaced-comment': ['error', 'always', {
|
65
|
-
line: {
|
66
|
-
markers: ['/'],
|
67
|
-
exceptions: ['-', '+'],
|
68
|
-
},
|
69
66
|
block: {
|
70
|
-
markers: ['!'],
|
71
|
-
exceptions: ['*'],
|
72
67
|
balanced: true,
|
68
|
+
exceptions: ['*'],
|
69
|
+
markers: ['!'],
|
70
|
+
},
|
71
|
+
line: {
|
72
|
+
exceptions: ['-', '+'],
|
73
|
+
markers: ['/'],
|
73
74
|
},
|
74
75
|
}],
|
75
76
|
strict: 'off',
|
@@ -80,6 +81,7 @@ module.exports = {
|
|
80
81
|
'unicorn/no-null': 'off',
|
81
82
|
'unicorn/no-this-assignment': 'off',
|
82
83
|
'unicorn/numeric-separators-style': 'off',
|
84
|
+
'unicorn/prefer-array-find': 'off',
|
83
85
|
'unicorn/prefer-array-some': 'off', // https://github.com/sindresorhus/eslint-plugin-unicorn/issues/2007
|
84
86
|
'unicorn/prefer-module': 'off',
|
85
87
|
'unicorn/prevent-abbreviations': 'off',
|
@@ -94,6 +96,7 @@ module.exports = {
|
|
94
96
|
'one-var': 'off',
|
95
97
|
'prefer-const': 'off',
|
96
98
|
'prefer-exponentiation-operator': 'off',
|
99
|
+
'prefer-rest-params': 'off',
|
97
100
|
'prefer-spread': 'off',
|
98
101
|
'semi-style': 'off',
|
99
102
|
'unicorn/no-array-for-each': 'off',
|
@@ -113,68 +116,8 @@ module.exports = {
|
|
113
116
|
eqeqeq: 'off', // about 300 errors to be fixed manually
|
114
117
|
'global-require': 'off', // about 30 errors to be fixed manually
|
115
118
|
'no-shadow': 'off', // about 220 errors to be fixed manually
|
119
|
+
'no-shadow-restricted-names': 'off', // TODO https://github.com/fomantic/Fomantic-UI/pull/2604
|
116
120
|
'prefer-arrow-callback': 'off', // about 350 errors (all autofixable)
|
117
|
-
'prefer-rest-params': 'off', // about 180 errors to be fixed manually
|
118
|
-
'unicorn/no-nested-ternary': 'off', // about 80 errors (except 14 nested ternary operators autofixable)
|
119
|
-
|
120
|
-
// TODO
|
121
|
-
'import/extensions': 'off',
|
122
|
-
'import/no-dynamic-require': 'off',
|
123
|
-
'no-bitwise': 'off',
|
124
|
-
'no-cond-assign': 'off',
|
125
|
-
'no-else-return': 'off',
|
126
|
-
'no-empty': 'off',
|
127
|
-
'no-labels': 'off',
|
128
|
-
'no-loop-func': 'off',
|
129
|
-
'no-mixed-operators': 'off',
|
130
|
-
'no-multi-assign': 'off',
|
131
|
-
'no-new-func': 'off',
|
132
|
-
'no-path-concat': 'off',
|
133
|
-
'no-prototype-builtins': 'off',
|
134
|
-
'no-return-assign': 'off',
|
135
|
-
'no-self-assign': 'off',
|
136
|
-
'no-shadow-restricted-names': 'off',
|
137
|
-
'no-unused-expressions': 'off',
|
138
|
-
'no-use-before-define': 'off',
|
139
|
-
'no-useless-concat': 'off',
|
140
|
-
'no-useless-escape': 'off',
|
141
|
-
radix: 'off',
|
142
|
-
'unicorn/better-regex': 'off',
|
143
|
-
'unicorn/consistent-function-scoping': 'off',
|
144
|
-
'unicorn/empty-brace-spaces': 'off',
|
145
|
-
'unicorn/escape-case': 'off',
|
146
|
-
'unicorn/explicit-length-check': 'off',
|
147
|
-
'unicorn/new-for-builtins': 'off',
|
148
|
-
'unicorn/no-hex-escape': 'off',
|
149
|
-
'unicorn/no-instanceof-array': 'off',
|
150
|
-
'unicorn/no-process-exit': 'off',
|
151
|
-
'unicorn/no-typeof-undefined': 'off',
|
152
|
-
'unicorn/no-useless-switch-case': 'off',
|
153
|
-
'unicorn/no-useless-undefined': 'off',
|
154
|
-
'unicorn/prefer-array-find': 'off',
|
155
|
-
'unicorn/prefer-date-now': 'off',
|
156
|
-
'unicorn/prefer-default-parameters': 'off',
|
157
|
-
'unicorn/prefer-logical-operator-over-ternary': 'off',
|
158
|
-
'unicorn/prefer-native-coercion-functions': 'off',
|
159
|
-
'unicorn/prefer-negative-index': 'off',
|
160
|
-
'unicorn/prefer-regexp-test': 'off',
|
161
|
-
'unicorn/prefer-switch': 'off',
|
162
|
-
'unicorn/prefer-ternary': 'off',
|
163
|
-
|
164
|
-
// TODO rare errors
|
165
|
-
'arrow-body-style': 'off',
|
166
|
-
'block-scoped-var': 'off',
|
167
|
-
'import/no-extraneous-dependencies': 'off',
|
168
|
-
'import/order': 'off',
|
169
|
-
'new-cap': 'off',
|
170
|
-
'newline-per-chained-call': 'off',
|
171
|
-
'no-extra-boolean-cast': 'off',
|
172
|
-
'no-redeclare': 'off',
|
173
|
-
'no-unneeded-ternary': 'off',
|
174
|
-
'no-useless-return': 'off',
|
175
|
-
'operator-assignment': 'off',
|
176
|
-
'unicorn/no-console-spaces': 'off',
|
177
|
-
yoda: 'off',
|
178
121
|
},
|
179
122
|
reportUnusedDisableDirectives: true,
|
180
123
|
globals: {
|
package/.stylelintrc.js
CHANGED
@@ -16,8 +16,13 @@ module.exports = {
|
|
16
16
|
'max-line-length': null,
|
17
17
|
'no-descending-specificity': null,
|
18
18
|
'no-extra-semicolons': null, // fix GH-1832 - workaround for wikimedia/less.php parser
|
19
|
+
'number-max-precision': 5,
|
19
20
|
'rule-empty-line-before': null,
|
20
21
|
|
22
|
+
// TODO rules to be removed/fixed in v2.10.0 as fixes are not compatible with IE11
|
23
|
+
'alpha-value-notation': 'number', // https://caniuse.com/mdn-css_properties_opacity_percentages
|
24
|
+
'color-function-notation': 'legacy', // https://caniuse.com/mdn-css_types_color_rgba_space_separated_parameters
|
25
|
+
|
21
26
|
// TODO
|
22
27
|
'string-quotes': null, // 1676 errors
|
23
28
|
'at-rule-no-unknown': null, // 1081 errors
|
@@ -31,22 +36,15 @@ module.exports = {
|
|
31
36
|
'import-notation': null, // 56 errors
|
32
37
|
'keyframes-name-pattern': null, // 50 errors
|
33
38
|
'property-no-vendor-prefix': null, // 49 errors
|
34
|
-
'number-leading-zero': null, // 49 errors
|
35
|
-
'color-function-notation': null, // 32 errors
|
36
|
-
'alpha-value-notation': null, // 32 errors
|
37
|
-
'color-hex-case': null, // 32 errors
|
38
39
|
'block-no-empty': null, // 25 errors
|
39
40
|
'selector-no-vendor-prefix': null, // 19 errors
|
40
41
|
'selector-class-pattern': null, // 19 errors
|
41
|
-
'number-no-trailing-zeros': null, // 16 errors
|
42
42
|
'font-family-name-quotes': null, // 13 errors
|
43
43
|
'declaration-block-no-redundant-longhand-properties': null, // 12 errors
|
44
44
|
'value-keyword-case': null, // 12 errors
|
45
45
|
'value-no-vendor-prefix': null, // 9 errors
|
46
|
-
'color-hex-length': null, // 9 errors
|
47
46
|
'no-empty-source': null, // 8 errors
|
48
47
|
'font-family-no-missing-generic-family-keyword': null, // 8 errors
|
49
|
-
'number-max-precision': null, // 7 errors
|
50
48
|
'selector-attribute-quotes': null, // 7 errors
|
51
49
|
'shorthand-property-no-redundant-values': null, // 5 errors
|
52
50
|
'function-url-quotes': null, // 5 errors
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* # Fomantic-UI 2.9.1-beta.
|
2
|
+
* # Fomantic-UI 2.9.1-beta.24+029436f - Accordion
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
@@ -15,7 +15,7 @@
|
|
15
15
|
return typeof obj === 'function' && typeof obj.nodeType !== 'number';
|
16
16
|
}
|
17
17
|
|
18
|
-
window =
|
18
|
+
window = window !== undefined && window.Math === Math
|
19
19
|
? window
|
20
20
|
: globalThis;
|
21
21
|
|
@@ -23,18 +23,18 @@
|
|
23
23
|
var
|
24
24
|
$allModules = $(this),
|
25
25
|
|
26
|
-
time =
|
26
|
+
time = Date.now(),
|
27
27
|
performance = [],
|
28
28
|
|
29
29
|
query = arguments[0],
|
30
|
-
methodInvoked =
|
30
|
+
methodInvoked = typeof query === 'string',
|
31
31
|
queryArguments = [].slice.call(arguments, 1),
|
32
32
|
|
33
33
|
returnedValue
|
34
34
|
;
|
35
35
|
$allModules.each(function () {
|
36
36
|
var
|
37
|
-
settings =
|
37
|
+
settings = $.isPlainObject(parameters)
|
38
38
|
? $.extend(true, {}, $.fn.accordion.settings, parameters)
|
39
39
|
: $.extend({}, $.fn.accordion.settings),
|
40
40
|
|
@@ -121,16 +121,16 @@
|
|
121
121
|
|
122
122
|
toggle: function (query) {
|
123
123
|
var
|
124
|
-
$activeTitle =
|
125
|
-
? (typeof query === 'number'
|
124
|
+
$activeTitle = query !== undefined
|
125
|
+
? (typeof query === 'number'
|
126
126
|
? $title.eq(query)
|
127
|
-
: $(query).closest(selector.title)
|
127
|
+
: $(query).closest(selector.title))
|
128
128
|
: $(this).closest(selector.title),
|
129
129
|
$activeContent = $activeTitle.next($content),
|
130
130
|
isAnimating = $activeContent.hasClass(className.animating),
|
131
131
|
isActive = $activeContent.hasClass(className.active),
|
132
|
-
isOpen =
|
133
|
-
isOpening =
|
132
|
+
isOpen = isActive && !isAnimating,
|
133
|
+
isOpening = !isActive && isAnimating
|
134
134
|
;
|
135
135
|
module.debug('Toggling visibility of content', $activeTitle);
|
136
136
|
if (isOpen || isOpening) {
|
@@ -146,15 +146,15 @@
|
|
146
146
|
|
147
147
|
open: function (query) {
|
148
148
|
var
|
149
|
-
$activeTitle =
|
150
|
-
? (typeof query === 'number'
|
149
|
+
$activeTitle = query !== undefined
|
150
|
+
? (typeof query === 'number'
|
151
151
|
? $title.eq(query)
|
152
|
-
: $(query).closest(selector.title)
|
152
|
+
: $(query).closest(selector.title))
|
153
153
|
: $(this).closest(selector.title),
|
154
154
|
$activeContent = $activeTitle.next($content),
|
155
155
|
isAnimating = $activeContent.hasClass(className.animating),
|
156
156
|
isActive = $activeContent.hasClass(className.active),
|
157
|
-
isOpen =
|
157
|
+
isOpen = isActive || isAnimating
|
158
158
|
;
|
159
159
|
if (isOpen) {
|
160
160
|
module.debug('Accordion already open, skipping', $activeContent);
|
@@ -216,16 +216,16 @@
|
|
216
216
|
|
217
217
|
close: function (query) {
|
218
218
|
var
|
219
|
-
$activeTitle =
|
220
|
-
? (typeof query === 'number'
|
219
|
+
$activeTitle = query !== undefined
|
220
|
+
? (typeof query === 'number'
|
221
221
|
? $title.eq(query)
|
222
|
-
: $(query).closest(selector.title)
|
222
|
+
: $(query).closest(selector.title))
|
223
223
|
: $(this).closest(selector.title),
|
224
224
|
$activeContent = $activeTitle.next($content),
|
225
225
|
isAnimating = $activeContent.hasClass(className.animating),
|
226
226
|
isActive = $activeContent.hasClass(className.active),
|
227
|
-
isOpening =
|
228
|
-
isClosing =
|
227
|
+
isOpening = !isActive && isAnimating,
|
228
|
+
isClosing = isActive && isAnimating
|
229
229
|
;
|
230
230
|
if ((isActive || isOpening) && !isClosing) {
|
231
231
|
module.debug('Closing accordion content', $activeContent);
|
@@ -278,7 +278,7 @@
|
|
278
278
|
|
279
279
|
closeOthers: function (index) {
|
280
280
|
var
|
281
|
-
$activeTitle =
|
281
|
+
$activeTitle = index !== undefined
|
282
282
|
? $title.eq(index)
|
283
283
|
: $(this).closest(selector.title),
|
284
284
|
$parentTitles = $activeTitle.parents(selector.content).prev(selector.title),
|
@@ -298,7 +298,7 @@
|
|
298
298
|
$openTitles = $openTitles.not($nestedTitles);
|
299
299
|
$openContents = $openTitles.next($content);
|
300
300
|
}
|
301
|
-
if (
|
301
|
+
if ($openTitles.length > 0) {
|
302
302
|
module.debug('Exclusive enabled, closing other content', $openTitles);
|
303
303
|
$openTitles
|
304
304
|
.removeClass(className.active)
|
@@ -427,7 +427,7 @@
|
|
427
427
|
previousTime
|
428
428
|
;
|
429
429
|
if (settings.performance) {
|
430
|
-
currentTime =
|
430
|
+
currentTime = Date.now();
|
431
431
|
previousTime = time || currentTime;
|
432
432
|
executionTime = currentTime - previousTime;
|
433
433
|
time = currentTime;
|
@@ -478,11 +478,11 @@
|
|
478
478
|
;
|
479
479
|
passedArguments = passedArguments || queryArguments;
|
480
480
|
context = context || element;
|
481
|
-
if (typeof query
|
482
|
-
query = query.split(/[
|
481
|
+
if (typeof query === 'string' && object !== undefined) {
|
482
|
+
query = query.split(/[ .]/);
|
483
483
|
maxDepth = query.length - 1;
|
484
484
|
$.each(query, function (depth, value) {
|
485
|
-
var camelCaseValue =
|
485
|
+
var camelCaseValue = depth != maxDepth
|
486
486
|
? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
|
487
487
|
: query;
|
488
488
|
if ($.isPlainObject(object[camelCaseValue]) && (depth != maxDepth)) {
|
@@ -533,7 +533,7 @@
|
|
533
533
|
}
|
534
534
|
});
|
535
535
|
|
536
|
-
return
|
536
|
+
return returnedValue !== undefined
|
537
537
|
? returnedValue
|
538
538
|
: this;
|
539
539
|
};
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* # Fomantic UI - 2.9.1-beta.
|
2
|
+
* # Fomantic UI - 2.9.1-beta.24+029436f
|
3
3
|
* https://github.com/fomantic/Fomantic-UI
|
4
4
|
* https://fomantic-ui.com/
|
5
5
|
*
|
@@ -8,4 +8,4 @@
|
|
8
8
|
* https://opensource.org/licenses/MIT
|
9
9
|
*
|
10
10
|
*/
|
11
|
-
!function(T,
|
11
|
+
!function(k,T,A){"use strict";T=T!==A&&T.Math===Math?T:globalThis,k.fn.accordion=function(m){var v,h=k(this),b=Date.now(),y=[],C=m,O="string"==typeof C,x=[].slice.call(arguments,1);return h.each(function(){var e,a=k.isPlainObject(m)?k.extend(!0,{},k.fn.accordion.settings,m):k.extend({},k.fn.accordion.settings),s=a.className,n=a.namespace,l=a.selector,r=a.error,t="."+n,i="module-"+n,o=h.selector||"",c=k(this),d=c.find(l.title),u=c.find(l.content),g=this,p=c.data(i),f={initialize:function(){f.debug("Initializing",c),f.bind.events(),a.observeChanges&&f.observeChanges(),f.instantiate()},instantiate:function(){p=f,c.data(i,f)},destroy:function(){f.debug("Destroying previous instance",c),c.off(t).removeData(i)},refresh:function(){d=c.find(l.title),u=c.find(l.content)},observeChanges:function(){"MutationObserver"in T&&((e=new MutationObserver(function(e){f.debug("DOM tree modified, updating selector cache"),f.refresh()})).observe(g,{childList:!0,subtree:!0}),f.debug("Setting up mutation observer",e))},bind:{events:function(){f.debug("Binding delegated events"),c.on(a.on+t,l.trigger,f.event.click)}},event:{click:function(e){0===k(e.target).closest(l.ignore).length&&f.toggle.call(this)}},toggle:function(e){var e=e!==A?"number"==typeof e?d.eq(e):k(e).closest(l.title):k(this).closest(l.title),n=e.next(u),t=n.hasClass(s.animating),n=n.hasClass(s.active),i=n&&!t,n=!n&&t;f.debug("Toggling visibility of content",e),i||n?a.collapsible?f.close.call(e):f.debug("Cannot close accordion content collapsing is disabled"):f.open.call(e)},open:function(e){var e=e!==A?"number"==typeof e?d.eq(e):k(e).closest(l.title):k(this).closest(l.title),n=e.next(u),t=n.hasClass(s.animating);n.hasClass(s.active)||t?f.debug("Accordion already open, skipping",n):(f.debug("Opening accordion content",e),a.onOpening.call(n),a.onChanging.call(n),a.exclusive&&f.closeOthers.call(e),e.addClass(s.active),n.stop(!0,!0).addClass(s.animating),a.animateChildren&&(k.fn.transition!==A&&c.transition("is supported")?n.children().transition({animation:"fade in",queue:!1,useFailSafe:!0,debug:a.debug,verbose:a.verbose,silent:a.silent,duration:a.duration,skipInlineHidden:!0,onComplete:function(){n.children().removeClass(s.transition)}}):n.children().stop(!0,!0).animate({opacity:1},a.duration,f.resetOpacity)),n.slideDown(a.duration,a.easing,function(){n.removeClass(s.animating).addClass(s.active),f.reset.display.call(this),a.onOpen.call(this),a.onChange.call(this)}))},close:function(e){var e=e!==A?"number"==typeof e?d.eq(e):k(e).closest(l.title):k(this).closest(l.title),n=e.next(u),t=n.hasClass(s.animating),i=n.hasClass(s.active);!i&&!(!i&&t)||i&&t||(f.debug("Closing accordion content",n),a.onClosing.call(n),a.onChanging.call(n),e.removeClass(s.active),n.stop(!0,!0).addClass(s.animating),a.animateChildren&&(k.fn.transition!==A&&c.transition("is supported")?n.children().transition({animation:"fade out",queue:!1,useFailSafe:!0,debug:a.debug,verbose:a.verbose,silent:a.silent,duration:a.duration,skipInlineHidden:!0}):n.children().stop(!0,!0).animate({opacity:0},a.duration,f.resetOpacity)),n.slideUp(a.duration,a.easing,function(){n.removeClass(s.animating).removeClass(s.active),f.reset.display.call(this),a.onClose.call(this),a.onChange.call(this)}))},closeOthers:function(e){var n,e=e!==A?d.eq(e):k(this).closest(l.title),t=e.parents(l.content).prev(l.title),e=e.closest(l.accordion),i=l.title+"."+s.active+":visible",o=l.content+"."+s.active+":visible",o=a.closeNested?(n=e.find(i).not(t)).next(u):(n=e.find(i).not(t),e=e.find(o).find(i).not(t),(n=n.not(e)).next(u));0<n.length&&(f.debug("Exclusive enabled, closing other content",n),n.removeClass(s.active),o.removeClass(s.animating).stop(!0,!0),a.animateChildren&&(k.fn.transition!==A&&c.transition("is supported")?o.children().transition({animation:"fade out",useFailSafe:!0,debug:a.debug,verbose:a.verbose,silent:a.silent,duration:a.duration,skipInlineHidden:!0}):o.children().stop(!0,!0).animate({opacity:0},a.duration,f.resetOpacity)),o.slideUp(a.duration,a.easing,function(){k(this).removeClass(s.active),f.reset.display.call(this)}))},reset:{display:function(){f.verbose("Removing inline display from element",this);var e=k(this);e.css("display",""),""===e.attr("style")&&e.attr("style","").removeAttr("style")},opacity:function(){f.verbose("Removing inline opacity from element",this);var e=k(this);e.css("opacity",""),""===e.attr("style")&&e.attr("style","").removeAttr("style")}},setting:function(e,n){if(f.debug("Changing setting",e,n),k.isPlainObject(e))k.extend(!0,a,e);else{if(n===A)return a[e];k.isPlainObject(a[e])?k.extend(!0,a[e],n):a[e]=n}},internal:function(e,n){if(f.debug("Changing internal",e,n),n===A)return f[e];k.isPlainObject(e)?k.extend(!0,f,e):f[e]=n},debug:function(){!a.silent&&a.debug&&(a.performance?f.performance.log(arguments):(f.debug=Function.prototype.bind.call(console.info,console,a.name+":"),f.debug.apply(console,arguments)))},verbose:function(){!a.silent&&a.verbose&&a.debug&&(a.performance?f.performance.log(arguments):(f.verbose=Function.prototype.bind.call(console.info,console,a.name+":"),f.verbose.apply(console,arguments)))},error:function(){a.silent||(f.error=Function.prototype.bind.call(console.error,console,a.name+":"),f.error.apply(console,arguments))},performance:{log:function(e){var n,t;a.performance&&(t=(n=Date.now())-(b||n),b=n,y.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:g,"Execution Time":t})),clearTimeout(f.performance.timer),f.performance.timer=setTimeout(f.performance.display,500)},display:function(){var e=a.name+":",t=0;b=!1,clearTimeout(f.performance.timer),k.each(y,function(e,n){t+=n["Execution Time"]}),e+=" "+t+"ms",o&&(e+=" '"+o+"'"),(console.group!==A||console.table!==A)&&0<y.length&&(console.groupCollapsed(e),console.table?console.table(y):k.each(y,function(e,n){console.log(n.Name+": "+n["Execution Time"]+"ms")}),console.groupEnd()),y=[]}},invoke:function(i,e,n){var o,a,t,s,l=p;return e=e||x,n=n||g,"string"==typeof i&&l!==A&&(i=i.split(/[ .]/),o=i.length-1,k.each(i,function(e,n){var t=e!=o?n+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(k.isPlainObject(l[t])&&e!=o)l=l[t];else{if(l[t]!==A)return a=l[t],!1;{if(!k.isPlainObject(l[n])||e==o)return l[n]!==A?a=l[n]:f.error(r.method,i),!1;l=l[n]}}})),"function"==typeof(s=a)&&"number"!=typeof s.nodeType?t=a.apply(n,e):a!==A&&(t=a),Array.isArray(v)?v.push(t):v!==A?v=[v,t]:t!==A&&(v=t),a}};O?(p===A&&f.initialize(),f.invoke(C)):(p!==A&&p.invoke("destroy"),f.initialize())}),v!==A?v:this},k.fn.accordion.settings={name:"Accordion",namespace:"accordion",silent:!1,debug:!1,verbose:!1,performance:!0,on:"click",observeChanges:!0,exclusive:!0,collapsible:!0,closeNested:!1,animateChildren:!0,duration:350,easing:"easeOutQuad",onOpening:function(){},onClosing:function(){},onChanging:function(){},onOpen:function(){},onClose:function(){},onChange:function(){},error:{method:"The method you called is not defined"},className:{active:"active",animating:"animating",transition:"transition"},selector:{accordion:".accordion",title:".title",trigger:".title",ignore:".ui.dropdown",content:".content"}},k.extend(k.easing,{easeOutQuad:function(e){return 1-(1-e)*(1-e)}})}(jQuery,window,void document);
|
package/dist/components/ad.css
CHANGED