@admin-layout/tailwind-ui 12.0.16-alpha.24 → 12.0.16-alpha.28

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:
@@ -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,2 @@
1
+ export * from './SearchInput';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Search/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
@@ -5,6 +5,7 @@ export * from './ErrorPages';
5
5
  export * from './PageContainer';
6
6
  export * from './Spin';
7
7
  export * from './OTP';
8
+ export * from './Search';
8
9
  export * from './DatePicker';
9
10
  export * from './Button/Button';
10
11
  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,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,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{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
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{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/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@admin-layout/tailwind-ui",
3
- "version": "12.0.16-alpha.24",
3
+ "version": "12.0.16-alpha.28",
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
+ "./components": "./lib/components/*",
10
11
  "./hooks": "./lib/hooks/*",
11
12
  "./shardui": "./lib/shardui/*",
12
13
  "./shardui/*": "./lib/shardui/*"
@@ -27,7 +28,7 @@
27
28
  "watch": "npm run build:lib:watch"
28
29
  },
29
30
  "dependencies": {
30
- "@admin-layout/client": "12.0.16-alpha.24",
31
+ "@admin-layout/client": "12.0.16-alpha.28",
31
32
  "@radix-ui/react-accordion": "^1.2.0",
32
33
  "@radix-ui/react-alert-dialog": "^1.1.1",
33
34
  "@radix-ui/react-aspect-ratio": "^1.1.0",
@@ -70,6 +71,10 @@
70
71
  "tailwindcss-animate": "^1.0.6",
71
72
  "vaul": "^0.9.3"
72
73
  },
74
+ "devDependencies": {
75
+ "rc-field-form": "^2.7.0",
76
+ "scroll-into-view-if-needed": "^3.1.0"
77
+ },
73
78
  "peerDependencies": {
74
79
  "history": "*",
75
80
  "react": ">=16",
@@ -81,5 +86,5 @@
81
86
  "typescript": {
82
87
  "definition": "lib/index.d.ts"
83
88
  },
84
- "gitHead": "78ab2ad3ebc784c053388fa343e2fe7f4d9adb01"
89
+ "gitHead": "21091bd13238f01dbf46c9adb4c81430a167830c"
85
90
  }