@leta-io/components 0.1.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 +42 -0
- package/dist/assets/avatar-photo-1.png +0 -0
- package/dist/assets/avatar-photo-2.png +0 -0
- package/dist/assets/avatar-photo-3.png +0 -0
- package/dist/assets/error.png +0 -0
- package/dist/assets/error.webp +0 -0
- package/dist/assets/file-upload.png +0 -0
- package/dist/assets/file-upload.webp +0 -0
- package/dist/assets/image-upload.png +0 -0
- package/dist/assets/image-upload.webp +0 -0
- package/dist/assets/leta-loader.json +1 -0
- package/dist/assets/new-update.png +0 -0
- package/dist/assets/new-update.webp +0 -0
- package/dist/assets/no-broadcast-logs.png +0 -0
- package/dist/assets/no-broadcast-logs.webp +0 -0
- package/dist/assets/no-comments.png +0 -0
- package/dist/assets/no-comments.webp +0 -0
- package/dist/assets/no-data.png +0 -0
- package/dist/assets/no-data.webp +0 -0
- package/dist/assets/no-drivers.png +0 -0
- package/dist/assets/no-drivers.webp +0 -0
- package/dist/assets/no-items.png +0 -0
- package/dist/assets/no-items.webp +0 -0
- package/dist/assets/no-network.png +0 -0
- package/dist/assets/no-network.webp +0 -0
- package/dist/assets/no-notifications.png +0 -0
- package/dist/assets/no-notifications.webp +0 -0
- package/dist/assets/no-orders.png +0 -0
- package/dist/assets/no-orders.webp +0 -0
- package/dist/assets/no-results.png +0 -0
- package/dist/assets/no-results.webp +0 -0
- package/dist/assets/no-reviews.png +0 -0
- package/dist/assets/no-reviews.webp +0 -0
- package/dist/assets/no-suspensions.png +0 -0
- package/dist/assets/no-suspensions.webp +0 -0
- package/dist/assets/no-trips.png +0 -0
- package/dist/assets/no-trips.webp +0 -0
- package/dist/index.d.ts +4719 -0
- package/dist/index.js +12962 -0
- package/package.json +53 -0
package/README.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# @leta-io/components
|
|
2
|
+
|
|
3
|
+
React component library for the LETA design system. Components are styled from
|
|
4
|
+
design tokens at runtime — no CSS-in-JS build step and no stylesheet to import
|
|
5
|
+
per component.
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @leta-io/components @leta-io/design-tokens
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Load the tokens once, at your app's entry point, then use components normally:
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
import '@leta-io/design-tokens/css';
|
|
15
|
+
import '@leta-io/design-tokens/text-styles.css';
|
|
16
|
+
|
|
17
|
+
import { SideBar, TopBar, Table, Badge } from '@leta-io/components';
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Theming
|
|
21
|
+
|
|
22
|
+
The dark palette applies via `data-theme="dark"` on `<html>`. There is no
|
|
23
|
+
`prefers-color-scheme` block, so resolve the user's choice in JS and set the
|
|
24
|
+
attribute. Import `@leta-io/design-tokens/dark-elevation.css` **after** the base
|
|
25
|
+
tokens — dark shadows need a hairline ring to read against a near-black surface,
|
|
26
|
+
and load order decides the winner.
|
|
27
|
+
|
|
28
|
+
## Peer dependencies
|
|
29
|
+
|
|
30
|
+
React 18 or 19. `leaflet` and `lottie-web` are required only if you use the map
|
|
31
|
+
or loading-overlay components.
|
|
32
|
+
|
|
33
|
+
## Notes
|
|
34
|
+
|
|
35
|
+
- The package entry is a barrel. Importing from it pulls in the whole library,
|
|
36
|
+
including Leaflet and Lottie; import the component's own path if bundle size
|
|
37
|
+
matters.
|
|
38
|
+
- Components never hardcode colours or sizes — every value resolves to a token
|
|
39
|
+
from `@leta-io/design-tokens`.
|
|
40
|
+
|
|
41
|
+
The source repository is private; these packages are published for use across
|
|
42
|
+
Leta's products.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|