@xanui/core 1.3.9 → 1.3.10

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/index.cjs CHANGED
@@ -49,7 +49,7 @@ const AppRoot = React.forwardRef((_a, ref) => {
49
49
  if (selectionColor && selectionColor !== 'surface') {
50
50
  selection = {
51
51
  "&::selection": {
52
- bgcolor: `${selectionColor}.main`,
52
+ bgcolor: `${selectionColor}.light`,
53
53
  color: `${selectionColor}.contrast`
54
54
  }
55
55
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../src/AppRoot/index.tsx"],"sourcesContent":["\"use client\";\nimport React, { useEffect, useId, useLayoutEffect, useRef } from 'react';\nimport { TagComponentType } from '../Tag/types';\nimport { ThemeProvider, ThemeProviderProps } from '../theme';\nimport { BreakpointProvider } from '../breakpoint';\nimport { RenderRenderar } from './Renderar';\nimport { DocumentProvider } from '../Document';\nimport { AppRootProvider } from './AppRootProvider';\nimport useMergeRefs from '../hooks/useMergeRefs';\nimport { CSSCacheProvider } from '../css/CSSCacheProvider';\nimport { BreakpointKeys } from '../css/types';\nimport Cookie from '../cookie';\nimport { ThemeColorKeys } from '../theme/types';\n\nexport type AppRootProps<T extends TagComponentType = \"div\"> = ThemeProviderProps<T> & {\n noScrollbarCss?: boolean;\n document?: Document;\n CSSCacheId?: string;\n disableRenderar?: boolean;\n defaultBreakpoint?: BreakpointKeys\n selectionColor?: ThemeColorKeys\n}\n\nconst AppRoot = React.forwardRef(<T extends TagComponentType = \"div\">({ children, defaultBreakpoint, noScrollbarCss, CSSCacheId, theme, onThemeChange, disableRenderar, selectionColor, document: _document, ...props }: AppRootProps<T>, ref: React.Ref<any>) => {\n\n noScrollbarCss ??= false\n selectionColor ??= \"primary\"\n if (typeof window !== \"undefined\") {\n _document ??= document\n }\n disableRenderar ??= false\n const docid = useId()\n const csscacheId = useId()\n CSSCacheId ??= csscacheId\n\n const [visibility, setVisibility] = React.useState<string>(!defaultBreakpoint ? \"hidden\" : \"\");\n const rootRef = useRef(null)\n const mergeRef = useMergeRefs(rootRef, ref)\n\n useLayoutEffect(() => {\n !defaultBreakpoint && setVisibility(\"\");\n }, [])\n\n useEffect(() => {\n if (typeof _document === 'undefined') return;\n if (!Cookie.exists(\"xuitm\") && theme.name) {\n Cookie.set(\"xuitm\", theme.name)\n }\n const styles = Array.from(_document.querySelectorAll('body style[data-oncss]'));\n styles.forEach((style) => {\n _document.head.appendChild(style);\n });\n }, [])\n\n let selection: any = {}\n if (selectionColor && selectionColor !== 'surface') {\n selection = {\n \"&::selection\": {\n bgcolor: `${selectionColor}.main`,\n color: `${selectionColor}.contrast`\n }\n }\n }\n\n return (\n <DocumentProvider value={_document ? { document: _document, id: docid } : undefined}>\n <CSSCacheProvider cacheId={CSSCacheId}>\n <AppRootProvider element={() => rootRef.current}>\n <ThemeProvider\n theme={theme}\n onThemeChange={(t) => {\n onThemeChange && onThemeChange(t)\n Cookie.set(\"xuitm\", t.name)\n }}\n {...props}\n ref={mergeRef}\n isRoot\n sx={{\n ...props.sx,\n ...(visibility === \"hidden\" ? { visibility: \"hidden\" } : {}),\n ...selection\n }}\n >\n <BreakpointProvider defaultKey={defaultBreakpoint ?? \"xl\"}>\n {children}\n {!disableRenderar && <RenderRenderar />}\n </BreakpointProvider>\n </ThemeProvider>\n </AppRootProvider>\n </CSSCacheProvider>\n </DocumentProvider>\n )\n})\n\nexport default AppRoot\n\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAuBA;;;;AAIG;;;;AAIA;AACA;;;AAIA;;;AAIG;;;;;AAKA;;;AAGA;AACA;AACG;AACH;;;AAIH;AACG;AACG;;;AAGC;;;;AAWW;;AAEH;AAmBlB;;"}
1
+ {"version":3,"file":"index.cjs","sources":["../../src/AppRoot/index.tsx"],"sourcesContent":["\"use client\";\nimport React, { useEffect, useId, useLayoutEffect, useRef } from 'react';\nimport { TagComponentType } from '../Tag/types';\nimport { ThemeProvider, ThemeProviderProps } from '../theme';\nimport { BreakpointProvider } from '../breakpoint';\nimport { RenderRenderar } from './Renderar';\nimport { DocumentProvider } from '../Document';\nimport { AppRootProvider } from './AppRootProvider';\nimport useMergeRefs from '../hooks/useMergeRefs';\nimport { CSSCacheProvider } from '../css/CSSCacheProvider';\nimport { BreakpointKeys } from '../css/types';\nimport Cookie from '../cookie';\nimport { ThemeColorKeys } from '../theme/types';\n\nexport type AppRootProps<T extends TagComponentType = \"div\"> = ThemeProviderProps<T> & {\n noScrollbarCss?: boolean;\n document?: Document;\n CSSCacheId?: string;\n disableRenderar?: boolean;\n defaultBreakpoint?: BreakpointKeys\n selectionColor?: ThemeColorKeys\n}\n\nconst AppRoot = React.forwardRef(<T extends TagComponentType = \"div\">({ children, defaultBreakpoint, noScrollbarCss, CSSCacheId, theme, onThemeChange, disableRenderar, selectionColor, document: _document, ...props }: AppRootProps<T>, ref: React.Ref<any>) => {\n\n noScrollbarCss ??= false\n selectionColor ??= \"primary\"\n if (typeof window !== \"undefined\") {\n _document ??= document\n }\n disableRenderar ??= false\n const docid = useId()\n const csscacheId = useId()\n CSSCacheId ??= csscacheId\n\n const [visibility, setVisibility] = React.useState<string>(!defaultBreakpoint ? \"hidden\" : \"\");\n const rootRef = useRef(null)\n const mergeRef = useMergeRefs(rootRef, ref)\n\n useLayoutEffect(() => {\n !defaultBreakpoint && setVisibility(\"\");\n }, [])\n\n useEffect(() => {\n if (typeof _document === 'undefined') return;\n if (!Cookie.exists(\"xuitm\") && theme.name) {\n Cookie.set(\"xuitm\", theme.name)\n }\n const styles = Array.from(_document.querySelectorAll('body style[data-oncss]'));\n styles.forEach((style) => {\n _document.head.appendChild(style);\n });\n }, [])\n\n let selection: any = {}\n if (selectionColor && selectionColor !== 'surface') {\n selection = {\n \"&::selection\": {\n bgcolor: `${selectionColor}.light`,\n color: `${selectionColor}.contrast`\n }\n }\n }\n\n return (\n <DocumentProvider value={_document ? { document: _document, id: docid } : undefined}>\n <CSSCacheProvider cacheId={CSSCacheId}>\n <AppRootProvider element={() => rootRef.current}>\n <ThemeProvider\n theme={theme}\n onThemeChange={(t) => {\n onThemeChange && onThemeChange(t)\n Cookie.set(\"xuitm\", t.name)\n }}\n {...props}\n ref={mergeRef}\n isRoot\n sx={{\n ...props.sx,\n ...(visibility === \"hidden\" ? { visibility: \"hidden\" } : {}),\n ...selection\n }}\n >\n <BreakpointProvider defaultKey={defaultBreakpoint ?? \"xl\"}>\n {children}\n {!disableRenderar && <RenderRenderar />}\n </BreakpointProvider>\n </ThemeProvider>\n </AppRootProvider>\n </CSSCacheProvider>\n </DocumentProvider>\n )\n})\n\nexport default AppRoot\n\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAuBA;;;;AAIG;;;;AAIA;AACA;;;AAIA;;;AAIG;;;;;AAKA;;;AAGA;AACA;AACG;AACH;;;AAIH;AACG;AACG;;;AAGC;;;;AAWW;;AAEH;AAmBlB;;"}
package/AppRoot/index.js CHANGED
@@ -47,7 +47,7 @@ const AppRoot = React__default.forwardRef((_a, ref) => {
47
47
  if (selectionColor && selectionColor !== 'surface') {
48
48
  selection = {
49
49
  "&::selection": {
50
- bgcolor: `${selectionColor}.main`,
50
+ bgcolor: `${selectionColor}.light`,
51
51
  color: `${selectionColor}.contrast`
52
52
  }
53
53
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../src/AppRoot/index.tsx"],"sourcesContent":["\"use client\";\nimport React, { useEffect, useId, useLayoutEffect, useRef } from 'react';\nimport { TagComponentType } from '../Tag/types';\nimport { ThemeProvider, ThemeProviderProps } from '../theme';\nimport { BreakpointProvider } from '../breakpoint';\nimport { RenderRenderar } from './Renderar';\nimport { DocumentProvider } from '../Document';\nimport { AppRootProvider } from './AppRootProvider';\nimport useMergeRefs from '../hooks/useMergeRefs';\nimport { CSSCacheProvider } from '../css/CSSCacheProvider';\nimport { BreakpointKeys } from '../css/types';\nimport Cookie from '../cookie';\nimport { ThemeColorKeys } from '../theme/types';\n\nexport type AppRootProps<T extends TagComponentType = \"div\"> = ThemeProviderProps<T> & {\n noScrollbarCss?: boolean;\n document?: Document;\n CSSCacheId?: string;\n disableRenderar?: boolean;\n defaultBreakpoint?: BreakpointKeys\n selectionColor?: ThemeColorKeys\n}\n\nconst AppRoot = React.forwardRef(<T extends TagComponentType = \"div\">({ children, defaultBreakpoint, noScrollbarCss, CSSCacheId, theme, onThemeChange, disableRenderar, selectionColor, document: _document, ...props }: AppRootProps<T>, ref: React.Ref<any>) => {\n\n noScrollbarCss ??= false\n selectionColor ??= \"primary\"\n if (typeof window !== \"undefined\") {\n _document ??= document\n }\n disableRenderar ??= false\n const docid = useId()\n const csscacheId = useId()\n CSSCacheId ??= csscacheId\n\n const [visibility, setVisibility] = React.useState<string>(!defaultBreakpoint ? \"hidden\" : \"\");\n const rootRef = useRef(null)\n const mergeRef = useMergeRefs(rootRef, ref)\n\n useLayoutEffect(() => {\n !defaultBreakpoint && setVisibility(\"\");\n }, [])\n\n useEffect(() => {\n if (typeof _document === 'undefined') return;\n if (!Cookie.exists(\"xuitm\") && theme.name) {\n Cookie.set(\"xuitm\", theme.name)\n }\n const styles = Array.from(_document.querySelectorAll('body style[data-oncss]'));\n styles.forEach((style) => {\n _document.head.appendChild(style);\n });\n }, [])\n\n let selection: any = {}\n if (selectionColor && selectionColor !== 'surface') {\n selection = {\n \"&::selection\": {\n bgcolor: `${selectionColor}.main`,\n color: `${selectionColor}.contrast`\n }\n }\n }\n\n return (\n <DocumentProvider value={_document ? { document: _document, id: docid } : undefined}>\n <CSSCacheProvider cacheId={CSSCacheId}>\n <AppRootProvider element={() => rootRef.current}>\n <ThemeProvider\n theme={theme}\n onThemeChange={(t) => {\n onThemeChange && onThemeChange(t)\n Cookie.set(\"xuitm\", t.name)\n }}\n {...props}\n ref={mergeRef}\n isRoot\n sx={{\n ...props.sx,\n ...(visibility === \"hidden\" ? { visibility: \"hidden\" } : {}),\n ...selection\n }}\n >\n <BreakpointProvider defaultKey={defaultBreakpoint ?? \"xl\"}>\n {children}\n {!disableRenderar && <RenderRenderar />}\n </BreakpointProvider>\n </ThemeProvider>\n </AppRootProvider>\n </CSSCacheProvider>\n </DocumentProvider>\n )\n})\n\nexport default AppRoot\n\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAuBA;;;;AAIG;;;;AAIA;AACA;;;AAIA;;;AAIG;;;;;AAKA;;;AAGA;AACA;AACG;AACH;;;AAIH;AACG;AACG;;;AAGC;;;;AAWW;;AAEH;AAmBlB;;"}
1
+ {"version":3,"file":"index.js","sources":["../../src/AppRoot/index.tsx"],"sourcesContent":["\"use client\";\nimport React, { useEffect, useId, useLayoutEffect, useRef } from 'react';\nimport { TagComponentType } from '../Tag/types';\nimport { ThemeProvider, ThemeProviderProps } from '../theme';\nimport { BreakpointProvider } from '../breakpoint';\nimport { RenderRenderar } from './Renderar';\nimport { DocumentProvider } from '../Document';\nimport { AppRootProvider } from './AppRootProvider';\nimport useMergeRefs from '../hooks/useMergeRefs';\nimport { CSSCacheProvider } from '../css/CSSCacheProvider';\nimport { BreakpointKeys } from '../css/types';\nimport Cookie from '../cookie';\nimport { ThemeColorKeys } from '../theme/types';\n\nexport type AppRootProps<T extends TagComponentType = \"div\"> = ThemeProviderProps<T> & {\n noScrollbarCss?: boolean;\n document?: Document;\n CSSCacheId?: string;\n disableRenderar?: boolean;\n defaultBreakpoint?: BreakpointKeys\n selectionColor?: ThemeColorKeys\n}\n\nconst AppRoot = React.forwardRef(<T extends TagComponentType = \"div\">({ children, defaultBreakpoint, noScrollbarCss, CSSCacheId, theme, onThemeChange, disableRenderar, selectionColor, document: _document, ...props }: AppRootProps<T>, ref: React.Ref<any>) => {\n\n noScrollbarCss ??= false\n selectionColor ??= \"primary\"\n if (typeof window !== \"undefined\") {\n _document ??= document\n }\n disableRenderar ??= false\n const docid = useId()\n const csscacheId = useId()\n CSSCacheId ??= csscacheId\n\n const [visibility, setVisibility] = React.useState<string>(!defaultBreakpoint ? \"hidden\" : \"\");\n const rootRef = useRef(null)\n const mergeRef = useMergeRefs(rootRef, ref)\n\n useLayoutEffect(() => {\n !defaultBreakpoint && setVisibility(\"\");\n }, [])\n\n useEffect(() => {\n if (typeof _document === 'undefined') return;\n if (!Cookie.exists(\"xuitm\") && theme.name) {\n Cookie.set(\"xuitm\", theme.name)\n }\n const styles = Array.from(_document.querySelectorAll('body style[data-oncss]'));\n styles.forEach((style) => {\n _document.head.appendChild(style);\n });\n }, [])\n\n let selection: any = {}\n if (selectionColor && selectionColor !== 'surface') {\n selection = {\n \"&::selection\": {\n bgcolor: `${selectionColor}.light`,\n color: `${selectionColor}.contrast`\n }\n }\n }\n\n return (\n <DocumentProvider value={_document ? { document: _document, id: docid } : undefined}>\n <CSSCacheProvider cacheId={CSSCacheId}>\n <AppRootProvider element={() => rootRef.current}>\n <ThemeProvider\n theme={theme}\n onThemeChange={(t) => {\n onThemeChange && onThemeChange(t)\n Cookie.set(\"xuitm\", t.name)\n }}\n {...props}\n ref={mergeRef}\n isRoot\n sx={{\n ...props.sx,\n ...(visibility === \"hidden\" ? { visibility: \"hidden\" } : {}),\n ...selection\n }}\n >\n <BreakpointProvider defaultKey={defaultBreakpoint ?? \"xl\"}>\n {children}\n {!disableRenderar && <RenderRenderar />}\n </BreakpointProvider>\n </ThemeProvider>\n </AppRootProvider>\n </CSSCacheProvider>\n </DocumentProvider>\n )\n})\n\nexport default AppRoot\n\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAuBA;;;;AAIG;;;;AAIA;AACA;;;AAIA;;;AAIG;;;;;AAKA;;;AAGA;AACA;AACG;AACH;;;AAIH;AACG;AACG;;;AAGC;;;;AAWW;;AAEH;AAmBlB;;"}
package/css/getProps.cjs CHANGED
@@ -15,13 +15,7 @@ const getProps = (prop, value, _css) => {
15
15
  opacity: "0.6!important",
16
16
  transition: "none",
17
17
  boxShadow: "none",
18
- color: `surface.muted!important`,
19
- borderColor: `transparent!important`,
20
18
  };
21
- if (_css.bgcolor && _css.bgcolor !== 'transparent') {
22
- c.bgcolor = `surface.dark!important`;
23
- c.borderColor = `surface.dark!important`;
24
- }
25
19
  return c;
26
20
  }
27
21
  return {};
@@ -1 +1 @@
1
- {"version":3,"file":"getProps.cjs","sources":["../../src/css/getProps.ts"],"sourcesContent":["import { CSSProps } from \"./types\";\n\nconst getProps = (prop: string, value: string, _css: CSSProps) => {\n let important;\n if (typeof value === 'string') {\n const split = value.split(\"!\")\n important = split[1] ? \"!important\" : \"\"\n value = split[0]\n }\n\n if (prop === 'disabled') {\n if ((value as any) === true) {\n let c: any = {\n pointerEvents: \"none!important\",\n cursor: \"not-allowed!important\",\n userSelect: \"none!important\",\n opacity: \"0.6!important\",\n transition: \"none\",\n boxShadow: \"none\",\n color: `surface.muted!important`,\n borderColor: `transparent!important`,\n }\n\n if ((_css as any).bgcolor && (_css as any).bgcolor !== 'transparent') {\n c.bgcolor = `surface.dark!important`\n c.borderColor = `surface.dark!important`\n }\n return c\n }\n return {}\n }\n\n\n if (prop === \"spacing\" && typeof value === \"number\") {\n const val = value * 8;\n const hasWidth = \"width\" in _css;\n const width = `calc(${hasWidth ? _css.width : \"100%\"} + ${val}px)`;\n return {\n marginLeft: `-${val}px`,\n marginTop: `-${val}px`,\n width: width,\n\n \"& > *\": {\n paddingLeft: `${val}px`,\n paddingTop: `${val}px`,\n },\n } as any;\n }\n\n\n\n // if (value && typeof value === \"number\" && [\"border\", \"borderRight\", \"borderLeft\", \"borderTop\", \"borderBottom\"].includes(prop as any)) {\n // const keys: any = Object.keys(_css)\n // let p: any = {\n // [`${prop}Width`]: value + 'px' + (important || \"\"),\n // }\n // // if (!keys.includes(`${prop}Color`)) {\n // // p[`${prop}Color`] = \"surface.divider\"\n // // }\n // if (!keys.includes(`${prop}Style`)) {\n // p[`${prop}Style`] = \"solid\"\n // }\n // return p\n // }\n}\n\nexport default getProps"],"names":[],"mappings":";;AAEA,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAE,KAAa,EAAE,IAAc,KAAI;AAE7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AA,CAAI;YACvB,SAAS,EAAE,CAAA,CAAA,EAAI,GAAG,CAAA,EAAA,CAAI;AACtB,YAAA,KAAK,EAAE,KAAK;AAEZ,YAAA,OAAO,EAAE;gBACL,WAAW,EAAE,CAAA,EAAG,GAAG,CAAA,EAAA,CAAI;gBACvB,UAAU,EAAE,CAAA,EAAG,GAAG,CAAA,EAAA,CAAI;AACzB,aAAA;SACG;IACZ;;;;;;;;;;;;;;AAiBJ;;;;"}
1
+ {"version":3,"file":"getProps.cjs","sources":["../../src/css/getProps.ts"],"sourcesContent":["import { CSSProps } from \"./types\";\n\nconst getProps = (prop: string, value: string, _css: CSSProps) => {\n let important;\n if (typeof value === 'string') {\n const split = value.split(\"!\")\n important = split[1] ? \"!important\" : \"\"\n value = split[0]\n }\n\n if (prop === 'disabled') {\n if ((value as any) === true) {\n let c: any = {\n pointerEvents: \"none!important\",\n cursor: \"not-allowed!important\",\n userSelect: \"none!important\",\n opacity: \"0.6!important\",\n transition: \"none\",\n boxShadow: \"none\",\n }\n return c\n }\n return {}\n }\n\n\n if (prop === \"spacing\" && typeof value === \"number\") {\n const val = value * 8;\n const hasWidth = \"width\" in _css;\n const width = `calc(${hasWidth ? _css.width : \"100%\"} + ${val}px)`;\n return {\n marginLeft: `-${val}px`,\n marginTop: `-${val}px`,\n width: width,\n\n \"& > *\": {\n paddingLeft: `${val}px`,\n paddingTop: `${val}px`,\n },\n } as any;\n }\n\n\n\n // if (value && typeof value === \"number\" && [\"border\", \"borderRight\", \"borderLeft\", \"borderTop\", \"borderBottom\"].includes(prop as any)) {\n // const keys: any = Object.keys(_css)\n // let p: any = {\n // [`${prop}Width`]: value + 'px' + (important || \"\"),\n // }\n // // if (!keys.includes(`${prop}Color`)) {\n // // p[`${prop}Color`] = \"surface.divider\"\n // // }\n // if (!keys.includes(`${prop}Style`)) {\n // p[`${prop}Style`] = \"solid\"\n // }\n // return p\n // }\n}\n\nexport default getProps"],"names":[],"mappings":";;AAEA,MAAM,QAAQ,GAA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ACzB,aAAA;SACG;IACZ;;;;;;;;;;;;;;AAiBJ;;;;"}
package/css/getProps.js CHANGED
@@ -13,13 +13,7 @@ const getProps = (prop, value, _css) => {
13
13
  opacity: "0.6!important",
14
14
  transition: "none",
15
15
  boxShadow: "none",
16
- color: `surface.muted!important`,
17
- borderColor: `transparent!important`,
18
16
  };
19
- if (_css.bgcolor && _css.bgcolor !== 'transparent') {
20
- c.bgcolor = `surface.dark!important`;
21
- c.borderColor = `surface.dark!important`;
22
- }
23
17
  return c;
24
18
  }
25
19
  return {};
@@ -1 +1 @@
1
- {"version":3,"file":"getProps.js","sources":["../../src/css/getProps.ts"],"sourcesContent":["import { CSSProps } from \"./types\";\n\nconst getProps = (prop: string, value: string, _css: CSSProps) => {\n let important;\n if (typeof value === 'string') {\n const split = value.split(\"!\")\n important = split[1] ? \"!important\" : \"\"\n value = split[0]\n }\n\n if (prop === 'disabled') {\n if ((value as any) === true) {\n let c: any = {\n pointerEvents: \"none!important\",\n cursor: \"not-allowed!important\",\n userSelect: \"none!important\",\n opacity: \"0.6!important\",\n transition: \"none\",\n boxShadow: \"none\",\n color: `surface.muted!important`,\n borderColor: `transparent!important`,\n }\n\n if ((_css as any).bgcolor && (_css as any).bgcolor !== 'transparent') {\n c.bgcolor = `surface.dark!important`\n c.borderColor = `surface.dark!important`\n }\n return c\n }\n return {}\n }\n\n\n if (prop === \"spacing\" && typeof value === \"number\") {\n const val = value * 8;\n const hasWidth = \"width\" in _css;\n const width = `calc(${hasWidth ? _css.width : \"100%\"} + ${val}px)`;\n return {\n marginLeft: `-${val}px`,\n marginTop: `-${val}px`,\n width: width,\n\n \"& > *\": {\n paddingLeft: `${val}px`,\n paddingTop: `${val}px`,\n },\n } as any;\n }\n\n\n\n // if (value && typeof value === \"number\" && [\"border\", \"borderRight\", \"borderLeft\", \"borderTop\", \"borderBottom\"].includes(prop as any)) {\n // const keys: any = Object.keys(_css)\n // let p: any = {\n // [`${prop}Width`]: value + 'px' + (important || \"\"),\n // }\n // // if (!keys.includes(`${prop}Color`)) {\n // // p[`${prop}Color`] = \"surface.divider\"\n // // }\n // if (!keys.includes(`${prop}Style`)) {\n // p[`${prop}Style`] = \"solid\"\n // }\n // return p\n // }\n}\n\nexport default getProps"],"names":[],"mappings":"AAEA,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAE,KAAa,EAAE,IAAc,KAAI;AAE7D,IAAA,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAC3B,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC;AAC9B,QAAY,KAAK,CAAC,CAAC,CAAC,GAAG,YAAY,GAAG,EAAE;AACxC,QAAA,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC;IACpB;AAEA,IAAA,IAAI,IAAI,KAAK,UAAU,EAAE;AACrB,QAAA,IAAK,KAAa,KAAK,IAAI,EAAE;AACzB,YAAA,IAAI,CAAC,GAAQ;AACT,gBAAA,aAAa,EAAE,gBAAgB;AAC/B,gBAAA,MAAM,EAAE,uBAAuB;AAC/B,gBAAA,UAAU,EAAE,gBAAgB;AAC5B,gBAAA,OAAO,EAAE,eAAe;AACxB,gBAAA,UAAU,EAAE,MAAM;AAClB,gBAAA,SAAS,EAAE,MAAM;AACjB,gBAAA,KAAK,EAAE,CAAA,uBAAA,CAAyB;AAChC,gBAAA,WAAW,EAAE,CAAA,qBAAA,CAAuB;aACvC;YAED,IAAK,IAAY,CAAC,OAAO,IAAK,IAAY,CAAC,OAAO,KAAK,aAAa,EAAE;AAClE,gBAAA,CAAC,CAAC,OAAO,GAAG,CAAA,sBAAA,CAAwB;AACpC,gBAAA,CAAC,CAAC,WAAW,GAAG,CAAA,sBAAA,CAAwB;YAC5C;AACA,YAAA,OAAO,CAAC;QACZ;AACA,QAAA,OAAO,EAAE;IACb;IAGA,IAAI,IAAI,KAAK,SAAS,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AACjD,QAAA,MAAM,GAAG,GAAG,KAAK,GAAG,CAAC;AACrB,QAAA,MAAM,QAAQ,GAAG,OAAO,IAAI,IAAI;AAChC,QAAA,MAAM,KAAK,GAAG,CAAA,KAAA,EAAQ,QAAQ,GAAG,IAAI,CAAC,KAAK,GAAG,MAAM,CAAA,GAAA,EAAM,GAAG,KAAK;QAClE,OAAO;YACH,UAAU,EAAE,CAAA,CAAA,EAAI,GAAG,CAAA,EAAA,CAAI;YACvB,SAAS,EAAE,CAAA,CAAA,EAAI,GAAG,CAAA,EAAA,CAAI;AACtB,YAAA,KAAK,EAAE,KAAK;AAEZ,YAAA,OAAO,EAAE;gBACL,WAAW,EAAE,CAAA,EAAG,GAAG,CAAA,EAAA,CAAI;gBACvB,UAAU,EAAE,CAAA,EAAG,GAAG,CAAA,EAAA,CAAI;AACzB,aAAA;SACG;IACZ;;;;;;;;;;;;;;AAiBJ;;;;"}
1
+ {"version":3,"file":"getProps.js","sources":["../../src/css/getProps.ts"],"sourcesContent":["import { CSSProps } from \"./types\";\n\nconst getProps = (prop: string, value: string, _css: CSSProps) => {\n let important;\n if (typeof value === 'string') {\n const split = value.split(\"!\")\n important = split[1] ? \"!important\" : \"\"\n value = split[0]\n }\n\n if (prop === 'disabled') {\n if ((value as any) === true) {\n let c: any = {\n pointerEvents: \"none!important\",\n cursor: \"not-allowed!important\",\n userSelect: \"none!important\",\n opacity: \"0.6!important\",\n transition: \"none\",\n boxShadow: \"none\",\n }\n return c\n }\n return {}\n }\n\n\n if (prop === \"spacing\" && typeof value === \"number\") {\n const val = value * 8;\n const hasWidth = \"width\" in _css;\n const width = `calc(${hasWidth ? _css.width : \"100%\"} + ${val}px)`;\n return {\n marginLeft: `-${val}px`,\n marginTop: `-${val}px`,\n width: width,\n\n \"& > *\": {\n paddingLeft: `${val}px`,\n paddingTop: `${val}px`,\n },\n } as any;\n }\n\n\n\n // if (value && typeof value === \"number\" && [\"border\", \"borderRight\", \"borderLeft\", \"borderTop\", \"borderBottom\"].includes(prop as any)) {\n // const keys: any = Object.keys(_css)\n // let p: any = {\n // [`${prop}Width`]: value + 'px' + (important || \"\"),\n // }\n // // if (!keys.includes(`${prop}Color`)) {\n // // p[`${prop}Color`] = \"surface.divider\"\n // // }\n // if (!keys.includes(`${prop}Style`)) {\n // p[`${prop}Style`] = \"solid\"\n // }\n // return p\n // }\n}\n\nexport default getProps"],"names":[],"mappings":"AAEA,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAE,KAAa,EAAE,IAAc,KAAI;AAE7D,IAAA,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAC3B,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC;AAC9B,QAAY,KAAK,CAAC,CAAC,CAAC,GAAG,YAAY,GAAG,EAAE;AACxC,QAAA,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC;IACpB;AAEA,IAAA,IAAI,IAAI,KAAK,UAAU,EAAE;AACrB,QAAA,IAAK,KAAa,KAAK,IAAI,EAAE;AACzB,YAAA,IAAI,CAAC,GAAQ;AACT,gBAAA,aAAa,EAAE,gBAAgB;AAC/B,gBAAA,MAAM,EAAE,uBAAuB;AAC/B,gBAAA,UAAU,EAAE,gBAAgB;AAC5B,gBAAA,OAAO,EAAE,eAAe;AACxB,gBAAA,UAAU,EAAE,MAAM;AAClB,gBAAA,SAAS,EAAE,MAAM;aACpB;AACD,YAAA,OAAO,CAAC;QACZ;AACA,QAAA,OAAO,EAAE;IACb;IAGA,IAAI,IAAI,KAAK,SAAS,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AACjD,QAAA,MAAM,GAAG,GAAG,KAAK,GAAG,CAAC;AACrB,QAAA,MAAM,QAAQ,GAAG,OAAO,IAAI,IAAI;AAChC,QAAA,MAAM,KAAK,GAAG,CAAA,KAAA,EAAQ,QAAQ,GAAG,IAAI,CAAC,KAAK,GAAG,MAAM,CAAA,GAAA,EAAM,GAAG,KAAK;QAClE,OAAO;YACH,UAAU,EAAE,CAAA,CAAA,EAAI,GAAG,CAAA,EAAA,CAAI;YACvB,SAAS,EAAE,CAAA,CAAA,EAAI,GAAG,CAAA,EAAA,CAAI;AACtB,YAAA,KAAK,EAAE,KAAK;AAEZ,YAAA,OAAO,EAAE;gBACL,WAAW,EAAE,CAAA,EAAG,GAAG,CAAA,EAAA,CAAI;gBACvB,UAAU,EAAE,CAAA,EAAG,GAAG,CAAA,EAAA,CAAI;AACzB,aAAA;SACG;IACZ;;;;;;;;;;;;;;AAiBJ;;;;"}
package/css/getValue.cjs CHANGED
@@ -5,10 +5,11 @@ const getColor = (color) => {
5
5
  [`${color}`]: `var(--color-${color}-main)`,
6
6
  [`${color}.main`]: `var(--color-${color}-main)`,
7
7
  [`${color}.light`]: `var(--color-${color}-light)`,
8
+ [`${color}.lighter`]: `var(--color-${color}-lighter)`,
8
9
  [`${color}.dark`]: `var(--color-${color}-dark)`,
10
+ [`${color}.darker`]: `var(--color-${color}-darker)`,
9
11
  [`${color}.contrast`]: `var(--color-${color}-contrast)`,
10
12
  [`${color}.muted`]: `var(--color-${color}-muted)`,
11
- [`${color}.disabled`]: `var(--color-${color}-disabled)`,
12
13
  [`${color}.divider`]: `var(--color-${color}-divider)`,
13
14
  [`${color}.ghost`]: `var(--color-${color}-ghost)`,
14
15
  };
@@ -1 +1 @@
1
- {"version":3,"file":"getValue.cjs","sources":["../../src/css/getValue.ts"],"sourcesContent":["import { CSSProps } from \"./types\"\n\nconst getColor = (color: string) => {\n const i = {\n [`${color}`]: `var(--color-${color}-main)`,\n [`${color}.main`]: `var(--color-${color}-main)`,\n [`${color}.light`]: `var(--color-${color}-light)`,\n [`${color}.dark`]: `var(--color-${color}-dark)`,\n [`${color}.contrast`]: `var(--color-${color}-contrast)`,\n [`${color}.muted`]: `var(--color-${color}-muted)`,\n [`${color}.disabled`]: `var(--color-${color}-disabled)`,\n [`${color}.divider`]: `var(--color-${color}-divider)`,\n [`${color}.ghost`]: `var(--color-${color}-ghost)`,\n }\n\n return i\n}\n\nconst withImportant = (important: any, value: any) => important ? value + important : value\nconst colors: any = {\n ...getColor(\"surface\"),\n ...getColor(\"primary\"),\n ...getColor(\"accent\"),\n ...getColor(\"info\"),\n ...getColor(\"success\"),\n ...getColor(\"warning\"),\n ...getColor(\"danger\"),\n}\n\nconst breakpoints: any = {\n \"xs\": \"var(--bp-xs)\",\n \"sm\": \"var(--bp-sm)\",\n \"md\": \"var(--bp-md)\",\n \"lg\": \"var(--bp-lg)\",\n \"xl\": \"var(--bp-xl)\"\n}\n\nlet fontsizes: any = {\n \"h1\": \"var(--fontsize-h1)\",\n \"h2\": \"var(--fontsize-h2)\",\n \"h3\": \"var(--fontsize-h3)\",\n \"h4\": \"var(--fontsize-h4)\",\n \"h5\": \"var(--fontsize-h5)\",\n \"h6\": \"var(--fontsize-h6)\",\n \"big\": \"var(--fontsize-big)\",\n \"text\": \"var(--fontsize-text)\",\n \"button\": \"var(--fontsize-button)\",\n \"small\": \"var(--fontsize-small)\"\n}\n\nlet lineHeights: any = {\n \"h1\": \"var(--lineheight-h1)\",\n \"h2\": \"var(--lineheight-h2)\",\n \"h3\": \"var(--lineheight-h3)\",\n \"h4\": \"var(--lineheight-h4)\",\n \"h5\": \"var(--lineheight-h5)\",\n \"h6\": \"var(--lineheight-h6)\",\n \"big\": \"var(--lineheight-big)\",\n \"text\": \"var(--lineheight-text)\",\n \"button\": \"var(--lineheight-button)\",\n \"small\": \"var(--lineheight-small)\"\n}\n\nlet fontWeights: any = {\n \"h1\": \"var(--fontweight-h1)\",\n \"h2\": \"var(--fontweight-h2)\",\n \"h3\": \"var(--fontweight-h3)\",\n \"h4\": \"var(--fontweight-h4)\",\n \"h5\": \"var(--fontweight-h5)\",\n \"h6\": \"var(--fontweight-h6)\",\n \"big\": \"var(--fontweight-big)\",\n \"text\": \"var(--fontweight-text)\",\n \"button\": \"var(--fontweight-button)\",\n \"small\": \"var(--fontweight-small)\"\n}\n\nlet font: any = {\n \"h1\": \"var(--font-h1)\",\n \"h2\": \"var(--font-h2)\",\n \"h3\": \"var(--font-h3)\",\n \"h4\": \"var(--font-h4)\",\n \"h5\": \"var(--font-h5)\",\n \"h6\": \"var(--font-h6)\",\n \"big\": \"var(--font-big)\",\n \"text\": \"var(--font-text)\",\n \"button\": \"var(--font-button)\",\n \"small\": \"var(--font-small)\"\n}\n\nconst getValue = (prop: any, value: string | number, _css: CSSProps): any => {\n let important;\n\n if (typeof value === 'string') {\n const split = value.split(\"!\")\n important = split[1] ? \"!important\" : \"\"\n value = split[0]\n }\n\n if (['width', 'maxWidth', 'minWidth', 'max-width', 'min-width'].includes(prop)) {\n return withImportant(important, breakpoints[value] || value)\n } else if (prop === 'font' && typeof value === \"string\" && ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'text', 'button', 'small'].includes(value)) {\n return withImportant(important, font[value] || value)\n } else if (['fontWeight', 'font-weight'].includes(prop) && typeof value === 'string' && ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'text', 'button', 'small'].includes(value)) {\n return withImportant(important, fontWeights[value] || value)\n } else if (['lineHeight', 'line-height'].includes(prop) && typeof value === 'string' && ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'text', 'button', 'small'].includes(value)) {\n return withImportant(important, lineHeights[value] || value)\n } else if (['fontSize', 'font-size'].includes(prop) && typeof value === 'string') {\n return withImportant(important, fontsizes[value] || value)\n } else if (typeof value === \"number\" && [\"shadow\", \"boxShadow\"].includes(prop)) {\n return withImportant(important, `var(--shadow-${value})`)\n }\n\n return withImportant(important, colors[value] || value)\n}\n\nexport default getValue"],"names":[],"mappings":";;AAEA,MAAM,QAAQ,GAAG,CAAC,KAAa,KAAI;AAC/B,IAAA,MAAM,CAAC,GAAG;AACN,QAAA,CAAC,GAAG,KAAK,CAAA,CAAE,GAAG,CAAA,YAAA,EAAe,KAAK,CAAA,MAAA,CAAQ;AAC1C,QAAA,CAAC,GAAG,KAAK,CAAA,KAAA,CAAO,GAAG,CAAA,YAAA,EAAe,KAAK,CAAA,MAAA,CAAQ;AAC/C,QAAA,CAAC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js","sources":["../../src/css/getValue.ts"],"sourcesContent":["import { CSSProps } from \"./types\"\n\nconst getColor = (color: string) => {\n const i = {\n [`${color}`]: `var(--color-${color}-main)`,\n [`${color}.main`]: `var(--color-${color}-main)`,\n [`${color}.light`]: `var(--color-${color}-light)`,\n [`${color}.lighter`]: `var(--color-${color}-lighter)`,\n [`${color}.dark`]: `var(--color-${color}-dark)`,\n [`${color}.darker`]: `var(--color-${color}-darker)`,\n [`${color}.contrast`]: `var(--color-${color}-contrast)`,\n [`${color}.muted`]: `var(--color-${color}-muted)`,\n [`${color}.divider`]: `var(--color-${color}-divider)`,\n [`${color}.ghost`]: `var(--color-${color}-ghost)`,\n }\n\n return i\n}\n\nconst withImportant = (important: any, value: any) => important ? value + important : value\nconst colors: any = {\n ...getColor(\"surface\"),\n ...getColor(\"primary\"),\n ...getColor(\"accent\"),\n ...getColor(\"info\"),\n ...getColor(\"success\"),\n ...getColor(\"warning\"),\n ...getColor(\"danger\"),\n}\n\nconst breakpoints: any = {\n \"xs\": \"var(--bp-xs)\",\n \"sm\": \"var(--bp-sm)\",\n \"md\": \"var(--bp-md)\",\n \"lg\": \"var(--bp-lg)\",\n \"xl\": \"var(--bp-xl)\"\n}\n\nlet fontsizes: any = {\n \"h1\": \"var(--fontsize-h1)\",\n \"h2\": \"var(--fontsize-h2)\",\n \"h3\": \"var(--fontsize-h3)\",\n \"h4\": \"var(--fontsize-h4)\",\n \"h5\": \"var(--fontsize-h5)\",\n \"h6\": \"var(--fontsize-h6)\",\n \"big\": \"var(--fontsize-big)\",\n \"text\": \"var(--fontsize-text)\",\n \"button\": \"var(--fontsize-button)\",\n \"small\": \"var(--fontsize-small)\"\n}\n\nlet lineHeights: any = {\n \"h1\": \"var(--lineheight-h1)\",\n \"h2\": \"var(--lineheight-h2)\",\n \"h3\": \"var(--lineheight-h3)\",\n \"h4\": \"var(--lineheight-h4)\",\n \"h5\": \"var(--lineheight-h5)\",\n \"h6\": \"var(--lineheight-h6)\",\n \"big\": \"var(--lineheight-big)\",\n \"text\": \"var(--lineheight-text)\",\n \"button\": \"var(--lineheight-button)\",\n \"small\": \"var(--lineheight-small)\"\n}\n\nlet fontWeights: any = {\n \"h1\": \"var(--fontweight-h1)\",\n \"h2\": \"var(--fontweight-h2)\",\n \"h3\": \"var(--fontweight-h3)\",\n \"h4\": \"var(--fontweight-h4)\",\n \"h5\": \"var(--fontweight-h5)\",\n \"h6\": \"var(--fontweight-h6)\",\n \"big\": \"var(--fontweight-big)\",\n \"text\": \"var(--fontweight-text)\",\n \"button\": \"var(--fontweight-button)\",\n \"small\": \"var(--fontweight-small)\"\n}\n\nlet font: any = {\n \"h1\": \"var(--font-h1)\",\n \"h2\": \"var(--font-h2)\",\n \"h3\": \"var(--font-h3)\",\n \"h4\": \"var(--font-h4)\",\n \"h5\": \"var(--font-h5)\",\n \"h6\": \"var(--font-h6)\",\n \"big\": \"var(--font-big)\",\n \"text\": \"var(--font-text)\",\n \"button\": \"var(--font-button)\",\n \"small\": \"var(--font-small)\"\n}\n\nconst getValue = (prop: any, value: string | number, _css: CSSProps): any => {\n let important;\n\n if (typeof value === 'string') {\n const split = value.split(\"!\")\n important = split[1] ? \"!important\" : \"\"\n value = split[0]\n }\n\n if (['width', 'maxWidth', 'minWidth', 'max-width', 'min-width'].includes(prop)) {\n return withImportant(important, breakpoints[value] || value)\n } else if (prop === 'font' && typeof value === \"string\" && ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'text', 'button', 'small'].includes(value)) {\n return withImportant(important, font[value] || value)\n } else if (['fontWeight', 'font-weight'].includes(prop) && typeof value === 'string' && ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'text', 'button', 'small'].includes(value)) {\n return withImportant(important, fontWeights[value] || value)\n } else if (['lineHeight', 'line-height'].includes(prop) && typeof value === 'string' && ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'text', 'button', 'small'].includes(value)) {\n return withImportant(important, lineHeights[value] || value)\n } else if (['fontSize', 'font-size'].includes(prop) && typeof value === 'string') {\n return withImportant(important, fontsizes[value] || value)\n } else if (typeof value === \"number\" && [\"shadow\", \"boxShadow\"].includes(prop)) {\n return withImportant(important, `var(--shadow-${value})`)\n }\n\n return withImportant(important, colors[value] || value)\n}\n\nexport default getValue"],"names":[],"mappings":";;AAEA,MAAM,QAAQ,GAAG,CAAC,KAAa,KAAI;AAC/B,IAAA,MAAM,CAAC,GAAG;AACN,QAAA,CAAC,GAAG,KAAK,CAAA,CAAE,GAAG,CAAA,YAAA,EAAe,KAAK,CAAA,MAAA,CAAQ;AAC1C,QAAA,CAAC,GAAG,KAAK,CAAA,KAAA,CAAO,GAAG,CAAA,YAAA,EAAe,KAAK,CAAA,MAAA,CAAQ;AAC/C,QAAA,CAAC,GAAG,KAAK,CAAA,MAAA,CAAQ,GAAG,CAAA,YAAA,EAAe,KAAK,CAAA,OAAA,CAAS;AACjD,QAAA,CAAC,GAAG,KAAK,CAAA,QAAA,CAAU,GAAG,CAAA,YAAA,EAAe,KAAK,CAAA,SAAA,CAAW;AACrD,QAAA,CAAC,GAAG,KAAK,CAAA,KAAA,CAAO,GAAG,CAAA,YAAA,EAAe,KAAK,CAAA,MAAA,CAAQ;AAC/C,QAAA,CAAC,GAAG,KAAK,CAAA,OAAA,CAAS,GAAG,CAAA,YAAA,EAAe,KAAK,CAAA,QAAA,CAAU;AACnD,QAAA,CAAC,GAAG,KAAK,CAAA,SAAA,CAAW,GAAG,CAAA,YAAA,EAAe,KAAK,CAAA,UAAA,CAAY;AACvD,QAAA,CAAC,GAAG,KAAK,CAAA,MAAA,CAAQ,GAAG,CAAA,YAAA,EAAe,KAAK,CAAA,OAAA,CAAS;AACjD,QAAA,CAAC,GAAG,KAAK,CAAA,QAAA,CAAU,GAAG,CAAA,YAAA,EAAe,KAAK,CAAA,SAAA,CAAW;AACrD,QAAA,CAAC,GAAG,KAAK,CAAA,MAAA,CAAQ,GAAG,CAAA,YAAA,EAAe,KAAK,CAAA,OAAA,CAAS;KACpD;AAED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AC,KAAK,CAAC,IAAI,KAAK,CAAC;IAChE;AAAO,SAAA,IAAI,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAC9E,OAAO,aAAa,CAAC,SAAS,EAAE,SAAS,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC;IAC9D;AAAO,SAAA,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;QAC5E,OAAO,aAAa,CAAC,SAAS,EAAE,gBAAgB,KAAK,CAAA,CAAA,CAAG,CAAC;IAC7D;IAEA,OAAO,aAAa,CAAC,SAAS,EAAE,MAAM,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC;AAC3D;;;;"}
package/css/getValue.js CHANGED
@@ -3,10 +3,11 @@ const getColor = (color) => {
3
3
  [`${color}`]: `var(--color-${color}-main)`,
4
4
  [`${color}.main`]: `var(--color-${color}-main)`,
5
5
  [`${color}.light`]: `var(--color-${color}-light)`,
6
+ [`${color}.lighter`]: `var(--color-${color}-lighter)`,
6
7
  [`${color}.dark`]: `var(--color-${color}-dark)`,
8
+ [`${color}.darker`]: `var(--color-${color}-darker)`,
7
9
  [`${color}.contrast`]: `var(--color-${color}-contrast)`,
8
10
  [`${color}.muted`]: `var(--color-${color}-muted)`,
9
- [`${color}.disabled`]: `var(--color-${color}-disabled)`,
10
11
  [`${color}.divider`]: `var(--color-${color}-divider)`,
11
12
  [`${color}.ghost`]: `var(--color-${color}-ghost)`,
12
13
  };
@@ -1 +1 @@
1
- {"version":3,"file":"getValue.js","sources":["../../src/css/getValue.ts"],"sourcesContent":["import { CSSProps } from \"./types\"\n\nconst getColor = (color: string) => {\n const i = {\n [`${color}`]: `var(--color-${color}-main)`,\n [`${color}.main`]: `var(--color-${color}-main)`,\n [`${color}.light`]: `var(--color-${color}-light)`,\n [`${color}.dark`]: `var(--color-${color}-dark)`,\n [`${color}.contrast`]: `var(--color-${color}-contrast)`,\n [`${color}.muted`]: `var(--color-${color}-muted)`,\n [`${color}.disabled`]: `var(--color-${color}-disabled)`,\n [`${color}.divider`]: `var(--color-${color}-divider)`,\n [`${color}.ghost`]: `var(--color-${color}-ghost)`,\n }\n\n return i\n}\n\nconst withImportant = (important: any, value: any) => important ? value + important : value\nconst colors: any = {\n ...getColor(\"surface\"),\n ...getColor(\"primary\"),\n ...getColor(\"accent\"),\n ...getColor(\"info\"),\n ...getColor(\"success\"),\n ...getColor(\"warning\"),\n ...getColor(\"danger\"),\n}\n\nconst breakpoints: any = {\n \"xs\": \"var(--bp-xs)\",\n \"sm\": \"var(--bp-sm)\",\n \"md\": \"var(--bp-md)\",\n \"lg\": \"var(--bp-lg)\",\n \"xl\": \"var(--bp-xl)\"\n}\n\nlet fontsizes: any = {\n \"h1\": \"var(--fontsize-h1)\",\n \"h2\": \"var(--fontsize-h2)\",\n \"h3\": \"var(--fontsize-h3)\",\n \"h4\": \"var(--fontsize-h4)\",\n \"h5\": \"var(--fontsize-h5)\",\n \"h6\": \"var(--fontsize-h6)\",\n \"big\": \"var(--fontsize-big)\",\n \"text\": \"var(--fontsize-text)\",\n \"button\": \"var(--fontsize-button)\",\n \"small\": \"var(--fontsize-small)\"\n}\n\nlet lineHeights: any = {\n \"h1\": \"var(--lineheight-h1)\",\n \"h2\": \"var(--lineheight-h2)\",\n \"h3\": \"var(--lineheight-h3)\",\n \"h4\": \"var(--lineheight-h4)\",\n \"h5\": \"var(--lineheight-h5)\",\n \"h6\": \"var(--lineheight-h6)\",\n \"big\": \"var(--lineheight-big)\",\n \"text\": \"var(--lineheight-text)\",\n \"button\": \"var(--lineheight-button)\",\n \"small\": \"var(--lineheight-small)\"\n}\n\nlet fontWeights: any = {\n \"h1\": \"var(--fontweight-h1)\",\n \"h2\": \"var(--fontweight-h2)\",\n \"h3\": \"var(--fontweight-h3)\",\n \"h4\": \"var(--fontweight-h4)\",\n \"h5\": \"var(--fontweight-h5)\",\n \"h6\": \"var(--fontweight-h6)\",\n \"big\": \"var(--fontweight-big)\",\n \"text\": \"var(--fontweight-text)\",\n \"button\": \"var(--fontweight-button)\",\n \"small\": \"var(--fontweight-small)\"\n}\n\nlet font: any = {\n \"h1\": \"var(--font-h1)\",\n \"h2\": \"var(--font-h2)\",\n \"h3\": \"var(--font-h3)\",\n \"h4\": \"var(--font-h4)\",\n \"h5\": \"var(--font-h5)\",\n \"h6\": \"var(--font-h6)\",\n \"big\": \"var(--font-big)\",\n \"text\": \"var(--font-text)\",\n \"button\": \"var(--font-button)\",\n \"small\": \"var(--font-small)\"\n}\n\nconst getValue = (prop: any, value: string | number, _css: CSSProps): any => {\n let important;\n\n if (typeof value === 'string') {\n const split = value.split(\"!\")\n important = split[1] ? \"!important\" : \"\"\n value = split[0]\n }\n\n if (['width', 'maxWidth', 'minWidth', 'max-width', 'min-width'].includes(prop)) {\n return withImportant(important, breakpoints[value] || value)\n } else if (prop === 'font' && typeof value === \"string\" && ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'text', 'button', 'small'].includes(value)) {\n return withImportant(important, font[value] || value)\n } else if (['fontWeight', 'font-weight'].includes(prop) && typeof value === 'string' && ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'text', 'button', 'small'].includes(value)) {\n return withImportant(important, fontWeights[value] || value)\n } else if (['lineHeight', 'line-height'].includes(prop) && typeof value === 'string' && ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'text', 'button', 'small'].includes(value)) {\n return withImportant(important, lineHeights[value] || value)\n } else if (['fontSize', 'font-size'].includes(prop) && typeof value === 'string') {\n return withImportant(important, fontsizes[value] || value)\n } else if (typeof value === \"number\" && [\"shadow\", \"boxShadow\"].includes(prop)) {\n return withImportant(important, `var(--shadow-${value})`)\n }\n\n return withImportant(important, colors[value] || value)\n}\n\nexport default getValue"],"names":[],"mappings":"AAEA,MAAM,QAAQ,GAAG,CAAC,KAAa,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W,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;QAC5E,OAAO,aAAa,CAAC,SAAS,EAAE,gBAAgB,KAAK,CAAA,CAAA,CAAG,CAAC;IAC7D;IAEA,OAAO,aAAa,CAAC,SAAS,EAAE,MAAM,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC;AAC3D;;;;"}
1
+ {"version":3,"file":"getValue.js","sources":["../../src/css/getValue.ts"],"sourcesContent":["import { CSSProps } from \"./types\"\n\nconst getColor = (color: string) => {\n const i = {\n [`${color}`]: `var(--color-${color}-main)`,\n [`${color}.main`]: `var(--color-${color}-main)`,\n [`${color}.light`]: `var(--color-${color}-light)`,\n [`${color}.lighter`]: `var(--color-${color}-lighter)`,\n [`${color}.dark`]: `var(--color-${color}-dark)`,\n [`${color}.darker`]: `var(--color-${color}-darker)`,\n [`${color}.contrast`]: `var(--color-${color}-contrast)`,\n [`${color}.muted`]: `var(--color-${color}-muted)`,\n [`${color}.divider`]: `var(--color-${color}-divider)`,\n [`${color}.ghost`]: `var(--color-${color}-ghost)`,\n }\n\n return i\n}\n\nconst withImportant = (important: any, value: any) => important ? value + important : value\nconst colors: any = {\n ...getColor(\"surface\"),\n ...getColor(\"primary\"),\n ...getColor(\"accent\"),\n ...getColor(\"info\"),\n ...getColor(\"success\"),\n ...getColor(\"warning\"),\n ...getColor(\"danger\"),\n}\n\nconst breakpoints: any = {\n \"xs\": \"var(--bp-xs)\",\n \"sm\": \"var(--bp-sm)\",\n \"md\": \"var(--bp-md)\",\n \"lg\": \"var(--bp-lg)\",\n \"xl\": \"var(--bp-xl)\"\n}\n\nlet fontsizes: any = {\n \"h1\": \"var(--fontsize-h1)\",\n \"h2\": \"var(--fontsize-h2)\",\n \"h3\": \"var(--fontsize-h3)\",\n \"h4\": \"var(--fontsize-h4)\",\n \"h5\": \"var(--fontsize-h5)\",\n \"h6\": \"var(--fontsize-h6)\",\n \"big\": \"var(--fontsize-big)\",\n \"text\": \"var(--fontsize-text)\",\n \"button\": \"var(--fontsize-button)\",\n \"small\": \"var(--fontsize-small)\"\n}\n\nlet lineHeights: any = {\n \"h1\": \"var(--lineheight-h1)\",\n \"h2\": \"var(--lineheight-h2)\",\n \"h3\": \"var(--lineheight-h3)\",\n \"h4\": \"var(--lineheight-h4)\",\n \"h5\": \"var(--lineheight-h5)\",\n \"h6\": \"var(--lineheight-h6)\",\n \"big\": \"var(--lineheight-big)\",\n \"text\": \"var(--lineheight-text)\",\n \"button\": \"var(--lineheight-button)\",\n \"small\": \"var(--lineheight-small)\"\n}\n\nlet fontWeights: any = {\n \"h1\": \"var(--fontweight-h1)\",\n \"h2\": \"var(--fontweight-h2)\",\n \"h3\": \"var(--fontweight-h3)\",\n \"h4\": \"var(--fontweight-h4)\",\n \"h5\": \"var(--fontweight-h5)\",\n \"h6\": \"var(--fontweight-h6)\",\n \"big\": \"var(--fontweight-big)\",\n \"text\": \"var(--fontweight-text)\",\n \"button\": \"var(--fontweight-button)\",\n \"small\": \"var(--fontweight-small)\"\n}\n\nlet font: any = {\n \"h1\": \"var(--font-h1)\",\n \"h2\": \"var(--font-h2)\",\n \"h3\": \"var(--font-h3)\",\n \"h4\": \"var(--font-h4)\",\n \"h5\": \"var(--font-h5)\",\n \"h6\": \"var(--font-h6)\",\n \"big\": \"var(--font-big)\",\n \"text\": \"var(--font-text)\",\n \"button\": \"var(--font-button)\",\n \"small\": \"var(--font-small)\"\n}\n\nconst getValue = (prop: any, value: string | number, _css: CSSProps): any => {\n let important;\n\n if (typeof value === 'string') {\n const split = value.split(\"!\")\n important = split[1] ? \"!important\" : \"\"\n value = split[0]\n }\n\n if (['width', 'maxWidth', 'minWidth', 'max-width', 'min-width'].includes(prop)) {\n return withImportant(important, breakpoints[value] || value)\n } else if (prop === 'font' && typeof value === \"string\" && ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'text', 'button', 'small'].includes(value)) {\n return withImportant(important, font[value] || value)\n } else if (['fontWeight', 'font-weight'].includes(prop) && typeof value === 'string' && ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'text', 'button', 'small'].includes(value)) {\n return withImportant(important, fontWeights[value] || value)\n } else if (['lineHeight', 'line-height'].includes(prop) && typeof value === 'string' && ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'text', 'button', 'small'].includes(value)) {\n return withImportant(important, lineHeights[value] || value)\n } else if (['fontSize', 'font-size'].includes(prop) && typeof value === 'string') {\n return withImportant(important, fontsizes[value] || value)\n } else if (typeof value === \"number\" && [\"shadow\", \"boxShadow\"].includes(prop)) {\n return withImportant(important, `var(--shadow-${value})`)\n }\n\n return withImportant(important, colors[value] || value)\n}\n\nexport default getValue"],"names":[],"mappings":"AAEA,MAAM,QAAQ,GAAG,CAAC,KAAa,KAAI;AAC/B,IAAA,MAAM,CAAC,GAAG;AACN,QAAA,CAAC,GAAG,KAAK,CAAA,CAAE,GAAG,CAAA,YAAA,EAAe,KAAK,CAAA,MAAA,CAAQ;AAC1C,QAAA,CAAC,GAAG,KAAK,CAAA,KAAA,CAAO,GAAG,CAAA,YAAA,EAAe,KAAK,CAAA,MAAA,CAAQ;AAC/C,QAAA,CAAC,GAAG,KAAK,CAAA,MAAA,CAAQ,GAAG,CAAA,YAAA,EAAe,KAAK,CAAA,OAAA,CAAS;AACjD,QAAA,CAAC,GAAG,KAAK,CAAA,QAAA,CAAU,GAAG,CAAA,YAAA,EAAe,KAAK,CAAA,SAAA,CAAW;AACrD,QAAA,CAAC,GAAG,KAAK,CAAA,KAAA,CAAO,GAAG,CAAA,YAAA,EAAe,KAAK,CAAA,MAAA,CAAQ;AAC/C,QAAA,CAAC,GAAG,KAAK,CAAA,OAAA,CAAS,GAAG,CAAA,YAAA,EAAe,KAAK,CAAA,QAAA,CAAU;AACnD,QAAA,CAAC,GAAG,KAAK,CAAA,SAAA,CAAW,GAAG,CAAA,YAAA,EAAe,KAAK,CAAA,UAAA,CAAY;AACvD,QAAA,CAAC,GAAG,KAAK,CAAA,MAAA,CAAQ,GAAG,CAAA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CAAC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;QACrK,OAAO,aAAa,CAAC,SAAS,EAAE,WAAW,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC;IAChE;AAAO,SAAA,IAAI,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAC9E,OAAO,aAAa,CAAC,SAAS,EAAE,SAAS,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC;IAC9D;AAAO,SAAA,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;QAC5E,OAAO,aAAa,CAAC,SAAS,EAAE,gBAAgB,KAAK,CAAA,CAAA,CAAG,CAAC;IAC7D;IAEA,OAAO,aAAa,CAAC,SAAS,EAAE,MAAM,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC;AAC3D;;;;"}
@@ -22,16 +22,16 @@ const useColorTemplate = (color, type) => {
22
22
  else if (type === "fill") {
23
23
  return {
24
24
  main: {
25
- bgcolor: is_def ? `surface.light` : `${color}`,
25
+ bgcolor: is_def ? `surface.dark` : `${color}`,
26
26
  color: is_def ? `surface.contrast` : `${color}.contrast`,
27
- border: "1px solid",
28
- borderColor: is_def ? `surface.divider` : `${color}.light`,
27
+ border: 0,
28
+ borderColor: 'transparent',
29
29
  },
30
30
  hover: {
31
- bgcolor: is_def ? `surface.dark` : `${color}.light`,
31
+ bgcolor: is_def ? `surface.main` : `${color}.light`,
32
32
  color: is_def ? `surface.contrast` : `${color}.contrast`,
33
- border: "1px solid",
34
- borderColor: is_def ? `surface.divider` : `${color}.light`,
33
+ border: 0,
34
+ borderColor: 'transparent',
35
35
  }
36
36
  };
37
37
  }
@@ -1 +1 @@
1
- {"version":3,"file":"useColorTemplate.cjs","sources":["../../src/hooks/useColorTemplate.ts"],"sourcesContent":["\"use client\";\n\nimport { ThemeColorKeys } from \"../theme/types\";\n\nexport type UseColorTemplateType = \"fill\" | \"outline\" | \"text\" | \"ghost\"\nexport type UseColorTemplateColor = ThemeColorKeys\n\nconst useColorTemplate = (color: UseColorTemplateColor, type: UseColorTemplateType) => {\n const is_def = color === \"surface\";\n\n if (type === \"outline\") {\n return {\n main: {\n bgcolor: `transparent`,\n color: is_def ? `surface.contrast` : `${color}.main`,\n border: \"1px solid\",\n borderColor: is_def ? `surface.muted` : `${color}.main`,\n },\n hover: {\n bgcolor: `transparent`,\n color: is_def ? `surface.contrast` : `${color}.light`,\n border: \"1px solid\",\n borderColor: is_def ? `surface.muted` : `${color}.light`,\n }\n }\n } else if (type === \"fill\") {\n return {\n main: {\n bgcolor: is_def ? `surface.light` : `${color}`,\n color: is_def ? `surface.contrast` : `${color}.contrast`,\n border: \"1px solid\",\n borderColor: is_def ? `surface.divider` : `${color}.light`,\n },\n hover: {\n bgcolor: is_def ? `surface.dark` : `${color}.light`,\n color: is_def ? `surface.contrast` : `${color}.contrast`,\n border: \"1px solid\",\n borderColor: is_def ? `surface.divider` : `${color}.light`,\n }\n }\n } else if (type === \"text\") {\n return {\n main: {\n bgcolor: \"transparent\",\n color: is_def ? `surface.contrast` : `${color}.main`,\n border: 0,\n borderColor: `transparent`,\n },\n hover: {\n bgcolor: \"transparent\",\n color: is_def ? `surface.contrast` : `${color}.light`,\n border: 0,\n borderColor: `transparent`,\n }\n }\n } else if (type === \"ghost\") {\n return {\n main: {\n bgcolor: `${color}.ghost`,\n color: is_def ? `surface.contrast` : color,\n border: 0,\n borderColor: `transparent`,\n },\n hover: {\n bgcolor: `${color}.ghost`,\n color: is_def ? `surface.contrast` : `${color}.light`,\n border: 0,\n borderColor: `transparent`,\n }\n }\n }\n\n throw new Error(`useColorTemplate: Unknown type ${type}`);\n}\n\nexport default useColorTemplate"],"names":[],"mappings":";;;AAOA;AACI;AAEA;;AAEQ;AACI;;AAEA;;AAEH;AACD;AACI;;AAEA;;AAEH;;;AAEF;;AAEC;;;AAGI;;AAEH;AACD;;;AAGI;;AAEH;;;AAEF;;AAEC;AACI;;AAEA;AACA;AACH;AACD;AACI;;AAEA;AACA;AACH;;;AAEF;;AAEC;;;AAGI;AACA;AACH;AACD;;;AAGI;AACA;AACH;;;AAIT;AACJ;;"}
1
+ {"version":3,"file":"useColorTemplate.cjs","sources":["../../src/hooks/useColorTemplate.ts"],"sourcesContent":["\"use client\";\n\nimport { ThemeColorKeys } from \"../theme/types\";\n\nexport type UseColorTemplateType = \"fill\" | \"outline\" | \"text\" | \"ghost\"\nexport type UseColorTemplateColor = ThemeColorKeys\n\nconst useColorTemplate = (color: UseColorTemplateColor, type: UseColorTemplateType) => {\n const is_def = color === \"surface\";\n\n if (type === \"outline\") {\n return {\n main: {\n bgcolor: `transparent`,\n color: is_def ? `surface.contrast` : `${color}.main`,\n border: \"1px solid\",\n borderColor: is_def ? `surface.muted` : `${color}.main`,\n },\n hover: {\n bgcolor: `transparent`,\n color: is_def ? `surface.contrast` : `${color}.light`,\n border: \"1px solid\",\n borderColor: is_def ? `surface.muted` : `${color}.light`,\n }\n }\n } else if (type === \"fill\") {\n return {\n main: {\n bgcolor: is_def ? `surface.dark` : `${color}`,\n color: is_def ? `surface.contrast` : `${color}.contrast`,\n border: 0,\n borderColor: 'transparent',\n },\n hover: {\n bgcolor: is_def ? `surface.main` : `${color}.light`,\n color: is_def ? `surface.contrast` : `${color}.contrast`,\n border: 0,\n borderColor: 'transparent',\n }\n }\n } else if (type === \"text\") {\n return {\n main: {\n bgcolor: \"transparent\",\n color: is_def ? `surface.contrast` : `${color}.main`,\n border: 0,\n borderColor: `transparent`,\n },\n hover: {\n bgcolor: \"transparent\",\n color: is_def ? `surface.contrast` : `${color}.light`,\n border: 0,\n borderColor: `transparent`,\n }\n }\n } else if (type === \"ghost\") {\n return {\n main: {\n bgcolor: `${color}.ghost`,\n color: is_def ? `surface.contrast` : color,\n border: 0,\n borderColor: `transparent`,\n },\n hover: {\n bgcolor: `${color}.ghost`,\n color: is_def ? `surface.contrast` : `${color}.light`,\n border: 0,\n borderColor: `transparent`,\n }\n }\n }\n\n throw new Error(`useColorTemplate: Unknown type ${type}`);\n}\n\nexport default useColorTemplate"],"names":[],"mappings":";;;AAOA;AACI;AAEA;;AAEQ;AACI;;AAEA;;AAEH;AACD;AACI;;AAEA;;AAEH;;;AAEF;;AAEC;;;AAGI;AACA;AACH;AACD;;;AAGI;AACA;AACH;;;AAEF;;AAEC;AACI;;AAEA;AACA;AACH;AACD;AACI;;AAEA;AACA;AACH;;;AAEF;;AAEC;;;AAGI;AACA;AACH;AACD;;;AAGI;AACA;AACH;;;AAIT;AACJ;;"}
@@ -20,16 +20,16 @@ const useColorTemplate = (color, type) => {
20
20
  else if (type === "fill") {
21
21
  return {
22
22
  main: {
23
- bgcolor: is_def ? `surface.light` : `${color}`,
23
+ bgcolor: is_def ? `surface.dark` : `${color}`,
24
24
  color: is_def ? `surface.contrast` : `${color}.contrast`,
25
- border: "1px solid",
26
- borderColor: is_def ? `surface.divider` : `${color}.light`,
25
+ border: 0,
26
+ borderColor: 'transparent',
27
27
  },
28
28
  hover: {
29
- bgcolor: is_def ? `surface.dark` : `${color}.light`,
29
+ bgcolor: is_def ? `surface.main` : `${color}.light`,
30
30
  color: is_def ? `surface.contrast` : `${color}.contrast`,
31
- border: "1px solid",
32
- borderColor: is_def ? `surface.divider` : `${color}.light`,
31
+ border: 0,
32
+ borderColor: 'transparent',
33
33
  }
34
34
  };
35
35
  }
@@ -1 +1 @@
1
- {"version":3,"file":"useColorTemplate.js","sources":["../../src/hooks/useColorTemplate.ts"],"sourcesContent":["\"use client\";\n\nimport { ThemeColorKeys } from \"../theme/types\";\n\nexport type UseColorTemplateType = \"fill\" | \"outline\" | \"text\" | \"ghost\"\nexport type UseColorTemplateColor = ThemeColorKeys\n\nconst useColorTemplate = (color: UseColorTemplateColor, type: UseColorTemplateType) => {\n const is_def = color === \"surface\";\n\n if (type === \"outline\") {\n return {\n main: {\n bgcolor: `transparent`,\n color: is_def ? `surface.contrast` : `${color}.main`,\n border: \"1px solid\",\n borderColor: is_def ? `surface.muted` : `${color}.main`,\n },\n hover: {\n bgcolor: `transparent`,\n color: is_def ? `surface.contrast` : `${color}.light`,\n border: \"1px solid\",\n borderColor: is_def ? `surface.muted` : `${color}.light`,\n }\n }\n } else if (type === \"fill\") {\n return {\n main: {\n bgcolor: is_def ? `surface.light` : `${color}`,\n color: is_def ? `surface.contrast` : `${color}.contrast`,\n border: \"1px solid\",\n borderColor: is_def ? `surface.divider` : `${color}.light`,\n },\n hover: {\n bgcolor: is_def ? `surface.dark` : `${color}.light`,\n color: is_def ? `surface.contrast` : `${color}.contrast`,\n border: \"1px solid\",\n borderColor: is_def ? `surface.divider` : `${color}.light`,\n }\n }\n } else if (type === \"text\") {\n return {\n main: {\n bgcolor: \"transparent\",\n color: is_def ? `surface.contrast` : `${color}.main`,\n border: 0,\n borderColor: `transparent`,\n },\n hover: {\n bgcolor: \"transparent\",\n color: is_def ? `surface.contrast` : `${color}.light`,\n border: 0,\n borderColor: `transparent`,\n }\n }\n } else if (type === \"ghost\") {\n return {\n main: {\n bgcolor: `${color}.ghost`,\n color: is_def ? `surface.contrast` : color,\n border: 0,\n borderColor: `transparent`,\n },\n hover: {\n bgcolor: `${color}.ghost`,\n color: is_def ? `surface.contrast` : `${color}.light`,\n border: 0,\n borderColor: `transparent`,\n }\n }\n }\n\n throw new Error(`useColorTemplate: Unknown type ${type}`);\n}\n\nexport default useColorTemplate"],"names":[],"mappings":";AAOA;AACI;AAEA;;AAEQ;AACI;;AAEA;;AAEH;AACD;AACI;;AAEA;;AAEH;;;AAEF;;AAEC;;;AAGI;;AAEH;AACD;;;AAGI;;AAEH;;;AAEF;;AAEC;AACI;;AAEA;AACA;AACH;AACD;AACI;;AAEA;AACA;AACH;;;AAEF;;AAEC;;;AAGI;AACA;AACH;AACD;;;AAGI;AACA;AACH;;;AAIT;AACJ;;"}
1
+ {"version":3,"file":"useColorTemplate.js","sources":["../../src/hooks/useColorTemplate.ts"],"sourcesContent":["\"use client\";\n\nimport { ThemeColorKeys } from \"../theme/types\";\n\nexport type UseColorTemplateType = \"fill\" | \"outline\" | \"text\" | \"ghost\"\nexport type UseColorTemplateColor = ThemeColorKeys\n\nconst useColorTemplate = (color: UseColorTemplateColor, type: UseColorTemplateType) => {\n const is_def = color === \"surface\";\n\n if (type === \"outline\") {\n return {\n main: {\n bgcolor: `transparent`,\n color: is_def ? `surface.contrast` : `${color}.main`,\n border: \"1px solid\",\n borderColor: is_def ? `surface.muted` : `${color}.main`,\n },\n hover: {\n bgcolor: `transparent`,\n color: is_def ? `surface.contrast` : `${color}.light`,\n border: \"1px solid\",\n borderColor: is_def ? `surface.muted` : `${color}.light`,\n }\n }\n } else if (type === \"fill\") {\n return {\n main: {\n bgcolor: is_def ? `surface.dark` : `${color}`,\n color: is_def ? `surface.contrast` : `${color}.contrast`,\n border: 0,\n borderColor: 'transparent',\n },\n hover: {\n bgcolor: is_def ? `surface.main` : `${color}.light`,\n color: is_def ? `surface.contrast` : `${color}.contrast`,\n border: 0,\n borderColor: 'transparent',\n }\n }\n } else if (type === \"text\") {\n return {\n main: {\n bgcolor: \"transparent\",\n color: is_def ? `surface.contrast` : `${color}.main`,\n border: 0,\n borderColor: `transparent`,\n },\n hover: {\n bgcolor: \"transparent\",\n color: is_def ? `surface.contrast` : `${color}.light`,\n border: 0,\n borderColor: `transparent`,\n }\n }\n } else if (type === \"ghost\") {\n return {\n main: {\n bgcolor: `${color}.ghost`,\n color: is_def ? `surface.contrast` : color,\n border: 0,\n borderColor: `transparent`,\n },\n hover: {\n bgcolor: `${color}.ghost`,\n color: is_def ? `surface.contrast` : `${color}.light`,\n border: 0,\n borderColor: `transparent`,\n }\n }\n }\n\n throw new Error(`useColorTemplate: Unknown type ${type}`);\n}\n\nexport default useColorTemplate"],"names":[],"mappings":";AAOA;AACI;AAEA;;AAEQ;AACI;;AAEA;;AAEH;AACD;AACI;;AAEA;;AAEH;;;AAEF;;AAEC;;;AAGI;AACA;AACH;AACD;;;AAGI;AACA;AACH;;;AAEF;;AAEC;AACI;;AAEA;AACA;AACH;AACD;AACI;;AAEA;AACA;AACH;;;AAEF;;AAEC;;;AAGI;AACA;AACH;AACD;;;AAGI;AACA;AACH;;;AAIT;AACJ;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xanui/core",
3
- "version": "1.3.9",
3
+ "version": "1.3.10",
4
4
  "description": "Xanui Core Library",
5
5
  "private": false,
6
6
  "main": "./index.cjs",
@@ -25,7 +25,7 @@ const ThemeCssVars = (theme) => {
25
25
  }
26
26
  }
27
27
  const colorNames = ["surface", "primary", "accent", "success", "info", "warning", "danger"];
28
- const colorKeys = ["main", "light", "dark", "contrast", "muted", "disabled", "divider", "ghost"];
28
+ const colorKeys = ["main", "light", "lighter", "dark", "darker", "contrast", "muted", "divider", "ghost"];
29
29
  for (let cname of colorNames) {
30
30
  if (cname in theme.colors) {
31
31
  if ("main" in theme.colors[cname]) {
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeCssVars.cjs","sources":["../../src/theme/ThemeCssVars.ts"],"sourcesContent":["import { breakpoints } from \"../css\";\nimport { ThemeOptions } from \"./types\";\n\nconst ThemeCssVars = (theme: ThemeOptions) => {\n const vars: any = {}\n\n const bnames = Object.keys(breakpoints)\n for (let name of bnames) {\n if (name in theme.breakpoints) {\n vars[`--bp-${name}`] = (theme as any).breakpoints[name]\n }\n }\n\n const typoNames = [\"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\", \"big\", \"text\", \"button\", \"small\"]\n const typoKeys = [\"fontSize\", \"fontWeight\", \"lineHeight\"]\n for (let tname of typoNames) {\n if (tname in theme.typography) {\n for (let key of typoKeys) {\n const v = (theme as any).typography[tname]\n if (key in v) {\n let px = key === \"fontSize\" ? \"px\" : \"\"\n vars[`--${key.toLowerCase()}-${tname}`] = `${(theme as any).typography[tname][key]}${px}`\n }\n }\n }\n }\n\n const colorNames = [\"surface\", \"primary\", \"accent\", \"success\", \"info\", \"warning\", \"danger\"]\n const colorKeys = [\"main\", \"light\", \"dark\", \"contrast\", \"muted\", \"disabled\", \"divider\", \"ghost\"]\n for (let cname of colorNames) {\n if (cname in theme.colors) {\n if (\"main\" in (theme as any).colors[cname]) {\n vars[`--color-${cname}`] = (theme as any).colors[cname][\"main\"]\n }\n\n for (let key of colorKeys) {\n if (key in (theme as any).colors[cname]) {\n vars[`--color-${cname}-${key}`] = (theme as any).colors[cname][key]\n }\n }\n }\n }\n\n theme.shadow?.forEach((s, i) => vars[`--shadow-${i}`] = s)\n\n return vars\n}\n\nexport default ThemeCssVars"],"names":["breakpoints"],"mappings":";;;;AAGA,MAAM,YAAY,GAAG,CAAC,KAAmB,KAAI;;IACzC,MAAM,IAAI,GAAQ,EAAE;IAEpB,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAACA,iBAAW,CAAC;AACvC,IAAA,KAAK,IAAI,IAAI,IAAI,MAAM,EAAE;AACrB,QAAA,IAAI,IAAI,IAAI,KAAK,CAAC,WAAW,EAAE;AAC3B,YAAA,IAAI,CAAC,CAAA,KAAA,EAAQ,IAAI,CAAA,CAAE,CAAC,GAAI,KAAa,CAAC,WAAW,CAAC,IAAI,CAAC;QAC3D;IACJ;IAEA,MAAM,SAAS,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC;IACxF,MAAM,QAAQ,GAAG,CAAC,UAAU,EAAE,YAAY,EAAE,YAAY,CAAC;AACzD,IAAA,KAAK,IAAI,KAAK,IAAI,SAAS,EAAE;AACzB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K,CAAA,CAAA,EAAI,GAAG,EAAE,CAAC,GAAI,KAAa,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC;gBACvE;YACJ;QACJ;IACJ;IAEA,CAAA,EAAA,GAAA,KAAK,CAAC,MAAM,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAE,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC,CAAA,SAAA,EAAY,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;AAE1D,IAAA,OAAO,IAAI;AACf;;;;"}
1
+ {"version":3,"file":"ThemeCssVars.cjs","sources":["../../src/theme/ThemeCssVars.ts"],"sourcesContent":["import { breakpoints } from \"../css\";\nimport { ThemeOptions } from \"./types\";\n\nconst ThemeCssVars = (theme: ThemeOptions) => {\n const vars: any = {}\n\n const bnames = Object.keys(breakpoints)\n for (let name of bnames) {\n if (name in theme.breakpoints) {\n vars[`--bp-${name}`] = (theme as any).breakpoints[name]\n }\n }\n\n const typoNames = [\"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\", \"big\", \"text\", \"button\", \"small\"]\n const typoKeys = [\"fontSize\", \"fontWeight\", \"lineHeight\"]\n for (let tname of typoNames) {\n if (tname in theme.typography) {\n for (let key of typoKeys) {\n const v = (theme as any).typography[tname]\n if (key in v) {\n let px = key === \"fontSize\" ? \"px\" : \"\"\n vars[`--${key.toLowerCase()}-${tname}`] = `${(theme as any).typography[tname][key]}${px}`\n }\n }\n }\n }\n\n const colorNames = [\"surface\", \"primary\", \"accent\", \"success\", \"info\", \"warning\", \"danger\"]\n const colorKeys = [\"main\", \"light\", \"lighter\", \"dark\", \"darker\", \"contrast\", \"muted\", \"divider\", \"ghost\"]\n for (let cname of colorNames) {\n if (cname in theme.colors) {\n if (\"main\" in (theme as any).colors[cname]) {\n vars[`--color-${cname}`] = (theme as any).colors[cname][\"main\"]\n }\n\n for (let key of colorKeys) {\n if (key in (theme as any).colors[cname]) {\n vars[`--color-${cname}-${key}`] = (theme as any).colors[cname][key]\n }\n }\n }\n }\n\n theme.shadow?.forEach((s, i) => vars[`--shadow-${i}`] = s)\n\n return vars\n}\n\nexport default ThemeCssVars"],"names":["breakpoints"],"mappings":";;;;AAGA,MAAM,YAAY,GAAG,CAAC,KAAmB,KAAI;;IACzC,MAAM,IAAI,GAAQ,EAAE;IAEpB,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAACA,iBAAW,CAAC;AACvC,IAAA,KAAK,IAAI,IAAI,IAAI,MAAM,EAAE;AACrB,QAAA,IAAI,IAAI,IAAI,KAAK,CAAC,WAAW,EAAE;AAC3B,YAAA,IAAI,CAAC,CAAA,KAAA,EAAQ,IAAI,CAAA,CAAE,CAAC,GAAI,KAAa,CAAC,WAAW,CAAC,IAAI,CAAC;QAC3D;IACJ;IAEA,MAAM,SAAS,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC;IACxF,MAAM,QAAQ,GAAG,CAAC,UAAU,EAAE,YAAY,EAAE,YAAY,CAAC;AACzD,IAAA,KAAK,IAAI,KAAK,IAAI,SAAS,EAAE;AACzB,QAAA,IAAI,KAAK,IAAI,KAAK,CAAC,UAAU,EAAE;AAC3B,YAAA,KAAK,IAAI,GAAG,IAAI,QAAQ,EAAE;gBACtB,MAAM,CAAC,GAAI,KAAa,CAAC,UAAU,CAAC,KAAK,CAAC;AAC1C,gBAAA,IAAI,GAAG,IAAI,CAAC,EAAE;AACV,oBAAA,IAAI,EAAE,GAAG,GAAG,KAAK,UAAU,GAAG,IAAI,GAAG,EAAE;oBACvC,IAAI,CAAC,CAAA,EAAA,EAAK,GAAG,CAAC,WAAW,EAAE,CAAA,CAAA,EAAI,KAAK,CAAA,CAAE,CAAC,GAAG,CAAA,EAAI,KAAa,CAAC,UAAU,CAAC,K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23
23
  }
24
24
  }
25
25
  const colorNames = ["surface", "primary", "accent", "success", "info", "warning", "danger"];
26
- const colorKeys = ["main", "light", "dark", "contrast", "muted", "disabled", "divider", "ghost"];
26
+ const colorKeys = ["main", "light", "lighter", "dark", "darker", "contrast", "muted", "divider", "ghost"];
27
27
  for (let cname of colorNames) {
28
28
  if (cname in theme.colors) {
29
29
  if ("main" in theme.colors[cname]) {
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeCssVars.js","sources":["../../src/theme/ThemeCssVars.ts"],"sourcesContent":["import { breakpoints } from \"../css\";\nimport { ThemeOptions } from \"./types\";\n\nconst ThemeCssVars = (theme: ThemeOptions) => {\n const vars: any = {}\n\n const bnames = Object.keys(breakpoints)\n for (let name of bnames) {\n if (name in theme.breakpoints) {\n vars[`--bp-${name}`] = (theme as any).breakpoints[name]\n }\n }\n\n const typoNames = [\"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\", \"big\", \"text\", \"button\", \"small\"]\n const typoKeys = [\"fontSize\", \"fontWeight\", \"lineHeight\"]\n for (let tname of typoNames) {\n if (tname in theme.typography) {\n for (let key of typoKeys) {\n const v = (theme as any).typography[tname]\n if (key in v) {\n let px = key === \"fontSize\" ? \"px\" : \"\"\n vars[`--${key.toLowerCase()}-${tname}`] = `${(theme as any).typography[tname][key]}${px}`\n }\n }\n }\n }\n\n const colorNames = [\"surface\", \"primary\", \"accent\", \"success\", \"info\", \"warning\", \"danger\"]\n const colorKeys = [\"main\", \"light\", \"dark\", \"contrast\", \"muted\", \"disabled\", \"divider\", \"ghost\"]\n for (let cname of colorNames) {\n if (cname in theme.colors) {\n if (\"main\" in (theme as any).colors[cname]) {\n vars[`--color-${cname}`] = (theme as any).colors[cname][\"main\"]\n }\n\n for (let key of colorKeys) {\n if (key in (theme as any).colors[cname]) {\n vars[`--color-${cname}-${key}`] = (theme as any).colors[cname][key]\n }\n }\n }\n }\n\n theme.shadow?.forEach((s, i) => vars[`--shadow-${i}`] = s)\n\n return v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,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,CAAC;AAC3F,IAAA,MAAM,SAAS,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,CAAC;AAChG,IAAA,KAAK,IAAI,KAAK,IAAI,UAAU,EAAE;AAC1B,QAAA,IAAI,KAAK,IAAI,KAAK,CAAC,MAAM,EAAE;YACvB,IAAI,MAAM,IAAK,KAAa,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;AACxC,gBAAA,IAAI,CAAC,CAAA,QAAA,EAAW,KAAK,CAAA,CAAE,CAAC,GAAI,KAAa,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC;YACnE;AAEA,YAAA,KAAK,IAAI,GAAG,IAAI,SAAS,EAAE;gBACvB,IAAI,GAAG,IAAK,KAAa,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;AACrC,oBAAA,IAAI,CAAC,CAAA,QAAA,EAAW,KAAK,CAAA,CAAA,EAAI,GAAG,EAAE,CAAC,GAAI,KAAa,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC;gBACvE;YACJ;QACJ;IACJ;IAEA,CAAA,EAAA,GAAA,KAAK,CAAC,MAAM,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAE,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC,CAAA,SAAA,EAAY,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;AAE1D,IAAA,OAAO,IAAI;AACf;;;;"}
1
+ {"version":3,"file":"ThemeCssVars.js","sources":["../../src/theme/ThemeCssVars.ts"],"sourcesContent":["import { breakpoints } from \"../css\";\nimport { ThemeOptions } from \"./types\";\n\nconst ThemeCssVars = (theme: ThemeOptions) => {\n const vars: any = {}\n\n const bnames = Object.keys(breakpoints)\n for (let name of bnames) {\n if (name in theme.breakpoints) {\n vars[`--bp-${name}`] = (theme as any).breakpoints[name]\n }\n }\n\n const typoNames = [\"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\", \"big\", \"text\", \"button\", \"small\"]\n const typoKeys = [\"fontSize\", \"fontWeight\", \"lineHeight\"]\n for (let tname of typoNames) {\n if (tname in theme.typography) {\n for (let key of typoKeys) {\n const v = (theme as any).typography[tname]\n if (key in v) {\n let px = key === \"fontSize\" ? \"px\" : \"\"\n vars[`--${key.toLowerCase()}-${tname}`] = `${(theme as any).typography[tname][key]}${px}`\n }\n }\n }\n }\n\n const colorNames = [\"surface\", \"primary\", \"accent\", \"success\", \"info\", \"warning\", \"danger\"]\n const colorKeys = [\"main\", \"light\", \"lighter\", \"dark\", \"darker\", \"contrast\", \"muted\", \"divider\", \"ghost\"]\n for (let cname of colorNames) {\n if (cname in theme.colors) {\n if (\"main\" in (theme as any).colors[cname]) {\n vars[`--color-${cname}`] = (theme as any).colors[cname][\"main\"]\n }\n\n for (let key of colorKeys) {\n if (key in (theme as any).colors[cname]) {\n vars[`--color-${cname}-${key}`] = (theme as any).colors[cname][key]\n }\n }\n }\n }\n\n theme.shadow?.forEach((s, i) => vars[`--shadow-${i}`] = s)\n\n return vars\n}\n\nexport default ThemeCssVars"],"names":[],"mappings":";;AAGA,MAAM,YAAY,GAAG,CAAC,KAAmB,KAAI;;IACzC,MAAM,IAAI,GAAQ,EAAE;IAEpB,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC;AACvC,IAAA,KAAK,IAAI,IAAI,IAAI,MAAM,EAAE;AACrB,QAAA,IAAI,IAAI,IAAI,KAAK,CAAC,WAAW,EAAE;AAC3B,YAAA,IAAI,CAAC,CAAA,KAAA,EAAQ,IAAI,CAAA,CAAE,CAAC,GAAI,KAAa,CAAC,WAAW,CAAC,IAAI,CAAC;QAC3D;IACJ;IAEA,MAAM,SAAS,GAAG,CAAC,IAAI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AA,CAAE,CAAC,GAAI,KAAa,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC;YACnE;AAEA,YAAA,KAAK,IAAI,GAAG,IAAI,SAAS,EAAE;gBACvB,IAAI,GAAG,IAAK,KAAa,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;AACrC,oBAAA,IAAI,CAAC,CAAA,QAAA,EAAW,KAAK,CAAA,CAAA,EAAI,GAAG,EAAE,CAAC,GAAI,KAAa,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC;gBACvE;YACJ;QACJ;IACJ;IAEA,CAAA,EAAA,GAAA,KAAK,CAAC,MAAM,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAE,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC,CAAA,SAAA,EAAY,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;AAE1D,IAAA,OAAO,IAAI;AACf;;;;"}
@@ -74,13 +74,13 @@ const lightThemeOptions = {
74
74
  shadow: lightShadows,
75
75
  globalStyle: {},
76
76
  colors: {
77
- surface: oklch.createPalette("#FFFFFF"),
78
- primary: oklch.createPalette("#155dfc"),
79
- accent: oklch.createPalette("#e17100"),
80
- success: oklch.createPalette("#00a63e"),
81
- info: oklch.createPalette("#0084d1"),
82
- warning: oklch.createPalette("#f54a00"),
83
- danger: oklch.createPalette("#e7000b"),
77
+ surface: oklch.createLightThemePalette("#FFFFFF"),
78
+ primary: oklch.createPalette("#2563EB", "light"),
79
+ accent: oklch.createPalette("#7C3AED", "light"),
80
+ success: oklch.createPalette("#16A34A", "light"),
81
+ info: oklch.createPalette("#06B6D4", "light"),
82
+ warning: oklch.createPalette("#ff8904", "light"),
83
+ danger: oklch.createPalette("#EF4444", "light"),
84
84
  },
85
85
  typography: ThemeTypography,
86
86
  interfaces: {}
@@ -92,13 +92,13 @@ const darkThemeOptions = {
92
92
  shadow: darkShadows,
93
93
  globalStyle: {},
94
94
  colors: {
95
- surface: oklch.createPalette("#0F1115"),
96
- primary: oklch.createPalette("#155dfc"),
97
- accent: oklch.createPalette("#e17100"),
98
- success: oklch.createPalette("#00a63e"),
99
- info: oklch.createPalette("#0084d1"),
100
- warning: oklch.createPalette("#f54a00"),
101
- danger: oklch.createPalette("#e7000b"),
95
+ surface: oklch.createDarkThemePalette("#0F1115"),
96
+ primary: oklch.createPalette("#2563EB", "dark"),
97
+ accent: oklch.createPalette("#7C3AED", "dark"),
98
+ success: oklch.createPalette("#16A34A", "dark"),
99
+ info: oklch.createPalette("#06B6D4", "dark"),
100
+ warning: oklch.createPalette("#ff8904", "dark"),
101
+ danger: oklch.createPalette("#EF4444", "dark"),
102
102
  },
103
103
  typography: ThemeTypography,
104
104
  interfaces: {}
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeDefaultOptions.cjs","sources":["../../src/theme/ThemeDefaultOptions.ts"],"sourcesContent":["import { createPalette } from './oklch';\nimport { ThemeOptionInput, ThemeOptions } from './types'\n\nexport const lightShadows = [\n \"none\",\n \"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)\",\n \"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)\",\n \"0px 3px 3px -2px rgba(0,0,0,0.2),0px 3px 4px 0px rgba(0,0,0,0.14),0px 1px 8px 0px rgba(0,0,0,0.12)\",\n \"0px 2px 4px -1px rgba(0,0,0,0.2),0px 4px 5px 0px rgba(0,0,0,0.14),0px 1px 10px 0px rgba(0,0,0,0.12)\",\n \"0px 3px 5px -1px rgba(0,0,0,0.2),0px 5px 8px 0px rgba(0,0,0,0.14),0px 1px 14px 0px rgba(0,0,0,0.12)\",\n \"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)\",\n \"0px 4px 5px -2px rgba(0,0,0,0.2),0px 7px 10px 1px rgba(0,0,0,0.14),0px 2px 16px 1px rgba(0,0,0,0.12)\",\n \"0px 5px 5px -3px rgba(0,0,0,0.2),0px 8px 10px 1px rgba(0,0,0,0.14),0px 3px 14px 2px rgba(0,0,0,0.12)\",\n \"0px 5px 6px -3px rgba(0,0,0,0.2),0px 9px 12px 1px rgba(0,0,0,0.14),0px 3px 16px 2px rgba(0,0,0,0.12)\",\n \"0px 6px 6px -3px rgba(0,0,0,0.2),0px 10px 14px 1px rgba(0,0,0,0.14),0px 4px 18px 3px rgba(0,0,0,0.12)\",\n \"0px 6px 7px -4px rgba(0,0,0,0.2),0px 11px 15px 1px rgba(0,0,0,0.14),0px 4px 20px 3px rgba(0,0,0,0.12)\",\n \"0px 7px 8px -4px rgba(0,0,0,0.2),0px 12px 17px 2px rgba(0,0,0,0.14),0px 5px 22px 4px rgba(0,0,0,0.12)\",\n \"0px 7px 8px -4px rgba(0,0,0,0.2),0px 13px 19px 2px rgba(0,0,0,0.14),0px 5px 24px 4px rgba(0,0,0,0.12)\",\n \"0px 7px 9px -4px rgba(0,0,0,0.2),0px 14px 21px 2px rgba(0,0,0,0.14),0px 5px 26px 4px rgba(0,0,0,0.12)\",\n \"0px 8px 9px -5px rgba(0,0,0,0.2),0px 15px 22px 2px rgba(0,0,0,0.14),0px 6px 28px 5px rgba(0,0,0,0.12)\",\n \"0px 8px 10px -5px rgba(0,0,0,0.2),0px 16px 24px 2px rgba(0,0,0,0.14),0px 6px 30px 5px rgba(0,0,0,0.12)\",\n \"0px 8px 11px -5px rgba(0,0,0,0.2),0px 17px 26px 2px rgba(0,0,0,0.14),0px 6px 32px 5px rgba(0,0,0,0.12)\",\n \"0px 9px 11px -5px rgba(0,0,0,0.2),0px 18px 28px 2px rgba(0,0,0,0.14),0px 7px 34px 6px rgba(0,0,0,0.12)\",\n \"0px 9px 12px -6px rgba(0,0,0,0.2),0px 19px 29px 2px rgba(0,0,0,0.14),0px 7px 36px 6px rgba(0,0,0,0.12)\",\n \"0px 10px 13px -6px rgba(0,0,0,0.2),0px 20px 31px 3px rgba(0,0,0,0.14),0px 8px 38px 7px rgba(0,0,0,0.12)\",\n \"0px 10px 13px -6px rgba(0,0,0,0.2),0px 21px 33px 3px rgba(0,0,0,0.14),0px 8px 40px 7px rgba(0,0,0,0.12)\",\n \"0px 10px 14px -6px rgba(0,0,0,0.2),0px 22px 35px 3px rgba(0,0,0,0.14),0px 8px 42px 7px rgba(0,0,0,0.12)\",\n \"0px 11px 14px -7px rgba(0,0,0,0.2),0px 23px 36px 3px rgba(0,0,0,0.14),0px 9px 44px 8px rgba(0,0,0,0.12)\",\n \"0px 11px 15px -7px rgba(0,0,0,0.2),0px 24px 38px 3px rgba(0,0,0,0.14),0px 9px 46px 8px rgba(0,0,0,0.12)\",\n]\n\nexport const darkShadows = [\n \"none\",\n\n \"0px 1px 2px rgba(0,0,0,0.65), inset 0px 1px 0px rgba(255,255,255,0.04)\",\n \"0px 2px 3px rgba(0,0,0,0.68), inset 0px 1px 0px rgba(255,255,255,0.04)\",\n \"0px 2px 4px rgba(0,0,0,0.7), inset 0px 1px 0px rgba(255,255,255,0.05)\",\n \"0px 3px 5px rgba(0,0,0,0.72), inset 0px 1px 0px rgba(255,255,255,0.05)\",\n\n \"0px 4px 6px rgba(0,0,0,0.75), inset 0px 1px 0px rgba(255,255,255,0.05)\",\n \"0px 5px 8px rgba(0,0,0,0.78), inset 0px 1px 0px rgba(255,255,255,0.06)\",\n \"0px 6px 10px rgba(0,0,0,0.8), inset 0px 1px 0px rgba(255,255,255,0.06)\",\n \"0px 7px 12px rgba(0,0,0,0.82), inset 0px 1px 0px rgba(255,255,255,0.06)\",\n \"0px 8px 14px rgba(0,0,0,0.84), inset 0px 1px 0px rgba(255,255,255,0.06)\",\n\n \"0px 9px 16px rgba(0,0,0,0.86), inset 0px 1px 0px rgba(255,255,255,0.07)\",\n \"0px 10px 18px rgba(0,0,0,0.88), inset 0px 1px 0px rgba(255,255,255,0.07)\",\n \"0px 11px 20px rgba(0,0,0,0.89), inset 0px 1px 0px rgba(255,255,255,0.07)\",\n \"0px 12px 22px rgba(0,0,0,0.9), inset 0px 1px 0px rgba(255,255,255,0.07)\",\n \"0px 13px 24px rgba(0,0,0,0.91), inset 0px 1px 0px rgba(255,255,255,0.07)\",\n\n \"0px 14px 26px rgba(0,0,0,0.92), inset 0px 1px 0px rgba(255,255,255,0.08)\",\n \"0px 15px 28px rgba(0,0,0,0.93), inset 0px 1px 0px rgba(255,255,255,0.08)\",\n \"0px 16px 30px rgba(0,0,0,0.94), inset 0px 1px 0px rgba(255,255,255,0.08)\",\n \"0px 18px 32px rgba(0,0,0,0.95), inset 0px 1px 0px rgba(255,255,255,0.08)\",\n \"0px 20px 34px rgba(0,0,0,0.95), inset 0px 1px 0px rgba(255,255,255,0.08)\",\n\n \"0px 22px 36px rgba(0,0,0,0.96), inset 0px 1px 0px rgba(255,255,255,0.08)\",\n \"0px 24px 38px rgba(0,0,0,0.97), inset 0px 1px 0px rgba(255,255,255,0.09)\",\n \"0px 26px 40px rgba(0,0,0,0.98), inset 0px 1px 0px rgba(255,255,255,0.09)\",\n \"0px 28px 42px rgba(0,0,0,0.99), inset 0px 1px 0px rgba(255,255,255,0.1)\",\n]\n\n\nexport const ThemeTypography: ThemeOptions['typography'] = {\n h1: { fontSize: 48, lineHeight: 1.3, fontWeight: 600 }, // bolder for emphasis\n h2: { fontSize: 40, lineHeight: 1.35, fontWeight: 500 },\n h3: { fontSize: 34, lineHeight: 1.4, fontWeight: 500 },\n h4: { fontSize: 28, lineHeight: 1.45, fontWeight: 500 },\n h5: { fontSize: 24, lineHeight: 1.5, fontWeight: 500 },\n h6: { fontSize: 20, lineHeight: 1.55, fontWeight: 500 },\n big: { fontSize: 18, lineHeight: 1.6, fontWeight: 400 },\n text: { fontSize: 16, lineHeight: 1.6, fontWeight: 400 },\n button: { fontSize: 14, lineHeight: 1.6, fontWeight: 500 },\n small: { fontSize: 12, lineHeight: 1.6, fontWeight: 400 },\n}\n\n\nexport const lightThemeOptions: ThemeOptionInput = {\n name: \"default-light\",\n mode: \"light\",\n rtl: false,\n shadow: lightShadows,\n globalStyle: {},\n colors: {\n surface: createPalette(\"#FFFFFF\"),\n primary: createPalette(\"#155dfc\"),\n accent: createPalette(\"#e17100\"),\n success: createPalette(\"#00a63e\"),\n info: createPalette(\"#0084d1\"),\n warning: createPalette(\"#f54a00\"),\n danger: createPalette(\"#e7000b\"),\n },\n typography: ThemeTypography,\n interfaces: {}\n} as ThemeOptionInput;\n\nexport const darkThemeOptions: ThemeOptionInput = {\n name: \"default-dark\",\n mode: \"dark\",\n rtl: false,\n shadow: darkShadows,\n globalStyle: {},\n colors: {\n surface: createPalette(\"#0F1115\"),\n primary: createPalette(\"#155dfc\"),\n accent: createPalette(\"#e17100\"),\n success: createPalette(\"#00a63e\"),\n info: createPalette(\"#0084d1\"),\n warning: createPalette(\"#f54a00\"),\n danger: createPalette(\"#e7000b\"),\n },\n typography: ThemeTypography,\n interfaces: {}\n} as ThemeOptionInput;\n\n\n"],"names":["createPalette"],"mappings":";;;;AAGO,MAAM,YAAY,GAAG;IACxB,MAAM;IACN,oGAAoG;IACpG,oGAAoG;IACpG,oGAAoG;IACpG,qGAAqG;IACrG,qGAAqG;IACrG,sGAAsG;IACtG,sGAAsG;IACtG,sGAAsG;IACtG,sGAAsG;IACtG,uGAAuG;IACvG,uGAAuG;IACvG,uGAAuG;IACvG,uGAAuG;IACvG,uGAAuG;IACvG,uGAAuG;IACvG,wGAAwG;IACxG,wGAAwG;IACxG,wGAAwG;IACxG,wGAAwG;IACxG,yGAAyG;IACzG,yGAAyG;IACzG,yGAAyG;IACzG,yGAAyG;IACzG,yGAAyG;;AAGtG,MAAM,WAAW,GAAG;IACvB,MAAM;IAEN,wEAAwE;IACxE,wEAAwE;IACxE,uEAAuE;IACvE,wEAAwE;IAExE,wEAAwE;IACxE,wEAAwE;IACxE,wEA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A,mBAAa,CAAC,SAAS,CAAC;AACnC,KAAA;AACD,IAAA,UAAU,EAAE,eAAe;AAC3B,IAAA,UAAU,EAAE;;;;;;;;;"}
1
+ {"version":3,"file":"ThemeDefaultOptions.cjs","sources":["../../src/theme/ThemeDefaultOptions.ts"],"sourcesContent":["import { createDarkThemePalette, createLightThemePalette, createPalette } from './oklch';\nimport { ThemeOptionInput, ThemeOptions } from './types'\n\nexport const lightShadows = [\n \"none\",\n \"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)\",\n \"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)\",\n \"0px 3px 3px -2px rgba(0,0,0,0.2),0px 3px 4px 0px rgba(0,0,0,0.14),0px 1px 8px 0px rgba(0,0,0,0.12)\",\n \"0px 2px 4px -1px rgba(0,0,0,0.2),0px 4px 5px 0px rgba(0,0,0,0.14),0px 1px 10px 0px rgba(0,0,0,0.12)\",\n \"0px 3px 5px -1px rgba(0,0,0,0.2),0px 5px 8px 0px rgba(0,0,0,0.14),0px 1px 14px 0px rgba(0,0,0,0.12)\",\n \"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)\",\n \"0px 4px 5px -2px rgba(0,0,0,0.2),0px 7px 10px 1px rgba(0,0,0,0.14),0px 2px 16px 1px rgba(0,0,0,0.12)\",\n \"0px 5px 5px -3px rgba(0,0,0,0.2),0px 8px 10px 1px rgba(0,0,0,0.14),0px 3px 14px 2px rgba(0,0,0,0.12)\",\n \"0px 5px 6px -3px rgba(0,0,0,0.2),0px 9px 12px 1px rgba(0,0,0,0.14),0px 3px 16px 2px rgba(0,0,0,0.12)\",\n \"0px 6px 6px -3px rgba(0,0,0,0.2),0px 10px 14px 1px rgba(0,0,0,0.14),0px 4px 18px 3px rgba(0,0,0,0.12)\",\n \"0px 6px 7px -4px rgba(0,0,0,0.2),0px 11px 15px 1px rgba(0,0,0,0.14),0px 4px 20px 3px rgba(0,0,0,0.12)\",\n \"0px 7px 8px -4px rgba(0,0,0,0.2),0px 12px 17px 2px rgba(0,0,0,0.14),0px 5px 22px 4px rgba(0,0,0,0.12)\",\n \"0px 7px 8px -4px rgba(0,0,0,0.2),0px 13px 19px 2px rgba(0,0,0,0.14),0px 5px 24px 4px rgba(0,0,0,0.12)\",\n \"0px 7px 9px -4px rgba(0,0,0,0.2),0px 14px 21px 2px rgba(0,0,0,0.14),0px 5px 26px 4px rgba(0,0,0,0.12)\",\n \"0px 8px 9px -5px rgba(0,0,0,0.2),0px 15px 22px 2px rgba(0,0,0,0.14),0px 6px 28px 5px rgba(0,0,0,0.12)\",\n \"0px 8px 10px -5px rgba(0,0,0,0.2),0px 16px 24px 2px rgba(0,0,0,0.14),0px 6px 30px 5px rgba(0,0,0,0.12)\",\n \"0px 8px 11px -5px rgba(0,0,0,0.2),0px 17px 26px 2px rgba(0,0,0,0.14),0px 6px 32px 5px rgba(0,0,0,0.12)\",\n \"0px 9px 11px -5px rgba(0,0,0,0.2),0px 18px 28px 2px rgba(0,0,0,0.14),0px 7px 34px 6px rgba(0,0,0,0.12)\",\n \"0px 9px 12px -6px rgba(0,0,0,0.2),0px 19px 29px 2px rgba(0,0,0,0.14),0px 7px 36px 6px rgba(0,0,0,0.12)\",\n \"0px 10px 13px -6px rgba(0,0,0,0.2),0px 20px 31px 3px rgba(0,0,0,0.14),0px 8px 38px 7px rgba(0,0,0,0.12)\",\n \"0px 10px 13px -6px rgba(0,0,0,0.2),0px 21px 33px 3px rgba(0,0,0,0.14),0px 8px 40px 7px rgba(0,0,0,0.12)\",\n \"0px 10px 14px -6px rgba(0,0,0,0.2),0px 22px 35px 3px rgba(0,0,0,0.14),0px 8px 42px 7px rgba(0,0,0,0.12)\",\n \"0px 11px 14px -7px rgba(0,0,0,0.2),0px 23px 36px 3px rgba(0,0,0,0.14),0px 9px 44px 8px rgba(0,0,0,0.12)\",\n \"0px 11px 15px -7px rgba(0,0,0,0.2),0px 24px 38px 3px rgba(0,0,0,0.14),0px 9px 46px 8px rgba(0,0,0,0.12)\",\n]\n\nexport const darkShadows = [\n \"none\",\n\n \"0px 1px 2px rgba(0,0,0,0.65), inset 0px 1px 0px rgba(255,255,255,0.04)\",\n \"0px 2px 3px rgba(0,0,0,0.68), inset 0px 1px 0px rgba(255,255,255,0.04)\",\n \"0px 2px 4px rgba(0,0,0,0.7), inset 0px 1px 0px rgba(255,255,255,0.05)\",\n \"0px 3px 5px rgba(0,0,0,0.72), inset 0px 1px 0px rgba(255,255,255,0.05)\",\n\n \"0px 4px 6px rgba(0,0,0,0.75), inset 0px 1px 0px rgba(255,255,255,0.05)\",\n \"0px 5px 8px rgba(0,0,0,0.78), inset 0px 1px 0px rgba(255,255,255,0.06)\",\n \"0px 6px 10px rgba(0,0,0,0.8), inset 0px 1px 0px rgba(255,255,255,0.06)\",\n \"0px 7px 12px rgba(0,0,0,0.82), inset 0px 1px 0px rgba(255,255,255,0.06)\",\n \"0px 8px 14px rgba(0,0,0,0.84), inset 0px 1px 0px rgba(255,255,255,0.06)\",\n\n \"0px 9px 16px rgba(0,0,0,0.86), inset 0px 1px 0px rgba(255,255,255,0.07)\",\n \"0px 10px 18px rgba(0,0,0,0.88), inset 0px 1px 0px rgba(255,255,255,0.07)\",\n \"0px 11px 20px rgba(0,0,0,0.89), inset 0px 1px 0px rgba(255,255,255,0.07)\",\n \"0px 12px 22px rgba(0,0,0,0.9), inset 0px 1px 0px rgba(255,255,255,0.07)\",\n \"0px 13px 24px rgba(0,0,0,0.91), inset 0px 1px 0px rgba(255,255,255,0.07)\",\n\n \"0px 14px 26px rgba(0,0,0,0.92), inset 0px 1px 0px rgba(255,255,255,0.08)\",\n \"0px 15px 28px rgba(0,0,0,0.93), inset 0px 1px 0px rgba(255,255,255,0.08)\",\n \"0px 16px 30px rgba(0,0,0,0.94), inset 0px 1px 0px rgba(255,255,255,0.08)\",\n \"0px 18px 32px rgba(0,0,0,0.95), inset 0px 1px 0px rgba(255,255,255,0.08)\",\n \"0px 20px 34px rgba(0,0,0,0.95), inset 0px 1px 0px rgba(255,255,255,0.08)\",\n\n \"0px 22px 36px rgba(0,0,0,0.96), inset 0px 1px 0px rgba(255,255,255,0.08)\",\n \"0px 24px 38px rgba(0,0,0,0.97), inset 0px 1px 0px rgba(255,255,255,0.09)\",\n \"0px 26px 40px rgba(0,0,0,0.98), inset 0px 1px 0px rgba(255,255,255,0.09)\",\n \"0px 28px 42px rgba(0,0,0,0.99), inset 0px 1px 0px rgba(255,255,255,0.1)\",\n]\n\n\nexport const ThemeTypography: ThemeOptions['typography'] = {\n h1: { fontSize: 48, lineHeight: 1.3, fontWeight: 600 }, // bolder for emphasis\n h2: { fontSize: 40, lineHeight: 1.35, fontWeight: 500 },\n h3: { fontSize: 34, lineHeight: 1.4, fontWeight: 500 },\n h4: { fontSize: 28, lineHeight: 1.45, fontWeight: 500 },\n h5: { fontSize: 24, lineHeight: 1.5, fontWeight: 500 },\n h6: { fontSize: 20, lineHeight: 1.55, fontWeight: 500 },\n big: { fontSize: 18, lineHeight: 1.6, fontWeight: 400 },\n text: { fontSize: 16, lineHeight: 1.6, fontWeight: 400 },\n button: { fontSize: 14, lineHeight: 1.6, fontWeight: 500 },\n small: { fontSize: 12, lineHeight: 1.6, fontWeight: 400 },\n}\n\n\nexport const lightThemeOptions: ThemeOptionInput = {\n name: \"default-light\",\n mode: \"light\",\n rtl: false,\n shadow: lightShadows,\n globalStyle: {},\n colors: {\n surface: createLightThemePalette(\"#FFFFFF\"),\n primary: createPalette(\"#2563EB\", \"light\"),\n accent: createPalette(\"#7C3AED\", \"light\"),\n success: createPalette(\"#16A34A\", \"light\"),\n info: createPalette(\"#06B6D4\", \"light\"),\n warning: createPalette(\"#ff8904\", \"light\"),\n danger: createPalette(\"#EF4444\", \"light\"),\n },\n typography: ThemeTypography,\n interfaces: {}\n} as ThemeOptionInput;\n\nexport const darkThemeOptions: ThemeOptionInput = {\n name: \"default-dark\",\n mode: \"dark\",\n rtl: false,\n shadow: darkShadows,\n globalStyle: {},\n colors: {\n surface: createDarkThemePalette(\"#0F1115\"),\n primary: createPalette(\"#2563EB\", \"dark\"),\n accent: createPalette(\"#7C3AED\", \"dark\"),\n success: createPalette(\"#16A34A\", \"dark\"),\n info: createPalette(\"#06B6D4\", \"dark\"),\n warning: createPalette(\"#ff8904\", \"dark\"),\n danger: createPalette(\"#EF4444\", \"dark\"),\n },\n typography: ThemeTypography,\n interfaces: {}\n} as ThemeOptionInput;\n\n\n"],"names":["createLightThemePalette","createPalette","createDarkThemePalette"],"mappings":";;;;AAGO,MAAM,YAAY,GAAG;IACxB,MAAM;IACN,oGAAoG;IACpG,oGAAoG;IACpG,oGAAoG;IACpG,qGAAqG;IACrG,qGAAqG;IACrG,sGAAsG;IACtG,sGAAsG;IACtG,sGAAsG;IACtG,sGAAsG;IACtG,uGAAuG;IACvG,uGAAuG;IACvG,uGAAuG;IACvG,uGAAuG;IACvG,uGAAuG;IACvG,uGAAuG;IACvG,wGAAwG;IACxG,wGAAwG;IACxG,wGAAwG;IACxG,wGAAwG;IACxG,yGAAyG;IACzG,yGAAyG;IACzG,yGAAyG;IACzG,yGAAyG;IACzG,yGAAyG;;AAGtG,MAAM,WAAW,GAAG;IACvB,MAAM;IAEN,wEAAwE;IACxE,wEAAwE;IACxE,uEAAuE;IACvE,wEAAwE;IAExE,wEAAwE;IACxE,wEAAwE;IACxE,wEAAwE;IACxE,yEAAyE;IACzE,yEAAyE;IAEzE,yEAAyE;IACzE,0EAA0E;IAC1E,0EAA0E;IAC1E,yEAAyE;IACzE,0EAA0E;IAE1E,0EAA0E;IAC1E,0EAA0E;IAC1E,0EAA0E;IAC1E,0EAA0E;IAC1E,0EAA0E;IAE1E,0EAA0E;IAC1E,0EAA0E;IAC1E,0EAA0E;IAC1E,yEAAyE;;AAItE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}
@@ -1,4 +1,4 @@
1
- import { createPalette } from './oklch.js';
1
+ import { createPalette, createLightThemePalette, createDarkThemePalette } from './oklch.js';
2
2
 
3
3
  const lightShadows = [
4
4
  "none",
@@ -72,13 +72,13 @@ const lightThemeOptions = {
72
72
  shadow: lightShadows,
73
73
  globalStyle: {},
74
74
  colors: {
75
- surface: createPalette("#FFFFFF"),
76
- primary: createPalette("#155dfc"),
77
- accent: createPalette("#e17100"),
78
- success: createPalette("#00a63e"),
79
- info: createPalette("#0084d1"),
80
- warning: createPalette("#f54a00"),
81
- danger: createPalette("#e7000b"),
75
+ surface: createLightThemePalette("#FFFFFF"),
76
+ primary: createPalette("#2563EB", "light"),
77
+ accent: createPalette("#7C3AED", "light"),
78
+ success: createPalette("#16A34A", "light"),
79
+ info: createPalette("#06B6D4", "light"),
80
+ warning: createPalette("#ff8904", "light"),
81
+ danger: createPalette("#EF4444", "light"),
82
82
  },
83
83
  typography: ThemeTypography,
84
84
  interfaces: {}
@@ -90,13 +90,13 @@ const darkThemeOptions = {
90
90
  shadow: darkShadows,
91
91
  globalStyle: {},
92
92
  colors: {
93
- surface: createPalette("#0F1115"),
94
- primary: createPalette("#155dfc"),
95
- accent: createPalette("#e17100"),
96
- success: createPalette("#00a63e"),
97
- info: createPalette("#0084d1"),
98
- warning: createPalette("#f54a00"),
99
- danger: createPalette("#e7000b"),
93
+ surface: createDarkThemePalette("#0F1115"),
94
+ primary: createPalette("#2563EB", "dark"),
95
+ accent: createPalette("#7C3AED", "dark"),
96
+ success: createPalette("#16A34A", "dark"),
97
+ info: createPalette("#06B6D4", "dark"),
98
+ warning: createPalette("#ff8904", "dark"),
99
+ danger: createPalette("#EF4444", "dark"),
100
100
  },
101
101
  typography: ThemeTypography,
102
102
  interfaces: {}