@sixbell-telco/sdk 1.5.0 → 2.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 (131) hide show
  1. package/CHANGELOG.md +223 -710
  2. package/README.md +307 -282
  3. package/_index.css +29 -3
  4. package/components/audio-player/audio-timeline/audio-timeline.component.d.ts +1 -1
  5. package/components/audio-player/services/audio.service.d.ts +14 -14
  6. package/components/countdown/src/countdown.component.d.ts +1 -1
  7. package/components/dropdown/dropdown-chevron/dropdown-chevron.component.d.ts +6 -1
  8. package/components/dropdown/dropdown-content/dropdown-content.component.d.ts +1 -1
  9. package/components/dropdown/dropdown-item/dropdown-item.component.d.ts +6 -1
  10. package/components/dropdown/dropdown-item-checkbox/dropdown-item-checkbox.component.d.ts +7 -1
  11. package/components/dropdown/dropdown-item-radio/dropdown-item-radio.component.d.ts +7 -1
  12. package/components/dropdown/dropdown-trigger/dropdown-trigger.component.d.ts +30 -0
  13. package/components/dropdown/public-api.d.ts +0 -1
  14. package/components/dropdown/src/dropdown.component.d.ts +31 -7
  15. package/components/dropdown-menu/src/dropdown-menu-content/dropdown-menu-content.component.d.ts +2 -3
  16. package/components/dual-list/src/dual-list.component.d.ts +2 -1
  17. package/components/file-upload/file-dropzone/file-dropzone.component.d.ts +7 -7
  18. package/components/file-upload/file-uploader/file-uploader.component.d.ts +7 -7
  19. package/components/forms/combobox/src/combobox.component.d.ts +24 -0
  20. package/components/forms/input/src/input.component.d.ts +11 -1
  21. package/components/forms/select/src/select.component.d.ts +24 -0
  22. package/components/forms/textarea/src/textarea.component.d.ts +10 -10
  23. package/components/link/src/link.component.d.ts +0 -3
  24. package/components/tab/directives/tab-content/tab-content.directive.d.ts +3 -3
  25. package/components/tab/directives/tab-header/tab-header.directive.d.ts +2 -2
  26. package/components/wizard/services/wizard.service.d.ts +5 -5
  27. package/directives/auto-focus/public-api.d.ts +1 -1
  28. package/directives/auto-focus/src/{autofocus.directive.d.ts → auto-focus.directive.d.ts} +5 -7
  29. package/directives/only-numbers/public-api.d.ts +6 -1
  30. package/directives/only-numbers/src/only-numbers.directive.d.ts +37 -0
  31. package/fesm2022/sixbell-telco-sdk-components-audio-player.mjs +7 -5
  32. package/fesm2022/sixbell-telco-sdk-components-audio-player.mjs.map +1 -1
  33. package/fesm2022/sixbell-telco-sdk-components-avatar.mjs +1 -1
  34. package/fesm2022/sixbell-telco-sdk-components-avatar.mjs.map +1 -1
  35. package/fesm2022/sixbell-telco-sdk-components-badge.mjs +2 -2
  36. package/fesm2022/sixbell-telco-sdk-components-badge.mjs.map +1 -1
  37. package/fesm2022/sixbell-telco-sdk-components-countdown.mjs.map +1 -1
  38. package/fesm2022/sixbell-telco-sdk-components-data-table.mjs +2 -2
  39. package/fesm2022/sixbell-telco-sdk-components-data-table.mjs.map +1 -1
  40. package/fesm2022/sixbell-telco-sdk-components-dropdown-menu.mjs +0 -4
  41. package/fesm2022/sixbell-telco-sdk-components-dropdown-menu.mjs.map +1 -1
  42. package/fesm2022/sixbell-telco-sdk-components-dropdown.mjs +472 -341
  43. package/fesm2022/sixbell-telco-sdk-components-dropdown.mjs.map +1 -1
  44. package/fesm2022/sixbell-telco-sdk-components-dual-list.mjs +8 -7
  45. package/fesm2022/sixbell-telco-sdk-components-dual-list.mjs.map +1 -1
  46. package/fesm2022/sixbell-telco-sdk-components-file-upload.mjs +6 -4
  47. package/fesm2022/sixbell-telco-sdk-components-file-upload.mjs.map +1 -1
  48. package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs +58 -2
  49. package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs.map +1 -1
  50. package/fesm2022/sixbell-telco-sdk-components-forms-date-picker.mjs +2 -0
  51. package/fesm2022/sixbell-telco-sdk-components-forms-date-picker.mjs.map +1 -1
  52. package/fesm2022/sixbell-telco-sdk-components-forms-input.mjs +15 -5
  53. package/fesm2022/sixbell-telco-sdk-components-forms-input.mjs.map +1 -1
  54. package/fesm2022/sixbell-telco-sdk-components-forms-select.mjs +54 -4
  55. package/fesm2022/sixbell-telco-sdk-components-forms-select.mjs.map +1 -1
  56. package/fesm2022/sixbell-telco-sdk-components-forms-textarea.mjs +19 -8
  57. package/fesm2022/sixbell-telco-sdk-components-forms-textarea.mjs.map +1 -1
  58. package/fesm2022/sixbell-telco-sdk-components-link.mjs +2 -7
  59. package/fesm2022/sixbell-telco-sdk-components-link.mjs.map +1 -1
  60. package/fesm2022/sixbell-telco-sdk-components-overlay.mjs +2 -2
  61. package/fesm2022/sixbell-telco-sdk-components-overlay.mjs.map +1 -1
  62. package/fesm2022/sixbell-telco-sdk-components-tab.mjs.map +1 -1
  63. package/fesm2022/sixbell-telco-sdk-components-wizard.mjs.map +1 -1
  64. package/fesm2022/sixbell-telco-sdk-directives-auto-focus.mjs +14 -31
  65. package/fesm2022/sixbell-telco-sdk-directives-auto-focus.mjs.map +1 -1
  66. package/fesm2022/sixbell-telco-sdk-directives-only-numbers.mjs +42 -8
  67. package/fesm2022/sixbell-telco-sdk-directives-only-numbers.mjs.map +1 -1
  68. package/fesm2022/sixbell-telco-sdk-utils-date.mjs +1 -1
  69. package/fesm2022/sixbell-telco-sdk-utils-date.mjs.map +1 -1
  70. package/fesm2022/sixbell-telco-sdk-utils-pipes-to-bytes-extesion.mjs +1 -1
  71. package/fesm2022/sixbell-telco-sdk-utils-pipes-to-bytes-extesion.mjs.map +1 -1
  72. package/fesm2022/sixbell-telco-sdk-utils-runtime-config.mjs +339 -0
  73. package/fesm2022/sixbell-telco-sdk-utils-runtime-config.mjs.map +1 -0
  74. package/fesm2022/sixbell-telco-sdk-utils-sync.mjs +1 -1
  75. package/fesm2022/sixbell-telco-sdk-utils-sync.mjs.map +1 -1
  76. package/fesm2022/sixbell-telco-sdk-utils-theme.mjs +1053 -716
  77. package/fesm2022/sixbell-telco-sdk-utils-theme.mjs.map +1 -1
  78. package/fesm2022/sixbell-telco-sdk-utils-translation.mjs +345 -257
  79. package/fesm2022/sixbell-telco-sdk-utils-translation.mjs.map +1 -1
  80. package/package.json +73 -72
  81. package/utils/runtime-config/README.md +235 -0
  82. package/utils/{resource-loader → runtime-config}/index.d.ts +1 -1
  83. package/utils/runtime-config/public-api.d.ts +5 -0
  84. package/utils/runtime-config/src/http-client.d.ts +11 -0
  85. package/utils/runtime-config/src/runtime-config-loader.d.ts +23 -0
  86. package/utils/runtime-config/src/runtime-config-store.d.ts +11 -0
  87. package/utils/runtime-config/src/runtime-update-adapter.d.ts +15 -0
  88. package/utils/runtime-config/src/types.d.ts +66 -0
  89. package/utils/theme/README.md +324 -986
  90. package/utils/theme/public-api.d.ts +4 -4
  91. package/utils/theme/src/constants.d.ts +6 -12
  92. package/utils/theme/src/models/theme.d.ts +46 -173
  93. package/utils/theme/src/providers/theme.provider.d.ts +0 -10
  94. package/utils/theme/src/providers/theme.provider.types.d.ts +16 -15
  95. package/utils/theme/src/theme-assets/theme-assets.service.d.ts +16 -12
  96. package/utils/theme/src/theme-dom/theme-dom.service.d.ts +8 -0
  97. package/utils/theme/src/theme.service.d.ts +24 -27
  98. package/utils/theme/src/utils/utils.d.ts +2 -10
  99. package/utils/translation/README.md +170 -1390
  100. package/utils/translation/public-api.d.ts +3 -3
  101. package/utils/translation/src/constants.d.ts +7 -9
  102. package/utils/translation/src/models/translation.d.ts +9 -10
  103. package/utils/translation/src/providers/translation.provider.d.ts +17 -28
  104. package/utils/translation/src/providers/translation.provider.types.d.ts +13 -6
  105. package/utils/translation/src/translation.service.d.ts +37 -9
  106. package/components/dropdown/src/services/dropdown.service.d.ts +0 -22
  107. package/directives/only-numbers/src/just-numbers.directive.d.ts +0 -9
  108. package/fesm2022/sixbell-telco-sdk-utils-resource-loader.mjs +0 -1222
  109. package/fesm2022/sixbell-telco-sdk-utils-resource-loader.mjs.map +0 -1
  110. package/utils/resource-loader/README.md +0 -460
  111. package/utils/resource-loader/public-api.d.ts +0 -1
  112. package/utils/resource-loader/src/cache/index.d.ts +0 -2
  113. package/utils/resource-loader/src/cache/layers/factory.d.ts +0 -38
  114. package/utils/resource-loader/src/cache/layers/index.d.ts +0 -3
  115. package/utils/resource-loader/src/cache/layers/indexed-db-cache.d.ts +0 -118
  116. package/utils/resource-loader/src/cache/layers/local-storage-cache.d.ts +0 -86
  117. package/utils/resource-loader/src/cache/layers/memory-cache.d.ts +0 -76
  118. package/utils/resource-loader/src/cache/types.d.ts +0 -107
  119. package/utils/resource-loader/src/config/index.d.ts +0 -1
  120. package/utils/resource-loader/src/config/load-config.d.ts +0 -32
  121. package/utils/resource-loader/src/constants.d.ts +0 -38
  122. package/utils/resource-loader/src/http/index.d.ts +0 -1
  123. package/utils/resource-loader/src/http/retryable-client.d.ts +0 -43
  124. package/utils/resource-loader/src/index.d.ts +0 -1
  125. package/utils/resource-loader/src/resource-loader.d.ts +0 -67
  126. package/utils/resource-loader/src/types.d.ts +0 -152
  127. package/utils/resource-loader/src/utils/cache-validator.d.ts +0 -72
  128. package/utils/resource-loader/src/utils/helpers.d.ts +0 -15
  129. package/utils/resource-loader/src/utils/index.d.ts +0 -2
  130. package/utils/theme/src/providers/constants.d.ts +0 -7
  131. package/utils/translation/src/providers/constants.d.ts +0 -11
package/README.md CHANGED
@@ -1,104 +1,103 @@
1
- # Sixbell Telco SDK
1
+ # Sixbell Telco SDK - Component Library
2
2
 
3
- We are thrilled to have you here. This SDK is designed to provide you with a comprehensive set of UI components and utils to accelerate your development process. Whether you are building a small project or a large-scale application, our components are crafted to be flexible, customizable, and easy to integrate.
3
+ Welcome to the Sixbell Telco SDK component library. This is a comprehensive Angular component library featuring 25+ pre-built, production-ready UI components built with Angular 19, Tailwind CSS v4, and DaisyUI.
4
4
 
5
- Explore the documentation, try out the examples, and start building amazing applications with Sixbell Telco SDK today!
5
+ ## Overview
6
6
 
7
- Happy coding!
7
+ The SDK provides:
8
8
 
9
- [![sixbell-telco-sdk-banner](https://i.postimg.cc/QNQ1CphY/banner.png)](https://postimg.cc/0rNbHK67)
9
+ - **25+ Production-Ready Components**: Button, Card, Form inputs, Data Table, Dialog, Dropdown, and more
10
+ - **Utility Services**: Theme management, i18n translation, logging, and resource loading
11
+ - **Directive Support**: Auto-focus, click-outside, form validation directives
12
+ - **Tailwind CSS v4 + DaisyUI**: Modern styling with customizable themes
13
+ - **Multi-Entry Point Architecture**: Granular imports for optimized bundle sizes
14
+ - **Angular 19 Signal-Based**: Modern reactive patterns with Angular signals
10
15
 
11
16
  ## Pre-requirements
12
17
 
13
- - Angular 19.2.X or later
18
+ - **Node.js**: ^18.19.1 || ^20.11.1 || ^22.0.0
19
+ - **npm**: 9.6.7 || ^10.0.0 || ^11.0.0
20
+ - **Angular**: 19.2.x or later
21
+ - **Tailwind CSS**: v4.x
14
22
 
15
23
  ## Available Components
16
24
 
17
- ### General components
18
-
19
- | Component | Description | Documentation |
20
- | -------------- | ---------------------------------------------------------- | ------------- |
21
- | Accordion | Expandable/collapsible content | Coming soon |
22
- | Accordion Item | Item within an accordion | Coming soon |
23
- | Audio Player | Audio playback with track controls | Coming soon |
24
- | Avatar | User avatar display | Coming soon |
25
- | Button | Buttons for various actions | Coming soon |
26
- | Card | Container for content and actions | Coming soon |
27
- | Countdown | Countdown timer | Coming soon |
28
- | Data Table | Advanced data grid: sorting, filtering, pagination, expand | Coming soon |
29
- | Dialog | Dialog component | Coming soon |
30
- | Dropdown | Dropdown menu for actions or links | Coming soon |
31
- | Dropdown Menu | Advanced dropdown menu system | Coming soon |
32
- | Dual List | Dual list for selecting items | Coming soon |
33
- | File Uploader | Upload files | Coming soon |
34
- | File Dropzone | Drag and drop file upload | Coming soon |
35
- | Icon | Display icons | Coming soon |
36
- | Link | Hyperlink component | Coming soon |
37
- | Notification | Display notifications | Coming soon |
38
- | Overlay | Generic overlay with trigger/content & width sync | Coming soon |
39
- | Paginator | Pagination controls | Coming soon |
40
- | Product Card | Display product information | Coming soon |
41
- | Progress | Progress bar | Coming soon |
42
- | Tab | Tabbed navigation | Coming soon |
43
- | Table | Display basic tabular data | Coming soon |
44
- | Toast | Toast notifications | Coming soon |
45
- | Tooltip | Display tooltips | Coming soon |
46
- | Wizard | Step-by-step wizard | Coming soon |
47
-
48
- ### Forms specific components
49
-
50
- | Component | Description | Documentation |
51
- | ---------- | -------------------------------------------------- | ------------- |
52
- | Checkbox | Checkbox input | Coming soon |
53
- | Combobox | Combo box for selecting options | Coming soon |
54
- | Datepicker | Date selection input (single & range with overlay) | Coming soon |
55
- | Form Error | Display form errors | Coming soon |
56
- | Input | Text input field | Coming soon |
57
- | Radio | Radio button input | Coming soon |
58
- | Range | Range slider input | Coming soon |
59
- | Select | Dropdown select input | Coming soon |
60
- | Switch | Toggle switch input | Coming soon |
61
- | Textarea | Multi-line text input | Coming soon |
62
- | Toggle | Toggle button input | Coming soon |
63
-
64
- ### Services
65
-
66
- | Service | Description | Documentation |
67
- | ------------------- | -------------------------------------------------------------------------------- | ----------------------------------------- |
68
- | Logger Service | Comprehensive logging with theme-aware styling, IndexedDB persistence | [README](utils/logger/README.md) |
69
- | Theme Service | Runtime theme management with multi-tenant support and automatic persistence | [README](utils/theme/README.md) |
70
- | Translation Service | Runtime i18n with ngx-translate integration, multi-language support, persistence | [README](utils/translation/README.md) |
71
- | Resource Loader | Intelligent resource loading with multi-layer caching and fallback support | [README](utils/resource-loader/README.md) |
72
-
73
- ## Setup
74
-
75
- ### Quick Setup (Recommended)
76
-
77
- We provide a CLI tool for automatic setup:
25
+ ### General Components
26
+
27
+ | Component | Description |
28
+ | ------------- | ------------------------------------------------- |
29
+ | Accordion | Expandable/collapsible content sections |
30
+ | Avatar | User profile pictures with initials fallback |
31
+ | Badge | Status and label indicators |
32
+ | Button | Interactive buttons with variants and sizes |
33
+ | Card | Container for content with actions |
34
+ | Countdown | Countdown timer with customizable formatting |
35
+ | Data Table | Advanced grid with sorting, filtering, pagination |
36
+ | Dialog | Modal dialogs with animations and positioning |
37
+ | Dropdown | Menu dropdown for actions and links |
38
+ | Dropdown Menu | Advanced nested menu system |
39
+ | Dual List | Dual list selection for managing items |
40
+ | File Dropzone | Drag-and-drop file upload with validation |
41
+ | File Uploader | File input with validation and preview |
42
+ | Icon | SVG icon component with ng-icons integration |
43
+ | Link | Hyperlink component with router support |
44
+ | Modal | Modal dialogs (legacy - use Dialog instead) |
45
+ | Notification | Toast-style notifications |
46
+ | Overlay | Generic overlay with trigger and content |
47
+ | Paginator | Pagination controls for data |
48
+ | Product Card | Product display card with image and actions |
49
+ | Progress | Progress bar with variants |
50
+ | Sonner Toast | Modern toast notifications via ngx-sonner |
51
+ | Tab | Tabbed navigation interface |
52
+ | Table | Basic table for displaying data |
53
+ | Tooltip | Floating tooltip with positioning |
54
+ | Wizard | Multi-step wizard with validation |
55
+
56
+ ### Form Components
57
+
58
+ | Component | Description |
59
+ | ---------- | ----------------------------------------------- |
60
+ | Checkbox | Checkbox input with multiple variants |
61
+ | Combobox | Searchable dropdown with multi-select support |
62
+ | Datepicker | Single and range date selection with time |
63
+ | Form Error | Error message display for form fields |
64
+ | Input | Text input with variants, icons, and validation |
65
+ | Radio | Radio button group selection |
66
+ | Range | Slider input for numeric ranges |
67
+ | Select | Dropdown select with object support |
68
+ | Switch | Toggle switch for boolean values |
69
+ | Textarea | Multi-line text input with character count |
70
+ | Toggle | Toggle button for boolean states |
71
+
72
+ ### Utility Services
73
+
74
+ | Service | Purpose | Documentation |
75
+ | ------------------- | -------------------------------------------------- | ------------------------------- |
76
+ | Logger Service | Theme-aware logging with IndexedDB persistence | [README](utils/logger/) |
77
+ | Theme Service | Runtime theme management with multi-tenant support | [README](utils/theme/) |
78
+ | Translation Service | Multi-language i18n with ngx-translate integration | [README](utils/translation/) |
79
+ | Runtime Config | Last-known-good runtime config loader | [README](utils/runtime-config/) |
80
+
81
+ ### Directives
82
+
83
+ | Directive | Purpose |
84
+ | ------------- | ---------------------------------------- |
85
+ | auto-focus | Auto-focus elements when visible |
86
+ | click-outside | Detect clicks outside an element |
87
+ | only-numbers | Restrict input to numeric values only |
88
+ | typography | Apply typography styles to text elements |
89
+
90
+ ## Installation
91
+
92
+ ### Step 1: Install Dependencies
78
93
 
79
94
  ```bash
80
- npx @sixbell-telco/cli init
95
+ npm install @sixbell-telco/sdk @tailwindcss/typography daisyui @midudev/tailwind-animations
81
96
  ```
82
97
 
83
- This will automatically:
98
+ ### Step 2: Import SDK Styles
84
99
 
85
- - Install all necessary dependencies
86
- - Configure Tailwind CSS and Daisy UI
87
- - Set up required theme configurations
88
-
89
- > **Note:** The CLI tool is currently a work in progress and is not yet available. Coming soon!
90
-
91
- ### Manual Setup
92
-
93
- 1. Install dependencies:
94
-
95
- ```bash
96
- npm i -D @sixbell-telco/sdk @tailwindcss/typography daisyui @midudev/tailwind-animations
97
- ```
98
-
99
- 2. Configure Tailwind CSS ([Tailwind guide](https://tailwindcss.com/docs/guides/angular))
100
-
101
- 3. Add the provided configuration to global stylesheet where you configured tailwind [See detailed config below]
100
+ In your global `styles.css`:
102
101
 
103
102
  ```css
104
103
  @import '../node_modules/@sixbell-telco/sdk/_index.css';
@@ -108,49 +107,36 @@ npm i -D @sixbell-telco/sdk @tailwindcss/typography daisyui @midudev/tailwind-an
108
107
  @source '../src';
109
108
  ```
110
109
 
111
- > **⚠️ IMPORTANT**: Make sure to import the `_index.css` before the tailwind import.
112
-
113
- > **⚠️ IMPORTANT**: The `@source` decorator indicates where tailwind should look for classes.
114
-
115
- With that configuration the library custom CSS will be loaded
110
+ > ⚠️ **Important**: Import `_index.css` **before** the tailwind import.
116
111
 
117
- 4. **Microfrontend Configuration (Required for Microfrontends Only)**
112
+ ### Step 3: Configure Microfrontend (if applicable)
118
113
 
119
- Add the following path mapping to your `tsconfig.json` file under `compilerOptions.paths`:
120
-
121
- ```json
122
- "@sixbell-telco/sdk/*": ["./node_modules/@sixbell-telco/sdk/*"]
123
- ```
124
-
125
- Complete example of a `tsconfig.json`:
114
+ Add path mapping to `tsconfig.json`:
126
115
 
127
116
  ```json
128
117
  {
129
- "compileOnSave": false,
130
118
  "compilerOptions": {
131
119
  "paths": {
132
120
  "@sixbell-telco/sdk/*": ["./node_modules/@sixbell-telco/sdk/*"]
133
- // ... other path mappings
134
121
  }
135
- // ... other compiler options
136
122
  }
137
123
  }
138
124
  ```
139
125
 
140
- This configuration ensures proper module resolution in microfrontend architectures.
141
-
142
- 5. **VSCode Settings (Optional)**
126
+ ### Step 4: Optional - VSCode Configuration
143
127
 
144
- For VSCode users, it is recommended to install the official Tailwind CSS extension and add the following to your `settings.json` file:
128
+ Install the Tailwind CSS extension and add to `.vscode/settings.json`:
145
129
 
146
130
  ```json
131
+ {
147
132
  "editor.quickSuggestions": {
148
133
  "strings": "on"
149
134
  },
150
135
  "files.associations": {
151
136
  "*.css": "tailwindcss"
152
137
  },
153
- "tailwindCSS.classFunctions": ["tw", "clsx", "cva", "cx", "tw\\.[a-z-]+", "cn"],
138
+ "tailwindCSS.classFunctions": ["tw", "clsx", "cva", "cn", "tw\\.[a-z-]+"]
139
+ }
154
140
  ```
155
141
 
156
142
  These settings improve your development experience:
@@ -161,7 +147,7 @@ These settings improve your development experience:
161
147
 
162
148
  With these settings, VSCode will provide class autocompletion for the library's custom attributes and utility functions.
163
149
 
164
- ## Services Configuration
150
+ ## Themes and translation configuration (an optional Logger)
165
151
 
166
152
  Configure all services using runtime providers in your `app.config.ts`. This approach loads configuration from JSON files at runtime, eliminating the need to recompile when updating themes or languages.
167
153
 
@@ -201,12 +187,8 @@ The `translation.json` file defines available languages and their translation pa
201
187
 
202
188
  ```json
203
189
  {
204
- "defaultLanguage": "es",
205
- "translationPaths": {
206
- "en": "/assets/i18n/en.json",
207
- "es": "/assets/i18n/es.json",
208
- "pt": "/assets/i18n/pt.json"
209
- }
190
+ "defaultLang": "es",
191
+ "translationPaths": ["/assets/i18n/"]
210
192
  }
211
193
  ```
212
194
 
@@ -226,80 +208,13 @@ The `themes.json` file defines available themes and their variants:
226
208
 
227
209
  ```json
228
210
  {
229
- "fonts": [
230
- {
231
- "family": "Poppins",
232
- "displayName": "Poppins Sans-Serif",
233
- "faces": [
234
- {
235
- "weight": 400,
236
- "style": "normal",
237
- "src": "./assets/fonts/Poppins-Regular.ttf"
238
- },
239
- {
240
- "weight": 700,
241
- "style": "normal",
242
- "src": "./assets/fonts/Poppins-Bold.ttf"
243
- }
244
- ]
245
- }
246
- ],
247
- "themes": {
248
- "sixbell_telco": {
249
- "light": {
250
- "displayName": "Sixbell Telco Light",
251
- "daisyuiName": "sixbell_telco__light",
252
- "prefersDark": false,
253
- "variables": {
254
- "--color-primary": "oklch(65.64% 0.1155 219.3)",
255
- "--color-secondary": "oklch(86.57% 0.0064 255.48)"
256
- }
257
- },
258
- "dark": {
259
- "displayName": "Sixbell Telco Dark",
260
- "daisyuiName": "sixbell_telco__dark",
261
- "prefersDark": true,
262
- "variables": {
263
- "--color-primary": "oklch(65.64% 0.1155 219.3)",
264
- "--color-secondary": "oklch(48.72% 0.0161 276.78)"
265
- }
266
- }
267
- },
268
- "custom_theme": {
269
- "light": {
270
- "displayName": "Custom Theme Light",
271
- "daisyuiName": "custom__light",
272
- "prefersDark": false,
273
- "variables": {
274
- "--color-primary": "oklch(70% 0.15 220)",
275
- "--color-secondary": "oklch(80% 0.1 210)"
276
- }
277
- },
278
- "dark": {
279
- "displayName": "Custom Theme Dark",
280
- "daisyuiName": "custom__dark",
281
- "prefersDark": true,
282
- "variables": {
283
- "--color-primary": "oklch(60% 0.12 220)",
284
- "--color-secondary": "oklch(50% 0.08 210)"
285
- }
286
- }
287
- }
288
- },
289
- "assets": {
290
- "sixbell_telco": {
291
- "logo": {
292
- "light": "/assets/logos/sixbell-logo-light.svg",
293
- "dark": "/assets/logos/sixbell-logo-dark.svg"
294
- }
295
- },
296
- "custom_theme": {
297
- "logo": {
298
- "light": "/assets/logos/custom-logo-light.svg",
299
- "dark": "/assets/logos/custom-logo-dark.svg"
300
- }
301
- }
211
+ "meta": {
212
+ "name": "themes",
213
+ "updatedAt": "2026-02-02T00:00:00Z",
214
+ "hash": "themes-v2",
215
+ "schemaVersion": "2"
302
216
  },
217
+ "themes": ["/assets/themes/catalog/sixbell_telco.json", "/assets/themes/catalog/custom_theme.json"],
303
218
  "defaultTheme": "sixbell_telco",
304
219
  "defaultScheme": "system",
305
220
  "excludeThemes": []
@@ -345,13 +260,13 @@ export const appConfig: ApplicationConfig = {
345
260
 
346
261
  - **No Recompilation**: Update themes and languages without rebuilding your application
347
262
  - **Multi-Tenant Support**: Easily switch themes and language sets per deployment environment
348
- - **Caching Strategy**: ResourceLoader intelligently caches configurations (IndexedDB → localStorage → memory)
263
+ - **Caching Strategy**: RuntimeConfigStore keeps last-known-good config in Dexie
349
264
  - **Hot Updates**: Changes to `themes.json` and `translation.json` take effect immediately
350
265
  - **Persistent Preferences**: User language and theme preferences are stored and restored automatically
351
266
 
352
267
  ## Adding Custom Themes
353
268
 
354
- Themes are managed through a runtime configuration file (`themes.json`) with CSS variables and font definitions. This approach allows for:
269
+ Themes are managed through a runtime configuration file (`themes.json`) with theme JSON files. This approach allows for:
355
270
 
356
271
  - **Zero Recompilation**: Add/modify themes without rebuilding
357
272
  - **Multi-Tenant Support**: Different themes per deployment
@@ -365,80 +280,13 @@ Add your custom theme to `/assets/themes/themes.json`:
365
280
 
366
281
  ```json
367
282
  {
368
- "fonts": [
369
- {
370
- "family": "Poppins",
371
- "displayName": "Poppins Sans-Serif",
372
- "faces": [
373
- {
374
- "weight": 400,
375
- "style": "normal",
376
- "src": "./assets/fonts/Poppins-Regular.ttf"
377
- },
378
- {
379
- "weight": 700,
380
- "style": "normal",
381
- "src": "./assets/fonts/Poppins-Bold.ttf"
382
- }
383
- ]
384
- }
385
- ],
386
- "themes": {
387
- "sixbell_telco": {
388
- "light": {
389
- "displayName": "Sixbell Telco Light",
390
- "daisyuiName": "sixbell_telco__light",
391
- "prefersDark": false,
392
- "variables": {
393
- "--color-primary": "oklch(65.64% 0.1155 219.3)",
394
- "--color-secondary": "oklch(86.57% 0.0064 255.48)"
395
- }
396
- },
397
- "dark": {
398
- "displayName": "Sixbell Telco Dark",
399
- "daisyuiName": "sixbell_telco__dark",
400
- "prefersDark": true,
401
- "variables": {
402
- "--color-primary": "oklch(65.64% 0.1155 219.3)",
403
- "--color-secondary": "oklch(48.72% 0.0161 276.78)"
404
- }
405
- }
406
- },
407
- "custom_theme": {
408
- "light": {
409
- "displayName": "Custom Theme Light",
410
- "daisyuiName": "custom__light",
411
- "prefersDark": false,
412
- "variables": {
413
- "--color-primary": "oklch(70% 0.15 220)",
414
- "--color-secondary": "oklch(80% 0.1 210)"
415
- }
416
- },
417
- "dark": {
418
- "displayName": "Custom Theme Dark",
419
- "daisyuiName": "custom__dark",
420
- "prefersDark": true,
421
- "variables": {
422
- "--color-primary": "oklch(60% 0.12 220)",
423
- "--color-secondary": "oklch(50% 0.08 210)"
424
- }
425
- }
426
- }
427
- },
428
- "assets": {
429
- "sixbell_telco": {
430
- "logo": {
431
- "light": "/assets/logos/sixbell-logo-light.svg",
432
- "dark": "/assets/logos/sixbell-logo-dark.svg"
433
- }
434
- },
435
- "custom_theme": {
436
- "logo": {
437
- "light": "/assets/logos/custom-logo-light.svg",
438
- "dark": "/assets/logos/custom-logo-dark.svg"
439
- }
440
- }
283
+ "meta": {
284
+ "name": "themes",
285
+ "updatedAt": "2026-02-02T00:00:00Z",
286
+ "hash": "themes-v2",
287
+ "schemaVersion": "2"
441
288
  },
289
+ "themes": ["/assets/themes/catalog/sixbell_telco.json", "/assets/themes/catalog/custom_theme.json"],
442
290
  "defaultTheme": "sixbell_telco",
443
291
  "defaultScheme": "system",
444
292
  "excludeThemes": []
@@ -447,11 +295,7 @@ Add your custom theme to `/assets/themes/themes.json`:
447
295
 
448
296
  **Configuration Structure:**
449
297
 
450
- - `fonts`: Font definitions with faces (weight and style variants)
451
- - `themes`: Theme variants (light/dark) with CSS variables and DaisyUI names
452
- - `daisyuiName`: Maps to CSS `@plugin "daisyui/theme" { name: '...' }`
453
- - `variables`: CSS custom properties applied to this theme variant
454
- - `assets`: Theme-specific resources (logos, banners) for light/dark schemes
298
+ - `themes`: Theme JSON paths
455
299
  - `defaultTheme`: Initial theme on app startup
456
300
  - `defaultScheme`: Initial color scheme (`'system'`, `'light'`, or `'dark'`)
457
301
 
@@ -508,7 +352,9 @@ export class ThemeSwitcherComponent {
508
352
  themeService = inject(ThemeService);
509
353
  private assetsService = inject(ThemeAssetsService);
510
354
 
511
- logoUrl = computed(() => this.assetsService.getAssetUrl('logo') || '/default-logo.svg');
355
+ logoUrl = computed(
356
+ () => this.assetsService.getAssetUrl(this.themeService.selectedTheme(), 'logo', this.themeService.resolvedScheme()) || '/default-logo.svg',
357
+ );
512
358
  }
513
359
  ```
514
360
 
@@ -599,19 +445,15 @@ Create `/assets/translation/translation.json` in your application:
599
445
 
600
446
  ```json
601
447
  {
602
- "defaultLanguage": "es",
603
- "translationPaths": {
604
- "en": "/assets/i18n/en.json",
605
- "es": "/assets/i18n/es.json",
606
- "pt": "/assets/i18n/pt.json"
607
- }
448
+ "defaultLang": "es",
449
+ "translationPaths": ["/assets/i18n/"]
608
450
  }
609
451
  ```
610
452
 
611
453
  **Configuration Structure:**
612
454
 
613
- - `defaultLanguage`: Language code loaded on app initialization
614
- - `translationPaths`: Map of language codes to their translation file paths
455
+ - `defaultLang`: Language code used on app initialization
456
+ - `translationPaths`: List of directories that contain `{lang}.json`
615
457
  - Custom paths are fully supported - organize as needed for your architecture
616
458
 
617
459
  ### 2. Create Translation Files
@@ -1014,7 +856,7 @@ import { inject } from '@angular/core';
1014
856
  export class MyComponent {
1015
857
  private translationService = inject(TranslationService);
1016
858
 
1017
- availableLanguages = this.translationService.availableLanguages;
859
+ availableLanguages = this.translationService.getAvailableLanguageCodes();
1018
860
  currentLanguage = this.translationService.currentLanguage;
1019
861
 
1020
862
  setLanguage(languageCode: string) {
@@ -1022,7 +864,7 @@ export class MyComponent {
1022
864
  }
1023
865
 
1024
866
  getLanguageName(languageCode: string): string {
1025
- return this.translationService.getLanguageName(languageCode);
867
+ return this.translationService.getLanguageDisplayName(languageCode);
1026
868
  }
1027
869
  }
1028
870
  ```
@@ -1134,12 +976,195 @@ export class MyComponent {
1134
976
  }
1135
977
  ```
1136
978
 
979
+ ## Quick Start
980
+
981
+ ### Using Components
982
+
983
+ ```typescript
984
+ import { Component } from '@angular/core';
985
+ import { ButtonComponent } from '@sixbell-telco/sdk/components/button';
986
+ import { CardComponent } from '@sixbell-telco/sdk/components/card';
987
+
988
+ @Component({
989
+ selector: 'app-example',
990
+ standalone: true,
991
+ imports: [ButtonComponent, CardComponent],
992
+ template: `
993
+ <st-card>
994
+ <h2>Hello World</h2>
995
+ <st-button variant="primary">Click me!</st-button>
996
+ </st-card>
997
+ `,
998
+ })
999
+ export class ExampleComponent {}
1000
+ ```
1001
+
1002
+ ### Using Form Components
1003
+
1004
+ ```typescript
1005
+ import { Component, signal } from '@angular/core';
1006
+ import { ReactiveFormsModule, FormControl, FormGroup } from '@angular/forms';
1007
+ import { InputComponent } from '@sixbell-telco/sdk/components/forms/input';
1008
+ import { ButtonComponent } from '@sixbell-telco/sdk/components/button';
1009
+
1010
+ @Component({
1011
+ selector: 'app-form-example',
1012
+ standalone: true,
1013
+ imports: [InputComponent, ButtonComponent, ReactiveFormsModule],
1014
+ template: `
1015
+ <form [formGroup]="form">
1016
+ <st-input formControlName="email" placeholder="Enter email"></st-input>
1017
+ <st-button (click)="submit()">Submit</st-button>
1018
+ </form>
1019
+ `,
1020
+ })
1021
+ export class FormExampleComponent {
1022
+ form = new FormGroup({
1023
+ email: new FormControl(''),
1024
+ });
1025
+
1026
+ submit() {
1027
+ console.log(this.form.value);
1028
+ }
1029
+ }
1030
+ ```
1031
+
1032
+ ### Using Services
1033
+
1034
+ ```typescript
1035
+ import { Component, inject, effect } from '@angular/core';
1036
+ import { ThemeService } from '@sixbell-telco/sdk/utils/theme';
1037
+ import { TranslationService } from '@sixbell-telco/sdk/utils/translation';
1038
+ import { LoggerService } from '@sixbell-telco/sdk/utils/logger';
1039
+
1040
+ @Component({
1041
+ selector: 'app-services-example',
1042
+ template: `
1043
+ <div>
1044
+ <p>Current Theme: {{ themeService.selectedTheme() }}</p>
1045
+ <p>Dark Mode: {{ themeService.isDarkTheme() ? 'Yes' : 'No' }}</p>
1046
+ <button (click)="toggleTheme()">Toggle Theme</button>
1047
+ </div>
1048
+ `,
1049
+ })
1050
+ export class ServicesExampleComponent {
1051
+ themeService = inject(ThemeService);
1052
+ translationService = inject(TranslationService);
1053
+ logger = inject(LoggerService);
1054
+
1055
+ constructor() {
1056
+ effect(() => {
1057
+ this.logger.info(`Theme changed to: ${this.themeService.selectedTheme()}`);
1058
+ });
1059
+ }
1060
+
1061
+ toggleTheme() {
1062
+ const newScheme = this.themeService.isDarkTheme() ? 'light' : 'dark';
1063
+ this.themeService.setScheme(newScheme);
1064
+ }
1065
+ }
1066
+ ```
1067
+
1068
+ ## Configuration
1069
+
1070
+ ### Theme Configuration
1071
+
1072
+ Runtime themes are loaded from `themes.json`. See [Theme Service README](utils/theme/) for detailed configuration.
1073
+
1074
+ ### Translation Configuration
1075
+
1076
+ Runtime translations are loaded from `translation.json`. See [Translation Service README](utils/translation/) for detailed configuration.
1077
+
1078
+ ### Logger Configuration
1079
+
1080
+ Configure logging levels and output. See [Logger Service README](utils/logger/) for detailed options.
1081
+
1082
+ ## Architecture
1083
+
1084
+ ### Multi-Entry Point Imports
1085
+
1086
+ Always use specific imports for optimal tree-shaking:
1087
+
1088
+ ```typescript
1089
+ // ✅ Correct - specific imports
1090
+ import { ButtonComponent } from '@sixbell-telco/sdk/components/button';
1091
+ import { ThemeService } from '@sixbell-telco/sdk/utils/theme';
1092
+
1093
+ // ❌ Avoid - barrel exports
1094
+ import { ButtonComponent } from '@sixbell-telco/sdk';
1095
+ ```
1096
+
1097
+ ### Component Prefix
1098
+
1099
+ All SDK components use the `st-` prefix:
1100
+
1101
+ ```html
1102
+ <st-button>Button</st-button>
1103
+ <st-input type="text" />
1104
+ <st-card>Card Content</st-card>
1105
+ ```
1106
+
1107
+ ### Signal-Based API
1108
+
1109
+ Components use Angular 19 signals for reactive inputs:
1110
+
1111
+ ```typescript
1112
+ variant = input<'primary' | 'secondary'>();
1113
+ isDisabled = input(false);
1114
+
1115
+ @Component({
1116
+ template: `<button [disabled]="isDisabled()">{{ variant() }}</button>`,
1117
+ })
1118
+ ```
1119
+
1120
+ ## Testing
1121
+
1122
+ The SDK includes Jest configuration. Run tests with:
1123
+
1124
+ ```bash
1125
+ npm test # Run all tests
1126
+ npm run test:watch # Watch mode
1127
+ npm run test:coverage # Coverage report
1128
+ ```
1129
+
1130
+ See `.github/instructions/testing-basics.instructions.md` for Angular 19 testing patterns.
1131
+
1137
1132
  ## Documentation
1138
1133
 
1139
- For detailed component documentation, visit our [Storybook](https://storybook.js.org/tutorials/intro-to-storybook/angular/en/get-started/)
1134
+ - **Component Stories**: View component documentation in [Storybook](../storybook/README.md)
1135
+ - **Live Examples**: Showcase app at `projects/showcase/`
1136
+ - **API Documentation**: JSDoc comments in component files
1137
+ - **Changelog**: See [CHANGELOG.md](./CHANGELOG.md)
1138
+
1139
+ ## Contributing
1140
+
1141
+ When creating new components:
1142
+
1143
+ 1. Use `st-` prefix for selectors
1144
+ 2. Follow CVA pattern for styling variants
1145
+ 3. Use signal-based inputs
1146
+ 4. Add comprehensive JSDoc comments
1147
+ 5. Create Storybook stories
1148
+ 6. Add unit tests with Jest
1149
+ 7. Update CHANGELOG.md
1150
+
1151
+ ## Resources
1152
+
1153
+ - <a href="https://angular.dev" target="_blank" rel="noopener noreferrer">Angular Documentation</a>
1154
+ - <a href="https://tailwindcss.com" target="_blank" rel="noopener noreferrer">Tailwind CSS</a>
1155
+ - <a href="https://daisyui.com" target="_blank" rel="noopener noreferrer">DaisyUI</a>
1156
+ - <a href="https://cva.style" target="_blank" rel="noopener noreferrer">class-variance-authority</a>
1157
+ - <a href="https://ng-icons.herokuapp.com" target="_blank" rel="noopener noreferrer">ng-icons</a>
1158
+ - <a href="https://material.angular.io/cdk" target="_blank" rel="noopener noreferrer">Angular CDK</a>
1159
+
1160
+ ## License
1161
+
1162
+ MIT - See [LICENSE](./LICENSE) file for details
1163
+
1164
+ ## Support
1140
1165
 
1141
- > **Note:** Our Storybook documentation is currently a work in progress and will be available soon!
1166
+ For issues, questions, or feature requests, please visit the project repository or contact the Sixbell Telco team.
1142
1167
 
1143
- ## Last update
1168
+ ---
1144
1169
 
1145
- This file was last updated on November 4th, 2025.
1170
+ **Last updated**: November 24, 2025