@origostudio/origo-design 0.0.32 → 0.0.33

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 (101) hide show
  1. package/CHANGELOG.md +5 -4
  2. package/dist/packages/angular-renderer/CHANGELOG.md +12 -0
  3. package/dist/packages/angular-renderer/package.json +3 -3
  4. package/dist/packages/angular-renderer/src/components/primitives/checkbox/checkbox.component.d.ts +27 -0
  5. package/dist/packages/angular-renderer/src/components/primitives/checkbox/checkbox.component.js +73 -0
  6. package/dist/packages/angular-renderer/src/components/primitives/checkbox/checkbox.component.js.map +1 -0
  7. package/dist/packages/angular-renderer/src/components/primitives/form-field/form-field.component.d.ts +26 -0
  8. package/dist/packages/angular-renderer/src/components/primitives/form-field/form-field.component.js +66 -0
  9. package/dist/packages/angular-renderer/src/components/primitives/form-field/form-field.component.js.map +1 -0
  10. package/dist/packages/angular-renderer/src/components/primitives/hbox/hbox.component.d.ts +21 -0
  11. package/dist/packages/angular-renderer/src/components/primitives/hbox/hbox.component.js +78 -0
  12. package/dist/packages/angular-renderer/src/components/primitives/hbox/hbox.component.js.map +1 -0
  13. package/dist/packages/angular-renderer/src/components/primitives/label/label.component.d.ts +21 -0
  14. package/dist/packages/angular-renderer/src/components/primitives/label/label.component.js +54 -0
  15. package/dist/packages/angular-renderer/src/components/primitives/label/label.component.js.map +1 -0
  16. package/dist/packages/angular-renderer/src/components/primitives/radio-group/radio-group.component.d.ts +34 -0
  17. package/dist/packages/angular-renderer/src/components/primitives/radio-group/radio-group.component.js +80 -0
  18. package/dist/packages/angular-renderer/src/components/primitives/radio-group/radio-group.component.js.map +1 -0
  19. package/dist/packages/angular-renderer/src/components/primitives/select/select.component.d.ts +39 -0
  20. package/dist/packages/angular-renderer/src/components/primitives/select/select.component.js +91 -0
  21. package/dist/packages/angular-renderer/src/components/primitives/select/select.component.js.map +1 -0
  22. package/dist/packages/angular-renderer/src/components/primitives/textarea/textarea.component.d.ts +36 -0
  23. package/dist/packages/angular-renderer/src/components/primitives/textarea/textarea.component.js +91 -0
  24. package/dist/packages/angular-renderer/src/components/primitives/textarea/textarea.component.js.map +1 -0
  25. package/dist/packages/angular-renderer/src/components/primitives/vbox/vbox.component.js +3 -1
  26. package/dist/packages/angular-renderer/src/components/primitives/vbox/vbox.component.js.map +1 -1
  27. package/dist/packages/angular-renderer/src/index.d.ts +8 -0
  28. package/dist/packages/angular-renderer/src/index.js +8 -0
  29. package/dist/packages/angular-renderer/src/index.js.map +1 -1
  30. package/dist/packages/angular-renderer/src/lib/primitives.provider.d.ts +2 -0
  31. package/dist/packages/angular-renderer/src/lib/primitives.provider.js +31 -0
  32. package/dist/packages/angular-renderer/src/lib/primitives.provider.js.map +1 -0
  33. package/dist/packages/angular-renderer/src/lib/renderer.tokens.js +1 -0
  34. package/dist/packages/angular-renderer/src/lib/renderer.tokens.js.map +1 -1
  35. package/dist/packages/cli/CHANGELOG.md +4 -0
  36. package/dist/packages/cli/package.json +2 -2
  37. package/dist/packages/cli/package.json.bak +2 -2
  38. package/dist/packages/core/CHANGELOG.md +4 -0
  39. package/dist/packages/core/package.json +1 -1
  40. package/dist/packages/core/package.json.bak +1 -1
  41. package/dist/packages/design-tokens/CHANGELOG.md +4 -0
  42. package/dist/packages/design-tokens/package.json +1 -1
  43. package/dist/packages/playground/browser/{chunk-BU8WdTDW.js → chunk-B9LdvrW-.js} +1 -1
  44. package/dist/packages/playground/browser/{chunk-DblWUBCc.js → chunk-Bf9YMUl2.js} +1 -1
  45. package/dist/packages/playground/browser/{chunk-DGDHcpBL.js → chunk-BhEdx6mF.js} +1 -1
  46. package/dist/packages/playground/browser/{chunk-Bl2XUkt9.js → chunk-BzGPxEHg.js} +1 -1
  47. package/dist/packages/playground/browser/{chunk-DoeRt62n.js → chunk-CQzANQQx.js} +1 -1
  48. package/dist/packages/playground/browser/{chunk-fvcTt7Iz.js → chunk-CXjHpj1m.js} +1 -1
  49. package/dist/packages/playground/browser/{chunk-Cs5LSVZ4.js → chunk-CZjKDhyy.js} +1 -1
  50. package/dist/packages/playground/browser/{chunk-iUjqeDU_.js → chunk-CdTdamVY.js} +1 -1
  51. package/dist/packages/playground/browser/{chunk-D-D574YC.js → chunk-Cog45wco.js} +1 -1
  52. package/dist/packages/playground/browser/{chunk-BnQm5_3H.js → chunk-D4C0b6lz.js} +1 -1
  53. package/dist/packages/playground/browser/{chunk-BoABL5Us.js → chunk-DF-bQtOj.js} +1 -1
  54. package/dist/packages/playground/browser/{chunk-CCQ1RKCp.js → chunk-DKlwTQAd.js} +1 -1
  55. package/dist/packages/playground/browser/{chunk-0atszSIl.js → chunk-DWyxJAo_.js} +1 -1
  56. package/dist/packages/playground/browser/{chunk-CCwqbbdB.js → chunk-De1XFgTw.js} +1 -1
  57. package/dist/packages/playground/browser/{chunk-DmH1uLzp.js → chunk-HGObCc4H.js} +1 -1
  58. package/dist/packages/playground/browser/index.html +1 -1
  59. package/dist/packages/playground/browser/main-CADSNIGS.js +711 -0
  60. package/package.json +1 -1
  61. package/packages/angular-renderer/CHANGELOG.md +12 -0
  62. package/packages/angular-renderer/package.json +3 -3
  63. package/packages/angular-renderer/src/components/primitives/checkbox/checkbox.component.html +15 -0
  64. package/packages/angular-renderer/src/components/primitives/checkbox/checkbox.component.scss +36 -0
  65. package/packages/angular-renderer/src/components/primitives/checkbox/checkbox.component.ts +76 -0
  66. package/packages/angular-renderer/src/components/primitives/form-field/form-field.component.html +13 -0
  67. package/packages/angular-renderer/src/components/primitives/form-field/form-field.component.scss +26 -0
  68. package/packages/angular-renderer/src/components/primitives/form-field/form-field.component.ts +66 -0
  69. package/packages/angular-renderer/src/components/primitives/hbox/hbox.component.html +1 -0
  70. package/packages/angular-renderer/src/components/primitives/hbox/hbox.component.scss +5 -0
  71. package/packages/angular-renderer/src/components/primitives/hbox/hbox.component.ts +76 -0
  72. package/packages/angular-renderer/src/components/primitives/label/label.component.html +6 -0
  73. package/packages/angular-renderer/src/components/primitives/label/label.component.scss +17 -0
  74. package/packages/angular-renderer/src/components/primitives/label/label.component.ts +50 -0
  75. package/packages/angular-renderer/src/components/primitives/primitives.a11y.pw.ts +131 -3
  76. package/packages/angular-renderer/src/components/primitives/radio-group/radio-group.component.html +20 -0
  77. package/packages/angular-renderer/src/components/primitives/radio-group/radio-group.component.scss +54 -0
  78. package/packages/angular-renderer/src/components/primitives/radio-group/radio-group.component.ts +87 -0
  79. package/packages/angular-renderer/src/components/primitives/select/select.component.html +15 -0
  80. package/packages/angular-renderer/src/components/primitives/select/select.component.scss +26 -0
  81. package/packages/angular-renderer/src/components/primitives/select/select.component.ts +101 -0
  82. package/packages/angular-renderer/src/components/primitives/textarea/textarea.component.html +12 -0
  83. package/packages/angular-renderer/src/components/primitives/textarea/textarea.component.scss +31 -0
  84. package/packages/angular-renderer/src/components/primitives/textarea/textarea.component.ts +102 -0
  85. package/packages/angular-renderer/src/components/primitives/vbox/vbox.component.ts +3 -1
  86. package/packages/angular-renderer/src/index.ts +8 -0
  87. package/packages/angular-renderer/src/lib/primitives.provider.ts +28 -0
  88. package/packages/angular-renderer/src/lib/renderer.tokens.ts +2 -0
  89. package/packages/cli/CHANGELOG.md +4 -0
  90. package/packages/cli/package.json +2 -2
  91. package/packages/core/CHANGELOG.md +4 -0
  92. package/packages/core/package.json +1 -1
  93. package/packages/design-tokens/CHANGELOG.md +4 -0
  94. package/packages/design-tokens/package.json +1 -1
  95. package/packages/devtools/CHANGELOG.md +4 -0
  96. package/packages/devtools/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
  97. package/packages/devtools/package.json +1 -1
  98. package/packages/playground/CHANGELOG.md +4 -0
  99. package/packages/playground/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
  100. package/packages/playground/package.json +3 -3
  101. package/dist/packages/playground/browser/main-YU4BRK3G.js +0 -711
package/CHANGELOG.md CHANGED
@@ -1,10 +1,11 @@
1
- ## 0.0.32 (2026-09-19)
1
+ ## 0.0.33 (2026-09-21)
2
2
 
3
3
  ### 🚀 Features
4
4
 
5
- - implement strict test isolation guards, structured cloning, and update test setup configurations and registry artifacts ([a5e79e2](https://github.com/OrigoStudio/origo-design/commit/a5e79e2))
6
- - add devtools bridge to angular renderer package ([26a2a2d](https://github.com/OrigoStudio/origo-design/commit/26a2a2d))
7
- - add devtools and playground packages with retro-8 versioning artifacts ([ff1aedc](https://github.com/OrigoStudio/origo-design/commit/ff1aedc))
5
+ - implement batch 1 form layout primitives in angular-renderer ([ac33ad6](https://github.com/OrigoStudio/origo-design/commit/ac33ad6))
6
+ - add batch 1 form and layout primitive components and accessibility tests ([fb7cffb](https://github.com/OrigoStudio/origo-design/commit/fb7cffb))
7
+ - add central test-registry.yaml for test case tracking ([5904077](https://github.com/OrigoStudio/origo-design/commit/5904077))
8
+ - **angular-renderer:** implement form layout primitive components and tokens ([576e23d](https://github.com/OrigoStudio/origo-design/commit/576e23d))
8
9
 
9
10
  ### ❤️ Thank You
10
11
 
@@ -1,3 +1,15 @@
1
+ ## 0.0.33 (2026-09-21)
2
+
3
+ ### 🚀 Features
4
+
5
+ - **angular-renderer:** implement form layout primitive components and tokens ([576e23d](https://github.com/OrigoStudio/origo-design/commit/576e23d))
6
+ - add batch 1 form and layout primitive components and accessibility tests ([fb7cffb](https://github.com/OrigoStudio/origo-design/commit/fb7cffb))
7
+ - implement batch 1 form layout primitives in angular-renderer ([ac33ad6](https://github.com/OrigoStudio/origo-design/commit/ac33ad6))
8
+
9
+ ### ❤️ Thank You
10
+
11
+ - Hardik Patel @hardikpatelse
12
+
1
13
  ## 0.0.32 (2026-09-19)
2
14
 
3
15
  ### 🚀 Features
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "angular-renderer",
3
- "version": "0.0.32",
3
+ "version": "0.0.33",
4
4
  "private": true,
5
5
  "type": "commonjs",
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",
8
8
  "dependencies": {
9
- "@origo/core": "0.0.32",
10
- "@origo/design-tokens": "0.0.32",
9
+ "@origo/core": "0.0.33",
10
+ "@origo/design-tokens": "0.0.33",
11
11
  "tslib": "^2.3.0",
12
12
  "@axe-core/playwright": "^4.13.0",
13
13
  "@playwright/test": "^1.36.0"
@@ -0,0 +1,27 @@
1
+ import { InteractionContract } from '@origo/core';
2
+ import { OrigoAdapter } from '../../../adapters/web/adapter';
3
+ export interface CheckboxProps {
4
+ checked?: boolean;
5
+ label?: string;
6
+ disabled?: boolean;
7
+ 'aria-label'?: string;
8
+ required?: boolean;
9
+ }
10
+ export declare class CheckboxComponent implements OrigoAdapter<CheckboxProps> {
11
+ static readonly contractSchema: {
12
+ checked: string;
13
+ label: string;
14
+ disabled: string;
15
+ required: string;
16
+ };
17
+ static readonly strictContract = false;
18
+ contract: import("@angular/core").InputSignal<InteractionContract<CheckboxProps>>;
19
+ checked: import("@angular/core").ModelSignal<boolean>;
20
+ computedLabel: import("@angular/core").Signal<string>;
21
+ computedDisabled: import("@angular/core").Signal<boolean>;
22
+ computedRequired: import("@angular/core").Signal<boolean>;
23
+ computedAriaLabel: import("@angular/core").Signal<string | undefined>;
24
+ private experienceAdapter;
25
+ constructor();
26
+ onChange(event: Event): void;
27
+ }
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CheckboxComponent = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const core_1 = require("@angular/core");
6
+ const experience_adapter_service_1 = require("../../../adapters/web/experience-adapter.service");
7
+ let CheckboxComponent = (() => {
8
+ let _classDecorators = [(0, core_1.Component)({
9
+ selector: 'origo-checkbox',
10
+ standalone: true,
11
+ templateUrl: './checkbox.component.html',
12
+ styleUrls: ['./checkbox.component.scss'],
13
+ changeDetection: core_1.ChangeDetectionStrategy.OnPush,
14
+ encapsulation: core_1.ViewEncapsulation.ShadowDom,
15
+ host: {
16
+ '[class.origo-checkbox]': 'true',
17
+ '[attr.data-testid]': 'contract().id',
18
+ },
19
+ })];
20
+ let _classDescriptor;
21
+ let _classExtraInitializers = [];
22
+ let _classThis;
23
+ var CheckboxComponent = class {
24
+ static { _classThis = this; }
25
+ static {
26
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
27
+ tslib_1.__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
28
+ CheckboxComponent = _classThis = _classDescriptor.value;
29
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
30
+ }
31
+ static contractSchema = {
32
+ checked: 'boolean',
33
+ label: 'string',
34
+ disabled: 'boolean',
35
+ required: 'boolean',
36
+ };
37
+ static strictContract = false;
38
+ contract = core_1.input.required();
39
+ checked = (0, core_1.model)(false);
40
+ computedLabel = (0, core_1.computed)(() => this.contract().props?.label ?? '');
41
+ computedDisabled = (0, core_1.computed)(() => !!this.contract().props?.disabled);
42
+ computedRequired = (0, core_1.computed)(() => !!this.contract().props?.required);
43
+ computedAriaLabel = (0, core_1.computed)(() => {
44
+ const label = this.contract().props?.['aria-label'];
45
+ return label !== undefined && label !== null ? String(label) : undefined;
46
+ });
47
+ experienceAdapter = (0, core_1.inject)(experience_adapter_service_1.WebExperienceAdapterService);
48
+ constructor() {
49
+ (0, core_1.effect)(() => {
50
+ const contractVal = !!this.contract().props?.checked;
51
+ (0, core_1.untracked)(() => {
52
+ if (contractVal === this.checked())
53
+ return;
54
+ this.checked.set(contractVal);
55
+ });
56
+ });
57
+ }
58
+ onChange(event) {
59
+ const target = event.target;
60
+ if (!target || this.computedDisabled())
61
+ return;
62
+ const isChecked = target.checked;
63
+ this.checked.set(isChecked);
64
+ this.experienceAdapter.updateState(this.contract().id, 'checked', isChecked);
65
+ }
66
+ static {
67
+ tslib_1.__runInitializers(_classThis, _classExtraInitializers);
68
+ }
69
+ };
70
+ return CheckboxComponent = _classThis;
71
+ })();
72
+ exports.CheckboxComponent = CheckboxComponent;
73
+ //# sourceMappingURL=checkbox.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkbox.component.js","sourceRoot":"","sources":["../../../../../../../packages/angular-renderer/src/components/primitives/checkbox/checkbox.component.ts"],"names":[],"mappings":";;;;AAAA,wCAUuB;AAGvB,iGAA+F;IAsBlF,iBAAiB;4BAZ7B,IAAA,gBAAS,EAAC;YACT,QAAQ,EAAE,gBAAgB;YAC1B,UAAU,EAAE,IAAI;YAChB,WAAW,EAAE,2BAA2B;YACxC,SAAS,EAAE,CAAC,2BAA2B,CAAC;YACxC,eAAe,EAAE,8BAAuB,CAAC,MAAM;YAC/C,aAAa,EAAE,wBAAiB,CAAC,SAAS;YAC1C,IAAI,EAAE;gBACJ,wBAAwB,EAAE,MAAM;gBAChC,oBAAoB,EAAE,eAAe;aACtC;SACF,CAAC;;;;;;;;YACF,qLAwCC;;;;QAvCC,MAAM,CAAU,cAAc,GAAG;YAC/B,OAAO,EAAE,SAAS;YAClB,KAAK,EAAE,QAAQ;YACf,QAAQ,EAAE,SAAS;YACnB,QAAQ,EAAE,SAAS;SACpB,CAAC;QACF,MAAM,CAAU,cAAc,GAAG,KAAK,CAAC;QAEvC,QAAQ,GAAG,YAAK,CAAC,QAAQ,EAAsC,CAAC;QAChE,OAAO,GAAG,IAAA,YAAK,EAAU,KAAK,CAAC,CAAC;QAEhC,aAAa,GAAG,IAAA,eAAQ,EAAC,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC;QACnE,gBAAgB,GAAG,IAAA,eAAQ,EAAC,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;QACrE,gBAAgB,GAAG,IAAA,eAAQ,EAAC,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,KAAK,EAA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+ import { OrigoAdapter, ContainerComponent } from '../../../adapters/web/adapter';
4
+ import { LabelProps } from '../label/label.component';
5
+ export interface FormFieldProps {
6
+ label?: string;
7
+ error?: string;
8
+ hint?: string;
9
+ required?: boolean;
10
+ }
11
+ export declare class FormFieldComponent implements OrigoAdapter<FormFieldProps>, ContainerComponent {
12
+ static readonly contractSchema: {
13
+ label: string;
14
+ error: string;
15
+ hint: string;
16
+ required: string;
17
+ };
18
+ static readonly strictContract = false;
19
+ contract: import("@angular/core").InputSignal<InteractionContract<FormFieldProps>>;
20
+ vc: import("@angular/core").Signal<ViewContainerRef>;
21
+ computedLabel: import("@angular/core").Signal<string | undefined>;
22
+ computedError: import("@angular/core").Signal<string | undefined>;
23
+ computedHint: import("@angular/core").Signal<string | undefined>;
24
+ computedRequired: import("@angular/core").Signal<boolean>;
25
+ labelContract: import("@angular/core").Signal<InteractionContract<LabelProps>>;
26
+ }
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FormFieldComponent = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const core_1 = require("@angular/core");
6
+ const label_component_1 = require("../label/label.component");
7
+ let FormFieldComponent = (() => {
8
+ let _classDecorators = [(0, core_1.Component)({
9
+ selector: 'origo-form-field',
10
+ standalone: true,
11
+ imports: [label_component_1.LabelComponent],
12
+ templateUrl: './form-field.component.html',
13
+ styleUrls: ['./form-field.component.scss'],
14
+ changeDetection: core_1.ChangeDetectionStrategy.OnPush,
15
+ encapsulation: core_1.ViewEncapsulation.ShadowDom,
16
+ host: {
17
+ '[class.origo-form-field]': 'true',
18
+ '[class.has-error]': '!!computedError()',
19
+ '[attr.data-testid]': 'contract().id',
20
+ },
21
+ })];
22
+ let _classDescriptor;
23
+ let _classExtraInitializers = [];
24
+ let _classThis;
25
+ var FormFieldComponent = class {
26
+ static { _classThis = this; }
27
+ static {
28
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
29
+ tslib_1.__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
30
+ FormFieldComponent = _classThis = _classDescriptor.value;
31
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
32
+ }
33
+ static contractSchema = {
34
+ label: 'string',
35
+ error: 'string',
36
+ hint: 'string',
37
+ required: 'boolean',
38
+ };
39
+ static strictContract = false;
40
+ contract = core_1.input.required();
41
+ vc = core_1.viewChild.required('vc', { read: core_1.ViewContainerRef });
42
+ computedLabel = (0, core_1.computed)(() => this.contract().props?.label);
43
+ computedError = (0, core_1.computed)(() => this.contract().props?.error);
44
+ computedHint = (0, core_1.computed)(() => this.contract().props?.hint);
45
+ computedRequired = (0, core_1.computed)(() => !!this.contract().props?.required);
46
+ labelContract = (0, core_1.computed)(() => {
47
+ const parentId = this.contract().id;
48
+ const childId = this.contract().children?.[0]?.id;
49
+ return {
50
+ id: `${parentId}-label`,
51
+ type: 'Label',
52
+ props: {
53
+ text: this.computedLabel(),
54
+ required: this.computedRequired(),
55
+ for: childId,
56
+ },
57
+ };
58
+ });
59
+ static {
60
+ tslib_1.__runInitializers(_classThis, _classExtraInitializers);
61
+ }
62
+ };
63
+ return FormFieldComponent = _classThis;
64
+ })();
65
+ exports.FormFieldComponent = FormFieldComponent;
66
+ //# sourceMappingURL=form-field.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form-field.component.js","sourceRoot":"","sources":["../../../../../../../packages/angular-renderer/src/components/primitives/form-field/form-field.component.ts"],"names":[],"mappings":";;;;AAAA,wCAQuB;AAGvB,8DAAsE;IAuBzD,kBAAkB;4BAd9B,IAAA,gBAAS,EAAC;YACT,QAAQ,EAAE,kBAAkB;YAC5B,UAAU,EAAE,IAAI;YAChB,OAAO,EAAE,CAAC,gCAAc,CAAC;YACzB,WAAW,EAAE,6BAA6B;YAC1C,SAAS,EAAE,CAA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EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;YAClD,OAAO;gBACL,EAAE,EAAE,GAAG,QAAQ,QAAQ;gBACvB,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE;oBACL,IAAI,EAAE,IAAI,CAAC,aAAa,EAAE;oBAC1B,QAAQ,EAAE,IAAI,CAAC,gBAAgB,EAAE;oBACjC,GAAG,EAAE,OAAO;iBACb;aACF,CAAC;QACJ,CAAC,CAAC,CAAC;;YA9BQ,+DAAkB;;;;;AAAlB,gDAAkB"}
@@ -0,0 +1,21 @@
1
+ import { ViewContainerRef } from '@angular/core';
2
+ import { InteractionContract } from '@origo/core';
3
+ import { OrigoAdapter, ContainerComponent } from '../../../adapters/web/adapter';
4
+ export interface HBoxProps {
5
+ gap?: number | string;
6
+ alignment?: 'start' | 'center' | 'end' | 'stretch';
7
+ padding?: number | string;
8
+ }
9
+ export declare class HBoxComponent implements OrigoAdapter<HBoxProps>, ContainerComponent {
10
+ static readonly contractSchema: {
11
+ gap: string;
12
+ alignment: string;
13
+ padding: string;
14
+ };
15
+ static readonly strictContract = false;
16
+ contract: import("@angular/core").InputSignal<InteractionContract<HBoxProps>>;
17
+ vc: import("@angular/core").Signal<ViewContainerRef>;
18
+ computedGap: import("@angular/core").Signal<string | undefined>;
19
+ computedAlignment: import("@angular/core").Signal<"center" | "stretch" | "flex-start" | "flex-end">;
20
+ computedPadding: import("@angular/core").Signal<string | undefined>;
21
+ }
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HBoxComponent = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const core_1 = require("@angular/core");
6
+ let HBoxComponent = (() => {
7
+ let _classDecorators = [(0, core_1.Component)({
8
+ selector: 'origo-hbox',
9
+ standalone: true,
10
+ templateUrl: './hbox.component.html',
11
+ styleUrls: ['./hbox.component.scss'],
12
+ changeDetection: core_1.ChangeDetectionStrategy.OnPush,
13
+ encapsulation: core_1.ViewEncapsulation.ShadowDom,
14
+ host: {
15
+ '[class.origo-hbox]': 'true',
16
+ '[attr.data-testid]': 'contract().id',
17
+ '[style.gap]': 'computedGap()',
18
+ '[style.align-items]': 'computedAlignment()',
19
+ '[style.padding-inline]': 'computedPadding()',
20
+ '[style.padding-block]': 'computedPadding()',
21
+ },
22
+ })];
23
+ let _classDescriptor;
24
+ let _classExtraInitializers = [];
25
+ let _classThis;
26
+ var HBoxComponent = class {
27
+ static { _classThis = this; }
28
+ static {
29
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
30
+ tslib_1.__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
31
+ HBoxComponent = _classThis = _classDescriptor.value;
32
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
33
+ }
34
+ static contractSchema = {
35
+ gap: 'string',
36
+ alignment: 'string',
37
+ padding: 'string',
38
+ };
39
+ static strictContract = false;
40
+ contract = core_1.input.required();
41
+ vc = core_1.viewChild.required('vc', { read: core_1.ViewContainerRef });
42
+ computedGap = (0, core_1.computed)(() => {
43
+ const gap = this.contract().props?.gap;
44
+ if (gap === undefined || gap === null || gap === '')
45
+ return undefined;
46
+ const num = Number(gap);
47
+ return !isNaN(num) ? `${num}px` : String(gap);
48
+ });
49
+ computedAlignment = (0, core_1.computed)(() => {
50
+ const align = this.contract().props?.alignment;
51
+ switch (align) {
52
+ case 'start':
53
+ return 'flex-start';
54
+ case 'end':
55
+ return 'flex-end';
56
+ case 'center':
57
+ return 'center';
58
+ case 'stretch':
59
+ return 'stretch';
60
+ default:
61
+ return 'stretch';
62
+ }
63
+ });
64
+ computedPadding = (0, core_1.computed)(() => {
65
+ const padding = this.contract().props?.padding;
66
+ if (padding === undefined || padding === null || padding === '')
67
+ return undefined;
68
+ const num = Number(padding);
69
+ return !isNaN(num) ? `${num}px` : String(padding);
70
+ });
71
+ static {
72
+ tslib_1.__runInitializers(_classThis, _classExtraInitializers);
73
+ }
74
+ };
75
+ return HBoxComponent = _classThis;
76
+ })();
77
+ exports.HBoxComponent = HBoxComponent;
78
+ //# sourceMappingURL=hbox.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hbox.component.js","sourceRoot":"","sources":["../../../../../../../packages/angular-renderer/src/components/primitives/hbox/hbox.component.ts"],"names":[],"mappings":";;;;AAAA,wCAQuB;IA0BV,aAAa;4BAhBzB,IAAA,gBAAS,EAAC;YACT,QAAQ,EAAE,YAAY;YACtB,UAAU,EAAE,IAAI;YAChB,WAAW,EAAE,uBAAuB;YACpC,SAAS,EAAE,CAAC,uBAAuB,CAAC;YACpC,eAAe,EAAE,8BAAuB,CAAC,MAAM;YAC/C,aAAa,EAAE,wBAAiB,CAAC,SAAS;YAC1C,IAAI,EAAE;gBACJ,oBAAoB,EAAE,MAAM;gBAC5B,oBAAoB,EAAE,eAAe;gBACrC,aAAa,EAAE,eAAe;gBAC9B,qBAAqB,EAAE,qBAAqB;gBAC5C,wBAAwB,EAAE,mBAAmB;gBAC7C,uBAAuB,EAAE,mBAAmB;aAC7C;SACF,CAAC;;;;;;;;YACF,qLAyCC;;;;QAxCC,MAAM,CAAU,cAAc,GAAG;YAC/B,GAAG,EAAE,QAAQ;YACb,SAAS,EAAE,QAAQ;YACnB,OAAO,EAAE,QAAQ;SAClB,CAAC;QACF,MAAM,CAAU,cAAc,GAAG,KAAK,CAAC;QAEvC,QAAQ,GAAG,YAAK,CAAC,QAAQ,EAAkC,CAAC;QAE5D,EAAE,GAAG,gBAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,uBAAgB,EAAE,CAAC,CAAC;QAE1D,WAAW,GAAG,IAAA,eAAQ,EAAC,GAAG,EAAE;YAC1B,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,GAAG,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from '@origo/core';
2
+ import { OrigoAdapter } from '../../../adapters/web/adapter';
3
+ export interface LabelProps {
4
+ text?: string;
5
+ for?: string;
6
+ required?: boolean;
7
+ 'aria-label'?: string;
8
+ }
9
+ export declare class LabelComponent implements OrigoAdapter<LabelProps> {
10
+ static readonly contractSchema: {
11
+ text: string;
12
+ for: string;
13
+ required: string;
14
+ };
15
+ static readonly strictContract = false;
16
+ contract: import("@angular/core").InputSignal<InteractionContract<LabelProps>>;
17
+ computedText: import("@angular/core").Signal<string>;
18
+ computedFor: import("@angular/core").Signal<string | undefined>;
19
+ computedRequired: import("@angular/core").Signal<boolean>;
20
+ computedAriaLabel: import("@angular/core").Signal<string | undefined>;
21
+ }
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LabelComponent = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const core_1 = require("@angular/core");
6
+ let LabelComponent = (() => {
7
+ let _classDecorators = [(0, core_1.Component)({
8
+ selector: 'origo-label',
9
+ standalone: true,
10
+ templateUrl: './label.component.html',
11
+ styleUrls: ['./label.component.scss'],
12
+ changeDetection: core_1.ChangeDetectionStrategy.OnPush,
13
+ encapsulation: core_1.ViewEncapsulation.ShadowDom,
14
+ host: {
15
+ '[class.origo-label]': 'true',
16
+ '[attr.data-testid]': 'contract().id',
17
+ },
18
+ })];
19
+ let _classDescriptor;
20
+ let _classExtraInitializers = [];
21
+ let _classThis;
22
+ var LabelComponent = class {
23
+ static { _classThis = this; }
24
+ static {
25
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
26
+ tslib_1.__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
27
+ LabelComponent = _classThis = _classDescriptor.value;
28
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
29
+ }
30
+ static contractSchema = {
31
+ text: 'string',
32
+ for: 'string',
33
+ required: 'boolean',
34
+ };
35
+ static strictContract = false;
36
+ contract = core_1.input.required();
37
+ computedText = (0, core_1.computed)(() => this.contract().props?.text ?? '');
38
+ computedFor = (0, core_1.computed)(() => {
39
+ const f = this.contract().props?.for;
40
+ return f !== undefined && f !== null ? String(f) : undefined;
41
+ });
42
+ computedRequired = (0, core_1.computed)(() => !!this.contract().props?.required);
43
+ computedAriaLabel = (0, core_1.computed)(() => {
44
+ const label = this.contract().props?.['aria-label'];
45
+ return label !== undefined && label !== null ? String(label) : undefined;
46
+ });
47
+ static {
48
+ tslib_1.__runInitializers(_classThis, _classExtraInitializers);
49
+ }
50
+ };
51
+ return LabelComponent = _classThis;
52
+ })();
53
+ exports.LabelComponent = LabelComponent;
54
+ //# sourceMappingURL=label.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"label.component.js","sourceRoot":"","sources":["../../../../../../../packages/angular-renderer/src/components/primitives/label/label.component.ts"],"names":[],"mappings":";;;;AAAA,wCAMuB;IAuBV,cAAc;4BAZ1B,IAAA,gBAAS,EAAC;YACT,QAAQ,EAAE,aAAa;YACvB,UAAU,EAAE,IAAI;YAChB,WAAW,EAAE,wBAAwB;YACrC,SAAS,EAAE,CAAC,wBAAwB,CAAC;YACrC,eAAe,EAAE,8BAAuB,CAAC,MAAM;YAC/C,aAAa,EAAE,wBAAiB,CAAC,SAAS;YAC1C,IAAI,EAAE;gBACJ,qBAAqB,EAAE,MAAM;gBAC7B,oBAAoB,EAAE,eAAe;aACtC;SACF,CAAC;;;;;;;;YACF,qLAoBC;;;;QAnBC,MAAM,CAAU,cAAc,GAAG;YAC/B,IAAI,EAAE,QAAQ;YACd,GAAG,EAAE,QAAQ;YACb,QAAQ,EAAE,SAAS;SACpB,CAAC;QACF,MAAM,CAAU,cAAc,GAAG,KAAK,CAAC;QAEvC,QAAQ,GAAG,YAAK,CAAC,QAAQ,EAAmC,CAAC;QAE7D,YAAY,GAAG,IAAA,eAAQ,EAAC,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC;QACjE,WAAW,GAAG,IAAA,eAAQ,EAAC,GAAG,EAAE;YAC1B,MAAM,CAAC,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,GAAG,CAAC;YACrC,OAAO,CAAC,KAAK,SAAS,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAC/D,CAAC,CAAC,CAAC;QACH,gBAAgB,GAAG,IAAA,eAAQ,EAAC,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;QACrE,iBAAiB,GAAG,IAAA,eAAQ,EAAC,GAAG,EAAE;YAChC,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,YAAY,CAAC,CAAC;YACpD,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAC3E,CAAC,CAAC,CAAC;;YAnBQ,+DAAc;;;;;AAAd,wCAAc"}
@@ -0,0 +1,34 @@
1
+ import { InteractionContract } from '@origo/core';
2
+ import { OrigoAdapter } from '../../../adapters/web/adapter';
3
+ export interface RadioGroupProps {
4
+ options: Array<{
5
+ value: string;
6
+ label: string;
7
+ }>;
8
+ value?: string;
9
+ disabled?: boolean;
10
+ 'aria-label'?: string;
11
+ required?: boolean;
12
+ }
13
+ export declare class RadioGroupComponent implements OrigoAdapter<RadioGroupProps> {
14
+ static readonly contractSchema: {
15
+ options: string;
16
+ value: string;
17
+ disabled: string;
18
+ required: string;
19
+ };
20
+ static readonly strictContract = false;
21
+ contract: import("@angular/core").InputSignal<InteractionContract<RadioGroupProps>>;
22
+ value: import("@angular/core").ModelSignal<string>;
23
+ computedOptions: import("@angular/core").Signal<{
24
+ value: string;
25
+ label: string;
26
+ }[]>;
27
+ computedDisabled: import("@angular/core").Signal<boolean>;
28
+ computedRequired: import("@angular/core").Signal<boolean>;
29
+ computedAriaLabel: import("@angular/core").Signal<string | undefined>;
30
+ private experienceAdapter;
31
+ private sanitizer;
32
+ constructor();
33
+ onChange(event: Event): void;
34
+ }
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RadioGroupComponent = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const core_1 = require("@angular/core");
6
+ const platform_browser_1 = require("@angular/platform-browser");
7
+ const experience_adapter_service_1 = require("../../../adapters/web/experience-adapter.service");
8
+ let RadioGroupComponent = (() => {
9
+ let _classDecorators = [(0, core_1.Component)({
10
+ selector: 'origo-radio-group',
11
+ standalone: true,
12
+ templateUrl: './radio-group.component.html',
13
+ styleUrls: ['./radio-group.component.scss'],
14
+ changeDetection: core_1.ChangeDetectionStrategy.OnPush,
15
+ encapsulation: core_1.ViewEncapsulation.ShadowDom,
16
+ host: {
17
+ '[class.origo-radio-group]': 'true',
18
+ '[attr.data-testid]': 'contract().id',
19
+ },
20
+ })];
21
+ let _classDescriptor;
22
+ let _classExtraInitializers = [];
23
+ let _classThis;
24
+ var RadioGroupComponent = class {
25
+ static { _classThis = this; }
26
+ static {
27
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
28
+ tslib_1.__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
29
+ RadioGroupComponent = _classThis = _classDescriptor.value;
30
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
31
+ }
32
+ static contractSchema = {
33
+ options: 'array',
34
+ value: 'string',
35
+ disabled: 'boolean',
36
+ required: 'boolean',
37
+ };
38
+ static strictContract = false;
39
+ contract = core_1.input.required();
40
+ value = (0, core_1.model)('');
41
+ computedOptions = (0, core_1.computed)(() => {
42
+ const opts = this.contract().props?.options;
43
+ return Array.isArray(opts) ? opts : [];
44
+ });
45
+ computedDisabled = (0, core_1.computed)(() => !!this.contract().props?.disabled);
46
+ computedRequired = (0, core_1.computed)(() => !!this.contract().props?.required);
47
+ computedAriaLabel = (0, core_1.computed)(() => {
48
+ const label = this.contract().props?.['aria-label'];
49
+ return label !== undefined && label !== null ? String(label) : undefined;
50
+ });
51
+ experienceAdapter = (0, core_1.inject)(experience_adapter_service_1.WebExperienceAdapterService);
52
+ sanitizer = (0, core_1.inject)(platform_browser_1.DomSanitizer);
53
+ constructor() {
54
+ (0, core_1.effect)(() => {
55
+ const contractVal = this.contract().props?.value;
56
+ const parsedVal = contractVal !== undefined && contractVal !== null ? String(contractVal) : '';
57
+ (0, core_1.untracked)(() => {
58
+ if (parsedVal === this.value())
59
+ return;
60
+ this.value.set(parsedVal);
61
+ });
62
+ });
63
+ }
64
+ onChange(event) {
65
+ const target = event.target;
66
+ if (!target || !target.checked || this.computedDisabled())
67
+ return;
68
+ const rawValue = target.value;
69
+ const sanitizedValue = this.sanitizer.sanitize(core_1.SecurityContext.HTML, rawValue) || rawValue || '';
70
+ this.value.set(sanitizedValue);
71
+ this.experienceAdapter.updateState(this.contract().id, 'value', sanitizedValue);
72
+ }
73
+ static {
74
+ tslib_1.__runInitializers(_classThis, _classExtraInitializers);
75
+ }
76
+ };
77
+ return RadioGroupComponent = _classThis;
78
+ })();
79
+ exports.RadioGroupComponent = RadioGroupComponent;
80
+ //# sourceMappingURL=radio-group.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"radio-group.component.js","sourceRoot":"","sources":["../../../../../../../packages/angular-renderer/src/components/primitives/radio-group/radio-group.component.ts"],"names":[],"mappings":";;;;AAAA,wCAWuB;AACvB,gEAAyD;AAGzD,iGAA+F;IA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c,CAAC,CAAC;YAC/B,IAAI,CAAC,iBAAiB,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,EAAE,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;QAClF,CAAC;;YAhDU,+DAAmB;;;;;AAAnB,kDAAmB"}
@@ -0,0 +1,39 @@
1
+ import { InteractionContract } from '@origo/core';
2
+ import { OrigoAdapter } from '../../../adapters/web/adapter';
3
+ export interface SelectProps {
4
+ options: Array<{
5
+ value: string;
6
+ label: string;
7
+ }>;
8
+ value?: string;
9
+ disabled?: boolean;
10
+ placeholder?: string;
11
+ 'aria-label'?: string;
12
+ 'aria-describedby'?: string;
13
+ required?: boolean;
14
+ }
15
+ export declare class SelectComponent implements OrigoAdapter<SelectProps> {
16
+ static readonly contractSchema: {
17
+ options: string;
18
+ value: string;
19
+ disabled: string;
20
+ placeholder: string;
21
+ required: string;
22
+ };
23
+ static readonly strictContract = false;
24
+ contract: import("@angular/core").InputSignal<InteractionContract<SelectProps>>;
25
+ value: import("@angular/core").ModelSignal<string>;
26
+ computedOptions: import("@angular/core").Signal<{
27
+ value: string;
28
+ label: string;
29
+ }[]>;
30
+ computedPlaceholder: import("@angular/core").Signal<string>;
31
+ computedDisabled: import("@angular/core").Signal<boolean>;
32
+ computedRequired: import("@angular/core").Signal<boolean>;
33
+ computedAriaLabel: import("@angular/core").Signal<string | undefined>;
34
+ computedAriaDescribedBy: import("@angular/core").Signal<string | undefined>;
35
+ private experienceAdapter;
36
+ private sanitizer;
37
+ constructor();
38
+ onChange(event: Event): void;
39
+ }