@dnanpm/ui-components 0.8.0 → 0.10.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 +13 -0
- package/dist/components/Accordion/Accordion.css +9 -2
- package/dist/components/AccordionItem/AccordionItem.cjs +4 -4
- package/dist/components/AccordionItem/AccordionItem.cjs.map +1 -1
- package/dist/components/AccordionItem/AccordionItem.css +8 -2
- package/dist/components/AccordionItem/AccordionItem.d.ts.map +1 -1
- package/dist/components/AccordionItem/AccordionItem.js +2 -2
- package/dist/components/AccordionItem/AccordionItem.js.map +1 -1
- package/dist/components/Avatar/Avatar.cjs +83 -0
- package/dist/components/Avatar/Avatar.cjs.map +1 -0
- package/dist/components/Avatar/Avatar.css +188 -0
- package/dist/components/Avatar/Avatar.d.ts +3 -0
- package/dist/components/Avatar/Avatar.d.ts.map +1 -0
- package/dist/components/Avatar/Avatar.js +83 -0
- package/dist/components/Avatar/Avatar.js.map +1 -0
- package/dist/components/Avatar/Avatar.module.css.cjs +40 -0
- package/dist/components/Avatar/Avatar.module.css.cjs.map +1 -0
- package/dist/components/Avatar/Avatar.module.css.js +40 -0
- package/dist/components/Avatar/Avatar.module.css.js.map +1 -0
- package/dist/components/Avatar/Avatar.types.d.ts +66 -0
- package/dist/components/Avatar/Avatar.types.d.ts.map +1 -0
- package/dist/components/Avatar/Avatar.utils.cjs +17 -0
- package/dist/components/Avatar/Avatar.utils.cjs.map +1 -0
- package/dist/components/Avatar/Avatar.utils.d.ts +6 -0
- package/dist/components/Avatar/Avatar.utils.d.ts.map +1 -0
- package/dist/components/Avatar/Avatar.utils.js +17 -0
- package/dist/components/Avatar/Avatar.utils.js.map +1 -0
- package/dist/components/Avatar/index.d.ts +3 -0
- package/dist/components/Avatar/index.d.ts.map +1 -0
- package/dist/components/Breadcrumb/Breadcrumb.cjs +9 -12
- package/dist/components/Breadcrumb/Breadcrumb.cjs.map +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.css +20 -17
- package/dist/components/Breadcrumb/Breadcrumb.d.ts.map +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.js +2 -5
- package/dist/components/Breadcrumb/Breadcrumb.js.map +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.module.css.cjs +5 -8
- package/dist/components/Breadcrumb/Breadcrumb.module.css.cjs.map +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.module.css.js +5 -8
- package/dist/components/Breadcrumb/Breadcrumb.module.css.js.map +1 -1
- package/dist/components/Button/Button.cjs +29 -3
- package/dist/components/Button/Button.cjs.map +1 -1
- package/dist/components/Button/Button.css +76 -30
- package/dist/components/Button/Button.d.ts +1 -1
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/Button.js +28 -2
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/Button/Button.module.css.cjs +19 -11
- package/dist/components/Button/Button.module.css.cjs.map +1 -1
- package/dist/components/Button/Button.module.css.js +19 -11
- package/dist/components/Button/Button.module.css.js.map +1 -1
- package/dist/components/Button/Button.types.d.ts +20 -3
- package/dist/components/Button/Button.types.d.ts.map +1 -1
- package/dist/components/Button/index.d.ts +1 -1
- package/dist/components/Button/index.d.ts.map +1 -1
- package/dist/components/ButtonCard/ButtonCard.cjs +19 -14
- package/dist/components/ButtonCard/ButtonCard.cjs.map +1 -1
- package/dist/components/ButtonCard/ButtonCard.css +62 -20
- package/dist/components/ButtonCard/ButtonCard.d.ts +2 -1
- package/dist/components/ButtonCard/ButtonCard.d.ts.map +1 -1
- package/dist/components/ButtonCard/ButtonCard.js +17 -12
- package/dist/components/ButtonCard/ButtonCard.js.map +1 -1
- package/dist/components/ButtonCard/ButtonCard.module.css.cjs +14 -12
- package/dist/components/ButtonCard/ButtonCard.module.css.cjs.map +1 -1
- package/dist/components/ButtonCard/ButtonCard.module.css.js +14 -12
- package/dist/components/ButtonCard/ButtonCard.module.css.js.map +1 -1
- package/dist/components/ButtonCard/ButtonCard.types.d.ts +3 -2
- package/dist/components/ButtonCard/ButtonCard.types.d.ts.map +1 -1
- package/dist/components/Checkbox/Checkbox.cjs +105 -0
- package/dist/components/Checkbox/Checkbox.cjs.map +1 -0
- package/dist/components/Checkbox/Checkbox.css +323 -0
- package/dist/components/Checkbox/Checkbox.d.ts +3 -0
- package/dist/components/Checkbox/Checkbox.d.ts.map +1 -0
- package/dist/components/Checkbox/Checkbox.js +105 -0
- package/dist/components/Checkbox/Checkbox.js.map +1 -0
- package/dist/components/Checkbox/Checkbox.module.css.cjs +35 -0
- package/dist/components/Checkbox/Checkbox.module.css.cjs.map +1 -0
- package/dist/components/Checkbox/Checkbox.module.css.js +35 -0
- package/dist/components/Checkbox/Checkbox.module.css.js.map +1 -0
- package/dist/components/Checkbox/Checkbox.types.d.ts +47 -0
- package/dist/components/Checkbox/Checkbox.types.d.ts.map +1 -0
- package/dist/components/Checkbox/index.d.ts +3 -0
- package/dist/components/Checkbox/index.d.ts.map +1 -0
- package/dist/components/ContentCard/ContentCard.cjs +97 -0
- package/dist/components/ContentCard/ContentCard.cjs.map +1 -0
- package/dist/components/ContentCard/ContentCard.css +254 -0
- package/dist/components/ContentCard/ContentCard.d.ts +3 -0
- package/dist/components/ContentCard/ContentCard.d.ts.map +1 -0
- package/dist/components/ContentCard/ContentCard.js +97 -0
- package/dist/components/ContentCard/ContentCard.js.map +1 -0
- package/dist/components/ContentCard/ContentCard.module.css.cjs +24 -0
- package/dist/components/ContentCard/ContentCard.module.css.cjs.map +1 -0
- package/dist/components/ContentCard/ContentCard.module.css.js +25 -0
- package/dist/components/ContentCard/ContentCard.module.css.js.map +1 -0
- package/dist/components/ContentCard/ContentCard.types.d.ts +100 -0
- package/dist/components/ContentCard/ContentCard.types.d.ts.map +1 -0
- package/dist/components/ContentCard/index.d.ts +3 -0
- package/dist/components/ContentCard/index.d.ts.map +1 -0
- package/dist/components/Drawer/Drawer.cjs +15 -7
- package/dist/components/Drawer/Drawer.cjs.map +1 -1
- package/dist/components/Drawer/Drawer.css +47 -45
- package/dist/components/Drawer/Drawer.d.ts.map +1 -1
- package/dist/components/Drawer/Drawer.js +12 -4
- package/dist/components/Drawer/Drawer.js.map +1 -1
- package/dist/components/Drawer/Drawer.module.css.cjs +16 -16
- package/dist/components/Drawer/Drawer.module.css.js +16 -16
- package/dist/components/Footer/Footer.cjs +8 -9
- package/dist/components/Footer/Footer.cjs.map +1 -1
- package/dist/components/Footer/Footer.css +91 -84
- package/dist/components/Footer/Footer.d.ts.map +1 -1
- package/dist/components/Footer/Footer.js +1 -2
- package/dist/components/Footer/Footer.js.map +1 -1
- 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 +2 -2
- package/dist/components/FunctionButton/FunctionButton.cjs.map +1 -1
- package/dist/components/FunctionButton/FunctionButton.css +5 -2
- package/dist/components/FunctionButton/FunctionButton.js +1 -1
- package/dist/components/FunctionButton/FunctionButton.js.map +1 -1
- package/dist/components/Hero/Hero.cjs +30 -29
- package/dist/components/Hero/Hero.cjs.map +1 -1
- package/dist/components/Hero/Hero.css +86 -74
- package/dist/components/Hero/Hero.d.ts +1 -1
- package/dist/components/Hero/Hero.d.ts.map +1 -1
- package/dist/components/Hero/Hero.js +30 -29
- package/dist/components/Hero/Hero.js.map +1 -1
- package/dist/components/Hero/Hero.module.css.cjs +20 -17
- package/dist/components/Hero/Hero.module.css.cjs.map +1 -1
- package/dist/components/Hero/Hero.module.css.js +20 -17
- package/dist/components/Hero/Hero.module.css.js.map +1 -1
- package/dist/components/Hero/Hero.types.d.ts +2 -6
- package/dist/components/Hero/Hero.types.d.ts.map +1 -1
- package/dist/components/IconButton/IconButton.cjs +3 -4
- package/dist/components/IconButton/IconButton.cjs.map +1 -1
- package/dist/components/IconButton/IconButton.css +5 -2
- package/dist/components/IconButton/IconButton.d.ts.map +1 -1
- package/dist/components/IconButton/IconButton.js +1 -2
- package/dist/components/IconButton/IconButton.js.map +1 -1
- package/dist/components/Label/Label.css +5 -2
- package/dist/components/MainNavigation/MainNavigation.cjs +556 -191
- package/dist/components/MainNavigation/MainNavigation.cjs.map +1 -1
- package/dist/components/MainNavigation/MainNavigation.css +297 -170
- package/dist/components/MainNavigation/MainNavigation.d.ts +1 -1
- package/dist/components/MainNavigation/MainNavigation.d.ts.map +1 -1
- package/dist/components/MainNavigation/MainNavigation.js +526 -161
- package/dist/components/MainNavigation/MainNavigation.js.map +1 -1
- package/dist/components/MainNavigation/MainNavigation.module.css.cjs +80 -68
- package/dist/components/MainNavigation/MainNavigation.module.css.cjs.map +1 -1
- package/dist/components/MainNavigation/MainNavigation.module.css.js +80 -68
- package/dist/components/MainNavigation/MainNavigation.module.css.js.map +1 -1
- package/dist/components/MainNavigation/MainNavigation.types.d.ts +55 -21
- package/dist/components/MainNavigation/MainNavigation.types.d.ts.map +1 -1
- package/dist/components/MainNavigation/MainNavigation.utils.cjs +28 -4
- package/dist/components/MainNavigation/MainNavigation.utils.cjs.map +1 -1
- package/dist/components/MainNavigation/MainNavigation.utils.d.ts +11 -1
- package/dist/components/MainNavigation/MainNavigation.utils.d.ts.map +1 -1
- package/dist/components/MainNavigation/MainNavigation.utils.js +28 -4
- package/dist/components/MainNavigation/MainNavigation.utils.js.map +1 -1
- package/dist/components/MainNavigation/index.d.ts +1 -1
- package/dist/components/MainNavigation/index.d.ts.map +1 -1
- package/dist/components/Modal/Modal.cjs +14 -6
- package/dist/components/Modal/Modal.cjs.map +1 -1
- package/dist/components/Modal/Modal.css +43 -40
- package/dist/components/Modal/Modal.d.ts.map +1 -1
- package/dist/components/Modal/Modal.js +12 -4
- package/dist/components/Modal/Modal.js.map +1 -1
- package/dist/components/Modal/Modal.module.css.cjs +18 -18
- package/dist/components/Modal/Modal.module.css.js +18 -18
- package/dist/components/Notification/Notification.cjs +3 -2
- package/dist/components/Notification/Notification.cjs.map +1 -1
- package/dist/components/Notification/Notification.css +20 -12
- package/dist/components/Notification/Notification.d.ts.map +1 -1
- package/dist/components/Notification/Notification.js +2 -1
- package/dist/components/Notification/Notification.js.map +1 -1
- package/dist/components/Notification/Notification.module.css.cjs +9 -9
- package/dist/components/Notification/Notification.module.css.js +9 -9
- package/dist/components/Pagination/Pagination.cjs +142 -0
- package/dist/components/Pagination/Pagination.cjs.map +1 -0
- package/dist/components/Pagination/Pagination.css +256 -0
- package/dist/components/Pagination/Pagination.d.ts +3 -0
- package/dist/components/Pagination/Pagination.d.ts.map +1 -0
- package/dist/components/Pagination/Pagination.js +142 -0
- package/dist/components/Pagination/Pagination.js.map +1 -0
- package/dist/components/Pagination/Pagination.module.css.cjs +34 -0
- package/dist/components/Pagination/Pagination.module.css.cjs.map +1 -0
- package/dist/components/Pagination/Pagination.module.css.js +34 -0
- package/dist/components/Pagination/Pagination.module.css.js.map +1 -0
- package/dist/components/Pagination/Pagination.types.d.ts +20 -0
- package/dist/components/Pagination/Pagination.types.d.ts.map +1 -0
- package/dist/components/Pagination/Pagination.utils.cjs +76 -0
- package/dist/components/Pagination/Pagination.utils.cjs.map +1 -0
- package/dist/components/Pagination/Pagination.utils.d.ts +21 -0
- package/dist/components/Pagination/Pagination.utils.d.ts.map +1 -0
- package/dist/components/Pagination/Pagination.utils.js +76 -0
- package/dist/components/Pagination/Pagination.utils.js.map +1 -0
- package/dist/components/Pagination/index.d.ts +3 -0
- package/dist/components/Pagination/index.d.ts.map +1 -0
- package/dist/components/Pictograph/Pictograph.css +9 -2
- package/dist/components/Pictograph/PictographItem.css +9 -2
- package/dist/components/Quote/Quote.css +5 -2
- package/dist/components/Spinner/Spinner.css +9 -2
- package/dist/design-tokens/dist/tokens.cjs +5 -0
- package/dist/design-tokens/dist/tokens.cjs.map +1 -0
- package/dist/design-tokens/dist/tokens.js +5 -0
- package/dist/design-tokens/dist/tokens.js.map +1 -0
- package/dist/index.cjs +8 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +10 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/dist/styles/utilities.css +6 -0
- package/dist/styles/utils/elevation.css +34 -26
- package/dist/styles/utils/focus.css +63 -65
- package/dist/styles/utils/index.cjs +33 -0
- package/dist/styles/utils/index.cjs.map +1 -0
- package/dist/styles/utils/index.d.ts +20 -0
- package/dist/styles/utils/index.d.ts.map +1 -0
- package/dist/styles/utils/index.js +33 -0
- package/dist/styles/utils/index.js.map +1 -0
- package/dist/styles/utils/overlay.css +35 -28
- package/dist/styles/utils/text-decoration.css +19 -12
- package/dist/styles.css +46 -12
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/isRenderable/index.d.ts +2 -0
- package/dist/utils/isRenderable/index.d.ts.map +1 -0
- package/dist/utils/isRenderable/isRenderable.cjs +5 -0
- package/dist/utils/isRenderable/isRenderable.cjs.map +1 -0
- package/dist/utils/isRenderable/isRenderable.d.ts +4 -0
- package/dist/utils/isRenderable/isRenderable.d.ts.map +1 -0
- package/dist/utils/isRenderable/isRenderable.js +5 -0
- package/dist/utils/isRenderable/isRenderable.js.map +1 -0
- package/package.json +12 -4
- package/dist/styles/utils/elevation.module.css.cjs +0 -16
- package/dist/styles/utils/elevation.module.css.cjs.map +0 -1
- package/dist/styles/utils/elevation.module.css.js +0 -16
- package/dist/styles/utils/elevation.module.css.js.map +0 -1
- package/dist/styles/utils/focus.module.css.cjs +0 -16
- package/dist/styles/utils/focus.module.css.cjs.map +0 -1
- package/dist/styles/utils/focus.module.css.js +0 -16
- package/dist/styles/utils/focus.module.css.js.map +0 -1
- package/dist/styles/utils/overlay.module.css.cjs +0 -13
- package/dist/styles/utils/overlay.module.css.cjs.map +0 -1
- package/dist/styles/utils/overlay.module.css.js +0 -13
- package/dist/styles/utils/overlay.module.css.js.map +0 -1
- package/dist/styles/utils/text-decoration.module.css.cjs +0 -13
- package/dist/styles/utils/text-decoration.module.css.cjs.map +0 -1
- package/dist/styles/utils/text-decoration.module.css.js +0 -13
- package/dist/styles/utils/text-decoration.module.css.js.map +0 -1
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { ContentCard } from './ContentCard';
|
|
2
|
+
export type { ContentCardAppearance, ContentCardArticleProps, ContentCardDivProps, ContentCardElement, ContentCardHeadingLevel, ContentCardLiProps, ContentCardLogoBackground, ContentCardMediaKind, ContentCardMediaPosition, ContentCardMediaWidth, ContentCardProps, ContentCardSectionProps, } from './ContentCard.types';
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ContentCard/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EACR,qBAAqB,EACrB,uBAAuB,EACvB,mBAAmB,EACnB,kBAAkB,EAClB,uBAAuB,EACvB,kBAAkB,EAClB,yBAAyB,EACzB,oBAAoB,EACpB,wBAAwB,EACxB,qBAAqB,EACrB,gBAAgB,EAChB,uBAAuB,GAC1B,MAAM,qBAAqB,CAAC"}
|
|
@@ -3,8 +3,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
4
|
const react = require("react");
|
|
5
5
|
const icons = require("@dnanpm/icons");
|
|
6
|
-
const
|
|
7
|
-
const focus_module = require("../../styles/utils/focus.module.css.cjs");
|
|
6
|
+
const index = require("../../styles/utils/index.cjs");
|
|
8
7
|
const useDialogDismissal = require("../Modal/useDialogDismissal.cjs");
|
|
9
8
|
const useNativeDialog = require("../Modal/useNativeDialog.cjs");
|
|
10
9
|
const Drawer_module = require("./Drawer.module.css.cjs");
|
|
@@ -53,6 +52,7 @@ const Drawer = ({
|
|
|
53
52
|
"dialog",
|
|
54
53
|
{
|
|
55
54
|
...props,
|
|
55
|
+
"data-color-scheme": "light",
|
|
56
56
|
ref: (node) => {
|
|
57
57
|
dialogRef.current = node;
|
|
58
58
|
if (typeof ref === "function") ref(node);
|
|
@@ -60,7 +60,7 @@ const Drawer = ({
|
|
|
60
60
|
},
|
|
61
61
|
className: cn.cn(
|
|
62
62
|
Drawer_module.default.drawer,
|
|
63
|
-
|
|
63
|
+
index.elevationStyles.elevationHigh,
|
|
64
64
|
Drawer_module.default[`drawer--${size}`],
|
|
65
65
|
Drawer_module.default[`drawer--${headerStyle}`],
|
|
66
66
|
Drawer_module.default[`drawer--${side}`],
|
|
@@ -79,20 +79,28 @@ const Drawer = ({
|
|
|
79
79
|
"button",
|
|
80
80
|
{
|
|
81
81
|
type: "button",
|
|
82
|
-
className: cn.cn(Drawer_module.default.drawer__close,
|
|
82
|
+
className: cn.cn(Drawer_module.default.drawer__close, index.focusStyles.focusable),
|
|
83
83
|
"aria-label": closeLabel,
|
|
84
84
|
"data-dialog-autofocus": "true",
|
|
85
|
+
"data-color-scheme": headerStyle,
|
|
85
86
|
onClick: close,
|
|
86
87
|
children: /* @__PURE__ */ jsxRuntime.jsx(icons.Close, { "aria-hidden": "true" })
|
|
87
88
|
}
|
|
88
89
|
),
|
|
89
|
-
(title || description) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: Drawer_module.default.drawer__title, children: [
|
|
90
|
+
(title || description) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: Drawer_module.default.drawer__title, "data-color-scheme": headerStyle, children: [
|
|
90
91
|
title && /* @__PURE__ */ jsxRuntime.jsx("h2", { id: titleId, className: Drawer_module.default.drawer__heading, children: title }),
|
|
91
|
-
description && /* @__PURE__ */ jsxRuntime.jsx(
|
|
92
|
+
description && /* @__PURE__ */ jsxRuntime.jsx(
|
|
93
|
+
"div",
|
|
94
|
+
{
|
|
95
|
+
id: descriptionId,
|
|
96
|
+
className: cn.cn(Drawer_module.default.drawer__description, "dds-prose"),
|
|
97
|
+
children: description
|
|
98
|
+
}
|
|
99
|
+
)
|
|
92
100
|
] }),
|
|
93
101
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: Drawer_module.default.drawer__content, children })
|
|
94
102
|
] }),
|
|
95
|
-
footer && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn.cn(Drawer_module.default["drawer__bottom-bar"],
|
|
103
|
+
footer && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn.cn(Drawer_module.default["drawer__bottom-bar"], index.elevationStyles.elevationMedium), children: footer })
|
|
96
104
|
]
|
|
97
105
|
}
|
|
98
106
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.cjs","sources":["../../../src/components/Drawer/Drawer.tsx"],"sourcesContent":["import { useId } from 'react';\nimport { Close } from '@dnanpm/icons';\nimport { cn } from '../../utils/cn';\nimport elevationStyles
|
|
1
|
+
{"version":3,"file":"Drawer.cjs","sources":["../../../src/components/Drawer/Drawer.tsx"],"sourcesContent":["import { useId } from 'react';\nimport { Close } from '@dnanpm/icons';\nimport { cn } from '../../utils/cn';\nimport { elevationStyles, focusStyles } from '../../styles/utils';\nimport { useDialogDismissal } from '../Modal/useDialogDismissal';\nimport { useNativeDialog } from '../Modal/useNativeDialog';\nimport styles from './Drawer.module.css';\nimport type { DrawerProps } from './Drawer.types';\n\nexport const Drawer = ({\n open,\n onOpenChange,\n title,\n description,\n children,\n footer,\n size = 'small',\n headerStyle = 'light',\n side = 'right',\n fixedTitle = false,\n disableCloseOptions = false,\n closeLabel = 'Sulje dialogi',\n keepMounted = false,\n className,\n ref,\n onKeyDown,\n onClick,\n onPointerDown,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n 'aria-describedby': ariaDescribedBy,\n ...props\n}: DrawerProps) => {\n const titleId = useId();\n const descriptionId = useId();\n const { dialogRef, close, phase, isPresent } = useNativeDialog({\n open: open ?? false,\n keepMounted,\n onOpenChange,\n });\n const describedBy =\n [description ? descriptionId : undefined, ariaDescribedBy].filter(Boolean).join(' ') ||\n undefined;\n const dialogDismissalProps = useDialogDismissal({\n close,\n disableCloseOptions,\n onClick,\n onKeyDown,\n onPointerDown,\n });\n\n if (!isPresent) return null;\n\n return (\n <dialog\n {...props}\n data-color-scheme=\"light\"\n ref={(node) => {\n dialogRef.current = node;\n if (typeof ref === 'function') ref(node);\n else if (ref) ref.current = node;\n }}\n className={cn(\n styles.drawer,\n elevationStyles.elevationHigh,\n styles[`drawer--${size}`],\n styles[`drawer--${headerStyle}`],\n styles[`drawer--${side}`],\n { [styles['drawer--fixed-title']]: fixedTitle },\n { [styles['drawer--opening']]: phase !== 'closing' },\n { [styles['drawer--closing']]: phase === 'closing' },\n className,\n )}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy ?? (!ariaLabel && title ? titleId : undefined)}\n aria-describedby={describedBy}\n {...dialogDismissalProps}\n >\n <div className={styles.drawer__container}>\n {!disableCloseOptions && (\n <button\n type=\"button\"\n className={cn(styles.drawer__close, focusStyles.focusable)}\n aria-label={closeLabel}\n data-dialog-autofocus=\"true\"\n data-color-scheme={headerStyle}\n onClick={close}\n >\n <Close aria-hidden=\"true\" />\n </button>\n )}\n {(title || description) && (\n <div className={styles.drawer__title} data-color-scheme={headerStyle}>\n {title && (\n <h2 id={titleId} className={styles.drawer__heading}>\n {title}\n </h2>\n )}\n {description && (\n <div\n id={descriptionId}\n className={cn(styles.drawer__description, 'dds-prose')}\n >\n {description}\n </div>\n )}\n </div>\n )}\n <div className={styles.drawer__content}>{children}</div>\n </div>\n {footer && (\n <div className={cn(styles['drawer__bottom-bar'], elevationStyles.elevationMedium)}>\n {footer}\n </div>\n )}\n </dialog>\n );\n};\n"],"names":["useId","useNativeDialog","useDialogDismissal","jsxs","cn","styles","elevationStyles","jsx","focusStyles","Close"],"mappings":";;;;;;;;;;AASO,MAAM,SAAS,CAAC;AAAA,EACnB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP,cAAc;AAAA,EACd,OAAO;AAAA,EACP,aAAa;AAAA,EACb,sBAAsB;AAAA,EACtB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
@layer dds-components {.
|
|
1
|
+
@layer dds-base, dds-components;@layer dds-components { @layer fallback, components; }@layer dds-components.components{._drawer_t9y6s_1 {
|
|
2
2
|
--_drawer-transition-duration-open: 400ms;
|
|
3
3
|
--_drawer-transition-duration-close: 200ms;
|
|
4
4
|
position: fixed;
|
|
@@ -23,43 +23,43 @@
|
|
|
23
23
|
transition-behavior: allow-discrete;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
.
|
|
26
|
+
._drawer_t9y6s_1:not([open]) {
|
|
27
27
|
display: none;
|
|
28
28
|
}
|
|
29
|
-
._drawer--
|
|
29
|
+
._drawer--small_t9y6s_29 {
|
|
30
30
|
width: 375px;
|
|
31
31
|
}
|
|
32
|
-
._drawer--
|
|
32
|
+
._drawer--medium_t9y6s_32 {
|
|
33
33
|
width: 768px;
|
|
34
34
|
}
|
|
35
|
-
._drawer--
|
|
35
|
+
._drawer--large_t9y6s_35 {
|
|
36
36
|
width: 1080px;
|
|
37
37
|
}
|
|
38
|
-
._drawer--
|
|
39
|
-
._drawer--
|
|
38
|
+
._drawer--opening_t9y6s_38,
|
|
39
|
+
._drawer--closing_t9y6s_39 {
|
|
40
40
|
display: flex;
|
|
41
41
|
flex-direction: column;
|
|
42
42
|
}
|
|
43
|
-
._drawer--
|
|
43
|
+
._drawer--opening_t9y6s_38 {
|
|
44
44
|
transition-duration: var(--_drawer-transition-duration-open);
|
|
45
45
|
transform: translateX(-100%);
|
|
46
46
|
}
|
|
47
|
-
._drawer--
|
|
47
|
+
._drawer--closing_t9y6s_39 {
|
|
48
48
|
transform: translateX(0);
|
|
49
49
|
}
|
|
50
|
-
._drawer--
|
|
50
|
+
._drawer--left_t9y6s_50 {
|
|
51
51
|
right: auto;
|
|
52
52
|
left: 0;
|
|
53
53
|
transform: translateX(-100%);
|
|
54
54
|
}
|
|
55
|
-
._drawer--
|
|
55
|
+
._drawer--left_t9y6s_50._drawer--opening_t9y6s_38 {
|
|
56
56
|
transform: translateX(0);
|
|
57
57
|
}
|
|
58
|
-
._drawer--
|
|
58
|
+
._drawer--left_t9y6s_50._drawer--closing_t9y6s_39 {
|
|
59
59
|
transform: translateX(-100%);
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
.
|
|
62
|
+
._drawer_t9y6s_1::backdrop {
|
|
63
63
|
background: var(--color-semantic-utility-overlay-strong);
|
|
64
64
|
opacity: 0;
|
|
65
65
|
transition-property: opacity, overlay;
|
|
@@ -67,25 +67,25 @@
|
|
|
67
67
|
transition-timing-function: ease;
|
|
68
68
|
transition-behavior: allow-discrete;
|
|
69
69
|
}
|
|
70
|
-
._drawer--
|
|
70
|
+
._drawer--opening_t9y6s_38::backdrop {
|
|
71
71
|
opacity: 1;
|
|
72
72
|
transition-duration: var(--_drawer-transition-duration-open);
|
|
73
73
|
}
|
|
74
|
-
._drawer--
|
|
74
|
+
._drawer--closing_t9y6s_39::backdrop {
|
|
75
75
|
opacity: 0;
|
|
76
76
|
transition-duration: var(--_drawer-transition-duration-close);
|
|
77
77
|
}
|
|
78
|
-
.
|
|
78
|
+
._drawer__container_t9y6s_78 {
|
|
79
79
|
display: flex;
|
|
80
80
|
min-height: 0;
|
|
81
81
|
flex: 1 1 auto;
|
|
82
82
|
flex-direction: column;
|
|
83
83
|
overflow: auto;
|
|
84
84
|
}
|
|
85
|
-
._drawer--fixed-
|
|
85
|
+
._drawer--fixed-title_t9y6s_85 ._drawer__container_t9y6s_78 {
|
|
86
86
|
overflow: hidden;
|
|
87
87
|
}
|
|
88
|
-
.
|
|
88
|
+
._drawer__title_t9y6s_88 {
|
|
89
89
|
display: flex;
|
|
90
90
|
flex: 0 0 auto;
|
|
91
91
|
flex-direction: column;
|
|
@@ -95,22 +95,22 @@
|
|
|
95
95
|
border-bottom: var(--borderwidth-semantic-xs) solid var(--color-semantic-border-neutral-base);
|
|
96
96
|
background: var(--color-semantic-surface-base);
|
|
97
97
|
}
|
|
98
|
-
.
|
|
98
|
+
._drawer__heading_t9y6s_98 {
|
|
99
99
|
margin: 0;
|
|
100
100
|
font: var(--typography-heading-md);
|
|
101
101
|
}
|
|
102
|
-
.
|
|
102
|
+
._drawer__description_t9y6s_102 {
|
|
103
103
|
margin: 0;
|
|
104
104
|
}
|
|
105
|
-
.
|
|
105
|
+
._drawer__content_t9y6s_105 {
|
|
106
106
|
flex: 1 1 auto;
|
|
107
107
|
padding: var(--spacing-space-20);
|
|
108
108
|
overflow-wrap: anywhere;
|
|
109
109
|
}
|
|
110
|
-
._drawer--fixed-
|
|
110
|
+
._drawer--fixed-title_t9y6s_85 ._drawer__content_t9y6s_105 {
|
|
111
111
|
overflow: auto;
|
|
112
112
|
}
|
|
113
|
-
.
|
|
113
|
+
._drawer__close_t9y6s_113 {
|
|
114
114
|
position: absolute;
|
|
115
115
|
z-index: 1;
|
|
116
116
|
top: 0;
|
|
@@ -126,94 +126,96 @@
|
|
|
126
126
|
color: var(--color-semantic-foreground-secondary-strong);
|
|
127
127
|
cursor: pointer;
|
|
128
128
|
}
|
|
129
|
-
.
|
|
129
|
+
._drawer__close_t9y6s_113 svg {
|
|
130
130
|
width: 24px;
|
|
131
131
|
height: 24px;
|
|
132
132
|
}
|
|
133
|
-
._drawer__bottom-
|
|
133
|
+
._drawer__bottom-bar_t9y6s_133 {
|
|
134
134
|
flex: 0 0 auto;
|
|
135
135
|
padding: var(--spacing-space-20) var(--spacing-space-20) var(--spacing-space-24);
|
|
136
136
|
border: none;
|
|
137
137
|
border-radius: 0;
|
|
138
138
|
border-top: var(--borderwidth-semantic-xs) solid var(--color-semantic-border-neutral-base);
|
|
139
139
|
}
|
|
140
|
-
._drawer--
|
|
140
|
+
._drawer--dark_t9y6s_140 ._drawer__title_t9y6s_88 {
|
|
141
141
|
border-bottom-color: var(--color-semantic-border-secondary);
|
|
142
142
|
background: var(--color-semantic-surface-secondary-strong);
|
|
143
143
|
color: var(--color-semantic-foreground-inverse);
|
|
144
144
|
}
|
|
145
|
-
._drawer--
|
|
145
|
+
._drawer--dark_t9y6s_140 ._drawer__close_t9y6s_113 {
|
|
146
146
|
background: var(--color-semantic-surface-secondary-mid);
|
|
147
147
|
color: var(--color-semantic-foreground-inverse);
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
-
@media (
|
|
151
|
-
._drawer--
|
|
150
|
+
@media (width >= 768px) {
|
|
151
|
+
._drawer--medium_t9y6s_32 {
|
|
152
152
|
--_drawer-transition-duration-open: 500ms;
|
|
153
153
|
--_drawer-transition-duration-close: 300ms;
|
|
154
154
|
}
|
|
155
|
-
._drawer--
|
|
155
|
+
._drawer--large_t9y6s_35 {
|
|
156
156
|
--_drawer-transition-duration-open: 500ms;
|
|
157
157
|
--_drawer-transition-duration-close: 300ms;
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
|
-
@media (
|
|
161
|
-
._drawer--
|
|
160
|
+
@media (width >= 1024px) {
|
|
161
|
+
._drawer--large_t9y6s_35 {
|
|
162
162
|
--_drawer-transition-duration-open: 600ms;
|
|
163
163
|
--_drawer-transition-duration-close: 400ms;
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
|
-
@media (
|
|
167
|
-
.
|
|
166
|
+
@media (width < 360px) {
|
|
167
|
+
._drawer_t9y6s_1 {
|
|
168
168
|
width: 100vw;
|
|
169
169
|
max-width: 100vw;
|
|
170
170
|
}
|
|
171
171
|
}
|
|
172
172
|
@media (prefers-reduced-motion: reduce) {
|
|
173
|
-
.
|
|
174
|
-
.
|
|
173
|
+
._drawer_t9y6s_1,
|
|
174
|
+
._drawer_t9y6s_1::backdrop {
|
|
175
175
|
transition: none;
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
178
|
@media (forced-colors: active) {
|
|
179
|
-
.
|
|
179
|
+
._drawer_t9y6s_1 {
|
|
180
180
|
border: 2px solid CanvasText;
|
|
181
181
|
box-shadow: none;
|
|
182
182
|
}
|
|
183
|
-
.
|
|
183
|
+
._drawer_t9y6s_1::backdrop {
|
|
184
184
|
background: Canvas;
|
|
185
185
|
opacity: 0.7;
|
|
186
186
|
}
|
|
187
|
-
.
|
|
187
|
+
._drawer__close_t9y6s_113 {
|
|
188
188
|
border: 1px solid ButtonBorder;
|
|
189
189
|
background: ButtonFace;
|
|
190
190
|
color: ButtonText;
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
193
|
|
|
194
|
-
._drawer--
|
|
194
|
+
._drawer--opening_t9y6s_38 {
|
|
195
195
|
@starting-style {
|
|
196
196
|
transform: translateX(0);
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
|
-
._drawer--
|
|
199
|
+
._drawer--opening_t9y6s_38::backdrop {
|
|
200
200
|
@starting-style {
|
|
201
201
|
opacity: 0;
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
|
-
._drawer--
|
|
204
|
+
._drawer--closing_t9y6s_39 {
|
|
205
205
|
@starting-style {
|
|
206
206
|
transform: translateX(-100%);
|
|
207
207
|
}
|
|
208
208
|
}
|
|
209
|
-
._drawer--
|
|
209
|
+
._drawer--left_t9y6s_50._drawer--opening_t9y6s_38 {
|
|
210
210
|
@starting-style {
|
|
211
211
|
transform: translateX(-100%);
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
|
-
._drawer--
|
|
214
|
+
._drawer--left_t9y6s_50._drawer--closing_t9y6s_39 {
|
|
215
215
|
@starting-style {
|
|
216
216
|
transform: translateX(0);
|
|
217
217
|
}
|
|
218
218
|
}
|
|
219
|
-
|
|
219
|
+
/**
|
|
220
|
+
* Do not edit directly, this file was auto-generated.
|
|
221
|
+
*/ }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../../src/components/Drawer/Drawer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../../src/components/Drawer/Drawer.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,eAAO,MAAM,MAAM,GAAI,+SAuBpB,WAAW,mDAqFb,CAAC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useId } from "react";
|
|
3
3
|
import { Close } from "@dnanpm/icons";
|
|
4
|
-
import elevationStyles from "../../styles/utils/
|
|
5
|
-
import focusStyles from "../../styles/utils/focus.module.css.js";
|
|
4
|
+
import { focusStyles, elevationStyles } from "../../styles/utils/index.js";
|
|
6
5
|
import { useDialogDismissal } from "../Modal/useDialogDismissal.js";
|
|
7
6
|
import { useNativeDialog } from "../Modal/useNativeDialog.js";
|
|
8
7
|
import styles from "./Drawer.module.css.js";
|
|
@@ -51,6 +50,7 @@ const Drawer = ({
|
|
|
51
50
|
"dialog",
|
|
52
51
|
{
|
|
53
52
|
...props,
|
|
53
|
+
"data-color-scheme": "light",
|
|
54
54
|
ref: (node) => {
|
|
55
55
|
dialogRef.current = node;
|
|
56
56
|
if (typeof ref === "function") ref(node);
|
|
@@ -80,13 +80,21 @@ const Drawer = ({
|
|
|
80
80
|
className: cn(styles.drawer__close, focusStyles.focusable),
|
|
81
81
|
"aria-label": closeLabel,
|
|
82
82
|
"data-dialog-autofocus": "true",
|
|
83
|
+
"data-color-scheme": headerStyle,
|
|
83
84
|
onClick: close,
|
|
84
85
|
children: /* @__PURE__ */ jsx(Close, { "aria-hidden": "true" })
|
|
85
86
|
}
|
|
86
87
|
),
|
|
87
|
-
(title || description) && /* @__PURE__ */ jsxs("div", { className: styles.drawer__title, children: [
|
|
88
|
+
(title || description) && /* @__PURE__ */ jsxs("div", { className: styles.drawer__title, "data-color-scheme": headerStyle, children: [
|
|
88
89
|
title && /* @__PURE__ */ jsx("h2", { id: titleId, className: styles.drawer__heading, children: title }),
|
|
89
|
-
description && /* @__PURE__ */ jsx(
|
|
90
|
+
description && /* @__PURE__ */ jsx(
|
|
91
|
+
"div",
|
|
92
|
+
{
|
|
93
|
+
id: descriptionId,
|
|
94
|
+
className: cn(styles.drawer__description, "dds-prose"),
|
|
95
|
+
children: description
|
|
96
|
+
}
|
|
97
|
+
)
|
|
90
98
|
] }),
|
|
91
99
|
/* @__PURE__ */ jsx("div", { className: styles.drawer__content, children })
|
|
92
100
|
] }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.js","sources":["../../../src/components/Drawer/Drawer.tsx"],"sourcesContent":["import { useId } from 'react';\nimport { Close } from '@dnanpm/icons';\nimport { cn } from '../../utils/cn';\nimport elevationStyles
|
|
1
|
+
{"version":3,"file":"Drawer.js","sources":["../../../src/components/Drawer/Drawer.tsx"],"sourcesContent":["import { useId } from 'react';\nimport { Close } from '@dnanpm/icons';\nimport { cn } from '../../utils/cn';\nimport { elevationStyles, focusStyles } from '../../styles/utils';\nimport { useDialogDismissal } from '../Modal/useDialogDismissal';\nimport { useNativeDialog } from '../Modal/useNativeDialog';\nimport styles from './Drawer.module.css';\nimport type { DrawerProps } from './Drawer.types';\n\nexport const Drawer = ({\n open,\n onOpenChange,\n title,\n description,\n children,\n footer,\n size = 'small',\n headerStyle = 'light',\n side = 'right',\n fixedTitle = false,\n disableCloseOptions = false,\n closeLabel = 'Sulje dialogi',\n keepMounted = false,\n className,\n ref,\n onKeyDown,\n onClick,\n onPointerDown,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n 'aria-describedby': ariaDescribedBy,\n ...props\n}: DrawerProps) => {\n const titleId = useId();\n const descriptionId = useId();\n const { dialogRef, close, phase, isPresent } = useNativeDialog({\n open: open ?? false,\n keepMounted,\n onOpenChange,\n });\n const describedBy =\n [description ? descriptionId : undefined, ariaDescribedBy].filter(Boolean).join(' ') ||\n undefined;\n const dialogDismissalProps = useDialogDismissal({\n close,\n disableCloseOptions,\n onClick,\n onKeyDown,\n onPointerDown,\n });\n\n if (!isPresent) return null;\n\n return (\n <dialog\n {...props}\n data-color-scheme=\"light\"\n ref={(node) => {\n dialogRef.current = node;\n if (typeof ref === 'function') ref(node);\n else if (ref) ref.current = node;\n }}\n className={cn(\n styles.drawer,\n elevationStyles.elevationHigh,\n styles[`drawer--${size}`],\n styles[`drawer--${headerStyle}`],\n styles[`drawer--${side}`],\n { [styles['drawer--fixed-title']]: fixedTitle },\n { [styles['drawer--opening']]: phase !== 'closing' },\n { [styles['drawer--closing']]: phase === 'closing' },\n className,\n )}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy ?? (!ariaLabel && title ? titleId : undefined)}\n aria-describedby={describedBy}\n {...dialogDismissalProps}\n >\n <div className={styles.drawer__container}>\n {!disableCloseOptions && (\n <button\n type=\"button\"\n className={cn(styles.drawer__close, focusStyles.focusable)}\n aria-label={closeLabel}\n data-dialog-autofocus=\"true\"\n data-color-scheme={headerStyle}\n onClick={close}\n >\n <Close aria-hidden=\"true\" />\n </button>\n )}\n {(title || description) && (\n <div className={styles.drawer__title} data-color-scheme={headerStyle}>\n {title && (\n <h2 id={titleId} className={styles.drawer__heading}>\n {title}\n </h2>\n )}\n {description && (\n <div\n id={descriptionId}\n className={cn(styles.drawer__description, 'dds-prose')}\n >\n {description}\n </div>\n )}\n </div>\n )}\n <div className={styles.drawer__content}>{children}</div>\n </div>\n {footer && (\n <div className={cn(styles['drawer__bottom-bar'], elevationStyles.elevationMedium)}>\n {footer}\n </div>\n )}\n </dialog>\n );\n};\n"],"names":[],"mappings":";;;;;;;;AASO,MAAM,SAAS,CAAC;AAAA,EACnB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP,cAAc;AAAA,EACd,OAAO;AAAA,EACP,aAAa;AAAA,EACb,sBAAsB;AAAA,EACtB,aAAa;AAAA,EACb,cAAc;AAAA,EACd;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,cAAc;AAAA,EACd,mBAAmB;AAAA,EACnB,oBAAoB;AAAA,EACpB,GAAG;AACP,MAAmB;AACf,QAAM,UAAU,MAAA;AAChB,QAAM,gBAAgB,MAAA;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AAAA,cACZ,yBAAsB;AAAA,cACtB,qBAAmB;AAAA,cACnB,SAAS;AAAA,cAET,UAAA,oBAAC,OAAA,EAAM,eAAY,OAAA,CAAO;AAAA,YAAA;AAAA,UAAA;AAAA,WAGhC,SAAS,gBACP,qBAAC,OAAA,EAAI,WAAW,OAAO,eAAe,qBAAmB,aACpD,UAAA;AAAA,YAAA,6BACI,MAAA,EAAG,IAAI,SAAS,WAAW,OAAO,iBAC9B,UAAA,MAAA,CACL;AAAA,YAEH,eACG;AAAA,cAAC;AAAA,cAAA;AAAA,gBACG,IAAI;AAAA,gBACJ,WAAW,GAAG,OAAO,qBAAqB,WAAW;AAAA,gBAEpD,UAAA;AAAA,cAAA;AAAA,YAAA;AAAA,UACL,GAER;AAAA,UAEJ,oBAAC,OAAA,EAAI,WAAW,OAAO,iBAAkB,SAAA,CAAS;AAAA,QAAA,GACtD;AAAA,QACC,UACG,oBAAC,OAAA,EAAI,WAAW,GAAG,OAAO,oBAAoB,GAAG,gBAAgB,eAAe,GAC3E,UAAA,OAAA,CACL;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIhB;"}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
require('./Drawer.css');
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
4
|
-
const drawer = "
|
|
5
|
-
const drawer__container = "
|
|
6
|
-
const drawer__title = "
|
|
7
|
-
const drawer__heading = "
|
|
8
|
-
const drawer__description = "
|
|
9
|
-
const drawer__content = "
|
|
10
|
-
const drawer__close = "
|
|
4
|
+
const drawer = "_drawer_t9y6s_1";
|
|
5
|
+
const drawer__container = "_drawer__container_t9y6s_78";
|
|
6
|
+
const drawer__title = "_drawer__title_t9y6s_88";
|
|
7
|
+
const drawer__heading = "_drawer__heading_t9y6s_98";
|
|
8
|
+
const drawer__description = "_drawer__description_t9y6s_102";
|
|
9
|
+
const drawer__content = "_drawer__content_t9y6s_105";
|
|
10
|
+
const drawer__close = "_drawer__close_t9y6s_113";
|
|
11
11
|
const styles = {
|
|
12
12
|
drawer,
|
|
13
|
-
"drawer--small": "_drawer--
|
|
14
|
-
"drawer--medium": "_drawer--
|
|
15
|
-
"drawer--large": "_drawer--
|
|
16
|
-
"drawer--opening": "_drawer--
|
|
17
|
-
"drawer--closing": "_drawer--
|
|
18
|
-
"drawer--left": "_drawer--
|
|
13
|
+
"drawer--small": "_drawer--small_t9y6s_29",
|
|
14
|
+
"drawer--medium": "_drawer--medium_t9y6s_32",
|
|
15
|
+
"drawer--large": "_drawer--large_t9y6s_35",
|
|
16
|
+
"drawer--opening": "_drawer--opening_t9y6s_38",
|
|
17
|
+
"drawer--closing": "_drawer--closing_t9y6s_39",
|
|
18
|
+
"drawer--left": "_drawer--left_t9y6s_50",
|
|
19
19
|
drawer__container,
|
|
20
|
-
"drawer--fixed-title": "_drawer--fixed-
|
|
20
|
+
"drawer--fixed-title": "_drawer--fixed-title_t9y6s_85",
|
|
21
21
|
drawer__title,
|
|
22
22
|
drawer__heading,
|
|
23
23
|
drawer__description,
|
|
24
24
|
drawer__content,
|
|
25
25
|
drawer__close,
|
|
26
|
-
"drawer__bottom-bar": "_drawer__bottom-
|
|
27
|
-
"drawer--dark": "_drawer--
|
|
26
|
+
"drawer__bottom-bar": "_drawer__bottom-bar_t9y6s_133",
|
|
27
|
+
"drawer--dark": "_drawer--dark_t9y6s_140"
|
|
28
28
|
};
|
|
29
29
|
exports.default = styles;
|
|
30
30
|
exports.drawer = drawer;
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import './Drawer.css';
|
|
2
|
-
const drawer = "
|
|
3
|
-
const drawer__container = "
|
|
4
|
-
const drawer__title = "
|
|
5
|
-
const drawer__heading = "
|
|
6
|
-
const drawer__description = "
|
|
7
|
-
const drawer__content = "
|
|
8
|
-
const drawer__close = "
|
|
2
|
+
const drawer = "_drawer_t9y6s_1";
|
|
3
|
+
const drawer__container = "_drawer__container_t9y6s_78";
|
|
4
|
+
const drawer__title = "_drawer__title_t9y6s_88";
|
|
5
|
+
const drawer__heading = "_drawer__heading_t9y6s_98";
|
|
6
|
+
const drawer__description = "_drawer__description_t9y6s_102";
|
|
7
|
+
const drawer__content = "_drawer__content_t9y6s_105";
|
|
8
|
+
const drawer__close = "_drawer__close_t9y6s_113";
|
|
9
9
|
const styles = {
|
|
10
10
|
drawer,
|
|
11
|
-
"drawer--small": "_drawer--
|
|
12
|
-
"drawer--medium": "_drawer--
|
|
13
|
-
"drawer--large": "_drawer--
|
|
14
|
-
"drawer--opening": "_drawer--
|
|
15
|
-
"drawer--closing": "_drawer--
|
|
16
|
-
"drawer--left": "_drawer--
|
|
11
|
+
"drawer--small": "_drawer--small_t9y6s_29",
|
|
12
|
+
"drawer--medium": "_drawer--medium_t9y6s_32",
|
|
13
|
+
"drawer--large": "_drawer--large_t9y6s_35",
|
|
14
|
+
"drawer--opening": "_drawer--opening_t9y6s_38",
|
|
15
|
+
"drawer--closing": "_drawer--closing_t9y6s_39",
|
|
16
|
+
"drawer--left": "_drawer--left_t9y6s_50",
|
|
17
17
|
drawer__container,
|
|
18
|
-
"drawer--fixed-title": "_drawer--fixed-
|
|
18
|
+
"drawer--fixed-title": "_drawer--fixed-title_t9y6s_85",
|
|
19
19
|
drawer__title,
|
|
20
20
|
drawer__heading,
|
|
21
21
|
drawer__description,
|
|
22
22
|
drawer__content,
|
|
23
23
|
drawer__close,
|
|
24
|
-
"drawer__bottom-bar": "_drawer__bottom-
|
|
25
|
-
"drawer--dark": "_drawer--
|
|
24
|
+
"drawer__bottom-bar": "_drawer__bottom-bar_t9y6s_133",
|
|
25
|
+
"drawer--dark": "_drawer--dark_t9y6s_140"
|
|
26
26
|
};
|
|
27
27
|
export {
|
|
28
28
|
styles as default,
|
|
@@ -3,8 +3,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
4
|
const react = require("react");
|
|
5
5
|
const icons = require("@dnanpm/icons");
|
|
6
|
-
const
|
|
7
|
-
const textDecoration_module = require("../../styles/utils/text-decoration.module.css.cjs");
|
|
6
|
+
const index = require("../../styles/utils/index.cjs");
|
|
8
7
|
const appStoreBadge = require("./assets/app-store-badge.svg.cjs");
|
|
9
8
|
const googlePlayBadge = require("./assets/google-play-badge.svg.cjs");
|
|
10
9
|
const Footer_module = require("./Footer.module.css.cjs");
|
|
@@ -12,7 +11,7 @@ const Footer_utils = require("./Footer.utils.cjs");
|
|
|
12
11
|
const IconButton = require("../IconButton/IconButton.cjs");
|
|
13
12
|
const cn = require("../../utils/cn/cn.cjs");
|
|
14
13
|
const AccordionItem = require("../AccordionItem/AccordionItem.cjs");
|
|
15
|
-
const linkClasses = (extra) => cn.cn(Footer_module.default.footer__link,
|
|
14
|
+
const linkClasses = (extra) => cn.cn(Footer_module.default.footer__link, index.textDecorationStyles.underlineLink, index.focusStyles.focusable, extra);
|
|
16
15
|
const renderNavLink = (link, renderLink) => renderLink(
|
|
17
16
|
{
|
|
18
17
|
href: link.href,
|
|
@@ -25,7 +24,7 @@ const renderNavLink = (link, renderLink) => renderLink(
|
|
|
25
24
|
const renderBadge = (link, src, renderLink, fallbackAriaLabel) => renderLink(
|
|
26
25
|
{
|
|
27
26
|
href: link.href,
|
|
28
|
-
className: cn.cn(Footer_module.default.footer__badge,
|
|
27
|
+
className: cn.cn(Footer_module.default.footer__badge, index.focusStyles.focusable),
|
|
29
28
|
"aria-label": link.ariaLabel ?? fallbackAriaLabel,
|
|
30
29
|
children: /* @__PURE__ */ jsxRuntime.jsx("img", { src, alt: "", "aria-hidden": "true" })
|
|
31
30
|
},
|
|
@@ -67,12 +66,12 @@ const Footer = ({
|
|
|
67
66
|
className: cn.cn(Footer_module.default.footer, className),
|
|
68
67
|
...props,
|
|
69
68
|
children: [
|
|
70
|
-
topSection && topSection.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: Footer_module.default.footer__top, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn.cn(Footer_module.default.footer__inner, Footer_module.default["footer__top-row"]), children: topSection.map((group,
|
|
69
|
+
topSection && topSection.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: Footer_module.default.footer__top, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn.cn(Footer_module.default.footer__inner, Footer_module.default["footer__top-row"]), children: topSection.map((group, index2) => {
|
|
71
70
|
const Icon = Footer_utils.resolveTopSectionIcon(group.icon);
|
|
72
71
|
const links = group.links.filter(
|
|
73
72
|
(link) => !link.opensChat || onChatOpen
|
|
74
73
|
);
|
|
75
|
-
const headingId = `${topSectionHeadingId}-${
|
|
74
|
+
const headingId = `${topSectionHeadingId}-${index2}`;
|
|
76
75
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
77
76
|
"section",
|
|
78
77
|
{
|
|
@@ -160,7 +159,7 @@ const Footer = ({
|
|
|
160
159
|
className: cn.cn(
|
|
161
160
|
Footer_module.default.footer__language,
|
|
162
161
|
isCurrent && Footer_module.default["footer__language--current"],
|
|
163
|
-
|
|
162
|
+
index.focusStyles.focusable
|
|
164
163
|
),
|
|
165
164
|
"aria-label": language.ariaLabel,
|
|
166
165
|
"aria-current": isCurrent ? "true" : void 0,
|
|
@@ -184,7 +183,7 @@ const Footer = ({
|
|
|
184
183
|
href: social.href,
|
|
185
184
|
className: cn.cn(
|
|
186
185
|
Footer_module.default["footer__social-link"],
|
|
187
|
-
|
|
186
|
+
index.focusStyles.focusable
|
|
188
187
|
),
|
|
189
188
|
"aria-label": social.ariaLabel ?? Footer_utils.defaultSocialAriaLabel(social.platform),
|
|
190
189
|
children: Icon ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -213,7 +212,7 @@ const Footer = ({
|
|
|
213
212
|
className: cn.cn(
|
|
214
213
|
Footer_module.default.footer__organization,
|
|
215
214
|
isCurrent && Footer_module.default["footer__organization--current"],
|
|
216
|
-
|
|
215
|
+
index.focusStyles.focusable
|
|
217
216
|
),
|
|
218
217
|
"aria-current": isCurrent ? "true" : void 0,
|
|
219
218
|
children: organization.label
|