@pairbo/ui-kit 0.2.4 → 0.2.5
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/pairbo.es.js +615 -237
- package/dist/pairbo.umd.js +242 -118
- package/dist/src/components/button/button.component.d.ts +6 -0
- package/dist/src/components/editor-card-slider/editor-card-slider.component.d.ts +2 -0
- package/dist/src/components/editor-selector/editor-selector.component.d.ts +2 -0
- package/dist/src/components/handwritten-form/handwritten-form.component.d.ts +14 -2
- package/dist/src/components/image/image.component.d.ts +32 -0
- package/dist/src/components/image/image.d.ts +8 -0
- package/dist/src/components/image/image.styles.d.ts +2 -0
- package/dist/src/components/main.d.ts +2 -0
- package/dist/src/components/selector/selector.component.d.ts +2 -0
- package/dist/src/components/spinner/spinner.component.d.ts +6 -0
- package/dist/src/components/spinner/spinner.d.ts +8 -0
- package/dist/src/components/spinner/spinner.styles.d.ts +2 -0
- package/dist/src/components/type-form/type-form.component.d.ts +17 -12
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CSSResultGroup } from 'lit';
|
|
2
2
|
import { default as PairboElement, PairboFormControl } from '../../internal/pairbo-element.js';
|
|
3
|
+
import { default as PboSpinner } from '../spinner/spinner.component.js';
|
|
3
4
|
/**
|
|
4
5
|
* @summary Short summary of the component's intended use.
|
|
5
6
|
* @documentation https://shoelace.style/components/button
|
|
@@ -20,9 +21,13 @@ export default class PboButton extends PairboElement implements PairboFormContro
|
|
|
20
21
|
reportValidity: () => boolean;
|
|
21
22
|
setCustomValidity: (error: string) => void;
|
|
22
23
|
static styles: CSSResultGroup;
|
|
24
|
+
static dependencies: {
|
|
25
|
+
"pbo-spinner": typeof PboSpinner;
|
|
26
|
+
};
|
|
23
27
|
private readonly formControlController;
|
|
24
28
|
private readonly hasSlotController;
|
|
25
29
|
button: HTMLButtonElement | HTMLLinkElement;
|
|
30
|
+
spinner: PboSpinner;
|
|
26
31
|
disabled: boolean;
|
|
27
32
|
href: string;
|
|
28
33
|
name: string;
|
|
@@ -33,6 +38,7 @@ export default class PboButton extends PairboElement implements PairboFormContro
|
|
|
33
38
|
circle: boolean;
|
|
34
39
|
type: "submit" | "reset" | "button";
|
|
35
40
|
colorBlock: boolean;
|
|
41
|
+
loading: boolean;
|
|
36
42
|
isIconButton: boolean;
|
|
37
43
|
get validity(): ValidityState;
|
|
38
44
|
get validationMessage(): string;
|
|
@@ -2,6 +2,7 @@ import { TemplateResult, CSSResultGroup } from 'lit';
|
|
|
2
2
|
import { default as PairboElement } from '../../internal/pairbo-element.js';
|
|
3
3
|
import { default as FabricExample } from '../fabric-example/fabric-example.component.js';
|
|
4
4
|
import { PboDrawer, PboTypeCanvas } from '../main.js';
|
|
5
|
+
import { default as PboImage } from '../image/image.component.js';
|
|
5
6
|
/**
|
|
6
7
|
* @summary Short summary of the component's intended use.
|
|
7
8
|
* @status experimental
|
|
@@ -21,6 +22,7 @@ export default class PboEditorCardSlider extends PairboElement {
|
|
|
21
22
|
static styles: CSSResultGroup;
|
|
22
23
|
static dependencies: {
|
|
23
24
|
"fabric-example": typeof FabricExample;
|
|
25
|
+
"pbo-image": typeof PboImage;
|
|
24
26
|
};
|
|
25
27
|
card: Card | null;
|
|
26
28
|
focusIndex: number;
|
|
@@ -5,6 +5,8 @@ export default class PboEditorSelector extends PairboElement {
|
|
|
5
5
|
private readonly hasSlotController;
|
|
6
6
|
size: "medium" | "large" | "small";
|
|
7
7
|
label: string;
|
|
8
|
+
disabled: boolean;
|
|
9
|
+
handleDisabledChanged(): void;
|
|
8
10
|
get value(): any;
|
|
9
11
|
choiceEl: HTMLSelectElement;
|
|
10
12
|
private _choices?;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CSSResultGroup } from 'lit';
|
|
2
2
|
import { default as PairboElement } from '../../internal/pairbo-element.js';
|
|
3
|
+
import { default as PboButton } from '../button/button.component.js';
|
|
3
4
|
/**
|
|
4
5
|
* @summary Short summary of the component's intended use.
|
|
5
6
|
* @status experimental
|
|
@@ -17,11 +18,17 @@ import { default as PairboElement } from '../../internal/pairbo-element.js';
|
|
|
17
18
|
*/
|
|
18
19
|
export default class PboHandwrittenForm extends PairboElement {
|
|
19
20
|
static styles: CSSResultGroup;
|
|
20
|
-
imageInput: HTMLInputElement;
|
|
21
|
-
handwrittenForm: HTMLFormElement;
|
|
22
21
|
card: Card | null;
|
|
23
22
|
submitHandwrittenForm: SubmitHandwrittenForm;
|
|
24
23
|
getProcessedImg: GetProcessedImg;
|
|
24
|
+
isSubmitLoading: boolean;
|
|
25
|
+
isSubmitDisabled: boolean;
|
|
26
|
+
imageInput: HTMLInputElement;
|
|
27
|
+
handwrittenForm: HTMLFormElement;
|
|
28
|
+
uploadButton: PboButton;
|
|
29
|
+
saveButton: PboButton;
|
|
30
|
+
reuploadButton: PboButton;
|
|
31
|
+
isImageProcessing: boolean;
|
|
25
32
|
sourceImg: File | null;
|
|
26
33
|
processedImg: {
|
|
27
34
|
fileUrl: string | null;
|
|
@@ -37,8 +44,13 @@ export default class PboHandwrittenForm extends PairboElement {
|
|
|
37
44
|
cardWidth: number | null;
|
|
38
45
|
};
|
|
39
46
|
showPicker(): void;
|
|
47
|
+
setButtonsDisabled(disable: boolean): void;
|
|
48
|
+
setButtonsLoading(loading: boolean): void;
|
|
49
|
+
handleSubmitLoadingChange(): void;
|
|
50
|
+
handleSubmitDisabledChange(): void;
|
|
40
51
|
handleSourceImgChange(oldFile: File | null, newFile: File | null): void;
|
|
41
52
|
handleProcessImageChange(oldFileUrl: string | null, newFileUrl: string | null): void;
|
|
53
|
+
handleImageProcessingChange(): void;
|
|
42
54
|
get formData(): HandwrittenFormData;
|
|
43
55
|
setDimensions(dimensions: {
|
|
44
56
|
top: number | null;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { CSSResultGroup } from 'lit';
|
|
2
|
+
import { default as PairboElement } from '../../internal/pairbo-element.js';
|
|
3
|
+
/**
|
|
4
|
+
* @summary Short summary of the component's intended use.
|
|
5
|
+
* @status experimental
|
|
6
|
+
*
|
|
7
|
+
* @dependency pbo-example
|
|
8
|
+
*
|
|
9
|
+
* @event pbo-event-name - Emitted as an example.
|
|
10
|
+
*
|
|
11
|
+
* @slot - The default slot.
|
|
12
|
+
* @slot example - An example slot.
|
|
13
|
+
*
|
|
14
|
+
* @csspart base - The component's base wrapper.
|
|
15
|
+
*
|
|
16
|
+
* @cssproperty --example - An example CSS custom property.
|
|
17
|
+
*/
|
|
18
|
+
export default class PboImage extends PairboElement {
|
|
19
|
+
static styles: CSSResultGroup;
|
|
20
|
+
skeletonHeight: string;
|
|
21
|
+
skeletonWidth: string;
|
|
22
|
+
src: string;
|
|
23
|
+
alt: string;
|
|
24
|
+
placeholder: string;
|
|
25
|
+
private loaded;
|
|
26
|
+
private imgEl;
|
|
27
|
+
handleSrcChange(): void;
|
|
28
|
+
private handleError;
|
|
29
|
+
private handleOnLoad;
|
|
30
|
+
protected firstUpdated(): void;
|
|
31
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
32
|
+
}
|
|
@@ -19,3 +19,5 @@ export { default as PboEditorSelector } from './editor-selector/editor-selector.
|
|
|
19
19
|
export { default as PboHandwrittenForm } from './handwritten-form/handwritten-form.js';
|
|
20
20
|
export { default as PboHandwrittenCanvas } from './handwritten-canvas/handwritten-canvas.js';
|
|
21
21
|
export { default as PboGiftOption } from './gift-options/gift-options.js';
|
|
22
|
+
export { default as PboSpinner } from './spinner/spinner.js';
|
|
23
|
+
export { default as PboImage } from './image/image.js';
|
|
@@ -8,11 +8,13 @@ export default class PboSelector extends LitElement {
|
|
|
8
8
|
static styles: CSSResultGroup;
|
|
9
9
|
private readonly hasSlotController;
|
|
10
10
|
fonts: FontOption[];
|
|
11
|
+
disabled: boolean;
|
|
11
12
|
size: "medium" | "large" | "small";
|
|
12
13
|
label: string;
|
|
13
14
|
get value(): any;
|
|
14
15
|
choiceEl: HTMLSelectElement;
|
|
15
16
|
private _choices?;
|
|
17
|
+
handleDisabledChanged(): void;
|
|
16
18
|
firstUpdated(): void;
|
|
17
19
|
private _initializeChoices;
|
|
18
20
|
render(): import('lit-html').TemplateResult<1>;
|
|
@@ -29,15 +29,6 @@ export default class PboTypeForm extends PairboElement {
|
|
|
29
29
|
"pbo-radio-button": typeof PboRadioGroup;
|
|
30
30
|
"pbo-button": typeof PboButton;
|
|
31
31
|
};
|
|
32
|
-
greetingText: PboTextarea;
|
|
33
|
-
fontSelector: PboSelector;
|
|
34
|
-
textColor: PboRadioGroup;
|
|
35
|
-
textAlignment: PboRadioGroup;
|
|
36
|
-
typingForm: HTMLFormElement;
|
|
37
|
-
textArea: PboTextarea;
|
|
38
|
-
windowHeight: number;
|
|
39
|
-
private resizeTimeout;
|
|
40
|
-
charsNum: number;
|
|
41
32
|
static readonly CTA_STATES: {
|
|
42
33
|
danger: {
|
|
43
34
|
type: string;
|
|
@@ -48,13 +39,27 @@ export default class PboTypeForm extends PairboElement {
|
|
|
48
39
|
message: string;
|
|
49
40
|
};
|
|
50
41
|
};
|
|
42
|
+
private resizeTimeout;
|
|
43
|
+
cardInnerImageUrl: string;
|
|
44
|
+
card: Card | null;
|
|
45
|
+
submitTypeForm: SubmitTypeForm;
|
|
46
|
+
loading: boolean;
|
|
47
|
+
disabled: boolean;
|
|
48
|
+
greetingText: PboTextarea;
|
|
49
|
+
fontSelector: PboSelector;
|
|
50
|
+
textColor: PboRadioGroup;
|
|
51
|
+
textAlignment: PboRadioGroup;
|
|
52
|
+
typingForm: HTMLFormElement;
|
|
53
|
+
textArea: PboTextarea;
|
|
54
|
+
ctaButtons: NodeListOf<PboButton>;
|
|
55
|
+
windowHeight: number;
|
|
56
|
+
charsNum: number;
|
|
51
57
|
ctaButtonState: {
|
|
52
58
|
type: string;
|
|
53
59
|
message: string;
|
|
54
60
|
};
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
submitTypeForm: SubmitTypeForm;
|
|
61
|
+
isLoadingChanged(): void;
|
|
62
|
+
disabledChanged(): void;
|
|
58
63
|
protected firstUpdated(): void;
|
|
59
64
|
get formData(): TypeFormData;
|
|
60
65
|
private handleFormChange;
|