@affinda/wc 0.0.1
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-badge.af-button.af-card.af-icon-button.af-input.entry.esm.js.map +1 -0
- package/dist/affinda/affinda.css +1 -0
- package/dist/affinda/affinda.esm.js +2 -0
- package/dist/affinda/affinda.esm.js.map +1 -0
- package/dist/affinda/index.esm.js +2 -0
- package/dist/affinda/index.esm.js.map +1 -0
- package/dist/affinda/loader.esm.js.map +1 -0
- package/dist/affinda/p-bca10492.entry.js +2 -0
- package/dist/affinda/p-bca10492.entry.js.map +1 -0
- package/dist/affinda/p-o0tfWqnY.js +3 -0
- package/dist/affinda/p-o0tfWqnY.js.map +1 -0
- package/dist/cjs/af-badge.af-button.af-card.af-icon-button.af-input.entry.cjs.js.map +1 -0
- package/dist/cjs/af-badge_5.cjs.entry.js +13 -0
- package/dist/cjs/affinda.cjs.js +25 -0
- package/dist/cjs/affinda.cjs.js.map +1 -0
- package/dist/cjs/index-5BGpYleS.js +1413 -0
- package/dist/cjs/index-5BGpYleS.js.map +1 -0
- package/dist/cjs/index.cjs.js +139 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/loader.cjs.js +13 -0
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/collection/collection-manifest.json +16 -0
- package/dist/collection/components/af-badge/af-badge.css +29 -0
- package/dist/collection/components/af-badge/af-badge.js +47 -0
- package/dist/collection/components/af-badge/af-badge.js.map +1 -0
- package/dist/collection/components/af-button/af-button.css +74 -0
- package/dist/collection/components/af-button/af-button.js +149 -0
- package/dist/collection/components/af-button/af-button.js.map +1 -0
- package/dist/collection/components/af-card/af-card.css +69 -0
- package/dist/collection/components/af-card/af-card.js +70 -0
- package/dist/collection/components/af-card/af-card.js.map +1 -0
- package/dist/collection/components/af-icon-button/af-icon-button.css +70 -0
- package/dist/collection/components/af-icon-button/af-icon-button.js +145 -0
- package/dist/collection/components/af-icon-button/af-icon-button.js.map +1 -0
- package/dist/collection/components/af-input/af-input.css +57 -0
- package/dist/collection/components/af-input/af-input.js +193 -0
- package/dist/collection/components/af-input/af-input.js.map +1 -0
- package/dist/collection/components.js +6 -0
- package/dist/collection/components.js.map +1 -0
- package/dist/collection/index.js +2 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/components/af-badge.d.ts +11 -0
- package/dist/components/af-badge.js +9 -0
- package/dist/components/af-badge.js.map +1 -0
- package/dist/components/af-button.d.ts +11 -0
- package/dist/components/af-button.js +9 -0
- package/dist/components/af-button.js.map +1 -0
- package/dist/components/af-card.d.ts +11 -0
- package/dist/components/af-card.js +9 -0
- package/dist/components/af-card.js.map +1 -0
- package/dist/components/af-icon-button.d.ts +11 -0
- package/dist/components/af-icon-button.js +9 -0
- package/dist/components/af-icon-button.js.map +1 -0
- package/dist/components/af-input.d.ts +11 -0
- package/dist/components/af-input.js +9 -0
- package/dist/components/af-input.js.map +1 -0
- package/dist/components/index.d.ts +33 -0
- package/dist/components/index.js +9 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/p-B7I93sz2.js +39 -0
- package/dist/components/p-B7I93sz2.js.map +1 -0
- package/dist/components/p-CZd1ieht.js +62 -0
- package/dist/components/p-CZd1ieht.js.map +1 -0
- package/dist/components/p-D6PwARU0.js +59 -0
- package/dist/components/p-D6PwARU0.js.map +1 -0
- package/dist/components/p-DOtgsZRB.js +1209 -0
- package/dist/components/p-DOtgsZRB.js.map +1 -0
- package/dist/components/p-DZIXhvI0.js +44 -0
- package/dist/components/p-DZIXhvI0.js.map +1 -0
- package/dist/components/p-zIKPa48S.js +62 -0
- package/dist/components/p-zIKPa48S.js.map +1 -0
- package/dist/esm/af-badge.af-button.af-card.af-icon-button.af-input.entry.js.map +1 -0
- package/dist/esm/af-badge_5.entry.js +3 -0
- package/dist/esm/affinda.js +21 -0
- package/dist/esm/affinda.js.map +1 -0
- package/dist/esm/index-o0tfWqnY.js +1405 -0
- package/dist/esm/index-o0tfWqnY.js.map +1 -0
- package/dist/esm/index.js +133 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/loader.js +11 -0
- package/dist/esm/loader.js.map +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/types/components/af-badge/af-badge.d.ts +5 -0
- package/dist/types/components/af-button/af-button.d.ts +15 -0
- package/dist/types/components/af-card/af-card.d.ts +7 -0
- package/dist/types/components/af-icon-button/af-icon-button.d.ts +15 -0
- package/dist/types/components/af-input/af-input.d.ts +24 -0
- package/dist/types/components.d.ts +311 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +1756 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/package.json +27 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface AfIconButton extends Components.AfIconButton, HTMLElement {}
|
|
4
|
+
export const AfIconButton: {
|
|
5
|
+
prototype: AfIconButton;
|
|
6
|
+
new (): AfIconButton;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { A as AfIconButton$1, d as defineCustomElement$1 } from './p-D6PwARU0.js';
|
|
2
|
+
|
|
3
|
+
const AfIconButton = AfIconButton$1;
|
|
4
|
+
const defineCustomElement = defineCustomElement$1;
|
|
5
|
+
|
|
6
|
+
export { AfIconButton, defineCustomElement };
|
|
7
|
+
//# sourceMappingURL=af-icon-button.js.map
|
|
8
|
+
|
|
9
|
+
//# sourceMappingURL=af-icon-button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"af-icon-button.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface AfInput extends Components.AfInput, HTMLElement {}
|
|
4
|
+
export const AfInput: {
|
|
5
|
+
prototype: AfInput;
|
|
6
|
+
new (): AfInput;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { A as AfInput$1, d as defineCustomElement$1 } from './p-CZd1ieht.js';
|
|
2
|
+
|
|
3
|
+
const AfInput = AfInput$1;
|
|
4
|
+
const defineCustomElement = defineCustomElement$1;
|
|
5
|
+
|
|
6
|
+
export { AfInput, defineCustomElement };
|
|
7
|
+
//# sourceMappingURL=af-input.js.map
|
|
8
|
+
|
|
9
|
+
//# sourceMappingURL=af-input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"af-input.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get the base path to where the assets can be found. Use "setAssetPath(path)"
|
|
3
|
+
* if the path needs to be customized.
|
|
4
|
+
*/
|
|
5
|
+
export declare const getAssetPath: (path: string) => string;
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Used to manually set the base path where assets can be found.
|
|
9
|
+
* If the script is used as "module", it's recommended to use "import.meta.url",
|
|
10
|
+
* such as "setAssetPath(import.meta.url)". Other options include
|
|
11
|
+
* "setAssetPath(document.currentScript.src)", or using a bundler's replace plugin to
|
|
12
|
+
* dynamically set the path at build time, such as "setAssetPath(process.env.ASSET_PATH)".
|
|
13
|
+
* But do note that this configuration depends on how your script is bundled, or lack of
|
|
14
|
+
* bundling, and where your assets can be loaded from. Additionally custom bundling
|
|
15
|
+
* will have to ensure the static assets are copied to its build directory.
|
|
16
|
+
*/
|
|
17
|
+
export declare const setAssetPath: (path: string) => void;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Used to specify a nonce value that corresponds with an application's CSP.
|
|
21
|
+
* When set, the nonce will be added to all dynamically created script and style tags at runtime.
|
|
22
|
+
* Alternatively, the nonce value can be set on a meta tag in the DOM head
|
|
23
|
+
* (<meta name="csp-nonce" content="{ nonce value here }" />) which
|
|
24
|
+
* will result in the same behavior.
|
|
25
|
+
*/
|
|
26
|
+
export declare const setNonce: (nonce: string) => void
|
|
27
|
+
|
|
28
|
+
export interface SetPlatformOptions {
|
|
29
|
+
raf?: (c: FrameRequestCallback) => number;
|
|
30
|
+
ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
31
|
+
rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
32
|
+
}
|
|
33
|
+
export declare const setPlatformOptions: (opts: SetPlatformOptions) => void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { g as getAssetPath, r as render, s as setAssetPath, a as setNonce, b as setPlatformOptions } from './p-DOtgsZRB.js';
|
|
2
|
+
export { A as AfButton } from './p-zIKPa48S.js';
|
|
3
|
+
export { A as AfBadge } from './p-B7I93sz2.js';
|
|
4
|
+
export { A as AfIconButton } from './p-D6PwARU0.js';
|
|
5
|
+
export { A as AfCard } from './p-DZIXhvI0.js';
|
|
6
|
+
export { A as AfInput } from './p-CZd1ieht.js';
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
8
|
+
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"index.js","mappings":";;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { p as proxyCustomElement, H, h } from './p-DOtgsZRB.js';
|
|
2
|
+
|
|
3
|
+
const afBadgeCss = ":host{display:inline-block}span{display:inline-flex;align-items:center;justify-content:center;padding:2px var(--af-space-2);border-radius:var(--af-radius-pill);font:var(--af-font-weight-semibold) var(--af-size-font-sm) / 1 var(--af-font-family-sans);letter-spacing:0.02em;text-transform:uppercase}span.tone-brand{background:rgba(124, 58, 237, 0.12);color:var(--af-color-brand-primary-500)}span.tone-neutral{background:rgba(18, 15, 31, 0.1);color:var(--af-color-fg-default)}span.tone-success{background:rgba(16, 185, 129, 0.12);color:#0f766e}";
|
|
4
|
+
|
|
5
|
+
const AfBadge = /*@__PURE__*/ proxyCustomElement(class AfBadge extends H {
|
|
6
|
+
constructor(registerHost) {
|
|
7
|
+
super();
|
|
8
|
+
if (registerHost !== false) {
|
|
9
|
+
this.__registerHost();
|
|
10
|
+
}
|
|
11
|
+
this.__attachShadow();
|
|
12
|
+
/** Color theme of the badge */
|
|
13
|
+
this.tone = 'brand';
|
|
14
|
+
}
|
|
15
|
+
render() {
|
|
16
|
+
return (h("span", { key: '1f9d4015b429e012eade75e331c991d5c785482d', class: `tone-${this.tone}`, part: "base" }, h("slot", { key: 'b69b37a3e996c43cb16d04d829232d9539f45e06' })));
|
|
17
|
+
}
|
|
18
|
+
static get style() { return afBadgeCss; }
|
|
19
|
+
}, [257, "af-badge", {
|
|
20
|
+
"tone": [1]
|
|
21
|
+
}]);
|
|
22
|
+
function defineCustomElement() {
|
|
23
|
+
if (typeof customElements === "undefined") {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
const components = ["af-badge"];
|
|
27
|
+
components.forEach(tagName => { switch (tagName) {
|
|
28
|
+
case "af-badge":
|
|
29
|
+
if (!customElements.get(tagName)) {
|
|
30
|
+
customElements.define(tagName, AfBadge);
|
|
31
|
+
}
|
|
32
|
+
break;
|
|
33
|
+
} });
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export { AfBadge as A, defineCustomElement as d };
|
|
37
|
+
//# sourceMappingURL=p-B7I93sz2.js.map
|
|
38
|
+
|
|
39
|
+
//# sourceMappingURL=p-B7I93sz2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"p-B7I93sz2.js","mappings":";;AAAA,MAAM,UAAU,GAAG,+hBAA+hB;;MCOriB,OAAO,iBAAAA,kBAAA,CAAA,MAAA,OAAA,SAAAC,CAAA,CAAA;AALpB,IAAA,WAAA,CAAA,YAAA,EAAA;;;;;;;AAOU,QAAA,IAAI,CAAA,IAAA,GAAoC,OAAO;AASxD;IAPC,MAAM,GAAA;AACJ,QAAA,QACE,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,KAAK,EAAE,CAAQ,KAAA,EAAA,IAAI,CAAC,IAAI,CAAA,CAAE,EAAE,IAAI,EAAC,MAAM,EAAA,EAC3C,CAAQ,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACH;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/af-badge/af-badge.css?tag=af-badge&encapsulation=shadow","src/components/af-badge/af-badge.tsx"],"sourcesContent":[":host {\n display: inline-block;\n}\n\nspan {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n padding: 2px var(--af-space-2);\n border-radius: var(--af-radius-pill);\n font: var(--af-font-weight-semibold) var(--af-size-font-sm) / 1 var(--af-font-family-sans);\n letter-spacing: 0.02em;\n text-transform: uppercase;\n}\n\nspan.tone-brand {\n background: rgba(124, 58, 237, 0.12);\n color: var(--af-color-brand-primary-500);\n}\n\nspan.tone-neutral {\n background: rgba(18, 15, 31, 0.1);\n color: var(--af-color-fg-default);\n}\n\nspan.tone-success {\n background: rgba(16, 185, 129, 0.12);\n color: #0f766e;\n}\n","import { Component, h, Prop } from '@stencil/core';\n\n@Component({\n tag: 'af-badge',\n styleUrl: 'af-badge.css',\n shadow: true\n})\nexport class AfBadge {\n /** Color theme of the badge */\n @Prop() tone: 'brand' | 'neutral' | 'success' = 'brand';\n\n render() {\n return (\n <span class={`tone-${this.tone}`} part=\"base\">\n <slot />\n </span>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { p as proxyCustomElement, H, c as createEvent, h } from './p-DOtgsZRB.js';
|
|
2
|
+
|
|
3
|
+
const afInputCss = ":host{display:block;font-family:var(--af-font-family-sans)}label{display:grid;gap:var(--af-space-2);color:var(--af-color-fg-default)}.label{font-size:0.95rem;font-weight:var(--af-font-weight-semibold)}.control{position:relative}input{width:100%;padding:calc(var(--af-space-2) + 2px) calc(var(--af-space-4) + 8px);border-radius:var(--af-radius-md);border:1px solid rgba(18, 15, 31, 0.18);background:rgba(255, 255, 255, 0.9);color:inherit;font:inherit;transition:border-color 160ms ease, box-shadow 160ms ease;box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.6)}input::placeholder{color:var(--af-color-fg-muted);opacity:0.8}input:focus-visible{outline:none;border-color:var(--af-color-brand-primary-500);box-shadow:0 0 0 4px rgba(124, 58, 237, 0.18)}label.disabled{opacity:0.55;cursor:not-allowed}input:disabled{background:rgba(241, 240, 247, 0.7);cursor:not-allowed}.description{font-size:0.825rem;color:var(--af-color-fg-muted)}";
|
|
4
|
+
|
|
5
|
+
let inputIds = 0;
|
|
6
|
+
const AfInput = /*@__PURE__*/ proxyCustomElement(class AfInput extends H {
|
|
7
|
+
constructor(registerHost) {
|
|
8
|
+
super();
|
|
9
|
+
if (registerHost !== false) {
|
|
10
|
+
this.__registerHost();
|
|
11
|
+
}
|
|
12
|
+
this.__attachShadow();
|
|
13
|
+
this.afInput = createEvent(this, "afInput");
|
|
14
|
+
this.afChange = createEvent(this, "afChange");
|
|
15
|
+
this.inputId = `af-input-${++inputIds}`;
|
|
16
|
+
this.descriptionId = `${this.inputId}-desc`;
|
|
17
|
+
/** Input type attribute */
|
|
18
|
+
this.type = 'text';
|
|
19
|
+
/** Current value (mutable so the component stays in sync) */
|
|
20
|
+
this.value = '';
|
|
21
|
+
/** Disabled state */
|
|
22
|
+
this.disabled = false;
|
|
23
|
+
this.handleInput = (event) => {
|
|
24
|
+
const target = event.target;
|
|
25
|
+
this.value = target.value;
|
|
26
|
+
this.afInput.emit(this.value);
|
|
27
|
+
};
|
|
28
|
+
this.handleChange = () => {
|
|
29
|
+
this.afChange.emit(this.value);
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
render() {
|
|
33
|
+
const describedBy = this.description ? this.descriptionId : undefined;
|
|
34
|
+
return (h("label", { key: 'd14267dee125c07311c07bc31f0151448095dba6', part: "label", class: { disabled: this.disabled }, htmlFor: this.inputId }, this.label ? (h("span", { class: "label", part: "label-text" }, this.label)) : null, h("div", { key: 'd3b6428100e25c981650f5faa23df549d587ac10', class: "control" }, h("input", { key: '9e26981c32775b79ce9c3458a4890968fab04ef6', part: "field", id: this.inputId, type: this.type, placeholder: this.placeholder, value: this.value, disabled: this.disabled, "aria-describedby": describedBy, onInput: this.handleInput, onChange: this.handleChange })), this.description ? (h("p", { id: this.descriptionId, class: "description", part: "description" }, this.description)) : null));
|
|
35
|
+
}
|
|
36
|
+
static get style() { return afInputCss; }
|
|
37
|
+
}, [257, "af-input", {
|
|
38
|
+
"label": [1],
|
|
39
|
+
"description": [1],
|
|
40
|
+
"type": [1],
|
|
41
|
+
"placeholder": [1],
|
|
42
|
+
"value": [1025],
|
|
43
|
+
"disabled": [516]
|
|
44
|
+
}]);
|
|
45
|
+
function defineCustomElement() {
|
|
46
|
+
if (typeof customElements === "undefined") {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
const components = ["af-input"];
|
|
50
|
+
components.forEach(tagName => { switch (tagName) {
|
|
51
|
+
case "af-input":
|
|
52
|
+
if (!customElements.get(tagName)) {
|
|
53
|
+
customElements.define(tagName, AfInput);
|
|
54
|
+
}
|
|
55
|
+
break;
|
|
56
|
+
} });
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export { AfInput as A, defineCustomElement as d };
|
|
60
|
+
//# sourceMappingURL=p-C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,MAAA,EAAA,EAAM,KAAK,EAAC,OAAO,EAAC,IAAI,EAAC,YAAY,EAClC,EAAA,IAAI,CAAC,KAAK,CACN,IACL,IAAI,EACR,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,SAAS,EAAA,EAClB,CACE,CAAA,OAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,OAAO,EACZ,EAAE,EAAE,IAAI,CAAC,OAAO,EAChB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACL,kBAAA,EAAA,WAAW,EAC7B,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,QAAQ,EAAE,IAAI,CAAC,YAAY,EAAA,CAC3B,CACE,EACL,IAAI,CAAC,WAAW,IACf,CAAA,CAAA,GAAA,EAAA,EAAG,EAAE,EAAE,IAAI,CAAC,aAAa,EAAE,KAAK,EAAC,aAAa,EAAC,IAAI,EAAC,aAAa,EAC9D,EAAA,IAAI,CAAC,WAAW,CACf,IACF,IAAI,CACF;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/af-input/af-input.css?tag=af-input&encapsulation=shadow","src/components/af-input/af-input.tsx"],"sourcesContent":[":host {\n display: block;\n font-family: var(--af-font-family-sans);\n}\n\nlabel {\n display: grid;\n gap: var(--af-space-2);\n color: var(--af-color-fg-default);\n}\n\n.label {\n font-size: 0.95rem;\n font-weight: var(--af-font-weight-semibold);\n}\n\n.control {\n position: relative;\n}\n\ninput {\n width: 100%;\n padding: calc(var(--af-space-2) + 2px) calc(var(--af-space-4) + 8px);\n border-radius: var(--af-radius-md);\n border: 1px solid rgba(18, 15, 31, 0.18);\n background: rgba(255, 255, 255, 0.9);\n color: inherit;\n font: inherit;\n transition: border-color 160ms ease, box-shadow 160ms ease;\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);\n}\n\ninput::placeholder {\n color: var(--af-color-fg-muted);\n opacity: 0.8;\n}\n\ninput:focus-visible {\n outline: none;\n border-color: var(--af-color-brand-primary-500);\n box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.18);\n}\n\nlabel.disabled {\n opacity: 0.55;\n cursor: not-allowed;\n}\n\ninput:disabled {\n background: rgba(241, 240, 247, 0.7);\n cursor: not-allowed;\n}\n\n.description {\n font-size: 0.825rem;\n color: var(--af-color-fg-muted);\n}\n","import { Component, Event, EventEmitter, h, Prop } from '@stencil/core';\n\nlet inputIds = 0;\n\n@Component({\n tag: 'af-input',\n styleUrl: 'af-input.css',\n shadow: true\n})\nexport class AfInput {\n private inputId = `af-input-${++inputIds}`;\n private descriptionId = `${this.inputId}-desc`;\n\n /** Optional label text */\n @Prop() label?: string;\n\n /** Assistive description shown below the field */\n @Prop() description?: string;\n\n /** Input type attribute */\n @Prop() type: 'text' | 'email' | 'password' | 'search' = 'text';\n\n /** Placeholder text */\n @Prop() placeholder?: string;\n\n /** Current value (mutable so the component stays in sync) */\n @Prop({ mutable: true }) value = '';\n\n /** Disabled state */\n @Prop({ reflect: true }) disabled = false;\n\n /** Fired as the user types */\n @Event() afInput!: EventEmitter<string>;\n\n /** Fired when the field loses focus after a change */\n @Event() afChange!: EventEmitter<string>;\n\n private handleInput = (event: Event) => {\n const target = event.target as HTMLInputElement;\n this.value = target.value;\n this.afInput.emit(this.value);\n };\n\n private handleChange = () => {\n this.afChange.emit(this.value);\n };\n\n render() {\n const describedBy = this.description ? this.descriptionId : undefined;\n\n return (\n <label part=\"label\" class={{ disabled: this.disabled }} htmlFor={this.inputId}>\n {this.label ? (\n <span class=\"label\" part=\"label-text\">\n {this.label}\n </span>\n ) : null}\n <div class=\"control\">\n <input\n part=\"field\"\n id={this.inputId}\n type={this.type}\n placeholder={this.placeholder}\n value={this.value}\n disabled={this.disabled}\n aria-describedby={describedBy}\n onInput={this.handleInput}\n onChange={this.handleChange}\n />\n </div>\n {this.description ? (\n <p id={this.descriptionId} class=\"description\" part=\"description\">\n {this.description}\n </p>\n ) : null}\n </label>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { p as proxyCustomElement, H, c as createEvent, h } from './p-DOtgsZRB.js';
|
|
2
|
+
|
|
3
|
+
const afIconButtonCss = ":host{display:inline-flex}button{--button-size-sm:36px;--button-size-md:44px;width:var(--button-size-md);height:var(--button-size-md);border-radius:50%;border:none;display:inline-flex;align-items:center;justify-content:center;background:transparent;color:var(--af-color-brand-primary-500);cursor:pointer;transition:transform 120ms ease, box-shadow 160ms ease, background-color 160ms ease;box-shadow:none}button.size-sm{width:var(--button-size-sm);height:var(--button-size-sm)}button:disabled{cursor:not-allowed;opacity:0.5;box-shadow:none}button.variant-solid{background:linear-gradient(135deg, var(--af-color-brand-primary-500), var(--af-color-brand-primary-600));color:var(--af-color-fg-inverse);box-shadow:0 10px 24px rgba(124, 58, 237, 0.24)}button.variant-soft{background:rgba(124, 58, 237, 0.14);color:var(--af-color-brand-primary-500)}button.variant-ghost{border:1px solid rgba(124, 58, 237, 0.4);background:transparent}button:is(:hover,:focus-visible){transform:translateY(-1px);box-shadow:0 14px 30px rgba(124, 58, 237, 0.28)}button:active{transform:translateY(0);box-shadow:0 8px 18px rgba(124, 58, 237, 0.2)}.icon{display:inline-flex;align-items:center;justify-content:center;width:1.5em;height:1.5em}:host([disabled]) button{transform:none;box-shadow:none}";
|
|
4
|
+
|
|
5
|
+
const AfIconButton = /*@__PURE__*/ proxyCustomElement(class AfIconButton extends H {
|
|
6
|
+
constructor(registerHost) {
|
|
7
|
+
super();
|
|
8
|
+
if (registerHost !== false) {
|
|
9
|
+
this.__registerHost();
|
|
10
|
+
}
|
|
11
|
+
this.__attachShadow();
|
|
12
|
+
this.afClick = createEvent(this, "afClick");
|
|
13
|
+
/** Visual style of the icon button */
|
|
14
|
+
this.variant = 'solid';
|
|
15
|
+
/** Size preset */
|
|
16
|
+
this.size = 'md';
|
|
17
|
+
/** Disabled state */
|
|
18
|
+
this.disabled = false;
|
|
19
|
+
this.onClick = (event) => {
|
|
20
|
+
if (this.disabled) {
|
|
21
|
+
event.preventDefault();
|
|
22
|
+
event.stopPropagation();
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
this.afClick.emit(event);
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
render() {
|
|
29
|
+
const classes = {
|
|
30
|
+
[`variant-${this.variant}`]: true,
|
|
31
|
+
[`size-${this.size}`]: true
|
|
32
|
+
};
|
|
33
|
+
return (h("button", { key: '0f63eddac5f4dab95835506b896e437218aa50e1', type: "button", class: classes, part: "base", disabled: this.disabled, "aria-label": this.label, onClick: this.onClick }, h("span", { key: '6400064df3b666cbcc0a4a51523f1cd08dcbe81a', part: "icon", class: "icon" }, h("slot", { key: 'a74fff21c0a3af05da37b12e45db8ca8913bbdea' }))));
|
|
34
|
+
}
|
|
35
|
+
static get style() { return afIconButtonCss; }
|
|
36
|
+
}, [257, "af-icon-button", {
|
|
37
|
+
"variant": [1],
|
|
38
|
+
"size": [1],
|
|
39
|
+
"label": [1],
|
|
40
|
+
"disabled": [516]
|
|
41
|
+
}]);
|
|
42
|
+
function defineCustomElement() {
|
|
43
|
+
if (typeof customElements === "undefined") {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
const components = ["af-icon-button"];
|
|
47
|
+
components.forEach(tagName => { switch (tagName) {
|
|
48
|
+
case "af-icon-button":
|
|
49
|
+
if (!customElements.get(tagName)) {
|
|
50
|
+
customElements.define(tagName, AfIconButton);
|
|
51
|
+
}
|
|
52
|
+
break;
|
|
53
|
+
} });
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export { AfIconButton as A, defineCustomElement as d };
|
|
57
|
+
//# sourceMappingURL=p-D6PwARU0.js.map
|
|
58
|
+
|
|
59
|
+
//# sourceMapp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ACA;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/af-icon-button/af-icon-button.css?tag=af-icon-button&encapsulation=shadow","src/components/af-icon-button/af-icon-button.tsx"],"sourcesContent":[":host {\n display: inline-flex;\n}\n\nbutton {\n --button-size-sm: 36px;\n --button-size-md: 44px;\n width: var(--button-size-md);\n height: var(--button-size-md);\n border-radius: 50%;\n border: none;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n background: transparent;\n color: var(--af-color-brand-primary-500);\n cursor: pointer;\n transition: transform 120ms ease, box-shadow 160ms ease, background-color 160ms ease;\n box-shadow: none;\n}\n\nbutton.size-sm {\n width: var(--button-size-sm);\n height: var(--button-size-sm);\n}\n\nbutton:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n box-shadow: none;\n}\n\nbutton.variant-solid {\n background: linear-gradient(135deg, var(--af-color-brand-primary-500), var(--af-color-brand-primary-600));\n color: var(--af-color-fg-inverse);\n box-shadow: 0 10px 24px rgba(124, 58, 237, 0.24);\n}\n\nbutton.variant-soft {\n background: rgba(124, 58, 237, 0.14);\n color: var(--af-color-brand-primary-500);\n}\n\nbutton.variant-ghost {\n border: 1px solid rgba(124, 58, 237, 0.4);\n background: transparent;\n}\n\nbutton:is(:hover, :focus-visible) {\n transform: translateY(-1px);\n box-shadow: 0 14px 30px rgba(124, 58, 237, 0.28);\n}\n\nbutton:active {\n transform: translateY(0);\n box-shadow: 0 8px 18px rgba(124, 58, 237, 0.2);\n}\n\n.icon {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 1.5em;\n height: 1.5em;\n}\n\n:host([disabled]) button {\n transform: none;\n box-shadow: none;\n}\n","import { Component, Event, EventEmitter, h, Prop } from '@stencil/core';\n\n@Component({\n tag: 'af-icon-button',\n styleUrl: 'af-icon-button.css',\n shadow: true\n})\nexport class AfIconButton {\n /** Visual style of the icon button */\n @Prop() variant: 'solid' | 'soft' | 'ghost' = 'solid';\n\n /** Size preset */\n @Prop() size: 'sm' | 'md' = 'md';\n\n /** Accessible label text */\n @Prop() label?: string;\n\n /** Disabled state */\n @Prop({ reflect: true }) disabled = false;\n\n /** Raised when the button is activated */\n @Event() afClick!: EventEmitter<MouseEvent>;\n\n private onClick = (event: MouseEvent) => {\n if (this.disabled) {\n event.preventDefault();\n event.stopPropagation();\n return;\n }\n\n this.afClick.emit(event);\n };\n\n render() {\n const classes = {\n [`variant-${this.variant}`]: true,\n [`size-${this.size}`]: true\n };\n\n return (\n <button\n type=\"button\"\n class={classes}\n part=\"base\"\n disabled={this.disabled}\n aria-label={this.label}\n onClick={this.onClick}\n >\n <span part=\"icon\" class=\"icon\">\n <slot />\n </span>\n </button>\n );\n }\n}\n"],"version":3}
|