From 43a92562589f53cab5d7cb97157be40fcab0a2a0 Mon Sep 17 00:00:00 2001 From: MaxOvs Date: Wed, 28 Dec 2022 20:33:21 +0300 Subject: [PATCH] Fixed package.json --- .gitignore | 1 + CHANGELOG.md | 2 +- README.md | 2 +- documentation/index.html | 2 +- index.js | 4 + package-lock.json | 64 ++----- package.json | 7 +- src/index.js | 3 - src/page/example.js | 50 ------ src/page/example.scss | 212 ----------------------- src/page/index.html | 359 --------------------------------------- src/page/index.js | 232 ------------------------- 12 files changed, 22 insertions(+), 916 deletions(-) create mode 100644 index.js delete mode 100644 src/index.js delete mode 100644 src/page/example.js delete mode 100644 src/page/example.scss delete mode 100644 src/page/index.html delete mode 100644 src/page/index.js diff --git a/.gitignore b/.gitignore index 0e1fa41..4362bc4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ node_modules dist .parcel-cache +example diff --git a/CHANGELOG.md b/CHANGELOG.md index f1436f5..4ea242d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,7 +13,7 @@ - Изменеия в расположении файлов scss. - Исправлено влияние стилей селекта на JS приложение. -### ..... - обновление 0.1.16 +### ..... - обновление 0.1.17 - Добавленна возможность менять отображения селекта на телефонах (нативный/cg-select). - Добавленна возможность менять отображения листа с выбором (обычный/модальное окно) diff --git a/README.md b/README.md index 1670887..3949fa3 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,7 @@ const dropdown = new DropDown({ | Совместимость с приложениями | JS | React | Angular | Vue | | ---------------------------- | :----------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------: | :---------------------------------------------------------------------: | | CG-SELECT | ![image](https://github.com/apuc/cg-select/blob/main/src/images/yes.png) | ![image](https://github.com/apuc/cg-select/blob/main/src/images/yes.png) ![image](https://github.com/apuc/cg-select/blob/main/src/images/no.png) | ![image](https://github.com/apuc/cg-select/blob/main/src/images/no.png) | ![image](https://github.com/apuc/cg-select/blob/main/src/images/no.png) | -| Комментарий | Протестирован в Js приложениях и работает успешно. | Работает только с костылем в виде `setTimeout()` | тесты не проведены | тесты не проведены | +| Комментарий | Протестирован в Js приложениях и работает успешно. | Работает только с костылем в виде `setTimeout()` | пока недоступно | тесты не проведены | ## History diff --git a/documentation/index.html b/documentation/index.html index 6294523..594dcee 100644 --- a/documentation/index.html +++ b/documentation/index.html @@ -19,7 +19,7 @@

CG-SELECT

- -- Вернуться к примеру -- + -- Вернуться к примеру --

Этот компонент предлагает более гибкую настройку и использование селекта. Так же реализованны методы взаимодействия с селектом. diff --git a/index.js b/index.js new file mode 100644 index 0000000..5f6d2ca --- /dev/null +++ b/index.js @@ -0,0 +1,4 @@ +import { DropDown } from './src/cg-select'; + + +export default DropDown; diff --git a/package-lock.json b/package-lock.json index 0b1c114..1e9db79 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "cg-select", - "version": "0.1.14", + "version": "0.1.16", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "cg-select", - "version": "0.1.14", + "version": "0.1.16", "license": "ISC", "dependencies": { "@parcel/optimizer-css": "^2.8.0", @@ -368,7 +368,6 @@ "version": "2.7.0", "resolved": "https://registry.npmjs.org/@parcel/cache/-/cache-2.7.0.tgz", "integrity": "sha512-JlXNoZXcWzLKdDlfeF3dIj5Vtel5T9vtdBN72PJ+cjC4qNHk4Uwvc5sfOBELuibGN0bVu2bwY9nUgSwCiB1iIA==", - "dev": true, "dependencies": { "@parcel/fs": "2.7.0", "@parcel/logger": "2.7.0", @@ -390,7 +389,6 @@ "version": "2.7.0", "resolved": "https://registry.npmjs.org/@parcel/codeframe/-/codeframe-2.7.0.tgz", "integrity": "sha512-UTKx0jejJmmO1dwTHSJuRgrO8N6PMlkxRT6sew8N6NC3Bgv6pu0EbO+RtlWt/jCvzcdLOPdIoTzj4MMZvgcMYg==", - "dev": true, "dependencies": { "chalk": "^4.1.0" }, @@ -491,7 +489,6 @@ "version": "2.7.0", "resolved": "https://registry.npmjs.org/@parcel/core/-/core-2.7.0.tgz", "integrity": "sha512-7yKZUdh314Q/kU/9+27ZYTfcnXS6VYHuG+iiUlIohnvUUybxLqVJhdMU9Q+z2QcPka1IdJWz4K4Xx0y6/4goyg==", - "dev": true, "dependencies": { "@mischnic/json-sourcemap": "^0.1.0", "@parcel/cache": "2.7.0", @@ -546,7 +543,6 @@ "version": "2.7.0", "resolved": "https://registry.npmjs.org/@parcel/diagnostic/-/diagnostic-2.7.0.tgz", "integrity": "sha512-pdq/cTwVoL0n8yuDCRXFRSQHVWdmmIXPt3R3iT4KtYDYvOrMT2dLPT79IMqQkhYPANW8GuL15n/WxRngfRdkug==", - "dev": true, "dependencies": { "@mischnic/json-sourcemap": "^0.1.0", "nullthrows": "^1.1.1" @@ -563,7 +559,6 @@ "version": "2.7.0", "resolved": "https://registry.npmjs.org/@parcel/events/-/events-2.7.0.tgz", "integrity": "sha512-kQDwMKgZ1U4M/G17qeDYF6bW5kybluN6ajYPc7mZcrWg+trEI/oXi81GMFaMX0BSUhwhbiN5+/Vb2wiG/Sn6ig==", - "dev": true, "engines": { "node": ">= 12.0.0" }, @@ -576,7 +571,6 @@ "version": "2.7.0", "resolved": "https://registry.npmjs.org/@parcel/fs/-/fs-2.7.0.tgz", "integrity": "sha512-PU5fo4Hh8y03LZgemgVREttc0wyHQUNmsJCybxTB7EjJie2CqJRumo+DFppArlvdchLwJdc9em03yQV/GNWrEg==", - "dev": true, "dependencies": { "@parcel/fs-search": "2.7.0", "@parcel/types": "2.7.0", @@ -599,7 +593,6 @@ "version": "2.7.0", "resolved": "https://registry.npmjs.org/@parcel/fs-search/-/fs-search-2.7.0.tgz", "integrity": "sha512-K1Hv25bnRpwQVA15RvcRuB8ZhfclnCHA8N8L6w7Ul1ncSJDxCIkIAc5hAubYNNYW3kWjCC2SOaEgFKnbvMllEQ==", - "dev": true, "dependencies": { "detect-libc": "^1.0.3" }, @@ -615,7 +608,6 @@ "version": "2.7.0", "resolved": "https://registry.npmjs.org/@parcel/graph/-/graph-2.7.0.tgz", "integrity": "sha512-Q6E94GS6q45PtsZh+m+gvFRp/N1Qopxhu2sxjcWsGs5iBd6IWn2oYLWOH5iVzEjWuYpW2HkB08lH6J50O63uOA==", - "dev": true, "dependencies": { "@parcel/utils": "2.7.0", "nullthrows": "^1.1.1" @@ -632,7 +624,6 @@ "version": "2.7.0", "resolved": "https://registry.npmjs.org/@parcel/hash/-/hash-2.7.0.tgz", "integrity": "sha512-k6bSKnIlPJMPU3yjQzfgfvF9zuJZGOAlJgzpL4BbWvdbE8BTdjzLcFn0Ujrtud94EgIkiXd22sC2HpCUWoHGdA==", - "dev": true, "dependencies": { "detect-libc": "^1.0.3", "xxhash-wasm": "^0.4.2" @@ -649,7 +640,6 @@ "version": "2.7.0", "resolved": "https://registry.npmjs.org/@parcel/logger/-/logger-2.7.0.tgz", "integrity": "sha512-qjMY/bYo38+o+OiIrTRldU9CwL1E7J72t+xkTP8QIcUxLWz5LYR0YbynZUVulmBSfqsykjjxCy4a+8siVr+lPw==", - "dev": true, "dependencies": { "@parcel/diagnostic": "2.7.0", "@parcel/events": "2.7.0" @@ -666,7 +656,6 @@ "version": "2.7.0", "resolved": "https://registry.npmjs.org/@parcel/markdown-ansi/-/markdown-ansi-2.7.0.tgz", "integrity": "sha512-ipOX0D6FVZFEXeb/z8MnTMq2RQEIuaILY90olVIuHEFLHHfOPEn+RK3u13HA1ChF5/9E3cMD79tu6x9JL9Kqag==", - "dev": true, "dependencies": { "chalk": "^4.1.0" }, @@ -1071,7 +1060,6 @@ "version": "2.7.0", "resolved": "https://registry.npmjs.org/@parcel/package-manager/-/package-manager-2.7.0.tgz", "integrity": "sha512-wmfSX1mRrTi8MeA4KrnPk/x7zGUsILCQmTo6lA4gygzAxDbM1pGuyFN8/Kt0y0SFO2lbljARtD/4an5qdotH+Q==", - "dev": true, "dependencies": { "@parcel/diagnostic": "2.7.0", "@parcel/fs": "2.7.0", @@ -1197,7 +1185,6 @@ "version": "2.7.0", "resolved": "https://registry.npmjs.org/@parcel/plugin/-/plugin-2.7.0.tgz", "integrity": "sha512-qqgx+nnMn6/0lRc4lKbLGmhNtBiT93S2gFNB4Eb4Pfz/SxVYoW+fmml+KdfOSiZffWOAH5L6NwhyD7N8aSikzw==", - "dev": true, "dependencies": { "@parcel/types": "2.7.0" }, @@ -1621,7 +1608,6 @@ "version": "2.7.0", "resolved": "https://registry.npmjs.org/@parcel/types/-/types-2.7.0.tgz", "integrity": "sha512-+dhXVUnseTCpJvBTGMp0V6X13z6O/A/+CUtwEpMGZ8XSmZ4Gk44GvaTiBOp0bJpWG4fvCKp+UmC8PYbrDiiziw==", - "dev": true, "dependencies": { "@parcel/cache": "2.7.0", "@parcel/diagnostic": "2.7.0", @@ -1636,7 +1622,6 @@ "version": "2.7.0", "resolved": "https://registry.npmjs.org/@parcel/utils/-/utils-2.7.0.tgz", "integrity": "sha512-jNZ5bIGg1r1RDRKi562o4kuVwnz+XJ2Ie3b0Zwrqwvgfj6AbRFIKzDd+h85dWWmcDYzKUbHp11u6VJl1u8Vapg==", - "dev": true, "dependencies": { "@parcel/codeframe": "2.7.0", "@parcel/diagnostic": "2.7.0", @@ -1675,7 +1660,6 @@ "version": "2.7.0", "resolved": "https://registry.npmjs.org/@parcel/workers/-/workers-2.7.0.tgz", "integrity": "sha512-99VfaOX+89+RaoTSyH9ZQtkMBFZBFMvJmVJ/GeJT6QCd2wtKBStTHlaSnQOkLD/iRjJCNwV2xpZmm8YkTwV+hg==", - "dev": true, "dependencies": { "@parcel/diagnostic": "2.7.0", "@parcel/logger": "2.7.0", @@ -1722,8 +1706,7 @@ "node_modules/abortcontroller-polyfill": { "version": "1.7.3", "resolved": "https://registry.npmjs.org/abortcontroller-polyfill/-/abortcontroller-polyfill-1.7.3.tgz", - "integrity": "sha512-zetDJxd89y3X99Kvo4qFx8GKlt6GsvN3UcRZHwU6iFA/0KiOmhkTVhe8oRoTBiTVPZu09x3vCra47+w8Yz1+2Q==", - "dev": true + "integrity": "sha512-zetDJxd89y3X99Kvo4qFx8GKlt6GsvN3UcRZHwU6iFA/0KiOmhkTVhe8oRoTBiTVPZu09x3vCra47+w8Yz1+2Q==" }, "node_modules/acorn": { "version": "8.8.0", @@ -1800,7 +1783,6 @@ "version": "3.0.9", "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz", "integrity": "sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==", - "dev": true, "dependencies": { "safe-buffer": "^5.0.1" } @@ -1952,7 +1934,6 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", "integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==", - "dev": true, "engines": { "node": ">=0.8" } @@ -2140,7 +2121,6 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-7.0.0.tgz", "integrity": "sha512-M3NhsLbV1i6HuGzBUH8vXrtxOk+tWmzWKDMbAVSUp3Zsjm7ywFeuwrUXhmhQyRK1q5B5GGy7hcXPbj3bnfZg2g==", - "dev": true, "engines": { "node": ">=6" } @@ -2148,8 +2128,7 @@ "node_modules/dotenv-expand": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-5.1.0.tgz", - "integrity": "sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA==", - "dev": true + "integrity": "sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA==" }, "node_modules/electron-to-chromium": { "version": "1.4.251", @@ -3251,7 +3230,6 @@ "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, "funding": [ { "type": "github", @@ -3765,7 +3743,6 @@ "version": "2.7.0", "resolved": "https://registry.npmjs.org/@parcel/cache/-/cache-2.7.0.tgz", "integrity": "sha512-JlXNoZXcWzLKdDlfeF3dIj5Vtel5T9vtdBN72PJ+cjC4qNHk4Uwvc5sfOBELuibGN0bVu2bwY9nUgSwCiB1iIA==", - "dev": true, "requires": { "@parcel/fs": "2.7.0", "@parcel/logger": "2.7.0", @@ -3777,7 +3754,6 @@ "version": "2.7.0", "resolved": "https://registry.npmjs.org/@parcel/codeframe/-/codeframe-2.7.0.tgz", "integrity": "sha512-UTKx0jejJmmO1dwTHSJuRgrO8N6PMlkxRT6sew8N6NC3Bgv6pu0EbO+RtlWt/jCvzcdLOPdIoTzj4MMZvgcMYg==", - "dev": true, "requires": { "chalk": "^4.1.0" } @@ -3850,7 +3826,6 @@ "version": "2.7.0", "resolved": "https://registry.npmjs.org/@parcel/core/-/core-2.7.0.tgz", "integrity": "sha512-7yKZUdh314Q/kU/9+27ZYTfcnXS6VYHuG+iiUlIohnvUUybxLqVJhdMU9Q+z2QcPka1IdJWz4K4Xx0y6/4goyg==", - "dev": true, "requires": { "@mischnic/json-sourcemap": "^0.1.0", "@parcel/cache": "2.7.0", @@ -3891,7 +3866,6 @@ "version": "2.7.0", "resolved": "https://registry.npmjs.org/@parcel/diagnostic/-/diagnostic-2.7.0.tgz", "integrity": "sha512-pdq/cTwVoL0n8yuDCRXFRSQHVWdmmIXPt3R3iT4KtYDYvOrMT2dLPT79IMqQkhYPANW8GuL15n/WxRngfRdkug==", - "dev": true, "requires": { "@mischnic/json-sourcemap": "^0.1.0", "nullthrows": "^1.1.1" @@ -3900,14 +3874,12 @@ "@parcel/events": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/@parcel/events/-/events-2.7.0.tgz", - "integrity": "sha512-kQDwMKgZ1U4M/G17qeDYF6bW5kybluN6ajYPc7mZcrWg+trEI/oXi81GMFaMX0BSUhwhbiN5+/Vb2wiG/Sn6ig==", - "dev": true + "integrity": "sha512-kQDwMKgZ1U4M/G17qeDYF6bW5kybluN6ajYPc7mZcrWg+trEI/oXi81GMFaMX0BSUhwhbiN5+/Vb2wiG/Sn6ig==" }, "@parcel/fs": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/@parcel/fs/-/fs-2.7.0.tgz", "integrity": "sha512-PU5fo4Hh8y03LZgemgVREttc0wyHQUNmsJCybxTB7EjJie2CqJRumo+DFppArlvdchLwJdc9em03yQV/GNWrEg==", - "dev": true, "requires": { "@parcel/fs-search": "2.7.0", "@parcel/types": "2.7.0", @@ -3920,7 +3892,6 @@ "version": "2.7.0", "resolved": "https://registry.npmjs.org/@parcel/fs-search/-/fs-search-2.7.0.tgz", "integrity": "sha512-K1Hv25bnRpwQVA15RvcRuB8ZhfclnCHA8N8L6w7Ul1ncSJDxCIkIAc5hAubYNNYW3kWjCC2SOaEgFKnbvMllEQ==", - "dev": true, "requires": { "detect-libc": "^1.0.3" } @@ -3929,7 +3900,6 @@ "version": "2.7.0", "resolved": "https://registry.npmjs.org/@parcel/graph/-/graph-2.7.0.tgz", "integrity": "sha512-Q6E94GS6q45PtsZh+m+gvFRp/N1Qopxhu2sxjcWsGs5iBd6IWn2oYLWOH5iVzEjWuYpW2HkB08lH6J50O63uOA==", - "dev": true, "requires": { "@parcel/utils": "2.7.0", "nullthrows": "^1.1.1" @@ -3939,7 +3909,6 @@ "version": "2.7.0", "resolved": "https://registry.npmjs.org/@parcel/hash/-/hash-2.7.0.tgz", "integrity": "sha512-k6bSKnIlPJMPU3yjQzfgfvF9zuJZGOAlJgzpL4BbWvdbE8BTdjzLcFn0Ujrtud94EgIkiXd22sC2HpCUWoHGdA==", - "dev": true, "requires": { "detect-libc": "^1.0.3", "xxhash-wasm": "^0.4.2" @@ -3949,7 +3918,6 @@ "version": "2.7.0", "resolved": "https://registry.npmjs.org/@parcel/logger/-/logger-2.7.0.tgz", "integrity": "sha512-qjMY/bYo38+o+OiIrTRldU9CwL1E7J72t+xkTP8QIcUxLWz5LYR0YbynZUVulmBSfqsykjjxCy4a+8siVr+lPw==", - "dev": true, "requires": { "@parcel/diagnostic": "2.7.0", "@parcel/events": "2.7.0" @@ -3959,7 +3927,6 @@ "version": "2.7.0", "resolved": "https://registry.npmjs.org/@parcel/markdown-ansi/-/markdown-ansi-2.7.0.tgz", "integrity": "sha512-ipOX0D6FVZFEXeb/z8MnTMq2RQEIuaILY90olVIuHEFLHHfOPEn+RK3u13HA1ChF5/9E3cMD79tu6x9JL9Kqag==", - "dev": true, "requires": { "chalk": "^4.1.0" } @@ -4201,7 +4168,6 @@ "version": "2.7.0", "resolved": "https://registry.npmjs.org/@parcel/package-manager/-/package-manager-2.7.0.tgz", "integrity": "sha512-wmfSX1mRrTi8MeA4KrnPk/x7zGUsILCQmTo6lA4gygzAxDbM1pGuyFN8/Kt0y0SFO2lbljARtD/4an5qdotH+Q==", - "dev": true, "requires": { "@parcel/diagnostic": "2.7.0", "@parcel/fs": "2.7.0", @@ -4277,7 +4243,6 @@ "version": "2.7.0", "resolved": "https://registry.npmjs.org/@parcel/plugin/-/plugin-2.7.0.tgz", "integrity": "sha512-qqgx+nnMn6/0lRc4lKbLGmhNtBiT93S2gFNB4Eb4Pfz/SxVYoW+fmml+KdfOSiZffWOAH5L6NwhyD7N8aSikzw==", - "dev": true, "requires": { "@parcel/types": "2.7.0" } @@ -4537,7 +4502,6 @@ "version": "2.7.0", "resolved": "https://registry.npmjs.org/@parcel/types/-/types-2.7.0.tgz", "integrity": "sha512-+dhXVUnseTCpJvBTGMp0V6X13z6O/A/+CUtwEpMGZ8XSmZ4Gk44GvaTiBOp0bJpWG4fvCKp+UmC8PYbrDiiziw==", - "dev": true, "requires": { "@parcel/cache": "2.7.0", "@parcel/diagnostic": "2.7.0", @@ -4552,7 +4516,6 @@ "version": "2.7.0", "resolved": "https://registry.npmjs.org/@parcel/utils/-/utils-2.7.0.tgz", "integrity": "sha512-jNZ5bIGg1r1RDRKi562o4kuVwnz+XJ2Ie3b0Zwrqwvgfj6AbRFIKzDd+h85dWWmcDYzKUbHp11u6VJl1u8Vapg==", - "dev": true, "requires": { "@parcel/codeframe": "2.7.0", "@parcel/diagnostic": "2.7.0", @@ -4576,7 +4539,6 @@ "version": "2.7.0", "resolved": "https://registry.npmjs.org/@parcel/workers/-/workers-2.7.0.tgz", "integrity": "sha512-99VfaOX+89+RaoTSyH9ZQtkMBFZBFMvJmVJ/GeJT6QCd2wtKBStTHlaSnQOkLD/iRjJCNwV2xpZmm8YkTwV+hg==", - "dev": true, "requires": { "@parcel/diagnostic": "2.7.0", "@parcel/logger": "2.7.0", @@ -4610,8 +4572,7 @@ "abortcontroller-polyfill": { "version": "1.7.3", "resolved": "https://registry.npmjs.org/abortcontroller-polyfill/-/abortcontroller-polyfill-1.7.3.tgz", - "integrity": "sha512-zetDJxd89y3X99Kvo4qFx8GKlt6GsvN3UcRZHwU6iFA/0KiOmhkTVhe8oRoTBiTVPZu09x3vCra47+w8Yz1+2Q==", - "dev": true + "integrity": "sha512-zetDJxd89y3X99Kvo4qFx8GKlt6GsvN3UcRZHwU6iFA/0KiOmhkTVhe8oRoTBiTVPZu09x3vCra47+w8Yz1+2Q==" }, "acorn": { "version": "8.8.0", @@ -4667,7 +4628,6 @@ "version": "3.0.9", "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz", "integrity": "sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==", - "dev": true, "requires": { "safe-buffer": "^5.0.1" } @@ -4763,8 +4723,7 @@ "clone": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", - "integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==", - "dev": true + "integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==" }, "color-convert": { "version": "2.0.1", @@ -4899,14 +4858,12 @@ "dotenv": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-7.0.0.tgz", - "integrity": "sha512-M3NhsLbV1i6HuGzBUH8vXrtxOk+tWmzWKDMbAVSUp3Zsjm7ywFeuwrUXhmhQyRK1q5B5GGy7hcXPbj3bnfZg2g==", - "dev": true + "integrity": "sha512-M3NhsLbV1i6HuGzBUH8vXrtxOk+tWmzWKDMbAVSUp3Zsjm7ywFeuwrUXhmhQyRK1q5B5GGy7hcXPbj3bnfZg2g==" }, "dotenv-expand": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-5.1.0.tgz", - "integrity": "sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA==", - "dev": true + "integrity": "sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA==" }, "electron-to-chromium": { "version": "1.4.251", @@ -5630,8 +5587,7 @@ "safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" }, "sass": { "version": "1.54.9", diff --git a/package.json b/package.json index 9a0bc0d..60f648a 100644 --- a/package.json +++ b/package.json @@ -1,15 +1,16 @@ { "name": "cg-select", - "version": "0.1.16", + "version": "0.1.17", "description": "Feature rich Select control for React/JS with multiselect, autocomplete and styling", "author": { "name": "CraftGroup", "url": "https://github.com/apuc/" }, "homepage": "https://cg-select.itguild.info", + "main": "dist/index.js", "scripts": { - "start": "parcel src/page/index.html -p 4500 --open ", - "build": "parcel build ./src/page/index.html", + "start": "parcel example/index.html -p 4500 --open ", + "build": "parcel build index.js", "deploy": "gh-pages -d dist", "predeploy": "npm run build" }, diff --git a/src/index.js b/src/index.js deleted file mode 100644 index e28803e..0000000 --- a/src/index.js +++ /dev/null @@ -1,3 +0,0 @@ -import { DropDown } from './cg-select'; - -export default DropDown; diff --git a/src/page/example.js b/src/page/example.js deleted file mode 100644 index f807677..0000000 --- a/src/page/example.js +++ /dev/null @@ -1,50 +0,0 @@ -const firstBtn = document.getElementById('first'); -const codeFirst = document.getElementById('codeFirst'); - -const secondBtn = document.getElementById('second'); -const codeSecond = document.getElementById('codeSecond'); - -const thirdBtn = document.getElementById('third'); -const codeThird = document.getElementById('codeThird'); - -const fourthBtn = document.getElementById('fourth'); -const codeFourth = document.getElementById('codeFourth'); - -const fifthBtn = document.getElementById('fifth'); -const codeFifth = document.getElementById('codeFifth'); - -const six = document.getElementById('six') -const codeSix = document.getElementById('codeSix'); - - -const Native = document.getElementById('Native') -const codeNative = document.getElementById('codeNative') - - -firstBtn.addEventListener('click', () => { - codeFirst.classList.toggle("active") -}) - -secondBtn.addEventListener('click', () => { - codeSecond.classList.toggle("active") -}) - -thirdBtn.addEventListener('click', () => { - codeThird.classList.toggle("active") -}) - -fourthBtn.addEventListener('click', () => { - codeFourth.classList.toggle("active") -}) - -fifthBtn.addEventListener('click', () => { - codeFifth.classList.toggle("active") -}) - -six.addEventListener('click', () => { - codeSix.classList.toggle("active") -}) - -Native.addEventListener('click', () => { - codeNative.classList.toggle("active") -}) \ No newline at end of file diff --git a/src/page/example.scss b/src/page/example.scss deleted file mode 100644 index b1bd873..0000000 --- a/src/page/example.scss +++ /dev/null @@ -1,212 +0,0 @@ -@import '/src/main.scss'; - -* { - font-size: 14px; - font-family: Arial, Helvetica, sans-serif; -} - -.body-example { - background: #000000c4; -} - -.container { - margin: 0 auto; - width: 900px; - - display: -webkit-box; - display: -ms-flexbox; - display: flex; - - -webkit-box-align: baseline; - -ms-flex-align: baseline; - align-items: baseline; - - -webkit-box-pack: justify; - -ms-flex-pack: justify; - justify-content: space-between; - - -ms-flex-wrap: wrap; - flex-wrap: wrap; -} - -.header { - width: 100%; - border-radius: 5px; - display: flex; - align-items: center; - flex-direction: column; - background-color: #2a2f3b; - margin-bottom: 8px; - - h1 { - font-size: 57px; - color: white; - font-family: 'Times New Roman', Times, serif; - margin: 40px 0 12px 0; - } - - &__logoBox { - display: flex; - flex-direction: row; - align-items: center; - justify-content: center; - } - - &__logo { - width: 13%; - height: 16%; - border: 1px solid #525252; - border-radius: 50%; - - margin: 22px 0 0 29px; - } - - .navlist { - display: flex; - justify-content: space-around; - margin: 15px 0 30px 0; - padding: 0; - width: 230px; - - li { - display: inline; - list-style: none; - text-decoration: none; - - a { - color: white; - text-decoration: none; - - &:hover { - text-decoration: underline; - } - } - } - } -} - -.content { - margin-top: 15px; - border-radius: 5px; - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - -ms-border-radius: 5px; - -o-border-radius: 5px; -} - -.example-select { - width: 100%; - background-color: #5c5c5c; - border-radius: 5px; - margin: 15px 0 0 0; - - &_title { - height: 45px; - border-top-left-radius: 5px; - border-top-right-radius: 5px; - color: white; - padding: 20px 0 0 40px; - margin: 0 0 30px 0; - background-color: #2a2f3b; - font-size: 20px; - } - - &_submit { - width: 200px; - height: 35px; - border-radius: 10px; - border: none; - margin-top: 20px; - margin: 20px 15px; - cursor: pointer; - transition: 1s; - -webkit-transition: 1s; - -moz-transition: 1s; - -ms-transition: 1s; - -o-transition: 1s; - - &:hover { - background-color: #d7d7d7; - transition: 1s; - -webkit-transition: 1s; - -moz-transition: 1s; - -ms-transition: 1s; - -o-transition: 1s; - } - } - - .layout-select { - margin: 15px; - } -} - -code { - display: none; -} - -pre { - background: #1e1e1e; - margin: 15px; - padding: 15px; - color: #88d0f7; - border-radius: 15px; - font-size: 16px; - line-height: 20px; -} - -.code { - &__class, - &__var, - &__string, - &__keyword { - font-size: 16px; - line-height: 20px; - } - &__class { - color: #4ec9b0; - } - - &__var { - color: #34a7ff; - } - - &__string { - color: #ce9178; - } - - &__keyword { - color: #5090ca; - } -} - -.check-code { - width: 200px; - height: 35px; - cursor: pointer; - border: none; - border-radius: 10px; - margin: 20px 15px; - transition: all 1s; -} - -.active { - display: block; -} - -@media (max-width: 576px) { - .container { - width: 95%; - } - - .header { - margin-top: 15px; - h1 { - font-size: 32px; - } - } - - .example-select_title { - font-size: 14px; - height: 40px; - } -} diff --git a/src/page/index.html b/src/page/index.html deleted file mode 100644 index 1f010d6..0000000 --- a/src/page/index.html +++ /dev/null @@ -1,359 +0,0 @@ - - - - - - - - - - - - - Cg-Select - - - -

-
-
-

CG-SELECT

- -
-
- -
-
- -
-
-

Дефолтный селект

-
-
- -
- - - - - -
-              const dropdown = new DropDown({
-                selector: '.cg-dropdown_one', 
-                placeholder: 'Выберите авто', 
-                lable: 'EXAMPLE', 
-                items: [
-                  'BMW',
-                  {
-                    id: '213sade',
-                    title: 'Opel',
-                    value: 1,
-                  },
-                  'Mersedes', 
-                  'MAN',  
-                  'Ferari', 
-                ],
-                styles: {
-                  head: {
-                    width: '830px', 
-                  },
-                  list: {
-                    width: '824px', 
-                  },
-                },
-              });
-            
-
-
-
- -
-

Дефолтный селект с функцией nativeSelectMode

- -
-

- *При мобильном разрешении появляеться нативный селект. -

-
- -
- - - -
-              const dropdown = new DropDown({
-                selector: '.cg-dropdown_one', 
-                placeholder: 'Выберите авто', 
-                nativeSelectMode: true,
-                items: [
-                  'BMW',
-                  {
-                    id: '213sade',
-                    title: 'Opel',
-                    value: 1,
-                  },
-                  'Mersedes', 
-                  'MAN',  
-                  'Ferari', 
-                ],
-                styles: {
-                  head: {
-                    width: '830px', 
-                  },
-                  list: {
-                    width: '824px', 
-                  },
-                },
-              });
-            
-
-
-
- -
-

Дефолтный селект с функцией listDisplayMode

- -
-

- *При использовании данного метода лист с выбором появляеться как модальное окно. -

-
- -
- - - - -
-              const dropdown = new DropDown({
-                selector: '.cg-dropdown_listDisplayMode', 
-                placeholder: 'Выберите авто', 
-                listDisplayMode: true,
-                items: [
-                  'BMW',
-                  {
-                    id: '213sade',
-                    title: 'Opel',
-                    value: 1,
-                  },
-                  'Mersedes', 
-                  'MAN',  
-                  'Ferari', 
-                ],
-                styles: {
-                  head: {
-                    width: '830px', 
-                  },
-                  list: {
-                    width: '824px', 
-                  },
-                },
-              });
-            
-
-
-
- -
-

Селект с данными с URL

-
- -
- - - -
-            const dropdown = new DropDown({
-              selector: '.cg-dropdown_three', 
-              placeholder: 'URL', 
-              url: 'https://jsonplaceholder.typicode.com/users',            
-              searchMode: true,
-              darkTheme: false,
-              language: 'ru',
-              styles: {
-                head: {
-                  width: '830px', 
-                },
-                list: {
-                  width: '824px', 
-                },
-              },
-            });
-          
-
-
- -
-

Категории

- -
- -
- - - -
-            const dropdown = new DropDown({
-              selector: '.cg-dropdown_categories', 
-              placeholder: 'Выберите регион', 
-              searchMode: true,
-              items: [
-                {
-                  category: 'Russia',
-                  categoryItems: [
-                    {
-                      id: '28qwds',
-                      title: 'Москва',
-                      value: 0,
-                    },
-                    'Ростов-на-дону',
-                    'Саратов',
-                    'Волгоград',
-                    'Донецк',
-                  ],
-                },
-                {
-                  category: 'USA',
-                  categoryItems: [
-                    'Alabama', 
-                    'Texas', 
-                    'Colorado', 
-                    'Klirens', 
-                    'Los-Angeles'],
-                },
-                {
-                  category: 'France',
-                  categoryItems: ['Paris'],
-                },
-              ],
-              styles: {
-                head: {
-                  width: '830px', 
-                },
-                list: {
-                  width: '824px', 
-                },
-                placeholder: {
-                  maxWidth: '500px ',
-                },
-              },
-              multiselect: true,
-              multiselectTag: true,
-            });
-          
-
-
- -
-

Управление с помошью кнопок

-
- - -
- -
- -
- - - - -
-            const dropdown = new DropDown({
-              selector: '.cg-dropdown_usedBtn', 
-              placeholder: 'Выберите авто', 
-              searchMode: true,
-              items: [
-                  'BMW',
-                  {
-                    id: '213sade',
-                    title: 'Opel',
-                    value: 1,
-                  },
-                  'Mersedes', 
-                  'MAN',  
-                  'max', 
-              ],
-              styles: {
-                head: {
-                  width:  '830px',
-                  color:  'black',
-                  backgroundColor:  'rgb(176 223 167)',
-                },
-                list: {
-                  width:  '824px',
-                  color:  'black',
-                  backgroundColor:  'rgb(176 223 167)',
-                },
-                caret: {
-                  borderTop:  '6px solid black',
-                },
-                search: {
-                  backgroundColor:  '#d7ffff',
-                  borderRadius:  '5px',
-                  borderBottom:  'none',
-                  width:  '95%',
-                  color:  'black',
-                },
-              },
-              multiselect: true,
-            });
-          
-
-
- -
-

Функция disabled

- - - - -
- -
- - - -
-            const dropdown = new DropDown({
-              selector: '.cg-dropdown_checkboxDisable', 
-              placeholder: 'Выберите авто', 
-              searchMode: true,
-              items: [
-                'BMW',
-                {
-                  id: '213sade',
-                  title: 'Opel',
-                  value: 1,
-                },
-                'Mersedes', 
-                'MAN',  
-                'Ferari', 
-              ],
-              styles: {
-                head: {
-                  width: '830px', 
-                },
-                list: {
-                  width: '824px', 
-                },
-                placeholder: {
-                  maxWidth: '500px ',
-                },
-              },
-            });
-          
-
-
-
- - - diff --git a/src/page/index.js b/src/page/index.js deleted file mode 100644 index 97649f8..0000000 --- a/src/page/index.js +++ /dev/null @@ -1,232 +0,0 @@ -import DropDown from '../index'; -import './example'; - -// ------------------------------Обычный селект-------------------- -const dropdown = new DropDown({ - selector: '.cg-dropdown_one', - placeholder: 'Выберите авто', - lable: 'EXAMPLE', - items: [ - 'BMW', - { - id: '213sade', - title: 'Opel', - value: 1, - }, - 'Mersedes', - 'MAN', - 'Ferari', - ], - styles: { - head: { - width: '830px', - }, - list: { - width: '824px', - }, - }, -}); - -// ------------------------------NativeSelect----------------------- -const dropdownNativeSelect = new DropDown({ - selector: '.cg-dropdown_selectNative', - placeholder: 'Выберите авто', - nativeSelectMode: true, - items: [ - 'BMW', - { - id: '213sade', - title: 'Opel', - value: 1, - }, - 'Mersedes', - 'MAN', - 'Ferari', - 'Kamaz', - 'Ural' - ], - styles: { - head: { - width: '830px', - }, - list: { - width: '824px', - }, - }, -}); - -// ------------------------------listDisplayMode-------------------- -const dropdownlistDisplayMode = new DropDown({ - selector: '.cg-dropdown_listDisplayMode', - placeholder: 'Выберите авто', - listDisplayMode: true, - items: [ - 'BMW', - { - id: '213sade', - title: 'Opel', - value: 1, - }, - 'Mersedes', - 'MAN', - 'Ferari', - ], - styles: { - head: { - width: '830px', - }, - list: { - width: '824px', - }, - }, -}); - -// ------------------------------URL-------------------- -const dropdown3 = new DropDown({ - selector: '.cg-dropdown_three', - placeholder: 'URL', - url: 'https://jsonplaceholder.typicode.com/users', - searchMode: true, - darkTheme: false, - language: 'ru', - styles: { - head: { - width: '830px', - }, - list: { - width: '824px', - }, - }, -}); - -// --------------------------------Категории-------------------------- -const dropdown4 = new DropDown({ - selector: '.cg-dropdown_categories', - placeholder: 'Выберите регион', - searchMode: true, - items: [ - { - category: 'Russia', - categoryItems: [ - { - id: '28qwds', - title: 'Москва', - value: 0, - }, - , - 'Ростов-на-дону', - 'Саратов', - 'Волгоград', - 'Донецк', - ], - }, - { - category: 'USA', - categoryItems: ['Alabama', 'Texas', 'Colorado', 'Klirens', 'Los-Angeles'], - }, - { - category: 'France', - categoryItems: ['Paris'], - }, - ], - styles: { - head: { - width: '830px', - }, - list: { - width: '824px', - }, - placeholder: { - maxWidth: '500px ', - }, - }, - multiselect: true, - multiselectTag: true, -}); - -//----------------управление с помощью кнопок---------------------------------- -const dropdownBtn = new DropDown({ - selector: '.cg-dropdown_usedBtn', - placeholder: 'Выберите авто', - searchMode: true, - items: [ - 'BMW', - { - id: '213sade', - title: 'Opel', - value: 1, - }, - 'Mersedes', - 'MAN', - 'max', - ], - styles: { - head: { - width: '830px', - color: 'black', - backgroundColor: 'rgb(176 223 167)', - }, - list: { - width: '824px', - color: 'black', - backgroundColor: 'rgb(176 223 167)', - }, - caret: { - borderTop: '6px solid black', - }, - search: { - backgroundColor: '#d7ffff', - borderRadius: '5px', - borderBottom: 'none', - width: '95%', - color: 'black', - }, - }, - multiselect: true, -}); - -const buttonOpen = document.querySelector('.button__open'); -const buttonClose = document.querySelector('.button__close'); - -dropdownBtn.buttonControl(buttonOpen, 'open'); -dropdownBtn.buttonControl(buttonClose, 'close'); - -//-------------------------Функция Disabled---------------------------------- -const dropdownDisabled = new DropDown({ - selector: '.cg-dropdown_checkboxDisable', - placeholder: 'Выберите авто', - searchMode: true, - items: [ - 'BMW', - { - id: '213sade', - title: 'Opel', - value: 1, - }, - 'Mersedes', - 'MAN', - 'max', - ], - styles: { - head: { - width: '830px', - }, - list: { - width: '824px', - }, - placeholder: { - maxWidth: '500px ', - }, - }, - multiselect: true, -}); -dropdownDisabled.disabled(true); -let chbox = document.getElementById('checkboxDisable'); - -chbox.addEventListener('click', () => { - if (chbox.checked == true) { - dropdownDisabled.disabled(false); - } else { - dropdownDisabled.disabled(true); - } -});