@synnaxlabs/pluto 0.21.2 → 0.21.4
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/{Keyboard-C8cyKsao.js → Keyboard-D_LUXnG3.js} +2 -2
- package/dist/{Keyboard-C8cyKsao.js.map → Keyboard-D_LUXnG3.js.map} +1 -1
- package/dist/{Keyboard-CQoUT-k_.cjs → Keyboard-_Wf2jKAo.cjs} +2 -2
- package/dist/{Keyboard-CQoUT-k_.cjs.map → Keyboard-_Wf2jKAo.cjs.map} +1 -1
- package/dist/{Link-3r9yGooG.js → Link-BZVCNXMe.js} +2 -2
- package/dist/{Link-3r9yGooG.js.map → Link-BZVCNXMe.js.map} +1 -1
- package/dist/{Link-pE5mGv-R.cjs → Link-Bur1Sx4G.cjs} +2 -2
- package/dist/{Link-pE5mGv-R.cjs.map → Link-Bur1Sx4G.cjs.map} +1 -1
- package/dist/{List-DufMhjqX.cjs → List-DMxpm9SJ.cjs} +2 -2
- package/dist/{List-DufMhjqX.cjs.map → List-DMxpm9SJ.cjs.map} +1 -1
- package/dist/{List-A5VsgE6N.js → List-T419F-at.js} +2 -2
- package/dist/{List-A5VsgE6N.js.map → List-T419F-at.js.map} +1 -1
- package/dist/{Toggle-D1EoehhH.cjs → Toggle-CUvIChUA.cjs} +5 -2
- package/dist/Toggle-CUvIChUA.cjs.map +1 -0
- package/dist/{Toggle-Blzh0A0b.js → Toggle-Cwf_871b.js} +5 -2
- package/dist/Toggle-Cwf_871b.js.map +1 -0
- package/dist/button.cjs +1 -1
- package/dist/button.js +1 -1
- package/dist/color.cjs +1 -1
- package/dist/color.js +1 -1
- package/dist/dropdown.cjs +1 -1
- package/dist/dropdown.js +1 -1
- package/dist/{external-BL3iWJdz.cjs → external-0PKoDC49.cjs} +2 -2
- package/dist/{external-BL3iWJdz.cjs.map → external-0PKoDC49.cjs.map} +1 -1
- package/dist/{external-D5cOWqK9.js → external-BZja6sct.js} +3 -3
- package/dist/{external-D5cOWqK9.js.map → external-BZja6sct.js.map} +1 -1
- package/dist/{external-BMK0UUaW.js → external-BaTq0TIF.js} +2 -2
- package/dist/external-BaTq0TIF.js.map +1 -0
- package/dist/{external-1LeSvPMo.js → external-BbY0o_d-.js} +4 -4
- package/dist/{external-1LeSvPMo.js.map → external-BbY0o_d-.js.map} +1 -1
- package/dist/{external-ClBFWQBO.js → external-BkcEPxt6.js} +2 -2
- package/dist/{external-ClBFWQBO.js.map → external-BkcEPxt6.js.map} +1 -1
- package/dist/{external-DJYiyF-g.js → external-BsEirr1J.js} +2 -2
- package/dist/{external-DJYiyF-g.js.map → external-BsEirr1J.js.map} +1 -1
- package/dist/{external-zennQBXe.js → external-C28OmNbm.js} +4 -4
- package/dist/{external-zennQBXe.js.map → external-C28OmNbm.js.map} +1 -1
- package/dist/{external-CygFOviM.cjs → external-C8o-dk-q.cjs} +2 -2
- package/dist/{external-CygFOviM.cjs.map → external-C8o-dk-q.cjs.map} +1 -1
- package/dist/{external-ueyo2Jw7.cjs → external-CIJhv8Z5.cjs} +2 -2
- package/dist/external-CIJhv8Z5.cjs.map +1 -0
- package/dist/{external-D9_xWvtb.js → external-CV3EI18V.js} +3 -3
- package/dist/{external-D9_xWvtb.js.map → external-CV3EI18V.js.map} +1 -1
- package/dist/{external-QoTq138N.cjs → external-CXq4moKA.cjs} +3 -3
- package/dist/{external-QoTq138N.cjs.map → external-CXq4moKA.cjs.map} +1 -1
- package/dist/{external-BlDgPWoN.js → external-CaIFl1Z9.js} +3 -3
- package/dist/{external-BlDgPWoN.js.map → external-CaIFl1Z9.js.map} +1 -1
- package/dist/{external-XnNSUnBv.cjs → external-CliDurA-.cjs} +3 -3
- package/dist/external-CliDurA-.cjs.map +1 -0
- package/dist/{external-Bh2-N-ic.cjs → external-CnYZqepA.cjs} +4 -4
- package/dist/{external-Bh2-N-ic.cjs.map → external-CnYZqepA.cjs.map} +1 -1
- package/dist/{external-BC7QdjAs.cjs → external-CtX7LOQJ.cjs} +3 -3
- package/dist/{external-BC7QdjAs.cjs.map → external-CtX7LOQJ.cjs.map} +1 -1
- package/dist/{external-S9aNR1qN.cjs → external-CtwpWOgf.cjs} +4 -4
- package/dist/{external-S9aNR1qN.cjs.map → external-CtwpWOgf.cjs.map} +1 -1
- package/dist/{external-C0ssJO_w.js → external-CxczeLHs.js} +2 -2
- package/dist/{external-C0ssJO_w.js.map → external-CxczeLHs.js.map} +1 -1
- package/dist/{external-B8ILMNP2.cjs → external-DmQm9Kms.cjs} +2 -2
- package/dist/{external-B8ILMNP2.cjs.map → external-DmQm9Kms.cjs.map} +1 -1
- package/dist/{external-B8MvInOj.cjs → external-DqKZO_FH.cjs} +2 -2
- package/dist/{external-B8MvInOj.cjs.map → external-DqKZO_FH.cjs.map} +1 -1
- package/dist/{external-BVW64h82.cjs → external-DqPvOVf5.cjs} +3 -3
- package/dist/{external-BVW64h82.cjs.map → external-DqPvOVf5.cjs.map} +1 -1
- package/dist/{external-Cco96ysu.js → external-qoMZSyXU.js} +3 -3
- package/dist/external-qoMZSyXU.js.map +1 -0
- package/dist/{external-Dsqoldyc.js → external-yhENQ6vv.js} +2 -2
- package/dist/{external-Dsqoldyc.js.map → external-yhENQ6vv.js.map} +1 -1
- package/dist/header.cjs +1 -1
- package/dist/header.js +1 -1
- package/dist/index.cjs +30 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +38 -22
- package/dist/index.js.map +1 -1
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/menu.cjs +1 -1
- package/dist/menu.js +1 -1
- package/dist/src/form/Form.d.ts +1 -1
- package/dist/src/form/Form.d.ts.map +1 -1
- package/dist/src/note/Note.d.ts +3 -3
- package/dist/src/note/Note.d.ts.map +1 -1
- package/dist/src/text/Text.d.ts +2 -2
- package/dist/src/text/Text.d.ts.map +1 -1
- package/dist/style.css +7 -3
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/text.cjs +2 -2
- package/dist/text.js +2 -2
- package/dist/theming.cjs +2 -2
- package/dist/theming.js +2 -2
- package/dist/tree.cjs +1 -1
- package/dist/tree.js +1 -1
- package/dist/triggers.cjs +1 -1
- package/dist/triggers.js +1 -1
- package/package.json +5 -5
- package/dist/Toggle-Blzh0A0b.js.map +0 -1
- package/dist/Toggle-D1EoehhH.cjs.map +0 -1
- package/dist/external-BMK0UUaW.js.map +0 -1
- package/dist/external-Cco96ysu.js.map +0 -1
- package/dist/external-XnNSUnBv.cjs.map +0 -1
- package/dist/external-ueyo2Jw7.cjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as jsxRuntimeExports } from "./jsx-runtime-mMz73N64.js";
|
|
2
2
|
import { C as CSS } from "./css-DoalWJF6.js";
|
|
3
|
-
import { e as Text } from "./Toggle-
|
|
3
|
+
import { e as Text } from "./Toggle-Cwf_871b.js";
|
|
4
4
|
const Keyboard = ({
|
|
5
5
|
className,
|
|
6
6
|
...props
|
|
@@ -11,4 +11,4 @@ const Keyboard = ({
|
|
|
11
11
|
export {
|
|
12
12
|
Keyboard as K
|
|
13
13
|
};
|
|
14
|
-
//# sourceMappingURL=Keyboard-
|
|
14
|
+
//# sourceMappingURL=Keyboard-D_LUXnG3.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Keyboard-
|
|
1
|
+
{"version":3,"file":"Keyboard-D_LUXnG3.js","sources":["../src/text/Keyboard.tsx"],"sourcesContent":["// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { type ReactElement } from \"react\";\n\nimport { CSS } from \"@/css\";\nimport { type text } from \"@/text/core\";\nimport { type TextProps, Text } from \"@/text/Text\";\n\nimport \"@/text/Keyboard.css\";\n\nexport type KeyboardProps<L extends text.Level = \"h1\"> = TextProps<L>;\n\nexport const Keyboard = <L extends text.Level = \"p\">({\n className,\n ...props\n}: KeyboardProps<L>): ReactElement => (\n // @ts-expect-error\n <Text<L> className={CSS(className, CSS.BM(\"text\", \"keyboard\"))} {...props} />\n);\n"],"names":["jsx"],"mappings":";;;AAmBO,MAAM,WAAW,CAA6B;AAAA,EACnD;AAAA,EACA,GAAG;AACL;AAAA;AAAA,EAEGA,kCAAAA,IAAA,MAAA,EAAQ,WAAW,IAAI,WAAW,IAAI,GAAG,QAAQ,UAAU,CAAC,GAAI,GAAG,MAAO,CAAA;AAAA;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const jsxRuntime = require("./jsx-runtime-B3vWrP5x.cjs");
|
|
3
3
|
const css = require("./css-Pf9qxhQ4.cjs");
|
|
4
|
-
const Toggle = require("./Toggle-
|
|
4
|
+
const Toggle = require("./Toggle-CUvIChUA.cjs");
|
|
5
5
|
const Keyboard = ({
|
|
6
6
|
className,
|
|
7
7
|
...props
|
|
@@ -10,4 +10,4 @@ const Keyboard = ({
|
|
|
10
10
|
/* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(Toggle.Text, { className: css.CSS(className, css.CSS.BM("text", "keyboard")), ...props })
|
|
11
11
|
);
|
|
12
12
|
exports.Keyboard = Keyboard;
|
|
13
|
-
//# sourceMappingURL=Keyboard-
|
|
13
|
+
//# sourceMappingURL=Keyboard-_Wf2jKAo.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Keyboard-
|
|
1
|
+
{"version":3,"file":"Keyboard-_Wf2jKAo.cjs","sources":["../src/text/Keyboard.tsx"],"sourcesContent":["// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { type ReactElement } from \"react\";\n\nimport { CSS } from \"@/css\";\nimport { type text } from \"@/text/core\";\nimport { type TextProps, Text } from \"@/text/Text\";\n\nimport \"@/text/Keyboard.css\";\n\nexport type KeyboardProps<L extends text.Level = \"h1\"> = TextProps<L>;\n\nexport const Keyboard = <L extends text.Level = \"p\">({\n className,\n ...props\n}: KeyboardProps<L>): ReactElement => (\n // @ts-expect-error\n <Text<L> className={CSS(className, CSS.BM(\"text\", \"keyboard\"))} {...props} />\n);\n"],"names":["jsx","Text","CSS"],"mappings":";;;;AAmBO,MAAM,WAAW,CAA6B;AAAA,EACnD;AAAA,EACA,GAAG;AACL;AAAA;AAAA,EAEGA,2BAAAA,kBAAAA,IAAAC,OAAAA,MAAA,EAAQ,WAAWC,IAAAA,IAAI,WAAWA,IAAAA,IAAI,GAAG,QAAQ,UAAU,CAAC,GAAI,GAAG,MAAO,CAAA;AAAA;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { j as jsxRuntimeExports } from "./jsx-runtime-mMz73N64.js";
|
|
2
|
-
import { B as Button } from "./Toggle-
|
|
2
|
+
import { B as Button } from "./Toggle-Cwf_871b.js";
|
|
3
3
|
const Link = ({
|
|
4
4
|
href,
|
|
5
5
|
target,
|
|
@@ -10,4 +10,4 @@ const Link = ({
|
|
|
10
10
|
export {
|
|
11
11
|
Link as L
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=Link-
|
|
13
|
+
//# sourceMappingURL=Link-BZVCNXMe.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link-
|
|
1
|
+
{"version":3,"file":"Link-BZVCNXMe.js","sources":["../src/button/Link.tsx"],"sourcesContent":["// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { type ReactElement } from \"react\";\n\nimport { Button, type ButtonProps } from \"@/button/Button\";\nimport { type Text } from \"@/text\";\n\n/** Props for the {@link Link} component. */\nexport interface LinkProps<L extends Text.Level = \"h1\">\n extends ButtonProps,\n Pick<Text.LinkProps<L>, \"href\" | \"target\"> {}\n/**\n * Use.Link renders a button that looks like a link and redirects to the given href\n * when clicked.\n *\n * @param props - Props for the component. Identical to the props for the Use component,\n * excluding 'variant', and adding the following:\n * @param props.href - The URL to redirect to when the button is clicked.\n * @param props.target - The target of the link. Defaults to \"_self\".\n */\n\nexport const Link = <L extends Text.Level = \"h1\">({\n href,\n target,\n ...props\n}: LinkProps<L>): ReactElement => {\n // @ts-expect-error\n return <Button<\"a\"> el=\"a\" href={href} {...props} />;\n};\n"],"names":[],"mappings":";;AA4BO,MAAM,OAAO,CAA8B;AAAA,EAChD;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAkC;AAEhC,+CAAQ,QAAY,EAAA,IAAG,KAAI,MAAa,GAAG,MAAO,CAAA;AACpD;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const jsxRuntime = require("./jsx-runtime-B3vWrP5x.cjs");
|
|
3
|
-
const Toggle = require("./Toggle-
|
|
3
|
+
const Toggle = require("./Toggle-CUvIChUA.cjs");
|
|
4
4
|
const Link = ({
|
|
5
5
|
href,
|
|
6
6
|
target,
|
|
@@ -9,4 +9,4 @@ const Link = ({
|
|
|
9
9
|
return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(Toggle.Button, { el: "a", href, ...props });
|
|
10
10
|
};
|
|
11
11
|
exports.Link = Link;
|
|
12
|
-
//# sourceMappingURL=Link-
|
|
12
|
+
//# sourceMappingURL=Link-Bur1Sx4G.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link-
|
|
1
|
+
{"version":3,"file":"Link-Bur1Sx4G.cjs","sources":["../src/button/Link.tsx"],"sourcesContent":["// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { type ReactElement } from \"react\";\n\nimport { Button, type ButtonProps } from \"@/button/Button\";\nimport { type Text } from \"@/text\";\n\n/** Props for the {@link Link} component. */\nexport interface LinkProps<L extends Text.Level = \"h1\">\n extends ButtonProps,\n Pick<Text.LinkProps<L>, \"href\" | \"target\"> {}\n/**\n * Use.Link renders a button that looks like a link and redirects to the given href\n * when clicked.\n *\n * @param props - Props for the component. Identical to the props for the Use component,\n * excluding 'variant', and adding the following:\n * @param props.href - The URL to redirect to when the button is clicked.\n * @param props.target - The target of the link. Defaults to \"_self\".\n */\n\nexport const Link = <L extends Text.Level = \"h1\">({\n href,\n target,\n ...props\n}: LinkProps<L>): ReactElement => {\n // @ts-expect-error\n return <Button<\"a\"> el=\"a\" href={href} {...props} />;\n};\n"],"names":["Button"],"mappings":";;;AA4BO,MAAM,OAAO,CAA8B;AAAA,EAChD;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAkC;AAEhC,0DAAQA,OAAY,QAAA,EAAA,IAAG,KAAI,MAAa,GAAG,MAAO,CAAA;AACpD;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const jsxRuntime = require("./jsx-runtime-B3vWrP5x.cjs");
|
|
3
3
|
const aggregator = require("./aggregator-Ca8xiVD2.cjs");
|
|
4
|
-
const Toggle = require("./Toggle-
|
|
4
|
+
const Toggle = require("./Toggle-CUvIChUA.cjs");
|
|
5
5
|
const List = ({
|
|
6
6
|
children,
|
|
7
7
|
data,
|
|
@@ -23,4 +23,4 @@ const List = ({
|
|
|
23
23
|
return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(Toggle.InfiniteProvider, { children: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(Toggle.DataProvider, { data: omittedData, emptyContent, children }) });
|
|
24
24
|
};
|
|
25
25
|
exports.List = List;
|
|
26
|
-
//# sourceMappingURL=List-
|
|
26
|
+
//# sourceMappingURL=List-DMxpm9SJ.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"List-
|
|
1
|
+
{"version":3,"file":"List-DMxpm9SJ.cjs","sources":["../src/list/List.tsx"],"sourcesContent":["// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { useMemo, type PropsWithChildren, type ReactElement } from \"react\";\n\nimport { type Keyed, type Key, compare } from \"@synnaxlabs/x\";\n\nimport { DataProvider } from \"@/list/Data\";\nimport { InfiniteProvider } from \"@/list/Infinite\";\nimport { useMemoCompare } from \"@/memo\";\n\nexport interface ListProps<K extends Key = Key, E extends Keyed<K> = Keyed<K>>\n extends PropsWithChildren<unknown> {\n data?: E[];\n emptyContent?: ReactElement;\n omit?: K[];\n}\n\n/**\n * The main component for building a List. By itself, it does not render any HTML, and\n * should be used in conjunction with its sub-components (List.'X') to build a list\n * component to fit your needs.\n *\n * @param props - The props for the List component.\n * @param props.data - The data to be displayed in the list. The values of the object in\n * each entry of the array must satisfy the {@link RenderableValue} interface i.e. they\n * must be a primitive type or implement a 'toString' method.\n * @param props.children - Sub-components of the List component to add additional functionality.\n *\n */\nexport const List = <K extends Key = Key, E extends Keyed<K> = Keyed<K>>({\n children,\n data,\n emptyContent,\n omit,\n}: ListProps<K, E>): ReactElement => {\n const omittedData = useMemoCompare(\n () => (omit != null ? data?.filter((e) => !omit.includes(e.key)) : data),\n ([prevOmit, prevData], [omit, data]) => {\n let omitsEqual = false;\n if (prevOmit != null && omit != null)\n omitsEqual = compare.unorderedPrimitiveArrays(prevOmit, omit) === compare.EQUAL;\n else omitsEqual = prevOmit == omit;\n return prevData === data && omitsEqual;\n },\n [omit, data] as [K[] | undefined, E[] | undefined],\n );\n return (\n <InfiniteProvider>\n <DataProvider<K, E> data={omittedData} emptyContent={emptyContent}>\n {children}\n </DataProvider>\n </InfiniteProvider>\n );\n};\n"],"names":["useMemoCompare","omit","data","compare","jsx","InfiniteProvider","DataProvider"],"mappings":";;;;AAoCO,MAAM,OAAO,CAAqD;AAAA,EACvE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAqC;AACnC,QAAM,cAAcA,OAAA;AAAA,IAClB,MAAO,QAAQ,OAAO,6BAAM,OAAO,CAAC,MAAM,CAAC,KAAK,SAAS,EAAE,GAAG,KAAK;AAAA,IACnE,CAAC,CAAC,UAAU,QAAQ,GAAG,CAACC,OAAMC,KAAI,MAAM;AACtC,UAAI,aAAa;AACb,UAAA,YAAY,QAAQD,SAAQ;AAC9B,qBAAaE,WAAQ,EAAA,yBAAyB,UAAUF,KAAI,MAAME,WAAQ,EAAA;AAAA;AACvE,qBAAa,YAAYF;AAC9B,aAAO,aAAaC,SAAQ;AAAA,IAC9B;AAAA,IACA,CAAC,MAAM,IAAI;AAAA,EAAA;AAGX,SAAAE,2BAAA,kBAAA,IAACC,2BACC,UAACD,2BAAA,kBAAA,IAAAE,OAAA,cAAA,EAAmB,MAAM,aAAa,cACpC,SACH,CAAA,EACF,CAAA;AAEJ;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as jsxRuntimeExports } from "./jsx-runtime-mMz73N64.js";
|
|
2
2
|
import { c as S } from "./aggregator-Dl2jHye5.js";
|
|
3
|
-
import { f as useMemoCompare, g as InfiniteProvider, h as DataProvider } from "./Toggle-
|
|
3
|
+
import { f as useMemoCompare, g as InfiniteProvider, h as DataProvider } from "./Toggle-Cwf_871b.js";
|
|
4
4
|
const List = ({
|
|
5
5
|
children,
|
|
6
6
|
data,
|
|
@@ -24,4 +24,4 @@ const List = ({
|
|
|
24
24
|
export {
|
|
25
25
|
List as L
|
|
26
26
|
};
|
|
27
|
-
//# sourceMappingURL=List-
|
|
27
|
+
//# sourceMappingURL=List-T419F-at.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"List-
|
|
1
|
+
{"version":3,"file":"List-T419F-at.js","sources":["../src/list/List.tsx"],"sourcesContent":["// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { useMemo, type PropsWithChildren, type ReactElement } from \"react\";\n\nimport { type Keyed, type Key, compare } from \"@synnaxlabs/x\";\n\nimport { DataProvider } from \"@/list/Data\";\nimport { InfiniteProvider } from \"@/list/Infinite\";\nimport { useMemoCompare } from \"@/memo\";\n\nexport interface ListProps<K extends Key = Key, E extends Keyed<K> = Keyed<K>>\n extends PropsWithChildren<unknown> {\n data?: E[];\n emptyContent?: ReactElement;\n omit?: K[];\n}\n\n/**\n * The main component for building a List. By itself, it does not render any HTML, and\n * should be used in conjunction with its sub-components (List.'X') to build a list\n * component to fit your needs.\n *\n * @param props - The props for the List component.\n * @param props.data - The data to be displayed in the list. The values of the object in\n * each entry of the array must satisfy the {@link RenderableValue} interface i.e. they\n * must be a primitive type or implement a 'toString' method.\n * @param props.children - Sub-components of the List component to add additional functionality.\n *\n */\nexport const List = <K extends Key = Key, E extends Keyed<K> = Keyed<K>>({\n children,\n data,\n emptyContent,\n omit,\n}: ListProps<K, E>): ReactElement => {\n const omittedData = useMemoCompare(\n () => (omit != null ? data?.filter((e) => !omit.includes(e.key)) : data),\n ([prevOmit, prevData], [omit, data]) => {\n let omitsEqual = false;\n if (prevOmit != null && omit != null)\n omitsEqual = compare.unorderedPrimitiveArrays(prevOmit, omit) === compare.EQUAL;\n else omitsEqual = prevOmit == omit;\n return prevData === data && omitsEqual;\n },\n [omit, data] as [K[] | undefined, E[] | undefined],\n );\n return (\n <InfiniteProvider>\n <DataProvider<K, E> data={omittedData} emptyContent={emptyContent}>\n {children}\n </DataProvider>\n </InfiniteProvider>\n );\n};\n"],"names":["omit","data","compare","jsx"],"mappings":";;;AAoCO,MAAM,OAAO,CAAqD;AAAA,EACvE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAqC;AACnC,QAAM,cAAc;AAAA,IAClB,MAAO,QAAQ,OAAO,6BAAM,OAAO,CAAC,MAAM,CAAC,KAAK,SAAS,EAAE,GAAG,KAAK;AAAA,IACnE,CAAC,CAAC,UAAU,QAAQ,GAAG,CAACA,OAAMC,KAAI,MAAM;AACtC,UAAI,aAAa;AACb,UAAA,YAAY,QAAQD,SAAQ;AAC9B,qBAAaE,EAAQ,yBAAyB,UAAUF,KAAI,MAAME,EAAQ;AAAA;AACvE,qBAAa,YAAYF;AAC9B,aAAO,aAAaC,SAAQ;AAAA,IAC9B;AAAA,IACA,CAAC,MAAM,IAAI;AAAA,EAAA;AAGX,SAAAE,kCAAA,IAAC,oBACC,UAACA,kCAAA,IAAA,cAAA,EAAmB,MAAM,aAAa,cACpC,SACH,CAAA,EACF,CAAA;AAEJ;"}
|
|
@@ -11667,8 +11667,11 @@ const CoreText$1 = ({
|
|
|
11667
11667
|
);
|
|
11668
11668
|
const Text$2 = React.forwardRef(CoreText$1);
|
|
11669
11669
|
const evalColor = (color2, shade) => {
|
|
11670
|
-
if (color2 != null)
|
|
11670
|
+
if (color2 != null) {
|
|
11671
|
+
if (typeof color2 === "boolean")
|
|
11672
|
+
return void 0;
|
|
11671
11673
|
return css.cssString(color2);
|
|
11674
|
+
}
|
|
11672
11675
|
if (shade != null)
|
|
11673
11676
|
return `var(--pluto-gray-l${shade})`;
|
|
11674
11677
|
return void 0;
|
|
@@ -59401,4 +59404,4 @@ exports.useUniqueKey = useUniqueKey;
|
|
|
59401
59404
|
exports.variantColors = variantColors;
|
|
59402
59405
|
exports.wrap = wrap;
|
|
59403
59406
|
exports.wrap$1 = wrap$1;
|
|
59404
|
-
//# sourceMappingURL=Toggle-
|
|
59407
|
+
//# sourceMappingURL=Toggle-CUvIChUA.cjs.map
|