@molecule/app-ui-angular 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 (75) hide show
  1. package/LICENSE +115 -0
  2. package/README.md +1591 -0
  3. package/dist/components/alert.component.d.ts +71 -0
  4. package/dist/components/alert.component.d.ts.map +1 -0
  5. package/dist/components/alert.component.js +222 -0
  6. package/dist/components/alert.component.js.map +1 -0
  7. package/dist/components/badge.component.d.ts +27 -0
  8. package/dist/components/badge.component.d.ts.map +1 -0
  9. package/dist/components/badge.component.js +78 -0
  10. package/dist/components/badge.component.js.map +1 -0
  11. package/dist/components/button.component.d.ts +38 -0
  12. package/dist/components/button.component.d.ts.map +1 -0
  13. package/dist/components/button.component.js +136 -0
  14. package/dist/components/button.component.js.map +1 -0
  15. package/dist/components/checkbox.component.d.ts +53 -0
  16. package/dist/components/checkbox.component.d.ts.map +1 -0
  17. package/dist/components/checkbox.component.js +165 -0
  18. package/dist/components/checkbox.component.js.map +1 -0
  19. package/dist/components/index.d.ts +18 -0
  20. package/dist/components/index.d.ts.map +1 -0
  21. package/dist/components/index.js +18 -0
  22. package/dist/components/index.js.map +1 -0
  23. package/dist/components/input.component.d.ts +87 -0
  24. package/dist/components/input.component.d.ts.map +1 -0
  25. package/dist/components/input.component.js +307 -0
  26. package/dist/components/input.component.js.map +1 -0
  27. package/dist/components/modal.component.d.ts +142 -0
  28. package/dist/components/modal.component.d.ts.map +1 -0
  29. package/dist/components/modal.component.js +375 -0
  30. package/dist/components/modal.component.js.map +1 -0
  31. package/dist/components/radio-group.component.d.ts +63 -0
  32. package/dist/components/radio-group.component.d.ts.map +1 -0
  33. package/dist/components/radio-group.component.js +207 -0
  34. package/dist/components/radio-group.component.js.map +1 -0
  35. package/dist/components/select.component.d.ts +72 -0
  36. package/dist/components/select.component.d.ts.map +1 -0
  37. package/dist/components/select.component.js +273 -0
  38. package/dist/components/select.component.js.map +1 -0
  39. package/dist/components/spinner.component.d.ts +36 -0
  40. package/dist/components/spinner.component.d.ts.map +1 -0
  41. package/dist/components/spinner.component.js +115 -0
  42. package/dist/components/spinner.component.js.map +1 -0
  43. package/dist/components/switch.component.d.ts +54 -0
  44. package/dist/components/switch.component.d.ts.map +1 -0
  45. package/dist/components/switch.component.js +147 -0
  46. package/dist/components/switch.component.js.map +1 -0
  47. package/dist/components/toast.component.d.ts +92 -0
  48. package/dist/components/toast.component.d.ts.map +1 -0
  49. package/dist/components/toast.component.js +298 -0
  50. package/dist/components/toast.component.js.map +1 -0
  51. package/dist/components/tooltip.component.d.ts +77 -0
  52. package/dist/components/tooltip.component.d.ts.map +1 -0
  53. package/dist/components/tooltip.component.js +315 -0
  54. package/dist/components/tooltip.component.js.map +1 -0
  55. package/dist/index.d.ts +59 -0
  56. package/dist/index.d.ts.map +1 -0
  57. package/dist/index.js +59 -0
  58. package/dist/index.js.map +1 -0
  59. package/dist/types.d.ts +7 -0
  60. package/dist/types.d.ts.map +1 -0
  61. package/dist/types.js +7 -0
  62. package/dist/types.js.map +1 -0
  63. package/dist/utilities/index.d.ts +8 -0
  64. package/dist/utilities/index.d.ts.map +1 -0
  65. package/dist/utilities/index.js +8 -0
  66. package/dist/utilities/index.js.map +1 -0
  67. package/dist/utilities/render-icon.d.ts +15 -0
  68. package/dist/utilities/render-icon.d.ts.map +1 -0
  69. package/dist/utilities/render-icon.js +44 -0
  70. package/dist/utilities/render-icon.js.map +1 -0
  71. package/dist/utilities/utilities.d.ts +12 -0
  72. package/dist/utilities/utilities.d.ts.map +1 -0
  73. package/dist/utilities/utilities.js +14 -0
  74. package/dist/utilities/utilities.js.map +1 -0
  75. package/package.json +54 -0
@@ -0,0 +1,315 @@
1
+ /**
2
+ * Angular Tooltip UI component with UIClassMap-driven styling.
3
+ *
4
+ * @module
5
+ */
6
+ import { ChangeDetectionStrategy, Component, Input, ViewChild, } from '@angular/core';
7
+ import { getClassMap } from '@molecule/app-ui';
8
+ import * as i0 from "@angular/core";
9
+ const _c0 = ["trigger"];
10
+ const _c1 = ["tooltipEl"];
11
+ const _c2 = ["*"];
12
+ function MoleculeTooltip_Conditional_3_Conditional_4_Template(rf, ctx) { if (rf & 1) {
13
+ i0.ɵɵdomElement(0, "span", 6);
14
+ } if (rf & 2) {
15
+ const ctx_r0 = i0.ɵɵnextContext(2);
16
+ i0.ɵɵstyleMap(ctx_r0.arrowStyle);
17
+ } }
18
+ function MoleculeTooltip_Conditional_3_Template(rf, ctx) { if (rf & 1) {
19
+ i0.ɵɵdomElementStart(0, "div")(1, "div", 4, 1);
20
+ i0.ɵɵtext(3);
21
+ i0.ɵɵdomElementEnd();
22
+ i0.ɵɵconditionalCreate(4, MoleculeTooltip_Conditional_3_Conditional_4_Template, 1, 2, "span", 5);
23
+ i0.ɵɵdomElementEnd();
24
+ } if (rf & 2) {
25
+ const ctx_r0 = i0.ɵɵnextContext();
26
+ i0.ɵɵstyleMap(ctx_r0.positionStyle);
27
+ i0.ɵɵadvance();
28
+ i0.ɵɵstyleMap(ctx_r0.style);
29
+ i0.ɵɵclassMap(ctx_r0.tooltipClasses);
30
+ i0.ɵɵattribute("data-testid", ctx_r0.testId);
31
+ i0.ɵɵadvance(2);
32
+ i0.ɵɵtextInterpolate1(" ", ctx_r0.content, " ");
33
+ i0.ɵɵadvance();
34
+ i0.ɵɵconditional(ctx_r0.hasArrow ? 4 : -1);
35
+ } }
36
+ /** Arrow square size (px) before the 45° rotation that turns it into a diamond. */
37
+ const ARROW_SIZE = 8;
38
+ /**
39
+ * Returns the arrow's inline position style for a given placement. The arrow
40
+ * has no dedicated ClassMap resolver (`tooltip()` takes no options), so its
41
+ * shape/position is expressed via a small inline style — the sanctioned
42
+ * exception for values ClassMap cannot express. Its color is NOT hardcoded:
43
+ * `var(--color-surface)` / `var(--color-border)` are the same CSS custom
44
+ * properties the `bg-surface`/`border` classes in `tooltipContent` resolve
45
+ * to, so the arrow always matches the tooltip body in both themes.
46
+ *
47
+ * A standalone function (rather than a class member) so it's unit-testable
48
+ * in isolation, matching `getModalWrapperStyle()` in `modal.component.ts`.
49
+ * @param placement - The tooltip's resolved placement.
50
+ * @returns Inline style positioning the rotated-square arrow for that placement.
51
+ */
52
+ export function getTooltipArrowStyle(placement) {
53
+ const half = ARROW_SIZE / 2;
54
+ const base = {
55
+ position: 'absolute',
56
+ width: `${ARROW_SIZE}px`,
57
+ height: `${ARROW_SIZE}px`,
58
+ background: 'var(--color-surface)',
59
+ border: '1px solid var(--color-border)',
60
+ };
61
+ switch (placement) {
62
+ case 'top':
63
+ return {
64
+ ...base,
65
+ bottom: `${-half}px`,
66
+ left: '50%',
67
+ transform: 'translateX(-50%) rotate(45deg)',
68
+ };
69
+ case 'top-start':
70
+ return { ...base, bottom: `${-half}px`, left: '12px', transform: 'rotate(45deg)' };
71
+ case 'top-end':
72
+ return { ...base, bottom: `${-half}px`, right: '12px', transform: 'rotate(45deg)' };
73
+ case 'bottom':
74
+ return {
75
+ ...base,
76
+ top: `${-half}px`,
77
+ left: '50%',
78
+ transform: 'translateX(-50%) rotate(45deg)',
79
+ };
80
+ case 'bottom-start':
81
+ return { ...base, top: `${-half}px`, left: '12px', transform: 'rotate(45deg)' };
82
+ case 'bottom-end':
83
+ return { ...base, top: `${-half}px`, right: '12px', transform: 'rotate(45deg)' };
84
+ case 'left':
85
+ return {
86
+ ...base,
87
+ right: `${-half}px`,
88
+ top: '50%',
89
+ transform: 'translateY(-50%) rotate(45deg)',
90
+ };
91
+ case 'right':
92
+ return {
93
+ ...base,
94
+ left: `${-half}px`,
95
+ top: '50%',
96
+ transform: 'translateY(-50%) rotate(45deg)',
97
+ };
98
+ default:
99
+ return base;
100
+ }
101
+ }
102
+ /**
103
+ * Angular Tooltip UI component with UIClassMap-driven styling.
104
+ *
105
+ * Wraps child content and shows a tooltip on hover/focus. `hasArrow` renders
106
+ * a small themed pointer at the resolved `placement` edge.
107
+ */
108
+ /**
109
+ * Molecule Tooltip class.
110
+ */
111
+ export class MoleculeTooltip {
112
+ content = '';
113
+ placement = 'top';
114
+ delay = 0;
115
+ hasArrow = false;
116
+ className;
117
+ style;
118
+ testId;
119
+ triggerRef;
120
+ tooltipRef;
121
+ isVisible = false;
122
+ positionStyle = {};
123
+ timeoutId;
124
+ /**
125
+ * Retrieves the current UI class map.
126
+ * @returns The UIClassMap instance for styling.
127
+ */
128
+ get cm() {
129
+ return getClassMap();
130
+ }
131
+ /**
132
+ * Computes the combined CSS classes for the tooltip content.
133
+ * @returns The tooltip class name string.
134
+ */
135
+ get tooltipClasses() {
136
+ return this.cm.cn(this.cm.tooltipContent, this.className);
137
+ }
138
+ /**
139
+ * Retrieves the inline style for the tooltip's arrow element.
140
+ * @returns Inline style positioning the rotated-square arrow.
141
+ */
142
+ get arrowStyle() {
143
+ return getTooltipArrowStyle(this.placement);
144
+ }
145
+ /**
146
+ * Shows the tooltip with optional delay.
147
+ */
148
+ show() {
149
+ if (this.delay > 0) {
150
+ this.timeoutId = setTimeout(() => {
151
+ this.isVisible = true;
152
+ this.updatePosition();
153
+ }, this.delay);
154
+ }
155
+ else {
156
+ this.isVisible = true;
157
+ requestAnimationFrame(() => this.updatePosition());
158
+ }
159
+ }
160
+ /**
161
+ * Hides the tooltip and cancels any pending delay.
162
+ */
163
+ hide() {
164
+ if (this.timeoutId) {
165
+ clearTimeout(this.timeoutId);
166
+ }
167
+ this.isVisible = false;
168
+ }
169
+ /**
170
+ * Clears pending timeouts on component destruction.
171
+ */
172
+ ngOnDestroy() {
173
+ if (this.timeoutId) {
174
+ clearTimeout(this.timeoutId);
175
+ }
176
+ }
177
+ /**
178
+ * Calculates and applies the tooltip position relative to the trigger.
179
+ */
180
+ updatePosition() {
181
+ if (!this.triggerRef?.nativeElement || !this.tooltipRef?.nativeElement)
182
+ return;
183
+ const triggerRect = this.triggerRef.nativeElement.getBoundingClientRect();
184
+ const tooltipRect = this.tooltipRef.nativeElement.getBoundingClientRect();
185
+ const offset = 8;
186
+ const { top, left, width, height } = triggerRect;
187
+ const tooltipWidth = tooltipRect.width;
188
+ const tooltipHeight = tooltipRect.height;
189
+ const positions = {
190
+ top: {
191
+ top: top + window.scrollY - tooltipHeight - offset,
192
+ left: left + window.scrollX + width / 2 - tooltipWidth / 2,
193
+ },
194
+ bottom: {
195
+ top: top + window.scrollY + height + offset,
196
+ left: left + window.scrollX + width / 2 - tooltipWidth / 2,
197
+ },
198
+ left: {
199
+ top: top + window.scrollY + height / 2 - tooltipHeight / 2,
200
+ left: left + window.scrollX - tooltipWidth - offset,
201
+ },
202
+ right: {
203
+ top: top + window.scrollY + height / 2 - tooltipHeight / 2,
204
+ left: left + window.scrollX + width + offset,
205
+ },
206
+ 'top-start': {
207
+ top: top + window.scrollY - tooltipHeight - offset,
208
+ left: left + window.scrollX,
209
+ },
210
+ 'top-end': {
211
+ top: top + window.scrollY - tooltipHeight - offset,
212
+ left: left + window.scrollX + width - tooltipWidth,
213
+ },
214
+ 'bottom-start': {
215
+ top: top + window.scrollY + height + offset,
216
+ left: left + window.scrollX,
217
+ },
218
+ 'bottom-end': {
219
+ top: top + window.scrollY + height + offset,
220
+ left: left + window.scrollX + width - tooltipWidth,
221
+ },
222
+ };
223
+ const pos = positions[this.placement];
224
+ this.positionStyle = {
225
+ position: 'absolute',
226
+ top: `${pos.top}px`,
227
+ left: `${pos.left}px`,
228
+ zIndex: '9999',
229
+ };
230
+ }
231
+ static ɵfac = function MoleculeTooltip_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MoleculeTooltip)(); };
232
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MoleculeTooltip, selectors: [["mol-tooltip"]], viewQuery: function MoleculeTooltip_Query(rf, ctx) { if (rf & 1) {
233
+ i0.ɵɵviewQuery(_c0, 5)(_c1, 5);
234
+ } if (rf & 2) {
235
+ let _t;
236
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.triggerRef = _t.first);
237
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.tooltipRef = _t.first);
238
+ } }, inputs: { content: "content", placement: "placement", delay: "delay", hasArrow: "hasArrow", className: "className", style: "style", testId: "testId" }, ngContentSelectors: _c2, decls: 4, vars: 3, consts: [["trigger", ""], ["tooltipEl", ""], [3, "mouseenter", "mouseleave", "focus", "blur"], [3, "style"], ["role", "tooltip"], ["aria-hidden", "true", 3, "style"], ["aria-hidden", "true"]], template: function MoleculeTooltip_Template(rf, ctx) { if (rf & 1) {
239
+ i0.ɵɵprojectionDef();
240
+ i0.ɵɵdomElementStart(0, "div", 2, 0);
241
+ i0.ɵɵdomListener("mouseenter", function MoleculeTooltip_Template_div_mouseenter_0_listener() { return ctx.show(); })("mouseleave", function MoleculeTooltip_Template_div_mouseleave_0_listener() { return ctx.hide(); })("focus", function MoleculeTooltip_Template_div_focus_0_listener() { return ctx.show(); })("blur", function MoleculeTooltip_Template_div_blur_0_listener() { return ctx.hide(); });
242
+ i0.ɵɵprojection(2);
243
+ i0.ɵɵdomElementEnd();
244
+ i0.ɵɵconditionalCreate(3, MoleculeTooltip_Conditional_3_Template, 5, 9, "div", 3);
245
+ } if (rf & 2) {
246
+ i0.ɵɵclassMap(ctx.cm.tooltipTrigger);
247
+ i0.ɵɵadvance(3);
248
+ i0.ɵɵconditional(ctx.isVisible ? 3 : -1);
249
+ } }, encapsulation: 2 });
250
+ }
251
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MoleculeTooltip, [{
252
+ type: Component,
253
+ args: [{
254
+ selector: 'mol-tooltip',
255
+ standalone: true,
256
+ changeDetection: ChangeDetectionStrategy.OnPush,
257
+ template: `
258
+ <div
259
+ #trigger
260
+ [class]="cm.tooltipTrigger"
261
+ (mouseenter)="show()"
262
+ (mouseleave)="hide()"
263
+ (focus)="show()"
264
+ (blur)="hide()"
265
+ >
266
+ <ng-content></ng-content>
267
+ </div>
268
+ @if (isVisible) {
269
+ <!--
270
+ Outer positioned wrapper carries the top/left/z-index placement; the
271
+ arrow renders as its SIBLING (not nested inside the visible box),
272
+ because tooltipContent sets overflow-hidden — an arrow meant to poke
273
+ past the box's own edge would be clipped invisible if it were a
274
+ descendant of that element instead.
275
+ -->
276
+ <div [style]="positionStyle">
277
+ <div
278
+ #tooltipEl
279
+ role="tooltip"
280
+ [class]="tooltipClasses"
281
+ [style]="style"
282
+ [attr.data-testid]="testId"
283
+ >
284
+ {{ content }}
285
+ </div>
286
+ @if (hasArrow) {
287
+ <span aria-hidden="true" [style]="arrowStyle"></span>
288
+ }
289
+ </div>
290
+ }
291
+ `,
292
+ }]
293
+ }], null, { content: [{
294
+ type: Input
295
+ }], placement: [{
296
+ type: Input
297
+ }], delay: [{
298
+ type: Input
299
+ }], hasArrow: [{
300
+ type: Input
301
+ }], className: [{
302
+ type: Input
303
+ }], style: [{
304
+ type: Input
305
+ }], testId: [{
306
+ type: Input
307
+ }], triggerRef: [{
308
+ type: ViewChild,
309
+ args: ['trigger']
310
+ }], tooltipRef: [{
311
+ type: ViewChild,
312
+ args: ['tooltipEl']
313
+ }] }); })();
314
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MoleculeTooltip, { className: "MoleculeTooltip", filePath: "components/tooltip.component.ts", lineNumber: 136 }); })();
315
+ //# sourceMappingURL=tooltip.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tooltip.component.js","sourceRoot":"","sources":["../../src/components/tooltip.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,uBAAuB,EACvB,SAAS,EAET,KAAK,EAEL,SAAS,GACV,MAAM,eAAe,CAAA;AAGtB,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;;;;;;IA8GpC,6BAAqD;;;IAA5B,gCAAoB;;;IAV/C,AADF,8BAA6B,gBAO1B;IACC,YACF;IAAA,oBAAM;IACN,gGAAgB;IAGlB,oBAAM;;;IAbD,mCAAuB;IAKxB,cAAe;IAAf,2BAAe;IADf,oCAAwB;;IAIxB,eAC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AM,CAAC,OAAO,GAAG,MAAM,GAAG,MAAM;gBAC3C,IAAI,EAAE,IAAI,GAAG,MAAM,CAAC,OAAO,GAAG,KAAK,GAAG,YAAY;aACnD;SACF,CAAA;QAED,MAAM,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;QACrC,IAAI,CAAC,aAAa,GAAG;YACnB,QAAQ,EAAE,UAAU;YACpB,GAAG,EAAE,GAAG,GAAG,CAAC,GAAG,IAAI;YACnB,IAAI,EAAE,GAAG,GAAG,CAAC,IAAI,IAAI;YACrB,MAAM,EAAE,MAAM;SACf,CAAA;IACH,CAAC;yGAlIU,eAAe;6DAAf,eAAe;;;;;;;;YAtCxB,oCAOC;YADC,AADA,AADA,AADA,sGAAc,UAAM,IAAC,sFACP,UAAM,IAAC,4EACZ,UAAM,IAAC,0EACR,UAAM,IAAC;YAEf,kBAAyB;YAC3B,oBAAM;YACN,iFAAiB;;YARf,oCAA2B;YAQ7B,eAsBC;YAtBD,wCAsBC;;;iFAMQ,eAAe;cA3C3B,SAAS;eAAC;gBACT,QAAQ,EAAE,aAAa;gBACvB,UAAU,EAAE,IAAI;gBAChB,eAAe,EAAE,uBAAuB,CAAC,MAAM;gBAC/C,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCT;aACF;;kBAKE,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBAEL,SAAS;mBAAC,SAAS;;kBACnB,SAAS;mBAAC,WAAW;;kFAVX,eAAe"}
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Angular UI components for molecule.dev.
3
+ *
4
+ * Provides standalone Angular components implementing a SUBSET of the
5
+ * `@molecule/app-ui` component interfaces, styled through the UIClassMap
6
+ * abstraction. Ships 12 components — `MoleculeAlert`, `MoleculeBadge`,
7
+ * `MoleculeButton`, `MoleculeCheckbox`, `MoleculeInput`, `MoleculeModal`,
8
+ * `MoleculeRadioGroup`, `MoleculeSelect`, `MoleculeSpinner`,
9
+ * `MoleculeSwitch`, `MoleculeToast`, `MoleculeTooltip` — each a standalone
10
+ * component with a `mol-*` selector. Layout/data components (Card, Table,
11
+ * Tabs, Accordion, Dropdown, Icon, …) are not implemented for Angular yet;
12
+ * compose them from ClassMap classes via `getClassMap()`.
13
+ *
14
+ * @example
15
+ * ```ts
16
+ * import { Component } from '@angular/core'
17
+ * import { setClassMap } from '@molecule/app-ui'
18
+ * import { classMap } from '@molecule/app-ui-tailwind'
19
+ * import { MoleculeButton, MoleculeInput } from '@molecule/app-ui-angular'
20
+ *
21
+ * // Once at startup, before the first component renders:
22
+ * setClassMap(classMap)
23
+ *
24
+ * @Component({
25
+ * selector: 'app-save-panel',
26
+ * standalone: true,
27
+ * imports: [MoleculeButton, MoleculeInput],
28
+ * template: `
29
+ * <mol-input placeholder="Name" [value]="name" (handleInput)="onName($event)"></mol-input>
30
+ * <mol-button color="primary" [loading]="saving" (handleClick)="save()">Save</mol-button>
31
+ * `,
32
+ * })
33
+ * class SavePanel {
34
+ * name = ''
35
+ * saving = false
36
+ * onName(event: Event): void {
37
+ * this.name = (event.target as HTMLInputElement).value
38
+ * }
39
+ * save(): void {}
40
+ * }
41
+ * ```
42
+ *
43
+ * @remarks
44
+ * - **`setClassMap()` must run before any component renders** — every component resolves its
45
+ * classes through `getClassMap()`, which THROWS until a ClassMap bond (e.g.
46
+ * `@molecule/app-ui-tailwind`) is set. Call it in `main.ts` before `bootstrapApplication`.
47
+ * - Components are standalone — add them to the `imports` array of the consuming component or
48
+ * route; there is no NgModule.
49
+ * - Event outputs are `handle*`, not the DOM names: `(handleClick)` on `mol-button`,
50
+ * `(handleInput)`/`(handleChange)` on `mol-input` (both emit the raw DOM event — read the
51
+ * value from `$event.target`). The host element uses `display: contents`, so the real
52
+ * `<button>`/`<input>` lives inside the template.
53
+ *
54
+ * @module
55
+ */
56
+ export * from './components/index.js';
57
+ export * from './types.js';
58
+ export * from './utilities/index.js';
59
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AAEH,cAAc,uBAAuB,CAAA;AACrC,cAAc,YAAY,CAAA;AAC1B,cAAc,sBAAsB,CAAA"}
package/dist/index.js ADDED
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Angular UI components for molecule.dev.
3
+ *
4
+ * Provides standalone Angular components implementing a SUBSET of the
5
+ * `@molecule/app-ui` component interfaces, styled through the UIClassMap
6
+ * abstraction. Ships 12 components — `MoleculeAlert`, `MoleculeBadge`,
7
+ * `MoleculeButton`, `MoleculeCheckbox`, `MoleculeInput`, `MoleculeModal`,
8
+ * `MoleculeRadioGroup`, `MoleculeSelect`, `MoleculeSpinner`,
9
+ * `MoleculeSwitch`, `MoleculeToast`, `MoleculeTooltip` — each a standalone
10
+ * component with a `mol-*` selector. Layout/data components (Card, Table,
11
+ * Tabs, Accordion, Dropdown, Icon, …) are not implemented for Angular yet;
12
+ * compose them from ClassMap classes via `getClassMap()`.
13
+ *
14
+ * @example
15
+ * ```ts
16
+ * import { Component } from '@angular/core'
17
+ * import { setClassMap } from '@molecule/app-ui'
18
+ * import { classMap } from '@molecule/app-ui-tailwind'
19
+ * import { MoleculeButton, MoleculeInput } from '@molecule/app-ui-angular'
20
+ *
21
+ * // Once at startup, before the first component renders:
22
+ * setClassMap(classMap)
23
+ *
24
+ * @Component({
25
+ * selector: 'app-save-panel',
26
+ * standalone: true,
27
+ * imports: [MoleculeButton, MoleculeInput],
28
+ * template: `
29
+ * <mol-input placeholder="Name" [value]="name" (handleInput)="onName($event)"></mol-input>
30
+ * <mol-button color="primary" [loading]="saving" (handleClick)="save()">Save</mol-button>
31
+ * `,
32
+ * })
33
+ * class SavePanel {
34
+ * name = ''
35
+ * saving = false
36
+ * onName(event: Event): void {
37
+ * this.name = (event.target as HTMLInputElement).value
38
+ * }
39
+ * save(): void {}
40
+ * }
41
+ * ```
42
+ *
43
+ * @remarks
44
+ * - **`setClassMap()` must run before any component renders** — every component resolves its
45
+ * classes through `getClassMap()`, which THROWS until a ClassMap bond (e.g.
46
+ * `@molecule/app-ui-tailwind`) is set. Call it in `main.ts` before `bootstrapApplication`.
47
+ * - Components are standalone — add them to the `imports` array of the consuming component or
48
+ * route; there is no NgModule.
49
+ * - Event outputs are `handle*`, not the DOM names: `(handleClick)` on `mol-button`,
50
+ * `(handleInput)`/`(handleChange)` on `mol-input` (both emit the raw DOM event — read the
51
+ * value from `$event.target`). The host element uses `display: contents`, so the real
52
+ * `<button>`/`<input>` lives inside the template.
53
+ *
54
+ * @module
55
+ */
56
+ export * from './components/index.js';
57
+ export * from './types.js';
58
+ export * from './utilities/index.js';
59
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AAEH,cAAc,uBAAuB,CAAA;AACrC,cAAc,YAAY,CAAA;AAC1B,cAAc,sBAAsB,CAAA"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Type re-exports for `@molecule/app-ui-angular`.
3
+ *
4
+ * @module
5
+ */
6
+ export type { AccordionItem, AccordionProps, AlertProps, AvatarProps, BadgeProps, BaseProps, ButtonElementProps, ButtonProps, ButtonVariant, CardProps, ChangeEventHandler, CheckboxProps, Children, ColorVariant, ContainerProps, CSSProperties, EventHandler, FlexProps, FocusEventHandler, FormElementProps, FormEventHandler, FormFieldProps, FormProps, GridProps, HTMLElementProps, InputElementProps, InputProps, InputType, KeyboardEventHandler, ModalProps, ModalSize, MouseEventHandler, PaginationProps, RadioGroupProps, RadioOption, SelectElementProps, SelectOption, SelectProps, Size, SkeletonProps, SpacerProps, SpinnerProps, SwitchProps, TabItem, TableColumn, TableProps, TabsProps, TextareaElementProps, TextareaProps, ToastProps, TooltipPlacement, TooltipProps, } from '@molecule/app-ui';
7
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,YAAY,EAEV,aAAa,EACb,cAAc,EAEd,UAAU,EAEV,WAAW,EAEX,UAAU,EACV,SAAS,EACT,kBAAkB,EAClB,WAAW,EAEX,aAAa,EAEb,SAAS,EACT,kBAAkB,EAElB,aAAa,EACb,QAAQ,EACR,YAAY,EAEZ,cAAc,EAEd,aAAa,EACb,YAAY,EACZ,SAAS,EACT,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EAEd,SAAS,EACT,SAAS,EACT,gBAAgB,EAChB,iBAAiB,EACjB,UAAU,EAEV,SAAS,EACT,oBAAoB,EACpB,UAAU,EAEV,SAAS,EACT,iBAAiB,EAEjB,eAAe,EACf,eAAe,EAEf,WAAW,EACX,kBAAkB,EAElB,YAAY,EACZ,WAAW,EACX,IAAI,EAEJ,aAAa,EACb,WAAW,EAEX,YAAY,EAEZ,WAAW,EAEX,OAAO,EAEP,WAAW,EACX,UAAU,EACV,SAAS,EACT,oBAAoB,EAEpB,aAAa,EACb,UAAU,EAEV,gBAAgB,EAChB,YAAY,GACb,MAAM,kBAAkB,CAAA"}
package/dist/types.js ADDED
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Type re-exports for `@molecule/app-ui-angular`.
3
+ *
4
+ * @module
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Utility exports.
3
+ *
4
+ * @module
5
+ */
6
+ export * from './render-icon.js';
7
+ export * from './utilities.js';
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utilities/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Utility exports.
3
+ *
4
+ * @module
5
+ */
6
+ export * from './render-icon.js';
7
+ export * from './utilities.js';
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utilities/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Icon rendering utility for Angular components.
3
+ *
4
+ * @module
5
+ */
6
+ import { type IconName } from '@molecule/app-icons';
7
+ /**
8
+ * Generates SVG markup string from an icon name.
9
+ *
10
+ * @param name - Icon name from the icon set
11
+ * @param className - CSS class for sizing
12
+ * @returns SVG markup string
13
+ */
14
+ export declare function getIconSvg(name: IconName, className: string): string;
15
+ //# sourceMappingURL=render-icon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"render-icon.d.ts","sourceRoot":"","sources":["../../src/utilities/render-icon.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAW,KAAK,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAE5D;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CA2BpE"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Icon rendering utility for Angular components.
3
+ *
4
+ * @module
5
+ */
6
+ import { getIcon } from '@molecule/app-icons';
7
+ /**
8
+ * Generates SVG markup string from an icon name.
9
+ *
10
+ * @param name - Icon name from the icon set
11
+ * @param className - CSS class for sizing
12
+ * @returns SVG markup string
13
+ */
14
+ export function getIconSvg(name, className) {
15
+ const icon = getIcon(name);
16
+ const viewBox = icon.viewBox || '0 0 20 20';
17
+ const fill = icon.fill || 'currentColor';
18
+ const attrs = [
19
+ `xmlns="http://www.w3.org/2000/svg"`,
20
+ `class="${className}"`,
21
+ `viewBox="${viewBox}"`,
22
+ `fill="${fill}"`,
23
+ ];
24
+ if (icon.stroke)
25
+ attrs.push(`stroke="${icon.stroke}"`);
26
+ if (icon.strokeWidth)
27
+ attrs.push(`stroke-width="${icon.strokeWidth}"`);
28
+ if (icon.strokeLinecap)
29
+ attrs.push(`stroke-linecap="${icon.strokeLinecap}"`);
30
+ if (icon.strokeLinejoin)
31
+ attrs.push(`stroke-linejoin="${icon.strokeLinejoin}"`);
32
+ const paths = icon.paths
33
+ .map((p) => {
34
+ const pathAttrs = [`d="${p.d}"`];
35
+ if (p.fillRule)
36
+ pathAttrs.push(`fill-rule="${p.fillRule}"`);
37
+ if (p.clipRule)
38
+ pathAttrs.push(`clip-rule="${p.clipRule}"`);
39
+ return `<path ${pathAttrs.join(' ')} />`;
40
+ })
41
+ .join('');
42
+ return `<svg ${attrs.join(' ')}>${paths}</svg>`;
43
+ }
44
+ //# sourceMappingURL=render-icon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"render-icon.js","sourceRoot":"","sources":["../../src/utilities/render-icon.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,EAAiB,MAAM,qBAAqB,CAAA;AAE5D;;;;;;GAMG;AACH,MAAM,UAAU,UAAU,CAAC,IAAc,EAAE,SAAiB;IAC1D,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC1B,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,IAAI,WAAW,CAAA;IAC3C,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,cAAc,CAAA;IAExC,MAAM,KAAK,GAA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@returns The resulting string.
10
+ */
11
+ export declare function cn(...inputs: (string | undefined | null | false)[]): string;
12
+ //# sourceMappingURL=utilities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utilities.d.ts","sourceRoot":"","sources":["../../src/utilities/utilities.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;GAIG;AACH,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,KAAK,CAAC,EAAE,GAAG,MAAM,CAE3E"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Utility functions for UI components.
3
+ *
4
+ * @module
5
+ */
6
+ /**
7
+ * Merge class names, filtering out falsy values.
8
+ * @param inputs - The inputs.
9
+ * @returns The resulting string.
10
+ */
11
+ export function cn(...inputs) {
12
+ return inputs.filter(Boolean).join(' ');
13
+ }
14
+ //# sourceMappingURL=utilities.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utilities.js","sourceRoot":"","sources":["../../src/utilities/utilities.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;GAIG;AACH,MAAM,UAAU,EAAE,CAAC,GAAG,MAA6C;IACjE,OAAO,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AACzC,CAAC"}