@swisspost/design-system-styles 6.4.4 → 6.5.1
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/_svg-icon-map.scss +875 -845
- package/basics.css +1 -1
- package/components/accordion.scss +51 -41
- package/components/button-group.scss +5 -0
- package/components/datepicker.scss +3 -1
- package/components/elevation.scss +2 -1
- package/components/floating-label.scss +30 -2
- package/components/form-check.scss +9 -3
- package/components/form-select.scss +46 -2
- package/components/intranet-header/_sidebar.scss +1 -1
- package/components/intranet-header/_top-navigation.scss +0 -1
- package/components/pagination.scss +15 -0
- package/components/sizing.scss +15 -0
- package/components/tabs/_tabs-wrapper.scss +1 -2
- package/functions/_contrast.scss +9 -0
- package/index.css +3 -3
- package/intranet.css +3 -3
- package/mixins/_elevation.scss +6 -0
- package/mixins/_focus.scss +9 -0
- package/mixins/_index.scss +1 -0
- package/package.json +25 -32
- package/placeholders/_close.scss +6 -0
- package/variables/_color.scss +24 -2
- package/variables/_commons.scss +3 -0
- package/variables/_grid.scss +17 -22
- package/variables/components/_accordion.scss +15 -8
- package/variables/components/_form-select.scss +11 -1
- package/variables/components/_forms.scss +30 -7
- package/variables/components/_stepper.scss +1 -4
- package/schematics/migrations/_example-dom-migration/index.d.ts +0 -2
- package/schematics/migrations/_example-dom-migration/index.js +0 -131
- package/schematics/migrations/_example-dom-migration/index.js.map +0 -1
- package/schematics/migrations/bootstrap/badge/index.d.ts +0 -2
- package/schematics/migrations/bootstrap/badge/index.js +0 -85
- package/schematics/migrations/bootstrap/badge/index.js.map +0 -1
- package/schematics/migrations/bootstrap/blockquote/index.d.ts +0 -2
- package/schematics/migrations/bootstrap/blockquote/index.js +0 -40
- package/schematics/migrations/bootstrap/blockquote/index.js.map +0 -1
- package/schematics/migrations/bootstrap/button/index.d.ts +0 -2
- package/schematics/migrations/bootstrap/button/index.js +0 -56
- package/schematics/migrations/bootstrap/button/index.js.map +0 -1
- package/schematics/migrations/bootstrap/button-close/index.d.ts +0 -2
- package/schematics/migrations/bootstrap/button-close/index.js +0 -35
- package/schematics/migrations/bootstrap/button-close/index.js.map +0 -1
- package/schematics/migrations/bootstrap/form-checkbox/index.d.ts +0 -2
- package/schematics/migrations/bootstrap/form-checkbox/index.js +0 -48
- package/schematics/migrations/bootstrap/form-checkbox/index.js.map +0 -1
- package/schematics/migrations/bootstrap/form-control/index.d.ts +0 -2
- package/schematics/migrations/bootstrap/form-control/index.js +0 -28
- package/schematics/migrations/bootstrap/form-control/index.js.map +0 -1
- package/schematics/migrations/bootstrap/form-radio/index.d.ts +0 -2
- package/schematics/migrations/bootstrap/form-radio/index.js +0 -48
- package/schematics/migrations/bootstrap/form-radio/index.js.map +0 -1
- package/schematics/migrations/bootstrap/form-select/index.d.ts +0 -2
- package/schematics/migrations/bootstrap/form-select/index.js +0 -54
- package/schematics/migrations/bootstrap/form-select/index.js.map +0 -1
- package/schematics/migrations/bootstrap/form-switch/index.d.ts +0 -2
- package/schematics/migrations/bootstrap/form-switch/index.js +0 -45
- package/schematics/migrations/bootstrap/form-switch/index.js.map +0 -1
- package/schematics/migrations/bootstrap/forms/index.d.ts +0 -2
- package/schematics/migrations/bootstrap/forms/index.js +0 -49
- package/schematics/migrations/bootstrap/forms/index.js.map +0 -1
- package/schematics/migrations/bootstrap/textarea/index.d.ts +0 -2
- package/schematics/migrations/bootstrap/textarea/index.js +0 -38
- package/schematics/migrations/bootstrap/textarea/index.js.map +0 -1
- package/schematics/migrations/general/classes/bg-opacity.d.ts +0 -2
- package/schematics/migrations/general/classes/bg-opacity.js +0 -34
- package/schematics/migrations/general/classes/bg-opacity.js.map +0 -1
- package/schematics/migrations/general/classes/rtl.d.ts +0 -2
- package/schematics/migrations/general/classes/rtl.js +0 -88
- package/schematics/migrations/general/classes/rtl.js.map +0 -1
- package/schematics/migrations/general/classes/secondary.d.ts +0 -2
- package/schematics/migrations/general/classes/secondary.js +0 -16
- package/schematics/migrations/general/classes/secondary.js.map +0 -1
- package/schematics/migrations/general/classes/sr-only.d.ts +0 -2
- package/schematics/migrations/general/classes/sr-only.js +0 -28
- package/schematics/migrations/general/classes/sr-only.js.map +0 -1
- package/schematics/migrations/general/classes/text-auto.d.ts +0 -2
- package/schematics/migrations/general/classes/text-auto.js +0 -16
- package/schematics/migrations/general/classes/text-auto.js.map +0 -1
- package/schematics/migrations/ngbootstrap/buttons/index.d.ts +0 -2
- package/schematics/migrations/ngbootstrap/buttons/index.js +0 -79
- package/schematics/migrations/ngbootstrap/buttons/index.js.map +0 -1
- package/schematics/migrations/post/custom-select/index.d.ts +0 -2
- package/schematics/migrations/post/custom-select/index.js +0 -63
- package/schematics/migrations/post/custom-select/index.js.map +0 -1
- package/schematics/migrations/post/stepper/index.d.ts +0 -2
- package/schematics/migrations/post/stepper/index.js +0 -61
- package/schematics/migrations/post/stepper/index.js.map +0 -1
- package/schematics/migrations/post/subnavigation/index.d.ts +0 -2
- package/schematics/migrations/post/subnavigation/index.js +0 -16
- package/schematics/migrations/post/subnavigation/index.js.map +0 -1
- package/schematics/migrations/post/topic-teaser/index.d.ts +0 -2
- package/schematics/migrations/post/topic-teaser/index.js +0 -42
- package/schematics/migrations/post/topic-teaser/index.js.map +0 -1
- package/schematics/migrations.json +0 -105
- package/schematics/utils/constants.d.ts +0 -5
- package/schematics/utils/constants.js +0 -73
- package/schematics/utils/constants.js.map +0 -1
- package/schematics/utils/dom-migration/dom-update.d.ts +0 -5
- package/schematics/utils/dom-migration/dom-update.js +0 -3
- package/schematics/utils/dom-migration/dom-update.js.map +0 -1
- package/schematics/utils/dom-migration/get-dom-migration-rule.d.ts +0 -3
- package/schematics/utils/dom-migration/get-dom-migration-rule.js +0 -128
- package/schematics/utils/dom-migration/get-dom-migration-rule.js.map +0 -1
- package/schematics/utils/dom-migration/index.d.ts +0 -2
- package/schematics/utils/dom-migration/index.js +0 -22
- package/schematics/utils/dom-migration/index.js.map +0 -1
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const dom_migration_1 = require("../../../utils/dom-migration");
|
|
4
|
-
function default_1() {
|
|
5
|
-
return (0, dom_migration_1.getDomMigrationRule)(new BlockquoteFigureWrapperUpdate, new BlockquotePClassUpdate);
|
|
6
|
-
}
|
|
7
|
-
exports.default = default_1;
|
|
8
|
-
class BlockquoteFigureWrapperUpdate {
|
|
9
|
-
constructor() {
|
|
10
|
-
this.selector = 'blockquote.blockquote';
|
|
11
|
-
}
|
|
12
|
-
update($elements, $) {
|
|
13
|
-
$elements
|
|
14
|
-
.each((_i, element) => {
|
|
15
|
-
const $element = $(element);
|
|
16
|
-
const $footer = $element.find('footer.blockquote-footer');
|
|
17
|
-
const hasFooter = $footer.length > 0;
|
|
18
|
-
if (hasFooter) {
|
|
19
|
-
const $wrapper = $('<figure/>').data($element.data());
|
|
20
|
-
const $replacer = $(`<figcaption>${$footer.prop('innerHTML')}</figcaption>`);
|
|
21
|
-
$footer
|
|
22
|
-
.prop('attributes')
|
|
23
|
-
.forEach(({ name, value }) => {
|
|
24
|
-
$replacer.attr(name, value);
|
|
25
|
-
});
|
|
26
|
-
$footer.replaceWith($replacer);
|
|
27
|
-
$element.wrap($wrapper);
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
class BlockquotePClassUpdate {
|
|
33
|
-
constructor() {
|
|
34
|
-
this.selector = 'blockquote.blockquote > p.mb-0';
|
|
35
|
-
}
|
|
36
|
-
update($elements) {
|
|
37
|
-
$elements.removeClass('mb-0');
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../schematics/migrations/bootstrap/blockquote/index.ts"],"names":[],"mappings":";;AAEA,gEAA8E;AAE9E;IACE,OAAO,IAAA,mCAAmB,EACxB,IAAI,6BAA6B,EACjC,IAAI,sBAAsB,CAC3B,CAAC;AACJ,CAAC;AALD,4BAKC;AAED,MAAM,6BAA6B;IAAnC;QACE,aAAQ,GAAG,uBAAuB,CAAC;IAwBrC,CAAC;IAtBC,MAAM,CAAC,SAA2B,EAAE,CAAa;QAC/C,SAAS;aACN,IAAI,CAAC,CAAC,EAAE,EAAE,OAAO,EAAE,EAAE;YACpB,MAAM,QAAQ,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC;YAC5B,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC;YAC1D,MAAM,SAAS,GAAG,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;YAErC,IAAI,SAAS,EAAE;gBACb,MAAM,QAAQ,GAAG,CAAC,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;gBACtD,MAAM,SAAS,GAAG,CAAC,CAAC,eAAe,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;gBAE7E,OAAO;qBACJ,IAAI,CAAC,YAAY,CAAC;qBAClB,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;oBAC3B,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;gBAC9B,CAAC,CAAC,CAAC;gBAEL,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;gBAC/B,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;aACzB;QACH,CAAC,CAAC,CAAC;IACP,CAAC;CACF;AAED,MAAM,sBAAsB;IAA5B;QACE,aAAQ,GAAG,gCAAgC,CAAC;IAK9C,CAAC;IAHC,MAAM,CAAC,SAA2B;QAChC,SAAS,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IAChC,CAAC;CACF"}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const constants_1 = require("../../../utils/constants");
|
|
4
|
-
const dom_migration_1 = require("../../../utils/dom-migration");
|
|
5
|
-
function default_1() {
|
|
6
|
-
return (0, dom_migration_1.getDomMigrationRule)(new ButtonOutlineClassUpdate, new ButtonInvertedClassUpdate, new ButtonIconClassesUpdate);
|
|
7
|
-
}
|
|
8
|
-
exports.default = default_1;
|
|
9
|
-
class ButtonOutlineClassUpdate {
|
|
10
|
-
constructor() {
|
|
11
|
-
this.cssClassRegex = new RegExp(`^btn-outline-(${constants_1.themeColors.join('|')})$`);
|
|
12
|
-
this.selector = constants_1.themeColors.map(colorname => `.btn-outline-${colorname}`).join(', ');
|
|
13
|
-
}
|
|
14
|
-
update($elements, $) {
|
|
15
|
-
$elements
|
|
16
|
-
.each((_i, element) => {
|
|
17
|
-
var _a;
|
|
18
|
-
const $element = $(element);
|
|
19
|
-
(_a = $element
|
|
20
|
-
.attr('class')) === null || _a === void 0 ? void 0 : _a.split(' ').forEach(cssClass => {
|
|
21
|
-
const match = cssClass.match(this.cssClassRegex);
|
|
22
|
-
if (match) {
|
|
23
|
-
$element
|
|
24
|
-
.removeClass(cssClass)
|
|
25
|
-
.addClass('btn-secondary');
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
class ButtonInvertedClassUpdate {
|
|
32
|
-
constructor() {
|
|
33
|
-
this.selector = '.btn.btn-inverted';
|
|
34
|
-
}
|
|
35
|
-
update($elements) {
|
|
36
|
-
$elements.removeClass('btn-inverted');
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
class ButtonIconClassesUpdate {
|
|
40
|
-
constructor() {
|
|
41
|
-
this.selector = '.btn-icon';
|
|
42
|
-
}
|
|
43
|
-
update($elements, $) {
|
|
44
|
-
$elements
|
|
45
|
-
.each((_i, element) => {
|
|
46
|
-
const $element = $(element);
|
|
47
|
-
const $icon = $element.find('.pi');
|
|
48
|
-
const $text = $element.find(':not(.pi, .sr-only, .sr-only-focusable, .visually-hidden, .visually-hidden-focusable)');
|
|
49
|
-
const isButtonWithIconAndText = $icon.length > 0 && $text.length > 0 && $text.text().length > 0;
|
|
50
|
-
if (isButtonWithIconAndText) {
|
|
51
|
-
$element.removeClass('btn-icon');
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../schematics/migrations/bootstrap/button/index.ts"],"names":[],"mappings":";;AAEA,wDAAuD;AACvD,gEAA8E;AAE9E;IACE,OAAO,IAAA,mCAAmB,EACxB,IAAI,wBAAwB,EAC5B,IAAI,yBAAyB,EAC7B,IAAI,uBAAuB,CAC5B,CAAC;AACJ,CAAC;AAND,4BAMC;AAED,MAAM,wBAAwB;IAA9B;QACE,kBAAa,GAAW,IAAI,MAAM,CAAC,iBAAiB,uBAAW,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAE/E,aAAQ,GAAG,uBAAW,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC,gBAAgB,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAqBlF,CAAC;IAnBC,MAAM,CAAC,SAA2B,EAAE,CAAa;QAC/C,SAAS;aACN,IAAI,CAAC,CAAC,EAAE,EAAE,OAAO,EAAE,EAAE;;YACpB,MAAM,QAAQ,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC;YAE5B,MAAA,QAAQ;iBACL,IAAI,CAAC,OAAO,CAAC,0CACZ,KAAK,CAAC,GAAG,EACV,OAAO,CAAC,QAAQ,CAAC,EAAE;gBAClB,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;gBAEjD,IAAI,KAAK,EAAE;oBACT,QAAQ;yBACL,WAAW,CAAC,QAAQ,CAAC;yBACrB,QAAQ,CAAC,eAAe,CAAC,CAAC;iBAC9B;YACH,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC;CACF;AAED,MAAM,yBAAyB;IAA/B;QACE,aAAQ,GAAG,mBAAmB,CAAC;IAKjC,CAAC;IAHC,MAAM,CAAC,SAA2B;QAChC,SAAS,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;IACxC,CAAC;CACF;AAED,MAAM,uBAAuB;IAA7B;QACE,aAAQ,GAAG,WAAW,CAAC;IAiBzB,CAAC;IAfC,MAAM,CAAC,SAA2B,EAAE,CAAa;QAC/C,SAAS;aACN,IAAI,CAAC,CAAC,EAAE,EAAE,OAAO,EAAE,EAAE;YACpB,MAAM,QAAQ,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC;YAC5B,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACnC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CACzB,uFAAuF,CAAC,CAAC;YAE3F,MAAM,uBAAuB,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;YAEhG,IAAI,uBAAuB,EAAE;gBAC3B,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;aAClC;QACH,CAAC,CAAC,CAAC;IACP,CAAC;CACF"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const dom_migration_1 = require("../../../utils/dom-migration");
|
|
4
|
-
function default_1() {
|
|
5
|
-
return (0, dom_migration_1.getDomMigrationRule)(new ButtonCloseClassesUpdate, new ButtonCloseRemoveIconContentUpdate);
|
|
6
|
-
}
|
|
7
|
-
exports.default = default_1;
|
|
8
|
-
class ButtonCloseClassesUpdate {
|
|
9
|
-
constructor() {
|
|
10
|
-
this.selector = '.close';
|
|
11
|
-
}
|
|
12
|
-
update($elements, $) {
|
|
13
|
-
$elements
|
|
14
|
-
.each((_i, element) => {
|
|
15
|
-
const $element = $(element);
|
|
16
|
-
const $child = $element.find('> span[aria-hidden="true"]');
|
|
17
|
-
if ($child.length > 0) {
|
|
18
|
-
$element
|
|
19
|
-
.removeClass('close btn btn-icon')
|
|
20
|
-
.addClass('btn-close');
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
class ButtonCloseRemoveIconContentUpdate {
|
|
26
|
-
constructor() {
|
|
27
|
-
this.selector = '.btn-close';
|
|
28
|
-
}
|
|
29
|
-
update($elements) {
|
|
30
|
-
$elements
|
|
31
|
-
.find('> span[aria-hidden="true"]')
|
|
32
|
-
.remove();
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../schematics/migrations/bootstrap/button-close/index.ts"],"names":[],"mappings":";;AAEA,gEAA8E;AAE9E;IACE,OAAO,IAAA,mCAAmB,EACxB,IAAI,wBAAwB,EAC5B,IAAI,kCAAkC,CACvC,CAAC;AACJ,CAAC;AALD,4BAKC;AAED,MAAM,wBAAwB;IAA9B;QACE,aAAQ,GAAG,QAAQ,CAAC;IAetB,CAAC;IAbC,MAAM,CAAC,SAA2B,EAAE,CAAa;QAC/C,SAAS;aACN,IAAI,CAAC,CAAC,EAAE,EAAE,OAAO,EAAE,EAAE;YACpB,MAAM,QAAQ,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC;YAC5B,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,4BAA4B,CAAC,CAAC;YAE3D,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE;gBACrB,QAAQ;qBACL,WAAW,CAAC,oBAAoB,CAAC;qBACjC,QAAQ,CAAC,WAAW,CAAC,CAAC;aAC1B;QACH,CAAC,CAAC,CAAC;IACP,CAAC;CACF;AAED,MAAM,kCAAkC;IAAxC;QACE,aAAQ,GAAG,YAAY,CAAC;IAO1B,CAAC;IALC,MAAM,CAAC,SAA2B;QAChC,SAAS;aACN,IAAI,CAAC,4BAA4B,CAAC;aAClC,MAAM,EAAE,CAAC;IACd,CAAC;CACF"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const dom_migration_1 = require("../../../utils/dom-migration");
|
|
4
|
-
function default_1() {
|
|
5
|
-
return (0, dom_migration_1.getDomMigrationRule)(new FormCheckboxInputClassesUpdate, new FormCheckboxLabelClassesUpdate, new FormCheckboxClassesUpdate);
|
|
6
|
-
}
|
|
7
|
-
exports.default = default_1;
|
|
8
|
-
class FormCheckboxInputClassesUpdate {
|
|
9
|
-
constructor() {
|
|
10
|
-
this.selector = '.custom-checkbox.custom-control input.custom-control-input';
|
|
11
|
-
}
|
|
12
|
-
update($elements) {
|
|
13
|
-
$elements
|
|
14
|
-
.removeClass('custom-control-input')
|
|
15
|
-
.addClass('form-check-input');
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
class FormCheckboxLabelClassesUpdate {
|
|
19
|
-
constructor() {
|
|
20
|
-
this.selector = '.custom-checkbox.custom-control label.custom-control-label';
|
|
21
|
-
}
|
|
22
|
-
update($elements) {
|
|
23
|
-
$elements
|
|
24
|
-
.removeClass('custom-control-label')
|
|
25
|
-
.addClass('form-check-label');
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
class FormCheckboxClassesUpdate {
|
|
29
|
-
constructor() {
|
|
30
|
-
this.selector = '.custom-checkbox.custom-control';
|
|
31
|
-
}
|
|
32
|
-
update($elements, $) {
|
|
33
|
-
$elements
|
|
34
|
-
.each((_i, element) => {
|
|
35
|
-
const $element = $(element);
|
|
36
|
-
const hasInlineClass = $element.hasClass('custom-control-inline');
|
|
37
|
-
$element
|
|
38
|
-
.removeClass('custom-checkbox custom-control')
|
|
39
|
-
.addClass('form-check');
|
|
40
|
-
if (hasInlineClass) {
|
|
41
|
-
$element
|
|
42
|
-
.removeClass('custom-control-inline')
|
|
43
|
-
.addClass('form-check-inline');
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../schematics/migrations/bootstrap/form-checkbox/index.ts"],"names":[],"mappings":";;AAEA,gEAA8E;AAE9E;IACE,OAAO,IAAA,mCAAmB,EACxB,IAAI,8BAA8B,EAClC,IAAI,8BAA8B,EAClC,IAAI,yBAAyB,CAC9B,CAAC;AACJ,CAAC;AAND,4BAMC;AAED,MAAM,8BAA8B;IAApC;QACE,aAAQ,GAAG,4DAA4D,CAAC;IAO1E,CAAC;IALC,MAAM,CAAC,SAA2B;QAChC,SAAS;aACN,WAAW,CAAC,sBAAsB,CAAC;aACnC,QAAQ,CAAC,kBAAkB,CAAC,CAAC;IAClC,CAAC;CACF;AAED,MAAM,8BAA8B;IAApC;QACE,aAAQ,GAAG,4DAA4D,CAAC;IAO1E,CAAC;IALC,MAAM,CAAC,SAA2B;QAChC,SAAS;aACN,WAAW,CAAC,sBAAsB,CAAC;aACnC,QAAQ,CAAC,kBAAkB,CAAC,CAAC;IAClC,CAAC;CACF;AAED,MAAM,yBAAyB;IAA/B;QACE,aAAQ,GAAG,iCAAiC,CAAC;IAmB/C,CAAC;IAjBC,MAAM,CAAC,SAA2B,EAAE,CAAa;QAC/C,SAAS;aACN,IAAI,CAAC,CAAC,EAAE,EAAE,OAAO,EAAE,EAAE;YACpB,MAAM,QAAQ,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC;YAC5B,MAAM,cAAc,GAAG,QAAQ,CAAC,QAAQ,CAAC,uBAAuB,CAAC,CAAC;YAElE,QAAQ;iBACL,WAAW,CAAC,gCAAgC,CAAC;iBAC7C,QAAQ,CAAC,YAAY,CAAC,CAAC;YAE1B,IAAI,cAAc,EAAE;gBAClB,QAAQ;qBACL,WAAW,CAAC,uBAAuB,CAAC;qBACpC,QAAQ,CAAC,mBAAmB,CAAC,CAAC;aAClC;QACH,CAAC,CAAC,CAAC;IACP,CAAC;CACF"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const dom_migration_1 = require("../../../utils/dom-migration");
|
|
4
|
-
function default_1() {
|
|
5
|
-
return (0, dom_migration_1.getDomMigrationRule)(new FormControlFloatingLabelWrapperUpdate);
|
|
6
|
-
}
|
|
7
|
-
exports.default = default_1;
|
|
8
|
-
class FormControlFloatingLabelWrapperUpdate {
|
|
9
|
-
constructor() {
|
|
10
|
-
this.selector = '.form-group';
|
|
11
|
-
}
|
|
12
|
-
update($elements, $) {
|
|
13
|
-
$elements
|
|
14
|
-
.each((_i, element) => {
|
|
15
|
-
const $element = $(element);
|
|
16
|
-
const $control = $element.find('> input.form-control-lg');
|
|
17
|
-
const $label = $control.next('label');
|
|
18
|
-
const isFloatingLabel = $control.length > 0 && $label.length > 0;
|
|
19
|
-
if (isFloatingLabel) {
|
|
20
|
-
$element
|
|
21
|
-
.removeClass('form-group')
|
|
22
|
-
.addClass('form-floating');
|
|
23
|
-
$control.removeClass('form-control-lg');
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../schematics/migrations/bootstrap/form-control/index.ts"],"names":[],"mappings":";;AAEA,gEAA8E;AAE9E;IACE,OAAO,IAAA,mCAAmB,EACxB,IAAI,qCAAqC,CAC1C,CAAC;AACJ,CAAC;AAJD,4BAIC;AAED,MAAM,qCAAqC;IAA3C;QACE,aAAQ,GAAG,aAAa,CAAC;IAmB3B,CAAC;IAjBC,MAAM,CAAC,SAA2B,EAAE,CAAa;QAC/C,SAAS;aACN,IAAI,CAAC,CAAC,EAAE,EAAE,OAAO,EAAE,EAAE;YACpB,MAAM,QAAQ,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC;YAC5B,MAAM,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAC;YAC1D,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACtC,MAAM,eAAe,GAAG,QAAQ,CAAC,MAAM,GAAG,CAAC,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;YAEjE,IAAI,eAAe,EAAE;gBACnB,QAAQ;qBACL,WAAW,CAAC,YAAY,CAAC;qBACzB,QAAQ,CAAC,eAAe,CAAC,CAAC;gBAE7B,QAAQ,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC;aACzC;QACH,CAAC,CAAC,CAAC;IACP,CAAC;CACF"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const dom_migration_1 = require("../../../utils/dom-migration");
|
|
4
|
-
function default_1() {
|
|
5
|
-
return (0, dom_migration_1.getDomMigrationRule)(new FormRadioInputClassesUpdate, new FormRadioLabelClassesUpdate, new FormRadioClassesUpdate);
|
|
6
|
-
}
|
|
7
|
-
exports.default = default_1;
|
|
8
|
-
class FormRadioInputClassesUpdate {
|
|
9
|
-
constructor() {
|
|
10
|
-
this.selector = '.custom-radio.custom-control input.custom-control-input';
|
|
11
|
-
}
|
|
12
|
-
update($elements) {
|
|
13
|
-
$elements
|
|
14
|
-
.removeClass('custom-control-input')
|
|
15
|
-
.addClass('form-check-input');
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
class FormRadioLabelClassesUpdate {
|
|
19
|
-
constructor() {
|
|
20
|
-
this.selector = '.custom-radio.custom-control label.custom-control-label';
|
|
21
|
-
}
|
|
22
|
-
update($elements) {
|
|
23
|
-
$elements
|
|
24
|
-
.removeClass('custom-control-label')
|
|
25
|
-
.addClass('form-check-label');
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
class FormRadioClassesUpdate {
|
|
29
|
-
constructor() {
|
|
30
|
-
this.selector = '.custom-radio.custom-control';
|
|
31
|
-
}
|
|
32
|
-
update($elements, $) {
|
|
33
|
-
$elements
|
|
34
|
-
.each((_i, element) => {
|
|
35
|
-
const $element = $(element);
|
|
36
|
-
const hasInlineClass = $element.hasClass('custom-control-inline');
|
|
37
|
-
$element
|
|
38
|
-
.removeClass('custom-radio custom-control')
|
|
39
|
-
.addClass('form-check');
|
|
40
|
-
if (hasInlineClass) {
|
|
41
|
-
$element
|
|
42
|
-
.removeClass('custom-control-inline')
|
|
43
|
-
.addClass('form-check-inline');
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../schematics/migrations/bootstrap/form-radio/index.ts"],"names":[],"mappings":";;AAEA,gEAA8E;AAE9E;IACE,OAAO,IAAA,mCAAmB,EACxB,IAAI,2BAA2B,EAC/B,IAAI,2BAA2B,EAC/B,IAAI,sBAAsB,CAC3B,CAAC;AACJ,CAAC;AAND,4BAMC;AAED,MAAM,2BAA2B;IAAjC;QACE,aAAQ,GAAG,yDAAyD,CAAC;IAOvE,CAAC;IALC,MAAM,CAAC,SAA2B;QAChC,SAAS;aACN,WAAW,CAAC,sBAAsB,CAAC;aACnC,QAAQ,CAAC,kBAAkB,CAAC,CAAC;IAClC,CAAC;CACF;AAED,MAAM,2BAA2B;IAAjC;QACE,aAAQ,GAAG,yDAAyD,CAAC;IAOvE,CAAC;IALC,MAAM,CAAC,SAA2B;QAChC,SAAS;aACN,WAAW,CAAC,sBAAsB,CAAC;aACnC,QAAQ,CAAC,kBAAkB,CAAC,CAAC;IAClC,CAAC;CACF;AAED,MAAM,sBAAsB;IAA5B;QACE,aAAQ,GAAG,8BAA8B,CAAC;IAmB5C,CAAC;IAjBC,MAAM,CAAC,SAA2B,EAAE,CAAa;QAC/C,SAAS;aACN,IAAI,CAAC,CAAC,EAAE,EAAE,OAAO,EAAE,EAAE;YACpB,MAAM,QAAQ,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC;YAC5B,MAAM,cAAc,GAAG,QAAQ,CAAC,QAAQ,CAAC,uBAAuB,CAAC,CAAC;YAElE,QAAQ;iBACL,WAAW,CAAC,6BAA6B,CAAC;iBAC1C,QAAQ,CAAC,YAAY,CAAC,CAAC;YAE1B,IAAI,cAAc,EAAE;gBAClB,QAAQ;qBACL,WAAW,CAAC,uBAAuB,CAAC;qBACpC,QAAQ,CAAC,mBAAmB,CAAC,CAAC;aAClC;QACH,CAAC,CAAC,CAAC;IACP,CAAC;CACF"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const constants_1 = require("../../../utils/constants");
|
|
4
|
-
const dom_migration_1 = require("../../../utils/dom-migration");
|
|
5
|
-
function default_1() {
|
|
6
|
-
return (0, dom_migration_1.getDomMigrationRule)(new FormSelectFloatingLabelWrapperUpdate, new FormSelectCustomClassesUpdate);
|
|
7
|
-
}
|
|
8
|
-
exports.default = default_1;
|
|
9
|
-
class FormSelectFloatingLabelWrapperUpdate {
|
|
10
|
-
constructor() {
|
|
11
|
-
this.selector = '.form-group';
|
|
12
|
-
}
|
|
13
|
-
update($elements, $) {
|
|
14
|
-
$elements
|
|
15
|
-
.each((_i, element) => {
|
|
16
|
-
const $element = $(element);
|
|
17
|
-
const $control = $element.find('> select.form-control-lg');
|
|
18
|
-
const $label = $control.next('label');
|
|
19
|
-
const isFloatingLabel = $control.length > 0 && $label.length > 0;
|
|
20
|
-
if (isFloatingLabel) {
|
|
21
|
-
$element
|
|
22
|
-
.removeClass('form-group')
|
|
23
|
-
.addClass('form-floating');
|
|
24
|
-
$control.removeClass('form-control-lg');
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
class FormSelectCustomClassesUpdate {
|
|
30
|
-
constructor() {
|
|
31
|
-
this.cssClassRegex = new RegExp(`^form-control-(${constants_1.breakpoints.join('|')})$`);
|
|
32
|
-
this.selector = 'select.form-control';
|
|
33
|
-
}
|
|
34
|
-
update($elements, $) {
|
|
35
|
-
$elements
|
|
36
|
-
.each((_i, element) => {
|
|
37
|
-
var _a;
|
|
38
|
-
const $element = $(element);
|
|
39
|
-
(_a = $element
|
|
40
|
-
.removeClass('form-control custom-select')
|
|
41
|
-
.addClass('form-select')
|
|
42
|
-
.attr('class')) === null || _a === void 0 ? void 0 : _a.split(' ').forEach(cssClass => {
|
|
43
|
-
const match = cssClass.match(this.cssClassRegex);
|
|
44
|
-
if (match) {
|
|
45
|
-
const breakpoint = match[1];
|
|
46
|
-
$element
|
|
47
|
-
.removeClass(cssClass)
|
|
48
|
-
.addClass(`form-select-${breakpoint}`);
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../schematics/migrations/bootstrap/form-select/index.ts"],"names":[],"mappings":";;AAEA,wDAAuD;AACvD,gEAA8E;AAE9E;IACE,OAAO,IAAA,mCAAmB,EACxB,IAAI,oCAAoC,EACxC,IAAI,6BAA6B,CAClC,CAAC;AACJ,CAAC;AALD,4BAKC;AAED,MAAM,oCAAoC;IAA1C;QACE,aAAQ,GAAG,aAAa,CAAC;IAmB3B,CAAC;IAjBC,MAAM,CAAC,SAA2B,EAAE,CAAa;QAC/C,SAAS;aACN,IAAI,CAAC,CAAC,EAAE,EAAE,OAAO,EAAE,EAAE;YACpB,MAAM,QAAQ,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC;YAC5B,MAAM,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC;YAC3D,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACtC,MAAM,eAAe,GAAG,QAAQ,CAAC,MAAM,GAAG,CAAC,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;YAEjE,IAAI,eAAe,EAAE;gBACnB,QAAQ;qBACL,WAAW,CAAC,YAAY,CAAC;qBACzB,QAAQ,CAAC,eAAe,CAAC,CAAC;gBAE7B,QAAQ,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC;aACzC;QACH,CAAC,CAAC,CAAC;IACP,CAAC;CACF;AAED,MAAM,6BAA6B;IAAnC;QACE,kBAAa,GAAW,IAAI,MAAM,CAAC,kBAAkB,uBAAW,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAChF,aAAQ,GAAG,qBAAqB,CAAC;IAyBnC,CAAC;IAvBC,MAAM,CAAC,SAA2B,EAAE,CAAa;QAC/C,SAAS;aACN,IAAI,CAAC,CAAC,EAAE,EAAE,OAAO,EAAE,EAAE;;YACpB,MAAM,QAAQ,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC;YAE5B,MAAA,QAAQ;iBACL,WAAW,CAAC,4BAA4B,CAAC;iBACzC,QAAQ,CAAC,aAAa,CAAC;iBACvB,IAAI,CAAC,OAAO,CAAC,0CACZ,KAAK,CAAC,GAAG,EACV,OAAO,CAAC,QAAQ,CAAC,EAAE;gBAClB,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;gBAEjD,IAAI,KAAK,EAAE;oBACT,MAAM,UAAU,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;oBAE5B,QAAQ;yBACL,WAAW,CAAC,QAAQ,CAAC;yBACrB,QAAQ,CAAC,eAAe,UAAU,EAAE,CAAC,CAAC;iBAC1C;YACH,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC;CACF"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const dom_migration_1 = require("../../../utils/dom-migration");
|
|
4
|
-
function default_1() {
|
|
5
|
-
return (0, dom_migration_1.getDomMigrationRule)(new FormSwitchInputClassesUpdate, new FormSwitchLabelUpdate, new FormSwitchClassesUpdate);
|
|
6
|
-
}
|
|
7
|
-
exports.default = default_1;
|
|
8
|
-
class FormSwitchInputClassesUpdate {
|
|
9
|
-
constructor() {
|
|
10
|
-
this.selector = '.switch input.switch';
|
|
11
|
-
}
|
|
12
|
-
update($elements) {
|
|
13
|
-
$elements
|
|
14
|
-
.removeClass('switch')
|
|
15
|
-
.addClass('form-check-input');
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
class FormSwitchLabelUpdate {
|
|
19
|
-
constructor() {
|
|
20
|
-
this.selector = '.switch';
|
|
21
|
-
}
|
|
22
|
-
update($elements, $) {
|
|
23
|
-
$elements
|
|
24
|
-
.each((_i, element) => {
|
|
25
|
-
const $element = $(element);
|
|
26
|
-
const $toggler = $element.find('label.switch-toggler');
|
|
27
|
-
const $startLabel = $toggler.prev('label');
|
|
28
|
-
const $endLabel = $toggler.next('label');
|
|
29
|
-
$startLabel.addClass('form-check-label order-first');
|
|
30
|
-
$endLabel.addClass('form-check-label');
|
|
31
|
-
$toggler.remove();
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
class FormSwitchClassesUpdate {
|
|
36
|
-
constructor() {
|
|
37
|
-
this.selector = '.switch';
|
|
38
|
-
}
|
|
39
|
-
update($elements) {
|
|
40
|
-
$elements
|
|
41
|
-
.removeClass('switch')
|
|
42
|
-
.addClass('form-check form-switch');
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../schematics/migrations/bootstrap/form-switch/index.ts"],"names":[],"mappings":";;AAEA,gEAA8E;AAE9E;IACE,OAAO,IAAA,mCAAmB,EACxB,IAAI,4BAA4B,EAChC,IAAI,qBAAqB,EACzB,IAAI,uBAAuB,CAC5B,CAAC;AACJ,CAAC;AAND,4BAMC;AAED,MAAM,4BAA4B;IAAlC;QACE,aAAQ,GAAG,sBAAsB,CAAC;IAOpC,CAAC;IALC,MAAM,CAAC,SAA2B;QAChC,SAAS;aACN,WAAW,CAAC,QAAQ,CAAC;aACrB,QAAQ,CAAC,kBAAkB,CAAC,CAAC;IAClC,CAAC;CACF;AAED,MAAM,qBAAqB;IAA3B;QACE,aAAQ,GAAG,SAAS,CAAC;IAevB,CAAC;IAbC,MAAM,CAAC,SAA2B,EAAE,CAAa;QAC/C,SAAS;aACN,IAAI,CAAC,CAAC,EAAE,EAAE,OAAO,EAAE,EAAE;YACpB,MAAM,QAAQ,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC;YAC5B,MAAM,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;YACvD,MAAM,WAAW,GAAG,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAC3C,MAAM,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAEzC,WAAW,CAAC,QAAQ,CAAC,8BAA8B,CAAC,CAAC;YACrD,SAAS,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC;YACvC,QAAQ,CAAC,MAAM,EAAE,CAAC;QACpB,CAAC,CAAC,CAAC;IACP,CAAC;CACF;AAED,MAAM,uBAAuB;IAA7B;QACE,aAAQ,GAAG,SAAS,CAAC;IAOvB,CAAC;IALC,MAAM,CAAC,SAA2B;QAChC,SAAS;aACN,WAAW,CAAC,QAAQ,CAAC;aACrB,QAAQ,CAAC,wBAAwB,CAAC,CAAC;IACxC,CAAC;CACF"}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const dom_migration_1 = require("../../../utils/dom-migration");
|
|
4
|
-
function default_1() {
|
|
5
|
-
return (0, dom_migration_1.getDomMigrationRule)(new FormGroupClassUpdate, new FormLabelClassUpdate, new FormTextClassUpdate);
|
|
6
|
-
}
|
|
7
|
-
exports.default = default_1;
|
|
8
|
-
class FormGroupClassUpdate {
|
|
9
|
-
constructor() {
|
|
10
|
-
this.selector = '.form-group';
|
|
11
|
-
}
|
|
12
|
-
update($elements, $) {
|
|
13
|
-
$elements
|
|
14
|
-
.each((_i, element) => {
|
|
15
|
-
const $element = $(element);
|
|
16
|
-
const $control = $element.find('> input.form-control-lg, select.form-control-lg, > textarea');
|
|
17
|
-
const isFloatingLabel = $control.length > 0;
|
|
18
|
-
if (!isFloatingLabel) {
|
|
19
|
-
$element
|
|
20
|
-
.removeClass('form-group')
|
|
21
|
-
.addClass('mb-regular');
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
class FormLabelClassUpdate {
|
|
27
|
-
constructor() {
|
|
28
|
-
this.selector = 'label, [for]';
|
|
29
|
-
}
|
|
30
|
-
update($elements, $) {
|
|
31
|
-
$elements
|
|
32
|
-
.each((_i, element) => {
|
|
33
|
-
const $element = $(element);
|
|
34
|
-
const $control = $element.siblings('input:visible, select:visible, textarea:visible');
|
|
35
|
-
if ($control.length > 0) {
|
|
36
|
-
$element.addClass('form-label');
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
class FormTextClassUpdate {
|
|
42
|
-
constructor() {
|
|
43
|
-
this.selector = '.form-text';
|
|
44
|
-
}
|
|
45
|
-
update($elements) {
|
|
46
|
-
$elements.removeClass('small text-muted');
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../schematics/migrations/bootstrap/forms/index.ts"],"names":[],"mappings":";;AAEA,gEAA8E;AAE9E;IACE,OAAO,IAAA,mCAAmB,EACxB,IAAI,oBAAoB,EACxB,IAAI,oBAAoB,EACxB,IAAI,mBAAmB,CACxB,CAAC;AACJ,CAAC;AAND,4BAMC;AAED,MAAM,oBAAoB;IAA1B;QACE,aAAQ,GAAG,aAAa,CAAC;IAiB3B,CAAC;IAfC,MAAM,CAAC,SAA2B,EAAE,CAAa;QAC/C,SAAS;aACN,IAAI,CAAC,CAAC,EAAE,EAAE,OAAO,EAAE,EAAE;YACpB,MAAM,QAAQ,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC;YAC5B,MAAM,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC,6DAA6D,CAAC,CAAC;YAE9F,MAAM,eAAe,GAAG,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC;YAE5C,IAAI,CAAC,eAAe,EAAE;gBACpB,QAAQ;qBACL,WAAW,CAAC,YAAY,CAAC;qBACzB,QAAQ,CAAC,YAAY,CAAC,CAAC;aAC3B;QACH,CAAC,CAAC,CAAC;IACP,CAAC;CACF;AAED,MAAM,oBAAoB;IAA1B;QACE,aAAQ,GAAG,cAAc,CAAC;IAa5B,CAAC;IAXC,MAAM,CAAC,SAA2B,EAAE,CAAa;QAC/C,SAAS;aACN,IAAI,CAAC,CAAC,EAAE,EAAE,OAAO,EAAE,EAAE;YACpB,MAAM,QAAQ,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC;YAC5B,MAAM,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC,iDAAiD,CAAC,CAAC;YAEtF,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;gBACvB,QAAQ,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;aACjC;QACH,CAAC,CAAC,CAAC;IACP,CAAC;CACF;AAED,MAAM,mBAAmB;IAAzB;QACE,aAAQ,GAAG,YAAY,CAAC;IAK1B,CAAC;IAHC,MAAM,CAAC,SAA2B;QAChC,SAAS,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC;IAC5C,CAAC;CACF"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const dom_migration_1 = require("../../../utils/dom-migration");
|
|
4
|
-
function default_1() {
|
|
5
|
-
return (0, dom_migration_1.getDomMigrationRule)(new TextareaFloatingLabelWrapperUpdate);
|
|
6
|
-
}
|
|
7
|
-
exports.default = default_1;
|
|
8
|
-
class TextareaFloatingLabelWrapperUpdate {
|
|
9
|
-
constructor() {
|
|
10
|
-
this.selector = '.form-group';
|
|
11
|
-
}
|
|
12
|
-
update($elements, $) {
|
|
13
|
-
$elements
|
|
14
|
-
.each((_i, element) => {
|
|
15
|
-
const $element = $(element);
|
|
16
|
-
const $control = $element.find('> textarea');
|
|
17
|
-
const $label = $element.next('label');
|
|
18
|
-
const $description = $control.siblings(`[for="${$control.attr('id')}"]`);
|
|
19
|
-
const labelText = $label.text() || $description.text();
|
|
20
|
-
const setLabel = $label.length === 0 && $description.length > 0;
|
|
21
|
-
const setPlaceholder = $description.length > 0 && $control.attr('placeholder') === undefined;
|
|
22
|
-
const isFloatingLabel = $control.length > 0;
|
|
23
|
-
if (isFloatingLabel) {
|
|
24
|
-
$element
|
|
25
|
-
.removeClass('form-group')
|
|
26
|
-
.addClass('form-floating');
|
|
27
|
-
if (setLabel) {
|
|
28
|
-
$(`<label class="form-label" for="${$control.attr('id')}">${labelText}</label>`).insertAfter($control);
|
|
29
|
-
$description.remove();
|
|
30
|
-
}
|
|
31
|
-
if (setPlaceholder) {
|
|
32
|
-
$control.attr('placeholder', labelText);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../schematics/migrations/bootstrap/textarea/index.ts"],"names":[],"mappings":";;AAEA,gEAA8E;AAE9E;IACE,OAAO,IAAA,mCAAmB,EACxB,IAAI,kCAAkC,CACvC,CAAC;AACJ,CAAC;AAJD,4BAIC;AAED,MAAM,kCAAkC;IAAxC;QACE,aAAQ,GAAG,aAAa,CAAC;IAgC3B,CAAC;IA9BC,MAAM,CAAC,SAA2B,EAAE,CAAa;QAC/C,SAAS;aACN,IAAI,CAAC,CAAC,EAAE,EAAE,OAAO,EAAE,EAAE;YACpB,MAAM,QAAQ,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC;YAC5B,MAAM,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;YAC7C,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACtC,MAAM,YAAY,GAAG,QAAQ,CAAC,QAAQ,CAAC,SAAS,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAEzE,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,EAAE,IAAI,YAAY,CAAC,IAAI,EAAE,CAAC;YAEvD,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC;YAChE,MAAM,cAAc,GAAG,YAAY,CAAC,MAAM,GAAG,CAAC,IAAI,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,SAAS,CAAC;YAC7F,MAAM,eAAe,GAAG,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC;YAE5C,IAAI,eAAe,EAAE;gBACnB,QAAQ;qBACL,WAAW,CAAC,YAAY,CAAC;qBACzB,QAAQ,CAAC,eAAe,CAAC,CAAC;gBAE7B,IAAI,QAAQ,EAAE;oBACZ,CAAC,CAAC,kCAAkC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,SAAS,UAAU,CAAC,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;oBACvG,YAAY,CAAC,MAAM,EAAE,CAAC;iBACvB;gBAED,IAAI,cAAc,EAAE;oBAClB,QAAQ,CAAC,IAAI,CAAC,aAAa,EAAE,SAAS,CAAC,CAAC;iBACzC;aACF;QACH,CAAC,CAAC,CAAC;IACP,CAAC;CACF"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const constants_1 = require("../../../utils/constants");
|
|
4
|
-
const dom_migration_1 = require("../../../utils/dom-migration");
|
|
5
|
-
function default_1() {
|
|
6
|
-
return (0, dom_migration_1.getDomMigrationRule)(new BackgroundOpacityClassesUpdate);
|
|
7
|
-
}
|
|
8
|
-
exports.default = default_1;
|
|
9
|
-
class BackgroundOpacityClassesUpdate {
|
|
10
|
-
constructor() {
|
|
11
|
-
this.cssClassRegex = new RegExp(`^bg-(${constants_1.themeColors.join('|')})-opacity-(\\d+)$`);
|
|
12
|
-
this.selector = constants_1.themeColors.map(colorname => `[class*="bg-${colorname}-opacity-"]`).join(', ');
|
|
13
|
-
}
|
|
14
|
-
update($elements, $) {
|
|
15
|
-
$elements
|
|
16
|
-
.each((_i, element) => {
|
|
17
|
-
var _a;
|
|
18
|
-
const $element = $(element);
|
|
19
|
-
(_a = $element
|
|
20
|
-
.attr('class')) === null || _a === void 0 ? void 0 : _a.split(' ').forEach(cssClass => {
|
|
21
|
-
const match = cssClass.match(this.cssClassRegex);
|
|
22
|
-
if (match) {
|
|
23
|
-
const colorname = match[1];
|
|
24
|
-
const opacityvalue = Number(match[2]);
|
|
25
|
-
$element
|
|
26
|
-
.removeClass(cssClass)
|
|
27
|
-
.addClass(`bg-${colorname}`)
|
|
28
|
-
.css('--post-bg-opacity', `${opacityvalue / 100}`);
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
//# sourceMappingURL=bg-opacity.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bg-opacity.js","sourceRoot":"","sources":["../../../../../schematics/migrations/general/classes/bg-opacity.ts"],"names":[],"mappings":";;AAEA,wDAAuD;AACvD,gEAA8E;AAE9E;IACE,OAAO,IAAA,mCAAmB,EACxB,IAAI,8BAA8B,CACnC,CAAC;AACJ,CAAC;AAJD,4BAIC;AAED,MAAM,8BAA8B;IAApC;QACE,kBAAa,GAAW,IAAI,MAAM,CAAC,QAAQ,uBAAW,CAAC,IAAI,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;QAErF,aAAQ,GAAG,uBAAW,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC,eAAe,SAAS,aAAa,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAyB5F,CAAC;IAvBC,MAAM,CAAC,SAA2B,EAAE,CAAa;QAC/C,SAAS;aACN,IAAI,CAAC,CAAC,EAAE,EAAE,OAAO,EAAE,EAAE;;YACpB,MAAM,QAAQ,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC;YAE5B,MAAA,QAAQ;iBACL,IAAI,CAAC,OAAO,CAAC,0CACZ,KAAK,CAAC,GAAG,EACV,OAAO,CAAC,QAAQ,CAAC,EAAE;gBAClB,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;gBAEjD,IAAI,KAAK,EAAE;oBACT,MAAM,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;oBAC3B,MAAM,YAAY,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;oBAEtC,QAAQ;yBACL,WAAW,CAAC,QAAQ,CAAC;yBACrB,QAAQ,CAAC,MAAM,SAAS,EAAE,CAAC;yBAC3B,GAAG,CAAC,mBAAmB,EAAE,GAAG,YAAY,GAAG,GAAG,EAAE,CAAC,CAAC;iBACtD;YACH,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC;CACF"}
|