@kanso-protocol/container 0.1.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.
@@ -0,0 +1,40 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Input, ChangeDetectionStrategy, Component } from '@angular/core';
3
+
4
+ /**
5
+ * Kanso Protocol — Container
6
+ *
7
+ * Responsive content wrapper. Caps child width at one of four
8
+ * preset breakpoints and applies horizontal padding. Pure layout
9
+ * primitive — no colors, borders, or spacing on its own axis.
10
+ *
11
+ * @example
12
+ * <kp-container width="medium" padding="md">
13
+ * <h1>Settings</h1>
14
+ * <kp-card>…</kp-card>
15
+ * </kp-container>
16
+ */
17
+ class KpContainerComponent {
18
+ width = 'wide';
19
+ padding = 'md';
20
+ get hostClasses() {
21
+ return `kp-container kp-container--${this.width} kp-container--pad-${this.padding}`;
22
+ }
23
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: KpContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
24
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.7", type: KpContainerComponent, isStandalone: true, selector: "kp-container", inputs: { width: "width", padding: "padding" }, host: { properties: { "class": "hostClasses" } }, ngImport: i0, template: `<ng-content/>`, isInline: true, styles: [":host{box-sizing:border-box;display:block;width:100%;max-width:var(--kp-container-max, 1280px);margin-inline:auto;padding-inline:var(--kp-container-pad, 24px)}:host(.kp-container--narrow){--kp-container-max: var(--kp-layout-container-max-width-narrow, 640px)}:host(.kp-container--medium){--kp-container-max: var(--kp-layout-container-max-width-medium, 960px)}:host(.kp-container--wide){--kp-container-max: var(--kp-layout-container-max-width-wide, 1280px)}:host(.kp-container--full){--kp-container-max: 100%}:host(.kp-container--pad-none){--kp-container-pad: 0}:host(.kp-container--pad-sm){--kp-container-pad: var(--kp-layout-container-padding-sm, 16px)}:host(.kp-container--pad-md){--kp-container-pad: var(--kp-layout-container-padding-md, 24px)}:host(.kp-container--pad-lg){--kp-container-pad: var(--kp-layout-container-padding-lg, 32px)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
25
+ }
26
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: KpContainerComponent, decorators: [{
27
+ type: Component,
28
+ args: [{ selector: 'kp-container', imports: [], changeDetection: ChangeDetectionStrategy.OnPush, host: { '[class]': 'hostClasses' }, template: `<ng-content/>`, styles: [":host{box-sizing:border-box;display:block;width:100%;max-width:var(--kp-container-max, 1280px);margin-inline:auto;padding-inline:var(--kp-container-pad, 24px)}:host(.kp-container--narrow){--kp-container-max: var(--kp-layout-container-max-width-narrow, 640px)}:host(.kp-container--medium){--kp-container-max: var(--kp-layout-container-max-width-medium, 960px)}:host(.kp-container--wide){--kp-container-max: var(--kp-layout-container-max-width-wide, 1280px)}:host(.kp-container--full){--kp-container-max: 100%}:host(.kp-container--pad-none){--kp-container-pad: 0}:host(.kp-container--pad-sm){--kp-container-pad: var(--kp-layout-container-padding-sm, 16px)}:host(.kp-container--pad-md){--kp-container-pad: var(--kp-layout-container-padding-md, 24px)}:host(.kp-container--pad-lg){--kp-container-pad: var(--kp-layout-container-padding-lg, 32px)}\n"] }]
29
+ }], propDecorators: { width: [{
30
+ type: Input
31
+ }], padding: [{
32
+ type: Input
33
+ }] } });
34
+
35
+ /**
36
+ * Generated bundle index. Do not edit.
37
+ */
38
+
39
+ export { KpContainerComponent };
40
+ //# sourceMappingURL=kanso-protocol-container.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kanso-protocol-container.mjs","sources":["../../../../../packages/patterns/container/src/container.component.ts","../../../../../packages/patterns/container/src/kanso-protocol-container.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n Input,\n} from '@angular/core';\n\nexport type KpContainerWidth = 'narrow' | 'medium' | 'wide' | 'full';\nexport type KpContainerPadding = 'none' | 'sm' | 'md' | 'lg';\n\n/**\n * Kanso Protocol — Container\n *\n * Responsive content wrapper. Caps child width at one of four\n * preset breakpoints and applies horizontal padding. Pure layout\n * primitive — no colors, borders, or spacing on its own axis.\n *\n * @example\n * <kp-container width=\"medium\" padding=\"md\">\n * <h1>Settings</h1>\n * <kp-card>…</kp-card>\n * </kp-container>\n */\n@Component({\n selector: 'kp-container',\n imports: [],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { '[class]': 'hostClasses' },\n template: `<ng-content/>`,\n styles: [`\n :host {\n box-sizing: border-box;\n display: block;\n width: 100%;\n max-width: var(--kp-container-max, 1280px);\n margin-inline: auto;\n padding-inline: var(--kp-container-pad, 24px);\n }\n\n :host(.kp-container--narrow) { --kp-container-max: var(--kp-layout-container-max-width-narrow, 640px); }\n :host(.kp-container--medium) { --kp-container-max: var(--kp-layout-container-max-width-medium, 960px); }\n :host(.kp-container--wide) { --kp-container-max: var(--kp-layout-container-max-width-wide, 1280px); }\n :host(.kp-container--full) { --kp-container-max: 100%; }\n\n :host(.kp-container--pad-none) { --kp-container-pad: 0; }\n :host(.kp-container--pad-sm) { --kp-container-pad: var(--kp-layout-container-padding-sm, 16px); }\n :host(.kp-container--pad-md) { --kp-container-pad: var(--kp-layout-container-padding-md, 24px); }\n :host(.kp-container--pad-lg) { --kp-container-pad: var(--kp-layout-container-padding-lg, 32px); }\n `],\n})\nexport class KpContainerComponent {\n @Input() width: KpContainerWidth = 'wide';\n @Input() padding: KpContainerPadding = 'md';\n\n get hostClasses(): string {\n return `kp-container kp-container--${this.width} kp-container--pad-${this.padding}`;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AASA;;;;;;;;;;;;AAYG;MA4BU,oBAAoB,CAAA;IACtB,KAAK,GAAqB,MAAM;IAChC,OAAO,GAAuB,IAAI;AAE3C,IAAA,IAAI,WAAW,GAAA;QACb,OAAO,CAAA,2BAAA,EAA8B,IAAI,CAAC,KAAK,sBAAsB,IAAI,CAAC,OAAO,CAAA,CAAE;IACrF;uGANW,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAApB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,oBAAoB,0KAtBrB,CAAA,aAAA,CAAe,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,40BAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAsBd,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBA3BhC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,cAAc,EAAA,OAAA,EACf,EAAE,EAAA,eAAA,EACM,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC,EAAE,SAAS,EAAE,aAAa,EAAE,YACxB,CAAA,aAAA,CAAe,EAAA,MAAA,EAAA,CAAA,40BAAA,CAAA,EAAA;;sBAuBxB;;sBACA;;;ACnDH;;AAEG;;;;"}
package/package.json ADDED
@@ -0,0 +1,41 @@
1
+ {
2
+ "name": "@kanso-protocol/container",
3
+ "version": "0.1.0",
4
+ "license": "MIT",
5
+ "peerDependencies": {
6
+ "@angular/core": "^18.0.0",
7
+ "@angular/common": "^18.0.0",
8
+ "@kanso-protocol/core": "^0.0.1"
9
+ },
10
+ "description": "Kanso Protocol — container (pattern).",
11
+ "author": "GregNBlack",
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "https://github.com/GregNBlack/kanso-protocol.git",
15
+ "directory": "packages/patterns/container"
16
+ },
17
+ "homepage": "https://gregnblack.github.io/kanso-protocol/?path=/docs/patterns-container--docs",
18
+ "bugs": "https://github.com/GregNBlack/kanso-protocol/issues",
19
+ "keywords": [
20
+ "design-system",
21
+ "angular",
22
+ "kanso",
23
+ "container"
24
+ ],
25
+ "sideEffects": false,
26
+ "module": "fesm2022/kanso-protocol-container.mjs",
27
+ "typings": "types/kanso-protocol-container.d.ts",
28
+ "exports": {
29
+ "./package.json": {
30
+ "default": "./package.json"
31
+ },
32
+ ".": {
33
+ "types": "./types/kanso-protocol-container.d.ts",
34
+ "default": "./fesm2022/kanso-protocol-container.mjs"
35
+ }
36
+ },
37
+ "type": "module",
38
+ "dependencies": {
39
+ "tslib": "^2.3.0"
40
+ }
41
+ }
@@ -0,0 +1,27 @@
1
+ import * as i0 from '@angular/core';
2
+
3
+ type KpContainerWidth = 'narrow' | 'medium' | 'wide' | 'full';
4
+ type KpContainerPadding = 'none' | 'sm' | 'md' | 'lg';
5
+ /**
6
+ * Kanso Protocol — Container
7
+ *
8
+ * Responsive content wrapper. Caps child width at one of four
9
+ * preset breakpoints and applies horizontal padding. Pure layout
10
+ * primitive — no colors, borders, or spacing on its own axis.
11
+ *
12
+ * @example
13
+ * <kp-container width="medium" padding="md">
14
+ * <h1>Settings</h1>
15
+ * <kp-card>…</kp-card>
16
+ * </kp-container>
17
+ */
18
+ declare class KpContainerComponent {
19
+ width: KpContainerWidth;
20
+ padding: KpContainerPadding;
21
+ get hostClasses(): string;
22
+ static ɵfac: i0.ɵɵFactoryDeclaration<KpContainerComponent, never>;
23
+ static ɵcmp: i0.ɵɵComponentDeclaration<KpContainerComponent, "kp-container", never, { "width": { "alias": "width"; "required": false; }; "padding": { "alias": "padding"; "required": false; }; }, {}, never, ["*"], true, never>;
24
+ }
25
+
26
+ export { KpContainerComponent };
27
+ export type { KpContainerPadding, KpContainerWidth };