@sixbell-telco/sdk 0.7.0 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +64 -25
- package/README.md +345 -65
- package/components/audio-player/src/audio-player.component.d.ts +1 -2
- package/components/countdown/src/countdown.component.d.ts +1 -5
- package/components/dual-list/src/dual-list.component.d.ts +2 -3
- package/components/forms/combobox/src/combobox.component.d.ts +1 -1
- package/components/forms/form-error/src/form-error.component.d.ts +1 -8
- package/components/forms/select/src/select.component.d.ts +3 -1
- package/components/icon/src/icon.component.d.ts +2 -2
- package/components/modal/src/modal.component.d.ts +72 -4
- package/components/product-card/src/product-card.component.d.ts +1 -2
- package/components/table/src/table.component.d.ts +136 -5
- package/components/table/table-header-checkbox/table-header-checkbox.component.d.ts +42 -0
- package/components/table/table-row-checkbox/table-row-checkbox.component.d.ts +46 -0
- package/components/wizard/wizard-marker/wizard-marker.component.d.ts +10 -2
- package/directives/typography/src/typography.directive.d.ts +47 -1
- package/esm2022/components/audio-player/audio-timeline/audio-timeline.component.mjs +3 -3
- package/esm2022/components/audio-player/button-play/button-play.component.mjs +5 -5
- package/esm2022/components/audio-player/src/audio-player.component.mjs +5 -4
- package/esm2022/components/audio-player/track-info/track-info.component.mjs +4 -3
- package/esm2022/components/avatar/src/avatar.component.mjs +3 -3
- package/esm2022/components/badge/src/badge.component.mjs +6 -5
- package/esm2022/components/button/src/button.component.mjs +6 -6
- package/esm2022/components/countdown/src/countdown.component.mjs +4 -7
- package/esm2022/components/dropdown/src/dropdown.component.mjs +6 -6
- package/esm2022/components/dual-list/src/dual-list.component.mjs +15 -5
- package/esm2022/components/file-upload/file-dropzone/src/file-dropzone.component.mjs +10 -8
- package/esm2022/components/file-upload/file-uploader/src/file-uploader.component.mjs +4 -3
- package/esm2022/components/forms/combobox/src/combobox.component.mjs +6 -5
- package/esm2022/components/forms/form-error/src/form-error.component.mjs +4 -11
- package/esm2022/components/forms/input/src/input.component.mjs +12 -11
- package/esm2022/components/forms/select/src/select.component.mjs +9 -7
- package/esm2022/components/forms/textarea/src/textarea.component.mjs +9 -8
- package/esm2022/components/forms/toggle/src/toggle.component.mjs +31 -31
- package/esm2022/components/icon/src/icon.component.mjs +5 -4
- package/esm2022/components/link/src/link.component.mjs +2 -2
- package/esm2022/components/modal/src/modal.component.mjs +79 -6
- package/esm2022/components/product-card/src/product-card.component.mjs +4 -7
- package/esm2022/components/tab/src/tab.component.mjs +5 -5
- package/esm2022/components/table/src/table.component.mjs +157 -17
- package/esm2022/components/table/table-header-checkbox/table-header-checkbox.component.mjs +43 -1
- package/esm2022/components/table/table-row-checkbox/table-row-checkbox.component.mjs +47 -1
- package/esm2022/components/tooltip/src/tooltip.component.mjs +2 -2
- package/esm2022/components/wizard/wizard-marker/wizard-marker.component.mjs +22 -3
- package/esm2022/components/wizard/wizard-wrapper/wizard-wrapper.component.mjs +4 -3
- package/esm2022/directives/typography/src/typography.directive.mjs +63 -13
- package/fesm2022/sixbell-telco-sdk-components-audio-player.mjs +12 -11
- package/fesm2022/sixbell-telco-sdk-components-audio-player.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-avatar.mjs +2 -2
- package/fesm2022/sixbell-telco-sdk-components-avatar.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-badge.mjs +5 -4
- package/fesm2022/sixbell-telco-sdk-components-badge.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-button.mjs +5 -5
- package/fesm2022/sixbell-telco-sdk-components-button.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-countdown.mjs +3 -6
- package/fesm2022/sixbell-telco-sdk-components-countdown.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dropdown.mjs +5 -5
- package/fesm2022/sixbell-telco-sdk-components-dropdown.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dual-list.mjs +14 -4
- package/fesm2022/sixbell-telco-sdk-components-dual-list.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-file-upload-file-dropzone.mjs +9 -7
- package/fesm2022/sixbell-telco-sdk-components-file-upload-file-dropzone.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-file-upload-file-uploader.mjs +3 -2
- package/fesm2022/sixbell-telco-sdk-components-file-upload-file-uploader.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs +5 -4
- package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-form-error.mjs +3 -10
- package/fesm2022/sixbell-telco-sdk-components-forms-form-error.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-input.mjs +11 -10
- package/fesm2022/sixbell-telco-sdk-components-forms-input.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-select.mjs +8 -6
- package/fesm2022/sixbell-telco-sdk-components-forms-select.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-textarea.mjs +8 -7
- package/fesm2022/sixbell-telco-sdk-components-forms-textarea.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-toggle.mjs +30 -30
- package/fesm2022/sixbell-telco-sdk-components-forms-toggle.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-icon.mjs +4 -3
- package/fesm2022/sixbell-telco-sdk-components-icon.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-link.mjs +1 -1
- package/fesm2022/sixbell-telco-sdk-components-link.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-modal.mjs +78 -5
- package/fesm2022/sixbell-telco-sdk-components-modal.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-product-card.mjs +3 -6
- package/fesm2022/sixbell-telco-sdk-components-product-card.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-tab.mjs +4 -4
- package/fesm2022/sixbell-telco-sdk-components-tab.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-table.mjs +244 -16
- package/fesm2022/sixbell-telco-sdk-components-table.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-tooltip.mjs +1 -1
- package/fesm2022/sixbell-telco-sdk-components-tooltip.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-wizard.mjs +23 -4
- package/fesm2022/sixbell-telco-sdk-components-wizard.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-directives-typography.mjs +62 -12
- package/fesm2022/sixbell-telco-sdk-directives-typography.mjs.map +1 -1
- package/package.json +68 -68
|
@@ -35,102 +35,102 @@ const toggleComponent = cva([
|
|
|
35
35
|
variant: {
|
|
36
36
|
primary: [
|
|
37
37
|
'border-secondary',
|
|
38
|
-
'text-
|
|
38
|
+
'text-base-content',
|
|
39
39
|
'hover:border-primary',
|
|
40
40
|
'hover:bg-primary',
|
|
41
|
-
'hover:text-
|
|
41
|
+
'hover:text-base-content',
|
|
42
42
|
'hover:active:bg-primary',
|
|
43
43
|
'focus-visible:outline-secondary',
|
|
44
44
|
'hover:focus-visible:outline-primary',
|
|
45
45
|
'hover:active:focus-visible:outline-primary',
|
|
46
46
|
'hover:active:text-primary-content',
|
|
47
47
|
],
|
|
48
|
-
'primary-toggled': ['bg-primary', 'border-primary', 'text-
|
|
49
|
-
'primary-disabled': ['border-secondary', 'border-opacity-50', 'text-
|
|
48
|
+
'primary-toggled': ['bg-primary', 'border-primary', 'text-primary-content'],
|
|
49
|
+
'primary-disabled': ['border-secondary', 'border-opacity-50', 'text-base-content', 'text-opacity-50'],
|
|
50
50
|
secondary: [
|
|
51
51
|
'border-secondary',
|
|
52
|
-
'text-
|
|
52
|
+
'text-base-content',
|
|
53
53
|
'hover:border-secondary',
|
|
54
54
|
'hover:bg-secondary',
|
|
55
|
-
'hover:text-
|
|
55
|
+
'hover:text-base-content',
|
|
56
56
|
'hover:active:bg-secondary',
|
|
57
57
|
'focus-visible:outline-secondary',
|
|
58
58
|
'hover:focus-visible:outline-secondary',
|
|
59
59
|
'hover:active:focus-visible:outline-secondary',
|
|
60
60
|
'hover:active:text-secondary-content',
|
|
61
61
|
],
|
|
62
|
-
'secondary-toggled': ['bg-secondary', 'border-secondary', 'text-
|
|
63
|
-
'secondary-disabled': ['border-secondary', 'border-opacity-50', 'text-
|
|
62
|
+
'secondary-toggled': ['bg-secondary', 'border-secondary', 'text-secondary-content'],
|
|
63
|
+
'secondary-disabled': ['border-secondary', 'border-opacity-50', 'text-base-content', 'text-opacity-50'],
|
|
64
64
|
success: [
|
|
65
65
|
'border-secondary',
|
|
66
|
-
'text-
|
|
66
|
+
'text-base-content',
|
|
67
67
|
'hover:border-success',
|
|
68
68
|
'hover:bg-success',
|
|
69
|
-
'hover:text-
|
|
69
|
+
'hover:text-base-content',
|
|
70
70
|
'hover:active:bg-success',
|
|
71
71
|
'focus-visible:outline-secondary',
|
|
72
72
|
'hover:focus-visible:outline-success',
|
|
73
73
|
'hover:active:focus-visible:outline-success',
|
|
74
74
|
'hover:active:text-success-content',
|
|
75
75
|
],
|
|
76
|
-
'success-toggled': ['bg-success', 'border-success', 'text-
|
|
77
|
-
'success-disabled': ['border-secondary', 'border-opacity-50', 'text-
|
|
76
|
+
'success-toggled': ['bg-success', 'border-success', 'text-success-content'],
|
|
77
|
+
'success-disabled': ['border-secondary', 'border-opacity-50', 'text-base-content', 'text-opacity-50'],
|
|
78
78
|
error: [
|
|
79
79
|
'border-secondary',
|
|
80
|
-
'text-
|
|
80
|
+
'text-base-content',
|
|
81
81
|
'hover:border-error',
|
|
82
82
|
'hover:bg-error',
|
|
83
|
-
'hover:text-
|
|
83
|
+
'hover:text-base-content',
|
|
84
84
|
'hover:active:bg-error',
|
|
85
85
|
'focus-visible:outline-secondary',
|
|
86
86
|
'hover:focus-visible:outline-error',
|
|
87
87
|
'hover:active:focus-visible:outline-error',
|
|
88
88
|
'hover:active:text-error-content',
|
|
89
89
|
],
|
|
90
|
-
'error-toggled': ['bg-error', 'border-error', 'text-
|
|
91
|
-
'error-disabled': ['border-secondary', 'border-opacity-50', 'text-
|
|
90
|
+
'error-toggled': ['bg-error', 'border-error', 'text-error-content'],
|
|
91
|
+
'error-disabled': ['border-secondary', 'border-opacity-50', 'text-base-content', 'text-opacity-50'],
|
|
92
92
|
warning: [
|
|
93
93
|
'border-secondary',
|
|
94
|
-
'text-
|
|
94
|
+
'text-base-content',
|
|
95
95
|
'hover:border-warning',
|
|
96
96
|
'hover:bg-warning',
|
|
97
|
-
'hover:text-
|
|
97
|
+
'hover:text-base-content',
|
|
98
98
|
'hover:active:bg-warning',
|
|
99
99
|
'focus-visible:outline-secondary',
|
|
100
100
|
'hover:focus-visible:outline-warning',
|
|
101
101
|
'hover:active:focus-visible:outline-warning',
|
|
102
102
|
'hover:active:text-warning-content',
|
|
103
103
|
],
|
|
104
|
-
'warning-toggled': ['bg-warning', 'border-warning', 'text-
|
|
105
|
-
'warning-disabled': ['border-secondary', 'border-opacity-50', 'text-
|
|
104
|
+
'warning-toggled': ['bg-warning', 'border-warning', 'text-warning-content'],
|
|
105
|
+
'warning-disabled': ['border-secondary', 'border-opacity-50', 'text-base-content', 'text-opacity-50'],
|
|
106
106
|
info: [
|
|
107
107
|
'border-secondary',
|
|
108
|
-
'text-
|
|
108
|
+
'text-base-content',
|
|
109
109
|
'hover:border-info',
|
|
110
110
|
'hover:bg-info',
|
|
111
|
-
'hover:text-
|
|
111
|
+
'hover:text-base-content',
|
|
112
112
|
'hover:active:bg-info',
|
|
113
113
|
'focus-visible:outline-secondary',
|
|
114
114
|
'hover:focus-visible:outline-info',
|
|
115
115
|
'hover:active:focus-visible:outline-info',
|
|
116
116
|
'hover:active:text-primary-content',
|
|
117
117
|
],
|
|
118
|
-
'info-toggled': ['bg-info', 'border-info', 'text-
|
|
119
|
-
'info-disabled': ['border-secondary', 'border-opacity-50', 'text-
|
|
118
|
+
'info-toggled': ['bg-info', 'border-info', 'text-info-content'],
|
|
119
|
+
'info-disabled': ['border-secondary', 'border-opacity-50', 'text-base-content', 'text-opacity-50'],
|
|
120
120
|
accent: [
|
|
121
121
|
'border-secondary',
|
|
122
|
-
'text-
|
|
122
|
+
'text-base-content',
|
|
123
123
|
'hover:border-accent',
|
|
124
124
|
'hover:bg-accent',
|
|
125
|
-
'hover:text-
|
|
125
|
+
'hover:text-base-content',
|
|
126
126
|
'hover:active:bg-accent',
|
|
127
127
|
'focus-visible:outline-secondary',
|
|
128
128
|
'hover:focus-visible:outline-accent',
|
|
129
129
|
'hover:active:focus-visible:outline-accent',
|
|
130
130
|
'hover:active:text-accent-content',
|
|
131
131
|
],
|
|
132
|
-
'accent-toggled': ['bg-accent', 'border-accent', 'text-
|
|
133
|
-
'accent-disabled': ['border-secondary', 'border-opacity-50', 'text-
|
|
132
|
+
'accent-toggled': ['bg-accent', 'border-accent', 'text-accent-content'],
|
|
133
|
+
'accent-disabled': ['border-secondary', 'border-opacity-50', 'text-base-content', 'text-opacity-50'],
|
|
134
134
|
},
|
|
135
135
|
size: {
|
|
136
136
|
sm: ['h-10', 'w-10'],
|
|
@@ -140,8 +140,8 @@ const toggleComponent = cva([
|
|
|
140
140
|
},
|
|
141
141
|
compoundVariants: [],
|
|
142
142
|
defaultVariants: {
|
|
143
|
-
variant: '
|
|
144
|
-
size: '
|
|
143
|
+
variant: 'secondary',
|
|
144
|
+
size: 'sm',
|
|
145
145
|
},
|
|
146
146
|
});
|
|
147
147
|
class ToggleComponent {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sixbell-telco-sdk-components-forms-toggle.mjs","sources":["../../../projects/sdk/components/forms/toggle/src/toggle.component.ts","../../../projects/sdk/components/forms/toggle/src/toggle.component.html","../../../projects/sdk/components/forms/toggle/sixbell-telco-sdk-components-forms-toggle.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { ChangeDetectionStrategy, Component, input, model, output } from '@angular/core';\nimport { FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { TypographyDirective } from '@sixbell-telco/sdk/directives/typography';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\nimport { cva } from 'class-variance-authority';\n\nexport const toggleComponent = cva(\n\t[\n\t\t'grid',\n\t\t'place-content-center',\n\t\t'rounded-full',\n\t\t'border-[1px]',\n\t\t'border-solid',\n\t\t'transition-colors',\n\t\t'focus-visible:outline',\n\t\t'focus-visible:outline-2',\n\t\t'focus-visible:outline-offset-2',\n\t\t'hover:bg-opacity-40',\n\t\t'active:transition-all',\n\t\t'active:hover:scale-95',\n\t\t'active:hover:animate-pop',\n\t\t'active:hover:ease-out',\n\t\t'active:hover:animate-duration-0',\n\t\t'active:hover:animate-fill-mode-backwards',\n\t\t'active:focus:scale-95',\n\t\t'active:focus:animate-pop',\n\t\t'active:focus:ease-out',\n\t\t'active:focus:animate-duration-0',\n\t\t'active:focus:animate-fill-mode-backwards',\n\t\t'hover:active:bg-opacity-100',\n\t],\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tprimary: [\n\t\t\t\t\t'border-secondary',\n\t\t\t\t\t'text-neutral',\n\t\t\t\t\t'hover:border-primary',\n\t\t\t\t\t'hover:bg-primary',\n\t\t\t\t\t'hover:text-neutral',\n\t\t\t\t\t'hover:active:bg-primary',\n\t\t\t\t\t'focus-visible:outline-secondary',\n\t\t\t\t\t'hover:focus-visible:outline-primary',\n\t\t\t\t\t'hover:active:focus-visible:outline-primary',\n\t\t\t\t\t'hover:active:text-primary-content',\n\t\t\t\t],\n\t\t\t\t'primary-toggled': ['bg-primary', 'border-primary', 'text-neutral-content'],\n\t\t\t\t'primary-disabled': ['border-secondary', 'border-opacity-50', 'text-neutral', 'text-opacity-50'],\n\t\t\t\tsecondary: [\n\t\t\t\t\t'border-secondary',\n\t\t\t\t\t'text-neutral',\n\t\t\t\t\t'hover:border-secondary',\n\t\t\t\t\t'hover:bg-secondary',\n\t\t\t\t\t'hover:text-neutral',\n\t\t\t\t\t'hover:active:bg-secondary',\n\t\t\t\t\t'focus-visible:outline-secondary',\n\t\t\t\t\t'hover:focus-visible:outline-secondary',\n\t\t\t\t\t'hover:active:focus-visible:outline-secondary',\n\t\t\t\t\t'hover:active:text-secondary-content',\n\t\t\t\t],\n\t\t\t\t'secondary-toggled': ['bg-secondary', 'border-secondary', 'text-neutral'],\n\t\t\t\t'secondary-disabled': ['border-secondary', 'border-opacity-50', 'text-neutral', 'text-opacity-50'],\n\t\t\t\tsuccess: [\n\t\t\t\t\t'border-secondary',\n\t\t\t\t\t'text-neutral',\n\t\t\t\t\t'hover:border-success',\n\t\t\t\t\t'hover:bg-success',\n\t\t\t\t\t'hover:text-neutral',\n\t\t\t\t\t'hover:active:bg-success',\n\t\t\t\t\t'focus-visible:outline-secondary',\n\t\t\t\t\t'hover:focus-visible:outline-success',\n\t\t\t\t\t'hover:active:focus-visible:outline-success',\n\t\t\t\t\t'hover:active:text-success-content',\n\t\t\t\t],\n\t\t\t\t'success-toggled': ['bg-success', 'border-success', 'text-neutral-content'],\n\t\t\t\t'success-disabled': ['border-secondary', 'border-opacity-50', 'text-neutral', 'text-opacity-50'],\n\t\t\t\terror: [\n\t\t\t\t\t'border-secondary',\n\t\t\t\t\t'text-neutral',\n\t\t\t\t\t'hover:border-error',\n\t\t\t\t\t'hover:bg-error',\n\t\t\t\t\t'hover:text-neutral',\n\t\t\t\t\t'hover:active:bg-error',\n\t\t\t\t\t'focus-visible:outline-secondary',\n\t\t\t\t\t'hover:focus-visible:outline-error',\n\t\t\t\t\t'hover:active:focus-visible:outline-error',\n\t\t\t\t\t'hover:active:text-error-content',\n\t\t\t\t],\n\t\t\t\t'error-toggled': ['bg-error', 'border-error', 'text-neutral-content'],\n\t\t\t\t'error-disabled': ['border-secondary', 'border-opacity-50', 'text-neutral', 'text-opacity-50'],\n\t\t\t\twarning: [\n\t\t\t\t\t'border-secondary',\n\t\t\t\t\t'text-neutral',\n\t\t\t\t\t'hover:border-warning',\n\t\t\t\t\t'hover:bg-warning',\n\t\t\t\t\t'hover:text-neutral',\n\t\t\t\t\t'hover:active:bg-warning',\n\t\t\t\t\t'focus-visible:outline-secondary',\n\t\t\t\t\t'hover:focus-visible:outline-warning',\n\t\t\t\t\t'hover:active:focus-visible:outline-warning',\n\t\t\t\t\t'hover:active:text-warning-content',\n\t\t\t\t],\n\t\t\t\t'warning-toggled': ['bg-warning', 'border-warning', 'text-neutral-content'],\n\t\t\t\t'warning-disabled': ['border-secondary', 'border-opacity-50', 'text-neutral', 'text-opacity-50'],\n\t\t\t\tinfo: [\n\t\t\t\t\t'border-secondary',\n\t\t\t\t\t'text-neutral',\n\t\t\t\t\t'hover:border-info',\n\t\t\t\t\t'hover:bg-info',\n\t\t\t\t\t'hover:text-neutral',\n\t\t\t\t\t'hover:active:bg-info',\n\t\t\t\t\t'focus-visible:outline-secondary',\n\t\t\t\t\t'hover:focus-visible:outline-info',\n\t\t\t\t\t'hover:active:focus-visible:outline-info',\n\t\t\t\t\t'hover:active:text-primary-content',\n\t\t\t\t],\n\t\t\t\t'info-toggled': ['bg-info', 'border-info', 'text-neutral-content'],\n\t\t\t\t'info-disabled': ['border-secondary', 'border-opacity-50', 'text-neutral', 'text-opacity-50'],\n\t\t\t\taccent: [\n\t\t\t\t\t'border-secondary',\n\t\t\t\t\t'text-neutral',\n\t\t\t\t\t'hover:border-accent',\n\t\t\t\t\t'hover:bg-accent',\n\t\t\t\t\t'hover:text-neutral',\n\t\t\t\t\t'hover:active:bg-accent',\n\t\t\t\t\t'focus-visible:outline-secondary',\n\t\t\t\t\t'hover:focus-visible:outline-accent',\n\t\t\t\t\t'hover:active:focus-visible:outline-accent',\n\t\t\t\t\t'hover:active:text-accent-content',\n\t\t\t\t],\n\t\t\t\t'accent-toggled': ['bg-accent', 'border-accent', 'text-neutral-content'],\n\t\t\t\t'accent-disabled': ['border-secondary', 'border-opacity-50', 'text-neutral', 'text-opacity-50'],\n\t\t\t},\n\t\t\tsize: {\n\t\t\t\tsm: ['h-10', 'w-10'],\n\t\t\t\tmd: ['h-11', 'w-11'],\n\t\t\t\tlg: ['h-12', 'w-12'],\n\t\t\t},\n\t\t},\n\t\tcompoundVariants: [],\n\t\tdefaultVariants: {\n\t\t\tvariant: 'primary',\n\t\t\tsize: 'md',\n\t\t},\n\t},\n);\n\nexport type ToggleVariantProps =\n\t| 'primary'\n\t| 'primary-toggled'\n\t| 'primary-disabled'\n\t| 'secondary'\n\t| 'secondary-toggled'\n\t| 'secondary-disabled'\n\t| 'success'\n\t| 'success-toggled'\n\t| 'success-disabled'\n\t| 'error'\n\t| 'error-toggled'\n\t| 'error-disabled'\n\t| 'warning'\n\t| 'warning-toggled'\n\t| 'warning-disabled'\n\t| 'info'\n\t| 'info-toggled'\n\t| 'info-disabled'\n\t| 'accent'\n\t| 'accent-toggled'\n\t| 'accent-disabled'\n\t| null\n\t| undefined;\nexport type ToggleSizeProps = 'sm' | 'md' | 'lg' | null | undefined;\n\nexport type ToggleProps = {\n\tvariant?: ToggleVariantProps;\n\tsize?: ToggleSizeProps;\n};\n\n@Component({\n\tselector: 'st-toggle',\n\tstandalone: true,\n\timports: [FormsModule, TypographyDirective],\n\tproviders: [\n\t\t{\n\t\t\tprovide: NG_VALUE_ACCESSOR,\n\t\t\tuseExisting: ToggleComponent,\n\t\t\tmulti: true,\n\t\t},\n\t],\n\ttemplateUrl: './toggle.component.html',\n\tstyles: '',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ToggleComponent {\n\t// Base checkbox properties\n\tvariant = input<ToggleVariantProps>();\n\tsize = input<ToggleSizeProps>();\n\tclasses = input<string>('');\n\tlabel = input<string>('');\n\tname = input<string | null>(null);\n\n\tvalue = model<boolean>(false);\n\n\t// ControlValueAccessor attributes\n\tprivate onControlChange: any = () => {};\n\tprivate onControlTouch: any = () => {};\n\tdisabled = model<boolean>(false);\n\n\t// ControlValueAccessor methods\n\twriteValue(obj: any): void {\n\t\tthis.value.set(obj);\n\t}\n\n\tregisterOnChange(fn: any): void {\n\t\tthis.onControlChange = fn;\n\t}\n\n\tregisterOnTouched(fn: any): void {\n\t\tthis.onControlTouch = fn;\n\t}\n\n\thandleToggle() {\n\t\tthis.value.set(!this.value());\n\t\tthis.handleChange();\n\t}\n\n\t// Change handler\n\tonChange = output<boolean>();\n\thandleChange(): void {\n\t\tthis.onControlChange(this.value());\n\t\tthis.onChange.emit(this.value());\n\t}\n\n\t// Blur handler\n\thandleBlur() {\n\t\tthis.onControlTouch();\n\t}\n\n\t// classes\n\tget componentClass(): string {\n\t\tif (this.variant() === 'primary') {\n\t\t\tif (this.disabled()) {\n\t\t\t\treturn cn(\n\t\t\t\t\ttoggleComponent({\n\t\t\t\t\t\tvariant: 'primary-disabled',\n\t\t\t\t\t\tsize: this.size(),\n\t\t\t\t\t\tclass: this.classes(),\n\t\t\t\t\t}),\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tif (this.value()) {\n\t\t\t\t\treturn cn(\n\t\t\t\t\t\ttoggleComponent({\n\t\t\t\t\t\t\tvariant: 'primary-toggled',\n\t\t\t\t\t\t\tsize: this.size(),\n\t\t\t\t\t\t\tclass: this.classes(),\n\t\t\t\t\t\t}),\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\treturn cn(\n\t\t\t\t\t\ttoggleComponent({\n\t\t\t\t\t\t\tvariant: 'primary',\n\t\t\t\t\t\t\tsize: this.size(),\n\t\t\t\t\t\t\tclass: this.classes(),\n\t\t\t\t\t\t}),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (this.variant() === 'secondary') {\n\t\t\tif (this.disabled()) {\n\t\t\t\treturn cn(\n\t\t\t\t\ttoggleComponent({\n\t\t\t\t\t\tvariant: 'secondary-disabled',\n\t\t\t\t\t\tsize: this.size(),\n\t\t\t\t\t\tclass: this.classes(),\n\t\t\t\t\t}),\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tif (this.value()) {\n\t\t\t\t\treturn cn(\n\t\t\t\t\t\ttoggleComponent({\n\t\t\t\t\t\t\tvariant: 'secondary-toggled',\n\t\t\t\t\t\t\tsize: this.size(),\n\t\t\t\t\t\t\tclass: this.classes(),\n\t\t\t\t\t\t}),\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\treturn cn(\n\t\t\t\t\t\ttoggleComponent({\n\t\t\t\t\t\t\tvariant: 'secondary',\n\t\t\t\t\t\t\tsize: this.size(),\n\t\t\t\t\t\t\tclass: this.classes(),\n\t\t\t\t\t\t}),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (this.variant() === 'success') {\n\t\t\tif (this.disabled()) {\n\t\t\t\treturn cn(\n\t\t\t\t\ttoggleComponent({\n\t\t\t\t\t\tvariant: 'success-disabled',\n\t\t\t\t\t\tsize: this.size(),\n\t\t\t\t\t\tclass: this.classes(),\n\t\t\t\t\t}),\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tif (this.value()) {\n\t\t\t\t\treturn cn(\n\t\t\t\t\t\ttoggleComponent({\n\t\t\t\t\t\t\tvariant: 'success-toggled',\n\t\t\t\t\t\t\tsize: this.size(),\n\t\t\t\t\t\t\tclass: this.classes(),\n\t\t\t\t\t\t}),\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\treturn cn(\n\t\t\t\t\t\ttoggleComponent({\n\t\t\t\t\t\t\tvariant: 'success',\n\t\t\t\t\t\t\tsize: this.size(),\n\t\t\t\t\t\t\tclass: this.classes(),\n\t\t\t\t\t\t}),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (this.variant() === 'warning') {\n\t\t\tif (this.disabled()) {\n\t\t\t\treturn cn(\n\t\t\t\t\ttoggleComponent({\n\t\t\t\t\t\tvariant: 'warning-disabled',\n\t\t\t\t\t\tsize: this.size(),\n\t\t\t\t\t\tclass: this.classes(),\n\t\t\t\t\t}),\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tif (this.value()) {\n\t\t\t\t\treturn cn(\n\t\t\t\t\t\ttoggleComponent({\n\t\t\t\t\t\t\tvariant: 'warning-toggled',\n\t\t\t\t\t\t\tsize: this.size(),\n\t\t\t\t\t\t\tclass: this.classes(),\n\t\t\t\t\t\t}),\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\treturn cn(\n\t\t\t\t\t\ttoggleComponent({\n\t\t\t\t\t\t\tvariant: 'warning',\n\t\t\t\t\t\t\tsize: this.size(),\n\t\t\t\t\t\t\tclass: this.classes(),\n\t\t\t\t\t\t}),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (this.variant() === 'error') {\n\t\t\tif (this.disabled()) {\n\t\t\t\treturn cn(\n\t\t\t\t\ttoggleComponent({\n\t\t\t\t\t\tvariant: 'error-disabled',\n\t\t\t\t\t\tsize: this.size(),\n\t\t\t\t\t\tclass: this.classes(),\n\t\t\t\t\t}),\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tif (this.value()) {\n\t\t\t\t\treturn cn(\n\t\t\t\t\t\ttoggleComponent({\n\t\t\t\t\t\t\tvariant: 'error-toggled',\n\t\t\t\t\t\t\tsize: this.size(),\n\t\t\t\t\t\t\tclass: this.classes(),\n\t\t\t\t\t\t}),\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\treturn cn(\n\t\t\t\t\t\ttoggleComponent({\n\t\t\t\t\t\t\tvariant: 'error',\n\t\t\t\t\t\t\tsize: this.size(),\n\t\t\t\t\t\t\tclass: this.classes(),\n\t\t\t\t\t\t}),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (this.variant() === 'accent') {\n\t\t\tif (this.disabled()) {\n\t\t\t\treturn cn(\n\t\t\t\t\ttoggleComponent({\n\t\t\t\t\t\tvariant: 'accent-disabled',\n\t\t\t\t\t\tsize: this.size(),\n\t\t\t\t\t\tclass: this.classes(),\n\t\t\t\t\t}),\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tif (this.value()) {\n\t\t\t\t\treturn cn(\n\t\t\t\t\t\ttoggleComponent({\n\t\t\t\t\t\t\tvariant: 'accent-toggled',\n\t\t\t\t\t\t\tsize: this.size(),\n\t\t\t\t\t\t\tclass: this.classes(),\n\t\t\t\t\t\t}),\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\treturn cn(\n\t\t\t\t\t\ttoggleComponent({\n\t\t\t\t\t\t\tvariant: 'accent',\n\t\t\t\t\t\t\tsize: this.size(),\n\t\t\t\t\t\t\tclass: this.classes(),\n\t\t\t\t\t\t}),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (this.variant() === 'info') {\n\t\t\tif (this.disabled()) {\n\t\t\t\treturn cn(\n\t\t\t\t\ttoggleComponent({\n\t\t\t\t\t\tvariant: 'info-disabled',\n\t\t\t\t\t\tsize: this.size(),\n\t\t\t\t\t\tclass: this.classes(),\n\t\t\t\t\t}),\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tif (this.value()) {\n\t\t\t\t\treturn cn(\n\t\t\t\t\t\ttoggleComponent({\n\t\t\t\t\t\t\tvariant: 'info-toggled',\n\t\t\t\t\t\t\tsize: this.size(),\n\t\t\t\t\t\t\tclass: this.classes(),\n\t\t\t\t\t\t}),\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\treturn cn(\n\t\t\t\t\t\ttoggleComponent({\n\t\t\t\t\t\t\tvariant: 'info',\n\t\t\t\t\t\t\tsize: this.size(),\n\t\t\t\t\t\t\tclass: this.classes(),\n\t\t\t\t\t\t}),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif (this.disabled()) {\n\t\t\t\treturn cn(\n\t\t\t\t\ttoggleComponent({\n\t\t\t\t\t\tvariant: 'primary-disabled',\n\t\t\t\t\t\tsize: this.size(),\n\t\t\t\t\t\tclass: this.classes(),\n\t\t\t\t\t}),\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tif (this.value()) {\n\t\t\t\t\treturn cn(\n\t\t\t\t\t\ttoggleComponent({\n\t\t\t\t\t\t\tvariant: 'primary-toggled',\n\t\t\t\t\t\t\tsize: this.size(),\n\t\t\t\t\t\t\tclass: this.classes(),\n\t\t\t\t\t\t}),\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\treturn cn(\n\t\t\t\t\t\ttoggleComponent({\n\t\t\t\t\t\t\tvariant: 'primary',\n\t\t\t\t\t\t\tsize: this.size(),\n\t\t\t\t\t\t\tclass: this.classes(),\n\t\t\t\t\t\t}),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n","@let disabledVar = disabled();\n<label class=\"flex cursor-pointer items-center justify-start gap-4\">\n\t<input\n\t\tclass=\"hidden\"\n\t\ttype=\"checkbox\"\n\t\t[(ngModel)]=\"value\"\n\t\t[disabled]=\"disabledVar\"\n\t\t[attr.name]=\"name()\"\n\t\t(change)=\"handleChange()\"\n\t\t(blur)=\"handleBlur()\"\n\t/>\n\t<button [class]=\"componentClass\" (click)=\"handleToggle()\" [disabled]=\"disabledVar\">\n\t\t<span typography [tyVariant]=\"'body'\" [tyColor]=\"'inherit'\">\n\t\t\t{{ label() }}\n\t\t</span>\n\t</button>\n</label>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAAA;AAOO,MAAM,eAAe,GAAG,GAAG,CACjC;IACC,MAAM;IACN,sBAAsB;IACtB,cAAc;IACd,cAAc;IACd,cAAc;IACd,mBAAmB;IACnB,uBAAuB;IACvB,yBAAyB;IACzB,gCAAgC;IAChC,qBAAqB;IACrB,uBAAuB;IACvB,uBAAuB;IACvB,0BAA0B;IAC1B,uBAAuB;IACvB,iCAAiC;IACjC,0CAA0C;IAC1C,uBAAuB;IACvB,0BAA0B;IAC1B,uBAAuB;IACvB,iCAAiC;IACjC,0CAA0C;IAC1C,6BAA6B;CAC7B,EACD;AACC,IAAA,QAAQ,EAAE;AACT,QAAA,OAAO,E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A,EAAA,CAAA,eAAA,CAAA,EAAA,QAAA,EAAA,CAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,mBAAmB,EAAA,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,CAAA,WAAA,EAAA,SAAA,EAAA,cAAA,EAAA,gBAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAY9B,eAAe,EAAA,UAAA,EAAA,CAAA;kBAf3B,SAAS;+BACC,WAAW,EAAA,UAAA,EACT,IAAI,EACP,OAAA,EAAA,CAAC,WAAW,EAAE,mBAAmB,CAAC,EAChC,SAAA,EAAA;AACV,wBAAA;AACC,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAiB,eAAA;AAC5B,4BAAA,KAAK,EAAE,IAAI;AACX,yBAAA;qBACD,EAGgB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,whBAAA,EAAA,CAAA;;;AEhMhD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"sixbell-telco-sdk-components-forms-toggle.mjs","sources":["../../../projects/sdk/components/forms/toggle/src/toggle.component.ts","../../../projects/sdk/components/forms/toggle/src/toggle.component.html","../../../projects/sdk/components/forms/toggle/sixbell-telco-sdk-components-forms-toggle.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { ChangeDetectionStrategy, Component, input, model, output } from '@angular/core';\nimport { FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { TypographyDirective } from '@sixbell-telco/sdk/directives/typography';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\nimport { cva } from 'class-variance-authority';\n\nexport const toggleComponent = cva(\n\t[\n\t\t'grid',\n\t\t'place-content-center',\n\t\t'rounded-full',\n\t\t'border-[1px]',\n\t\t'border-solid',\n\t\t'transition-colors',\n\t\t'focus-visible:outline',\n\t\t'focus-visible:outline-2',\n\t\t'focus-visible:outline-offset-2',\n\t\t'hover:bg-opacity-40',\n\t\t'active:transition-all',\n\t\t'active:hover:scale-95',\n\t\t'active:hover:animate-pop',\n\t\t'active:hover:ease-out',\n\t\t'active:hover:animate-duration-0',\n\t\t'active:hover:animate-fill-mode-backwards',\n\t\t'active:focus:scale-95',\n\t\t'active:focus:animate-pop',\n\t\t'active:focus:ease-out',\n\t\t'active:focus:animate-duration-0',\n\t\t'active:focus:animate-fill-mode-backwards',\n\t\t'hover:active:bg-opacity-100',\n\t],\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tprimary: [\n\t\t\t\t\t'border-secondary',\n\t\t\t\t\t'text-base-content',\n\t\t\t\t\t'hover:border-primary',\n\t\t\t\t\t'hover:bg-primary',\n\t\t\t\t\t'hover:text-base-content',\n\t\t\t\t\t'hover:active:bg-primary',\n\t\t\t\t\t'focus-visible:outline-secondary',\n\t\t\t\t\t'hover:focus-visible:outline-primary',\n\t\t\t\t\t'hover:active:focus-visible:outline-primary',\n\t\t\t\t\t'hover:active:text-primary-content',\n\t\t\t\t],\n\t\t\t\t'primary-toggled': ['bg-primary', 'border-primary', 'text-primary-content'],\n\t\t\t\t'primary-disabled': ['border-secondary', 'border-opacity-50', 'text-base-content', 'text-opacity-50'],\n\t\t\t\tsecondary: [\n\t\t\t\t\t'border-secondary',\n\t\t\t\t\t'text-base-content',\n\t\t\t\t\t'hover:border-secondary',\n\t\t\t\t\t'hover:bg-secondary',\n\t\t\t\t\t'hover:text-base-content',\n\t\t\t\t\t'hover:active:bg-secondary',\n\t\t\t\t\t'focus-visible:outline-secondary',\n\t\t\t\t\t'hover:focus-visible:outline-secondary',\n\t\t\t\t\t'hover:active:focus-visible:outline-secondary',\n\t\t\t\t\t'hover:active:text-secondary-content',\n\t\t\t\t],\n\t\t\t\t'secondary-toggled': ['bg-secondary', 'border-secondary', 'text-secondary-content'],\n\t\t\t\t'secondary-disabled': ['border-secondary', 'border-opacity-50', 'text-base-content', 'text-opacity-50'],\n\t\t\t\tsuccess: [\n\t\t\t\t\t'border-secondary',\n\t\t\t\t\t'text-base-content',\n\t\t\t\t\t'hover:border-success',\n\t\t\t\t\t'hover:bg-success',\n\t\t\t\t\t'hover:text-base-content',\n\t\t\t\t\t'hover:active:bg-success',\n\t\t\t\t\t'focus-visible:outline-secondary',\n\t\t\t\t\t'hover:focus-visible:outline-success',\n\t\t\t\t\t'hover:active:focus-visible:outline-success',\n\t\t\t\t\t'hover:active:text-success-content',\n\t\t\t\t],\n\t\t\t\t'success-toggled': ['bg-success', 'border-success', 'text-success-content'],\n\t\t\t\t'success-disabled': ['border-secondary', 'border-opacity-50', 'text-base-content', 'text-opacity-50'],\n\t\t\t\terror: [\n\t\t\t\t\t'border-secondary',\n\t\t\t\t\t'text-base-content',\n\t\t\t\t\t'hover:border-error',\n\t\t\t\t\t'hover:bg-error',\n\t\t\t\t\t'hover:text-base-content',\n\t\t\t\t\t'hover:active:bg-error',\n\t\t\t\t\t'focus-visible:outline-secondary',\n\t\t\t\t\t'hover:focus-visible:outline-error',\n\t\t\t\t\t'hover:active:focus-visible:outline-error',\n\t\t\t\t\t'hover:active:text-error-content',\n\t\t\t\t],\n\t\t\t\t'error-toggled': ['bg-error', 'border-error', 'text-error-content'],\n\t\t\t\t'error-disabled': ['border-secondary', 'border-opacity-50', 'text-base-content', 'text-opacity-50'],\n\t\t\t\twarning: [\n\t\t\t\t\t'border-secondary',\n\t\t\t\t\t'text-base-content',\n\t\t\t\t\t'hover:border-warning',\n\t\t\t\t\t'hover:bg-warning',\n\t\t\t\t\t'hover:text-base-content',\n\t\t\t\t\t'hover:active:bg-warning',\n\t\t\t\t\t'focus-visible:outline-secondary',\n\t\t\t\t\t'hover:focus-visible:outline-warning',\n\t\t\t\t\t'hover:active:focus-visible:outline-warning',\n\t\t\t\t\t'hover:active:text-warning-content',\n\t\t\t\t],\n\t\t\t\t'warning-toggled': ['bg-warning', 'border-warning', 'text-warning-content'],\n\t\t\t\t'warning-disabled': ['border-secondary', 'border-opacity-50', 'text-base-content', 'text-opacity-50'],\n\t\t\t\tinfo: [\n\t\t\t\t\t'border-secondary',\n\t\t\t\t\t'text-base-content',\n\t\t\t\t\t'hover:border-info',\n\t\t\t\t\t'hover:bg-info',\n\t\t\t\t\t'hover:text-base-content',\n\t\t\t\t\t'hover:active:bg-info',\n\t\t\t\t\t'focus-visible:outline-secondary',\n\t\t\t\t\t'hover:focus-visible:outline-info',\n\t\t\t\t\t'hover:active:focus-visible:outline-info',\n\t\t\t\t\t'hover:active:text-primary-content',\n\t\t\t\t],\n\t\t\t\t'info-toggled': ['bg-info', 'border-info', 'text-info-content'],\n\t\t\t\t'info-disabled': ['border-secondary', 'border-opacity-50', 'text-base-content', 'text-opacity-50'],\n\t\t\t\taccent: [\n\t\t\t\t\t'border-secondary',\n\t\t\t\t\t'text-base-content',\n\t\t\t\t\t'hover:border-accent',\n\t\t\t\t\t'hover:bg-accent',\n\t\t\t\t\t'hover:text-base-content',\n\t\t\t\t\t'hover:active:bg-accent',\n\t\t\t\t\t'focus-visible:outline-secondary',\n\t\t\t\t\t'hover:focus-visible:outline-accent',\n\t\t\t\t\t'hover:active:focus-visible:outline-accent',\n\t\t\t\t\t'hover:active:text-accent-content',\n\t\t\t\t],\n\t\t\t\t'accent-toggled': ['bg-accent', 'border-accent', 'text-accent-content'],\n\t\t\t\t'accent-disabled': ['border-secondary', 'border-opacity-50', 'text-base-content', 'text-opacity-50'],\n\t\t\t},\n\t\t\tsize: {\n\t\t\t\tsm: ['h-10', 'w-10'],\n\t\t\t\tmd: ['h-11', 'w-11'],\n\t\t\t\tlg: ['h-12', 'w-12'],\n\t\t\t},\n\t\t},\n\t\tcompoundVariants: [],\n\t\tdefaultVariants: {\n\t\t\tvariant: 'secondary',\n\t\t\tsize: 'sm',\n\t\t},\n\t},\n);\n\nexport type ToggleVariantProps =\n\t| 'primary'\n\t| 'primary-toggled'\n\t| 'primary-disabled'\n\t| 'secondary'\n\t| 'secondary-toggled'\n\t| 'secondary-disabled'\n\t| 'success'\n\t| 'success-toggled'\n\t| 'success-disabled'\n\t| 'error'\n\t| 'error-toggled'\n\t| 'error-disabled'\n\t| 'warning'\n\t| 'warning-toggled'\n\t| 'warning-disabled'\n\t| 'info'\n\t| 'info-toggled'\n\t| 'info-disabled'\n\t| 'accent'\n\t| 'accent-toggled'\n\t| 'accent-disabled'\n\t| null\n\t| undefined;\nexport type ToggleSizeProps = 'sm' | 'md' | 'lg' | null | undefined;\n\nexport type ToggleProps = {\n\tvariant?: ToggleVariantProps;\n\tsize?: ToggleSizeProps;\n};\n\n@Component({\n\tselector: 'st-toggle',\n\tstandalone: true,\n\timports: [FormsModule, TypographyDirective],\n\tproviders: [\n\t\t{\n\t\t\tprovide: NG_VALUE_ACCESSOR,\n\t\t\tuseExisting: ToggleComponent,\n\t\t\tmulti: true,\n\t\t},\n\t],\n\ttemplateUrl: './toggle.component.html',\n\tstyles: '',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ToggleComponent {\n\t// Base checkbox properties\n\tvariant = input<ToggleVariantProps>();\n\tsize = input<ToggleSizeProps>();\n\tclasses = input<string>('');\n\tlabel = input<string>('');\n\tname = input<string | null>(null);\n\n\tvalue = model<boolean>(false);\n\n\t// ControlValueAccessor attributes\n\tprivate onControlChange: any = () => {};\n\tprivate onControlTouch: any = () => {};\n\tdisabled = model<boolean>(false);\n\n\t// ControlValueAccessor methods\n\twriteValue(obj: any): void {\n\t\tthis.value.set(obj);\n\t}\n\n\tregisterOnChange(fn: any): void {\n\t\tthis.onControlChange = fn;\n\t}\n\n\tregisterOnTouched(fn: any): void {\n\t\tthis.onControlTouch = fn;\n\t}\n\n\thandleToggle() {\n\t\tthis.value.set(!this.value());\n\t\tthis.handleChange();\n\t}\n\n\t// Change handler\n\tonChange = output<boolean>();\n\thandleChange(): void {\n\t\tthis.onControlChange(this.value());\n\t\tthis.onChange.emit(this.value());\n\t}\n\n\t// Blur handler\n\thandleBlur() {\n\t\tthis.onControlTouch();\n\t}\n\n\t// classes\n\tget componentClass(): string {\n\t\tif (this.variant() === 'primary') {\n\t\t\tif (this.disabled()) {\n\t\t\t\treturn cn(\n\t\t\t\t\ttoggleComponent({\n\t\t\t\t\t\tvariant: 'primary-disabled',\n\t\t\t\t\t\tsize: this.size(),\n\t\t\t\t\t\tclass: this.classes(),\n\t\t\t\t\t}),\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tif (this.value()) {\n\t\t\t\t\treturn cn(\n\t\t\t\t\t\ttoggleComponent({\n\t\t\t\t\t\t\tvariant: 'primary-toggled',\n\t\t\t\t\t\t\tsize: this.size(),\n\t\t\t\t\t\t\tclass: this.classes(),\n\t\t\t\t\t\t}),\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\treturn cn(\n\t\t\t\t\t\ttoggleComponent({\n\t\t\t\t\t\t\tvariant: 'primary',\n\t\t\t\t\t\t\tsize: this.size(),\n\t\t\t\t\t\t\tclass: this.classes(),\n\t\t\t\t\t\t}),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (this.variant() === 'secondary') {\n\t\t\tif (this.disabled()) {\n\t\t\t\treturn cn(\n\t\t\t\t\ttoggleComponent({\n\t\t\t\t\t\tvariant: 'secondary-disabled',\n\t\t\t\t\t\tsize: this.size(),\n\t\t\t\t\t\tclass: this.classes(),\n\t\t\t\t\t}),\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tif (this.value()) {\n\t\t\t\t\treturn cn(\n\t\t\t\t\t\ttoggleComponent({\n\t\t\t\t\t\t\tvariant: 'secondary-toggled',\n\t\t\t\t\t\t\tsize: this.size(),\n\t\t\t\t\t\t\tclass: this.classes(),\n\t\t\t\t\t\t}),\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\treturn cn(\n\t\t\t\t\t\ttoggleComponent({\n\t\t\t\t\t\t\tvariant: 'secondary',\n\t\t\t\t\t\t\tsize: this.size(),\n\t\t\t\t\t\t\tclass: this.classes(),\n\t\t\t\t\t\t}),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (this.variant() === 'success') {\n\t\t\tif (this.disabled()) {\n\t\t\t\treturn cn(\n\t\t\t\t\ttoggleComponent({\n\t\t\t\t\t\tvariant: 'success-disabled',\n\t\t\t\t\t\tsize: this.size(),\n\t\t\t\t\t\tclass: this.classes(),\n\t\t\t\t\t}),\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tif (this.value()) {\n\t\t\t\t\treturn cn(\n\t\t\t\t\t\ttoggleComponent({\n\t\t\t\t\t\t\tvariant: 'success-toggled',\n\t\t\t\t\t\t\tsize: this.size(),\n\t\t\t\t\t\t\tclass: this.classes(),\n\t\t\t\t\t\t}),\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\treturn cn(\n\t\t\t\t\t\ttoggleComponent({\n\t\t\t\t\t\t\tvariant: 'success',\n\t\t\t\t\t\t\tsize: this.size(),\n\t\t\t\t\t\t\tclass: this.classes(),\n\t\t\t\t\t\t}),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (this.variant() === 'warning') {\n\t\t\tif (this.disabled()) {\n\t\t\t\treturn cn(\n\t\t\t\t\ttoggleComponent({\n\t\t\t\t\t\tvariant: 'warning-disabled',\n\t\t\t\t\t\tsize: this.size(),\n\t\t\t\t\t\tclass: this.classes(),\n\t\t\t\t\t}),\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tif (this.value()) {\n\t\t\t\t\treturn cn(\n\t\t\t\t\t\ttoggleComponent({\n\t\t\t\t\t\t\tvariant: 'warning-toggled',\n\t\t\t\t\t\t\tsize: this.size(),\n\t\t\t\t\t\t\tclass: this.classes(),\n\t\t\t\t\t\t}),\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\treturn cn(\n\t\t\t\t\t\ttoggleComponent({\n\t\t\t\t\t\t\tvariant: 'warning',\n\t\t\t\t\t\t\tsize: this.size(),\n\t\t\t\t\t\t\tclass: this.classes(),\n\t\t\t\t\t\t}),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (this.variant() === 'error') {\n\t\t\tif (this.disabled()) {\n\t\t\t\treturn cn(\n\t\t\t\t\ttoggleComponent({\n\t\t\t\t\t\tvariant: 'error-disabled',\n\t\t\t\t\t\tsize: this.size(),\n\t\t\t\t\t\tclass: this.classes(),\n\t\t\t\t\t}),\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tif (this.value()) {\n\t\t\t\t\treturn cn(\n\t\t\t\t\t\ttoggleComponent({\n\t\t\t\t\t\t\tvariant: 'error-toggled',\n\t\t\t\t\t\t\tsize: this.size(),\n\t\t\t\t\t\t\tclass: this.classes(),\n\t\t\t\t\t\t}),\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\treturn cn(\n\t\t\t\t\t\ttoggleComponent({\n\t\t\t\t\t\t\tvariant: 'error',\n\t\t\t\t\t\t\tsize: this.size(),\n\t\t\t\t\t\t\tclass: this.classes(),\n\t\t\t\t\t\t}),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (this.variant() === 'accent') {\n\t\t\tif (this.disabled()) {\n\t\t\t\treturn cn(\n\t\t\t\t\ttoggleComponent({\n\t\t\t\t\t\tvariant: 'accent-disabled',\n\t\t\t\t\t\tsize: this.size(),\n\t\t\t\t\t\tclass: this.classes(),\n\t\t\t\t\t}),\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tif (this.value()) {\n\t\t\t\t\treturn cn(\n\t\t\t\t\t\ttoggleComponent({\n\t\t\t\t\t\t\tvariant: 'accent-toggled',\n\t\t\t\t\t\t\tsize: this.size(),\n\t\t\t\t\t\t\tclass: this.classes(),\n\t\t\t\t\t\t}),\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\treturn cn(\n\t\t\t\t\t\ttoggleComponent({\n\t\t\t\t\t\t\tvariant: 'accent',\n\t\t\t\t\t\t\tsize: this.size(),\n\t\t\t\t\t\t\tclass: this.classes(),\n\t\t\t\t\t\t}),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (this.variant() === 'info') {\n\t\t\tif (this.disabled()) {\n\t\t\t\treturn cn(\n\t\t\t\t\ttoggleComponent({\n\t\t\t\t\t\tvariant: 'info-disabled',\n\t\t\t\t\t\tsize: this.size(),\n\t\t\t\t\t\tclass: this.classes(),\n\t\t\t\t\t}),\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tif (this.value()) {\n\t\t\t\t\treturn cn(\n\t\t\t\t\t\ttoggleComponent({\n\t\t\t\t\t\t\tvariant: 'info-toggled',\n\t\t\t\t\t\t\tsize: this.size(),\n\t\t\t\t\t\t\tclass: this.classes(),\n\t\t\t\t\t\t}),\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\treturn cn(\n\t\t\t\t\t\ttoggleComponent({\n\t\t\t\t\t\t\tvariant: 'info',\n\t\t\t\t\t\t\tsize: this.size(),\n\t\t\t\t\t\t\tclass: this.classes(),\n\t\t\t\t\t\t}),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif (this.disabled()) {\n\t\t\t\treturn cn(\n\t\t\t\t\ttoggleComponent({\n\t\t\t\t\t\tvariant: 'primary-disabled',\n\t\t\t\t\t\tsize: this.size(),\n\t\t\t\t\t\tclass: this.classes(),\n\t\t\t\t\t}),\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tif (this.value()) {\n\t\t\t\t\treturn cn(\n\t\t\t\t\t\ttoggleComponent({\n\t\t\t\t\t\t\tvariant: 'primary-toggled',\n\t\t\t\t\t\t\tsize: this.size(),\n\t\t\t\t\t\t\tclass: this.classes(),\n\t\t\t\t\t\t}),\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\treturn cn(\n\t\t\t\t\t\ttoggleComponent({\n\t\t\t\t\t\t\tvariant: 'primary',\n\t\t\t\t\t\t\tsize: this.size(),\n\t\t\t\t\t\t\tclass: this.classes(),\n\t\t\t\t\t\t}),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n","@let disabledVar = disabled();\n<label class=\"flex cursor-pointer items-center justify-start gap-4\">\n\t<input\n\t\tclass=\"hidden\"\n\t\ttype=\"checkbox\"\n\t\t[(ngModel)]=\"value\"\n\t\t[disabled]=\"disabledVar\"\n\t\t[attr.name]=\"name()\"\n\t\t(change)=\"handleChange()\"\n\t\t(blur)=\"handleBlur()\"\n\t/>\n\t<button [class]=\"componentClass\" (click)=\"handleToggle()\" [disabled]=\"disabledVar\">\n\t\t<span typography [tyVariant]=\"'body'\" [tyColor]=\"'inherit'\">\n\t\t\t{{ label() }}\n\t\t</span>\n\t</button>\n</label>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAAA;AAOO,MAAM,eAAe,GAAG,GAAG,CACjC;IACC,MAAM;IACN,sBAAsB;IACtB,cAAc;IACd,cAAc;IACd,cAAc;IACd,mBAAmB;IACnB,uBAAuB;IACvB,yBAAyB;IACzB,gCAAgC;IAChC,qBAAqB;IACrB,uBAAuB;IACvB,uBAAuB;IACvB,0BAA0B;IAC1B,uBAAuB;IACvB,iCAAiC;IACjC,0CAA0C;IAC1C,uBAAuB;IACvB,0BAA0B;IAC1B,uBAAuB;IACvB,iCAAiC;IACjC,0CAA0C;IAC1C,6BAA6B;CAC7B,EACD;AACC,IAAA,QAAQ,EAAE;AACT,QAAA,OAAO,EAAE;AACR,YAAA,OAAO,EAAE;gBACR,kBAAkB;gBAClB,mBAAmB;gBACnB,sBAAsB;gBACtB,kBAAkB;gBAClB,yBAAyB;gBACzB,yBAAyB;gBACzB,iCAAiC;gBACjC,qCAAqC;gBACrC,4CAA4C;gBAC5C,mCAAmC;AACnC,aAAA;AACD,YAAA,iBAAiB,EAA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A,EAAA,SAAA,EAAA,cAAA,EAAA,gBAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAY9B,eAAe,EAAA,UAAA,EAAA,CAAA;kBAf3B,SAAS;+BACC,WAAW,EAAA,UAAA,EACT,IAAI,EACP,OAAA,EAAA,CAAC,WAAW,EAAE,mBAAmB,CAAC,EAChC,SAAA,EAAA;AACV,wBAAA;AACC,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAiB,eAAA;AAC5B,4BAAA,KAAK,EAAE,IAAI;AACX,yBAAA;qBACD,EAGgB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,whBAAA,EAAA,CAAA;;;AEhMhD;;AAEG;;;;"}
|
|
@@ -4,12 +4,13 @@ import { NgIconComponent } from '@ng-icons/core';
|
|
|
4
4
|
import { cn } from '@sixbell-telco/sdk/utils/cn';
|
|
5
5
|
import { cva } from 'class-variance-authority';
|
|
6
6
|
|
|
7
|
-
const iconComponent = cva([], {
|
|
7
|
+
const iconComponent = cva(['leading-tight'], {
|
|
8
8
|
variants: {
|
|
9
9
|
color: {
|
|
10
|
-
white: 'text-
|
|
11
|
-
black: 'text-
|
|
10
|
+
white: 'text-white',
|
|
11
|
+
black: 'text-black',
|
|
12
12
|
primary: 'text-primary',
|
|
13
|
+
base: 'text-base-content',
|
|
13
14
|
inherit: 'text-inherit',
|
|
14
15
|
},
|
|
15
16
|
size: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sixbell-telco-sdk-components-icon.mjs","sources":["../../../projects/sdk/components/icon/src/icon.component.ts","../../../projects/sdk/components/icon/src/icon.component.html","../../../projects/sdk/components/icon/sixbell-telco-sdk-components-icon.ts"],"sourcesContent":["import { Component, input } from '@angular/core';\nimport { NgIconComponent } from '@ng-icons/core';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\nimport { cva } from 'class-variance-authority';\n\nexport const iconComponent = cva([], {\n\tvariants: {\n\t\tcolor: {\n\t\t\twhite: 'text-
|
|
1
|
+
{"version":3,"file":"sixbell-telco-sdk-components-icon.mjs","sources":["../../../projects/sdk/components/icon/src/icon.component.ts","../../../projects/sdk/components/icon/src/icon.component.html","../../../projects/sdk/components/icon/sixbell-telco-sdk-components-icon.ts"],"sourcesContent":["import { Component, input } from '@angular/core';\nimport { NgIconComponent } from '@ng-icons/core';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\nimport { cva } from 'class-variance-authority';\n\nexport const iconComponent = cva(['leading-tight'], {\n\tvariants: {\n\t\tcolor: {\n\t\t\twhite: 'text-white',\n\t\t\tblack: 'text-black',\n\t\t\tprimary: 'text-primary',\n\t\t\tbase: 'text-base-content',\n\t\t\tinherit: 'text-inherit',\n\t\t},\n\t\tsize: {\n\t\t\tsm: ['text-xl'],\n\t\t\tmd: ['text-2xl'],\n\t\t\tlg: ['text-4xl'],\n\t\t\txl: ['text-6xl'],\n\t\t},\n\t},\n\tcompoundVariants: [],\n\tdefaultVariants: {\n\t\tcolor: 'inherit',\n\t\tsize: 'md',\n\t},\n});\n\nexport type IconColorProps = 'white' | 'black' | 'primary' | 'base' | 'inherit' | null | undefined;\nexport type IconSizeProps = 'sm' | 'md' | 'lg' | 'xl' | null | undefined;\n\nexport type IconProps = {\n\tcolor?: IconColorProps;\n\tsize?: IconSizeProps;\n};\n\n@Component({\n\tselector: 'st-icon',\n\tstandalone: true,\n\timports: [NgIconComponent],\n\ttemplateUrl: './icon.component.html',\n\tstyles: '',\n})\nexport class IconComponent {\n\tcolor = input<IconColorProps>();\n\tsize = input<IconSizeProps>();\n\ticon = input.required<string>();\n\n\tget componentClass() {\n\t\treturn cn(iconComponent({ color: this.color(), size: this.size() }));\n\t}\n}\n","<ng-icon [svg]=\"icon()\" [class]=\"componentClass\" />\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;M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iBAAA,EAAA,IAAA,EAAA,EAAA,IAAA,EAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,IAAA,EAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EC3C1B,2DACA,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDsCW,eAAe,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,KAAA,EAAA,MAAA,EAAA,aAAA,EAAA,OAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;4FAIb,aAAa,EAAA,UAAA,EAAA,CAAA;kBAPzB,SAAS;AACC,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,SAAS,EACP,UAAA,EAAA,IAAI,EACP,OAAA,EAAA,CAAC,eAAe,CAAC,EAAA,QAAA,EAAA,2DAAA,EAAA,CAAA;;;AEvC3B;;AAEG;;;;"}
|
|
@@ -8,7 +8,7 @@ import { IconComponent } from '@sixbell-telco/sdk/components/icon';
|
|
|
8
8
|
import { cn } from '@sixbell-telco/sdk/utils/cn';
|
|
9
9
|
import { cva } from 'class-variance-authority';
|
|
10
10
|
|
|
11
|
-
const linkComponent = cva(['link', 'font-body', 'font-normal', 'inline-flex', 'items-center', 'leading-normal'], {
|
|
11
|
+
const linkComponent = cva(['link', 'font-body', 'font-normal', 'inline-flex', 'items-center', 'leading-normal', 'align-top'], {
|
|
12
12
|
variants: {
|
|
13
13
|
variant: {
|
|
14
14
|
primary: ['link-primary', 'no-underline'],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sixbell-telco-sdk-components-link.mjs","sources":["../../../projects/sdk/components/link/src/link.component.ts","../../../projects/sdk/components/link/src/link.component.html","../../../projects/sdk/components/link/sixbell-telco-sdk-components-link.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, input } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { Router, RouterLink, RouterLinkActive } from '@angular/router';\nimport { IconComponent } from '@sixbell-telco/sdk/components/icon';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\nimport { cva } from 'class-variance-authority';\n\nexport type Route = {\n\tlabel: string;\n\tpath: string;\n};\n\nexport const linkComponent = cva(['link', 'font-body', 'font-normal', 'inline-flex', 'items-center', 'leading-normal'], {\n\tvariants: {\n\t\tvariant: {\n\t\t\tprimary: ['link-primary', 'no-underline'],\n\t\t\tsecondary: ['link-secondary', 'no-underline'],\n\t\t\ttertiary: ['link-tertiary', 'no-underline'],\n\t\t\taccent: ['link-accent', 'no-underline'],\n\t\t\tsuccess: ['link-success', 'no-underline'],\n\t\t\tinfo: ['link-info', 'no-underline'],\n\t\t\twarning: ['link-warning', 'no-underline'],\n\t\t\terror: ['link-error', 'no-underline'],\n\t\t},\n\t\ticonPosition: {\n\t\t\tleft: [''],\n\t\t\tright: ['flex-row-reverse'],\n\t\t},\n\t},\n\tcompoundVariants: [],\n\tdefaultVariants: {\n\t\tvariant: 'primary',\n\t\ticonPosition: 'left',\n\t},\n});\n\nexport type LinkVariantProps = 'primary' | 'secondary' | 'tertiary' | 'accent' | 'success' | 'info' | 'warning' | 'error' | null | undefined;\nexport type LinkIconPositionProps = 'left' | 'right' | null | undefined;\n\nexport type LinkProps = {\n\tvariant?: LinkVariantProps;\n\ticonPosition?: LinkIconPositionProps;\n};\n\n@Component({\n\tselector: 'st-link',\n\tstandalone: true,\n\timports: [IconComponent, RouterLinkActive, RouterLink, FormsModule, CommonModule],\n\ttemplateUrl: './link.component.html',\n\tstyles: '',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class LinkComponent {\n\t// base\n\tvariant = input<LinkVariantProps>();\n\ticon = input<string | undefined>();\n\ticonPosition = input<LinkIconPositionProps>();\n\tlabel = input<string>('');\n\n\t// router\n\trouterLink = input<RouterLink['routerLink']>(null);\n\trouterLinkOptions = input<RouterLinkActive['routerLinkActiveOptions']>({ exact: false });\n\trouterLinkActive = input<RouterLinkActive['routerLinkActive']>('active');\n\tqueryParams = input<RouterLink['queryParams']>(null);\n\tqueryParamsHandling = input<RouterLink['queryParamsHandling']>(null);\n\tfragment = input<RouterLink['fragment']>(undefined);\n\n\tconstructor(private router: Router) {}\n\n\tget componentClass() {\n\t\treturn cn(\n\t\t\tlinkComponent({\n\t\t\t\tvariant: this.variant(),\n\t\t\t\ticonPosition: this.iconPosition(),\n\t\t\t}),\n\t\t);\n\t}\n}\n","@let iconVar = this.icon();\n@let routerLinkVar = this.routerLink();\n@let rotuerLinkActiveVar = this.routerLinkActive();\n@let queryParamsVar = this.queryParams();\n@let queryParamsHandlingVar = this.queryParamsHandling();\n@let routerLinkOptionsVar = routerLinkOptions();\n@let fragmentVar = this.fragment();\n<a\n\t[class]=\"componentClass\"\n\t[routerLink]=\"routerLinkVar\"\n\t[routerLinkActive]=\"rotuerLinkActiveVar\"\n\t[routerLinkActiveOptions]=\"routerLinkOptionsVar\"\n\t[queryParams]=\"queryParamsVar\"\n\t[queryParamsHandling]=\"queryParamsHandlingVar\"\n\t[fragment]=\"fragmentVar\"\n>\n\t@if (iconVar) {\n\t\t<st-icon [icon]=\"iconVar\" color=\"inherit\" size=\"md\"></st-icon>\n\t}\n\t<ng-content></ng-content>\n</a>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"sixbell-telco-sdk-components-link.mjs","sources":["../../../projects/sdk/components/link/src/link.component.ts","../../../projects/sdk/components/link/src/link.component.html","../../../projects/sdk/components/link/sixbell-telco-sdk-components-link.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, input } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { Router, RouterLink, RouterLinkActive } from '@angular/router';\nimport { IconComponent } from '@sixbell-telco/sdk/components/icon';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\nimport { cva } from 'class-variance-authority';\n\nexport type Route = {\n\tlabel: string;\n\tpath: string;\n};\n\nexport const linkComponent = cva(['link', 'font-body', 'font-normal', 'inline-flex', 'items-center', 'leading-normal', 'align-top'], {\n\tvariants: {\n\t\tvariant: {\n\t\t\tprimary: ['link-primary', 'no-underline'],\n\t\t\tsecondary: ['link-secondary', 'no-underline'],\n\t\t\ttertiary: ['link-tertiary', 'no-underline'],\n\t\t\taccent: ['link-accent', 'no-underline'],\n\t\t\tsuccess: ['link-success', 'no-underline'],\n\t\t\tinfo: ['link-info', 'no-underline'],\n\t\t\twarning: ['link-warning', 'no-underline'],\n\t\t\terror: ['link-error', 'no-underline'],\n\t\t},\n\t\ticonPosition: {\n\t\t\tleft: [''],\n\t\t\tright: ['flex-row-reverse'],\n\t\t},\n\t},\n\tcompoundVariants: [],\n\tdefaultVariants: {\n\t\tvariant: 'primary',\n\t\ticonPosition: 'left',\n\t},\n});\n\nexport type LinkVariantProps = 'primary' | 'secondary' | 'tertiary' | 'accent' | 'success' | 'info' | 'warning' | 'error' | null | undefined;\nexport type LinkIconPositionProps = 'left' | 'right' | null | undefined;\n\nexport type LinkProps = {\n\tvariant?: LinkVariantProps;\n\ticonPosition?: LinkIconPositionProps;\n};\n\n@Component({\n\tselector: 'st-link',\n\tstandalone: true,\n\timports: [IconComponent, RouterLinkActive, RouterLink, FormsModule, CommonModule],\n\ttemplateUrl: './link.component.html',\n\tstyles: '',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class LinkComponent {\n\t// base\n\tvariant = input<LinkVariantProps>();\n\ticon = input<string | undefined>();\n\ticonPosition = input<LinkIconPositionProps>();\n\tlabel = input<string>('');\n\n\t// router\n\trouterLink = input<RouterLink['routerLink']>(null);\n\trouterLinkOptions = input<RouterLinkActive['routerLinkActiveOptions']>({ exact: false });\n\trouterLinkActive = input<RouterLinkActive['routerLinkActive']>('active');\n\tqueryParams = input<RouterLink['queryParams']>(null);\n\tqueryParamsHandling = input<RouterLink['queryParamsHandling']>(null);\n\tfragment = input<RouterLink['fragment']>(undefined);\n\n\tconstructor(private router: Router) {}\n\n\tget componentClass() {\n\t\treturn cn(\n\t\t\tlinkComponent({\n\t\t\t\tvariant: this.variant(),\n\t\t\t\ticonPosition: this.iconPosition(),\n\t\t\t}),\n\t\t);\n\t}\n}\n","@let iconVar = this.icon();\n@let routerLinkVar = this.routerLink();\n@let rotuerLinkActiveVar = this.routerLinkActive();\n@let queryParamsVar = this.queryParams();\n@let queryParamsHandlingVar = this.queryParamsHandling();\n@let routerLinkOptionsVar = routerLinkOptions();\n@let fragmentVar = this.fragment();\n<a\n\t[class]=\"componentClass\"\n\t[routerLink]=\"routerLinkVar\"\n\t[routerLinkActive]=\"rotuerLinkActiveVar\"\n\t[routerLinkActiveOptions]=\"routerLinkOptionsVar\"\n\t[queryParams]=\"queryParamsVar\"\n\t[queryParamsHandling]=\"queryParamsHandlingVar\"\n\t[fragment]=\"fragmentVar\"\n>\n\t@if (iconVar) {\n\t\t<st-icon [icon]=\"iconVar\" color=\"inherit\" size=\"md\"></st-icon>\n\t}\n\t<ng-content></ng-content>\n</a>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;MAaa,aAAa,GAAG,GAAG,CAAC,CAAC,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,cAAc,EAAE,gBAAgB,EAAE,WAAW,CAAC,EAAE;AACpI,IAAA,QAAQ,EAAE;AACT,QAAA,OAAO,EAAE;AACR,YAAA,OAAO,EAAE,C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AA,EAAA,QAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,UAAU,EAAA,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,CAAA,QAAA,EAAA,aAAA,EAAA,UAAA,EAAA,qBAAA,EAAA,OAAA,EAAA,MAAA,EAAA,YAAA,EAAA,kBAAA,EAAA,oBAAA,EAAA,YAAA,EAAA,YAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAE,WAAW,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAE,YAAY,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAKpE,aAAa,EAAA,UAAA,EAAA,CAAA;kBARzB,SAAS;AACC,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,SAAS,cACP,IAAI,EAAA,OAAA,EACP,CAAC,aAAa,EAAE,gBAAgB,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,CAAC,EAGhE,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,guBAAA,EAAA,CAAA;;;AEnDhD;;AAEG;;;;"}
|
|
@@ -42,11 +42,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImpo
|
|
|
42
42
|
args: [{ selector: 'st-modal-title', standalone: true, imports: [CommonModule, TypographyDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"mb-6\">\n\t<h2 typography tyFontWeight=\"medium\" tyColor=\"base\" tyVariant=\"h2\">\n\t\t<ng-content></ng-content>\n\t</h2>\n</div>\n" }]
|
|
43
43
|
}] });
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
/**
|
|
46
|
+
* CSS class generator for modal component variants
|
|
47
|
+
* @internal
|
|
48
|
+
*/
|
|
49
|
+
const modalComponent = cva(['modal-box', 'bg-base-200', 'p-6', 'text-base-content', 'w-11/12'], {
|
|
46
50
|
variants: {
|
|
47
51
|
width: {
|
|
48
|
-
|
|
49
|
-
|
|
52
|
+
xs: ['max-w-xs'],
|
|
53
|
+
sm: ['max-w-sm'],
|
|
54
|
+
md: ['max-w-md'],
|
|
55
|
+
lg: ['max-w-lg'],
|
|
56
|
+
xl: ['max-w-xl'],
|
|
57
|
+
'2xl': ['max-w-2xl'],
|
|
58
|
+
'3xl': ['max-w-3xl'],
|
|
59
|
+
'4xl': ['max-w-4xl'],
|
|
60
|
+
'5xl': ['max-w-5xl'],
|
|
50
61
|
},
|
|
51
62
|
aligment: {
|
|
52
63
|
top: ['modal-top'],
|
|
@@ -56,19 +67,56 @@ const modalComponent = cva(['modal-box', 'bg-base-200', 'p-6', 'text-base-conten
|
|
|
56
67
|
},
|
|
57
68
|
compoundVariants: [],
|
|
58
69
|
defaultVariants: {
|
|
59
|
-
width: '
|
|
70
|
+
width: 'md',
|
|
60
71
|
aligment: 'center',
|
|
61
72
|
},
|
|
62
73
|
});
|
|
74
|
+
/**
|
|
75
|
+
* A customizable modal dialog component with Tailwind CSS integration
|
|
76
|
+
*
|
|
77
|
+
* @remarks
|
|
78
|
+
* Uses Angular's signal-based inputs and outputs for reactive state management.
|
|
79
|
+
* Supports various sizes and vertical alignments through input properties.
|
|
80
|
+
*
|
|
81
|
+
* @example
|
|
82
|
+
* ```html
|
|
83
|
+
* <st-modal
|
|
84
|
+
* modalId="confirmDialog"
|
|
85
|
+
* [(opened)]="isOpen"
|
|
86
|
+
* width="lg"
|
|
87
|
+
* alignment="top"
|
|
88
|
+
* (onClose)="handleClose()"
|
|
89
|
+
* (onClickOutside)="handleClickOustide()"
|
|
90
|
+
* />
|
|
91
|
+
* ```
|
|
92
|
+
*/
|
|
63
93
|
class ModalComponent {
|
|
94
|
+
/**
|
|
95
|
+
* Specifies the maximum width of the modal content
|
|
96
|
+
* @defaultValue 'md'
|
|
97
|
+
*/
|
|
64
98
|
width = input();
|
|
99
|
+
/**
|
|
100
|
+
* Controls the vertical positioning of the modal
|
|
101
|
+
* @defaultValue 'center'
|
|
102
|
+
*/
|
|
65
103
|
alignment = input('center');
|
|
104
|
+
/** Required unique identifier for the modal dialog */
|
|
66
105
|
modalId = input.required();
|
|
106
|
+
/** Event emitted when clicking outside the modal content */
|
|
67
107
|
onClickOutside = output();
|
|
108
|
+
/** Event emitted when the modal closes */
|
|
68
109
|
onClose = output();
|
|
110
|
+
/** @internal Icon reference for close button */
|
|
69
111
|
iconClose = matCloseOutline;
|
|
112
|
+
/** @internal Reference to the underlying dialog element */
|
|
70
113
|
dialog = viewChild('dialog');
|
|
114
|
+
/**
|
|
115
|
+
* Controls the visibility state of the modal
|
|
116
|
+
* Supports two-way binding via Angular's model
|
|
117
|
+
*/
|
|
71
118
|
opened = model(false);
|
|
119
|
+
/** @internal Handles open/close state changes */
|
|
72
120
|
openedEffect = effect(() => {
|
|
73
121
|
if (this.opened()) {
|
|
74
122
|
this.handleOpen();
|
|
@@ -77,11 +125,21 @@ class ModalComponent {
|
|
|
77
125
|
this.handleClose();
|
|
78
126
|
}
|
|
79
127
|
});
|
|
128
|
+
/**
|
|
129
|
+
* Computes CSS classes for modal content based on current configuration
|
|
130
|
+
* @returns Combined Tailwind classes string
|
|
131
|
+
* @internal
|
|
132
|
+
*/
|
|
80
133
|
get componentClass() {
|
|
81
134
|
return cn(modalComponent({
|
|
82
135
|
width: this.width(),
|
|
83
136
|
}));
|
|
84
137
|
}
|
|
138
|
+
/**
|
|
139
|
+
* Computes CSS classes for modal overlay positioning
|
|
140
|
+
* @returns Combined positioning classes string
|
|
141
|
+
* @internal
|
|
142
|
+
*/
|
|
85
143
|
get modalClass() {
|
|
86
144
|
return cn('modal', {
|
|
87
145
|
'modal-top': this.alignment() === 'top',
|
|
@@ -89,26 +147,41 @@ class ModalComponent {
|
|
|
89
147
|
'modal-bottom': this.alignment() === 'bottom',
|
|
90
148
|
});
|
|
91
149
|
}
|
|
150
|
+
/** @internal Opens the native dialog element */
|
|
92
151
|
handleOpen() {
|
|
93
152
|
this.dialog()?.nativeElement.showModal();
|
|
94
153
|
}
|
|
154
|
+
/** @internal Closes the native dialog element */
|
|
95
155
|
handleClose() {
|
|
96
156
|
this.dialog()?.nativeElement.close();
|
|
97
157
|
}
|
|
158
|
+
/**
|
|
159
|
+
* Public method to close the modal and emit onClose event
|
|
160
|
+
* Can be called directly from parent components
|
|
161
|
+
*/
|
|
98
162
|
handleCloseClick() {
|
|
99
163
|
this.opened.set(false);
|
|
100
164
|
this.onClose.emit();
|
|
101
165
|
}
|
|
166
|
+
/**
|
|
167
|
+
* Handles cancel events from the dialog element
|
|
168
|
+
* @param event - Native dialog cancel event
|
|
169
|
+
* @internal
|
|
170
|
+
*/
|
|
102
171
|
handleCancelClick(event) {
|
|
103
172
|
event.preventDefault();
|
|
104
173
|
this.opened.set(false);
|
|
105
174
|
this.onClose.emit();
|
|
106
175
|
}
|
|
176
|
+
/**
|
|
177
|
+
* Handles click events outside the modal content
|
|
178
|
+
* @param event - Native mouse event
|
|
179
|
+
* @internal
|
|
180
|
+
*/
|
|
107
181
|
handleClickOutside(event) {
|
|
108
182
|
event.preventDefault();
|
|
109
183
|
this.opened.set(false);
|
|
110
184
|
this.onClickOutside.emit();
|
|
111
|
-
this.onClose.emit();
|
|
112
185
|
}
|
|
113
186
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: ModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
114
187
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.12", type: ModalComponent, isStandalone: true, selector: "st-modal", inputs: { width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, alignment: { classPropertyName: "alignment", publicName: "alignment", isSignal: true, isRequired: false, transformFunction: null }, modalId: { classPropertyName: "modalId", publicName: "modalId", isSignal: true, isRequired: true, transformFunction: null }, opened: { classPropertyName: "opened", publicName: "opened", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onClickOutside: "onClickOutside", onClose: "onClose", opened: "openedChange" }, viewQueries: [{ propertyName: "dialog", first: true, predicate: ["dialog"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- eslint-disable @angular-eslint/template/elements-content -->\n<dialog #dialog [id]=\"modalId()\" [class]=\"modalClass\" (cancel)=\"handleCancelClick($event)\">\n\t<div [class]=\"componentClass\">\n\t\t<div class=\"absolute right-2 top-2\">\n\t\t\t<button class=\"btn btn-circle btn-ghost btn-sm absolute right-0 top-0\" (click)=\"handleCloseClick()\">\u2715</button>\n\t\t</div>\n\t\t<ng-content select=\"st-modal-title\"></ng-content>\n\t\t<ng-content select=\"st-modal-content\"></ng-content>\n\t\t<ng-content select=\"st-modal-actions\"></ng-content>\n\t</div>\n\t<form method=\"dialog\" class=\"modal-backdrop\">\n\t\t<button (click)=\"handleClickOutside($event)\"></button>\n\t</form>\n</dialog>\n", styles: [""] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sixbell-telco-sdk-components-modal.mjs","sources":["../../../projects/sdk/components/modal/modal-actions/modal-actions.component.ts","../../../projects/sdk/components/modal/modal-actions/modal-actions.component.html","../../../projects/sdk/components/modal/modal-content/modal-content.component.ts","../../../projects/sdk/components/modal/modal-content/modal-content.component.html","../../../projects/sdk/components/modal/modal-title/modal-title.component.ts","../../../projects/sdk/components/modal/modal-title/modal-title.component.html","../../../projects/sdk/components/modal/src/modal.component.ts","../../../projects/sdk/components/modal/src/modal.component.html","../../../projects/sdk/components/modal/sixbell-telco-sdk-components-modal.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, input } from '@angular/core';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\n\nexport type ModalActionsAligmentProps = 'left' | 'right' | 'center';\n\n@Component({\n\t// eslint-disable-next-line @angular-eslint/component-selector\n\tselector: 'st-modal-actions',\n\tstandalone: true,\n\timports: [CommonModule],\n\ttemplateUrl: './modal-actions.component.html',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ModalActionsComponent {\n\t// Base table properties\n\talignment = input<ModalActionsAligmentProps>('left');\n\n\tget componentClass() {\n\t\treturn cn('modal-action', {\n\t\t\t'justify-start': this.alignment() === 'left',\n\t\t\t'justify-end': this.alignment() === 'right',\n\t\t\t'justify-center': this.alignment() === 'center',\n\t\t});\n\t}\n}\n","<div [class]=\"componentClass\">\n\t<ng-content></ng-content>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n\t// eslint-disable-next-line @angular-eslint/component-selector\n\tselector: 'st-modal-content',\n\tstandalone: true,\n\timports: [CommonModule],\n\ttemplateUrl: './modal-content.component.html',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ModalContentComponent {}\n","<ng-content></ng-content>\n","import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { TypographyDirective } from '@sixbell-telco/sdk/directives/typography';\n\n@Component({\n\t// eslint-disable-next-line @angular-eslint/component-selector\n\tselector: 'st-modal-title',\n\tstandalone: true,\n\timports: [CommonModule, TypographyDirective],\n\ttemplateUrl: './modal-title.component.html',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ModalTitleComponent {}\n","<div class=\"mb-6\">\n\t<h2 typography tyFontWeight=\"medium\" tyColor=\"base\" tyVariant=\"h2\">\n\t\t<ng-content></ng-content>\n\t</h2>\n</div>\n","import { Component, effect, ElementRef, input, model, output, viewChild } from '@angular/core';\nimport { matCloseOutline } from '@sixbell-telco/sdk/components/icon/material/outline';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\nimport { cva } from 'class-variance-authority';\n\nexport const modalComponent = cva(['modal-box', 'bg-base-200', 'p-6', 'text-base-content'], {\n\tvariants: {\n\t\twidth: {\n\t\t\tfull: ['w-full'],\n\t\t\tfit: ['w-fit', 'min-w-fit'],\n\t\t},\n\t\taligment: {\n\t\t\ttop: ['modal-top'],\n\t\t\tcenter: ['modal-middle'],\n\t\t\tbottom: ['modal-bottom'],\n\t\t},\n\t},\n\tcompoundVariants: [],\n\tdefaultVariants: {\n\t\twidth: 'full',\n\t\taligment: 'center',\n\t},\n});\n\nexport type ModalPaddingProps = 'none' | 'sm' | 'md' | 'lg' | null | undefined;\nexport type ModalWidthProps = 'full' | 'fit' | null | undefined;\nexport type ModalAlignmentProps = 'top' | 'center' | 'bottom' | null | undefined;\n\nexport type ModalProps = {\n\tpadding?: ModalPaddingProps;\n\twidth?: ModalWidthProps;\n\talignment?: ModalAlignmentProps;\n};\n\n@Component({\n\tselector: 'st-modal',\n\tstandalone: true,\n\timports: [],\n\ttemplateUrl: './modal.component.html',\n\tstyles: '',\n})\nexport class ModalComponent {\n\twidth = input<ModalWidthProps>();\n\talignment = input<ModalAlignmentProps>('center');\n\tmodalId = input.required<string>();\n\tonClickOutside = output<void>();\n\tonClose = output<void>();\n\n\ticonClose = matCloseOutline;\n\tdialog = viewChild<ElementRef<HTMLDialogElement>>('dialog');\n\n\topened = model<boolean>(false);\n\topenedEffect = effect(() => {\n\t\tif (this.opened()) {\n\t\t\tthis.handleOpen();\n\t\t} else {\n\t\t\tthis.handleClose();\n\t\t}\n\t});\n\n\tget componentClass() {\n\t\treturn cn(\n\t\t\tmodalComponent({\n\t\t\t\twidth: this.width(),\n\t\t\t}),\n\t\t);\n\t}\n\n\tget modalClass() {\n\t\treturn cn('modal', {\n\t\t\t'modal-top': this.alignment() === 'top',\n\t\t\t'modal-middle': this.alignment() === 'center',\n\t\t\t'modal-bottom': this.alignment() === 'bottom',\n\t\t});\n\t}\n\n\thandleOpen() {\n\t\tthis.dialog()?.nativeElement.showModal();\n\t}\n\n\thandleClose() {\n\t\tthis.dialog()?.nativeElement.close();\n\t}\n\n\thandleCloseClick() {\n\t\tthis.opened.set(false);\n\t\tthis.onClose.emit();\n\t}\n\n\thandleCancelClick(event: Event) {\n\t\tevent.preventDefault();\n\t\tthis.opened.set(false);\n\t\tthis.onClose.emit();\n\t}\n\n\thandleClickOutside(event: Event) {\n\t\tevent.preventDefault();\n\t\tthis.opened.set(false);\n\t\tthis.onClickOutside.emit();\n\t\tthis.onClose.emit();\n\t}\n}\n","<!-- eslint-disable @angular-eslint/template/elements-content -->\n<dialog #dialog [id]=\"modalId()\" [class]=\"modalClass\" (cancel)=\"handleCancelClick($event)\">\n\t<div [class]=\"componentClass\">\n\t\t<div class=\"absolute right-2 top-2\">\n\t\t\t<button class=\"btn btn-circle btn-ghost btn-sm absolute right-0 top-0\" (click)=\"handleCloseClick()\">✕</button>\n\t\t</div>\n\t\t<ng-content select=\"st-modal-title\"></ng-content>\n\t\t<ng-content select=\"st-modal-content\"></ng-content>\n\t\t<ng-content select=\"st-modal-actions\"></ng-content>\n\t</div>\n\t<form method=\"dialog\" class=\"modal-backdrop\">\n\t\t<button (click)=\"handleClickOutside($event)\"></button>\n\t</form>\n</dialog>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MAca,qBAAqB,CAAA;;AAEjC,IAAA,SAAS,GAAG,KAAK,CAA4B,MAAM,CAAC,CAAC;AAErD,IAAA,IAAI,cAAc,GAAA;QACjB,OAAO,EAAE,CAAC,cAAc,EAAE;AACzB,YAAA,eAAe,EAAE,IAAI,CAAC,SAAS,EAAE,KAAK,MAAM;AAC5C,YAAA,aAAa,EAAE,IAAI,CAAC,SAAS,EAAE,KAAK,OAAO;AAC3C,YAAA,gBAAgB,EAAE,IAAI,CAAC,SAAS,EAAE,KAAK,QAAQ;AAC/C,SAAA,CAAC,CAAC;KACH;wGAVW,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;4FAArB,qBAAqB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EA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dk/components/modal/modal-actions/modal-actions.component.ts","../../../projects/sdk/components/modal/modal-actions/modal-actions.component.html","../../../projects/sdk/components/modal/modal-content/modal-content.component.ts","../../../projects/sdk/components/modal/modal-content/modal-content.component.html","../../../projects/sdk/components/modal/modal-title/modal-title.component.ts","../../../projects/sdk/components/modal/modal-title/modal-title.component.html","../../../projects/sdk/components/modal/src/modal.component.ts","../../../projects/sdk/components/modal/src/modal.component.html","../../../projects/sdk/components/modal/sixbell-telco-sdk-components-modal.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, input } from '@angular/core';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\n\nexport type ModalActionsAligmentProps = 'left' | 'right' | 'center';\n\n@Component({\n\t// eslint-disable-next-line @angular-eslint/component-selector\n\tselector: 'st-modal-actions',\n\tstandalone: true,\n\timports: [CommonModule],\n\ttemplateUrl: './modal-actions.component.html',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ModalActionsComponent {\n\t// Base table properties\n\talignment = input<ModalActionsAligmentProps>('left');\n\n\tget componentClass() {\n\t\treturn cn('modal-action', {\n\t\t\t'justify-start': this.alignment() === 'left',\n\t\t\t'justify-end': this.alignment() === 'right',\n\t\t\t'justify-center': this.alignment() === 'center',\n\t\t});\n\t}\n}\n","<div [class]=\"componentClass\">\n\t<ng-content></ng-content>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n\t// eslint-disable-next-line @angular-eslint/component-selector\n\tselector: 'st-modal-content',\n\tstandalone: true,\n\timports: [CommonModule],\n\ttemplateUrl: './modal-content.component.html',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ModalContentComponent {}\n","<ng-content></ng-content>\n","import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { TypographyDirective } from '@sixbell-telco/sdk/directives/typography';\n\n@Component({\n\t// eslint-disable-next-line @angular-eslint/component-selector\n\tselector: 'st-modal-title',\n\tstandalone: true,\n\timports: [CommonModule, TypographyDirective],\n\ttemplateUrl: './modal-title.component.html',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ModalTitleComponent {}\n","<div class=\"mb-6\">\n\t<h2 typography tyFontWeight=\"medium\" tyColor=\"base\" tyVariant=\"h2\">\n\t\t<ng-content></ng-content>\n\t</h2>\n</div>\n","import { Component, effect, ElementRef, input, model, output, viewChild } from '@angular/core';\nimport { matCloseOutline } from '@sixbell-telco/sdk/components/icon/material/outline';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\nimport { cva } from 'class-variance-authority';\n\n/**\n * CSS class generator for modal component variants\n * @internal\n */\nexport const modalComponent = cva(['modal-box', 'bg-base-200', 'p-6', 'text-base-content', 'w-11/12'], {\n\tvariants: {\n\t\twidth: {\n\t\t\txs: ['max-w-xs'],\n\t\t\tsm: ['max-w-sm'],\n\t\t\tmd: ['max-w-md'],\n\t\t\tlg: ['max-w-lg'],\n\t\t\txl: ['max-w-xl'],\n\t\t\t'2xl': ['max-w-2xl'],\n\t\t\t'3xl': ['max-w-3xl'],\n\t\t\t'4xl': ['max-w-4xl'],\n\t\t\t'5xl': ['max-w-5xl'],\n\t\t},\n\t\taligment: {\n\t\t\ttop: ['modal-top'],\n\t\t\tcenter: ['modal-middle'],\n\t\t\tbottom: ['modal-bottom'],\n\t\t},\n\t},\n\tcompoundVariants: [],\n\tdefaultVariants: {\n\t\twidth: 'md',\n\t\taligment: 'center',\n\t},\n});\n\n/** Possible width values for the modal component */\nexport type ModalWidthProps = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | null | undefined;\n\n/** Possible vertical alignment values for the modal component */\nexport type ModalAlignmentProps = 'top' | 'center' | 'bottom' | null | undefined;\n\n/** Configuration properties for the modal component */\nexport type ModalProps = {\n\twidth?: ModalWidthProps;\n\talignment?: ModalAlignmentProps;\n};\n\n/**\n * A customizable modal dialog component with Tailwind CSS integration\n *\n * @remarks\n * Uses Angular's signal-based inputs and outputs for reactive state management.\n * Supports various sizes and vertical alignments through input properties.\n *\n * @example\n * ```html\n * <st-modal\n * modalId=\"confirmDialog\"\n * [(opened)]=\"isOpen\"\n * width=\"lg\"\n * alignment=\"top\"\n * (onClose)=\"handleClose()\"\n * (onClickOutside)=\"handleClickOustide()\"\n * />\n * ```\n */\n@Component({\n\tselector: 'st-modal',\n\tstandalone: true,\n\timports: [],\n\ttemplateUrl: './modal.component.html',\n\tstyles: '',\n})\nexport class ModalComponent {\n\t/**\n\t * Specifies the maximum width of the modal content\n\t * @defaultValue 'md'\n\t */\n\twidth = input<ModalWidthProps>();\n\n\t/**\n\t * Controls the vertical positioning of the modal\n\t * @defaultValue 'center'\n\t */\n\talignment = input<ModalAlignmentProps>('center');\n\n\t/** Required unique identifier for the modal dialog */\n\tmodalId = input.required<string>();\n\n\t/** Event emitted when clicking outside the modal content */\n\tonClickOutside = output<void>();\n\n\t/** Event emitted when the modal closes */\n\tonClose = output<void>();\n\n\t/** @internal Icon reference for close button */\n\ticonClose = matCloseOutline;\n\n\t/** @internal Reference to the underlying dialog element */\n\tdialog = viewChild<ElementRef<HTMLDialogElement>>('dialog');\n\n\t/**\n\t * Controls the visibility state of the modal\n\t * Supports two-way binding via Angular's model\n\t */\n\topened = model<boolean>(false);\n\n\t/** @internal Handles open/close state changes */\n\topenedEffect = effect(() => {\n\t\tif (this.opened()) {\n\t\t\tthis.handleOpen();\n\t\t} else {\n\t\t\tthis.handleClose();\n\t\t}\n\t});\n\n\t/**\n\t * Computes CSS classes for modal content based on current configuration\n\t * @returns Combined Tailwind classes string\n\t * @internal\n\t */\n\tget componentClass() {\n\t\treturn cn(\n\t\t\tmodalComponent({\n\t\t\t\twidth: this.width(),\n\t\t\t}),\n\t\t);\n\t}\n\n\t/**\n\t * Computes CSS classes for modal overlay positioning\n\t * @returns Combined positioning classes string\n\t * @internal\n\t */\n\tget modalClass() {\n\t\treturn cn('modal', {\n\t\t\t'modal-top': this.alignment() === 'top',\n\t\t\t'modal-middle': this.alignment() === 'center',\n\t\t\t'modal-bottom': this.alignment() === 'bottom',\n\t\t});\n\t}\n\n\t/** @internal Opens the native dialog element */\n\thandleOpen() {\n\t\tthis.dialog()?.nativeElement.showModal();\n\t}\n\n\t/** @internal Closes the native dialog element */\n\thandleClose() {\n\t\tthis.dialog()?.nativeElement.close();\n\t}\n\n\t/**\n\t * Public method to close the modal and emit onClose event\n\t * Can be called directly from parent components\n\t */\n\thandleCloseClick() {\n\t\tthis.opened.set(false);\n\t\tthis.onClose.emit();\n\t}\n\n\t/**\n\t * Handles cancel events from the dialog element\n\t * @param event - Native dialog cancel event\n\t * @internal\n\t */\n\thandleCancelClick(event: Event) {\n\t\tevent.preventDefault();\n\t\tthis.opened.set(false);\n\t\tthis.onClose.emit();\n\t}\n\n\t/**\n\t * Handles click events outside the modal content\n\t * @param event - Native mouse event\n\t * @internal\n\t */\n\thandleClickOutside(event: Event) {\n\t\tevent.preventDefault();\n\t\tthis.opened.set(false);\n\t\tthis.onClickOutside.emit();\n\t}\n}\n","<!-- eslint-disable @angular-eslint/template/elements-content -->\n<dialog #dialog [id]=\"modalId()\" [class]=\"modalClass\" (cancel)=\"handleCancelClick($event)\">\n\t<div [class]=\"componentClass\">\n\t\t<div class=\"absolute right-2 top-2\">\n\t\t\t<button class=\"btn btn-circle btn-ghost btn-sm absolute right-0 top-0\" (click)=\"handleCloseClick()\">✕</button>\n\t\t</div>\n\t\t<ng-content select=\"st-modal-title\"></ng-content>\n\t\t<ng-content select=\"st-modal-content\"></ng-content>\n\t\t<ng-content select=\"st-modal-actions\"></ng-content>\n\t</div>\n\t<form method=\"dialog\" class=\"modal-backdrop\">\n\t\t<button (click)=\"handleClickOutside($event)\"></button>\n\t</form>\n</dialog>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MAca,qBAAqB,CAAA;;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