@redacto.io/consent-sdk-react 4.0.0 → 5.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. package/CHANGELOG.md +19 -1
  2. package/LICENSE +176 -0
  3. package/README.md +98 -1
  4. package/dist/index.js +231 -96
  5. package/dist/index.mjs +231 -96
  6. package/dist/privacy-center.d.mts +649 -0
  7. package/dist/privacy-center.d.ts +649 -0
  8. package/dist/privacy-center.js +20824 -0
  9. package/dist/privacy-center.mjs +20789 -0
  10. package/package.json +47 -3
  11. package/src/RedactoNoticeConsent/RedactoNoticeConsent.tsx +6 -4
  12. package/src/RedactoNoticeConsent/api/index.ts +2 -0
  13. package/src/RedactoNoticeConsent/api/types.ts +2 -0
  14. package/src/RedactoNoticeConsent/components/DigiLockerCallback.tsx +128 -62
  15. package/src/RedactoNoticeConsent/language-codes.ts +97 -0
  16. package/src/RedactoNoticeConsentInline/RedactoNoticeConsentInline.tsx +0 -3
  17. package/src/RedactoNoticeConsentInline/api/index.ts +0 -1
  18. package/src/RedactoPrivacyCenter/PrivacyCenterActivityPage.tsx +19 -0
  19. package/src/RedactoPrivacyCenter/PrivacyCenterCaseDetailsPage.tsx +154 -0
  20. package/src/RedactoPrivacyCenter/PrivacyCenterConsentManagerPage.tsx +17 -0
  21. package/src/RedactoPrivacyCenter/PrivacyCenterFormPage.tsx +79 -0
  22. package/src/RedactoPrivacyCenter/PrivacyCenterHomePage.tsx +30 -0
  23. package/src/RedactoPrivacyCenter/PrivacyCenterLayout.tsx +173 -0
  24. package/src/RedactoPrivacyCenter/RedactoPrivacyCenter.tsx +55 -0
  25. package/src/RedactoPrivacyCenter/api/actions.ts +476 -0
  26. package/src/RedactoPrivacyCenter/api/client.ts +524 -0
  27. package/src/RedactoPrivacyCenter/api/config.ts +33 -0
  28. package/src/RedactoPrivacyCenter/api/fetcher.ts +181 -0
  29. package/src/RedactoPrivacyCenter/api/upload.ts +93 -0
  30. package/src/RedactoPrivacyCenter/assets/character.svg +31 -0
  31. package/src/RedactoPrivacyCenter/assets/fileAttach.svg +9 -0
  32. package/src/RedactoPrivacyCenter/assets/greenTick.svg +4 -0
  33. package/src/RedactoPrivacyCenter/assets/mail.svg +3 -0
  34. package/src/RedactoPrivacyCenter/assets/poweredByRedacto.svg +9 -0
  35. package/src/RedactoPrivacyCenter/assets/sentImg.svg +9 -0
  36. package/src/RedactoPrivacyCenter/assets/uploadFileIcon.svg +9 -0
  37. package/src/RedactoPrivacyCenter/components/ActivitiesList.tsx +272 -0
  38. package/src/RedactoPrivacyCenter/components/CaseDetails/AttachmentCard.tsx +38 -0
  39. package/src/RedactoPrivacyCenter/components/CaseDetails/ChatBubble.tsx +31 -0
  40. package/src/RedactoPrivacyCenter/components/CaseDetails/DocumentRequestCard.tsx +73 -0
  41. package/src/RedactoPrivacyCenter/components/CaseDetails/MessageComposer.tsx +87 -0
  42. package/src/RedactoPrivacyCenter/components/CaseDetails/MessageItem.tsx +95 -0
  43. package/src/RedactoPrivacyCenter/components/CaseDetails/MessagesTab.tsx +147 -0
  44. package/src/RedactoPrivacyCenter/components/CaseDetails/RequestDetailsTab.tsx +171 -0
  45. package/src/RedactoPrivacyCenter/components/CaseDetails/StatusEvent.tsx +23 -0
  46. package/src/RedactoPrivacyCenter/components/CaseDetails/useFileUpload.ts +116 -0
  47. package/src/RedactoPrivacyCenter/components/CaseDetails/useMessagePolling.ts +36 -0
  48. package/src/RedactoPrivacyCenter/components/CaseDetails/utils.ts +56 -0
  49. package/src/RedactoPrivacyCenter/components/CaseDetailsModal.tsx +469 -0
  50. package/src/RedactoPrivacyCenter/components/CaseHistory.tsx +426 -0
  51. package/src/RedactoPrivacyCenter/components/ConsentManager.tsx +732 -0
  52. package/src/RedactoPrivacyCenter/components/ConsentManagerColumns.tsx +238 -0
  53. package/src/RedactoPrivacyCenter/components/ConsentManagerConstants.ts +7 -0
  54. package/src/RedactoPrivacyCenter/components/ConsentManagerTableSkeleton.tsx +155 -0
  55. package/src/RedactoPrivacyCenter/components/DataRequest/CorrectionDataSection.tsx +189 -0
  56. package/src/RedactoPrivacyCenter/components/DataRequest/GrievanceDataSection.tsx +118 -0
  57. package/src/RedactoPrivacyCenter/components/DataRequest/NominationDataSection.tsx +66 -0
  58. package/src/RedactoPrivacyCenter/components/DataRequest/PurposeSelectionSection.tsx +304 -0
  59. package/src/RedactoPrivacyCenter/components/Form.tsx +1596 -0
  60. package/src/RedactoPrivacyCenter/components/GrievanceTable.tsx +174 -0
  61. package/src/RedactoPrivacyCenter/components/GrievanceTablePagination.tsx +337 -0
  62. package/src/RedactoPrivacyCenter/components/ModifyConsentModal.tsx +330 -0
  63. package/src/RedactoPrivacyCenter/components/Pagination.tsx +140 -0
  64. package/src/RedactoPrivacyCenter/components/PrivacyCenterLayout.tsx +304 -0
  65. package/src/RedactoPrivacyCenter/components/RequestSubmit.tsx +232 -0
  66. package/src/RedactoPrivacyCenter/components/SideMenuBarPC/SideBarPC.tsx +475 -0
  67. package/src/RedactoPrivacyCenter/components/SideMenuBarPC/SideMenuPC.tsx +408 -0
  68. package/src/RedactoPrivacyCenter/components/SideMenuBarPC/constants.tsx +42 -0
  69. package/src/RedactoPrivacyCenter/components/SideMenuBarPC/menuItemsPC.tsx +1 -0
  70. package/src/RedactoPrivacyCenter/components/SideMenuBarPC/types.ts +40 -0
  71. package/src/RedactoPrivacyCenter/components/SideMenuBarPC/utils.ts +38 -0
  72. package/src/RedactoPrivacyCenter/components/ThemeTransitionOverlay.tsx +85 -0
  73. package/src/RedactoPrivacyCenter/components/activitiesColumns.tsx +141 -0
  74. package/src/RedactoPrivacyCenter/components/caseHistoryColumns.tsx +159 -0
  75. package/src/RedactoPrivacyCenter/components/constant.ts +16 -0
  76. package/src/RedactoPrivacyCenter/components/types.ts +76 -0
  77. package/src/RedactoPrivacyCenter/components/utils.tsx +10 -0
  78. package/src/RedactoPrivacyCenter/config/routes.ts +9 -0
  79. package/src/RedactoPrivacyCenter/config/table.ts +25 -0
  80. package/src/RedactoPrivacyCenter/context/AuthContext.tsx +137 -0
  81. package/src/RedactoPrivacyCenter/context/BaseUrlContext.tsx +41 -0
  82. package/src/RedactoPrivacyCenter/context/LocaleContext.tsx +11 -0
  83. package/src/RedactoPrivacyCenter/context/NavigationContext.tsx +96 -0
  84. package/src/RedactoPrivacyCenter/context/OrganizationContext.tsx +30 -0
  85. package/src/RedactoPrivacyCenter/context/PageChromeContext.tsx +60 -0
  86. package/src/RedactoPrivacyCenter/context/theme.tsx +127 -0
  87. package/src/RedactoPrivacyCenter/context/types.ts +14 -0
  88. package/src/RedactoPrivacyCenter/lib/api.ts +566 -0
  89. package/src/RedactoPrivacyCenter/lib/consent-manager/utils.tsx +63 -0
  90. package/src/RedactoPrivacyCenter/lib/constants.ts +161 -0
  91. package/src/RedactoPrivacyCenter/lib/i18n.ts +81 -0
  92. package/src/RedactoPrivacyCenter/lib/locales.ts +105 -0
  93. package/src/RedactoPrivacyCenter/lib/queries.ts +134 -0
  94. package/src/RedactoPrivacyCenter/lib/types.ts +531 -0
  95. package/src/RedactoPrivacyCenter/lib/useCurrentLanguage.ts +37 -0
  96. package/src/RedactoPrivacyCenter/lib/utils.ts +626 -0
  97. package/src/RedactoPrivacyCenter/locales/as/translation.json +280 -0
  98. package/src/RedactoPrivacyCenter/locales/bho/translation.json +280 -0
  99. package/src/RedactoPrivacyCenter/locales/bn/translation.json +280 -0
  100. package/src/RedactoPrivacyCenter/locales/brx/translation.json +280 -0
  101. package/src/RedactoPrivacyCenter/locales/doi/translation.json +280 -0
  102. package/src/RedactoPrivacyCenter/locales/en/translation.json +255 -0
  103. package/src/RedactoPrivacyCenter/locales/gom/translation.json +280 -0
  104. package/src/RedactoPrivacyCenter/locales/gu/translation.json +280 -0
  105. package/src/RedactoPrivacyCenter/locales/hi/translation.json +280 -0
  106. package/src/RedactoPrivacyCenter/locales/kn/translation.json +280 -0
  107. package/src/RedactoPrivacyCenter/locales/ks/translation.json +280 -0
  108. package/src/RedactoPrivacyCenter/locales/mai/translation.json +280 -0
  109. package/src/RedactoPrivacyCenter/locales/ml/translation.json +280 -0
  110. package/src/RedactoPrivacyCenter/locales/mni-Mtei/translation.json +280 -0
  111. package/src/RedactoPrivacyCenter/locales/mr/translation.json +280 -0
  112. package/src/RedactoPrivacyCenter/locales/ne/translation.json +280 -0
  113. package/src/RedactoPrivacyCenter/locales/or/translation.json +280 -0
  114. package/src/RedactoPrivacyCenter/locales/pa/translation.json +280 -0
  115. package/src/RedactoPrivacyCenter/locales/sa/translation.json +280 -0
  116. package/src/RedactoPrivacyCenter/locales/sat/translation.json +280 -0
  117. package/src/RedactoPrivacyCenter/locales/sd/translation.json +280 -0
  118. package/src/RedactoPrivacyCenter/locales/ta/translation.json +280 -0
  119. package/src/RedactoPrivacyCenter/locales/te/translation.json +280 -0
  120. package/src/RedactoPrivacyCenter/locales/ur/translation.json +280 -0
  121. package/src/RedactoPrivacyCenter/styles/base.css +117 -0
  122. package/src/RedactoPrivacyCenter/styles/injectStyles.ts +1725 -0
  123. package/src/RedactoPrivacyCenter/styles/pcStyles.ts +813 -0
  124. package/src/RedactoPrivacyCenter/styles/responsive.ts +138 -0
  125. package/src/RedactoPrivacyCenter/styles/variables.css +133 -0
  126. package/src/RedactoPrivacyCenter/table/AdvancedTable.tsx +367 -0
  127. package/src/RedactoPrivacyCenter/table/AdvancedTablePagination.tsx +476 -0
  128. package/src/RedactoPrivacyCenter/table/index.ts +2 -0
  129. package/src/RedactoPrivacyCenter/types/images.d.ts +29 -0
  130. package/src/RedactoPrivacyCenter/ui/Footer.tsx +75 -0
  131. package/src/RedactoPrivacyCenter/ui/FormBlockWrapper.tsx +54 -0
  132. package/src/RedactoPrivacyCenter/ui/PCAccordion.tsx +93 -0
  133. package/src/RedactoPrivacyCenter/ui/PCActionIcon.tsx +47 -0
  134. package/src/RedactoPrivacyCenter/ui/PCAvatar.tsx +69 -0
  135. package/src/RedactoPrivacyCenter/ui/PCBadge.tsx +48 -0
  136. package/src/RedactoPrivacyCenter/ui/PCButton.tsx +77 -0
  137. package/src/RedactoPrivacyCenter/ui/PCCheckbox.tsx +55 -0
  138. package/src/RedactoPrivacyCenter/ui/PCCollapse.tsx +107 -0
  139. package/src/RedactoPrivacyCenter/ui/PCEmpty.tsx +35 -0
  140. package/src/RedactoPrivacyCenter/ui/PCInput.tsx +132 -0
  141. package/src/RedactoPrivacyCenter/ui/PCLoader.tsx +31 -0
  142. package/src/RedactoPrivacyCenter/ui/PCModal.tsx +106 -0
  143. package/src/RedactoPrivacyCenter/ui/PCPopover.tsx +173 -0
  144. package/src/RedactoPrivacyCenter/ui/PCSelect.tsx +387 -0
  145. package/src/RedactoPrivacyCenter/ui/PCTable.tsx +149 -0
  146. package/src/RedactoPrivacyCenter/ui/PCText.tsx +41 -0
  147. package/src/RedactoPrivacyCenter/ui/PCTextarea.tsx +43 -0
  148. package/src/RedactoPrivacyCenter/ui/PCTitle.tsx +37 -0
  149. package/src/RedactoPrivacyCenter/ui/PCTooltip.tsx +119 -0
  150. package/src/RedactoPrivacyCenter/ui/SimpleBar.tsx +25 -0
  151. package/src/RedactoPrivacyCenter/ui/StatusBadge.tsx +53 -0
  152. package/src/RedactoPrivacyCenter/ui/ThemeToggle.tsx +72 -0
  153. package/src/RedactoPrivacyCenter/ui/index.ts +18 -0
  154. package/src/RedactoPrivacyCenter/utils/cn.ts +28 -0
  155. package/src/RedactoPrivacyCenter/utils/date.ts +48 -0
  156. package/src/RedactoPrivacyCenter/utils/status.ts +111 -0
  157. package/src/RedactoPrivacyCenter/utils/toast.ts +130 -0
  158. package/src/privacy-center.ts +108 -0
  159. package/tsconfig.json +2 -0
  160. package/tsup.config.ts +16 -1
  161. package/.turbo/turbo-build.log +0 -21
@@ -0,0 +1,813 @@
1
+ /**
2
+ * Privacy Center SDK Inline Styles
3
+ *
4
+ * All styles use CSS custom properties for theme support.
5
+ * These styles are completely isolated and won't conflict with host app styles.
6
+ */
7
+
8
+ // Helper to get CSS variable value
9
+ const getVar = (varName: string): string => `var(${varName})`;
10
+
11
+ export const pcStyles = {
12
+ // Layout utilities
13
+ flex: {
14
+ display: 'flex',
15
+ },
16
+ flexCol: {
17
+ display: 'flex',
18
+ flexDirection: 'column',
19
+ },
20
+ flexRow: {
21
+ display: 'flex',
22
+ flexDirection: 'row',
23
+ },
24
+ itemsCenter: {
25
+ alignItems: 'center',
26
+ },
27
+ itemsStart: {
28
+ alignItems: 'flex-start',
29
+ },
30
+ itemsEnd: {
31
+ alignItems: 'flex-end',
32
+ },
33
+ justifyCenter: {
34
+ justifyContent: 'center',
35
+ },
36
+ justifyBetween: {
37
+ justifyContent: 'space-between',
38
+ },
39
+ justifyEnd: {
40
+ justifyContent: 'flex-end',
41
+ },
42
+ justifyStart: {
43
+ justifyContent: 'flex-start',
44
+ },
45
+ gapXs: {
46
+ gap: getVar('--pc-spacing-xs'),
47
+ },
48
+ gapSm: {
49
+ gap: getVar('--pc-spacing-sm'),
50
+ },
51
+ gapMd: {
52
+ gap: getVar('--pc-spacing-md'),
53
+ },
54
+ gapLg: {
55
+ gap: getVar('--pc-spacing-lg'),
56
+ },
57
+ gapXl: {
58
+ gap: getVar('--pc-spacing-xl'),
59
+ },
60
+ wFull: {
61
+ width: '100%',
62
+ },
63
+ hFull: {
64
+ height: '100%',
65
+ },
66
+ wScreen: {
67
+ width: '100vw',
68
+ },
69
+ hScreen: {
70
+ height: '100vh',
71
+ },
72
+ textCenter: {
73
+ textAlign: 'center',
74
+ },
75
+ textLeft: {
76
+ textAlign: 'left',
77
+ },
78
+ textRight: {
79
+ textAlign: 'right',
80
+ },
81
+ overflowHidden: {
82
+ overflow: 'hidden',
83
+ },
84
+ overflowAuto: {
85
+ overflow: 'auto',
86
+ },
87
+ overflowXAuto: {
88
+ overflowX: 'auto',
89
+ },
90
+ overflowYAuto: {
91
+ overflowY: 'auto',
92
+ },
93
+
94
+ // Typography
95
+ text: {
96
+ fontFamily: getVar('--pc-font-family'),
97
+ fontSize: getVar('--pc-font-size-base'),
98
+ lineHeight: 1.5,
99
+ color: getVar('--pc-text-primary'),
100
+ margin: 0,
101
+ padding: 0,
102
+ boxSizing: 'border-box',
103
+ },
104
+ textXs: {
105
+ fontSize: getVar('--pc-font-size-xs'),
106
+ },
107
+ textSm: {
108
+ fontSize: getVar('--pc-font-size-sm'),
109
+ },
110
+ textBase: {
111
+ fontSize: getVar('--pc-font-size-base'),
112
+ },
113
+ textLg: {
114
+ fontSize: getVar('--pc-font-size-lg'),
115
+ },
116
+ textXl: {
117
+ fontSize: getVar('--pc-font-size-xl'),
118
+ },
119
+ text2xl: {
120
+ fontSize: getVar('--pc-font-size-2xl'),
121
+ },
122
+ text3xl: {
123
+ fontSize: getVar('--pc-font-size-3xl'),
124
+ },
125
+ fontWeightNormal: {
126
+ fontWeight: getVar('--pc-font-weight-normal'),
127
+ },
128
+ fontWeightMedium: {
129
+ fontWeight: getVar('--pc-font-weight-medium'),
130
+ },
131
+ fontWeightSemibold: {
132
+ fontWeight: getVar('--pc-font-weight-semibold'),
133
+ },
134
+ fontWeightBold: {
135
+ fontWeight: getVar('--pc-font-weight-bold'),
136
+ },
137
+ textPrimary: {
138
+ color: getVar('--pc-text-primary'),
139
+ },
140
+ textSecondary: {
141
+ color: getVar('--pc-text-secondary'),
142
+ },
143
+ textTertiary: {
144
+ color: getVar('--pc-text-tertiary'),
145
+ },
146
+ textInverse: {
147
+ color: getVar('--pc-text-inverse'),
148
+ },
149
+ textDisabled: {
150
+ color: getVar('--pc-text-disabled'),
151
+ },
152
+
153
+ // Title styles
154
+ title: {
155
+ fontFamily: getVar('--pc-font-family'),
156
+ fontWeight: getVar('--pc-font-weight-bold'),
157
+ color: getVar('--pc-text-primary'),
158
+ margin: 0,
159
+ padding: 0,
160
+ lineHeight: 1.2,
161
+ },
162
+ titleH1: {
163
+ fontSize: getVar('--pc-font-size-3xl'),
164
+ },
165
+ titleH2: {
166
+ fontSize: getVar('--pc-font-size-2xl'),
167
+ },
168
+ titleH3: {
169
+ fontSize: getVar('--pc-font-size-xl'),
170
+ },
171
+ titleH4: {
172
+ fontSize: getVar('--pc-font-size-lg'),
173
+ },
174
+ titleH5: {
175
+ fontSize: getVar('--pc-font-size-base'),
176
+ },
177
+ titleH6: {
178
+ fontSize: getVar('--pc-font-size-sm'),
179
+ },
180
+
181
+ // Button styles
182
+ button: {
183
+ fontFamily: getVar('--pc-font-family'),
184
+ fontSize: getVar('--pc-font-size-base'),
185
+ fontWeight: getVar('--pc-font-weight-medium'),
186
+ borderRadius: getVar('--pc-border-radius-md'),
187
+ padding: '0.4375rem 0.875rem',
188
+ minHeight: '2.25rem',
189
+ border: 'none',
190
+ cursor: 'pointer',
191
+ transition: getVar('--pc-transition-base'),
192
+ display: 'inline-flex',
193
+ alignItems: 'center',
194
+ justifyContent: 'center',
195
+ gap: getVar('--pc-spacing-sm'),
196
+ boxSizing: 'border-box',
197
+ outline: 'none',
198
+ },
199
+ buttonPrimary: {
200
+ backgroundColor: getVar('--pc-primary'),
201
+ color: getVar('--pc-text-inverse'),
202
+ },
203
+ buttonPrimaryHover: {
204
+ backgroundColor: getVar('--pc-primary-hover'),
205
+ },
206
+ buttonSecondary: {
207
+ backgroundColor: getVar('--pc-secondary'),
208
+ color: getVar('--pc-text-inverse'),
209
+ },
210
+ buttonOutline: {
211
+ backgroundColor: 'transparent',
212
+ border: `1px solid ${getVar('--pc-border-color')}`,
213
+ color: getVar('--pc-text-primary'),
214
+ },
215
+ buttonText: {
216
+ backgroundColor: 'transparent',
217
+ border: 'none',
218
+ color: getVar('--pc-primary'),
219
+ padding: '0.125rem 0.375rem',
220
+ minHeight: 'unset',
221
+ },
222
+ buttonDanger: {
223
+ backgroundColor: getVar('--pc-error'),
224
+ color: getVar('--pc-text-inverse'),
225
+ },
226
+ buttonSm: {
227
+ fontSize: getVar('--pc-font-size-sm'),
228
+ padding: '0.3125rem 0.625rem',
229
+ minHeight: '2rem',
230
+ },
231
+ buttonLg: {
232
+ fontSize: getVar('--pc-font-size-lg'),
233
+ padding: '0.625rem 1.125rem',
234
+ minHeight: '2.5rem',
235
+ },
236
+ buttonDisabled: {
237
+ opacity: 0.5,
238
+ cursor: 'not-allowed',
239
+ pointerEvents: 'none',
240
+ },
241
+
242
+ // Input styles
243
+ input: {
244
+ fontFamily: getVar('--pc-font-family'),
245
+ fontSize: getVar('--pc-font-size-base'),
246
+ color: getVar('--pc-text-primary'),
247
+ backgroundColor: getVar('--pc-bg-primary'),
248
+ border: `1px solid ${getVar('--pc-border-color')}`,
249
+ borderRadius: getVar('--pc-border-radius-md'),
250
+ padding: '0.4375rem 0.625rem',
251
+ minHeight: '2.25rem',
252
+ width: '100%',
253
+ boxSizing: 'border-box',
254
+ outline: 'none',
255
+ transition: getVar('--pc-transition-base'),
256
+ },
257
+ inputFocus: {
258
+ borderColor: getVar('--pc-border-color'),
259
+ boxShadow: 'none',
260
+ outline: 'none',
261
+ },
262
+ inputDisabled: {
263
+ backgroundColor: getVar('--pc-bg-tertiary'),
264
+ color: getVar('--pc-text-disabled'),
265
+ cursor: 'not-allowed',
266
+ },
267
+ inputError: {
268
+ borderColor: getVar('--pc-error'),
269
+ },
270
+ inputSm: {
271
+ fontSize: getVar('--pc-font-size-sm'),
272
+ padding: '0.3125rem 0.5rem',
273
+ minHeight: '2rem',
274
+ },
275
+ inputLg: {
276
+ fontSize: getVar('--pc-font-size-lg'),
277
+ padding: '0.625rem 0.875rem',
278
+ minHeight: '2.5rem',
279
+ },
280
+ inputLabel: {
281
+ display: 'block',
282
+ fontSize: getVar('--pc-font-size-sm'),
283
+ fontWeight: getVar('--pc-font-weight-medium'),
284
+ color: getVar('--pc-text-primary'),
285
+ marginBottom: getVar('--pc-spacing-xs'),
286
+ },
287
+ inputWrapper: {
288
+ display: 'flex',
289
+ flexDirection: 'column',
290
+ width: '100%',
291
+ },
292
+ inputPrefix: {
293
+ display: 'flex',
294
+ alignItems: 'center',
295
+ paddingLeft: getVar('--pc-spacing-sm'),
296
+ paddingRight: getVar('--pc-spacing-sm'),
297
+ color: getVar('--pc-text-secondary'),
298
+ },
299
+ inputSuffix: {
300
+ display: 'flex',
301
+ alignItems: 'center',
302
+ paddingLeft: getVar('--pc-spacing-sm'),
303
+ color: getVar('--pc-text-secondary'),
304
+ },
305
+ inputWithPrefix: {
306
+ display: 'flex',
307
+ alignItems: 'center',
308
+ border: `1px solid ${getVar('--pc-border-color')}`,
309
+ borderRadius: getVar('--pc-border-radius-md'),
310
+ backgroundColor: getVar('--pc-bg-primary'),
311
+ },
312
+
313
+ // Textarea styles (extends input)
314
+ textarea: {
315
+ fontFamily: getVar('--pc-font-family'),
316
+ fontSize: getVar('--pc-font-size-base'),
317
+ color: getVar('--pc-text-primary'),
318
+ backgroundColor: getVar('--pc-bg-primary'),
319
+ border: `1px solid ${getVar('--pc-border-color')}`,
320
+ borderRadius: getVar('--pc-border-radius-md'),
321
+ padding: '0.5rem 0.625rem',
322
+ width: '100%',
323
+ minHeight: '90px',
324
+ resize: 'vertical',
325
+ boxSizing: 'border-box',
326
+ outline: 'none',
327
+ transition: getVar('--pc-transition-base'),
328
+ },
329
+
330
+ // Checkbox styles
331
+ checkbox: {
332
+ width: '20px',
333
+ height: '20px',
334
+ cursor: 'pointer',
335
+ margin: 0,
336
+ padding: 0,
337
+ boxSizing: 'border-box',
338
+ },
339
+ checkboxSm: {
340
+ width: '16px',
341
+ height: '16px',
342
+ },
343
+ checkboxLabel: {
344
+ display: 'flex',
345
+ alignItems: 'center',
346
+ gap: getVar('--pc-spacing-sm'),
347
+ cursor: 'pointer',
348
+ fontSize: getVar('--pc-font-size-base'),
349
+ color: getVar('--pc-text-primary'),
350
+ },
351
+
352
+ // Select/Dropdown styles
353
+ select: {
354
+ fontFamily: getVar('--pc-font-family'),
355
+ fontSize: getVar('--pc-font-size-base'),
356
+ color: getVar('--pc-text-primary'),
357
+ backgroundColor: getVar('--pc-bg-primary'),
358
+ border: `1px solid ${getVar('--pc-border-color')}`,
359
+ borderRadius: getVar('--pc-border-radius-md'),
360
+ padding: '0.4375rem 0.625rem',
361
+ minHeight: '2.25rem',
362
+ width: '100%',
363
+ cursor: 'pointer',
364
+ boxSizing: 'border-box',
365
+ outline: 'none',
366
+ transition: getVar('--pc-transition-base'),
367
+ },
368
+ selectFocus: {
369
+ borderColor: getVar('--pc-border-color-focus'),
370
+ },
371
+ selectOption: {
372
+ padding: '0.4375rem 0.625rem',
373
+ cursor: 'pointer',
374
+ color: getVar('--pc-text-primary'),
375
+ backgroundColor: getVar('--pc-bg-primary'),
376
+ whiteSpace: 'nowrap',
377
+ },
378
+ selectOptionHover: {
379
+ backgroundColor: getVar('--pc-bg-hover'),
380
+ },
381
+ selectDropdown: {
382
+ position: 'absolute',
383
+ left: 0,
384
+ width: 'auto',
385
+ minWidth: 'auto',
386
+ maxWidth: 'max-content',
387
+ backgroundColor: getVar('--pc-bg-primary'),
388
+ border: `1px solid ${getVar('--pc-border-color')}`,
389
+ borderRadius: getVar('--pc-border-radius-md'),
390
+ boxShadow: getVar('--pc-shadow-lg'),
391
+ zIndex: 1000,
392
+ maxHeight: '300px',
393
+ overflowY: 'auto',
394
+ transition: 'background-color 0.3s ease, border-color 0.3s ease',
395
+ boxSizing: 'border-box',
396
+ },
397
+
398
+ // Modal styles
399
+ modalOverlay: {
400
+ position: 'fixed',
401
+ top: 0,
402
+ left: 0,
403
+ right: 0,
404
+ bottom: 0,
405
+ backgroundColor: getVar('--pc-bg-overlay'),
406
+ display: 'flex',
407
+ alignItems: 'center',
408
+ justifyContent: 'center',
409
+ zIndex: 1050,
410
+ padding: getVar('--pc-spacing-md'),
411
+ boxSizing: 'border-box',
412
+ },
413
+ modal: {
414
+ backgroundColor: getVar('--pc-bg-primary'),
415
+ borderRadius: getVar('--pc-border-radius-lg'),
416
+ boxShadow: getVar('--pc-shadow-xl'),
417
+ maxWidth: '90vw',
418
+ maxHeight: '90vh',
419
+ overflow: 'auto',
420
+ position: 'relative',
421
+ display: 'flex',
422
+ flexDirection: 'column',
423
+ boxSizing: 'border-box',
424
+ },
425
+ modalSm: {
426
+ width: '400px',
427
+ },
428
+ modalMd: {
429
+ width: '600px',
430
+ },
431
+ modalLg: {
432
+ width: '800px',
433
+ },
434
+ modalXl: {
435
+ width: '1000px',
436
+ },
437
+ modalHeader: {
438
+ padding: getVar('--pc-spacing-lg'),
439
+ borderBottom: `1px solid ${getVar('--pc-border-color')}`,
440
+ display: 'flex',
441
+ alignItems: 'center',
442
+ justifyContent: 'space-between',
443
+ },
444
+ modalBody: {
445
+ padding: getVar('--pc-spacing-lg'),
446
+ flex: 1,
447
+ overflow: 'auto',
448
+ },
449
+ modalFooter: {
450
+ padding: getVar('--pc-spacing-lg'),
451
+ borderTop: `1px solid ${getVar('--pc-border-color')}`,
452
+ display: 'flex',
453
+ alignItems: 'center',
454
+ justifyContent: 'flex-end',
455
+ gap: getVar('--pc-spacing-sm'),
456
+ },
457
+ modalCloseButton: {
458
+ background: 'none',
459
+ border: 'none',
460
+ cursor: 'pointer',
461
+ padding: getVar('--pc-spacing-xs'),
462
+ color: getVar('--pc-text-secondary'),
463
+ display: 'flex',
464
+ alignItems: 'center',
465
+ justifyContent: 'center',
466
+ borderRadius: getVar('--pc-border-radius-sm'),
467
+ },
468
+
469
+ // Table styles
470
+ table: {
471
+ width: '100%',
472
+ borderCollapse: 'collapse',
473
+ fontFamily: getVar('--pc-font-family'),
474
+ fontSize: getVar('--pc-font-size-base'),
475
+ },
476
+ tableHeader: {
477
+ backgroundColor: getVar('--pc-bg-secondary'),
478
+ },
479
+ tableHeaderCell: {
480
+ padding: '0.625rem 0.75rem',
481
+ textAlign: 'left',
482
+ fontSize: getVar('--pc-font-size-sm'),
483
+ fontWeight: getVar('--pc-font-weight-medium'),
484
+ color: getVar('--pc-text-primary'),
485
+ borderBottom: `1px solid ${getVar('--pc-border-color')}`,
486
+ },
487
+ tableRow: {
488
+ borderBottom: `1px solid ${getVar('--pc-border-color')}`,
489
+ transition: getVar('--pc-transition-fast'),
490
+ },
491
+ tableRowHover: {
492
+ backgroundColor: getVar('--pc-bg-hover'),
493
+ },
494
+ tableCell: {
495
+ padding: '0.625rem 0.75rem',
496
+ fontSize: getVar('--pc-font-size-sm'),
497
+ color: getVar('--pc-text-primary'),
498
+ },
499
+
500
+ // Badge styles — pill-shaped, light bg matching text, no border, generous padding (reference style)
501
+ badge: {
502
+ display: 'inline-flex',
503
+ alignItems: 'center',
504
+ justifyContent: 'center',
505
+ padding: '0.25rem 0.625rem',
506
+ borderRadius: '9999px',
507
+ fontSize: getVar('--pc-font-size-xs'),
508
+ fontWeight: 600,
509
+ lineHeight: 1,
510
+ boxSizing: 'border-box',
511
+ minWidth: 0,
512
+ },
513
+ badgeSuccess: {
514
+ backgroundColor: 'rgba(16, 185, 129, 0.1)',
515
+ color: getVar('--pc-success'),
516
+ },
517
+ badgeError: {
518
+ backgroundColor: 'rgba(239, 68, 68, 0.1)',
519
+ color: getVar('--pc-error'),
520
+ },
521
+ badgeWarning: {
522
+ backgroundColor: 'rgba(245, 158, 11, 0.1)',
523
+ color: getVar('--pc-warning'),
524
+ },
525
+ badgeInfo: {
526
+ backgroundColor: 'rgba(59, 130, 246, 0.1)',
527
+ color: getVar('--pc-info'),
528
+ },
529
+ badgeSecondary: {
530
+ backgroundColor: getVar('--pc-bg-tertiary'),
531
+ color: getVar('--pc-text-primary'),
532
+ },
533
+ badgeSm: {
534
+ fontSize: '0.75rem',
535
+ padding: '0.1875rem 0.5rem',
536
+ },
537
+
538
+ // Loader/Spinner styles
539
+ loader: {
540
+ display: 'inline-block',
541
+ border: '3px solid',
542
+ borderColor: `${getVar('--pc-border-color')} transparent ${getVar('--pc-border-color')} transparent`,
543
+ borderRadius: '50%',
544
+ animation: 'pc-spin 1s linear infinite',
545
+ },
546
+ loaderSm: {
547
+ width: '16px',
548
+ height: '16px',
549
+ borderWidth: '2px',
550
+ },
551
+ loaderMd: {
552
+ width: '24px',
553
+ height: '24px',
554
+ borderWidth: '3px',
555
+ },
556
+ loaderLg: {
557
+ width: '40px',
558
+ height: '40px',
559
+ borderWidth: '4px',
560
+ },
561
+ loaderPrimary: {
562
+ borderColor: `${getVar('--pc-primary')} transparent ${getVar('--pc-primary')} transparent`,
563
+ },
564
+ loaderInfo: {
565
+ borderColor: `${getVar('--pc-info')} transparent ${getVar('--pc-info')} transparent`,
566
+ },
567
+
568
+ // Tooltip styles
569
+ tooltip: {
570
+ position: 'absolute',
571
+ backgroundColor: '#1f2937',
572
+ color: '#ffffff',
573
+ padding: '0.5rem 0.75rem',
574
+ borderRadius: getVar('--pc-border-radius-md'),
575
+ fontSize: getVar('--pc-font-size-sm'),
576
+ zIndex: 1070,
577
+ pointerEvents: 'none',
578
+ whiteSpace: 'nowrap',
579
+ boxShadow: getVar('--pc-shadow-lg'),
580
+ },
581
+ tooltipArrow: {
582
+ position: 'absolute',
583
+ width: 0,
584
+ height: 0,
585
+ borderStyle: 'solid',
586
+ },
587
+
588
+ // ActionIcon styles
589
+ actionIcon: {
590
+ display: 'inline-flex',
591
+ alignItems: 'center',
592
+ justifyContent: 'center',
593
+ padding: getVar('--pc-spacing-xs'),
594
+ borderRadius: getVar('--pc-border-radius-sm'),
595
+ cursor: 'pointer',
596
+ border: 'none',
597
+ backgroundColor: 'transparent',
598
+ color: getVar('--pc-text-primary'),
599
+ transition: getVar('--pc-transition-fast'),
600
+ },
601
+ actionIconHover: {
602
+ backgroundColor: getVar('--pc-bg-hover'),
603
+ },
604
+ actionIconSm: {
605
+ padding: '0.1875rem',
606
+ width: '22px',
607
+ height: '22px',
608
+ },
609
+ actionIconMd: {
610
+ padding: '0.25rem',
611
+ width: '28px',
612
+ height: '28px',
613
+ },
614
+ actionIconOutline: {
615
+ border: `1px solid ${getVar('--pc-border-color')}`,
616
+ },
617
+ actionIconDisabled: {
618
+ opacity: 0.5,
619
+ cursor: 'not-allowed',
620
+ },
621
+
622
+ // Accordion styles
623
+ accordion: {
624
+ border: `1px solid ${getVar('--pc-border-color')}`,
625
+ borderRadius: getVar('--pc-border-radius-md'),
626
+ overflow: 'hidden',
627
+ },
628
+ accordionHeader: {
629
+ padding: getVar('--pc-spacing-md'),
630
+ backgroundColor: getVar('--pc-bg-primary'),
631
+ cursor: 'pointer',
632
+ display: 'flex',
633
+ alignItems: 'center',
634
+ justifyContent: 'space-between',
635
+ transition: getVar('--pc-transition-base'),
636
+ },
637
+ accordionHeaderHover: {
638
+ backgroundColor: getVar('--pc-bg-hover'),
639
+ },
640
+ accordionBody: {
641
+ padding: getVar('--pc-spacing-md'),
642
+ backgroundColor: getVar('--pc-bg-secondary'),
643
+ borderTop: `1px solid ${getVar('--pc-border-color')}`,
644
+ },
645
+
646
+ // Avatar styles
647
+ avatar: {
648
+ display: 'inline-flex',
649
+ alignItems: 'center',
650
+ justifyContent: 'center',
651
+ borderRadius: '50%',
652
+ backgroundColor: getVar('--pc-primary'),
653
+ color: getVar('--pc-text-inverse'),
654
+ fontWeight: getVar('--pc-font-weight-semibold'),
655
+ },
656
+ avatarSm: {
657
+ width: '24px',
658
+ height: '24px',
659
+ fontSize: getVar('--pc-font-size-xs'),
660
+ },
661
+ avatarMd: {
662
+ width: '32px',
663
+ height: '32px',
664
+ fontSize: getVar('--pc-font-size-sm'),
665
+ },
666
+ avatarLg: {
667
+ width: '48px',
668
+ height: '48px',
669
+ fontSize: getVar('--pc-font-size-base'),
670
+ },
671
+
672
+ // Empty state styles
673
+ empty: {
674
+ display: 'flex',
675
+ flexDirection: 'column',
676
+ alignItems: 'center',
677
+ justifyContent: 'center',
678
+ padding: getVar('--pc-spacing-2xl'),
679
+ color: getVar('--pc-text-secondary'),
680
+ textAlign: 'center',
681
+ },
682
+ emptyIcon: {
683
+ fontSize: getVar('--pc-font-size-3xl'),
684
+ marginBottom: getVar('--pc-spacing-md'),
685
+ opacity: 0.5,
686
+ },
687
+ emptyText: {
688
+ fontSize: getVar('--pc-font-size-base'),
689
+ color: getVar('--pc-text-secondary'),
690
+ },
691
+
692
+ // Container styles
693
+ container: {
694
+ width: '100%',
695
+ maxWidth: '100%',
696
+ marginLeft: 'auto',
697
+ marginRight: 'auto',
698
+ paddingLeft: getVar('--pc-spacing-md'),
699
+ paddingRight: getVar('--pc-spacing-md'),
700
+ },
701
+ containerSm: {
702
+ maxWidth: '640px',
703
+ },
704
+ containerMd: {
705
+ maxWidth: '768px',
706
+ },
707
+ containerLg: {
708
+ maxWidth: '1024px',
709
+ },
710
+ containerXl: {
711
+ maxWidth: '1280px',
712
+ },
713
+
714
+ // Card styles
715
+ card: {
716
+ backgroundColor: getVar('--pc-bg-primary'),
717
+ borderRadius: getVar('--pc-border-radius-lg'),
718
+ boxShadow: getVar('--pc-shadow-sm'),
719
+ padding: getVar('--pc-spacing-lg'),
720
+ border: `1px solid ${getVar('--pc-border-color')}`,
721
+ },
722
+
723
+ // Spacing utilities
724
+ pXs: { padding: getVar('--pc-spacing-xs') },
725
+ pSm: { padding: getVar('--pc-spacing-sm') },
726
+ pMd: { padding: getVar('--pc-spacing-md') },
727
+ pLg: { padding: getVar('--pc-spacing-lg') },
728
+ pXl: { padding: getVar('--pc-spacing-xl') },
729
+ pxXs: { paddingLeft: getVar('--pc-spacing-xs'), paddingRight: getVar('--pc-spacing-xs') },
730
+ pxSm: { paddingLeft: getVar('--pc-spacing-sm'), paddingRight: getVar('--pc-spacing-sm') },
731
+ pxMd: { paddingLeft: getVar('--pc-spacing-md'), paddingRight: getVar('--pc-spacing-md') },
732
+ pxLg: { paddingLeft: getVar('--pc-spacing-lg'), paddingRight: getVar('--pc-spacing-lg') },
733
+ pyXs: { paddingTop: getVar('--pc-spacing-xs'), paddingBottom: getVar('--pc-spacing-xs') },
734
+ pySm: { paddingTop: getVar('--pc-spacing-sm'), paddingBottom: getVar('--pc-spacing-sm') },
735
+ pyMd: { paddingTop: getVar('--pc-spacing-md'), paddingBottom: getVar('--pc-spacing-md') },
736
+ pyLg: { paddingTop: getVar('--pc-spacing-lg'), paddingBottom: getVar('--pc-spacing-lg') },
737
+ mXs: { margin: getVar('--pc-spacing-xs') },
738
+ mSm: { margin: getVar('--pc-spacing-sm') },
739
+ mMd: { margin: getVar('--pc-spacing-md') },
740
+ mLg: { margin: getVar('--pc-spacing-lg') },
741
+ mXl: { margin: getVar('--pc-spacing-xl') },
742
+ mbXs: { marginBottom: getVar('--pc-spacing-xs') },
743
+ mbSm: { marginBottom: getVar('--pc-spacing-sm') },
744
+ mbMd: { marginBottom: getVar('--pc-spacing-md') },
745
+ mbLg: { marginBottom: getVar('--pc-spacing-lg') },
746
+ mtXs: { marginTop: getVar('--pc-spacing-xs') },
747
+ mtSm: { marginTop: getVar('--pc-spacing-sm') },
748
+ mtMd: { marginTop: getVar('--pc-spacing-md') },
749
+ mtLg: { marginTop: getVar('--pc-spacing-lg') },
750
+ mxXs: { marginLeft: getVar('--pc-spacing-xs'), marginRight: getVar('--pc-spacing-xs') },
751
+ mxSm: { marginLeft: getVar('--pc-spacing-sm'), marginRight: getVar('--pc-spacing-sm') },
752
+ mxMd: { marginLeft: getVar('--pc-spacing-md'), marginRight: getVar('--pc-spacing-md') },
753
+ myXs: { marginTop: getVar('--pc-spacing-xs'), marginBottom: getVar('--pc-spacing-xs') },
754
+ mySm: { marginTop: getVar('--pc-spacing-sm'), marginBottom: getVar('--pc-spacing-sm') },
755
+ myMd: { marginTop: getVar('--pc-spacing-md'), marginBottom: getVar('--pc-spacing-md') },
756
+ mlXs: { marginLeft: getVar('--pc-spacing-xs') },
757
+ mlSm: { marginLeft: getVar('--pc-spacing-sm') },
758
+ mlMd: { marginLeft: getVar('--pc-spacing-md') },
759
+ mlLg: { marginLeft: getVar('--pc-spacing-lg') },
760
+ mrXs: { marginRight: getVar('--pc-spacing-xs') },
761
+ mrSm: { marginRight: getVar('--pc-spacing-sm') },
762
+ mrMd: { marginRight: getVar('--pc-spacing-md') },
763
+ mrLg: { marginRight: getVar('--pc-spacing-lg') },
764
+ ptXs: { paddingTop: getVar('--pc-spacing-xs') },
765
+ ptSm: { paddingTop: getVar('--pc-spacing-sm') },
766
+ ptMd: { paddingTop: getVar('--pc-spacing-md') },
767
+ ptLg: { paddingTop: getVar('--pc-spacing-lg') },
768
+ pbXs: { paddingBottom: getVar('--pc-spacing-xs') },
769
+ pbSm: { paddingBottom: getVar('--pc-spacing-sm') },
770
+ pbMd: { paddingBottom: getVar('--pc-spacing-md') },
771
+ pbLg: { paddingBottom: getVar('--pc-spacing-lg') },
772
+ plXs: { paddingLeft: getVar('--pc-spacing-xs') },
773
+ plSm: { paddingLeft: getVar('--pc-spacing-sm') },
774
+ plMd: { paddingLeft: getVar('--pc-spacing-md') },
775
+ plLg: { paddingLeft: getVar('--pc-spacing-lg') },
776
+ prXs: { paddingRight: getVar('--pc-spacing-xs') },
777
+ prSm: { paddingRight: getVar('--pc-spacing-sm') },
778
+ prMd: { paddingRight: getVar('--pc-spacing-md') },
779
+ prLg: { paddingRight: getVar('--pc-spacing-lg') },
780
+
781
+ // Border radius
782
+ borderRadiusSm: getVar('--pc-border-radius-sm'),
783
+ borderRadiusMd: getVar('--pc-border-radius-md'),
784
+ borderRadiusLg: getVar('--pc-border-radius-lg'),
785
+ borderRadiusXl: getVar('--pc-border-radius-xl'),
786
+ borderRadius2xl: getVar('--pc-border-radius-2xl'),
787
+ borderRadius3xl: getVar('--pc-border-radius-3xl'),
788
+
789
+ // Border color
790
+ borderColor: getVar('--pc-border-color'),
791
+ borderColorHover: getVar('--pc-border-color-hover'),
792
+ borderColorFocus: getVar('--pc-border-color-focus'),
793
+
794
+ // Shadow
795
+ shadowSm: getVar('--pc-shadow-sm'),
796
+ shadowMd: getVar('--pc-shadow-md'),
797
+ shadowLg: getVar('--pc-shadow-lg'),
798
+ shadowXl: getVar('--pc-shadow-xl'),
799
+
800
+ // Background utilities
801
+ bgPrimary: { backgroundColor: getVar('--pc-bg-primary') },
802
+ bgSecondary: { backgroundColor: getVar('--pc-bg-secondary') },
803
+ bgTertiary: { backgroundColor: getVar('--pc-bg-tertiary') },
804
+
805
+ // Warning styles
806
+ warningBg: getVar('--pc-warning-bg'),
807
+ warningBorder: getVar('--pc-warning-border'),
808
+ warningText: getVar('--pc-warning-text'),
809
+
810
+ // Color utilities
811
+ primary: getVar('--pc-primary'),
812
+ success: getVar('--pc-success'),
813
+ } as const;