@dso-toolkit/core 41.0.0 → 43.0.0

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 (107) hide show
  1. package/dist/cjs/dso-alert.cjs.entry.js +1 -1
  2. package/dist/cjs/dso-autosuggest.cjs.entry.js +17 -8
  3. package/dist/cjs/dso-badge.cjs.entry.js +1 -1
  4. package/dist/cjs/dso-banner.cjs.entry.js +1 -1
  5. package/dist/cjs/dso-header.cjs.entry.js +31 -21
  6. package/dist/cjs/dso-helpcenter-panel.cjs.entry.js +1 -1
  7. package/dist/cjs/dso-icon.cjs.entry.js +15 -24
  8. package/dist/cjs/dso-image-overlay.cjs.entry.js +1 -1
  9. package/dist/cjs/dso-label.cjs.entry.js +78 -3
  10. package/dist/cjs/dso-map-controls.cjs.entry.js +1 -1
  11. package/dist/cjs/dso-ozon-content.cjs.entry.js +32 -3
  12. package/dist/cjs/dso-pagination.cjs.entry.js +5 -2
  13. package/dist/cjs/dso-toolkit.cjs.js +1 -1
  14. package/dist/cjs/dso-tooltip.cjs.entry.js +7 -0
  15. package/dist/cjs/dso-tree-view.cjs.entry.js +24 -2
  16. package/dist/cjs/dso-viewer-grid.cjs.entry.js +1 -1
  17. package/dist/cjs/loader.cjs.js +1 -1
  18. package/dist/collection/collection-manifest.json +1 -1
  19. package/dist/collection/components/alert/alert.css +4 -4
  20. package/dist/collection/components/autosuggest/autosuggest.js +37 -9
  21. package/dist/collection/components/autosuggest/autosuggest.template.js +2 -1
  22. package/dist/collection/components/badge/badge.css +4 -1
  23. package/dist/collection/components/banner/banner.css +2 -2
  24. package/dist/collection/components/header/header.css +146 -0
  25. package/dist/collection/components/header/header.interfaces.js +1 -0
  26. package/dist/collection/components/header/header.js +94 -100
  27. package/dist/collection/components/header/header.template.js +15 -31
  28. package/dist/collection/components/helpcenter-panel/helpcenter-panel.css +96 -2
  29. package/dist/collection/components/icon/icon.js +0 -2
  30. package/dist/collection/components/image-overlay/image-overlay.css +124 -2
  31. package/dist/collection/components/label/label.css +13 -0
  32. package/dist/collection/components/label/label.js +118 -12
  33. package/dist/collection/components/label/label.template.js +2 -1
  34. package/dist/collection/components/list/list.template.js +11 -4
  35. package/dist/collection/components/map-controls/map-controls.css +147 -2
  36. package/dist/collection/components/ozon-content/nodes/int-io-ref.node.js +27 -0
  37. package/dist/collection/components/ozon-content/nodes/int-ref.node.js +1 -0
  38. package/dist/collection/components/ozon-content/ozon-content-mapper.js +3 -1
  39. package/dist/collection/components/ozon-content/ozon-content.css +23 -0
  40. package/dist/collection/components/ozon-content/ozon-content.js +3 -1
  41. package/dist/collection/components/pagination/pagination.js +8 -5
  42. package/dist/collection/components/tooltip/tooltip.js +7 -0
  43. package/dist/collection/components/tree-view/tree-item.js +1 -1
  44. package/dist/collection/components/tree-view/tree-view.js +58 -2
  45. package/dist/collection/components/viewer-grid/viewer-grid.css +207 -5
  46. package/dist/custom-elements/index.js +219 -73
  47. package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
  48. package/dist/dso-toolkit/p-04b8814d.entry.js +1 -0
  49. package/dist/dso-toolkit/p-15d0f2eb.entry.js +1 -0
  50. package/dist/dso-toolkit/{p-37e12c3c.entry.js → p-17e9802f.entry.js} +1 -1
  51. package/dist/dso-toolkit/p-19b5fae2.entry.js +1 -0
  52. package/dist/dso-toolkit/p-1bd0e0c3.entry.js +1 -0
  53. package/dist/dso-toolkit/p-1d52d4f2.entry.js +1 -0
  54. package/dist/dso-toolkit/p-553bd3aa.entry.js +1 -0
  55. package/dist/dso-toolkit/p-590cbab6.entry.js +1 -0
  56. package/dist/dso-toolkit/p-63e0f10d.entry.js +1 -0
  57. package/dist/dso-toolkit/p-8e6ee9f0.entry.js +1 -0
  58. package/dist/dso-toolkit/p-a5705dd1.entry.js +1 -0
  59. package/dist/dso-toolkit/p-a7bcd356.entry.js +1 -0
  60. package/dist/dso-toolkit/p-aa098949.entry.js +1 -0
  61. package/dist/dso-toolkit/p-c282135e.entry.js +1 -0
  62. package/dist/dso-toolkit/p-ca3a1440.entry.js +1 -0
  63. package/dist/esm/dso-alert.entry.js +1 -1
  64. package/dist/esm/dso-autosuggest.entry.js +17 -8
  65. package/dist/esm/dso-badge.entry.js +1 -1
  66. package/dist/esm/dso-banner.entry.js +1 -1
  67. package/dist/esm/dso-header.entry.js +31 -21
  68. package/dist/esm/dso-helpcenter-panel.entry.js +1 -1
  69. package/dist/esm/dso-icon.entry.js +15 -24
  70. package/dist/esm/dso-image-overlay.entry.js +1 -1
  71. package/dist/esm/dso-label.entry.js +79 -4
  72. package/dist/esm/dso-map-controls.entry.js +1 -1
  73. package/dist/esm/dso-ozon-content.entry.js +32 -3
  74. package/dist/esm/dso-pagination.entry.js +5 -2
  75. package/dist/esm/dso-toolkit.js +1 -1
  76. package/dist/esm/dso-tooltip.entry.js +7 -0
  77. package/dist/esm/dso-tree-view.entry.js +24 -2
  78. package/dist/esm/dso-viewer-grid.entry.js +1 -1
  79. package/dist/esm/loader.js +1 -1
  80. package/dist/types/components/autosuggest/autosuggest.d.ts +6 -0
  81. package/dist/types/components/autosuggest/autosuggest.template.d.ts +1 -1
  82. package/dist/types/components/header/header.d.ts +13 -20
  83. package/dist/types/components/header/header.interfaces.d.ts +17 -0
  84. package/dist/types/components/header/header.template.d.ts +1 -1
  85. package/dist/types/components/label/label.d.ts +21 -3
  86. package/dist/types/components/label/label.template.d.ts +1 -1
  87. package/dist/types/components/ozon-content/nodes/int-io-ref.node.d.ts +6 -0
  88. package/dist/types/components/ozon-content/ozon-content-node-context.interface.d.ts +2 -1
  89. package/dist/types/components/ozon-content/ozon-content.interfaces.d.ts +2 -0
  90. package/dist/types/components/tooltip/tooltip.d.ts +1 -0
  91. package/dist/types/components/tree-view/tree-view.d.ts +10 -2
  92. package/dist/types/components.d.ts +34 -7
  93. package/package.json +1 -1
  94. package/dist/dso-toolkit/p-076400f4.entry.js +0 -1
  95. package/dist/dso-toolkit/p-09b53589.entry.js +0 -1
  96. package/dist/dso-toolkit/p-2f64bded.entry.js +0 -1
  97. package/dist/dso-toolkit/p-5e614420.entry.js +0 -1
  98. package/dist/dso-toolkit/p-60679db4.entry.js +0 -1
  99. package/dist/dso-toolkit/p-7796687c.entry.js +0 -1
  100. package/dist/dso-toolkit/p-7f41f2a1.entry.js +0 -1
  101. package/dist/dso-toolkit/p-b1dc8d76.entry.js +0 -1
  102. package/dist/dso-toolkit/p-c0b7f435.entry.js +0 -1
  103. package/dist/dso-toolkit/p-d0d279cc.entry.js +0 -1
  104. package/dist/dso-toolkit/p-e01b1657.entry.js +0 -1
  105. package/dist/dso-toolkit/p-e1496a15.entry.js +0 -1
  106. package/dist/dso-toolkit/p-ea14647b.entry.js +0 -1
  107. package/dist/dso-toolkit/p-f1026921.entry.js +0 -1
@@ -10,10 +10,10 @@
10
10
  }
11
11
  :host {
12
12
  display: block;
13
- --di-status-success: url("data:image/svg+xml,%3csvg id='status-success' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e %3cg%3e %3ccircle cx='12' cy='12' r='11' style='fill: %2339870c'/%3e %3cpath d='M12%2c1A11%2c11%2c0%2c1%2c1%2c1%2c12%2c11%2c11%2c0%2c0%2c1%2c12%2c1m0-1A12%2c12%2c0%2c1%2c0%2c24%2c12%2c12%2c12%2c0%2c0%2c0%2c12%2c0Z' style='fill: white'/%3e %3c/g%3e %3cpath d='M10.11%2c18%2c5.29%2c13.31A.92.92%2c0%2c0%2c1%2c5.3%2c12a1%2c1%2c0%2c0%2c1%2c1.41%2c0l3.4%2c3.3%2c7.18-7a1%2c1%2c0%2c0%2c1%2c1.41%2c0%2c.92.92%2c0%2c0%2c1%2c0%2c1.35Z' style='fill: white'/%3e %3c/svg%3e");
14
- --di-status-danger: url("data:image/svg+xml,%3csvg id='status-danger-line' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e %3cg%3e %3cpath d='M22.6%2c18.51c.86%2c1.37.29%2c2.49-1.25%2c2.49H2.65C1.11%2c21%2c.54%2c19.88%2c1.4%2c18.51L10.44%2c4a1.7%2c1.7%2c0%2c0%2c1%2c3.12%2c0Z' style='fill: %23ce3f51'/%3e %3cpath d='M12%2c3a1.9%2c1.9%2c0%2c0%2c1%2c1.56%2c1l9%2c14.48c.86%2c1.37.29%2c2.49-1.25%2c2.49H2.65C1.11%2c21%2c.54%2c19.88%2c1.4%2c18.51L10.44%2c4A1.9%2c1.9%2c0%2c0%2c1%2c12%2c3m0-1A2.89%2c2.89%2c0%2c0%2c0%2c9.6%2c3.5L.55%2c18a2.75%2c2.75%2c0%2c0%2c0-.28%2c2.81A2.59%2c2.59%2c0%2c0%2c0%2c2.65%2c22h18.7a2.59%2c2.59%2c0%2c0%2c0%2c2.38-1.21A2.75%2c2.75%2c0%2c0%2c0%2c23.45%2c18L14.4%2c3.5A2.89%2c2.89%2c0%2c0%2c0%2c12%2c2Z' style='fill: white'/%3e %3c/g%3e %3cpath d='M12%2c16a1%2c1%2c0%2c0%2c1-1-.91V8.91a1%2c1%2c0%2c0%2c1%2c2%2c0v6.18A1%2c1%2c0%2c0%2c1%2c12%2c16Zm0%2c1a1%2c1%2c0%2c1%2c0%2c1%2c1A1%2c1%2c0%2c0%2c0%2c12%2c17Z' style='fill: white'/%3e %3c/svg%3e");
15
- --di-status-warning: url("data:image/svg+xml,%3csvg id='status-warning' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e %3cg%3e %3cpath d='M22.6%2c18.51c.86%2c1.37.29%2c2.49-1.25%2c2.49H2.65C1.11%2c21%2c.54%2c19.88%2c1.4%2c18.51L10.44%2c4a1.7%2c1.7%2c0%2c0%2c1%2c3.12%2c0Z' style='fill: %23dcd400'/%3e %3cpath d='M12%2c3a1.9%2c1.9%2c0%2c0%2c1%2c1.56%2c1l9%2c14.48c.86%2c1.37.29%2c2.49-1.25%2c2.49H2.65C1.11%2c21%2c.54%2c19.88%2c1.4%2c18.51L10.44%2c4A1.9%2c1.9%2c0%2c0%2c1%2c12%2c3m0-1A2.89%2c2.89%2c0%2c0%2c0%2c9.6%2c3.5L.55%2c18a2.75%2c2.75%2c0%2c0%2c0-.28%2c2.81A2.59%2c2.59%2c0%2c0%2c0%2c2.65%2c22h18.7a2.59%2c2.59%2c0%2c0%2c0%2c2.38-1.21A2.75%2c2.75%2c0%2c0%2c0%2c23.45%2c18L14.4%2c3.5A2.89%2c2.89%2c0%2c0%2c0%2c12%2c2Z' style='fill: white'/%3e %3c/g%3e %3cpath d='M11.73%2c15.85a1%2c1%2c0%2c0%2c1-1-.91V8.76a1%2c1%2c0%2c0%2c1%2c2%2c0v6.18A1%2c1%2c0%2c0%2c1%2c11.73%2c15.85Zm0%2c1a1%2c1%2c0%2c1%2c0%2c1%2c1A1%2c1%2c0%2c0%2c0%2c11.73%2c16.85Z'/%3e %3c/svg%3e");
16
- --di-status-info: url("data:image/svg+xml,%3csvg id='status-info' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e %3cg%3e %3ccircle cx='12' cy='12' r='11' style='fill: %232b5780'/%3e %3cpath d='M12%2c1A11%2c11%2c0%2c1%2c1%2c1%2c12%2c11%2c11%2c0%2c0%2c1%2c12%2c1m0-1A12%2c12%2c0%2c1%2c0%2c24%2c12%2c12%2c12%2c0%2c0%2c0%2c12%2c0Z' style='fill: white'/%3e %3c/g%3e %3cpath d='M11%2c8a1%2c1%2c0%2c1%2c1%2c1%2c1A1%2c1%2c0%2c0%2c1%2c11%2c8Zm2%2c8.79V11.21A1.12%2c1.12%2c0%2c0%2c0%2c12%2c10a1.12%2c1.12%2c0%2c0%2c0-1%2c1.21v5.58A1.12%2c1.12%2c0%2c0%2c0%2c12%2c18%2c1.12%2c1.12%2c0%2c0%2c0%2c13%2c16.79Z' style='fill: white'/%3e %3c/svg%3e");
13
+ --di-status-success: url("data:image/svg+xml,%3csvg id='status-success' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e %3cg%3e %3ccircle cx='12' cy='12' r='11' fill='%2339870c'/%3e %3cpath d='M12%2c1A11%2c11%2c0%2c1%2c1%2c1%2c12%2c11%2c11%2c0%2c0%2c1%2c12%2c1m0-1A12%2c12%2c0%2c1%2c0%2c24%2c12%2c12%2c12%2c0%2c0%2c0%2c12%2c0Z' fill='white'/%3e %3c/g%3e %3cpath d='M10.11%2c18%2c5.29%2c13.31A.92.92%2c0%2c0%2c1%2c5.3%2c12a1%2c1%2c0%2c0%2c1%2c1.41%2c0l3.4%2c3.3%2c7.18-7a1%2c1%2c0%2c0%2c1%2c1.41%2c0%2c.92.92%2c0%2c0%2c1%2c0%2c1.35Z' fill='white'/%3e %3c/svg%3e");
14
+ --di-status-danger: url("data:image/svg+xml,%3csvg id='status-danger-line' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e %3cg%3e %3cpath d='M22.6%2c18.51c.86%2c1.37.29%2c2.49-1.25%2c2.49H2.65C1.11%2c21%2c.54%2c19.88%2c1.4%2c18.51L10.44%2c4a1.7%2c1.7%2c0%2c0%2c1%2c3.12%2c0Z' fill='%23ce3f51'/%3e %3cpath d='M12%2c3a1.9%2c1.9%2c0%2c0%2c1%2c1.56%2c1l9%2c14.48c.86%2c1.37.29%2c2.49-1.25%2c2.49H2.65C1.11%2c21%2c.54%2c19.88%2c1.4%2c18.51L10.44%2c4A1.9%2c1.9%2c0%2c0%2c1%2c12%2c3m0-1A2.89%2c2.89%2c0%2c0%2c0%2c9.6%2c3.5L.55%2c18a2.75%2c2.75%2c0%2c0%2c0-.28%2c2.81A2.59%2c2.59%2c0%2c0%2c0%2c2.65%2c22h18.7a2.59%2c2.59%2c0%2c0%2c0%2c2.38-1.21A2.75%2c2.75%2c0%2c0%2c0%2c23.45%2c18L14.4%2c3.5A2.89%2c2.89%2c0%2c0%2c0%2c12%2c2Z' fill='white'/%3e %3c/g%3e %3cpath d='M12%2c16a1%2c1%2c0%2c0%2c1-1-.91V8.91a1%2c1%2c0%2c0%2c1%2c2%2c0v6.18A1%2c1%2c0%2c0%2c1%2c12%2c16Zm0%2c1a1%2c1%2c0%2c1%2c0%2c1%2c1A1%2c1%2c0%2c0%2c0%2c12%2c17Z' fill='white'/%3e %3c/svg%3e");
15
+ --di-status-warning: url("data:image/svg+xml,%3csvg id='status-warning' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e %3cg%3e %3cpath d='M22.6%2c18.51c.86%2c1.37.29%2c2.49-1.25%2c2.49H2.65C1.11%2c21%2c.54%2c19.88%2c1.4%2c18.51L10.44%2c4a1.7%2c1.7%2c0%2c0%2c1%2c3.12%2c0Z' fill='%23dcd400'/%3e %3cpath d='M12%2c3a1.9%2c1.9%2c0%2c0%2c1%2c1.56%2c1l9%2c14.48c.86%2c1.37.29%2c2.49-1.25%2c2.49H2.65C1.11%2c21%2c.54%2c19.88%2c1.4%2c18.51L10.44%2c4A1.9%2c1.9%2c0%2c0%2c1%2c12%2c3m0-1A2.89%2c2.89%2c0%2c0%2c0%2c9.6%2c3.5L.55%2c18a2.75%2c2.75%2c0%2c0%2c0-.28%2c2.81A2.59%2c2.59%2c0%2c0%2c0%2c2.65%2c22h18.7a2.59%2c2.59%2c0%2c0%2c0%2c2.38-1.21A2.75%2c2.75%2c0%2c0%2c0%2c23.45%2c18L14.4%2c3.5A2.89%2c2.89%2c0%2c0%2c0%2c12%2c2Z' fill='white'/%3e %3c/g%3e %3cpath d='M11.73%2c15.85a1%2c1%2c0%2c0%2c1-1-.91V8.76a1%2c1%2c0%2c0%2c1%2c2%2c0v6.18A1%2c1%2c0%2c0%2c1%2c11.73%2c15.85Zm0%2c1a1%2c1%2c0%2c1%2c0%2c1%2c1A1%2c1%2c0%2c0%2c0%2c11.73%2c16.85Z'/%3e %3c/svg%3e");
16
+ --di-status-info: url("data:image/svg+xml,%3csvg id='status-info' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e %3cg%3e %3ccircle cx='12' cy='12' r='11' fill='%232b5780'/%3e %3cpath d='M12%2c1A11%2c11%2c0%2c1%2c1%2c1%2c12%2c11%2c11%2c0%2c0%2c1%2c12%2c1m0-1A12%2c12%2c0%2c1%2c0%2c24%2c12%2c12%2c12%2c0%2c0%2c0%2c12%2c0Z' fill='white'/%3e %3c/g%3e %3cpath d='M11%2c8a1%2c1%2c0%2c1%2c1%2c1%2c1A1%2c1%2c0%2c0%2c1%2c11%2c8Zm2%2c8.79V11.21A1.12%2c1.12%2c0%2c0%2c0%2c12%2c10a1.12%2c1.12%2c0%2c0%2c0-1%2c1.21v5.58A1.12%2c1.12%2c0%2c0%2c0%2c12%2c18%2c1.12%2c1.12%2c0%2c0%2c0%2c13%2c16.79Z' fill='white'/%3e %3c/svg%3e");
17
17
  --di-download-grijs90: url("data:image/svg+xml,%3csvg id='download' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23191919%3b'%3e %3cpath fill='currentColor' d='M18.72%2c10.44%2c12%2c17l-6.7-6.52C4.8%2c10%2c5%2c9.63%2c5.63%2c9.63H8.5V1.82A.8.8%2c0%2c0%2c1%2c9.28%2c1h5.44a.8.8%2c0%2c0%2c1%2c.78.82V9.61h2.87C19%2c9.6%2c19.2%2c10%2c18.72%2c10.44ZM1%2c17v6H23V17Zm16%2c3a2%2c2%2c0%2c1%2c1-2-2A2%2c2%2c0%2c0%2c1%2c17%2c20Zm5%2c0a2%2c2%2c0%2c1%2c1-2-2A2%2c2%2c0%2c0%2c1%2c22%2c20Z'/%3e %3c/svg%3e");
18
18
  --di-external-link-grijs90: url("data:image/svg+xml,%3csvg id='external-link' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23191919%3b'%3e %3cpath fill='currentColor' d='M19%2c6V9.69c0%2c.33-.2.41-.43.17L17.06%2c8.35l-3.35%2c3.36a1%2c1%2c0%2c0%2c1-1.42%2c0%2c1%2c1%2c0%2c0%2c1%2c0-1.42l3.36-3.35L14.14%2c5.43C13.9%2c5.19%2c14%2c5%2c14.31%2c5H19V6ZM18%2c17V13a1%2c1%2c0%2c0%2c0-2%2c0v4a1%2c1%2c0%2c0%2c1-1%2c1H7a1%2c1%2c0%2c0%2c1-1-1V9A1%2c1%2c0%2c0%2c1%2c7%2c8h4a1%2c1%2c0%2c0%2c0%2c0-2H7A3%2c3%2c0%2c0%2c0%2c4%2c9v8a3%2c3%2c0%2c0%2c0%2c3%2c3h8A3%2c3%2c0%2c0%2c0%2c18%2c17Z'/%3e %3c/svg%3e");
19
19
  }
@@ -25,14 +25,17 @@ export class Autosuggest {
25
25
  */
26
26
  this.suggestOnFocus = false;
27
27
  this.showSuggestions = false;
28
+ this.notFound = false;
28
29
  this.listboxId = v4();
29
30
  this.inputId = v4();
30
31
  this.labelId = v4();
31
32
  this.debouncedEmitValue = debounce((value) => this.changeEmitter.emit(value), 200);
33
+ this.inputValue = '';
32
34
  this.onInput = (event) => {
33
35
  if (!(event.target instanceof HTMLInputElement)) {
34
36
  throw new Error("event.target is not instanceof HTMLInputElement");
35
37
  }
38
+ this.inputValue = event.target.value;
36
39
  this.debouncedEmitValue(event.target.value.match(/(\S+)/g) ? event.target.value : '');
37
40
  };
38
41
  this.onFocusIn = () => {
@@ -78,15 +81,15 @@ export class Autosuggest {
78
81
  }
79
82
  suggestionsWatcher() {
80
83
  this.resetSelectedSuggestion();
81
- if (!this.showSuggestions && this.suggestions.length > 0) {
84
+ if ((!this.showSuggestions || !this.notFound) && this.inputValue) {
82
85
  this.openSuggestions();
83
86
  }
84
- else if (this.showSuggestions && this.suggestions.length === 0) {
87
+ else if ((this.showSuggestions || this.notFound) && !this.inputValue) {
85
88
  this.closeSuggestions();
86
89
  }
87
90
  }
88
91
  onDocumentClick(event) {
89
- if (this.showSuggestions &&
92
+ if ((this.showSuggestions || this.notFound) &&
90
93
  this.listbox &&
91
94
  event.target instanceof Node &&
92
95
  !this.listbox.contains(event.target) &&
@@ -188,16 +191,18 @@ export class Autosuggest {
188
191
  }
189
192
  openSuggestions(selectSuggestion) {
190
193
  this.showSuggestions = this.suggestions.length > 0;
191
- this.input.setAttribute("aria-expanded", this.showSuggestions.toString());
192
- if (selectSuggestion === 'first') {
194
+ this.notFound = this.suggestions.length === 0;
195
+ this.input.setAttribute("aria-expanded", (this.showSuggestions || this.notFound).toString());
196
+ if (this.showSuggestions && selectSuggestion === 'first') {
193
197
  this.selectFirstSuggestion();
194
198
  }
195
- else if (selectSuggestion === 'last') {
199
+ else if (this.showSuggestions && selectSuggestion === 'last') {
196
200
  this.selectLastSuggestion();
197
201
  }
198
202
  }
199
203
  closeSuggestions() {
200
204
  this.showSuggestions = false;
205
+ this.notFound = false;
201
206
  this.input.setAttribute("aria-expanded", "false");
202
207
  this.selectFirstSuggestion();
203
208
  }
@@ -220,13 +225,18 @@ export class Autosuggest {
220
225
  this.loading
221
226
  ? h("div", { class: "autosuggest-progress-box" },
222
227
  h("dso-progress-indicator", { label: this.loadingLabel }))
223
- : h("ul", { role: "listbox", id: this.listboxId, "aria-labelledby": this.labelId, ref: element => this.listbox = element, hidden: !this.showSuggestions }, this.showSuggestions
228
+ : h("ul", { role: "listbox", id: this.listboxId, "aria-labelledby": this.labelId, ref: element => this.listbox = element, hidden: !this.showSuggestions && !this.notFound }, this.showSuggestions
224
229
  ? this.suggestions.map((suggestion) => (h("li", { role: "option", id: this.listboxItemId(suggestion), key: suggestion.value, onMouseEnter: () => this.selectSuggestion(suggestion), onMouseLeave: () => this.resetSelectedSuggestion(), onClick: () => this.pickSelectedValue(), "aria-selected": (suggestion === this.selectedSuggestion).toString(), "aria-label": suggestion.value },
225
230
  h("span", { class: "value" }, this.markTerms(suggestion.value, terms)),
226
231
  suggestion.type
227
232
  ? (h("span", { class: "type" }, suggestion.type))
228
233
  : undefined)))
229
- : undefined)));
234
+ : this.notFound
235
+ ? h("li", null,
236
+ h("span", { class: "value" }, !this.notFoundLabel
237
+ ? this.markTerms(`${this.inputValue} is niet gevonden.`, terms)
238
+ : h("span", null, this.notFoundLabel)))
239
+ : undefined)));
230
240
  }
231
241
  static get is() { return "dso-autosuggest"; }
232
242
  static get encapsulation() { return "scoped"; }
@@ -293,6 +303,23 @@ export class Autosuggest {
293
303
  "reflect": false,
294
304
  "defaultValue": "\"Een moment geduld.\""
295
305
  },
306
+ "notFoundLabel": {
307
+ "type": "string",
308
+ "mutable": false,
309
+ "complexType": {
310
+ "original": "string",
311
+ "resolved": "string | undefined",
312
+ "references": {}
313
+ },
314
+ "required": false,
315
+ "optional": true,
316
+ "docs": {
317
+ "tags": [],
318
+ "text": "To show text when no results are found."
319
+ },
320
+ "attribute": "not-found-label",
321
+ "reflect": false
322
+ },
296
323
  "suggestOnFocus": {
297
324
  "type": "boolean",
298
325
  "mutable": false,
@@ -314,7 +341,8 @@ export class Autosuggest {
314
341
  }; }
315
342
  static get states() { return {
316
343
  "showSuggestions": {},
317
- "selectedSuggestion": {}
344
+ "selectedSuggestion": {},
345
+ "notFound": {}
318
346
  }; }
319
347
  static get events() { return [{
320
348
  "method": "selectEmitter",
@@ -1,6 +1,6 @@
1
1
  import { html } from 'lit-html';
2
2
  import { ifDefined } from 'lit-html/directives/if-defined.js';
3
- export function autosuggestTemplate({ suggestions, onSelect, onChange, onSearch, suggestOnFocus, loading, loadingLabel }, children) {
3
+ export function autosuggestTemplate({ suggestions, onSelect, onChange, onSearch, suggestOnFocus, loading, loadingLabel, notFoundLabel }, children) {
4
4
  return html `
5
5
  <dso-autosuggest
6
6
  .suggestions=${suggestions}
@@ -10,6 +10,7 @@ export function autosuggestTemplate({ suggestions, onSelect, onChange, onSearch,
10
10
  ?suggest-on-focus=${suggestOnFocus}
11
11
  ?loading=${loading}
12
12
  loading-label=${ifDefined(loadingLabel)}
13
+ not-found-label=${ifDefined(notFoundLabel)}
13
14
  >
14
15
  ${children}
15
16
  </dso-autosuggest>
@@ -25,8 +25,10 @@
25
25
  color: #fff;
26
26
  display: inline-block;
27
27
  font-size: 0.875em;
28
- line-height: 1em;
28
+ line-height: 1;
29
+ min-width: calc(1 + 8px);
29
30
  padding: 4px 8px;
31
+ text-align: center;
30
32
  }
31
33
  .dso-badge.badge-info {
32
34
  background-color: #6ca4d9;
@@ -52,4 +54,5 @@
52
54
  background-color: #fff;
53
55
  color: #191919;
54
56
  outline: 1px solid #191919;
57
+ outline-offset: -1px;
55
58
  }
@@ -1,7 +1,7 @@
1
1
  :host {
2
2
  display: block;
3
- --di-status-danger: url("data:image/svg+xml,%3csvg id='status-danger-line' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e %3cg%3e %3cpath d='M22.6%2c18.51c.86%2c1.37.29%2c2.49-1.25%2c2.49H2.65C1.11%2c21%2c.54%2c19.88%2c1.4%2c18.51L10.44%2c4a1.7%2c1.7%2c0%2c0%2c1%2c3.12%2c0Z' style='fill: %23ce3f51'/%3e %3cpath d='M12%2c3a1.9%2c1.9%2c0%2c0%2c1%2c1.56%2c1l9%2c14.48c.86%2c1.37.29%2c2.49-1.25%2c2.49H2.65C1.11%2c21%2c.54%2c19.88%2c1.4%2c18.51L10.44%2c4A1.9%2c1.9%2c0%2c0%2c1%2c12%2c3m0-1A2.89%2c2.89%2c0%2c0%2c0%2c9.6%2c3.5L.55%2c18a2.75%2c2.75%2c0%2c0%2c0-.28%2c2.81A2.59%2c2.59%2c0%2c0%2c0%2c2.65%2c22h18.7a2.59%2c2.59%2c0%2c0%2c0%2c2.38-1.21A2.75%2c2.75%2c0%2c0%2c0%2c23.45%2c18L14.4%2c3.5A2.89%2c2.89%2c0%2c0%2c0%2c12%2c2Z' style='fill: white'/%3e %3c/g%3e %3cpath d='M12%2c16a1%2c1%2c0%2c0%2c1-1-.91V8.91a1%2c1%2c0%2c0%2c1%2c2%2c0v6.18A1%2c1%2c0%2c0%2c1%2c12%2c16Zm0%2c1a1%2c1%2c0%2c1%2c0%2c1%2c1A1%2c1%2c0%2c0%2c0%2c12%2c17Z' style='fill: white'/%3e %3c/svg%3e");
4
- --di-status-warning: url("data:image/svg+xml,%3csvg id='status-warning' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e %3cg%3e %3cpath d='M22.6%2c18.51c.86%2c1.37.29%2c2.49-1.25%2c2.49H2.65C1.11%2c21%2c.54%2c19.88%2c1.4%2c18.51L10.44%2c4a1.7%2c1.7%2c0%2c0%2c1%2c3.12%2c0Z' style='fill: %23dcd400'/%3e %3cpath d='M12%2c3a1.9%2c1.9%2c0%2c0%2c1%2c1.56%2c1l9%2c14.48c.86%2c1.37.29%2c2.49-1.25%2c2.49H2.65C1.11%2c21%2c.54%2c19.88%2c1.4%2c18.51L10.44%2c4A1.9%2c1.9%2c0%2c0%2c1%2c12%2c3m0-1A2.89%2c2.89%2c0%2c0%2c0%2c9.6%2c3.5L.55%2c18a2.75%2c2.75%2c0%2c0%2c0-.28%2c2.81A2.59%2c2.59%2c0%2c0%2c0%2c2.65%2c22h18.7a2.59%2c2.59%2c0%2c0%2c0%2c2.38-1.21A2.75%2c2.75%2c0%2c0%2c0%2c23.45%2c18L14.4%2c3.5A2.89%2c2.89%2c0%2c0%2c0%2c12%2c2Z' style='fill: white'/%3e %3c/g%3e %3cpath d='M11.73%2c15.85a1%2c1%2c0%2c0%2c1-1-.91V8.76a1%2c1%2c0%2c0%2c1%2c2%2c0v6.18A1%2c1%2c0%2c0%2c1%2c11.73%2c15.85Zm0%2c1a1%2c1%2c0%2c1%2c0%2c1%2c1A1%2c1%2c0%2c0%2c0%2c11.73%2c16.85Z'/%3e %3c/svg%3e");
3
+ --di-status-danger: url("data:image/svg+xml,%3csvg id='status-danger-line' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e %3cg%3e %3cpath d='M22.6%2c18.51c.86%2c1.37.29%2c2.49-1.25%2c2.49H2.65C1.11%2c21%2c.54%2c19.88%2c1.4%2c18.51L10.44%2c4a1.7%2c1.7%2c0%2c0%2c1%2c3.12%2c0Z' fill='%23ce3f51'/%3e %3cpath d='M12%2c3a1.9%2c1.9%2c0%2c0%2c1%2c1.56%2c1l9%2c14.48c.86%2c1.37.29%2c2.49-1.25%2c2.49H2.65C1.11%2c21%2c.54%2c19.88%2c1.4%2c18.51L10.44%2c4A1.9%2c1.9%2c0%2c0%2c1%2c12%2c3m0-1A2.89%2c2.89%2c0%2c0%2c0%2c9.6%2c3.5L.55%2c18a2.75%2c2.75%2c0%2c0%2c0-.28%2c2.81A2.59%2c2.59%2c0%2c0%2c0%2c2.65%2c22h18.7a2.59%2c2.59%2c0%2c0%2c0%2c2.38-1.21A2.75%2c2.75%2c0%2c0%2c0%2c23.45%2c18L14.4%2c3.5A2.89%2c2.89%2c0%2c0%2c0%2c12%2c2Z' fill='white'/%3e %3c/g%3e %3cpath d='M12%2c16a1%2c1%2c0%2c0%2c1-1-.91V8.91a1%2c1%2c0%2c0%2c1%2c2%2c0v6.18A1%2c1%2c0%2c0%2c1%2c12%2c16Zm0%2c1a1%2c1%2c0%2c1%2c0%2c1%2c1A1%2c1%2c0%2c0%2c0%2c12%2c17Z' fill='white'/%3e %3c/svg%3e");
4
+ --di-status-warning: url("data:image/svg+xml,%3csvg id='status-warning' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e %3cg%3e %3cpath d='M22.6%2c18.51c.86%2c1.37.29%2c2.49-1.25%2c2.49H2.65C1.11%2c21%2c.54%2c19.88%2c1.4%2c18.51L10.44%2c4a1.7%2c1.7%2c0%2c0%2c1%2c3.12%2c0Z' fill='%23dcd400'/%3e %3cpath d='M12%2c3a1.9%2c1.9%2c0%2c0%2c1%2c1.56%2c1l9%2c14.48c.86%2c1.37.29%2c2.49-1.25%2c2.49H2.65C1.11%2c21%2c.54%2c19.88%2c1.4%2c18.51L10.44%2c4A1.9%2c1.9%2c0%2c0%2c1%2c12%2c3m0-1A2.89%2c2.89%2c0%2c0%2c0%2c9.6%2c3.5L.55%2c18a2.75%2c2.75%2c0%2c0%2c0-.28%2c2.81A2.59%2c2.59%2c0%2c0%2c0%2c2.65%2c22h18.7a2.59%2c2.59%2c0%2c0%2c0%2c2.38-1.21A2.75%2c2.75%2c0%2c0%2c0%2c23.45%2c18L14.4%2c3.5A2.89%2c2.89%2c0%2c0%2c0%2c12%2c2Z' fill='white'/%3e %3c/g%3e %3cpath d='M11.73%2c15.85a1%2c1%2c0%2c0%2c1-1-.91V8.76a1%2c1%2c0%2c0%2c1%2c2%2c0v6.18A1%2c1%2c0%2c0%2c1%2c11.73%2c15.85Zm0%2c1a1%2c1%2c0%2c1%2c0%2c1%2c1A1%2c1%2c0%2c0%2c0%2c11.73%2c16.85Z'/%3e %3c/svg%3e");
5
5
  --di-download-grijs90: url("data:image/svg+xml,%3csvg id='download' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23191919%3b'%3e %3cpath fill='currentColor' d='M18.72%2c10.44%2c12%2c17l-6.7-6.52C4.8%2c10%2c5%2c9.63%2c5.63%2c9.63H8.5V1.82A.8.8%2c0%2c0%2c1%2c9.28%2c1h5.44a.8.8%2c0%2c0%2c1%2c.78.82V9.61h2.87C19%2c9.6%2c19.2%2c10%2c18.72%2c10.44ZM1%2c17v6H23V17Zm16%2c3a2%2c2%2c0%2c1%2c1-2-2A2%2c2%2c0%2c0%2c1%2c17%2c20Zm5%2c0a2%2c2%2c0%2c1%2c1-2-2A2%2c2%2c0%2c0%2c1%2c22%2c20Z'/%3e %3c/svg%3e");
6
6
  --di-external-link-grijs90: url("data:image/svg+xml,%3csvg id='external-link' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23191919%3b'%3e %3cpath fill='currentColor' d='M19%2c6V9.69c0%2c.33-.2.41-.43.17L17.06%2c8.35l-3.35%2c3.36a1%2c1%2c0%2c0%2c1-1.42%2c0%2c1%2c1%2c0%2c0%2c1%2c0-1.42l3.36-3.35L14.14%2c5.43C13.9%2c5.19%2c14%2c5%2c14.31%2c5H19V6ZM18%2c17V13a1%2c1%2c0%2c0%2c0-2%2c0v4a1%2c1%2c0%2c0%2c1-1%2c1H7a1%2c1%2c0%2c0%2c1-1-1V9A1%2c1%2c0%2c0%2c1%2c7%2c8h4a1%2c1%2c0%2c0%2c0%2c0-2H7A3%2c3%2c0%2c0%2c0%2c4%2c9v8a3%2c3%2c0%2c0%2c0%2c3%2c3h8A3%2c3%2c0%2c0%2c0%2c18%2c17Z'/%3e %3c/svg%3e");
7
7
  }
@@ -52,6 +52,152 @@
52
52
  .logout {
53
53
  margin-right: 16px;
54
54
  }
55
+ .login .dso-tertiary,
56
+ .logout .dso-tertiary {
57
+ display: inline-block;
58
+ font-size: 1em;
59
+ font-weight: 500;
60
+ margin-bottom: 0;
61
+ text-decoration: none;
62
+ touch-action: manipulation;
63
+ text-align: left;
64
+ user-select: none;
65
+ vertical-align: middle;
66
+ border: 0;
67
+ color: #39870c;
68
+ line-height: 1;
69
+ padding: 0;
70
+ background-color: transparent;
71
+ cursor: pointer;
72
+ font-family: Asap, sans-serif;
73
+ font-weight: 600;
74
+ vertical-align: text-bottom;
75
+ }
76
+ .login .dso-tertiary:focus, .login .dso-tertiary:focus-visible,
77
+ .logout .dso-tertiary:focus,
78
+ .logout .dso-tertiary:focus-visible {
79
+ outline-offset: 2px;
80
+ }
81
+ .login .dso-tertiary:active,
82
+ .logout .dso-tertiary:active {
83
+ outline: 0;
84
+ }
85
+ .login .dso-tertiary.extern::after, .login .dso-tertiary.download::after,
86
+ .logout .dso-tertiary.extern::after,
87
+ .logout .dso-tertiary.download::after {
88
+ content: "";
89
+ display: inline-block;
90
+ height: 1.5em;
91
+ margin-left: 8px;
92
+ vertical-align: top;
93
+ width: 1.5em;
94
+ }
95
+ .login .dso-tertiary[disabled],
96
+ .logout .dso-tertiary[disabled] {
97
+ color: #afcf9d;
98
+ }
99
+ .login .dso-tertiary[disabled].dso-spinner-left, .login .dso-tertiary[disabled].dso-spinner-right,
100
+ .logout .dso-tertiary[disabled].dso-spinner-left,
101
+ .logout .dso-tertiary[disabled].dso-spinner-right {
102
+ color: #39870c;
103
+ }
104
+ .login .dso-tertiary:not([disabled]):hover,
105
+ .logout .dso-tertiary:not([disabled]):hover {
106
+ color: #676cb0;
107
+ text-decoration: underline;
108
+ }
109
+ .login .dso-tertiary:not([disabled]):active,
110
+ .logout .dso-tertiary:not([disabled]):active {
111
+ color: #676cb0;
112
+ }
113
+ .login .dso-tertiary.btn-align,
114
+ .logout .dso-tertiary.btn-align {
115
+ line-height: calc(1.5em - 1px);
116
+ padding: 11px 0;
117
+ position: relative;
118
+ }
119
+ .login .dso-tertiary.extern::after, .login .dso-tertiary.download::after,
120
+ .logout .dso-tertiary.extern::after,
121
+ .logout .dso-tertiary.download::after {
122
+ position: relative;
123
+ top: -2px;
124
+ }
125
+ .login .dso-tertiary.download::after,
126
+ .logout .dso-tertiary.download::after {
127
+ background: var(--dso-icon, var(--di-download)) no-repeat;
128
+ background-position: center;
129
+ background-size: cover;
130
+ height: 24px;
131
+ vertical-align: top;
132
+ width: 24px;
133
+ }
134
+ .login .dso-tertiary.download[disabled]::after,
135
+ .logout .dso-tertiary.download[disabled]::after {
136
+ --dso-icon: var(--di-download-grasgroen-40);
137
+ }
138
+ .login .dso-tertiary.download:not([disabled]):hover::after, .login .dso-tertiary.download:not([disabled]):active::after,
139
+ .logout .dso-tertiary.download:not([disabled]):hover::after,
140
+ .logout .dso-tertiary.download:not([disabled]):active::after {
141
+ --dso-icon: var(--di-download-scampi);
142
+ }
143
+ .login .dso-tertiary.extern::after,
144
+ .logout .dso-tertiary.extern::after {
145
+ background: var(--dso-icon, var(--di-external-link)) no-repeat;
146
+ background-position: center;
147
+ background-size: cover;
148
+ height: 24px;
149
+ vertical-align: top;
150
+ width: 24px;
151
+ }
152
+ .login .dso-tertiary.extern[disabled]::after,
153
+ .logout .dso-tertiary.extern[disabled]::after {
154
+ --dso-icon: var(--di-external-link-grasgroen-40);
155
+ }
156
+ .login .dso-tertiary.extern:not([disabled]):hover::after, .login .dso-tertiary.extern:not([disabled]):active::after,
157
+ .logout .dso-tertiary.extern:not([disabled]):hover::after,
158
+ .logout .dso-tertiary.extern:not([disabled]):active::after {
159
+ --dso-icon: var(--di-external-link-scampi);
160
+ }
161
+ .login .dso-tertiary.dso-spinner-left::before,
162
+ .logout .dso-tertiary.dso-spinner-left::before {
163
+ background-image: url("data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %2339870c; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E");
164
+ background-repeat: no-repeat;
165
+ content: "";
166
+ display: inline-block;
167
+ height: 24px;
168
+ vertical-align: middle;
169
+ width: 24px;
170
+ margin-right: 8px;
171
+ }
172
+ .login .dso-tertiary.dso-spinner-right::after,
173
+ .logout .dso-tertiary.dso-spinner-right::after {
174
+ background-image: url("data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %2339870c; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E");
175
+ background-repeat: no-repeat;
176
+ content: "";
177
+ display: inline-block;
178
+ height: 24px;
179
+ vertical-align: middle;
180
+ width: 24px;
181
+ margin-left: 8px;
182
+ }
183
+ .login .dso-tertiary dso-icon + span:not(.sr-only),
184
+ .login .dso-tertiary svg.di + span:not(.sr-only),
185
+ .login .dso-tertiary span:not(.sr-only) + dso-icon,
186
+ .login .dso-tertiary span:not(.sr-only) + svg.di,
187
+ .logout .dso-tertiary dso-icon + span:not(.sr-only),
188
+ .logout .dso-tertiary svg.di + span:not(.sr-only),
189
+ .logout .dso-tertiary span:not(.sr-only) + dso-icon,
190
+ .logout .dso-tertiary span:not(.sr-only) + svg.di {
191
+ margin-left: 8px;
192
+ }
193
+ .login .dso-tertiary dso-icon,
194
+ .login .dso-tertiary svg.di,
195
+ .login .dso-tertiary span,
196
+ .logout .dso-tertiary dso-icon,
197
+ .logout .dso-tertiary svg.di,
198
+ .logout .dso-tertiary span {
199
+ vertical-align: middle;
200
+ }
55
201
 
56
202
  .profile a,
57
203
  .logout a,