@affinda/wc 0.0.1 → 0.0.2
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-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-nav-item.af-text.entry.esm.js.map +1 -0
- 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-96c74b41.entry.js +2 -0
- package/dist/affinda/p-96c74b41.entry.js.map +1 -0
- package/dist/affinda/p-DIoXjiux.js +3 -0
- package/dist/affinda/p-DIoXjiux.js.map +1 -0
- package/dist/affinda/p-a6a8ecde.entry.js +2 -0
- package/dist/affinda/p-a6a8ecde.entry.js.map +1 -0
- package/dist/affinda/p-ccdcebe9.entry.js +2 -0
- package/dist/affinda/p-ccdcebe9.entry.js.map +1 -0
- package/dist/affinda/p-f79068a7.entry.js +2 -0
- package/dist/affinda/p-f79068a7.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-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-nav-item.af-text.entry.cjs.js.map +1 -0
- package/dist/cjs/af-heading_3.cjs.entry.js +102 -0
- package/dist/cjs/affinda.cjs.js +2 -2
- package/dist/cjs/{index-5BGpYleS.js → index-DHjsui2n.js} +60 -57
- package/dist/cjs/index-DHjsui2n.js.map +1 -0
- package/dist/cjs/index.cjs.js +11 -133
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/assets/icons/account-01.svg +3 -0
- package/dist/collection/assets/icons/account-02.svg +3 -0
- package/dist/collection/assets/icons/accounts-payable.svg +3 -0
- package/dist/collection/assets/icons/arrow-down.svg +3 -0
- package/dist/collection/assets/icons/arrow-left.svg +3 -0
- package/dist/collection/assets/icons/arrow-right.svg +3 -0
- package/dist/collection/assets/icons/arrow-up.svg +3 -0
- package/dist/collection/assets/icons/bpo.svg +3 -0
- package/dist/collection/assets/icons/chats.svg +3 -0
- package/dist/collection/assets/icons/check-circle.svg +3 -0
- package/dist/collection/assets/icons/check.svg +3 -0
- package/dist/collection/assets/icons/chevron-down.svg +3 -0
- package/dist/collection/assets/icons/chevron-left.svg +3 -0
- package/dist/collection/assets/icons/chevron-right.svg +3 -0
- package/dist/collection/assets/icons/chevron-up.svg +3 -0
- package/dist/collection/assets/icons/close.svg +3 -0
- package/dist/collection/assets/icons/code.svg +3 -0
- package/dist/collection/assets/icons/data.svg +3 -0
- package/dist/collection/assets/icons/document-upload.svg +3 -0
- package/dist/collection/assets/icons/download.svg +3 -0
- package/dist/collection/assets/icons/edit.svg +3 -0
- package/dist/collection/assets/icons/email.svg +3 -0
- package/dist/collection/assets/icons/eye.svg +3 -0
- package/dist/collection/assets/icons/facebook.svg +3 -0
- package/dist/collection/assets/icons/gear.svg +3 -0
- package/dist/collection/assets/icons/github.svg +3 -0
- package/dist/collection/assets/icons/heart.svg +3 -0
- package/dist/collection/assets/icons/home.svg +3 -0
- package/dist/collection/assets/icons/info.svg +3 -0
- package/dist/collection/assets/icons/insurance.svg +3 -0
- package/dist/collection/assets/icons/lending-01.svg +3 -0
- package/dist/collection/assets/icons/lending-02.svg +3 -0
- package/dist/collection/assets/icons/link-out.svg +3 -0
- package/dist/collection/assets/icons/linkedin.svg +3 -0
- package/dist/collection/assets/icons/map-pin.svg +3 -0
- package/dist/collection/assets/icons/menu.svg +3 -0
- package/dist/collection/assets/icons/minus.svg +3 -0
- package/dist/collection/assets/icons/numbers.svg +16 -0
- package/dist/collection/assets/icons/pause.svg +3 -0
- package/dist/collection/assets/icons/play.svg +3 -0
- package/dist/collection/assets/icons/plus.svg +3 -0
- package/dist/collection/assets/icons/productivity.svg +3 -0
- package/dist/collection/assets/icons/quote.svg +3 -0
- package/dist/collection/assets/icons/recruitment.svg +3 -0
- package/dist/collection/assets/icons/refresh.svg +3 -0
- package/dist/collection/assets/icons/search.svg +3 -0
- package/dist/collection/assets/icons/security-01.svg +3 -0
- package/dist/collection/assets/icons/security-02.svg +3 -0
- package/dist/collection/assets/icons/solutions.svg +3 -0
- package/dist/collection/assets/icons/support.svg +3 -0
- package/dist/collection/assets/icons/system.svg +3 -0
- package/dist/collection/assets/icons/time.svg +3 -0
- package/dist/collection/assets/icons/verification-01.svg +3 -0
- package/dist/collection/assets/icons/wand.svg +3 -0
- package/dist/collection/assets/icons/x.svg +3 -0
- package/dist/collection/assets/icons/youtube.svg +3 -0
- package/dist/collection/assets/illustrations/accuracy-inkwell.svg +101 -0
- package/dist/collection/assets/illustrations/accuracy-mist-green.svg +101 -0
- package/dist/collection/assets/illustrations/accuracy-soft-clay.svg +101 -0
- package/dist/collection/assets/illustrations/accuracy-white-ivory.svg +101 -0
- package/dist/collection/assets/illustrations/automate-inkwell.svg +149 -0
- package/dist/collection/assets/illustrations/automate-mist-green.svg +149 -0
- package/dist/collection/assets/illustrations/automate-soft-clay.svg +149 -0
- package/dist/collection/assets/illustrations/automate-white-ivory.svg +149 -0
- package/dist/collection/assets/illustrations/document-raise-inkwell.svg +131 -0
- package/dist/collection/assets/illustrations/document-raise-mist-green.svg +131 -0
- package/dist/collection/assets/illustrations/document-raise-soft-clay.svg +131 -0
- package/dist/collection/assets/illustrations/document-raise-white-ivory.svg +131 -0
- package/dist/collection/assets/illustrations/document-type-inkwell.svg +150 -0
- package/dist/collection/assets/illustrations/document-type-mist-green.svg +150 -0
- package/dist/collection/assets/illustrations/document-type-soft-clay.svg +150 -0
- package/dist/collection/assets/illustrations/document-type-white-ivory.svg +150 -0
- package/dist/collection/assets/illustrations/grow-business-inkwell.svg +116 -0
- package/dist/collection/assets/illustrations/grow-business-mist-green.svg +129 -0
- package/dist/collection/assets/illustrations/grow-business-soft-clay.svg +129 -0
- package/dist/collection/assets/illustrations/grow-business-white-ivory.svg +129 -0
- package/dist/collection/assets/illustrations/industries-inkwell.svg +30 -0
- package/dist/collection/assets/illustrations/industries-mist-green.svg +30 -0
- package/dist/collection/assets/illustrations/industries-soft-clay.svg +30 -0
- package/dist/collection/assets/illustrations/industries-white-ivory.svg +41 -0
- package/dist/collection/assets/illustrations/intelligence-inkwell.svg +65 -0
- package/dist/collection/assets/illustrations/intelligence-mist-green.svg +65 -0
- package/dist/collection/assets/illustrations/intelligence-soft-clay.svg +65 -0
- package/dist/collection/assets/illustrations/intelligence-white-ivory.svg +65 -0
- package/dist/collection/assets/illustrations/page-turn-inkwell.svg +125 -0
- package/dist/collection/assets/illustrations/page-turn-mist-green.svg +125 -0
- package/dist/collection/assets/illustrations/page-turn-soft-clay.svg +125 -0
- package/dist/collection/assets/illustrations/page-turn-white-ivory.svg +125 -0
- package/dist/collection/assets/illustrations/shapes-inkwell.svg +65 -0
- package/dist/collection/assets/illustrations/shapes-mist-green.svg +65 -0
- package/dist/collection/assets/illustrations/shapes-soft-clay.svg +65 -0
- package/dist/collection/assets/illustrations/shapes-white-ivory.svg +65 -0
- package/dist/collection/assets/illustrations/team-leader-inkwell.svg +106 -0
- package/dist/collection/assets/illustrations/team-leader-mist-green.svg +106 -0
- package/dist/collection/assets/illustrations/team-leader-soft-clay.svg +106 -0
- package/dist/collection/assets/illustrations/team-leader-white-ivory.svg +106 -0
- package/dist/collection/assets/illustrations/thinking-inkwell.svg +89 -0
- package/dist/collection/assets/illustrations/thinking-mist-green.svg +89 -0
- package/dist/collection/assets/illustrations/thinking-soft-clay.svg +89 -0
- package/dist/collection/assets/illustrations/thinking-white-ivory.svg +89 -0
- package/dist/collection/collection-manifest.json +6 -5
- 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-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-nav-item/af-nav-item.css +135 -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-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.js +6 -5
- package/dist/collection/components.js.map +1 -1
- package/dist/components/{af-icon-button.d.ts → af-aspect-ratio.d.ts} +4 -4
- package/dist/components/af-aspect-ratio.js +9 -0
- package/dist/components/af-aspect-ratio.js.map +1 -0
- 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-input.d.ts → af-container.d.ts} +4 -4
- package/dist/components/af-container.js +9 -0
- package/dist/components/af-container.js.map +1 -0
- package/dist/components/{af-button.d.ts → af-heading.d.ts} +4 -4
- package/dist/components/af-heading.js +9 -0
- package/dist/components/af-heading.js.map +1 -0
- package/dist/components/{af-badge.d.ts → af-nav-item.d.ts} +4 -4
- package/dist/components/af-nav-item.js +9 -0
- package/dist/components/af-nav-item.js.map +1 -0
- package/dist/components/{af-card.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/index.js +7 -6
- package/dist/components/index.js.map +1 -1
- package/dist/components/p-BZ5_l5Q-.js +50 -0
- package/dist/components/p-BZ5_l5Q-.js.map +1 -0
- package/dist/components/p-CCPh8sLt.js +102 -0
- package/dist/components/p-CCPh8sLt.js.map +1 -0
- package/dist/components/p-CbKdmUDd.js +59 -0
- package/dist/components/p-CbKdmUDd.js.map +1 -0
- package/dist/components/p-Ck_3oNdO.js +44 -0
- package/dist/components/p-Ck_3oNdO.js.map +1 -0
- package/dist/components/p-DbZX-luM.js +45 -0
- package/dist/components/p-DbZX-luM.js.map +1 -0
- package/dist/components/p-Ntwn3krC.js +66 -0
- package/dist/components/p-Ntwn3krC.js.map +1 -0
- package/dist/components/{p-DOtgsZRB.js → p-TaHgCKVa.js} +60 -61
- package/dist/components/p-TaHgCKVa.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-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-nav-item.af-text.entry.js.map +1 -0
- package/dist/esm/af-heading_3.entry.js +98 -0
- package/dist/esm/affinda.js +3 -3
- package/dist/esm/{index-o0tfWqnY.js → index-DIoXjiux.js} +60 -57
- package/dist/esm/index-DIoXjiux.js.map +1 -0
- package/dist/esm/index.js +5 -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-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-nav-item/af-nav-item.d.ts +27 -0
- package/dist/types/components/af-text/af-text.d.ts +9 -0
- package/dist/types/components.d.ts +183 -208
- package/package.json +1 -1
- 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-button/af-button.css +0 -74
- package/dist/collection/components/af-button/af-button.js +0 -149
- package/dist/collection/components/af-button/af-button.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-icon-button/af-icon-button.css +0 -70
- package/dist/collection/components/af-icon-button/af-icon-button.js +0 -145
- package/dist/collection/components/af-icon-button/af-icon-button.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-button.js +0 -9
- package/dist/components/af-button.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-icon-button.js +0 -9
- package/dist/components/af-icon-button.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-button/af-button.d.ts +0 -15
- package/dist/types/components/af-card/af-card.d.ts +0 -7
- package/dist/types/components/af-icon-button/af-icon-button.d.ts +0 -15
- package/dist/types/components/af-input/af-input.d.ts +0 -24
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './index-DIoXjiux.js';
|
|
2
|
+
|
|
3
|
+
const afAspectRatioCss = ":host{display:block;width:100%}.aspect-ratio-container{width:100%;position:relative;overflow:hidden}.aspect-ratio-container ::slotted(*){width:100%;height:100%;object-fit:cover}";
|
|
4
|
+
|
|
5
|
+
const AfAspectRatio = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
/**
|
|
9
|
+
* The aspect ratio to maintain. Can be:
|
|
10
|
+
* - A predefined ratio: '1:1', '16:9', '4:3', 'golden-portrait', 'golden-landscape', 'a4-portrait', 'a4-landscape', 'letter-portrait', 'letter-landscape', etc.
|
|
11
|
+
* - A custom ratio in format 'width / height': '16 / 9', '4 / 3', '1.618 / 1', etc.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* <af-aspect-ratio ratio="16:9">Content</af-aspect-ratio>
|
|
15
|
+
* <af-aspect-ratio ratio="1.618 / 1">Content</af-aspect-ratio>
|
|
16
|
+
*/
|
|
17
|
+
this.ratio = '1:1';
|
|
18
|
+
}
|
|
19
|
+
getRatioValue() {
|
|
20
|
+
// Map common ratio shortcuts to actual CSS aspect-ratio values
|
|
21
|
+
const ratioMap = {
|
|
22
|
+
// Common ratios
|
|
23
|
+
'1:1': '1 / 1',
|
|
24
|
+
'1:2': '1 / 2',
|
|
25
|
+
'2:1': '2 / 1',
|
|
26
|
+
'2:3': '2 / 3',
|
|
27
|
+
'3:1': '3 / 1',
|
|
28
|
+
'3:2': '3 / 2',
|
|
29
|
+
'3:4': '3 / 4',
|
|
30
|
+
'4:1': '4 / 1',
|
|
31
|
+
'4:3': '4 / 3',
|
|
32
|
+
'4:5': '4 / 5',
|
|
33
|
+
'5:2': '5 / 2',
|
|
34
|
+
'5:4': '5 / 4',
|
|
35
|
+
'8:3': '8 / 3',
|
|
36
|
+
'8:5': '8 / 5',
|
|
37
|
+
// Screen ratios
|
|
38
|
+
'9:8': '9 / 8',
|
|
39
|
+
'9:16': '9 / 16',
|
|
40
|
+
'9:21': '9 / 21',
|
|
41
|
+
'10:16': '10 / 16',
|
|
42
|
+
'14:3': '14 / 3',
|
|
43
|
+
'16:5': '16 / 5',
|
|
44
|
+
'16:9': '16 / 9',
|
|
45
|
+
'16:10': '16 / 10',
|
|
46
|
+
'21:9': '21 / 9',
|
|
47
|
+
'32:9': '32 / 9',
|
|
48
|
+
// Golden ratio variants
|
|
49
|
+
'golden-portrait': '1 / 1.618',
|
|
50
|
+
'golden-landscape': '1.618 / 1',
|
|
51
|
+
'golden-portrait-half': '1 / 0.809',
|
|
52
|
+
'golden-landscape-half': '0.809 / 1',
|
|
53
|
+
// Paper sizes - A4
|
|
54
|
+
'a4-portrait': '1 / 1.414',
|
|
55
|
+
'a4-landscape': '1.414 / 1',
|
|
56
|
+
'a4-portrait-half': '1 / 0.707',
|
|
57
|
+
'a4-landscape-half': '0.707 / 1',
|
|
58
|
+
// Paper sizes - Letter
|
|
59
|
+
'letter-portrait': '1 / 1.294',
|
|
60
|
+
'letter-landscape': '1.294 / 1',
|
|
61
|
+
'letter-portrait-half': '1 / 0.647',
|
|
62
|
+
'letter-landscape-half': '0.647 / 1',
|
|
63
|
+
// Special
|
|
64
|
+
'6:7': '6 / 7'
|
|
65
|
+
};
|
|
66
|
+
// If it's a predefined ratio, return the mapped value
|
|
67
|
+
if (ratioMap[this.ratio]) {
|
|
68
|
+
return ratioMap[this.ratio];
|
|
69
|
+
}
|
|
70
|
+
// Otherwise, assume it's a custom ratio already in the correct format
|
|
71
|
+
return this.ratio;
|
|
72
|
+
}
|
|
73
|
+
render() {
|
|
74
|
+
const ratioValue = this.getRatioValue();
|
|
75
|
+
return (h("div", { key: '02bfa5463911ecd25903521e90a0570bb3bca0ad', class: "aspect-ratio-container", style: { aspectRatio: ratioValue } }, h("slot", { key: '9575c859052e8f1b1b362d9395fdfdf43d46b0b4' })));
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
AfAspectRatio.style = afAspectRatioCss;
|
|
79
|
+
|
|
80
|
+
export { AfAspectRatio as af_aspect_ratio };
|
|
81
|
+
//# sourceMappingURL=af-aspect-ratio.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"af-aspect-ratio.entry.js","sources":["src/components/af-aspect-ratio/af-aspect-ratio.css?tag=af-aspect-ratio&encapsulation=shadow","src/components/af-aspect-ratio/af-aspect-ratio.tsx"],"sourcesContent":[":host {\n display: block;\n width: 100%;\n}\n\n.aspect-ratio-container {\n width: 100%;\n position: relative;\n overflow: hidden;\n}\n\n/* Ensure slotted content fills the container */\n.aspect-ratio-container ::slotted(*) {\n width: 100%;\n height: 100%;\n object-fit: cover;\n}\n","import { Component, h, Prop } from '@stencil/core';\n\n/**\n * A container component that maintains a fixed aspect ratio for its content.\n * Useful for images, videos, or any content that needs to maintain specific proportions.\n */\n@Component({\n tag: 'af-aspect-ratio',\n styleUrl: 'af-aspect-ratio.css',\n shadow: true\n})\nexport class AfAspectRatio {\n /**\n * The aspect ratio to maintain. Can be:\n * - A predefined ratio: '1:1', '16:9', '4:3', 'golden-portrait', 'golden-landscape', 'a4-portrait', 'a4-landscape', 'letter-portrait', 'letter-landscape', etc.\n * - A custom ratio in format 'width / height': '16 / 9', '4 / 3', '1.618 / 1', etc.\n *\n * @example\n * <af-aspect-ratio ratio=\"16:9\">Content</af-aspect-ratio>\n * <af-aspect-ratio ratio=\"1.618 / 1\">Content</af-aspect-ratio>\n */\n @Prop() ratio: string = '1:1';\n\n private getRatioValue(): string {\n // Map common ratio shortcuts to actual CSS aspect-ratio values\n const ratioMap: { [key: string]: string } = {\n // Common ratios\n '1:1': '1 / 1',\n '1:2': '1 / 2',\n '2:1': '2 / 1',\n '2:3': '2 / 3',\n '3:1': '3 / 1',\n '3:2': '3 / 2',\n '3:4': '3 / 4',\n '4:1': '4 / 1',\n '4:3': '4 / 3',\n '4:5': '4 / 5',\n '5:2': '5 / 2',\n '5:4': '5 / 4',\n '8:3': '8 / 3',\n '8:5': '8 / 5',\n // Screen ratios\n '9:8': '9 / 8',\n '9:16': '9 / 16',\n '9:21': '9 / 21',\n '10:16': '10 / 16',\n '14:3': '14 / 3',\n '16:5': '16 / 5',\n '16:9': '16 / 9',\n '16:10': '16 / 10',\n '21:9': '21 / 9',\n '32:9': '32 / 9',\n // Golden ratio variants\n 'golden-portrait': '1 / 1.618',\n 'golden-landscape': '1.618 / 1',\n 'golden-portrait-half': '1 / 0.809',\n 'golden-landscape-half': '0.809 / 1',\n // Paper sizes - A4\n 'a4-portrait': '1 / 1.414',\n 'a4-landscape': '1.414 / 1',\n 'a4-portrait-half': '1 / 0.707',\n 'a4-landscape-half': '0.707 / 1',\n // Paper sizes - Letter\n 'letter-portrait': '1 / 1.294',\n 'letter-landscape': '1.294 / 1',\n 'letter-portrait-half': '1 / 0.647',\n 'letter-landscape-half': '0.647 / 1',\n // Special\n '6:7': '6 / 7'\n };\n\n // If it's a predefined ratio, return the mapped value\n if (ratioMap[this.ratio]) {\n return ratioMap[this.ratio];\n }\n\n // Otherwise, assume it's a custom ratio already in the correct format\n return this.ratio;\n }\n\n render() {\n const ratioValue = this.getRatioValue();\n\n return (\n <div\n class=\"aspect-ratio-container\"\n style={{ aspectRatio: ratioValue }}\n >\n <slot></slot>\n </div>\n );\n }\n}\n"],"names":[],"mappings":";;AAAA,MAAM,gBAAgB,GAAG,mLAAmL;;MCW/L,aAAa,GAAA,MAAA;AAL1B,IAAA,WAAA,CAAA,OAAA,EAAA;;AAME;;;;;;;;AAQG;AACK,QAAA,IAAK,CAAA,KAAA,GAAW,KAAK;AAuE9B;IArES,aAAa,GAAA;;AAEnB,QAAA,MAAM,QAAQ,GAA8B;;AAE1C,YAAA,KAAK,EAAE,OAAO;AACd,YAAA,KAAK,EAAE,OAAO;AACd,YAAA,KAAK,EAAE,OAAO;AACd,YAAA,KAAK,EAAE,OAAO;AACd,YAAA,KAAK,EAAE,OAAO;AACd,YAAA,KAAK,EAAE,OAAO;AACd,YAAA,KAAK,EAAE,OAAO;AACd,YAAA,KAAK,EAAE,OAAO;AACd,YAAA,KAAK,EAAE,OAAO;AACd,YAAA,KAAK,EAAE,OAAO;AACd,YAAA,KAAK,EAAE,OAAO;AACd,YAAA,KAAK,EAAE,OAAO;AACd,YAAA,KAAK,EAAE,OAAO;AACd,YAAA,KAAK,EAAE,OAAO;;AAEd,YAAA,KAAK,EAAE,OAAO;AACd,YAAA,MAAM,EAAE,QAAQ;AAChB,YAAA,MAAM,EAAE,QAAQ;AAChB,YAAA,OAAO,EAAE,SAAS;AAClB,YAAA,MAAM,EAAE,QAAQ;AAChB,YAAA,MAAM,EAAE,QAAQ;AAChB,YAAA,MAAM,EAAE,QAAQ;AAChB,YAAA,OAAO,EAAE,SAAS;AAClB,YAAA,MAAM,EAAE,QAAQ;AAChB,YAAA,MAAM,EAAE,QAAQ;;AAEhB,YAAA,iBAAiB,EAAE,WAAW;AAC9B,YAAA,kBAAkB,EAAE,WAAW;AAC/B,YAAA,sBAAsB,EAAE,WAAW;AACnC,YAAA,uBAAuB,EAAE,WAAW;;AAEpC,YAAA,aAAa,EAAE,WAAW;AAC1B,YAAA,cAAc,EAAE,WAAW;AAC3B,YAAA,kBAAkB,EAAE,WAAW;AAC/B,YAAA,mBAAmB,EAAE,WAAW;;AAEhC,YAAA,iBAAiB,EAAE,WAAW;AAC9B,YAAA,kBAAkB,EAAE,WAAW;AAC/B,YAAA,sBAAsB,EAAE,WAAW;AACnC,YAAA,uBAAuB,EAAE,WAAW;;AAEpC,YAAA,KAAK,EAAE;SACR;;AAGD,QAAA,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;AACxB,YAAA,OAAO,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC;;;QAI7B,OAAO,IAAI,CAAC,KAAK;;IAGnB,MAAM,GAAA;AACJ,QAAA,MAAM,UAAU,GAAG,IAAI,CAAC,aAAa,EAAE;AAEvC,QAAA,QACE,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAC,wBAAwB,EAC9B,KAAK,EAAE,EAAE,WAAW,EAAE,UAAU,EAAE,EAAA,EAElC,CAAa,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACT;;;;;;;"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './index-DIoXjiux.js';
|
|
2
|
+
|
|
3
|
+
const afColorSwatchCss = ":host{display:block}.swatch{display:flex;flex-direction:column;border-radius:8px;overflow:hidden;border:1px solid #ece6f5;background:white}.color-preview{width:100%;height:120px;flex-shrink:0}.size-large .color-preview{height:140px}.color-info{padding:16px;display:flex;flex-direction:column;gap:4px}.color-name{font-family:'NeuSans', 'Inter', system-ui, sans-serif;font-size:16px;font-weight:500;color:#14343B}.color-value{font-family:'Helvetica', 'Inter', monospace, system-ui, sans-serif;font-size:14px;color:#708380}";
|
|
4
|
+
|
|
5
|
+
const AfColorSwatch = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
/** Size variant */
|
|
9
|
+
this.size = 'default';
|
|
10
|
+
}
|
|
11
|
+
render() {
|
|
12
|
+
return (h("div", { key: '57a141b5af5c538c5cf842a61173dd391a91d59b', class: {
|
|
13
|
+
'swatch': true,
|
|
14
|
+
[`size-${this.size}`]: true
|
|
15
|
+
}, 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))));
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
AfColorSwatch.style = afColorSwatchCss;
|
|
19
|
+
|
|
20
|
+
export { AfColorSwatch as af_color_swatch };
|
|
21
|
+
//# sourceMappingURL=af-color-swatch.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"af-color-swatch.entry.js","sources":["src/components/af-color-swatch/af-color-swatch.css?tag=af-color-swatch&encapsulation=shadow","src/components/af-color-swatch/af-color-swatch.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n.swatch {\n display: flex;\n flex-direction: column;\n border-radius: 8px;\n overflow: hidden;\n border: 1px solid #ece6f5;\n background: white;\n}\n\n.color-preview {\n width: 100%;\n height: 120px;\n flex-shrink: 0;\n}\n\n.size-large .color-preview {\n height: 140px;\n}\n\n.color-info {\n padding: 16px;\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n\n.color-name {\n font-family: 'NeuSans', 'Inter', system-ui, sans-serif;\n font-size: 16px;\n font-weight: 500;\n color: #14343B;\n}\n\n.color-value {\n font-family: 'Helvetica', 'Inter', monospace, system-ui, sans-serif;\n font-size: 14px;\n color: #708380;\n}\n","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"],"names":[],"mappings":";;AAAA,MAAM,gBAAgB,GAAG,0gBAA0gB;;MCOthB,aAAa,GAAA,MAAA;AAL1B,IAAA,WAAA,CAAA,OAAA,EAAA;;;AAaU,QAAA,IAAI,CAAA,IAAA,GAAwB,SAAS;AAoB9C;IAlBC,MAAM,GAAA;QACJ,QACE,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAE;AACV,gBAAA,QAAQ,EAAE,IAAI;AACd,gBAAA,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAE,CAAA,GAAG;aACxB,EAAE,IAAI,EAAC,MAAM,EAAA,EACZ,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAC,eAAe,EACrB,IAAI,EAAC,SAAS,EACd,KAAK,EAAE,EAAE,eAAe,EAAE,IAAI,CAAC,KAAK,EAAE,EACjC,CAAA,EACP,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAC,YAAY,EAAC,IAAI,EAAC,MAAM,EAAA,EACjC,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,YAAY,EAAC,IAAI,EAAC,MAAM,EAAE,EAAA,IAAI,CAAC,IAAI,CAAO,EACrD,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAC,aAAa,EAAC,IAAI,EAAC,OAAO,EAAE,EAAA,IAAI,CAAC,KAAK,CAAO,CACpD,CACF;;;;;;;"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './index-DIoXjiux.js';
|
|
2
|
+
|
|
3
|
+
const afContainerCss = ":host{display:block;width:100%}.container{width:100%;margin-left:auto;margin-right:auto;box-sizing:border-box;padding-left:16px;padding-right:16px}@media (min-width: 375px){.container{padding-left:20px;padding-right:20px}}@media (min-width: 768px){.container{padding-left:32px;padding-right:32px}.max-width-medium{max-width:768px}}@media (min-width: 1024px){.container{padding-left:64px;padding-right:64px}.max-width-large{max-width:1024px}.max-width-medium{max-width:768px}}@media (min-width: 1440px){.container{padding-left:80px;padding-right:80px}.max-width-xlarge{max-width:1440px}.max-width-large{max-width:1024px}.max-width-medium{max-width:768px}}.max-width-fluid{max-width:none}";
|
|
4
|
+
|
|
5
|
+
const AfContainer = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
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
|
+
};
|
|
21
|
+
AfContainer.style = afContainerCss;
|
|
22
|
+
|
|
23
|
+
export { AfContainer as af_container };
|
|
24
|
+
//# sourceMappingURL=af-container.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"af-container.entry.js","sources":["src/components/af-container/af-container.css?tag=af-container&encapsulation=shadow","src/components/af-container/af-container.tsx"],"sourcesContent":[":host {\n display: block;\n width: 100%;\n}\n\n.container {\n width: 100%;\n margin-left: auto;\n margin-right: auto;\n box-sizing: border-box;\n\n /* Mobile first: xsmall breakpoint (320px) */\n padding-left: 16px;\n padding-right: 16px;\n}\n\n/* Small breakpoint (375px) */\n@media (min-width: 375px) {\n .container {\n padding-left: 20px;\n padding-right: 20px;\n }\n}\n\n/* Medium breakpoint (768px) */\n@media (min-width: 768px) {\n .container {\n padding-left: 32px;\n padding-right: 32px;\n }\n\n .max-width-medium {\n max-width: 768px;\n }\n}\n\n/* Large breakpoint (1024px) */\n@media (min-width: 1024px) {\n .container {\n padding-left: 64px;\n padding-right: 64px;\n }\n\n .max-width-large {\n max-width: 1024px;\n }\n\n .max-width-medium {\n max-width: 768px;\n }\n}\n\n/* XLarge breakpoint (1440px) */\n@media (min-width: 1440px) {\n .container {\n padding-left: 80px;\n padding-right: 80px;\n }\n\n .max-width-xlarge {\n max-width: 1440px;\n }\n\n .max-width-large {\n max-width: 1024px;\n }\n\n .max-width-medium {\n max-width: 768px;\n }\n}\n\n/* Fluid has no max-width */\n.max-width-fluid {\n max-width: none;\n}\n","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"],"names":[],"mappings":";;AAAA,MAAM,cAAc,GAAG,grBAAgrB;;MCW1rB,WAAW,GAAA,MAAA;AALxB,IAAA,WAAA,CAAA,OAAA,EAAA;;AAME;;;;;;AAMG;AACK,QAAA,IAAQ,CAAA,QAAA,GAA4C,QAAQ;AASrE;IAPC,MAAM,GAAA;AACJ,QAAA,QACE,4DAAK,KAAK,EAAE,uBAAuB,IAAI,CAAC,QAAQ,CAAA,CAAE,EAAA,EAChD,CAAa,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACT;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"af-heading.af-nav-item.af-text.entry.js","sources":["src/components/af-heading/af-heading.css?tag=af-heading&encapsulation=shadow","src/components/af-heading/af-heading.tsx","src/components/af-text/af-text.css?tag=af-text&encapsulation=shadow","src/components/af-text/af-text.tsx","src/components/af-nav-item/af-nav-item.css?tag=af-nav-item&encapsulation=shadow","src/components/af-nav-item/af-nav-item.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n.heading {\n margin: 0;\n padding: 0;\n font-family: 'NeuSans', 'Inter', 'Segoe UI', system-ui, sans-serif;\n font-weight: 500;\n color: #14343b;\n letter-spacing: -0.02em;\n}\n\n/* Alignment */\n.align-left {\n text-align: left;\n}\n\n.align-center {\n text-align: center;\n}\n\n.align-right {\n text-align: right;\n}\n\n/* Heading XL */\n.level-xl {\n font-size: 50px;\n line-height: 1;\n}\n\n@media (min-width: 768px) {\n .level-xl {\n font-size: 80px;\n }\n}\n\n/* Heading 1 */\n.level-1 {\n font-size: 38px;\n line-height: 1;\n}\n\n@media (min-width: 768px) {\n .level-1 {\n font-size: 56px;\n }\n}\n\n/* Heading 2 */\n.level-2 {\n font-size: 32px;\n line-height: 1;\n}\n\n@media (min-width: 768px) {\n .level-2 {\n font-size: 44px;\n }\n}\n\n/* Heading 3 */\n.level-3 {\n font-size: 25px;\n line-height: 1;\n}\n\n@media (min-width: 768px) {\n .level-3 {\n font-size: 34px;\n }\n}\n\n/* Heading 4 */\n.level-4 {\n font-size: 20px;\n line-height: 1.1;\n}\n\n@media (min-width: 768px) {\n .level-4 {\n font-size: 24px;\n line-height: 1.2;\n }\n}\n\n/* Heading 5 */\n.level-5 {\n font-size: 18px;\n line-height: 1.1;\n}\n\n@media (min-width: 768px) {\n .level-5 {\n font-size: 20px;\n line-height: 1.2;\n }\n}\n","import { Component, h, Prop } from '@stencil/core';\n\n@Component({\n tag: 'af-heading',\n styleUrl: 'af-heading.css',\n shadow: true\n})\nexport class AfHeading {\n /** Heading level */\n @Prop() level: 'xl' | '1' | '2' | '3' | '4' | '5' = '1';\n\n /** Visual alignment */\n @Prop() align: 'left' | 'center' | 'right' = 'left';\n\n private getHeadingTag() {\n // Map display levels to semantic HTML tags\n const tagMap: Record<string, string> = {\n 'xl': 'h1',\n '1': 'h1',\n '2': 'h2',\n '3': 'h3',\n '4': 'h4',\n '5': 'h5'\n };\n return tagMap[this.level] || 'h1';\n }\n\n render() {\n const Tag = this.getHeadingTag() as any;\n\n return (\n <Tag\n class={{\n 'heading': true,\n [`level-${this.level}`]: true,\n [`align-${this.align}`]: true\n }}\n part=\"base\"\n >\n <slot />\n </Tag>\n );\n }\n}\n",":host {\n display: block;\n}\n\n.text {\n margin: 0;\n padding: 0;\n font-family: 'Helvetica', 'Inter', 'Segoe UI', system-ui, sans-serif;\n font-weight: 400;\n color: #14343b;\n letter-spacing: 0;\n}\n\n/* Alignment */\n.align-left {\n text-align: left;\n}\n\n.align-center {\n text-align: center;\n}\n\n.align-right {\n text-align: right;\n}\n\n/* Body variants */\n.variant-xlarge {\n font-size: 22px;\n line-height: 28px;\n}\n\n.variant-large {\n font-size: 18px;\n line-height: 26px;\n}\n\n.variant-medium {\n font-size: 16px;\n line-height: 24px;\n}\n\n.variant-small {\n font-size: 14px;\n line-height: 20px;\n}\n\n/* Label variants - use NeuSans Book */\n.variant-label-button {\n font-family: 'NeuSans', 'Inter', 'Segoe UI', system-ui, sans-serif;\n font-weight: 500;\n font-size: 17px;\n line-height: 20px;\n}\n\n.variant-label-tag {\n font-family: 'NeuSans', 'Inter', 'Segoe UI', system-ui, sans-serif;\n font-weight: 500;\n font-size: 14px;\n line-height: 1;\n}\n","import { Component, h, Prop } from '@stencil/core';\n\n@Component({\n tag: 'af-text',\n styleUrl: 'af-text.css',\n shadow: true\n})\nexport class AfText {\n /** Text variant */\n @Prop() variant: 'xlarge' | 'large' | 'medium' | 'small' | 'label-button' | 'label-tag' = 'medium';\n\n /** Visual alignment */\n @Prop() align: 'left' | 'center' | 'right' = 'left';\n\n /** Semantic element to render */\n @Prop() as: 'p' | 'span' | 'div' | 'label' = 'p';\n\n render() {\n const Tag = this.as as any;\n\n return (\n <Tag\n class={{\n 'text': true,\n [`variant-${this.variant}`]: true,\n [`align-${this.align}`]: true\n }}\n part=\"base\"\n >\n <slot />\n </Tag>\n );\n }\n}\n",":host {\n display: inline-block;\n}\n\n.nav-link {\n text-decoration: none;\n color: inherit;\n display: block;\n}\n\n.nav-item {\n display: flex;\n align-items: center;\n gap: 8px;\n box-sizing: border-box;\n cursor: pointer;\n}\n\n/* Primary hierarchy - bold main navigation */\n.hierarchy-primary {\n padding: 12px;\n justify-content: center;\n}\n\n.hierarchy-primary .label-container {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 24px;\n gap: 10px;\n}\n\n/* Primary variant 01 - darker */\n.hierarchy-primary.variant-01 {\n font-family: 'NeuSans', 'Inter', system-ui, sans-serif;\n font-size: 16px;\n font-weight: 500;\n line-height: 20px;\n color: #14343b;\n}\n\n/* Primary variant 02 - lighter */\n.hierarchy-primary.variant-02 {\n font-family: 'NeuSans', 'Inter', system-ui, sans-serif;\n font-size: 16px;\n font-weight: 400;\n line-height: 20px;\n color: #2b484f;\n}\n\n/* Hover state for primary - underline */\n.hierarchy-primary:hover .label-container {\n border-bottom: 1px solid currentColor;\n}\n\n/* Active state for primary - thicker border */\n.hierarchy-primary.active .label-container {\n border-bottom: 2px solid #8a7049;\n}\n\n/* Secondary hierarchy - smaller sub-navigation */\n.hierarchy-secondary {\n padding: 4px 0;\n}\n\n.hierarchy-secondary .label-container {\n display: flex;\n align-items: center;\n flex: 1;\n min-height: 24px;\n gap: 8px;\n}\n\n/* Secondary variant 01 - medium weight */\n.hierarchy-secondary.variant-01 {\n font-family: 'NeuSans', 'Inter', system-ui, sans-serif;\n font-size: 14px;\n font-weight: 500;\n line-height: 20px;\n color: #14343b;\n}\n\n/* Secondary variant 02 - regular weight */\n.hierarchy-secondary.variant-02 {\n font-family: 'NeuSans', 'Inter', system-ui, sans-serif;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n color: #2b484f;\n}\n\n/* Hover state for secondary - underline text */\n.hierarchy-secondary:hover ::slotted(*) {\n text-decoration: underline;\n}\n\n/* Mobile styles */\n@media (max-width: 767px) {\n .hierarchy-primary {\n padding: 20px 12px;\n border-bottom: 1px solid #e8eeed;\n width: 100%;\n }\n\n .hierarchy-primary .label-container {\n flex: 1;\n justify-content: flex-start;\n }\n\n .hierarchy-primary.variant-01 {\n font-size: 20px;\n line-height: 1.1;\n letter-spacing: -0.4px;\n }\n\n .hierarchy-primary.variant-02 {\n font-size: 20px;\n line-height: 1.1;\n letter-spacing: -0.4px;\n color: #60767b;\n }\n}\n\n/* Icon sizing */\n::slotted([slot=\"icon-left\"]),\n::slotted([slot=\"icon-right\"]) {\n width: 24px;\n height: 24px;\n flex-shrink: 0;\n}\n\n.hierarchy-secondary ::slotted([slot=\"icon-right\"]) {\n width: 20px;\n height: 20px;\n}\n","import { Component, h, Prop, Host } from '@stencil/core';\n\n/**\n * A generic navigation item component that can be used in navigation bars, menus, and sidebars.\n * Supports multiple hierarchy levels, variants, and states (active, hover).\n */\n@Component({\n tag: 'af-nav-item',\n styleUrl: 'af-nav-item.css',\n shadow: true\n})\nexport class AfNavItem {\n /**\n * Visual hierarchy level of the navigation item\n * - 'primary': Bold, main navigation (larger text, prominent styling)\n * - 'secondary': Lighter, sub-navigation (smaller text, subtle styling)\n */\n @Prop() hierarchy: 'primary' | 'secondary' = 'primary';\n\n /**\n * Visual variant within the hierarchy level\n * - '01': Darker/more prominent styling\n * - '02': Lighter/more subtle styling\n */\n @Prop() variant: '01' | '02' = '01';\n\n /**\n * URL to navigate to when clicked\n */\n @Prop() href?: string;\n\n /**\n * Whether this nav item is currently active/selected\n */\n @Prop() active: boolean = false;\n\n render() {\n const classes = {\n 'nav-item': true,\n [`hierarchy-${this.hierarchy}`]: true,\n [`variant-${this.variant}`]: true,\n 'active': this.active\n };\n\n const content = (\n <div class={classes}>\n <slot name=\"icon-left\"></slot>\n <div class=\"label-container\">\n <slot></slot>\n </div>\n <slot name=\"icon-right\"></slot>\n </div>\n );\n\n if (this.href) {\n return (\n <Host>\n <a href={this.href} class=\"nav-link\">\n {content}\n </a>\n </Host>\n );\n }\n\n return <Host>{content}</Host>;\n }\n}\n"],"names":[],"mappings":";;AAAA,MAAM,YAAY,GAAG,+zBAA+zB;;MCOv0B,SAAS,GAAA,MAAA;AALtB,IAAA,WAAA,CAAA,OAAA,EAAA;;;AAOU,QAAA,IAAK,CAAA,KAAA,GAAuC,GAAG;;AAG/C,QAAA,IAAK,CAAA,KAAA,GAAgC,MAAM;AA+BpD;IA7BS,aAAa,GAAA;;AAEnB,QAAA,MAAM,MAAM,GAA2B;AACrC,YAAA,IAAI,EAAE,IAAI;AACV,YAAA,GAAG,EAAE,IAAI;AACT,YAAA,GAAG,EAAE,IAAI;AACT,YAAA,GAAG,EAAE,IAAI;AACT,YAAA,GAAG,EAAE,IAAI;AACT,YAAA,GAAG,EAAE;SACN;QACD,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI;;IAGnC,MAAM,GAAA;AACJ,QAAA,MAAM,GAAG,GAAG,IAAI,CAAC,aAAa,EAAS;QAEvC,QACE,CAAA,CAAC,GAAG,EAAA,EAAA,GAAA,EAAA,0CAAA,EACF,KAAK,EAAE;AACL,gBAAA,SAAS,EAAE,IAAI;AACf,gBAAA,CAAC,SAAS,IAAI,CAAC,KAAK,CAAE,CAAA,GAAG,IAAI;AAC7B,gBAAA,CAAC,SAAS,IAAI,CAAC,KAAK,CAAE,CAAA,GAAG;AAC1B,aAAA,EACD,IAAI,EAAC,MAAM,EAAA,EAEX,CAAQ,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACJ;;;;;ACxCZ,MAAM,SAAS,GAAG,osBAAosB;;MCOzsB,MAAM,GAAA,MAAA;AALnB,IAAA,WAAA,CAAA,OAAA,EAAA;;;AAOU,QAAA,IAAO,CAAA,OAAA,GAA2E,QAAQ;;AAG1F,QAAA,IAAK,CAAA,KAAA,GAAgC,MAAM;;AAG3C,QAAA,IAAE,CAAA,EAAA,GAAmC,GAAG;AAkBjD;IAhBC,MAAM,GAAA;AACJ,QAAA,MAAM,GAAG,GAAG,IAAI,CAAC,EAAS;QAE1B,QACE,CAAA,CAAC,GAAG,EAAA,EAAA,GAAA,EAAA,0CAAA,EACF,KAAK,EAAE;AACL,gBAAA,MAAM,EAAE,IAAI;AACZ,gBAAA,CAAC,WAAW,IAAI,CAAC,OAAO,CAAE,CAAA,GAAG,IAAI;AACjC,gBAAA,CAAC,SAAS,IAAI,CAAC,KAAK,CAAE,CAAA,GAAG;AAC1B,aAAA,EACD,IAAI,EAAC,MAAM,EAAA,EAEX,CAAQ,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACJ;;;;;AC9BZ,MAAM,YAAY,GAAG,8xDAA8xD;;MCWtyD,SAAS,GAAA,MAAA;AALtB,IAAA,WAAA,CAAA,OAAA,EAAA;;AAME;;;;AAIG;AACK,QAAA,IAAS,CAAA,SAAA,GAA4B,SAAS;AAEtD;;;;AAIG;AACK,QAAA,IAAO,CAAA,OAAA,GAAgB,IAAI;AAOnC;;AAEG;AACK,QAAA,IAAM,CAAA,MAAA,GAAY,KAAK;AAgChC;IA9BC,MAAM,GAAA;AACJ,QAAA,MAAM,OAAO,GAAG;AACd,YAAA,UAAU,EAAE,IAAI;AAChB,YAAA,CAAC,aAAa,IAAI,CAAC,SAAS,CAAE,CAAA,GAAG,IAAI;AACrC,YAAA,CAAC,WAAW,IAAI,CAAC,OAAO,CAAE,CAAA,GAAG,IAAI;YACjC,QAAQ,EAAE,IAAI,CAAC;SAChB;QAED,MAAM,OAAO,IACX,CAAK,CAAA,KAAA,EAAA,EAAA,KAAK,EAAE,OAAO,EAAA,EACjB,CAAM,CAAA,MAAA,EAAA,EAAA,IAAI,EAAC,WAAW,EAAQ,CAAA,EAC9B,CAAK,CAAA,KAAA,EAAA,EAAA,KAAK,EAAC,iBAAiB,EAAA,EAC1B,CAAA,CAAA,MAAA,EAAA,IAAA,CAAa,CACT,EACN,CAAA,CAAA,MAAA,EAAA,EAAM,IAAI,EAAC,YAAY,EAAQ,CAAA,CAC3B,CACP;AAED,QAAA,IAAI,IAAI,CAAC,IAAI,EAAE;YACb,QACE,EAAC,IAAI,EAAA,IAAA,EACH,CAAA,CAAA,GAAA,EAAA,EAAG,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAC,UAAU,EACjC,EAAA,OAAO,CACN,CACC;;QAIX,OAAO,CAAC,CAAA,IAAI,EAAE,IAAA,EAAA,OAAO,CAAQ;;;;;;;"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-DIoXjiux.js';
|
|
2
|
+
|
|
3
|
+
const afHeadingCss = ":host{display:block}.heading{margin:0;padding:0;font-family:'NeuSans', 'Inter', 'Segoe UI', system-ui, sans-serif;font-weight:500;color:#14343b;letter-spacing:-0.02em}.align-left{text-align:left}.align-center{text-align:center}.align-right{text-align:right}.level-xl{font-size:50px;line-height:1}@media (min-width: 768px){.level-xl{font-size:80px}}.level-1{font-size:38px;line-height:1}@media (min-width: 768px){.level-1{font-size:56px}}.level-2{font-size:32px;line-height:1}@media (min-width: 768px){.level-2{font-size:44px}}.level-3{font-size:25px;line-height:1}@media (min-width: 768px){.level-3{font-size:34px}}.level-4{font-size:20px;line-height:1.1}@media (min-width: 768px){.level-4{font-size:24px;line-height:1.2}}.level-5{font-size:18px;line-height:1.1}@media (min-width: 768px){.level-5{font-size:20px;line-height:1.2}}";
|
|
4
|
+
|
|
5
|
+
const AfHeading = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
/** Heading level */
|
|
9
|
+
this.level = '1';
|
|
10
|
+
/** Visual alignment */
|
|
11
|
+
this.align = 'left';
|
|
12
|
+
}
|
|
13
|
+
getHeadingTag() {
|
|
14
|
+
// Map display levels to semantic HTML tags
|
|
15
|
+
const tagMap = {
|
|
16
|
+
'xl': 'h1',
|
|
17
|
+
'1': 'h1',
|
|
18
|
+
'2': 'h2',
|
|
19
|
+
'3': 'h3',
|
|
20
|
+
'4': 'h4',
|
|
21
|
+
'5': 'h5'
|
|
22
|
+
};
|
|
23
|
+
return tagMap[this.level] || 'h1';
|
|
24
|
+
}
|
|
25
|
+
render() {
|
|
26
|
+
const Tag = this.getHeadingTag();
|
|
27
|
+
return (h(Tag, { key: '1d3f37c8d067c3c9d0ec7f10422478ab41c990b2', class: {
|
|
28
|
+
'heading': true,
|
|
29
|
+
[`level-${this.level}`]: true,
|
|
30
|
+
[`align-${this.align}`]: true
|
|
31
|
+
}, part: "base" }, h("slot", { key: 'dcba9d00393f818cfceeb5eba5cc2bd874927dfd' })));
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
AfHeading.style = afHeadingCss;
|
|
35
|
+
|
|
36
|
+
const afTextCss = ":host{display:block}.text{margin:0;padding:0;font-family:'Helvetica', 'Inter', 'Segoe UI', system-ui, sans-serif;font-weight:400;color:#14343b;letter-spacing:0}.align-left{text-align:left}.align-center{text-align:center}.align-right{text-align:right}.variant-xlarge{font-size:22px;line-height:28px}.variant-large{font-size:18px;line-height:26px}.variant-medium{font-size:16px;line-height:24px}.variant-small{font-size:14px;line-height:20px}.variant-label-button{font-family:'NeuSans', 'Inter', 'Segoe UI', system-ui, sans-serif;font-weight:500;font-size:17px;line-height:20px}.variant-label-tag{font-family:'NeuSans', 'Inter', 'Segoe UI', system-ui, sans-serif;font-weight:500;font-size:14px;line-height:1}";
|
|
37
|
+
|
|
38
|
+
const AfText = class {
|
|
39
|
+
constructor(hostRef) {
|
|
40
|
+
registerInstance(this, hostRef);
|
|
41
|
+
/** Text variant */
|
|
42
|
+
this.variant = 'medium';
|
|
43
|
+
/** Visual alignment */
|
|
44
|
+
this.align = 'left';
|
|
45
|
+
/** Semantic element to render */
|
|
46
|
+
this.as = 'p';
|
|
47
|
+
}
|
|
48
|
+
render() {
|
|
49
|
+
const Tag = this.as;
|
|
50
|
+
return (h(Tag, { key: '778a86a185f2416dec867ca2457acb2fe1ad4bcb', class: {
|
|
51
|
+
'text': true,
|
|
52
|
+
[`variant-${this.variant}`]: true,
|
|
53
|
+
[`align-${this.align}`]: true
|
|
54
|
+
}, part: "base" }, h("slot", { key: '2b3ee364c989ca8d233583946e24665df0192fb9' })));
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
AfText.style = afTextCss;
|
|
58
|
+
|
|
59
|
+
const afNavItemCss = ":host{display:inline-block}.nav-link{text-decoration:none;color:inherit;display:block}.nav-item{display:flex;align-items:center;gap:8px;box-sizing:border-box;cursor:pointer}.hierarchy-primary{padding:12px;justify-content:center}.hierarchy-primary .label-container{display:flex;align-items:center;justify-content:center;height:24px;gap:10px}.hierarchy-primary.variant-01{font-family:'NeuSans', 'Inter', system-ui, sans-serif;font-size:16px;font-weight:500;line-height:20px;color:#14343b}.hierarchy-primary.variant-02{font-family:'NeuSans', 'Inter', system-ui, sans-serif;font-size:16px;font-weight:400;line-height:20px;color:#2b484f}.hierarchy-primary:hover .label-container{border-bottom:1px solid currentColor}.hierarchy-primary.active .label-container{border-bottom:2px solid #8a7049}.hierarchy-secondary{padding:4px 0}.hierarchy-secondary .label-container{display:flex;align-items:center;flex:1;min-height:24px;gap:8px}.hierarchy-secondary.variant-01{font-family:'NeuSans', 'Inter', system-ui, sans-serif;font-size:14px;font-weight:500;line-height:20px;color:#14343b}.hierarchy-secondary.variant-02{font-family:'NeuSans', 'Inter', system-ui, sans-serif;font-size:14px;font-weight:400;line-height:20px;color:#2b484f}.hierarchy-secondary:hover ::slotted(*){text-decoration:underline}@media (max-width: 767px){.hierarchy-primary{padding:20px 12px;border-bottom:1px solid #e8eeed;width:100%}.hierarchy-primary .label-container{flex:1;justify-content:flex-start}.hierarchy-primary.variant-01{font-size:20px;line-height:1.1;letter-spacing:-0.4px}.hierarchy-primary.variant-02{font-size:20px;line-height:1.1;letter-spacing:-0.4px;color:#60767b}}::slotted([slot=\"icon-left\"]),::slotted([slot=\"icon-right\"]){width:24px;height:24px;flex-shrink:0}.hierarchy-secondary ::slotted([slot=\"icon-right\"]){width:20px;height:20px}";
|
|
60
|
+
|
|
61
|
+
const AfNavItem = class {
|
|
62
|
+
constructor(hostRef) {
|
|
63
|
+
registerInstance(this, hostRef);
|
|
64
|
+
/**
|
|
65
|
+
* Visual hierarchy level of the navigation item
|
|
66
|
+
* - 'primary': Bold, main navigation (larger text, prominent styling)
|
|
67
|
+
* - 'secondary': Lighter, sub-navigation (smaller text, subtle styling)
|
|
68
|
+
*/
|
|
69
|
+
this.hierarchy = 'primary';
|
|
70
|
+
/**
|
|
71
|
+
* Visual variant within the hierarchy level
|
|
72
|
+
* - '01': Darker/more prominent styling
|
|
73
|
+
* - '02': Lighter/more subtle styling
|
|
74
|
+
*/
|
|
75
|
+
this.variant = '01';
|
|
76
|
+
/**
|
|
77
|
+
* Whether this nav item is currently active/selected
|
|
78
|
+
*/
|
|
79
|
+
this.active = false;
|
|
80
|
+
}
|
|
81
|
+
render() {
|
|
82
|
+
const classes = {
|
|
83
|
+
'nav-item': true,
|
|
84
|
+
[`hierarchy-${this.hierarchy}`]: true,
|
|
85
|
+
[`variant-${this.variant}`]: true,
|
|
86
|
+
'active': this.active
|
|
87
|
+
};
|
|
88
|
+
const content = (h("div", { class: classes }, h("slot", { name: "icon-left" }), h("div", { class: "label-container" }, h("slot", null)), h("slot", { name: "icon-right" })));
|
|
89
|
+
if (this.href) {
|
|
90
|
+
return (h(Host, null, h("a", { href: this.href, class: "nav-link" }, content)));
|
|
91
|
+
}
|
|
92
|
+
return h(Host, null, content);
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
AfNavItem.style = afNavItemCss;
|
|
96
|
+
|
|
97
|
+
export { AfHeading as af_heading, AfNavItem as af_nav_item, AfText as af_text };
|
|
98
|
+
//# sourceMappingURL=af-heading.af-nav-item.af-text.entry.js.map
|
package/dist/esm/affinda.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as promiseResolve, g as globalScripts, b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { p as promiseResolve, g as globalScripts, b as bootstrapLazy } from './index-DIoXjiux.js';
|
|
2
|
+
export { s as setNonce } from './index-DIoXjiux.js';
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
5
|
Stencil Client Patch Browser v4.38.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -16,6 +16,6 @@ var patchBrowser = () => {
|
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(async (options) => {
|
|
18
18
|
await globalScripts();
|
|
19
|
-
return bootstrapLazy([["af-
|
|
19
|
+
return bootstrapLazy([["af-heading_3",[[257,"af-heading",{"level":[1],"align":[1]}],[257,"af-nav-item",{"hierarchy":[1],"variant":[1],"href":[1],"active":[4]}],[257,"af-text",{"variant":[1],"align":[1],"as":[1]}]]],["af-aspect-ratio",[[257,"af-aspect-ratio",{"ratio":[1]}]]],["af-color-swatch",[[257,"af-color-swatch",{"color":[1],"name":[1],"size":[1]}]]],["af-container",[[257,"af-container",{"maxWidth":[1,"max-width"]}]]]], options);
|
|
20
20
|
});
|
|
21
21
|
//# sourceMappingURL=affinda.js.map
|
|
@@ -380,6 +380,13 @@ var h = (nodeName, vnodeData, ...children) => {
|
|
|
380
380
|
}
|
|
381
381
|
}
|
|
382
382
|
}
|
|
383
|
+
if (typeof nodeName === "function") {
|
|
384
|
+
return nodeName(
|
|
385
|
+
vnodeData === null ? {} : vnodeData,
|
|
386
|
+
vNodeChildren,
|
|
387
|
+
vdomFnUtils
|
|
388
|
+
);
|
|
389
|
+
}
|
|
383
390
|
const vnode = newVNode(nodeName, null);
|
|
384
391
|
vnode.$attrs$ = vnodeData;
|
|
385
392
|
if (vNodeChildren.length > 0) {
|
|
@@ -408,6 +415,36 @@ var newVNode = (tag, text) => {
|
|
|
408
415
|
};
|
|
409
416
|
var Host = {};
|
|
410
417
|
var isHost = (node) => node && node.$tag$ === Host;
|
|
418
|
+
var vdomFnUtils = {
|
|
419
|
+
forEach: (children, cb) => children.map(convertToPublic).forEach(cb),
|
|
420
|
+
map: (children, cb) => children.map(convertToPublic).map(cb).map(convertToPrivate)
|
|
421
|
+
};
|
|
422
|
+
var convertToPublic = (node) => ({
|
|
423
|
+
vattrs: node.$attrs$,
|
|
424
|
+
vchildren: node.$children$,
|
|
425
|
+
vkey: node.$key$,
|
|
426
|
+
vname: node.$name$,
|
|
427
|
+
vtag: node.$tag$,
|
|
428
|
+
vtext: node.$text$
|
|
429
|
+
});
|
|
430
|
+
var convertToPrivate = (node) => {
|
|
431
|
+
if (typeof node.vtag === "function") {
|
|
432
|
+
const vnodeData = { ...node.vattrs };
|
|
433
|
+
if (node.vkey) {
|
|
434
|
+
vnodeData.key = node.vkey;
|
|
435
|
+
}
|
|
436
|
+
if (node.vname) {
|
|
437
|
+
vnodeData.name = node.vname;
|
|
438
|
+
}
|
|
439
|
+
return h(node.vtag, vnodeData, ...node.vchildren || []);
|
|
440
|
+
}
|
|
441
|
+
const vnode = newVNode(node.vtag, node.vtext);
|
|
442
|
+
vnode.$attrs$ = node.vattrs;
|
|
443
|
+
vnode.$children$ = node.vchildren;
|
|
444
|
+
vnode.$key$ = node.vkey;
|
|
445
|
+
vnode.$name$ = node.vname;
|
|
446
|
+
return vnode;
|
|
447
|
+
};
|
|
411
448
|
var createSupportsRuleRe = (selector) => {
|
|
412
449
|
const safeSelector2 = escapeRegExpSpecialCharacters(selector);
|
|
413
450
|
return new RegExp(
|
|
@@ -434,25 +471,6 @@ var parsePropertyValue = (propValue, propType, isFormAssociated) => {
|
|
|
434
471
|
}
|
|
435
472
|
return propValue;
|
|
436
473
|
};
|
|
437
|
-
var getElement = (ref) => {
|
|
438
|
-
var _a;
|
|
439
|
-
return (_a = getHostRef(ref)) == null ? void 0 : _a.$hostElement$ ;
|
|
440
|
-
};
|
|
441
|
-
|
|
442
|
-
// src/runtime/event-emitter.ts
|
|
443
|
-
var createEvent = (ref, name, flags) => {
|
|
444
|
-
const elm = getElement(ref);
|
|
445
|
-
return {
|
|
446
|
-
emit: (detail) => {
|
|
447
|
-
return emitEvent(elm, name, {
|
|
448
|
-
bubbles: true,
|
|
449
|
-
composed: true,
|
|
450
|
-
cancelable: true,
|
|
451
|
-
detail
|
|
452
|
-
});
|
|
453
|
-
}
|
|
454
|
-
};
|
|
455
|
-
};
|
|
456
474
|
var emitEvent = (elm, name, opts) => {
|
|
457
475
|
const ev = plt.ce(name, opts);
|
|
458
476
|
elm.dispatchEvent(ev);
|
|
@@ -463,7 +481,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
463
481
|
return;
|
|
464
482
|
}
|
|
465
483
|
let isProp = isMemberInElement(elm, memberName);
|
|
466
|
-
|
|
484
|
+
memberName.toLowerCase();
|
|
467
485
|
if (memberName === "class") {
|
|
468
486
|
const classList = elm.classList;
|
|
469
487
|
const oldClasses = parseClassList(oldValue);
|
|
@@ -472,25 +490,28 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
472
490
|
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
473
491
|
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
474
492
|
}
|
|
475
|
-
} else if (memberName === "
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
|
|
486
|
-
if (oldValue) {
|
|
487
|
-
plt.rel(elm, memberName, oldValue, capture);
|
|
493
|
+
} else if (memberName === "style") {
|
|
494
|
+
{
|
|
495
|
+
for (const prop in oldValue) {
|
|
496
|
+
if (!newValue || newValue[prop] == null) {
|
|
497
|
+
if (prop.includes("-")) {
|
|
498
|
+
elm.style.removeProperty(prop);
|
|
499
|
+
} else {
|
|
500
|
+
elm.style[prop] = "";
|
|
501
|
+
}
|
|
502
|
+
}
|
|
488
503
|
}
|
|
489
|
-
|
|
490
|
-
|
|
504
|
+
}
|
|
505
|
+
for (const prop in newValue) {
|
|
506
|
+
if (!oldValue || newValue[prop] !== oldValue[prop]) {
|
|
507
|
+
if (prop.includes("-")) {
|
|
508
|
+
elm.style.setProperty(prop, newValue[prop]);
|
|
509
|
+
} else {
|
|
510
|
+
elm.style[prop] = newValue[prop];
|
|
511
|
+
}
|
|
491
512
|
}
|
|
492
513
|
}
|
|
493
|
-
} else {
|
|
514
|
+
} else if (memberName === "key") ; else {
|
|
494
515
|
const isComplex = isComplexType(newValue);
|
|
495
516
|
if ((isProp || isComplex && newValue !== null) && true) {
|
|
496
517
|
try {
|
|
@@ -535,8 +556,6 @@ var parseClassList = (value) => {
|
|
|
535
556
|
}
|
|
536
557
|
return value.split(parseClassListRegex);
|
|
537
558
|
};
|
|
538
|
-
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
539
|
-
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
540
559
|
|
|
541
560
|
// src/runtime/vdom/update-element.ts
|
|
542
561
|
var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
|
|
@@ -764,19 +783,10 @@ var insertBefore = (parent, newNode, reference) => {
|
|
|
764
783
|
};
|
|
765
784
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
766
785
|
const hostElm = hostRef.$hostElement$;
|
|
767
|
-
const cmpMeta = hostRef.$cmpMeta$;
|
|
768
786
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
769
787
|
const isHostElement = isHost(renderFnResults);
|
|
770
788
|
const rootVnode = isHostElement ? renderFnResults : h(null, null, renderFnResults);
|
|
771
789
|
hostTagName = hostElm.tagName;
|
|
772
|
-
if (cmpMeta.$attrsToReflect$) {
|
|
773
|
-
rootVnode.$attrs$ = rootVnode.$attrs$ || {};
|
|
774
|
-
cmpMeta.$attrsToReflect$.forEach(([propName, attribute]) => {
|
|
775
|
-
{
|
|
776
|
-
rootVnode.$attrs$[attribute] = hostElm[propName];
|
|
777
|
-
}
|
|
778
|
-
});
|
|
779
|
-
}
|
|
780
790
|
if (isInitialLoad && rootVnode.$attrs$) {
|
|
781
791
|
for (const key of Object.keys(rootVnode.$attrs$)) {
|
|
782
792
|
if (hostElm.hasAttribute(key) && !["key", "ref", "style", "class"].includes(key)) {
|
|
@@ -1113,12 +1123,8 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1113
1123
|
/* @__PURE__ */ new Set([
|
|
1114
1124
|
...Object.keys((_b = cmpMeta.$watchers$) != null ? _b : {}),
|
|
1115
1125
|
...members.filter(([_, m]) => m[0] & 31 /* HasAttribute */).map(([propName, m]) => {
|
|
1116
|
-
var _a2;
|
|
1117
1126
|
const attrName = m[1] || propName;
|
|
1118
1127
|
attrNameToPropName.set(attrName, propName);
|
|
1119
|
-
if (m[0] & 512 /* ReflectAttr */) {
|
|
1120
|
-
(_a2 = cmpMeta.$attrsToReflect$) == null ? void 0 : _a2.push([propName, attrName]);
|
|
1121
|
-
}
|
|
1122
1128
|
return attrName;
|
|
1123
1129
|
})
|
|
1124
1130
|
])
|
|
@@ -1294,9 +1300,6 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1294
1300
|
{
|
|
1295
1301
|
cmpMeta.$members$ = compactMeta[2];
|
|
1296
1302
|
}
|
|
1297
|
-
{
|
|
1298
|
-
cmpMeta.$attrsToReflect$ = [];
|
|
1299
|
-
}
|
|
1300
1303
|
const tagName = cmpMeta.$tagName$;
|
|
1301
1304
|
const HostElement = class extends HTMLElement {
|
|
1302
1305
|
// StencilLazyHost
|
|
@@ -1399,7 +1402,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1399
1402
|
// src/runtime/nonce.ts
|
|
1400
1403
|
var setNonce = (nonce) => plt.$nonce$ = nonce;
|
|
1401
1404
|
|
|
1402
|
-
export {
|
|
1403
|
-
//# sourceMappingURL=index-
|
|
1405
|
+
export { Host as H, bootstrapLazy as b, globalScripts as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
|
|
1406
|
+
//# sourceMappingURL=index-DIoXjiux.js.map
|
|
1404
1407
|
|
|
1405
|
-
//# sourceMappingURL=index-
|
|
1408
|
+
//# sourceMappingURL=index-DIoXjiux.js.map
|