Compare commits
1102 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7a4a3e9fe1 | |||
| 27e5375912 | |||
| aa6a1ece56 | |||
| 4cb046a6b8 | |||
| 708a3a0e39 | |||
| 4822984e19 | |||
| 5029370a10 | |||
| 9936ed48d7 | |||
| 8291746dd4 | |||
| 01dc2f5100 | |||
| bf6240dad9 | |||
| 5975ca65c5 | |||
| ebf053b792 | |||
| b1185b91ea | |||
| fffe0553c2 | |||
| ca067371c4 | |||
| 2fa7aa0c18 | |||
| 9a582767c6 | |||
| 838debaad2 | |||
| 18b99f7387 | |||
| 3b95c311ea | |||
| 1b3c38d2cd | |||
| b2f5cf9c43 | |||
| 961d5ff984 | |||
| 9edfed8a5e | |||
| d49d8ce583 | |||
| 0a5f6e078c | |||
| 812f891bfc | |||
| da0fe8c8b2 | |||
| abb1cf529f | |||
| f84d82ada0 | |||
| 80482af57b | |||
| 597c402314 | |||
| e77367dddc | |||
| 2b65149e02 | |||
| eff658edb7 | |||
| 24f6e2764a | |||
| 8da10bb1be | |||
| 2b46842af9 | |||
| 27f20257eb | |||
| 37e2e7e124 | |||
| 0173f7a9df | |||
| 1510c25e9b | |||
| 2be9cd59ba | |||
| 636bb496c9 | |||
| d0117a17d8 | |||
| 6f65df4fae | |||
| aedd7fb9de | |||
| 9af1232c65 | |||
| 3bd5756414 | |||
| 4600a25404 | |||
| a1b1e43ddc | |||
| b5ee6694c1 | |||
| d6a38b347f | |||
| 9cee77919d | |||
| 6e55fa9297 | |||
| 74184f8c61 | |||
| bcfc8d0d63 | |||
| 23e50829f9 | |||
| 23fb7a7915 | |||
| 949456984a | |||
| 7a7469b8ab | |||
| 9b943880fc | |||
| 97a9060a8f | |||
| 2504b89950 | |||
| 32c457db4b | |||
| b8880e5eec | |||
| 75e09b1c0f | |||
| 585146a6a7 | |||
| a329575d82 | |||
| 337068f8b1 | |||
| 54b4b2c66a | |||
| 8c380b2676 | |||
| 2793637837 | |||
| 4f97d8fabd | |||
| b5f2d5a31e | |||
| 77e17e3b8d | |||
| b14190b509 | |||
| 3ad8551f8b | |||
| a12453a0ff | |||
| db34907887 | |||
| cda901f244 | |||
| 87aaf94996 | |||
| 2f3aec819a | |||
| ebbed79df7 | |||
| a138bc3fb9 | |||
| bc2ec7c758 | |||
| 465cc2da4f | |||
| a0238d126b | |||
| 4cea8b1786 | |||
| 995df354f2 | |||
| 15318674fb | |||
| 29332a954f | |||
| af1bd974bb | |||
| c3c6591166 | |||
| a685b9648b | |||
| aad77f32bd | |||
| 9e57dfadac | |||
| e57a94cd66 | |||
| 8730ef0f8e | |||
| 4018fac20e | |||
| 6c221aa043 | |||
| 7432f2a922 | |||
| c22dd50e1b | |||
| a4f81c04b5 | |||
| 85530309fa | |||
| 17aa6732ab | |||
| db86607c08 | |||
| 90c50ab198 | |||
| 3feaf6ca0b | |||
| dfae892801 | |||
| 44c9c8df8d | |||
| 02f1c628f1 | |||
| 501faa2c96 | |||
| 00aa1a5c6e | |||
| a153f360ee | |||
| dc901d25fa | |||
| 01bf7a9b86 | |||
| 14e705d9ae | |||
| 99cd8ca8a0 | |||
| e547c9c2e9 | |||
| 7688c84b8a | |||
| b6d27899fc | |||
| d12bcf7bc0 | |||
| 04b5d099b3 | |||
| edf9c40956 | |||
| f451b4161e | |||
| 4035ad1a0e | |||
| eae51cdf32 | |||
| 705d6857ad | |||
| 154916ca2e | |||
| 9d5c834f94 | |||
| 150b374933 | |||
| d262a50c1f | |||
| 71cbb88f09 | |||
| 6d101b15a4 | |||
| ed448925da | |||
| aa8d0b3439 | |||
| 713d7140f1 | |||
| 8bb68b04b3 | |||
| b5910674da | |||
| 54317bf7c8 | |||
| ed2690608e | |||
| 62b3d3cc68 | |||
| a1224482f2 | |||
| ac654a0f66 | |||
| 81aa8e0713 | |||
| 5235f8eb04 | |||
| 270344a0d5 | |||
| 3eb6265b65 | |||
| 59a285ff3c | |||
| 2bf383c596 | |||
| a396d9cd12 | |||
| 6f10bdc99c | |||
| 6cf72530ed | |||
| 22c7503c88 | |||
| 3f324eed02 | |||
| 7d0b224df4 | |||
| f0f8107d05 | |||
| 547aa099ea | |||
| c1813ef2bc | |||
| a13f432db4 | |||
| f2692b1c58 | |||
| 505e0235b9 | |||
| 4082a3b52d | |||
| 9400b8f2f9 | |||
| d4aee02458 | |||
| 7f70fcab0f | |||
| 828034f26f | |||
| 9cf0e9b735 | |||
| 4f4b42dd14 | |||
| f14c58f494 | |||
| 8de0488330 | |||
| eea1b1e1fd | |||
| d05c42a397 | |||
| a877c5d04a | |||
| cfabeb71fa | |||
| 22503d6b21 | |||
| 24d79fe74c | |||
| ac0b87b207 | |||
| dfe7472431 | |||
| 7dc4fa932f | |||
| c57625b4d4 | |||
| 8d29e86ff4 | |||
| 1656b07ed5 | |||
| fc24f8788f | |||
| 13f109e542 | |||
| 147d3b0c9a | |||
| 06f0cca502 | |||
| 4d91157e39 | |||
| ec8166a90f | |||
| 5f75413735 | |||
| 1b31f84916 | |||
| a9ef305b81 | |||
| 0a3864641b | |||
| d16a16258c | |||
| ae3442041c | |||
| 37cf7d11b9 | |||
| 90021886f6 | |||
| af0c1d8618 | |||
| 5b0bf3f49a | |||
| 8965b11dd5 | |||
| 3102b4a3e9 | |||
| 6d5a70340d | |||
| c137d11aa2 | |||
| 824c5a077b | |||
| ac89c3692b | |||
| 29766b2db2 | |||
| eb17d3d760 | |||
| 83cb588f94 | |||
| dcb4d5e1df | |||
| 753698fea0 | |||
| f5dd354a25 | |||
| e9b901785a | |||
| 28b1bc67b1 | |||
| d388bd6e1b | |||
| 78c0ad8044 | |||
| ef3ecaf997 | |||
| 651dae6d0f | |||
| 8b85267739 | |||
| 4a3c004c34 | |||
| 23c4a96726 | |||
| 0c5cc1bc28 | |||
| 461596e5ea | |||
| dea14df8ca | |||
| afef596f20 | |||
| 39b609431b | |||
| 427c089961 | |||
| d17fe26dcf | |||
| 7ed1a5f821 | |||
| 8d87997303 | |||
| 3a327c9015 | |||
| 27261bd495 | |||
| eaf760e4bc | |||
| e2e107fc72 | |||
| 8959bf3f0b | |||
| 73e45ee36c | |||
| 416f4905f1 | |||
| b5a956781f | |||
| da541014cb | |||
| e12e0806fb | |||
| bb4f9d74fb | |||
| 46bb9e78d7 | |||
| ab37f63b3d | |||
| fca04c0713 | |||
| eacee3ad3f | |||
| f7e8ca91e0 | |||
| 8d016c6cf9 | |||
| 5f8383a136 | |||
| bd84449330 | |||
| ce650e7c7d | |||
| 6c10d60711 | |||
| b167420bdf | |||
| 88a6610895 | |||
| bbda152cd9 | |||
| dd19bf2657 | |||
| 795167d822 | |||
| 3cac119930 | |||
| 124bdfa4c1 | |||
| a9f8feb90b | |||
| 0e2fe9c8d1 | |||
| ceb94d07fa | |||
| 8070e2da9d | |||
| 7db2b16bea | |||
| 003fcac619 | |||
| 63d4c509b7 | |||
| 78e49f5127 | |||
| 6ca83e81b0 | |||
| b2477d5c1e | |||
| 6ac37c9bb2 | |||
| 314a9dd949 | |||
| fb20700a90 | |||
| 224b02e6e7 | |||
| 68f5965f42 | |||
| 4207544c0e | |||
| 619a65c55a | |||
| 4a682ab00a | |||
| 92e6856235 | |||
| f02bdf7c52 | |||
| f82b2ba20d | |||
| 6b49d26b21 | |||
| d2497b0384 | |||
| bca99232b8 | |||
| 5d9500bdfd | |||
| cca801683d | |||
| 51535cd95a | |||
| 2ba73d2c80 | |||
| a078b5e0b9 | |||
| 1ac2997cf6 | |||
| 8cd3c3e3bc | |||
| ec41392717 | |||
| 55be3c3fc2 | |||
| 207ddbee49 | |||
| 7745730e41 | |||
| ebb1f485d3 | |||
| 544cf8df48 | |||
| 54e0af0303 | |||
| 3143824ea4 | |||
| a2edb2afb8 | |||
| 00d45b11e7 | |||
| 3edead4ffe | |||
| 9a614a7e1d | |||
| 554736834d | |||
| 584600bda3 | |||
| 01cffa6822 | |||
| fc87624a50 | |||
| 1dc59b0d4e | |||
| 9ccee925fb | |||
| d6064264fe | |||
| e089aef00f | |||
| 9ec51f4499 | |||
| c1eab89238 | |||
| 2aad1696f1 | |||
| 3362c8cf13 | |||
| 3990ff04a0 | |||
| 5602093c7b | |||
| 195440f2fb | |||
| 26ea6f1649 | |||
| fa0adc979d | |||
| fb21233098 | |||
| 7a8459641f | |||
| d059c1d5ba | |||
| ece1601227 | |||
| cfd2f3f778 | |||
| 87da34014a | |||
| 1fed10dfb1 | |||
| 74be17edef | |||
| 7ff974b4ce | |||
| 3984ebb407 | |||
| 36e75f6355 | |||
| 8aaeb3cb6b | |||
| 33992b7d5b | |||
| fe257823ec | |||
| f6cb4b64b5 | |||
| f7312f7f3a | |||
| e206a6021b | |||
| a58d894a5b | |||
| 10f2830805 | |||
| 3c78f772d5 | |||
| 7648848e04 | |||
| dab026fc2b | |||
| 5b31463e35 | |||
| 135b9cdff2 | |||
| 238afd94b3 | |||
| 0323fe99d2 | |||
| a7153567e1 | |||
| f948974ca3 | |||
| d70f3afd4a | |||
| a787f3c2ac | |||
| 8b17ac6821 | |||
| 51463f3889 | |||
| bd420d570c | |||
| 4eeaee78aa | |||
| aa4e707f03 | |||
| 384075582b | |||
| 159dc4b1fb | |||
| 0ceaad3ab4 | |||
| 55c541f5bc | |||
| f789c2cc92 | |||
| 2fccd1c1e4 | |||
| 273ebad151 | |||
| 00d028e646 | |||
| 8006203e47 | |||
| 53fe10716a | |||
| d0714817f8 | |||
| 16711ff5b1 | |||
| bef4f3b6c6 | |||
| 6b4bdcc657 | |||
| e342142b61 | |||
| 7f35bc5b65 | |||
| 0eb808015f | |||
| 9e73b6a13c | |||
| fbf64406df | |||
| 0e5cd69c02 | |||
| 88bd287b27 | |||
| b165f35f78 | |||
| a4841afa26 | |||
| 71582eabff | |||
| 8182fd9430 | |||
| 11751c613f | |||
| 91f6a01c69 | |||
| 33827d24a4 | |||
| a9a89debc7 | |||
| 8fe82c7176 | |||
| 70cb00c349 | |||
| acf6ea74a7 | |||
| 7c966f5848 | |||
| 1936e0c5ea | |||
| e567d511d4 | |||
| d16088d5d1 | |||
| ce655ee6f2 | |||
| 58ac9a9a5c | |||
| e72a090aee | |||
| ea7ff1eab9 | |||
| c73480c636 | |||
| 63145c8bc6 | |||
| 05c6e7dd66 | |||
| 5bdd5e02a4 | |||
| d21a51a2ea | |||
| 6e904341c9 | |||
| 3673933fe7 | |||
| ec0e1c220e | |||
| 88da704eed | |||
| 28f150d720 | |||
| 3ef6a435be | |||
| 645f955845 | |||
| 7e5a8016ba | |||
| d4e87d28cd | |||
| dd93551914 | |||
| 699402bee5 | |||
| fcc2c80976 | |||
| b7cce49dbc | |||
| a8142497c7 | |||
| e77ae50311 | |||
| 21fa2cfc12 | |||
| 298cb9194b | |||
| 55fb59c074 | |||
| 3a57da425b | |||
| 488e426141 | |||
| 2e75ec3c41 | |||
| 91312486b2 | |||
| a68e1af2d5 | |||
| fdcbbe3d92 | |||
| 6c40476af9 | |||
| 2d11c1c28a | |||
| e84aadb36c | |||
| a9b3445060 | |||
| c766904aa2 | |||
| 050b69b9a2 | |||
| 8d7358f231 | |||
| d788d2efac | |||
| 9030f57db7 | |||
| b59b1080e1 | |||
| 63f30ac8ee | |||
| c644f09d88 | |||
| eb8d5b43ce | |||
| 13042d25ca | |||
| 631cec4f70 | |||
| 7d9423d21c | |||
| c864bdc7cb | |||
| bb7664db0a | |||
| 5051bbb82d | |||
| b7b376cec1 | |||
| 954f6e54d3 | |||
| a9d1ab2d3f | |||
| abe9d310ba | |||
| 76d9cd4e7a | |||
| 6e2b21c200 | |||
| 7a74f2c302 | |||
| c0f30366ac | |||
| efc5914667 | |||
| c1ab3eccd7 | |||
| de0dfca9a1 | |||
| e35980d009 | |||
| 12d49f19b0 | |||
| 0cf36335d6 | |||
| f988381365 | |||
| 4ee1465acf | |||
| d74870a749 | |||
| fd9db1758b | |||
| d0b8114462 | |||
| e4b62a920a | |||
| 28d9aaf670 | |||
| 2c5a16ff8b | |||
| 1c5ec4c310 | |||
| db61cf3d6a | |||
| 3aaaa01ffa | |||
| f1a89bf0d5 | |||
| 333d89e498 | |||
| 36765912c6 | |||
| a381ee320b | |||
| 37f3977e6d | |||
| 0804c0043f | |||
| 9ac8e80660 | |||
| 3a9b0b8b6f | |||
| cb8726d9e7 | |||
| 353ad45b4b | |||
| 4b17868fb4 | |||
| ae12d645ef | |||
| 407af8ac7f | |||
| 642d756eea | |||
| d52f6c9de1 | |||
| 928bdcadc5 | |||
| d97125475b | |||
| a247fe9b27 | |||
| ccba6a3589 | |||
| 546e34cf85 | |||
| f7f450ec59 | |||
| d82602063a | |||
| 999bfaa036 | |||
| 5565c64bde | |||
| 63f75bccd8 | |||
| 48a7160cf4 | |||
| 2a09f10676 | |||
| 42da2b9556 | |||
| d568e029da | |||
| 3e6265ac55 | |||
| 85938bb2ed | |||
| ef9d8538a0 | |||
| 918a86b425 | |||
| a163ed76d4 | |||
| daefd34693 | |||
| 48807758af | |||
| a7942190c7 | |||
| f2d33b2a1e | |||
| 7e71fe7bae | |||
| d3babf7d7f | |||
| d19c635f16 | |||
| 761c4ff235 | |||
| da9c007139 | |||
| 0853778eba | |||
| 4308b67e59 | |||
| 71a211f2bd | |||
| 27a0f40dc8 | |||
| c9cec89764 | |||
| 8f11c52919 | |||
| a805330f63 | |||
| 77e02a07c7 | |||
| 96c67a7ff7 | |||
| ff2472becc | |||
| d2986daa12 | |||
| 43a9216a7f | |||
| 4dc4108460 | |||
| 957c1dd6ea | |||
| a5483a8a96 | |||
| dc09509193 | |||
| cf7fec8a2e | |||
| a1e924c4da | |||
| fc7c5fcb7a | |||
| 3f7b31e0e0 | |||
| c44d99f55c | |||
| c14fc989df | |||
| d105439235 | |||
| 22bbff0b03 | |||
| 9d44b603d5 | |||
| 76802e2d47 | |||
| 7f04f84bf8 | |||
| 5f1c542d67 | |||
| 74f24cdf24 | |||
| e1020a43a5 | |||
| 882185bbde | |||
| 89f88762c5 | |||
| f77a58b381 | |||
| dcbe7b6f31 | |||
| 28c9002573 | |||
| aa650f0f1e | |||
| d092817059 | |||
| fa93995123 | |||
| 640542e606 | |||
| eb2fda2110 | |||
| 0840105d7f | |||
| 558002f3dc | |||
| 7d3bc44bb0 | |||
| a8887ea8a8 | |||
| b5147ec218 | |||
| 62d86c07f8 | |||
| 3ac4451d47 | |||
| 0c3dfe104b | |||
| 2964c12bb9 | |||
| d122f40526 | |||
| c1222d6952 | |||
| 1411181b1b | |||
| 520cc8de92 | |||
| cd208341a1 | |||
| f0e1220970 | |||
| c99fa6ca26 | |||
| 14c7dc1e88 | |||
| d581737f78 | |||
| 17260410ba | |||
| e8f4cba9a0 | |||
| 0dbec67514 | |||
| 0d054bb0f1 | |||
| f7a1b18320 | |||
| 670e12dd0d | |||
| cebb8436c7 | |||
| 0b57c44056 | |||
| 9680e17456 | |||
| 2c9ecd0b8d | |||
| 33c7f9fe69 | |||
| deb8e3febd | |||
| f171d3e9f7 | |||
| 0d4213bde3 | |||
| b8ee68cfa0 | |||
| ff4bf4a458 | |||
| 6f79721c82 | |||
| d60f146507 | |||
| 65cf77ae3e | |||
| aec213711a | |||
| 32401fdc37 | |||
| 8ccb27a213 | |||
| a2c056e1f6 | |||
| 42162546f2 | |||
| c2db7108c2 | |||
| f729e4c7d1 | |||
| 4a66f229ed | |||
| d17801265e | |||
| 2d07383e32 | |||
| a22694da13 | |||
| e0960b08e0 | |||
| d40fae456e | |||
| cd04fe015f | |||
| cb46ad633c | |||
| 28f7c94475 | |||
| 8cdb6c40bd | |||
| cd50942831 | |||
| 886b940796 | |||
| 68f226750d | |||
| 63d38b1974 | |||
| 871c8bdd3f | |||
| eaa801c899 | |||
| 94d4fa3b10 | |||
| 28a5a72ed5 | |||
| c376cb0763 | |||
| 4fd5539c75 | |||
| 2a7015e630 | |||
| e45111fb74 | |||
| 328f723008 | |||
| ba7863a5bb | |||
| b2200c3b24 | |||
| a75d2098eb | |||
| a780d74b28 | |||
| 6eef480e1e | |||
| 2ff1eb0daa | |||
| d8999dd566 | |||
| 385fea49e8 | |||
| bd79d69a73 | |||
| 1f7b83203d | |||
| 9b9372e8dd | |||
| 8eacbaa08b | |||
| c69ccba08c | |||
| a20e4203fe | |||
| 724663b3cd | |||
| 3baeb0a5c1 | |||
| 53c77c0203 | |||
| a5945369bd | |||
| dd07c1ff9e | |||
| f71640f048 | |||
| 21e5618ba7 | |||
| 0686fa00f0 | |||
| a14a552d83 | |||
| bff95d55af | |||
| 2d32802f53 | |||
| fb5921dec4 | |||
| 137b324930 | |||
| 8b308b76f0 | |||
| 01b08d958c | |||
| cab62af2e6 | |||
| 44a6cd724c | |||
| 2fe90d8b16 | |||
| e5d8256e42 | |||
| 11ce6c2dcd | |||
| f8f9dc3b5c | |||
| eb54e1a1ce | |||
| 5739bf7637 | |||
| 2a51370e92 | |||
| d13b5ca2a5 | |||
| 1692fc6b4b | |||
| 3129ff075b | |||
| 5290080d4d | |||
| 45eb70e03c | |||
| 3c8fbb6581 | |||
| 6f077ff7bc | |||
| 374eeecfbc | |||
| 91ad255e07 | |||
| 569bca54d2 | |||
| 0f9fd75d6c | |||
| cc3e5789ec | |||
| 92e664c921 | |||
| fc33ce4b46 | |||
| 79e01c3bad | |||
| 94a596fbcb | |||
| fa33e83f25 | |||
| 58ffe2334a | |||
| 1ee058adf5 | |||
| 7edad9453c | |||
| 8ddc42f584 | |||
| 9c0163329f | |||
| 9f099d3e4f | |||
| 96dcc150d5 | |||
| 367caea501 | |||
| e958cd2637 | |||
| 31998dfd1e | |||
| 98889f2144 | |||
| 6c706e947d | |||
| 889286cef1 | |||
| 05f1b15dda | |||
| 44ea0d6925 | |||
| 0c449b8b82 | |||
| 328a29162d | |||
| 8ed1218294 | |||
| 989de20bae | |||
| 600a9ee521 | |||
| 7a9a3ab50f | |||
| 2e87f9aef0 | |||
| dc06b9966e | |||
| 5771fcc4a9 | |||
| a0fd92ed2b | |||
| b991a6b851 | |||
| 9640e2d5dd | |||
| 1eea132866 | |||
| 99f6cf509d | |||
| 45bba10714 | |||
| e8f702666f | |||
| db44392bda | |||
| d7dec124eb | |||
| 1fe4acc270 | |||
| 5b124f647f | |||
| 8ec6c94522 | |||
| b21c7ccbb7 | |||
| 24e3ca2474 | |||
| c44d64ed71 | |||
| 1a6fdfae6b | |||
| 09f73a6a12 | |||
| ec62be2724 | |||
| a260967a55 | |||
| eb0f705621 | |||
| 64e13162fa | |||
| 9ff87f5f0e | |||
| c331a150cd | |||
| 2596c97034 | |||
| 598b4c59a6 | |||
| 3afe4b8c7d | |||
| 567a41347e | |||
| 666fe596bf | |||
| 2b4d0d166b | |||
| 9f1579aa04 | |||
| 57d80fcd32 | |||
| cf2f7cfbe5 | |||
| 71e334e41a | |||
| 7bd4c9b79e | |||
| 5ecef8ac01 | |||
| a2aa8c5a6e | |||
| 6b8cf0912a | |||
| fc21dcf758 | |||
| c81c645394 | |||
| 78e9b402df | |||
| c8e5de6e7d | |||
| ae16dbbb50 | |||
| 49df44d43e | |||
| 4ffdef397f | |||
| 759fc89f4b | |||
| 9437973e58 | |||
| 9da749bc33 | |||
| c67bcdee62 | |||
| 7da7e8a558 | |||
| a0d3ddc87b | |||
| 630d2707a3 | |||
| fee1dc52ee | |||
| 4fffcf7232 | |||
| 69fedf203b | |||
| 556fd4bbd4 | |||
| 143dafdc93 | |||
| 70f55cfb52 | |||
| 9845a38f97 | |||
| c7dd486527 | |||
| ae51525389 | |||
| 337447c5cc | |||
| b1e27a456b | |||
| d610a3c484 | |||
| 60d3eb34f8 | |||
| 93e82f11b9 | |||
| bdfb4cc54d | |||
| 8f2e678424 | |||
| c5d03d93fc | |||
| 1d484b5737 | |||
| c54cd6a070 | |||
| 6bd842bd66 | |||
| 89630c54fc | |||
| 8b0b34e92e | |||
| 55a352d023 | |||
| c9af4565fd | |||
| 8c4f66733e | |||
| 1df098361c | |||
| cb87ed2a79 | |||
| f7c361f553 | |||
| 2a925d6fd8 | |||
| 8db02e24d6 | |||
| 24daa47131 | |||
| 499485589f | |||
| de68df20cd | |||
| 00a230a6a7 | |||
| 395b50a5b5 | |||
| acc0836f08 | |||
| 7e1aa85fad | |||
| dbe0ad49ab | |||
| 94c80ff613 | |||
| 0d81d3cbc1 | |||
| b6855ae138 | |||
| 23b3d636e1 | |||
| aa06dffdf6 | |||
| 16aab88a67 | |||
| 68a86d3477 | |||
| 6411799e60 | |||
| 60b88dd3b9 | |||
| 2a1aa2a9f4 | |||
| 9852c9afbb | |||
| 6397516ad7 | |||
| 9b7256ee8c | |||
| 19d4e7852b | |||
| e52b78aa27 | |||
| 22738ee8ae | |||
| 58edf0ecbe | |||
| 55c5549172 | |||
| d91480e3c7 | |||
| 283cbd9026 | |||
| f22966c920 | |||
| 5cc633dfab | |||
| 9050b2698a | |||
| 365d6d9fb1 | |||
| 51afe026ca | |||
| ef21000cbe | |||
| a7e64b5a4f | |||
| 2a0f7078d4 | |||
| a0da3a0f42 | |||
| c02805bb8c | |||
| 4a4b61f082 | |||
| 10fc1fec6a | |||
| c1fc1dbbee | |||
| d9254c64fa | |||
| 151f076ab6 | |||
| acfd5b6625 | |||
| 44a5be2de7 | |||
| 40042ee503 | |||
| 6cf52ed5f7 | |||
| 9e1d81a851 | |||
| 91295c2187 | |||
| bfad22f23c | |||
| 7207cd1919 | |||
| b10c1a76c7 | |||
| 18b3e1ac71 | |||
| 1e5e655670 | |||
| 418fe8113e | |||
| 2034ead87f | |||
| 91e53eb93b | |||
| d3368f4c00 | |||
| 0d608a6ccd | |||
| 612d235faf | |||
| fd92e353d0 | |||
| f4fd27118f | |||
| fdc2f723a5 | |||
| f20fece3a8 | |||
| 7fcc2f4d52 | |||
| 68ff5c91b7 | |||
| 0da7d66842 | |||
| 999eee6391 | |||
| 1e9446c0c8 | |||
| 7409271b56 | |||
| 4d7911a27b | |||
| e72916e5b7 | |||
| a2f92d1aab | |||
| 39b7c75b13 | |||
| f64df40dfa | |||
| b6df4a5394 | |||
| fc6cf9b06f | |||
| 6074e55e99 | |||
| 6d3e1a01c5 | |||
| 6c38cc01e7 | |||
| c4513594f9 | |||
| d9c60313b2 | |||
| 9deed2da9b | |||
| a6a2d1e2df | |||
| 23fd488c38 | |||
| 742269a734 | |||
| 6d707f4801 | |||
| 2bf32ad180 | |||
| e5b606d242 | |||
| 6f17e634ce | |||
| 4c1f7bb051 | |||
| 7a71703fd3 | |||
| 8fc4f3aaf3 | |||
| 1947ca033e | |||
| 5882d5dbe8 | |||
| 4961ad0c63 | |||
| 2ad0a4a9fd | |||
| c6c0bbb0b6 | |||
| 906a990eb7 | |||
| 4bfd8a2cbc | |||
| 047145e808 | |||
| 24e14c36e8 | |||
| fd9285bc9c | |||
| a389cb443e | |||
| 8513c69385 | |||
| f41bf2f7c5 | |||
| 7646f6bd33 | |||
| 8536474583 | |||
| d140981fdb | |||
| e208774fc1 | |||
| 905db7dadb | |||
| e805a5e287 | |||
| 9ef7ca5156 | |||
| dd303fa971 | |||
| 2bdbb42dcf | |||
| 41292a5257 | |||
| e85a6ed77c | |||
| 9916191311 | |||
| b1dad0943f | |||
| d01a08547d | |||
| d130b00cad | |||
| 3533e2d637 | |||
| d3c6f25fd0 | |||
| da2db218ed | |||
| 9c3ceaa25b | |||
| a97fd1cd24 | |||
| 3716603dbc | |||
| 92c7056619 | |||
| c4e189df40 | |||
| 75b2934596 | |||
| 3e01830d92 | |||
| 119cfc3dfe | |||
| 5541179b38 | |||
| 365b9e5af0 | |||
| 5eaf73baa6 | |||
| 7218c3e3be | |||
| 3f7476bd16 | |||
| ed9850cbfb | |||
| 95e5b76d83 | |||
| 2721f6042b | |||
| dfafb9a60c | |||
| 06a1ca5623 | |||
| ed3f2d46c4 | |||
| aee169d192 | |||
| 2bc6de1f5e | |||
| 5c1691ac3a | |||
| 054f8781a8 | |||
| e45b25e08e | |||
| 2b297b977a | |||
| 96db1780e1 | |||
| f50ce6179d | |||
| 3f3f8dddb8 | |||
| da524f6b7d | |||
| 145aaee2a7 | |||
| 452e2f0689 | |||
| 0fc117cec5 | |||
| f254047d92 | |||
| 0e165e58f5 | |||
| 7987bfdf80 | |||
| 8fd62c4fc5 | |||
| 0132b77638 | |||
| 47bbd945f0 | |||
| 66ce774e2a | |||
| 359ed099e5 | |||
| 8bc89b273d | |||
| f323fad915 | |||
| 0c7018a954 | |||
| 696996dd4f | |||
| d314466a4d | |||
| b00355de4b | |||
| d979dcf853 | |||
| cb187599ea | |||
| 921d8aea68 | |||
| 70dd7f6ff5 | |||
| 45d26de728 | |||
| 088ef62982 | |||
| 653476ec98 | |||
| 77d4143674 | |||
| dd824f2d3e | |||
| 5967ebd906 | |||
| f94f497ad5 | |||
| a816615efa | |||
| 2d8da8bcb0 | |||
| 688bce4fa6 | |||
| 16d5041a76 | |||
| 4927388197 | |||
| 56b000474c | |||
| c11c3a7e19 | |||
| ed13d01559 | |||
| 290b9ee2cd | |||
| 8be957b32b | |||
| 0fa84e8c8e | |||
| 58a373146b | |||
| 15c040a32a | |||
| 40373eb773 | |||
| 34db122ecc | |||
| d16a799217 | |||
| c6d6156e42 | |||
| 9c1bc2f041 | |||
| bef9ec8898 | |||
| 543d2219c4 | |||
| d62ba935ef | |||
| 9485172017 | |||
| 2b2183a96e | |||
| a47c055a6f | |||
| 285ff5ebf9 | |||
| 2f734af472 | |||
| 5be3550d49 | |||
| f30066cb8a | |||
| 9ef62c3ea8 | |||
| 378660674e | |||
| be17444756 | |||
| e9da490e51 | |||
| 7951eedbc6 | |||
| f826331458 | |||
| 95bc724b9c | |||
| 9ac65855c4 | |||
| b613c8dbb6 | |||
| 232a40a5f1 | |||
| 7968a074a5 | |||
| ca43fa8892 | |||
| cb47b8c964 | |||
| 08139c2280 | |||
| f2b47e1c8a | |||
| f14d1a4c17 | |||
| dbda13d5ef | |||
| c98657b830 | |||
| 4a5029ea29 | |||
| 071a288d39 | |||
| 46045b4a9b | |||
| c0d21e1b3d | |||
| 9c7f3bed71 | |||
| 7ec9d8df52 | |||
| 7d9adb702d | |||
| cec7618020 | |||
| 08773aba35 | |||
| f3f0b316a1 | |||
| 0612d3169e | |||
| 0cb70e214f | |||
| e818c7cd5d | |||
| 649c2bb0bf | |||
| f9e3d01f30 | |||
| fd985d3732 | |||
| 57205e3d8e | |||
| 544d9ac3cf | |||
| 69a9b87945 | |||
| ff38727bb0 | |||
| 2b6f6cd092 | |||
| f505e5779c | |||
| bdde9b50a6 | |||
| 993b533dc6 | |||
| 50cf7f48cc | |||
| b513a19003 | |||
| 136665903b | |||
| b046677412 | |||
| b39b665072 | |||
| 8033975548 | |||
| e06e6dfe53 | |||
| a2b5901efc | |||
| d64466a248 | |||
| 0a4219a0b8 | |||
| 55a0f9af27 | |||
| 4ac711b5b4 | |||
| 79c3bf47bc | |||
| 9e4f87ae8f | |||
| de0b797ab2 | |||
| 8aa02d8801 | |||
| a44f3f47cb | |||
| 4509d2dc59 | |||
| 9f95b08969 | |||
| df72a21fa8 | |||
| 372890b67b | |||
| ff60b40c56 | |||
| 2757fbe28e | |||
| 153cf3a235 | |||
| 0b2d20b975 | |||
| 9f678d6a5d | |||
| 83bcc3c00f | |||
| 58b1be927f | |||
| 130a5ba1df | |||
| 6e1c9096f0 | |||
| e376142d85 | |||
| b196857299 | |||
| 1e4b924aa9 | |||
| 7ed48943cf | |||
| d81d0a92d4 | |||
| d80cb2241d | |||
| 3464d3caa2 | |||
| 9a9e22475c | |||
| 15d0105393 | |||
| 5f2b49fa76 | |||
| ac0ea51585 | |||
| 93c5412864 | |||
| d794e8970b | |||
| bc0993d7f9 | |||
| d76507062f | |||
| a6dfaca605 | |||
| 8d1b0fb779 | |||
| 19f95a3d8d | |||
| 9fe36edf68 | |||
| 7647b8fe5b | |||
| 03842b5f25 | |||
| 052def4568 | |||
| 9c3ab6557e | |||
| c3ad760cd7 | |||
| 90b1a6907e | |||
| 9106d2a0ea | |||
| b074e23ee4 | |||
| b110c0f0e2 | |||
| 18bc0d5d2b | |||
| 741fa589d0 | |||
| 308ffba793 | |||
| 75fe3244db | |||
| 488fd8afc5 | |||
| f12bc3316b | |||
| e54d43cba3 | |||
| 275b81e675 | |||
| 6ecf21870a | |||
| eb73a2fc6f | |||
| 9ad9ca3537 | |||
| c9a606a894 | |||
| 597da0fb59 | |||
| f3403ef7b7 | |||
| e54654ead0 | |||
| 5e980ddd1c |
+25
-25
@@ -2,59 +2,59 @@
|
||||
"files": [
|
||||
{
|
||||
"path": "./dist/css/bootstrap-grid.css",
|
||||
"maxSize": "7 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/css/bootstrap-grid.min.css",
|
||||
"maxSize": "6 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/css/bootstrap-reboot.css",
|
||||
"maxSize": "2.25 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/css/bootstrap-reboot.min.css",
|
||||
"maxSize": "2 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/css/bootstrap-utilities.css",
|
||||
"maxSize": "7.5 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/css/bootstrap-utilities.min.css",
|
||||
"path": "./dist/css/bootstrap-grid.min.css",
|
||||
"maxSize": "6.75 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/css/bootstrap-reboot.css",
|
||||
"maxSize": "2.75 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/css/bootstrap-reboot.min.css",
|
||||
"maxSize": "2.5 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/css/bootstrap-utilities.css",
|
||||
"maxSize": "8.5 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/css/bootstrap-utilities.min.css",
|
||||
"maxSize": "7.75 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/css/bootstrap.css",
|
||||
"maxSize": "24.25 kB"
|
||||
"maxSize": "29.5 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/css/bootstrap.min.css",
|
||||
"maxSize": "22.25 kB"
|
||||
"maxSize": "27.5 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/js/bootstrap.bundle.js",
|
||||
"maxSize": "41.25 kB"
|
||||
"maxSize": "44.55 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/js/bootstrap.bundle.min.js",
|
||||
"maxSize": "22.25 kB"
|
||||
"maxSize": "23.75 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/js/bootstrap.esm.js",
|
||||
"maxSize": "27 kB"
|
||||
"maxSize": "29.75 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/js/bootstrap.esm.min.js",
|
||||
"maxSize": "18.25 kB"
|
||||
"maxSize": "19.25 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/js/bootstrap.js",
|
||||
"maxSize": "27.25 kB"
|
||||
"maxSize": "30.5 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/js/bootstrap.min.js",
|
||||
"maxSize": "15.75 kB"
|
||||
"maxSize": "16.75 kB"
|
||||
}
|
||||
],
|
||||
"ci": {
|
||||
|
||||
+130
@@ -0,0 +1,130 @@
|
||||
{
|
||||
"version": "0.2",
|
||||
"words": [
|
||||
"affordance",
|
||||
"allowfullscreen",
|
||||
"Analyser",
|
||||
"autohide",
|
||||
"autohiding",
|
||||
"autoplay",
|
||||
"autoplays",
|
||||
"blazingly",
|
||||
"Blockquotes",
|
||||
"Bootstrappers",
|
||||
"borderless",
|
||||
"Brotli",
|
||||
"browserslist",
|
||||
"browserslistrc",
|
||||
"btncheck",
|
||||
"btnradio",
|
||||
"callout",
|
||||
"callouts",
|
||||
"camelCase",
|
||||
"clearfix",
|
||||
"Codesniffer",
|
||||
"combinator",
|
||||
"Contentful",
|
||||
"Cpath",
|
||||
"Crossfade",
|
||||
"crossfading",
|
||||
"cssgrid",
|
||||
"Csvg",
|
||||
"Datalists",
|
||||
"Deque",
|
||||
"discoverability",
|
||||
"docsearch",
|
||||
"docsref",
|
||||
"dropend",
|
||||
"dropleft",
|
||||
"dropright",
|
||||
"dropstart",
|
||||
"dropup",
|
||||
"errorf",
|
||||
"favicon",
|
||||
"favicons",
|
||||
"fieldsets",
|
||||
"flexbox",
|
||||
"fullscreen",
|
||||
"getbootstrap",
|
||||
"Grayscale",
|
||||
"Hoverable",
|
||||
"hreflang",
|
||||
"hstack",
|
||||
"importmap",
|
||||
"jsdelivr",
|
||||
"Jumpstart",
|
||||
"keyframes",
|
||||
"libera",
|
||||
"libman",
|
||||
"Libsass",
|
||||
"lightboxes",
|
||||
"Lowercased",
|
||||
"markdownify",
|
||||
"mediaqueries",
|
||||
"minifiers",
|
||||
"misfunction",
|
||||
"mkdir",
|
||||
"monospace",
|
||||
"mouseleave",
|
||||
"navbars",
|
||||
"navs",
|
||||
"Neue",
|
||||
"noindex",
|
||||
"Noto",
|
||||
"offcanvas",
|
||||
"offcanvases",
|
||||
"Packagist",
|
||||
"popperjs",
|
||||
"prebuild",
|
||||
"prefersreducedmotion",
|
||||
"prepended",
|
||||
"printf",
|
||||
"rects",
|
||||
"relref",
|
||||
"rgba",
|
||||
"roboto",
|
||||
"RTLCSS",
|
||||
"ruleset",
|
||||
"screenreaders",
|
||||
"scrollbars",
|
||||
"scrollspy",
|
||||
"Segoe",
|
||||
"semibold",
|
||||
"socio",
|
||||
"srcset",
|
||||
"stackblitz",
|
||||
"stickied",
|
||||
"Stylelint",
|
||||
"subnav",
|
||||
"tabbable",
|
||||
"textareas",
|
||||
"toggleable",
|
||||
"topbar",
|
||||
"touchend",
|
||||
"twbs",
|
||||
"unitless",
|
||||
"unstylable",
|
||||
"unstyled",
|
||||
"Uppercased",
|
||||
"urlize",
|
||||
"vbtn",
|
||||
"viewports",
|
||||
"Vite",
|
||||
"vstack",
|
||||
"walkthroughs",
|
||||
"WCAG",
|
||||
"zindex"
|
||||
],
|
||||
"language": "en-US",
|
||||
"files": [
|
||||
"**/*.md"
|
||||
],
|
||||
"ignorePaths": [
|
||||
".cspell.json",
|
||||
"dist/",
|
||||
"*.min.*",
|
||||
"**/*rtl*",
|
||||
"**/tests/**"
|
||||
],
|
||||
"useGitignore": true
|
||||
}
|
||||
@@ -3,4 +3,6 @@
|
||||
**/vendor/
|
||||
/_site/
|
||||
/js/coverage/
|
||||
/js/tests/integration/
|
||||
/site/static/sw.js
|
||||
/site/layouts/
|
||||
|
||||
+12
-6
@@ -8,7 +8,12 @@
|
||||
"xo/browser"
|
||||
],
|
||||
"rules": {
|
||||
"arrow-body-style": "off",
|
||||
"capitalized-comments": "off",
|
||||
"comma-dangle": [
|
||||
"error",
|
||||
"never"
|
||||
],
|
||||
"indent": [
|
||||
"error",
|
||||
2,
|
||||
@@ -32,25 +37,26 @@
|
||||
}
|
||||
],
|
||||
"no-console": "error",
|
||||
"no-negated-condition": "off",
|
||||
"object-curly-spacing": [
|
||||
"error",
|
||||
"always"
|
||||
],
|
||||
"operator-linebreak": [
|
||||
"error",
|
||||
"after"
|
||||
],
|
||||
"semi": [
|
||||
"error",
|
||||
"never"
|
||||
],
|
||||
"unicorn/consistent-function-scoping": "off",
|
||||
"unicorn/explicit-length-check": "off",
|
||||
"unicorn/no-array-callback-reference": "off",
|
||||
"unicorn/no-array-for-each": "off",
|
||||
"unicorn/no-for-loop": "off",
|
||||
"unicorn/no-array-method-this-argument": "off",
|
||||
"unicorn/no-null": "off",
|
||||
"unicorn/no-unused-properties": "error",
|
||||
"unicorn/no-useless-undefined": "off",
|
||||
"unicorn/prefer-dom-node-append": "off",
|
||||
"unicorn/prefer-array-flat": "off",
|
||||
"unicorn/prefer-dom-node-dataset": "off",
|
||||
"unicorn/prefer-dom-node-remove": "off",
|
||||
"unicorn/prefer-module": "off",
|
||||
"unicorn/prefer-query-selector": "off",
|
||||
"unicorn/prefer-spread": "off",
|
||||
|
||||
@@ -18,9 +18,7 @@ the preferred channel for [bug reports](#bug-reports), [features requests](#feat
|
||||
and [submitting pull requests](#pull-requests), but please respect the following
|
||||
restrictions:
|
||||
|
||||
* Please **do not** use the issue tracker for personal support requests. Stack
|
||||
Overflow ([`bootstrap-5`](https://stackoverflow.com/questions/tagged/bootstrap-5) tag),
|
||||
[Slack](https://bootstrap-slack.herokuapp.com/) or [IRC](README.md#community) are better places to get help.
|
||||
* Please **do not** use the issue tracker for personal support requests. Stack Overflow ([`bootstrap-5`](https://stackoverflow.com/questions/tagged/bootstrap-5) tag), [our GitHub Discussions](https://github.com/twbs/bootstrap/discussions) or [IRC](/README.md#community) are better places to get help.
|
||||
|
||||
* Please **do not** derail or troll issues. Keep the discussion on topic and
|
||||
respect the opinions of others.
|
||||
@@ -69,7 +67,7 @@ Guidelines for bug reports:
|
||||
|
||||
3. **Isolate the problem** — ideally create a [reduced test
|
||||
case](https://css-tricks.com/reduced-test-cases/) and a live example.
|
||||
[This JS Bin](https://jsbin.com/lolome/edit?html,output) is a helpful template.
|
||||
These [v4 CodePen](https://codepen.io/team/bootstrap/pen/yLabNQL) and [v5 CodePen](https://codepen.io/team/bootstrap/pen/qBamdLj) are helpful templates.
|
||||
|
||||
|
||||
A good bug report shouldn't leave others needing to chase you up for more
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
open_collective: bootstrap
|
||||
@@ -1,20 +0,0 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Tell us about a bug you may have identified in Bootstrap.
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
Before opening:
|
||||
|
||||
- [Search for duplicate or closed issues](https://github.com/twbs/bootstrap/issues?utf8=%E2%9C%93&q=is%3Aissue)
|
||||
- [Validate](https://html5.validator.nu/) any HTML to avoid common problems
|
||||
- Read the [contributing guidelines](https://github.com/twbs/bootstrap/blob/main/.github/CONTRIBUTING.md)
|
||||
|
||||
Bug reports must include:
|
||||
|
||||
- Operating system and version (Windows, macOS, Android, iOS)
|
||||
- Browser and version (Chrome, Firefox, Safari, Microsoft Edge, Opera, Android Browser)
|
||||
- A [reduced test case](https://css-tricks.com/reduced-test-cases/) or suggested fix using [CodePen](https://codepen.io/) or [JS Bin](https://jsbin.com/)
|
||||
@@ -0,0 +1,62 @@
|
||||
name: Report a bug
|
||||
description: Tell us about a bug or issue you may have identified in Bootstrap.
|
||||
title: "Provide a general summary of the issue"
|
||||
labels: [bug]
|
||||
assignees: "-"
|
||||
body:
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Prerequisites
|
||||
description: Take a couple minutes to help our maintainers work faster.
|
||||
options:
|
||||
- label: I have [searched](https://github.com/twbs/bootstrap/issues?utf8=%E2%9C%93&q=is%3Aissue) for duplicate or closed issues
|
||||
required: true
|
||||
- label: I have [validated](https://html5.validator.nu/) any HTML to avoid common problems
|
||||
required: true
|
||||
- label: I have read the [contributing guidelines](https://github.com/twbs/bootstrap/blob/main/.github/CONTRIBUTING.md)
|
||||
required: true
|
||||
- type: textarea
|
||||
id: what-happened
|
||||
attributes:
|
||||
label: Describe the issue
|
||||
description: Provide a summary of the issue and what you expected to happen, including specific steps to reproduce.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: reduced-test-case
|
||||
attributes:
|
||||
label: Reduced test cases
|
||||
description: Include links [reduced test case](https://css-tricks.com/reduced-test-cases/) links or suggested fixes using CodePen ([v4 template](https://codepen.io/team/bootstrap/pen/yLabNQL) or [v5 template](https://codepen.io/team/bootstrap/pen/qBamdLj)).
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: os
|
||||
attributes:
|
||||
label: What operating system(s) are you seeing the problem on?
|
||||
multiple: true
|
||||
options:
|
||||
- Windows
|
||||
- macOS
|
||||
- Android
|
||||
- iOS
|
||||
- Linux
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: browser
|
||||
attributes:
|
||||
label: What browser(s) are you seeing the problem on?
|
||||
multiple: true
|
||||
options:
|
||||
- Chrome
|
||||
- Safari
|
||||
- Firefox
|
||||
- Microsoft Edge
|
||||
- Opera
|
||||
- type: input
|
||||
id: version
|
||||
attributes:
|
||||
label: What version of Bootstrap are you using?
|
||||
placeholder: "e.g., v5.1.0 or v4.5.2"
|
||||
validations:
|
||||
required: true
|
||||
@@ -1,4 +1,4 @@
|
||||
contact_links:
|
||||
- name: Ask a question
|
||||
- name: Ask the community
|
||||
url: https://github.com/twbs/bootstrap/discussions/new
|
||||
about: Ask and discuss questions with other Bootstrap community members
|
||||
about: Ask and discuss questions with other Bootstrap community members.
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for a new feature in Bootstrap.
|
||||
title: ''
|
||||
labels: feature
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
Before opening:
|
||||
|
||||
- [Search for duplicate or closed issues](https://github.com/twbs/bootstrap/issues?utf8=%E2%9C%93&q=is%3Aissue)
|
||||
- Read the [contributing guidelines](https://github.com/twbs/bootstrap/blob/main/.github/CONTRIBUTING.md)
|
||||
|
||||
Feature requests must include:
|
||||
|
||||
- As much detail as possible for what we should add and why it's important to Bootstrap
|
||||
- Relevant links to prior art, screenshots, or live demos whenever possible
|
||||
@@ -0,0 +1,29 @@
|
||||
name: Feature request
|
||||
description: Suggest new or updated features to include in Bootstrap.
|
||||
title: "Suggest a new feature"
|
||||
labels: [feature]
|
||||
assignees: []
|
||||
body:
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Prerequisites
|
||||
description: Take a couple minutes to help our maintainers work faster.
|
||||
options:
|
||||
- label: I have [searched](https://github.com/twbs/bootstrap/issues?utf8=%E2%9C%93&q=is%3Aissue) for duplicate or closed feature requests
|
||||
required: true
|
||||
- label: I have read the [contributing guidelines](https://github.com/twbs/bootstrap/blob/main/.github/CONTRIBUTING.md)
|
||||
required: true
|
||||
- type: textarea
|
||||
id: proposal
|
||||
attributes:
|
||||
label: Proposal
|
||||
description: Provide detailed information for what we should add, including relevant links to prior art, screenshots, or live demos whenever possible.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: motivation
|
||||
attributes:
|
||||
label: Motivation and context
|
||||
description: Tell us why this change is needed or helpful, and what problems it may help solve.
|
||||
validations:
|
||||
required: true
|
||||
@@ -0,0 +1,38 @@
|
||||
### Description
|
||||
|
||||
<!-- Describe your changes in detail -->
|
||||
|
||||
### Motivation & Context
|
||||
|
||||
<!-- Why is this change required? What problem does it solve? -->
|
||||
|
||||
### Type of changes
|
||||
|
||||
<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply. -->
|
||||
|
||||
- [ ] Bug fix (non-breaking change which fixes an issue)
|
||||
- [ ] New feature (non-breaking change which adds functionality)
|
||||
- [ ] Refactoring (non-breaking change)
|
||||
- [ ] Breaking change (fix or feature that would change existing functionality)
|
||||
|
||||
### Checklist
|
||||
|
||||
<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->
|
||||
<!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
|
||||
|
||||
- [ ] I have read the [contributing guidelines](https://github.com/twbs/bootstrap/blob/main/.github/CONTRIBUTING.md)
|
||||
- [ ] My code follows the code style of the project _(using `npm run lint`)_
|
||||
- [ ] My change introduces changes to the documentation
|
||||
- [ ] I have updated the documentation accordingly
|
||||
- [ ] I have added tests to cover my changes
|
||||
- [ ] All new and existing tests passed
|
||||
|
||||
#### Live previews
|
||||
|
||||
<!-- Please add direct links where your modifications can be seen in the documentation -->
|
||||
|
||||
* https://deploy-preview-{your pr number}--twbs-bootstrap.netlify.app/
|
||||
|
||||
### Related issues
|
||||
|
||||
<!-- Please link any related issues here. -->
|
||||
+2
-2
@@ -6,6 +6,6 @@ See the [contributing guidelines](CONTRIBUTING.md) for sharing bug reports.
|
||||
|
||||
For general troubleshooting or help getting started:
|
||||
|
||||
- Join [the official Slack room](https://bootstrap-slack.herokuapp.com/).
|
||||
- Chat with fellow Bootstrappers in IRC. On the `irc.freenode.net` server, in the `##bootstrap` channel.
|
||||
- Ask and explore [our GitHub Discussions](https://github.com/twbs/bootstrap/discussions).
|
||||
- Chat with fellow Bootstrappers in IRC. On the `irc.libera.chat` server, in the `#bootstrap` channel.
|
||||
- Ask and explore Stack Overflow with the [`bootstrap-5`](https://stackoverflow.com/questions/tagged/bootstrap-5) tag.
|
||||
|
||||
@@ -7,6 +7,9 @@ categories:
|
||||
- title: '❗ Breaking Changes'
|
||||
labels:
|
||||
- 'breaking-change'
|
||||
- title: '🚀 Highlights'
|
||||
labels:
|
||||
- 'release-highlight'
|
||||
- title: '🚀 Features'
|
||||
labels:
|
||||
- 'new-feature'
|
||||
@@ -17,7 +20,7 @@ categories:
|
||||
- 'fix'
|
||||
- 'bugfix'
|
||||
- 'bug'
|
||||
- title: '⚡ Performance Improvements'
|
||||
- title: '⚡ Performance improvements'
|
||||
labels:
|
||||
- 'performance'
|
||||
- title: '🎨 CSS'
|
||||
@@ -29,6 +32,9 @@ categories:
|
||||
- title: '📖 Docs'
|
||||
labels:
|
||||
- 'docs'
|
||||
- title: '🛠 Examples'
|
||||
labels:
|
||||
- 'examples'
|
||||
- title: '🌎 Accessibility'
|
||||
labels:
|
||||
- 'accessibility'
|
||||
|
||||
@@ -2,10 +2,11 @@ name: BrowserStack
|
||||
|
||||
on:
|
||||
push:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
FORCE_COLOR: 2
|
||||
NODE: 14
|
||||
NODE: 16
|
||||
|
||||
jobs:
|
||||
browserstack:
|
||||
@@ -15,20 +16,13 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v2
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: "${{ env.NODE }}"
|
||||
|
||||
- name: Set up npm cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-node-${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node-${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
|
||||
cache: npm
|
||||
|
||||
- name: Install npm dependencies
|
||||
run: npm ci
|
||||
@@ -41,3 +35,4 @@ jobs:
|
||||
env:
|
||||
BROWSER_STACK_ACCESS_KEY: "${{ secrets.BROWSER_STACK_ACCESS_KEY }}"
|
||||
BROWSER_STACK_USERNAME: "${{ secrets.BROWSER_STACK_USERNAME }}"
|
||||
GITHUB_SHA: "${{ github.sha }}"
|
||||
|
||||
@@ -2,11 +2,14 @@ name: Bundlewatch
|
||||
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- "dependabot/**"
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
FORCE_COLOR: 2
|
||||
NODE: 14
|
||||
NODE: 16
|
||||
|
||||
jobs:
|
||||
bundlewatch:
|
||||
@@ -14,20 +17,13 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v2
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: "${{ env.NODE }}"
|
||||
|
||||
- name: Set up npm cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-node-${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node-${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
|
||||
cache: npm
|
||||
|
||||
- name: Install npm dependencies
|
||||
run: npm ci
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
name: Compress Images
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- '**.jpg'
|
||||
- '**.jpeg'
|
||||
- '**.png'
|
||||
- '**.webp'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
# Only run on Pull Requests within the same repository, and not from forks.
|
||||
if: github.event.pull_request.head.repo.full_name == github.repository
|
||||
name: calibreapp/image-actions
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Repo
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Compress Images
|
||||
uses: calibreapp/image-actions@1.1.0
|
||||
with:
|
||||
githubToken: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -14,24 +14,25 @@ on:
|
||||
- "!dependabot/**"
|
||||
schedule:
|
||||
- cron: "0 2 * * 5"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
uses: github/codeql-action/init@v2
|
||||
with:
|
||||
languages: "javascript"
|
||||
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v1
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
uses: github/codeql-action/analyze@v2
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
name: cspell
|
||||
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- "dependabot/**"
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
FORCE_COLOR: 2
|
||||
NODE: 16
|
||||
|
||||
jobs:
|
||||
cspell:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Run cspell
|
||||
uses: streetsidesoftware/cspell-action@v2
|
||||
with:
|
||||
config: ".cspell.json"
|
||||
files: "**/*.md"
|
||||
inline: error
|
||||
incremental_files_only: false
|
||||
@@ -5,10 +5,11 @@ on:
|
||||
branches-ignore:
|
||||
- "dependabot/**"
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
FORCE_COLOR: 2
|
||||
NODE: 14
|
||||
NODE: 16
|
||||
|
||||
jobs:
|
||||
css:
|
||||
@@ -16,20 +17,13 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v2
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: "${{ env.NODE }}"
|
||||
|
||||
- name: Set up npm cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-node-${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node-${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
|
||||
cache: npm
|
||||
|
||||
- name: Install npm dependencies
|
||||
run: npm ci
|
||||
|
||||
+18
-13
@@ -5,10 +5,11 @@ on:
|
||||
branches-ignore:
|
||||
- "dependabot/**"
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
FORCE_COLOR: 2
|
||||
NODE: 14
|
||||
NODE: 16
|
||||
|
||||
jobs:
|
||||
docs:
|
||||
@@ -16,25 +17,29 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v2
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: "${{ env.NODE }}"
|
||||
cache: npm
|
||||
|
||||
- run: java -version
|
||||
|
||||
- name: Set up npm cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-node-${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node-${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
|
||||
|
||||
- name: Install npm dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Test docs
|
||||
run: npm run docs
|
||||
- name: Build docs
|
||||
run: npm run docs-build
|
||||
|
||||
- name: Validate HTML
|
||||
run: npm run docs-vnu
|
||||
|
||||
- name: Run linkinator
|
||||
uses: JustinBeckwith/linkinator-action@v1
|
||||
with:
|
||||
paths: _site
|
||||
recurse: true
|
||||
verbosity: error
|
||||
skip: "^(?!http://localhost)"
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
name: Close Issue Awaiting Reply
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 0 * * *"
|
||||
|
||||
jobs:
|
||||
issue-close-require:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'twbs/bootstrap'
|
||||
steps:
|
||||
- name: awaiting reply
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: "close-issues"
|
||||
labels: "awaiting-reply"
|
||||
inactive-day: 14
|
||||
body: |
|
||||
As the issue was labeled with `awaiting-reply`, but there has been no response in 14 days, this issue will be closed. If you have any questions, you can comment/reply.
|
||||
@@ -0,0 +1,19 @@
|
||||
name: Issue Labeled
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [labeled]
|
||||
|
||||
jobs:
|
||||
issue-labeled:
|
||||
if: github.repository == 'twbs/bootstrap'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: awaiting reply
|
||||
if: github.event.label.name == 'needs-example'
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: "create-comment"
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
body: |
|
||||
Hello @${{ github.event.issue.user.login }}. Bug reports must include a **live demo** of the issue. Per our [contributing guidelines](https://github.com/twbs/bootstrap/blob/main/.github/CONTRIBUTING.md), please create a reduced test case on [CodePen](https://codepen.io/) or [StackBlitz](https://stackblitz.com/) and report back with your link, Bootstrap version, and specific browser and Operating System details.
|
||||
@@ -5,36 +5,26 @@ on:
|
||||
branches-ignore:
|
||||
- "dependabot/**"
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
FORCE_COLOR: 2
|
||||
NODE: 16
|
||||
|
||||
jobs:
|
||||
run:
|
||||
name: Node ${{ matrix.node }}
|
||||
name: JS Tests
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
node: [10, 12, 14, 16]
|
||||
|
||||
steps:
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v2
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
|
||||
- name: Set up npm cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-node-${{ matrix.node }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node-${{ matrix.node }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
|
||||
node-version: ${{ env.NODE }}
|
||||
cache: npm
|
||||
|
||||
- name: Install npm dependencies
|
||||
run: npm ci
|
||||
@@ -46,8 +36,7 @@ jobs:
|
||||
run: npm run js-test
|
||||
|
||||
- name: Run Coveralls
|
||||
uses: coverallsapp/github-action@v1.1.2
|
||||
if: matrix.node == 14
|
||||
uses: coverallsapp/github-action@1.1.3
|
||||
with:
|
||||
github-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
path-to-lcov: "./js/coverage/lcov.info"
|
||||
|
||||
@@ -5,10 +5,11 @@ on:
|
||||
branches-ignore:
|
||||
- "dependabot/**"
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
FORCE_COLOR: 2
|
||||
NODE: 14
|
||||
NODE: 16
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
@@ -16,20 +17,13 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v2
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: "${{ env.NODE }}"
|
||||
|
||||
- name: Set up npm cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-node-${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node-${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
|
||||
cache: npm
|
||||
|
||||
- name: Install npm dependencies
|
||||
run: npm ci
|
||||
|
||||
@@ -5,10 +5,11 @@ on:
|
||||
branches-ignore:
|
||||
- "dependabot/**"
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
FORCE_COLOR: 2
|
||||
NODE: 14
|
||||
NODE: 16
|
||||
|
||||
jobs:
|
||||
css:
|
||||
@@ -16,10 +17,10 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v2
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: "${{ env.NODE }}"
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
update_release_draft:
|
||||
|
||||
+2
-1
@@ -1,7 +1,8 @@
|
||||
# Ignore docs files
|
||||
/_site/
|
||||
# Hugo resources folder
|
||||
# Hugo files
|
||||
/resources/
|
||||
/.hugo_build.lock
|
||||
|
||||
# Numerous always-ignore extensions
|
||||
*.diff
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"extends": [
|
||||
"stylelint-config-twbs-bootstrap/scss"
|
||||
"stylelint-config-twbs-bootstrap"
|
||||
],
|
||||
"rules": {
|
||||
"declaration-property-value-disallowed-list": {
|
||||
|
||||
+109
-20
@@ -2,42 +2,131 @@
|
||||
|
||||
## Our Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
||||
We as members, contributors, and leaders pledge to make participation in our
|
||||
community a harassment-free experience for everyone, regardless of age, body
|
||||
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
||||
identity and expression, level of experience, education, socio-economic status,
|
||||
nationality, personal appearance, race, caste, color, religion, or sexual
|
||||
identity and orientation.
|
||||
|
||||
We pledge to act and interact in ways that contribute to an open, welcoming,
|
||||
diverse, inclusive, and healthy community.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to creating a positive environment include:
|
||||
Examples of behavior that contributes to a positive environment for our
|
||||
community include:
|
||||
|
||||
- Using welcoming and inclusive language
|
||||
- Being respectful of differing viewpoints and experiences
|
||||
- Gracefully accepting constructive criticism
|
||||
- Focusing on what is best for the community
|
||||
- Showing empathy towards other community members
|
||||
* Demonstrating empathy and kindness toward other people
|
||||
* Being respectful of differing opinions, viewpoints, and experiences
|
||||
* Giving and gracefully accepting constructive feedback
|
||||
* Accepting responsibility and apologizing to those affected by our mistakes,
|
||||
and learning from the experience
|
||||
* Focusing on what is best not just for us as individuals, but for the overall
|
||||
community
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
Examples of unacceptable behavior include:
|
||||
|
||||
- The use of sexualized language or imagery and unwelcome sexual attention or advances
|
||||
- Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
- Public or private harassment
|
||||
- Publishing others' private information, such as a physical or electronic address, without explicit permission
|
||||
- Other conduct which could reasonably be considered inappropriate in a professional setting
|
||||
* The use of sexualized language or imagery, and sexual attention or advances of
|
||||
any kind
|
||||
* Trolling, insulting or derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or email address,
|
||||
without their explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
## Enforcement Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
|
||||
Community leaders are responsible for clarifying and enforcing our standards of
|
||||
acceptable behavior and will take appropriate and fair corrective action in
|
||||
response to any behavior that they deem inappropriate, threatening, offensive,
|
||||
or harmful.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
|
||||
Community leaders have the right and responsibility to remove, edit, or reject
|
||||
comments, commits, code, wiki edits, issues, and other contributions that are
|
||||
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
||||
decisions when appropriate.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
|
||||
This Code of Conduct applies within all community spaces, and also applies when
|
||||
an individual is officially representing the community in public spaces.
|
||||
Examples of representing our community include using an official e-mail address,
|
||||
posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at mdo@getbootstrap.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported to the community leaders responsible for enforcement at
|
||||
mdo@getbootstrap.com.
|
||||
All complaints will be reviewed and investigated promptly and fairly.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
|
||||
All community leaders are obligated to respect the privacy and security of the
|
||||
reporter of any incident.
|
||||
|
||||
## Enforcement Guidelines
|
||||
|
||||
Community leaders will follow these Community Impact Guidelines in determining
|
||||
the consequences for any action they deem in violation of this Code of Conduct:
|
||||
|
||||
### 1. Correction
|
||||
|
||||
**Community Impact**: Use of inappropriate language or other behavior deemed
|
||||
unprofessional or unwelcome in the community.
|
||||
|
||||
**Consequence**: A private, written warning from community leaders, providing
|
||||
clarity around the nature of the violation and an explanation of why the
|
||||
behavior was inappropriate. A public apology may be requested.
|
||||
|
||||
### 2. Warning
|
||||
|
||||
**Community Impact**: A violation through a single incident or series of
|
||||
actions.
|
||||
|
||||
**Consequence**: A warning with consequences for continued behavior. No
|
||||
interaction with the people involved, including unsolicited interaction with
|
||||
those enforcing the Code of Conduct, for a specified period of time. This
|
||||
includes avoiding interactions in community spaces as well as external channels
|
||||
like social media. Violating these terms may lead to a temporary or permanent
|
||||
ban.
|
||||
|
||||
### 3. Temporary Ban
|
||||
|
||||
**Community Impact**: A serious violation of community standards, including
|
||||
sustained inappropriate behavior.
|
||||
|
||||
**Consequence**: A temporary ban from any sort of interaction or public
|
||||
communication with the community for a specified period of time. No public or
|
||||
private interaction with the people involved, including unsolicited interaction
|
||||
with those enforcing the Code of Conduct, is allowed during this period.
|
||||
Violating these terms may lead to a permanent ban.
|
||||
|
||||
### 4. Permanent Ban
|
||||
|
||||
**Community Impact**: Demonstrating a pattern of violation of community
|
||||
standards, including sustained inappropriate behavior, harassment of an
|
||||
individual, or aggression toward or disparagement of classes of individuals.
|
||||
|
||||
**Consequence**: A permanent ban from any sort of public interaction within the
|
||||
community.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/), version 1.4, available at <https://www.contributor-covenant.org/version/1/4/code-of-conduct/>
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
||||
version 2.1, available at
|
||||
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
|
||||
|
||||
Community Impact Guidelines were inspired by
|
||||
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
|
||||
|
||||
For answers to common questions about this code of conduct, see the FAQ at
|
||||
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
|
||||
[https://www.contributor-covenant.org/translations][translations].
|
||||
|
||||
[homepage]: https://www.contributor-covenant.org
|
||||
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
|
||||
[Mozilla CoC]: https://github.com/mozilla/diversity
|
||||
[FAQ]: https://www.contributor-covenant.org/faq
|
||||
[translations]: https://www.contributor-covenant.org/translations
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2011-2021 Twitter, Inc.
|
||||
Copyright (c) 2011-2021 The Bootstrap Authors
|
||||
Copyright (c) 2011-2022 Twitter, Inc.
|
||||
Copyright (c) 2011-2022 The Bootstrap Authors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<p align="center">
|
||||
<a href="https://getbootstrap.com/">
|
||||
<img src="https://getbootstrap.com/docs/5.0/assets/brand/bootstrap-logo-shadow.png" alt="Bootstrap logo" width="200" height="165">
|
||||
<img src="https://getbootstrap.com/docs/5.2/assets/brand/bootstrap-logo-shadow.png" alt="Bootstrap logo" width="200" height="165">
|
||||
</a>
|
||||
</p>
|
||||
|
||||
@@ -9,12 +9,12 @@
|
||||
<p align="center">
|
||||
Sleek, intuitive, and powerful front-end framework for faster and easier web development.
|
||||
<br>
|
||||
<a href="https://getbootstrap.com/docs/5.0/"><strong>Explore Bootstrap docs »</strong></a>
|
||||
<a href="https://getbootstrap.com/docs/5.2/"><strong>Explore Bootstrap docs »</strong></a>
|
||||
<br>
|
||||
<br>
|
||||
<a href="https://github.com/twbs/bootstrap/issues/new?template=bug_report.md">Report bug</a>
|
||||
<a href="https://github.com/twbs/bootstrap/issues/new?assignees=-&labels=bug&template=bug_report.yml">Report bug</a>
|
||||
·
|
||||
<a href="https://github.com/twbs/bootstrap/issues/new?template=feature_request.md">Request feature</a>
|
||||
<a href="https://github.com/twbs/bootstrap/issues/new?assignees=&labels=feature&template=feature_request.yml">Request feature</a>
|
||||
·
|
||||
<a href="https://themes.getbootstrap.com/">Themes</a>
|
||||
·
|
||||
@@ -22,9 +22,9 @@
|
||||
</p>
|
||||
|
||||
|
||||
## Bootstrap 4
|
||||
## Bootstrap 5
|
||||
|
||||
Our default branch is for development of our upcoming Bootstrap 5 release. Head to the [`v4-dev` branch](https://github.com/twbs/bootstrap/tree/v4-dev) to view the readme, documentation, and source code for Bootstrap 4.
|
||||
Our default branch is for development of our Bootstrap 5 release. Head to the [`v4-dev` branch](https://github.com/twbs/bootstrap/tree/v4-dev) to view the readme, documentation, and source code for Bootstrap 4.
|
||||
|
||||
|
||||
## Table of contents
|
||||
@@ -46,27 +46,24 @@ Our default branch is for development of our upcoming Bootstrap 5 release. Head
|
||||
|
||||
Several quick start options are available:
|
||||
|
||||
- [Download the latest release](https://github.com/twbs/bootstrap/archive/v5.0.0.zip)
|
||||
- [Download the latest release](https://github.com/twbs/bootstrap/archive/v5.2.2.zip)
|
||||
- Clone the repo: `git clone https://github.com/twbs/bootstrap.git`
|
||||
- Install with [npm](https://www.npmjs.com/): `npm install bootstrap`
|
||||
- Install with [yarn](https://yarnpkg.com/): `yarn add bootstrap`
|
||||
- Install with [Composer](https://getcomposer.org/): `composer require twbs/bootstrap:5.0.0`
|
||||
- Install with [npm](https://www.npmjs.com/): `npm install bootstrap@v5.2.2`
|
||||
- Install with [yarn](https://yarnpkg.com/): `yarn add bootstrap@v5.2.2`
|
||||
- Install with [Composer](https://getcomposer.org/): `composer require twbs/bootstrap:5.2.2`
|
||||
- Install with [NuGet](https://www.nuget.org/): CSS: `Install-Package bootstrap` Sass: `Install-Package bootstrap.sass`
|
||||
|
||||
Read the [Getting started page](https://getbootstrap.com/docs/5.0/getting-started/introduction/) for information on the framework contents, templates and examples, and more.
|
||||
Read the [Getting started page](https://getbootstrap.com/docs/5.2/getting-started/introduction/) for information on the framework contents, templates, examples, and more.
|
||||
|
||||
|
||||
## Status
|
||||
|
||||
[](https://bootstrap-slack.herokuapp.com/)
|
||||
[](https://github.com/twbs/bootstrap/actions?query=workflow%3AJS+Tests+branch%3Amain)
|
||||
[](https://www.npmjs.com/package/bootstrap)
|
||||
[](https://rubygems.org/gems/bootstrap)
|
||||
[](https://atmospherejs.com/twbs/bootstrap)
|
||||
[](https://packagist.org/packages/twbs/bootstrap)
|
||||
[](https://www.nuget.org/packages/bootstrap/absoluteLatest)
|
||||
[](https://david-dm.org/twbs/bootstrap?type=peer)
|
||||
[](https://david-dm.org/twbs/bootstrap?type=dev)
|
||||
[](https://coveralls.io/github/twbs/bootstrap?branch=main)
|
||||
[](https://github.com/twbs/bootstrap/blob/main/dist/css/bootstrap.min.css)
|
||||
[](https://github.com/twbs/bootstrap/blob/main/dist/css/bootstrap.min.css)
|
||||
@@ -79,71 +76,75 @@ Read the [Getting started page](https://getbootstrap.com/docs/5.0/getting-starte
|
||||
|
||||
## What's included
|
||||
|
||||
Within the download you'll find the following directories and files, logically grouping common assets and providing both compiled and minified variations. You'll see something like this:
|
||||
Within the download you'll find the following directories and files, logically grouping common assets and providing both compiled and minified variations.
|
||||
|
||||
```text
|
||||
bootstrap/
|
||||
├── css/
|
||||
│ ├── bootstrap-grid.css
|
||||
│ ├── bootstrap-grid.css.map
|
||||
│ ├── bootstrap-grid.min.css
|
||||
│ ├── bootstrap-grid.min.css.map
|
||||
│ ├── bootstrap-grid.rtl.css
|
||||
│ ├── bootstrap-grid.rtl.css.map
|
||||
│ ├── bootstrap-grid.rtl.min.css
|
||||
│ ├── bootstrap-grid.rtl.min.css.map
|
||||
│ ├── bootstrap-reboot.css
|
||||
│ ├── bootstrap-reboot.css.map
|
||||
│ ├── bootstrap-reboot.min.css
|
||||
│ ├── bootstrap-reboot.min.css.map
|
||||
│ ├── bootstrap-reboot.rtl.css
|
||||
│ ├── bootstrap-reboot.rtl.css.map
|
||||
│ ├── bootstrap-reboot.rtl.min.css
|
||||
│ ├── bootstrap-reboot.rtl.min.css.map
|
||||
│ ├── bootstrap-utilities.css
|
||||
│ ├── bootstrap-utilities.css.map
|
||||
│ ├── bootstrap-utilities.min.css
|
||||
│ ├── bootstrap-utilities.min.css.map
|
||||
│ ├── bootstrap-utilities.rtl.css
|
||||
│ ├── bootstrap-utilities.rtl.css.map
|
||||
│ ├── bootstrap-utilities.rtl.min.css
|
||||
│ ├── bootstrap-utilities.rtl.min.css.map
|
||||
│ ├── bootstrap.css
|
||||
│ ├── bootstrap.css.map
|
||||
│ ├── bootstrap.min.css
|
||||
│ ├── bootstrap.min.css.map
|
||||
│ ├── bootstrap.rtl.css
|
||||
│ ├── bootstrap.rtl.css.map
|
||||
│ ├── bootstrap.rtl.min.css
|
||||
│ └── bootstrap.rtl.min.css.map
|
||||
└── js/
|
||||
├── bootstrap.bundle.js
|
||||
├── bootstrap.bundle.js.map
|
||||
├── bootstrap.bundle.min.js
|
||||
├── bootstrap.bundle.min.js.map
|
||||
├── bootstrap.esm.js
|
||||
├── bootstrap.esm.js.map
|
||||
├── bootstrap.esm.min.js
|
||||
├── bootstrap.esm.min.js.map
|
||||
├── bootstrap.js
|
||||
├── bootstrap.js.map
|
||||
├── bootstrap.min.js
|
||||
└── bootstrap.min.js.map
|
||||
```
|
||||
<details>
|
||||
<summary>Download contents</summary>
|
||||
|
||||
We provide compiled CSS and JS (`bootstrap.*`), as well as compiled and minified CSS and JS (`bootstrap.min.*`). [source maps](https://developers.google.com/web/tools/chrome-devtools/javascript/source-maps) (`bootstrap.*.map`) are available for use with certain browsers' developer tools. Bundled JS files (`bootstrap.bundle.js` and minified `bootstrap.bundle.min.js`) include [Popper](https://popper.js.org/).
|
||||
```text
|
||||
bootstrap/
|
||||
├── css/
|
||||
│ ├── bootstrap-grid.css
|
||||
│ ├── bootstrap-grid.css.map
|
||||
│ ├── bootstrap-grid.min.css
|
||||
│ ├── bootstrap-grid.min.css.map
|
||||
│ ├── bootstrap-grid.rtl.css
|
||||
│ ├── bootstrap-grid.rtl.css.map
|
||||
│ ├── bootstrap-grid.rtl.min.css
|
||||
│ ├── bootstrap-grid.rtl.min.css.map
|
||||
│ ├── bootstrap-reboot.css
|
||||
│ ├── bootstrap-reboot.css.map
|
||||
│ ├── bootstrap-reboot.min.css
|
||||
│ ├── bootstrap-reboot.min.css.map
|
||||
│ ├── bootstrap-reboot.rtl.css
|
||||
│ ├── bootstrap-reboot.rtl.css.map
|
||||
│ ├── bootstrap-reboot.rtl.min.css
|
||||
│ ├── bootstrap-reboot.rtl.min.css.map
|
||||
│ ├── bootstrap-utilities.css
|
||||
│ ├── bootstrap-utilities.css.map
|
||||
│ ├── bootstrap-utilities.min.css
|
||||
│ ├── bootstrap-utilities.min.css.map
|
||||
│ ├── bootstrap-utilities.rtl.css
|
||||
│ ├── bootstrap-utilities.rtl.css.map
|
||||
│ ├── bootstrap-utilities.rtl.min.css
|
||||
│ ├── bootstrap-utilities.rtl.min.css.map
|
||||
│ ├── bootstrap.css
|
||||
│ ├── bootstrap.css.map
|
||||
│ ├── bootstrap.min.css
|
||||
│ ├── bootstrap.min.css.map
|
||||
│ ├── bootstrap.rtl.css
|
||||
│ ├── bootstrap.rtl.css.map
|
||||
│ ├── bootstrap.rtl.min.css
|
||||
│ └── bootstrap.rtl.min.css.map
|
||||
└── js/
|
||||
├── bootstrap.bundle.js
|
||||
├── bootstrap.bundle.js.map
|
||||
├── bootstrap.bundle.min.js
|
||||
├── bootstrap.bundle.min.js.map
|
||||
├── bootstrap.esm.js
|
||||
├── bootstrap.esm.js.map
|
||||
├── bootstrap.esm.min.js
|
||||
├── bootstrap.esm.min.js.map
|
||||
├── bootstrap.js
|
||||
├── bootstrap.js.map
|
||||
├── bootstrap.min.js
|
||||
└── bootstrap.min.js.map
|
||||
```
|
||||
</details>
|
||||
|
||||
We provide compiled CSS and JS (`bootstrap.*`), as well as compiled and minified CSS and JS (`bootstrap.min.*`). [Source maps](https://developers.google.com/web/tools/chrome-devtools/javascript/source-maps) (`bootstrap.*.map`) are available for use with certain browsers' developer tools. Bundled JS files (`bootstrap.bundle.js` and minified `bootstrap.bundle.min.js`) include [Popper](https://popper.js.org/).
|
||||
|
||||
|
||||
## Bugs and feature requests
|
||||
|
||||
Have a bug or a feature request? Please first read the [issue guidelines](https://github.com/twbs/bootstrap/blob/main/.github/CONTRIBUTING.md#using-the-issue-tracker) and search for existing and closed issues. If your problem or idea is not addressed yet, [please open a new issue](https://github.com/twbs/bootstrap/issues/new).
|
||||
Have a bug or a feature request? Please first read the [issue guidelines](https://github.com/twbs/bootstrap/blob/main/.github/CONTRIBUTING.md#using-the-issue-tracker) and search for existing and closed issues. If your problem or idea is not addressed yet, [please open a new issue](https://github.com/twbs/bootstrap/issues/new/choose).
|
||||
|
||||
|
||||
## Documentation
|
||||
|
||||
Bootstrap's documentation, included in this repo in the root directory, is built with [Hugo](https://gohugo.io/) and publicly hosted on GitHub Pages at <https://getbootstrap.com/>. The docs may also be run locally.
|
||||
|
||||
Documentation search is powered by [Algolia's DocSearch](https://community.algolia.com/docsearch/). Working on our search? Be sure to set `debug: true` in `site/assets/js/search.js`.
|
||||
Documentation search is powered by [Algolia's DocSearch](https://docsearch.algolia.com/). Working on our search? Be sure to set `debug: true` in `site/assets/js/search.js`.
|
||||
|
||||
### Running documentation locally
|
||||
|
||||
@@ -176,8 +177,8 @@ Get updates on Bootstrap's development and chat with the project maintainers and
|
||||
|
||||
- Follow [@getbootstrap on Twitter](https://twitter.com/getbootstrap).
|
||||
- Read and subscribe to [The Official Bootstrap Blog](https://blog.getbootstrap.com/).
|
||||
- Join [the official Slack room](https://bootstrap-slack.herokuapp.com/).
|
||||
- Chat with fellow Bootstrappers in IRC. On the `irc.freenode.net` server, in the `##bootstrap` channel.
|
||||
- Ask and explore [our GitHub Discussions](https://github.com/twbs/bootstrap/discussions).
|
||||
- Chat with fellow Bootstrappers in IRC. On the `irc.libera.chat` server, in the `#bootstrap` channel.
|
||||
- Implementation help may be found at Stack Overflow (tagged [`bootstrap-5`](https://stackoverflow.com/questions/tagged/bootstrap-5)).
|
||||
- Developers should use the keyword `bootstrap` on packages which modify or add to the functionality of Bootstrap when distributing through [npm](https://www.npmjs.com/browse/keyword/bootstrap) or similar delivery mechanisms for maximum discoverability.
|
||||
|
||||
@@ -205,11 +206,17 @@ See [the Releases section of our GitHub project](https://github.com/twbs/bootstr
|
||||
## Thanks
|
||||
|
||||
<a href="https://www.browserstack.com/">
|
||||
<img src="https://live.browserstack.com/images/opensource/browserstack-logo.svg" alt="BrowserStack Logo" width="192" height="42">
|
||||
<img src="https://live.browserstack.com/images/opensource/browserstack-logo.svg" alt="BrowserStack" width="192" height="42">
|
||||
</a>
|
||||
|
||||
Thanks to [BrowserStack](https://www.browserstack.com/) for providing the infrastructure that allows us to test in real browsers!
|
||||
|
||||
<a href="https://www.netlify.com/">
|
||||
<img src="https://www.netlify.com/v3/img/components/full-logo-light.svg" alt="Netlify" width="147" height="40">
|
||||
</a>
|
||||
|
||||
Thanks to [Netlify](https://www.netlify.com/) for providing us with Deploy Previews!
|
||||
|
||||
|
||||
## Sponsors
|
||||
|
||||
@@ -236,4 +243,4 @@ Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com
|
||||
|
||||
## Copyright and license
|
||||
|
||||
Code and documentation copyright 2011–2021 the [Bootstrap Authors](https://github.com/twbs/bootstrap/graphs/contributors) and [Twitter, Inc.](https://twitter.com) Code released under the [MIT License](https://github.com/twbs/bootstrap/blob/main/LICENSE). Docs released under [Creative Commons](https://creativecommons.org/licenses/by/3.0/).
|
||||
Code and documentation copyright 2011–2022 the [Bootstrap Authors](https://github.com/twbs/bootstrap/graphs/contributors) and [Twitter, Inc.](https://twitter.com) Code released under the [MIT License](https://github.com/twbs/bootstrap/blob/main/LICENSE). Docs released under [Creative Commons](https://creativecommons.org/licenses/by/3.0/).
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
"extends": "../.eslintrc.json",
|
||||
"rules": {
|
||||
"no-console": "off",
|
||||
"strict": "error"
|
||||
"strict": "error",
|
||||
"unicorn/prefer-top-level-await": "off"
|
||||
}
|
||||
}
|
||||
|
||||
+70
-157
@@ -2,190 +2,103 @@
|
||||
|
||||
/*!
|
||||
* Script to build our plugins to use them separately.
|
||||
* Copyright 2020-2021 The Bootstrap Authors
|
||||
* Copyright 2020-2021 Twitter, Inc.
|
||||
* Copyright 2020-2022 The Bootstrap Authors
|
||||
* Copyright 2020-2022 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
|
||||
'use strict'
|
||||
|
||||
const path = require('path')
|
||||
const path = require('node:path')
|
||||
const rollup = require('rollup')
|
||||
const globby = require('globby')
|
||||
const { babel } = require('@rollup/plugin-babel')
|
||||
const banner = require('./banner.js')
|
||||
|
||||
const rootPath = path.resolve(__dirname, '../js/dist/')
|
||||
const plugins = [
|
||||
babel({
|
||||
// Only transpile our source code
|
||||
exclude: 'node_modules/**',
|
||||
// Include the helpers in each file, at most one copy of each
|
||||
babelHelpers: 'bundled'
|
||||
const sourcePath = path.resolve(__dirname, '../js/src/').replace(/\\/g, '/')
|
||||
const jsFiles = globby.sync(sourcePath + '/**/*.js')
|
||||
|
||||
// Array which holds the resolved plugins
|
||||
const resolvedPlugins = []
|
||||
|
||||
// Trims the "js" extension and uppercases => first letter, hyphens, backslashes & slashes
|
||||
const filenameToEntity = filename => filename.replace('.js', '')
|
||||
.replace(/(?:^|-|\/|\\)[a-z]/g, str => str.slice(-1).toUpperCase())
|
||||
|
||||
for (const file of jsFiles) {
|
||||
resolvedPlugins.push({
|
||||
src: file.replace('.js', ''),
|
||||
dist: file.replace('src', 'dist'),
|
||||
fileName: path.basename(file),
|
||||
className: filenameToEntity(path.basename(file))
|
||||
// safeClassName: filenameToEntity(path.relative(sourcePath, file))
|
||||
})
|
||||
]
|
||||
const bsPlugins = {
|
||||
Data: path.resolve(__dirname, '../js/src/dom/data.js'),
|
||||
EventHandler: path.resolve(__dirname, '../js/src/dom/event-handler.js'),
|
||||
Manipulator: path.resolve(__dirname, '../js/src/dom/manipulator.js'),
|
||||
SelectorEngine: path.resolve(__dirname, '../js/src/dom/selector-engine.js'),
|
||||
Alert: path.resolve(__dirname, '../js/src/alert.js'),
|
||||
Base: path.resolve(__dirname, '../js/src/base-component.js'),
|
||||
Button: path.resolve(__dirname, '../js/src/button.js'),
|
||||
Carousel: path.resolve(__dirname, '../js/src/carousel.js'),
|
||||
Collapse: path.resolve(__dirname, '../js/src/collapse.js'),
|
||||
Dropdown: path.resolve(__dirname, '../js/src/dropdown.js'),
|
||||
Modal: path.resolve(__dirname, '../js/src/modal.js'),
|
||||
Offcanvas: path.resolve(__dirname, '../js/src/offcanvas.js'),
|
||||
Popover: path.resolve(__dirname, '../js/src/popover.js'),
|
||||
ScrollSpy: path.resolve(__dirname, '../js/src/scrollspy.js'),
|
||||
Tab: path.resolve(__dirname, '../js/src/tab.js'),
|
||||
Toast: path.resolve(__dirname, '../js/src/toast.js'),
|
||||
Tooltip: path.resolve(__dirname, '../js/src/tooltip.js')
|
||||
}
|
||||
|
||||
const defaultPluginConfig = {
|
||||
external: [
|
||||
bsPlugins.Data,
|
||||
bsPlugins.Base,
|
||||
bsPlugins.EventHandler,
|
||||
bsPlugins.SelectorEngine
|
||||
],
|
||||
globals: {
|
||||
[bsPlugins.Data]: 'Data',
|
||||
[bsPlugins.Base]: 'Base',
|
||||
[bsPlugins.EventHandler]: 'EventHandler',
|
||||
[bsPlugins.SelectorEngine]: 'SelectorEngine'
|
||||
}
|
||||
}
|
||||
|
||||
const getConfigByPluginKey = pluginKey => {
|
||||
if (
|
||||
pluginKey === 'Data' ||
|
||||
pluginKey === 'Manipulator' ||
|
||||
pluginKey === 'EventHandler' ||
|
||||
pluginKey === 'SelectorEngine' ||
|
||||
pluginKey === 'Util' ||
|
||||
pluginKey === 'Sanitizer' ||
|
||||
pluginKey === 'Backdrop'
|
||||
) {
|
||||
return {
|
||||
external: []
|
||||
}
|
||||
}
|
||||
|
||||
if (pluginKey === 'Alert' || pluginKey === 'Tab' || pluginKey === 'Offcanvas') {
|
||||
return defaultPluginConfig
|
||||
}
|
||||
|
||||
if (
|
||||
pluginKey === 'Base' ||
|
||||
pluginKey === 'Button' ||
|
||||
pluginKey === 'Carousel' ||
|
||||
pluginKey === 'Collapse' ||
|
||||
pluginKey === 'Modal' ||
|
||||
pluginKey === 'ScrollSpy'
|
||||
) {
|
||||
const config = Object.assign(defaultPluginConfig)
|
||||
config.external.push(bsPlugins.Manipulator)
|
||||
config.globals[bsPlugins.Manipulator] = 'Manipulator'
|
||||
return config
|
||||
}
|
||||
|
||||
if (pluginKey === 'Dropdown' || pluginKey === 'Tooltip') {
|
||||
const config = Object.assign(defaultPluginConfig)
|
||||
config.external.push(bsPlugins.Manipulator, '@popperjs/core')
|
||||
config.globals[bsPlugins.Manipulator] = 'Manipulator'
|
||||
config.globals['@popperjs/core'] = 'Popper'
|
||||
return config
|
||||
}
|
||||
|
||||
if (pluginKey === 'Popover') {
|
||||
return {
|
||||
external: [
|
||||
bsPlugins.Data,
|
||||
bsPlugins.SelectorEngine,
|
||||
bsPlugins.Tooltip
|
||||
],
|
||||
globals: {
|
||||
[bsPlugins.Data]: 'Data',
|
||||
[bsPlugins.SelectorEngine]: 'SelectorEngine',
|
||||
[bsPlugins.Tooltip]: 'Tooltip'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (pluginKey === 'Toast') {
|
||||
return {
|
||||
external: [
|
||||
bsPlugins.Data,
|
||||
bsPlugins.Base,
|
||||
bsPlugins.EventHandler,
|
||||
bsPlugins.Manipulator
|
||||
],
|
||||
globals: {
|
||||
[bsPlugins.Data]: 'Data',
|
||||
[bsPlugins.Base]: 'Base',
|
||||
[bsPlugins.EventHandler]: 'EventHandler',
|
||||
[bsPlugins.Manipulator]: 'Manipulator'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const utilObjects = new Set([
|
||||
'Util',
|
||||
'Sanitizer',
|
||||
'Backdrop'
|
||||
])
|
||||
|
||||
const domObjects = new Set([
|
||||
'Data',
|
||||
'EventHandler',
|
||||
'Manipulator',
|
||||
'SelectorEngine'
|
||||
])
|
||||
|
||||
const build = async plugin => {
|
||||
console.log(`Building ${plugin} plugin...`)
|
||||
|
||||
const { external, globals } = getConfigByPluginKey(plugin)
|
||||
const pluginFilename = path.basename(bsPlugins[plugin])
|
||||
let pluginPath = rootPath
|
||||
|
||||
if (utilObjects.has(plugin)) {
|
||||
pluginPath = `${rootPath}/util/`
|
||||
}
|
||||
|
||||
if (domObjects.has(plugin)) {
|
||||
pluginPath = `${rootPath}/dom/`
|
||||
}
|
||||
const globals = {}
|
||||
|
||||
const bundle = await rollup.rollup({
|
||||
input: bsPlugins[plugin],
|
||||
plugins,
|
||||
external
|
||||
input: plugin.src,
|
||||
plugins: [
|
||||
babel({
|
||||
// Only transpile our source code
|
||||
exclude: 'node_modules/**',
|
||||
// Include the helpers in each file, at most one copy of each
|
||||
babelHelpers: 'bundled'
|
||||
})
|
||||
],
|
||||
external(source) {
|
||||
// Pattern to identify local files
|
||||
const pattern = /^(\.{1,2})\//
|
||||
|
||||
// It's not a local file, e.g a Node.js package
|
||||
if (!pattern.test(source)) {
|
||||
globals[source] = source
|
||||
return true
|
||||
}
|
||||
|
||||
const usedPlugin = resolvedPlugins.find(plugin => {
|
||||
return plugin.src.includes(source.replace(pattern, ''))
|
||||
})
|
||||
|
||||
if (!usedPlugin) {
|
||||
throw new Error(`Source ${source} is not mapped!`)
|
||||
}
|
||||
|
||||
// We can change `Index` with `UtilIndex` etc if we use
|
||||
// `safeClassName` instead of `className` everywhere
|
||||
globals[path.normalize(usedPlugin.src)] = usedPlugin.className
|
||||
return true
|
||||
}
|
||||
})
|
||||
|
||||
await bundle.write({
|
||||
banner: banner(pluginFilename),
|
||||
banner: banner(plugin.fileName),
|
||||
format: 'umd',
|
||||
name: plugin,
|
||||
name: plugin.className,
|
||||
sourcemap: true,
|
||||
globals,
|
||||
file: path.resolve(__dirname, `${pluginPath}/${pluginFilename}`)
|
||||
generatedCode: 'es2015',
|
||||
file: plugin.dist
|
||||
})
|
||||
|
||||
console.log(`Building ${plugin} plugin... Done!`)
|
||||
console.log(`Built ${plugin.className}`)
|
||||
}
|
||||
|
||||
const main = async () => {
|
||||
(async () => {
|
||||
try {
|
||||
await Promise.all(Object.keys(bsPlugins).map(plugin => build(plugin)))
|
||||
const basename = path.basename(__filename)
|
||||
const timeLabel = `[${basename}] finished`
|
||||
|
||||
console.log('Building individual plugins...')
|
||||
console.time(timeLabel)
|
||||
|
||||
await Promise.all(Object.values(resolvedPlugins).map(plugin => build(plugin)))
|
||||
|
||||
console.timeEnd(timeLabel)
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
|
||||
process.exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
main()
|
||||
})()
|
||||
|
||||
@@ -2,15 +2,15 @@
|
||||
|
||||
/*!
|
||||
* Script to update version number references in the project.
|
||||
* Copyright 2017-2021 The Bootstrap Authors
|
||||
* Copyright 2017-2021 Twitter, Inc.
|
||||
* Copyright 2017-2022 The Bootstrap Authors
|
||||
* Copyright 2017-2022 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
|
||||
'use strict'
|
||||
|
||||
const fs = require('fs').promises
|
||||
const path = require('path')
|
||||
const fs = require('node:fs').promises
|
||||
const path = require('node:path')
|
||||
const globby = require('globby')
|
||||
|
||||
const VERBOSE = process.argv.includes('--verbose')
|
||||
@@ -57,7 +57,7 @@ async function replaceRecursively(file, oldVersion, newVersion) {
|
||||
}
|
||||
|
||||
async function main(args) {
|
||||
const [oldVersion, newVersion] = args
|
||||
let [oldVersion, newVersion] = args
|
||||
|
||||
if (!oldVersion || !newVersion) {
|
||||
console.error('USAGE: change-version old_version new_version [--verbose] [--dry[-run]]')
|
||||
@@ -66,7 +66,7 @@ async function main(args) {
|
||||
}
|
||||
|
||||
// Strip any leading `v` from arguments because otherwise we will end up with duplicate `v`s
|
||||
[oldVersion, newVersion].map(arg => arg.startsWith('v') ? arg.slice(1) : arg)
|
||||
[oldVersion, newVersion] = [oldVersion, newVersion].map(arg => arg.startsWith('v') ? arg.slice(1) : arg)
|
||||
|
||||
try {
|
||||
const files = await globby(GLOB, GLOBBY_OPTIONS)
|
||||
|
||||
+10
-10
@@ -5,16 +5,16 @@
|
||||
* Remember to use the same vendor files as the CDN ones,
|
||||
* otherwise the hashes won't match!
|
||||
*
|
||||
* Copyright 2017-2021 The Bootstrap Authors
|
||||
* Copyright 2017-2021 Twitter, Inc.
|
||||
* Copyright 2017-2022 The Bootstrap Authors
|
||||
* Copyright 2017-2022 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
|
||||
'use strict'
|
||||
|
||||
const crypto = require('crypto')
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
const crypto = require('node:crypto')
|
||||
const fs = require('node:fs')
|
||||
const path = require('node:path')
|
||||
const sh = require('shelljs')
|
||||
|
||||
sh.config.fatal = true
|
||||
@@ -47,10 +47,10 @@ const files = [
|
||||
}
|
||||
]
|
||||
|
||||
files.forEach(file => {
|
||||
fs.readFile(file.file, 'utf8', (err, data) => {
|
||||
if (err) {
|
||||
throw err
|
||||
for (const file of files) {
|
||||
fs.readFile(file.file, 'utf8', (error, data) => {
|
||||
if (error) {
|
||||
throw error
|
||||
}
|
||||
|
||||
const algo = 'sha384'
|
||||
@@ -61,4 +61,4 @@ files.forEach(file => {
|
||||
|
||||
sh.sed('-i', new RegExp(`^(\\s+${file.configPropertyName}:\\s+["'])\\S*(["'])`), `$1${integrity}$2`, configFile)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
'use strict'
|
||||
|
||||
module.exports = ctx => {
|
||||
const mapConfig = {
|
||||
inline: false,
|
||||
annotation: true,
|
||||
sourcesContent: true
|
||||
}
|
||||
|
||||
module.exports = context => {
|
||||
return {
|
||||
map: ctx.file.dirname.includes('examples') ?
|
||||
false :
|
||||
{
|
||||
inline: false,
|
||||
annotation: true,
|
||||
sourcesContent: true
|
||||
},
|
||||
map: context.file.dirname.includes('examples') ? false : mapConfig,
|
||||
plugins: {
|
||||
autoprefixer: {
|
||||
cascade: false
|
||||
},
|
||||
rtlcss: ctx.env === 'RTL' ? {} : false
|
||||
rtlcss: context.env === 'RTL'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
'use strict'
|
||||
|
||||
const path = require('path')
|
||||
const path = require('node:path')
|
||||
const { babel } = require('@rollup/plugin-babel')
|
||||
const { nodeResolve } = require('@rollup/plugin-node-resolve')
|
||||
const replace = require('@rollup/plugin-replace')
|
||||
@@ -9,7 +9,7 @@ const banner = require('./banner.js')
|
||||
const BUNDLE = process.env.BUNDLE === 'true'
|
||||
const ESM = process.env.ESM === 'true'
|
||||
|
||||
let fileDest = `bootstrap${ESM ? '.esm' : ''}`
|
||||
let fileDestination = `bootstrap${ESM ? '.esm' : ''}`
|
||||
const external = ['@popperjs/core']
|
||||
const plugins = [
|
||||
babel({
|
||||
@@ -24,7 +24,7 @@ const globals = {
|
||||
}
|
||||
|
||||
if (BUNDLE) {
|
||||
fileDest += '.bundle'
|
||||
fileDestination += '.bundle'
|
||||
// Remove last entry in external array to bundle Popper
|
||||
external.pop()
|
||||
delete globals['@popperjs/core']
|
||||
@@ -41,9 +41,10 @@ const rollupConfig = {
|
||||
input: path.resolve(__dirname, `../js/index.${ESM ? 'esm' : 'umd'}.js`),
|
||||
output: {
|
||||
banner,
|
||||
file: path.resolve(__dirname, `../dist/js/${fileDest}.js`),
|
||||
file: path.resolve(__dirname, `../dist/js/${fileDestination}.js`),
|
||||
format: ESM ? 'esm' : 'umd',
|
||||
globals
|
||||
globals,
|
||||
generatedCode: 'es2015'
|
||||
},
|
||||
external,
|
||||
plugins
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
# Usage:
|
||||
# install svgo globally: `npm i -g svgo`
|
||||
# svgo --config=build/svgo.yml --input=foo.svg
|
||||
|
||||
# https://github.com/svg/svgo/blob/master/docs/how-it-works/en.md
|
||||
# replace default config
|
||||
|
||||
multipass: true
|
||||
#full: true
|
||||
|
||||
# https://github.com/svg/svgo/blob/master/lib/svgo/js2svg.js#L6 for more config options
|
||||
|
||||
js2svg:
|
||||
pretty: true
|
||||
indent: 2
|
||||
|
||||
plugins:
|
||||
# - addAttributesToSVGElement:
|
||||
# attributes:
|
||||
# - focusable: false
|
||||
- cleanupAttrs: true
|
||||
- cleanupEnableBackground: true
|
||||
- cleanupIDs: true
|
||||
- cleanupListOfValues: true
|
||||
- cleanupNumericValues: true
|
||||
- collapseGroups: true
|
||||
- convertColors: true
|
||||
- convertPathData: true
|
||||
- convertShapeToPath: true
|
||||
- convertStyleToAttrs: true
|
||||
- convertTransform: true
|
||||
- inlineStyles: true
|
||||
- mergePaths: true
|
||||
- minifyStyles: true
|
||||
- moveElemsAttrsToGroup: true
|
||||
- moveGroupAttrsToElems: true
|
||||
- removeAttrs:
|
||||
attrs:
|
||||
- "data-name"
|
||||
- removeComments: true
|
||||
- removeDesc: true
|
||||
- removeDoctype: true
|
||||
- removeEditorsNSData: true
|
||||
- removeEmptyAttrs: true
|
||||
- removeEmptyContainers: true
|
||||
- removeEmptyText: true
|
||||
- removeHiddenElems: true
|
||||
- removeMetadata: true
|
||||
- removeNonInheritableGroupAttrs: true
|
||||
- removeTitle: false
|
||||
- removeUnknownsAndDefaults:
|
||||
keepRoleAttr: true
|
||||
- removeUnusedNS: true
|
||||
- removeUselessDefs: true
|
||||
- removeUselessStrokeAndFill: true
|
||||
- removeViewBox: false
|
||||
- removeXMLNS: false
|
||||
- removeXMLProcInst: true
|
||||
- sortAttrs: true
|
||||
+10
-19
@@ -2,17 +2,17 @@
|
||||
|
||||
/*!
|
||||
* Script to run vnu-jar if Java is available.
|
||||
* Copyright 2017-2021 The Bootstrap Authors
|
||||
* Copyright 2017-2021 Twitter, Inc.
|
||||
* Copyright 2017-2022 The Bootstrap Authors
|
||||
* Copyright 2017-2022 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
|
||||
'use strict'
|
||||
|
||||
const childProcess = require('child_process')
|
||||
const { execFile, spawn } = require('node:child_process')
|
||||
const vnu = require('vnu-jar')
|
||||
|
||||
childProcess.exec('java -version', (error, stdout, stderr) => {
|
||||
execFile('java', ['-version'], (error, stdout, stderr) => {
|
||||
if (error) {
|
||||
console.error('Skipping vnu-jar test; Java is missing.')
|
||||
return
|
||||
@@ -21,23 +21,16 @@ childProcess.exec('java -version', (error, stdout, stderr) => {
|
||||
const is32bitJava = !/64-Bit/.test(stderr)
|
||||
|
||||
// vnu-jar accepts multiple ignores joined with a `|`.
|
||||
// Also note that the ignores are regular expressions.
|
||||
// Also note that the ignores are string regular expressions.
|
||||
const ignores = [
|
||||
// "autocomplete" is included in <button> and checkboxes and radio <input>s due to
|
||||
// Firefox's non-standard autocomplete behavior - see https://bugzilla.mozilla.org/show_bug.cgi?id=654072
|
||||
'Attribute “autocomplete” is only allowed when the input type is.*',
|
||||
'Attribute “autocomplete” not allowed on element “button” at this point.',
|
||||
// Markup used in Components → Forms → Layout → Form grid → Horizontal form is currently invalid,
|
||||
// but used this way due to lack of support for flexbox layout on <fieldset> element in most browsers
|
||||
'Element “legend” not allowed as child of element “div” in this context.*',
|
||||
// Content → Reboot uses various date/time inputs as a visual example.
|
||||
// Documentation does not rely on them being usable.
|
||||
'The “date” input type is not supported in all browsers.*',
|
||||
'The “week” input type is not supported in all browsers.*',
|
||||
'The “month” input type is not supported in all browsers.*',
|
||||
'The “color” input type is not supported in all browsers.*',
|
||||
'The “datetime-local” input type is not supported in all browsers.*',
|
||||
'The “time” input type is not supported in all browsers.*'
|
||||
// Per https://www.w3.org/TR/html-aria/#docconformance having "aria-disabled" on a link is
|
||||
// NOT RECOMMENDED, but it's still valid - we explain in the docs that it's not ideal,
|
||||
// and offer more robust alternatives, but also need to show a less-than-ideal example
|
||||
'An “aria-disabled” attribute whose value is “true” should not be specified on an “a” element that has an “href” attribute.'
|
||||
].join('|')
|
||||
|
||||
const args = [
|
||||
@@ -45,8 +38,6 @@ childProcess.exec('java -version', (error, stdout, stderr) => {
|
||||
`"${vnu}"`,
|
||||
'--asciiquotes',
|
||||
'--skip-non-html',
|
||||
// Ignore the language code warnings
|
||||
'--no-langdetect',
|
||||
'--Werror',
|
||||
`--filterpattern "${ignores}"`,
|
||||
'_site/',
|
||||
@@ -58,7 +49,7 @@ childProcess.exec('java -version', (error, stdout, stderr) => {
|
||||
args.splice(0, 0, '-Xss512k')
|
||||
}
|
||||
|
||||
return childProcess.spawn('java', args, {
|
||||
return spawn('java', args, {
|
||||
shell: true,
|
||||
stdio: 'inherit'
|
||||
})
|
||||
|
||||
+10
-10
@@ -3,13 +3,13 @@
|
||||
/*!
|
||||
* Script to create the built examples zip archive;
|
||||
* requires the `zip` command to be present!
|
||||
* Copyright 2020-2021 The Bootstrap Authors
|
||||
* Copyright 2020-2022 The Bootstrap Authors
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
|
||||
'use strict'
|
||||
|
||||
const path = require('path')
|
||||
const path = require('node:path')
|
||||
const sh = require('shelljs')
|
||||
|
||||
const pkg = require('../package.json')
|
||||
@@ -57,22 +57,22 @@ sh.mkdir('-p', [
|
||||
|
||||
sh.cp('-Rf', `${docsDir}/examples/*`, distFolder)
|
||||
|
||||
cssFiles.forEach(file => {
|
||||
for (const file of cssFiles) {
|
||||
sh.cp('-f', `${docsDir}/dist/css/${file}`, `${distFolder}/assets/dist/css/`)
|
||||
})
|
||||
}
|
||||
|
||||
jsFiles.forEach(file => {
|
||||
for (const file of jsFiles) {
|
||||
sh.cp('-f', `${docsDir}/dist/js/${file}`, `${distFolder}/assets/dist/js/`)
|
||||
})
|
||||
}
|
||||
|
||||
imgFiles.forEach(file => {
|
||||
for (const file of imgFiles) {
|
||||
sh.cp('-f', `${docsDir}/assets/brand/${file}`, `${distFolder}/assets/brand/`)
|
||||
})
|
||||
}
|
||||
|
||||
sh.rm(`${distFolder}/index.html`)
|
||||
|
||||
// get all examples' HTML files
|
||||
sh.find(`${distFolder}/**/*.html`).forEach(file => {
|
||||
for (const file of sh.find(`${distFolder}/**/*.html`)) {
|
||||
const fileContents = sh.cat(file)
|
||||
.toString()
|
||||
.replace(new RegExp(`"/docs/${versionShort}/`, 'g'), '"../')
|
||||
@@ -81,7 +81,7 @@ sh.find(`${distFolder}/**/*.html`).forEach(file => {
|
||||
.replace(/(<script src="\.\.\/.*) integrity=".*>/g, '$1></script>')
|
||||
.replace(/( +)<!-- favicons(.|\n)+<style>/i, ' <style>')
|
||||
new sh.ShellString(fileContents).to(file)
|
||||
})
|
||||
}
|
||||
|
||||
// create the zip file
|
||||
sh.exec(`zip -r9 "${distFolder}.zip" "${distFolder}"`)
|
||||
|
||||
+35
-26
@@ -1,7 +1,13 @@
|
||||
languageCode: "en"
|
||||
title: "Bootstrap"
|
||||
baseURL: "https://getbootstrap.com"
|
||||
enableInlineShortcodes: true
|
||||
|
||||
security:
|
||||
enableInlineShortcodes: true
|
||||
funcs:
|
||||
getenv:
|
||||
- ^HUGO_
|
||||
- NETLIFY
|
||||
|
||||
markup:
|
||||
goldmark:
|
||||
@@ -18,14 +24,14 @@ buildFuture: true
|
||||
|
||||
enableRobotsTXT: true
|
||||
metaDataFormat: "yaml"
|
||||
disableKinds: ["404", "taxonomy", "taxonomyTerm", "RSS"]
|
||||
disableKinds: ["404", "taxonomy", "term", "RSS"]
|
||||
|
||||
publishDir: "_site"
|
||||
|
||||
module:
|
||||
mounts:
|
||||
- source: dist
|
||||
target: static/docs/5.0/dist
|
||||
target: static/docs/5.2/dist
|
||||
- source: site/assets
|
||||
target: assets
|
||||
- source: site/content
|
||||
@@ -36,44 +42,47 @@ module:
|
||||
target: layouts
|
||||
- source: site/static
|
||||
target: static
|
||||
- source: site/static/docs/5.0/assets/img/favicons/apple-touch-icon.png
|
||||
- source: site/static/docs/5.2/assets/img/favicons/apple-touch-icon.png
|
||||
target: static/apple-touch-icon.png
|
||||
- source: site/static/docs/5.0/assets/img/favicons/favicon.ico
|
||||
- source: site/static/docs/5.2/assets/img/favicons/favicon.ico
|
||||
target: static/favicon.ico
|
||||
|
||||
params:
|
||||
description: "The most popular HTML, CSS, and JS library in the world."
|
||||
subtitle: "The most popular HTML, CSS, and JS library in the world."
|
||||
description: "Powerful, extensible, and feature-packed frontend toolkit. Build and customize with Sass, utilize prebuilt grid system and components, and bring projects to life with powerful JavaScript plugins."
|
||||
authors: "Mark Otto, Jacob Thornton, and Bootstrap contributors"
|
||||
social_image_path: /docs/5.0/assets/brand/bootstrap-social.png
|
||||
social_logo_path: /docs/5.0/assets/brand/bootstrap-social-logo.png
|
||||
|
||||
current_version: "5.0.0"
|
||||
current_ruby_version: "5.0.0"
|
||||
docs_version: "5.0"
|
||||
rfs_version: "9.0.3"
|
||||
current_version: "5.2.2"
|
||||
current_ruby_version: "5.2.2"
|
||||
docs_version: "5.2"
|
||||
rfs_version: "v9.0.6"
|
||||
github_org: "https://github.com/twbs"
|
||||
repo: "https://github.com/twbs/bootstrap"
|
||||
twitter: "getbootstrap"
|
||||
slack: "https://bootstrap-slack.herokuapp.com/"
|
||||
opencollective: "https://opencollective.com/bootstrap"
|
||||
blog: "https://blog.getbootstrap.com/"
|
||||
themes: "https://themes.getbootstrap.com/"
|
||||
icons: "https://icons.getbootstrap.com/"
|
||||
swag: "https://cottonbureau.com/people/bootstrap"
|
||||
|
||||
download:
|
||||
source: "https://github.com/twbs/bootstrap/archive/v5.0.0.zip"
|
||||
dist: "https://github.com/twbs/bootstrap/releases/download/v5.0.0/bootstrap-5.0.0-dist.zip"
|
||||
dist_examples: "https://github.com/twbs/bootstrap/releases/download/v5.0.0/bootstrap-5.0.0-examples.zip"
|
||||
source: "https://github.com/twbs/bootstrap/archive/v5.2.2.zip"
|
||||
dist: "https://github.com/twbs/bootstrap/releases/download/v5.2.2/bootstrap-5.2.2-dist.zip"
|
||||
dist_examples: "https://github.com/twbs/bootstrap/releases/download/v5.2.2/bootstrap-5.2.2-examples.zip"
|
||||
|
||||
cdn:
|
||||
# See https://www.srihash.org for info on how to generate the hashes
|
||||
css: "https://cdn.jsdelivr.net/npm/bootstrap@5.0.0/dist/css/bootstrap.min.css"
|
||||
css_hash: "sha384-wEmeIV1mKuiNpC+IOBjI7aAzPcEZeedi5yW5f2yOq55WWLwNGmvvx4Um1vskeMj0"
|
||||
css_rtl: "https://cdn.jsdelivr.net/npm/bootstrap@5.0.0/dist/css/bootstrap.rtl.min.css"
|
||||
css_rtl_hash: "sha384-jHiSqEim4+W1UCvv8kTcMbtCZlRF8MxbgKdfpvncia8gdN1UImBnhTpKtufREzv7"
|
||||
js: "https://cdn.jsdelivr.net/npm/bootstrap@5.0.0/dist/js/bootstrap.min.js"
|
||||
js_hash: "sha384-lpyLfhYuitXl2zRZ5Bn2fqnhNAKOAaM/0Kr9laMspuaMiZfGmfwRNFh8HlMy49eQ"
|
||||
js_bundle: "https://cdn.jsdelivr.net/npm/bootstrap@5.0.0/dist/js/bootstrap.bundle.min.js"
|
||||
js_bundle_hash: "sha384-p34f1UUtsS3wqzfto5wAAmdvj+osOnFyQFpp4Ua3gs/ZVWx6oOypYoCJhGGScy+8"
|
||||
popper: "https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js"
|
||||
popper_hash: "sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p"
|
||||
css: "https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/css/bootstrap.min.css"
|
||||
css_hash: "sha384-Zenh87qX5JnK2Jl0vWa8Ck2rdkQ2Bzep5IDxbcnCeuOxjzrPF/et3URy9Bv1WTRi"
|
||||
css_rtl: "https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/css/bootstrap.rtl.min.css"
|
||||
css_rtl_hash: "sha384-7mQhpDl5nRA5nY9lr8F1st2NbIly/8WqhjTp+0oFxEA/QUuvlbF6M1KXezGBh3Nb"
|
||||
js: "https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/js/bootstrap.min.js"
|
||||
js_hash: "sha384-IDwe1+LCz02ROU9k972gdyvl+AESN10+x7tBKgc9I5HFtuNz0wWnPclzo6p9vxnk"
|
||||
js_bundle: "https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/js/bootstrap.bundle.min.js"
|
||||
js_bundle_hash: "sha384-OERcA2EqjJCMA+/3y+gxIOqMEjwtxJY7qPCqsdltbNJuaOe923+mo//f6V8Qbsw3"
|
||||
popper: "https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.6/dist/umd/popper.min.js"
|
||||
popper_hash: "sha384-oBqDVmMz9ATKxIep9tiCxS/Z9fNfEXiDAYTujMAeBAsjFuCZSmKbSSUnQlmh/jp3"
|
||||
|
||||
anchors:
|
||||
min: 2
|
||||
max: 5
|
||||
|
||||
Vendored
+177
-1050
File diff suppressed because it is too large
Load Diff
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+4
-4
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+177
-1050
File diff suppressed because it is too large
Load Diff
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+4
-4
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+96
-34
@@ -1,10 +1,78 @@
|
||||
/*!
|
||||
* Bootstrap Reboot v5.0.0 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2021 The Bootstrap Authors
|
||||
* Copyright 2011-2021 Twitter, Inc.
|
||||
* Bootstrap Reboot v5.2.2 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2022 The Bootstrap Authors
|
||||
* Copyright 2011-2022 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
|
||||
*/
|
||||
:root {
|
||||
--bs-blue: #0d6efd;
|
||||
--bs-indigo: #6610f2;
|
||||
--bs-purple: #6f42c1;
|
||||
--bs-pink: #d63384;
|
||||
--bs-red: #dc3545;
|
||||
--bs-orange: #fd7e14;
|
||||
--bs-yellow: #ffc107;
|
||||
--bs-green: #198754;
|
||||
--bs-teal: #20c997;
|
||||
--bs-cyan: #0dcaf0;
|
||||
--bs-black: #000;
|
||||
--bs-white: #fff;
|
||||
--bs-gray: #6c757d;
|
||||
--bs-gray-dark: #343a40;
|
||||
--bs-gray-100: #f8f9fa;
|
||||
--bs-gray-200: #e9ecef;
|
||||
--bs-gray-300: #dee2e6;
|
||||
--bs-gray-400: #ced4da;
|
||||
--bs-gray-500: #adb5bd;
|
||||
--bs-gray-600: #6c757d;
|
||||
--bs-gray-700: #495057;
|
||||
--bs-gray-800: #343a40;
|
||||
--bs-gray-900: #212529;
|
||||
--bs-primary: #0d6efd;
|
||||
--bs-secondary: #6c757d;
|
||||
--bs-success: #198754;
|
||||
--bs-info: #0dcaf0;
|
||||
--bs-warning: #ffc107;
|
||||
--bs-danger: #dc3545;
|
||||
--bs-light: #f8f9fa;
|
||||
--bs-dark: #212529;
|
||||
--bs-primary-rgb: 13, 110, 253;
|
||||
--bs-secondary-rgb: 108, 117, 125;
|
||||
--bs-success-rgb: 25, 135, 84;
|
||||
--bs-info-rgb: 13, 202, 240;
|
||||
--bs-warning-rgb: 255, 193, 7;
|
||||
--bs-danger-rgb: 220, 53, 69;
|
||||
--bs-light-rgb: 248, 249, 250;
|
||||
--bs-dark-rgb: 33, 37, 41;
|
||||
--bs-white-rgb: 255, 255, 255;
|
||||
--bs-black-rgb: 0, 0, 0;
|
||||
--bs-body-color-rgb: 33, 37, 41;
|
||||
--bs-body-bg-rgb: 255, 255, 255;
|
||||
--bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||
--bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
||||
--bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
|
||||
--bs-body-font-family: var(--bs-font-sans-serif);
|
||||
--bs-body-font-size: 1rem;
|
||||
--bs-body-font-weight: 400;
|
||||
--bs-body-line-height: 1.5;
|
||||
--bs-body-color: #212529;
|
||||
--bs-body-bg: #fff;
|
||||
--bs-border-width: 1px;
|
||||
--bs-border-style: solid;
|
||||
--bs-border-color: #dee2e6;
|
||||
--bs-border-color-translucent: rgba(0, 0, 0, 0.175);
|
||||
--bs-border-radius: 0.375rem;
|
||||
--bs-border-radius-sm: 0.25rem;
|
||||
--bs-border-radius-lg: 0.5rem;
|
||||
--bs-border-radius-xl: 1rem;
|
||||
--bs-border-radius-2xl: 2rem;
|
||||
--bs-border-radius-pill: 50rem;
|
||||
--bs-link-color: #0d6efd;
|
||||
--bs-link-hover-color: #0a58ca;
|
||||
--bs-code-color: #d63384;
|
||||
--bs-highlight-bg: #fff3cd;
|
||||
}
|
||||
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
@@ -19,12 +87,13 @@
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||
font-size: 1rem;
|
||||
font-weight: 400;
|
||||
line-height: 1.5;
|
||||
color: #212529;
|
||||
background-color: #fff;
|
||||
font-family: var(--bs-body-font-family);
|
||||
font-size: var(--bs-body-font-size);
|
||||
font-weight: var(--bs-body-font-weight);
|
||||
line-height: var(--bs-body-line-height);
|
||||
color: var(--bs-body-color);
|
||||
text-align: var(--bs-body-text-align);
|
||||
background-color: var(--bs-body-bg);
|
||||
-webkit-text-size-adjust: 100%;
|
||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
@@ -32,15 +101,11 @@ body {
|
||||
hr {
|
||||
margin: 1rem 0;
|
||||
color: inherit;
|
||||
background-color: currentColor;
|
||||
border: 0;
|
||||
border-top: 1px solid;
|
||||
opacity: 0.25;
|
||||
}
|
||||
|
||||
hr:not([size]) {
|
||||
height: 1px;
|
||||
}
|
||||
|
||||
h6, h5, h4, h3, h2, h1 {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0.5rem;
|
||||
@@ -97,8 +162,7 @@ p {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
abbr[title],
|
||||
abbr[data-bs-original-title] {
|
||||
abbr[title] {
|
||||
-webkit-text-decoration: underline dotted;
|
||||
text-decoration: underline dotted;
|
||||
cursor: help;
|
||||
@@ -154,8 +218,8 @@ small {
|
||||
}
|
||||
|
||||
mark {
|
||||
padding: 0.2em;
|
||||
background-color: #fcf8e3;
|
||||
padding: 0.1875em;
|
||||
background-color: var(--bs-highlight-bg);
|
||||
}
|
||||
|
||||
sub,
|
||||
@@ -175,11 +239,11 @@ sup {
|
||||
}
|
||||
|
||||
a {
|
||||
color: #0d6efd;
|
||||
color: var(--bs-link-color);
|
||||
text-decoration: underline;
|
||||
}
|
||||
a:hover {
|
||||
color: #0a58ca;
|
||||
color: var(--bs-link-hover-color);
|
||||
}
|
||||
|
||||
a:not([href]):not([class]), a:not([href]):not([class]):hover {
|
||||
@@ -191,10 +255,8 @@ pre,
|
||||
code,
|
||||
kbd,
|
||||
samp {
|
||||
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
||||
font-family: var(--bs-font-monospace);
|
||||
font-size: 1em;
|
||||
direction: ltr /* rtl:ignore */;
|
||||
unicode-bidi: bidi-override;
|
||||
}
|
||||
|
||||
pre {
|
||||
@@ -212,7 +274,7 @@ pre code {
|
||||
|
||||
code {
|
||||
font-size: 0.875em;
|
||||
color: #d63384;
|
||||
color: var(--bs-code-color);
|
||||
word-wrap: break-word;
|
||||
}
|
||||
a > code {
|
||||
@@ -220,16 +282,15 @@ a > code {
|
||||
}
|
||||
|
||||
kbd {
|
||||
padding: 0.2rem 0.4rem;
|
||||
padding: 0.1875rem 0.375rem;
|
||||
font-size: 0.875em;
|
||||
color: #fff;
|
||||
background-color: #212529;
|
||||
border-radius: 0.2rem;
|
||||
color: var(--bs-body-bg);
|
||||
background-color: var(--bs-body-color);
|
||||
border-radius: 0.25rem;
|
||||
}
|
||||
kbd kbd {
|
||||
padding: 0;
|
||||
font-size: 1em;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
figure {
|
||||
@@ -308,8 +369,8 @@ select:disabled {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
[list]::-webkit-calendar-picker-indicator {
|
||||
display: none;
|
||||
[list]:not([type=date]):not([type=datetime-local]):not([type=month]):not([type=week]):not([type=time])::-webkit-calendar-picker-indicator {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
button,
|
||||
@@ -393,11 +454,12 @@ legend + * {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
::file-selector-button {
|
||||
::-webkit-file-upload-button {
|
||||
font: inherit;
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
|
||||
::-webkit-file-upload-button {
|
||||
::file-selector-button {
|
||||
font: inherit;
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+4
-5
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+96
-34
@@ -1,10 +1,78 @@
|
||||
/*!
|
||||
* Bootstrap Reboot v5.0.0 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2021 The Bootstrap Authors
|
||||
* Copyright 2011-2021 Twitter, Inc.
|
||||
* Bootstrap Reboot v5.2.2 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2022 The Bootstrap Authors
|
||||
* Copyright 2011-2022 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
|
||||
*/
|
||||
:root {
|
||||
--bs-blue: #0d6efd;
|
||||
--bs-indigo: #6610f2;
|
||||
--bs-purple: #6f42c1;
|
||||
--bs-pink: #d63384;
|
||||
--bs-red: #dc3545;
|
||||
--bs-orange: #fd7e14;
|
||||
--bs-yellow: #ffc107;
|
||||
--bs-green: #198754;
|
||||
--bs-teal: #20c997;
|
||||
--bs-cyan: #0dcaf0;
|
||||
--bs-black: #000;
|
||||
--bs-white: #fff;
|
||||
--bs-gray: #6c757d;
|
||||
--bs-gray-dark: #343a40;
|
||||
--bs-gray-100: #f8f9fa;
|
||||
--bs-gray-200: #e9ecef;
|
||||
--bs-gray-300: #dee2e6;
|
||||
--bs-gray-400: #ced4da;
|
||||
--bs-gray-500: #adb5bd;
|
||||
--bs-gray-600: #6c757d;
|
||||
--bs-gray-700: #495057;
|
||||
--bs-gray-800: #343a40;
|
||||
--bs-gray-900: #212529;
|
||||
--bs-primary: #0d6efd;
|
||||
--bs-secondary: #6c757d;
|
||||
--bs-success: #198754;
|
||||
--bs-info: #0dcaf0;
|
||||
--bs-warning: #ffc107;
|
||||
--bs-danger: #dc3545;
|
||||
--bs-light: #f8f9fa;
|
||||
--bs-dark: #212529;
|
||||
--bs-primary-rgb: 13, 110, 253;
|
||||
--bs-secondary-rgb: 108, 117, 125;
|
||||
--bs-success-rgb: 25, 135, 84;
|
||||
--bs-info-rgb: 13, 202, 240;
|
||||
--bs-warning-rgb: 255, 193, 7;
|
||||
--bs-danger-rgb: 220, 53, 69;
|
||||
--bs-light-rgb: 248, 249, 250;
|
||||
--bs-dark-rgb: 33, 37, 41;
|
||||
--bs-white-rgb: 255, 255, 255;
|
||||
--bs-black-rgb: 0, 0, 0;
|
||||
--bs-body-color-rgb: 33, 37, 41;
|
||||
--bs-body-bg-rgb: 255, 255, 255;
|
||||
--bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||
--bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
||||
--bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
|
||||
--bs-body-font-family: var(--bs-font-sans-serif);
|
||||
--bs-body-font-size: 1rem;
|
||||
--bs-body-font-weight: 400;
|
||||
--bs-body-line-height: 1.5;
|
||||
--bs-body-color: #212529;
|
||||
--bs-body-bg: #fff;
|
||||
--bs-border-width: 1px;
|
||||
--bs-border-style: solid;
|
||||
--bs-border-color: #dee2e6;
|
||||
--bs-border-color-translucent: rgba(0, 0, 0, 0.175);
|
||||
--bs-border-radius: 0.375rem;
|
||||
--bs-border-radius-sm: 0.25rem;
|
||||
--bs-border-radius-lg: 0.5rem;
|
||||
--bs-border-radius-xl: 1rem;
|
||||
--bs-border-radius-2xl: 2rem;
|
||||
--bs-border-radius-pill: 50rem;
|
||||
--bs-link-color: #0d6efd;
|
||||
--bs-link-hover-color: #0a58ca;
|
||||
--bs-code-color: #d63384;
|
||||
--bs-highlight-bg: #fff3cd;
|
||||
}
|
||||
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
@@ -19,12 +87,13 @@
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||
font-size: 1rem;
|
||||
font-weight: 400;
|
||||
line-height: 1.5;
|
||||
color: #212529;
|
||||
background-color: #fff;
|
||||
font-family: var(--bs-body-font-family);
|
||||
font-size: var(--bs-body-font-size);
|
||||
font-weight: var(--bs-body-font-weight);
|
||||
line-height: var(--bs-body-line-height);
|
||||
color: var(--bs-body-color);
|
||||
text-align: var(--bs-body-text-align);
|
||||
background-color: var(--bs-body-bg);
|
||||
-webkit-text-size-adjust: 100%;
|
||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
@@ -32,15 +101,11 @@ body {
|
||||
hr {
|
||||
margin: 1rem 0;
|
||||
color: inherit;
|
||||
background-color: currentColor;
|
||||
border: 0;
|
||||
border-top: 1px solid;
|
||||
opacity: 0.25;
|
||||
}
|
||||
|
||||
hr:not([size]) {
|
||||
height: 1px;
|
||||
}
|
||||
|
||||
h6, h5, h4, h3, h2, h1 {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0.5rem;
|
||||
@@ -97,8 +162,7 @@ p {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
abbr[title],
|
||||
abbr[data-bs-original-title] {
|
||||
abbr[title] {
|
||||
-webkit-text-decoration: underline dotted;
|
||||
text-decoration: underline dotted;
|
||||
cursor: help;
|
||||
@@ -154,8 +218,8 @@ small {
|
||||
}
|
||||
|
||||
mark {
|
||||
padding: 0.2em;
|
||||
background-color: #fcf8e3;
|
||||
padding: 0.1875em;
|
||||
background-color: var(--bs-highlight-bg);
|
||||
}
|
||||
|
||||
sub,
|
||||
@@ -175,11 +239,11 @@ sup {
|
||||
}
|
||||
|
||||
a {
|
||||
color: #0d6efd;
|
||||
color: var(--bs-link-color);
|
||||
text-decoration: underline;
|
||||
}
|
||||
a:hover {
|
||||
color: #0a58ca;
|
||||
color: var(--bs-link-hover-color);
|
||||
}
|
||||
|
||||
a:not([href]):not([class]), a:not([href]):not([class]):hover {
|
||||
@@ -191,10 +255,8 @@ pre,
|
||||
code,
|
||||
kbd,
|
||||
samp {
|
||||
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
||||
font-family: var(--bs-font-monospace);
|
||||
font-size: 1em;
|
||||
direction: ltr ;
|
||||
unicode-bidi: bidi-override;
|
||||
}
|
||||
|
||||
pre {
|
||||
@@ -212,7 +274,7 @@ pre code {
|
||||
|
||||
code {
|
||||
font-size: 0.875em;
|
||||
color: #d63384;
|
||||
color: var(--bs-code-color);
|
||||
word-wrap: break-word;
|
||||
}
|
||||
a > code {
|
||||
@@ -220,16 +282,15 @@ a > code {
|
||||
}
|
||||
|
||||
kbd {
|
||||
padding: 0.2rem 0.4rem;
|
||||
padding: 0.1875rem 0.375rem;
|
||||
font-size: 0.875em;
|
||||
color: #fff;
|
||||
background-color: #212529;
|
||||
border-radius: 0.2rem;
|
||||
color: var(--bs-body-bg);
|
||||
background-color: var(--bs-body-color);
|
||||
border-radius: 0.25rem;
|
||||
}
|
||||
kbd kbd {
|
||||
padding: 0;
|
||||
font-size: 1em;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
figure {
|
||||
@@ -308,8 +369,8 @@ select:disabled {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
[list]::-webkit-calendar-picker-indicator {
|
||||
display: none;
|
||||
[list]:not([type=date]):not([type=datetime-local]):not([type=month]):not([type=week]):not([type=time])::-webkit-calendar-picker-indicator {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
button,
|
||||
@@ -391,11 +452,12 @@ legend + * {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
::file-selector-button {
|
||||
::-webkit-file-upload-button {
|
||||
font: inherit;
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
|
||||
::-webkit-file-upload-button {
|
||||
::file-selector-button {
|
||||
font: inherit;
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+4
-5
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+421
-976
File diff suppressed because it is too large
Load Diff
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+4
-4
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+421
-976
File diff suppressed because it is too large
Load Diff
+1
-1
File diff suppressed because one or more lines are too long
+4
-4
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+2586
-2535
File diff suppressed because it is too large
Load Diff
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+4
-4
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+2584
-2549
File diff suppressed because it is too large
Load Diff
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+4
-4
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+3401
-3092
File diff suppressed because it is too large
Load Diff
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+3
-3
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+3168
-2951
File diff suppressed because it is too large
Load Diff
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+3
-3
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+3179
-2964
File diff suppressed because it is too large
Load Diff
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+3
-3
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+37
-201
@@ -1,264 +1,100 @@
|
||||
/*!
|
||||
* Bootstrap alert.js v5.0.0 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Bootstrap alert.js v5.2.2 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./base-component.js')) :
|
||||
typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './base-component'], factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Alert = factory(global.Data, global.EventHandler, global.Base));
|
||||
}(this, (function (Data, EventHandler, BaseComponent) { 'use strict';
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./util/index'), require('./dom/event-handler'), require('./base-component'), require('./util/component-functions')) :
|
||||
typeof define === 'function' && define.amd ? define(['./util/index', './dom/event-handler', './base-component', './util/component-functions'], factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Alert = factory(global.Index, global.EventHandler, global.BaseComponent, global.ComponentFunctions));
|
||||
})(this, (function (index, EventHandler, BaseComponent, componentFunctions) { 'use strict';
|
||||
|
||||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
||||
const _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { default: e };
|
||||
|
||||
var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
|
||||
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
|
||||
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
|
||||
const EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
|
||||
const BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.0.0): util/index.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
const MILLISECONDS_MULTIPLIER = 1000;
|
||||
const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
|
||||
|
||||
const getSelector = element => {
|
||||
let selector = element.getAttribute('data-bs-target');
|
||||
|
||||
if (!selector || selector === '#') {
|
||||
let hrefAttr = element.getAttribute('href'); // The only valid content that could double as a selector are IDs or classes,
|
||||
// so everything starting with `#` or `.`. If a "real" URL is used as the selector,
|
||||
// `document.querySelector` will rightfully complain it is invalid.
|
||||
// See https://github.com/twbs/bootstrap/issues/32273
|
||||
|
||||
if (!hrefAttr || !hrefAttr.includes('#') && !hrefAttr.startsWith('.')) {
|
||||
return null;
|
||||
} // Just in case some CMS puts out a full URL with the anchor appended
|
||||
|
||||
|
||||
if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) {
|
||||
hrefAttr = `#${hrefAttr.split('#')[1]}`;
|
||||
}
|
||||
|
||||
selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null;
|
||||
}
|
||||
|
||||
return selector;
|
||||
};
|
||||
|
||||
const getElementFromSelector = element => {
|
||||
const selector = getSelector(element);
|
||||
return selector ? document.querySelector(selector) : null;
|
||||
};
|
||||
|
||||
const getTransitionDurationFromElement = element => {
|
||||
if (!element) {
|
||||
return 0;
|
||||
} // Get transition-duration of the element
|
||||
|
||||
|
||||
let {
|
||||
transitionDuration,
|
||||
transitionDelay
|
||||
} = window.getComputedStyle(element);
|
||||
const floatTransitionDuration = Number.parseFloat(transitionDuration);
|
||||
const floatTransitionDelay = Number.parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
|
||||
|
||||
if (!floatTransitionDuration && !floatTransitionDelay) {
|
||||
return 0;
|
||||
} // If multiple durations are defined, take the first
|
||||
|
||||
|
||||
transitionDuration = transitionDuration.split(',')[0];
|
||||
transitionDelay = transitionDelay.split(',')[0];
|
||||
return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
|
||||
};
|
||||
|
||||
const triggerTransitionEnd = element => {
|
||||
element.dispatchEvent(new Event(TRANSITION_END));
|
||||
};
|
||||
|
||||
const emulateTransitionEnd = (element, duration) => {
|
||||
let called = false;
|
||||
const durationPadding = 5;
|
||||
const emulatedDuration = duration + durationPadding;
|
||||
|
||||
function listener() {
|
||||
called = true;
|
||||
element.removeEventListener(TRANSITION_END, listener);
|
||||
}
|
||||
|
||||
element.addEventListener(TRANSITION_END, listener);
|
||||
setTimeout(() => {
|
||||
if (!called) {
|
||||
triggerTransitionEnd(element);
|
||||
}
|
||||
}, emulatedDuration);
|
||||
};
|
||||
|
||||
const getjQuery = () => {
|
||||
const {
|
||||
jQuery
|
||||
} = window;
|
||||
|
||||
if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
|
||||
return jQuery;
|
||||
}
|
||||
|
||||
return null;
|
||||
};
|
||||
|
||||
const onDOMContentLoaded = callback => {
|
||||
if (document.readyState === 'loading') {
|
||||
document.addEventListener('DOMContentLoaded', callback);
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
|
||||
const defineJQueryPlugin = (name, plugin) => {
|
||||
onDOMContentLoaded(() => {
|
||||
const $ = getjQuery();
|
||||
/* istanbul ignore if */
|
||||
|
||||
if ($) {
|
||||
const JQUERY_NO_CONFLICT = $.fn[name];
|
||||
$.fn[name] = plugin.jQueryInterface;
|
||||
$.fn[name].Constructor = plugin;
|
||||
|
||||
$.fn[name].noConflict = () => {
|
||||
$.fn[name] = JQUERY_NO_CONFLICT;
|
||||
return plugin.jQueryInterface;
|
||||
};
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.0.0): alert.js
|
||||
* Bootstrap (v5.2.2): alert.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
const NAME = 'alert';
|
||||
const DATA_KEY = 'bs.alert';
|
||||
const EVENT_KEY = `.${DATA_KEY}`;
|
||||
const DATA_API_KEY = '.data-api';
|
||||
const SELECTOR_DISMISS = '[data-bs-dismiss="alert"]';
|
||||
const EVENT_CLOSE = `close${EVENT_KEY}`;
|
||||
const EVENT_CLOSED = `closed${EVENT_KEY}`;
|
||||
const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`;
|
||||
const CLASS_NAME_ALERT = 'alert';
|
||||
const CLASS_NAME_FADE = 'fade';
|
||||
const CLASS_NAME_SHOW = 'show';
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
* Class definition
|
||||
*/
|
||||
|
||||
class Alert extends BaseComponent__default['default'] {
|
||||
class Alert extends BaseComponent__default.default {
|
||||
// Getters
|
||||
static get DATA_KEY() {
|
||||
return DATA_KEY;
|
||||
static get NAME() {
|
||||
return NAME;
|
||||
} // Public
|
||||
|
||||
|
||||
close(element) {
|
||||
const rootElement = element ? this._getRootElement(element) : this._element;
|
||||
close() {
|
||||
const closeEvent = EventHandler__default.default.trigger(this._element, EVENT_CLOSE);
|
||||
|
||||
const customEvent = this._triggerCloseEvent(rootElement);
|
||||
|
||||
if (customEvent === null || customEvent.defaultPrevented) {
|
||||
if (closeEvent.defaultPrevented) {
|
||||
return;
|
||||
}
|
||||
|
||||
this._removeElement(rootElement);
|
||||
this._element.classList.remove(CLASS_NAME_SHOW);
|
||||
|
||||
const isAnimated = this._element.classList.contains(CLASS_NAME_FADE);
|
||||
|
||||
this._queueCallback(() => this._destroyElement(), this._element, isAnimated);
|
||||
} // Private
|
||||
|
||||
|
||||
_getRootElement(element) {
|
||||
return getElementFromSelector(element) || element.closest(`.${CLASS_NAME_ALERT}`);
|
||||
}
|
||||
_destroyElement() {
|
||||
this._element.remove();
|
||||
|
||||
_triggerCloseEvent(element) {
|
||||
return EventHandler__default['default'].trigger(element, EVENT_CLOSE);
|
||||
}
|
||||
|
||||
_removeElement(element) {
|
||||
element.classList.remove(CLASS_NAME_SHOW);
|
||||
|
||||
if (!element.classList.contains(CLASS_NAME_FADE)) {
|
||||
this._destroyElement(element);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
const transitionDuration = getTransitionDurationFromElement(element);
|
||||
EventHandler__default['default'].one(element, 'transitionend', () => this._destroyElement(element));
|
||||
emulateTransitionEnd(element, transitionDuration);
|
||||
}
|
||||
|
||||
_destroyElement(element) {
|
||||
if (element.parentNode) {
|
||||
element.parentNode.removeChild(element);
|
||||
}
|
||||
|
||||
EventHandler__default['default'].trigger(element, EVENT_CLOSED);
|
||||
EventHandler__default.default.trigger(this._element, EVENT_CLOSED);
|
||||
this.dispose();
|
||||
} // Static
|
||||
|
||||
|
||||
static jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
let data = Data__default['default'].get(this, DATA_KEY);
|
||||
const data = Alert.getOrCreateInstance(this);
|
||||
|
||||
if (!data) {
|
||||
data = new Alert(this);
|
||||
if (typeof config !== 'string') {
|
||||
return;
|
||||
}
|
||||
|
||||
if (config === 'close') {
|
||||
data[config](this);
|
||||
if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {
|
||||
throw new TypeError(`No method named "${config}"`);
|
||||
}
|
||||
|
||||
data[config](this);
|
||||
});
|
||||
}
|
||||
|
||||
static handleDismiss(alertInstance) {
|
||||
return function (event) {
|
||||
if (event) {
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
alertInstance.close(this);
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
* Data API implementation
|
||||
*/
|
||||
|
||||
|
||||
EventHandler__default['default'].on(document, EVENT_CLICK_DATA_API, SELECTOR_DISMISS, Alert.handleDismiss(new Alert()));
|
||||
componentFunctions.enableDismissTrigger(Alert, 'close');
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
* add .Alert to jQuery only if jQuery is present
|
||||
*/
|
||||
|
||||
defineJQueryPlugin(NAME, Alert);
|
||||
index.defineJQueryPlugin(Alert);
|
||||
|
||||
return Alert;
|
||||
|
||||
})));
|
||||
}));
|
||||
//# sourceMappingURL=alert.js.map
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+60
-24
@@ -1,64 +1,100 @@
|
||||
/*!
|
||||
* Bootstrap base-component.js v5.0.0 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Bootstrap base-component.js v5.2.2 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js')) :
|
||||
typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler'], factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Base = factory(global.Data, global.EventHandler));
|
||||
}(this, (function (Data, EventHandler) { 'use strict';
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data'), require('./util/index'), require('./dom/event-handler'), require('./util/config')) :
|
||||
typeof define === 'function' && define.amd ? define(['./dom/data', './util/index', './dom/event-handler', './util/config'], factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.BaseComponent = factory(global.Data, global.Index, global.EventHandler, global.Config));
|
||||
})(this, (function (Data, index, EventHandler, Config) { 'use strict';
|
||||
|
||||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
||||
const _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { default: e };
|
||||
|
||||
var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
|
||||
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
|
||||
const Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
|
||||
const EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
|
||||
const Config__default = /*#__PURE__*/_interopDefaultLegacy(Config);
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.0.0): base-component.js
|
||||
* Bootstrap (v5.2.2): base-component.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
const VERSION = '5.0.0';
|
||||
const VERSION = '5.2.2';
|
||||
/**
|
||||
* Class definition
|
||||
*/
|
||||
|
||||
class BaseComponent {
|
||||
constructor(element) {
|
||||
element = typeof element === 'string' ? document.querySelector(element) : element;
|
||||
class BaseComponent extends Config__default.default {
|
||||
constructor(element, config) {
|
||||
super();
|
||||
element = index.getElement(element);
|
||||
|
||||
if (!element) {
|
||||
return;
|
||||
}
|
||||
|
||||
this._element = element;
|
||||
Data__default['default'].set(this._element, this.constructor.DATA_KEY, this);
|
||||
}
|
||||
this._config = this._getConfig(config);
|
||||
Data__default.default.set(this._element, this.constructor.DATA_KEY, this);
|
||||
} // Public
|
||||
|
||||
|
||||
dispose() {
|
||||
Data__default['default'].remove(this._element, this.constructor.DATA_KEY);
|
||||
EventHandler__default['default'].off(this._element, `.${this.constructor.DATA_KEY}`);
|
||||
this._element = null;
|
||||
Data__default.default.remove(this._element, this.constructor.DATA_KEY);
|
||||
EventHandler__default.default.off(this._element, this.constructor.EVENT_KEY);
|
||||
|
||||
for (const propertyName of Object.getOwnPropertyNames(this)) {
|
||||
this[propertyName] = null;
|
||||
}
|
||||
}
|
||||
/** Static */
|
||||
|
||||
_queueCallback(callback, element, isAnimated = true) {
|
||||
index.executeAfterTransition(callback, element, isAnimated);
|
||||
}
|
||||
|
||||
_getConfig(config) {
|
||||
config = this._mergeConfigObj(config, this._element);
|
||||
config = this._configAfterMerge(config);
|
||||
|
||||
this._typeCheckConfig(config);
|
||||
|
||||
return config;
|
||||
} // Static
|
||||
|
||||
|
||||
static getInstance(element) {
|
||||
return Data__default['default'].get(element, this.DATA_KEY);
|
||||
return Data__default.default.get(index.getElement(element), this.DATA_KEY);
|
||||
}
|
||||
|
||||
static getOrCreateInstance(element, config = {}) {
|
||||
return this.getInstance(element) || new this(element, typeof config === 'object' ? config : null);
|
||||
}
|
||||
|
||||
static get VERSION() {
|
||||
return VERSION;
|
||||
}
|
||||
|
||||
static get DATA_KEY() {
|
||||
return `bs.${this.NAME}`;
|
||||
}
|
||||
|
||||
static get EVENT_KEY() {
|
||||
return `.${this.DATA_KEY}`;
|
||||
}
|
||||
|
||||
static eventName(name) {
|
||||
return `${name}${this.EVENT_KEY}`;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return BaseComponent;
|
||||
|
||||
})));
|
||||
}));
|
||||
//# sourceMappingURL=base-component.js.map
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
{"version":3,"file":"base-component.js","sources":["../src/base-component.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0): base-component.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport Data from './dom/data'\nimport EventHandler from './dom/event-handler'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst VERSION = '5.0.0'\n\nclass BaseComponent {\n constructor(element) {\n element = typeof element === 'string' ? document.querySelector(element) : element\n\n if (!element) {\n return\n }\n\n this._element = element\n Data.set(this._element, this.constructor.DATA_KEY, this)\n }\n\n dispose() {\n Data.remove(this._element, this.constructor.DATA_KEY)\n EventHandler.off(this._element, `.${this.constructor.DATA_KEY}`)\n this._element = null\n }\n\n /** Static */\n\n static getInstance(element) {\n return Data.get(element, this.DATA_KEY)\n }\n\n static get VERSION() {\n return VERSION\n }\n}\n\nexport default BaseComponent\n"],"names":["VERSION","BaseComponent","constructor","element","document","querySelector","_element","Data","set","DATA_KEY","dispose","remove","EventHandler","off","getInstance","get"],"mappings":";;;;;;;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;EAKA;EACA;EACA;EACA;EACA;;EAEA,MAAMA,OAAO,GAAG,OAAhB;;EAEA,MAAMC,aAAN,CAAoB;EAClBC,EAAAA,WAAW,CAACC,OAAD,EAAU;EACnBA,IAAAA,OAAO,GAAG,OAAOA,OAAP,KAAmB,QAAnB,GAA8BC,QAAQ,CAACC,aAAT,CAAuBF,OAAvB,CAA9B,GAAgEA,OAA1E;;EAEA,QAAI,CAACA,OAAL,EAAc;EACZ;EACD;;EAED,SAAKG,QAAL,GAAgBH,OAAhB;EACAI,IAAAA,wBAAI,CAACC,GAAL,CAAS,KAAKF,QAAd,EAAwB,KAAKJ,WAAL,CAAiBO,QAAzC,EAAmD,IAAnD;EACD;;EAEDC,EAAAA,OAAO,GAAG;EACRH,IAAAA,wBAAI,CAACI,MAAL,CAAY,KAAKL,QAAjB,EAA2B,KAAKJ,WAAL,CAAiBO,QAA5C;EACAG,IAAAA,gCAAY,CAACC,GAAb,CAAiB,KAAKP,QAAtB,EAAiC,IAAG,KAAKJ,WAAL,CAAiBO,QAAS,EAA9D;EACA,SAAKH,QAAL,GAAgB,IAAhB;EACD;EAED;;;EAEkB,SAAXQ,WAAW,CAACX,OAAD,EAAU;EAC1B,WAAOI,wBAAI,CAACQ,GAAL,CAASZ,OAAT,EAAkB,KAAKM,QAAvB,CAAP;EACD;;EAEiB,aAAPT,OAAO,GAAG;EACnB,WAAOA,OAAP;EACD;;EA1BiB;;;;;;;;"}
|
||||
{"version":3,"file":"base-component.js","sources":["../src/base-component.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.2): base-component.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport Data from './dom/data'\nimport { executeAfterTransition, getElement } from './util/index'\nimport EventHandler from './dom/event-handler'\nimport Config from './util/config'\n\n/**\n * Constants\n */\n\nconst VERSION = '5.2.2'\n\n/**\n * Class definition\n */\n\nclass BaseComponent extends Config {\n constructor(element, config) {\n super()\n\n element = getElement(element)\n if (!element) {\n return\n }\n\n this._element = element\n this._config = this._getConfig(config)\n\n Data.set(this._element, this.constructor.DATA_KEY, this)\n }\n\n // Public\n dispose() {\n Data.remove(this._element, this.constructor.DATA_KEY)\n EventHandler.off(this._element, this.constructor.EVENT_KEY)\n\n for (const propertyName of Object.getOwnPropertyNames(this)) {\n this[propertyName] = null\n }\n }\n\n _queueCallback(callback, element, isAnimated = true) {\n executeAfterTransition(callback, element, isAnimated)\n }\n\n _getConfig(config) {\n config = this._mergeConfigObj(config, this._element)\n config = this._configAfterMerge(config)\n this._typeCheckConfig(config)\n return config\n }\n\n // Static\n static getInstance(element) {\n return Data.get(getElement(element), this.DATA_KEY)\n }\n\n static getOrCreateInstance(element, config = {}) {\n return this.getInstance(element) || new this(element, typeof config === 'object' ? config : null)\n }\n\n static get VERSION() {\n return VERSION\n }\n\n static get DATA_KEY() {\n return `bs.${this.NAME}`\n }\n\n static get EVENT_KEY() {\n return `.${this.DATA_KEY}`\n }\n\n static eventName(name) {\n return `${name}${this.EVENT_KEY}`\n }\n}\n\nexport default BaseComponent\n"],"names":["VERSION","BaseComponent","Config","constructor","element","config","getElement","_element","_config","_getConfig","Data","set","DATA_KEY","dispose","remove","EventHandler","off","EVENT_KEY","propertyName","Object","getOwnPropertyNames","_queueCallback","callback","isAnimated","executeAfterTransition","_mergeConfigObj","_configAfterMerge","_typeCheckConfig","getInstance","get","getOrCreateInstance","NAME","eventName","name"],"mappings":";;;;;;;;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;EAOA;EACA;EACA;;EAEA,MAAMA,OAAO,GAAG,OAAhB,CAAA;EAEA;EACA;EACA;;EAEA,MAAMC,aAAN,SAA4BC,uBAA5B,CAAmC;EACjCC,EAAAA,WAAW,CAACC,OAAD,EAAUC,MAAV,EAAkB;EAC3B,IAAA,KAAA,EAAA,CAAA;EAEAD,IAAAA,OAAO,GAAGE,gBAAU,CAACF,OAAD,CAApB,CAAA;;MACA,IAAI,CAACA,OAAL,EAAc;EACZ,MAAA,OAAA;EACD,KAAA;;MAED,IAAKG,CAAAA,QAAL,GAAgBH,OAAhB,CAAA;EACA,IAAA,IAAA,CAAKI,OAAL,GAAe,IAAA,CAAKC,UAAL,CAAgBJ,MAAhB,CAAf,CAAA;MAEAK,qBAAI,CAACC,GAAL,CAAS,IAAKJ,CAAAA,QAAd,EAAwB,IAAA,CAAKJ,WAAL,CAAiBS,QAAzC,EAAmD,IAAnD,CAAA,CAAA;EACD,GAbgC;;;EAgBjCC,EAAAA,OAAO,GAAG;MACRH,qBAAI,CAACI,MAAL,CAAY,IAAA,CAAKP,QAAjB,EAA2B,IAAA,CAAKJ,WAAL,CAAiBS,QAA5C,CAAA,CAAA;MACAG,6BAAY,CAACC,GAAb,CAAiB,IAAA,CAAKT,QAAtB,EAAgC,IAAA,CAAKJ,WAAL,CAAiBc,SAAjD,CAAA,CAAA;;MAEA,KAAK,MAAMC,YAAX,IAA2BC,MAAM,CAACC,mBAAP,CAA2B,IAA3B,CAA3B,EAA6D;QAC3D,IAAKF,CAAAA,YAAL,IAAqB,IAArB,CAAA;EACD,KAAA;EACF,GAAA;;IAEDG,cAAc,CAACC,QAAD,EAAWlB,OAAX,EAAoBmB,UAAU,GAAG,IAAjC,EAAuC;EACnDC,IAAAA,4BAAsB,CAACF,QAAD,EAAWlB,OAAX,EAAoBmB,UAApB,CAAtB,CAAA;EACD,GAAA;;IAEDd,UAAU,CAACJ,MAAD,EAAS;MACjBA,MAAM,GAAG,KAAKoB,eAAL,CAAqBpB,MAArB,EAA6B,IAAA,CAAKE,QAAlC,CAAT,CAAA;EACAF,IAAAA,MAAM,GAAG,IAAA,CAAKqB,iBAAL,CAAuBrB,MAAvB,CAAT,CAAA;;MACA,IAAKsB,CAAAA,gBAAL,CAAsBtB,MAAtB,CAAA,CAAA;;EACA,IAAA,OAAOA,MAAP,CAAA;EACD,GAlCgC;;;IAqCf,OAAXuB,WAAW,CAACxB,OAAD,EAAU;MAC1B,OAAOM,qBAAI,CAACmB,GAAL,CAASvB,gBAAU,CAACF,OAAD,CAAnB,EAA8B,IAAKQ,CAAAA,QAAnC,CAAP,CAAA;EACD,GAAA;;EAEyB,EAAA,OAAnBkB,mBAAmB,CAAC1B,OAAD,EAAUC,MAAM,GAAG,EAAnB,EAAuB;EAC/C,IAAA,OAAO,KAAKuB,WAAL,CAAiBxB,OAAjB,CAA6B,IAAA,IAAI,IAAJ,CAASA,OAAT,EAAkB,OAAOC,MAAP,KAAkB,QAAlB,GAA6BA,MAA7B,GAAsC,IAAxD,CAApC,CAAA;EACD,GAAA;;EAEiB,EAAA,WAAPL,OAAO,GAAG;EACnB,IAAA,OAAOA,OAAP,CAAA;EACD,GAAA;;EAEkB,EAAA,WAARY,QAAQ,GAAG;MACpB,OAAQ,CAAA,GAAA,EAAK,IAAKmB,CAAAA,IAAK,CAAvB,CAAA,CAAA;EACD,GAAA;;EAEmB,EAAA,WAATd,SAAS,GAAG;MACrB,OAAQ,CAAA,CAAA,EAAG,IAAKL,CAAAA,QAAS,CAAzB,CAAA,CAAA;EACD,GAAA;;IAEe,OAAToB,SAAS,CAACC,IAAD,EAAO;EACrB,IAAA,OAAQ,CAAEA,EAAAA,IAAK,CAAE,EAAA,IAAA,CAAKhB,SAAU,CAAhC,CAAA,CAAA;EACD,GAAA;;EA3DgC;;;;;;;;"}
|
||||
Vendored
+20
-84
@@ -1,75 +1,27 @@
|
||||
/*!
|
||||
* Bootstrap button.js v5.0.0 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Bootstrap button.js v5.2.2 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./base-component.js')) :
|
||||
typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './base-component'], factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Button = factory(global.Data, global.EventHandler, global.Base));
|
||||
}(this, (function (Data, EventHandler, BaseComponent) { 'use strict';
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./util/index'), require('./dom/event-handler'), require('./base-component')) :
|
||||
typeof define === 'function' && define.amd ? define(['./util/index', './dom/event-handler', './base-component'], factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Button = factory(global.Index, global.EventHandler, global.BaseComponent));
|
||||
})(this, (function (index, EventHandler, BaseComponent) { 'use strict';
|
||||
|
||||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
||||
const _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { default: e };
|
||||
|
||||
var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
|
||||
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
|
||||
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
|
||||
const EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
|
||||
const BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.0.0): util/index.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
const getjQuery = () => {
|
||||
const {
|
||||
jQuery
|
||||
} = window;
|
||||
|
||||
if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
|
||||
return jQuery;
|
||||
}
|
||||
|
||||
return null;
|
||||
};
|
||||
|
||||
const onDOMContentLoaded = callback => {
|
||||
if (document.readyState === 'loading') {
|
||||
document.addEventListener('DOMContentLoaded', callback);
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
|
||||
const defineJQueryPlugin = (name, plugin) => {
|
||||
onDOMContentLoaded(() => {
|
||||
const $ = getjQuery();
|
||||
/* istanbul ignore if */
|
||||
|
||||
if ($) {
|
||||
const JQUERY_NO_CONFLICT = $.fn[name];
|
||||
$.fn[name] = plugin.jQueryInterface;
|
||||
$.fn[name].Constructor = plugin;
|
||||
|
||||
$.fn[name].noConflict = () => {
|
||||
$.fn[name] = JQUERY_NO_CONFLICT;
|
||||
return plugin.jQueryInterface;
|
||||
};
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.0.0): button.js
|
||||
* Bootstrap (v5.2.2): button.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
const NAME = 'button';
|
||||
@@ -80,15 +32,13 @@
|
||||
const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="button"]';
|
||||
const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`;
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
* Class definition
|
||||
*/
|
||||
|
||||
class Button extends BaseComponent__default['default'] {
|
||||
class Button extends BaseComponent__default.default {
|
||||
// Getters
|
||||
static get DATA_KEY() {
|
||||
return DATA_KEY;
|
||||
static get NAME() {
|
||||
return NAME;
|
||||
} // Public
|
||||
|
||||
|
||||
@@ -100,11 +50,7 @@
|
||||
|
||||
static jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
let data = Data__default['default'].get(this, DATA_KEY);
|
||||
|
||||
if (!data) {
|
||||
data = new Button(this);
|
||||
}
|
||||
const data = Button.getOrCreateInstance(this);
|
||||
|
||||
if (config === 'toggle') {
|
||||
data[config]();
|
||||
@@ -114,33 +60,23 @@
|
||||
|
||||
}
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
* Data API implementation
|
||||
*/
|
||||
|
||||
|
||||
EventHandler__default['default'].on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, event => {
|
||||
EventHandler__default.default.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, event => {
|
||||
event.preventDefault();
|
||||
const button = event.target.closest(SELECTOR_DATA_TOGGLE);
|
||||
let data = Data__default['default'].get(button, DATA_KEY);
|
||||
|
||||
if (!data) {
|
||||
data = new Button(button);
|
||||
}
|
||||
|
||||
const data = Button.getOrCreateInstance(button);
|
||||
data.toggle();
|
||||
});
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
* add .Button to jQuery only if jQuery is present
|
||||
*/
|
||||
|
||||
defineJQueryPlugin(NAME, Button);
|
||||
index.defineJQueryPlugin(Button);
|
||||
|
||||
return Button;
|
||||
|
||||
})));
|
||||
}));
|
||||
//# sourceMappingURL=button.js.map
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+253
-538
@@ -1,193 +1,30 @@
|
||||
/*!
|
||||
* Bootstrap carousel.js v5.0.0 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Bootstrap carousel.js v5.2.2 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js'), require('./base-component.js')) :
|
||||
typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './dom/manipulator', './dom/selector-engine', './base-component'], factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Carousel = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine, global.Base));
|
||||
}(this, (function (Data, EventHandler, Manipulator, SelectorEngine, BaseComponent) { 'use strict';
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./util/index'), require('./dom/event-handler'), require('./dom/manipulator'), require('./dom/selector-engine'), require('./util/swipe'), require('./base-component')) :
|
||||
typeof define === 'function' && define.amd ? define(['./util/index', './dom/event-handler', './dom/manipulator', './dom/selector-engine', './util/swipe', './base-component'], factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Carousel = factory(global.Index, global.EventHandler, global.Manipulator, global.SelectorEngine, global.Swipe, global.BaseComponent));
|
||||
})(this, (function (index, EventHandler, Manipulator, SelectorEngine, Swipe, BaseComponent) { 'use strict';
|
||||
|
||||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
||||
const _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { default: e };
|
||||
|
||||
var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
|
||||
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
|
||||
var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator);
|
||||
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
|
||||
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
|
||||
const EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
|
||||
const Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator);
|
||||
const SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
|
||||
const Swipe__default = /*#__PURE__*/_interopDefaultLegacy(Swipe);
|
||||
const BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.0.0): util/index.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
const MILLISECONDS_MULTIPLIER = 1000;
|
||||
const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
|
||||
|
||||
const toType = obj => {
|
||||
if (obj === null || obj === undefined) {
|
||||
return `${obj}`;
|
||||
}
|
||||
|
||||
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
|
||||
};
|
||||
|
||||
const getSelector = element => {
|
||||
let selector = element.getAttribute('data-bs-target');
|
||||
|
||||
if (!selector || selector === '#') {
|
||||
let hrefAttr = element.getAttribute('href'); // The only valid content that could double as a selector are IDs or classes,
|
||||
// so everything starting with `#` or `.`. If a "real" URL is used as the selector,
|
||||
// `document.querySelector` will rightfully complain it is invalid.
|
||||
// See https://github.com/twbs/bootstrap/issues/32273
|
||||
|
||||
if (!hrefAttr || !hrefAttr.includes('#') && !hrefAttr.startsWith('.')) {
|
||||
return null;
|
||||
} // Just in case some CMS puts out a full URL with the anchor appended
|
||||
|
||||
|
||||
if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) {
|
||||
hrefAttr = `#${hrefAttr.split('#')[1]}`;
|
||||
}
|
||||
|
||||
selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null;
|
||||
}
|
||||
|
||||
return selector;
|
||||
};
|
||||
|
||||
const getElementFromSelector = element => {
|
||||
const selector = getSelector(element);
|
||||
return selector ? document.querySelector(selector) : null;
|
||||
};
|
||||
|
||||
const getTransitionDurationFromElement = element => {
|
||||
if (!element) {
|
||||
return 0;
|
||||
} // Get transition-duration of the element
|
||||
|
||||
|
||||
let {
|
||||
transitionDuration,
|
||||
transitionDelay
|
||||
} = window.getComputedStyle(element);
|
||||
const floatTransitionDuration = Number.parseFloat(transitionDuration);
|
||||
const floatTransitionDelay = Number.parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
|
||||
|
||||
if (!floatTransitionDuration && !floatTransitionDelay) {
|
||||
return 0;
|
||||
} // If multiple durations are defined, take the first
|
||||
|
||||
|
||||
transitionDuration = transitionDuration.split(',')[0];
|
||||
transitionDelay = transitionDelay.split(',')[0];
|
||||
return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
|
||||
};
|
||||
|
||||
const triggerTransitionEnd = element => {
|
||||
element.dispatchEvent(new Event(TRANSITION_END));
|
||||
};
|
||||
|
||||
const isElement = obj => (obj[0] || obj).nodeType;
|
||||
|
||||
const emulateTransitionEnd = (element, duration) => {
|
||||
let called = false;
|
||||
const durationPadding = 5;
|
||||
const emulatedDuration = duration + durationPadding;
|
||||
|
||||
function listener() {
|
||||
called = true;
|
||||
element.removeEventListener(TRANSITION_END, listener);
|
||||
}
|
||||
|
||||
element.addEventListener(TRANSITION_END, listener);
|
||||
setTimeout(() => {
|
||||
if (!called) {
|
||||
triggerTransitionEnd(element);
|
||||
}
|
||||
}, emulatedDuration);
|
||||
};
|
||||
|
||||
const typeCheckConfig = (componentName, config, configTypes) => {
|
||||
Object.keys(configTypes).forEach(property => {
|
||||
const expectedTypes = configTypes[property];
|
||||
const value = config[property];
|
||||
const valueType = value && isElement(value) ? 'element' : toType(value);
|
||||
|
||||
if (!new RegExp(expectedTypes).test(valueType)) {
|
||||
throw new TypeError(`${componentName.toUpperCase()}: Option "${property}" provided type "${valueType}" but expected type "${expectedTypes}".`);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const isVisible = element => {
|
||||
if (!element) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (element.style && element.parentNode && element.parentNode.style) {
|
||||
const elementStyle = getComputedStyle(element);
|
||||
const parentNodeStyle = getComputedStyle(element.parentNode);
|
||||
return elementStyle.display !== 'none' && parentNodeStyle.display !== 'none' && elementStyle.visibility !== 'hidden';
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
const reflow = element => element.offsetHeight;
|
||||
|
||||
const getjQuery = () => {
|
||||
const {
|
||||
jQuery
|
||||
} = window;
|
||||
|
||||
if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
|
||||
return jQuery;
|
||||
}
|
||||
|
||||
return null;
|
||||
};
|
||||
|
||||
const onDOMContentLoaded = callback => {
|
||||
if (document.readyState === 'loading') {
|
||||
document.addEventListener('DOMContentLoaded', callback);
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
|
||||
const isRTL = () => document.documentElement.dir === 'rtl';
|
||||
|
||||
const defineJQueryPlugin = (name, plugin) => {
|
||||
onDOMContentLoaded(() => {
|
||||
const $ = getjQuery();
|
||||
/* istanbul ignore if */
|
||||
|
||||
if ($) {
|
||||
const JQUERY_NO_CONFLICT = $.fn[name];
|
||||
$.fn[name] = plugin.jQueryInterface;
|
||||
$.fn[name].Constructor = plugin;
|
||||
|
||||
$.fn[name].noConflict = () => {
|
||||
$.fn[name] = JQUERY_NO_CONFLICT;
|
||||
return plugin.jQueryInterface;
|
||||
};
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.0.0): carousel.js
|
||||
* Bootstrap (v5.2.2): carousel.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
const NAME = 'carousel';
|
||||
@@ -198,23 +35,6 @@
|
||||
const ARROW_RIGHT_KEY = 'ArrowRight';
|
||||
const TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch
|
||||
|
||||
const SWIPE_THRESHOLD = 40;
|
||||
const Default = {
|
||||
interval: 5000,
|
||||
keyboard: true,
|
||||
slide: false,
|
||||
pause: 'hover',
|
||||
wrap: true,
|
||||
touch: true
|
||||
};
|
||||
const DefaultType = {
|
||||
interval: '(number|boolean)',
|
||||
keyboard: 'boolean',
|
||||
slide: '(boolean|string)',
|
||||
pause: '(string|boolean)',
|
||||
wrap: 'boolean',
|
||||
touch: 'boolean'
|
||||
};
|
||||
const ORDER_NEXT = 'next';
|
||||
const ORDER_PREV = 'prev';
|
||||
const DIRECTION_LEFT = 'left';
|
||||
@@ -224,11 +44,6 @@
|
||||
const EVENT_KEYDOWN = `keydown${EVENT_KEY}`;
|
||||
const EVENT_MOUSEENTER = `mouseenter${EVENT_KEY}`;
|
||||
const EVENT_MOUSELEAVE = `mouseleave${EVENT_KEY}`;
|
||||
const EVENT_TOUCHSTART = `touchstart${EVENT_KEY}`;
|
||||
const EVENT_TOUCHMOVE = `touchmove${EVENT_KEY}`;
|
||||
const EVENT_TOUCHEND = `touchend${EVENT_KEY}`;
|
||||
const EVENT_POINTERDOWN = `pointerdown${EVENT_KEY}`;
|
||||
const EVENT_POINTERUP = `pointerup${EVENT_KEY}`;
|
||||
const EVENT_DRAG_START = `dragstart${EVENT_KEY}`;
|
||||
const EVENT_LOAD_DATA_API = `load${EVENT_KEY}${DATA_API_KEY}`;
|
||||
const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`;
|
||||
@@ -239,41 +54,53 @@
|
||||
const CLASS_NAME_START = 'carousel-item-start';
|
||||
const CLASS_NAME_NEXT = 'carousel-item-next';
|
||||
const CLASS_NAME_PREV = 'carousel-item-prev';
|
||||
const CLASS_NAME_POINTER_EVENT = 'pointer-event';
|
||||
const SELECTOR_ACTIVE = '.active';
|
||||
const SELECTOR_ACTIVE_ITEM = '.active.carousel-item';
|
||||
const SELECTOR_ITEM = '.carousel-item';
|
||||
const SELECTOR_ACTIVE_ITEM = SELECTOR_ACTIVE + SELECTOR_ITEM;
|
||||
const SELECTOR_ITEM_IMG = '.carousel-item img';
|
||||
const SELECTOR_NEXT_PREV = '.carousel-item-next, .carousel-item-prev';
|
||||
const SELECTOR_INDICATORS = '.carousel-indicators';
|
||||
const SELECTOR_INDICATOR = '[data-bs-target]';
|
||||
const SELECTOR_DATA_SLIDE = '[data-bs-slide], [data-bs-slide-to]';
|
||||
const SELECTOR_DATA_RIDE = '[data-bs-ride="carousel"]';
|
||||
const POINTER_TYPE_TOUCH = 'touch';
|
||||
const POINTER_TYPE_PEN = 'pen';
|
||||
const KEY_TO_DIRECTION = {
|
||||
[ARROW_LEFT_KEY]: DIRECTION_RIGHT,
|
||||
[ARROW_RIGHT_KEY]: DIRECTION_LEFT
|
||||
};
|
||||
const Default = {
|
||||
interval: 5000,
|
||||
keyboard: true,
|
||||
pause: 'hover',
|
||||
ride: false,
|
||||
touch: true,
|
||||
wrap: true
|
||||
};
|
||||
const DefaultType = {
|
||||
interval: '(number|boolean)',
|
||||
// TODO:v6 remove boolean support
|
||||
keyboard: 'boolean',
|
||||
pause: '(string|boolean)',
|
||||
ride: '(boolean|string)',
|
||||
touch: 'boolean',
|
||||
wrap: 'boolean'
|
||||
};
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
* Class definition
|
||||
*/
|
||||
|
||||
class Carousel extends BaseComponent__default['default'] {
|
||||
class Carousel extends BaseComponent__default.default {
|
||||
constructor(element, config) {
|
||||
super(element);
|
||||
this._items = null;
|
||||
super(element, config);
|
||||
this._interval = null;
|
||||
this._activeElement = null;
|
||||
this._isPaused = false;
|
||||
this._isSliding = false;
|
||||
this.touchTimeout = null;
|
||||
this.touchStartX = 0;
|
||||
this.touchDeltaX = 0;
|
||||
this._config = this._getConfig(config);
|
||||
this._indicatorsElement = SelectorEngine__default['default'].findOne(SELECTOR_INDICATORS, this._element);
|
||||
this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0;
|
||||
this._pointerEvent = Boolean(window.PointerEvent);
|
||||
this._swipeHelper = null;
|
||||
this._indicatorsElement = SelectorEngine__default.default.findOne(SELECTOR_INDICATORS, this._element);
|
||||
|
||||
this._addEventListeners();
|
||||
|
||||
if (this._config.ride === CLASS_NAME_CAROUSEL) {
|
||||
this.cycle();
|
||||
}
|
||||
} // Getters
|
||||
|
||||
|
||||
@@ -281,192 +108,145 @@
|
||||
return Default;
|
||||
}
|
||||
|
||||
static get DATA_KEY() {
|
||||
return DATA_KEY;
|
||||
static get DefaultType() {
|
||||
return DefaultType;
|
||||
}
|
||||
|
||||
static get NAME() {
|
||||
return NAME;
|
||||
} // Public
|
||||
|
||||
|
||||
next() {
|
||||
if (!this._isSliding) {
|
||||
this._slide(ORDER_NEXT);
|
||||
}
|
||||
this._slide(ORDER_NEXT);
|
||||
}
|
||||
|
||||
nextWhenVisible() {
|
||||
// FIXME TODO use `document.visibilityState`
|
||||
// Don't call next when the page isn't visible
|
||||
// or the carousel or its parent isn't visible
|
||||
if (!document.hidden && isVisible(this._element)) {
|
||||
if (!document.hidden && index.isVisible(this._element)) {
|
||||
this.next();
|
||||
}
|
||||
}
|
||||
|
||||
prev() {
|
||||
if (!this._isSliding) {
|
||||
this._slide(ORDER_PREV);
|
||||
}
|
||||
this._slide(ORDER_PREV);
|
||||
}
|
||||
|
||||
pause(event) {
|
||||
if (!event) {
|
||||
this._isPaused = true;
|
||||
pause() {
|
||||
if (this._isSliding) {
|
||||
index.triggerTransitionEnd(this._element);
|
||||
}
|
||||
|
||||
if (SelectorEngine__default['default'].findOne(SELECTOR_NEXT_PREV, this._element)) {
|
||||
triggerTransitionEnd(this._element);
|
||||
this.cycle(true);
|
||||
}
|
||||
|
||||
clearInterval(this._interval);
|
||||
this._interval = null;
|
||||
this._clearInterval();
|
||||
}
|
||||
|
||||
cycle(event) {
|
||||
if (!event) {
|
||||
this._isPaused = false;
|
||||
}
|
||||
cycle() {
|
||||
this._clearInterval();
|
||||
|
||||
if (this._interval) {
|
||||
clearInterval(this._interval);
|
||||
this._interval = null;
|
||||
}
|
||||
this._updateInterval();
|
||||
|
||||
if (this._config && this._config.interval && !this._isPaused) {
|
||||
this._updateInterval();
|
||||
|
||||
this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval);
|
||||
}
|
||||
this._interval = setInterval(() => this.nextWhenVisible(), this._config.interval);
|
||||
}
|
||||
|
||||
to(index) {
|
||||
this._activeElement = SelectorEngine__default['default'].findOne(SELECTOR_ACTIVE_ITEM, this._element);
|
||||
|
||||
const activeIndex = this._getItemIndex(this._activeElement);
|
||||
|
||||
if (index > this._items.length - 1 || index < 0) {
|
||||
_maybeEnableCycle() {
|
||||
if (!this._config.ride) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this._isSliding) {
|
||||
EventHandler__default['default'].one(this._element, EVENT_SLID, () => this.to(index));
|
||||
EventHandler__default.default.one(this._element, EVENT_SLID, () => this.cycle());
|
||||
return;
|
||||
}
|
||||
|
||||
this.cycle();
|
||||
}
|
||||
|
||||
to(index) {
|
||||
const items = this._getItems();
|
||||
|
||||
if (index > items.length - 1 || index < 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this._isSliding) {
|
||||
EventHandler__default.default.one(this._element, EVENT_SLID, () => this.to(index));
|
||||
return;
|
||||
}
|
||||
|
||||
const activeIndex = this._getItemIndex(this._getActive());
|
||||
|
||||
if (activeIndex === index) {
|
||||
this.pause();
|
||||
this.cycle();
|
||||
return;
|
||||
}
|
||||
|
||||
const order = index > activeIndex ? ORDER_NEXT : ORDER_PREV;
|
||||
|
||||
this._slide(order, this._items[index]);
|
||||
this._slide(order, items[index]);
|
||||
}
|
||||
|
||||
dispose() {
|
||||
this._items = null;
|
||||
this._config = null;
|
||||
this._interval = null;
|
||||
this._isPaused = null;
|
||||
this._isSliding = null;
|
||||
this._activeElement = null;
|
||||
this._indicatorsElement = null;
|
||||
if (this._swipeHelper) {
|
||||
this._swipeHelper.dispose();
|
||||
}
|
||||
|
||||
super.dispose();
|
||||
} // Private
|
||||
|
||||
|
||||
_getConfig(config) {
|
||||
config = { ...Default,
|
||||
...config
|
||||
};
|
||||
typeCheckConfig(NAME, config, DefaultType);
|
||||
_configAfterMerge(config) {
|
||||
config.defaultInterval = config.interval;
|
||||
return config;
|
||||
}
|
||||
|
||||
_handleSwipe() {
|
||||
const absDeltax = Math.abs(this.touchDeltaX);
|
||||
|
||||
if (absDeltax <= SWIPE_THRESHOLD) {
|
||||
return;
|
||||
}
|
||||
|
||||
const direction = absDeltax / this.touchDeltaX;
|
||||
this.touchDeltaX = 0;
|
||||
|
||||
if (!direction) {
|
||||
return;
|
||||
}
|
||||
|
||||
this._slide(direction > 0 ? DIRECTION_RIGHT : DIRECTION_LEFT);
|
||||
}
|
||||
|
||||
_addEventListeners() {
|
||||
if (this._config.keyboard) {
|
||||
EventHandler__default['default'].on(this._element, EVENT_KEYDOWN, event => this._keydown(event));
|
||||
EventHandler__default.default.on(this._element, EVENT_KEYDOWN, event => this._keydown(event));
|
||||
}
|
||||
|
||||
if (this._config.pause === 'hover') {
|
||||
EventHandler__default['default'].on(this._element, EVENT_MOUSEENTER, event => this.pause(event));
|
||||
EventHandler__default['default'].on(this._element, EVENT_MOUSELEAVE, event => this.cycle(event));
|
||||
EventHandler__default.default.on(this._element, EVENT_MOUSEENTER, () => this.pause());
|
||||
EventHandler__default.default.on(this._element, EVENT_MOUSELEAVE, () => this._maybeEnableCycle());
|
||||
}
|
||||
|
||||
if (this._config.touch && this._touchSupported) {
|
||||
if (this._config.touch && Swipe__default.default.isSupported()) {
|
||||
this._addTouchEventListeners();
|
||||
}
|
||||
}
|
||||
|
||||
_addTouchEventListeners() {
|
||||
const start = event => {
|
||||
if (this._pointerEvent && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH)) {
|
||||
this.touchStartX = event.clientX;
|
||||
} else if (!this._pointerEvent) {
|
||||
this.touchStartX = event.touches[0].clientX;
|
||||
}
|
||||
};
|
||||
|
||||
const move = event => {
|
||||
// ensure swiping with one touch and not pinching
|
||||
this.touchDeltaX = event.touches && event.touches.length > 1 ? 0 : event.touches[0].clientX - this.touchStartX;
|
||||
};
|
||||
|
||||
const end = event => {
|
||||
if (this._pointerEvent && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH)) {
|
||||
this.touchDeltaX = event.clientX - this.touchStartX;
|
||||
}
|
||||
|
||||
this._handleSwipe();
|
||||
|
||||
if (this._config.pause === 'hover') {
|
||||
// If it's a touch-enabled device, mouseenter/leave are fired as
|
||||
// part of the mouse compatibility events on first tap - the carousel
|
||||
// would stop cycling until user tapped out of it;
|
||||
// here, we listen for touchend, explicitly pause the carousel
|
||||
// (as if it's the second time we tap on it, mouseenter compat event
|
||||
// is NOT fired) and after a timeout (to allow for mouse compatibility
|
||||
// events to fire) we explicitly restart cycling
|
||||
this.pause();
|
||||
|
||||
if (this.touchTimeout) {
|
||||
clearTimeout(this.touchTimeout);
|
||||
}
|
||||
|
||||
this.touchTimeout = setTimeout(event => this.cycle(event), TOUCHEVENT_COMPAT_WAIT + this._config.interval);
|
||||
}
|
||||
};
|
||||
|
||||
SelectorEngine__default['default'].find(SELECTOR_ITEM_IMG, this._element).forEach(itemImg => {
|
||||
EventHandler__default['default'].on(itemImg, EVENT_DRAG_START, e => e.preventDefault());
|
||||
});
|
||||
|
||||
if (this._pointerEvent) {
|
||||
EventHandler__default['default'].on(this._element, EVENT_POINTERDOWN, event => start(event));
|
||||
EventHandler__default['default'].on(this._element, EVENT_POINTERUP, event => end(event));
|
||||
|
||||
this._element.classList.add(CLASS_NAME_POINTER_EVENT);
|
||||
} else {
|
||||
EventHandler__default['default'].on(this._element, EVENT_TOUCHSTART, event => start(event));
|
||||
EventHandler__default['default'].on(this._element, EVENT_TOUCHMOVE, event => move(event));
|
||||
EventHandler__default['default'].on(this._element, EVENT_TOUCHEND, event => end(event));
|
||||
for (const img of SelectorEngine__default.default.find(SELECTOR_ITEM_IMG, this._element)) {
|
||||
EventHandler__default.default.on(img, EVENT_DRAG_START, event => event.preventDefault());
|
||||
}
|
||||
|
||||
const endCallBack = () => {
|
||||
if (this._config.pause !== 'hover') {
|
||||
return;
|
||||
} // If it's a touch-enabled device, mouseenter/leave are fired as
|
||||
// part of the mouse compatibility events on first tap - the carousel
|
||||
// would stop cycling until user tapped out of it;
|
||||
// here, we listen for touchend, explicitly pause the carousel
|
||||
// (as if it's the second time we tap on it, mouseenter compat event
|
||||
// is NOT fired) and after a timeout (to allow for mouse compatibility
|
||||
// events to fire) we explicitly restart cycling
|
||||
|
||||
|
||||
this.pause();
|
||||
|
||||
if (this.touchTimeout) {
|
||||
clearTimeout(this.touchTimeout);
|
||||
}
|
||||
|
||||
this.touchTimeout = setTimeout(() => this._maybeEnableCycle(), TOUCHEVENT_COMPAT_WAIT + this._config.interval);
|
||||
};
|
||||
|
||||
const swipeConfig = {
|
||||
leftCallback: () => this._slide(this._directionToOrder(DIRECTION_LEFT)),
|
||||
rightCallback: () => this._slide(this._directionToOrder(DIRECTION_RIGHT)),
|
||||
endCallback: endCallBack
|
||||
};
|
||||
this._swipeHelper = new Swipe__default.default(this._element, swipeConfig);
|
||||
}
|
||||
|
||||
_keydown(event) {
|
||||
@@ -474,111 +254,72 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.key === ARROW_LEFT_KEY) {
|
||||
const direction = KEY_TO_DIRECTION[event.key];
|
||||
|
||||
if (direction) {
|
||||
event.preventDefault();
|
||||
|
||||
this._slide(DIRECTION_RIGHT);
|
||||
} else if (event.key === ARROW_RIGHT_KEY) {
|
||||
event.preventDefault();
|
||||
|
||||
this._slide(DIRECTION_LEFT);
|
||||
this._slide(this._directionToOrder(direction));
|
||||
}
|
||||
}
|
||||
|
||||
_getItemIndex(element) {
|
||||
this._items = element && element.parentNode ? SelectorEngine__default['default'].find(SELECTOR_ITEM, element.parentNode) : [];
|
||||
return this._items.indexOf(element);
|
||||
return this._getItems().indexOf(element);
|
||||
}
|
||||
|
||||
_getItemByOrder(order, activeElement) {
|
||||
const isNext = order === ORDER_NEXT;
|
||||
const isPrev = order === ORDER_PREV;
|
||||
|
||||
const activeIndex = this._getItemIndex(activeElement);
|
||||
|
||||
const lastItemIndex = this._items.length - 1;
|
||||
const isGoingToWrap = isPrev && activeIndex === 0 || isNext && activeIndex === lastItemIndex;
|
||||
|
||||
if (isGoingToWrap && !this._config.wrap) {
|
||||
return activeElement;
|
||||
_setActiveIndicatorElement(index) {
|
||||
if (!this._indicatorsElement) {
|
||||
return;
|
||||
}
|
||||
|
||||
const delta = isPrev ? -1 : 1;
|
||||
const itemIndex = (activeIndex + delta) % this._items.length;
|
||||
return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex];
|
||||
}
|
||||
const activeIndicator = SelectorEngine__default.default.findOne(SELECTOR_ACTIVE, this._indicatorsElement);
|
||||
activeIndicator.classList.remove(CLASS_NAME_ACTIVE);
|
||||
activeIndicator.removeAttribute('aria-current');
|
||||
const newActiveIndicator = SelectorEngine__default.default.findOne(`[data-bs-slide-to="${index}"]`, this._indicatorsElement);
|
||||
|
||||
_triggerSlideEvent(relatedTarget, eventDirectionName) {
|
||||
const targetIndex = this._getItemIndex(relatedTarget);
|
||||
|
||||
const fromIndex = this._getItemIndex(SelectorEngine__default['default'].findOne(SELECTOR_ACTIVE_ITEM, this._element));
|
||||
|
||||
return EventHandler__default['default'].trigger(this._element, EVENT_SLIDE, {
|
||||
relatedTarget,
|
||||
direction: eventDirectionName,
|
||||
from: fromIndex,
|
||||
to: targetIndex
|
||||
});
|
||||
}
|
||||
|
||||
_setActiveIndicatorElement(element) {
|
||||
if (this._indicatorsElement) {
|
||||
const activeIndicator = SelectorEngine__default['default'].findOne(SELECTOR_ACTIVE, this._indicatorsElement);
|
||||
activeIndicator.classList.remove(CLASS_NAME_ACTIVE);
|
||||
activeIndicator.removeAttribute('aria-current');
|
||||
const indicators = SelectorEngine__default['default'].find(SELECTOR_INDICATOR, this._indicatorsElement);
|
||||
|
||||
for (let i = 0; i < indicators.length; i++) {
|
||||
if (Number.parseInt(indicators[i].getAttribute('data-bs-slide-to'), 10) === this._getItemIndex(element)) {
|
||||
indicators[i].classList.add(CLASS_NAME_ACTIVE);
|
||||
indicators[i].setAttribute('aria-current', 'true');
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (newActiveIndicator) {
|
||||
newActiveIndicator.classList.add(CLASS_NAME_ACTIVE);
|
||||
newActiveIndicator.setAttribute('aria-current', 'true');
|
||||
}
|
||||
}
|
||||
|
||||
_updateInterval() {
|
||||
const element = this._activeElement || SelectorEngine__default['default'].findOne(SELECTOR_ACTIVE_ITEM, this._element);
|
||||
const element = this._activeElement || this._getActive();
|
||||
|
||||
if (!element) {
|
||||
return;
|
||||
}
|
||||
|
||||
const elementInterval = Number.parseInt(element.getAttribute('data-bs-interval'), 10);
|
||||
|
||||
if (elementInterval) {
|
||||
this._config.defaultInterval = this._config.defaultInterval || this._config.interval;
|
||||
this._config.interval = elementInterval;
|
||||
} else {
|
||||
this._config.interval = this._config.defaultInterval || this._config.interval;
|
||||
}
|
||||
this._config.interval = elementInterval || this._config.defaultInterval;
|
||||
}
|
||||
|
||||
_slide(directionOrOrder, element) {
|
||||
const order = this._directionToOrder(directionOrOrder);
|
||||
|
||||
const activeElement = SelectorEngine__default['default'].findOne(SELECTOR_ACTIVE_ITEM, this._element);
|
||||
|
||||
const activeElementIndex = this._getItemIndex(activeElement);
|
||||
|
||||
const nextElement = element || this._getItemByOrder(order, activeElement);
|
||||
|
||||
const nextElementIndex = this._getItemIndex(nextElement);
|
||||
|
||||
const isCycling = Boolean(this._interval);
|
||||
const isNext = order === ORDER_NEXT;
|
||||
const directionalClassName = isNext ? CLASS_NAME_START : CLASS_NAME_END;
|
||||
const orderClassName = isNext ? CLASS_NAME_NEXT : CLASS_NAME_PREV;
|
||||
|
||||
const eventDirectionName = this._orderToDirection(order);
|
||||
|
||||
if (nextElement && nextElement.classList.contains(CLASS_NAME_ACTIVE)) {
|
||||
this._isSliding = false;
|
||||
_slide(order, element = null) {
|
||||
if (this._isSliding) {
|
||||
return;
|
||||
}
|
||||
|
||||
const slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName);
|
||||
const activeElement = this._getActive();
|
||||
|
||||
const isNext = order === ORDER_NEXT;
|
||||
const nextElement = element || index.getNextActiveElement(this._getItems(), activeElement, isNext, this._config.wrap);
|
||||
|
||||
if (nextElement === activeElement) {
|
||||
return;
|
||||
}
|
||||
|
||||
const nextElementIndex = this._getItemIndex(nextElement);
|
||||
|
||||
const triggerEvent = eventName => {
|
||||
return EventHandler__default.default.trigger(this._element, eventName, {
|
||||
relatedTarget: nextElement,
|
||||
direction: this._orderToDirection(order),
|
||||
from: this._getItemIndex(activeElement),
|
||||
to: nextElementIndex
|
||||
});
|
||||
};
|
||||
|
||||
const slideEvent = triggerEvent(EVENT_SLIDE);
|
||||
|
||||
if (slideEvent.defaultPrevented) {
|
||||
return;
|
||||
@@ -586,63 +327,60 @@
|
||||
|
||||
if (!activeElement || !nextElement) {
|
||||
// Some weirdness is happening, so we bail
|
||||
// todo: change tests that use empty divs to avoid this check
|
||||
return;
|
||||
}
|
||||
|
||||
const isCycling = Boolean(this._interval);
|
||||
this.pause();
|
||||
this._isSliding = true;
|
||||
|
||||
if (isCycling) {
|
||||
this.pause();
|
||||
}
|
||||
|
||||
this._setActiveIndicatorElement(nextElement);
|
||||
this._setActiveIndicatorElement(nextElementIndex);
|
||||
|
||||
this._activeElement = nextElement;
|
||||
const directionalClassName = isNext ? CLASS_NAME_START : CLASS_NAME_END;
|
||||
const orderClassName = isNext ? CLASS_NAME_NEXT : CLASS_NAME_PREV;
|
||||
nextElement.classList.add(orderClassName);
|
||||
index.reflow(nextElement);
|
||||
activeElement.classList.add(directionalClassName);
|
||||
nextElement.classList.add(directionalClassName);
|
||||
|
||||
if (this._element.classList.contains(CLASS_NAME_SLIDE)) {
|
||||
nextElement.classList.add(orderClassName);
|
||||
reflow(nextElement);
|
||||
activeElement.classList.add(directionalClassName);
|
||||
nextElement.classList.add(directionalClassName);
|
||||
const transitionDuration = getTransitionDurationFromElement(activeElement);
|
||||
EventHandler__default['default'].one(activeElement, 'transitionend', () => {
|
||||
nextElement.classList.remove(directionalClassName, orderClassName);
|
||||
nextElement.classList.add(CLASS_NAME_ACTIVE);
|
||||
activeElement.classList.remove(CLASS_NAME_ACTIVE, orderClassName, directionalClassName);
|
||||
this._isSliding = false;
|
||||
setTimeout(() => {
|
||||
EventHandler__default['default'].trigger(this._element, EVENT_SLID, {
|
||||
relatedTarget: nextElement,
|
||||
direction: eventDirectionName,
|
||||
from: activeElementIndex,
|
||||
to: nextElementIndex
|
||||
});
|
||||
}, 0);
|
||||
});
|
||||
emulateTransitionEnd(activeElement, transitionDuration);
|
||||
} else {
|
||||
activeElement.classList.remove(CLASS_NAME_ACTIVE);
|
||||
const completeCallBack = () => {
|
||||
nextElement.classList.remove(directionalClassName, orderClassName);
|
||||
nextElement.classList.add(CLASS_NAME_ACTIVE);
|
||||
activeElement.classList.remove(CLASS_NAME_ACTIVE, orderClassName, directionalClassName);
|
||||
this._isSliding = false;
|
||||
EventHandler__default['default'].trigger(this._element, EVENT_SLID, {
|
||||
relatedTarget: nextElement,
|
||||
direction: eventDirectionName,
|
||||
from: activeElementIndex,
|
||||
to: nextElementIndex
|
||||
});
|
||||
}
|
||||
triggerEvent(EVENT_SLID);
|
||||
};
|
||||
|
||||
this._queueCallback(completeCallBack, activeElement, this._isAnimated());
|
||||
|
||||
if (isCycling) {
|
||||
this.cycle();
|
||||
}
|
||||
}
|
||||
|
||||
_directionToOrder(direction) {
|
||||
if (![DIRECTION_RIGHT, DIRECTION_LEFT].includes(direction)) {
|
||||
return direction;
|
||||
}
|
||||
_isAnimated() {
|
||||
return this._element.classList.contains(CLASS_NAME_SLIDE);
|
||||
}
|
||||
|
||||
if (isRTL()) {
|
||||
_getActive() {
|
||||
return SelectorEngine__default.default.findOne(SELECTOR_ACTIVE_ITEM, this._element);
|
||||
}
|
||||
|
||||
_getItems() {
|
||||
return SelectorEngine__default.default.find(SELECTOR_ITEM, this._element);
|
||||
}
|
||||
|
||||
_clearInterval() {
|
||||
if (this._interval) {
|
||||
clearInterval(this._interval);
|
||||
this._interval = null;
|
||||
}
|
||||
}
|
||||
|
||||
_directionToOrder(direction) {
|
||||
if (index.isRTL()) {
|
||||
return direction === DIRECTION_LEFT ? ORDER_PREV : ORDER_NEXT;
|
||||
}
|
||||
|
||||
@@ -650,11 +388,7 @@
|
||||
}
|
||||
|
||||
_orderToDirection(order) {
|
||||
if (![ORDER_NEXT, ORDER_PREV].includes(order)) {
|
||||
return order;
|
||||
}
|
||||
|
||||
if (isRTL()) {
|
||||
if (index.isRTL()) {
|
||||
return order === ORDER_PREV ? DIRECTION_LEFT : DIRECTION_RIGHT;
|
||||
}
|
||||
|
||||
@@ -662,95 +396,76 @@
|
||||
} // Static
|
||||
|
||||
|
||||
static carouselInterface(element, config) {
|
||||
let data = Data__default['default'].get(element, DATA_KEY);
|
||||
let _config = { ...Default,
|
||||
...Manipulator__default['default'].getDataAttributes(element)
|
||||
};
|
||||
|
||||
if (typeof config === 'object') {
|
||||
_config = { ..._config,
|
||||
...config
|
||||
};
|
||||
}
|
||||
|
||||
const action = typeof config === 'string' ? config : _config.slide;
|
||||
|
||||
if (!data) {
|
||||
data = new Carousel(element, _config);
|
||||
}
|
||||
|
||||
if (typeof config === 'number') {
|
||||
data.to(config);
|
||||
} else if (typeof action === 'string') {
|
||||
if (typeof data[action] === 'undefined') {
|
||||
throw new TypeError(`No method named "${action}"`);
|
||||
}
|
||||
|
||||
data[action]();
|
||||
} else if (_config.interval && _config.ride) {
|
||||
data.pause();
|
||||
data.cycle();
|
||||
}
|
||||
}
|
||||
|
||||
static jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
Carousel.carouselInterface(this, config);
|
||||
const data = Carousel.getOrCreateInstance(this, config);
|
||||
|
||||
if (typeof config === 'number') {
|
||||
data.to(config);
|
||||
return;
|
||||
}
|
||||
|
||||
if (typeof config === 'string') {
|
||||
if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {
|
||||
throw new TypeError(`No method named "${config}"`);
|
||||
}
|
||||
|
||||
data[config]();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
static dataApiClickHandler(event) {
|
||||
const target = getElementFromSelector(this);
|
||||
|
||||
if (!target || !target.classList.contains(CLASS_NAME_CAROUSEL)) {
|
||||
return;
|
||||
}
|
||||
|
||||
const config = { ...Manipulator__default['default'].getDataAttributes(target),
|
||||
...Manipulator__default['default'].getDataAttributes(this)
|
||||
};
|
||||
const slideIndex = this.getAttribute('data-bs-slide-to');
|
||||
|
||||
if (slideIndex) {
|
||||
config.interval = false;
|
||||
}
|
||||
|
||||
Carousel.carouselInterface(target, config);
|
||||
|
||||
if (slideIndex) {
|
||||
Data__default['default'].get(target, DATA_KEY).to(slideIndex);
|
||||
}
|
||||
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
* Data API implementation
|
||||
*/
|
||||
|
||||
|
||||
EventHandler__default['default'].on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_SLIDE, Carousel.dataApiClickHandler);
|
||||
EventHandler__default['default'].on(window, EVENT_LOAD_DATA_API, () => {
|
||||
const carousels = SelectorEngine__default['default'].find(SELECTOR_DATA_RIDE);
|
||||
EventHandler__default.default.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_SLIDE, function (event) {
|
||||
const target = index.getElementFromSelector(this);
|
||||
|
||||
for (let i = 0, len = carousels.length; i < len; i++) {
|
||||
Carousel.carouselInterface(carousels[i], Data__default['default'].get(carousels[i], DATA_KEY));
|
||||
if (!target || !target.classList.contains(CLASS_NAME_CAROUSEL)) {
|
||||
return;
|
||||
}
|
||||
|
||||
event.preventDefault();
|
||||
const carousel = Carousel.getOrCreateInstance(target);
|
||||
const slideIndex = this.getAttribute('data-bs-slide-to');
|
||||
|
||||
if (slideIndex) {
|
||||
carousel.to(slideIndex);
|
||||
|
||||
carousel._maybeEnableCycle();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (Manipulator__default.default.getDataAttribute(this, 'slide') === 'next') {
|
||||
carousel.next();
|
||||
|
||||
carousel._maybeEnableCycle();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
carousel.prev();
|
||||
|
||||
carousel._maybeEnableCycle();
|
||||
});
|
||||
EventHandler__default.default.on(window, EVENT_LOAD_DATA_API, () => {
|
||||
const carousels = SelectorEngine__default.default.find(SELECTOR_DATA_RIDE);
|
||||
|
||||
for (const carousel of carousels) {
|
||||
Carousel.getOrCreateInstance(carousel);
|
||||
}
|
||||
});
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
* add .Carousel to jQuery only if jQuery is present
|
||||
*/
|
||||
|
||||
defineJQueryPlugin(NAME, Carousel);
|
||||
index.defineJQueryPlugin(Carousel);
|
||||
|
||||
return Carousel;
|
||||
|
||||
})));
|
||||
}));
|
||||
//# sourceMappingURL=carousel.js.map
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+128
-368
@@ -1,201 +1,34 @@
|
||||
/*!
|
||||
* Bootstrap collapse.js v5.0.0 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Bootstrap collapse.js v5.2.2 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js'), require('./base-component.js')) :
|
||||
typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './dom/manipulator', './dom/selector-engine', './base-component'], factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Collapse = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine, global.Base));
|
||||
}(this, (function (Data, EventHandler, Manipulator, SelectorEngine, BaseComponent) { 'use strict';
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./util/index'), require('./dom/event-handler'), require('./dom/selector-engine'), require('./base-component')) :
|
||||
typeof define === 'function' && define.amd ? define(['./util/index', './dom/event-handler', './dom/selector-engine', './base-component'], factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Collapse = factory(global.Index, global.EventHandler, global.SelectorEngine, global.BaseComponent));
|
||||
})(this, (function (index, EventHandler, SelectorEngine, BaseComponent) { 'use strict';
|
||||
|
||||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
||||
const _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { default: e };
|
||||
|
||||
var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
|
||||
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
|
||||
var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator);
|
||||
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
|
||||
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
|
||||
const EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
|
||||
const SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
|
||||
const BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.0.0): util/index.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
const MILLISECONDS_MULTIPLIER = 1000;
|
||||
const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
|
||||
|
||||
const toType = obj => {
|
||||
if (obj === null || obj === undefined) {
|
||||
return `${obj}`;
|
||||
}
|
||||
|
||||
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
|
||||
};
|
||||
|
||||
const getSelector = element => {
|
||||
let selector = element.getAttribute('data-bs-target');
|
||||
|
||||
if (!selector || selector === '#') {
|
||||
let hrefAttr = element.getAttribute('href'); // The only valid content that could double as a selector are IDs or classes,
|
||||
// so everything starting with `#` or `.`. If a "real" URL is used as the selector,
|
||||
// `document.querySelector` will rightfully complain it is invalid.
|
||||
// See https://github.com/twbs/bootstrap/issues/32273
|
||||
|
||||
if (!hrefAttr || !hrefAttr.includes('#') && !hrefAttr.startsWith('.')) {
|
||||
return null;
|
||||
} // Just in case some CMS puts out a full URL with the anchor appended
|
||||
|
||||
|
||||
if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) {
|
||||
hrefAttr = `#${hrefAttr.split('#')[1]}`;
|
||||
}
|
||||
|
||||
selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null;
|
||||
}
|
||||
|
||||
return selector;
|
||||
};
|
||||
|
||||
const getSelectorFromElement = element => {
|
||||
const selector = getSelector(element);
|
||||
|
||||
if (selector) {
|
||||
return document.querySelector(selector) ? selector : null;
|
||||
}
|
||||
|
||||
return null;
|
||||
};
|
||||
|
||||
const getElementFromSelector = element => {
|
||||
const selector = getSelector(element);
|
||||
return selector ? document.querySelector(selector) : null;
|
||||
};
|
||||
|
||||
const getTransitionDurationFromElement = element => {
|
||||
if (!element) {
|
||||
return 0;
|
||||
} // Get transition-duration of the element
|
||||
|
||||
|
||||
let {
|
||||
transitionDuration,
|
||||
transitionDelay
|
||||
} = window.getComputedStyle(element);
|
||||
const floatTransitionDuration = Number.parseFloat(transitionDuration);
|
||||
const floatTransitionDelay = Number.parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
|
||||
|
||||
if (!floatTransitionDuration && !floatTransitionDelay) {
|
||||
return 0;
|
||||
} // If multiple durations are defined, take the first
|
||||
|
||||
|
||||
transitionDuration = transitionDuration.split(',')[0];
|
||||
transitionDelay = transitionDelay.split(',')[0];
|
||||
return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
|
||||
};
|
||||
|
||||
const triggerTransitionEnd = element => {
|
||||
element.dispatchEvent(new Event(TRANSITION_END));
|
||||
};
|
||||
|
||||
const isElement = obj => (obj[0] || obj).nodeType;
|
||||
|
||||
const emulateTransitionEnd = (element, duration) => {
|
||||
let called = false;
|
||||
const durationPadding = 5;
|
||||
const emulatedDuration = duration + durationPadding;
|
||||
|
||||
function listener() {
|
||||
called = true;
|
||||
element.removeEventListener(TRANSITION_END, listener);
|
||||
}
|
||||
|
||||
element.addEventListener(TRANSITION_END, listener);
|
||||
setTimeout(() => {
|
||||
if (!called) {
|
||||
triggerTransitionEnd(element);
|
||||
}
|
||||
}, emulatedDuration);
|
||||
};
|
||||
|
||||
const typeCheckConfig = (componentName, config, configTypes) => {
|
||||
Object.keys(configTypes).forEach(property => {
|
||||
const expectedTypes = configTypes[property];
|
||||
const value = config[property];
|
||||
const valueType = value && isElement(value) ? 'element' : toType(value);
|
||||
|
||||
if (!new RegExp(expectedTypes).test(valueType)) {
|
||||
throw new TypeError(`${componentName.toUpperCase()}: Option "${property}" provided type "${valueType}" but expected type "${expectedTypes}".`);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const reflow = element => element.offsetHeight;
|
||||
|
||||
const getjQuery = () => {
|
||||
const {
|
||||
jQuery
|
||||
} = window;
|
||||
|
||||
if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
|
||||
return jQuery;
|
||||
}
|
||||
|
||||
return null;
|
||||
};
|
||||
|
||||
const onDOMContentLoaded = callback => {
|
||||
if (document.readyState === 'loading') {
|
||||
document.addEventListener('DOMContentLoaded', callback);
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
|
||||
const defineJQueryPlugin = (name, plugin) => {
|
||||
onDOMContentLoaded(() => {
|
||||
const $ = getjQuery();
|
||||
/* istanbul ignore if */
|
||||
|
||||
if ($) {
|
||||
const JQUERY_NO_CONFLICT = $.fn[name];
|
||||
$.fn[name] = plugin.jQueryInterface;
|
||||
$.fn[name].Constructor = plugin;
|
||||
|
||||
$.fn[name].noConflict = () => {
|
||||
$.fn[name] = JQUERY_NO_CONFLICT;
|
||||
return plugin.jQueryInterface;
|
||||
};
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.0.0): collapse.js
|
||||
* Bootstrap (v5.2.2): collapse.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
const NAME = 'collapse';
|
||||
const DATA_KEY = 'bs.collapse';
|
||||
const EVENT_KEY = `.${DATA_KEY}`;
|
||||
const DATA_API_KEY = '.data-api';
|
||||
const Default = {
|
||||
toggle: true,
|
||||
parent: ''
|
||||
};
|
||||
const DefaultType = {
|
||||
toggle: 'boolean',
|
||||
parent: '(string|element)'
|
||||
};
|
||||
const EVENT_SHOW = `show${EVENT_KEY}`;
|
||||
const EVENT_SHOWN = `shown${EVENT_KEY}`;
|
||||
const EVENT_HIDE = `hide${EVENT_KEY}`;
|
||||
@@ -205,40 +38,44 @@
|
||||
const CLASS_NAME_COLLAPSE = 'collapse';
|
||||
const CLASS_NAME_COLLAPSING = 'collapsing';
|
||||
const CLASS_NAME_COLLAPSED = 'collapsed';
|
||||
const CLASS_NAME_DEEPER_CHILDREN = `:scope .${CLASS_NAME_COLLAPSE} .${CLASS_NAME_COLLAPSE}`;
|
||||
const CLASS_NAME_HORIZONTAL = 'collapse-horizontal';
|
||||
const WIDTH = 'width';
|
||||
const HEIGHT = 'height';
|
||||
const SELECTOR_ACTIVES = '.show, .collapsing';
|
||||
const SELECTOR_ACTIVES = '.collapse.show, .collapse.collapsing';
|
||||
const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="collapse"]';
|
||||
const Default = {
|
||||
parent: null,
|
||||
toggle: true
|
||||
};
|
||||
const DefaultType = {
|
||||
parent: '(null|element)',
|
||||
toggle: 'boolean'
|
||||
};
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
* Class definition
|
||||
*/
|
||||
|
||||
class Collapse extends BaseComponent__default['default'] {
|
||||
class Collapse extends BaseComponent__default.default {
|
||||
constructor(element, config) {
|
||||
super(element);
|
||||
super(element, config);
|
||||
this._isTransitioning = false;
|
||||
this._config = this._getConfig(config);
|
||||
this._triggerArray = SelectorEngine__default['default'].find(`${SELECTOR_DATA_TOGGLE}[href="#${this._element.id}"],` + `${SELECTOR_DATA_TOGGLE}[data-bs-target="#${this._element.id}"]`);
|
||||
const toggleList = SelectorEngine__default['default'].find(SELECTOR_DATA_TOGGLE);
|
||||
this._triggerArray = [];
|
||||
const toggleList = SelectorEngine__default.default.find(SELECTOR_DATA_TOGGLE);
|
||||
|
||||
for (let i = 0, len = toggleList.length; i < len; i++) {
|
||||
const elem = toggleList[i];
|
||||
const selector = getSelectorFromElement(elem);
|
||||
const filterElement = SelectorEngine__default['default'].find(selector).filter(foundElem => foundElem === this._element);
|
||||
for (const elem of toggleList) {
|
||||
const selector = index.getSelectorFromElement(elem);
|
||||
const filterElement = SelectorEngine__default.default.find(selector).filter(foundElement => foundElement === this._element);
|
||||
|
||||
if (selector !== null && filterElement.length) {
|
||||
this._selector = selector;
|
||||
|
||||
this._triggerArray.push(elem);
|
||||
}
|
||||
}
|
||||
|
||||
this._parent = this._config.parent ? this._getParent() : null;
|
||||
this._initializeChildren();
|
||||
|
||||
if (!this._config.parent) {
|
||||
this._addAriaAndCollapsedClass(this._element, this._triggerArray);
|
||||
this._addAriaAndCollapsedClass(this._triggerArray, this._isShown());
|
||||
}
|
||||
|
||||
if (this._config.toggle) {
|
||||
@@ -251,13 +88,17 @@
|
||||
return Default;
|
||||
}
|
||||
|
||||
static get DATA_KEY() {
|
||||
return DATA_KEY;
|
||||
static get DefaultType() {
|
||||
return DefaultType;
|
||||
}
|
||||
|
||||
static get NAME() {
|
||||
return NAME;
|
||||
} // Public
|
||||
|
||||
|
||||
toggle() {
|
||||
if (this._element.classList.contains(CLASS_NAME_SHOW)) {
|
||||
if (this._isShown()) {
|
||||
this.hide();
|
||||
} else {
|
||||
this.show();
|
||||
@@ -265,54 +106,30 @@
|
||||
}
|
||||
|
||||
show() {
|
||||
if (this._isTransitioning || this._element.classList.contains(CLASS_NAME_SHOW)) {
|
||||
if (this._isTransitioning || this._isShown()) {
|
||||
return;
|
||||
}
|
||||
|
||||
let actives;
|
||||
let activesData;
|
||||
let activeChildren = []; // find active children
|
||||
|
||||
if (this._parent) {
|
||||
actives = SelectorEngine__default['default'].find(SELECTOR_ACTIVES, this._parent).filter(elem => {
|
||||
if (typeof this._config.parent === 'string') {
|
||||
return elem.getAttribute('data-bs-parent') === this._config.parent;
|
||||
}
|
||||
|
||||
return elem.classList.contains(CLASS_NAME_COLLAPSE);
|
||||
});
|
||||
|
||||
if (actives.length === 0) {
|
||||
actives = null;
|
||||
}
|
||||
if (this._config.parent) {
|
||||
activeChildren = this._getFirstLevelChildren(SELECTOR_ACTIVES).filter(element => element !== this._element).map(element => Collapse.getOrCreateInstance(element, {
|
||||
toggle: false
|
||||
}));
|
||||
}
|
||||
|
||||
const container = SelectorEngine__default['default'].findOne(this._selector);
|
||||
|
||||
if (actives) {
|
||||
const tempActiveData = actives.find(elem => container !== elem);
|
||||
activesData = tempActiveData ? Data__default['default'].get(tempActiveData, DATA_KEY) : null;
|
||||
|
||||
if (activesData && activesData._isTransitioning) {
|
||||
return;
|
||||
}
|
||||
if (activeChildren.length && activeChildren[0]._isTransitioning) {
|
||||
return;
|
||||
}
|
||||
|
||||
const startEvent = EventHandler__default['default'].trigger(this._element, EVENT_SHOW);
|
||||
const startEvent = EventHandler__default.default.trigger(this._element, EVENT_SHOW);
|
||||
|
||||
if (startEvent.defaultPrevented) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (actives) {
|
||||
actives.forEach(elemActive => {
|
||||
if (container !== elemActive) {
|
||||
Collapse.collapseInterface(elemActive, 'hide');
|
||||
}
|
||||
|
||||
if (!activesData) {
|
||||
Data__default['default'].set(elemActive, DATA_KEY, null);
|
||||
}
|
||||
});
|
||||
for (const activeInstance of activeChildren) {
|
||||
activeInstance.hide();
|
||||
}
|
||||
|
||||
const dimension = this._getDimension();
|
||||
@@ -323,39 +140,35 @@
|
||||
|
||||
this._element.style[dimension] = 0;
|
||||
|
||||
if (this._triggerArray.length) {
|
||||
this._triggerArray.forEach(element => {
|
||||
element.classList.remove(CLASS_NAME_COLLAPSED);
|
||||
element.setAttribute('aria-expanded', true);
|
||||
});
|
||||
}
|
||||
this._addAriaAndCollapsedClass(this._triggerArray, true);
|
||||
|
||||
this.setTransitioning(true);
|
||||
this._isTransitioning = true;
|
||||
|
||||
const complete = () => {
|
||||
this._isTransitioning = false;
|
||||
|
||||
this._element.classList.remove(CLASS_NAME_COLLAPSING);
|
||||
|
||||
this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW);
|
||||
|
||||
this._element.style[dimension] = '';
|
||||
this.setTransitioning(false);
|
||||
EventHandler__default['default'].trigger(this._element, EVENT_SHOWN);
|
||||
EventHandler__default.default.trigger(this._element, EVENT_SHOWN);
|
||||
};
|
||||
|
||||
const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
|
||||
const scrollSize = `scroll${capitalizedDimension}`;
|
||||
const transitionDuration = getTransitionDurationFromElement(this._element);
|
||||
EventHandler__default['default'].one(this._element, 'transitionend', complete);
|
||||
emulateTransitionEnd(this._element, transitionDuration);
|
||||
|
||||
this._queueCallback(complete, this._element, true);
|
||||
|
||||
this._element.style[dimension] = `${this._element[scrollSize]}px`;
|
||||
}
|
||||
|
||||
hide() {
|
||||
if (this._isTransitioning || !this._element.classList.contains(CLASS_NAME_SHOW)) {
|
||||
if (this._isTransitioning || !this._isShown()) {
|
||||
return;
|
||||
}
|
||||
|
||||
const startEvent = EventHandler__default['default'].trigger(this._element, EVENT_HIDE);
|
||||
const startEvent = EventHandler__default.default.trigger(this._element, EVENT_HIDE);
|
||||
|
||||
if (startEvent.defaultPrevented) {
|
||||
return;
|
||||
@@ -364,188 +177,135 @@
|
||||
const dimension = this._getDimension();
|
||||
|
||||
this._element.style[dimension] = `${this._element.getBoundingClientRect()[dimension]}px`;
|
||||
reflow(this._element);
|
||||
index.reflow(this._element);
|
||||
|
||||
this._element.classList.add(CLASS_NAME_COLLAPSING);
|
||||
|
||||
this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW);
|
||||
|
||||
const triggerArrayLength = this._triggerArray.length;
|
||||
for (const trigger of this._triggerArray) {
|
||||
const element = index.getElementFromSelector(trigger);
|
||||
|
||||
if (triggerArrayLength > 0) {
|
||||
for (let i = 0; i < triggerArrayLength; i++) {
|
||||
const trigger = this._triggerArray[i];
|
||||
const elem = getElementFromSelector(trigger);
|
||||
|
||||
if (elem && !elem.classList.contains(CLASS_NAME_SHOW)) {
|
||||
trigger.classList.add(CLASS_NAME_COLLAPSED);
|
||||
trigger.setAttribute('aria-expanded', false);
|
||||
}
|
||||
if (element && !this._isShown(element)) {
|
||||
this._addAriaAndCollapsedClass([trigger], false);
|
||||
}
|
||||
}
|
||||
|
||||
this.setTransitioning(true);
|
||||
this._isTransitioning = true;
|
||||
|
||||
const complete = () => {
|
||||
this.setTransitioning(false);
|
||||
this._isTransitioning = false;
|
||||
|
||||
this._element.classList.remove(CLASS_NAME_COLLAPSING);
|
||||
|
||||
this._element.classList.add(CLASS_NAME_COLLAPSE);
|
||||
|
||||
EventHandler__default['default'].trigger(this._element, EVENT_HIDDEN);
|
||||
EventHandler__default.default.trigger(this._element, EVENT_HIDDEN);
|
||||
};
|
||||
|
||||
this._element.style[dimension] = '';
|
||||
const transitionDuration = getTransitionDurationFromElement(this._element);
|
||||
EventHandler__default['default'].one(this._element, 'transitionend', complete);
|
||||
emulateTransitionEnd(this._element, transitionDuration);
|
||||
|
||||
this._queueCallback(complete, this._element, true);
|
||||
}
|
||||
|
||||
setTransitioning(isTransitioning) {
|
||||
this._isTransitioning = isTransitioning;
|
||||
}
|
||||
|
||||
dispose() {
|
||||
super.dispose();
|
||||
this._config = null;
|
||||
this._parent = null;
|
||||
this._triggerArray = null;
|
||||
this._isTransitioning = null;
|
||||
_isShown(element = this._element) {
|
||||
return element.classList.contains(CLASS_NAME_SHOW);
|
||||
} // Private
|
||||
|
||||
|
||||
_getConfig(config) {
|
||||
config = { ...Default,
|
||||
...config
|
||||
};
|
||||
_configAfterMerge(config) {
|
||||
config.toggle = Boolean(config.toggle); // Coerce string values
|
||||
|
||||
typeCheckConfig(NAME, config, DefaultType);
|
||||
config.parent = index.getElement(config.parent);
|
||||
return config;
|
||||
}
|
||||
|
||||
_getDimension() {
|
||||
return this._element.classList.contains(WIDTH) ? WIDTH : HEIGHT;
|
||||
return this._element.classList.contains(CLASS_NAME_HORIZONTAL) ? WIDTH : HEIGHT;
|
||||
}
|
||||
|
||||
_getParent() {
|
||||
let {
|
||||
parent
|
||||
} = this._config;
|
||||
|
||||
if (isElement(parent)) {
|
||||
// it's a jQuery object
|
||||
if (typeof parent.jquery !== 'undefined' || typeof parent[0] !== 'undefined') {
|
||||
parent = parent[0];
|
||||
}
|
||||
} else {
|
||||
parent = SelectorEngine__default['default'].findOne(parent);
|
||||
}
|
||||
|
||||
const selector = `${SELECTOR_DATA_TOGGLE}[data-bs-parent="${parent}"]`;
|
||||
SelectorEngine__default['default'].find(selector, parent).forEach(element => {
|
||||
const selected = getElementFromSelector(element);
|
||||
|
||||
this._addAriaAndCollapsedClass(selected, [element]);
|
||||
});
|
||||
return parent;
|
||||
}
|
||||
|
||||
_addAriaAndCollapsedClass(element, triggerArray) {
|
||||
if (!element || !triggerArray.length) {
|
||||
_initializeChildren() {
|
||||
if (!this._config.parent) {
|
||||
return;
|
||||
}
|
||||
|
||||
const isOpen = element.classList.contains(CLASS_NAME_SHOW);
|
||||
triggerArray.forEach(elem => {
|
||||
if (isOpen) {
|
||||
elem.classList.remove(CLASS_NAME_COLLAPSED);
|
||||
} else {
|
||||
elem.classList.add(CLASS_NAME_COLLAPSED);
|
||||
const children = this._getFirstLevelChildren(SELECTOR_DATA_TOGGLE);
|
||||
|
||||
for (const element of children) {
|
||||
const selected = index.getElementFromSelector(element);
|
||||
|
||||
if (selected) {
|
||||
this._addAriaAndCollapsedClass([element], this._isShown(selected));
|
||||
}
|
||||
|
||||
elem.setAttribute('aria-expanded', isOpen);
|
||||
});
|
||||
} // Static
|
||||
|
||||
|
||||
static collapseInterface(element, config) {
|
||||
let data = Data__default['default'].get(element, DATA_KEY);
|
||||
const _config = { ...Default,
|
||||
...Manipulator__default['default'].getDataAttributes(element),
|
||||
...(typeof config === 'object' && config ? config : {})
|
||||
};
|
||||
|
||||
if (!data && _config.toggle && typeof config === 'string' && /show|hide/.test(config)) {
|
||||
_config.toggle = false;
|
||||
}
|
||||
|
||||
if (!data) {
|
||||
data = new Collapse(element, _config);
|
||||
}
|
||||
|
||||
if (typeof config === 'string') {
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError(`No method named "${config}"`);
|
||||
}
|
||||
|
||||
data[config]();
|
||||
}
|
||||
}
|
||||
|
||||
_getFirstLevelChildren(selector) {
|
||||
const children = SelectorEngine__default.default.find(CLASS_NAME_DEEPER_CHILDREN, this._config.parent); // remove children if greater depth
|
||||
|
||||
return SelectorEngine__default.default.find(selector, this._config.parent).filter(element => !children.includes(element));
|
||||
}
|
||||
|
||||
_addAriaAndCollapsedClass(triggerArray, isOpen) {
|
||||
if (!triggerArray.length) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (const element of triggerArray) {
|
||||
element.classList.toggle(CLASS_NAME_COLLAPSED, !isOpen);
|
||||
element.setAttribute('aria-expanded', isOpen);
|
||||
}
|
||||
} // Static
|
||||
|
||||
|
||||
static jQueryInterface(config) {
|
||||
const _config = {};
|
||||
|
||||
if (typeof config === 'string' && /show|hide/.test(config)) {
|
||||
_config.toggle = false;
|
||||
}
|
||||
|
||||
return this.each(function () {
|
||||
Collapse.collapseInterface(this, config);
|
||||
const data = Collapse.getOrCreateInstance(this, _config);
|
||||
|
||||
if (typeof config === 'string') {
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError(`No method named "${config}"`);
|
||||
}
|
||||
|
||||
data[config]();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
* Data API implementation
|
||||
*/
|
||||
|
||||
|
||||
EventHandler__default['default'].on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
|
||||
EventHandler__default.default.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
|
||||
// preventDefault only for <a> elements (which change the URL) not inside the collapsible element
|
||||
if (event.target.tagName === 'A' || event.delegateTarget && event.delegateTarget.tagName === 'A') {
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
const triggerData = Manipulator__default['default'].getDataAttributes(this);
|
||||
const selector = getSelectorFromElement(this);
|
||||
const selectorElements = SelectorEngine__default['default'].find(selector);
|
||||
selectorElements.forEach(element => {
|
||||
const data = Data__default['default'].get(element, DATA_KEY);
|
||||
let config;
|
||||
const selector = index.getSelectorFromElement(this);
|
||||
const selectorElements = SelectorEngine__default.default.find(selector);
|
||||
|
||||
if (data) {
|
||||
// update parent attribute
|
||||
if (data._parent === null && typeof triggerData.parent === 'string') {
|
||||
data._config.parent = triggerData.parent;
|
||||
data._parent = data._getParent();
|
||||
}
|
||||
|
||||
config = 'toggle';
|
||||
} else {
|
||||
config = triggerData;
|
||||
}
|
||||
|
||||
Collapse.collapseInterface(element, config);
|
||||
});
|
||||
for (const element of selectorElements) {
|
||||
Collapse.getOrCreateInstance(element, {
|
||||
toggle: false
|
||||
}).toggle();
|
||||
}
|
||||
});
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
* add .Collapse to jQuery only if jQuery is present
|
||||
*/
|
||||
|
||||
defineJQueryPlugin(NAME, Collapse);
|
||||
index.defineJQueryPlugin(Collapse);
|
||||
|
||||
return Collapse;
|
||||
|
||||
})));
|
||||
}));
|
||||
//# sourceMappingURL=collapse.js.map
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+6
-8
@@ -1,28 +1,26 @@
|
||||
/*!
|
||||
* Bootstrap data.js v5.0.0 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Bootstrap data.js v5.2.2 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
||||
typeof define === 'function' && define.amd ? define(factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Data = factory());
|
||||
}(this, (function () { 'use strict';
|
||||
})(this, (function () { 'use strict';
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.0.0): dom/data.js
|
||||
* Bootstrap (v5.2.2): dom/data.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
const elementMap = new Map();
|
||||
var data = {
|
||||
const data = {
|
||||
set(element, key, instance) {
|
||||
if (!elementMap.has(element)) {
|
||||
elementMap.set(element, new Map());
|
||||
@@ -65,5 +63,5 @@
|
||||
|
||||
return data;
|
||||
|
||||
})));
|
||||
}));
|
||||
//# sourceMappingURL=data.js.map
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
{"version":3,"file":"data.js","sources":["../../src/dom/data.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0): dom/data.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst elementMap = new Map()\n\nexport default {\n set(element, key, instance) {\n if (!elementMap.has(element)) {\n elementMap.set(element, new Map())\n }\n\n const instanceMap = elementMap.get(element)\n\n // make it clear we only want one instance per element\n // can be removed later when multiple key/instances are fine to be used\n if (!instanceMap.has(key) && instanceMap.size !== 0) {\n // eslint-disable-next-line no-console\n console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`)\n return\n }\n\n instanceMap.set(key, instance)\n },\n\n get(element, key) {\n if (elementMap.has(element)) {\n return elementMap.get(element).get(key) || null\n }\n\n return null\n },\n\n remove(element, key) {\n if (!elementMap.has(element)) {\n return\n }\n\n const instanceMap = elementMap.get(element)\n\n instanceMap.delete(key)\n\n // free up element references if there are no instances left for an element\n if (instanceMap.size === 0) {\n elementMap.delete(element)\n }\n }\n}\n"],"names":["elementMap","Map","set","element","key","instance","has","instanceMap","get","size","console","error","Array","from","keys","remove","delete"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;EACA;EACA;EAEA,MAAMA,UAAU,GAAG,IAAIC,GAAJ,EAAnB;AAEA,aAAe;EACbC,EAAAA,GAAG,CAACC,OAAD,EAAUC,GAAV,EAAeC,QAAf,EAAyB;EAC1B,QAAI,CAACL,UAAU,CAACM,GAAX,CAAeH,OAAf,CAAL,EAA8B;EAC5BH,MAAAA,UAAU,CAACE,GAAX,CAAeC,OAAf,EAAwB,IAAIF,GAAJ,EAAxB;EACD;;EAED,UAAMM,WAAW,GAAGP,UAAU,CAACQ,GAAX,CAAeL,OAAf,CAApB,CAL0B;EAQ1B;;EACA,QAAI,CAACI,WAAW,CAACD,GAAZ,CAAgBF,GAAhB,CAAD,IAAyBG,WAAW,CAACE,IAAZ,KAAqB,CAAlD,EAAqD;EACnD;EACAC,MAAAA,OAAO,CAACC,KAAR,CAAe,+EAA8EC,KAAK,CAACC,IAAN,CAAWN,WAAW,CAACO,IAAZ,EAAX,EAA+B,CAA/B,CAAkC,GAA/H;EACA;EACD;;EAEDP,IAAAA,WAAW,CAACL,GAAZ,CAAgBE,GAAhB,EAAqBC,QAArB;EACD,GAjBY;;EAmBbG,EAAAA,GAAG,CAACL,OAAD,EAAUC,GAAV,EAAe;EAChB,QAAIJ,UAAU,CAACM,GAAX,CAAeH,OAAf,CAAJ,EAA6B;EAC3B,aAAOH,UAAU,CAACQ,GAAX,CAAeL,OAAf,EAAwBK,GAAxB,CAA4BJ,GAA5B,KAAoC,IAA3C;EACD;;EAED,WAAO,IAAP;EACD,GAzBY;;EA2BbW,EAAAA,MAAM,CAACZ,OAAD,EAAUC,GAAV,EAAe;EACnB,QAAI,CAACJ,UAAU,CAACM,GAAX,CAAeH,OAAf,CAAL,EAA8B;EAC5B;EACD;;EAED,UAAMI,WAAW,GAAGP,UAAU,CAACQ,GAAX,CAAeL,OAAf,CAApB;EAEAI,IAAAA,WAAW,CAACS,MAAZ,CAAmBZ,GAAnB,EAPmB;;EAUnB,QAAIG,WAAW,CAACE,IAAZ,KAAqB,CAAzB,EAA4B;EAC1BT,MAAAA,UAAU,CAACgB,MAAX,CAAkBb,OAAlB;EACD;EACF;;EAxCY,CAAf;;;;;;;;"}
|
||||
{"version":3,"file":"data.js","sources":["../../src/dom/data.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.2): dom/data.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n/**\n * Constants\n */\n\nconst elementMap = new Map()\n\nexport default {\n set(element, key, instance) {\n if (!elementMap.has(element)) {\n elementMap.set(element, new Map())\n }\n\n const instanceMap = elementMap.get(element)\n\n // make it clear we only want one instance per element\n // can be removed later when multiple key/instances are fine to be used\n if (!instanceMap.has(key) && instanceMap.size !== 0) {\n // eslint-disable-next-line no-console\n console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`)\n return\n }\n\n instanceMap.set(key, instance)\n },\n\n get(element, key) {\n if (elementMap.has(element)) {\n return elementMap.get(element).get(key) || null\n }\n\n return null\n },\n\n remove(element, key) {\n if (!elementMap.has(element)) {\n return\n }\n\n const instanceMap = elementMap.get(element)\n\n instanceMap.delete(key)\n\n // free up element references if there are no instances left for an element\n if (instanceMap.size === 0) {\n elementMap.delete(element)\n }\n }\n}\n"],"names":["elementMap","Map","set","element","key","instance","has","instanceMap","get","size","console","error","Array","from","keys","remove","delete"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;EAEA,MAAMA,UAAU,GAAG,IAAIC,GAAJ,EAAnB,CAAA;AAEA,eAAe;EACbC,EAAAA,GAAG,CAACC,OAAD,EAAUC,GAAV,EAAeC,QAAf,EAAyB;EAC1B,IAAA,IAAI,CAACL,UAAU,CAACM,GAAX,CAAeH,OAAf,CAAL,EAA8B;EAC5BH,MAAAA,UAAU,CAACE,GAAX,CAAeC,OAAf,EAAwB,IAAIF,GAAJ,EAAxB,CAAA,CAAA;EACD,KAAA;;MAED,MAAMM,WAAW,GAAGP,UAAU,CAACQ,GAAX,CAAeL,OAAf,CAApB,CAL0B;EAQ1B;;EACA,IAAA,IAAI,CAACI,WAAW,CAACD,GAAZ,CAAgBF,GAAhB,CAAD,IAAyBG,WAAW,CAACE,IAAZ,KAAqB,CAAlD,EAAqD;EACnD;EACAC,MAAAA,OAAO,CAACC,KAAR,CAAe,CAAA,4EAAA,EAA8EC,KAAK,CAACC,IAAN,CAAWN,WAAW,CAACO,IAAZ,EAAX,CAA+B,CAAA,CAA/B,CAAkC,CAA/H,CAAA,CAAA,CAAA,CAAA;EACA,MAAA,OAAA;EACD,KAAA;;EAEDP,IAAAA,WAAW,CAACL,GAAZ,CAAgBE,GAAhB,EAAqBC,QAArB,CAAA,CAAA;KAhBW;;EAmBbG,EAAAA,GAAG,CAACL,OAAD,EAAUC,GAAV,EAAe;EAChB,IAAA,IAAIJ,UAAU,CAACM,GAAX,CAAeH,OAAf,CAAJ,EAA6B;QAC3B,OAAOH,UAAU,CAACQ,GAAX,CAAeL,OAAf,EAAwBK,GAAxB,CAA4BJ,GAA5B,CAAA,IAAoC,IAA3C,CAAA;EACD,KAAA;;EAED,IAAA,OAAO,IAAP,CAAA;KAxBW;;EA2BbW,EAAAA,MAAM,CAACZ,OAAD,EAAUC,GAAV,EAAe;EACnB,IAAA,IAAI,CAACJ,UAAU,CAACM,GAAX,CAAeH,OAAf,CAAL,EAA8B;EAC5B,MAAA,OAAA;EACD,KAAA;;EAED,IAAA,MAAMI,WAAW,GAAGP,UAAU,CAACQ,GAAX,CAAeL,OAAf,CAApB,CAAA;EAEAI,IAAAA,WAAW,CAACS,MAAZ,CAAmBZ,GAAnB,EAPmB;;EAUnB,IAAA,IAAIG,WAAW,CAACE,IAAZ,KAAqB,CAAzB,EAA4B;QAC1BT,UAAU,CAACgB,MAAX,CAAkBb,OAAlB,CAAA,CAAA;EACD,KAAA;EACF,GAAA;;EAxCY,CAAf;;;;;;;;"}
|
||||
Vendored
+98
-137
@@ -1,43 +1,22 @@
|
||||
/*!
|
||||
* Bootstrap event-handler.js v5.0.0 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Bootstrap event-handler.js v5.2.2 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
||||
typeof define === 'function' && define.amd ? define(factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.EventHandler = factory());
|
||||
}(this, (function () { 'use strict';
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('../util/index')) :
|
||||
typeof define === 'function' && define.amd ? define(['../util/index'], factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.EventHandler = factory(global.Index));
|
||||
})(this, (function (index) { 'use strict';
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.0.0): util/index.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
const getjQuery = () => {
|
||||
const {
|
||||
jQuery
|
||||
} = window;
|
||||
|
||||
if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
|
||||
return jQuery;
|
||||
}
|
||||
|
||||
return null;
|
||||
};
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.0.0): dom/event-handler.js
|
||||
* Bootstrap (v5.2.2): dom/event-handler.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
const namespaceRegex = /[^.]*(?=\..*)\.|.*/;
|
||||
@@ -50,20 +29,17 @@
|
||||
mouseenter: 'mouseover',
|
||||
mouseleave: 'mouseout'
|
||||
};
|
||||
const customEventsRegex = /^(mouseenter|mouseleave)/i;
|
||||
const nativeEvents = new Set(['click', 'dblclick', 'mouseup', 'mousedown', 'contextmenu', 'mousewheel', 'DOMMouseScroll', 'mouseover', 'mouseout', 'mousemove', 'selectstart', 'selectend', 'keydown', 'keypress', 'keyup', 'orientationchange', 'touchstart', 'touchmove', 'touchend', 'touchcancel', 'pointerdown', 'pointermove', 'pointerup', 'pointerleave', 'pointercancel', 'gesturestart', 'gesturechange', 'gestureend', 'focus', 'blur', 'change', 'reset', 'select', 'submit', 'focusin', 'focusout', 'load', 'unload', 'beforeunload', 'resize', 'move', 'DOMContentLoaded', 'readystatechange', 'error', 'abort', 'scroll']);
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Private methods
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
function getUidEvent(element, uid) {
|
||||
function makeEventUid(element, uid) {
|
||||
return uid && `${uid}::${uidEvent++}` || element.uidEvent || uidEvent++;
|
||||
}
|
||||
|
||||
function getEvent(element) {
|
||||
const uid = getUidEvent(element);
|
||||
function getElementEvents(element) {
|
||||
const uid = makeEventUid(element);
|
||||
element.uidEvent = uid;
|
||||
eventRegistry[uid] = eventRegistry[uid] || {};
|
||||
return eventRegistry[uid];
|
||||
@@ -71,7 +47,9 @@
|
||||
|
||||
function bootstrapHandler(element, fn) {
|
||||
return function handler(event) {
|
||||
event.delegateTarget = element;
|
||||
hydrateObj(event, {
|
||||
delegateTarget: element
|
||||
});
|
||||
|
||||
if (handler.oneOff) {
|
||||
EventHandler.off(element, event.type, fn);
|
||||
@@ -88,66 +66,52 @@
|
||||
for (let {
|
||||
target
|
||||
} = event; target && target !== this; target = target.parentNode) {
|
||||
for (let i = domElements.length; i--;) {
|
||||
if (domElements[i] === target) {
|
||||
event.delegateTarget = target;
|
||||
|
||||
if (handler.oneOff) {
|
||||
// eslint-disable-next-line unicorn/consistent-destructuring
|
||||
EventHandler.off(element, event.type, selector, fn);
|
||||
}
|
||||
|
||||
return fn.apply(target, [event]);
|
||||
for (const domElement of domElements) {
|
||||
if (domElement !== target) {
|
||||
continue;
|
||||
}
|
||||
|
||||
hydrateObj(event, {
|
||||
delegateTarget: target
|
||||
});
|
||||
|
||||
if (handler.oneOff) {
|
||||
EventHandler.off(element, event.type, selector, fn);
|
||||
}
|
||||
|
||||
return fn.apply(target, [event]);
|
||||
}
|
||||
} // To please ESLint
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function findHandler(events, handler, delegationSelector = null) {
|
||||
const uidEventList = Object.keys(events);
|
||||
|
||||
for (let i = 0, len = uidEventList.length; i < len; i++) {
|
||||
const event = events[uidEventList[i]];
|
||||
|
||||
if (event.originalHandler === handler && event.delegationSelector === delegationSelector) {
|
||||
return event;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
function findHandler(events, callable, delegationSelector = null) {
|
||||
return Object.values(events).find(event => event.callable === callable && event.delegationSelector === delegationSelector);
|
||||
}
|
||||
|
||||
function normalizeParams(originalTypeEvent, handler, delegationFn) {
|
||||
const delegation = typeof handler === 'string';
|
||||
const originalHandler = delegation ? delegationFn : handler;
|
||||
let typeEvent = getTypeEvent(originalTypeEvent);
|
||||
const isNative = nativeEvents.has(typeEvent);
|
||||
function normalizeParameters(originalTypeEvent, handler, delegationFunction) {
|
||||
const isDelegated = typeof handler === 'string'; // todo: tooltip passes `false` instead of selector, so we need to check
|
||||
|
||||
if (!isNative) {
|
||||
const callable = isDelegated ? delegationFunction : handler || delegationFunction;
|
||||
let typeEvent = getTypeEvent(originalTypeEvent);
|
||||
|
||||
if (!nativeEvents.has(typeEvent)) {
|
||||
typeEvent = originalTypeEvent;
|
||||
}
|
||||
|
||||
return [delegation, originalHandler, typeEvent];
|
||||
return [isDelegated, callable, typeEvent];
|
||||
}
|
||||
|
||||
function addHandler(element, originalTypeEvent, handler, delegationFn, oneOff) {
|
||||
function addHandler(element, originalTypeEvent, handler, delegationFunction, oneOff) {
|
||||
if (typeof originalTypeEvent !== 'string' || !element) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!handler) {
|
||||
handler = delegationFn;
|
||||
delegationFn = null;
|
||||
} // in case of mouseenter or mouseleave wrap the handler within a function that checks for its DOM position
|
||||
let [isDelegated, callable, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction); // in case of mouseenter or mouseleave wrap the handler within a function that checks for its DOM position
|
||||
// this prevents the handler from being dispatched the same way as mouseover or mouseout does
|
||||
|
||||
|
||||
if (customEventsRegex.test(originalTypeEvent)) {
|
||||
const wrapFn = fn => {
|
||||
if (originalTypeEvent in customEvents) {
|
||||
const wrapFunction = fn => {
|
||||
return function (event) {
|
||||
if (!event.relatedTarget || event.relatedTarget !== event.delegateTarget && !event.delegateTarget.contains(event.relatedTarget)) {
|
||||
return fn.call(this, event);
|
||||
@@ -155,31 +119,26 @@
|
||||
};
|
||||
};
|
||||
|
||||
if (delegationFn) {
|
||||
delegationFn = wrapFn(delegationFn);
|
||||
} else {
|
||||
handler = wrapFn(handler);
|
||||
}
|
||||
callable = wrapFunction(callable);
|
||||
}
|
||||
|
||||
const [delegation, originalHandler, typeEvent] = normalizeParams(originalTypeEvent, handler, delegationFn);
|
||||
const events = getEvent(element);
|
||||
const events = getElementEvents(element);
|
||||
const handlers = events[typeEvent] || (events[typeEvent] = {});
|
||||
const previousFn = findHandler(handlers, originalHandler, delegation ? handler : null);
|
||||
const previousFunction = findHandler(handlers, callable, isDelegated ? handler : null);
|
||||
|
||||
if (previousFn) {
|
||||
previousFn.oneOff = previousFn.oneOff && oneOff;
|
||||
if (previousFunction) {
|
||||
previousFunction.oneOff = previousFunction.oneOff && oneOff;
|
||||
return;
|
||||
}
|
||||
|
||||
const uid = getUidEvent(originalHandler, originalTypeEvent.replace(namespaceRegex, ''));
|
||||
const fn = delegation ? bootstrapDelegationHandler(element, handler, delegationFn) : bootstrapHandler(element, handler);
|
||||
fn.delegationSelector = delegation ? handler : null;
|
||||
fn.originalHandler = originalHandler;
|
||||
const uid = makeEventUid(callable, originalTypeEvent.replace(namespaceRegex, ''));
|
||||
const fn = isDelegated ? bootstrapDelegationHandler(element, handler, callable) : bootstrapHandler(element, callable);
|
||||
fn.delegationSelector = isDelegated ? handler : null;
|
||||
fn.callable = callable;
|
||||
fn.oneOff = oneOff;
|
||||
fn.uidEvent = uid;
|
||||
handlers[uid] = fn;
|
||||
element.addEventListener(typeEvent, fn, delegation);
|
||||
element.addEventListener(typeEvent, fn, isDelegated);
|
||||
}
|
||||
|
||||
function removeHandler(element, events, typeEvent, handler, delegationSelector) {
|
||||
@@ -195,12 +154,13 @@
|
||||
|
||||
function removeNamespacedHandlers(element, events, typeEvent, namespace) {
|
||||
const storeElementEvent = events[typeEvent] || {};
|
||||
Object.keys(storeElementEvent).forEach(handlerKey => {
|
||||
|
||||
for (const handlerKey of Object.keys(storeElementEvent)) {
|
||||
if (handlerKey.includes(namespace)) {
|
||||
const event = storeElementEvent[handlerKey];
|
||||
removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);
|
||||
removeHandler(element, events, typeEvent, event.callable, event.delegationSelector);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function getTypeEvent(event) {
|
||||
@@ -210,49 +170,49 @@
|
||||
}
|
||||
|
||||
const EventHandler = {
|
||||
on(element, event, handler, delegationFn) {
|
||||
addHandler(element, event, handler, delegationFn, false);
|
||||
on(element, event, handler, delegationFunction) {
|
||||
addHandler(element, event, handler, delegationFunction, false);
|
||||
},
|
||||
|
||||
one(element, event, handler, delegationFn) {
|
||||
addHandler(element, event, handler, delegationFn, true);
|
||||
one(element, event, handler, delegationFunction) {
|
||||
addHandler(element, event, handler, delegationFunction, true);
|
||||
},
|
||||
|
||||
off(element, originalTypeEvent, handler, delegationFn) {
|
||||
off(element, originalTypeEvent, handler, delegationFunction) {
|
||||
if (typeof originalTypeEvent !== 'string' || !element) {
|
||||
return;
|
||||
}
|
||||
|
||||
const [delegation, originalHandler, typeEvent] = normalizeParams(originalTypeEvent, handler, delegationFn);
|
||||
const [isDelegated, callable, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction);
|
||||
const inNamespace = typeEvent !== originalTypeEvent;
|
||||
const events = getEvent(element);
|
||||
const events = getElementEvents(element);
|
||||
const storeElementEvent = events[typeEvent] || {};
|
||||
const isNamespace = originalTypeEvent.startsWith('.');
|
||||
|
||||
if (typeof originalHandler !== 'undefined') {
|
||||
if (typeof callable !== 'undefined') {
|
||||
// Simplest case: handler is passed, remove that listener ONLY.
|
||||
if (!events || !events[typeEvent]) {
|
||||
if (!Object.keys(storeElementEvent).length) {
|
||||
return;
|
||||
}
|
||||
|
||||
removeHandler(element, events, typeEvent, originalHandler, delegation ? handler : null);
|
||||
removeHandler(element, events, typeEvent, callable, isDelegated ? handler : null);
|
||||
return;
|
||||
}
|
||||
|
||||
if (isNamespace) {
|
||||
Object.keys(events).forEach(elementEvent => {
|
||||
for (const elementEvent of Object.keys(events)) {
|
||||
removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
const storeElementEvent = events[typeEvent] || {};
|
||||
Object.keys(storeElementEvent).forEach(keyHandlers => {
|
||||
for (const keyHandlers of Object.keys(storeElementEvent)) {
|
||||
const handlerKey = keyHandlers.replace(stripUidRegex, '');
|
||||
|
||||
if (!inNamespace || originalTypeEvent.includes(handlerKey)) {
|
||||
const event = storeElementEvent[keyHandlers];
|
||||
removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);
|
||||
removeHandler(element, events, typeEvent, event.callable, event.delegationSelector);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
trigger(element, event, args) {
|
||||
@@ -260,15 +220,13 @@
|
||||
return null;
|
||||
}
|
||||
|
||||
const $ = getjQuery();
|
||||
const $ = index.getjQuery();
|
||||
const typeEvent = getTypeEvent(event);
|
||||
const inNamespace = event !== typeEvent;
|
||||
const isNative = nativeEvents.has(typeEvent);
|
||||
let jQueryEvent;
|
||||
let jQueryEvent = null;
|
||||
let bubbles = true;
|
||||
let nativeDispatch = true;
|
||||
let defaultPrevented = false;
|
||||
let evt = null;
|
||||
|
||||
if (inNamespace && $) {
|
||||
jQueryEvent = $.Event(event, args);
|
||||
@@ -278,27 +236,11 @@
|
||||
defaultPrevented = jQueryEvent.isDefaultPrevented();
|
||||
}
|
||||
|
||||
if (isNative) {
|
||||
evt = document.createEvent('HTMLEvents');
|
||||
evt.initEvent(typeEvent, bubbles, true);
|
||||
} else {
|
||||
evt = new CustomEvent(event, {
|
||||
bubbles,
|
||||
cancelable: true
|
||||
});
|
||||
} // merge custom information in our event
|
||||
|
||||
|
||||
if (typeof args !== 'undefined') {
|
||||
Object.keys(args).forEach(key => {
|
||||
Object.defineProperty(evt, key, {
|
||||
get() {
|
||||
return args[key];
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
}
|
||||
let evt = new Event(event, {
|
||||
bubbles,
|
||||
cancelable: true
|
||||
});
|
||||
evt = hydrateObj(evt, args);
|
||||
|
||||
if (defaultPrevented) {
|
||||
evt.preventDefault();
|
||||
@@ -308,7 +250,7 @@
|
||||
element.dispatchEvent(evt);
|
||||
}
|
||||
|
||||
if (evt.defaultPrevented && typeof jQueryEvent !== 'undefined') {
|
||||
if (evt.defaultPrevented && jQueryEvent) {
|
||||
jQueryEvent.preventDefault();
|
||||
}
|
||||
|
||||
@@ -317,7 +259,26 @@
|
||||
|
||||
};
|
||||
|
||||
function hydrateObj(obj, meta) {
|
||||
for (const [key, value] of Object.entries(meta || {})) {
|
||||
try {
|
||||
obj[key] = value;
|
||||
} catch (_unused) {
|
||||
Object.defineProperty(obj, key, {
|
||||
configurable: true,
|
||||
|
||||
get() {
|
||||
return value;
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
return EventHandler;
|
||||
|
||||
})));
|
||||
}));
|
||||
//# sourceMappingURL=event-handler.js.map
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user