testio-tailwind 3.21.0 → 3.23.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 (143) hide show
  1. package/AI_DESIGN_SYSTEM_REFERENCE.md +2618 -0
  2. package/package.json +1 -1
  3. package/src/_data/navigation.json +4 -0
  4. package/src/_includes/example-header-centered.njk +53 -0
  5. package/src/_includes/header.njk +8 -8
  6. package/src/_includes/page-with-sidebar.njk +10 -1
  7. package/src/_layouts/page-example-centered.njk +19 -0
  8. package/src/_layouts/page-example-darkmode.njk +19 -0
  9. package/src/assets/scripts/app.js +27 -0
  10. package/src/assets/stylesheets/components/actionbar.css +8 -0
  11. package/src/assets/stylesheets/components/designsystem/designsystem-styles.css +4 -2
  12. package/src/assets/stylesheets/components/header.css +22 -0
  13. package/src/assets/stylesheets/components/tables.css +4 -0
  14. package/src/pages/buttons/block.haml +1 -0
  15. package/src/pages/buttons/button_group.haml +1 -0
  16. package/src/pages/buttons/buttons-lg.haml +1 -0
  17. package/src/pages/buttons/buttons-round.haml +1 -0
  18. package/src/pages/buttons/buttons-sm.haml +1 -0
  19. package/src/pages/buttons/buttons-xl.haml +1 -0
  20. package/src/pages/buttons/buttons.haml +1 -0
  21. package/src/pages/buttons/buttons_input.haml +4 -0
  22. package/src/pages/buttons/dropdown-menu.haml +2 -11
  23. package/src/pages/buttons/square-buttons.haml +15 -0
  24. package/src/pages/components/alerts.haml +1 -0
  25. package/src/pages/components/banner_cards.haml +1 -0
  26. package/src/pages/components/card_badges.haml +8 -7
  27. package/src/pages/components/cards.haml +15 -22
  28. package/src/pages/components/cards_customer.haml +1 -0
  29. package/src/pages/components/cards_fixedwidth.haml +7 -0
  30. package/src/pages/components/cards_iconheader.haml +1 -0
  31. package/src/pages/components/cards_tester.haml +1 -0
  32. package/src/pages/components/descriptionlist.haml +12 -3
  33. package/src/pages/components/devices.haml +1 -0
  34. package/src/pages/components/drawer.haml +1 -0
  35. package/src/pages/components/drawer_filter.haml +1 -0
  36. package/src/pages/components/emptystate.haml +2 -0
  37. package/src/pages/{buttons → components}/info_popover.haml +2 -1
  38. package/src/pages/components/listitem_with_actionbar.haml +1 -0
  39. package/src/pages/components/listitem_with_footer.haml +1 -0
  40. package/src/pages/components/listitems.haml +1 -0
  41. package/src/pages/components/listitems_badge.haml +1 -0
  42. package/src/pages/components/listitems_collapsable.haml +1 -0
  43. package/src/pages/components/listitems_nested.haml +1 -0
  44. package/src/pages/components/listitems_selectable.haml +1 -0
  45. package/src/pages/components/loading_spinner.haml +1 -0
  46. package/src/pages/components/metasidebar.haml +1 -0
  47. package/src/pages/components/modal_details.haml +3 -1
  48. package/src/pages/components/notifications.haml +2 -1
  49. package/src/pages/components/user_item.haml +1 -0
  50. package/src/pages/forms/attachments.pug +71 -0
  51. package/src/pages/forms/checkboxes.haml +1 -0
  52. package/src/pages/forms/checkboxes_devices.haml +1 -0
  53. package/src/pages/forms/date-time.haml +1 -0
  54. package/src/pages/forms/dropzone.pug +38 -0
  55. package/src/pages/forms/flatpickr.haml +1 -1
  56. package/src/pages/forms/form-addon.haml +1 -0
  57. package/src/pages/forms/form-card.haml +1 -0
  58. package/src/pages/forms/form_grid.haml +1 -0
  59. package/src/pages/forms/form_hint.haml +1 -0
  60. package/src/pages/forms/forms.haml +1 -0
  61. package/src/pages/forms/radiobuttons.haml +1 -0
  62. package/src/pages/forms/rating_scale.haml +1 -0
  63. package/src/pages/forms/search.haml +1 -0
  64. package/src/pages/forms/selectable_token.haml +1 -0
  65. package/src/pages/forms/selectable_token_browsers.haml +1 -0
  66. package/src/pages/forms/selectable_token_lg.haml +1 -0
  67. package/src/pages/forms/selectable_token_xl.haml +1 -0
  68. package/src/pages/forms/textarea.haml +4 -0
  69. package/src/pages/forms/toggle-buttons.haml +1 -0
  70. package/src/pages/forms/toggle-switch.haml +1 -0
  71. package/src/pages/forms/trix_editor.pug +1 -0
  72. package/src/pages/icons/bug-icons.haml +1 -0
  73. package/src/pages/icons/index.njk +18 -14
  74. package/src/pages/icons/status-icons.haml +1 -0
  75. package/src/pages/layout/app_layout.haml +5 -1
  76. package/src/pages/layout/centered_layout.haml +26 -0
  77. package/src/pages/layout/darkmode.haml +9 -0
  78. package/src/pages/layout/margins.haml +1 -0
  79. package/src/pages/layout/max_width.haml +2 -1
  80. package/src/pages/layout/paddings.haml +1 -0
  81. package/src/pages/layout/spacing.haml +1 -0
  82. package/src/pages/{examples → layouts}/agenticqa_splitview.haml +1 -1
  83. package/src/pages/layouts/layout-actionbar.haml +45 -0
  84. package/src/pages/{examples → layouts}/layout-basic.haml +3 -2
  85. package/src/pages/layouts/layout-centered.haml +26 -0
  86. package/src/pages/{examples → layouts}/layout-chat.haml +3 -2
  87. package/src/pages/{examples → layouts}/layout-customer.haml +3 -2
  88. package/src/pages/{examples/layout-sidebar-actionbar.haml → layouts/layout-darkmode.haml} +20 -18
  89. package/src/pages/{examples → layouts}/layout-form-sidebar-actionbar-metasidebar.haml +5 -228
  90. package/src/pages/{examples/layout-sidebar-actionbar-metasidebar.haml → layouts/layout-full.haml} +3 -2
  91. package/src/pages/{examples → layouts}/layout-manager.haml +3 -2
  92. package/src/pages/{examples → layouts}/layout-metasidebar.haml +3 -2
  93. package/src/pages/{examples → layouts}/layout-sidebar.haml +3 -2
  94. package/src/pages/{examples → layouts}/layout-tester.haml +3 -2
  95. package/src/pages/{examples → layouts}/splitview-metasidebar.haml +3 -3
  96. package/src/pages/{examples → layouts}/splitview-testcases.haml +2 -2
  97. package/src/pages/{examples → layouts}/splitview.haml +3 -3
  98. package/src/pages/navigation/header-centered.haml +77 -0
  99. package/src/pages/navigation/header-manager.haml +1 -0
  100. package/src/pages/navigation/header-tester.haml +1 -0
  101. package/src/pages/navigation/header.haml +1 -0
  102. package/src/pages/navigation/header_customer.haml +1 -0
  103. package/src/pages/navigation/header_tester_epam.haml +1 -0
  104. package/src/pages/navigation/product_dropdown.haml +2 -0
  105. package/src/pages/navigation/radio_tabs.haml +1 -0
  106. package/src/pages/navigation/sidebar-manager.haml +2 -1
  107. package/src/pages/navigation/sidebar-tester-elements.haml +1 -0
  108. package/src/pages/navigation/sidebar-tester-seatlimitation.haml +1 -1
  109. package/src/pages/navigation/sidebar-tester.haml +1 -1
  110. package/src/pages/navigation/sidebar.haml +1 -0
  111. package/src/pages/navigation/sidebar_collapsables.haml +1 -0
  112. package/src/pages/navigation/sidebar_customer.haml +1 -0
  113. package/src/pages/navigation/tabnavigation.haml +1 -0
  114. package/src/pages/navigation/tabnavigation_actions.haml +1 -0
  115. package/src/pages/navigation/tabnavigation_pills.haml +1 -0
  116. package/src/pages/navigation/tabnavigation_sm.haml +1 -0
  117. package/src/pages/navigation/test-header-tester.haml +2 -0
  118. package/src/pages/tables/index.njk +7 -0
  119. package/src/pages/tables/tables-cellstyle.haml +38 -0
  120. package/src/pages/tables/tables-grid.haml +31 -0
  121. package/src/pages/tables/tables.haml +16 -0
  122. package/src/pages/tables/tables_alternating.haml +27 -0
  123. package/src/pages/tables/tables_borders.haml +22 -0
  124. package/src/pages/tables/tables_cells.haml +50 -0
  125. package/src/pages/tables/tables_footer.haml +27 -0
  126. package/src/pages/tables/tables_formrow.haml +31 -0
  127. package/src/pages/tables/tables_header.haml +22 -0
  128. package/src/pages/{components → tables}/tables_linked.haml +11 -10
  129. package/src/pages/typography/link_with_icon.haml +10 -2
  130. package/src/pages/typography/linked_icon.haml +6 -0
  131. package/src/pages/typography/section_header.haml +1 -0
  132. package/src/pages/typography/section_header_actions.haml +1 -0
  133. package/src/pages/typography/text_with_icon.haml +3 -2
  134. package/utils/filters.js +161 -0
  135. package/CLAUDE_DESIGN_SYSTEM_REFERENCE.md +0 -1978
  136. package/src/pages/buttons/link-with-icon.haml +0 -13
  137. package/src/pages/components/tables-cellstyle.pug +0 -285
  138. package/src/pages/components/tables-grid.pug +0 -258
  139. package/src/pages/components/tables.haml +0 -57
  140. package/src/pages/components/tables_cells.pug +0 -57
  141. package/src/pages/components/tables_formrow.haml +0 -55
  142. package/src/pages/examples/layout-actionbar.haml +0 -268
  143. package/src/pages/forms/uploads.pug +0 -101
package/utils/filters.js CHANGED
@@ -1,11 +1,172 @@
1
1
 
2
2
  const { DateTime } = require('luxon')
3
3
 
4
+ // HTML to HAML converter with proper indentation
5
+ function htmlToHaml(html) {
6
+ let haml = '';
7
+ let currentIndent = 0;
8
+
9
+ // Remove leading/trailing whitespace
10
+ html = html.trim();
11
+
12
+ // Tokenize HTML
13
+ const tokens = tokenizeHtml(html);
14
+
15
+ // Process tokens
16
+ for (let i = 0; i < tokens.length; i++) {
17
+ const token = tokens[i];
18
+
19
+ if (token.type === 'openTag') {
20
+ const hamlTag = tagToHaml(token.tag, token.attrs);
21
+ haml += getIndent(currentIndent) + hamlTag;
22
+
23
+ // Check if this is a self-closing or void element
24
+ if (token.selfClosing || isVoidElement(token.tag)) {
25
+ haml += '\n';
26
+ } else {
27
+ haml += '\n';
28
+ currentIndent++;
29
+ }
30
+ } else if (token.type === 'closeTag') {
31
+ currentIndent = Math.max(0, currentIndent - 1);
32
+ } else if (token.type === 'text') {
33
+ const text = token.content.trim();
34
+ if (text) {
35
+ haml += getIndent(currentIndent) + text + '\n';
36
+ }
37
+ }
38
+ }
39
+
40
+ return haml.trim();
41
+ }
42
+
43
+ // Tokenize HTML into an array of tokens
44
+ function tokenizeHtml(html) {
45
+ const tokens = [];
46
+ let i = 0;
47
+
48
+ while (i < html.length) {
49
+ if (html[i] === '<') {
50
+ const tagEnd = html.indexOf('>', i);
51
+ if (tagEnd === -1) break;
52
+
53
+ const tagContent = html.substring(i + 1, tagEnd);
54
+
55
+ if (tagContent.startsWith('/')) {
56
+ // Closing tag
57
+ const tagName = tagContent.substring(1).trim();
58
+ tokens.push({ type: 'closeTag', tag: tagName });
59
+ } else if (tagContent.startsWith('!')) {
60
+ // Comment or doctype - skip
61
+ i = tagEnd + 1;
62
+ continue;
63
+ } else {
64
+ // Opening tag
65
+ const selfClosing = tagContent.endsWith('/');
66
+ const cleanContent = selfClosing ? tagContent.slice(0, -1) : tagContent;
67
+ const parts = cleanContent.trim().split(/\s+/);
68
+ const tagName = parts[0];
69
+ const attrString = cleanContent.substring(tagName.length).trim();
70
+
71
+ tokens.push({
72
+ type: 'openTag',
73
+ tag: tagName,
74
+ attrs: attrString,
75
+ selfClosing: selfClosing
76
+ });
77
+ }
78
+
79
+ i = tagEnd + 1;
80
+ } else {
81
+ // Text content
82
+ const nextTag = html.indexOf('<', i);
83
+ const textEnd = nextTag === -1 ? html.length : nextTag;
84
+ const text = html.substring(i, textEnd);
85
+
86
+ if (text.trim()) {
87
+ tokens.push({ type: 'text', content: text });
88
+ }
89
+
90
+ i = textEnd;
91
+ }
92
+ }
93
+
94
+ return tokens;
95
+ }
96
+
97
+ // Convert a tag and its attributes to HAML format
98
+ function tagToHaml(tag, attrString) {
99
+ let result = '%' + tag;
100
+
101
+ if (!attrString) {
102
+ return result;
103
+ }
104
+
105
+ const classes = [];
106
+ const ids = [];
107
+ const attrs = {};
108
+
109
+ // Parse attributes
110
+ const attrRegex = /(\w+(?:-\w+)*(?::\w+)*)\s*=\s*["']([^"']*)["']|(\w+(?:-\w+)*(?::\w+)*)/g;
111
+ let match;
112
+
113
+ while ((match = attrRegex.exec(attrString)) !== null) {
114
+ if (match[1]) {
115
+ const name = match[1];
116
+ const value = match[2];
117
+
118
+ if (name === 'class') {
119
+ classes.push(...value.split(/\s+/));
120
+ } else if (name === 'id') {
121
+ ids.push(value);
122
+ } else if (name !== 'type' || tag !== 'input') {
123
+ // Skip type attribute for input tags as they're implicit
124
+ attrs[name] = value;
125
+ }
126
+ }
127
+ }
128
+
129
+ // Build HAML tag with classes and IDs
130
+ if (ids.length > 0) {
131
+ result += '#' + ids.join('.');
132
+ }
133
+
134
+ if (classes.length > 0) {
135
+ result += '.' + classes.join('.');
136
+ }
137
+
138
+ // Add other attributes
139
+ if (Object.keys(attrs).length > 0) {
140
+ const attrPairs = Object.entries(attrs)
141
+ .map(([k, v]) => `${k}:'${v}'`)
142
+ .join(', ');
143
+ result += `{${attrPairs}}`;
144
+ }
145
+
146
+ return result;
147
+ }
148
+
149
+ // Check if tag is a void element (self-closing)
150
+ function isVoidElement(tag) {
151
+ const voidElements = ['br', 'hr', 'img', 'input', 'meta', 'link', 'area', 'base', 'col', 'embed', 'source', 'track', 'wbr'];
152
+ return voidElements.includes(tag.toLowerCase());
153
+ }
154
+
155
+ // Get indentation string
156
+ function getIndent(level) {
157
+ return ' '.repeat(level);
158
+ }
159
+
4
160
  module.exports = {
5
161
  // https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#valid-date-string
6
162
  htmlDateString: (dateObj) => {
7
163
  return DateTime.fromJSDate(dateObj, {
8
164
  zone: 'utc'
9
165
  }).toFormat('yyyy-LL-dd');
166
+ },
167
+
168
+ // Convert HTML to HAML format
169
+ convertToHaml: (html) => {
170
+ return htmlToHaml(html);
10
171
  }
11
172
  }