@makoai/app-sdk 2.22.0 → 2.23.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 +7 -0
- package/components/select.tsx +6 -2
- package/components/sheet.tsx +4 -1
- package/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -558,6 +558,13 @@ component or prop is an SDK pull request.
|
|
|
558
558
|
@import "@makoai/app-sdk/tailwind.css";
|
|
559
559
|
```
|
|
560
560
|
|
|
561
|
+
Thin props (2.23), marked "Mako thin prop" in the source. Stock behaviour
|
|
562
|
+
stays the default:
|
|
563
|
+
|
|
564
|
+
- `SheetContent closeLabel="Fermer"`: the close button's screen-reader label.
|
|
565
|
+
- `SelectContent container={document.fullscreenElement ?? undefined}`: where
|
|
566
|
+
the list portals, for a fullscreen page.
|
|
567
|
+
|
|
561
568
|
`tailwind.css` lets Tailwind see the SDK's classes (`@source`) and maps the
|
|
562
569
|
house tokens onto Tailwind's colour names (`bg-popover`,
|
|
563
570
|
`text-muted-foreground`, `bg-brand`, `--radius-*`). It replaces the
|
package/components/select.tsx
CHANGED
|
@@ -54,10 +54,14 @@ function SelectContent({
|
|
|
54
54
|
children,
|
|
55
55
|
position = "item-aligned",
|
|
56
56
|
align = "center",
|
|
57
|
+
container,
|
|
57
58
|
...props
|
|
58
|
-
}: React.ComponentProps<typeof SelectPrimitive.Content>
|
|
59
|
+
}: React.ComponentProps<typeof SelectPrimitive.Content> & {
|
|
60
|
+
/** Mako thin prop (2.23): where the list portals, e.g. document.fullscreenElement in a fullscreen deck. */
|
|
61
|
+
container?: React.ComponentProps<typeof SelectPrimitive.Portal>["container"]
|
|
62
|
+
}) {
|
|
59
63
|
return (
|
|
60
|
-
<SelectPrimitive.Portal>
|
|
64
|
+
<SelectPrimitive.Portal container={container}>
|
|
61
65
|
<SelectPrimitive.Content
|
|
62
66
|
data-slot="select-content"
|
|
63
67
|
className={cn(
|
package/components/sheet.tsx
CHANGED
|
@@ -48,10 +48,13 @@ function SheetContent({
|
|
|
48
48
|
children,
|
|
49
49
|
side = "right",
|
|
50
50
|
showCloseButton = true,
|
|
51
|
+
closeLabel = "Close",
|
|
51
52
|
...props
|
|
52
53
|
}: React.ComponentProps<typeof SheetPrimitive.Content> & {
|
|
53
54
|
side?: "top" | "right" | "bottom" | "left"
|
|
54
55
|
showCloseButton?: boolean
|
|
56
|
+
/** Mako thin prop (2.23): the close button's screen-reader label, e.g. "Fermer". */
|
|
57
|
+
closeLabel?: string
|
|
55
58
|
}) {
|
|
56
59
|
return (
|
|
57
60
|
<SheetPortal>
|
|
@@ -76,7 +79,7 @@ function SheetContent({
|
|
|
76
79
|
{showCloseButton && (
|
|
77
80
|
<SheetPrimitive.Close className="absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-secondary">
|
|
78
81
|
<XIcon className="size-4" />
|
|
79
|
-
<span className="sr-only">
|
|
82
|
+
<span className="sr-only">{closeLabel}</span>
|
|
80
83
|
</SheetPrimitive.Close>
|
|
81
84
|
)}
|
|
82
85
|
</SheetPrimitive.Content>
|
package/index.js
CHANGED
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
* in a page (or this export) says which SDK a deployed app actually runs.
|
|
39
39
|
* Kept in step with package.json by snapshot.test.mjs.
|
|
40
40
|
*/
|
|
41
|
-
export const SDK_VERSION = "2.
|
|
41
|
+
export const SDK_VERSION = "2.23.0";
|
|
42
42
|
if (typeof window !== "undefined") {
|
|
43
43
|
try {
|
|
44
44
|
window.__MAKO_APP_SDK__ = SDK_VERSION;
|