@shokirovr16/frontend-library 0.1.2

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 (58) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +98 -0
  3. package/bin/cmfrt.js +69 -0
  4. package/package.json +47 -0
  5. package/src/auth/README.md +193 -0
  6. package/src/auth/core/AuthEngine.js +623 -0
  7. package/src/auth/core/OidcClient.js +79 -0
  8. package/src/auth/core/OidcDiscovery.js +17 -0
  9. package/src/auth/core/Pkce.js +18 -0
  10. package/src/auth/events/AuthEventBus.js +22 -0
  11. package/src/auth/http/authFetch.js +32 -0
  12. package/src/auth/http/createAuthHttpClient.js +42 -0
  13. package/src/auth/index.js +90 -0
  14. package/src/auth/permissions/ClaimsNormalizer.js +69 -0
  15. package/src/auth/permissions/permissions.js +26 -0
  16. package/src/auth/react/AuthProvider.js +34 -0
  17. package/src/auth/react/guards/RequireAuth.js +35 -0
  18. package/src/auth/react/guards/RequirePermission.js +16 -0
  19. package/src/auth/react/guards/withAuthGuard.js +12 -0
  20. package/src/auth/react/hooks/useRequireAuth.js +24 -0
  21. package/src/auth/react/index.js +6 -0
  22. package/src/auth/react/useAuth.js +29 -0
  23. package/src/auth/silent/silentCallback.js +42 -0
  24. package/src/auth/singleton.js +22 -0
  25. package/src/auth/storage/InMemoryTokenStore.js +56 -0
  26. package/src/auth/storage/TransactionStore.js +51 -0
  27. package/src/auth/sync/BroadcastChannelSync.js +29 -0
  28. package/src/auth/tenancy/TenantResolver.js +39 -0
  29. package/src/auth/types.js +113 -0
  30. package/src/auth/utils/base64url.js +15 -0
  31. package/src/auth/utils/jwt.js +26 -0
  32. package/src/auth/utils/random.js +13 -0
  33. package/src/auth/utils/url.js +27 -0
  34. package/src/commands/add.js +80 -0
  35. package/src/commands/init.js +113 -0
  36. package/src/commands/list.js +92 -0
  37. package/src/commands/remove.js +150 -0
  38. package/src/commands/status.js +96 -0
  39. package/src/commands/theme.js +47 -0
  40. package/src/commands/uninstall.js +198 -0
  41. package/src/commands/update.js +151 -0
  42. package/src/lib/config.js +55 -0
  43. package/src/lib/fs.js +13 -0
  44. package/src/lib/packageManager.js +30 -0
  45. package/src/lib/paths.js +14 -0
  46. package/src/lib/registry.js +11 -0
  47. package/src/lib/styles.js +223 -0
  48. package/src/lib/targets.js +15 -0
  49. package/src/lib/theme.js +102 -0
  50. package/templates/docs/cmfrt-doc.md +82 -0
  51. package/templates/lib/utils.js +6 -0
  52. package/templates/registry.json +42 -0
  53. package/templates/styles/theme.cjs +832 -0
  54. package/templates/styles/type-utilities.css +136 -0
  55. package/templates/styles/type-utility-classes.css +138 -0
  56. package/templates/styles/variables.css +1560 -0
  57. package/templates/styles/variables.json +6870 -0
  58. package/templates/ui/button.jsx +117 -0
@@ -0,0 +1,136 @@
1
+ .type-body-1-semibold {
2
+ @apply text-body-1-semibold font-body-1-semibold leading-body-1-semibold tracking-body-1-semibold;
3
+ }
4
+
5
+ .type-body-1-medium {
6
+ @apply text-body-1-medium font-body-1-medium leading-body-1-medium tracking-body-1-medium;
7
+ }
8
+
9
+ .type-body-1-regular {
10
+ @apply text-body-1-regular font-body-1-regular leading-body-1-regular tracking-body-1-regular;
11
+ }
12
+
13
+ .type-headings-h1-bold {
14
+ @apply text-headings-h1-bold font-headings-h1-bold leading-headings-h1-bold tracking-headings-h1-bold;
15
+ }
16
+
17
+ .type-headings-h1-semi-bold {
18
+ @apply text-headings-h1-semi-bold font-headings-h1-semi-bold leading-headings-h1-semi-bold tracking-headings-h1-semi-bold;
19
+ }
20
+
21
+ .type-headings-h2-bold {
22
+ @apply text-headings-h2-bold font-headings-h2-bold leading-headings-h2-bold tracking-headings-h2-bold;
23
+ }
24
+
25
+ .type-headings-h2-semi-bold {
26
+ @apply text-headings-h2-semi-bold font-headings-h2-semi-bold leading-headings-h2-semi-bold tracking-headings-h2-semi-bold;
27
+ }
28
+
29
+ .type-headings-h3-bold {
30
+ @apply text-headings-h3-bold font-headings-h3-bold leading-headings-h3-bold tracking-headings-h3-bold;
31
+ }
32
+
33
+ .type-headings-h3-semi-bold {
34
+ @apply text-headings-h3-semi-bold font-headings-h3-semi-bold leading-headings-h3-semi-bold tracking-headings-h3-semi-bold;
35
+ }
36
+
37
+ .type-headings-h4-bold {
38
+ @apply text-headings-h4-bold font-headings-h4-bold leading-headings-h4-bold tracking-headings-h4-bold;
39
+ }
40
+
41
+ .type-headings-h4-semi-bold {
42
+ @apply text-headings-h4-semi-bold font-headings-h4-semi-bold leading-headings-h4-semi-bold tracking-headings-h4-semi-bold;
43
+ }
44
+
45
+ .type-headings-h5-bold {
46
+ @apply text-headings-h5-bold font-headings-h5-bold leading-headings-h5-bold tracking-headings-h5-bold;
47
+ }
48
+
49
+ .type-headings-h5-semi-bold {
50
+ @apply text-headings-h5-semi-bold font-headings-h5-semi-bold leading-headings-h5-semi-bold tracking-headings-h5-semi-bold;
51
+ }
52
+
53
+ .type-title-semibold {
54
+ @apply text-title-semibold font-title-semibold leading-title-semibold tracking-title-semibold;
55
+ }
56
+
57
+ .type-title-medium {
58
+ @apply text-title-medium font-title-medium leading-title-medium tracking-title-medium;
59
+ }
60
+
61
+ .type-title-regular {
62
+ @apply text-title-regular font-title-regular leading-title-regular tracking-title-regular;
63
+ }
64
+
65
+ .type-body-2-semibold {
66
+ @apply text-body-2-semibold font-body-2-semibold leading-body-2-semibold tracking-body-2-semibold;
67
+ }
68
+
69
+ .type-body-2-medium {
70
+ @apply text-body-2-medium font-body-2-medium leading-body-2-medium tracking-body-2-medium;
71
+ }
72
+
73
+ .type-body-2-regular {
74
+ @apply text-body-2-regular font-body-2-regular leading-body-2-regular tracking-body-2-regular;
75
+ }
76
+
77
+ .type-body-3-semibold {
78
+ @apply text-body-3-semibold font-body-3-semibold leading-body-3-semibold tracking-body-3-semibold;
79
+ }
80
+
81
+ .type-body-3-medium {
82
+ @apply text-body-3-medium font-body-3-medium leading-body-3-medium tracking-body-3-medium;
83
+ }
84
+
85
+ .type-body-3-regular {
86
+ @apply text-body-3-regular font-body-3-regular leading-body-3-regular tracking-body-3-regular;
87
+ }
88
+
89
+ .type-subhead-semibold {
90
+ @apply text-subhead-semibold font-subhead-semibold leading-subhead-semibold tracking-subhead-semibold;
91
+ }
92
+
93
+ .type-subhead-medium {
94
+ @apply text-subhead-medium font-subhead-medium leading-subhead-medium tracking-subhead-medium;
95
+ }
96
+
97
+ .type-subhead-regular {
98
+ @apply text-subhead-regular font-subhead-regular leading-subhead-regular tracking-subhead-regular;
99
+ }
100
+
101
+ .type-footnote-semibold {
102
+ @apply text-footnote-semibold font-footnote-semibold leading-footnote-semibold tracking-footnote-semibold;
103
+ }
104
+
105
+ .type-footnote-medium {
106
+ @apply text-footnote-medium font-footnote-medium leading-footnote-medium tracking-footnote-medium;
107
+ }
108
+
109
+ .type-footnote-regular {
110
+ @apply text-footnote-regular font-footnote-regular leading-footnote-regular tracking-footnote-regular;
111
+ }
112
+
113
+ .type-caption-semibold {
114
+ @apply text-caption-semibold font-caption-semibold leading-caption-semibold tracking-caption-semibold;
115
+ }
116
+
117
+ .type-caption-medium {
118
+ @apply text-caption-medium font-caption-medium leading-caption-medium tracking-caption-medium;
119
+ }
120
+
121
+ .type-caption-regular {
122
+ @apply text-caption-regular font-caption-regular leading-caption-regular tracking-caption-regular;
123
+ }
124
+
125
+ .type-caption-1-semibold {
126
+ @apply text-caption-1-semibold font-caption-1-semibold leading-caption-1-semibold tracking-caption-1-semibold;
127
+ }
128
+
129
+ .type-caption-1-medium {
130
+ @apply text-caption-1-medium font-caption-1-medium leading-caption-1-medium tracking-caption-1-medium;
131
+ }
132
+
133
+ .type-caption-1-regular {
134
+ @apply text-caption-1-regular font-caption-1-regular leading-caption-1-regular tracking-caption-1-regular;
135
+ }
136
+
@@ -0,0 +1,138 @@
1
+ @layer utilities {
2
+ .text-body-1-semibold { font-size: 18px; }
3
+ .font-body-1-semibold { font-family: Inter, sans-serif; font-weight: 600; }
4
+ .leading-body-1-semibold { line-height: 24px; }
5
+ .tracking-body-1-semibold { letter-spacing: 0px; }
6
+ .text-body-1-medium { font-size: 18px; }
7
+ .font-body-1-medium { font-family: Inter, sans-serif; font-weight: 500; }
8
+ .leading-body-1-medium { line-height: 24px; }
9
+ .tracking-body-1-medium { letter-spacing: 0px; }
10
+ .text-body-1-regular { font-size: 18px; }
11
+ .font-body-1-regular { font-family: Inter, sans-serif; font-weight: 400; }
12
+ .leading-body-1-regular { line-height: 24px; }
13
+ .tracking-body-1-regular { letter-spacing: 0px; }
14
+ .text-headings-h1-bold { font-size: 72px; }
15
+ .font-headings-h1-bold { font-family: Poppins, Inter, sans-serif; font-weight: 700; }
16
+ .leading-headings-h1-bold { line-height: 1.2000000476837158; }
17
+ .tracking-headings-h1-bold { letter-spacing: 0px; }
18
+ .text-headings-h1-semi-bold { font-size: 72px; }
19
+ .font-headings-h1-semi-bold { font-family: Poppins, Inter, sans-serif; font-weight: 600; }
20
+ .leading-headings-h1-semi-bold { line-height: 1.2000000476837158; }
21
+ .tracking-headings-h1-semi-bold { letter-spacing: 0px; }
22
+ .text-headings-h2-bold { font-size: 48px; }
23
+ .font-headings-h2-bold { font-family: Poppins, Inter, sans-serif; font-weight: 700; }
24
+ .leading-headings-h2-bold { line-height: 1.149999976158142; }
25
+ .tracking-headings-h2-bold { letter-spacing: 0px; }
26
+ .text-headings-h2-semi-bold { font-size: 48px; }
27
+ .font-headings-h2-semi-bold { font-family: Poppins, Inter, sans-serif; font-weight: 600; }
28
+ .leading-headings-h2-semi-bold { line-height: 1.149999976158142; }
29
+ .tracking-headings-h2-semi-bold { letter-spacing: 0px; }
30
+ .text-headings-h3-bold { font-size: 32px; }
31
+ .font-headings-h3-bold { font-family: Poppins, Inter, sans-serif; font-weight: 700; }
32
+ .leading-headings-h3-bold { line-height: 1.2000000476837158; }
33
+ .tracking-headings-h3-bold { letter-spacing: 0px; }
34
+ .text-headings-h3-semi-bold { font-size: 32px; }
35
+ .font-headings-h3-semi-bold { font-family: Poppins, Inter, sans-serif; font-weight: 600; }
36
+ .leading-headings-h3-semi-bold { line-height: 1.2000000476837158; }
37
+ .tracking-headings-h3-semi-bold { letter-spacing: 0px; }
38
+ .text-headings-h4-bold { font-size: 28px; }
39
+ .font-headings-h4-bold { font-family: Poppins, Inter, sans-serif; font-weight: 700; }
40
+ .leading-headings-h4-bold { line-height: 1.2000000476837158; }
41
+ .tracking-headings-h4-bold { letter-spacing: 0px; }
42
+ .text-headings-h4-semi-bold { font-size: 28px; }
43
+ .font-headings-h4-semi-bold { font-family: Poppins, Inter, sans-serif; font-weight: 600; }
44
+ .leading-headings-h4-semi-bold { line-height: 1.2000000476837158; }
45
+ .tracking-headings-h4-semi-bold { letter-spacing: 0px; }
46
+ .text-headings-h5-bold { font-size: 24px; }
47
+ .font-headings-h5-bold { font-family: Poppins, Inter, sans-serif; font-weight: 700; }
48
+ .leading-headings-h5-bold { line-height: 1.2000000476837158; }
49
+ .tracking-headings-h5-bold { letter-spacing: 0px; }
50
+ .text-headings-h5-semi-bold { font-size: 24px; }
51
+ .font-headings-h5-semi-bold { font-family: Poppins, Inter, sans-serif; font-weight: 600; }
52
+ .leading-headings-h5-semi-bold { line-height: 1.2000000476837158; }
53
+ .tracking-headings-h5-semi-bold { letter-spacing: 0px; }
54
+ .text-title-semibold { font-size: 20px; }
55
+ .font-title-semibold { font-family: Inter, sans-serif; font-weight: 600; }
56
+ .leading-title-semibold { line-height: 1.2000000476837158; }
57
+ .tracking-title-semibold { letter-spacing: 0px; }
58
+ .text-title-medium { font-size: 20px; }
59
+ .font-title-medium { font-family: Inter, sans-serif; font-weight: 500; }
60
+ .leading-title-medium { line-height: 1.2000000476837158; }
61
+ .tracking-title-medium { letter-spacing: 0px; }
62
+ .text-title-regular { font-size: 20px; }
63
+ .font-title-regular { font-family: Inter, sans-serif; font-weight: 400; }
64
+ .leading-title-regular { line-height: 1.2000000476837158; }
65
+ .tracking-title-regular { letter-spacing: 0px; }
66
+ .text-body-2-semibold { font-size: 16px; }
67
+ .font-body-2-semibold { font-family: Inter, sans-serif; font-weight: 600; }
68
+ .leading-body-2-semibold { line-height: 20px; }
69
+ .tracking-body-2-semibold { letter-spacing: 0px; }
70
+ .text-body-2-medium { font-size: 16px; }
71
+ .font-body-2-medium { font-family: Inter, sans-serif; font-weight: 500; }
72
+ .leading-body-2-medium { line-height: 20px; }
73
+ .tracking-body-2-medium { letter-spacing: 0px; }
74
+ .text-body-2-regular { font-size: 16px; }
75
+ .font-body-2-regular { font-family: Inter, sans-serif; font-weight: 400; }
76
+ .leading-body-2-regular { line-height: 20px; }
77
+ .tracking-body-2-regular { letter-spacing: 0px; }
78
+ .text-body-3-semibold { font-size: 15px; }
79
+ .font-body-3-semibold { font-family: Inter, sans-serif; font-weight: 600; }
80
+ .leading-body-3-semibold { line-height: 18px; }
81
+ .tracking-body-3-semibold { letter-spacing: 0px; }
82
+ .text-body-3-medium { font-size: 15px; }
83
+ .font-body-3-medium { font-family: Inter, sans-serif; font-weight: 500; }
84
+ .leading-body-3-medium { line-height: 18px; }
85
+ .tracking-body-3-medium { letter-spacing: 0px; }
86
+ .text-body-3-regular { font-size: 15px; }
87
+ .font-body-3-regular { font-family: Inter, sans-serif; font-weight: 400; }
88
+ .leading-body-3-regular { line-height: 18px; }
89
+ .tracking-body-3-regular { letter-spacing: 0px; }
90
+ .text-subhead-semibold { font-size: 14px; }
91
+ .font-subhead-semibold { font-family: Inter, sans-serif; font-weight: 600; }
92
+ .leading-subhead-semibold { line-height: 16px; }
93
+ .tracking-subhead-semibold { letter-spacing: 0px; }
94
+ .text-subhead-medium { font-size: 14px; }
95
+ .font-subhead-medium { font-family: Inter, sans-serif; font-weight: 500; }
96
+ .leading-subhead-medium { line-height: 16px; }
97
+ .tracking-subhead-medium { letter-spacing: 0px; }
98
+ .text-subhead-regular { font-size: 14px; }
99
+ .font-subhead-regular { font-family: Inter, sans-serif; font-weight: 400; }
100
+ .leading-subhead-regular { line-height: 16px; }
101
+ .tracking-subhead-regular { letter-spacing: 0px; }
102
+ .text-footnote-semibold { font-size: 13px; }
103
+ .font-footnote-semibold { font-family: Inter, sans-serif; font-weight: 600; }
104
+ .leading-footnote-semibold { line-height: 16px; }
105
+ .tracking-footnote-semibold { letter-spacing: 0.11999999731779099px; }
106
+ .text-footnote-medium { font-size: 13px; }
107
+ .font-footnote-medium { font-family: Inter, sans-serif; font-weight: 500; }
108
+ .leading-footnote-medium { line-height: 16px; }
109
+ .tracking-footnote-medium { letter-spacing: 0px; }
110
+ .text-footnote-regular { font-size: 13px; }
111
+ .font-footnote-regular { font-family: Inter, sans-serif; font-weight: 400; }
112
+ .leading-footnote-regular { line-height: 16px; }
113
+ .tracking-footnote-regular { letter-spacing: 0px; }
114
+ .text-caption-semibold { font-size: 12px; }
115
+ .font-caption-semibold { font-family: Inter, sans-serif; font-weight: 600; }
116
+ .leading-caption-semibold { line-height: 1.2000000476837158; }
117
+ .tracking-caption-semibold { letter-spacing: 0px; }
118
+ .text-caption-medium { font-size: 12px; }
119
+ .font-caption-medium { font-family: Inter, sans-serif; font-weight: 500; }
120
+ .leading-caption-medium { line-height: 1.2000000476837158; }
121
+ .tracking-caption-medium { letter-spacing: 0px; }
122
+ .text-caption-regular { font-size: 12px; }
123
+ .font-caption-regular { font-family: Inter, sans-serif; font-weight: 400; }
124
+ .leading-caption-regular { line-height: 1.2000000476837158; }
125
+ .tracking-caption-regular { letter-spacing: 0px; }
126
+ .text-caption-1-semibold { font-size: 10px; }
127
+ .font-caption-1-semibold { font-family: Inter, sans-serif; font-weight: 600; }
128
+ .leading-caption-1-semibold { line-height: 1.2000000476837158; }
129
+ .tracking-caption-1-semibold { letter-spacing: 0px; }
130
+ .text-caption-1-medium { font-size: 10px; }
131
+ .font-caption-1-medium { font-family: Inter, sans-serif; font-weight: 500; }
132
+ .leading-caption-1-medium { line-height: 12px; }
133
+ .tracking-caption-1-medium { letter-spacing: 0px; }
134
+ .text-caption-1-regular { font-size: 10px; }
135
+ .font-caption-1-regular { font-family: Inter, sans-serif; font-weight: 400; }
136
+ .leading-caption-1-regular { line-height: 12px; }
137
+ .tracking-caption-1-regular { letter-spacing: 0px; }
138
+ }