Track HiveGrid Cloud planning reference
This commit is contained in:
1 parent
b3d5ea6764
commit
e341c5938a
5784 files changed
+1104929
-3
No files matched your search
@@ -0,0 +1,12 @@
|
||||
import { t as i18nT } from "i18next";
|
||||
import InputText from "../InputText";
|
||||
|
||||
export default function PreviewInputText() {
|
||||
return (
|
||||
<div id="input-text">
|
||||
<div className="border-border bg-background border border-dashed p-6">
|
||||
<InputText name="name" title={i18nT("components.input.preview.title")} defaultValue={undefined} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
import { t as i18nT } from "i18next";
|
||||
import InputCheckbox from "~/components/ui/input/InputCheckbox";
|
||||
|
||||
export default function PreviewInputCheckbox() {
|
||||
return (
|
||||
<div id="input-checkbox">
|
||||
<div className="border-border bg-background border border-dashed p-6">
|
||||
<InputCheckbox name="name" title={i18nT("components.input.preview.title")} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
import { t as i18nT } from "i18next";
|
||||
import { useState } from "react";
|
||||
import InputCheckboxCards from "../../InputCheckboxCards";
|
||||
|
||||
export default function PreviewInputCheckboxCards() {
|
||||
const [selected, setSelected] = useState<(string | number)[]>([]);
|
||||
return (
|
||||
<div id="input-checkbox">
|
||||
<div className="not-prose border-border bg-background border border-dashed p-6">
|
||||
<InputCheckboxCards
|
||||
name="name"
|
||||
title={i18nT("components.input.preview.title")}
|
||||
options={[
|
||||
{
|
||||
name: i18nT("components.previewInputs.options.option1"),
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
name: i18nT("components.previewInputs.options.option2"),
|
||||
value: 2,
|
||||
},
|
||||
{
|
||||
name: i18nT("components.previewInputs.options.option3"),
|
||||
value: 3,
|
||||
disabled: true,
|
||||
},
|
||||
]}
|
||||
value={selected}
|
||||
onChange={(e) => setSelected(e)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
import { useState } from "react";
|
||||
import { t as i18nT } from "i18next";
|
||||
import InputCheckbox from "~/components/ui/input/InputCheckbox";
|
||||
|
||||
export default function PreviewInputCheckboxWithState() {
|
||||
const [value, setValue] = useState(true);
|
||||
return (
|
||||
<div id="input-checkbox-with-state">
|
||||
<div className="border-border bg-background border border-dashed p-6">
|
||||
<InputCheckbox name="name" title={i18nT("components.input.preview.title")} value={value} setValue={setValue} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import { t as i18nT } from "i18next";
|
||||
import InputDate from "~/components/ui/input/InputDate";
|
||||
|
||||
export default function PreviewInputDate() {
|
||||
return (
|
||||
<div id="input-date">
|
||||
<div className="border-border bg-background border border-dashed p-6">
|
||||
<InputDate name="name" title={i18nT("components.input.preview.title")} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
import { useState } from "react";
|
||||
import { t as i18nT } from "i18next";
|
||||
import InputDate from "~/components/ui/input/InputDate";
|
||||
|
||||
export default function PreviewInputDateWithState() {
|
||||
const [value, setValue] = useState(new Date("1990-01-02"));
|
||||
return (
|
||||
<div id="input-date-with-state">
|
||||
<div className="border-border bg-background border border-dashed p-6">
|
||||
<InputDate name="name" title={i18nT("components.input.preview.title")} value={value} onChange={(e) => setValue(e)} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
import { t as i18nT } from "i18next";
|
||||
import InputNumber from "~/components/ui/input/InputNumber";
|
||||
|
||||
export default function PreviewInputNumber() {
|
||||
return (
|
||||
<div id="input-number">
|
||||
<div className="border-border bg-background border border-dashed p-6">
|
||||
<InputNumber name="name" title={i18nT("components.input.preview.title")} defaultValue={undefined} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
import { useState } from "react";
|
||||
import { t as i18nT } from "i18next";
|
||||
import InputNumber from "~/components/ui/input/InputNumber";
|
||||
|
||||
export default function PreviewInputNumberWithAllOptions() {
|
||||
const [value, setValue] = useState<number | undefined>(undefined);
|
||||
return (
|
||||
<div id="input-number-with-all-options">
|
||||
<div className="border-border bg-background border border-dashed p-6">
|
||||
<InputNumber name="name" title={i18nT("components.input.preview.title")} value={value} setValue={setValue} min={0} max={10} required step="0.01" />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
import InputNumber from "~/components/ui/input/InputNumber";
|
||||
import { t as i18nT } from "i18next";
|
||||
|
||||
export default function PreviewInputNumberWithHintAndHelp() {
|
||||
return (
|
||||
<div id="input-number-with-hint-and-help">
|
||||
<div className="border-border bg-background border border-dashed p-6">
|
||||
<InputNumber
|
||||
name="name"
|
||||
title={i18nT("components.input.preview.title")}
|
||||
hint={<span className="text-red-600">{i18nT("components.input.preview.hintText")}</span>}
|
||||
help={i18nT("components.input.preview.helpText")}
|
||||
defaultValue={undefined}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
import { t as i18nT } from "i18next";
|
||||
import InputRadioGroup from "~/components/ui/input/InputRadioGroup";
|
||||
|
||||
export default function PreviewInputRadioGroup() {
|
||||
return (
|
||||
<div id="input-radio-group">
|
||||
<div className="border-border bg-background border border-dashed p-6">
|
||||
<InputRadioGroup
|
||||
name="name"
|
||||
title={i18nT("components.input.preview.title")}
|
||||
options={[
|
||||
{
|
||||
name: i18nT("components.previewInputs.options.option1"),
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
name: i18nT("components.previewInputs.options.option2"),
|
||||
value: 2,
|
||||
},
|
||||
{
|
||||
name: i18nT("components.previewInputs.options.option3"),
|
||||
value: 3,
|
||||
disabled: true,
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
import { t as i18nT } from "i18next";
|
||||
import InputRadioGroupCards from "../../InputRadioGroupCards";
|
||||
|
||||
export default function PreviewInputRadioGroupCards() {
|
||||
return (
|
||||
<div id="input-radio-group">
|
||||
<div className="not-prose border-border bg-background border border-dashed p-6">
|
||||
<InputRadioGroupCards
|
||||
name="name"
|
||||
title={i18nT("components.input.preview.title")}
|
||||
options={[
|
||||
{
|
||||
name: i18nT("components.previewInputs.options.option1"),
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
name: i18nT("components.previewInputs.options.option2"),
|
||||
value: 2,
|
||||
},
|
||||
{
|
||||
name: i18nT("components.previewInputs.options.option3"),
|
||||
value: 3,
|
||||
disabled: true,
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
import { t as i18nT } from "i18next";
|
||||
import { useState } from "react";
|
||||
import InputRadioGroup from "~/components/ui/input/InputRadioGroup";
|
||||
|
||||
type SelectType = string | number | undefined;
|
||||
export default function PreviewInputRadioGroupWithState() {
|
||||
const [value, setValue] = useState<SelectType>(2);
|
||||
return (
|
||||
<div id="input-radio-group-with-state">
|
||||
<div className="border-border bg-background border border-dashed p-6">
|
||||
<InputRadioGroup
|
||||
name="name"
|
||||
title={i18nT("components.input.preview.title")}
|
||||
options={[
|
||||
{
|
||||
name: i18nT("components.previewInputs.options.option1"),
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
name: i18nT("components.previewInputs.options.option2"),
|
||||
value: 2,
|
||||
},
|
||||
{
|
||||
name: i18nT("components.previewInputs.options.option3"),
|
||||
value: 3,
|
||||
disabled: true,
|
||||
},
|
||||
]}
|
||||
value={value}
|
||||
setValue={setValue}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
import { t as i18nT } from "i18next";
|
||||
import InputCombobox from "../../InputCombobox";
|
||||
|
||||
export default function PreviewInputCombobox() {
|
||||
return (
|
||||
<div id="input-selector">
|
||||
<div className="not-prose border-border bg-background border border-dashed p-6">
|
||||
<InputCombobox
|
||||
name="name"
|
||||
title={i18nT("components.input.preview.title")}
|
||||
options={[
|
||||
{
|
||||
name: i18nT("components.previewInputs.options.option1"),
|
||||
value: "1",
|
||||
},
|
||||
{
|
||||
name: i18nT("components.previewInputs.options.option2"),
|
||||
value: "2",
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
import { t as i18nT } from "i18next";
|
||||
import InputSelect from "~/components/ui/input/InputSelect";
|
||||
|
||||
export default function PreviewInputSelect() {
|
||||
return (
|
||||
<div id="input-select">
|
||||
<div className="border-border bg-background border border-dashed p-6">
|
||||
<InputSelect
|
||||
name="name"
|
||||
title={i18nT("components.input.preview.title")}
|
||||
options={[
|
||||
{
|
||||
name: i18nT("components.previewInputs.options.option1"),
|
||||
value: "1",
|
||||
},
|
||||
{
|
||||
name: i18nT("components.previewInputs.options.option2"),
|
||||
value: "2",
|
||||
},
|
||||
{
|
||||
name: i18nT("components.previewInputs.options.option3"),
|
||||
value: "3",
|
||||
disabled: true,
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
import { t as i18nT } from "i18next";
|
||||
import { useState } from "react";
|
||||
import InputSelect from "~/components/ui/input/InputSelect";
|
||||
|
||||
type SelectType = string | number | undefined;
|
||||
export default function PreviewInputSelectWithState() {
|
||||
const [value, setValue] = useState<SelectType>("2");
|
||||
return (
|
||||
<div id="input-select-with-state">
|
||||
<div className="border-border bg-background border border-dashed p-6">
|
||||
<InputSelect
|
||||
name="name"
|
||||
title={i18nT("components.input.preview.title")}
|
||||
options={[
|
||||
{
|
||||
name: i18nT("components.previewInputs.options.option1"),
|
||||
value: "1",
|
||||
},
|
||||
{
|
||||
name: i18nT("components.previewInputs.options.option2"),
|
||||
value: "2",
|
||||
},
|
||||
]}
|
||||
value={value}
|
||||
setValue={setValue}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
import { t as i18nT } from "i18next";
|
||||
import InputSelector from "~/components/ui/input/InputSelector";
|
||||
|
||||
export default function PreviewInputSelector() {
|
||||
return (
|
||||
<div id="input-selector">
|
||||
<div className="not-prose border-border bg-background border border-dashed p-6">
|
||||
<InputSelector
|
||||
name="name"
|
||||
title={i18nT("components.input.preview.title")}
|
||||
options={[
|
||||
{
|
||||
name: i18nT("components.previewInputs.options.option1"),
|
||||
value: "1",
|
||||
},
|
||||
{
|
||||
name: i18nT("components.previewInputs.options.option2"),
|
||||
value: "2",
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
import { t as i18nT } from "i18next";
|
||||
import { useState } from "react";
|
||||
import InputSelector from "~/components/ui/input/InputSelector";
|
||||
|
||||
type SelectType = string | number | undefined;
|
||||
export default function PreviewInputSelectorWithState() {
|
||||
const [value, setValue] = useState<SelectType>("2");
|
||||
return (
|
||||
<div id="input-selector">
|
||||
<div className="not-prose border-border bg-background border border-dashed p-6">
|
||||
<InputSelector
|
||||
name="name"
|
||||
title={i18nT("components.input.preview.title")}
|
||||
options={[
|
||||
{
|
||||
name: i18nT("components.previewInputs.options.option1"),
|
||||
value: "1",
|
||||
},
|
||||
{
|
||||
name: i18nT("components.previewInputs.options.option2"),
|
||||
value: "2",
|
||||
},
|
||||
]}
|
||||
value={value}
|
||||
setValue={setValue}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
import InputMultiText from "../../InputMultiText";
|
||||
import { t as i18nT } from "i18next";
|
||||
|
||||
export default function PreviewInputMultiText() {
|
||||
return (
|
||||
<div id="input-text">
|
||||
<div className="border-border bg-background border border-dashed p-6">
|
||||
<InputMultiText name="name" title={i18nT("components.input.preview.title")} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import { t as i18nT } from "i18next";
|
||||
import InputText from "~/components/ui/input/InputText";
|
||||
|
||||
export default function PreviewInputText() {
|
||||
return (
|
||||
<div id="input-text">
|
||||
<div className="border-border bg-background border border-dashed p-6">
|
||||
<InputText name="name" title={i18nT("components.input.preview.title")} defaultValue="" />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
import { useState } from "react";
|
||||
import { t as i18nT } from "i18next";
|
||||
import InputText from "~/components/ui/input/InputText";
|
||||
|
||||
export default function PreviewInputTextWithAllOptions() {
|
||||
const [value, setValue] = useState("");
|
||||
return (
|
||||
<div id="input-text-with-all-options">
|
||||
<div className="border-border bg-background border border-dashed p-6">
|
||||
<InputText name="name" title={i18nT("components.input.preview.title")} value={value} setValue={setValue} minLength={0} maxLength={10} required />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
import InputText from "~/components/ui/input/InputText";
|
||||
import { t as i18nT } from "i18next";
|
||||
|
||||
export default function PreviewInputTextWithHint() {
|
||||
return (
|
||||
<div id="input-text-with-hint-and-help">
|
||||
<div className="border-border bg-background border border-dashed p-6">
|
||||
<InputText
|
||||
name="name"
|
||||
title={i18nT("components.input.preview.title")}
|
||||
hint={<span className="text-red-600">{i18nT("components.input.preview.hintText")}</span>}
|
||||
defaultValue=""
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
import { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import InputText from "~/components/ui/input/InputText";
|
||||
import { renderSanitizedMarkdown } from "~/utils/html-sanitizer";
|
||||
|
||||
export default function PreviewInputTextWithMonacoEditor() {
|
||||
const { t } = useTranslation();
|
||||
const [markdownValue, setMarkdownValue] = useState(
|
||||
() => `
|
||||
# ${t("components.previewInputs.markdownEditor")}
|
||||
|
||||
## ${t("components.previewInputs.title1")}
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
||||
|
||||
_Image_:
|
||||
|
||||
)})
|
||||
`
|
||||
);
|
||||
return (
|
||||
<div id="input-text">
|
||||
<div className="border-border bg-background border border-dashed p-6">
|
||||
<div className="sm:grid sm:grid-cols-2 sm:gap-2">
|
||||
<InputText
|
||||
className="h-64"
|
||||
name="editor"
|
||||
title={t("components.previewInputs.editor")}
|
||||
editor="monaco"
|
||||
editorLanguage="markdown"
|
||||
editorHideLineNumbers={true}
|
||||
value={markdownValue}
|
||||
setValue={setMarkdownValue}
|
||||
/>
|
||||
|
||||
<div className="h-64 space-y-1 overflow-auto">
|
||||
{/* Caption for a read-only rendered-markdown region, not a form control. */}
|
||||
<div className="text-muted-foreground text-xs font-medium">{t("shared.preview")}</div>
|
||||
<div className="prose border-border rounded-md border-2 border-dashed p-6">
|
||||
<div dangerouslySetInnerHTML={{ __html: renderSanitizedMarkdown(markdownValue) }} />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
import { useState } from "react";
|
||||
import { t as i18nT } from "i18next";
|
||||
import InputText from "~/components/ui/input/InputText";
|
||||
|
||||
export default function PreviewInputTextWithTranslation() {
|
||||
const [valid, setValid] = useState("shared.hi");
|
||||
const [invalid, setInvalid] = useState("shared.invalid.i18n.key");
|
||||
return (
|
||||
<div id="input-text-with-translations">
|
||||
<div className="border-border bg-background border border-dashed p-6">
|
||||
<div className="space-y-2">
|
||||
<InputText name="name" title={i18nT("components.input.preview.validI18nKey")} value={valid} setValue={setValid} withTranslation />
|
||||
<InputText name="name" title={i18nT("components.input.preview.invalidI18nKey")} value={invalid} setValue={setInvalid} withTranslation />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user