@scripso-homepad/ui 0.4.17 → 0.4.18
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/dist/web/index.cjs +34 -29
- package/dist/web/index.cjs.map +1 -1
- package/dist/web/index.d.cts +3 -1
- package/dist/web/index.d.ts +3 -1
- package/dist/web/index.js +34 -29
- package/dist/web/index.js.map +1 -1
- package/package.json +1 -1
- package/src/web/components/Drawer.tsx +36 -26
- package/src/web/icons/TableSortIcon.tsx +1 -3
package/package.json
CHANGED
|
@@ -40,6 +40,8 @@ export type DrawerProps = {
|
|
|
40
40
|
open: boolean;
|
|
41
41
|
title: string;
|
|
42
42
|
subtitle?: string;
|
|
43
|
+
subtitleClassName?: string;
|
|
44
|
+
headerBottom?: ReactNode;
|
|
43
45
|
children: ReactNode;
|
|
44
46
|
footer?: ReactNode;
|
|
45
47
|
onClose: () => void;
|
|
@@ -55,6 +57,8 @@ export function Drawer({
|
|
|
55
57
|
open,
|
|
56
58
|
title,
|
|
57
59
|
subtitle,
|
|
60
|
+
subtitleClassName,
|
|
61
|
+
headerBottom,
|
|
58
62
|
children,
|
|
59
63
|
footer,
|
|
60
64
|
onClose,
|
|
@@ -147,36 +151,42 @@ export function Drawer({
|
|
|
147
151
|
)}
|
|
148
152
|
>
|
|
149
153
|
<header
|
|
150
|
-
className={cn(
|
|
151
|
-
'flex h-[87px] shrink-0 items-start justify-between border-b border-storm-gray-50 pt-6 pr-6 pb-4 pl-6',
|
|
152
|
-
headerClassName,
|
|
153
|
-
)}
|
|
154
|
+
className={cn('shrink-0 border-b border-storm-gray-50', headerClassName)}
|
|
154
155
|
>
|
|
155
|
-
<div className="
|
|
156
|
-
<
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
{title}
|
|
161
|
-
</h2>
|
|
162
|
-
{subtitle ? (
|
|
163
|
-
<p
|
|
164
|
-
id="homepad-drawer-subtitle"
|
|
165
|
-
className="typography-body tracking-normal text-storm-gray-400"
|
|
156
|
+
<div className="flex items-start justify-between pt-6 pr-6 pb-4 pl-6">
|
|
157
|
+
<div className="min-w-0 flex flex-col gap-1">
|
|
158
|
+
<h2
|
|
159
|
+
id="homepad-drawer-title"
|
|
160
|
+
className="typography-title-sm tracking-normal text-black"
|
|
166
161
|
>
|
|
167
|
-
{
|
|
168
|
-
</
|
|
169
|
-
|
|
162
|
+
{title}
|
|
163
|
+
</h2>
|
|
164
|
+
{subtitle ? (
|
|
165
|
+
<p
|
|
166
|
+
id="homepad-drawer-subtitle"
|
|
167
|
+
className={cn(
|
|
168
|
+
'typography-body tracking-normal text-storm-gray-400',
|
|
169
|
+
subtitleClassName,
|
|
170
|
+
)}
|
|
171
|
+
>
|
|
172
|
+
{subtitle}
|
|
173
|
+
</p>
|
|
174
|
+
) : null}
|
|
175
|
+
</div>
|
|
176
|
+
|
|
177
|
+
<button
|
|
178
|
+
type="button"
|
|
179
|
+
aria-label={closeAriaLabel}
|
|
180
|
+
className="flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-lg text-storm-gray-400 transition-colors hover:bg-storm-gray-50 hover:text-storm-gray-600"
|
|
181
|
+
onClick={onClose}
|
|
182
|
+
>
|
|
183
|
+
<X className="size-5" strokeWidth={1.75} />
|
|
184
|
+
</button>
|
|
170
185
|
</div>
|
|
171
186
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
className="flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-lg text-storm-gray-400 transition-colors hover:bg-storm-gray-50 hover:text-storm-gray-600"
|
|
176
|
-
onClick={onClose}
|
|
177
|
-
>
|
|
178
|
-
<X className="size-5" strokeWidth={1.75} />
|
|
179
|
-
</button>
|
|
187
|
+
{headerBottom ? (
|
|
188
|
+
<div className="border-t border-storm-gray-50 px-6">{headerBottom}</div>
|
|
189
|
+
) : null}
|
|
180
190
|
</header>
|
|
181
191
|
|
|
182
192
|
<div
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { cn } from '../utils/cn';
|
|
2
|
-
|
|
3
1
|
export type TableSortDirection = 'asc' | 'desc';
|
|
4
2
|
|
|
5
3
|
type TableSortIconProps = {
|
|
@@ -22,7 +20,7 @@ export function TableSortIcon({ direction = null, className }: TableSortIconProp
|
|
|
22
20
|
fill="none"
|
|
23
21
|
xmlns="http://www.w3.org/2000/svg"
|
|
24
22
|
aria-hidden
|
|
25
|
-
className={
|
|
23
|
+
className={className}
|
|
26
24
|
>
|
|
27
25
|
<path
|
|
28
26
|
d="M9.70277 11.4541L6.42668 15.2773C6.37387 15.3389 6.30837 15.3883 6.23466 15.4222C6.16095 15.4561 6.08078 15.4736 5.99965 15.4736C5.91852 15.4736 5.83835 15.4561 5.76464 15.4222C5.69093 15.3883 5.62542 15.3389 5.57262 15.2773L2.29652 11.4541C1.98387 11.0892 2.24309 10.5255 2.72355 10.5255H9.27668C9.75715 10.5255 10.0164 11.0892 9.70277 11.4541Z"
|