@affinda/wc 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/affinda/af-aspect-ratio.entry.esm.js.map +1 -0
- package/dist/affinda/af-button-group.entry.esm.js.map +1 -0
- package/dist/affinda/af-button.entry.esm.js.map +1 -0
- package/dist/affinda/af-color-swatch.entry.esm.js.map +1 -0
- package/dist/affinda/af-container.entry.esm.js.map +1 -0
- package/dist/affinda/af-heading.af-logo.af-nav-item.af-navbar.af-text.entry.esm.js.map +1 -0
- package/dist/affinda/af-icon-button.entry.esm.js.map +1 -0
- package/dist/affinda/af-typography-lockup.entry.esm.js.map +1 -0
- package/dist/affinda/affinda.css +1 -1
- package/dist/affinda/affinda.esm.js +1 -1
- package/dist/affinda/index.esm.js +1 -1
- package/dist/affinda/index.esm.js.map +1 -1
- package/dist/affinda/p-540af9d9.entry.js +2 -0
- package/dist/affinda/p-540af9d9.entry.js.map +1 -0
- package/dist/affinda/p-619bc077.entry.js +2 -0
- package/dist/affinda/p-619bc077.entry.js.map +1 -0
- package/dist/affinda/p-6b07f590.entry.js +2 -0
- package/dist/affinda/p-6b07f590.entry.js.map +1 -0
- package/dist/affinda/p-8d3b4917.entry.js +2 -0
- package/dist/affinda/p-8d3b4917.entry.js.map +1 -0
- package/dist/affinda/p-9d0e6ed1.entry.js +2 -0
- package/dist/affinda/p-9d0e6ed1.entry.js.map +1 -0
- package/dist/affinda/p-DxVtR6vj.js +3 -0
- package/dist/affinda/p-DxVtR6vj.js.map +1 -0
- package/dist/affinda/p-afbe9cb3.entry.js +2 -0
- package/dist/affinda/p-afbe9cb3.entry.js.map +1 -0
- package/dist/affinda/p-cbb06a14.entry.js +2 -0
- package/dist/affinda/p-cbb06a14.entry.js.map +1 -0
- package/dist/affinda/p-e274e11a.entry.js +2 -0
- package/dist/affinda/p-e274e11a.entry.js.map +1 -0
- package/dist/cjs/af-aspect-ratio.cjs.entry.js +83 -0
- package/dist/cjs/af-aspect-ratio.entry.cjs.js.map +1 -0
- package/dist/cjs/af-button-group.cjs.entry.js +30 -0
- package/dist/cjs/af-button-group.entry.cjs.js.map +1 -0
- package/dist/cjs/af-button.cjs.entry.js +48 -0
- package/dist/cjs/af-button.entry.cjs.js.map +1 -0
- package/dist/cjs/af-color-swatch.cjs.entry.js +23 -0
- package/dist/cjs/af-color-swatch.entry.cjs.js.map +1 -0
- package/dist/cjs/af-container.cjs.entry.js +26 -0
- package/dist/cjs/af-container.entry.cjs.js.map +1 -0
- package/dist/cjs/af-heading.af-logo.af-nav-item.af-navbar.af-text.entry.cjs.js.map +1 -0
- package/dist/cjs/af-heading_5.cjs.entry.js +128 -0
- package/dist/cjs/af-icon-button.cjs.entry.js +44 -0
- package/dist/cjs/af-icon-button.entry.cjs.js.map +1 -0
- package/dist/cjs/af-typography-lockup.cjs.entry.js +45 -0
- package/dist/cjs/af-typography-lockup.entry.cjs.js.map +1 -0
- package/dist/cjs/affinda.cjs.js +2 -2
- package/dist/cjs/{index-5BGpYleS.js → index-E2jkaTPt.js} +92 -61
- package/dist/cjs/index-E2jkaTPt.js.map +1 -0
- package/dist/cjs/index.cjs.js +24 -136
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +10 -3
- package/dist/collection/components/af-aspect-ratio/af-aspect-ratio.css +17 -0
- package/dist/collection/components/af-aspect-ratio/af-aspect-ratio.js +117 -0
- package/dist/collection/components/af-aspect-ratio/af-aspect-ratio.js.map +1 -0
- package/dist/collection/components/af-button/af-button.css +151 -42
- package/dist/collection/components/af-button/af-button.js +62 -57
- package/dist/collection/components/af-button/af-button.js.map +1 -1
- package/dist/collection/components/af-button-group/af-button-group.css +22 -0
- package/dist/collection/components/af-button-group/af-button-group.js +77 -0
- package/dist/collection/components/af-button-group/af-button-group.js.map +1 -0
- package/dist/collection/components/af-color-swatch/af-color-swatch.css +42 -0
- package/dist/collection/components/af-color-swatch/af-color-swatch.js +88 -0
- package/dist/collection/components/af-color-swatch/af-color-swatch.js.map +1 -0
- package/dist/collection/components/af-container/af-container.css +76 -0
- package/dist/collection/components/af-container/af-container.js +57 -0
- package/dist/collection/components/af-container/af-container.js.map +1 -0
- package/dist/collection/components/af-heading/af-heading.css +99 -0
- package/dist/collection/components/af-heading/af-heading.js +86 -0
- package/dist/collection/components/af-heading/af-heading.js.map +1 -0
- package/dist/collection/components/af-icon-button/af-icon-button.css +140 -41
- package/dist/collection/components/af-icon-button/af-icon-button.js +81 -57
- package/dist/collection/components/af-icon-button/af-icon-button.js.map +1 -1
- package/dist/collection/components/af-logo/af-logo.css +10 -0
- package/dist/collection/components/af-logo/af-logo.js +22 -0
- package/dist/collection/components/af-logo/af-logo.js.map +1 -0
- package/dist/collection/components/af-nav-item/af-nav-item.css +146 -0
- package/dist/collection/components/af-nav-item/af-nav-item.js +134 -0
- package/dist/collection/components/af-nav-item/af-nav-item.js.map +1 -0
- package/dist/collection/components/af-navbar/af-navbar.css +119 -0
- package/dist/collection/components/af-navbar/af-navbar.js +23 -0
- package/dist/collection/components/af-navbar/af-navbar.js.map +1 -0
- package/dist/collection/components/af-text/af-text.css +61 -0
- package/dist/collection/components/af-text/af-text.js +96 -0
- package/dist/collection/components/af-text/af-text.js.map +1 -0
- package/dist/collection/components/af-typography-lockup/af-typography-lockup.css +168 -0
- package/dist/collection/components/af-typography-lockup/af-typography-lockup.js +151 -0
- package/dist/collection/components/af-typography-lockup/af-typography-lockup.js.map +1 -0
- package/dist/collection/components.js +10 -3
- package/dist/collection/components.js.map +1 -1
- package/dist/components/af-aspect-ratio.d.ts +11 -0
- package/dist/components/af-aspect-ratio.js +9 -0
- package/dist/components/af-aspect-ratio.js.map +1 -0
- package/dist/components/af-button-group.d.ts +11 -0
- package/dist/components/af-button-group.js +9 -0
- package/dist/components/af-button-group.js.map +1 -0
- package/dist/components/af-button.js +1 -1
- package/dist/components/af-color-swatch.d.ts +11 -0
- package/dist/components/af-color-swatch.js +9 -0
- package/dist/components/af-color-swatch.js.map +1 -0
- package/dist/components/af-container.d.ts +11 -0
- package/dist/components/af-container.js +9 -0
- package/dist/components/af-container.js.map +1 -0
- package/dist/components/af-heading.d.ts +11 -0
- package/dist/components/af-heading.js +9 -0
- package/dist/components/af-heading.js.map +1 -0
- package/dist/components/af-icon-button.js +1 -1
- package/dist/components/{af-card.d.ts → af-logo.d.ts} +4 -4
- package/dist/components/af-logo.js +9 -0
- package/dist/components/af-logo.js.map +1 -0
- package/dist/components/af-nav-item.d.ts +11 -0
- package/dist/components/af-nav-item.js +9 -0
- package/dist/components/af-nav-item.js.map +1 -0
- package/dist/components/{af-badge.d.ts → af-navbar.d.ts} +4 -4
- package/dist/components/af-navbar.js +9 -0
- package/dist/components/af-navbar.js.map +1 -0
- package/dist/components/{af-input.d.ts → af-text.d.ts} +4 -4
- package/dist/components/af-text.js +9 -0
- package/dist/components/af-text.js.map +1 -0
- package/dist/components/af-typography-lockup.d.ts +11 -0
- package/dist/components/af-typography-lockup.js +9 -0
- package/dist/components/af-typography-lockup.js.map +1 -0
- package/dist/components/index.js +13 -6
- package/dist/components/index.js.map +1 -1
- package/dist/components/p-B17zxKkI.js +35 -0
- package/dist/components/p-B17zxKkI.js.map +1 -0
- package/dist/components/p-BJDmHNDi.js +59 -0
- package/dist/components/p-BJDmHNDi.js.map +1 -0
- package/dist/components/p-BfmeW04T.js +50 -0
- package/dist/components/p-BfmeW04T.js.map +1 -0
- package/dist/components/p-BoU5qaPt.js +68 -0
- package/dist/components/p-BoU5qaPt.js.map +1 -0
- package/dist/components/p-CT_9_xN3.js +50 -0
- package/dist/components/p-CT_9_xN3.js.map +1 -0
- package/dist/components/{p-DOtgsZRB.js → p-CzaQ1fCu.js} +92 -65
- package/dist/components/p-CzaQ1fCu.js.map +1 -0
- package/dist/components/p-DG7Mtz0G.js +66 -0
- package/dist/components/p-DG7Mtz0G.js.map +1 -0
- package/dist/components/p-DcFGu6up.js +68 -0
- package/dist/components/p-DcFGu6up.js.map +1 -0
- package/dist/components/p-DfIqdEs7.js +45 -0
- package/dist/components/p-DfIqdEs7.js.map +1 -0
- package/dist/components/p-DqIqR4VU.js +102 -0
- package/dist/components/p-DqIqR4VU.js.map +1 -0
- package/dist/components/p-LEksuu7O.js +44 -0
- package/dist/components/p-LEksuu7O.js.map +1 -0
- package/dist/components/p-uhOM63Ux.js +71 -0
- package/dist/components/p-uhOM63Ux.js.map +1 -0
- package/dist/components/p-zBrKMKWE.js +35 -0
- package/dist/components/p-zBrKMKWE.js.map +1 -0
- package/dist/esm/af-aspect-ratio.entry.js +81 -0
- package/dist/esm/af-aspect-ratio.entry.js.map +1 -0
- package/dist/esm/af-button-group.entry.js +28 -0
- package/dist/esm/af-button-group.entry.js.map +1 -0
- package/dist/esm/af-button.entry.js +46 -0
- package/dist/esm/af-button.entry.js.map +1 -0
- package/dist/esm/af-color-swatch.entry.js +21 -0
- package/dist/esm/af-color-swatch.entry.js.map +1 -0
- package/dist/esm/af-container.entry.js +24 -0
- package/dist/esm/af-container.entry.js.map +1 -0
- package/dist/esm/af-heading.af-logo.af-nav-item.af-navbar.af-text.entry.js.map +1 -0
- package/dist/esm/af-heading_5.entry.js +122 -0
- package/dist/esm/af-icon-button.entry.js +42 -0
- package/dist/esm/af-icon-button.entry.js.map +1 -0
- package/dist/esm/af-typography-lockup.entry.js +43 -0
- package/dist/esm/af-typography-lockup.entry.js.map +1 -0
- package/dist/esm/affinda.js +3 -3
- package/dist/esm/{index-o0tfWqnY.js → index-DxVtR6vj.js} +92 -61
- package/dist/esm/index-DxVtR6vj.js.map +1 -0
- package/dist/esm/index.js +9 -132
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/types/components/af-aspect-ratio/af-aspect-ratio.d.ts +18 -0
- package/dist/types/components/af-button/af-button.d.ts +19 -11
- package/dist/types/components/af-button-group/af-button-group.d.ts +11 -0
- package/dist/types/components/af-color-swatch/af-color-swatch.d.ts +9 -0
- package/dist/types/components/af-container/af-container.d.ts +15 -0
- package/dist/types/components/af-heading/af-heading.d.ts +8 -0
- package/dist/types/components/af-icon-button/af-icon-button.d.ts +23 -11
- package/dist/types/components/af-logo/af-logo.d.ts +6 -0
- package/dist/types/components/af-nav-item/af-nav-item.d.ts +27 -0
- package/dist/types/components/af-navbar/af-navbar.d.ts +7 -0
- package/dist/types/components/af-text/af-text.d.ts +9 -0
- package/dist/types/components/af-typography-lockup/af-typography-lockup.d.ts +23 -0
- package/dist/types/components.d.ts +416 -163
- package/package.json +13 -13
- package/dist/affinda/af-badge.af-button.af-card.af-icon-button.af-input.entry.esm.js.map +0 -1
- package/dist/affinda/p-bca10492.entry.js +0 -2
- package/dist/affinda/p-bca10492.entry.js.map +0 -1
- package/dist/affinda/p-o0tfWqnY.js +0 -3
- package/dist/affinda/p-o0tfWqnY.js.map +0 -1
- package/dist/cjs/af-badge.af-button.af-card.af-icon-button.af-input.entry.cjs.js.map +0 -1
- package/dist/cjs/af-badge_5.cjs.entry.js +0 -13
- package/dist/cjs/index-5BGpYleS.js.map +0 -1
- package/dist/collection/components/af-badge/af-badge.css +0 -29
- package/dist/collection/components/af-badge/af-badge.js +0 -47
- package/dist/collection/components/af-badge/af-badge.js.map +0 -1
- package/dist/collection/components/af-card/af-card.css +0 -69
- package/dist/collection/components/af-card/af-card.js +0 -70
- package/dist/collection/components/af-card/af-card.js.map +0 -1
- package/dist/collection/components/af-input/af-input.css +0 -57
- package/dist/collection/components/af-input/af-input.js +0 -193
- package/dist/collection/components/af-input/af-input.js.map +0 -1
- package/dist/components/af-badge.js +0 -9
- package/dist/components/af-badge.js.map +0 -1
- package/dist/components/af-card.js +0 -9
- package/dist/components/af-card.js.map +0 -1
- package/dist/components/af-input.js +0 -9
- package/dist/components/af-input.js.map +0 -1
- package/dist/components/p-B7I93sz2.js +0 -39
- package/dist/components/p-B7I93sz2.js.map +0 -1
- package/dist/components/p-CZd1ieht.js +0 -62
- package/dist/components/p-CZd1ieht.js.map +0 -1
- package/dist/components/p-D6PwARU0.js +0 -59
- package/dist/components/p-D6PwARU0.js.map +0 -1
- package/dist/components/p-DOtgsZRB.js.map +0 -1
- package/dist/components/p-DZIXhvI0.js +0 -44
- package/dist/components/p-DZIXhvI0.js.map +0 -1
- package/dist/components/p-zIKPa48S.js +0 -62
- package/dist/components/p-zIKPa48S.js.map +0 -1
- package/dist/esm/af-badge.af-button.af-card.af-icon-button.af-input.entry.js.map +0 -1
- package/dist/esm/af-badge_5.entry.js +0 -3
- package/dist/esm/index-o0tfWqnY.js.map +0 -1
- package/dist/types/components/af-badge/af-badge.d.ts +0 -5
- package/dist/types/components/af-card/af-card.d.ts +0 -7
- package/dist/types/components/af-input/af-input.d.ts +0 -24
|
@@ -1,30 +1,39 @@
|
|
|
1
|
-
import { h } from "@stencil/core";
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
2
|
export class AfButton {
|
|
3
3
|
constructor() {
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* The visual variant of the button
|
|
6
|
+
*/
|
|
5
7
|
this.variant = 'primary';
|
|
6
|
-
/**
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
/**
|
|
9
|
+
* The size of the button
|
|
10
|
+
*/
|
|
11
|
+
this.size = 'default';
|
|
12
|
+
/**
|
|
13
|
+
* Whether the button is disabled
|
|
14
|
+
*/
|
|
9
15
|
this.disabled = false;
|
|
10
|
-
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
event.preventDefault();
|
|
15
|
-
event.stopPropagation();
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
this.afClick.emit(event);
|
|
19
|
-
};
|
|
16
|
+
/**
|
|
17
|
+
* Button type (when not using href)
|
|
18
|
+
*/
|
|
19
|
+
this.type = 'button';
|
|
20
20
|
}
|
|
21
21
|
render() {
|
|
22
22
|
const classes = {
|
|
23
|
+
'button': true,
|
|
23
24
|
[`variant-${this.variant}`]: true,
|
|
24
25
|
[`size-${this.size}`]: true,
|
|
25
|
-
'
|
|
26
|
+
'disabled': this.disabled
|
|
26
27
|
};
|
|
27
|
-
|
|
28
|
+
const content = [
|
|
29
|
+
h("span", { class: "icon-left" }, h("slot", { name: "icon-left" })),
|
|
30
|
+
h("span", { class: "label" }, h("slot", null)),
|
|
31
|
+
h("span", { class: "icon-right" }, h("slot", { name: "icon-right" }))
|
|
32
|
+
];
|
|
33
|
+
if (this.href && !this.disabled) {
|
|
34
|
+
return (h(Host, null, h("a", { href: this.href, class: classes }, content)));
|
|
35
|
+
}
|
|
36
|
+
return (h(Host, null, h("button", { type: this.type, disabled: this.disabled, class: classes }, content)));
|
|
28
37
|
}
|
|
29
38
|
static get is() { return "af-button"; }
|
|
30
39
|
static get encapsulation() { return "shadow"; }
|
|
@@ -44,15 +53,15 @@ export class AfButton {
|
|
|
44
53
|
"type": "string",
|
|
45
54
|
"mutable": false,
|
|
46
55
|
"complexType": {
|
|
47
|
-
"original": "'primary' | 'secondary' | 'ghost'",
|
|
48
|
-
"resolved": "\"ghost\" | \"primary\" | \"secondary\"",
|
|
56
|
+
"original": "'primary' | 'secondary' | 'outline' | 'ghost'",
|
|
57
|
+
"resolved": "\"ghost\" | \"outline\" | \"primary\" | \"secondary\"",
|
|
49
58
|
"references": {}
|
|
50
59
|
},
|
|
51
60
|
"required": false,
|
|
52
61
|
"optional": false,
|
|
53
62
|
"docs": {
|
|
54
63
|
"tags": [],
|
|
55
|
-
"text": "
|
|
64
|
+
"text": "The visual variant of the button"
|
|
56
65
|
},
|
|
57
66
|
"getter": false,
|
|
58
67
|
"setter": false,
|
|
@@ -64,21 +73,21 @@ export class AfButton {
|
|
|
64
73
|
"type": "string",
|
|
65
74
|
"mutable": false,
|
|
66
75
|
"complexType": {
|
|
67
|
-
"original": "'
|
|
68
|
-
"resolved": "\"
|
|
76
|
+
"original": "'default' | 'small'",
|
|
77
|
+
"resolved": "\"default\" | \"small\"",
|
|
69
78
|
"references": {}
|
|
70
79
|
},
|
|
71
80
|
"required": false,
|
|
72
81
|
"optional": false,
|
|
73
82
|
"docs": {
|
|
74
83
|
"tags": [],
|
|
75
|
-
"text": "
|
|
84
|
+
"text": "The size of the button"
|
|
76
85
|
},
|
|
77
86
|
"getter": false,
|
|
78
87
|
"setter": false,
|
|
79
88
|
"reflect": false,
|
|
80
89
|
"attribute": "size",
|
|
81
|
-
"defaultValue": "'
|
|
90
|
+
"defaultValue": "'default'"
|
|
82
91
|
},
|
|
83
92
|
"disabled": {
|
|
84
93
|
"type": "boolean",
|
|
@@ -92,58 +101,54 @@ export class AfButton {
|
|
|
92
101
|
"optional": false,
|
|
93
102
|
"docs": {
|
|
94
103
|
"tags": [],
|
|
95
|
-
"text": "
|
|
104
|
+
"text": "Whether the button is disabled"
|
|
96
105
|
},
|
|
97
106
|
"getter": false,
|
|
98
107
|
"setter": false,
|
|
99
|
-
"reflect":
|
|
108
|
+
"reflect": false,
|
|
100
109
|
"attribute": "disabled",
|
|
101
110
|
"defaultValue": "false"
|
|
102
111
|
},
|
|
103
|
-
"
|
|
104
|
-
"type": "
|
|
112
|
+
"href": {
|
|
113
|
+
"type": "string",
|
|
105
114
|
"mutable": false,
|
|
106
115
|
"complexType": {
|
|
107
|
-
"original": "
|
|
108
|
-
"resolved": "
|
|
116
|
+
"original": "string",
|
|
117
|
+
"resolved": "string | undefined",
|
|
109
118
|
"references": {}
|
|
110
119
|
},
|
|
111
120
|
"required": false,
|
|
112
|
-
"optional":
|
|
121
|
+
"optional": true,
|
|
113
122
|
"docs": {
|
|
114
123
|
"tags": [],
|
|
115
|
-
"text": "
|
|
124
|
+
"text": "Optional href to render as a link"
|
|
116
125
|
},
|
|
117
126
|
"getter": false,
|
|
118
127
|
"setter": false,
|
|
119
|
-
"reflect":
|
|
120
|
-
"attribute": "
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
"
|
|
131
|
-
"
|
|
128
|
+
"reflect": false,
|
|
129
|
+
"attribute": "href"
|
|
130
|
+
},
|
|
131
|
+
"type": {
|
|
132
|
+
"type": "string",
|
|
133
|
+
"mutable": false,
|
|
134
|
+
"complexType": {
|
|
135
|
+
"original": "'button' | 'submit' | 'reset'",
|
|
136
|
+
"resolved": "\"button\" | \"reset\" | \"submit\"",
|
|
137
|
+
"references": {}
|
|
138
|
+
},
|
|
139
|
+
"required": false,
|
|
140
|
+
"optional": false,
|
|
132
141
|
"docs": {
|
|
133
142
|
"tags": [],
|
|
134
|
-
"text": "
|
|
143
|
+
"text": "Button type (when not using href)"
|
|
135
144
|
},
|
|
136
|
-
"
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
}];
|
|
145
|
+
"getter": false,
|
|
146
|
+
"setter": false,
|
|
147
|
+
"reflect": false,
|
|
148
|
+
"attribute": "type",
|
|
149
|
+
"defaultValue": "'button'"
|
|
150
|
+
}
|
|
151
|
+
};
|
|
147
152
|
}
|
|
148
153
|
}
|
|
149
154
|
//# sourceMappingURL=af-button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"af-button.js","sourceRoot":"","sources":["../../../src/components/af-button/af-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"af-button.js","sourceRoot":"","sources":["../../../src/components/af-button/af-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAOzD,MAAM,OAAO,QAAQ;IALrB;QAME;;WAEG;QACK,YAAO,GAAkD,SAAS,CAAC;QAE3E;;WAEG;QACK,SAAI,GAAwB,SAAS,CAAC;QAE9C;;WAEG;QACK,aAAQ,GAAY,KAAK,CAAC;QAOlC;;WAEG;QACK,SAAI,GAAkC,QAAQ,CAAC;KAwCxD;IAtCC,MAAM;QACJ,MAAM,OAAO,GAAG;YACd,QAAQ,EAAE,IAAI;YACd,CAAC,WAAW,IAAI,CAAC,OAAO,EAAE,CAAC,EAAE,IAAI;YACjC,CAAC,QAAQ,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,IAAI;YAC3B,UAAU,EAAE,IAAI,CAAC,QAAQ;SAC1B,CAAC;QAEF,MAAM,OAAO,GAAG;YACd,YAAM,KAAK,EAAC,WAAW;gBACrB,YAAM,IAAI,EAAC,WAAW,GAAQ,CACzB;YACP,YAAM,KAAK,EAAC,OAAO;gBACjB,eAAa,CACR;YACP,YAAM,KAAK,EAAC,YAAY;gBACtB,YAAM,IAAI,EAAC,YAAY,GAAQ,CAC1B;SACR,CAAC;QAEF,IAAI,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;YAChC,OAAO,CACL,EAAC,IAAI;gBACH,SAAG,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,IAC/B,OAAO,CACN,CACC,CACR,CAAC;QACJ,CAAC;QAED,OAAO,CACL,EAAC,IAAI;YACH,cAAQ,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,IAC7D,OAAO,CACD,CACJ,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Prop, Host } from '@stencil/core';\n\n@Component({\n tag: 'af-button',\n styleUrl: 'af-button.css',\n shadow: true\n})\nexport class AfButton {\n /**\n * The visual variant of the button\n */\n @Prop() variant: 'primary' | 'secondary' | 'outline' | 'ghost' = 'primary';\n\n /**\n * The size of the button\n */\n @Prop() size: 'default' | 'small' = 'default';\n\n /**\n * Whether the button is disabled\n */\n @Prop() disabled: boolean = false;\n\n /**\n * Optional href to render as a link\n */\n @Prop() href?: string;\n\n /**\n * Button type (when not using href)\n */\n @Prop() type: 'button' | 'submit' | 'reset' = 'button';\n\n render() {\n const classes = {\n 'button': true,\n [`variant-${this.variant}`]: true,\n [`size-${this.size}`]: true,\n 'disabled': this.disabled\n };\n\n const content = [\n <span class=\"icon-left\">\n <slot name=\"icon-left\"></slot>\n </span>,\n <span class=\"label\">\n <slot></slot>\n </span>,\n <span class=\"icon-right\">\n <slot name=\"icon-right\"></slot>\n </span>\n ];\n\n if (this.href && !this.disabled) {\n return (\n <Host>\n <a href={this.href} class={classes}>\n {content}\n </a>\n </Host>\n );\n }\n\n return (\n <Host>\n <button type={this.type} disabled={this.disabled} class={classes}>\n {content}\n </button>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: inline-block;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.button-group {
|
|
6
|
+
display: inline-flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.direction-horizontal {
|
|
12
|
+
flex-direction: row;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.direction-vertical {
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* Ensure slotted buttons align properly */
|
|
20
|
+
::slotted(*) {
|
|
21
|
+
flex-shrink: 0;
|
|
22
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
export class AfButtonGroup {
|
|
3
|
+
constructor() {
|
|
4
|
+
/**
|
|
5
|
+
* Layout direction of the button group
|
|
6
|
+
*/
|
|
7
|
+
this.direction = 'horizontal';
|
|
8
|
+
/**
|
|
9
|
+
* Gap between buttons
|
|
10
|
+
*/
|
|
11
|
+
this.gap = '8px';
|
|
12
|
+
}
|
|
13
|
+
render() {
|
|
14
|
+
const classes = {
|
|
15
|
+
'button-group': true,
|
|
16
|
+
[`direction-${this.direction}`]: true
|
|
17
|
+
};
|
|
18
|
+
return (h(Host, { key: '9ef4ea3e4429646edb2d14a780763807d35ca438' }, h("div", { key: '8f61ec426b1f01cfd0ed91b6045e01cc1ecb1637', class: classes, style: { gap: this.gap } }, h("slot", { key: '06acb0d36cc96b311c228ba19039899a99d6a35d' }))));
|
|
19
|
+
}
|
|
20
|
+
static get is() { return "af-button-group"; }
|
|
21
|
+
static get encapsulation() { return "shadow"; }
|
|
22
|
+
static get originalStyleUrls() {
|
|
23
|
+
return {
|
|
24
|
+
"$": ["af-button-group.css"]
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
static get styleUrls() {
|
|
28
|
+
return {
|
|
29
|
+
"$": ["af-button-group.css"]
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
static get properties() {
|
|
33
|
+
return {
|
|
34
|
+
"direction": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"mutable": false,
|
|
37
|
+
"complexType": {
|
|
38
|
+
"original": "'horizontal' | 'vertical'",
|
|
39
|
+
"resolved": "\"horizontal\" | \"vertical\"",
|
|
40
|
+
"references": {}
|
|
41
|
+
},
|
|
42
|
+
"required": false,
|
|
43
|
+
"optional": false,
|
|
44
|
+
"docs": {
|
|
45
|
+
"tags": [],
|
|
46
|
+
"text": "Layout direction of the button group"
|
|
47
|
+
},
|
|
48
|
+
"getter": false,
|
|
49
|
+
"setter": false,
|
|
50
|
+
"reflect": false,
|
|
51
|
+
"attribute": "direction",
|
|
52
|
+
"defaultValue": "'horizontal'"
|
|
53
|
+
},
|
|
54
|
+
"gap": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"mutable": false,
|
|
57
|
+
"complexType": {
|
|
58
|
+
"original": "string",
|
|
59
|
+
"resolved": "string",
|
|
60
|
+
"references": {}
|
|
61
|
+
},
|
|
62
|
+
"required": false,
|
|
63
|
+
"optional": false,
|
|
64
|
+
"docs": {
|
|
65
|
+
"tags": [],
|
|
66
|
+
"text": "Gap between buttons"
|
|
67
|
+
},
|
|
68
|
+
"getter": false,
|
|
69
|
+
"setter": false,
|
|
70
|
+
"reflect": false,
|
|
71
|
+
"attribute": "gap",
|
|
72
|
+
"defaultValue": "'8px'"
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=af-button-group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"af-button-group.js","sourceRoot":"","sources":["../../../src/components/af-button-group/af-button-group.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAOzD,MAAM,OAAO,aAAa;IAL1B;QAME;;WAEG;QACK,cAAS,GAA8B,YAAY,CAAC;QAE5D;;WAEG;QACK,QAAG,GAAW,KAAK,CAAC;KAgB7B;IAdC,MAAM;QACJ,MAAM,OAAO,GAAG;YACd,cAAc,EAAE,IAAI;YACpB,CAAC,aAAa,IAAI,CAAC,SAAS,EAAE,CAAC,EAAE,IAAI;SACtC,CAAC;QAEF,OAAO,CACL,EAAC,IAAI;YACH,4DAAK,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE;gBAC3C,8DAAa,CACT,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Host, Prop } from '@stencil/core';\n\n@Component({\n tag: 'af-button-group',\n styleUrl: 'af-button-group.css',\n shadow: true\n})\nexport class AfButtonGroup {\n /**\n * Layout direction of the button group\n */\n @Prop() direction: 'horizontal' | 'vertical' = 'horizontal';\n\n /**\n * Gap between buttons\n */\n @Prop() gap: string = '8px';\n\n render() {\n const classes = {\n 'button-group': true,\n [`direction-${this.direction}`]: true\n };\n\n return (\n <Host>\n <div class={classes} style={{ gap: this.gap }}>\n <slot></slot>\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.swatch {
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
border-radius: 8px;
|
|
9
|
+
overflow: hidden;
|
|
10
|
+
border: 1px solid #ece6f5;
|
|
11
|
+
background: white;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.color-preview {
|
|
15
|
+
width: 100%;
|
|
16
|
+
height: 120px;
|
|
17
|
+
flex-shrink: 0;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.size-large .color-preview {
|
|
21
|
+
height: 140px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.color-info {
|
|
25
|
+
padding: 16px;
|
|
26
|
+
display: flex;
|
|
27
|
+
flex-direction: column;
|
|
28
|
+
gap: 4px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.color-name {
|
|
32
|
+
font-family: 'NeuSans', 'Inter', system-ui, sans-serif;
|
|
33
|
+
font-size: 16px;
|
|
34
|
+
font-weight: 500;
|
|
35
|
+
color: #14343B;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.color-value {
|
|
39
|
+
font-family: 'Helvetica', 'Inter', monospace, system-ui, sans-serif;
|
|
40
|
+
font-size: 14px;
|
|
41
|
+
color: #708380;
|
|
42
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
export class AfColorSwatch {
|
|
3
|
+
constructor() {
|
|
4
|
+
/** Size variant */
|
|
5
|
+
this.size = 'default';
|
|
6
|
+
}
|
|
7
|
+
render() {
|
|
8
|
+
return (h("div", { key: '57a141b5af5c538c5cf842a61173dd391a91d59b', class: {
|
|
9
|
+
'swatch': true,
|
|
10
|
+
[`size-${this.size}`]: true
|
|
11
|
+
}, part: "base" }, h("div", { key: '505252d9fbfb36df24f1907cd5a30278e55bf268', class: "color-preview", part: "preview", style: { backgroundColor: this.color } }), h("div", { key: '095621914872670c129c23825aa012bbba4e33bb', class: "color-info", part: "info" }, h("div", { key: '86b6164f0aed4a938a8faa210651bbc6746dd4f2', class: "color-name", part: "name" }, this.name), h("div", { key: '1d533780d3756b119ae36a6e8fa0c2b6b3acb7b4', class: "color-value", part: "value" }, this.color))));
|
|
12
|
+
}
|
|
13
|
+
static get is() { return "af-color-swatch"; }
|
|
14
|
+
static get encapsulation() { return "shadow"; }
|
|
15
|
+
static get originalStyleUrls() {
|
|
16
|
+
return {
|
|
17
|
+
"$": ["af-color-swatch.css"]
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
static get styleUrls() {
|
|
21
|
+
return {
|
|
22
|
+
"$": ["af-color-swatch.css"]
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
static get properties() {
|
|
26
|
+
return {
|
|
27
|
+
"color": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"mutable": false,
|
|
30
|
+
"complexType": {
|
|
31
|
+
"original": "string",
|
|
32
|
+
"resolved": "string",
|
|
33
|
+
"references": {}
|
|
34
|
+
},
|
|
35
|
+
"required": true,
|
|
36
|
+
"optional": false,
|
|
37
|
+
"docs": {
|
|
38
|
+
"tags": [],
|
|
39
|
+
"text": "Color value (hex)"
|
|
40
|
+
},
|
|
41
|
+
"getter": false,
|
|
42
|
+
"setter": false,
|
|
43
|
+
"reflect": false,
|
|
44
|
+
"attribute": "color"
|
|
45
|
+
},
|
|
46
|
+
"name": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"mutable": false,
|
|
49
|
+
"complexType": {
|
|
50
|
+
"original": "string",
|
|
51
|
+
"resolved": "string",
|
|
52
|
+
"references": {}
|
|
53
|
+
},
|
|
54
|
+
"required": true,
|
|
55
|
+
"optional": false,
|
|
56
|
+
"docs": {
|
|
57
|
+
"tags": [],
|
|
58
|
+
"text": "Color name"
|
|
59
|
+
},
|
|
60
|
+
"getter": false,
|
|
61
|
+
"setter": false,
|
|
62
|
+
"reflect": false,
|
|
63
|
+
"attribute": "name"
|
|
64
|
+
},
|
|
65
|
+
"size": {
|
|
66
|
+
"type": "string",
|
|
67
|
+
"mutable": false,
|
|
68
|
+
"complexType": {
|
|
69
|
+
"original": "'default' | 'large'",
|
|
70
|
+
"resolved": "\"default\" | \"large\"",
|
|
71
|
+
"references": {}
|
|
72
|
+
},
|
|
73
|
+
"required": false,
|
|
74
|
+
"optional": false,
|
|
75
|
+
"docs": {
|
|
76
|
+
"tags": [],
|
|
77
|
+
"text": "Size variant"
|
|
78
|
+
},
|
|
79
|
+
"getter": false,
|
|
80
|
+
"setter": false,
|
|
81
|
+
"reflect": false,
|
|
82
|
+
"attribute": "size",
|
|
83
|
+
"defaultValue": "'default'"
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=af-color-swatch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"af-color-swatch.js","sourceRoot":"","sources":["../../../src/components/af-color-swatch/af-color-swatch.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAOnD,MAAM,OAAO,aAAa;IAL1B;QAYE,mBAAmB;QACX,SAAI,GAAwB,SAAS,CAAC;KAoB/C;IAlBC,MAAM;QACJ,OAAO,CACL,4DAAK,KAAK,EAAE;gBACV,QAAQ,EAAE,IAAI;gBACd,CAAC,QAAQ,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,IAAI;aAC5B,EAAE,IAAI,EAAC,MAAM;YACZ,4DACE,KAAK,EAAC,eAAe,EACrB,IAAI,EAAC,SAAS,EACd,KAAK,EAAE,EAAE,eAAe,EAAE,IAAI,CAAC,KAAK,EAAE,GACjC;YACP,4DAAK,KAAK,EAAC,YAAY,EAAC,IAAI,EAAC,MAAM;gBACjC,4DAAK,KAAK,EAAC,YAAY,EAAC,IAAI,EAAC,MAAM,IAAE,IAAI,CAAC,IAAI,CAAO;gBACrD,4DAAK,KAAK,EAAC,aAAa,EAAC,IAAI,EAAC,OAAO,IAAE,IAAI,CAAC,KAAK,CAAO,CACpD,CACF,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Prop } from '@stencil/core';\n\n@Component({\n tag: 'af-color-swatch',\n styleUrl: 'af-color-swatch.css',\n shadow: true\n})\nexport class AfColorSwatch {\n /** Color value (hex) */\n @Prop() color!: string;\n\n /** Color name */\n @Prop() name!: string;\n\n /** Size variant */\n @Prop() size: 'default' | 'large' = 'default';\n\n render() {\n return (\n <div class={{\n 'swatch': true,\n [`size-${this.size}`]: true\n }} part=\"base\">\n <div\n class=\"color-preview\"\n part=\"preview\"\n style={{ backgroundColor: this.color }}\n ></div>\n <div class=\"color-info\" part=\"info\">\n <div class=\"color-name\" part=\"name\">{this.name}</div>\n <div class=\"color-value\" part=\"value\">{this.color}</div>\n </div>\n </div>\n );\n }\n}\n"]}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
width: 100%;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.container {
|
|
7
|
+
width: 100%;
|
|
8
|
+
margin-left: auto;
|
|
9
|
+
margin-right: auto;
|
|
10
|
+
box-sizing: border-box;
|
|
11
|
+
|
|
12
|
+
/* Mobile first: xsmall breakpoint (320px) */
|
|
13
|
+
padding-left: 16px;
|
|
14
|
+
padding-right: 16px;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/* Small breakpoint (375px) */
|
|
18
|
+
@media (min-width: 375px) {
|
|
19
|
+
.container {
|
|
20
|
+
padding-left: 20px;
|
|
21
|
+
padding-right: 20px;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/* Medium breakpoint (768px) */
|
|
26
|
+
@media (min-width: 768px) {
|
|
27
|
+
.container {
|
|
28
|
+
padding-left: 32px;
|
|
29
|
+
padding-right: 32px;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.max-width-medium {
|
|
33
|
+
max-width: 768px;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* Large breakpoint (1024px) */
|
|
38
|
+
@media (min-width: 1024px) {
|
|
39
|
+
.container {
|
|
40
|
+
padding-left: 64px;
|
|
41
|
+
padding-right: 64px;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.max-width-large {
|
|
45
|
+
max-width: 1024px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.max-width-medium {
|
|
49
|
+
max-width: 768px;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/* XLarge breakpoint (1440px) */
|
|
54
|
+
@media (min-width: 1440px) {
|
|
55
|
+
.container {
|
|
56
|
+
padding-left: 80px;
|
|
57
|
+
padding-right: 80px;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.max-width-xlarge {
|
|
61
|
+
max-width: 1440px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.max-width-large {
|
|
65
|
+
max-width: 1024px;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.max-width-medium {
|
|
69
|
+
max-width: 768px;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/* Fluid has no max-width */
|
|
74
|
+
.max-width-fluid {
|
|
75
|
+
max-width: none;
|
|
76
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
/**
|
|
3
|
+
* A responsive container component that provides consistent margins and max-width
|
|
4
|
+
* constraints based on the Affinda grid system.
|
|
5
|
+
*/
|
|
6
|
+
export class AfContainer {
|
|
7
|
+
constructor() {
|
|
8
|
+
/**
|
|
9
|
+
* Maximum width constraint for the container
|
|
10
|
+
* - 'xlarge': 1440px container (default)
|
|
11
|
+
* - 'large': 1024px container
|
|
12
|
+
* - 'medium': 768px container
|
|
13
|
+
* - 'fluid': No max-width constraint, full width with margins
|
|
14
|
+
*/
|
|
15
|
+
this.maxWidth = 'xlarge';
|
|
16
|
+
}
|
|
17
|
+
render() {
|
|
18
|
+
return (h("div", { key: '4a40fad6df79915adeb7273a7c71ed26b327ff8f', class: `container max-width-${this.maxWidth}` }, h("slot", { key: 'a1759c05860511cdb6b916e44925df7f7a80bcf1' })));
|
|
19
|
+
}
|
|
20
|
+
static get is() { return "af-container"; }
|
|
21
|
+
static get encapsulation() { return "shadow"; }
|
|
22
|
+
static get originalStyleUrls() {
|
|
23
|
+
return {
|
|
24
|
+
"$": ["af-container.css"]
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
static get styleUrls() {
|
|
28
|
+
return {
|
|
29
|
+
"$": ["af-container.css"]
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
static get properties() {
|
|
33
|
+
return {
|
|
34
|
+
"maxWidth": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"mutable": false,
|
|
37
|
+
"complexType": {
|
|
38
|
+
"original": "'xlarge' | 'large' | 'medium' | 'fluid'",
|
|
39
|
+
"resolved": "\"fluid\" | \"large\" | \"medium\" | \"xlarge\"",
|
|
40
|
+
"references": {}
|
|
41
|
+
},
|
|
42
|
+
"required": false,
|
|
43
|
+
"optional": false,
|
|
44
|
+
"docs": {
|
|
45
|
+
"tags": [],
|
|
46
|
+
"text": "Maximum width constraint for the container\n- 'xlarge': 1440px container (default)\n- 'large': 1024px container\n- 'medium': 768px container\n- 'fluid': No max-width constraint, full width with margins"
|
|
47
|
+
},
|
|
48
|
+
"getter": false,
|
|
49
|
+
"setter": false,
|
|
50
|
+
"reflect": false,
|
|
51
|
+
"attribute": "max-width",
|
|
52
|
+
"defaultValue": "'xlarge'"
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=af-container.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"af-container.js","sourceRoot":"","sources":["../../../src/components/af-container/af-container.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAEnD;;;GAGG;AAMH,MAAM,OAAO,WAAW;IALxB;QAME;;;;;;WAMG;QACK,aAAQ,GAA4C,QAAQ,CAAC;KAStE;IAPC,MAAM;QACJ,OAAO,CACL,4DAAK,KAAK,EAAE,uBAAuB,IAAI,CAAC,QAAQ,EAAE;YAChD,8DAAa,CACT,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Prop } from '@stencil/core';\n\n/**\n * A responsive container component that provides consistent margins and max-width\n * constraints based on the Affinda grid system.\n */\n@Component({\n tag: 'af-container',\n styleUrl: 'af-container.css',\n shadow: true\n})\nexport class AfContainer {\n /**\n * Maximum width constraint for the container\n * - 'xlarge': 1440px container (default)\n * - 'large': 1024px container\n * - 'medium': 768px container\n * - 'fluid': No max-width constraint, full width with margins\n */\n @Prop() maxWidth: 'xlarge' | 'large' | 'medium' | 'fluid' = 'xlarge';\n\n render() {\n return (\n <div class={`container max-width-${this.maxWidth}`}>\n <slot></slot>\n </div>\n );\n }\n}\n"]}
|