@zanichelli/albe-web-components 13.1.2 → 13.2.0-rc1

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.
Files changed (118) hide show
  1. package/CHANGELOG.md +0 -6
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/web-components-library.cjs.js +1 -1
  4. package/dist/cjs/z-app-header_12.cjs.entry.js +12 -6
  5. package/dist/cjs/z-app-header_12.cjs.entry.js.map +1 -1
  6. package/dist/cjs/z-carousel.cjs.entry.js +2 -3
  7. package/dist/cjs/z-carousel.cjs.entry.js.map +1 -1
  8. package/dist/cjs/z-combobox.cjs.entry.js +145 -38
  9. package/dist/cjs/z-combobox.cjs.entry.js.map +1 -1
  10. package/dist/cjs/z-file-upload.cjs.entry.js +14 -25
  11. package/dist/cjs/z-file-upload.cjs.entry.js.map +1 -1
  12. package/dist/cjs/z-popover.cjs.entry.js +3 -3
  13. package/dist/cjs/z-popover.cjs.entry.js.map +1 -1
  14. package/dist/cjs/z-table.cjs.entry.js +2 -3
  15. package/dist/cjs/z-table.cjs.entry.js.map +1 -1
  16. package/dist/collection/components/file-upload/z-file-upload/index.js +13 -63
  17. package/dist/collection/components/file-upload/z-file-upload/index.js.map +1 -1
  18. package/dist/collection/components/file-upload/z-file-upload/styles.css +0 -12
  19. package/dist/collection/components/inputs/z-combobox/index.js +149 -41
  20. package/dist/collection/components/inputs/z-combobox/index.js.map +1 -1
  21. package/dist/collection/components/inputs/z-combobox/index.spec.js +185 -155
  22. package/dist/collection/components/inputs/z-combobox/index.spec.js.map +1 -1
  23. package/dist/collection/components/inputs/z-combobox/styles.css +10 -10
  24. package/dist/collection/components/inputs/z-input/index.js +41 -5
  25. package/dist/collection/components/inputs/z-input/index.js.map +1 -1
  26. package/dist/collection/components/list/z-list-element/index.js +20 -1
  27. package/dist/collection/components/list/z-list-element/index.js.map +1 -1
  28. package/dist/collection/components/table/z-table/index.js +2 -3
  29. package/dist/collection/components/table/z-table/index.js.map +1 -1
  30. package/dist/collection/components/z-carousel/index.js +1 -2
  31. package/dist/collection/components/z-carousel/index.js.map +1 -1
  32. package/dist/collection/components/z-carousel/styles.css +0 -1
  33. package/dist/collection/components/z-popover/index.js +4 -4
  34. package/dist/collection/components/z-popover/index.js.map +1 -1
  35. package/dist/components/index10.js +11 -5
  36. package/dist/components/index10.js.map +1 -1
  37. package/dist/components/index13.js +3 -1
  38. package/dist/components/index13.js.map +1 -1
  39. package/dist/components/index25.js +3 -3
  40. package/dist/components/index25.js.map +1 -1
  41. package/dist/components/z-carousel.js +2 -3
  42. package/dist/components/z-carousel.js.map +1 -1
  43. package/dist/components/z-combobox.js +163 -49
  44. package/dist/components/z-combobox.js.map +1 -1
  45. package/dist/components/z-file-upload.js +15 -28
  46. package/dist/components/z-file-upload.js.map +1 -1
  47. package/dist/components/z-table.js +2 -3
  48. package/dist/components/z-table.js.map +1 -1
  49. package/dist/esm/loader.js +1 -1
  50. package/dist/esm/web-components-library.js +1 -1
  51. package/dist/esm/z-app-header_12.entry.js +12 -6
  52. package/dist/esm/z-app-header_12.entry.js.map +1 -1
  53. package/dist/esm/z-carousel.entry.js +2 -3
  54. package/dist/esm/z-carousel.entry.js.map +1 -1
  55. package/dist/esm/z-combobox.entry.js +147 -40
  56. package/dist/esm/z-combobox.entry.js.map +1 -1
  57. package/dist/esm/z-file-upload.entry.js +14 -25
  58. package/dist/esm/z-file-upload.entry.js.map +1 -1
  59. package/dist/esm/z-popover.entry.js +3 -3
  60. package/dist/esm/z-popover.entry.js.map +1 -1
  61. package/dist/esm/z-table.entry.js +2 -3
  62. package/dist/esm/z-table.entry.js.map +1 -1
  63. package/dist/types/components/file-upload/z-file-upload/index.d.ts +0 -5
  64. package/dist/types/components/inputs/z-combobox/index.d.ts +14 -1
  65. package/dist/types/components/inputs/z-input/index.d.ts +5 -0
  66. package/dist/types/components/list/z-list-element/index.d.ts +2 -0
  67. package/dist/types/components/z-popover/index.d.ts +0 -1
  68. package/dist/types/components.d.ts +23 -14
  69. package/dist/web-components-library/{p-3796ca7c.entry.js → p-158b6dda.entry.js} +2 -2
  70. package/dist/web-components-library/p-158b6dda.entry.js.map +1 -0
  71. package/dist/web-components-library/{p-f7607ce7.entry.js → p-2637ab23.entry.js} +2 -2
  72. package/dist/web-components-library/p-2637ab23.entry.js.map +1 -0
  73. package/{www/build/p-91a7c5a9.entry.js → dist/web-components-library/p-2b2cb566.entry.js} +2 -2
  74. package/dist/web-components-library/p-2b2cb566.entry.js.map +1 -0
  75. package/dist/web-components-library/p-2df884ef.entry.js +2 -0
  76. package/dist/web-components-library/p-2df884ef.entry.js.map +1 -0
  77. package/dist/web-components-library/p-5023f7d5.entry.js +2 -0
  78. package/dist/web-components-library/p-5023f7d5.entry.js.map +1 -0
  79. package/dist/web-components-library/p-93cb103f.entry.js +2 -0
  80. package/dist/web-components-library/p-93cb103f.entry.js.map +1 -0
  81. package/dist/web-components-library/web-components-library.esm.js +1 -1
  82. package/dist/web-components-library/web-components-library.esm.js.map +1 -1
  83. package/package.json +1 -1
  84. package/www/build/{p-3796ca7c.entry.js → p-158b6dda.entry.js} +2 -2
  85. package/www/build/p-158b6dda.entry.js.map +1 -0
  86. package/www/build/{p-f7607ce7.entry.js → p-2637ab23.entry.js} +2 -2
  87. package/www/build/p-2637ab23.entry.js.map +1 -0
  88. package/{dist/web-components-library/p-91a7c5a9.entry.js → www/build/p-2b2cb566.entry.js} +2 -2
  89. package/www/build/p-2b2cb566.entry.js.map +1 -0
  90. package/www/build/p-2df884ef.entry.js +2 -0
  91. package/www/build/p-2df884ef.entry.js.map +1 -0
  92. package/www/build/p-32cd9d9b.js +2 -0
  93. package/www/build/p-5023f7d5.entry.js +2 -0
  94. package/www/build/p-5023f7d5.entry.js.map +1 -0
  95. package/www/build/p-93cb103f.entry.js +2 -0
  96. package/www/build/p-93cb103f.entry.js.map +1 -0
  97. package/www/build/web-components-library.esm.js +1 -1
  98. package/www/build/web-components-library.esm.js.map +1 -1
  99. package/www/index.html +1 -1
  100. package/dist/web-components-library/p-3796ca7c.entry.js.map +0 -1
  101. package/dist/web-components-library/p-91a7c5a9.entry.js.map +0 -1
  102. package/dist/web-components-library/p-9a42f04c.entry.js +0 -2
  103. package/dist/web-components-library/p-9a42f04c.entry.js.map +0 -1
  104. package/dist/web-components-library/p-9b52dea5.entry.js +0 -2
  105. package/dist/web-components-library/p-9b52dea5.entry.js.map +0 -1
  106. package/dist/web-components-library/p-ba8e67ee.entry.js +0 -2
  107. package/dist/web-components-library/p-ba8e67ee.entry.js.map +0 -1
  108. package/dist/web-components-library/p-f7607ce7.entry.js.map +0 -1
  109. package/www/build/p-3796ca7c.entry.js.map +0 -1
  110. package/www/build/p-83f1ed74.js +0 -2
  111. package/www/build/p-91a7c5a9.entry.js.map +0 -1
  112. package/www/build/p-9a42f04c.entry.js +0 -2
  113. package/www/build/p-9a42f04c.entry.js.map +0 -1
  114. package/www/build/p-9b52dea5.entry.js +0 -2
  115. package/www/build/p-9b52dea5.entry.js.map +0 -1
  116. package/www/build/p-ba8e67ee.entry.js +0 -2
  117. package/www/build/p-ba8e67ee.entry.js.map +0 -1
  118. package/www/build/p-f7607ce7.entry.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.spec.js","sourceRoot":"","sources":["../../../../src/components/inputs/z-combobox/index.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,uBAAuB,CAAC;AAElD,OAAO,EAAC,SAAS,EAAC,MAAM,SAAS,CAAC;AAElC,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;IACpC,EAAE,CAAC,8BAA8B,EAAE,KAAK,IAAI,EAAE;QAC5C,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B,UAAU,EAAE,CAAC,SAAS,CAAC;YACvB,IAAI,EAAE,sCAAsC;SAC7C,CAAC,CAAC;QACH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;;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AAC;QAChC,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;QAC5B,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;KA0B7B,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,2EAA2E,EAAE,KAAK,IAAI,EAAE;QACzF,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B,UAAU,EAAE,CAAC,SAAS,CAAC;YACvB,IAAI,EAAE,2QAA2Q;SAClR,CAAC,CAAC;QACH,IAAI,CAAC,YAAY,CAAC,MAAM,GAAG,IAAI,CAAC;QAChC,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;QAC5B,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;KA0B7B,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import {newSpecPage} from \"@stencil/core/testing\";\n\nimport {ZCombobox} from \"./index\";\n\ndescribe(\"Suite test ZCombobox\", () => {\n it(\"Test render ZCombobox chiusa\", async () => {\n const page = await newSpecPage({\n components: [ZCombobox],\n html: `<z-combobox items='[]'></z-combobox>`,\n });\n expect(page.root).toEqualHtml(`\n <z-combobox items='[]'>\n <mock:shadow-root>\n <div data-action=\"combo-undefined\">\n <div class=\"header\" role=\"button\" tabindex=\"0\">\n <p class=\"body-3\"><span></span></p>\n <z-icon class=\"big\" name=\"caret-down\" />\n </div>\n </div>\n </mock:shadow-root>\n </z-combobox>\n `);\n });\n\n it(\"Test render ZCombobox disabilitata\", async () => {\n const page = await newSpecPage({\n components: [ZCombobox],\n html: `<z-combobox items='[]' disabled='true'></z-combobox>`,\n });\n expect(page.root).toEqualHtml(`\n <z-combobox disabled='' items='[]'>\n <mock:shadow-root>\n <div class=\"disabled\" data-action=\"combo-undefined\">\n <div class=\"header\" role=\"button\" tabindex=\"0\">\n <p class=\"body-3\"><span></span></p>\n <z-icon class=\"big\" name=\"caret-down\" />\n </div>\n </div>\n </mock:shadow-root>\n </z-combobox>\n `);\n });\n\n it(\"Test render ZCombobox chiusa con attributi\", async () => {\n const page = await newSpecPage({\n components: [ZCombobox],\n html: `<z-combobox items='[]' inputid=\"combobox\" label=\"label\" isfixed></z-combobox>`,\n });\n expect(page.root).toEqualHtml(`\n <z-combobox items='[]' inputid=\"combobox\" label=\"label\" isfixed>\n <mock:shadow-root>\n <div class=\"fixed\" id=\"combobox\" data-action=\"combo-combobox\">\n <div class=\"header\" role=\"button\" tabindex=\"0\">\n <p class=\"body-3\">\n label\n <span></span>\n </p>\n <z-icon class=\"big\" name=\"caret-down\" />\n </div>\n </div>\n </mock:shadow-root>\n </z-combobox>\n `);\n });\n\n it(\"Test render ZCombobox chiusa con attributi ed elemento selezionato\", async () => {\n const page = await newSpecPage({\n components: [ZCombobox],\n html: `<z-combobox items='[{\"id\":\"item_1\",\"name\":\"primo elemento\",\"checked\":false},{\"id\":\"item_2\",\"name\":\"secondo elemento\",\"checked\":true}]' inputid=\"combobox\" label=\"label\"></z-combobox>`,\n });\n expect(page.root).toEqualHtml(`\n <z-combobox items='[{\"id\":\"item_1\",\"name\":\"primo elemento\",\"checked\":false},{\"id\":\"item_2\",\"name\":\"secondo elemento\",\"checked\":true}]' inputid=\"combobox\" label=\"label\">\n <mock:shadow-root>\n <div data-action=\"combo-combobox\" id=\"combobox\">\n <div class=\"header\" role=\"button\" tabindex=\"0\">\n <p class=\"body-3\">\n label\n <span>(1)</span>\n </p>\n <z-icon class=\"big\" name=\"caret-down\" />\n </div>\n </div>\n </mock:shadow-root>\n </z-combobox>\n `);\n });\n\n it(\"Test render ZCombobox aperta vuota\", async () => {\n const page = await newSpecPage({\n components: [ZCombobox],\n html: `<z-combobox items='[]' noresultslabel='non ci sono risultati'></z-combobox>`,\n });\n page.rootInstance.isopen = true;\n await page.waitForChanges();\n expect(page.root).toEqualHtml(`\n <z-combobox items='[]' noresultslabel='non ci sono risultati'>\n <mock:shadow-root>\n <div class=\"open\" data-action=\"combo-undefined\">\n <div class=\"header\" role=\"button\" tabindex=\"0\">\n <p class=\"body-3\"><span></span></p>\n <z-icon class=\"big\" name=\"caret-down\" ></z-icon>\n </div>\n <div class=\"open-combo-data\">\n <div tabindex=\"-1\">\n <ul></ul>\n </div>\n </div>\n </div>\n </mock:shadow-root>\n </z-combobox>\n `);\n });\n\n it(\"Test render ZCombobox aperta con elementi\", async () => {\n const page = await newSpecPage({\n components: [ZCombobox],\n html: `<z-combobox inputid=\"combo\" label=\"combo\" items='[{\"id\":\"item_1\",\"name\":\"primo elemento\",\"checked\":false},{\"id\":\"item_2\",\"name\":\"secondo elemento\",\"checked\":true}]'></z-combobox>`,\n });\n page.rootInstance.isopen = true;\n await page.waitForChanges();\n expect(page.root).toEqualHtml(`\n <z-combobox inputid=\"combo\" label=\"combo\" items='[{\"id\":\"item_1\",\"name\":\"primo elemento\",\"checked\":false},{\"id\":\"item_2\",\"name\":\"secondo elemento\",\"checked\":true}]'>\n <mock:shadow-root>\n <div class=\"open\" data-action=\"combo-combo\" id=\"combo\">\n <div class=\"header\" role=\"button\" tabindex=\"0\">\n <p class=\"body-3\">combo<span>(1)</span></p>\n <z-icon class=\"big\" name=\"caret-down\" />\n </div>\n <div class=\"open-combo-data\">\n <div tabindex=\"-1\">\n <ul>\n <z-myz-list-item class=\"big\" id=\"item_1\" listitemid=\"item_1\" action=\"combo-li-combo\" underlined=\"\">\n <z-input disabled=\"0\" type=\"checkbox\" size=\"big\" htmlid=\"combo-checkbox-combo-item_1\" label=\"primo elemento\"></z-input>\n </z-myz-list-item>\n <z-myz-list-item class=\"big\" id=\"item_2\" listitemid=\"item_2\" action=\"combo-li-combo\">\n <z-input type=\"checkbox\" size=\"big\" htmlid=\"combo-checkbox-combo-item_2\" label=\"secondo elemento\" checked></z-input>\n </z-myz-list-item>\n </ul>\n </div\n </div>\n </div>\n </mock:shadow-root>\n </z-combobox>\n `);\n });\n\n it(\"Test render ZCombobox aperta con ricerca\", async () => {\n const page = await newSpecPage({\n components: [ZCombobox],\n html: `<z-combobox inputid=\"combo\" label=\"combo\" hassearch=true searchlabel=\"cerca\" searchplaceholder=\"placeholder\" items='[{\"id\":\"item_1\",\"name\":\"primo elemento\",\"checked\":false},{\"id\":\"item_2\",\"name\":\"secondo elemento\",\"checked\":true}]'></z-combobox>`,\n });\n page.rootInstance.isopen = true;\n await page.waitForChanges();\n expect(page.root).toEqualHtml(`\n <z-combobox inputid=\"combo\" label=\"combo\" hassearch=true searchlabel=\"cerca\" searchplaceholder=\"placeholder\" items='[{\"id\":\"item_1\",\"name\":\"primo elemento\",\"checked\":false},{\"id\":\"item_2\",\"name\":\"secondo elemento\",\"checked\":true}]'>\n <mock:shadow-root>\n <div class=\"open\" data-action=\"combo-combo\" id=\"combo\">\n <div class=\"header\" role=\"button\" tabindex=\"0\">\n <p class=\"body-3\">combo<span>(1)</span></p>\n <z-icon class=\"big\" name=\"caret-down\" />\n </div>\n <div class=\"open-combo-data\">\n <z-input size=\"big\" htmlid=\"combo_search\" label=\"cerca\" placeholder=\"placeholder\" type=\"text\"></z-input>\n <div tabindex=\"-1\">\n <ul>\n <z-myz-list-item class=\"big\" id=\"item_1\" listitemid=\"item_1\" action=\"combo-li-combo\" underlined=\"\">\n <z-input disabled=\"0\" type=\"checkbox\" size=\"big\" htmlid=\"combo-checkbox-combo-item_1\" label=\"primo elemento\"></z-input>\n </z-myz-list-item>\n <z-myz-list-item class=\"big\" id=\"item_2\" listitemid=\"item_2\" action=\"combo-li-combo\">\n <z-input type=\"checkbox\" size=\"big\" htmlid=\"combo-checkbox-combo-item_2\" label=\"secondo elemento\" checked></z-input>\n </z-myz-list-item>\n </ul>\n </div>\n </div>\n </div>\n </mock:shadow-root>\n </z-combobox>\n `);\n });\n\n it(\"Test render ZCombobox aperta con ricerca attiva e risultati\", async () => {\n const page = await newSpecPage({\n components: [ZCombobox],\n html: `<z-combobox inputid=\"combo\" label=\"combo\" hassearch=true searchlabel=\"cerca\" searchplaceholder=\"placeholder\" closesearchtext=\"CHIUDI\" items='[{\"id\":\"item_1\",\"name\":\"primo elemento\",\"checked\":false},{\"id\":\"item_2\",\"name\":\"secondo elemento\",\"checked\":true}]'></z-combobox>`,\n });\n page.rootInstance.isopen = true;\n page.rootInstance.searchValue = \"primo\";\n await page.waitForChanges();\n expect(page.root).toEqualHtml(`\n <z-combobox inputid=\"combo\" label=\"combo\" hassearch=true searchlabel=\"cerca\" searchplaceholder=\"placeholder\" closesearchtext=\"CHIUDI\" items='[{\"id\":\"item_1\",\"name\":\"primo elemento\",\"checked\":false},{\"id\":\"item_2\",\"name\":\"secondo elemento\",\"checked\":true}]'>\n <mock:shadow-root>\n <div class=\"open\" data-action=\"combo-combo\" id=\"combo\">\n <div class=\"header\" role=\"button\" tabindex=\"0\">\n <p class=\"body-3\">combo<span>(1)</span></p>\n <z-icon class=\"big\" name=\"caret-down\" />\n </div>\n <div class=\"open-combo-data\">\n <z-input size=\"big\" htmlid=\"combo_search\" label=\"cerca\" placeholder=\"placeholder\" type=\"text\" value=\"primo\"></z-input>\n <div class=\"search\" tabindex=\"-1\">\n <ul>\n <z-myz-list-item class=\"big\" id=\"item_1\" listitemid=\"item_1\" action=\"combo-li-combo\">\n <z-input disabled=\"0\" type=\"checkbox\" size=\"big\" htmlid=\"combo-checkbox-combo-item_1\" label=\"<b>primo</b> elemento\"></z-input>\n </z-myz-list-item>\n </ul>\n <div>\n <a role=\"button\" tabindex=\"0\">CHIUDI</a>\n </div>\n </div>\n </div>\n </div>\n </mock:shadow-root>\n </z-combobox>\n `);\n });\n\n it(\"Test render ZCombobox aperta con ricerca attiva senza testo di chiusura della ricerca testuale\", async () => {\n const page = await newSpecPage({\n components: [ZCombobox],\n html: `<z-combobox inputid=\"combo\" label=\"combo\" hassearch=true searchlabel=\"cerca\" searchplaceholder=\"placeholder\" items='[{\"id\":\"item_1\",\"name\":\"primo elemento\",\"checked\":false},{\"id\":\"item_2\",\"name\":\"secondo elemento\",\"checked\":true}]'></z-combobox>`,\n });\n page.rootInstance.isopen = true;\n page.rootInstance.searchValue = \"primo\";\n await page.waitForChanges();\n expect(page.root).toEqualHtml(`\n <z-combobox inputid=\"combo\" label=\"combo\" hassearch=true searchlabel=\"cerca\" searchplaceholder=\"placeholder\" items='[{\"id\":\"item_1\",\"name\":\"primo elemento\",\"checked\":false},{\"id\":\"item_2\",\"name\":\"secondo elemento\",\"checked\":true}]'>\n <mock:shadow-root>\n <div class=\"open\" data-action=\"combo-combo\" id=\"combo\">\n <div class=\"header\" role=\"button\" tabindex=\"0\">\n <p class=\"body-3\">combo<span>(1)</span></p>\n <z-icon class=\"big\" name=\"caret-down\" />\n </div>\n <div class=\"open-combo-data\">\n <z-input size=\"big\" htmlid=\"combo_search\" label=\"cerca\" placeholder=\"placeholder\" type=\"text\" value=\"primo\"></z-input>\n <div class=\"search\" tabindex=\"-1\">\n <ul>\n <z-myz-list-item class=\"big\" id=\"item_1\" listitemid=\"item_1\" action=\"combo-li-combo\">\n <z-input disabled=\"0\" type=\"checkbox\" size=\"big\" htmlid=\"combo-checkbox-combo-item_1\" label=\"<b>primo</b> elemento\"></z-input>\n </z-myz-list-item>\n </ul>\n <div>\n <a role=\"button\" tabindex=\"0\">Chiudi</a>\n </div>\n </div>\n </div>\n </div>\n </mock:shadow-root>\n </z-combobox>\n `);\n });\n\n it(\"Test render ZCombobox aperta con ricerca attiva senza risultati\", async () => {\n const page = await newSpecPage({\n components: [ZCombobox],\n html: `<z-combobox inputid=\"combo\" label=\"combo\" hassearch=true searchlabel=\"cerca\" searchplaceholder=\"placeholder\" closesearchtext=\"CHIUDI\" items='[{\"id\":\"item_1\",\"name\":\"primo elemento\",\"checked\":false},{\"id\":\"item_2\",\"name\":\"secondo elemento\",\"checked\":true}]' noresultslabel='non ci sono risultati'></z-combobox>`,\n });\n page.rootInstance.isopen = true;\n page.rootInstance.searchValue = \"prova\";\n await page.waitForChanges();\n expect(page.root).toEqualHtml(`\n <z-combobox inputid=\"combo\" label=\"combo\" hassearch=true searchlabel=\"cerca\" searchplaceholder=\"placeholder\" closesearchtext=\"CHIUDI\" items='[{\"id\":\"item_1\",\"name\":\"primo elemento\",\"checked\":false},{\"id\":\"item_2\",\"name\":\"secondo elemento\",\"checked\":true}]' noresultslabel='non ci sono risultati'>\n <mock:shadow-root>\n <div class=\"open\" data-action=\"combo-combo\" id=\"combo\">\n <div class=\"header\" role=\"button\" tabindex=\"0\">\n <p class=\"body-3\">combo<span>(1)</span></p>\n <z-icon class=\"big\" name=\"caret-down\" />\n </div>\n <div class=\"open-combo-data\">\n <z-input size=\"big\" htmlid=\"combo_search\" label=\"cerca\" placeholder=\"placeholder\" type=\"text\" value=\"prova\"></z-input>\n <div class=\"search\" tabindex=\"-1\">\n <ul>\n <z-myz-list-item class=\"big\" id='no-results' text='non ci sono risultati' listitemid='no-results' icon='multiply-circle'></z-myz-list-item>\n </ul>\n <div>\n <a role=\"button\" tabindex=\"0\">CHIUDI</a>\n </div>\n </div>\n </div>\n </div>\n </mock:shadow-root>\n </z-combobox>\n `);\n });\n\n it(\"Test render ZCombobox aperta con check all\", async () => {\n const page = await newSpecPage({\n components: [ZCombobox],\n html: `<z-combobox inputid=\"combo\" label=\"combo\" hascheckall=\"true\" checkalltext=\"CHECK\" uncheckalltext=\"UNCHECK\" items='[{\"id\":\"item_1\",\"name\":\"primo elemento\",\"checked\":false},{\"id\":\"item_2\",\"name\":\"secondo elemento\",\"checked\":true}]'></z-combobox>`,\n });\n page.rootInstance.isopen = true;\n await page.waitForChanges();\n expect(page.root).toEqualHtml(`\n <z-combobox inputid=\"combo\" label=\"combo\" hascheckall=\"true\" checkalltext=\"CHECK\" uncheckalltext=\"UNCHECK\" items='[{\"id\":\"item_1\",\"name\":\"primo elemento\",\"checked\":false},{\"id\":\"item_2\",\"name\":\"secondo elemento\",\"checked\":true}]'>\n <mock:shadow-root>\n <div class=\"open\" data-action=\"combo-combo\" id=\"combo\">\n <div class=\"header\" role=\"button\" tabindex=\"0\">\n <p class=\"body-3\">combo<span>(1)</span></p>\n <z-icon class=\"big\" name=\"caret-down\" />\n </div>\n <div class=\"open-combo-data\">\n <div class=\"check-all-wrapper\">\n <z-input type=\"checkbox\" size=\"big\" htmlid=\"combo-checkbox-combo-check-all\" label=\"CHECK\" disabled=\"0\" />\n </div>\n <div tabindex=\"-1\">\n <ul>\n <z-myz-list-item class=\"big\" id=\"item_1\" listitemid=\"item_1\" action=\"combo-li-combo\" underlined=\"\">\n <z-input disabled=\"0\" type=\"checkbox\" size=\"big\" htmlid=\"combo-checkbox-combo-item_1\" label=\"primo elemento\"></z-input>\n </z-myz-list-item>\n <z-myz-list-item class=\"big\" id=\"item_2\" listitemid=\"item_2\" action=\"combo-li-combo\">\n <z-input type=\"checkbox\" size=\"big\" htmlid=\"combo-checkbox-combo-item_2\" label=\"secondo elemento\" checked></z-input>\n </z-myz-list-item>\n </ul>\n </div\n </div>\n </div>\n </mock:shadow-root>\n </z-combobox>\n `);\n });\n\n it(\"Test render ZCombobox aperta con uncheck all\", async () => {\n const page = await newSpecPage({\n components: [ZCombobox],\n html: `<z-combobox inputid=\"combo\" label=\"combo\" hascheckall=\"true\" checkalltext=\"CHECK\" uncheckalltext=\"UNCHECK\" items='[{\"id\":\"item_1\",\"name\":\"primo elemento\",\"checked\":true},{\"id\":\"item_2\",\"name\":\"secondo elemento\",\"checked\":true}]'></z-combobox>`,\n });\n page.rootInstance.isopen = true;\n await page.waitForChanges();\n expect(page.root).toEqualHtml(`\n <z-combobox inputid=\"combo\" label=\"combo\" hascheckall=\"true\" checkalltext=\"CHECK\" uncheckalltext=\"UNCHECK\" items='[{\"id\":\"item_1\",\"name\":\"primo elemento\",\"checked\":true},{\"id\":\"item_2\",\"name\":\"secondo elemento\",\"checked\":true}]'>\n <mock:shadow-root>\n <div class=\"open\" data-action=\"combo-combo\" id=\"combo\">\n <div class=\"header\" role=\"button\" tabindex=\"0\">\n <p class=\"body-3\">combo<span>(2)</span></p>\n <z-icon class=\"big\" name=\"caret-down\" />\n </div>\n <div class=\"open-combo-data\">\n <div class=\"check-all-wrapper\">\n <z-input type=\"checkbox\" size=\"big\" htmlid=\"combo-checkbox-combo-check-all\" label=\"UNCHECK\" checked disabled=\"0\" />\n </div>\n <div tabindex=\"-1\">\n <ul>\n <z-myz-list-item class=\"big\" id=\"item_1\" listitemid=\"item_1\" action=\"combo-li-combo\" underlined=\"\">\n <z-input type=\"checkbox\" size=\"big\" htmlid=\"combo-checkbox-combo-item_1\" label=\"primo elemento\" checked></z-input>\n </z-myz-list-item>\n <z-myz-list-item class=\"big\" id=\"item_2\" listitemid=\"item_2\" action=\"combo-li-combo\">\n <z-input type=\"checkbox\" size=\"big\" htmlid=\"combo-checkbox-combo-item_2\" label=\"secondo elemento\" checked></z-input>\n </z-myz-list-item>\n </ul>\n </div\n </div>\n </div>\n </mock:shadow-root>\n </z-combobox>\n `);\n });\n\n it(\"Test render ZCombobox aperta con max checkable items\", async () => {\n const page = await newSpecPage({\n components: [ZCombobox],\n html: `<z-combobox inputid=\"combo\" label=\"combo\" maxcheckableitems=\"1\" items='[{\"id\":\"item_1\",\"name\":\"primo elemento\",\"checked\":false},{\"id\":\"item_2\",\"name\":\"secondo elemento\",\"checked\":true}]'></z-combobox>`,\n });\n page.rootInstance.isopen = true;\n await page.waitForChanges();\n expect(page.root).toEqualHtml(`\n <z-combobox inputid=\"combo\" label=\"combo\" maxcheckableitems=\"1\" items='[{\"id\":\"item_1\",\"name\":\"primo elemento\",\"checked\":false},{\"id\":\"item_2\",\"name\":\"secondo elemento\",\"checked\":true}]'>\n <mock:shadow-root>\n <div class=\"open\" data-action=\"combo-combo\" id=\"combo\">\n <div class=\"header\" role=\"button\" tabindex=\"0\">\n <p class=\"body-3\">combo<span>(1)</span></p>\n <z-icon class=\"big\" name=\"caret-down\" />\n </div>\n <div class=\"open-combo-data\">\n <div tabindex=\"-1\">\n <ul>\n <z-myz-list-item class=\"big\" id=\"item_1\" listitemid=\"item_1\" action=\"combo-li-combo\" underlined=\"\">\n <z-input disabled=\"\" type=\"checkbox\" size=\"big\" htmlid=\"combo-checkbox-combo-item_1\" label=\"primo elemento\"></z-input>\n </z-myz-list-item>\n <z-myz-list-item class=\"big\" id=\"item_2\" listitemid=\"item_2\" action=\"combo-li-combo\">\n <z-input type=\"checkbox\" size=\"big\" htmlid=\"combo-checkbox-combo-item_2\" label=\"secondo elemento\" checked></z-input>\n </z-myz-list-item>\n </ul>\n </div\n </div>\n </div>\n </mock:shadow-root>\n </z-combobox>\n `);\n });\n\n it(\"Test render ZCombobox aperta con maxcheckableitems + check all\", async () => {\n const page = await newSpecPage({\n components: [ZCombobox],\n html: `<z-combobox inputid=\"combo\" label=\"combo\" maxcheckableitems=\"3\" hascheckall=\"true\" checkalltext=\"CHECK\" uncheckalltext=\"UNCHECK\" items='[{\"id\":\"item_1\",\"name\":\"primo elemento\",\"checked\":true},{\"id\":\"item_2\",\"name\":\"secondo elemento\",\"checked\":false}]'></z-combobox>`,\n });\n page.rootInstance.isopen = true;\n await page.waitForChanges();\n expect(page.root).toEqualHtml(`\n <z-combobox inputid=\"combo\" label=\"combo\" maxcheckableitems=\"3\" hascheckall=\"true\" checkalltext=\"CHECK\" uncheckalltext=\"UNCHECK\" items='[{\"id\":\"item_1\",\"name\":\"primo elemento\",\"checked\":true},{\"id\":\"item_2\",\"name\":\"secondo elemento\",\"checked\":false}]'>\n <mock:shadow-root>\n <div class=\"open\" data-action=\"combo-combo\" id=\"combo\">\n <div class=\"header\" role=\"button\" tabindex=\"0\">\n <p class=\"body-3\">combo<span>(1)</span></p>\n <z-icon class=\"big\" name=\"caret-down\" />\n </div>\n <div class=\"open-combo-data\">\n <div class=\"check-all-wrapper\">\n <z-input type=\"checkbox\" size=\"big\" htmlid=\"combo-checkbox-combo-check-all\" label=\"CHECK\" />\n </div>\n <div tabindex=\"-1\">\n <ul>\n <z-myz-list-item id=\"item_1\" class=\"big\" listitemid=\"item_1\" action=\"combo-li-combo\" underlined=\"\">\n <z-input type=\"checkbox\" size=\"big\" htmlid=\"combo-checkbox-combo-item_1\" label=\"primo elemento\" checked></z-input>\n </z-myz-list-item>\n <z-myz-list-item id=\"item_2\" class=\"big\" listitemid=\"item_2\" action=\"combo-li-combo\">\n <z-input type=\"checkbox\" size=\"big\" htmlid=\"combo-checkbox-combo-item_2\" label=\"secondo elemento\"></z-input>\n </z-myz-list-item>\n </ul>\n </div\n </div>\n </div>\n </mock:shadow-root>\n </z-combobox>\n `);\n });\n\n it(\"Test render ZCombobox aperta con maxcheckableitems + check all (disabled)\", async () => {\n const page = await newSpecPage({\n components: [ZCombobox],\n html: `<z-combobox inputid=\"combo\" label=\"combo\" maxcheckableitems=\"1\" hascheckall=\"true\" checkalltext=\"CHECK\" uncheckalltext=\"UNCHECK\" items='[{\"id\":\"item_1\",\"name\":\"primo elemento\",\"checked\":true},{\"id\":\"item_2\",\"name\":\"secondo elemento\",\"checked\":false}]'></z-combobox>`,\n });\n page.rootInstance.isopen = true;\n await page.waitForChanges();\n expect(page.root).toEqualHtml(`\n <z-combobox inputid=\"combo\" label=\"combo\" maxcheckableitems=\"1\" hascheckall=\"true\" checkalltext=\"CHECK\" uncheckalltext=\"UNCHECK\" items='[{\"id\":\"item_1\",\"name\":\"primo elemento\",\"checked\":true},{\"id\":\"item_2\",\"name\":\"secondo elemento\",\"checked\":false}]'>\n <mock:shadow-root>\n <div class=\"open\" data-action=\"combo-combo\" id=\"combo\">\n <div class=\"header\" role=\"button\" tabindex=\"0\">\n <p class=\"body-3\">combo<span>(1)</span></p>\n <z-icon class=\"big\" name=\"caret-down\" />\n </div>\n <div class=\"open-combo-data\">\n <div class=\"check-all-wrapper\">\n <z-input type=\"checkbox\" size=\"big\" disabled htmlid=\"combo-checkbox-combo-check-all\" label=\"CHECK\" />\n </div>\n <div tabindex=\"-1\">\n <ul>\n <z-myz-list-item id=\"item_1\" class=\"big\" listitemid=\"item_1\" action=\"combo-li-combo\" underlined=\"\">\n <z-input type=\"checkbox\" size=\"big\" htmlid=\"combo-checkbox-combo-item_1\" label=\"primo elemento\" checked></z-input>\n </z-myz-list-item>\n <z-myz-list-item id=\"item_2\" class=\"big\" listitemid=\"item_2\" action=\"combo-li-combo\">\n <z-input type=\"checkbox\" size=\"big\" htmlid=\"combo-checkbox-combo-item_2\" label=\"secondo elemento\" disabled></z-input>\n </z-myz-list-item>\n </ul>\n </div\n </div>\n </div>\n </mock:shadow-root>\n </z-combobox>\n `);\n });\n});\n"]}
1
+ {"version":3,"file":"index.spec.js","sourceRoot":"","sources":["../../../../src/components/inputs/z-combobox/index.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,uBAAuB,CAAC;AAElD,OAAO,EAAC,SAAS,EAAC,MAAM,SAAS,CAAC;AAElC,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;IACpC,EAAE,CAAC,8BAA8B,EAAE,KAAK,IAAI,EAAE;QAC5C,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B,UAAU,EAAE,CAAC,SAAS,CAAC;YACvB,IAAI,EAAE,sCAAsC;SAC7C,CAAC,CAAC;QACH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;;;;;;KAW7B,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,oCAAoC,EAAE,KAAK,IAAI,EAAE;QAClD,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B,UAAU,EAAE,CAAC,SAAS,CAAC;YACvB,IAAI,EAAE,sDAAsD;SAC7D,CAAC,CAAC;QACH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;;;;;;KAW7B,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,4CAA4C,EAAE,KAAK,IAAI,EAAE;QAC1D,MAAM,IAAI,GAAG,MAAM,WAAW,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GAAG,IAAI,CAAC;QAChC,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;QAC5B,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA8B7B,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import {newSpecPage} from \"@stencil/core/testing\";\n\nimport {ZCombobox} from \"./index\";\n\ndescribe(\"Suite test ZCombobox\", () => {\n it(\"Test render ZCombobox chiusa\", async () => {\n const page = await newSpecPage({\n components: [ZCombobox],\n html: `<z-combobox items='[]'></z-combobox>`,\n });\n expect(page.root).toEqualHtml(`\n <z-combobox items='[]'>\n <mock:shadow-root>\n <div data-action=\"combo-undefined\">\n <div aria-expanded=\"false\" class=\"header\" role=\"button\" tabindex=\"0\">\n <p class=\"body-3\"><span></span></p>\n <z-icon class=\"big\" name=\"caret-down\" />\n </div>\n </div>\n </mock:shadow-root>\n </z-combobox>\n `);\n });\n\n it(\"Test render ZCombobox disabilitata\", async () => {\n const page = await newSpecPage({\n components: [ZCombobox],\n html: `<z-combobox items='[]' disabled='true'></z-combobox>`,\n });\n expect(page.root).toEqualHtml(`\n <z-combobox disabled='' items='[]'>\n <mock:shadow-root>\n <div class=\"disabled\" data-action=\"combo-undefined\">\n <div aria-expanded=\"false\" class=\"header\" role=\"button\" tabindex=\"0\">\n <p class=\"body-3\"><span></span></p>\n <z-icon class=\"big\" name=\"caret-down\" />\n </div>\n </div>\n </mock:shadow-root>\n </z-combobox>\n `);\n });\n\n it(\"Test render ZCombobox chiusa con attributi\", async () => {\n const page = await newSpecPage({\n components: [ZCombobox],\n html: `<z-combobox items='[]' inputid=\"combobox\" label=\"label\" isfixed></z-combobox>`,\n });\n expect(page.root).toEqualHtml(`\n <z-combobox items='[]' inputid=\"combobox\" label=\"label\" isfixed>\n <mock:shadow-root>\n <div class=\"fixed\" id=\"combobox\" data-action=\"combo-combobox\">\n <div aria-expanded=\"false\" class=\"header\" role=\"button\" tabindex=\"0\">\n <p class=\"body-3\">\n label\n <span></span>\n </p>\n <z-icon class=\"big\" name=\"caret-down\" />\n </div>\n </div>\n </mock:shadow-root>\n </z-combobox>\n `);\n });\n\n it(\"Test render ZCombobox chiusa con attributi ed elemento selezionato\", async () => {\n const page = await newSpecPage({\n components: [ZCombobox],\n html: `<z-combobox items='[{\"id\":\"item_1\",\"name\":\"primo elemento\",\"checked\":false},{\"id\":\"item_2\",\"name\":\"secondo elemento\",\"checked\":true}]' inputid=\"combobox\" label=\"label\"></z-combobox>`,\n });\n expect(page.root).toEqualHtml(`\n <z-combobox items='[{\"id\":\"item_1\",\"name\":\"primo elemento\",\"checked\":false},{\"id\":\"item_2\",\"name\":\"secondo elemento\",\"checked\":true}]' inputid=\"combobox\" label=\"label\">\n <mock:shadow-root>\n <div data-action=\"combo-combobox\" id=\"combobox\">\n <div aria-expanded=\"false\" class=\"header\" role=\"button\" tabindex=\"0\">\n <p class=\"body-3\">\n label\n <span>(1)</span>\n </p>\n <z-icon class=\"big\" name=\"caret-down\" />\n </div>\n </div>\n </mock:shadow-root>\n </z-combobox>\n `);\n });\n\n it(\"Test render ZCombobox aperta vuota\", async () => {\n const page = await newSpecPage({\n components: [ZCombobox],\n html: `<z-combobox items='[]' inputid=\"combobox\" noresultslabel='non ci sono risultati'></z-combobox>`,\n });\n page.rootInstance.isopen = true;\n await page.waitForChanges();\n expect(page.root).toEqualHtml(`\n <z-combobox items='[]' inputid=\"combobox\" noresultslabel='non ci sono risultati'>\n <mock:shadow-root>\n <div class=\"open\" data-action=\"combo-combobox\" id=\"combobox\">\n <div aria-expanded=\"true\" class=\"header\" role=\"button\" tabindex=\"0\">\n <p class=\"body-3\"><span></span></p>\n <z-icon class=\"big\" name=\"caret-down\" ></z-icon>\n </div>\n <div class=\"open-combo-data\">\n <span role=\"combobox\" aria-controls=\"combobox_list\" aria-expanded=\"true\"></span>\n <div aria-multiselectable=\"\" role=\"listbox\" id=\"combobox_list\" aria-owns=\"\">\n <div>\n <ul role=\"none\"></ul>\n </div>\n </div>\n </div>\n </div>\n </mock:shadow-root>\n </z-combobox>\n `);\n });\n\n it(\"Test render ZCombobox aperta con elementi\", async () => {\n const page = await newSpecPage({\n components: [ZCombobox],\n html: `<z-combobox inputid=\"combobox\" label=\"combo\" items='[{\"id\":\"item_1\",\"name\":\"primo elemento\",\"checked\":false},{\"id\":\"item_2\",\"name\":\"secondo elemento\",\"checked\":true}]'></z-combobox>`,\n });\n page.rootInstance.isopen = true;\n await page.waitForChanges();\n expect(page.root).toEqualHtml(`\n <z-combobox inputid=\"combobox\" label=\"combo\" items='[{\"id\":\"item_1\",\"name\":\"primo elemento\",\"checked\":false},{\"id\":\"item_2\",\"name\":\"secondo elemento\",\"checked\":true}]'>\n <mock:shadow-root>\n <div class=\"open\" data-action=\"combo-combobox\" id=\"combobox\">\n <div aria-expanded=\"true\" class=\"header\" role=\"button\" tabindex=\"0\">\n <p class=\"body-3\">combo<span>(1)</span></p>\n <z-icon class=\"big\" name=\"caret-down\" />\n </div>\n <div class=\"open-combo-data\">\n <span role=\"combobox\" aria-controls=\"combobox_list\" aria-expanded=\"true\"></span>\n <div aria-multiselectable=\"\" role=\"listbox\" id=\"combobox_list\" aria-owns=\"combo-checkbox-combobox-item_1 combo-checkbox-combobox-item_2\">\n <div>\n <ul role=\"none\">\n <z-list-element dividertype=\"element\" id=\"item_1\" size=\"large\">\n <z-input role=\"option\" aria-selected=\"false\" disabled=\"0\" class=\"combo-item-checkbox-input-combobox\" type=\"checkbox\" size=\"big\" htmlid=\"combo-checkbox-combobox-item_1\" innertabindex=\"0\" label=\"primo elemento\"></z-input>\n </z-list-element>\n <z-list-element dividertype=\"none\" id=\"item_2\" size=\"large\">\n <z-input role=\"option\" aria-selected=\"true\" type=\"checkbox\" class=\"combo-item-checkbox-input-combobox\" size=\"big\" htmlid=\"combo-checkbox-combobox-item_2\" innertabindex=\"-1\" label=\"secondo elemento\" checked></z-input>\n </z-list-element>\n </ul>\n </div>\n </div>\n </div>\n </div>\n </mock:shadow-root>\n </z-combobox>\n `);\n });\n\n it(\"Test render ZCombobox aperta con ricerca\", async () => {\n const page = await newSpecPage({\n components: [ZCombobox],\n html: `<z-combobox inputid=\"combobox\" label=\"combo\" hassearch=true searchlabel=\"cerca\" searchplaceholder=\"placeholder\" items='[{\"id\":\"item_1\",\"name\":\"primo elemento\",\"checked\":false},{\"id\":\"item_2\",\"name\":\"secondo elemento\",\"checked\":true}]'></z-combobox>`,\n });\n page.rootInstance.isopen = true;\n await page.waitForChanges();\n expect(page.root).toEqualHtml(`\n <z-combobox inputid=\"combobox\" label=\"combo\" hassearch=true searchlabel=\"cerca\" searchplaceholder=\"placeholder\" items='[{\"id\":\"item_1\",\"name\":\"primo elemento\",\"checked\":false},{\"id\":\"item_2\",\"name\":\"secondo elemento\",\"checked\":true}]'>\n <mock:shadow-root>\n <div class=\"open\" data-action=\"combo-combobox\" id=\"combobox\">\n <div aria-expanded=\"true\" class=\"header\" role=\"button\" tabindex=\"0\">\n <p class=\"body-3\">combo<span>(1)</span></p>\n <z-icon class=\"big\" name=\"caret-down\" />\n </div>\n <div class=\"open-combo-data\">\n <z-input aria-autocomplete=\"list\" aria-controls=\"combobox_list\" aria-expanded=\"true\" htmlid=\"combobox_search\" label=\"cerca\" placeholder=\"placeholder\" role=\"combobox\" size=\"big\" type=\"text\"></z-input>\n <div aria-multiselectable=\"\" role=\"listbox\" id=\"combobox_list\" aria-owns=\"combo-checkbox-combobox-item_1 combo-checkbox-combobox-item_2\">\n <div>\n <ul role=\"none\">\n <z-list-element dividertype=\"element\" id=\"item_1\" size=\"large\">\n <z-input role=\"option\" aria-selected=\"false\" disabled=\"0\" class=\"combo-item-checkbox-input-combobox\" type=\"checkbox\" size=\"big\" htmlid=\"combo-checkbox-combobox-item_1\" innertabindex=\"0\" label=\"primo elemento\"></z-input>\n </z-list-element>\n <z-list-element dividertype=\"none\" id=\"item_2\" size=\"large\">\n <z-input type=\"checkbox\" role=\"option\" aria-selected=\"true\" class=\"combo-item-checkbox-input-combobox\" size=\"big\" htmlid=\"combo-checkbox-combobox-item_2\" innertabindex=\"-1\" label=\"secondo elemento\" checked></z-input>\n </z-list-element>\n </ul>\n </div>\n </div>\n </div>\n </div>\n </mock:shadow-root>\n </z-combobox>\n `);\n });\n\n it(\"Test render ZCombobox aperta con ricerca attiva e risultati\", async () => {\n const page = await newSpecPage({\n components: [ZCombobox],\n html: `<z-combobox inputid=\"combobox\" label=\"combo\" hassearch=true searchlabel=\"cerca\" searchplaceholder=\"placeholder\" closesearchtext=\"CHIUDI\" items='[{\"id\":\"item_1\",\"name\":\"primo elemento\",\"checked\":false},{\"id\":\"item_2\",\"name\":\"secondo elemento\",\"checked\":true}]'></z-combobox>`,\n });\n page.rootInstance.isopen = true;\n page.rootInstance.searchValue = \"primo\";\n await page.waitForChanges();\n expect(page.root).toEqualHtml(`\n <z-combobox inputid=\"combobox\" label=\"combo\" hassearch=true searchlabel=\"cerca\" searchplaceholder=\"placeholder\" closesearchtext=\"CHIUDI\" items='[{\"id\":\"item_1\",\"name\":\"primo elemento\",\"checked\":false},{\"id\":\"item_2\",\"name\":\"secondo elemento\",\"checked\":true}]'>\n <mock:shadow-root>\n <div class=\"open\" data-action=\"combo-combobox\" id=\"combobox\">\n <div aria-expanded=\"true\" class=\"header\" role=\"button\" tabindex=\"0\">\n <p class=\"body-3\">combo<span>(1)</span></p>\n <z-icon class=\"big\" name=\"caret-down\" />\n </div>\n <div class=\"open-combo-data\">\n <z-input aria-autocomplete=\"list\" aria-controls=\"combobox_list\" aria-expanded=\"true\" htmlid=\"combobox_search\" label=\"cerca\" placeholder=\"placeholder\" role=\"combobox\" size=\"big\" type=\"text\" value=\"primo\"></z-input> \n <div aria-multiselectable=\"\" role=\"listbox\" id=\"combobox_list\" aria-owns=\"combo-checkbox-combobox-item_1 combo-checkbox-combobox-item_2\">\n <div class=\"search\">\n <ul role=\"none\">\n <z-list-element dividertype=\"none\" id=\"item_1\" size=\"large\">\n <z-input role=\"option\" aria-selected=\"false\" disabled=\"0\" class=\"combo-item-checkbox-input-combobox\" type=\"checkbox\" size=\"big\" htmlid=\"combo-checkbox-combobox-item_1\" innertabindex=\"0\" label=\"<strong>primo</strong> elemento\"></z-input>\n </z-list-element>\n </ul>\n <div>\n <a role=\"button\" tabindex=\"0\">CHIUDI</a>\n </div>\n </div>\n </div>\n </div>\n </div>\n </mock:shadow-root>\n </z-combobox>\n `);\n });\n\n it(\"Test render ZCombobox aperta con ricerca attiva senza testo di chiusura della ricerca testuale\", async () => {\n const page = await newSpecPage({\n components: [ZCombobox],\n html: `<z-combobox inputid=\"combobox\" label=\"combo\" hassearch=true searchlabel=\"cerca\" searchplaceholder=\"placeholder\" items='[{\"id\":\"item_1\",\"name\":\"primo elemento\",\"checked\":false},{\"id\":\"item_2\",\"name\":\"secondo elemento\",\"checked\":true}]'></z-combobox>`,\n });\n page.rootInstance.isopen = true;\n page.rootInstance.searchValue = \"primo\";\n await page.waitForChanges();\n expect(page.root).toEqualHtml(`\n <z-combobox inputid=\"combobox\" label=\"combo\" hassearch=true searchlabel=\"cerca\" searchplaceholder=\"placeholder\" items='[{\"id\":\"item_1\",\"name\":\"primo elemento\",\"checked\":false},{\"id\":\"item_2\",\"name\":\"secondo elemento\",\"checked\":true}]'>\n <mock:shadow-root>\n <div class=\"open\" data-action=\"combo-combobox\" id=\"combobox\">\n <div aria-expanded=\"true\" class=\"header\" role=\"button\" tabindex=\"0\">\n <p class=\"body-3\">combo<span>(1)</span></p>\n <z-icon class=\"big\" name=\"caret-down\" />\n </div>\n <div class=\"open-combo-data\">\n <z-input aria-autocomplete=\"list\" aria-controls=\"combobox_list\" aria-expanded=\"true\" htmlid=\"combobox_search\" label=\"cerca\" placeholder=\"placeholder\" role=\"combobox\" size=\"big\" type=\"text\" value=\"primo\"></z-input> \n <div aria-multiselectable=\"\" role=\"listbox\" id=\"combobox_list\" aria-owns=\"combo-checkbox-combobox-item_1 combo-checkbox-combobox-item_2\">\n <div class=\"search\">\n <ul role=\"none\">\n <z-list-element dividertype=\"none\" id=\"item_1\" size=\"large\">\n <z-input role=\"option\" aria-selected=\"false\" disabled=\"0\" class=\"combo-item-checkbox-input-combobox\" innertabindex=\"0\" type=\"checkbox\" size=\"big\" htmlid=\"combo-checkbox-combobox-item_1\" label=\"<strong>primo</strong> elemento\"></z-input>\n </z-list-element>\n </ul>\n <div>\n <a role=\"button\" tabindex=\"0\">Chiudi</a>\n </div>\n </div>\n </div>\n </div>\n </div>\n </mock:shadow-root>\n </z-combobox>\n `);\n });\n\n it(\"Test render ZCombobox aperta con ricerca attiva senza risultati\", async () => {\n const page = await newSpecPage({\n components: [ZCombobox],\n html: `<z-combobox inputid=\"combobox\" label=\"combo\" hassearch=true searchlabel=\"cerca\" searchplaceholder=\"placeholder\" closesearchtext=\"CHIUDI\" items='[{\"id\":\"item_1\",\"name\":\"primo elemento\",\"checked\":false},{\"id\":\"item_2\",\"name\":\"secondo elemento\",\"checked\":true}]' noresultslabel='non ci sono risultati'></z-combobox>`,\n });\n page.rootInstance.isopen = true;\n page.rootInstance.searchValue = \"prova\";\n await page.waitForChanges();\n expect(page.root).toEqualHtml(`\n <z-combobox inputid=\"combobox\" label=\"combo\" hassearch=true searchlabel=\"cerca\" searchplaceholder=\"placeholder\" closesearchtext=\"CHIUDI\" items='[{\"id\":\"item_1\",\"name\":\"primo elemento\",\"checked\":false},{\"id\":\"item_2\",\"name\":\"secondo elemento\",\"checked\":true}]' noresultslabel='non ci sono risultati'>\n <mock:shadow-root>\n <div class=\"open\" data-action=\"combo-combobox\" id=\"combobox\">\n <div aria-expanded=\"true\" class=\"header\" role=\"button\" tabindex=\"0\">\n <p class=\"body-3\">combo<span>(1)</span></p>\n <z-icon class=\"big\" name=\"caret-down\" />\n </div>\n <div class=\"open-combo-data\">\n <z-input aria-autocomplete=\"list\" aria-controls=\"combobox_list\" aria-expanded=\"true\" htmlid=\"combobox_search\" label=\"cerca\" placeholder=\"placeholder\" role=\"combobox\" size=\"big\" type=\"text\" value=\"prova\"></z-input>\n <div aria-multiselectable=\"\" role=\"listbox\" id=\"combobox_list\" aria-owns=\"combo-checkbox-combobox-item_1 combo-checkbox-combobox-item_2\">\n <div class=\"search\">\n <ul role=\"none\">\n <z-myz-list-item class=\"big\" id='no-results' text='non ci sono risultati' listitemid='no-results' icon='multiply-circle'></z-myz-list-item>\n </ul>\n <div>\n <a role=\"button\" tabindex=\"0\">CHIUDI</a>\n </div>\n </div>\n </div>\n </div>\n </div>\n </mock:shadow-root>\n </z-combobox>\n `);\n });\n\n it(\"Test render ZCombobox aperta con check all\", async () => {\n const page = await newSpecPage({\n components: [ZCombobox],\n html: `<z-combobox inputid=\"combobox\" label=\"combo\" hascheckall=\"true\" checkalltext=\"CHECK\" uncheckalltext=\"UNCHECK\" items='[{\"id\":\"item_1\",\"name\":\"primo elemento\",\"checked\":false},{\"id\":\"item_2\",\"name\":\"secondo elemento\",\"checked\":true}]'></z-combobox>`,\n });\n page.rootInstance.isopen = true;\n await page.waitForChanges();\n expect(page.root).toEqualHtml(`\n <z-combobox inputid=\"combobox\" label=\"combo\" hascheckall=\"true\" checkalltext=\"CHECK\" uncheckalltext=\"UNCHECK\" items='[{\"id\":\"item_1\",\"name\":\"primo elemento\",\"checked\":false},{\"id\":\"item_2\",\"name\":\"secondo elemento\",\"checked\":true}]'>\n <mock:shadow-root>\n <div class=\"open\" data-action=\"combo-combobox\" id=\"combobox\">\n <div aria-expanded=\"true\" class=\"header\" role=\"button\" tabindex=\"0\">\n <p class=\"body-3\">combo<span>(1)</span></p>\n <z-icon class=\"big\" name=\"caret-down\" />\n </div>\n <div class=\"open-combo-data\">\n <span role=\"combobox\" aria-controls=\"combobox_list\" aria-expanded=\"true\"></span>\n <div aria-multiselectable=\"\" role=\"listbox\" id=\"combobox_list\" aria-owns=\"combo-checkbox-combobox-check-all combo-checkbox-combobox-item_1 combo-checkbox-combobox-item_2\">\n <div class=\"check-all-wrapper\">\n <z-input type=\"checkbox\" aria-selected=\"false\" role=\"option\" size=\"big\" htmlid=\"combo-checkbox-combobox-check-all\" class=\"combo-item-checkbox-input-combobox\" label=\"CHECK\" disabled=\"0\" />\n </div>\n <div>\n <ul role=\"none\">\n <z-list-element dividertype=\"element\" id=\"item_1\" size=\"large\">\n <z-input role=\"option\" aria-selected=\"false\" disabled=\"0\" class=\"combo-item-checkbox-input-combobox\" type=\"checkbox\" size=\"big\" htmlid=\"combo-checkbox-combobox-item_1\" innertabindex=\"-1\" label=\"primo elemento\"></z-input>\n </z-list-element>\n <z-list-element dividertype=\"none\" id=\"item_2\" size=\"large\">\n <z-input role=\"option\" aria-selected=\"true\" type=\"checkbox\" class=\"combo-item-checkbox-input-combobox\" size=\"big\" htmlid=\"combo-checkbox-combobox-item_2\" innertabindex=\"-1\" label=\"secondo elemento\" checked></z-input>\n </z-list-element>\n </ul>\n </div>\n </div>\n </div>\n </div>\n </mock:shadow-root>\n </z-combobox>\n `);\n });\n\n it(\"Test render ZCombobox aperta con uncheck all\", async () => {\n const page = await newSpecPage({\n components: [ZCombobox],\n html: `<z-combobox inputid=\"combobox\" label=\"combo\" hascheckall=\"true\" checkalltext=\"CHECK\" uncheckalltext=\"UNCHECK\" items='[{\"id\":\"item_1\",\"name\":\"primo elemento\",\"checked\":true},{\"id\":\"item_2\",\"name\":\"secondo elemento\",\"checked\":true}]'></z-combobox>`,\n });\n page.rootInstance.isopen = true;\n await page.waitForChanges();\n expect(page.root).toEqualHtml(`\n <z-combobox inputid=\"combobox\" label=\"combo\" hascheckall=\"true\" checkalltext=\"CHECK\" uncheckalltext=\"UNCHECK\" items='[{\"id\":\"item_1\",\"name\":\"primo elemento\",\"checked\":true},{\"id\":\"item_2\",\"name\":\"secondo elemento\",\"checked\":true}]'>\n <mock:shadow-root>\n <div class=\"open\" data-action=\"combo-combobox\" id=\"combobox\">\n <div aria-expanded=\"true\" class=\"header\" role=\"button\" tabindex=\"0\">\n <p class=\"body-3\">combo<span>(2)</span></p>\n <z-icon class=\"big\" name=\"caret-down\" />\n </div>\n <div class=\"open-combo-data\">\n <span role=\"combobox\" aria-controls=\"combobox_list\" aria-expanded=\"true\"></span>\n <div aria-multiselectable=\"\" role=\"listbox\" id=\"combobox_list\" aria-owns=\"combo-checkbox-combobox-check-all combo-checkbox-combobox-item_1 combo-checkbox-combobox-item_2\">\n <div class=\"check-all-wrapper\">\n <z-input type=\"checkbox\" aria-selected=\"true\" role=\"option\" size=\"big\" htmlid=\"combo-checkbox-combobox-check-all\" class=\"combo-item-checkbox-input-combobox\" label=\"UNCHECK\" checked disabled=\"0\" />\n </div>\n <div>\n <ul role=\"none\">\n <z-list-element dividertype=\"element\" id=\"item_1\" size=\"large\"> \n <z-input type=\"checkbox\" role=\"option\" aria-selected=\"true\" class=\"combo-item-checkbox-input-combobox\" size=\"big\" htmlid=\"combo-checkbox-combobox-item_1\" innertabindex=\"-1\" label=\"primo elemento\" checked></z-input>\n </z-list-element>\n <z-list-element dividertype=\"none\" id=\"item_2\" size=\"large\">\n <z-input type=\"checkbox\" role=\"option\" aria-selected=\"true\" class=\"combo-item-checkbox-input-combobox\" size=\"big\" htmlid=\"combo-checkbox-combobox-item_2\" innertabindex=\"-1\" label=\"secondo elemento\" checked></z-input>\n </z-list-element>\n </ul>\n </div>\n </div>\n </div>\n </div>\n </mock:shadow-root>\n </z-combobox>\n `);\n });\n\n it(\"Test render ZCombobox aperta con max checkable items\", async () => {\n const page = await newSpecPage({\n components: [ZCombobox],\n html: `<z-combobox inputid=\"combobox\" label=\"combo\" maxcheckableitems=\"1\" items='[{\"id\":\"item_1\",\"name\":\"primo elemento\",\"checked\":false},{\"id\":\"item_2\",\"name\":\"secondo elemento\",\"checked\":true}]'></z-combobox>`,\n });\n page.rootInstance.isopen = true;\n await page.waitForChanges();\n expect(page.root).toEqualHtml(`\n <z-combobox inputid=\"combobox\" label=\"combo\" maxcheckableitems=\"1\" items='[{\"id\":\"item_1\",\"name\":\"primo elemento\",\"checked\":false},{\"id\":\"item_2\",\"name\":\"secondo elemento\",\"checked\":true}]'>\n <mock:shadow-root>\n <div class=\"open\" data-action=\"combo-combobox\" id=\"combobox\">\n <div aria-expanded=\"true\" class=\"header\" role=\"button\" tabindex=\"0\">\n <p class=\"body-3\">combo<span>(1)</span></p>\n <z-icon class=\"big\" name=\"caret-down\" />\n </div>\n <div class=\"open-combo-data\">\n <span role=\"combobox\" aria-controls=\"combobox_list\" aria-expanded=\"true\"></span>\n <div aria-multiselectable=\"\" role=\"listbox\" id=\"combobox_list\" aria-owns=\"combo-checkbox-combobox-item_1 combo-checkbox-combobox-item_2\">\n <div>\n <ul role=\"none\">\n <z-list-element dividertype=\"element\" id=\"item_1\" size=\"large\">\n <z-input role=\"option\" aria-selected=\"false\" disabled=\"\" class=\"combo-item-checkbox-input-combobox\" type=\"checkbox\" size=\"big\" htmlid=\"combo-checkbox-combobox-item_1\" innertabindex=\"0\" label=\"primo elemento\"></z-input>\n </z-list-element>\n <z-list-element dividertype=\"none\" id=\"item_2\" size=\"large\">\n <z-input type=\"checkbox\" role=\"option\" aria-selected=\"true\" class=\"combo-item-checkbox-input-combobox\" size=\"big\" htmlid=\"combo-checkbox-combobox-item_2\" innertabindex=\"-1\" label=\"secondo elemento\" checked></z-input>\n </z-list-element>\n </ul>\n </div>\n </div>\n </div>\n </div>\n </mock:shadow-root>\n </z-combobox>\n `);\n });\n\n it(\"Test render ZCombobox aperta con maxcheckableitems + check all\", async () => {\n const page = await newSpecPage({\n components: [ZCombobox],\n html: `<z-combobox inputid=\"combobox\" label=\"combo\" maxcheckableitems=\"3\" hascheckall=\"true\" checkalltext=\"CHECK\" uncheckalltext=\"UNCHECK\" items='[{\"id\":\"item_1\",\"name\":\"primo elemento\",\"checked\":true},{\"id\":\"item_2\",\"name\":\"secondo elemento\",\"checked\":false}]'></z-combobox>`,\n });\n page.rootInstance.isopen = true;\n await page.waitForChanges();\n expect(page.root).toEqualHtml(`\n <z-combobox inputid=\"combobox\" label=\"combo\" maxcheckableitems=\"3\" hascheckall=\"true\" checkalltext=\"CHECK\" uncheckalltext=\"UNCHECK\" items='[{\"id\":\"item_1\",\"name\":\"primo elemento\",\"checked\":true},{\"id\":\"item_2\",\"name\":\"secondo elemento\",\"checked\":false}]'>\n <mock:shadow-root>\n <div class=\"open\" data-action=\"combo-combobox\" id=\"combobox\">\n <div aria-expanded=\"true\" class=\"header\" role=\"button\" tabindex=\"0\">\n <p class=\"body-3\">combo<span>(1)</span></p>\n <z-icon class=\"big\" name=\"caret-down\" />\n </div>\n <div class=\"open-combo-data\">\n <span role=\"combobox\" aria-controls=\"combobox_list\" aria-expanded=\"true\"></span>\n <div aria-multiselectable=\"\" role=\"listbox\" id=\"combobox_list\" aria-owns=\"combo-checkbox-combobox-check-all combo-checkbox-combobox-item_1 combo-checkbox-combobox-item_2\"> \n <div class=\"check-all-wrapper\">\n <z-input aria-selected=\"false\" type=\"checkbox\" role=\"option\" size=\"big\" htmlid=\"combo-checkbox-combobox-check-all\" class=\"combo-item-checkbox-input-combobox\" label=\"CHECK\" />\n </div>\n <div>\n <ul role=\"none\">\n <z-list-element dividertype=\"element\" id=\"item_1\" size=\"large\"> \n <z-input type=\"checkbox\" role=\"option\" aria-selected=\"true\" size=\"big\" class=\"combo-item-checkbox-input-combobox\" htmlid=\"combo-checkbox-combobox-item_1\"innertabindex=\"-1\" label=\"primo elemento\" checked></z-input>\n </z-list-element>\n <z-list-element dividertype=\"none\" id=\"item_2\" size=\"large\"> \n <z-input type=\"checkbox\" role=\"option\" aria-selected=\"false\" size=\"big\" class=\"combo-item-checkbox-input-combobox\" htmlid=\"combo-checkbox-combobox-item_2\" innertabindex=\"-1\" label=\"secondo elemento\"></z-input>\n </z-list-element>\n </ul>\n </div>\n </div>\n </div>\n </div>\n </mock:shadow-root>\n </z-combobox>\n `);\n });\n\n it(\"Test render ZCombobox aperta con maxcheckableitems + check all (disabled)\", async () => {\n const page = await newSpecPage({\n components: [ZCombobox],\n html: `<z-combobox inputid=\"combobox\" label=\"combo\" maxcheckableitems=\"1\" hascheckall=\"true\" checkalltext=\"CHECK\" uncheckalltext=\"UNCHECK\" items='[{\"id\":\"item_1\",\"name\":\"primo elemento\",\"checked\":true},{\"id\":\"item_2\",\"name\":\"secondo elemento\",\"checked\":false}]'></z-combobox>`,\n });\n page.rootInstance.isopen = true;\n await page.waitForChanges();\n expect(page.root).toEqualHtml(`\n <z-combobox inputid=\"combobox\" label=\"combo\" maxcheckableitems=\"1\" hascheckall=\"true\" checkalltext=\"CHECK\" uncheckalltext=\"UNCHECK\" items='[{\"id\":\"item_1\",\"name\":\"primo elemento\",\"checked\":true},{\"id\":\"item_2\",\"name\":\"secondo elemento\",\"checked\":false}]'>\n <mock:shadow-root>\n <div class=\"open\" data-action=\"combo-combobox\" id=\"combobox\">\n <div aria-expanded=\"true\" class=\"header\" role=\"button\" tabindex=\"0\">\n <p class=\"body-3\">combo<span>(1)</span></p>\n <z-icon class=\"big\" name=\"caret-down\" />\n </div>\n \n <div class=\"open-combo-data\"> \n <span role=\"combobox\" aria-controls=\"combobox_list\" aria-expanded=\"true\"></span>\n <div aria-multiselectable=\"\" role=\"listbox\" id=\"combobox_list\" aria-owns=\"combo-checkbox-combobox-check-all combo-checkbox-combobox-item_1 combo-checkbox-combobox-item_2\">\n <div class=\"check-all-wrapper\">\n <z-input type=\"checkbox\" aria-selected=\"false\" role=\"option\" size=\"big\" disabled htmlid=\"combo-checkbox-combobox-check-all\" class=\"combo-item-checkbox-input-combobox\" label=\"CHECK\" />\n </div>\n <div>\n <ul role=\"none\">\n <z-list-element dividertype=\"element\" id=\"item_1\" size=\"large\"> \n <z-input type=\"checkbox\" role=\"option\" aria-selected=\"true\" class=\"combo-item-checkbox-input-combobox\" size=\"big\" htmlid=\"combo-checkbox-combobox-item_1\" innertabindex=\"0\" label=\"primo elemento\" checked></z-input>\n </z-list-element>\n <z-list-element dividertype=\"none\" id=\"item_2\" size=\"large\"> \n <z-input type=\"checkbox\" role=\"option\" aria-selected=\"false\" class=\"combo-item-checkbox-input-combobox\" size=\"big\" htmlid=\"combo-checkbox-combobox-item_2\" innertabindex=\"-1\" label=\"secondo elemento\" disabled></z-input>\n </z-list-element>\n </ul>\n </div\n </div>\n </div>\n </div>\n </mock:shadow-root>\n </z-combobox>\n `);\n });\n});\n"]}
@@ -1,5 +1,6 @@
1
1
  :host {
2
2
  display: block;
3
+ font-family: var(--font-family-sans);
3
4
  }
4
5
 
5
6
  :host > div.fixed {
@@ -109,7 +110,7 @@
109
110
  border-radius: 0;
110
111
  }
111
112
 
112
- :host > div.open > div.open-combo-data > div {
113
+ :host > div.open > div.open-combo-data > div > div {
113
114
  overflow: auto;
114
115
  max-height: 235px;
115
116
  padding: 0;
@@ -121,7 +122,7 @@
121
122
  margin-bottom: calc(var(--space-unit) * 2);
122
123
  }
123
124
 
124
- :host > div.open > div.open-combo-data > div > ul {
125
+ :host > div.open > div.open-combo-data > div > div > ul {
125
126
  max-height: 235px;
126
127
  padding: 0 3px; /* needed for checkbox focus shadow */
127
128
  margin: 0;
@@ -146,31 +147,30 @@
146
147
  color: var(--color-primary01);
147
148
  }
148
149
 
149
- :host > div.open > div.open-combo-data > div.search {
150
+ :host > div.open > div.open-combo-data > div > div.search {
150
151
  overflow: hidden;
151
152
  max-height: auto;
152
153
  margin-top: 0;
153
154
  box-shadow: 1px 1px 4px 2px rgb(217 222 227 / 50%);
154
155
  }
155
156
 
156
- :host > div.open > div.open-combo-data > div.search > ul {
157
+ :host > div.open > div.open-combo-data > div > div.search > ul {
157
158
  overflow: auto;
158
159
  max-height: 180px;
159
160
  padding: var(--space-unit) calc(var(--space-unit) * 2);
160
161
  scrollbar-color: var(--color-primary01) transparent;
161
162
  }
162
163
 
163
- :host > div.open > div.open-combo-data > div.search > div {
164
+ :host > div.open > div.open-combo-data > div > div.search > div {
164
165
  display: flex;
165
166
  justify-content: center;
166
167
  }
167
168
 
168
- :host > div.open > div.open-combo-data > div.search > div > a {
169
+ :host > div.open > div.open-combo-data > div > div.search > div > a {
169
170
  display: inline-block;
170
171
  height: 44px;
171
172
  color: var(--color-primary01);
172
173
  cursor: pointer;
173
- font-family: var(--font-family-sans);
174
174
  font-size: 14px;
175
175
  font-weight: var(--font-sb);
176
176
  line-height: 44px;
@@ -178,17 +178,17 @@
178
178
  text-transform: uppercase;
179
179
  }
180
180
 
181
- :host > div.open > div.open-combo-data > div.check-all-wrapper {
181
+ :host > div.open > div.open-combo-data > div > div.check-all-wrapper {
182
182
  padding: calc(var(--space-unit) * 2) calc(var(--space-unit) * 0.5);
183
183
  border-bottom: var(--border-size-small) solid var(--gray800);
184
184
  margin-bottom: var(--space-unit);
185
185
  text-align: left;
186
186
  }
187
187
 
188
- :host([size="small"]) > div.open > div.open-combo-data > div.check-all-wrapper {
188
+ :host([size="small"]) > div.open > div.open-combo-data > div > div.check-all-wrapper {
189
189
  padding: calc(var(--space-unit) * 1.5) calc(var(--space-unit) * 0.5);
190
190
  }
191
191
 
192
- :host([size="x-small"]) > div.open > div.open-combo-data > div.check-all-wrapper {
192
+ :host([size="x-small"]) > div.open > div.open-combo-data > div > div.check-all-wrapper {
193
193
  padding: var(--space-unit) calc(var(--space-unit) * 0.5);
194
194
  }
@@ -35,6 +35,7 @@ export class ZInput {
35
35
  this.step = undefined;
36
36
  this.pattern = undefined;
37
37
  this.size = ControlSize.BIG;
38
+ this.innerTabIndex = undefined;
38
39
  this.isTyping = false;
39
40
  this.passwordHidden = true;
40
41
  }
@@ -146,6 +147,9 @@ export class ZInput {
146
147
  pattern: this.pattern,
147
148
  };
148
149
  }
150
+ getTabIndexAttribute() {
151
+ return this.innerTabIndex ? { tabindex: this.innerTabIndex } : {};
152
+ }
149
153
  getRoleAttribute() {
150
154
  return this.role ? { role: this.role } : {};
151
155
  }
@@ -158,7 +162,7 @@ export class ZInput {
158
162
  }
159
163
  renderInputText(type = InputType.TEXT) {
160
164
  const ariaLabel = this.ariaLabel ? { "aria-label": this.ariaLabel } : {};
161
- const attr = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, this.getTextAttributes()), this.getNumberAttributes(type)), this.getPatternAttribute(type)), ariaLabel), this.getRoleAttribute()), this.getAriaAttrubutes());
165
+ const attr = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, this.getTextAttributes()), this.getNumberAttributes(type)), this.getPatternAttribute(type)), ariaLabel), this.getRoleAttribute()), this.getAriaAttrubutes()), this.getTabIndexAttribute());
162
166
  if (this.icon || type === InputType.PASSWORD) {
163
167
  Object.assign(attr.class, { "has-icon": true });
164
168
  }
@@ -209,7 +213,7 @@ export class ZInput {
209
213
  renderTextarea() {
210
214
  const attributes = this.getTextAttributes();
211
215
  const ariaLabel = this.ariaLabel ? { "aria-label": this.ariaLabel } : {};
212
- return (h("div", { class: "text-wrapper" }, this.renderLabel(), h("div", { class: Object.assign(Object.assign({}, attributes.class), { "textarea-wrapper": true, "readonly": attributes.readonly }) }, h("textarea", Object.assign({}, attributes, ariaLabel, this.getRoleAttribute()))), this.renderMessage()));
216
+ return (h("div", { class: "text-wrapper" }, this.renderLabel(), h("div", { class: Object.assign(Object.assign({}, attributes.class), { "textarea-wrapper": true, "readonly": attributes.readonly }) }, h("textarea", Object.assign({}, attributes, ariaLabel, this.getRoleAttribute(), this.getTabIndexAttribute()))), this.renderMessage()));
213
217
  }
214
218
  /* END textarea */
215
219
  handleCheck(ev) {
@@ -218,7 +222,7 @@ export class ZInput {
218
222
  }
219
223
  /* START checkbox */
220
224
  renderCheckbox() {
221
- return (h("div", { class: "checkbox-wrapper" }, h("input", Object.assign({ id: this.htmlid, type: "checkbox", name: this.name, checked: this.checked, disabled: this.disabled, readonly: this.readonly, required: this.required, onChange: this.handleCheck.bind(this), value: this.value }, this.getRoleAttribute())), h("label", { htmlFor: this.htmlid, class: {
225
+ return (h("div", { class: "checkbox-wrapper" }, h("input", Object.assign({ id: this.htmlid, type: "checkbox", name: this.name, checked: this.checked, disabled: this.disabled, readonly: this.readonly, required: this.required, onChange: this.handleCheck.bind(this), value: this.value, onFocus: () => this.ariaDescendantFocus.emit(this.htmlid) }, this.getRoleAttribute(), this.getTabIndexAttribute())), h("label", { htmlFor: this.htmlid, class: {
222
226
  "checkbox-label": true,
223
227
  "after": this.labelPosition === LabelPosition.RIGHT,
224
228
  "before": this.labelPosition === LabelPosition.LEFT,
@@ -227,7 +231,7 @@ export class ZInput {
227
231
  /* END checkbox */
228
232
  /* START radio */
229
233
  renderRadio() {
230
- return (h("div", { class: "radio-wrapper" }, h("input", Object.assign({ id: this.htmlid, type: "radio", name: this.name, checked: this.checked, disabled: this.disabled, readonly: this.readonly, onChange: this.handleCheck.bind(this), value: this.value }, this.getRoleAttribute())), h("label", { htmlFor: this.htmlid, class: {
234
+ return (h("div", { class: "radio-wrapper" }, h("input", Object.assign({ id: this.htmlid, type: "radio", name: this.name, checked: this.checked, disabled: this.disabled, readonly: this.readonly, onChange: this.handleCheck.bind(this), value: this.value, onFocus: () => this.ariaDescendantFocus.emit(this.htmlid) }, this.getRoleAttribute(), this.getTabIndexAttribute())), h("label", { htmlFor: this.htmlid, class: {
231
235
  "radio-label": true,
232
236
  "after": this.labelPosition === LabelPosition.RIGHT,
233
237
  "before": this.labelPosition === LabelPosition.LEFT,
@@ -249,7 +253,7 @@ export class ZInput {
249
253
  default:
250
254
  input = this.renderInputText(this.type);
251
255
  }
252
- return h(Host, { key: '67a39cc20219fa02de2cca264a5d51428f4359f3' }, input);
256
+ return h(Host, { key: '091e41470049a180401735588b3d584b591a9a50' }, input);
253
257
  }
254
258
  static get is() { return "z-input"; }
255
259
  static get encapsulation() { return "scoped"; }
@@ -808,6 +812,23 @@ export class ZInput {
808
812
  "attribute": "size",
809
813
  "reflect": true,
810
814
  "defaultValue": "ControlSize.BIG"
815
+ },
816
+ "innerTabIndex": {
817
+ "type": "number",
818
+ "mutable": false,
819
+ "complexType": {
820
+ "original": "number",
821
+ "resolved": "number",
822
+ "references": {}
823
+ },
824
+ "required": false,
825
+ "optional": true,
826
+ "docs": {
827
+ "tags": [],
828
+ "text": "set tabindex to input tag (optional). Defaults to native behaviour."
829
+ },
830
+ "attribute": "inner-tab-index",
831
+ "reflect": false
811
832
  }
812
833
  };
813
834
  }
@@ -878,6 +899,21 @@ export class ZInput {
878
899
  "resolved": "any",
879
900
  "references": {}
880
901
  }
902
+ }, {
903
+ "method": "ariaDescendantFocus",
904
+ "name": "ariaDescendantFocus",
905
+ "bubbles": true,
906
+ "cancelable": true,
907
+ "composed": true,
908
+ "docs": {
909
+ "tags": [],
910
+ "text": "set parent aria-activedescendant on focus event, returns filterid"
911
+ },
912
+ "complexType": {
913
+ "original": "string",
914
+ "resolved": "string",
915
+ "references": {}
916
+ }
881
917
  }];
882
918
  }
883
919
  static get methods() {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/inputs/z-input/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAgB,OAAO,EAAE,MAAM,EAAC,MAAM,eAAe,CAAC;AACtG,OAAO,EAAC,IAAI,EAAU,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAC,SAAS,EAAE,aAAa,EAAe,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAClF,OAAO,EAAC,OAAO,EAAE,QAAQ,EAAC,MAAM,sBAAsB,CAAC;AAQvD,MAAM,OAAO,MAAM;;QAmIT,kBAAa,GAAG,GAAG,CAAC;sBA9HnB,MAAM,QAAQ,EAAE,EAAE;;;;yBAgBf,EAAE;;;;;;wBAwBO,KAAK;wBAIL,KAAK;wBAIL,KAAK;uBAIN,KAAK;;;;uBAgBI,IAAI;6BAID,aAAa,CAAC,KAAK;;;4BAY1B,IAAI;;;;;;;;oBAgCR,WAAW,CAAC,GAAG;wBAGzB,KAAK;8BAGC,IAAI;;IASrB,kBAAkB,CAAC,CAAc;QAC/B,MAAM,I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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {Component, Prop, State, h, Method, Event, EventEmitter, Element, Listen} from \"@stencil/core\";\nimport {Host, JSXBase} from \"@stencil/core/internal\";\nimport {InputType, LabelPosition, InputStatus, ControlSize} from \"../../../beans\";\nimport {boolean, randomId} from \"../../../utils/utils\";\n\n@Component({\n tag: \"z-input\",\n styleUrl: \"styles.css\",\n shadow: false,\n scoped: true,\n})\nexport class ZInput {\n @Element() hostElement: HTMLZInputElement;\n\n /** the id of the input element */\n @Prop()\n htmlid = `id-${randomId()}`;\n\n /** input types */\n @Prop()\n type: InputType;\n\n /** the input name */\n @Prop()\n name?: string;\n\n /** the input label */\n @Prop()\n label?: string;\n\n /** the input aria-label */\n @Prop()\n ariaLabel = \"\";\n\n /** the input aria-expaded (optional): available for text, password, number, email */\n @Prop()\n ariaExpanded?: string;\n\n /** the input aria-controls (optional): available for text, password, number, email */\n @Prop()\n ariaControls?: string;\n\n /** the input aria-autocomplete (optional): available for text, password, number, email */\n @Prop()\n ariaAutocomplete?: string;\n\n /** the input aria-activedescendant (optional): available for text, password, number, email */\n @Prop()\n ariaActivedescendant?: string;\n\n /** the input value */\n @Prop({mutable: true})\n value?: string;\n\n /** the input is disabled */\n @Prop({reflect: true})\n disabled?: boolean = false;\n\n /** the input is readonly */\n @Prop()\n readonly?: boolean = false;\n\n /** the input is required (optional): available for text, password, number, email, textarea, checkbox */\n @Prop()\n required?: boolean = false;\n\n /** checked: available for checkbox, radio */\n @Prop({mutable: true})\n checked?: boolean = false;\n\n /** the input placeholder (optional) */\n @Prop()\n placeholder?: string;\n\n /** the input html title (optional) */\n @Prop()\n htmltitle?: string;\n\n /** the input status (optional): available for text, password, number, email, textarea */\n @Prop()\n status?: InputStatus;\n\n /** input helper message (optional): available for text, password, number, email, textarea - if set to `false` message won't be displayed */\n @Prop()\n message?: string | boolean = true;\n\n /** the input label position: available for checkbox, radio */\n @Prop()\n labelPosition?: LabelPosition = LabelPosition.RIGHT;\n\n /** the input has autocomplete option (optional): available for text, password, number, email */\n @Prop()\n autocomplete?: string;\n\n /** the input role (optional) */\n @Prop()\n role?: string;\n\n /** render clear icon when typing (optional): available for text */\n @Prop()\n hasclearicon?: boolean = true;\n\n /** render icon (optional): available for text */\n @Prop()\n icon?: string;\n\n /** min number value (optional): available for number */\n @Prop()\n min?: number;\n\n /** Min length value (optional): available for text */\n @Prop()\n minlength?: number;\n\n /** max number value (optional): available for number */\n @Prop()\n max?: number;\n\n /** Max length value (optional): available for text */\n @Prop()\n maxlength?: number;\n\n /** step number value (optional): available for number */\n @Prop()\n step?: number;\n\n /** pattern value (optional): available for tel, text, search, url, email, password*/\n @Prop()\n pattern?: string;\n\n /** Available sizes: `big`, `small` and `x-small`. Defaults to `big`. */\n @Prop({reflect: true})\n size?: ControlSize = ControlSize.BIG;\n\n @State()\n isTyping = false;\n\n @State()\n passwordHidden = true;\n\n private timer;\n\n private typingtimeout = 300;\n\n private inputRef: HTMLInputElement;\n\n @Listen(\"inputCheck\", {target: \"document\"})\n inputCheckListener(e: CustomEvent): void {\n const data = e.detail;\n switch (this.type) {\n case InputType.RADIO:\n if (data.type === InputType.RADIO && data.name === this.name && data.id !== this.htmlid) {\n this.checked = false;\n }\n break;\n }\n }\n\n /** get checked status */\n @Method()\n async isChecked(): Promise<boolean> {\n switch (this.type) {\n case InputType.CHECKBOX:\n case InputType.RADIO:\n return this.checked;\n default:\n console.warn(\"`isChecked` method is only available for type `checkbox` and `radio`\");\n\n return false;\n }\n }\n\n /** Emitted on input value change, returns value, validity */\n @Event()\n inputChange: EventEmitter;\n\n private emitInputChange(value: string): void {\n if (!this.isTyping) {\n this.emitStartTyping();\n }\n\n let validity: ValidityState;\n if (this.type === InputType.TEXTAREA) {\n validity = this.getValidity(\"textarea\");\n } else {\n validity = this.getValidity(\"input\");\n }\n this.value = value;\n this.inputChange.emit({value, validity});\n\n clearTimeout(this.timer);\n this.timer = setTimeout(() => {\n this.emitStopTyping(this.value, validity);\n }, this.typingtimeout);\n }\n\n /** Emitted when user starts typing */\n @Event()\n startTyping: EventEmitter;\n\n private emitStartTyping(): void {\n this.isTyping = true;\n this.startTyping.emit();\n }\n\n /** Emitted when user stops typing, returns value, validity */\n @Event()\n stopTyping: EventEmitter;\n\n private emitStopTyping(value: string, validity: ValidityState): void {\n this.isTyping = false;\n this.stopTyping.emit({\n value: value,\n validity: validity,\n });\n }\n\n /** Emitted on checkbox check/uncheck, returns id, checked, type, name, value, validity */\n @Event()\n inputCheck: EventEmitter;\n\n private emitInputCheck(checked: boolean): void {\n this.inputCheck.emit({\n id: this.htmlid,\n checked: checked,\n type: this.type,\n name: this.name,\n value: this.value,\n validity: this.getValidity(\"input\"),\n });\n }\n\n private getValidity(type: string): ValidityState {\n const input = this.hostElement.querySelector(type) as HTMLInputElement;\n\n return input.validity;\n }\n\n /* START text/password/email/number */\n\n private getTextAttributes(): JSXBase.InputHTMLAttributes<HTMLInputElement | HTMLTextAreaElement> {\n return {\n id: this.htmlid,\n name: this.name,\n placeholder: this.placeholder,\n value: this.value,\n disabled: this.disabled,\n readonly: this.readonly,\n required: this.required,\n title: this.htmltitle,\n minlength: this.minlength,\n maxlength: this.maxlength,\n class: {\n [`input-${this.status}`]: !!this.status,\n filled: !!this.value,\n },\n autocomplete: this.autocomplete,\n onInput: (e: InputEvent) => this.emitInputChange((e.target as HTMLInputElement).value),\n };\n }\n\n private getNumberAttributes(type: InputType): JSXBase.InputHTMLAttributes<HTMLInputElement> {\n if (type != InputType.NUMBER) {\n return;\n }\n\n return {\n min: this.min,\n max: this.max,\n step: this.step,\n };\n }\n\n private getPatternAttribute(type: InputType): JSXBase.InputHTMLAttributes<HTMLInputElement> {\n if (\n type != InputType.PASSWORD &&\n type != InputType.TEXT &&\n type != InputType.TEL &&\n type != InputType.SEARCH &&\n type != InputType.URL &&\n type != InputType.EMAIL\n ) {\n return;\n }\n\n return {\n pattern: this.pattern,\n };\n }\n\n private getRoleAttribute(): JSXBase.InputHTMLAttributes<HTMLInputElement | HTMLTextAreaElement> {\n return this.role ? {role: this.role} : {};\n }\n\n private getAriaAttrubutes(): Record<string, unknown> {\n const expanded = this.ariaExpanded ? {\"aria-expanded\": this.ariaExpanded} : {};\n const controls = this.ariaControls ? {\"aria-controls\": this.ariaControls} : {};\n const autocomplete = this.ariaAutocomplete ? {\"aria-autocomplete\": this.ariaAutocomplete} : {};\n const activedescendant = this.ariaActivedescendant ? {\"aria-activedescendant\": this.ariaActivedescendant} : {};\n\n return {\n ...expanded,\n ...controls,\n ...autocomplete,\n ...activedescendant,\n };\n }\n\n private renderInputText(type: InputType = InputType.TEXT): HTMLDivElement {\n const ariaLabel = this.ariaLabel ? {\"aria-label\": this.ariaLabel} : {};\n const attr = {\n ...this.getTextAttributes(),\n ...this.getNumberAttributes(type),\n ...this.getPatternAttribute(type),\n ...ariaLabel,\n ...this.getRoleAttribute(),\n ...this.getAriaAttrubutes(),\n };\n if (this.icon || type === InputType.PASSWORD) {\n Object.assign(attr.class, {\"has-icon\": true});\n }\n if (this.hasclearicon && type != InputType.NUMBER) {\n Object.assign(attr.class, {\"has-clear-icon\": true});\n }\n\n return (\n <div class=\"text-wrapper\">\n {this.renderLabel()}\n <div>\n <input\n type={type === InputType.PASSWORD && !this.passwordHidden ? InputType.TEXT : type}\n {...attr}\n ref={(el) => (this.inputRef = el)}\n />\n {this.renderIcons()}\n </div>\n {this.renderMessage()}\n </div>\n );\n }\n\n private renderLabel(): HTMLLabelElement {\n if (!this.label) {\n return;\n }\n\n return (\n <label\n class=\"input-label body-5-sb\"\n id={`${this.htmlid}_label`}\n htmlFor={this.htmlid}\n >\n {this.label}\n </label>\n );\n }\n\n private renderIcons(): HTMLSpanElement {\n return (\n <span class=\"icons-wrapper\">\n {this.renderResetIcon()}\n {this.renderIcon()}\n </span>\n );\n }\n\n private renderIcon(): HTMLButtonElement {\n if (this.type === InputType.PASSWORD) {\n return this.renderShowHidePassword();\n }\n\n if (!this.icon) {\n return;\n }\n\n return (\n <button\n type=\"button\"\n class=\"icon-button input-icon\"\n tabIndex={-1}\n aria-hidden=\"true\"\n >\n <z-icon\n name={this.icon}\n class={this.size}\n />\n </button>\n );\n }\n\n private renderResetIcon(): HTMLButtonElement {\n let hidden = false;\n if (!this.hasclearicon || !this.value || this.disabled || this.readonly || this.type == InputType.NUMBER) {\n hidden = true;\n }\n\n return (\n <button\n type=\"button\"\n class={`icon-button reset-icon ${hidden ? \"hidden\" : \"\"}`}\n aria-label=\"cancella il contenuto dell'input\"\n onClick={() => {\n this.inputRef.value = \"\";\n this.emitInputChange(\"\");\n }}\n >\n <z-icon\n name=\"multiply\"\n class={this.size}\n />\n </button>\n );\n }\n\n private renderShowHidePassword(): HTMLButtonElement {\n return (\n <button\n type=\"button\"\n class=\"icon-button toggle-password-icon\"\n disabled={this.disabled}\n aria-label={this.passwordHidden ? \"mostra password\" : \"nascondi password\"}\n onClick={() => (this.passwordHidden = !this.passwordHidden)}\n >\n <z-icon\n name={this.passwordHidden ? \"view-filled\" : \"view-off-filled\"}\n class={this.size}\n />\n </button>\n );\n }\n\n private renderMessage(): HTMLZInputMessageElement {\n if (boolean(this.message) === false) {\n return;\n }\n\n return (\n <z-input-message\n message={boolean(this.message) === true ? undefined : (this.message as string)}\n status={this.status}\n class={this.size}\n />\n );\n }\n\n /* END text/password/email/number */\n\n /* START textarea */\n\n private renderTextarea(): HTMLDivElement {\n const attributes = this.getTextAttributes();\n const ariaLabel = this.ariaLabel ? {\"aria-label\": this.ariaLabel} : {};\n\n return (\n <div class=\"text-wrapper\">\n {this.renderLabel()}\n <div\n class={{\n ...(attributes.class as Record<string, boolean>),\n \"textarea-wrapper\": true,\n \"readonly\": attributes.readonly as boolean,\n }}\n >\n <textarea\n {...attributes}\n {...ariaLabel}\n {...this.getRoleAttribute()}\n ></textarea>\n </div>\n {this.renderMessage()}\n </div>\n );\n }\n\n /* END textarea */\n\n private handleCheck(ev: Event): void {\n this.checked = (ev.target as HTMLInputElement).checked;\n this.emitInputCheck(this.checked);\n }\n\n /* START checkbox */\n private renderCheckbox(): HTMLDivElement {\n return (\n <div class=\"checkbox-wrapper\">\n <input\n id={this.htmlid}\n type=\"checkbox\"\n name={this.name}\n checked={this.checked}\n disabled={this.disabled}\n readonly={this.readonly}\n required={this.required}\n onChange={this.handleCheck.bind(this)}\n value={this.value}\n {...this.getRoleAttribute()}\n />\n\n <label\n htmlFor={this.htmlid}\n class={{\n \"checkbox-label\": true,\n \"after\": this.labelPosition === LabelPosition.RIGHT,\n \"before\": this.labelPosition === LabelPosition.LEFT,\n }}\n >\n <z-icon\n name={this.checked ? \"checkbox-checked\" : \"checkbox\"}\n aria-hidden=\"true\"\n class={this.size}\n />\n {this.label && <span innerHTML={this.label}></span>}\n </label>\n </div>\n );\n }\n\n /* END checkbox */\n\n /* START radio */\n private renderRadio(): HTMLDivElement {\n return (\n <div class=\"radio-wrapper\">\n <input\n id={this.htmlid}\n type=\"radio\"\n name={this.name}\n checked={this.checked}\n disabled={this.disabled}\n readonly={this.readonly}\n onChange={this.handleCheck.bind(this)}\n value={this.value}\n {...this.getRoleAttribute()}\n />\n\n <label\n htmlFor={this.htmlid}\n class={{\n \"radio-label\": true,\n \"after\": this.labelPosition === LabelPosition.RIGHT,\n \"before\": this.labelPosition === LabelPosition.LEFT,\n }}\n >\n <z-icon\n name={this.checked ? \"radio-button-checked\" : \"radio-button\"}\n aria-hidden=\"true\"\n class={this.size}\n />\n {this.label && <span innerHTML={this.label} />}\n </label>\n </div>\n );\n }\n /* END radio */\n\n render(): HTMLInputElement | HTMLDivElement {\n let input;\n switch (this.type) {\n case InputType.TEXTAREA:\n input = this.renderTextarea();\n break;\n case InputType.CHECKBOX:\n input = this.renderCheckbox();\n break;\n case InputType.RADIO:\n input = this.renderRadio();\n break;\n default:\n input = this.renderInputText(this.type);\n }\n\n return <Host>{input}</Host>;\n }\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/inputs/z-input/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAgB,OAAO,EAAE,MAAM,EAAC,MAAM,eAAe,CAAC;AACtG,OAAO,EAAC,IAAI,EAAU,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAC,SAAS,EAAE,aAAa,EAAe,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAClF,OAAO,EAAC,OAAO,EAAE,QAAQ,EAAC,MAAM,sBAAsB,CAAC;AAQvD,MAAM,OAAO,MAAM;;QAuIT,kBAAa,GAAG,GAAG,CAAC;sBAlInB,MAAM,QAAQ,EAAE,EAAE;;;;yBAgBf,EAAE;;;;;;wBAwBO,KAAK;wBAIL,KAAK;wBAIL,KAAK;uBAIN,KAAK;;;;uBAgBI,IAAI;6BAID,aAAa,CAAC,KAAK;;;4BAY1B,IAAI;;;;;;;;oBAgCR,WAAW,CAAC,GAAG;;wBAOzB,KAAK;8BAGC,IAAI;;IASrB,kBAAkB,CAAC,CAAc;QAC/B,MAAM,IAAI,GAAG,CAAC,CAAC,MAA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AM;YACR,KAAK,SAAS,CAAC,KAAK;gBAClB,KAAK,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;gBAC3B,MAAM;YACR;gBACE,KAAK,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5C,CAAC;QAED,OAAO,EAAC,IAAI,uDAAE,KAAK,CAAQ,CAAC;IAC9B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {Component, Prop, State, h, Method, Event, EventEmitter, Element, Listen} from \"@stencil/core\";\nimport {Host, JSXBase} from \"@stencil/core/internal\";\nimport {InputType, LabelPosition, InputStatus, ControlSize} from \"../../../beans\";\nimport {boolean, randomId} from \"../../../utils/utils\";\n\n@Component({\n tag: \"z-input\",\n styleUrl: \"styles.css\",\n shadow: false,\n scoped: true,\n})\nexport class ZInput {\n @Element() hostElement: HTMLZInputElement;\n\n /** the id of the input element */\n @Prop()\n htmlid = `id-${randomId()}`;\n\n /** input types */\n @Prop()\n type: InputType;\n\n /** the input name */\n @Prop()\n name?: string;\n\n /** the input label */\n @Prop()\n label?: string;\n\n /** the input aria-label */\n @Prop()\n ariaLabel = \"\";\n\n /** the input aria-expaded (optional): available for text, password, number, email */\n @Prop()\n ariaExpanded?: string;\n\n /** the input aria-controls (optional): available for text, password, number, email */\n @Prop()\n ariaControls?: string;\n\n /** the input aria-autocomplete (optional): available for text, password, number, email */\n @Prop()\n ariaAutocomplete?: string;\n\n /** the input aria-activedescendant (optional): available for text, password, number, email */\n @Prop()\n ariaActivedescendant?: string;\n\n /** the input value */\n @Prop({mutable: true})\n value?: string;\n\n /** the input is disabled */\n @Prop({reflect: true})\n disabled?: boolean = false;\n\n /** the input is readonly */\n @Prop()\n readonly?: boolean = false;\n\n /** the input is required (optional): available for text, password, number, email, textarea, checkbox */\n @Prop()\n required?: boolean = false;\n\n /** checked: available for checkbox, radio */\n @Prop({mutable: true})\n checked?: boolean = false;\n\n /** the input placeholder (optional) */\n @Prop()\n placeholder?: string;\n\n /** the input html title (optional) */\n @Prop()\n htmltitle?: string;\n\n /** the input status (optional): available for text, password, number, email, textarea */\n @Prop()\n status?: InputStatus;\n\n /** input helper message (optional): available for text, password, number, email, textarea - if set to `false` message won't be displayed */\n @Prop()\n message?: string | boolean = true;\n\n /** the input label position: available for checkbox, radio */\n @Prop()\n labelPosition?: LabelPosition = LabelPosition.RIGHT;\n\n /** the input has autocomplete option (optional): available for text, password, number, email */\n @Prop()\n autocomplete?: string;\n\n /** the input role (optional) */\n @Prop()\n role?: string;\n\n /** render clear icon when typing (optional): available for text */\n @Prop()\n hasclearicon?: boolean = true;\n\n /** render icon (optional): available for text */\n @Prop()\n icon?: string;\n\n /** min number value (optional): available for number */\n @Prop()\n min?: number;\n\n /** Min length value (optional): available for text */\n @Prop()\n minlength?: number;\n\n /** max number value (optional): available for number */\n @Prop()\n max?: number;\n\n /** Max length value (optional): available for text */\n @Prop()\n maxlength?: number;\n\n /** step number value (optional): available for number */\n @Prop()\n step?: number;\n\n /** pattern value (optional): available for tel, text, search, url, email, password*/\n @Prop()\n pattern?: string;\n\n /** Available sizes: `big`, `small` and `x-small`. Defaults to `big`. */\n @Prop({reflect: true})\n size?: ControlSize = ControlSize.BIG;\n\n /** set tabindex to input tag (optional). Defaults to native behaviour. */\n @Prop()\n innerTabIndex?: number;\n\n @State()\n isTyping = false;\n\n @State()\n passwordHidden = true;\n\n private timer;\n\n private typingtimeout = 300;\n\n private inputRef: HTMLInputElement;\n\n @Listen(\"inputCheck\", {target: \"document\"})\n inputCheckListener(e: CustomEvent): void {\n const data = e.detail;\n switch (this.type) {\n case InputType.RADIO:\n if (data.type === InputType.RADIO && data.name === this.name && data.id !== this.htmlid) {\n this.checked = false;\n }\n break;\n }\n }\n\n /** get checked status */\n @Method()\n async isChecked(): Promise<boolean> {\n switch (this.type) {\n case InputType.CHECKBOX:\n case InputType.RADIO:\n return this.checked;\n default:\n console.warn(\"`isChecked` method is only available for type `checkbox` and `radio`\");\n\n return false;\n }\n }\n\n /** Emitted on input value change, returns value, validity */\n @Event()\n inputChange: EventEmitter;\n\n private emitInputChange(value: string): void {\n if (!this.isTyping) {\n this.emitStartTyping();\n }\n\n let validity: ValidityState;\n if (this.type === InputType.TEXTAREA) {\n validity = this.getValidity(\"textarea\");\n } else {\n validity = this.getValidity(\"input\");\n }\n this.value = value;\n this.inputChange.emit({value, validity});\n\n clearTimeout(this.timer);\n this.timer = setTimeout(() => {\n this.emitStopTyping(this.value, validity);\n }, this.typingtimeout);\n }\n\n /** Emitted when user starts typing */\n @Event()\n startTyping: EventEmitter;\n\n private emitStartTyping(): void {\n this.isTyping = true;\n this.startTyping.emit();\n }\n\n /** Emitted when user stops typing, returns value, validity */\n @Event()\n stopTyping: EventEmitter;\n\n private emitStopTyping(value: string, validity: ValidityState): void {\n this.isTyping = false;\n this.stopTyping.emit({\n value: value,\n validity: validity,\n });\n }\n\n /** Emitted on checkbox check/uncheck, returns id, checked, type, name, value, validity */\n @Event()\n inputCheck: EventEmitter;\n\n private emitInputCheck(checked: boolean): void {\n this.inputCheck.emit({\n id: this.htmlid,\n checked: checked,\n type: this.type,\n name: this.name,\n value: this.value,\n validity: this.getValidity(\"input\"),\n });\n }\n\n /** set parent aria-activedescendant on focus event, returns filterid */\n @Event({\n eventName: \"ariaDescendantFocus\",\n composed: true,\n cancelable: true,\n bubbles: true,\n })\n ariaDescendantFocus: EventEmitter<string>;\n\n private getValidity(type: string): ValidityState {\n const input = this.hostElement.querySelector(type) as HTMLInputElement;\n\n return input.validity;\n }\n\n /* START text/password/email/number */\n\n private getTextAttributes(): JSXBase.InputHTMLAttributes<HTMLInputElement | HTMLTextAreaElement> {\n return {\n id: this.htmlid,\n name: this.name,\n placeholder: this.placeholder,\n value: this.value,\n disabled: this.disabled,\n readonly: this.readonly,\n required: this.required,\n title: this.htmltitle,\n minlength: this.minlength,\n maxlength: this.maxlength,\n class: {\n [`input-${this.status}`]: !!this.status,\n filled: !!this.value,\n },\n autocomplete: this.autocomplete,\n onInput: (e: InputEvent) => this.emitInputChange((e.target as HTMLInputElement).value),\n };\n }\n\n private getNumberAttributes(type: InputType): JSXBase.InputHTMLAttributes<HTMLInputElement> {\n if (type != InputType.NUMBER) {\n return;\n }\n\n return {\n min: this.min,\n max: this.max,\n step: this.step,\n };\n }\n\n private getPatternAttribute(type: InputType): JSXBase.InputHTMLAttributes<HTMLInputElement> {\n if (\n type != InputType.PASSWORD &&\n type != InputType.TEXT &&\n type != InputType.TEL &&\n type != InputType.SEARCH &&\n type != InputType.URL &&\n type != InputType.EMAIL\n ) {\n return;\n }\n\n return {\n pattern: this.pattern,\n };\n }\n\n private getTabIndexAttribute(): JSXBase.InputHTMLAttributes<HTMLInputElement | HTMLTextAreaElement> {\n return this.innerTabIndex ? {tabindex: this.innerTabIndex} : {};\n }\n\n private getRoleAttribute(): JSXBase.InputHTMLAttributes<HTMLInputElement | HTMLTextAreaElement> {\n return this.role ? {role: this.role} : {};\n }\n\n private getAriaAttrubutes(): Record<string, unknown> {\n const expanded = this.ariaExpanded ? {\"aria-expanded\": this.ariaExpanded} : {};\n const controls = this.ariaControls ? {\"aria-controls\": this.ariaControls} : {};\n const autocomplete = this.ariaAutocomplete ? {\"aria-autocomplete\": this.ariaAutocomplete} : {};\n const activedescendant = this.ariaActivedescendant ? {\"aria-activedescendant\": this.ariaActivedescendant} : {};\n\n return {\n ...expanded,\n ...controls,\n ...autocomplete,\n ...activedescendant,\n };\n }\n\n private renderInputText(type: InputType = InputType.TEXT): HTMLDivElement {\n const ariaLabel = this.ariaLabel ? {\"aria-label\": this.ariaLabel} : {};\n const attr = {\n ...this.getTextAttributes(),\n ...this.getNumberAttributes(type),\n ...this.getPatternAttribute(type),\n ...ariaLabel,\n ...this.getRoleAttribute(),\n ...this.getAriaAttrubutes(),\n ...this.getTabIndexAttribute(),\n };\n if (this.icon || type === InputType.PASSWORD) {\n Object.assign(attr.class, {\"has-icon\": true});\n }\n if (this.hasclearicon && type != InputType.NUMBER) {\n Object.assign(attr.class, {\"has-clear-icon\": true});\n }\n\n return (\n <div class=\"text-wrapper\">\n {this.renderLabel()}\n <div>\n <input\n type={type === InputType.PASSWORD && !this.passwordHidden ? InputType.TEXT : type}\n {...attr}\n ref={(el) => (this.inputRef = el)}\n />\n {this.renderIcons()}\n </div>\n {this.renderMessage()}\n </div>\n );\n }\n\n private renderLabel(): HTMLLabelElement {\n if (!this.label) {\n return;\n }\n\n return (\n <label\n class=\"input-label body-5-sb\"\n id={`${this.htmlid}_label`}\n htmlFor={this.htmlid}\n >\n {this.label}\n </label>\n );\n }\n\n private renderIcons(): HTMLSpanElement {\n return (\n <span class=\"icons-wrapper\">\n {this.renderResetIcon()}\n {this.renderIcon()}\n </span>\n );\n }\n\n private renderIcon(): HTMLButtonElement {\n if (this.type === InputType.PASSWORD) {\n return this.renderShowHidePassword();\n }\n\n if (!this.icon) {\n return;\n }\n\n return (\n <button\n type=\"button\"\n class=\"icon-button input-icon\"\n tabIndex={-1}\n aria-hidden=\"true\"\n >\n <z-icon\n name={this.icon}\n class={this.size}\n />\n </button>\n );\n }\n\n private renderResetIcon(): HTMLButtonElement {\n let hidden = false;\n if (!this.hasclearicon || !this.value || this.disabled || this.readonly || this.type == InputType.NUMBER) {\n hidden = true;\n }\n\n return (\n <button\n type=\"button\"\n class={`icon-button reset-icon ${hidden ? \"hidden\" : \"\"}`}\n aria-label=\"cancella il contenuto dell'input\"\n onClick={() => {\n this.inputRef.value = \"\";\n this.emitInputChange(\"\");\n }}\n >\n <z-icon\n name=\"multiply\"\n class={this.size}\n />\n </button>\n );\n }\n\n private renderShowHidePassword(): HTMLButtonElement {\n return (\n <button\n type=\"button\"\n class=\"icon-button toggle-password-icon\"\n disabled={this.disabled}\n aria-label={this.passwordHidden ? \"mostra password\" : \"nascondi password\"}\n onClick={() => (this.passwordHidden = !this.passwordHidden)}\n >\n <z-icon\n name={this.passwordHidden ? \"view-filled\" : \"view-off-filled\"}\n class={this.size}\n />\n </button>\n );\n }\n\n private renderMessage(): HTMLZInputMessageElement {\n if (boolean(this.message) === false) {\n return;\n }\n\n return (\n <z-input-message\n message={boolean(this.message) === true ? undefined : (this.message as string)}\n status={this.status}\n class={this.size}\n />\n );\n }\n\n /* END text/password/email/number */\n\n /* START textarea */\n\n private renderTextarea(): HTMLDivElement {\n const attributes = this.getTextAttributes();\n const ariaLabel = this.ariaLabel ? {\"aria-label\": this.ariaLabel} : {};\n\n return (\n <div class=\"text-wrapper\">\n {this.renderLabel()}\n <div\n class={{\n ...(attributes.class as Record<string, boolean>),\n \"textarea-wrapper\": true,\n \"readonly\": attributes.readonly as boolean,\n }}\n >\n <textarea\n {...attributes}\n {...ariaLabel}\n {...this.getRoleAttribute()}\n {...this.getTabIndexAttribute()}\n ></textarea>\n </div>\n {this.renderMessage()}\n </div>\n );\n }\n\n /* END textarea */\n\n private handleCheck(ev: Event): void {\n this.checked = (ev.target as HTMLInputElement).checked;\n this.emitInputCheck(this.checked);\n }\n\n /* START checkbox */\n private renderCheckbox(): HTMLDivElement {\n return (\n <div class=\"checkbox-wrapper\">\n <input\n id={this.htmlid}\n type=\"checkbox\"\n name={this.name}\n checked={this.checked}\n disabled={this.disabled}\n readonly={this.readonly}\n required={this.required}\n onChange={this.handleCheck.bind(this)}\n value={this.value}\n onFocus={() => this.ariaDescendantFocus.emit(this.htmlid)}\n {...this.getRoleAttribute()}\n {...this.getTabIndexAttribute()}\n />\n\n <label\n htmlFor={this.htmlid}\n class={{\n \"checkbox-label\": true,\n \"after\": this.labelPosition === LabelPosition.RIGHT,\n \"before\": this.labelPosition === LabelPosition.LEFT,\n }}\n >\n <z-icon\n name={this.checked ? \"checkbox-checked\" : \"checkbox\"}\n aria-hidden=\"true\"\n class={this.size}\n />\n {this.label && <span innerHTML={this.label}></span>}\n </label>\n </div>\n );\n }\n\n /* END checkbox */\n\n /* START radio */\n private renderRadio(): HTMLDivElement {\n return (\n <div class=\"radio-wrapper\">\n <input\n id={this.htmlid}\n type=\"radio\"\n name={this.name}\n checked={this.checked}\n disabled={this.disabled}\n readonly={this.readonly}\n onChange={this.handleCheck.bind(this)}\n value={this.value}\n onFocus={() => this.ariaDescendantFocus.emit(this.htmlid)}\n {...this.getRoleAttribute()}\n {...this.getTabIndexAttribute()}\n />\n\n <label\n htmlFor={this.htmlid}\n class={{\n \"radio-label\": true,\n \"after\": this.labelPosition === LabelPosition.RIGHT,\n \"before\": this.labelPosition === LabelPosition.LEFT,\n }}\n >\n <z-icon\n name={this.checked ? \"radio-button-checked\" : \"radio-button\"}\n aria-hidden=\"true\"\n class={this.size}\n />\n {this.label && <span innerHTML={this.label} />}\n </label>\n </div>\n );\n }\n /* END radio */\n\n render(): HTMLInputElement | HTMLDivElement {\n let input;\n switch (this.type) {\n case InputType.TEXTAREA:\n input = this.renderTextarea();\n break;\n case InputType.CHECKBOX:\n input = this.renderCheckbox();\n break;\n case InputType.RADIO:\n input = this.renderRadio();\n break;\n default:\n input = this.renderInputText(this.type);\n }\n\n return <Host>{input}</Host>;\n }\n}\n"]}
@@ -35,6 +35,7 @@ export class ZListElement {
35
35
  this.listElementPosition = "0";
36
36
  this.listType = ListType.NONE;
37
37
  this.role = "listitem";
38
+ this.htmlTabindex = 0;
38
39
  this.showInnerContent = false;
39
40
  this.handleClick = this.handleClick.bind(this);
40
41
  this.handleKeyDown = this.handleKeyDown.bind(this);
@@ -114,7 +115,7 @@ export class ZListElement {
114
115
  }
115
116
  }
116
117
  render() {
117
- return (h(Host, { key: 'b0dc00b8abad630739f30361dcb1abad5fa379e0', "aria-expanded": this.expandable ? this.showInnerContent : null, onClick: this.handleClick, onFocus: () => this.ariaDescendantFocus.emit(this.listElementId), onKeyDown: this.handleKeyDown, clickable: this.clickable && !this.disabled, tabIndex: "0" }, h("div", { key: '81f742ce528b757fb67feefc231ce78e7e76ba87', class: "container", style: { color: `var(--${this.color})` }, tabindex: "-1", id: `z-list-element-id-${this.listElementId}`, part: "list-item-container" }, h("div", { key: 'c2230431473ea5e8292b26c280c71a86d795a1de', class: "z-list-element-container" }, this.renderExpandableButton(), this.renderContent()), this.renderExpandedContent()), this.dividerType === ListDividerType.ELEMENT && (h("z-divider", { color: this.dividerColor, size: this.dividerSize }))));
118
+ return (h(Host, { key: 'fb33c5abf92ac7e89faea59b46358c847fd7efab', "aria-expanded": this.expandable ? this.showInnerContent : null, onClick: this.handleClick, onFocus: () => this.ariaDescendantFocus.emit(this.listElementId), onKeyDown: this.handleKeyDown, clickable: this.clickable && !this.disabled, tabIndex: this.htmlTabindex }, h("div", { key: '0bd49dca96fcb7ddfb8201ea0f3b6501b633bbbb', class: "container", style: { color: `var(--${this.color})` }, tabindex: "-1", id: `z-list-element-id-${this.listElementId}`, part: "list-item-container" }, h("div", { key: '5a548758092f2062823021a2c0ddd097f0296646', class: "z-list-element-container" }, this.renderExpandableButton(), this.renderContent()), this.renderExpandedContent()), this.dividerType === ListDividerType.ELEMENT && (h("z-divider", { color: this.dividerColor, size: this.dividerSize }))));
118
119
  }
119
120
  static get is() { return "z-list-element"; }
120
121
  static get encapsulation() { return "shadow"; }
@@ -416,6 +417,24 @@ export class ZListElement {
416
417
  "attribute": "role",
417
418
  "reflect": true,
418
419
  "defaultValue": "\"listitem\""
420
+ },
421
+ "htmlTabindex": {
422
+ "type": "number",
423
+ "mutable": false,
424
+ "complexType": {
425
+ "original": "number | null",
426
+ "resolved": "number",
427
+ "references": {}
428
+ },
429
+ "required": false,
430
+ "optional": true,
431
+ "docs": {
432
+ "tags": [],
433
+ "text": "set tabindex to Host tag (optional). Defaults to 0."
434
+ },
435
+ "attribute": "html-tabindex",
436
+ "reflect": false,
437
+ "defaultValue": "0"
419
438
  }
420
439
  };
421
440
  }