@coveord/plasma-mantine 48.7.0 → 48.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/.turbo/turbo-build.log +3 -3
  2. package/.turbo/turbo-test.log +7 -7
  3. package/dist/.tsbuildinfo +1 -1
  4. package/dist/cjs/components/collection/Collection.js.map +1 -1
  5. package/dist/cjs/components/header/Header.js.map +1 -1
  6. package/dist/cjs/theme/Theme.js +0 -6
  7. package/dist/cjs/theme/Theme.js.map +1 -1
  8. package/dist/definitions/components/collection/Collection.d.ts +67 -1
  9. package/dist/definitions/components/collection/Collection.d.ts.map +1 -1
  10. package/dist/definitions/components/header/Header.d.ts +23 -2
  11. package/dist/definitions/components/header/Header.d.ts.map +1 -1
  12. package/dist/definitions/theme/Theme.d.ts.map +1 -1
  13. package/dist/esm/components/collection/Collection.js.map +1 -1
  14. package/dist/esm/components/header/Header.js.map +1 -1
  15. package/dist/esm/theme/Theme.js +0 -6
  16. package/dist/esm/theme/Theme.js.map +1 -1
  17. package/package.json +1 -1
  18. package/src/components/collection/Collection.tsx +67 -1
  19. package/src/components/header/Header.tsx +23 -2
  20. package/src/theme/Theme.tsx +0 -6
  21. package/dist/cjs/components/code-editor/CodeEditor.example.js +0 -41
  22. package/dist/cjs/components/code-editor/CodeEditor.example.js.map +0 -1
  23. package/dist/cjs/components/collection/Collection.example.js +0 -64
  24. package/dist/cjs/components/collection/Collection.example.js.map +0 -1
  25. package/dist/definitions/components/code-editor/CodeEditor.example.d.ts +0 -4
  26. package/dist/definitions/components/code-editor/CodeEditor.example.d.ts.map +0 -1
  27. package/dist/definitions/components/collection/Collection.example.d.ts +0 -4
  28. package/dist/definitions/components/collection/Collection.example.d.ts.map +0 -1
  29. package/dist/esm/components/code-editor/CodeEditor.example.js +0 -31
  30. package/dist/esm/components/code-editor/CodeEditor.example.js.map +0 -1
  31. package/dist/esm/components/collection/Collection.example.js +0 -54
  32. package/dist/esm/components/collection/Collection.example.js.map +0 -1
  33. package/src/components/code-editor/CodeEditor.example.tsx +0 -32
  34. package/src/components/collection/Collection.example.tsx +0 -37
@@ -1,64 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "default", {
6
- enumerable: true,
7
- get: function() {
8
- return _default;
9
- }
10
- });
11
- var _objectSpread = require("@swc/helpers/lib/_object_spread.js").default;
12
- var _objectSpreadProps = require("@swc/helpers/lib/_object_spread_props.js").default;
13
- var _jsxRuntime = require("react/jsx-runtime");
14
- var _core = require("@mantine/core");
15
- var _form = require("@mantine/form");
16
- var _collection = require("./Collection");
17
- var _default = function() {
18
- var form = (0, _form.useForm)({
19
- initialValues: {
20
- todoList: [
21
- {
22
- name: "wash the dishes",
23
- done: true
24
- },
25
- {
26
- name: "take out the trash",
27
- done: false
28
- },
29
- {
30
- name: "vacuum the floors",
31
- done: true
32
- }
33
- ]
34
- }
35
- });
36
- return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_collection.Collection, _objectSpreadProps(_objectSpread({
37
- draggable: true,
38
- addLabel: "Add task",
39
- newItem: {
40
- name: "",
41
- done: false
42
- }
43
- }, form.getInputProps("todoList")), {
44
- children: function(task, index) {
45
- return /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
46
- children: [
47
- /*#__PURE__*/ (0, _jsxRuntime.jsx)(_core.TextInput, _objectSpreadProps(_objectSpread({
48
- autoFocus: true,
49
- placeholder: "Do something ..."
50
- }, form.getInputProps("todoList.".concat(index, ".name"))), {
51
- styles: {
52
- flex: 1
53
- }
54
- })),
55
- /*#__PURE__*/ (0, _jsxRuntime.jsx)(_core.Checkbox, _objectSpread({}, form.getInputProps("todoList.".concat(index, ".done"), {
56
- type: "checkbox"
57
- })))
58
- ]
59
- });
60
- }
61
- }));
62
- };
63
-
64
- //# sourceMappingURL=Collection.example.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../src/components/collection/Collection.example.tsx"],"sourcesContent":["import {Checkbox, TextInput} from '@mantine/core';\nimport {useForm} from '@mantine/form';\n\nimport {Collection} from './Collection';\n\nexport default () => {\n const form = useForm({\n initialValues: {\n todoList: [\n {name: 'wash the dishes', done: true},\n {name: 'take out the trash', done: false},\n {name: 'vacuum the floors', done: true},\n ],\n },\n });\n\n return (\n <Collection<{name: string; done: boolean}>\n draggable\n addLabel=\"Add task\"\n newItem={{name: '', done: false}}\n {...form.getInputProps('todoList')}\n >\n {(task, index) => (\n <>\n <TextInput\n autoFocus\n placeholder=\"Do something ...\"\n {...form.getInputProps(`todoList.${index}.name`)}\n styles={{flex: 1}}\n />\n <Checkbox {...form.getInputProps(`todoList.${index}.done`, {type: 'checkbox'})} />\n </>\n )}\n </Collection>\n );\n};\n"],"names":["form","useForm","initialValues","todoList","name","done","Collection","draggable","addLabel","newItem","getInputProps","task","index","TextInput","autoFocus","placeholder","styles","flex","Checkbox","type"],"mappings":"AAAA;;;;+BAKA,SA+BE;;;eA/BF,QA+BE;;;;;;oBApCgC,eAAe;oBAC3B,eAAe;0BAEZ,cAAc;IAEvC,QA+BE,GA/Ba,WAAM;IACjB,IAAMA,IAAI,GAAGC,IAAAA,KAAO,QAAA,EAAC;QACjBC,aAAa,EAAE;YACXC,QAAQ,EAAE;gBACN;oBAACC,IAAI,EAAE,iBAAiB;oBAAEC,IAAI,EAAE,IAAI;iBAAC;gBACrC;oBAACD,IAAI,EAAE,oBAAoB;oBAAEC,IAAI,EAAE,KAAK;iBAAC;gBACzC;oBAACD,IAAI,EAAE,mBAAmB;oBAAEC,IAAI,EAAE,IAAI;iBAAC;aAC1C;SACJ;KACJ,CAAC,AAAC;IAEH,qBACI,qBAACC,WAAU,WAAA;QACPC,SAAS;QACTC,QAAQ,EAAC,UAAU;QACnBC,OAAO,EAAE;YAACL,IAAI,EAAE,EAAE;YAAEC,IAAI,EAAE,KAAK;SAAC;OAC5BL,IAAI,CAACU,aAAa,CAAC,UAAU,CAAC;kBAEjC,SAACC,IAAI,EAAEC,KAAK;iCACT;;kCACI,qBAACC,KAAS,UAAA;wBACNC,SAAS;wBACTC,WAAW,EAAC,kBAAkB;uBAC1Bf,IAAI,CAACU,aAAa,CAAC,AAAC,WAAS,CAAQ,MAAK,CAAXE,KAAK,EAAC,OAAK,CAAC,CAAC;wBAChDI,MAAM,EAAE;4BAACC,IAAI,EAAE,CAAC;yBAAC;uBACnB;kCACF,qBAACC,KAAQ,SAAA,oBAAKlB,IAAI,CAACU,aAAa,CAAC,AAAC,WAAS,CAAQ,MAAK,CAAXE,KAAK,EAAC,OAAK,CAAC,EAAE;wBAACO,IAAI,EAAE,UAAU;qBAAC,CAAC,EAAI;;cACnF;SACN;OACQ,CACf;AACN,CAAC"}
@@ -1,4 +0,0 @@
1
- /// <reference types="react" />
2
- declare const _default: () => JSX.Element;
3
- export default _default;
4
- //# sourceMappingURL=CodeEditor.example.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CodeEditor.example.d.ts","sourceRoot":"","sources":["../../../../src/components/code-editor/CodeEditor.example.tsx"],"names":[],"mappings":";;AAGA,wBA4BE"}
@@ -1,4 +0,0 @@
1
- /// <reference types="react" />
2
- declare const _default: () => JSX.Element;
3
- export default _default;
4
- //# sourceMappingURL=Collection.example.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Collection.example.d.ts","sourceRoot":"","sources":["../../../../src/components/collection/Collection.example.tsx"],"names":[],"mappings":";;AAKA,wBA+BE"}
@@ -1,31 +0,0 @@
1
- import _object_spread from "@swc/helpers/src/_object_spread.mjs";
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import { useForm } from "@mantine/form";
4
- import { CodeEditor } from "./CodeEditor";
5
- export default function() {
6
- var form = useForm({
7
- initialValues: {
8
- config: '{"key":"value"}'
9
- },
10
- validate: {
11
- config: function(jsonValue) {
12
- try {
13
- var config = JSON.parse(jsonValue);
14
- if (!config.key) {
15
- return "The key must have a value";
16
- }
17
- } catch (e) {
18
- return "Invalid JSON";
19
- }
20
- return null;
21
- }
22
- }
23
- });
24
- return /*#__PURE__*/ _jsx(CodeEditor, _object_spread({
25
- language: "json",
26
- label: "Configuration",
27
- description: "This JSON configuration is very important"
28
- }, form.getInputProps("config")));
29
- };
30
-
31
- //# sourceMappingURL=CodeEditor.example.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../src/components/code-editor/CodeEditor.example.tsx"],"sourcesContent":["import {useForm} from '@mantine/form';\nimport {CodeEditor} from './CodeEditor';\n\nexport default () => {\n const form = useForm({\n initialValues: {\n config: '{\"key\":\"value\"}',\n },\n validate: {\n config: (jsonValue) => {\n try {\n const config = JSON.parse(jsonValue);\n if (!config.key) {\n return 'The key must have a value';\n }\n } catch {\n return 'Invalid JSON';\n }\n return null;\n },\n },\n });\n\n return (\n <CodeEditor\n language=\"json\"\n label=\"Configuration\"\n description=\"This JSON configuration is very important\"\n {...form.getInputProps('config')}\n />\n );\n};\n"],"names":["useForm","CodeEditor","form","initialValues","config","validate","jsonValue","JSON","parse","key","language","label","description","getInputProps"],"mappings":"AAAA;;AAAA,SAAQA,OAAO,QAAO,eAAe,CAAC;AACtC,SAAQC,UAAU,QAAO,cAAc,CAAC;AAExC,eAAe,WAAM;IACjB,IAAMC,IAAI,GAAGF,OAAO,CAAC;QACjBG,aAAa,EAAE;YACXC,MAAM,EAAE,iBAAiB;SAC5B;QACDC,QAAQ,EAAE;YACND,MAAM,EAAE,SAACE,SAAS,EAAK;gBACnB,IAAI;oBACA,IAAMF,MAAM,GAAGG,IAAI,CAACC,KAAK,CAACF,SAAS,CAAC,AAAC;oBACrC,IAAI,CAACF,MAAM,CAACK,GAAG,EAAE;wBACb,OAAO,2BAA2B,CAAC;oBACvC,CAAC;gBACL,EAAE,UAAM;oBACJ,OAAO,cAAc,CAAC;gBAC1B,CAAC;gBACD,OAAO,IAAI,CAAC;YAChB,CAAC;SACJ;KACJ,CAAC,AAAC;IAEH,qBACI,KAACR,UAAU;QACPS,QAAQ,EAAC,MAAM;QACfC,KAAK,EAAC,eAAe;QACrBC,WAAW,EAAC,2CAA2C;OACnDV,IAAI,CAACW,aAAa,CAAC,QAAQ,CAAC,EAClC,CACJ;AACN,CAAC,CAAC"}
@@ -1,54 +0,0 @@
1
- import _object_spread from "@swc/helpers/src/_object_spread.mjs";
2
- import _object_spread_props from "@swc/helpers/src/_object_spread_props.mjs";
3
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
4
- import { Checkbox, TextInput } from "@mantine/core";
5
- import { useForm } from "@mantine/form";
6
- import { Collection } from "./Collection";
7
- export default function() {
8
- var form = useForm({
9
- initialValues: {
10
- todoList: [
11
- {
12
- name: "wash the dishes",
13
- done: true
14
- },
15
- {
16
- name: "take out the trash",
17
- done: false
18
- },
19
- {
20
- name: "vacuum the floors",
21
- done: true
22
- }
23
- ]
24
- }
25
- });
26
- return /*#__PURE__*/ _jsx(Collection, _object_spread_props(_object_spread({
27
- draggable: true,
28
- addLabel: "Add task",
29
- newItem: {
30
- name: "",
31
- done: false
32
- }
33
- }, form.getInputProps("todoList")), {
34
- children: function(task, index) {
35
- return /*#__PURE__*/ _jsxs(_Fragment, {
36
- children: [
37
- /*#__PURE__*/ _jsx(TextInput, _object_spread_props(_object_spread({
38
- autoFocus: true,
39
- placeholder: "Do something ..."
40
- }, form.getInputProps("todoList.".concat(index, ".name"))), {
41
- styles: {
42
- flex: 1
43
- }
44
- })),
45
- /*#__PURE__*/ _jsx(Checkbox, _object_spread({}, form.getInputProps("todoList.".concat(index, ".done"), {
46
- type: "checkbox"
47
- })))
48
- ]
49
- });
50
- }
51
- }));
52
- };
53
-
54
- //# sourceMappingURL=Collection.example.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../src/components/collection/Collection.example.tsx"],"sourcesContent":["import {Checkbox, TextInput} from '@mantine/core';\nimport {useForm} from '@mantine/form';\n\nimport {Collection} from './Collection';\n\nexport default () => {\n const form = useForm({\n initialValues: {\n todoList: [\n {name: 'wash the dishes', done: true},\n {name: 'take out the trash', done: false},\n {name: 'vacuum the floors', done: true},\n ],\n },\n });\n\n return (\n <Collection<{name: string; done: boolean}>\n draggable\n addLabel=\"Add task\"\n newItem={{name: '', done: false}}\n {...form.getInputProps('todoList')}\n >\n {(task, index) => (\n <>\n <TextInput\n autoFocus\n placeholder=\"Do something ...\"\n {...form.getInputProps(`todoList.${index}.name`)}\n styles={{flex: 1}}\n />\n <Checkbox {...form.getInputProps(`todoList.${index}.done`, {type: 'checkbox'})} />\n </>\n )}\n </Collection>\n );\n};\n"],"names":["Checkbox","TextInput","useForm","Collection","form","initialValues","todoList","name","done","draggable","addLabel","newItem","getInputProps","task","index","autoFocus","placeholder","styles","flex","type"],"mappings":"AAAA;;;AAAA,SAAQA,QAAQ,EAAEC,SAAS,QAAO,eAAe,CAAC;AAClD,SAAQC,OAAO,QAAO,eAAe,CAAC;AAEtC,SAAQC,UAAU,QAAO,cAAc,CAAC;AAExC,eAAe,WAAM;IACjB,IAAMC,IAAI,GAAGF,OAAO,CAAC;QACjBG,aAAa,EAAE;YACXC,QAAQ,EAAE;gBACN;oBAACC,IAAI,EAAE,iBAAiB;oBAAEC,IAAI,EAAE,IAAI;iBAAC;gBACrC;oBAACD,IAAI,EAAE,oBAAoB;oBAAEC,IAAI,EAAE,KAAK;iBAAC;gBACzC;oBAACD,IAAI,EAAE,mBAAmB;oBAAEC,IAAI,EAAE,IAAI;iBAAC;aAC1C;SACJ;KACJ,CAAC,AAAC;IAEH,qBACI,KAACL,UAAU;QACPM,SAAS;QACTC,QAAQ,EAAC,UAAU;QACnBC,OAAO,EAAE;YAACJ,IAAI,EAAE,EAAE;YAAEC,IAAI,EAAE,KAAK;SAAC;OAC5BJ,IAAI,CAACQ,aAAa,CAAC,UAAU,CAAC;kBAEjC,SAACC,IAAI,EAAEC,KAAK;iCACT;;kCACI,KAACb,SAAS;wBACNc,SAAS;wBACTC,WAAW,EAAC,kBAAkB;uBAC1BZ,IAAI,CAACQ,aAAa,CAAC,AAAC,WAAS,CAAQ,MAAK,CAAXE,KAAK,EAAC,OAAK,CAAC,CAAC;wBAChDG,MAAM,EAAE;4BAACC,IAAI,EAAE,CAAC;yBAAC;uBACnB;kCACF,KAAClB,QAAQ,qBAAKI,IAAI,CAACQ,aAAa,CAAC,AAAC,WAAS,CAAQ,MAAK,CAAXE,KAAK,EAAC,OAAK,CAAC,EAAE;wBAACK,IAAI,EAAE,UAAU;qBAAC,CAAC,EAAI;;cACnF;SACN;OACQ,CACf;AACN,CAAC,CAAC"}
@@ -1,32 +0,0 @@
1
- import {useForm} from '@mantine/form';
2
- import {CodeEditor} from './CodeEditor';
3
-
4
- export default () => {
5
- const form = useForm({
6
- initialValues: {
7
- config: '{"key":"value"}',
8
- },
9
- validate: {
10
- config: (jsonValue) => {
11
- try {
12
- const config = JSON.parse(jsonValue);
13
- if (!config.key) {
14
- return 'The key must have a value';
15
- }
16
- } catch {
17
- return 'Invalid JSON';
18
- }
19
- return null;
20
- },
21
- },
22
- });
23
-
24
- return (
25
- <CodeEditor
26
- language="json"
27
- label="Configuration"
28
- description="This JSON configuration is very important"
29
- {...form.getInputProps('config')}
30
- />
31
- );
32
- };
@@ -1,37 +0,0 @@
1
- import {Checkbox, TextInput} from '@mantine/core';
2
- import {useForm} from '@mantine/form';
3
-
4
- import {Collection} from './Collection';
5
-
6
- export default () => {
7
- const form = useForm({
8
- initialValues: {
9
- todoList: [
10
- {name: 'wash the dishes', done: true},
11
- {name: 'take out the trash', done: false},
12
- {name: 'vacuum the floors', done: true},
13
- ],
14
- },
15
- });
16
-
17
- return (
18
- <Collection<{name: string; done: boolean}>
19
- draggable
20
- addLabel="Add task"
21
- newItem={{name: '', done: false}}
22
- {...form.getInputProps('todoList')}
23
- >
24
- {(task, index) => (
25
- <>
26
- <TextInput
27
- autoFocus
28
- placeholder="Do something ..."
29
- {...form.getInputProps(`todoList.${index}.name`)}
30
- styles={{flex: 1}}
31
- />
32
- <Checkbox {...form.getInputProps(`todoList.${index}.done`, {type: 'checkbox'})} />
33
- </>
34
- )}
35
- </Collection>
36
- );
37
- };