@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.
Files changed (93) hide show
  1. package/COMPONENT-DOCUMENTATION.md +608 -0
  2. package/README.md +229 -0
  3. package/component-documentation.json +1681 -0
  4. package/dist/components/pd-button.cjs.js +99 -0
  5. package/dist/components/pd-button.es.js +156 -0
  6. package/dist/components/pd-card.cjs.js +59 -0
  7. package/dist/components/pd-card.es.js +93 -0
  8. package/dist/components/pd-checkbox.cjs.js +85 -0
  9. package/dist/components/pd-checkbox.es.js +154 -0
  10. package/dist/components/pd-chip.cjs.js +118 -0
  11. package/dist/components/pd-chip.es.js +220 -0
  12. package/dist/components/pd-dialog.cjs.js +195 -0
  13. package/dist/components/pd-dialog.es.js +285 -0
  14. package/dist/components/pd-expandable-card.cjs.js +134 -0
  15. package/dist/components/pd-expandable-card.es.js +205 -0
  16. package/dist/components/pd-fab.cjs.js +119 -0
  17. package/dist/components/pd-fab.es.js +179 -0
  18. package/dist/components/pd-icon-button.cjs.js +159 -0
  19. package/dist/components/pd-icon-button.es.js +268 -0
  20. package/dist/components/pd-icon.cjs.js +71 -0
  21. package/dist/components/pd-icon.es.js +102 -0
  22. package/dist/components/pd-list.cjs.js +108 -0
  23. package/dist/components/pd-list.es.js +229 -0
  24. package/dist/components/pd-menu-item.cjs.js +85 -0
  25. package/dist/components/pd-menu-item.es.js +156 -0
  26. package/dist/components/pd-menu.cjs.js +42 -0
  27. package/dist/components/pd-menu.es.js +122 -0
  28. package/dist/components/pd-progress.cjs.js +72 -0
  29. package/dist/components/pd-progress.es.js +119 -0
  30. package/dist/components/pd-radio.cjs.js +38 -0
  31. package/dist/components/pd-radio.es.js +153 -0
  32. package/dist/components/pd-segmented-button.cjs.js +135 -0
  33. package/dist/components/pd-segmented-button.es.js +234 -0
  34. package/dist/components/pd-segmented-stepper.cjs.js +191 -0
  35. package/dist/components/pd-segmented-stepper.es.js +333 -0
  36. package/dist/components/pd-select.cjs.js +59 -0
  37. package/dist/components/pd-select.es.js +136 -0
  38. package/dist/components/pd-slider.cjs.js +42 -0
  39. package/dist/components/pd-slider.es.js +123 -0
  40. package/dist/components/pd-stepper.cjs.js +279 -0
  41. package/dist/components/pd-stepper.es.js +375 -0
  42. package/dist/components/pd-switch.cjs.js +57 -0
  43. package/dist/components/pd-switch.es.js +126 -0
  44. package/dist/components/pd-tabs.cjs.js +32 -0
  45. package/dist/components/pd-tabs.es.js +139 -0
  46. package/dist/components/pd-text-field.cjs.js +86 -0
  47. package/dist/components/pd-text-field.es.js +202 -0
  48. package/dist/design-system-web.css +1 -0
  49. package/dist/fonts/ProximaNova-Bold.woff2 +0 -0
  50. package/dist/fonts/ProximaNova-Extrabld.woff2 +0 -0
  51. package/dist/fonts/ProximaNova-Light.woff2 +0 -0
  52. package/dist/fonts/ProximaNova-Medium.woff2 +0 -0
  53. package/dist/fonts/ProximaNova-Regular.woff2 +0 -0
  54. package/dist/fonts/ProximaNova-Semibold.woff2 +0 -0
  55. package/dist/fonts/ProximaNovaCond-Semibold.woff2 +0 -0
  56. package/dist/fonts-only.css +59 -0
  57. package/dist/fonts.cjs.js +1 -0
  58. package/dist/fonts.es.js +1 -0
  59. package/dist/prioticket-design-system-web.cjs.js +1 -0
  60. package/dist/prioticket-design-system-web.es.js +52 -0
  61. package/dist/theme-only.css +311 -0
  62. package/dist/theme-with-fonts.cjs.js +1 -0
  63. package/dist/theme-with-fonts.css +372 -0
  64. package/dist/theme-with-fonts.es.js +2 -0
  65. package/dist/theme.cjs.js +1 -0
  66. package/dist/theme.es.js +1 -0
  67. package/dist/types/components/pd-button.d.ts +30 -0
  68. package/dist/types/components/pd-card.d.ts +8 -0
  69. package/dist/types/components/pd-checkbox.d.ts +16 -0
  70. package/dist/types/components/pd-chip.d.ts +26 -0
  71. package/dist/types/components/pd-dialog.d.ts +49 -0
  72. package/dist/types/components/pd-expandable-card.d.ts +39 -0
  73. package/dist/types/components/pd-fab.d.ts +17 -0
  74. package/dist/types/components/pd-icon-button.d.ts +24 -0
  75. package/dist/types/components/pd-icon.d.ts +9 -0
  76. package/dist/types/components/pd-list.d.ts +36 -0
  77. package/dist/types/components/pd-menu-item.d.ts +38 -0
  78. package/dist/types/components/pd-menu.d.ts +58 -0
  79. package/dist/types/components/pd-progress.d.ts +30 -0
  80. package/dist/types/components/pd-radio.d.ts +54 -0
  81. package/dist/types/components/pd-segmented-button.d.ts +53 -0
  82. package/dist/types/components/pd-segmented-stepper.d.ts +65 -0
  83. package/dist/types/components/pd-select.d.ts +46 -0
  84. package/dist/types/components/pd-slider.d.ts +43 -0
  85. package/dist/types/components/pd-stepper.d.ts +47 -0
  86. package/dist/types/components/pd-switch.d.ts +37 -0
  87. package/dist/types/components/pd-tabs.d.ts +54 -0
  88. package/dist/types/components/pd-text-field.d.ts +30 -0
  89. package/dist/types/fonts.d.ts +1 -0
  90. package/dist/types/index.d.ts +22 -0
  91. package/dist/types/theme-with-fonts.d.ts +2 -0
  92. package/dist/types/theme.d.ts +1 -0
  93. package/package.json +93 -0
@@ -0,0 +1,118 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("lit"),t=require("lit/decorators.js");require("@material/web/chips/assist-chip.js");require("@material/web/chips/filter-chip.js");require("@material/web/chips/input-chip.js");require("@material/web/chips/suggestion-chip.js");require("@material/web/icon/icon.js");var p=Object.defineProperty,n=Object.getOwnPropertyDescriptor,s=(o,i,e,r)=>{for(var l=r>1?void 0:r?n(i,e):i,c=o.length-1,h;c>=0;c--)(h=o[c])&&(l=(r?h(i,e,l):h(l))||l);return r&&l&&p(i,e,l),l};exports.PdChip=class extends a.LitElement{constructor(){super(...arguments),this.variant="assist",this.label="",this.disabled=!1,this.alwaysFocusable=!1,this.hasIcon=!1,this.icon="",this.selected=!1,this.removable=!1,this.elevated=!1,this.href="",this.target="",this.avatar=!1,this.removeOnly=!1}getChipTemplate(){const i=this.icon?a.html`<md-icon slot="icon">${this.icon}</md-icon>`:a.nothing,e={label:this.label,disabled:this.disabled,"always-focusable":this.alwaysFocusable,"has-icon":this.hasIcon||!!this.icon};switch(this.variant){case"filter":return a.html`
2
+ <md-filter-chip
3
+ .label=${e.label}
4
+ ?disabled=${e.disabled}
5
+ ?always-focusable=${e["always-focusable"]}
6
+ ?has-icon=${e["has-icon"]}
7
+ ?selected=${this.selected}
8
+ ?removable=${this.removable}
9
+ @click=${this._handleClick}
10
+ @remove=${this._handleRemove}
11
+ >
12
+ ${i}
13
+ </md-filter-chip>
14
+ `;case"input":return a.html`
15
+ <md-input-chip
16
+ .label=${e.label}
17
+ ?disabled=${e.disabled}
18
+ ?always-focusable=${e["always-focusable"]}
19
+ ?has-icon=${e["has-icon"]}
20
+ ?avatar=${this.avatar}
21
+ ?remove-only=${this.removeOnly}
22
+ @click=${this._handleClick}
23
+ @remove=${this._handleRemove}
24
+ >
25
+ ${i}
26
+ </md-input-chip>
27
+ `;case"suggestion":return a.html`
28
+ <md-suggestion-chip
29
+ .label=${e.label}
30
+ ?disabled=${e.disabled}
31
+ ?always-focusable=${e["always-focusable"]}
32
+ ?has-icon=${e["has-icon"]}
33
+ ?elevated=${this.elevated}
34
+ .href=${this.href||a.nothing}
35
+ .target=${this.target||a.nothing}
36
+ @click=${this._handleClick}
37
+ >
38
+ ${i}
39
+ </md-suggestion-chip>
40
+ `;default:return a.html`
41
+ <md-assist-chip
42
+ .label=${e.label}
43
+ ?disabled=${e.disabled}
44
+ ?always-focusable=${e["always-focusable"]}
45
+ ?has-icon=${e["has-icon"]}
46
+ ?elevated=${this.elevated}
47
+ .href=${this.href||a.nothing}
48
+ .target=${this.target||a.nothing}
49
+ @click=${this._handleClick}
50
+ >
51
+ ${i}
52
+ </md-assist-chip>
53
+ `}}render(){return this.getChipTemplate()}_handleClick(i){this.dispatchEvent(new CustomEvent("chip-click",{detail:{variant:this.variant,label:this.label,selected:this.selected},bubbles:!0}))}_handleRemove(i){this.dispatchEvent(new CustomEvent("chip-remove",{detail:{variant:this.variant,label:this.label},bubbles:!0}))}};exports.PdChip.styles=a.css`
54
+ :host {
55
+ display: inline-block;
56
+ --md-assist-chip-container-shape: var(--md-sys-shape-corner-small);
57
+ --md-filter-chip-container-shape: var(--md-sys-shape-corner-small);
58
+ --md-input-chip-container-shape: var(--md-sys-shape-corner-small);
59
+ --md-suggestion-chip-container-shape: var(--md-sys-shape-corner-small);
60
+
61
+ --md-assist-chip-container-height: var(--md-sys-chip-container-height, 2rem);
62
+ --md-filter-chip-container-height: var(--md-sys-chip-container-height, 2rem);
63
+ --md-input-chip-container-height: var(--md-sys-chip-container-height, 2rem);
64
+ --md-suggestion-chip-container-height: var(--md-sys-chip-container-height, 2rem);
65
+
66
+ --md-assist-chip-label-text-color: var(--md-sys-color-on-surface);
67
+ --md-filter-chip-label-text-color: var(--md-sys-color-on-surface);
68
+ --md-input-chip-label-text-color: var(--md-sys-color-on-surface);
69
+ --md-suggestion-chip-label-text-color: var(--md-sys-color-on-surface);
70
+
71
+ --md-assist-chip-label-text-font: var(--md-sys-typescale-label-large-font);
72
+ --md-filter-chip-label-text-font: var(--md-sys-typescale-label-large-font);
73
+ --md-input-chip-label-text-font: var(--md-sys-typescale-label-large-font);
74
+ --md-suggestion-chip-label-text-font: var(--md-sys-typescale-label-large-font);
75
+
76
+ --md-assist-chip-label-text-size: var(--md-sys-typescale-label-large-size);
77
+ --md-filter-chip-label-text-size: var(--md-sys-typescale-label-large-size);
78
+ --md-input-chip-label-text-size: var(--md-sys-typescale-label-large-size);
79
+ --md-suggestion-chip-label-text-size: var(--md-sys-typescale-label-large-size);
80
+
81
+ --md-assist-chip-label-text-weight: var(--md-sys-typescale-label-large-weight);
82
+ --md-filter-chip-label-text-weight: var(--md-sys-typescale-label-large-weight);
83
+ --md-input-chip-label-text-weight: var(--md-sys-typescale-label-large-weight);
84
+ --md-suggestion-chip-label-text-weight: var(--md-sys-typescale-label-large-weight);
85
+ }
86
+
87
+ md-assist-chip,
88
+ md-filter-chip,
89
+ md-input-chip,
90
+ md-suggestion-chip {
91
+ transition: all var(--md-sys-motion-duration-short2, 200ms) var(--md-sys-motion-easing-standard, cubic-bezier(0.2, 0.0, 0, 1.0));
92
+ }
93
+
94
+ md-assist-chip:hover,
95
+ md-filter-chip:hover,
96
+ md-input-chip:hover,
97
+ md-suggestion-chip:hover {
98
+ transform: translateY(-1px);
99
+ }
100
+
101
+ md-filter-chip[selected] {
102
+ --md-filter-chip-selected-container-color: var(--md-sys-color-secondary-container);
103
+ --md-filter-chip-selected-label-text-color: var(--md-sys-color-on-secondary-container);
104
+ }
105
+
106
+ md-input-chip {
107
+ --md-input-chip-container-color: var(--md-sys-color-surface-variant);
108
+ --md-input-chip-outline-color: var(--md-sys-color-outline);
109
+ }
110
+
111
+ md-assist-chip[elevated],
112
+ md-suggestion-chip[elevated] {
113
+ --md-assist-chip-elevated-container-color: var(--md-sys-color-surface);
114
+ --md-suggestion-chip-elevated-container-color: var(--md-sys-color-surface);
115
+ --md-assist-chip-elevated-container-shadow-color: var(--md-sys-color-shadow);
116
+ --md-suggestion-chip-elevated-container-shadow-color: var(--md-sys-color-shadow);
117
+ }
118
+ `;s([t.property({type:String})],exports.PdChip.prototype,"variant",2);s([t.property({type:String})],exports.PdChip.prototype,"label",2);s([t.property({type:Boolean})],exports.PdChip.prototype,"disabled",2);s([t.property({type:Boolean,attribute:"always-focusable"})],exports.PdChip.prototype,"alwaysFocusable",2);s([t.property({type:Boolean,attribute:"has-icon"})],exports.PdChip.prototype,"hasIcon",2);s([t.property({type:String})],exports.PdChip.prototype,"icon",2);s([t.property({type:Boolean})],exports.PdChip.prototype,"selected",2);s([t.property({type:Boolean})],exports.PdChip.prototype,"removable",2);s([t.property({type:Boolean})],exports.PdChip.prototype,"elevated",2);s([t.property({type:String})],exports.PdChip.prototype,"href",2);s([t.property({type:String})],exports.PdChip.prototype,"target",2);s([t.property({type:Boolean})],exports.PdChip.prototype,"avatar",2);s([t.property({type:Boolean,attribute:"remove-only"})],exports.PdChip.prototype,"removeOnly",2);exports.PdChip=s([t.customElement("pd-chip")],exports.PdChip);
@@ -0,0 +1,220 @@
1
+ import { css as d, LitElement as m, html as o, nothing as r } from "lit";
2
+ import { property as a, customElement as y } from "lit/decorators.js";
3
+ import "@material/web/chips/assist-chip.js";
4
+ import "@material/web/chips/filter-chip.js";
5
+ import "@material/web/chips/input-chip.js";
6
+ import "@material/web/chips/suggestion-chip.js";
7
+ import "@material/web/icon/icon.js";
8
+ var b = Object.defineProperty, v = Object.getOwnPropertyDescriptor, s = (i, e, h, c) => {
9
+ for (var l = c > 1 ? void 0 : c ? v(e, h) : e, n = i.length - 1, p; n >= 0; n--)
10
+ (p = i[n]) && (l = (c ? p(e, h, l) : p(l)) || l);
11
+ return c && l && b(e, h, l), l;
12
+ };
13
+ let t = class extends m {
14
+ constructor() {
15
+ super(...arguments), this.variant = "assist", this.label = "", this.disabled = !1, this.alwaysFocusable = !1, this.hasIcon = !1, this.icon = "", this.selected = !1, this.removable = !1, this.elevated = !1, this.href = "", this.target = "", this.avatar = !1, this.removeOnly = !1;
16
+ }
17
+ getChipTemplate() {
18
+ const i = this.icon ? o`<md-icon slot="icon">${this.icon}</md-icon>` : r, e = {
19
+ label: this.label,
20
+ disabled: this.disabled,
21
+ "always-focusable": this.alwaysFocusable,
22
+ "has-icon": this.hasIcon || !!this.icon
23
+ };
24
+ switch (this.variant) {
25
+ case "filter":
26
+ return o`
27
+ <md-filter-chip
28
+ .label=${e.label}
29
+ ?disabled=${e.disabled}
30
+ ?always-focusable=${e["always-focusable"]}
31
+ ?has-icon=${e["has-icon"]}
32
+ ?selected=${this.selected}
33
+ ?removable=${this.removable}
34
+ @click=${this._handleClick}
35
+ @remove=${this._handleRemove}
36
+ >
37
+ ${i}
38
+ </md-filter-chip>
39
+ `;
40
+ case "input":
41
+ return o`
42
+ <md-input-chip
43
+ .label=${e.label}
44
+ ?disabled=${e.disabled}
45
+ ?always-focusable=${e["always-focusable"]}
46
+ ?has-icon=${e["has-icon"]}
47
+ ?avatar=${this.avatar}
48
+ ?remove-only=${this.removeOnly}
49
+ @click=${this._handleClick}
50
+ @remove=${this._handleRemove}
51
+ >
52
+ ${i}
53
+ </md-input-chip>
54
+ `;
55
+ case "suggestion":
56
+ return o`
57
+ <md-suggestion-chip
58
+ .label=${e.label}
59
+ ?disabled=${e.disabled}
60
+ ?always-focusable=${e["always-focusable"]}
61
+ ?has-icon=${e["has-icon"]}
62
+ ?elevated=${this.elevated}
63
+ .href=${this.href || r}
64
+ .target=${this.target || r}
65
+ @click=${this._handleClick}
66
+ >
67
+ ${i}
68
+ </md-suggestion-chip>
69
+ `;
70
+ default:
71
+ return o`
72
+ <md-assist-chip
73
+ .label=${e.label}
74
+ ?disabled=${e.disabled}
75
+ ?always-focusable=${e["always-focusable"]}
76
+ ?has-icon=${e["has-icon"]}
77
+ ?elevated=${this.elevated}
78
+ .href=${this.href || r}
79
+ .target=${this.target || r}
80
+ @click=${this._handleClick}
81
+ >
82
+ ${i}
83
+ </md-assist-chip>
84
+ `;
85
+ }
86
+ }
87
+ render() {
88
+ return this.getChipTemplate();
89
+ }
90
+ _handleClick(i) {
91
+ this.dispatchEvent(new CustomEvent("chip-click", {
92
+ detail: {
93
+ variant: this.variant,
94
+ label: this.label,
95
+ selected: this.selected
96
+ },
97
+ bubbles: !0
98
+ }));
99
+ }
100
+ _handleRemove(i) {
101
+ this.dispatchEvent(new CustomEvent("chip-remove", {
102
+ detail: {
103
+ variant: this.variant,
104
+ label: this.label
105
+ },
106
+ bubbles: !0
107
+ }));
108
+ }
109
+ };
110
+ t.styles = d`
111
+ :host {
112
+ display: inline-block;
113
+ --md-assist-chip-container-shape: var(--md-sys-shape-corner-small);
114
+ --md-filter-chip-container-shape: var(--md-sys-shape-corner-small);
115
+ --md-input-chip-container-shape: var(--md-sys-shape-corner-small);
116
+ --md-suggestion-chip-container-shape: var(--md-sys-shape-corner-small);
117
+
118
+ --md-assist-chip-container-height: var(--md-sys-chip-container-height, 2rem);
119
+ --md-filter-chip-container-height: var(--md-sys-chip-container-height, 2rem);
120
+ --md-input-chip-container-height: var(--md-sys-chip-container-height, 2rem);
121
+ --md-suggestion-chip-container-height: var(--md-sys-chip-container-height, 2rem);
122
+
123
+ --md-assist-chip-label-text-color: var(--md-sys-color-on-surface);
124
+ --md-filter-chip-label-text-color: var(--md-sys-color-on-surface);
125
+ --md-input-chip-label-text-color: var(--md-sys-color-on-surface);
126
+ --md-suggestion-chip-label-text-color: var(--md-sys-color-on-surface);
127
+
128
+ --md-assist-chip-label-text-font: var(--md-sys-typescale-label-large-font);
129
+ --md-filter-chip-label-text-font: var(--md-sys-typescale-label-large-font);
130
+ --md-input-chip-label-text-font: var(--md-sys-typescale-label-large-font);
131
+ --md-suggestion-chip-label-text-font: var(--md-sys-typescale-label-large-font);
132
+
133
+ --md-assist-chip-label-text-size: var(--md-sys-typescale-label-large-size);
134
+ --md-filter-chip-label-text-size: var(--md-sys-typescale-label-large-size);
135
+ --md-input-chip-label-text-size: var(--md-sys-typescale-label-large-size);
136
+ --md-suggestion-chip-label-text-size: var(--md-sys-typescale-label-large-size);
137
+
138
+ --md-assist-chip-label-text-weight: var(--md-sys-typescale-label-large-weight);
139
+ --md-filter-chip-label-text-weight: var(--md-sys-typescale-label-large-weight);
140
+ --md-input-chip-label-text-weight: var(--md-sys-typescale-label-large-weight);
141
+ --md-suggestion-chip-label-text-weight: var(--md-sys-typescale-label-large-weight);
142
+ }
143
+
144
+ md-assist-chip,
145
+ md-filter-chip,
146
+ md-input-chip,
147
+ md-suggestion-chip {
148
+ transition: all var(--md-sys-motion-duration-short2, 200ms) var(--md-sys-motion-easing-standard, cubic-bezier(0.2, 0.0, 0, 1.0));
149
+ }
150
+
151
+ md-assist-chip:hover,
152
+ md-filter-chip:hover,
153
+ md-input-chip:hover,
154
+ md-suggestion-chip:hover {
155
+ transform: translateY(-1px);
156
+ }
157
+
158
+ md-filter-chip[selected] {
159
+ --md-filter-chip-selected-container-color: var(--md-sys-color-secondary-container);
160
+ --md-filter-chip-selected-label-text-color: var(--md-sys-color-on-secondary-container);
161
+ }
162
+
163
+ md-input-chip {
164
+ --md-input-chip-container-color: var(--md-sys-color-surface-variant);
165
+ --md-input-chip-outline-color: var(--md-sys-color-outline);
166
+ }
167
+
168
+ md-assist-chip[elevated],
169
+ md-suggestion-chip[elevated] {
170
+ --md-assist-chip-elevated-container-color: var(--md-sys-color-surface);
171
+ --md-suggestion-chip-elevated-container-color: var(--md-sys-color-surface);
172
+ --md-assist-chip-elevated-container-shadow-color: var(--md-sys-color-shadow);
173
+ --md-suggestion-chip-elevated-container-shadow-color: var(--md-sys-color-shadow);
174
+ }
175
+ `;
176
+ s([
177
+ a({ type: String })
178
+ ], t.prototype, "variant", 2);
179
+ s([
180
+ a({ type: String })
181
+ ], t.prototype, "label", 2);
182
+ s([
183
+ a({ type: Boolean })
184
+ ], t.prototype, "disabled", 2);
185
+ s([
186
+ a({ type: Boolean, attribute: "always-focusable" })
187
+ ], t.prototype, "alwaysFocusable", 2);
188
+ s([
189
+ a({ type: Boolean, attribute: "has-icon" })
190
+ ], t.prototype, "hasIcon", 2);
191
+ s([
192
+ a({ type: String })
193
+ ], t.prototype, "icon", 2);
194
+ s([
195
+ a({ type: Boolean })
196
+ ], t.prototype, "selected", 2);
197
+ s([
198
+ a({ type: Boolean })
199
+ ], t.prototype, "removable", 2);
200
+ s([
201
+ a({ type: Boolean })
202
+ ], t.prototype, "elevated", 2);
203
+ s([
204
+ a({ type: String })
205
+ ], t.prototype, "href", 2);
206
+ s([
207
+ a({ type: String })
208
+ ], t.prototype, "target", 2);
209
+ s([
210
+ a({ type: Boolean })
211
+ ], t.prototype, "avatar", 2);
212
+ s([
213
+ a({ type: Boolean, attribute: "remove-only" })
214
+ ], t.prototype, "removeOnly", 2);
215
+ t = s([
216
+ y("pd-chip")
217
+ ], t);
218
+ export {
219
+ t as PdChip
220
+ };
@@ -0,0 +1,195 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("lit"),e=require("lit/decorators.js");require("@material/web/dialog/dialog.js");require("@material/web/button/text-button.js");require("@material/web/button/filled-button.js");require("@material/web/icon/icon.js");var c=Object.defineProperty,m=Object.getOwnPropertyDescriptor,o=(n,a,l,s)=>{for(var i=s>1?void 0:s?m(a,l):a,r=n.length-1,d;r>=0;r--)(d=n[r])&&(i=(s?d(a,l,i):d(i))||i);return s&&i&&c(a,l,i),i};exports.PdDialog=class extends t.LitElement{constructor(){super(...arguments),this.open=!1,this.size="medium",this.variant="custom",this.headline="",this.primaryAction="",this.secondaryAction="",this.closableByBackdrop=!0,this.showCloseButton=!1}openDialog(){this.open=!0,this.dialogElement?.show?.()}closeDialog(){this.open=!1,this.dialogElement?.close?.()}toggle(){this.open?this.closeDialog():this.openDialog()}handleDialogOpen(){this.open=!0,this.dispatchEvent(new CustomEvent("open",{detail:{dialog:this},bubbles:!0}))}handleDialogClose(){this.open=!1,this.dispatchEvent(new CustomEvent("closed",{detail:{dialog:this},bubbles:!0}))}handlePrimaryAction(){this.dispatchEvent(new CustomEvent("primary-action",{detail:{dialog:this},bubbles:!0}))}handleSecondaryAction(){this.dispatchEvent(new CustomEvent("secondary-action",{detail:{dialog:this},bubbles:!0})),this.closeDialog()}render(){return t.html`
2
+ <md-dialog
3
+ ?open=${this.open}
4
+ ?no-focus-trap=${!this.closableByBackdrop}
5
+ @open=${this.handleDialogOpen}
6
+ @closed=${this.handleDialogClose}
7
+ @cancel=${a=>{this.closableByBackdrop||a.preventDefault()}}
8
+ >
9
+ ${this.headline||this.showCloseButton?t.html`
10
+ <div slot="headline" class="headline-container">
11
+ ${this.headline?t.html`<span class="headline-text">${this.headline}</span>`:""}
12
+ ${this.showCloseButton?t.html`
13
+ <md-text-button
14
+ class="close-button"
15
+ @click=${this.closeDialog}
16
+ aria-label="Close dialog"
17
+ >
18
+ <md-icon slot="icon">close</md-icon>
19
+ </md-text-button>
20
+ `:""}
21
+ </div>
22
+ `:""}
23
+
24
+ <div slot="content" class="content-container">
25
+ <slot></slot>
26
+ </div>
27
+
28
+ ${this.primaryAction||this.secondaryAction?t.html`
29
+ <div slot="actions" class="actions-container">
30
+ ${this.secondaryAction?t.html`
31
+ <md-text-button
32
+ class="secondary-action"
33
+ @click=${this.handleSecondaryAction}
34
+ >
35
+ ${this.secondaryAction}
36
+ </md-text-button>
37
+ `:""}
38
+ ${this.primaryAction?t.html`
39
+ <md-filled-button
40
+ class="primary-action"
41
+ @click=${this.handlePrimaryAction}
42
+ >
43
+ ${this.primaryAction}
44
+ </md-filled-button>
45
+ `:""}
46
+ <slot name="actions"></slot>
47
+ </div>
48
+ `:t.html`<slot name="actions" slot="actions"></slot>`}
49
+ </md-dialog>
50
+ `}};exports.PdDialog.styles=t.css`
51
+ :host {
52
+ /* Set default shape for ALL Prioticket dialogs to match card styling */
53
+ --md-dialog-container-shape: var(--md-sys-shape-corner-small);
54
+ }
55
+
56
+ md-dialog {
57
+ /* Dialog transitions and animations */
58
+ transition: all 200ms ease-in-out;
59
+
60
+ /* Material Web dialog customization */
61
+ --md-dialog-headline-color: var(--md-sys-color-on-surface);
62
+ --md-dialog-supporting-text-color: var(--md-sys-color-on-surface-variant);
63
+ --md-dialog-container-color: var(--md-sys-color-surface);
64
+ }
65
+
66
+ .headline-container {
67
+ display: flex;
68
+ justify-content: space-between;
69
+ align-items: center;
70
+ gap: var(--md-sys-spacing-400, 16px);
71
+ width: 100%;
72
+ }
73
+
74
+ .headline-text {
75
+ font-family: var(--md-sys-typescale-headline-small-font);
76
+ font-size: var(--md-sys-typescale-headline-small-size);
77
+ font-weight: var(--md-sys-typescale-headline-small-weight);
78
+ line-height: var(--md-sys-typescale-headline-small-line-height);
79
+ color: var(--md-sys-color-on-surface);
80
+ flex: 1;
81
+ }
82
+
83
+ .close-button {
84
+ flex-shrink: 0;
85
+ --md-text-button-label-text-size: 0; /* Hide text, show only icon */
86
+ }
87
+
88
+ .content-container {
89
+ font-family: var(--md-sys-typescale-body-medium-font);
90
+ font-size: var(--md-sys-typescale-body-medium-size);
91
+ font-weight: var(--md-sys-typescale-body-medium-weight);
92
+ line-height: var(--md-sys-typescale-body-medium-line-height);
93
+ color: var(--md-sys-color-on-surface-variant);
94
+ }
95
+
96
+ .actions-container {
97
+ display: flex;
98
+ justify-content: flex-end;
99
+ gap: 8px;
100
+ align-items: center;
101
+ }
102
+
103
+ /* --- Size Variants --- */
104
+ :host([size='small']) md-dialog {
105
+ --md-dialog-container-max-width: var(--md-sys-dialog-container-max-width-small, 320px);
106
+ }
107
+
108
+ :host([size='medium']) md-dialog {
109
+ --md-dialog-container-max-width: var(--md-sys-dialog-container-max-width-medium, 560px);
110
+ }
111
+
112
+ :host([size='large']) md-dialog {
113
+ --md-dialog-container-max-width: var(--md-sys-dialog-container-max-width-large, 800px);
114
+ }
115
+
116
+ :host([size='fullscreen']) md-dialog {
117
+ --md-dialog-container-max-width: var(--md-sys-dialog-container-max-width-fullscreen, 100vw);
118
+ --md-dialog-container-max-height: var(--md-sys-dialog-container-max-height-fullscreen, 100vh);
119
+ --md-dialog-container-inset-block-start: 0;
120
+ --md-dialog-container-inset-inline-start: 0;
121
+ --md-dialog-container-inset-inline-end: 0;
122
+ --md-dialog-container-inset-block-end: 0;
123
+ }
124
+
125
+ /* --- Variant Styles --- */
126
+ :host([variant='alert']) .content-container {
127
+ padding: var(--md-sys-padding-200, 8px) 0;
128
+ }
129
+
130
+ :host([variant='confirm']) .actions-container {
131
+ gap: var(--md-sys-spacing-300, 12px);
132
+ }
133
+
134
+ :host([variant='form']) .content-container {
135
+ padding: var(--md-sys-padding-400, 16px) 0;
136
+ }
137
+
138
+ /* Responsive adjustments */
139
+ @media (max-width: 768px) {
140
+ md-dialog {
141
+ --md-dialog-container-inset-inline-start: var(--md-sys-spacing-400, 16px);
142
+ --md-dialog-container-inset-inline-end: var(--md-sys-spacing-400, 16px);
143
+ }
144
+
145
+ :host([size='small']) md-dialog,
146
+ :host([size='medium']) md-dialog,
147
+ :host([size='large']) md-dialog {
148
+ --md-dialog-container-max-width: calc(100vw - var(--md-sys-spacing-800, 32px));
149
+ }
150
+
151
+ :host([size='fullscreen']) md-dialog {
152
+ --md-dialog-container-inset-inline-start: 0;
153
+ --md-dialog-container-inset-inline-end: 0;
154
+ }
155
+
156
+ .actions-container {
157
+ flex-direction: column-reverse;
158
+ gap: var(--md-sys-spacing-200, 8px);
159
+ }
160
+
161
+ .actions-container md-filled-button,
162
+ .actions-container md-text-button {
163
+ width: var(--md-sys-dialog-action-button-width-mobile, 100%);
164
+ --md-filled-button-container-width: var(--md-sys-dialog-action-button-width-mobile, 100%);
165
+ --md-text-button-container-width: var(--md-sys-dialog-action-button-width-mobile, 100%);
166
+ }
167
+ }
168
+
169
+ /* Enhanced Material Web styling */
170
+ md-dialog::part(scrim) {
171
+ --md-dialog-scrim-opacity: 0.32;
172
+ }
173
+
174
+ /* Button styling to match pd-button component */
175
+ .primary-action,
176
+ .secondary-action,
177
+ .close-button {
178
+ /* Apply same border radius as pd-button component */
179
+ --md-filled-button-container-shape: var(--md-sys-shape-corner-small);
180
+ --md-text-button-container-shape: var(--md-sys-shape-corner-small);
181
+ /* Smooth transitions like pd-button */
182
+ transition: all 150ms ease-in-out;
183
+ }
184
+
185
+ /* Focus and interaction states */
186
+ .primary-action {
187
+ --md-filled-button-hover-state-layer-color: var(--md-sys-color-primary);
188
+ --md-filled-button-pressed-state-layer-color: var(--md-sys-color-primary);
189
+ }
190
+
191
+ .secondary-action {
192
+ --md-text-button-hover-state-layer-color: var(--md-sys-color-primary);
193
+ --md-text-button-pressed-state-layer-color: var(--md-sys-color-primary);
194
+ }
195
+ `;o([e.property({type:Boolean,reflect:!0})],exports.PdDialog.prototype,"open",2);o([e.property({type:String})],exports.PdDialog.prototype,"size",2);o([e.property({type:String})],exports.PdDialog.prototype,"variant",2);o([e.property({type:String})],exports.PdDialog.prototype,"headline",2);o([e.property({type:String,attribute:"primary-action"})],exports.PdDialog.prototype,"primaryAction",2);o([e.property({type:String,attribute:"secondary-action"})],exports.PdDialog.prototype,"secondaryAction",2);o([e.property({type:Boolean,attribute:"closable-by-backdrop"})],exports.PdDialog.prototype,"closableByBackdrop",2);o([e.property({type:Boolean,attribute:"show-close-button"})],exports.PdDialog.prototype,"showCloseButton",2);o([e.query("md-dialog")],exports.PdDialog.prototype,"dialogElement",2);exports.PdDialog=o([e.customElement("pd-dialog")],exports.PdDialog);