@nyaruka/temba-components 0.26.1 → 0.26.4

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 (90) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/demo/index.html +32 -13
  3. package/dist/3f6be8fc.js +4296 -0
  4. package/dist/index.js +304 -208
  5. package/dist/sw.js +1 -1
  6. package/dist/sw.js.map +1 -1
  7. package/dist/templates/components-body.html +1 -1
  8. package/dist/templates/components-head.html +1 -1
  9. package/out-tsc/src/contacts/ContactChat.js +99 -85
  10. package/out-tsc/src/contacts/ContactChat.js.map +1 -1
  11. package/out-tsc/src/contacts/ContactHistory.js +30 -36
  12. package/out-tsc/src/contacts/ContactHistory.js.map +1 -1
  13. package/out-tsc/src/contacts/events.js +61 -74
  14. package/out-tsc/src/contacts/events.js.map +1 -1
  15. package/out-tsc/src/list/TembaMenu.js +63 -22
  16. package/out-tsc/src/list/TembaMenu.js.map +1 -1
  17. package/out-tsc/src/tabpane/Tab.js +46 -0
  18. package/out-tsc/src/tabpane/Tab.js.map +1 -0
  19. package/out-tsc/src/tabpane/TabPane.js +109 -0
  20. package/out-tsc/src/tabpane/TabPane.js.map +1 -0
  21. package/out-tsc/temba-modules.js +4 -0
  22. package/out-tsc/temba-modules.js.map +1 -1
  23. package/out-tsc/test/temba-contact-history.test.js +9 -7
  24. package/out-tsc/test/temba-contact-history.test.js.map +1 -1
  25. package/package.json +1 -1
  26. package/screenshots/truth/alert/error.png +0 -0
  27. package/screenshots/truth/alert/info.png +0 -0
  28. package/screenshots/truth/alert/warning.png +0 -0
  29. package/screenshots/truth/checkbox/checked.png +0 -0
  30. package/screenshots/truth/checkbox/default.png +0 -0
  31. package/screenshots/truth/contacts/history-expanded.png +0 -0
  32. package/screenshots/truth/contacts/history.png +0 -0
  33. package/screenshots/truth/counter/summary.png +0 -0
  34. package/screenshots/truth/counter/text.png +0 -0
  35. package/screenshots/truth/counter/unicode-variables.png +0 -0
  36. package/screenshots/truth/counter/unicode.png +0 -0
  37. package/screenshots/truth/counter/variable.png +0 -0
  38. package/screenshots/truth/dialog/focused.png +0 -0
  39. package/screenshots/truth/list/items-selected.png +0 -0
  40. package/screenshots/truth/list/items-updated.png +0 -0
  41. package/screenshots/truth/list/items.png +0 -0
  42. package/screenshots/truth/list/menu-submenu.png +0 -0
  43. package/screenshots/truth/modax/form.png +0 -0
  44. package/screenshots/truth/modax/simple.png +0 -0
  45. package/screenshots/truth/options/block.png +0 -0
  46. package/screenshots/truth/select/disabled-multi-selection.png +0 -0
  47. package/screenshots/truth/select/disabled-selection.png +0 -0
  48. package/screenshots/truth/select/disabled.png +0 -0
  49. package/screenshots/truth/select/embedded.png +0 -0
  50. package/screenshots/truth/select/expression-selected.png +0 -0
  51. package/screenshots/truth/select/expressions.png +0 -0
  52. package/screenshots/truth/select/functions.png +0 -0
  53. package/screenshots/truth/select/local-options.png +0 -0
  54. package/screenshots/truth/select/remote-options.png +0 -0
  55. package/screenshots/truth/select/search-enabled.png +0 -0
  56. package/screenshots/truth/select/search-multi-no-matches.png +0 -0
  57. package/screenshots/truth/select/search-selected-focus.png +0 -0
  58. package/screenshots/truth/select/search-selected.png +0 -0
  59. package/screenshots/truth/select/search-with-selected.png +0 -0
  60. package/screenshots/truth/select/searching.png +0 -0
  61. package/screenshots/truth/select/selected-multi.png +0 -0
  62. package/screenshots/truth/select/selected-single.png +0 -0
  63. package/screenshots/truth/select/selection-clearable.png +0 -0
  64. package/screenshots/truth/select/with-placeholder.png +0 -0
  65. package/screenshots/truth/select/without-placeholder.png +0 -0
  66. package/screenshots/truth/textinput/date-form.png +0 -0
  67. package/screenshots/truth/textinput/date-initialized.png +0 -0
  68. package/screenshots/truth/textinput/input-disabled.png +0 -0
  69. package/screenshots/truth/textinput/input-focused.png +0 -0
  70. package/screenshots/truth/textinput/input-form.png +0 -0
  71. package/screenshots/truth/textinput/input-inserted.png +0 -0
  72. package/screenshots/truth/textinput/input-placeholder.png +0 -0
  73. package/screenshots/truth/textinput/input-updated.png +0 -0
  74. package/screenshots/truth/textinput/input.png +0 -0
  75. package/screenshots/truth/textinput/textarea-focused.png +0 -0
  76. package/screenshots/truth/textinput/textarea.png +0 -0
  77. package/screenshots/truth/tip/bottom.png +0 -0
  78. package/screenshots/truth/tip/left.png +0 -0
  79. package/screenshots/truth/tip/right.png +0 -0
  80. package/screenshots/truth/tip/top.png +0 -0
  81. package/src/contacts/ContactChat.ts +113 -94
  82. package/src/contacts/ContactHistory.ts +57 -59
  83. package/src/contacts/events.ts +61 -75
  84. package/src/list/TembaMenu.ts +67 -23
  85. package/src/tabpane/Tab.ts +42 -0
  86. package/src/tabpane/TabPane.ts +113 -0
  87. package/temba-modules.ts +4 -0
  88. package/test/temba-contact-history.test.ts +9 -7
  89. package/test-assets/style.css +7 -1
  90. package/dist/e477aebd.js +0 -4200
package/CHANGELOG.md CHANGED
@@ -4,6 +4,28 @@ All notable changes to this project will be documented in this file. Dates are d
4
4
 
5
5
  Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
6
6
 
7
+ #### [v0.26.4](https://github.com/nyaruka/temba-components/compare/v0.26.3...v0.26.4)
8
+
9
+ > 26 April 2022
10
+
11
+ - Fix inline menus with no items [`#165`](https://github.com/nyaruka/temba-components/pull/165)
12
+ - Switch test font [`9fe1ffd`](https://github.com/nyaruka/temba-components/commit/9fe1ffd67be69c42e931e87e3e06e1c402e992fa)
13
+
14
+ #### [v0.26.3](https://github.com/nyaruka/temba-components/compare/v0.26.2...v0.26.3)
15
+
16
+ > 22 April 2022
17
+
18
+ - Add bubble support for menu items [`#164`](https://github.com/nyaruka/temba-components/pull/164)
19
+
20
+ #### [v0.26.2](https://github.com/nyaruka/temba-components/compare/v0.26.1...v0.26.2)
21
+
22
+ > 21 April 2022
23
+
24
+ - Tabbed pane [`#162`](https://github.com/nyaruka/temba-components/pull/162)
25
+ - Update history and fix tests that weren't scrolling [`e6f2baf`](https://github.com/nyaruka/temba-components/commit/e6f2bafe4186aa263a91c12159d54ab54f4d7cc5)
26
+ - Fix menu parent clicks, shrink menu fonts [`0bd7c7e`](https://github.com/nyaruka/temba-components/commit/0bd7c7ec95823ac74363b3fa05a1e62f13022e06)
27
+ - Tighten up menu buttons [`a2d766d`](https://github.com/nyaruka/temba-components/commit/a2d766d2bde1b5049a28227a996f77a28d8dc8dc)
28
+
7
29
  #### [v0.26.1](https://github.com/nyaruka/temba-components/compare/v0.26.0...v0.26.1)
8
30
 
9
31
  > 11 April 2022
package/demo/index.html CHANGED
@@ -14,11 +14,19 @@
14
14
  />
15
15
 
16
16
  <style>
17
+
18
+ .linked {
19
+ text-decoration: underline;
20
+ color: blue;
21
+ cursor: pointer;
22
+ }
23
+
17
24
  .example {
18
25
  border: 0px solid gray;
19
26
  padding: 10px;
20
27
  max-width: 500px;
21
28
  --temba-select-selected-font-size: 1em;
29
+ display:none;
22
30
  }
23
31
 
24
32
  temba-dropdown.open {
@@ -35,6 +43,14 @@
35
43
  background: rgba(0,0,0,.3);
36
44
  }
37
45
 
46
+ temba-tabs *, temba-tab * {
47
+ opacity: 0;
48
+ }
49
+
50
+ temba-tabs:defined *, temba-tab:defined * {
51
+ opacity: 1;
52
+ }
53
+
38
54
  </style>
39
55
  <script type="module">
40
56
  import '../out-tsc/temba-modules.js';
@@ -60,20 +76,23 @@
60
76
  groups="/static/api/groups.json"
61
77
  ></temba-store>
62
78
 
63
- <div style="margin: 10px; background: #777; border-radius: 6px; overflow: hidden;">
64
- <div style="display: flex; flex-direction: row; --icon-color: #fff;">
65
- <div style="flex-grow: 1"></div>
66
- <temba-dropdown style="display:flex; align-items: center; height: 100%" arrowOffset="-10" offsetX="0" offsetY="4" arrowSize="10">
67
- <div slot="toggle" class="more">
68
- <temba-icon name="menu" size="2"></temba-icon>
69
- </div>
70
- <div slot="dropdown" style="width:150px; padding:0.5em 1em">
71
- <a href="http://google.com">Google</a>
72
- </div>
73
- </temba-dropdown>
74
- </div>
75
- </div>
79
+ <temba-tabs>
80
+
81
+ <temba-tab name="Chats" icon="message-square">
82
+ Chat content
83
+ </temba-tab>
84
+
85
+ <temba-tab name="Details" icon="list">
86
+ Details content
87
+ </temba-tab>
88
+
89
+ <temba-tab name="Log" icon="log">
90
+ Log content
91
+ </temba-tab>
92
+
93
+ </temba-tabs>
76
94
 
95
+
77
96
  <div class="example" style="margin: 10px; background: #ccc; border-radius:6px;">
78
97
  <temba-dropdown>
79
98
  <div style="display:inline-block" slot="toggle">