@krollins/blueprint 0.1.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 -0
- package/README.md +407 -0
- package/dist/components/accordion/accordion.d.ts +113 -0
- package/dist/components/accordion/accordion.d.ts.map +1 -0
- package/dist/components/accordion/accordion.style.d.ts +2 -0
- package/dist/components/accordion/accordion.style.d.ts.map +1 -0
- package/dist/components/alert/alert.d.ts +37 -0
- package/dist/components/alert/alert.d.ts.map +1 -0
- package/dist/components/alert/alert.style.d.ts +2 -0
- package/dist/components/alert/alert.style.d.ts.map +1 -0
- package/dist/components/avatar/avatar.d.ts +75 -0
- package/dist/components/avatar/avatar.d.ts.map +1 -0
- package/dist/components/avatar/avatar.style.d.ts +2 -0
- package/dist/components/avatar/avatar.style.d.ts.map +1 -0
- package/dist/components/badge/badge.d.ts +46 -0
- package/dist/components/badge/badge.d.ts.map +1 -0
- package/dist/components/badge/badge.style.d.ts +2 -0
- package/dist/components/badge/badge.style.d.ts.map +1 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts +110 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts.map +1 -0
- package/dist/components/breadcrumb/breadcrumb.style.d.ts +2 -0
- package/dist/components/breadcrumb/breadcrumb.style.d.ts.map +1 -0
- package/dist/components/button/button.d.ts +19 -0
- package/dist/components/button/button.d.ts.map +1 -0
- package/dist/components/button/button.style.d.ts +2 -0
- package/dist/components/button/button.style.d.ts.map +1 -0
- package/dist/components/card/card.d.ts +62 -0
- package/dist/components/card/card.d.ts.map +1 -0
- package/dist/components/card/card.style.d.ts +2 -0
- package/dist/components/card/card.style.d.ts.map +1 -0
- package/dist/components/checkbox/checkbox.d.ts +89 -0
- package/dist/components/checkbox/checkbox.d.ts.map +1 -0
- package/dist/components/checkbox/checkbox.style.d.ts +2 -0
- package/dist/components/checkbox/checkbox.style.d.ts.map +1 -0
- package/dist/components/color-picker/color-picker.d.ts +366 -0
- package/dist/components/color-picker/color-picker.d.ts.map +1 -0
- package/dist/components/color-picker/color-picker.style.d.ts +14 -0
- package/dist/components/color-picker/color-picker.style.d.ts.map +1 -0
- package/dist/components/color-picker/color-picker.utils.d.ts +100 -0
- package/dist/components/color-picker/color-picker.utils.d.ts.map +1 -0
- package/dist/components/combobox/combobox.d.ts +74 -0
- package/dist/components/combobox/combobox.d.ts.map +1 -0
- package/dist/components/combobox/combobox.style.d.ts +2 -0
- package/dist/components/combobox/combobox.style.d.ts.map +1 -0
- package/dist/components/date-picker/date-picker.d.ts +65 -0
- package/dist/components/date-picker/date-picker.d.ts.map +1 -0
- package/dist/components/date-picker/date-picker.style.d.ts +2 -0
- package/dist/components/date-picker/date-picker.style.d.ts.map +1 -0
- package/dist/components/divider/divider.d.ts +54 -0
- package/dist/components/divider/divider.d.ts.map +1 -0
- package/dist/components/divider/divider.style.d.ts +2 -0
- package/dist/components/divider/divider.style.d.ts.map +1 -0
- package/dist/components/drawer/drawer.d.ts +113 -0
- package/dist/components/drawer/drawer.d.ts.map +1 -0
- package/dist/components/drawer/drawer.style.d.ts +2 -0
- package/dist/components/drawer/drawer.style.d.ts.map +1 -0
- package/dist/components/dropdown/dropdown.d.ts +80 -0
- package/dist/components/dropdown/dropdown.d.ts.map +1 -0
- package/dist/components/dropdown/dropdown.style.d.ts +2 -0
- package/dist/components/dropdown/dropdown.style.d.ts.map +1 -0
- package/dist/components/file-upload/file-upload.d.ts +116 -0
- package/dist/components/file-upload/file-upload.d.ts.map +1 -0
- package/dist/components/file-upload/file-upload.style.d.ts +2 -0
- package/dist/components/file-upload/file-upload.style.d.ts.map +1 -0
- package/dist/components/heading/heading.d.ts +46 -0
- package/dist/components/heading/heading.d.ts.map +1 -0
- package/dist/components/heading/heading.style.d.ts +2 -0
- package/dist/components/heading/heading.style.d.ts.map +1 -0
- package/dist/components/icon/icon.d.ts +57 -0
- package/dist/components/icon/icon.d.ts.map +1 -0
- package/dist/components/icon/icon.style.d.ts +2 -0
- package/dist/components/icon/icon.style.d.ts.map +1 -0
- package/dist/components/icon/icons/registry.generated.d.ts +25 -0
- package/dist/components/icon/icons/registry.generated.d.ts.map +1 -0
- package/dist/components/index.d.ts +45 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/input/input.d.ts +56 -0
- package/dist/components/input/input.d.ts.map +1 -0
- package/dist/components/input/input.style.d.ts +2 -0
- package/dist/components/input/input.style.d.ts.map +1 -0
- package/dist/components/link/link.d.ts +62 -0
- package/dist/components/link/link.d.ts.map +1 -0
- package/dist/components/link/link.style.d.ts +2 -0
- package/dist/components/link/link.style.d.ts.map +1 -0
- package/dist/components/menu/menu.d.ts +86 -0
- package/dist/components/menu/menu.d.ts.map +1 -0
- package/dist/components/menu/menu.style.d.ts +2 -0
- package/dist/components/menu/menu.style.d.ts.map +1 -0
- package/dist/components/modal/modal.d.ts +40 -0
- package/dist/components/modal/modal.d.ts.map +1 -0
- package/dist/components/modal/modal.style.d.ts +2 -0
- package/dist/components/modal/modal.style.d.ts.map +1 -0
- package/dist/components/multi-select/multi-select.d.ts +69 -0
- package/dist/components/multi-select/multi-select.d.ts.map +1 -0
- package/dist/components/multi-select/multi-select.style.d.ts +2 -0
- package/dist/components/multi-select/multi-select.style.d.ts.map +1 -0
- package/dist/components/notification/notification.d.ts +102 -0
- package/dist/components/notification/notification.d.ts.map +1 -0
- package/dist/components/notification/notification.style.d.ts +2 -0
- package/dist/components/notification/notification.style.d.ts.map +1 -0
- package/dist/components/number-input/number-input.d.ts +139 -0
- package/dist/components/number-input/number-input.d.ts.map +1 -0
- package/dist/components/number-input/number-input.style.d.ts +2 -0
- package/dist/components/number-input/number-input.style.d.ts.map +1 -0
- package/dist/components/pagination/pagination.d.ts +49 -0
- package/dist/components/pagination/pagination.d.ts.map +1 -0
- package/dist/components/pagination/pagination.style.d.ts +2 -0
- package/dist/components/pagination/pagination.style.d.ts.map +1 -0
- package/dist/components/popover/popover.d.ts +153 -0
- package/dist/components/popover/popover.d.ts.map +1 -0
- package/dist/components/popover/popover.style.d.ts +2 -0
- package/dist/components/popover/popover.style.d.ts.map +1 -0
- package/dist/components/progress/progress.d.ts +50 -0
- package/dist/components/progress/progress.d.ts.map +1 -0
- package/dist/components/progress/progress.style.d.ts +2 -0
- package/dist/components/progress/progress.style.d.ts.map +1 -0
- package/dist/components/radio/radio.d.ts +95 -0
- package/dist/components/radio/radio.d.ts.map +1 -0
- package/dist/components/radio/radio.style.d.ts +2 -0
- package/dist/components/radio/radio.style.d.ts.map +1 -0
- package/dist/components/select/select.d.ts +49 -0
- package/dist/components/select/select.d.ts.map +1 -0
- package/dist/components/select/select.style.d.ts +2 -0
- package/dist/components/select/select.style.d.ts.map +1 -0
- package/dist/components/skeleton/skeleton.d.ts +50 -0
- package/dist/components/skeleton/skeleton.d.ts.map +1 -0
- package/dist/components/skeleton/skeleton.style.d.ts +2 -0
- package/dist/components/skeleton/skeleton.style.d.ts.map +1 -0
- package/dist/components/slider/slider.d.ts +115 -0
- package/dist/components/slider/slider.d.ts.map +1 -0
- package/dist/components/slider/slider.style.d.ts +2 -0
- package/dist/components/slider/slider.style.d.ts.map +1 -0
- package/dist/components/spinner/spinner.d.ts +36 -0
- package/dist/components/spinner/spinner.d.ts.map +1 -0
- package/dist/components/spinner/spinner.style.d.ts +2 -0
- package/dist/components/spinner/spinner.style.d.ts.map +1 -0
- package/dist/components/stepper/stepper.d.ts +228 -0
- package/dist/components/stepper/stepper.d.ts.map +1 -0
- package/dist/components/stepper/stepper.style.d.ts +2 -0
- package/dist/components/stepper/stepper.style.d.ts.map +1 -0
- package/dist/components/switch/switch.d.ts +90 -0
- package/dist/components/switch/switch.d.ts.map +1 -0
- package/dist/components/switch/switch.style.d.ts +2 -0
- package/dist/components/switch/switch.style.d.ts.map +1 -0
- package/dist/components/table/table.d.ts +176 -0
- package/dist/components/table/table.d.ts.map +1 -0
- package/dist/components/table/table.style.d.ts +2 -0
- package/dist/components/table/table.style.d.ts.map +1 -0
- package/dist/components/tabs/tabs.d.ts +124 -0
- package/dist/components/tabs/tabs.d.ts.map +1 -0
- package/dist/components/tabs/tabs.style.d.ts +2 -0
- package/dist/components/tabs/tabs.style.d.ts.map +1 -0
- package/dist/components/tag/tag.d.ts +64 -0
- package/dist/components/tag/tag.d.ts.map +1 -0
- package/dist/components/tag/tag.style.d.ts +2 -0
- package/dist/components/tag/tag.style.d.ts.map +1 -0
- package/dist/components/text/text.d.ts +86 -0
- package/dist/components/text/text.d.ts.map +1 -0
- package/dist/components/text/text.style.d.ts +2 -0
- package/dist/components/text/text.style.d.ts.map +1 -0
- package/dist/components/textarea/textarea.d.ts +94 -0
- package/dist/components/textarea/textarea.d.ts.map +1 -0
- package/dist/components/textarea/textarea.style.d.ts +2 -0
- package/dist/components/textarea/textarea.style.d.ts.map +1 -0
- package/dist/components/time-picker/time-picker.d.ts +51 -0
- package/dist/components/time-picker/time-picker.d.ts.map +1 -0
- package/dist/components/time-picker/time-picker.style.d.ts +2 -0
- package/dist/components/time-picker/time-picker.style.d.ts.map +1 -0
- package/dist/components/tooltip/tooltip.d.ts +52 -0
- package/dist/components/tooltip/tooltip.d.ts.map +1 -0
- package/dist/components/tooltip/tooltip.style.d.ts +2 -0
- package/dist/components/tooltip/tooltip.style.d.ts.map +1 -0
- package/dist/components/tree/tree.d.ts +188 -0
- package/dist/components/tree/tree.d.ts.map +1 -0
- package/dist/components/tree/tree.style.d.ts +2 -0
- package/dist/components/tree/tree.style.d.ts.map +1 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +17802 -0
- package/dist/index.js.map +1 -0
- package/dist/utilities/boolean-converter.d.ts +23 -0
- package/dist/utilities/boolean-converter.d.ts.map +1 -0
- package/dist/utilities/debounce.d.ts +12 -0
- package/dist/utilities/debounce.d.ts.map +1 -0
- package/dist/utilities/index.d.ts +5 -0
- package/dist/utilities/index.d.ts.map +1 -0
- package/dist/utilities/memoize.d.ts +7 -0
- package/dist/utilities/memoize.d.ts.map +1 -0
- package/dist/utilities/throttle.d.ts +12 -0
- package/dist/utilities/throttle.d.ts.map +1 -0
- package/package.json +93 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skeleton.style.d.ts","sourceRoot":"","sources":["../../../source/components/skeleton/skeleton.style.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,yBAmI1B,CAAC"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
/**
|
|
3
|
+
* Size variants for the slider
|
|
4
|
+
*/
|
|
5
|
+
export type SliderSize = 'sm' | 'md' | 'lg';
|
|
6
|
+
/**
|
|
7
|
+
* A slider component for selecting numeric values within a range.
|
|
8
|
+
*
|
|
9
|
+
* @element bp-slider
|
|
10
|
+
*
|
|
11
|
+
* @fires bp-input - Fired continuously while dragging
|
|
12
|
+
* @fires bp-change - Fired when the value changes (after interaction ends)
|
|
13
|
+
*
|
|
14
|
+
* @csspart track - The slider track element
|
|
15
|
+
* @csspart fill - The filled portion of the track
|
|
16
|
+
* @csspart thumb - The draggable thumb element
|
|
17
|
+
* @csspart label - The label element
|
|
18
|
+
* @csspart value-display - The current value display
|
|
19
|
+
*/
|
|
20
|
+
export declare class BpSlider extends LitElement {
|
|
21
|
+
/**
|
|
22
|
+
* Current value of the slider
|
|
23
|
+
*/
|
|
24
|
+
value: number;
|
|
25
|
+
/**
|
|
26
|
+
* Minimum value
|
|
27
|
+
*/
|
|
28
|
+
min: number;
|
|
29
|
+
/**
|
|
30
|
+
* Maximum value
|
|
31
|
+
*/
|
|
32
|
+
max: number;
|
|
33
|
+
/**
|
|
34
|
+
* Step increment
|
|
35
|
+
*/
|
|
36
|
+
step: number;
|
|
37
|
+
/**
|
|
38
|
+
* Name attribute for form association
|
|
39
|
+
*/
|
|
40
|
+
name: string;
|
|
41
|
+
/**
|
|
42
|
+
* Label text for the slider
|
|
43
|
+
*/
|
|
44
|
+
label: string;
|
|
45
|
+
/**
|
|
46
|
+
* Whether the slider is disabled
|
|
47
|
+
*/
|
|
48
|
+
disabled: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Size variant
|
|
51
|
+
*/
|
|
52
|
+
size: SliderSize;
|
|
53
|
+
/**
|
|
54
|
+
* Whether to show the current value
|
|
55
|
+
*/
|
|
56
|
+
showValue: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Whether to show tick marks at step intervals
|
|
59
|
+
*/
|
|
60
|
+
showTicks: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Format function for displaying the value
|
|
63
|
+
*/
|
|
64
|
+
formatValue: (value: number) => string;
|
|
65
|
+
/**
|
|
66
|
+
* Whether the thumb is currently being dragged
|
|
67
|
+
*/
|
|
68
|
+
private isDragging;
|
|
69
|
+
private trackElement;
|
|
70
|
+
/** Cached track bounding rect during drag to avoid repeated layout queries */
|
|
71
|
+
private cachedTrackRect;
|
|
72
|
+
/** Throttled position update for frame-aligned drag handling */
|
|
73
|
+
private throttledUpdatePosition;
|
|
74
|
+
static styles: import("lit").CSSResult[];
|
|
75
|
+
constructor();
|
|
76
|
+
disconnectedCallback(): void;
|
|
77
|
+
/**
|
|
78
|
+
* Calculate the percentage position of the current value
|
|
79
|
+
*/
|
|
80
|
+
private get percentage();
|
|
81
|
+
/**
|
|
82
|
+
* Get tick positions based on step
|
|
83
|
+
*/
|
|
84
|
+
private get tickPositions();
|
|
85
|
+
/**
|
|
86
|
+
* Clamp value to min/max and round to step.
|
|
87
|
+
* Uses decimal-aware rounding to avoid floating-point artifacts
|
|
88
|
+
* (e.g. 0.6900000000000001 instead of 0.69).
|
|
89
|
+
*/
|
|
90
|
+
private clampValue;
|
|
91
|
+
/**
|
|
92
|
+
* Update value from a position on the track.
|
|
93
|
+
* Uses cached bounding rect during drag for performance.
|
|
94
|
+
*/
|
|
95
|
+
private updateValueFromPosition;
|
|
96
|
+
/**
|
|
97
|
+
* Handle mouse down on track or thumb
|
|
98
|
+
*/
|
|
99
|
+
private handleMouseDown;
|
|
100
|
+
/**
|
|
101
|
+
* Handle touch start on track or thumb
|
|
102
|
+
*/
|
|
103
|
+
private handleTouchStart;
|
|
104
|
+
/**
|
|
105
|
+
* Handle keyboard navigation
|
|
106
|
+
*/
|
|
107
|
+
private handleKeyDown;
|
|
108
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
109
|
+
}
|
|
110
|
+
declare global {
|
|
111
|
+
interface HTMLElementTagNameMap {
|
|
112
|
+
'bp-slider': BpSlider;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
//# sourceMappingURL=slider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slider.d.ts","sourceRoot":"","sources":["../../../source/components/slider/slider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAiB,MAAM,KAAK,CAAC;AAOhD;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE5C;;;;;;;;;;;;;GAaG;AACH,qBACa,QAAS,SAAQ,UAAU;IACtC;;OAEG;IACiC,KAAK,EAAE,MAAM,CAAC;IAElD;;OAEG;IACiC,GAAG,EAAE,MAAM,CAAC;IAEhD;;OAEG;IACiC,GAAG,EAAE,MAAM,CAAC;IAEhD;;OAEG;IACiC,IAAI,EAAE,MAAM,CAAC;IAEjD;;OAEG;IACiC,IAAI,EAAE,MAAM,CAAC;IAEjD;;OAEG;IACiC,KAAK,EAAE,MAAM,CAAC;IAElD;;OAEG;IACiD,QAAQ,EAAE,OAAO,CAAC;IAEtE;;OAEG;IACiC,IAAI,EAAE,UAAU,CAAC;IAErD;;OAEG;IAEK,SAAS,EAAE,OAAO,CAAC;IAE3B;;OAEG;IAEK,SAAS,EAAE,OAAO,CAAC;IAE3B;;OAEG;IACqC,WAAW,EAAE,CACnD,KAAK,EAAE,MAAM,KACV,MAAM,CAAC;IAEZ;;OAEG;IACM,OAAO,CAAC,UAAU,CAAS;IAEX,OAAO,CAAC,YAAY,CAAe;IAE5D,8EAA8E;IAC9E,OAAO,CAAC,eAAe,CAAwB;IAE/C,gEAAgE;IAChE,OAAO,CAAC,uBAAuB,CAExB;IAEP,MAAM,CAAC,MAAM,4BAAkB;;IAiB/B,oBAAoB;IAMpB;;OAEG;IACH,OAAO,KAAK,UAAU,GAIrB;IAED;;OAEG;IACH,OAAO,KAAK,aAAa,GAaxB;IAED;;;;OAIG;IACH,OAAO,CAAC,UAAU;IAkBlB;;;OAGG;IACH,OAAO,CAAC,uBAAuB;IAwB/B;;OAEG;IACH,OAAO,CAAC,eAAe;IAgCvB;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAkCxB;;OAEG;IACH,OAAO,CAAC,aAAa;IAmDrB,MAAM;CA8EP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,QAAQ,CAAC;KACvB;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slider.style.d.ts","sourceRoot":"","sources":["../../../source/components/slider/slider.style.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,yBAmMxB,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
export type SpinnerSize = 'sm' | 'md' | 'lg';
|
|
3
|
+
export type SpinnerVariant = 'primary' | 'success' | 'error' | 'warning' | 'inverse' | 'neutral';
|
|
4
|
+
/**
|
|
5
|
+
* A loading spinner component that indicates content is being loaded or processed.
|
|
6
|
+
* Supports multiple sizes, variants, and an optional label for accessibility.
|
|
7
|
+
*/
|
|
8
|
+
export declare class BpSpinner extends LitElement {
|
|
9
|
+
/**
|
|
10
|
+
* Size of the spinner.
|
|
11
|
+
* @type {'sm' | 'md' | 'lg'}
|
|
12
|
+
* @default 'md'
|
|
13
|
+
*/
|
|
14
|
+
size: SpinnerSize;
|
|
15
|
+
/**
|
|
16
|
+
* Visual variant of the spinner.
|
|
17
|
+
* @type {'primary' | 'success' | 'error' | 'warning' | 'inverse' | 'neutral'}
|
|
18
|
+
* @default 'primary'
|
|
19
|
+
*/
|
|
20
|
+
variant: SpinnerVariant;
|
|
21
|
+
/**
|
|
22
|
+
* Accessible label for screen readers.
|
|
23
|
+
* @type {string}
|
|
24
|
+
* @default 'Loading...'
|
|
25
|
+
*/
|
|
26
|
+
label: string;
|
|
27
|
+
static styles: import("lit").CSSResult[];
|
|
28
|
+
constructor();
|
|
29
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
30
|
+
}
|
|
31
|
+
declare global {
|
|
32
|
+
interface HTMLElementTagNameMap {
|
|
33
|
+
'bp-spinner': BpSpinner;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=spinner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spinner.d.ts","sourceRoot":"","sources":["../../../source/components/spinner/spinner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAIvC,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAC7C,MAAM,MAAM,cAAc,GACtB,SAAS,GACT,SAAS,GACT,OAAO,GACP,SAAS,GACT,SAAS,GACT,SAAS,CAAC;AAEd;;;GAGG;AACH,qBACa,SAAU,SAAQ,UAAU;IACvC;;;;OAIG;IACgD,IAAI,EAAE,WAAW,CAAC;IAErE;;;;OAIG;IACgD,OAAO,EAAE,cAAc,CAAC;IAE3E;;;;OAIG;IACgD,KAAK,EAAE,MAAM,CAAC;IAEjE,MAAM,CAAC,MAAM,4BAAmB;;IAShC,MAAM;CAYP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,YAAY,EAAE,SAAS,CAAC;KACzB;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spinner.style.d.ts","sourceRoot":"","sources":["../../../source/components/spinner/spinner.style.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,yBA2FzB,CAAC"}
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
import { LitElement, PropertyValues } from 'lit';
|
|
2
|
+
/**
|
|
3
|
+
* Step status
|
|
4
|
+
*/
|
|
5
|
+
export type StepStatus = 'pending' | 'current' | 'complete' | 'error';
|
|
6
|
+
/**
|
|
7
|
+
* Stepper orientation
|
|
8
|
+
*/
|
|
9
|
+
export type StepperOrientation = 'horizontal' | 'vertical';
|
|
10
|
+
/**
|
|
11
|
+
* Stepper size
|
|
12
|
+
*/
|
|
13
|
+
export type StepperSize = 'sm' | 'md' | 'lg';
|
|
14
|
+
/**
|
|
15
|
+
* Step configuration interface
|
|
16
|
+
*/
|
|
17
|
+
export interface Step {
|
|
18
|
+
/** Unique identifier for the step */
|
|
19
|
+
id: string;
|
|
20
|
+
/** Display label for the step */
|
|
21
|
+
label: string;
|
|
22
|
+
/** Optional description text */
|
|
23
|
+
description?: string;
|
|
24
|
+
/** Whether the step is disabled */
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
/** Optional icon name (uses step number if not provided) */
|
|
27
|
+
icon?: string;
|
|
28
|
+
/** Optional error message when step has error status */
|
|
29
|
+
error?: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* A stepper component for multi-step workflows and wizards.
|
|
33
|
+
* Provides visual progress indication through a series of numbered or labeled steps.
|
|
34
|
+
*
|
|
35
|
+
* @element bp-stepper
|
|
36
|
+
*
|
|
37
|
+
* @property {Step[]} steps - Array of step configurations
|
|
38
|
+
* @property {number} currentStep - Zero-based index of the current step
|
|
39
|
+
* @property {StepperOrientation} orientation - Layout orientation
|
|
40
|
+
* @property {StepperSize} size - Component size variant
|
|
41
|
+
* @property {boolean} linear - Whether steps must be completed in order
|
|
42
|
+
* @property {boolean} disabled - Whether the entire stepper is disabled
|
|
43
|
+
* @property {boolean} hideLabels - Hide step labels (show only indicators)
|
|
44
|
+
* @property {boolean} clickable - Whether completed steps are clickable to navigate
|
|
45
|
+
*
|
|
46
|
+
* @slot step-{id} - Custom content for a specific step panel
|
|
47
|
+
* @slot actions - Navigation buttons (next/prev)
|
|
48
|
+
*
|
|
49
|
+
* @fires bp-step-change - Fired when the current step changes
|
|
50
|
+
* @fires bp-step-complete - Fired when a step is marked complete
|
|
51
|
+
* @fires bp-step-click - Fired when a step indicator is clicked
|
|
52
|
+
*
|
|
53
|
+
* @csspart stepper - The main stepper container
|
|
54
|
+
* @csspart step-list - The step indicators container
|
|
55
|
+
* @csspart step - Individual step container
|
|
56
|
+
* @csspart step-indicator - The step number/icon circle
|
|
57
|
+
* @csspart step-content - The step label and description area
|
|
58
|
+
* @csspart step-label - The step label text
|
|
59
|
+
* @csspart step-description - The step description text
|
|
60
|
+
* @csspart connector - The line connecting steps
|
|
61
|
+
* @csspart panel - The content panel for the current step
|
|
62
|
+
* @csspart actions - The navigation actions container
|
|
63
|
+
*/
|
|
64
|
+
export declare class BpStepper extends LitElement {
|
|
65
|
+
/**
|
|
66
|
+
* Array of step configurations
|
|
67
|
+
*/
|
|
68
|
+
steps: Step[];
|
|
69
|
+
/**
|
|
70
|
+
* Zero-based index of the current step
|
|
71
|
+
*/
|
|
72
|
+
currentStep: number;
|
|
73
|
+
/**
|
|
74
|
+
* Layout orientation
|
|
75
|
+
*/
|
|
76
|
+
orientation: StepperOrientation;
|
|
77
|
+
/**
|
|
78
|
+
* Component size variant
|
|
79
|
+
*/
|
|
80
|
+
size: StepperSize;
|
|
81
|
+
/**
|
|
82
|
+
* Whether steps must be completed in order
|
|
83
|
+
*/
|
|
84
|
+
linear: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Whether the entire stepper is disabled
|
|
87
|
+
*/
|
|
88
|
+
disabled: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* Hide step labels (show only indicators)
|
|
91
|
+
*/
|
|
92
|
+
hideLabels: boolean;
|
|
93
|
+
/**
|
|
94
|
+
* Whether completed steps are clickable to navigate back
|
|
95
|
+
*/
|
|
96
|
+
clickable: boolean;
|
|
97
|
+
/**
|
|
98
|
+
* Show built-in navigation buttons (Previous/Next)
|
|
99
|
+
*/
|
|
100
|
+
showNavigation: boolean;
|
|
101
|
+
/**
|
|
102
|
+
* Tracks which steps have been completed
|
|
103
|
+
*/
|
|
104
|
+
private completedSteps;
|
|
105
|
+
/**
|
|
106
|
+
* Tracks which steps have errors
|
|
107
|
+
*/
|
|
108
|
+
private errorSteps;
|
|
109
|
+
/**
|
|
110
|
+
* Tracks whether the panel slot has any assigned content
|
|
111
|
+
*/
|
|
112
|
+
private panelHasContent;
|
|
113
|
+
static styles: import("lit").CSSResult[];
|
|
114
|
+
constructor();
|
|
115
|
+
protected willUpdate(changedProperties: PropertyValues): void;
|
|
116
|
+
/**
|
|
117
|
+
* Get the status of a step based on index
|
|
118
|
+
* @param index Zero-based step index
|
|
119
|
+
* @returns Step status (pending, current, complete, or error)
|
|
120
|
+
*/
|
|
121
|
+
private _getStepStatus;
|
|
122
|
+
/**
|
|
123
|
+
* Check if a step is clickable based on linear mode and step state
|
|
124
|
+
* @param index Zero-based step index
|
|
125
|
+
* @param step Step configuration
|
|
126
|
+
* @returns True if the step can be clicked to navigate
|
|
127
|
+
*/
|
|
128
|
+
private _isStepClickable;
|
|
129
|
+
/**
|
|
130
|
+
* Handle click events on step indicators
|
|
131
|
+
* Validates clickability and emits bp-step-click event before navigating
|
|
132
|
+
* @param index Zero-based step index that was clicked
|
|
133
|
+
* @param step Step configuration
|
|
134
|
+
*/
|
|
135
|
+
private _handleStepClick;
|
|
136
|
+
/**
|
|
137
|
+
* Handle keyboard navigation on step indicators
|
|
138
|
+
* Supports Enter/Space for activation and Arrow keys for focus movement
|
|
139
|
+
* @param event Keyboard event
|
|
140
|
+
* @param index Zero-based step index
|
|
141
|
+
* @param step Step configuration
|
|
142
|
+
*/
|
|
143
|
+
private _handleStepKeydown;
|
|
144
|
+
/**
|
|
145
|
+
* Focus a specific step indicator element
|
|
146
|
+
* @param index Zero-based step index to focus
|
|
147
|
+
*/
|
|
148
|
+
private _focusStep;
|
|
149
|
+
/**
|
|
150
|
+
* Emit bp-step-change event when navigating between steps
|
|
151
|
+
* @param index Zero-based step index navigated to
|
|
152
|
+
* @param step Step configuration
|
|
153
|
+
*/
|
|
154
|
+
private _emitStepChange;
|
|
155
|
+
/**
|
|
156
|
+
* Navigate to the next step
|
|
157
|
+
*/
|
|
158
|
+
next(): boolean;
|
|
159
|
+
/**
|
|
160
|
+
* Navigate to the previous step
|
|
161
|
+
*/
|
|
162
|
+
previous(): boolean;
|
|
163
|
+
/**
|
|
164
|
+
* Go to a specific step
|
|
165
|
+
*/
|
|
166
|
+
goToStep(index: number): boolean;
|
|
167
|
+
/**
|
|
168
|
+
* Mark a step as having an error
|
|
169
|
+
*/
|
|
170
|
+
setStepError(index: number, hasError: boolean): void;
|
|
171
|
+
/**
|
|
172
|
+
* Mark a step as complete
|
|
173
|
+
*/
|
|
174
|
+
setStepComplete(index: number, complete: boolean): void;
|
|
175
|
+
/**
|
|
176
|
+
* Reset the stepper to the first step
|
|
177
|
+
*/
|
|
178
|
+
reset(): void;
|
|
179
|
+
/**
|
|
180
|
+
* Check if we're on the first step
|
|
181
|
+
*/
|
|
182
|
+
get isFirstStep(): boolean;
|
|
183
|
+
/**
|
|
184
|
+
* Check if we're on the last step
|
|
185
|
+
*/
|
|
186
|
+
get isLastStep(): boolean;
|
|
187
|
+
/**
|
|
188
|
+
* Get the current step configuration
|
|
189
|
+
*/
|
|
190
|
+
get currentStepConfig(): Step | undefined;
|
|
191
|
+
/**
|
|
192
|
+
* Render the step indicator (number circle with optional icon)
|
|
193
|
+
* Shows checkmark for complete, X for error, or step number for other states
|
|
194
|
+
* @param index Zero-based step index
|
|
195
|
+
* @param status Current step status
|
|
196
|
+
* @returns TemplateResult for step indicator
|
|
197
|
+
*/
|
|
198
|
+
private _renderStepIndicator;
|
|
199
|
+
/**
|
|
200
|
+
* Render a complete step with indicator, label, description, and connector
|
|
201
|
+
* @param step Step configuration
|
|
202
|
+
* @param index Zero-based step index
|
|
203
|
+
* @returns TemplateResult for step
|
|
204
|
+
*/
|
|
205
|
+
private _renderStep;
|
|
206
|
+
/**
|
|
207
|
+
* Handle slotchange on the panel slot to track whether content is provided
|
|
208
|
+
*/
|
|
209
|
+
private _handlePanelSlotChange;
|
|
210
|
+
/**
|
|
211
|
+
* Render the content panel for the current step
|
|
212
|
+
* Shows slotted content via step-{id} slot
|
|
213
|
+
* @returns TemplateResult for panel or nothing if no current step
|
|
214
|
+
*/
|
|
215
|
+
private _renderPanel;
|
|
216
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
217
|
+
/**
|
|
218
|
+
* Render default navigation buttons (Previous/Next)
|
|
219
|
+
* Only shown when showNavigation is true and no custom actions are slotted
|
|
220
|
+
*/
|
|
221
|
+
private _renderDefaultNavigation;
|
|
222
|
+
}
|
|
223
|
+
declare global {
|
|
224
|
+
interface HTMLElementTagNameMap {
|
|
225
|
+
'bp-stepper': BpStepper;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
//# sourceMappingURL=stepper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stepper.d.ts","sourceRoot":"","sources":["../../../source/components/stepper/stepper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAiB,cAAc,EAAE,MAAM,KAAK,CAAC;AAMhE;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,GAAG,OAAO,CAAC;AAEtE;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,YAAY,GAAG,UAAU,CAAC;AAE3D;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE7C;;GAEG;AACH,MAAM,WAAW,IAAI;IACnB,qCAAqC;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,iCAAiC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,gCAAgC;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mCAAmC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,4DAA4D;IAC5D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wDAAwD;IACxD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,qBACa,SAAU,SAAQ,UAAU;IACvC;;OAEG;IACgC,KAAK,EAAE,IAAI,EAAE,CAAC;IAEjD;;OAEG;IAEK,WAAW,EAAE,MAAM,CAAC;IAE5B;;OAEG;IAEK,WAAW,EAAE,kBAAkB,CAAC;IAExC;;OAEG;IACgD,IAAI,EAAE,WAAW,CAAC;IAErE;;OAEG;IAEK,MAAM,EAAE,OAAO,CAAC;IAExB;;OAEG;IACiD,QAAQ,EAAE,OAAO,CAAC;IAEtE;;OAEG;IAEK,UAAU,EAAE,OAAO,CAAC;IAE5B;;OAEG;IAEK,SAAS,EAAE,OAAO,CAAC;IAE3B;;OAEG;IAMK,cAAc,EAAE,OAAO,CAAC;IAEhC;;OAEG;IACM,OAAO,CAAC,cAAc,CAA0B;IAEzD;;OAEG;IACM,OAAO,CAAC,UAAU,CAA0B;IAErD;;OAEG;IACM,OAAO,CAAC,eAAe,CAAS;IAEzC,MAAM,CAAC,MAAM,4BAAmB;;IAehC,SAAS,CAAC,UAAU,CAAC,iBAAiB,EAAE,cAAc,GAAG,IAAI;IAgC7D;;;;OAIG;IACH,OAAO,CAAC,cAAc;IAiBtB;;;;;OAKG;IACH,OAAO,CAAC,gBAAgB;IAexB;;;;;OAKG;IACH,OAAO,CAAC,gBAAgB;IA4BxB;;;;;;OAMG;IACH,OAAO,CAAC,kBAAkB;IAwB1B;;;OAGG;IACH,OAAO,CAAC,UAAU;IAOlB;;;;OAIG;IACH,OAAO,CAAC,eAAe;IASvB;;OAEG;IACI,IAAI,IAAI,OAAO;IAuBtB;;OAEG;IACI,QAAQ,IAAI,OAAO;IAc1B;;OAEG;IACI,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAwBvC;;OAEG;IACI,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,GAAG,IAAI;IAU3D;;OAEG;IACI,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,GAAG,IAAI;IAU9D;;OAEG;IACI,KAAK,IAAI,IAAI;IAOpB;;OAEG;IACH,IAAW,WAAW,IAAI,OAAO,CAEhC;IAED;;OAEG;IACH,IAAW,UAAU,IAAI,OAAO,CAE/B;IAED;;OAEG;IACH,IAAW,iBAAiB,IAAI,IAAI,GAAG,SAAS,CAE/C;IAED;;;;;;OAMG;IACH,OAAO,CAAC,oBAAoB;IA2C5B;;;;;OAKG;IACH,OAAO,CAAC,WAAW;IAgDnB;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAK9B;;;;OAIG;IACH,OAAO,CAAC,YAAY;IAqBpB,MAAM;IA6BN;;;OAGG;IACH,OAAO,CAAC,wBAAwB;CAoBjC;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,YAAY,EAAE,SAAS,CAAC;KACzB;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stepper.style.d.ts","sourceRoot":"","sources":["../../../source/components/stepper/stepper.style.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,yBAmazB,CAAC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
export type SwitchSize = 'sm' | 'md' | 'lg';
|
|
3
|
+
/**
|
|
4
|
+
* A toggle switch component for binary on/off states with form integration.
|
|
5
|
+
*
|
|
6
|
+
* @element bp-switch
|
|
7
|
+
*
|
|
8
|
+
* @fires {CustomEvent} bp-change - Fired when the checked state changes
|
|
9
|
+
* @fires {CustomEvent} bp-focus - Fired when the switch receives focus
|
|
10
|
+
* @fires {CustomEvent} bp-blur - Fired when the switch loses focus
|
|
11
|
+
*
|
|
12
|
+
* @slot - The label text for the switch
|
|
13
|
+
*
|
|
14
|
+
* @csspart switch - The switch container (label)
|
|
15
|
+
* @csspart input - The native checkbox input element
|
|
16
|
+
* @csspart track - The switch track background
|
|
17
|
+
* @csspart thumb - The switch thumb/handle
|
|
18
|
+
* @csspart label - The label text container
|
|
19
|
+
*/
|
|
20
|
+
export declare class BpSwitch extends LitElement {
|
|
21
|
+
/**
|
|
22
|
+
* Whether the switch is in the on (checked) position
|
|
23
|
+
*/
|
|
24
|
+
checked: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Whether the switch is disabled
|
|
27
|
+
*/
|
|
28
|
+
disabled: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Whether the switch is required
|
|
31
|
+
*/
|
|
32
|
+
required: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* The name attribute for form submission
|
|
35
|
+
*/
|
|
36
|
+
name: string;
|
|
37
|
+
/**
|
|
38
|
+
* The value attribute for form submission
|
|
39
|
+
*/
|
|
40
|
+
value: string;
|
|
41
|
+
/**
|
|
42
|
+
* The size of the switch
|
|
43
|
+
*/
|
|
44
|
+
size: SwitchSize;
|
|
45
|
+
/**
|
|
46
|
+
* Whether the switch has an error state
|
|
47
|
+
*/
|
|
48
|
+
error: boolean;
|
|
49
|
+
private hasFocus;
|
|
50
|
+
private input;
|
|
51
|
+
static styles: import("lit").CSSResult[];
|
|
52
|
+
static formAssociated: boolean;
|
|
53
|
+
private internals;
|
|
54
|
+
constructor();
|
|
55
|
+
/**
|
|
56
|
+
* Handle input change events
|
|
57
|
+
*/
|
|
58
|
+
private handleChange;
|
|
59
|
+
/**
|
|
60
|
+
* Handle focus events
|
|
61
|
+
*/
|
|
62
|
+
private handleFocus;
|
|
63
|
+
/**
|
|
64
|
+
* Handle blur events
|
|
65
|
+
*/
|
|
66
|
+
private handleBlur;
|
|
67
|
+
/**
|
|
68
|
+
* Handle label click to toggle the switch
|
|
69
|
+
*/
|
|
70
|
+
private handleLabelClick;
|
|
71
|
+
/**
|
|
72
|
+
* Sets focus on the switch.
|
|
73
|
+
*/
|
|
74
|
+
focus(options?: FocusOptions): void;
|
|
75
|
+
/**
|
|
76
|
+
* Removes focus from the switch.
|
|
77
|
+
*/
|
|
78
|
+
blur(): void;
|
|
79
|
+
/**
|
|
80
|
+
* Lifecycle callback when properties change
|
|
81
|
+
*/
|
|
82
|
+
updated(changedProperties: Map<string, unknown>): void;
|
|
83
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
84
|
+
}
|
|
85
|
+
declare global {
|
|
86
|
+
interface HTMLElementTagNameMap {
|
|
87
|
+
'bp-switch': BpSwitch;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=switch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../../source/components/switch/switch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAMvC,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE5C;;;;;;;;;;;;;;;;GAgBG;AACH,qBACa,QAAS,SAAQ,UAAU;IACtC;;OAEG;IAEK,OAAO,EAAE,OAAO,CAAC;IAEzB;;OAEG;IAEK,QAAQ,EAAE,OAAO,CAAC;IAE1B;;OAEG;IAEK,QAAQ,EAAE,OAAO,CAAC;IAE1B;;OAEG;IAEK,IAAI,EAAE,MAAM,CAAC;IAErB;;OAEG;IAEK,KAAK,EAAE,MAAM,CAAC;IAEtB;;OAEG;IAEK,IAAI,EAAE,UAAU,CAAC;IAEzB;;OAEG;IAEK,KAAK,EAAE,OAAO,CAAC;IAGvB,OAAO,CAAC,QAAQ,CAAS;IAGzB,OAAO,CAAC,KAAK,CAAoB;IAEjC,MAAM,CAAC,MAAM,4BAAkB;IAE/B,MAAM,CAAC,cAAc,UAAQ;IAE7B,OAAO,CAAC,SAAS,CAAiC;;IAkBlD;;OAEG;IACH,OAAO,CAAC,YAAY;IAmBpB;;OAEG;IACH,OAAO,CAAC,WAAW;IAUnB;;OAEG;IACH,OAAO,CAAC,UAAU;IAUlB;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAOxB;;OAEG;IAEH,KAAK,CAAC,OAAO,CAAC,EAAE,YAAY;IAI5B;;OAEG;IACH,IAAI;IAIJ;;OAEG;IACH,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;IAM/C,MAAM;CAkCP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,QAAQ,CAAC;KACvB;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"switch.style.d.ts","sourceRoot":"","sources":["../../../source/components/switch/switch.style.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,yBA4OxB,CAAC"}
|