@nswds/ui 3.5.4 → 4.0.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.
- package/README.md +4 -2
- package/dist/components/aspect-ratio.d.ts +7 -0
- package/dist/components/aspect-ratio.js +24 -0
- package/dist/components/aspect-ratio.js.map +1 -0
- package/dist/components/collapsible.d.ts +8 -0
- package/dist/components/collapsible.js +17 -0
- package/dist/components/collapsible.js.map +1 -0
- package/dist/components/drawer.d.ts +15 -0
- package/dist/components/drawer.js +118 -0
- package/dist/components/drawer.js.map +1 -0
- package/dist/components/hover-card.d.ts +8 -0
- package/dist/components/hover-card.js +45 -0
- package/dist/components/hover-card.js.map +1 -0
- package/dist/components/popover.d.ts +11 -0
- package/dist/components/popover.js +78 -0
- package/dist/components/popover.js.map +1 -0
- package/dist/components/resizable.d.ts +10 -0
- package/dist/components/resizable.js +46 -0
- package/dist/components/resizable.js.map +1 -0
- package/dist/components/scroll-area.d.ts +7 -0
- package/dist/components/scroll-area.js +61 -0
- package/dist/components/scroll-area.js.map +1 -0
- package/dist/components/sheet.d.ts +16 -0
- package/dist/components/sheet.js +122 -0
- package/dist/components/sheet.js.map +1 -0
- package/dist/components/sonner.d.ts +6 -0
- package/dist/components/sonner.js +40 -0
- package/dist/components/sonner.js.map +1 -0
- package/dist/components/tooltip.d.ts +9 -0
- package/dist/components/tooltip.js +63 -0
- package/dist/components/tooltip.js.map +1 -0
- package/dist/index.d.ts +20 -2
- package/dist/index.js +10 -1
- package/dist/styles.css +1 -1
- package/package.json +7 -3
- package/dist/components/description-list.d.ts +0 -16
- package/dist/components/description-list.js +0 -58
- package/dist/components/description-list.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nswds/ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "UI components for NSW Government digital products, providing reusable design elements and patterns for consistent user interfaces.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/digitalnsw/nswds-ui#readme",
|
|
@@ -52,10 +52,13 @@
|
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"@base-ui/react": "^1.5.0",
|
|
55
|
-
"@nswds/tokens": "^4.1.0",
|
|
56
55
|
"class-variance-authority": "^0.7.1",
|
|
57
56
|
"clsx": "^2.1.1",
|
|
58
|
-
"
|
|
57
|
+
"next-themes": "^0.4.6",
|
|
58
|
+
"react-resizable-panels": "^4.11.2",
|
|
59
|
+
"sonner": "^2.0.7",
|
|
60
|
+
"tailwind-merge": "^3.6.0",
|
|
61
|
+
"vaul": "^1.1.2"
|
|
59
62
|
},
|
|
60
63
|
"peerDependencies": {
|
|
61
64
|
"react": "^19.0.0",
|
|
@@ -63,6 +66,7 @@
|
|
|
63
66
|
},
|
|
64
67
|
"devDependencies": {
|
|
65
68
|
"@arethetypeswrong/cli": "^0.18.3",
|
|
69
|
+
"@nswds/tokens": "^4.1.0",
|
|
66
70
|
"@storybook/addon-docs": "10.5.0-alpha.2",
|
|
67
71
|
"@storybook/react-vite": "10.5.0-alpha.2",
|
|
68
72
|
"@tailwindcss/cli": "^4.3.0",
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
|
|
3
|
-
declare function DescriptionList({ className, ref, ...props }: React.ComponentPropsWithoutRef<'dl'> & {
|
|
4
|
-
ref?: React.Ref<HTMLDListElement>;
|
|
5
|
-
}): React.JSX.Element;
|
|
6
|
-
declare function DescriptionTerm({ className, ref, ...props }: React.ComponentPropsWithoutRef<'dt'> & {
|
|
7
|
-
ref?: React.Ref<HTMLElement>;
|
|
8
|
-
}): React.JSX.Element;
|
|
9
|
-
declare function DescriptionDetails({ className, ref, ...props }: React.ComponentPropsWithoutRef<'dd'> & {
|
|
10
|
-
ref?: React.Ref<HTMLElement>;
|
|
11
|
-
}): React.JSX.Element;
|
|
12
|
-
type DescriptionListProps = React.ComponentProps<typeof DescriptionList>;
|
|
13
|
-
type DescriptionTermProps = React.ComponentProps<typeof DescriptionTerm>;
|
|
14
|
-
type DescriptionDetailsProps = React.ComponentProps<typeof DescriptionDetails>;
|
|
15
|
-
|
|
16
|
-
export { DescriptionDetails, type DescriptionDetailsProps, DescriptionList, type DescriptionListProps, DescriptionTerm, type DescriptionTermProps };
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { cn } from '../lib/utils.js';
|
|
3
|
-
|
|
4
|
-
function DescriptionList({
|
|
5
|
-
className,
|
|
6
|
-
ref,
|
|
7
|
-
...props
|
|
8
|
-
}) {
|
|
9
|
-
return /* @__PURE__ */ jsx(
|
|
10
|
-
"dl",
|
|
11
|
-
{
|
|
12
|
-
ref,
|
|
13
|
-
...props,
|
|
14
|
-
className: cn(
|
|
15
|
-
"grid grid-cols-1 text-base/6 sm:grid-cols-[min(50%,--spacing(80))_auto] sm:text-sm/6",
|
|
16
|
-
className
|
|
17
|
-
)
|
|
18
|
-
}
|
|
19
|
-
);
|
|
20
|
-
}
|
|
21
|
-
function DescriptionTerm({
|
|
22
|
-
className,
|
|
23
|
-
ref,
|
|
24
|
-
...props
|
|
25
|
-
}) {
|
|
26
|
-
return /* @__PURE__ */ jsx(
|
|
27
|
-
"dt",
|
|
28
|
-
{
|
|
29
|
-
ref,
|
|
30
|
-
...props,
|
|
31
|
-
className: cn(
|
|
32
|
-
"col-start-1 border-t border-border pt-3 text-muted-foreground first:border-none sm:border-t sm:py-3",
|
|
33
|
-
className
|
|
34
|
-
)
|
|
35
|
-
}
|
|
36
|
-
);
|
|
37
|
-
}
|
|
38
|
-
function DescriptionDetails({
|
|
39
|
-
className,
|
|
40
|
-
ref,
|
|
41
|
-
...props
|
|
42
|
-
}) {
|
|
43
|
-
return /* @__PURE__ */ jsx(
|
|
44
|
-
"dd",
|
|
45
|
-
{
|
|
46
|
-
ref,
|
|
47
|
-
...props,
|
|
48
|
-
className: cn(
|
|
49
|
-
"pt-1 pb-3 text-foreground sm:border-t sm:border-border sm:py-3 sm:[&:nth-child(2)]:border-none",
|
|
50
|
-
className
|
|
51
|
-
)
|
|
52
|
-
}
|
|
53
|
-
);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export { DescriptionDetails, DescriptionList, DescriptionTerm };
|
|
57
|
-
//# sourceMappingURL=description-list.js.map
|
|
58
|
-
//# sourceMappingURL=description-list.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/description-list.tsx"],"names":[],"mappings":";;;AAIO,SAAS,eAAA,CAAgB;AAAA,EAC9B,SAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAG;AACL,CAAA,EAEG;AACD,EAAA,uBACE,GAAA;AAAA,IAAC,IAAA;AAAA,IAAA;AAAA,MACC,GAAA;AAAA,MACC,GAAG,KAAA;AAAA,MACJ,SAAA,EAAW,EAAA;AAAA,QACT,sFAAA;AAAA,QACA;AAAA;AACF;AAAA,GACF;AAEJ;AAEO,SAAS,eAAA,CAAgB;AAAA,EAC9B,SAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAG;AACL,CAAA,EAEG;AACD,EAAA,uBACE,GAAA;AAAA,IAAC,IAAA;AAAA,IAAA;AAAA,MACC,GAAA;AAAA,MACC,GAAG,KAAA;AAAA,MACJ,SAAA,EAAW,EAAA;AAAA,QACT,qGAAA;AAAA,QACA;AAAA;AACF;AAAA,GACF;AAEJ;AAEO,SAAS,kBAAA,CAAmB;AAAA,EACjC,SAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAG;AACL,CAAA,EAEG;AACD,EAAA,uBACE,GAAA;AAAA,IAAC,IAAA;AAAA,IAAA;AAAA,MACC,GAAA;AAAA,MACC,GAAG,KAAA;AAAA,MACJ,SAAA,EAAW,EAAA;AAAA,QACT,gGAAA;AAAA,QACA;AAAA;AACF;AAAA,GACF;AAEJ","file":"description-list.js","sourcesContent":["import type * as React from 'react'\n\nimport { cn } from '../lib/utils.js'\n\nexport function DescriptionList({\n className,\n ref,\n ...props\n}: React.ComponentPropsWithoutRef<'dl'> & {\n ref?: React.Ref<HTMLDListElement>\n}) {\n return (\n <dl\n ref={ref}\n {...props}\n className={cn(\n 'grid grid-cols-1 text-base/6 sm:grid-cols-[min(50%,--spacing(80))_auto] sm:text-sm/6',\n className\n )}\n />\n )\n}\n\nexport function DescriptionTerm({\n className,\n ref,\n ...props\n}: React.ComponentPropsWithoutRef<'dt'> & {\n ref?: React.Ref<HTMLElement>\n}) {\n return (\n <dt\n ref={ref}\n {...props}\n className={cn(\n 'col-start-1 border-t border-border pt-3 text-muted-foreground first:border-none sm:border-t sm:py-3',\n className\n )}\n />\n )\n}\n\nexport function DescriptionDetails({\n className,\n ref,\n ...props\n}: React.ComponentPropsWithoutRef<'dd'> & {\n ref?: React.Ref<HTMLElement>\n}) {\n return (\n <dd\n ref={ref}\n {...props}\n className={cn(\n 'pt-1 pb-3 text-foreground sm:border-t sm:border-border sm:py-3 sm:[&:nth-child(2)]:border-none',\n className\n )}\n />\n )\n}\n\nexport type DescriptionListProps = React.ComponentProps<typeof DescriptionList>\nexport type DescriptionTermProps = React.ComponentProps<typeof DescriptionTerm>\nexport type DescriptionDetailsProps = React.ComponentProps<\n typeof DescriptionDetails\n>\n"]}
|