@duskmoon-dev/el-stepper 0.4.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.
@@ -0,0 +1,121 @@
1
+ /**
2
+ * DuskMoon Stepper Element
3
+ *
4
+ * A multi-step progress indicator/wizard component.
5
+ * Uses custom CSS with theme variables for consistent theming.
6
+ *
7
+ * @element el-dm-stepper
8
+ *
9
+ * @attr {string} steps - JSON array of step objects [{label, description?, icon?}]
10
+ * @attr {number} current - Current step index (0-based)
11
+ * @attr {string} orientation - Layout orientation: horizontal, vertical
12
+ * @attr {string} color - Stepper color: primary, secondary, tertiary, success, warning, error, info
13
+ * @attr {boolean} clickable - Whether steps are clickable for navigation
14
+ *
15
+ * @fires change - Fired when step changes via click
16
+ *
17
+ * @csspart stepper - The stepper container
18
+ * @csspart step - Individual step wrapper
19
+ * @csspart indicator - The step number/icon circle
20
+ * @csspart content - The step label and description wrapper
21
+ * @csspart label - The step label text
22
+ * @csspart description - The step description text
23
+ * @csspart connector - The connector line between steps
24
+ */
25
+ import { BaseElement } from '@duskmoon-dev/el-core';
26
+ export interface StepData {
27
+ label: string;
28
+ description?: string;
29
+ icon?: string;
30
+ }
31
+ export type StepperOrientation = 'horizontal' | 'vertical';
32
+ export type StepperColor = 'primary' | 'secondary' | 'tertiary' | 'success' | 'warning' | 'error' | 'info';
33
+ export declare class ElDmStepper extends BaseElement {
34
+ static properties: {
35
+ steps: {
36
+ type: ArrayConstructor;
37
+ reflect: boolean;
38
+ default: never[];
39
+ };
40
+ current: {
41
+ type: NumberConstructor;
42
+ reflect: boolean;
43
+ default: number;
44
+ };
45
+ orientation: {
46
+ type: StringConstructor;
47
+ reflect: boolean;
48
+ default: string;
49
+ };
50
+ color: {
51
+ type: StringConstructor;
52
+ reflect: boolean;
53
+ default: string;
54
+ };
55
+ clickable: {
56
+ type: BooleanConstructor;
57
+ reflect: boolean;
58
+ default: boolean;
59
+ };
60
+ };
61
+ steps: StepData[];
62
+ current: number;
63
+ orientation: StepperOrientation;
64
+ color: StepperColor;
65
+ clickable: boolean;
66
+ constructor();
67
+ connectedCallback(): void;
68
+ disconnectedCallback(): void;
69
+ private _handleClick;
70
+ private _getStepState;
71
+ private _renderStepIndicator;
72
+ render(): string;
73
+ }
74
+ export declare class ElDmStep extends BaseElement {
75
+ static properties: {
76
+ label: {
77
+ type: StringConstructor;
78
+ reflect: boolean;
79
+ };
80
+ description: {
81
+ type: StringConstructor;
82
+ reflect: boolean;
83
+ };
84
+ icon: {
85
+ type: StringConstructor;
86
+ reflect: boolean;
87
+ };
88
+ status: {
89
+ type: StringConstructor;
90
+ reflect: boolean;
91
+ default: string;
92
+ };
93
+ orientation: {
94
+ type: StringConstructor;
95
+ reflect: boolean;
96
+ default: string;
97
+ };
98
+ color: {
99
+ type: StringConstructor;
100
+ reflect: boolean;
101
+ default: string;
102
+ };
103
+ stepNumber: {
104
+ type: NumberConstructor;
105
+ reflect: boolean;
106
+ attribute: string;
107
+ default: number;
108
+ };
109
+ };
110
+ label: string;
111
+ description: string;
112
+ icon: string;
113
+ status: 'completed' | 'current' | 'upcoming';
114
+ orientation: 'horizontal' | 'vertical';
115
+ color: string;
116
+ stepNumber: number;
117
+ constructor();
118
+ private _renderIndicator;
119
+ render(): string;
120
+ }
121
+ //# sourceMappingURL=el-dm-stepper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"el-dm-stepper.d.ts","sourceRoot":"","sources":["../../src/el-dm-stepper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,WAAW,EAAO,MAAM,uBAAuB,CAAC;AAEzD,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,kBAAkB,GAAG,YAAY,GAAG,UAAU,CAAC;AAC3D,MAAM,MAAM,YAAY,GACpB,SAAS,GACT,WAAW,GACX,UAAU,GACV,SAAS,GACT,SAAS,GACT,OAAO,GACP,MAAM,CAAC;AAgNX,qBAAa,WAAY,SAAQ,WAAW;IAC1C,MAAM,CAAC,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;MAMf;IAEM,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,kBAAkB,CAAC;IAChC,KAAK,EAAE,YAAY,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;;IAO3B,iBAAiB,IAAI,IAAI;IAKzB,oBAAoB,IAAI,IAAI;IAK5B,OAAO,CAAC,YAAY;IAepB,OAAO,CAAC,aAAa;IAMrB,OAAO,CAAC,oBAAoB;IAY5B,MAAM,IAAI,MAAM;CA6CjB;AA2GD,qBAAa,QAAS,SAAQ,WAAW;IACvC,MAAM,CAAC,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAQf;IAEM,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,WAAW,GAAG,SAAS,GAAG,UAAU,CAAC;IAC7C,WAAW,EAAE,YAAY,GAAG,UAAU,CAAC;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;;IAO3B,OAAO,CAAC,gBAAgB;IAUxB,MAAM,IAAI,MAAM;CAcjB"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @duskmoon-dev/el-stepper
3
+ *
4
+ * DuskMoon Stepper custom elements for multi-step progress indicators
5
+ */
6
+ import { ElDmStepper, ElDmStep } from './el-dm-stepper.js';
7
+ export { ElDmStepper, ElDmStep };
8
+ export type { StepData, StepperOrientation, StepperColor } from './el-dm-stepper.js';
9
+ /**
10
+ * Register the el-dm-stepper and el-dm-step custom elements
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * import { register } from '@duskmoon-dev/el-stepper';
15
+ * register();
16
+ * ```
17
+ */
18
+ export declare function register(): void;
19
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE3D,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC;AACjC,YAAY,EAAE,QAAQ,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAErF;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,IAAI,IAAI,CAO/B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=register.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../src/register.ts"],"names":[],"mappings":""}
package/package.json ADDED
@@ -0,0 +1,58 @@
1
+ {
2
+ "name": "@duskmoon-dev/el-stepper",
3
+ "version": "0.4.0",
4
+ "type": "module",
5
+ "main": "./dist/cjs/index.js",
6
+ "module": "./dist/esm/index.js",
7
+ "types": "./dist/types/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/types/index.d.ts",
11
+ "import": "./dist/esm/index.js",
12
+ "require": "./dist/cjs/index.js"
13
+ },
14
+ "./register": {
15
+ "types": "./dist/types/register.d.ts",
16
+ "import": "./dist/esm/register.js",
17
+ "require": "./dist/cjs/register.js"
18
+ }
19
+ },
20
+ "files": [
21
+ "dist"
22
+ ],
23
+ "scripts": {
24
+ "prebuild": "bun run clean",
25
+ "build": "bun run build:esm && bun run build:cjs && bun run build:types",
26
+ "build:esm": "bun build ./src/index.ts ./src/register.ts --outdir ./dist/esm --format esm --sourcemap --external @duskmoon-dev/el-core --external @duskmoon-dev/core",
27
+ "build:cjs": "bun build ./src/index.ts ./src/register.ts --outdir ./dist/cjs --format cjs --sourcemap --external @duskmoon-dev/el-core --external @duskmoon-dev/core",
28
+ "build:types": "tsc --emitDeclarationOnly --outDir ./dist/types",
29
+ "dev": "bun build ./src/index.ts --outdir ./dist/esm --format esm --sourcemap --external @duskmoon-dev/el-core --watch",
30
+ "clean": "del-cli dist",
31
+ "test": "bun test",
32
+ "typecheck": "tsc --noEmit",
33
+ "format": "prettier --write 'src/**/*.ts' '*.json'",
34
+ "format:check": "prettier --check 'src/**/*.ts' '*.json'",
35
+ "lint": "eslint src",
36
+ "lint:check": "eslint src --max-warnings 0",
37
+ "lint:fix": "eslint src --fix",
38
+ "release": "bun publish",
39
+ "release:dry-run": "bun publish --dry-run"
40
+ },
41
+ "dependencies": {
42
+ "@duskmoon-dev/el-core": "0.3.0"
43
+ },
44
+ "devDependencies": {
45
+ "typescript": "^5.7.2"
46
+ },
47
+ "publishConfig": {
48
+ "access": "public"
49
+ },
50
+ "keywords": [
51
+ "duskmoon-dev",
52
+ "custom-elements",
53
+ "web-components",
54
+ "stepper",
55
+ "wizard",
56
+ "progress-indicator"
57
+ ]
58
+ }