customer-module-frontend 1.0.1-beta.1

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 (87) hide show
  1. package/.cursor/rules/context.md +306 -0
  2. package/.cursor/rules/guardrails.md +35 -0
  3. package/.env +1 -0
  4. package/.github/workflows/publish-to-npm-beta.yml +51 -0
  5. package/.github/workflows/publish-to-npm.yml +58 -0
  6. package/README.md +73 -0
  7. package/eslint.config.js +23 -0
  8. package/index.html +13 -0
  9. package/package.json +43 -0
  10. package/postcss-unwrap-layers.js +31 -0
  11. package/postcss.config.js +11 -0
  12. package/public/vite.svg +1 -0
  13. package/src/App.css +40 -0
  14. package/src/App.tsx +58 -0
  15. package/src/assets/accounts.svg +3 -0
  16. package/src/assets/at_the_rate.svg +10 -0
  17. package/src/assets/buildings.svg +3 -0
  18. package/src/assets/chat.svg +3 -0
  19. package/src/assets/close.svg +3 -0
  20. package/src/assets/contacts.svg +3 -0
  21. package/src/assets/conversation.svg +10 -0
  22. package/src/assets/customers.svg +10 -0
  23. package/src/assets/details.svg +3 -0
  24. package/src/assets/domain.svg +10 -0
  25. package/src/assets/edit.svg +15 -0
  26. package/src/assets/email.svg +3 -0
  27. package/src/assets/google.svg +8 -0
  28. package/src/assets/inbox.svg +0 -0
  29. package/src/assets/message.svg +3 -0
  30. package/src/assets/no-data.svg +9 -0
  31. package/src/assets/open_in_a_new_tab.svg +10 -0
  32. package/src/assets/phone.svg +3 -0
  33. package/src/assets/react.svg +1 -0
  34. package/src/assets/search.svg +3 -0
  35. package/src/assets/search_typing.svg +4 -0
  36. package/src/assets/sm_contacts.svg +3 -0
  37. package/src/assets/sm_inbox.svg +3 -0
  38. package/src/assets/sm_slider.svg +3 -0
  39. package/src/assets/status-resolved.svg +3 -0
  40. package/src/assets/status-snoozed.svg +4 -0
  41. package/src/assets/status_open.svg +1 -0
  42. package/src/components/AccountContacts/index.tsx +107 -0
  43. package/src/components/AccountDetails/index.tsx +102 -0
  44. package/src/components/AccountsConversation/index.tsx +75 -0
  45. package/src/components/Avatar/constants.tsx +45 -0
  46. package/src/components/Avatar/index.tsx +42 -0
  47. package/src/components/BreadcrumbsSection/index.tsx +16 -0
  48. package/src/components/Card/index.tsx +31 -0
  49. package/src/components/Card/types.ts +10 -0
  50. package/src/components/ContactConversation/Converation.tsx +14 -0
  51. package/src/components/ContactConversation/index.tsx +81 -0
  52. package/src/components/ContactDetails/index.tsx +111 -0
  53. package/src/components/Contacts/EditContact.tsx +213 -0
  54. package/src/components/Contacts/constants/index.tsx +24 -0
  55. package/src/components/Contacts/index.tsx +171 -0
  56. package/src/components/ConversationBox/constants.tsx +99 -0
  57. package/src/components/ConversationBox/index.tsx +147 -0
  58. package/src/components/ConversationBox/types.ts +20 -0
  59. package/src/components/CustomersLayout/index.tsx +20 -0
  60. package/src/components/DetailsCard/index.tsx +31 -0
  61. package/src/components/DetailsCard/types.ts +10 -0
  62. package/src/components/EmptyData/NoDataFound.tsx +31 -0
  63. package/src/components/Header/index.tsx +55 -0
  64. package/src/components/Icon/index.tsx +93 -0
  65. package/src/components/Icon/types.ts +13 -0
  66. package/src/components/Listing/AccountTable.tsx +47 -0
  67. package/src/components/Listing/ContactTable.tsx +76 -0
  68. package/src/components/RightPanel/AccountPanel.tsx +123 -0
  69. package/src/components/RightPanel/ContactPanel.tsx +142 -0
  70. package/src/components/RightPanel/index.tsx +167 -0
  71. package/src/components/Search/SearchDialog.tsx +150 -0
  72. package/src/components/TabsSection/index.tsx +49 -0
  73. package/src/constants/index.tsx +645 -0
  74. package/src/hooks/useBreadcrumb.tsx +93 -0
  75. package/src/index.css +315 -0
  76. package/src/main.tsx +14 -0
  77. package/src/pages/AccountDetail.tsx +68 -0
  78. package/src/pages/Accounts.tsx +12 -0
  79. package/src/pages/ContactDetail.tsx +55 -0
  80. package/src/pages/Contacts.tsx +12 -0
  81. package/src/stores/count.tsx +17 -0
  82. package/src/types/index.ts +0 -0
  83. package/tailwind.config.js +179 -0
  84. package/tsconfig.app.json +36 -0
  85. package/tsconfig.json +7 -0
  86. package/tsconfig.node.json +26 -0
  87. package/vite.config.ts +31 -0
@@ -0,0 +1,179 @@
1
+ /** @type {import('tailwindcss').Config} */
2
+ export default {
3
+ content: [
4
+ "./index.html",
5
+ "./src/**/*.{js,ts,jsx,tsx}",
6
+ ],
7
+ theme: {
8
+ extend: {
9
+ fontFamily: {
10
+ 'hanken': ['"Hanken Grotesk"', 'sans-serif'],
11
+ },
12
+ fontSize: {
13
+ 'body-small': ['14px', {
14
+ lineHeight: '20px',
15
+ fontWeight: '400',
16
+ }],
17
+ 'body-medium': ['16px', {
18
+ lineHeight: '24px',
19
+ fontWeight: '500',
20
+ }],
21
+ 'label-medium': ['16px', {
22
+ lineHeight: '24px',
23
+ fontWeight: '500',
24
+ }],
25
+ /* Label/Small */
26
+ 'label-small': ['14px', {
27
+ lineHeight: '20px',
28
+ fontWeight: '500',
29
+ }],
30
+ },
31
+ borderRadius: {
32
+ 'base': '0.375rem', // 6px
33
+ },
34
+ boxShadow: {
35
+ 'xs': '0 1px 2px 0 rgb(0 0 0 / 0.05)',
36
+ },
37
+ colors: {
38
+ slate: {
39
+ surface: {
40
+ white: '#FFFFFF',
41
+ subtle: '#F8FAFC',
42
+ subtle_100: '#F1F5F9',
43
+ subtle_150: '#EDF1F6',
44
+ subtle_200: '#E2E8F0',
45
+ subtle_300: '#CBD5E1',
46
+ default: '#94A3B8',
47
+ dark_500: '#64758B',
48
+ dark_600: '#475569',
49
+ darkest: '#334155',
50
+ disabled: '#E2E8F0',
51
+ },
52
+ border: {
53
+ default: '#94A3B8',
54
+ light: '#E2E8F0',
55
+ mild: '#EDF1F6',
56
+ dark: '#64758B',
57
+ },
58
+ text: {
59
+ title: '#0F172A',
60
+ body: '#334155',
61
+ subtle: '#64758B',
62
+ caption: '#CBD5E1',
63
+ disabled: '#94A3B8',
64
+ },
65
+ icons: {
66
+ active: '#334155',
67
+ subtle: '#64758B',
68
+ disabled: '#94A3B8',
69
+ }
70
+ },
71
+ primary: {
72
+ surface: {
73
+ default: '#276CF0',
74
+ subtle: '#E6EFFD',
75
+ dark: '#0C3E9D',
76
+ 'mild-dark': '#0F53D2',
77
+ lighter: '#7EA8F6',
78
+ },
79
+ border: {
80
+ subtle: '#D4E2FC',
81
+ lighter: '#A9C5F9',
82
+ default: '#276CF0',
83
+ dark: '#0C3E9D',
84
+ },
85
+ text: {
86
+ default: '#0C3E9D',
87
+ label: '#0C3E9D',
88
+ },
89
+ },
90
+ success: {
91
+ surface: {
92
+ subtle: '#D3F4E1',
93
+ },
94
+ border: {
95
+ default: '#4AD387',
96
+ },
97
+ text: {
98
+ body: '#1B6F41',
99
+ },
100
+ },
101
+ blue: {
102
+ surface: {
103
+ subtle: '#E6EFFD',
104
+ },
105
+ border: {
106
+ light: '#A9C5F9',
107
+ },
108
+ },
109
+ 'pastel-yellow': {
110
+ surface: {
111
+ subtle: '#FAF5D6',
112
+ },
113
+ text: {
114
+ title: '#5F540E',
115
+ },
116
+ },
117
+ // Primary colors
118
+ 'primary-blue': '#007bff',
119
+ 'primary-blue-dark': '#0056b3',
120
+ 'primary-blue-light': '#66b3ff',
121
+ // Secondary colors
122
+ 'secondary-green': '#28a745',
123
+ 'secondary-green-dark': '#1e7e34',
124
+ 'secondary-green-light': '#71dd8a',
125
+ // Accent colors
126
+ 'accent-orange': '#fd7e14',
127
+ 'accent-purple': '#6f42c1',
128
+ 'accent-teal': '#20c997',
129
+ // Neutral grays
130
+ 'gray-1': '#f8f9fa',
131
+ 'gray-2': '#e9ecef',
132
+ 'gray-3': '#dee2e6',
133
+ 'gray-4': '#ced4da',
134
+ 'gray-5': '#adb5bd',
135
+ 'gray-6': '#6c757d',
136
+ 'gray-7': '#495057',
137
+ 'gray-8': '#343a40',
138
+ 'gray-9': '#212529',
139
+ // Status colors
140
+ 'success': '#28a745',
141
+ 'warning': '#ffc107',
142
+ 'error': '#dc3545',
143
+ 'info': '#17a2b8',
144
+ // Background colors
145
+ 'bg-primary': '#ffffff',
146
+ 'bg-secondary': '#f8f9fa',
147
+ 'bg-tertiary': '#e9ecef',
148
+ // Text colors
149
+ 'text-primary': '#212529',
150
+ 'text-secondary': '#6c757d',
151
+ 'text-muted': '#adb5bd',
152
+ // Border colors
153
+ 'border-light': '#dee2e6',
154
+ 'border-medium': '#ced4da',
155
+ 'border-dark': '#adb5bd',
156
+ // Pro plan dark background (charcoal)
157
+ 'pro-bg': '#2d3748',
158
+ 'pro-bg-light': '#374151',
159
+ // New colors from design
160
+ 'banner-bg': '#D4E2FC',
161
+ 'banner-text': '#0C3E9D',
162
+ 'banner-icon-bg': '#2563eb',
163
+ 'toggle-inactive': '#94A3B8',
164
+ 'toggle-active': '#276CF0',
165
+ 'savings-bg': '#d1fae5',
166
+ 'savings-text': '#059669',
167
+ 'card-border': '#e5e7eb',
168
+ 'card-hover-border': '#d1d5db',
169
+ 'plan-highlighted-bg': '#475569',
170
+ // Google blue for buttons
171
+ 'google-blue': '#4285f4',
172
+ 'google-blue-hover': '#3367d6',
173
+ 'google-blue-active': '#2d5aa0',
174
+ },
175
+ },
176
+ },
177
+ plugins: [],
178
+ }
179
+
@@ -0,0 +1,36 @@
1
+ {
2
+ "compilerOptions": {
3
+ "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
4
+ "target": "ES2022",
5
+ "useDefineForClassFields": true,
6
+ "lib": ["ES2022", "DOM", "DOM.Iterable"],
7
+ "module": "ESNext",
8
+ "types": ["vite/client"],
9
+ "skipLibCheck": true,
10
+
11
+ /* Bundler mode */
12
+ "moduleResolution": "bundler",
13
+ "allowImportingTsExtensions": true,
14
+ "verbatimModuleSyntax": true,
15
+ "moduleDetection": "force",
16
+ "noEmit": true,
17
+ "jsx": "react-jsx",
18
+
19
+ /* Linting */
20
+ "strict": true,
21
+ "noUnusedLocals": true,
22
+ "noUnusedParameters": true,
23
+ "erasableSyntaxOnly": true,
24
+ "noFallthroughCasesInSwitch": true,
25
+ "noUncheckedSideEffectImports": true,
26
+
27
+ /* Path aliases */
28
+ "baseUrl": ".",
29
+ "paths": {
30
+ "@/*": ["src/*"],
31
+ "@components/*": ["src/components/*"],
32
+ "@assets/*": ["src/assets/*"]
33
+ }
34
+ },
35
+ "include": ["src"]
36
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "files": [],
3
+ "references": [
4
+ { "path": "./tsconfig.app.json" },
5
+ { "path": "./tsconfig.node.json" }
6
+ ]
7
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "compilerOptions": {
3
+ "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
4
+ "target": "ES2023",
5
+ "lib": ["ES2023"],
6
+ "module": "ESNext",
7
+ "types": ["node"],
8
+ "skipLibCheck": true,
9
+
10
+ /* Bundler mode */
11
+ "moduleResolution": "bundler",
12
+ "allowImportingTsExtensions": true,
13
+ "verbatimModuleSyntax": true,
14
+ "moduleDetection": "force",
15
+ "noEmit": true,
16
+
17
+ /* Linting */
18
+ "strict": true,
19
+ "noUnusedLocals": true,
20
+ "noUnusedParameters": true,
21
+ "erasableSyntaxOnly": true,
22
+ "noFallthroughCasesInSwitch": true,
23
+ "noUncheckedSideEffectImports": true
24
+ },
25
+ "include": ["vite.config.ts"]
26
+ }
package/vite.config.ts ADDED
@@ -0,0 +1,31 @@
1
+ import { defineConfig, loadEnv } from 'vite'
2
+ import react from '@vitejs/plugin-react'
3
+ import path from 'path'
4
+ import { fileURLToPath } from 'url'
5
+
6
+ const __dirname = path.dirname(fileURLToPath(import.meta.url))
7
+
8
+ // https://vite.dev/config/
9
+ export default defineConfig(({ mode }) => {
10
+ const env = loadEnv(mode, process.cwd(), '')
11
+
12
+ // Check for UI_FRAMEWORK env var, default to 'primereact'
13
+ const uiFramework = (env.UI_FRAMEWORK || 'primereact') as 'hui' | 'primereact'
14
+
15
+ return {
16
+ plugins: [react()],
17
+ resolve: {
18
+ dedupe: ["react", "react-dom"],
19
+ conditions: [uiFramework, 'import', 'module', 'browser', 'default'],
20
+ alias: {
21
+ '@': path.resolve(__dirname, 'src'),
22
+ '@components': path.resolve(__dirname, 'src/components'),
23
+ '@assets': path.resolve(__dirname, 'src/assets'),
24
+ 'hiver-ui-kit-extended/dist/hiver-ui-kit-extended.css': path.resolve(
25
+ __dirname,
26
+ 'node_modules/hiver-ui-kit-extended/dist/hiver-ui-kit-extended.css'
27
+ ),
28
+ },
29
+ },
30
+ }
31
+ })