@bgord/ui 0.10.3 → 0.10.5
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../src/components/dialog.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,mBAAmB,EAIzB,MAAM,UAAU,CAAC;AAGlB,MAAM,MAAM,eAAe,GAAG,mBAAmB,GAC/C,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,QAAQ,CAAC,GAAG;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAE/D,wBAAgB,MAAM,CAAC,KAAK,EAAE,eAAe,+
|
|
1
|
+
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../src/components/dialog.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,mBAAmB,EAIzB,MAAM,UAAU,CAAC;AAGlB,MAAM,MAAM,eAAe,GAAG,mBAAmB,GAC/C,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,QAAQ,CAAC,GAAG;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAE/D,wBAAgB,MAAM,CAAC,KAAK,EAAE,eAAe,+BA2C5C"}
|
|
@@ -8,14 +8,17 @@ export function Dialog(props) {
|
|
|
8
8
|
const { toggle: dialog, rest } = extractUseToggle(_props);
|
|
9
9
|
const ref = useRef(null);
|
|
10
10
|
useEffect(() => {
|
|
11
|
-
if (props.on)
|
|
11
|
+
if (props.on) {
|
|
12
12
|
ref.current?.showModal();
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
return ref.current?.focus();
|
|
14
|
+
}
|
|
15
|
+
ref.current?.close();
|
|
16
|
+
if (window.matchMedia("(pointer: coarse)").matches)
|
|
17
|
+
document.activeElement?.blur();
|
|
15
18
|
}, [props.on]);
|
|
16
19
|
useShortcuts({ Escape: locked ? noop : dialog.disable });
|
|
17
20
|
useScrollLock(props.on);
|
|
18
21
|
useClickOutside(ref, locked ? noop : dialog.disable);
|
|
19
|
-
return (_jsx("dialog", { "aria-modal": "true", "data-animation": "grow-fade-in", "data-backdrop": "stronger", "data-bg": "neutral-900", "data-br": "xs", "data-bw": "none", "data-dir": "column", "data-disp": props.on ? "flex" : "none", "data-mx": "auto", "data-p": "5", "data-position": "fixed", "data-z": "2", ref: ref, tabIndex: 0, ...dialog.props.target, ...rest }));
|
|
22
|
+
return (_jsx("dialog", { "aria-modal": "true", "data-animation": "grow-fade-in", "data-backdrop": "stronger", "data-bg": "neutral-900", "data-br": "xs", "data-bw": "none", "data-dir": "column", "data-disp": props.on ? "flex" : "none", "data-mx": "auto", "data-p": "5", "data-position": "fixed", "data-z": "2", ref: ref, tabIndex: 0, ...dialog.props.target, ...rest, style: { outline: "none", ...rest.style } }));
|
|
20
23
|
}
|
|
21
24
|
//# sourceMappingURL=dialog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.js","sourceRoot":"","sources":["../../src/components/dialog.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EACL,gBAAgB,EAEhB,eAAe,EACf,aAAa,EACb,YAAY,GACb,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAKxC,MAAM,UAAU,MAAM,CAAC,KAAsB;IAC3C,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,EAAE,GAAG,KAAK,CAAC;IAC7C,MAAM,MAAM,GAAG,OAAO,IAAI,KAAK,CAAC;IAEhC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAC1D,MAAM,GAAG,GAAG,MAAM,CAAoB,IAAI,CAAC,CAAC;IAE5C,SAAS,CAAC,GAAG,E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,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAErD,OAAO,CACL,+BACa,MAAM,oBACF,cAAc,mBACf,UAAU,aAChB,aAAa,aACb,IAAI,aACJ,MAAM,cACL,QAAQ,eACN,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,aAC7B,MAAM,YACP,GAAG,mBACI,OAAO,YACd,GAAG,EACV,GAAG,EAAE,GAAG,EACR,QAAQ,EAAE,CAAC,KACP,MAAM,CAAC,KAAK,CAAC,MAAM,KACnB,IAAI,EACR,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,EAAE,GACzC,CACH,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bgord/ui",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Bartosz Gordon",
|
|
@@ -19,20 +19,20 @@
|
|
|
19
19
|
"build": "bash scripts/package-build.sh"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@biomejs/biome": "2.5.
|
|
23
|
-
"@happy-dom/global-registrator": "20.14.
|
|
22
|
+
"@biomejs/biome": "2.5.13",
|
|
23
|
+
"@happy-dom/global-registrator": "20.14.5",
|
|
24
24
|
"@stryker-mutator/core": "10.0.0",
|
|
25
25
|
"@stryker-mutator/typescript-checker": "10.0.0",
|
|
26
|
-
"@testing-library/dom": "10.4.
|
|
26
|
+
"@testing-library/dom": "10.4.2",
|
|
27
27
|
"@testing-library/jest-dom": "7.0.1",
|
|
28
28
|
"@testing-library/react": "16.3.3",
|
|
29
29
|
"@testing-library/user-event": "14.6.7",
|
|
30
|
-
"@types/bun": "1.4.
|
|
31
|
-
"@types/react": "19.
|
|
32
|
-
"@types/react-dom": "19.
|
|
33
|
-
"cspell": "10.
|
|
34
|
-
"fallow": "3.
|
|
35
|
-
"lefthook": "2.1.
|
|
30
|
+
"@types/bun": "1.4.2",
|
|
31
|
+
"@types/react": "19.3.0",
|
|
32
|
+
"@types/react-dom": "19.3.0",
|
|
33
|
+
"cspell": "10.3.0",
|
|
34
|
+
"fallow": "3.25.0",
|
|
35
|
+
"lefthook": "2.1.14",
|
|
36
36
|
"lockfile-lint": "5.0.1",
|
|
37
37
|
"publint": "0.3.24",
|
|
38
38
|
"shellcheck": "4.1.0",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"tinykeys": "4.0.0"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
|
-
"react": "19.
|
|
47
|
-
"react-dom": "19.
|
|
46
|
+
"react": "19.3.0",
|
|
47
|
+
"react-dom": "19.3.0"
|
|
48
48
|
}
|
|
49
49
|
}
|