@skapp/skapp-ui 1.0.0 → 1.0.1-beta.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,34 +1,34 @@
1
- # Changelog
2
-
3
- All notable changes to this project are documented in this file.
4
-
5
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
-
7
- ## [Unreleased]
8
-
9
- Planned as 1.2.0, the first public release of skapp-ui as open source. It follows 1.0.7, the last private `@rootcodelabs/skapp-ui` release; there were no 1.1.x releases.
10
-
11
- ### Added
12
-
13
- - Published to npm as `@skapphq/skapp-ui` under the GNU AGPL-3.0 license.
14
- - `exports` map with entries for the ESM bundle, TypeScript types and the stylesheet (`@skapphq/skapp-ui/tailwind.css`, or `@import "@skapphq/skapp-ui"` from CSS).
15
- - Source maps for the ESM bundle.
16
- - Public Storybook at https://skapphq.github.io/skapp-ui/.
17
- - Contributor documentation, Code of Conduct and trademark policy.
18
-
19
- ### Changed
20
-
21
- - Peer dependencies (`@dnd-kit/*`, `react-day-picker`, `dompurify`, `tiptap-extension-resize-image`) are no longer bundled into the package; your app's installed versions are used instead.
22
- - Declared `@tiptap/core`, `@tiptap/pm` and `@tiptap/suggestion` as peer dependencies, since the library imports them directly.
23
-
24
- ### Migrating from `@rootcodelabs/skapp-ui`
25
-
26
- Earlier versions were published privately as `@rootcodelabs/skapp-ui`. To move to the public package:
27
-
28
- 1. Replace `@rootcodelabs/skapp-ui` with `@skapphq/skapp-ui` in your `package.json`, imports and CSS (`@import` / `@source`).
29
- 2. Remove the `@rootcodelabs` registry entry from `.npmrc` if nothing else needs it.
30
- 3. Make sure the peer dependencies listed in the README are installed.
31
-
32
- The component APIs are unchanged.
33
-
34
- [Unreleased]: https://github.com/SkappHQ/skapp-ui/commits/develop
1
+ # Changelog
2
+
3
+ All notable changes to this project are documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
+
7
+ ## [Unreleased]
8
+
9
+ Planned as 1.2.0, the first public release of skapp-ui as open source. It follows 1.0.7, the last private `@rootcodelabs/skapp-ui` release; there were no 1.1.x releases.
10
+
11
+ ### Added
12
+
13
+ - Published to npm as `@skapp/skapp-ui` under the GNU AGPL-3.0 license.
14
+ - `exports` map with entries for the ESM bundle, TypeScript types and the stylesheet (`@skapp/skapp-ui/tailwind.css`, or `@import "@skapp/skapp-ui"` from CSS).
15
+ - Source maps for the ESM bundle.
16
+ - Public Storybook at https://skapphq.github.io/skapp-ui/.
17
+ - Contributor documentation, Code of Conduct and trademark policy.
18
+
19
+ ### Changed
20
+
21
+ - Peer dependencies (`@dnd-kit/*`, `react-day-picker`, `dompurify`, `tiptap-extension-resize-image`) are no longer bundled into the package; your app's installed versions are used instead.
22
+ - Declared `@tiptap/core`, `@tiptap/pm` and `@tiptap/suggestion` as peer dependencies, since the library imports them directly.
23
+
24
+ ### Migrating from `@rootcodelabs/skapp-ui`
25
+
26
+ Earlier versions were published privately as `@rootcodelabs/skapp-ui`. To move to the public package:
27
+
28
+ 1. Replace `@rootcodelabs/skapp-ui` with `@skapp/skapp-ui` in your `package.json`, imports and CSS (`@import` / `@source`).
29
+ 2. Remove the `@rootcodelabs` registry entry from `.npmrc` if nothing else needs it.
30
+ 3. Make sure the peer dependencies listed in the README are installed.
31
+
32
+ The component APIs are unchanged.
33
+
34
+ [Unreleased]: https://github.com/SkappHQ/skapp-ui/commits/develop
package/README.md CHANGED
@@ -1,96 +1,96 @@
1
- # skapp-ui
2
-
3
- React component library for [Skapp](https://github.com/SkappHQ/skapp), built with TypeScript and Tailwind CSS v4.
4
-
5
- [![npm version](https://img.shields.io/npm/v/@skapphq/skapp-ui.svg)](https://www.npmjs.com/package/@skapphq/skapp-ui)
6
- [![License: AGPL-3.0](https://img.shields.io/badge/license-AGPL--3.0-blue.svg)](LICENSE)
7
- [![Test](https://github.com/SkappHQ/skapp-ui/actions/workflows/test.yml/badge.svg)](https://github.com/SkappHQ/skapp-ui/actions/workflows/test.yml)
8
- [![Build](https://github.com/SkappHQ/skapp-ui/actions/workflows/build.yml/badge.svg)](https://github.com/SkappHQ/skapp-ui/actions/workflows/build.yml)
9
-
10
- **[Browse the components in Storybook →](https://skapphq.github.io/skapp-ui/)**
11
-
12
- ## Install
13
-
14
- ```bash
15
- npm install @skapphq/skapp-ui
16
- ```
17
-
18
- The package ships as an ES module with TypeScript types and a prebuilt stylesheet.
19
-
20
- ### Peer dependencies
21
-
22
- `react` and `react-dom` (18 or 19) are required. The package also lists the libraries below as peer dependencies so your app controls their versions. The bundle is a single file that imports all of them, so install every one even if you only use some of the components:
23
-
24
- | Used by | Packages |
25
- | ----------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------- |
26
- | `RichTextEditor` and the components built on it (`CommentSection`, `ReplySection`, `ApprovalCard`), `MultiSelectSearch` | `@tiptap/*` (v3), `tiptap-extension-resize-image` |
27
- | `ApprovalCard`, `CommentSection` | `dompurify` |
28
- | `DatePicker`, `DateRangePicker` | `react-day-picker` (v9) |
29
- | `DraggableDeleteTable`, `ListTable` | `@dnd-kit/core`, `@dnd-kit/sortable`, `@dnd-kit/utilities` |
30
-
31
- npm 7 and later installs peer dependencies automatically. pnpm 8 and later does too. With Yarn, older pnpm versions or `--legacy-peer-deps`, install them all yourself; the full list and version ranges are in [`package.json`](package.json) under `peerDependencies`.
32
-
33
- ## Styles
34
-
35
- Components are styled with Tailwind CSS, and the package includes a prebuilt stylesheet (`dist/tailwind.css`). Load it once in your app.
36
-
37
- **Apps using Tailwind CSS v4** – import it from your main CSS file, after Tailwind:
38
-
39
- ```css
40
- @import "tailwindcss";
41
- @import "@skapphq/skapp-ui";
42
- ```
43
-
44
- **Apps without Tailwind** – import the stylesheet from your entry file:
45
-
46
- ```tsx
47
- import "@skapphq/skapp-ui/tailwind.css";
48
- ```
49
-
50
- Things to know:
51
-
52
- - The stylesheet includes Tailwind's base reset (preflight) and the library's theme tokens (for example `--color-primary-*` and `--color-label-*`).
53
- - It loads the Inter and Noto Color Emoji fonts from Google Fonts with `@import url(...)`. If your app serves fonts itself or your bundler rejects remote imports, strip those rules in your PostCSS pipeline and load the fonts your own way.
54
-
55
- ## Usage
56
-
57
- ```tsx
58
- import { useState } from "react";
59
- import { Avatar, ButtonV2, InputField, MailIcon } from "@skapphq/skapp-ui";
60
-
61
- export function InviteMember() {
62
- const [email, setEmail] = useState("");
63
-
64
- return (
65
- <div className="flex items-end gap-4">
66
- <Avatar id="current-user" firstName="Ada" lastName="Lovelace" size="lg" />
67
- <InputField
68
- label="Email"
69
- type="email"
70
- placeholder="name@example.com"
71
- value={email}
72
- onChange={(event) => setEmail(event.target.value)}
73
- leftIcon={<MailIcon />}
74
- helperText="We'll send an invite to this address"
75
- />
76
- <ButtonV2 variant="primary" size="md" disabled={!email}>
77
- Send invite
78
- </ButtonV2>
79
- </div>
80
- );
81
- }
82
- ```
83
-
84
- Every component, its props and its variants are documented in [Storybook](https://skapphq.github.io/skapp-ui/).
85
-
86
- ## Contributing
87
-
88
- Contributions are welcome. See [CONTRIBUTING.md](CONTRIBUTING.md) for setup, the branch flow and the PR checklist, and please follow our [Code of Conduct](CODE_OF_CONDUCT.md).
89
-
90
- ## 📜 License
91
-
92
- GNU AFFERO GENERAL PUBLIC LICENSE (see **[LICENSE](LICENSE)**).
93
-
94
- ## 🎨 Logo & Trademark
95
-
96
- Please read our **[Trademark Policy](TRADEMARK_POLICY.md)**.
1
+ # skapp-ui
2
+
3
+ React component library for [Skapp](https://github.com/SkappHQ/skapp), built with TypeScript and Tailwind CSS v4.
4
+
5
+ [![npm version](https://img.shields.io/npm/v/@skapp/skapp-ui.svg)](https://www.npmjs.com/package/@skapp/skapp-ui)
6
+ [![License: AGPL-3.0](https://img.shields.io/badge/license-AGPL--3.0-blue.svg)](LICENSE)
7
+ [![Test](https://github.com/SkappHQ/skapp-ui/actions/workflows/test.yml/badge.svg)](https://github.com/SkappHQ/skapp-ui/actions/workflows/test.yml)
8
+ [![Build](https://github.com/SkappHQ/skapp-ui/actions/workflows/build.yml/badge.svg)](https://github.com/SkappHQ/skapp-ui/actions/workflows/build.yml)
9
+
10
+ **[Browse the components in Storybook →](https://skapphq.github.io/skapp-ui/)**
11
+
12
+ ## Install
13
+
14
+ ```bash
15
+ npm install @skapp/skapp-ui
16
+ ```
17
+
18
+ The package ships as an ES module with TypeScript types and a prebuilt stylesheet.
19
+
20
+ ### Peer dependencies
21
+
22
+ `react` and `react-dom` (18 or 19) are required. The package also lists the libraries below as peer dependencies so your app controls their versions. The bundle is a single file that imports all of them, so install every one even if you only use some of the components:
23
+
24
+ | Used by | Packages |
25
+ | ----------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------- |
26
+ | `RichTextEditor` and the components built on it (`CommentSection`, `ReplySection`, `ApprovalCard`), `MultiSelectSearch` | `@tiptap/*` (v3), `tiptap-extension-resize-image` |
27
+ | `ApprovalCard`, `CommentSection` | `dompurify` |
28
+ | `DatePicker`, `DateRangePicker` | `react-day-picker` (v9) |
29
+ | `DraggableDeleteTable`, `ListTable` | `@dnd-kit/core`, `@dnd-kit/sortable`, `@dnd-kit/utilities` |
30
+
31
+ npm 7 and later installs peer dependencies automatically. pnpm 8 and later does too. With Yarn, older pnpm versions or `--legacy-peer-deps`, install them all yourself; the full list and version ranges are in [`package.json`](package.json) under `peerDependencies`.
32
+
33
+ ## Styles
34
+
35
+ Components are styled with Tailwind CSS, and the package includes a prebuilt stylesheet (`dist/tailwind.css`). Load it once in your app.
36
+
37
+ **Apps using Tailwind CSS v4** – import it from your main CSS file, after Tailwind:
38
+
39
+ ```css
40
+ @import "tailwindcss";
41
+ @import "@skapp/skapp-ui";
42
+ ```
43
+
44
+ **Apps without Tailwind** – import the stylesheet from your entry file:
45
+
46
+ ```tsx
47
+ import "@skapp/skapp-ui/tailwind.css";
48
+ ```
49
+
50
+ Things to know:
51
+
52
+ - The stylesheet includes Tailwind's base reset (preflight) and the library's theme tokens (for example `--color-primary-*` and `--color-label-*`).
53
+ - It loads the Inter and Noto Color Emoji fonts from Google Fonts with `@import url(...)`. If your app serves fonts itself or your bundler rejects remote imports, strip those rules in your PostCSS pipeline and load the fonts your own way.
54
+
55
+ ## Usage
56
+
57
+ ```tsx
58
+ import { useState } from "react";
59
+ import { Avatar, ButtonV2, InputField, MailIcon } from "@skapp/skapp-ui";
60
+
61
+ export function InviteMember() {
62
+ const [email, setEmail] = useState("");
63
+
64
+ return (
65
+ <div className="flex items-end gap-4">
66
+ <Avatar id="current-user" firstName="Ada" lastName="Lovelace" size="lg" />
67
+ <InputField
68
+ label="Email"
69
+ type="email"
70
+ placeholder="name@example.com"
71
+ value={email}
72
+ onChange={(event) => setEmail(event.target.value)}
73
+ leftIcon={<MailIcon />}
74
+ helperText="We'll send an invite to this address"
75
+ />
76
+ <ButtonV2 variant="primary" size="md" disabled={!email}>
77
+ Send invite
78
+ </ButtonV2>
79
+ </div>
80
+ );
81
+ }
82
+ ```
83
+
84
+ Every component, its props and its variants are documented in [Storybook](https://skapphq.github.io/skapp-ui/).
85
+
86
+ ## Contributing
87
+
88
+ Contributions are welcome. See [CONTRIBUTING.md](CONTRIBUTING.md) for setup, the branch flow and the PR checklist, and please follow our [Code of Conduct](CODE_OF_CONDUCT.md).
89
+
90
+ ## 📜 License
91
+
92
+ GNU AFFERO GENERAL PUBLIC LICENSE (see **[LICENSE](LICENSE)**).
93
+
94
+ ## 🎨 Logo & Trademark
95
+
96
+ Please read our **[Trademark Policy](TRADEMARK_POLICY.md)**.
@@ -1114,9 +1114,16 @@ const Button$1 = ({ variant = "primary", size = "md", icon, showIcon = true, ico
1114
1114
  iconPosition === "end" && iconElement));
1115
1115
  };
1116
1116
 
1117
- const Spinner = ({ size = 20 }) => {
1117
+ /**
1118
+ * A circular loading spinner with a grey track and an animated arc
1119
+ */
1120
+ const Spinner = ({ size = 20, color = "primary-accent", }) => {
1118
1121
  const spinnerSize = `${size}px`;
1119
- return (React__namespace.default.createElement("span", { className: "text-primary-accent inline-block", style: { width: spinnerSize, height: spinnerSize }, "aria-hidden": "true" },
1122
+ return (React__namespace.default.createElement("span", { className: "inline-block", style: {
1123
+ width: spinnerSize,
1124
+ height: spinnerSize,
1125
+ color: `var(--color-${color})`,
1126
+ }, "aria-hidden": "true" },
1120
1127
  React__namespace.default.createElement("svg", { className: "block", viewBox: "22 22 44 44" },
1121
1128
  React__namespace.default.createElement("g", null,
1122
1129
  React__namespace.default.createElement("animateTransform", { attributeName: "transform", type: "rotate", from: "0 44 44", to: "360 44 44", dur: "1.4s", repeatCount: "indefinite" }),