@oneblink/apps-react 5.12.1-beta.5 → 5.12.2-beta.1
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.
@@ -3,7 +3,6 @@ import { Tooltip } from '@mui/material';
|
|
3
3
|
import clsx from 'clsx';
|
4
4
|
import useReplaceableText from '../../hooks/useReplaceableText';
|
5
5
|
import QuillHTML from '../QuillHTML';
|
6
|
-
import MaterialIcon from '../MaterialIcon';
|
7
6
|
function FormElementLabelContainer({ className, element, id, required, children, leading, }) {
|
8
7
|
return (React.createElement("div", { className: clsx('ob-form__element', className) },
|
9
8
|
React.createElement("div", { className: "label ob-label__container" },
|
@@ -20,7 +19,7 @@ function FormElementLabelContainer({ className, element, id, required, children,
|
|
20
19
|
export function HintTooltip({ hint, inputId, }) {
|
21
20
|
const html = useReplaceableText(hint);
|
22
21
|
return (React.createElement(Tooltip, { title: React.createElement(QuillHTML, { html: html, className: "ob-hint-tooltip" }), arrow: true, enterTouchDelay: 0, leaveTouchDelay: 10000, id: `${inputId}-hint` },
|
23
|
-
React.createElement(
|
22
|
+
React.createElement("i", { className: "material-icons has-text-grey ob-label__hint" }, "info")));
|
24
23
|
}
|
25
24
|
export function HintBelowLabel({ hint, inputId, }) {
|
26
25
|
const html = useReplaceableText(hint);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"FormElementLabelContainer.js","sourceRoot":"","sources":["../../../src/components/renderer/FormElementLabelContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,IAAI,MAAM,MAAM,CAAA;AAEvB,OAAO,kBAAkB,MAAM,gCAAgC,CAAA;AAC/D,OAAO,SAAS,MAAM,cAAc,CAAA;
|
1
|
+
{"version":3,"file":"FormElementLabelContainer.js","sourceRoot":"","sources":["../../../src/components/renderer/FormElementLabelContainer.tsx"],"names":[],"m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,iBAAiB,GAAG,EAC5D,KAAK,QACL,eAAe,EAAE,CAAC,EAClB,eAAe,EAAE,KAAK,EACtB,EAAE,EAAE,GAAG,OAAO,OAAO;QAErB,2BAAG,SAAS,EAAC,6CAA6C,WAAS,CAC3D,CACX,CAAA;AACH,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,EAC7B,IAAI,EACJ,OAAO,GAIR;IACC,MAAM,IAAI,GAAG,kBAAkB,CAAC,IAAI,CAAC,CAAA;IAErC,OAAO,CACL,oBAAC,SAAS,IAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAC,cAAc,EAAC,EAAE,EAAE,GAAG,OAAO,OAAO,GAAI,CAC1E,CAAA;AACH,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAA","sourcesContent":["import * as React from 'react'\nimport { Tooltip } from '@mui/material'\nimport clsx from 'clsx'\nimport { FormTypes } from '@oneblink/types'\nimport useReplaceableText from '../../hooks/useReplaceableText'\nimport QuillHTML from '../QuillHTML'\n\nfunction FormElementLabelContainer({\n className,\n element,\n id,\n required,\n children,\n leading,\n}: {\n className: string\n element: FormTypes.FormElementBase\n id: string\n required: boolean\n children: React.ReactNode\n leading?: React.ReactNode\n}) {\n return (\n <div className={clsx('ob-form__element', className)}>\n <div className=\"label ob-label__container\">\n {leading}\n <label\n className={clsx('ob-label', {\n 'ob-label__required is-required': required,\n })}\n htmlFor={id}\n >\n {element.label}\n </label>\n {element.hint &&\n (element.hintPosition === 'TOOLTIP' || !element.hintPosition) && (\n <HintTooltip hint={element.hint} inputId={id} />\n )}\n </div>\n {element.hint && element.hintPosition === 'BELOW_LABEL' && (\n <div className=\"ob-hint-text__container\">\n <HintBelowLabel hint={element.hint} inputId={id} />\n </div>\n )}\n {children}\n </div>\n )\n}\n\nexport function HintTooltip({\n hint,\n inputId,\n}: {\n hint: string\n inputId: string\n}) {\n const html = useReplaceableText(hint)\n\n return (\n <Tooltip\n title={<QuillHTML html={html} className=\"ob-hint-tooltip\" />}\n arrow\n enterTouchDelay={0}\n leaveTouchDelay={10000}\n id={`${inputId}-hint`}\n >\n <i className=\"material-icons has-text-grey ob-label__hint\">info</i>\n </Tooltip>\n )\n}\n\nexport function HintBelowLabel({\n hint,\n inputId,\n}: {\n hint: string\n inputId: string\n}) {\n const html = useReplaceableText(hint)\n\n return (\n <QuillHTML html={html} className=\"ob-hint-text\" id={`${inputId}-hint`} />\n )\n}\n\nexport default React.memo(FormElementLabelContainer)\n"]}
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@oneblink/apps-react",
|
3
3
|
"description": "Helper functions for OneBlink apps in ReactJS.",
|
4
|
-
"version": "5.12.
|
4
|
+
"version": "5.12.2-beta.1",
|
5
5
|
"author": "OneBlink <developers@oneblink.io> (https://oneblink.io)",
|
6
6
|
"bugs": {
|
7
7
|
"url": "https://github.com/oneblink/apps-react/issues"
|