@customafk/lunas-ui 0.0.2-p → 0.0.2-q

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.
@@ -5,7 +5,7 @@ import { VariantProps } from 'class-variance-authority';
5
5
 
6
6
  declare const buttonVariants: (props?: ({
7
7
  variant?: "default" | "secondary" | "outline" | "destructive" | "destructive-secondary" | "destructive-outline" | "sort-outline" | "normal" | null | undefined;
8
- size?: "base" | "small" | "default" | "large" | null | undefined;
8
+ size?: "small" | "default" | "base" | "large" | null | undefined;
9
9
  } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
10
10
 
11
11
  interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
@@ -8,7 +8,7 @@ declare const Command: React.ForwardRefExoticComponent<Omit<{
8
8
  ref?: React.Ref<HTMLDivElement>;
9
9
  } & {
10
10
  asChild?: boolean;
11
- }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
11
+ }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
12
12
  label?: string;
13
13
  shouldFilter?: boolean;
14
14
  filter?: (value: string, search: string, keywords?: string[]) => number;
@@ -26,7 +26,7 @@ declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<
26
26
  ref?: React.Ref<HTMLInputElement>;
27
27
  } & {
28
28
  asChild?: boolean;
29
- }, "key" | "asChild" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "onChange" | "type" | "value"> & {
29
+ }, "key" | "asChild" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "type" | "value" | "onChange"> & {
30
30
  value?: string;
31
31
  onValueChange?: (search: string) => void;
32
32
  } & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
@@ -36,7 +36,7 @@ declare const CommandList: React.ForwardRefExoticComponent<Omit<{
36
36
  ref?: React.Ref<HTMLDivElement>;
37
37
  } & {
38
38
  asChild?: boolean;
39
- }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
39
+ }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
40
40
  label?: string;
41
41
  } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
42
42
  declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
@@ -45,14 +45,14 @@ declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
45
45
  ref?: React.Ref<HTMLDivElement>;
46
46
  } & {
47
47
  asChild?: boolean;
48
- }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
48
+ }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
49
49
  declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
50
50
  children?: React.ReactNode;
51
51
  } & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
52
52
  ref?: React.Ref<HTMLDivElement>;
53
53
  } & {
54
54
  asChild?: boolean;
55
- }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "value" | "heading"> & {
55
+ }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>>, "value" | "heading"> & {
56
56
  heading?: React.ReactNode;
57
57
  value?: string;
58
58
  forceMount?: boolean;
@@ -61,7 +61,7 @@ declare const CommandSeparator: React.ForwardRefExoticComponent<Omit<Pick<Pick<R
61
61
  ref?: React.Ref<HTMLDivElement>;
62
62
  } & {
63
63
  asChild?: boolean;
64
- }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
64
+ }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
65
65
  alwaysRender?: boolean;
66
66
  } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
67
67
  declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
@@ -70,7 +70,7 @@ declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
70
70
  ref?: React.Ref<HTMLDivElement>;
71
71
  } & {
72
72
  asChild?: boolean;
73
- }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "onSelect" | "disabled" | "value"> & {
73
+ }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>>, "disabled" | "value" | "onSelect"> & {
74
74
  disabled?: boolean;
75
75
  onSelect?: (value: string) => void;
76
76
  value?: string;
@@ -20,12 +20,13 @@ interface IProps {
20
20
  uuid: string;
21
21
  name: string;
22
22
  }[];
23
+ children?: ReactNode;
23
24
  onFilterConfirm?: (data?: {
24
25
  brand?: TBrand[];
25
26
  price?: TPrice;
26
27
  sort?: 'price-asc' | 'price-desc' | 'date-asc' | 'date-desc';
27
28
  }) => void;
28
- children?: ReactNode;
29
+ onLayoutChange?: (layout: 'GRID' | 'LIST') => void;
29
30
  }
30
31
  declare const CategoriesPage: FC<IProps>;
31
32
 
@@ -1355,11 +1355,18 @@ var CategoriesPage = ({
1355
1355
  initialLayout = "GRID",
1356
1356
  brandData,
1357
1357
  children,
1358
- onFilterConfirm
1358
+ onFilterConfirm,
1359
+ onLayoutChange
1359
1360
  }) => {
1360
1361
  const [layout, setLayout] = useState7(initialLayout);
1361
- const handleGridSelect = useCallback4(() => setLayout("GRID"), []);
1362
- const handleListSelect = useCallback4(() => setLayout("LIST"), []);
1362
+ const handleGridSelect = useCallback4(() => {
1363
+ setLayout("GRID");
1364
+ onLayoutChange?.("GRID");
1365
+ }, [onLayoutChange]);
1366
+ const handleListSelect = useCallback4(() => {
1367
+ setLayout("LIST");
1368
+ onLayoutChange?.("LIST");
1369
+ }, [onLayoutChange]);
1363
1370
  return /* @__PURE__ */ jsxs12(
1364
1371
  "main",
1365
1372
  {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@customafk/lunas-ui",
3
3
  "private": false,
4
- "version": "0.0.2-p",
4
+ "version": "0.0.2-q",
5
5
  "type": "module",
6
6
  "homepage": "https://docs.customafk.com",
7
7
  "repository": {
@@ -255,35 +255,35 @@
255
255
  "build-sb": "storybook build"
256
256
  },
257
257
  "devDependencies": {
258
- "@chromatic-com/storybook": "^1.6.1",
258
+ "@chromatic-com/storybook": "^1.9.0",
259
259
  "@shopify/eslint-plugin": "^46.0.0",
260
- "@storybook/addon-essentials": "^8.3.1",
261
- "@storybook/addon-interactions": "^8.3.1",
262
- "@storybook/addon-links": "^8.3.1",
263
- "@storybook/addon-onboarding": "^8.3.1",
264
- "@storybook/addon-themes": "^8.3.1",
265
- "@storybook/blocks": "^8.3.1",
266
- "@storybook/react": "^8.3.1",
267
- "@storybook/react-vite": "^8.3.1",
268
- "@storybook/test": "^8.3.1",
260
+ "@storybook/addon-essentials": "^8.4.5",
261
+ "@storybook/addon-interactions": "^8.4.5",
262
+ "@storybook/addon-links": "^8.4.5",
263
+ "@storybook/addon-onboarding": "^8.4.5",
264
+ "@storybook/addon-themes": "^8.4.5",
265
+ "@storybook/blocks": "^8.4.5",
266
+ "@storybook/react": "^8.4.5",
267
+ "@storybook/react-vite": "^8.4.5",
268
+ "@storybook/test": "^8.4.5",
269
269
  "@types/bun": "latest",
270
- "@types/react": "^18.3.3",
271
- "@types/react-dom": "^18.3.0",
270
+ "@types/react": "^18.3.12",
271
+ "@types/react-dom": "^18.3.1",
272
272
  "@typescript-eslint/eslint-plugin": "^6.21.0",
273
273
  "@typescript-eslint/parser": "^6.21.0",
274
- "@vitejs/plugin-react": "^4.3.0",
274
+ "@vitejs/plugin-react": "^4.3.3",
275
275
  "autoprefixer": "^10.4.20",
276
276
  "eslint": "^8.57.1",
277
277
  "eslint-config-prettier": "^9.1.0",
278
- "eslint-plugin-import": "^2.30.0",
279
- "eslint-plugin-jsx-a11y": "^6.10.0",
280
- "eslint-plugin-react": "^7.36.1",
278
+ "eslint-plugin-import": "^2.31.0",
279
+ "eslint-plugin-jsx-a11y": "^6.10.2",
280
+ "eslint-plugin-react": "^7.37.2",
281
281
  "eslint-plugin-react-form-fields": "^1.2.22",
282
282
  "eslint-plugin-react-hook-form": "^0.3.0",
283
283
  "eslint-plugin-react-hooks": "^4.6.2",
284
- "eslint-plugin-react-perf": "^3.3.2",
284
+ "eslint-plugin-react-perf": "^3.3.3",
285
285
  "eslint-plugin-react-prefer-function-component": "^3.3.0",
286
- "eslint-plugin-react-refresh": "^0.4.7",
286
+ "eslint-plugin-react-refresh": "^0.4.14",
287
287
  "eslint-plugin-simple-import-sort": "^12.1.1",
288
288
  "eslint-plugin-sonar": "^0.13.2",
289
289
  "eslint-plugin-ssr-friendly": "^1.3.0",
@@ -291,15 +291,15 @@
291
291
  "eslint-plugin-unicorn": "^55.0.0",
292
292
  "eslint-plugin-unused-imports": "^4.1.4",
293
293
  "eslint-plugin-validate-jsx-nesting": "^0.1.1",
294
- "postcss": "^8.4.40",
294
+ "postcss": "^8.4.49",
295
295
  "prettier": "^3.3.3",
296
- "prettier-plugin-tailwindcss": "^0.6.5",
297
- "storybook": "^8.3.1",
298
- "tailwindcss": "^3.4.7",
296
+ "prettier-plugin-tailwindcss": "^0.6.9",
297
+ "storybook": "^8.4.5",
298
+ "tailwindcss": "^3.4.15",
299
299
  "tailwindcss-animate": "^1.0.7",
300
- "tsup": "^8.2.4",
301
- "typescript": "^5.2.2",
302
- "vite": "^5.2.13",
300
+ "tsup": "^8.3.5",
301
+ "typescript": "^5.7.2",
302
+ "vite": "^5.4.11",
303
303
  "vite-tsconfig-paths": "^4.3.2"
304
304
  },
305
305
  "description": "This is a e-commerce UI library for CustomAFK",
@@ -310,20 +310,20 @@
310
310
  "license": "ISC",
311
311
  "dependencies": {
312
312
  "@hookform/error-message": "^2.0.1",
313
- "@hookform/resolvers": "^3.9.0",
313
+ "@hookform/resolvers": "^3.9.1",
314
314
  "@radix-ui/react-accordion": "^1.2.1",
315
315
  "@radix-ui/react-alert-dialog": "^1.1.2",
316
316
  "@radix-ui/react-aspect-ratio": "^1.1.0",
317
317
  "@radix-ui/react-avatar": "^1.1.1",
318
318
  "@radix-ui/react-checkbox": "^1.1.2",
319
319
  "@radix-ui/react-dialog": "^1.1.2",
320
- "@radix-ui/react-dropdown-menu": "^2.1.1",
320
+ "@radix-ui/react-dropdown-menu": "^2.1.2",
321
321
  "@radix-ui/react-label": "^2.1.0",
322
322
  "@radix-ui/react-navigation-menu": "^1.2.1",
323
323
  "@radix-ui/react-popover": "^1.1.2",
324
324
  "@radix-ui/react-progress": "^1.1.0",
325
325
  "@radix-ui/react-radio-group": "^1.2.1",
326
- "@radix-ui/react-scroll-area": "^1.2.0",
326
+ "@radix-ui/react-scroll-area": "^1.2.1",
327
327
  "@radix-ui/react-select": "^2.1.2",
328
328
  "@radix-ui/react-separator": "^1.1.0",
329
329
  "@radix-ui/react-slider": "^1.2.1",
@@ -333,15 +333,15 @@
333
333
  "@radix-ui/react-visually-hidden": "^1.1.0",
334
334
  "class-variance-authority": "^0.7.0",
335
335
  "clsx": "^2.1.1",
336
- "cmdk": "^1.0.0",
337
- "embla-carousel-react": "^8.3.0",
338
- "framer-motion": "^11.11.8",
336
+ "cmdk": "^1.0.4",
337
+ "embla-carousel-react": "^8.5.1",
338
+ "framer-motion": "^11.11.17",
339
339
  "lucide-react": "^0.424.0",
340
340
  "react": "^18.3.1",
341
341
  "react-dom": "^18.3.1",
342
- "react-hook-form": "^7.53.0",
342
+ "react-hook-form": "^7.53.2",
343
343
  "react-spinners": "^0.14.1",
344
- "tailwind-merge": "^2.4.0",
344
+ "tailwind-merge": "^2.5.5",
345
345
  "zod": "^3.23.8"
346
346
  }
347
347
  }