@thatix.io/credit-ui 0.0.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 (213) hide show
  1. package/LICENSE +19 -0
  2. package/README.md +186 -0
  3. package/dist/components/atoms/Avatar/Avatar.stories.d.ts +11 -0
  4. package/dist/components/atoms/Avatar/Avatar.vue.d.ts +16 -0
  5. package/dist/components/atoms/Avatar/index.d.ts +2 -0
  6. package/dist/components/atoms/Badge/Badge.stories.d.ts +11 -0
  7. package/dist/components/atoms/Badge/Badge.vue.d.ts +40 -0
  8. package/dist/components/atoms/Badge/index.d.ts +2 -0
  9. package/dist/components/atoms/Button/Button.stories.d.ts +15 -0
  10. package/dist/components/atoms/Button/Button.vue.d.ts +47 -0
  11. package/dist/components/atoms/Button/index.d.ts +2 -0
  12. package/dist/components/atoms/Card/Card.stories.d.ts +9 -0
  13. package/dist/components/atoms/Card/Card.vue.d.ts +33 -0
  14. package/dist/components/atoms/Card/index.d.ts +2 -0
  15. package/dist/components/atoms/Checkbox/Checkbox.stories.d.ts +11 -0
  16. package/dist/components/atoms/Checkbox/Checkbox.vue.d.ts +28 -0
  17. package/dist/components/atoms/Checkbox/index.d.ts +2 -0
  18. package/dist/components/atoms/CurrencyDisplay/CurrencyDisplay.stories.d.ts +10 -0
  19. package/dist/components/atoms/CurrencyDisplay/CurrencyDisplay.vue.d.ts +26 -0
  20. package/dist/components/atoms/CurrencyDisplay/index.d.ts +2 -0
  21. package/dist/components/atoms/Divider/Divider.stories.d.ts +9 -0
  22. package/dist/components/atoms/Divider/Divider.vue.d.ts +11 -0
  23. package/dist/components/atoms/Divider/index.d.ts +2 -0
  24. package/dist/components/atoms/GradientMesh/GradientMesh.stories.d.ts +13 -0
  25. package/dist/components/atoms/GradientMesh/GradientMesh.vue.d.ts +43 -0
  26. package/dist/components/atoms/GradientMesh/index.d.ts +2 -0
  27. package/dist/components/atoms/Icon/Icon.stories.d.ts +11 -0
  28. package/dist/components/atoms/Icon/Icon.vue.d.ts +23 -0
  29. package/dist/components/atoms/Icon/index.d.ts +2 -0
  30. package/dist/components/atoms/Input/Input.stories.d.ts +13 -0
  31. package/dist/components/atoms/Input/Input.vue.d.ts +73 -0
  32. package/dist/components/atoms/Input/index.d.ts +2 -0
  33. package/dist/components/atoms/Label/Label.stories.d.ts +11 -0
  34. package/dist/components/atoms/Label/Label.vue.d.ts +28 -0
  35. package/dist/components/atoms/Label/index.d.ts +2 -0
  36. package/dist/components/atoms/Logo/Logo.stories.d.ts +10 -0
  37. package/dist/components/atoms/Logo/Logo.vue.d.ts +17 -0
  38. package/dist/components/atoms/Logo/index.d.ts +2 -0
  39. package/dist/components/atoms/Spinner/Spinner.stories.d.ts +11 -0
  40. package/dist/components/atoms/Spinner/Spinner.vue.d.ts +11 -0
  41. package/dist/components/atoms/Spinner/index.d.ts +2 -0
  42. package/dist/components/atoms/Typography/Typography.stories.d.ts +12 -0
  43. package/dist/components/atoms/Typography/Typography.vue.d.ts +32 -0
  44. package/dist/components/atoms/Typography/index.d.ts +2 -0
  45. package/dist/components/atoms/index.d.ts +14 -0
  46. package/dist/components/index.d.ts +14 -0
  47. package/dist/components/molecules/ActionButton/ActionButton.stories.d.ts +11 -0
  48. package/dist/components/molecules/ActionButton/ActionButton.vue.d.ts +31 -0
  49. package/dist/components/molecules/ActionButton/index.d.ts +2 -0
  50. package/dist/components/molecules/Alert/Alert.stories.d.ts +12 -0
  51. package/dist/components/molecules/Alert/Alert.vue.d.ts +20 -0
  52. package/dist/components/molecules/Alert/index.d.ts +2 -0
  53. package/dist/components/molecules/AnalysisStatus/AnalysisStatus.stories.d.ts +14 -0
  54. package/dist/components/molecules/AnalysisStatus/AnalysisStatus.vue.d.ts +16 -0
  55. package/dist/components/molecules/AnalysisStatus/index.d.ts +2 -0
  56. package/dist/components/molecules/ContractPaidCelebration/ContractPaidCelebration.stories.d.ts +9 -0
  57. package/dist/components/molecules/ContractPaidCelebration/ContractPaidCelebration.vue.d.ts +25 -0
  58. package/dist/components/molecules/ContractPaidCelebration/index.d.ts +2 -0
  59. package/dist/components/molecules/DocumentUpload/DocumentUpload.stories.d.ts +10 -0
  60. package/dist/components/molecules/DocumentUpload/DocumentUpload.vue.d.ts +40 -0
  61. package/dist/components/molecules/DocumentUpload/index.d.ts +2 -0
  62. package/dist/components/molecules/FilePreview/FilePreview.stories.d.ts +13 -0
  63. package/dist/components/molecules/FilePreview/FilePreview.vue.d.ts +32 -0
  64. package/dist/components/molecules/FilePreview/index.d.ts +2 -0
  65. package/dist/components/molecules/FormField/FormField.stories.d.ts +9 -0
  66. package/dist/components/molecules/FormField/FormField.vue.d.ts +39 -0
  67. package/dist/components/molecules/FormField/index.d.ts +2 -0
  68. package/dist/components/molecules/IdentifierInput/IdentifierInput.stories.d.ts +14 -0
  69. package/dist/components/molecules/IdentifierInput/IdentifierInput.vue.d.ts +29 -0
  70. package/dist/components/molecules/IdentifierInput/index.d.ts +2 -0
  71. package/dist/components/molecules/InfoCard/InfoCard.stories.d.ts +13 -0
  72. package/dist/components/molecules/InfoCard/InfoCard.vue.d.ts +53 -0
  73. package/dist/components/molecules/InfoCard/index.d.ts +2 -0
  74. package/dist/components/molecules/InputRangeMoney/InputRangeMoney.stories.d.ts +9 -0
  75. package/dist/components/molecules/InputRangeMoney/InputRangeMoney.vue.d.ts +19 -0
  76. package/dist/components/molecules/InputRangeMoney/index.d.ts +2 -0
  77. package/dist/components/molecules/InstallmentCard/InstallmentCard.stories.d.ts +9 -0
  78. package/dist/components/molecules/InstallmentCard/InstallmentCard.vue.d.ts +29 -0
  79. package/dist/components/molecules/InstallmentCard/index.d.ts +2 -0
  80. package/dist/components/molecules/InstallmentSelector/InstallmentSelector.stories.d.ts +10 -0
  81. package/dist/components/molecules/InstallmentSelector/InstallmentSelector.vue.d.ts +28 -0
  82. package/dist/components/molecules/InstallmentSelector/index.d.ts +2 -0
  83. package/dist/components/molecules/MarginIndicator/MarginIndicator.stories.d.ts +12 -0
  84. package/dist/components/molecules/MarginIndicator/MarginIndicator.vue.d.ts +18 -0
  85. package/dist/components/molecules/MarginIndicator/index.d.ts +2 -0
  86. package/dist/components/molecules/Modal/Modal.stories.d.ts +8 -0
  87. package/dist/components/molecules/Modal/Modal.vue.d.ts +38 -0
  88. package/dist/components/molecules/Modal/index.d.ts +2 -0
  89. package/dist/components/molecules/PasswordInput/PasswordInput.stories.d.ts +11 -0
  90. package/dist/components/molecules/PasswordInput/PasswordInput.vue.d.ts +30 -0
  91. package/dist/components/molecules/PasswordInput/index.d.ts +2 -0
  92. package/dist/components/molecules/PendingProposalBanner/PendingProposalBanner.stories.d.ts +10 -0
  93. package/dist/components/molecules/PendingProposalBanner/PendingProposalBanner.vue.d.ts +24 -0
  94. package/dist/components/molecules/PendingProposalBanner/index.d.ts +2 -0
  95. package/dist/components/molecules/PinInput/PinInput.stories.d.ts +13 -0
  96. package/dist/components/molecules/PinInput/PinInput.vue.d.ts +36 -0
  97. package/dist/components/molecules/PinInput/index.d.ts +2 -0
  98. package/dist/components/molecules/ProgressBar/ProgressBar.stories.d.ts +12 -0
  99. package/dist/components/molecules/ProgressBar/ProgressBar.vue.d.ts +24 -0
  100. package/dist/components/molecules/ProgressBar/index.d.ts +2 -0
  101. package/dist/components/molecules/SearchBar/SearchBar.stories.d.ts +11 -0
  102. package/dist/components/molecules/SearchBar/SearchBar.vue.d.ts +30 -0
  103. package/dist/components/molecules/SearchBar/index.d.ts +2 -0
  104. package/dist/components/molecules/SimulationLoading/SimulationLoading.stories.d.ts +10 -0
  105. package/dist/components/molecules/SimulationLoading/SimulationLoading.vue.d.ts +17 -0
  106. package/dist/components/molecules/SimulationLoading/index.d.ts +2 -0
  107. package/dist/components/molecules/StatusBadge/StatusBadge.stories.d.ts +12 -0
  108. package/dist/components/molecules/StatusBadge/StatusBadge.vue.d.ts +38 -0
  109. package/dist/components/molecules/StatusBadge/index.d.ts +2 -0
  110. package/dist/components/molecules/StepperProgress/StepperProgress.stories.d.ts +11 -0
  111. package/dist/components/molecules/StepperProgress/StepperProgress.vue.d.ts +22 -0
  112. package/dist/components/molecules/StepperProgress/index.d.ts +2 -0
  113. package/dist/components/molecules/WelcomeCard/WelcomeCard.stories.d.ts +11 -0
  114. package/dist/components/molecules/WelcomeCard/WelcomeCard.vue.d.ts +33 -0
  115. package/dist/components/molecules/WelcomeCard/index.d.ts +2 -0
  116. package/dist/components/molecules/index.d.ts +23 -0
  117. package/dist/components/organisms/AuthLayout/AuthLayout.stories.d.ts +10 -0
  118. package/dist/components/organisms/AuthLayout/AuthLayout.vue.d.ts +42 -0
  119. package/dist/components/organisms/AuthLayout/index.d.ts +2 -0
  120. package/dist/components/organisms/BottomNavigation/BottomNavigation.stories.d.ts +8 -0
  121. package/dist/components/organisms/BottomNavigation/BottomNavigation.vue.d.ts +38 -0
  122. package/dist/components/organisms/BottomNavigation/index.d.ts +2 -0
  123. package/dist/components/organisms/ConsentForm/ConsentForm.stories.d.ts +9 -0
  124. package/dist/components/organisms/ConsentForm/ConsentForm.vue.d.ts +45 -0
  125. package/dist/components/organisms/ConsentForm/TermModal.vue.d.ts +37 -0
  126. package/dist/components/organisms/ConsentForm/index.d.ts +4 -0
  127. package/dist/components/organisms/ContractCard/ContractCard.stories.d.ts +12 -0
  128. package/dist/components/organisms/ContractCard/ContractCard.vue.d.ts +41 -0
  129. package/dist/components/organisms/ContractCard/index.d.ts +2 -0
  130. package/dist/components/organisms/ContractDetails/ContractDetails.stories.d.ts +9 -0
  131. package/dist/components/organisms/ContractDetails/ContractDetails.vue.d.ts +53 -0
  132. package/dist/components/organisms/ContractDetails/index.d.ts +2 -0
  133. package/dist/components/organisms/CreatePasswordForm/CreatePasswordForm.stories.d.ts +12 -0
  134. package/dist/components/organisms/CreatePasswordForm/CreatePasswordForm.vue.d.ts +52 -0
  135. package/dist/components/organisms/CreatePasswordForm/index.d.ts +2 -0
  136. package/dist/components/organisms/DashboardHeader/DashboardHeader.stories.d.ts +8 -0
  137. package/dist/components/organisms/DashboardHeader/DashboardHeader.vue.d.ts +14 -0
  138. package/dist/components/organisms/DashboardHeader/index.d.ts +2 -0
  139. package/dist/components/organisms/DocumentUploadSection/DocumentUploadSection.stories.d.ts +10 -0
  140. package/dist/components/organisms/DocumentUploadSection/DocumentUploadSection.vue.d.ts +72 -0
  141. package/dist/components/organisms/DocumentUploadSection/index.d.ts +2 -0
  142. package/dist/components/organisms/Footer/Footer.stories.d.ts +10 -0
  143. package/dist/components/organisms/Footer/Footer.vue.d.ts +50 -0
  144. package/dist/components/organisms/Footer/index.d.ts +2 -0
  145. package/dist/components/organisms/ForgotPasswordForm/ForgotPasswordForm.stories.d.ts +12 -0
  146. package/dist/components/organisms/ForgotPasswordForm/ForgotPasswordForm.vue.d.ts +64 -0
  147. package/dist/components/organisms/ForgotPasswordForm/index.d.ts +2 -0
  148. package/dist/components/organisms/Header/Header.stories.d.ts +9 -0
  149. package/dist/components/organisms/Header/Header.vue.d.ts +36 -0
  150. package/dist/components/organisms/Header/index.d.ts +2 -0
  151. package/dist/components/organisms/InstallmentHistory/InstallmentHistory.stories.d.ts +10 -0
  152. package/dist/components/organisms/InstallmentHistory/InstallmentHistory.vue.d.ts +42 -0
  153. package/dist/components/organisms/InstallmentHistory/index.d.ts +2 -0
  154. package/dist/components/organisms/LoginForm/LoginForm.stories.d.ts +10 -0
  155. package/dist/components/organisms/LoginForm/LoginForm.vue.d.ts +51 -0
  156. package/dist/components/organisms/LoginForm/index.d.ts +2 -0
  157. package/dist/components/organisms/ManualInputModal/ManualInputModal.stories.d.ts +9 -0
  158. package/dist/components/organisms/ManualInputModal/ManualInputModal.vue.d.ts +41 -0
  159. package/dist/components/organisms/ManualInputModal/index.d.ts +2 -0
  160. package/dist/components/organisms/OfferCard/OfferCard.stories.d.ts +11 -0
  161. package/dist/components/organisms/OfferCard/OfferCard.vue.d.ts +39 -0
  162. package/dist/components/organisms/OfferCard/index.d.ts +2 -0
  163. package/dist/components/organisms/ProfileForm/ProfileForm.stories.d.ts +10 -0
  164. package/dist/components/organisms/ProfileForm/ProfileForm.vue.d.ts +62 -0
  165. package/dist/components/organisms/ProfileForm/index.d.ts +2 -0
  166. package/dist/components/organisms/QuickActions/QuickActions.stories.d.ts +9 -0
  167. package/dist/components/organisms/QuickActions/QuickActions.vue.d.ts +24 -0
  168. package/dist/components/organisms/QuickActions/index.d.ts +2 -0
  169. package/dist/components/organisms/ResetPasswordForm/ResetPasswordForm.stories.d.ts +12 -0
  170. package/dist/components/organisms/ResetPasswordForm/ResetPasswordForm.vue.d.ts +52 -0
  171. package/dist/components/organisms/ResetPasswordForm/index.d.ts +2 -0
  172. package/dist/components/organisms/SCRConsentModal/SCRConsentModal.stories.d.ts +8 -0
  173. package/dist/components/organisms/SCRConsentModal/SCRConsentModal.vue.d.ts +18 -0
  174. package/dist/components/organisms/SCRConsentModal/index.d.ts +2 -0
  175. package/dist/components/organisms/Sidebar/Sidebar.stories.d.ts +8 -0
  176. package/dist/components/organisms/Sidebar/Sidebar.vue.d.ts +78 -0
  177. package/dist/components/organisms/Sidebar/SidebarItem.vue.d.ts +28 -0
  178. package/dist/components/organisms/Sidebar/index.d.ts +4 -0
  179. package/dist/components/organisms/SimulationResult/SimulationResult.stories.d.ts +11 -0
  180. package/dist/components/organisms/SimulationResult/SimulationResult.vue.d.ts +44 -0
  181. package/dist/components/organisms/SimulationResult/index.d.ts +2 -0
  182. package/dist/components/organisms/TopNavigation/TopNavigation.stories.d.ts +8 -0
  183. package/dist/components/organisms/TopNavigation/TopNavigation.vue.d.ts +48 -0
  184. package/dist/components/organisms/TopNavigation/index.d.ts +2 -0
  185. package/dist/components/organisms/index.d.ts +26 -0
  186. package/dist/components/templates/FormLayout/FormLayout.stories.d.ts +65 -0
  187. package/dist/components/templates/FormLayout/FormLayout.vue.d.ts +84 -0
  188. package/dist/components/templates/FormLayout/index.d.ts +2 -0
  189. package/dist/components/templates/index.d.ts +1 -0
  190. package/dist/composables/index.d.ts +4 -0
  191. package/dist/composables/useTheme.d.ts +66 -0
  192. package/dist/credit-ui.cjs.js +90 -0
  193. package/dist/credit-ui.css +1 -0
  194. package/dist/credit-ui.es.js +8936 -0
  195. package/dist/images/auth-background.jpg +0 -0
  196. package/dist/index.d.ts +20 -0
  197. package/dist/logo.png +0 -0
  198. package/dist/nuxt/index.d.ts +5 -0
  199. package/dist/nuxt/module.d.ts +17 -0
  200. package/dist/nuxt.cjs.js +1 -0
  201. package/dist/nuxt.es.js +31 -0
  202. package/dist/themes/defaults.d.ts +96 -0
  203. package/dist/themes/index.d.ts +8 -0
  204. package/dist/themes/utils.d.ts +35 -0
  205. package/dist/themes.cjs.js +6 -0
  206. package/dist/themes.es.js +163 -0
  207. package/dist/tokens.css +124 -0
  208. package/dist/types/index.d.ts +6 -0
  209. package/dist/types/theme.d.ts +142 -0
  210. package/package.json +75 -0
  211. package/src/nuxt/runtime/composables/useTheme.ts +86 -0
  212. package/src/nuxt/runtime/plugin.server.ts +32 -0
  213. package/src/nuxt/runtime/plugin.ts +22 -0
Binary file
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @thatix.io/credit-ui
3
+ *
4
+ * UI Kit for Thatix credit pipelines with theming support.
5
+ *
6
+ * @example
7
+ * ```ts
8
+ * // Theme utilities
9
+ * import { useTheme, version } from '@thatix.io/credit-ui'
10
+ * import type { ThemeConfig } from '@thatix.io/credit-ui'
11
+ *
12
+ * // Components
13
+ * import { Button, FormField, LoginForm, FormLayout } from '@thatix.io/credit-ui'
14
+ * ```
15
+ */
16
+ export declare const version = "0.0.1";
17
+ export * from './components';
18
+ export { useTheme } from './composables';
19
+ export { mergeTheme, generateCSSString, injectThemeCSS, defaultTokens, defaultColors, defaultFonts, } from './themes';
20
+ export type { CreditUIConfig, ThemeConfig, ThemeColors, ThemeFonts, ThemeTokens, CreditUIModuleOptions, } from './types';
package/dist/logo.png ADDED
Binary file
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Nuxt module entry point
3
+ */
4
+ export { default } from './module';
5
+ export type { ModuleOptions } from './module';
@@ -0,0 +1,17 @@
1
+ import { ThemeConfig } from '../types/theme';
2
+ export interface ModuleOptions {
3
+ /**
4
+ * Theme configuration
5
+ * Override default Giro Crédito theme values
6
+ */
7
+ theme?: ThemeConfig;
8
+ }
9
+ declare const _default: import('@nuxt/schema').NuxtModule<ModuleOptions, ModuleOptions, false>;
10
+ export default _default;
11
+ declare module '@nuxt/schema' {
12
+ interface PublicRuntimeConfig {
13
+ creditUi: {
14
+ theme: ThemeConfig;
15
+ };
16
+ }
17
+ }
@@ -0,0 +1 @@
1
+ "use strict";const e=require("@nuxt/kit");var r=typeof document<"u"?document.currentScript:null;const o=e.defineNuxtModule({meta:{name:"@thatix.io/credit-ui",configKey:"creditUi",compatibility:{nuxt:">=3.0.0"}},defaults:{theme:{}},setup(i,s){const t=e.createResolver(typeof document>"u"?require("url").pathToFileURL(__filename).href:r&&r.tagName.toUpperCase()==="SCRIPT"&&r.src||new URL("nuxt.cjs.js",document.baseURI).href);s.options.runtimeConfig.public.creditUi={theme:i.theme||{}},e.addPlugin({src:t.resolve("./runtime/plugin"),mode:"client"}),e.addPlugin({src:t.resolve("./runtime/plugin.server"),mode:"server"}),e.addImports({name:"useTheme",from:t.resolve("./runtime/composables/useTheme")}),s.options.css.push(t.resolve("../themes/tokens.css"))}});module.exports=o;
@@ -0,0 +1,31 @@
1
+ import { defineNuxtModule as r, createResolver as i, addPlugin as o, addImports as m } from "@nuxt/kit";
2
+ const l = r({
3
+ meta: {
4
+ name: "@thatix.io/credit-ui",
5
+ configKey: "creditUi",
6
+ compatibility: {
7
+ nuxt: ">=3.0.0"
8
+ }
9
+ },
10
+ defaults: {
11
+ theme: {}
12
+ },
13
+ setup(s, t) {
14
+ const e = i(import.meta.url);
15
+ t.options.runtimeConfig.public.creditUi = {
16
+ theme: s.theme || {}
17
+ }, o({
18
+ src: e.resolve("./runtime/plugin"),
19
+ mode: "client"
20
+ }), o({
21
+ src: e.resolve("./runtime/plugin.server"),
22
+ mode: "server"
23
+ }), m({
24
+ name: "useTheme",
25
+ from: e.resolve("./runtime/composables/useTheme")
26
+ }), t.options.css.push(e.resolve("../themes/tokens.css"));
27
+ }
28
+ });
29
+ export {
30
+ l as default
31
+ };
@@ -0,0 +1,96 @@
1
+ import { ThemeTokens, ThemeColors, ThemeFonts } from '../types/theme';
2
+ /**
3
+ * Default color values - Giro Crédito brand
4
+ */
5
+ export declare const defaultColors: Required<ThemeColors>;
6
+ /**
7
+ * Default font families
8
+ */
9
+ export declare const defaultFonts: Required<ThemeFonts>;
10
+ /**
11
+ * Fixed spacing scale (not customizable)
12
+ */
13
+ export declare const spacing: {
14
+ readonly 0: "0";
15
+ readonly 1: "0.25rem";
16
+ readonly 2: "0.5rem";
17
+ readonly 3: "0.75rem";
18
+ readonly 4: "1rem";
19
+ readonly 5: "1.25rem";
20
+ readonly 6: "1.5rem";
21
+ readonly 8: "2rem";
22
+ readonly 10: "2.5rem";
23
+ readonly 12: "3rem";
24
+ readonly 16: "4rem";
25
+ };
26
+ /**
27
+ * Fixed font sizes (not customizable)
28
+ */
29
+ export declare const fontSize: {
30
+ readonly xs: "0.75rem";
31
+ readonly sm: "0.875rem";
32
+ readonly base: "1rem";
33
+ readonly lg: "1.125rem";
34
+ readonly xl: "1.25rem";
35
+ readonly '2xl': "1.5rem";
36
+ readonly '3xl': "1.875rem";
37
+ readonly '4xl': "2.25rem";
38
+ };
39
+ /**
40
+ * Fixed font weights (not customizable)
41
+ */
42
+ export declare const fontWeight: {
43
+ readonly normal: "400";
44
+ readonly medium: "500";
45
+ readonly semibold: "600";
46
+ readonly bold: "700";
47
+ };
48
+ /**
49
+ * Fixed line heights (not customizable)
50
+ */
51
+ export declare const lineHeight: {
52
+ readonly tight: "1.25";
53
+ readonly normal: "1.5";
54
+ readonly relaxed: "1.75";
55
+ };
56
+ /**
57
+ * Fixed border radius (not customizable)
58
+ */
59
+ export declare const radius: {
60
+ readonly none: "0";
61
+ readonly sm: "0.125rem";
62
+ readonly md: "0.375rem";
63
+ readonly lg: "0.5rem";
64
+ readonly xl: "0.75rem";
65
+ readonly '2xl': "1rem";
66
+ readonly full: "9999px";
67
+ };
68
+ /**
69
+ * Fixed shadows (not customizable)
70
+ */
71
+ export declare const shadow: {
72
+ readonly sm: "0 1px 2px 0 rgb(0 0 0 / 0.05)";
73
+ readonly md: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)";
74
+ readonly lg: "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)";
75
+ readonly xl: "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)";
76
+ };
77
+ /**
78
+ * Fixed transitions (not customizable)
79
+ */
80
+ export declare const transition: {
81
+ readonly fast: "150ms";
82
+ readonly normal: "300ms";
83
+ readonly slow: "500ms";
84
+ };
85
+ /**
86
+ * Fixed easing functions (not customizable)
87
+ */
88
+ export declare const easing: {
89
+ readonly default: "cubic-bezier(0.4, 0, 0.2, 1)";
90
+ readonly in: "cubic-bezier(0.4, 0, 1, 1)";
91
+ readonly out: "cubic-bezier(0, 0, 0.2, 1)";
92
+ };
93
+ /**
94
+ * Complete default theme tokens
95
+ */
96
+ export declare const defaultTokens: ThemeTokens;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Themes module entry point
3
+ *
4
+ * Re-exports all theme-related utilities and defaults.
5
+ */
6
+ export { defaultColors, defaultFonts, defaultTokens, spacing, fontSize, fontWeight, lineHeight, radius, shadow, transition, easing, } from './defaults';
7
+ export { mergeTheme, generateColorVariables, generateFontVariables, generateCSSString, generateStyleObject, injectThemeCSS, getCSSVariable, } from './utils';
8
+ export type { ThemeConfig, ThemeColors, ThemeFonts, ThemeTokens } from '../types/theme';
@@ -0,0 +1,35 @@
1
+ import { ThemeConfig, ThemeColors, ThemeFonts, ThemeTokens } from '../types/theme';
2
+ /**
3
+ * Merge user theme config with defaults
4
+ * Only colors and fonts can be customized
5
+ */
6
+ export declare function mergeTheme(config?: ThemeConfig): ThemeTokens;
7
+ /**
8
+ * Generate CSS variables string from theme tokens
9
+ * Only generates variables for colors and fonts (customizable)
10
+ */
11
+ export declare function generateColorVariables(colors: Required<ThemeColors>): string;
12
+ /**
13
+ * Generate font family CSS variables
14
+ */
15
+ export declare function generateFontVariables(fonts: Required<ThemeFonts>): string;
16
+ /**
17
+ * Generate complete CSS string with :root selector
18
+ * Contains only customizable tokens (colors and fonts)
19
+ */
20
+ export declare function generateCSSString(tokens: ThemeTokens): string;
21
+ /**
22
+ * Generate inline style object from theme tokens
23
+ * Useful for SSR or dynamic styling
24
+ */
25
+ export declare function generateStyleObject(tokens: ThemeTokens): Record<string, string>;
26
+ /**
27
+ * Inject theme CSS into document head
28
+ * For client-side use only
29
+ */
30
+ export declare function injectThemeCSS(tokens: ThemeTokens, id?: string): void;
31
+ /**
32
+ * Get CSS variable value from document
33
+ * For client-side use only
34
+ */
35
+ export declare function getCSSVariable(name: string): string;
@@ -0,0 +1,6 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c={primary:"#06012c",primaryDark:"#03011a",primaryLight:"#1a1647",secondary:"#4a4a68",accent:"#ffca46",background:"#ffffff",backgroundAlt:"#f8f9fa",surface:"#ffffff",surfaceAccent:"#f0f1f5",text:"#1a1a2e",textMuted:"#6b7280",textInverse:"#ffffff",error:"#dc2626",warning:"#f59e0b",success:"#10b981",info:"#3b82f6"},i={heading:"'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",base:"'Galano Grotesque', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"},f={0:"0",1:"0.25rem",2:"0.5rem",3:"0.75rem",4:"1rem",5:"1.25rem",6:"1.5rem",8:"2rem",10:"2.5rem",12:"3rem",16:"4rem"},l={xs:"0.75rem",sm:"0.875rem",base:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem"},m={normal:"400",medium:"500",semibold:"600",bold:"700"},u={tight:"1.25",normal:"1.5",relaxed:"1.75"},g={none:"0",sm:"0.125rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem",full:"9999px"},d={sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)"},p={fast:"150ms",normal:"300ms",slow:"500ms"},b={default:"cubic-bezier(0.4, 0, 0.2, 1)",in:"cubic-bezier(0.4, 0, 1, 1)",out:"cubic-bezier(0, 0, 0.2, 1)"},a={colors:c,fonts:i,spacing:f,fontSize:l,fontWeight:m,lineHeight:u,radius:g,shadow:d,transition:p,easing:b};function o(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()}function h(e){return e?{...a,colors:{...c,...e.colors},fonts:{...i,...e.fonts}}:a}function x(e){const t=[];for(const[n,r]of Object.entries(e)){const s=`--color-${o(n)}`;t.push(` ${s}: ${r};`)}return t.join(`
2
+ `)}function y(e){const t=[];for(const[n,r]of Object.entries(e)){const s=`--font-family-${o(n)}`;t.push(` ${s}: ${r};`)}return t.join(`
3
+ `)}function S(e){const t=x(e.colors),n=y(e.fonts);return`:root {
4
+ ${t}
5
+ ${n}
6
+ }`}function C(e){const t={};for(const[n,r]of Object.entries(e.colors))t[`--color-${o(n)}`]=r;for(const[n,r]of Object.entries(e.fonts))t[`--font-family-${o(n)}`]=r;return t}function j(e,t="credit-ui-theme"){if(typeof document>"u")return;const n=document.getElementById(t);n&&n.remove();const r=document.createElement("style");r.id=t,r.textContent=S(e),document.head.appendChild(r)}function V(e){return typeof document>"u"?"":getComputedStyle(document.documentElement).getPropertyValue(e).trim()}exports.defaultColors=c;exports.defaultFonts=i;exports.defaultTokens=a;exports.easing=b;exports.fontSize=l;exports.fontWeight=m;exports.generateCSSString=S;exports.generateColorVariables=x;exports.generateFontVariables=y;exports.generateStyleObject=C;exports.getCSSVariable=V;exports.injectThemeCSS=j;exports.lineHeight=u;exports.mergeTheme=h;exports.radius=g;exports.shadow=d;exports.spacing=f;exports.transition=p;
@@ -0,0 +1,163 @@
1
+ const a = {
2
+ primary: "#06012c",
3
+ primaryDark: "#03011a",
4
+ primaryLight: "#1a1647",
5
+ secondary: "#4a4a68",
6
+ accent: "#ffca46",
7
+ background: "#ffffff",
8
+ backgroundAlt: "#f8f9fa",
9
+ surface: "#ffffff",
10
+ surfaceAccent: "#f0f1f5",
11
+ text: "#1a1a2e",
12
+ textMuted: "#6b7280",
13
+ textInverse: "#ffffff",
14
+ error: "#dc2626",
15
+ warning: "#f59e0b",
16
+ success: "#10b981",
17
+ info: "#3b82f6"
18
+ }, f = {
19
+ heading: "'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
20
+ base: "'Galano Grotesque', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"
21
+ }, m = {
22
+ 0: "0",
23
+ 1: "0.25rem",
24
+ 2: "0.5rem",
25
+ 3: "0.75rem",
26
+ 4: "1rem",
27
+ 5: "1.25rem",
28
+ 6: "1.5rem",
29
+ 8: "2rem",
30
+ 10: "2.5rem",
31
+ 12: "3rem",
32
+ 16: "4rem"
33
+ }, i = {
34
+ xs: "0.75rem",
35
+ sm: "0.875rem",
36
+ base: "1rem",
37
+ lg: "1.125rem",
38
+ xl: "1.25rem",
39
+ "2xl": "1.5rem",
40
+ "3xl": "1.875rem",
41
+ "4xl": "2.25rem"
42
+ }, l = {
43
+ normal: "400",
44
+ medium: "500",
45
+ semibold: "600",
46
+ bold: "700"
47
+ }, u = {
48
+ tight: "1.25",
49
+ normal: "1.5",
50
+ relaxed: "1.75"
51
+ }, p = {
52
+ none: "0",
53
+ sm: "0.125rem",
54
+ md: "0.375rem",
55
+ lg: "0.5rem",
56
+ xl: "0.75rem",
57
+ "2xl": "1rem",
58
+ full: "9999px"
59
+ }, x = {
60
+ sm: "0 1px 2px 0 rgb(0 0 0 / 0.05)",
61
+ md: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",
62
+ lg: "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",
63
+ xl: "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)"
64
+ }, d = {
65
+ fast: "150ms",
66
+ normal: "300ms",
67
+ slow: "500ms"
68
+ }, b = {
69
+ default: "cubic-bezier(0.4, 0, 0.2, 1)",
70
+ in: "cubic-bezier(0.4, 0, 1, 1)",
71
+ out: "cubic-bezier(0, 0, 0.2, 1)"
72
+ }, c = {
73
+ colors: a,
74
+ fonts: f,
75
+ spacing: m,
76
+ fontSize: i,
77
+ fontWeight: l,
78
+ lineHeight: u,
79
+ radius: p,
80
+ shadow: x,
81
+ transition: d,
82
+ easing: b
83
+ };
84
+ function o(e) {
85
+ return e.replace(/([A-Z])/g, "-$1").toLowerCase();
86
+ }
87
+ function h(e) {
88
+ return e ? {
89
+ ...c,
90
+ colors: {
91
+ ...a,
92
+ ...e.colors
93
+ },
94
+ fonts: {
95
+ ...f,
96
+ ...e.fonts
97
+ }
98
+ } : c;
99
+ }
100
+ function g(e) {
101
+ const t = [];
102
+ for (const [n, r] of Object.entries(e)) {
103
+ const s = `--color-${o(n)}`;
104
+ t.push(` ${s}: ${r};`);
105
+ }
106
+ return t.join(`
107
+ `);
108
+ }
109
+ function y(e) {
110
+ const t = [];
111
+ for (const [n, r] of Object.entries(e)) {
112
+ const s = `--font-family-${o(n)}`;
113
+ t.push(` ${s}: ${r};`);
114
+ }
115
+ return t.join(`
116
+ `);
117
+ }
118
+ function S(e) {
119
+ const t = g(e.colors), n = y(e.fonts);
120
+ return `:root {
121
+ ${t}
122
+ ${n}
123
+ }`;
124
+ }
125
+ function $(e) {
126
+ const t = {};
127
+ for (const [n, r] of Object.entries(e.colors))
128
+ t[`--color-${o(n)}`] = r;
129
+ for (const [n, r] of Object.entries(e.fonts))
130
+ t[`--font-family-${o(n)}`] = r;
131
+ return t;
132
+ }
133
+ function C(e, t = "credit-ui-theme") {
134
+ if (typeof document > "u")
135
+ return;
136
+ const n = document.getElementById(t);
137
+ n && n.remove();
138
+ const r = document.createElement("style");
139
+ r.id = t, r.textContent = S(e), document.head.appendChild(r);
140
+ }
141
+ function j(e) {
142
+ return typeof document > "u" ? "" : getComputedStyle(document.documentElement).getPropertyValue(e).trim();
143
+ }
144
+ export {
145
+ a as defaultColors,
146
+ f as defaultFonts,
147
+ c as defaultTokens,
148
+ b as easing,
149
+ i as fontSize,
150
+ l as fontWeight,
151
+ S as generateCSSString,
152
+ g as generateColorVariables,
153
+ y as generateFontVariables,
154
+ $ as generateStyleObject,
155
+ j as getCSSVariable,
156
+ C as injectThemeCSS,
157
+ u as lineHeight,
158
+ h as mergeTheme,
159
+ p as radius,
160
+ x as shadow,
161
+ m as spacing,
162
+ d as transition
163
+ };
@@ -0,0 +1,124 @@
1
+ /**
2
+ * @thatix.io/credit-ui - Design Tokens
3
+ *
4
+ * CSS Variables for the theming system.
5
+ * Default values are from Giro Crédito brand.
6
+ *
7
+ * Naming convention: --{category}-{variant}[-{modifier}]
8
+ */
9
+
10
+ :root {
11
+ /* ===========================================
12
+ * COLORS
13
+ * =========================================== */
14
+
15
+ /* Primary - Azul escuro Giro Crédito */
16
+ --color-primary: #06012c;
17
+ --color-primary-dark: #03011a;
18
+ --color-primary-light: #1a1647;
19
+
20
+ /* Secondary */
21
+ --color-secondary: #4a4a68;
22
+
23
+ /* Accent - Amarelo Giro Crédito */
24
+ --color-accent: #ffca46;
25
+
26
+ /* Background */
27
+ --color-background: #ffffff;
28
+ --color-background-alt: #f8f9fa;
29
+
30
+ /* Surface */
31
+ --color-surface: #ffffff;
32
+ --color-surface-accent: #f0f1f5;
33
+
34
+ /* Text */
35
+ --color-text: #1a1a2e;
36
+ --color-text-muted: #6b7280;
37
+ --color-text-inverse: #ffffff;
38
+
39
+ /* Semantic */
40
+ --color-error: #dc2626;
41
+ --color-warning: #f59e0b;
42
+ --color-success: #10b981;
43
+ --color-info: #3b82f6;
44
+
45
+ /* ===========================================
46
+ * TYPOGRAPHY
47
+ * =========================================== */
48
+
49
+ /* Font Families */
50
+ --font-family-heading: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
51
+ --font-family-base: 'Galano Grotesque', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
52
+
53
+ /* Font Sizes */
54
+ --font-size-xs: 0.75rem; /* 12px */
55
+ --font-size-sm: 0.875rem; /* 14px */
56
+ --font-size-base: 1rem; /* 16px */
57
+ --font-size-lg: 1.125rem; /* 18px */
58
+ --font-size-xl: 1.25rem; /* 20px */
59
+ --font-size-2xl: 1.5rem; /* 24px */
60
+ --font-size-3xl: 1.875rem; /* 30px */
61
+ --font-size-4xl: 2.25rem; /* 36px */
62
+
63
+ /* Font Weights */
64
+ --font-weight-normal: 400;
65
+ --font-weight-medium: 500;
66
+ --font-weight-semibold: 600;
67
+ --font-weight-bold: 700;
68
+
69
+ /* Line Heights */
70
+ --line-height-tight: 1.25;
71
+ --line-height-normal: 1.5;
72
+ --line-height-relaxed: 1.75;
73
+
74
+ /* ===========================================
75
+ * SPACING
76
+ * Based on 4px scale
77
+ * =========================================== */
78
+
79
+ --spacing-0: 0;
80
+ --spacing-1: 0.25rem; /* 4px */
81
+ --spacing-2: 0.5rem; /* 8px */
82
+ --spacing-3: 0.75rem; /* 12px */
83
+ --spacing-4: 1rem; /* 16px */
84
+ --spacing-5: 1.25rem; /* 20px */
85
+ --spacing-6: 1.5rem; /* 24px */
86
+ --spacing-8: 2rem; /* 32px */
87
+ --spacing-10: 2.5rem; /* 40px */
88
+ --spacing-12: 3rem; /* 48px */
89
+ --spacing-16: 4rem; /* 64px */
90
+
91
+ /* ===========================================
92
+ * BORDER RADIUS
93
+ * =========================================== */
94
+
95
+ --radius-none: 0;
96
+ --radius-sm: 0.125rem; /* 2px */
97
+ --radius-md: 0.375rem; /* 6px */
98
+ --radius-lg: 0.5rem; /* 8px */
99
+ --radius-xl: 0.75rem; /* 12px */
100
+ --radius-2xl: 1rem; /* 16px */
101
+ --radius-full: 9999px;
102
+
103
+ /* ===========================================
104
+ * SHADOWS
105
+ * =========================================== */
106
+
107
+ --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
108
+ --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
109
+ --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
110
+ --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
111
+
112
+ /* ===========================================
113
+ * TRANSITIONS
114
+ * =========================================== */
115
+
116
+ --transition-fast: 150ms;
117
+ --transition-normal: 300ms;
118
+ --transition-slow: 500ms;
119
+
120
+ /* Easing */
121
+ --easing-default: cubic-bezier(0.4, 0, 0.2, 1);
122
+ --easing-in: cubic-bezier(0.4, 0, 1, 1);
123
+ --easing-out: cubic-bezier(0, 0, 0.2, 1);
124
+ }
@@ -0,0 +1,6 @@
1
+ import { ThemeConfig } from './theme';
2
+ export type { ThemeColors, ThemeFonts, ThemeConfig, ThemeTokens, CreditUIModuleOptions, CSSVariableName, } from './theme';
3
+ export interface CreditUIConfig {
4
+ theme?: ThemeConfig;
5
+ }
6
+ export type { ThemeConfig as CreditUIThemeConfig } from './theme';
@@ -0,0 +1,142 @@
1
+ /**
2
+ * Theme Types for @thatix.io/credit-ui
3
+ *
4
+ * Define interfaces for theme configuration and tokens.
5
+ * Colors and fonts are customizable; spacing, radius, shadows are fixed.
6
+ */
7
+ /**
8
+ * Theme color tokens
9
+ * All values should be valid CSS color strings (hex, rgb, hsl, etc.)
10
+ */
11
+ export interface ThemeColors {
12
+ /** Primary brand color */
13
+ primary?: string;
14
+ /** Darker variant of primary */
15
+ primaryDark?: string;
16
+ /** Lighter variant of primary */
17
+ primaryLight?: string;
18
+ /** Secondary brand color */
19
+ secondary?: string;
20
+ /** Accent color for highlights and CTAs */
21
+ accent?: string;
22
+ /** Main background color */
23
+ background?: string;
24
+ /** Alternative background color */
25
+ backgroundAlt?: string;
26
+ /** Surface color (cards, modals) */
27
+ surface?: string;
28
+ /** Accented surface color */
29
+ surfaceAccent?: string;
30
+ /** Main text color */
31
+ text?: string;
32
+ /** Muted/secondary text color */
33
+ textMuted?: string;
34
+ /** Text color for dark backgrounds */
35
+ textInverse?: string;
36
+ /** Error/danger color */
37
+ error?: string;
38
+ /** Warning color */
39
+ warning?: string;
40
+ /** Success color */
41
+ success?: string;
42
+ /** Info color */
43
+ info?: string;
44
+ }
45
+ /**
46
+ * Theme font tokens
47
+ * Values should be CSS font-family strings
48
+ */
49
+ export interface ThemeFonts {
50
+ /** Font family for headings */
51
+ heading?: string;
52
+ /** Font family for body text */
53
+ base?: string;
54
+ }
55
+ /**
56
+ * User-facing theme configuration
57
+ * Only colors and fonts are customizable
58
+ */
59
+ export interface ThemeConfig {
60
+ /** Color overrides */
61
+ colors?: ThemeColors;
62
+ /** Font family overrides */
63
+ fonts?: ThemeFonts;
64
+ }
65
+ /**
66
+ * Complete theme tokens including fixed values
67
+ * Used internally by the theme system
68
+ */
69
+ export interface ThemeTokens {
70
+ colors: Required<ThemeColors>;
71
+ fonts: Required<ThemeFonts>;
72
+ spacing: {
73
+ 0: string;
74
+ 1: string;
75
+ 2: string;
76
+ 3: string;
77
+ 4: string;
78
+ 5: string;
79
+ 6: string;
80
+ 8: string;
81
+ 10: string;
82
+ 12: string;
83
+ 16: string;
84
+ };
85
+ fontSize: {
86
+ xs: string;
87
+ sm: string;
88
+ base: string;
89
+ lg: string;
90
+ xl: string;
91
+ '2xl': string;
92
+ '3xl': string;
93
+ '4xl': string;
94
+ };
95
+ fontWeight: {
96
+ normal: string;
97
+ medium: string;
98
+ semibold: string;
99
+ bold: string;
100
+ };
101
+ lineHeight: {
102
+ tight: string;
103
+ normal: string;
104
+ relaxed: string;
105
+ };
106
+ radius: {
107
+ none: string;
108
+ sm: string;
109
+ md: string;
110
+ lg: string;
111
+ xl: string;
112
+ '2xl': string;
113
+ full: string;
114
+ };
115
+ shadow: {
116
+ sm: string;
117
+ md: string;
118
+ lg: string;
119
+ xl: string;
120
+ };
121
+ transition: {
122
+ fast: string;
123
+ normal: string;
124
+ slow: string;
125
+ };
126
+ easing: {
127
+ default: string;
128
+ in: string;
129
+ out: string;
130
+ };
131
+ }
132
+ /**
133
+ * Module options for Nuxt configuration
134
+ */
135
+ export interface CreditUIModuleOptions {
136
+ /** Theme configuration */
137
+ theme?: ThemeConfig;
138
+ }
139
+ /**
140
+ * Type helper for CSS variable names
141
+ */
142
+ export type CSSVariableName = `--color-${keyof ThemeColors}` | `--font-family-${keyof ThemeFonts}` | `--spacing-${keyof ThemeTokens['spacing']}` | `--font-size-${keyof ThemeTokens['fontSize']}` | `--font-weight-${keyof ThemeTokens['fontWeight']}` | `--line-height-${keyof ThemeTokens['lineHeight']}` | `--radius-${keyof ThemeTokens['radius']}` | `--shadow-${keyof ThemeTokens['shadow']}` | `--transition-${keyof ThemeTokens['transition']}` | `--easing-${keyof ThemeTokens['easing']}`;