@public-ui/react-standalone 2.0.0-rc.8 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,7 +1,37 @@
1
- # React-Standalone-Adapter
1
+ # KoliBri - Standalone React-Adapter
2
2
 
3
- Das [**React**](https://reactjs.org)-Modul ist der Framework-Adapter für die Komponenten-Bibliothek.
3
+ ## Motivation
4
4
 
5
- Mehr zur **Modularisierung** kann im [Architekturkonzept](https://public-ui.github.io/docs/concepts/architecture) nachgelesen werden.
5
+ Provide an adapter for [React](https://reactjs.org) to use the KoliBri components, without the need for a build/bundle process.
6
6
 
7
- Mehr zum **Projekt** kann in der [README](https://public-ui.github.io/docs) nachgelesen werden.
7
+ ## Installation
8
+
9
+ Load the necessary scripts in your HTML file, either from a CDN or from your local installation:
10
+
11
+ ```html
12
+ <!-- React -->
13
+ <script crossorigin src="https://unpkg.com/react@18/umd/react.production.min.js"></script>
14
+ <script crossorigin src="https://unpkg.com/react-dom@18/umd/react-dom.production.min.js"></script>
15
+
16
+ <!-- KoliBri -->
17
+ <script crossorigin src="https://unpkg.com/@public-ui/components@2.0.0/dist/kolibri/kolibri.esm.js" type="module"></script>
18
+ <script crossorigin src="https://unpkg.com/@public-ui/react-standalone@2.0.0/dist/index.mjs" type="module"></script>
19
+ ```
20
+
21
+ ## Usage
22
+
23
+ First, initialize KoliBri with a [theme](https://github.com/public-ui/kolibri/tree/develop/packages/themes):
24
+
25
+ ```ts
26
+ import { register } from 'https://unpkg.com/@public-ui/components@2.0.0/dist/esm/index.js';
27
+ import { DEFAULT } from 'https://unpkg.com/@public-ui/themes/dist/index.mjs';
28
+ register(DEFAULT, []).catch(console.warn);
29
+ ```
30
+
31
+ KoliBri components, such as `KolButton`, are globally accessible and can be utilized directly from the global namespace:
32
+
33
+ ```js
34
+ const node = document.querySelector('#app');
35
+ const root = ReactDOM.createRoot(node);
36
+ root.render(React.createElement(KolButton, { _label: 'Hello World' }));
37
+ ```
package/dist/index.mjs CHANGED
@@ -202,7 +202,6 @@ const KolLogo = /* @__PURE__ */ createReactComponent("kol-logo");
202
202
  const KolModal = /* @__PURE__ */ createReactComponent("kol-modal");
203
203
  const KolNav = /* @__PURE__ */ createReactComponent("kol-nav");
204
204
  const KolPagination = /* @__PURE__ */ createReactComponent("kol-pagination");
205
- const KolPopover = /* @__PURE__ */ createReactComponent("kol-popover");
206
205
  const KolProgress = /* @__PURE__ */ createReactComponent("kol-progress");
207
206
  const KolQuote = /* @__PURE__ */ createReactComponent("kol-quote");
208
207
  const KolSelect = /* @__PURE__ */ createReactComponent("kol-select");
@@ -251,7 +250,6 @@ window.KolLogo = KolLogo;
251
250
  window.KolModal = KolModal;
252
251
  window.KolNav = KolNav;
253
252
  window.KolPagination = KolPagination;
254
- window.KolPopover = KolPopover;
255
253
  window.KolProgress = KolProgress;
256
254
  window.KolQuote = KolQuote;
257
255
  window.KolSelect = KolSelect;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@public-ui/react-standalone",
3
- "version": "2.0.0-rc.8",
3
+ "version": "2.0.0",
4
4
  "license": "EUPL-1.2",
5
5
  "homepage": "https://public-ui.github.io",
6
6
  "repository": "https://github.com/public-ui/kolibri",
@@ -42,12 +42,12 @@
42
42
  "react"
43
43
  ],
44
44
  "devDependencies": {
45
- "@public-ui/react": "2.0.0-rc.8",
45
+ "@public-ui/react": "2.0.0",
46
46
  "cpy-cli": "5.0.0",
47
47
  "rimraf": "3.0.2"
48
48
  },
49
49
  "peerDependencies": {
50
- "@public-ui/components": "2.0.0-rc.8",
50
+ "@public-ui/components": "2.0.0",
51
51
  "react": ">=16.14.0",
52
52
  "react-dom": ">=16.14.0"
53
53
  },