indas-ui 0.1.3 → 0.1.5
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/dist/auth.d.ts +1 -0
- package/dist/auth.js +5 -0
- package/dist/cjs/auth.js +10 -0
- package/dist/cjs/components/chat/ai-messages.js +3 -2
- package/dist/cjs/components/chat/chat.js +4 -3
- package/dist/cjs/components/dashboard/FilterBar.js +31 -8
- package/dist/cjs/components/dashboard/charts/Area.js +6 -4
- package/dist/cjs/components/dashboard/charts/Bar.js +6 -4
- package/dist/cjs/components/dashboard/charts/FlowMap.js +2 -1
- package/dist/cjs/components/dashboard/charts/Funnel.js +2 -1
- package/dist/cjs/components/dashboard/charts/GeoMap.js +2 -1
- package/dist/cjs/components/dashboard/charts/Line.js +5 -3
- package/dist/cjs/components/dashboard/charts/Pareto.js +2 -1
- package/dist/cjs/components/dashboard/charts/Sankey.js +4 -3
- package/dist/cjs/components/dashboard/charts/Sparkline.js +2 -1
- package/dist/cjs/components/dashboard/charts/Treemap.js +2 -1
- package/dist/cjs/components/dashboard/charts/index.js +7 -1
- package/dist/cjs/components/dashboard/kpi/KpiBreakdown.js +3 -2
- package/dist/cjs/components/dashboard/kpi/KpiComparison.js +2 -1
- package/dist/cjs/components/dashboard/kpi/KpiQuickStats.js +2 -1
- package/dist/cjs/components/dashboard/kpi/KpiRating.js +3 -2
- package/dist/cjs/components/dashboard/time-range.js +71 -27
- package/dist/cjs/components/datagrid/columns/ColumnContextMenu.js +2 -1
- package/dist/cjs/components/datagrid/controls/menu/view/CardView.js +2 -1
- package/dist/cjs/components/datagrid/controls/menu/view/ChartView.js +2 -1
- package/dist/cjs/components/datagrid/utils/grid-helpers.js +6 -5
- package/dist/cjs/components/layout/footer.js +2 -1
- package/dist/cjs/components/layout/side-panel.js +4 -1
- package/dist/cjs/components/layout/sidebar.js +17 -2
- package/dist/cjs/components/messaging/messaging-panel-content.js +2 -2
- package/dist/cjs/components/ui/display/stats-card.js +2 -1
- package/dist/cjs/components/ui/navigation/tabs.js +4 -1
- package/dist/cjs/contexts/EmailContext.js +3 -2
- package/dist/cjs/contexts/MessagingContext.js +2 -2
- package/dist/cjs/contexts/NavigationContext.js +17 -2
- package/dist/cjs/contexts/NotificationContext.js +2 -2
- package/dist/cjs/contexts/SessionAdapterContext.js +8 -0
- package/dist/cjs/hooks/useApproval.js +2 -2
- package/dist/cjs/hooks/useBusinessAudit.js +2 -2
- package/dist/cjs/hooks/useDraft.js +2 -2
- package/dist/cjs/lib/api/utility/menu.js +8 -7
- package/dist/cjs/lib/number-format.js +60 -0
- package/dist/cjs/lib/utils.js +4 -3
- package/dist/cjs/providers.js +3 -3
- package/dist/components/auth/index.js +0 -1
- package/dist/components/chat/ai-messages.js +3 -2
- package/dist/components/chat/chat.js +4 -3
- package/dist/components/chat/index.js +0 -1
- package/dist/components/dashboard/FilterBar.d.ts +5 -1
- package/dist/components/dashboard/FilterBar.js +31 -8
- package/dist/components/dashboard/charts/Area.d.ts +5 -1
- package/dist/components/dashboard/charts/Area.js +6 -4
- package/dist/components/dashboard/charts/Bar.d.ts +5 -1
- package/dist/components/dashboard/charts/Bar.js +6 -4
- package/dist/components/dashboard/charts/FlowMap.js +2 -1
- package/dist/components/dashboard/charts/Funnel.js +2 -1
- package/dist/components/dashboard/charts/GeoMap.js +2 -1
- package/dist/components/dashboard/charts/Line.d.ts +5 -1
- package/dist/components/dashboard/charts/Line.js +5 -3
- package/dist/components/dashboard/charts/Pareto.js +2 -1
- package/dist/components/dashboard/charts/Sankey.js +4 -3
- package/dist/components/dashboard/charts/Sparkline.js +2 -1
- package/dist/components/dashboard/charts/Treemap.js +2 -1
- package/dist/components/dashboard/charts/index.d.ts +1 -0
- package/dist/components/dashboard/charts/index.js +2 -1
- package/dist/components/dashboard/index.js +0 -1
- package/dist/components/dashboard/kpi/KpiBreakdown.js +3 -2
- package/dist/components/dashboard/kpi/KpiComparison.js +2 -1
- package/dist/components/dashboard/kpi/KpiQuickStats.js +2 -1
- package/dist/components/dashboard/kpi/KpiRating.js +3 -2
- package/dist/components/dashboard/kpi/index.js +0 -1
- package/dist/components/dashboard/time-range.d.ts +12 -1
- package/dist/components/dashboard/time-range.js +71 -27
- package/dist/components/datagrid/cells/index.js +0 -1
- package/dist/components/datagrid/columns/ColumnContextMenu.js +2 -1
- package/dist/components/datagrid/controls/menu/grouping/index.js +0 -1
- package/dist/components/datagrid/controls/menu/index.js +0 -1
- package/dist/components/datagrid/controls/menu/view/CardView.js +2 -1
- package/dist/components/datagrid/controls/menu/view/ChartView.js +2 -1
- package/dist/components/datagrid/index.js +0 -1
- package/dist/components/datagrid/utils/grid-helpers.d.ts +1 -1
- package/dist/components/datagrid/utils/grid-helpers.js +3 -2
- package/dist/components/forms/date-picker/index.js +0 -1
- package/dist/components/forms/dropdown/index.js +0 -1
- package/dist/components/forms/file-attachment/index.js +0 -1
- package/dist/components/forms/index.js +0 -1
- package/dist/components/forms/remark-input/index.js +0 -1
- package/dist/components/index.js +0 -1
- package/dist/components/layout/footer.js +2 -1
- package/dist/components/layout/index.js +0 -1
- package/dist/components/layout/side-panel.js +4 -1
- package/dist/components/layout/sidebar.js +17 -2
- package/dist/components/master/editable-cells/index.js +0 -1
- package/dist/components/master/index.js +0 -1
- package/dist/components/messaging/messaging-panel-content.js +2 -2
- package/dist/components/modals/index.js +0 -1
- package/dist/components/ui/display/stats-card.js +2 -1
- package/dist/components/ui/feedback/badge.d.ts +1 -1
- package/dist/components/ui/index.js +0 -1
- package/dist/components/ui/navigation/tabs.js +4 -1
- package/dist/contexts/EmailContext.js +3 -2
- package/dist/contexts/MessagingContext.js +2 -2
- package/dist/contexts/NavigationContext.js +17 -2
- package/dist/contexts/NotificationContext.js +2 -2
- package/dist/contexts/SessionAdapterContext.d.ts +5 -0
- package/dist/contexts/SessionAdapterContext.js +7 -0
- package/dist/hooks/index.js +0 -1
- package/dist/hooks/useApproval.js +2 -2
- package/dist/hooks/useBusinessAudit.js +2 -2
- package/dist/hooks/useDraft.js +2 -2
- package/dist/index.js +0 -1
- package/dist/lib/api/activity/audit/index.js +0 -1
- package/dist/lib/api/activity/email/index.js +0 -1
- package/dist/lib/api/activity/index.js +0 -1
- package/dist/lib/api/activity/notifications/index.js +0 -1
- package/dist/lib/api/activity/remarks/index.js +0 -1
- package/dist/lib/api/approval/index.js +0 -1
- package/dist/lib/api/auth/index.js +0 -1
- package/dist/lib/api/core/index.js +0 -1
- package/dist/lib/api/draft/index.js +0 -1
- package/dist/lib/api/enquiry/index.js +0 -1
- package/dist/lib/api/estimation/index.js +0 -1
- package/dist/lib/api/index.js +0 -1
- package/dist/lib/api/master/index.js +0 -1
- package/dist/lib/api/utility/index.js +0 -1
- package/dist/lib/api/utility/menu.d.ts +7 -3
- package/dist/lib/api/utility/menu.js +8 -7
- package/dist/lib/number-format.d.ts +18 -0
- package/dist/lib/number-format.js +54 -0
- package/dist/lib/utils.js +4 -3
- package/dist/providers.d.ts +0 -1
- package/dist/providers.js +2 -2
- package/package.json +23 -8
package/dist/lib/utils.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { clsx } from "clsx";
|
|
3
3
|
import { twMerge } from "tailwind-merge";
|
|
4
|
+
import { getNumberLocale } from './number-format.js';
|
|
4
5
|
export function cn(...inputs) {
|
|
5
6
|
return twMerge(clsx(inputs));
|
|
6
7
|
}
|
|
7
|
-
export function formatCurrency(amount, currency = '
|
|
8
|
-
return new Intl.NumberFormat(
|
|
8
|
+
export function formatCurrency(amount, currency = 'INR') {
|
|
9
|
+
return new Intl.NumberFormat(getNumberLocale(), {
|
|
9
10
|
style: 'currency',
|
|
10
11
|
currency,
|
|
11
12
|
}).format(amount);
|
|
@@ -18,7 +19,7 @@ export function formatDate(date) {
|
|
|
18
19
|
}).format(new Date(date));
|
|
19
20
|
}
|
|
20
21
|
export function formatNumber(num, decimals = 0) {
|
|
21
|
-
return new Intl.NumberFormat(
|
|
22
|
+
return new Intl.NumberFormat(getNumberLocale(), {
|
|
22
23
|
minimumFractionDigits: decimals,
|
|
23
24
|
maximumFractionDigits: decimals,
|
|
24
25
|
}).format(num);
|
package/dist/providers.d.ts
CHANGED
|
@@ -8,7 +8,6 @@ export { PageTitleProvider, usePageTitle } from './contexts/PageTitleContext.js'
|
|
|
8
8
|
export { CurrencyProvider, useCurrency } from './contexts/CurrencyContext.js';
|
|
9
9
|
export { SessionAdapterProvider, useSessionAdapter } from './contexts/SessionAdapterContext.js';
|
|
10
10
|
export type { SessionUser, SessionStatus, SessionAdapterValue, SessionAdapterProviderProps } from './contexts/SessionAdapterContext.js';
|
|
11
|
-
export { AuthSessionProvider } from './components/providers/session-provider.js';
|
|
12
11
|
export { APIProvider, useAPI } from './components/providers/api-provider.js';
|
|
13
12
|
export { QueryProvider } from './components/providers/query-provider.js';
|
|
14
13
|
export { cn } from './lib/utils.js';
|
package/dist/providers.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
'use client';
|
|
2
1
|
// Providers entry: `import { ThemeProvider } from 'indas-ui/providers'`
|
|
3
2
|
export { ThemeProvider, ThemeScript, ThemeContext } from './contexts/ThemeContext.js';
|
|
4
3
|
export { GlobalAlertProvider, useGlobalAlert, useQuickAlert } from './contexts/GlobalAlertContext.js';
|
|
@@ -9,7 +8,8 @@ export { SearchPreferencesProvider, useSearchPreferences } from './contexts/Sear
|
|
|
9
8
|
export { PageTitleProvider, usePageTitle } from './contexts/PageTitleContext.js';
|
|
10
9
|
export { CurrencyProvider, useCurrency } from './contexts/CurrencyContext.js';
|
|
11
10
|
export { SessionAdapterProvider, useSessionAdapter } from './contexts/SessionAdapterContext.js';
|
|
12
|
-
|
|
11
|
+
// AuthSessionProvider is in 'indas-ui/auth': it is the one part built on next-auth, which apps
|
|
12
|
+
// install only when they use it.
|
|
13
13
|
export { APIProvider, useAPI } from './components/providers/api-provider.js';
|
|
14
14
|
export { QueryProvider } from './components/providers/query-provider.js';
|
|
15
15
|
export { cn } from './lib/utils.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "indas-ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "Indas UI — React component library for business apps: Tailwind design tokens, Radix primitives, Lucide icons, DataGrid, dashboards and charts.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Indas Analytics Pvt Ltd",
|
|
@@ -74,6 +74,11 @@
|
|
|
74
74
|
"import": "./dist/providers.js",
|
|
75
75
|
"require": "./dist/cjs/providers.js"
|
|
76
76
|
},
|
|
77
|
+
"./auth": {
|
|
78
|
+
"types": "./dist/auth.d.ts",
|
|
79
|
+
"import": "./dist/auth.js",
|
|
80
|
+
"require": "./dist/cjs/auth.js"
|
|
81
|
+
},
|
|
77
82
|
"./tokens.css": "./dist/styles/tokens.css",
|
|
78
83
|
"./styles/*": "./dist/styles/*",
|
|
79
84
|
"./package.json": "./package.json"
|
|
@@ -92,7 +97,9 @@
|
|
|
92
97
|
},
|
|
93
98
|
"peerDependencies": {
|
|
94
99
|
"react": ">=18.0.0",
|
|
95
|
-
"react-dom": ">=18.0.0"
|
|
100
|
+
"react-dom": ">=18.0.0",
|
|
101
|
+
"lucide-react": ">=0.562.0 <2",
|
|
102
|
+
"next-auth": "^4.24.7"
|
|
96
103
|
},
|
|
97
104
|
"dependencies": {
|
|
98
105
|
"@dnd-kit/core": "^6.3.1",
|
|
@@ -121,11 +128,9 @@
|
|
|
121
128
|
"exceljs": "^4.4.0",
|
|
122
129
|
"file-saver": "^2.0.5",
|
|
123
130
|
"framer-motion": "^12.23.12",
|
|
124
|
-
"jspdf": "^
|
|
125
|
-
"jspdf-autotable": "^5.0.
|
|
131
|
+
"jspdf": "^4.2.1",
|
|
132
|
+
"jspdf-autotable": "^5.0.8",
|
|
126
133
|
"ldrs": "^1.1.9",
|
|
127
|
-
"lucide-react": "^0.562.0",
|
|
128
|
-
"next-auth": "^4.24.7",
|
|
129
134
|
"papaparse": "^5.5.3",
|
|
130
135
|
"react-hook-form": "^7.76.1",
|
|
131
136
|
"react-image-crop": "^11.0.10",
|
|
@@ -133,13 +138,15 @@
|
|
|
133
138
|
"rehype-highlight": "^7.0.2",
|
|
134
139
|
"rehype-raw": "^7.0.0",
|
|
135
140
|
"remark-gfm": "^4.0.1",
|
|
136
|
-
"svg2pdf.js": "^2.
|
|
141
|
+
"svg2pdf.js": "^2.8.1",
|
|
137
142
|
"tailwind-merge": "^3.3.1"
|
|
138
143
|
},
|
|
139
144
|
"devDependencies": {
|
|
140
145
|
"@types/react": "^18.3.12",
|
|
141
146
|
"@types/react-dom": "^18.3.1",
|
|
147
|
+
"lucide-react": "^0.562.0",
|
|
142
148
|
"next": "^16.2.1",
|
|
149
|
+
"next-auth": "^4.24.7",
|
|
143
150
|
"tsc-alias": "^1.9.4",
|
|
144
151
|
"typescript": "^5.7.2"
|
|
145
152
|
},
|
|
@@ -181,7 +188,15 @@
|
|
|
181
188
|
],
|
|
182
189
|
"providers": [
|
|
183
190
|
"./dist/providers.d.ts"
|
|
191
|
+
],
|
|
192
|
+
"auth": [
|
|
193
|
+
"./dist/auth.d.ts"
|
|
184
194
|
]
|
|
185
195
|
}
|
|
196
|
+
},
|
|
197
|
+
"peerDependenciesMeta": {
|
|
198
|
+
"next-auth": {
|
|
199
|
+
"optional": true
|
|
200
|
+
}
|
|
186
201
|
}
|
|
187
|
-
}
|
|
202
|
+
}
|