@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,99 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("lit"),l=require("lit/decorators.js");require("@material/web/button/filled-button.js");require("@material/web/button/outlined-button.js");require("@material/web/button/text-button.js");require("@material/web/button/elevated-button.js");require("@material/web/button/filled-tonal-button.js");require("@material/web/icon/icon.js");var m=Object.defineProperty,h=Object.getOwnPropertyDescriptor,s=(a,i,o,t)=>{for(var n=t>1?void 0:t?h(i,o):i,r=a.length-1,d;r>=0;r--)(d=a[r])&&(n=(t?d(i,o,n):d(n))||n);return t&&n&&m(i,o,n),n};exports.PdButton=class extends e.LitElement{constructor(){super(...arguments),this.variant="filled",this.size="medium",this.icon="",this.iconTrailing=!1,this.disabled=!1}getButtonTemplate(){const i=this.iconTrailing?"trailing-icon":"icon",o=this.icon?e.html`<md-icon slot="${i}">${this.icon}</md-icon>`:"",t=e.html`${this.iconTrailing?"":o}<slot></slot>${this.iconTrailing?o:""}`;switch(this.variant){case"outlined":return e.html`<md-outlined-button ?disabled=${this.disabled}>${t}</md-outlined-button>`;case"text":return e.html`<md-text-button ?disabled=${this.disabled}>${t}</md-text-button>`;case"elevated":return e.html`<md-elevated-button ?disabled=${this.disabled}>${t}</md-elevated-button>`;case"tonal":return e.html`<md-filled-tonal-button ?disabled=${this.disabled}>${t}</md-filled-tonal-button>`;default:return e.html`<md-filled-button ?disabled=${this.disabled}>${t}</md-filled-button>`}}render(){return this.getButtonTemplate()}};exports.PdButton.styles=e.css`
2
+ :host {
3
+ display: inline-flex;
4
+ /* We set a default shape for ALL Prioticket buttons. */
5
+ --md-filled-button-container-shape: var(--md-sys-shape-corner-small);
6
+ --md-outlined-button-container-shape: var(--md-sys-shape-corner-small);
7
+ --md-text-button-container-shape: var(--md-sys-shape-corner-small);
8
+ --md-elevated-button-container-shape: var(--md-sys-shape-corner-small);
9
+ --md-filled-tonal-button-container-shape: var(--md-sys-shape-corner-small);
10
+ }
11
+
12
+ /* We target the inner Material Web buttons to apply our specific styles. */
13
+ md-filled-button,
14
+ md-outlined-button,
15
+ md-text-button,
16
+ md-elevated-button,
17
+ md-filled-tonal-button {
18
+ width: 100%;
19
+ /* Transition for smooth visual feedback */
20
+ transition: all 150ms ease-in-out;
21
+ }
22
+
23
+ /* --- Size Variant Logic --- */
24
+ :host([size='xsmall']) md-filled-button,
25
+ :host([size='xsmall']) md-outlined-button,
26
+ :host([size='xsmall']) md-text-button,
27
+ :host([size='xsmall']) md-elevated-button,
28
+ :host([size='xsmall']) md-filled-tonal-button {
29
+ --md-filled-button-container-height: var(--md-sys-button-container-height-xsmall, 1.75rem);
30
+ --md-outlined-button-container-height: var(--md-sys-button-container-height-xsmall, 1.75rem);
31
+ --md-text-button-container-height: var(--md-sys-button-container-height-xsmall, 1.75rem);
32
+ --md-elevated-button-container-height: var(--md-sys-button-container-height-xsmall, 1.75rem);
33
+ --md-filled-tonal-button-container-height: var(--md-sys-button-container-height-xsmall, 1.75rem);
34
+ font-size: var(--md-sys-typescale-label-small-size);
35
+ font-weight: var(--md-sys-typescale-label-small-weight);
36
+ }
37
+
38
+ :host([size='small']) md-filled-button,
39
+ :host([size='small']) md-outlined-button,
40
+ :host([size='small']) md-text-button,
41
+ :host([size='small']) md-elevated-button,
42
+ :host([size='small']) md-filled-tonal-button {
43
+ --md-filled-button-container-height: var(--md-sys-button-container-height-small, 2rem);
44
+ --md-outlined-button-container-height: var(--md-sys-button-container-height-small, 2rem);
45
+ --md-text-button-container-height: var(--md-sys-button-container-height-small, 2rem);
46
+ --md-elevated-button-container-height: var(--md-sys-button-container-height-small, 2rem);
47
+ --md-filled-tonal-button-container-height: var(--md-sys-button-container-height-small, 2rem);
48
+ font-size: var(--md-sys-typescale-label-medium-size);
49
+ font-weight: var(--md-sys-typescale-label-medium-weight);
50
+ }
51
+
52
+ :host([size='medium']) md-filled-button,
53
+ :host([size='medium']) md-outlined-button,
54
+ :host([size='medium']) md-text-button,
55
+ :host([size='medium']) md-elevated-button,
56
+ :host([size='medium']) md-filled-tonal-button {
57
+ --md-filled-button-container-height: var(--md-sys-button-container-height-medium, 2.5rem);
58
+ --md-outlined-button-container-height: var(--md-sys-button-container-height-medium, 2.5rem);
59
+ --md-text-button-container-height: var(--md-sys-button-container-height-medium, 2.5rem);
60
+ --md-elevated-button-container-height: var(--md-sys-button-container-height-medium, 2.5rem);
61
+ --md-filled-tonal-button-container-height: var(--md-sys-button-container-height-medium, 2.5rem);
62
+ font-size: var(--md-sys-typescale-label-large-size);
63
+ font-weight: var(--md-sys-typescale-label-large-weight);
64
+ }
65
+
66
+ :host([size='large']) md-filled-button,
67
+ :host([size='large']) md-outlined-button,
68
+ :host([size='large']) md-text-button,
69
+ :host([size='large']) md-elevated-button,
70
+ :host([size='large']) md-filled-tonal-button {
71
+ --md-filled-button-container-height: var(--md-sys-button-container-height-large, 3rem);
72
+ --md-outlined-button-container-height: var(--md-sys-button-container-height-large, 3rem);
73
+ --md-text-button-container-height: var(--md-sys-button-container-height-large, 3rem);
74
+ --md-elevated-button-container-height: var(--md-sys-button-container-height-large, 3rem);
75
+ --md-filled-tonal-button-container-height: var(--md-sys-button-container-height-large, 3rem);
76
+ font-size: var(--md-sys-typescale-title-small-size);
77
+ font-weight: var(--md-sys-typescale-title-small-weight);
78
+ }
79
+
80
+ :host([size='xlarge']) md-filled-button,
81
+ :host([size='xlarge']) md-outlined-button,
82
+ :host([size='xlarge']) md-text-button,
83
+ :host([size='xlarge']) md-elevated-button,
84
+ :host([size='xlarge']) md-filled-tonal-button {
85
+ --md-filled-button-container-height: var(--md-sys-button-container-height-xlarge, 3.5rem);
86
+ --md-outlined-button-container-height: var(--md-sys-button-container-height-xlarge, 3.5rem);
87
+ --md-text-button-container-height: var(--md-sys-button-container-height-xlarge, 3.5rem);
88
+ --md-elevated-button-container-height: var(--md-sys-button-container-height-xlarge, 3.5rem);
89
+ --md-filled-tonal-button-container-height: var(--md-sys-button-container-height-xlarge, 3.5rem);
90
+ font-size: var(--md-sys-typescale-title-medium-size);
91
+ font-weight: var(--md-sys-typescale-title-medium-weight);
92
+ }
93
+
94
+ /* --- Icon Logic --- */
95
+ /* The ::slotted selector allows us to style content passed into the slot */
96
+ ::slotted(span) {
97
+ display: inline-block;
98
+ }
99
+ `;s([l.property({type:String})],exports.PdButton.prototype,"variant",2);s([l.property({type:String,reflect:!0})],exports.PdButton.prototype,"size",2);s([l.property({type:String})],exports.PdButton.prototype,"icon",2);s([l.property({type:Boolean,attribute:"icon-trailing"})],exports.PdButton.prototype,"iconTrailing",2);s([l.property({type:Boolean,reflect:!0})],exports.PdButton.prototype,"disabled",2);exports.PdButton=s([l.customElement("pd-button")],exports.PdButton);
@@ -0,0 +1,156 @@
1
+ import { css as h, LitElement as u, html as o } from "lit";
2
+ import { property as l, customElement as b } from "lit/decorators.js";
3
+ import "@material/web/button/filled-button.js";
4
+ import "@material/web/button/outlined-button.js";
5
+ import "@material/web/button/text-button.js";
6
+ import "@material/web/button/elevated-button.js";
7
+ import "@material/web/button/filled-tonal-button.js";
8
+ import "@material/web/icon/icon.js";
9
+ var c = Object.defineProperty, g = Object.getOwnPropertyDescriptor, s = (a, n, t, r) => {
10
+ for (var i = r > 1 ? void 0 : r ? g(n, t) : n, d = a.length - 1, m; d >= 0; d--)
11
+ (m = a[d]) && (i = (r ? m(n, t, i) : m(i)) || i);
12
+ return r && i && c(n, t, i), i;
13
+ };
14
+ let e = class extends u {
15
+ constructor() {
16
+ super(...arguments), this.variant = "filled", this.size = "medium", this.icon = "", this.iconTrailing = !1, this.disabled = !1;
17
+ }
18
+ getButtonTemplate() {
19
+ const a = this.iconTrailing ? "trailing-icon" : "icon", n = this.icon ? o`<md-icon slot="${a}">${this.icon}</md-icon>` : "", t = o`${this.iconTrailing ? "" : n}<slot></slot>${this.iconTrailing ? n : ""}`;
20
+ switch (this.variant) {
21
+ case "outlined":
22
+ return o`<md-outlined-button ?disabled=${this.disabled}>${t}</md-outlined-button>`;
23
+ case "text":
24
+ return o`<md-text-button ?disabled=${this.disabled}>${t}</md-text-button>`;
25
+ case "elevated":
26
+ return o`<md-elevated-button ?disabled=${this.disabled}>${t}</md-elevated-button>`;
27
+ case "tonal":
28
+ return o`<md-filled-tonal-button ?disabled=${this.disabled}>${t}</md-filled-tonal-button>`;
29
+ default:
30
+ return o`<md-filled-button ?disabled=${this.disabled}>${t}</md-filled-button>`;
31
+ }
32
+ }
33
+ render() {
34
+ return this.getButtonTemplate();
35
+ }
36
+ };
37
+ e.styles = h`
38
+ :host {
39
+ display: inline-flex;
40
+ /* We set a default shape for ALL Prioticket buttons. */
41
+ --md-filled-button-container-shape: var(--md-sys-shape-corner-small);
42
+ --md-outlined-button-container-shape: var(--md-sys-shape-corner-small);
43
+ --md-text-button-container-shape: var(--md-sys-shape-corner-small);
44
+ --md-elevated-button-container-shape: var(--md-sys-shape-corner-small);
45
+ --md-filled-tonal-button-container-shape: var(--md-sys-shape-corner-small);
46
+ }
47
+
48
+ /* We target the inner Material Web buttons to apply our specific styles. */
49
+ md-filled-button,
50
+ md-outlined-button,
51
+ md-text-button,
52
+ md-elevated-button,
53
+ md-filled-tonal-button {
54
+ width: 100%;
55
+ /* Transition for smooth visual feedback */
56
+ transition: all 150ms ease-in-out;
57
+ }
58
+
59
+ /* --- Size Variant Logic --- */
60
+ :host([size='xsmall']) md-filled-button,
61
+ :host([size='xsmall']) md-outlined-button,
62
+ :host([size='xsmall']) md-text-button,
63
+ :host([size='xsmall']) md-elevated-button,
64
+ :host([size='xsmall']) md-filled-tonal-button {
65
+ --md-filled-button-container-height: var(--md-sys-button-container-height-xsmall, 1.75rem);
66
+ --md-outlined-button-container-height: var(--md-sys-button-container-height-xsmall, 1.75rem);
67
+ --md-text-button-container-height: var(--md-sys-button-container-height-xsmall, 1.75rem);
68
+ --md-elevated-button-container-height: var(--md-sys-button-container-height-xsmall, 1.75rem);
69
+ --md-filled-tonal-button-container-height: var(--md-sys-button-container-height-xsmall, 1.75rem);
70
+ font-size: var(--md-sys-typescale-label-small-size);
71
+ font-weight: var(--md-sys-typescale-label-small-weight);
72
+ }
73
+
74
+ :host([size='small']) md-filled-button,
75
+ :host([size='small']) md-outlined-button,
76
+ :host([size='small']) md-text-button,
77
+ :host([size='small']) md-elevated-button,
78
+ :host([size='small']) md-filled-tonal-button {
79
+ --md-filled-button-container-height: var(--md-sys-button-container-height-small, 2rem);
80
+ --md-outlined-button-container-height: var(--md-sys-button-container-height-small, 2rem);
81
+ --md-text-button-container-height: var(--md-sys-button-container-height-small, 2rem);
82
+ --md-elevated-button-container-height: var(--md-sys-button-container-height-small, 2rem);
83
+ --md-filled-tonal-button-container-height: var(--md-sys-button-container-height-small, 2rem);
84
+ font-size: var(--md-sys-typescale-label-medium-size);
85
+ font-weight: var(--md-sys-typescale-label-medium-weight);
86
+ }
87
+
88
+ :host([size='medium']) md-filled-button,
89
+ :host([size='medium']) md-outlined-button,
90
+ :host([size='medium']) md-text-button,
91
+ :host([size='medium']) md-elevated-button,
92
+ :host([size='medium']) md-filled-tonal-button {
93
+ --md-filled-button-container-height: var(--md-sys-button-container-height-medium, 2.5rem);
94
+ --md-outlined-button-container-height: var(--md-sys-button-container-height-medium, 2.5rem);
95
+ --md-text-button-container-height: var(--md-sys-button-container-height-medium, 2.5rem);
96
+ --md-elevated-button-container-height: var(--md-sys-button-container-height-medium, 2.5rem);
97
+ --md-filled-tonal-button-container-height: var(--md-sys-button-container-height-medium, 2.5rem);
98
+ font-size: var(--md-sys-typescale-label-large-size);
99
+ font-weight: var(--md-sys-typescale-label-large-weight);
100
+ }
101
+
102
+ :host([size='large']) md-filled-button,
103
+ :host([size='large']) md-outlined-button,
104
+ :host([size='large']) md-text-button,
105
+ :host([size='large']) md-elevated-button,
106
+ :host([size='large']) md-filled-tonal-button {
107
+ --md-filled-button-container-height: var(--md-sys-button-container-height-large, 3rem);
108
+ --md-outlined-button-container-height: var(--md-sys-button-container-height-large, 3rem);
109
+ --md-text-button-container-height: var(--md-sys-button-container-height-large, 3rem);
110
+ --md-elevated-button-container-height: var(--md-sys-button-container-height-large, 3rem);
111
+ --md-filled-tonal-button-container-height: var(--md-sys-button-container-height-large, 3rem);
112
+ font-size: var(--md-sys-typescale-title-small-size);
113
+ font-weight: var(--md-sys-typescale-title-small-weight);
114
+ }
115
+
116
+ :host([size='xlarge']) md-filled-button,
117
+ :host([size='xlarge']) md-outlined-button,
118
+ :host([size='xlarge']) md-text-button,
119
+ :host([size='xlarge']) md-elevated-button,
120
+ :host([size='xlarge']) md-filled-tonal-button {
121
+ --md-filled-button-container-height: var(--md-sys-button-container-height-xlarge, 3.5rem);
122
+ --md-outlined-button-container-height: var(--md-sys-button-container-height-xlarge, 3.5rem);
123
+ --md-text-button-container-height: var(--md-sys-button-container-height-xlarge, 3.5rem);
124
+ --md-elevated-button-container-height: var(--md-sys-button-container-height-xlarge, 3.5rem);
125
+ --md-filled-tonal-button-container-height: var(--md-sys-button-container-height-xlarge, 3.5rem);
126
+ font-size: var(--md-sys-typescale-title-medium-size);
127
+ font-weight: var(--md-sys-typescale-title-medium-weight);
128
+ }
129
+
130
+ /* --- Icon Logic --- */
131
+ /* The ::slotted selector allows us to style content passed into the slot */
132
+ ::slotted(span) {
133
+ display: inline-block;
134
+ }
135
+ `;
136
+ s([
137
+ l({ type: String })
138
+ ], e.prototype, "variant", 2);
139
+ s([
140
+ l({ type: String, reflect: !0 })
141
+ ], e.prototype, "size", 2);
142
+ s([
143
+ l({ type: String })
144
+ ], e.prototype, "icon", 2);
145
+ s([
146
+ l({ type: Boolean, attribute: "icon-trailing" })
147
+ ], e.prototype, "iconTrailing", 2);
148
+ s([
149
+ l({ type: Boolean, reflect: !0 })
150
+ ], e.prototype, "disabled", 2);
151
+ e = s([
152
+ b("pd-button")
153
+ ], e);
154
+ export {
155
+ e as PdButton
156
+ };
@@ -0,0 +1,59 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("lit"),i=require("lit/decorators.js");var n=Object.defineProperty,p=Object.getOwnPropertyDescriptor,d=(s,r,o,a)=>{for(var e=a>1?void 0:a?p(r,o):r,c=s.length-1,l;c>=0;c--)(l=s[c])&&(e=(a?l(r,o,e):l(e))||e);return a&&e&&n(r,o,e),e};exports.PdCard=class extends t.LitElement{constructor(){super(...arguments),this.variant="elevated",this.clickable=!1}render(){const r=`card ${this.variant}${this.clickable?" clickable":""}`;return t.html`
2
+ <div class="${r}" @click=${this.clickable?this._handleClick:void 0}>
3
+ <slot></slot>
4
+ </div>
5
+ `}_handleClick(){this.clickable&&this.dispatchEvent(new CustomEvent("click",{bubbles:!0,composed:!0}))}};exports.PdCard.styles=t.css`
6
+ :host {
7
+ display: block;
8
+ font-family: var(--md-sys-typescale-body-large-font, 'Proxima Nova', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
9
+ }
10
+
11
+ .card {
12
+ border-radius: var(--md-sys-shape-corner-small, 5px);
13
+ padding: 16px;
14
+ transition: all 0.2s ease;
15
+ position: relative;
16
+ overflow: hidden;
17
+ }
18
+
19
+ .card.elevated {
20
+ background: var(--md-sys-color-surface, #ffffff);
21
+ color: var(--md-sys-color-on-surface, #000000);
22
+ box-shadow:
23
+ 0px 1px 2px rgba(0, 0, 0, 0.3),
24
+ 0px 1px 3px 1px rgba(0, 0, 0, 0.15);
25
+ }
26
+
27
+ .card.filled {
28
+ background: var(--md-sys-color-surface-variant, #f3f3f3);
29
+ color: var(--md-sys-color-on-surface-variant, #000000);
30
+ }
31
+
32
+ .card.outlined {
33
+ background: var(--md-sys-color-surface, #ffffff);
34
+ color: var(--md-sys-color-on-surface, #000000);
35
+ border: 1px solid var(--md-sys-color-outline, #cccccc);
36
+ }
37
+
38
+ .card.clickable {
39
+ cursor: pointer;
40
+ user-select: none;
41
+ }
42
+
43
+ .card.clickable:hover {
44
+ filter: brightness(0.95);
45
+ }
46
+
47
+ .card.clickable.elevated:hover {
48
+ box-shadow:
49
+ 0px 2px 6px 2px rgba(0, 0, 0, 0.15),
50
+ 0px 1px 2px rgba(0, 0, 0, 0.3);
51
+ }
52
+
53
+ .card.clickable:active {
54
+ filter: brightness(0.9);
55
+ }
56
+
57
+ /* Material Web Components will use --md-* design tokens directly */
58
+ /* Tokens will be provided by separate theme file with --md-* naming */
59
+ `;d([i.property({type:String})],exports.PdCard.prototype,"variant",2);d([i.property({type:Boolean})],exports.PdCard.prototype,"clickable",2);exports.PdCard=d([i.customElement("pd-card")],exports.PdCard);
@@ -0,0 +1,93 @@
1
+ import { css as n, LitElement as p, html as f } from "lit";
2
+ import { property as d, customElement as v } from "lit/decorators.js";
3
+ var b = Object.defineProperty, m = Object.getOwnPropertyDescriptor, i = (a, s, l, o) => {
4
+ for (var e = o > 1 ? void 0 : o ? m(s, l) : s, c = a.length - 1, t; c >= 0; c--)
5
+ (t = a[c]) && (e = (o ? t(s, l, e) : t(e)) || e);
6
+ return o && e && b(s, l, e), e;
7
+ };
8
+ let r = class extends p {
9
+ constructor() {
10
+ super(...arguments), this.variant = "elevated", this.clickable = !1;
11
+ }
12
+ render() {
13
+ const a = `card ${this.variant}${this.clickable ? " clickable" : ""}`;
14
+ return f`
15
+ <div class="${a}" @click=${this.clickable ? this._handleClick : void 0}>
16
+ <slot></slot>
17
+ </div>
18
+ `;
19
+ }
20
+ _handleClick() {
21
+ this.clickable && this.dispatchEvent(new CustomEvent("click", {
22
+ bubbles: !0,
23
+ composed: !0
24
+ }));
25
+ }
26
+ };
27
+ r.styles = n`
28
+ :host {
29
+ display: block;
30
+ font-family: var(--md-sys-typescale-body-large-font, 'Proxima Nova', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
31
+ }
32
+
33
+ .card {
34
+ border-radius: var(--md-sys-shape-corner-small, 5px);
35
+ padding: 16px;
36
+ transition: all 0.2s ease;
37
+ position: relative;
38
+ overflow: hidden;
39
+ }
40
+
41
+ .card.elevated {
42
+ background: var(--md-sys-color-surface, #ffffff);
43
+ color: var(--md-sys-color-on-surface, #000000);
44
+ box-shadow:
45
+ 0px 1px 2px rgba(0, 0, 0, 0.3),
46
+ 0px 1px 3px 1px rgba(0, 0, 0, 0.15);
47
+ }
48
+
49
+ .card.filled {
50
+ background: var(--md-sys-color-surface-variant, #f3f3f3);
51
+ color: var(--md-sys-color-on-surface-variant, #000000);
52
+ }
53
+
54
+ .card.outlined {
55
+ background: var(--md-sys-color-surface, #ffffff);
56
+ color: var(--md-sys-color-on-surface, #000000);
57
+ border: 1px solid var(--md-sys-color-outline, #cccccc);
58
+ }
59
+
60
+ .card.clickable {
61
+ cursor: pointer;
62
+ user-select: none;
63
+ }
64
+
65
+ .card.clickable:hover {
66
+ filter: brightness(0.95);
67
+ }
68
+
69
+ .card.clickable.elevated:hover {
70
+ box-shadow:
71
+ 0px 2px 6px 2px rgba(0, 0, 0, 0.15),
72
+ 0px 1px 2px rgba(0, 0, 0, 0.3);
73
+ }
74
+
75
+ .card.clickable:active {
76
+ filter: brightness(0.9);
77
+ }
78
+
79
+ /* Material Web Components will use --md-* design tokens directly */
80
+ /* Tokens will be provided by separate theme file with --md-* naming */
81
+ `;
82
+ i([
83
+ d({ type: String })
84
+ ], r.prototype, "variant", 2);
85
+ i([
86
+ d({ type: Boolean })
87
+ ], r.prototype, "clickable", 2);
88
+ r = i([
89
+ v("pd-card")
90
+ ], r);
91
+ export {
92
+ r as PdCard
93
+ };
@@ -0,0 +1,85 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("lit"),r=require("lit/decorators.js");require("@material/web/checkbox/checkbox.js");var h=Object.defineProperty,d=Object.getOwnPropertyDescriptor,o=(c,t,e,i)=>{for(var a=i>1?void 0:i?d(t,e):t,n=c.length-1,l;n>=0;n--)(l=c[n])&&(a=(i?l(t,e,a):l(a))||a);return i&&a&&h(t,e,a),a};exports.PdCheckbox=class extends s.LitElement{constructor(){super(...arguments),this.checked=!1,this.indeterminate=!1,this.disabled=!1,this.required=!1,this.value="",this.name="",this.label="",this.touchTarget=!1}render(){const t=this.label||"Checkbox",e=this.touchTarget?"wrapper":void 0,i=`checkbox-${Math.random().toString(36).substr(2,9)}`;return this.label?s.html`
2
+ <label class="checkbox-label" for=${i}>
3
+ <md-checkbox
4
+ id=${i}
5
+ ?checked=${this.checked}
6
+ ?indeterminate=${this.indeterminate}
7
+ ?disabled=${this.disabled}
8
+ ?required=${this.required}
9
+ touch-target=${e||"wrapper"}
10
+ aria-label=${t}
11
+ .value=${this.value}
12
+ .name=${this.name}
13
+ @change=${this._handleChange}
14
+ @input=${this._handleInput}
15
+ ></md-checkbox>
16
+ <span class="label-text">${this.label}</span>
17
+ </label>
18
+ `:s.html`
19
+ <md-checkbox
20
+ ?checked=${this.checked}
21
+ ?indeterminate=${this.indeterminate}
22
+ ?disabled=${this.disabled}
23
+ ?required=${this.required}
24
+ touch-target=${e||"wrapper"}
25
+ aria-label=${t}
26
+ .value=${this.value}
27
+ .name=${this.name}
28
+ @change=${this._handleChange}
29
+ @input=${this._handleInput}
30
+ ></md-checkbox>
31
+ `}_handleChange(t){const e=t.target;this.checked=e.checked,this.indeterminate=e.indeterminate,this.dispatchEvent(new CustomEvent("change",{detail:{checked:e.checked,indeterminate:e.indeterminate,value:e.value},bubbles:!0}))}_handleInput(t){const e=t.target;this.checked=e.checked,this.indeterminate=e.indeterminate,this.dispatchEvent(new CustomEvent("input",{detail:{checked:e.checked,indeterminate:e.indeterminate,value:e.value},bubbles:!0}))}};exports.PdCheckbox.styles=s.css`
32
+ :host {
33
+ display: inline-flex;
34
+ align-items: center;
35
+ /* Essential Material Design tokens only */
36
+ --md-checkbox-selected-container-color: var(--md-sys-color-primary);
37
+ --md-checkbox-selected-icon-color: var(--md-sys-color-on-primary);
38
+ --md-checkbox-unselected-outline-color: var(--md-sys-color-outline);
39
+ --md-checkbox-container-size: 18px;
40
+ --md-checkbox-icon-size: 16px;
41
+ }
42
+
43
+ .checkbox-label {
44
+ display: inline-flex;
45
+ align-items: center;
46
+ cursor: pointer;
47
+ gap: var(--md-sys-spacing-200);
48
+ user-select: none;
49
+ }
50
+
51
+ .checkbox-label:has(md-checkbox[disabled]) {
52
+ cursor: default;
53
+ color: var(--md-sys-color-on-surface);
54
+ opacity: 0.38;
55
+ }
56
+
57
+ .label-text {
58
+ font-family: var(--md-sys-typescale-body-medium-font);
59
+ font-size: var(--md-sys-typescale-body-medium-size);
60
+ font-weight: var(--md-sys-typescale-body-medium-weight);
61
+ line-height: var(--md-sys-typescale-body-medium-line-height);
62
+ letter-spacing: var(--md-sys-typescale-body-medium-tracking);
63
+ color: var(--md-sys-color-on-surface);
64
+ }
65
+
66
+ md-checkbox {
67
+ /* Explicit size for the checkbox component */
68
+ width: 18px;
69
+ height: 18px;
70
+ /* Ensure the checkbox maintains its size */
71
+ min-width: 18px;
72
+ min-height: 18px;
73
+ /* Transition for smooth visual feedback */
74
+ transition: all 150ms ease-in-out;
75
+ }
76
+
77
+ /* Error state styling */
78
+ :host([error]) {
79
+ --md-checkbox-unselected-outline-color: var(--md-sys-color-error);
80
+ }
81
+
82
+ :host([error]) .label-text {
83
+ color: var(--md-sys-color-error);
84
+ }
85
+ `;o([r.property({type:Boolean})],exports.PdCheckbox.prototype,"checked",2);o([r.property({type:Boolean})],exports.PdCheckbox.prototype,"indeterminate",2);o([r.property({type:Boolean})],exports.PdCheckbox.prototype,"disabled",2);o([r.property({type:Boolean})],exports.PdCheckbox.prototype,"required",2);o([r.property({type:String})],exports.PdCheckbox.prototype,"value",2);o([r.property({type:String})],exports.PdCheckbox.prototype,"name",2);o([r.property({type:String})],exports.PdCheckbox.prototype,"label",2);o([r.property({type:Boolean,attribute:"touch-target"})],exports.PdCheckbox.prototype,"touchTarget",2);exports.PdCheckbox=o([r.customElement("pd-checkbox")],exports.PdCheckbox);
@@ -0,0 +1,154 @@
1
+ import { css as d, LitElement as m, html as h } from "lit";
2
+ import { property as r, customElement as p } from "lit/decorators.js";
3
+ import "@material/web/checkbox/checkbox.js";
4
+ var u = Object.defineProperty, b = Object.getOwnPropertyDescriptor, i = (a, e, o, c) => {
5
+ for (var s = c > 1 ? void 0 : c ? b(e, o) : e, n = a.length - 1, l; n >= 0; n--)
6
+ (l = a[n]) && (s = (c ? l(e, o, s) : l(s)) || s);
7
+ return c && s && u(e, o, s), s;
8
+ };
9
+ let t = class extends m {
10
+ constructor() {
11
+ super(...arguments), this.checked = !1, this.indeterminate = !1, this.disabled = !1, this.required = !1, this.value = "", this.name = "", this.label = "", this.touchTarget = !1;
12
+ }
13
+ render() {
14
+ const a = this.label || "Checkbox", e = this.touchTarget ? "wrapper" : void 0, o = `checkbox-${Math.random().toString(36).substr(2, 9)}`;
15
+ return this.label ? h`
16
+ <label class="checkbox-label" for=${o}>
17
+ <md-checkbox
18
+ id=${o}
19
+ ?checked=${this.checked}
20
+ ?indeterminate=${this.indeterminate}
21
+ ?disabled=${this.disabled}
22
+ ?required=${this.required}
23
+ touch-target=${e || "wrapper"}
24
+ aria-label=${a}
25
+ .value=${this.value}
26
+ .name=${this.name}
27
+ @change=${this._handleChange}
28
+ @input=${this._handleInput}
29
+ ></md-checkbox>
30
+ <span class="label-text">${this.label}</span>
31
+ </label>
32
+ ` : h`
33
+ <md-checkbox
34
+ ?checked=${this.checked}
35
+ ?indeterminate=${this.indeterminate}
36
+ ?disabled=${this.disabled}
37
+ ?required=${this.required}
38
+ touch-target=${e || "wrapper"}
39
+ aria-label=${a}
40
+ .value=${this.value}
41
+ .name=${this.name}
42
+ @change=${this._handleChange}
43
+ @input=${this._handleInput}
44
+ ></md-checkbox>
45
+ `;
46
+ }
47
+ _handleChange(a) {
48
+ const e = a.target;
49
+ this.checked = e.checked, this.indeterminate = e.indeterminate, this.dispatchEvent(new CustomEvent("change", {
50
+ detail: {
51
+ checked: e.checked,
52
+ indeterminate: e.indeterminate,
53
+ value: e.value
54
+ },
55
+ bubbles: !0
56
+ }));
57
+ }
58
+ _handleInput(a) {
59
+ const e = a.target;
60
+ this.checked = e.checked, this.indeterminate = e.indeterminate, this.dispatchEvent(new CustomEvent("input", {
61
+ detail: {
62
+ checked: e.checked,
63
+ indeterminate: e.indeterminate,
64
+ value: e.value
65
+ },
66
+ bubbles: !0
67
+ }));
68
+ }
69
+ };
70
+ t.styles = d`
71
+ :host {
72
+ display: inline-flex;
73
+ align-items: center;
74
+ /* Essential Material Design tokens only */
75
+ --md-checkbox-selected-container-color: var(--md-sys-color-primary);
76
+ --md-checkbox-selected-icon-color: var(--md-sys-color-on-primary);
77
+ --md-checkbox-unselected-outline-color: var(--md-sys-color-outline);
78
+ --md-checkbox-container-size: 18px;
79
+ --md-checkbox-icon-size: 16px;
80
+ }
81
+
82
+ .checkbox-label {
83
+ display: inline-flex;
84
+ align-items: center;
85
+ cursor: pointer;
86
+ gap: var(--md-sys-spacing-200);
87
+ user-select: none;
88
+ }
89
+
90
+ .checkbox-label:has(md-checkbox[disabled]) {
91
+ cursor: default;
92
+ color: var(--md-sys-color-on-surface);
93
+ opacity: 0.38;
94
+ }
95
+
96
+ .label-text {
97
+ font-family: var(--md-sys-typescale-body-medium-font);
98
+ font-size: var(--md-sys-typescale-body-medium-size);
99
+ font-weight: var(--md-sys-typescale-body-medium-weight);
100
+ line-height: var(--md-sys-typescale-body-medium-line-height);
101
+ letter-spacing: var(--md-sys-typescale-body-medium-tracking);
102
+ color: var(--md-sys-color-on-surface);
103
+ }
104
+
105
+ md-checkbox {
106
+ /* Explicit size for the checkbox component */
107
+ width: 18px;
108
+ height: 18px;
109
+ /* Ensure the checkbox maintains its size */
110
+ min-width: 18px;
111
+ min-height: 18px;
112
+ /* Transition for smooth visual feedback */
113
+ transition: all 150ms ease-in-out;
114
+ }
115
+
116
+ /* Error state styling */
117
+ :host([error]) {
118
+ --md-checkbox-unselected-outline-color: var(--md-sys-color-error);
119
+ }
120
+
121
+ :host([error]) .label-text {
122
+ color: var(--md-sys-color-error);
123
+ }
124
+ `;
125
+ i([
126
+ r({ type: Boolean })
127
+ ], t.prototype, "checked", 2);
128
+ i([
129
+ r({ type: Boolean })
130
+ ], t.prototype, "indeterminate", 2);
131
+ i([
132
+ r({ type: Boolean })
133
+ ], t.prototype, "disabled", 2);
134
+ i([
135
+ r({ type: Boolean })
136
+ ], t.prototype, "required", 2);
137
+ i([
138
+ r({ type: String })
139
+ ], t.prototype, "value", 2);
140
+ i([
141
+ r({ type: String })
142
+ ], t.prototype, "name", 2);
143
+ i([
144
+ r({ type: String })
145
+ ], t.prototype, "label", 2);
146
+ i([
147
+ r({ type: Boolean, attribute: "touch-target" })
148
+ ], t.prototype, "touchTarget", 2);
149
+ t = i([
150
+ p("pd-checkbox")
151
+ ], t);
152
+ export {
153
+ t as PdCheckbox
154
+ };