@febkosq8/arc 0.6.7 → 0.8.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 +9 -3
- package/components/index.css +56 -0
- package/dist/arc.js +880 -280
- package/dist/{button.d.ts → components/button.d.ts} +1 -1
- package/dist/components/grid-loader.d.ts +16 -0
- package/dist/components/index.d.ts +44 -0
- package/dist/components/label-field.d.ts +9 -0
- package/dist/{preview-card.d.ts → components/preview-card.d.ts} +3 -1
- package/dist/components/table.d.ts +30 -0
- package/dist/index.d.ts +2 -41
- package/dist/utilities/index.d.ts +3 -0
- package/package.json +5 -3
- /package/dist/{avatar.d.ts → components/avatar.d.ts} +0 -0
- /package/dist/{button-double-click.d.ts → components/button-double-click.d.ts} +0 -0
- /package/dist/{button-group.d.ts → components/button-group.d.ts} +0 -0
- /package/dist/{button-long-press.d.ts → components/button-long-press.d.ts} +0 -0
- /package/dist/{card.d.ts → components/card.d.ts} +0 -0
- /package/dist/{divider.d.ts → components/divider.d.ts} +0 -0
- /package/dist/{dropdown-multi.d.ts → components/dropdown-multi.d.ts} +0 -0
- /package/dist/{dropdown.d.ts → components/dropdown.d.ts} +0 -0
- /package/dist/{error-text.d.ts → components/error-text.d.ts} +0 -0
- /package/dist/{input-timestamp.d.ts → components/input-timestamp.d.ts} +0 -0
- /package/dist/{input.d.ts → components/input.d.ts} +0 -0
- /package/dist/{menu.d.ts → components/menu.d.ts} +0 -0
- /package/dist/{modal.d.ts → components/modal.d.ts} +0 -0
- /package/dist/{pill-link.d.ts → components/pill-link.d.ts} +0 -0
- /package/dist/{pill.d.ts → components/pill.d.ts} +0 -0
- /package/dist/{select.d.ts → components/select.d.ts} +0 -0
- /package/dist/{switch.d.ts → components/switch.d.ts} +0 -0
- /package/dist/{tag.d.ts → components/tag.d.ts} +0 -0
- /package/dist/{text-link.d.ts → components/text-link.d.ts} +0 -0
- /package/dist/{theme-switcher.d.ts → components/theme-switcher.d.ts} +0 -0
- /package/dist/{typing-animation.d.ts → components/typing-animation.d.ts} +0 -0
- /package/dist/{date-handler.d.ts → utilities/date-handler.d.ts} +0 -0
- /package/dist/{hash-navigation.d.ts → utilities/hash-navigation.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ Arc is a React + Tailwind CSS component library that brings together the UI buil
|
|
|
20
20
|
## Features
|
|
21
21
|
|
|
22
22
|
- **Reusable UI building blocks:** Buttons, inputs, cards, menus, dropdowns, selects, switches, tags, modals, and more.
|
|
23
|
-
- **Interaction-focused components:** Long-press and double-click buttons, preview cards, typing animation, and hash navigation helpers.
|
|
23
|
+
- **Interaction-focused components:** Long-press and double-click buttons, preview cards, typing animation, a configurable grid loader, and hash navigation helpers.
|
|
24
24
|
- **Themed styling:** Built with React and Tailwind CSS, with shared design tokens and light and dark theme styles.
|
|
25
25
|
- **Composable components:** Use the components as parts of your interface without handing over control of your page layout.
|
|
26
26
|
- **Interactive examples:** Browse component examples and states in [Storybook](https://arc.febkosq8.me/).
|
|
@@ -46,10 +46,15 @@ Arc's stylesheet registers its compiled components with Tailwind CSS v4, so thei
|
|
|
46
46
|
Import components from the package:
|
|
47
47
|
|
|
48
48
|
```tsx
|
|
49
|
-
import { Button } from "@febkosq8/arc";
|
|
49
|
+
import { Button, GridLoader } from "@febkosq8/arc";
|
|
50
50
|
|
|
51
51
|
export function Example() {
|
|
52
|
-
return
|
|
52
|
+
return (
|
|
53
|
+
<>
|
|
54
|
+
<Button>Save</Button>
|
|
55
|
+
<GridLoader rows={3} columns={3} label="Saving" />
|
|
56
|
+
</>
|
|
57
|
+
);
|
|
53
58
|
}
|
|
54
59
|
```
|
|
55
60
|
|
|
@@ -59,6 +64,7 @@ export function Example() {
|
|
|
59
64
|
- [npm package](https://www.npmjs.com/package/@febkosq8/arc)
|
|
60
65
|
- [GitHub repository](https://github.com/febkosq8/arc)
|
|
61
66
|
- [Component source](./components/)
|
|
67
|
+
- [Utility source](./utilities/)
|
|
62
68
|
- [Storybook stories](./stories/)
|
|
63
69
|
|
|
64
70
|
Arc is primarily built to meet my own projects' needs. It's shared publicly for anyone who might find the code useful, but it isn't intended as a polished, general-purpose replacement for a larger UI framework.
|
package/components/index.css
CHANGED
|
@@ -29,6 +29,62 @@
|
|
|
29
29
|
mask-composite: exclude;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
@keyframes arc-grid-loader-pulse {
|
|
33
|
+
0%,
|
|
34
|
+
100% {
|
|
35
|
+
transform: scale(0.45);
|
|
36
|
+
opacity: 0.8;
|
|
37
|
+
}
|
|
38
|
+
50% {
|
|
39
|
+
transform: scale(1);
|
|
40
|
+
opacity: 1;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.arc-grid-loader__cell {
|
|
45
|
+
background-color: color-mix(in srgb, var(--color-primary) 85%, var(--color-primary-foreground) 15%);
|
|
46
|
+
color: var(--color-foreground);
|
|
47
|
+
animation: arc-grid-loader-pulse 1.2s ease-in-out infinite;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.arc-grid-loader__cell--diamond {
|
|
51
|
+
clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.arc-grid-loader__cell--star {
|
|
55
|
+
clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 94%, 50% 71%, 21% 94%, 32% 57%, 2% 35%, 39% 35%);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.arc-grid-loader__cell--heart {
|
|
59
|
+
clip-path: polygon(
|
|
60
|
+
50% 94%,
|
|
61
|
+
8% 54%,
|
|
62
|
+
2% 39%,
|
|
63
|
+
5% 24%,
|
|
64
|
+
16% 13%,
|
|
65
|
+
30% 12%,
|
|
66
|
+
42% 21%,
|
|
67
|
+
50% 33%,
|
|
68
|
+
58% 21%,
|
|
69
|
+
70% 12%,
|
|
70
|
+
84% 13%,
|
|
71
|
+
95% 24%,
|
|
72
|
+
98% 39%,
|
|
73
|
+
92% 54%
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.arc-grid-loader__cell--hexagon {
|
|
78
|
+
clip-path: polygon(25% 4%, 75% 4%, 100% 50%, 75% 96%, 25% 96%, 0 50%);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
@media (prefers-reduced-motion: reduce) {
|
|
82
|
+
.arc-grid-loader__cell {
|
|
83
|
+
animation: none;
|
|
84
|
+
opacity: 1;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
32
88
|
.arc-pill:hover,
|
|
33
89
|
.arc-pill-link:hover {
|
|
34
90
|
border-color: var(--color-border);
|