@optifye/dashboard-core 2.0.1 → 2.0.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 +30 -3
- package/dist/index.js +0 -1
- package/dist/index.mjs +0 -1
- package/global.css +133 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -172,6 +172,23 @@ Or if using Yarn:
|
|
|
172
172
|
yarn add react@^18 react-dom@^18 next@^13 tailwindcss@^3 @supabase/supabase-js@^2 date-fns@^4 date-fns-tz@^3
|
|
173
173
|
```
|
|
174
174
|
|
|
175
|
+
### CSS Setup
|
|
176
|
+
|
|
177
|
+
This package includes global CSS styles that need to be imported in your application. In your Next.js app, import the global CSS file once in your `_app.tsx` or `layout.tsx`:
|
|
178
|
+
|
|
179
|
+
```tsx
|
|
180
|
+
// pages/_app.tsx or app/layout.tsx
|
|
181
|
+
import '@optifye/dashboard-core/global.css';
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
This CSS file includes:
|
|
185
|
+
- Tailwind CSS base styles
|
|
186
|
+
- Custom component styles
|
|
187
|
+
- React Day Picker styles (for calendar components)
|
|
188
|
+
- Range slider styling
|
|
189
|
+
|
|
190
|
+
**Note:** You do NOT need to separately import `react-day-picker/dist/style.css` as these styles are already included in the package's global CSS.
|
|
191
|
+
|
|
175
192
|
## Integration Guide
|
|
176
193
|
|
|
177
194
|
### Basic Setup
|
|
@@ -641,10 +658,20 @@ This package is published to npm as `@optifye/dashboard-core` and follows semant
|
|
|
641
658
|
|
|
642
659
|
### How to trigger a new release
|
|
643
660
|
|
|
644
|
-
1. Create a changeset for your changes: `pnpm changeset`
|
|
661
|
+
1. Create a changeset for your changes: `pnpm changeset` or `npx changeset`
|
|
645
662
|
2. Choose the appropriate version bump (patch, minor, major)
|
|
646
|
-
3.
|
|
647
|
-
4.
|
|
663
|
+
3. Commit the changeset file and push your branch
|
|
664
|
+
4. Run `npx changeset version` to update package.json and CHANGELOG.md
|
|
665
|
+
5. Commit the version changes
|
|
666
|
+
6. Create a PR with **"RELEASE"** (all caps) in the title
|
|
667
|
+
7. When merged, the GitHub Actions workflow will automatically publish the package to npm
|
|
668
|
+
|
|
669
|
+
**Important:** The release workflow is triggered by PR merges, not direct pushes to main. The PR title MUST contain "RELEASE" for the workflow to run.
|
|
670
|
+
|
|
671
|
+
### Example Release PR Title
|
|
672
|
+
```
|
|
673
|
+
RELEASE v2.0.1: Fix Next.js CSS import error
|
|
674
|
+
```
|
|
648
675
|
|
|
649
676
|
### Package Repository
|
|
650
677
|
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,6 @@ var lucideReact = require('lucide-react');
|
|
|
14
14
|
var motionUtils = require('motion-utils');
|
|
15
15
|
var motionDom = require('motion-dom');
|
|
16
16
|
var reactDayPicker = require('react-day-picker');
|
|
17
|
-
require('react-day-picker/dist/style.css');
|
|
18
17
|
var recharts = require('recharts');
|
|
19
18
|
var html2canvas = require('html2canvas');
|
|
20
19
|
var jsPDF = require('jspdf');
|
package/dist/index.mjs
CHANGED
|
@@ -13,7 +13,6 @@ import { ChevronDown, ChevronUp, Check, Camera, Map as Map$1, Video, X, Clock, C
|
|
|
13
13
|
import { noop, warning, invariant, progress, secondsToMilliseconds, millisecondsToSeconds, memo as memo$1 } from 'motion-utils';
|
|
14
14
|
import { getValueTransition, hover, press, isPrimaryPointer, GroupPlaybackControls, setDragLock, supportsLinearEasing, attachTimeline, isGenerator, calcGeneratorDuration, isWaapiSupportedEasing, mapEasingToNativeEasing, maxGeneratorDuration, generateLinearEasing, isBezierDefinition } from 'motion-dom';
|
|
15
15
|
import { DayPicker, useNavigation as useNavigation$1 } from 'react-day-picker';
|
|
16
|
-
import 'react-day-picker/dist/style.css';
|
|
17
16
|
import { ResponsiveContainer, PieChart, Pie, Cell, BarChart as BarChart$1, CartesianGrid, XAxis, YAxis, Tooltip, ReferenceLine, Bar, Legend, LabelList, LineChart as LineChart$1, Line } from 'recharts';
|
|
18
17
|
import html2canvas from 'html2canvas';
|
|
19
18
|
import jsPDF, { jsPDF as jsPDF$1 } from 'jspdf';
|
package/global.css
CHANGED
|
@@ -60,4 +60,137 @@ input[type="range"]:active::-moz-range-thumb {
|
|
|
60
60
|
body {
|
|
61
61
|
@apply bg-background text-foreground;
|
|
62
62
|
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* React Day Picker Styles - v9 */
|
|
66
|
+
/* These styles are included to avoid Next.js CSS import issues */
|
|
67
|
+
.rdp {
|
|
68
|
+
--rdp-background-color: #ffffff;
|
|
69
|
+
--rdp-accent-color: #4f46e5;
|
|
70
|
+
--rdp-accent-background-color: #e0e7ff;
|
|
71
|
+
--rdp-accent-background-color-dark: #4f46e5;
|
|
72
|
+
--rdp-accent-color-dark: #ffffff;
|
|
73
|
+
--rdp-disabled-color: #9ca3af;
|
|
74
|
+
--rdp-disabled-background-color: #f3f4f6;
|
|
75
|
+
--rdp-outline: 2px solid var(--rdp-accent-color);
|
|
76
|
+
--rdp-outline-selected: 2px solid var(--rdp-accent-color-dark);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.rdp-vhidden {
|
|
80
|
+
box-sizing: border-box;
|
|
81
|
+
padding: 0;
|
|
82
|
+
margin: 0;
|
|
83
|
+
background: transparent;
|
|
84
|
+
border: 0;
|
|
85
|
+
-moz-appearance: none;
|
|
86
|
+
-webkit-appearance: none;
|
|
87
|
+
appearance: none;
|
|
88
|
+
position: absolute !important;
|
|
89
|
+
top: 0 !important;
|
|
90
|
+
width: 1px !important;
|
|
91
|
+
height: 1px !important;
|
|
92
|
+
padding: 0 !important;
|
|
93
|
+
margin: -1px !important;
|
|
94
|
+
overflow: hidden !important;
|
|
95
|
+
clip: rect(1px, 1px, 1px, 1px) !important;
|
|
96
|
+
white-space: nowrap !important;
|
|
97
|
+
border: 0 !important;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.rdp-button_reset {
|
|
101
|
+
appearance: none;
|
|
102
|
+
position: relative;
|
|
103
|
+
margin: 0;
|
|
104
|
+
padding: 0;
|
|
105
|
+
cursor: default;
|
|
106
|
+
color: inherit;
|
|
107
|
+
background: none;
|
|
108
|
+
font: inherit;
|
|
109
|
+
border: 0;
|
|
110
|
+
outline: none;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.rdp-button {
|
|
114
|
+
-moz-appearance: none;
|
|
115
|
+
-webkit-appearance: none;
|
|
116
|
+
appearance: none;
|
|
117
|
+
position: relative;
|
|
118
|
+
margin: 0;
|
|
119
|
+
padding: 0;
|
|
120
|
+
cursor: pointer;
|
|
121
|
+
color: inherit;
|
|
122
|
+
background: none;
|
|
123
|
+
font: inherit;
|
|
124
|
+
border: 0;
|
|
125
|
+
outline: none;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.rdp-months {
|
|
129
|
+
display: flex;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.rdp-month {
|
|
133
|
+
margin: 0 1em;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.rdp-month:first-child {
|
|
137
|
+
margin-left: 0;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.rdp-month:last-child {
|
|
141
|
+
margin-right: 0;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.rdp-table {
|
|
145
|
+
margin: 0;
|
|
146
|
+
max-width: calc(var(--rdp-cell-size) * 7);
|
|
147
|
+
border-collapse: collapse;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.rdp-with_weeknumber .rdp-table {
|
|
151
|
+
max-width: calc(var(--rdp-cell-size) * 8);
|
|
152
|
+
border-collapse: collapse;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.rdp-tbody {
|
|
156
|
+
border: 0;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.rdp-row {
|
|
160
|
+
height: 100%;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.rdp-row:nth-child(2) {
|
|
164
|
+
padding-top: 0.25em;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.rdp-head_cell {
|
|
168
|
+
vertical-align: middle;
|
|
169
|
+
text-align: center;
|
|
170
|
+
font-size: 0.75em;
|
|
171
|
+
font-weight: 700;
|
|
172
|
+
text-transform: uppercase;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.rdp-cell {
|
|
176
|
+
width: var(--rdp-cell-size, 2.5rem);
|
|
177
|
+
height: 100%;
|
|
178
|
+
text-align: center;
|
|
179
|
+
padding: 0;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.rdp-day {
|
|
183
|
+
display: flex;
|
|
184
|
+
overflow: hidden;
|
|
185
|
+
align-items: center;
|
|
186
|
+
justify-content: center;
|
|
187
|
+
box-sizing: border-box;
|
|
188
|
+
font-weight: 500;
|
|
189
|
+
border: 2px solid transparent;
|
|
190
|
+
border-radius: 6px;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.rdp-day_today:not(.rdp-day_selected) {
|
|
194
|
+
font-weight: 700;
|
|
195
|
+
color: var(--rdp-accent-color);
|
|
63
196
|
}
|