@televet/kibble-ui 4.0.0-beta.110 → 4.0.0-beta.111
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/alert.types-CEvBY7aM.js +2 -0
- package/dist/chunks/alert.types-CEvBY7aM.js.map +1 -0
- package/dist/chunks/alert.types-D7zIiGeb.js +139 -0
- package/dist/chunks/alert.types-D7zIiGeb.js.map +1 -0
- package/dist/chunks/{datePicker.component-DCtuIpuZ.js → datePicker.component-C2wNXnG7.js} +2 -2
- package/dist/chunks/{datePicker.component-DCtuIpuZ.js.map → datePicker.component-C2wNXnG7.js.map} +1 -1
- package/dist/chunks/{datePicker.component-DPTXomfM.js → datePicker.component-DQXEQ7Fw.js} +2 -2
- package/dist/chunks/{datePicker.component-DPTXomfM.js.map → datePicker.component-DQXEQ7Fw.js.map} +1 -1
- package/dist/chunks/{grid-item-BV4dwEBP.js → grid-item-BBt_-NiB.js} +18 -17
- package/dist/chunks/grid-item-BBt_-NiB.js.map +1 -0
- package/dist/chunks/grid-item-BfAkrDSq.js +2 -0
- package/dist/chunks/grid-item-BfAkrDSq.js.map +1 -0
- package/dist/chunks/{index-CYHDITxm.js → index-BXFjoQqm.js} +275 -275
- package/dist/chunks/{index-CYHDITxm.js.map → index-BXFjoQqm.js.map} +1 -1
- package/dist/chunks/{index-ClcMgyeA.js → index-DLX5_Po7.js} +3 -3
- package/dist/chunks/{index-ClcMgyeA.js.map → index-DLX5_Po7.js.map} +1 -1
- package/dist/chunks/{theme.provider-CQpr47CB.js → theme.provider-Bg1iY5Ff.js} +2 -2
- package/dist/chunks/{theme.provider-CQpr47CB.js.map → theme.provider-Bg1iY5Ff.js.map} +1 -1
- package/dist/chunks/{theme.provider-DODDzvWC.js → theme.provider-C0rvywmv.js} +2 -2
- package/dist/chunks/{theme.provider-DODDzvWC.js.map → theme.provider-C0rvywmv.js.map} +1 -1
- package/dist/cjs/chakra/index.cjs +1 -1
- package/dist/cjs/chakra/index.cjs.map +1 -1
- package/dist/cjs/components/Alert/index.cjs +1 -1
- package/dist/cjs/components/DatePicker/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/esm/chakra/index.js +1754 -1754
- package/dist/esm/chakra/index.js.map +1 -1
- package/dist/esm/components/Alert/index.js +1 -1
- package/dist/esm/components/DatePicker/index.js +1 -1
- package/dist/esm/components/index.js +2 -2
- package/dist/esm/index.js +3 -3
- package/dist/esm/theme/index.js +1 -1
- package/dist/types/components/Alert/alert.types.d.ts +1 -1
- package/package.json +1 -1
- package/dist/chunks/alert.types-BGRyfYMy.js +0 -139
- package/dist/chunks/alert.types-BGRyfYMy.js.map +0 -1
- package/dist/chunks/alert.types-BVJZGZh-.js +0 -2
- package/dist/chunks/alert.types-BVJZGZh-.js.map +0 -1
- package/dist/chunks/grid-item-BV4dwEBP.js.map +0 -1
- package/dist/chunks/grid-item-CR-sXrjU.js +0 -2
- package/dist/chunks/grid-item-CR-sXrjU.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as r, a as t } from "../../chunks/alert.types-
|
|
1
|
+
import { A as r, a as t } from "../../chunks/alert.types-D7zIiGeb.js";
|
|
2
2
|
import { A as e } from "../../chunks/avatar.component-77NanIaH.js";
|
|
3
3
|
import { a as i, b as m } from "../../chunks/avatar.types-C6dZZjdi.js";
|
|
4
4
|
import { A as x } from "../../chunks/avatarGroup.component-dNR80_Br.js";
|
|
@@ -11,7 +11,7 @@ import { C as B } from "../../chunks/characterCounter.component-DElJ1iFK.js";
|
|
|
11
11
|
import { W as h } from "../../chunks/checkbox.component-CyWf-jhq.js";
|
|
12
12
|
import { W as M } from "../../chunks/checkboxGroup.component-Cu6qUJOk.js";
|
|
13
13
|
import { C as k } from "../../chunks/conversationCard.component-aCCQmc5q.js";
|
|
14
|
-
import { a as L, D as G } from "../../chunks/datePicker.component-
|
|
14
|
+
import { a as L, D as G } from "../../chunks/datePicker.component-DQXEQ7Fw.js";
|
|
15
15
|
import { D as R, d as N, a as F, b as H } from "../../chunks/divider.types-0j5qRXed.js";
|
|
16
16
|
import { W as j } from "../../chunks/heading.component-CSbfsm3W.js";
|
|
17
17
|
import { I as E } from "../../chunks/icon.component-S_qFWBRf.js";
|
package/dist/esm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as a, a as e } from "../chunks/alert.types-
|
|
1
|
+
import { A as a, a as e } from "../chunks/alert.types-D7zIiGeb.js";
|
|
2
2
|
import { A as s } from "../chunks/avatar.component-77NanIaH.js";
|
|
3
3
|
import { a as i, b as m } from "../chunks/avatar.types-C6dZZjdi.js";
|
|
4
4
|
import { A as x } from "../chunks/avatarGroup.component-dNR80_Br.js";
|
|
@@ -11,7 +11,7 @@ import { C as z } from "../chunks/characterCounter.component-DElJ1iFK.js";
|
|
|
11
11
|
import { W } from "../chunks/checkbox.component-CyWf-jhq.js";
|
|
12
12
|
import { W as B } from "../chunks/checkboxGroup.component-Cu6qUJOk.js";
|
|
13
13
|
import { C as A } from "../chunks/conversationCard.component-aCCQmc5q.js";
|
|
14
|
-
import { a as I, D as L } from "../chunks/datePicker.component-
|
|
14
|
+
import { a as I, D as L } from "../chunks/datePicker.component-DQXEQ7Fw.js";
|
|
15
15
|
import { D as K, d as R, a as N, b as F } from "../chunks/divider.types-0j5qRXed.js";
|
|
16
16
|
import { W as O } from "../chunks/heading.component-CSbfsm3W.js";
|
|
17
17
|
import { I as q } from "../chunks/icon.component-S_qFWBRf.js";
|
|
@@ -55,7 +55,7 @@ import { useColorModeValue as zr } from "./hooks/useColorModeValue/index.js";
|
|
|
55
55
|
import { useDeviceType as Wr } from "./hooks/useDeviceType/index.js";
|
|
56
56
|
import { alignments as Br, flexDirections as Vr, placements as Ar, statuses as wr, typographyVariants as Ir } from "./shared/types/index.js";
|
|
57
57
|
import { c as Gr } from "../chunks/theme-BOK659O0.js";
|
|
58
|
-
import { K as Rr, k as Nr, s as Fr } from "../chunks/theme.provider-
|
|
58
|
+
import { K as Rr, k as Nr, s as Fr } from "../chunks/theme.provider-C0rvywmv.js";
|
|
59
59
|
export {
|
|
60
60
|
a as Alert,
|
|
61
61
|
s as Avatar,
|
package/dist/esm/theme/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const alertButtonPositions: readonly ["topRight", "bottomLeft"];
|
|
1
|
+
export declare const alertButtonPositions: readonly ["topRight", "bottomLeft", "bottomRight"];
|
|
2
2
|
export type AlertButtonPosition = (typeof alertButtonPositions)[number];
|
package/package.json
CHANGED
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
import { j as t } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
|
-
import b, { forwardRef as v, Fragment as _ } from "react";
|
|
3
|
-
import { W as k } from "./heading.component-CSbfsm3W.js";
|
|
4
|
-
import { I as y } from "./icon.component-S_qFWBRf.js";
|
|
5
|
-
import { W as R } from "./text.component-BMna3XOy.js";
|
|
6
|
-
import { B as j } from "./button.component-Br9jCpBx.js";
|
|
7
|
-
import { B as C } from "./box-Ck9I7FYv.js";
|
|
8
|
-
import { StatusIconMap as I, StatusTypographyMap as N } from "../esm/shared/records/index.js";
|
|
9
|
-
import { F as w } from "./flex-smlF8uQG.js";
|
|
10
|
-
import { c as B } from "./provider-ClCAdPxy.js";
|
|
11
|
-
import { c as S } from "./create-slot-recipe-context-BJmsuxih.js";
|
|
12
|
-
import { c as W } from "./factory-Ctbv0Ozn.js";
|
|
13
|
-
import { I as h, W as u, a as T } from "./icons-BXxdrBrf.js";
|
|
14
|
-
const [z, F] = B({
|
|
15
|
-
name: "AlertStatusContext",
|
|
16
|
-
hookName: "useAlertStatusContext",
|
|
17
|
-
providerName: "<Alert />"
|
|
18
|
-
}), {
|
|
19
|
-
withProvider: L,
|
|
20
|
-
withContext: x,
|
|
21
|
-
useStyles: M
|
|
22
|
-
} = S({ key: "alert" }), D = L(
|
|
23
|
-
"div",
|
|
24
|
-
"root",
|
|
25
|
-
{
|
|
26
|
-
forwardAsChild: !0,
|
|
27
|
-
wrapElement(e, s) {
|
|
28
|
-
return (
|
|
29
|
-
// @ts-ignore fix later
|
|
30
|
-
/* @__PURE__ */ t.jsx(z, { value: { status: s.status || "info" }, children: e })
|
|
31
|
-
);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
), E = x(
|
|
35
|
-
"div",
|
|
36
|
-
"title"
|
|
37
|
-
), H = x("div", "description"), q = x(
|
|
38
|
-
"div",
|
|
39
|
-
"content"
|
|
40
|
-
), G = {
|
|
41
|
-
info: h,
|
|
42
|
-
warning: u,
|
|
43
|
-
success: T,
|
|
44
|
-
error: u,
|
|
45
|
-
neutral: h
|
|
46
|
-
}, J = v(
|
|
47
|
-
function(s, o) {
|
|
48
|
-
const i = F(), n = M(), l = typeof i.status == "string" ? G[i.status] : _, { children: c = /* @__PURE__ */ t.jsx(l, {}), ...a } = s;
|
|
49
|
-
return /* @__PURE__ */ t.jsx(W.span, { ref: o, ...a, css: [n.indicator, s.css], children: c });
|
|
50
|
-
}
|
|
51
|
-
), f = ({
|
|
52
|
-
buttonPosition: e = "topRight",
|
|
53
|
-
buttonText: s,
|
|
54
|
-
status: o,
|
|
55
|
-
...i
|
|
56
|
-
}) => /* @__PURE__ */ t.jsx(
|
|
57
|
-
C,
|
|
58
|
-
{
|
|
59
|
-
className: "Alert__Button",
|
|
60
|
-
"data-testid": "kibble-alert-button",
|
|
61
|
-
...e === "bottomLeft" && { pt: 2, pb: 1 },
|
|
62
|
-
children: /* @__PURE__ */ t.jsx(j, { size: "xs", variant: o === "default" ? "primary" : "secondary", w: "max-content", ...i, children: s })
|
|
63
|
-
}
|
|
64
|
-
), at = ({
|
|
65
|
-
buttonProps: e,
|
|
66
|
-
description: s,
|
|
67
|
-
descriptionProps: o,
|
|
68
|
-
hideCloseButton: i = !1,
|
|
69
|
-
hideIcon: n = !1,
|
|
70
|
-
iconProps: l,
|
|
71
|
-
onClose: c,
|
|
72
|
-
onContrast: a = !1,
|
|
73
|
-
status: r = "success",
|
|
74
|
-
title: m,
|
|
75
|
-
titleProps: A,
|
|
76
|
-
...g
|
|
77
|
-
}) => {
|
|
78
|
-
e && !e.buttonPosition && (e.buttonPosition = "topRight");
|
|
79
|
-
const d = e && e.buttonPosition === "topRight", p = d ? w : b.Fragment;
|
|
80
|
-
return /* @__PURE__ */ t.jsxs(
|
|
81
|
-
D,
|
|
82
|
-
{
|
|
83
|
-
className: "Alert",
|
|
84
|
-
"data-testid": "kibble-alert",
|
|
85
|
-
...g,
|
|
86
|
-
variant: r,
|
|
87
|
-
hideIcon: n,
|
|
88
|
-
onContrast: a,
|
|
89
|
-
children: [
|
|
90
|
-
!n && /* @__PURE__ */ t.jsx(J, { className: "Alert__Icon", "data-testid": "kibble-alert-icon", children: /* @__PURE__ */ t.jsx(
|
|
91
|
-
y,
|
|
92
|
-
{
|
|
93
|
-
variant: a ? "onContrast" : N[r],
|
|
94
|
-
name: l?.name || I[r],
|
|
95
|
-
size: "lg",
|
|
96
|
-
...l
|
|
97
|
-
}
|
|
98
|
-
) }),
|
|
99
|
-
/* @__PURE__ */ t.jsxs(q, { className: "Alert__Content", "data-testid": "kibble-alert-content", children: [
|
|
100
|
-
m && /* @__PURE__ */ t.jsxs(
|
|
101
|
-
p,
|
|
102
|
-
{
|
|
103
|
-
...d && {
|
|
104
|
-
justifyContent: "space-between",
|
|
105
|
-
gap: 2
|
|
106
|
-
},
|
|
107
|
-
children: [
|
|
108
|
-
/* @__PURE__ */ t.jsx(E, { className: "Alert__Title", "data-testid": "kibble-alert-title", children: /* @__PURE__ */ t.jsx(k, { size: "sm", variant: a ? "onContrast" : "default", ...A, children: m }) }),
|
|
109
|
-
e && e.buttonPosition === "topRight" && /* @__PURE__ */ t.jsx(f, { status: r, onContrast: a, ...e })
|
|
110
|
-
]
|
|
111
|
-
}
|
|
112
|
-
),
|
|
113
|
-
s && /* @__PURE__ */ t.jsxs(p, { ...d && { justifyContent: "space-between" }, children: [
|
|
114
|
-
/* @__PURE__ */ t.jsx(H, { className: "Alert__Description", "data-testid": "kibble-alert-description", children: typeof s == "string" ? /* @__PURE__ */ t.jsx(R, { size: "md", variant: a ? "onContrast" : "default", ...o, children: s }) : s }),
|
|
115
|
-
e && e.buttonPosition === "topRight" && !m && /* @__PURE__ */ t.jsx(f, { status: r, onContrast: a, ...e })
|
|
116
|
-
] }),
|
|
117
|
-
e?.buttonPosition === "bottomLeft" && /* @__PURE__ */ t.jsx(f, { status: r, onContrast: a, ...e })
|
|
118
|
-
] }),
|
|
119
|
-
!i && /* @__PURE__ */ t.jsx(
|
|
120
|
-
j,
|
|
121
|
-
{
|
|
122
|
-
className: "Alert__CloseTrigger",
|
|
123
|
-
"data-testid": "kibble-alert-close-trigger",
|
|
124
|
-
iconName: "close",
|
|
125
|
-
size: "xs",
|
|
126
|
-
variant: "ghostNeutral",
|
|
127
|
-
onContrast: a,
|
|
128
|
-
onClick: c
|
|
129
|
-
}
|
|
130
|
-
)
|
|
131
|
-
]
|
|
132
|
-
}
|
|
133
|
-
);
|
|
134
|
-
}, it = ["topRight", "bottomLeft"];
|
|
135
|
-
export {
|
|
136
|
-
at as A,
|
|
137
|
-
it as a
|
|
138
|
-
};
|
|
139
|
-
//# sourceMappingURL=alert.types-BGRyfYMy.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"alert.types-BGRyfYMy.js","sources":["../../node_modules/@chakra-ui/react/dist/esm/components/alert/alert.js","../../src/components/Alert/components/AlertButton/alertButton.component.tsx","../../src/components/Alert/alert.component.tsx","../../src/components/Alert/alert.types.ts"],"sourcesContent":["\"use strict\";\n\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { forwardRef, Fragment } from 'react';\nimport { createContext } from '../../create-context.js';\nimport { createSlotRecipeContext } from '../../styled-system/create-slot-recipe-context.js';\nimport { chakra } from '../../styled-system/factory.js';\nimport { InfoIcon, WarningIcon, CheckCircleIcon } from '../icons.js';\n\nconst [AlertStatusProvider, useAlertStatusContext] = createContext({\n name: \"AlertStatusContext\",\n hookName: \"useAlertStatusContext\",\n providerName: \"<Alert />\"\n});\nconst {\n withProvider,\n withContext,\n useStyles: useAlertStyles,\n PropsProvider\n} = createSlotRecipeContext({ key: \"alert\" });\nconst AlertRoot = withProvider(\n \"div\",\n \"root\",\n {\n forwardAsChild: true,\n wrapElement(element, props) {\n return (\n // @ts-ignore fix later\n /* @__PURE__ */ jsx(AlertStatusProvider, { value: { status: props.status || \"info\" }, children: element })\n );\n }\n }\n);\nconst AlertPropsProvider = PropsProvider;\nconst AlertTitle = withContext(\n \"div\",\n \"title\"\n);\nconst AlertDescription = withContext(\"div\", \"description\");\nconst AlertContent = withContext(\n \"div\",\n \"content\"\n);\nconst iconMap = {\n info: InfoIcon,\n warning: WarningIcon,\n success: CheckCircleIcon,\n error: WarningIcon,\n neutral: InfoIcon\n};\nconst AlertIndicator = forwardRef(\n function AlertIndicator2(props, ref) {\n const api = useAlertStatusContext();\n const styles = useAlertStyles();\n const Icon = typeof api.status === \"string\" ? iconMap[api.status] : Fragment;\n const { children = /* @__PURE__ */ jsx(Icon, {}), ...rest } = props;\n return /* @__PURE__ */ jsx(chakra.span, { ref, ...rest, css: [styles.indicator, props.css], children });\n }\n);\n\nexport { AlertContent, AlertDescription, AlertIndicator, AlertPropsProvider, AlertRoot, AlertStatusProvider, AlertTitle, useAlertStatusContext, useAlertStyles };\n","import React from 'react';\nimport { AlertButtonPosition } from 'components/Alert/alert.types';\nimport { Button, ButtonProps } from 'components/Button/button.component';\nimport { Status } from 'shared/types/status';\nimport { Box } from '@chakra-ui/react/box';\n\nexport interface AlertButtonProps extends Omit<ButtonProps, 'children'> {\n buttonPosition?: AlertButtonPosition;\n buttonText: string;\n}\n\ninterface InternalAlertButtonProps extends AlertButtonProps {\n status: Status;\n}\n\nexport const AlertButton = ({\n buttonPosition = 'topRight',\n buttonText,\n status,\n ...rest\n}: InternalAlertButtonProps): React.JSX.Element => {\n return (\n <Box\n className=\"Alert__Button\"\n data-testid=\"kibble-alert-button\"\n {...(buttonPosition === 'bottomLeft' && { pt: 2, pb: 1 })}\n >\n <Button size=\"xs\" variant={status === 'default' ? 'primary' : 'secondary'} w=\"max-content\" {...rest}>\n {buttonText}\n </Button>\n </Box>\n );\n};\n","import React from 'react';\nimport { Alert as CAlert } from '@chakra-ui/react/alert';\nimport { Heading, HeadingProps } from 'components/Heading/heading.component';\nimport { Icon, IconProps } from 'components/Icon/icon.component';\nimport { Text, TextProps } from 'components/Text/text.component';\nimport { Status } from 'shared/types/status';\nimport { Button } from 'components/Button/button.component';\nimport { Flex } from '@chakra-ui/react/flex';\nimport { AlertButton, AlertButtonProps } from './components/AlertButton/alertButton.component';\nimport { StatusIconMap, StatusTypographyMap } from 'shared/records/status';\n\nexport interface AlertProps extends Omit<CAlert.RootProps, 'title' | 'status' | 'children' | 'variant' | 'size'> {\n buttonProps?: AlertButtonProps;\n description?: React.ReactNode;\n descriptionProps?: TextProps;\n hideCloseButton?: boolean;\n hideIcon?: boolean;\n iconProps?: IconProps;\n onClose?: React.MouseEventHandler<HTMLButtonElement>;\n onContrast?: boolean;\n status?: Status;\n title?: React.ReactNode;\n titleProps?: HeadingProps;\n}\n\nexport const Alert = ({\n buttonProps,\n description,\n descriptionProps,\n hideCloseButton = false,\n hideIcon = false,\n iconProps,\n onClose,\n onContrast = false,\n status = 'success',\n title,\n titleProps,\n ...rest\n}: AlertProps): React.JSX.Element => {\n if (buttonProps && !buttonProps.buttonPosition) {\n buttonProps.buttonPosition = 'topRight';\n }\n const isTopRightButton = buttonProps && buttonProps.buttonPosition === 'topRight';\n const WithButtonWrapper = isTopRightButton ? Flex : React.Fragment;\n\n return (\n <CAlert.Root\n className=\"Alert\"\n data-testid=\"kibble-alert\"\n {...rest}\n variant={status}\n hideIcon={hideIcon}\n onContrast={onContrast}\n >\n {!hideIcon && (\n <CAlert.Indicator className=\"Alert__Icon\" data-testid=\"kibble-alert-icon\">\n <Icon\n variant={onContrast ? 'onContrast' : StatusTypographyMap[status]}\n name={iconProps?.name || StatusIconMap[status]}\n size=\"lg\"\n {...iconProps}\n />\n </CAlert.Indicator>\n )}\n <CAlert.Content className=\"Alert__Content\" data-testid=\"kibble-alert-content\">\n {title && (\n <WithButtonWrapper\n {...(isTopRightButton && {\n justifyContent: 'space-between',\n gap: 2,\n })}\n >\n <CAlert.Title className=\"Alert__Title\" data-testid=\"kibble-alert-title\">\n <Heading size=\"sm\" variant={onContrast ? 'onContrast' : 'default'} {...titleProps}>\n {title}\n </Heading>\n </CAlert.Title>\n {buttonProps && buttonProps.buttonPosition === 'topRight' && (\n <AlertButton status={status} onContrast={onContrast} {...buttonProps} />\n )}\n </WithButtonWrapper>\n )}\n {description && (\n <WithButtonWrapper {...(isTopRightButton && { justifyContent: 'space-between' })}>\n <CAlert.Description className=\"Alert__Description\" data-testid=\"kibble-alert-description\">\n {typeof description === 'string' ? (\n <Text size=\"md\" variant={onContrast ? 'onContrast' : 'default'} {...descriptionProps}>\n {description}\n </Text>\n ) : (\n description\n )}\n </CAlert.Description>\n {buttonProps && buttonProps.buttonPosition === 'topRight' && !title && (\n <AlertButton status={status} onContrast={onContrast} {...buttonProps} />\n )}\n </WithButtonWrapper>\n )}\n {buttonProps?.buttonPosition === 'bottomLeft' && (\n <AlertButton status={status} onContrast={onContrast} {...buttonProps} />\n )}\n </CAlert.Content>\n {!hideCloseButton && (\n <Button\n className=\"Alert__CloseTrigger\"\n data-testid=\"kibble-alert-close-trigger\"\n iconName=\"close\"\n size=\"xs\"\n variant=\"ghostNeutral\"\n onContrast={onContrast}\n onClick={onClose}\n />\n )}\n </CAlert.Root>\n );\n};\n","export const alertButtonPositions = ['topRight', 'bottomLeft'] as const;\nexport type AlertButtonPosition = (typeof alertButtonPositions)[number];\n"],"names":["AlertStatusProvider","useAlertStatusContext","createContext","withProvider","withContext","useAlertStyles","createSlotRecipeContext","AlertRoot","element","props","jsx","AlertTitle","AlertDescription","AlertContent","iconMap","InfoIcon","WarningIcon","CheckCircleIcon","AlertIndicator","forwardRef","ref","api","styles","Icon","Fragment","children","rest","chakra","AlertButton","buttonPosition","buttonText","status","Box","Button","Alert","buttonProps","description","descriptionProps","hideCloseButton","hideIcon","iconProps","onClose","onContrast","title","titleProps","isTopRightButton","WithButtonWrapper","Flex","React","jsxs","CAlert.Root","CAlert.Indicator","StatusTypographyMap","StatusIconMap","CAlert.Content","CAlert.Title","Heading","CAlert.Description","Text","alertButtonPositions"],"mappings":";;;;;;;;;;;;;AASA,MAAM,CAACA,GAAqBC,CAAqB,IAAIC,EAAc;AAAA,EACjE,MAAM;AAAA,EACN,UAAU;AAAA,EACV,cAAc;AAChB,CAAC,GACK;AAAA,EACJ,cAAAC;AAAA,EACA,aAAAC;AAAA,EACA,WAAWC;AAEb,IAAIC,EAAwB,EAAE,KAAK,QAAO,CAAE,GACtCC,IAAYJ;AAAA,EAChB;AAAA,EACA;AAAA,EACA;AAAA,IACE,gBAAgB;AAAA,IAChB,YAAYK,GAASC,GAAO;AAC1B;AAAA;AAAA,QAEkBC,gBAAAA,EAAAA,IAAIV,GAAqB,EAAE,OAAO,EAAE,QAAQS,EAAM,UAAU,OAAM,GAAI,UAAUD,EAAS,CAAA;AAAA;AAAA,IAEjH;AAAA,EACA;AACA,GAEMG,IAAaP;AAAA,EACjB;AAAA,EACA;AACF,GACMQ,IAAmBR,EAAY,OAAO,aAAa,GACnDS,IAAeT;AAAA,EACnB;AAAA,EACA;AACF,GACMU,IAAU;AAAA,EACd,MAAMC;AAAA,EACN,SAASC;AAAA,EACT,SAASC;AAAA,EACT,OAAOD;AAAA,EACP,SAASD;AACX,GACMG,IAAiBC;AAAA,EACrB,SAAyBV,GAAOW,GAAK;AACnC,UAAMC,IAAMpB,EAAuB,GAC7BqB,IAASjB,EAAgB,GACzBkB,IAAO,OAAOF,EAAI,UAAW,WAAWP,EAAQO,EAAI,MAAM,IAAIG,GAC9D,EAAE,UA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AW,GAAyB,GAAGP,EAAa,CAAA;AAAA,UAAA,GAE1E;AAAA,UAEDA,GAAa,mBAAmB,gBAC/BzB,gBAAAA,EAAA,IAACkB,KAAY,QAAAG,GAAgB,YAAAW,GAAyB,GAAGP,EAAa,CAAA;AAAA,QAAA,GAE1E;AAAA,QACC,CAACG,KACA5B,gBAAAA,EAAA;AAAA,UAACuB;AAAA,UAAA;AAAA,YACC,WAAU;AAAA,YACV,eAAY;AAAA,YACZ,UAAS;AAAA,YACT,MAAK;AAAA,YACL,SAAQ;AAAA,YACR,YAAAS;AAAA,YACA,SAASD;AAAA,UAAA;AAAA,QAAA;AAAA,MACX;AAAA,IAAA;AAAA,EAEJ;AAEJ,GCnHakB,KAAuB,CAAC,YAAY,YAAY;","x_google_ignoreList":[0]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("./jsx-runtime-BjDatQAs.js"),p=require("react"),_=require("./heading.component-BMvc5kM8.js"),E=require("./icon.component-B6R8-DRk.js"),b=require("./text.component-waIIFgwB.js"),f=require("./button.component-CsJxgblU.js"),v=require("./box-Baq7UBls.js"),h=require("../cjs/shared/records/index.cjs"),q=require("./flex-D14H6HbP.js"),y=require("./provider-NDo8kOkE.js"),k=require("./create-slot-recipe-context-IwVIgtBt.js"),C=require("./factory-D6tdBUPG.js"),a=require("./icons-CTpAjbC-.js"),I=t=>t&&t.__esModule?t:{default:t},N=I(p),[S,w]=y.createContext({name:"AlertStatusContext",hookName:"useAlertStatusContext",providerName:"<Alert />"}),{withProvider:B,withContext:j,useStyles:T}=k.createSlotRecipeContext({key:"alert"}),W=B("div","root",{forwardAsChild:!0,wrapElement(t,s){return e.jsxRuntimeExports.jsx(S,{value:{status:s.status||"info"},children:t})}}),z=j("div","title"),M=j("div","description"),D=j("div","content"),F={info:a.InfoIcon,warning:a.WarningIcon,success:a.CheckCircleIcon,error:a.WarningIcon,neutral:a.InfoIcon},L=p.forwardRef(function(s,o){const i=w(),c=T(),l=typeof i.status=="string"?F[i.status]:p.Fragment,{children:x=e.jsxRuntimeExports.jsx(l,{}),...n}=s;return e.jsxRuntimeExports.jsx(C.chakra.span,{ref:o,...n,css:[c.indicator,s.css],children:x})}),m=({buttonPosition:t="topRight",buttonText:s,status:o,...i})=>e.jsxRuntimeExports.jsx(v.Box,{className:"Alert__Button","data-testid":"kibble-alert-button",...t==="bottomLeft"&&{pt:2,pb:1},children:e.jsxRuntimeExports.jsx(f.Button,{size:"xs",variant:o==="default"?"primary":"secondary",w:"max-content",...i,children:s})}),H=({buttonProps:t,description:s,descriptionProps:o,hideCloseButton:i=!1,hideIcon:c=!1,iconProps:l,onClose:x,onContrast:n=!1,status:r="success",title:u,titleProps:g,...A})=>{t&&!t.buttonPosition&&(t.buttonPosition="topRight");const d=t&&t.buttonPosition==="topRight",R=d?q.Flex:N.default.Fragment;return e.jsxRuntimeExports.jsxs(W,{className:"Alert","data-testid":"kibble-alert",...A,variant:r,hideIcon:c,onContrast:n,children:[!c&&e.jsxRuntimeExports.jsx(L,{className:"Alert__Icon","data-testid":"kibble-alert-icon",children:e.jsxRuntimeExports.jsx(E.Icon,{variant:n?"onContrast":h.StatusTypographyMap[r],name:l?.name||h.StatusIconMap[r],size:"lg",...l})}),e.jsxRuntimeExports.jsxs(D,{className:"Alert__Content","data-testid":"kibble-alert-content",children:[u&&e.jsxRuntimeExports.jsxs(R,{...d&&{justifyContent:"space-between",gap:2},children:[e.jsxRuntimeExports.jsx(z,{className:"Alert__Title","data-testid":"kibble-alert-title",children:e.jsxRuntimeExports.jsx(_.WrappedHeading,{size:"sm",variant:n?"onContrast":"default",...g,children:u})}),t&&t.buttonPosition==="topRight"&&e.jsxRuntimeExports.jsx(m,{status:r,onContrast:n,...t})]}),s&&e.jsxRuntimeExports.jsxs(R,{...d&&{justifyContent:"space-between"},children:[e.jsxRuntimeExports.jsx(M,{className:"Alert__Description","data-testid":"kibble-alert-description",children:typeof s=="string"?e.jsxRuntimeExports.jsx(b.WrappedText,{size:"md",variant:n?"onContrast":"default",...o,children:s}):s}),t&&t.buttonPosition==="topRight"&&!u&&e.jsxRuntimeExports.jsx(m,{status:r,onContrast:n,...t})]}),t?.buttonPosition==="bottomLeft"&&e.jsxRuntimeExports.jsx(m,{status:r,onContrast:n,...t})]}),!i&&e.jsxRuntimeExports.jsx(f.Button,{className:"Alert__CloseTrigger","data-testid":"kibble-alert-close-trigger",iconName:"close",size:"xs",variant:"ghostNeutral",onContrast:n,onClick:x})]})},G=["topRight","bottomLeft"];exports.Alert=H;exports.alertButtonPositions=G;
|
|
2
|
-
//# sourceMappingURL=alert.types-BVJZGZh-.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"alert.types-BVJZGZh-.js","sources":["../../node_modules/@chakra-ui/react/dist/esm/components/alert/alert.js","../../src/components/Alert/components/AlertButton/alertButton.component.tsx","../../src/components/Alert/alert.component.tsx","../../src/components/Alert/alert.types.ts"],"sourcesContent":["\"use strict\";\n\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { forwardRef, Fragment } from 'react';\nimport { createContext } from '../../create-context.js';\nimport { createSlotRecipeContext } from '../../styled-system/create-slot-recipe-context.js';\nimport { chakra } from '../../styled-system/factory.js';\nimport { InfoIcon, WarningIcon, CheckCircleIcon } from '../icons.js';\n\nconst [AlertStatusProvider, useAlertStatusContext] = createContext({\n name: \"AlertStatusContext\",\n hookName: \"useAlertStatusContext\",\n providerName: \"<Alert />\"\n});\nconst {\n withProvider,\n withContext,\n useStyles: useAlertStyles,\n PropsProvider\n} = createSlotRecipeContext({ key: \"alert\" });\nconst AlertRoot = withProvider(\n \"div\",\n \"root\",\n {\n forwardAsChild: true,\n wrapElement(element, props) {\n return (\n // @ts-ignore fix later\n /* @__PURE__ */ jsx(AlertStatusProvider, { value: { status: props.status || \"info\" }, children: element })\n );\n }\n }\n);\nconst AlertPropsProvider = PropsProvider;\nconst AlertTitle = withContext(\n \"div\",\n \"title\"\n);\nconst AlertDescription = withContext(\"div\", \"description\");\nconst AlertContent = withContext(\n \"div\",\n \"content\"\n);\nconst iconMap = {\n info: InfoIcon,\n warning: WarningIcon,\n success: CheckCircleIcon,\n error: WarningIcon,\n neutral: InfoIcon\n};\nconst AlertIndicator = forwardRef(\n function AlertIndicator2(props, ref) {\n const api = useAlertStatusContext();\n const styles = useAlertStyles();\n const Icon = typeof api.status === \"string\" ? iconMap[api.status] : Fragment;\n const { children = /* @__PURE__ */ jsx(Icon, {}), ...rest } = props;\n return /* @__PURE__ */ jsx(chakra.span, { ref, ...rest, css: [styles.indicator, props.css], children });\n }\n);\n\nexport { AlertContent, AlertDescription, AlertIndicator, AlertPropsProvider, AlertRoot, AlertStatusProvider, AlertTitle, useAlertStatusContext, useAlertStyles };\n","import React from 'react';\nimport { AlertButtonPosition } from 'components/Alert/alert.types';\nimport { Button, ButtonProps } from 'components/Button/button.component';\nimport { Status } from 'shared/types/status';\nimport { Box } from '@chakra-ui/react/box';\n\nexport interface AlertButtonProps extends Omit<ButtonProps, 'children'> {\n buttonPosition?: AlertButtonPosition;\n buttonText: string;\n}\n\ninterface InternalAlertButtonProps extends AlertButtonProps {\n status: Status;\n}\n\nexport const AlertButton = ({\n buttonPosition = 'topRight',\n buttonText,\n status,\n ...rest\n}: InternalAlertButtonProps): React.JSX.Element => {\n return (\n <Box\n className=\"Alert__Button\"\n data-testid=\"kibble-alert-button\"\n {...(buttonPosition === 'bottomLeft' && { pt: 2, pb: 1 })}\n >\n <Button size=\"xs\" variant={status === 'default' ? 'primary' : 'secondary'} w=\"max-content\" {...rest}>\n {buttonText}\n </Button>\n </Box>\n );\n};\n","import React from 'react';\nimport { Alert as CAlert } from '@chakra-ui/react/alert';\nimport { Heading, HeadingProps } from 'components/Heading/heading.component';\nimport { Icon, IconProps } from 'components/Icon/icon.component';\nimport { Text, TextProps } from 'components/Text/text.component';\nimport { Status } from 'shared/types/status';\nimport { Button } from 'components/Button/button.component';\nimport { Flex } from '@chakra-ui/react/flex';\nimport { AlertButton, AlertButtonProps } from './components/AlertButton/alertButton.component';\nimport { StatusIconMap, StatusTypographyMap } from 'shared/records/status';\n\nexport interface AlertProps extends Omit<CAlert.RootProps, 'title' | 'status' | 'children' | 'variant' | 'size'> {\n buttonProps?: AlertButtonProps;\n description?: React.ReactNode;\n descriptionProps?: TextProps;\n hideCloseButton?: boolean;\n hideIcon?: boolean;\n iconProps?: IconProps;\n onClose?: React.MouseEventHandler<HTMLButtonElement>;\n onContrast?: boolean;\n status?: Status;\n title?: React.ReactNode;\n titleProps?: HeadingProps;\n}\n\nexport const Alert = ({\n buttonProps,\n description,\n descriptionProps,\n hideCloseButton = false,\n hideIcon = false,\n iconProps,\n onClose,\n onContrast = false,\n status = 'success',\n title,\n titleProps,\n ...rest\n}: AlertProps): React.JSX.Element => {\n if (buttonProps && !buttonProps.buttonPosition) {\n buttonProps.buttonPosition = 'topRight';\n }\n const isTopRightButton = buttonProps && buttonProps.buttonPosition === 'topRight';\n const WithButtonWrapper = isTopRightButton ? Flex : React.Fragment;\n\n return (\n <CAlert.Root\n className=\"Alert\"\n data-testid=\"kibble-alert\"\n {...rest}\n variant={status}\n hideIcon={hideIcon}\n onContrast={onContrast}\n >\n {!hideIcon && (\n <CAlert.Indicator className=\"Alert__Icon\" data-testid=\"kibble-alert-icon\">\n <Icon\n variant={onContrast ? 'onContrast' : StatusTypographyMap[status]}\n name={iconProps?.name || StatusIconMap[status]}\n size=\"lg\"\n {...iconProps}\n />\n </CAlert.Indicator>\n )}\n <CAlert.Content className=\"Alert__Content\" data-testid=\"kibble-alert-content\">\n {title && (\n <WithButtonWrapper\n {...(isTopRightButton && {\n justifyContent: 'space-between',\n gap: 2,\n })}\n >\n <CAlert.Title className=\"Alert__Title\" data-testid=\"kibble-alert-title\">\n <Heading size=\"sm\" variant={onContrast ? 'onContrast' : 'default'} {...titleProps}>\n {title}\n </Heading>\n </CAlert.Title>\n {buttonProps && buttonProps.buttonPosition === 'topRight' && (\n <AlertButton status={status} onContrast={onContrast} {...buttonProps} />\n )}\n </WithButtonWrapper>\n )}\n {description && (\n <WithButtonWrapper {...(isTopRightButton && { justifyContent: 'space-between' })}>\n <CAlert.Description className=\"Alert__Description\" data-testid=\"kibble-alert-description\">\n {typeof description === 'string' ? (\n <Text size=\"md\" variant={onContrast ? 'onContrast' : 'default'} {...descriptionProps}>\n {description}\n </Text>\n ) : (\n description\n )}\n </CAlert.Description>\n {buttonProps && buttonProps.buttonPosition === 'topRight' && !title && (\n <AlertButton status={status} onContrast={onContrast} {...buttonProps} />\n )}\n </WithButtonWrapper>\n )}\n {buttonProps?.buttonPosition === 'bottomLeft' && (\n <AlertButton status={status} onContrast={onContrast} {...buttonProps} />\n )}\n </CAlert.Content>\n {!hideCloseButton && (\n <Button\n className=\"Alert__CloseTrigger\"\n data-testid=\"kibble-alert-close-trigger\"\n iconName=\"close\"\n size=\"xs\"\n variant=\"ghostNeutral\"\n onContrast={onContrast}\n onClick={onClose}\n />\n )}\n </CAlert.Root>\n );\n};\n","export const alertButtonPositions = ['topRight', 'bottomLeft'] as const;\nexport type AlertButtonPosition = (typeof alertButtonPositions)[number];\n"],"names":["AlertStatusProvider","useAlertStatusContext","createContext","withProvider","withContext","useAlertStyles","createSlotRecipeContext","AlertRoot","element","props","jsx","AlertTitle","AlertDescription","AlertContent","iconMap","InfoIcon","WarningIcon","CheckCircleIcon","AlertIndicator","forwardRef","ref","api","styles","Icon","Fragment","children","rest","chakra","AlertButton","buttonPosition","buttonText","status","Box","Button","Alert","buttonProps","description","descriptionProps","hideCloseButton","hideIcon","iconProps","onClose","onContrast","title","titleProps","isTopRightButton","WithButtonWrapper","Flex","React","jsxs","CAlert.Root","CAlert.Indicator","StatusTypographyMap","StatusIconMap","CAlert.Content","CAlert.Title","Heading","CAlert.Description","Text","alertButtonPositions"],"mappings":"8iBASM,CAACA,EAAqBC,CAAqB,EAAIC,gBAAc,CACjE,KAAM,qBACN,SAAU,wBACV,aAAc,WAChB,CAAC,EACK,CACJ,aAAAC,EACA,YAA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,EAAA,SAAA,CAACnC,EAAAA,kBAAAA,IAAA+C,EAAA,CAAmB,UAAU,qBAAqB,cAAY,2BAC5D,SAAO,OAAArB,GAAgB,SACtB1B,EAAA,kBAAA,IAACgD,eAAK,KAAK,KAAK,QAAShB,EAAa,aAAe,UAAY,GAAGL,EACjE,SACHD,EAAA,EAEAA,CAEJ,CAAA,EACCD,GAAeA,EAAY,iBAAmB,YAAc,CAACQ,GAC5DjC,wBAACkB,EAAY,CAAA,OAAAG,EAAgB,WAAAW,EAAyB,GAAGP,CAAa,CAAA,CAAA,EAE1E,EAEDA,GAAa,iBAAmB,cAC/BzB,EAAA,kBAAA,IAACkB,GAAY,OAAAG,EAAgB,WAAAW,EAAyB,GAAGP,CAAa,CAAA,CAAA,EAE1E,EACC,CAACG,GACA5B,EAAA,kBAAA,IAACuB,EAAA,OAAA,CACC,UAAU,sBACV,cAAY,6BACZ,SAAS,QACT,KAAK,KACL,QAAQ,eACR,WAAAS,EACA,QAASD,CAAA,CAAA,CACX,CAAA,CAEJ,CAEJ,ECnHakB,EAAuB,CAAC,WAAY,YAAY","x_google_ignoreList":[0]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"grid-item-BV4dwEBP.js","sources":["../../node_modules/@chakra-ui/react/dist/esm/components/grid/grid.js","../../node_modules/@chakra-ui/react/dist/esm/components/center/center.js","../../node_modules/@chakra-ui/react/dist/esm/components/grid/grid-item.js"],"sourcesContent":["\"use strict\";\n\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { forwardRef } from 'react';\nimport { chakra } from '../../styled-system/factory.js';\n\nconst Grid = forwardRef(\n function Grid2(props, ref) {\n const {\n templateAreas,\n column,\n row,\n autoFlow,\n autoRows,\n templateRows,\n autoColumns,\n templateColumns,\n inline,\n ...rest\n } = props;\n return /* @__PURE__ */ jsx(\n chakra.div,\n {\n ...rest,\n ref,\n css: [\n {\n display: inline ? \"inline-grid\" : \"grid\",\n gridTemplateAreas: templateAreas,\n gridAutoColumns: autoColumns,\n gridColumn: column,\n gridRow: row,\n gridAutoFlow: autoFlow,\n gridAutoRows: autoRows,\n gridTemplateRows: templateRows,\n gridTemplateColumns: templateColumns\n },\n props.css\n ]\n }\n );\n }\n);\n\nexport { Grid };\n","\"use strict\";\n\"use client\";\nimport { chakra } from '../../styled-system/factory.js';\n\nconst Center = chakra(\"div\", {\n base: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\"\n },\n variants: {\n inline: {\n true: {\n display: \"inline-flex\"\n }\n }\n }\n});\nCenter.displayName = \"Center\";\n\nexport { Center };\n","\"use strict\";\n\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { forwardRef } from 'react';\nimport { compact } from '../../utils/compact.js';\nimport { mapObject } from '../../utils/walk-object.js';\nimport { chakra } from '../../styled-system/factory.js';\n\nfunction spanFn(span) {\n return mapObject(\n span,\n (value) => value === \"auto\" ? \"auto\" : `span ${value}/span ${value}`\n );\n}\nconst GridItem = forwardRef(\n function GridItem2(props, ref) {\n const {\n area,\n colSpan,\n colStart,\n colEnd,\n rowEnd,\n rowSpan,\n rowStart,\n ...rest\n } = props;\n const styles = compact({\n gridArea: area,\n gridColumn: spanFn(colSpan),\n gridRow: spanFn(rowSpan),\n gridColumnStart: colStart,\n gridColumnEnd: colEnd,\n gridRowStart: rowStart,\n gridRowEnd: rowEnd\n });\n return /* @__PURE__ */ jsx(chakra.div, { ref, css: styles, ...rest });\n }\n);\n\nexport { GridItem };\n"],"names":["Grid","forwardRef","props","ref","templateAreas","column","row","autoFlow","autoRows","templateRows","autoColumns","templateColumns","inline","rest","jsx","chakra","Center","spanFn","span","mapObject","value","GridItem","area","colSpan","colStart","colEnd","rowEnd","rowSpan","rowStart","styles","compact"],"mappings":";;;;AAMK,MAACA,IAAOC;AAAA,EACX,SAAeC,GAAOC,GAAK;AACzB,UAAM;AAAA,MACJ,eAAAC;AAAA,MACA,QAAAC;AAAA,MACA,KAAAC;AAAA,MACA,UAAAC;AAAA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AA,MACvB,iBAAiBH;AAAA,MACjB,eAAeC;AAAA,MACf,cAAcG;AAAA,MACd,YAAYF;AAAA,IAClB,CAAK;AACD,WAAuBZ,gBAAAA,EAAG,IAACC,EAAO,KAAK,EAAE,KAAAZ,GAAK,KAAK0B,GAAQ,GAAGhB,GAAM;AAAA,EACxE;AACA;","x_google_ignoreList":[0,1,2]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const p=require("./jsx-runtime-BjDatQAs.js"),w=require("react"),r=require("./factory-D6tdBUPG.js"),f=require("./walk-object-BrTExCqQ.js"),x=w.forwardRef(function(t,n){const{templateAreas:o,column:i,row:s,autoFlow:a,autoRows:d,templateRows:c,autoColumns:l,templateColumns:u,inline:m,...C}=t;return p.jsxRuntimeExports.jsx(r.chakra.div,{...C,ref:n,css:[{display:m?"inline-grid":"grid",gridTemplateAreas:o,gridAutoColumns:l,gridColumn:i,gridRow:s,gridAutoFlow:a,gridAutoRows:d,gridTemplateRows:c,gridTemplateColumns:u},t.css]})}),R=r.chakra("div",{base:{display:"flex",alignItems:"center",justifyContent:"center"},variants:{inline:{true:{display:"inline-flex"}}}});R.displayName="Center";function g(e){return f.mapObject(e,t=>t==="auto"?"auto":`span ${t}/span ${t}`)}const j=w.forwardRef(function(t,n){const{area:o,colSpan:i,colStart:s,colEnd:a,rowEnd:d,rowSpan:c,rowStart:l,...u}=t,m=r.compact({gridArea:o,gridColumn:g(i),gridRow:g(c),gridColumnStart:s,gridColumnEnd:a,gridRowStart:l,gridRowEnd:d});return p.jsxRuntimeExports.jsx(r.chakra.div,{ref:n,css:m,...u})});exports.Center=R;exports.Grid=x;exports.GridItem=j;
|
|
2
|
-
//# sourceMappingURL=grid-item-CR-sXrjU.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"grid-item-CR-sXrjU.js","sources":["../../node_modules/@chakra-ui/react/dist/esm/components/grid/grid.js","../../node_modules/@chakra-ui/react/dist/esm/components/center/center.js","../../node_modules/@chakra-ui/react/dist/esm/components/grid/grid-item.js"],"sourcesContent":["\"use strict\";\n\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { forwardRef } from 'react';\nimport { chakra } from '../../styled-system/factory.js';\n\nconst Grid = forwardRef(\n function Grid2(props, ref) {\n const {\n templateAreas,\n column,\n row,\n autoFlow,\n autoRows,\n templateRows,\n autoColumns,\n templateColumns,\n inline,\n ...rest\n } = props;\n return /* @__PURE__ */ jsx(\n chakra.div,\n {\n ...rest,\n ref,\n css: [\n {\n display: inline ? \"inline-grid\" : \"grid\",\n gridTemplateAreas: templateAreas,\n gridAutoColumns: autoColumns,\n gridColumn: column,\n gridRow: row,\n gridAutoFlow: autoFlow,\n gridAutoRows: autoRows,\n gridTemplateRows: templateRows,\n gridTemplateColumns: templateColumns\n },\n props.css\n ]\n }\n );\n }\n);\n\nexport { Grid };\n","\"use strict\";\n\"use client\";\nimport { chakra } from '../../styled-system/factory.js';\n\nconst Center = chakra(\"div\", {\n base: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\"\n },\n variants: {\n inline: {\n true: {\n display: \"inline-flex\"\n }\n }\n }\n});\nCenter.displayName = \"Center\";\n\nexport { Center };\n","\"use strict\";\n\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { forwardRef } from 'react';\nimport { compact } from '../../utils/compact.js';\nimport { mapObject } from '../../utils/walk-object.js';\nimport { chakra } from '../../styled-system/factory.js';\n\nfunction spanFn(span) {\n return mapObject(\n span,\n (value) => value === \"auto\" ? \"auto\" : `span ${value}/span ${value}`\n );\n}\nconst GridItem = forwardRef(\n function GridItem2(props, ref) {\n const {\n area,\n colSpan,\n colStart,\n colEnd,\n rowEnd,\n rowSpan,\n rowStart,\n ...rest\n } = props;\n const styles = compact({\n gridArea: area,\n gridColumn: spanFn(colSpan),\n gridRow: spanFn(rowSpan),\n gridColumnStart: colStart,\n gridColumnEnd: colEnd,\n gridRowStart: rowStart,\n gridRowEnd: rowEnd\n });\n return /* @__PURE__ */ jsx(chakra.div, { ref, css: styles, ...rest });\n }\n);\n\nexport { GridItem };\n"],"names":["Grid","forwardRef","props","ref","templateAreas","column","row","autoFlow","autoRows","templateRows","autoColumns","templateColumns","inline","rest","jsx","chakra","Center","spanFn","span","mapObject","value","GridItem","area","colSpan","colStart","colEnd","rowEnd","rowSpan","rowStart","styles","compact"],"mappings":"uJAMMA,EAAOC,EAAU,WACrB,SAAeC,EAAOC,EAAK,CACzB,KAAM,CACJ,cAAAC,EACA,OAAAC,EACA,IAAAC,EACA,SAAAC,EACA,SAAAC,EACA,aAAAC,EACA,YAAAC,EACA,gBAAAC,EACA,OAAAC,EACA,GAAGC,CACT,EAAQX,EACJ,OAAuBY,EAAG,kBAAA,IACxBC,EAAAA,OAAO,IACP,CACE,GAAGF,EACH,IAAAV,EACA,IAAK,CACH,CACE,QAASS,EAAS,cAAgB,OAClC,kBAAmBR,EACnB,gBAAiBM,EACjB,WAAYL,EACZ,QAASC,EACT,aAAcC,EACd,aAAcC,EACd,iBAAkBC,EAClB,oBAAqBE,CACtB,EACDT,EAAM,GAChB,CACA,CACK,CACL,CACA,ECtCMc,EAASD,EAAM,OAAC,MAAO,CAC3B,KAAM,CACJ,QAAS,OACT,WAAY,SACZ,eAAgB,QACjB,EACD,SAAU,CACR,OAAQ,CACN,KAAM,CACJ,QAAS,aACjB,CACA,CACA,CACA,CAAC,EACDC,EAAO,YAAc,SCVrB,SAASC,EAAOC,EAAM,CACpB,OAAOC,EAAS,UACdD,EACCE,GAAUA,IAAU,OAAS,OAAS,QAAQA,CAAK,SAASA,CAAK,EACnE,CACH,CACK,MAACC,EAAWpB,EAAU,WACzB,SAAmBC,EAAOC,EAAK,CAC7B,KAAM,CACJ,KAAAmB,EACA,QAAAC,EACA,SAAAC,EACA,OAAAC,EACA,OAAAC,EACA,QAAAC,EACA,SAAAC,EACA,GAAGf,CACT,EAAQX,EACE2B,EAASC,EAAAA,QAAQ,CACrB,SAAUR,EACV,WAAYL,EAA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