wavemaker-dev-mcp 0.1.3 → 1.0.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 (111) hide show
  1. package/README.md +75 -52
  2. package/dist/index.js +108 -177
  3. package/dist/index.js.map +1 -1
  4. package/dist/skills/loader.d.ts +36 -0
  5. package/dist/skills/loader.d.ts.map +1 -0
  6. package/dist/skills/loader.js +107 -0
  7. package/dist/skills/loader.js.map +1 -0
  8. package/package.json +8 -4
  9. package/skills/components/wm-accordion-pane.md +44 -0
  10. package/skills/components/wm-accordion.md +43 -0
  11. package/skills/components/wm-alert-dialog.md +42 -0
  12. package/skills/components/wm-anchor.md +51 -0
  13. package/skills/components/wm-audio.md +41 -0
  14. package/skills/components/wm-button-group.md +36 -0
  15. package/skills/components/wm-button.md +114 -0
  16. package/skills/components/wm-calendar.md +54 -0
  17. package/skills/components/wm-card.md +60 -0
  18. package/skills/components/wm-carousel.md +43 -0
  19. package/skills/components/wm-chart.md +104 -0
  20. package/skills/components/wm-checkbox.md +52 -0
  21. package/skills/components/wm-checkboxset.md +75 -0
  22. package/skills/components/wm-chips.md +78 -0
  23. package/skills/components/wm-composite.md +30 -0
  24. package/skills/components/wm-confirm-dialog.md +43 -0
  25. package/skills/components/wm-container.md +100 -0
  26. package/skills/components/wm-currency.md +69 -0
  27. package/skills/components/wm-datatable.md +146 -0
  28. package/skills/components/wm-date-time.md +80 -0
  29. package/skills/components/wm-date.md +78 -0
  30. package/skills/components/wm-dialog-body.md +28 -0
  31. package/skills/components/wm-dialog-container.md +48 -0
  32. package/skills/components/wm-dialog-content.md +31 -0
  33. package/skills/components/wm-dialog-footer.md +28 -0
  34. package/skills/components/wm-dialog-header.md +43 -0
  35. package/skills/components/wm-dialog.md +40 -0
  36. package/skills/components/wm-file-upload.md +58 -0
  37. package/skills/components/wm-footer.md +31 -0
  38. package/skills/components/wm-form-field.md +81 -0
  39. package/skills/components/wm-form.md +58 -0
  40. package/skills/components/wm-grid-column.md +30 -0
  41. package/skills/components/wm-header.md +31 -0
  42. package/skills/components/wm-html.md +31 -0
  43. package/skills/components/wm-icon.md +40 -0
  44. package/skills/components/wm-iframe-dialog.md +52 -0
  45. package/skills/components/wm-iframe.md +35 -0
  46. package/skills/components/wm-label.md +45 -0
  47. package/skills/components/wm-left-nav.md +35 -0
  48. package/skills/components/wm-linear-layout-item.md +28 -0
  49. package/skills/components/wm-linear-layout.md +92 -0
  50. package/skills/components/wm-list.md +92 -0
  51. package/skills/components/wm-live-filter.md +50 -0
  52. package/skills/components/wm-live-form.md +35 -0
  53. package/skills/components/wm-login-dialog.md +50 -0
  54. package/skills/components/wm-login.md +39 -0
  55. package/skills/components/wm-marquee.md +31 -0
  56. package/skills/components/wm-menu.md +71 -0
  57. package/skills/components/wm-message.md +41 -0
  58. package/skills/components/wm-nav-item.md +28 -0
  59. package/skills/components/wm-nav.md +61 -0
  60. package/skills/components/wm-number.md +62 -0
  61. package/skills/components/wm-page-content.md +34 -0
  62. package/skills/components/wm-page-dialog.md +45 -0
  63. package/skills/components/wm-page-toast.md +34 -0
  64. package/skills/components/wm-page.md +34 -0
  65. package/skills/components/wm-pagination.md +62 -0
  66. package/skills/components/wm-panel.md +69 -0
  67. package/skills/components/wm-partial-container.md +32 -0
  68. package/skills/components/wm-picture.md +46 -0
  69. package/skills/components/wm-popover.md +51 -0
  70. package/skills/components/wm-prefab-container.md +29 -0
  71. package/skills/components/wm-prefab.md +35 -0
  72. package/skills/components/wm-progress-bar.md +42 -0
  73. package/skills/components/wm-progress-circle.md +45 -0
  74. package/skills/components/wm-radioset.md +66 -0
  75. package/skills/components/wm-rating.md +76 -0
  76. package/skills/components/wm-rich-text-editor.md +36 -0
  77. package/skills/components/wm-right-nav.md +32 -0
  78. package/skills/components/wm-search.md +66 -0
  79. package/skills/components/wm-select.md +129 -0
  80. package/skills/components/wm-slider.md +53 -0
  81. package/skills/components/wm-spinner.md +43 -0
  82. package/skills/components/wm-tab-pane.md +45 -0
  83. package/skills/components/wm-table.md +113 -0
  84. package/skills/components/wm-tabs.md +48 -0
  85. package/skills/components/wm-text.md +65 -0
  86. package/skills/components/wm-textarea.md +47 -0
  87. package/skills/components/wm-tile.md +34 -0
  88. package/skills/components/wm-time.md +63 -0
  89. package/skills/components/wm-top-nav.md +31 -0
  90. package/skills/components/wm-tree.md +41 -0
  91. package/skills/components/wm-upload.md +42 -0
  92. package/skills/components/wm-video.md +48 -0
  93. package/skills/components/wm-wizard.md +59 -0
  94. package/skills/index.json +1151 -0
  95. package/skills/tokens/border.md +85 -0
  96. package/skills/tokens/colors.md +97 -0
  97. package/skills/tokens/elevation.md +73 -0
  98. package/skills/tokens/spacing.md +89 -0
  99. package/skills/tokens/typography.md +88 -0
  100. package/dist/components.d.ts +0 -17
  101. package/dist/components.d.ts.map +0 -1
  102. package/dist/components.js +0 -67
  103. package/dist/components.js.map +0 -1
  104. package/dist/paths.d.ts +0 -43
  105. package/dist/paths.d.ts.map +0 -1
  106. package/dist/paths.js +0 -103
  107. package/dist/paths.js.map +0 -1
  108. package/dist/search.d.ts +0 -15
  109. package/dist/search.d.ts.map +0 -1
  110. package/dist/search.js +0 -130
  111. package/dist/search.js.map +0 -1
@@ -0,0 +1,107 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.loadIndex = loadIndex;
7
+ exports.readSkillFile = readSkillFile;
8
+ exports.findComponentSkill = findComponentSkill;
9
+ exports.findTokenSkill = findTokenSkill;
10
+ exports.searchSkills = searchSkills;
11
+ const node_fs_1 = __importDefault(require("node:fs"));
12
+ const node_path_1 = __importDefault(require("node:path"));
13
+ // Walk up from dist/skills/loader.js to find the skills/ directory at the package root
14
+ function findSkillsRoot() {
15
+ // dist/skills/loader.js → resolve ../../skills → <package-root>/skills
16
+ const candidates = [
17
+ node_path_1.default.resolve(__dirname, "../../skills"),
18
+ node_path_1.default.resolve(__dirname, "../../../skills"),
19
+ ];
20
+ for (const candidate of candidates) {
21
+ if (node_fs_1.default.existsSync(node_path_1.default.join(candidate, "index.json"))) {
22
+ return candidate;
23
+ }
24
+ }
25
+ throw new Error(`skills/index.json not found. Searched: ${candidates.join(", ")}`);
26
+ }
27
+ let _index = null;
28
+ let _skillsRoot = null;
29
+ function getSkillsRoot() {
30
+ if (!_skillsRoot) {
31
+ _skillsRoot = findSkillsRoot();
32
+ }
33
+ return _skillsRoot;
34
+ }
35
+ function loadIndex() {
36
+ if (_index)
37
+ return _index;
38
+ const root = getSkillsRoot();
39
+ const raw = node_fs_1.default.readFileSync(node_path_1.default.join(root, "index.json"), "utf8");
40
+ _index = JSON.parse(raw);
41
+ return _index;
42
+ }
43
+ function readSkillFile(relativePath) {
44
+ const root = getSkillsRoot();
45
+ const absolute = node_path_1.default.resolve(root, relativePath);
46
+ // Prevent directory traversal
47
+ if (!absolute.startsWith(root + node_path_1.default.sep) && absolute !== root) {
48
+ throw new Error(`Invalid skill path: ${relativePath}`);
49
+ }
50
+ if (!node_fs_1.default.existsSync(absolute)) {
51
+ throw new Error(`Skill file not found: ${relativePath}`);
52
+ }
53
+ return node_fs_1.default.readFileSync(absolute, "utf8");
54
+ }
55
+ /** Find a component skill by name (case-insensitive, strips "Wm" prefix for matching). */
56
+ function findComponentSkill(query) {
57
+ const index = loadIndex();
58
+ const normalised = query.toLowerCase().replace(/^wm/, "");
59
+ return index.components.find((c) => c.name.toLowerCase() === query.toLowerCase() ||
60
+ c.name.toLowerCase().replace(/^wm/, "") === normalised ||
61
+ c.file.toLowerCase().includes(normalised));
62
+ }
63
+ /** Find a token skill by name. */
64
+ function findTokenSkill(query) {
65
+ const index = loadIndex();
66
+ const q = query.toLowerCase();
67
+ return index.tokens.find((t) => t.name.toLowerCase() === q || t.tags.includes(q));
68
+ }
69
+ /** Score a skill entry against a free-text query. Returns 0 if no match. */
70
+ function scoreEntry(entry, terms) {
71
+ const name = ("name" in entry ? entry.name : "").toLowerCase();
72
+ const summary = entry.summary.toLowerCase();
73
+ const tags = entry.tags.map((t) => t.toLowerCase());
74
+ let score = 0;
75
+ for (const term of terms) {
76
+ if (name.includes(term))
77
+ score += 3;
78
+ if (tags.some((t) => t === term))
79
+ score += 2;
80
+ if (tags.some((t) => t.includes(term)))
81
+ score += 1;
82
+ if (summary.includes(term))
83
+ score += 1;
84
+ }
85
+ return score;
86
+ }
87
+ /** Search components and tokens by free-text query. Returns top matches. */
88
+ function searchSkills(query, topN = 5) {
89
+ const index = loadIndex();
90
+ const terms = query
91
+ .toLowerCase()
92
+ .split(/\s+/)
93
+ .filter((t) => t.length > 1);
94
+ const results = [];
95
+ for (const c of index.components) {
96
+ const score = scoreEntry(c, terms);
97
+ if (score > 0)
98
+ results.push({ type: "component", entry: c, score });
99
+ }
100
+ for (const t of index.tokens) {
101
+ const score = scoreEntry(t, terms);
102
+ if (score > 0)
103
+ results.push({ type: "token", entry: t, score });
104
+ }
105
+ return results.sort((a, b) => b.score - a.score).slice(0, topN);
106
+ }
107
+ //# sourceMappingURL=loader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loader.js","sourceRoot":"","sources":["../../src/skills/loader.ts"],"names":[],"mappings":";;;;;AAsDA,8BAMC;AAED,sCAWC;AAGD,gDASC;AAGD,wCAIC;AAkBD,oCAmBC;AAjID,sDAAyB;AACzB,0DAA6B;AAE7B,uFAAuF;AACvF,SAAS,cAAc;IACrB,uEAAuE;IACvE,MAAM,UAAU,GAAG;QACjB,mBAAI,CAAC,OAAO,CAAC,SAAS,EAAE,cAAc,CAAC;QACvC,mBAAI,CAAC,OAAO,CAAC,SAAS,EAAE,iBAAiB,CAAC;KAC3C,CAAC;IACF,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACnC,IAAI,iBAAE,CAAC,UAAU,CAAC,mBAAI,CAAC,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC,EAAE,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CAAC;IACD,KAAK,MAAM,CAAC,IAAI,KAAK,CAAC,MAAM,EAAE,CAAC;QAC7B,MAAM,KAAK,GAAG,UAAU,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;QACnC,IAAI,KAAK,GAAG,CAAC;YAAE,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;AAClE,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "wavemaker-dev-mcp",
3
- "version": "0.1.3",
4
- "description": "MCP server for WaveMaker React runtime and foundation-css: search, read props, and tokens from node_modules",
3
+ "version": "1.0.0",
4
+ "description": "MCP server for WaveMaker React pre-built component and token skill docs for AI-assisted code generation",
5
5
  "keywords": [
6
6
  "mcp",
7
7
  "wavemaker",
@@ -22,6 +22,7 @@
22
22
  },
23
23
  "files": [
24
24
  "dist",
25
+ "skills",
25
26
  "README.md",
26
27
  "LICENSE"
27
28
  ],
@@ -29,20 +30,23 @@
29
30
  "node": ">=18"
30
31
  },
31
32
  "scripts": {
32
- "build": "tsc",
33
+ "build": "rm -rf dist && tsc",
33
34
  "postbuild": "chmod +x dist/index.js",
34
35
  "start": "node dist/index.js",
35
36
  "test": "playwright test",
37
+ "generate-skills": "tsx scripts/generate-skills.ts",
36
38
  "prepublishOnly": "npm run build"
37
39
  },
38
40
  "dependencies": {
39
41
  "@modelcontextprotocol/sdk": "^1.29.0",
40
- "fast-glob": "^3.3.3",
41
42
  "zod": "^4.3.6"
42
43
  },
43
44
  "devDependencies": {
44
45
  "@playwright/test": "^1.59.0",
45
46
  "@types/node": "^25.5.0",
47
+ "fast-glob": "^3.3.3",
48
+ "ts-morph": "^27.0.2",
49
+ "tsx": "^4.21.0",
46
50
  "typescript": "^6.0.2"
47
51
  }
48
52
  }
@@ -0,0 +1,44 @@
1
+ ---
2
+ component: WmAccordionPane
3
+ category: container
4
+ import: components/container/accordion/accordion-pane
5
+ tags: [container, accordion, pane, icon, panel, badge]
6
+ summary: Accordion Pane layout container.
7
+ generated: true
8
+ ---
9
+
10
+ # WmAccordionPane
11
+
12
+ Accordion Pane layout container.
13
+
14
+ ## Usage
15
+
16
+ ```jsx
17
+ <WmAccordionPane
18
+ name="accordionPane"
19
+ title="My Panel"
20
+ />
21
+ ```
22
+
23
+ ## Props
24
+
25
+ | Prop | Type | Req | Default | Description |
26
+ |------|------|-----|---------|-------------|
27
+ | title | `string` | No | `"Title"` | Pane header title. |
28
+ | subheading | `string` | No | — | Optional subheading below the title. |
29
+ | iconclass | `string` | No | — | Icon class for the pane header (e.g., "wi wi-home"). |
30
+ | badgevalue | `string \| number` | No | — | Badge value displayed in the header. |
31
+ | badgetype | `AccordionPaneBadgeType` | No | `"default"` | Badge style variant. |
32
+ | isdefaultpane | `boolean` | No | — | Whether this pane is the default expanded pane. |
33
+ | active | `boolean` | Yes | — | Whether the pane is currently expanded. Injected by parent. |
34
+ | smoothscroll | `boolean` | No | `false` | Enable smooth scroll when expanding. |
35
+ | onExpand | `(event?: Event, props?: WmAccordionPaneProps) => void` | No | — | Called when pane expands. Injected by parent. |
36
+ | onCollapse | `(event?: Event, props?: WmAccordionPaneProps) => void` | No | — | Called when pane collapses. Injected by parent. |
37
+ | toggle | `(event?: Event, name?: string) => void` | No | — | Toggle function. Injected by parent. |
38
+ | expand | `(event?: Event, name?: string) => void` | No | — | Expand function. Injected by parent. |
39
+ | collapse | `(event?: Event, name?: string) => void` | No | — | Collapse function. Injected by parent. |
40
+ | onLoad | `(props: WmAccordionPaneProps, onLoadCallback?: () => void) => void` | No | — | Called when pane loads. |
41
+ | render | `(props: WmAccordionPaneProps, onLoadCallback?: () => void) => ReactNode` | No | — | Custom render function for pane content. Receives props and onLoad callback. |
42
+ | tabindex | `number` | No | — | Tab index for keyboard navigation. |
43
+
44
+ *Inherits BaseProps: `name`, `show`, `className`, `width`, `height`, `padding`, `margin`, `onClick`, and more.*
@@ -0,0 +1,43 @@
1
+ ---
2
+ component: WmAccordion
3
+ category: container
4
+ import: components/container/accordion
5
+ tags: [container, accordion, data-binding, input]
6
+ summary: Accordion layout container.
7
+ generated: true
8
+ ---
9
+
10
+ # WmAccordion
11
+
12
+ Accordion layout container.
13
+
14
+ ## Usage
15
+
16
+ ```jsx
17
+ <WmAccordion
18
+ name="accordion"
19
+ dataset={items}
20
+ />
21
+ ```
22
+
23
+ ## Props
24
+
25
+ | Prop | Type | Req | Default | Description |
26
+ |------|------|-----|---------|-------------|
27
+ | closeothers | `boolean` | No | `true` | When true, expanding a pane collapses all other panes. |
28
+ | defaultpaneindex | `number` | No | `0` | Index of the pane to show by default (0-based). |
29
+ | statehandler | `StateHandler` | No | `"none"` | Where to persist accordion state (active pane index). |
30
+ | dataset | `Record<string, unknown>[]` | No | — | Data source for dynamic accordion. Each item renders a pane. |
31
+ | nodatamessage | `string` | No | `"No Data Found"` | Message shown when dataset is empty in dynamic mode. |
32
+ | type | `"static" \| "dynamic"` | No | `"static"` | Accordion type: static (children) or dynamic (dataset). |
33
+ | onChange | `(event: { newPaneIndex: number; oldPaneIndex: number }) => void` | No | — | Called when the active pane changes. |
34
+ | onLoad | `(props: WmAccordionProps, onLoadCallback?: () => void) => void` | No | — | Called when accordion loads. Receives props and optional callback. |
35
+ | render | `( item: Record<string, unknown>, index: number, dataset: Record<string, unkno...` | No | — | Render function for dynamic accordion. Receives item, index, and full dataset. |
36
+
37
+ *Inherits BaseProps: `name`, `show`, `className`, `width`, `height`, `padding`, `margin`, `onClick`, and more.*
38
+
39
+ ## CSS Tokens
40
+
41
+ Component-specific CSS variables: `--wm-accordion-*`
42
+
43
+ See foundation-css: `src/tokens/web/components/accordion/accordion.json`
@@ -0,0 +1,42 @@
1
+ ---
2
+ component: WmAlertDialog
3
+ category: dialogs
4
+ import: components/dialogs/alert-dialog
5
+ tags: [dialogs, alert, dialog, icon]
6
+ summary: Alert Dialog — modal dialog.
7
+ generated: true
8
+ ---
9
+
10
+ # WmAlertDialog
11
+
12
+ Alert Dialog — modal dialog.
13
+
14
+ ## Usage
15
+
16
+ ```jsx
17
+ <WmAlertDialog
18
+ name="alertDialog"
19
+ title="My Panel"
20
+ />
21
+ ```
22
+
23
+ ## Props
24
+
25
+ | Prop | Type | Req | Default | Description |
26
+ |------|------|-----|---------|-------------|
27
+ | oktext | `string` | No | — | Text for the OK button. |
28
+ | title | `string` | No | — | Title text for the alert dialog. |
29
+ | alerttype | `string` | No | — | The type of alert (e.g. "error", "info"). |
30
+ | iconclass | `string` | No | — | CSS class for the icon. |
31
+ | text | `string` | No | — | Message text content for the alert. |
32
+ | message | `string \| ReactNode` | No | — | Message content for the alert (can be React node). |
33
+ | onOk | `() => void` | No | — | Callback fired when the OK button is clicked. |
34
+ | onClose | `(event?: SyntheticEvent) => void` | No | — | Callback fired when the dialog requests to be closed. |
35
+
36
+ *Inherits BaseProps: `name`, `show`, `className`, `width`, `height`, `padding`, `margin`, `onClick`, and more.*
37
+
38
+ ## CSS Tokens
39
+
40
+ Component-specific CSS variables: `--wm-alert-dialog-*`
41
+
42
+ See foundation-css: `src/tokens/web/components/modal-dialog/modal-dialog.json`
@@ -0,0 +1,51 @@
1
+ ---
2
+ component: WmAnchor
3
+ category: basic
4
+ import: components/basic/anchor
5
+ tags: [basic, anchor, caption, icon, badge]
6
+ summary: Anchor display widget.
7
+ generated: true
8
+ ---
9
+
10
+ # WmAnchor
11
+
12
+ Anchor display widget.
13
+
14
+ ## Usage
15
+
16
+ ```jsx
17
+ <WmAnchor
18
+ name="anchor"
19
+ caption="My Anchor"
20
+ />
21
+ ```
22
+
23
+ ## Props
24
+
25
+ | Prop | Type | Req | Default | Description |
26
+ |------|------|-----|---------|-------------|
27
+ | caption | `string` | Yes | `"Link"` | The text to be displayed as the anchor caption. |
28
+ | iconclass | `string` | No | — | The CSS class for the icon to be displayed. |
29
+ | encodeurl | `string` | No | — | If true, the hyperlink URL will be encoded. |
30
+ | hyperlink | `string` | No | — | The URL to navigate to when the anchor is clicked. |
31
+ | iconheight | `string` | No | — | The height of the icon. |
32
+ | iconwidth | `string` | No | — | The width of the icon. |
33
+ | iconurl | `string` | No | — | The URL of the icon image. |
34
+ | iconmargin | `string` | No | `"0 4"` | The margin around the icon. |
35
+ | iconposition | `IconPositionType` | No | `"left"` | The position of the icon relative to the caption. |
36
+ | badgevalue | `string \| number` | No | — | The value to be displayed in a badge next to the anchor. |
37
+ | shortcutkey | `string` | No | — | The keyboard shortcut for the anchor. |
38
+ | target | `string` | No | — | The target attribute for the anchor (e.g., '_blank', '_self'). |
39
+ | id | `string` | No | — | — |
40
+ | itemLink | `string` | No | — | Internal prop for linked items in lists. |
41
+ | href | `string` | No | — | Prop to allow overriding the href, though it's typically computed internally. |
42
+ | variant | `"standard"` | No | — | — |
43
+ | action | `string` | No | — | — |
44
+
45
+ *Inherits BaseProps: `name`, `show`, `className`, `width`, `height`, `padding`, `margin`, `onClick`, and more.*
46
+
47
+ ## CSS Tokens
48
+
49
+ Component-specific CSS variables: `--wm-anchor-*`
50
+
51
+ See foundation-css: `src/tokens/web/components/anchor/anchor.json`
@@ -0,0 +1,41 @@
1
+ ---
2
+ component: WmAudio
3
+ category: basic
4
+ import: components/basic/audio
5
+ tags: [basic, audio]
6
+ summary: Audio display widget.
7
+ generated: true
8
+ ---
9
+
10
+ # WmAudio
11
+
12
+ Audio display widget.
13
+
14
+ ## Usage
15
+
16
+ ```jsx
17
+ <WmAudio
18
+ name="audio"
19
+ />
20
+ ```
21
+
22
+ ## Props
23
+
24
+ | Prop | Type | Req | Default | Description |
25
+ |------|------|-----|---------|-------------|
26
+ | mp3format | `string` | Yes | — | The URL or source of the MP3 file. |
27
+ | muted | `boolean` | No | `false` | If true, the audio will be muted. |
28
+ | controls | `boolean` | No | `false` | If true, audio controls will be displayed. |
29
+ | loop | `boolean` | No | `false` | If true, the audio will loop back to the start when finished. |
30
+ | audiopreload | `"auto" \| "metadata" \| "none"` | No | `"auto"` | Specifies if and how the audio should be preloaded. |
31
+ | audiosupportmessage | `string` | No | — | Message to display if the browser does not support the audio element. |
32
+ | autoplay | `boolean` | No | `false` | If true, the audio will start playing automatically. |
33
+ | id | `string` | No | — | The unique ID for the audio element. |
34
+
35
+ *Inherits BaseProps: `name`, `show`, `className`, `width`, `height`, `padding`, `margin`, `onClick`, and more.*
36
+
37
+ ## CSS Tokens
38
+
39
+ Component-specific CSS variables: `--wm-audio-*`
40
+
41
+ See foundation-css: `src/tokens/web/components/audio/audio.json`
@@ -0,0 +1,36 @@
1
+ ---
2
+ component: WmButtonGroup
3
+ category: form
4
+ import: components/form/button-group
5
+ tags: [form, button, group]
6
+ summary: Button Group form element.
7
+ generated: true
8
+ ---
9
+
10
+ # WmButtonGroup
11
+
12
+ Button Group form element.
13
+
14
+ ## Usage
15
+
16
+ ```jsx
17
+ <WmButtonGroup
18
+ name="buttonGroup"
19
+ />
20
+ ```
21
+
22
+ ## Props
23
+
24
+ | Prop | Type | Req | Default | Description |
25
+ |------|------|-----|---------|-------------|
26
+ | vertical | `boolean` | No | `false` | If true, the buttons in the group will be arranged vertically. |
27
+ | horizontalalign | `string` | No | — | The horizontal alignment of the button group. |
28
+ | children | `ReactNode` | Yes | — | The children elements (typically buttons) to be rendered inside the group. |
29
+
30
+ *Inherits BaseProps: `name`, `show`, `className`, `width`, `height`, `padding`, `margin`, `onClick`, and more.*
31
+
32
+ ## CSS Tokens
33
+
34
+ Component-specific CSS variables: `--wm-button-group-*`
35
+
36
+ See foundation-css: `src/tokens/web/components/button-group/button-group.json`
@@ -0,0 +1,114 @@
1
+ ---
2
+ component: WmButton
3
+ category: form
4
+ import: components/form/button
5
+ tags: [button, action, submit, reset, icon, form, click]
6
+ summary: Clickable button with optional icon, badge, and caption. Supports submit/reset form roles.
7
+ related: [WmAnchor, WmIcon, WmToolbar]
8
+ ---
9
+
10
+ # WmButton
11
+
12
+ Standard clickable button. Supports captions, icons (left or right), badge counters, and HTML button types (`button`, `submit`, `reset`).
13
+
14
+ ## Usage
15
+
16
+ ```jsx
17
+ <WmButton
18
+ name="saveBtn"
19
+ caption="Save"
20
+ iconclass="wm-sl-l sl-cloud-upload"
21
+ onClick={(e, widget) => handleSave()}
22
+ />
23
+ ```
24
+
25
+ ## Key Props
26
+
27
+ | Prop | Type | Default | Description |
28
+ |------|------|---------|-------------|
29
+ | name | `string` | — | Required. Widget identifier |
30
+ | caption | `string` | — | Button label text |
31
+ | type | `"button" \| "submit" \| "reset"` | `"button"` | HTML button type. Use `"submit"` inside a `WmForm` |
32
+ | disabled | `boolean` | `false` | Disable the button |
33
+ | iconclass | `string` | — | CSS class for the icon (e.g. WaveMaker icon classes or FontAwesome) |
34
+ | iconurl | `string` | — | URL of an image icon |
35
+ | iconposition | `"left" \| "right"` | `"left"` | Position of icon relative to caption |
36
+ | iconwidth | `string` | — | Icon width (e.g. `"16px"`) |
37
+ | iconheight | `string` | — | Icon height |
38
+ | iconmargin | `string` | `"0 4"` | Margin around the icon (CSS shorthand) |
39
+ | badgevalue | `string \| number` | — | Badge count shown on the button |
40
+ | shortcutkey | `string` | — | Keyboard shortcut (e.g. `"s"` for Alt+S) |
41
+ | stopPropagation | `boolean` | `false` | Stop click event from bubbling |
42
+ | formName | `string` | — | Associate with a named form (for `type="submit"`) |
43
+ | onClick | `function` | — | `(event, widget) => void` |
44
+ | className | `string` | — | Additional CSS class names |
45
+ | show | `boolean` | `true` | Visibility |
46
+
47
+ ## Patterns
48
+
49
+ **Icon-only button (no caption):**
50
+ ```jsx
51
+ <WmButton name="deleteBtn" iconclass="wm-sl-l sl-trash" title="Delete" />
52
+ ```
53
+
54
+ **Submit button inside a form:**
55
+ ```jsx
56
+ <WmButton name="submitBtn" caption="Submit" type="submit" />
57
+ ```
58
+
59
+ **Button with badge (notification count):**
60
+ ```jsx
61
+ <WmButton name="notifBtn" iconclass="wm-sl-l sl-bell" badgevalue={unreadCount} />
62
+ ```
63
+
64
+ **Right-aligned icon:**
65
+ ```jsx
66
+ <WmButton name="nextBtn" caption="Next" iconclass="wm-sl-l sl-arrow-right" iconposition="right" />
67
+ ```
68
+
69
+ **Disabled state driven by expression:**
70
+ ```jsx
71
+ <WmButton name="saveBtn" caption="Save" disabled={!formValid} onClick={handleSave} />
72
+ ```
73
+
74
+ **Row of actions using WmLinearLayout:**
75
+ ```jsx
76
+ <WmLinearLayout name="formActions" direction="row" spacing={12}>
77
+ <WmLinearLayoutItem name="formActions_item1">
78
+ <WmButton name="saveBtn" caption="Save" type="submit" />
79
+ </WmLinearLayoutItem>
80
+ <WmLinearLayoutItem name="formActions_item2">
81
+ <WmButton name="cancelBtn" caption="Cancel" onClick={handleCancel} />
82
+ </WmLinearLayoutItem>
83
+ </WmLinearLayout>
84
+ ```
85
+
86
+ ## CSS Tokens
87
+
88
+ | Token | CSS Variable | Applied to |
89
+ |-------|-------------|-----------|
90
+ | Primary | `--wm-color-primary` | Filled button background |
91
+ | On-primary | `--wm-color-on-primary` | Filled button text |
92
+ | Label large | `--wm-label-large-font-size` | Button text size |
93
+ | Border radius | `--wm-radius-md` | Button corner rounding |
94
+ | Disabled opacity | `--wm-opacity-active` (38%) | Disabled state |
95
+
96
+ ## Appearance Classes (apply via `className`)
97
+
98
+ WaveMaker buttons accept Bootstrap-compatible variant classes:
99
+
100
+ | Class | Appearance |
101
+ |-------|-----------|
102
+ | `btn-primary` | Filled primary color |
103
+ | `btn-secondary` | Filled secondary color |
104
+ | `btn-outline-primary` | Outlined primary |
105
+ | `btn-danger` | Filled error/danger color |
106
+ | `btn-link` | Text-only, no background |
107
+ | `btn-sm` | Small size |
108
+ | `btn-lg` | Large size |
109
+
110
+ ## Notes
111
+
112
+ - Always set a unique `name` per button — it is used for widget references and accessibility.
113
+ - Use `type="submit"` when the button is inside a `WmForm`; it triggers form validation automatically.
114
+ - `iconclass` accepts WaveMaker icon classes (`wm-sl-l sl-*`) and FontAwesome classes (`fa fa-*`).
@@ -0,0 +1,54 @@
1
+ ---
2
+ component: WmCalendar
3
+ category: input
4
+ import: components/input/calendar
5
+ tags: [input, calendar, data-binding]
6
+ summary: Calendar input field.
7
+ generated: true
8
+ ---
9
+
10
+ # WmCalendar
11
+
12
+ Calendar input field.
13
+
14
+ ## Usage
15
+
16
+ ```jsx
17
+ <WmCalendar
18
+ name="calendar"
19
+ dataset={items}
20
+ />
21
+ ```
22
+
23
+ ## Props
24
+
25
+ | Prop | Type | Req | Default | Description |
26
+ |------|------|-----|---------|-------------|
27
+ | dataset | `unknown[] \| Record<string, unknown>` | No | — | The data source bound to the calendar (array of events). |
28
+ | datavalue | `string \| Date \| null` | No | — | The currently selected data value / date. |
29
+ | eventtitle | `string` | No | — | Field in the dataset used as the event title. |
30
+ | eventstart | `string` | No | — | Field in the dataset used as the event start date. |
31
+ | eventend | `string` | No | — | Field in the dataset used as the event end date. |
32
+ | eventallday | `string` | No | — | Field in the dataset indicating if the event is all-day. |
33
+ | eventclass | `string` | No | — | Field in the dataset used for the event CSS class. |
34
+ | controls | `string` | No | — | Calendar controls to display (e.g., navigation buttons). |
35
+ | calendartype | `string` | No | — | Type of calendar. |
36
+ | view | `string` | No | — | Default calendar view. |
37
+ | selectionmode | `string` | No | — | Selection mode for the calendar. |
38
+ | onSelect | `($start: Date, $end: Date, $view: string, $data: unknown[]) => void` | No | — | Callback invoked when a date or event is selected. |
39
+ | onBeforerender | `(event: SyntheticEvent, widget?: Record<string, unknown>) => void` | No | — | Callback invoked before the calendar is rendered. |
40
+ | onEventdrop | `( $event: SyntheticEvent, $newData: unknown[], $oldData: unknown[], $delta: u...` | No | — | Callback invoked when an event is dropped (drag-and-drop). |
41
+ | onEventresize | `( $event: SyntheticEvent, $newData: unknown[], $oldData: unknown[], $delta: u...` | No | — | Callback invoked when an event is resized. |
42
+ | onEventclick | `($event: SyntheticEvent, $data: unknown[], $view: string) => void` | No | — | Callback invoked when an event is clicked. |
43
+ | onEventrender | `($event: SyntheticEvent, $data: unknown[], $view: string) => void` | No | — | Callback invoked when an event is rendered. |
44
+ | onViewrender | `($view: unknown) => void` | No | — | Callback invoked when the calendar view changes. |
45
+ | onDateclick | `(event: SyntheticEvent, widget?: Record<string, unknown>) => void` | No | — | Callback invoked when a date cell is clicked. |
46
+ | tabindex | `number` | No | — | Tab index for keyboard navigation. |
47
+
48
+ *Inherits BaseProps: `name`, `show`, `className`, `width`, `height`, `padding`, `margin`, `onClick`, and more.*
49
+
50
+ ## CSS Tokens
51
+
52
+ Component-specific CSS variables: `--wm-calendar-*`
53
+
54
+ See foundation-css: `src/tokens/web/components/calendar/calendar.json`
@@ -0,0 +1,60 @@
1
+ ---
2
+ component: WmCard
3
+ category: data
4
+ import: components/data/card
5
+ tags: [data, card, icon]
6
+ summary: Card data widget.
7
+ generated: true
8
+ ---
9
+
10
+ # WmCard
11
+
12
+ Card data widget.
13
+
14
+ ## Usage
15
+
16
+ ```jsx
17
+ <WmCard
18
+ name="card"
19
+ title="My Panel"
20
+ />
21
+ ```
22
+
23
+ ## Props
24
+
25
+ | Prop | Type | Req | Default | Description |
26
+ |------|------|-----|---------|-------------|
27
+ | title | `string` | No | — | Title of the card. |
28
+ | subheading | `string` | No | — | Subheading of the card. |
29
+ | iconclass | `string` | No | — | CSS class for the icon in the card header. |
30
+ | iconurl | `string` | No | — | URL for the icon image in the card header. |
31
+ | actions | `string` | No | — | Actions available for the card, typically shown in a menu. |
32
+ | picturesource | `string` | No | — | Source URL for the card's main image. |
33
+ | picturetitle | `string` | No | — | Title for the card's main image. |
34
+ | imageheight | `string` | No | `"200px"` | Height of the card's main image. |
35
+ | itemaction | `string` | No | — | Action to perform when a menu item is clicked. |
36
+ | itemchildren | `string` | No | — | Property to use for submenu items. |
37
+ | itemicon | `string` | No | — | Property to use for menu item icons. |
38
+ | itemlabel | `string` | No | — | Property to use for menu item labels. |
39
+ | itemlink | `string` | No | — | Property to use for menu item links. |
40
+ | isactive | `string` | No | — | Property to determine if a menu item is active. |
41
+ | cardItem | `any` | No | — | The data item associated with the card. |
42
+ | userrole | `string` | No | — | User role for access control. |
43
+ | autoclose | `string` | No | `"always"` | When to close the action menu. |
44
+ | isFirst | `boolean` | No | — | Whether the card is the first item in a list. |
45
+ | isLast | `boolean` | No | — | Whether the card is the last item in a list. |
46
+ | currentItemWidgets | `any` | No | — | Widgets for the current item in a list. |
47
+ | onClick | `(event: MouseEvent, widget: any, item: any, currentItemWidgets: any) => void` | No | — | Callback for click event on the card. |
48
+ | onDblclick | `(event: MouseEvent, widget: any, item: any, currentItemWidgets: any) => void` | No | — | Callback for double click event on the card. |
49
+ | onMouseover | `(event: MouseEvent, widget: any, item: any, currentItemWidgets: any) => void` | No | — | Callback for mouse over event on the card. |
50
+ | onMouseout | `(event: MouseEvent, widget: any, item: any, currentItemWidgets: any) => void` | No | — | Callback for mouse out event on the card. |
51
+ | onMouseenter | `(event: MouseEvent, widget: any, item: any, currentItemWidgets: any) => void` | No | — | Callback for mouse enter event on the card. |
52
+ | onMouseleave | `(event: MouseEvent, widget: any, item: any, currentItemWidgets: any) => void` | No | — | Callback for mouse leave event on the card. |
53
+
54
+ *Inherits BaseProps: `name`, `show`, `className`, `width`, `height`, `padding`, `margin`, `onClick`, and more.*
55
+
56
+ ## CSS Tokens
57
+
58
+ Component-specific CSS variables: `--wm-card-*`
59
+
60
+ See foundation-css: `src/tokens/web/components/cards/cards.json`