@boyernick/standard-ui-react 0.4.2-canary.52 → 0.4.2-canary.53
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/package.json +1 -1
- package/src/icons.tsx +31 -1
- package/src/index.ts +1 -0
- package/src/modal.tsx +6 -4
package/package.json
CHANGED
package/src/icons.tsx
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import {
|
|
4
|
+
CentralIconBase,
|
|
5
|
+
type CentralIconBaseProps,
|
|
6
|
+
} from "@central-icons-react/round-outlined-radius-2-stroke-2/CentralIconBase"
|
|
4
7
|
import { IconArrowDown as IconArrowDownBase } from "@central-icons-react/round-outlined-radius-2-stroke-2/IconArrowDown"
|
|
5
8
|
import { IconBell as IconBellBase } from "@central-icons-react/round-outlined-radius-2-stroke-2/IconBell"
|
|
6
9
|
import { IconCalendar1 as IconCalendar1Base } from "@central-icons-react/round-outlined-radius-2-stroke-2/IconCalendar1"
|
|
@@ -63,6 +66,32 @@ export const withCentralIconDefaults = (
|
|
|
63
66
|
}
|
|
64
67
|
|
|
65
68
|
export const IconArrowDown = withCentralIconDefaults(IconArrowDownBase)
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Central ships a Small cut of the cross and the chevrons but not of the down
|
|
72
|
+
* arrow, whose full-size glyph is 16 units tall and outweighs IconCrossSmall
|
|
73
|
+
* beside it. Drawn on Central's base with the same 2px round stroke, 9 × 12
|
|
74
|
+
* units: a touch larger than the cross's 8 × 8 so it holds its own.
|
|
75
|
+
*/
|
|
76
|
+
const IconArrowDownSmallBase = (props: CentralIconBaseProps) => (
|
|
77
|
+
<CentralIconBase
|
|
78
|
+
{...props}
|
|
79
|
+
ariaLabel="arrow-down-small, download"
|
|
80
|
+
maskId="round-outlined-radius-2-stroke-2-IconArrowDownSmall"
|
|
81
|
+
>
|
|
82
|
+
<path
|
|
83
|
+
d="M12 6V18M7.5 13.5L12 18L16.5 13.5"
|
|
84
|
+
stroke="currentColor"
|
|
85
|
+
strokeWidth="2"
|
|
86
|
+
strokeLinecap="round"
|
|
87
|
+
strokeLinejoin="round"
|
|
88
|
+
/>
|
|
89
|
+
</CentralIconBase>
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
export const IconArrowDownSmall = withCentralIconDefaults(
|
|
93
|
+
IconArrowDownSmallBase,
|
|
94
|
+
)
|
|
66
95
|
export const IconBell = withCentralIconDefaults(IconBellBase)
|
|
67
96
|
export const IconCalendar1 = withCentralIconDefaults(IconCalendar1Base)
|
|
68
97
|
export const IconChainLink1 = withCentralIconDefaults(IconChainLink1Base)
|
|
@@ -124,6 +153,7 @@ export const iconGallery = [
|
|
|
124
153
|
{ name: "IconPlus", Icon: IconPlus },
|
|
125
154
|
{ name: "IconMinus", Icon: IconMinus },
|
|
126
155
|
{ name: "IconCrossSmall", Icon: IconCrossSmall },
|
|
156
|
+
{ name: "IconArrowDownSmall", Icon: IconArrowDownSmall },
|
|
127
157
|
{ name: "IconX", Icon: IconX },
|
|
128
158
|
{ name: "IconCheckmark1", Icon: IconCheckmark1 },
|
|
129
159
|
{ name: "IconChevronBottom", Icon: IconChevronBottom },
|
package/src/index.ts
CHANGED
package/src/modal.tsx
CHANGED
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
DialogTrigger,
|
|
32
32
|
} from "./dialog"
|
|
33
33
|
import {
|
|
34
|
-
|
|
34
|
+
IconArrowDownSmall,
|
|
35
35
|
IconChevronRightSmall,
|
|
36
36
|
IconCrossSmall,
|
|
37
37
|
} from "./icons"
|
|
@@ -233,10 +233,12 @@ const ModalDownload = ({
|
|
|
233
233
|
iconOnly: true,
|
|
234
234
|
}),
|
|
235
235
|
modalControlClassName,
|
|
236
|
-
|
|
236
|
+
// Download sits top-left and Close top-right, where dismissal is
|
|
237
|
+
// expected; the gallery's previous/next arrows stay vertically centred.
|
|
238
|
+
"absolute top-4 left-4 z-20",
|
|
237
239
|
)}
|
|
238
240
|
>
|
|
239
|
-
<
|
|
241
|
+
<IconArrowDownSmall aria-hidden />
|
|
240
242
|
</a>
|
|
241
243
|
</ModalControlTooltip>
|
|
242
244
|
)
|
|
@@ -254,7 +256,7 @@ const ModalDismiss = () => (
|
|
|
254
256
|
aria-label="Close image"
|
|
255
257
|
className={cn(
|
|
256
258
|
modalControlClassName,
|
|
257
|
-
"absolute top-4
|
|
259
|
+
"absolute top-4 right-4 z-20",
|
|
258
260
|
)}
|
|
259
261
|
/>
|
|
260
262
|
}
|