@xanui/core 1.2.34 → 1.2.36
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/AppRoot/Renderar.js +11 -2
- package/AppRoot/Renderar.js.map +1 -1
- package/AppRoot/Renderar.mjs +8 -2
- package/AppRoot/Renderar.mjs.map +1 -1
- package/AppRoot/index.js +22 -3
- package/AppRoot/index.js.map +1 -1
- package/AppRoot/index.mjs +16 -2
- package/AppRoot/index.mjs.map +1 -1
- package/Tag/ServerStyleTag.js +9 -2
- package/Tag/ServerStyleTag.js.map +1 -1
- package/Tag/ServerStyleTag.mjs +7 -2
- package/Tag/ServerStyleTag.mjs.map +1 -1
- package/Tag/cssPropList.js +7 -2
- package/Tag/cssPropList.js.map +1 -1
- package/Tag/cssPropList.mjs +4 -1
- package/Tag/cssPropList.mjs.map +1 -1
- package/Tag/index.js +34 -4
- package/Tag/index.js.map +1 -1
- package/Tag/index.mjs +11 -2
- package/Tag/index.mjs.map +1 -1
- package/Tag/useTagProps.js +13 -3
- package/Tag/useTagProps.js.map +1 -1
- package/Tag/useTagProps.mjs +10 -2
- package/Tag/useTagProps.mjs.map +1 -1
- package/Transition/index.d.ts +3 -7
- package/Transition/index.js +24 -4
- package/Transition/index.js.map +1 -1
- package/Transition/index.mjs +22 -4
- package/Transition/index.mjs.map +1 -1
- package/breakpoint/BreakpointProvider.js +13 -2
- package/breakpoint/BreakpointProvider.js.map +1 -1
- package/breakpoint/BreakpointProvider.mjs +10 -2
- package/breakpoint/BreakpointProvider.mjs.map +1 -1
- package/breakpoint/useBreakpoint.js +11 -2
- package/breakpoint/useBreakpoint.js.map +1 -1
- package/breakpoint/useBreakpoint.mjs +9 -2
- package/breakpoint/useBreakpoint.mjs.map +1 -1
- package/breakpoint/useBreakpointProps.js +11 -3
- package/breakpoint/useBreakpointProps.js.map +1 -1
- package/breakpoint/useBreakpointProps.mjs +8 -2
- package/breakpoint/useBreakpointProps.mjs.map +1 -1
- package/css/aliases.js +7 -2
- package/css/aliases.js.map +1 -1
- package/css/aliases.mjs +4 -1
- package/css/aliases.mjs.map +1 -1
- package/css/getProps.js +7 -2
- package/css/getProps.js.map +1 -1
- package/css/getProps.mjs +4 -1
- package/css/getProps.mjs.map +1 -1
- package/css/getValue.js +7 -2
- package/css/getValue.js.map +1 -1
- package/css/getValue.mjs +4 -1
- package/css/getValue.mjs.map +1 -1
- package/css/index.js +21 -5
- package/css/index.js.map +1 -1
- package/css/index.mjs +10 -2
- package/css/index.mjs.map +1 -1
- package/hooks/useAnimation.js +14 -2
- package/hooks/useAnimation.js.map +1 -1
- package/hooks/useAnimation.mjs +9 -2
- package/hooks/useAnimation.mjs.map +1 -1
- package/hooks/useColorTemplate.js +8 -2
- package/hooks/useColorTemplate.js.map +1 -1
- package/hooks/useColorTemplate.mjs +5 -1
- package/hooks/useColorTemplate.mjs.map +1 -1
- package/hooks/useInterface.js +13 -2
- package/hooks/useInterface.js.map +1 -1
- package/hooks/useInterface.mjs +11 -2
- package/hooks/useInterface.mjs.map +1 -1
- package/hooks/usePortal.js +22 -3
- package/hooks/usePortal.js.map +1 -1
- package/hooks/usePortal.mjs +16 -2
- package/hooks/usePortal.mjs.map +1 -1
- package/hooks/useTransition/index.d.ts +1 -1
- package/hooks/useTransition/index.js +17 -5
- package/hooks/useTransition/index.js.map +1 -1
- package/hooks/useTransition/index.mjs +15 -5
- package/hooks/useTransition/index.mjs.map +1 -1
- package/hooks/useTransition/variants.js +20 -2
- package/hooks/useTransition/variants.js.map +1 -1
- package/hooks/useTransition/variants.mjs +4 -1
- package/hooks/useTransition/variants.mjs.map +1 -1
- package/index.js +53 -1
- package/index.js.map +1 -1
- package/index.mjs +21 -1
- package/index.mjs.map +1 -1
- package/package.json +2 -8
- package/theme/ThemeCssVars.js +7 -2
- package/theme/ThemeCssVars.js.map +1 -1
- package/theme/ThemeCssVars.mjs +4 -1
- package/theme/ThemeCssVars.mjs.map +1 -1
- package/theme/ThemeDefaultOptions.js +54 -44
- package/theme/ThemeDefaultOptions.js.map +1 -1
- package/theme/ThemeDefaultOptions.mjs +48 -44
- package/theme/ThemeDefaultOptions.mjs.map +1 -1
- package/theme/ThemeProvider.js +39 -4
- package/theme/ThemeProvider.js.map +1 -1
- package/theme/ThemeProvider.mjs +16 -2
- package/theme/ThemeProvider.mjs.map +1 -1
- package/theme/core.js +13 -2
- package/theme/core.js.map +1 -1
- package/theme/core.mjs +7 -2
- package/theme/core.mjs.map +1 -1
- package/theme/createTheme.js +11 -2
- package/theme/createTheme.js.map +1 -1
- package/theme/createTheme.mjs +9 -2
- package/theme/createTheme.mjs.map +1 -1
- package/theme/createThemeSwitcher.js +11 -2
- package/theme/createThemeSwitcher.js.map +1 -1
- package/theme/createThemeSwitcher.mjs +9 -2
- package/theme/createThemeSwitcher.mjs.map +1 -1
- package/theme/index.js +15 -1
- package/theme/index.js.map +1 -1
- package/theme/index.mjs +10 -1
- package/theme/index.mjs.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../src/hooks/useTransition/index.ts"],"sourcesContent":["\"use client\";\nimport { useState, useEffect, useId, useRef } from 'react';\nimport { animationEases } from '../useAnimation';\nimport { css } from '../../css';\nimport { formatCSSProp } from 'oncss';\nimport { CSSProps } from '../../css/types';\nimport * as variants from './variants'\n\nexport type UseTransitionVariantTypes = keyof typeof variants\nexport type UseTransitionState = \"open\" | \"opened\" | \"close\" | \"closed\"\n\nexport type UseTransitionVariant = (rect: DOMRect) => ({ from: CSSProps, to: CSSProps })\n\nexport type UseTransitionProps = {\n open: boolean;\n variant: UseTransitionVariant | UseTransitionVariantTypes;\n ease?: string;\n easing?: keyof typeof animationEases;\n duration?: number;\n delay?: number;\n disableInitialTransition?: boolean;\n exitOnUnmount?: boolean;\n onOpen?: () => void;\n onOpened?: () => void;\n onClose?: () => void;\n onClosed?: () => void;\n onState?: (state: UseTransitionState) => void;\n}\n\n\nconst style = (obj?: any) => {\n return css(obj || {}, { selector: \"#\" }).classname;\n}\n\nconst getVariant = (rect: DOMRect | null, variant: UseTransitionProps['variant']) => {\n let fn = typeof variant === 'string' ? variants[variant] : variant\n if (!fn) throw new Error(`Transition variant \"${variant}\" not found.`)\n return fn(rect as DOMRect);\n}\n\nconst useTransition = (id: string, { open, ...props }: UseTransitionProps) => {\n let {\n disableInitialTransition = false,\n variant = \"fade\",\n duration = 400,\n delay,\n ease,\n easing,\n exitOnUnmount = false,\n onOpen,\n onOpened,\n onClose,\n onClosed,\n onState\n } = props\n let _ease = ease || (animationEases as any)[easing as any] || animationEases.bounce\n // const id = \"xui-transition-\" + useId()\n id = `xui-transition-${id}`\n\n const [state, setState] = useState({\n initial: false,\n classname: style({ visibility: \"hidden\" }),\n variant: variant,\n rect: null as DOMRect | null,\n stage: open ? \"open\" : \"closed\",\n unmounted: false,\n })\n\n const getEle = () => document.querySelector(`[data-transition=\"${id}\"]`) as HTMLElement;\n const getBoundary = () => state.rect || getEle()?.getBoundingClientRect() || new DOMRect(0, 0, 0, 0);\n\n useEffect(() => {\n if (exitOnUnmount && state.stage === 'closed') {\n if (!open) {\n setState(s => ({\n ...s,\n initial: false,\n classname: \"\",\n unmounted: true,\n variant: variant,\n }))\n } else {\n setState(s => ({\n ...s,\n variant: variant,\n classname: style({ visibility: \"hidden\" }),\n stage: \"open\",\n }))\n }\n }\n }, [open, state.stage, exitOnUnmount, variant])\n\n // initial effect\n useEffect(() => {\n const ele = getEle()\n if (!ele) return\n if (exitOnUnmount && state.stage === 'closed') return\n\n const rect = getBoundary();\n let { from } = getVariant(rect, state.variant)\n if (open && !state.initial) {\n setState(s => ({\n ...s,\n classname: (!disableInitialTransition || state.unmounted) ? style(from) : \"\",\n initial: true,\n rect: rect,\n }))\n let stimer: any = null\n let etimer: any = null\n ele.ontransitionstart = () => {\n clearTimeout(stimer)\n stimer = setTimeout(() => {\n const isOpen = ele.getAttribute('data-transition-state') === 'open';\n (onOpen && isOpen) && onOpen();\n (onClose && !isOpen) && onClose()\n onState && onState(isOpen ? \"open\" : \"close\")\n setState(s => ({\n ...s,\n stage: isOpen ? \"open\" : \"close\"\n }))\n }, 1)\n }\n\n ele.ontransitionend = () => {\n clearTimeout(etimer)\n etimer = setTimeout(() => {\n const isOpen = ele.getAttribute('data-transition-state') === 'open';\n (onOpened && isOpen) && onOpened();\n (onClosed && !isOpen) && onClosed();\n onState && onState(isOpen ? \"opened\" : \"closed\")\n setState(s => ({\n ...s,\n stage: isOpen ? \"opened\" : \"closed\"\n }))\n }, 1)\n }\n } else if (!state.initial) {\n setState(s => ({\n ...s,\n classname: style(from),\n rect: rect,\n }))\n }\n }, [open, state.initial, state.stage, exitOnUnmount])\n\n\n useEffect(() => {\n if (state.initial) {\n let _variant = state.variant !== variant ? variant : state.variant\n const { from, to } = getVariant(state.rect, _variant)\n let _css: CSSProps = open ? to : from\n let trans = ` ${duration}ms ${_ease} ${delay || 0}ms`\n let _ = {\n ..._css,\n transition: Object.keys(_css || {}).map(k => formatCSSProp(k)).join(trans + \", \") + trans,\n }\n setState(s => ({\n ...s,\n classname: style(_),\n variant: _variant\n }))\n }\n }, [open, state.initial, variant])\n\n return {\n exited: exitOnUnmount && state.stage === 'closed',\n props: {\n 'id': state.classname,\n 'data-transition': id,\n 'data-transition-state': open ? 'open' : 'close',\n }\n }\n}\n\n\nexport default useTransition"],"names":[],"mappings":"mOA8BA,MAAM,KAAK,GAAG,CAAC,GAAS,KAAI;AACzB,IAAA,OAAO,GAAG,CAAC,GAAG,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS;AACrD,CAAC;AAED,MAAM,UAAU,GAAG,CAAC,IAAoB,EAAE,OAAsC,KAAI;AACjF,IAAA,IAAI,EAAE,GAAG,OAAO,OAAO,KAAK,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,OAAO;AAClE,IAAA,IAAI,CAAC,EAAE;AAAE,QAAA,MAAM,IAAI,KAAK,CAAC,uBAA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AI,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,KAAK,GAC3F;YACD,QAAQ,CAAC,CAAC,KAAI,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EACR,CAAC,KACJ,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC,EACnB,OAAO,EAAE,QAAQ,EAAA,CAAA,CAClB,CAAC;QACN;IACH,CAAC,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAElC,OAAO;AACJ,QAAA,MAAM,EAAE,aAAa,IAAI,KAAK,CAAC,KAAK,KAAK,QAAQ;AACjD,QAAA,KAAK,EAAE;YACJ,IAAI,EAAE,KAAK,CAAC,SAAS;AACrB,YAAA,iBAAiB,EAAE,EAAE;YACrB,uBAAuB,EAAE,IAAI,GAAG,MAAM,GAAG,OAAO;AAClD;KACH;AACJ"}
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../src/hooks/useTransition/index.ts"],"sourcesContent":["\"use client\";\nimport { useState, useEffect, useId } from 'react';\nimport { animationEases } from '../useAnimation';\nimport { css } from '../../css';\nimport { formatCSSProp } from 'oncss';\nimport { CSSProps } from '../../css/types';\nimport * as variants from './variants'\n\nexport type UseTransitionVariantTypes = keyof typeof variants\nexport type UseTransitionState = \"open\" | \"opened\" | \"close\" | \"closed\"\n\nexport type UseTransitionVariant = (rect: DOMRect) => ({ from: CSSProps, to: CSSProps })\n\nexport type UseTransitionProps = {\n open: boolean;\n variant: UseTransitionVariant | UseTransitionVariantTypes;\n ease?: string;\n easing?: keyof typeof animationEases;\n duration?: number;\n delay?: number;\n disableInitialTransition?: boolean;\n exitOnUnmount?: boolean;\n onOpen?: () => void;\n onOpened?: () => void;\n onClose?: () => void;\n onClosed?: () => void;\n onState?: (state: UseTransitionState) => void;\n}\n\n\nconst style = (obj?: any) => {\n return css(obj || {}, { selector: \"#\" }).classname;\n}\n\nconst getVariant = (rect: DOMRect | null, variant: UseTransitionProps['variant']) => {\n let fn = typeof variant === 'string' ? variants[variant] : variant\n if (!fn) throw new Error(`Transition variant \"${variant}\" not found.`)\n return fn(rect as DOMRect);\n}\n\nconst useTransition = ({ open, ...props }: UseTransitionProps) => {\n let {\n disableInitialTransition = false,\n variant = \"fade\",\n duration = 400,\n delay,\n ease,\n easing,\n exitOnUnmount = false,\n onOpen,\n onOpened,\n onClose,\n onClosed,\n onState\n } = props\n let _ease = ease || (animationEases as any)[easing as any] || animationEases.bounce\n const id = \"xui-transition-\" + useId()\n const [state, setState] = useState({\n initial: false,\n classname: style({ visibility: \"hidden\" }),\n variant: variant,\n rect: null as DOMRect | null,\n stage: open ? \"open\" : \"closed\",\n unmounted: false,\n })\n\n const getEle = () => document.querySelector(`[data-transition=\"${id}\"]`) as HTMLElement;\n const getBoundary = () => state.rect || getEle()?.getBoundingClientRect() || new DOMRect(0, 0, 0, 0);\n\n useEffect(() => {\n if (exitOnUnmount && state.stage === 'closed') {\n if (!open) {\n setState(s => ({\n ...s,\n initial: false,\n classname: \"\",\n unmounted: true,\n variant: variant,\n }))\n } else {\n setState(s => ({\n ...s,\n variant: variant,\n classname: style({ visibility: \"hidden\" }),\n stage: \"open\",\n }))\n }\n }\n }, [open, state.stage, exitOnUnmount, variant])\n\n // initial effect\n useEffect(() => {\n const ele = getEle()\n if (!ele) return\n if (exitOnUnmount && state.stage === 'closed') return\n\n const rect = getBoundary();\n let { from } = getVariant(rect, state.variant)\n if (open && !state.initial) {\n setState(s => ({\n ...s,\n classname: (!disableInitialTransition || state.unmounted) ? style(from) : \"\",\n initial: true,\n rect: rect,\n }))\n let stimer: any = null\n let etimer: any = null\n ele.ontransitionstart = () => {\n clearTimeout(stimer)\n stimer = setTimeout(() => {\n const isOpen = ele.getAttribute('data-transition-state') === 'open';\n (onOpen && isOpen) && onOpen();\n (onClose && !isOpen) && onClose()\n onState && onState(isOpen ? \"open\" : \"close\")\n setState(s => ({\n ...s,\n stage: isOpen ? \"open\" : \"close\"\n }))\n }, 1)\n }\n\n ele.ontransitionend = () => {\n clearTimeout(etimer)\n etimer = setTimeout(() => {\n const isOpen = ele.getAttribute('data-transition-state') === 'open';\n (onOpened && isOpen) && onOpened();\n (onClosed && !isOpen) && onClosed();\n onState && onState(isOpen ? \"opened\" : \"closed\")\n setState(s => ({\n ...s,\n stage: isOpen ? \"opened\" : \"closed\"\n }))\n }, 1)\n }\n } else if (!state.initial) {\n setState(s => ({\n ...s,\n classname: style(from),\n rect: rect,\n }))\n }\n }, [open, state.initial, state.stage, exitOnUnmount])\n\n\n useEffect(() => {\n if (state.initial) {\n let _variant = state.variant !== variant ? variant : state.variant\n const { from, to } = getVariant(state.rect, _variant)\n let _css: CSSProps = open ? to : from\n let trans = ` ${duration}ms ${_ease} ${delay || 0}ms`\n let _ = {\n ..._css,\n transition: Object.keys(_css || {}).map(k => formatCSSProp(k)).join(trans + \", \") + trans,\n }\n setState(s => ({\n ...s,\n classname: style(_),\n variant: _variant\n }))\n }\n }, [open, state.initial, variant])\n\n return {\n exited: exitOnUnmount && state.stage === 'closed',\n props: {\n 'id': state.classname,\n 'data-transition': id,\n 'data-transition-state': open ? 'open' : 'close',\n }\n }\n}\n\n\nexport default useTransition"],"names":[],"mappings":";;;;;;;;AA8BA;AACG;AACH;AAEA;AACG;AACA;AAAS;AACT;AACH;AAEA;AAAuB;AACpB;AAcA;AACA;AACA;AACG;;AAEA;AACA;;AAEA;AACF;AAED;AACA;;;;;;;AAaS;;;AAQT;;;AAIG;AACA;;AACA;;AAEA;AACA;AACA;AACG;;;AAQA;;AAEG;;AAEG;;AAEA;;;AAMN;AAEA;;AAEG;;AAEG;;AAEA;;;AAMN;;AACI;;;AAOV;;AAIG;AACG;AACA;;;AAGA;;;;;AAaH;AACA;;AAEG;;AAEF;;AAEP;;"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const slideDown = (rect) => {
|
|
2
4
|
return {
|
|
3
5
|
from: {
|
|
4
6
|
transform: `translateY(-${rect.height}px)`,
|
|
@@ -155,4 +157,20 @@ const collapseHorizontal = (rect) => {
|
|
|
155
157
|
overflow: "hidden"
|
|
156
158
|
}
|
|
157
159
|
};
|
|
158
|
-
};
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
exports.collapseHorizontal = collapseHorizontal;
|
|
163
|
+
exports.collapseVertical = collapseVertical;
|
|
164
|
+
exports.fade = fade;
|
|
165
|
+
exports.fadeDown = fadeDown;
|
|
166
|
+
exports.fadeLeft = fadeLeft;
|
|
167
|
+
exports.fadeRight = fadeRight;
|
|
168
|
+
exports.fadeUp = fadeUp;
|
|
169
|
+
exports.grow = grow;
|
|
170
|
+
exports.slideDown = slideDown;
|
|
171
|
+
exports.slideLeft = slideLeft;
|
|
172
|
+
exports.slideRight = slideRight;
|
|
173
|
+
exports.slideUp = slideUp;
|
|
174
|
+
exports.zoom = zoom;
|
|
175
|
+
exports.zoomOver = zoomOver;
|
|
176
|
+
//# sourceMappingURL=variants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"variants.js","sources":["../../../src/hooks/useTransition/variants.ts"],"sourcesContent":["\nexport const slideDown = (rect: DOMRect) => {\n\n return {\n from: {\n transform: `translateY(-${rect.height}px)`,\n },\n to: {\n transform: `translateY(0)`,\n }\n }\n}\n\nexport const slideUp = (rect: DOMRect) => {\n return {\n from: {\n transform: `translateY(${rect.height}px)`,\n },\n to: {\n transform: `translateY(0)`,\n }\n }\n}\n\nexport const slideRight = (rect: DOMRect) => {\n return {\n from: {\n transform: `translateX(-${rect.width}px)`,\n },\n to: {\n transform: `translateX(0)`,\n }\n }\n}\n\nexport const slideLeft = (rect: DOMRect) => {\n return {\n from: {\n transform: `translateX(${rect.width}px)`,\n },\n to: {\n transform: `translateX(0)`,\n }\n }\n}\n\nexport const fade = () => {\n return {\n from: {\n opacity: 0\n },\n to: {\n opacity: 1\n }\n }\n}\n\nexport const fadeDown = () => {\n return {\n from: {\n transform: `translateY(-30px)`,\n opacity: 0\n },\n to: {\n transform: `translateY(0)`,\n opacity: 1\n }\n }\n}\n\nexport const fadeUp = () => {\n return {\n from: {\n transform: `translateY(30px)`,\n opacity: 0\n },\n to: {\n transform: `translateY(0)`,\n opacity: 1\n }\n }\n}\n\nexport const fadeRight = () => {\n return {\n from: {\n transform: `translateX(-30px)`,\n opacity: 0\n },\n to: {\n transform: `translateX(0)`,\n opacity: 1\n }\n }\n}\n\nexport const fadeLeft = () => {\n return {\n from: {\n transform: `translateX(30px)`,\n opacity: 0\n },\n to: {\n transform: `translateX(0)`,\n opacity: 1\n }\n }\n}\n\nexport const grow = () => {\n return {\n from: {\n transform: \"scale(.8, .6)\",\n opacity: 0\n },\n to: {\n transform: \"scale(1)\",\n opacity: 1\n }\n }\n}\n\nexport const zoom = () => {\n return {\n from: {\n transform: \"scale(.8)\",\n opacity: 0\n },\n to: {\n transform: \"scale(1)\",\n opacity: 1\n }\n }\n}\n\nexport const zoomOver = () => {\n return {\n from: {\n transform: \"scale(1.2)\",\n opacity: 0\n },\n to: {\n transform: \"scale(1)\",\n opacity: 1\n }\n }\n}\n\nexport const collapseVertical = (rect: DOMRect) => {\n\n return {\n from: {\n maxHeight: 0 + \"px\",\n overflow: \"hidden\"\n },\n to: {\n maxHeight: rect.height,\n overflow: \"hidden\"\n }\n }\n}\n\n\nexport const collapseHorizontal = (rect: DOMRect) => {\n return {\n from: {\n width: 0 + \"px\",\n overflow: \"hidden\"\n },\n to: {\n width: rect?.width ? rect?.width + \"px\" : \"auto\",\n overflow: \"hidden\"\n }\n }\n}\n\n\n\n\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"variants.js","sources":["../../../src/hooks/useTransition/variants.ts"],"sourcesContent":["\nexport const slideDown = (rect: DOMRect) => {\n\n return {\n from: {\n transform: `translateY(-${rect.height}px)`,\n },\n to: {\n transform: `translateY(0)`,\n }\n }\n}\n\nexport const slideUp = (rect: DOMRect) => {\n return {\n from: {\n transform: `translateY(${rect.height}px)`,\n },\n to: {\n transform: `translateY(0)`,\n }\n }\n}\n\nexport const slideRight = (rect: DOMRect) => {\n return {\n from: {\n transform: `translateX(-${rect.width}px)`,\n },\n to: {\n transform: `translateX(0)`,\n }\n }\n}\n\nexport const slideLeft = (rect: DOMRect) => {\n return {\n from: {\n transform: `translateX(${rect.width}px)`,\n },\n to: {\n transform: `translateX(0)`,\n }\n }\n}\n\nexport const fade = () => {\n return {\n from: {\n opacity: 0\n },\n to: {\n opacity: 1\n }\n }\n}\n\nexport const fadeDown = () => {\n return {\n from: {\n transform: `translateY(-30px)`,\n opacity: 0\n },\n to: {\n transform: `translateY(0)`,\n opacity: 1\n }\n }\n}\n\nexport const fadeUp = () => {\n return {\n from: {\n transform: `translateY(30px)`,\n opacity: 0\n },\n to: {\n transform: `translateY(0)`,\n opacity: 1\n }\n }\n}\n\nexport const fadeRight = () => {\n return {\n from: {\n transform: `translateX(-30px)`,\n opacity: 0\n },\n to: {\n transform: `translateX(0)`,\n opacity: 1\n }\n }\n}\n\nexport const fadeLeft = () => {\n return {\n from: {\n transform: `translateX(30px)`,\n opacity: 0\n },\n to: {\n transform: `translateX(0)`,\n opacity: 1\n }\n }\n}\n\nexport const grow = () => {\n return {\n from: {\n transform: \"scale(.8, .6)\",\n opacity: 0\n },\n to: {\n transform: \"scale(1)\",\n opacity: 1\n }\n }\n}\n\nexport const zoom = () => {\n return {\n from: {\n transform: \"scale(.8)\",\n opacity: 0\n },\n to: {\n transform: \"scale(1)\",\n opacity: 1\n }\n }\n}\n\nexport const zoomOver = () => {\n return {\n from: {\n transform: \"scale(1.2)\",\n opacity: 0\n },\n to: {\n transform: \"scale(1)\",\n opacity: 1\n }\n }\n}\n\nexport const collapseVertical = (rect: DOMRect) => {\n\n return {\n from: {\n maxHeight: 0 + \"px\",\n overflow: \"hidden\"\n },\n to: {\n maxHeight: rect.height,\n overflow: \"hidden\"\n }\n }\n}\n\n\nexport const collapseHorizontal = (rect: DOMRect) => {\n return {\n from: {\n width: 0 + \"px\",\n overflow: \"hidden\"\n },\n to: {\n width: rect?.width ? rect?.width + \"px\" : \"auto\",\n overflow: \"hidden\"\n }\n }\n}\n\n\n\n\n"],"names":[],"mappings":";;AACO,MAAM,SAAS,GAAG,CAAC,IAAa,KAAI;IAEvC,OAAO;AACH,QAAA,IAAI,EAAE;AACF,YAAA,SAAS,EAAE,CAAA,YAAA,EAAe,IAAI,CAAC,MAAM,CAAA,GAAA,CAAK;AAC7C,SAAA;AACD,QAAA,EAAE,EAAE;AACA,YAAA,SAAS,EAAE,CAAA,aAAA,CAAe;AAC7B;KACJ;AACL;AAEO,MAAM,OAAO,GAAG,CAAC,IAAa,KAAI;IACrC,OAAO;AACH,QAAA,IAAI,EAAE;AACF,YAAA,SAAS,EAAE,CAAA,WAAA,EAAc,IAAI,CAAC,MAAM,CAAA,GAAA,CAAK;AAC5C,SAAA;AACD,QAAA,EAAE,EAAE;AACA,YAAA,SAAS,EAAE,CAAA,aAAA,CAAe;AAC7B;KACJ;AACL;AAEO,MAAM,UAAU,GAAG,CAAC,IAAa,KAAI;IACxC,OAAO;AACH,QAAA,IAAI,EAAE;AACF,YAAA,SAAS,EAAE,CAAA,YAAA,EAAe,IAAI,CAAC,KAAK,CAAA,GAAA,CAAK;AAC5C,SAAA;AACD,QAAA,EAAE,EAAE;AACA,YAAA,SAAS,EAAE,CAAA,aAAA,CAAe;AAC7B;KACJ;AACL;AAEO,MAAM,SAAS,GAAG,CAAC,IAAa,KAAI;IACvC,OAAO;AACH,QAAA,IAAI,EAAE;AACF,YAAA,SAAS,EAAE,CAAA,WAAA,EAAc,IAAI,CAAC,KAAK,CAAA,GAAA,CAAK;AAC3C,SAAA;AACD,QAAA,EAAE,EAAE;AACA,YAAA,SAAS,EAAE,CAAA,aAAA,CAAe;AAC7B;KACJ;AACL;AAEO,MAAM,IAAI,GAAG,MAAK;IACrB,OAAO;AACH,QAAA,IAAI,EAAE;AACF,YAAA,OA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,7 @@ const collapseHorizontal = (rect) => {
|
|
|
155
155
|
overflow: "hidden"
|
|
156
156
|
}
|
|
157
157
|
};
|
|
158
|
-
};
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
export { collapseHorizontal, collapseVertical, fade, fadeDown, fadeLeft, fadeRight, fadeUp, grow, slideDown, slideLeft, slideRight, slideUp, zoom, zoomOver };
|
|
161
|
+
//# sourceMappingURL=variants.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"variants.mjs","sources":["../../../src/hooks/useTransition/variants.ts"],"sourcesContent":["\nexport const slideDown = (rect: DOMRect) => {\n\n return {\n from: {\n transform: `translateY(-${rect.height}px)`,\n },\n to: {\n transform: `translateY(0)`,\n }\n }\n}\n\nexport const slideUp = (rect: DOMRect) => {\n return {\n from: {\n transform: `translateY(${rect.height}px)`,\n },\n to: {\n transform: `translateY(0)`,\n }\n }\n}\n\nexport const slideRight = (rect: DOMRect) => {\n return {\n from: {\n transform: `translateX(-${rect.width}px)`,\n },\n to: {\n transform: `translateX(0)`,\n }\n }\n}\n\nexport const slideLeft = (rect: DOMRect) => {\n return {\n from: {\n transform: `translateX(${rect.width}px)`,\n },\n to: {\n transform: `translateX(0)`,\n }\n }\n}\n\nexport const fade = () => {\n return {\n from: {\n opacity: 0\n },\n to: {\n opacity: 1\n }\n }\n}\n\nexport const fadeDown = () => {\n return {\n from: {\n transform: `translateY(-30px)`,\n opacity: 0\n },\n to: {\n transform: `translateY(0)`,\n opacity: 1\n }\n }\n}\n\nexport const fadeUp = () => {\n return {\n from: {\n transform: `translateY(30px)`,\n opacity: 0\n },\n to: {\n transform: `translateY(0)`,\n opacity: 1\n }\n }\n}\n\nexport const fadeRight = () => {\n return {\n from: {\n transform: `translateX(-30px)`,\n opacity: 0\n },\n to: {\n transform: `translateX(0)`,\n opacity: 1\n }\n }\n}\n\nexport const fadeLeft = () => {\n return {\n from: {\n transform: `translateX(30px)`,\n opacity: 0\n },\n to: {\n transform: `translateX(0)`,\n opacity: 1\n }\n }\n}\n\nexport const grow = () => {\n return {\n from: {\n transform: \"scale(.8, .6)\",\n opacity: 0\n },\n to: {\n transform: \"scale(1)\",\n opacity: 1\n }\n }\n}\n\nexport const zoom = () => {\n return {\n from: {\n transform: \"scale(.8)\",\n opacity: 0\n },\n to: {\n transform: \"scale(1)\",\n opacity: 1\n }\n }\n}\n\nexport const zoomOver = () => {\n return {\n from: {\n transform: \"scale(1.2)\",\n opacity: 0\n },\n to: {\n transform: \"scale(1)\",\n opacity: 1\n }\n }\n}\n\nexport const collapseVertical = (rect: DOMRect) => {\n\n return {\n from: {\n maxHeight: 0 + \"px\",\n overflow: \"hidden\"\n },\n to: {\n maxHeight: rect.height,\n overflow: \"hidden\"\n }\n }\n}\n\n\nexport const collapseHorizontal = (rect: DOMRect) => {\n return {\n from: {\n width: 0 + \"px\",\n overflow: \"hidden\"\n },\n to: {\n width: rect?.width ? rect?.width + \"px\" : \"auto\",\n overflow: \"hidden\"\n }\n }\n}\n\n\n\n\n"],"names":[],"mappings":"AACO,MAAM,SAAS,GAAG,CAAC,IAAa,KAAI;IAEvC,OAAO;AACH,QAAA,IAAI,EAAE;AACF,YAAA,SAAS,EAAE,CAAA,YAAA,EAAe,IAAI,CAAC,MAAM,CAAA,GAAA,CAAK;AAC7C,SAAA;AACD,QAAA,EAAE,EAAE;AACA,YAAA,SAAS,EAAE,CAAA,aAAA,CAAe;AAC7B;KACJ;AACL;AAEO,MAAM,OAAO,GAAG,CAAC,IAAa,KAAI;IACrC,OAAO;AACH,QAAA,IAAI,EAAE;AACF,YAAA,SAAS,EAAE,CAAA,WAAA,EAAc,IAAI,CAAC,MAAM,CAAA,GAAA,CAAK;AAC5C,SAAA;AACD,QAAA,EAAE,EAAE;AACA,YAAA,SAAS,EAAE,CAAA,aAAA,CAAe;AAC7B;KACJ;AACL;AAEO,MAAM,UAAU,GAAG,CAAC,IAAa,KAAI;IACxC,OAAO;AACH,QAAA,IAAI,EAAE;AACF,Y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M;AACtB,YAAA,QAAQ,EAAE;AACb;KACJ;AACL;AAGO,MAAM,kBAAkB,GAAG,CAAC,IAAa,KAAI;IAChD,OAAO;AACH,QAAA,IAAI,EAAE;YACF,KAAK,EAAE,CAAC,GAAG,IAAI;AACf,YAAA,QAAQ,EAAE;AACb,SAAA;AACD,QAAA,EAAE,EAAE;YACA,KAAK,EAAE,CAAA,IAAI,KAAA,IAAA,IAAJ,IAAI,uBAAJ,IAAI,CAAE,KAAK,IAAG,CAAA,IAAI,KAAA,IAAA,IAAJ,IAAI,KAAA,MAAA,GAAA,MAAA,GAAJ,IAAI,CAAE,KAAK,IAAG,IAAI,GAAG,MAAM;AAChD,YAAA,QAAQ,EAAE;AACb;KACJ;AACL"}
|
|
1
|
+
{"version":3,"file":"variants.mjs","sources":["../../../src/hooks/useTransition/variants.ts"],"sourcesContent":["\nexport const slideDown = (rect: DOMRect) => {\n\n return {\n from: {\n transform: `translateY(-${rect.height}px)`,\n },\n to: {\n transform: `translateY(0)`,\n }\n }\n}\n\nexport const slideUp = (rect: DOMRect) => {\n return {\n from: {\n transform: `translateY(${rect.height}px)`,\n },\n to: {\n transform: `translateY(0)`,\n }\n }\n}\n\nexport const slideRight = (rect: DOMRect) => {\n return {\n from: {\n transform: `translateX(-${rect.width}px)`,\n },\n to: {\n transform: `translateX(0)`,\n }\n }\n}\n\nexport const slideLeft = (rect: DOMRect) => {\n return {\n from: {\n transform: `translateX(${rect.width}px)`,\n },\n to: {\n transform: `translateX(0)`,\n }\n }\n}\n\nexport const fade = () => {\n return {\n from: {\n opacity: 0\n },\n to: {\n opacity: 1\n }\n }\n}\n\nexport const fadeDown = () => {\n return {\n from: {\n transform: `translateY(-30px)`,\n opacity: 0\n },\n to: {\n transform: `translateY(0)`,\n opacity: 1\n }\n }\n}\n\nexport const fadeUp = () => {\n return {\n from: {\n transform: `translateY(30px)`,\n opacity: 0\n },\n to: {\n transform: `translateY(0)`,\n opacity: 1\n }\n }\n}\n\nexport const fadeRight = () => {\n return {\n from: {\n transform: `translateX(-30px)`,\n opacity: 0\n },\n to: {\n transform: `translateX(0)`,\n opacity: 1\n }\n }\n}\n\nexport const fadeLeft = () => {\n return {\n from: {\n transform: `translateX(30px)`,\n opacity: 0\n },\n to: {\n transform: `translateX(0)`,\n opacity: 1\n }\n }\n}\n\nexport const grow = () => {\n return {\n from: {\n transform: \"scale(.8, .6)\",\n opacity: 0\n },\n to: {\n transform: \"scale(1)\",\n opacity: 1\n }\n }\n}\n\nexport const zoom = () => {\n return {\n from: {\n transform: \"scale(.8)\",\n opacity: 0\n },\n to: {\n transform: \"scale(1)\",\n opacity: 1\n }\n }\n}\n\nexport const zoomOver = () => {\n return {\n from: {\n transform: \"scale(1.2)\",\n opacity: 0\n },\n to: {\n transform: \"scale(1)\",\n opacity: 1\n }\n }\n}\n\nexport const collapseVertical = (rect: DOMRect) => {\n\n return {\n from: {\n maxHeight: 0 + \"px\",\n overflow: \"hidden\"\n },\n to: {\n maxHeight: rect.height,\n overflow: \"hidden\"\n }\n }\n}\n\n\nexport const collapseHorizontal = (rect: DOMRect) => {\n return {\n from: {\n width: 0 + \"px\",\n overflow: \"hidden\"\n },\n to: {\n width: rect?.width ? rect?.width + \"px\" : \"auto\",\n overflow: \"hidden\"\n }\n }\n}\n\n\n\n\n"],"names":[],"mappings":"AACO,MAAM,SAAS,GAAG,CAAC,IAAa,KAAI;IAEvC,OAAO;AACH,QAAA,IAAI,EAAE;AACF,YAAA,SAAS,EAAE,CAAA,YAAA,EAAe,IAAI,CAAC,MAAM,CAAA,GAAA,CAAK;AAC7C,SAAA;AACD,QAAA,EAAE,EAAE;AACA,YAAA,SAAS,EAAE,CAAA,aAAA,CAAe;AAC7B;KACJ;AACL;AAEO,MAAM,OAAO,GAAG,CAAC,IAAa,KAAI;IACrC,OAAO;AACH,QAAA,IAAI,EAAE;AACF,YAAA,SAAS,EAAE,CAAA,WAAA,EAAc,IAAI,CAAC,MAAM,CAAA,GAAA,CAAK;AAC5C,SAAA;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I;IAE9C,OAAO;AACH,QAAA,IAAI,EAAE;YACF,SAAS,EAAE,CAAC,GAAG,IAAI;AACnB,YAAA,QAAQ,EAAE;AACb,SAAA;AACD,QAAA,EAAE,EAAE;YACA,SAAS,EAAE,IAAI,CAAC,MAAM;AACtB,YAAA,QAAQ,EAAE;AACb;KACJ;AACL;AAGO,MAAM,kBAAkB,GAAG,CAAC,IAAa,KAAI;IAChD,OAAO;AACH,QAAA,IAAI,EAAE;YACF,KAAK,EAAE,CAAC,GAAG,IAAI;AACf,YAAA,QAAQ,EAAE;AACb,SAAA;AACD,QAAA,EAAE,EAAE;YACA,KAAK,EAAE,CAAA,IAAI,KAAA,IAAA,IAAJ,IAAI,uBAAJ,IAAI,CAAE,KAAK,IAAG,CAAA,IAAI,KAAA,IAAA,IAAJ,IAAI,KAAA,MAAA,GAAA,MAAA,GAAJ,IAAI,CAAE,KAAK,IAAG,IAAI,GAAG,MAAM;AAChD,YAAA,QAAQ,EAAE;AACb;KACJ;AACL;;;;"}
|
package/index.js
CHANGED
|
@@ -1 +1,53 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index$1 = require('./Tag/index.js');
|
|
4
|
+
var useTagProps = require('./Tag/useTagProps.js');
|
|
5
|
+
var useAnimation = require('./hooks/useAnimation.js');
|
|
6
|
+
var useColorTemplate = require('./hooks/useColorTemplate.js');
|
|
7
|
+
var useBreakpoint = require('./breakpoint/useBreakpoint.js');
|
|
8
|
+
var useBreakpointProps = require('./breakpoint/useBreakpointProps.js');
|
|
9
|
+
var useInterface = require('./hooks/useInterface.js');
|
|
10
|
+
var index$3 = require('./hooks/useTransition/index.js');
|
|
11
|
+
var index$2 = require('./Transition/index.js');
|
|
12
|
+
var index = require('./AppRoot/index.js');
|
|
13
|
+
var usePortal = require('./hooks/usePortal.js');
|
|
14
|
+
var Renderar = require('./AppRoot/Renderar.js');
|
|
15
|
+
var index$4 = require('./css/index.js');
|
|
16
|
+
var index$5 = require('./theme/index.js');
|
|
17
|
+
var getValue = require('./css/getValue.js');
|
|
18
|
+
var getProps = require('./css/getProps.js');
|
|
19
|
+
var ThemeProvider = require('./theme/ThemeProvider.js');
|
|
20
|
+
var createThemeSwitcher = require('./theme/createThemeSwitcher.js');
|
|
21
|
+
var createTheme = require('./theme/createTheme.js');
|
|
22
|
+
var core = require('./theme/core.js');
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
exports.Tag = index$1;
|
|
27
|
+
exports.useTagProps = useTagProps;
|
|
28
|
+
exports.animationEases = useAnimation.animationEases;
|
|
29
|
+
exports.useAnimation = useAnimation.default;
|
|
30
|
+
exports.useColorTemplate = useColorTemplate;
|
|
31
|
+
exports.useBreakpoint = useBreakpoint;
|
|
32
|
+
exports.useBreakpointProps = useBreakpointProps;
|
|
33
|
+
exports.useInterface = useInterface;
|
|
34
|
+
exports.useTransition = index$3;
|
|
35
|
+
exports.Transition = index$2;
|
|
36
|
+
exports.AppRoot = index.default;
|
|
37
|
+
exports.appRootElement = index.appRootElement;
|
|
38
|
+
exports.usePortal = usePortal.usePortal;
|
|
39
|
+
exports.Renderar = Renderar.Renderar;
|
|
40
|
+
exports.adjustColor = index$4.adjustColor;
|
|
41
|
+
exports.adjustTextContrast = index$4.adjustTextContrast;
|
|
42
|
+
exports.alpha = index$4.alpha;
|
|
43
|
+
exports.breakpoints = index$4.breakpoints;
|
|
44
|
+
exports.css = index$4.css;
|
|
45
|
+
exports.themeRootClass = index$5.themeRootClass;
|
|
46
|
+
exports.getValue = getValue;
|
|
47
|
+
exports.getProps = getProps;
|
|
48
|
+
exports.ThemeProvider = ThemeProvider;
|
|
49
|
+
exports.createThemeSwitcher = createThemeSwitcher;
|
|
50
|
+
exports.createTheme = createTheme.createTheme;
|
|
51
|
+
exports.getTheme = core.getTheme;
|
|
52
|
+
exports.useTheme = core.useTheme;
|
|
53
|
+
//# sourceMappingURL=index.js.map
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/index.mjs
CHANGED
|
@@ -1 +1,21 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export { default as Tag } from './Tag/index.mjs';
|
|
2
|
+
export { default as useTagProps } from './Tag/useTagProps.mjs';
|
|
3
|
+
export { animationEases, default as useAnimation } from './hooks/useAnimation.mjs';
|
|
4
|
+
export { default as useColorTemplate } from './hooks/useColorTemplate.mjs';
|
|
5
|
+
export { default as useBreakpoint } from './breakpoint/useBreakpoint.mjs';
|
|
6
|
+
export { default as useBreakpointProps } from './breakpoint/useBreakpointProps.mjs';
|
|
7
|
+
export { default as useInterface } from './hooks/useInterface.mjs';
|
|
8
|
+
export { default as useTransition } from './hooks/useTransition/index.mjs';
|
|
9
|
+
export { default as Transition } from './Transition/index.mjs';
|
|
10
|
+
export { default as AppRoot, appRootElement } from './AppRoot/index.mjs';
|
|
11
|
+
export { usePortal } from './hooks/usePortal.mjs';
|
|
12
|
+
export { Renderar } from './AppRoot/Renderar.mjs';
|
|
13
|
+
export { adjustColor, adjustTextContrast, alpha, breakpoints, css } from './css/index.mjs';
|
|
14
|
+
export { themeRootClass } from './theme/index.mjs';
|
|
15
|
+
export { default as getValue } from './css/getValue.mjs';
|
|
16
|
+
export { default as getProps } from './css/getProps.mjs';
|
|
17
|
+
export { default as ThemeProvider } from './theme/ThemeProvider.mjs';
|
|
18
|
+
export { default as createThemeSwitcher } from './theme/createThemeSwitcher.mjs';
|
|
19
|
+
export { createTheme } from './theme/createTheme.mjs';
|
|
20
|
+
export { getTheme, useTheme } from './theme/core.mjs';
|
|
21
|
+
//# sourceMappingURL=index.mjs.map
|
package/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xanui/core",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.36",
|
|
4
4
|
"description": "Xanui Core Library",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "./index.js",
|
|
@@ -12,12 +12,6 @@
|
|
|
12
12
|
"pretty-class": "^1.0.8",
|
|
13
13
|
"react-state-bucket": "^1.2.11"
|
|
14
14
|
},
|
|
15
|
-
"devDependencies": {
|
|
16
|
-
"@types/react": "^19.2.7",
|
|
17
|
-
"@types/react-dom": "^19.2.3",
|
|
18
|
-
"makepack": "^1.7.24",
|
|
19
|
-
"typescript": "^5.9.3"
|
|
20
|
-
},
|
|
21
15
|
"keywords": [],
|
|
22
16
|
"exports": {
|
|
23
17
|
".": {
|
|
@@ -26,4 +20,4 @@
|
|
|
26
20
|
"types": "./index.d.ts"
|
|
27
21
|
}
|
|
28
22
|
}
|
|
29
|
-
}
|
|
23
|
+
}
|
package/theme/ThemeCssVars.js
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const ThemeCssVars = (theme) => {
|
|
2
4
|
const shadows = {};
|
|
3
5
|
theme.shadow.forEach((s, i) => shadows[`--shadow-${i}`] = s);
|
|
4
6
|
return Object.assign({ "--bp-xs": theme.breakpoints.xs, "--bp-sm": theme.breakpoints.sm, "--bp-md": theme.breakpoints.md, "--bp-lg": theme.breakpoints.lg, "--bp-xl": theme.breakpoints.xl, "--font-h1": `${theme.typography.h1.fontWeight} ${theme.typography.h1.fontSize}px/${theme.typography.h1.lineHeight} inherit`, "--font-h2": `${theme.typography.h2.fontWeight} ${theme.typography.h2.fontSize}px/${theme.typography.h2.lineHeight} inherit`, "--font-h3": `${theme.typography.h3.fontWeight} ${theme.typography.h3.fontSize}px/${theme.typography.h3.lineHeight} inherit`, "--font-h4": `${theme.typography.h4.fontWeight} ${theme.typography.h4.fontSize}px/${theme.typography.h4.lineHeight} inherit`, "--font-h5": `${theme.typography.h5.fontWeight} ${theme.typography.h5.fontSize}px/${theme.typography.h5.lineHeight} inherit`, "--font-h6": `${theme.typography.h6.fontWeight} ${theme.typography.h6.fontSize}px/${theme.typography.h6.lineHeight} inherit`, "--font-big": `${theme.typography.big.fontWeight} ${theme.typography.text.fontSize}px/${theme.typography.text.lineHeight} inherit`, "--font-text": `${theme.typography.text.fontWeight} ${theme.typography.text.fontSize}px/${theme.typography.text.lineHeight} inherit`, "--font-button": `${theme.typography.button.fontWeight} ${theme.typography.button.fontSize}px/${theme.typography.button.lineHeight} inherit`, "--font-small": `${theme.typography.small.fontWeight} ${theme.typography.small.fontSize}px/${theme.typography.small.lineHeight} inherit`, "--fontsize-h1": `${theme.typography.h1.fontSize}px`, "--fontsize-h2": `${theme.typography.h2.fontSize}px`, "--fontsize-h3": `${theme.typography.h3.fontSize}px`, "--fontsize-h4": `${theme.typography.h4.fontSize}px`, "--fontsize-h5": `${theme.typography.h5.fontSize}px`, "--fontsize-h6": `${theme.typography.h6.fontSize}px`, "--fontsize-big": `${theme.typography.big.fontSize}px`, "--fontsize-text": `${theme.typography.text.fontSize}px`, "--fontsize-button": `${theme.typography.button.fontSize}px`, "--fontsize-small": `${theme.typography.small.fontSize}px`, "--fontweight-h1": theme.typography.h1.fontWeight + "", "--fontweight-h2": theme.typography.h2.fontWeight + "", "--fontweight-h3": theme.typography.h3.fontWeight + "", "--fontweight-h4": theme.typography.h4.fontWeight + "", "--fontweight-h5": theme.typography.h5.fontWeight + "", "--fontweight-h6": theme.typography.h6.fontWeight + "", "--fontweight-big": theme.typography.big.fontWeight + "", "--fontweight-text": theme.typography.text.fontWeight + "", "--fontweight-button": theme.typography.button.fontWeight + "", "--fontweight-small": theme.typography.small.fontWeight + "", "--lineheight-h1": theme.typography.h1.lineHeight + "", "--lineheight-h2": theme.typography.h2.lineHeight + "", "--lineheight-h3": theme.typography.h3.lineHeight + "", "--lineheight-h4": theme.typography.h4.lineHeight + "", "--lineheight-h5": theme.typography.h5.lineHeight + "", "--lineheight-h6": theme.typography.h6.lineHeight + "", "--lineheight-big": theme.typography.big.lineHeight + "", "--lineheight-text": theme.typography.text.lineHeight + "", "--lineheight-button": theme.typography.button.lineHeight + "", "--lineheight-small": theme.typography.small.lineHeight + "", "--color-background-primary": theme.colors.background.primary, "--color-background-secondary": theme.colors.background.secondary, "--color-text-primary": theme.colors.text.primary, "--color-text-secondary": theme.colors.text.secondary, "--color-divider-primary": theme.colors.divider.primary, "--color-divider-secondary": theme.colors.divider.secondary, "--color-divider-soft-primary": theme.colors.divider.soft.primary, "--color-divider-soft-secondary": theme.colors.divider.soft.secondary, "--color-brand-primary": theme.colors.brand.primary, "--color-brand-secondary": theme.colors.brand.secondary, "--color-brand-text": theme.colors.brand.text, "--color-brand-soft-primary": theme.colors.brand.soft.primary, "--color-brand-soft-secondary": theme.colors.brand.soft.secondary, "--color-accent-primary": theme.colors.accent.primary, "--color-accent-secondary": theme.colors.accent.secondary, "--color-accent-text": theme.colors.accent.text, "--color-accent-soft-primary": theme.colors.accent.soft.primary, "--color-accent-soft-secondary": theme.colors.accent.soft.secondary, "--color-info-primary": theme.colors.info.primary, "--color-info-secondary": theme.colors.info.secondary, "--color-info-text": theme.colors.info.text, "--color-info-soft-primary": theme.colors.info.soft.primary, "--color-info-soft-secondary": theme.colors.info.soft.secondary, "--color-success-primary": theme.colors.success.primary, "--color-success-secondary": theme.colors.success.secondary, "--color-success-text": theme.colors.success.text, "--color-success-soft-primary": theme.colors.success.soft.primary, "--color-success-soft-secondary": theme.colors.success.soft.secondary, "--color-warning-primary": theme.colors.warning.primary, "--color-warning-secondary": theme.colors.warning.secondary, "--color-warning-text": theme.colors.warning.text, "--color-warning-soft-primary": theme.colors.warning.soft.primary, "--color-warning-soft-secondary": theme.colors.warning.soft.secondary, "--color-danger-primary": theme.colors.danger.primary, "--color-danger-secondary": theme.colors.danger.secondary, "--color-danger-text": theme.colors.danger.text, "--color-danger-soft-primary": theme.colors.danger.soft.primary, "--color-danger-soft-secondary": theme.colors.danger.soft.secondary }, shadows);
|
|
5
|
-
};
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
module.exports = ThemeCssVars;
|
|
10
|
+
//# sourceMappingURL=ThemeCssVars.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeCssVars.js","sources":["../../src/theme/ThemeCssVars.ts"],"sourcesContent":["import { ThemeOptions } from \"./types\";\n\nconst ThemeCssVars = (theme: ThemeOptions) => {\n\n const shadows: any = {}\n theme.shadow.forEach((s, i) => shadows[`--shadow-${i}`] = s)\n\n return {\n \"--bp-xs\": theme.breakpoints.xs,\n \"--bp-sm\": theme.breakpoints.sm,\n \"--bp-md\": theme.breakpoints.md,\n \"--bp-lg\": theme.breakpoints.lg,\n \"--bp-xl\": theme.breakpoints.xl,\n\n \"--font-h1\": `${theme.typography.h1.fontWeight} ${theme.typography.h1.fontSize}px/${theme.typography.h1.lineHeight} inherit`,\n \"--font-h2\": `${theme.typography.h2.fontWeight} ${theme.typography.h2.fontSize}px/${theme.typography.h2.lineHeight} inherit`,\n \"--font-h3\": `${theme.typography.h3.fontWeight} ${theme.typography.h3.fontSize}px/${theme.typography.h3.lineHeight} inherit`,\n \"--font-h4\": `${theme.typography.h4.fontWeight} ${theme.typography.h4.fontSize}px/${theme.typography.h4.lineHeight} inherit`,\n \"--font-h5\": `${theme.typography.h5.fontWeight} ${theme.typography.h5.fontSize}px/${theme.typography.h5.lineHeight} inherit`,\n \"--font-h6\": `${theme.typography.h6.fontWeight} ${theme.typography.h6.fontSize}px/${theme.typography.h6.lineHeight} inherit`,\n \"--font-big\": `${theme.typography.big.fontWeight} ${theme.typography.text.fontSize}px/${theme.typography.text.lineHeight} inherit`,\n \"--font-text\": `${theme.typography.text.fontWeight} ${theme.typography.text.fontSize}px/${theme.typography.text.lineHeight} inherit`,\n \"--font-button\": `${theme.typography.button.fontWeight} ${theme.typography.button.fontSize}px/${theme.typography.button.lineHeight} inherit`,\n \"--font-small\": `${theme.typography.small.fontWeight} ${theme.typography.small.fontSize}px/${theme.typography.small.lineHeight} inherit`,\n\n \"--fontsize-h1\": `${theme.typography.h1.fontSize}px`,\n \"--fontsize-h2\": `${theme.typography.h2.fontSize}px`,\n \"--fontsize-h3\": `${theme.typography.h3.fontSize}px`,\n \"--fontsize-h4\": `${theme.typography.h4.fontSize}px`,\n \"--fontsize-h5\": `${theme.typography.h5.fontSize}px`,\n \"--fontsize-h6\": `${theme.typography.h6.fontSize}px`,\n \"--fontsize-big\": `${theme.typography.big.fontSize}px`,\n \"--fontsize-text\": `${theme.typography.text.fontSize}px`,\n \"--fontsize-button\": `${theme.typography.button.fontSize}px`,\n \"--fontsize-small\": `${theme.typography.small.fontSize}px`,\n\n \"--fontweight-h1\": theme.typography.h1.fontWeight + \"\",\n \"--fontweight-h2\": theme.typography.h2.fontWeight + \"\",\n \"--fontweight-h3\": theme.typography.h3.fontWeight + \"\",\n \"--fontweight-h4\": theme.typography.h4.fontWeight + \"\",\n \"--fontweight-h5\": theme.typography.h5.fontWeight + \"\",\n \"--fontweight-h6\": theme.typography.h6.fontWeight + \"\",\n \"--fontweight-big\": theme.typography.big.fontWeight + \"\",\n \"--fontweight-text\": theme.typography.text.fontWeight + \"\",\n \"--fontweight-button\": theme.typography.button.fontWeight + \"\",\n \"--fontweight-small\": theme.typography.small.fontWeight + \"\",\n\n \"--lineheight-h1\": theme.typography.h1.lineHeight + \"\",\n \"--lineheight-h2\": theme.typography.h2.lineHeight + \"\",\n \"--lineheight-h3\": theme.typography.h3.lineHeight + \"\",\n \"--lineheight-h4\": theme.typography.h4.lineHeight + \"\",\n \"--lineheight-h5\": theme.typography.h5.lineHeight + \"\",\n \"--lineheight-h6\": theme.typography.h6.lineHeight + \"\",\n \"--lineheight-big\": theme.typography.big.lineHeight + \"\",\n \"--lineheight-text\": theme.typography.text.lineHeight + \"\",\n \"--lineheight-button\": theme.typography.button.lineHeight + \"\",\n \"--lineheight-small\": theme.typography.small.lineHeight + \"\",\n\n \"--color-background-primary\": theme.colors.background.primary,\n \"--color-background-secondary\": theme.colors.background.secondary,\n\n \"--color-text-primary\": theme.colors.text.primary,\n \"--color-text-secondary\": theme.colors.text.secondary,\n\n \"--color-divider-primary\": theme.colors.divider.primary,\n \"--color-divider-secondary\": theme.colors.divider.secondary,\n \"--color-divider-soft-primary\": theme.colors.divider.soft.primary,\n \"--color-divider-soft-secondary\": theme.colors.divider.soft.secondary,\n\n \"--color-brand-primary\": theme.colors.brand.primary,\n \"--color-brand-secondary\": theme.colors.brand.secondary,\n \"--color-brand-text\": theme.colors.brand.text,\n \"--color-brand-soft-primary\": theme.colors.brand.soft.primary,\n \"--color-brand-soft-secondary\": theme.colors.brand.soft.secondary,\n\n \"--color-accent-primary\": theme.colors.accent.primary,\n \"--color-accent-secondary\": theme.colors.accent.secondary,\n \"--color-accent-text\": theme.colors.accent.text,\n \"--color-accent-soft-primary\": theme.colors.accent.soft.primary,\n \"--color-accent-soft-secondary\": theme.colors.accent.soft.secondary,\n\n \"--color-info-primary\": theme.colors.info.primary,\n \"--color-info-secondary\": theme.colors.info.secondary,\n \"--color-info-text\": theme.colors.info.text,\n \"--color-info-soft-primary\": theme.colors.info.soft.primary,\n \"--color-info-soft-secondary\": theme.colors.info.soft.secondary,\n\n \"--color-success-primary\": theme.colors.success.primary,\n \"--color-success-secondary\": theme.colors.success.secondary,\n \"--color-success-text\": theme.colors.success.text,\n \"--color-success-soft-primary\": theme.colors.success.soft.primary,\n \"--color-success-soft-secondary\": theme.colors.success.soft.secondary,\n\n \"--color-warning-primary\": theme.colors.warning.primary,\n \"--color-warning-secondary\": theme.colors.warning.secondary,\n \"--color-warning-text\": theme.colors.warning.text,\n \"--color-warning-soft-primary\": theme.colors.warning.soft.primary,\n \"--color-warning-soft-secondary\": theme.colors.warning.soft.secondary,\n\n \"--color-danger-primary\": theme.colors.danger.primary,\n \"--color-danger-secondary\": theme.colors.danger.secondary,\n \"--color-danger-text\": theme.colors.danger.text,\n \"--color-danger-soft-primary\": theme.colors.danger.soft.primary,\n \"--color-danger-soft-secondary\": theme.colors.danger.soft.secondary,\n\n\n ...shadows,\n }\n}\n\n\nexport default ThemeCssVars"],"names":[],"mappings":"sEAEA,MAAM,YAAY,GAAG,CAAC,KAAmB,KAAI;IAEzC,MAAM,OAAO,GAAQ,EAAE;IACvB,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,OAAO,CAAC,CAAA,SAAA,EAAY,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;AAE5D,IAAA,OAAA,MAAA,CAAA,MAAA,CAAA,EACI,SAAS,EAAE,KAAK,CAAC,WAAW,CAAC,EAAE,EAC/B,SAAS,EAAE,KAAK,CAAC,WAAW,CAAC,EAAE,EAC/B,SAAS,EAAE,KAAK,CAAC,WAAW,CAAC,EAAE,EAC/B,SAAS,EAAE,KAAK,CAAC,WAAW,CAAC,EAAE,EAC/B,SAAS,EAAE,KAAK,CAAC,WAAW,CAAC,EAAE,EAE/B,WAAW,EAAE,CAAA,EAAG,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC,UAAU,CAAA,CAAA,EAAI,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC,QAAQ,CAAA,GAAA,EAAM,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC,UAAU,CAAA,QAAA,CAAU,EAC5H,WAAW,EAAE,CAAA,EAAG,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC,UAAU,CAAA,CAAA,EAAI,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC,QAAQ,CAAA,GAAA,EAAM,KAAK,CAAC,UAAU,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,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,EACjD,8BAA8B,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EACjE,gCAAgC,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,EAErE,wBAAwB,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,EACrD,0BAA0B,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,EACzD,qBAAqB,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAC/C,6BAA6B,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAC/D,+BAA+B,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,EAAA,EAGhE,OAAO,CAAA;AAElB"}
|
|
1
|
+
{"version":3,"file":"ThemeCssVars.js","sources":["../../src/theme/ThemeCssVars.ts"],"sourcesContent":["import { ThemeOptions } from \"./types\";\n\nconst ThemeCssVars = (theme: ThemeOptions) => {\n\n const shadows: any = {}\n theme.shadow.forEach((s, i) => shadows[`--shadow-${i}`] = s)\n\n return {\n \"--bp-xs\": theme.breakpoints.xs,\n \"--bp-sm\": theme.breakpoints.sm,\n \"--bp-md\": theme.breakpoints.md,\n \"--bp-lg\": theme.breakpoints.lg,\n \"--bp-xl\": theme.breakpoints.xl,\n\n \"--font-h1\": `${theme.typography.h1.fontWeight} ${theme.typography.h1.fontSize}px/${theme.typography.h1.lineHeight} inherit`,\n \"--font-h2\": `${theme.typography.h2.fontWeight} ${theme.typography.h2.fontSize}px/${theme.typography.h2.lineHeight} inherit`,\n \"--font-h3\": `${theme.typography.h3.fontWeight} ${theme.typography.h3.fontSize}px/${theme.typography.h3.lineHeight} inherit`,\n \"--font-h4\": `${theme.typography.h4.fontWeight} ${theme.typography.h4.fontSize}px/${theme.typography.h4.lineHeight} inherit`,\n \"--font-h5\": `${theme.typography.h5.fontWeight} ${theme.typography.h5.fontSize}px/${theme.typography.h5.lineHeight} inherit`,\n \"--font-h6\": `${theme.typography.h6.fontWeight} ${theme.typography.h6.fontSize}px/${theme.typography.h6.lineHeight} inherit`,\n \"--font-big\": `${theme.typography.big.fontWeight} ${theme.typography.text.fontSize}px/${theme.typography.text.lineHeight} inherit`,\n \"--font-text\": `${theme.typography.text.fontWeight} ${theme.typography.text.fontSize}px/${theme.typography.text.lineHeight} inherit`,\n \"--font-button\": `${theme.typography.button.fontWeight} ${theme.typography.button.fontSize}px/${theme.typography.button.lineHeight} inherit`,\n \"--font-small\": `${theme.typography.small.fontWeight} ${theme.typography.small.fontSize}px/${theme.typography.small.lineHeight} inherit`,\n\n \"--fontsize-h1\": `${theme.typography.h1.fontSize}px`,\n \"--fontsize-h2\": `${theme.typography.h2.fontSize}px`,\n \"--fontsize-h3\": `${theme.typography.h3.fontSize}px`,\n \"--fontsize-h4\": `${theme.typography.h4.fontSize}px`,\n \"--fontsize-h5\": `${theme.typography.h5.fontSize}px`,\n \"--fontsize-h6\": `${theme.typography.h6.fontSize}px`,\n \"--fontsize-big\": `${theme.typography.big.fontSize}px`,\n \"--fontsize-text\": `${theme.typography.text.fontSize}px`,\n \"--fontsize-button\": `${theme.typography.button.fontSize}px`,\n \"--fontsize-small\": `${theme.typography.small.fontSize}px`,\n\n \"--fontweight-h1\": theme.typography.h1.fontWeight + \"\",\n \"--fontweight-h2\": theme.typography.h2.fontWeight + \"\",\n \"--fontweight-h3\": theme.typography.h3.fontWeight + \"\",\n \"--fontweight-h4\": theme.typography.h4.fontWeight + \"\",\n \"--fontweight-h5\": theme.typography.h5.fontWeight + \"\",\n \"--fontweight-h6\": theme.typography.h6.fontWeight + \"\",\n \"--fontweight-big\": theme.typography.big.fontWeight + \"\",\n \"--fontweight-text\": theme.typography.text.fontWeight + \"\",\n \"--fontweight-button\": theme.typography.button.fontWeight + \"\",\n \"--fontweight-small\": theme.typography.small.fontWeight + \"\",\n\n \"--lineheight-h1\": theme.typography.h1.lineHeight + \"\",\n \"--lineheight-h2\": theme.typography.h2.lineHeight + \"\",\n \"--lineheight-h3\": theme.typography.h3.lineHeight + \"\",\n \"--lineheight-h4\": theme.typography.h4.lineHeight + \"\",\n \"--lineheight-h5\": theme.typography.h5.lineHeight + \"\",\n \"--lineheight-h6\": theme.typography.h6.lineHeight + \"\",\n \"--lineheight-big\": theme.typography.big.lineHeight + \"\",\n \"--lineheight-text\": theme.typography.text.lineHeight + \"\",\n \"--lineheight-button\": theme.typography.button.lineHeight + \"\",\n \"--lineheight-small\": theme.typography.small.lineHeight + \"\",\n\n \"--color-background-primary\": theme.colors.background.primary,\n \"--color-background-secondary\": theme.colors.background.secondary,\n\n \"--color-text-primary\": theme.colors.text.primary,\n \"--color-text-secondary\": theme.colors.text.secondary,\n\n \"--color-divider-primary\": theme.colors.divider.primary,\n \"--color-divider-secondary\": theme.colors.divider.secondary,\n \"--color-divider-soft-primary\": theme.colors.divider.soft.primary,\n \"--color-divider-soft-secondary\": theme.colors.divider.soft.secondary,\n\n \"--color-brand-primary\": theme.colors.brand.primary,\n \"--color-brand-secondary\": theme.colors.brand.secondary,\n \"--color-brand-text\": theme.colors.brand.text,\n \"--color-brand-soft-primary\": theme.colors.brand.soft.primary,\n \"--color-brand-soft-secondary\": theme.colors.brand.soft.secondary,\n\n \"--color-accent-primary\": theme.colors.accent.primary,\n \"--color-accent-secondary\": theme.colors.accent.secondary,\n \"--color-accent-text\": theme.colors.accent.text,\n \"--color-accent-soft-primary\": theme.colors.accent.soft.primary,\n \"--color-accent-soft-secondary\": theme.colors.accent.soft.secondary,\n\n \"--color-info-primary\": theme.colors.info.primary,\n \"--color-info-secondary\": theme.colors.info.secondary,\n \"--color-info-text\": theme.colors.info.text,\n \"--color-info-soft-primary\": theme.colors.info.soft.primary,\n \"--color-info-soft-secondary\": theme.colors.info.soft.secondary,\n\n \"--color-success-primary\": theme.colors.success.primary,\n \"--color-success-secondary\": theme.colors.success.secondary,\n \"--color-success-text\": theme.colors.success.text,\n \"--color-success-soft-primary\": theme.colors.success.soft.primary,\n \"--color-success-soft-secondary\": theme.colors.success.soft.secondary,\n\n \"--color-warning-primary\": theme.colors.warning.primary,\n \"--color-warning-secondary\": theme.colors.warning.secondary,\n \"--color-warning-text\": theme.colors.warning.text,\n \"--color-warning-soft-primary\": theme.colors.warning.soft.primary,\n \"--color-warning-soft-secondary\": theme.colors.warning.soft.secondary,\n\n \"--color-danger-primary\": theme.colors.danger.primary,\n \"--color-danger-secondary\": theme.colors.danger.secondary,\n \"--color-danger-text\": theme.colors.danger.text,\n \"--color-danger-soft-primary\": theme.colors.danger.soft.primary,\n \"--color-danger-soft-secondary\": theme.colors.danger.soft.secondary,\n\n\n ...shadows,\n }\n}\n\n\nexport default ThemeCssVars"],"names":[],"mappings":";;AAEA,MAAM,YAAY,GAAG,CAAC,KAAmB,KAAI;IAEzC,MAAM,OAAO,GAAQ,EAAE;IACvB,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,OAAO,CAAC,CAAA,SAAA,EAAY,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;AAE5D,IAAA,OAAA,MAAA,CAAA,MAAA,CAAA,EACI,SAAS,EAAE,KAAK,CAAC,WAAW,CAAC,EAAE,EAC/B,SAAS,EAAE,KAAK,CAAC,WAAW,CAAC,EAAE,EAC/B,SAAS,EAAE,KAAK,CAAC,WAAW,CAAC,EAAE,EAC/B,SAAS,EAAE,KAAK,CAAC,WAAW,CAAC,EAAE,EAC/B,SAAS,EAAE,KAAK,CAAC,WAAW,CAAC,EAAE,EAE/B,WAAW,EAAE,CAAA,EAAG,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC,UAAU,CAAA,CAAA,EAAI,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC,QAAQ,CAAA,GAAA,EAAM,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC,UAAU,CAAA,QAAA,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,CAAC,IAAI,CAAC,SAAS,EAErE,yBAAyB,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,EACvD,2BAA2B,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,EAC3D,sBAAsB,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,EACjD,8BAA8B,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EACjE,gCAAgC,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,EAErE,wBAAwB,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,EACrD,0BAA0B,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,EACzD,qBAAqB,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAC/C,6BAA6B,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAC/D,+BAA+B,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,EAAA,EAGhE,OAAO,CAAA;AAElB;;;;"}
|
package/theme/ThemeCssVars.mjs
CHANGED
|
@@ -2,4 +2,7 @@ const ThemeCssVars = (theme) => {
|
|
|
2
2
|
const shadows = {};
|
|
3
3
|
theme.shadow.forEach((s, i) => shadows[`--shadow-${i}`] = s);
|
|
4
4
|
return Object.assign({ "--bp-xs": theme.breakpoints.xs, "--bp-sm": theme.breakpoints.sm, "--bp-md": theme.breakpoints.md, "--bp-lg": theme.breakpoints.lg, "--bp-xl": theme.breakpoints.xl, "--font-h1": `${theme.typography.h1.fontWeight} ${theme.typography.h1.fontSize}px/${theme.typography.h1.lineHeight} inherit`, "--font-h2": `${theme.typography.h2.fontWeight} ${theme.typography.h2.fontSize}px/${theme.typography.h2.lineHeight} inherit`, "--font-h3": `${theme.typography.h3.fontWeight} ${theme.typography.h3.fontSize}px/${theme.typography.h3.lineHeight} inherit`, "--font-h4": `${theme.typography.h4.fontWeight} ${theme.typography.h4.fontSize}px/${theme.typography.h4.lineHeight} inherit`, "--font-h5": `${theme.typography.h5.fontWeight} ${theme.typography.h5.fontSize}px/${theme.typography.h5.lineHeight} inherit`, "--font-h6": `${theme.typography.h6.fontWeight} ${theme.typography.h6.fontSize}px/${theme.typography.h6.lineHeight} inherit`, "--font-big": `${theme.typography.big.fontWeight} ${theme.typography.text.fontSize}px/${theme.typography.text.lineHeight} inherit`, "--font-text": `${theme.typography.text.fontWeight} ${theme.typography.text.fontSize}px/${theme.typography.text.lineHeight} inherit`, "--font-button": `${theme.typography.button.fontWeight} ${theme.typography.button.fontSize}px/${theme.typography.button.lineHeight} inherit`, "--font-small": `${theme.typography.small.fontWeight} ${theme.typography.small.fontSize}px/${theme.typography.small.lineHeight} inherit`, "--fontsize-h1": `${theme.typography.h1.fontSize}px`, "--fontsize-h2": `${theme.typography.h2.fontSize}px`, "--fontsize-h3": `${theme.typography.h3.fontSize}px`, "--fontsize-h4": `${theme.typography.h4.fontSize}px`, "--fontsize-h5": `${theme.typography.h5.fontSize}px`, "--fontsize-h6": `${theme.typography.h6.fontSize}px`, "--fontsize-big": `${theme.typography.big.fontSize}px`, "--fontsize-text": `${theme.typography.text.fontSize}px`, "--fontsize-button": `${theme.typography.button.fontSize}px`, "--fontsize-small": `${theme.typography.small.fontSize}px`, "--fontweight-h1": theme.typography.h1.fontWeight + "", "--fontweight-h2": theme.typography.h2.fontWeight + "", "--fontweight-h3": theme.typography.h3.fontWeight + "", "--fontweight-h4": theme.typography.h4.fontWeight + "", "--fontweight-h5": theme.typography.h5.fontWeight + "", "--fontweight-h6": theme.typography.h6.fontWeight + "", "--fontweight-big": theme.typography.big.fontWeight + "", "--fontweight-text": theme.typography.text.fontWeight + "", "--fontweight-button": theme.typography.button.fontWeight + "", "--fontweight-small": theme.typography.small.fontWeight + "", "--lineheight-h1": theme.typography.h1.lineHeight + "", "--lineheight-h2": theme.typography.h2.lineHeight + "", "--lineheight-h3": theme.typography.h3.lineHeight + "", "--lineheight-h4": theme.typography.h4.lineHeight + "", "--lineheight-h5": theme.typography.h5.lineHeight + "", "--lineheight-h6": theme.typography.h6.lineHeight + "", "--lineheight-big": theme.typography.big.lineHeight + "", "--lineheight-text": theme.typography.text.lineHeight + "", "--lineheight-button": theme.typography.button.lineHeight + "", "--lineheight-small": theme.typography.small.lineHeight + "", "--color-background-primary": theme.colors.background.primary, "--color-background-secondary": theme.colors.background.secondary, "--color-text-primary": theme.colors.text.primary, "--color-text-secondary": theme.colors.text.secondary, "--color-divider-primary": theme.colors.divider.primary, "--color-divider-secondary": theme.colors.divider.secondary, "--color-divider-soft-primary": theme.colors.divider.soft.primary, "--color-divider-soft-secondary": theme.colors.divider.soft.secondary, "--color-brand-primary": theme.colors.brand.primary, "--color-brand-secondary": theme.colors.brand.secondary, "--color-brand-text": theme.colors.brand.text, "--color-brand-soft-primary": theme.colors.brand.soft.primary, "--color-brand-soft-secondary": theme.colors.brand.soft.secondary, "--color-accent-primary": theme.colors.accent.primary, "--color-accent-secondary": theme.colors.accent.secondary, "--color-accent-text": theme.colors.accent.text, "--color-accent-soft-primary": theme.colors.accent.soft.primary, "--color-accent-soft-secondary": theme.colors.accent.soft.secondary, "--color-info-primary": theme.colors.info.primary, "--color-info-secondary": theme.colors.info.secondary, "--color-info-text": theme.colors.info.text, "--color-info-soft-primary": theme.colors.info.soft.primary, "--color-info-soft-secondary": theme.colors.info.soft.secondary, "--color-success-primary": theme.colors.success.primary, "--color-success-secondary": theme.colors.success.secondary, "--color-success-text": theme.colors.success.text, "--color-success-soft-primary": theme.colors.success.soft.primary, "--color-success-soft-secondary": theme.colors.success.soft.secondary, "--color-warning-primary": theme.colors.warning.primary, "--color-warning-secondary": theme.colors.warning.secondary, "--color-warning-text": theme.colors.warning.text, "--color-warning-soft-primary": theme.colors.warning.soft.primary, "--color-warning-soft-secondary": theme.colors.warning.soft.secondary, "--color-danger-primary": theme.colors.danger.primary, "--color-danger-secondary": theme.colors.danger.secondary, "--color-danger-text": theme.colors.danger.text, "--color-danger-soft-primary": theme.colors.danger.soft.primary, "--color-danger-soft-secondary": theme.colors.danger.soft.secondary }, shadows);
|
|
5
|
-
};
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export { ThemeCssVars as default };
|
|
8
|
+
//# sourceMappingURL=ThemeCssVars.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeCssVars.mjs","sources":["../../src/theme/ThemeCssVars.ts"],"sourcesContent":["import { ThemeOptions } from \"./types\";\n\nconst ThemeCssVars = (theme: ThemeOptions) => {\n\n const shadows: any = {}\n theme.shadow.forEach((s, i) => shadows[`--shadow-${i}`] = s)\n\n return {\n \"--bp-xs\": theme.breakpoints.xs,\n \"--bp-sm\": theme.breakpoints.sm,\n \"--bp-md\": theme.breakpoints.md,\n \"--bp-lg\": theme.breakpoints.lg,\n \"--bp-xl\": theme.breakpoints.xl,\n\n \"--font-h1\": `${theme.typography.h1.fontWeight} ${theme.typography.h1.fontSize}px/${theme.typography.h1.lineHeight} inherit`,\n \"--font-h2\": `${theme.typography.h2.fontWeight} ${theme.typography.h2.fontSize}px/${theme.typography.h2.lineHeight} inherit`,\n \"--font-h3\": `${theme.typography.h3.fontWeight} ${theme.typography.h3.fontSize}px/${theme.typography.h3.lineHeight} inherit`,\n \"--font-h4\": `${theme.typography.h4.fontWeight} ${theme.typography.h4.fontSize}px/${theme.typography.h4.lineHeight} inherit`,\n \"--font-h5\": `${theme.typography.h5.fontWeight} ${theme.typography.h5.fontSize}px/${theme.typography.h5.lineHeight} inherit`,\n \"--font-h6\": `${theme.typography.h6.fontWeight} ${theme.typography.h6.fontSize}px/${theme.typography.h6.lineHeight} inherit`,\n \"--font-big\": `${theme.typography.big.fontWeight} ${theme.typography.text.fontSize}px/${theme.typography.text.lineHeight} inherit`,\n \"--font-text\": `${theme.typography.text.fontWeight} ${theme.typography.text.fontSize}px/${theme.typography.text.lineHeight} inherit`,\n \"--font-button\": `${theme.typography.button.fontWeight} ${theme.typography.button.fontSize}px/${theme.typography.button.lineHeight} inherit`,\n \"--font-small\": `${theme.typography.small.fontWeight} ${theme.typography.small.fontSize}px/${theme.typography.small.lineHeight} inherit`,\n\n \"--fontsize-h1\": `${theme.typography.h1.fontSize}px`,\n \"--fontsize-h2\": `${theme.typography.h2.fontSize}px`,\n \"--fontsize-h3\": `${theme.typography.h3.fontSize}px`,\n \"--fontsize-h4\": `${theme.typography.h4.fontSize}px`,\n \"--fontsize-h5\": `${theme.typography.h5.fontSize}px`,\n \"--fontsize-h6\": `${theme.typography.h6.fontSize}px`,\n \"--fontsize-big\": `${theme.typography.big.fontSize}px`,\n \"--fontsize-text\": `${theme.typography.text.fontSize}px`,\n \"--fontsize-button\": `${theme.typography.button.fontSize}px`,\n \"--fontsize-small\": `${theme.typography.small.fontSize}px`,\n\n \"--fontweight-h1\": theme.typography.h1.fontWeight + \"\",\n \"--fontweight-h2\": theme.typography.h2.fontWeight + \"\",\n \"--fontweight-h3\": theme.typography.h3.fontWeight + \"\",\n \"--fontweight-h4\": theme.typography.h4.fontWeight + \"\",\n \"--fontweight-h5\": theme.typography.h5.fontWeight + \"\",\n \"--fontweight-h6\": theme.typography.h6.fontWeight + \"\",\n \"--fontweight-big\": theme.typography.big.fontWeight + \"\",\n \"--fontweight-text\": theme.typography.text.fontWeight + \"\",\n \"--fontweight-button\": theme.typography.button.fontWeight + \"\",\n \"--fontweight-small\": theme.typography.small.fontWeight + \"\",\n\n \"--lineheight-h1\": theme.typography.h1.lineHeight + \"\",\n \"--lineheight-h2\": theme.typography.h2.lineHeight + \"\",\n \"--lineheight-h3\": theme.typography.h3.lineHeight + \"\",\n \"--lineheight-h4\": theme.typography.h4.lineHeight + \"\",\n \"--lineheight-h5\": theme.typography.h5.lineHeight + \"\",\n \"--lineheight-h6\": theme.typography.h6.lineHeight + \"\",\n \"--lineheight-big\": theme.typography.big.lineHeight + \"\",\n \"--lineheight-text\": theme.typography.text.lineHeight + \"\",\n \"--lineheight-button\": theme.typography.button.lineHeight + \"\",\n \"--lineheight-small\": theme.typography.small.lineHeight + \"\",\n\n \"--color-background-primary\": theme.colors.background.primary,\n \"--color-background-secondary\": theme.colors.background.secondary,\n\n \"--color-text-primary\": theme.colors.text.primary,\n \"--color-text-secondary\": theme.colors.text.secondary,\n\n \"--color-divider-primary\": theme.colors.divider.primary,\n \"--color-divider-secondary\": theme.colors.divider.secondary,\n \"--color-divider-soft-primary\": theme.colors.divider.soft.primary,\n \"--color-divider-soft-secondary\": theme.colors.divider.soft.secondary,\n\n \"--color-brand-primary\": theme.colors.brand.primary,\n \"--color-brand-secondary\": theme.colors.brand.secondary,\n \"--color-brand-text\": theme.colors.brand.text,\n \"--color-brand-soft-primary\": theme.colors.brand.soft.primary,\n \"--color-brand-soft-secondary\": theme.colors.brand.soft.secondary,\n\n \"--color-accent-primary\": theme.colors.accent.primary,\n \"--color-accent-secondary\": theme.colors.accent.secondary,\n \"--color-accent-text\": theme.colors.accent.text,\n \"--color-accent-soft-primary\": theme.colors.accent.soft.primary,\n \"--color-accent-soft-secondary\": theme.colors.accent.soft.secondary,\n\n \"--color-info-primary\": theme.colors.info.primary,\n \"--color-info-secondary\": theme.colors.info.secondary,\n \"--color-info-text\": theme.colors.info.text,\n \"--color-info-soft-primary\": theme.colors.info.soft.primary,\n \"--color-info-soft-secondary\": theme.colors.info.soft.secondary,\n\n \"--color-success-primary\": theme.colors.success.primary,\n \"--color-success-secondary\": theme.colors.success.secondary,\n \"--color-success-text\": theme.colors.success.text,\n \"--color-success-soft-primary\": theme.colors.success.soft.primary,\n \"--color-success-soft-secondary\": theme.colors.success.soft.secondary,\n\n \"--color-warning-primary\": theme.colors.warning.primary,\n \"--color-warning-secondary\": theme.colors.warning.secondary,\n \"--color-warning-text\": theme.colors.warning.text,\n \"--color-warning-soft-primary\": theme.colors.warning.soft.primary,\n \"--color-warning-soft-secondary\": theme.colors.warning.soft.secondary,\n\n \"--color-danger-primary\": theme.colors.danger.primary,\n \"--color-danger-secondary\": theme.colors.danger.secondary,\n \"--color-danger-text\": theme.colors.danger.text,\n \"--color-danger-soft-primary\": theme.colors.danger.soft.primary,\n \"--color-danger-soft-secondary\": theme.colors.danger.soft.secondary,\n\n\n ...shadows,\n }\n}\n\n\nexport default ThemeCssVars"],"names":[],"mappings":"AAEA,MAAM,YAAY,GAAG,CAAC,KAAmB,KAAI;IAEzC,MAAM,OAAO,GAAQ,EAAE;IACvB,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,OAAO,CAAC,CAAA,SAAA,EAAY,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;AAE5D,IAAA,OAAA,MAAA,CAAA,MAAA,CAAA,EACI,SAAS,EAAE,KAAK,CAAC,WAAW,CAAC,EAAE,EAC/B,SAAS,EAAE,KAAK,CAAC,WAAW,CAAC,EAAE,EAC/B,SAAS,EAAE,KAAK,CAAC,WAAW,CAAC,EAAE,EAC/B,SAAS,EAAE,KAAK,CAAC,WAAW,CAAC,EAAE,EAC/B,SAAS,EAAE,KAAK,CAAC,WAAW,CAAC,EAAE,EAE/B,WAAW,EAAE,CAAA,EAAG,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC,UAAU,CAAA,CAAA,EAAI,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC,QAAQ,CAAA,GAAA,EAAM,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC,UAAU,CAAA,QAAA,CAAU,EAC5H,WAAW,EAAE,CAAA,EAAG,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC,UAAU,CAAA,CAAA,EAAI,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC,QAAQ,CAAA,GAAA,EAAM,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC,UAAU,CAAA,QAAA,CAAU,EAC5H,WAAW,EAAE,CAAA,EAAG,KAAK,CAAC,UAAU,CAAC,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I,CAAC,OAAO,EACjE,gCAAgC,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,EAErE,wBAAwB,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,EACrD,0BAA0B,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,EACzD,qBAAqB,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAC/C,6BAA6B,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAC/D,+BAA+B,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,EAAA,EAGhE,OAAO,CAAA;AAElB"}
|
|
1
|
+
{"version":3,"file":"ThemeCssVars.mjs","sources":["../../src/theme/ThemeCssVars.ts"],"sourcesContent":["import { ThemeOptions } from \"./types\";\n\nconst ThemeCssVars = (theme: ThemeOptions) => {\n\n const shadows: any = {}\n theme.shadow.forEach((s, i) => shadows[`--shadow-${i}`] = s)\n\n return {\n \"--bp-xs\": theme.breakpoints.xs,\n \"--bp-sm\": theme.breakpoints.sm,\n \"--bp-md\": theme.breakpoints.md,\n \"--bp-lg\": theme.breakpoints.lg,\n \"--bp-xl\": theme.breakpoints.xl,\n\n \"--font-h1\": `${theme.typography.h1.fontWeight} ${theme.typography.h1.fontSize}px/${theme.typography.h1.lineHeight} inherit`,\n \"--font-h2\": `${theme.typography.h2.fontWeight} ${theme.typography.h2.fontSize}px/${theme.typography.h2.lineHeight} inherit`,\n \"--font-h3\": `${theme.typography.h3.fontWeight} ${theme.typography.h3.fontSize}px/${theme.typography.h3.lineHeight} inherit`,\n \"--font-h4\": `${theme.typography.h4.fontWeight} ${theme.typography.h4.fontSize}px/${theme.typography.h4.lineHeight} inherit`,\n \"--font-h5\": `${theme.typography.h5.fontWeight} ${theme.typography.h5.fontSize}px/${theme.typography.h5.lineHeight} inherit`,\n \"--font-h6\": `${theme.typography.h6.fontWeight} ${theme.typography.h6.fontSize}px/${theme.typography.h6.lineHeight} inherit`,\n \"--font-big\": `${theme.typography.big.fontWeight} ${theme.typography.text.fontSize}px/${theme.typography.text.lineHeight} inherit`,\n \"--font-text\": `${theme.typography.text.fontWeight} ${theme.typography.text.fontSize}px/${theme.typography.text.lineHeight} inherit`,\n \"--font-button\": `${theme.typography.button.fontWeight} ${theme.typography.button.fontSize}px/${theme.typography.button.lineHeight} inherit`,\n \"--font-small\": `${theme.typography.small.fontWeight} ${theme.typography.small.fontSize}px/${theme.typography.small.lineHeight} inherit`,\n\n \"--fontsize-h1\": `${theme.typography.h1.fontSize}px`,\n \"--fontsize-h2\": `${theme.typography.h2.fontSize}px`,\n \"--fontsize-h3\": `${theme.typography.h3.fontSize}px`,\n \"--fontsize-h4\": `${theme.typography.h4.fontSize}px`,\n \"--fontsize-h5\": `${theme.typography.h5.fontSize}px`,\n \"--fontsize-h6\": `${theme.typography.h6.fontSize}px`,\n \"--fontsize-big\": `${theme.typography.big.fontSize}px`,\n \"--fontsize-text\": `${theme.typography.text.fontSize}px`,\n \"--fontsize-button\": `${theme.typography.button.fontSize}px`,\n \"--fontsize-small\": `${theme.typography.small.fontSize}px`,\n\n \"--fontweight-h1\": theme.typography.h1.fontWeight + \"\",\n \"--fontweight-h2\": theme.typography.h2.fontWeight + \"\",\n \"--fontweight-h3\": theme.typography.h3.fontWeight + \"\",\n \"--fontweight-h4\": theme.typography.h4.fontWeight + \"\",\n \"--fontweight-h5\": theme.typography.h5.fontWeight + \"\",\n \"--fontweight-h6\": theme.typography.h6.fontWeight + \"\",\n \"--fontweight-big\": theme.typography.big.fontWeight + \"\",\n \"--fontweight-text\": theme.typography.text.fontWeight + \"\",\n \"--fontweight-button\": theme.typography.button.fontWeight + \"\",\n \"--fontweight-small\": theme.typography.small.fontWeight + \"\",\n\n \"--lineheight-h1\": theme.typography.h1.lineHeight + \"\",\n \"--lineheight-h2\": theme.typography.h2.lineHeight + \"\",\n \"--lineheight-h3\": theme.typography.h3.lineHeight + \"\",\n \"--lineheight-h4\": theme.typography.h4.lineHeight + \"\",\n \"--lineheight-h5\": theme.typography.h5.lineHeight + \"\",\n \"--lineheight-h6\": theme.typography.h6.lineHeight + \"\",\n \"--lineheight-big\": theme.typography.big.lineHeight + \"\",\n \"--lineheight-text\": theme.typography.text.lineHeight + \"\",\n \"--lineheight-button\": theme.typography.button.lineHeight + \"\",\n \"--lineheight-small\": theme.typography.small.lineHeight + \"\",\n\n \"--color-background-primary\": theme.colors.background.primary,\n \"--color-background-secondary\": theme.colors.background.secondary,\n\n \"--color-text-primary\": theme.colors.text.primary,\n \"--color-text-secondary\": theme.colors.text.secondary,\n\n \"--color-divider-primary\": theme.colors.divider.primary,\n \"--color-divider-secondary\": theme.colors.divider.secondary,\n \"--color-divider-soft-primary\": theme.colors.divider.soft.primary,\n \"--color-divider-soft-secondary\": theme.colors.divider.soft.secondary,\n\n \"--color-brand-primary\": theme.colors.brand.primary,\n \"--color-brand-secondary\": theme.colors.brand.secondary,\n \"--color-brand-text\": theme.colors.brand.text,\n \"--color-brand-soft-primary\": theme.colors.brand.soft.primary,\n \"--color-brand-soft-secondary\": theme.colors.brand.soft.secondary,\n\n \"--color-accent-primary\": theme.colors.accent.primary,\n \"--color-accent-secondary\": theme.colors.accent.secondary,\n \"--color-accent-text\": theme.colors.accent.text,\n \"--color-accent-soft-primary\": theme.colors.accent.soft.primary,\n \"--color-accent-soft-secondary\": theme.colors.accent.soft.secondary,\n\n \"--color-info-primary\": theme.colors.info.primary,\n \"--color-info-secondary\": theme.colors.info.secondary,\n \"--color-info-text\": theme.colors.info.text,\n \"--color-info-soft-primary\": theme.colors.info.soft.primary,\n \"--color-info-soft-secondary\": theme.colors.info.soft.secondary,\n\n \"--color-success-primary\": theme.colors.success.primary,\n \"--color-success-secondary\": theme.colors.success.secondary,\n \"--color-success-text\": theme.colors.success.text,\n \"--color-success-soft-primary\": theme.colors.success.soft.primary,\n \"--color-success-soft-secondary\": theme.colors.success.soft.secondary,\n\n \"--color-warning-primary\": theme.colors.warning.primary,\n \"--color-warning-secondary\": theme.colors.warning.secondary,\n \"--color-warning-text\": theme.colors.warning.text,\n \"--color-warning-soft-primary\": theme.colors.warning.soft.primary,\n \"--color-warning-soft-secondary\": theme.colors.warning.soft.secondary,\n\n \"--color-danger-primary\": theme.colors.danger.primary,\n \"--color-danger-secondary\": theme.colors.danger.secondary,\n \"--color-danger-text\": theme.colors.danger.text,\n \"--color-danger-soft-primary\": theme.colors.danger.soft.primary,\n \"--color-danger-soft-secondary\": theme.colors.danger.soft.secondary,\n\n\n ...shadows,\n }\n}\n\n\nexport default ThemeCssVars"],"names":[],"mappings":"AAEA,MAAM,YAAY,GAAG,CAAC,KAAmB,KAAI;IAEzC,MAAM,OAAO,GAAQ,EAAE;IACvB,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,OAAO,CAAC,CAAA,SAAA,EAAY,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;AAE5D,IAAA,OAAA,MAAA,CAAA,MAAA,CAAA,EACI,SAAS,EAAE,KAAK,CAAC,WAAW,CAAC,EAAE,EAC/B,SAAS,EAAE,KAAK,CAAC,WAAW,CAAC,EAAE,EAC/B,SAAS,EAAE,KAAK,CAAC,WAAW,CAAC,EAAE,EAC/B,SAAS,EAAE,KAAK,CAAC,WAAW,CAAC,EAAE,EAC/B,SAAS,EAAE,KAAK,CAAC,WAAW,CAAC,EAAE,EAE/B,WAAW,EAAE,CAAA,EAAG,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC,UAAU,CAAA,CAAA,EAAI,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC,QAAQ,CAAA,GAAA,EAAM,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC,UAAU,CAAA,QAAA,CAAU,EAC5H,WAAW,EAAE,CAAA,EAAG,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC,UAAU,CAAA,CAAA,EAAI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AA2B,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,EAC3D,sBAAsB,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,EACjD,8BAA8B,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EACjE,gCAAgC,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,EAErE,wBAAwB,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,EACrD,0BAA0B,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,EACzD,qBAAqB,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAC/C,6BAA6B,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAC/D,+BAA+B,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,EAAA,EAGhE,OAAO,CAAA;AAElB;;;;"}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var createTheme = require('./createTheme.js');
|
|
4
|
+
|
|
5
|
+
const lightShadows = [
|
|
2
6
|
"none",
|
|
3
7
|
"0px 2px 1px -1px rgba(0,0,0,0.2),0px 1px 1px 0px rgba(0,0,0,0.14),0px 1px 3px 0px rgba(0,0,0,0.12)",
|
|
4
8
|
"0px 3px 1px -2px rgba(0,0,0,0.2),0px 2px 2px 0px rgba(0,0,0,0.14),0px 1px 5px 0px rgba(0,0,0,0.12)",
|
|
@@ -27,30 +31,29 @@
|
|
|
27
31
|
];
|
|
28
32
|
const darkShadows = [
|
|
29
33
|
"none",
|
|
30
|
-
"0px
|
|
31
|
-
"0px 3px
|
|
32
|
-
"0px
|
|
33
|
-
"0px
|
|
34
|
-
"0px
|
|
35
|
-
"0px
|
|
36
|
-
"0px
|
|
37
|
-
"0px
|
|
38
|
-
"0px
|
|
39
|
-
"0px
|
|
40
|
-
"0px
|
|
41
|
-
"0px
|
|
42
|
-
"0px
|
|
43
|
-
"0px
|
|
44
|
-
"0px
|
|
45
|
-
"0px
|
|
46
|
-
"0px
|
|
47
|
-
"0px
|
|
48
|
-
"0px
|
|
49
|
-
"0px
|
|
50
|
-
"0px
|
|
51
|
-
"0px
|
|
52
|
-
"0px
|
|
53
|
-
"0px 11px 15px -7px rgba(255,255,255,0.05),0px 24px 38px 3px rgba(255,255,255,0.04),0px 9px 46px 8px rgba(255,255,255,0.03)",
|
|
34
|
+
"0px 1px 2px rgba(0,0,0,0.65), inset 0px 1px 0px rgba(255,255,255,0.04)",
|
|
35
|
+
"0px 2px 3px rgba(0,0,0,0.68), inset 0px 1px 0px rgba(255,255,255,0.04)",
|
|
36
|
+
"0px 2px 4px rgba(0,0,0,0.7), inset 0px 1px 0px rgba(255,255,255,0.05)",
|
|
37
|
+
"0px 3px 5px rgba(0,0,0,0.72), inset 0px 1px 0px rgba(255,255,255,0.05)",
|
|
38
|
+
"0px 4px 6px rgba(0,0,0,0.75), inset 0px 1px 0px rgba(255,255,255,0.05)",
|
|
39
|
+
"0px 5px 8px rgba(0,0,0,0.78), inset 0px 1px 0px rgba(255,255,255,0.06)",
|
|
40
|
+
"0px 6px 10px rgba(0,0,0,0.8), inset 0px 1px 0px rgba(255,255,255,0.06)",
|
|
41
|
+
"0px 7px 12px rgba(0,0,0,0.82), inset 0px 1px 0px rgba(255,255,255,0.06)",
|
|
42
|
+
"0px 8px 14px rgba(0,0,0,0.84), inset 0px 1px 0px rgba(255,255,255,0.06)",
|
|
43
|
+
"0px 9px 16px rgba(0,0,0,0.86), inset 0px 1px 0px rgba(255,255,255,0.07)",
|
|
44
|
+
"0px 10px 18px rgba(0,0,0,0.88), inset 0px 1px 0px rgba(255,255,255,0.07)",
|
|
45
|
+
"0px 11px 20px rgba(0,0,0,0.89), inset 0px 1px 0px rgba(255,255,255,0.07)",
|
|
46
|
+
"0px 12px 22px rgba(0,0,0,0.9), inset 0px 1px 0px rgba(255,255,255,0.07)",
|
|
47
|
+
"0px 13px 24px rgba(0,0,0,0.91), inset 0px 1px 0px rgba(255,255,255,0.07)",
|
|
48
|
+
"0px 14px 26px rgba(0,0,0,0.92), inset 0px 1px 0px rgba(255,255,255,0.08)",
|
|
49
|
+
"0px 15px 28px rgba(0,0,0,0.93), inset 0px 1px 0px rgba(255,255,255,0.08)",
|
|
50
|
+
"0px 16px 30px rgba(0,0,0,0.94), inset 0px 1px 0px rgba(255,255,255,0.08)",
|
|
51
|
+
"0px 18px 32px rgba(0,0,0,0.95), inset 0px 1px 0px rgba(255,255,255,0.08)",
|
|
52
|
+
"0px 20px 34px rgba(0,0,0,0.95), inset 0px 1px 0px rgba(255,255,255,0.08)",
|
|
53
|
+
"0px 22px 36px rgba(0,0,0,0.96), inset 0px 1px 0px rgba(255,255,255,0.08)",
|
|
54
|
+
"0px 24px 38px rgba(0,0,0,0.97), inset 0px 1px 0px rgba(255,255,255,0.09)",
|
|
55
|
+
"0px 26px 40px rgba(0,0,0,0.98), inset 0px 1px 0px rgba(255,255,255,0.09)",
|
|
56
|
+
"0px 28px 42px rgba(0,0,0,0.99), inset 0px 1px 0px rgba(255,255,255,0.1)",
|
|
54
57
|
];
|
|
55
58
|
const ThemeTypography = {
|
|
56
59
|
h1: { fontSize: 48, lineHeight: 1.3, fontWeight: 600 }, // bolder for emphasis
|
|
@@ -134,35 +137,42 @@ const createDefaultThemes = () => {
|
|
|
134
137
|
secondary: "#9CA3AF", // muted / secondary text
|
|
135
138
|
},
|
|
136
139
|
brand: {
|
|
137
|
-
primary: "#
|
|
138
|
-
secondary: "#
|
|
139
|
-
text: "#
|
|
140
|
+
primary: "#3F5AE0",
|
|
141
|
+
secondary: "#5F78F0",
|
|
142
|
+
text: "#0B1220",
|
|
140
143
|
},
|
|
141
144
|
accent: {
|
|
142
|
-
primary: "#
|
|
143
|
-
secondary: "#
|
|
144
|
-
text: "#
|
|
145
|
+
primary: "#6B4FE8",
|
|
146
|
+
secondary: "#856FF2",
|
|
147
|
+
text: "#0C0824",
|
|
145
148
|
},
|
|
146
149
|
success: {
|
|
147
|
-
primary: "#
|
|
148
|
-
secondary: "#
|
|
149
|
-
text: "#
|
|
150
|
+
primary: "#22985A",
|
|
151
|
+
secondary: "#3AB97C",
|
|
152
|
+
text: "#052A18",
|
|
150
153
|
},
|
|
151
154
|
info: {
|
|
152
|
-
primary: "#
|
|
153
|
-
secondary: "#
|
|
154
|
-
text: "#
|
|
155
|
+
primary: "#3F70E0",
|
|
156
|
+
secondary: "#5F8CE8",
|
|
157
|
+
text: "#0A1024",
|
|
155
158
|
},
|
|
156
159
|
warning: {
|
|
157
|
-
primary: "#
|
|
158
|
-
secondary: "#
|
|
159
|
-
text: "#
|
|
160
|
+
primary: "#B7832B",
|
|
161
|
+
secondary: "#D09B45",
|
|
162
|
+
text: "#1F1304",
|
|
160
163
|
},
|
|
161
164
|
danger: {
|
|
162
|
-
primary: "#
|
|
163
|
-
secondary: "#
|
|
164
|
-
text: "#
|
|
165
|
+
primary: "#C44040",
|
|
166
|
+
secondary: "#DE6161",
|
|
167
|
+
text: "#2A0808",
|
|
165
168
|
},
|
|
166
169
|
}
|
|
167
170
|
});
|
|
168
|
-
};
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
exports.ThemeTypography = ThemeTypography;
|
|
174
|
+
exports.createDefaultThemes = createDefaultThemes;
|
|
175
|
+
exports.darkShadows = darkShadows;
|
|
176
|
+
exports.lightShadows = lightShadows;
|
|
177
|
+
exports.lightThemeOptions = lightThemeOptions;
|
|
178
|
+
//# sourceMappingURL=ThemeDefaultOptions.js.map
|