@dynatrace/strato-components 0.85.10 → 0.85.32
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/buttons/button/Button.css +1 -0
- package/buttons/button/Button.d.ts +4 -4
- package/buttons/button/Label.d.ts +1 -1
- package/buttons/button/Prefix.d.ts +1 -1
- package/buttons/button/Suffix.d.ts +1 -1
- package/buttons/index.d.ts +2 -0
- package/buttons/index.js +2 -0
- package/buttons/intent-button/IntentButton.d.ts +44 -0
- package/buttons/intent-button/IntentButton.js +102 -0
- package/buttons/intent-button/useIntentButton.d.ts +12 -0
- package/buttons/intent-button/useIntentButton.js +72 -0
- package/content/index.d.ts +4 -0
- package/content/index.js +5 -1
- package/content/progress/ProgressBar.d.ts +4 -4
- package/content/progress/ProgressBarIcon.d.ts +1 -1
- package/content/progress/ProgressBarLabel.d.ts +1 -1
- package/content/progress/ProgressBarValue.d.ts +1 -1
- package/content/progress/ProgressCircle.d.ts +1 -1
- package/content/skeleton/Skeleton.css +33 -0
- package/content/skeleton/Skeleton.d.ts +30 -0
- package/content/skeleton/Skeleton.js +60 -0
- package/content/skeleton/Skeleton.sty.d.ts +10 -0
- package/content/skeleton/Skeleton.sty.js +25 -0
- package/content/skeleton/SkeletonText.d.ts +24 -0
- package/content/skeleton/SkeletonText.js +84 -0
- package/core/components/app-root/AppRoot.d.ts +2 -2
- package/core/components/focus-scope/FocusScope.d.ts +1 -1
- package/core/contexts/FocusContext.d.ts +1 -2
- package/core/providers/FocusProvider.d.ts +2 -3
- package/esm/buttons/button/Button.css +1 -0
- package/esm/buttons/index.js +2 -0
- package/esm/buttons/index.js.map +2 -2
- package/esm/buttons/intent-button/IntentButton.js +74 -0
- package/esm/buttons/intent-button/IntentButton.js.map +7 -0
- package/esm/buttons/intent-button/useIntentButton.js +57 -0
- package/esm/buttons/intent-button/useIntentButton.js.map +7 -0
- package/esm/content/index.js +5 -1
- package/esm/content/index.js.map +2 -2
- package/esm/content/skeleton/Skeleton.css +33 -0
- package/esm/content/skeleton/Skeleton.js +32 -0
- package/esm/content/skeleton/Skeleton.js.map +7 -0
- package/esm/content/skeleton/Skeleton.sty.js +7 -0
- package/esm/content/skeleton/Skeleton.sty.js.map +7 -0
- package/esm/content/skeleton/SkeletonText.js +56 -0
- package/esm/content/skeleton/SkeletonText.js.map +7 -0
- package/esm/core/components/focus-scope/FocusScope.js.map +1 -1
- package/esm/core/contexts/FocusContext.js.map +2 -2
- package/esm/core/providers/FocusProvider.js.map +2 -2
- package/esm/layouts/{Divider → divider}/Divider.css +5 -5
- package/esm/layouts/{Divider → divider}/Divider.js.map +1 -1
- package/esm/layouts/{Divider → divider}/Divider.sty.js +1 -1
- package/esm/layouts/{Divider → divider}/Divider.sty.js.map +2 -2
- package/esm/layouts/helpers/spacingToCss.js +13 -0
- package/esm/layouts/helpers/spacingToCss.js.map +7 -0
- package/esm/layouts/hooks/useBreakpoint.js +44 -0
- package/esm/layouts/hooks/useBreakpoint.js.map +7 -0
- package/esm/layouts/hooks/useLayoutSizeProps.js +15 -0
- package/esm/layouts/hooks/useLayoutSizeProps.js.map +7 -0
- package/esm/layouts/hooks/useLayoutStyles.js +105 -0
- package/esm/layouts/hooks/useLayoutStyles.js.map +7 -0
- package/esm/layouts/hooks/useMarginProps.js +55 -0
- package/esm/layouts/hooks/useMarginProps.js.map +7 -0
- package/esm/layouts/hooks/usePaddingProps.js +59 -0
- package/esm/layouts/hooks/usePaddingProps.js.map +7 -0
- package/esm/layouts/index.js +8 -2
- package/esm/layouts/index.js.map +2 -2
- package/esm/layouts/surface/Surface.css +95 -0
- package/esm/layouts/surface/Surface.js +84 -0
- package/esm/layouts/surface/Surface.js.map +7 -0
- package/esm/layouts/surface/Surface.sty.js +10 -0
- package/esm/layouts/surface/Surface.sty.js.map +7 -0
- package/esm/layouts/surface/variables.sty.js +5 -0
- package/esm/layouts/surface/variables.sty.js.map +7 -0
- package/esm/layouts/types/layout.types.js +1 -0
- package/esm/layouts/types/layout.types.js.map +7 -0
- package/esm/typography/{BlockQuote → block-quote}/Blockquote.css +2 -2
- package/esm/typography/{BlockQuote → block-quote}/Blockquote.js.map +2 -2
- package/esm/typography/{BlockQuote → block-quote}/Blockquote.sty.js +1 -1
- package/esm/typography/{BlockQuote → block-quote}/Blockquote.sty.js.map +2 -2
- package/{typography/Code → esm/typography/code}/Code.css +1 -1
- package/esm/typography/{Code → code}/Code.js.map +2 -2
- package/esm/typography/{Code → code}/Code.sty.js +1 -1
- package/esm/typography/{Code → code}/Code.sty.js.map +2 -2
- package/esm/typography/{Emphasis → emphasis}/Emphasis.css +1 -1
- package/esm/typography/{Emphasis → emphasis}/Emphasis.js.map +2 -2
- package/esm/typography/{Emphasis → emphasis}/Emphasis.sty.js +1 -1
- package/esm/typography/{Emphasis → emphasis}/Emphasis.sty.js.map +2 -2
- package/{typography/ExternalLink → esm/typography/external-link}/ExternalLink.css +6 -6
- package/esm/typography/{ExternalLink → external-link}/ExternalLink.js.map +2 -2
- package/esm/typography/{ExternalLink → external-link}/ExternalLink.sty.js +1 -1
- package/esm/typography/{ExternalLink → external-link}/ExternalLink.sty.js.map +2 -2
- package/esm/typography/{Heading → heading}/Heading.css +7 -7
- package/esm/typography/heading/Heading.js.map +7 -0
- package/esm/typography/heading/Heading.sty.js +7 -0
- package/esm/typography/{Heading → heading}/Heading.sty.js.map +2 -2
- package/esm/typography/{Highlight → highlight}/Highlight.css +1 -1
- package/esm/typography/{Highlight → highlight}/Highlight.js.map +2 -2
- package/esm/typography/{Highlight → highlight}/Highlight.sty.js +1 -1
- package/esm/typography/{Highlight → highlight}/Highlight.sty.js.map +2 -2
- package/esm/typography/index.js +13 -13
- package/esm/typography/index.js.map +1 -1
- package/{typography/Link → esm/typography/link}/Link.css +4 -4
- package/esm/typography/{Link → link}/Link.js +1 -1
- package/esm/typography/link/Link.js.map +7 -0
- package/esm/typography/{Link → link}/Link.sty.js +1 -1
- package/esm/typography/{Link → link}/Link.sty.js.map +2 -2
- package/esm/typography/{List → list}/List.css +4 -4
- package/esm/typography/{List → list}/List.js +1 -1
- package/esm/typography/{List → list}/List.js.map +2 -2
- package/esm/typography/{List → list}/List.sty.js +2 -2
- package/esm/typography/{List → list}/List.sty.js.map +2 -2
- package/esm/typography/{Paragraph → paragraph}/Paragraph.css +3 -3
- package/esm/typography/{Paragraph → paragraph}/Paragraph.js.map +2 -2
- package/esm/typography/{Paragraph → paragraph}/Paragraph.sty.js +1 -1
- package/esm/typography/{Paragraph → paragraph}/Paragraph.sty.js.map +2 -2
- package/{typography/Strikethrough → esm/typography/strikethrough}/Strikethrough.css +1 -1
- package/esm/typography/strikethrough/Strikethrough.js.map +7 -0
- package/esm/typography/{Strikethrough → strikethrough}/Strikethrough.sty.js +1 -1
- package/esm/typography/{Strikethrough → strikethrough}/Strikethrough.sty.js.map +2 -2
- package/{typography/Strong → esm/typography/strong}/Strong.css +1 -1
- package/esm/typography/{Strong → strong}/Strong.js.map +2 -2
- package/esm/typography/{Strong → strong}/Strong.sty.js +1 -1
- package/esm/typography/{Strong → strong}/Strong.sty.js.map +2 -2
- package/{typography/Text → esm/typography/text}/Text.css +3 -3
- package/esm/typography/text/Text.js.map +7 -0
- package/esm/typography/{Text → text}/Text.sty.js +1 -1
- package/esm/typography/{Text → text}/Text.sty.js.map +2 -2
- package/{typography/TextEllipsis → esm/typography/text-ellipsis}/TextEllipsis.css +4 -4
- package/esm/typography/text-ellipsis/TextEllipsis.js.map +7 -0
- package/esm/typography/text-ellipsis/TextEllipsis.sty.js +7 -0
- package/esm/typography/{TextEllipsis → text-ellipsis}/TextEllipsis.sty.js.map +2 -2
- package/lang/en.json +6 -0
- package/lang/ja.json +24 -0
- package/lang/uncompiled/en.json +4 -0
- package/lang/uncompiled/ja.json +14 -1
- package/layouts/{Divider → divider}/Divider.css +5 -5
- package/layouts/{Divider → divider}/Divider.d.ts +1 -1
- package/layouts/{Divider → divider}/Divider.sty.js +1 -1
- package/layouts/helpers/spacingToCss.d.ts +6 -0
- package/layouts/helpers/spacingToCss.js +29 -0
- package/layouts/hooks/useBreakpoint.d.ts +27 -0
- package/layouts/hooks/useBreakpoint.js +62 -0
- package/layouts/hooks/useLayoutSizeProps.d.ts +6 -0
- package/layouts/hooks/useLayoutSizeProps.js +33 -0
- package/layouts/hooks/useLayoutStyles.d.ts +7 -0
- package/layouts/hooks/useLayoutStyles.js +123 -0
- package/layouts/hooks/useMarginProps.d.ts +7 -0
- package/layouts/hooks/useMarginProps.js +73 -0
- package/layouts/hooks/usePaddingProps.d.ts +7 -0
- package/layouts/hooks/usePaddingProps.js +77 -0
- package/layouts/index.d.ts +7 -2
- package/layouts/index.js +8 -2
- package/layouts/surface/Surface.css +95 -0
- package/layouts/surface/Surface.d.ts +46 -0
- package/layouts/surface/Surface.js +110 -0
- package/layouts/surface/Surface.sty.d.ts +43 -0
- package/layouts/surface/Surface.sty.js +28 -0
- package/layouts/surface/variables.sty.d.ts +1 -0
- package/layouts/surface/variables.sty.js +23 -0
- package/layouts/types/layout.types.d.ts +64 -0
- package/layouts/types/layout.types.js +15 -0
- package/package.json +11 -4
- package/typography/{BlockQuote → block-quote}/Blockquote.css +2 -2
- package/typography/{BlockQuote → block-quote}/Blockquote.d.ts +2 -2
- package/typography/{BlockQuote → block-quote}/Blockquote.sty.js +1 -1
- package/{esm/typography/Code → typography/code}/Code.css +1 -1
- package/typography/{Code → code}/Code.d.ts +2 -2
- package/typography/{Code → code}/Code.sty.js +1 -1
- package/typography/{Emphasis → emphasis}/Emphasis.css +1 -1
- package/typography/{Emphasis → emphasis}/Emphasis.d.ts +2 -2
- package/typography/{Emphasis → emphasis}/Emphasis.sty.js +1 -1
- package/{esm/typography/ExternalLink → typography/external-link}/ExternalLink.css +6 -6
- package/typography/{ExternalLink → external-link}/ExternalLink.d.ts +2 -2
- package/typography/{ExternalLink → external-link}/ExternalLink.sty.js +1 -1
- package/typography/{Heading → heading}/Heading.css +7 -7
- package/typography/{Heading → heading}/Heading.d.ts +4 -3
- package/typography/{Heading → heading}/Heading.sty.js +1 -1
- package/typography/{Highlight → highlight}/Highlight.css +1 -1
- package/typography/{Highlight → highlight}/Highlight.sty.js +1 -1
- package/typography/index.d.ts +26 -26
- package/typography/index.js +13 -13
- package/{esm/typography/Link → typography/link}/Link.css +4 -4
- package/typography/{Link → link}/Link.js +1 -1
- package/typography/{Link → link}/Link.sty.js +1 -1
- package/typography/{List → list}/List.css +4 -4
- package/typography/{List → list}/List.d.ts +2 -2
- package/typography/{List → list}/List.js +1 -1
- package/typography/{List → list}/List.sty.js +2 -2
- package/typography/{Paragraph → paragraph}/Paragraph.css +3 -3
- package/typography/{Paragraph → paragraph}/Paragraph.d.ts +2 -2
- package/typography/{Paragraph → paragraph}/Paragraph.sty.js +1 -1
- package/{esm/typography/Strikethrough → typography/strikethrough}/Strikethrough.css +1 -1
- package/typography/{Strikethrough → strikethrough}/Strikethrough.d.ts +3 -3
- package/typography/{Strikethrough → strikethrough}/Strikethrough.sty.js +1 -1
- package/{esm/typography/Strong → typography/strong}/Strong.css +1 -1
- package/typography/{Strong → strong}/Strong.d.ts +2 -2
- package/typography/{Strong → strong}/Strong.sty.js +1 -1
- package/{esm/typography/Text → typography/text}/Text.css +3 -3
- package/typography/{Text → text}/Text.d.ts +5 -3
- package/typography/{Text → text}/Text.sty.js +1 -1
- package/{esm/typography/TextEllipsis → typography/text-ellipsis}/TextEllipsis.css +4 -4
- package/typography/{TextEllipsis → text-ellipsis}/TextEllipsis.d.ts +4 -4
- package/typography/{TextEllipsis → text-ellipsis}/TextEllipsis.sty.js +1 -1
- package/esm/typography/Heading/Heading.js.map +0 -7
- package/esm/typography/Heading/Heading.sty.js +0 -7
- package/esm/typography/Link/Link.js.map +0 -7
- package/esm/typography/Strikethrough/Strikethrough.js.map +0 -7
- package/esm/typography/Text/Text.js.map +0 -7
- package/esm/typography/TextEllipsis/TextEllipsis.js.map +0 -7
- package/esm/typography/TextEllipsis/TextEllipsis.sty.js +0 -7
- package/esm/layouts/{Divider → divider}/Divider.js +0 -0
- package/esm/typography/{BlockQuote → block-quote}/Blockquote.js +0 -0
- package/esm/typography/{Code → code}/Code.js +0 -0
- package/esm/typography/{Emphasis → emphasis}/Emphasis.js +0 -0
- package/esm/typography/{ExternalLink → external-link}/ExternalLink.js +0 -0
- package/esm/typography/{Heading → heading}/Heading.js +0 -0
- package/esm/typography/{Highlight → highlight}/Highlight.js +0 -0
- package/esm/typography/{Paragraph → paragraph}/Paragraph.js +0 -0
- package/esm/typography/{Strikethrough → strikethrough}/Strikethrough.js +0 -0
- package/esm/typography/{Strong → strong}/Strong.js +0 -0
- package/esm/typography/{Text → text}/Text.js +0 -0
- package/esm/typography/{TextEllipsis → text-ellipsis}/TextEllipsis.js +0 -0
- package/layouts/{Divider → divider}/Divider.js +0 -0
- package/layouts/{Divider → divider}/Divider.sty.d.ts +0 -0
- package/typography/{BlockQuote → block-quote}/Blockquote.js +0 -0
- package/typography/{BlockQuote → block-quote}/Blockquote.sty.d.ts +0 -0
- package/typography/{Code → code}/Code.js +0 -0
- package/typography/{Code → code}/Code.sty.d.ts +0 -0
- package/typography/{Emphasis → emphasis}/Emphasis.js +0 -0
- package/typography/{Emphasis → emphasis}/Emphasis.sty.d.ts +0 -0
- package/typography/{ExternalLink → external-link}/ExternalLink.js +0 -0
- package/typography/{ExternalLink → external-link}/ExternalLink.sty.d.ts +0 -0
- package/typography/{Heading → heading}/Heading.js +0 -0
- package/typography/{Heading → heading}/Heading.sty.d.ts +0 -0
- package/typography/{Highlight → highlight}/Highlight.d.ts +1 -1
- package/typography/{Highlight → highlight}/Highlight.js +0 -0
- package/typography/{Highlight → highlight}/Highlight.sty.d.ts +0 -0
- package/typography/{Link → link}/Link.d.ts +1 -1
- /package/typography/{Link → link}/Link.sty.d.ts +0 -0
- /package/typography/{List → list}/List.sty.d.ts +0 -0
- /package/typography/{Paragraph → paragraph}/Paragraph.js +0 -0
- /package/typography/{Paragraph → paragraph}/Paragraph.sty.d.ts +0 -0
- /package/typography/{Strikethrough → strikethrough}/Strikethrough.js +0 -0
- /package/typography/{Strikethrough → strikethrough}/Strikethrough.sty.d.ts +0 -0
- /package/typography/{Strong → strong}/Strong.js +0 -0
- /package/typography/{Strong → strong}/Strong.sty.d.ts +0 -0
- /package/typography/{Text → text}/Text.js +0 -0
- /package/typography/{Text → text}/Text.sty.d.ts +0 -0
- /package/typography/{TextEllipsis → text-ellipsis}/TextEllipsis.js +0 -0
- /package/typography/{TextEllipsis → text-ellipsis}/TextEllipsis.sty.d.ts +0 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { useCallback, useMemo, useSyncExternalStore } from "react";
|
|
2
|
+
function useBreakpoint(queries, ssrInitialValue) {
|
|
3
|
+
const _ssrInitialValue = ssrInitialValue ?? (Array.isArray(queries) ? [] : false);
|
|
4
|
+
const mediaQueryLists = useMemo(() => {
|
|
5
|
+
const queryStrings = Array.isArray(queries) ? queries : [queries];
|
|
6
|
+
return queryStrings.map((q) => window.matchMedia(q));
|
|
7
|
+
}, [queries]);
|
|
8
|
+
const subscribe = useCallback(
|
|
9
|
+
(callback) => {
|
|
10
|
+
mediaQueryLists.forEach(
|
|
11
|
+
(mql) => mql.addEventListener("change", callback)
|
|
12
|
+
);
|
|
13
|
+
return () => {
|
|
14
|
+
mediaQueryLists.forEach(
|
|
15
|
+
(mql) => mql.removeEventListener("change", callback)
|
|
16
|
+
);
|
|
17
|
+
};
|
|
18
|
+
},
|
|
19
|
+
[mediaQueryLists]
|
|
20
|
+
);
|
|
21
|
+
const getSnapshot = () => {
|
|
22
|
+
return JSON.stringify(mediaQueryLists.map((q) => q.matches));
|
|
23
|
+
};
|
|
24
|
+
const getServerSnapshot = () => {
|
|
25
|
+
if (Array.isArray(_ssrInitialValue)) {
|
|
26
|
+
const adjustedValue = _ssrInitialValue.concat(Array(queries.length).fill(false)).slice(0, queries.length);
|
|
27
|
+
return JSON.stringify(adjustedValue);
|
|
28
|
+
}
|
|
29
|
+
return JSON.stringify([_ssrInitialValue]);
|
|
30
|
+
};
|
|
31
|
+
const queryValues = useSyncExternalStore(
|
|
32
|
+
subscribe,
|
|
33
|
+
getSnapshot,
|
|
34
|
+
getServerSnapshot
|
|
35
|
+
);
|
|
36
|
+
if (!Array.isArray(queries)) {
|
|
37
|
+
return JSON.parse(queryValues)[0];
|
|
38
|
+
}
|
|
39
|
+
return JSON.parse(queryValues);
|
|
40
|
+
}
|
|
41
|
+
export {
|
|
42
|
+
useBreakpoint
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=useBreakpoint.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/layouts/hooks/useBreakpoint.ts"],
|
|
4
|
+
"sourcesContent": ["// taken and adapted from https://github.com/jepser/use-match-media\n\nimport { useCallback, useMemo, useSyncExternalStore } from 'react';\n\n/**\n * `useBreakpoint` is a hook used to determine if the document matches the media\n * query string (or media query list). It will listen to the breakpoints specified\n * and will return a boolean value indicating if this media query is met or not.\n * @public\n */\nfunction useBreakpoint(\n /** Media Query you want to test, eg '(min-width: 800px)' */\n query: string,\n /** Default value (fallback value to support SSR)\n * @defaultValue false\n */\n ssrInitialValue?: boolean,\n): boolean;\n\n/**\n * `useBreakpoint` is a hook used to determine if the document matches the media\n * query string (or media query list). It will listen to the breakpoints specified\n * and will return a boolean value indicating if this media query is met or not.\n * @public\n */\nfunction useBreakpoint(\n /** Media Queries you want to test, eg '[(min-width: 400px), (min-width: 800px)]' */\n queries: string[],\n /** Default values (fallback values to support SSR)\n * @defaultValue []\n */\n ssrInitialValue?: boolean[],\n): boolean[];\n\n/** @public */\nfunction useBreakpoint(\n queries: string | string[],\n ssrInitialValue?: boolean | boolean[],\n): boolean | boolean[] {\n const _ssrInitialValue =\n ssrInitialValue ?? (Array.isArray(queries) ? [] : false);\n\n const mediaQueryLists = useMemo(() => {\n const queryStrings = Array.isArray(queries) ? queries : [queries];\n return queryStrings.map((q) => window.matchMedia(q));\n }, [queries]);\n\n const subscribe = useCallback(\n (callback: () => void) => {\n mediaQueryLists.forEach((mql) =>\n mql.addEventListener('change', callback),\n );\n return (): void => {\n mediaQueryLists.forEach((mql) =>\n mql.removeEventListener('change', callback),\n );\n };\n },\n [mediaQueryLists],\n );\n\n /**\n * Generates an immutable snapshot of the current media query matches.\n * This is necessary to ensure the snapshot remains consistent and does not change.\n * @see {@link https://react.dev/reference/react/useSyncExternalStore#im-getting-an-error-the-result-of-getsnapshot-should-be-cached}\n */\n const getSnapshot = () => {\n return JSON.stringify(mediaQueryLists.map((q) => q.matches));\n };\n\n const getServerSnapshot = () => {\n if (Array.isArray(_ssrInitialValue)) {\n // Ensure the array is filled with false values or sliced to match queries.length\n const adjustedValue = _ssrInitialValue\n .concat(Array(queries.length).fill(false))\n .slice(0, queries.length);\n return JSON.stringify(adjustedValue);\n }\n return JSON.stringify([_ssrInitialValue] || [false]);\n };\n\n const queryValues = useSyncExternalStore(\n subscribe,\n getSnapshot,\n getServerSnapshot,\n );\n\n if (!Array.isArray(queries)) {\n return JSON.parse(queryValues)[0];\n }\n return JSON.parse(queryValues);\n}\n\nexport { useBreakpoint };\n"],
|
|
5
|
+
"mappings": "AAEA,SAAS,aAAa,SAAS,4BAA4B;AAiC3D,SAAS,cACP,SACA,iBACqB;AACrB,QAAM,mBACJ,oBAAoB,MAAM,QAAQ,OAAO,IAAI,CAAC,IAAI;AAEpD,QAAM,kBAAkB,QAAQ,MAAM;AACpC,UAAM,eAAe,MAAM,QAAQ,OAAO,IAAI,UAAU,CAAC,OAAO;AAChE,WAAO,aAAa,IAAI,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC;AAAA,EACrD,GAAG,CAAC,OAAO,CAAC;AAEZ,QAAM,YAAY;AAAA,IAChB,CAAC,aAAyB;AACxB,sBAAgB;AAAA,QAAQ,CAAC,QACvB,IAAI,iBAAiB,UAAU,QAAQ;AAAA,MACzC;AACA,aAAO,MAAY;AACjB,wBAAgB;AAAA,UAAQ,CAAC,QACvB,IAAI,oBAAoB,UAAU,QAAQ;AAAA,QAC5C;AAAA,MACF;AAAA,IACF;AAAA,IACA,CAAC,eAAe;AAAA,EAClB;AAOA,QAAM,cAAc,MAAM;AACxB,WAAO,KAAK,UAAU,gBAAgB,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC;AAAA,EAC7D;AAEA,QAAM,oBAAoB,MAAM;AAC9B,QAAI,MAAM,QAAQ,gBAAgB,GAAG;AAEnC,YAAM,gBAAgB,iBACnB,OAAO,MAAM,QAAQ,MAAM,EAAE,KAAK,KAAK,CAAC,EACxC,MAAM,GAAG,QAAQ,MAAM;AAC1B,aAAO,KAAK,UAAU,aAAa;AAAA,IACrC;AACA,WAAO,KAAK,UAAU,CAAC,gBAAgB,CAAY;AAAA,EACrD;AAEA,QAAM,cAAc;AAAA,IAClB;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,MAAI,CAAC,MAAM,QAAQ,OAAO,GAAG;AAC3B,WAAO,KAAK,MAAM,WAAW,EAAE,CAAC;AAAA,EAClC;AACA,SAAO,KAAK,MAAM,WAAW;AAC/B;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const useLayoutSizeProps = (props) => {
|
|
2
|
+
const { width, minWidth, maxWidth, height, minHeight, maxHeight } = props;
|
|
3
|
+
return {
|
|
4
|
+
width,
|
|
5
|
+
minWidth,
|
|
6
|
+
maxWidth,
|
|
7
|
+
height,
|
|
8
|
+
minHeight,
|
|
9
|
+
maxHeight
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export {
|
|
13
|
+
useLayoutSizeProps
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=useLayoutSizeProps.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/layouts/hooks/useLayoutSizeProps.ts"],
|
|
4
|
+
"sourcesContent": ["import type { LayoutSizeProps, LayoutSizeCSS } from '../types/layout.types.js';\n\n/**\n * Returns the layout size properties.\n * @internal\n */\nexport const useLayoutSizeProps = (props: LayoutSizeProps): LayoutSizeCSS => {\n const { width, minWidth, maxWidth, height, minHeight, maxHeight } = props;\n\n return {\n width,\n minWidth,\n maxWidth,\n height,\n minHeight,\n maxHeight,\n };\n};\n"],
|
|
5
|
+
"mappings": "AAMO,MAAM,qBAAqB,CAAC,UAA0C;AAC3E,QAAM,EAAE,OAAO,UAAU,UAAU,QAAQ,WAAW,UAAU,IAAI;AAEpE,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { useLayoutSizeProps } from "./useLayoutSizeProps.js";
|
|
2
|
+
import { useMarginProps } from "./useMarginProps.js";
|
|
3
|
+
import { usePaddingProps } from "./usePaddingProps.js";
|
|
4
|
+
function useLayoutStyles(props, defaultStyles) {
|
|
5
|
+
const {
|
|
6
|
+
/** Padding props */
|
|
7
|
+
padding,
|
|
8
|
+
p,
|
|
9
|
+
paddingX,
|
|
10
|
+
px,
|
|
11
|
+
paddingY,
|
|
12
|
+
py,
|
|
13
|
+
paddingTop,
|
|
14
|
+
pt,
|
|
15
|
+
paddingRight,
|
|
16
|
+
pr,
|
|
17
|
+
paddingBottom,
|
|
18
|
+
pb,
|
|
19
|
+
paddingLeft,
|
|
20
|
+
pl,
|
|
21
|
+
/** Margin props */
|
|
22
|
+
margin,
|
|
23
|
+
m,
|
|
24
|
+
marginX,
|
|
25
|
+
mx,
|
|
26
|
+
marginY,
|
|
27
|
+
my,
|
|
28
|
+
marginTop,
|
|
29
|
+
mt,
|
|
30
|
+
marginRight,
|
|
31
|
+
mr,
|
|
32
|
+
marginBottom,
|
|
33
|
+
mb,
|
|
34
|
+
marginLeft,
|
|
35
|
+
ml,
|
|
36
|
+
/** Layout props */
|
|
37
|
+
width,
|
|
38
|
+
minWidth,
|
|
39
|
+
maxWidth,
|
|
40
|
+
height,
|
|
41
|
+
minHeight,
|
|
42
|
+
maxHeight,
|
|
43
|
+
/** filtered remaining props for passing back to component */
|
|
44
|
+
...remainingProps
|
|
45
|
+
} = props;
|
|
46
|
+
const paddingProps = {
|
|
47
|
+
padding,
|
|
48
|
+
p,
|
|
49
|
+
paddingX,
|
|
50
|
+
px,
|
|
51
|
+
paddingY,
|
|
52
|
+
py,
|
|
53
|
+
paddingTop,
|
|
54
|
+
pt,
|
|
55
|
+
paddingRight,
|
|
56
|
+
pr,
|
|
57
|
+
paddingBottom,
|
|
58
|
+
pb,
|
|
59
|
+
paddingLeft,
|
|
60
|
+
pl
|
|
61
|
+
};
|
|
62
|
+
const marginProps = {
|
|
63
|
+
margin,
|
|
64
|
+
m,
|
|
65
|
+
marginX,
|
|
66
|
+
mx,
|
|
67
|
+
marginY,
|
|
68
|
+
my,
|
|
69
|
+
marginTop,
|
|
70
|
+
mt,
|
|
71
|
+
marginRight,
|
|
72
|
+
mr,
|
|
73
|
+
marginBottom,
|
|
74
|
+
mb,
|
|
75
|
+
marginLeft,
|
|
76
|
+
ml
|
|
77
|
+
};
|
|
78
|
+
const layoutProps = {
|
|
79
|
+
width,
|
|
80
|
+
minWidth,
|
|
81
|
+
maxWidth,
|
|
82
|
+
height,
|
|
83
|
+
minHeight,
|
|
84
|
+
maxHeight
|
|
85
|
+
};
|
|
86
|
+
const paddingStyles = usePaddingProps(
|
|
87
|
+
paddingProps,
|
|
88
|
+
defaultStyles.paddingDefaults
|
|
89
|
+
);
|
|
90
|
+
const marginStyles = useMarginProps(
|
|
91
|
+
marginProps,
|
|
92
|
+
defaultStyles.marginDefaults
|
|
93
|
+
);
|
|
94
|
+
const layoutSizeStyles = useLayoutSizeProps(layoutProps);
|
|
95
|
+
return {
|
|
96
|
+
paddingStyles,
|
|
97
|
+
marginStyles,
|
|
98
|
+
layoutSizeStyles,
|
|
99
|
+
remainingProps
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
export {
|
|
103
|
+
useLayoutStyles
|
|
104
|
+
};
|
|
105
|
+
//# sourceMappingURL=useLayoutStyles.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/layouts/hooks/useLayoutStyles.tsx"],
|
|
4
|
+
"sourcesContent": ["import { useLayoutSizeProps } from './useLayoutSizeProps.js';\nimport { useMarginProps } from './useMarginProps.js';\nimport { usePaddingProps } from './usePaddingProps.js';\nimport { SpacingProps } from '../../styles/getSpacingSprinkles.js';\nimport type { SurfaceProps } from '../surface/Surface.js';\nimport type {\n LayoutStyles,\n LayoutSizeProps,\n DefaultStyles,\n} from '../types/layout.types.js';\n\n/**\n * Generates layout styles including padding, margin, and size properties.\n * @internal\n */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nexport function useLayoutStyles(\n props: SurfaceProps<any>,\n defaultStyles: DefaultStyles,\n): LayoutStyles {\n const {\n /** Padding props */\n padding,\n p,\n paddingX,\n px,\n paddingY,\n py,\n paddingTop,\n pt,\n paddingRight,\n pr,\n paddingBottom,\n pb,\n paddingLeft,\n pl,\n\n /** Margin props */\n margin,\n m,\n marginX,\n mx,\n marginY,\n my,\n marginTop,\n mt,\n marginRight,\n mr,\n marginBottom,\n mb,\n marginLeft,\n ml,\n\n /** Layout props */\n width,\n minWidth,\n maxWidth,\n height,\n minHeight,\n maxHeight,\n\n /** filtered remaining props for passing back to component */\n ...remainingProps\n } = props;\n\n const paddingProps: Pick<\n SpacingProps,\n | 'padding'\n | 'p'\n | 'paddingX'\n | 'px'\n | 'paddingY'\n | 'py'\n | 'paddingTop'\n | 'pt'\n | 'paddingRight'\n | 'pr'\n | 'paddingBottom'\n | 'pb'\n | 'paddingLeft'\n | 'pl'\n > = {\n padding,\n p,\n paddingX,\n px,\n paddingY,\n py,\n paddingTop,\n pt,\n paddingRight,\n pr,\n paddingBottom,\n pb,\n paddingLeft,\n pl,\n };\n\n const marginProps: Pick<\n SpacingProps,\n | 'margin'\n | 'm'\n | 'marginX'\n | 'mx'\n | 'marginY'\n | 'my'\n | 'marginTop'\n | 'mt'\n | 'marginRight'\n | 'mr'\n | 'marginBottom'\n | 'mb'\n | 'marginLeft'\n | 'ml'\n > = {\n margin,\n m,\n marginX,\n mx,\n marginY,\n my,\n marginTop,\n mt,\n marginRight,\n mr,\n marginBottom,\n mb,\n marginLeft,\n ml,\n };\n\n const layoutProps: LayoutSizeProps = {\n width,\n minWidth,\n maxWidth,\n height,\n minHeight,\n maxHeight,\n };\n\n const paddingStyles = usePaddingProps(\n paddingProps,\n defaultStyles.paddingDefaults,\n );\n const marginStyles = useMarginProps(\n marginProps,\n defaultStyles.marginDefaults,\n );\n const layoutSizeStyles = useLayoutSizeProps(layoutProps);\n\n return {\n paddingStyles,\n marginStyles,\n layoutSizeStyles,\n remainingProps,\n };\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,0BAA0B;AACnC,SAAS,sBAAsB;AAC/B,SAAS,uBAAuB;AAczB,SAAS,gBACd,OACA,eACc;AACd,QAAM;AAAA;AAAA,IAEJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAAA,IAGA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAAA,IAGA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAAA,IAGA,GAAG;AAAA,EACL,IAAI;AAEJ,QAAM,eAgBF;AAAA,IACF;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,QAAM,cAgBF;AAAA,IACF;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,QAAM,cAA+B;AAAA,IACnC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,QAAM,gBAAgB;AAAA,IACpB;AAAA,IACA,cAAc;AAAA,EAChB;AACA,QAAM,eAAe;AAAA,IACnB;AAAA,IACA,cAAc;AAAA,EAChB;AACA,QAAM,mBAAmB,mBAAmB,WAAW;AAEvD,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { merge } from "lodash-es";
|
|
2
|
+
import { spacingToCss } from "../helpers/spacingToCss.js";
|
|
3
|
+
const defaultMargin = {
|
|
4
|
+
margin: 0,
|
|
5
|
+
marginTop: 0,
|
|
6
|
+
marginRight: 0,
|
|
7
|
+
marginBottom: 0,
|
|
8
|
+
marginLeft: 0
|
|
9
|
+
};
|
|
10
|
+
const useMarginProps = (props, defaultMarginProps = defaultMargin) => {
|
|
11
|
+
const {
|
|
12
|
+
margin,
|
|
13
|
+
m,
|
|
14
|
+
marginX,
|
|
15
|
+
mx,
|
|
16
|
+
marginY,
|
|
17
|
+
my,
|
|
18
|
+
marginTop,
|
|
19
|
+
mt,
|
|
20
|
+
marginRight,
|
|
21
|
+
mr,
|
|
22
|
+
marginBottom,
|
|
23
|
+
mb,
|
|
24
|
+
marginLeft,
|
|
25
|
+
ml
|
|
26
|
+
} = props;
|
|
27
|
+
const convertedDefaultMarginProps = {
|
|
28
|
+
marginTop: spacingToCss(
|
|
29
|
+
defaultMarginProps.marginTop ?? defaultMarginProps.margin
|
|
30
|
+
),
|
|
31
|
+
marginLeft: spacingToCss(
|
|
32
|
+
defaultMarginProps.marginLeft ?? defaultMarginProps.margin
|
|
33
|
+
),
|
|
34
|
+
marginBottom: spacingToCss(
|
|
35
|
+
defaultMarginProps.marginBottom ?? defaultMarginProps.margin
|
|
36
|
+
),
|
|
37
|
+
marginRight: spacingToCss(
|
|
38
|
+
defaultMarginProps.marginRight ?? defaultMarginProps.margin
|
|
39
|
+
)
|
|
40
|
+
};
|
|
41
|
+
return merge({}, convertedDefaultMarginProps, {
|
|
42
|
+
marginTop: spacingToCss(mt ?? marginTop ?? my ?? marginY ?? m ?? margin),
|
|
43
|
+
marginRight: spacingToCss(
|
|
44
|
+
mr ?? marginRight ?? mx ?? marginX ?? m ?? margin
|
|
45
|
+
),
|
|
46
|
+
marginBottom: spacingToCss(
|
|
47
|
+
mb ?? marginBottom ?? my ?? marginY ?? m ?? margin
|
|
48
|
+
),
|
|
49
|
+
marginLeft: spacingToCss(ml ?? marginLeft ?? mx ?? marginX ?? m ?? margin)
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
export {
|
|
53
|
+
useMarginProps
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=useMarginProps.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/layouts/hooks/useMarginProps.ts"],
|
|
4
|
+
"sourcesContent": ["import { merge } from 'lodash-es';\n\nimport { SpacingProps } from '../../styles/getSpacingSprinkles.js';\nimport { spacingToCss } from '../helpers/spacingToCss.js';\nimport type { MarginCSS, DefaultMargin } from '../types/layout.types.js';\n\nconst defaultMargin: DefaultMargin = {\n margin: 0,\n marginTop: 0,\n marginRight: 0,\n marginBottom: 0,\n marginLeft: 0,\n};\n\n/**\n * Generates CSS margin properties based on the provided margin props and default margin values.\n * @internal\n */\nexport const useMarginProps = (\n props: SpacingProps,\n defaultMarginProps: DefaultMargin = defaultMargin,\n): MarginCSS => {\n const {\n margin,\n m,\n marginX,\n mx,\n marginY,\n my,\n marginTop,\n mt,\n marginRight,\n mr,\n marginBottom,\n mb,\n marginLeft,\n ml,\n } = props;\n\n const convertedDefaultMarginProps = {\n marginTop: spacingToCss(\n defaultMarginProps.marginTop ?? defaultMarginProps.margin,\n ),\n marginLeft: spacingToCss(\n defaultMarginProps.marginLeft ?? defaultMarginProps.margin,\n ),\n marginBottom: spacingToCss(\n defaultMarginProps.marginBottom ?? defaultMarginProps.margin,\n ),\n marginRight: spacingToCss(\n defaultMarginProps.marginRight ?? defaultMarginProps.margin,\n ),\n };\n\n return merge({}, convertedDefaultMarginProps, {\n marginTop: spacingToCss(mt ?? marginTop ?? my ?? marginY ?? m ?? margin),\n marginRight: spacingToCss(\n mr ?? marginRight ?? mx ?? marginX ?? m ?? margin,\n ),\n marginBottom: spacingToCss(\n mb ?? marginBottom ?? my ?? marginY ?? m ?? margin,\n ),\n marginLeft: spacingToCss(ml ?? marginLeft ?? mx ?? marginX ?? m ?? margin),\n });\n};\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,aAAa;AAGtB,SAAS,oBAAoB;AAG7B,MAAM,gBAA+B;AAAA,EACnC,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,aAAa;AAAA,EACb,cAAc;AAAA,EACd,YAAY;AACd;AAMO,MAAM,iBAAiB,CAC5B,OACA,qBAAoC,kBACtB;AACd,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AAEJ,QAAM,8BAA8B;AAAA,IAClC,WAAW;AAAA,MACT,mBAAmB,aAAa,mBAAmB;AAAA,IACrD;AAAA,IACA,YAAY;AAAA,MACV,mBAAmB,cAAc,mBAAmB;AAAA,IACtD;AAAA,IACA,cAAc;AAAA,MACZ,mBAAmB,gBAAgB,mBAAmB;AAAA,IACxD;AAAA,IACA,aAAa;AAAA,MACX,mBAAmB,eAAe,mBAAmB;AAAA,IACvD;AAAA,EACF;AAEA,SAAO,MAAM,CAAC,GAAG,6BAA6B;AAAA,IAC5C,WAAW,aAAa,MAAM,aAAa,MAAM,WAAW,KAAK,MAAM;AAAA,IACvE,aAAa;AAAA,MACX,MAAM,eAAe,MAAM,WAAW,KAAK;AAAA,IAC7C;AAAA,IACA,cAAc;AAAA,MACZ,MAAM,gBAAgB,MAAM,WAAW,KAAK;AAAA,IAC9C;AAAA,IACA,YAAY,aAAa,MAAM,cAAc,MAAM,WAAW,KAAK,MAAM;AAAA,EAC3E,CAAC;AACH;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { merge } from "lodash-es";
|
|
2
|
+
import { spacingToCss } from "../helpers/spacingToCss.js";
|
|
3
|
+
const defaultPadding = {
|
|
4
|
+
padding: 0,
|
|
5
|
+
paddingTop: 0,
|
|
6
|
+
paddingRight: 0,
|
|
7
|
+
paddingBottom: 0,
|
|
8
|
+
paddingLeft: 0
|
|
9
|
+
};
|
|
10
|
+
const usePaddingProps = (props, defaultPaddingProps = defaultPadding) => {
|
|
11
|
+
const {
|
|
12
|
+
padding,
|
|
13
|
+
p,
|
|
14
|
+
paddingX,
|
|
15
|
+
px,
|
|
16
|
+
paddingY,
|
|
17
|
+
py,
|
|
18
|
+
paddingTop,
|
|
19
|
+
pt,
|
|
20
|
+
paddingRight,
|
|
21
|
+
pr,
|
|
22
|
+
paddingBottom,
|
|
23
|
+
pb,
|
|
24
|
+
paddingLeft,
|
|
25
|
+
pl
|
|
26
|
+
} = props;
|
|
27
|
+
const convertedDefaultPaddingProps = {
|
|
28
|
+
paddingTop: spacingToCss(
|
|
29
|
+
defaultPaddingProps.paddingTop ?? defaultPaddingProps.padding
|
|
30
|
+
),
|
|
31
|
+
paddingLeft: spacingToCss(
|
|
32
|
+
defaultPaddingProps.paddingLeft ?? defaultPaddingProps.padding
|
|
33
|
+
),
|
|
34
|
+
paddingBottom: spacingToCss(
|
|
35
|
+
defaultPaddingProps.paddingBottom ?? defaultPaddingProps.padding
|
|
36
|
+
),
|
|
37
|
+
paddingRight: spacingToCss(
|
|
38
|
+
defaultPaddingProps.paddingRight ?? defaultPaddingProps.padding
|
|
39
|
+
)
|
|
40
|
+
};
|
|
41
|
+
return merge({}, convertedDefaultPaddingProps, {
|
|
42
|
+
paddingTop: spacingToCss(
|
|
43
|
+
pt ?? paddingTop ?? py ?? paddingY ?? p ?? padding
|
|
44
|
+
),
|
|
45
|
+
paddingRight: spacingToCss(
|
|
46
|
+
pr ?? paddingRight ?? px ?? paddingX ?? p ?? padding
|
|
47
|
+
),
|
|
48
|
+
paddingBottom: spacingToCss(
|
|
49
|
+
pb ?? paddingBottom ?? py ?? paddingY ?? p ?? padding
|
|
50
|
+
),
|
|
51
|
+
paddingLeft: spacingToCss(
|
|
52
|
+
pl ?? paddingLeft ?? px ?? paddingX ?? p ?? padding
|
|
53
|
+
)
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
export {
|
|
57
|
+
usePaddingProps
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=usePaddingProps.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/layouts/hooks/usePaddingProps.ts"],
|
|
4
|
+
"sourcesContent": ["import { merge } from 'lodash-es';\n\nimport { SpacingProps } from '../../styles/getSpacingSprinkles.js';\nimport { spacingToCss } from '../helpers/spacingToCss.js';\nimport type { PaddingCSS, DefaultPadding } from '../types/layout.types.js';\n\nconst defaultPadding: DefaultPadding = {\n padding: 0,\n paddingTop: 0,\n paddingRight: 0,\n paddingBottom: 0,\n paddingLeft: 0,\n};\n\n/**\n * Generates CSS padding properties based on the provided padding props and default padding values.\n * @internal\n */\nexport const usePaddingProps = (\n props: SpacingProps,\n defaultPaddingProps: DefaultPadding = defaultPadding,\n): PaddingCSS => {\n const {\n padding,\n p,\n paddingX,\n px,\n paddingY,\n py,\n paddingTop,\n pt,\n paddingRight,\n pr,\n paddingBottom,\n pb,\n paddingLeft,\n pl,\n } = props;\n\n const convertedDefaultPaddingProps = {\n paddingTop: spacingToCss(\n defaultPaddingProps.paddingTop ?? defaultPaddingProps.padding,\n ),\n paddingLeft: spacingToCss(\n defaultPaddingProps.paddingLeft ?? defaultPaddingProps.padding,\n ),\n paddingBottom: spacingToCss(\n defaultPaddingProps.paddingBottom ?? defaultPaddingProps.padding,\n ),\n paddingRight: spacingToCss(\n defaultPaddingProps.paddingRight ?? defaultPaddingProps.padding,\n ),\n };\n\n return merge({}, convertedDefaultPaddingProps, {\n paddingTop: spacingToCss(\n pt ?? paddingTop ?? py ?? paddingY ?? p ?? padding,\n ),\n paddingRight: spacingToCss(\n pr ?? paddingRight ?? px ?? paddingX ?? p ?? padding,\n ),\n paddingBottom: spacingToCss(\n pb ?? paddingBottom ?? py ?? paddingY ?? p ?? padding,\n ),\n paddingLeft: spacingToCss(\n pl ?? paddingLeft ?? px ?? paddingX ?? p ?? padding,\n ),\n });\n};\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,aAAa;AAGtB,SAAS,oBAAoB;AAG7B,MAAM,iBAAiC;AAAA,EACrC,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,eAAe;AAAA,EACf,aAAa;AACf;AAMO,MAAM,kBAAkB,CAC7B,OACA,sBAAsC,mBACvB;AACf,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AAEJ,QAAM,+BAA+B;AAAA,IACnC,YAAY;AAAA,MACV,oBAAoB,cAAc,oBAAoB;AAAA,IACxD;AAAA,IACA,aAAa;AAAA,MACX,oBAAoB,eAAe,oBAAoB;AAAA,IACzD;AAAA,IACA,eAAe;AAAA,MACb,oBAAoB,iBAAiB,oBAAoB;AAAA,IAC3D;AAAA,IACA,cAAc;AAAA,MACZ,oBAAoB,gBAAgB,oBAAoB;AAAA,IAC1D;AAAA,EACF;AAEA,SAAO,MAAM,CAAC,GAAG,8BAA8B;AAAA,IAC7C,YAAY;AAAA,MACV,MAAM,cAAc,MAAM,YAAY,KAAK;AAAA,IAC7C;AAAA,IACA,cAAc;AAAA,MACZ,MAAM,gBAAgB,MAAM,YAAY,KAAK;AAAA,IAC/C;AAAA,IACA,eAAe;AAAA,MACb,MAAM,iBAAiB,MAAM,YAAY,KAAK;AAAA,IAChD;AAAA,IACA,aAAa;AAAA,MACX,MAAM,eAAe,MAAM,YAAY,KAAK;AAAA,IAC9C;AAAA,EACF,CAAC;AACH;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/esm/layouts/index.js
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import { Flex } from "./flex/Flex.js";
|
|
2
2
|
import { Grid } from "./grid/Grid.js";
|
|
3
|
-
import { Divider } from "./
|
|
3
|
+
import { Divider } from "./divider/Divider.js";
|
|
4
4
|
import { Container } from "./container/Container.js";
|
|
5
|
+
import { Surface } from "./surface/Surface.js";
|
|
6
|
+
import { surfaceBorderRadius } from "./surface/variables.sty.js";
|
|
7
|
+
import { useBreakpoint } from "./hooks/useBreakpoint.js";
|
|
5
8
|
export {
|
|
6
9
|
Container,
|
|
7
10
|
Divider,
|
|
8
11
|
Flex,
|
|
9
|
-
Grid
|
|
12
|
+
Grid,
|
|
13
|
+
Surface,
|
|
14
|
+
surfaceBorderRadius as _surfaceBorderRadius,
|
|
15
|
+
useBreakpoint
|
|
10
16
|
};
|
|
11
17
|
//# sourceMappingURL=index.js.map
|
package/esm/layouts/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/layouts/index.ts"],
|
|
4
|
-
"sourcesContent": ["export { Flex, type FlexOwnProps, type FlexProps } from './flex/Flex.js';\nexport { Grid, type GridOwnProps, type GridProps } from './grid/Grid.js';\nexport { Divider } from './
|
|
5
|
-
"mappings": "AAAA,SAAS,YAA+C;AACxD,SAAS,YAA+C;AACxD,SAAS,eAAe;AAExB,SAAS,iBAAiB;",
|
|
4
|
+
"sourcesContent": ["export { Flex, type FlexOwnProps, type FlexProps } from './flex/Flex.js';\nexport { Grid, type GridOwnProps, type GridProps } from './grid/Grid.js';\nexport { Divider } from './divider/Divider.js';\nexport type { DividerProps } from './divider/Divider.js';\nexport { Container } from './container/Container.js';\nexport type {\n ContainerOwnProps,\n ContainerProps,\n} from './container/Container.js';\nexport type { LayoutSizeCSS } from './types/layout.types.js';\nexport { Surface } from './surface/Surface.js';\nexport type { SurfaceOwnProps, SurfaceProps } from './surface/Surface.js';\nexport { surfaceBorderRadius as _surfaceBorderRadius } from './surface/variables.sty.js';\nexport { useBreakpoint } from './hooks/useBreakpoint.js';\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,YAA+C;AACxD,SAAS,YAA+C;AACxD,SAAS,eAAe;AAExB,SAAS,iBAAiB;AAM1B,SAAS,eAAe;AAExB,SAAgC,2BAA4B;AAC5D,SAAS,qBAAqB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
.Surface_surfaceCSS__1qto6jt6 {
|
|
2
|
+
--surfaceBorderRadius__1igzksy0: var(--dt-borders-radius-surface-default, 16px);
|
|
3
|
+
color: var(--dt-colors-text-neutral-default, #2b2a58);
|
|
4
|
+
text-align: left;
|
|
5
|
+
border: none;
|
|
6
|
+
outline: none;
|
|
7
|
+
position: relative;
|
|
8
|
+
background-color: var(--dt-colors-background-surface-default, #fcfcfd);
|
|
9
|
+
border-radius: var(--surfaceBorderRadius__1igzksy0);
|
|
10
|
+
}
|
|
11
|
+
.Surface_surfaceCSS__1qto6jt6::before, .Surface_surfaceCSS__1qto6jt6::after {
|
|
12
|
+
content: "";
|
|
13
|
+
width: 100%;
|
|
14
|
+
height: 100%;
|
|
15
|
+
position: absolute;
|
|
16
|
+
left: 0;
|
|
17
|
+
top: 0;
|
|
18
|
+
border-radius: var(--surfaceBorderRadius__1igzksy0);
|
|
19
|
+
pointer-events: none;
|
|
20
|
+
}
|
|
21
|
+
.Surface_surfaceCSS__1qto6jt6::after {
|
|
22
|
+
box-shadow: 0px 0px 0px 1px var(--dt-colors-background-base-default, #f3f3f7);
|
|
23
|
+
outline-offset: 1px;
|
|
24
|
+
outline: 2px solid var(--vars_borderColor__17bwkb02);
|
|
25
|
+
opacity: var(--selectionOpacity__1qto6jt4);
|
|
26
|
+
transition: var(--selectionTransition__1qto6jt5);
|
|
27
|
+
}
|
|
28
|
+
.Surface_surfaceCSS_selected_true__1qto6jt7 {
|
|
29
|
+
--selectionOpacity__1qto6jt4: 1;
|
|
30
|
+
--selectionTransition__1qto6jt5: var(--dt-animations-fade-in-easing, cubic-bezier(0.5, 0, 1, 1)) var(--dt-animations-fade-in-duration-fast, 150ms);
|
|
31
|
+
}
|
|
32
|
+
.Surface_surfaceCSS_selected_false__1qto6jt8 {
|
|
33
|
+
--selectionOpacity__1qto6jt4: 0;
|
|
34
|
+
--selectionTransition__1qto6jt5: var(--dt-animations-fade-out-easing, cubic-bezier(0, 0, 0.2, 1)) var(--dt-animations-fade-out-duration-fast, 150ms);
|
|
35
|
+
}
|
|
36
|
+
.Surface_pseudoElementCSS__1qto6jt9 {
|
|
37
|
+
--dragOpacity__1qto6jt1: 0;
|
|
38
|
+
--dragCursor__1qto6jt2: pointer;
|
|
39
|
+
--hoverElevation__1qto6jt3: var(--dt-box-shadows-surface-flat-hover, 0px 0px 0px 1px #2d2e4e08, 0px 1px 2px #2d2e4e0d, 0px 4px 8px -2px #2d2e4e12);
|
|
40
|
+
width: 100%;
|
|
41
|
+
height: 100%;
|
|
42
|
+
position: absolute;
|
|
43
|
+
left: 0;
|
|
44
|
+
top: 0;
|
|
45
|
+
border-radius: var(--surfaceBorderRadius__1igzksy0);
|
|
46
|
+
pointer-events: none;
|
|
47
|
+
}
|
|
48
|
+
.Surface_pseudoElementCSS__1qto6jt9::after,.Surface_pseudoElementCSS__1qto6jt9::before {
|
|
49
|
+
content: "";
|
|
50
|
+
width: 100%;
|
|
51
|
+
height: 100%;
|
|
52
|
+
position: absolute;
|
|
53
|
+
left: 0;
|
|
54
|
+
top: 0;
|
|
55
|
+
border-radius: var(--surfaceBorderRadius__1igzksy0);
|
|
56
|
+
pointer-events: none;
|
|
57
|
+
transition: var(--dt-animations-fade-in-easing, cubic-bezier(0.5, 0, 1, 1)) var(--dt-animations-fade-in-duration-fast, 150ms);
|
|
58
|
+
}
|
|
59
|
+
.Surface_pseudoElementCSS__1qto6jt9::after {
|
|
60
|
+
box-shadow: var(--dragElevation__1qto6jt0);
|
|
61
|
+
opacity: var(--dragOpacity__1qto6jt1);
|
|
62
|
+
}
|
|
63
|
+
.Surface_pseudoElementCSS__1qto6jt9::before {
|
|
64
|
+
box-shadow: var(--hoverElevation__1qto6jt3);
|
|
65
|
+
opacity: 0;
|
|
66
|
+
}
|
|
67
|
+
.Surface_pseudoElementCSS_elevation_flat__1qto6jta {
|
|
68
|
+
--dragElevation__1qto6jt0: var(--dt-box-shadows-surface-flat-drag, 0px 0px 0px 1px #2d2e4e08, 0px 1px 2px #2d2e4e0d, 0px 7px 17px -2px #2d2e4e52);
|
|
69
|
+
--hoverElevation__1qto6jt3: var(--dt-box-shadows-surface-flat-hover, 0px 0px 0px 1px #2d2e4e08, 0px 1px 2px #2d2e4e0d, 0px 4px 8px -2px #2d2e4e12);
|
|
70
|
+
box-shadow: var(--dt-box-shadows-surface-flat-rest, none);
|
|
71
|
+
}
|
|
72
|
+
.Surface_pseudoElementCSS_elevation_raised__1qto6jtb {
|
|
73
|
+
--dragElevation__1qto6jt0: var(--dt-box-shadows-surface-raised-drag, 0px 0px 0px 1px #2d2e4e08, 0px 1px 2px #2d2e4e0d, 0px 7px 17px -2px #2d2e4e52);
|
|
74
|
+
--hoverElevation__1qto6jt3: var(--dt-box-shadows-surface-raised-hover, 0px 0px 0px 1px #2d2e4e08, 0px 1px 2px #2d2e4e0d, 0px 5px 11px -2px #2d2e4e29);
|
|
75
|
+
box-shadow: var(--dt-box-shadows-surface-raised-rest, 0px 0px 0px 1px #2d2e4e08, 0px 1px 2px #2d2e4e0d, 0px 4px 8px -2px #2d2e4e12);
|
|
76
|
+
}
|
|
77
|
+
.Surface_pseudoElementCSS_elevation_floating__1qto6jtc {
|
|
78
|
+
--dragElevation__1qto6jt0: var(--dt-box-shadows-surface-floating-drag, 0px 0px 0px 1px #2d2e4e08, 0px 1px 2px #2d2e4e0d, 0px 7px 17px -2px #2d2e4e52);
|
|
79
|
+
--hoverElevation__1qto6jt3: var(--dt-box-shadows-surface-floating-hover, 0px 0px 0px 1px #2d2e4e08, 0px 1px 2px #2d2e4e0d, 0px 6px 14px -2px #2d2e4e3d);
|
|
80
|
+
box-shadow: var(--dt-box-shadows-surface-floating-rest, 0px 0px 0px 1px #2d2e4e08, 0px 1px 2px #2d2e4e0d, 0px 5px 11px -2px #2d2e4e29);
|
|
81
|
+
}
|
|
82
|
+
.Surface_pseudoElementCSS_dragged_true__1qto6jtd {
|
|
83
|
+
--dragOpacity__1qto6jt1: 1;
|
|
84
|
+
--dragCursor__1qto6jt2: grab;
|
|
85
|
+
}
|
|
86
|
+
button.strato-surface:not(:disabled), a.strato-surface:not(:disabled) {
|
|
87
|
+
cursor: pointer;
|
|
88
|
+
}
|
|
89
|
+
button.strato-surface:not(:disabled):hover > div:first-child::before, a.strato-surface:not(:disabled):hover > div:first-child::before {
|
|
90
|
+
opacity: 1;
|
|
91
|
+
}
|
|
92
|
+
button.strato-surface:not(:disabled):active > div:first-child::before, a.strato-surface:not(:disabled):active > div:first-child::before {
|
|
93
|
+
transition: var(--dt-animations-fade-in-easing, cubic-bezier(0.5, 0, 1, 1)) var(--dt-animations-fade-in-duration-fast, 150ms);
|
|
94
|
+
opacity: 0;
|
|
95
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import clsx from "clsx";
|
|
2
|
+
import React, { forwardRef } from "react";
|
|
3
|
+
import { pseudoElementCSS, surfaceCSS } from "./Surface.sty.js";
|
|
4
|
+
import { useAriaLabelingProps } from "../../core/hooks/useAriaLabelingProps.js";
|
|
5
|
+
import { useFocusRing } from "../../core/styles/useFocusRing.js";
|
|
6
|
+
import { mergeProps } from "../../core/utils/merge-props.js";
|
|
7
|
+
import { colorUtilsCSS } from "../../styles/colorUtils.sty.js";
|
|
8
|
+
import {
|
|
9
|
+
getSpacingSprinkles
|
|
10
|
+
} from "../../styles/getSpacingSprinkles.js";
|
|
11
|
+
import { textStyleCSS } from "../../styles/textStyle.sty.js";
|
|
12
|
+
import { useLayoutStyles } from "../hooks/useLayoutStyles.js";
|
|
13
|
+
const Surface = /* @__PURE__ */ forwardRef(
|
|
14
|
+
(props, forwardedRef) => {
|
|
15
|
+
const {
|
|
16
|
+
elevation = "flat",
|
|
17
|
+
dragged = false,
|
|
18
|
+
selected = false,
|
|
19
|
+
color = "neutral",
|
|
20
|
+
children,
|
|
21
|
+
className: consumerClassName,
|
|
22
|
+
style: consumerStyle,
|
|
23
|
+
"data-testid": dataTestId,
|
|
24
|
+
"data-dtrum-mask": dataDtrumMask,
|
|
25
|
+
"data-dtrum-allow": dataDtrumAllow,
|
|
26
|
+
as,
|
|
27
|
+
...remainingProps
|
|
28
|
+
} = props;
|
|
29
|
+
const ariaLabelingProps = useAriaLabelingProps(remainingProps);
|
|
30
|
+
const { layoutSizeStyles, remainingProps: surfaceProps } = useLayoutStyles(
|
|
31
|
+
remainingProps,
|
|
32
|
+
{ paddingDefaults: { padding: 24 } }
|
|
33
|
+
);
|
|
34
|
+
const { focusProps, focusClassName } = useFocusRing({
|
|
35
|
+
variant: color
|
|
36
|
+
});
|
|
37
|
+
const surfaceMergedProps = {
|
|
38
|
+
...mergeProps(
|
|
39
|
+
// Need to cast this one as the inference of mergeProps would generate
|
|
40
|
+
// a not allowed overlap. The remainingProps type is too complex due to the
|
|
41
|
+
// polymorphic inheritance.
|
|
42
|
+
surfaceProps,
|
|
43
|
+
focusProps,
|
|
44
|
+
ariaLabelingProps
|
|
45
|
+
)
|
|
46
|
+
};
|
|
47
|
+
const Component = as ?? "div";
|
|
48
|
+
return /* @__PURE__ */ React.createElement(
|
|
49
|
+
Component,
|
|
50
|
+
{
|
|
51
|
+
...surfaceMergedProps,
|
|
52
|
+
"data-testid": dataTestId,
|
|
53
|
+
"data-dtrum-mask": dataDtrumMask,
|
|
54
|
+
"data-dtrum-allow": dataDtrumAllow,
|
|
55
|
+
ref: forwardedRef,
|
|
56
|
+
className: clsx(
|
|
57
|
+
"strato-surface",
|
|
58
|
+
colorUtilsCSS({ color, variant: selected ? "accent" : "default" }),
|
|
59
|
+
surfaceCSS({ selected }),
|
|
60
|
+
focusClassName,
|
|
61
|
+
consumerClassName,
|
|
62
|
+
getSpacingSprinkles(remainingProps, { padding: 24 }),
|
|
63
|
+
textStyleCSS({ textStyle: "base" })
|
|
64
|
+
),
|
|
65
|
+
style: { ...layoutSizeStyles, ...consumerStyle }
|
|
66
|
+
},
|
|
67
|
+
/* @__PURE__ */ React.createElement(
|
|
68
|
+
"div",
|
|
69
|
+
{
|
|
70
|
+
className: clsx(
|
|
71
|
+
"surface-background",
|
|
72
|
+
pseudoElementCSS({ elevation, dragged })
|
|
73
|
+
),
|
|
74
|
+
"aria-hidden": true
|
|
75
|
+
}
|
|
76
|
+
),
|
|
77
|
+
children
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
export {
|
|
82
|
+
Surface
|
|
83
|
+
};
|
|
84
|
+
//# sourceMappingURL=Surface.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/layouts/surface/Surface.tsx"],
|
|
4
|
+
"sourcesContent": ["import clsx from 'clsx';\nimport React, { type ElementType, type ReactElement, forwardRef } from 'react';\n\nimport { pseudoElementCSS, surfaceCSS } from './Surface.sty.js';\nimport { useAriaLabelingProps } from '../../core/hooks/useAriaLabelingProps.js';\nimport { useFocusRing } from '../../core/styles/useFocusRing.js';\nimport type { AriaLabelingProps } from '../../core/types/a11y-props.js';\nimport type { DataTestId } from '../../core/types/data-props.js';\nimport type { DOMProps } from '../../core/types/dom.js';\nimport type { MaskingProps } from '../../core/types/masking-props.js';\nimport type { PolymorphicComponentProps } from '../../core/types/polymorph.js';\nimport type { StylingProps } from '../../core/types/styling-props.js';\nimport type { WithChildren } from '../../core/types/with-children.js';\nimport { mergeProps } from '../../core/utils/merge-props.js';\nimport { colorUtilsCSS } from '../../styles/colorUtils.sty.js';\nimport {\n getSpacingSprinkles,\n type SpacingProps,\n} from '../../styles/getSpacingSprinkles.js';\nimport { textStyleCSS } from '../../styles/textStyle.sty.js';\nimport { useLayoutStyles } from '../hooks/useLayoutStyles.js';\nimport type { LayoutSizeCSS } from '../types/layout.types.js';\n\n//#region Typings\n\n/**\n * Accepted properties for Surface\n * @public\n */\nexport interface SurfaceOwnProps\n extends AriaLabelingProps,\n SpacingProps,\n LayoutSizeCSS,\n DOMProps,\n WithChildren,\n StylingProps,\n DataTestId,\n MaskingProps {\n /**\n * Color of the border when the surface has focus or is selected.\n * @defaultValue 'neutral'\n */\n color?: 'neutral' | 'primary' | 'success' | 'critical' | 'warning';\n /**\n * Defines if the surface is selected and should indicate that state with a border.\n * @defaultValue false\n */\n selected?: boolean;\n /**\n * Indicates if the surface is currently dragged and then applies the corresponding styles.\n * @defaultValue false\n */\n dragged?: boolean;\n /**\n * Defines the surface's elevation to the background.\n * @defaultValue 'flat'\n */\n elevation?: 'flat' | 'raised' | 'floating';\n}\n\n/**\n * Merge own props with others inherited from the underlying element type\n * @public\n */\nexport type SurfaceProps<E extends ElementType> = PolymorphicComponentProps<\n E,\n SurfaceOwnProps\n>;\n//#endregion\n\n/**\n * The Surface component is used to structure content on a page.\n * @public\n */\nexport const Surface: <E extends ElementType = 'div'>(\n props: SurfaceProps<E>,\n) => ReactElement | null = /* @__PURE__ */ forwardRef(\n <E extends ElementType>(\n props: SurfaceProps<E>,\n forwardedRef: typeof props.ref,\n ) => {\n const {\n elevation = 'flat',\n dragged = false,\n selected = false,\n color = 'neutral',\n children,\n className: consumerClassName,\n style: consumerStyle,\n 'data-testid': dataTestId,\n 'data-dtrum-mask': dataDtrumMask,\n 'data-dtrum-allow': dataDtrumAllow,\n as,\n ...remainingProps\n }: SurfaceProps<E> = props;\n\n const ariaLabelingProps = useAriaLabelingProps(remainingProps);\n\n const { layoutSizeStyles, remainingProps: surfaceProps } = useLayoutStyles(\n remainingProps,\n { paddingDefaults: { padding: 24 } },\n );\n\n const { focusProps, focusClassName } = useFocusRing({\n variant: color,\n });\n\n const surfaceMergedProps = {\n ...mergeProps(\n // Need to cast this one as the inference of mergeProps would generate\n // a not allowed overlap. The remainingProps type is too complex due to the\n // polymorphic inheritance.\n surfaceProps as Record<string, unknown>,\n focusProps,\n ariaLabelingProps,\n ),\n };\n\n const Component = as ?? 'div';\n\n return (\n <Component\n {...surfaceMergedProps}\n data-testid={dataTestId}\n data-dtrum-mask={dataDtrumMask}\n data-dtrum-allow={dataDtrumAllow}\n ref={forwardedRef}\n className={clsx(\n 'strato-surface',\n colorUtilsCSS({ color, variant: selected ? 'accent' : 'default' }),\n surfaceCSS({ selected }),\n focusClassName,\n consumerClassName,\n getSpacingSprinkles(remainingProps, { padding: 24 }),\n textStyleCSS({ textStyle: 'base' }),\n )}\n style={{ ...layoutSizeStyles, ...consumerStyle }}\n >\n <div\n className={clsx(\n 'surface-background',\n pseudoElementCSS({ elevation, dragged }),\n )}\n aria-hidden={true}\n />\n {children}\n </Component>\n );\n },\n);\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,UAAU;AACjB,OAAO,SAA8C,kBAAkB;AAEvE,SAAS,kBAAkB,kBAAkB;AAC7C,SAAS,4BAA4B;AACrC,SAAS,oBAAoB;AAQ7B,SAAS,kBAAkB;AAC3B,SAAS,qBAAqB;AAC9B;AAAA,EACE;AAAA,OAEK;AACP,SAAS,oBAAoB;AAC7B,SAAS,uBAAuB;AAsDzB,MAAM,UAE8B;AAAA,EACzC,CACE,OACA,iBACG;AACH,UAAM;AAAA,MACJ,YAAY;AAAA,MACZ,UAAU;AAAA,MACV,WAAW;AAAA,MACX,QAAQ;AAAA,MACR;AAAA,MACA,WAAW;AAAA,MACX,OAAO;AAAA,MACP,eAAe;AAAA,MACf,mBAAmB;AAAA,MACnB,oBAAoB;AAAA,MACpB;AAAA,MACA,GAAG;AAAA,IACL,IAAqB;AAErB,UAAM,oBAAoB,qBAAqB,cAAc;AAE7D,UAAM,EAAE,kBAAkB,gBAAgB,aAAa,IAAI;AAAA,MACzD;AAAA,MACA,EAAE,iBAAiB,EAAE,SAAS,GAAG,EAAE;AAAA,IACrC;AAEA,UAAM,EAAE,YAAY,eAAe,IAAI,aAAa;AAAA,MAClD,SAAS;AAAA,IACX,CAAC;AAED,UAAM,qBAAqB;AAAA,MACzB,GAAG;AAAA;AAAA;AAAA;AAAA,QAID;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAEA,UAAM,YAAY,MAAM;AAExB,WACE;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ,eAAa;AAAA,QACb,mBAAiB;AAAA,QACjB,oBAAkB;AAAA,QAClB,KAAK;AAAA,QACL,WAAW;AAAA,UACT;AAAA,UACA,cAAc,EAAE,OAAO,SAAS,WAAW,WAAW,UAAU,CAAC;AAAA,UACjE,WAAW,EAAE,SAAS,CAAC;AAAA,UACvB;AAAA,UACA;AAAA,UACA,oBAAoB,gBAAgB,EAAE,SAAS,GAAG,CAAC;AAAA,UACnD,aAAa,EAAE,WAAW,OAAO,CAAC;AAAA,QACpC;AAAA,QACA,OAAO,EAAE,GAAG,kBAAkB,GAAG,cAAc;AAAA;AAAA,MAE/C;AAAA,QAAC;AAAA;AAAA,UACC,WAAW;AAAA,YACT;AAAA,YACA,iBAAiB,EAAE,WAAW,QAAQ,CAAC;AAAA,UACzC;AAAA,UACA,eAAa;AAAA;AAAA,MACf;AAAA,MACC;AAAA,IACH;AAAA,EAEJ;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import "../../styles/colorUtils.css";
|
|
2
|
+
import "./Surface.css";
|
|
3
|
+
import { createRuntimeFn as _7a468 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
4
|
+
var pseudoElementCSS = _7a468({ defaultClassName: "Surface_pseudoElementCSS__1qto6jt9", variantClassNames: { elevation: { flat: "Surface_pseudoElementCSS_elevation_flat__1qto6jta", raised: "Surface_pseudoElementCSS_elevation_raised__1qto6jtb", floating: "Surface_pseudoElementCSS_elevation_floating__1qto6jtc" }, dragged: { true: "Surface_pseudoElementCSS_dragged_true__1qto6jtd" } }, defaultVariants: {}, compoundVariants: [] });
|
|
5
|
+
var surfaceCSS = _7a468({ defaultClassName: "Surface_surfaceCSS__1qto6jt6", variantClassNames: { selected: { true: "Surface_surfaceCSS_selected_true__1qto6jt7", false: "Surface_surfaceCSS_selected_false__1qto6jt8" } }, defaultVariants: {}, compoundVariants: [] });
|
|
6
|
+
export {
|
|
7
|
+
pseudoElementCSS,
|
|
8
|
+
surfaceCSS
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=Surface.sty.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/layouts/surface/Surface.css.ts"],
|
|
4
|
+
"sourcesContent": ["import '../../styles/colorUtils.css';\nimport './Surface.css';\nimport { createRuntimeFn as _7a468 } from '@vanilla-extract/recipes/createRuntimeFn';\nexport var pseudoElementCSS = _7a468({defaultClassName:'Surface_pseudoElementCSS__1qto6jt9',variantClassNames:{elevation:{flat:'Surface_pseudoElementCSS_elevation_flat__1qto6jta',raised:'Surface_pseudoElementCSS_elevation_raised__1qto6jtb',floating:'Surface_pseudoElementCSS_elevation_floating__1qto6jtc'},dragged:{true:'Surface_pseudoElementCSS_dragged_true__1qto6jtd'}},defaultVariants:{},compoundVariants:[]});\nexport var surfaceCSS = _7a468({defaultClassName:'Surface_surfaceCSS__1qto6jt6',variantClassNames:{selected:{true:'Surface_surfaceCSS_selected_true__1qto6jt7',false:'Surface_surfaceCSS_selected_false__1qto6jt8'}},defaultVariants:{},compoundVariants:[]});"],
|
|
5
|
+
"mappings": "AAAA,OAAO;AACP,OAAO;AACP,SAAS,mBAAmB,cAAc;AACnC,IAAI,mBAAmB,OAAO,EAAC,kBAAiB,sCAAqC,mBAAkB,EAAC,WAAU,EAAC,MAAK,qDAAoD,QAAO,uDAAsD,UAAS,wDAAuD,GAAE,SAAQ,EAAC,MAAK,kDAAiD,EAAC,GAAE,iBAAgB,CAAC,GAAE,kBAAiB,CAAC,EAAC,CAAC;AACpZ,IAAI,aAAa,OAAO,EAAC,kBAAiB,gCAA+B,mBAAkB,EAAC,UAAS,EAAC,MAAK,8CAA6C,OAAM,8CAA6C,EAAC,GAAE,iBAAgB,CAAC,GAAE,kBAAiB,CAAC,EAAC,CAAC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=layout.types.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
.
|
|
1
|
+
.Blockquote_blockquoteCSS__1knl9z60 {
|
|
2
2
|
position: relative;
|
|
3
3
|
margin: var(--dt-spacings-size-0, 0);
|
|
4
4
|
padding-left: var(--dt-spacings-size-40, 40px);
|
|
5
5
|
word-break: normal;
|
|
6
6
|
overflow-wrap: anywhere;
|
|
7
7
|
}
|
|
8
|
-
.
|
|
8
|
+
.Blockquote_blockquoteCSS__1knl9z60:before {
|
|
9
9
|
content: "";
|
|
10
10
|
position: absolute;
|
|
11
11
|
top: 0;
|