@admin-layout/tailwind-ui 12.0.16-alpha.3 → 12.0.16-alpha.31
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 +20 -0
- package/lib/components/ErrorHandlers/ApplicationErrorHandler.d.ts.map +1 -1
- package/lib/components/ErrorHandlers/ApplicationErrorHandler.js +5 -9
- package/lib/components/ErrorHandlers/ApplicationErrorHandler.js.map +1 -1
- package/lib/components/PageContainer/PageContainer.d.ts.map +1 -1
- package/lib/components/PageContainer/PageContainer.js +9 -4
- package/lib/components/PageContainer/PageContainer.js.map +1 -1
- package/lib/components/RJSFPreview/PreviewAsyncDropdown.d.ts +11 -0
- package/lib/components/RJSFPreview/PreviewAsyncDropdown.d.ts.map +1 -0
- package/lib/components/RJSFPreview/PreviewCheckboxWidget.d.ts +8 -0
- package/lib/components/RJSFPreview/PreviewCheckboxWidget.d.ts.map +1 -0
- package/lib/components/RJSFPreview/PreviewCustomFieldTemplate.d.ts +4 -0
- package/lib/components/RJSFPreview/PreviewCustomFieldTemplate.d.ts.map +1 -0
- package/lib/components/RJSFPreview/PreviewDateWidget.d.ts +8 -0
- package/lib/components/RJSFPreview/PreviewDateWidget.d.ts.map +1 -0
- package/lib/components/RJSFPreview/PreviewDialog.d.ts +9 -0
- package/lib/components/RJSFPreview/PreviewDialog.d.ts.map +1 -0
- package/lib/components/RJSFPreview/PreviewDropdownWidget.d.ts +8 -0
- package/lib/components/RJSFPreview/PreviewDropdownWidget.d.ts.map +1 -0
- package/lib/components/RJSFPreview/PreviewFieldTemplate.d.ts +4 -0
- package/lib/components/RJSFPreview/PreviewFieldTemplate.d.ts.map +1 -0
- package/lib/components/RJSFPreview/PreviewFileUploadWidget.d.ts +4 -0
- package/lib/components/RJSFPreview/PreviewFileUploadWidget.d.ts.map +1 -0
- package/lib/components/RJSFPreview/PreviewFormRenderer.d.ts +16 -0
- package/lib/components/RJSFPreview/PreviewFormRenderer.d.ts.map +1 -0
- package/lib/components/RJSFPreview/PreviewImageUploadWidget.d.ts +4 -0
- package/lib/components/RJSFPreview/PreviewImageUploadWidget.d.ts.map +1 -0
- package/lib/components/RJSFPreview/PreviewInputWidget.d.ts +4 -0
- package/lib/components/RJSFPreview/PreviewInputWidget.d.ts.map +1 -0
- package/lib/components/RJSFPreview/PreviewObjectFieldTemplate.d.ts +4 -0
- package/lib/components/RJSFPreview/PreviewObjectFieldTemplate.d.ts.map +1 -0
- package/lib/components/RJSFPreview/PreviewRadioWidget.d.ts +8 -0
- package/lib/components/RJSFPreview/PreviewRadioWidget.d.ts.map +1 -0
- package/lib/components/RJSFPreview/PreviewStepper.d.ts +9 -0
- package/lib/components/RJSFPreview/PreviewStepper.d.ts.map +1 -0
- package/lib/components/RJSFPreview/PreviewSwitchWidget.d.ts +9 -0
- package/lib/components/RJSFPreview/PreviewSwitchWidget.d.ts.map +1 -0
- package/lib/components/RJSFPreview/PreviewTab.d.ts +17 -0
- package/lib/components/RJSFPreview/PreviewTab.d.ts.map +1 -0
- package/lib/components/RJSFPreview/PreviewTextareaWidget.d.ts +8 -0
- package/lib/components/RJSFPreview/PreviewTextareaWidget.d.ts.map +1 -0
- package/lib/components/RJSFPreview/generateSchemaWithInputs.d.ts +9 -0
- package/lib/components/RJSFPreview/generateSchemaWithInputs.d.ts.map +1 -0
- package/lib/components/RJSFPreview/index.d.ts +2 -0
- package/lib/components/RJSFPreview/index.d.ts.map +1 -0
- package/lib/components/ReactTable/Table.d.ts.map +1 -1
- package/lib/components/Search/SearchInput.d.ts +11 -0
- package/lib/components/Search/SearchInput.d.ts.map +1 -0
- package/lib/components/Search/SearchInput.js +33 -0
- package/lib/components/Search/SearchInput.js.map +1 -0
- package/lib/components/Search/index.d.ts +2 -0
- package/lib/components/Search/index.d.ts.map +1 -0
- package/lib/components/Select/Select.d.ts +35 -0
- package/lib/components/Select/Select.d.ts.map +1 -0
- package/lib/components/Select/Select.js +256 -0
- package/lib/components/Select/Select.js.map +1 -0
- package/lib/components/Select/index.d.ts +2 -0
- package/lib/components/Select/index.d.ts.map +1 -0
- package/lib/components/index.d.ts +2 -0
- package/lib/components/index.d.ts.map +1 -1
- package/lib/hooks/index.d.ts +4 -0
- package/lib/hooks/index.d.ts.map +1 -0
- package/lib/hooks/useTheme.js +1 -1
- package/lib/hooks/useWindowSize.d.ts +5 -0
- package/lib/hooks/useWindowSize.d.ts.map +1 -0
- package/lib/hooks/useWindowSize.js +20 -0
- package/lib/hooks/useWindowSize.js.map +1 -0
- package/lib/index.d.ts +1 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/shardui/badge.d.ts +1 -1
- package/lib/shardui/button.d.ts +2 -2
- package/lib/shardui/chart.d.ts +1 -1
- package/lib/shardui/command.d.ts +7 -7
- package/lib/shardui/index.js +1 -0
- package/lib/shardui/index.js.map +1 -0
- package/lib/shardui/resizable.d.ts +1 -1
- package/lib/shardui/sheet.d.ts +1 -1
- package/lib/shardui/sonner.js +3 -3
- package/lib/shardui/sonner.js.map +1 -1
- package/package.json +52 -4
package/README.md
CHANGED
|
@@ -18,6 +18,26 @@ We use Tailwind utility classes directly in our components. This approach provid
|
|
|
18
18
|
3. Ensures consistent styling across the application
|
|
19
19
|
4. Reduces overall bundle size by removing unnecessary CSS
|
|
20
20
|
|
|
21
|
+
## How to Use
|
|
22
|
+
|
|
23
|
+
### Importing Components from Admin Layout
|
|
24
|
+
|
|
25
|
+
**✅ Correct Import Method:**
|
|
26
|
+
|
|
27
|
+
```jsx
|
|
28
|
+
import { Button } from '@admin-layout/tailwind-ui/shardui/button.js';
|
|
29
|
+
import { Input } from '@admin-layout/tailwind-ui/shardui/input.js';
|
|
30
|
+
import { Card } from '@admin-layout/tailwind-ui/shardui/card.js';
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
**❌ Avoid Importing from lib:**
|
|
34
|
+
|
|
35
|
+
```jsx
|
|
36
|
+
// DON'T DO THIS
|
|
37
|
+
import { Button } from '@admin-layout/tailwind-ui/lib/components/Button';
|
|
38
|
+
import { Button } from '@admin-layout/tailwind-ui';
|
|
39
|
+
```
|
|
40
|
+
|
|
21
41
|
## Tailwind CSS Implementation Guidelines
|
|
22
42
|
|
|
23
43
|
Follow these guidelines when implementing components with Tailwind:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApplicationErrorHandler.d.ts","sourceRoot":"","sources":["../../../src/components/ErrorHandlers/ApplicationErrorHandler.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ApplicationErrorHandler.d.ts","sourceRoot":"","sources":["../../../src/components/ErrorHandlers/ApplicationErrorHandler.tsx"],"names":[],"mappings":"AAmBA,eAAO,MAAM,uBAAuB,GAAI,UAAK,4CAG5C,CAAC"}
|
|
@@ -1,19 +1,15 @@
|
|
|
1
|
-
import {jsx}from'react/jsx-runtime';import {ApplicationErrorHandlerCommon}from'@admin-layout/client';import*as React from'react';import {logger}from'@cdm-logger/client';import {
|
|
1
|
+
import {jsx}from'react/jsx-runtime';import {ApplicationErrorHandlerCommon}from'@admin-layout/client';import*as React from'react';import {logger}from'@cdm-logger/client';import'../ThemeProvider/ThemeProvider.js';import {toast}from'sonner';const FallbackComponent = ({
|
|
2
2
|
error
|
|
3
3
|
}) => {
|
|
4
|
-
const toast = useToast();
|
|
5
4
|
React.useLayoutEffect(() => {
|
|
6
5
|
if (process.env.NODE_ENV !== 'production') {
|
|
7
|
-
toast({
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
status: 'error',
|
|
11
|
-
duration: 9000,
|
|
12
|
-
isClosable: true
|
|
6
|
+
toast.error('Server Errors. Please try again later...', {
|
|
7
|
+
description: error?.payload.message,
|
|
8
|
+
duration: 9000
|
|
13
9
|
});
|
|
14
10
|
}
|
|
15
11
|
logger.error('Application Backend Error', error?.payload.message);
|
|
16
|
-
}, [
|
|
12
|
+
}, []);
|
|
17
13
|
return null;
|
|
18
14
|
};
|
|
19
15
|
const ApplicationErrorHandler = props => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApplicationErrorHandler.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ApplicationErrorHandler.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageContainer.d.ts","sourceRoot":"","sources":["../../../src/components/PageContainer/PageContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAGlD,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,
|
|
1
|
+
{"version":3,"file":"PageContainer.d.ts","sourceRoot":"","sources":["../../../src/components/PageContainer/PageContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAGlD,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA+DtD,CAAC"}
|
|
@@ -30,9 +30,9 @@ import {jsx,jsxs}from'react/jsx-runtime';import {useState,useEffect}from'react';
|
|
|
30
30
|
return jsx(Spin, {});
|
|
31
31
|
}
|
|
32
32
|
return jsxs("div", {
|
|
33
|
-
className: "
|
|
33
|
+
className: "themed-card p-4",
|
|
34
34
|
children: [tabList && tabList.length > 0 && jsx("div", {
|
|
35
|
-
className: "
|
|
35
|
+
className: "border-b border-border mb-4",
|
|
36
36
|
children: jsxs("div", {
|
|
37
37
|
className: "flex items-center justify-between",
|
|
38
38
|
children: [jsx("ul", {
|
|
@@ -41,16 +41,21 @@ import {jsx,jsxs}from'react/jsx-runtime';import {useState,useEffect}from'react';
|
|
|
41
41
|
className: "mr-2",
|
|
42
42
|
children: jsx("button", {
|
|
43
43
|
onClick: () => handleTabChange(tab.path),
|
|
44
|
-
className: `
|
|
44
|
+
className: `
|
|
45
|
+
inline-block p-4 transition-colors
|
|
46
|
+
${activeTabKey === tab.path ? 'text-primary border-b-2 border-primary' : 'text-muted-foreground hover:text-foreground border-b-2 border-transparent hover:border-accent'}
|
|
47
|
+
focus-themed
|
|
48
|
+
`,
|
|
45
49
|
children: tab.tab
|
|
46
50
|
})
|
|
47
51
|
}, tab.path))
|
|
48
52
|
}), tabBarExtraContent && jsx("div", {
|
|
53
|
+
className: "text-muted-foreground",
|
|
49
54
|
children: tabBarExtraContent
|
|
50
55
|
})]
|
|
51
56
|
})
|
|
52
57
|
}), jsx("div", {
|
|
53
|
-
className: "page-content",
|
|
58
|
+
className: "page-content text-foreground",
|
|
54
59
|
children: props.children
|
|
55
60
|
})]
|
|
56
61
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageContainer.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PageContainer.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { WidgetProps } from '@rjsf/utils';
|
|
2
|
+
export interface SelectWidgetProps extends WidgetProps {
|
|
3
|
+
multiple?: boolean;
|
|
4
|
+
widgetContext?: {
|
|
5
|
+
fetcher?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
|
|
6
|
+
formData: Record<string, any>;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
declare const PreviewAsyncDropdown: (props: SelectWidgetProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default PreviewAsyncDropdown;
|
|
11
|
+
//# sourceMappingURL=PreviewAsyncDropdown.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PreviewAsyncDropdown.d.ts","sourceRoot":"","sources":["../../../src/components/RJSFPreview/PreviewAsyncDropdown.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,MAAM,WAAW,iBAAkB,SAAQ,WAAW;IAClD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE;QACZ,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,GAAG,GAAG,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;QAC9E,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;KACjC,CAAC;CACL;AAOD,QAAA,MAAM,oBAAoB,GAAI,OAAO,iBAAiB,4CA6GrD,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { WidgetProps } from '@rjsf/utils';
|
|
3
|
+
interface PreviewCheckboxWidgetProps extends WidgetProps {
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const PreviewCheckboxWidget: React.FC<PreviewCheckboxWidgetProps>;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=PreviewCheckboxWidget.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PreviewCheckboxWidget.d.ts","sourceRoot":"","sources":["../../../src/components/RJSFPreview/PreviewCheckboxWidget.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,UAAU,0BAA2B,SAAQ,WAAW;IACpD,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,0BAA0B,CAwHtE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PreviewCustomFieldTemplate.d.ts","sourceRoot":"","sources":["../../../src/components/RJSFPreview/PreviewCustomFieldTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAMjD,eAAO,MAAM,0BAA0B,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAoPnE,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { WidgetProps } from '@rjsf/utils';
|
|
3
|
+
interface PreviewDateWidgetProps extends WidgetProps {
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const PreviewDateWidget: React.FC<PreviewDateWidgetProps>;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=PreviewDateWidget.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PreviewDateWidget.d.ts","sourceRoot":"","sources":["../../../src/components/RJSFPreview/PreviewDateWidget.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAiB1C,UAAU,sBAAuB,SAAQ,WAAW;IAChD,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CA6K9D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PreviewDialog.d.ts","sourceRoot":"","sources":["../../../src/components/RJSFPreview/PreviewDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,UAAU,kBAAkB;IACxB,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC7B;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAmBtD,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { WidgetProps } from '@rjsf/utils';
|
|
3
|
+
interface PreviewDropdownWidgetProps extends WidgetProps {
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const PreviewDropdownWidget: React.FC<PreviewDropdownWidgetProps>;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=PreviewDropdownWidget.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PreviewDropdownWidget.d.ts","sourceRoot":"","sources":["../../../src/components/RJSFPreview/PreviewDropdownWidget.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,UAAU,0BAA2B,SAAQ,WAAW;IACpD,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,0BAA0B,CAqEtE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PreviewFieldTemplate.d.ts","sourceRoot":"","sources":["../../../src/components/RJSFPreview/PreviewFieldTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEjD,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAgE7D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PreviewFileUploadWidget.d.ts","sourceRoot":"","sources":["../../../src/components/RJSFPreview/PreviewFileUploadWidget.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAErD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAI1C,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAmHzD,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface PreviewFormRendererProps {
|
|
3
|
+
schema: any;
|
|
4
|
+
uiSchema: any;
|
|
5
|
+
stepName?: string;
|
|
6
|
+
onNext?: (data: Record<string, any>) => void;
|
|
7
|
+
onPrevious?: () => void;
|
|
8
|
+
initialData?: Record<string, any>;
|
|
9
|
+
isLoading?: boolean;
|
|
10
|
+
isLastStep?: boolean;
|
|
11
|
+
customValidateFunction?: (formData: any, errors: any, uiSchema: any) => any;
|
|
12
|
+
validator?: any;
|
|
13
|
+
}
|
|
14
|
+
export declare const PreviewFormRenderer: React.FC<PreviewFormRendererProps>;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=PreviewFormRenderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PreviewFormRenderer.d.ts","sourceRoot":"","sources":["../../../src/components/RJSFPreview/PreviewFormRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAiBxC,UAAU,wBAAwB;IAC9B,MAAM,EAAE,GAAG,CAAC;IACZ,QAAQ,EAAE,GAAG,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,CAAC;IAC7C,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAClC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,sBAAsB,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,KAAK,GAAG,CAAC;IAC5E,SAAS,CAAC,EAAE,GAAG,CAAC;CACnB;AAED,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CA2OlE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PreviewImageUploadWidget.d.ts","sourceRoot":"","sources":["../../../src/components/RJSFPreview/PreviewImageUploadWidget.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAErD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG1C,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CA4G1D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PreviewInputWidget.d.ts","sourceRoot":"","sources":["../../../src/components/RJSFPreview/PreviewInputWidget.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CA6EpD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PreviewObjectFieldTemplate.d.ts","sourceRoot":"","sources":["../../../src/components/RJSFPreview/PreviewObjectFieldTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAEvD,eAAO,MAAM,0BAA0B,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAgCzE,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { WidgetProps } from '@rjsf/utils';
|
|
3
|
+
interface PreviewRadioWidgetProps extends WidgetProps {
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const PreviewRadioWidget: React.FC<PreviewRadioWidgetProps>;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=PreviewRadioWidget.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PreviewRadioWidget.d.ts","sourceRoot":"","sources":["../../../src/components/RJSFPreview/PreviewRadioWidget.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,UAAU,uBAAwB,SAAQ,WAAW;IACjD,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAwEhE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PreviewStepper.d.ts","sourceRoot":"","sources":["../../../src/components/RJSFPreview/PreviewStepper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,UAAU,mBAAmB;IACzB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,GAAG,CAAC;CACf;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAmDxD,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { WidgetProps } from '@rjsf/utils';
|
|
3
|
+
interface PreviewSwitchWidgetProps extends WidgetProps {
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
showTitle?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const PreviewSwitchWidget: React.FC<PreviewSwitchWidgetProps>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=PreviewSwitchWidget.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PreviewSwitchWidget.d.ts","sourceRoot":"","sources":["../../../src/components/RJSFPreview/PreviewSwitchWidget.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,UAAU,wBAAyB,SAAQ,WAAW;IAClD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAoFlE,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface PreviewTabProps {
|
|
3
|
+
formSchema: any;
|
|
4
|
+
uiSchema: any;
|
|
5
|
+
customValidateFunction: (formData: any, errors: any, uiSchema: any) => any;
|
|
6
|
+
validator: any;
|
|
7
|
+
handleSubmit: ({ formData, generatedSchema, amenitiesFragmentSchema, }: {
|
|
8
|
+
formData: any;
|
|
9
|
+
generatedSchema?: any;
|
|
10
|
+
amenitiesFragmentSchema?: any;
|
|
11
|
+
}) => void;
|
|
12
|
+
isConfigurationSchema?: boolean;
|
|
13
|
+
extensionData?: any;
|
|
14
|
+
}
|
|
15
|
+
export declare const PreviewTab: React.FC<PreviewTabProps>;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=PreviewTab.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PreviewTab.d.ts","sourceRoot":"","sources":["../../../src/components/RJSFPreview/PreviewTab.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAMjD,UAAU,eAAe;IACrB,UAAU,EAAE,GAAG,CAAC;IAChB,QAAQ,EAAE,GAAG,CAAC;IACd,sBAAsB,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,KAAK,GAAG,CAAC;IAC3E,SAAS,EAAE,GAAG,CAAC;IACf,YAAY,EAAE,CAAC,EACX,QAAQ,EACR,eAAe,EACf,uBAAuB,GAC1B,EAAE;QACC,QAAQ,EAAE,GAAG,CAAC;QACd,eAAe,CAAC,EAAE,GAAG,CAAC;QACtB,uBAAuB,CAAC,EAAE,GAAG,CAAC;KACjC,KAAK,IAAI,CAAC;IACX,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,aAAa,CAAC,EAAE,GAAG,CAAC;CACvB;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA4XhD,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { WidgetProps } from '@rjsf/utils';
|
|
3
|
+
interface PreviewTextareaWidgetProps extends WidgetProps {
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const PreviewTextareaWidget: React.FC<PreviewTextareaWidgetProps>;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=PreviewTextareaWidget.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PreviewTextareaWidget.d.ts","sourceRoot":"","sources":["../../../src/components/RJSFPreview/PreviewTextareaWidget.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,UAAU,0BAA2B,SAAQ,WAAW;IACpD,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,0BAA0B,CAiDtE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generates a JSON schema with input values embedded in the properties
|
|
3
|
+
*/
|
|
4
|
+
export declare function generateSchemaWithInputs(formSchema: any, formData: any): any;
|
|
5
|
+
export declare function extractConfigurationFormData(formData: any): any;
|
|
6
|
+
export declare function extractMultiStepFormData(formData: any): any;
|
|
7
|
+
export declare function extractConfigurationAnswers(extensionData: any): any;
|
|
8
|
+
export declare function generateAmenitiesFragmentSchema(formSchema: any): any;
|
|
9
|
+
//# sourceMappingURL=generateSchemaWithInputs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generateSchemaWithInputs.d.ts","sourceRoot":"","sources":["../../../src/components/RJSFPreview/generateSchemaWithInputs.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,UAAU,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,GAAG,GAAG,CA0D5E;AAED,wBAAgB,4BAA4B,CAAC,QAAQ,EAAE,GAAG,GAAG,GAAG,CAE/D;AAED,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,GAAG,GAAG,GAAG,CAQ3D;AAED,wBAAgB,2BAA2B,CAAC,aAAa,EAAE,GAAG,GAAG,GAAG,CAsFnE;AAED,wBAAgB,+BAA+B,CAAC,UAAU,EAAE,GAAG,GAAG,GAAG,CAmEpE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/RJSFPreview/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../src/components/ReactTable/Table.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../src/components/ReactTable/Table.tsx"],"names":[],"mappings":"AAsCA,MAAM,WAAW,oBAAoB;IACjC,OAAO,EAAE,GAAG,EAAE,CAAC;IACf,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,GAAG,EAAE,CAAC;IACpB,gBAAgB,CAAC,EAAE,QAAQ,CAAC;IAC5B,aAAa,CAAC,EAAE,QAAQ,CAAC;IACzB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,oBAAoB,CAAC,EAAE,QAAQ,CAAC;CACnC;AAED,eAAO,MAAM,UAAU,GAAI,OAAO,oBAAoB,4CAgNrD,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface SearchInputProps {
|
|
2
|
+
placeholder?: string;
|
|
3
|
+
value?: string;
|
|
4
|
+
onChange?: (value: string) => void;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
className?: string;
|
|
7
|
+
iconSize?: number;
|
|
8
|
+
}
|
|
9
|
+
export declare const SearchInput: ({ placeholder, value, onChange, disabled, className, iconSize, }: SearchInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=SearchInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchInput.d.ts","sourceRoot":"","sources":["../../../src/components/Search/SearchInput.tsx"],"names":[],"mappings":"AAIA,UAAU,gBAAgB;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,WAAW,GAAI,kEAOzB,gBAAgB,4CA4BlB,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import {jsxs,jsx}from'react/jsx-runtime';import React__default from'react';import {Search}from'lucide-react';import {cn}from'../../utils/util.js';const SearchInput = ({
|
|
2
|
+
placeholder = 'Search',
|
|
3
|
+
value,
|
|
4
|
+
onChange,
|
|
5
|
+
disabled,
|
|
6
|
+
className,
|
|
7
|
+
iconSize = 16
|
|
8
|
+
}) => {
|
|
9
|
+
const isControlled = value !== undefined;
|
|
10
|
+
const [localValue, setLocalValue] = React__default.useState(isControlled ? value : '');
|
|
11
|
+
const handleOnChange = event => {
|
|
12
|
+
if (!isControlled) {
|
|
13
|
+
setLocalValue(event.target.value);
|
|
14
|
+
}
|
|
15
|
+
onChange?.(event.target.value);
|
|
16
|
+
};
|
|
17
|
+
React__default.useEffect(() => {
|
|
18
|
+
setLocalValue(value || '');
|
|
19
|
+
}, [value]);
|
|
20
|
+
return jsxs("div", {
|
|
21
|
+
className: "relative",
|
|
22
|
+
children: [jsx(Search, {
|
|
23
|
+
size: iconSize,
|
|
24
|
+
className: "absolute top-1/2 left-3 -translate-y-1/2 text-gray-400"
|
|
25
|
+
}), jsx("input", {
|
|
26
|
+
placeholder: placeholder,
|
|
27
|
+
value: localValue,
|
|
28
|
+
onChange: handleOnChange,
|
|
29
|
+
disabled: disabled,
|
|
30
|
+
className: cn('pl-8 rounded-lg border-gray-300 bg-gray-100', className)
|
|
31
|
+
})]
|
|
32
|
+
});
|
|
33
|
+
};export{SearchInput};//# sourceMappingURL=SearchInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchInput.js","sources":["../../../src/components/Search/SearchInput.tsx"],"sourcesContent":[null],"names":[],"mappings":"kJAQY,MAAC,WAAU,GAAA,CAAA;aACV,GAAG,QAAO;OACX;AACX,EAAA,QAAA;AAED,EAAA,QAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Search/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare const SelectContent: ({ children, className }: {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
className?: string;
|
|
5
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
type SelectItemProps<T extends keyof JSX.IntrinsicElements = 'button'> = Omit<React.ComponentPropsWithoutRef<T>, 'value'> & {
|
|
7
|
+
value?: any;
|
|
8
|
+
closeOnClick?: boolean;
|
|
9
|
+
tag?: T;
|
|
10
|
+
onClick?: () => void;
|
|
11
|
+
};
|
|
12
|
+
export declare const SelectItem: <T extends keyof JSX.IntrinsicElements = "button">({ children, className, value, onClick, closeOnClick, tag, ...rest }: SelectItemProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const SelectValue: ({ placeholder, icon: _icon, label, }: {
|
|
14
|
+
placeholder: string;
|
|
15
|
+
icon?: React.ReactNode;
|
|
16
|
+
label?: (selectedValue: any) => string;
|
|
17
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare const SelectTrigger: ({ children, className }: {
|
|
19
|
+
children: React.ReactNode;
|
|
20
|
+
className?: string;
|
|
21
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare const SelectSearch: ({ placeholder, onChange, }: {
|
|
23
|
+
placeholder: string;
|
|
24
|
+
onChange?: (value: string) => void;
|
|
25
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
interface SelectProps {
|
|
27
|
+
children: React.ReactNode;
|
|
28
|
+
onChange?: (selectedValue: any) => void;
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
value?: any;
|
|
31
|
+
loading?: boolean;
|
|
32
|
+
}
|
|
33
|
+
export declare const Select: ({ children, ...props }: SelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
export {};
|
|
35
|
+
//# sourceMappingURL=Select.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA4E/B,eAAO,MAAM,aAAa,GAAI,yBAAyB;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,4CA2EvG,CAAC;AAEF,KAAK,eAAe,CAAC,CAAC,SAAS,MAAM,GAAG,CAAC,iBAAiB,GAAG,QAAQ,IAAI,IAAI,CACzE,KAAK,CAAC,wBAAwB,CAAC,CAAC,CAAC,EACjC,OAAO,CACV,GAAG;IACA,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,GAAG,CAAC,EAAE,CAAC,CAAC;IACR,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,MAAM,GAAG,CAAC,iBAAiB,GAAG,QAAQ,EAAE,qEAQ1E,eAAe,CAAC,CAAC,CAAC,4CAqBpB,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,sCAIzB;IACC,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,KAAK,CAAC,EAAE,CAAC,aAAa,EAAE,GAAG,KAAK,MAAM,CAAC;CAC1C,4CAsCA,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,yBAAyB;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,4CAiBvG,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,4BAG1B;IACC,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACtC,4CAoBA,CAAC;AAEF,UAAU,WAAW;IACjB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,QAAQ,CAAC,EAAE,CAAC,aAAa,EAAE,GAAG,KAAK,IAAI,CAAC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB;AAkBD,eAAO,MAAM,MAAM,GAAI,wBAAwB,WAAW,4CAMzD,CAAC"}
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
import {jsx,jsxs,Fragment}from'react/jsx-runtime';import*as React from'react';import {ChevronDown,Search}from'lucide-react';import {cn}from'../../utils/util.js';const SelectContext = React.createContext(undefined);
|
|
2
|
+
const SelectProvider = ({
|
|
3
|
+
children,
|
|
4
|
+
value,
|
|
5
|
+
onChange,
|
|
6
|
+
loading = false
|
|
7
|
+
}) => {
|
|
8
|
+
const [open, setOpen] = React.useState(false);
|
|
9
|
+
// Controlled vs uncontrolled state
|
|
10
|
+
const isControlled = value !== undefined;
|
|
11
|
+
const [internalValue, setInternalValue] = React.useState(value ?? null);
|
|
12
|
+
const selectedValue = isControlled ? value : internalValue;
|
|
13
|
+
const setSelectedValue = val => {
|
|
14
|
+
if (!isControlled) {
|
|
15
|
+
setInternalValue(val);
|
|
16
|
+
}
|
|
17
|
+
onChange?.(val);
|
|
18
|
+
};
|
|
19
|
+
const [disabled, setDisabled] = React.useState(false);
|
|
20
|
+
const [searchValue, setSearchValue] = React.useState('');
|
|
21
|
+
const triggerRef = React.useRef(null);
|
|
22
|
+
return jsx(SelectContext.Provider, {
|
|
23
|
+
value: {
|
|
24
|
+
open,
|
|
25
|
+
setOpen,
|
|
26
|
+
selectedValue,
|
|
27
|
+
setSelectedValue,
|
|
28
|
+
disabled,
|
|
29
|
+
setDisabled,
|
|
30
|
+
searchValue,
|
|
31
|
+
setSearchValue,
|
|
32
|
+
triggerRef,
|
|
33
|
+
loading
|
|
34
|
+
},
|
|
35
|
+
children: children
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
const useSelectContext = () => {
|
|
39
|
+
const ctx = React.useContext(SelectContext);
|
|
40
|
+
if (!ctx) throw new Error('useSelectContext must be used within SelectProvider');
|
|
41
|
+
return ctx;
|
|
42
|
+
};
|
|
43
|
+
const SelectContent = ({
|
|
44
|
+
children,
|
|
45
|
+
className
|
|
46
|
+
}) => {
|
|
47
|
+
const {
|
|
48
|
+
open,
|
|
49
|
+
setOpen,
|
|
50
|
+
triggerRef
|
|
51
|
+
} = useSelectContext();
|
|
52
|
+
const contentRef = React.useRef(null);
|
|
53
|
+
const [styles, setStyles] = React.useState({});
|
|
54
|
+
const handleOverflow = () => {
|
|
55
|
+
if (!open) return;
|
|
56
|
+
const triggerEl = triggerRef.current;
|
|
57
|
+
const contentEl = contentRef.current;
|
|
58
|
+
if (triggerEl && contentEl) {
|
|
59
|
+
const triggerRect = triggerEl.getBoundingClientRect();
|
|
60
|
+
const contentRect = contentEl.getBoundingClientRect();
|
|
61
|
+
const viewportWidth = window.innerWidth;
|
|
62
|
+
const viewportHeight = window.innerHeight;
|
|
63
|
+
// Default position
|
|
64
|
+
let top = triggerRect.height;
|
|
65
|
+
let left = 0;
|
|
66
|
+
const isOverflowingRight = triggerRect.right + contentRect.width > viewportWidth;
|
|
67
|
+
const isOverflowingBottom = triggerRect.bottom + contentRect.height > viewportHeight;
|
|
68
|
+
if (isOverflowingRight) {
|
|
69
|
+
left = -(contentRect.width - triggerRect.width);
|
|
70
|
+
}
|
|
71
|
+
if (isOverflowingBottom) {
|
|
72
|
+
top = -(contentRect.height + 8);
|
|
73
|
+
}
|
|
74
|
+
setStyles({
|
|
75
|
+
top,
|
|
76
|
+
left
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
React.useEffect(() => {
|
|
81
|
+
handleOverflow();
|
|
82
|
+
}, [open]);
|
|
83
|
+
React.useEffect(() => {
|
|
84
|
+
const handleClickOutside = event => {
|
|
85
|
+
if (contentRef.current && !contentRef.current.contains(event.target) && !triggerRef.current?.contains(event.target)) {
|
|
86
|
+
setOpen(false);
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
document.addEventListener('mousedown', handleClickOutside);
|
|
90
|
+
return () => {
|
|
91
|
+
document.removeEventListener('mousedown', handleClickOutside);
|
|
92
|
+
};
|
|
93
|
+
}, [contentRef, triggerRef, setOpen]);
|
|
94
|
+
return jsx("div", {
|
|
95
|
+
ref: contentRef,
|
|
96
|
+
role: "listbox",
|
|
97
|
+
style: {
|
|
98
|
+
...styles,
|
|
99
|
+
display: open ? 'block' : 'none'
|
|
100
|
+
},
|
|
101
|
+
className: cn('absolute z-50 mt-2 min-w-full max-w-max max-h-96 overflow-y-auto overflow-x-hidden rounded-md border border-gray-300 bg-white shadow-lg focus:outline-none', className),
|
|
102
|
+
children: children
|
|
103
|
+
});
|
|
104
|
+
};
|
|
105
|
+
const SelectItem = ({
|
|
106
|
+
children,
|
|
107
|
+
className,
|
|
108
|
+
value,
|
|
109
|
+
onClick,
|
|
110
|
+
closeOnClick = true,
|
|
111
|
+
tag,
|
|
112
|
+
...rest
|
|
113
|
+
}) => {
|
|
114
|
+
const {
|
|
115
|
+
setOpen,
|
|
116
|
+
setSelectedValue
|
|
117
|
+
} = useSelectContext();
|
|
118
|
+
const Tag = tag || 'button';
|
|
119
|
+
const handleClick = e => {
|
|
120
|
+
setSelectedValue(value ?? null);
|
|
121
|
+
if (onClick) onClick(value ?? null);
|
|
122
|
+
if (closeOnClick) setOpen(false);
|
|
123
|
+
};
|
|
124
|
+
return jsx(Tag, {
|
|
125
|
+
role: "option",
|
|
126
|
+
onClick: handleClick,
|
|
127
|
+
className: cn('flex min-w-full w-max items-center gap-2 px-4 py-2 text-sm hover:bg-gray-100', className),
|
|
128
|
+
...rest,
|
|
129
|
+
children: children
|
|
130
|
+
});
|
|
131
|
+
};
|
|
132
|
+
const SelectValue = ({
|
|
133
|
+
placeholder,
|
|
134
|
+
icon: _icon,
|
|
135
|
+
label
|
|
136
|
+
}) => {
|
|
137
|
+
const {
|
|
138
|
+
selectedValue,
|
|
139
|
+
loading
|
|
140
|
+
} = useSelectContext();
|
|
141
|
+
const icon = _icon || '';
|
|
142
|
+
if (loading) {
|
|
143
|
+
return jsxs("span", {
|
|
144
|
+
className: "block text-muted-foreground flex items-center gap-2",
|
|
145
|
+
children: [icon, "Loading..."]
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
const isStrOrInt = typeof selectedValue === 'string' || typeof selectedValue === 'number';
|
|
149
|
+
if (selectedValue && !isStrOrInt && !label) {
|
|
150
|
+
throw new Error('SelectValue must have a label prop if selectedValue is not a string or number');
|
|
151
|
+
}
|
|
152
|
+
if (label && selectedValue !== null && selectedValue !== undefined) {
|
|
153
|
+
return jsxs(Fragment, {
|
|
154
|
+
children: [icon, label(selectedValue)]
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
if (selectedValue === null || selectedValue === undefined) {
|
|
158
|
+
return jsxs("span", {
|
|
159
|
+
className: "block text-muted-foreground flex items-center gap-2",
|
|
160
|
+
children: [icon, placeholder]
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
const stringifiedValue = String(selectedValue);
|
|
164
|
+
return jsxs(Fragment, {
|
|
165
|
+
children: [icon, " ", stringifiedValue[0].toUpperCase() + stringifiedValue.slice(1)]
|
|
166
|
+
});
|
|
167
|
+
};
|
|
168
|
+
const SelectTrigger = ({
|
|
169
|
+
children,
|
|
170
|
+
className
|
|
171
|
+
}) => {
|
|
172
|
+
const {
|
|
173
|
+
setOpen,
|
|
174
|
+
open,
|
|
175
|
+
triggerRef,
|
|
176
|
+
disabled,
|
|
177
|
+
loading
|
|
178
|
+
} = useSelectContext();
|
|
179
|
+
const handleClick = () => setOpen(!open);
|
|
180
|
+
return jsxs("button", {
|
|
181
|
+
ref: triggerRef,
|
|
182
|
+
disabled: disabled || loading,
|
|
183
|
+
"aria-haspopup": "listbox",
|
|
184
|
+
"aria-expanded": open,
|
|
185
|
+
onClick: handleClick,
|
|
186
|
+
className: cn('flex items-center gap-2 rounded-lg border border-gray-300 px-4 py-2', className),
|
|
187
|
+
children: [children, jsx(ChevronDown, {
|
|
188
|
+
size: 16,
|
|
189
|
+
className: `transition-transform ${open ? 'rotate-180' : ''}`
|
|
190
|
+
})]
|
|
191
|
+
});
|
|
192
|
+
};
|
|
193
|
+
const SelectSearch = ({
|
|
194
|
+
placeholder,
|
|
195
|
+
// placeholder for the search input
|
|
196
|
+
onChange
|
|
197
|
+
}) => {
|
|
198
|
+
const {
|
|
199
|
+
setSearchValue,
|
|
200
|
+
searchValue
|
|
201
|
+
} = useSelectContext();
|
|
202
|
+
React.useEffect(() => {
|
|
203
|
+
onChange?.(searchValue);
|
|
204
|
+
}, [searchValue, onChange]);
|
|
205
|
+
return jsx("div", {
|
|
206
|
+
className: "p-2",
|
|
207
|
+
children: jsxs("div", {
|
|
208
|
+
className: "relative",
|
|
209
|
+
children: [jsx(Search, {
|
|
210
|
+
size: 14,
|
|
211
|
+
className: "absolute top-1/2 left-3 -translate-y-1/2"
|
|
212
|
+
}), jsx("input", {
|
|
213
|
+
placeholder: placeholder,
|
|
214
|
+
value: searchValue,
|
|
215
|
+
onChange: e => setSearchValue(e.target.value),
|
|
216
|
+
className: "pl-8 min-w-full rounded-lg border-gray-300 bg-gray-100"
|
|
217
|
+
})]
|
|
218
|
+
})
|
|
219
|
+
});
|
|
220
|
+
};
|
|
221
|
+
const SelectRoot = ({
|
|
222
|
+
children,
|
|
223
|
+
disabled
|
|
224
|
+
}) => {
|
|
225
|
+
const {
|
|
226
|
+
setDisabled,
|
|
227
|
+
open,
|
|
228
|
+
setSearchValue
|
|
229
|
+
} = useSelectContext();
|
|
230
|
+
React.useEffect(() => {
|
|
231
|
+
setDisabled(!!disabled);
|
|
232
|
+
}, [disabled, setDisabled]);
|
|
233
|
+
React.useEffect(() => {
|
|
234
|
+
if (open) {
|
|
235
|
+
setSearchValue('');
|
|
236
|
+
}
|
|
237
|
+
}, [open, setSearchValue]);
|
|
238
|
+
return jsx("div", {
|
|
239
|
+
className: "relative",
|
|
240
|
+
children: children
|
|
241
|
+
});
|
|
242
|
+
};
|
|
243
|
+
const Select = ({
|
|
244
|
+
children,
|
|
245
|
+
...props
|
|
246
|
+
}) => {
|
|
247
|
+
return jsx(SelectProvider, {
|
|
248
|
+
value: props.value,
|
|
249
|
+
onChange: props.onChange,
|
|
250
|
+
loading: props.loading,
|
|
251
|
+
children: jsx(SelectRoot, {
|
|
252
|
+
...props,
|
|
253
|
+
children: children
|
|
254
|
+
})
|
|
255
|
+
});
|
|
256
|
+
};export{Select,SelectContent,SelectItem,SelectSearch,SelectTrigger,SelectValue};//# sourceMappingURL=Select.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Select.js","sources":["../../../src/components/Select/Select.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":"iKA4EwG,MAAA,aAAA,GAAA,KAAA,CAAA,aAAA,CAAA,SA2EtG,CAAA;AAEF,MAAK,cAAe,GAAE,CAAA;UAIZ;OACM;UACN;AACN,EAAA,OAAA,GAAQ;CACX,KAAC;AAEF,EAAA,MAAA,CAAA,IAAA,EAAO,OAAgB,CAAA,GAAA,KAAA,CAAA,QAAc,CAAA,KAAA,CAAA;AA+BrC;QAKe,eAAQ,KAAC,KAAA,SAAA;AACpB,EAAA,MAAI,CAAC,+BAAkB,CAAA,GAAA,KAAA,CAAA,QAAA,CAAA,KAAA,IAAA,IAAA,CAAA;QAClB,aAAI,GAAA,YAAuB,QAAO,GAAA,aAAA;AAC1C,EAAA,MAAA,gBAAA,GAAA,GAAA,IAAA;AAwCD,IAAO,IAAA,CAAA,YAAM,EAAa;AAA+B,MAAA,gBAAgB,CAAA,GAAA,CAAA;;AAA+B,IAAA,QAAA,GAAA,GAAA,CAAA;AAmBxG,GAAO;QAIQ,CAAA,QAAE,aAAO,CAAA,GAAA,KAAA,CAAA,QAAA,CAAA,KAAA,CAAA;QACZ,CAAA,WAAI,oBAAuB,KAAA,CAAA,QAAA,CAAA,EAAA,CAAA;AACtC,EAAA,MAAA,UAAA,GAAA,KAAA,CAAA,MAAA,CAAA,IAAA,CAAA;AAsBD,EAAA,OAAAA,GAAqB,CAAA,aAAA,CAAA,QAAA,EAAA;AACjB,IAAA,KAAA,EAAA;MACQ,IAAA;MACA,OAAC;MACJ,aAAO;MACL,gBAAW;AACrB,MAAA,QAAA;AAkBD,MAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Select/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
|
@@ -5,6 +5,8 @@ export * from './ErrorPages';
|
|
|
5
5
|
export * from './PageContainer';
|
|
6
6
|
export * from './Spin';
|
|
7
7
|
export * from './OTP';
|
|
8
|
+
export * from './Search';
|
|
9
|
+
export * from './Select';
|
|
8
10
|
export * from './DatePicker';
|
|
9
11
|
export * from './Button/Button';
|
|
10
12
|
export * from './ThemeProvider';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,QAAQ,CAAC;AACvB,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,QAAQ,CAAC;AACvB,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC"}
|
package/lib/hooks/useTheme.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {useContext}from'react';import {ThemeContext}from'../components/ThemeProvider/ThemeProvider.js';
|
|
1
|
+
import {useContext}from'react';import {ThemeContext}from'../components/ThemeProvider/ThemeProvider.js';function useTheme() {
|
|
2
2
|
const context = useContext(ThemeContext);
|
|
3
3
|
if (context === undefined) {
|
|
4
4
|
throw new Error('useTheme must be used within a ThemeProvider');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useWindowSize.d.ts","sourceRoot":"","sources":["../../src/hooks/useWindowSize.ts"],"names":[],"mappings":"AAEA,wBAAgB,aAAa;;;EAsB5B"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {useState,useEffect}from'react';function useWindowSize() {
|
|
2
|
+
const [windowSize, setWindowSize] = useState({
|
|
3
|
+
width: typeof window !== 'undefined' ? window.innerWidth : 0,
|
|
4
|
+
// Check if window is defined
|
|
5
|
+
height: typeof window !== 'undefined' ? window.innerHeight : 0 // Check if window is defined
|
|
6
|
+
});
|
|
7
|
+
useEffect(() => {
|
|
8
|
+
function handleResize() {
|
|
9
|
+
setWindowSize({
|
|
10
|
+
width: window.innerWidth,
|
|
11
|
+
height: window.innerHeight
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
// Add event listener for window resize
|
|
15
|
+
window.addEventListener('resize', handleResize);
|
|
16
|
+
// Cleanup the event listener on component unmount
|
|
17
|
+
return () => window.removeEventListener('resize', handleResize);
|
|
18
|
+
}, []);
|
|
19
|
+
return windowSize;
|
|
20
|
+
}export{useWindowSize};//# sourceMappingURL=useWindowSize.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useWindowSize.js","sources":["../../src/hooks/useWindowSize.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAwBC,IAAA,KAAA,EAAA,OAAA,MAAA,KAAA,WAAA,GAAA,MAAA,CAAA,UAAA,GAAA,CAAA;;;;;;;;;;;;;;;;;"}
|
package/lib/index.d.ts
CHANGED
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{default as PageLoading}from'./components/PageLoading/index.js';export{ApplicationErrorHandler}from'./components/ErrorHandlers/ApplicationErrorHandler.js';export{ErrorBoundary}from'./components/ErrorHandlers/ErrorBoundary.js';export{LayoutErrorBoundary}from'./components/ErrorHandlers/LayoutErrorBoundary.js';export{ReactTable}from'./components/ReactTable/Table.js';export{DefaultColumnFilter,SelectColumnFilter}from'./components/ReactTable/TableFilters.js';export{Error404}from'./components/ErrorPages/404.js';export{Error500}from'./components/ErrorPages/500.js';export{Error403}from'./components/ErrorPages/403.js';export{PageContainer}from'./components/PageContainer/PageContainer.js';export{Spin}from'./components/Spin/index.js';export{OTPInput}from'./components/OTP/OTPInput.js';export{SingleInput}from'./components/OTP/SingleInput.js';export{useOTPInput}from'./components/OTP/hooks.js';export{OTPVerification}from'./components/OTP/OTPVerification.js';export{
|
|
1
|
+
export{default as PageLoading}from'./components/PageLoading/index.js';export{ApplicationErrorHandler}from'./components/ErrorHandlers/ApplicationErrorHandler.js';export{ErrorBoundary}from'./components/ErrorHandlers/ErrorBoundary.js';export{LayoutErrorBoundary}from'./components/ErrorHandlers/LayoutErrorBoundary.js';export{ReactTable}from'./components/ReactTable/Table.js';export{DefaultColumnFilter,SelectColumnFilter}from'./components/ReactTable/TableFilters.js';export{Error404}from'./components/ErrorPages/404.js';export{Error500}from'./components/ErrorPages/500.js';export{Error403}from'./components/ErrorPages/403.js';export{PageContainer}from'./components/PageContainer/PageContainer.js';export{Spin}from'./components/Spin/index.js';export{OTPInput}from'./components/OTP/OTPInput.js';export{SingleInput}from'./components/OTP/SingleInput.js';export{useOTPInput}from'./components/OTP/hooks.js';export{OTPVerification}from'./components/OTP/OTPVerification.js';export{SearchInput}from'./components/Search/SearchInput.js';export{Select,SelectContent,SelectItem,SelectSearch,SelectTrigger,SelectValue}from'./components/Select/Select.js';export{DatePicker}from'./components/DatePicker/DatePicker.js';export{TailwindUiButton}from'./components/Button/Button.js';export{TailwindThemeProvider,ThemeContext,themes}from'./components/ThemeProvider/ThemeProvider.js';export{ThemeToggle}from'./components/ThemeProvider/ThemeToggle.js';export{useTheme}from'./hooks/useTheme.js';export{useWindowSize}from'./hooks/useWindowSize.js';export{ToastContainer,useToast,useToastCloseAll}from'./hooks/useToast.js';//# sourceMappingURL=index.js.map
|
package/lib/shardui/badge.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { type VariantProps } from 'class-variance-authority';
|
|
3
3
|
declare const badgeVariants: (props?: {
|
|
4
|
-
variant?: "default" | "
|
|
4
|
+
variant?: "default" | "outline" | "secondary" | "destructive";
|
|
5
5
|
} & import("class-variance-authority/types").ClassProp) => string;
|
|
6
6
|
export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
7
7
|
}
|
package/lib/shardui/button.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { type VariantProps } from 'class-variance-authority';
|
|
3
3
|
declare const buttonVariants: (props?: {
|
|
4
|
-
variant?: "default" | "link" | "
|
|
5
|
-
size?: "default" | "sm" | "
|
|
4
|
+
variant?: "default" | "link" | "outline" | "secondary" | "ghost" | "destructive";
|
|
5
|
+
size?: "default" | "sm" | "icon" | "lg";
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) => string;
|
|
7
7
|
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
8
8
|
asChild?: boolean;
|
package/lib/shardui/chart.d.ts
CHANGED
|
@@ -55,7 +55,7 @@ declare const ChartTooltipContent: React.ForwardRefExoticComponent<Omit<Recharts
|
|
|
55
55
|
labelKey?: string;
|
|
56
56
|
}, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
57
57
|
declare const ChartLegend: typeof RechartsPrimitive.Legend;
|
|
58
|
-
declare const ChartLegendContent: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & Pick<RechartsPrimitive.LegendProps, "
|
|
58
|
+
declare const ChartLegendContent: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & Pick<RechartsPrimitive.LegendProps, "verticalAlign" | "payload"> & {
|
|
59
59
|
hideIcon?: boolean;
|
|
60
60
|
nameKey?: string;
|
|
61
61
|
}, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
package/lib/shardui/command.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ declare const Command: React.ForwardRefExoticComponent<Omit<{
|
|
|
6
6
|
ref?: React.Ref<HTMLDivElement>;
|
|
7
7
|
} & {
|
|
8
8
|
asChild?: boolean;
|
|
9
|
-
}, "key" |
|
|
9
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
|
|
10
10
|
label?: string;
|
|
11
11
|
shouldFilter?: boolean;
|
|
12
12
|
filter?: (value: string, search: string, keywords?: string[]) => number;
|
|
@@ -24,7 +24,7 @@ declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<
|
|
|
24
24
|
ref?: React.Ref<HTMLInputElement>;
|
|
25
25
|
} & {
|
|
26
26
|
asChild?: boolean;
|
|
27
|
-
}, "key" | keyof React.InputHTMLAttributes<HTMLInputElement> | "asChild">, "value" | "
|
|
27
|
+
}, "key" | keyof React.InputHTMLAttributes<HTMLInputElement> | "asChild">, "value" | "type" | "onChange"> & {
|
|
28
28
|
value?: string;
|
|
29
29
|
onValueChange?: (search: string) => void;
|
|
30
30
|
} & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -34,7 +34,7 @@ declare const CommandList: React.ForwardRefExoticComponent<Omit<{
|
|
|
34
34
|
ref?: React.Ref<HTMLDivElement>;
|
|
35
35
|
} & {
|
|
36
36
|
asChild?: boolean;
|
|
37
|
-
}, "key" |
|
|
37
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
|
|
38
38
|
label?: string;
|
|
39
39
|
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
40
40
|
declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
|
|
@@ -43,14 +43,14 @@ declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
|
|
|
43
43
|
ref?: React.Ref<HTMLDivElement>;
|
|
44
44
|
} & {
|
|
45
45
|
asChild?: boolean;
|
|
46
|
-
}, "key" |
|
|
46
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
47
47
|
declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
|
|
48
48
|
children?: React.ReactNode;
|
|
49
49
|
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
50
50
|
ref?: React.Ref<HTMLDivElement>;
|
|
51
51
|
} & {
|
|
52
52
|
asChild?: boolean;
|
|
53
|
-
}, "key" |
|
|
53
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "value" | "heading"> & {
|
|
54
54
|
heading?: React.ReactNode;
|
|
55
55
|
value?: string;
|
|
56
56
|
forceMount?: boolean;
|
|
@@ -59,7 +59,7 @@ declare const CommandSeparator: React.ForwardRefExoticComponent<Omit<Pick<Pick<R
|
|
|
59
59
|
ref?: React.Ref<HTMLDivElement>;
|
|
60
60
|
} & {
|
|
61
61
|
asChild?: boolean;
|
|
62
|
-
}, "key" |
|
|
62
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
|
|
63
63
|
alwaysRender?: boolean;
|
|
64
64
|
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
65
65
|
declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
|
|
@@ -68,7 +68,7 @@ declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
|
|
|
68
68
|
ref?: React.Ref<HTMLDivElement>;
|
|
69
69
|
} & {
|
|
70
70
|
asChild?: boolean;
|
|
71
|
-
}, "key" |
|
|
71
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "value" | "disabled" | "onSelect"> & {
|
|
72
72
|
disabled?: boolean;
|
|
73
73
|
onSelect?: (value: string) => void;
|
|
74
74
|
value?: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{Accordion,AccordionContent,AccordionItem,AccordionTrigger}from'./accordion.js';export{Alert,AlertDescription,AlertTitle}from'./alert.js';export{AlertDialog,AlertDialogAction,AlertDialogCancel,AlertDialogContent,AlertDialogDescription,AlertDialogFooter,AlertDialogHeader,AlertDialogTitle,AlertDialogTrigger}from'./alert-dialog.js';export{AspectRatio}from'./aspect-ratio.js';export{Avatar,AvatarFallback,AvatarImage}from'./avatar.js';export{Badge,badgeVariants}from'./badge.js';export{Breadcrumb,BreadcrumbEllipsis,BreadcrumbItem,BreadcrumbLink,BreadcrumbList,BreadcrumbPage,BreadcrumbSeparator}from'./breadcrumb.js';export{Button,buttonVariants}from'./button.js';export{Calendar}from'./calendar.js';export{Card,CardContent,CardDescription,CardFooter,CardHeader,CardTitle}from'./card.js';export{Carousel,CarouselContent,CarouselItem,CarouselNext,CarouselPrevious}from'./carousel.js';export{ChartContainer,ChartLegend,ChartLegendContent,ChartStyle,ChartTooltip,ChartTooltipContent}from'./chart.js';export{Checkbox}from'./checkbox.js';export{Collapsible,CollapsibleContent,CollapsibleTrigger}from'./collapsible.js';export{Command,CommandDialog,CommandEmpty,CommandGroup,CommandInput,CommandItem,CommandList,CommandSeparator,CommandShortcut}from'./command.js';export{ContextMenu,ContextMenuCheckboxItem,ContextMenuContent,ContextMenuGroup,ContextMenuItem,ContextMenuLabel,ContextMenuPortal,ContextMenuRadioGroup,ContextMenuRadioItem,ContextMenuSeparator,ContextMenuShortcut,ContextMenuSub,ContextMenuSubContent,ContextMenuSubTrigger,ContextMenuTrigger}from'./context-menu.js';export{Dialog,DialogContent,DialogDescription,DialogFooter,DialogHeader,DialogTitle,DialogTrigger}from'./dialog.js';export{Drawer,DrawerClose,DrawerContent,DrawerDescription,DrawerFooter,DrawerHeader,DrawerTitle,DrawerTrigger}from'./drawer.js';export{DropdownMenu,DropdownMenuCheckboxItem,DropdownMenuContent,DropdownMenuGroup,DropdownMenuItem,DropdownMenuLabel,DropdownMenuPortal,DropdownMenuRadioGroup,DropdownMenuRadioItem,DropdownMenuSeparator,DropdownMenuShortcut,DropdownMenuSub,DropdownMenuSubContent,DropdownMenuSubTrigger,DropdownMenuTrigger}from'./dropdown-menu.js';export{Form,FormControl,FormDescription,FormField,FormItem,FormLabel,FormMessage,useFormField}from'./form.js';export{HoverCard,HoverCardContent,HoverCardTrigger}from'./hover-card.js';export{Input}from'./input.js';export{InputOTP,InputOTPGroup,InputOTPSlot}from'./input-otp.js';export{Label}from'./label.js';export{Menubar,MenubarCheckboxItem,MenubarContent,MenubarGroup,MenubarItem,MenubarLabel,MenubarMenu,MenubarPortal,MenubarRadioGroup,MenubarRadioItem,MenubarSeparator,MenubarShortcut,MenubarSub,MenubarSubContent,MenubarSubTrigger,MenubarTrigger}from'./menubar.js';export{NavigationMenu,NavigationMenuContent,NavigationMenuItem,NavigationMenuLink,NavigationMenuList,NavigationMenuTrigger,navigationMenuTriggerStyle}from'./navigation-menu.js';export{Pagination,PaginationContent,PaginationEllipsis,PaginationItem,PaginationLink,PaginationNext,PaginationPrevious}from'./pagination.js';export{Popover,PopoverContent,PopoverTrigger}from'./popover.js';export{Progress}from'./progress.js';export{RadioGroup,RadioGroupItem}from'./radio-group.js';export{ResizableHandle,ResizablePanel,ResizablePanelGroup}from'./resizable.js';export{ScrollArea,ScrollBar}from'./scroll-area.js';export{Select,SelectContent,SelectGroup,SelectItem,SelectLabel,SelectSeparator,SelectTrigger,SelectValue}from'./select.js';export{Separator}from'./separator.js';export{Sheet,SheetClose,SheetContent,SheetDescription,SheetFooter,SheetHeader,SheetTitle,SheetTrigger}from'./sheet.js';export{Sidebar,SidebarContent,SidebarFooter,SidebarGroup,SidebarGroupAction,SidebarGroupContent,SidebarGroupLabel,SidebarHeader,SidebarInput,SidebarInset,SidebarMenu,SidebarMenuAction,SidebarMenuBadge,SidebarMenuButton,SidebarMenuItem,SidebarMenuSkeleton,SidebarMenuSub,SidebarMenuSubButton,SidebarMenuSubItem,SidebarProvider,SidebarRail,SidebarSeparator,SidebarTrigger,useSidebar}from'./sidebar.js';export{Skeleton}from'./skeleton.js';export{Slider}from'./slider.js';export{Toaster as Sonner}from'./sonner.js';export{Switch}from'./switch.js';export{Table,TableBody,TableCaption,TableCell,TableHead,TableHeader,TableRow}from'./table.js';export{Tabs,TabsContent,TabsList,TabsTrigger}from'./tabs.js';export{Textarea}from'./textarea.js';export{Toast,ToastAction,ToastClose,ToastDescription,ToastProvider,ToastTitle,ToastViewport}from'./toast.js';export{Toaster}from'./toaster.js';export{Toggle,toggleVariants}from'./toggle.js';export{ToggleGroup,ToggleGroupItem}from'./toggle-group.js';export{Tooltip,TooltipContent,TooltipProvider,TooltipTrigger}from'./tooltip.js';import'../utils/isBrowser/index.js';import'clsx';import'tailwind-merge';import'react';import'fast-deep-equal/react.js';export{useToast as useToastHook}from'../utils/hooks/use-toast.js';//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as ResizablePrimitive from 'react-resizable-panels';
|
|
2
2
|
declare const ResizablePanelGroup: ({ className, ...props }: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
-
declare const ResizablePanel: import("react").ForwardRefExoticComponent<Omit<import("react").HTMLAttributes<HTMLDivElement | HTMLElement | HTMLButtonElement | HTMLHeadingElement | HTMLParagraphElement | HTMLSelectElement | HTMLOptionElement | HTMLOptGroupElement | HTMLInputElement | HTMLTableElement | HTMLTableSectionElement | HTMLTableRowElement | HTMLTableCellElement | HTMLSpanElement | HTMLImageElement | HTMLUListElement | HTMLLIElement | HTMLAnchorElement |
|
|
3
|
+
declare const ResizablePanel: import("react").ForwardRefExoticComponent<Omit<import("react").HTMLAttributes<HTMLDivElement | HTMLElement | HTMLButtonElement | HTMLHeadingElement | HTMLParagraphElement | HTMLSelectElement | HTMLOptionElement | HTMLOptGroupElement | HTMLInputElement | HTMLTableElement | HTMLTableSectionElement | HTMLTableRowElement | HTMLTableCellElement | HTMLSpanElement | HTMLImageElement | HTMLUListElement | HTMLLIElement | HTMLAnchorElement | HTMLObjectElement | HTMLLinkElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLCanvasElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDialogElement | HTMLDListElement | HTMLEmbedElement | HTMLFieldSetElement | HTMLFormElement | HTMLHeadElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLLabelElement | HTMLLegendElement | HTMLMapElement | HTMLMetaElement | HTMLMeterElement | HTMLOListElement | HTMLOutputElement | HTMLPreElement | HTMLProgressElement | HTMLSlotElement | HTMLScriptElement | HTMLSourceElement | HTMLStyleElement | HTMLTemplateElement | HTMLTextAreaElement | HTMLTimeElement | HTMLTitleElement | HTMLTrackElement | HTMLVideoElement | HTMLTableCaptionElement | HTMLMenuElement | HTMLPictureElement>, "id" | "onResize"> & {
|
|
4
4
|
className?: string | undefined;
|
|
5
5
|
collapsedSize?: number | undefined;
|
|
6
6
|
collapsible?: boolean | undefined;
|
package/lib/shardui/sheet.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ declare const SheetClose: React.ForwardRefExoticComponent<SheetPrimitive.DialogC
|
|
|
7
7
|
declare const SheetPortal: React.FC<SheetPrimitive.DialogPortalProps>;
|
|
8
8
|
declare const SheetOverlay: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
9
|
declare const sheetVariants: (props?: {
|
|
10
|
-
side?: "
|
|
10
|
+
side?: "left" | "right" | "bottom" | "top";
|
|
11
11
|
} & import("class-variance-authority/types").ClassProp) => string;
|
|
12
12
|
interface SheetContentProps extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>, VariantProps<typeof sheetVariants> {
|
|
13
13
|
}
|
package/lib/shardui/sonner.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {jsx}from'react/jsx-runtime';import {useTheme}from'
|
|
1
|
+
import {jsx}from'react/jsx-runtime';import {useTheme}from'../hooks/useTheme.js';import {Toaster as Toaster$1}from'sonner';export{toast}from'sonner';const Toaster = ({
|
|
2
2
|
...props
|
|
3
3
|
}) => {
|
|
4
4
|
const {
|
|
5
|
-
|
|
5
|
+
mode = 'light'
|
|
6
6
|
} = useTheme();
|
|
7
7
|
return jsx(Toaster$1, {
|
|
8
|
-
theme:
|
|
8
|
+
theme: mode,
|
|
9
9
|
className: "toaster group",
|
|
10
10
|
toastOptions: {
|
|
11
11
|
classNames: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sonner.js","sources":["../../src/shardui/sonner.tsx"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sonner.js","sources":["../../src/shardui/sonner.tsx"],"sourcesContent":[null],"names":[],"mappings":"oJAyBA,MAAA,OAAS,GAAO,CAAE;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@admin-layout/tailwind-ui",
|
|
3
|
-
"version": "12.0.16-alpha.
|
|
3
|
+
"version": "12.0.16-alpha.31",
|
|
4
4
|
"description": "Sample core for higher packages to depend on",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"author": "CDMBase LLC",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"exports": {
|
|
9
9
|
".": "./lib/index.js",
|
|
10
|
-
"./
|
|
10
|
+
"./components/*": "./lib/components/*",
|
|
11
|
+
"./hooks/*": "./lib/hooks/*",
|
|
12
|
+
"./shardui": "./lib/shardui/*",
|
|
13
|
+
"./shardui/*": "./lib/shardui/*"
|
|
11
14
|
},
|
|
12
15
|
"main": "lib/index.js",
|
|
13
16
|
"module": "lib/index.js",
|
|
@@ -25,7 +28,52 @@
|
|
|
25
28
|
"watch": "npm run build:lib:watch"
|
|
26
29
|
},
|
|
27
30
|
"dependencies": {
|
|
28
|
-
"@admin-layout/client": "12.0.16-alpha.
|
|
31
|
+
"@admin-layout/client": "12.0.16-alpha.31",
|
|
32
|
+
"@radix-ui/react-accordion": "^1.2.0",
|
|
33
|
+
"@radix-ui/react-alert-dialog": "^1.1.1",
|
|
34
|
+
"@radix-ui/react-aspect-ratio": "^1.1.0",
|
|
35
|
+
"@radix-ui/react-avatar": "^1.1.0",
|
|
36
|
+
"@radix-ui/react-checkbox": "^1.1.1",
|
|
37
|
+
"@radix-ui/react-collapsible": "^1.1.0",
|
|
38
|
+
"@radix-ui/react-context-menu": "^2.2.1",
|
|
39
|
+
"@radix-ui/react-dialog": "^1.1.2",
|
|
40
|
+
"@radix-ui/react-dropdown-menu": "^2.1.1",
|
|
41
|
+
"@radix-ui/react-hover-card": "^1.1.1",
|
|
42
|
+
"@radix-ui/react-label": "^2.1.0",
|
|
43
|
+
"@radix-ui/react-menubar": "^1.1.1",
|
|
44
|
+
"@radix-ui/react-navigation-menu": "^1.2.0",
|
|
45
|
+
"@radix-ui/react-popover": "^1.1.1",
|
|
46
|
+
"@radix-ui/react-progress": "^1.1.0",
|
|
47
|
+
"@radix-ui/react-radio-group": "^1.2.0",
|
|
48
|
+
"@radix-ui/react-scroll-area": "^1.1.0",
|
|
49
|
+
"@radix-ui/react-select": "^2.1.1",
|
|
50
|
+
"@radix-ui/react-separator": "^1.1.0",
|
|
51
|
+
"@radix-ui/react-slider": "^1.2.0",
|
|
52
|
+
"@radix-ui/react-slot": "^1.1.0",
|
|
53
|
+
"@radix-ui/react-switch": "^1.1.0",
|
|
54
|
+
"@radix-ui/react-tabs": "^1.1.0",
|
|
55
|
+
"@radix-ui/react-toast": "^1.2.1",
|
|
56
|
+
"@radix-ui/react-toggle": "^1.1.0",
|
|
57
|
+
"@radix-ui/react-toggle-group": "^1.1.0",
|
|
58
|
+
"@radix-ui/react-tooltip": "^1.1.4",
|
|
59
|
+
"@tanstack/react-table": "^8.21.3",
|
|
60
|
+
"class-variance-authority": "^0.7.0",
|
|
61
|
+
"clsx": "^1.2.1",
|
|
62
|
+
"cmdk": "^1.0.0",
|
|
63
|
+
"embla-carousel-react": "^8.3.0",
|
|
64
|
+
"input-otp": "^1.2.4",
|
|
65
|
+
"lucide-react": "^0.437.0",
|
|
66
|
+
"react-day-picker": "^8.10.1",
|
|
67
|
+
"react-hook-form": "^7.62.0",
|
|
68
|
+
"react-resizable-panels": "^2.1.3",
|
|
69
|
+
"sonner": "^1.5.0",
|
|
70
|
+
"tailwind-merge": "^2.5.2",
|
|
71
|
+
"tailwindcss-animate": "^1.0.6",
|
|
72
|
+
"vaul": "^0.9.3"
|
|
73
|
+
},
|
|
74
|
+
"devDependencies": {
|
|
75
|
+
"rc-field-form": "^2.7.0",
|
|
76
|
+
"scroll-into-view-if-needed": "^3.1.0"
|
|
29
77
|
},
|
|
30
78
|
"peerDependencies": {
|
|
31
79
|
"history": "*",
|
|
@@ -38,5 +86,5 @@
|
|
|
38
86
|
"typescript": {
|
|
39
87
|
"definition": "lib/index.d.ts"
|
|
40
88
|
},
|
|
41
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "751668a2d5be3856d10801461ddb9bab115bcf34"
|
|
42
90
|
}
|