@progressive-development/pd-page 0.9.1 → 1.0.0
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 -2
- package/README.md +34 -57
- package/dist/generated/locales/be.d.ts +19 -1
- package/dist/generated/locales/be.d.ts.map +1 -1
- package/dist/generated/locales/de.d.ts +19 -1
- package/dist/generated/locales/de.d.ts.map +1 -1
- package/dist/generated/locales/en.d.ts +19 -1
- package/dist/generated/locales/en.d.ts.map +1 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -0
- package/dist/locales/be.js +19 -1
- package/dist/locales/de.js +19 -1
- package/dist/locales/en.js +19 -1
- package/dist/pd-contact-us/PdContactUs.d.ts +15 -5
- package/dist/pd-contact-us/PdContactUs.d.ts.map +1 -1
- package/dist/pd-contact-us/PdContactUs.js +94 -134
- package/dist/pd-contact-us/pd-contact-us.stories.d.ts +36 -5
- package/dist/pd-contact-us/pd-contact-us.stories.d.ts.map +1 -1
- package/dist/pd-content/dist/pd-notice-box/PdNoticeBox.js +224 -0
- package/dist/pd-content/dist/pd-notice-box/pd-notice-box.js +8 -0
- package/dist/pd-footer/PdFooter.d.ts +27 -15
- package/dist/pd-footer/PdFooter.d.ts.map +1 -1
- package/dist/pd-footer/PdFooter.js +122 -74
- package/dist/pd-footer/pd-footer.stories.d.ts +47 -7
- package/dist/pd-footer/pd-footer.stories.d.ts.map +1 -1
- package/dist/pd-login/PdLogin.d.ts +59 -0
- package/dist/pd-login/PdLogin.d.ts.map +1 -0
- package/dist/pd-login/PdLogin.js +292 -0
- package/dist/pd-login/pd-login.d.ts +3 -0
- package/dist/pd-login/pd-login.d.ts.map +1 -0
- package/dist/pd-login/pd-login.stories.d.ts +55 -0
- package/dist/pd-login/pd-login.stories.d.ts.map +1 -0
- package/dist/pd-login.d.ts +2 -0
- package/dist/pd-login.js +8 -0
- package/dist/pd-menu/PdMenu.d.ts +72 -40
- package/dist/pd-menu/PdMenu.d.ts.map +1 -1
- package/dist/pd-menu/PdMenu.js +384 -276
- package/dist/pd-menu/pd-menu.stories.d.ts +59 -17
- package/dist/pd-menu/pd-menu.stories.d.ts.map +1 -1
- package/dist/pd-socialmedia/PdSocialmedia.d.ts +56 -0
- package/dist/pd-socialmedia/PdSocialmedia.d.ts.map +1 -0
- package/dist/pd-socialmedia/PdSocialmedia.js +426 -0
- package/dist/pd-socialmedia/pd-socialmedia-model.d.ts +16 -0
- package/dist/pd-socialmedia/pd-socialmedia-model.d.ts.map +1 -0
- package/dist/pd-socialmedia/pd-socialmedia-model.js +240 -0
- package/dist/pd-socialmedia/pd-socialmedia.d.ts +3 -0
- package/dist/pd-socialmedia/pd-socialmedia.d.ts.map +1 -0
- package/dist/pd-socialmedia/pd-socialmedia.stories.d.ts +53 -0
- package/dist/pd-socialmedia/pd-socialmedia.stories.d.ts.map +1 -0
- package/dist/pd-socialmedia.d.ts +2 -0
- package/dist/pd-socialmedia.js +7 -0
- package/dist/pd-toast/PdToast.d.ts +23 -0
- package/dist/pd-toast/PdToast.d.ts.map +1 -0
- package/dist/pd-toast/PdToast.js +222 -0
- package/dist/pd-toast/pd-toast.d.ts +3 -0
- package/dist/pd-toast/pd-toast.d.ts.map +1 -0
- package/dist/pd-toast/pd-toast.stories.d.ts +47 -0
- package/dist/pd-toast/pd-toast.stories.d.ts.map +1 -0
- package/dist/pd-toast.d.ts +2 -0
- package/dist/pd-toast.js +8 -0
- package/dist/stories/01_index.stories.d.ts +36 -4
- package/dist/stories/01_index.stories.d.ts.map +1 -1
- package/dist/toast-bus/toast-bus.d.ts +61 -0
- package/dist/toast-bus/toast-bus.d.ts.map +1 -0
- package/dist/toast-bus/toast-bus.js +42 -0
- package/dist/types.d.ts +18 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +14 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"01_index.stories.d.ts","sourceRoot":"","sources":["../../src/stories/01_index.stories.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"01_index.stories.d.ts","sourceRoot":"","sources":["../../src/stories/01_index.stories.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAGrE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAI9C,OAAO,uBAAuB,CAAC;AAC/B,OAAO,mCAAmC,CAAC;AAC3C,OAAO,2BAA2B,CAAC;AAMnC;;;GAGG;AACH,UAAU,eAAe;IACvB,4BAA4B;IAC5B,SAAS,EAAE,UAAU,EAAE,CAAC;IACxB,+CAA+C;IAC/C,YAAY,EAAE,UAAU,EAAE,CAAC;IAC3B,mDAAmD;IACnD,YAAY,EAAE,OAAO,CAAC;CACvB;AA8BD;;;;;;;;;;;;GAYG;AACH,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,eAAe,CAmB/B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,eAAe,CAAC,CAAC;AAMvC,kFAAkF;AAClF,eAAO,MAAM,QAAQ,EAAE,KA8CtB,CAAC;AAMF,+DAA+D;AAC/D,eAAO,MAAM,YAAY,EAAE,KA4C1B,CAAC;AAMF,mEAAmE;AACnE,eAAO,MAAM,WAAW,EAAE,KAiCzB,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ToastBus - Simple event bus for toast notifications
|
|
3
|
+
*
|
|
4
|
+
* Provides a global singleton for triggering toasts from anywhere
|
|
5
|
+
* (services, components, effects) without DOM dependencies.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* import { toastBus } from "@progressive-development/pd-page";
|
|
10
|
+
*
|
|
11
|
+
* // Show different toast types
|
|
12
|
+
* toastBus.success("Saved successfully!");
|
|
13
|
+
* toastBus.error("An error occurred");
|
|
14
|
+
* toastBus.info("Information", 3000);
|
|
15
|
+
*
|
|
16
|
+
* // Or use the generic show method
|
|
17
|
+
* toastBus.show("Custom message", "info", 5000);
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
/** Toast notification type */
|
|
21
|
+
export type ToastType = "success" | "error" | "info";
|
|
22
|
+
/** Toast event detail */
|
|
23
|
+
export interface ToastDetail {
|
|
24
|
+
/** Message to display */
|
|
25
|
+
message: string;
|
|
26
|
+
/** Toast type (success, error, info) */
|
|
27
|
+
type: ToastType;
|
|
28
|
+
/** Duration in ms. -1 for persistent (no auto-close) */
|
|
29
|
+
duration?: number;
|
|
30
|
+
}
|
|
31
|
+
declare class ToastBus extends EventTarget {
|
|
32
|
+
/**
|
|
33
|
+
* Show a toast notification
|
|
34
|
+
* @param message - Message to display
|
|
35
|
+
* @param type - Toast type (default: "info")
|
|
36
|
+
* @param duration - Duration in ms (default: component default, -1 for persistent)
|
|
37
|
+
*/
|
|
38
|
+
show(message: string, type?: ToastType, duration?: number): void;
|
|
39
|
+
/**
|
|
40
|
+
* Show a success toast
|
|
41
|
+
* @param message - Message to display
|
|
42
|
+
* @param duration - Duration in ms (optional)
|
|
43
|
+
*/
|
|
44
|
+
success(message: string, duration?: number): void;
|
|
45
|
+
/**
|
|
46
|
+
* Show an error toast (persistent by default)
|
|
47
|
+
* @param message - Message to display
|
|
48
|
+
* @param duration - Duration in ms (default: -1 for persistent)
|
|
49
|
+
*/
|
|
50
|
+
error(message: string, duration?: number): void;
|
|
51
|
+
/**
|
|
52
|
+
* Show an info toast
|
|
53
|
+
* @param message - Message to display
|
|
54
|
+
* @param duration - Duration in ms (optional)
|
|
55
|
+
*/
|
|
56
|
+
info(message: string, duration?: number): void;
|
|
57
|
+
}
|
|
58
|
+
/** Global toast bus singleton */
|
|
59
|
+
export declare const toastBus: ToastBus;
|
|
60
|
+
export {};
|
|
61
|
+
//# sourceMappingURL=toast-bus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toast-bus.d.ts","sourceRoot":"","sources":["../../src/toast-bus/toast-bus.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAMH,8BAA8B;AAC9B,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AAErD,yBAAyB;AACzB,MAAM,WAAW,WAAW;IAC1B,yBAAyB;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,wCAAwC;IACxC,IAAI,EAAE,SAAS,CAAC;IAChB,wDAAwD;IACxD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAMD,cAAM,QAAS,SAAQ,WAAW;IAChC;;;;;OAKG;IACH,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,GAAE,SAAkB,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI;IAQxE;;;;OAIG;IACH,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI;IAIjD;;;;OAIG;IACH,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,SAAK,GAAG,IAAI;IAI3C;;;;OAIG;IACH,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI;CAG/C;AAED,iCAAiC;AACjC,eAAO,MAAM,QAAQ,UAAiB,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
class ToastBus extends EventTarget {
|
|
2
|
+
/**
|
|
3
|
+
* Show a toast notification
|
|
4
|
+
* @param message - Message to display
|
|
5
|
+
* @param type - Toast type (default: "info")
|
|
6
|
+
* @param duration - Duration in ms (default: component default, -1 for persistent)
|
|
7
|
+
*/
|
|
8
|
+
show(message, type = "info", duration) {
|
|
9
|
+
this.dispatchEvent(
|
|
10
|
+
new CustomEvent("toast", {
|
|
11
|
+
detail: { message, type, duration }
|
|
12
|
+
})
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Show a success toast
|
|
17
|
+
* @param message - Message to display
|
|
18
|
+
* @param duration - Duration in ms (optional)
|
|
19
|
+
*/
|
|
20
|
+
success(message, duration) {
|
|
21
|
+
this.show(message, "success", duration);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Show an error toast (persistent by default)
|
|
25
|
+
* @param message - Message to display
|
|
26
|
+
* @param duration - Duration in ms (default: -1 for persistent)
|
|
27
|
+
*/
|
|
28
|
+
error(message, duration = -1) {
|
|
29
|
+
this.show(message, "error", duration);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Show an info toast
|
|
33
|
+
* @param message - Message to display
|
|
34
|
+
* @param duration - Duration in ms (optional)
|
|
35
|
+
*/
|
|
36
|
+
info(message, duration) {
|
|
37
|
+
this.show(message, "info", duration);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
const toastBus = new ToastBus();
|
|
41
|
+
|
|
42
|
+
export { toastBus };
|
package/dist/types.d.ts
CHANGED
|
@@ -22,4 +22,22 @@ export interface PdMenuItem {
|
|
|
22
22
|
action?: () => void;
|
|
23
23
|
ref?: HTMLElement;
|
|
24
24
|
}
|
|
25
|
+
export interface SocialEntry {
|
|
26
|
+
providerId: string;
|
|
27
|
+
value: string;
|
|
28
|
+
label?: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Detail object for the login-attempt event.
|
|
32
|
+
*/
|
|
33
|
+
export interface LoginAttemptDetail {
|
|
34
|
+
email: string;
|
|
35
|
+
password: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Detail object for the forgot-password-attempt event.
|
|
39
|
+
*/
|
|
40
|
+
export interface ForgotPasswordAttemptDetail {
|
|
41
|
+
email: string;
|
|
42
|
+
}
|
|
25
43
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,GAAG,CAAC,EAAE,WAAW,CAAC;CACnB"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,GAAG,CAAC,EAAE,WAAW,CAAC;CACnB;AAED,MAAM,WAAW,WAAW;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,KAAK,EAAE,MAAM,CAAC;CACf"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progressive-development/pd-page",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Progressive development page helper, teaser, menu, footer.",
|
|
5
5
|
"author": "PD Progressive Development",
|
|
6
|
-
"license": "
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"publishConfig": {
|
|
8
|
+
"access": "public"
|
|
9
|
+
},
|
|
7
10
|
"main": "./dist/index.js",
|
|
8
11
|
"module": "./dist/index.js",
|
|
9
12
|
"type": "module",
|
|
@@ -12,7 +15,10 @@
|
|
|
12
15
|
".": "./dist/index.js",
|
|
13
16
|
"./pd-contact-us": "./dist/pd-contact-us.js",
|
|
14
17
|
"./pd-footer": "./dist/pd-footer.js",
|
|
18
|
+
"./pd-login": "./dist/pd-login.js",
|
|
15
19
|
"./pd-menu": "./dist/pd-menu.js",
|
|
20
|
+
"./pd-socialmedia": "./dist/pd-socialmedia.js",
|
|
21
|
+
"./pd-toast": "./dist/pd-toast.js",
|
|
16
22
|
"./locales/be": "./dist/locales/be.js",
|
|
17
23
|
"./locales/de": "./dist/locales/de.js",
|
|
18
24
|
"./locales/en": "./dist/locales/en.js"
|
|
@@ -28,11 +34,11 @@
|
|
|
28
34
|
"@lit/localize": "^0.12.2",
|
|
29
35
|
"pwa-helpers": "^0.9.1",
|
|
30
36
|
"tslib": "^2.8.1",
|
|
31
|
-
"@progressive-development/pd-icon": "0.
|
|
32
|
-
"@progressive-development/pd-shared-styles": "0.3.
|
|
33
|
-
"@progressive-development/pd-
|
|
34
|
-
"@progressive-development/pd-
|
|
35
|
-
"@progressive-development/pd-forms": "0.
|
|
37
|
+
"@progressive-development/pd-icon": "1.0.0",
|
|
38
|
+
"@progressive-development/pd-shared-styles": "0.3.1",
|
|
39
|
+
"@progressive-development/pd-dialog": "1.0.0",
|
|
40
|
+
"@progressive-development/pd-contact": "1.0.0",
|
|
41
|
+
"@progressive-development/pd-forms": "1.0.0"
|
|
36
42
|
},
|
|
37
43
|
"customElements": "custom-elements.json",
|
|
38
44
|
"keywords": [
|
|
@@ -46,7 +52,7 @@
|
|
|
46
52
|
"scripts": {
|
|
47
53
|
"analyze": "cem analyze --litelement --exclude dist,demo",
|
|
48
54
|
"start": "vite",
|
|
49
|
-
"build": "vite build",
|
|
55
|
+
"build": "pnpm run analyze && vite build",
|
|
50
56
|
"preview": "vite preview",
|
|
51
57
|
"clean": "rm -rf dist",
|
|
52
58
|
"clean:all": "rm -rf dist node_modules pnpm-lock.yaml",
|