@gridui/overlay 1.1.1 → 1.1.2
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 +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +2 -2
- package/dist/styles.css +6 -12
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@ Core family. Public API: `OverlayOpen`, `RetainedLayer`, `RetainedLayerProps`, `
|
|
|
5
5
|
Import components from `@gridui/overlay` and load `@gridui/overlay/styles.css` after Theme.
|
|
6
6
|
Load styles for any composed dependency used by this family. Applications own routes, labels, state persistence, and branding.
|
|
7
7
|
|
|
8
|
-
See [component ownership](
|
|
8
|
+
See [component ownership](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/docs/component-ownership.md) and [release history](https://github.com/sudo-ui/GridUI-React-Monorepo/tree/main/packages-core/overlay/.changeset/history).
|
|
9
9
|
|
|
10
10
|
## Surface presentation
|
|
11
11
|
|
package/dist/index.js
CHANGED
|
@@ -16,11 +16,11 @@ var RetainedLayer = (props) => {
|
|
|
16
16
|
|
|
17
17
|
// src/shared/style.ts
|
|
18
18
|
import { cva } from "class-variance-authority";
|
|
19
|
-
var overlaySurfaceStyles = cva("gridui-overlay-surface border border-solid border-border bg-background text-foreground", {
|
|
19
|
+
var overlaySurfaceStyles = cva("gridui-overlay-surface gridui-u-border gridui-u-border-solid gridui-u-border-border gridui-u-bg-background gridui-u-text-foreground", {
|
|
20
20
|
variants: {
|
|
21
21
|
kind: {
|
|
22
|
-
popup: "gridui-overlay-floating rounded-control",
|
|
23
|
-
tooltip: "gridui-overlay-tooltip rounded-control",
|
|
22
|
+
popup: "gridui-overlay-floating gridui-u-rounded-control",
|
|
23
|
+
tooltip: "gridui-overlay-tooltip gridui-u-rounded-control",
|
|
24
24
|
dialog: "gridui-overlay-dialog"
|
|
25
25
|
}
|
|
26
26
|
},
|
package/dist/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/retained-layer/retained-layer.tsx", "../src/shared/style.ts", "../src/shared/use-overlay-state.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * @author WMXPY\n * @package Overlay\n * @namespace RetainedLayer\n * @description Retained Layer\n */\n\nimport { Activity, createContext, type FC, type ReactNode, useContext } from \"react\";\n\nexport const OverlayOpen = createContext(false);\n\nexport type RetainedLayerProps = {\n readonly children: ReactNode;\n};\n\nexport const RetainedLayer: FC<RetainedLayerProps> = (props: RetainedLayerProps) => {\n const { children } = props;\n const open = useContext(OverlayOpen);\n return (<Activity\n mode={!open ? \"hidden\" : \"visible\"}\n >\n {children}\n </Activity>);\n};\n", "/**\n * @author WMXPY\n * @package Overlay\n * @namespace Shared\n * @description Style\n */\n\nimport { cva } from \"class-variance-authority\";\n\nexport const overlaySurfaceStyles = cva(\"gridui-overlay-surface border border-solid border-border bg-background text-foreground\", {\n variants: {\n kind: {\n popup: \"gridui-overlay-floating rounded-control\",\n tooltip: \"gridui-overlay-tooltip rounded-control\",\n dialog: \"gridui-overlay-dialog\",\n },\n },\n defaultVariants: { kind: \"popup\" },\n});\n\nexport const overlayBackdropStyles = cva(\"gridui-overlay-backdrop\", {\n variants: {\n pace: {\n normal: null,\n deliberate: \"gridui-overlay-backdrop-deliberate\",\n },\n },\n defaultVariants: { pace: \"normal\" },\n});\n", "/**\n * @author WMXPY\n * @package Overlay\n * @namespace Shared\n * @description Use Overlay State\n */\n\nimport { useState } from \"react\";\n\ntype OverlayStateOptions = {\n readonly open?: boolean | undefined;\n readonly defaultOpen?: boolean | undefined;\n readonly onOpenChange?: ((open: boolean) => void) | undefined;\n};\n\nexport const useOverlayState = (options: OverlayStateOptions) => {\n const [\n localOpen,\n setLocalOpen,\n ] = useState(options.defaultOpen ?? false);\n return {\n open: options.open ?? localOpen,\n onOpenChange: (open: boolean): void => {\n if (options.open === undefined) {\n setLocalOpen(open);\n }\n options.onOpenChange?.(open);\n },\n };\n};\n"],
|
|
5
|
-
"mappings": ";AAOA,SAAS,UAAU,eAAwC,kBAAkB;AAWjE;AATL,IAAM,cAAc,cAAc,KAAK;AAMvC,IAAM,gBAAwC,CAAC,UAA8B;AAChF,QAAM,EAAE,SAAS,IAAI;AACrB,QAAM,OAAO,WAAW,WAAW;AACnC,SAAQ;AAAA,IAAC;AAAA;AAAA,MACL,MAAM,CAAC,OAAO,WAAW;AAAA,MAExB;AAAA;AAAA,EACL;AACJ;;;AChBA,SAAS,WAAW;AAEb,IAAM,uBAAuB,IAAI,
|
|
4
|
+
"sourcesContent": ["/**\n * @author WMXPY\n * @package Overlay\n * @namespace RetainedLayer\n * @description Retained Layer\n */\n\nimport { Activity, createContext, type FC, type ReactNode, useContext } from \"react\";\n\nexport const OverlayOpen = createContext(false);\n\nexport type RetainedLayerProps = {\n readonly children: ReactNode;\n};\n\nexport const RetainedLayer: FC<RetainedLayerProps> = (props: RetainedLayerProps) => {\n const { children } = props;\n const open = useContext(OverlayOpen);\n return (<Activity\n mode={!open ? \"hidden\" : \"visible\"}\n >\n {children}\n </Activity>);\n};\n", "/**\n * @author WMXPY\n * @package Overlay\n * @namespace Shared\n * @description Style\n */\n\nimport { cva } from \"class-variance-authority\";\n\nexport const overlaySurfaceStyles = cva(\"gridui-overlay-surface gridui-u-border gridui-u-border-solid gridui-u-border-border gridui-u-bg-background gridui-u-text-foreground\", {\n variants: {\n kind: {\n popup: \"gridui-overlay-floating gridui-u-rounded-control\",\n tooltip: \"gridui-overlay-tooltip gridui-u-rounded-control\",\n dialog: \"gridui-overlay-dialog\",\n },\n },\n defaultVariants: { kind: \"popup\" },\n});\n\nexport const overlayBackdropStyles = cva(\"gridui-overlay-backdrop\", {\n variants: {\n pace: {\n normal: null,\n deliberate: \"gridui-overlay-backdrop-deliberate\",\n },\n },\n defaultVariants: { pace: \"normal\" },\n});\n", "/**\n * @author WMXPY\n * @package Overlay\n * @namespace Shared\n * @description Use Overlay State\n */\n\nimport { useState } from \"react\";\n\ntype OverlayStateOptions = {\n readonly open?: boolean | undefined;\n readonly defaultOpen?: boolean | undefined;\n readonly onOpenChange?: ((open: boolean) => void) | undefined;\n};\n\nexport const useOverlayState = (options: OverlayStateOptions) => {\n const [\n localOpen,\n setLocalOpen,\n ] = useState(options.defaultOpen ?? false);\n return {\n open: options.open ?? localOpen,\n onOpenChange: (open: boolean): void => {\n if (options.open === undefined) {\n setLocalOpen(open);\n }\n options.onOpenChange?.(open);\n },\n };\n};\n"],
|
|
5
|
+
"mappings": ";AAOA,SAAS,UAAU,eAAwC,kBAAkB;AAWjE;AATL,IAAM,cAAc,cAAc,KAAK;AAMvC,IAAM,gBAAwC,CAAC,UAA8B;AAChF,QAAM,EAAE,SAAS,IAAI;AACrB,QAAM,OAAO,WAAW,WAAW;AACnC,SAAQ;AAAA,IAAC;AAAA;AAAA,MACL,MAAM,CAAC,OAAO,WAAW;AAAA,MAExB;AAAA;AAAA,EACL;AACJ;;;AChBA,SAAS,WAAW;AAEb,IAAM,uBAAuB,IAAI,uIAAuI;AAAA,EAC3K,UAAU;AAAA,IACN,MAAM;AAAA,MACF,OAAO;AAAA,MACP,SAAS;AAAA,MACT,QAAQ;AAAA,IACZ;AAAA,EACJ;AAAA,EACA,iBAAiB,EAAE,MAAM,QAAQ;AACrC,CAAC;AAEM,IAAM,wBAAwB,IAAI,2BAA2B;AAAA,EAChE,UAAU;AAAA,IACN,MAAM;AAAA,MACF,QAAQ;AAAA,MACR,YAAY;AAAA,IAChB;AAAA,EACJ;AAAA,EACA,iBAAiB,EAAE,MAAM,SAAS;AACtC,CAAC;;;ACrBD,SAAS,gBAAgB;AAQlB,IAAM,kBAAkB,CAAC,YAAiC;AAC7D,QAAM;AAAA,IACF;AAAA,IACA;AAAA,EACJ,IAAI,SAAS,QAAQ,eAAe,KAAK;AACzC,SAAO;AAAA,IACH,MAAM,QAAQ,QAAQ;AAAA,IACtB,cAAc,CAAC,SAAwB;AACnC,UAAI,QAAQ,SAAS,QAAW;AAC5B,qBAAa,IAAI;AAAA,MACrB;AACA,cAAQ,eAAe,IAAI;AAAA,IAC/B;AAAA,EACJ;AACJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/styles.css
CHANGED
|
@@ -2,30 +2,24 @@
|
|
|
2
2
|
@layer properties;
|
|
3
3
|
@layer theme, base, components, utilities;
|
|
4
4
|
@layer utilities {
|
|
5
|
-
.
|
|
6
|
-
visibility: visible;
|
|
7
|
-
}
|
|
8
|
-
.hidden {
|
|
9
|
-
display: none;
|
|
10
|
-
}
|
|
11
|
-
.rounded-control {
|
|
5
|
+
.gridui-u-rounded-control {
|
|
12
6
|
border-radius: var(--gridui-control-radius);
|
|
13
7
|
}
|
|
14
|
-
.border {
|
|
8
|
+
.gridui-u-border {
|
|
15
9
|
border-style: var(--tw-border-style);
|
|
16
10
|
border-width: 1px;
|
|
17
11
|
}
|
|
18
|
-
.border-solid {
|
|
12
|
+
.gridui-u-border-solid {
|
|
19
13
|
--tw-border-style: solid;
|
|
20
14
|
border-style: solid;
|
|
21
15
|
}
|
|
22
|
-
.border-border {
|
|
16
|
+
.gridui-u-border-border {
|
|
23
17
|
border-color: var(--gridui-border);
|
|
24
18
|
}
|
|
25
|
-
.bg-background {
|
|
19
|
+
.gridui-u-bg-background {
|
|
26
20
|
background-color: var(--gridui-background);
|
|
27
21
|
}
|
|
28
|
-
.text-foreground {
|
|
22
|
+
.gridui-u-text-foreground {
|
|
29
23
|
color: var(--gridui-foreground);
|
|
30
24
|
}
|
|
31
25
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gridui/overlay",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "GridUI React overlay",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"react-dom": "^19.2.0"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@gridui/theme": "^2.2
|
|
29
|
+
"@gridui/theme": "^2.3.2",
|
|
30
30
|
"class-variance-authority": "0.7.1"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|