kempo-ui 0.0.8 → 0.0.10

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 (61) hide show
  1. package/dist/src/components/Card.js +3 -3
  2. package/dist/src/components/Dialog.js +11 -11
  3. package/dist/src/components/Icon.js +1 -1
  4. package/dist/src/components/Toggle.js +15 -14
  5. package/dist/src/components/Tree.js +11 -3
  6. package/docs/components/accordion.html +2 -3
  7. package/docs/components/card.html +2 -3
  8. package/docs/components/collapsible.html +2 -3
  9. package/docs/components/content-slider.html +3 -3
  10. package/docs/components/dialog.html +237 -5
  11. package/docs/components/focus-capture.html +2 -3
  12. package/docs/components/hybrid-component.html +2 -3
  13. package/docs/components/icon.html +6 -7
  14. package/docs/components/import.html +2 -3
  15. package/docs/components/light-component.html +2 -3
  16. package/docs/components/persistant-collapsible.html +19 -37
  17. package/docs/components/photo-viewer.html +129 -84
  18. package/docs/components/resize.html +2 -3
  19. package/docs/components/shadow-component.html +2 -3
  20. package/docs/components/show-more.html +2 -4
  21. package/docs/components/side-menu.html +2 -3
  22. package/docs/components/sortable.html +3 -3
  23. package/docs/components/split.html +2 -3
  24. package/docs/components/table.html +2 -3
  25. package/docs/components/tableControls.html +2 -3
  26. package/docs/components/tableCustomFields.html +2 -3
  27. package/docs/components/tableFetchRecords.html +2 -3
  28. package/docs/components/tableFieldSortHide.html +2 -3
  29. package/docs/components/tablePagination.html +2 -3
  30. package/docs/components/tableRecordEditing.html +2 -3
  31. package/docs/components/tableRecordFiltering.html +2 -3
  32. package/docs/components/tableRecordHiding.html +2 -3
  33. package/docs/components/tableRecordSearching.html +2 -3
  34. package/docs/components/tableRecordSelection.html +2 -3
  35. package/docs/components/tableRowControls.html +2 -3
  36. package/docs/components/tableSorting.html +2 -3
  37. package/docs/components/tabs.html +89 -70
  38. package/docs/components/tags.html +45 -16
  39. package/docs/components/theme-switcher.html +3 -4
  40. package/docs/components/timestamp.html +40 -10
  41. package/docs/components/toast.html +311 -4
  42. package/docs/components/toggle.html +3 -5
  43. package/docs/components/tree.html +76 -64
  44. package/docs/src/components/Card.js +3 -3
  45. package/docs/src/components/Dialog.js +11 -11
  46. package/docs/src/components/Icon.js +1 -1
  47. package/docs/src/components/Toggle.js +15 -14
  48. package/docs/src/components/Tree.js +11 -3
  49. package/docs/utils/debounce.html +5 -24
  50. package/docs/utils/drag.html +3 -13
  51. package/docs/utils/formatTimestamp.html +7 -25
  52. package/docs/utils/propConverters.html +7 -46
  53. package/docs/utils/toTitleCase.html +2 -2
  54. package/docs/utils/watchWindowSize.html +7 -98
  55. package/package.json +1 -1
  56. package/src/components/Card.js +3 -3
  57. package/src/components/Dialog.js +48 -34
  58. package/src/components/Icon.js +25 -18
  59. package/src/components/Toggle.js +69 -69
  60. package/src/components/Tree.js +10 -2
  61. package/scripts/fix-docs-paths.js +0 -62
@@ -133,10 +133,10 @@ export class TreeBranch extends ShadowComponent {
133
133
 
134
134
  return html`
135
135
  <div>
136
- <div class="branch-label" @click=${this.toggle}>
136
+ <button class="branch-label no-btn" @click=${this.toggle} aria-expanded="${this.opened}">
137
137
  <k-icon name="chevron-right" class="toggle-icon ${this.opened ? 'opened' : ''}"></k-icon>
138
138
  ${label}${type}
139
- </div>
139
+ </button>
140
140
  ${this.opened ? html`
141
141
  <div class="pl">
142
142
  ${this.value ? (Array.isArray(this.value)
@@ -154,11 +154,19 @@ export class TreeBranch extends ShadowComponent {
154
154
  display: block;
155
155
  }
156
156
  .branch-label{
157
+ display: block;
158
+ width: 100%;
157
159
  cursor: pointer;
158
160
  }
159
161
  .branch-label:hover{
160
162
  background-color: var(--c_bg__alt, #f5f5f5);
161
163
  }
164
+ .branch-label:focus{
165
+ box-shadow: none;
166
+ }
167
+ .branch-label:focus-visible{
168
+ box-shadow: var(--focus_shadow);
169
+ }
162
170
  .toggle-icon{
163
171
  transition: transform var(--animation_ms, 200ms);
164
172
  }
@@ -1,62 +0,0 @@
1
- import fs from 'fs/promises';
2
- import path from 'path';
3
- import { fileURLToPath } from 'url';
4
-
5
- const __filename = fileURLToPath(import.meta.url);
6
- const __dirname = path.dirname(__filename);
7
-
8
- const docsComponentsDir = path.join(__dirname, '..', 'docs', 'components');
9
- const docsUtilsDir = path.join(__dirname, '..', 'docs', 'utils');
10
-
11
- async function fixComponentHtmlFile(filePath) {
12
- let content = await fs.readFile(filePath, 'utf-8');
13
- let modified = false;
14
-
15
- // Replace the inline script block with script src to init.js
16
- const scriptPattern = /<script type="module">\s*import.*?(ShadowComponent|Import|Icon).*?<\/script>/s;
17
- if (scriptPattern.test(content)) {
18
- content = content.replace(
19
- scriptPattern,
20
- '<script type="module" src="./init.js"></script>'
21
- );
22
- modified = true;
23
- }
24
-
25
- // Fix the backtick-n issue in stylesheets
26
- if (content.includes('`n')) {
27
- content = content.replace(/`n/g, '\n');
28
- modified = true;
29
- }
30
-
31
- if (modified) {
32
- await fs.writeFile(filePath, content, 'utf-8');
33
- console.log(`Fixed: ${path.basename(filePath)}`);
34
- return true;
35
- }
36
- return false;
37
- }
38
-
39
- async function fixAllFilesInDirectory(dir, dirName) {
40
- const files = await fs.readdir(dir);
41
- let fixedCount = 0;
42
-
43
- for (const file of files) {
44
- if (file.endsWith('.html')) {
45
- const filePath = path.join(dir, file);
46
- const fixed = await fixComponentHtmlFile(filePath);
47
- if (fixed) fixedCount++;
48
- }
49
- }
50
-
51
- console.log(`\nFixed ${fixedCount} HTML files in ${dirName}/`);
52
- }
53
-
54
- async function fixAllComponentFiles() {
55
- console.log('Fixing components...');
56
- await fixAllFilesInDirectory(docsComponentsDir, 'docs/components');
57
-
58
- console.log('\nFixing utils...');
59
- await fixAllFilesInDirectory(docsUtilsDir, 'docs/utils');
60
- }
61
-
62
- fixAllComponentFiles().catch(console.error);