beightone-ui-components 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/LICENSE +21 -0
- package/dist/beightone-ui-components/b8-button.entry.js +59 -0
- package/dist/beightone-ui-components/b8-button.entry.js.map +1 -0
- package/dist/beightone-ui-components/beightone-ui-components.css +112 -0
- package/dist/beightone-ui-components/beightone-ui-components.esm.js +50 -0
- package/dist/beightone-ui-components/beightone-ui-components.esm.js.map +1 -0
- package/dist/beightone-ui-components/index-B9cmM_jf.js +4576 -0
- package/dist/beightone-ui-components/index-B9cmM_jf.js.map +1 -0
- package/dist/beightone-ui-components/index.esm.js +18 -0
- package/dist/beightone-ui-components/index.esm.js.map +1 -0
- package/dist/components/b8-button.d.ts +11 -0
- package/dist/components/index.d.ts +35 -0
- package/dist/types/components/b8-button/b8-button.d.ts +12 -0
- package/dist/types/components.d.ts +102 -0
- package/dist/types/index.d.ts +11 -0
- package/dist/types/stencil-public-runtime.d.ts +1858 -0
- package/dist/types/utils/utils.d.ts +1 -0
- package/package.json +50 -0
- package/readme.md +111 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
function format(first, middle, last) {
|
|
2
|
+
return (first || '') + (middle ? ` ${middle}` : '') + (last ? ` ${last}` : '');
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @fileoverview entry point for your component library
|
|
7
|
+
*
|
|
8
|
+
* This is the entry point for your component library. Use this file to export utilities,
|
|
9
|
+
* constants or data structure that accompany your components.
|
|
10
|
+
*
|
|
11
|
+
* DO NOT use this file to export your components. Instead, use the recommended approaches
|
|
12
|
+
* to consume components of this package as outlined in the `README.md`.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
export { format };
|
|
16
|
+
//# sourceMappingURL=index.esm.js.map
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=index.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["src/utils/utils.ts","src/index.ts"],"sourcesContent":["export function format(first?: string, middle?: string, last?: string): string {\n return (first || '') + (middle ? ` ${middle}` : '') + (last ? ` ${last}` : '');\n}\n","/**\n * @fileoverview entry point for your component library\n *\n * This is the entry point for your component library. Use this file to export utilities,\n * constants or data structure that accompany your components.\n *\n * DO NOT use this file to export your components. Instead, use the recommended approaches\n * to consume components of this package as outlined in the `README.md`.\n */\n\nexport { format } from './utils/utils';\nexport type * from './components.d.ts';\n"],"names":[],"mappings":"SAAgB,MAAM,CAAC,KAAc,EAAE,MAAe,EAAE,IAAa,EAAA;AACnE,IAAA,OAAO,CAAC,KAAK,IAAI,EAAE,KAAK,MAAM,GAAG,CAAI,CAAA,EAAA,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,IAAI,GAAG,CAAI,CAAA,EAAA,IAAI,EAAE,GAAG,EAAE,CAAC;AAChF;;ACFA;;;;;;;;AAQG;;;;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface B8Button extends Components.B8Button, HTMLElement {}
|
|
4
|
+
export const B8Button: {
|
|
5
|
+
prototype: B8Button;
|
|
6
|
+
new (): B8Button;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,35 @@
|
|
|
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;
|
|
34
|
+
|
|
35
|
+
export * from '../types';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
export declare class B8Button {
|
|
3
|
+
variant: string;
|
|
4
|
+
size: string;
|
|
5
|
+
isLoading: boolean;
|
|
6
|
+
loadingText: string;
|
|
7
|
+
isDisabled: boolean;
|
|
8
|
+
b8Click: EventEmitter<MouseEvent>;
|
|
9
|
+
private handleClick;
|
|
10
|
+
private getSpinnerColors;
|
|
11
|
+
render(): any;
|
|
12
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/**
|
|
4
|
+
* This is an autogenerated file created by the Stencil compiler.
|
|
5
|
+
* It contains typing information for all components that exist in this project.
|
|
6
|
+
*/
|
|
7
|
+
import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
|
8
|
+
export namespace Components {
|
|
9
|
+
interface B8Button {
|
|
10
|
+
/**
|
|
11
|
+
* @default false
|
|
12
|
+
*/
|
|
13
|
+
"isDisabled": boolean;
|
|
14
|
+
/**
|
|
15
|
+
* @default false
|
|
16
|
+
*/
|
|
17
|
+
"isLoading": boolean;
|
|
18
|
+
/**
|
|
19
|
+
* @default 'Aguarde...'
|
|
20
|
+
*/
|
|
21
|
+
"loadingText": string;
|
|
22
|
+
/**
|
|
23
|
+
* @default 'md'
|
|
24
|
+
*/
|
|
25
|
+
"size": string;
|
|
26
|
+
/**
|
|
27
|
+
* @default 'primary'
|
|
28
|
+
*/
|
|
29
|
+
"variant": string;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
export interface B8ButtonCustomEvent<T> extends CustomEvent<T> {
|
|
33
|
+
detail: T;
|
|
34
|
+
target: HTMLB8ButtonElement;
|
|
35
|
+
}
|
|
36
|
+
declare global {
|
|
37
|
+
interface HTMLB8ButtonElementEventMap {
|
|
38
|
+
"b8Click": MouseEvent;
|
|
39
|
+
}
|
|
40
|
+
interface HTMLB8ButtonElement extends Components.B8Button, HTMLStencilElement {
|
|
41
|
+
addEventListener<K extends keyof HTMLB8ButtonElementEventMap>(type: K, listener: (this: HTMLB8ButtonElement, ev: B8ButtonCustomEvent<HTMLB8ButtonElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
42
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
43
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
44
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
45
|
+
removeEventListener<K extends keyof HTMLB8ButtonElementEventMap>(type: K, listener: (this: HTMLB8ButtonElement, ev: B8ButtonCustomEvent<HTMLB8ButtonElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
46
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
47
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
48
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
49
|
+
}
|
|
50
|
+
var HTMLB8ButtonElement: {
|
|
51
|
+
prototype: HTMLB8ButtonElement;
|
|
52
|
+
new (): HTMLB8ButtonElement;
|
|
53
|
+
};
|
|
54
|
+
interface HTMLElementTagNameMap {
|
|
55
|
+
"b8-button": HTMLB8ButtonElement;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
declare namespace LocalJSX {
|
|
59
|
+
interface B8Button {
|
|
60
|
+
/**
|
|
61
|
+
* @default false
|
|
62
|
+
*/
|
|
63
|
+
"isDisabled"?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* @default false
|
|
66
|
+
*/
|
|
67
|
+
"isLoading"?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* @default 'Aguarde...'
|
|
70
|
+
*/
|
|
71
|
+
"loadingText"?: string;
|
|
72
|
+
"onB8Click"?: (event: B8ButtonCustomEvent<MouseEvent>) => void;
|
|
73
|
+
/**
|
|
74
|
+
* @default 'md'
|
|
75
|
+
*/
|
|
76
|
+
"size"?: string;
|
|
77
|
+
/**
|
|
78
|
+
* @default 'primary'
|
|
79
|
+
*/
|
|
80
|
+
"variant"?: string;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
interface B8ButtonAttributes {
|
|
84
|
+
"variant": string;
|
|
85
|
+
"size": string;
|
|
86
|
+
"isLoading": boolean;
|
|
87
|
+
"loadingText": string;
|
|
88
|
+
"isDisabled": boolean;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
interface IntrinsicElements {
|
|
92
|
+
"b8-button": Omit<B8Button, keyof B8ButtonAttributes> & { [K in keyof B8Button & keyof B8ButtonAttributes]?: B8Button[K] } & { [K in keyof B8Button & keyof B8ButtonAttributes as `attr:${K}`]?: B8ButtonAttributes[K] } & { [K in keyof B8Button & keyof B8ButtonAttributes as `prop:${K}`]?: B8Button[K] };
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
export { LocalJSX as JSX };
|
|
96
|
+
declare module "@stencil/core" {
|
|
97
|
+
export namespace JSX {
|
|
98
|
+
interface IntrinsicElements {
|
|
99
|
+
"b8-button": LocalJSX.IntrinsicElements["b8-button"] & JSXBase.HTMLAttributes<HTMLB8ButtonElement>;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview entry point for your component library
|
|
3
|
+
*
|
|
4
|
+
* This is the entry point for your component library. Use this file to export utilities,
|
|
5
|
+
* constants or data structure that accompany your components.
|
|
6
|
+
*
|
|
7
|
+
* DO NOT use this file to export your components. Instead, use the recommended approaches
|
|
8
|
+
* to consume components of this package as outlined in the `README.md`.
|
|
9
|
+
*/
|
|
10
|
+
export { format } from './utils/utils';
|
|
11
|
+
export type * from './components.d.ts';
|