@shoper/phoenix_design_system 1.17.5-0 → 1.17.6-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 (64) hide show
  1. package/build/cjs/packages/phoenix/src/components/color_swatches/color_swatches.js +27 -13
  2. package/build/cjs/packages/phoenix/src/components/color_swatches/color_swatches.js.map +1 -1
  3. package/build/cjs/packages/phoenix/src/components/color_swatches/color_swatches_constants.js +1 -3
  4. package/build/cjs/packages/phoenix/src/components/color_swatches/color_swatches_constants.js.map +1 -1
  5. package/build/cjs/packages/phoenix/src/components/messages/base_message.js +1 -54
  6. package/build/cjs/packages/phoenix/src/components/messages/base_message.js.map +1 -1
  7. package/build/cjs/packages/phoenix/src/components/messages/base_message_constants.js +1 -6
  8. package/build/cjs/packages/phoenix/src/components/messages/base_message_constants.js.map +1 -1
  9. package/build/cjs/packages/phoenix/src/components/messages/hints/hint.js +10 -0
  10. package/build/cjs/packages/phoenix/src/components/messages/hints/hint.js.map +1 -1
  11. package/build/cjs/packages/phoenix/src/components/messages/tooltips/tooltip.js +10 -0
  12. package/build/cjs/packages/phoenix/src/components/messages/tooltips/tooltip.js.map +1 -1
  13. package/build/cjs/packages/phoenix/src/components/portal/portal_constants.js +0 -2
  14. package/build/cjs/packages/phoenix/src/components/portal/portal_constants.js.map +1 -1
  15. package/build/cjs/packages/phoenix/src/components/show-more/show_more.js +117 -0
  16. package/build/cjs/packages/phoenix/src/components/show-more/show_more.js.map +1 -0
  17. package/build/cjs/packages/phoenix/src/components/show-more/show_more_button.js +29 -0
  18. package/build/cjs/packages/phoenix/src/components/show-more/show_more_button.js.map +1 -0
  19. package/build/cjs/packages/phoenix/src/components/show-more/show_more_constants.js +17 -0
  20. package/build/cjs/packages/phoenix/src/components/show-more/show_more_constants.js.map +1 -0
  21. package/build/cjs/packages/phoenix/src/components/tabs/tab_panel.js +8 -0
  22. package/build/cjs/packages/phoenix/src/components/tabs/tab_panel.js.map +1 -1
  23. package/build/cjs/packages/phoenix/src/components/tabs/tabs.js +5 -10
  24. package/build/cjs/packages/phoenix/src/components/tabs/tabs.js.map +1 -1
  25. package/build/cjs/packages/phoenix/src/index.js +14 -0
  26. package/build/cjs/packages/phoenix/src/index.js.map +1 -1
  27. package/build/esm/packages/phoenix/src/components/color_swatches/color_swatches.d.ts +2 -1
  28. package/build/esm/packages/phoenix/src/components/color_swatches/color_swatches.js +28 -14
  29. package/build/esm/packages/phoenix/src/components/color_swatches/color_swatches.js.map +1 -1
  30. package/build/esm/packages/phoenix/src/components/color_swatches/color_swatches_constants.d.ts +0 -1
  31. package/build/esm/packages/phoenix/src/components/color_swatches/color_swatches_constants.js +2 -3
  32. package/build/esm/packages/phoenix/src/components/color_swatches/color_swatches_constants.js.map +1 -1
  33. package/build/esm/packages/phoenix/src/components/messages/base_message.d.ts +0 -10
  34. package/build/esm/packages/phoenix/src/components/messages/base_message.js +3 -56
  35. package/build/esm/packages/phoenix/src/components/messages/base_message.js.map +1 -1
  36. package/build/esm/packages/phoenix/src/components/messages/base_message_constants.d.ts +0 -2
  37. package/build/esm/packages/phoenix/src/components/messages/base_message_constants.js +2 -5
  38. package/build/esm/packages/phoenix/src/components/messages/base_message_constants.js.map +1 -1
  39. package/build/esm/packages/phoenix/src/components/messages/hints/hint.d.ts +2 -0
  40. package/build/esm/packages/phoenix/src/components/messages/hints/hint.js +10 -0
  41. package/build/esm/packages/phoenix/src/components/messages/hints/hint.js.map +1 -1
  42. package/build/esm/packages/phoenix/src/components/messages/tooltips/tooltip.d.ts +2 -0
  43. package/build/esm/packages/phoenix/src/components/messages/tooltips/tooltip.js +10 -0
  44. package/build/esm/packages/phoenix/src/components/messages/tooltips/tooltip.js.map +1 -1
  45. package/build/esm/packages/phoenix/src/components/portal/portal_constants.js +1 -2
  46. package/build/esm/packages/phoenix/src/components/portal/portal_constants.js.map +1 -1
  47. package/build/esm/packages/phoenix/src/components/show-more/show_more.d.ts +21 -0
  48. package/build/esm/packages/phoenix/src/components/show-more/show_more.js +115 -0
  49. package/build/esm/packages/phoenix/src/components/show-more/show_more.js.map +1 -0
  50. package/build/esm/packages/phoenix/src/components/show-more/show_more_button.d.ts +7 -0
  51. package/build/esm/packages/phoenix/src/components/show-more/show_more_button.js +27 -0
  52. package/build/esm/packages/phoenix/src/components/show-more/show_more_button.js.map +1 -0
  53. package/build/esm/packages/phoenix/src/components/show-more/show_more_constants.d.ts +8 -0
  54. package/build/esm/packages/phoenix/src/components/show-more/show_more_constants.js +11 -0
  55. package/build/esm/packages/phoenix/src/components/show-more/show_more_constants.js.map +1 -0
  56. package/build/esm/packages/phoenix/src/components/tabs/tab_panel.d.ts +1 -0
  57. package/build/esm/packages/phoenix/src/components/tabs/tab_panel.js +8 -0
  58. package/build/esm/packages/phoenix/src/components/tabs/tab_panel.js.map +1 -1
  59. package/build/esm/packages/phoenix/src/components/tabs/tabs.js +5 -10
  60. package/build/esm/packages/phoenix/src/components/tabs/tabs.js.map +1 -1
  61. package/build/esm/packages/phoenix/src/index.d.ts +2 -0
  62. package/build/esm/packages/phoenix/src/index.js +2 -0
  63. package/build/esm/packages/phoenix/src/index.js.map +1 -1
  64. package/package.json +5 -5
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -3,6 +3,7 @@ import { PhoenixLightLitElement } from "../../core/phoenix_light_lit_element/pho
3
3
  import { TemplateResult } from 'lit-html';
4
4
  export declare class HColorSwatches extends PhoenixLightLitElement {
5
5
  multiple: boolean;
6
+ devVisualSubcategories: boolean;
6
7
  numberOfVisibleColors: number;
7
8
  selectedColors: HColorItem[];
8
9
  showMoreBtnText: string;
@@ -33,5 +34,5 @@ export declare class HColorSwatches extends PhoenixLightLitElement {
33
34
  private _removeExistingColorFromArray;
34
35
  private _dispatchColorChangeEvent;
35
36
  disconnectedCallback(): void;
36
- protected render(): TemplateResult;
37
+ protected render(): TemplateResult | void;
37
38
  }
@@ -6,13 +6,15 @@ import { PhoenixLightLitElement } from '../../core/phoenix_light_lit_element/pho
6
6
  import { phoenixCustomElement } from '../../core/decorators/phoenix_custom_element.js';
7
7
  import { KeystrokesController } from '../../controllers/keystrokes_controller/keystrokes_controller.js';
8
8
  import 'lit-html';
9
- import { COLOR_SWATCHES_EVENT_NAMES, COLOR_ITEM_TAG_NAME, COLOR_SWATCHES_CSS_CLASSES, COLOR_SWATCHES_HIDDEN_ATTRIBUTE } from './color_swatches_constants.js';
9
+ import { COLOR_SWATCHES_EVENT_NAMES, COLOR_ITEM_TAG_NAME, COLOR_SWATCHES_CSS_CLASSES } from './color_swatches_constants.js';
10
10
  import { COLOR_ITEM_SELECTED_ATTRIBUTE } from './color_item/color_item_constants.js';
11
+ import { HColorItem } from './color_item/color_item.js';
11
12
 
12
13
  let HColorSwatches = class HColorSwatches extends PhoenixLightLitElement {
13
14
  constructor() {
14
15
  super(...arguments);
15
16
  this.multiple = false;
17
+ this.devVisualSubcategories = false;
16
18
  this.selectedColors = [];
17
19
  this.showMoreBtnText = 'Pokaż wszystkie kolory';
18
20
  this._setupEvents = () => {
@@ -136,8 +138,10 @@ let HColorSwatches = class HColorSwatches extends PhoenixLightLitElement {
136
138
  this._$colorSwatchesChildren = [...this.children];
137
139
  this._setupEvents();
138
140
  this._addCssClasses();
139
- this.numberOfVisibleColors && this._hideItems(this.numberOfVisibleColors);
140
- this._showAllItemsEvent();
141
+ if (!this.devVisualSubcategories) {
142
+ this.numberOfVisibleColors && this._hideItems(this.numberOfVisibleColors);
143
+ this._showAllItemsEvent();
144
+ }
141
145
  this.selectedColors = [...this.querySelectorAll('h-color-item[selected]')];
142
146
  this._$colors = [...this.querySelectorAll('h-color-item')];
143
147
  }
@@ -150,7 +154,7 @@ let HColorSwatches = class HColorSwatches extends PhoenixLightLitElement {
150
154
  return;
151
155
  this._$colorSwatchesChildren.forEach(($colorSwatchesChild, index) => {
152
156
  if (index > numberOfVisibleColors - 1) {
153
- $colorSwatchesChild.setAttribute(COLOR_SWATCHES_HIDDEN_ATTRIBUTE, '');
157
+ $colorSwatchesChild.setAttribute('hidden', '');
154
158
  }
155
159
  });
156
160
  }
@@ -160,9 +164,9 @@ let HColorSwatches = class HColorSwatches extends PhoenixLightLitElement {
160
164
  if (!this._$colorSwatchesChildren)
161
165
  return;
162
166
  this._$colorSwatchesChildren.forEach(($colorSwatchesChild) => {
163
- $colorSwatchesChild.removeAttribute(COLOR_SWATCHES_HIDDEN_ATTRIBUTE);
167
+ $colorSwatchesChild.removeAttribute('hidden');
164
168
  });
165
- (_a = this.querySelector('h-color-swatches-show-more')) === null || _a === void 0 ? void 0 : _a.setAttribute(COLOR_SWATCHES_HIDDEN_ATTRIBUTE, '');
169
+ (_a = this.querySelector('h-color-swatches-show-more')) === null || _a === void 0 ? void 0 : _a.setAttribute('hidden', '');
166
170
  });
167
171
  }
168
172
  _handleChangeToNextColorItem({ target }) {
@@ -176,7 +180,9 @@ let HColorSwatches = class HColorSwatches extends PhoenixLightLitElement {
176
180
  $nextColorItem = $nextFocusableElement;
177
181
  }
178
182
  $nextColorItem.focus();
179
- this._handleColorChange($nextColorItem);
183
+ if ($nextColorItem instanceof HColorItem) {
184
+ this._handleColorChange($nextColorItem);
185
+ }
180
186
  }
181
187
  _handleChangeToPreviousColorItem({ target }) {
182
188
  const $colorItem = target;
@@ -189,7 +195,9 @@ let HColorSwatches = class HColorSwatches extends PhoenixLightLitElement {
189
195
  $previousColorItem = $previousFocusableElement;
190
196
  }
191
197
  $previousColorItem.focus();
192
- this._handleColorChange($previousColorItem);
198
+ if ($previousColorItem instanceof HColorItem) {
199
+ this._handleColorChange($previousColorItem);
200
+ }
193
201
  }
194
202
  _toggleColorItem($colorItem) {
195
203
  this.multiple ? this._handleColorClickedForMultipleMode($colorItem) : this._handleColorChangeForSingleMode($colorItem);
@@ -227,18 +235,24 @@ let HColorSwatches = class HColorSwatches extends PhoenixLightLitElement {
227
235
  document.body.removeEventListener('keydown', this._focusOnSelectedColor);
228
236
  }
229
237
  render() {
230
- return html `
231
- ${this.getSlot('default')}
232
- ${this._$colors.length > this.numberOfVisibleColors
233
- ? html `<h-color-swatches-show-more>${this.showMoreBtnText}</h-color-swatches-show-more>`
234
- : nothing}
235
- `;
238
+ if (!this.devVisualSubcategories) {
239
+ return html `
240
+ ${this.getSlot('default')}
241
+ ${this._$colors.length > this.numberOfVisibleColors
242
+ ? html `<h-color-swatches-show-more>${this.showMoreBtnText}</h-color-swatches-show-more>`
243
+ : nothing}
244
+ `;
245
+ }
236
246
  }
237
247
  };
238
248
  __decorate([
239
249
  property({ type: Boolean }),
240
250
  __metadata("design:type", Boolean)
241
251
  ], HColorSwatches.prototype, "multiple", void 0);
252
+ __decorate([
253
+ property({ type: Boolean, attribute: 'dev-visual-subcategories' }),
254
+ __metadata("design:type", Boolean)
255
+ ], HColorSwatches.prototype, "devVisualSubcategories", void 0);
242
256
  __decorate([
243
257
  property({ type: Number, attribute: 'number-of-visible-colors' }),
244
258
  __metadata("design:type", Number)
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,4CAAgD;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,4CAAgD;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -9,4 +9,3 @@ export declare const COLOR_SWATCHES_EVENT_NAMES: {
9
9
  readonly markDisabledItems: "markDisabledItems";
10
10
  readonly showMore: "showMore";
11
11
  };
12
- export declare const COLOR_SWATCHES_HIDDEN_ATTRIBUTE = "hidden";
@@ -8,8 +8,7 @@ const COLOR_SWATCHES_EVENT_NAMES = {
8
8
  change: 'change',
9
9
  markDisabledItems: 'markDisabledItems',
10
10
  showMore: 'showMore'
11
- };
12
- const COLOR_SWATCHES_HIDDEN_ATTRIBUTE = 'hidden';
11
+ };
13
12
 
14
- export { COLOR_ITEM_TAG_NAME, COLOR_SWATCHES_CSS_CLASSES, COLOR_SWATCHES_EVENT_NAMES, COLOR_SWATCHES_HIDDEN_ATTRIBUTE };
13
+ export { COLOR_ITEM_TAG_NAME, COLOR_SWATCHES_CSS_CLASSES, COLOR_SWATCHES_EVENT_NAMES };
15
14
  //# sourceMappingURL=color_swatches_constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -1,7 +1,6 @@
1
1
  import { IBaseMessage } from './base_message_types';
2
2
  import { PhoenixLightLitElement } from "../../core/phoenix_light_lit_element/phoenix_light_lit_element";
3
3
  import type { TDirection } from '@dreamcommerce/utilities';
4
- import { PropertyValues, TemplateResult } from 'lit';
5
4
  export declare class BaseMessage extends PhoenixLightLitElement implements IBaseMessage {
6
5
  opened: boolean;
7
6
  portalTarget: string;
@@ -9,8 +8,6 @@ export declare class BaseMessage extends PhoenixLightLitElement implements IBase
9
8
  offset: number;
10
9
  mouseonly: boolean;
11
10
  tabindex: string;
12
- useAsLabel: boolean;
13
- private _messageId;
14
11
  private _positionController;
15
12
  private _clickOutsideController;
16
13
  private _$messageContent;
@@ -19,18 +16,11 @@ export declare class BaseMessage extends PhoenixLightLitElement implements IBase
19
16
  private _shouldDelayClosing;
20
17
  private _closeTimeout;
21
18
  private _messageComponentName;
22
- private _$baseMessageContent?;
23
- private _tooltipRef;
24
19
  constructor();
25
20
  connectedCallback(messageComponentName?: string): void;
26
- firstUpdated(props: PropertyValues): void;
27
- private _handleChildrenAriaAttributes;
28
21
  private static _appendMessagePortal;
29
22
  private _setupEventListeners;
30
23
  protected _positionMessage: () => void;
31
24
  open: () => void;
32
- private _closeFromKeyboard;
33
25
  close: () => void;
34
- disconnectedCallback(): void;
35
- protected render(): TemplateResult;
36
26
  }
@@ -1,14 +1,11 @@
1
1
  import { __decorate, __metadata } from '../../../../../external/tslib/tslib.es6.js';
2
- import { html } from 'lit';
3
2
  import { property } from 'lit/decorators';
4
- import { DIRECTIONS, DomUtils } from '@dreamcommerce/utilities';
3
+ import { DIRECTIONS } from '@dreamcommerce/utilities';
5
4
  import { PhoenixLightLitElement } from '../../core/phoenix_light_lit_element/phoenix_light_lit_element.js';
6
- import v4 from '../../../../../external/uuid/dist/esm-browser/v4.js';
7
5
  import { PORTAL_TARGET_COMPONENT_NAME, PORTAL_TARGET_NAME_PROP, PORTAL_TARGET_ATTRIBUTE_NAME } from '../portal/portal_constants.js';
8
6
  import { ClickOutsideController } from '../../controllers/click_outside_controller/click_outside_controller.js';
9
7
  import { RelativePositionController } from '../../controllers/relative_position_controller/relative_position_controller.js';
10
- import { DEFAULT_MESSAGE_PORTAL_NAME, DEFAULT_MESSAGE_OFFSET, LIST_OF_MESSAGE_CHILDREN, MESSAGE_SHOW_DELAY_IN_MS, MESSAGE_TIME_TO_DELAY_CLOSING_IN_MS, MESSAGE_REMOVED_CLASS_NAME, MESSAGE_CLOSE_DELAY_IN_MS, MESSAGE_CONTENT_ELEMENTS, SCREEN_READER_ONLY_CLASS_NAME, MESSAGE_CONTENT_SLOT_NAME } from './base_message_constants.js';
11
- import { createRef, ref } from 'lit/directives/ref';
8
+ import { DEFAULT_MESSAGE_PORTAL_NAME, DEFAULT_MESSAGE_OFFSET, MESSAGE_SHOW_DELAY_IN_MS, MESSAGE_TIME_TO_DELAY_CLOSING_IN_MS, MESSAGE_REMOVED_CLASS_NAME, MESSAGE_CLOSE_DELAY_IN_MS, MESSAGE_CONTENT_ELEMENTS } from './base_message_constants.js';
12
9
 
13
10
  class BaseMessage extends PhoenixLightLitElement {
14
11
  constructor() {
@@ -19,24 +16,9 @@ class BaseMessage extends PhoenixLightLitElement {
19
16
  this.offset = DEFAULT_MESSAGE_OFFSET;
20
17
  this.mouseonly = false;
21
18
  this.tabindex = '-1';
22
- this.useAsLabel = false;
23
- this._messageId = v4();
24
- this._tooltipRef = createRef();
25
- this._handleChildrenAriaAttributes = () => {
26
- [...this.children].forEach((child) => {
27
- if (LIST_OF_MESSAGE_CHILDREN.includes(child.tagName.toLowerCase()) || this._tooltipRef.value === child)
28
- return;
29
- const attributeName = this.useAsLabel ? 'aria-labelledby' : 'aria-describedby';
30
- child.setAttribute(attributeName, `${child.getAttribute(attributeName) || ''} ${this._messageId}`);
31
- });
32
- };
33
19
  this._setupEventListeners = () => {
34
- var _a, _b;
35
20
  this.addEventListener('mouseenter', this.open);
36
21
  this.addEventListener('mouseleave', this.close);
37
- this.addEventListener('keydown', this._closeFromKeyboard);
38
- (_a = this._$baseMessageContent) === null || _a === void 0 ? void 0 : _a.addEventListener('mouseenter', this.open);
39
- (_b = this._$baseMessageContent) === null || _b === void 0 ? void 0 : _b.addEventListener('mouseleave', this.close);
40
22
  if (!this.mouseonly) {
41
23
  this.addEventListener('focusin', this.open);
42
24
  this.addEventListener('focusout', this.close);
@@ -57,13 +39,6 @@ class BaseMessage extends PhoenixLightLitElement {
57
39
  this.opened = true;
58
40
  }, MESSAGE_SHOW_DELAY_IN_MS);
59
41
  };
60
- this._closeFromKeyboard = (ev) => {
61
- if (ev.key !== 'Escape' || !this.opened)
62
- return;
63
- ev.preventDefault();
64
- ev.stopPropagation();
65
- this.close();
66
- };
67
42
  this.close = () => {
68
43
  this._shouldDelayClosing = Date.now() - this._tooltipOpenTime > MESSAGE_TIME_TO_DELAY_CLOSING_IN_MS;
69
44
  clearTimeout(this._openTimeout);
@@ -104,14 +79,8 @@ class BaseMessage extends PhoenixLightLitElement {
104
79
  offset: this.offset
105
80
  });
106
81
  this.setAttribute('tabindex', this.tabindex);
107
- if (!this._$baseMessageContent)
108
- this._$baseMessageContent = [...this.children].find((child) => MESSAGE_CONTENT_ELEMENTS.includes(child.tagName.toLowerCase()));
109
82
  this._setupEventListeners();
110
83
  }
111
- firstUpdated(props) {
112
- super.firstUpdated(props);
113
- this._handleChildrenAriaAttributes();
114
- }
115
84
  static _appendMessagePortal() {
116
85
  const $messagePortalTarget = document.querySelector(`[name="${DEFAULT_MESSAGE_PORTAL_NAME}"]`);
117
86
  if ($messagePortalTarget)
@@ -120,24 +89,6 @@ class BaseMessage extends PhoenixLightLitElement {
120
89
  $portalTarget.setAttribute(PORTAL_TARGET_NAME_PROP, DEFAULT_MESSAGE_PORTAL_NAME);
121
90
  document.body.appendChild($portalTarget);
122
91
  }
123
- disconnectedCallback() {
124
- var _a, _b;
125
- super.disconnectedCallback();
126
- (_a = this._$baseMessageContent) === null || _a === void 0 ? void 0 : _a.removeEventListener('mouseenter', this.open);
127
- (_b = this._$baseMessageContent) === null || _b === void 0 ? void 0 : _b.removeEventListener('mouseleave', this.close);
128
- }
129
- render() {
130
- var _a;
131
- super.render();
132
- return html `
133
- <span ${ref(this._tooltipRef)} id="${this._messageId}" class="${SCREEN_READER_ONLY_CLASS_NAME}" role="tooltip">
134
- ${DomUtils.stripHTMLTags(((_a = this._$baseMessageContent) === null || _a === void 0 ? void 0 : _a.innerHTML) || '')}
135
- </span>
136
- <h-portal ?disabled="${!this.opened}" @open="${this._positionMessage}" to="${this.portalTarget}" hidden>
137
- ${this.getSlot(MESSAGE_CONTENT_SLOT_NAME)}
138
- </h-portal>
139
- `;
140
- }
141
92
  }
142
93
  __decorate([
143
94
  property({ type: Boolean, reflect: true }),
@@ -162,11 +113,7 @@ __decorate([
162
113
  __decorate([
163
114
  property({ type: String }),
164
115
  __metadata("design:type", String)
165
- ], BaseMessage.prototype, "tabindex", void 0);
166
- __decorate([
167
- property({ type: Boolean, attribute: 'use-as-label' }),
168
- __metadata("design:type", Boolean)
169
- ], BaseMessage.prototype, "useAsLabel", void 0);
116
+ ], BaseMessage.prototype, "tabindex", void 0);
170
117
 
171
118
  export { BaseMessage };
172
119
  //# sourceMappingURL=base_message.js.map
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,4CAAgD;AACvF;AACA;AACA;AACA;AACA,eAAe,qDAAyD;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,4CAAgD;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -4,8 +4,6 @@ export declare const MESSAGE_REMOVED_CLASS_NAME = "removed";
4
4
  export declare const DEFAULT_MESSAGE_OFFSET = 10;
5
5
  export declare const MESSAGE_ELEMENTS: string[];
6
6
  export declare const MESSAGE_CONTENT_ELEMENTS: string[];
7
- export declare const LIST_OF_MESSAGE_CHILDREN: string[];
8
7
  export declare const MESSAGE_SHOW_DELAY_IN_MS = 100;
9
8
  export declare const MESSAGE_TIME_TO_DELAY_CLOSING_IN_MS = 500;
10
9
  export declare const MESSAGE_CLOSE_DELAY_IN_MS = 500;
11
- export declare const SCREEN_READER_ONLY_CLASS_NAME = "sr-only";
@@ -1,4 +1,3 @@
1
- import { PORTAL_COMPONENT_NAME } from '../portal/portal_constants.js';
2
1
  import { HINT_CONTENT_ELEMENT_NAME } from './hints/hint_constants.js';
3
2
  import { TOOLTIP_CONTENT_ELEMENT_NAME } from './tooltips/tooltip_constants.js';
4
3
 
@@ -7,11 +6,9 @@ const MESSAGE_CONTENT_SLOT_NAME = 'message-content';
7
6
  const MESSAGE_REMOVED_CLASS_NAME = `removed`;
8
7
  const DEFAULT_MESSAGE_OFFSET = 10;
9
8
  const MESSAGE_CONTENT_ELEMENTS = [TOOLTIP_CONTENT_ELEMENT_NAME, HINT_CONTENT_ELEMENT_NAME];
10
- const LIST_OF_MESSAGE_CHILDREN = [...MESSAGE_CONTENT_ELEMENTS, PORTAL_COMPONENT_NAME];
11
9
  const MESSAGE_SHOW_DELAY_IN_MS = 100;
12
10
  const MESSAGE_TIME_TO_DELAY_CLOSING_IN_MS = 500;
13
- const MESSAGE_CLOSE_DELAY_IN_MS = 500;
14
- const SCREEN_READER_ONLY_CLASS_NAME = 'sr-only';
11
+ const MESSAGE_CLOSE_DELAY_IN_MS = 500;
15
12
 
16
- export { DEFAULT_MESSAGE_OFFSET, DEFAULT_MESSAGE_PORTAL_NAME, LIST_OF_MESSAGE_CHILDREN, MESSAGE_CLOSE_DELAY_IN_MS, MESSAGE_CONTENT_ELEMENTS, MESSAGE_CONTENT_SLOT_NAME, MESSAGE_REMOVED_CLASS_NAME, MESSAGE_SHOW_DELAY_IN_MS, MESSAGE_TIME_TO_DELAY_CLOSING_IN_MS, SCREEN_READER_ONLY_CLASS_NAME };
13
+ export { DEFAULT_MESSAGE_OFFSET, DEFAULT_MESSAGE_PORTAL_NAME, MESSAGE_CLOSE_DELAY_IN_MS, MESSAGE_CONTENT_ELEMENTS, MESSAGE_CONTENT_SLOT_NAME, MESSAGE_REMOVED_CLASS_NAME, MESSAGE_SHOW_DELAY_IN_MS, MESSAGE_TIME_TO_DELAY_CLOSING_IN_MS };
17
14
  //# sourceMappingURL=base_message_constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -1,5 +1,7 @@
1
+ import { TemplateResult } from 'lit-html';
1
2
  import { BaseMessage } from '../base_message';
2
3
  export declare class HHint extends BaseMessage {
3
4
  constructor();
4
5
  connectedCallback(): void;
6
+ protected render(): TemplateResult;
5
7
  }
@@ -1,6 +1,8 @@
1
1
  import { __decorate, __metadata } from '../../../../../../external/tslib/tslib.es6.js';
2
2
  import { phoenixCustomElement } from '../../../core/decorators/phoenix_custom_element.js';
3
+ import { html } from 'lit-html';
3
4
  import { HINT_DEFAULT_OFFSET, HINT_CLASS_NAME, HINT_ELEMENT_NAME } from './hint_constants.js';
5
+ import { MESSAGE_CONTENT_SLOT_NAME } from '../base_message_constants.js';
4
6
  import { BaseMessage } from '../base_message.js';
5
7
 
6
8
  let HHint = class HHint extends BaseMessage {
@@ -12,6 +14,14 @@ let HHint = class HHint extends BaseMessage {
12
14
  super.connectedCallback(HINT_CLASS_NAME);
13
15
  this.classList.add(HINT_CLASS_NAME);
14
16
  }
17
+ render() {
18
+ super.render();
19
+ return html `
20
+ <h-portal ?disabled="${!this.opened}" @open="${this._positionMessage}" to="${this.portalTarget}" hidden>
21
+ ${this.getSlot(MESSAGE_CONTENT_SLOT_NAME)}
22
+ </h-portal>
23
+ `;
24
+ }
15
25
  };
16
26
  HHint = __decorate([
17
27
  phoenixCustomElement(HINT_ELEMENT_NAME),
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -1,4 +1,6 @@
1
+ import { TemplateResult } from 'lit-html';
1
2
  import { BaseMessage } from '../base_message';
2
3
  export declare class HTooltip extends BaseMessage {
3
4
  connectedCallback(): void;
5
+ protected render(): TemplateResult;
4
6
  }
@@ -1,6 +1,8 @@
1
1
  import { __decorate } from '../../../../../../external/tslib/tslib.es6.js';
2
2
  import { phoenixCustomElement } from '../../../core/decorators/phoenix_custom_element.js';
3
+ import { html } from 'lit-html';
3
4
  import { TOOLTIP_CLASS_NAME, TOOLTIP_ELEMENT_NAME } from './tooltip_constants.js';
5
+ import { MESSAGE_CONTENT_SLOT_NAME } from '../base_message_constants.js';
4
6
  import { BaseMessage } from '../base_message.js';
5
7
 
6
8
  let HTooltip = class HTooltip extends BaseMessage {
@@ -8,6 +10,14 @@ let HTooltip = class HTooltip extends BaseMessage {
8
10
  super.connectedCallback(TOOLTIP_CLASS_NAME);
9
11
  this.classList.add(TOOLTIP_CLASS_NAME);
10
12
  }
13
+ render() {
14
+ super.render();
15
+ return html `
16
+ <h-portal ?disabled="${!this.opened}" @open="${this._positionMessage}" to="${this.portalTarget}" hidden>
17
+ ${this.getSlot(MESSAGE_CONTENT_SLOT_NAME)}
18
+ </h-portal>
19
+ `;
20
+ }
11
21
  };
12
22
  HTooltip = __decorate([
13
23
  phoenixCustomElement(TOOLTIP_ELEMENT_NAME)
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,2BAA2B,+CAAmD;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,2BAA2B,+CAAmD;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -3,9 +3,8 @@ const PORTAL_EVENTS = {
3
3
  close: 'close'
4
4
  };
5
5
  const PORTAL_TARGET_NAME_PROP = 'name';
6
- const PORTAL_COMPONENT_NAME = 'h-portal';
7
6
  const PORTAL_TARGET_COMPONENT_NAME = 'h-portal-target';
8
7
  const PORTAL_TARGET_ATTRIBUTE_NAME = 'portal-target';
9
8
 
10
- export { PORTAL_COMPONENT_NAME, PORTAL_EVENTS, PORTAL_TARGET_ATTRIBUTE_NAME, PORTAL_TARGET_COMPONENT_NAME, PORTAL_TARGET_NAME_PROP };
9
+ export { PORTAL_EVENTS, PORTAL_TARGET_ATTRIBUTE_NAME, PORTAL_TARGET_COMPONENT_NAME, PORTAL_TARGET_NAME_PROP };
11
10
  //# sourceMappingURL=portal_constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -0,0 +1,21 @@
1
+ import { PhoenixLightLitElement } from "../../core/phoenix_light_lit_element/phoenix_light_lit_element";
2
+ import { PropertyValues } from 'lit';
3
+ export declare class HShowMore extends PhoenixLightLitElement {
4
+ count: number;
5
+ mobileOnly: boolean;
6
+ showAll: boolean;
7
+ private _$showMoreButton;
8
+ private _$items;
9
+ connectedCallback(): void;
10
+ protected updated(_changedProperties: PropertyValues): void;
11
+ disconnectedCallback(): void;
12
+ private _updateComponentVisibility;
13
+ private _hideExcessItems;
14
+ private _showAllItems;
15
+ private _hideButton;
16
+ private _showButton;
17
+ private _setupListeners;
18
+ private _showMore;
19
+ private _focusNextItem;
20
+ private _onResize;
21
+ }
@@ -0,0 +1,115 @@
1
+ import { __decorate, __metadata } from '../../../../../external/tslib/tslib.es6.js';
2
+ import 'lit';
3
+ import { property } from 'lit/decorators';
4
+ import { UiDomUtils } from '@dreamcommerce/utilities';
5
+ import { PhoenixLightLitElement } from '../../core/phoenix_light_lit_element/phoenix_light_lit_element.js';
6
+ import { phoenixCustomElement } from '../../core/decorators/phoenix_custom_element.js';
7
+ import { BREAKPOINTS } from '../../global_constants.js';
8
+ import { DEFAULT_THROTTLE_WAIT_TIME } from '../../controllers/relative_position_controller/relative_position_controller_constants.js';
9
+ import throttle_1 from '../../../../../external/lodash/throttle.js';
10
+ import { SHOW_MORE_ITEM_ATTRIBUTE, SHOW_MORE_CSS_CLASSES, SHOW_MORE_EVENT_NAMES } from './show_more_constants.js';
11
+
12
+ let HShowMore = class HShowMore extends PhoenixLightLitElement {
13
+ constructor() {
14
+ super(...arguments);
15
+ this._$showMoreButton = null;
16
+ this._showMore = () => {
17
+ this._showAllItems();
18
+ this._hideButton();
19
+ this._focusNextItem();
20
+ };
21
+ this._onResize = throttle_1(() => {
22
+ if (window.innerWidth > BREAKPOINTS.xs) {
23
+ this._showAllItems();
24
+ this._hideButton();
25
+ window.removeEventListener('resize', this._onResize);
26
+ }
27
+ }, DEFAULT_THROTTLE_WAIT_TIME);
28
+ }
29
+ connectedCallback() {
30
+ super.connectedCallback();
31
+ this._$showMoreButton = this.querySelector('h-show-more-button');
32
+ this._$items = [...this.querySelectorAll(`[${SHOW_MORE_ITEM_ATTRIBUTE}]`)];
33
+ this.classList.add(SHOW_MORE_CSS_CLASSES.showMore);
34
+ this._updateComponentVisibility();
35
+ this._setupListeners();
36
+ }
37
+ updated(_changedProperties) {
38
+ super.updated(_changedProperties);
39
+ if (_changedProperties.has('showAll')) {
40
+ this._showAllItems();
41
+ this._hideButton();
42
+ }
43
+ }
44
+ disconnectedCallback() {
45
+ super.disconnectedCallback();
46
+ window.removeEventListener('resize', this._onResize);
47
+ }
48
+ _updateComponentVisibility() {
49
+ const hasOverflowItems = this._$items.length > this.count;
50
+ const isMobileView = window.innerWidth <= BREAKPOINTS.xs;
51
+ const shouldBeActive = (!this.mobileOnly || isMobileView) && hasOverflowItems;
52
+ if (shouldBeActive) {
53
+ this._hideExcessItems();
54
+ this._showButton();
55
+ }
56
+ else {
57
+ this._hideButton();
58
+ }
59
+ }
60
+ _hideExcessItems() {
61
+ this._$items.forEach(($item, index) => {
62
+ $item.removeAttribute('hidden');
63
+ if (index >= this.count)
64
+ $item.setAttribute('hidden', '');
65
+ });
66
+ }
67
+ _showAllItems() {
68
+ this._$items.forEach(($item) => $item.removeAttribute('hidden'));
69
+ }
70
+ _hideButton() {
71
+ var _a;
72
+ (_a = this._$showMoreButton) === null || _a === void 0 ? void 0 : _a.setAttribute('hidden', '');
73
+ }
74
+ _showButton() {
75
+ var _a;
76
+ (_a = this._$showMoreButton) === null || _a === void 0 ? void 0 : _a.removeAttribute('hidden');
77
+ }
78
+ _setupListeners() {
79
+ this.addEventListener(SHOW_MORE_EVENT_NAMES.showMore, this._showMore);
80
+ if (this.mobileOnly && window.innerWidth <= BREAKPOINTS.xs) {
81
+ window.addEventListener('resize', this._onResize);
82
+ }
83
+ }
84
+ _focusNextItem() {
85
+ const $nextItem = this._$items[this.count];
86
+ if (!$nextItem)
87
+ return;
88
+ const $firstFocusableElement = UiDomUtils.getFocusableElement($nextItem);
89
+ if ($firstFocusableElement) {
90
+ $firstFocusableElement.focus();
91
+ return;
92
+ }
93
+ if (!$nextItem.getAttribute('tabindex'))
94
+ $nextItem.setAttribute('tabindex', '-1');
95
+ $nextItem.focus();
96
+ }
97
+ };
98
+ __decorate([
99
+ property({ type: Number }),
100
+ __metadata("design:type", Number)
101
+ ], HShowMore.prototype, "count", void 0);
102
+ __decorate([
103
+ property({ type: Boolean, attribute: 'mobile-only' }),
104
+ __metadata("design:type", Boolean)
105
+ ], HShowMore.prototype, "mobileOnly", void 0);
106
+ __decorate([
107
+ property({ type: Boolean, attribute: 'show-all' }),
108
+ __metadata("design:type", Boolean)
109
+ ], HShowMore.prototype, "showAll", void 0);
110
+ HShowMore = __decorate([
111
+ phoenixCustomElement('h-show-more')
112
+ ], HShowMore);
113
+
114
+ export { HShowMore };
115
+ //# sourceMappingURL=show_more.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,4CAAgD;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,4CAAgD;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -0,0 +1,7 @@
1
+ import { PhoenixLightLitElement } from "../../core/phoenix_light_lit_element/phoenix_light_lit_element";
2
+ export declare class HShowMoreButton extends PhoenixLightLitElement {
3
+ private _btnController;
4
+ constructor();
5
+ connectedCallback(): void;
6
+ private _dispatchClickedEvent;
7
+ }
@@ -0,0 +1,27 @@
1
+ import { __decorate, __metadata } from '../../../../../external/tslib/tslib.es6.js';
2
+ import { PhoenixLightLitElement } from '../../core/phoenix_light_lit_element/phoenix_light_lit_element.js';
3
+ import { phoenixCustomElement } from '../../core/decorators/phoenix_custom_element.js';
4
+ import { BtnController } from '../../controllers/btn_controller/btn_controller.js';
5
+ import { SHOW_MORE_EVENT_NAMES, SHOW_MORE_CSS_CLASSES } from './show_more_constants.js';
6
+
7
+ let HShowMoreButton = class HShowMoreButton extends PhoenixLightLitElement {
8
+ constructor() {
9
+ super();
10
+ this._dispatchClickedEvent = () => {
11
+ this.emitCustomEvent(SHOW_MORE_EVENT_NAMES.showMore);
12
+ };
13
+ this._btnController = new BtnController(this, this._dispatchClickedEvent);
14
+ }
15
+ connectedCallback() {
16
+ super.connectedCallback();
17
+ this.addEventListener('click', this._dispatchClickedEvent);
18
+ this.classList.add(SHOW_MORE_CSS_CLASSES.showMoreButton);
19
+ }
20
+ };
21
+ HShowMoreButton = __decorate([
22
+ phoenixCustomElement('h-show-more-button'),
23
+ __metadata("design:paramtypes", [])
24
+ ], HShowMoreButton);
25
+
26
+ export { HShowMoreButton };
27
+ //# sourceMappingURL=show_more_button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,4CAAgD;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}