pdm-ui-kit 1.2.0 → 1.3.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 (159) hide show
  1. package/aspect-ratio/aspect-ratio.component.d.ts +1 -1
  2. package/aspect-ratio/aspect-ratio.module.d.ts +5 -2
  3. package/badge/badge.component.d.ts +1 -1
  4. package/badge/badge.module.d.ts +5 -2
  5. package/button/button-theme.constant.d.ts +2 -0
  6. package/button/button.component.d.ts +1 -4
  7. package/button/testing/button-harness.d.ts +23 -0
  8. package/checkbox/testing/checkbox-harness.d.ts +22 -0
  9. package/dialog/dialog.module.d.ts +2 -1
  10. package/dialog/testing/dialog-harness.d.ts +26 -0
  11. package/esm2020/alert/alert.component.mjs +3 -3
  12. package/esm2020/aspect-ratio/aspect-ratio.component.mjs +4 -3
  13. package/esm2020/aspect-ratio/aspect-ratio.module.mjs +9 -10
  14. package/esm2020/badge/badge.component.mjs +4 -3
  15. package/esm2020/badge/badge.module.mjs +9 -10
  16. package/esm2020/button/button-theme.constant.mjs +55 -0
  17. package/esm2020/button/button.component.mjs +5 -18
  18. package/esm2020/button/testing/button-harness.mjs +51 -0
  19. package/esm2020/checkbox/testing/checkbox-harness.mjs +54 -0
  20. package/esm2020/dialog/dialog.component.mjs +5 -4
  21. package/esm2020/dialog/dialog.module.mjs +5 -4
  22. package/esm2020/dialog/testing/dialog-harness.mjs +87 -0
  23. package/esm2020/empty/empty.component.mjs +1 -1
  24. package/esm2020/icon/icon.component.mjs +4 -3
  25. package/esm2020/icon/icon.module.mjs +9 -10
  26. package/esm2020/input/input.component.mjs +16 -4
  27. package/esm2020/input/testing/input-harness.mjs +68 -0
  28. package/esm2020/kbd/kbd.component.mjs +4 -3
  29. package/esm2020/kbd/kbd.module.mjs +9 -10
  30. package/esm2020/pagination/pagination.component.mjs +35 -5
  31. package/esm2020/pagination/testing/pagination-harness.mjs +76 -0
  32. package/esm2020/public-api.mjs +3 -1
  33. package/esm2020/select/testing/select-harness.mjs +75 -0
  34. package/esm2020/separator/separator.component.mjs +4 -3
  35. package/esm2020/separator/separator.module.mjs +9 -10
  36. package/esm2020/skeleton/skeleton.component.mjs +4 -3
  37. package/esm2020/skeleton/skeleton.module.mjs +9 -10
  38. package/esm2020/spinner/spinner.component.mjs +4 -3
  39. package/esm2020/spinner/spinner.module.mjs +9 -10
  40. package/esm2020/src/alert/alert.component.mjs +3 -3
  41. package/esm2020/src/aspect-ratio/aspect-ratio.component.mjs +4 -3
  42. package/esm2020/src/aspect-ratio/aspect-ratio.module.mjs +9 -10
  43. package/esm2020/src/badge/badge.component.mjs +4 -3
  44. package/esm2020/src/badge/badge.module.mjs +9 -10
  45. package/esm2020/src/button/button-theme.constant.mjs +55 -0
  46. package/esm2020/src/button/button.component.mjs +5 -18
  47. package/esm2020/src/dialog/dialog.component.mjs +5 -4
  48. package/esm2020/src/dialog/dialog.module.mjs +5 -4
  49. package/esm2020/src/empty/empty.component.mjs +1 -1
  50. package/esm2020/src/icon/icon.component.mjs +4 -3
  51. package/esm2020/src/icon/icon.module.mjs +9 -10
  52. package/esm2020/src/input/input.component.mjs +16 -4
  53. package/esm2020/src/kbd/kbd.component.mjs +4 -3
  54. package/esm2020/src/kbd/kbd.module.mjs +9 -10
  55. package/esm2020/src/pagination/pagination.component.mjs +35 -5
  56. package/esm2020/src/separator/separator.component.mjs +4 -3
  57. package/esm2020/src/separator/separator.module.mjs +9 -10
  58. package/esm2020/src/skeleton/skeleton.component.mjs +4 -3
  59. package/esm2020/src/skeleton/skeleton.module.mjs +9 -10
  60. package/esm2020/src/spinner/spinner.component.mjs +4 -3
  61. package/esm2020/src/spinner/spinner.module.mjs +9 -10
  62. package/esm2020/src/utils/public-api.mjs +2 -1
  63. package/esm2020/src/utils/validators.mjs +180 -0
  64. package/esm2020/testing.mjs +13 -0
  65. package/fesm2015/pdm-ui-kit-src-alert.mjs +2 -2
  66. package/fesm2015/pdm-ui-kit-src-alert.mjs.map +1 -1
  67. package/fesm2015/pdm-ui-kit-src-aspect-ratio.mjs +10 -10
  68. package/fesm2015/pdm-ui-kit-src-aspect-ratio.mjs.map +1 -1
  69. package/fesm2015/pdm-ui-kit-src-badge.mjs +10 -10
  70. package/fesm2015/pdm-ui-kit-src-badge.mjs.map +1 -1
  71. package/fesm2015/pdm-ui-kit-src-button.mjs +58 -17
  72. package/fesm2015/pdm-ui-kit-src-button.mjs.map +1 -1
  73. package/fesm2015/pdm-ui-kit-src-dialog.mjs +8 -6
  74. package/fesm2015/pdm-ui-kit-src-dialog.mjs.map +1 -1
  75. package/fesm2015/pdm-ui-kit-src-empty.mjs.map +1 -1
  76. package/fesm2015/pdm-ui-kit-src-icon.mjs +12 -12
  77. package/fesm2015/pdm-ui-kit-src-icon.mjs.map +1 -1
  78. package/fesm2015/pdm-ui-kit-src-input.mjs +15 -3
  79. package/fesm2015/pdm-ui-kit-src-input.mjs.map +1 -1
  80. package/fesm2015/pdm-ui-kit-src-kbd.mjs +10 -10
  81. package/fesm2015/pdm-ui-kit-src-kbd.mjs.map +1 -1
  82. package/fesm2015/pdm-ui-kit-src-pagination.mjs +34 -4
  83. package/fesm2015/pdm-ui-kit-src-pagination.mjs.map +1 -1
  84. package/fesm2015/pdm-ui-kit-src-separator.mjs +10 -10
  85. package/fesm2015/pdm-ui-kit-src-separator.mjs.map +1 -1
  86. package/fesm2015/pdm-ui-kit-src-skeleton.mjs +10 -10
  87. package/fesm2015/pdm-ui-kit-src-skeleton.mjs.map +1 -1
  88. package/fesm2015/pdm-ui-kit-src-spinner.mjs +10 -10
  89. package/fesm2015/pdm-ui-kit-src-spinner.mjs.map +1 -1
  90. package/fesm2015/pdm-ui-kit-src-utils.mjs +181 -1
  91. package/fesm2015/pdm-ui-kit-src-utils.mjs.map +1 -1
  92. package/fesm2015/pdm-ui-kit.mjs +846 -213
  93. package/fesm2015/pdm-ui-kit.mjs.map +1 -1
  94. package/fesm2020/pdm-ui-kit-src-alert.mjs +2 -2
  95. package/fesm2020/pdm-ui-kit-src-alert.mjs.map +1 -1
  96. package/fesm2020/pdm-ui-kit-src-aspect-ratio.mjs +10 -10
  97. package/fesm2020/pdm-ui-kit-src-aspect-ratio.mjs.map +1 -1
  98. package/fesm2020/pdm-ui-kit-src-badge.mjs +10 -10
  99. package/fesm2020/pdm-ui-kit-src-badge.mjs.map +1 -1
  100. package/fesm2020/pdm-ui-kit-src-button.mjs +58 -17
  101. package/fesm2020/pdm-ui-kit-src-button.mjs.map +1 -1
  102. package/fesm2020/pdm-ui-kit-src-dialog.mjs +8 -6
  103. package/fesm2020/pdm-ui-kit-src-dialog.mjs.map +1 -1
  104. package/fesm2020/pdm-ui-kit-src-empty.mjs.map +1 -1
  105. package/fesm2020/pdm-ui-kit-src-icon.mjs +12 -12
  106. package/fesm2020/pdm-ui-kit-src-icon.mjs.map +1 -1
  107. package/fesm2020/pdm-ui-kit-src-input.mjs +15 -3
  108. package/fesm2020/pdm-ui-kit-src-input.mjs.map +1 -1
  109. package/fesm2020/pdm-ui-kit-src-kbd.mjs +10 -10
  110. package/fesm2020/pdm-ui-kit-src-kbd.mjs.map +1 -1
  111. package/fesm2020/pdm-ui-kit-src-pagination.mjs +34 -4
  112. package/fesm2020/pdm-ui-kit-src-pagination.mjs.map +1 -1
  113. package/fesm2020/pdm-ui-kit-src-separator.mjs +10 -10
  114. package/fesm2020/pdm-ui-kit-src-separator.mjs.map +1 -1
  115. package/fesm2020/pdm-ui-kit-src-skeleton.mjs +10 -10
  116. package/fesm2020/pdm-ui-kit-src-skeleton.mjs.map +1 -1
  117. package/fesm2020/pdm-ui-kit-src-spinner.mjs +10 -10
  118. package/fesm2020/pdm-ui-kit-src-spinner.mjs.map +1 -1
  119. package/fesm2020/pdm-ui-kit-src-utils.mjs +181 -1
  120. package/fesm2020/pdm-ui-kit-src-utils.mjs.map +1 -1
  121. package/fesm2020/pdm-ui-kit.mjs +705 -213
  122. package/fesm2020/pdm-ui-kit.mjs.map +1 -1
  123. package/icon/icon.component.d.ts +1 -1
  124. package/icon/icon.module.d.ts +5 -2
  125. package/input/input.component.d.ts +4 -0
  126. package/input/testing/input-harness.d.ts +27 -0
  127. package/kbd/kbd.component.d.ts +1 -1
  128. package/kbd/kbd.module.d.ts +5 -2
  129. package/package.json +1 -1
  130. package/pagination/testing/pagination-harness.d.ts +21 -0
  131. package/public-api.d.ts +1 -0
  132. package/select/testing/select-harness.d.ts +25 -0
  133. package/separator/separator.component.d.ts +1 -1
  134. package/separator/separator.module.d.ts +5 -2
  135. package/skeleton/skeleton.component.d.ts +1 -1
  136. package/skeleton/skeleton.module.d.ts +5 -2
  137. package/spinner/spinner.component.d.ts +1 -1
  138. package/spinner/spinner.module.d.ts +5 -2
  139. package/src/aspect-ratio/aspect-ratio.component.d.ts +1 -1
  140. package/src/aspect-ratio/aspect-ratio.module.d.ts +5 -2
  141. package/src/badge/badge.component.d.ts +1 -1
  142. package/src/badge/badge.module.d.ts +5 -2
  143. package/src/button/button-theme.constant.d.ts +2 -0
  144. package/src/button/button.component.d.ts +1 -4
  145. package/src/dialog/dialog.module.d.ts +2 -1
  146. package/src/icon/icon.component.d.ts +1 -1
  147. package/src/icon/icon.module.d.ts +5 -2
  148. package/src/input/input.component.d.ts +4 -0
  149. package/src/kbd/kbd.component.d.ts +1 -1
  150. package/src/kbd/kbd.module.d.ts +5 -2
  151. package/src/separator/separator.component.d.ts +1 -1
  152. package/src/separator/separator.module.d.ts +5 -2
  153. package/src/skeleton/skeleton.component.d.ts +1 -1
  154. package/src/skeleton/skeleton.module.d.ts +5 -2
  155. package/src/spinner/spinner.component.d.ts +1 -1
  156. package/src/spinner/spinner.module.d.ts +5 -2
  157. package/src/utils/public-api.d.ts +1 -0
  158. package/src/utils/validators.d.ts +109 -0
  159. package/testing.d.ts +12 -0
@@ -0,0 +1,180 @@
1
+ /**
2
+ * Form validation utilities for PDM UI Kit
3
+ *
4
+ * Pure validation functions and patterns that work with any form validation library.
5
+ * These functions validate values directly and return true/false, making them framework-agnostic.
6
+ */
7
+ /**
8
+ * Validate email format
9
+ *
10
+ * @example
11
+ * isValidEmail('user@example.com') // true
12
+ */
13
+ export function isValidEmail(value) {
14
+ if (!value)
15
+ return false;
16
+ const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
17
+ return emailRegex.test(value);
18
+ }
19
+ /**
20
+ * Validate URL format
21
+ *
22
+ * @example
23
+ * isValidUrl('https://example.com') // true
24
+ */
25
+ export function isValidUrl(value) {
26
+ if (!value)
27
+ return false;
28
+ try {
29
+ new URL(value);
30
+ return true;
31
+ }
32
+ catch {
33
+ return false;
34
+ }
35
+ }
36
+ /**
37
+ * Validate minimum length
38
+ *
39
+ * @example
40
+ * hasMinLength('password', 8) // true if length >= 8
41
+ */
42
+ export function hasMinLength(value, min) {
43
+ if (!value)
44
+ return false;
45
+ return String(value).length >= min;
46
+ }
47
+ /**
48
+ * Validate maximum length
49
+ *
50
+ * @example
51
+ * hasMaxLength('bio', 500) // true if length <= 500
52
+ */
53
+ export function hasMaxLength(value, max) {
54
+ if (!value)
55
+ return true;
56
+ return String(value).length <= max;
57
+ }
58
+ /**
59
+ * Validate that value only contains numbers
60
+ *
61
+ * @example
62
+ * isNumeric('12345') // true
63
+ */
64
+ export function isNumeric(value) {
65
+ if (!value)
66
+ return false;
67
+ return /^\d+$/.test(String(value));
68
+ }
69
+ /**
70
+ * Validate that two values match (e.g., password confirmation)
71
+ *
72
+ * @example
73
+ * valuesMatch(password, confirmPassword) // true if they match
74
+ */
75
+ export function valuesMatch(value1, value2) {
76
+ if (!value1 || !value2)
77
+ return false;
78
+ return value1 === value2;
79
+ }
80
+ /**
81
+ * Validate minimum value
82
+ *
83
+ * @example
84
+ * isMinValue(age, 18) // true if age >= 18
85
+ */
86
+ export function isMinValue(value, min) {
87
+ if (value === null || value === undefined)
88
+ return false;
89
+ return value >= min;
90
+ }
91
+ /**
92
+ * Validate maximum value
93
+ *
94
+ * @example
95
+ * isMaxValue(percentage, 100) // true if percentage <= 100
96
+ */
97
+ export function isMaxValue(value, max) {
98
+ if (value === null || value === undefined)
99
+ return false;
100
+ return value <= max;
101
+ }
102
+ /**
103
+ * Validate phone number format (basic international format)
104
+ * Accepts: +1234567890, (123) 456-7890, 123-456-7890
105
+ *
106
+ * @example
107
+ * isValidPhone('+1234567890') // true
108
+ */
109
+ export function isValidPhone(value) {
110
+ if (!value)
111
+ return false;
112
+ const phoneRegex = /^[\+]?[(]?[0-9]{3}[)]?[-\s\.]?[0-9]{3}[-\s\.]?[0-9]{4,6}$/;
113
+ return phoneRegex.test(String(value).replace(/\s/g, ''));
114
+ }
115
+ /**
116
+ * Check if value contains at least one uppercase letter
117
+ *
118
+ * @example
119
+ * hasUppercase('Password') // true
120
+ */
121
+ export function hasUppercase(value) {
122
+ if (!value)
123
+ return false;
124
+ return /[A-Z]/.test(value);
125
+ }
126
+ /**
127
+ * Check if value contains at least one lowercase letter
128
+ *
129
+ * @example
130
+ * hasLowercase('Password') // true
131
+ */
132
+ export function hasLowercase(value) {
133
+ if (!value)
134
+ return false;
135
+ return /[a-z]/.test(value);
136
+ }
137
+ /**
138
+ * Check if value contains at least one number
139
+ *
140
+ * @example
141
+ * hasNumber('Pass123') // true
142
+ */
143
+ export function hasNumber(value) {
144
+ if (!value)
145
+ return false;
146
+ return /\d/.test(value);
147
+ }
148
+ /**
149
+ * Check if value contains at least one special character
150
+ *
151
+ * @example
152
+ * hasSpecialChar('Pass@123') // true
153
+ */
154
+ export function hasSpecialChar(value) {
155
+ if (!value)
156
+ return false;
157
+ return /[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/.test(value);
158
+ }
159
+ /**
160
+ * Get user-friendly error message for validation failures
161
+ *
162
+ * @example
163
+ * getErrorMessage('invalidEmail') // "Please enter a valid email address"
164
+ */
165
+ export function getErrorMessage(errorCode, fieldName = 'Field') {
166
+ const messages = {
167
+ required: `${fieldName} is required`,
168
+ invalidEmail: 'Please enter a valid email address',
169
+ invalidUrl: 'Please enter a valid URL',
170
+ invalidPhone: 'Please enter a valid phone number',
171
+ notNumeric: `${fieldName} must contain only numbers`,
172
+ noUppercase: `${fieldName} must contain at least one uppercase letter`,
173
+ noLowercase: `${fieldName} must contain at least one lowercase letter`,
174
+ noNumber: `${fieldName} must contain at least one number`,
175
+ noSpecialChar: `${fieldName} must contain at least one special character`,
176
+ fieldsDoNotMatch: 'Fields do not match',
177
+ };
178
+ return messages[errorCode] || 'Invalid input';
179
+ }
180
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFsaWRhdG9ycy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy91dGlscy92YWxpZGF0b3JzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7OztHQUtHO0FBT0g7Ozs7O0dBS0c7QUFDSCxNQUFNLFVBQVUsWUFBWSxDQUFDLEtBQWE7SUFDeEMsSUFBSSxDQUFDLEtBQUs7UUFBRSxPQUFPLEtBQUssQ0FBQztJQUN6QixNQUFNLFVBQVUsR0FBRyw0QkFBNEIsQ0FBQztJQUNoRCxPQUFPLFVBQVUsQ0FBQyxJQUFJLENBQUMsS0FBSyxDQUFDLENBQUM7QUFDaEMsQ0FBQztBQUVEOzs7OztHQUtHO0FBQ0gsTUFBTSxVQUFVLFVBQVUsQ0FBQyxLQUFhO0lBQ3RDLElBQUksQ0FBQyxLQUFLO1FBQUUsT0FBTyxLQUFLLENBQUM7SUFDekIsSUFBSTtRQUNGLElBQUksR0FBRyxDQUFDLEtBQUssQ0FBQyxDQUFDO1FBQ2YsT0FBTyxJQUFJLENBQUM7S0FDYjtJQUFDLE1BQU07UUFDTixPQUFPLEtBQUssQ0FBQztLQUNkO0FBQ0gsQ0FBQztBQUVEOzs7OztHQUtHO0FBQ0gsTUFBTSxVQUFVLFlBQVksQ0FBQyxLQUFhLEVBQUUsR0FBVztJQUNyRCxJQUFJLENBQUMsS0FBSzt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W1haWw6ICdQbGVhc2UgZW50ZXIgYSB2YWxpZCBlbWFpbCBhZGRyZXNzJyxcbiAgICBpbnZhbGlkVXJsOiAnUGxlYXNlIGVudGVyIGEgdmFsaWQgVVJMJyxcbiAgICBpbnZhbGlkUGhvbmU6ICdQbGVhc2UgZW50ZXIgYSB2YWxpZCBwaG9uZSBudW1iZXInLFxuICAgIG5vdE51bWVyaWM6IGAke2ZpZWxkTmFtZX0gbXVzdCBjb250YWluIG9ubHkgbnVtYmVyc2AsXG4gICAgbm9VcHBlcmNhc2U6IGAke2ZpZWxkTmFtZX0gbXVzdCBjb250YWluIGF0IGxlYXN0IG9uZSB1cHBlcmNhc2UgbGV0dGVyYCxcbiAgICBub0xvd2VyY2FzZTogYCR7ZmllbGROYW1lfSBtdXN0IGNvbnRhaW4gYXQgbGVhc3Qgb25lIGxvd2VyY2FzZSBsZXR0ZXJgLFxuICAgIG5vTnVtYmVyOiBgJHtmaWVsZE5hbWV9IG11c3QgY29udGFpbiBhdCBsZWFzdCBvbmUgbnVtYmVyYCxcbiAgICBub1NwZWNpYWxDaGFyOiBgJHtmaWVsZE5hbWV9IG11c3QgY29udGFpbiBhdCBsZWFzdCBvbmUgc3BlY2lhbCBjaGFyYWN0ZXJgLFxuICAgIGZpZWxkc0RvTm90TWF0Y2g6ICdGaWVsZHMgZG8gbm90IG1hdGNoJyxcbiAgfTtcblxuICByZXR1cm4gbWVzc2FnZXNbZXJyb3JDb2RlXSB8fCAnSW52YWxpZCBpbnB1dCc7XG59XG4iXX0=
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Public API for CDK test harnesses
3
+ *
4
+ * Usage:
5
+ * import { PdmInputHarness, PdmButtonHarness } from 'pdm-ui-kit/testing';
6
+ */
7
+ export { PdmInputHarness } from './input/testing/input-harness';
8
+ export { PdmButtonHarness } from './button/testing/button-harness';
9
+ export { PdmDialogHarness } from './dialog/testing/dialog-harness';
10
+ export { PdmSelectHarness } from './select/testing/select-harness';
11
+ export { PdmCheckboxHarness } from './checkbox/testing/checkbox-harness';
12
+ export { PdmPaginationHarness } from './pagination/testing/pagination-harness';
13
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdGluZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy90ZXN0aW5nLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7OztHQUtHO0FBRUgsT0FBTyxFQUFFLGVBQWUsRUFBK0IsTUFBTSwrQkFBK0IsQ0FBQztBQUM3RixPQUFPLEVBQUUsZ0JBQWdCLEVBQWdDLE1BQU0saUNBQWlDLENBQUM7QUFDakcsT0FBTyxFQUFFLGdCQUFnQixFQUFnQyxNQUFNLGlDQUFpQyxDQUFDO0FBQ2pHLE9BQU8sRUFBRSxnQkFBZ0IsRUFBZ0MsTUFBTSxpQ0FBaUMsQ0FBQztBQUNqRyxPQUFPLEVBQUUsa0JBQWtCLEVBQWtDLE1BQU0scUNBQXFDLENBQUM7QUFDekcsT0FBTyxFQUFFLG9CQUFvQixFQUFvQyxNQUFNLHlDQUF5QyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBQdWJsaWMgQVBJIGZvciBDREsgdGVzdCBoYXJuZXNzZXNcbiAqXG4gKiBVc2FnZTpcbiAqIGltcG9ydCB7IFBkbUlucHV0SGFybmVzcywgUGRtQnV0dG9uSGFybmVzcyB9IGZyb20gJ3BkbS11aS1raXQvdGVzdGluZyc7XG4gKi9cblxuZXhwb3J0IHsgUGRtSW5wdXRIYXJuZXNzLCB0eXBlIFBkbUlucHV0SGFybmVzc0ZpbHRlcnMgfSBmcm9tICcuL2lucHV0L3Rlc3RpbmcvaW5wdXQtaGFybmVzcyc7XG5leHBvcnQgeyBQZG1CdXR0b25IYXJuZXNzLCB0eXBlIFBkbUJ1dHRvbkhhcm5lc3NGaWx0ZXJzIH0gZnJvbSAnLi9idXR0b24vdGVzdGluZy9idXR0b24taGFybmVzcyc7XG5leHBvcnQgeyBQZG1EaWFsb2dIYXJuZXNzLCB0eXBlIFBkbURpYWxvZ0hhcm5lc3NGaWx0ZXJzIH0gZnJvbSAnLi9kaWFsb2cvdGVzdGluZy9kaWFsb2ctaGFybmVzcyc7XG5leHBvcnQgeyBQZG1TZWxlY3RIYXJuZXNzLCB0eXBlIFBkbVNlbGVjdEhhcm5lc3NGaWx0ZXJzIH0gZnJvbSAnLi9zZWxlY3QvdGVzdGluZy9zZWxlY3QtaGFybmVzcyc7XG5leHBvcnQgeyBQZG1DaGVja2JveEhhcm5lc3MsIHR5cGUgUGRtQ2hlY2tib3hIYXJuZXNzRmlsdGVycyB9IGZyb20gJy4vY2hlY2tib3gvdGVzdGluZy9jaGVja2JveC1oYXJuZXNzJztcbmV4cG9ydCB7IFBkbVBhZ2luYXRpb25IYXJuZXNzLCB0eXBlIFBkbVBhZ2luYXRpb25IYXJuZXNzRmlsdGVycyB9IGZyb20gJy4vcGFnaW5hdGlvbi90ZXN0aW5nL3BhZ2luYXRpb24taGFybmVzcyc7XG4iXX0=
@@ -19,10 +19,10 @@ class PdmAlertComponent {
19
19
  }
20
20
  }
21
21
  PdmAlertComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PdmAlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
22
- PdmAlertComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: PdmAlertComponent, selector: "pdm-alert", inputs: { variant: "variant", title: "title", description: "description", details: "details", className: "className" }, ngImport: i0, template: "<section\n role=\"alert\"\n [ngClass]=\"[\n 'w-full rounded-lg border border-solid border-border bg-background p-4',\n className\n ]\"\n>\n <div [ngClass]=\"['flex gap-3', isDestructive ? 'items-start' : 'items-center']\">\n <span class=\"inline-flex h-6 w-6 shrink-0 items-center justify-center\">\n <svg *ngIf=\"!isDestructive && !isTitleOnly\" viewBox=\"0 0 24 24\" class=\"h-5 w-5 text-foreground\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <circle cx=\"12\" cy=\"12\" r=\"9\" stroke=\"currentColor\" stroke-width=\"1.5\"></circle>\n <path d=\"M8.5 12.5L10.8 14.8L15.8 9.8\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>\n </svg>\n <svg *ngIf=\"isTitleOnly\" viewBox=\"0 0 24 24\" class=\"h-5 w-5 text-foreground\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M5 8H19\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"></path>\n <path d=\"M9 8V6.5C9 5.67 9.67 5 10.5 5H13.5C14.33 5 15 5.67 15 6.5V8\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"></path>\n <path d=\"M7 8L8 18.5C8.07 19.33 8.77 20 9.6 20H14.4C15.23 20 15.93 19.33 16 18.5L17 8\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"></path>\n </svg>\n <svg *ngIf=\"isDestructive\" viewBox=\"0 0 24 24\" class=\"h-5 w-5 text-destructive\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <circle cx=\"12\" cy=\"12\" r=\"9\" stroke=\"currentColor\" stroke-width=\"1.5\"></circle>\n <path d=\"M12 8V12\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"></path>\n <circle cx=\"12\" cy=\"16\" r=\"1\" fill=\"currentColor\"></circle>\n </svg>\n </span>\n\n <div class=\"min-w-0 flex-1\">\n <h4\n [ngClass]=\"[\n 'm-0 text-sm font-medium',\n isDestructive ? 'text-destructive' : 'text-foreground'\n ]\"\n >\n {{ title }}\n </h4>\n\n <p\n *ngIf=\"!isTitleOnly && description\"\n [ngClass]=\"[\n 'm-0 mt-0.5 text-sm',\n isDestructive ? 'text-destructive' : 'text-muted-foreground'\n ]\"\n >\n {{ description }}\n </p>\n\n <ul *ngIf=\"isDestructive && details.length\" class=\"m-0 mt-1 pl-5 text-sm text-destructive\">\n <li *ngFor=\"let item of details\">{{ item }}</li>\n </ul>\n </div>\n </div>\n</section>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
22
+ PdmAlertComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: PdmAlertComponent, selector: "pdm-alert", inputs: { variant: "variant", title: "title", description: "description", details: "details", className: "className" }, ngImport: i0, template: "<section\n role=\"alert\"\n [ngClass]=\"[\n 'w-full rounded-lg border border-solid border-border bg-background p-4',\n className\n ]\"\n>\n <div [ngClass]=\"['flex gap-3', isDestructive ? 'items-start' : 'items-center']\">\n <span class=\"inline-flex h-6 w-6 shrink-0 items-center justify-center\">\n <svg *ngIf=\"!isDestructive && !isTitleOnly\" aria-label=\"Success\" viewBox=\"0 0 24 24\" class=\"h-5 w-5 text-foreground\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <circle cx=\"12\" cy=\"12\" r=\"9\" stroke=\"currentColor\" stroke-width=\"1.5\"></circle>\n <path d=\"M8.5 12.5L10.8 14.8L15.8 9.8\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>\n </svg>\n <svg *ngIf=\"isTitleOnly\" aria-label=\"Info\" viewBox=\"0 0 24 24\" class=\"h-5 w-5 text-foreground\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M5 8H19\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"></path>\n <path d=\"M9 8V6.5C9 5.67 9.67 5 10.5 5H13.5C14.33 5 15 5.67 15 6.5V8\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"></path>\n <path d=\"M7 8L8 18.5C8.07 19.33 8.77 20 9.6 20H14.4C15.23 20 15.93 19.33 16 18.5L17 8\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"></path>\n </svg>\n <svg *ngIf=\"isDestructive\" aria-label=\"Error\" viewBox=\"0 0 24 24\" class=\"h-5 w-5 text-destructive\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <circle cx=\"12\" cy=\"12\" r=\"9\" stroke=\"currentColor\" stroke-width=\"1.5\"></circle>\n <path d=\"M12 8V12\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"></path>\n <circle cx=\"12\" cy=\"16\" r=\"1\" fill=\"currentColor\"></circle>\n </svg>\n </span>\n\n <div class=\"min-w-0 flex-1\">\n <h4\n [ngClass]=\"[\n 'm-0 text-sm font-medium',\n isDestructive ? 'text-destructive' : 'text-foreground'\n ]\"\n >\n {{ title }}\n </h4>\n\n <p\n *ngIf=\"!isTitleOnly && description\"\n [ngClass]=\"[\n 'm-0 mt-0.5 text-sm',\n isDestructive ? 'text-destructive' : 'text-muted-foreground'\n ]\"\n >\n {{ description }}\n </p>\n\n <ul *ngIf=\"isDestructive && details.length\" class=\"m-0 mt-1 pl-5 text-sm text-destructive\">\n <li *ngFor=\"let item of details\">{{ item }}</li>\n </ul>\n </div>\n </div>\n</section>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
23
23
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PdmAlertComponent, decorators: [{
24
24
  type: Component,
25
- args: [{ selector: 'pdm-alert', changeDetection: ChangeDetectionStrategy.OnPush, template: "<section\n role=\"alert\"\n [ngClass]=\"[\n 'w-full rounded-lg border border-solid border-border bg-background p-4',\n className\n ]\"\n>\n <div [ngClass]=\"['flex gap-3', isDestructive ? 'items-start' : 'items-center']\">\n <span class=\"inline-flex h-6 w-6 shrink-0 items-center justify-center\">\n <svg *ngIf=\"!isDestructive && !isTitleOnly\" viewBox=\"0 0 24 24\" class=\"h-5 w-5 text-foreground\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <circle cx=\"12\" cy=\"12\" r=\"9\" stroke=\"currentColor\" stroke-width=\"1.5\"></circle>\n <path d=\"M8.5 12.5L10.8 14.8L15.8 9.8\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>\n </svg>\n <svg *ngIf=\"isTitleOnly\" viewBox=\"0 0 24 24\" class=\"h-5 w-5 text-foreground\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M5 8H19\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"></path>\n <path d=\"M9 8V6.5C9 5.67 9.67 5 10.5 5H13.5C14.33 5 15 5.67 15 6.5V8\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"></path>\n <path d=\"M7 8L8 18.5C8.07 19.33 8.77 20 9.6 20H14.4C15.23 20 15.93 19.33 16 18.5L17 8\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"></path>\n </svg>\n <svg *ngIf=\"isDestructive\" viewBox=\"0 0 24 24\" class=\"h-5 w-5 text-destructive\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <circle cx=\"12\" cy=\"12\" r=\"9\" stroke=\"currentColor\" stroke-width=\"1.5\"></circle>\n <path d=\"M12 8V12\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"></path>\n <circle cx=\"12\" cy=\"16\" r=\"1\" fill=\"currentColor\"></circle>\n </svg>\n </span>\n\n <div class=\"min-w-0 flex-1\">\n <h4\n [ngClass]=\"[\n 'm-0 text-sm font-medium',\n isDestructive ? 'text-destructive' : 'text-foreground'\n ]\"\n >\n {{ title }}\n </h4>\n\n <p\n *ngIf=\"!isTitleOnly && description\"\n [ngClass]=\"[\n 'm-0 mt-0.5 text-sm',\n isDestructive ? 'text-destructive' : 'text-muted-foreground'\n ]\"\n >\n {{ description }}\n </p>\n\n <ul *ngIf=\"isDestructive && details.length\" class=\"m-0 mt-1 pl-5 text-sm text-destructive\">\n <li *ngFor=\"let item of details\">{{ item }}</li>\n </ul>\n </div>\n </div>\n</section>\n" }]
25
+ args: [{ selector: 'pdm-alert', changeDetection: ChangeDetectionStrategy.OnPush, template: "<section\n role=\"alert\"\n [ngClass]=\"[\n 'w-full rounded-lg border border-solid border-border bg-background p-4',\n className\n ]\"\n>\n <div [ngClass]=\"['flex gap-3', isDestructive ? 'items-start' : 'items-center']\">\n <span class=\"inline-flex h-6 w-6 shrink-0 items-center justify-center\">\n <svg *ngIf=\"!isDestructive && !isTitleOnly\" aria-label=\"Success\" viewBox=\"0 0 24 24\" class=\"h-5 w-5 text-foreground\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <circle cx=\"12\" cy=\"12\" r=\"9\" stroke=\"currentColor\" stroke-width=\"1.5\"></circle>\n <path d=\"M8.5 12.5L10.8 14.8L15.8 9.8\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>\n </svg>\n <svg *ngIf=\"isTitleOnly\" aria-label=\"Info\" viewBox=\"0 0 24 24\" class=\"h-5 w-5 text-foreground\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M5 8H19\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"></path>\n <path d=\"M9 8V6.5C9 5.67 9.67 5 10.5 5H13.5C14.33 5 15 5.67 15 6.5V8\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"></path>\n <path d=\"M7 8L8 18.5C8.07 19.33 8.77 20 9.6 20H14.4C15.23 20 15.93 19.33 16 18.5L17 8\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"></path>\n </svg>\n <svg *ngIf=\"isDestructive\" aria-label=\"Error\" viewBox=\"0 0 24 24\" class=\"h-5 w-5 text-destructive\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <circle cx=\"12\" cy=\"12\" r=\"9\" stroke=\"currentColor\" stroke-width=\"1.5\"></circle>\n <path d=\"M12 8V12\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"></path>\n <circle cx=\"12\" cy=\"16\" r=\"1\" fill=\"currentColor\"></circle>\n </svg>\n </span>\n\n <div class=\"min-w-0 flex-1\">\n <h4\n [ngClass]=\"[\n 'm-0 text-sm font-medium',\n isDestructive ? 'text-destructive' : 'text-foreground'\n ]\"\n >\n {{ title }}\n </h4>\n\n <p\n *ngIf=\"!isTitleOnly && description\"\n [ngClass]=\"[\n 'm-0 mt-0.5 text-sm',\n isDestructive ? 'text-destructive' : 'text-muted-foreground'\n ]\"\n >\n {{ description }}\n </p>\n\n <ul *ngIf=\"isDestructive && details.length\" class=\"m-0 mt-1 pl-5 text-sm text-destructive\">\n <li *ngFor=\"let item of details\">{{ item }}</li>\n </ul>\n </div>\n </div>\n</section>\n" }]
26
26
  }], propDecorators: { variant: [{
27
27
  type: Input
28
28
  }], title: [{
@@ -1 +1 @@
1
- {"version":3,"file":"pdm-ui-kit-src-alert.mjs","sources":["../../../src/alert/alert.component.ts","../../../src/alert/alert.component.html","../../../src/alert/alert-dialog.component.ts","../../../src/alert/alert-dialog.component.html","../../../src/alert/alert.module.ts","../../../src/alert/pdm-ui-kit-src-alert.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\nexport type PdmAlertVariant = 'default' | 'title-only' | 'destructive';\n\n@Component({\n selector: 'pdm-alert',\n templateUrl: './alert.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class PdmAlertComponent {\n @Input() variant: PdmAlertVariant = 'default';\n @Input() title = 'Success! Your changes have been saved';\n @Input() description = 'This is an alert with icon, title and description.';\n @Input() details: string[] = [];\n @Input() className = '';\n\n get isDestructive(): boolean {\n return this.variant === 'destructive';\n }\n\n get isTitleOnly(): boolean {\n return this.variant === 'title-only';\n }\n}\n\n","<section\n role=\"alert\"\n [ngClass]=\"[\n 'w-full rounded-lg border border-solid border-border bg-background p-4',\n className\n ]\"\n>\n <div [ngClass]=\"['flex gap-3', isDestructive ? 'items-start' : 'items-center']\">\n <span class=\"inline-flex h-6 w-6 shrink-0 items-center justify-center\">\n <svg *ngIf=\"!isDestructive && !isTitleOnly\" viewBox=\"0 0 24 24\" class=\"h-5 w-5 text-foreground\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <circle cx=\"12\" cy=\"12\" r=\"9\" stroke=\"currentColor\" stroke-width=\"1.5\"></circle>\n <path d=\"M8.5 12.5L10.8 14.8L15.8 9.8\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>\n </svg>\n <svg *ngIf=\"isTitleOnly\" viewBox=\"0 0 24 24\" class=\"h-5 w-5 text-foreground\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M5 8H19\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"></path>\n <path d=\"M9 8V6.5C9 5.67 9.67 5 10.5 5H13.5C14.33 5 15 5.67 15 6.5V8\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"></path>\n <path d=\"M7 8L8 18.5C8.07 19.33 8.77 20 9.6 20H14.4C15.23 20 15.93 19.33 16 18.5L17 8\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"></path>\n </svg>\n <svg *ngIf=\"isDestructive\" viewBox=\"0 0 24 24\" class=\"h-5 w-5 text-destructive\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <circle cx=\"12\" cy=\"12\" r=\"9\" stroke=\"currentColor\" stroke-width=\"1.5\"></circle>\n <path d=\"M12 8V12\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"></path>\n <circle cx=\"12\" cy=\"16\" r=\"1\" fill=\"currentColor\"></circle>\n </svg>\n </span>\n\n <div class=\"min-w-0 flex-1\">\n <h4\n [ngClass]=\"[\n 'm-0 text-sm font-medium',\n isDestructive ? 'text-destructive' : 'text-foreground'\n ]\"\n >\n {{ title }}\n </h4>\n\n <p\n *ngIf=\"!isTitleOnly && description\"\n [ngClass]=\"[\n 'm-0 mt-0.5 text-sm',\n isDestructive ? 'text-destructive' : 'text-muted-foreground'\n ]\"\n >\n {{ description }}\n </p>\n\n <ul *ngIf=\"isDestructive && details.length\" class=\"m-0 mt-1 pl-5 text-sm text-destructive\">\n <li *ngFor=\"let item of details\">{{ item }}</li>\n </ul>\n </div>\n </div>\n</section>\n","import { ChangeDetectionStrategy, Component, EventEmitter, HostListener, Input, Output } from '@angular/core';\n\n@Component({\n selector: 'pdm-alert-dialog',\n templateUrl: './alert-dialog.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class PdmAlertDialogComponent {\n @Input() open = false;\n @Input() showTrigger = false;\n @Input() triggerText = 'Show dialog';\n @Input() title = 'Are you absolutely sure?';\n @Input() description = '';\n @Input() confirmText = 'Continue';\n @Input() cancelText = 'Cancel';\n @Input() className = '';\n\n /** Close when the ESC key is pressed. Default: `true`. */\n @Input() closeOnEsc = true;\n\n @Output() openChange = new EventEmitter<boolean>();\n @Output() confirm = new EventEmitter<void>();\n @Output() cancel = new EventEmitter<void>();\n\n /**\n * Returns `true` when at least one consumer listens to `openChange`.\n * - **Controlled** (has observers): parent manages `open` via two-way binding → only emit.\n * - **Uncontrolled** (no observers): we own the `open` state → mutate it locally.\n */\n private get isControlled(): boolean {\n return this.openChange.observed;\n }\n\n onTriggerClick(): void {\n if (!this.isControlled) {\n this.open = true;\n }\n this.openChange.emit(true);\n }\n\n onCancel(): void {\n this.cancel.emit();\n if (!this.isControlled) {\n this.open = false;\n }\n this.openChange.emit(false);\n }\n\n onConfirm(): void {\n this.confirm.emit();\n if (!this.isControlled) {\n this.open = false;\n }\n this.openChange.emit(false);\n }\n\n @HostListener('document:keydown.escape')\n onEsc(): void {\n if (this.open && this.closeOnEsc) {\n this.onCancel();\n }\n }\n}\n","<button\n *ngIf=\"showTrigger && !open\"\n type=\"button\"\n class=\"inline-flex h-9 appearance-none box-border items-center justify-center rounded-md border border-solid border-input bg-background px-4 py-2 text-sm font-medium text-foreground shadow-sm\"\n (click)=\"onTriggerClick()\"\n>\n {{ triggerText }}\n</button>\n\n<div *ngIf=\"open\" class=\"fixed inset-0 z-50 flex items-center justify-center p-5\">\n <div class=\"absolute inset-0 bg-foreground/30\" (click)=\"onCancel()\"></div>\n <section\n role=\"alertdialog\"\n aria-modal=\"true\"\n [ngClass]=\"[\n 'relative z-[60] w-full max-w-lg rounded-lg border border-solid border-border bg-background p-6 text-foreground shadow-lg',\n className\n ]\"\n >\n <div class=\"flex flex-col gap-2\">\n <h2 class=\"m-0 text-lg font-semibold leading-none tracking-tight\">{{ title }}</h2>\n <p *ngIf=\"description\" class=\"m-0 text-sm text-muted-foreground\">{{ description }}</p>\n </div>\n <div class=\"mt-4 flex items-center justify-end gap-2\">\n <button\n type=\"button\"\n class=\"inline-flex h-9 appearance-none box-border items-center justify-center rounded-md border border-solid border-input bg-background px-4 py-2 text-sm font-medium text-foreground shadow-sm\"\n (click)=\"onCancel()\"\n >\n {{ cancelText }}\n </button>\n <button\n type=\"button\"\n class=\"inline-flex h-9 appearance-none box-border items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground shadow-sm\"\n (click)=\"onConfirm()\"\n >\n {{ confirmText }}\n </button>\n </div>\n </section>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { PdmAlertComponent } from './alert.component';\nimport { PdmAlertDialogComponent } from './alert-dialog.component';\n\nconst COMPONENTS = [\n PdmAlertComponent,\n PdmAlertDialogComponent,\n];\n\n@NgModule({\n imports: [CommonModule],\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class PdmAlertModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MASa,iBAAiB,CAAA;AAL9B,IAAA,WAAA,GAAA;AAMW,QAAA,IAAO,CAAA,OAAA,GAAoB,SAAS,CAAC;AACrC,QAAA,IAAK,CAAA,KAAA,GAAG,uCAAuC,CAAC;AAChD,QAAA,IAAW,CAAA,WAAA,GAAG,oDAAoD,CAAC;AACnE,QAAA,IAAO,CAAA,OAAA,GAAa,EAAE,CAAC;AACvB,QAAA,IAAS,CAAA,SAAA,GAAG,EAAE,CAAC;KASzB;AAPC,IAAA,IAAI,aAAa,GAAA;AACf,QAAA,OAAO,IAAI,CAAC,OAAO,KAAK,aAAa,CAAC;KACvC;AAED,IAAA,IAAI,WAAW,GAAA;AACb,QAAA,OAAO,IAAI,CAAC,OAAO,KAAK,YAAY,CAAC;KACtC;;8GAbU,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAjB,iBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,iBAAiB,yKCT9B,27EAmDA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,WAAA,E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uBAAC,yBAAyB,CAAA;;;AEnDzC,MAAM,UAAU,GAAG;IACjB,iBAAiB;IACjB,uBAAuB;CACxB,CAAC;MAOW,cAAc,CAAA;;2GAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAd,cAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,iBATzB,iBAAiB;QACjB,uBAAuB,CAAA,EAAA,OAAA,EAAA,CAIb,YAAY,CAAA,EAAA,OAAA,EAAA,CALtB,iBAAiB;QACjB,uBAAuB,CAAA,EAAA,CAAA,CAAA;AAQZ,cAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,YAJf,YAAY,CAAA,EAAA,CAAA,CAAA;2FAIX,cAAc,EAAA,UAAA,EAAA,CAAA;kBAL1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,YAAY,CAAC;AACvB,oBAAA,YAAY,EAAE,UAAU;AACxB,oBAAA,OAAO,EAAE,UAAU;iBACpB,CAAA;;;ACdD;;AAEG;;;;"}
1
+ {"version":3,"file":"pdm-ui-kit-src-alert.mjs","sources":["../../../src/alert/alert.component.ts","../../../src/alert/alert.component.html","../../../src/alert/alert-dialog.component.ts","../../../src/alert/alert-dialog.component.html","../../../src/alert/alert.module.ts","../../../src/alert/pdm-ui-kit-src-alert.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\nexport type PdmAlertVariant = 'default' | 'title-only' | 'destructive';\n\n@Component({\n selector: 'pdm-alert',\n templateUrl: './alert.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class PdmAlertComponent {\n @Input() variant: PdmAlertVariant = 'default';\n @Input() title = 'Success! Your changes have been saved';\n @Input() description = 'This is an alert with icon, title and description.';\n @Input() details: string[] = [];\n @Input() className = '';\n\n get isDestructive(): boolean {\n return this.variant === 'destructive';\n }\n\n get isTitleOnly(): boolean {\n return this.variant === 'title-only';\n }\n}\n\n","<section\n role=\"alert\"\n [ngClass]=\"[\n 'w-full rounded-lg border border-solid border-border bg-background p-4',\n className\n ]\"\n>\n <div [ngClass]=\"['flex gap-3', isDestructive ? 'items-start' : 'items-center']\">\n <span class=\"inline-flex h-6 w-6 shrink-0 items-center justify-center\">\n <svg *ngIf=\"!isDestructive && !isTitleOnly\" aria-label=\"Success\" viewBox=\"0 0 24 24\" class=\"h-5 w-5 text-foreground\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <circle cx=\"12\" cy=\"12\" r=\"9\" stroke=\"currentColor\" stroke-width=\"1.5\"></circle>\n <path d=\"M8.5 12.5L10.8 14.8L15.8 9.8\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>\n </svg>\n <svg *ngIf=\"isTitleOnly\" aria-label=\"Info\" viewBox=\"0 0 24 24\" class=\"h-5 w-5 text-foreground\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M5 8H19\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"></path>\n <path d=\"M9 8V6.5C9 5.67 9.67 5 10.5 5H13.5C14.33 5 15 5.67 15 6.5V8\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"></path>\n <path d=\"M7 8L8 18.5C8.07 19.33 8.77 20 9.6 20H14.4C15.23 20 15.93 19.33 16 18.5L17 8\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"></path>\n </svg>\n <svg *ngIf=\"isDestructive\" aria-label=\"Error\" viewBox=\"0 0 24 24\" class=\"h-5 w-5 text-destructive\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <circle cx=\"12\" cy=\"12\" r=\"9\" stroke=\"currentColor\" stroke-width=\"1.5\"></circle>\n <path d=\"M12 8V12\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"></path>\n <circle cx=\"12\" cy=\"16\" r=\"1\" fill=\"currentColor\"></circle>\n </svg>\n </span>\n\n <div class=\"min-w-0 flex-1\">\n <h4\n [ngClass]=\"[\n 'm-0 text-sm font-medium',\n isDestructive ? 'text-destructive' : 'text-foreground'\n ]\"\n >\n {{ title }}\n </h4>\n\n <p\n *ngIf=\"!isTitleOnly && description\"\n [ngClass]=\"[\n 'm-0 mt-0.5 text-sm',\n isDestructive ? 'text-destructive' : 'text-muted-foreground'\n ]\"\n >\n {{ description }}\n </p>\n\n <ul *ngIf=\"isDestructive && details.length\" class=\"m-0 mt-1 pl-5 text-sm text-destructive\">\n <li *ngFor=\"let item of details\">{{ item }}</li>\n </ul>\n </div>\n </div>\n</section>\n","import { ChangeDetectionStrategy, Component, EventEmitter, HostListener, Input, Output } from '@angular/core';\n\n@Component({\n selector: 'pdm-alert-dialog',\n templateUrl: './alert-dialog.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class PdmAlertDialogComponent {\n @Input() open = false;\n @Input() showTrigger = false;\n @Input() triggerText = 'Show dialog';\n @Input() title = 'Are you absolutely sure?';\n @Input() description = '';\n @Input() confirmText = 'Continue';\n @Input() cancelText = 'Cancel';\n @Input() className = '';\n\n /** Close when the ESC key is pressed. Default: `true`. */\n @Input() closeOnEsc = true;\n\n @Output() openChange = new EventEmitter<boolean>();\n @Output() confirm = new EventEmitter<void>();\n @Output() cancel = new EventEmitter<void>();\n\n /**\n * Returns `true` when at least one consumer listens to `openChange`.\n * - **Controlled** (has observers): parent manages `open` via two-way binding → only emit.\n * - **Uncontrolled** (no observers): we own the `open` state → mutate it locally.\n */\n private get isControlled(): boolean {\n return this.openChange.observed;\n }\n\n onTriggerClick(): void {\n if (!this.isControlled) {\n this.open = true;\n }\n this.openChange.emit(true);\n }\n\n onCancel(): void {\n this.cancel.emit();\n if (!this.isControlled) {\n this.open = false;\n }\n this.openChange.emit(false);\n }\n\n onConfirm(): void {\n this.confirm.emit();\n if (!this.isControlled) {\n this.open = false;\n }\n this.openChange.emit(false);\n }\n\n @HostListener('document:keydown.escape')\n onEsc(): void {\n if (this.open && this.closeOnEsc) {\n this.onCancel();\n }\n }\n}\n","<button\n *ngIf=\"showTrigger && !open\"\n type=\"button\"\n class=\"inline-flex h-9 appearance-none box-border items-center justify-center rounded-md border border-solid border-input bg-background px-4 py-2 text-sm font-medium text-foreground shadow-sm\"\n (click)=\"onTriggerClick()\"\n>\n {{ triggerText }}\n</button>\n\n<div *ngIf=\"open\" class=\"fixed inset-0 z-50 flex items-center justify-center p-5\">\n <div class=\"absolute inset-0 bg-foreground/30\" (click)=\"onCancel()\"></div>\n <section\n role=\"alertdialog\"\n aria-modal=\"true\"\n [ngClass]=\"[\n 'relative z-[60] w-full max-w-lg rounded-lg border border-solid border-border bg-background p-6 text-foreground shadow-lg',\n className\n ]\"\n >\n <div class=\"flex flex-col gap-2\">\n <h2 class=\"m-0 text-lg font-semibold leading-none tracking-tight\">{{ title }}</h2>\n <p *ngIf=\"description\" class=\"m-0 text-sm text-muted-foreground\">{{ description }}</p>\n </div>\n <div class=\"mt-4 flex items-center justify-end gap-2\">\n <button\n type=\"button\"\n class=\"inline-flex h-9 appearance-none box-border items-center justify-center rounded-md border border-solid border-input bg-background px-4 py-2 text-sm font-medium text-foreground shadow-sm\"\n (click)=\"onCancel()\"\n >\n {{ cancelText }}\n </button>\n <button\n type=\"button\"\n class=\"inline-flex h-9 appearance-none box-border items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground shadow-sm\"\n (click)=\"onConfirm()\"\n >\n {{ confirmText }}\n </button>\n </div>\n </section>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { PdmAlertComponent } from './alert.component';\nimport { PdmAlertDialogComponent } from './alert-dialog.component';\n\nconst COMPONENTS = [\n PdmAlertComponent,\n PdmAlertDialogComponent,\n];\n\n@NgModule({\n imports: [CommonModule],\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class PdmAlertModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MASa,iBAAiB,CAAA;AAL9B,IAAA,WAAA,GAAA;AAMW,QAAA,IAAO,CAAA,OAAA,GAAoB,SAAS,CAAC;AACrC,QAAA,IAAK,CAAA,KAAA,GAAG,uCAAuC,CAAC;AAChD,QAAA,IAAW,CAAA,WAAA,GAAG,oDAAoD,CAAC;AACnE,QAAA,IAAO,CAAA,OAAA,GAAa,EAAE,CAAC;AACvB,QAAA,IAAS,CAAA,SAAA,GAAG,EAAE,CAAC;KASzB;AAPC,IAAA,IAAI,aAAa,GAAA;AACf,QAAA,OAAO,IAAI,CAAC,OAAO,KAAK,aAAa,CAAC;KACvC;AAED,IAAA,IAAI,WAAW,GAAA;AACb,QAAA,OAAO,IAAI,CAAC,OAAO,KAAK,YAAY,CAAC;KACtC;;8GAbU,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAjB,iBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,iBAAiB,yKCT9B,2/EAmDA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EA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,cAAc,CAAA;;2GAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAd,cAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,iBATzB,iBAAiB;QACjB,uBAAuB,CAAA,EAAA,OAAA,EAAA,CAIb,YAAY,CAAA,EAAA,OAAA,EAAA,CALtB,iBAAiB;QACjB,uBAAuB,CAAA,EAAA,CAAA,CAAA;AAQZ,cAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,YAJf,YAAY,CAAA,EAAA,CAAA,CAAA;2FAIX,cAAc,EAAA,UAAA,EAAA,CAAA;kBAL1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,YAAY,CAAC;AACvB,oBAAA,YAAY,EAAE,UAAU;AACxB,oBAAA,OAAO,EAAE,UAAU;iBACpB,CAAA;;;ACdD;;AAEG;;;;"}
@@ -17,10 +17,10 @@ class PdmAspectRatioComponent {
17
17
  }
18
18
  }
19
19
  PdmAspectRatioComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PdmAspectRatioComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
20
- PdmAspectRatioComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: PdmAspectRatioComponent, selector: "pdm-aspect-ratio", inputs: { ratio: "ratio", imageSrc: "imageSrc", imageAlt: "imageAlt", className: "className" }, ngImport: i0, template: "<div class=\"relative w-full\" [ngClass]=\"className\" [style.paddingTop]=\"paddingTop\">\n <div class=\"absolute inset-0 overflow-hidden rounded-lg\">\n <img\n *ngIf=\"imageSrc\"\n [src]=\"imageSrc\"\n [alt]=\"imageAlt\"\n class=\"pointer-events-none h-full w-full rounded-lg object-cover\"\n />\n <ng-content></ng-content>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
20
+ PdmAspectRatioComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: PdmAspectRatioComponent, isStandalone: true, selector: "pdm-aspect-ratio", inputs: { ratio: "ratio", imageSrc: "imageSrc", imageAlt: "imageAlt", className: "className" }, ngImport: i0, template: "<div class=\"relative w-full\" [ngClass]=\"className\" [style.paddingTop]=\"paddingTop\">\n <div class=\"absolute inset-0 overflow-hidden rounded-lg\">\n <img\n *ngIf=\"imageSrc\"\n [src]=\"imageSrc\"\n [alt]=\"imageAlt\"\n class=\"pointer-events-none h-full w-full rounded-lg object-cover\"\n />\n <ng-content></ng-content>\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
21
21
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PdmAspectRatioComponent, decorators: [{
22
22
  type: Component,
23
- args: [{ selector: 'pdm-aspect-ratio', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"relative w-full\" [ngClass]=\"className\" [style.paddingTop]=\"paddingTop\">\n <div class=\"absolute inset-0 overflow-hidden rounded-lg\">\n <img\n *ngIf=\"imageSrc\"\n [src]=\"imageSrc\"\n [alt]=\"imageAlt\"\n class=\"pointer-events-none h-full w-full rounded-lg object-cover\"\n />\n <ng-content></ng-content>\n </div>\n</div>\n" }]
23
+ args: [{ selector: 'pdm-aspect-ratio', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CommonModule], template: "<div class=\"relative w-full\" [ngClass]=\"className\" [style.paddingTop]=\"paddingTop\">\n <div class=\"absolute inset-0 overflow-hidden rounded-lg\">\n <img\n *ngIf=\"imageSrc\"\n [src]=\"imageSrc\"\n [alt]=\"imageAlt\"\n class=\"pointer-events-none h-full w-full rounded-lg object-cover\"\n />\n <ng-content></ng-content>\n </div>\n</div>\n" }]
24
24
  }], propDecorators: { ratio: [{
25
25
  type: Input
26
26
  }], imageSrc: [{
@@ -31,20 +31,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
31
31
  type: Input
32
32
  }] } });
33
33
 
34
- const COMPONENTS = [
35
- PdmAspectRatioComponent,
36
- ];
34
+ /**
35
+ * @deprecated Import PdmAspectRatioComponent directly instead. This module is kept for backwards compatibility.
36
+ * For modern Angular (v14+), use: import { PdmAspectRatioComponent } from 'pdm-ui-kit/aspect-ratio'
37
+ */
37
38
  class PdmAspectRatioModule {
38
39
  }
39
40
  PdmAspectRatioModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PdmAspectRatioModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
40
- PdmAspectRatioModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: PdmAspectRatioModule, declarations: [PdmAspectRatioComponent], imports: [CommonModule], exports: [PdmAspectRatioComponent] });
41
- PdmAspectRatioModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PdmAspectRatioModule, imports: [CommonModule] });
41
+ PdmAspectRatioModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: PdmAspectRatioModule, imports: [PdmAspectRatioComponent], exports: [PdmAspectRatioComponent] });
42
+ PdmAspectRatioModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PdmAspectRatioModule, imports: [PdmAspectRatioComponent] });
42
43
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PdmAspectRatioModule, decorators: [{
43
44
  type: NgModule,
44
45
  args: [{
45
- imports: [CommonModule],
46
- declarations: COMPONENTS,
47
- exports: COMPONENTS
46
+ imports: [PdmAspectRatioComponent],
47
+ exports: [PdmAspectRatioComponent]
48
48
  }]
49
49
  }] });
50
50
 
@@ -1 +1 @@
1
- {"version":3,"file":"pdm-ui-kit-src-aspect-ratio.mjs","sources":["../../../src/aspect-ratio/aspect-ratio.component.ts","../../../src/aspect-ratio/aspect-ratio.component.html","../../../src/aspect-ratio/aspect-ratio.module.ts","../../../src/aspect-ratio/pdm-ui-kit-src-aspect-ratio.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\n@Component({\n selector: 'pdm-aspect-ratio',\n templateUrl: './aspect-ratio.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class PdmAspectRatioComponent {\n @Input() ratio = 16 / 9;\n @Input() imageSrc = '';\n @Input() imageAlt = '';\n @Input() className = '';\n\n get paddingTop(): string {\n if (!this.ratio || this.ratio <= 0) return '56.25%';\n return (100 / this.ratio).toFixed(4) + '%';\n }\n}\n","<div class=\"relative w-full\" [ngClass]=\"className\" [style.paddingTop]=\"paddingTop\">\n <div class=\"absolute inset-0 overflow-hidden rounded-lg\">\n <img\n *ngIf=\"imageSrc\"\n [src]=\"imageSrc\"\n [alt]=\"imageAlt\"\n class=\"pointer-events-none h-full w-full rounded-lg object-cover\"\n />\n <ng-content></ng-content>\n </div>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { PdmAspectRatioComponent } from './aspect-ratio.component';\n\nconst COMPONENTS = [\n PdmAspectRatioComponent,\n];\n\n@NgModule({\n imports: [CommonModule],\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class PdmAspectRatioModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAOa,uBAAuB,CAAA;AALpC,IAAA,WAAA,GAAA;AAMW,QAAA,IAAA,CAAA,KAAK,GAAG,EAAE,GAAG,CAAC,CAAC;AACf,QAAA,IAAQ,CAAA,QAAA,GAAG,EAAE,CAAC;AACd,QAAA,IAAQ,CAAA,QAAA,GAAG,EAAE,CAAC;AACd,QAAA,IAAS,CAAA,SAAA,GAAG,EAAE,CAAC;KAMzB;AAJC,IAAA,IAAI,UAAU,GAAA;QACZ,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,IAAI,CAAC;AAAE,YAAA,OAAO,QAAQ,CAAC;AACpD,QAAA,OAAO,CAAC,GAAG,GAAG,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC;KAC5C;;oHATU,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAvB,uBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,uBAAuB,wJCPpC,wXAWA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EA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,EAAE,CAAC,YAAY,CAAC;AACvB,oBAAA,YAAY,EAAE,UAAU;AACxB,oBAAA,OAAO,EAAE,UAAU;iBACpB,CAAA;;;ACZD;;AAEG;;;;"}
1
+ {"version":3,"file":"pdm-ui-kit-src-aspect-ratio.mjs","sources":["../../../src/aspect-ratio/aspect-ratio.component.ts","../../../src/aspect-ratio/aspect-ratio.component.html","../../../src/aspect-ratio/aspect-ratio.module.ts","../../../src/aspect-ratio/pdm-ui-kit-src-aspect-ratio.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n@Component({\n selector: 'pdm-aspect-ratio',\n templateUrl: './aspect-ratio.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [CommonModule],\n})\nexport class PdmAspectRatioComponent {\n @Input() ratio = 16 / 9;\n @Input() imageSrc = '';\n @Input() imageAlt = '';\n @Input() className = '';\n\n get paddingTop(): string {\n if (!this.ratio || this.ratio <= 0) return '56.25%';\n return (100 / this.ratio).toFixed(4) + '%';\n }\n}\n","<div class=\"relative w-full\" [ngClass]=\"className\" [style.paddingTop]=\"paddingTop\">\n <div class=\"absolute inset-0 overflow-hidden rounded-lg\">\n <img\n *ngIf=\"imageSrc\"\n [src]=\"imageSrc\"\n [alt]=\"imageAlt\"\n class=\"pointer-events-none h-full w-full rounded-lg object-cover\"\n />\n <ng-content></ng-content>\n </div>\n</div>\n","import { NgModule } from '@angular/core';\nimport { PdmAspectRatioComponent } from './aspect-ratio.component';\n\n/**\n * @deprecated Import PdmAspectRatioComponent directly instead. This module is kept for backwards compatibility.\n * For modern Angular (v14+), use: import { PdmAspectRatioComponent } from 'pdm-ui-kit/aspect-ratio'\n */\n@NgModule({\n imports: [PdmAspectRatioComponent],\n exports: [PdmAspectRatioComponent]\n})\nexport class PdmAspectRatioModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAUa,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,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;2FAEX,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAPnC,SAAS;+BACE,kBAAkB,EAAA,eAAA,EAEX,uBAAuB,CAAC,MAAM,cACnC,IAAI,EAAA,OAAA,EACP,CAAC,YAAY,CAAC,EAAA,QAAA,EAAA,wXAAA,EAAA,CAAA;8BAGd,KAAK,EAAA,CAAA;sBAAb,KAAK;gBACG,QAAQ,EAAA,CAAA;sBAAhB,KAAK;gBACG,QAAQ,EAAA,CAAA;sBAAhB,KAAK;gBACG,SAAS,EAAA,CAAA;sBAAjB,KAAK;;;AEXR;;;AAGG;MAKU,oBAAoB,CAAA;;iHAApB,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;kHAApB,oBAAoB,EAAA,OAAA,EAAA,CAHrB,uBAAuB,CAAA,EAAA,OAAA,EAAA,CACvB,uBAAuB,CAAA,EAAA,CAAA,CAAA;AAEtB,oBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,YAHrB,uBAAuB,CAAA,EAAA,CAAA,CAAA;2FAGtB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAJhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,uBAAuB,CAAC;oBAClC,OAAO,EAAE,CAAC,uBAAuB,CAAC;iBACnC,CAAA;;;ACVD;;AAEG;;;;"}
@@ -11,10 +11,10 @@ class PdmBadgeComponent {
11
11
  }
12
12
  }
13
13
  PdmBadgeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PdmBadgeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
14
- PdmBadgeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: PdmBadgeComponent, selector: "pdm-badge", inputs: { variant: "variant", text: "text", className: "className" }, ngImport: i0, template: "<span\n [ngClass]=\"[\n 'inline-flex items-center justify-center text-center align-middle rounded-full px-2.5 py-0.5 text-xs font-semibold',\n variant === 'default' ? 'bg-primary text-primary-foreground' : '',\n variant === 'secondary' ? 'bg-secondary text-secondary-foreground' : '',\n variant === 'destructive' ? 'bg-destructive text-destructive-foreground' : '',\n variant === 'outline' ? 'border border-solid border-input text-foreground' : '',\n variant === 'icon' ? 'gap-1 bg-primary text-primary-foreground' : '',\n variant === 'number' ? 'min-w-5 rounded-full bg-primary px-1.5 text-primary-foreground' : '',\n variant === 'destructive-number' ? 'min-w-5 rounded-full bg-destructive px-1.5 text-destructive-foreground' : '',\n variant === 'secondary-number' ? 'min-w-5 rounded-full border border-solid border-input px-1.5 text-foreground' : '',\n className\n ]\"\n>\n <svg\n *ngIf=\"variant === 'icon'\"\n viewBox=\"0 0 24 24\"\n class=\"h-4 w-4\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"9\" stroke=\"currentColor\" stroke-width=\"1.5\"></circle>\n <path d=\"M8.5 12.5L10.8 14.8L15.8 9.8\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>\n </svg>\n <span [ngClass]=\"[variant === 'secondary-number' ? 'font-mono' : '']\">{{ text }}</span>\n</span>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
14
+ PdmBadgeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: PdmBadgeComponent, isStandalone: true, selector: "pdm-badge", inputs: { variant: "variant", text: "text", className: "className" }, ngImport: i0, template: "<span\n [ngClass]=\"[\n 'inline-flex items-center justify-center text-center align-middle rounded-full px-2.5 py-0.5 text-xs font-semibold',\n variant === 'default' ? 'bg-primary text-primary-foreground' : '',\n variant === 'secondary' ? 'bg-secondary text-secondary-foreground' : '',\n variant === 'destructive' ? 'bg-destructive text-destructive-foreground' : '',\n variant === 'outline' ? 'border border-solid border-input text-foreground' : '',\n variant === 'icon' ? 'gap-1 bg-primary text-primary-foreground' : '',\n variant === 'number' ? 'min-w-5 rounded-full bg-primary px-1.5 text-primary-foreground' : '',\n variant === 'destructive-number' ? 'min-w-5 rounded-full bg-destructive px-1.5 text-destructive-foreground' : '',\n variant === 'secondary-number' ? 'min-w-5 rounded-full border border-solid border-input px-1.5 text-foreground' : '',\n className\n ]\"\n>\n <svg\n *ngIf=\"variant === 'icon'\"\n viewBox=\"0 0 24 24\"\n class=\"h-4 w-4\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"9\" stroke=\"currentColor\" stroke-width=\"1.5\"></circle>\n <path d=\"M8.5 12.5L10.8 14.8L15.8 9.8\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>\n </svg>\n <span [ngClass]=\"[variant === 'secondary-number' ? 'font-mono' : '']\">{{ text }}</span>\n</span>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
15
15
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PdmBadgeComponent, decorators: [{
16
16
  type: Component,
17
- args: [{ selector: 'pdm-badge', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span\n [ngClass]=\"[\n 'inline-flex items-center justify-center text-center align-middle rounded-full px-2.5 py-0.5 text-xs font-semibold',\n variant === 'default' ? 'bg-primary text-primary-foreground' : '',\n variant === 'secondary' ? 'bg-secondary text-secondary-foreground' : '',\n variant === 'destructive' ? 'bg-destructive text-destructive-foreground' : '',\n variant === 'outline' ? 'border border-solid border-input text-foreground' : '',\n variant === 'icon' ? 'gap-1 bg-primary text-primary-foreground' : '',\n variant === 'number' ? 'min-w-5 rounded-full bg-primary px-1.5 text-primary-foreground' : '',\n variant === 'destructive-number' ? 'min-w-5 rounded-full bg-destructive px-1.5 text-destructive-foreground' : '',\n variant === 'secondary-number' ? 'min-w-5 rounded-full border border-solid border-input px-1.5 text-foreground' : '',\n className\n ]\"\n>\n <svg\n *ngIf=\"variant === 'icon'\"\n viewBox=\"0 0 24 24\"\n class=\"h-4 w-4\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"9\" stroke=\"currentColor\" stroke-width=\"1.5\"></circle>\n <path d=\"M8.5 12.5L10.8 14.8L15.8 9.8\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>\n </svg>\n <span [ngClass]=\"[variant === 'secondary-number' ? 'font-mono' : '']\">{{ text }}</span>\n</span>\n" }]
17
+ args: [{ selector: 'pdm-badge', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CommonModule], template: "<span\n [ngClass]=\"[\n 'inline-flex items-center justify-center text-center align-middle rounded-full px-2.5 py-0.5 text-xs font-semibold',\n variant === 'default' ? 'bg-primary text-primary-foreground' : '',\n variant === 'secondary' ? 'bg-secondary text-secondary-foreground' : '',\n variant === 'destructive' ? 'bg-destructive text-destructive-foreground' : '',\n variant === 'outline' ? 'border border-solid border-input text-foreground' : '',\n variant === 'icon' ? 'gap-1 bg-primary text-primary-foreground' : '',\n variant === 'number' ? 'min-w-5 rounded-full bg-primary px-1.5 text-primary-foreground' : '',\n variant === 'destructive-number' ? 'min-w-5 rounded-full bg-destructive px-1.5 text-destructive-foreground' : '',\n variant === 'secondary-number' ? 'min-w-5 rounded-full border border-solid border-input px-1.5 text-foreground' : '',\n className\n ]\"\n>\n <svg\n *ngIf=\"variant === 'icon'\"\n viewBox=\"0 0 24 24\"\n class=\"h-4 w-4\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"9\" stroke=\"currentColor\" stroke-width=\"1.5\"></circle>\n <path d=\"M8.5 12.5L10.8 14.8L15.8 9.8\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>\n </svg>\n <span [ngClass]=\"[variant === 'secondary-number' ? 'font-mono' : '']\">{{ text }}</span>\n</span>\n" }]
18
18
  }], propDecorators: { variant: [{
19
19
  type: Input
20
20
  }], text: [{
@@ -23,20 +23,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
23
23
  type: Input
24
24
  }] } });
25
25
 
26
- const COMPONENTS = [
27
- PdmBadgeComponent,
28
- ];
26
+ /**
27
+ * @deprecated Import PdmBadgeComponent directly instead. This module is kept for backwards compatibility.
28
+ * For modern Angular (v14+), use: import { PdmBadgeComponent } from 'pdm-ui-kit/badge'
29
+ */
29
30
  class PdmBadgeModule {
30
31
  }
31
32
  PdmBadgeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PdmBadgeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
32
- PdmBadgeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: PdmBadgeModule, declarations: [PdmBadgeComponent], imports: [CommonModule], exports: [PdmBadgeComponent] });
33
- PdmBadgeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PdmBadgeModule, imports: [CommonModule] });
33
+ PdmBadgeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: PdmBadgeModule, imports: [PdmBadgeComponent], exports: [PdmBadgeComponent] });
34
+ PdmBadgeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PdmBadgeModule, imports: [PdmBadgeComponent] });
34
35
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PdmBadgeModule, decorators: [{
35
36
  type: NgModule,
36
37
  args: [{
37
- imports: [CommonModule],
38
- declarations: COMPONENTS,
39
- exports: COMPONENTS
38
+ imports: [PdmBadgeComponent],
39
+ exports: [PdmBadgeComponent]
40
40
  }]
41
41
  }] });
42
42
 
@@ -1 +1 @@
1
- {"version":3,"file":"pdm-ui-kit-src-badge.mjs","sources":["../../../src/badge/badge.component.ts","../../../src/badge/badge.component.html","../../../src/badge/badge.module.ts","../../../src/badge/pdm-ui-kit-src-badge.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\nexport type PdmBadgeVariant =\n | 'default'\n | 'secondary'\n | 'destructive'\n | 'outline'\n | 'icon'\n | 'number'\n | 'destructive-number'\n | 'secondary-number';\n\n@Component({\n selector: 'pdm-badge',\n templateUrl: './badge.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class PdmBadgeComponent {\n @Input() variant: PdmBadgeVariant = 'default';\n @Input() text = 'Badge';\n @Input() className = '';\n}\n\n","<span\n [ngClass]=\"[\n 'inline-flex items-center justify-center text-center align-middle rounded-full px-2.5 py-0.5 text-xs font-semibold',\n variant === 'default' ? 'bg-primary text-primary-foreground' : '',\n variant === 'secondary' ? 'bg-secondary text-secondary-foreground' : '',\n variant === 'destructive' ? 'bg-destructive text-destructive-foreground' : '',\n variant === 'outline' ? 'border border-solid border-input text-foreground' : '',\n variant === 'icon' ? 'gap-1 bg-primary text-primary-foreground' : '',\n variant === 'number' ? 'min-w-5 rounded-full bg-primary px-1.5 text-primary-foreground' : '',\n variant === 'destructive-number' ? 'min-w-5 rounded-full bg-destructive px-1.5 text-destructive-foreground' : '',\n variant === 'secondary-number' ? 'min-w-5 rounded-full border border-solid border-input px-1.5 text-foreground' : '',\n className\n ]\"\n>\n <svg\n *ngIf=\"variant === 'icon'\"\n viewBox=\"0 0 24 24\"\n class=\"h-4 w-4\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"9\" stroke=\"currentColor\" stroke-width=\"1.5\"></circle>\n <path d=\"M8.5 12.5L10.8 14.8L15.8 9.8\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>\n </svg>\n <span [ngClass]=\"[variant === 'secondary-number' ? 'font-mono' : '']\">{{ text }}</span>\n</span>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { PdmBadgeComponent } from './badge.component';\n\nconst COMPONENTS = [\n PdmBadgeComponent,\n];\n\n@NgModule({\n imports: [CommonModule],\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class PdmBadgeModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAiBa,iBAAiB,CAAA;AAL9B,IAAA,WAAA,GAAA;AAMW,QAAA,IAAO,CAAA,OAAA,GAAoB,SAAS,CAAC;AACrC,QAAA,IAAI,CAAA,IAAA,GAAG,OAAO,CAAC;AACf,QAAA,IAAS,CAAA,SAAA,GAAG,EAAE,CAAC;KACzB;;8GAJY,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA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AAA,CAAA,YAAY,aAJtB,iBAAiB,CAAA,EAAA,CAAA,CAAA;AAQN,cAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,YAJf,YAAY,CAAA,EAAA,CAAA,CAAA;2FAIX,cAAc,EAAA,UAAA,EAAA,CAAA;kBAL1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,YAAY,CAAC;AACvB,oBAAA,YAAY,EAAE,UAAU;AACxB,oBAAA,OAAO,EAAE,UAAU;iBACpB,CAAA;;;ACZD;;AAEG;;;;"}
1
+ {"version":3,"file":"pdm-ui-kit-src-badge.mjs","sources":["../../../src/badge/badge.component.ts","../../../src/badge/badge.component.html","../../../src/badge/badge.module.ts","../../../src/badge/pdm-ui-kit-src-badge.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nexport type PdmBadgeVariant =\n | 'default'\n | 'secondary'\n | 'destructive'\n | 'outline'\n | 'icon'\n | 'number'\n | 'destructive-number'\n | 'secondary-number';\n\n@Component({\n selector: 'pdm-badge',\n templateUrl: './badge.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [CommonModule],\n})\nexport class PdmBadgeComponent {\n @Input() variant: PdmBadgeVariant = 'default';\n @Input() text = 'Badge';\n @Input() className = '';\n}\n\n","<span\n [ngClass]=\"[\n 'inline-flex items-center justify-center text-center align-middle rounded-full px-2.5 py-0.5 text-xs font-semibold',\n variant === 'default' ? 'bg-primary text-primary-foreground' : '',\n variant === 'secondary' ? 'bg-secondary text-secondary-foreground' : '',\n variant === 'destructive' ? 'bg-destructive text-destructive-foreground' : '',\n variant === 'outline' ? 'border border-solid border-input text-foreground' : '',\n variant === 'icon' ? 'gap-1 bg-primary text-primary-foreground' : '',\n variant === 'number' ? 'min-w-5 rounded-full bg-primary px-1.5 text-primary-foreground' : '',\n variant === 'destructive-number' ? 'min-w-5 rounded-full bg-destructive px-1.5 text-destructive-foreground' : '',\n variant === 'secondary-number' ? 'min-w-5 rounded-full border border-solid border-input px-1.5 text-foreground' : '',\n className\n ]\"\n>\n <svg\n *ngIf=\"variant === 'icon'\"\n viewBox=\"0 0 24 24\"\n class=\"h-4 w-4\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"9\" stroke=\"currentColor\" stroke-width=\"1.5\"></circle>\n <path d=\"M8.5 12.5L10.8 14.8L15.8 9.8\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>\n </svg>\n <span [ngClass]=\"[variant === 'secondary-number' ? 'font-mono' : '']\">{{ text }}</span>\n</span>\n","import { NgModule } from '@angular/core';\nimport { PdmBadgeComponent } from './badge.component';\n\n/**\n * @deprecated Import PdmBadgeComponent directly instead. This module is kept for backwards compatibility.\n * For modern Angular (v14+), use: import { PdmBadgeComponent } from 'pdm-ui-kit/badge'\n */\n@NgModule({\n imports: [PdmBadgeComponent],\n exports: [PdmBadgeComponent]\n})\nexport class PdmBadgeModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAoBa,iBAAiB,CAAA;AAP9B,IAAA,WAAA,GAAA;AAQW,QAAA,IAAO,CAAA,OAAA,GAAoB,SAAS,CAAC;AACrC,QAAA,IAAI,CAAA,IAAA,GAAG,OAAO,CAAC;AACf,QAAA,IAAS,CAAA,SAAA,GAAG,EAAE,CAAC;KACzB;;8GAJY,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAjB,iBAAiB,EAAA,YAAA,EAAA,IAAA,EAA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,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,YAHf,iBAAiB,CAAA,EAAA,CAAA,CAAA;2FAGhB,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,iBAAiB,CAAC;oBAC5B,OAAO,EAAE,CAAC,iBAAiB,CAAC;iBAC7B,CAAA;;;ACVD;;AAEG;;;;"}
@@ -3,6 +3,61 @@ import { EventEmitter, Component, ChangeDetectionStrategy, Input, Output, NgModu
3
3
  import * as i1 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
5
 
6
+ const BUTTON_TONE_MAP = {
7
+ default: {
8
+ default: 'border-primary bg-primary text-primary-foreground',
9
+ hover: 'border-primary bg-primary text-primary-foreground opacity-90',
10
+ },
11
+ primary: {
12
+ default: 'border-primary bg-primary text-primary-foreground',
13
+ hover: 'border-primary bg-primary text-primary-foreground opacity-90',
14
+ },
15
+ destructive: {
16
+ default: 'border-border bg-destructive text-destructive-foreground',
17
+ hover: 'border-border bg-destructive text-destructive-foreground opacity-90',
18
+ },
19
+ outline: {
20
+ default: 'border-border bg-background text-foreground',
21
+ hover: 'border-border bg-muted text-foreground',
22
+ },
23
+ subtle: {
24
+ default: 'border-secondary bg-secondary text-secondary-foreground',
25
+ hover: 'border-accent bg-accent text-accent-foreground',
26
+ },
27
+ secondary: {
28
+ default: 'border-secondary bg-secondary text-secondary-foreground',
29
+ hover: 'border-accent bg-accent text-accent-foreground',
30
+ },
31
+ ghost: {
32
+ default: 'border-border bg-transparent text-foreground',
33
+ hover: 'border-border bg-accent text-accent-foreground',
34
+ },
35
+ link: {
36
+ default: 'border-border bg-transparent text-primary',
37
+ hover: 'border-border bg-transparent text-primary underline underline-offset-4',
38
+ },
39
+ 'with-icon': {
40
+ default: 'border-primary bg-primary text-primary-foreground',
41
+ hover: 'border-primary bg-primary text-primary-foreground opacity-90',
42
+ },
43
+ icon: {
44
+ default: 'border-border bg-background text-foreground',
45
+ hover: 'border-border bg-accent text-accent-foreground',
46
+ },
47
+ 'icon-circle': {
48
+ default: 'border-border bg-background text-foreground',
49
+ hover: 'border-border bg-accent text-accent-foreground',
50
+ },
51
+ rounded: {
52
+ default: 'border-border bg-background text-foreground',
53
+ hover: 'border-border bg-accent text-accent-foreground',
54
+ },
55
+ loading: {
56
+ default: 'border-primary bg-primary text-primary-foreground opacity-70',
57
+ hover: 'border-primary bg-primary text-primary-foreground opacity-70',
58
+ },
59
+ };
60
+
6
61
  class PdmButtonComponent {
7
62
  constructor() {
8
63
  this.type = 'button';
@@ -13,21 +68,7 @@ class PdmButtonComponent {
13
68
  this.loading = false;
14
69
  this.className = '';
15
70
  this.pressed = new EventEmitter();
16
- this.toneClassMap = {
17
- default: { default: 'border-primary bg-primary text-primary-foreground', hover: 'border-primary bg-primary text-primary-foreground opacity-90' },
18
- primary: { default: 'border-primary bg-primary text-primary-foreground', hover: 'border-primary bg-primary text-primary-foreground opacity-90' },
19
- destructive: { default: 'border-border bg-destructive text-destructive-foreground', hover: 'border-border bg-destructive text-destructive-foreground opacity-90' },
20
- outline: { default: 'border-border bg-background text-foreground', hover: 'border-border bg-muted text-foreground' },
21
- subtle: { default: 'border-secondary bg-secondary text-secondary-foreground', hover: 'border-accent bg-accent text-accent-foreground' },
22
- secondary: { default: 'border-secondary bg-secondary text-secondary-foreground', hover: 'border-accent bg-accent text-accent-foreground' },
23
- ghost: { default: 'border-border bg-transparent text-foreground', hover: 'border-border bg-accent text-accent-foreground' },
24
- link: { default: 'border-border bg-transparent text-primary', hover: 'border-border bg-transparent text-primary underline underline-offset-4' },
25
- 'with-icon': { default: 'border-primary bg-primary text-primary-foreground', hover: 'border-primary bg-primary text-primary-foreground opacity-90' },
26
- icon: { default: 'border-border bg-background text-foreground', hover: 'border-border bg-accent text-accent-foreground' },
27
- 'icon-circle': { default: 'border-border bg-background text-foreground', hover: 'border-border bg-accent text-accent-foreground' },
28
- rounded: { default: 'border-border bg-background text-foreground', hover: 'border-border bg-accent text-accent-foreground' },
29
- loading: { default: 'border-primary bg-primary text-primary-foreground opacity-70', hover: 'border-primary bg-primary text-primary-foreground opacity-70' }
30
- };
71
+ this.toneClassMap = BUTTON_TONE_MAP;
31
72
  }
32
73
  get isDisabled() {
33
74
  return this.disabled || this.loading || this.variant === 'loading';
@@ -92,10 +133,10 @@ class PdmButtonComponent {
92
133
  }
93
134
  }
94
135
  PdmButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PdmButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
95
- PdmButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: PdmButtonComponent, selector: "pdm-button", inputs: { type: "type", variant: "variant", state: "state", size: "size", disabled: "disabled", loading: "loading", className: "className" }, outputs: { pressed: "pressed" }, ngImport: i0, template: "<button\n [type]=\"type\"\n [disabled]=\"isDisabled\"\n [attr.aria-busy]=\"loading\"\n [ngClass]=\"rootClasses\"\n (click)=\"onClick($event)\"\n>\n <span\n *ngIf=\"loading\"\n class=\"inline-block h-4 w-4 animate-spin rounded-full border-2 border-current border-r-transparent\"\n aria-hidden=\"true\"\n ></span>\n <ng-content select=\"[pdmButtonIcon]\" *ngIf=\"showsIconSlot\"></ng-content>\n <ng-content></ng-content>\n</button>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
136
+ PdmButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: PdmButtonComponent, selector: "pdm-button", inputs: { type: "type", variant: "variant", state: "state", size: "size", disabled: "disabled", loading: "loading", className: "className" }, outputs: { pressed: "pressed" }, ngImport: i0, template: "<button\n [type]=\"type\"\n [disabled]=\"isDisabled\"\n [attr.aria-busy]=\"isDisabled && loading ? true : null\"\n [ngClass]=\"rootClasses\"\n (click)=\"onClick($event)\"\n>\n <span\n *ngIf=\"loading\"\n class=\"inline-block h-4 w-4 animate-spin rounded-full border-2 border-current border-r-transparent\"\n aria-hidden=\"true\"\n ></span>\n <ng-content select=\"[pdmButtonIcon]\" *ngIf=\"showsIconSlot\"></ng-content>\n <ng-content></ng-content>\n</button>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
96
137
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PdmButtonComponent, decorators: [{
97
138
  type: Component,
98
- args: [{ selector: 'pdm-button', changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\n [type]=\"type\"\n [disabled]=\"isDisabled\"\n [attr.aria-busy]=\"loading\"\n [ngClass]=\"rootClasses\"\n (click)=\"onClick($event)\"\n>\n <span\n *ngIf=\"loading\"\n class=\"inline-block h-4 w-4 animate-spin rounded-full border-2 border-current border-r-transparent\"\n aria-hidden=\"true\"\n ></span>\n <ng-content select=\"[pdmButtonIcon]\" *ngIf=\"showsIconSlot\"></ng-content>\n <ng-content></ng-content>\n</button>\n" }]
139
+ args: [{ selector: 'pdm-button', changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\n [type]=\"type\"\n [disabled]=\"isDisabled\"\n [attr.aria-busy]=\"isDisabled && loading ? true : null\"\n [ngClass]=\"rootClasses\"\n (click)=\"onClick($event)\"\n>\n <span\n *ngIf=\"loading\"\n class=\"inline-block h-4 w-4 animate-spin rounded-full border-2 border-current border-r-transparent\"\n aria-hidden=\"true\"\n ></span>\n <ng-content select=\"[pdmButtonIcon]\" *ngIf=\"showsIconSlot\"></ng-content>\n <ng-content></ng-content>\n</button>\n" }]
99
140
  }], propDecorators: { type: [{
100
141
  type: Input
101
142
  }], variant: [{