@nyaruka/temba-components 0.129.1 → 0.129.2

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 (75) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/demo/components/alert/example.html +71 -0
  3. package/demo/components/button/example.html +167 -0
  4. package/demo/{chart → components/chart}/example.html +3 -3
  5. package/demo/components/chart/horizontal-demo.html +160 -0
  6. package/demo/components/checkbox/example.html +68 -0
  7. package/demo/components/compose/example.html +69 -0
  8. package/demo/components/datepicker/example.html +3 -3
  9. package/demo/components/datepicker/range-picker-demo.html +2 -2
  10. package/demo/{dialog → components/dialog}/example.html +3 -3
  11. package/demo/components/dropdown/example.html +95 -0
  12. package/demo/{flow → components/flow}/example.html +1 -1
  13. package/demo/{misc → components/misc}/example.html +3 -3
  14. package/demo/components/progress/example.html +62 -0
  15. package/demo/components/select/drag-and-drop.html +162 -0
  16. package/demo/components/select/example.html +76 -0
  17. package/demo/components/select/multi.html +72 -0
  18. package/demo/components/slider/example.html +55 -0
  19. package/demo/{sortable-list → components/sortable-list}/example.html +3 -3
  20. package/demo/components/tabs/example.html +91 -0
  21. package/demo/{textinput → components/textinput}/completion.html +3 -3
  22. package/demo/components/textinput/example.html +141 -0
  23. package/demo/{webchat → components/webchat}/example.html +3 -3
  24. package/demo/index.html +21 -21
  25. package/demo/static/css/styles.css +253 -0
  26. package/demo/sticky-note-demo.html +88 -85
  27. package/demo/styles.css +24 -0
  28. package/dist/locales/es.js +5 -5
  29. package/dist/locales/es.js.map +1 -1
  30. package/dist/locales/fr.js +5 -5
  31. package/dist/locales/fr.js.map +1 -1
  32. package/dist/locales/locale-codes.js +2 -11
  33. package/dist/locales/locale-codes.js.map +1 -1
  34. package/dist/locales/pt.js +5 -5
  35. package/dist/locales/pt.js.map +1 -1
  36. package/dist/temba-components.js +2 -2
  37. package/dist/temba-components.js.map +1 -1
  38. package/out-tsc/src/chart/TembaChart.js +5 -1
  39. package/out-tsc/src/chart/TembaChart.js.map +1 -1
  40. package/out-tsc/src/datepicker/RangePicker.js +3 -2
  41. package/out-tsc/src/datepicker/RangePicker.js.map +1 -1
  42. package/out-tsc/src/locales/es.js +5 -5
  43. package/out-tsc/src/locales/es.js.map +1 -1
  44. package/out-tsc/src/locales/fr.js +5 -5
  45. package/out-tsc/src/locales/fr.js.map +1 -1
  46. package/out-tsc/src/locales/locale-codes.js +2 -11
  47. package/out-tsc/src/locales/locale-codes.js.map +1 -1
  48. package/out-tsc/src/locales/pt.js +5 -5
  49. package/out-tsc/src/locales/pt.js.map +1 -1
  50. package/package.json +1 -1
  51. package/screenshots/truth/datepicker/range-picker-all.png +0 -0
  52. package/screenshots/truth/datepicker/range-picker-button-states.png +0 -0
  53. package/screenshots/truth/datepicker/range-picker-default.png +0 -0
  54. package/screenshots/truth/datepicker/range-picker-editing-start.png +0 -0
  55. package/screenshots/truth/datepicker/range-picker-week.png +0 -0
  56. package/screenshots/truth/datepicker/range-picker-year.png +0 -0
  57. package/src/chart/TembaChart.ts +4 -1
  58. package/src/datepicker/RangePicker.ts +3 -2
  59. package/src/locales/es.ts +13 -18
  60. package/src/locales/fr.ts +13 -18
  61. package/src/locales/locale-codes.ts +2 -11
  62. package/src/locales/pt.ts +13 -18
  63. package/demo/alert/example.html +0 -65
  64. package/demo/button/example.html +0 -71
  65. package/demo/chart/horizontal-demo.html +0 -81
  66. package/demo/checkbox/example.html +0 -72
  67. package/demo/compose/example.html +0 -72
  68. package/demo/dropdown/example.html +0 -99
  69. package/demo/progress/example.html +0 -59
  70. package/demo/select/drag-and-drop.html +0 -142
  71. package/demo/select/example.html +0 -82
  72. package/demo/select/multi.html +0 -73
  73. package/demo/slider/example.html +0 -59
  74. package/demo/tabs/example.html +0 -91
  75. package/demo/textinput/example.html +0 -61
package/CHANGELOG.md CHANGED
@@ -4,8 +4,18 @@ 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.129.2](https://github.com/nyaruka/temba-components/compare/v0.129.1...v0.129.2)
8
+
9
+ - Add option for chart to not fetch until a window is provided [`#596`](https://github.com/nyaruka/temba-components/pull/596)
10
+ - Standardize component documentation structure and remove inline styles [`#595`](https://github.com/nyaruka/temba-components/pull/595)
11
+ - Fix demo links for styles and module import [`5c06b5a`](https://github.com/nyaruka/temba-components/commit/5c06b5a58118450d330d0a0370b0e0a5a3a40d58)
12
+ - Standardize sticky-note-demo.html and horizontal-demo.html documentation [`36ad3c1`](https://github.com/nyaruka/temba-components/commit/36ad3c14a23c4419a7f0ed32c613cdc53b3737a7)
13
+ - Move all component demos under demo/components directory [`dd2e778`](https://github.com/nyaruka/temba-components/commit/dd2e7787c9114912bc746bcb5fe2341db0ae2e0f)
14
+
7
15
  #### [v0.129.1](https://github.com/nyaruka/temba-components/compare/v0.129.0...v0.129.1)
8
16
 
17
+ > 25 June 2025
18
+
9
19
  - Fix formatting for range dates [`#590`](https://github.com/nyaruka/temba-components/pull/590)
10
20
 
11
21
  #### [v0.129.0](https://github.com/nyaruka/temba-components/compare/v0.128.0...v0.129.0)
@@ -0,0 +1,71 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en-GB">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <title>Alert Examples</title>
6
+ <link
7
+ href="/static/css/temba-components.css"
8
+ rel="stylesheet"
9
+ type="text/css"
10
+ />
11
+ <link
12
+ href="https://fonts.googleapis.com/css?family=Roboto+Mono:300|Roboto:300,400,500"
13
+ rel="stylesheet"
14
+ />
15
+ <link href="/demo/static/css/styles.css" rel="stylesheet" type="text/css" />
16
+ </head>
17
+ <body>
18
+ <h1>Alert Examples</h1>
19
+ <p><a href="/demo/index.html">← Back to main demo</a></p>
20
+
21
+ <div class="example">
22
+ <h3>Basic Alert</h3>
23
+ <p>A simple alert component</p>
24
+ <temba-alert>This is a basic alert message.</temba-alert>
25
+ </div>
26
+
27
+ <div class="example">
28
+ <h3>Success Alert</h3>
29
+ <p>An alert for successful actions</p>
30
+ <temba-alert level="success"
31
+ >Your changes have been saved successfully!</temba-alert
32
+ >
33
+ </div>
34
+
35
+ <div class="example">
36
+ <h3>Warning Alert</h3>
37
+ <p>An alert for warning messages</p>
38
+ <temba-alert level="warning"
39
+ >Please review your input before proceeding.</temba-alert
40
+ >
41
+ </div>
42
+
43
+ <div class="example">
44
+ <h3>Error Alert</h3>
45
+ <p>An alert for error messages</p>
46
+ <temba-alert level="error"
47
+ >An error occurred while processing your request.</temba-alert
48
+ >
49
+ </div>
50
+
51
+ <div class="example">
52
+ <h3>Info Alert</h3>
53
+ <p>An alert for informational messages</p>
54
+ <temba-alert level="info"
55
+ >This feature is currently in beta testing.</temba-alert
56
+ >
57
+ </div>
58
+
59
+ <div class="example">
60
+ <h3>Dismissible Alert</h3>
61
+ <p>An alert that can be closed</p>
62
+ <temba-alert dismissible
63
+ >This alert can be dismissed by clicking the X button.</temba-alert
64
+ >
65
+ </div>
66
+
67
+ <script type="module">
68
+ import '/out-tsc/temba-modules.js';
69
+ </script>
70
+ </body>
71
+ </html>
@@ -0,0 +1,167 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en-GB">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <title>Button Examples</title>
6
+ <link
7
+ href="/static/css/temba-components.css"
8
+ rel="stylesheet"
9
+ type="text/css"
10
+ />
11
+ <link
12
+ href="https://fonts.googleapis.com/css?family=Roboto+Mono:300|Roboto:300,400,500"
13
+ rel="stylesheet"
14
+ />
15
+ <link href="/demo/static/css/styles.css" rel="stylesheet" type="text/css" />
16
+ <link href="/demo/static/css/prism.css" rel="stylesheet" />
17
+ <script type="module" src="/demo/static/js/prism-loader.js"></script>
18
+ </head>
19
+ <body>
20
+ <h1>Button Examples</h1>
21
+ <p><a href="/demo/index.html">← Back to main demo</a></p>
22
+
23
+ <table class="attr-table">
24
+ <thead>
25
+ <tr>
26
+ <th>Attribute</th>
27
+ <th>Description</th>
28
+ <th>Default</th>
29
+ </tr>
30
+ </thead>
31
+ <tbody>
32
+ <tr>
33
+ <td>name</td>
34
+ <td>Text displayed on the button</td>
35
+ <td>None (required)</td>
36
+ </tr>
37
+ <tr>
38
+ <td>primary</td>
39
+ <td>Applies primary button styling</td>
40
+ <td>false</td>
41
+ </tr>
42
+ <tr>
43
+ <td>secondary</td>
44
+ <td>Applies secondary button styling</td>
45
+ <td>false</td>
46
+ </tr>
47
+ <tr>
48
+ <td>attention</td>
49
+ <td>Applies attention-grabbing styling</td>
50
+ <td>false</td>
51
+ </tr>
52
+ <tr>
53
+ <td>destructive</td>
54
+ <td>Applies destructive action styling (red)</td>
55
+ <td>false</td>
56
+ </tr>
57
+ <tr>
58
+ <td>light</td>
59
+ <td>Applies light button styling</td>
60
+ <td>false</td>
61
+ </tr>
62
+ <tr>
63
+ <td>disabled</td>
64
+ <td>Disables the button and prevents interaction</td>
65
+ <td>false</td>
66
+ </tr>
67
+ <tr>
68
+ <td>submitting</td>
69
+ <td>Shows loading state during form submission</td>
70
+ <td>false</td>
71
+ </tr>
72
+ <tr>
73
+ <td>small</td>
74
+ <td>Applies smaller button size</td>
75
+ <td>false</td>
76
+ </tr>
77
+ <tr>
78
+ <td>lined</td>
79
+ <td>Applies outlined button styling</td>
80
+ <td>false</td>
81
+ </tr>
82
+ <tr>
83
+ <td>href</td>
84
+ <td>URL to navigate to when clicked (makes button a link)</td>
85
+ <td>None</td>
86
+ </tr>
87
+ <tr>
88
+ <td>icon</td>
89
+ <td>Icon name to display alongside button text</td>
90
+ <td>None</td>
91
+ </tr>
92
+ </tbody>
93
+ </table>
94
+
95
+ <div class="example">
96
+ <h3>Basic Button</h3>
97
+ <p>A simple button component</p>
98
+ <pre
99
+ class="example-html"
100
+ ><code class="language-markup">&lt;temba-button name="Click Me"&gt;&lt;/temba-button&gt;</code></pre>
101
+ <temba-button name="Click Me"></temba-button>
102
+ </div>
103
+
104
+ <div class="example">
105
+ <h3>Primary Button</h3>
106
+ <p>A primary styled button</p>
107
+ <pre
108
+ class="example-html"
109
+ ><code class="language-markup">&lt;temba-button primary name="Primary Action"&gt;&lt;/temba-button&gt;</code></pre>
110
+ <temba-button primary name="Primary Action"></temba-button>
111
+ </div>
112
+
113
+ <div class="example">
114
+ <h3>Secondary Button</h3>
115
+ <p>A secondary styled button</p>
116
+ <pre
117
+ class="example-html"
118
+ ><code class="language-markup">&lt;temba-button secondary name="Secondary Action"&gt;&lt;/temba-button&gt;</code></pre>
119
+ <temba-button secondary name="Secondary Action"></temba-button>
120
+ </div>
121
+
122
+ <div class="example">
123
+ <h3>Small Button</h3>
124
+ <p>A smaller button variant</p>
125
+ <pre
126
+ class="example-html"
127
+ ><code class="language-markup">&lt;temba-button small name="Small Button"&gt;&lt;/temba-button&gt;</code></pre>
128
+ <temba-button small name="Small Button"></temba-button>
129
+ </div>
130
+
131
+ <div class="example">
132
+ <h3>Disabled Button</h3>
133
+ <p>A button that cannot be clicked</p>
134
+ <pre
135
+ class="example-html"
136
+ ><code class="language-markup">&lt;temba-button disabled name="Disabled Button"&gt;&lt;/temba-button&gt;</code></pre>
137
+ <temba-button disabled name="Disabled Button"></temba-button>
138
+ </div>
139
+
140
+ <div class="example">
141
+ <h3>Multiple Buttons</h3>
142
+ <p>Several buttons in a row with proper constraints</p>
143
+ <pre
144
+ class="example-html"
145
+ ><code class="language-markup">&lt;div class="button-group"&gt;
146
+ &lt;div&gt;&lt;temba-button name="Save"&gt;&lt;/temba-button&gt;&lt;/div&gt;
147
+ &lt;div&gt;&lt;temba-button secondary name="Cancel"&gt;&lt;/temba-button&gt;&lt;/div&gt;
148
+ &lt;div&gt;&lt;temba-button primary name="Submit"&gt;&lt;/temba-button&gt;&lt;/div&gt;
149
+ &lt;/div&gt;</code></pre>
150
+ <div class="button-group">
151
+ <div>
152
+ <temba-button name="Save"></temba-button>
153
+ </div>
154
+ <div>
155
+ <temba-button secondary name="Cancel"></temba-button>
156
+ </div>
157
+ <div>
158
+ <temba-button primary name="Submit"></temba-button>
159
+ </div>
160
+ </div>
161
+ </div>
162
+
163
+ <script type="module">
164
+ import '/out-tsc/temba-modules.js';
165
+ </script>
166
+ </body>
167
+ </html>
@@ -12,7 +12,7 @@
12
12
  href="https://fonts.googleapis.com/css?family=Roboto+Mono:300|Roboto:300,400,500"
13
13
  rel="stylesheet"
14
14
  />
15
- <link href="../styles.css" rel="stylesheet" type="text/css" />
15
+ <link href="/demo/static/css/styles.css" rel="stylesheet" type="text/css" />
16
16
  <style>
17
17
  .palette {
18
18
  display: flex;
@@ -45,7 +45,7 @@
45
45
  <body>
46
46
  <temba-store></temba-store>
47
47
  <h1>Chart Examples</h1>
48
- <p><a href="../index.html">← Back to main demo</a></p>
48
+ <p><a href="/demo/index.html">← Back to main demo</a></p>
49
49
 
50
50
  <div class="example">
51
51
  <h3>Summation Chart</h3>
@@ -387,7 +387,7 @@
387
387
  </div>
388
388
 
389
389
  <script type="module">
390
- import '../../out-tsc/temba-modules.js';
390
+ import '/out-tsc/temba-modules.js';
391
391
  </script>
392
392
  </body>
393
393
  </html>
@@ -0,0 +1,160 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en-GB">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <title>Chart Example - Horizontal Charts</title>
6
+ <link
7
+ href="/static/css/temba-components.css"
8
+ rel="stylesheet"
9
+ type="text/css"
10
+ />
11
+ <link
12
+ href="https://fonts.googleapis.com/css?family=Roboto+Mono:300|Roboto:300,400,500"
13
+ rel="stylesheet"
14
+ />
15
+ <link href="/demo/static/css/styles.css" rel="stylesheet" type="text/css" />
16
+ <script type="module" src="../../../src/chart/TembaChart.ts"></script>
17
+ <link href="/demo/static/css/prism.css" rel="stylesheet" />
18
+ <script type="module" src="/demo/static/js/prism-loader.js"></script>
19
+ </head>
20
+ <body>
21
+ <h1>Chart Example - Horizontal Charts</h1>
22
+ <p><a href="/demo/index.html">← Back to main demo</a></p>
23
+
24
+ <table class="attr-table">
25
+ <thead>
26
+ <tr>
27
+ <th>Attribute</th>
28
+ <th>Description</th>
29
+ <th>Default</th>
30
+ </tr>
31
+ </thead>
32
+ <tbody>
33
+ <tr>
34
+ <td>chartType</td>
35
+ <td>Type of chart to display ('bar', 'line', 'pie', etc.)</td>
36
+ <td>'bar'</td>
37
+ </tr>
38
+ <tr>
39
+ <td>horizontal</td>
40
+ <td>Whether to display the bar chart horizontally</td>
41
+ <td>false</td>
42
+ </tr>
43
+ <tr>
44
+ <td>header</td>
45
+ <td>Title text displayed above the chart</td>
46
+ <td>''</td>
47
+ </tr>
48
+ <tr>
49
+ <td>data</td>
50
+ <td>Chart data object containing labels and datasets</td>
51
+ <td>None (required)</td>
52
+ </tr>
53
+ <tr>
54
+ <td>percent</td>
55
+ <td>Whether to show percentage values on chart</td>
56
+ <td>false</td>
57
+ </tr>
58
+ <tr>
59
+ <td>maxChartHeight</td>
60
+ <td>Maximum height for the chart in pixels</td>
61
+ <td>250</td>
62
+ </tr>
63
+ <tr>
64
+ <td>legend</td>
65
+ <td>Whether to show the chart legend</td>
66
+ <td>false</td>
67
+ </tr>
68
+ </tbody>
69
+ </table>
70
+
71
+ <div class="example">
72
+ <h3>Regular Vertical Bar Chart</h3>
73
+ <p>Default vertical bar chart display</p>
74
+ <pre class="example-html"><code class="language-markup">&lt;temba-chart
75
+ type="bar"
76
+ header="Monthly Sales (Vertical)"
77
+ style="height: 300px; display: block"
78
+ &gt;&lt;/temba-chart&gt;</code></pre>
79
+ <temba-chart
80
+ type="bar"
81
+ header="Monthly Sales (Vertical)"
82
+ style="height: 300px; display: block"
83
+ id="vertical-chart"
84
+ ></temba-chart>
85
+ </div>
86
+
87
+ <div class="example">
88
+ <h3>Horizontal Bar Chart</h3>
89
+ <p>Bar chart displayed horizontally using the horizontal attribute</p>
90
+ <pre class="example-html"><code class="language-markup">&lt;temba-chart
91
+ type="bar"
92
+ horizontal
93
+ header="Monthly Sales (Horizontal)"
94
+ style="height: 300px; display: block"
95
+ &gt;&lt;/temba-chart&gt;</code></pre>
96
+ <temba-chart
97
+ type="bar"
98
+ horizontal
99
+ header="Monthly Sales (Horizontal)"
100
+ style="height: 300px; display: block"
101
+ id="horizontal-chart"
102
+ ></temba-chart>
103
+ </div>
104
+
105
+ <div class="example">
106
+ <h3>Horizontal Bar Chart with Percentages</h3>
107
+ <p>Horizontal bar chart showing percentage values</p>
108
+ <pre class="example-html"><code class="language-markup">&lt;temba-chart
109
+ type="bar"
110
+ horizontal
111
+ percent
112
+ header="Monthly Sales with Percentages (Horizontal)"
113
+ style="height: 300px; display: block"
114
+ &gt;&lt;/temba-chart&gt;</code></pre>
115
+ <temba-chart
116
+ type="bar"
117
+ horizontal
118
+ percent
119
+ header="Monthly Sales with Percentages (Horizontal)"
120
+ style="height: 300px; display: block"
121
+ id="horizontal-percent-chart"
122
+ ></temba-chart>
123
+ </div>
124
+
125
+ <script type="module">
126
+ import '/out-tsc/temba-modules.js';
127
+
128
+ // Sample data for the charts
129
+ const sampleData = {
130
+ labels: ['January', 'February', 'March', 'April', 'May', 'June'],
131
+ datasets: [
132
+ {
133
+ label: 'Product A',
134
+ data: [65, 59, 80, 81, 56, 55],
135
+ backgroundColor: 'rgba(54, 162, 235, 0.6)',
136
+ borderColor: 'rgba(54, 162, 235, 1)',
137
+ borderWidth: 1
138
+ },
139
+ {
140
+ label: 'Product B',
141
+ data: [28, 48, 40, 19, 86, 27],
142
+ backgroundColor: 'rgba(255, 99, 132, 0.6)',
143
+ borderColor: 'rgba(255, 99, 132, 1)',
144
+ borderWidth: 1
145
+ }
146
+ ]
147
+ };
148
+
149
+ // Wait for the DOM to be ready and charts to be defined
150
+ document.addEventListener('DOMContentLoaded', () => {
151
+ setTimeout(() => {
152
+ const charts = document.querySelectorAll('temba-chart');
153
+ charts.forEach((chart) => {
154
+ chart.data = sampleData;
155
+ });
156
+ }, 100);
157
+ });
158
+ </script>
159
+ </body>
160
+ </html>
@@ -0,0 +1,68 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en-GB">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <title>Checkbox Examples</title>
6
+ <link
7
+ href="/static/css/temba-components.css"
8
+ rel="stylesheet"
9
+ type="text/css"
10
+ />
11
+ <link
12
+ href="https://fonts.googleapis.com/css?family=Roboto+Mono:300|Roboto:300,400,500"
13
+ rel="stylesheet"
14
+ />
15
+ <link href="/demo/static/css/styles.css" rel="stylesheet" type="text/css" />
16
+ </head>
17
+ <body>
18
+ <h1>Checkbox Examples</h1>
19
+ <p><a href="/demo/index.html">← Back to main demo</a></p>
20
+
21
+ <div class="example">
22
+ <h3>Basic Checkbox</h3>
23
+ <p>A simple checkbox component</p>
24
+ <temba-checkbox label="Check this out" checked></temba-checkbox>
25
+ </div>
26
+
27
+ <div class="example">
28
+ <h3>Unchecked Checkbox</h3>
29
+ <p>A checkbox that starts unchecked</p>
30
+ <temba-checkbox label="This is not checked"></temba-checkbox>
31
+ </div>
32
+
33
+ <div class="example">
34
+ <h3>Checkbox with Help Text</h3>
35
+ <p>A checkbox with additional help text</p>
36
+ <temba-checkbox
37
+ name="schedule"
38
+ label="Schedule for later delivery"
39
+ help_text="This is something you should think long and hard about"
40
+ ></temba-checkbox>
41
+ </div>
42
+
43
+ <div class="example">
44
+ <h3>Disabled Checkbox</h3>
45
+ <p>A checkbox that cannot be changed</p>
46
+ <temba-checkbox
47
+ name="disabled"
48
+ label="You can't check this one"
49
+ help_text="It is disabled, don't click it"
50
+ disabled
51
+ ></temba-checkbox>
52
+ </div>
53
+
54
+ <div class="example">
55
+ <h3>Multiple Checkboxes</h3>
56
+ <p>Several checkboxes in a row</p>
57
+ <div style="display: flex; flex-wrap: wrap; gap: 20px">
58
+ <temba-checkbox label="Option 1" checked></temba-checkbox>
59
+ <temba-checkbox label="Option 2"></temba-checkbox>
60
+ <temba-checkbox label="Option 3" checked></temba-checkbox>
61
+ </div>
62
+ </div>
63
+
64
+ <script type="module">
65
+ import '/out-tsc/temba-modules.js';
66
+ </script>
67
+ </body>
68
+ </html>
@@ -0,0 +1,69 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en-GB">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <title>Compose Examples</title>
6
+ <link
7
+ href="/static/css/temba-components.css"
8
+ rel="stylesheet"
9
+ type="text/css"
10
+ />
11
+ <link
12
+ href="https://fonts.googleapis.com/css?family=Roboto+Mono:300|Roboto:300,400,500"
13
+ rel="stylesheet"
14
+ />
15
+ <link href="/demo/static/css/styles.css" rel="stylesheet" type="text/css" />
16
+ </head>
17
+ <body>
18
+ <h1>Compose Examples</h1>
19
+ <p><a href="/demo/index.html">← Back to main demo</a></p>
20
+
21
+ <div class="example">
22
+ <h3>Basic Compose</h3>
23
+ <p>A simple compose component for text input</p>
24
+ <temba-compose placeholder="Type your message here..."></temba-compose>
25
+ </div>
26
+
27
+ <div class="example">
28
+ <h3>Compose with Counter</h3>
29
+ <p>A compose component with character counting</p>
30
+ <temba-compose
31
+ placeholder="Enter your message (max 160 characters)..."
32
+ counter
33
+ maxlength="160"
34
+ >
35
+ </temba-compose>
36
+ </div>
37
+
38
+ <div class="example">
39
+ <h3>Compose with Attachments</h3>
40
+ <p>A compose component that supports file attachments</p>
41
+ <temba-compose
42
+ placeholder="Write your message and attach files..."
43
+ attachments
44
+ >
45
+ </temba-compose>
46
+ </div>
47
+
48
+ <div class="example">
49
+ <h3>Rich Text Compose</h3>
50
+ <p>A compose component with rich text formatting</p>
51
+ <temba-compose
52
+ placeholder="Format your text with rich editing..."
53
+ rich-text
54
+ >
55
+ </temba-compose>
56
+ </div>
57
+
58
+ <div class="example">
59
+ <h3>Multi-line Compose</h3>
60
+ <p>A compose component with multiple lines</p>
61
+ <temba-compose placeholder="Enter a longer message..." rows="4">
62
+ </temba-compose>
63
+ </div>
64
+
65
+ <script type="module">
66
+ import '/out-tsc/temba-modules.js';
67
+ </script>
68
+ </body>
69
+ </html>
@@ -12,11 +12,11 @@
12
12
  href="https://fonts.googleapis.com/css?family=Roboto+Mono:300|Roboto:300,400,500"
13
13
  rel="stylesheet"
14
14
  />
15
- <link href="../../styles.css" rel="stylesheet" type="text/css" />
15
+ <link href="/demo/static/css/styles.css" rel="stylesheet" type="text/css" />
16
16
  </head>
17
17
  <body>
18
18
  <h1>Date Picker Examples</h1>
19
- <p><a href="../../index.html">← Back to main demo</a></p>
19
+ <p><a href="/demo/index.html">← Back to main demo</a></p>
20
20
 
21
21
  <div class="example">
22
22
  <h3>Date and Time Picker</h3>
@@ -57,7 +57,7 @@
57
57
  </script>
58
58
 
59
59
  <script type="module">
60
- import '../../out-tsc/temba-modules.js';
60
+ import '/out-tsc/temba-modules.js';
61
61
  </script>
62
62
  </body>
63
63
  </html>
@@ -12,14 +12,14 @@
12
12
  href="https://fonts.googleapis.com/css?family=Roboto+Mono:300|Roboto:300,400,500"
13
13
  rel="stylesheet"
14
14
  />
15
- <link href="../../styles.css" rel="stylesheet" type="text/css" />
15
+ <link href="/demo/static/css/styles.css" rel="stylesheet" type="text/css" />
16
16
  <script type="module" src="../../../src/datepicker/RangePicker.ts"></script>
17
17
  <link href="/demo/static/css/prism.css" rel="stylesheet" />
18
18
  <script type="module" src="/demo/static/js/prism-loader.js"></script>
19
19
  </head>
20
20
  <body>
21
21
  <h1>Range Picker Example</h1>
22
- <p><a href="../../index.html">← Back to main demo</a></p>
22
+ <p><a href="/demo/index.html">← Back to main demo</a></p>
23
23
 
24
24
  <table class="attr-table">
25
25
  <thead>
@@ -12,11 +12,11 @@
12
12
  href="https://fonts.googleapis.com/css?family=Roboto+Mono:300|Roboto:300,400,500"
13
13
  rel="stylesheet"
14
14
  />
15
- <link href="../styles.css" rel="stylesheet" type="text/css" />
15
+ <link href="/demo/static/css/styles.css" rel="stylesheet" type="text/css" />
16
16
  </head>
17
17
  <body>
18
18
  <h1>Dialog Examples</h1>
19
- <p><a href="../index.html">← Back to main demo</a></p>
19
+ <p><a href="/demo/index.html">← Back to main demo</a></p>
20
20
 
21
21
  <div class="example">
22
22
  <h3>Basic Dialog</h3>
@@ -101,7 +101,7 @@
101
101
  </div>
102
102
 
103
103
  <script type="module">
104
- import '../../out-tsc/temba-modules.js';
104
+ import '/out-tsc/temba-modules.js';
105
105
  </script>
106
106
  </body>
107
107
  </html>