@incursa/ui-kit 1.5.0 → 1.7.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.
- package/LLMS.txt +4 -4
- package/README.md +46 -6
- package/dist/inc-design-language.css +273 -56
- package/dist/inc-design-language.css.map +1 -1
- package/dist/inc-design-language.js +326 -1
- package/dist/inc-design-language.min.css +1 -1
- package/dist/inc-design-language.min.css.map +1 -1
- package/dist/mcp/ai/agent-instructions.json +21 -0
- package/dist/mcp/ai/llms-txt.json +21 -0
- package/dist/mcp/components/buttons.json +29 -0
- package/dist/mcp/components/cards.json +29 -0
- package/dist/mcp/components/filter-bars.json +28 -0
- package/dist/mcp/components/form-choices.json +29 -0
- package/dist/mcp/components/forms.json +29 -0
- package/dist/mcp/components/interaction.json +28 -0
- package/dist/mcp/components/layout.json +28 -0
- package/dist/mcp/components/metrics.json +28 -0
- package/dist/mcp/components/states.json +28 -0
- package/dist/mcp/components/status.json +28 -0
- package/dist/mcp/components/tables.json +32 -0
- package/dist/mcp/components/utilities.json +28 -0
- package/dist/mcp/examples/data-grid-advanced.json +22 -0
- package/dist/mcp/examples/demo.json +24 -0
- package/dist/mcp/examples/forms-and-validation.json +21 -0
- package/dist/mcp/examples/native-patterns.json +21 -0
- package/dist/mcp/examples/overlay-workflows.json +22 -0
- package/dist/mcp/examples/record-detail.json +21 -0
- package/dist/mcp/examples/reference.json +23 -0
- package/dist/mcp/examples/states.json +21 -0
- package/dist/mcp/examples/web-components.json +24 -0
- package/dist/mcp/examples/work-queue.json +21 -0
- package/dist/mcp/guides/allowed-web-component-families.json +19 -0
- package/dist/mcp/guides/choose-css-vs-scss-vs-js-vs-web-components.json +20 -0
- package/dist/mcp/guides/customization-order.json +20 -0
- package/dist/mcp/guides/decision-tree.json +28 -0
- package/dist/mcp/guides/guardrails.json +20 -0
- package/dist/mcp/guides/install.json +31 -0
- package/dist/mcp/guides/latest.json +25 -0
- package/dist/mcp/guides/overview.json +26 -0
- package/dist/mcp/guides/package-metadata.json +25 -0
- package/dist/mcp/guides/update.json +26 -0
- package/dist/mcp/guides/when-to-use-css-first.json +20 -0
- package/dist/mcp/install.json +36 -0
- package/dist/mcp/patterns/data-grid-advanced.json +22 -0
- package/dist/mcp/patterns/demo.json +24 -0
- package/dist/mcp/patterns/forms-and-validation.json +21 -0
- package/dist/mcp/patterns/native-patterns.json +21 -0
- package/dist/mcp/patterns/overlay-workflows.json +22 -0
- package/dist/mcp/patterns/record-detail.json +21 -0
- package/dist/mcp/patterns/reference.json +24 -0
- package/dist/mcp/patterns/states.json +21 -0
- package/dist/mcp/patterns/web-components.json +24 -0
- package/dist/mcp/patterns/work-queue.json +21 -0
- package/dist/mcp/resources.json +2100 -0
- package/dist/mcp/search-index.json +827 -0
- package/dist/mcp/specs/control-conventions.json +21 -0
- package/dist/mcp/specs/public-surface.json +21 -0
- package/dist/mcp/specs/requirements-index.json +21 -0
- package/dist/mcp/specs/verification-index.json +21 -0
- package/dist/mcp/update.json +24 -0
- package/dist/mcp/worker.mjs +60079 -0
- package/dist/mcp/worker.mjs.map +7 -0
- package/dist/web-components/README.md +10 -4
- package/dist/web-components/RUNTIME-NOTES.md +7 -2
- package/dist/web-components/components/actions.js +633 -0
- package/dist/web-components/components/collections.js +272 -0
- package/dist/web-components/components/dom-helpers.js +46 -0
- package/dist/web-components/components/feedback.js +181 -3
- package/dist/web-components/index.js +4425 -813
- package/package.json +19 -8
- package/src/inc-design-language.js +326 -1
- package/src/inc-design-language.scss +300 -56
- package/src/mcp/worker.ts +858 -0
- package/src/web-components/README.md +10 -4
- package/src/web-components/RUNTIME-NOTES.md +7 -2
- package/src/web-components/components/actions.js +633 -0
- package/src/web-components/components/collections.js +272 -0
- package/src/web-components/components/dom-helpers.js +46 -0
- package/src/web-components/components/feedback.js +181 -3
- package/src/web-components/index.js +53 -847
package/LLMS.txt
CHANGED
|
@@ -32,7 +32,7 @@ Primary files:
|
|
|
32
32
|
- [`specs/verification/ui-kit/_index.md`](specs/verification/ui-kit/_index.md): auditable source-review, smoke-validation, and Playwright browser-automation baseline for the UI kit surface.
|
|
33
33
|
- [`states.html`](states.html), [`forms-and-validation.html`](forms-and-validation.html), [`data-grid-advanced.html`](data-grid-advanced.html), [`overlay-workflows.html`](overlay-workflows.html): workflow-heavy composition patterns.
|
|
34
34
|
- [`demo.html`](demo.html), [`work-queue.html`](work-queue.html), [`record-detail.html`](record-detail.html), [`native-patterns.html`](native-patterns.html): fuller page examples.
|
|
35
|
-
- The v1 Web Component families are layouts and shells, navbar/tabs/user-menu, field/input-group/choice-group/readonly-field/validation-summary, state-panel/live-region/auto-refresh/theme-switcher, and disclosure/dialog/drawer.
|
|
35
|
+
- The v1 Web Component families are layouts and shells, navbar/tabs/user-menu, field/input-group/choice-group/readonly-field/validation-summary, state-panel/live-region/auto-refresh/theme-switcher, badge/spinner atoms, button/button-group/button-toolbar/close-button hosts, alert/empty-state/list-group/key-value hosts, and disclosure/dialog/drawer.
|
|
36
36
|
- Prefer those browser-native components for supported v1 surfaces when the consumer wants declarative markup from plain HTML/JS; keep CSS-first HTML for surfaces that are intentionally outside the WC layer.
|
|
37
37
|
- Tables, utilities, filter/bulk/file workflows, permission banners, toasts, and compatibility overlay shells stay CSS-only or deferred in v1.
|
|
38
38
|
|
|
@@ -61,11 +61,11 @@ Core primitives:
|
|
|
61
61
|
- Cards and shells: use [`inc-card`](reference.html) for plain cards. Use [`inc-header-body`](reference.html) for titled sections with actions. Use [`inc-header-body--table-body`](reference.html) when the body contains a table and should keep body padding without extra bottom table margin.
|
|
62
62
|
- App layout: use [`inc-app-shell`](reference.html), [`inc-page`](reference.html), [`inc-breadcrumb-body`](reference.html), [`inc-footer-bar`](reference.html), [`inc-footer-bar__menu`](reference.html), [`inc-footer-bar__meta`](reference.html), [`inc-navbar`](reference.html), [`inc-breadcrumb`](reference.html), [`inc-nav-triad`](reference.html), and [`inc-sidebar-menu`](reference.html).
|
|
63
63
|
- Utilities: use [`inc-u-stack-*`](reference.html), [`inc-u-gap-*`](reference.html), [`inc-grid`](reference.html), [`inc-row`](reference.html), [`inc-col`](reference.html), [`inc-stack`](reference.html), and [`inc-flex-*`](reference.html) when composition needs a public helper class.
|
|
64
|
-
- States and workflow: use [`inc-state-panel`](reference.html), [`inc-permission-banner`](reference.html), [`inc-toast-card`](reference.html), [`inc-
|
|
64
|
+
- States and workflow: use [`inc-state-panel`](reference.html), [`inc-permission-banner`](reference.html), [`inc-toast-card`](reference.html), [`inc-empty-state`](reference.html), [`inc-list-group`](reference.html), [`inc-key-value`](reference.html), [`inc-timeline`](reference.html), [`inc-file-dropzone`](reference.html), and [`inc-file-row`](reference.html).
|
|
65
65
|
- Interaction: use [`data-inc-toggle="menu"`](src/inc-design-language.js), [`data-inc-toggle="tab"`](src/inc-design-language.js), and [`data-inc-toggle="collapse"`](src/inc-design-language.js) with [`data-inc-target="#target-id"`](src/inc-design-language.js) when you want the helper to wire behavior. Use [`data-inc-dismiss="modal"`](src/inc-design-language.js) / [`data-inc-dismiss="offcanvas"`](src/inc-design-language.js), [`data-inc-accordion`](src/inc-design-language.js), [`data-inc-backdrop-for`](src/inc-design-language.js), [`data-inc-initial-focus`](src/inc-design-language.js), [`data-inc-auto-refresh`](src/inc-design-language.js), and the [`data-inc-refresh-seconds`](src/inc-design-language.js), [`data-inc-refresh-label`](src/inc-design-language.js), [`data-inc-refresh-loading-label`](src/inc-design-language.js), [`data-inc-refresh-paused-label`](src/inc-design-language.js), [`data-inc-refresh-pause-action-label`](src/inc-design-language.js), and [`data-inc-refresh-resume-action-label`](src/inc-design-language.js) hooks when you need the rest of the helper contract. Use [`data-inc-native-dialog-open="dialog-id"`](src/inc-design-language.js) when you want the helper to open a native `<dialog>`.
|
|
66
|
-
- Web Components: prefer the same-package entrypoint for layouts, navbar/tabs/user-menu, field/input wrappers, state/live-region/auto-refresh/theme switcher, and disclosure/dialog/drawer shells. Keep tables, utilities, filter/bulk/file workflows, and presentation-only atoms CSS-first in v1.
|
|
66
|
+
- Web Components: prefer the same-package entrypoint for layouts, navbar/tabs/user-menu, field/input wrappers, badge/spinner atoms, button/action/detail/collection hosts, state/live-region/auto-refresh/theme switcher, and disclosure/dialog/drawer shells. Keep tables, utilities, filter/bulk/file workflows, and the remaining presentation-only atoms CSS-first in v1.
|
|
67
67
|
- Native interaction: use [`details.inc-disclosure`](reference.html), [`details.inc-native-menu`](reference.html), and [`dialog.inc-native-dialog`](reference.html).
|
|
68
|
-
- Status: use [`inc-badge
|
|
68
|
+
- Status: use [`inc-badge`](reference.html) with tone values such as `success`, `warning`, `danger`, or `info`; use [`inc-spinner`](reference.html) with `variant="border|grow"`, optional tone, `size="sm"`, and a `label` for accessible loading state.
|
|
69
69
|
- Metrics: use [`inc-summary-overview`](reference.html) and [`inc-summary-block`](reference.html).
|
|
70
70
|
|
|
71
71
|
Customization order:
|
package/README.md
CHANGED
|
@@ -36,10 +36,11 @@ The v1 Web Component scope covers:
|
|
|
36
36
|
- layouts and shells: [`inc-app-shell`](reference.html), [`inc-page`](reference.html), [`inc-page-header`](reference.html), [`inc-section`](reference.html), [`inc-card`](reference.html), [`inc-summary-overview`](reference.html), [`inc-summary-block`](reference.html), [`inc-footer-bar`](reference.html)
|
|
37
37
|
- navigation: [`inc-navbar`](reference.html), [`inc-tabs`](reference.html), [`inc-user-menu`](reference.html)
|
|
38
38
|
- forms and inputs: [`inc-field`](reference.html), [`inc-input-group`](reference.html), [`inc-choice-group`](reference.html), [`inc-readonly-field`](reference.html), [`inc-validation-summary`](reference.html)
|
|
39
|
-
- feedback and status: [`inc-state-panel`](reference.html), [`inc-live-region`](reference.html), [`inc-auto-refresh`](reference.html), [`inc-theme-switcher`](reference.html)
|
|
39
|
+
- feedback and status: [`inc-state-panel`](reference.html), [`inc-live-region`](reference.html), [`inc-auto-refresh`](reference.html), [`inc-theme-switcher`](reference.html), [`inc-badge`](reference.html), [`inc-spinner`](reference.html)
|
|
40
|
+
- actions and detail shells: [`inc-button`](reference.html), [`inc-button-group`](reference.html), [`inc-button-toolbar`](reference.html), [`inc-close-button`](reference.html), [`inc-alert`](reference.html), [`inc-empty-state`](reference.html), [`inc-list-group`](reference.html), [`inc-key-value-grid`](reference.html), [`inc-key-value`](reference.html)
|
|
40
41
|
- overlays and disclosures: [`inc-disclosure`](reference.html), [`inc-dialog`](reference.html), [`inc-drawer`](reference.html)
|
|
41
42
|
|
|
42
|
-
The intentionally deferred surfaces stay CSS-first in v1, including tables and data presentation, filter and bulk toolbars, file workflows, permission banners, toasts, utility helpers, and the remaining compatibility overlay shells.
|
|
43
|
+
The intentionally deferred surfaces stay CSS-first in v1, including tables and the remaining data presentation surfaces, filter and bulk toolbars, file workflows, permission banners, toasts, utility helpers, and the remaining compatibility overlay shells.
|
|
43
44
|
|
|
44
45
|
For maintainers, treat the Web Component layer as an additive wrapper over the same design language: one package, one token system, one naming vocabulary, and the same helper behavior where it already exists.
|
|
45
46
|
|
|
@@ -159,10 +160,10 @@ For titled sections that wrap tables, use [`inc-header-body--table-body`](refere
|
|
|
159
160
|
|
|
160
161
|
## CSS-only vs JS-assisted
|
|
161
162
|
|
|
162
|
-
- CSS-only/native behavior is enough for layout, cards, tables,
|
|
163
|
+
- CSS-only/native behavior is enough for layout, cards, tables, breadcrumbs, sticky footer, and most surface styling.
|
|
163
164
|
- Stateful controls still need behavior:
|
|
164
165
|
tabs, collapsible sections, menus/dropdowns, modal and offcanvas shells, and auto-refresh countdowns with pause/resume behavior.
|
|
165
|
-
- Alert and toast surfaces stay CSS/HTML-first
|
|
166
|
+
- Alert and toast surfaces can stay CSS/HTML-first when the app only needs static messaging; use the Web Component host when you want standardized tone or optional dismissal behavior.
|
|
166
167
|
- This package now includes an optional dependency-free helper at [`dist/inc-design-language.js`](dist/inc-design-language.js) for:
|
|
167
168
|
user-menu dropdowns, tab switching, collapse/accordion toggles, legacy modal/offcanvas shells, native dialog launching, page auto-refresh countdown widgets, and theme switching controls.
|
|
168
169
|
- The helper also exposes `window.IncTheme` and listens for [`data-inc-theme-mode`](src/inc-design-language.js), [`data-inc-theme-toggle`](src/inc-design-language.js), and [`data-inc-theme-select`](src/inc-design-language.js) controls.
|
|
@@ -176,7 +177,7 @@ For titled sections that wrap tables, use [`inc-header-body--table-body`](refere
|
|
|
176
177
|
- Use the CSS class surface when you already have the HTML structure and only need the design language.
|
|
177
178
|
- Use the Web Component entrypoint when you want declarative slots, attributes, and DOM events around the approved v1 component families.
|
|
178
179
|
- Use native HTML primitives when they already solve the interaction cleanly and keep the semantics simpler.
|
|
179
|
-
- Keep tables, utilities, and
|
|
180
|
+
- Keep tables, utilities, and the remaining low-value atoms class-based until there is a clear component contract worth adding.
|
|
180
181
|
- Treat the Web Component layer as a layered entrypoint in the same package, not as a separate design system.
|
|
181
182
|
|
|
182
183
|
## Use it quickly
|
|
@@ -323,7 +324,7 @@ There are three supported ways to use it.
|
|
|
323
324
|
|
|
324
325
|
- Import the same-package `./web-components` entrypoint when you want browser-native custom elements for the supported v1 families.
|
|
325
326
|
- Keep the CSS bundle in place because the custom elements are designed to sit on top of the same class and token vocabulary.
|
|
326
|
-
- Prefer this layer for declarative shell components, and
|
|
327
|
+
- Prefer this layer for declarative shell components, standardized atomic controls, and repeated action/detail or collection hosts, and keep static tables plus the remaining low-value atoms on the CSS surface.
|
|
327
328
|
|
|
328
329
|
Practical recommendation for a .NET Razor Pages or MVC app:
|
|
329
330
|
|
|
@@ -339,6 +340,7 @@ This repository is set up for:
|
|
|
339
340
|
|
|
340
341
|
- CI on pushes and pull requests via [`.github/workflows/ci.yml`](.github/workflows/ci.yml)
|
|
341
342
|
- GitHub Pages showcase deployment from `main` via [`.github/workflows/pages.yml`](.github/workflows/pages.yml)
|
|
343
|
+
- Cloudflare Worker MCP deployment from `main` via [`.github/workflows/mcp-worker.yml`](.github/workflows/mcp-worker.yml)
|
|
342
344
|
- npm Trusted Publishing on `v*` tag pushes via [`.github/workflows/npm-publish.yml`](.github/workflows/npm-publish.yml)
|
|
343
345
|
- Public release hygiene through `LICENSE`, [`CHANGELOG.md`](CHANGELOG.md), [`CONTRIBUTING.md`](CONTRIBUTING.md), and [`RELEASING.md`](RELEASING.md)
|
|
344
346
|
- Brand assets in [`assets/brand/`](assets/brand) so README and future docs do not depend on external image hosting
|
|
@@ -378,3 +380,41 @@ $inc-font-family-sans: "Aptos", "Segoe UI", sans-serif;
|
|
|
378
380
|
|
|
379
381
|
@import "./src/inc-design-language";
|
|
380
382
|
```
|
|
383
|
+
|
|
384
|
+
## MCP Worker
|
|
385
|
+
|
|
386
|
+
The repository also ships a deterministic Cloudflare Worker that exposes the UI kit content through Model Context Protocol. The Worker is intentionally read-only and stateless:
|
|
387
|
+
|
|
388
|
+
- `POST /mcp` serves the MCP JSON-RPC endpoint.
|
|
389
|
+
- `GET /mcp` serves a small HTML index for browsing the generated manifest.
|
|
390
|
+
- `GET /mcp/resource/*` serves a human-readable resource page for inspection.
|
|
391
|
+
- The Worker also tolerates a leading path prefix from a load balancer and keeps the rendered links under the configured `MCP_PATH_PREFIX` value.
|
|
392
|
+
- Build-time manifests live under `dist/mcp/` and are regenerated from the repo docs, examples, specs, and package metadata.
|
|
393
|
+
- The Worker does not call an LLM, crawl the web, or depend on a database.
|
|
394
|
+
|
|
395
|
+
The local workflow is:
|
|
396
|
+
|
|
397
|
+
```bash
|
|
398
|
+
npm run build
|
|
399
|
+
npm run test:mcp
|
|
400
|
+
```
|
|
401
|
+
|
|
402
|
+
`npm run build` regenerates the MCP manifests and bundles the Worker. `npm run verify` runs the full repo gate, including the MCP transport tests and the manifest smoke check.
|
|
403
|
+
|
|
404
|
+
For local Worker development, use Wrangler against the generated bundle:
|
|
405
|
+
|
|
406
|
+
```bash
|
|
407
|
+
npm run build:mcp
|
|
408
|
+
npx wrangler dev --config wrangler.toml
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
To refresh the generated manifests after changing docs or examples, rerun `npm run build:mcp` or the full `npm run build` pipeline.
|
|
412
|
+
If you only need to refresh the JSON manifests before bundling, run `npm run build:mcp:manifests`.
|
|
413
|
+
|
|
414
|
+
To deploy the Worker:
|
|
415
|
+
|
|
416
|
+
```bash
|
|
417
|
+
npm run deploy:mcp
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
The Cloudflare deploy workflow uses `CLOUDFLARE_API_TOKEN` and `CLOUDFLARE_ACCOUNT_ID` secrets and deploys the bundled Worker from `dist/mcp/worker.mjs`.
|