react-ui-suite 1.0.0 → 1.1.2
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 +174 -71
- package/dist/Alert-AVVBZ6TP.css +134 -0
- package/dist/Badge-FPJ2X7KC.css +80 -0
- package/dist/Button-S5BQ425L.css +49 -0
- package/dist/Card-SS7L6RAU.css +82 -0
- package/dist/Checkbox-DH24P7XS.css +113 -0
- package/dist/ColorPicker-K6LXYYSW.css +400 -0
- package/dist/Combobox-UQBN7KFK.css +130 -0
- package/dist/DatalistInput-72UMJ3OM.css +122 -0
- package/dist/DatePicker-ICNOIGZ2.css +311 -0
- package/dist/Dialog-ZY5E3VZ4.css +136 -0
- package/dist/Disclosure-YZNVFFHQ.css +95 -0
- package/dist/Dropdown-RQAPUZUJ.css +128 -0
- package/dist/InputField-TKTNGOH3.css +141 -0
- package/dist/NumberInput-KTYVXS7K.css +203 -0
- package/dist/OutputChip-CN7R243G.css +37 -0
- package/dist/Popover-UQEO2HLP.css +81 -0
- package/dist/ProgressMeter-6EOIFB3Y.css +95 -0
- package/dist/Radio-K6CDDBCQ.css +227 -0
- package/dist/ResizableContainer-KIX7YKZJ.css +165 -0
- package/dist/Select-UA2CM52H.css +216 -0
- package/dist/Slider-KHMHINU4.css +243 -0
- package/dist/StackedList-QF5242GF.css +109 -0
- package/dist/TabGroup-CV2AC3EO.css +307 -0
- package/dist/Table-GHEVUAUZ.css +187 -0
- package/dist/Textarea-ETXFJO7T.css +231 -0
- package/dist/Toggle-H2VEMC4W.css +125 -0
- package/dist/index.d.ts +80 -5
- package/dist/index.js +1584 -726
- package/dist/index.js.map +1 -1
- package/dist/layout-safety-HVFX63T3.css +36 -0
- package/dist/tokens-SXYSRKNB.css +44 -0
- package/dist/utility-vars-EJQQEY4Z.css +108 -0
- package/package.json +17 -14
package/README.md
CHANGED
|
@@ -1,71 +1,174 @@
|
|
|
1
|
-
# react-ui-suite
|
|
2
|
-
|
|
3
|
-
`react-ui-suite` is a collection of production-ready React components
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
1
|
+
# react-ui-suite
|
|
2
|
+
|
|
3
|
+
`react-ui-suite` is a collection of production-ready React components geared toward application UIs (forms, lists, dialogs, pickers, etc.).
|
|
4
|
+
This repository is a small monorepo that contains:
|
|
5
|
+
|
|
6
|
+
- the **publishable library package** in `src/`
|
|
7
|
+
- a **Vite-powered demo/gallery** in `demo/`
|
|
8
|
+
- shared tooling and configuration at the **root workspace**
|
|
9
|
+
|
|
10
|
+
> **ESM-only:** The npm package only publishes ES modules and type declarations under `dist/`.
|
|
11
|
+
> CommonJS consumers (`require("react-ui-suite")`) are **not** supported. Use a modern bundler (Vite, Webpack 5+, Next.js, etc.) or native ESM in Node.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Packages
|
|
16
|
+
|
|
17
|
+
| Folder | Description |
|
|
18
|
+
| ------ | ----------- |
|
|
19
|
+
| `.` | Root workspace named `@react-ui-suite/root`. It orchestrates tooling/scripts for every workspace and is **never published** to npm. |
|
|
20
|
+
| `src/` | Workspace that publishes the `react-ui-suite` library. Components live in `src/components/` alongside their `*.demo.tsx` gallery entries, all compiled to `dist/` via `tsup`. |
|
|
21
|
+
| `demo/` | Standalone Vite gallery that auto-registers every component demo (`src/components/**/*.demo.tsx`) via `import.meta.glob`. Useful for local development and QA. |
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Installation (for consumers)
|
|
26
|
+
|
|
27
|
+
Install from npm into any React 19 project:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npm install react-ui-suite
|
|
31
|
+
# or
|
|
32
|
+
pnpm add react-ui-suite
|
|
33
|
+
# or
|
|
34
|
+
yarn add react-ui-suite
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Peer dependencies (required in the consuming app):
|
|
38
|
+
|
|
39
|
+
- `react` ^19.2.4
|
|
40
|
+
- `react-dom` ^19.2.4
|
|
41
|
+
|
|
42
|
+
The library marks `react` and `react-dom` as externals; they must come from the host application.
|
|
43
|
+
|
|
44
|
+
### Basic usage
|
|
45
|
+
|
|
46
|
+
```tsx
|
|
47
|
+
import { Button } from "react-ui-suite";
|
|
48
|
+
|
|
49
|
+
export function Example() {
|
|
50
|
+
return <Button variant="primary">Save</Button>;
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Because the package is ESM-only, make sure your toolchain supports `import` / `export` and ESM-aware bundling.
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Development (this repo)
|
|
59
|
+
|
|
60
|
+
Clone and install from the root (Node 18+ required):
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
git clone https://github.com/nruimveld7/react-ui-suite.git
|
|
64
|
+
cd react-ui-suite
|
|
65
|
+
npm install
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Workspace commands (run from the root)
|
|
69
|
+
|
|
70
|
+
These scripts are defined in the **root** `package.json` and proxy into the `react-ui-suite` workspace:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
npm run build # builds the library (src/) via tsup into src/dist
|
|
74
|
+
npm run test # runs Vitest for the library workspace
|
|
75
|
+
npm run lint # lints the library source via ESLint
|
|
76
|
+
npm run format # formats the entire repo with Prettier
|
|
77
|
+
npm run format:check # checks formatting without writing changes
|
|
78
|
+
npm run dev # starts the Vite demo gallery (demo/) at http://localhost:5173
|
|
79
|
+
npm run test:visual # runs Playwright visual tests for the demo gallery
|
|
80
|
+
npm run publish # publishes the react-ui-suite workspace to npm (see “Publishing” below)
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
You can also work directly inside the `src/` workspace:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
cd src
|
|
87
|
+
npm run build
|
|
88
|
+
npm run test
|
|
89
|
+
npm run lint
|
|
90
|
+
npm run format
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## Library build details
|
|
96
|
+
|
|
97
|
+
The library workspace (`src/`) uses [`tsup`](https://tsup.egoist.dev/) to build:
|
|
98
|
+
|
|
99
|
+
- **Entry:** `src/index.ts`
|
|
100
|
+
- **Output:** ESM bundle at `src/dist/index.js` + corresponding `src/dist/index.d.ts`
|
|
101
|
+
- **Target:** `es2019`
|
|
102
|
+
- **ESM-only:** `format: ["esm"]`
|
|
103
|
+
- **Externals:** `react`, `react-dom`
|
|
104
|
+
|
|
105
|
+
`src/package.json` restricts the published files to:
|
|
106
|
+
|
|
107
|
+
- `dist/`
|
|
108
|
+
- `README.md`
|
|
109
|
+
- `LICENSE`
|
|
110
|
+
|
|
111
|
+
so consumers only install the compiled artifacts plus documentation and license.
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## Demo gallery
|
|
116
|
+
|
|
117
|
+
The `demo/` workspace is a Vite app that renders a component gallery:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
npm run dev
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
This will:
|
|
124
|
+
|
|
125
|
+
- start Vite on `http://localhost:5173`
|
|
126
|
+
- alias `react-ui-suite` to the local `src/` workspace
|
|
127
|
+
- auto-load demo definitions from `src/components/**/*.demo.tsx` via `import.meta.glob`
|
|
128
|
+
|
|
129
|
+
Add a `<Component>.demo.tsx` file (for example `src/components/Button/Button.demo.tsx`) beside the component to have it show up automatically in the gallery.
|
|
130
|
+
|
|
131
|
+
Use this gallery to iterate on new components and verify changes visually.
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## Publishing (maintainers)
|
|
136
|
+
|
|
137
|
+
Publishing is always coordinated from the **library workspace** (`src/`), but you typically invoke it via the root script.
|
|
138
|
+
|
|
139
|
+
### 1. Bump the version in `src/package.json`
|
|
140
|
+
|
|
141
|
+
Use semantic versioning (`0.1.1`, `0.2.0`, `1.0.0`, etc.).
|
|
142
|
+
|
|
143
|
+
### 2. From the repo root
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
npm run publish
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
This runs:
|
|
150
|
+
|
|
151
|
+
- `npm publish --workspace react-ui-suite --access public`
|
|
152
|
+
|
|
153
|
+
Inside the `src/` workspace, `prepublishOnly` is configured to run:
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
npm run build && npm run test && npm run lint
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
So a publish will only succeed if:
|
|
160
|
+
|
|
161
|
+
- the library builds,
|
|
162
|
+
- the tests pass, and
|
|
163
|
+
- linting is clean.
|
|
164
|
+
|
|
165
|
+
You can also publish directly from `src/` if needed:
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
cd src
|
|
169
|
+
npm run publish
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
(but `npm run publish` at the root is the normal flow).
|
|
173
|
+
|
|
174
|
+
---
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
.rui-alert {
|
|
2
|
+
position: relative;
|
|
3
|
+
display: flex;
|
|
4
|
+
align-items: flex-start;
|
|
5
|
+
gap: var(--rui-space-3);
|
|
6
|
+
padding: var(--rui-space-3) var(--rui-space-4);
|
|
7
|
+
border-radius: var(--rui-radius-xl);
|
|
8
|
+
font-size: 0.875rem;
|
|
9
|
+
line-height: 1.4;
|
|
10
|
+
border: 1px solid var(--rui-alert-ring, var(--rui-color-border));
|
|
11
|
+
background-color: var(--rui-alert-surface, var(--rui-color-surface));
|
|
12
|
+
color: var(--rui-alert-text, var(--rui-color-text-strong));
|
|
13
|
+
box-shadow: var(--rui-shadow-button);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.rui-alert__icon {
|
|
17
|
+
font-size: 1.1rem;
|
|
18
|
+
margin-top: 2px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.rui-alert__content {
|
|
22
|
+
flex: 1;
|
|
23
|
+
min-width: 0;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.rui-alert__title {
|
|
27
|
+
margin: 0;
|
|
28
|
+
font-size: 0.95rem;
|
|
29
|
+
font-weight: 600;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.rui-alert__description {
|
|
33
|
+
margin: 0.25rem 0 0;
|
|
34
|
+
font-size: 0.875rem;
|
|
35
|
+
line-height: 1.5;
|
|
36
|
+
opacity: 0.9;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.rui-alert__dismiss {
|
|
40
|
+
border: none;
|
|
41
|
+
background: transparent;
|
|
42
|
+
border-radius: 999px;
|
|
43
|
+
padding: 0;
|
|
44
|
+
width: 1.75rem;
|
|
45
|
+
height: 1.75rem;
|
|
46
|
+
display: inline-flex;
|
|
47
|
+
align-items: center;
|
|
48
|
+
justify-content: center;
|
|
49
|
+
font-size: 0.75rem;
|
|
50
|
+
font-weight: 600;
|
|
51
|
+
text-transform: uppercase;
|
|
52
|
+
letter-spacing: 0.08em;
|
|
53
|
+
color: currentColor;
|
|
54
|
+
opacity: 0.7;
|
|
55
|
+
cursor: pointer;
|
|
56
|
+
line-height: 1;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.rui-alert__dismiss:hover {
|
|
60
|
+
opacity: 1;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.rui-alert__dismiss:focus-visible {
|
|
64
|
+
outline: 2px solid var(--rui-color-focus-ring);
|
|
65
|
+
outline-offset: 2px;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.rui-alert__accent {
|
|
69
|
+
position: absolute;
|
|
70
|
+
top: 0.5rem;
|
|
71
|
+
bottom: 0.5rem;
|
|
72
|
+
left: 0.5rem;
|
|
73
|
+
width: 0.25rem;
|
|
74
|
+
border-radius: 999px;
|
|
75
|
+
background-color: var(--rui-alert-accent, var(--rui-color-border-strong));
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.rui-alert--info {
|
|
79
|
+
--rui-alert-surface: #f0f9ff;
|
|
80
|
+
--rui-alert-text: #0c4a6e;
|
|
81
|
+
--rui-alert-ring: #e0f2fe;
|
|
82
|
+
--rui-alert-accent: #38bdf8;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
[data-theme="dark"] .rui-alert--info {
|
|
86
|
+
--rui-alert-surface: rgba(14, 165, 233, 0.12);
|
|
87
|
+
--rui-alert-text: #e0f2fe;
|
|
88
|
+
--rui-alert-ring: rgba(14, 165, 233, 0.35);
|
|
89
|
+
--rui-alert-accent: #38bdf8;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.rui-alert--success {
|
|
93
|
+
--rui-alert-surface: #ecfdf5;
|
|
94
|
+
--rui-alert-text: #064e3b;
|
|
95
|
+
--rui-alert-ring: #d1fae5;
|
|
96
|
+
--rui-alert-accent: #34d399;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
[data-theme="dark"] .rui-alert--success {
|
|
100
|
+
--rui-alert-surface: rgba(16, 185, 129, 0.12);
|
|
101
|
+
--rui-alert-text: #d1fae5;
|
|
102
|
+
--rui-alert-ring: rgba(16, 185, 129, 0.35);
|
|
103
|
+
--rui-alert-accent: #10b981;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.rui-alert--warning {
|
|
107
|
+
--rui-alert-surface: #fffbeb;
|
|
108
|
+
--rui-alert-text: #78350f;
|
|
109
|
+
--rui-alert-ring: #fef3c7;
|
|
110
|
+
--rui-alert-accent: #fbbf24;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
[data-theme="dark"] .rui-alert--warning {
|
|
114
|
+
--rui-alert-surface: rgba(251, 191, 36, 0.12);
|
|
115
|
+
--rui-alert-text: #fde68a;
|
|
116
|
+
--rui-alert-ring: rgba(251, 191, 36, 0.4);
|
|
117
|
+
--rui-alert-accent: #fbbf24;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.rui-alert--danger {
|
|
121
|
+
--rui-alert-surface: #fff1f2;
|
|
122
|
+
--rui-alert-text: #881337;
|
|
123
|
+
--rui-alert-ring: #ffe4e6;
|
|
124
|
+
--rui-alert-accent: #fb7185;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
[data-theme="dark"] .rui-alert--danger {
|
|
128
|
+
--rui-alert-surface: rgba(244, 63, 94, 0.12);
|
|
129
|
+
--rui-alert-text: #fecdd3;
|
|
130
|
+
--rui-alert-ring: rgba(244, 63, 94, 0.4);
|
|
131
|
+
--rui-alert-accent: #f43f5e;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
.rui-badge {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
gap: var(--rui-space-1);
|
|
5
|
+
padding: 0.25rem 0.75rem;
|
|
6
|
+
border-radius: 999px;
|
|
7
|
+
font-size: 0.7rem;
|
|
8
|
+
font-weight: 600;
|
|
9
|
+
text-transform: uppercase;
|
|
10
|
+
letter-spacing: 0.12em;
|
|
11
|
+
line-height: 1.1;
|
|
12
|
+
border: 1px solid var(--rui-badge-ring, transparent);
|
|
13
|
+
background-color: var(--rui-badge-surface, var(--rui-color-surface));
|
|
14
|
+
color: var(--rui-badge-text, var(--rui-color-text-strong));
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.rui-badge > span[aria-hidden="true"] {
|
|
18
|
+
display: inline-flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.rui-badge--neutral {
|
|
23
|
+
--rui-badge-surface: #f1f5f9;
|
|
24
|
+
--rui-badge-text: #334155;
|
|
25
|
+
--rui-badge-ring: #e2e8f0;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
[data-theme="dark"] .rui-badge--neutral {
|
|
29
|
+
--rui-badge-surface: rgba(24, 24, 27, 0.6);
|
|
30
|
+
--rui-badge-text: #f4f4f5;
|
|
31
|
+
--rui-badge-ring: rgba(63, 63, 70, 0.6);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.rui-badge--info {
|
|
35
|
+
--rui-badge-surface: #f0f9ff;
|
|
36
|
+
--rui-badge-text: #0369a1;
|
|
37
|
+
--rui-badge-ring: #bae6fd;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
[data-theme="dark"] .rui-badge--info {
|
|
41
|
+
--rui-badge-surface: rgba(14, 165, 233, 0.12);
|
|
42
|
+
--rui-badge-text: #bae6fd;
|
|
43
|
+
--rui-badge-ring: rgba(14, 165, 233, 0.35);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.rui-badge--success {
|
|
47
|
+
--rui-badge-surface: #ecfdf5;
|
|
48
|
+
--rui-badge-text: #047857;
|
|
49
|
+
--rui-badge-ring: #a7f3d0;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
[data-theme="dark"] .rui-badge--success {
|
|
53
|
+
--rui-badge-surface: rgba(16, 185, 129, 0.12);
|
|
54
|
+
--rui-badge-text: #a7f3d0;
|
|
55
|
+
--rui-badge-ring: rgba(16, 185, 129, 0.35);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.rui-badge--warning {
|
|
59
|
+
--rui-badge-surface: #fffbeb;
|
|
60
|
+
--rui-badge-text: #92400e;
|
|
61
|
+
--rui-badge-ring: #fde68a;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
[data-theme="dark"] .rui-badge--warning {
|
|
65
|
+
--rui-badge-surface: rgba(251, 191, 36, 0.12);
|
|
66
|
+
--rui-badge-text: #fde68a;
|
|
67
|
+
--rui-badge-ring: rgba(251, 191, 36, 0.35);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.rui-badge--danger {
|
|
71
|
+
--rui-badge-surface: #fff1f2;
|
|
72
|
+
--rui-badge-text: #be123c;
|
|
73
|
+
--rui-badge-ring: #fecdd3;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
[data-theme="dark"] .rui-badge--danger {
|
|
77
|
+
--rui-badge-surface: rgba(244, 63, 94, 0.12);
|
|
78
|
+
--rui-badge-text: #fecdd3;
|
|
79
|
+
--rui-badge-ring: rgba(244, 63, 94, 0.4);
|
|
80
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
.rui-button {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
justify-content: center;
|
|
5
|
+
gap: var(--rui-space-2);
|
|
6
|
+
padding-inline: var(--rui-space-4);
|
|
7
|
+
padding-block: var(--rui-space-2);
|
|
8
|
+
border-radius: var(--rui-radius-xl);
|
|
9
|
+
border: 1px solid var(--rui-color-border);
|
|
10
|
+
font-weight: 600;
|
|
11
|
+
font-size: 0.875rem;
|
|
12
|
+
line-height: 1.25rem;
|
|
13
|
+
box-shadow: var(--rui-shadow-button);
|
|
14
|
+
background-color: transparent;
|
|
15
|
+
cursor: pointer;
|
|
16
|
+
transition:
|
|
17
|
+
border-color 150ms ease,
|
|
18
|
+
background-color 150ms ease,
|
|
19
|
+
color 150ms ease,
|
|
20
|
+
box-shadow 150ms ease;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.rui-button:not(:disabled):hover {
|
|
24
|
+
border-color: var(--rui-color-border-strong);
|
|
25
|
+
box-shadow: var(--rui-shadow-button), 0 0 0 1px var(--rui-color-border-strong);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.rui-button:focus-visible {
|
|
29
|
+
outline: none;
|
|
30
|
+
border-color: var(--rui-color-focus-ring);
|
|
31
|
+
box-shadow: var(--rui-shadow-button), 0 0 0 2px var(--rui-color-focus-ring);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.rui-button:disabled {
|
|
35
|
+
opacity: 0.6;
|
|
36
|
+
cursor: not-allowed;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.rui-button--bg-default {
|
|
40
|
+
background-color: var(--rui-color-surface);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.rui-button--bg-default:not(:disabled):hover {
|
|
44
|
+
background-color: var(--rui-color-surface-muted);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.rui-button--text-default {
|
|
48
|
+
color: var(--rui-color-text-strong);
|
|
49
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
.rui-card {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
min-width: 0;
|
|
5
|
+
border-radius: 1.75rem;
|
|
6
|
+
border: 1px solid var(--rui-color-border);
|
|
7
|
+
background-color: var(--rui-color-surface);
|
|
8
|
+
padding: 1.25rem;
|
|
9
|
+
box-shadow:
|
|
10
|
+
0 10px 15px -3px rgb(15 23 42 / 0.12),
|
|
11
|
+
0 4px 6px -4px rgb(15 23 42 / 0.12);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
[data-theme="dark"] .rui-card {
|
|
15
|
+
box-shadow: none;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.rui-card--muted {
|
|
19
|
+
background-color: var(--rui-color-surface-muted);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.rui-card__header {
|
|
23
|
+
display: flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
justify-content: space-between;
|
|
26
|
+
gap: var(--rui-space-3);
|
|
27
|
+
min-height: 1.25rem;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.rui-card__eyebrow {
|
|
31
|
+
margin: 0;
|
|
32
|
+
font-size: 0.7rem;
|
|
33
|
+
font-weight: 600;
|
|
34
|
+
text-transform: uppercase;
|
|
35
|
+
letter-spacing: 0.2em;
|
|
36
|
+
color: var(--rui-color-text-muted);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.rui-card__eyebrow--placeholder {
|
|
40
|
+
visibility: hidden;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.rui-card__actions {
|
|
44
|
+
font-size: 0.875rem;
|
|
45
|
+
color: var(--rui-color-text-muted);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.rui-card__title {
|
|
49
|
+
margin: 0;
|
|
50
|
+
font-size: 1.1rem;
|
|
51
|
+
font-weight: 600;
|
|
52
|
+
color: var(--rui-color-text-strong);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.rui-card__title--offset {
|
|
56
|
+
margin-top: var(--rui-space-3);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.rui-card__body {
|
|
60
|
+
margin-top: var(--rui-space-2);
|
|
61
|
+
flex: 1;
|
|
62
|
+
font-size: 0.95rem;
|
|
63
|
+
line-height: 1.5;
|
|
64
|
+
color: var(--rui-color-text-muted);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.rui-card__footer {
|
|
68
|
+
margin-top: var(--rui-space-2);
|
|
69
|
+
padding-top: var(--rui-space-2);
|
|
70
|
+
border-top: 1px solid var(--rui-color-border);
|
|
71
|
+
font-size: 0.8rem;
|
|
72
|
+
color: var(--rui-color-text-muted);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.rui-card__header,
|
|
76
|
+
.rui-card__eyebrow,
|
|
77
|
+
.rui-card__actions,
|
|
78
|
+
.rui-card__title,
|
|
79
|
+
.rui-card__body,
|
|
80
|
+
.rui-card__footer {
|
|
81
|
+
min-width: 0;
|
|
82
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
.rui-checkbox {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
gap: var(--rui-space-3);
|
|
5
|
+
padding: 0.5rem 0.75rem;
|
|
6
|
+
border-radius: 1rem;
|
|
7
|
+
border: 1px solid transparent;
|
|
8
|
+
cursor: pointer;
|
|
9
|
+
transition: background-color 150ms ease, border-color 150ms ease, opacity 150ms ease;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.rui-checkbox:not(.rui-checkbox--disabled):hover {
|
|
13
|
+
background-color: var(--rui-color-surface-muted);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.rui-checkbox--disabled {
|
|
17
|
+
cursor: not-allowed;
|
|
18
|
+
opacity: 0.6;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.rui-checkbox__control {
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
justify-content: center;
|
|
25
|
+
width: 1.5rem;
|
|
26
|
+
height: 1.5rem;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.rui-checkbox__input {
|
|
30
|
+
position: absolute;
|
|
31
|
+
opacity: 0;
|
|
32
|
+
pointer-events: none;
|
|
33
|
+
width: 0;
|
|
34
|
+
height: 0;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.rui-checkbox__box {
|
|
38
|
+
display: grid;
|
|
39
|
+
place-items: center;
|
|
40
|
+
width: 1.25rem;
|
|
41
|
+
height: 1.25rem;
|
|
42
|
+
border-radius: 0.4rem;
|
|
43
|
+
border: 1px solid var(--rui-checkbox-box-border, var(--rui-color-border));
|
|
44
|
+
background-color: var(--rui-checkbox-box-bg, var(--rui-color-surface));
|
|
45
|
+
color: var(--rui-checkbox-box-color, var(--rui-color-text-muted));
|
|
46
|
+
box-shadow: var(--rui-checkbox-box-shadow, none);
|
|
47
|
+
font-size: 0.75rem;
|
|
48
|
+
transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, box-shadow 150ms ease;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
[data-theme="dark"] .rui-checkbox__box {
|
|
52
|
+
box-shadow: var(--rui-checkbox-box-shadow, none);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.rui-checkbox__box--checked {
|
|
56
|
+
border-color: var(--rui-checkbox-box-border-checked, var(--rui-color-border-strong));
|
|
57
|
+
background-color: var(--rui-checkbox-box-bg-checked, var(--rui-color-surface-muted));
|
|
58
|
+
color: var(--rui-checkbox-box-color-checked, var(--rui-color-text-strong));
|
|
59
|
+
box-shadow: var(
|
|
60
|
+
--rui-checkbox-box-shadow-checked,
|
|
61
|
+
0 0 0 1px rgba(148, 163, 184, 0.45)
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
[data-theme="dark"] .rui-checkbox__box--checked {
|
|
66
|
+
box-shadow: var(
|
|
67
|
+
--rui-checkbox-box-shadow-checked,
|
|
68
|
+
0 0 0 1px rgba(113, 113, 122, 0.45)
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.rui-checkbox__box--indeterminate {
|
|
73
|
+
border-color: var(--rui-checkbox-box-border-checked, var(--rui-color-border-strong));
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.rui-checkbox__input:focus-visible + .rui-checkbox__box {
|
|
77
|
+
outline: 2px solid var(--rui-color-focus-ring);
|
|
78
|
+
outline-offset: 2px;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.rui-checkbox__check {
|
|
82
|
+
width: 1rem;
|
|
83
|
+
height: 1rem;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.rui-checkbox__dash {
|
|
87
|
+
width: 0.6rem;
|
|
88
|
+
height: 2px;
|
|
89
|
+
border-radius: 999px;
|
|
90
|
+
background-color: currentColor;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.rui-checkbox__text {
|
|
94
|
+
display: flex;
|
|
95
|
+
flex-direction: column;
|
|
96
|
+
flex: 1;
|
|
97
|
+
gap: 0.1rem;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.rui-checkbox__label {
|
|
101
|
+
font-size: 0.95rem;
|
|
102
|
+
font-weight: 600;
|
|
103
|
+
color: var(--rui-color-text-strong);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.rui-checkbox__description {
|
|
107
|
+
font-size: 0.8rem;
|
|
108
|
+
color: var(--rui-color-text-muted);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.rui-checkbox__text {
|
|
112
|
+
min-width: 0;
|
|
113
|
+
}
|