@salesforce/webapp-template-feature-react-chart-experimental 1.62.0 → 1.63.0

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.
Files changed (24) hide show
  1. package/dist/.a4drules/webapp.md +0 -2
  2. package/dist/CHANGELOG.md +27 -0
  3. package/dist/force-app/main/default/webapplications/feature-react-chart/package-lock.json +22 -22
  4. package/dist/force-app/main/default/webapplications/feature-react-chart/package.json +4 -4
  5. package/dist/force-app/main/default/webapplications/feature-react-chart/src/components/ui/alert.tsx +61 -54
  6. package/dist/force-app/main/default/webapplications/feature-react-chart/src/components/ui/button.tsx +57 -57
  7. package/dist/force-app/main/default/webapplications/feature-react-chart/src/components/ui/card.tsx +86 -75
  8. package/dist/force-app/main/default/webapplications/feature-react-chart/src/components/ui/dialog.tsx +129 -110
  9. package/dist/force-app/main/default/webapplications/feature-react-chart/src/components/ui/field.tsx +208 -193
  10. package/dist/force-app/main/default/webapplications/feature-react-chart/src/components/ui/index.ts +64 -64
  11. package/dist/force-app/main/default/webapplications/feature-react-chart/src/components/ui/input.tsx +14 -14
  12. package/dist/force-app/main/default/webapplications/feature-react-chart/src/components/ui/label.tsx +17 -14
  13. package/dist/force-app/main/default/webapplications/feature-react-chart/src/components/ui/pagination.tsx +108 -88
  14. package/dist/force-app/main/default/webapplications/feature-react-chart/src/components/ui/select.tsx +156 -146
  15. package/dist/force-app/main/default/webapplications/feature-react-chart/src/components/ui/separator.tsx +19 -19
  16. package/dist/force-app/main/default/webapplications/feature-react-chart/src/components/ui/skeleton.tsx +10 -10
  17. package/dist/force-app/main/default/webapplications/feature-react-chart/src/components/ui/spinner.tsx +12 -11
  18. package/dist/force-app/main/default/webapplications/feature-react-chart/src/components/ui/table.tsx +96 -69
  19. package/dist/force-app/main/default/webapplications/feature-react-chart/src/components/ui/tabs.tsx +71 -61
  20. package/dist/force-app/main/default/webapplications/feature-react-chart/src/components.json +1 -1
  21. package/dist/force-app/main/default/webapplications/feature-react-chart/src/lib/utils.ts +3 -3
  22. package/dist/force-app/main/default/webapplications/feature-react-chart/src/styles/global.css +107 -107
  23. package/dist/package.json +1 -1
  24. package/package.json +3 -4
@@ -75,8 +75,6 @@ Agents consistently miss these. **You must not leave them default.**
75
75
  - **Motion:** Use high-impact motion (e.g. staggered reveals).
76
76
  - **Depth:** Add atmosphere/depth in backgrounds.
77
77
 
78
- Follow **webapplications-design-system** expert knowledge for full guidance.
79
-
80
78
  # Development Cycle
81
79
 
82
80
  - Execute tasks continuously until all planned items complete in the current iteration.
package/dist/CHANGELOG.md CHANGED
@@ -3,6 +3,33 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [1.63.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.62.2...v1.63.0) (2026-03-03)
7
+
8
+
9
+ ### Features
10
+
11
+ * move shadcn UI into base-react-app ([#188](https://github.com/salesforce-experience-platform-emu/webapps/issues/188)) ([366443f](https://github.com/salesforce-experience-platform-emu/webapps/commit/366443f626c5232ca56c6a5dc6da874bfb955f22))
12
+
13
+
14
+
15
+
16
+
17
+ ## [1.62.2](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.62.1...v1.62.2) (2026-03-02)
18
+
19
+ **Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
20
+
21
+
22
+
23
+
24
+
25
+ ## [1.62.1](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.62.0...v1.62.1) (2026-03-02)
26
+
27
+ **Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
28
+
29
+
30
+
31
+
32
+
6
33
  # [1.62.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.61.4...v1.62.0) (2026-03-02)
7
34
 
8
35
  **Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
@@ -8,8 +8,8 @@
8
8
  "name": "base-react-app",
9
9
  "version": "1.59.0",
10
10
  "dependencies": {
11
- "@salesforce/sdk-data": "^1.11.2",
12
- "@salesforce/webapp-experimental": "*",
11
+ "@salesforce/sdk-data": "^1.63.0",
12
+ "@salesforce/webapp-experimental": "^1.63.0",
13
13
  "@tailwindcss/vite": "^4.1.17",
14
14
  "class-variance-authority": "^0.7.1",
15
15
  "clsx": "^2.1.1",
@@ -20,7 +20,7 @@
20
20
  "react-router": "^7.10.1",
21
21
  "recharts": "^2.15.4",
22
22
  "shadcn": "^3.8.5",
23
- "tailwind-merge": "^3.5.0",
23
+ "tailwind-merge": "^3.4.0",
24
24
  "tailwindcss": "^4.1.17",
25
25
  "tw-animate-css": "^1.4.0"
26
26
  },
@@ -32,7 +32,7 @@
32
32
  "@graphql-eslint/eslint-plugin": "^4.1.0",
33
33
  "@graphql-tools/utils": "^11.0.0",
34
34
  "@playwright/test": "^1.49.0",
35
- "@salesforce/vite-plugin-webapp-experimental": "*",
35
+ "@salesforce/vite-plugin-webapp-experimental": "^1.63.0",
36
36
  "@testing-library/jest-dom": "^6.6.3",
37
37
  "@testing-library/react": "^16.1.0",
38
38
  "@testing-library/user-event": "^14.5.2",
@@ -6069,19 +6069,19 @@
6069
6069
  }
6070
6070
  },
6071
6071
  "node_modules/@salesforce/sdk-core": {
6072
- "version": "1.61.4",
6073
- "resolved": "https://registry.npmjs.org/@salesforce/sdk-core/-/sdk-core-1.61.4.tgz",
6074
- "integrity": "sha512-bP3IyVitF00jZlxJjlC/pazMvpkJWsUc4kmDOIVC/0wYvv4MZ3fHcEtwlASKrJi3MCBkhuEoHE2jdPCuPgDt1A==",
6072
+ "version": "1.63.0",
6073
+ "resolved": "https://registry.npmjs.org/@salesforce/sdk-core/-/sdk-core-1.63.0.tgz",
6074
+ "integrity": "sha512-Xsy+yyEv9JC9TcWEvlrZ8oxVCT8zISAvEI3WSwWY0syylmHSQ4N+VrNpenT6L9FTMBUElJs8OAV4wz9Wt0O5EA==",
6075
6075
  "license": "SEE LICENSE IN LICENSE.txt"
6076
6076
  },
6077
6077
  "node_modules/@salesforce/sdk-data": {
6078
- "version": "1.61.4",
6079
- "resolved": "https://registry.npmjs.org/@salesforce/sdk-data/-/sdk-data-1.61.4.tgz",
6080
- "integrity": "sha512-wE07yl9Y+x0340OwWFxxxblLqSB9znxWytjkgU3R99Lu6omsbrd8d9dutbK4KddFpawqiUcJsBSEcmQ3MieTvA==",
6078
+ "version": "1.63.0",
6079
+ "resolved": "https://registry.npmjs.org/@salesforce/sdk-data/-/sdk-data-1.63.0.tgz",
6080
+ "integrity": "sha512-0jLD37AerPJ5Pp0X/jylpQZSo65qsK2D3fyAjo96eKhuo2P35V3CVRQyw/FeP1a+Ug9tWbj9DeNDkufVYisJiA==",
6081
6081
  "license": "SEE LICENSE IN LICENSE.txt",
6082
6082
  "dependencies": {
6083
6083
  "@conduit-client/salesforce-lightning-service-worker": "^3.7.0",
6084
- "@salesforce/sdk-core": "^1.61.4"
6084
+ "@salesforce/sdk-core": "^1.63.0"
6085
6085
  }
6086
6086
  },
6087
6087
  "node_modules/@salesforce/ts-types": {
@@ -6094,15 +6094,15 @@
6094
6094
  }
6095
6095
  },
6096
6096
  "node_modules/@salesforce/vite-plugin-webapp-experimental": {
6097
- "version": "1.61.4",
6098
- "resolved": "https://registry.npmjs.org/@salesforce/vite-plugin-webapp-experimental/-/vite-plugin-webapp-experimental-1.61.4.tgz",
6099
- "integrity": "sha512-jEaNobrr673c/83yNLMqFw9jThMS9jtx4HUiTCUzWUnkSU611sDlABqyxuQMY+Un5qkR1wLBwvPbtSvkzpBuNQ==",
6097
+ "version": "1.63.0",
6098
+ "resolved": "https://registry.npmjs.org/@salesforce/vite-plugin-webapp-experimental/-/vite-plugin-webapp-experimental-1.63.0.tgz",
6099
+ "integrity": "sha512-93TLZiGMChzMCoHBBP5digBjyh/YJjeyBLPuXTw0iuB3KEhQOnaAeonpRZnow5gtWGJwyARcDLgTPDyP1AA8Vw==",
6100
6100
  "dev": true,
6101
6101
  "license": "SEE LICENSE IN LICENSE.txt",
6102
6102
  "dependencies": {
6103
6103
  "@babel/core": "^7.28.4",
6104
6104
  "@babel/helper-plugin-utils": "^7.28.3",
6105
- "@salesforce/webapp-experimental": "^1.61.4"
6105
+ "@salesforce/webapp-experimental": "^1.63.0"
6106
6106
  },
6107
6107
  "engines": {
6108
6108
  "node": ">=20.0.0"
@@ -6112,13 +6112,13 @@
6112
6112
  }
6113
6113
  },
6114
6114
  "node_modules/@salesforce/webapp-experimental": {
6115
- "version": "1.61.4",
6116
- "resolved": "https://registry.npmjs.org/@salesforce/webapp-experimental/-/webapp-experimental-1.61.4.tgz",
6117
- "integrity": "sha512-yd5jHjImF/HhBsGC6670zQbX2PP3MVXzIVNbHeqOlSGsU8L4caOPk7AwiugTFhsApfEPAjtTFcdXT0ijol7eUg==",
6115
+ "version": "1.63.0",
6116
+ "resolved": "https://registry.npmjs.org/@salesforce/webapp-experimental/-/webapp-experimental-1.63.0.tgz",
6117
+ "integrity": "sha512-fJn3uprbLs9nC7aq5Yvg7rAdnu7epUzBw/n9KS9hQ40OCYs8b765uCLGCxZzzAJV5b8YVbdTz1x9dWpyV1ceRQ==",
6118
6118
  "license": "SEE LICENSE IN LICENSE.txt",
6119
6119
  "dependencies": {
6120
6120
  "@salesforce/core": "^8.23.4",
6121
- "@salesforce/sdk-data": "^1.61.4",
6121
+ "@salesforce/sdk-data": "^1.63.0",
6122
6122
  "axios": "^1.7.7",
6123
6123
  "micromatch": "^4.0.8",
6124
6124
  "path-to-regexp": "^8.3.0"
@@ -14834,9 +14834,9 @@
14834
14834
  }
14835
14835
  },
14836
14836
  "node_modules/postcss": {
14837
- "version": "8.5.6",
14838
- "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz",
14839
- "integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==",
14837
+ "version": "8.5.8",
14838
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.8.tgz",
14839
+ "integrity": "sha512-OW/rX8O/jXnm82Ey1k44pObPtdblfiuWnrd8X7GJ7emImCOstunGbXUpp7HdBrFQX6rJzn3sPT397Wp5aCwCHg==",
14840
14840
  "funding": [
14841
14841
  {
14842
14842
  "type": "opencollective",
@@ -15,8 +15,8 @@
15
15
  "graphql:schema": "node scripts/get-graphql-schema.mjs"
16
16
  },
17
17
  "dependencies": {
18
- "@salesforce/sdk-data": "^1.11.2",
19
- "@salesforce/webapp-experimental": "*",
18
+ "@salesforce/sdk-data": "^1.63.0",
19
+ "@salesforce/webapp-experimental": "^1.63.0",
20
20
  "@tailwindcss/vite": "^4.1.17",
21
21
  "class-variance-authority": "^0.7.1",
22
22
  "clsx": "^2.1.1",
@@ -27,7 +27,7 @@
27
27
  "react-router": "^7.10.1",
28
28
  "recharts": "^2.15.4",
29
29
  "shadcn": "^3.8.5",
30
- "tailwind-merge": "^3.5.0",
30
+ "tailwind-merge": "^3.4.0",
31
31
  "tailwindcss": "^4.1.17",
32
32
  "tw-animate-css": "^1.4.0"
33
33
  },
@@ -39,7 +39,7 @@
39
39
  "@graphql-eslint/eslint-plugin": "^4.1.0",
40
40
  "@graphql-tools/utils": "^11.0.0",
41
41
  "@playwright/test": "^1.49.0",
42
- "@salesforce/vite-plugin-webapp-experimental": "*",
42
+ "@salesforce/vite-plugin-webapp-experimental": "^1.63.0",
43
43
  "@testing-library/jest-dom": "^6.6.3",
44
44
  "@testing-library/react": "^16.1.0",
45
45
  "@testing-library/user-event": "^14.5.2",
@@ -1,69 +1,76 @@
1
- import * as React from "react";
2
- import { cva, type VariantProps } from "class-variance-authority";
1
+ import * as React from 'react';
2
+ import { cva, type VariantProps } from 'class-variance-authority';
3
3
 
4
- import { cn } from "../../lib/utils";
4
+ import { cn } from '../../lib/utils';
5
5
 
6
6
  const alertVariants = cva(
7
- "grid gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4 w-full relative group/alert",
8
- {
9
- variants: {
10
- variant: {
11
- default: "bg-card text-card-foreground",
12
- destructive:
13
- "text-destructive bg-card *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current",
14
- },
15
- },
16
- defaultVariants: {
17
- variant: "default",
18
- },
19
- },
7
+ "grid gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4 w-full relative group/alert",
8
+ {
9
+ variants: {
10
+ variant: {
11
+ default: 'bg-card text-card-foreground',
12
+ destructive:
13
+ 'text-destructive bg-card *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current',
14
+ },
15
+ },
16
+ defaultVariants: {
17
+ variant: 'default',
18
+ },
19
+ }
20
20
  );
21
21
 
22
22
  function Alert({
23
- className,
24
- variant,
25
- ...props
26
- }: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>) {
27
- return (
28
- <div
29
- data-slot="alert"
30
- role="alert"
31
- className={cn(alertVariants({ variant }), className)}
32
- {...props}
33
- />
34
- );
23
+ className,
24
+ variant,
25
+ ...props
26
+ }: React.ComponentProps<'div'> & VariantProps<typeof alertVariants>) {
27
+ return (
28
+ <div
29
+ data-slot="alert"
30
+ role="alert"
31
+ className={cn(alertVariants({ variant }), className)}
32
+ {...props}
33
+ />
34
+ );
35
35
  }
36
36
 
37
- function AlertTitle({ className, ...props }: React.ComponentProps<"div">) {
38
- return (
39
- <div
40
- data-slot="alert-title"
41
- className={cn(
42
- "font-medium group-has-[>svg]/alert:col-start-2 [&_a]:hover:text-foreground [&_a]:underline [&_a]:underline-offset-3",
43
- className,
44
- )}
45
- {...props}
46
- />
47
- );
37
+ function AlertTitle({ className, ...props }: React.ComponentProps<'div'>) {
38
+ return (
39
+ <div
40
+ data-slot="alert-title"
41
+ className={cn(
42
+ 'font-medium group-has-[>svg]/alert:col-start-2 [&_a]:hover:text-foreground [&_a]:underline [&_a]:underline-offset-3',
43
+ className
44
+ )}
45
+ {...props}
46
+ />
47
+ );
48
48
  }
49
49
 
50
- function AlertDescription({ className, ...props }: React.ComponentProps<"div">) {
51
- return (
52
- <div
53
- data-slot="alert-description"
54
- className={cn(
55
- "text-muted-foreground text-sm text-balance md:text-pretty [&_p:not(:last-child)]:mb-4 [&_a]:hover:text-foreground [&_a]:underline [&_a]:underline-offset-3",
56
- className,
57
- )}
58
- {...props}
59
- />
60
- );
50
+ function AlertDescription({
51
+ className,
52
+ ...props
53
+ }: React.ComponentProps<'div'>) {
54
+ return (
55
+ <div
56
+ data-slot="alert-description"
57
+ className={cn(
58
+ 'text-muted-foreground text-sm text-balance md:text-pretty [&_p:not(:last-child)]:mb-4 [&_a]:hover:text-foreground [&_a]:underline [&_a]:underline-offset-3',
59
+ className
60
+ )}
61
+ {...props}
62
+ />
63
+ );
61
64
  }
62
65
 
63
- function AlertAction({ className, ...props }: React.ComponentProps<"div">) {
64
- return (
65
- <div data-slot="alert-action" className={cn("absolute top-2 right-2", className)} {...props} />
66
- );
66
+ function AlertAction({ className, ...props }: React.ComponentProps<'div'>) {
67
+ return (
68
+ <div
69
+ data-slot="alert-action"
70
+ className={cn('absolute top-2 right-2', className)}
71
+ {...props}
72
+ />
73
+ );
67
74
  }
68
75
 
69
76
  export { Alert, AlertTitle, AlertDescription, AlertAction };
@@ -1,67 +1,67 @@
1
- import * as React from "react";
2
- import { cva, type VariantProps } from "class-variance-authority";
3
- import { Slot } from "radix-ui";
1
+ import * as React from 'react';
2
+ import { cva, type VariantProps } from 'class-variance-authority';
3
+ import { Slot } from 'radix-ui';
4
4
 
5
- import { cn } from "../../lib/utils";
5
+ import { cn } from '../../lib/utils';
6
6
 
7
7
  const buttonVariants = cva(
8
- "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-lg border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-3 aria-invalid:ring-3 [&_svg:not([class*='size-'])]:size-4 inline-flex items-center justify-center whitespace-nowrap transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-none group/button select-none",
9
- {
10
- variants: {
11
- variant: {
12
- default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
13
- outline:
14
- "border-border bg-background hover:bg-muted hover:text-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground",
15
- secondary:
16
- "bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
17
- ghost:
18
- "hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground",
19
- destructive:
20
- "bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30",
21
- link: "text-primary underline-offset-4 hover:underline",
22
- },
23
- size: {
24
- default:
25
- "h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
26
- xs: "h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
27
- sm: "h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",
28
- lg: "h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",
29
- icon: "size-8",
30
- "icon-xs":
31
- "size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3",
32
- "icon-sm":
33
- "size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg",
34
- "icon-lg": "size-9",
35
- },
36
- },
37
- defaultVariants: {
38
- variant: "default",
39
- size: "default",
40
- },
41
- },
8
+ "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-lg border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-3 aria-invalid:ring-3 [&_svg:not([class*='size-'])]:size-4 inline-flex items-center justify-center whitespace-nowrap transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-none group/button select-none",
9
+ {
10
+ variants: {
11
+ variant: {
12
+ default: 'bg-primary text-primary-foreground [a]:hover:bg-primary/80',
13
+ outline:
14
+ 'border-border bg-background hover:bg-muted hover:text-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground',
15
+ secondary:
16
+ 'bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground',
17
+ ghost:
18
+ 'hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground',
19
+ destructive:
20
+ 'bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30',
21
+ link: 'text-primary underline-offset-4 hover:underline',
22
+ },
23
+ size: {
24
+ default:
25
+ 'h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2',
26
+ xs: "h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
27
+ sm: "h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",
28
+ lg: 'h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3',
29
+ icon: 'size-8',
30
+ 'icon-xs':
31
+ "size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3",
32
+ 'icon-sm':
33
+ 'size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg',
34
+ 'icon-lg': 'size-9',
35
+ },
36
+ },
37
+ defaultVariants: {
38
+ variant: 'default',
39
+ size: 'default',
40
+ },
41
+ }
42
42
  );
43
43
 
44
44
  function Button({
45
- className,
46
- variant = "default",
47
- size = "default",
48
- asChild = false,
49
- ...props
50
- }: React.ComponentProps<"button"> &
51
- VariantProps<typeof buttonVariants> & {
52
- asChild?: boolean;
53
- }) {
54
- const Comp = asChild ? Slot.Root : "button";
45
+ className,
46
+ variant = 'default',
47
+ size = 'default',
48
+ asChild = false,
49
+ ...props
50
+ }: React.ComponentProps<'button'> &
51
+ VariantProps<typeof buttonVariants> & {
52
+ asChild?: boolean;
53
+ }) {
54
+ const Comp = asChild ? Slot.Root : 'button';
55
55
 
56
- return (
57
- <Comp
58
- data-slot="button"
59
- data-variant={variant}
60
- data-size={size}
61
- className={cn(buttonVariants({ variant, size, className }))}
62
- {...(props as any)}
63
- />
64
- );
56
+ return (
57
+ <Comp
58
+ data-slot="button"
59
+ data-variant={variant}
60
+ data-size={size}
61
+ className={cn(buttonVariants({ variant, size, className }))}
62
+ {...(props as any)}
63
+ />
64
+ );
65
65
  }
66
66
 
67
67
  export { Button, buttonVariants };
@@ -1,92 +1,103 @@
1
- import * as React from "react";
1
+ import * as React from 'react';
2
2
 
3
- import { cn } from "../../lib/utils";
3
+ import { cn } from '../../lib/utils';
4
4
 
5
5
  function Card({
6
- className,
7
- size = "default",
8
- ...props
9
- }: React.ComponentProps<"div"> & { size?: "default" | "sm" }) {
10
- return (
11
- <div
12
- data-slot="card"
13
- data-size={size}
14
- className={cn(
15
- "ring-foreground/10 bg-card text-card-foreground gap-4 overflow-hidden rounded-xl py-4 text-sm ring-1 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl group/card flex flex-col",
16
- className,
17
- )}
18
- {...props}
19
- />
20
- );
6
+ className,
7
+ size = 'default',
8
+ ...props
9
+ }: React.ComponentProps<'div'> & { size?: 'default' | 'sm' }) {
10
+ return (
11
+ <div
12
+ data-slot="card"
13
+ data-size={size}
14
+ className={cn(
15
+ 'ring-foreground/10 bg-card text-card-foreground gap-4 overflow-hidden rounded-xl py-4 text-sm ring-1 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl group/card flex flex-col',
16
+ className
17
+ )}
18
+ {...props}
19
+ />
20
+ );
21
21
  }
22
22
 
23
- function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
24
- return (
25
- <div
26
- data-slot="card-header"
27
- className={cn(
28
- "gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3 group/card-header @container/card-header grid auto-rows-min items-start has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto]",
29
- className,
30
- )}
31
- {...props}
32
- />
33
- );
23
+ function CardHeader({ className, ...props }: React.ComponentProps<'div'>) {
24
+ return (
25
+ <div
26
+ data-slot="card-header"
27
+ className={cn(
28
+ 'gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3 group/card-header @container/card-header grid auto-rows-min items-start has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto]',
29
+ className
30
+ )}
31
+ {...props}
32
+ />
33
+ );
34
34
  }
35
35
 
36
- function CardTitle({ className, ...props }: React.ComponentProps<"div">) {
37
- return (
38
- <div
39
- data-slot="card-title"
40
- className={cn(
41
- "text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",
42
- className,
43
- )}
44
- {...props}
45
- />
46
- );
36
+ function CardTitle({ className, ...props }: React.ComponentProps<'div'>) {
37
+ return (
38
+ <div
39
+ data-slot="card-title"
40
+ className={cn(
41
+ 'text-base leading-snug font-medium group-data-[size=sm]/card:text-sm',
42
+ className
43
+ )}
44
+ {...props}
45
+ />
46
+ );
47
47
  }
48
48
 
49
- function CardDescription({ className, ...props }: React.ComponentProps<"div">) {
50
- return (
51
- <div
52
- data-slot="card-description"
53
- className={cn("text-muted-foreground text-sm", className)}
54
- {...props}
55
- />
56
- );
49
+ function CardDescription({ className, ...props }: React.ComponentProps<'div'>) {
50
+ return (
51
+ <div
52
+ data-slot="card-description"
53
+ className={cn('text-muted-foreground text-sm', className)}
54
+ {...props}
55
+ />
56
+ );
57
57
  }
58
58
 
59
- function CardAction({ className, ...props }: React.ComponentProps<"div">) {
60
- return (
61
- <div
62
- data-slot="card-action"
63
- className={cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end", className)}
64
- {...props}
65
- />
66
- );
59
+ function CardAction({ className, ...props }: React.ComponentProps<'div'>) {
60
+ return (
61
+ <div
62
+ data-slot="card-action"
63
+ className={cn(
64
+ 'col-start-2 row-span-2 row-start-1 self-start justify-self-end',
65
+ className
66
+ )}
67
+ {...props}
68
+ />
69
+ );
67
70
  }
68
71
 
69
- function CardContent({ className, ...props }: React.ComponentProps<"div">) {
70
- return (
71
- <div
72
- data-slot="card-content"
73
- className={cn("px-4 group-data-[size=sm]/card:px-3", className)}
74
- {...props}
75
- />
76
- );
72
+ function CardContent({ className, ...props }: React.ComponentProps<'div'>) {
73
+ return (
74
+ <div
75
+ data-slot="card-content"
76
+ className={cn('px-4 group-data-[size=sm]/card:px-3', className)}
77
+ {...props}
78
+ />
79
+ );
77
80
  }
78
81
 
79
- function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
80
- return (
81
- <div
82
- data-slot="card-footer"
83
- className={cn(
84
- "bg-muted/50 rounded-b-xl border-t p-4 group-data-[size=sm]/card:p-3 flex items-center",
85
- className,
86
- )}
87
- {...props}
88
- />
89
- );
82
+ function CardFooter({ className, ...props }: React.ComponentProps<'div'>) {
83
+ return (
84
+ <div
85
+ data-slot="card-footer"
86
+ className={cn(
87
+ 'bg-muted/50 rounded-b-xl border-t p-4 group-data-[size=sm]/card:p-3 flex items-center',
88
+ className
89
+ )}
90
+ {...props}
91
+ />
92
+ );
90
93
  }
91
94
 
92
- export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent };
95
+ export {
96
+ Card,
97
+ CardHeader,
98
+ CardFooter,
99
+ CardTitle,
100
+ CardAction,
101
+ CardDescription,
102
+ CardContent,
103
+ };