@prioticket/design-system-web 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/COMPONENT-DOCUMENTATION.md +608 -0
- package/README.md +229 -0
- package/component-documentation.json +1681 -0
- package/dist/components/pd-button.cjs.js +99 -0
- package/dist/components/pd-button.es.js +156 -0
- package/dist/components/pd-card.cjs.js +59 -0
- package/dist/components/pd-card.es.js +93 -0
- package/dist/components/pd-checkbox.cjs.js +85 -0
- package/dist/components/pd-checkbox.es.js +154 -0
- package/dist/components/pd-chip.cjs.js +118 -0
- package/dist/components/pd-chip.es.js +220 -0
- package/dist/components/pd-dialog.cjs.js +195 -0
- package/dist/components/pd-dialog.es.js +285 -0
- package/dist/components/pd-expandable-card.cjs.js +134 -0
- package/dist/components/pd-expandable-card.es.js +205 -0
- package/dist/components/pd-fab.cjs.js +119 -0
- package/dist/components/pd-fab.es.js +179 -0
- package/dist/components/pd-icon-button.cjs.js +159 -0
- package/dist/components/pd-icon-button.es.js +268 -0
- package/dist/components/pd-icon.cjs.js +71 -0
- package/dist/components/pd-icon.es.js +102 -0
- package/dist/components/pd-list.cjs.js +108 -0
- package/dist/components/pd-list.es.js +229 -0
- package/dist/components/pd-menu-item.cjs.js +85 -0
- package/dist/components/pd-menu-item.es.js +156 -0
- package/dist/components/pd-menu.cjs.js +42 -0
- package/dist/components/pd-menu.es.js +122 -0
- package/dist/components/pd-progress.cjs.js +72 -0
- package/dist/components/pd-progress.es.js +119 -0
- package/dist/components/pd-radio.cjs.js +38 -0
- package/dist/components/pd-radio.es.js +153 -0
- package/dist/components/pd-segmented-button.cjs.js +135 -0
- package/dist/components/pd-segmented-button.es.js +234 -0
- package/dist/components/pd-segmented-stepper.cjs.js +191 -0
- package/dist/components/pd-segmented-stepper.es.js +333 -0
- package/dist/components/pd-select.cjs.js +59 -0
- package/dist/components/pd-select.es.js +136 -0
- package/dist/components/pd-slider.cjs.js +42 -0
- package/dist/components/pd-slider.es.js +123 -0
- package/dist/components/pd-stepper.cjs.js +279 -0
- package/dist/components/pd-stepper.es.js +375 -0
- package/dist/components/pd-switch.cjs.js +57 -0
- package/dist/components/pd-switch.es.js +126 -0
- package/dist/components/pd-tabs.cjs.js +32 -0
- package/dist/components/pd-tabs.es.js +139 -0
- package/dist/components/pd-text-field.cjs.js +86 -0
- package/dist/components/pd-text-field.es.js +202 -0
- package/dist/design-system-web.css +1 -0
- package/dist/fonts/ProximaNova-Bold.woff2 +0 -0
- package/dist/fonts/ProximaNova-Extrabld.woff2 +0 -0
- package/dist/fonts/ProximaNova-Light.woff2 +0 -0
- package/dist/fonts/ProximaNova-Medium.woff2 +0 -0
- package/dist/fonts/ProximaNova-Regular.woff2 +0 -0
- package/dist/fonts/ProximaNova-Semibold.woff2 +0 -0
- package/dist/fonts/ProximaNovaCond-Semibold.woff2 +0 -0
- package/dist/fonts-only.css +59 -0
- package/dist/fonts.cjs.js +1 -0
- package/dist/fonts.es.js +1 -0
- package/dist/prioticket-design-system-web.cjs.js +1 -0
- package/dist/prioticket-design-system-web.es.js +52 -0
- package/dist/theme-only.css +311 -0
- package/dist/theme-with-fonts.cjs.js +1 -0
- package/dist/theme-with-fonts.css +372 -0
- package/dist/theme-with-fonts.es.js +2 -0
- package/dist/theme.cjs.js +1 -0
- package/dist/theme.es.js +1 -0
- package/dist/types/components/pd-button.d.ts +30 -0
- package/dist/types/components/pd-card.d.ts +8 -0
- package/dist/types/components/pd-checkbox.d.ts +16 -0
- package/dist/types/components/pd-chip.d.ts +26 -0
- package/dist/types/components/pd-dialog.d.ts +49 -0
- package/dist/types/components/pd-expandable-card.d.ts +39 -0
- package/dist/types/components/pd-fab.d.ts +17 -0
- package/dist/types/components/pd-icon-button.d.ts +24 -0
- package/dist/types/components/pd-icon.d.ts +9 -0
- package/dist/types/components/pd-list.d.ts +36 -0
- package/dist/types/components/pd-menu-item.d.ts +38 -0
- package/dist/types/components/pd-menu.d.ts +58 -0
- package/dist/types/components/pd-progress.d.ts +30 -0
- package/dist/types/components/pd-radio.d.ts +54 -0
- package/dist/types/components/pd-segmented-button.d.ts +53 -0
- package/dist/types/components/pd-segmented-stepper.d.ts +65 -0
- package/dist/types/components/pd-select.d.ts +46 -0
- package/dist/types/components/pd-slider.d.ts +43 -0
- package/dist/types/components/pd-stepper.d.ts +47 -0
- package/dist/types/components/pd-switch.d.ts +37 -0
- package/dist/types/components/pd-tabs.d.ts +54 -0
- package/dist/types/components/pd-text-field.d.ts +30 -0
- package/dist/types/fonts.d.ts +1 -0
- package/dist/types/index.d.ts +22 -0
- package/dist/types/theme-with-fonts.d.ts +2 -0
- package/dist/types/theme.d.ts +1 -0
- package/package.json +93 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import '@material/web/menu/menu-item.js';
|
|
3
|
+
import '@material/web/icon/icon.js';
|
|
4
|
+
/**
|
|
5
|
+
* @customElement pd-menu-item
|
|
6
|
+
* @summary A menu item component for use within pd-menu.
|
|
7
|
+
*
|
|
8
|
+
* @slot - The main content of the menu item
|
|
9
|
+
* @slot start - Content at the start of the menu item (e.g., icon)
|
|
10
|
+
* @slot end - Content at the end of the menu item (e.g., shortcut text)
|
|
11
|
+
*
|
|
12
|
+
* @fires close-menu - Fired when the menu should be closed (usually on selection)
|
|
13
|
+
*/
|
|
14
|
+
export declare class PdMenuItemM extends LitElement {
|
|
15
|
+
/** Whether the menu item is disabled */
|
|
16
|
+
disabled: boolean;
|
|
17
|
+
/** The type of menu item */
|
|
18
|
+
type: 'menuitem' | 'option' | 'button';
|
|
19
|
+
/** The href for link-type menu items */
|
|
20
|
+
href: string;
|
|
21
|
+
/** The target for link-type menu items */
|
|
22
|
+
target: string;
|
|
23
|
+
/** Whether to keep the menu open after selection */
|
|
24
|
+
keepOpen: boolean;
|
|
25
|
+
/** Whether the menu item is selected (for option type) */
|
|
26
|
+
selected: boolean;
|
|
27
|
+
/** Leading icon name */
|
|
28
|
+
leadingIcon: string;
|
|
29
|
+
/** Trailing icon name */
|
|
30
|
+
trailingIcon: string;
|
|
31
|
+
/** Text content for simple menu items */
|
|
32
|
+
text: string;
|
|
33
|
+
/** Supporting text (subtitle) */
|
|
34
|
+
supportingText: string;
|
|
35
|
+
private _handleClick;
|
|
36
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
37
|
+
static styles: import("lit").CSSResult;
|
|
38
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import '@material/web/menu/menu-item.js';
|
|
3
|
+
/**
|
|
4
|
+
* @customElement pd-menu
|
|
5
|
+
* @summary A thin wrapper around the Material Web Menu component.
|
|
6
|
+
*
|
|
7
|
+
* @slot - Default slot for `pd-menu-item` elements.
|
|
8
|
+
*
|
|
9
|
+
* @cssprop --pd-menu-container-shape - The shape of the menu container.
|
|
10
|
+
* @cssprop --pd-menu-container-color - The background color of the menu.
|
|
11
|
+
* @cssprop --pd-menu-container-elevation - The box-shadow for the menu container.
|
|
12
|
+
*/
|
|
13
|
+
export declare class PdMenu extends LitElement {
|
|
14
|
+
private readonly menu;
|
|
15
|
+
/**
|
|
16
|
+
* The ID of the element to anchor the menu to.
|
|
17
|
+
* The element must be in the same root node as the menu.
|
|
18
|
+
*/
|
|
19
|
+
anchor: string;
|
|
20
|
+
/**
|
|
21
|
+
* Reference to the element to anchor the menu to.
|
|
22
|
+
* Overrides `anchor`.
|
|
23
|
+
*/
|
|
24
|
+
anchorElement?: HTMLElement;
|
|
25
|
+
/** Controls whether the menu is open or closed. */
|
|
26
|
+
open: boolean;
|
|
27
|
+
/** The positioning strategy for the menu. */
|
|
28
|
+
positioning: 'absolute' | 'fixed' | 'document' | 'popover';
|
|
29
|
+
/** Corner of the anchor to align the menu to. */
|
|
30
|
+
anchorCorner: 'end-start' | 'end-end' | 'start-start' | 'start-end';
|
|
31
|
+
/** Corner of the menu to align with the anchor corner. */
|
|
32
|
+
menuCorner: 'end-start' | 'end-end' | 'start-start' | 'start-end';
|
|
33
|
+
/** Skips the opening and closing animations. */
|
|
34
|
+
quick: boolean;
|
|
35
|
+
/** Whether the menu has an overflow submenu. */
|
|
36
|
+
hasOverflow: boolean;
|
|
37
|
+
/** Horizontal offset of the menu from the anchor. */
|
|
38
|
+
xOffset: number;
|
|
39
|
+
/** Vertical offset of the menu from the anchor. */
|
|
40
|
+
yOffset: number;
|
|
41
|
+
/** Determines the default focus state of the menu. */
|
|
42
|
+
defaultFocus: 'none' | 'list-root' | 'first-item' | 'last-item';
|
|
43
|
+
/** Whether the menu should remain open when focus leaves the menu. */
|
|
44
|
+
stayOpenOnFocusout: boolean;
|
|
45
|
+
/** Whether the menu should remain open when clicking outside the menu. */
|
|
46
|
+
stayOpenOnOutsideClick: boolean;
|
|
47
|
+
/** Whether to skip restoring focus to the anchor when the menu closes. */
|
|
48
|
+
skipRestoreFocus: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* FIX: This is the crucial change.
|
|
51
|
+
* Instead of `firstUpdated`, we use `updated` to react to property changes.
|
|
52
|
+
* We search for the anchor element within the component's root node,
|
|
53
|
+
* which correctly handles Shadow DOM boundaries.
|
|
54
|
+
*/
|
|
55
|
+
updated(changedProperties: Map<string, unknown>): void;
|
|
56
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
57
|
+
static styles: import("lit").CSSResult;
|
|
58
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import '@material/web/progress/circular-progress.js';
|
|
3
|
+
import '@material/web/progress/linear-progress.js';
|
|
4
|
+
/**
|
|
5
|
+
* @customElement pd-progress
|
|
6
|
+
* @summary A thin wrapper around the Material Web Progress components.
|
|
7
|
+
*
|
|
8
|
+
* @cssprop --pd-progress-active-indicator-color - The color of the active progress indicator.
|
|
9
|
+
* @cssprop --pd-progress-track-color - The color of the progress track.
|
|
10
|
+
*/
|
|
11
|
+
export declare class PdProgress extends LitElement {
|
|
12
|
+
/** The type of progress indicator. */
|
|
13
|
+
type: 'linear' | 'circular';
|
|
14
|
+
/** The progress value (0-1). When undefined, shows indeterminate progress. */
|
|
15
|
+
value?: number;
|
|
16
|
+
/** The maximum value for the progress (used for buffer). */
|
|
17
|
+
max: number;
|
|
18
|
+
/** The buffer value (0-max) for linear progress showing buffered content. */
|
|
19
|
+
buffer?: number;
|
|
20
|
+
/** Whether the progress indicator should be indeterminate. */
|
|
21
|
+
indeterminate: boolean;
|
|
22
|
+
/** Whether the progress indicator is visible. */
|
|
23
|
+
visible: boolean;
|
|
24
|
+
/** Size variant for circular progress. */
|
|
25
|
+
size: 'small' | 'medium' | 'large';
|
|
26
|
+
/** The aria label for accessibility. */
|
|
27
|
+
ariaLabel: string;
|
|
28
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
29
|
+
static styles: import("lit").CSSResult;
|
|
30
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import '@material/web/radio/radio.js';
|
|
3
|
+
/**
|
|
4
|
+
* @customElement pd-radio
|
|
5
|
+
* @summary A thin wrapper around the Material Web Radio component.
|
|
6
|
+
*
|
|
7
|
+
* @cssprop --pd-radio-selected-icon-color - The color of the selected radio icon.
|
|
8
|
+
* @cssprop --pd-radio-unselected-icon-color - The color of the unselected radio icon.
|
|
9
|
+
* @cssprop --pd-radio-icon-size - The size of the radio icon.
|
|
10
|
+
*/
|
|
11
|
+
export declare class PdRadio extends LitElement {
|
|
12
|
+
private readonly radio;
|
|
13
|
+
/** Whether the radio is checked. */
|
|
14
|
+
checked: boolean;
|
|
15
|
+
/** Whether the radio is disabled. */
|
|
16
|
+
disabled: boolean;
|
|
17
|
+
/** The name attribute for form grouping. */
|
|
18
|
+
name: string;
|
|
19
|
+
/** The value attribute for form submission. */
|
|
20
|
+
value: string;
|
|
21
|
+
/** The aria label for accessibility. */
|
|
22
|
+
ariaLabel: string;
|
|
23
|
+
/** The aria-describedby attribute for accessibility. */
|
|
24
|
+
ariaDescribedby: string;
|
|
25
|
+
/** Whether the radio is required in a form. */
|
|
26
|
+
required: boolean;
|
|
27
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
28
|
+
private handleChange;
|
|
29
|
+
private handleInput;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* @customElement pd-radio-group
|
|
33
|
+
* @summary A container for grouping pd-radio elements.
|
|
34
|
+
*/
|
|
35
|
+
export declare class PdRadioGroup extends LitElement {
|
|
36
|
+
/** The name for all radio buttons in this group. */
|
|
37
|
+
name: string;
|
|
38
|
+
/** The currently selected value. */
|
|
39
|
+
value: string;
|
|
40
|
+
/** Whether the radio group is disabled. */
|
|
41
|
+
disabled: boolean;
|
|
42
|
+
/** Whether the radio group is required. */
|
|
43
|
+
required: boolean;
|
|
44
|
+
/** The aria-label for the radio group. */
|
|
45
|
+
ariaLabel: string;
|
|
46
|
+
/** The aria-labelledby for the radio group. */
|
|
47
|
+
ariaLabelledby: string;
|
|
48
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
49
|
+
firstUpdated(): void;
|
|
50
|
+
updated(changedProperties: Map<string, any>): void;
|
|
51
|
+
private updateRadioButtons;
|
|
52
|
+
private handleChange;
|
|
53
|
+
static styles: import("lit").CSSResult;
|
|
54
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import '@material/web/icon/icon.js';
|
|
3
|
+
/**
|
|
4
|
+
* @customElement pd-segmented-button
|
|
5
|
+
* @summary A segmented button component that allows users to select from multiple options.
|
|
6
|
+
*
|
|
7
|
+
* @slot - The default slot for pd-segment-item elements.
|
|
8
|
+
*
|
|
9
|
+
* @fires selectionchange - Fired when the selection changes.
|
|
10
|
+
*
|
|
11
|
+
* @cssprop --md-segmented-button-container-height - Override the default container height.
|
|
12
|
+
* @cssprop --md-segmented-button-shape - Override the default border radius.
|
|
13
|
+
*/
|
|
14
|
+
export declare class PdSegmentedButton extends LitElement {
|
|
15
|
+
/** Whether multiple segments can be selected simultaneously. */
|
|
16
|
+
multiSelect: boolean;
|
|
17
|
+
/** The size of the segmented button. */
|
|
18
|
+
size: 'small' | 'medium' | 'large';
|
|
19
|
+
/** Whether the segmented button is disabled. */
|
|
20
|
+
disabled: boolean;
|
|
21
|
+
/** Array of selected segment values. */
|
|
22
|
+
selectedValues: string[];
|
|
23
|
+
private _segments;
|
|
24
|
+
connectedCallback(): void;
|
|
25
|
+
disconnectedCallback(): void;
|
|
26
|
+
firstUpdated(): void;
|
|
27
|
+
private _updateSegments;
|
|
28
|
+
private _handleSegmentClick;
|
|
29
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
30
|
+
static styles: import("lit").CSSResult;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* @customElement pd-segment-item
|
|
34
|
+
* @summary An individual segment item for use within pd-segmented-button.
|
|
35
|
+
*
|
|
36
|
+
* @slot - The default slot for the segment's content.
|
|
37
|
+
* @slot icon - The slot for an icon.
|
|
38
|
+
*/
|
|
39
|
+
export declare class PdSegmentItem extends LitElement {
|
|
40
|
+
/** The value associated with this segment. */
|
|
41
|
+
value: string;
|
|
42
|
+
/** Whether this segment is selected. */
|
|
43
|
+
selected: boolean;
|
|
44
|
+
/** Whether this segment is disabled. */
|
|
45
|
+
disabled: boolean;
|
|
46
|
+
/** The icon to display in the segment. */
|
|
47
|
+
icon: string;
|
|
48
|
+
/** Whether to show only the icon (no text). */
|
|
49
|
+
iconOnly: boolean;
|
|
50
|
+
private _handleClick;
|
|
51
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
52
|
+
static styles: import("lit").CSSResult;
|
|
53
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import '@material/web/icon/icon.js';
|
|
3
|
+
/**
|
|
4
|
+
* @customElement pd-segmented-stepper
|
|
5
|
+
* @summary A segmented button variant that functions as a stepper with completion tracking.
|
|
6
|
+
*
|
|
7
|
+
* @slot - The default slot for pd-stepper-item elements.
|
|
8
|
+
*
|
|
9
|
+
* @fires stepchange - Fired when the active step changes.
|
|
10
|
+
* @fires stepcomplete - Fired when a step is marked as completed.
|
|
11
|
+
*/
|
|
12
|
+
export declare class PdSegmentedStepper extends LitElement {
|
|
13
|
+
/** The currently active step index (0-based). */
|
|
14
|
+
activeStep: number;
|
|
15
|
+
/** Array of completed step indices. */
|
|
16
|
+
completedSteps: number[];
|
|
17
|
+
/** The size of the stepper. */
|
|
18
|
+
size: 'small' | 'medium' | 'large';
|
|
19
|
+
/** Whether the stepper is disabled. */
|
|
20
|
+
disabled: boolean;
|
|
21
|
+
/** Whether users can click on completed steps to go back. */
|
|
22
|
+
allowStepNavigation: boolean;
|
|
23
|
+
private _steps;
|
|
24
|
+
connectedCallback(): void;
|
|
25
|
+
disconnectedCallback(): void;
|
|
26
|
+
firstUpdated(): void;
|
|
27
|
+
updated(changedProperties: Map<string, any>): void;
|
|
28
|
+
private _updateSteps;
|
|
29
|
+
private _handleStepClick;
|
|
30
|
+
/** Navigate to a specific step. */
|
|
31
|
+
goToStep(stepIndex: number): void;
|
|
32
|
+
/** Move to the next step. */
|
|
33
|
+
nextStep(): void;
|
|
34
|
+
/** Move to the previous step. */
|
|
35
|
+
previousStep(): void;
|
|
36
|
+
/** Mark the current step as completed and move to the next step. */
|
|
37
|
+
completeCurrentStep(): void;
|
|
38
|
+
/** Mark a specific step as completed. */
|
|
39
|
+
completeStep(stepIndex: number): void;
|
|
40
|
+
/** Reset all steps to pending state. */
|
|
41
|
+
reset(): void;
|
|
42
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
43
|
+
static styles: import("lit").CSSResult;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* @customElement pd-stepper-item
|
|
47
|
+
* @summary An individual step item for use within pd-segmented-stepper.
|
|
48
|
+
*
|
|
49
|
+
* @slot - The default slot for the step's content.
|
|
50
|
+
*/
|
|
51
|
+
export declare class PdStepperItem extends LitElement {
|
|
52
|
+
/** The step number (1-based, auto-assigned by parent). */
|
|
53
|
+
stepNumber: number;
|
|
54
|
+
/** The state of this step. */
|
|
55
|
+
state: 'pending' | 'active' | 'completed' | 'disabled';
|
|
56
|
+
/** Whether this step is disabled. */
|
|
57
|
+
disabled: boolean;
|
|
58
|
+
/** Whether this step can be clicked. */
|
|
59
|
+
clickable: boolean;
|
|
60
|
+
/** Optional icon to display instead of step number. */
|
|
61
|
+
icon: string;
|
|
62
|
+
private _handleClick;
|
|
63
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
64
|
+
static styles: import("lit").CSSResult;
|
|
65
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import '@material/web/select/filled-select.js';
|
|
3
|
+
import '@material/web/select/outlined-select.js';
|
|
4
|
+
import '@material/web/select/select-option.js';
|
|
5
|
+
import '@material/web/icon/icon.js';
|
|
6
|
+
export interface SelectOption {
|
|
7
|
+
value: string;
|
|
8
|
+
label: string;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* @summary A thin wrapper around the Material Web Select component.
|
|
13
|
+
* @description This component uses a data-driven approach via the `options`
|
|
14
|
+
* property to provide a clean and robust API.
|
|
15
|
+
*
|
|
16
|
+
* @event change - Fired when the selected value changes.
|
|
17
|
+
*/
|
|
18
|
+
export declare class PdSelect extends LitElement {
|
|
19
|
+
private readonly select;
|
|
20
|
+
private readonly trailingIcon;
|
|
21
|
+
/** The variant of the select field. */
|
|
22
|
+
variant: 'filled' | 'outlined';
|
|
23
|
+
/** The label for the select field. */
|
|
24
|
+
label: string;
|
|
25
|
+
/** The selected value. */
|
|
26
|
+
value: string;
|
|
27
|
+
/** Whether the select is disabled. */
|
|
28
|
+
disabled: boolean;
|
|
29
|
+
/** Whether the select is required. */
|
|
30
|
+
required: boolean;
|
|
31
|
+
/** The error message to display when `error` is true. */
|
|
32
|
+
errorText: string;
|
|
33
|
+
/** Whether the select has an error state. */
|
|
34
|
+
error: boolean;
|
|
35
|
+
/** The supporting text to display below the select. */
|
|
36
|
+
supportingText: string;
|
|
37
|
+
/** An array of options to be rendered. */
|
|
38
|
+
options: SelectOption[];
|
|
39
|
+
/** The leading icon name. */
|
|
40
|
+
leadingIcon: string;
|
|
41
|
+
private handleChange;
|
|
42
|
+
private handleOpen;
|
|
43
|
+
private handleClose;
|
|
44
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
45
|
+
static styles: import("lit").CSSResult;
|
|
46
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import '@material/web/slider/slider.js';
|
|
3
|
+
/**
|
|
4
|
+
* @customElement pd-slider
|
|
5
|
+
* @summary A thin wrapper around the Material Web Slider component.
|
|
6
|
+
*
|
|
7
|
+
* @cssprop --pd-slider-handle-color - The color of the slider handle.
|
|
8
|
+
* @cssprop --pd-slider-track-color - The color of the active slider track.
|
|
9
|
+
* @cssprop --pd-slider-track-inactive-color - The color of the inactive slider track.
|
|
10
|
+
*/
|
|
11
|
+
export declare class PdSlider extends LitElement {
|
|
12
|
+
private readonly slider;
|
|
13
|
+
/** Whether the slider is disabled. */
|
|
14
|
+
disabled: boolean;
|
|
15
|
+
/** The minimum value of the slider. */
|
|
16
|
+
min: number;
|
|
17
|
+
/** The maximum value of the slider. */
|
|
18
|
+
max: number;
|
|
19
|
+
/** The current value of the slider. */
|
|
20
|
+
value: number;
|
|
21
|
+
/** The step increment of the slider. */
|
|
22
|
+
step: number;
|
|
23
|
+
/** Whether the slider should show tick marks. */
|
|
24
|
+
ticks: boolean;
|
|
25
|
+
/** Whether the slider should show labels. */
|
|
26
|
+
labeled: boolean;
|
|
27
|
+
/** Whether the slider should show value indicators on focus/hover. */
|
|
28
|
+
valueIndicator: boolean;
|
|
29
|
+
/** The start value for a range slider (when provided, creates a range slider). */
|
|
30
|
+
valueStart?: number;
|
|
31
|
+
/** The end value for a range slider. */
|
|
32
|
+
valueEnd?: number;
|
|
33
|
+
/** The aria label for the slider. */
|
|
34
|
+
ariaLabel: string;
|
|
35
|
+
/** The aria label for the start handle in range mode. */
|
|
36
|
+
ariaLabelStart: string;
|
|
37
|
+
/** The aria label for the end handle in range mode. */
|
|
38
|
+
ariaLabelEnd: string;
|
|
39
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
40
|
+
private handleInput;
|
|
41
|
+
private handleChange;
|
|
42
|
+
static styles: import("lit").CSSResult;
|
|
43
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
export interface StepData {
|
|
3
|
+
label: string;
|
|
4
|
+
optional?: boolean;
|
|
5
|
+
error?: boolean;
|
|
6
|
+
content?: any;
|
|
7
|
+
completed?: boolean;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* @customElement pd-stepper
|
|
11
|
+
* @summary A Material Design stepper component that displays progress through a sequence of steps.
|
|
12
|
+
*
|
|
13
|
+
* @cssprop --pd-stepper-active-color - The color of the active step indicator
|
|
14
|
+
* @cssprop --pd-stepper-completed-color - The color of completed step indicators
|
|
15
|
+
* @cssprop --pd-stepper-inactive-color - The color of inactive step indicators
|
|
16
|
+
* @cssprop --pd-stepper-error-color - The color of error step indicators
|
|
17
|
+
* @cssprop --pd-stepper-connector-color - The color of step connectors
|
|
18
|
+
*/
|
|
19
|
+
export declare class PdStepper extends LitElement {
|
|
20
|
+
/** The steps data array */
|
|
21
|
+
steps: StepData[];
|
|
22
|
+
/** The current active step index (0-based) */
|
|
23
|
+
currentStep: number;
|
|
24
|
+
/** The orientation of the stepper */
|
|
25
|
+
orientation: 'horizontal' | 'vertical';
|
|
26
|
+
/** Whether the stepper is linear (steps must be completed in order) */
|
|
27
|
+
linear: boolean;
|
|
28
|
+
/** Whether to show step content */
|
|
29
|
+
showContent: boolean;
|
|
30
|
+
/** Alternative labels layout for horizontal stepper */
|
|
31
|
+
alternativeLabel: boolean;
|
|
32
|
+
private _completedSteps;
|
|
33
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
34
|
+
private _renderStep;
|
|
35
|
+
private _renderContent;
|
|
36
|
+
private _handleStepClick;
|
|
37
|
+
/** Mark a step as completed */
|
|
38
|
+
completeStep(stepIndex: number): void;
|
|
39
|
+
/** Mark a step as incomplete */
|
|
40
|
+
resetStep(stepIndex: number): void;
|
|
41
|
+
/** Go to next step */
|
|
42
|
+
next(): void;
|
|
43
|
+
/** Go to previous step */
|
|
44
|
+
back(): void;
|
|
45
|
+
private _dispatchStepChange;
|
|
46
|
+
static styles: import("lit").CSSResult;
|
|
47
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import '@material/web/switch/switch.js';
|
|
3
|
+
import '@material/web/icon/icon.js';
|
|
4
|
+
/**
|
|
5
|
+
* @customElement pd-switch
|
|
6
|
+
* @summary A thin wrapper around the Material Web Switch component.
|
|
7
|
+
*
|
|
8
|
+
* @cssprop --pd-switch-selected-track-color - The color of the track when selected.
|
|
9
|
+
* @cssprop --pd-switch-selected-handle-color - The color of the handle when selected.
|
|
10
|
+
* @cssprop --pd-switch-unselected-track-color - The color of the track when unselected.
|
|
11
|
+
* @cssprop --pd-switch-unselected-handle-color - The color of the handle when unselected.
|
|
12
|
+
*/
|
|
13
|
+
export declare class PdSwitch extends LitElement {
|
|
14
|
+
private readonly switch;
|
|
15
|
+
/** Whether the switch is selected (on). */
|
|
16
|
+
selected: boolean;
|
|
17
|
+
/** Whether the switch is disabled. */
|
|
18
|
+
disabled: boolean;
|
|
19
|
+
/** The icon to display when the switch is selected. */
|
|
20
|
+
selectedIcon: string;
|
|
21
|
+
/** The icon to display when the switch is unselected. */
|
|
22
|
+
unselectedIcon: string;
|
|
23
|
+
/** Whether to show only the selected icon (hides unselected icon). */
|
|
24
|
+
showOnlySelectedIcon: boolean;
|
|
25
|
+
/** The name attribute for form submission. */
|
|
26
|
+
name: string;
|
|
27
|
+
/** The value attribute for form submission. */
|
|
28
|
+
value: string;
|
|
29
|
+
/** The aria label for accessibility. */
|
|
30
|
+
ariaLabel: string;
|
|
31
|
+
/** Whether the switch is required in a form. */
|
|
32
|
+
required: boolean;
|
|
33
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
34
|
+
private handleChange;
|
|
35
|
+
private handleInput;
|
|
36
|
+
static styles: import("lit").CSSResult;
|
|
37
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import '@material/web/tabs/tabs.js';
|
|
3
|
+
import '@material/web/tabs/primary-tab.js';
|
|
4
|
+
import '@material/web/tabs/secondary-tab.js';
|
|
5
|
+
import '@material/web/icon/icon.js';
|
|
6
|
+
export interface TabData {
|
|
7
|
+
label: string;
|
|
8
|
+
icon?: string;
|
|
9
|
+
secondary?: boolean;
|
|
10
|
+
inlineIcon?: boolean;
|
|
11
|
+
ariaLabel?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* @customElement pd-tabs
|
|
15
|
+
* @summary A thin wrapper around the Material Web Tabs component.
|
|
16
|
+
*
|
|
17
|
+
* @cssprop --pd-tabs-divider-color - The color of the divider line.
|
|
18
|
+
* @cssprop --pd-tabs-active-indicator-color - The color of the active tab indicator.
|
|
19
|
+
*/
|
|
20
|
+
export declare class PdTabs extends LitElement {
|
|
21
|
+
/** The index of the currently active tab. */
|
|
22
|
+
activeTabIndex: number;
|
|
23
|
+
/** Whether to automatically activate tabs on focus (vs requiring click/enter). */
|
|
24
|
+
autoActivate: boolean;
|
|
25
|
+
/** Array of tab data objects */
|
|
26
|
+
tabs: TabData[];
|
|
27
|
+
private slottedTabs;
|
|
28
|
+
connectedCallback(): void;
|
|
29
|
+
firstUpdated(): void;
|
|
30
|
+
private collectTabsFromSlot;
|
|
31
|
+
private handleSlotChange;
|
|
32
|
+
private forceActiveTabUpdate;
|
|
33
|
+
private renderTab;
|
|
34
|
+
updated(changedProperties: Map<string, any>): void;
|
|
35
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
36
|
+
private handleChange;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* @customElement pd-tab
|
|
40
|
+
* @summary A placeholder element that provides tab data to pd-tabs.
|
|
41
|
+
* This element is not rendered directly but is used to collect tab information.
|
|
42
|
+
*/
|
|
43
|
+
export declare class PdTab extends LitElement {
|
|
44
|
+
/** Whether this is a secondary tab variant. */
|
|
45
|
+
secondary: boolean;
|
|
46
|
+
/** Whether the tab is inlined with the text. */
|
|
47
|
+
inlineIcon: boolean;
|
|
48
|
+
/** The icon to display in the tab. */
|
|
49
|
+
icon: string;
|
|
50
|
+
/** The aria label for accessibility. */
|
|
51
|
+
ariaLabel: string;
|
|
52
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
53
|
+
static styles: import("lit").CSSResult;
|
|
54
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import '@material/web/textfield/filled-text-field.js';
|
|
3
|
+
import '@material/web/textfield/outlined-text-field.js';
|
|
4
|
+
import '@material/web/icon/icon.js';
|
|
5
|
+
export declare class PdTextField extends LitElement {
|
|
6
|
+
variant: 'filled' | 'outlined';
|
|
7
|
+
label: string;
|
|
8
|
+
placeholder: string;
|
|
9
|
+
value: string;
|
|
10
|
+
supportingText: string;
|
|
11
|
+
errorText: string;
|
|
12
|
+
prefixText: string;
|
|
13
|
+
suffixText: string;
|
|
14
|
+
disabled: boolean;
|
|
15
|
+
readonly: boolean;
|
|
16
|
+
required: boolean;
|
|
17
|
+
error: boolean;
|
|
18
|
+
type: 'text' | 'email' | 'password' | 'number' | 'tel' | 'url' | 'search' | 'textarea';
|
|
19
|
+
rows: number;
|
|
20
|
+
cols: number;
|
|
21
|
+
leadingIcon: string;
|
|
22
|
+
trailingIcon: string;
|
|
23
|
+
maxlength?: number;
|
|
24
|
+
minlength?: number;
|
|
25
|
+
private getTextFieldTemplate;
|
|
26
|
+
render(): import("lit-html").TemplateResult;
|
|
27
|
+
private _handleInput;
|
|
28
|
+
private _handleChange;
|
|
29
|
+
static styles: import("lit").CSSResult;
|
|
30
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@prioticket/design-tokens-material-web/fonts.css';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export * from './components/pd-button';
|
|
2
|
+
export * from './components/pd-text-field';
|
|
3
|
+
export * from './components/pd-card';
|
|
4
|
+
export * from './components/pd-icon';
|
|
5
|
+
export * from './components/pd-dialog';
|
|
6
|
+
export * from './components/pd-expandable-card';
|
|
7
|
+
export * from './components/pd-checkbox';
|
|
8
|
+
export * from './components/pd-chip';
|
|
9
|
+
export * from './components/pd-fab';
|
|
10
|
+
export * from './components/pd-icon-button';
|
|
11
|
+
export * from './components/pd-list';
|
|
12
|
+
export * from './components/pd-menu';
|
|
13
|
+
export * from './components/pd-menu-item';
|
|
14
|
+
export * from './components/pd-progress';
|
|
15
|
+
export * from './components/pd-radio';
|
|
16
|
+
export * from './components/pd-select';
|
|
17
|
+
export * from './components/pd-slider';
|
|
18
|
+
export * from './components/pd-switch';
|
|
19
|
+
export * from './components/pd-tabs';
|
|
20
|
+
export * from './components/pd-segmented-button';
|
|
21
|
+
export * from './components/pd-segmented-stepper';
|
|
22
|
+
export * from './components/pd-stepper';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@prioticket/design-tokens-material-web/theme.css';
|