@nuralyui/select 0.0.4 → 0.0.5

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.
@@ -6,7 +6,7 @@
6
6
  import { LitElement } from 'lit';
7
7
  import '../select.component';
8
8
  import '../../dropdown/hy-dropdown.component';
9
- import '../../button/hy-button.component';
9
+ import '../../button/nr-button.component';
10
10
  import '../../tabs/tabs.component';
11
11
  import '../../input/input.component';
12
12
  export declare class SlectDemoElement extends LitElement {
@@ -1 +1 @@
1
- {"version":3,"file":"select-demo.d.ts","sourceRoot":"","sources":["../../../../src/components/select/demo/select-demo.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH,OAAO,EAAC,UAAU,EAAO,MAAM,KAAK,CAAC;AAGrC,OAAO,qBAAqB,CAAC;AAC7B,OAAO,sCAAsC,CAAC;AAC9C,OAAO,kCAAkC,CAAC;AAC1C,OAAO,2BAA2B,CAAC;AACnC,OAAO,6BAA6B,CAAC;AAErC,qBACa,gBAAiB,SAAQ,UAAU;IAE9C,OAAO;;;QAQL;IAGF,eAAe,UAAM;IACZ,MAAM;CAgNhB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,gBAAgB,EAAE,gBAAgB,CAAC;KACpC;CACF"}
1
+ {"version":3,"file":"select-demo.d.ts","sourceRoot":"","sources":["../../../../src/components/select/demo/select-demo.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAGvC,OAAO,qBAAqB,CAAC;AAC7B,OAAO,sCAAsC,CAAC;AAC9C,OAAO,kCAAkC,CAAC;AAC1C,OAAO,2BAA2B,CAAC;AACnC,OAAO,6BAA6B,CAAC;AAErC,qBACa,gBAAiB,SAAQ,UAAU;IAE9C,OAAO;;;QAQL;IAGF,eAAe,UAAM;IACZ,MAAM;CAgNhB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,gBAAgB,EAAE,gBAAgB,CAAC;KACpC;CACF"}
@@ -15,7 +15,7 @@ import { LitElement, html } from 'lit';
15
15
  import { customElement, state } from 'lit/decorators.js';
16
16
  import '../select.component';
17
17
  import '../../dropdown/hy-dropdown.component';
18
- import '../../button/hy-button.component';
18
+ import '../../button/nr-button.component';
19
19
  import '../../tabs/tabs.component';
20
20
  import '../../input/input.component';
21
21
  let SlectDemoElement = class SlectDemoElement extends LitElement {
@@ -1 +1 @@
1
- {"version":3,"file":"select-demo.js","sourceRoot":"","sources":["../../../../src/components/select/demo/select-demo.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,uDAAuD;AACvD;;;;GAIG;;;;;;;AAEH,OAAO,EAAC,UAAU,EAAE,IAAI,EAAC,MAAM,KAAK,CAAC;AACrC,OAAO,EAAC,aAAa,EAAE,KAAK,EAAC,MAAM,mBAAmB,CAAC;AAEvD,OAAO,qBAAqB,CAAC;AAC7B,OAAO,sCAAsC,CAAC;AAC9C,OAAO,kCAAkC,CAAC;AAC1C,OAAO,2BAA2B,CAAC;AACnC,OAAO,6BAA6B,CAAC;AAGrC,IAAa,gBAAgB,GAA7B,MAAa,gBAAiB,SAAQ,UAAU;IAAhD;;QAEE,YAAO,GAAG;YACR,EAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAC;YAChC,EAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAC;YAClC,EAAC,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAC;YACpC,EAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAC;YAClC,EAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAC;YAClC,EAAC,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAC;YACxC,EAAC,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,cAAc,EAAC;SAC/C,CAAC;QAGF,oBAAe,G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;;;;;;;;;;;;;;mBAcU,IAAI,CAAC,OAAO;mBACZ,CAAC,CAAM,EAAE,EAAE;YACpB,IAAI,CAAC,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;YACtC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QACpC,CAAC;;;;;;;;;;;;mBAYU,IAAI,CAAC,OAAO;mBACZ,CAAC,CAAM,EAAE,EAAE;YACpB,IAAI,CAAC,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;YACtC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QACpC,CAAC;;;;KAIJ,CAAC;IACJ,CAAC;CACF,CAAA;AA5NC;IADC,KAAK,EAAE;iDASN;AAGF;IADC,KAAK,EAAE;yDACa;AAbV,gBAAgB;IAD5B,aAAa,CAAC,gBAAgB,CAAC;GACnB,gBAAgB,CA8N5B;SA9NY,gBAAgB","sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/**\n * @license\n * Copyright 2023 Google Laabidi Aymen\n * SPDX-License-Identifier: MIT\n */\n\nimport {LitElement, html} from 'lit';\nimport {customElement, state} from 'lit/decorators.js';\n\nimport '../select.component';\nimport '../../dropdown/hy-dropdown.component';\nimport '../../button/hy-button.component';\nimport '../../tabs/tabs.component';\nimport '../../input/input.component';\n\n@customElement('hy-select-demo')\nexport class SlectDemoElement extends LitElement {\n @state()\n options = [\n {value: 'abuja', label: 'Abuja'},\n {value: 'duplin', label: 'Duplin'},\n {value: 'nairobi', label: 'Nairobi'},\n {value: 'beirut', label: 'Beirut'},\n {value: 'prague', label: 'Prague'},\n {value: 'marrakech', label: 'Marrakech'},\n {value: 'buenos aires', label: 'Buenos Aires'},\n ];\n\n @state()\n selectedOptions = [];\n override render() {\n return html`\n <h3>Default: single selection without default values</h3>\n <hy-select\n .options=${this.options}\n @changed=${(e: any) => {\n this.selectedOptions = e.detail.value;\n console.log(this.selectedOptions);\n }}\n >\n </hy-select>\n <br /><br />\n <br /><br />\n\n <hr />\n <br /><br />\n <h3>single selection with default values</h3>\n\n <hy-select\n .options=${this.options}\n .defaultSelected=\"${['Duplin']}\"\n @changed=${(e: any) => {\n this.selectedOptions = e.detail.value;\n console.log(this.selectedOptions);\n }}\n >\n </hy-select>\n <br /><br />\n <br /><br />\n\n <hr />\n <br /><br />\n <h3>Disabled</h3>\n\n <hy-select\n .options=${this.options}\n .disabled=${true}\n @changed=${(e: any) => {\n this.selectedOptions = e.detail.value;\n console.log(this.selectedOptions);\n }}\n >\n <span slot=\"label\">disabled input</span>\n <span slot=\"helper-text\">helper</span>\n </hy-select>\n\n <br /><br />\n <br /><br />\n <hr />\n <br /><br />\n <h3>Multiple selection without default values</h3>\n\n <hy-select\n selectionMode=\"multiple\"\n .options=${this.options}\n @changed=${(e: any) => {\n this.selectedOptions = e.detail.value;\n console.log(this.selectedOptions);\n }}\n >\n <span slot=\"label\">Selection mode: multiple</span>\n </hy-select>\n <br /><br />\n <br /><br />\n <hr />\n <br /><br />\n <h3>single selection with default value</h3>\n\n <hy-select\n .defaultSelected=\"${['Abuja']}\"\n .options=${this.options}\n @changed=${(e: any) => {\n this.selectedOptions = e.detail.value;\n console.log(this.selectedOptions);\n }}\n >\n <span slot=\"label\">Selection mode: single, default selected: Abuja</span>\n </hy-select>\n <br /><br />\n <br /><br />\n <hr />\n <br /><br />\n <h3>Multiple selection with default values and empty placeholder</h3>\n <hy-select\n selectionMode=\"multiple\"\n placeholder=\"\"\n .defaultSelected=\"${['Abuja', 'Nairobi']}\"\n .options=${this.options}\n @changed=${(e: any) => {\n this.selectedOptions = e.detail.value;\n console.log(this.selectedOptions);\n }}\n >\n <span slot=\"label\">Selection Mode: multiple</span>\n </hy-select>\n <br /><br />\n <br /><br />\n <hr />\n <br /><br />\n <h3>Default with warning status</h3>\n <hy-select\n status=\"warning\"\n .options=${this.options}\n @changed=${(e: any) => {\n this.selectedOptions = e.detail.value;\n console.log(this.selectedOptions);\n }}\n >\n <span slot=\"label\">warning status</span>\n </hy-select>\n <br /><br />\n <br /><br />\n <h3>Disabled with warning status</h3>\n <hy-select\n status=\"warning\"\n .disabled=${true}\n .options=${this.options}\n @changed=${(e: any) => {\n this.selectedOptions = e.detail.value;\n console.log(this.selectedOptions);\n }}\n >\n <span slot=\"label\">warning status</span>\n </hy-select>\n <br /><br />\n <br /><br />\n <hr />\n <br /><br />\n <h3>Default with error status</h3>\n <hy-select\n status=\"error\"\n .options=${this.options}\n @changed=${(e: any) => {\n this.selectedOptions = e.detail.value;\n console.log(this.selectedOptions);\n }}\n >\n <span slot=\"label\">label</span>\n <span slot=\"helper-text\">error status</span>\n </hy-select>\n <br /><br />\n <br /><br />\n <hr />\n <h3>Disabledwith error status</h3>\n <hy-select\n .disabled=${true}\n status=\"error\"\n .options=${this.options}\n @changed=${(e: any) => {\n this.selectedOptions = e.detail.value;\n console.log(this.selectedOptions);\n }}\n >\n <span slot=\"label\">label</span>\n <span slot=\"helper-text\">error status</span>\n </hy-select>\n <br /><br />\n <br /><br />\n <hr />\n <br /><br />\n <h3>Default and type inline</h3>\n\n <hy-select\n type=\"inline\"\n .options=${this.options}\n @changed=${(e: any) => {\n this.selectedOptions = e.detail.value;\n console.log(this.selectedOptions);\n }}\n >\n <span slot=\"label\">type inline</span>\n <span slot=\"helper-text\">label</span>\n </hy-select>\n <br /><br />\n <br /><br />\n\n <hr />\n <br /><br />\n <h3>Default with small size</h3>\n\n <hy-select\n size=\"small\"\n .options=${this.options}\n @changed=${(e: any) => {\n this.selectedOptions = e.detail.value;\n console.log(this.selectedOptions);\n }}\n >\n <span slot=\"label\">small select</span>\n </hy-select>\n <br /><br />\n <br /><br />\n\n <hr />\n <br /><br />\n <h3>Default with large size</h3>\n <hy-select\n size=\"large\"\n .options=${this.options}\n @changed=${(e: any) => {\n this.selectedOptions = e.detail.value;\n console.log(this.selectedOptions);\n }}\n >\n <span slot=\"label\">large select</span>\n </hy-select>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hy-select-demo': SlectDemoElement;\n }\n}\n"]}
1
+ {"version":3,"file":"select-demo.js","sourceRoot":"","sources":["../../../../src/components/select/demo/select-demo.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,uDAAuD;AACvD;;;;GAIG;;;;;;;AAEH,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAEzD,OAAO,qBAAqB,CAAC;AAC7B,OAAO,sCAAsC,CAAC;AAC9C,OAAO,kCAAkC,CAAC;AAC1C,OAAO,2BAA2B,CAAC;AACnC,OAAO,6BAA6B,CAAC;AAGrC,IAAa,gBAAgB,GAA7B,MAAa,gBAAiB,SAAQ,UAAU;IAAhD;;QAEE,YAAO,GAAG;YACR,EAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAC;YAChC,EAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAC;YAClC,EAAC,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAC;YACpC,EAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAC;YAClC,EAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAC;YAClC,EAAC,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAC;YACxC,EAAC,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,cAAc,EAAC;SAC/C,CAAC;QAGF,oBAAe,GAAG,EAAE,CAAC;IAiNvB,CAAC;IAhNU,MAAM;QACb,OAAO,IAAI,CAAA;;;mBAGI,IAAI,CAAC,OAAO;mBACZ,CAAC,CAAM,EAAE,EAAE;YACpB,IAAI,CAAC,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;YAC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AAC;QACpC,CAAC;;;;;;;;;;;;mBAYU,IAAI,CAAC,OAAO;mBACZ,CAAC,CAAM,EAAE,EAAE;YACpB,IAAI,CAAC,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;YACtC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QACpC,CAAC;;;;KAIJ,CAAC;IACJ,CAAC;CACF,CAAA;AA5NC;IADC,KAAK,EAAE;iDASN;AAGF;IADC,KAAK,EAAE;yDACa;AAbV,gBAAgB;IAD5B,aAAa,CAAC,gBAAgB,CAAC;GACnB,gBAAgB,CA8N5B;SA9NY,gBAAgB","sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/**\n * @license\n * Copyright 2023 Google Laabidi Aymen\n * SPDX-License-Identifier: MIT\n */\n\nimport { LitElement, html } from 'lit';\nimport { customElement, state } from 'lit/decorators.js';\n\nimport '../select.component';\nimport '../../dropdown/hy-dropdown.component';\nimport '../../button/nr-button.component';\nimport '../../tabs/tabs.component';\nimport '../../input/input.component';\n\n@customElement('hy-select-demo')\nexport class SlectDemoElement extends LitElement {\n @state()\n options = [\n {value: 'abuja', label: 'Abuja'},\n {value: 'duplin', label: 'Duplin'},\n {value: 'nairobi', label: 'Nairobi'},\n {value: 'beirut', label: 'Beirut'},\n {value: 'prague', label: 'Prague'},\n {value: 'marrakech', label: 'Marrakech'},\n {value: 'buenos aires', label: 'Buenos Aires'},\n ];\n\n @state()\n selectedOptions = [];\n override render() {\n return html`\n <h3>Default: single selection without default values</h3>\n <hy-select\n .options=${this.options}\n @changed=${(e: any) => {\n this.selectedOptions = e.detail.value;\n console.log(this.selectedOptions);\n }}\n >\n </hy-select>\n <br /><br />\n <br /><br />\n\n <hr />\n <br /><br />\n <h3>single selection with default values</h3>\n\n <hy-select\n .options=${this.options}\n .defaultSelected=\"${['Duplin']}\"\n @changed=${(e: any) => {\n this.selectedOptions = e.detail.value;\n console.log(this.selectedOptions);\n }}\n >\n </hy-select>\n <br /><br />\n <br /><br />\n\n <hr />\n <br /><br />\n <h3>Disabled</h3>\n\n <hy-select\n .options=${this.options}\n .disabled=${true}\n @changed=${(e: any) => {\n this.selectedOptions = e.detail.value;\n console.log(this.selectedOptions);\n }}\n >\n <span slot=\"label\">disabled input</span>\n <span slot=\"helper-text\">helper</span>\n </hy-select>\n\n <br /><br />\n <br /><br />\n <hr />\n <br /><br />\n <h3>Multiple selection without default values</h3>\n\n <hy-select\n selectionMode=\"multiple\"\n .options=${this.options}\n @changed=${(e: any) => {\n this.selectedOptions = e.detail.value;\n console.log(this.selectedOptions);\n }}\n >\n <span slot=\"label\">Selection mode: multiple</span>\n </hy-select>\n <br /><br />\n <br /><br />\n <hr />\n <br /><br />\n <h3>single selection with default value</h3>\n\n <hy-select\n .defaultSelected=\"${['Abuja']}\"\n .options=${this.options}\n @changed=${(e: any) => {\n this.selectedOptions = e.detail.value;\n console.log(this.selectedOptions);\n }}\n >\n <span slot=\"label\">Selection mode: single, default selected: Abuja</span>\n </hy-select>\n <br /><br />\n <br /><br />\n <hr />\n <br /><br />\n <h3>Multiple selection with default values and empty placeholder</h3>\n <hy-select\n selectionMode=\"multiple\"\n placeholder=\"\"\n .defaultSelected=\"${['Abuja', 'Nairobi']}\"\n .options=${this.options}\n @changed=${(e: any) => {\n this.selectedOptions = e.detail.value;\n console.log(this.selectedOptions);\n }}\n >\n <span slot=\"label\">Selection Mode: multiple</span>\n </hy-select>\n <br /><br />\n <br /><br />\n <hr />\n <br /><br />\n <h3>Default with warning status</h3>\n <hy-select\n status=\"warning\"\n .options=${this.options}\n @changed=${(e: any) => {\n this.selectedOptions = e.detail.value;\n console.log(this.selectedOptions);\n }}\n >\n <span slot=\"label\">warning status</span>\n </hy-select>\n <br /><br />\n <br /><br />\n <h3>Disabled with warning status</h3>\n <hy-select\n status=\"warning\"\n .disabled=${true}\n .options=${this.options}\n @changed=${(e: any) => {\n this.selectedOptions = e.detail.value;\n console.log(this.selectedOptions);\n }}\n >\n <span slot=\"label\">warning status</span>\n </hy-select>\n <br /><br />\n <br /><br />\n <hr />\n <br /><br />\n <h3>Default with error status</h3>\n <hy-select\n status=\"error\"\n .options=${this.options}\n @changed=${(e: any) => {\n this.selectedOptions = e.detail.value;\n console.log(this.selectedOptions);\n }}\n >\n <span slot=\"label\">label</span>\n <span slot=\"helper-text\">error status</span>\n </hy-select>\n <br /><br />\n <br /><br />\n <hr />\n <h3>Disabledwith error status</h3>\n <hy-select\n .disabled=${true}\n status=\"error\"\n .options=${this.options}\n @changed=${(e: any) => {\n this.selectedOptions = e.detail.value;\n console.log(this.selectedOptions);\n }}\n >\n <span slot=\"label\">label</span>\n <span slot=\"helper-text\">error status</span>\n </hy-select>\n <br /><br />\n <br /><br />\n <hr />\n <br /><br />\n <h3>Default and type inline</h3>\n\n <hy-select\n type=\"inline\"\n .options=${this.options}\n @changed=${(e: any) => {\n this.selectedOptions = e.detail.value;\n console.log(this.selectedOptions);\n }}\n >\n <span slot=\"label\">type inline</span>\n <span slot=\"helper-text\">label</span>\n </hy-select>\n <br /><br />\n <br /><br />\n\n <hr />\n <br /><br />\n <h3>Default with small size</h3>\n\n <hy-select\n size=\"small\"\n .options=${this.options}\n @changed=${(e: any) => {\n this.selectedOptions = e.detail.value;\n console.log(this.selectedOptions);\n }}\n >\n <span slot=\"label\">small select</span>\n </hy-select>\n <br /><br />\n <br /><br />\n\n <hr />\n <br /><br />\n <h3>Default with large size</h3>\n <hy-select\n size=\"large\"\n .options=${this.options}\n @changed=${(e: any) => {\n this.selectedOptions = e.detail.value;\n console.log(this.selectedOptions);\n }}\n >\n <span slot=\"label\">large select</span>\n </hy-select>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hy-select-demo': SlectDemoElement;\n }\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuralyui/select",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "type": "module",