basecoat-css 0.2.1 → 0.2.3
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 +30 -21
- package/dist/basecoat.cdn.css +15 -14
- package/dist/basecoat.cdn.min.css +1 -1
- package/dist/basecoat.css +8 -4
- package/dist/js/all.js +197 -101
- package/dist/js/all.min.js +1 -1
- package/dist/js/dropdown-menu.js +50 -29
- package/dist/js/dropdown-menu.min.js +1 -1
- package/dist/js/popover.js +22 -7
- package/dist/js/popover.min.js +1 -1
- package/dist/js/select.js +95 -41
- package/dist/js/select.min.js +1 -1
- package/dist/js/sidebar.js +16 -10
- package/dist/js/sidebar.min.js +1 -1
- package/dist/js/tabs.js +6 -6
- package/dist/js/toast.js +8 -8
- package/dist/js/toast.min.js +1 -1
- package/package.json +1 -1
- package/dist/js/dark-mode.js +0 -10
- package/dist/js/dark-mode.min.js +0 -1
package/README.md
CHANGED
|
@@ -8,42 +8,51 @@ Your project must have [Tailwind CSS](https://tailwindcss.com/docs/installation)
|
|
|
8
8
|
|
|
9
9
|
## Installation
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Install with any package manager:
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
|
-
#
|
|
15
|
-
|
|
14
|
+
npm install basecoat-css # or pnpm add / yarn add / bun add
|
|
15
|
+
```
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
yarn add basecoat-css
|
|
17
|
+
## Usage
|
|
19
18
|
|
|
20
|
-
|
|
21
|
-
pnpm add basecoat-css
|
|
19
|
+
Add it just after Tailwind in your stylesheet:
|
|
22
20
|
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
```css
|
|
22
|
+
@import "tailwindcss";
|
|
23
|
+
@import "basecoat-css";
|
|
25
24
|
```
|
|
26
25
|
|
|
27
|
-
|
|
26
|
+
That's it, you can use any Basecoat class (`btn`, `card`, `input`, etc) in your markup.
|
|
28
27
|
|
|
29
|
-
|
|
28
|
+
### (Optional) JavaScript files
|
|
30
29
|
|
|
31
|
-
|
|
30
|
+
Some interactive components (Dropdown Menu, Popover, Select, Sidebar, Tabs, Toast) need some JavaScript.
|
|
32
31
|
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
With a build tool (ESM):
|
|
33
|
+
|
|
34
|
+
```js
|
|
35
|
+
import 'basecoat-css/all';
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Or cherry-pick the components you need:
|
|
35
39
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
40
|
+
```js
|
|
41
|
+
import 'basecoat-css/tabs';
|
|
42
|
+
import 'basecoat-css/popover';
|
|
43
|
+
```
|
|
39
44
|
|
|
40
|
-
|
|
45
|
+
Without a build tool, copy the files from `node_modules`:
|
|
41
46
|
|
|
42
|
-
|
|
43
|
-
|
|
47
|
+
```bash
|
|
48
|
+
npx copyfiles -u 1 "node_modules/basecoat-css/dist/js/**/*" public/js/basecoat
|
|
44
49
|
```
|
|
45
50
|
|
|
46
|
-
|
|
51
|
+
Then reference what you need, e.g.
|
|
52
|
+
|
|
53
|
+
```html
|
|
54
|
+
<script src="/js/basecoat/tabs.min.js" defer></script>
|
|
55
|
+
```
|
|
47
56
|
|
|
48
57
|
## Documentation
|
|
49
58
|
|
package/dist/basecoat.cdn.css
CHANGED
|
@@ -2502,7 +2502,6 @@
|
|
|
2502
2502
|
.dropdown-menu {
|
|
2503
2503
|
position: relative;
|
|
2504
2504
|
display: inline-flex;
|
|
2505
|
-
padding: calc(var(--spacing) * 1);
|
|
2506
2505
|
[data-popover] {
|
|
2507
2506
|
padding: calc(var(--spacing) * 1);
|
|
2508
2507
|
min-width: anchor-size(width);
|
|
@@ -2554,28 +2553,30 @@
|
|
|
2554
2553
|
& svg {
|
|
2555
2554
|
color: var(--color-muted-foreground);
|
|
2556
2555
|
}
|
|
2557
|
-
&:
|
|
2558
|
-
|
|
2556
|
+
&:not([aria-disabled='true']) {
|
|
2557
|
+
&:hover {
|
|
2558
|
+
@media (hover: hover) {
|
|
2559
|
+
background-color: var(--color-accent);
|
|
2560
|
+
}
|
|
2561
|
+
}
|
|
2562
|
+
&:hover {
|
|
2563
|
+
@media (hover: hover) {
|
|
2564
|
+
color: var(--color-accent-foreground);
|
|
2565
|
+
}
|
|
2566
|
+
}
|
|
2567
|
+
&:focus-visible {
|
|
2559
2568
|
background-color: var(--color-accent);
|
|
2560
2569
|
}
|
|
2561
|
-
|
|
2562
|
-
&:hover {
|
|
2563
|
-
@media (hover: hover) {
|
|
2570
|
+
&:focus-visible {
|
|
2564
2571
|
color: var(--color-accent-foreground);
|
|
2565
2572
|
}
|
|
2566
2573
|
}
|
|
2567
|
-
&:focus-visible {
|
|
2568
|
-
background-color: var(--color-accent);
|
|
2569
|
-
}
|
|
2570
|
-
&:focus-visible {
|
|
2571
|
-
color: var(--color-accent-foreground);
|
|
2572
|
-
}
|
|
2573
2574
|
&.active {
|
|
2574
2575
|
background-color: var(--color-accent);
|
|
2575
2576
|
color: var(--color-accent-foreground);
|
|
2576
2577
|
}
|
|
2577
2578
|
}
|
|
2578
|
-
[role='menu'] [role=
|
|
2579
|
+
[role='menu'] [role='heading'] {
|
|
2579
2580
|
display: flex;
|
|
2580
2581
|
padding-inline: calc(var(--spacing) * 2);
|
|
2581
2582
|
padding-block: calc(var(--spacing) * 1.5);
|
|
@@ -3167,7 +3168,7 @@
|
|
|
3167
3168
|
background-repeat: no-repeat;
|
|
3168
3169
|
}
|
|
3169
3170
|
}
|
|
3170
|
-
[role='listbox'] [role=
|
|
3171
|
+
[role='listbox'] [role='heading'] {
|
|
3171
3172
|
display: flex;
|
|
3172
3173
|
padding-inline: calc(var(--spacing) * 2);
|
|
3173
3174
|
padding-block: calc(var(--spacing) * 1.5);
|