@nswds/ui 0.0.0 → 1.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.
@@ -1,57 +0,0 @@
1
- import clsx from 'clsx'
2
- import type { ComponentPropsWithoutRef } from 'react'
3
-
4
- type LogoProps = ComponentPropsWithoutRef<'svg'> & {
5
- logoType?: 'default' | 'reversed' | 'mono-white' | 'mono-black'
6
- }
7
-
8
- export function Logo({ logoType = 'default', ...props }: LogoProps) {
9
- return (
10
- <>
11
- <span className='sr-only'>NSW Government</span>
12
- <svg viewBox='0 0 259 280' aria-hidden='true' {...props}>
13
- <path
14
- fillRule='evenodd'
15
- clipRule='evenodd'
16
- d='M24.208 270.207h-5.045v-4.277l11.15.054v13.676H26.08v-2.491c-.266.278-.553.556-.86.833-.673.585-1.49 1.07-2.433 1.434-.96.373-2.143.564-3.513.564-2.33 0-4.385-.539-6.109-1.6-1.727-1.065-3.073-2.594-4.007-4.538-.926-1.927-1.395-4.231-1.395-6.85 0-2.657.494-4.994 1.47-6.946.971-1.96 2.363-3.498 4.132-4.571 1.768-1.065 3.849-1.604 6.183-1.604 1.515 0 2.915.245 4.156.725 1.255.485 2.36 1.157 3.273 1.985a9.61 9.61 0 0 1 2.192 2.852 8.196 8.196 0 0 1 .872 3.319l.021.435h-6.038l-.062-.339a5.22 5.22 0 0 0-.814-1.981 4.562 4.562 0 0 0-1.537-1.43c-.614-.352-1.345-.531-2.175-.531-1.005 0-1.931.261-2.741.775-.806.51-1.458 1.351-1.935 2.495-.486 1.169-.731 2.74-.731 4.679 0 1.579.162 2.897.482 3.925.311 1.011.739 1.819 1.266 2.403.523.581 1.117.991 1.773 1.219a6.036 6.036 0 0 0 2.089.369c.669 0 1.27-.112 1.79-.328.523-.224.98-.514 1.354-.866.377-.356.676-.746.884-1.152.216-.41.349-.816.399-1.21l.14-1.028Zm20.878-16.312c2.354 0 4.435.534 6.179 1.587 1.752 1.061 3.13 2.59 4.086 4.546.947 1.935 1.428 4.281 1.428 6.967 0 2.648-.473 4.969-1.412 6.9-.946 1.948-2.317 3.469-4.073 4.521-1.744 1.053-3.837 1.583-6.212 1.583-2.396 0-4.502-.534-6.254-1.583-1.753-1.044-3.135-2.557-4.099-4.505-.947-1.927-1.428-4.252-1.428-6.912 0-2.673.486-5.015 1.449-6.954.968-1.956 2.355-3.486 4.12-4.551 1.764-1.061 3.853-1.599 6.216-1.599Zm0 21.185c1.117 0 2.093-.265 2.898-.787.802-.523 1.433-1.372 1.881-2.516.453-1.185.686-2.772.686-4.712 0-1.993-.237-3.618-.698-4.832-.444-1.181-1.08-2.056-1.885-2.603-.814-.543-1.782-.82-2.878-.82-1.1 0-2.072.277-2.886.82-.81.543-1.453 1.422-1.906 2.611-.47 1.223-.706 2.843-.706 4.82 0 1.944.237 3.531.702 4.712.452 1.148 1.092 1.997 1.902 2.515.81.527 1.781.792 2.89.792Zm23.764-2.93-6.162-17.829H57.09l8.654 25.251h6.195l8.73-25.251h-5.607L68.85 272.15Zm30.312-2.827H88.863v5.206l12.043.016v5.027H83.103v-25.251h17.632l-.016 4.99H88.892v5.089h10.27v4.923Zm22.482-1.529c.685-.613 1.246-1.401 1.678-2.341.419-.933.635-2.081.635-3.419 0-1.497-.311-2.835-.93-3.983-.619-1.169-1.599-2.093-2.919-2.756-1.3-.647-2.973-.974-4.975-.974h-10.738v25.243h5.759v-9.404h4.24l3.991 9.404h6.046l-4.651-10.456c.673-.357 1.3-.8 1.864-1.314Zm-3.513-5.64c0 .999-.336 1.79-1.025 2.428-.69.63-1.649.949-2.857.949h-4.095v-6.606h4.456c1.038 0 1.873.286 2.545.875.657.576.976 1.347.976 2.354Zm15.159-7.833 10.527 15.23v-15.23h5.776v25.251h-5.086l-10.98-15.86v15.86h-5.759v-25.251h5.522Zm33.949 16.461-5.29-16.461h-7.894v25.251h5.809v-16.266l5.124 16.266h4.485l5.162-16.357v16.357h5.826v-25.251h-7.878l-5.344 16.461Zm33.727-1.459h-10.298v5.206l12.046.016v5.027h-17.806v-25.251h17.636l-.021 4.99h-11.818v5.089h10.261v4.923Zm21.494.228-10.523-15.23h-5.527v25.251h5.756v-15.86l10.979 15.86h5.087v-25.251h-5.772v15.23Zm15.586-10.004h-7.388v-5.226h20.402v5.226h-7.217v20.025h-5.797v-20.025Z'
17
- className={clsx(
18
- logoType === 'default' && 'fill-nsw-blue-800 dark:fill-white',
19
- (logoType === 'reversed' || logoType === 'mono-white') && 'fill-white',
20
- logoType === 'mono-black' && 'fill-black dark:fill-white',
21
- )}
22
- />
23
-
24
- <path
25
- fillRule='evenodd'
26
- clipRule='evenodd'
27
- d='M146.699 209.236c-1.482-2.395-3.717-4.571-6.64-6.465-2.919-1.894-6.897-3.34-11.81-4.297l-13.678-2.814c-4.132-.891-6.981-2.043-8.468-3.419-1.449-1.343-2.184-3.129-2.184-5.309 0-1.388.316-2.652.943-3.759.623-1.111 1.528-2.093 2.687-2.922 1.166-.828 2.616-1.483 4.306-1.943 1.711-.469 3.633-.705 5.714-.705 2.74 0 5.211.361 7.346 1.078 2.109.713 3.857 1.881 5.194 3.481 1.338 1.6 2.16 3.775 2.442 6.465l.038.373h16.971l-.008-.427c-.075-4.575-1.371-8.773-3.85-12.474-2.483-3.705-6.141-6.681-10.879-8.852-4.726-2.164-10.623-3.262-17.528-3.262-5.801 0-11.117 1.011-15.805 3.009-4.7 2.002-8.475 4.89-11.212 8.587-2.749 3.717-4.12 8.164-4.078 13.224.112 6.175 1.99 11.186 5.577 14.903 3.576 3.697 8.476 6.158 14.567 7.306l13.795 2.81c2.529.502 4.825 1.16 6.823 1.96 1.96.784 3.525 1.803 4.651 3.03 1.1 1.197 1.657 2.772 1.657 4.67 0 2.114-.694 3.9-2.06 5.301-1.4 1.434-3.301 2.515-5.643 3.224-2.388.721-5.058 1.086-7.936 1.086-2.807 0-5.394-.435-7.686-1.297-2.28-.85-4.194-2.093-5.689-3.693-1.491-1.591-2.513-3.585-3.04-5.918l-.075-.327H83.846l.045.46c.407 4.045 1.666 7.629 3.738 10.659 2.068 3.009 4.717 5.545 7.873 7.551 3.148 1.993 6.677 3.514 10.494 4.513a46.33 46.33 0 0 0 11.693 1.5c6.466 0 12.2-1.019 17.046-3.034 4.867-2.022 8.717-4.807 11.449-8.276 2.753-3.493 4.148-7.476 4.148-11.848 0-2.064-.232-4.36-.697-6.822-.478-2.482-1.466-4.948-2.936-7.327ZM25.937 191.763l36.916 53.312H77.87v-79.724H61.072v51.282L25.754 165.53l-.125-.179H9.19v79.724h16.748v-53.312Zm196.637 24.577 14.388-50.987h16.457l-23.587 79.724h-13.367l-14.554-50.469-14.659 50.469h-13.147l-23.533-79.724h16.511l14.384 50.979 14.389-50.979h12.167l14.551 50.987Z'
28
- className={clsx(
29
- logoType === 'default' && 'fill-nsw-blue-800 dark:fill-white',
30
- (logoType === 'reversed' || logoType === 'mono-white') && 'fill-white',
31
- logoType === 'mono-black' && 'fill-black dark:fill-white',
32
- )}
33
- />
34
-
35
- <path
36
- d='M122.291 145.572c-19.75-2.424-38.934 3.904-72.69-5.263-3.447-.937-4.718 2.694-2.854 5.736 9.07 14.803 54.881 3.203 75.635 1.065.906-.095.814-1.426-.091-1.538ZM208.735 140.309c-33.756 9.167-52.941 2.839-72.691 5.263-.905.112-1 1.447-.091 1.538 20.759 2.138 66.566 13.738 75.635-1.065 1.864-3.042.594-6.673-2.853-5.736ZM59.882 119.132c-6.864-10.058-12.474-21.31-16.818-33.69-13.101 3.826-26.51 9.346-40.16 16.57a5.388 5.388 0 0 0-2.902 4.67 5.38 5.38 0 0 0 2.653 4.812c26.431 15.802 52.273 24.841 76.93 26.933-7.34-4.475-14.072-11.044-19.703-19.295ZM23.059 85.513a201.529 201.529 0 0 1 17.976-6.233c-2.126-6.896-3.87-14.12-5.249-21.658-6.827-.85-13.89-1.4-21.199-1.641-.062 0-.128-.004-.19-.004a5.391 5.391 0 0 0-4.647 2.602 5.383 5.383 0 0 0-.12 5.483c4.243 7.659 8.724 14.808 13.429 21.45ZM88.005 135.572c4.099 1.807 8.293 2.818 12.358 3.029-9.953-7.12-17.773-19.192-22.278-34.58-5.805-19.81-7.745-41.666-5.83-65.247-7.832-4.936-16.32-9.557-25.46-13.85a5.428 5.428 0 0 0-5.402.43 5.396 5.396 0 0 0-2.388 4.841c2.126 34.215 10.95 62.915 26.223 85.298 6.404 9.391 14.281 16.332 22.777 20.079ZM107.488 23.577A253.323 253.323 0 0 0 92.235 6.735c-1.063-1.078-2.433-1.65-3.85-1.65-.506 0-1.017.075-1.523.224-1.923.568-3.314 2.106-3.733 4.115-1.072 5.164-3.11 15.69-4.012 26.101 7.014 4.613 13.492 9.49 19.426 14.621 2.3-8.757 5.29-17.63 8.945-26.569ZM255.42 102.007c-13.65-7.223-27.058-12.744-40.16-16.569-4.343 12.38-9.953 23.631-16.818 33.689-5.63 8.255-12.362 14.82-19.708 19.296 24.658-2.093 50.5-11.132 76.931-26.934 1.715-1.024 2.707-2.822 2.653-4.811-.045-1.99-1.133-3.734-2.898-4.671ZM235.273 85.513c4.705-6.643 9.186-13.796 13.43-21.455.963-1.74.922-3.788-.121-5.483a5.4 5.4 0 0 0-4.837-2.598c-7.309.24-14.377.796-21.199 1.641-1.375 7.539-3.123 14.762-5.249 21.658a203.803 203.803 0 0 1 17.976 6.237ZM180.247 104.025c-4.505 15.384-12.329 27.46-22.278 34.58 4.065-.211 8.263-1.227 12.358-3.034 8.496-3.746 16.373-10.688 22.777-20.075 15.273-22.383 24.097-51.082 26.223-85.297a5.394 5.394 0 0 0-2.388-4.84 5.428 5.428 0 0 0-5.402-.432c-9.14 4.29-17.628 8.91-25.46 13.85 1.915 23.582-.029 45.434-5.83 65.248ZM179.214 35.52c-.901-10.406-2.94-20.932-4.011-26.1-.416-2.01-1.811-3.547-3.733-4.115a5.39 5.39 0 0 0-1.524-.224c-1.416 0-2.787.572-3.85 1.65-5.485 5.549-10.568 11.164-15.252 16.842 3.654 8.939 6.644 17.812 8.949 26.565 5.934-5.127 12.407-10.005 19.421-14.617ZM129.144 87.229c6.64-13.092 17.246-24.829 25.21-32.243-4.372-17.779-11.104-34.55-20.397-52.097C132.998 1.078 131.195 0 129.148 0s-3.845 1.082-4.808 2.889c-9.389 17.604-16.237 35.122-20.377 52.093 8.313 7.688 19.28 20.224 25.181 32.247Z'
37
- className={clsx(
38
- (logoType === 'default' || logoType === 'reversed') &&
39
- 'fill-nsw-red-600 dark:fill-white',
40
- logoType === 'mono-white' && 'fill-white',
41
- logoType === 'mono-black' && 'fill-black dark:fill-white',
42
- )}
43
- />
44
-
45
- <path
46
- d='M153.541 133.686c6.885-4.833 13.77-13.254 18.139-24.97 8.458-22.681 9.334-47.945 8.122-65.823-15.331 10.215-39.665 31.55-47.975 54.36-3.911 10.734-5.734 25.355-2.72 33.511 1.259 3.411 3.401 5.997 6.345 7.227 4.46 1.865 11.312.456 18.089-4.305ZM125.713 95.261c-2.027-4.724-4.261-9.18-7.728-14.186-9.809-14.16-23.026-26.933-39.475-38.185-.17 2.652-2.57 31.297 5.851 59.304 6.408 21.302 17.354 29.98 23.354 33.333 6.038 3.369 11.561 4.165 18.039 2.557-6.565-8.935-5.747-27.27-.041-42.823Z'
47
- className={clsx(
48
- (logoType === 'default' || logoType === 'reversed') &&
49
- 'fill-nsw-red-600 dark:fill-white',
50
- logoType === 'mono-white' && 'fill-white',
51
- logoType === 'mono-black' && 'fill-black dark:fill-white',
52
- )}
53
- />
54
- </svg>
55
- </>
56
- )
57
- }
File without changes
package/src/lib/.gitkeep DELETED
File without changes
package/src/lib/utils.ts DELETED
@@ -1,6 +0,0 @@
1
- import { clsx, type ClassValue } from "clsx"
2
- import { twMerge } from "tailwind-merge"
3
-
4
- export function cn(...inputs: ClassValue[]) {
5
- return twMerge(clsx(inputs))
6
- }
@@ -1,132 +0,0 @@
1
- @import "tailwindcss";
2
- @import "tw-animate-css";
3
- @import "shadcn/tailwind.css";
4
-
5
- @custom-variant dark (&:is(.dark *));
6
- @source "../../../apps/**/*.{ts,tsx}";
7
- @source "../../../components/**/*.{ts,tsx}";
8
- @source "../**/*.{ts,tsx}";
9
-
10
- @theme inline {
11
- --font-heading: var(--font-sans);
12
- --color-sidebar-ring: var(--sidebar-ring);
13
- --color-sidebar-border: var(--sidebar-border);
14
- --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
15
- --color-sidebar-accent: var(--sidebar-accent);
16
- --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
17
- --color-sidebar-primary: var(--sidebar-primary);
18
- --color-sidebar-foreground: var(--sidebar-foreground);
19
- --color-sidebar: var(--sidebar);
20
- --color-chart-5: var(--chart-5);
21
- --color-chart-4: var(--chart-4);
22
- --color-chart-3: var(--chart-3);
23
- --color-chart-2: var(--chart-2);
24
- --color-chart-1: var(--chart-1);
25
- --color-ring: var(--ring);
26
- --color-input: var(--input);
27
- --color-border: var(--border);
28
- --color-destructive: var(--destructive);
29
- --color-accent-foreground: var(--accent-foreground);
30
- --color-accent: var(--accent);
31
- --color-muted-foreground: var(--muted-foreground);
32
- --color-muted: var(--muted);
33
- --color-secondary-foreground: var(--secondary-foreground);
34
- --color-secondary: var(--secondary);
35
- --color-primary-foreground: var(--primary-foreground);
36
- --color-primary: var(--primary);
37
- --color-popover-foreground: var(--popover-foreground);
38
- --color-popover: var(--popover);
39
- --color-card-foreground: var(--card-foreground);
40
- --color-card: var(--card);
41
- --color-foreground: var(--foreground);
42
- --color-background: var(--background);
43
- --radius-sm: calc(var(--radius) * 0.6);
44
- --radius-md: calc(var(--radius) * 0.8);
45
- --radius-lg: var(--radius);
46
- --radius-xl: calc(var(--radius) * 1.4);
47
- --radius-2xl: calc(var(--radius) * 1.8);
48
- --radius-3xl: calc(var(--radius) * 2.2);
49
- --radius-4xl: calc(var(--radius) * 2.6);
50
- --font-sans: var(--font-sans);
51
- }
52
-
53
- :root {
54
- --background: oklch(1 0 0);
55
- --foreground: oklch(0.141 0.005 285.823);
56
- --card: oklch(1 0 0);
57
- --card-foreground: oklch(0.141 0.005 285.823);
58
- --popover: oklch(1 0 0);
59
- --popover-foreground: oklch(0.141 0.005 285.823);
60
- --primary: oklch(0.488 0.243 264.376);
61
- --primary-foreground: oklch(0.97 0.014 254.604);
62
- --secondary: oklch(0.967 0.001 286.375);
63
- --secondary-foreground: oklch(0.21 0.006 285.885);
64
- --muted: oklch(0.967 0.001 286.375);
65
- --muted-foreground: oklch(0.552 0.016 285.938);
66
- --accent: oklch(0.967 0.001 286.375);
67
- --accent-foreground: oklch(0.21 0.006 285.885);
68
- --destructive: oklch(0.577 0.245 27.325);
69
- --border: oklch(0.92 0.004 286.32);
70
- --input: oklch(0.92 0.004 286.32);
71
- --ring: oklch(0.705 0.015 286.067);
72
- --chart-1: oklch(0.809 0.105 251.813);
73
- --chart-2: oklch(0.623 0.214 259.815);
74
- --chart-3: oklch(0.546 0.245 262.881);
75
- --chart-4: oklch(0.488 0.243 264.376);
76
- --chart-5: oklch(0.424 0.199 265.638);
77
- --radius: 0.45rem;
78
- --sidebar: oklch(0.985 0 0);
79
- --sidebar-foreground: oklch(0.141 0.005 285.823);
80
- --sidebar-primary: oklch(0.546 0.245 262.881);
81
- --sidebar-primary-foreground: oklch(0.97 0.014 254.604);
82
- --sidebar-accent: oklch(0.967 0.001 286.375);
83
- --sidebar-accent-foreground: oklch(0.21 0.006 285.885);
84
- --sidebar-border: oklch(0.92 0.004 286.32);
85
- --sidebar-ring: oklch(0.705 0.015 286.067);
86
- }
87
-
88
- .dark {
89
- --background: oklch(0.141 0.005 285.823);
90
- --foreground: oklch(0.985 0 0);
91
- --card: oklch(0.21 0.006 285.885);
92
- --card-foreground: oklch(0.985 0 0);
93
- --popover: oklch(0.21 0.006 285.885);
94
- --popover-foreground: oklch(0.985 0 0);
95
- --primary: oklch(0.424 0.199 265.638);
96
- --primary-foreground: oklch(0.97 0.014 254.604);
97
- --secondary: oklch(0.274 0.006 286.033);
98
- --secondary-foreground: oklch(0.985 0 0);
99
- --muted: oklch(0.274 0.006 286.033);
100
- --muted-foreground: oklch(0.705 0.015 286.067);
101
- --accent: oklch(0.274 0.006 286.033);
102
- --accent-foreground: oklch(0.985 0 0);
103
- --destructive: oklch(0.704 0.191 22.216);
104
- --border: oklch(1 0 0 / 10%);
105
- --input: oklch(1 0 0 / 15%);
106
- --ring: oklch(0.552 0.016 285.938);
107
- --chart-1: oklch(0.809 0.105 251.813);
108
- --chart-2: oklch(0.623 0.214 259.815);
109
- --chart-3: oklch(0.546 0.245 262.881);
110
- --chart-4: oklch(0.488 0.243 264.376);
111
- --chart-5: oklch(0.424 0.199 265.638);
112
- --sidebar: oklch(0.21 0.006 285.885);
113
- --sidebar-foreground: oklch(0.985 0 0);
114
- --sidebar-primary: oklch(0.623 0.214 259.815);
115
- --sidebar-primary-foreground: oklch(0.97 0.014 254.604);
116
- --sidebar-accent: oklch(0.274 0.006 286.033);
117
- --sidebar-accent-foreground: oklch(0.985 0 0);
118
- --sidebar-border: oklch(1 0 0 / 10%);
119
- --sidebar-ring: oklch(0.552 0.016 285.938);
120
- }
121
-
122
- @layer base {
123
- * {
124
- @apply border-border outline-ring/50;
125
- }
126
- body {
127
- @apply bg-background text-foreground;
128
- }
129
- button:not(:disabled), [role="button"]:not(:disabled) {
130
- cursor: pointer;
131
- }
132
- }
package/tsconfig.json DELETED
@@ -1,11 +0,0 @@
1
- {
2
- "extends": "@workspace/typescript-config/react-library.json",
3
- "compilerOptions": {
4
- "baseUrl": ".",
5
- "paths": {
6
- "@workspace/ui/*": ["./src/*"]
7
- }
8
- },
9
- "include": ["."],
10
- "exclude": ["node_modules", "dist", "**/*.stories.tsx", "**/*.stories.ts"]
11
- }
@@ -1,8 +0,0 @@
1
- {
2
- "extends": "@workspace/typescript-config/react-library.json",
3
- "compilerOptions": {
4
- "outDir": "dist"
5
- },
6
- "include": ["src", "turbo"],
7
- "exclude": ["node_modules", "dist"]
8
- }