@xanui/core 1.2.50 → 1.2.51

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.
Files changed (79) hide show
  1. package/AppRoot/AppRootProvider.cjs.map +1 -1
  2. package/AppRoot/AppRootProvider.js.map +1 -1
  3. package/AppRoot/Renderar.cjs.map +1 -1
  4. package/AppRoot/Renderar.js.map +1 -1
  5. package/AppRoot/index.cjs +4 -2
  6. package/AppRoot/index.cjs.map +1 -1
  7. package/AppRoot/index.js +4 -2
  8. package/AppRoot/index.js.map +1 -1
  9. package/Document/index.cjs +4 -10
  10. package/Document/index.cjs.map +1 -1
  11. package/Document/index.d.ts +1 -1
  12. package/Document/index.js +4 -10
  13. package/Document/index.js.map +1 -1
  14. package/Iframe/index.cjs.map +1 -1
  15. package/Iframe/index.js.map +1 -1
  16. package/Tag/ServerStyleTag.cjs.map +1 -1
  17. package/Tag/ServerStyleTag.js.map +1 -1
  18. package/Tag/cssPropList.cjs.map +1 -1
  19. package/Tag/cssPropList.js.map +1 -1
  20. package/Tag/index.cjs.map +1 -1
  21. package/Tag/index.js.map +1 -1
  22. package/Tag/useTagProps.cjs.map +1 -1
  23. package/Tag/useTagProps.js.map +1 -1
  24. package/Transition/index.cjs.map +1 -1
  25. package/Transition/index.js.map +1 -1
  26. package/breakpoint/BreakpointProvider.cjs +1 -1
  27. package/breakpoint/BreakpointProvider.cjs.map +1 -1
  28. package/breakpoint/BreakpointProvider.js +1 -1
  29. package/breakpoint/BreakpointProvider.js.map +1 -1
  30. package/breakpoint/useBreakpoint.cjs.map +1 -1
  31. package/breakpoint/useBreakpoint.js.map +1 -1
  32. package/breakpoint/useBreakpointProps.cjs.map +1 -1
  33. package/breakpoint/useBreakpointProps.js.map +1 -1
  34. package/css/CSSCacheProvider.cjs.map +1 -1
  35. package/css/CSSCacheProvider.js.map +1 -1
  36. package/css/aliases.cjs.map +1 -1
  37. package/css/aliases.js.map +1 -1
  38. package/css/getProps.cjs.map +1 -1
  39. package/css/getProps.js.map +1 -1
  40. package/css/getValue.cjs.map +1 -1
  41. package/css/getValue.js.map +1 -1
  42. package/css/index.cjs.map +1 -1
  43. package/css/index.js.map +1 -1
  44. package/hooks/useAnimation.cjs +3 -2
  45. package/hooks/useAnimation.cjs.map +1 -1
  46. package/hooks/useAnimation.js +3 -2
  47. package/hooks/useAnimation.js.map +1 -1
  48. package/hooks/useColorTemplate.cjs.map +1 -1
  49. package/hooks/useColorTemplate.js.map +1 -1
  50. package/hooks/useInterface.cjs.map +1 -1
  51. package/hooks/useInterface.js.map +1 -1
  52. package/hooks/useMergeRefs.cjs.map +1 -1
  53. package/hooks/useMergeRefs.js.map +1 -1
  54. package/hooks/usePortal.cjs +3 -3
  55. package/hooks/usePortal.cjs.map +1 -1
  56. package/hooks/usePortal.js +3 -3
  57. package/hooks/usePortal.js.map +1 -1
  58. package/hooks/useTransition/index.cjs +7 -7
  59. package/hooks/useTransition/index.cjs.map +1 -1
  60. package/hooks/useTransition/index.js +7 -7
  61. package/hooks/useTransition/index.js.map +1 -1
  62. package/hooks/useTransition/variants.cjs.map +1 -1
  63. package/hooks/useTransition/variants.js.map +1 -1
  64. package/package.json +2 -2
  65. package/readme.md +109 -109
  66. package/theme/ThemeCssVars.cjs.map +1 -1
  67. package/theme/ThemeCssVars.js.map +1 -1
  68. package/theme/ThemeDefaultOptions.cjs.map +1 -1
  69. package/theme/ThemeDefaultOptions.js.map +1 -1
  70. package/theme/ThemeProvider.cjs.map +1 -1
  71. package/theme/ThemeProvider.js.map +1 -1
  72. package/theme/core.cjs.map +1 -1
  73. package/theme/core.js.map +1 -1
  74. package/theme/createTheme.cjs.map +1 -1
  75. package/theme/createTheme.js.map +1 -1
  76. package/theme/createThemeSwitcher.cjs.map +1 -1
  77. package/theme/createThemeSwitcher.js.map +1 -1
  78. package/theme/index.cjs.map +1 -1
  79. package/theme/index.js.map +1 -1
@@ -10,7 +10,7 @@ var variants = require('./variants.cjs');
10
10
  var index = require('../../Document/index.cjs');
11
11
  var CSSCacheProvider = require('../../css/CSSCacheProvider.cjs');
12
12
 
13
- const style = (obj = {}, doc, cacheId) => {
13
+ const style = (obj = {}, cacheId, doc) => {
14
14
  return index$1.css(obj, { selector: "#", container: doc, cacheId }).classname;
15
15
  };
16
16
  const getVariant = (rect, variant) => {
@@ -28,13 +28,13 @@ const useTransition = (_a) => {
28
28
  const id = "xui-transition-" + React.useId();
29
29
  const [state, setState] = React.useState({
30
30
  initial: false,
31
- classname: style({ visibility: "hidden" }, doc.document, cacheId),
31
+ classname: style({ visibility: "hidden" }, cacheId, doc === null || doc === void 0 ? void 0 : doc.document),
32
32
  variant: variant,
33
33
  rect: null,
34
34
  stage: open ? "open" : "closed",
35
35
  unmounted: false,
36
36
  });
37
- const getEle = () => doc.document.querySelector(`[data-transition="${id}"]`);
37
+ const getEle = () => doc === null || doc === void 0 ? void 0 : doc.document.querySelector(`[data-transition="${id}"]`);
38
38
  const getBoundary = () => { var _a; return state.rect || ((_a = getEle()) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) || new DOMRect(0, 0, 0, 0); };
39
39
  React.useEffect(() => {
40
40
  if (exitOnUnmount && state.stage === 'closed') {
@@ -42,7 +42,7 @@ const useTransition = (_a) => {
42
42
  setState(s => (Object.assign(Object.assign({}, s), { initial: false, classname: "", unmounted: true, variant: variant })));
43
43
  }
44
44
  else {
45
- setState(s => (Object.assign(Object.assign({}, s), { variant: variant, classname: style({ visibility: "hidden" }, doc.document, cacheId), stage: "open" })));
45
+ setState(s => (Object.assign(Object.assign({}, s), { variant: variant, classname: style({ visibility: "hidden" }, cacheId, doc === null || doc === void 0 ? void 0 : doc.document), stage: "open" })));
46
46
  }
47
47
  }
48
48
  }, [open, state.stage, exitOnUnmount, variant]);
@@ -56,7 +56,7 @@ const useTransition = (_a) => {
56
56
  const rect = getBoundary();
57
57
  let { from } = getVariant(rect, state.variant);
58
58
  if (open && !state.initial) {
59
- setState(s => (Object.assign(Object.assign({}, s), { classname: (!disableInitialTransition || state.unmounted) ? style(from, doc.document, cacheId) : "", initial: true, rect: rect })));
59
+ setState(s => (Object.assign(Object.assign({}, s), { classname: (!disableInitialTransition || state.unmounted) ? style(from, cacheId, doc === null || doc === void 0 ? void 0 : doc.document) : "", initial: true, rect: rect })));
60
60
  let stimer = null;
61
61
  let etimer = null;
62
62
  ele.ontransitionstart = () => {
@@ -81,7 +81,7 @@ const useTransition = (_a) => {
81
81
  };
82
82
  }
83
83
  else if (!state.initial) {
84
- setState(s => (Object.assign(Object.assign({}, s), { classname: style(from, doc.document, cacheId), rect: rect })));
84
+ setState(s => (Object.assign(Object.assign({}, s), { classname: style(from, cacheId, doc === null || doc === void 0 ? void 0 : doc.document), rect: rect })));
85
85
  }
86
86
  }, [open, state.initial, state.stage, exitOnUnmount]);
87
87
  React.useEffect(() => {
@@ -91,7 +91,7 @@ const useTransition = (_a) => {
91
91
  let _css = open ? to : from;
92
92
  let trans = ` ${duration}ms ${_ease} ${delay || 0}ms`;
93
93
  let _ = Object.assign(Object.assign({}, _css), { transition: Object.keys(_css || {}).map(k => oncss.formatCSSProp(k)).join(trans + ", ") + trans });
94
- setState(s => (Object.assign(Object.assign({}, s), { classname: style(_, doc.document, cacheId), variant: _variant })));
94
+ setState(s => (Object.assign(Object.assign({}, s), { classname: style(_, cacheId, doc === null || doc === void 0 ? void 0 : doc.document), variant: _variant })));
95
95
  }
96
96
  }, [open, state.initial, variant]);
97
97
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/hooks/useTransition/index.ts"],"sourcesContent":["\"use client\";\r\nimport { useState, useEffect, useId } from 'react';\r\nimport { animationEases } from '../useAnimation';\r\nimport { css } from '../../css';\r\nimport { formatCSSProp } from 'oncss';\r\nimport { CSSProps } from '../../css/types';\r\nimport * as variants from './variants'\r\nimport { useDocument } from '../../Document';\r\nimport { useCSSCacheId } from '../../css/CSSCacheProvider';\r\n\r\nexport type UseTransitionVariantTypes = keyof typeof variants\r\nexport type UseTransitionState = \"open\" | \"opened\" | \"close\" | \"closed\"\r\n\r\nexport type UseTransitionVariant = (rect: DOMRect) => ({ from: CSSProps, to: CSSProps })\r\n\r\nexport type UseTransitionProps = {\r\n open: boolean;\r\n variant: UseTransitionVariant | UseTransitionVariantTypes;\r\n ease?: string;\r\n easing?: keyof typeof animationEases;\r\n duration?: number;\r\n delay?: number;\r\n disableInitialTransition?: boolean;\r\n exitOnUnmount?: boolean;\r\n onOpen?: () => void;\r\n onOpened?: () => void;\r\n onClose?: () => void;\r\n onClosed?: () => void;\r\n onState?: (state: UseTransitionState) => void;\r\n}\r\n\r\n\r\nconst style = (obj = {}, doc: Document, cacheId: string) => {\r\n return css(obj, { selector: \"#\", container: doc, cacheId }).classname;\r\n}\r\n\r\nconst getVariant = (rect: DOMRect | null, variant: UseTransitionProps['variant']) => {\r\n let fn = typeof variant === 'string' ? variants[variant] : variant\r\n if (!fn) throw new Error(`Transition variant \"${variant}\" not found.`)\r\n return fn(rect as DOMRect);\r\n}\r\n\r\nconst useTransition = ({ open, ...props }: UseTransitionProps) => {\r\n let {\r\n disableInitialTransition = false,\r\n variant = \"fade\",\r\n duration = 400,\r\n delay,\r\n ease,\r\n easing,\r\n exitOnUnmount = false,\r\n onOpen,\r\n onOpened,\r\n onClose,\r\n onClosed,\r\n onState\r\n } = props\r\n const doc = useDocument();\r\n const cacheId = useCSSCacheId()\r\n let _ease = ease || (animationEases as any)[easing as any] || animationEases.bounce\r\n const id = \"xui-transition-\" + useId()\r\n const [state, setState] = useState({\r\n initial: false,\r\n classname: style({ visibility: \"hidden\" }, doc.document, cacheId),\r\n variant: variant,\r\n rect: null as DOMRect | null,\r\n stage: open ? \"open\" : \"closed\",\r\n unmounted: false,\r\n })\r\n\r\n const getEle = () => doc.document.querySelector(`[data-transition=\"${id}\"]`) as HTMLElement;\r\n const getBoundary = () => state.rect || getEle()?.getBoundingClientRect() || new DOMRect(0, 0, 0, 0);\r\n\r\n useEffect(() => {\r\n if (exitOnUnmount && state.stage === 'closed') {\r\n if (!open) {\r\n setState(s => ({\r\n ...s,\r\n initial: false,\r\n classname: \"\",\r\n unmounted: true,\r\n variant: variant,\r\n }))\r\n } else {\r\n setState(s => ({\r\n ...s,\r\n variant: variant,\r\n classname: style({ visibility: \"hidden\" }, doc.document, cacheId),\r\n stage: \"open\",\r\n }))\r\n }\r\n }\r\n }, [open, state.stage, exitOnUnmount, variant])\r\n\r\n // initial effect\r\n useEffect(() => {\r\n const ele = getEle()\r\n if (!ele) return\r\n if (exitOnUnmount && state.stage === 'closed') return\r\n\r\n const rect = getBoundary();\r\n let { from } = getVariant(rect, state.variant)\r\n if (open && !state.initial) {\r\n setState(s => ({\r\n ...s,\r\n classname: (!disableInitialTransition || state.unmounted) ? style(from, doc.document, cacheId) : \"\",\r\n initial: true,\r\n rect: rect,\r\n }))\r\n let stimer: any = null\r\n let etimer: any = null\r\n ele.ontransitionstart = () => {\r\n clearTimeout(stimer)\r\n stimer = setTimeout(() => {\r\n const isOpen = ele.getAttribute('data-transition-state') === 'open';\r\n (onOpen && isOpen) && onOpen();\r\n (onClose && !isOpen) && onClose()\r\n onState && onState(isOpen ? \"open\" : \"close\")\r\n setState(s => ({\r\n ...s,\r\n stage: isOpen ? \"open\" : \"close\"\r\n }))\r\n }, 1)\r\n }\r\n\r\n ele.ontransitionend = () => {\r\n clearTimeout(etimer)\r\n etimer = setTimeout(() => {\r\n const isOpen = ele.getAttribute('data-transition-state') === 'open';\r\n (onOpened && isOpen) && onOpened();\r\n (onClosed && !isOpen) && onClosed();\r\n onState && onState(isOpen ? \"opened\" : \"closed\")\r\n setState(s => ({\r\n ...s,\r\n stage: isOpen ? \"opened\" : \"closed\"\r\n }))\r\n }, 1)\r\n }\r\n } else if (!state.initial) {\r\n setState(s => ({\r\n ...s,\r\n classname: style(from, doc.document, cacheId),\r\n rect: rect,\r\n }))\r\n }\r\n }, [open, state.initial, state.stage, exitOnUnmount])\r\n\r\n\r\n useEffect(() => {\r\n if (state.initial) {\r\n let _variant = state.variant !== variant ? variant : state.variant\r\n const { from, to } = getVariant(state.rect, _variant)\r\n let _css: CSSProps = open ? to : from\r\n let trans = ` ${duration}ms ${_ease} ${delay || 0}ms`\r\n let _ = {\r\n ..._css,\r\n transition: Object.keys(_css || {}).map(k => formatCSSProp(k)).join(trans + \", \") + trans,\r\n }\r\n setState(s => ({\r\n ...s,\r\n classname: style(_, doc.document, cacheId),\r\n variant: _variant\r\n }))\r\n }\r\n }, [open, state.initial, variant])\r\n\r\n return {\r\n exited: exitOnUnmount && state.stage === 'closed',\r\n props: {\r\n 'id': state.classname,\r\n 'data-transition': id,\r\n 'data-transition-state': open ? 'open' : 'close',\r\n }\r\n }\r\n}\r\n\r\n\r\nexport default useTransition"],"names":[],"mappings":";;;;;;;;;;;;AAgCA;AACG;AACH;AAEA;AACG;AACA;AAAS;AACT;AACH;AAEA;AAAuB;AACpB;AAcA;AACA;AACA;AACA;AACA;AACG;AACA;AACA;AACA;;AAEA;AACF;AAED;AACA;;;;;;;AAaS;;;AAQT;;;AAIG;AACA;;AACA;;AAEA;AACA;AACA;;;;AASG;;AAEG;;AAEG;;AAEA;;;AAMN;AAEA;;AAEG;;AAEG;;AAEA;;;AAMN;;AACI;;;AAOV;;AAIG;AACG;AACA;;;AAGA;;;;;AAaH;AACA;;AAEG;;AAEF;;AAEP;;"}
1
+ {"version":3,"file":"index.cjs","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'\nimport { useDocument } from '../../Document';\nimport { useCSSCacheId } from '../../css/CSSCacheProvider';\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 = {}, cacheId: string, doc?: Document) => {\n return css(obj, { selector: \"#\", container: doc, cacheId }).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 const doc = useDocument();\n const cacheId = useCSSCacheId()\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\" }, cacheId, doc?.document),\n variant: variant,\n rect: null as DOMRect | null,\n stage: open ? \"open\" : \"closed\",\n unmounted: false,\n })\n\n const getEle = () => doc?.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\" }, cacheId, doc?.document),\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, cacheId, doc?.document) : \"\",\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, cacheId, doc?.document),\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(_, cacheId, doc?.document),\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":";;;;;;;;;;;;AAgCA;AACG;AACH;AAEA;AACG;AACA;AAAS;AACT;AACH;AAEA;AAAuB;AACpB;AAcA;AACA;AACA;AACA;AACA;AACG;AACA;AACA;AACA;;AAEA;AACF;AAED;AACA;;;;;;;AAaS;;;AAQT;;;AAIG;AACA;;AACA;;AAEA;AACA;AACA;;;;AASG;;AAEG;;AAEG;;AAEA;;;AAMN;AAEA;;AAEG;;AAEG;;AAEA;;;AAMN;;AACI;AACJ;;AAMN;;AAIG;AACG;AACA;;;AAGA;AAIA;;;;AASH;AACA;;AAEG;;AAEF;;AAEP;;"}
@@ -8,7 +8,7 @@ import * as variants from './variants.js';
8
8
  import { useDocument } from '../../Document/index.js';
9
9
  import { useCSSCacheId } from '../../css/CSSCacheProvider.js';
10
10
 
11
- const style = (obj = {}, doc, cacheId) => {
11
+ const style = (obj = {}, cacheId, doc) => {
12
12
  return css(obj, { selector: "#", container: doc, cacheId }).classname;
13
13
  };
14
14
  const getVariant = (rect, variant) => {
@@ -26,13 +26,13 @@ const useTransition = (_a) => {
26
26
  const id = "xui-transition-" + useId();
27
27
  const [state, setState] = useState({
28
28
  initial: false,
29
- classname: style({ visibility: "hidden" }, doc.document, cacheId),
29
+ classname: style({ visibility: "hidden" }, cacheId, doc === null || doc === void 0 ? void 0 : doc.document),
30
30
  variant: variant,
31
31
  rect: null,
32
32
  stage: open ? "open" : "closed",
33
33
  unmounted: false,
34
34
  });
35
- const getEle = () => doc.document.querySelector(`[data-transition="${id}"]`);
35
+ const getEle = () => doc === null || doc === void 0 ? void 0 : doc.document.querySelector(`[data-transition="${id}"]`);
36
36
  const getBoundary = () => { var _a; return state.rect || ((_a = getEle()) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) || new DOMRect(0, 0, 0, 0); };
37
37
  useEffect(() => {
38
38
  if (exitOnUnmount && state.stage === 'closed') {
@@ -40,7 +40,7 @@ const useTransition = (_a) => {
40
40
  setState(s => (Object.assign(Object.assign({}, s), { initial: false, classname: "", unmounted: true, variant: variant })));
41
41
  }
42
42
  else {
43
- setState(s => (Object.assign(Object.assign({}, s), { variant: variant, classname: style({ visibility: "hidden" }, doc.document, cacheId), stage: "open" })));
43
+ setState(s => (Object.assign(Object.assign({}, s), { variant: variant, classname: style({ visibility: "hidden" }, cacheId, doc === null || doc === void 0 ? void 0 : doc.document), stage: "open" })));
44
44
  }
45
45
  }
46
46
  }, [open, state.stage, exitOnUnmount, variant]);
@@ -54,7 +54,7 @@ const useTransition = (_a) => {
54
54
  const rect = getBoundary();
55
55
  let { from } = getVariant(rect, state.variant);
56
56
  if (open && !state.initial) {
57
- setState(s => (Object.assign(Object.assign({}, s), { classname: (!disableInitialTransition || state.unmounted) ? style(from, doc.document, cacheId) : "", initial: true, rect: rect })));
57
+ setState(s => (Object.assign(Object.assign({}, s), { classname: (!disableInitialTransition || state.unmounted) ? style(from, cacheId, doc === null || doc === void 0 ? void 0 : doc.document) : "", initial: true, rect: rect })));
58
58
  let stimer = null;
59
59
  let etimer = null;
60
60
  ele.ontransitionstart = () => {
@@ -79,7 +79,7 @@ const useTransition = (_a) => {
79
79
  };
80
80
  }
81
81
  else if (!state.initial) {
82
- setState(s => (Object.assign(Object.assign({}, s), { classname: style(from, doc.document, cacheId), rect: rect })));
82
+ setState(s => (Object.assign(Object.assign({}, s), { classname: style(from, cacheId, doc === null || doc === void 0 ? void 0 : doc.document), rect: rect })));
83
83
  }
84
84
  }, [open, state.initial, state.stage, exitOnUnmount]);
85
85
  useEffect(() => {
@@ -89,7 +89,7 @@ const useTransition = (_a) => {
89
89
  let _css = open ? to : from;
90
90
  let trans = ` ${duration}ms ${_ease} ${delay || 0}ms`;
91
91
  let _ = Object.assign(Object.assign({}, _css), { transition: Object.keys(_css || {}).map(k => formatCSSProp(k)).join(trans + ", ") + trans });
92
- setState(s => (Object.assign(Object.assign({}, s), { classname: style(_, doc.document, cacheId), variant: _variant })));
92
+ setState(s => (Object.assign(Object.assign({}, s), { classname: style(_, cacheId, doc === null || doc === void 0 ? void 0 : doc.document), variant: _variant })));
93
93
  }
94
94
  }, [open, state.initial, variant]);
95
95
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/hooks/useTransition/index.ts"],"sourcesContent":["\"use client\";\r\nimport { useState, useEffect, useId } from 'react';\r\nimport { animationEases } from '../useAnimation';\r\nimport { css } from '../../css';\r\nimport { formatCSSProp } from 'oncss';\r\nimport { CSSProps } from '../../css/types';\r\nimport * as variants from './variants'\r\nimport { useDocument } from '../../Document';\r\nimport { useCSSCacheId } from '../../css/CSSCacheProvider';\r\n\r\nexport type UseTransitionVariantTypes = keyof typeof variants\r\nexport type UseTransitionState = \"open\" | \"opened\" | \"close\" | \"closed\"\r\n\r\nexport type UseTransitionVariant = (rect: DOMRect) => ({ from: CSSProps, to: CSSProps })\r\n\r\nexport type UseTransitionProps = {\r\n open: boolean;\r\n variant: UseTransitionVariant | UseTransitionVariantTypes;\r\n ease?: string;\r\n easing?: keyof typeof animationEases;\r\n duration?: number;\r\n delay?: number;\r\n disableInitialTransition?: boolean;\r\n exitOnUnmount?: boolean;\r\n onOpen?: () => void;\r\n onOpened?: () => void;\r\n onClose?: () => void;\r\n onClosed?: () => void;\r\n onState?: (state: UseTransitionState) => void;\r\n}\r\n\r\n\r\nconst style = (obj = {}, doc: Document, cacheId: string) => {\r\n return css(obj, { selector: \"#\", container: doc, cacheId }).classname;\r\n}\r\n\r\nconst getVariant = (rect: DOMRect | null, variant: UseTransitionProps['variant']) => {\r\n let fn = typeof variant === 'string' ? variants[variant] : variant\r\n if (!fn) throw new Error(`Transition variant \"${variant}\" not found.`)\r\n return fn(rect as DOMRect);\r\n}\r\n\r\nconst useTransition = ({ open, ...props }: UseTransitionProps) => {\r\n let {\r\n disableInitialTransition = false,\r\n variant = \"fade\",\r\n duration = 400,\r\n delay,\r\n ease,\r\n easing,\r\n exitOnUnmount = false,\r\n onOpen,\r\n onOpened,\r\n onClose,\r\n onClosed,\r\n onState\r\n } = props\r\n const doc = useDocument();\r\n const cacheId = useCSSCacheId()\r\n let _ease = ease || (animationEases as any)[easing as any] || animationEases.bounce\r\n const id = \"xui-transition-\" + useId()\r\n const [state, setState] = useState({\r\n initial: false,\r\n classname: style({ visibility: \"hidden\" }, doc.document, cacheId),\r\n variant: variant,\r\n rect: null as DOMRect | null,\r\n stage: open ? \"open\" : \"closed\",\r\n unmounted: false,\r\n })\r\n\r\n const getEle = () => doc.document.querySelector(`[data-transition=\"${id}\"]`) as HTMLElement;\r\n const getBoundary = () => state.rect || getEle()?.getBoundingClientRect() || new DOMRect(0, 0, 0, 0);\r\n\r\n useEffect(() => {\r\n if (exitOnUnmount && state.stage === 'closed') {\r\n if (!open) {\r\n setState(s => ({\r\n ...s,\r\n initial: false,\r\n classname: \"\",\r\n unmounted: true,\r\n variant: variant,\r\n }))\r\n } else {\r\n setState(s => ({\r\n ...s,\r\n variant: variant,\r\n classname: style({ visibility: \"hidden\" }, doc.document, cacheId),\r\n stage: \"open\",\r\n }))\r\n }\r\n }\r\n }, [open, state.stage, exitOnUnmount, variant])\r\n\r\n // initial effect\r\n useEffect(() => {\r\n const ele = getEle()\r\n if (!ele) return\r\n if (exitOnUnmount && state.stage === 'closed') return\r\n\r\n const rect = getBoundary();\r\n let { from } = getVariant(rect, state.variant)\r\n if (open && !state.initial) {\r\n setState(s => ({\r\n ...s,\r\n classname: (!disableInitialTransition || state.unmounted) ? style(from, doc.document, cacheId) : \"\",\r\n initial: true,\r\n rect: rect,\r\n }))\r\n let stimer: any = null\r\n let etimer: any = null\r\n ele.ontransitionstart = () => {\r\n clearTimeout(stimer)\r\n stimer = setTimeout(() => {\r\n const isOpen = ele.getAttribute('data-transition-state') === 'open';\r\n (onOpen && isOpen) && onOpen();\r\n (onClose && !isOpen) && onClose()\r\n onState && onState(isOpen ? \"open\" : \"close\")\r\n setState(s => ({\r\n ...s,\r\n stage: isOpen ? \"open\" : \"close\"\r\n }))\r\n }, 1)\r\n }\r\n\r\n ele.ontransitionend = () => {\r\n clearTimeout(etimer)\r\n etimer = setTimeout(() => {\r\n const isOpen = ele.getAttribute('data-transition-state') === 'open';\r\n (onOpened && isOpen) && onOpened();\r\n (onClosed && !isOpen) && onClosed();\r\n onState && onState(isOpen ? \"opened\" : \"closed\")\r\n setState(s => ({\r\n ...s,\r\n stage: isOpen ? \"opened\" : \"closed\"\r\n }))\r\n }, 1)\r\n }\r\n } else if (!state.initial) {\r\n setState(s => ({\r\n ...s,\r\n classname: style(from, doc.document, cacheId),\r\n rect: rect,\r\n }))\r\n }\r\n }, [open, state.initial, state.stage, exitOnUnmount])\r\n\r\n\r\n useEffect(() => {\r\n if (state.initial) {\r\n let _variant = state.variant !== variant ? variant : state.variant\r\n const { from, to } = getVariant(state.rect, _variant)\r\n let _css: CSSProps = open ? to : from\r\n let trans = ` ${duration}ms ${_ease} ${delay || 0}ms`\r\n let _ = {\r\n ..._css,\r\n transition: Object.keys(_css || {}).map(k => formatCSSProp(k)).join(trans + \", \") + trans,\r\n }\r\n setState(s => ({\r\n ...s,\r\n classname: style(_, doc.document, cacheId),\r\n variant: _variant\r\n }))\r\n }\r\n }, [open, state.initial, variant])\r\n\r\n return {\r\n exited: exitOnUnmount && state.stage === 'closed',\r\n props: {\r\n 'id': state.classname,\r\n 'data-transition': id,\r\n 'data-transition-state': open ? 'open' : 'close',\r\n }\r\n }\r\n}\r\n\r\n\r\nexport default useTransition"],"names":[],"mappings":";;;;;;;;;;AAgCA;AACG;AACH;AAEA;AACG;AACA;AAAS;AACT;AACH;AAEA;AAAuB;AACpB;AAcA;AACA;AACA;AACA;AACA;AACG;AACA;AACA;AACA;;AAEA;AACF;AAED;AACA;;;;;;;AAaS;;;AAQT;;;AAIG;AACA;;AACA;;AAEA;AACA;AACA;;;;AASG;;AAEG;;AAEG;;AAEA;;;AAMN;AAEA;;AAEG;;AAEG;;AAEA;;;AAMN;;AACI;;;AAOV;;AAIG;AACG;AACA;;;AAGA;;;;;AAaH;AACA;;AAEG;;AAEF;;AAEP;;"}
1
+ {"version":3,"file":"index.js","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'\nimport { useDocument } from '../../Document';\nimport { useCSSCacheId } from '../../css/CSSCacheProvider';\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 = {}, cacheId: string, doc?: Document) => {\n return css(obj, { selector: \"#\", container: doc, cacheId }).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 const doc = useDocument();\n const cacheId = useCSSCacheId()\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\" }, cacheId, doc?.document),\n variant: variant,\n rect: null as DOMRect | null,\n stage: open ? \"open\" : \"closed\",\n unmounted: false,\n })\n\n const getEle = () => doc?.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\" }, cacheId, doc?.document),\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, cacheId, doc?.document) : \"\",\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, cacheId, doc?.document),\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(_, cacheId, doc?.document),\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":";;;;;;;;;;AAgCA;AACG;AACH;AAEA;AACG;AACA;AAAS;AACT;AACH;AAEA;AAAuB;AACpB;AAcA;AACA;AACA;AACA;AACA;AACG;AACA;AACA;AACA;;AAEA;AACF;AAED;AACA;;;;;;;AAaS;;;AAQT;;;AAIG;AACA;;AACA;;AAEA;AACA;AACA;;;;AASG;;AAEG;;AAEG;;AAEA;;;AAMN;AAEA;;AAEG;;AAEG;;AAEA;;;AAMN;;AACI;AACJ;;AAMN;;AAIG;AACG;AACA;;;AAGA;AAIA;;;;AASH;AACA;;AAEG;;AAEF;;AAEP;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"variants.cjs","sources":["../../../src/hooks/useTransition/variants.ts"],"sourcesContent":["\r\nexport const slideDown = (rect: DOMRect) => {\r\n\r\n return {\r\n from: {\r\n transform: `translateY(-${rect.height}px)`,\r\n },\r\n to: {\r\n transform: `translateY(0)`,\r\n }\r\n }\r\n}\r\n\r\nexport const slideUp = (rect: DOMRect) => {\r\n return {\r\n from: {\r\n transform: `translateY(${rect.height}px)`,\r\n },\r\n to: {\r\n transform: `translateY(0)`,\r\n }\r\n }\r\n}\r\n\r\nexport const slideRight = (rect: DOMRect) => {\r\n return {\r\n from: {\r\n transform: `translateX(-${rect.width}px)`,\r\n },\r\n to: {\r\n transform: `translateX(0)`,\r\n }\r\n }\r\n}\r\n\r\nexport const slideLeft = (rect: DOMRect) => {\r\n return {\r\n from: {\r\n transform: `translateX(${rect.width}px)`,\r\n },\r\n to: {\r\n transform: `translateX(0)`,\r\n }\r\n }\r\n}\r\n\r\nexport const fade = () => {\r\n return {\r\n from: {\r\n opacity: 0\r\n },\r\n to: {\r\n opacity: 1\r\n }\r\n }\r\n}\r\n\r\nexport const fadeDown = () => {\r\n return {\r\n from: {\r\n transform: `translateY(-30px)`,\r\n opacity: 0\r\n },\r\n to: {\r\n transform: `translateY(0)`,\r\n opacity: 1\r\n }\r\n }\r\n}\r\n\r\nexport const fadeUp = () => {\r\n return {\r\n from: {\r\n transform: `translateY(30px)`,\r\n opacity: 0\r\n },\r\n to: {\r\n transform: `translateY(0)`,\r\n opacity: 1\r\n }\r\n }\r\n}\r\n\r\nexport const fadeRight = () => {\r\n return {\r\n from: {\r\n transform: `translateX(-30px)`,\r\n opacity: 0\r\n },\r\n to: {\r\n transform: `translateX(0)`,\r\n opacity: 1\r\n }\r\n }\r\n}\r\n\r\nexport const fadeLeft = () => {\r\n return {\r\n from: {\r\n transform: `translateX(30px)`,\r\n opacity: 0\r\n },\r\n to: {\r\n transform: `translateX(0)`,\r\n opacity: 1\r\n }\r\n }\r\n}\r\n\r\nexport const grow = () => {\r\n return {\r\n from: {\r\n transform: \"scale(.8, .6)\",\r\n opacity: 0\r\n },\r\n to: {\r\n transform: \"scale(1)\",\r\n opacity: 1\r\n }\r\n }\r\n}\r\n\r\nexport const zoom = () => {\r\n return {\r\n from: {\r\n transform: \"scale(.8)\",\r\n opacity: 0\r\n },\r\n to: {\r\n transform: \"scale(1)\",\r\n opacity: 1\r\n }\r\n }\r\n}\r\n\r\nexport const zoomOver = () => {\r\n return {\r\n from: {\r\n transform: \"scale(1.2)\",\r\n opacity: 0\r\n },\r\n to: {\r\n transform: \"scale(1)\",\r\n opacity: 1\r\n }\r\n }\r\n}\r\n\r\nexport const collapseVertical = (rect: DOMRect) => {\r\n\r\n return {\r\n from: {\r\n maxHeight: 0 + \"px\",\r\n overflow: \"hidden\"\r\n },\r\n to: {\r\n maxHeight: rect.height,\r\n overflow: \"hidden\"\r\n }\r\n }\r\n}\r\n\r\n\r\nexport const collapseHorizontal = (rect: DOMRect) => {\r\n return {\r\n from: {\r\n width: 0 + \"px\",\r\n overflow: \"hidden\"\r\n },\r\n to: {\r\n width: rect?.width ? rect?.width + \"px\" : \"auto\",\r\n overflow: \"hidden\"\r\n }\r\n }\r\n}\r\n\r\n\r\n\r\n\r\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;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,MAAA,GAAJ,IAAI,CAAE,KAAK,IAAG,IAAI,GAAG,MAAM;AAChD,YAAA,QAAQ,EAAE;AACb;KACJ;AACL;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"variants.cjs","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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AAE;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 +1 @@
1
- {"version":3,"file":"variants.js","sources":["../../../src/hooks/useTransition/variants.ts"],"sourcesContent":["\r\nexport const slideDown = (rect: DOMRect) => {\r\n\r\n return {\r\n from: {\r\n transform: `translateY(-${rect.height}px)`,\r\n },\r\n to: {\r\n transform: `translateY(0)`,\r\n }\r\n }\r\n}\r\n\r\nexport const slideUp = (rect: DOMRect) => {\r\n return {\r\n from: {\r\n transform: `translateY(${rect.height}px)`,\r\n },\r\n to: {\r\n transform: `translateY(0)`,\r\n }\r\n }\r\n}\r\n\r\nexport const slideRight = (rect: DOMRect) => {\r\n return {\r\n from: {\r\n transform: `translateX(-${rect.width}px)`,\r\n },\r\n to: {\r\n transform: `translateX(0)`,\r\n }\r\n }\r\n}\r\n\r\nexport const slideLeft = (rect: DOMRect) => {\r\n return {\r\n from: {\r\n transform: `translateX(${rect.width}px)`,\r\n },\r\n to: {\r\n transform: `translateX(0)`,\r\n }\r\n }\r\n}\r\n\r\nexport const fade = () => {\r\n return {\r\n from: {\r\n opacity: 0\r\n },\r\n to: {\r\n opacity: 1\r\n }\r\n }\r\n}\r\n\r\nexport const fadeDown = () => {\r\n return {\r\n from: {\r\n transform: `translateY(-30px)`,\r\n opacity: 0\r\n },\r\n to: {\r\n transform: `translateY(0)`,\r\n opacity: 1\r\n }\r\n }\r\n}\r\n\r\nexport const fadeUp = () => {\r\n return {\r\n from: {\r\n transform: `translateY(30px)`,\r\n opacity: 0\r\n },\r\n to: {\r\n transform: `translateY(0)`,\r\n opacity: 1\r\n }\r\n }\r\n}\r\n\r\nexport const fadeRight = () => {\r\n return {\r\n from: {\r\n transform: `translateX(-30px)`,\r\n opacity: 0\r\n },\r\n to: {\r\n transform: `translateX(0)`,\r\n opacity: 1\r\n }\r\n }\r\n}\r\n\r\nexport const fadeLeft = () => {\r\n return {\r\n from: {\r\n transform: `translateX(30px)`,\r\n opacity: 0\r\n },\r\n to: {\r\n transform: `translateX(0)`,\r\n opacity: 1\r\n }\r\n }\r\n}\r\n\r\nexport const grow = () => {\r\n return {\r\n from: {\r\n transform: \"scale(.8, .6)\",\r\n opacity: 0\r\n },\r\n to: {\r\n transform: \"scale(1)\",\r\n opacity: 1\r\n }\r\n }\r\n}\r\n\r\nexport const zoom = () => {\r\n return {\r\n from: {\r\n transform: \"scale(.8)\",\r\n opacity: 0\r\n },\r\n to: {\r\n transform: \"scale(1)\",\r\n opacity: 1\r\n }\r\n }\r\n}\r\n\r\nexport const zoomOver = () => {\r\n return {\r\n from: {\r\n transform: \"scale(1.2)\",\r\n opacity: 0\r\n },\r\n to: {\r\n transform: \"scale(1)\",\r\n opacity: 1\r\n }\r\n }\r\n}\r\n\r\nexport const collapseVertical = (rect: DOMRect) => {\r\n\r\n return {\r\n from: {\r\n maxHeight: 0 + \"px\",\r\n overflow: \"hidden\"\r\n },\r\n to: {\r\n maxHeight: rect.height,\r\n overflow: \"hidden\"\r\n }\r\n }\r\n}\r\n\r\n\r\nexport const collapseHorizontal = (rect: DOMRect) => {\r\n return {\r\n from: {\r\n width: 0 + \"px\",\r\n overflow: \"hidden\"\r\n },\r\n to: {\r\n width: rect?.width ? rect?.width + \"px\" : \"auto\",\r\n overflow: \"hidden\"\r\n }\r\n }\r\n}\r\n\r\n\r\n\r\n\r\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,CA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;KACJ;AACL;AAEO,MAAM,QAAQ,GAAG,MAAK;IACzB,OAAO;AACH,QAAA,IAAI,EAAE;AACF,YAAA,SAAS,EAAE,YAAY;AACvB,YAAA,OAAO,EAAE;AACZ,SAAA;AACD,QAAA,EAAE,EAAE;AACA,YAAA,SAAS,EAAE,UAAU;AACrB,YAAA,OAAO,EAAE;AACZ;KACJ;AACL;AAEO,MAAM,gBAAgB,GAAG,CAAC,IAAa,KAAI;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;;;;"}
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\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A,IAAI,EAAE;AACF,YAAA,SAAS,EAAE,WAAW;AACtB,YAAA,OAAO,EAAE;AACZ,SAAA;AACD,QAAA,EAAE,EAAE;AACA,YAAA,SAAS,EAAE,UAAU;AACrB,YAAA,OAAO,EAAE;AACZ;KACJ;AACL;AAEO,MAAM,QAAQ,GAAG,MAAK;IACzB,OAAO;AACH,QAAA,IAAI,EAAE;AACF,YAAA,SAAS,EAAE,YAAY;AACvB,YAAA,OAAO,EAAE;AACZ,SAAA;AACD,QAAA,EAAE,EAAE;AACA,YAAA,SAAS,EAAE,UAAU;AACrB,YAAA,OAAO,EAAE;AACZ;KACJ;AACL;AAEO,MAAM,gBAAgB,GAAG,CAAC,IAAa,KAAI;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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xanui/core",
3
- "version": "1.2.50",
3
+ "version": "1.2.51",
4
4
  "description": "Xanui Core Library",
5
5
  "private": false,
6
6
  "main": "./index.cjs",
@@ -10,7 +10,7 @@
10
10
  "dependencies": {
11
11
  "oncss": "^1.2.10",
12
12
  "pretty-class": "^1.0.8",
13
- "react-state-bucket": "^1.2.11"
13
+ "react-state-bucket": "^1.2.17"
14
14
  },
15
15
  "keywords": []
16
16
  }
package/readme.md CHANGED
@@ -1,109 +1,109 @@
1
- # Xanui Core
2
-
3
- Xanui Core is a lightweight styling and theming toolkit for React. It bundles a constraint-based CSS generator, a TypeScript-friendly `<Tag>` primitive, responsive helpers, and an opinionated theme engine so that design tokens, animations, and layout logic stay consistent across your application.
4
-
5
- ## Highlights
6
-
7
- - Build any element with `<Tag>` and the ergonomic `sx`/alias props while still passing native attributes.
8
- - Author design tokens once via `createTheme`, ship them with `ThemeProvider`, and switch them at runtime with `createThemeSwitcher`.
9
- - Drive responsive layouts using `BreakpointProvider`, `useBreakpoint`, and `useBreakpointProps` without bespoke media queries.
10
- - Compose micro-animations through `useAnimation`, ready-made `Transition` variants, and reusable CSS utilities.
11
- - Support SSR portals by rehydrating critical styles with `RenderServerStyles`.
12
-
13
- ## Installation
14
-
15
- ```bash
16
- npm install @xanui/core
17
- ```
18
-
19
- ## Quick Start
20
-
21
- ```tsx
22
- import { ThemeProvider, Tag, createTheme, createThemeSwitcher } from '@xanui/core'
23
-
24
- // Register a custom theme once at startup
25
- createTheme('brand', {
26
- colors: {
27
- brand: { primary: '#7C3AED', secondary: '#5B21B6' },
28
- },
29
- })
30
-
31
- const useThemeSwitcher = createThemeSwitcher('brand', ThemeSwitcherOption)
32
-
33
- export const App = () => {
34
- const { name, change } = useThemeSwitcher()
35
-
36
- return (
37
- <ThemeProvider theme={name} isRootProvider>
38
- <Tag
39
- component="main"
40
- px={24}
41
- py={32}
42
- bgcolor="background"
43
- color="text.primary"
44
- gap={24}
45
- >
46
- <Tag component="h1" fontSize="h2">
47
- Xanui Core
48
- </Tag>
49
-
50
- <button onClick={() => change(name === 'brand' ? 'dark' : 'brand')}>
51
- Toggle Theme
52
- </button>
53
- </Tag>
54
- </ThemeProvider>
55
- )
56
- }
57
- ```
58
-
59
- ## Core Concepts
60
-
61
- - **Design Tokens** – `createTheme` merges your overrides with defaults and exposes typed references like `brand.primary` or typography presets.
62
- - **Adaptive Layout** – Wrap your app with `BreakpointProvider` (automatically included by `ThemeProvider` when `isRootProvider` is `true`) to consume breakpoint helpers throughout the tree.
63
- - **Composable Styles** – `css`, `getValue`, and `getProps` transform alias props, breakpoints, and pseudo selectors into atomic class names. Use them directly for utilities such as scrollbars or keyframes.
64
- - **Animation Primitives** – `useAnimation` builds scoped keyframes on the fly; `Transition` controls mount/unmount sequences with variants such as `fade`, `slideDown`, or `collapseVertical`.
65
-
66
- ## Server-Side Rendering
67
-
68
- When rendering on the server, collect the emitted styles:
69
-
70
- ```tsx
71
- import RenderServerStyles from '@xanui/core/RenderServerStyles'
72
-
73
- export const Document = () => (
74
- <html>
75
- <head>
76
- <RenderServerStyles />
77
- </head>
78
- <body>{/* app */}</body>
79
- </html>
80
- )
81
- ```
82
-
83
- ## Documentation
84
-
85
- Detailed API docs (props tables, option summaries, and usage examples) live inside the `docs/` directory. Each API/component has its own `README.md` for fast reference:
86
-
87
- - `docs/tag/README.md`
88
- - `docs/theme-provider/README.md`
89
- - `docs/transition/README.md`
90
- - `docs/use-animation/README.md`
91
- - `docs/use-color-template/README.md`
92
- - `docs/use-interface/README.md`
93
- - `docs/use-breakpoint/README.md`
94
- - `docs/use-breakpoint-props/README.md`
95
- - `docs/use-scrollbar/README.md`
96
- - `docs/render-server-styles/README.md`
97
- - `docs/css/README.md`
98
- - `docs/create-theme/README.md`
99
-
100
- ## Contributing
101
-
102
- 1. Fork and clone the repo.
103
- 2. Run `npm install`.
104
- 3. Use `npm run build` to verify type safety.
105
- 4. Submit a pull request that focuses on one improvement at a time.
106
-
107
- ---
108
-
109
- Need another integration example or a new preset? Open an issue so we can keep the primitives lean and discoverable.
1
+ # Xanui Core
2
+
3
+ Xanui Core is a lightweight styling and theming toolkit for React. It bundles a constraint-based CSS generator, a TypeScript-friendly `<Tag>` primitive, responsive helpers, and an opinionated theme engine so that design tokens, animations, and layout logic stay consistent across your application.
4
+
5
+ ## Highlights
6
+
7
+ - Build any element with `<Tag>` and the ergonomic `sx`/alias props while still passing native attributes.
8
+ - Author design tokens once via `createTheme`, ship them with `ThemeProvider`, and switch them at runtime with `createThemeSwitcher`.
9
+ - Drive responsive layouts using `BreakpointProvider`, `useBreakpoint`, and `useBreakpointProps` without bespoke media queries.
10
+ - Compose micro-animations through `useAnimation`, ready-made `Transition` variants, and reusable CSS utilities.
11
+ - Support SSR portals by rehydrating critical styles with `RenderServerStyles`.
12
+
13
+ ## Installation
14
+
15
+ ```bash
16
+ npm install @xanui/core
17
+ ```
18
+
19
+ ## Quick Start
20
+
21
+ ```tsx
22
+ import { ThemeProvider, Tag, createTheme, createThemeSwitcher } from '@xanui/core'
23
+
24
+ // Register a custom theme once at startup
25
+ createTheme('brand', {
26
+ colors: {
27
+ brand: { primary: '#7C3AED', secondary: '#5B21B6' },
28
+ },
29
+ })
30
+
31
+ const useThemeSwitcher = createThemeSwitcher('brand', ThemeSwitcherOption)
32
+
33
+ export const App = () => {
34
+ const { name, change } = useThemeSwitcher()
35
+
36
+ return (
37
+ <ThemeProvider theme={name} isRootProvider>
38
+ <Tag
39
+ component="main"
40
+ px={24}
41
+ py={32}
42
+ bgcolor="background"
43
+ color="text.primary"
44
+ gap={24}
45
+ >
46
+ <Tag component="h1" fontSize="h2">
47
+ Xanui Core
48
+ </Tag>
49
+
50
+ <button onClick={() => change(name === 'brand' ? 'dark' : 'brand')}>
51
+ Toggle Theme
52
+ </button>
53
+ </Tag>
54
+ </ThemeProvider>
55
+ )
56
+ }
57
+ ```
58
+
59
+ ## Core Concepts
60
+
61
+ - **Design Tokens** – `createTheme` merges your overrides with defaults and exposes typed references like `brand.primary` or typography presets.
62
+ - **Adaptive Layout** – Wrap your app with `BreakpointProvider` (automatically included by `ThemeProvider` when `isRootProvider` is `true`) to consume breakpoint helpers throughout the tree.
63
+ - **Composable Styles** – `css`, `getValue`, and `getProps` transform alias props, breakpoints, and pseudo selectors into atomic class names. Use them directly for utilities such as scrollbars or keyframes.
64
+ - **Animation Primitives** – `useAnimation` builds scoped keyframes on the fly; `Transition` controls mount/unmount sequences with variants such as `fade`, `slideDown`, or `collapseVertical`.
65
+
66
+ ## Server-Side Rendering
67
+
68
+ When rendering on the server, collect the emitted styles:
69
+
70
+ ```tsx
71
+ import RenderServerStyles from '@xanui/core/RenderServerStyles'
72
+
73
+ export const Document = () => (
74
+ <html>
75
+ <head>
76
+ <RenderServerStyles />
77
+ </head>
78
+ <body>{/* app */}</body>
79
+ </html>
80
+ )
81
+ ```
82
+
83
+ ## Documentation
84
+
85
+ Detailed API docs (props tables, option summaries, and usage examples) live inside the `docs/` directory. Each API/component has its own `README.md` for fast reference:
86
+
87
+ - `docs/tag/README.md`
88
+ - `docs/theme-provider/README.md`
89
+ - `docs/transition/README.md`
90
+ - `docs/use-animation/README.md`
91
+ - `docs/use-color-template/README.md`
92
+ - `docs/use-interface/README.md`
93
+ - `docs/use-breakpoint/README.md`
94
+ - `docs/use-breakpoint-props/README.md`
95
+ - `docs/use-scrollbar/README.md`
96
+ - `docs/render-server-styles/README.md`
97
+ - `docs/css/README.md`
98
+ - `docs/create-theme/README.md`
99
+
100
+ ## Contributing
101
+
102
+ 1. Fork and clone the repo.
103
+ 2. Run `npm install`.
104
+ 3. Use `npm run build` to verify type safety.
105
+ 4. Submit a pull request that focuses on one improvement at a time.
106
+
107
+ ---
108
+
109
+ Need another integration example or a new preset? Open an issue so we can keep the primitives lean and discoverable.
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeCssVars.cjs","sources":["../../src/theme/ThemeCssVars.ts"],"sourcesContent":["import { ThemeOptions } from \"./types\";\r\n\r\nconst ThemeCssVars = (theme: ThemeOptions) => {\r\n\r\n const shadows: any = {}\r\n theme.shadow.forEach((s, i) => shadows[`--shadow-${i}`] = s)\r\n\r\n return {\r\n \"--bp-xs\": theme.breakpoints.xs,\r\n \"--bp-sm\": theme.breakpoints.sm,\r\n \"--bp-md\": theme.breakpoints.md,\r\n \"--bp-lg\": theme.breakpoints.lg,\r\n \"--bp-xl\": theme.breakpoints.xl,\r\n\r\n \"--font-h1\": `${theme.typography.h1.fontWeight} ${theme.typography.h1.fontSize}px/${theme.typography.h1.lineHeight} inherit`,\r\n \"--font-h2\": `${theme.typography.h2.fontWeight} ${theme.typography.h2.fontSize}px/${theme.typography.h2.lineHeight} inherit`,\r\n \"--font-h3\": `${theme.typography.h3.fontWeight} ${theme.typography.h3.fontSize}px/${theme.typography.h3.lineHeight} inherit`,\r\n \"--font-h4\": `${theme.typography.h4.fontWeight} ${theme.typography.h4.fontSize}px/${theme.typography.h4.lineHeight} inherit`,\r\n \"--font-h5\": `${theme.typography.h5.fontWeight} ${theme.typography.h5.fontSize}px/${theme.typography.h5.lineHeight} inherit`,\r\n \"--font-h6\": `${theme.typography.h6.fontWeight} ${theme.typography.h6.fontSize}px/${theme.typography.h6.lineHeight} inherit`,\r\n \"--font-big\": `${theme.typography.big.fontWeight} ${theme.typography.text.fontSize}px/${theme.typography.text.lineHeight} inherit`,\r\n \"--font-text\": `${theme.typography.text.fontWeight} ${theme.typography.text.fontSize}px/${theme.typography.text.lineHeight} inherit`,\r\n \"--font-button\": `${theme.typography.button.fontWeight} ${theme.typography.button.fontSize}px/${theme.typography.button.lineHeight} inherit`,\r\n \"--font-small\": `${theme.typography.small.fontWeight} ${theme.typography.small.fontSize}px/${theme.typography.small.lineHeight} inherit`,\r\n\r\n \"--fontsize-h1\": `${theme.typography.h1.fontSize}px`,\r\n \"--fontsize-h2\": `${theme.typography.h2.fontSize}px`,\r\n \"--fontsize-h3\": `${theme.typography.h3.fontSize}px`,\r\n \"--fontsize-h4\": `${theme.typography.h4.fontSize}px`,\r\n \"--fontsize-h5\": `${theme.typography.h5.fontSize}px`,\r\n \"--fontsize-h6\": `${theme.typography.h6.fontSize}px`,\r\n \"--fontsize-big\": `${theme.typography.big.fontSize}px`,\r\n \"--fontsize-text\": `${theme.typography.text.fontSize}px`,\r\n \"--fontsize-button\": `${theme.typography.button.fontSize}px`,\r\n \"--fontsize-small\": `${theme.typography.small.fontSize}px`,\r\n\r\n \"--fontweight-h1\": theme.typography.h1.fontWeight + \"\",\r\n \"--fontweight-h2\": theme.typography.h2.fontWeight + \"\",\r\n \"--fontweight-h3\": theme.typography.h3.fontWeight + \"\",\r\n \"--fontweight-h4\": theme.typography.h4.fontWeight + \"\",\r\n \"--fontweight-h5\": theme.typography.h5.fontWeight + \"\",\r\n \"--fontweight-h6\": theme.typography.h6.fontWeight + \"\",\r\n \"--fontweight-big\": theme.typography.big.fontWeight + \"\",\r\n \"--fontweight-text\": theme.typography.text.fontWeight + \"\",\r\n \"--fontweight-button\": theme.typography.button.fontWeight + \"\",\r\n \"--fontweight-small\": theme.typography.small.fontWeight + \"\",\r\n\r\n \"--lineheight-h1\": theme.typography.h1.lineHeight + \"\",\r\n \"--lineheight-h2\": theme.typography.h2.lineHeight + \"\",\r\n \"--lineheight-h3\": theme.typography.h3.lineHeight + \"\",\r\n \"--lineheight-h4\": theme.typography.h4.lineHeight + \"\",\r\n \"--lineheight-h5\": theme.typography.h5.lineHeight + \"\",\r\n \"--lineheight-h6\": theme.typography.h6.lineHeight + \"\",\r\n \"--lineheight-big\": theme.typography.big.lineHeight + \"\",\r\n \"--lineheight-text\": theme.typography.text.lineHeight + \"\",\r\n \"--lineheight-button\": theme.typography.button.lineHeight + \"\",\r\n \"--lineheight-small\": theme.typography.small.lineHeight + \"\",\r\n\r\n \"--color-background-primary\": theme.colors.background.primary,\r\n \"--color-background-secondary\": theme.colors.background.secondary,\r\n\r\n \"--color-text-primary\": theme.colors.text.primary,\r\n \"--color-text-secondary\": theme.colors.text.secondary,\r\n\r\n \"--color-divider-primary\": theme.colors.divider.primary,\r\n \"--color-divider-secondary\": theme.colors.divider.secondary,\r\n \"--color-divider-soft-primary\": theme.colors.divider.soft.primary,\r\n \"--color-divider-soft-secondary\": theme.colors.divider.soft.secondary,\r\n\r\n \"--color-brand-primary\": theme.colors.brand.primary,\r\n \"--color-brand-secondary\": theme.colors.brand.secondary,\r\n \"--color-brand-text\": theme.colors.brand.text,\r\n \"--color-brand-soft-primary\": theme.colors.brand.soft.primary,\r\n \"--color-brand-soft-secondary\": theme.colors.brand.soft.secondary,\r\n\r\n \"--color-accent-primary\": theme.colors.accent.primary,\r\n \"--color-accent-secondary\": theme.colors.accent.secondary,\r\n \"--color-accent-text\": theme.colors.accent.text,\r\n \"--color-accent-soft-primary\": theme.colors.accent.soft.primary,\r\n \"--color-accent-soft-secondary\": theme.colors.accent.soft.secondary,\r\n\r\n \"--color-info-primary\": theme.colors.info.primary,\r\n \"--color-info-secondary\": theme.colors.info.secondary,\r\n \"--color-info-text\": theme.colors.info.text,\r\n \"--color-info-soft-primary\": theme.colors.info.soft.primary,\r\n \"--color-info-soft-secondary\": theme.colors.info.soft.secondary,\r\n\r\n \"--color-success-primary\": theme.colors.success.primary,\r\n \"--color-success-secondary\": theme.colors.success.secondary,\r\n \"--color-success-text\": theme.colors.success.text,\r\n \"--color-success-soft-primary\": theme.colors.success.soft.primary,\r\n \"--color-success-soft-secondary\": theme.colors.success.soft.secondary,\r\n\r\n \"--color-warning-primary\": theme.colors.warning.primary,\r\n \"--color-warning-secondary\": theme.colors.warning.secondary,\r\n \"--color-warning-text\": theme.colors.warning.text,\r\n \"--color-warning-soft-primary\": theme.colors.warning.soft.primary,\r\n \"--color-warning-soft-secondary\": theme.colors.warning.soft.secondary,\r\n\r\n \"--color-danger-primary\": theme.colors.danger.primary,\r\n \"--color-danger-secondary\": theme.colors.danger.secondary,\r\n \"--color-danger-text\": theme.colors.danger.text,\r\n \"--color-danger-soft-primary\": theme.colors.danger.soft.primary,\r\n \"--color-danger-soft-secondary\": theme.colors.danger.soft.secondary,\r\n\r\n\r\n ...shadows,\r\n }\r\n}\r\n\r\n\r\nexport default ThemeCssVars"],"names":[],"mappings":";;AAEA,MAAM,YAAY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AAC,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.cjs","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,EAAE,CAAC,UAAU,CAAA,CAAA,EAAI,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC,QAAQ,MAAM,KAA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