@sixbell-telco/sdk 2.0.1 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +134 -1
- package/README.md +360 -87
- package/_index.css +0 -3
- package/components/accordion/accordion-item/accordion-item.component.d.ts +3 -4
- package/components/audio-player/audio-timeline/audio-timeline.component.d.ts +28 -1
- package/components/audio-player/src/audio-player.component.d.ts +7 -3
- package/components/audio-player/volume-control/volume-control.component.d.ts +28 -1
- package/components/button/src/button.component.d.ts +46 -1
- package/components/card/card-actions/card-actions.component.d.ts +4 -4
- package/components/card/card-body/card-body.component.d.ts +5 -0
- package/components/card/card-context.d.ts +8 -0
- package/components/card/card-footer/card-footer.component.d.ts +7 -0
- package/components/card/card-header/card-header.component.d.ts +5 -0
- package/components/card/card-header-aside/card-header-aside.component.d.ts +5 -0
- package/components/card/card-section/card-section.component.d.ts +5 -0
- package/components/card/card-section-body/card-section-body.component.d.ts +5 -0
- package/components/card/card-section-footer/card-section-footer.component.d.ts +5 -0
- package/components/card/card-section-group/card-section-group.component.d.ts +16 -0
- package/components/card/card-section-header/card-section-header.component.d.ts +5 -0
- package/components/card/card-section-header-aside/card-section-header-aside.component.d.ts +5 -0
- package/components/card/card-subtitle/card-subtitle.component.d.ts +34 -0
- package/components/card/card-title/card-title.component.d.ts +23 -14
- package/components/card/public-api.d.ts +12 -1
- package/components/card/src/card.component.d.ts +5 -1
- package/components/data-table/actions/actions.component.d.ts +67 -0
- package/components/data-table/actions/actions.types.d.ts +38 -0
- package/components/data-table/data-table-empty-actions/data-table-empty-actions.component.d.ts +5 -0
- package/components/data-table/public-api.d.ts +3 -0
- package/components/data-table/sortable-header/sortable-header.component.d.ts +2 -0
- package/components/data-table/src/data-table.component.d.ts +24 -7
- package/components/dialog/src/dialog.component.d.ts +51 -5
- package/{directives/typography → components/divider}/index.d.ts +1 -1
- package/components/divider/public-api.d.ts +1 -0
- package/components/divider/src/divider.component.d.ts +13 -0
- package/components/dropdown/dropdown-content/dropdown-content.component.d.ts +2 -1
- package/components/dropdown/dropdown-item/dropdown-item.component.d.ts +37 -1
- package/components/dropdown/dropdown-item-checkbox/dropdown-item-checkbox.component.d.ts +33 -1
- package/components/dropdown/dropdown-item-radio/dropdown-item-radio.component.d.ts +33 -1
- package/components/dropdown/dropdown-trigger/dropdown-trigger.component.d.ts +53 -2
- package/components/dropdown/src/dropdown.component.d.ts +2 -2
- package/components/dropdown-menu/bar/dropdown-menu-bar-content/dropdown-menu-bar-content.component.d.ts +2 -1
- package/components/dropdown-menu/bar/dropdown-menu-bar-item/dropdown-menu-bar-item.component.d.ts +33 -1
- package/components/dropdown-menu/bar/dropdown-menu-bar-item-checkbox/dropdown-menu-bar-item-checkbox.component.d.ts +33 -1
- package/components/dropdown-menu/bar/dropdown-menu-bar-item-radio/dropdown-menu-bar-item-radio.component.d.ts +33 -1
- package/components/dropdown-menu/src/directives/dropdown-menu.directive.d.ts +1 -3
- package/components/dropdown-menu/src/dropdown-menu-content/dropdown-menu-content.component.d.ts +2 -1
- package/components/dropdown-menu/src/dropdown-menu-item/dropdown-menu-item.component.d.ts +33 -1
- package/components/dropdown-menu/src/dropdown-menu-sub-content/dropdown-menu-sub-content.component.d.ts +2 -1
- package/components/dual-list/src/dual-list.component.d.ts +3 -2
- package/components/file-upload/file-dropzone/file-dropzone.component.d.ts +46 -1
- package/components/file-upload/file-uploader/file-uploader.component.d.ts +33 -2
- package/components/forms/checkbox/src/checkbox.component.d.ts +46 -2
- package/components/forms/combobox/src/combobox.component.d.ts +40 -5
- package/components/forms/date-picker/src/date-picker.component.d.ts +14 -1
- package/components/forms/form-error/src/form-error.component.d.ts +8 -1
- package/components/forms/form-group/README.md +114 -0
- package/components/forms/form-group/index.d.ts +5 -0
- package/components/forms/form-group/public-api.d.ts +1 -0
- package/components/forms/form-group/src/form-group.component.d.ts +150 -0
- package/components/forms/form-item/README.md +17 -0
- package/components/forms/form-item/index.d.ts +5 -0
- package/components/forms/form-item/public-api.d.ts +1 -0
- package/components/forms/form-item/src/form-item.component.d.ts +5 -0
- package/components/forms/input/src/input.component.d.ts +32 -10
- package/components/forms/radio/src/radio.component.d.ts +46 -2
- package/components/forms/range/src/range.component.d.ts +38 -1
- package/components/forms/select/src/select.component.d.ts +40 -5
- package/components/forms/switch/src/switch.component.d.ts +46 -2
- package/components/forms/textarea/src/textarea.component.d.ts +49 -4
- package/components/forms/toggle/src/toggle.component.d.ts +46 -1
- package/components/overlay/overlay-content/overlay-content.component.d.ts +2 -1
- package/components/overlay/overlay-trigger/overlay-trigger.component.d.ts +37 -5
- package/components/overlay/src/overlay.component.d.ts +4 -5
- package/components/paginator/components/pagination-item/pagination-item.component.d.ts +46 -1
- package/components/paginator/src/paginator.component.d.ts +7 -1
- package/components/tab/directives/tab-content/tab-content.directive.d.ts +3 -4
- package/components/table/public-api.d.ts +2 -0
- package/components/table/src/table.component.d.ts +72 -7
- package/components/table/table-action/table-action.component.d.ts +2 -6
- package/components/table/table-actions/table-actions.component.d.ts +52 -6
- package/components/table/table-actions/table-actions.types.d.ts +28 -0
- package/components/table/table-empty-actions/table-empty-actions.component.d.ts +5 -0
- package/components/table/table-header-checkbox/table-header-checkbox.component.d.ts +5 -11
- package/components/table/table-row-checkbox/table-row-checkbox.component.d.ts +5 -11
- package/components/{toast → text}/index.d.ts +1 -1
- package/components/text/public-api.d.ts +2 -0
- package/components/text/src/text.component.d.ts +38 -0
- package/components/tooltip/src/tooltip.component.d.ts +10 -1
- package/components/wizard/wizard-marker/wizard-marker.component.d.ts +2 -3
- package/directives/auto-focus/src/auto-focus.directive.d.ts +5 -9
- package/directives/click-outside/src/click-outside.directive.d.ts +1 -3
- package/directives/only-numbers/public-api.d.ts +0 -5
- package/directives/only-numbers/src/only-numbers.directive.d.ts +1 -14
- package/directives/text/index.d.ts +5 -0
- package/directives/text/public-api.d.ts +1 -0
- package/directives/text/src/text.directive.d.ts +87 -0
- package/fesm2022/sixbell-telco-sdk-components-accordion.mjs +9 -12
- package/fesm2022/sixbell-telco-sdk-components-accordion.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-audio-player.mjs +130 -50
- package/fesm2022/sixbell-telco-sdk-components-audio-player.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-avatar.mjs +10 -11
- package/fesm2022/sixbell-telco-sdk-components-avatar.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-badge.mjs +3 -3
- package/fesm2022/sixbell-telco-sdk-components-badge.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-button.mjs +79 -5
- package/fesm2022/sixbell-telco-sdk-components-button.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-card.mjs +414 -47
- package/fesm2022/sixbell-telco-sdk-components-card.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-data-table-sub-component-toggle.mjs +1 -1
- package/fesm2022/sixbell-telco-sdk-components-data-table-sub-component-toggle.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-data-table.mjs +236 -59
- package/fesm2022/sixbell-telco-sdk-components-data-table.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dialog.mjs +87 -17
- package/fesm2022/sixbell-telco-sdk-components-dialog.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-divider.mjs +44 -0
- package/fesm2022/sixbell-telco-sdk-components-divider.mjs.map +1 -0
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu-bar.mjs +166 -13
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu-bar.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu.mjs +69 -21
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dropdown.mjs +283 -16
- package/fesm2022/sixbell-telco-sdk-components-dropdown.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dual-list.mjs +8 -6
- package/fesm2022/sixbell-telco-sdk-components-dual-list.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-file-upload.mjs +148 -9
- package/fesm2022/sixbell-telco-sdk-components-file-upload.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-checkbox.mjs +69 -3
- package/fesm2022/sixbell-telco-sdk-components-forms-checkbox.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs +96 -19
- package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-date-picker.mjs +32 -6
- package/fesm2022/sixbell-telco-sdk-components-forms-date-picker.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-form-error.mjs +12 -5
- package/fesm2022/sixbell-telco-sdk-components-forms-form-error.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-form-group.mjs +159 -0
- package/fesm2022/sixbell-telco-sdk-components-forms-form-group.mjs.map +1 -0
- package/fesm2022/sixbell-telco-sdk-components-forms-form-item.mjs +20 -0
- package/fesm2022/sixbell-telco-sdk-components-forms-form-item.mjs.map +1 -0
- package/fesm2022/sixbell-telco-sdk-components-forms-input.mjs +48 -14
- package/fesm2022/sixbell-telco-sdk-components-forms-input.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-radio.mjs +69 -3
- package/fesm2022/sixbell-telco-sdk-components-forms-radio.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-range.mjs +57 -4
- package/fesm2022/sixbell-telco-sdk-components-forms-range.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-select.mjs +89 -18
- package/fesm2022/sixbell-telco-sdk-components-forms-select.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-switch.mjs +80 -6
- package/fesm2022/sixbell-telco-sdk-components-forms-switch.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-textarea.mjs +112 -11
- package/fesm2022/sixbell-telco-sdk-components-forms-textarea.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-toggle.mjs +71 -5
- package/fesm2022/sixbell-telco-sdk-components-forms-toggle.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-icon.mjs +2 -2
- package/fesm2022/sixbell-telco-sdk-components-icon.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-link.mjs +3 -3
- package/fesm2022/sixbell-telco-sdk-components-link.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-overlay.mjs +94 -42
- package/fesm2022/sixbell-telco-sdk-components-overlay.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-paginator.mjs +113 -24
- package/fesm2022/sixbell-telco-sdk-components-paginator.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-progress.mjs +3 -3
- package/fesm2022/sixbell-telco-sdk-components-progress.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-tab.mjs +5 -9
- package/fesm2022/sixbell-telco-sdk-components-tab.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-table.mjs +565 -89
- package/fesm2022/sixbell-telco-sdk-components-table.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-text.mjs +308 -0
- package/fesm2022/sixbell-telco-sdk-components-text.mjs.map +1 -0
- package/fesm2022/sixbell-telco-sdk-components-tooltip.mjs +15 -3
- package/fesm2022/sixbell-telco-sdk-components-tooltip.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-wizard.mjs +15 -15
- package/fesm2022/sixbell-telco-sdk-components-wizard.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-directives-auto-focus.mjs +16 -19
- package/fesm2022/sixbell-telco-sdk-directives-auto-focus.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-directives-click-outside.mjs +7 -10
- package/fesm2022/sixbell-telco-sdk-directives-click-outside.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-directives-only-numbers.mjs +11 -31
- package/fesm2022/sixbell-telco-sdk-directives-only-numbers.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-directives-text.mjs +160 -0
- package/fesm2022/sixbell-telco-sdk-directives-text.mjs.map +1 -0
- package/fesm2022/sixbell-telco-sdk-utils-formatting.mjs +490 -0
- package/fesm2022/sixbell-telco-sdk-utils-formatting.mjs.map +1 -0
- package/fesm2022/sixbell-telco-sdk-utils-theme.mjs +7 -12
- package/fesm2022/sixbell-telco-sdk-utils-theme.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-utils-translation.mjs +55 -12
- package/fesm2022/sixbell-telco-sdk-utils-translation.mjs.map +1 -1
- package/package.json +90 -74
- package/utils/formatting/README.md +100 -0
- package/utils/formatting/index.d.ts +5 -0
- package/utils/formatting/public-api.d.ts +9 -0
- package/utils/formatting/src/constants/constants.d.ts +18 -0
- package/utils/formatting/src/models/formatting.d.ts +33 -0
- package/utils/formatting/src/pipes/currency/st-currency.pipe.d.ts +9 -0
- package/utils/formatting/src/pipes/date/st-date.pipe.d.ts +9 -0
- package/utils/formatting/src/pipes/decimal/st-decimal.pipe.d.ts +9 -0
- package/utils/formatting/src/pipes/percent/st-percent.pipe.d.ts +9 -0
- package/utils/formatting/src/service/formatting.service.d.ts +13 -0
- package/utils/formatting/src/utils/date-format/date-format.d.ts +9 -0
- package/utils/formatting/src/utils/number-format/number-format.d.ts +12 -0
- package/utils/logger/README.md +8 -19
- package/utils/runtime-config/README.md +1 -1
- package/utils/theme/README.md +21 -2
- package/utils/theme/src/theme-dom/theme-dom.service.d.ts +2 -3
- package/utils/translation/README.md +40 -10
- package/utils/translation/public-api.d.ts +1 -1
- package/utils/translation/src/constants.d.ts +9 -2
- package/utils/translation/src/models/translation.d.ts +11 -0
- package/utils/translation/src/providers/translation.provider.d.ts +1 -1
- package/utils/translation/src/translation-dom/translation-dom.service.d.ts +2 -3
- package/utils/translation/src/translation.service.d.ts +6 -1
- package/assets/styles/toast.css +0 -63
- package/components/card/card-content/card-content.component.d.ts +0 -30
- package/components/toast/public-api.d.ts +0 -12
- package/components/toast/services/toast.service.d.ts +0 -35
- package/components/toast/toast-message/toast-message.component.d.ts +0 -29
- package/components/toast/toasts-container/toasts-container.component.d.ts +0 -21
- package/directives/typography/public-api.d.ts +0 -1
- package/directives/typography/src/typography.directive.d.ts +0 -68
- package/fesm2022/sixbell-telco-sdk-components-toast.mjs +0 -185
- package/fesm2022/sixbell-telco-sdk-components-toast.mjs.map +0 -1
- package/fesm2022/sixbell-telco-sdk-directives-typography.mjs +0 -126
- package/fesm2022/sixbell-telco-sdk-directives-typography.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -2,13 +2,15 @@
|
|
|
2
2
|
|
|
3
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
|
+
The package is public on npm, but the repository is private and there is no separate public docs page. Because of that, this README keeps setup guidance, provider examples, translation examples, and usage references that public consumers need.
|
|
6
|
+
|
|
5
7
|
## Overview
|
|
6
8
|
|
|
7
9
|
The SDK provides:
|
|
8
10
|
|
|
9
11
|
- **25+ Production-Ready Components**: Button, Card, Form inputs, Data Table, Dialog, Dropdown, and more
|
|
10
|
-
- **Utility Services**: Theme management, i18n translation, logging, and
|
|
11
|
-
- **Directive Support**:
|
|
12
|
+
- **Utility Services**: Theme management, i18n translation, logging, runtime config, and formatting
|
|
13
|
+
- **Directive Support**: Text, auto-focus, click-outside, and only-numbers
|
|
12
14
|
- **Tailwind CSS v4 + DaisyUI**: Modern styling with customizable themes
|
|
13
15
|
- **Multi-Entry Point Architecture**: Granular imports for optimized bundle sizes
|
|
14
16
|
- **Angular 19 Signal-Based**: Modern reactive patterns with Angular signals
|
|
@@ -24,34 +26,34 @@ The SDK provides:
|
|
|
24
26
|
|
|
25
27
|
### General Components
|
|
26
28
|
|
|
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 |
|
|
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
|
-
|
|
|
38
|
-
| Dropdown Menu
|
|
39
|
-
|
|
|
40
|
-
|
|
|
41
|
-
| File
|
|
42
|
-
| Icon | SVG icon component with ng-icons integration
|
|
43
|
-
| Link | Hyperlink component with router support
|
|
44
|
-
|
|
|
45
|
-
|
|
|
46
|
-
|
|
|
47
|
-
|
|
|
48
|
-
|
|
|
49
|
-
|
|
|
50
|
-
|
|
|
51
|
-
|
|
|
52
|
-
|
|
|
53
|
-
| Tooltip | Floating tooltip with positioning
|
|
54
|
-
| Wizard | Multi-step wizard with validation
|
|
29
|
+
| Component | Description |
|
|
30
|
+
| ------------- | ----------------------------------------------------------------------------- |
|
|
31
|
+
| Accordion | Expandable/collapsible content sections |
|
|
32
|
+
| Avatar | User profile pictures with initials fallback |
|
|
33
|
+
| Badge | Status and label indicators |
|
|
34
|
+
| Button | Interactive buttons with variants and sizes |
|
|
35
|
+
| Card | Compound content shell with contextual headers, sections, and divided footers |
|
|
36
|
+
| Countdown | Countdown timer with customizable formatting |
|
|
37
|
+
| Data Table | Advanced grid with sorting, filtering, pagination, row actions |
|
|
38
|
+
| Dialog | Modal dialogs with animations and positioning |
|
|
39
|
+
| Divider | Semantic divider with orientation, placement, and margin control |
|
|
40
|
+
| Dropdown | Menu dropdown for actions and links |
|
|
41
|
+
| Dropdown Menu | Advanced nested menu system |
|
|
42
|
+
| Dual List | Dual list selection for managing items |
|
|
43
|
+
| File Upload | File uploader and dropzone entry point |
|
|
44
|
+
| Icon | SVG icon component with ng-icons integration |
|
|
45
|
+
| Link | Hyperlink component with router support |
|
|
46
|
+
| Notification | Toast-style notifications |
|
|
47
|
+
| Overlay | Generic overlay with trigger and content |
|
|
48
|
+
| Paginator | Pagination controls for data |
|
|
49
|
+
| Product Card | Product display card with image and actions |
|
|
50
|
+
| Progress | Progress bar with variants |
|
|
51
|
+
| Sonner Toast | Modern toast notifications via ngx-sonner |
|
|
52
|
+
| Tab | Tabbed navigation interface |
|
|
53
|
+
| Table | Data table with inline and dropdown row actions |
|
|
54
|
+
| Text | Polymorphic text component with semantic HTML tags |
|
|
55
|
+
| Tooltip | Floating tooltip with positioning |
|
|
56
|
+
| Wizard | Multi-step wizard with validation |
|
|
55
57
|
|
|
56
58
|
### Form Components
|
|
57
59
|
|
|
@@ -60,7 +62,9 @@ The SDK provides:
|
|
|
60
62
|
| Checkbox | Checkbox input with multiple variants |
|
|
61
63
|
| Combobox | Searchable dropdown with multi-select support |
|
|
62
64
|
| Datepicker | Single and range date selection with time |
|
|
65
|
+
| Form Item | Layout wrapper for fields + full-width errors |
|
|
63
66
|
| Form Error | Error message display for form fields |
|
|
67
|
+
| Form Group | Vertical spacing helper for grouped fields |
|
|
64
68
|
| Input | Text input with variants, icons, and validation |
|
|
65
69
|
| Radio | Radio button group selection |
|
|
66
70
|
| Range | Slider input for numeric ranges |
|
|
@@ -69,6 +73,39 @@ The SDK provides:
|
|
|
69
73
|
| Textarea | Multi-line text input with character count |
|
|
70
74
|
| Toggle | Toggle button for boolean states |
|
|
71
75
|
|
|
76
|
+
### Form Errors Layout
|
|
77
|
+
|
|
78
|
+
For full-width validation messages, wrap each field and its error with `st-form-item` and place `st-form-errors` as a sibling (not inside the field component).
|
|
79
|
+
|
|
80
|
+
```html
|
|
81
|
+
<st-form-item>
|
|
82
|
+
<st-input formControlName="controlInput" label="Input" [parentForm]="form"></st-input>
|
|
83
|
+
<st-form-errors [parentForm]="form" formField="controlInput" />
|
|
84
|
+
</st-form-item>
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Migration notes: `projects/sdk/components/forms/form-error/MIGRATION.md`
|
|
88
|
+
|
|
89
|
+
### Optional Label Indicator
|
|
90
|
+
|
|
91
|
+
Form fields can display an optional indicator inline with the legend. Enable it with `showOptional` and customize the text with `optionalText`.
|
|
92
|
+
|
|
93
|
+
```html
|
|
94
|
+
<st-input label="Email" [showOptional]="true" [optionalText]="'sdk.formFields.optional'"></st-input>
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Add the translation key to your SDK translations (example shown for English):
|
|
98
|
+
|
|
99
|
+
```json
|
|
100
|
+
{
|
|
101
|
+
"sdk": {
|
|
102
|
+
"formFields": {
|
|
103
|
+
"optional": "Optional"
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
```
|
|
108
|
+
|
|
72
109
|
### Utility Services
|
|
73
110
|
|
|
74
111
|
| Service | Purpose | Documentation |
|
|
@@ -76,16 +113,17 @@ The SDK provides:
|
|
|
76
113
|
| Logger Service | Theme-aware logging with IndexedDB persistence | [README](utils/logger/) |
|
|
77
114
|
| Theme Service | Runtime theme management with multi-tenant support | [README](utils/theme/) |
|
|
78
115
|
| Translation Service | Multi-language i18n with ngx-translate integration | [README](utils/translation/) |
|
|
116
|
+
| Formatting Service | Reactive locale-aware formatting utilities | [README](utils/formatting/) |
|
|
79
117
|
| Runtime Config | Last-known-good runtime config loader | [README](utils/runtime-config/) |
|
|
80
118
|
|
|
81
119
|
### Directives
|
|
82
120
|
|
|
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
|
-
|
|
|
121
|
+
| Directive | Purpose |
|
|
122
|
+
| ------------- | ----------------------------------------------------- |
|
|
123
|
+
| auto-focus | Auto-focus elements when visible |
|
|
124
|
+
| click-outside | Detect clicks outside an element |
|
|
125
|
+
| only-numbers | Restrict input to numeric values only |
|
|
126
|
+
| text | Apply preset-based typography with line-clamp support |
|
|
89
127
|
|
|
90
128
|
## Installation
|
|
91
129
|
|
|
@@ -187,8 +225,23 @@ The `translation.json` file defines available languages and their translation pa
|
|
|
187
225
|
|
|
188
226
|
```json
|
|
189
227
|
{
|
|
228
|
+
"meta": {
|
|
229
|
+
"updatedAt": "2026-02-02T00:00:00Z",
|
|
230
|
+
"hash": "showcase-translations-v2",
|
|
231
|
+
"schemaVersion": "3"
|
|
232
|
+
},
|
|
233
|
+
"additionalLanguages": [],
|
|
190
234
|
"defaultLang": "es",
|
|
191
|
-
"
|
|
235
|
+
"excludeLanguages": [],
|
|
236
|
+
"translationPaths": ["/assets/i18n/", "/assets/i18n/sdk/", "/assets/themes/i18n"],
|
|
237
|
+
"locale": {
|
|
238
|
+
"defaultLocale": "en-US",
|
|
239
|
+
"languageToLocale": {
|
|
240
|
+
"en": "en-US",
|
|
241
|
+
"es": "es-CL",
|
|
242
|
+
"pt": "pt-BR"
|
|
243
|
+
}
|
|
244
|
+
}
|
|
192
245
|
}
|
|
193
246
|
```
|
|
194
247
|
|
|
@@ -209,12 +262,11 @@ The `themes.json` file defines available themes and their variants:
|
|
|
209
262
|
```json
|
|
210
263
|
{
|
|
211
264
|
"meta": {
|
|
212
|
-
"name": "themes",
|
|
213
265
|
"updatedAt": "2026-02-02T00:00:00Z",
|
|
214
|
-
"hash": "themes-
|
|
266
|
+
"hash": "showcase-themes-v1",
|
|
215
267
|
"schemaVersion": "2"
|
|
216
268
|
},
|
|
217
|
-
"themes": ["/assets/themes/catalog/sixbell_telco.json", "/assets/themes/catalog/
|
|
269
|
+
"themes": ["/assets/themes/catalog/sixbell_telco.json", "/assets/themes/catalog/wom.json"],
|
|
218
270
|
"defaultTheme": "sixbell_telco",
|
|
219
271
|
"defaultScheme": "system",
|
|
220
272
|
"excludeThemes": []
|
|
@@ -225,37 +277,102 @@ The `themes.json` file defines available themes and their variants:
|
|
|
225
277
|
|
|
226
278
|
```typescript
|
|
227
279
|
// app.config.ts
|
|
228
|
-
import {
|
|
229
|
-
import { ApplicationConfig, importProvidersFrom, isDevMode } from '@angular/core';
|
|
280
|
+
import { ApplicationConfig, isDevMode } from '@angular/core';
|
|
230
281
|
import { provideRouter } from '@angular/router';
|
|
231
282
|
import { provideHttpClient } from '@angular/common/http';
|
|
232
283
|
import { provideLogger } from '@sixbell-telco/sdk/utils/logger';
|
|
233
284
|
import { provideRuntimeTheme } from '@sixbell-telco/sdk/utils/theme';
|
|
234
285
|
import { provideRuntimeTranslation } from '@sixbell-telco/sdk/utils/translation';
|
|
235
|
-
import {
|
|
286
|
+
import { from, timer } from 'rxjs';
|
|
287
|
+
import { switchMap } from 'rxjs/operators';
|
|
288
|
+
|
|
289
|
+
const runtimeUpdateStream$ = timer(0, environment.runtime.pollIntervalMs).pipe(
|
|
290
|
+
switchMap(() => from(fetch(`${environment.runtime.apiBaseUrl}/api/runtime/updates/poll`))),
|
|
291
|
+
switchMap((response) => from(response.json())),
|
|
292
|
+
);
|
|
236
293
|
|
|
237
294
|
export const appConfig: ApplicationConfig = {
|
|
238
295
|
providers: [
|
|
239
296
|
provideRouter(routes),
|
|
240
297
|
provideHttpClient(),
|
|
241
|
-
// CDK Dialog providers (required for dialog component)
|
|
242
|
-
importProvidersFrom(DialogModule),
|
|
243
|
-
// Logger service - configure logging levels and storage
|
|
244
298
|
provideLogger({
|
|
245
|
-
enableLogging:
|
|
299
|
+
enableLogging: isDevMode(),
|
|
246
300
|
logLevel: isDevMode() ? 'debug' : 'warn',
|
|
247
301
|
showTimestamp: true,
|
|
302
|
+
showDate: true,
|
|
248
303
|
persistToIndexedDB: true,
|
|
304
|
+
idbRetentionDays: 7,
|
|
305
|
+
idbMaxLogs: 5000,
|
|
249
306
|
silentMode: !isDevMode(),
|
|
250
307
|
}),
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
308
|
+
...(() => {
|
|
309
|
+
const mode = environment.runtime.defaultMode;
|
|
310
|
+
|
|
311
|
+
if (mode === 'default') {
|
|
312
|
+
return [provideRuntimeTranslation('/assets/translation/translation.json'), provideRuntimeTheme('/assets/themes/themes.json')];
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
if (mode === 'stream' && environment.runtime.enableStream) {
|
|
316
|
+
return [
|
|
317
|
+
provideRuntimeTranslation(`${environment.runtime.apiBaseUrl}/api/runtime/translation/config`, {
|
|
318
|
+
updateStream: runtimeUpdateStream$,
|
|
319
|
+
}),
|
|
320
|
+
provideRuntimeTheme(`${environment.runtime.apiBaseUrl}/api/runtime/theme/config`, {
|
|
321
|
+
updateStream: runtimeUpdateStream$,
|
|
322
|
+
}),
|
|
323
|
+
];
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
return [
|
|
327
|
+
provideRuntimeTranslation(`${environment.runtime.apiBaseUrl}/api/runtime/translation/config`, {
|
|
328
|
+
sse: {
|
|
329
|
+
url: `${environment.runtime.apiBaseUrl}/api/runtime/updates?resource=translation`,
|
|
330
|
+
eventType: 'message',
|
|
331
|
+
},
|
|
332
|
+
}),
|
|
333
|
+
provideRuntimeTheme(`${environment.runtime.apiBaseUrl}/api/runtime/theme/config`, {
|
|
334
|
+
sse: {
|
|
335
|
+
url: `${environment.runtime.apiBaseUrl}/api/runtime/updates?resource=theme`,
|
|
336
|
+
eventType: 'message',
|
|
337
|
+
},
|
|
338
|
+
}),
|
|
339
|
+
];
|
|
340
|
+
})(),
|
|
255
341
|
],
|
|
256
342
|
};
|
|
257
343
|
```
|
|
258
344
|
|
|
345
|
+
### Reactive Formatting Setup
|
|
346
|
+
|
|
347
|
+
Use SDK formatting pipes and services instead of Angular native locale pipes:
|
|
348
|
+
|
|
349
|
+
```html
|
|
350
|
+
{{ createdAt | stDate:'DD/MM/YYYY HH:mm:ss' }} {{ total | stDecimal:'1.0-2' }} {{ amount | stCurrency:'CLP':'symbol':'1.0-0' }} {{ ratio |
|
|
351
|
+
stPercent:'1.0-2' }}
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
```typescript
|
|
355
|
+
import { Component, computed, inject } from '@angular/core';
|
|
356
|
+
import { FormattingService } from '@sixbell-telco/sdk/utils/formatting';
|
|
357
|
+
|
|
358
|
+
@Component({
|
|
359
|
+
selector: 'app-formatting-example',
|
|
360
|
+
template: `{{ formattedAmount() }}`,
|
|
361
|
+
})
|
|
362
|
+
export class FormattingExampleComponent {
|
|
363
|
+
private readonly formatting = inject(FormattingService);
|
|
364
|
+
|
|
365
|
+
amount = 1234.5;
|
|
366
|
+
|
|
367
|
+
formattedAmount = computed(() =>
|
|
368
|
+
this.formatting.formatCurrency(this.amount, 'CLP', {
|
|
369
|
+
display: 'symbol',
|
|
370
|
+
digitsInfo: '1.0-0',
|
|
371
|
+
}),
|
|
372
|
+
);
|
|
373
|
+
}
|
|
374
|
+
```
|
|
375
|
+
|
|
259
376
|
**Key Benefits of Runtime Configuration:**
|
|
260
377
|
|
|
261
378
|
- **No Recompilation**: Update themes and languages without rebuilding your application
|
|
@@ -281,12 +398,11 @@ Add your custom theme to `/assets/themes/themes.json`:
|
|
|
281
398
|
```json
|
|
282
399
|
{
|
|
283
400
|
"meta": {
|
|
284
|
-
"name": "themes",
|
|
285
401
|
"updatedAt": "2026-02-02T00:00:00Z",
|
|
286
|
-
"hash": "themes-
|
|
402
|
+
"hash": "showcase-themes-v1",
|
|
287
403
|
"schemaVersion": "2"
|
|
288
404
|
},
|
|
289
|
-
"themes": ["/assets/themes/catalog/sixbell_telco.json", "/assets/themes/catalog/
|
|
405
|
+
"themes": ["/assets/themes/catalog/sixbell_telco.json", "/assets/themes/catalog/wom.json"],
|
|
290
406
|
"defaultTheme": "sixbell_telco",
|
|
291
407
|
"defaultScheme": "system",
|
|
292
408
|
"excludeThemes": []
|
|
@@ -295,9 +411,9 @@ Add your custom theme to `/assets/themes/themes.json`:
|
|
|
295
411
|
|
|
296
412
|
**Configuration Structure:**
|
|
297
413
|
|
|
298
|
-
- `themes`:
|
|
299
|
-
- `defaultTheme`:
|
|
300
|
-
- `defaultScheme`:
|
|
414
|
+
- `themes`: theme JSON paths
|
|
415
|
+
- `defaultTheme`: initial theme on app startup
|
|
416
|
+
- `defaultScheme`: initial color scheme (`'system'`, `'light'`, or `'dark'`)
|
|
301
417
|
|
|
302
418
|
### 2. Define DaisyUI Themes in Global Styles
|
|
303
419
|
|
|
@@ -368,9 +484,9 @@ Store theme and scheme display names in translation files. Create `/assets/theme
|
|
|
368
484
|
{
|
|
369
485
|
"sdk": {
|
|
370
486
|
"theme": {
|
|
371
|
-
"
|
|
372
|
-
"sixbell_telco": "Sixbell
|
|
373
|
-
"
|
|
487
|
+
"catalog": {
|
|
488
|
+
"sixbell_telco": "Sixbell telco",
|
|
489
|
+
"wom": "Wom"
|
|
374
490
|
},
|
|
375
491
|
"schemes": {
|
|
376
492
|
"system": "System",
|
|
@@ -388,9 +504,9 @@ Store theme and scheme display names in translation files. Create `/assets/theme
|
|
|
388
504
|
{
|
|
389
505
|
"sdk": {
|
|
390
506
|
"theme": {
|
|
391
|
-
"
|
|
392
|
-
"sixbell_telco": "Sixbell
|
|
393
|
-
"
|
|
507
|
+
"catalog": {
|
|
508
|
+
"sixbell_telco": "Sixbell telco",
|
|
509
|
+
"wom": "Wom"
|
|
394
510
|
},
|
|
395
511
|
"schemes": {
|
|
396
512
|
"system": "Sistema",
|
|
@@ -408,9 +524,9 @@ Store theme and scheme display names in translation files. Create `/assets/theme
|
|
|
408
524
|
{
|
|
409
525
|
"sdk": {
|
|
410
526
|
"theme": {
|
|
411
|
-
"
|
|
412
|
-
"sixbell_telco": "Sixbell
|
|
413
|
-
"
|
|
527
|
+
"catalog": {
|
|
528
|
+
"sixbell_telco": "Sixbell telco",
|
|
529
|
+
"wom": "Wom"
|
|
414
530
|
},
|
|
415
531
|
"schemes": {
|
|
416
532
|
"system": "Sistema",
|
|
@@ -445,22 +561,39 @@ Create `/assets/translation/translation.json` in your application:
|
|
|
445
561
|
|
|
446
562
|
```json
|
|
447
563
|
{
|
|
564
|
+
"meta": {
|
|
565
|
+
"updatedAt": "2026-02-02T00:00:00Z",
|
|
566
|
+
"hash": "showcase-translations-v2",
|
|
567
|
+
"schemaVersion": "3"
|
|
568
|
+
},
|
|
569
|
+
"additionalLanguages": [],
|
|
448
570
|
"defaultLang": "es",
|
|
449
|
-
"
|
|
571
|
+
"excludeLanguages": [],
|
|
572
|
+
"translationPaths": ["/assets/i18n/", "/assets/i18n/sdk/", "/assets/themes/i18n"],
|
|
573
|
+
"locale": {
|
|
574
|
+
"defaultLocale": "en-US",
|
|
575
|
+
"languageToLocale": {
|
|
576
|
+
"en": "en-US",
|
|
577
|
+
"es": "es-CL",
|
|
578
|
+
"pt": "pt-BR"
|
|
579
|
+
}
|
|
580
|
+
}
|
|
450
581
|
}
|
|
451
582
|
```
|
|
452
583
|
|
|
453
584
|
**Configuration Structure:**
|
|
454
585
|
|
|
455
|
-
- `defaultLang`:
|
|
456
|
-
- `translationPaths`:
|
|
457
|
-
-
|
|
586
|
+
- `defaultLang`: language code used on app initialization
|
|
587
|
+
- `translationPaths`: list of directories that contain `{lang}.json`
|
|
588
|
+
- `additionalLanguages`: extra languages beyond the built-in SDK defaults
|
|
589
|
+
- `excludeLanguages`: built-in languages to remove from the available list
|
|
590
|
+
- `locale.languageToLocale`: mapping used by `FormattingService` and the formatting pipes
|
|
458
591
|
|
|
459
592
|
### 2. Create Translation Files
|
|
460
593
|
|
|
461
594
|
Create language translation files at the paths defined in `translation.json`. The minimal translation structure includes SDK translations:
|
|
462
595
|
|
|
463
|
-
**English (`/assets/sdk/
|
|
596
|
+
**English (`/assets/i18n/sdk/en.json`):**
|
|
464
597
|
|
|
465
598
|
```json
|
|
466
599
|
{
|
|
@@ -526,6 +659,9 @@ Create language translation files at the paths defined in `translation.json`. Th
|
|
|
526
659
|
"unhandledError": "*Unhandled error"
|
|
527
660
|
}
|
|
528
661
|
},
|
|
662
|
+
"formFields": {
|
|
663
|
+
"optional": "Optional"
|
|
664
|
+
},
|
|
529
665
|
"textarea": {
|
|
530
666
|
"maxCharacters": "{{current}} of {{max}} characters"
|
|
531
667
|
},
|
|
@@ -534,7 +670,15 @@ Create language translation files at the paths defined in `translation.json`. Th
|
|
|
534
670
|
"perPage": "{{count}} / page",
|
|
535
671
|
"totalEntries": "{{total}} entries",
|
|
536
672
|
"entriesRange": "{{range}} of {{total}} entries",
|
|
537
|
-
"emptyListMessage": "No items to show"
|
|
673
|
+
"emptyListMessage": "No items to show",
|
|
674
|
+
"noData": {
|
|
675
|
+
"title": "No data available",
|
|
676
|
+
"message": "There are no records to display at this time."
|
|
677
|
+
},
|
|
678
|
+
"noResults": {
|
|
679
|
+
"title": "No results found",
|
|
680
|
+
"message": "Try adjusting your search criteria"
|
|
681
|
+
}
|
|
538
682
|
},
|
|
539
683
|
"dataTable": {
|
|
540
684
|
"entriesByPage": "Entries per page",
|
|
@@ -611,7 +755,7 @@ Create language translation files at the paths defined in `translation.json`. Th
|
|
|
611
755
|
}
|
|
612
756
|
},
|
|
613
757
|
"fileUploader": {
|
|
614
|
-
"
|
|
758
|
+
"allowedTypesLabel": "Tipos permitidos:"
|
|
615
759
|
}
|
|
616
760
|
},
|
|
617
761
|
"audioPlayer": {
|
|
@@ -856,7 +1000,7 @@ import { inject } from '@angular/core';
|
|
|
856
1000
|
export class MyComponent {
|
|
857
1001
|
private translationService = inject(TranslationService);
|
|
858
1002
|
|
|
859
|
-
availableLanguages = this.translationService.
|
|
1003
|
+
availableLanguages = this.translationService.getAvailableLanguagesConfig();
|
|
860
1004
|
currentLanguage = this.translationService.currentLanguage;
|
|
861
1005
|
|
|
862
1006
|
setLanguage(languageCode: string) {
|
|
@@ -864,7 +1008,7 @@ export class MyComponent {
|
|
|
864
1008
|
}
|
|
865
1009
|
|
|
866
1010
|
getLanguageName(languageCode: string): string {
|
|
867
|
-
return this.translationService.
|
|
1011
|
+
return this.translationService.getLocalizedLanguageName(languageCode);
|
|
868
1012
|
}
|
|
869
1013
|
}
|
|
870
1014
|
```
|
|
@@ -875,15 +1019,15 @@ Translations are automatically loaded and available through the `translate` pipe
|
|
|
875
1019
|
|
|
876
1020
|
```html
|
|
877
1021
|
<!-- Access any translation key -->
|
|
878
|
-
<h1>{{ '
|
|
1022
|
+
<h1>{{ 'ui.showcase' | translate }}</h1>
|
|
879
1023
|
|
|
880
1024
|
<!-- With parameters -->
|
|
881
1025
|
<p>{{ 'welcome.message' | translate: { name: userName } }}</p>
|
|
882
1026
|
|
|
883
1027
|
<!-- In component -->
|
|
884
1028
|
<select (change)="setLanguage($event.target.value)">
|
|
885
|
-
@for (lang of availableLanguages; track lang) {
|
|
886
|
-
<option [value]="lang">{{ getLanguageName(lang) }}</option>
|
|
1029
|
+
@for (lang of availableLanguages; track lang.code) {
|
|
1030
|
+
<option [value]="lang.code">{{ getLanguageName(lang.code) }}</option>
|
|
887
1031
|
}
|
|
888
1032
|
</select>
|
|
889
1033
|
```
|
|
@@ -904,7 +1048,9 @@ Extend the translation files with your application-specific keys:
|
|
|
904
1048
|
}
|
|
905
1049
|
},
|
|
906
1050
|
"sdk": {
|
|
907
|
-
|
|
1051
|
+
"formFields": {
|
|
1052
|
+
"optional": "Optional"
|
|
1053
|
+
}
|
|
908
1054
|
}
|
|
909
1055
|
}
|
|
910
1056
|
```
|
|
@@ -932,6 +1078,85 @@ import { ButtonComponent } from '@sixbell-telco/sdk/components/button';
|
|
|
932
1078
|
})
|
|
933
1079
|
```
|
|
934
1080
|
|
|
1081
|
+
### Using Text Directive & Component
|
|
1082
|
+
|
|
1083
|
+
The **Text Directive** (`stText`) applies preset-based typography styles directly on any HTML element. The **Text Component** (`st-text`) is a polymorphic wrapper that renders the correct semantic HTML tag.
|
|
1084
|
+
|
|
1085
|
+
Both support class overrides — any Tailwind class you put in `class=""` will override the corresponding directive/component default via `tailwind-merge`.
|
|
1086
|
+
|
|
1087
|
+
#### Text Directive
|
|
1088
|
+
|
|
1089
|
+
```typescript
|
|
1090
|
+
import { TextDirective } from '@sixbell-telco/sdk/directives/text';
|
|
1091
|
+
|
|
1092
|
+
@Component({
|
|
1093
|
+
imports: [TextDirective],
|
|
1094
|
+
template: `
|
|
1095
|
+
<!-- Basic presets (1 = largest heading, 10 = smallest body) -->
|
|
1096
|
+
<h1 stText="1">Hero Title</h1>
|
|
1097
|
+
<p stText="7">Body text (default preset)</p>
|
|
1098
|
+
<span stText="9">Small label</span>
|
|
1099
|
+
|
|
1100
|
+
<!-- Override weight and color via inputs -->
|
|
1101
|
+
<p stText="7" stTextWeight="bold" stTextColor="primary">Bold primary text</p>
|
|
1102
|
+
|
|
1103
|
+
<!-- Override any prop via class (wins over defaults) -->
|
|
1104
|
+
<p stText="7" class="text-error font-semibold">Error text with semibold weight</p>
|
|
1105
|
+
<p stText="7" class="text-3xl leading-loose">Larger size and loose line-height</p>
|
|
1106
|
+
|
|
1107
|
+
<!-- Line clamp -->
|
|
1108
|
+
<p stText="7" stTextLineClamp="2">Long text clamped to 2 lines...</p>
|
|
1109
|
+
`
|
|
1110
|
+
})
|
|
1111
|
+
```
|
|
1112
|
+
|
|
1113
|
+
**Available inputs:**
|
|
1114
|
+
|
|
1115
|
+
| Input | Default | Options |
|
|
1116
|
+
| ----------------- | ----------- | ----------------------------------------------------------------------------------- |
|
|
1117
|
+
| `stText` | `'7'` | `'1'`–`'10'` (preset scale) |
|
|
1118
|
+
| `stTextWeight` | `'normal'` | `'bold'`, `'semibold'`, `'medium'`, `'normal'`, `'light'`, `'inherit'` |
|
|
1119
|
+
| `stTextColor` | `'inherit'` | `'base'`, `'base-placeholder'`, `'primary'`, `'secondary'`, `'accent'`, `'inherit'` |
|
|
1120
|
+
| `stTextOverflow` | `'clip'` | `'clip'`, `'ellipsis'`, `'truncate'` |
|
|
1121
|
+
| `stTextLineClamp` | `undefined` | `'1'`–`'6'`, `'none'` |
|
|
1122
|
+
|
|
1123
|
+
**Class overrides:** Any Tailwind utility in `class=""` overrides the corresponding directive default (color, weight, font-size, line-height, tracking, etc.) via `tailwind-merge`.
|
|
1124
|
+
|
|
1125
|
+
#### Text Component
|
|
1126
|
+
|
|
1127
|
+
```typescript
|
|
1128
|
+
import { TextComponent } from '@sixbell-telco/sdk/components/text';
|
|
1129
|
+
|
|
1130
|
+
@Component({
|
|
1131
|
+
imports: [TextComponent],
|
|
1132
|
+
template: `
|
|
1133
|
+
<!-- Semantic tags with presets -->
|
|
1134
|
+
<st-text as="h1" preset="1">Hero Title</st-text>
|
|
1135
|
+
<st-text as="h2" preset="2">Page Title</st-text>
|
|
1136
|
+
<st-text as="p" preset="7">Body paragraph</st-text>
|
|
1137
|
+
<st-text as="span" preset="9" color="primary">Inline label</st-text>
|
|
1138
|
+
|
|
1139
|
+
<!-- Override via inputs -->
|
|
1140
|
+
<st-text as="p" preset="7" weight="bold" color="accent">Bold accent text</st-text>
|
|
1141
|
+
|
|
1142
|
+
<!-- Override via class (wins over defaults) -->
|
|
1143
|
+
<st-text as="p" preset="7" class="text-error font-medium">Custom error text</st-text>
|
|
1144
|
+
<st-text as="h1" preset="1" class="mb-4 border-b border-accent pb-2">Heading with border</st-text>
|
|
1145
|
+
`
|
|
1146
|
+
})
|
|
1147
|
+
```
|
|
1148
|
+
|
|
1149
|
+
**Available inputs:**
|
|
1150
|
+
|
|
1151
|
+
| Input | Default | Options |
|
|
1152
|
+
| ----------- | ----------- | ----------------------------------------------------------------------------------- |
|
|
1153
|
+
| `as` | `'p'` | `'h1'`–`'h6'`, `'p'`, `'span'`, `'div'`, `'label'` |
|
|
1154
|
+
| `preset` | `'7'` | `'1'`–`'10'` |
|
|
1155
|
+
| `weight` | `undefined` | `'bold'`, `'semibold'`, `'medium'`, `'normal'`, `'light'`, `'inherit'` |
|
|
1156
|
+
| `color` | `'base'` | `'base'`, `'base-placeholder'`, `'primary'`, `'secondary'`, `'accent'`, `'inherit'` |
|
|
1157
|
+
| `overflow` | `'clip'` | `'clip'`, `'ellipsis'`, `'truncate'` |
|
|
1158
|
+
| `lineClamp` | `undefined` | `'1'`–`'6'`, `'none'` |
|
|
1159
|
+
|
|
935
1160
|
### Using Services in Components
|
|
936
1161
|
|
|
937
1162
|
```typescript
|
|
@@ -955,8 +1180,8 @@ import { TranslationService } from '@sixbell-telco/sdk/utils/translation';
|
|
|
955
1180
|
|
|
956
1181
|
<!-- Language selector -->
|
|
957
1182
|
<select (change)="changeLanguage($event.target.value)">
|
|
958
|
-
@for (lang of translationService.
|
|
959
|
-
<option [value]="lang">{{ translationService.
|
|
1183
|
+
@for (lang of translationService.getAvailableLanguagesConfig(); track lang.code) {
|
|
1184
|
+
<option [value]="lang.code">{{ translationService.getLocalizedLanguageName(lang.code) }}</option>
|
|
960
1185
|
}
|
|
961
1186
|
</select>
|
|
962
1187
|
</div>
|
|
@@ -983,16 +1208,53 @@ export class MyComponent {
|
|
|
983
1208
|
```typescript
|
|
984
1209
|
import { Component } from '@angular/core';
|
|
985
1210
|
import { ButtonComponent } from '@sixbell-telco/sdk/components/button';
|
|
986
|
-
import {
|
|
1211
|
+
import {
|
|
1212
|
+
CardActionsComponent,
|
|
1213
|
+
CardBodyComponent,
|
|
1214
|
+
CardComponent,
|
|
1215
|
+
CardFooterComponent,
|
|
1216
|
+
CardHeaderComponent,
|
|
1217
|
+
CardSectionBodyComponent,
|
|
1218
|
+
CardSectionComponent,
|
|
1219
|
+
CardSectionGroupComponent,
|
|
1220
|
+
CardSubtitleComponent,
|
|
1221
|
+
CardTitleComponent,
|
|
1222
|
+
} from '@sixbell-telco/sdk/components/card';
|
|
987
1223
|
|
|
988
1224
|
@Component({
|
|
989
1225
|
selector: 'app-example',
|
|
990
1226
|
standalone: true,
|
|
991
|
-
imports: [
|
|
1227
|
+
imports: [
|
|
1228
|
+
ButtonComponent,
|
|
1229
|
+
CardActionsComponent,
|
|
1230
|
+
CardBodyComponent,
|
|
1231
|
+
CardComponent,
|
|
1232
|
+
CardFooterComponent,
|
|
1233
|
+
CardHeaderComponent,
|
|
1234
|
+
CardSectionBodyComponent,
|
|
1235
|
+
CardSectionComponent,
|
|
1236
|
+
CardSectionGroupComponent,
|
|
1237
|
+
CardSubtitleComponent,
|
|
1238
|
+
CardTitleComponent,
|
|
1239
|
+
],
|
|
992
1240
|
template: `
|
|
993
1241
|
<st-card>
|
|
994
|
-
<
|
|
995
|
-
|
|
1242
|
+
<st-card-header>
|
|
1243
|
+
<st-card-title>Hello World</st-card-title>
|
|
1244
|
+
<st-card-subtitle>Small supporting text</st-card-subtitle>
|
|
1245
|
+
</st-card-header>
|
|
1246
|
+
<st-card-body>
|
|
1247
|
+
<st-card-section-group [divided]="true">
|
|
1248
|
+
<st-card-section>
|
|
1249
|
+
<st-card-section-body>Welcome to the new compound card API.</st-card-section-body>
|
|
1250
|
+
</st-card-section>
|
|
1251
|
+
</st-card-section-group>
|
|
1252
|
+
</st-card-body>
|
|
1253
|
+
<st-card-footer [divided]="true">
|
|
1254
|
+
<st-card-actions>
|
|
1255
|
+
<st-button variant="primary">Click me!</st-button>
|
|
1256
|
+
</st-card-actions>
|
|
1257
|
+
</st-card-footer>
|
|
996
1258
|
</st-card>
|
|
997
1259
|
`,
|
|
998
1260
|
})
|
|
@@ -1102,6 +1364,7 @@ All SDK components use the `st-` prefix:
|
|
|
1102
1364
|
<st-button>Button</st-button>
|
|
1103
1365
|
<st-input type="text" />
|
|
1104
1366
|
<st-card>Card Content</st-card>
|
|
1367
|
+
<st-divider>OR</st-divider>
|
|
1105
1368
|
```
|
|
1106
1369
|
|
|
1107
1370
|
### Signal-Based API
|
|
@@ -1127,7 +1390,7 @@ npm run test:watch # Watch mode
|
|
|
1127
1390
|
npm run test:coverage # Coverage report
|
|
1128
1391
|
```
|
|
1129
1392
|
|
|
1130
|
-
See `.
|
|
1393
|
+
See `.agents/skills/angular-testing-jest-ngmocks/SKILL.md` for Angular 19 testing patterns.
|
|
1131
1394
|
|
|
1132
1395
|
## Documentation
|
|
1133
1396
|
|
|
@@ -1136,6 +1399,16 @@ See `.github/instructions/testing-basics.instructions.md` for Angular 19 testing
|
|
|
1136
1399
|
- **API Documentation**: JSDoc comments in component files
|
|
1137
1400
|
- **Changelog**: See [CHANGELOG.md](./CHANGELOG.md)
|
|
1138
1401
|
|
|
1402
|
+
## Agent skills release scope
|
|
1403
|
+
|
|
1404
|
+
The SDK skill at `.agents/skills/sixbell-sdk/` follows the same lifecycle as `projects/sdk/CHANGELOG.md`:
|
|
1405
|
+
|
|
1406
|
+
1. During active development, the skill metadata must point to `Unreleased`.
|
|
1407
|
+
2. When a release is created, update the skill metadata to the released version or tag.
|
|
1408
|
+
3. When development starts again, switch the skill metadata back to `Unreleased`.
|
|
1409
|
+
|
|
1410
|
+
This keeps the skill aligned with the current codebase instead of the last published package.
|
|
1411
|
+
|
|
1139
1412
|
## Contributing
|
|
1140
1413
|
|
|
1141
1414
|
When creating new components:
|
|
@@ -1167,4 +1440,4 @@ For issues, questions, or feature requests, please visit the project repository
|
|
|
1167
1440
|
|
|
1168
1441
|
---
|
|
1169
1442
|
|
|
1170
|
-
**Last updated**:
|
|
1443
|
+
**Last updated**: March 19, 2026
|