@egose/shadcn-theme-ng-tw 0.0.26 → 0.0.27
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/LICENSE +201 -0
- package/README.md +107 -2
- package/alert/fesm2022/alert.mjs +19 -19
- package/alert/fesm2022/alert.mjs.map +1 -1
- package/badge/fesm2022/badge.mjs +4 -4
- package/badge/fesm2022/badge.mjs.map +1 -1
- package/basic-alert/fesm2022/basic-alert.mjs +4 -4
- package/basic-alert/fesm2022/basic-alert.mjs.map +1 -1
- package/button/fesm2022/button.mjs +8 -8
- package/button/fesm2022/button.mjs.map +1 -1
- package/calendar/fesm2022/calendar.mjs +16 -16
- package/calendar/fesm2022/calendar.mjs.map +1 -1
- package/date-picker/fesm2022/date-picker.mjs +19 -19
- package/date-picker/fesm2022/date-picker.mjs.map +1 -1
- package/form-date-picker/fesm2022/form-date-picker.mjs +4 -4
- package/form-date-picker/fesm2022/form-date-picker.mjs.map +1 -1
- package/form-field/fesm2022/form-field.mjs +16 -16
- package/form-field/fesm2022/form-field.mjs.map +1 -1
- package/form-field-simple/fesm2022/form-field-simple.mjs +4 -4
- package/form-field-simple/fesm2022/form-field-simple.mjs.map +1 -1
- package/form-select/fesm2022/form-select.mjs +5 -5
- package/form-select/fesm2022/form-select.mjs.map +1 -1
- package/form-text-input/fesm2022/form-text-input.mjs +8 -8
- package/form-text-input/fesm2022/form-text-input.mjs.map +1 -1
- package/form-textarea/fesm2022/form-textarea.mjs +4 -4
- package/form-textarea/fesm2022/form-textarea.mjs.map +1 -1
- package/icon/fesm2022/icon.mjs +8 -8
- package/icon/fesm2022/icon.mjs.map +1 -1
- package/input/fesm2022/input.mjs +8 -8
- package/input/fesm2022/input.mjs.map +1 -1
- package/label/fesm2022/label.mjs +8 -8
- package/label/fesm2022/label.mjs.map +1 -1
- package/package.json +7 -57
- package/popover/fesm2022/popover.mjs +12 -12
- package/popover/fesm2022/popover.mjs.map +1 -1
- package/select/fesm2022/select.mjs +40 -40
- package/select/fesm2022/select.mjs.map +1 -1
- package/separator/fesm2022/separator.mjs +8 -8
- package/separator/fesm2022/separator.mjs.map +1 -1
- package/sheet/fesm2022/sheet.mjs +36 -37
- package/sheet/fesm2022/sheet.mjs.map +1 -1
- package/sonner/fesm2022/sonner.mjs +8 -8
- package/sonner/fesm2022/sonner.mjs.map +1 -1
- package/spinner/fesm2022/spinner.mjs +8 -8
- package/spinner/fesm2022/spinner.mjs.map +1 -1
- package/switch/fesm2022/switch.mjs +12 -12
- package/switch/fesm2022/switch.mjs.map +1 -1
- package/accordion/README.md +0 -64
- package/accordion/fesm2022/accordion.mjs +0 -155
- package/accordion/fesm2022/accordion.mjs.map +0 -1
- package/accordion/index.d.ts +0 -49
- package/autocomplete/README.md +0 -64
- package/autocomplete/fesm2022/autocomplete.mjs +0 -543
- package/autocomplete/fesm2022/autocomplete.mjs.map +0 -1
- package/autocomplete/index.d.ts +0 -162
- package/checkbox/README.md +0 -64
- package/checkbox/fesm2022/checkbox.mjs +0 -146
- package/checkbox/fesm2022/checkbox.mjs.map +0 -1
- package/checkbox/index.d.ts +0 -55
- package/confirmation-dialog/README.md +0 -64
- package/confirmation-dialog/fesm2022/confirmation-dialog.mjs +0 -93
- package/confirmation-dialog/fesm2022/confirmation-dialog.mjs.map +0 -1
- package/confirmation-dialog/index.d.ts +0 -24
- package/dialog/README.md +0 -64
- package/dialog/fesm2022/dialog.mjs +0 -278
- package/dialog/fesm2022/dialog.mjs.map +0 -1
- package/dialog/index.d.ts +0 -89
- package/exports.json +0 -1
- package/form-checkbox/README.md +0 -64
- package/form-checkbox/fesm2022/form-checkbox.mjs +0 -137
- package/form-checkbox/fesm2022/form-checkbox.mjs.map +0 -1
- package/form-checkbox/index.d.ts +0 -27
- package/form-searchable-multiselect/README.md +0 -64
- package/form-searchable-multiselect/fesm2022/form-searchable-multiselect.mjs +0 -139
- package/form-searchable-multiselect/fesm2022/form-searchable-multiselect.mjs.map +0 -1
- package/form-searchable-multiselect/index.d.ts +0 -30
- package/layout-simple/README.md +0 -64
- package/layout-simple/fesm2022/layout-simple.mjs +0 -606
- package/layout-simple/fesm2022/layout-simple.mjs.map +0 -1
- package/layout-simple/index.d.ts +0 -142
- package/menu/README.md +0 -64
- package/menu/fesm2022/menu.mjs +0 -449
- package/menu/fesm2022/menu.mjs.map +0 -1
- package/menu/index.d.ts +0 -137
- package/radio-group/README.md +0 -64
- package/radio-group/fesm2022/radio-group.mjs +0 -170
- package/radio-group/fesm2022/radio-group.mjs.map +0 -1
- package/radio-group/index.d.ts +0 -63
- package/searchable-multiselect/README.md +0 -64
- package/searchable-multiselect/fesm2022/searchable-multiselect.mjs +0 -221
- package/searchable-multiselect/fesm2022/searchable-multiselect.mjs.map +0 -1
- package/searchable-multiselect/index.d.ts +0 -50
- package/tabs/README.md +0 -64
- package/tabs/fesm2022/tabs.mjs +0 -258
- package/tabs/fesm2022/tabs.mjs.map +0 -1
- package/tabs/index.d.ts +0 -71
- package/tooltip/README.md +0 -64
- package/tooltip/fesm2022/tooltip.mjs +0 -93
- package/tooltip/fesm2022/tooltip.mjs.map +0 -1
- package/tooltip/index.d.ts +0 -21
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright Junmin Ahn
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
CHANGED
|
@@ -1,2 +1,107 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
# @egose/shadcn-theme-ng
|
|
2
|
+
|
|
3
|
+
A themeable [shadcn/ui](https://ui.shadcn.com/)-style component library for Angular, built with [Tailwind CSS](https://tailwindcss.com/), [@spartan-ng/brain](https://www.spartan-ng.com/), and [@ng-icons](https://www.ng-icons.dev/). Ships one Angular library per component, consumed via npm subpath imports.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
Pick the package that matches your Tailwind setup (see **Tailwind variants** below):
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# Plain Tailwind (no prefix):
|
|
11
|
+
npm install @egose/shadcn-theme-ng
|
|
12
|
+
|
|
13
|
+
# Or the tw:-prefixed variant (when your Tailwind is configured with the `tw:` prefix):
|
|
14
|
+
npm install @egose/shadcn-theme-ng-tw
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
`pnpm` / `yarn` equivalents work too. Make sure your project's versions satisfy the peer ranges below.
|
|
18
|
+
|
|
19
|
+
### Peer dependencies
|
|
20
|
+
|
|
21
|
+
| Package | Supported version |
|
|
22
|
+
| ------------------- | ------------------- |
|
|
23
|
+
| `@angular/common` | `^20.2.0` |
|
|
24
|
+
| `@angular/core` | `^20.2.0` |
|
|
25
|
+
| `@spartan-ng/brain` | `^0.0.1-alpha.512+` |
|
|
26
|
+
|
|
27
|
+
`@spartan-ng/brain` is the underlying primitive library that powers most components.
|
|
28
|
+
|
|
29
|
+
### Tailwind variants
|
|
30
|
+
|
|
31
|
+
There are two published variants of this package. They produce identical markup and TypeScript surface but differ in the Tailwind class-string prefix:
|
|
32
|
+
|
|
33
|
+
| Variant | Package | Tailwind prefix in emitted class strings | Consumer requirement |
|
|
34
|
+
| ----------------- | --------------------------- | ---------------------------------------- | ----------------------------------------------------- |
|
|
35
|
+
| Plain (no prefix) | `@egose/shadcn-theme-ng` | (none — prefix stripped) | Configure Tailwind with **no** prefix (default). |
|
|
36
|
+
| `tw:`-prefixed | `@egose/shadcn-theme-ng-tw` | `tw:` (kept) | Configure Tailwind to recognize the **`tw:`** prefix. |
|
|
37
|
+
|
|
38
|
+
If your project mixes shadcn styles with other Tailwind utilities that share class names, use the `-tw` variant to avoid collisions.
|
|
39
|
+
|
|
40
|
+
## Import forms
|
|
41
|
+
|
|
42
|
+
Import each component via its own npm subpath:
|
|
43
|
+
|
|
44
|
+
```ts
|
|
45
|
+
import { HlmButtonModule, HlmButton } from '@egose/shadcn-theme-ng/button';
|
|
46
|
+
import { HlmLabel } from '@egose/shadcn-theme-ng/label';
|
|
47
|
+
import { EgFormTextInput } from '@egose/shadcn-theme-ng/form-text-input';
|
|
48
|
+
import { EgLayoutSimple, MenuItem } from '@egose/shadcn-theme-ng/layout-simple';
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
For the `-tw` variant, swap the package name:
|
|
52
|
+
|
|
53
|
+
```ts
|
|
54
|
+
import { HlmButtonModule, HlmButton } from '@egose/shadcn-theme-ng-tw/button';
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Standalone consumers can import the `*Imports` const arrays; NgModule consumers can import the corresponding `*Module` classes:
|
|
58
|
+
|
|
59
|
+
```ts
|
|
60
|
+
// Standalone component:
|
|
61
|
+
import { HlmButtonImports } from '@egose/shadcn-theme-ng/button';
|
|
62
|
+
@Component({ imports: [...HlmButtonImports] })
|
|
63
|
+
export class MyComp {}
|
|
64
|
+
|
|
65
|
+
// NgModule-based:
|
|
66
|
+
import { HlmButtonModule } from '@egose/shadcn-theme-ng/button';
|
|
67
|
+
@NgModule({ imports: [HlmButtonModule] })
|
|
68
|
+
export class MyModule {}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Available subpaths
|
|
72
|
+
|
|
73
|
+
Import by component name. Component `NameX` is reachable at `@egose/shadcn-theme-ng/<name-x>` (kebab-case). The current surface:
|
|
74
|
+
|
|
75
|
+
`accordion`, `alert`, `autocomplete`, `badge`, `basic-alert`, `button`, `calendar`, `checkbox`, `confirmation-dialog`, `date-picker`, `dialog`, `form-checkbox`, `form-date-picker`, `form-field`, `form-field-simple`, `form-searchable-multiselect`, `form-select`, `form-text-input`, `form-textarea`, `icon`, `input`, `label`, `layout-simple`, `menu`, `popover`, `radio-group`, `searchable-multiselect`, `select`, `separator`, `sheet`, `sonner`, `spinner`, `switch`, `tabs`, `tooltip`, `utils`.
|
|
76
|
+
|
|
77
|
+
Anything not in this list is not part of the public surface. The published `exports` map in `package.json` reflects this set exactly — if a subpath is not listed, do not assume it is importable.
|
|
78
|
+
|
|
79
|
+
## Quick start (Angular standalone)
|
|
80
|
+
|
|
81
|
+
```ts
|
|
82
|
+
import { Component } from "@angular/core";
|
|
83
|
+
import { HlmButtonImports } from "@egose/shadcn-theme-ng/button";
|
|
84
|
+
import { EgLayoutSimple, MenuItem } from "@egose/shadcn-theme-ng/layout-simple";
|
|
85
|
+
|
|
86
|
+
@Component({
|
|
87
|
+
selector: "app-demo",
|
|
88
|
+
standalone: true,
|
|
89
|
+
imports: [...HlmButtonImports],
|
|
90
|
+
template: \`
|
|
91
|
+
<eg-layout-simple [menuItems]="items">
|
|
92
|
+
<button hlmBtn variant="primary">Click</button>
|
|
93
|
+
</eg-layout-simple>
|
|
94
|
+
\`,
|
|
95
|
+
})
|
|
96
|
+
export class DemoComponent {
|
|
97
|
+
readonly items: MenuItem[] = [];
|
|
98
|
+
}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Working example
|
|
102
|
+
|
|
103
|
+
A complete Angular consumer app lives at [`@examples/standard`](https://github.com/egose/shadcn-theme/tree/main/packages/angular/@examples/standard) — see its `src/app/...` for real usage of `@egose/shadcn-theme-ng/button`, `.../layout-simple`, `.../form-text-input`, `.../autocomplete`, `.../select`, `.../form-checkbox`, `.../sheet`, etc.
|
|
104
|
+
|
|
105
|
+
## License
|
|
106
|
+
|
|
107
|
+
Apache-2.0 — see the `LICENSE` file shipped with the package (sourced from the repo root).
|
package/alert/fesm2022/alert.mjs
CHANGED
|
@@ -106,10 +106,10 @@ class HlmAlert {
|
|
|
106
106
|
variant: this.variant(),
|
|
107
107
|
appearance: this.appearance(),
|
|
108
108
|
}), this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
109
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
110
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.
|
|
109
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: HlmAlert, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
110
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.15", type: HlmAlert, isStandalone: true, selector: "[hlmAlert]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "alert" }, properties: { "class": "_computedClass()" } }, ngImport: i0 });
|
|
111
111
|
}
|
|
112
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
112
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: HlmAlert, decorators: [{
|
|
113
113
|
type: Directive,
|
|
114
114
|
args: [{
|
|
115
115
|
selector: '[hlmAlert]',
|
|
@@ -118,15 +118,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
118
118
|
'[class]': '_computedClass()',
|
|
119
119
|
},
|
|
120
120
|
}]
|
|
121
|
-
}] });
|
|
121
|
+
}], propDecorators: { userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }] } });
|
|
122
122
|
|
|
123
123
|
class HlmAlertDescription {
|
|
124
124
|
userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
|
|
125
125
|
_computedClass = computed(() => hlm('tw:text-current tw:col-start-2 tw:grid tw:justify-items-start tw:gap-1 tw:text-sm tw:[&_p]:leading-relaxed', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
126
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
127
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.
|
|
126
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: HlmAlertDescription, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
127
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.15", type: HlmAlertDescription, isStandalone: true, selector: "[hlmAlertDesc],[hlmAlertDescription]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, ngImport: i0 });
|
|
128
128
|
}
|
|
129
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
129
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: HlmAlertDescription, decorators: [{
|
|
130
130
|
type: Directive,
|
|
131
131
|
args: [{
|
|
132
132
|
selector: '[hlmAlertDesc],[hlmAlertDescription]',
|
|
@@ -134,13 +134,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
134
134
|
'[class]': '_computedClass()',
|
|
135
135
|
},
|
|
136
136
|
}]
|
|
137
|
-
}] });
|
|
137
|
+
}], propDecorators: { userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
138
138
|
|
|
139
139
|
class HlmAlertIcon {
|
|
140
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
141
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.
|
|
140
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: HlmAlertIcon, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
141
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.15", type: HlmAlertIcon, isStandalone: true, selector: "[hlmAlertIcon]", providers: [provideHlmIconConfig({ size: 'sm' })], ngImport: i0 });
|
|
142
142
|
}
|
|
143
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
143
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: HlmAlertIcon, decorators: [{
|
|
144
144
|
type: Directive,
|
|
145
145
|
args: [{
|
|
146
146
|
selector: '[hlmAlertIcon]',
|
|
@@ -151,10 +151,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
151
151
|
class HlmAlertTitle {
|
|
152
152
|
userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
|
|
153
153
|
_computedClass = computed(() => hlm('tw:col-start-2 tw:line-clamp-1 tw:min-h-4 tw:text-md tw:font-semibold tw:tracking-tight', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
154
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
155
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.
|
|
154
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: HlmAlertTitle, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
155
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.15", type: HlmAlertTitle, isStandalone: true, selector: "[hlmAlertTitle]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, ngImport: i0 });
|
|
156
156
|
}
|
|
157
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
157
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: HlmAlertTitle, decorators: [{
|
|
158
158
|
type: Directive,
|
|
159
159
|
args: [{
|
|
160
160
|
selector: '[hlmAlertTitle]',
|
|
@@ -162,18 +162,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
162
162
|
'[class]': '_computedClass()',
|
|
163
163
|
},
|
|
164
164
|
}]
|
|
165
|
-
}] });
|
|
165
|
+
}], propDecorators: { userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
166
166
|
|
|
167
167
|
/*
|
|
168
168
|
* Public API Surface of alert
|
|
169
169
|
*/
|
|
170
170
|
const HlmAlertImports = [HlmAlert, HlmAlertTitle, HlmAlertDescription, HlmAlertIcon];
|
|
171
171
|
class HlmAlertModule {
|
|
172
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
173
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
174
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
172
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: HlmAlertModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
173
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: HlmAlertModule, imports: [HlmAlert, HlmAlertTitle, HlmAlertDescription, HlmAlertIcon], exports: [HlmAlert, HlmAlertTitle, HlmAlertDescription, HlmAlertIcon] });
|
|
174
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: HlmAlertModule });
|
|
175
175
|
}
|
|
176
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
176
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: HlmAlertModule, decorators: [{
|
|
177
177
|
type: NgModule,
|
|
178
178
|
args: [{
|
|
179
179
|
imports: [...HlmAlertImports],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert.mjs","sources":["../../../projects/alert/src/lib/alert.ts","../../../projects/alert/src/lib/alert-description.ts","../../../projects/alert/src/lib/alert-icon.ts","../../../projects/alert/src/lib/alert-title.ts","../../../projects/alert/src/public-api.ts","../../../projects/alert/src/alert.ts"],"sourcesContent":["import { Directive, computed, input } from '@angular/core';\nimport { hlm } from '@egose/shadcn-theme-ng/utils';\nimport { type VariantProps, cva } from 'class-variance-authority';\nimport type { ClassValue } from 'clsx';\n\nconst alertVariants = cva(\n 'tw:relative tw:w-full tw:items-start tw:gap-y-0.5 tw:rounded-lg tw:border tw:px-4 tw:py-3 tw:text-sm tw:has-[>[hlmAlertIcon]]:grid tw:has-[>[hlmAlertIcon]]:grid-cols-[calc(theme(spacing.1)*4)_1fr] tw:has-[>[hlmAlertIcon]]:gap-x-3 tw:[&>[hlmAlertIcon]]:size-4 tw:[&>[hlmAlertIcon]]:translate-y-0.5 tw:[&>[hlmAlertIcon]]:text-current',\n {\n variants: {\n variant: {\n primary: 'tw:bg-primary tw:text-primary-foreground tw:[&>[hlmAlertDescription]]:text-primary-foreground/90',\n secondary:\n 'tw:bg-secondary tw:text-secondary-foreground tw:[&>[hlmAlertDescription]]:text-secondary-foreground/90',\n success: 'tw:bg-success tw:text-success-foreground tw:[&>[hlmAlertDescription]]:text-success-foreground/90',\n warning: 'tw:bg-warning tw:text-warning-foreground tw:[&>[hlmAlertDescription]]:text-warning-foreground/90',\n danger: 'tw:bg-danger tw:text-danger-foreground tw:[&>[hlmAlertDescription]]:text-danger-foreground/90',\n info: 'tw:bg-info tw:text-info-foreground tw:[&>[hlmAlertDescription]]:text-info-foreground/90',\n light: 'tw:bg-light tw:text-light-foreground tw:[&>[hlmAlertDescription]]:text-light-foreground/90',\n dark: 'tw:bg-dark tw:text-dark-foreground tw:[&>[hlmAlertDescription]]:text-dark-foreground/90',\n accent: 'tw:bg-accent tw:text-accent-foreground tw:[&>[hlmAlertDescription]]:text-accent-foreground/90',\n destructive:\n 'tw:bg-destructive tw:text-destructive-foreground tw:[&>[hlmAlertDescription]]:text-destructive-foreground/90',\n muted: 'tw:bg-muted tw:text-muted-foreground tw:[&>[hlmAlertDescription]]:text-muted-foreground/90',\n link: 'tw:text-primary tw:underline-offset-4 tw:[&>[hlmAlertDescription]]:text-primary/90',\n ghost: 'tw:[&>[hlmAlertDescription]]:text-muted-foreground',\n },\n appearance: {\n solid: '',\n light: 'tw:font-semibold',\n },\n },\n compoundVariants: [\n {\n variant: 'primary',\n appearance: 'light',\n class: 'tw:bg-primary/20 tw:text-primary tw:[&>[hlmAlertDescription]]:text-primary',\n },\n {\n variant: 'secondary',\n appearance: 'light',\n class: 'tw:bg-secondary/20 tw:text-secondary tw:[&>[hlmAlertDescription]]:text-secondary',\n },\n {\n variant: 'success',\n appearance: 'light',\n class: 'tw:bg-success/20 tw:text-success tw:[&>[hlmAlertDescription]]:text-success',\n },\n {\n variant: 'warning',\n appearance: 'light',\n class: 'tw:bg-warning/20 tw:text-warning tw:[&>[hlmAlertDescription]]:text-warning',\n },\n {\n variant: 'danger',\n appearance: 'light',\n class: 'tw:bg-danger/20 tw:text-danger tw:[&>[hlmAlertDescription]]:text-danger',\n },\n {\n variant: 'info',\n appearance: 'light',\n class: 'tw:bg-info/20 tw:text-info tw:[&>[hlmAlertDescription]]:text-info',\n },\n {\n variant: 'light',\n appearance: 'light',\n class: 'tw:bg-light/20 tw:text-light tw:[&>[hlmAlertDescription]]:text-light',\n },\n {\n variant: 'dark',\n appearance: 'light',\n class: 'tw:bg-dark/20 tw:text-dark tw:[&>[hlmAlertDescription]]:text-dark',\n },\n {\n variant: 'accent',\n appearance: 'light',\n class: 'tw:bg-accent/20 tw:text-accent tw:[&>[hlmAlertDescription]]:text-accent',\n },\n {\n variant: 'destructive',\n appearance: 'light',\n class: 'tw:bg-destructive/20 tw:text-destructive tw:[&>[hlmAlertDescription]]:text-destructive',\n },\n {\n variant: 'muted',\n appearance: 'light',\n class: 'tw:bg-muted/20 tw:text-muted tw:[&>[hlmAlertDescription]]:text-muted',\n },\n {\n variant: 'link',\n appearance: 'light',\n class: 'tw:bg-primary/10 tw:text-primary tw:[&>[hlmAlertDescription]]:text-primary',\n },\n {\n variant: 'ghost',\n appearance: 'light',\n class: 'tw:bg-muted/10 tw:text-muted-foreground tw:[&>[hlmAlertDescription]]:text-muted-foreground',\n },\n ],\n defaultVariants: {\n variant: 'primary',\n appearance: 'solid',\n },\n },\n);\nexport type AlertVariants = VariantProps<typeof alertVariants>;\nexport type VariantType = NonNullable<AlertVariants['variant']>;\nexport type AppearanceType = NonNullable<AlertVariants['appearance']>;\n@Directive({\n selector: '[hlmAlert]',\n host: {\n role: 'alert',\n '[class]': '_computedClass()',\n },\n})\nexport class HlmAlert {\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n public readonly variant = input<AlertVariants['variant']>('primary');\n public readonly appearance = input<AlertVariants['appearance']>('solid');\n protected readonly _computedClass = computed(() =>\n hlm(\n alertVariants({\n variant: this.variant(),\n appearance: this.appearance(),\n }),\n this.userClass(),\n ),\n );\n}\n","import { Directive, computed, input } from '@angular/core';\nimport { hlm } from '@egose/shadcn-theme-ng/utils';\nimport type { ClassValue } from 'clsx';\n\n@Directive({\n selector: '[hlmAlertDesc],[hlmAlertDescription]',\n host: {\n '[class]': '_computedClass()',\n },\n})\nexport class HlmAlertDescription {\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n protected readonly _computedClass = computed(() =>\n hlm(\n 'tw:text-current tw:col-start-2 tw:grid tw:justify-items-start tw:gap-1 tw:text-sm tw:[&_p]:leading-relaxed',\n this.userClass(),\n ),\n );\n}\n","import { Directive } from '@angular/core';\nimport { provideHlmIconConfig } from '@egose/shadcn-theme-ng/icon';\n\n@Directive({\n selector: '[hlmAlertIcon]',\n providers: [provideHlmIconConfig({ size: 'sm' })],\n})\nexport class HlmAlertIcon {}\n","import { Directive, computed, input } from '@angular/core';\nimport { hlm } from '@egose/shadcn-theme-ng/utils';\nimport type { ClassValue } from 'clsx';\n\n@Directive({\n selector: '[hlmAlertTitle]',\n host: {\n '[class]': '_computedClass()',\n },\n})\nexport class HlmAlertTitle {\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n protected readonly _computedClass = computed(() =>\n hlm('tw:col-start-2 tw:line-clamp-1 tw:min-h-4 tw:text-md tw:font-semibold tw:tracking-tight', this.userClass()),\n );\n}\n","/*\n * Public API Surface of alert\n */\n\nimport { NgModule } from '@angular/core';\n\nimport { HlmAlert } from './lib/alert';\nimport { HlmAlertDescription } from './lib/alert-description';\nimport { HlmAlertIcon } from './lib/alert-icon';\nimport { HlmAlertTitle } from './lib/alert-title';\n\nexport * from './lib/alert';\nexport * from './lib/alert-description';\nexport * from './lib/alert-icon';\nexport * from './lib/alert-title';\n\nexport const HlmAlertImports = [HlmAlert, HlmAlertTitle, HlmAlertDescription, HlmAlertIcon] as const;\n\n@NgModule({\n imports: [...HlmAlertImports],\n exports: [...HlmAlertImports],\n})\nexport class HlmAlertModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAKA,MAAM,aAAa,GAAG,GAAG,CACvB,6UAA6U,EAC7U;AACE,IAAA,QAAQ,EAAE;AACR,QAAA,OAAO,EAAE;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,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAAd,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,EAAA,OAAA,EAAA,CANK,QAAQ,EAAE,aAAa,EAAE,mBAAmB,EAAE,YAAY,CAAA,EAAA,OAAA,EAAA,CAA1D,QAAQ,EAAE,aAAa,EAAE,mBAAmB,EAAE,YAAY,CAAA,EAAA,CAAA;wGAM7E,cAAc,EAAA,CAAA;;2FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,GAAG,eAAe,CAAC;AAC7B,oBAAA,OAAO,EAAE,CAAC,GAAG,eAAe,CAAC;AAC9B,iBAAA;;;ACrBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"alert.mjs","sources":["../../../projects/alert/src/lib/alert.ts","../../../projects/alert/src/lib/alert-description.ts","../../../projects/alert/src/lib/alert-icon.ts","../../../projects/alert/src/lib/alert-title.ts","../../../projects/alert/src/public-api.ts","../../../projects/alert/src/alert.ts"],"sourcesContent":["import { Directive, computed, input } from '@angular/core';\nimport { hlm } from '@egose/shadcn-theme-ng/utils';\nimport { type VariantProps, cva } from 'class-variance-authority';\nimport type { ClassValue } from 'clsx';\n\nconst alertVariants = cva(\n 'tw:relative tw:w-full tw:items-start tw:gap-y-0.5 tw:rounded-lg tw:border tw:px-4 tw:py-3 tw:text-sm tw:has-[>[hlmAlertIcon]]:grid tw:has-[>[hlmAlertIcon]]:grid-cols-[calc(theme(spacing.1)*4)_1fr] tw:has-[>[hlmAlertIcon]]:gap-x-3 tw:[&>[hlmAlertIcon]]:size-4 tw:[&>[hlmAlertIcon]]:translate-y-0.5 tw:[&>[hlmAlertIcon]]:text-current',\n {\n variants: {\n variant: {\n primary: 'tw:bg-primary tw:text-primary-foreground tw:[&>[hlmAlertDescription]]:text-primary-foreground/90',\n secondary:\n 'tw:bg-secondary tw:text-secondary-foreground tw:[&>[hlmAlertDescription]]:text-secondary-foreground/90',\n success: 'tw:bg-success tw:text-success-foreground tw:[&>[hlmAlertDescription]]:text-success-foreground/90',\n warning: 'tw:bg-warning tw:text-warning-foreground tw:[&>[hlmAlertDescription]]:text-warning-foreground/90',\n danger: 'tw:bg-danger tw:text-danger-foreground tw:[&>[hlmAlertDescription]]:text-danger-foreground/90',\n info: 'tw:bg-info tw:text-info-foreground tw:[&>[hlmAlertDescription]]:text-info-foreground/90',\n light: 'tw:bg-light tw:text-light-foreground tw:[&>[hlmAlertDescription]]:text-light-foreground/90',\n dark: 'tw:bg-dark tw:text-dark-foreground tw:[&>[hlmAlertDescription]]:text-dark-foreground/90',\n accent: 'tw:bg-accent tw:text-accent-foreground tw:[&>[hlmAlertDescription]]:text-accent-foreground/90',\n destructive:\n 'tw:bg-destructive tw:text-destructive-foreground tw:[&>[hlmAlertDescription]]:text-destructive-foreground/90',\n muted: 'tw:bg-muted tw:text-muted-foreground tw:[&>[hlmAlertDescription]]:text-muted-foreground/90',\n link: 'tw:text-primary tw:underline-offset-4 tw:[&>[hlmAlertDescription]]:text-primary/90',\n ghost: 'tw:[&>[hlmAlertDescription]]:text-muted-foreground',\n },\n appearance: {\n solid: '',\n light: 'tw:font-semibold',\n },\n },\n compoundVariants: [\n {\n variant: 'primary',\n appearance: 'light',\n class: 'tw:bg-primary/20 tw:text-primary tw:[&>[hlmAlertDescription]]:text-primary',\n },\n {\n variant: 'secondary',\n appearance: 'light',\n class: 'tw:bg-secondary/20 tw:text-secondary tw:[&>[hlmAlertDescription]]:text-secondary',\n },\n {\n variant: 'success',\n appearance: 'light',\n class: 'tw:bg-success/20 tw:text-success tw:[&>[hlmAlertDescription]]:text-success',\n },\n {\n variant: 'warning',\n appearance: 'light',\n class: 'tw:bg-warning/20 tw:text-warning tw:[&>[hlmAlertDescription]]:text-warning',\n },\n {\n variant: 'danger',\n appearance: 'light',\n class: 'tw:bg-danger/20 tw:text-danger tw:[&>[hlmAlertDescription]]:text-danger',\n },\n {\n variant: 'info',\n appearance: 'light',\n class: 'tw:bg-info/20 tw:text-info tw:[&>[hlmAlertDescription]]:text-info',\n },\n {\n variant: 'light',\n appearance: 'light',\n class: 'tw:bg-light/20 tw:text-light tw:[&>[hlmAlertDescription]]:text-light',\n },\n {\n variant: 'dark',\n appearance: 'light',\n class: 'tw:bg-dark/20 tw:text-dark tw:[&>[hlmAlertDescription]]:text-dark',\n },\n {\n variant: 'accent',\n appearance: 'light',\n class: 'tw:bg-accent/20 tw:text-accent tw:[&>[hlmAlertDescription]]:text-accent',\n },\n {\n variant: 'destructive',\n appearance: 'light',\n class: 'tw:bg-destructive/20 tw:text-destructive tw:[&>[hlmAlertDescription]]:text-destructive',\n },\n {\n variant: 'muted',\n appearance: 'light',\n class: 'tw:bg-muted/20 tw:text-muted tw:[&>[hlmAlertDescription]]:text-muted',\n },\n {\n variant: 'link',\n appearance: 'light',\n class: 'tw:bg-primary/10 tw:text-primary tw:[&>[hlmAlertDescription]]:text-primary',\n },\n {\n variant: 'ghost',\n appearance: 'light',\n class: 'tw:bg-muted/10 tw:text-muted-foreground tw:[&>[hlmAlertDescription]]:text-muted-foreground',\n },\n ],\n defaultVariants: {\n variant: 'primary',\n appearance: 'solid',\n },\n },\n);\nexport type AlertVariants = VariantProps<typeof alertVariants>;\nexport type VariantType = NonNullable<AlertVariants['variant']>;\nexport type AppearanceType = NonNullable<AlertVariants['appearance']>;\n@Directive({\n selector: '[hlmAlert]',\n host: {\n role: 'alert',\n '[class]': '_computedClass()',\n },\n})\nexport class HlmAlert {\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n public readonly variant = input<AlertVariants['variant']>('primary');\n public readonly appearance = input<AlertVariants['appearance']>('solid');\n protected readonly _computedClass = computed(() =>\n hlm(\n alertVariants({\n variant: this.variant(),\n appearance: this.appearance(),\n }),\n this.userClass(),\n ),\n );\n}\n","import { Directive, computed, input } from '@angular/core';\nimport { hlm } from '@egose/shadcn-theme-ng/utils';\nimport type { ClassValue } from 'clsx';\n\n@Directive({\n selector: '[hlmAlertDesc],[hlmAlertDescription]',\n host: {\n '[class]': '_computedClass()',\n },\n})\nexport class HlmAlertDescription {\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n protected readonly _computedClass = computed(() =>\n hlm(\n 'tw:text-current tw:col-start-2 tw:grid tw:justify-items-start tw:gap-1 tw:text-sm tw:[&_p]:leading-relaxed',\n this.userClass(),\n ),\n );\n}\n","import { Directive } from '@angular/core';\nimport { provideHlmIconConfig } from '@egose/shadcn-theme-ng/icon';\n\n@Directive({\n selector: '[hlmAlertIcon]',\n providers: [provideHlmIconConfig({ size: 'sm' })],\n})\nexport class HlmAlertIcon {}\n","import { Directive, computed, input } from '@angular/core';\nimport { hlm } from '@egose/shadcn-theme-ng/utils';\nimport type { ClassValue } from 'clsx';\n\n@Directive({\n selector: '[hlmAlertTitle]',\n host: {\n '[class]': '_computedClass()',\n },\n})\nexport class HlmAlertTitle {\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n protected readonly _computedClass = computed(() =>\n hlm('tw:col-start-2 tw:line-clamp-1 tw:min-h-4 tw:text-md tw:font-semibold tw:tracking-tight', this.userClass()),\n );\n}\n","/*\n * Public API Surface of alert\n */\n\nimport { NgModule } from '@angular/core';\n\nimport { HlmAlert } from './lib/alert';\nimport { HlmAlertDescription } from './lib/alert-description';\nimport { HlmAlertIcon } from './lib/alert-icon';\nimport { HlmAlertTitle } from './lib/alert-title';\n\nexport * from './lib/alert';\nexport * from './lib/alert-description';\nexport * from './lib/alert-icon';\nexport * from './lib/alert-title';\n\nexport const HlmAlertImports = [HlmAlert, HlmAlertTitle, HlmAlertDescription, HlmAlertIcon] as const;\n\n@NgModule({\n imports: [...HlmAlertImports],\n exports: [...HlmAlertImports],\n})\nexport class HlmAlertModule {}\n","/**\n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AEG;AAcI,MAAM,eAAe,GAAG,CAAC,QAAQ,EAAE,aAAa,EAAE,mBAAmB,EAAE,YAAY;MAM7E,cAAc,CAAA;wGAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAAd,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,EAAA,OAAA,EAAA,CANK,QAAQ,EAAE,aAAa,EAAE,mBAAmB,EAAE,YAAY,CAAA,EAAA,OAAA,EAAA,CAA1D,QAAQ,EAAE,aAAa,EAAE,mBAAmB,EAAE,YAAY,CAAA,EAAA,CAAA;yGAM7E,cAAc,EAAA,CAAA;;4FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,GAAG,eAAe,CAAC;AAC7B,oBAAA,OAAO,EAAE,CAAC,GAAG,eAAe,CAAC;AAC9B,iBAAA;;;ACrBD;;AAEG;;;;"}
|
package/badge/fesm2022/badge.mjs
CHANGED
|
@@ -109,10 +109,10 @@ class HlmBadge {
|
|
|
109
109
|
};
|
|
110
110
|
return colors[variant];
|
|
111
111
|
}
|
|
112
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
113
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.
|
|
112
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: HlmBadge, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
113
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.15", type: HlmBadge, isStandalone: true, selector: "span[hlmBadge], a[hlmBadge]", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "userClass", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true });
|
|
114
114
|
}
|
|
115
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
115
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: HlmBadge, decorators: [{
|
|
116
116
|
type: Component,
|
|
117
117
|
args: [{
|
|
118
118
|
selector: 'span[hlmBadge], a[hlmBadge]',
|
|
@@ -123,7 +123,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
123
123
|
},
|
|
124
124
|
template: `<ng-content></ng-content>`,
|
|
125
125
|
}]
|
|
126
|
-
}] });
|
|
126
|
+
}], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "userClass", required: false }] }] } });
|
|
127
127
|
|
|
128
128
|
/*
|
|
129
129
|
* Public API Surface of badge
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badge.mjs","sources":["../../../projects/badge/src/lib/badge.ts","../../../projects/badge/src/public-api.ts","../../../projects/badge/src/badge.ts"],"sourcesContent":["import { Component, computed, signal, input } from '@angular/core';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { type ClassValue } from 'clsx';\nimport { hlm } from '@egose/shadcn-theme-ng/utils';\n\nexport const badgeVariants = cva(\n [\n 'tw:inline-flex',\n 'tw:items-center',\n 'tw:rounded-sm',\n 'tw:font-medium',\n 'tw:whitespace-nowrap',\n 'tw:transition-colors',\n 'tw:focus-visible:outline-none',\n 'tw:focus-visible:ring-1',\n 'tw:focus-visible:ring-ring',\n ],\n {\n variants: {\n variant: {\n primary: 'tw:bg-primary tw:text-primary-foreground tw:hover:bg-primary/90',\n secondary: 'tw:bg-secondary tw:text-secondary-foreground tw:hover:bg-secondary/90',\n success: 'tw:bg-success tw:text-success-foreground tw:hover:bg-success/90',\n warning: 'tw:bg-warning tw:text-warning-foreground tw:hover:bg-warning/90',\n danger: 'tw:bg-danger tw:text-danger-foreground tw:hover:bg-danger/90',\n info: 'tw:bg-info tw:text-info-foreground tw:hover:bg-info/90',\n light: 'tw:bg-light tw:text-light-foreground tw:hover:bg-light/90',\n dark: 'tw:bg-dark tw:text-dark-foreground tw:hover:bg-dark/90',\n accent: 'tw:bg-accent tw:text-accent-foreground tw:hover:bg-accent/90',\n destructive: 'tw:bg-destructive tw:text-destructive-foreground tw:hover:bg-destructive/90',\n muted: 'tw:bg-muted tw:text-muted-foreground tw:hover:bg-muted/90',\n link: 'tw:text-primary tw:underline-offset-4 tw:hover:underline',\n ghost: 'tw:hover:bg-light tw:hover:text-light-foreground',\n },\n size: {\n sm: 'tw:h-5 tw:px-2 tw:text-xs',\n default: 'tw:h-6 tw:px-3 tw:text-sm',\n lg: 'tw:h-7 tw:px-4 tw:text-base',\n },\n appearance: {\n solid: '',\n outline: 'tw:bg-white tw:border',\n 'outline-filled': 'tw:bg-white tw:border',\n },\n },\n defaultVariants: {\n variant: 'primary',\n size: 'default',\n appearance: 'solid',\n },\n },\n);\n\nexport type BadgeVariants = VariantProps<typeof badgeVariants>;\nexport type BadgeVariantType = NonNullable<BadgeVariants['variant']>;\nexport type BadgeSizeType = NonNullable<BadgeVariants['size']>;\nexport type BadgeAppearanceType = NonNullable<BadgeVariants['appearance']>;\n\n@Component({\n selector: 'span[hlmBadge], a[hlmBadge]',\n standalone: true,\n imports: [],\n host: {\n '[class]': '_computedClass()',\n },\n template: `<ng-content></ng-content>`,\n})\nexport class HlmBadge {\n /** Props as signal-based inputs */\n variant = input<BadgeVariantType>('primary');\n size = input<BadgeSizeType>('default');\n appearance = input<BadgeAppearanceType>('solid');\n userClass = input<ClassValue>('');\n\n private readonly _additionalClasses = signal<ClassValue>('');\n\n /** Computed badge class merging */\n protected readonly _computedClass = computed(() => {\n const outlineClasses =\n this.appearance() === 'outline' || this.appearance() === 'outline-filled'\n ? [this.getOutlineClasses(this.variant())]\n : [];\n\n if (this.appearance() === 'outline-filled') {\n outlineClasses.push(this.getOutlineFilledClasses(this.variant()));\n }\n\n return hlm(\n badgeVariants({\n variant: this.variant(),\n size: this.size(),\n appearance: this.appearance(),\n className: this.userClass(),\n }),\n outlineClasses,\n this._additionalClasses(),\n );\n });\n\n setClass(classes: string): void {\n this._additionalClasses.set(classes);\n }\n\n /** Helper functions */\n private getOutlineClasses(variant: BadgeVariantType) {\n const colors: Record<BadgeVariantType, string> = {\n primary: 'tw:border-primary tw:text-primary tw:hover:bg-primary/10',\n secondary: 'tw:border-secondary tw:text-secondary tw:hover:bg-secondary/10',\n success: 'tw:border-success tw:text-success tw:hover:bg-success/10',\n warning: 'tw:border-warning tw:text-warning tw:hover:bg-warning/10',\n danger: 'tw:border-danger tw:text-danger tw:hover:bg-danger/10',\n info: 'tw:border-info tw:text-info tw:hover:bg-info/10',\n light: 'tw:border-light tw:text-light-foreground tw:hover:bg-light/10',\n dark: 'tw:border-dark tw:text-dark tw:hover:bg-dark/10',\n accent: 'tw:border-accent tw:text-accent tw:hover:bg-accent/10',\n destructive: 'tw:border-destructive tw:text-destructive tw:hover:bg-destructive/10',\n muted: 'tw:border-muted tw:text-muted-foreground tw:hover:bg-muted/10',\n link: 'tw:text-primary',\n ghost: 'tw:text-light-foreground',\n };\n return colors[variant];\n }\n\n private getOutlineFilledClasses(variant: BadgeVariantType) {\n const colors: Record<BadgeVariantType, string> = {\n primary: 'tw:hover:bg-primary tw:hover:text-primary-foreground',\n secondary: 'tw:hover:bg-secondary tw:hover:text-secondary-foreground',\n success: 'tw:hover:bg-success tw:hover:text-success-foreground',\n warning: 'tw:hover:bg-warning tw:hover:text-warning-foreground',\n danger: 'tw:hover:bg-danger tw:hover:text-danger-foreground',\n info: 'tw:hover:bg-info tw:hover:text-info-foreground',\n light: 'tw:hover:bg-light tw:hover:text-light-foreground',\n dark: 'tw:hover:bg-dark tw:hover:text-dark-foreground',\n accent: 'tw:hover:bg-accent tw:hover:text-accent-foreground',\n destructive: 'tw:hover:bg-destructive tw:hover:text-destructive-foreground',\n muted: 'tw:hover:bg-muted tw:hover:text-muted-foreground',\n link: 'tw:hover:underline',\n ghost: 'tw:hover:bg-light',\n };\n return colors[variant];\n }\n}\n","/*\n * Public API Surface of badge\n */\n\nexport * from './lib/badge';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAKO,MAAM,aAAa,GAAG,GAAG,CAC9B;IACE,gBAAgB;IAChB,iBAAiB;IACjB,eAAe;IACf,gBAAgB;IAChB,sBAAsB;IACtB,sBAAsB;IACtB,+BAA+B;IAC/B,yBAAyB;IACzB,4BAA4B;CAC7B,EACD;AACE,IAAA,QAAQ,EAAE;AACR,QAAA,OAAO,EAAE;AACP,YAAA,OAAO,EAAE,iEAAiE;AAC1E,YAAA,SAAS,EAAE,uEAAuE;AAClF,YAAA,OAAO,EAAE,iEAAiE;AAC1E,YAAA,OAAO,EAAE,iEAAiE;AAC1E,YAAA,MAAM,EAAE,8DAA8D;AACtE,YAAA,IAAI,EAAE,wDAAwD;AAC9D,YAAA,KAAK,EAAE,2DAA2D;AAClE,YAAA,IAAI,EAAE,wDAAwD;AAC9D,YAAA,MAAM,EAAE,8DAA8D;AACtE,YAAA,WAAW,EAAE,6EAA6E;AAC1F,YAAA,KAAK,EAAE,2DAA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AAE,gDAAgD;AACtD,YAAA,MAAM,EAAE,oDAAoD;AAC5D,YAAA,WAAW,EAAE,8DAA8D;AAC3E,YAAA,KAAK,EAAE,kDAAkD;AACzD,YAAA,IAAI,EAAE,oBAAoB;AAC1B,YAAA,KAAK,EAAE,mBAAmB;SAC3B;AACD,QAAA,OAAO,MAAM,CAAC,OAAO,CAAC;IACxB;
|
|
1
|
+
{"version":3,"file":"badge.mjs","sources":["../../../projects/badge/src/lib/badge.ts","../../../projects/badge/src/public-api.ts","../../../projects/badge/src/badge.ts"],"sourcesContent":["import { Component, computed, signal, input } from '@angular/core';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { type ClassValue } from 'clsx';\nimport { hlm } from '@egose/shadcn-theme-ng/utils';\n\nexport const badgeVariants = cva(\n [\n 'tw:inline-flex',\n 'tw:items-center',\n 'tw:rounded-sm',\n 'tw:font-medium',\n 'tw:whitespace-nowrap',\n 'tw:transition-colors',\n 'tw:focus-visible:outline-none',\n 'tw:focus-visible:ring-1',\n 'tw:focus-visible:ring-ring',\n ],\n {\n variants: {\n variant: {\n primary: 'tw:bg-primary tw:text-primary-foreground tw:hover:bg-primary/90',\n secondary: 'tw:bg-secondary tw:text-secondary-foreground tw:hover:bg-secondary/90',\n success: 'tw:bg-success tw:text-success-foreground tw:hover:bg-success/90',\n warning: 'tw:bg-warning tw:text-warning-foreground tw:hover:bg-warning/90',\n danger: 'tw:bg-danger tw:text-danger-foreground tw:hover:bg-danger/90',\n info: 'tw:bg-info tw:text-info-foreground tw:hover:bg-info/90',\n light: 'tw:bg-light tw:text-light-foreground tw:hover:bg-light/90',\n dark: 'tw:bg-dark tw:text-dark-foreground tw:hover:bg-dark/90',\n accent: 'tw:bg-accent tw:text-accent-foreground tw:hover:bg-accent/90',\n destructive: 'tw:bg-destructive tw:text-destructive-foreground tw:hover:bg-destructive/90',\n muted: 'tw:bg-muted tw:text-muted-foreground tw:hover:bg-muted/90',\n link: 'tw:text-primary tw:underline-offset-4 tw:hover:underline',\n ghost: 'tw:hover:bg-light tw:hover:text-light-foreground',\n },\n size: {\n sm: 'tw:h-5 tw:px-2 tw:text-xs',\n default: 'tw:h-6 tw:px-3 tw:text-sm',\n lg: 'tw:h-7 tw:px-4 tw:text-base',\n },\n appearance: {\n solid: '',\n outline: 'tw:bg-white tw:border',\n 'outline-filled': 'tw:bg-white tw:border',\n },\n },\n defaultVariants: {\n variant: 'primary',\n size: 'default',\n appearance: 'solid',\n },\n },\n);\n\nexport type BadgeVariants = VariantProps<typeof badgeVariants>;\nexport type BadgeVariantType = NonNullable<BadgeVariants['variant']>;\nexport type BadgeSizeType = NonNullable<BadgeVariants['size']>;\nexport type BadgeAppearanceType = NonNullable<BadgeVariants['appearance']>;\n\n@Component({\n selector: 'span[hlmBadge], a[hlmBadge]',\n standalone: true,\n imports: [],\n host: {\n '[class]': '_computedClass()',\n },\n template: `<ng-content></ng-content>`,\n})\nexport class HlmBadge {\n /** Props as signal-based inputs */\n variant = input<BadgeVariantType>('primary');\n size = input<BadgeSizeType>('default');\n appearance = input<BadgeAppearanceType>('solid');\n userClass = input<ClassValue>('');\n\n private readonly _additionalClasses = signal<ClassValue>('');\n\n /** Computed badge class merging */\n protected readonly _computedClass = computed(() => {\n const outlineClasses =\n this.appearance() === 'outline' || this.appearance() === 'outline-filled'\n ? [this.getOutlineClasses(this.variant())]\n : [];\n\n if (this.appearance() === 'outline-filled') {\n outlineClasses.push(this.getOutlineFilledClasses(this.variant()));\n }\n\n return hlm(\n badgeVariants({\n variant: this.variant(),\n size: this.size(),\n appearance: this.appearance(),\n className: this.userClass(),\n }),\n outlineClasses,\n this._additionalClasses(),\n );\n });\n\n setClass(classes: string): void {\n this._additionalClasses.set(classes);\n }\n\n /** Helper functions */\n private getOutlineClasses(variant: BadgeVariantType) {\n const colors: Record<BadgeVariantType, string> = {\n primary: 'tw:border-primary tw:text-primary tw:hover:bg-primary/10',\n secondary: 'tw:border-secondary tw:text-secondary tw:hover:bg-secondary/10',\n success: 'tw:border-success tw:text-success tw:hover:bg-success/10',\n warning: 'tw:border-warning tw:text-warning tw:hover:bg-warning/10',\n danger: 'tw:border-danger tw:text-danger tw:hover:bg-danger/10',\n info: 'tw:border-info tw:text-info tw:hover:bg-info/10',\n light: 'tw:border-light tw:text-light-foreground tw:hover:bg-light/10',\n dark: 'tw:border-dark tw:text-dark tw:hover:bg-dark/10',\n accent: 'tw:border-accent tw:text-accent tw:hover:bg-accent/10',\n destructive: 'tw:border-destructive tw:text-destructive tw:hover:bg-destructive/10',\n muted: 'tw:border-muted tw:text-muted-foreground tw:hover:bg-muted/10',\n link: 'tw:text-primary',\n ghost: 'tw:text-light-foreground',\n };\n return colors[variant];\n }\n\n private getOutlineFilledClasses(variant: BadgeVariantType) {\n const colors: Record<BadgeVariantType, string> = {\n primary: 'tw:hover:bg-primary tw:hover:text-primary-foreground',\n secondary: 'tw:hover:bg-secondary tw:hover:text-secondary-foreground',\n success: 'tw:hover:bg-success tw:hover:text-success-foreground',\n warning: 'tw:hover:bg-warning tw:hover:text-warning-foreground',\n danger: 'tw:hover:bg-danger tw:hover:text-danger-foreground',\n info: 'tw:hover:bg-info tw:hover:text-info-foreground',\n light: 'tw:hover:bg-light tw:hover:text-light-foreground',\n dark: 'tw:hover:bg-dark tw:hover:text-dark-foreground',\n accent: 'tw:hover:bg-accent tw:hover:text-accent-foreground',\n destructive: 'tw:hover:bg-destructive tw:hover:text-destructive-foreground',\n muted: 'tw:hover:bg-muted tw:hover:text-muted-foreground',\n link: 'tw:hover:underline',\n ghost: 'tw:hover:bg-light',\n };\n return colors[variant];\n }\n}\n","/*\n * Public API Surface of badge\n */\n\nexport * from './lib/badge';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAKO,MAAM,aAAa,GAAG,GAAG,CAC9B;IACE,gBAAgB;IAChB,iBAAiB;IACjB,eAAe;IACf,gBAAgB;IAChB,sBAAsB;IACtB,sBAAsB;IACtB,+BAA+B;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,oBAAA,QAAQ,EAAE,CAAA,yBAAA,CAA2B;AACtC,iBAAA;;;AClED;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -39,8 +39,8 @@ class EgBasicAlert {
|
|
|
39
39
|
return 'lucideInfo';
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
43
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.
|
|
42
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: EgBasicAlert, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
43
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.15", type: EgBasicAlert, isStandalone: true, selector: "eg-basic-alert", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
44
44
|
provideIcons({
|
|
45
45
|
lucideCircleCheck,
|
|
46
46
|
lucideInfo,
|
|
@@ -61,7 +61,7 @@ class EgBasicAlert {
|
|
|
61
61
|
</div>
|
|
62
62
|
`, isInline: true, dependencies: [{ kind: "directive", type: HlmAlert, selector: "[hlmAlert]", inputs: ["class", "variant", "appearance"] }, { kind: "directive", type: HlmAlertIcon, selector: "[hlmAlertIcon]" }, { kind: "directive", type: HlmAlertTitle, selector: "[hlmAlertTitle]", inputs: ["class"] }, { kind: "directive", type: HlmAlertDescription, selector: "[hlmAlertDesc],[hlmAlertDescription]", inputs: ["class"] }, { kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }, { kind: "directive", type: HlmIcon, selector: "ng-icon[hlm]", inputs: ["size"] }] });
|
|
63
63
|
}
|
|
64
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
64
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: EgBasicAlert, decorators: [{
|
|
65
65
|
type: Component,
|
|
66
66
|
args: [{
|
|
67
67
|
selector: 'eg-basic-alert',
|
|
@@ -89,7 +89,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
89
89
|
</div>
|
|
90
90
|
`,
|
|
91
91
|
}]
|
|
92
|
-
}] });
|
|
92
|
+
}], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }] } });
|
|
93
93
|
|
|
94
94
|
/*
|
|
95
95
|
* Public API Surface of basic-alert
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"basic-alert.mjs","sources":["../../../projects/basic-alert/src/lib/basic-alert.ts","../../../projects/basic-alert/src/public-api.ts","../../../projects/basic-alert/src/basic-alert.ts"],"sourcesContent":["import { Component, input } from '@angular/core';\nimport { NgIcon, provideIcons } from '@ng-icons/core';\nimport {\n lucideCircleAlert,\n lucideCircleCheck,\n lucideInfo,\n lucideBatteryWarning,\n lucideBell,\n lucideStar,\n lucideThumbsUp,\n lucideZap,\n lucideLink,\n lucideGhost,\n} from '@ng-icons/lucide';\nimport {\n HlmAlert,\n HlmAlertIcon,\n HlmAlertTitle,\n HlmAlertDescription,\n type VariantType,\n type AppearanceType,\n} from '@egose/shadcn-theme-ng/alert';\nimport { HlmIcon } from '@egose/shadcn-theme-ng/icon';\n\n@Component({\n selector: 'eg-basic-alert',\n standalone: true,\n imports: [HlmAlert, HlmAlertIcon, HlmAlertTitle, HlmAlertDescription, NgIcon, HlmIcon],\n providers: [\n provideIcons({\n lucideCircleCheck,\n lucideInfo,\n lucideBatteryWarning,\n lucideCircleAlert,\n lucideBell,\n lucideStar,\n lucideThumbsUp,\n lucideZap,\n lucideLink,\n lucideGhost,\n }),\n ],\n template: `\n <div hlmAlert [variant]=\"variant()\" [appearance]=\"appearance()\" class=\"\">\n <ng-icon hlm hlmAlertIcon [name]=\"getIconName(variant())\" />\n <h4 hlmAlertTitle class=\"tw:capitalize\">{{ title() }}</h4>\n <p hlmAlertDescription>{{ description() }}</p>\n </div>\n `,\n})\nexport class EgBasicAlert {\n variant = input<VariantType>('info');\n appearance = input<AppearanceType>('solid');\n title = input<string>('');\n description = input<string>('');\n\n getIconName(variant: VariantType): string {\n switch (variant) {\n case 'success':\n return 'lucideCircleCheck';\n case 'info':\n return 'lucideInfo';\n case 'warning':\n return 'lucideBatteryWarning';\n case 'danger':\n case 'destructive':\n return 'lucideCircleAlert';\n case 'muted':\n return 'lucideBell';\n case 'accent':\n return 'lucideStar';\n case 'primary':\n return 'lucideThumbsUp';\n case 'secondary':\n return 'lucideZap';\n case 'link':\n return 'lucideLink';\n case 'ghost':\n return 'lucideGhost';\n case 'light':\n case 'dark':\n default:\n return 'lucideInfo';\n }\n }\n}\n","/*\n * Public API Surface of basic-alert\n */\n\nexport * from './lib/basic-alert';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MAkDa,YAAY,CAAA;AACvB,IAAA,OAAO,GAAG,KAAK,CAAc,MAAM,mDAAC;AACpC,IAAA,UAAU,GAAG,KAAK,CAAiB,OAAO,sDAAC;AAC3C,IAAA,KAAK,GAAG,KAAK,CAAS,EAAE,iDAAC;AACzB,IAAA,WAAW,GAAG,KAAK,CAAS,EAAE,uDAAC;AAE/B,IAAA,WAAW,CAAC,OAAoB,EAAA;QAC9B,QAAQ,OAAO;AACb,YAAA,KAAK,SAAS;AACZ,gBAAA,OAAO,mBAAmB;AAC5B,YAAA,KAAK,MAAM;AACT,gBAAA,OAAO,YAAY;AACrB,YAAA,KAAK,SAAS;AACZ,gBAAA,OAAO,sBAAsB;AAC/B,YAAA,KAAK,QAAQ;AACb,YAAA,KAAK,aAAa;AAChB,gBAAA,OAAO,mBAAmB;AAC5B,YAAA,KAAK,OAAO;AACV,gBAAA,OAAO,YAAY;AACrB,YAAA,KAAK,QAAQ;AACX,gBAAA,OAAO,YAAY;AACrB,YAAA,KAAK,SAAS;AACZ,gBAAA,OAAO,gBAAgB;AACzB,YAAA,KAAK,WAAW;AACd,gBAAA,OAAO,WAAW;AACpB,YAAA,KAAK,MAAM;AACT,gBAAA,OAAO,YAAY;AACrB,YAAA,KAAK,OAAO;AACV,gBAAA,OAAO,aAAa;AACtB,YAAA,KAAK,OAAO;AACZ,YAAA,KAAK,MAAM;AACX,YAAA;AACE,gBAAA,OAAO,YAAY;;IAEzB;
|
|
1
|
+
{"version":3,"file":"basic-alert.mjs","sources":["../../../projects/basic-alert/src/lib/basic-alert.ts","../../../projects/basic-alert/src/public-api.ts","../../../projects/basic-alert/src/basic-alert.ts"],"sourcesContent":["import { Component, input } from '@angular/core';\nimport { NgIcon, provideIcons } from '@ng-icons/core';\nimport {\n lucideCircleAlert,\n lucideCircleCheck,\n lucideInfo,\n lucideBatteryWarning,\n lucideBell,\n lucideStar,\n lucideThumbsUp,\n lucideZap,\n lucideLink,\n lucideGhost,\n} from '@ng-icons/lucide';\nimport {\n HlmAlert,\n HlmAlertIcon,\n HlmAlertTitle,\n HlmAlertDescription,\n type VariantType,\n type AppearanceType,\n} from '@egose/shadcn-theme-ng/alert';\nimport { HlmIcon } from '@egose/shadcn-theme-ng/icon';\n\n@Component({\n selector: 'eg-basic-alert',\n standalone: true,\n imports: [HlmAlert, HlmAlertIcon, HlmAlertTitle, HlmAlertDescription, NgIcon, HlmIcon],\n providers: [\n provideIcons({\n lucideCircleCheck,\n lucideInfo,\n lucideBatteryWarning,\n lucideCircleAlert,\n lucideBell,\n lucideStar,\n lucideThumbsUp,\n lucideZap,\n lucideLink,\n lucideGhost,\n }),\n ],\n template: `\n <div hlmAlert [variant]=\"variant()\" [appearance]=\"appearance()\" class=\"\">\n <ng-icon hlm hlmAlertIcon [name]=\"getIconName(variant())\" />\n <h4 hlmAlertTitle class=\"tw:capitalize\">{{ title() }}</h4>\n <p hlmAlertDescription>{{ description() }}</p>\n </div>\n `,\n})\nexport class EgBasicAlert {\n variant = input<VariantType>('info');\n appearance = input<AppearanceType>('solid');\n title = input<string>('');\n description = input<string>('');\n\n getIconName(variant: VariantType): string {\n switch (variant) {\n case 'success':\n return 'lucideCircleCheck';\n case 'info':\n return 'lucideInfo';\n case 'warning':\n return 'lucideBatteryWarning';\n case 'danger':\n case 'destructive':\n return 'lucideCircleAlert';\n case 'muted':\n return 'lucideBell';\n case 'accent':\n return 'lucideStar';\n case 'primary':\n return 'lucideThumbsUp';\n case 'secondary':\n return 'lucideZap';\n case 'link':\n return 'lucideLink';\n case 'ghost':\n return 'lucideGhost';\n case 'light':\n case 'dark':\n default:\n return 'lucideInfo';\n }\n }\n}\n","/*\n * Public API Surface of basic-alert\n */\n\nexport * from './lib/basic-alert';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MAkDa,YAAY,CAAA;AACvB,IAAA,OAAO,GAAG,KAAK,CAAc,MAAM,mDAAC;AACpC,IAAA,UAAU,GAAG,KAAK,CAAiB,OAAO,sDAAC;AAC3C,IAAA,KAAK,GAAG,KAAK,CAAS,EAAE,iDAAC;AACzB,IAAA,WAAW,GAAG,KAAK,CAAS,EAAE,uDAAC;AAE/B,IAAA,WAAW,CAAC,OAAoB,EAAA;QAC9B,QAAQ,OAAO;AACb,YAAA,KAAK,SAAS;AACZ,gBAAA,OAAO,mBAAmB;AAC5B,YAAA,KAAK,MAAM;AACT,gBA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