@pepperi-addons/ngx-lib-react 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,85 @@
1
+ # @pepperi-addons/ngx-lib-react
2
+
3
+ Thin React wrappers around Pepperi Angular Elements (Web Components) for better DX in React apps.
4
+
5
+ This package expects you to load the Elements bundle and theme CSS (from `@pepperi-addons/ngx-lib-elements`) in your app.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm i @pepperi-addons/ngx-lib-react @pepperi-addons/ngx-lib-elements
11
+ ```
12
+
13
+ ## Setup in React
14
+
15
+ Load the elements scripts and CSS once in your app (e.g., in `src/index.tsx`):
16
+
17
+ ```ts
18
+ import '@pepperi-addons/ngx-lib-elements/runtime.js';
19
+ import '@pepperi-addons/ngx-lib-elements/polyfills.js';
20
+ import '@pepperi-addons/ngx-lib-elements/main.js';
21
+ import '@pepperi-addons/ngx-lib-elements/styles.css';
22
+ ```
23
+
24
+ Wrap your app with the Pepperi theme class:
25
+
26
+ ```tsx
27
+ export function App() {
28
+ return <div className="pepperi-theme">{/* ... */}</div>;
29
+ }
30
+ ```
31
+
32
+ ## Consume in another (React) project
33
+
34
+ - **Install**
35
+
36
+ ```bash
37
+ npm i @pepperi-addons/ngx-lib-react
38
+ ```
39
+
40
+ - **Load Pepperi Elements (required at runtime)**
41
+ - **Option A: via this package (embedded Elements, recommended)**
42
+
43
+ ```ts
44
+ // e.g., in src/index.tsx or src/main.tsx
45
+ import '@pepperi-addons/ngx-lib-react/elements/runtime.js';
46
+ import '@pepperi-addons/ngx-lib-react/elements/polyfills.js';
47
+ import '@pepperi-addons/ngx-lib-react/elements/main.js';
48
+ import '@pepperi-addons/ngx-lib-react/elements/styles.css';
49
+ ```
50
+
51
+ - **Option B: host the compiled files and include tags**
52
+
53
+ ```html
54
+ <!-- Place files from dist/ngx-lib-elements on your public path/CDN -->
55
+ <link rel="stylesheet" href="/pep-elements/styles.css" />
56
+ <script src="/pep-elements/runtime.js" defer></script>
57
+ <script src="/pep-elements/polyfills.js" defer></script>
58
+ <script src="/pep-elements/main.js" defer></script>
59
+ ```
60
+
61
+ - **Theme**: Ensure a parent element has the `pepperi-theme` class (see example above).
62
+
63
+ ## Usage
64
+
65
+ ```tsx
66
+ import { PepButton, PepSelect, PepTextbox } from '@pepperi-addons/ngx-lib-react';
67
+
68
+ export function Example() {
69
+ return (
70
+ <div className="pepperi-theme">
71
+ <PepButton value="Save" styleType="strong" onButtonClick={(e) => console.log(e)} />
72
+
73
+ <PepTextbox label="Amount" type="currency" accessory="$" minFractionDigits={2} maxFractionDigits={2}
74
+ onValueChange={(v) => console.log('Amount', v)} />
75
+
76
+ <PepSelect label="Status" onValueChange={(v) => console.log('Status', v)} />
77
+ </div>
78
+ );
79
+ }
80
+ ```
81
+
82
+ Notes:
83
+ - For arrays/objects, the wrappers set element properties (not attributes) under the hood.
84
+ - Events are bridged from the custom element `CustomEvent` to React callbacks.
85
+ - Ensure `.pepperi-theme` is applied at app level so Angular Material overlays are themed.
@@ -0,0 +1,337 @@
1
+ @angular/animations
2
+ MIT
3
+
4
+ @angular/cdk
5
+ MIT
6
+ The MIT License
7
+
8
+ Copyright (c) 2022 Google LLC.
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in
18
+ all copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
26
+ THE SOFTWARE.
27
+
28
+
29
+ @angular/common
30
+ MIT
31
+
32
+ @angular/core
33
+ MIT
34
+
35
+ @angular/elements
36
+ MIT
37
+
38
+ @angular/forms
39
+ MIT
40
+
41
+ @angular/material
42
+ MIT
43
+ The MIT License
44
+
45
+ Copyright (c) 2022 Google LLC.
46
+
47
+ Permission is hereby granted, free of charge, to any person obtaining a copy
48
+ of this software and associated documentation files (the "Software"), to deal
49
+ in the Software without restriction, including without limitation the rights
50
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
51
+ copies of the Software, and to permit persons to whom the Software is
52
+ furnished to do so, subject to the following conditions:
53
+
54
+ The above copyright notice and this permission notice shall be included in
55
+ all copies or substantial portions of the Software.
56
+
57
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
58
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
59
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
60
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
61
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
62
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
63
+ THE SOFTWARE.
64
+
65
+
66
+ @angular/platform-browser
67
+ MIT
68
+
69
+ @angular/router
70
+ MIT
71
+
72
+ @ngx-translate/core
73
+ MIT
74
+
75
+ @ngx-translate/http-loader
76
+ MIT
77
+
78
+ @pepperi-addons/ngx-lib
79
+ ISC
80
+
81
+ deepmerge
82
+ MIT
83
+ The MIT License (MIT)
84
+
85
+ Copyright (c) 2012 Nicholas Fisher
86
+
87
+ Permission is hereby granted, free of charge, to any person obtaining a copy
88
+ of this software and associated documentation files (the "Software"), to deal
89
+ in the Software without restriction, including without limitation the rights
90
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
91
+ copies of the Software, and to permit persons to whom the Software is
92
+ furnished to do so, subject to the following conditions:
93
+
94
+ The above copyright notice and this permission notice shall be included in
95
+ all copies or substantial portions of the Software.
96
+
97
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
98
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
99
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
100
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
101
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
102
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
103
+ THE SOFTWARE.
104
+
105
+
106
+ ngx-translate-multi-http-loader
107
+ MIT
108
+
109
+ rxjs
110
+ Apache-2.0
111
+ Apache License
112
+ Version 2.0, January 2004
113
+ http://www.apache.org/licenses/
114
+
115
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
116
+
117
+ 1. Definitions.
118
+
119
+ "License" shall mean the terms and conditions for use, reproduction,
120
+ and distribution as defined by Sections 1 through 9 of this document.
121
+
122
+ "Licensor" shall mean the copyright owner or entity authorized by
123
+ the copyright owner that is granting the License.
124
+
125
+ "Legal Entity" shall mean the union of the acting entity and all
126
+ other entities that control, are controlled by, or are under common
127
+ control with that entity. For the purposes of this definition,
128
+ "control" means (i) the power, direct or indirect, to cause the
129
+ direction or management of such entity, whether by contract or
130
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
131
+ outstanding shares, or (iii) beneficial ownership of such entity.
132
+
133
+ "You" (or "Your") shall mean an individual or Legal Entity
134
+ exercising permissions granted by this License.
135
+
136
+ "Source" form shall mean the preferred form for making modifications,
137
+ including but not limited to software source code, documentation
138
+ source, and configuration files.
139
+
140
+ "Object" form shall mean any form resulting from mechanical
141
+ transformation or translation of a Source form, including but
142
+ not limited to compiled object code, generated documentation,
143
+ and conversions to other media types.
144
+
145
+ "Work" shall mean the work of authorship, whether in Source or
146
+ Object form, made available under the License, as indicated by a
147
+ copyright notice that is included in or attached to the work
148
+ (an example is provided in the Appendix below).
149
+
150
+ "Derivative Works" shall mean any work, whether in Source or Object
151
+ form, that is based on (or derived from) the Work and for which the
152
+ editorial revisions, annotations, elaborations, or other modifications
153
+ represent, as a whole, an original work of authorship. For the purposes
154
+ of this License, Derivative Works shall not include works that remain
155
+ separable from, or merely link (or bind by name) to the interfaces of,
156
+ the Work and Derivative Works thereof.
157
+
158
+ "Contribution" shall mean any work of authorship, including
159
+ the original version of the Work and any modifications or additions
160
+ to that Work or Derivative Works thereof, that is intentionally
161
+ submitted to Licensor for inclusion in the Work by the copyright owner
162
+ or by an individual or Legal Entity authorized to submit on behalf of
163
+ the copyright owner. For the purposes of this definition, "submitted"
164
+ means any form of electronic, verbal, or written communication sent
165
+ to the Licensor or its representatives, including but not limited to
166
+ communication on electronic mailing lists, source code control systems,
167
+ and issue tracking systems that are managed by, or on behalf of, the
168
+ Licensor for the purpose of discussing and improving the Work, but
169
+ excluding communication that is conspicuously marked or otherwise
170
+ designated in writing by the copyright owner as "Not a Contribution."
171
+
172
+ "Contributor" shall mean Licensor and any individual or Legal Entity
173
+ on behalf of whom a Contribution has been received by Licensor and
174
+ subsequently incorporated within the Work.
175
+
176
+ 2. Grant of Copyright License. Subject to the terms and conditions of
177
+ this License, each Contributor hereby grants to You a perpetual,
178
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
179
+ copyright license to reproduce, prepare Derivative Works of,
180
+ publicly display, publicly perform, sublicense, and distribute the
181
+ Work and such Derivative Works in Source or Object form.
182
+
183
+ 3. Grant of Patent License. Subject to the terms and conditions of
184
+ this License, each Contributor hereby grants to You a perpetual,
185
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
186
+ (except as stated in this section) patent license to make, have made,
187
+ use, offer to sell, sell, import, and otherwise transfer the Work,
188
+ where such license applies only to those patent claims licensable
189
+ by such Contributor that are necessarily infringed by their
190
+ Contribution(s) alone or by combination of their Contribution(s)
191
+ with the Work to which such Contribution(s) was submitted. If You
192
+ institute patent litigation against any entity (including a
193
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
194
+ or a Contribution incorporated within the Work constitutes direct
195
+ or contributory patent infringement, then any patent licenses
196
+ granted to You under this License for that Work shall terminate
197
+ as of the date such litigation is filed.
198
+
199
+ 4. Redistribution. You may reproduce and distribute copies of the
200
+ Work or Derivative Works thereof in any medium, with or without
201
+ modifications, and in Source or Object form, provided that You
202
+ meet the following conditions:
203
+
204
+ (a) You must give any other recipients of the Work or
205
+ Derivative Works a copy of this License; and
206
+
207
+ (b) You must cause any modified files to carry prominent notices
208
+ stating that You changed the files; and
209
+
210
+ (c) You must retain, in the Source form of any Derivative Works
211
+ that You distribute, all copyright, patent, trademark, and
212
+ attribution notices from the Source form of the Work,
213
+ excluding those notices that do not pertain to any part of
214
+ the Derivative Works; and
215
+
216
+ (d) If the Work includes a "NOTICE" text file as part of its
217
+ distribution, then any Derivative Works that You distribute must
218
+ include a readable copy of the attribution notices contained
219
+ within such NOTICE file, excluding those notices that do not
220
+ pertain to any part of the Derivative Works, in at least one
221
+ of the following places: within a NOTICE text file distributed
222
+ as part of the Derivative Works; within the Source form or
223
+ documentation, if provided along with the Derivative Works; or,
224
+ within a display generated by the Derivative Works, if and
225
+ wherever such third-party notices normally appear. The contents
226
+ of the NOTICE file are for informational purposes only and
227
+ do not modify the License. You may add Your own attribution
228
+ notices within Derivative Works that You distribute, alongside
229
+ or as an addendum to the NOTICE text from the Work, provided
230
+ that such additional attribution notices cannot be construed
231
+ as modifying the License.
232
+
233
+ You may add Your own copyright statement to Your modifications and
234
+ may provide additional or different license terms and conditions
235
+ for use, reproduction, or distribution of Your modifications, or
236
+ for any such Derivative Works as a whole, provided Your use,
237
+ reproduction, and distribution of the Work otherwise complies with
238
+ the conditions stated in this License.
239
+
240
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
241
+ any Contribution intentionally submitted for inclusion in the Work
242
+ by You to the Licensor shall be under the terms and conditions of
243
+ this License, without any additional terms or conditions.
244
+ Notwithstanding the above, nothing herein shall supersede or modify
245
+ the terms of any separate license agreement you may have executed
246
+ with Licensor regarding such Contributions.
247
+
248
+ 6. Trademarks. This License does not grant permission to use the trade
249
+ names, trademarks, service marks, or product names of the Licensor,
250
+ except as required for reasonable and customary use in describing the
251
+ origin of the Work and reproducing the content of the NOTICE file.
252
+
253
+ 7. Disclaimer of Warranty. Unless required by applicable law or
254
+ agreed to in writing, Licensor provides the Work (and each
255
+ Contributor provides its Contributions) on an "AS IS" BASIS,
256
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
257
+ implied, including, without limitation, any warranties or conditions
258
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
259
+ PARTICULAR PURPOSE. You are solely responsible for determining the
260
+ appropriateness of using or redistributing the Work and assume any
261
+ risks associated with Your exercise of permissions under this License.
262
+
263
+ 8. Limitation of Liability. In no event and under no legal theory,
264
+ whether in tort (including negligence), contract, or otherwise,
265
+ unless required by applicable law (such as deliberate and grossly
266
+ negligent acts) or agreed to in writing, shall any Contributor be
267
+ liable to You for damages, including any direct, indirect, special,
268
+ incidental, or consequential damages of any character arising as a
269
+ result of this License or out of the use or inability to use the
270
+ Work (including but not limited to damages for loss of goodwill,
271
+ work stoppage, computer failure or malfunction, or any and all
272
+ other commercial damages or losses), even if such Contributor
273
+ has been advised of the possibility of such damages.
274
+
275
+ 9. Accepting Warranty or Additional Liability. While redistributing
276
+ the Work or Derivative Works thereof, You may choose to offer,
277
+ and charge a fee for, acceptance of support, warranty, indemnity,
278
+ or other liability obligations and/or rights consistent with this
279
+ License. However, in accepting such obligations, You may act only
280
+ on Your own behalf and on Your sole responsibility, not on behalf
281
+ of any other Contributor, and only if You agree to indemnify,
282
+ defend, and hold each Contributor harmless for any liability
283
+ incurred by, or claims asserted against, such Contributor by reason
284
+ of your accepting any such warranty or additional liability.
285
+
286
+ END OF TERMS AND CONDITIONS
287
+
288
+ APPENDIX: How to apply the Apache License to your work.
289
+
290
+ To apply the Apache License to your work, attach the following
291
+ boilerplate notice, with the fields enclosed by brackets "[]"
292
+ replaced with your own identifying information. (Don't include
293
+ the brackets!) The text should be enclosed in the appropriate
294
+ comment syntax for the file format. We also recommend that a
295
+ file or class name and description of purpose be included on the
296
+ same "printed page" as the copyright notice for easier
297
+ identification within third-party archives.
298
+
299
+ Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors
300
+
301
+ Licensed under the Apache License, Version 2.0 (the "License");
302
+ you may not use this file except in compliance with the License.
303
+ You may obtain a copy of the License at
304
+
305
+ http://www.apache.org/licenses/LICENSE-2.0
306
+
307
+ Unless required by applicable law or agreed to in writing, software
308
+ distributed under the License is distributed on an "AS IS" BASIS,
309
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
310
+ See the License for the specific language governing permissions and
311
+ limitations under the License.
312
+
313
+
314
+
315
+ zone.js
316
+ MIT
317
+ The MIT License
318
+
319
+ Copyright (c) 2010-2022 Google LLC. https://angular.io/license
320
+
321
+ Permission is hereby granted, free of charge, to any person obtaining a copy
322
+ of this software and associated documentation files (the "Software"), to deal
323
+ in the Software without restriction, including without limitation the rights
324
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
325
+ copies of the Software, and to permit persons to whom the Software is
326
+ furnished to do so, subject to the following conditions:
327
+
328
+ The above copyright notice and this permission notice shall be included in
329
+ all copies or substantial portions of the Software.
330
+
331
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
332
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
333
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
334
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
335
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
336
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
337
+ THE SOFTWARE.
@@ -0,0 +1,11 @@
1
+ <!DOCTYPE html><html lang="en"><head>
2
+ <meta charset="utf-8">
3
+ <title>Ngx Lib Elements</title>
4
+ <base href="/">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <style>@import"https://fonts.googleapis.com/css2?family=Assistant:wght@400;600&family=Crimson+Pro:wght@400;600&family=David+Libre:wght@400;500&family=EB+Garamond:wght@400;600&family=Heebo:wght@400;600&family=Inter:wght@400;600&family=Open+Sans:wght@400;600&family=Rubik:wght@400;600&family=Work+Sans:wght@400;600&display=swap";@import"https://fonts.googleapis.com/icon?family=Material+Icons";html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}*{box-sizing:border-box}@supports (font-variation-settings: normal){html,body{font-family:Inter var,sans-serif}}html,body{font:unset!important;font-family:var(--pep-font-family-body, Inter),-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif!important;font-weight:var(--pep-font-weight-normal, 400)!important;font-size:16px}</style><link rel="stylesheet" href="styles.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="styles.css"></noscript></head>
7
+ <body>
8
+ <!-- No root app; this build only bootstraps the elements module and registers custom elements. -->
9
+ <script src="runtime.js" type="module"></script><script src="polyfills.js" type="module"></script><script src="main.js" type="module"></script>
10
+
11
+ </body></html>