commerce-toolkit 0.0.2 → 0.0.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 +14 -14
- package/dist/styles.css +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Commerce
|
|
1
|
+
# Commerce Toolkit
|
|
2
2
|
|
|
3
3
|
A collection of modern, accessible commerce UI components built with React, TypeScript, and Tailwind CSS.
|
|
4
4
|
|
|
@@ -10,11 +10,11 @@ A collection of modern, accessible commerce UI components built with React, Type
|
|
|
10
10
|
## Installation
|
|
11
11
|
|
|
12
12
|
```bash
|
|
13
|
-
npm install commerce-
|
|
13
|
+
npm install commerce-toolkit
|
|
14
14
|
# or
|
|
15
|
-
yarn add commerce-
|
|
15
|
+
yarn add commerce-toolkit
|
|
16
16
|
# or
|
|
17
|
-
pnpm add commerce-
|
|
17
|
+
pnpm add commerce-toolkit
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
Install the optional Tailwind plugins (recommended):
|
|
@@ -27,16 +27,16 @@ npm install -D @tailwindcss/container-queries @tailwindcss/typography tailwindcs
|
|
|
27
27
|
|
|
28
28
|
### 1. Configure Tailwind
|
|
29
29
|
|
|
30
|
-
Add the Commerce
|
|
30
|
+
Add the Commerce Toolkit preset and content path to your `tailwind.config.js`:
|
|
31
31
|
|
|
32
32
|
```js
|
|
33
|
-
import
|
|
33
|
+
import commerceToolkit from 'commerce-toolkit/tailwind';
|
|
34
34
|
|
|
35
35
|
export default {
|
|
36
|
-
presets: [
|
|
36
|
+
presets: [commerceToolkit],
|
|
37
37
|
content: [
|
|
38
38
|
'./src/**/*.{js,ts,jsx,tsx}',
|
|
39
|
-
'./node_modules/commerce-
|
|
39
|
+
'./node_modules/commerce-toolkit/dist/**/*.{js,mjs}', // Add this line
|
|
40
40
|
],
|
|
41
41
|
// ... your other config
|
|
42
42
|
};
|
|
@@ -48,14 +48,14 @@ Import the CSS variables in your JavaScript/TypeScript (recommended):
|
|
|
48
48
|
|
|
49
49
|
```tsx
|
|
50
50
|
// app/layout.tsx (Next.js) or main.tsx (Vite/React)
|
|
51
|
-
import 'commerce-
|
|
51
|
+
import 'commerce-toolkit/styles';
|
|
52
52
|
```
|
|
53
53
|
|
|
54
54
|
Or if importing in CSS, it must come **before** the Tailwind directives:
|
|
55
55
|
|
|
56
56
|
```css
|
|
57
57
|
/* app.css or globals.css */
|
|
58
|
-
@import 'commerce-
|
|
58
|
+
@import 'commerce-toolkit/styles';
|
|
59
59
|
|
|
60
60
|
@tailwind base;
|
|
61
61
|
@tailwind components;
|
|
@@ -65,7 +65,7 @@ Or if importing in CSS, it must come **before** the Tailwind directives:
|
|
|
65
65
|
### 3. Use Components
|
|
66
66
|
|
|
67
67
|
```tsx
|
|
68
|
-
import { Button } from 'commerce-
|
|
68
|
+
import { Button } from 'commerce-toolkit';
|
|
69
69
|
|
|
70
70
|
function App() {
|
|
71
71
|
return (
|
|
@@ -81,7 +81,7 @@ function App() {
|
|
|
81
81
|
|
|
82
82
|
## Using Tailwind Utilities
|
|
83
83
|
|
|
84
|
-
Once configured, you can use all the custom Tailwind utilities from Commerce
|
|
84
|
+
Once configured, you can use all the custom Tailwind utilities from Commerce Toolkit:
|
|
85
85
|
|
|
86
86
|
```tsx
|
|
87
87
|
<div className="bg-primary text-background">
|
|
@@ -106,7 +106,7 @@ Override CSS variables to customize the design system:
|
|
|
106
106
|
|
|
107
107
|
```css
|
|
108
108
|
/* app/globals.css */
|
|
109
|
-
@import 'commerce-
|
|
109
|
+
@import 'commerce-toolkit/styles';
|
|
110
110
|
|
|
111
111
|
@tailwind base;
|
|
112
112
|
@tailwind components;
|
|
@@ -124,7 +124,7 @@ Override CSS variables to customize the design system:
|
|
|
124
124
|
|
|
125
125
|
```tsx
|
|
126
126
|
// app/layout.tsx
|
|
127
|
-
import 'commerce-
|
|
127
|
+
import 'commerce-toolkit/styles';
|
|
128
128
|
```
|
|
129
129
|
|
|
130
130
|
```css
|
package/dist/styles.css
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "commerce-toolkit",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "A collection of modern, accessible commerce UI components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"license": "MIT",
|
|
37
37
|
"repository": {
|
|
38
38
|
"type": "git",
|
|
39
|
-
"url": "git+https://github.com/makeswift/commerce-
|
|
39
|
+
"url": "git+https://github.com/makeswift/commerce-toolkit.git"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@radix-ui/react-accordion": "^1.2.12",
|