@dnanpm/ui-components 0.7.0 → 0.8.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/dist/components/Breadcrumb/Breadcrumb.css +9 -9
- package/dist/components/Breadcrumb/Breadcrumb.module.css.cjs +6 -6
- package/dist/components/Breadcrumb/Breadcrumb.module.css.js +6 -6
- package/dist/components/Button/Button.css +32 -30
- package/dist/components/Button/Button.module.css.cjs +11 -11
- package/dist/components/Button/Button.module.css.js +11 -11
- package/dist/components/ButtonCard/ButtonCard.cjs +105 -0
- package/dist/components/ButtonCard/ButtonCard.cjs.map +1 -0
- package/dist/components/ButtonCard/ButtonCard.css +167 -0
- package/dist/components/ButtonCard/ButtonCard.d.ts +3 -0
- package/dist/components/ButtonCard/ButtonCard.d.ts.map +1 -0
- package/dist/components/ButtonCard/ButtonCard.js +105 -0
- package/dist/components/ButtonCard/ButtonCard.js.map +1 -0
- package/dist/components/ButtonCard/ButtonCard.module.css.cjs +18 -0
- package/dist/components/ButtonCard/ButtonCard.module.css.cjs.map +1 -0
- package/dist/components/ButtonCard/ButtonCard.module.css.js +19 -0
- package/dist/components/ButtonCard/ButtonCard.module.css.js.map +1 -0
- package/dist/components/ButtonCard/ButtonCard.types.d.ts +103 -0
- package/dist/components/ButtonCard/ButtonCard.types.d.ts.map +1 -0
- package/dist/components/ButtonCard/index.d.ts +3 -0
- package/dist/components/ButtonCard/index.d.ts.map +1 -0
- package/dist/components/Drawer/Drawer.cjs +101 -0
- package/dist/components/Drawer/Drawer.cjs.map +1 -0
- package/dist/components/Drawer/Drawer.css +219 -0
- package/dist/components/Drawer/Drawer.d.ts +3 -0
- package/dist/components/Drawer/Drawer.d.ts.map +1 -0
- package/dist/components/Drawer/Drawer.js +101 -0
- package/dist/components/Drawer/Drawer.js.map +1 -0
- package/dist/components/Drawer/Drawer.module.css.cjs +37 -0
- package/dist/components/Drawer/Drawer.module.css.cjs.map +1 -0
- package/dist/components/Drawer/Drawer.module.css.js +37 -0
- package/dist/components/Drawer/Drawer.module.css.js.map +1 -0
- package/dist/components/Drawer/Drawer.types.d.ts +63 -0
- package/dist/components/Drawer/Drawer.types.d.ts.map +1 -0
- package/dist/components/Drawer/index.d.ts +3 -0
- package/dist/components/Drawer/index.d.ts.map +1 -0
- package/dist/components/Footer/Footer.css +81 -74
- package/dist/components/Footer/Footer.module.css.cjs +39 -39
- package/dist/components/Footer/Footer.module.css.js +39 -39
- package/dist/components/FunctionButton/FunctionButton.cjs +34 -0
- package/dist/components/FunctionButton/FunctionButton.cjs.map +1 -0
- package/dist/components/FunctionButton/FunctionButton.css +125 -0
- package/dist/components/FunctionButton/FunctionButton.d.ts +3 -0
- package/dist/components/FunctionButton/FunctionButton.d.ts.map +1 -0
- package/dist/components/FunctionButton/FunctionButton.js +34 -0
- package/dist/components/FunctionButton/FunctionButton.js.map +1 -0
- package/dist/components/FunctionButton/FunctionButton.module.css.cjs +11 -0
- package/dist/components/FunctionButton/FunctionButton.module.css.cjs.map +1 -0
- package/dist/components/FunctionButton/FunctionButton.module.css.js +12 -0
- package/dist/components/FunctionButton/FunctionButton.module.css.js.map +1 -0
- package/dist/components/FunctionButton/FunctionButton.types.d.ts +21 -0
- package/dist/components/FunctionButton/FunctionButton.types.d.ts.map +1 -0
- package/dist/components/FunctionButton/index.d.ts +3 -0
- package/dist/components/FunctionButton/index.d.ts.map +1 -0
- package/dist/components/IconButton/IconButton.css +31 -32
- package/dist/components/IconButton/IconButton.module.css.cjs +9 -9
- package/dist/components/IconButton/IconButton.module.css.js +9 -9
- package/dist/components/MainNavigation/MainNavigation.cjs +10 -26
- package/dist/components/MainNavigation/MainNavigation.cjs.map +1 -1
- package/dist/components/MainNavigation/MainNavigation.css +158 -156
- package/dist/components/MainNavigation/MainNavigation.d.ts.map +1 -1
- package/dist/components/MainNavigation/MainNavigation.js +10 -26
- package/dist/components/MainNavigation/MainNavigation.js.map +1 -1
- package/dist/components/MainNavigation/MainNavigation.module.css.cjs +68 -68
- package/dist/components/MainNavigation/MainNavigation.module.css.js +68 -68
- package/dist/components/Modal/Modal.cjs +101 -0
- package/dist/components/Modal/Modal.cjs.map +1 -0
- package/dist/components/Modal/Modal.css +205 -0
- package/dist/components/Modal/Modal.d.ts +3 -0
- package/dist/components/Modal/Modal.d.ts.map +1 -0
- package/dist/components/Modal/Modal.js +101 -0
- package/dist/components/Modal/Modal.js.map +1 -0
- package/dist/components/Modal/Modal.module.css.cjs +39 -0
- package/dist/components/Modal/Modal.module.css.cjs.map +1 -0
- package/dist/components/Modal/Modal.module.css.js +39 -0
- package/dist/components/Modal/Modal.module.css.js.map +1 -0
- package/dist/components/Modal/Modal.types.d.ts +62 -0
- package/dist/components/Modal/Modal.types.d.ts.map +1 -0
- package/dist/components/Modal/index.d.ts +3 -0
- package/dist/components/Modal/index.d.ts.map +1 -0
- package/dist/components/Modal/useDialogDismissal.cjs +41 -0
- package/dist/components/Modal/useDialogDismissal.cjs.map +1 -0
- package/dist/components/Modal/useDialogDismissal.d.ts +17 -0
- package/dist/components/Modal/useDialogDismissal.d.ts.map +1 -0
- package/dist/components/Modal/useDialogDismissal.js +41 -0
- package/dist/components/Modal/useDialogDismissal.js.map +1 -0
- package/dist/components/Modal/useNativeDialog.cjs +126 -0
- package/dist/components/Modal/useNativeDialog.cjs.map +1 -0
- package/dist/components/Modal/useNativeDialog.d.ts +14 -0
- package/dist/components/Modal/useNativeDialog.d.ts.map +1 -0
- package/dist/components/Modal/useNativeDialog.js +126 -0
- package/dist/components/Modal/useNativeDialog.js.map +1 -0
- package/dist/index.cjs +8 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/dist/styles/utils/elevation.module.css.cjs +3 -0
- package/dist/styles/utils/elevation.module.css.cjs.map +1 -1
- package/dist/styles/utils/elevation.module.css.js +4 -1
- package/dist/styles/utils/elevation.module.css.js.map +1 -1
- package/dist/styles/utils/focus.css +21 -22
- package/dist/styles/utils/focus.module.css.cjs +3 -6
- package/dist/styles/utils/focus.module.css.cjs.map +1 -1
- package/dist/styles/utils/focus.module.css.js +4 -7
- package/dist/styles/utils/focus.module.css.js.map +1 -1
- package/dist/styles/utils/text-decoration.css +3 -2
- package/dist/styles/utils/text-decoration.module.css.cjs +2 -2
- package/dist/styles/utils/text-decoration.module.css.js +2 -2
- package/package.json +3 -3
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { useRef, useState, useCallback, useEffect } from "react";
|
|
2
|
+
let bodyScrollLockCount = 0;
|
|
3
|
+
let previousBodyOverflow = "";
|
|
4
|
+
const lockBodyScroll = () => {
|
|
5
|
+
if (bodyScrollLockCount === 0) {
|
|
6
|
+
previousBodyOverflow = document.body.style.overflow;
|
|
7
|
+
document.body.style.overflow = "hidden";
|
|
8
|
+
}
|
|
9
|
+
bodyScrollLockCount += 1;
|
|
10
|
+
};
|
|
11
|
+
const unlockBodyScroll = () => {
|
|
12
|
+
bodyScrollLockCount = Math.max(bodyScrollLockCount - 1, 0);
|
|
13
|
+
if (bodyScrollLockCount === 0) {
|
|
14
|
+
document.body.style.overflow = previousBodyOverflow;
|
|
15
|
+
previousBodyOverflow = "";
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
const setDialogOpen = (dialog, open) => {
|
|
19
|
+
{
|
|
20
|
+
if (typeof dialog.showModal === "function") {
|
|
21
|
+
if (!dialog.open) dialog.showModal();
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
const findAutofocusTarget = (dialog) => {
|
|
26
|
+
if (dialog.hasAttribute("autofocus")) return dialog;
|
|
27
|
+
return dialog.querySelector("[autofocus]") ?? Array.from(dialog.querySelectorAll("*")).find(
|
|
28
|
+
(element) => "autofocus" in element && element.autofocus
|
|
29
|
+
);
|
|
30
|
+
};
|
|
31
|
+
const useNativeDialog = ({ open, keepMounted, onOpenChange }) => {
|
|
32
|
+
const dialogRef = useRef(null);
|
|
33
|
+
const restoreFocusRef = useRef(null);
|
|
34
|
+
const closeTimerRef = useRef(null);
|
|
35
|
+
const bodyScrollLockedRef = useRef(false);
|
|
36
|
+
const [phase, setPhase] = useState("closed");
|
|
37
|
+
const isPresent = keepMounted || open || phase !== "closed";
|
|
38
|
+
const notifyOpenChange = useCallback(
|
|
39
|
+
(nextOpen) => {
|
|
40
|
+
onOpenChange?.(nextOpen);
|
|
41
|
+
},
|
|
42
|
+
[onOpenChange]
|
|
43
|
+
);
|
|
44
|
+
const finishClose = useCallback(() => {
|
|
45
|
+
const dialog = dialogRef.current;
|
|
46
|
+
if (!dialog) return;
|
|
47
|
+
closeTimerRef.current = null;
|
|
48
|
+
if (dialog.open) {
|
|
49
|
+
dialog.close();
|
|
50
|
+
} else {
|
|
51
|
+
setPhase("closed");
|
|
52
|
+
}
|
|
53
|
+
}, []);
|
|
54
|
+
const close = useCallback(() => notifyOpenChange(false), [notifyOpenChange]);
|
|
55
|
+
const clearCloseTimer = useCallback(() => {
|
|
56
|
+
if (closeTimerRef.current) clearTimeout(closeTimerRef.current);
|
|
57
|
+
closeTimerRef.current = null;
|
|
58
|
+
}, []);
|
|
59
|
+
useEffect(() => {
|
|
60
|
+
const dialog = dialogRef.current;
|
|
61
|
+
if (!dialog) return;
|
|
62
|
+
if (open) {
|
|
63
|
+
clearCloseTimer();
|
|
64
|
+
if (phase === "closing" || phase === "closed") setPhase("open");
|
|
65
|
+
if (!dialog.open) {
|
|
66
|
+
restoreFocusRef.current = document.activeElement;
|
|
67
|
+
const autofocusTarget = findAutofocusTarget(dialog);
|
|
68
|
+
const existingFocusTarget = document.activeElement instanceof HTMLElement && document.activeElement !== dialog && dialog.contains(document.activeElement) ? document.activeElement : null;
|
|
69
|
+
setDialogOpen(dialog);
|
|
70
|
+
(autofocusTarget ?? existingFocusTarget ?? dialog.querySelector("[data-dialog-autofocus]"))?.focus();
|
|
71
|
+
}
|
|
72
|
+
if (dialog.open && !bodyScrollLockedRef.current) {
|
|
73
|
+
lockBodyScroll();
|
|
74
|
+
bodyScrollLockedRef.current = true;
|
|
75
|
+
}
|
|
76
|
+
} else if (dialog.open && phase === "open") {
|
|
77
|
+
setPhase("closing");
|
|
78
|
+
}
|
|
79
|
+
}, [clearCloseTimer, open, phase]);
|
|
80
|
+
useEffect(() => {
|
|
81
|
+
if (phase !== "closing") return;
|
|
82
|
+
const dialog = dialogRef.current;
|
|
83
|
+
if (!dialog || !dialog.open) return;
|
|
84
|
+
const styles = window.getComputedStyle(dialog);
|
|
85
|
+
const durations = `${styles.transitionDuration},${styles.animationDuration}`.split(",").map((duration2) => {
|
|
86
|
+
const value = Number.parseFloat(duration2);
|
|
87
|
+
return Number.isFinite(value) ? duration2.trim().endsWith("ms") ? value : value * 1e3 : 0;
|
|
88
|
+
});
|
|
89
|
+
const duration = Math.max(...durations, 0);
|
|
90
|
+
closeTimerRef.current = setTimeout(finishClose, duration);
|
|
91
|
+
return () => {
|
|
92
|
+
clearCloseTimer();
|
|
93
|
+
};
|
|
94
|
+
}, [clearCloseTimer, finishClose, phase]);
|
|
95
|
+
useEffect(
|
|
96
|
+
() => () => {
|
|
97
|
+
clearCloseTimer();
|
|
98
|
+
if (bodyScrollLockedRef.current) {
|
|
99
|
+
unlockBodyScroll();
|
|
100
|
+
bodyScrollLockedRef.current = false;
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
[clearCloseTimer]
|
|
104
|
+
);
|
|
105
|
+
useEffect(() => {
|
|
106
|
+
const dialog = dialogRef.current;
|
|
107
|
+
if (!dialog) return;
|
|
108
|
+
const handleClose = () => {
|
|
109
|
+
clearCloseTimer();
|
|
110
|
+
setPhase("closed");
|
|
111
|
+
if (bodyScrollLockedRef.current) {
|
|
112
|
+
unlockBodyScroll();
|
|
113
|
+
bodyScrollLockedRef.current = false;
|
|
114
|
+
}
|
|
115
|
+
restoreFocusRef.current?.focus();
|
|
116
|
+
restoreFocusRef.current = null;
|
|
117
|
+
};
|
|
118
|
+
dialog.addEventListener("close", handleClose);
|
|
119
|
+
return () => dialog.removeEventListener("close", handleClose);
|
|
120
|
+
}, [clearCloseTimer, isPresent]);
|
|
121
|
+
return { dialogRef, close, phase, isPresent };
|
|
122
|
+
};
|
|
123
|
+
export {
|
|
124
|
+
useNativeDialog
|
|
125
|
+
};
|
|
126
|
+
//# sourceMappingURL=useNativeDialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useNativeDialog.js","sources":["../../../src/components/Modal/useNativeDialog.ts"],"sourcesContent":["import { useCallback, useEffect, useRef, useState } from 'react';\n\ninterface UseNativeDialogOptions {\n open: boolean;\n keepMounted: boolean;\n onOpenChange?: (open: boolean) => void;\n}\n\ntype DialogPhase = 'closed' | 'open' | 'closing';\n\nlet bodyScrollLockCount = 0;\nlet previousBodyOverflow = '';\n\nconst lockBodyScroll = () => {\n if (bodyScrollLockCount === 0) {\n previousBodyOverflow = document.body.style.overflow;\n document.body.style.overflow = 'hidden';\n }\n bodyScrollLockCount += 1;\n};\n\nconst unlockBodyScroll = () => {\n bodyScrollLockCount = Math.max(bodyScrollLockCount - 1, 0);\n if (bodyScrollLockCount === 0) {\n document.body.style.overflow = previousBodyOverflow;\n previousBodyOverflow = '';\n }\n};\n\nconst setDialogOpen = (dialog: HTMLDialogElement, open: boolean) => {\n if (open) {\n if (typeof dialog.showModal === 'function') {\n if (!dialog.open) dialog.showModal();\n }\n } else if (dialog.open) {\n if (typeof dialog.close === 'function') {\n dialog.close();\n }\n }\n};\n\nconst findAutofocusTarget = (dialog: HTMLDialogElement) => {\n if (dialog.hasAttribute('autofocus')) return dialog;\n\n return (\n dialog.querySelector<HTMLElement>('[autofocus]') ??\n Array.from(dialog.querySelectorAll<HTMLElement>('*')).find(\n (element) =>\n 'autofocus' in element &&\n (element as HTMLElement & { autofocus: boolean }).autofocus,\n )\n );\n};\n\nexport const useNativeDialog = ({ open, keepMounted, onOpenChange }: UseNativeDialogOptions) => {\n const dialogRef = useRef<HTMLDialogElement>(null);\n const restoreFocusRef = useRef<HTMLElement | null>(null);\n const closeTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n const bodyScrollLockedRef = useRef(false);\n const [phase, setPhase] = useState<DialogPhase>('closed');\n const isPresent = keepMounted || open || phase !== 'closed';\n\n const notifyOpenChange = useCallback(\n (nextOpen: boolean) => {\n onOpenChange?.(nextOpen);\n },\n [onOpenChange],\n );\n\n const finishClose = useCallback(() => {\n const dialog = dialogRef.current;\n if (!dialog) return;\n closeTimerRef.current = null;\n if (dialog.open) {\n dialog.close();\n } else {\n setPhase('closed');\n }\n }, []);\n\n const close = useCallback(() => notifyOpenChange(false), [notifyOpenChange]);\n\n const clearCloseTimer = useCallback(() => {\n if (closeTimerRef.current) clearTimeout(closeTimerRef.current);\n closeTimerRef.current = null;\n }, []);\n\n useEffect(() => {\n const dialog = dialogRef.current;\n if (!dialog) return;\n\n if (open) {\n clearCloseTimer();\n if (phase === 'closing' || phase === 'closed') setPhase('open');\n if (!dialog.open) {\n restoreFocusRef.current = document.activeElement as HTMLElement | null;\n const autofocusTarget = findAutofocusTarget(dialog);\n const existingFocusTarget =\n document.activeElement instanceof HTMLElement &&\n document.activeElement !== dialog &&\n dialog.contains(document.activeElement)\n ? document.activeElement\n : null;\n setDialogOpen(dialog, true);\n (\n autofocusTarget ??\n existingFocusTarget ??\n dialog.querySelector<HTMLElement>('[data-dialog-autofocus]')\n )?.focus();\n }\n if (dialog.open && !bodyScrollLockedRef.current) {\n lockBodyScroll();\n bodyScrollLockedRef.current = true;\n }\n } else if (dialog.open && phase === 'open') {\n setPhase('closing');\n }\n }, [clearCloseTimer, open, phase]);\n\n useEffect(() => {\n if (phase !== 'closing') return;\n const dialog = dialogRef.current;\n if (!dialog || !dialog.open) return;\n\n const styles = window.getComputedStyle(dialog);\n const durations = `${styles.transitionDuration},${styles.animationDuration}`\n .split(',')\n .map((duration) => {\n const value = Number.parseFloat(duration);\n return Number.isFinite(value)\n ? duration.trim().endsWith('ms')\n ? value\n : value * 1000\n : 0;\n });\n const duration = Math.max(...durations, 0);\n closeTimerRef.current = setTimeout(finishClose, duration);\n\n return () => {\n clearCloseTimer();\n };\n }, [clearCloseTimer, finishClose, phase]);\n\n useEffect(\n () => () => {\n clearCloseTimer();\n if (bodyScrollLockedRef.current) {\n unlockBodyScroll();\n bodyScrollLockedRef.current = false;\n }\n },\n [clearCloseTimer],\n );\n\n useEffect(() => {\n const dialog = dialogRef.current;\n if (!dialog) return;\n\n const handleClose = () => {\n clearCloseTimer();\n setPhase('closed');\n if (bodyScrollLockedRef.current) {\n unlockBodyScroll();\n bodyScrollLockedRef.current = false;\n }\n restoreFocusRef.current?.focus();\n restoreFocusRef.current = null;\n };\n\n dialog.addEventListener('close', handleClose);\n return () => dialog.removeEventListener('close', handleClose);\n }, [clearCloseTimer, isPresent]);\n\n return { dialogRef, close, phase, isPresent };\n};\n"],"names":["duration"],"mappings":";AAUA,IAAI,sBAAsB;AAC1B,IAAI,uBAAuB;AAE3B,MAAM,iBAAiB,MAAM;AACzB,MAAI,wBAAwB,GAAG;AAC3B,2BAAuB,SAAS,KAAK,MAAM;AAC3C,aAAS,KAAK,MAAM,WAAW;AAAA,EACnC;AACA,yBAAuB;AAC3B;AAEA,MAAM,mBAAmB,MAAM;AAC3B,wBAAsB,KAAK,IAAI,sBAAsB,GAAG,CAAC;AACzD,MAAI,wBAAwB,GAAG;AAC3B,aAAS,KAAK,MAAM,WAAW;AAC/B,2BAAuB;AAAA,EAC3B;AACJ;AAEA,MAAM,gBAAgB,CAAC,QAA2B,SAAkB;AACtD;AACN,QAAI,OAAO,OAAO,cAAc,YAAY;AACxC,UAAI,CAAC,OAAO,KAAM,QAAO,UAAA;AAAA,IAC7B;AAAA,EACJ;AAKJ;AAEA,MAAM,sBAAsB,CAAC,WAA8B;AACvD,MAAI,OAAO,aAAa,WAAW,EAAG,QAAO;AAE7C,SACI,OAAO,cAA2B,aAAa,KAC/C,MAAM,KAAK,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C;AACA,sBAAgB,SAAS,MAAA;AACzB,sBAAgB,UAAU;AAAA,IAC9B;AAEA,WAAO,iBAAiB,SAAS,WAAW;AAC5C,WAAO,MAAM,OAAO,oBAAoB,SAAS,WAAW;AAAA,EAChE,GAAG,CAAC,iBAAiB,SAAS,CAAC;AAE/B,SAAO,EAAE,WAAW,OAAO,OAAO,UAAA;AACtC;"}
|
package/dist/index.cjs
CHANGED
|
@@ -5,12 +5,16 @@ const Accordion = require("./components/Accordion/Accordion.cjs");
|
|
|
5
5
|
const AccordionItem = require("./components/AccordionItem/AccordionItem.cjs");
|
|
6
6
|
const Breadcrumb = require("./components/Breadcrumb/Breadcrumb.cjs");
|
|
7
7
|
const Button = require("./components/Button/Button.cjs");
|
|
8
|
+
const ButtonCard = require("./components/ButtonCard/ButtonCard.cjs");
|
|
8
9
|
const ColorScheme = require("./components/ColorScheme/ColorScheme.cjs");
|
|
10
|
+
const Drawer = require("./components/Drawer/Drawer.cjs");
|
|
9
11
|
const Footer = require("./components/Footer/Footer.cjs");
|
|
12
|
+
const FunctionButton = require("./components/FunctionButton/FunctionButton.cjs");
|
|
10
13
|
const Hero = require("./components/Hero/Hero.cjs");
|
|
11
14
|
const IconButton = require("./components/IconButton/IconButton.cjs");
|
|
12
15
|
const Label = require("./components/Label/Label.cjs");
|
|
13
16
|
const MainNavigation = require("./components/MainNavigation/MainNavigation.cjs");
|
|
17
|
+
const Modal = require("./components/Modal/Modal.cjs");
|
|
14
18
|
const Notification = require("./components/Notification/Notification.cjs");
|
|
15
19
|
const Pictograph = require("./components/Pictograph/Pictograph.cjs");
|
|
16
20
|
const PictographItem = require("./components/Pictograph/PictographItem.cjs");
|
|
@@ -21,12 +25,16 @@ exports.Accordion = Accordion.Accordion;
|
|
|
21
25
|
exports.AccordionItem = AccordionItem.AccordionItem;
|
|
22
26
|
exports.Breadcrumb = Breadcrumb.Breadcrumb;
|
|
23
27
|
exports.Button = Button.Button;
|
|
28
|
+
exports.ButtonCard = ButtonCard.ButtonCard;
|
|
24
29
|
exports.ColorScheme = ColorScheme.ColorScheme;
|
|
30
|
+
exports.Drawer = Drawer.Drawer;
|
|
25
31
|
exports.Footer = Footer.Footer;
|
|
32
|
+
exports.FunctionButton = FunctionButton.FunctionButton;
|
|
26
33
|
exports.Hero = Hero.Hero;
|
|
27
34
|
exports.IconButton = IconButton.IconButton;
|
|
28
35
|
exports.Label = Label.Label;
|
|
29
36
|
exports.MainNavigation = MainNavigation.MainNavigation;
|
|
37
|
+
exports.Modal = Modal.Modal;
|
|
30
38
|
exports.Notification = Notification.Notification;
|
|
31
39
|
exports.Pictograph = Pictograph.Pictograph;
|
|
32
40
|
exports.PictographItem = PictographItem.PictographItem;
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -2,30 +2,38 @@ export { Accordion } from './components/Accordion';
|
|
|
2
2
|
export { AccordionItem } from './components/AccordionItem';
|
|
3
3
|
export { Breadcrumb } from './components/Breadcrumb';
|
|
4
4
|
export { Button } from './components/Button';
|
|
5
|
+
export { ButtonCard } from './components/ButtonCard';
|
|
5
6
|
export { ColorScheme } from './components/ColorScheme';
|
|
7
|
+
export { Drawer } from './components/Drawer';
|
|
6
8
|
export { Footer } from './components/Footer';
|
|
7
9
|
export { Hero } from './components/Hero';
|
|
8
10
|
export { MainNavigation } from './components/MainNavigation';
|
|
9
11
|
export { Notification } from './components/Notification';
|
|
10
12
|
export { Label } from './components/Label';
|
|
13
|
+
export { Modal } from './components/Modal';
|
|
11
14
|
export { Pictograph, PictographItem } from './components/Pictograph';
|
|
12
15
|
export { Quote } from './components/Quote';
|
|
13
16
|
export { Spinner } from './components/Spinner';
|
|
14
17
|
export { IconButton } from './components/IconButton';
|
|
18
|
+
export { FunctionButton } from './components/FunctionButton';
|
|
15
19
|
export type { AccordionProps } from './components/Accordion';
|
|
16
20
|
export type { AccordionItemProps } from './components/AccordionItem';
|
|
17
21
|
export type { BreadcrumbItem, BreadcrumbLinkProps, BreadcrumbProps } from './components/Breadcrumb';
|
|
18
22
|
export type { ButtonProps, ButtonLinkProps, ButtonVariant, ButtonSize } from './components/Button';
|
|
23
|
+
export type { ButtonCardIcon, ButtonCardLinkProps, ButtonCardProps, ButtonCardSize, } from './components/ButtonCard';
|
|
19
24
|
export type { ColorSchemeProps, ColorSchemeValue } from './components/ColorScheme';
|
|
25
|
+
export type { DrawerHeaderStyle, DrawerProps, DrawerSide, DrawerSize } from './components/Drawer';
|
|
20
26
|
export type { FooterAppLink, FooterAppLinks, FooterLanguage, FooterLink, FooterLinkMeta, FooterLinkProps, FooterMandatoryLink, FooterNavigationGroup, FooterOrganization, FooterProps, FooterRenderLink, FooterSocialLink, FooterSocialPlatform, FooterTopSectionGroup, FooterTopSectionLink, } from './components/Footer';
|
|
21
27
|
export type { HeroProps, HeroHeadingLevel, HeroCommonImageProps, HeroImageComponent, } from './components/Hero';
|
|
22
28
|
export type { MainNavigationItem, MainNavigationLink, MainNavigationOrganizationLink, MainNavigationPanel, MainNavigationProps, MainNavigationSubmenuColumn, } from './components/MainNavigation';
|
|
23
29
|
export type { NotificationProps, NotificationVariant } from './components/Notification';
|
|
24
30
|
export type { LabelProps, LabelVariant } from './components/Label';
|
|
31
|
+
export type { ModalHeaderStyle, ModalProps, ModalSize } from './components/Modal';
|
|
25
32
|
export type { PictographItemProps, PictographProps } from './components/Pictograph';
|
|
26
33
|
export type { QuoteProps } from './components/Quote';
|
|
27
34
|
export type { SpinnerColor, SpinnerProps, SpinnerSize } from './components/Spinner';
|
|
28
35
|
export type { Icon, IconPosition, IconButtonLinkProps, IconButtonProps, IconButtonSize, } from './components/IconButton';
|
|
36
|
+
export type { FunctionButtonIcon, FunctionButtonProps, FunctionButtonSize, FunctionButtonVariant, } from './components/FunctionButton';
|
|
29
37
|
export { cn } from './utils';
|
|
30
38
|
export type { CnDictionary, CnInput } from './utils';
|
|
31
39
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC;AAG5B,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC;AAG5B,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;A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O,EAAE,MAAM,SAAS,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -3,12 +3,16 @@ import { Accordion } from "./components/Accordion/Accordion.js";
|
|
|
3
3
|
import { AccordionItem } from "./components/AccordionItem/AccordionItem.js";
|
|
4
4
|
import { Breadcrumb } from "./components/Breadcrumb/Breadcrumb.js";
|
|
5
5
|
import { Button } from "./components/Button/Button.js";
|
|
6
|
+
import { ButtonCard } from "./components/ButtonCard/ButtonCard.js";
|
|
6
7
|
import { ColorScheme } from "./components/ColorScheme/ColorScheme.js";
|
|
8
|
+
import { Drawer } from "./components/Drawer/Drawer.js";
|
|
7
9
|
import { Footer } from "./components/Footer/Footer.js";
|
|
10
|
+
import { FunctionButton } from "./components/FunctionButton/FunctionButton.js";
|
|
8
11
|
import { Hero } from "./components/Hero/Hero.js";
|
|
9
12
|
import { IconButton } from "./components/IconButton/IconButton.js";
|
|
10
13
|
import { Label } from "./components/Label/Label.js";
|
|
11
14
|
import { MainNavigation } from "./components/MainNavigation/MainNavigation.js";
|
|
15
|
+
import { Modal } from "./components/Modal/Modal.js";
|
|
12
16
|
import { Notification } from "./components/Notification/Notification.js";
|
|
13
17
|
import { Pictograph } from "./components/Pictograph/Pictograph.js";
|
|
14
18
|
import { PictographItem } from "./components/Pictograph/PictographItem.js";
|
|
@@ -20,12 +24,16 @@ export {
|
|
|
20
24
|
AccordionItem,
|
|
21
25
|
Breadcrumb,
|
|
22
26
|
Button,
|
|
27
|
+
ButtonCard,
|
|
23
28
|
ColorScheme,
|
|
29
|
+
Drawer,
|
|
24
30
|
Footer,
|
|
31
|
+
FunctionButton,
|
|
25
32
|
Hero,
|
|
26
33
|
IconButton,
|
|
27
34
|
Label,
|
|
28
35
|
MainNavigation,
|
|
36
|
+
Modal,
|
|
29
37
|
Notification,
|
|
30
38
|
Pictograph,
|
|
31
39
|
PictographItem,
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -2,12 +2,15 @@ require('./elevation.css');
|
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
4
4
|
const elevationLow = "_elevationLow_dspr0_1";
|
|
5
|
+
const elevationMedium = "_elevationMedium_dspr0_8";
|
|
5
6
|
const elevationHigh = "_elevationHigh_dspr0_16";
|
|
6
7
|
const elevationStyles = {
|
|
7
8
|
elevationLow,
|
|
9
|
+
elevationMedium,
|
|
8
10
|
elevationHigh
|
|
9
11
|
};
|
|
10
12
|
exports.default = elevationStyles;
|
|
11
13
|
exports.elevationHigh = elevationHigh;
|
|
12
14
|
exports.elevationLow = elevationLow;
|
|
15
|
+
exports.elevationMedium = elevationMedium;
|
|
13
16
|
//# sourceMappingURL=elevation.module.css.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"elevation.module.css.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"elevation.module.css.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import './elevation.css';
|
|
2
2
|
const elevationLow = "_elevationLow_dspr0_1";
|
|
3
|
+
const elevationMedium = "_elevationMedium_dspr0_8";
|
|
3
4
|
const elevationHigh = "_elevationHigh_dspr0_16";
|
|
4
5
|
const elevationStyles = {
|
|
5
6
|
elevationLow,
|
|
7
|
+
elevationMedium,
|
|
6
8
|
elevationHigh
|
|
7
9
|
};
|
|
8
10
|
export {
|
|
9
11
|
elevationStyles as default,
|
|
10
12
|
elevationHigh,
|
|
11
|
-
elevationLow
|
|
13
|
+
elevationLow,
|
|
14
|
+
elevationMedium
|
|
12
15
|
};
|
|
13
16
|
//# sourceMappingURL=elevation.module.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"elevation.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"elevation.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
@layer dds-components {.
|
|
1
|
+
@layer dds-components {._focusable_bhneb_1 {
|
|
2
2
|
/* Marker class for shared focus treatment */
|
|
3
3
|
}
|
|
4
4
|
|
|
5
|
-
.
|
|
5
|
+
._focusable_bhneb_1:where(:focus, :focus-visible) {
|
|
6
|
+
border-radius: var(--radius-semantic-sm);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
._focusable_bhneb_1:focus {
|
|
6
10
|
outline-color: transparent;
|
|
7
11
|
}
|
|
8
12
|
|
|
9
|
-
.
|
|
13
|
+
._focusable_bhneb_1:focus-visible {
|
|
10
14
|
/* Transparent outline ensures a visible ring fallback in forced colors. */
|
|
11
15
|
outline: 2px solid transparent;
|
|
12
16
|
outline-offset: 2px;
|
|
@@ -15,31 +19,26 @@
|
|
|
15
19
|
0 0 0 4px var(--color-semantic-utility-focus-strong);
|
|
16
20
|
}
|
|
17
21
|
|
|
18
|
-
._focusableRadiusSm_1dunk_18 {
|
|
19
|
-
/* Adds small border radius to focus ring surface without changing focus colors/shadows */
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
._focusableRadiusSm_1dunk_18:focus,
|
|
23
|
-
._focusableRadiusSm_1dunk_18:focus-visible {
|
|
24
|
-
border-radius: var(--radius-semantic-sm);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
22
|
@media (forced-colors: active) {
|
|
28
|
-
.
|
|
23
|
+
._focusable_bhneb_1:focus-visible {
|
|
29
24
|
outline-color: Highlight;
|
|
30
25
|
box-shadow: none;
|
|
31
26
|
}
|
|
32
27
|
}
|
|
33
28
|
|
|
34
|
-
.
|
|
29
|
+
._focusableInset_bhneb_29 {
|
|
35
30
|
/* Marker class for inset focus treatment (ring stays inside the element boundary) */
|
|
36
31
|
}
|
|
37
32
|
|
|
38
|
-
.
|
|
33
|
+
._focusableInset_bhneb_29:where(:focus, :focus-visible) {
|
|
34
|
+
border-radius: var(--radius-semantic-sm);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
._focusableInset_bhneb_29:focus {
|
|
39
38
|
outline-color: transparent;
|
|
40
39
|
}
|
|
41
40
|
|
|
42
|
-
.
|
|
41
|
+
._focusableInset_bhneb_29:focus-visible {
|
|
43
42
|
outline: 2px solid transparent;
|
|
44
43
|
box-shadow:
|
|
45
44
|
inset 0 0 0 2px var(--color-semantic-utility-focus-strong),
|
|
@@ -47,34 +46,34 @@
|
|
|
47
46
|
}
|
|
48
47
|
|
|
49
48
|
@media (forced-colors: active) {
|
|
50
|
-
.
|
|
49
|
+
._focusableInset_bhneb_29:focus-visible {
|
|
51
50
|
outline-color: Highlight;
|
|
52
51
|
box-shadow: none;
|
|
53
52
|
}
|
|
54
53
|
}
|
|
55
54
|
|
|
56
55
|
@scope ([data-color-scheme='dark']) to ([data-color-scheme='light']) {
|
|
57
|
-
.
|
|
56
|
+
._focusable_bhneb_1:focus-visible {
|
|
58
57
|
box-shadow:
|
|
59
58
|
0 0 0 2px var(--color-semantic-utility-focus-strong),
|
|
60
59
|
0 0 0 4px var(--color-semantic-utility-focus-soft);
|
|
61
60
|
}
|
|
62
61
|
|
|
63
|
-
.
|
|
62
|
+
._focusableInset_bhneb_29:focus-visible {
|
|
64
63
|
box-shadow:
|
|
65
64
|
inset 0 0 0 2px var(--color-semantic-utility-focus-soft),
|
|
66
65
|
inset 0 0 0 4px var(--color-semantic-utility-focus-strong);
|
|
67
66
|
}
|
|
68
67
|
|
|
69
68
|
@media (forced-colors: active) {
|
|
70
|
-
.
|
|
71
|
-
.
|
|
69
|
+
._focusable_bhneb_1:focus-visible,
|
|
70
|
+
._focusableInset_bhneb_29:focus-visible {
|
|
72
71
|
box-shadow: none;
|
|
73
72
|
}
|
|
74
73
|
}
|
|
75
74
|
}
|
|
76
75
|
|
|
77
|
-
.
|
|
76
|
+
._focusClipGuard_bhneb_76 {
|
|
78
77
|
/*
|
|
79
78
|
* Prevents focus rings from being clipped when the container uses overflow: hidden.
|
|
80
79
|
*
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
require('./focus.css');
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
4
|
-
const focusable = "
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const focusClipGuard = "_focusClipGuard_1dunk_77";
|
|
4
|
+
const focusable = "_focusable_bhneb_1";
|
|
5
|
+
const focusableInset = "_focusableInset_bhneb_29";
|
|
6
|
+
const focusClipGuard = "_focusClipGuard_bhneb_76";
|
|
8
7
|
const focusStyles = {
|
|
9
8
|
focusable,
|
|
10
|
-
focusableRadiusSm,
|
|
11
9
|
focusableInset,
|
|
12
10
|
focusClipGuard
|
|
13
11
|
};
|
|
@@ -15,5 +13,4 @@ exports.default = focusStyles;
|
|
|
15
13
|
exports.focusClipGuard = focusClipGuard;
|
|
16
14
|
exports.focusable = focusable;
|
|
17
15
|
exports.focusableInset = focusableInset;
|
|
18
|
-
exports.focusableRadiusSm = focusableRadiusSm;
|
|
19
16
|
//# sourceMappingURL=focus.module.css.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"focus.module.css.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"focus.module.css.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import './focus.css';
|
|
2
|
-
const focusable = "
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const focusClipGuard = "_focusClipGuard_1dunk_77";
|
|
2
|
+
const focusable = "_focusable_bhneb_1";
|
|
3
|
+
const focusableInset = "_focusableInset_bhneb_29";
|
|
4
|
+
const focusClipGuard = "_focusClipGuard_bhneb_76";
|
|
6
5
|
const focusStyles = {
|
|
7
6
|
focusable,
|
|
8
|
-
focusableRadiusSm,
|
|
9
7
|
focusableInset,
|
|
10
8
|
focusClipGuard
|
|
11
9
|
};
|
|
@@ -13,7 +11,6 @@ export {
|
|
|
13
11
|
focusStyles as default,
|
|
14
12
|
focusClipGuard,
|
|
15
13
|
focusable,
|
|
16
|
-
focusableInset
|
|
17
|
-
focusableRadiusSm
|
|
14
|
+
focusableInset
|
|
18
15
|
};
|
|
19
16
|
//# sourceMappingURL=focus.module.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"focus.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"focus.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
@layer dds-components {.
|
|
1
|
+
@layer dds-components {._underlineLink_15fbp_1 {
|
|
2
2
|
text-decoration: underline;
|
|
3
3
|
text-underline-offset: 0.2em;
|
|
4
4
|
text-decoration-skip-ink: auto;
|
|
5
5
|
text-decoration-thickness: from-font;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
.
|
|
8
|
+
._underlineLinkOnHover_15fbp_8:hover,
|
|
9
|
+
._underlineLinkOnHover_15fbp_8:focus-visible {
|
|
9
10
|
text-decoration: underline;
|
|
10
11
|
text-underline-offset: 0.2em;
|
|
11
12
|
text-decoration-skip-ink: auto;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
require('./text-decoration.css');
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
4
|
-
const underlineLink = "
|
|
5
|
-
const underlineLinkOnHover = "
|
|
4
|
+
const underlineLink = "_underlineLink_15fbp_1";
|
|
5
|
+
const underlineLinkOnHover = "_underlineLinkOnHover_15fbp_8";
|
|
6
6
|
const textDecorationStyles = {
|
|
7
7
|
underlineLink,
|
|
8
8
|
underlineLinkOnHover
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './text-decoration.css';
|
|
2
|
-
const underlineLink = "
|
|
3
|
-
const underlineLinkOnHover = "
|
|
2
|
+
const underlineLink = "_underlineLink_15fbp_1";
|
|
3
|
+
const underlineLinkOnHover = "_underlineLinkOnHover_15fbp_8";
|
|
4
4
|
const textDecorationStyles = {
|
|
5
5
|
underlineLink,
|
|
6
6
|
underlineLinkOnHover
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dnanpm/ui-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "DNA Design System - React UI Components",
|
|
5
5
|
"author": "DNA Oy",
|
|
6
6
|
"license": "ISC",
|
|
@@ -86,8 +86,8 @@
|
|
|
86
86
|
},
|
|
87
87
|
"repository": {
|
|
88
88
|
"type": "git",
|
|
89
|
-
"url": "https://
|
|
89
|
+
"url": "https://dnae.ghe.com/dna/dna-design-system.git",
|
|
90
90
|
"directory": "packages/ui-components"
|
|
91
91
|
},
|
|
92
|
-
"homepage": "https://
|
|
92
|
+
"homepage": "https://dnae.ghe.com/dna/dna-design-system/tree/main/packages/ui-components#readme"
|
|
93
93
|
}
|