@admin-layout/tailwind-ui 12.0.16-alpha.23 → 12.0.16-alpha.25

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 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":"AAwBA,eAAO,MAAM,uBAAuB,GAAI,UAAK,4CAG5C,CAAC"}
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 {useToast}from'../../hooks/useToast.js';const FallbackComponent = ({
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
- position: 'top',
9
- title: 'Server Errors. Please try again later...',
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
- }, [toast]);
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":";;;;;;;;;;;;;;;;;;;"}
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  import { type VariantProps } from 'class-variance-authority';
3
3
  declare const buttonVariants: (props?: {
4
4
  variant?: "default" | "link" | "secondary" | "outline" | "ghost" | "destructive";
5
- size?: "default" | "sm" | "lg" | "icon";
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;
@@ -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" | "onChange" | "type"> & {
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>>;
@@ -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 | HTMLLabelElement | HTMLTextAreaElement | HTMLStyleElement | HTMLHRElement | HTMLOListElement | HTMLObjectElement | HTMLLinkElement | HTMLTitleElement | HTMLDialogElement | HTMLFormElement | HTMLProgressElement | HTMLTimeElement | HTMLDataElement | HTMLMetaElement | HTMLMapElement | HTMLSlotElement | HTMLOutputElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLCanvasElement | HTMLTableColElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDListElement | HTMLEmbedElement | HTMLFieldSetElement | HTMLHeadElement | HTMLHtmlElement | HTMLIFrameElement | HTMLLegendElement | HTMLMeterElement | HTMLPreElement | HTMLScriptElement | HTMLSourceElement | HTMLTemplateElement | HTMLTrackElement | HTMLVideoElement | HTMLTableCaptionElement | HTMLMenuElement | HTMLPictureElement>, "id" | "onResize"> & {
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 | HTMLLabelElement | HTMLTextAreaElement | HTMLStyleElement | HTMLHRElement | HTMLOListElement | HTMLObjectElement | HTMLLinkElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLCanvasElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDialogElement | HTMLDListElement | HTMLEmbedElement | HTMLFieldSetElement | HTMLFormElement | HTMLHeadElement | HTMLHtmlElement | HTMLIFrameElement | HTMLLegendElement | HTMLMapElement | HTMLMetaElement | HTMLMeterElement | HTMLOutputElement | HTMLPreElement | HTMLProgressElement | HTMLSlotElement | HTMLScriptElement | HTMLSourceElement | HTMLTemplateElement | HTMLTimeElement | HTMLTitleElement | HTMLTrackElement | HTMLVideoElement | HTMLTableCaptionElement | HTMLMenuElement | HTMLPictureElement>, "id" | "onResize"> & {
4
4
  className?: string | undefined;
5
5
  collapsedSize?: number | undefined;
6
6
  collapsible?: boolean | undefined;
@@ -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?: "top" | "bottom" | "left" | "right";
10
+ side?: "bottom" | "left" | "right" | "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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@admin-layout/tailwind-ui",
3
- "version": "12.0.16-alpha.23",
3
+ "version": "12.0.16-alpha.25",
4
4
  "description": "Sample core for higher packages to depend on",
5
5
  "license": "ISC",
6
6
  "author": "CDMBase LLC",
@@ -27,7 +27,7 @@
27
27
  "watch": "npm run build:lib:watch"
28
28
  },
29
29
  "dependencies": {
30
- "@admin-layout/client": "12.0.16-alpha.23",
30
+ "@admin-layout/client": "12.0.16-alpha.25",
31
31
  "@radix-ui/react-accordion": "^1.2.0",
32
32
  "@radix-ui/react-alert-dialog": "^1.1.1",
33
33
  "@radix-ui/react-aspect-ratio": "^1.1.0",
@@ -70,6 +70,10 @@
70
70
  "tailwindcss-animate": "^1.0.6",
71
71
  "vaul": "^0.9.3"
72
72
  },
73
+ "devDependencies": {
74
+ "rc-field-form": "^2.7.0",
75
+ "scroll-into-view-if-needed": "^3.1.0"
76
+ },
73
77
  "peerDependencies": {
74
78
  "history": "*",
75
79
  "react": ">=16",
@@ -81,5 +85,5 @@
81
85
  "typescript": {
82
86
  "definition": "lib/index.d.ts"
83
87
  },
84
- "gitHead": "2cecd9c93dfd6819cde71dcfd8739dd8302bc453"
88
+ "gitHead": "8b62bff1ab82f6131580a877203778f33c4aa8c4"
85
89
  }