tinacms 0.0.0-bf22bf8-20241004045704 → 0.0.0-bf8b9b7-20251204000148
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/README.md +1 -1
- package/dist/admin/api.d.ts +5 -1
- package/dist/admin/components/{Sidebar.d.ts → AdminNav.d.ts} +0 -3
- package/dist/admin/components/GetCollection.d.ts +2 -2
- package/dist/admin/components/Page.d.ts +3 -9
- package/dist/admin/components/ui/tooltip.d.ts +7 -0
- package/dist/admin/pages/CollectionCreatePage.d.ts +1 -1
- package/dist/admin/pages/CollectionListPage.d.ts +2 -2
- package/dist/admin/pages/DashboardPage.d.ts +0 -3
- package/dist/admin/pages/ScreenPage.d.ts +0 -3
- package/dist/admin/types.d.ts +3 -0
- package/dist/auth/AuthModal.d.ts +1 -4
- package/dist/auth/TinaCloudProvider.d.ts +1 -2
- package/dist/cache/node-cache.d.ts +1 -0
- package/dist/client.js +135 -151
- package/dist/hooks/create-page-plugin.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +121822 -31841
- package/dist/internalClient/index.d.ts +28 -3
- package/dist/node-cache-c9558e1e.js +63 -0
- package/dist/react.d.ts +14 -6
- package/dist/react.js +209 -192
- package/dist/rich-text/index.d.ts +9 -0
- package/dist/rich-text/index.js +235 -192
- package/dist/rich-text/prism.js +16 -18
- package/dist/rich-text/static.d.ts +154 -0
- package/dist/rich-text/static.js +243 -0
- package/dist/tina-cms.d.ts +1 -1
- package/dist/toolkit/components/ProgressBar.d.ts +11 -0
- package/dist/toolkit/components/media/media-item.d.ts +11 -1
- package/dist/toolkit/components/media/media-manager.d.ts +1 -1
- package/dist/toolkit/components/ui/breadcrumb.d.ts +11 -0
- package/dist/toolkit/components/ui/button.d.ts +11 -0
- package/dist/toolkit/components/ui/calendar.d.ts +8 -0
- package/dist/toolkit/components/ui/date-time-picker.d.ts +111 -0
- package/dist/toolkit/components/ui/dropdown-menu.d.ts +25 -0
- package/dist/toolkit/components/ui/input.d.ts +3 -0
- package/dist/toolkit/components/ui/popover.d.ts +7 -0
- package/dist/toolkit/components/ui/select.d.ts +13 -0
- package/dist/toolkit/fields/components/password-field.d.ts +1 -1
- package/dist/toolkit/fields/components/reference/components/button.d.ts +2 -2
- package/dist/toolkit/fields/components/reference/components/command.d.ts +21 -33
- package/dist/toolkit/fields/components/reference/components/popover.d.ts +1 -1
- package/dist/toolkit/fields/components/reference/model/reference-link-props.d.ts +2 -0
- package/dist/toolkit/fields/components/reference/reference-select.d.ts +2 -2
- package/dist/toolkit/fields/components/select.d.ts +2 -2
- package/dist/toolkit/fields/components/text-field.d.ts +1 -1
- package/dist/toolkit/fields/plugins/button-toggle-field-plugin.d.ts +2 -2
- package/dist/toolkit/fields/plugins/checkbox-group-field-plugin.d.ts +2 -2
- package/dist/toolkit/fields/plugins/date-field-plugin.d.ts +0 -2
- package/dist/toolkit/fields/plugins/dnd-kit-wrapper.d.ts +49 -0
- package/dist/toolkit/fields/plugins/group-field-plugin.d.ts +1 -1
- package/dist/toolkit/fields/plugins/group-list-field-plugin.d.ts +3 -1
- package/dist/toolkit/fields/plugins/list-field-meta.d.ts +1 -1
- package/dist/toolkit/fields/plugins/list-field-plugin.d.ts +3 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/index.d.ts +5 -2
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/editor.d.ts +20 -18
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/fixed-toolbar-buttons.d.ts +0 -4
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/blockquote-element.d.ts +14 -10
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/button.d.ts +5 -5
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-block/code-block-element.d.ts +17 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-block/error-message.d.ts +6 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-block-combobox.d.ts +6 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-block-toolbar-button.d.ts +6 -6
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-leaf.d.ts +2 -11
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-line-element.d.ts +14 -10
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-syntax-leaf.d.ts +2 -11
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/command.d.ts +112 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/dialog.d.ts +12 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/dropdown-menu.d.ts +10 -10
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/floating-toolbar.d.ts +2 -2
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/hr-element.d.ts +3 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/hr-toolbar-button.d.ts +18 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/icons.d.ts +4 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/image-toolbar-button.d.ts +6 -6
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/indent-list-toolbar-button.d.ts +6 -7
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/inline-combobox.d.ts +1 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/input.d.ts +3 -3
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/link-element.d.ts +4 -11
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/link-floating-toolbar.d.ts +4 -5
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/link-toolbar-button.d.ts +4 -4
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/list-element.d.ts +28 -11
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/mark-toolbar-button.d.ts +4 -18
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/mermaid-element.d.ts +4 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/mermaid-toolbar-button.d.ts +18 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/paragraph-element.d.ts +15 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/popover.d.ts +7 -2
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/quote-toolbar-button.d.ts +6 -6
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/raw-markdown-toolbar-button.d.ts +6 -6
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/resizable.d.ts +42 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/separator.d.ts +2 -2
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/slash-input-element.d.ts +15 -11
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table/block-selection.d.ts +6 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table/table-cell-element.d.ts +33 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table/table-dropdown-menu.d.ts +4 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table/table-element.d.ts +20 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table/table-row-element.d.ts +15 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/text-area.d.ts +5 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/toolbar.d.ts +7 -7
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/use-floating-toolbar-hook.d.ts +10 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/use-floating-toolbar-state.d.ts +22 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/hooks/use-create-editor.d.ts +6 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/index.d.ts +1 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/autoformat/autoformat-block.d.ts +1 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/autoformat/autoformat-lists.d.ts +1 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/autoformat/autoformat-marks.d.ts +1 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/autoformat/autoformat-utils.d.ts +3 -5
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/common.d.ts +12 -6
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/formatting.d.ts +18 -2
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/index.d.ts +0 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-html-block/index.d.ts +6 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-img-plugin/index.d.ts +2 -2
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-invalid-markdown-plugin/index.d.ts +5 -5
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-mdx-plugins/component.d.ts +7 -4
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-mdx-plugins/index.d.ts +3 -5
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/editor-plugins.d.ts +520 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/components.d.ts +264 -156
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/floating-toolbar-plugin.d.ts +1 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/toolbar/toolbar-overrides.d.ts +11 -3
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/toolbar/toolbar-provider.d.ts +3 -3
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/transforms/is-url.d.ts +1 -2
- package/dist/toolkit/fields/plugins/radio-group-field-plugin.d.ts +2 -2
- package/dist/toolkit/fields/plugins/select-field-plugin.d.ts +2 -2
- package/dist/toolkit/fields/plugins/toggle-field-plugin.d.ts +2 -2
- package/dist/toolkit/fields/plugins/wrap-field-with-meta.d.ts +8 -0
- package/dist/toolkit/form-builder/create-branch-modal.d.ts +13 -0
- package/dist/toolkit/form-builder/editorial-workflow-constants.d.ts +17 -0
- package/dist/toolkit/form-builder/fields-builder.d.ts +1 -1
- package/dist/toolkit/form-builder/form-builder.d.ts +8 -9
- package/dist/toolkit/form-builder/index.d.ts +1 -0
- package/dist/toolkit/forms/field.d.ts +3 -0
- package/dist/toolkit/forms/form.d.ts +22 -3
- package/dist/toolkit/git-client/git-client.d.ts +25 -2
- package/dist/toolkit/git-client/git-file.d.ts +18 -0
- package/dist/toolkit/git-client/git-media-store.d.ts +13 -0
- package/dist/toolkit/git-client/use-git-file.d.ts +4 -0
- package/dist/toolkit/icons/Tina.d.ts +0 -5
- package/dist/toolkit/icons/TinaExtended.d.ts +4 -0
- package/dist/toolkit/icons/index.d.ts +1 -0
- package/dist/toolkit/index.d.ts +1 -1
- package/dist/toolkit/plugin-branch-switcher/branch-button.d.ts +4 -1
- package/dist/toolkit/plugin-branch-switcher/branch-switcher-legacy.d.ts +1 -1
- package/dist/toolkit/plugin-branch-switcher/branch-switcher.d.ts +1 -1
- package/dist/toolkit/plugin-branch-switcher/index.d.ts +0 -1
- package/dist/toolkit/react-cloud-config/cloud-config-plugin.d.ts +3 -3
- package/dist/toolkit/react-modals/modal/modal-actions.d.ts +2 -1
- package/dist/toolkit/react-modals/modal/modal-header.d.ts +1 -1
- package/dist/toolkit/react-sidebar/components/NavMenuTrigger.d.ts +11 -0
- package/dist/toolkit/react-sidebar/components/VersionInfo.d.ts +2 -0
- package/dist/toolkit/react-sidebar/components/badge.d.ts +6 -0
- package/dist/toolkit/react-sidebar/components/callout.d.ts +5 -0
- package/dist/toolkit/react-sidebar/components/form-list.d.ts +1 -1
- package/dist/toolkit/react-sidebar/components/local-warning.d.ts +3 -1
- package/dist/toolkit/react-sidebar/components/nav-components.d.ts +11 -0
- package/dist/toolkit/react-sidebar/components/nav-context.d.ts +15 -0
- package/dist/toolkit/react-sidebar/components/nav.d.ts +6 -3
- package/dist/toolkit/react-sidebar/components/resize-handle.d.ts +0 -5
- package/dist/toolkit/react-sidebar/components/sidebar-body.d.ts +7 -10
- package/dist/toolkit/react-sidebar/components/sidebar-loading-placeholder.d.ts +2 -0
- package/dist/toolkit/react-sidebar/components/sidebar-no-forms-placeholder.d.ts +2 -0
- package/dist/toolkit/react-sidebar/components/sidebar.d.ts +0 -7
- package/dist/toolkit/react-sidebar/components/sync-status.d.ts +5 -8
- package/dist/toolkit/react-sidebar/index.d.ts +4 -1
- package/dist/toolkit/react-sidebar/sidebar.d.ts +2 -2
- package/dist/toolkit/styles/button.d.ts +2 -2
- package/dist/toolkit/styles/dropdown-button.d.ts +75 -0
- package/dist/toolkit/styles/index.d.ts +1 -0
- package/dist/toolkit/tina-cms.d.ts +3 -3
- package/dist/toolkit/tina-state.d.ts +15 -0
- package/dist/unifiedClient/index.d.ts +8 -1
- package/dist/utils/cn.d.ts +2 -0
- package/dist/utils/index.d.ts +1 -0
- package/package.json +86 -99
- package/dist/admin/pages/IndexingPage.d.ts +0 -2
- package/dist/client.mjs +0 -109
- package/dist/index.mjs +0 -33194
- package/dist/node-cache-7fa2452c.mjs +0 -43
- package/dist/react.mjs +0 -234
- package/dist/rich-text/index.mjs +0 -210
- package/dist/rich-text/prism.mjs +0 -16
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-block-element.d.ts +0 -11
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/with-correct-void-behavior.d.ts +0 -8
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-code-block/index.d.ts +0 -3
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-link-plugin/index.d.ts +0 -15
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/soft-break/create-soft-break-plugin.d.ts +0 -7
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/soft-break/index.d.ts +0 -6
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/soft-break/on-key-down-soft-break.d.ts +0 -5
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/soft-break/types.d.ts +0 -11
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/code-block/index.d.ts +0 -9
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/transforms/insert-empty-block.d.ts +0 -2
- package/dist/toolkit/plugin-branch-switcher/branch-banner.d.ts +0 -2
- package/dist/toolkit/react-datetime/DateTime.d.ts +0 -135
- package/dist/toolkit/react-sidebar/components/no-forms-placeholder.d.ts +0 -8
- /package/dist/{__vite-browser-external-d06ac358.mjs → __vite-browser-external-d06ac358.js} +0 -0
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
const StaticTinaMarkdown = ({
|
|
3
|
+
content,
|
|
4
|
+
components = {}
|
|
5
|
+
}) => {
|
|
6
|
+
if (!content) {
|
|
7
|
+
return null;
|
|
8
|
+
}
|
|
9
|
+
const nodes = Array.isArray(content) ? content : content.children;
|
|
10
|
+
if (!nodes) {
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, nodes.map((child, index) => {
|
|
14
|
+
return /* @__PURE__ */ React.createElement(Node, { components, key: index, child });
|
|
15
|
+
}));
|
|
16
|
+
};
|
|
17
|
+
const Leaf = (props) => {
|
|
18
|
+
let el = /* @__PURE__ */ React.createElement(React.Fragment, null, props.text);
|
|
19
|
+
if (props.components.text) {
|
|
20
|
+
const Component = props.components.text;
|
|
21
|
+
el = /* @__PURE__ */ React.createElement(Component, null, props.text);
|
|
22
|
+
}
|
|
23
|
+
if (props.bold) {
|
|
24
|
+
const Component = props.components.bold || "strong";
|
|
25
|
+
el = /* @__PURE__ */ React.createElement(Component, null, el);
|
|
26
|
+
}
|
|
27
|
+
if (props.italic) {
|
|
28
|
+
const Component = props.components.italic || "em";
|
|
29
|
+
el = /* @__PURE__ */ React.createElement(Component, null, el);
|
|
30
|
+
}
|
|
31
|
+
if (props.underline) {
|
|
32
|
+
const Component = props.components.underline || "u";
|
|
33
|
+
el = /* @__PURE__ */ React.createElement(Component, null, el);
|
|
34
|
+
}
|
|
35
|
+
if (props.strikethrough) {
|
|
36
|
+
const Component = props.components.strikethrough || "s";
|
|
37
|
+
el = /* @__PURE__ */ React.createElement(Component, null, el);
|
|
38
|
+
}
|
|
39
|
+
if (props.code) {
|
|
40
|
+
const Component = props.components.code || "code";
|
|
41
|
+
el = /* @__PURE__ */ React.createElement(Component, null, el);
|
|
42
|
+
}
|
|
43
|
+
return el;
|
|
44
|
+
};
|
|
45
|
+
const Node = ({
|
|
46
|
+
components,
|
|
47
|
+
child
|
|
48
|
+
}) => {
|
|
49
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
50
|
+
const { children, ...props } = child;
|
|
51
|
+
switch (child.type) {
|
|
52
|
+
case "h1":
|
|
53
|
+
case "h2":
|
|
54
|
+
case "h3":
|
|
55
|
+
case "h4":
|
|
56
|
+
case "h5":
|
|
57
|
+
case "h6":
|
|
58
|
+
case "p":
|
|
59
|
+
case "ol":
|
|
60
|
+
case "ul":
|
|
61
|
+
case "li":
|
|
62
|
+
if (components[child.type]) {
|
|
63
|
+
const Component2 = components[child.type];
|
|
64
|
+
return /* @__PURE__ */ React.createElement(Component2, { ...props }, /* @__PURE__ */ React.createElement(StaticTinaMarkdown, { components, content: children }));
|
|
65
|
+
}
|
|
66
|
+
return React.createElement(child.type, {
|
|
67
|
+
children: /* @__PURE__ */ React.createElement(StaticTinaMarkdown, { components, content: children })
|
|
68
|
+
});
|
|
69
|
+
case "blockquote":
|
|
70
|
+
const BlockquoteComponent = components.blockquote || components.block_quote;
|
|
71
|
+
if (BlockquoteComponent) {
|
|
72
|
+
return /* @__PURE__ */ React.createElement(BlockquoteComponent, { ...props }, /* @__PURE__ */ React.createElement(StaticTinaMarkdown, { components, content: children }));
|
|
73
|
+
}
|
|
74
|
+
return React.createElement("blockquote", {
|
|
75
|
+
children: /* @__PURE__ */ React.createElement(StaticTinaMarkdown, { components, content: children })
|
|
76
|
+
});
|
|
77
|
+
case "lic":
|
|
78
|
+
if (components.lic) {
|
|
79
|
+
const Component2 = components.lic;
|
|
80
|
+
return /* @__PURE__ */ React.createElement(Component2, { ...props }, /* @__PURE__ */ React.createElement(StaticTinaMarkdown, { components, content: children }));
|
|
81
|
+
}
|
|
82
|
+
return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(
|
|
83
|
+
StaticTinaMarkdown,
|
|
84
|
+
{
|
|
85
|
+
components,
|
|
86
|
+
content: child.children
|
|
87
|
+
}
|
|
88
|
+
));
|
|
89
|
+
case "img":
|
|
90
|
+
if (components[child.type]) {
|
|
91
|
+
const Component2 = components[child.type];
|
|
92
|
+
return /* @__PURE__ */ React.createElement(Component2, { ...props });
|
|
93
|
+
}
|
|
94
|
+
return /* @__PURE__ */ React.createElement("img", { src: child.url, alt: child.alt });
|
|
95
|
+
case "a":
|
|
96
|
+
if (components[child.type]) {
|
|
97
|
+
const Component2 = components[child.type];
|
|
98
|
+
return (
|
|
99
|
+
//@ts-ignore Same issue with TinaMarkdown
|
|
100
|
+
/* @__PURE__ */ React.createElement(Component2, { ...props }, /* @__PURE__ */ React.createElement(StaticTinaMarkdown, { components, content: children }))
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
return /* @__PURE__ */ React.createElement("a", { href: child.url }, /* @__PURE__ */ React.createElement(StaticTinaMarkdown, { components, content: children }));
|
|
104
|
+
case "code_block": {
|
|
105
|
+
let codeString = "";
|
|
106
|
+
if (Array.isArray(child.children)) {
|
|
107
|
+
codeString = child.children.map(
|
|
108
|
+
(line) => Array.isArray(line.children) ? line.children.map((t) => t.text).join("") : ""
|
|
109
|
+
).join("\n");
|
|
110
|
+
} else if (typeof child.value === "string") {
|
|
111
|
+
codeString = child.value;
|
|
112
|
+
}
|
|
113
|
+
if (components[child.type]) {
|
|
114
|
+
const Component2 = components[child.type];
|
|
115
|
+
return /* @__PURE__ */ React.createElement(Component2, { ...props, value: codeString });
|
|
116
|
+
}
|
|
117
|
+
return /* @__PURE__ */ React.createElement("pre", null, /* @__PURE__ */ React.createElement("code", null, codeString));
|
|
118
|
+
}
|
|
119
|
+
case "hr":
|
|
120
|
+
if (components[child.type]) {
|
|
121
|
+
const Component2 = components[child.type];
|
|
122
|
+
return /* @__PURE__ */ React.createElement(Component2, { ...props });
|
|
123
|
+
}
|
|
124
|
+
return /* @__PURE__ */ React.createElement("hr", null);
|
|
125
|
+
case "break":
|
|
126
|
+
if (components[child.type]) {
|
|
127
|
+
const Component2 = components[child.type];
|
|
128
|
+
return /* @__PURE__ */ React.createElement(Component2, { ...props });
|
|
129
|
+
}
|
|
130
|
+
return /* @__PURE__ */ React.createElement("br", null);
|
|
131
|
+
case "text":
|
|
132
|
+
return /* @__PURE__ */ React.createElement(Leaf, { components, ...child });
|
|
133
|
+
case "mdxJsxTextElement":
|
|
134
|
+
case "mdxJsxFlowElement":
|
|
135
|
+
const Component = components[child.name];
|
|
136
|
+
if (Component) {
|
|
137
|
+
const props2 = child.props ? child.props : {};
|
|
138
|
+
return /* @__PURE__ */ React.createElement(Component, { ...props2 });
|
|
139
|
+
} else {
|
|
140
|
+
if (child.name === "table") {
|
|
141
|
+
const firstRowHeader = (_a = child.props) == null ? void 0 : _a.firstRowHeader;
|
|
142
|
+
const rows2 = (firstRowHeader ? (_b = child.props) == null ? void 0 : _b.tableRows.filter((_, i) => i !== 0) : (_c = child.props) == null ? void 0 : _c.tableRows) || [];
|
|
143
|
+
const header = (_e = (_d = child.props) == null ? void 0 : _d.tableRows) == null ? void 0 : _e.at(0);
|
|
144
|
+
const TableComponent2 = (
|
|
145
|
+
//@ts-ignore Same issue with TinaMarkdown
|
|
146
|
+
components["table"] || ((props2) => /* @__PURE__ */ React.createElement("table", { ...props2 }))
|
|
147
|
+
);
|
|
148
|
+
const TrComponent2 = components["tr"] || ((props2) => /* @__PURE__ */ React.createElement("tr", { ...props2 }));
|
|
149
|
+
const ThComponent = components["th"] || ((props2) => /* @__PURE__ */ React.createElement("th", { style: { textAlign: (props2 == null ? void 0 : props2.align) || "auto" }, ...props2 }));
|
|
150
|
+
const TdComponent2 = components["td"] || ((props2) => /* @__PURE__ */ React.createElement("td", { style: { textAlign: (props2 == null ? void 0 : props2.align) || "auto" }, ...props2 }));
|
|
151
|
+
const align2 = ((_f = child.props) == null ? void 0 : _f.align) || [];
|
|
152
|
+
return (
|
|
153
|
+
//@ts-ignore Same issue with TinaMarkdown
|
|
154
|
+
/* @__PURE__ */ React.createElement(TableComponent2, null, firstRowHeader && /* @__PURE__ */ React.createElement("thead", null, /* @__PURE__ */ React.createElement(TrComponent2, null, header.tableCells.map((c, i) => {
|
|
155
|
+
return /* @__PURE__ */ React.createElement(
|
|
156
|
+
StaticTinaMarkdown,
|
|
157
|
+
{
|
|
158
|
+
key: i,
|
|
159
|
+
components: {
|
|
160
|
+
p: (props2) => /* @__PURE__ */ React.createElement(ThComponent, { align: align2[i], ...props2 })
|
|
161
|
+
},
|
|
162
|
+
content: c.value
|
|
163
|
+
}
|
|
164
|
+
);
|
|
165
|
+
}))), /* @__PURE__ */ React.createElement("tbody", null, rows2.map((row, i) => {
|
|
166
|
+
var _a2;
|
|
167
|
+
return /* @__PURE__ */ React.createElement(TrComponent2, { key: i }, (_a2 = row == null ? void 0 : row.tableCells) == null ? void 0 : _a2.map((c, i2) => {
|
|
168
|
+
return /* @__PURE__ */ React.createElement(
|
|
169
|
+
StaticTinaMarkdown,
|
|
170
|
+
{
|
|
171
|
+
key: i2,
|
|
172
|
+
components: {
|
|
173
|
+
p: (props2) => /* @__PURE__ */ React.createElement(TdComponent2, { align: align2[i2], ...props2 })
|
|
174
|
+
},
|
|
175
|
+
content: c.value
|
|
176
|
+
}
|
|
177
|
+
);
|
|
178
|
+
}));
|
|
179
|
+
})))
|
|
180
|
+
);
|
|
181
|
+
}
|
|
182
|
+
const ComponentMissing = components["component_missing"];
|
|
183
|
+
if (ComponentMissing) {
|
|
184
|
+
return /* @__PURE__ */ React.createElement(ComponentMissing, { name: child.name });
|
|
185
|
+
} else {
|
|
186
|
+
return /* @__PURE__ */ React.createElement("span", null, `No component provided for ${child.name}`);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
case "table":
|
|
190
|
+
const rows = child.children || [];
|
|
191
|
+
const TableComponent = components["table"] || ((props2) => /* @__PURE__ */ React.createElement("table", { style: { border: "1px solid #EDECF3" }, ...props2 }));
|
|
192
|
+
const TrComponent = components["tr"] || ((props2) => /* @__PURE__ */ React.createElement("tr", { ...props2 }));
|
|
193
|
+
const TdComponent = components["td"] || ((props2) => /* @__PURE__ */ React.createElement(
|
|
194
|
+
"td",
|
|
195
|
+
{
|
|
196
|
+
style: {
|
|
197
|
+
textAlign: (props2 == null ? void 0 : props2.align) || "auto",
|
|
198
|
+
border: "1px solid #EDECF3",
|
|
199
|
+
padding: "0.25rem"
|
|
200
|
+
},
|
|
201
|
+
...props2
|
|
202
|
+
}
|
|
203
|
+
));
|
|
204
|
+
const align = ((_g = child.props) == null ? void 0 : _g.align) || [];
|
|
205
|
+
return (
|
|
206
|
+
//@ts-ignore Same issue with TinaMarkdown
|
|
207
|
+
/* @__PURE__ */ React.createElement(TableComponent, null, /* @__PURE__ */ React.createElement("tbody", null, rows.map((row, i) => {
|
|
208
|
+
var _a2;
|
|
209
|
+
return /* @__PURE__ */ React.createElement(TrComponent, { key: i }, (_a2 = row.children) == null ? void 0 : _a2.map((cell, i2) => {
|
|
210
|
+
return /* @__PURE__ */ React.createElement(
|
|
211
|
+
StaticTinaMarkdown,
|
|
212
|
+
{
|
|
213
|
+
key: i2,
|
|
214
|
+
components: {
|
|
215
|
+
p: (props2) => /* @__PURE__ */ React.createElement(TdComponent, { align: align[i2], ...props2 })
|
|
216
|
+
},
|
|
217
|
+
content: cell.children
|
|
218
|
+
}
|
|
219
|
+
);
|
|
220
|
+
}));
|
|
221
|
+
})))
|
|
222
|
+
);
|
|
223
|
+
case "maybe_mdx":
|
|
224
|
+
return null;
|
|
225
|
+
case "html":
|
|
226
|
+
case "html_inline":
|
|
227
|
+
if (components[child.type]) {
|
|
228
|
+
const Component2 = components[child.type];
|
|
229
|
+
return /* @__PURE__ */ React.createElement(Component2, { ...props });
|
|
230
|
+
}
|
|
231
|
+
return child.value;
|
|
232
|
+
case "invalid_markdown":
|
|
233
|
+
return /* @__PURE__ */ React.createElement("pre", null, child.value);
|
|
234
|
+
default:
|
|
235
|
+
if (typeof child.text === "string") {
|
|
236
|
+
return /* @__PURE__ */ React.createElement(Leaf, { components, ...child });
|
|
237
|
+
}
|
|
238
|
+
return null;
|
|
239
|
+
}
|
|
240
|
+
};
|
|
241
|
+
export {
|
|
242
|
+
StaticTinaMarkdown
|
|
243
|
+
};
|
package/dist/tina-cms.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ import type { TinaCMSProviderDefaultProps } from './types/cms';
|
|
|
9
9
|
export declare const TinaCMSProvider2: ({ query, documentCreatorCallback, formifyCallback, schema, ...props }: TinaCMSProviderDefaultProps) => React.JSX.Element;
|
|
10
10
|
export type DocumentCreatorCallback = Parameters<typeof useDocumentCreatorPlugin>[0];
|
|
11
11
|
/**
|
|
12
|
-
* @deprecated v0.62.0: Use `staticRequest` and a "try catch" block instead. see https://tina.io/docs/
|
|
12
|
+
* @deprecated v0.62.0: Use `staticRequest` and a "try catch" block instead. see https://tina.io/docs/r/content-api-overview for more details
|
|
13
13
|
*
|
|
14
14
|
* A convenience function which makes a GraphQL request
|
|
15
15
|
* to a local GraphQL server and ensures the response fits
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
interface ProgressBarProps {
|
|
3
|
+
/** Progress percentage (0-100) */
|
|
4
|
+
progress: number;
|
|
5
|
+
/** Additional CSS classes */
|
|
6
|
+
className?: string;
|
|
7
|
+
/** Color of the progress bar */
|
|
8
|
+
color?: 'blue' | 'green';
|
|
9
|
+
}
|
|
10
|
+
export declare const ProgressBar: React.FC<ProgressBarProps>;
|
|
11
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { Media } from '../../core';
|
|
2
|
+
import React from 'react';
|
|
3
3
|
interface MediaItemProps {
|
|
4
4
|
item: Media & {
|
|
5
5
|
new?: boolean;
|
|
@@ -7,6 +7,16 @@ interface MediaItemProps {
|
|
|
7
7
|
onClick(_item: Media | false): void;
|
|
8
8
|
active: boolean;
|
|
9
9
|
}
|
|
10
|
+
export declare const checkerboardStyle: {
|
|
11
|
+
backgroundImage: string;
|
|
12
|
+
backgroundSize: string;
|
|
13
|
+
backgroundPosition: string;
|
|
14
|
+
};
|
|
15
|
+
export declare const smallCheckerboardStyle: {
|
|
16
|
+
backgroundImage: string;
|
|
17
|
+
backgroundSize: string;
|
|
18
|
+
backgroundPosition: string;
|
|
19
|
+
};
|
|
10
20
|
export declare function ListMediaItem({ item, onClick, active }: MediaItemProps): React.JSX.Element;
|
|
11
21
|
export declare function GridMediaItem({ item, active, onClick }: MediaItemProps): React.JSX.Element;
|
|
12
22
|
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare function Breadcrumb({ ...props }: React.ComponentProps<'nav'>): React.JSX.Element;
|
|
3
|
+
declare function BreadcrumbList({ className, ...props }: React.ComponentProps<'ol'>): React.JSX.Element;
|
|
4
|
+
declare function BreadcrumbItem({ className, ...props }: React.ComponentProps<'li'>): React.JSX.Element;
|
|
5
|
+
declare function BreadcrumbLink({ asChild, className, ...props }: React.ComponentProps<'a'> & {
|
|
6
|
+
asChild?: boolean;
|
|
7
|
+
}): React.JSX.Element;
|
|
8
|
+
declare function BreadcrumbPage({ className, ...props }: React.ComponentProps<'span'>): React.JSX.Element;
|
|
9
|
+
declare function BreadcrumbSeparator({ children, className, ...props }: React.ComponentProps<'li'>): React.JSX.Element;
|
|
10
|
+
declare function BreadcrumbEllipsis({ className, ...props }: React.ComponentProps<'span'>): React.JSX.Element;
|
|
11
|
+
export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis, };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
declare const buttonVariants: (props?: {
|
|
4
|
+
variant?: "default" | "link" | "secondary" | "ghost" | "destructive" | "outline";
|
|
5
|
+
size?: "default" | "icon" | "sm" | "lg";
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) => string;
|
|
7
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
11
|
+
export { Button, buttonVariants };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { DayButton, DayPicker } from 'react-day-picker';
|
|
3
|
+
import { Button } from './button';
|
|
4
|
+
declare function Calendar({ className, classNames, showOutsideDays, captionLayout, buttonVariant, formatters, components, ...props }: React.ComponentProps<typeof DayPicker> & {
|
|
5
|
+
buttonVariant?: React.ComponentProps<typeof Button>['variant'];
|
|
6
|
+
}): React.JSX.Element;
|
|
7
|
+
declare function CalendarDayButton({ className, day, modifiers, ...props }: React.ComponentProps<typeof DayButton>): React.JSX.Element;
|
|
8
|
+
export { Calendar, CalendarDayButton };
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import 'moment-timezone';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { DayPickerProps } from 'react-day-picker';
|
|
4
|
+
type TimePickerType = 'minutes' | 'seconds' | 'hours' | '12hours';
|
|
5
|
+
type Period = 'AM' | 'PM';
|
|
6
|
+
declare const formatCurrentDate: ({ dateFormat, timeFormat, displayDate, }: {
|
|
7
|
+
dateFormat?: string;
|
|
8
|
+
timeFormat?: string;
|
|
9
|
+
displayDate: Date;
|
|
10
|
+
}) => string;
|
|
11
|
+
interface TimePickerInputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
12
|
+
picker: TimePickerType;
|
|
13
|
+
date?: Date | null;
|
|
14
|
+
onDateChange?: (date: Date | undefined) => void;
|
|
15
|
+
period?: Period;
|
|
16
|
+
onRightFocus?: () => void;
|
|
17
|
+
onLeftFocus?: () => void;
|
|
18
|
+
}
|
|
19
|
+
declare const TimePickerInput: React.ForwardRefExoticComponent<TimePickerInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
20
|
+
interface TimePickerProps {
|
|
21
|
+
date?: Date | null;
|
|
22
|
+
onChange?: (date: Date | undefined) => void;
|
|
23
|
+
hourCycle?: 12 | 24;
|
|
24
|
+
/**
|
|
25
|
+
* Determines the smallest unit that is displayed in the datetime picker.
|
|
26
|
+
* Default is 'second'.
|
|
27
|
+
* */
|
|
28
|
+
granularity?: Granularity;
|
|
29
|
+
}
|
|
30
|
+
interface TimePickerRef {
|
|
31
|
+
minuteRef: HTMLInputElement | null;
|
|
32
|
+
hourRef: HTMLInputElement | null;
|
|
33
|
+
secondRef: HTMLInputElement | null;
|
|
34
|
+
}
|
|
35
|
+
declare const TimePicker: React.ForwardRefExoticComponent<TimePickerProps & React.RefAttributes<TimePickerRef>>;
|
|
36
|
+
type Granularity = 'day' | 'hour' | 'minute' | 'second';
|
|
37
|
+
type DateTimePickerProps = {
|
|
38
|
+
value?: Date;
|
|
39
|
+
onChange?: (date: Date | undefined) => void;
|
|
40
|
+
disabled?: boolean;
|
|
41
|
+
dateFormat?: string;
|
|
42
|
+
timeFormat?: string;
|
|
43
|
+
/** showing `AM/PM` or not. */
|
|
44
|
+
hourCycle?: 12 | 24;
|
|
45
|
+
placeholder?: string;
|
|
46
|
+
/**
|
|
47
|
+
* The year range will be: `This year + yearRange` and `this year - yearRange`.
|
|
48
|
+
* Default is 50.
|
|
49
|
+
* For example:
|
|
50
|
+
* This year is 2024, The year dropdown will be 1974 to 2024 which is generated by `2024 - 50 = 1974` and `2024 + 50 = 2074`.
|
|
51
|
+
* */
|
|
52
|
+
yearRange?: number;
|
|
53
|
+
/**
|
|
54
|
+
* The format is derived from the `date-fns` documentation.
|
|
55
|
+
* @reference https://date-fns.org/v3.6.0/docs/format
|
|
56
|
+
**/
|
|
57
|
+
displayFormat?: {
|
|
58
|
+
hour24?: string;
|
|
59
|
+
hour12?: string;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* The granularity prop allows you to control the smallest unit that is displayed by DateTimePicker.
|
|
63
|
+
* By default, the value is `second` which shows all time inputs.
|
|
64
|
+
**/
|
|
65
|
+
granularity?: Granularity;
|
|
66
|
+
className?: string;
|
|
67
|
+
/**
|
|
68
|
+
* Show the default month and time when popup the calendar. Default is the current Date().
|
|
69
|
+
**/
|
|
70
|
+
defaultPopupValue?: Date;
|
|
71
|
+
} & Pick<DayPickerProps, 'locale' | 'weekStartsOn' | 'showWeekNumber' | 'showOutsideDays'>;
|
|
72
|
+
type DateTimePickerRef = {
|
|
73
|
+
value?: Date;
|
|
74
|
+
} & Omit<HTMLInputElement, 'value'>;
|
|
75
|
+
declare const DateTimePicker: React.ForwardRefExoticComponent<{
|
|
76
|
+
value?: Date;
|
|
77
|
+
onChange?: (date: Date | undefined) => void;
|
|
78
|
+
disabled?: boolean;
|
|
79
|
+
dateFormat?: string;
|
|
80
|
+
timeFormat?: string;
|
|
81
|
+
/** showing `AM/PM` or not. */
|
|
82
|
+
hourCycle?: 12 | 24;
|
|
83
|
+
placeholder?: string;
|
|
84
|
+
/**
|
|
85
|
+
* The year range will be: `This year + yearRange` and `this year - yearRange`.
|
|
86
|
+
* Default is 50.
|
|
87
|
+
* For example:
|
|
88
|
+
* This year is 2024, The year dropdown will be 1974 to 2024 which is generated by `2024 - 50 = 1974` and `2024 + 50 = 2074`.
|
|
89
|
+
* */
|
|
90
|
+
yearRange?: number;
|
|
91
|
+
/**
|
|
92
|
+
* The format is derived from the `date-fns` documentation.
|
|
93
|
+
* @reference https://date-fns.org/v3.6.0/docs/format
|
|
94
|
+
**/
|
|
95
|
+
displayFormat?: {
|
|
96
|
+
hour24?: string;
|
|
97
|
+
hour12?: string;
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* The granularity prop allows you to control the smallest unit that is displayed by DateTimePicker.
|
|
101
|
+
* By default, the value is `second` which shows all time inputs.
|
|
102
|
+
**/
|
|
103
|
+
granularity?: Granularity;
|
|
104
|
+
className?: string;
|
|
105
|
+
/**
|
|
106
|
+
* Show the default month and time when popup the calendar. Default is the current Date().
|
|
107
|
+
**/
|
|
108
|
+
defaultPopupValue?: Date;
|
|
109
|
+
} & Pick<DayPickerProps, "showOutsideDays" | "showWeekNumber" | "locale" | "weekStartsOn"> & React.RefAttributes<Partial<DateTimePickerRef>>>;
|
|
110
|
+
export { DateTimePicker, TimePickerInput, TimePicker, formatCurrentDate };
|
|
111
|
+
export type { TimePickerType, DateTimePickerProps, DateTimePickerRef };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare function DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>): React.JSX.Element;
|
|
4
|
+
declare function DropdownMenuPortal({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>): React.JSX.Element;
|
|
5
|
+
declare function DropdownMenuTrigger({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>): React.JSX.Element;
|
|
6
|
+
declare function DropdownMenuContent({ className, sideOffset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Content>): React.JSX.Element;
|
|
7
|
+
declare function DropdownMenuGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>): React.JSX.Element;
|
|
8
|
+
declare function DropdownMenuItem({ className, inset, variant, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
|
|
9
|
+
inset?: boolean;
|
|
10
|
+
variant?: 'default' | 'destructive';
|
|
11
|
+
}): React.JSX.Element;
|
|
12
|
+
declare function DropdownMenuCheckboxItem({ className, children, checked, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>): React.JSX.Element;
|
|
13
|
+
declare function DropdownMenuRadioGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>): React.JSX.Element;
|
|
14
|
+
declare function DropdownMenuRadioItem({ className, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>): React.JSX.Element;
|
|
15
|
+
declare function DropdownMenuLabel({ className, inset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {
|
|
16
|
+
inset?: boolean;
|
|
17
|
+
}): React.JSX.Element;
|
|
18
|
+
declare function DropdownMenuSeparator({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>): React.JSX.Element;
|
|
19
|
+
declare function DropdownMenuShortcut({ className, ...props }: React.ComponentProps<'span'>): React.JSX.Element;
|
|
20
|
+
declare function DropdownMenuSub({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>): React.JSX.Element;
|
|
21
|
+
declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
|
|
22
|
+
inset?: boolean;
|
|
23
|
+
}): React.JSX.Element;
|
|
24
|
+
declare function DropdownMenuSubContent({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>): React.JSX.Element;
|
|
25
|
+
export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
3
|
+
declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
|
|
4
|
+
declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
declare const PopoverAnchor: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverAnchorProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
3
|
+
declare const Select: React.FC<SelectPrimitive.SelectProps>;
|
|
4
|
+
declare const SelectGroup: React.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
declare const SelectValue: React.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
|
|
6
|
+
declare const SelectTrigger: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
declare const SelectScrollUpButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
declare const SelectScrollDownButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const SelectContent: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
declare const SelectLabel: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
declare const SelectItem: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
declare const SelectSeparator: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
export { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectLabel, SelectItem, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton, };
|
|
@@ -4,6 +4,6 @@ export interface PasswordFieldProps extends a {
|
|
|
4
4
|
error?: boolean;
|
|
5
5
|
ref?: any;
|
|
6
6
|
}
|
|
7
|
-
export declare const passwordFieldClasses = "shadow-inner focus:shadow-outline focus:border-blue-500 focus:outline-none block text-base placeholder:text-gray-300 px-3 py-2 text-gray-600 w-full bg-white border border-gray-200 transition-all ease-out duration-150 focus:text-gray-900 rounded
|
|
7
|
+
export declare const passwordFieldClasses = "shadow-inner focus:shadow-outline focus:border-blue-500 focus:outline-none block text-base placeholder:text-gray-300 px-3 py-2 text-gray-600 w-full bg-white border border-gray-200 transition-all ease-out duration-150 focus:text-gray-900 rounded";
|
|
8
8
|
export declare const BasePasswordField: React.ForwardRefExoticComponent<Omit<PasswordFieldProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
9
9
|
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
declare const buttonVariants: (props?: {
|
|
4
4
|
variant?: "outline";
|
|
5
5
|
size?: "default" | "icon" | "sm" | "lg";
|
|
6
|
-
} & import("class-variance-authority/
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) => string;
|
|
7
7
|
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
8
8
|
asChild?: boolean;
|
|
9
9
|
}
|
|
@@ -1,67 +1,55 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
declare const Command: React.ForwardRefExoticComponent<Omit<{
|
|
3
3
|
children?: React.ReactNode;
|
|
4
|
-
} &
|
|
5
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
6
|
-
} & {
|
|
4
|
+
} & Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
|
|
7
5
|
asChild?: boolean;
|
|
8
|
-
}, "
|
|
6
|
+
}, "ref"> & {
|
|
7
|
+
defaultValue?: string;
|
|
8
|
+
disablePointerSelection?: boolean;
|
|
9
9
|
label?: string;
|
|
10
|
+
loop?: boolean;
|
|
10
11
|
shouldFilter?: boolean;
|
|
11
|
-
filter?: (value: string, search: string, keywords?: string[]) => number;
|
|
12
|
-
defaultValue?: string;
|
|
13
12
|
value?: string;
|
|
14
|
-
onValueChange?: (value: string) => void;
|
|
15
|
-
loop?: boolean;
|
|
16
|
-
disablePointerSelection?: boolean;
|
|
17
13
|
vimBindings?: boolean;
|
|
14
|
+
filter?: (value: string, search: string, keywords?: string[]) => number;
|
|
15
|
+
onValueChange?: (value: string) => void;
|
|
18
16
|
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
-
declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<
|
|
20
|
-
ref?: React.Ref<HTMLInputElement>;
|
|
21
|
-
} & {
|
|
17
|
+
declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Omit<React.ClassAttributes<HTMLInputElement> & React.InputHTMLAttributes<HTMLInputElement> & {
|
|
22
18
|
asChild?: boolean;
|
|
23
|
-
}, "
|
|
19
|
+
}, "ref">, "value" | "type" | "onChange"> & {
|
|
24
20
|
value?: string;
|
|
25
21
|
onValueChange?: (search: string) => void;
|
|
26
22
|
} & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
27
23
|
declare const CommandList: React.ForwardRefExoticComponent<Omit<{
|
|
28
24
|
children?: React.ReactNode;
|
|
29
|
-
} &
|
|
30
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
31
|
-
} & {
|
|
25
|
+
} & Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
|
|
32
26
|
asChild?: boolean;
|
|
33
|
-
}, "
|
|
27
|
+
}, "ref"> & {
|
|
34
28
|
label?: string;
|
|
35
29
|
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
36
30
|
declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
|
|
37
31
|
children?: React.ReactNode;
|
|
38
|
-
} &
|
|
39
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
40
|
-
} & {
|
|
32
|
+
} & Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
|
|
41
33
|
asChild?: boolean;
|
|
42
|
-
}, "
|
|
34
|
+
}, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
43
35
|
declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
|
|
44
36
|
children?: React.ReactNode;
|
|
45
|
-
} & Omit<
|
|
46
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
47
|
-
} & {
|
|
37
|
+
} & Omit<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
|
|
48
38
|
asChild?: boolean;
|
|
49
|
-
}, "
|
|
39
|
+
}, "ref">, "value" | "heading"> & {
|
|
40
|
+
forceMount?: boolean;
|
|
50
41
|
heading?: React.ReactNode;
|
|
51
42
|
value?: string;
|
|
52
|
-
forceMount?: boolean;
|
|
53
43
|
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
54
44
|
declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
|
|
55
45
|
children?: React.ReactNode;
|
|
56
|
-
} & Omit<
|
|
57
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
58
|
-
} & {
|
|
46
|
+
} & Omit<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
|
|
59
47
|
asChild?: boolean;
|
|
60
|
-
}, "
|
|
48
|
+
}, "ref">, "value" | "disabled" | "onSelect"> & {
|
|
61
49
|
disabled?: boolean;
|
|
62
|
-
onSelect?: (value: string) => void;
|
|
63
|
-
value?: string;
|
|
64
|
-
keywords?: string[];
|
|
65
50
|
forceMount?: boolean;
|
|
51
|
+
keywords?: string[];
|
|
52
|
+
value?: string;
|
|
53
|
+
onSelect?: (value: string) => void;
|
|
66
54
|
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
67
55
|
export { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
|
|
4
4
|
declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
5
|
declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -7,5 +7,5 @@ interface ReferenceSelectProps {
|
|
|
7
7
|
input: any;
|
|
8
8
|
field: ReferenceFieldProps & Field;
|
|
9
9
|
}
|
|
10
|
-
declare const
|
|
11
|
-
export default
|
|
10
|
+
declare const Combobox: React.FC<ReferenceSelectProps>;
|
|
11
|
+
export default Combobox;
|