@televet/kibble-ui 4.0.0-beta.126 → 4.0.0-beta.128
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/dist/chunks/invertToken-DkyAF_BY.js +10 -0
- package/dist/chunks/invertToken-DkyAF_BY.js.map +1 -0
- package/dist/chunks/invertToken-Em3s32gh.js +2 -0
- package/dist/chunks/invertToken-Em3s32gh.js.map +1 -0
- package/dist/chunks/logo.types-R7sXqcB4.js +2 -0
- package/dist/chunks/logo.types-R7sXqcB4.js.map +1 -0
- package/dist/chunks/logo.types-jb-f-Z1C.js +45 -0
- package/dist/chunks/logo.types-jb-f-Z1C.js.map +1 -0
- package/dist/chunks/{theme.provider-BsaXkXoO.js → theme.provider-DJQeMr5K.js} +5 -9
- package/dist/chunks/theme.provider-DJQeMr5K.js.map +1 -0
- package/dist/chunks/theme.provider-fEXubEDT.js +28 -0
- package/dist/chunks/theme.provider-fEXubEDT.js.map +1 -0
- package/dist/cjs/components/Logo/index.cjs +1 -1
- package/dist/cjs/components/index.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/theme/index.cjs +1 -1
- package/dist/cjs/theme/semanticTokens/index.cjs +1 -1
- package/dist/cjs/theme/semanticTokens/index.cjs.map +1 -1
- package/dist/esm/components/Logo/index.js +3 -4
- package/dist/esm/components/index.js +78 -79
- package/dist/esm/index.js +98 -99
- package/dist/esm/theme/index.js +1 -1
- package/dist/esm/theme/semanticTokens/index.js +2 -0
- package/dist/esm/theme/semanticTokens/index.js.map +1 -1
- package/dist/types/components/Logo/logo.component.d.ts +1 -2
- package/dist/types/components/Logo/logo.recipe.d.ts +19 -4
- package/dist/types/components/Logo/logo.types.d.ts +2 -2
- package/dist/types/theme/semanticTokens/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/chunks/logo.types-BbSodfBq.js +0 -76
- package/dist/chunks/logo.types-BbSodfBq.js.map +0 -1
- package/dist/chunks/logo.types-CA_5hGAi.js +0 -2
- package/dist/chunks/logo.types-CA_5hGAi.js.map +0 -1
- package/dist/chunks/theme.provider-BsaXkXoO.js.map +0 -1
- package/dist/chunks/theme.provider-C7jbnR4l.js +0 -28
- package/dist/chunks/theme.provider-C7jbnR4l.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invertToken-DkyAF_BY.js","sources":["../../src/theme/semanticTokens/utils/invertToken.ts"],"sourcesContent":["import { SemanticTokenDefinition } from '../semanticTokens.types';\n\n// Swaps the light and dark values of a token\nexport const invertToken = (token: SemanticTokenDefinition): SemanticTokenDefinition => {\n return {\n value: {\n _light: token.value._dark,\n _dark: token.value._light,\n },\n };\n};\n"],"names":["invertToken","token"],"mappings":"AAGa,MAAAA,IAAc,CAACC,OACnB;AAAA,EACL,OAAO;AAAA,IACL,QAAQA,EAAM,MAAM;AAAA,IACpB,OAAOA,EAAM,MAAM;AAAA,EAAA;AAEvB;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invertToken-Em3s32gh.js","sources":["../../src/theme/semanticTokens/utils/invertToken.ts"],"sourcesContent":["import { SemanticTokenDefinition } from '../semanticTokens.types';\n\n// Swaps the light and dark values of a token\nexport const invertToken = (token: SemanticTokenDefinition): SemanticTokenDefinition => {\n return {\n value: {\n _light: token.value._dark,\n _dark: token.value._light,\n },\n };\n};\n"],"names":["invertToken","token"],"mappings":"aAGa,MAAAA,EAAeC,IACnB,CACL,MAAO,CACL,OAAQA,EAAM,MAAM,MACpB,MAAOA,EAAM,MAAM,MAAA,CAEvB"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const t=require("./jsx-runtime-BjDatQAs.js"),r=require("./IconLogo-C4aZqkn1.js"),s=require("./typography-CtiaGoJG.js"),l=require("./config-BFcXpdZo.js"),p=require("./use-recipe-DaPWl_pL.js"),u=require("./box-Baq7UBls.js"),g={full:{width:"200px"},icon:{width:"60px"}},y=l.defineRecipe({base:{},variants:{type:g,variant:{...s.typographyVariantStyles,primary:s.typographyVariantStyles.brand}},defaultVariants:{type:"full",variant:"default"}}),d=({onClick:e,type:o="full",variant:i="default",...n})=>{const c=o==="full"?r.ForwardRef:r.ForwardRef$1,a=p.useRecipe({recipe:y})({variant:i,type:o});return t.jsxRuntimeExports.jsx(u.Box,{className:"Logo","data-testid":"kibble-logo",...e&&{cursor:"pointer",onClick:e},css:a,...n,children:t.jsxRuntimeExports.jsx(c,{color:"currentColor",width:"100%",height:"100%"})})},f=["full","icon"];exports.Logo=d;exports.logoTypes=f;
|
|
2
|
+
//# sourceMappingURL=logo.types-R7sXqcB4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logo.types-R7sXqcB4.js","sources":["../../src/components/Logo/logo.recipe.ts","../../src/components/Logo/logo.component.tsx","../../src/components/Logo/logo.types.ts"],"sourcesContent":["import { defineRecipe, SystemStyleObject } from '@chakra-ui/react/styled-system';\nimport { LogoType } from './logo.types';\nimport { typographyVariantStyles } from 'shared/records/typography';\n\nconst logoTypeStyles: Record<LogoType, SystemStyleObject> = {\n full: {\n width: '200px',\n },\n icon: {\n width: '60px',\n },\n};\n\nexport const logoRecipe = defineRecipe({\n base: {},\n variants: {\n type: logoTypeStyles,\n variant: {\n ...typographyVariantStyles,\n primary: typographyVariantStyles.brand,\n },\n },\n defaultVariants: {\n type: 'full',\n variant: 'default',\n },\n});\n","import React from 'react';\nimport { Box, BoxProps } from '@chakra-ui/react/box';\nimport { LogoType, LogoVariant } from './logo.types';\nimport { FullLogo, IconLogo } from './generated';\nimport { useRecipe } from '@chakra-ui/react/styled-system';\nimport { logoRecipe } from './logo.recipe';\n\nexport interface LogoProps extends Omit<BoxProps, 'color'> {\n onClick?: () => void;\n type?: LogoType;\n variant?: LogoVariant;\n}\n\nexport const Logo = ({ onClick, type = 'full', variant = 'default', ...rest }: LogoProps): React.JSX.Element => {\n const LogoComponent = type === 'full' ? FullLogo : IconLogo;\n const recipe = useRecipe({ recipe: logoRecipe });\n const styles = recipe({ variant, type });\n\n return (\n <Box\n className=\"Logo\"\n data-testid=\"kibble-logo\"\n {...(onClick && { cursor: 'pointer', onClick })}\n css={styles}\n {...rest}\n >\n <LogoComponent color=\"currentColor\" width=\"100%\" height=\"100%\" />\n </Box>\n );\n};\n","import { TypographyVariant } from 'shared/types/typography';\n\nexport const logoTypes = ['full', 'icon'] as const;\nexport type LogoType = (typeof logoTypes)[number];\n\nexport type LogoVariant = TypographyVariant | 'primary';\n"],"names":["logoTypeStyles","logoRecipe","defineRecipe","typographyVariantStyles","Logo","onClick","type","variant","rest","LogoComponent","FullLogo","IconLogo","styles","useRecipe","jsx","Box","logoTypes"],"mappings":"2OAIMA,EAAsD,CAC1D,KAAM,CACJ,MAAO,OACT,EACA,KAAM,CACJ,MAAO,MAAA,CAEX,EAEaC,EAAaC,EAAAA,aAAa,CACrC,KAAM,CAAC,EACP,SAAU,CACR,KAAMF,EACN,QAAS,CACP,GAAGG,EAAA,wBACH,QAASA,EAAAA,wBAAwB,KAAA,CAErC,EACA,gBAAiB,CACf,KAAM,OACN,QAAS,SAAA,CAEb,CAAC,ECbYC,EAAO,CAAC,CAAE,QAAAC,EAAS,KAAAC,EAAO,OAAQ,QAAAC,EAAU,UAAW,GAAGC,KAAyC,CACxG,MAAAC,EAAgBH,IAAS,OAASI,EAAW,WAAAC,EAAA,aAE7CC,EADSC,EAAA,UAAU,CAAE,OAAQZ,EAAY,EACzB,CAAE,QAAAM,EAAS,KAAAD,EAAM,EAGrC,OAAAQ,EAAA,kBAAA,IAACC,EAAA,IAAA,CACC,UAAU,OACV,cAAY,cACX,GAAIV,GAAW,CAAE,OAAQ,UAAW,QAAAA,CAAQ,EAC7C,IAAKO,EACJ,GAAGJ,EAEJ,iCAACC,EAAc,CAAA,MAAM,eAAe,MAAM,OAAO,OAAO,MAAO,CAAA,CAAA,CACjE,CAEJ,EC3BaO,EAAY,CAAC,OAAQ,MAAM"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { j as r } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
|
+
import { F as p, a as n } from "./IconLogo-UpYiHEKq.js";
|
|
3
|
+
import { t as e } from "./typography-Cqrokog3.js";
|
|
4
|
+
import { b as c } from "./config-DlTdf-Yt.js";
|
|
5
|
+
import { u as f } from "./use-recipe-d63ABaZ3.js";
|
|
6
|
+
import { B as m } from "./box-Ck9I7FYv.js";
|
|
7
|
+
const u = {
|
|
8
|
+
full: {
|
|
9
|
+
width: "200px"
|
|
10
|
+
},
|
|
11
|
+
icon: {
|
|
12
|
+
width: "60px"
|
|
13
|
+
}
|
|
14
|
+
}, d = c({
|
|
15
|
+
base: {},
|
|
16
|
+
variants: {
|
|
17
|
+
type: u,
|
|
18
|
+
variant: {
|
|
19
|
+
...e,
|
|
20
|
+
primary: e.brand
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
defaultVariants: {
|
|
24
|
+
type: "full",
|
|
25
|
+
variant: "default"
|
|
26
|
+
}
|
|
27
|
+
}), j = ({ onClick: o, type: t = "full", variant: s = "default", ...a }) => {
|
|
28
|
+
const i = t === "full" ? p : n, l = f({ recipe: d })({ variant: s, type: t });
|
|
29
|
+
return /* @__PURE__ */ r.jsx(
|
|
30
|
+
m,
|
|
31
|
+
{
|
|
32
|
+
className: "Logo",
|
|
33
|
+
"data-testid": "kibble-logo",
|
|
34
|
+
...o && { cursor: "pointer", onClick: o },
|
|
35
|
+
css: l,
|
|
36
|
+
...a,
|
|
37
|
+
children: /* @__PURE__ */ r.jsx(i, { color: "currentColor", width: "100%", height: "100%" })
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
}, L = ["full", "icon"];
|
|
41
|
+
export {
|
|
42
|
+
j as L,
|
|
43
|
+
L as l
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=logo.types-jb-f-Z1C.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logo.types-jb-f-Z1C.js","sources":["../../src/components/Logo/logo.recipe.ts","../../src/components/Logo/logo.component.tsx","../../src/components/Logo/logo.types.ts"],"sourcesContent":["import { defineRecipe, SystemStyleObject } from '@chakra-ui/react/styled-system';\nimport { LogoType } from './logo.types';\nimport { typographyVariantStyles } from 'shared/records/typography';\n\nconst logoTypeStyles: Record<LogoType, SystemStyleObject> = {\n full: {\n width: '200px',\n },\n icon: {\n width: '60px',\n },\n};\n\nexport const logoRecipe = defineRecipe({\n base: {},\n variants: {\n type: logoTypeStyles,\n variant: {\n ...typographyVariantStyles,\n primary: typographyVariantStyles.brand,\n },\n },\n defaultVariants: {\n type: 'full',\n variant: 'default',\n },\n});\n","import React from 'react';\nimport { Box, BoxProps } from '@chakra-ui/react/box';\nimport { LogoType, LogoVariant } from './logo.types';\nimport { FullLogo, IconLogo } from './generated';\nimport { useRecipe } from '@chakra-ui/react/styled-system';\nimport { logoRecipe } from './logo.recipe';\n\nexport interface LogoProps extends Omit<BoxProps, 'color'> {\n onClick?: () => void;\n type?: LogoType;\n variant?: LogoVariant;\n}\n\nexport const Logo = ({ onClick, type = 'full', variant = 'default', ...rest }: LogoProps): React.JSX.Element => {\n const LogoComponent = type === 'full' ? FullLogo : IconLogo;\n const recipe = useRecipe({ recipe: logoRecipe });\n const styles = recipe({ variant, type });\n\n return (\n <Box\n className=\"Logo\"\n data-testid=\"kibble-logo\"\n {...(onClick && { cursor: 'pointer', onClick })}\n css={styles}\n {...rest}\n >\n <LogoComponent color=\"currentColor\" width=\"100%\" height=\"100%\" />\n </Box>\n );\n};\n","import { TypographyVariant } from 'shared/types/typography';\n\nexport const logoTypes = ['full', 'icon'] as const;\nexport type LogoType = (typeof logoTypes)[number];\n\nexport type LogoVariant = TypographyVariant | 'primary';\n"],"names":["logoTypeStyles","logoRecipe","defineRecipe","typographyVariantStyles","Logo","onClick","type","variant","rest","LogoComponent","FullLogo","IconLogo","styles","useRecipe","jsx","Box","logoTypes"],"mappings":";;;;;;AAIA,MAAMA,IAAsD;AAAA,EAC1D,MAAM;AAAA,IACJ,OAAO;AAAA,EACT;AAAA,EACA,MAAM;AAAA,IACJ,OAAO;AAAA,EAAA;AAEX,GAEaC,IAAaC,EAAa;AAAA,EACrC,MAAM,CAAC;AAAA,EACP,UAAU;AAAA,IACR,MAAMF;AAAA,IACN,SAAS;AAAA,MACP,GAAGG;AAAA,MACH,SAASA,EAAwB;AAAA,IAAA;AAAA,EAErC;AAAA,EACA,iBAAiB;AAAA,IACf,MAAM;AAAA,IACN,SAAS;AAAA,EAAA;AAEb,CAAC,GCbYC,IAAO,CAAC,EAAE,SAAAC,GAAS,MAAAC,IAAO,QAAQ,SAAAC,IAAU,WAAW,GAAGC,QAAyC;AACxG,QAAAC,IAAgBH,MAAS,SAASI,IAAWC,GAE7CC,IADSC,EAAU,EAAE,QAAQZ,GAAY,EACzB,EAAE,SAAAM,GAAS,MAAAD,GAAM;AAGrC,SAAAQ,gBAAAA,EAAA;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MACV,eAAY;AAAA,MACX,GAAIV,KAAW,EAAE,QAAQ,WAAW,SAAAA,EAAQ;AAAA,MAC7C,KAAKO;AAAA,MACJ,GAAGJ;AAAA,MAEJ,gCAACC,GAAc,EAAA,OAAM,gBAAe,OAAM,QAAO,QAAO,OAAO,CAAA;AAAA,IAAA;AAAA,EACjE;AAEJ,GC3BaO,IAAY,CAAC,QAAQ,MAAM;"}
|
|
@@ -16,6 +16,7 @@ import { c as to } from "./checkbox.anatomy-DCCPwuXc.js";
|
|
|
16
16
|
import { i as oo } from "./tooltip.component-B15VGEn1.js";
|
|
17
17
|
import { a as ro } from "./index-O8mh7GXa.js";
|
|
18
18
|
import { coreColors as o } from "../esm/theme/tokens/colors/index.js";
|
|
19
|
+
import { i as l } from "./invertToken-DkyAF_BY.js";
|
|
19
20
|
import { f as fe, t as ve } from "./typography-Cqrokog3.js";
|
|
20
21
|
import { Global as ao } from "@emotion/react";
|
|
21
22
|
import io, { forwardRef as j, useId as so } from "react";
|
|
@@ -9427,12 +9428,7 @@ const mi = (e) => /* @__PURE__ */ n.jsx(zt, { attribute: "class", disableTransit
|
|
|
9427
9428
|
toast: 1700,
|
|
9428
9429
|
tooltip: 1800,
|
|
9429
9430
|
tooltipExtra: 1e4
|
|
9430
|
-
}, Hi = d.zIndex(w(Fi)),
|
|
9431
|
-
value: {
|
|
9432
|
-
_light: e.value._dark,
|
|
9433
|
-
_dark: e.value._light
|
|
9434
|
-
}
|
|
9435
|
-
}), t = {
|
|
9431
|
+
}, Hi = d.zIndex(w(Fi)), t = {
|
|
9436
9432
|
primary: {
|
|
9437
9433
|
default: {
|
|
9438
9434
|
value: {
|
|
@@ -12217,7 +12213,7 @@ const mi = (e) => /* @__PURE__ */ n.jsx(zt, { attribute: "class", disableTransit
|
|
|
12217
12213
|
}, O = ({ toaster: e }) => /* @__PURE__ */ n.jsx(Gt, { children: /* @__PURE__ */ n.jsx(di, { className: "Toaster", "data-testid": "kibble-toaster", toaster: e, children: ({ title: r, description: a, meta: s }) => {
|
|
12218
12214
|
const m = typeof r == "string" ? r : void 0, y = typeof a == "string" ? a : void 0;
|
|
12219
12215
|
return /* @__PURE__ */ n.jsx(Hs, { title: m, description: y, ...s });
|
|
12220
|
-
} }) }),
|
|
12216
|
+
} }) }), zn = ({
|
|
12221
12217
|
customTheme: e,
|
|
12222
12218
|
children: r,
|
|
12223
12219
|
enableSystem: a = !1,
|
|
@@ -12264,8 +12260,8 @@ const mi = (e) => /* @__PURE__ */ n.jsx(zt, { attribute: "class", disableTransit
|
|
|
12264
12260
|
/* @__PURE__ */ n.jsx(mi, { storageKey: So, enableSystem: a, ...s, children: r })
|
|
12265
12261
|
] });
|
|
12266
12262
|
export {
|
|
12267
|
-
|
|
12263
|
+
zn as K,
|
|
12268
12264
|
Ls as k,
|
|
12269
12265
|
Fs as s
|
|
12270
12266
|
};
|
|
12271
|
-
//# sourceMappingURL=theme.provider-
|
|
12267
|
+
//# sourceMappingURL=theme.provider-DJQeMr5K.js.map
|