@sixbell-telco/sdk 4.2.0 → 4.3.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 +81 -1
- package/README.md +98 -66
- package/_index.css +2 -1586
- package/components/accordion/accordion-item/accordion-item.component.d.ts +1 -1
- package/components/alert/README.md +27 -0
- package/components/alert/index.d.ts +5 -0
- package/components/alert/public-api.d.ts +1 -0
- package/components/alert/src/alert.component.d.ts +85 -0
- package/components/audio-player/audio-timeline/audio-timeline.component.d.ts +1 -1
- package/components/audio-player/button-play/button-play.component.d.ts +7 -7
- package/components/audio-player/src/audio-player.component.d.ts +2 -2
- package/components/audio-player/volume-control/volume-control.component.d.ts +1 -1
- package/components/avatar/README.md +1 -0
- package/components/avatar/src/avatar.component.d.ts +2 -2
- package/components/badge/src/badge.component.d.ts +4 -4
- package/components/button/README.md +5 -4
- package/components/button/src/button.component.d.ts +38 -16
- package/components/card/README.md +2 -0
- package/components/card/card-footer/card-footer.component.d.ts +37 -2
- package/components/card/card-section-group/card-section-group.component.d.ts +1 -1
- package/components/card/src/card.component.d.ts +6 -6
- package/components/countdown/src/countdown.component.d.ts +4 -4
- package/components/data-table/README.md +26 -0
- package/components/data-table/expandable/expandable.component.d.ts +4 -4
- package/components/data-table/sortable-header/sortable-header.component.d.ts +1 -1
- package/components/data-table/src/data-table.component.d.ts +15 -8
- package/components/data-table/sub-component-toggle/sub-component-toggle.component.d.ts +1 -1
- package/components/description-list/README.md +27 -0
- package/components/description-list/index.d.ts +5 -0
- package/components/description-list/public-api.d.ts +1 -0
- package/components/description-list/src/description-list.component.d.ts +90 -0
- package/components/dialog/README.md +10 -6
- package/components/dialog/dialog-actions/dialog-actions.component.d.ts +4 -0
- package/components/dialog/src/dialog.component.d.ts +27 -6
- package/components/dialog/src/fullscreen-block-scroll-strategy.d.ts +31 -0
- package/components/divider/src/divider.component.d.ts +1 -1
- package/components/dropdown/README.md +1 -1
- package/components/dropdown/dropdown-content/dropdown-content.component.d.ts +1 -1
- package/components/dropdown/dropdown-item/dropdown-item.component.d.ts +4 -4
- package/components/dropdown/dropdown-item-checkbox/dropdown-item-checkbox.component.d.ts +5 -5
- package/components/dropdown/dropdown-item-radio/dropdown-item-radio.component.d.ts +5 -5
- package/components/dropdown/dropdown-trigger/dropdown-trigger.component.d.ts +1 -1
- package/components/dropdown-menu/README.md +1 -1
- package/components/dropdown-menu/bar/dropdown-menu-bar/dropdown-menu-bar.component.d.ts +1 -1
- package/components/dropdown-menu/bar/dropdown-menu-bar-content/dropdown-menu-bar-content.component.d.ts +1 -1
- package/components/dropdown-menu/bar/dropdown-menu-bar-item/dropdown-menu-bar-item.component.d.ts +3 -3
- package/components/dropdown-menu/bar/dropdown-menu-bar-item-checkbox/dropdown-menu-bar-item-checkbox.component.d.ts +4 -4
- package/components/dropdown-menu/bar/dropdown-menu-bar-item-radio/dropdown-menu-bar-item-radio.component.d.ts +4 -4
- package/components/dropdown-menu/bar/dropdown-menu-bar-sub-trigger/dropdown-menu-bar-sub-trigger.component.d.ts +1 -1
- package/components/dropdown-menu/bar/dropdown-menu-bar-trigger/dropdown-menu-bar-trigger.component.d.ts +1 -1
- package/components/dropdown-menu/context/dropdown-context-menu-trigger/dropdown-context-menu-trigger.component.d.ts +1 -1
- package/components/dropdown-menu/dropdown-menu-chevron/dropdown-menu-chevron.component.d.ts +1 -1
- package/components/dropdown-menu/src/dropdown-menu-item/dropdown-menu-item.component.d.ts +3 -3
- package/components/dropdown-menu/src/dropdown-menu-sub-trigger/dropdown-menu-sub-trigger.component.d.ts +1 -1
- package/components/empty-state/README.md +40 -0
- package/components/empty-state/index.d.ts +5 -0
- package/components/empty-state/public-api.d.ts +1 -0
- package/components/empty-state/src/empty-state.component.d.ts +73 -0
- package/components/file-upload/file-dropzone/file-dropzone.component.d.ts +4 -4
- package/components/file-upload/file-uploader/file-uploader.component.d.ts +2 -2
- package/components/forms/checkbox/src/checkbox.component.d.ts +1 -1
- package/components/forms/combobox/README.md +1 -0
- package/components/forms/combobox/src/combobox.component.d.ts +21 -7
- package/components/forms/date-picker/src/date-picker.component.d.ts +16 -9
- package/components/forms/form-hint/README.md +29 -0
- package/components/forms/form-hint/index.d.ts +5 -0
- package/components/forms/form-hint/public-api.d.ts +1 -0
- package/components/forms/form-hint/src/form-hint.component.d.ts +38 -0
- package/components/forms/form-item/src/form-item.component.d.ts +45 -1
- package/components/forms/input/src/input.component.d.ts +15 -8
- package/components/forms/radio/src/radio.component.d.ts +1 -1
- package/components/forms/range/src/range.component.d.ts +18 -4
- package/components/forms/select/README.md +1 -0
- package/components/forms/select/src/select.component.d.ts +20 -5
- package/components/forms/switch/src/switch.component.d.ts +1 -1
- package/components/forms/textarea/src/textarea.component.d.ts +12 -5
- package/components/forms/toggle/src/toggle.component.d.ts +1 -1
- package/components/notification/src/notification.component.d.ts +1 -1
- package/components/overlay/README.md +1 -1
- package/components/overlay/overlay-trigger/overlay-trigger.component.d.ts +1 -1
- package/components/overlay/src/overlay.component.d.ts +1 -1
- package/components/paginator/components/pagination-item/pagination-item.component.d.ts +3 -3
- package/components/progress/src/progress.component.d.ts +1 -1
- package/components/segmented-button/README.md +57 -0
- package/components/segmented-button/index.d.ts +5 -0
- package/components/segmented-button/public-api.d.ts +1 -0
- package/components/segmented-button/src/segmented-button.component.d.ts +110 -0
- package/components/sonner/toaster/src/toaster.component.d.ts +3 -3
- package/components/tab/src/tab.component.d.ts +2 -2
- package/components/table/README.md +51 -3
- package/components/table/public-api.d.ts +1 -0
- package/components/table/src/table.component.d.ts +20 -13
- package/components/table/table-action/table-action.component.d.ts +14 -3
- package/components/table/table-actions/table-actions.component.d.ts +12 -1
- package/components/table/tokens/README.md +7 -0
- package/components/table/tokens/index.d.ts +5 -0
- package/components/table/tokens/public-api.d.ts +1 -0
- package/components/table/tokens/table-empty-state.d.ts +6 -0
- package/components/tooltip/README.md +22 -5
- package/components/tooltip/src/tooltip.component.d.ts +36 -4
- package/components/tree/README.md +73 -0
- package/components/tree/index.d.ts +5 -0
- package/components/tree/public-api.d.ts +1 -0
- package/components/tree/src/tree.component.d.ts +180 -0
- package/components/wizard/README.md +9 -0
- package/components/wizard/wizard-content/wizard-content.component.d.ts +1 -1
- package/components/wizard/wizard-wrapper/wizard-wrapper.component.d.ts +15 -6
- package/directives/auto-focus/src/auto-focus.directive.d.ts +1 -1
- package/directives/only-numbers/src/only-numbers.directive.d.ts +1 -1
- package/directives/truncate/README.md +49 -0
- package/directives/truncate/index.d.ts +5 -0
- package/directives/truncate/public-api.d.ts +1 -0
- package/directives/truncate/src/truncate-popover.component.d.ts +11 -0
- package/directives/truncate/src/truncate.directive.d.ts +96 -0
- package/fesm2022/sixbell-telco-sdk-components-accordion.mjs +2 -2
- package/fesm2022/sixbell-telco-sdk-components-accordion.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-alert.mjs +152 -0
- package/fesm2022/sixbell-telco-sdk-components-alert.mjs.map +1 -0
- package/fesm2022/sixbell-telco-sdk-components-audio-player.mjs +15 -15
- package/fesm2022/sixbell-telco-sdk-components-audio-player.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-avatar.mjs +4 -4
- package/fesm2022/sixbell-telco-sdk-components-avatar.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-badge.mjs +5 -5
- package/fesm2022/sixbell-telco-sdk-components-badge.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-button.mjs +53 -19
- package/fesm2022/sixbell-telco-sdk-components-button.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-card.mjs +61 -14
- package/fesm2022/sixbell-telco-sdk-components-card.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-countdown.mjs +5 -5
- package/fesm2022/sixbell-telco-sdk-components-countdown.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-data-table-sub-component-toggle.mjs +3 -3
- package/fesm2022/sixbell-telco-sdk-components-data-table-sub-component-toggle.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-data-table.mjs +34 -33
- package/fesm2022/sixbell-telco-sdk-components-data-table.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-description-list.mjs +200 -0
- package/fesm2022/sixbell-telco-sdk-components-description-list.mjs.map +1 -0
- package/fesm2022/sixbell-telco-sdk-components-dialog.mjs +128 -17
- package/fesm2022/sixbell-telco-sdk-components-dialog.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-divider.mjs +2 -2
- package/fesm2022/sixbell-telco-sdk-components-divider.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu-bar.mjs +16 -16
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu-bar.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu-context.mjs +2 -2
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu-context.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu.mjs +6 -6
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dropdown.mjs +17 -17
- package/fesm2022/sixbell-telco-sdk-components-dropdown.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dual-list.mjs +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dual-list.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-empty-state.mjs +131 -0
- package/fesm2022/sixbell-telco-sdk-components-empty-state.mjs.map +1 -0
- package/fesm2022/sixbell-telco-sdk-components-file-upload.mjs +9 -9
- package/fesm2022/sixbell-telco-sdk-components-file-upload.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-checkbox.mjs +2 -2
- package/fesm2022/sixbell-telco-sdk-components-forms-checkbox.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs +71 -25
- package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-date-picker.mjs +23 -12
- package/fesm2022/sixbell-telco-sdk-components-forms-date-picker.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-form-hint.mjs +81 -0
- package/fesm2022/sixbell-telco-sdk-components-forms-form-hint.mjs.map +1 -0
- package/fesm2022/sixbell-telco-sdk-components-forms-form-item.mjs +45 -3
- package/fesm2022/sixbell-telco-sdk-components-forms-form-item.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-input.mjs +27 -13
- package/fesm2022/sixbell-telco-sdk-components-forms-input.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-radio.mjs +2 -2
- package/fesm2022/sixbell-telco-sdk-components-forms-radio.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-range.mjs +29 -7
- package/fesm2022/sixbell-telco-sdk-components-forms-range.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-select.mjs +51 -15
- package/fesm2022/sixbell-telco-sdk-components-forms-select.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-switch.mjs +2 -2
- package/fesm2022/sixbell-telco-sdk-components-forms-switch.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-textarea.mjs +27 -22
- package/fesm2022/sixbell-telco-sdk-components-forms-textarea.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-toggle.mjs +2 -2
- package/fesm2022/sixbell-telco-sdk-components-forms-toggle.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-notification.mjs +2 -2
- package/fesm2022/sixbell-telco-sdk-components-notification.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-overlay.mjs +3 -3
- package/fesm2022/sixbell-telco-sdk-components-overlay.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-paginator.mjs +4 -4
- package/fesm2022/sixbell-telco-sdk-components-paginator.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-progress.mjs +2 -2
- package/fesm2022/sixbell-telco-sdk-components-progress.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-segmented-button.mjs +329 -0
- package/fesm2022/sixbell-telco-sdk-components-segmented-button.mjs.map +1 -0
- package/fesm2022/sixbell-telco-sdk-components-sonner-toaster.mjs +4 -4
- package/fesm2022/sixbell-telco-sdk-components-sonner-toaster.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-sonner.mjs +4 -4
- package/fesm2022/sixbell-telco-sdk-components-sonner.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-tab.mjs +3 -3
- package/fesm2022/sixbell-telco-sdk-components-tab.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-table-tokens.mjs +14 -0
- package/fesm2022/sixbell-telco-sdk-components-table-tokens.mjs.map +1 -0
- package/fesm2022/sixbell-telco-sdk-components-table.mjs +63 -32
- package/fesm2022/sixbell-telco-sdk-components-table.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-tooltip.mjs +156 -25
- package/fesm2022/sixbell-telco-sdk-components-tooltip.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-tree.mjs +478 -0
- package/fesm2022/sixbell-telco-sdk-components-tree.mjs.map +1 -0
- package/fesm2022/sixbell-telco-sdk-components-wizard.mjs +18 -9
- package/fesm2022/sixbell-telco-sdk-components-wizard.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-directives-auto-focus.mjs +2 -2
- package/fesm2022/sixbell-telco-sdk-directives-auto-focus.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-directives-only-numbers.mjs +2 -2
- package/fesm2022/sixbell-telco-sdk-directives-only-numbers.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-directives-truncate.mjs +339 -0
- package/fesm2022/sixbell-telco-sdk-directives-truncate.mjs.map +1 -0
- package/fesm2022/sixbell-telco-sdk-layouts.mjs +43 -35
- package/fesm2022/sixbell-telco-sdk-layouts.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-utils-date.mjs +15 -2
- package/fesm2022/sixbell-telco-sdk-utils-date.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-utils-mfe.mjs +87 -2
- package/fesm2022/sixbell-telco-sdk-utils-mfe.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-utils-theme.mjs +234 -4
- package/fesm2022/sixbell-telco-sdk-utils-theme.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-utils-translation-testing.mjs +203 -0
- package/fesm2022/sixbell-telco-sdk-utils-translation-testing.mjs.map +1 -0
- package/fesm2022/sixbell-telco-sdk-utils-unsaved-changes.mjs +150 -0
- package/fesm2022/sixbell-telco-sdk-utils-unsaved-changes.mjs.map +1 -0
- package/i18n/sdk/en.json +224 -0
- package/i18n/sdk/es.json +224 -0
- package/i18n/sdk/pt.json +224 -0
- package/layouts/README.md +11 -10
- package/layouts/src/app-layout/app-layout.component.d.ts +11 -8
- package/layouts/src/layout.config.d.ts +1 -1
- package/layouts/src/navbar/navbar.component.d.ts +5 -5
- package/layouts/src/page-banner/page-banner.component.d.ts +6 -1
- package/layouts/src/side-menu/side-menu.component.d.ts +2 -2
- package/layouts/src/user-menu/user-menu.component.d.ts +5 -5
- package/package.json +51 -11
- package/src/_index.css +1616 -0
- package/utils/mfe/README.md +1 -0
- package/utils/mfe/src/hoist-property-rules.d.ts +13 -0
- package/utils/mfe/src/mfe-shadow-shell.component.d.ts +3 -0
- package/utils/theme/README.md +94 -1
- package/utils/theme/public-api.d.ts +2 -1
- package/utils/theme/src/models/theme.d.ts +32 -0
- package/utils/theme/src/overlay/theme-overlay.d.ts +33 -0
- package/utils/theme/src/providers/theme.provider.types.d.ts +7 -0
- package/utils/translation/README.md +61 -0
- package/utils/translation/testing/index.d.ts +5 -0
- package/utils/translation/testing/public-api.d.ts +2 -0
- package/utils/translation/testing/src/translation-testing.d.ts +96 -0
- package/utils/unsaved-changes/README.md +33 -0
- package/utils/unsaved-changes/index.d.ts +5 -0
- package/utils/unsaved-changes/public-api.d.ts +1 -0
- package/utils/unsaved-changes/src/unsaved-changes-dialog.component.d.ts +24 -0
- package/utils/unsaved-changes/src/unsaved-changes.d.ts +50 -0
|
@@ -0,0 +1,329 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, model, booleanAttribute, signal, viewChildren, inject, ElementRef, computed, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
4
|
+
import { IconComponent } from '@sixbell-telco/sdk/components/icon';
|
|
5
|
+
import { cn } from '@sixbell-telco/sdk/utils/cn';
|
|
6
|
+
import { cva } from 'class-variance-authority';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @internal
|
|
10
|
+
* Track (radiogroup) classes
|
|
11
|
+
*/
|
|
12
|
+
const segmentedButtonTrack = cva(['font-body', 'rounded-field', 'border', 'border-base-300', 'bg-base-100', 'max-w-full', 'items-stretch', 'gap-0.5', 'p-0.5'], {
|
|
13
|
+
variants: {
|
|
14
|
+
size: {
|
|
15
|
+
xs: ['h-6'],
|
|
16
|
+
sm: ['h-8'],
|
|
17
|
+
md: ['h-10'],
|
|
18
|
+
lg: ['h-12'],
|
|
19
|
+
xl: ['h-14'],
|
|
20
|
+
},
|
|
21
|
+
fullWidth: {
|
|
22
|
+
true: ['flex', 'w-full'],
|
|
23
|
+
false: ['inline-flex', 'w-max'],
|
|
24
|
+
},
|
|
25
|
+
disabled: {
|
|
26
|
+
true: ['opacity-50'],
|
|
27
|
+
false: [],
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
defaultVariants: {
|
|
31
|
+
size: 'md',
|
|
32
|
+
fullWidth: false,
|
|
33
|
+
disabled: false,
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
/**
|
|
37
|
+
* @internal
|
|
38
|
+
* Segment (radio) classes
|
|
39
|
+
*/
|
|
40
|
+
const segmentedButtonSegment = cva([
|
|
41
|
+
'inline-flex',
|
|
42
|
+
'min-w-0',
|
|
43
|
+
'items-center',
|
|
44
|
+
'justify-center',
|
|
45
|
+
'gap-1.5',
|
|
46
|
+
'rounded-selector',
|
|
47
|
+
'font-medium',
|
|
48
|
+
'leading-none',
|
|
49
|
+
'whitespace-nowrap',
|
|
50
|
+
'cursor-pointer',
|
|
51
|
+
'transition-colors',
|
|
52
|
+
'motion-reduce:transition-none',
|
|
53
|
+
'focus-visible:outline-2',
|
|
54
|
+
'focus-visible:outline-offset-1',
|
|
55
|
+
'focus-visible:outline-base-content',
|
|
56
|
+
'disabled:cursor-not-allowed',
|
|
57
|
+
'disabled:opacity-50',
|
|
58
|
+
], {
|
|
59
|
+
variants: {
|
|
60
|
+
variant: {
|
|
61
|
+
base: [],
|
|
62
|
+
primary: [],
|
|
63
|
+
secondary: [],
|
|
64
|
+
tertiary: [],
|
|
65
|
+
accent: [],
|
|
66
|
+
info: [],
|
|
67
|
+
success: [],
|
|
68
|
+
warning: [],
|
|
69
|
+
error: [],
|
|
70
|
+
},
|
|
71
|
+
size: {
|
|
72
|
+
xs: ['px-2', 'text-xs'],
|
|
73
|
+
sm: ['px-3', 'text-[13px]'],
|
|
74
|
+
md: ['px-4', 'text-sm'],
|
|
75
|
+
lg: ['px-5', 'text-[15px]'],
|
|
76
|
+
xl: ['px-6', 'text-base'],
|
|
77
|
+
},
|
|
78
|
+
selected: {
|
|
79
|
+
true: [],
|
|
80
|
+
false: ['text-base-content/70', 'enabled:hover:bg-base-content/5', 'enabled:hover:text-base-content'],
|
|
81
|
+
},
|
|
82
|
+
fullWidth: {
|
|
83
|
+
true: ['flex-1'],
|
|
84
|
+
false: ['shrink-0'],
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
compoundVariants: [
|
|
88
|
+
{ selected: true, variant: 'base', class: 'bg-base-300 text-base-content' },
|
|
89
|
+
{ selected: true, variant: 'primary', class: 'bg-primary text-primary-content' },
|
|
90
|
+
{ selected: true, variant: 'secondary', class: 'bg-secondary text-secondary-content' },
|
|
91
|
+
{ selected: true, variant: 'tertiary', class: 'bg-tertiary text-tertiary-content' },
|
|
92
|
+
{ selected: true, variant: 'accent', class: 'bg-accent text-accent-content' },
|
|
93
|
+
{ selected: true, variant: 'info', class: 'bg-info text-info-content' },
|
|
94
|
+
{ selected: true, variant: 'success', class: 'bg-success text-success-content' },
|
|
95
|
+
{ selected: true, variant: 'warning', class: 'bg-warning text-warning-content' },
|
|
96
|
+
{ selected: true, variant: 'error', class: 'bg-error text-error-content' },
|
|
97
|
+
],
|
|
98
|
+
defaultVariants: {
|
|
99
|
+
variant: 'base',
|
|
100
|
+
size: 'md',
|
|
101
|
+
selected: false,
|
|
102
|
+
fullWidth: false,
|
|
103
|
+
},
|
|
104
|
+
});
|
|
105
|
+
const NEXT_KEYS = new Set(['ArrowRight', 'ArrowDown']);
|
|
106
|
+
const PREVIOUS_KEYS = new Set(['ArrowLeft', 'ArrowUp']);
|
|
107
|
+
/**
|
|
108
|
+
* A single-choice segmented control: a compact, keyboard-accessible radio group styled like a button bar.
|
|
109
|
+
*
|
|
110
|
+
* @remarks
|
|
111
|
+
* - WAI-ARIA radio group pattern: `role="radiogroup"` with `role="radio"` segments, a single tab stop
|
|
112
|
+
* (roving tabindex), arrow keys move focus and select (wrapping, disabled segments skipped), Home/End
|
|
113
|
+
* jump to the first/last segment.
|
|
114
|
+
* - Two-way binding through `[(value)]`, and a `ControlValueAccessor` for reactive and template forms
|
|
115
|
+
* (`formControlName`, `ngModel`), including the disabled state.
|
|
116
|
+
* - Name the group with `ariaLabel` or `ariaLabelledby`; icon-only segments need their own `ariaLabel`.
|
|
117
|
+
* - Use it to pick a value. To switch between content panels, use `st-tab`.
|
|
118
|
+
*
|
|
119
|
+
* @example
|
|
120
|
+
* ```html
|
|
121
|
+
* <st-segmented-button ariaLabel="Period" [options]="periods" [(value)]="period" />
|
|
122
|
+
* <st-segmented-button ariaLabel="Format" variant="primary" fullWidth [options]="formats" formControlName="format" />
|
|
123
|
+
* ```
|
|
124
|
+
*/
|
|
125
|
+
class SegmentedButtonComponent {
|
|
126
|
+
/** Segments to render, in order. */
|
|
127
|
+
options = input([]);
|
|
128
|
+
/** Selected value (two-way: `[(value)]`). `null` selects nothing. */
|
|
129
|
+
value = model(null);
|
|
130
|
+
/**
|
|
131
|
+
* Color of the selected segment.
|
|
132
|
+
* @defaultValue 'base'
|
|
133
|
+
*/
|
|
134
|
+
variant = input();
|
|
135
|
+
/**
|
|
136
|
+
* Size, on the same scale as `st-button`.
|
|
137
|
+
* @defaultValue 'md'
|
|
138
|
+
*/
|
|
139
|
+
size = input();
|
|
140
|
+
/** Stretch to the parent width; segments share the space equally. */
|
|
141
|
+
fullWidth = input(false, { transform: booleanAttribute });
|
|
142
|
+
/** Disables every segment. */
|
|
143
|
+
disabled = input(false, { transform: booleanAttribute });
|
|
144
|
+
/** Accessible name of the group. */
|
|
145
|
+
ariaLabel = input('');
|
|
146
|
+
/** Id(s) of the element(s) naming the group, such as a visible label. */
|
|
147
|
+
ariaLabelledby = input('');
|
|
148
|
+
/** Extra classes merged onto the track. */
|
|
149
|
+
class = input('');
|
|
150
|
+
formDisabled = signal(false);
|
|
151
|
+
segments = viewChildren('segment');
|
|
152
|
+
host = inject(ElementRef).nativeElement;
|
|
153
|
+
onChange = () => undefined;
|
|
154
|
+
onTouched = () => undefined;
|
|
155
|
+
/** @internal */
|
|
156
|
+
isDisabled = computed(() => this.disabled() || this.formDisabled());
|
|
157
|
+
/** @internal Index of the segment that holds the single tab stop. */
|
|
158
|
+
tabStopIndex = computed(() => {
|
|
159
|
+
const options = this.options();
|
|
160
|
+
const selected = options.findIndex((option) => option.value === this.value() && !option.disabled);
|
|
161
|
+
return selected >= 0 ? selected : options.findIndex((option) => !option.disabled);
|
|
162
|
+
});
|
|
163
|
+
/** @internal */
|
|
164
|
+
trackClass = computed(() => cn(segmentedButtonTrack({ size: this.size() ?? 'md', fullWidth: this.fullWidth(), disabled: this.isDisabled() }), this.class()));
|
|
165
|
+
/** @internal */
|
|
166
|
+
isSelected(option) {
|
|
167
|
+
return option.value === this.value();
|
|
168
|
+
}
|
|
169
|
+
/** @internal */
|
|
170
|
+
segmentClass(option) {
|
|
171
|
+
return segmentedButtonSegment({
|
|
172
|
+
variant: this.variant() ?? 'base',
|
|
173
|
+
size: this.size() ?? 'md',
|
|
174
|
+
selected: this.isSelected(option),
|
|
175
|
+
fullWidth: this.fullWidth(),
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
/** Selects a segment, as a click or arrow key does. Ignored for disabled segments. */
|
|
179
|
+
select(option) {
|
|
180
|
+
if (this.isDisabled() || option.disabled || this.isSelected(option))
|
|
181
|
+
return;
|
|
182
|
+
this.value.set(option.value);
|
|
183
|
+
this.onChange(option.value);
|
|
184
|
+
}
|
|
185
|
+
/** @internal */
|
|
186
|
+
onKeydown(event, index) {
|
|
187
|
+
const options = this.options();
|
|
188
|
+
const rtl = getComputedStyle(this.host).direction === 'rtl';
|
|
189
|
+
const isHorizontal = event.key === 'ArrowLeft' || event.key === 'ArrowRight';
|
|
190
|
+
let step = 0;
|
|
191
|
+
if (NEXT_KEYS.has(event.key))
|
|
192
|
+
step = 1;
|
|
193
|
+
else if (PREVIOUS_KEYS.has(event.key))
|
|
194
|
+
step = -1;
|
|
195
|
+
if (rtl && isHorizontal)
|
|
196
|
+
step = -step;
|
|
197
|
+
let target = -1;
|
|
198
|
+
if (event.key === 'Home')
|
|
199
|
+
target = this.findEnabled(options, -1, 1);
|
|
200
|
+
else if (event.key === 'End')
|
|
201
|
+
target = this.findEnabled(options, options.length, -1);
|
|
202
|
+
else if (step === 0)
|
|
203
|
+
return;
|
|
204
|
+
else
|
|
205
|
+
target = this.findEnabled(options, index, step, true);
|
|
206
|
+
event.preventDefault();
|
|
207
|
+
if (target < 0 || target === index)
|
|
208
|
+
return;
|
|
209
|
+
this.select(options[target]);
|
|
210
|
+
this.segments()[target]?.nativeElement.focus();
|
|
211
|
+
}
|
|
212
|
+
/** @internal */
|
|
213
|
+
onFocusOut(event) {
|
|
214
|
+
const next = event.relatedTarget;
|
|
215
|
+
if (!(next instanceof Node) || !this.host.contains(next))
|
|
216
|
+
this.onTouched();
|
|
217
|
+
}
|
|
218
|
+
writeValue(value) {
|
|
219
|
+
this.value.set(value ?? null);
|
|
220
|
+
}
|
|
221
|
+
registerOnChange(fn) {
|
|
222
|
+
this.onChange = fn;
|
|
223
|
+
}
|
|
224
|
+
registerOnTouched(fn) {
|
|
225
|
+
this.onTouched = fn;
|
|
226
|
+
}
|
|
227
|
+
setDisabledState(isDisabled) {
|
|
228
|
+
this.formDisabled.set(isDisabled);
|
|
229
|
+
}
|
|
230
|
+
findEnabled(options, from, step, wrap = false) {
|
|
231
|
+
const count = options.length;
|
|
232
|
+
for (let offset = 1; offset <= count; offset += 1) {
|
|
233
|
+
let index = from + step * offset;
|
|
234
|
+
if (wrap)
|
|
235
|
+
index = ((index % count) + count) % count;
|
|
236
|
+
if (index < 0 || index >= count)
|
|
237
|
+
return -1;
|
|
238
|
+
if (!options[index].disabled)
|
|
239
|
+
return index;
|
|
240
|
+
}
|
|
241
|
+
return -1;
|
|
242
|
+
}
|
|
243
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: SegmentedButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
244
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: SegmentedButtonComponent, isStandalone: true, selector: "st-segmented-button", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "ariaLabelledby", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { attributes: { "role": "radiogroup" }, listeners: { "focusout": "onFocusOut($event)" }, properties: { "class": "trackClass()", "attr.aria-label": "ariaLabel() || null", "attr.aria-labelledby": "ariaLabelledby() || null", "attr.aria-disabled": "isDisabled() ? \"true\" : null" } }, providers: [
|
|
245
|
+
{
|
|
246
|
+
provide: NG_VALUE_ACCESSOR,
|
|
247
|
+
useExisting: forwardRef(() => SegmentedButtonComponent),
|
|
248
|
+
multi: true,
|
|
249
|
+
},
|
|
250
|
+
], viewQueries: [{ propertyName: "segments", predicate: ["segment"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
251
|
+
@for (option of options(); track option.value; let index = $index) {
|
|
252
|
+
<button
|
|
253
|
+
#segment
|
|
254
|
+
type="button"
|
|
255
|
+
role="radio"
|
|
256
|
+
[class]="segmentClass(option)"
|
|
257
|
+
[attr.aria-checked]="isSelected(option)"
|
|
258
|
+
[attr.aria-label]="option.ariaLabel || null"
|
|
259
|
+
[attr.tabindex]="index === tabStopIndex() ? 0 : -1"
|
|
260
|
+
[attr.data-value]="option.value"
|
|
261
|
+
[disabled]="isDisabled() || !!option.disabled"
|
|
262
|
+
(click)="select(option)"
|
|
263
|
+
(keydown)="onKeydown($event, index)"
|
|
264
|
+
>
|
|
265
|
+
@if (option.icon) {
|
|
266
|
+
<st-icon [icon]="option.icon" color="inherit" size="auto" aria-hidden="true" />
|
|
267
|
+
}
|
|
268
|
+
@if (option.label) {
|
|
269
|
+
<span class="truncate">{{ option.label }}</span>
|
|
270
|
+
}
|
|
271
|
+
</button>
|
|
272
|
+
}
|
|
273
|
+
`, isInline: true, dependencies: [{ kind: "component", type: IconComponent, selector: "st-icon", inputs: ["color", "size", "icon", "ariaLabel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
274
|
+
}
|
|
275
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: SegmentedButtonComponent, decorators: [{
|
|
276
|
+
type: Component,
|
|
277
|
+
args: [{
|
|
278
|
+
selector: 'st-segmented-button',
|
|
279
|
+
standalone: true,
|
|
280
|
+
imports: [IconComponent],
|
|
281
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
282
|
+
providers: [
|
|
283
|
+
{
|
|
284
|
+
provide: NG_VALUE_ACCESSOR,
|
|
285
|
+
useExisting: forwardRef(() => SegmentedButtonComponent),
|
|
286
|
+
multi: true,
|
|
287
|
+
},
|
|
288
|
+
],
|
|
289
|
+
host: {
|
|
290
|
+
role: 'radiogroup',
|
|
291
|
+
'[class]': 'trackClass()',
|
|
292
|
+
'[attr.aria-label]': 'ariaLabel() || null',
|
|
293
|
+
'[attr.aria-labelledby]': 'ariaLabelledby() || null',
|
|
294
|
+
'[attr.aria-disabled]': 'isDisabled() ? "true" : null',
|
|
295
|
+
'(focusout)': 'onFocusOut($event)',
|
|
296
|
+
},
|
|
297
|
+
template: `
|
|
298
|
+
@for (option of options(); track option.value; let index = $index) {
|
|
299
|
+
<button
|
|
300
|
+
#segment
|
|
301
|
+
type="button"
|
|
302
|
+
role="radio"
|
|
303
|
+
[class]="segmentClass(option)"
|
|
304
|
+
[attr.aria-checked]="isSelected(option)"
|
|
305
|
+
[attr.aria-label]="option.ariaLabel || null"
|
|
306
|
+
[attr.tabindex]="index === tabStopIndex() ? 0 : -1"
|
|
307
|
+
[attr.data-value]="option.value"
|
|
308
|
+
[disabled]="isDisabled() || !!option.disabled"
|
|
309
|
+
(click)="select(option)"
|
|
310
|
+
(keydown)="onKeydown($event, index)"
|
|
311
|
+
>
|
|
312
|
+
@if (option.icon) {
|
|
313
|
+
<st-icon [icon]="option.icon" color="inherit" size="auto" aria-hidden="true" />
|
|
314
|
+
}
|
|
315
|
+
@if (option.label) {
|
|
316
|
+
<span class="truncate">{{ option.label }}</span>
|
|
317
|
+
}
|
|
318
|
+
</button>
|
|
319
|
+
}
|
|
320
|
+
`,
|
|
321
|
+
}]
|
|
322
|
+
}] });
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* Generated bundle index. Do not edit.
|
|
326
|
+
*/
|
|
327
|
+
|
|
328
|
+
export { SegmentedButtonComponent, segmentedButtonSegment, segmentedButtonTrack };
|
|
329
|
+
//# sourceMappingURL=sixbell-telco-sdk-components-segmented-button.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sixbell-telco-sdk-components-segmented-button.mjs","sources":["../../../projects/sdk/components/segmented-button/src/segmented-button.component.ts","../../../projects/sdk/components/segmented-button/sixbell-telco-sdk-components-segmented-button.ts"],"sourcesContent":["import {\n\tbooleanAttribute,\n\tChangeDetectionStrategy,\n\tComponent,\n\tcomputed,\n\tElementRef,\n\tforwardRef,\n\tinject,\n\tinput,\n\tmodel,\n\tsignal,\n\tviewChildren,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { IconComponent } from '@sixbell-telco/sdk/components/icon';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\nimport { cva } from 'class-variance-authority';\n\n/** Value carried by a segment */\nexport type SegmentedButtonValue = string | number | boolean;\n\n/** One segment of `st-segmented-button` */\nexport type SegmentedButtonOption = {\n\tvalue: SegmentedButtonValue;\n\t/** Visible text. Optional when `icon` is set, but then `ariaLabel` is required. */\n\tlabel?: string;\n\t/** Icon SVG (same format as `st-icon` `icon`) rendered before the label. */\n\ticon?: string;\n\t/** Accessible name for icon-only segments. */\n\tariaLabel?: string;\n\tdisabled?: boolean;\n};\n\n/** Possible segmented button color variants (selected segment) */\nexport type SegmentedButtonVariantProps =\n\t'base' | 'primary' | 'secondary' | 'tertiary' | 'accent' | 'info' | 'success' | 'warning' | 'error' | null | undefined;\n\n/** Possible segmented button sizes (same scale as `st-button`) */\nexport type SegmentedButtonSizeProps = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | null | undefined;\n\n/**\n * @internal\n * Track (radiogroup) classes\n */\nexport const segmentedButtonTrack = cva(\n\t['font-body', 'rounded-field', 'border', 'border-base-300', 'bg-base-100', 'max-w-full', 'items-stretch', 'gap-0.5', 'p-0.5'],\n\t{\n\t\tvariants: {\n\t\t\tsize: {\n\t\t\t\txs: ['h-6'],\n\t\t\t\tsm: ['h-8'],\n\t\t\t\tmd: ['h-10'],\n\t\t\t\tlg: ['h-12'],\n\t\t\t\txl: ['h-14'],\n\t\t\t},\n\t\t\tfullWidth: {\n\t\t\t\ttrue: ['flex', 'w-full'],\n\t\t\t\tfalse: ['inline-flex', 'w-max'],\n\t\t\t},\n\t\t\tdisabled: {\n\t\t\t\ttrue: ['opacity-50'],\n\t\t\t\tfalse: [],\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tsize: 'md',\n\t\t\tfullWidth: false,\n\t\t\tdisabled: false,\n\t\t},\n\t},\n);\n\n/**\n * @internal\n * Segment (radio) classes\n */\nexport const segmentedButtonSegment = cva(\n\t[\n\t\t'inline-flex',\n\t\t'min-w-0',\n\t\t'items-center',\n\t\t'justify-center',\n\t\t'gap-1.5',\n\t\t'rounded-selector',\n\t\t'font-medium',\n\t\t'leading-none',\n\t\t'whitespace-nowrap',\n\t\t'cursor-pointer',\n\t\t'transition-colors',\n\t\t'motion-reduce:transition-none',\n\t\t'focus-visible:outline-2',\n\t\t'focus-visible:outline-offset-1',\n\t\t'focus-visible:outline-base-content',\n\t\t'disabled:cursor-not-allowed',\n\t\t'disabled:opacity-50',\n\t],\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tbase: [],\n\t\t\t\tprimary: [],\n\t\t\t\tsecondary: [],\n\t\t\t\ttertiary: [],\n\t\t\t\taccent: [],\n\t\t\t\tinfo: [],\n\t\t\t\tsuccess: [],\n\t\t\t\twarning: [],\n\t\t\t\terror: [],\n\t\t\t},\n\t\t\tsize: {\n\t\t\t\txs: ['px-2', 'text-xs'],\n\t\t\t\tsm: ['px-3', 'text-[13px]'],\n\t\t\t\tmd: ['px-4', 'text-sm'],\n\t\t\t\tlg: ['px-5', 'text-[15px]'],\n\t\t\t\txl: ['px-6', 'text-base'],\n\t\t\t},\n\t\t\tselected: {\n\t\t\t\ttrue: [],\n\t\t\t\tfalse: ['text-base-content/70', 'enabled:hover:bg-base-content/5', 'enabled:hover:text-base-content'],\n\t\t\t},\n\t\t\tfullWidth: {\n\t\t\t\ttrue: ['flex-1'],\n\t\t\t\tfalse: ['shrink-0'],\n\t\t\t},\n\t\t},\n\t\tcompoundVariants: [\n\t\t\t{ selected: true, variant: 'base', class: 'bg-base-300 text-base-content' },\n\t\t\t{ selected: true, variant: 'primary', class: 'bg-primary text-primary-content' },\n\t\t\t{ selected: true, variant: 'secondary', class: 'bg-secondary text-secondary-content' },\n\t\t\t{ selected: true, variant: 'tertiary', class: 'bg-tertiary text-tertiary-content' },\n\t\t\t{ selected: true, variant: 'accent', class: 'bg-accent text-accent-content' },\n\t\t\t{ selected: true, variant: 'info', class: 'bg-info text-info-content' },\n\t\t\t{ selected: true, variant: 'success', class: 'bg-success text-success-content' },\n\t\t\t{ selected: true, variant: 'warning', class: 'bg-warning text-warning-content' },\n\t\t\t{ selected: true, variant: 'error', class: 'bg-error text-error-content' },\n\t\t],\n\t\tdefaultVariants: {\n\t\t\tvariant: 'base',\n\t\t\tsize: 'md',\n\t\t\tselected: false,\n\t\t\tfullWidth: false,\n\t\t},\n\t},\n);\n\nconst NEXT_KEYS = new Set(['ArrowRight', 'ArrowDown']);\nconst PREVIOUS_KEYS = new Set(['ArrowLeft', 'ArrowUp']);\n\n/**\n * A single-choice segmented control: a compact, keyboard-accessible radio group styled like a button bar.\n *\n * @remarks\n * - WAI-ARIA radio group pattern: `role=\"radiogroup\"` with `role=\"radio\"` segments, a single tab stop\n * (roving tabindex), arrow keys move focus and select (wrapping, disabled segments skipped), Home/End\n * jump to the first/last segment.\n * - Two-way binding through `[(value)]`, and a `ControlValueAccessor` for reactive and template forms\n * (`formControlName`, `ngModel`), including the disabled state.\n * - Name the group with `ariaLabel` or `ariaLabelledby`; icon-only segments need their own `ariaLabel`.\n * - Use it to pick a value. To switch between content panels, use `st-tab`.\n *\n * @example\n * ```html\n * <st-segmented-button ariaLabel=\"Period\" [options]=\"periods\" [(value)]=\"period\" />\n * <st-segmented-button ariaLabel=\"Format\" variant=\"primary\" fullWidth [options]=\"formats\" formControlName=\"format\" />\n * ```\n */\n@Component({\n\tselector: 'st-segmented-button',\n\tstandalone: true,\n\timports: [IconComponent],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tproviders: [\n\t\t{\n\t\t\tprovide: NG_VALUE_ACCESSOR,\n\t\t\tuseExisting: forwardRef(() => SegmentedButtonComponent),\n\t\t\tmulti: true,\n\t\t},\n\t],\n\thost: {\n\t\trole: 'radiogroup',\n\t\t'[class]': 'trackClass()',\n\t\t'[attr.aria-label]': 'ariaLabel() || null',\n\t\t'[attr.aria-labelledby]': 'ariaLabelledby() || null',\n\t\t'[attr.aria-disabled]': 'isDisabled() ? \"true\" : null',\n\t\t'(focusout)': 'onFocusOut($event)',\n\t},\n\ttemplate: `\n\t\t@for (option of options(); track option.value; let index = $index) {\n\t\t\t<button\n\t\t\t\t#segment\n\t\t\t\ttype=\"button\"\n\t\t\t\trole=\"radio\"\n\t\t\t\t[class]=\"segmentClass(option)\"\n\t\t\t\t[attr.aria-checked]=\"isSelected(option)\"\n\t\t\t\t[attr.aria-label]=\"option.ariaLabel || null\"\n\t\t\t\t[attr.tabindex]=\"index === tabStopIndex() ? 0 : -1\"\n\t\t\t\t[attr.data-value]=\"option.value\"\n\t\t\t\t[disabled]=\"isDisabled() || !!option.disabled\"\n\t\t\t\t(click)=\"select(option)\"\n\t\t\t\t(keydown)=\"onKeydown($event, index)\"\n\t\t\t>\n\t\t\t\t@if (option.icon) {\n\t\t\t\t\t<st-icon [icon]=\"option.icon\" color=\"inherit\" size=\"auto\" aria-hidden=\"true\" />\n\t\t\t\t}\n\t\t\t\t@if (option.label) {\n\t\t\t\t\t<span class=\"truncate\">{{ option.label }}</span>\n\t\t\t\t}\n\t\t\t</button>\n\t\t}\n\t`,\n})\nexport class SegmentedButtonComponent implements ControlValueAccessor {\n\t/** Segments to render, in order. */\n\treadonly options = input<SegmentedButtonOption[]>([]);\n\n\t/** Selected value (two-way: `[(value)]`). `null` selects nothing. */\n\treadonly value = model<SegmentedButtonValue | null>(null);\n\n\t/**\n\t * Color of the selected segment.\n\t * @defaultValue 'base'\n\t */\n\treadonly variant = input<SegmentedButtonVariantProps>();\n\n\t/**\n\t * Size, on the same scale as `st-button`.\n\t * @defaultValue 'md'\n\t */\n\treadonly size = input<SegmentedButtonSizeProps>();\n\n\t/** Stretch to the parent width; segments share the space equally. */\n\treadonly fullWidth = input(false, { transform: booleanAttribute });\n\n\t/** Disables every segment. */\n\treadonly disabled = input(false, { transform: booleanAttribute });\n\n\t/** Accessible name of the group. */\n\treadonly ariaLabel = input<string>('');\n\n\t/** Id(s) of the element(s) naming the group, such as a visible label. */\n\treadonly ariaLabelledby = input<string>('');\n\n\t/** Extra classes merged onto the track. */\n\treadonly class = input<string>('');\n\n\tprivate readonly formDisabled = signal(false);\n\tprivate readonly segments = viewChildren<ElementRef<HTMLButtonElement>>('segment');\n\tprivate readonly host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n\tprivate onChange: (value: SegmentedButtonValue | null) => void = () => undefined;\n\tprivate onTouched: () => void = () => undefined;\n\n\t/** @internal */\n\treadonly isDisabled = computed(() => this.disabled() || this.formDisabled());\n\n\t/** @internal Index of the segment that holds the single tab stop. */\n\treadonly tabStopIndex = computed(() => {\n\t\tconst options = this.options();\n\t\tconst selected = options.findIndex((option) => option.value === this.value() && !option.disabled);\n\t\treturn selected >= 0 ? selected : options.findIndex((option) => !option.disabled);\n\t});\n\n\t/** @internal */\n\treadonly trackClass = computed(() =>\n\t\tcn(segmentedButtonTrack({ size: this.size() ?? 'md', fullWidth: this.fullWidth(), disabled: this.isDisabled() }), this.class()),\n\t);\n\n\t/** @internal */\n\tisSelected(option: SegmentedButtonOption): boolean {\n\t\treturn option.value === this.value();\n\t}\n\n\t/** @internal */\n\tsegmentClass(option: SegmentedButtonOption): string {\n\t\treturn segmentedButtonSegment({\n\t\t\tvariant: this.variant() ?? 'base',\n\t\t\tsize: this.size() ?? 'md',\n\t\t\tselected: this.isSelected(option),\n\t\t\tfullWidth: this.fullWidth(),\n\t\t});\n\t}\n\n\t/** Selects a segment, as a click or arrow key does. Ignored for disabled segments. */\n\tselect(option: SegmentedButtonOption): void {\n\t\tif (this.isDisabled() || option.disabled || this.isSelected(option)) return;\n\t\tthis.value.set(option.value);\n\t\tthis.onChange(option.value);\n\t}\n\n\t/** @internal */\n\tonKeydown(event: KeyboardEvent, index: number): void {\n\t\tconst options = this.options();\n\t\tconst rtl = getComputedStyle(this.host).direction === 'rtl';\n\t\tconst isHorizontal = event.key === 'ArrowLeft' || event.key === 'ArrowRight';\n\t\tlet step = 0;\n\t\tif (NEXT_KEYS.has(event.key)) step = 1;\n\t\telse if (PREVIOUS_KEYS.has(event.key)) step = -1;\n\t\tif (rtl && isHorizontal) step = -step;\n\n\t\tlet target = -1;\n\t\tif (event.key === 'Home') target = this.findEnabled(options, -1, 1);\n\t\telse if (event.key === 'End') target = this.findEnabled(options, options.length, -1);\n\t\telse if (step === 0) return;\n\t\telse target = this.findEnabled(options, index, step, true);\n\n\t\tevent.preventDefault();\n\t\tif (target < 0 || target === index) return;\n\t\tthis.select(options[target]);\n\t\tthis.segments()[target]?.nativeElement.focus();\n\t}\n\n\t/** @internal */\n\tonFocusOut(event: FocusEvent): void {\n\t\tconst next = event.relatedTarget;\n\t\tif (!(next instanceof Node) || !this.host.contains(next)) this.onTouched();\n\t}\n\n\twriteValue(value: SegmentedButtonValue | null): void {\n\t\tthis.value.set(value ?? null);\n\t}\n\n\tregisterOnChange(fn: (value: SegmentedButtonValue | null) => void): void {\n\t\tthis.onChange = fn;\n\t}\n\n\tregisterOnTouched(fn: () => void): void {\n\t\tthis.onTouched = fn;\n\t}\n\n\tsetDisabledState(isDisabled: boolean): void {\n\t\tthis.formDisabled.set(isDisabled);\n\t}\n\n\tprivate findEnabled(options: SegmentedButtonOption[], from: number, step: number, wrap = false): number {\n\t\tconst count = options.length;\n\t\tfor (let offset = 1; offset <= count; offset += 1) {\n\t\t\tlet index = from + step * offset;\n\t\t\tif (wrap) index = ((index % count) + count) % count;\n\t\t\tif (index < 0 || index >= count) return -1;\n\t\t\tif (!options[index].disabled) return index;\n\t\t}\n\t\treturn -1;\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAwCA;;;AAGG;AACI,MAAM,oBAAoB,GAAG,GAAG,CACtC,CAAC,WAAW,EAAE,eAAe,EAAE,QAAQ,EAAE,iBAAiB,EAAE,aAAa,EAAE,YAAY,EAAE,eAAe,EAAE,SAAS,EAAE,OAAO,CAAC,EAC7H;AACC,IAAA,QAAQ,EAAE;AACT,QAAA,IAAI,EAAE;YACL,EAAE,EAAE,CAAC,KAAK,CAAC;YACX,EAAE,EAAE,CAAC,KAAK,CAAC;YACX,EAAE,EAAE,CAAC,MAAM,CAAC;YACZ,EAAE,EAAE,CAAC,MAAM,CAAC;YACZ,EAAE,EAAE,CAAC,MAAM,CAAC;AACZ,SAAA;AACD,QAAA,SAAS,EAAE;AACV,YAAA,IAAI,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC;AACxB,YAAA,KAAK,EAAE,CAAC,aAAa,EAAE,OAAO,CAAC;AAC/B,SAAA;AACD,QAAA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AA,EAAA,MAAA,EAAA,WAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FA0CX,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBA7CpC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,QAAQ,EAAE,qBAAqB;AAC/B,oBAAA,UAAU,EAAE,IAAI;oBAChB,OAAO,EAAE,CAAC,aAAa,CAAC;oBACxB,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,SAAS,EAAE;AACV,wBAAA;AACC,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,8BAA8B,CAAC;AACvD,4BAAA,KAAK,EAAE,IAAI;AACX,yBAAA;AACD,qBAAA;AACD,oBAAA,IAAI,EAAE;AACL,wBAAA,IAAI,EAAE,YAAY;AAClB,wBAAA,SAAS,EAAE,cAAc;AACzB,wBAAA,mBAAmB,EAAE,qBAAqB;AAC1C,wBAAA,wBAAwB,EAAE,0BAA0B;AACpD,wBAAA,sBAAsB,EAAE,8BAA8B;AACtD,wBAAA,YAAY,EAAE,oBAAoB;AAClC,qBAAA;AACD,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;AAuBT,CAAA,CAAA;AACD,iBAAA;;;AClND;;AAEG;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CommonModule } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { input, computed, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { input, booleanAttribute, computed, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
4
4
|
import { cn } from '@sixbell-telco/sdk/utils/cn';
|
|
5
5
|
import { NgxSonnerToaster } from 'ngx-sonner';
|
|
6
6
|
|
|
@@ -30,12 +30,12 @@ class SonnerToasterComponent {
|
|
|
30
30
|
* (semantic border and text color on the base-200 surface, applied through the SDK classes).
|
|
31
31
|
* @defaultValue false
|
|
32
32
|
*/
|
|
33
|
-
richColors = input(false);
|
|
33
|
+
richColors = input(false, { transform: booleanAttribute });
|
|
34
34
|
/**
|
|
35
35
|
* Whether to expand the toast on hover
|
|
36
36
|
* @defaultValue false
|
|
37
37
|
*/
|
|
38
|
-
expand = input(false);
|
|
38
|
+
expand = input(false, { transform: booleanAttribute });
|
|
39
39
|
/**
|
|
40
40
|
* Maximum number of visible toasts
|
|
41
41
|
* @defaultValue 3
|
|
@@ -55,7 +55,7 @@ class SonnerToasterComponent {
|
|
|
55
55
|
* Whether to show close button
|
|
56
56
|
* @defaultValue false
|
|
57
57
|
*/
|
|
58
|
-
closeButton = input(false);
|
|
58
|
+
closeButton = input(false, { transform: booleanAttribute });
|
|
59
59
|
/**
|
|
60
60
|
* Duration for the toast in milliseconds
|
|
61
61
|
* @defaultValue 4000
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sixbell-telco-sdk-components-sonner-toaster.mjs","sources":["../../../projects/sdk/components/sonner/toaster/src/toaster.component.ts","../../../projects/sdk/components/sonner/toaster/sixbell-telco-sdk-components-sonner-toaster.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\nimport { NgxSonnerToaster } from 'ngx-sonner';\n\n/**\n * Sixbell Telco Sonner Toaster Component\n *\n * A wrapper around ngx-sonner-toaster that provides Tailwind CSS styling and semantic color variants.\n * This component proxies the ngx-sonner-toaster functionality while applying the SDK's design system.\n *\n * @example\n * ```html\n * <st-sonner-toaster\n * [theme]=\"'light'\"\n * [position]=\"'bottom-right'\"\n * [richColors]=\"true\"\n * />\n * ```\n */\n@Component({\n\tselector: 'st-sonner-toaster',\n\timports: [CommonModule, NgxSonnerToaster],\n\ttemplate: `\n\t\t<ngx-sonner-toaster\n\t\t\t[dir]=\"dir()\"\n\t\t\t[expand]=\"expand()\"\n\t\t\t[visibleToasts]=\"visibleToasts()\"\n\t\t\t[position]=\"position()\"\n\t\t\t[offset]=\"offset()\"\n\t\t\t[closeButton]=\"closeButton()\"\n\t\t\t[duration]=\"duration()\"\n\t\t\t[toastOptions]=\"toastOptions()\"\n\t\t/>\n\t`,\n\tstandalone: true,\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SonnerToasterComponent {\n\t/**\n\t * Direction for the toasts\n\t * @defaultValue 'ltr'\n\t */\n\tdir = input<'ltr' | 'rtl'>('ltr');\n\n\t/**\n\t * Whether to use rich colors for semantic toasts\n\t * (semantic border and text color on the base-200 surface, applied through the SDK classes).\n\t * @defaultValue false\n\t */\n\trichColors = input
|
|
1
|
+
{"version":3,"file":"sixbell-telco-sdk-components-sonner-toaster.mjs","sources":["../../../projects/sdk/components/sonner/toaster/src/toaster.component.ts","../../../projects/sdk/components/sonner/toaster/sixbell-telco-sdk-components-sonner-toaster.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { booleanAttribute, ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\nimport { NgxSonnerToaster } from 'ngx-sonner';\n\n/**\n * Sixbell Telco Sonner Toaster Component\n *\n * A wrapper around ngx-sonner-toaster that provides Tailwind CSS styling and semantic color variants.\n * This component proxies the ngx-sonner-toaster functionality while applying the SDK's design system.\n *\n * @example\n * ```html\n * <st-sonner-toaster\n * [theme]=\"'light'\"\n * [position]=\"'bottom-right'\"\n * [richColors]=\"true\"\n * />\n * ```\n */\n@Component({\n\tselector: 'st-sonner-toaster',\n\timports: [CommonModule, NgxSonnerToaster],\n\ttemplate: `\n\t\t<ngx-sonner-toaster\n\t\t\t[dir]=\"dir()\"\n\t\t\t[expand]=\"expand()\"\n\t\t\t[visibleToasts]=\"visibleToasts()\"\n\t\t\t[position]=\"position()\"\n\t\t\t[offset]=\"offset()\"\n\t\t\t[closeButton]=\"closeButton()\"\n\t\t\t[duration]=\"duration()\"\n\t\t\t[toastOptions]=\"toastOptions()\"\n\t\t/>\n\t`,\n\tstandalone: true,\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SonnerToasterComponent {\n\t/**\n\t * Direction for the toasts\n\t * @defaultValue 'ltr'\n\t */\n\tdir = input<'ltr' | 'rtl'>('ltr');\n\n\t/**\n\t * Whether to use rich colors for semantic toasts\n\t * (semantic border and text color on the base-200 surface, applied through the SDK classes).\n\t * @defaultValue false\n\t */\n\trichColors = input(false, { transform: booleanAttribute });\n\n\t/**\n\t * Whether to expand the toast on hover\n\t * @defaultValue false\n\t */\n\texpand = input(false, { transform: booleanAttribute });\n\n\t/**\n\t * Maximum number of visible toasts\n\t * @defaultValue 3\n\t */\n\tvisibleToasts = input<number>(3);\n\n\t/**\n\t * Position of the toasts\n\t * @defaultValue 'bottom-right'\n\t */\n\tposition = input<'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'top-center' | 'bottom-center'>('bottom-right');\n\n\t/**\n\t * Offset from the edge of the screen\n\t * @defaultValue '16px'\n\t */\n\toffset = input<string>('16px');\n\n\t/**\n\t * Whether to show close button\n\t * @defaultValue false\n\t */\n\tcloseButton = input(false, { transform: booleanAttribute });\n\n\t/**\n\t * Duration for the toast in milliseconds\n\t * @defaultValue 4000\n\t */\n\tduration = input<number>(4000);\n\n\t/**\n\t * Default toast options with semantic styling\n\t */\n\ttoastOptions = computed(() => {\n\t\tconst baseClasses = {\n\t\t\ttoast: cn(\n\t\t\t\t'bg-base-200! data-[type=loading]:border-neutral! data-[type=default]:border-neutral! text-base-content! rounded-box shadow-main-lg! w-[22rem]! border! p-4! text-pretty! transition-[transform,opacity,height,box-shadow,border-color,color]! duration-[400ms,400ms,400ms,200ms,200ms,200ms]!',\n\t\t\t\t{ 'border-neutral!': this.richColors() === false },\n\t\t\t),\n\t\t\ttitle: cn('font-heading! font-medium!'),\n\t\t\tdescription: cn('text-base-content/70!'),\n\t\t\tactionButton: cn('btn! btn-primary! btn-xs! font-body! leading-normal! font-medium! text-pretty!'),\n\t\t\tcancelButton: cn('btn! btn-secondary! btn-xs! font-body! leading-normal! font-medium! text-pretty!'),\n\t\t\tcloseButton: cn('btn! btn-circle! btn-xs! font-body! border-neutral! border! text-pretty!'),\n\t\t};\n\n\t\tconst semanticClasses = this.richColors()\n\t\t\t? {\n\t\t\t\t\tsuccess: cn('bg-base-200! border-success! text-success!'),\n\t\t\t\t\terror: cn('bg-base-200! border-error! text-error!'),\n\t\t\t\t\twarning: cn('bg-base-200! border-warning! text-warning!'),\n\t\t\t\t\tinfo: cn('bg-base-200! border-info! text-info!'),\n\t\t\t\t}\n\t\t\t: {};\n\n\t\treturn {\n\t\t\tunstyled: false,\n\t\t\tclasses: {\n\t\t\t\t...baseClasses,\n\t\t\t\t...semanticClasses,\n\t\t\t},\n\t\t};\n\t});\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAKA;;;;;;;;;;;;;;AAcG;MAmBU,sBAAsB,CAAA;AAClC;;;AAGG;AACH,IAAA,GAAG,GAAG,KAAK,CAAgB,KAAK,CAAC;AAEjC;;;;AAIG;IACH,UAAU,GAAG,KAAK,CAAC,KAAK,EAAE,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;AAE1D;;;AAGG;IACH,MAAM,GAAG,KAAK,CAAC,KAAK,EAAE,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;AAEtD;;;AAGG;AACH,IAAA,aAAa,GAAG,KAAK,CAAS,CAAC,CAAC;AAEhC;;;AAGG;AACH,IAAA,QAAQ,GAAG,KAAK,CAA6F,cAAc,CAAC;AAE5H;;;AAGG;AACH,IAAA,MAAM,GAAG,KAAK,CAAS,MAAM,CAAC;AAE9B;;;AAGG;IACH,WAAW,GAAG,KAAK,CAAC,KAAK,EAAE,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;AAE3D;;;AAGG;AACH,IAA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;;;;;;;;;EAWT,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAZS,YAAY,+BAAE,gBAAgB,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,CAAA,QAAA,EAAA,OAAA,EAAA,UAAA,EAAA,QAAA,EAAA,YAAA,EAAA,QAAA,EAAA,UAAA,EAAA,eAAA,EAAA,aAAA,EAAA,cAAA,EAAA,QAAA,EAAA,KAAA,EAAA,OAAA,EAAA,OAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAgB5B,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAlBlC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,QAAQ,EAAE,mBAAmB;AAC7B,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,gBAAgB,CAAC;AACzC,oBAAA,QAAQ,EAAE;;;;;;;;;;;AAWT,CAAA,CAAA;AACD,oBAAA,UAAU,EAAE,IAAI;oBAChB,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,iBAAA;;;ACrCD;;AAEG;;;;"}
|
|
@@ -2,7 +2,7 @@ import { cva } from 'class-variance-authority';
|
|
|
2
2
|
import { toast as toast$1, NgxSonnerToaster } from 'ngx-sonner';
|
|
3
3
|
import { CommonModule } from '@angular/common';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
|
-
import { input, computed, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
5
|
+
import { input, booleanAttribute, computed, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
6
6
|
import { cn } from '@sixbell-telco/sdk/utils/cn';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -77,12 +77,12 @@ class SonnerToasterComponent {
|
|
|
77
77
|
* (semantic border and text color on the base-200 surface, applied through the SDK classes).
|
|
78
78
|
* @defaultValue false
|
|
79
79
|
*/
|
|
80
|
-
richColors = input(false);
|
|
80
|
+
richColors = input(false, { transform: booleanAttribute });
|
|
81
81
|
/**
|
|
82
82
|
* Whether to expand the toast on hover
|
|
83
83
|
* @defaultValue false
|
|
84
84
|
*/
|
|
85
|
-
expand = input(false);
|
|
85
|
+
expand = input(false, { transform: booleanAttribute });
|
|
86
86
|
/**
|
|
87
87
|
* Maximum number of visible toasts
|
|
88
88
|
* @defaultValue 3
|
|
@@ -102,7 +102,7 @@ class SonnerToasterComponent {
|
|
|
102
102
|
* Whether to show close button
|
|
103
103
|
* @defaultValue false
|
|
104
104
|
*/
|
|
105
|
-
closeButton = input(false);
|
|
105
|
+
closeButton = input(false, { transform: booleanAttribute });
|
|
106
106
|
/**
|
|
107
107
|
* Duration for the toast in milliseconds
|
|
108
108
|
* @defaultValue 4000
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sixbell-telco-sdk-components-sonner.mjs","sources":["../../../projects/sdk/components/sonner/src/sonner.component.ts","../../../projects/sdk/components/sonner/toaster/src/toaster.component.ts","../../../projects/sdk/components/sonner/sixbell-telco-sdk-components-sonner.ts"],"sourcesContent":["import { Type } from '@angular/core';\nimport { cva } from 'class-variance-authority';\nimport { toast as ngxToast } from 'ngx-sonner';\n\n/**\n * @internal\n * Generates base toast classes with style variants for semantic colors\n */\nexport const toastVariants = cva('', {\n\tvariants: {\n\t\tvariant: {\n\t\t\tbase: '',\n\t\t\tsuccess: 'text-success',\n\t\t\terror: 'text-error',\n\t\t\twarning: 'text-warning',\n\t\t\tinfo: 'text-info',\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tvariant: 'base',\n\t},\n});\n\n/** Possible toast style variants */\nexport type ToastVariantProps = 'base' | 'success' | 'error' | 'warning' | 'info' | null | undefined;\n\n/**\n * Toast function with semantic variants and Tailwind styling\n * Proxies ngx-sonner toast functionality with SDK styling\n */\nfunction createToast(message: string, options?: Record<string, unknown>) {\n\treturn ngxToast(message, options);\n}\n\n// Add methods to the function\ncreateToast.success = (message: string, options?: Record<string, unknown>) => {\n\treturn ngxToast.success(message, options);\n};\n\ncreateToast.error = (message: string, options?: Record<string, unknown>) => {\n\treturn ngxToast.error(message, options);\n};\n\n// IMPORTANT: use the variant helpers so ngx-sonner applies variant metadata (was plain toast before)\ncreateToast.warning = (message: string, options?: Record<string, unknown>) => {\n\treturn ngxToast.warning(message, options);\n};\n\ncreateToast.info = (message: string, options?: Record<string, unknown>) => {\n\treturn ngxToast.info(message, options);\n};\n\ncreateToast.loading = (message: string, options?: Record<string, unknown>) => ngxToast.loading(message, options);\n\ncreateToast.promise = (promise: Promise<unknown>, options: Record<string, unknown>) => ngxToast.promise(promise, options);\n\ncreateToast.custom = (component: Type<unknown>, options?: Record<string, unknown>) => ngxToast.custom(component, options);\n\ncreateToast.dismiss = (id?: string | number) => ngxToast.dismiss(id);\n\ncreateToast.dismissAll = () => ngxToast.dismiss();\n\nexport const toast = createToast as typeof createToast & {\n\tsuccess: (message: string, options?: Record<string, unknown>) => ReturnType<typeof ngxToast>;\n\terror: (message: string, options?: Record<string, unknown>) => ReturnType<typeof ngxToast>;\n\twarning: (message: string, options?: Record<string, unknown>) => ReturnType<typeof ngxToast>;\n\tinfo: (message: string, options?: Record<string, unknown>) => ReturnType<typeof ngxToast>;\n\tloading: (message: string, options?: Record<string, unknown>) => ReturnType<typeof ngxToast>;\n\tpromise: (promise: Promise<unknown>, options: Record<string, unknown>) => ReturnType<typeof ngxToast>;\n\tcustom: (component: Type<unknown>, options?: Record<string, unknown>) => ReturnType<typeof ngxToast>;\n\tdismiss: (id?: string | number) => ReturnType<typeof ngxToast>;\n\tdismissAll: () => ReturnType<typeof ngxToast>;\n};\n","import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\nimport { NgxSonnerToaster } from 'ngx-sonner';\n\n/**\n * Sixbell Telco Sonner Toaster Component\n *\n * A wrapper around ngx-sonner-toaster that provides Tailwind CSS styling and semantic color variants.\n * This component proxies the ngx-sonner-toaster functionality while applying the SDK's design system.\n *\n * @example\n * ```html\n * <st-sonner-toaster\n * [theme]=\"'light'\"\n * [position]=\"'bottom-right'\"\n * [richColors]=\"true\"\n * />\n * ```\n */\n@Component({\n\tselector: 'st-sonner-toaster',\n\timports: [CommonModule, NgxSonnerToaster],\n\ttemplate: `\n\t\t<ngx-sonner-toaster\n\t\t\t[dir]=\"dir()\"\n\t\t\t[expand]=\"expand()\"\n\t\t\t[visibleToasts]=\"visibleToasts()\"\n\t\t\t[position]=\"position()\"\n\t\t\t[offset]=\"offset()\"\n\t\t\t[closeButton]=\"closeButton()\"\n\t\t\t[duration]=\"duration()\"\n\t\t\t[toastOptions]=\"toastOptions()\"\n\t\t/>\n\t`,\n\tstandalone: true,\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SonnerToasterComponent {\n\t/**\n\t * Direction for the toasts\n\t * @defaultValue 'ltr'\n\t */\n\tdir = input<'ltr' | 'rtl'>('ltr');\n\n\t/**\n\t * Whether to use rich colors for semantic toasts\n\t * (semantic border and text color on the base-200 surface, applied through the SDK classes).\n\t * @defaultValue false\n\t */\n\trichColors = input<boolean>(false);\n\n\t/**\n\t * Whether to expand the toast on hover\n\t * @defaultValue false\n\t */\n\texpand = input<boolean>(false);\n\n\t/**\n\t * Maximum number of visible toasts\n\t * @defaultValue 3\n\t */\n\tvisibleToasts = input<number>(3);\n\n\t/**\n\t * Position of the toasts\n\t * @defaultValue 'bottom-right'\n\t */\n\tposition = input<'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'top-center' | 'bottom-center'>('bottom-right');\n\n\t/**\n\t * Offset from the edge of the screen\n\t * @defaultValue '16px'\n\t */\n\toffset = input<string>('16px');\n\n\t/**\n\t * Whether to show close button\n\t * @defaultValue false\n\t */\n\tcloseButton = input<boolean>(false);\n\n\t/**\n\t * Duration for the toast in milliseconds\n\t * @defaultValue 4000\n\t */\n\tduration = input<number>(4000);\n\n\t/**\n\t * Default toast options with semantic styling\n\t */\n\ttoastOptions = computed(() => {\n\t\tconst baseClasses = {\n\t\t\ttoast: cn(\n\t\t\t\t'bg-base-200! data-[type=loading]:border-neutral! data-[type=default]:border-neutral! text-base-content! rounded-box shadow-main-lg! w-[22rem]! border! p-4! text-pretty! transition-[transform,opacity,height,box-shadow,border-color,color]! duration-[400ms,400ms,400ms,200ms,200ms,200ms]!',\n\t\t\t\t{ 'border-neutral!': this.richColors() === false },\n\t\t\t),\n\t\t\ttitle: cn('font-heading! font-medium!'),\n\t\t\tdescription: cn('text-base-content/70!'),\n\t\t\tactionButton: cn('btn! btn-primary! btn-xs! font-body! leading-normal! font-medium! text-pretty!'),\n\t\t\tcancelButton: cn('btn! btn-secondary! btn-xs! font-body! leading-normal! font-medium! text-pretty!'),\n\t\t\tcloseButton: cn('btn! btn-circle! btn-xs! font-body! border-neutral! border! text-pretty!'),\n\t\t};\n\n\t\tconst semanticClasses = this.richColors()\n\t\t\t? {\n\t\t\t\t\tsuccess: cn('bg-base-200! border-success! text-success!'),\n\t\t\t\t\terror: cn('bg-base-200! border-error! text-error!'),\n\t\t\t\t\twarning: cn('bg-base-200! border-warning! text-warning!'),\n\t\t\t\t\tinfo: cn('bg-base-200! border-info! text-info!'),\n\t\t\t\t}\n\t\t\t: {};\n\n\t\treturn {\n\t\t\tunstyled: false,\n\t\t\tclasses: {\n\t\t\t\t...baseClasses,\n\t\t\t\t...semanticClasses,\n\t\t\t},\n\t\t};\n\t});\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["ngxToast"],"mappings":";;;;;;;AAIA;;;AAGG;AACI,MAAM,aAAa,GAAG,GAAG,CAAC,EAAE,EAAE;AACpC,IAAA,QAAQ,EAAE;AACT,QAAA,OAAO,EAAE;AACR,YAAA,IAAI,EAAE,EAAE;AACR,YAAA,OAAO,EAAE,cAAc;AACvB,YAAA,KAAK,EAAE,YAAY;AACnB,YA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C;AACzC,oBAAA,QAAQ,EAAE;;;;;;;;;;;AAWT,CAAA,CAAA;AACD,oBAAA,UAAU,EAAE,IAAI;oBAChB,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,iBAAA;;;ACrCD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"sixbell-telco-sdk-components-sonner.mjs","sources":["../../../projects/sdk/components/sonner/src/sonner.component.ts","../../../projects/sdk/components/sonner/toaster/src/toaster.component.ts","../../../projects/sdk/components/sonner/sixbell-telco-sdk-components-sonner.ts"],"sourcesContent":["import { Type } from '@angular/core';\nimport { cva } from 'class-variance-authority';\nimport { toast as ngxToast } from 'ngx-sonner';\n\n/**\n * @internal\n * Generates base toast classes with style variants for semantic colors\n */\nexport const toastVariants = cva('', {\n\tvariants: {\n\t\tvariant: {\n\t\t\tbase: '',\n\t\t\tsuccess: 'text-success',\n\t\t\terror: 'text-error',\n\t\t\twarning: 'text-warning',\n\t\t\tinfo: 'text-info',\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tvariant: 'base',\n\t},\n});\n\n/** Possible toast style variants */\nexport type ToastVariantProps = 'base' | 'success' | 'error' | 'warning' | 'info' | null | undefined;\n\n/**\n * Toast function with semantic variants and Tailwind styling\n * Proxies ngx-sonner toast functionality with SDK styling\n */\nfunction createToast(message: string, options?: Record<string, unknown>) {\n\treturn ngxToast(message, options);\n}\n\n// Add methods to the function\ncreateToast.success = (message: string, options?: Record<string, unknown>) => {\n\treturn ngxToast.success(message, options);\n};\n\ncreateToast.error = (message: string, options?: Record<string, unknown>) => {\n\treturn ngxToast.error(message, options);\n};\n\n// IMPORTANT: use the variant helpers so ngx-sonner applies variant metadata (was plain toast before)\ncreateToast.warning = (message: string, options?: Record<string, unknown>) => {\n\treturn ngxToast.warning(message, options);\n};\n\ncreateToast.info = (message: string, options?: Record<string, unknown>) => {\n\treturn ngxToast.info(message, options);\n};\n\ncreateToast.loading = (message: string, options?: Record<string, unknown>) => ngxToast.loading(message, options);\n\ncreateToast.promise = (promise: Promise<unknown>, options: Record<string, unknown>) => ngxToast.promise(promise, options);\n\ncreateToast.custom = (component: Type<unknown>, options?: Record<string, unknown>) => ngxToast.custom(component, options);\n\ncreateToast.dismiss = (id?: string | number) => ngxToast.dismiss(id);\n\ncreateToast.dismissAll = () => ngxToast.dismiss();\n\nexport const toast = createToast as typeof createToast & {\n\tsuccess: (message: string, options?: Record<string, unknown>) => ReturnType<typeof ngxToast>;\n\terror: (message: string, options?: Record<string, unknown>) => ReturnType<typeof ngxToast>;\n\twarning: (message: string, options?: Record<string, unknown>) => ReturnType<typeof ngxToast>;\n\tinfo: (message: string, options?: Record<string, unknown>) => ReturnType<typeof ngxToast>;\n\tloading: (message: string, options?: Record<string, unknown>) => ReturnType<typeof ngxToast>;\n\tpromise: (promise: Promise<unknown>, options: Record<string, unknown>) => ReturnType<typeof ngxToast>;\n\tcustom: (component: Type<unknown>, options?: Record<string, unknown>) => ReturnType<typeof ngxToast>;\n\tdismiss: (id?: string | number) => ReturnType<typeof ngxToast>;\n\tdismissAll: () => ReturnType<typeof ngxToast>;\n};\n","import { CommonModule } from '@angular/common';\nimport { booleanAttribute, ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\nimport { NgxSonnerToaster } from 'ngx-sonner';\n\n/**\n * Sixbell Telco Sonner Toaster Component\n *\n * A wrapper around ngx-sonner-toaster that provides Tailwind CSS styling and semantic color variants.\n * This component proxies the ngx-sonner-toaster functionality while applying the SDK's design system.\n *\n * @example\n * ```html\n * <st-sonner-toaster\n * [theme]=\"'light'\"\n * [position]=\"'bottom-right'\"\n * [richColors]=\"true\"\n * />\n * ```\n */\n@Component({\n\tselector: 'st-sonner-toaster',\n\timports: [CommonModule, NgxSonnerToaster],\n\ttemplate: `\n\t\t<ngx-sonner-toaster\n\t\t\t[dir]=\"dir()\"\n\t\t\t[expand]=\"expand()\"\n\t\t\t[visibleToasts]=\"visibleToasts()\"\n\t\t\t[position]=\"position()\"\n\t\t\t[offset]=\"offset()\"\n\t\t\t[closeButton]=\"closeButton()\"\n\t\t\t[duration]=\"duration()\"\n\t\t\t[toastOptions]=\"toastOptions()\"\n\t\t/>\n\t`,\n\tstandalone: true,\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SonnerToasterComponent {\n\t/**\n\t * Direction for the toasts\n\t * @defaultValue 'ltr'\n\t */\n\tdir = input<'ltr' | 'rtl'>('ltr');\n\n\t/**\n\t * Whether to use rich colors for semantic toasts\n\t * (semantic border and text color on the base-200 surface, applied through the SDK classes).\n\t * @defaultValue false\n\t */\n\trichColors = input(false, { transform: booleanAttribute });\n\n\t/**\n\t * Whether to expand the toast on hover\n\t * @defaultValue false\n\t */\n\texpand = input(false, { transform: booleanAttribute });\n\n\t/**\n\t * Maximum number of visible toasts\n\t * @defaultValue 3\n\t */\n\tvisibleToasts = input<number>(3);\n\n\t/**\n\t * Position of the toasts\n\t * @defaultValue 'bottom-right'\n\t */\n\tposition = input<'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'top-center' | 'bottom-center'>('bottom-right');\n\n\t/**\n\t * Offset from the edge of the screen\n\t * @defaultValue '16px'\n\t */\n\toffset = input<string>('16px');\n\n\t/**\n\t * Whether to show close button\n\t * @defaultValue false\n\t */\n\tcloseButton = input(false, { transform: booleanAttribute });\n\n\t/**\n\t * Duration for the toast in milliseconds\n\t * @defaultValue 4000\n\t */\n\tduration = input<number>(4000);\n\n\t/**\n\t * Default toast options with semantic styling\n\t */\n\ttoastOptions = computed(() => {\n\t\tconst baseClasses = {\n\t\t\ttoast: cn(\n\t\t\t\t'bg-base-200! data-[type=loading]:border-neutral! data-[type=default]:border-neutral! text-base-content! rounded-box shadow-main-lg! w-[22rem]! border! p-4! text-pretty! transition-[transform,opacity,height,box-shadow,border-color,color]! duration-[400ms,400ms,400ms,200ms,200ms,200ms]!',\n\t\t\t\t{ 'border-neutral!': this.richColors() === false },\n\t\t\t),\n\t\t\ttitle: cn('font-heading! font-medium!'),\n\t\t\tdescription: cn('text-base-content/70!'),\n\t\t\tactionButton: cn('btn! btn-primary! btn-xs! font-body! leading-normal! font-medium! text-pretty!'),\n\t\t\tcancelButton: cn('btn! btn-secondary! btn-xs! font-body! leading-normal! font-medium! text-pretty!'),\n\t\t\tcloseButton: cn('btn! btn-circle! btn-xs! font-body! border-neutral! border! text-pretty!'),\n\t\t};\n\n\t\tconst semanticClasses = this.richColors()\n\t\t\t? {\n\t\t\t\t\tsuccess: cn('bg-base-200! border-success! text-success!'),\n\t\t\t\t\terror: cn('bg-base-200! border-error! text-error!'),\n\t\t\t\t\twarning: cn('bg-base-200! border-warning! text-warning!'),\n\t\t\t\t\tinfo: cn('bg-base-200! border-info! text-info!'),\n\t\t\t\t}\n\t\t\t: {};\n\n\t\treturn {\n\t\t\tunstyled: false,\n\t\t\tclasses: {\n\t\t\t\t...baseClasses,\n\t\t\t\t...semanticClasses,\n\t\t\t},\n\t\t};\n\t});\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["ngxToast"],"mappings":";;;;;;;AAIA;;;AAGG;AACI,MAAM,aAAa,GAAG,GAAG,CAAC,EAAE,EAAE;AACpC,IAAA,QAAQ,EAAE;AACT,QAAA,OAAO,EAAE;AACR,YAAA,IAAI,EAAE,EAAE;AACR,YAAA,OAAO,EAAE,cAAc;AACvB,YAAA,KAAK,EAAE,YAAY;AACnB,YAAA,OAAO,EAAE,cAAc;AACvB,YAAA,IAAI,EAAE,WAAW;AACjB,SAAA;AACD,KAAA;AACD,IAAA,eAAe,EAAE;AAChB,QAAA,OAAO,EAAE,MAAM;AACf,KAAA;AACD,CAAA;AAKD;;;AAGG;AACH,SAAS,WAAW,CAAC,OAAe,EAAE,OAAiC,EAAA;AACtE,IAAA,OAAOA,OAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;AAClC;AAEA;AACA,WAAW,CAAC,OAAO,GAAG,CAAC,OAAe,EAAE,OAA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
-
import { input, computed, Component, inject, ElementRef, Renderer2, effect, Directive } from '@angular/core';
|
|
2
|
+
import { input, booleanAttribute, computed, Component, inject, ElementRef, Renderer2, effect, Directive } from '@angular/core';
|
|
3
3
|
import { cn } from '@sixbell-telco/sdk/utils/cn';
|
|
4
4
|
import { cva } from 'class-variance-authority';
|
|
5
5
|
|
|
@@ -25,8 +25,8 @@ const tabComponent = cva(['tabs'], {
|
|
|
25
25
|
class TabComponent {
|
|
26
26
|
variant = input('box');
|
|
27
27
|
size = input();
|
|
28
|
-
disabled = input(false);
|
|
29
|
-
active = input(false);
|
|
28
|
+
disabled = input(false, { transform: booleanAttribute });
|
|
29
|
+
active = input(false, { transform: booleanAttribute });
|
|
30
30
|
componentClass = computed(() => cn(tabComponent({
|
|
31
31
|
variant: this.variant(),
|
|
32
32
|
size: this.size(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sixbell-telco-sdk-components-tab.mjs","sources":["../../../projects/sdk/components/tab/src/tab.component.ts","../../../projects/sdk/components/tab/src/tab.component.html","../../../projects/sdk/components/tab/directives/tab-content/tab-content.directive.ts","../../../projects/sdk/components/tab/directives/tab-header/tab-header.directive.ts","../../../projects/sdk/components/tab/sixbell-telco-sdk-components-tab.ts"],"sourcesContent":["import { Component, computed, input } from '@angular/core';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\nimport { cva } from 'class-variance-authority';\nimport { TabHeaderVariantProps } from '../directives/tab-header/tab-header.directive';\n\nexport type Tab = {\n\tid: string;\n\tlabel: string;\n\tstatus: TabHeaderVariantProps;\n};\n\nexport const tabComponent = cva(['tabs'], {\n\tvariants: {\n\t\tvariant: {\n\t\t\tbox: ['tabs-box'],\n\t\t\tborder: ['tabs-border'],\n\t\t\tlift: ['tabs-lift'],\n\t\t},\n\t\tsize: {\n\t\t\txs: ['tabs-xs'],\n\t\t\tsm: ['tabs-sm'],\n\t\t\tmd: ['tabs-md'],\n\t\t\tlg: ['tabs-lg'],\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tvariant: 'box',\n\t\tsize: 'md',\n\t},\n});\n\nexport type TabVariantProps = 'box' | 'border' | 'lift' | null | undefined;\nexport type TabSizeProps = 'xs' | 'sm' | 'md' | 'lg' | null | undefined;\n\nexport type TabProps = {\n\tvariant?: TabVariantProps;\n\tsize?: TabSizeProps;\n};\n\n@Component({\n\tselector: 'st-tab',\n\timports: [],\n\ttemplateUrl: './tab.component.html',\n\tstyles: '',\n})\nexport class TabComponent {\n\tvariant = input<TabVariantProps>('box');\n\tsize = input<TabSizeProps>();\n\tdisabled = input<boolean>(false);\n\tactive = input<boolean>(false);\n\n\tcomponentClass = computed(() =>\n\t\tcn(\n\t\t\ttabComponent({\n\t\t\t\tvariant: this.variant(),\n\t\t\t\tsize: this.size(),\n\t\t\t}),\n\t\t),\n\t);\n}\n","<div role=\"tablist\" [class]=\"componentClass()\">\n\t<ng-content></ng-content>\n</div>\n","import { computed, Directive, effect, ElementRef, inject, input, Renderer2 } from '@angular/core';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\nimport { cva } from 'class-variance-authority';\nimport { TabComponent } from '../../src/tab.component';\n\nconst tabContentDirective = cva(['tab-content', 'border-base-300', 'bg-base-100', 'text-pretty', 'font-body', 'leading-normal'], {\n\tvariants: {\n\t\tpadding: {\n\t\t\txs: 'p-2',\n\t\t\tsm: 'p-5',\n\t\t\tmd: 'p-10',\n\t\t\tlg: 'p-20',\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tpadding: 'md',\n\t},\n});\n\nexport type TabContentVariantProps = 'xs' | 'sm' | 'md' | 'lg' | null | undefined;\n\nexport type TabContentDirectiveProps = {\n\tvariant?: TabContentVariantProps;\n};\n\n@Directive({\n\t// eslint-disable-next-line @angular-eslint/directive-selector\n\tselector: 'div[tab-content]',\n\tstandalone: true,\n})\nexport class TabContentDirective {\n\tpadding = input<TabContentVariantProps>();\n\tlabel = input<string>('');\n\n\tprivate readonly element: ElementRef = inject(ElementRef);\n\tprivate readonly renderer: Renderer2 = inject(Renderer2);\n\n\tprivate readonly tabComponent = inject(TabComponent, { host: true });\n\n\tconstructor() {}\n\n\tcomponentClass = computed(() => {\n\t\treturn cn(\n\t\t\ttabContentDirective({\n\t\t\t\tpadding: this.padding(),\n\t\t\t}),\n\t\t\t{ 'bg-base-100': this.tabComponent.variant() === 'lift' },\n\t\t);\n\t});\n\n\tclassListEffect = effect(() => {\n\t\tconst classList = this.componentClass();\n\t\tthis.renderer.setAttribute(this.element.nativeElement, 'class', classList);\n\t\tthis.renderer.setAttribute(this.element.nativeElement, 'role', 'tabpanel');\n\t});\n}\n","import { computed, Directive, effect, ElementRef, inject, input, Renderer2 } from '@angular/core';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\nimport { cva } from 'class-variance-authority';\n\nconst tabHeaderDirective = cva(['tab', 'text-pretty', 'font-heading', 'leading-normal'], {\n\tvariants: {\n\t\tvariant: {\n\t\t\tdefault: '',\n\t\t\tactive: 'tab-active',\n\t\t\tdisabled: 'tab-disabled',\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tvariant: 'default',\n\t},\n});\n\nexport type TabHeaderVariantProps = 'default' | 'active' | 'disabled' | null | undefined;\n\nexport type TabHeaderDirectiveProps = {\n\tvariant?: TabHeaderVariantProps;\n};\n\n@Directive({\n\t// eslint-disable-next-line @angular-eslint/directive-selector\n\tselector: 'a[tab-header]',\n\tstandalone: true,\n})\nexport class TabHeaderDirective {\n\tvariant = input<TabHeaderVariantProps>();\n\tclasses = input<string>('');\n\tstatus = input<TabHeaderVariantProps>();\n\tlabel = input<string>('');\n\n\tprivate readonly element: ElementRef = inject(ElementRef);\n\tprivate readonly renderer: Renderer2 = inject(Renderer2);\n\n\tcomponentClass = computed(() => {\n\t\tif (this.status()) {\n\t\t\treturn cn(\n\t\t\t\ttabHeaderDirective({\n\t\t\t\t\tvariant: this.status(),\n\t\t\t\t\tclass: this.classes(),\n\t\t\t\t}),\n\t\t\t);\n\t\t} else {\n\t\t\treturn cn(\n\t\t\t\ttabHeaderDirective({\n\t\t\t\t\tvariant: this.variant(),\n\t\t\t\t\tclass: this.classes(),\n\t\t\t\t}),\n\t\t\t);\n\t\t}\n\t});\n\n\tclassListEffect = effect(() => {\n\t\tconst classList = this.componentClass();\n\t\tthis.renderer.setAttribute(this.element.nativeElement, 'class', classList);\n\t\tthis.renderer.setAttribute(this.element.nativeElement, 'aria-label', this.label());\n\t\tthis.renderer.setAttribute(this.element.nativeElement, 'role', 'tab');\n\t\tthis.renderer.setAttribute(this.element.nativeElement, 'tabindex', '0');\n\t});\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAWa,YAAY,GAAG,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE;AACzC,IAAA,QAAQ,EAAE;AACT,QAAA,OAAO,EAAE;YACR,GAAG,EAAE,CAAC,UAAU,CAAC;YACjB,MAAM,EAAE,CAAC,aAAa,CAAC;YACvB,IAAI,EAAE,CAAC,WAAW,CAAC;AACnB,SAAA;AACD,QAAA,IAAI,EAAE;YACL,EAAE,EAAE,CAAC,SAAS,CAAC;YACf,EAAE,EAAE,CAAC,SAAS,CAAC;YACf,EAAE,EAAE,CAAC,SAAS,CAAC;YACf,EAAE,EAAE,CAAC,SAAS,CAAC;AACf,SAAA;AACD,KAAA;AACD,IAAA,eAAe,EAAE;AAChB,QAAA,OAAO,EAAE,KAAK;AACd,QAAA,IAAI,EAAE,IAAI;AACV,KAAA;AACD,CAAA;MAgBY,YAAY,CAAA;AACxB,IAAA,OAAO,GAAG,KAAK,CAAkB,KAAK,CAAC;IACvC,IAAI,GAAG,KAAK,EAAgB;AAC5B,IAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,CAAC;AAChC,IAAA,MAAM,GAAG,KAAK,CAAU,KAAK,CAAC;IAE9B,cAAc,GAAG,QAAQ,CAAC,MACzB,EAAE,CACD,YAAY,CAAC;AACZ,QAAA,OAAO,EAAE,IAAI,CA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A,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;4FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAL9B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;;AAEV,oBAAA,QAAQ,EAAE,eAAe;AACzB,oBAAA,UAAU,EAAE,IAAI;AAChB,iBAAA;;;AC3BD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"sixbell-telco-sdk-components-tab.mjs","sources":["../../../projects/sdk/components/tab/src/tab.component.ts","../../../projects/sdk/components/tab/src/tab.component.html","../../../projects/sdk/components/tab/directives/tab-content/tab-content.directive.ts","../../../projects/sdk/components/tab/directives/tab-header/tab-header.directive.ts","../../../projects/sdk/components/tab/sixbell-telco-sdk-components-tab.ts"],"sourcesContent":["import { booleanAttribute, Component, computed, input } from '@angular/core';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\nimport { cva } from 'class-variance-authority';\nimport { TabHeaderVariantProps } from '../directives/tab-header/tab-header.directive';\n\nexport type Tab = {\n\tid: string;\n\tlabel: string;\n\tstatus: TabHeaderVariantProps;\n};\n\nexport const tabComponent = cva(['tabs'], {\n\tvariants: {\n\t\tvariant: {\n\t\t\tbox: ['tabs-box'],\n\t\t\tborder: ['tabs-border'],\n\t\t\tlift: ['tabs-lift'],\n\t\t},\n\t\tsize: {\n\t\t\txs: ['tabs-xs'],\n\t\t\tsm: ['tabs-sm'],\n\t\t\tmd: ['tabs-md'],\n\t\t\tlg: ['tabs-lg'],\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tvariant: 'box',\n\t\tsize: 'md',\n\t},\n});\n\nexport type TabVariantProps = 'box' | 'border' | 'lift' | null | undefined;\nexport type TabSizeProps = 'xs' | 'sm' | 'md' | 'lg' | null | undefined;\n\nexport type TabProps = {\n\tvariant?: TabVariantProps;\n\tsize?: TabSizeProps;\n};\n\n@Component({\n\tselector: 'st-tab',\n\timports: [],\n\ttemplateUrl: './tab.component.html',\n\tstyles: '',\n})\nexport class TabComponent {\n\tvariant = input<TabVariantProps>('box');\n\tsize = input<TabSizeProps>();\n\tdisabled = input(false, { transform: booleanAttribute });\n\tactive = input(false, { transform: booleanAttribute });\n\n\tcomponentClass = computed(() =>\n\t\tcn(\n\t\t\ttabComponent({\n\t\t\t\tvariant: this.variant(),\n\t\t\t\tsize: this.size(),\n\t\t\t}),\n\t\t),\n\t);\n}\n","<div role=\"tablist\" [class]=\"componentClass()\">\n\t<ng-content></ng-content>\n</div>\n","import { computed, Directive, effect, ElementRef, inject, input, Renderer2 } from '@angular/core';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\nimport { cva } from 'class-variance-authority';\nimport { TabComponent } from '../../src/tab.component';\n\nconst tabContentDirective = cva(['tab-content', 'border-base-300', 'bg-base-100', 'text-pretty', 'font-body', 'leading-normal'], {\n\tvariants: {\n\t\tpadding: {\n\t\t\txs: 'p-2',\n\t\t\tsm: 'p-5',\n\t\t\tmd: 'p-10',\n\t\t\tlg: 'p-20',\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tpadding: 'md',\n\t},\n});\n\nexport type TabContentVariantProps = 'xs' | 'sm' | 'md' | 'lg' | null | undefined;\n\nexport type TabContentDirectiveProps = {\n\tvariant?: TabContentVariantProps;\n};\n\n@Directive({\n\t// eslint-disable-next-line @angular-eslint/directive-selector\n\tselector: 'div[tab-content]',\n\tstandalone: true,\n})\nexport class TabContentDirective {\n\tpadding = input<TabContentVariantProps>();\n\tlabel = input<string>('');\n\n\tprivate readonly element: ElementRef = inject(ElementRef);\n\tprivate readonly renderer: Renderer2 = inject(Renderer2);\n\n\tprivate readonly tabComponent = inject(TabComponent, { host: true });\n\n\tconstructor() {}\n\n\tcomponentClass = computed(() => {\n\t\treturn cn(\n\t\t\ttabContentDirective({\n\t\t\t\tpadding: this.padding(),\n\t\t\t}),\n\t\t\t{ 'bg-base-100': this.tabComponent.variant() === 'lift' },\n\t\t);\n\t});\n\n\tclassListEffect = effect(() => {\n\t\tconst classList = this.componentClass();\n\t\tthis.renderer.setAttribute(this.element.nativeElement, 'class', classList);\n\t\tthis.renderer.setAttribute(this.element.nativeElement, 'role', 'tabpanel');\n\t});\n}\n","import { computed, Directive, effect, ElementRef, inject, input, Renderer2 } from '@angular/core';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\nimport { cva } from 'class-variance-authority';\n\nconst tabHeaderDirective = cva(['tab', 'text-pretty', 'font-heading', 'leading-normal'], {\n\tvariants: {\n\t\tvariant: {\n\t\t\tdefault: '',\n\t\t\tactive: 'tab-active',\n\t\t\tdisabled: 'tab-disabled',\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tvariant: 'default',\n\t},\n});\n\nexport type TabHeaderVariantProps = 'default' | 'active' | 'disabled' | null | undefined;\n\nexport type TabHeaderDirectiveProps = {\n\tvariant?: TabHeaderVariantProps;\n};\n\n@Directive({\n\t// eslint-disable-next-line @angular-eslint/directive-selector\n\tselector: 'a[tab-header]',\n\tstandalone: true,\n})\nexport class TabHeaderDirective {\n\tvariant = input<TabHeaderVariantProps>();\n\tclasses = input<string>('');\n\tstatus = input<TabHeaderVariantProps>();\n\tlabel = input<string>('');\n\n\tprivate readonly element: ElementRef = inject(ElementRef);\n\tprivate readonly renderer: Renderer2 = inject(Renderer2);\n\n\tcomponentClass = computed(() => {\n\t\tif (this.status()) {\n\t\t\treturn cn(\n\t\t\t\ttabHeaderDirective({\n\t\t\t\t\tvariant: this.status(),\n\t\t\t\t\tclass: this.classes(),\n\t\t\t\t}),\n\t\t\t);\n\t\t} else {\n\t\t\treturn cn(\n\t\t\t\ttabHeaderDirective({\n\t\t\t\t\tvariant: this.variant(),\n\t\t\t\t\tclass: this.classes(),\n\t\t\t\t}),\n\t\t\t);\n\t\t}\n\t});\n\n\tclassListEffect = effect(() => {\n\t\tconst classList = this.componentClass();\n\t\tthis.renderer.setAttribute(this.element.nativeElement, 'class', classList);\n\t\tthis.renderer.setAttribute(this.element.nativeElement, 'aria-label', this.label());\n\t\tthis.renderer.setAttribute(this.element.nativeElement, 'role', 'tab');\n\t\tthis.renderer.setAttribute(this.element.nativeElement, 'tabindex', '0');\n\t});\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAWa,YAAY,GAAG,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE;AACzC,IAAA,QAAQ,EAAE;AACT,QAAA,OAAO,EAAE;YACR,GAAG,EAAE,CAAC,UAAU,CAAC;YACjB,MAAM,EAAE,CAAC,aAAa,CAAC;YACvB,IAAI,EAAE,CAAC,WAAW,CAAC;AACnB,SAAA;AACD,QAAA,IAAI,EAAE;YACL,EAAE,EAAE,CAAC,SAAS,CAAC;YACf,EAAE,EAAE,CAAC,SAAS,CAAC;YACf,EAAE,EAAE,CAAC,SAAS,CAAC;YACf,EAAE,EAAE,CAAC,SAAS,CAAC;AACf,SAAA;AACD,KAAA;AACD,IAAA,eAAe,EAAE;AAChB,QAAA,OAAO,EAAE,KAAK;AACd,QAAA,IAAI,EAAE,IAAI;AACV,KAAA;AACD,CAAA;MAgBY,YAAY,CAAA;AACxB,IAAA,OAAO,GAAG,KAAK,CAAkB,KAAK,CAAC;IACvC,IAAI,GAAG,KAAK,EAAgB;IAC5B,QAAQ,GAAG,KAAK,CAAC,KAAK,EAAE,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;IACxD,MAAM,GAAG,KAAK,CAAC,KAAK,EAAE,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;IAEtD,cAAc,GAAG,QAAQ,CAAC,MACzB,EAAE,CACD,YAAY,CAAC;AACZ,QAAA,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE;AACvB,QAAA,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE;KACjB,CAAC,CACF,CACD;wGAbW,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAZ,IAAA,OAAA,IA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