@twentyfirstmedia/elements 0.0.0-stage → 0.1.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/LICENSE ADDED
@@ -0,0 +1,30 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Twentyfirst Media
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
23
+ ---
24
+
25
+ The kits bundle these fonts, each under the SIL Open Font License 1.1; their license
26
+ files ship next to the fonts in each package's `dist/fonts`:
27
+
28
+ - Plus Jakarta Sans (Halo)
29
+ - IBM Plex Mono (Halo)
30
+ - Geist and Geist Mono (Pro)
package/README.md CHANGED
@@ -1,3 +1,53 @@
1
- # Temporary Holding Version
1
+ # @twentyfirstmedia/elements
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Every [Twentyfirst UI](https://ui.twentyfirst.media) component as a custom element: `<tf-button>`, `<tf-panel>`, `<tf-data-table>`, `<tf-approval-card>` and 209 more, with the same props as the React components. For plain HTML, Vue, Svelte, Angular, Astro, Rails and Django templates; React is bundled inside, so no React setup is needed. Works with both kits, [Halo](https://www.npmjs.com/package/@twentyfirstmedia/halo) and [Pro](https://www.npmjs.com/package/@twentyfirstmedia/pro).
4
+
5
+ [Website](https://ui.twentyfirst.media) · [Guide](https://ui.twentyfirst.media/halo/html/) · [Halo docs](https://ui.twentyfirst.media/halo/) · [Pro docs](https://ui.twentyfirst.media/pro/) · [GitHub](https://github.com/twentyfirstmedia/ui)
6
+
7
+ ## Use it from a CDN
8
+
9
+ ```html
10
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@twentyfirstmedia/halo/dist/styles.css">
11
+ <script type="module" src="https://cdn.jsdelivr.net/npm/@twentyfirstmedia/elements/dist/elements.js"></script>
12
+
13
+ <tf-panel title="Team">
14
+ <tf-button slot="action" variant="ghost" size="sm">Invite</tf-button>
15
+ <tf-tabs items="Members, Invites"></tf-tabs>
16
+ </tf-panel>
17
+ ```
18
+
19
+ For a classic `<script>` use `dist/elements.global.js` (global `TwentyfirstElements`).
20
+
21
+ ## Or install it
22
+
23
+ ```sh
24
+ npm install @twentyfirstmedia/elements @twentyfirstmedia/halo
25
+ ```
26
+
27
+ ```js
28
+ import "@twentyfirstmedia/halo/styles.css";
29
+ import { toast } from "@twentyfirstmedia/elements"; // defines every tf-* element
30
+ ```
31
+
32
+ ## How props map
33
+
34
+ - Attributes in kebab-case: `default-value`, `icon-right`. Booleans by presence (`"false"` is false), numbers as text.
35
+ - Arrays and objects as properties (`table.rows = [...]`) or JSON in the attribute (`items='["Day","Week"]'`).
36
+ - Callbacks are DOM events: `onChange` → `change`, `onDecide` → `decide`, with the argument in `event.detail` (an array when there are several).
37
+ - Content is `children`; `slot="action"` fills the `action` prop, `slot="panels:Overview"` a tab panel.
38
+ - `<tf-provider kit="pro" theme="dark">`, or `data-kit` and `data-theme` on `<html>`.
39
+
40
+ The [guide](https://ui.twentyfirst.media/halo/html/) has the details and examples for every framework.
41
+
42
+ ## What you get
43
+
44
+ - `dist/elements.js`: ESM, React and the components bundled, minified.
45
+ - `dist/elements.global.js`: the same for a classic `<script>`.
46
+ - `dist/elements.d.ts`: types, including `HTMLElementTagNameMap`, so `querySelector("tf-tabs")` is typed.
47
+ - `dist/custom-elements.json`: a Custom Elements Manifest for editor autocompletion; `dist/vscode.html-custom-data.json` for VS Code's `html.customData`.
48
+
49
+ No shadow DOM, no telemetry and no network requests from the components.
50
+
51
+ ## License
52
+
53
+ [MIT](https://github.com/twentyfirstmedia/ui/blob/main/LICENSE) © Twentyfirst Media. Bundles React and ReactDOM (MIT).