simp-select 1.0.17 → 1.0.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/docs/style.css ADDED
@@ -0,0 +1,29 @@
1
+ .container {
2
+ max-width: 800px;
3
+ margin: 50px auto;
4
+ }
5
+ .items {
6
+ display: flex;
7
+ flex-wrap: wrap;
8
+ justify-content: center;
9
+ gap: 10px;
10
+ margin: 20px auto;
11
+ }
12
+ .item {
13
+ display: block;
14
+ width: 350px;
15
+ }
16
+ .item_full {
17
+ display: block;
18
+ width: 700px;
19
+ }
20
+
21
+ .code {
22
+ padding: 10px;
23
+ background-color: #c7c7c7;
24
+ }
25
+
26
+ .description {
27
+ font-size: 18px;
28
+ font-weight: bold;
29
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "simp-select",
3
- "version": "1.0.17",
3
+ "version": "1.0.19",
4
4
  "description": "simp-select - this plugin replaces the select",
5
5
  "main": "dist/simpleSelect.js",
6
6
  "types": "dist/simpleSelect.d.ts",
@@ -7,7 +7,7 @@ export const simpleSelectLocale: ISimpleSelectLocale = {
7
7
  selected: 'Selected:',
8
8
  all: 'all',
9
9
  ok: 'Ok',
10
- cansel: 'Cansel',
10
+ cancel: 'Cancel',
11
11
  selectAll: 'Select all',
12
12
  resetAll: 'Reset all',
13
13
  };
@@ -215,8 +215,14 @@ export class SimpleSelectItemDOM {
215
215
  const cls = getClass('float', true);
216
216
  if (val) {
217
217
  this.elemWrap.classList.add(cls);
218
+ if (!document.body.classList.contains(this.bodyOpenClass) && this.state.getState('isOpen')) {
219
+ document.body.classList.add(this.bodyOpenClass);
220
+ }
218
221
  } else {
219
222
  this.elemWrap.classList.remove(cls);
223
+ if (document.body.classList.contains(this.bodyOpenClass)) {
224
+ document.body.classList.remove(this.bodyOpenClass);
225
+ }
220
226
  }
221
227
  });
222
228
  }
@@ -391,7 +397,7 @@ export class SimpleSelectItemDOM {
391
397
  this.confirmWrap.appendChild(this.confirmNo);
392
398
 
393
399
  this.confirmOk.innerHTML = this.options.locale.ok;
394
- this.confirmNo.innerHTML = this.options.locale.cansel;
400
+ this.confirmNo.innerHTML = this.options.locale.cancel;
395
401
 
396
402
  this.confirmOk.className = `${classesItem} ${getClass('ok', true, classesItem)}`;
397
403
  this.confirmNo.className = `${classesItem} ${getClass('no', true, classesItem)}`;
package/src/style.css CHANGED
@@ -57,6 +57,7 @@
57
57
  right: 0;
58
58
  width: 100%;
59
59
  height: 100%;
60
+ font-size: 0;
60
61
  /*z-index: 2;*/
61
62
  box-sizing: border-box;
62
63
  }
@@ -7,7 +7,7 @@ export interface ISimpleSelectLocale {
7
7
  selected: string;
8
8
  all: string;
9
9
  ok: string;
10
- cansel: string;
10
+ cancel: string;
11
11
 
12
12
  resetAll: string;
13
13
  selectAll: string;