@incursa/ui-kit 1.6.1 → 1.8.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 (47) hide show
  1. package/NOTICE +8 -0
  2. package/README.md +16 -0
  3. package/dist/icons/index.js +371 -0
  4. package/dist/icons/package.json +3 -0
  5. package/dist/inc-design-language.css +144 -51
  6. package/dist/inc-design-language.css.map +1 -1
  7. package/dist/inc-design-language.js +1627 -1206
  8. package/dist/inc-design-language.min.css +1 -1
  9. package/dist/inc-design-language.min.css.map +1 -1
  10. package/dist/mcp/components/buttons.json +3 -3
  11. package/dist/mcp/components/cards.json +3 -3
  12. package/dist/mcp/components/metrics.json +3 -3
  13. package/dist/mcp/components/states.json +3 -3
  14. package/dist/mcp/components/status.json +3 -3
  15. package/dist/mcp/examples/data-grid-advanced.json +2 -2
  16. package/dist/mcp/examples/demo.json +2 -2
  17. package/dist/mcp/examples/overlay-workflows.json +2 -2
  18. package/dist/mcp/examples/reference.json +2 -2
  19. package/dist/mcp/examples/states.json +2 -2
  20. package/dist/mcp/examples/web-components.json +2 -2
  21. package/dist/mcp/guides/latest.json +2 -2
  22. package/dist/mcp/guides/package-metadata.json +2 -2
  23. package/dist/mcp/guides/update.json +2 -2
  24. package/dist/mcp/install.json +1 -1
  25. package/dist/mcp/patterns/data-grid-advanced.json +2 -2
  26. package/dist/mcp/patterns/demo.json +2 -2
  27. package/dist/mcp/patterns/overlay-workflows.json +2 -2
  28. package/dist/mcp/patterns/reference.json +2 -2
  29. package/dist/mcp/patterns/states.json +2 -2
  30. package/dist/mcp/patterns/web-components.json +2 -2
  31. package/dist/mcp/resources.json +83 -80
  32. package/dist/mcp/search-index.json +25 -25
  33. package/dist/mcp/update.json +2 -2
  34. package/dist/mcp/worker.mjs +394 -391
  35. package/dist/mcp/worker.mjs.map +2 -2
  36. package/dist/web-components/README.md +4 -0
  37. package/dist/web-components/components/actions.js +237 -14
  38. package/dist/web-components/components/feedback.js +71 -7
  39. package/dist/web-components/index.js +583 -21
  40. package/package.json +10 -3
  41. package/src/icons/index.js +229 -0
  42. package/src/icons/package.json +3 -0
  43. package/src/inc-design-language.js +327 -1
  44. package/src/inc-design-language.scss +178 -55
  45. package/src/web-components/README.md +4 -0
  46. package/src/web-components/components/actions.js +237 -14
  47. package/src/web-components/components/feedback.js +71 -7
package/NOTICE CHANGED
@@ -2,3 +2,11 @@ Incursa UI Kit
2
2
  Copyright 2026 Incursa
3
3
 
4
4
  This product includes software developed and maintained by Incursa.
5
+
6
+ Lucide
7
+ Copyright (c) 2026 Lucide Icons and Contributors
8
+ Licensed under the ISC License.
9
+
10
+ Some Lucide icons are derived from Feather icons.
11
+ Copyright (c) 2013-present Cole Bemis
12
+ Licensed under the MIT License.
package/README.md CHANGED
@@ -326,6 +326,22 @@ There are three supported ways to use it.
326
326
  - Keep the CSS bundle in place because the custom elements are designed to sit on top of the same class and token vocabulary.
327
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.
328
328
 
329
+ ### Icons
330
+
331
+ Incursa components use semantic icon names instead of Lucide component names. The default renderer maps names such as `info`, `help`, `success`, `warning`, `error`, `upload`, `document`, `download`, `settings`, and `external-link` to bundled Lucide SVGs.
332
+
333
+ Use `data-inc-icon="warning"` in CSS-first markup loaded with `dist/inc-design-language.js`, or use component attributes such as `<inc-alert tone="warning">` and `<inc-button icon="download">Download</inc-button>` in the Web Component layer. Decorative package icons are rendered with `aria-hidden="true"`; icon-only controls still need an accessible label.
334
+
335
+ Consumers can replace the global renderer without depending on Lucide names:
336
+
337
+ ```js
338
+ import { setIconRenderer } from "@incursa/ui-kit/icons";
339
+
340
+ setIconRenderer((name, options) => {
341
+ // Return an SVG/HTMLElement or an SVG string for the semantic Incursa name.
342
+ });
343
+ ```
344
+
329
345
  Practical recommendation for a .NET Razor Pages or MVC app:
330
346
 
331
347
  - If you just want the finished look, copy or install the package and reference [`dist/inc-design-language.css`](dist/inc-design-language.css) from your layout.
@@ -0,0 +1,371 @@
1
+ // node_modules/lucide/dist/esm/defaultAttributes.mjs
2
+ var defaultAttributes = {
3
+ xmlns: "http://www.w3.org/2000/svg",
4
+ width: 24,
5
+ height: 24,
6
+ viewBox: "0 0 24 24",
7
+ fill: "none",
8
+ stroke: "currentColor",
9
+ "stroke-width": 2,
10
+ "stroke-linecap": "round",
11
+ "stroke-linejoin": "round"
12
+ };
13
+
14
+ // node_modules/lucide/dist/esm/createElement.mjs
15
+ var createSVGElement = ([tag, attrs, children]) => {
16
+ const element = document.createElementNS("http://www.w3.org/2000/svg", tag);
17
+ Object.keys(attrs).forEach((name) => {
18
+ element.setAttribute(name, String(attrs[name]));
19
+ });
20
+ if (children?.length) {
21
+ children.forEach((child) => {
22
+ const childElement = createSVGElement(child);
23
+ element.appendChild(childElement);
24
+ });
25
+ }
26
+ return element;
27
+ };
28
+ var createElement = (iconNode, customAttrs = {}) => {
29
+ const tag = "svg";
30
+ const attrs = {
31
+ ...defaultAttributes,
32
+ ...customAttrs
33
+ };
34
+ return createSVGElement([tag, attrs, iconNode]);
35
+ };
36
+
37
+ // node_modules/lucide/dist/esm/icons/circle-check.mjs
38
+ var CircleCheck = [
39
+ ["circle", { cx: "12", cy: "12", r: "10" }],
40
+ ["path", { d: "m9 12 2 2 4-4" }]
41
+ ];
42
+
43
+ // node_modules/lucide/dist/esm/icons/circle-question-mark.mjs
44
+ var CircleQuestionMark = [
45
+ ["circle", { cx: "12", cy: "12", r: "10" }],
46
+ ["path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }],
47
+ ["path", { d: "M12 17h.01" }]
48
+ ];
49
+
50
+ // node_modules/lucide/dist/esm/icons/circle-x.mjs
51
+ var CircleX = [
52
+ ["circle", { cx: "12", cy: "12", r: "10" }],
53
+ ["path", { d: "m15 9-6 6" }],
54
+ ["path", { d: "m9 9 6 6" }]
55
+ ];
56
+
57
+ // node_modules/lucide/dist/esm/icons/download.mjs
58
+ var Download = [
59
+ ["path", { d: "M12 15V3" }],
60
+ ["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }],
61
+ ["path", { d: "m7 10 5 5 5-5" }]
62
+ ];
63
+
64
+ // node_modules/lucide/dist/esm/icons/external-link.mjs
65
+ var ExternalLink = [
66
+ ["path", { d: "M15 3h6v6" }],
67
+ ["path", { d: "M10 14 21 3" }],
68
+ ["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }]
69
+ ];
70
+
71
+ // node_modules/lucide/dist/esm/icons/file-text.mjs
72
+ var FileText = [
73
+ [
74
+ "path",
75
+ {
76
+ d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z"
77
+ }
78
+ ],
79
+ ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5" }],
80
+ ["path", { d: "M10 9H8" }],
81
+ ["path", { d: "M16 13H8" }],
82
+ ["path", { d: "M16 17H8" }]
83
+ ];
84
+
85
+ // node_modules/lucide/dist/esm/icons/folder-plus.mjs
86
+ var FolderPlus = [
87
+ ["path", { d: "M12 10v6" }],
88
+ ["path", { d: "M9 13h6" }],
89
+ [
90
+ "path",
91
+ {
92
+ d: "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"
93
+ }
94
+ ]
95
+ ];
96
+
97
+ // node_modules/lucide/dist/esm/icons/info.mjs
98
+ var Info = [
99
+ ["circle", { cx: "12", cy: "12", r: "10" }],
100
+ ["path", { d: "M12 16v-4" }],
101
+ ["path", { d: "M12 8h.01" }]
102
+ ];
103
+
104
+ // node_modules/lucide/dist/esm/icons/lock.mjs
105
+ var Lock = [
106
+ ["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2" }],
107
+ ["path", { d: "M7 11V7a5 5 0 0 1 10 0v4" }]
108
+ ];
109
+
110
+ // node_modules/lucide/dist/esm/icons/pause.mjs
111
+ var Pause = [
112
+ ["rect", { x: "14", y: "3", width: "5", height: "18", rx: "1" }],
113
+ ["rect", { x: "5", y: "3", width: "5", height: "18", rx: "1" }]
114
+ ];
115
+
116
+ // node_modules/lucide/dist/esm/icons/play.mjs
117
+ var Play = [
118
+ [
119
+ "path",
120
+ { d: "M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z" }
121
+ ]
122
+ ];
123
+
124
+ // node_modules/lucide/dist/esm/icons/refresh-cw.mjs
125
+ var RefreshCw = [
126
+ ["path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" }],
127
+ ["path", { d: "M21 3v5h-5" }],
128
+ ["path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" }],
129
+ ["path", { d: "M8 16H3v5" }]
130
+ ];
131
+
132
+ // node_modules/lucide/dist/esm/icons/search-x.mjs
133
+ var SearchX = [
134
+ ["path", { d: "m13.5 8.5-5 5" }],
135
+ ["path", { d: "m8.5 8.5 5 5" }],
136
+ ["circle", { cx: "11", cy: "11", r: "8" }],
137
+ ["path", { d: "m21 21-4.3-4.3" }]
138
+ ];
139
+
140
+ // node_modules/lucide/dist/esm/icons/settings.mjs
141
+ var Settings = [
142
+ [
143
+ "path",
144
+ {
145
+ d: "M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915"
146
+ }
147
+ ],
148
+ ["circle", { cx: "12", cy: "12", r: "3" }]
149
+ ];
150
+
151
+ // node_modules/lucide/dist/esm/icons/shield-check.mjs
152
+ var ShieldCheck = [
153
+ [
154
+ "path",
155
+ {
156
+ d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"
157
+ }
158
+ ],
159
+ ["path", { d: "m9 12 2 2 4-4" }]
160
+ ];
161
+
162
+ // node_modules/lucide/dist/esm/icons/triangle-alert.mjs
163
+ var TriangleAlert = [
164
+ ["path", { d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" }],
165
+ ["path", { d: "M12 9v4" }],
166
+ ["path", { d: "M12 17h.01" }]
167
+ ];
168
+
169
+ // node_modules/lucide/dist/esm/icons/upload.mjs
170
+ var Upload = [
171
+ ["path", { d: "M12 3v12" }],
172
+ ["path", { d: "m17 8-5-5-5 5" }],
173
+ ["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }]
174
+ ];
175
+
176
+ // src/icons/index.js
177
+ var ICON_NODES = Object.freeze({
178
+ info: Info,
179
+ help: CircleQuestionMark,
180
+ success: CircleCheck,
181
+ warning: TriangleAlert,
182
+ error: CircleX,
183
+ upload: Upload,
184
+ document: FileText,
185
+ download: Download,
186
+ settings: Settings,
187
+ "external-link": ExternalLink,
188
+ empty: FolderPlus,
189
+ "no-results": SearchX,
190
+ loading: RefreshCw,
191
+ lock: Lock,
192
+ pause: Pause,
193
+ play: Play,
194
+ permission: ShieldCheck
195
+ });
196
+ var ICON_NAMES = Object.freeze(Object.keys(ICON_NODES));
197
+ var DEFAULT_SIZE = 16;
198
+ function getNamespace() {
199
+ if (typeof globalThis === "undefined") {
200
+ return null;
201
+ }
202
+ const root = globalThis.IncWebComponents || (globalThis.IncWebComponents = {});
203
+ const icons = root.icons || (root.icons = {});
204
+ if (!icons.names) {
205
+ icons.names = ICON_NAMES;
206
+ }
207
+ if (!icons.defaultRenderer) {
208
+ icons.defaultRenderer = renderDefaultIcon;
209
+ }
210
+ if (!icons.render) {
211
+ icons.render = renderIncIcon;
212
+ }
213
+ if (!icons.setRenderer) {
214
+ icons.setRenderer = setIconRenderer;
215
+ }
216
+ return icons;
217
+ }
218
+ function normalizeIconName(name) {
219
+ return String(name || "").trim().toLowerCase().replace(/[_\s]+/g, "-");
220
+ }
221
+ function normalizeSize(value) {
222
+ const parsed = Number.parseFloat(value);
223
+ return Number.isFinite(parsed) && parsed > 0 ? parsed : DEFAULT_SIZE;
224
+ }
225
+ function buildIconAttributes(name, options = {}) {
226
+ const size = normalizeSize(options.size);
227
+ const className = options.className || "inc-icon";
228
+ const attrs = {
229
+ width: size,
230
+ height: size,
231
+ "data-inc-icon": name,
232
+ class: className,
233
+ focusable: "false"
234
+ };
235
+ if (options.decorative !== false) {
236
+ attrs["aria-hidden"] = "true";
237
+ } else {
238
+ attrs.role = "img";
239
+ attrs["aria-label"] = options.label || name;
240
+ }
241
+ return attrs;
242
+ }
243
+ function renderDefaultIcon(name, options = {}) {
244
+ const normalizedName = normalizeIconName(name);
245
+ const iconNode = ICON_NODES[normalizedName] || ICON_NODES.info;
246
+ if (typeof document === "undefined") {
247
+ return "";
248
+ }
249
+ return createElement(iconNode, buildIconAttributes(normalizedName, options));
250
+ }
251
+ function coerceIconResult(result) {
252
+ if (!result || typeof document === "undefined") {
253
+ return null;
254
+ }
255
+ if (result instanceof Node) {
256
+ return result;
257
+ }
258
+ if (typeof result === "string") {
259
+ const template = document.createElement("template");
260
+ template.innerHTML = result.trim();
261
+ return template.content.firstElementChild || null;
262
+ }
263
+ return null;
264
+ }
265
+ function getIconRenderer() {
266
+ const namespace = getNamespace();
267
+ return typeof namespace?.renderer === "function" ? namespace.renderer : renderDefaultIcon;
268
+ }
269
+ function setIconRenderer(renderer) {
270
+ const namespace = getNamespace();
271
+ if (!namespace) {
272
+ return null;
273
+ }
274
+ if (renderer == null) {
275
+ delete namespace.renderer;
276
+ return null;
277
+ }
278
+ if (typeof renderer !== "function") {
279
+ throw new TypeError("Inc icon renderer must be a function.");
280
+ }
281
+ namespace.renderer = renderer;
282
+ return renderer;
283
+ }
284
+ function renderIncIcon(name, options = {}) {
285
+ const normalizedName = normalizeIconName(name) || "info";
286
+ const renderer = getIconRenderer();
287
+ const rendered = renderer(normalizedName, options);
288
+ const icon = coerceIconResult(rendered) || coerceIconResult(renderDefaultIcon(normalizedName, options));
289
+ if (icon instanceof Element && options.decorative !== false) {
290
+ icon.setAttribute("aria-hidden", "true");
291
+ icon.removeAttribute("aria-label");
292
+ icon.removeAttribute("role");
293
+ }
294
+ return icon;
295
+ }
296
+ function replaceIconContents(container, name, options = {}) {
297
+ if (!(container instanceof Element)) {
298
+ return null;
299
+ }
300
+ container.replaceChildren();
301
+ const icon = renderIncIcon(name, options);
302
+ if (icon) {
303
+ icon.setAttribute("data-inc-generated-icon", "true");
304
+ icon.setAttribute("data-inc-icon-upgraded", "true");
305
+ container.append(icon);
306
+ }
307
+ return icon;
308
+ }
309
+ function upgradeIconPlaceholders(root = typeof document !== "undefined" ? document : null) {
310
+ if (!root || typeof root.querySelectorAll !== "function") {
311
+ return [];
312
+ }
313
+ const upgraded = [];
314
+ root.querySelectorAll("[data-inc-icon]").forEach((node) => {
315
+ if (!(node instanceof Element)) {
316
+ return;
317
+ }
318
+ const name = node.getAttribute("data-inc-icon");
319
+ if (!name || node.hasAttribute("data-inc-icon-upgraded") || node.hasAttribute("data-inc-generated-icon")) {
320
+ return;
321
+ }
322
+ replaceIconContents(node, name, {
323
+ className: node.getAttribute("data-inc-icon-class") || "inc-icon",
324
+ decorative: node.getAttribute("aria-hidden") !== "false",
325
+ label: node.getAttribute("aria-label") || void 0,
326
+ size: node.getAttribute("data-inc-icon-size") || void 0
327
+ });
328
+ node.setAttribute("data-inc-icon-upgraded", "true");
329
+ upgraded.push(node);
330
+ });
331
+ return upgraded;
332
+ }
333
+ getNamespace();
334
+ export {
335
+ getIconRenderer,
336
+ ICON_NAMES as incIconNames,
337
+ normalizeIconName,
338
+ renderDefaultIcon,
339
+ renderIncIcon,
340
+ replaceIconContents,
341
+ setIconRenderer,
342
+ upgradeIconPlaceholders
343
+ };
344
+ /*! Bundled license information:
345
+
346
+ lucide/dist/esm/defaultAttributes.mjs:
347
+ lucide/dist/esm/createElement.mjs:
348
+ lucide/dist/esm/icons/circle-check.mjs:
349
+ lucide/dist/esm/icons/circle-question-mark.mjs:
350
+ lucide/dist/esm/icons/circle-x.mjs:
351
+ lucide/dist/esm/icons/download.mjs:
352
+ lucide/dist/esm/icons/external-link.mjs:
353
+ lucide/dist/esm/icons/file-text.mjs:
354
+ lucide/dist/esm/icons/folder-plus.mjs:
355
+ lucide/dist/esm/icons/info.mjs:
356
+ lucide/dist/esm/icons/lock.mjs:
357
+ lucide/dist/esm/icons/pause.mjs:
358
+ lucide/dist/esm/icons/play.mjs:
359
+ lucide/dist/esm/icons/refresh-cw.mjs:
360
+ lucide/dist/esm/icons/search-x.mjs:
361
+ lucide/dist/esm/icons/settings.mjs:
362
+ lucide/dist/esm/icons/shield-check.mjs:
363
+ lucide/dist/esm/icons/triangle-alert.mjs:
364
+ lucide/dist/esm/icons/upload.mjs:
365
+ (**
366
+ * @license lucide v1.17.0 - ISC
367
+ *
368
+ * This source code is licensed under the ISC license.
369
+ * See the LICENSE file in the root directory of this source tree.
370
+ *)
371
+ */
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "module"
3
+ }